bt-core-app 1.4.97 → 1.4.98

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 +797 -793
  2. package/package.json +1 -1
@@ -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 = Ne(), S = Ne(), f = Ne(), g = ee(() => l.value != null);
15
- function D(d) {
14
+ const t = z([]), l = Ne(), S = Ne(), s = Ne(), g = ee(() => l.value != null);
15
+ function I(d) {
16
16
  t.value = t.value.filter((h) => h.id != d);
17
17
  }
18
18
  function C(d) {
@@ -25,7 +25,7 @@ function en(e) {
25
25
  function _(d) {
26
26
  d != null && (S.value = d.toString());
27
27
  }
28
- function M() {
28
+ function L() {
29
29
  S.value = void 0;
30
30
  }
31
31
  async function $(d, h) {
@@ -34,17 +34,17 @@ function en(e) {
34
34
  const r = C(u.loadingMsg);
35
35
  let y = null;
36
36
  try {
37
- return u.requireConfirmation || u.confirmationMsg, y = await d(), u.completionMsg != null && (f.value = u.completionMsg), y;
38
- } catch (x) {
37
+ return u.requireConfirmation || u.confirmationMsg, y = await d(), u.completionMsg != null && (s.value = u.completionMsg), y;
38
+ } catch (D) {
39
39
  if ((e == null ? void 0 : e.onError) != null)
40
- e.onError(x);
40
+ e.onError(D);
41
41
  else {
42
42
  if (u.throwError == !0)
43
- return x;
44
- _(u.errorMsg ?? x ?? "error");
43
+ return D;
44
+ _(u.errorMsg ?? D ?? "error");
45
45
  }
46
46
  } finally {
47
- D(r);
47
+ I(r);
48
48
  }
49
49
  }
50
50
  return Or(t, (d) => {
@@ -52,8 +52,8 @@ function en(e) {
52
52
  }, { deep: !0 }), {
53
53
  actionErrorMsg: S,
54
54
  actionLoadingMsg: l,
55
- actionCompleteMsg: f,
56
- clearErrors: M,
55
+ actionCompleteMsg: s,
56
+ clearErrors: L,
57
57
  doAction: $,
58
58
  isLoading: g,
59
59
  logError: _
@@ -64,35 +64,35 @@ function rn(e) {
64
64
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
65
65
  }
66
66
  var Re = function() {
67
- function e(f) {
68
- return f;
67
+ function e(s) {
68
+ return s;
69
69
  }
70
- function t(f) {
71
- return typeof f == "string" ? f.toLowerCase() : f;
70
+ function t(s) {
71
+ return typeof s == "string" ? s.toLowerCase() : s;
72
72
  }
73
- function l(f, g) {
74
- if (g = typeof g == "object" ? g : { direction: g }, typeof f != "function") {
75
- var D = f;
76
- f = function(d) {
77
- return d[D] ? d[D] : "";
73
+ function l(s, g) {
74
+ if (g = typeof g == "object" ? g : { direction: g }, typeof s != "function") {
75
+ var I = s;
76
+ s = function(d) {
77
+ return d[I] ? d[I] : "";
78
78
  };
79
79
  }
80
- if (f.length === 1) {
81
- var C = f, _ = g.ignoreCase ? t : e, M = g.cmp || function(d, h) {
80
+ if (s.length === 1) {
81
+ var C = s, _ = g.ignoreCase ? t : e, L = g.cmp || function(d, h) {
82
82
  return d < h ? -1 : d > h ? 1 : 0;
83
83
  };
84
- f = function(d, h) {
85
- return M(_(C(d)), _(C(h)));
84
+ s = function(d, h) {
85
+ return L(_(C(d)), _(C(h)));
86
86
  };
87
87
  }
88
88
  const $ = { "-1": "", desc: "" };
89
89
  return g.direction in $ ? function(d, h) {
90
- return -f(d, h);
91
- } : f;
90
+ return -s(d, h);
91
+ } : s;
92
92
  }
93
- function S(f, g) {
94
- var D = typeof this == "function" && !this.firstBy ? this : !1, C = l(f, g), _ = D ? function(M, $) {
95
- return D(M, $) || C(M, $);
93
+ function S(s, g) {
94
+ var I = typeof this == "function" && !this.firstBy ? this : !1, C = l(s, g), _ = I ? function(L, $) {
95
+ return I(L, $) || C(L, $);
96
96
  } : C;
97
97
  return _.thenBy = S, _;
98
98
  }
@@ -166,15 +166,15 @@ function On(e, t, l) {
166
166
  async function pn(e, t = !0) {
167
167
  return new Promise((l, S) => {
168
168
  e == null && S("no url given");
169
- var f = new Image();
170
- f.setAttribute("crossOrigin", "anonymous"), f.onload = function() {
169
+ var s = new Image();
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"));
175
- }, f.onerror = function() {
173
+ var I = g.getContext("2d");
174
+ I == null || I.drawImage(this, 0, 0), l(g.toDataURL("image/png"));
175
+ }, s.onerror = function() {
176
176
  console.log("errr"), t ? S("image could not be loaded for some reason") : l(null);
177
- }, e != null && (f.src = e);
177
+ }, e != null && (s.src = e);
178
178
  });
179
179
  }
180
180
  function tn(e) {
@@ -202,34 +202,34 @@ const Ze = [
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 = Ze.filter((S) => S.values.some((f) => t.some((g) => f == 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 = Ze.find((S) => S.values.some((f) => f == 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(), f = Ze.find((g) => g.values.some((D) => D == S));
218
- return f != null && l.some((g) => g == f.short || f.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((I) => I == S));
218
+ return s != null && l.some((g) => g == s.short || s.values.some((I) => I == 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((f) => Ze.find((g) => g.values.some((D) => D == f))).filter((f) => f != null).sort(Re.firstBy((f) => (f == null ? void 0 : f.value) ?? 0)).map((f) => f == null ? void 0 : f.short))].toString();
225
+ let S = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((s) => Ze.find((g) => g.values.some((I) => I == 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(), f = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((g) => Ze.find((D) => D.values.some((C) => C == g && C != 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
- return f.length > 0 ? f : void 0;
231
+ let l = e ?? "", S = t.replaceAll(" ", "").toLowerCase(), s = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((g) => Ze.find((I) => I.values.some((C) => C == g && C != 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
+ return s.length > 0 ? s : void 0;
233
233
  }
234
234
  function ua(e, t) {
235
235
  return e != null && Array.isArray(e) && e.length == t;
@@ -252,8 +252,8 @@ function ca(e, t) {
252
252
  do
253
253
  l = l + "0", S += 1;
254
254
  while (S < t);
255
- let f = Number.parseInt(l);
256
- return Math.round(e * f) / f;
255
+ let s = Number.parseInt(l);
256
+ return Math.round(e * s) / s;
257
257
  }
258
258
  function fa(e, t) {
259
259
  let l = e ?? "";
@@ -265,7 +265,7 @@ function un(e, t) {
265
265
  if (!t)
266
266
  return !0;
267
267
  var l = e.split(","), S = t.split(",");
268
- return l.some((f) => S.some((g) => g == f));
268
+ return l.some((s) => S.some((g) => g == s));
269
269
  }
270
270
  function Nr(e) {
271
271
  if (!e)
@@ -288,17 +288,17 @@ function tt(e, t = (l) => l) {
288
288
  if (e == null)
289
289
  return [];
290
290
  const l = Array.isArray(e) ? e : t(e);
291
- return _e(l) ? [...l.reduce((S, f) => {
292
- S.push(f);
293
- const g = tt(f, t);
291
+ return _e(l) ? [...l.reduce((S, s) => {
292
+ S.push(s);
293
+ const g = tt(s, t);
294
294
  return _e(g) && S.push(...g), S;
295
295
  }, [])] : [];
296
296
  }
297
297
  function sa(e) {
298
- const t = e.split(","), l = t[0].indexOf("base64") >= 0 ? atob(t[1]) : decodeURI(t[1]), S = t[0].split(":")[1].split(";")[0], f = new Uint8Array(l.length);
298
+ const t = e.split(","), l = t[0].indexOf("base64") >= 0 ? atob(t[1]) : decodeURI(t[1]), S = t[0].split(":")[1].split(";")[0], s = new Uint8Array(l.length);
299
299
  for (let g = 0; g < l.length; g++)
300
- f[g] = l.charCodeAt(g);
301
- return new Blob([f], { type: S });
300
+ s[g] = l.charCodeAt(g);
301
+ return new Blob([s], { type: S });
302
302
  }
303
303
  function sn(e) {
304
304
  var t = "";
@@ -322,8 +322,8 @@ function dn(e, t, l) {
322
322
  return !0;
323
323
  if (e == null || l == null)
324
324
  return !1;
325
- for (let f = 0; f < l.length; f++) {
326
- const g = l[f];
325
+ for (let s = 0; s < l.length; s++) {
326
+ const g = l[s];
327
327
  var S = Sr(e, g);
328
328
  if (S != null && typeof S == "string" && fn(S, t))
329
329
  return !0;
@@ -343,10 +343,10 @@ function Sr(e, t) {
343
343
  return null;
344
344
  var l = t.split(".");
345
345
  let S = l.length;
346
- for (var f = e, g = 0; g < S; g++)
347
- if (f = f[l[g]], f == null)
346
+ for (var s = e, g = 0; g < S; g++)
347
+ if (s = s[l[g]], s == null)
348
348
  return null;
349
- return f;
349
+ return s;
350
350
  }
351
351
  function hn(e) {
352
352
  return e ? /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(e) : !1;
@@ -368,35 +368,35 @@ var nt = { exports: {} };
368
368
  (function(l) {
369
369
  e.exports = l();
370
370
  })(function() {
371
- return function l(S, f, g) {
372
- function D(M, $) {
373
- if (!f[M]) {
374
- if (!S[M]) {
371
+ return function l(S, s, g) {
372
+ function I(L, $) {
373
+ if (!s[L]) {
374
+ if (!S[L]) {
375
375
  var d = typeof Oe == "function" && Oe;
376
376
  if (!$ && d)
377
- return d(M, !0);
377
+ return d(L, !0);
378
378
  if (C)
379
- return C(M, !0);
380
- var h = new Error("Cannot find module '" + M + "'");
379
+ return C(L, !0);
380
+ var h = new Error("Cannot find module '" + L + "'");
381
381
  throw h.code = "MODULE_NOT_FOUND", h;
382
382
  }
383
- var u = f[M] = { exports: {} };
384
- S[M][0].call(u.exports, function(r) {
385
- var y = S[M][1][r];
386
- return D(y || r);
387
- }, u, u.exports, l, S, f, g);
383
+ var u = s[L] = { exports: {} };
384
+ S[L][0].call(u.exports, function(r) {
385
+ var y = S[L][1][r];
386
+ return I(y || r);
387
+ }, u, u.exports, l, S, s, g);
388
388
  }
389
- return f[M].exports;
389
+ return s[L].exports;
390
390
  }
391
391
  for (var C = typeof Oe == "function" && Oe, _ = 0; _ < g.length; _++)
392
- D(g[_]);
393
- return D;
394
- }({ 1: [function(l, S, f) {
392
+ I(g[_]);
393
+ return I;
394
+ }({ 1: [function(l, S, s) {
395
395
  (function(g) {
396
- var D = g.MutationObserver || g.WebKitMutationObserver, C;
397
- if (D) {
398
- var _ = 0, M = new D(r), $ = g.document.createTextNode("");
399
- M.observe($, {
396
+ var I = g.MutationObserver || g.WebKitMutationObserver, C;
397
+ if (I) {
398
+ var _ = 0, L = new I(r), $ = g.document.createTextNode("");
399
+ L.observe($, {
400
400
  characterData: !0
401
401
  }), C = function() {
402
402
  $.data = _ = ++_ % 2;
@@ -408,54 +408,54 @@ var nt = { exports: {} };
408
408
  };
409
409
  } else
410
410
  "document" in g && "onreadystatechange" in g.document.createElement("script") ? C = function() {
411
- var x = g.document.createElement("script");
412
- x.onreadystatechange = function() {
413
- r(), x.onreadystatechange = null, x.parentNode.removeChild(x), x = null;
414
- }, g.document.documentElement.appendChild(x);
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
  } : C = function() {
416
416
  setTimeout(r, 0);
417
417
  };
418
418
  var h, u = [];
419
419
  function r() {
420
420
  h = !0;
421
- for (var x, i, E = u.length; E; ) {
422
- for (i = u, u = [], x = -1; ++x < E; )
423
- i[x]();
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(x) {
430
- u.push(x) === 1 && !h && C();
429
+ function y(D) {
430
+ u.push(D) === 1 && !h && C();
431
431
  }
432
432
  }).call(this, typeof Xe < "u" ? Xe : typeof self < "u" ? self : typeof window < "u" ? window : {});
433
- }, {}], 2: [function(l, S, f) {
433
+ }, {}], 2: [function(l, S, s) {
434
434
  var g = l(1);
435
- function D() {
435
+ function I() {
436
436
  }
437
- var C = {}, _ = ["REJECTED"], M = ["FULFILLED"], $ = ["PENDING"];
437
+ var C = {}, _ = ["REJECTED"], L = ["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 !== I && 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 === M || typeof T != "function" && this.state === _)
447
+ if (typeof b != "function" && this.state === L || typeof T != "function" && this.state === _)
448
448
  return this;
449
- var I = new this.constructor(D);
449
+ var x = new this.constructor(I);
450
450
  if (this.state !== $) {
451
- var N = this.state === M ? b : T;
452
- u(I, N, this.outcome);
451
+ var P = this.state === L ? b : T;
452
+ u(x, P, this.outcome);
453
453
  } else
454
- this.queue.push(new h(I, b, T));
455
- return I;
454
+ this.queue.push(new h(x, b, T));
455
+ return x;
456
456
  };
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);
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
  C.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, I) {
469
+ function u(b, T, x) {
470
470
  g(function() {
471
- var N;
471
+ var P;
472
472
  try {
473
- N = T(I);
474
- } catch (s) {
475
- return C.reject(b, s);
473
+ P = T(x);
474
+ } catch (f) {
475
+ return C.reject(b, f);
476
476
  }
477
- N === b ? C.reject(b, new TypeError("Cannot resolve promise with itself")) : C.resolve(b, N);
477
+ P === b ? C.reject(b, new TypeError("Cannot resolve promise with itself")) : C.resolve(b, P);
478
478
  });
479
479
  }
480
480
  C.resolve = function(b, T) {
481
- var I = x(r, T);
482
- if (I.status === "error")
483
- return C.reject(b, I.value);
484
- var N = I.value;
485
- if (N)
486
- y(b, N);
481
+ var x = D(r, T);
482
+ if (x.status === "error")
483
+ return C.reject(b, x.value);
484
+ var P = x.value;
485
+ if (P)
486
+ y(b, P);
487
487
  else {
488
- b.state = M, b.outcome = T;
489
- for (var s = -1, A = b.queue.length; ++s < A; )
490
- b.queue[s].callFulfilled(T);
488
+ b.state = L, b.outcome = T;
489
+ for (var f = -1, A = b.queue.length; ++f < A; )
490
+ b.queue[f].callFulfilled(T);
491
491
  }
492
492
  return b;
493
493
  }, C.reject = function(b, T) {
494
494
  b.state = _, b.outcome = T;
495
- for (var I = -1, N = b.queue.length; ++I < N; )
496
- b.queue[I].callRejected(T);
495
+ for (var x = -1, P = b.queue.length; ++x < P; )
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 I = !1;
508
- function N(X) {
509
- I || (I = !0, C.reject(b, X));
507
+ var x = !1;
508
+ function P(X) {
509
+ x || (x = !0, C.reject(b, X));
510
510
  }
511
- function s(X) {
512
- I || (I = !0, C.resolve(b, X));
511
+ function f(X) {
512
+ x || (x = !0, C.resolve(b, X));
513
513
  }
514
514
  function A() {
515
- T(s, N);
515
+ T(f, P);
516
516
  }
517
- var j = x(A);
518
- j.status === "error" && N(j.value);
517
+ var j = D(A);
518
+ j.status === "error" && P(j.value);
519
519
  }
520
- function x(b, T) {
521
- var I = {};
520
+ function D(b, T) {
521
+ var x = {};
522
522
  try {
523
- I.value = b(T), I.status = "success";
524
- } catch (N) {
525
- I.status = "error", I.value = N;
523
+ x.value = b(T), x.status = "success";
524
+ } catch (P) {
525
+ x.status = "error", x.value = P;
526
526
  }
527
- return I;
527
+ return x;
528
528
  }
529
529
  d.resolve = i;
530
530
  function i(b) {
531
- return b instanceof this ? b : C.resolve(new this(D), b);
531
+ return b instanceof this ? b : C.resolve(new this(I), b);
532
532
  }
533
533
  d.reject = E;
534
534
  function E(b) {
535
- var T = new this(D);
535
+ var T = new this(I);
536
536
  return C.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 I = b.length, N = !1;
544
- if (!I)
543
+ var x = b.length, P = !1;
544
+ if (!x)
545
545
  return this.resolve([]);
546
- for (var s = new Array(I), A = 0, j = -1, X = new this(D); ++j < I; )
546
+ for (var f = new Array(x), A = 0, j = -1, X = new this(I); ++j < x; )
547
547
  re(b[j], j);
548
548
  return X;
549
549
  function re(ue, be) {
550
550
  T.resolve(ue).then(G, function(Y) {
551
- N || (N = !0, C.reject(X, Y));
551
+ P || (P = !0, C.reject(X, Y));
552
552
  });
553
553
  function G(Y) {
554
- s[be] = Y, ++A === I && !N && (N = !0, C.resolve(X, s));
554
+ f[be] = Y, ++A === x && !P && (P = !0, C.resolve(X, f));
555
555
  }
556
556
  }
557
557
  }
558
- d.race = L;
559
- function L(b) {
558
+ d.race = N;
559
+ function N(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 I = b.length, N = !1;
564
- if (!I)
563
+ var x = b.length, P = !1;
564
+ if (!x)
565
565
  return this.resolve([]);
566
- for (var s = -1, A = new this(D); ++s < I; )
567
- j(b[s]);
566
+ for (var f = -1, A = new this(I); ++f < x; )
567
+ j(b[f]);
568
568
  return A;
569
569
  function j(X) {
570
570
  T.resolve(X).then(function(re) {
571
- N || (N = !0, C.resolve(A, re));
571
+ P || (P = !0, C.resolve(A, re));
572
572
  }, function(re) {
573
- N || (N = !0, C.reject(A, re));
573
+ P || (P = !0, C.reject(A, re));
574
574
  });
575
575
  }
576
576
  }
577
- }, { 1: 1 }], 3: [function(l, S, f) {
577
+ }, { 1: 1 }], 3: [function(l, S, s) {
578
578
  (function(g) {
579
579
  typeof g.Promise != "function" && (g.Promise = l(2));
580
580
  }).call(this, typeof Xe < "u" ? Xe : typeof self < "u" ? self : typeof window < "u" ? window : {});
581
- }, { 2: 2 }], 4: [function(l, S, f) {
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 D(n, c) {
587
+ function I(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 _ = C();
608
- function M() {
608
+ function L() {
609
609
  try {
610
610
  if (!_ || !_.open)
611
611
  return !1;
@@ -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 x = "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, N = "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 I(n) {
659
+ function x(n) {
660
660
  return new d(function(c) {
661
- var a = n.transaction(x, b), m = $([""]);
662
- a.objectStore(x).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\//);
@@ -669,12 +669,12 @@ var nt = { exports: {} };
669
669
  return !1;
670
670
  });
671
671
  }
672
- function N(n) {
673
- return typeof i == "boolean" ? d.resolve(i) : I(n).then(function(c) {
672
+ function P(n) {
673
+ return typeof i == "boolean" ? d.resolve(i) : x(n).then(function(c) {
674
674
  return i = c, i;
675
675
  });
676
676
  }
677
- function s(n) {
677
+ function f(n) {
678
678
  var c = E[n.name], a = {};
679
679
  a.promise = new d(function(m, v) {
680
680
  a.resolve = m, a.reject = v;
@@ -696,29 +696,29 @@ var nt = { exports: {} };
696
696
  return new d(function(a, m) {
697
697
  if (E[n.name] = E[n.name] || ne(), n.db)
698
698
  if (c)
699
- s(n), n.db.close();
699
+ f(n), n.db.close();
700
700
  else
701
701
  return a(n.db);
702
702
  var v = [n.name];
703
703
  c && v.push(n.version);
704
704
  var o = _.open.apply(_, v);
705
- c && (o.onupgradeneeded = function(P) {
705
+ c && (o.onupgradeneeded = function(M) {
706
706
  var R = o.result;
707
707
  try {
708
- R.createObjectStore(n.storeName), P.oldVersion <= 1 && R.createObjectStore(x);
708
+ R.createObjectStore(n.storeName), M.oldVersion <= 1 && R.createObjectStore(D);
709
709
  } catch (B) {
710
710
  if (B.name === "ConstraintError")
711
- console.warn('The database "' + n.name + '" has been upgraded from version ' + P.oldVersion + " to version " + P.newVersion + ', but the storage "' + n.storeName + '" already exists.');
711
+ console.warn('The database "' + n.name + '" has been upgraded from version ' + M.oldVersion + " to version " + M.newVersion + ', but the storage "' + n.storeName + '" already exists.');
712
712
  else
713
713
  throw B;
714
714
  }
715
- }), o.onerror = function(P) {
716
- P.preventDefault(), m(o.error);
715
+ }), o.onerror = function(M) {
716
+ M.preventDefault(), m(o.error);
717
717
  }, o.onsuccess = function() {
718
- var P = o.result;
719
- P.onversionchange = function(R) {
718
+ var M = o.result;
719
+ M.onversionchange = function(R) {
720
720
  R.target.close();
721
- }, a(P), A(n);
721
+ }, a(M), A(n);
722
722
  };
723
723
  });
724
724
  }
@@ -770,7 +770,7 @@ var nt = { exports: {} };
770
770
  return u(a, n, n), a;
771
771
  }
772
772
  function Z(n) {
773
- s(n);
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);
@@ -779,8 +779,8 @@ var nt = { exports: {} };
779
779
  return n.db = o, be(n) ? ue(n) : o;
780
780
  }).then(function(o) {
781
781
  n.db = c.db = o;
782
- for (var P = 0; P < a.length; P++)
783
- a[P]._dbInfo.db = o;
782
+ for (var M = 0; M < a.length; M++)
783
+ a[M]._dbInfo.db = o;
784
784
  }).catch(function(o) {
785
785
  throw j(n, o), o;
786
786
  });
@@ -825,12 +825,12 @@ var nt = { exports: {} };
825
825
  var v = E[a.name];
826
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
- function P() {
828
+ function M() {
829
829
  return d.resolve();
830
830
  }
831
831
  for (var R = 0; R < v.forages.length; R++) {
832
832
  var B = v.forages[R];
833
- B !== c && o.push(B._initReady().catch(P));
833
+ B !== c && o.push(B._initReady().catch(M));
834
834
  }
835
835
  var F = v.forages.slice(0);
836
836
  return d.all(o).then(function() {
@@ -850,9 +850,9 @@ var nt = { exports: {} };
850
850
  n = r(n);
851
851
  var m = new d(function(v, o) {
852
852
  a.ready().then(function() {
853
- W(a._dbInfo, L, function(P, R) {
854
- if (P)
855
- return o(P);
853
+ W(a._dbInfo, N, function(M, R) {
854
+ if (M)
855
+ return o(M);
856
856
  try {
857
857
  var B = R.objectStore(a._dbInfo.storeName), F = B.get(n);
858
858
  F.onsuccess = function() {
@@ -872,9 +872,9 @@ var nt = { exports: {} };
872
872
  function ge(n, c) {
873
873
  var a = this, m = new d(function(v, o) {
874
874
  a.ready().then(function() {
875
- W(a._dbInfo, L, function(P, R) {
876
- if (P)
877
- return o(P);
875
+ W(a._dbInfo, N, function(M, R) {
876
+ if (M)
877
+ return o(M);
878
878
  try {
879
879
  var B = R.objectStore(a._dbInfo.storeName), F = B.openCursor(), k = 1;
880
880
  F.onsuccess = function() {
@@ -900,16 +900,16 @@ var nt = { exports: {} };
900
900
  function Be(n, c, a) {
901
901
  var m = this;
902
902
  n = r(n);
903
- var v = new d(function(o, P) {
903
+ var v = new d(function(o, M) {
904
904
  var R;
905
905
  m.ready().then(function() {
906
- return R = m._dbInfo, w.call(c) === "[object Blob]" ? N(R.db).then(function(B) {
906
+ return R = m._dbInfo, w.call(c) === "[object Blob]" ? P(R.db).then(function(B) {
907
907
  return B ? c : G(c);
908
908
  }) : c;
909
909
  }).then(function(B) {
910
910
  W(m._dbInfo, b, function(F, k) {
911
911
  if (F)
912
- return P(F);
912
+ return M(F);
913
913
  try {
914
914
  var q = k.objectStore(m._dbInfo.storeName);
915
915
  B === null && (B = void 0);
@@ -918,13 +918,13 @@ var nt = { exports: {} };
918
918
  B === void 0 && (B = null), o(B);
919
919
  }, k.onabort = k.onerror = function() {
920
920
  var p = J.error ? J.error : J.transaction.error;
921
- P(p);
921
+ M(p);
922
922
  };
923
923
  } catch (p) {
924
- P(p);
924
+ M(p);
925
925
  }
926
926
  });
927
- }).catch(P);
927
+ }).catch(M);
928
928
  });
929
929
  return h(v, a), v;
930
930
  }
@@ -933,9 +933,9 @@ var nt = { exports: {} };
933
933
  n = r(n);
934
934
  var m = new d(function(v, o) {
935
935
  a.ready().then(function() {
936
- W(a._dbInfo, b, function(P, R) {
937
- if (P)
938
- return o(P);
936
+ W(a._dbInfo, b, function(M, R) {
937
+ if (M)
938
+ return o(M);
939
939
  try {
940
940
  var B = R.objectStore(a._dbInfo.storeName), F = B.delete(n);
941
941
  R.oncomplete = function() {
@@ -957,14 +957,14 @@ var nt = { exports: {} };
957
957
  function Fe(n) {
958
958
  var c = this, a = new d(function(m, v) {
959
959
  c.ready().then(function() {
960
- W(c._dbInfo, b, function(o, P) {
960
+ W(c._dbInfo, b, function(o, M) {
961
961
  if (o)
962
962
  return v(o);
963
963
  try {
964
- var R = P.objectStore(c._dbInfo.storeName), B = R.clear();
965
- P.oncomplete = function() {
964
+ var R = M.objectStore(c._dbInfo.storeName), B = R.clear();
965
+ M.oncomplete = function() {
966
966
  m();
967
- }, P.onabort = P.onerror = function() {
967
+ }, M.onabort = M.onerror = function() {
968
968
  var F = B.error ? B.error : B.transaction.error;
969
969
  v(F);
970
970
  };
@@ -979,11 +979,11 @@ 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
- W(c._dbInfo, L, function(o, P) {
982
+ W(c._dbInfo, N, function(o, M) {
983
983
  if (o)
984
984
  return v(o);
985
985
  try {
986
- var R = P.objectStore(c._dbInfo.storeName), B = R.count();
986
+ var R = M.objectStore(c._dbInfo.storeName), B = R.count();
987
987
  B.onsuccess = function() {
988
988
  m(B.result);
989
989
  }, B.onerror = function() {
@@ -1004,9 +1004,9 @@ var nt = { exports: {} };
1004
1004
  return;
1005
1005
  }
1006
1006
  a.ready().then(function() {
1007
- W(a._dbInfo, L, function(P, R) {
1008
- if (P)
1009
- return o(P);
1007
+ W(a._dbInfo, N, function(M, R) {
1008
+ if (M)
1009
+ return o(M);
1010
1010
  try {
1011
1011
  var B = R.objectStore(a._dbInfo.storeName), F = !1, k = B.openKeyCursor();
1012
1012
  k.onsuccess = function() {
@@ -1030,11 +1030,11 @@ var nt = { exports: {} };
1030
1030
  function Ce(n) {
1031
1031
  var c = this, a = new d(function(m, v) {
1032
1032
  c.ready().then(function() {
1033
- W(c._dbInfo, L, function(o, P) {
1033
+ W(c._dbInfo, N, function(o, M) {
1034
1034
  if (o)
1035
1035
  return v(o);
1036
1036
  try {
1037
- var R = P.objectStore(c._dbInfo.storeName), B = R.openKeyCursor(), F = [];
1037
+ var R = M.objectStore(c._dbInfo.storeName), B = R.openKeyCursor(), F = [];
1038
1038
  B.onsuccess = function() {
1039
1039
  var k = B.result;
1040
1040
  if (!k) {
@@ -1061,17 +1061,17 @@ 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, P = o ? d.resolve(m._dbInfo.db) : re(n).then(function(R) {
1064
+ var o = n.name === a.name && m._dbInfo.db, M = 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++)
1068
1068
  F[k]._dbInfo.db = R;
1069
1069
  return R;
1070
1070
  });
1071
- n.storeName ? v = P.then(function(R) {
1071
+ n.storeName ? v = M.then(function(R) {
1072
1072
  if (R.objectStoreNames.contains(n.storeName)) {
1073
1073
  var B = R.version + 1;
1074
- s(n);
1074
+ f(n);
1075
1075
  var F = E[n.name], k = F.forages;
1076
1076
  R.close();
1077
1077
  for (var q = 0; q < k.length; q++) {
@@ -1102,8 +1102,8 @@ var nt = { exports: {} };
1102
1102
  }), te;
1103
1103
  });
1104
1104
  }
1105
- }) : v = P.then(function(R) {
1106
- s(n);
1105
+ }) : v = M.then(function(R) {
1106
+ f(n);
1107
1107
  var B = E[n.name], F = B.forages;
1108
1108
  R.close();
1109
1109
  for (var k = 0; k < F.length; k++) {
@@ -1139,7 +1139,7 @@ var nt = { exports: {} };
1139
1139
  var lr = {
1140
1140
  _driver: "asyncStorage",
1141
1141
  _initStorage: ce,
1142
- _support: M(),
1142
+ _support: L(),
1143
1143
  iterate: ge,
1144
1144
  getItem: se,
1145
1145
  setItem: Be,
@@ -1155,11 +1155,11 @@ var nt = { exports: {} };
1155
1155
  }
1156
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
1157
  function Ae(n) {
1158
- var c = n.length * 0.75, a = n.length, m, v = 0, o, P, R, B;
1158
+ var c = n.length * 0.75, a = n.length, m, v = 0, o, M, 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 = Se.indexOf(n[m]), P = Se.indexOf(n[m + 1]), R = Se.indexOf(n[m + 2]), B = Se.indexOf(n[m + 3]), k[v++] = o << 2 | P >> 4, k[v++] = (P & 15) << 4 | R >> 2, k[v++] = (R & 3) << 6 | B & 63;
1162
+ o = Se.indexOf(n[m]), M = Se.indexOf(n[m + 1]), R = Se.indexOf(n[m + 2]), B = Se.indexOf(n[m + 3]), k[v++] = o << 2 | M >> 4, k[v++] = (M & 15) << 4 | R >> 2, k[v++] = (R & 3) << 6 | B & 63;
1163
1163
  return F;
1164
1164
  }
1165
1165
  function oe(n) {
@@ -1176,14 +1176,14 @@ var nt = { exports: {} };
1176
1176
  } else if (a === "[object Blob]") {
1177
1177
  var o = new FileReader();
1178
1178
  o.onload = function() {
1179
- var P = ir + n.type + "~" + oe(this.result);
1180
- c(ke + Ie + P);
1179
+ var M = ir + n.type + "~" + oe(this.result);
1180
+ c(ke + Ie + M);
1181
1181
  }, o.readAsArrayBuffer(n);
1182
1182
  } else
1183
1183
  try {
1184
1184
  c(JSON.stringify(n));
1185
- } catch (P) {
1186
- console.error("Couldn't convert value into a JSON string: ", n), c(null, P);
1185
+ } catch (M) {
1186
+ console.error("Couldn't convert value into a JSON string: ", n), c(null, M);
1187
1187
  }
1188
1188
  }
1189
1189
  function ct(n) {
@@ -1238,29 +1238,29 @@ var nt = { exports: {} };
1238
1238
  if (n)
1239
1239
  for (var m in n)
1240
1240
  a[m] = typeof n[m] != "string" ? n[m].toString() : n[m];
1241
- var v = new d(function(o, P) {
1241
+ var v = new d(function(o, M) {
1242
1242
  try {
1243
1243
  a.db = openDatabase(a.name, String(a.version), a.description, a.size);
1244
1244
  } catch (R) {
1245
- return P(R);
1245
+ return M(R);
1246
1246
  }
1247
1247
  a.db.transaction(function(R) {
1248
1248
  Rr(R, a, function() {
1249
1249
  c._dbInfo = a, o();
1250
1250
  }, function(B, F) {
1251
- P(F);
1251
+ M(F);
1252
1252
  });
1253
- }, P);
1253
+ }, M);
1254
1254
  });
1255
1255
  return a.serializer = cr, v;
1256
1256
  }
1257
1257
  function xe(n, c, a, m, v, o) {
1258
- n.executeSql(a, m, v, function(P, R) {
1259
- R.code === R.SYNTAX_ERR ? P.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?", [c.storeName], function(B, F) {
1258
+ n.executeSql(a, m, v, function(M, R) {
1259
+ R.code === R.SYNTAX_ERR ? M.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?", [c.storeName], function(B, F) {
1260
1260
  F.rows.length ? o(B, R) : Rr(B, c, function() {
1261
1261
  B.executeSql(a, m, v, o);
1262
1262
  }, o);
1263
- }, o) : o(P, R);
1263
+ }, o) : o(M, R);
1264
1264
  }, o);
1265
1265
  }
1266
1266
  function st(n, c) {
@@ -1268,11 +1268,11 @@ var nt = { exports: {} };
1268
1268
  n = r(n);
1269
1269
  var m = new d(function(v, o) {
1270
1270
  a.ready().then(function() {
1271
- var P = a._dbInfo;
1272
- P.db.transaction(function(R) {
1273
- xe(R, P, "SELECT * FROM " + P.storeName + " WHERE key = ? LIMIT 1", [n], function(B, F) {
1271
+ var M = a._dbInfo;
1272
+ M.db.transaction(function(R) {
1273
+ xe(R, M, "SELECT * FROM " + M.storeName + " WHERE key = ? LIMIT 1", [n], function(B, F) {
1274
1274
  var k = F.rows.length ? F.rows.item(0).value : null;
1275
- k && (k = P.serializer.deserialize(k)), v(k);
1275
+ k && (k = M.serializer.deserialize(k)), v(k);
1276
1276
  }, function(B, F) {
1277
1277
  o(F);
1278
1278
  });
@@ -1284,12 +1284,12 @@ var nt = { exports: {} };
1284
1284
  function ot(n, c) {
1285
1285
  var a = this, m = new d(function(v, o) {
1286
1286
  a.ready().then(function() {
1287
- var P = a._dbInfo;
1288
- P.db.transaction(function(R) {
1289
- xe(R, P, "SELECT * FROM " + P.storeName, [], function(B, F) {
1287
+ var M = a._dbInfo;
1288
+ M.db.transaction(function(R) {
1289
+ xe(R, M, "SELECT * FROM " + M.storeName, [], function(B, F) {
1290
1290
  for (var k = F.rows, q = k.length, J = 0; J < q; J++) {
1291
1291
  var p = k.item(J), te = p.value;
1292
- if (te && (te = P.serializer.deserialize(te)), te = n(te, p.key, J + 1), te !== void 0) {
1292
+ if (te && (te = M.serializer.deserialize(te)), te = n(te, p.key, J + 1), te !== void 0) {
1293
1293
  v(te);
1294
1294
  return;
1295
1295
  }
@@ -1306,21 +1306,21 @@ var nt = { exports: {} };
1306
1306
  function Ur(n, c, a, m) {
1307
1307
  var v = this;
1308
1308
  n = r(n);
1309
- var o = new d(function(P, R) {
1309
+ var o = new d(function(M, R) {
1310
1310
  v.ready().then(function() {
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
1314
  q ? R(q) : F.db.transaction(function(J) {
1315
1315
  xe(J, F, "INSERT OR REPLACE INTO " + F.storeName + " (key, value) VALUES (?, ?)", [n, k], function() {
1316
- P(B);
1316
+ M(B);
1317
1317
  }, function(p, te) {
1318
1318
  R(te);
1319
1319
  });
1320
1320
  }, function(J) {
1321
1321
  if (J.code === J.QUOTA_ERR) {
1322
1322
  if (m > 0) {
1323
- P(Ur.apply(v, [n, B, a, m - 1]));
1323
+ M(Ur.apply(v, [n, B, a, m - 1]));
1324
1324
  return;
1325
1325
  }
1326
1326
  R(J);
@@ -1339,9 +1339,9 @@ var nt = { exports: {} };
1339
1339
  n = r(n);
1340
1340
  var m = new d(function(v, o) {
1341
1341
  a.ready().then(function() {
1342
- var P = a._dbInfo;
1343
- P.db.transaction(function(R) {
1344
- xe(R, P, "DELETE FROM " + P.storeName + " WHERE key = ?", [n], function() {
1342
+ var M = a._dbInfo;
1343
+ M.db.transaction(function(R) {
1344
+ xe(R, M, "DELETE FROM " + M.storeName + " WHERE key = ?", [n], function() {
1345
1345
  v();
1346
1346
  }, function(B, F) {
1347
1347
  o(F);
@@ -1355,8 +1355,8 @@ var nt = { exports: {} };
1355
1355
  var c = this, a = new d(function(m, v) {
1356
1356
  c.ready().then(function() {
1357
1357
  var o = c._dbInfo;
1358
- o.db.transaction(function(P) {
1359
- xe(P, o, "DELETE FROM " + o.storeName, [], function() {
1358
+ o.db.transaction(function(M) {
1359
+ xe(M, o, "DELETE FROM " + o.storeName, [], function() {
1360
1360
  m();
1361
1361
  }, function(R, B) {
1362
1362
  v(B);
@@ -1370,8 +1370,8 @@ var nt = { exports: {} };
1370
1370
  var c = this, a = new d(function(m, v) {
1371
1371
  c.ready().then(function() {
1372
1372
  var o = c._dbInfo;
1373
- o.db.transaction(function(P) {
1374
- xe(P, o, "SELECT COUNT(key) as c FROM " + o.storeName, [], function(R, B) {
1373
+ o.db.transaction(function(M) {
1374
+ xe(M, o, "SELECT COUNT(key) as c FROM " + o.storeName, [], function(R, B) {
1375
1375
  var F = B.rows.item(0).c;
1376
1376
  m(F);
1377
1377
  }, function(R, B) {
@@ -1385,9 +1385,9 @@ var nt = { exports: {} };
1385
1385
  function gt(n, c) {
1386
1386
  var a = this, m = new d(function(v, o) {
1387
1387
  a.ready().then(function() {
1388
- var P = a._dbInfo;
1389
- P.db.transaction(function(R) {
1390
- xe(R, P, "SELECT key FROM " + P.storeName + " WHERE id = ? LIMIT 1", [n + 1], function(B, F) {
1388
+ var M = a._dbInfo;
1389
+ M.db.transaction(function(R) {
1390
+ xe(R, M, "SELECT key FROM " + M.storeName + " WHERE id = ? LIMIT 1", [n + 1], function(B, F) {
1391
1391
  var k = F.rows.length ? F.rows.item(0).key : null;
1392
1392
  v(k);
1393
1393
  }, function(B, F) {
@@ -1402,8 +1402,8 @@ var nt = { exports: {} };
1402
1402
  var c = this, a = new d(function(m, v) {
1403
1403
  c.ready().then(function() {
1404
1404
  var o = c._dbInfo;
1405
- o.db.transaction(function(P) {
1406
- xe(P, o, "SELECT key FROM " + o.storeName, [], function(R, B) {
1405
+ o.db.transaction(function(M) {
1406
+ xe(M, o, "SELECT key FROM " + o.storeName, [], function(R, B) {
1407
1407
  for (var F = [], k = 0; k < B.rows.length; k++)
1408
1408
  F.push(B.rows.item(k).key);
1409
1409
  m(F);
@@ -1419,11 +1419,11 @@ var nt = { exports: {} };
1419
1419
  return new d(function(c, a) {
1420
1420
  n.transaction(function(m) {
1421
1421
  m.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'", [], function(v, o) {
1422
- for (var P = [], R = 0; R < o.rows.length; R++)
1423
- P.push(o.rows.item(R).name);
1422
+ for (var M = [], R = 0; R < o.rows.length; R++)
1423
+ M.push(o.rows.item(R).name);
1424
1424
  c({
1425
1425
  db: n,
1426
- storeNames: P
1426
+ storeNames: M
1427
1427
  });
1428
1428
  }, function(v, o) {
1429
1429
  a(o);
@@ -1439,13 +1439,13 @@ var nt = { exports: {} };
1439
1439
  n = typeof n != "function" && n || {}, n.name || (n.name = n.name || a.name, n.storeName = n.storeName || a.storeName);
1440
1440
  var m = this, v;
1441
1441
  return n.name ? v = new d(function(o) {
1442
- var P;
1443
- n.name === a.name ? P = m._dbInfo.db : P = openDatabase(n.name, "", "", 0), n.storeName ? o({
1444
- db: P,
1442
+ var M;
1443
+ n.name === a.name ? M = m._dbInfo.db : M = openDatabase(n.name, "", "", 0), n.storeName ? o({
1444
+ db: M,
1445
1445
  storeNames: [n.storeName]
1446
- }) : o(wt(P));
1446
+ }) : o(wt(M));
1447
1447
  }).then(function(o) {
1448
- return new d(function(P, R) {
1448
+ return new d(function(M, R) {
1449
1449
  o.db.transaction(function(B) {
1450
1450
  function F(p) {
1451
1451
  return new d(function(te, fe) {
@@ -1459,7 +1459,7 @@ var nt = { exports: {} };
1459
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
- P();
1462
+ M();
1463
1463
  }).catch(function(p) {
1464
1464
  R(p);
1465
1465
  });
@@ -1533,11 +1533,11 @@ var nt = { exports: {} };
1533
1533
  }
1534
1534
  function _t(n, c) {
1535
1535
  var a = this, m = a.ready().then(function() {
1536
- for (var v = a._dbInfo, o = v.keyPrefix, P = o.length, R = localStorage.length, B = 1, F = 0; F < R; F++) {
1536
+ for (var v = a._dbInfo, o = v.keyPrefix, M = o.length, R = localStorage.length, B = 1, F = 0; F < R; F++) {
1537
1537
  var k = localStorage.key(F);
1538
1538
  if (k.indexOf(o) === 0) {
1539
1539
  var q = localStorage.getItem(k);
1540
- if (q && (q = v.serializer.deserialize(q)), q = n(q, k.substring(P), B++), q !== void 0)
1540
+ if (q && (q = v.serializer.deserialize(q)), q = n(q, k.substring(M), B++), q !== void 0)
1541
1541
  return q;
1542
1542
  }
1543
1543
  }
@@ -1558,8 +1558,8 @@ var nt = { exports: {} };
1558
1558
  }
1559
1559
  function Pt(n) {
1560
1560
  var c = this, a = c.ready().then(function() {
1561
- for (var m = c._dbInfo, v = localStorage.length, o = [], P = 0; P < v; P++) {
1562
- var R = localStorage.key(P);
1561
+ for (var m = c._dbInfo, v = localStorage.length, o = [], M = 0; M < v; M++) {
1562
+ var R = localStorage.key(M);
1563
1563
  R.indexOf(m.keyPrefix) === 0 && o.push(R.substring(m.keyPrefix.length));
1564
1564
  }
1565
1565
  return o;
@@ -1587,14 +1587,14 @@ var nt = { exports: {} };
1587
1587
  var v = m.ready().then(function() {
1588
1588
  c === void 0 && (c = null);
1589
1589
  var o = c;
1590
- return new d(function(P, R) {
1590
+ return new d(function(M, R) {
1591
1591
  var B = m._dbInfo;
1592
1592
  B.serializer.serialize(c, function(F, k) {
1593
1593
  if (k)
1594
1594
  R(k);
1595
1595
  else
1596
1596
  try {
1597
- localStorage.setItem(B.keyPrefix + n, F), P(o);
1597
+ localStorage.setItem(B.keyPrefix + n, F), M(o);
1598
1598
  } catch (q) {
1599
1599
  (q.name === "QuotaExceededError" || q.name === "NS_ERROR_DOM_QUOTA_REACHED") && R(q), R(q);
1600
1600
  }
@@ -1612,8 +1612,8 @@ var nt = { exports: {} };
1612
1612
  return n.name ? v = new d(function(o) {
1613
1613
  n.storeName ? o(Br(n, m._defaultConfig)) : o(n.name + "/");
1614
1614
  }).then(function(o) {
1615
- for (var P = localStorage.length - 1; P >= 0; P--) {
1616
- var R = localStorage.key(P);
1615
+ for (var M = localStorage.length - 1; M >= 0; M--) {
1616
+ var R = localStorage.key(M);
1617
1617
  R.indexOf(o) === 0 && localStorage.removeItem(R);
1618
1618
  }
1619
1619
  }) : v = d.reject("Invalid arguments"), h(v, c), v;
@@ -1675,7 +1675,7 @@ var nt = { exports: {} };
1675
1675
  }
1676
1676
  var Wt = function() {
1677
1677
  function n(c) {
1678
- D(this, n);
1678
+ I(this, n);
1679
1679
  for (var a in Ge)
1680
1680
  if (Ge.hasOwnProperty(a)) {
1681
1681
  var m = Ge[a], v = m._driver;
@@ -1697,7 +1697,7 @@ var nt = { exports: {} };
1697
1697
  } else
1698
1698
  return typeof a == "string" ? this._config[a] : this._config;
1699
1699
  }, n.prototype.defineDriver = function(a, m, v) {
1700
- var o = new d(function(P, R) {
1700
+ var o = new d(function(M, R) {
1701
1701
  try {
1702
1702
  var B = a._driver, F = new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");
1703
1703
  if (!a._driver) {
@@ -1724,7 +1724,7 @@ var nt = { exports: {} };
1724
1724
  };
1725
1725
  fe();
1726
1726
  var ae = function(Ye) {
1727
- ze[B] && console.info("Redefining LocalForage driver: " + B), ze[B] = a, Fr[B] = Ye, P();
1727
+ ze[B] && console.info("Redefining LocalForage driver: " + B), ze[B] = a, Fr[B] = Ye, M();
1728
1728
  };
1729
1729
  "_support" in a ? a._support && typeof a._support == "function" ? a._support().then(ae, R) : ae(!!a._support) : ae(!0);
1730
1730
  } catch (we) {
@@ -1748,7 +1748,7 @@ var nt = { exports: {} };
1748
1748
  }, n.prototype.setDriver = function(a, m, v) {
1749
1749
  var o = this;
1750
1750
  $r(a) || (a = [a]);
1751
- var P = this._getSupportedDrivers(a);
1751
+ var M = this._getSupportedDrivers(a);
1752
1752
  function R() {
1753
1753
  o._config.driver = o.driver();
1754
1754
  }
@@ -1774,9 +1774,9 @@ var nt = { exports: {} };
1774
1774
  return d.resolve();
1775
1775
  }) : d.resolve();
1776
1776
  return this._driverSet = k.then(function() {
1777
- var q = P[0];
1777
+ var q = M[0];
1778
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(P);
1779
+ o._driver = J._driver, R(), o._wrapLibraryMethodsWithReady(), o._initDriver = F(M);
1780
1780
  });
1781
1781
  }).catch(function() {
1782
1782
  R();
@@ -1789,8 +1789,8 @@ var nt = { exports: {} };
1789
1789
  sr(this, a);
1790
1790
  }, n.prototype._getSupportedDrivers = function(a) {
1791
1791
  for (var m = [], v = 0, o = a.length; v < o; v++) {
1792
- var P = a[v];
1793
- this.supports(P) && m.push(P);
1792
+ var M = a[v];
1793
+ this.supports(M) && m.push(M);
1794
1794
  }
1795
1795
  return m;
1796
1796
  }, n.prototype._wrapLibraryMethodsWithReady = function() {
@@ -1837,20 +1837,20 @@ function ve() {
1837
1837
  return (pe == null || pe.config.name != e) && (pe = at.createInstance({ name: e })), pe;
1838
1838
  }
1839
1839
  function ma() {
1840
- async function e(f) {
1840
+ async function e(s) {
1841
1841
  const g = ve();
1842
- (await g.keys()).filter((_) => _.startsWith(f)).forEach((_) => {
1842
+ (await g.keys()).filter((_) => _.startsWith(s)).forEach((_) => {
1843
1843
  g.removeItem(_);
1844
1844
  });
1845
1845
  }
1846
- async function t(f) {
1847
- return await ve().getItem(f);
1846
+ async function t(s) {
1847
+ return await ve().getItem(s);
1848
1848
  }
1849
- async function l(f) {
1850
- return await ve().removeItem(f);
1849
+ async function l(s) {
1850
+ return await ve().removeItem(s);
1851
1851
  }
1852
- async function S(f, g) {
1853
- await ve().setItem(g, f);
1852
+ async function S(s, g) {
1853
+ await ve().setItem(g, s);
1854
1854
  }
1855
1855
  return {
1856
1856
  clearAsync: e,
@@ -1873,8 +1873,8 @@ function wn(e) {
1873
1873
  }), rr;
1874
1874
  }
1875
1875
  function bn(e) {
1876
- var l, S, f, 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 = (f = e.navigation) == null ? void 0 : f.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, I;
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 = ((I = e.navigation) == null ? void 0 : I.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");
@@ -1894,8 +1894,8 @@ const Sn = (e) => {
1894
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) {
1895
1895
  t ?? (t = "");
1896
1896
  let l = new URLSearchParams();
1897
- Object.entries(e.params).sort(Re.firstBy((f) => f[0])).forEach((f) => {
1898
- f[1] != null && l.append(f[0], f[1].toString());
1897
+ Object.entries(e.params).sort(Re.firstBy((s) => s[0])).forEach((s) => {
1898
+ s[1] != null && l.append(s[0], s[1].toString());
1899
1899
  }), t = `${t}?${l.toString()}`;
1900
1900
  }
1901
1901
  return e.finalUrl = t, e.finalUrl ?? "";
@@ -1903,19 +1903,19 @@ const Sn = (e) => {
1903
1903
  function An(e) {
1904
1904
  return pr(e.storeName, () => {
1905
1905
  var u;
1906
- const t = he.utc().toSeconds() / 86400, l = z({}), S = z({}), f = e.storageMode == "local-cache", g = e.buildUrl ?? ((u = e.api) == null ? void 0 : u.buildUrl) ?? Sn;
1907
- function D(r) {
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 I(r) {
1908
1908
  var i, E;
1909
1909
  let y = "";
1910
- const x = r.params ?? {};
1911
- return x != null && (y = Object.entries(x).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 C(r) {
1914
1914
  r.additionalUrl ?? (r.additionalUrl = "/getAll"), g(r);
1915
- const y = D(r), x = r.refresh;
1916
- if (!x && l.value[y] !== void 0)
1915
+ const y = I(r), D = r.refresh;
1916
+ if (!D && l.value[y] !== void 0)
1917
1917
  return l.value[y];
1918
- if (!x && f == !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;
@@ -1924,18 +1924,18 @@ function An(e) {
1924
1924
  return l.value[y];
1925
1925
  try {
1926
1926
  let i = S.value[y];
1927
- i == null && (i = new Promise(async (w, L) => {
1927
+ i == null && (i = new Promise(async (w, N) => {
1928
1928
  var b;
1929
1929
  try {
1930
- const T = await ((b = e.api) == null ? void 0 : b.getAll(r)), I = {
1930
+ const T = await ((b = e.api) == null ? void 0 : b.getAll(r)), x = {
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
- f == !0 && await ve().setItem(y, I), w(I);
1936
+ s == !0 && await ve().setItem(y, x), w(x);
1937
1937
  } catch (T) {
1938
- L(T);
1938
+ N(T);
1939
1939
  } finally {
1940
1940
  delete S.value[y];
1941
1941
  }
@@ -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), x = r.refresh;
1956
- if (!x && l.value[y] !== void 0)
1955
+ const y = I(r), D = r.refresh;
1956
+ if (!D && l.value[y] !== void 0)
1957
1957
  return l.value[y];
1958
- if (!x && f == !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 };
@@ -1964,17 +1964,17 @@ function An(e) {
1964
1964
  return l.value[y];
1965
1965
  try {
1966
1966
  let i = S.value[y];
1967
- i == null && (i = new Promise(async (w, L) => {
1967
+ i == null && (i = new Promise(async (w, N) => {
1968
1968
  var b;
1969
1969
  try {
1970
1970
  let T = await ((b = e.api) == null ? void 0 : b.get(r));
1971
- const I = {
1971
+ const x = {
1972
1972
  meta: { storedOn: t.toString() },
1973
1973
  data: T == null ? void 0 : T.data
1974
1974
  };
1975
- f == !0 && await ve().setItem(y, I), w(I);
1975
+ s == !0 && await ve().setItem(y, x), w(x);
1976
1976
  } catch (T) {
1977
- L(T);
1977
+ N(T);
1978
1978
  } finally {
1979
1979
  delete S.value[y];
1980
1980
  }
@@ -1985,63 +1985,63 @@ function An(e) {
1985
1985
  throw i;
1986
1986
  }
1987
1987
  }
1988
- async function M(r) {
1988
+ async function L(r) {
1989
1989
  var i;
1990
1990
  r.additionalUrl ?? (r.additionalUrl = "/patch"), g(r);
1991
- const y = D(r);
1992
- let x;
1991
+ const y = I(r);
1992
+ let D;
1993
1993
  if (e.api != null)
1994
1994
  try {
1995
1995
  let E = await e.api.patch(r);
1996
- x = 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
- x = r.data;
2002
- if (x != 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, ...x }
2005
+ data: { ...(i = l.value[y]) == null ? void 0 : i.data, ...D }
2006
2006
  };
2007
- return l.value[y] = E, f == !0 && await ve().setItem(y, E), x.id != null && x.rowVersion != null && Object.entries(l.value).forEach((L) => {
2008
- const b = L[1].data;
2007
+ return l.value[y] = E, s == !0 && await ve().setItem(y, E), D.id != null && D.rowVersion != null && Object.entries(l.value).forEach((N) => {
2008
+ const b = N[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 == x.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 == x.id && (l.value[L[0]] = E);
2014
+ b.id == D.id && (l.value[N[0]] = E);
2015
2015
  }), E.data;
2016
2016
  }
2017
- return x;
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 x;
2021
+ const y = I(r);
2022
+ let D;
2023
2023
  if (e.api != null)
2024
2024
  try {
2025
2025
  let i = await e.api.post(r);
2026
- x = 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
- x = r.data;
2032
- if (x != null) {
2031
+ D = r.data;
2032
+ if (D != null) {
2033
2033
  let i = {
2034
2034
  meta: { storedOn: t.toString() },
2035
- data: x
2035
+ data: D
2036
2036
  };
2037
- return f == !0 && await ve().setItem(y, i), l.value[y] = i, i.data;
2037
+ return s == !0 && await ve().setItem(y, i), l.value[y] = i, i.data;
2038
2038
  }
2039
- return x;
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 = I(r);
2045
2045
  if (e.api != null)
2046
2046
  try {
2047
2047
  let E = await e.api.deleteItem(r);
@@ -2051,16 +2051,16 @@ function An(e) {
2051
2051
  throw E;
2052
2052
  }
2053
2053
  delete l.value[y];
2054
- const x = ((i = r.data) == null ? void 0 : i.id) ?? r.id;
2055
- x != null && Object.entries(l.value).forEach((w) => {
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 == x && L.splice(b, 1);
2054
+ const D = ((i = r.data) == null ? void 0 : i.id) ?? r.id;
2055
+ D != null && Object.entries(l.value).forEach((w) => {
2056
+ const N = w[1].data;
2057
+ if (N != null)
2058
+ if (Array.isArray(N))
2059
+ for (let b = 0; b < N.length; b++)
2060
+ N[b].id == D && N.splice(b, 1);
2061
2061
  else
2062
2062
  delete l.value[w[0]];
2063
- }), f == !0 && await ve().removeItem(y);
2063
+ }), s == !0 && await ve().removeItem(y);
2064
2064
  }
2065
2065
  async function h(r) {
2066
2066
  if (r.additionalUrl ?? (r.additionalUrl = `/patch/restore?id=${r.data.id}`), g(r), e.api != null)
@@ -2075,25 +2075,25 @@ function An(e) {
2075
2075
  deleteItem: d,
2076
2076
  get: _,
2077
2077
  getAll: C,
2078
- patch: M,
2078
+ patch: L,
2079
2079
  post: $,
2080
2080
  restore: h,
2081
2081
  searchMemory: l,
2082
2082
  //mainly for testing
2083
2083
  currentTimeStampDays: t,
2084
2084
  promiseMemory: S,
2085
- cacheLocally: f
2085
+ cacheLocally: s
2086
2086
  };
2087
2087
  });
2088
2088
  }
2089
2089
  function qr(e) {
2090
2090
  return pr(e.storeName, () => {
2091
- const t = z(), l = z(0), S = he.utc().toSeconds() / 3600, f = z(), g = z(), D = z({}), C = e.storageMode == "local-cache";
2091
+ const t = z(), l = z(0), S = he.utc().toSeconds() / 3600, s = z(), g = z(), I = z({}), C = e.storageMode == "local-cache";
2092
2092
  function _() {
2093
2093
  var i;
2094
2094
  return `${e.storeName}_${((i = e.auth) == null ? void 0 : i.credentials.value.userID) ?? "no-user-id"}`;
2095
2095
  }
2096
- async function M() {
2096
+ async function L() {
2097
2097
  console.log("trying save"), C == !0 && (console.log("saving"), await ve().setItem(_(), {
2098
2098
  meta: g.value,
2099
2099
  data: t.value,
@@ -2103,45 +2103,45 @@ function qr(e) {
2103
2103
  }
2104
2104
  function $(i) {
2105
2105
  const E = _();
2106
- return D.value[E] || (D.value[E] = new Promise(async (w, L) => {
2106
+ return I.value[E] || (I.value[E] = new Promise(async (w, N) => {
2107
2107
  var b, T;
2108
2108
  try {
2109
- let I = await ((T = e.api) == null ? void 0 : T.getAll({
2109
+ let x = await ((T = e.api) == null ? void 0 : T.getAll({
2110
2110
  additionalUrl: "/getAll",
2111
2111
  nav: i.nav,
2112
2112
  params: {
2113
2113
  lastUpdate: ((b = g.value) == null ? void 0 : b.lastUpdate) ?? ln()
2114
2114
  }
2115
2115
  }));
2116
- console.log("res"), console.log(I), I == null ? L(I) : (t.value ?? (t.value = []), I.data.forEach((N) => {
2116
+ console.log("res"), console.log(x), x == null ? N(x) : (t.value ?? (t.value = []), x.data.forEach((P) => {
2117
2117
  var A, j;
2118
- const s = t.value.findIndex((X) => X.id == N.id);
2119
- s >= 0 ? (A = t.value) == null || A.splice(s, 1, N) : (j = t.value) == null || j.push(N);
2118
+ const f = t.value.findIndex((X) => X.id == P.id);
2119
+ f >= 0 ? (A = t.value) == null || A.splice(f, 1, P) : (j = t.value) == null || j.push(P);
2120
2120
  }), l.value = t.value.length, g.value = {
2121
2121
  lastUpdate: he.utc().toString(),
2122
2122
  storedOn: S.toString()
2123
- }, await M(), console.log("resolving"), console.log(I), w(I));
2124
- } catch (I) {
2125
- L(I);
2123
+ }, await L(), console.log("resolving"), console.log(x), w(x));
2124
+ } catch (x) {
2125
+ N(x);
2126
2126
  } finally {
2127
- delete D.value[E];
2127
+ delete I.value[E];
2128
2128
  }
2129
- })), D.value[E];
2129
+ })), I.value[E];
2130
2130
  }
2131
2131
  async function d(i) {
2132
- var L, b, T;
2132
+ var N, b, T, x;
2133
2133
  const E = _(), w = i.refresh;
2134
2134
  if (console.log("getting all from"), console.log(E), !w && t.value != null)
2135
2135
  return console.log("not refresh and ditems not null"), {
2136
- count: (L = t.value) == null ? void 0 : L.length,
2136
+ count: (N = t.value) == null ? void 0 : N.length,
2137
2137
  data: t.value,
2138
2138
  filters: []
2139
2139
  };
2140
2140
  if (!w && C == !0) {
2141
2141
  console.log("not refresh and caching locally");
2142
- const I = await ve().getItem(E);
2143
- if (console.log(I), I != null && parseFloat(I.meta.storedOn) > S - 7)
2144
- return t.value = I.data, l.value = I.data.length, f.value = I.filters ?? [], g.value = I.meta, {
2142
+ const P = await ve().getItem(E);
2143
+ if (console.log(P), P != null && parseFloat(P.meta.storedOn) > S - 7)
2144
+ return t.value = P.data, l.value = P.data.length, s.value = P.filters ?? [], g.value = P.meta, {
2145
2145
  count: (b = t.value) == null ? void 0 : b.length,
2146
2146
  data: t.value ?? [],
2147
2147
  filters: []
@@ -2151,31 +2151,35 @@ function qr(e) {
2151
2151
  return console.log("no api"), {
2152
2152
  count: (T = t.value) == null ? void 0 : T.length,
2153
2153
  data: t.value ?? [],
2154
- filters: f.value
2154
+ filters: s.value
2155
2155
  };
2156
2156
  console.log("setting dataitems"), t.value ?? (t.value = []);
2157
2157
  try {
2158
- return console.log("create refresh promise"), await $(i);
2159
- } catch (I) {
2160
- let N = I;
2161
- throw new Error(N.message ?? "Problem");
2158
+ return console.log("create refresh promise"), await $(i), {
2159
+ count: (x = t.value) == null ? void 0 : x.length,
2160
+ data: t.value ?? [],
2161
+ filters: s.value
2162
+ };
2163
+ } catch (P) {
2164
+ let f = P;
2165
+ throw new Error(f.message ?? "Problem");
2162
2166
  }
2163
2167
  }
2164
2168
  async function h(i) {
2165
- var b, T, I, N;
2169
+ var b, T, x, P;
2166
2170
  const E = _(), w = i.id ?? ((b = i.data) == null ? void 0 : b.id);
2167
2171
  if (w == null)
2168
2172
  throw new Error("no id provided");
2169
- let L = i.refresh;
2170
- if (!L && t.value != null) {
2171
- const s = t.value.find((A) => A.id == w);
2172
- if (s != null)
2173
- return { data: s };
2173
+ let N = i.refresh;
2174
+ if (!N && t.value != null) {
2175
+ const f = t.value.find((A) => A.id == w);
2176
+ if (f != null)
2177
+ return { data: f };
2174
2178
  }
2175
- if (!L && C == !0) {
2176
- const s = await ve().getItem(E);
2177
- if (s != null && parseFloat(s.meta.storedOn) > S - 12) {
2178
- t.value = s.data, l.value = s.data.length, f.value = s.filters ?? [], g.value = s.meta;
2179
+ if (!N && C == !0) {
2180
+ const f = await ve().getItem(E);
2181
+ if (f != null && parseFloat(f.meta.storedOn) > S - 12) {
2182
+ t.value = f.data, l.value = f.data.length, s.value = f.filters ?? [], g.value = f.meta;
2179
2183
  let A = (T = t.value) == null ? void 0 : T.find((j) => j.id == i.id);
2180
2184
  if (A != null)
2181
2185
  return { data: A };
@@ -2183,18 +2187,18 @@ function qr(e) {
2183
2187
  }
2184
2188
  if (e.api == null)
2185
2189
  return {
2186
- data: (I = t.value) == null ? void 0 : I.find((s) => s.id == i.id)
2190
+ data: (x = t.value) == null ? void 0 : x.find((f) => f.id == i.id)
2187
2191
  };
2188
2192
  t.value ?? (t.value = []);
2189
2193
  try {
2190
- return await $(i), { data: (N = t.value) == null ? void 0 : N.find((s) => s.id == i.id) };
2191
- } catch (s) {
2192
- let A = s;
2194
+ return await $(i), { data: (P = t.value) == null ? void 0 : P.find((f) => f.id == i.id) };
2195
+ } catch (f) {
2196
+ let A = f;
2193
2197
  throw new Error(A.message ?? "Problem");
2194
2198
  }
2195
2199
  }
2196
2200
  async function u(i) {
2197
- var w, L, b;
2201
+ var w, N, b;
2198
2202
  i.additionalUrl ?? (i.additionalUrl = "/patch");
2199
2203
  let E;
2200
2204
  if (e.api != null)
@@ -2202,19 +2206,19 @@ function qr(e) {
2202
2206
  let T = await e.api.patch(i);
2203
2207
  E = { ...i.data, ...T == null ? void 0 : T.data };
2204
2208
  } catch (T) {
2205
- let I = T;
2206
- throw new Error(I.message ?? "Patch Problem");
2209
+ let x = T;
2210
+ throw new Error(x.message ?? "Patch Problem");
2207
2211
  }
2208
2212
  else
2209
2213
  E = i.data;
2210
2214
  if (E != null) {
2211
- let T = (w = t.value) == null ? void 0 : w.findIndex((I) => I.id == E.id);
2212
- T != null && T >= 0 && (t.value ?? (t.value = []), (L = t.value) == null || L.splice(T, 1, E), await M());
2215
+ let T = (w = t.value) == null ? void 0 : w.findIndex((x) => x.id == E.id);
2216
+ T != null && T >= 0 && (t.value ?? (t.value = []), (N = t.value) == null || N.splice(T, 1, E), await L());
2213
2217
  }
2214
2218
  return (b = t.value) == null ? void 0 : b.find((T) => T.id == (i.id ?? i.data.id));
2215
2219
  }
2216
2220
  async function r(i) {
2217
- var w, L;
2221
+ var w, N;
2218
2222
  i.additionalUrl ?? (i.additionalUrl = "/post");
2219
2223
  let E;
2220
2224
  if (e.api != null)
@@ -2227,10 +2231,10 @@ function qr(e) {
2227
2231
  }
2228
2232
  else
2229
2233
  E = i.data;
2230
- 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));
2234
+ return E != null && (t.value ?? (t.value = []), (w = t.value) == null || w.unshift(E), l.value += 1, await L()), (N = t.value) == null ? void 0 : N.find((b) => b.id == (i.id ?? i.data.id));
2231
2235
  }
2232
2236
  async function y(i) {
2233
- var w, L;
2237
+ var w, N;
2234
2238
  if (i.additionalUrl ?? (i.additionalUrl = "/delete"), e.api != null)
2235
2239
  try {
2236
2240
  let b = await e.api.deleteItem(i);
@@ -2243,23 +2247,23 @@ function qr(e) {
2243
2247
  const E = i.id ?? i.data.id;
2244
2248
  if (E != null) {
2245
2249
  let b = (w = t.value) == null ? void 0 : w.findIndex((T) => T.id == E);
2246
- b != null && b >= 0 && (t.value ?? (t.value = []), (L = t.value) == null || L.splice(b, 1), await M());
2250
+ b != null && b >= 0 && (t.value ?? (t.value = []), (N = t.value) == null || N.splice(b, 1), await L());
2247
2251
  }
2248
2252
  }
2249
- async function x(i) {
2253
+ async function D(i) {
2250
2254
  var E;
2251
2255
  if (i.additionalUrl ?? (i.additionalUrl = `/patch/restore?id=${i.data.id}`), e.api != null)
2252
2256
  try {
2253
2257
  await e.api.patch(i);
2254
2258
  } catch (w) {
2255
- let L = w;
2256
- throw new Error(L.message ?? "Patch Problem");
2259
+ let N = w;
2260
+ throw new Error(N.message ?? "Patch Problem");
2257
2261
  }
2258
2262
  try {
2259
2263
  i.additionalUrl = "/getAll", await $(i);
2260
2264
  } catch (w) {
2261
- let L = w;
2262
- throw new Error(L.message ?? "Problem");
2265
+ let N = w;
2266
+ throw new Error(N.message ?? "Problem");
2263
2267
  }
2264
2268
  return (E = t.value) == null ? void 0 : E.find((w) => w.id == (i.id ?? i.data.id));
2265
2269
  }
@@ -2269,14 +2273,14 @@ function qr(e) {
2269
2273
  getAll: d,
2270
2274
  patch: u,
2271
2275
  post: r,
2272
- restore: x,
2276
+ restore: D,
2273
2277
  //other stuff
2274
2278
  dataItems: t,
2275
2279
  count: l,
2276
2280
  currentTimeStampHours: S,
2277
- filters: f,
2281
+ filters: s,
2278
2282
  meta: g,
2279
- promiseMemory: D,
2283
+ promiseMemory: I,
2280
2284
  cacheLocally: C
2281
2285
  };
2282
2286
  });
@@ -2286,7 +2290,7 @@ function Er() {
2286
2290
  return Ar;
2287
2291
  }
2288
2292
  function En(e) {
2289
- const t = (e == null ? void 0 : e.buildHeaders) ?? C, l = (e == null ? void 0 : e.buildQuery) ?? g, S = (e == null ? void 0 : e.buildUrl) ?? D, f = e == null ? void 0 : e.demo;
2293
+ const t = (e == null ? void 0 : e.buildHeaders) ?? C, l = (e == null ? void 0 : e.buildQuery) ?? g, S = (e == null ? void 0 : e.buildUrl) ?? I, s = e == null ? void 0 : e.demo;
2290
2294
  function g(u) {
2291
2295
  let r = new URLSearchParams();
2292
2296
  return Object.entries(u).forEach((y) => {
@@ -2295,20 +2299,20 @@ function En(e) {
2295
2299
  y[1] != null && r.append(y[0], y[1].toString());
2296
2300
  }), r.toString();
2297
2301
  }
2298
- function D(u) {
2302
+ function I(u) {
2299
2303
  let r = Q(u.url) ?? void 0, y = Q(u.id);
2300
2304
  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 ?? "";
2301
2305
  }
2302
2306
  function C(u) {
2303
- var y, x;
2307
+ var y, D;
2304
2308
  let r = { ...u.headers };
2305
- 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 ${(x = e == null ? void 0 : e.auth) == null ? void 0 : x.credentials.value.token}`)), r["Content-Type"] ?? (r["Content-Type"] = u.contentType ?? (e == null ? void 0 : e.defaultContentType) ?? "application/json"), r;
2309
+ 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;
2306
2310
  }
2307
2311
  async function _(u) {
2308
- const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, x = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
2312
+ 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;
2309
2313
  let i = u.finalUrl, E = u.headers;
2310
- if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), f != null && f.isDemoing.value)
2311
- return console.log(`DEMO: Get from ${i}`), f.get(u);
2314
+ if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
2315
+ return console.log(`DEMO: Get from ${i}`), s.get(u);
2312
2316
  console.log(`Get from ${i}`);
2313
2317
  let w;
2314
2318
  try {
@@ -2324,26 +2328,26 @@ function En(e) {
2324
2328
  name: "Unauthorized",
2325
2329
  message: w.statusText
2326
2330
  };
2327
- let L = await w.text();
2328
- throw new Error(L ?? w.statusText ?? "Get error");
2331
+ let N = await w.text();
2332
+ throw new Error(N ?? w.statusText ?? "Get error");
2329
2333
  }
2330
- if (x)
2334
+ if (D)
2331
2335
  return await w.text();
2332
2336
  if (y)
2333
2337
  return await w.json();
2334
2338
  throw new Error();
2335
- } catch (L) {
2336
- const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${L.message}`;
2339
+ } catch (N) {
2340
+ const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${N.message}`;
2337
2341
  if (!r)
2338
2342
  return;
2339
- throw L.code == 401 ? L : new Error(b);
2343
+ throw N.code == 401 ? N : new Error(b);
2340
2344
  }
2341
2345
  }
2342
- async function M(u) {
2343
- const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, x = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
2346
+ async function L(u) {
2347
+ 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;
2344
2348
  let i = u.finalUrl, E = u.headers;
2345
- if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), f != null && f.isDemoing.value)
2346
- return console.log(`DEMO: Get all from ${i}`), f.getAll(u);
2349
+ if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
2350
+ return console.log(`DEMO: Get all from ${i}`), s.getAll(u);
2347
2351
  console.log(`Get all from ${i}`);
2348
2352
  let w;
2349
2353
  try {
@@ -2359,26 +2363,26 @@ function En(e) {
2359
2363
  name: "Unauthorized",
2360
2364
  message: w.statusText
2361
2365
  };
2362
- let L = await w.text();
2363
- throw new Error(L ?? w.statusText ?? "Get all error");
2366
+ let N = await w.text();
2367
+ throw new Error(N ?? w.statusText ?? "Get all error");
2364
2368
  }
2365
- if (x)
2369
+ if (D)
2366
2370
  return await w.text();
2367
2371
  if (y)
2368
2372
  return await w.json();
2369
2373
  throw new Error();
2370
- } catch (L) {
2371
- const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${L.message}`;
2374
+ } catch (N) {
2375
+ const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${N.message}`;
2372
2376
  if (!r)
2373
2377
  return;
2374
- throw L.code == 401 ? L : new Error(b);
2378
+ throw N.code == 401 ? N : new Error(b);
2375
2379
  }
2376
2380
  }
2377
2381
  async function $(u) {
2378
- const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, x = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
2382
+ 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;
2379
2383
  let i = u.finalUrl, E = u.headers;
2380
- if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), f != null && f.isDemoing.value)
2381
- return console.log(`DEMO: Post to ${i}`), f.post(u);
2384
+ if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
2385
+ return console.log(`DEMO: Post to ${i}`), s.post(u);
2382
2386
  console.log(`Post to ${i}`);
2383
2387
  let w;
2384
2388
  try {
@@ -2395,26 +2399,26 @@ function En(e) {
2395
2399
  name: "Unauthorized",
2396
2400
  message: w.statusText
2397
2401
  };
2398
- let L = await w.text();
2399
- throw new Error(L ?? w.statusText ?? "Post error!");
2402
+ let N = await w.text();
2403
+ throw new Error(N ?? w.statusText ?? "Post error!");
2400
2404
  }
2401
- if (x)
2405
+ if (D)
2402
2406
  return await w.text();
2403
2407
  if (y)
2404
2408
  return await w.json();
2405
2409
  throw new Error();
2406
- } catch (L) {
2410
+ } catch (N) {
2407
2411
  if (w.status == 200 || !r)
2408
2412
  return;
2409
- const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${L.message}`;
2410
- throw L.code == 401 ? L : new Error(b);
2413
+ const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${N.message}`;
2414
+ throw N.code == 401 ? N : new Error(b);
2411
2415
  }
2412
2416
  }
2413
2417
  async function d(u) {
2414
- const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, x = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
2418
+ 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;
2415
2419
  let i = u.finalUrl, E = u.headers;
2416
- if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), f != null && f.isDemoing.value)
2417
- return console.log(`DEMO: Patch to ${i}`), f.patch(u);
2420
+ if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
2421
+ return console.log(`DEMO: Patch to ${i}`), s.patch(u);
2418
2422
  console.log(`Patch to ${i}`);
2419
2423
  let w;
2420
2424
  try {
@@ -2431,26 +2435,26 @@ function En(e) {
2431
2435
  name: "Unauthorized",
2432
2436
  message: w.statusText
2433
2437
  };
2434
- let L = await w.text();
2435
- throw new Error(L ?? w.statusText ?? "Patch error!");
2438
+ let N = await w.text();
2439
+ throw new Error(N ?? w.statusText ?? "Patch error!");
2436
2440
  }
2437
- if (x)
2441
+ if (D)
2438
2442
  return await w.text();
2439
2443
  if (y)
2440
2444
  return await w.json();
2441
2445
  throw new Error();
2442
- } catch (L) {
2446
+ } catch (N) {
2443
2447
  if (w.status == 200 || !r)
2444
2448
  return;
2445
- const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${L.message}`;
2446
- throw L.code == 401 ? L : new Error(b);
2449
+ const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${N.message}`;
2450
+ throw N.code == 401 ? N : new Error(b);
2447
2451
  }
2448
2452
  }
2449
2453
  async function h(u) {
2450
2454
  const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0;
2451
- let y = u.finalUrl, x = u.headers;
2452
- if (y == null && (y = S(u)), u.overrideHeaders !== !0 && (x = t(u)), f != null && f.isDemoing.value)
2453
- return console.log(`DEMO: Delete ${y}`), f.deleteItem(u);
2455
+ let y = u.finalUrl, D = u.headers;
2456
+ if (y == null && (y = S(u)), u.overrideHeaders !== !0 && (D = t(u)), s != null && s.isDemoing.value)
2457
+ return console.log(`DEMO: Delete ${y}`), s.deleteItem(u);
2454
2458
  console.log(`Delete ${y}`);
2455
2459
  let i;
2456
2460
  try {
@@ -2458,7 +2462,7 @@ function En(e) {
2458
2462
  method: "DELETE",
2459
2463
  mode: "cors",
2460
2464
  cache: "no-cache",
2461
- headers: x,
2465
+ headers: D,
2462
2466
  body: JSON.stringify(u.data)
2463
2467
  }), i.status == 401)
2464
2468
  throw {
@@ -2480,27 +2484,27 @@ function En(e) {
2480
2484
  buildUrl: S,
2481
2485
  deleteItem: h,
2482
2486
  get: _,
2483
- getAll: M,
2487
+ getAll: L,
2484
2488
  patch: d,
2485
2489
  post: $
2486
2490
  }, Ar;
2487
2491
  }
2488
2492
  function ut(e) {
2489
- const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors: S, isLoading: f, doAction: g, logError: D } = en(e);
2493
+ const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors: S, isLoading: s, doAction: g, logError: I } = en(e);
2490
2494
  function C(r) {
2491
2495
  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);
2492
2496
  let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2493
- const x = (e == null ? void 0 : e.items) ?? [];
2497
+ const D = (e == null ? void 0 : e.items) ?? [];
2494
2498
  return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null ? r.onDeleteAsync ?? (r.onDeleteAsync = () => y().deleteItem(r)) : r.onDeleteAsync ?? (r.onDeleteAsync = () => {
2495
2499
  var w;
2496
2500
  const i = r.id ?? ((w = r.data) == null ? void 0 : w.id);
2497
2501
  if (i == null)
2498
2502
  return Promise.resolve("No id found in delete action");
2499
- const E = x.findIndex((L) => L.id == i);
2500
- return E >= 0 && x.splice(E, 1), Promise.resolve(void 0);
2503
+ const E = D.findIndex((N) => N.id == i);
2504
+ return E >= 0 && D.splice(E, 1), Promise.resolve(void 0);
2501
2505
  }), g(async () => {
2502
2506
  let i;
2503
- 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);
2507
+ 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), I(i);
2504
2508
  }, {
2505
2509
  completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
2506
2510
  confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
@@ -2513,11 +2517,11 @@ function ut(e) {
2513
2517
  function _(r) {
2514
2518
  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);
2515
2519
  let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2516
- const x = (e == null ? void 0 : e.items) ?? [];
2520
+ const D = (e == null ? void 0 : e.items) ?? [];
2517
2521
  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 = () => {
2518
2522
  var E;
2519
2523
  const i = r.id ?? ((E = r.data) == null ? void 0 : E.id);
2520
- return i == null ? Promise.resolve(void 0) : Promise.resolve(x.find((w) => w.id == i));
2524
+ return i == null ? Promise.resolve(void 0) : Promise.resolve(D.find((w) => w.id == i));
2521
2525
  }), g(async () => {
2522
2526
  let i;
2523
2527
  return r.onGetAsync != null && (i = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (i = await r.onGetSuccessAsync(i, r)), i;
@@ -2530,11 +2534,11 @@ function ut(e) {
2530
2534
  throwError: r.throwError ?? (e == null ? void 0 : e.throwError)
2531
2535
  });
2532
2536
  }
2533
- function M(r) {
2537
+ function L(r) {
2534
2538
  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);
2535
2539
  let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2536
- const x = (e == null ? void 0 : e.items) ?? [];
2537
- 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(x)), g(async () => {
2540
+ const D = (e == null ? void 0 : e.items) ?? [];
2541
+ 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 () => {
2538
2542
  let i;
2539
2543
  return r.onGetAsync != null && (i = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (i = await r.onGetSuccessAsync(i, r)), i;
2540
2544
  }, {
@@ -2550,8 +2554,8 @@ function ut(e) {
2550
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 restore this item?" : void 0);
2551
2555
  let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2552
2556
  return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null && (r.onRestoreAsync ?? (r.onRestoreAsync = () => y().restore(r))), g(async () => {
2553
- let x, i;
2554
- return r.onCanRestoreAsync != null && (x = await r.onCanRestoreAsync(r.data)), x == null && r.onRestoreAsync != null && (i = await r.onRestoreAsync(r.data)), i != null && r.onRestoreSuccessAsync != null && await r.onRestoreSuccessAsync(i), D(x), i;
2557
+ let D, i;
2558
+ 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), I(D), i;
2555
2559
  }, {
2556
2560
  completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
2557
2561
  confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
@@ -2564,20 +2568,20 @@ function ut(e) {
2564
2568
  function d(r) {
2565
2569
  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);
2566
2570
  let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2567
- const x = (e == null ? void 0 : e.items) ?? [];
2571
+ const D = (e == null ? void 0 : e.items) ?? [];
2568
2572
  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 () => {
2569
2573
  var i;
2570
2574
  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);
2571
2575
  }) : r.onSaveAsync ?? (r.onSaveAsync = (i) => {
2572
- const E = x.findIndex((w) => w.id == i.id);
2573
- return E >= 0 ? x.splice(E, 1, i) : x.push(i), Promise.resolve(i);
2576
+ const E = D.findIndex((w) => w.id == i.id);
2577
+ return E >= 0 ? D.splice(E, 1, i) : D.push(i), Promise.resolve(i);
2574
2578
  }), g(async () => {
2575
2579
  let i;
2576
2580
  if (r.onGetSaveAsync != null && (i = await r.onGetSaveAsync(r.data)), i == null)
2577
2581
  return;
2578
2582
  if (r.onCanSaveAsync != null) {
2579
2583
  let w = await r.onCanSaveAsync(i);
2580
- if (D(w), w != null)
2584
+ if (I(w), w != null)
2581
2585
  return;
2582
2586
  }
2583
2587
  let E;
@@ -2605,10 +2609,10 @@ function ut(e) {
2605
2609
  clearErrors: S,
2606
2610
  deleteItem: C,
2607
2611
  doAction: g,
2608
- getAllItems: M,
2612
+ getAllItems: L,
2609
2613
  getItem: _,
2610
- isLoading: f,
2611
- logError: D,
2614
+ isLoading: s,
2615
+ logError: I,
2612
2616
  restoreItem: $,
2613
2617
  saveItem: d
2614
2618
  };
@@ -2625,242 +2629,242 @@ function Dn(e) {
2625
2629
  function S() {
2626
2630
  l.value = Math.random().toString(36).substring(4, 19) + Math.random().toString(12).substring(1, 11), localStorage.setItem(Hr, l.value);
2627
2631
  }
2628
- const f = Zt("auth-credentials", {});
2629
- function g(I) {
2630
- if (I == null)
2632
+ const s = Zt("auth-credentials", {});
2633
+ function g(x) {
2634
+ if (x == null)
2631
2635
  return !0;
2632
- var N = e.getAuthItem != null ? e.getAuthItem(I) : null;
2633
- if (N == null)
2636
+ var P = e.getAuthItem != null ? e.getAuthItem(x) : null;
2637
+ if (P == null)
2634
2638
  return !1;
2635
- if (N.requiresAuth === !1)
2639
+ if (P.requiresAuth === !1)
2636
2640
  return !0;
2637
- const s = Q(f);
2638
- if (s.isSuspended && N.ignoreSuspension !== !0)
2641
+ const f = Q(s);
2642
+ if (f.isSuspended && P.ignoreSuspension !== !0)
2639
2643
  return !1;
2640
- if (s.isGlobalAdmin)
2644
+ if (f.isGlobalAdmin)
2641
2645
  return !0;
2642
- if (N.permissions != null) {
2643
- for (var A = 0; A < N.permissions.length; A++)
2644
- if (!D(N.permissions[A]))
2646
+ if (P.permissions != null) {
2647
+ for (var A = 0; A < P.permissions.length; A++)
2648
+ if (!I(P.permissions[A]))
2645
2649
  return !1;
2646
2650
  }
2647
2651
  return !0;
2648
2652
  }
2649
- function D(I) {
2650
- const N = Q(f);
2651
- if (N.userPermissions != null)
2652
- for (var s = 0; s < N.userPermissions.length; s++) {
2653
- var A = N.userPermissions[s].split(".");
2654
- if (N.userPermissions[s] == "everything.edit" || I == A[0] && A.length > 1 && A[1] == "edit")
2653
+ function I(x) {
2654
+ const P = Q(s);
2655
+ if (P.userPermissions != null)
2656
+ for (var f = 0; f < P.userPermissions.length; f++) {
2657
+ var A = P.userPermissions[f].split(".");
2658
+ if (P.userPermissions[f] == "everything.edit" || x == A[0] && A.length > 1 && A[1] == "edit")
2655
2659
  return !0;
2656
2660
  }
2657
2661
  return !1;
2658
2662
  }
2659
- function C(I) {
2660
- if (I == null)
2663
+ function C(x) {
2664
+ if (x == null)
2661
2665
  return !0;
2662
- var N = e.getAuthItem != null ? e.getAuthItem(I) : null;
2663
- if (N == null)
2666
+ var P = e.getAuthItem != null ? e.getAuthItem(x) : null;
2667
+ if (P == null)
2664
2668
  return !1;
2665
- if (N.requiresAuth === !1)
2669
+ if (P.requiresAuth === !1)
2666
2670
  return !0;
2667
- const s = Q(f);
2668
- if (s.isSuspended && N.ignoreSuspension !== !0)
2671
+ const f = Q(s);
2672
+ if (f.isSuspended && P.ignoreSuspension !== !0)
2669
2673
  return !1;
2670
- if (s.isGlobalAdmin)
2674
+ if (f.isGlobalAdmin)
2671
2675
  return !0;
2672
- if (N.permissions != null) {
2673
- for (var A = 0; A < N.permissions.length; A++)
2674
- if (!_(N.permissions[A]))
2676
+ if (P.permissions != null) {
2677
+ for (var A = 0; A < P.permissions.length; A++)
2678
+ if (!_(P.permissions[A]))
2675
2679
  return !1;
2676
2680
  }
2677
2681
  return !0;
2678
2682
  }
2679
- function _(I) {
2680
- const N = Q(f);
2681
- if (N.userPermissions != null)
2682
- for (var s = 0; s < N.userPermissions.length; s++) {
2683
- var A = N.userPermissions[s].split(".");
2684
- if (I == A[0] || I == "everything" || N.userPermissions[s] == "everything.view" || N.userPermissions[s] == "everything.edit")
2683
+ function _(x) {
2684
+ const P = Q(s);
2685
+ if (P.userPermissions != null)
2686
+ for (var f = 0; f < P.userPermissions.length; f++) {
2687
+ var A = P.userPermissions[f].split(".");
2688
+ if (x == A[0] || x == "everything" || P.userPermissions[f] == "everything.view" || P.userPermissions[f] == "everything.edit")
2685
2689
  return !0;
2686
2690
  }
2687
2691
  return !1;
2688
2692
  }
2689
- function M(I, N, s) {
2693
+ function L(x, P, f) {
2690
2694
  let A = !0;
2691
- return Q(f).isGlobalAdmin ? !0 : (N != null && N.length > 0 && N.forEach((X) => {
2692
- s == "edit" ? D(X) || (A = !1) : _(X) || (A = !1);
2693
- }), I != null && I.length > 0 && (I.some((X) => u(X)) || (A = !1)), A);
2695
+ return Q(s).isGlobalAdmin ? !0 : (P != null && P.length > 0 && P.forEach((X) => {
2696
+ f == "edit" ? I(X) || (A = !1) : _(X) || (A = !1);
2697
+ }), x != null && x.length > 0 && (x.some((X) => u(X)) || (A = !1)), A);
2694
2698
  }
2695
- function $(I, N = !1) {
2696
- var s = e.getAuthItem != null ? e.getAuthItem(I) : null;
2699
+ function $(x, P = !1) {
2700
+ var f = e.getAuthItem != null ? e.getAuthItem(x) : null;
2697
2701
  let A = !1;
2698
- if (s == null)
2702
+ if (f == null)
2699
2703
  return !1;
2700
- let j = s.subscriptions ?? [], X = s.permissions ?? [], re = M(j, X, "view");
2701
- return re || !N || !_e(s.children) ? re : ((s == null ? void 0 : s.children) != null && s.children.forEach((ue) => {
2704
+ let j = f.subscriptions ?? [], X = f.permissions ?? [], re = L(j, X, "view");
2705
+ return re || !P || !_e(f.children) ? re : ((f == null ? void 0 : f.children) != null && f.children.forEach((ue) => {
2702
2706
  $(ue, !0) && (A = !0);
2703
2707
  }), A);
2704
2708
  }
2705
- function d(I) {
2706
- return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (N, s) => {
2707
- const A = Ue(Wr(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${s}`);
2708
- return N ? `${A}&redirect_path=${N}` : A;
2709
- }), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(I, l.value) ?? "" : "";
2709
+ function d(x) {
2710
+ return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (P, f) => {
2711
+ const A = Ue(Wr(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${f}`);
2712
+ return P ? `${A}&redirect_path=${P}` : A;
2713
+ }), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(x, l.value) ?? "" : "";
2710
2714
  }
2711
- function h(I) {
2712
- var s;
2713
- return I == null ? 0 : ((s = (e.subscriptionOptions ?? []).find((A) => A.code == I)) == null ? void 0 : s.value) ?? 0;
2715
+ function h(x) {
2716
+ var f;
2717
+ return x == null ? 0 : ((f = (e.subscriptionOptions ?? []).find((A) => A.code == x)) == null ? void 0 : f.value) ?? 0;
2714
2718
  }
2715
- function u(I) {
2716
- const N = Q(f);
2717
- if (N.subscriptionCode == null)
2719
+ function u(x) {
2720
+ const P = Q(s);
2721
+ if (P.subscriptionCode == null)
2718
2722
  return !1;
2719
- if (N.subscriptionCode == I)
2723
+ if (P.subscriptionCode == x)
2720
2724
  return !0;
2721
- const s = h(I), A = h(N.subscriptionCode);
2722
- return s <= A;
2725
+ const f = h(x), A = h(P.subscriptionCode);
2726
+ return f <= A;
2723
2727
  }
2724
- function r(I) {
2725
- const s = I.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), A = decodeURIComponent(
2726
- atob(s).split("").map(function(j) {
2728
+ function r(x) {
2729
+ const f = x.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), A = decodeURIComponent(
2730
+ atob(f).split("").map(function(j) {
2727
2731
  return "%" + ("00" + j.charCodeAt(0).toString(16)).slice(-2);
2728
2732
  }).join("")
2729
2733
  );
2730
2734
  return JSON.parse(A);
2731
2735
  }
2732
- function y(I, N) {
2733
- f.value = void 0, L(), I != null && N != null && N.currentRoute.value.path != I && N.push({ path: I });
2736
+ function y(x, P) {
2737
+ s.value = void 0, N(), x != null && P != null && P.currentRoute.value.path != x && P.push({ path: x });
2734
2738
  }
2735
- function x(I) {
2736
- var s;
2737
- Q(f).isLoggedIn || ((s = e.demo) == null || s.endDemo(), T() && (y(), window.location.href = d(I)));
2739
+ function D(x) {
2740
+ var f;
2741
+ Q(s).isLoggedIn || ((f = e.demo) == null || f.endDemo(), T() && (y(), window.location.href = d(x)));
2738
2742
  }
2739
- async function i(I, N) {
2743
+ async function i(x, P) {
2740
2744
  return e.getToken ?? (e.getToken = async () => {
2741
- let s = I, A = N, j = e.oauthGrantType ?? "authorization_token", X = e.oauthClientID ?? "";
2742
- if (s == null || A == null)
2745
+ let f = x, A = P, j = e.oauthGrantType ?? "authorization_token", X = e.oauthClientID ?? "";
2746
+ if (f == null || A == null)
2743
2747
  throw new Error("Code and State required in OAuth token process");
2744
2748
  if (A != l.value)
2745
2749
  throw new Error("state does not match");
2746
2750
  let re = "";
2747
- e.getTokenUrl ?? (e.getTokenUrl = () => Ue(Wr(), "token")), re = e.getTokenUrl(s, `${window.location.origin}/authentication`, j, X);
2751
+ e.getTokenUrl ?? (e.getTokenUrl = () => Ue(Wr(), "token")), re = e.getTokenUrl(f, `${window.location.origin}/authentication`, j, X);
2748
2752
  const ue = {};
2749
- ue.grant_type = j, ue.code = s, ue.redirect_uri = `${window.location.origin}/authentication`, ue.client_id = X;
2753
+ ue.grant_type = j, ue.code = f, ue.redirect_uri = `${window.location.origin}/authentication`, ue.client_id = X;
2750
2754
  const G = await Er().post({
2751
2755
  additionalUrl: re,
2752
2756
  data: ue
2753
2757
  });
2754
2758
  E(G.access_token);
2755
- }), await e.getToken(I, N);
2759
+ }), await e.getToken(x, P);
2756
2760
  }
2757
- function E(I) {
2758
- if (I != null && (e.demo == null || !e.demo.isDemoing.value)) {
2759
- const N = r(I);
2760
- w(N, I), e.processTokenPayload != null && e.processTokenPayload(f, N);
2761
+ function E(x) {
2762
+ if (x != null && (e.demo == null || !e.demo.isDemoing.value)) {
2763
+ const P = r(x);
2764
+ w(P, x), e.processTokenPayload != null && e.processTokenPayload(s, P);
2761
2765
  }
2762
2766
  }
2763
- function w(I, N) {
2767
+ function w(x, P) {
2764
2768
  var A;
2765
- const s = f.value;
2766
- s.expiresOn = I.ExpiresOn, s.isGlobalAdmin = I.IsGlobalAdmin == "True", s.isLoggedIn = !0, s.permissions = I.Permissions, s.subscriptionCode = I.Subscription, s.timeZone ?? (s.timeZone = e.defaultTimeZone ?? hr), s.token = N, s.userID = I.UserLoginID, s.userPermissions = ((A = I.Permissions) == null ? void 0 : A.split(",")) ?? [];
2769
+ const f = s.value;
2770
+ 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 = P, f.userID = x.UserLoginID, f.userPermissions = ((A = x.Permissions) == null ? void 0 : A.split(",")) ?? [];
2767
2771
  }
2768
- function L() {
2769
- var I;
2770
- f.value ?? (f.value = {}), (I = f.value).timeZone ?? (I.timeZone = e.defaultTimeZone ?? hr);
2772
+ function N() {
2773
+ var x;
2774
+ s.value ?? (s.value = {}), (x = s.value).timeZone ?? (x.timeZone = e.defaultTimeZone ?? hr);
2771
2775
  }
2772
2776
  function b() {
2773
- const I = Q(f);
2774
- return I.isLoggedIn && T() && (y(), window.location.href = d()), I.isLoggedIn;
2777
+ const x = Q(s);
2778
+ return x.isLoggedIn && T() && (y(), window.location.href = d()), x.isLoggedIn;
2775
2779
  }
2776
2780
  function T() {
2777
- const I = Q(f);
2778
- if (I == null || I.expiresOn == null)
2781
+ const x = Q(s);
2782
+ if (x == null || x.expiresOn == null)
2779
2783
  return !0;
2780
- const N = he.fromFormat(I.expiresOn, t), s = he.utc();
2781
- return N <= s;
2784
+ const P = he.fromFormat(x.expiresOn, t), f = he.utc();
2785
+ return P <= f;
2782
2786
  }
2783
- return L(), Ir = {
2787
+ return N(), Ir = {
2784
2788
  authState: l,
2785
2789
  canEdit: g,
2786
- canEditPermit: D,
2790
+ canEditPermit: I,
2787
2791
  canView: C,
2788
2792
  canViewPermit: _,
2789
- credentials: f,
2790
- doShow: M,
2793
+ credentials: s,
2794
+ doShow: L,
2791
2795
  doShowByNav: $,
2792
2796
  getAuthorizeUrl: d,
2793
2797
  getToken: i,
2794
- isLoggedIn: ee(() => f.value.isLoggedIn === !0),
2795
- login: x,
2798
+ isLoggedIn: ee(() => s.value.isLoggedIn === !0),
2799
+ login: D,
2796
2800
  logout: y,
2797
2801
  resetAuthState: S,
2798
2802
  setAuth: E,
2799
- timeZone: ee(() => f.value.timeZone ?? e.defaultTimeZone ?? hr),
2803
+ timeZone: ee(() => s.value.timeZone ?? e.defaultTimeZone ?? hr),
2800
2804
  tryLogin: b
2801
2805
  }, Ir;
2802
2806
  }
2803
2807
  function xn(e, t, l = {}) {
2804
2808
  const {
2805
2809
  preventDefault: S = !1,
2806
- stopPropagation: f = !1,
2810
+ stopPropagation: s = !1,
2807
2811
  axis: g = "both"
2808
- } = l, D = { capture: l.capture ?? !0 };
2809
- let C = { x: 0, y: 0 }, _ = { x: 0, y: 0 }, M = { x: 0, y: 0 }, $ = [], d = [], h = z(!1);
2810
- function u(L) {
2811
- Q(S) && L.preventDefault(), Q(f) && L.stopPropagation();
2812
+ } = l, I = { capture: l.capture ?? !0 };
2813
+ let C = { x: 0, y: 0 }, _ = { x: 0, y: 0 }, L = { x: 0, y: 0 }, $ = [], d = [], h = z(!1);
2814
+ function u(N) {
2815
+ Q(S) && N.preventDefault(), Q(s) && N.stopPropagation();
2812
2816
  }
2813
- function r(L) {
2814
- var s;
2817
+ function r(N) {
2818
+ var f;
2815
2819
  const b = Q(e);
2816
2820
  if (!b)
2817
2821
  return;
2818
- const T = b.$el, N = L.type === "touchstart" && L.touches.length > 0 ? L.touches[0] : L;
2819
- M = { x: N.clientX, y: N.clientY }, _ = {
2822
+ const T = b.$el, P = N.type === "touchstart" && N.touches.length > 0 ? N.touches[0] : N;
2823
+ L = { x: P.clientX, y: P.clientY }, _ = {
2820
2824
  x: T.offsetLeft,
2821
2825
  y: T.offsetTop
2822
2826
  }, C = {
2823
2827
  x: T.offsetLeft,
2824
2828
  y: T.offsetTop
2825
- }, ((s = l.onStart) == null ? void 0 : s.call(l, M, L)) !== !1 && (d.push(me("mousemove", y)), d.push(me("touchmove", y)), d.push(me("mouseup", x)), d.push(me("touchend", x)), u(L));
2829
+ }, ((f = l.onStart) == null ? void 0 : f.call(l, L, N)) !== !1 && (d.push(me("mousemove", y)), d.push(me("touchmove", y)), d.push(me("mouseup", D)), d.push(me("touchend", D)), u(N));
2826
2830
  }
2827
- function y(L) {
2831
+ function y(N) {
2828
2832
  var A;
2829
- if (!M || !Q(e))
2833
+ if (!L || !Q(e))
2830
2834
  return;
2831
- const I = L.type === "touchmove" && L.touches.length > 0 ? L.touches[0] : L;
2832
- let N = I.clientX - M.x, s = I.clientY - M.y;
2833
- (g === "x" || g === "both") && (C.x = _.x + N), (g === "y" || g === "both") && (C.y = _.y + s), (A = l.onMove) == null || A.call(l, C, L), u(L), i(C);
2835
+ const x = N.type === "touchmove" && N.touches.length > 0 ? N.touches[0] : N;
2836
+ let P = x.clientX - L.x, f = x.clientY - L.y;
2837
+ (g === "x" || g === "both") && (C.x = _.x + P), (g === "y" || g === "both") && (C.y = _.y + f), (A = l.onMove) == null || A.call(l, C, N), u(N), i(C);
2834
2838
  }
2835
- function x(L) {
2839
+ function D(N) {
2836
2840
  var b;
2837
2841
  document.documentElement.style.cursor = "", d.forEach((T) => {
2838
2842
  T();
2839
- }), d.length = 0, (b = l.onEnd) == null || b.call(l, C, L), u(L);
2843
+ }), d.length = 0, (b = l.onEnd) == null || b.call(l, C, N), u(N);
2840
2844
  }
2841
- function i(L) {
2845
+ function i(N) {
2842
2846
  const b = Q(e);
2843
2847
  if (!b)
2844
2848
  return;
2845
2849
  const T = b.$el;
2846
- T.style.left = `${L.x}px`, T.style.top = `${L.y}px`;
2850
+ T.style.left = `${N.x}px`, T.style.top = `${N.y}px`;
2847
2851
  }
2848
2852
  function E() {
2849
2853
  if (Q(h))
2850
2854
  return;
2851
- const L = Q(t);
2852
- if (!L)
2855
+ const N = Q(t);
2856
+ if (!N)
2853
2857
  return;
2854
- const b = L.$el;
2855
- b.style.cursor = "move", $.push(me(b, "mousedown", r, D)), $.push(me(b, "touchstart", r, D)), h.value = !0;
2858
+ const b = N.$el;
2859
+ b.style.cursor = "move", $.push(me(b, "mousedown", r, I)), $.push(me(b, "touchstart", r, I)), h.value = !0;
2856
2860
  }
2857
2861
  function w() {
2858
2862
  if (!Q(h))
2859
2863
  return;
2860
- const L = Q(t);
2861
- if (!L)
2864
+ const N = Q(t);
2865
+ if (!N)
2862
2866
  return;
2863
- const b = L.$el;
2867
+ const b = N.$el;
2864
2868
  b.style.cursor = "", $.forEach((T) => {
2865
2869
  T();
2866
2870
  }), $.length = 0, h.value = !1;
@@ -2873,25 +2877,25 @@ function xn(e, t, l = {}) {
2873
2877
  }
2874
2878
  const Tn = ["t", "r", "b", "l", "tr", "br", "bl", "tl"];
2875
2879
  function _n(e, t = {}) {
2876
- let l, S = t.handleWidth ?? 12, f = t.handleZIndex ?? 100, g = t.minWidth ?? 0, D = t.maxWidth ?? Number.MAX_SAFE_INTEGER, C = t.minHeight ?? 0, _ = t.maxHeight ?? Number.MAX_SAFE_INTEGER, M = t.preventDefault ?? !1, $ = t.stopPropagation ?? !1, d, h = [];
2880
+ let l, S = t.handleWidth ?? 12, s = t.handleZIndex ?? 100, g = t.minWidth ?? 0, I = t.maxWidth ?? Number.MAX_SAFE_INTEGER, C = t.minHeight ?? 0, _ = t.maxHeight ?? Number.MAX_SAFE_INTEGER, L = t.preventDefault ?? !1, $ = t.stopPropagation ?? !1, d, h = [];
2877
2881
  const u = z(!1);
2878
2882
  let r = [], y = [];
2879
- const x = z(!1), i = z({ x: 0, y: 0 });
2883
+ const D = z(!1), i = z({ x: 0, y: 0 });
2880
2884
  let E = { left: 0, top: 0, height: 0, width: 0, position: "absolute" }, w = {};
2881
- function L(G) {
2882
- Ee(M) && G.preventDefault(), Ee($) && G.stopPropagation();
2885
+ function N(G) {
2886
+ Ee(L) && G.preventDefault(), Ee($) && G.stopPropagation();
2883
2887
  }
2884
2888
  function b(G, Y) {
2885
- h = Y.map(I), h.forEach((H) => G.$el.appendChild(H));
2889
+ h = Y.map(x), h.forEach((H) => G.$el.appendChild(H));
2886
2890
  }
2887
2891
  function T(G) {
2888
2892
  h.forEach((Y) => G.$el.removeChild(Y));
2889
2893
  }
2890
- function I(G) {
2891
- const Y = S + "px", H = -S / 2 + "px", ie = f + 1, Z = document.createElement("div");
2892
- return Z.dataset.handle = G, Z.style.position = "absolute", Z.style.touchAction = "none", Z.style.userSelect = "none", Z.style.zIndex = (G.length === 1 ? f : 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;
2894
+ function x(G) {
2895
+ const Y = S + "px", H = -S / 2 + "px", ie = s + 1, Z = document.createElement("div");
2896
+ 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;
2893
2897
  }
2894
- function N(G) {
2898
+ function P(G) {
2895
2899
  var ne;
2896
2900
  if (!h.some((ce) => ce == G.target))
2897
2901
  return;
@@ -2907,9 +2911,9 @@ function _n(e, t = {}) {
2907
2911
  }, w = Nr(E), ((ne = t.onStart) == null ? void 0 : ne.call(t, i.value, G)) === !1)
2908
2912
  return;
2909
2913
  let W = G.target;
2910
- document.documentElement.style.cursor = j(W.dataset.handle), d = W.dataset.handle, y.push(me("mousemove", s)), y.push(me("mouseup", A)), y.push(me("touchmove", s)), y.push(me("touchend", A)), L(G);
2914
+ 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)), N(G);
2911
2915
  }
2912
- function s(G) {
2916
+ function f(G) {
2913
2917
  const Y = Ee(e);
2914
2918
  if (!Y)
2915
2919
  return;
@@ -2925,14 +2929,14 @@ function _n(e, t = {}) {
2925
2929
  w.height = se;
2926
2930
  }
2927
2931
  if (d.includes("l")) {
2928
- const se = Math.min(D, Math.max(g, (ce.width ?? 0) - W));
2932
+ const se = Math.min(I, Math.max(g, (ce.width ?? 0) - W));
2929
2933
  w.width = se, w.left = (ce.left ?? 0) + W;
2930
2934
  }
2931
2935
  if (d.includes("r")) {
2932
- const se = Math.min(D, Math.max(g, (ce.width ?? 0) + W));
2936
+ const se = Math.min(I, Math.max(g, (ce.width ?? 0) + W));
2933
2937
  w.width = se;
2934
2938
  }
2935
- H.dispatchEvent(new CustomEvent("resize")), L(G), re(w);
2939
+ H.dispatchEvent(new CustomEvent("resize")), N(G), re(w);
2936
2940
  }
2937
2941
  function A() {
2938
2942
  document.documentElement.style.cursor = "", d = null, y.forEach((G) => {
@@ -3003,38 +3007,38 @@ function _n(e, t = {}) {
3003
3007
  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);
3004
3008
  }
3005
3009
  function ue(G, Y) {
3006
- if (x.value)
3010
+ if (D.value)
3007
3011
  return;
3008
3012
  const H = Ee(e);
3009
- H && (b(H, G ?? Tn), X(Y), r.push(me(H.$el, "mousedown", N)), r.push(me(H.$el, "touchstart", N)), x.value = !0, l = Y);
3013
+ H && (b(H, G ?? Tn), X(Y), r.push(me(H.$el, "mousedown", P)), r.push(me(H.$el, "touchstart", P)), D.value = !0, l = Y);
3010
3014
  }
3011
3015
  function be(G) {
3012
- if (!x.value)
3016
+ if (!D.value)
3013
3017
  return;
3014
3018
  const Y = Ee(e);
3015
3019
  Y && (T(Y), X(G), r.forEach((H) => {
3016
3020
  H();
3017
- }), r.length = 0, x.value = !1);
3021
+ }), r.length = 0, D.value = !1);
3018
3022
  }
3019
3023
  return {
3020
- resizingIsOn: x,
3024
+ resizingIsOn: D,
3021
3025
  turnResizingOn: ue,
3022
3026
  turnResizingOff: be
3023
3027
  };
3024
3028
  }
3025
3029
  function Cn(e) {
3026
- const t = (e == null ? void 0 : e.blade) ?? z(null), l = (e == null ? void 0 : e.handle) ?? z(null), S = z(!1), f = (e == null ? void 0 : e.mobileBreakpoint) ?? 500, g = z((e == null ? void 0 : e.defaultVariant) ?? "page"), D = z({}), { turnResizingOff: C, turnResizingOn: _ } = _n(t), { turnDraggableOff: M, turnDraggableOn: $ } = xn(t, l);
3030
+ 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"), I = z({}), { turnResizingOff: C, turnResizingOn: _ } = _n(t), { turnDraggableOff: L, turnDraggableOn: $ } = xn(t, l);
3027
3031
  jt(t, (h) => {
3028
3032
  const u = h[0], { width: r } = u.contentRect;
3029
- S.value = r < f;
3033
+ S.value = r < s;
3030
3034
  });
3031
3035
  function d(h) {
3032
- M(), h == "page" ? C(h) : h == "blade" ? _(["l", "r"], h) : h == "freestyle" ? (C(), _(void 0, h), $()) : h == "inline" && C();
3036
+ L(), h == "page" ? C(h) : h == "blade" ? _(["l", "r"], h) : h == "freestyle" ? (C(), _(void 0, h), $()) : h == "inline" && C();
3033
3037
  }
3034
3038
  return d(g.value), Te(g, (h) => d(h)), {
3035
3039
  isMobile: S,
3036
3040
  variant: g,
3037
- bladeData: D
3041
+ bladeData: I
3038
3042
  };
3039
3043
  }
3040
3044
  const mr = {
@@ -3086,7 +3090,7 @@ function Pn(e) {
3086
3090
  drawerStick: e.defaultDrawerStick ?? !1
3087
3091
  };
3088
3092
  }
3089
- function f() {
3093
+ function s() {
3090
3094
  localStorage.setItem("cosmetics", JSON.stringify(t.value));
3091
3095
  }
3092
3096
  function g(d) {
@@ -3104,7 +3108,7 @@ function Pn(e) {
3104
3108
  }
3105
3109
  }));
3106
3110
  }
3107
- function D(d) {
3111
+ function I(d) {
3108
3112
  var h;
3109
3113
  if (l != null) {
3110
3114
  const u = l.themes.value.dark, r = l.themes.value.light;
@@ -3117,7 +3121,7 @@ function Pn(e) {
3117
3121
  function _() {
3118
3122
  t.value.drawerStick = !t.value.drawerStick;
3119
3123
  }
3120
- function M() {
3124
+ function L() {
3121
3125
  t.value.theme = t.value.theme == "dark" ? "light" : "dark", l != null && (l.global.name.value = t.value.theme);
3122
3126
  }
3123
3127
  function $() {
@@ -3128,14 +3132,14 @@ function Pn(e) {
3128
3132
  }
3129
3133
  }
3130
3134
  return S(), Te(t, () => {
3131
- f();
3135
+ s();
3132
3136
  }), Dr = {
3133
3137
  state: t,
3134
3138
  resetCosmetics: g,
3135
- setTemporaryColor: D,
3139
+ setTemporaryColor: I,
3136
3140
  toggleDrawer: C,
3137
3141
  toggleDrawerStick: _,
3138
- toggleLightDark: M,
3142
+ toggleLightDark: L,
3139
3143
  undoTemporaryColor: $
3140
3144
  }, Dr;
3141
3145
  }
@@ -3147,35 +3151,35 @@ function Mn() {
3147
3151
  const {
3148
3152
  items: l,
3149
3153
  headers: S,
3150
- fileName: f = "data.csv",
3154
+ fileName: s = "data.csv",
3151
3155
  format: g = "file"
3152
3156
  } = t;
3153
3157
  if (!_e(l))
3154
3158
  return;
3155
- let D = [];
3156
- S != null ? D = S == null ? void 0 : S.filter((x) => (x.csv ?? x.csvText ?? x.csvFilter ?? x.csvArray) != null).map((x) => ({
3157
- header: x.title ?? x.value ?? "",
3158
- itemText: x.itemText,
3159
- value: x.value
3160
- })) : D = Object.keys(l[0]).map((x) => ({ header: tn(x) ?? "", value: x })), D = D.filter((x) => x.header.length > 0);
3159
+ let I = [];
3160
+ S != null ? I = S == null ? void 0 : S.filter((D) => (D.csv ?? D.csvText ?? D.csvFilter ?? D.csvArray) != null).map((D) => ({
3161
+ header: D.title ?? D.value ?? "",
3162
+ itemText: D.itemText,
3163
+ value: D.value
3164
+ })) : I = Object.keys(l[0]).map((D) => ({ header: tn(D) ?? "", value: D })), I = I.filter((D) => D.header.length > 0);
3161
3165
  var C = [];
3162
- for (let x = 0; x < l.length; x++) {
3163
- const i = l[x];
3164
- var _ = {}, M = [];
3165
- for (let E = 0; E < D.length; E++) {
3166
- const w = D[E];
3166
+ for (let D = 0; D < l.length; D++) {
3167
+ const i = l[D];
3168
+ var _ = {}, L = [];
3169
+ for (let E = 0; E < I.length; E++) {
3170
+ const w = I[E];
3167
3171
  var $ = null;
3168
3172
  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] = $;
3169
3173
  }
3170
- C.push(_), _e(M) && M.forEach((E) => {
3174
+ C.push(_), _e(L) && L.forEach((E) => {
3171
3175
  C.push(E);
3172
- }), M = [];
3176
+ }), L = [];
3173
3177
  }
3174
3178
  var d = [];
3175
- if (d.push(D.map((x) => x.header).toString()), C.forEach((x) => {
3179
+ if (d.push(I.map((D) => D.header).toString()), C.forEach((D) => {
3176
3180
  let i = [];
3177
- D.forEach(function(E) {
3178
- var w = x[E.header];
3181
+ I.forEach(function(E) {
3182
+ var w = D[E.header];
3179
3183
  i.push(w ?? "");
3180
3184
  }), d.push(i.join(","));
3181
3185
  }), g == "array")
@@ -3183,10 +3187,10 @@ function Mn() {
3183
3187
  var h = d.join(`
3184
3188
  `), u = new Blob([h], { type: "text/plain;charset=utf-8" });
3185
3189
  if (window.navigator.msSaveOrOpenBlob)
3186
- window.navigator.msSaveOrOpenBlob(u, f);
3190
+ window.navigator.msSaveOrOpenBlob(u, s);
3187
3191
  else {
3188
3192
  var r = document.createElement("a"), y = URL.createObjectURL(u);
3189
- r.href = y, r.download = f, document.body.appendChild(r), r.click(), setTimeout(function() {
3193
+ r.href = y, r.download = s, document.body.appendChild(r), r.click(), setTimeout(function() {
3190
3194
  document.body.removeChild(r), window.URL.revokeObjectURL(y);
3191
3195
  }, 0);
3192
3196
  }
@@ -3202,41 +3206,41 @@ function ba() {
3202
3206
  function Ln(e) {
3203
3207
  const t = e.getUTC ?? he.utc;
3204
3208
  function l() {
3205
- return f().startOf("day").toUTC().toString() ?? "";
3209
+ return s().startOf("day").toUTC().toString() ?? "";
3206
3210
  }
3207
3211
  function S() {
3208
- return f().startOf("day").plus({ day: 1 }).toUTC().toString() ?? "";
3212
+ return s().startOf("day").plus({ day: 1 }).toUTC().toString() ?? "";
3209
3213
  }
3210
- function f(_, M) {
3211
- return _ == null ? t().setZone(e.getTimeZone()) : M ? he.fromFormat(_, M, { zone: e.getTimeZone() }) : he.fromISO(_, { zone: e.getTimeZone() });
3214
+ function s(_, L) {
3215
+ return _ == null ? t().setZone(e.getTimeZone()) : L ? he.fromFormat(_, L, { zone: e.getTimeZone() }) : he.fromISO(_, { zone: e.getTimeZone() });
3212
3216
  }
3213
- function g(_, M, $) {
3217
+ function g(_, L, $) {
3214
3218
  if (_ == null) {
3215
3219
  const h = t().setZone(e.getTimeZone());
3216
- return M ? h.toFormat(M) : h.toString();
3220
+ return L ? h.toFormat(L) : h.toString();
3217
3221
  }
3218
3222
  if (_ == "Invalid DateTime")
3219
3223
  return "";
3220
3224
  const d = $ ? he.fromFormat(_, $, { zone: e.getTimeZone() }) : he.fromISO(_, { zone: e.getTimeZone() });
3221
- return M ? d.toFormat(M) : d == null ? void 0 : d.toString();
3225
+ return L ? d.toFormat(L) : d == null ? void 0 : d.toString();
3222
3226
  }
3223
- function D(_, M) {
3224
- return _ == null ? t() : M ? he.fromFormat(_, M) : he.fromISO(_);
3227
+ function I(_, L) {
3228
+ return _ == null ? t() : L ? he.fromFormat(_, L) : he.fromISO(_);
3225
3229
  }
3226
- function C(_, M, $) {
3230
+ function C(_, L, $) {
3227
3231
  if (_ == null)
3228
- return M ? t().toFormat(M) : t().toString();
3232
+ return L ? t().toFormat(L) : t().toString();
3229
3233
  {
3230
3234
  const d = $ ? he.fromFormat(_, $) : he.fromISO(_);
3231
- return M ? d.toFormat(M) : d.toString();
3235
+ return L ? d.toFormat(L) : d.toString();
3232
3236
  }
3233
3237
  }
3234
3238
  return xr = {
3235
3239
  getToday: l,
3236
3240
  getTomorrow: S,
3237
- tzDate: f,
3241
+ tzDate: s,
3238
3242
  tzString: g,
3239
- utcDate: D,
3243
+ utcDate: I,
3240
3244
  utcString: C
3241
3245
  }, xr;
3242
3246
  }
@@ -3249,7 +3253,7 @@ function Nn(e) {
3249
3253
  function S() {
3250
3254
  t.value = !0;
3251
3255
  }
3252
- function f() {
3256
+ function s() {
3253
3257
  t.value = !1;
3254
3258
  }
3255
3259
  function g(d) {
@@ -3260,13 +3264,13 @@ function Nn(e) {
3260
3264
  }
3261
3265
  return h == null && (h = l.find((u) => Array.isArray(u.nav) ? u.nav.some((r) => r == d.nav) : u.nav == d.nav)), h;
3262
3266
  }
3263
- function D(d) {
3267
+ function I(d) {
3264
3268
  var r;
3265
3269
  if (l == null)
3266
3270
  return Promise.resolve("no demo data available for this api");
3267
3271
  const h = d.id ?? ((r = d.data) == null ? void 0 : r.id), u = g(d);
3268
3272
  if (h != null && (u == null ? void 0 : u.data) != null) {
3269
- const y = u.data.findIndex((x) => x.id == h);
3273
+ const y = u.data.findIndex((D) => D.id == h);
3270
3274
  y >= 0 && u.data.splice(y, 1);
3271
3275
  }
3272
3276
  return new Promise(function(y) {
@@ -3276,12 +3280,12 @@ function Nn(e) {
3276
3280
  });
3277
3281
  }
3278
3282
  function C(d) {
3279
- var y, x, i;
3283
+ var y, D, i;
3280
3284
  if (l == null)
3281
3285
  throw new Error("no demo data available for this api");
3282
3286
  const h = d.id ?? ((y = d.data) == null ? void 0 : y.id), u = g(d);
3283
3287
  let r;
3284
- return u != null && (u.data ?? (u.data = []), u.getAction != null ? r = u.getAction(u.data, h) : h != null ? r = (x = u.data) == null ? void 0 : x.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) => {
3288
+ 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) => {
3285
3289
  setTimeout(() => {
3286
3290
  E({
3287
3291
  data: r
@@ -3304,15 +3308,15 @@ function Nn(e) {
3304
3308
  });
3305
3309
  });
3306
3310
  }
3307
- function M(d) {
3311
+ function L(d) {
3308
3312
  var r, y;
3309
3313
  if (l == null)
3310
3314
  throw new Error("no demo data available for this api");
3311
3315
  const h = g(d);
3312
3316
  let u;
3313
- 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((x) => {
3317
+ 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) => {
3314
3318
  setTimeout(() => {
3315
- x({
3319
+ D({
3316
3320
  data: u
3317
3321
  });
3318
3322
  });
@@ -3328,41 +3332,41 @@ function Nn(e) {
3328
3332
  if (h.data ?? (h.data = []), h.patchAction != null)
3329
3333
  u = h.patchAction(h.data, d.data);
3330
3334
  else if (d.data.id != null) {
3331
- const x = (r = h.data) == null ? void 0 : r.findIndex((i) => i.id == d.data.id);
3332
- x != null && x > -1 && ((y = h.data) == null || y.splice(x, 1, d.data)), u = d.data;
3335
+ const D = (r = h.data) == null ? void 0 : r.findIndex((i) => i.id == d.data.id);
3336
+ D != null && D > -1 && ((y = h.data) == null || y.splice(D, 1, d.data)), u = d.data;
3333
3337
  }
3334
3338
  }
3335
- return u == null ? Promise.resolve(void 0) : new Promise((x) => {
3339
+ return u == null ? Promise.resolve(void 0) : new Promise((D) => {
3336
3340
  setTimeout(() => {
3337
- x({
3341
+ D({
3338
3342
  data: u
3339
3343
  });
3340
3344
  });
3341
3345
  });
3342
3346
  }
3343
3347
  return Tr = {
3344
- endDemo: f,
3348
+ endDemo: s,
3345
3349
  isDemoing: t,
3346
3350
  startDemo: S,
3347
3351
  data: l,
3348
- deleteItem: D,
3352
+ deleteItem: I,
3349
3353
  get: C,
3350
3354
  getAll: _,
3351
- post: M,
3355
+ post: L,
3352
3356
  patch: $
3353
3357
  }, Tr;
3354
3358
  }
3355
3359
  var Rn = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
3356
3360
  function Aa(e) {
3357
3361
  function t(l) {
3358
- var f;
3362
+ var s;
3359
3363
  const S = l.matched.slice().reverse().find((g) => g.meta && g.meta.title);
3360
3364
  if (S)
3361
3365
  document.title = S.meta.title;
3362
3366
  else {
3363
3367
  const g = Rn.VITE_NODE_ENV;
3364
- let D = "";
3365
- g == "development" ? D = "BWeb Dev" : g == "staging" ? D = "BlitzIt Sandpit" : D = "BlitzIt Web | Cloud-Based Wholesale Logistics Platform", ((f = e == null ? void 0 : e.demo) == null ? void 0 : f.isDemoing.value) == !0 && (D = `Training: ${D}`), document.title = D;
3368
+ let I = "";
3369
+ g == "development" ? I = "BWeb Dev" : g == "staging" ? I = "BlitzIt Sandpit" : I = "BlitzIt Web | Cloud-Based Wholesale Logistics Platform", ((s = e == null ? void 0 : e.demo) == null ? void 0 : s.isDemoing.value) == !0 && (I = `Training: ${I}`), document.title = I;
3366
3370
  }
3367
3371
  }
3368
3372
  return {
@@ -3374,153 +3378,153 @@ function Ea() {
3374
3378
  return _r;
3375
3379
  }
3376
3380
  function Un(e) {
3377
- function t(s, A, j) {
3378
- return s ? an(s) ? j ?? "" : e.dates.tzString(s, A) : j ?? s ?? "";
3381
+ function t(f, A, j) {
3382
+ return f ? an(f) ? j ?? "" : e.dates.tzString(f, A) : j ?? f ?? "";
3379
3383
  }
3380
- function l(s) {
3381
- if (!s)
3384
+ function l(f) {
3385
+ if (!f)
3382
3386
  return "";
3383
- if (typeof s != "object")
3384
- return s;
3387
+ if (typeof f != "object")
3388
+ return f;
3385
3389
  var A = "";
3386
- return s.companyAccount != null && (A = s.companyAccount.companyName + " | "), s.addressLineOne != null && (A = A + s.addressLineOne + " "), s.streetNumber != null && (A = A + s.streetNumber + " "), s.streetName != null && (A = A + s.streetName + ", "), s.suburb != null && (A = A + s.suburb + " "), s.state != null && (A = A + s.state + " "), s.postcode != null && (A = A + s.postcode), A;
3390
+ return f.companyAccount != null && (A = f.companyAccount.companyName + " | "), f.addressLineOne != null && (A = A + f.addressLineOne + " "), f.streetNumber != null && (A = A + f.streetNumber + " "), f.streetName != null && (A = A + f.streetName + ", "), f.suburb != null && (A = A + f.suburb + " "), f.state != null && (A = A + f.state + " "), f.postcode != null && (A = A + f.postcode), A;
3387
3391
  }
3388
- function S(s) {
3389
- if (typeof s != "number")
3390
- return s;
3392
+ function S(f) {
3393
+ if (typeof f != "number")
3394
+ return f;
3391
3395
  var A = new Intl.NumberFormat("en-US", {
3392
3396
  style: "currency",
3393
3397
  currency: "AUD",
3394
3398
  minimumFractionDigits: 2
3395
3399
  });
3396
- return A.format(s);
3400
+ return A.format(f);
3397
3401
  }
3398
- function f(s, A) {
3399
- return t(s, "ccc | d LLL", A);
3402
+ function s(f, A) {
3403
+ return t(f, "ccc | d LLL", A);
3400
3404
  }
3401
- function g(s, A) {
3402
- return t(s, "d LLL", A);
3405
+ function g(f, A) {
3406
+ return t(f, "d LLL", A);
3403
3407
  }
3404
- function D(s, A) {
3405
- return t(s, "ccc", A);
3408
+ function I(f, A) {
3409
+ return t(f, "ccc", A);
3406
3410
  }
3407
- function C(s, A) {
3408
- return t(s, "ccc dd LLL yyyy", A);
3411
+ function C(f, A) {
3412
+ return t(f, "ccc dd LLL yyyy", A);
3409
3413
  }
3410
- function _(s, A) {
3411
- return t(s, "ccc dd LLL @ hh:mm a", A);
3414
+ function _(f, A) {
3415
+ return t(f, "ccc dd LLL @ hh:mm a", A);
3412
3416
  }
3413
- function M(s) {
3414
- return new Intl.NumberFormat().format(s);
3417
+ function L(f) {
3418
+ return new Intl.NumberFormat().format(f);
3415
3419
  }
3416
- function $(s) {
3417
- return s == 0 ? "" : new Intl.NumberFormat().format(s);
3420
+ function $(f) {
3421
+ return f == 0 ? "" : new Intl.NumberFormat().format(f);
3418
3422
  }
3419
- function d(s) {
3420
- if (s == 0)
3423
+ function d(f) {
3424
+ if (f == 0)
3421
3425
  return "";
3422
- var A = new Intl.NumberFormat().format(s);
3423
- return s > 0 ? "+" + A : A;
3426
+ var A = new Intl.NumberFormat().format(f);
3427
+ return f > 0 ? "+" + A : A;
3424
3428
  }
3425
- function h(s, A) {
3426
- return e.dates.utcString(s, A);
3429
+ function h(f, A) {
3430
+ return e.dates.utcString(f, A);
3427
3431
  }
3428
- function u(s) {
3429
- return rt(s, !1);
3432
+ function u(f) {
3433
+ return rt(f, !1);
3430
3434
  }
3431
- function r(s) {
3432
- if (!s)
3435
+ function r(f) {
3436
+ if (!f)
3433
3437
  return "";
3434
- if (typeof s != "object")
3435
- return s;
3438
+ if (typeof f != "object")
3439
+ return f;
3436
3440
  var A = "";
3437
- return s.addressLineOne != null && (A = s.addressLineOne + " "), s.streetNumber != null && (A = A + s.streetNumber + " "), s.streetName != null && (A = A + s.streetName + " "), s.suburb != null && (A = A + s.suburb + " "), s.state != null && (A = A + s.state + " "), s.postcode != null && (A = A + s.postcode), A = A.replaceAll(",", " "), A;
3441
+ return f.addressLineOne != null && (A = f.addressLineOne + " "), f.streetNumber != null && (A = A + f.streetNumber + " "), f.streetName != null && (A = A + f.streetName + " "), f.suburb != null && (A = A + f.suburb + " "), f.state != null && (A = A + f.state + " "), f.postcode != null && (A = A + f.postcode), A = A.replaceAll(",", " "), A;
3438
3442
  }
3439
- function y(s, A) {
3440
- return t(s, "ddd DD MMM YYYY", A);
3443
+ function y(f, A) {
3444
+ return t(f, "ddd DD MMM YYYY", A);
3441
3445
  }
3442
- function x(s, A) {
3443
- return t(s, "ccc dd LLL yyyy hh:mm a", A);
3446
+ function D(f, A) {
3447
+ return t(f, "ccc dd LLL yyyy hh:mm a", A);
3444
3448
  }
3445
- function i(s) {
3449
+ function i(f) {
3446
3450
  var A = new Intl.NumberFormat("en-US", {
3447
3451
  style: "percent",
3448
3452
  minimumFractionDigits: 2
3449
3453
  });
3450
- return A.format(s);
3454
+ return A.format(f);
3451
3455
  }
3452
- function E(s) {
3453
- return s.replaceAll(",", " ");
3456
+ function E(f) {
3457
+ return f.replaceAll(",", " ");
3454
3458
  }
3455
- function w(s, A) {
3456
- return t(s, "dd LLL yyyy", A);
3459
+ function w(f, A) {
3460
+ return t(f, "dd LLL yyyy", A);
3457
3461
  }
3458
- function L(s, A) {
3459
- return t(s, "dd LLL yyyy hh:mm a", A);
3462
+ function N(f, A) {
3463
+ return t(f, "dd LLL yyyy hh:mm a", A);
3460
3464
  }
3461
- function b(s, A) {
3462
- return t(s, "hh:mm a", A);
3465
+ function b(f, A) {
3466
+ return t(f, "hh:mm a", A);
3463
3467
  }
3464
- function T(s) {
3465
- return s == null ? "" : typeof s == "number" ? e.dates.tzDate().startOf("day").plus({ minutes: s }).toFormat("T") : typeof s == "string" ? e.dates.tzString(s, "t") : "unknown";
3468
+ function T(f) {
3469
+ 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";
3466
3470
  }
3467
- const I = {
3471
+ const x = {
3468
3472
  toCompanyNameAndLocationLine: l,
3469
3473
  toCurrency: S,
3470
- toDayDate: f,
3474
+ toDayDate: s,
3471
3475
  toDayMonth: g,
3472
- toDayOfWeek: D,
3476
+ toDayOfWeek: I,
3473
3477
  toDayShortDate: C,
3474
3478
  toDayShortDateAndTime: _,
3475
- toDisplayNumber: M,
3479
+ toDisplayNumber: L,
3476
3480
  toDisplayNumberOver: $,
3477
3481
  toDisplayNumberSigned: d,
3478
3482
  toFormat: h,
3479
3483
  toLocationLine: u,
3480
3484
  toLocationLineNoCommas: r,
3481
3485
  toLongDate: y,
3482
- toLongDateAndTime: x,
3486
+ toLongDateAndTime: D,
3483
3487
  toPercent: i,
3484
3488
  toPrettyCSV: E,
3485
3489
  toShortDate: w,
3486
- toShortDateAndTime: L,
3490
+ toShortDateAndTime: N,
3487
3491
  toTime: b,
3488
3492
  toTimeOfDay: T
3489
3493
  };
3490
- function N(s) {
3491
- if (s != null) {
3492
- let A = s;
3493
- if (A != null && I[A] != null)
3494
- return I[A];
3494
+ function P(f) {
3495
+ if (f != null) {
3496
+ let A = f;
3497
+ if (A != null && x[A] != null)
3498
+ return x[A];
3495
3499
  }
3496
3500
  return (A) => A;
3497
3501
  }
3498
3502
  return _r = {
3499
- findFilter: N,
3500
- ...I
3503
+ findFilter: P,
3504
+ ...x
3501
3505
  }, _r;
3502
3506
  }
3503
3507
  function Bn(e, t) {
3504
3508
  const l = z(!1), S = Yt(e);
3505
- let f = g(Q(e));
3509
+ let s = g(Q(e));
3506
3510
  (t == null ? void 0 : t.useTracker) !== !1 && Te(S, (C) => {
3507
- l.value = g(C) != f;
3511
+ l.value = g(C) != s;
3508
3512
  }, { deep: !0 });
3509
3513
  function g(C) {
3510
3514
  const _ = Nr(C);
3511
- return t != null && (t.propsToIgnore != null ? t.propsToIgnore.forEach((M) => {
3512
- delete _[M];
3515
+ return t != null && (t.propsToIgnore != null ? t.propsToIgnore.forEach((L) => {
3516
+ delete _[L];
3513
3517
  }) : t.propsToTrack != null && Object.keys(C).forEach(($) => {
3514
3518
  t.propsToTrack.some((d) => d == $) || delete _[$];
3515
3519
  })), JSON.stringify(_);
3516
3520
  }
3517
- function D() {
3518
- f = g(Q(S)), l.value = !1;
3521
+ function I() {
3522
+ s = g(Q(S)), l.value = !1;
3519
3523
  }
3520
3524
  return {
3521
3525
  asyncItem: S,
3522
3526
  isChanged: l,
3523
- restartTracker: D
3527
+ restartTracker: I
3524
3528
  };
3525
3529
  }
3526
3530
  function Ia(e, t) {
@@ -3528,22 +3532,22 @@ function Ia(e, t) {
3528
3532
  const {
3529
3533
  // useBladeSrc = true,
3530
3534
  useRouteSrc: l = !0
3531
- } = t ?? {}, S = e.storeMode ?? (t == null ? void 0 : t.storeMode), f = e.storageMode ?? (t == null ? void 0 : t.storageMode), g = e.nav ?? e.bladeName ?? "basic", D = Lr(), C = et(), _ = Q(e.proxyQueryKey), M = ee(() => {
3535
+ } = 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", I = Lr(), C = et(), _ = Q(e.proxyQueryKey), L = ee(() => {
3532
3536
  var W;
3533
3537
  return Q(e.proxyID) ?? (_ != null ? (W = C == null ? void 0 : C.query) == null ? void 0 : W[_] : void 0);
3534
- }), $ = z(void 0), { actionErrorMsg: d, actionLoadingMsg: h, deleteItem: u, getItem: r, getAllItems: y, restoreItem: x, saveItem: i } = ut({
3538
+ }), $ = z(void 0), { actionErrorMsg: d, actionLoadingMsg: h, deleteItem: u, getItem: r, getAllItems: y, restoreItem: D, saveItem: i } = ut({
3535
3539
  nav: g,
3536
3540
  onError: e.onError ?? (t == null ? void 0 : t.onError),
3537
- proxyID: M.value,
3541
+ proxyID: L.value,
3538
3542
  store: Le({
3539
3543
  storeMode: S,
3540
- storageMode: f,
3544
+ storageMode: s,
3541
3545
  nav: g
3542
3546
  })
3543
- }), E = ee(() => e.errorMsg ?? d.value), w = ee(() => e.loadingMsg ?? h.value), L = ee(() => w.value != null), b = z(e.itemID ?? (l ? (Z = C == null ? void 0 : C.params) == null ? void 0 : Z.id : void 0)), T = z(b.value == "new" ? "new" : e.startEditing ? "edit" : "view"), I = Ne(!1), N = ee(() => {
3547
+ }), E = ee(() => e.errorMsg ?? d.value), w = ee(() => e.loadingMsg ?? h.value), N = ee(() => w.value != null), b = z(e.itemID ?? (l ? (Z = C == null ? void 0 : C.params) == null ? void 0 : Z.id : void 0)), T = z(b.value == "new" ? "new" : e.startEditing ? "edit" : "view"), x = Ne(!1), P = ee(() => {
3544
3548
  let W = e.params != null ? { ...e.params } : {};
3545
3549
  return e.includeDetails != null && (W.includeDetails = e.includeDetails), W;
3546
- }), s = ee(() => {
3550
+ }), f = ee(() => {
3547
3551
  if (T.value == "new")
3548
3552
  return !1;
3549
3553
  const W = Q($);
@@ -3570,7 +3574,7 @@ function Ia(e, t) {
3570
3574
  const {
3571
3575
  additionalUrl: ne,
3572
3576
  onDeleteAsync: ce,
3573
- onDeleteSuccessAsync: se = () => (D.back(), Promise.resolve(void 0)),
3577
+ onDeleteSuccessAsync: se = () => (I.back(), Promise.resolve(void 0)),
3574
3578
  proxyID: ge
3575
3579
  } = { ...e };
3576
3580
  u({
@@ -3592,7 +3596,7 @@ function Ia(e, t) {
3592
3596
  onRestoreSuccessAsync: se,
3593
3597
  proxyID: ge
3594
3598
  } = { ...e };
3595
- x({
3599
+ D({
3596
3600
  additionalUrl: ne,
3597
3601
  data: W,
3598
3602
  nav: g,
@@ -3604,15 +3608,15 @@ function Ia(e, t) {
3604
3608
  });
3605
3609
  }
3606
3610
  async function Y(W) {
3607
- if (I.value = !1, e.item != null)
3611
+ if (x.value = !1, e.item != null)
3608
3612
  $.value = e.item;
3609
3613
  else {
3610
3614
  const ne = {
3611
3615
  additionalUrl: e.additionalUrl,
3612
3616
  id: b.value,
3613
3617
  nav: g,
3614
- proxyID: M.value,
3615
- params: N.value,
3618
+ proxyID: L.value,
3619
+ params: P.value,
3616
3620
  //props.params,
3617
3621
  // ...(useBladeSrc ? bladeData.value : {}),
3618
3622
  refresh: (W == null ? void 0 : W.deepRefresh) ?? !1,
@@ -3634,7 +3638,7 @@ function Ia(e, t) {
3634
3638
  onCanSaveAsync: se,
3635
3639
  onGetSaveAsync: ge,
3636
3640
  onSaveAsync: Be,
3637
- 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))
3641
+ onSaveSuccessAsync: $e = (Fe) => ((ne == null ? void 0 : ne.navBack) === !0 ? I.back() : (W.rowVersion != null && Fe.rowVersion != null && (W.rowVersion = Fe.rowVersion), ue(), T.value = "view"), Promise.resolve(void 0))
3638
3642
  } = { ...e };
3639
3643
  i({
3640
3644
  additionalUrl: ce,
@@ -3644,7 +3648,7 @@ function Ia(e, t) {
3644
3648
  onGetSaveAsync: ge,
3645
3649
  onSaveAsync: Be,
3646
3650
  onSaveSuccessAsync: $e,
3647
- proxyID: M.value,
3651
+ proxyID: L.value,
3648
3652
  // ...params.getOptions(),
3649
3653
  // ...(useBladeSrc ? bladeData.value : {}),
3650
3654
  mode: T.value
@@ -3655,7 +3659,7 @@ function Ia(e, t) {
3655
3659
  !W || W == "view" ? T.value = "edit" : W == "edit" && (T.value = "view");
3656
3660
  }
3657
3661
  return Te(E, (W) => {
3658
- I.value = W != null;
3662
+ x.value = W != null;
3659
3663
  }), Te(() => e.refreshToggle, () => {
3660
3664
  Y({ deepRefresh: !0 });
3661
3665
  }), Xr(async () => {
@@ -3666,10 +3670,10 @@ function Ia(e, t) {
3666
3670
  deleteItem: be,
3667
3671
  errorMsg: E,
3668
3672
  isChanged: re,
3669
- isDeletable: s,
3673
+ isDeletable: f,
3670
3674
  isEditing: ee(() => T.value == "new" || T.value == "edit"),
3671
3675
  isEditable: A,
3672
- isLoading: L,
3676
+ isLoading: N,
3673
3677
  isNew: ee(() => T.value == "new"),
3674
3678
  isRestorable: j,
3675
3679
  isSaveable: X,
@@ -3678,7 +3682,7 @@ function Ia(e, t) {
3678
3682
  refresh: Y,
3679
3683
  restoreItem: G,
3680
3684
  saveItem: H,
3681
- showError: I,
3685
+ showError: x,
3682
3686
  toggleMode: ie
3683
3687
  };
3684
3688
  }
@@ -3703,7 +3707,7 @@ function $n(e) {
3703
3707
  var u;
3704
3708
  return (u = C(h)) == null ? void 0 : u.archiveName;
3705
3709
  }
3706
- function f(h) {
3710
+ function s(h) {
3707
3711
  var u;
3708
3712
  return ((u = C(h)) == null ? void 0 : u.cacheExpiryHours) ?? t;
3709
3713
  }
@@ -3711,14 +3715,14 @@ function $n(e) {
3711
3715
  var u;
3712
3716
  return (u = C(h)) == null ? void 0 : u.displayName;
3713
3717
  }
3714
- function D(h) {
3718
+ function I(h) {
3715
3719
  var u;
3716
3720
  return (u = C(h)) == null ? void 0 : u.icon;
3717
3721
  }
3718
3722
  function C(h) {
3719
3723
  return h == null ? null : typeof h != "string" ? h : tt(l, (r) => r.children).find((r) => {
3720
3724
  var y;
3721
- return r.name == h || r.singleName == h || ((y = r.aliases) == null ? void 0 : y.some((x) => x == h));
3725
+ return r.name == h || r.singleName == h || ((y = r.aliases) == null ? void 0 : y.some((D) => D == h));
3722
3726
  }) ?? null;
3723
3727
  }
3724
3728
  function _(h) {
@@ -3728,7 +3732,7 @@ function $n(e) {
3728
3732
  let r = gn(u.microservice ?? "default") ?? "";
3729
3733
  return u.path != null && (r = Ue(r, u.path)), r != null && r.endsWith("/") && (r = r.slice(0, r.length - 1)), r;
3730
3734
  }
3731
- function M(h) {
3735
+ function L(h) {
3732
3736
  const u = C(h);
3733
3737
  if ((u == null ? void 0 : u.singleName) != null)
3734
3738
  return u.singleName;
@@ -3755,34 +3759,34 @@ function $n(e) {
3755
3759
  hesitate: gr,
3756
3760
  navigationItems: l,
3757
3761
  findArchiveName: S,
3758
- findCacheHours: f,
3762
+ findCacheHours: s,
3759
3763
  findDisplay: g,
3760
- findIcon: D,
3764
+ findIcon: I,
3761
3765
  findItem: C,
3762
3766
  findStoreName: $,
3763
3767
  findPath: _,
3764
- findSingleDisplay: M,
3768
+ findSingleDisplay: L,
3765
3769
  updateNavigationProperties: d
3766
3770
  }, Cr;
3767
3771
  }
3768
3772
  function Da(e, t, l) {
3769
3773
  var He, Ve;
3770
- const S = Mn(), f = it(), g = Lr(), D = et(), { bladeData: C } = Cn({}), _ = e.useBladeSrc ?? !0, M = e.useRouteSrc ?? !0, $ = e.nav ?? e.bladeName ?? e.itemBladeName ?? "basic", d = e.storeMode ?? ((He = f.findItem($)) == null ? void 0 : He.storeMode), h = e.storageMode ?? ((Ve = f.findItem($)) == null ? void 0 : Ve.storageMode), u = Q(e.customFilters) ?? [], r = z([]), y = ee(() => Kt([
3774
+ const S = Mn(), s = it(), g = Lr(), I = et(), { bladeData: C } = Cn({}), _ = e.useBladeSrc ?? !0, L = 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([
3771
3775
  ...u.filter((U) => U.name != null).map((U) => U.name),
3772
3776
  ...e.defaultFilters ?? [],
3773
3777
  ...r.value
3774
- ]).value), x = z((e.defaultFilters ?? []).map((U) => y.value.indexOf(U)));
3775
- let i = z([...x.value]);
3776
- const E = ee(() => Gr(i, x).value.length > 0 || Gr(x, i).value.length > 0), w = z(L());
3777
- function L() {
3778
+ ]).value), D = z((e.defaultFilters ?? []).map((U) => y.value.indexOf(U)));
3779
+ let i = z([...D.value]);
3780
+ const E = ee(() => Gr(i, D).value.length > 0 || Gr(D, i).value.length > 0), w = z(N());
3781
+ function N() {
3778
3782
  var U, K;
3779
3783
  if (_) {
3780
3784
  const V = (U = C.value) == null ? void 0 : U.page;
3781
3785
  if (V != null)
3782
3786
  return Number.parseInt(V);
3783
3787
  }
3784
- if (M) {
3785
- const V = (K = D == null ? void 0 : D.query) == null ? void 0 : K.page;
3788
+ if (L) {
3789
+ const V = (K = I == null ? void 0 : I.query) == null ? void 0 : K.page;
3786
3790
  if (V != null)
3787
3791
  return Number.parseInt(typeof V == "string" ? V : V.toString());
3788
3792
  }
@@ -3795,27 +3799,27 @@ function Da(e, t, l) {
3795
3799
  if (V != null)
3796
3800
  return V;
3797
3801
  }
3798
- if (M) {
3799
- const V = (K = D == null ? void 0 : D.query) == null ? void 0 : K.query;
3802
+ if (L) {
3803
+ const V = (K = I == null ? void 0 : I.query) == null ? void 0 : K.query;
3800
3804
  if (V != null)
3801
3805
  return V;
3802
3806
  }
3803
3807
  return e.proxyID;
3804
- }), T = z(I());
3805
- function I() {
3808
+ }), T = z(x());
3809
+ function x() {
3806
3810
  var U, K;
3807
3811
  if (_) {
3808
3812
  const V = (U = C.value) == null ? void 0 : U.search;
3809
3813
  if (V != null)
3810
3814
  return V;
3811
3815
  }
3812
- if (M) {
3813
- const V = (K = D == null ? void 0 : D.query) == null ? void 0 : K.search;
3816
+ if (L) {
3817
+ const V = (K = I == null ? void 0 : I.query) == null ? void 0 : K.search;
3814
3818
  if (V != null)
3815
3819
  return V;
3816
3820
  }
3817
3821
  }
3818
- const N = z(Q(e.startShowingInactive) ?? !1), s = ee(() => [
3822
+ const P = z(Q(e.startShowingInactive) ?? !1), f = ee(() => [
3819
3823
  ...e.searchProps ?? [],
3820
3824
  ...(e.headers ?? []).filter((U) => U.searchable != null && U.value != null).map((U) => U.value ?? "")
3821
3825
  ]), A = z([]), j = Ne([]), X = z([]);
@@ -3831,7 +3835,7 @@ function Da(e, t, l) {
3831
3835
  })
3832
3836
  }), 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(() => {
3833
3837
  let U, K = [];
3834
- x.value.forEach((O) => {
3838
+ D.value.forEach((O) => {
3835
3839
  const de = y.value[O], ye = u.find((De) => De.name == de);
3836
3840
  ye != null ? U = U != null ? `${U}ANDALSO${ye.filterFunction()}` : ye.filterFunction() : K.push(de);
3837
3841
  });
@@ -3840,8 +3844,8 @@ function Da(e, t, l) {
3840
3844
  }), Fe = ee(() => {
3841
3845
  var K;
3842
3846
  let U = e.params != null ? { ...e.params } : {};
3843
- 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;
3844
- }), 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(() => {
3847
+ 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 }), P.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;
3848
+ }), tr = ee(() => (U) => e.onCanDelete != null ? e.onCanDelete(U) : !(U != null && U.isInactive === !0)), nr = ee(() => (U) => P.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(() => {
3845
3849
  let U = new Array();
3846
3850
  return Ce.value.filter((V) => V.sublevel != null).forEach((V) => {
3847
3851
  let O = U.find((de) => de.position == V.sublevel);
@@ -3918,7 +3922,7 @@ function Da(e, t, l) {
3918
3922
  function Pe() {
3919
3923
  let U = Q(A);
3920
3924
  if (U = e.onFilter ? e.onFilter(U) : U, T.value != null && T.value.length > 0) {
3921
- let K = [...s.value];
3925
+ let K = [...f.value];
3922
3926
  e.itemText && K.push(e.itemText), _e(K) && (U = U.filter((V) => dn(V, T.value, K)));
3923
3927
  }
3924
3928
  j.value = U;
@@ -3956,7 +3960,7 @@ function Da(e, t, l) {
3956
3960
  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;
3957
3961
  }
3958
3962
  });
3959
- A.value = V, i.value = [...x.value];
3963
+ A.value = V, i.value = [...D.value];
3960
3964
  }
3961
3965
  Pe();
3962
3966
  }
@@ -3983,7 +3987,7 @@ function Da(e, t, l) {
3983
3987
  }
3984
3988
  return qe(), Qt([T], () => {
3985
3989
  Pe();
3986
- }, { debounce: 500, maxWait: 500 }), Te([N, w], async () => {
3990
+ }, { debounce: 500, maxWait: 500 }), Te([P, w], async () => {
3987
3991
  await Ie();
3988
3992
  }), Te([W, () => e.errorMsg], ([U, K]) => {
3989
3993
  se.value = U != null || K != null;
@@ -3993,7 +3997,7 @@ function Da(e, t, l) {
3993
3997
  Pe();
3994
3998
  }), Xr(async () => {
3995
3999
  var U;
3996
- e.eager == !0 && await Ie({ deepRefresh: ((U = D == null ? void 0 : D.params) == null ? void 0 : U.refresh) == "true" });
4000
+ e.eager == !0 && await Ie({ deepRefresh: ((U = I == null ? void 0 : I.params) == null ? void 0 : U.refresh) == "true" });
3997
4001
  }), {
3998
4002
  add: Se,
3999
4003
  asyncItems: A,
@@ -4013,11 +4017,11 @@ function Da(e, t, l) {
4013
4017
  refresh: Ie,
4014
4018
  restoreItem: Je,
4015
4019
  searchString: T,
4016
- selectedFilters: x,
4020
+ selectedFilters: D,
4017
4021
  selectItem: je,
4018
4022
  // serverFilters,
4019
4023
  showError: se,
4020
- showInactive: N,
4024
+ showInactive: P,
4021
4025
  showSearch: ge,
4022
4026
  subtitleOptions: ar,
4023
4027
  tableHeaders: Ce,
@@ -4042,30 +4046,30 @@ function xa() {
4042
4046
  ...We,
4043
4047
  sidebarNavItems: ee(() => {
4044
4048
  var g;
4045
- S = S.filter((D) => D.meta != null && D.meta.menuGroup != null);
4046
- const f = [];
4047
- return S.forEach((D) => {
4049
+ S = S.filter((I) => I.meta != null && I.meta.menuGroup != null);
4050
+ const s = [];
4051
+ return S.forEach((I) => {
4048
4052
  var d;
4049
- const C = We.groupOptions.value.find((h) => h.displayName == D.meta.menuGroup), _ = t.findItem(D.meta.nav), M = D.meta;
4050
- let $ = f.find((h) => h.displayName == M.menuGroup);
4053
+ const C = We.groupOptions.value.find((h) => h.displayName == I.meta.menuGroup), _ = t.findItem(I.meta.nav), L = I.meta;
4054
+ let $ = s.find((h) => h.displayName == L.menuGroup);
4051
4055
  $ == null && ($ = {
4052
- displayName: M.menuGroup,
4053
- icon: (C == null ? void 0 : C.icon) ?? (M == null ? void 0 : M.icon) ?? (_ == null ? void 0 : _.icon),
4056
+ displayName: L.menuGroup,
4057
+ icon: (C == null ? void 0 : C.icon) ?? (L == null ? void 0 : L.icon) ?? (_ == null ? void 0 : _.icon),
4054
4058
  isGroup: !0,
4055
4059
  items: []
4056
- }, f.push($)), (d = $.items) == null || d.push({
4057
- displayName: (M == null ? void 0 : M.displayName) ?? t.findDisplay(_ ?? void 0),
4058
- icon: (M == null ? void 0 : M.icon) ?? t.findIcon(_ ?? void 0),
4059
- permissions: (M == null ? void 0 : M.permissions) ?? (_ == null ? void 0 : _.permissions) ?? [],
4060
- requiresAuth: (M == null ? void 0 : M.requiresAuth) !== !1,
4061
- subscriptions: (M == null ? void 0 : M.subscriptions) ?? (_ == null ? void 0 : _.subscriptions) ?? [],
4062
- subFilters: (M == null ? void 0 : M.subFilters) ?? (_ == null ? void 0 : _.subFilters) ?? [],
4063
- routeName: D.name
4060
+ }, s.push($)), (d = $.items) == null || d.push({
4061
+ displayName: (L == null ? void 0 : L.displayName) ?? t.findDisplay(_ ?? void 0),
4062
+ icon: (L == null ? void 0 : L.icon) ?? t.findIcon(_ ?? void 0),
4063
+ permissions: (L == null ? void 0 : L.permissions) ?? (_ == null ? void 0 : _.permissions) ?? [],
4064
+ requiresAuth: (L == null ? void 0 : L.requiresAuth) !== !1,
4065
+ subscriptions: (L == null ? void 0 : L.subscriptions) ?? (_ == null ? void 0 : _.subscriptions) ?? [],
4066
+ subFilters: (L == null ? void 0 : L.subFilters) ?? (_ == null ? void 0 : _.subFilters) ?? [],
4067
+ routeName: I.name
4064
4068
  });
4065
- }), f.forEach((D) => {
4069
+ }), s.forEach((I) => {
4066
4070
  var C;
4067
- D.items = (C = D.items) == null ? void 0 : C.filter((_) => !_.requiresAuth || l.doShow(_.subscriptions, _.permissions, "view")).sort(Re.firstBy((_) => _.displayName));
4068
- }), We.currentGroup.value != null ? ((g = f.find((D) => D.displayName == We.currentGroup.value)) == null ? void 0 : g.items) ?? [] : f.filter((D) => !D.requiresAuth || l.doShow(D.subscriptions, D.permissions, "view"));
4071
+ I.items = (C = I.items) == null ? void 0 : C.filter((_) => !_.requiresAuth || l.doShow(_.subscriptions, _.permissions, "view")).sort(Re.firstBy((_) => _.displayName));
4072
+ }), We.currentGroup.value != null ? ((g = s.find((I) => I.displayName == We.currentGroup.value)) == null ? void 0 : g.items) ?? [] : s.filter((I) => !I.requiresAuth || l.doShow(I.subscriptions, I.permissions, "view"));
4069
4073
  })
4070
4074
  };
4071
4075
  }
@@ -4091,27 +4095,27 @@ function _a() {
4091
4095
  return Mr;
4092
4096
  }
4093
4097
  function Gn() {
4094
- function e(D) {
4095
- er.value = D.detail, br.value = !0;
4098
+ function e(I) {
4099
+ er.value = I.detail, br.value = !0;
4096
4100
  }
4097
4101
  function t() {
4098
4102
  Kr || (Kr = !0, window.location.reload());
4099
4103
  }
4100
4104
  function l() {
4101
- var D;
4102
- (D = Qr.value) == null || D.prompt(), wr.value = !1;
4105
+ var I;
4106
+ (I = Qr.value) == null || I.prompt(), wr.value = !1;
4103
4107
  }
4104
4108
  function S() {
4105
4109
  return !!window.matchMedia("(display-mode: standalone)").matches;
4106
4110
  }
4107
- function f(D) {
4108
- D.preventDefault(), wr.value = !0, Qr.value = D;
4111
+ function s(I) {
4112
+ I.preventDefault(), wr.value = !0, Qr.value = I;
4109
4113
  }
4110
4114
  function g() {
4111
4115
  br.value = !1, !(!er.value || !er.value.waiting) && er.value.waiting.postMessage({ type: "SKIP_WAITING" });
4112
4116
  }
4113
4117
  return Xt(() => {
4114
- Zr == null && (Zr = document.addEventListener("swUpdated", e, { once: !0 })), Jr == null && (Jr = navigator.serviceWorker.addEventListener("controllerchange", t)), jr == null && (jr = window.addEventListener("beforeinstallprompt", f));
4118
+ Zr == null && (Zr = document.addEventListener("swUpdated", e, { once: !0 })), Jr == null && (Jr = navigator.serviceWorker.addEventListener("controllerchange", t)), jr == null && (jr = window.addEventListener("beforeinstallprompt", s));
4115
4119
  }), Mr = {
4116
4120
  canInstallApp: wr,
4117
4121
  canUpdateApp: br,
@@ -4129,13 +4133,13 @@ function Pa(e) {
4129
4133
  install(t, l) {
4130
4134
  var _;
4131
4135
  console.log(t), e.vuetifyInstance ?? (e.vuetifyInstance = l.vuetifyInstance), yn(e.urls), Pn(e);
4132
- const S = Nn(), f = $n(e);
4133
- kn(e), (_ = e.auth).demo ?? (_.demo = S), e.auth.getAuthItem = f.findItem;
4136
+ const S = Nn(), s = $n(e);
4137
+ kn(e), (_ = e.auth).demo ?? (_.demo = S), e.auth.getAuthItem = s.findItem;
4134
4138
  const g = Dn(e.auth);
4135
4139
  Fn(e.menu);
4136
- const D = En({
4140
+ const I = En({
4137
4141
  auth: g,
4138
- findPath: f.findPath,
4142
+ findPath: s.findPath,
4139
4143
  useBearerToken: !0
4140
4144
  }), C = Ln({
4141
4145
  getTimeZone: () => g.timeZone.value
@@ -4143,9 +4147,9 @@ function Pa(e) {
4143
4147
  Un({
4144
4148
  dates: C
4145
4149
  }), Gn(), wn({
4146
- api: D,
4150
+ api: I,
4147
4151
  auth: g,
4148
- navigation: f
4152
+ navigation: s
4149
4153
  });
4150
4154
  }
4151
4155
  };