bt-core-app 1.4.95 → 1.4.97

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 +651 -639
  2. package/package.json +1 -1
@@ -11,11 +11,11 @@ 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(), s = Ne(), g = ee(() => l.value != null);
14
+ const t = z([]), l = Ne(), S = Ne(), f = Ne(), g = ee(() => l.value != null);
15
15
  function D(d) {
16
16
  t.value = t.value.filter((h) => h.id != d);
17
17
  }
18
- function P(d) {
18
+ function C(d) {
19
19
  const h = {
20
20
  id: Ot(),
21
21
  msg: d ?? "Loading"
@@ -31,17 +31,17 @@ function en(e) {
31
31
  async function $(d, h) {
32
32
  const u = { ...h };
33
33
  u.completionMsg ?? (u.completionMsg = e == null ? void 0 : e.completionMsg), u.confirmationMsg ?? (u.confirmationMsg = e == null ? void 0 : e.confirmationMsg), u.errorMsg ?? (u.errorMsg = e == null ? void 0 : e.errorMsg), u.loadingMsg ?? (u.loadingMsg = (e == null ? void 0 : e.loadingMsg) ?? "Loading"), u.requireConfirmation ?? (u.requireConfirmation = e == null ? void 0 : e.requireConfirmation);
34
- const r = P(u.loadingMsg);
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 && (s.value = u.completionMsg), y;
38
- } catch (I) {
37
+ return u.requireConfirmation || u.confirmationMsg, y = await d(), u.completionMsg != null && (f.value = u.completionMsg), y;
38
+ } catch (x) {
39
39
  if ((e == null ? void 0 : e.onError) != null)
40
- e.onError(I);
40
+ e.onError(x);
41
41
  else {
42
42
  if (u.throwError == !0)
43
- return I;
44
- _(u.errorMsg ?? I ?? "error");
43
+ return x;
44
+ _(u.errorMsg ?? x ?? "error");
45
45
  }
46
46
  } finally {
47
47
  D(r);
@@ -52,7 +52,7 @@ function en(e) {
52
52
  }, { deep: !0 }), {
53
53
  actionErrorMsg: S,
54
54
  actionLoadingMsg: l,
55
- actionCompleteMsg: s,
55
+ actionCompleteMsg: f,
56
56
  clearErrors: M,
57
57
  doAction: $,
58
58
  isLoading: g,
@@ -64,36 +64,36 @@ 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(s) {
68
- return s;
67
+ function e(f) {
68
+ return f;
69
69
  }
70
- function t(s) {
71
- return typeof s == "string" ? s.toLowerCase() : s;
70
+ function t(f) {
71
+ return typeof f == "string" ? f.toLowerCase() : f;
72
72
  }
73
- function l(s, g) {
74
- if (g = typeof g == "object" ? g : { direction: g }, typeof s != "function") {
75
- var D = s;
76
- s = function(d) {
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
77
  return d[D] ? d[D] : "";
78
78
  };
79
79
  }
80
- if (s.length === 1) {
81
- var P = s, _ = g.ignoreCase ? t : e, M = g.cmp || function(d, h) {
80
+ if (f.length === 1) {
81
+ var C = f, _ = g.ignoreCase ? t : e, M = g.cmp || function(d, h) {
82
82
  return d < h ? -1 : d > h ? 1 : 0;
83
83
  };
84
- s = function(d, h) {
85
- return M(_(P(d)), _(P(h)));
84
+ f = function(d, h) {
85
+ return M(_(C(d)), _(C(h)));
86
86
  };
87
87
  }
88
88
  const $ = { "-1": "", desc: "" };
89
89
  return g.direction in $ ? function(d, h) {
90
- return -s(d, h);
91
- } : s;
90
+ return -f(d, h);
91
+ } : f;
92
92
  }
93
- function S(s, g) {
94
- var D = typeof this == "function" && !this.firstBy ? this : !1, P = l(s, g), _ = D ? function(M, $) {
95
- return D(M, $) || P(M, $);
96
- } : P;
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, $);
96
+ } : C;
97
97
  return _.thenBy = S, _;
98
98
  }
99
99
  return S.firstBy = S, S;
@@ -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 s = new Image();
170
- s.setAttribute("crossOrigin", "anonymous"), s.onload = function() {
169
+ var f = new Image();
170
+ f.setAttribute("crossOrigin", "anonymous"), f.onload = function() {
171
171
  var g = document.createElement("canvas");
172
172
  g.width = this.width, g.height = this.height;
173
173
  var D = g.getContext("2d");
174
174
  D == null || D.drawImage(this, 0, 0), l(g.toDataURL("image/png"));
175
- }, s.onerror = function() {
175
+ }, f.onerror = function() {
176
176
  console.log("errr"), t ? S("image could not be loaded for some reason") : l(null);
177
- }, e != null && (s.src = e);
177
+ }, e != null && (f.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((s) => t.some((g) => s == g))).map((S) => S.value);
205
+ const t = e.replaceAll(" ", "").split(",").map((S) => S.toLowerCase()), l = Ze.filter((S) => S.values.some((f) => t.some((g) => f == 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((s) => s == t));
210
+ let l = Ze.find((S) => S.values.some((f) => f == t));
211
211
  return l != null ? l.short : "";
212
212
  }).filter((t) => t != null && t.length > 0).toString();
213
213
  }
214
214
  function na(e, t) {
215
215
  if (e == null || t == null)
216
216
  return !0;
217
- const l = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), S = t.replaceAll(" ", "").toLowerCase(), s = Ze.find((g) => g.values.some((D) => D == S));
218
- return s != null && l.some((g) => g == s.short || s.values.some((D) => D == g));
217
+ const l = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), S = t.replaceAll(" ", "").toLowerCase(), 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));
219
219
  }
220
220
  function aa(e, t) {
221
221
  if (t == null)
222
222
  return e;
223
223
  let l = e ?? "";
224
224
  l = `${l},${t}`;
225
- let S = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((s) => Ze.find((g) => g.values.some((D) => D == s))).filter((s) => s != null).sort(Re.firstBy((s) => (s == null ? void 0 : s.value) ?? 0)).map((s) => s == null ? void 0 : s.short))].toString();
225
+ let S = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((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();
226
226
  return S.length > 0 ? S : void 0;
227
227
  }
228
228
  function la(e, t) {
229
229
  if (t == null || e == null)
230
230
  return e;
231
- let l = e ?? "", S = t.replaceAll(" ", "").toLowerCase(), s = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((g) => Ze.find((D) => D.values.some((P) => P == g && P != S))).filter((g) => g != null).sort(Re.firstBy((g) => (g == null ? void 0 : g.value) ?? 0)).map((g) => g == null ? void 0 : g.short))].toString();
232
- return s.length > 0 ? s : void 0;
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;
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 s = Number.parseInt(l);
256
- return Math.round(e * s) / s;
255
+ let f = Number.parseInt(l);
256
+ return Math.round(e * f) / f;
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((s) => S.some((g) => g == s));
268
+ return l.some((f) => S.some((g) => g == f));
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, s) => {
292
- S.push(s);
293
- const g = tt(s, t);
291
+ return _e(l) ? [...l.reduce((S, f) => {
292
+ S.push(f);
293
+ const g = tt(f, 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], s = 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], f = new Uint8Array(l.length);
299
299
  for (let g = 0; g < l.length; g++)
300
- s[g] = l.charCodeAt(g);
301
- return new Blob([s], { type: S });
300
+ f[g] = l.charCodeAt(g);
301
+ return new Blob([f], { 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 s = 0; s < l.length; s++) {
326
- const g = l[s];
325
+ for (let f = 0; f < l.length; f++) {
326
+ const g = l[f];
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 s = e, g = 0; g < S; g++)
347
- if (s = s[l[g]], s == null)
346
+ for (var f = e, g = 0; g < S; g++)
347
+ if (f = f[l[g]], f == null)
348
348
  return null;
349
- return s;
349
+ return f;
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,73 +368,73 @@ var nt = { exports: {} };
368
368
  (function(l) {
369
369
  e.exports = l();
370
370
  })(function() {
371
- return function l(S, s, g) {
371
+ return function l(S, f, g) {
372
372
  function D(M, $) {
373
- if (!s[M]) {
373
+ if (!f[M]) {
374
374
  if (!S[M]) {
375
375
  var d = typeof Oe == "function" && Oe;
376
376
  if (!$ && d)
377
377
  return d(M, !0);
378
- if (P)
379
- return P(M, !0);
378
+ if (C)
379
+ return C(M, !0);
380
380
  var h = new Error("Cannot find module '" + M + "'");
381
381
  throw h.code = "MODULE_NOT_FOUND", h;
382
382
  }
383
- var u = s[M] = { exports: {} };
383
+ var u = f[M] = { exports: {} };
384
384
  S[M][0].call(u.exports, function(r) {
385
385
  var y = S[M][1][r];
386
386
  return D(y || r);
387
- }, u, u.exports, l, S, s, g);
387
+ }, u, u.exports, l, S, f, g);
388
388
  }
389
- return s[M].exports;
389
+ return f[M].exports;
390
390
  }
391
- for (var P = typeof Oe == "function" && Oe, _ = 0; _ < g.length; _++)
391
+ for (var C = typeof Oe == "function" && Oe, _ = 0; _ < g.length; _++)
392
392
  D(g[_]);
393
393
  return D;
394
- }({ 1: [function(l, S, s) {
394
+ }({ 1: [function(l, S, f) {
395
395
  (function(g) {
396
- var D = g.MutationObserver || g.WebKitMutationObserver, P;
396
+ var D = g.MutationObserver || g.WebKitMutationObserver, C;
397
397
  if (D) {
398
398
  var _ = 0, M = new D(r), $ = g.document.createTextNode("");
399
399
  M.observe($, {
400
400
  characterData: !0
401
- }), P = function() {
401
+ }), C = function() {
402
402
  $.data = _ = ++_ % 2;
403
403
  };
404
404
  } else if (!g.setImmediate && typeof g.MessageChannel < "u") {
405
405
  var d = new g.MessageChannel();
406
- d.port1.onmessage = r, P = function() {
406
+ d.port1.onmessage = r, C = function() {
407
407
  d.port2.postMessage(0);
408
408
  };
409
409
  } else
410
- "document" in g && "onreadystatechange" in g.document.createElement("script") ? P = function() {
411
- var I = g.document.createElement("script");
412
- I.onreadystatechange = function() {
413
- r(), I.onreadystatechange = null, I.parentNode.removeChild(I), I = null;
414
- }, g.document.documentElement.appendChild(I);
415
- } : P = function() {
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);
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 I, i, E = u.length; E; ) {
422
- for (i = u, u = [], I = -1; ++I < E; )
423
- i[I]();
421
+ for (var x, i, E = u.length; E; ) {
422
+ for (i = u, u = [], x = -1; ++x < E; )
423
+ i[x]();
424
424
  E = u.length;
425
425
  }
426
426
  h = !1;
427
427
  }
428
428
  S.exports = y;
429
- function y(I) {
430
- u.push(I) === 1 && !h && P();
429
+ function y(x) {
430
+ u.push(x) === 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, s) {
433
+ }, {}], 2: [function(l, S, f) {
434
434
  var g = l(1);
435
435
  function D() {
436
436
  }
437
- var P = {}, _ = ["REJECTED"], M = ["FULFILLED"], $ = ["PENDING"];
437
+ var C = {}, _ = ["REJECTED"], M = ["FULFILLED"], $ = ["PENDING"];
438
438
  S.exports = d;
439
439
  function d(b) {
440
440
  if (typeof b != "function")
@@ -446,54 +446,54 @@ var nt = { exports: {} };
446
446
  }, d.prototype.then = function(b, T) {
447
447
  if (typeof b != "function" && this.state === M || typeof T != "function" && this.state === _)
448
448
  return this;
449
- var x = new this.constructor(D);
449
+ var I = new this.constructor(D);
450
450
  if (this.state !== $) {
451
451
  var N = this.state === M ? b : T;
452
- u(x, N, this.outcome);
452
+ u(I, N, this.outcome);
453
453
  } else
454
- this.queue.push(new h(x, b, T));
455
- return x;
454
+ this.queue.push(new h(I, b, T));
455
+ return I;
456
456
  };
457
- function h(b, T, x) {
458
- this.promise = b, typeof T == "function" && (this.onFulfilled = T, this.callFulfilled = this.otherCallFulfilled), typeof x == "function" && (this.onRejected = x, this.callRejected = this.otherCallRejected);
457
+ function h(b, T, I) {
458
+ this.promise = b, typeof T == "function" && (this.onFulfilled = T, this.callFulfilled = this.otherCallFulfilled), typeof I == "function" && (this.onRejected = I, this.callRejected = this.otherCallRejected);
459
459
  }
460
460
  h.prototype.callFulfilled = function(b) {
461
- P.resolve(this.promise, b);
461
+ C.resolve(this.promise, b);
462
462
  }, h.prototype.otherCallFulfilled = function(b) {
463
463
  u(this.promise, this.onFulfilled, b);
464
464
  }, h.prototype.callRejected = function(b) {
465
- P.reject(this.promise, b);
465
+ C.reject(this.promise, b);
466
466
  }, h.prototype.otherCallRejected = function(b) {
467
467
  u(this.promise, this.onRejected, b);
468
468
  };
469
- function u(b, T, x) {
469
+ function u(b, T, I) {
470
470
  g(function() {
471
471
  var N;
472
472
  try {
473
- N = T(x);
474
- } catch (f) {
475
- return P.reject(b, f);
473
+ N = T(I);
474
+ } catch (s) {
475
+ return C.reject(b, s);
476
476
  }
477
- N === b ? P.reject(b, new TypeError("Cannot resolve promise with itself")) : P.resolve(b, N);
477
+ N === b ? C.reject(b, new TypeError("Cannot resolve promise with itself")) : C.resolve(b, N);
478
478
  });
479
479
  }
480
- P.resolve = function(b, T) {
481
- var x = I(r, T);
482
- if (x.status === "error")
483
- return P.reject(b, x.value);
484
- var N = x.value;
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
485
  if (N)
486
486
  y(b, N);
487
487
  else {
488
488
  b.state = M, b.outcome = T;
489
- for (var f = -1, A = b.queue.length; ++f < A; )
490
- b.queue[f].callFulfilled(T);
489
+ for (var s = -1, A = b.queue.length; ++s < A; )
490
+ b.queue[s].callFulfilled(T);
491
491
  }
492
492
  return b;
493
- }, P.reject = function(b, T) {
493
+ }, C.reject = function(b, T) {
494
494
  b.state = _, b.outcome = T;
495
- for (var x = -1, N = b.queue.length; ++x < N; )
496
- b.queue[x].callRejected(T);
495
+ for (var I = -1, N = b.queue.length; ++I < N; )
496
+ b.queue[I].callRejected(T);
497
497
  return b;
498
498
  };
499
499
  function r(b) {
@@ -504,54 +504,54 @@ var nt = { exports: {} };
504
504
  };
505
505
  }
506
506
  function y(b, T) {
507
- var x = !1;
507
+ var I = !1;
508
508
  function N(X) {
509
- x || (x = !0, P.reject(b, X));
509
+ I || (I = !0, C.reject(b, X));
510
510
  }
511
- function f(X) {
512
- x || (x = !0, P.resolve(b, X));
511
+ function s(X) {
512
+ I || (I = !0, C.resolve(b, X));
513
513
  }
514
514
  function A() {
515
- T(f, N);
515
+ T(s, N);
516
516
  }
517
- var j = I(A);
517
+ var j = x(A);
518
518
  j.status === "error" && N(j.value);
519
519
  }
520
- function I(b, T) {
521
- var x = {};
520
+ function x(b, T) {
521
+ var I = {};
522
522
  try {
523
- x.value = b(T), x.status = "success";
523
+ I.value = b(T), I.status = "success";
524
524
  } catch (N) {
525
- x.status = "error", x.value = N;
525
+ I.status = "error", I.value = N;
526
526
  }
527
- return x;
527
+ return I;
528
528
  }
529
529
  d.resolve = i;
530
530
  function i(b) {
531
- return b instanceof this ? b : P.resolve(new this(D), b);
531
+ return b instanceof this ? b : C.resolve(new this(D), b);
532
532
  }
533
533
  d.reject = E;
534
534
  function E(b) {
535
535
  var T = new this(D);
536
- return P.reject(T, b);
536
+ return C.reject(T, b);
537
537
  }
538
538
  d.all = w;
539
539
  function w(b) {
540
540
  var T = this;
541
541
  if (Object.prototype.toString.call(b) !== "[object Array]")
542
542
  return this.reject(new TypeError("must be an array"));
543
- var x = b.length, N = !1;
544
- if (!x)
543
+ var I = b.length, N = !1;
544
+ if (!I)
545
545
  return this.resolve([]);
546
- for (var f = new Array(x), A = 0, j = -1, X = new this(D); ++j < x; )
546
+ for (var s = new Array(I), A = 0, j = -1, X = new this(D); ++j < I; )
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, P.reject(X, Y));
551
+ N || (N = !0, C.reject(X, Y));
552
552
  });
553
553
  function G(Y) {
554
- f[be] = Y, ++A === x && !N && (N = !0, P.resolve(X, f));
554
+ s[be] = Y, ++A === I && !N && (N = !0, C.resolve(X, s));
555
555
  }
556
556
  }
557
557
  }
@@ -560,25 +560,25 @@ var nt = { exports: {} };
560
560
  var T = this;
561
561
  if (Object.prototype.toString.call(b) !== "[object Array]")
562
562
  return this.reject(new TypeError("must be an array"));
563
- var x = b.length, N = !1;
564
- if (!x)
563
+ var I = b.length, N = !1;
564
+ if (!I)
565
565
  return this.resolve([]);
566
- for (var f = -1, A = new this(D); ++f < x; )
567
- j(b[f]);
566
+ for (var s = -1, A = new this(D); ++s < I; )
567
+ j(b[s]);
568
568
  return A;
569
569
  function j(X) {
570
570
  T.resolve(X).then(function(re) {
571
- N || (N = !0, P.resolve(A, re));
571
+ N || (N = !0, C.resolve(A, re));
572
572
  }, function(re) {
573
- N || (N = !0, P.reject(A, re));
573
+ N || (N = !0, C.reject(A, re));
574
574
  });
575
575
  }
576
576
  }
577
- }, { 1: 1 }], 3: [function(l, S, s) {
577
+ }, { 1: 1 }], 3: [function(l, S, f) {
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, s) {
581
+ }, { 2: 2 }], 4: [function(l, S, f) {
582
582
  var g = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
583
583
  return typeof n;
584
584
  } : function(n) {
@@ -588,7 +588,7 @@ var nt = { exports: {} };
588
588
  if (!(n instanceof c))
589
589
  throw new TypeError("Cannot call a class as a function");
590
590
  }
591
- function P() {
591
+ function C() {
592
592
  try {
593
593
  if (typeof indexedDB < "u")
594
594
  return indexedDB;
@@ -604,7 +604,7 @@ var nt = { exports: {} };
604
604
  return;
605
605
  }
606
606
  }
607
- var _ = P();
607
+ var _ = C();
608
608
  function M() {
609
609
  try {
610
610
  if (!_ || !_.open)
@@ -650,16 +650,16 @@ var nt = { exports: {} };
650
650
  if (arguments.length && typeof arguments[arguments.length - 1] == "function")
651
651
  return arguments[arguments.length - 1];
652
652
  }
653
- var I = "local-forage-detect-blob-support", i = void 0, E = {}, w = Object.prototype.toString, L = "readonly", b = "readwrite";
653
+ var x = "local-forage-detect-blob-support", i = void 0, E = {}, w = Object.prototype.toString, L = "readonly", b = "readwrite";
654
654
  function T(n) {
655
655
  for (var c = n.length, a = new ArrayBuffer(c), m = new Uint8Array(a), v = 0; v < c; v++)
656
656
  m[v] = n.charCodeAt(v);
657
657
  return a;
658
658
  }
659
- function x(n) {
659
+ function I(n) {
660
660
  return new d(function(c) {
661
- var a = n.transaction(I, b), m = $([""]);
662
- a.objectStore(I).put(m, "key"), a.onabort = function(v) {
661
+ var a = n.transaction(x, b), m = $([""]);
662
+ a.objectStore(x).put(m, "key"), a.onabort = function(v) {
663
663
  v.preventDefault(), v.stopPropagation(), c(!1);
664
664
  }, a.oncomplete = function() {
665
665
  var v = navigator.userAgent.match(/Chrome\/(\d+)/), o = navigator.userAgent.match(/Edge\//);
@@ -670,11 +670,11 @@ var nt = { exports: {} };
670
670
  });
671
671
  }
672
672
  function N(n) {
673
- return typeof i == "boolean" ? d.resolve(i) : x(n).then(function(c) {
673
+ return typeof i == "boolean" ? d.resolve(i) : I(n).then(function(c) {
674
674
  return i = c, i;
675
675
  });
676
676
  }
677
- function f(n) {
677
+ function s(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
- f(n), n.db.close();
699
+ s(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(C) {
705
+ c && (o.onupgradeneeded = function(P) {
706
706
  var R = o.result;
707
707
  try {
708
- R.createObjectStore(n.storeName), C.oldVersion <= 1 && R.createObjectStore(I);
708
+ R.createObjectStore(n.storeName), P.oldVersion <= 1 && R.createObjectStore(x);
709
709
  } catch (B) {
710
710
  if (B.name === "ConstraintError")
711
- console.warn('The database "' + n.name + '" has been upgraded from version ' + C.oldVersion + " to version " + C.newVersion + ', but the storage "' + n.storeName + '" already exists.');
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.');
712
712
  else
713
713
  throw B;
714
714
  }
715
- }), o.onerror = function(C) {
716
- C.preventDefault(), m(o.error);
715
+ }), o.onerror = function(P) {
716
+ P.preventDefault(), m(o.error);
717
717
  }, o.onsuccess = function() {
718
- var C = o.result;
719
- C.onversionchange = function(R) {
718
+ var P = o.result;
719
+ P.onversionchange = function(R) {
720
720
  R.target.close();
721
- }, a(C), A(n);
721
+ }, a(P), 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
- f(n);
773
+ s(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 C = 0; C < a.length; C++)
783
- a[C]._dbInfo.db = o;
782
+ for (var P = 0; P < a.length; P++)
783
+ a[P]._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 C() {
828
+ function P() {
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(C));
833
+ B !== c && o.push(B._initReady().catch(P));
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(C, R) {
854
- if (C)
855
- return o(C);
853
+ W(a._dbInfo, L, function(P, R) {
854
+ if (P)
855
+ return o(P);
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(C, R) {
876
- if (C)
877
- return o(C);
875
+ W(a._dbInfo, L, function(P, R) {
876
+ if (P)
877
+ return o(P);
878
878
  try {
879
879
  var B = R.objectStore(a._dbInfo.storeName), F = B.openCursor(), k = 1;
880
880
  F.onsuccess = function() {
@@ -900,7 +900,7 @@ 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, C) {
903
+ var v = new d(function(o, P) {
904
904
  var R;
905
905
  m.ready().then(function() {
906
906
  return R = m._dbInfo, w.call(c) === "[object Blob]" ? N(R.db).then(function(B) {
@@ -909,7 +909,7 @@ var nt = { exports: {} };
909
909
  }).then(function(B) {
910
910
  W(m._dbInfo, b, function(F, k) {
911
911
  if (F)
912
- return C(F);
912
+ return P(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
- C(p);
921
+ P(p);
922
922
  };
923
923
  } catch (p) {
924
- C(p);
924
+ P(p);
925
925
  }
926
926
  });
927
- }).catch(C);
927
+ }).catch(P);
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(C, R) {
937
- if (C)
938
- return o(C);
936
+ W(a._dbInfo, b, function(P, R) {
937
+ if (P)
938
+ return o(P);
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, C) {
960
+ W(c._dbInfo, b, function(o, P) {
961
961
  if (o)
962
962
  return v(o);
963
963
  try {
964
- var R = C.objectStore(c._dbInfo.storeName), B = R.clear();
965
- C.oncomplete = function() {
964
+ var R = P.objectStore(c._dbInfo.storeName), B = R.clear();
965
+ P.oncomplete = function() {
966
966
  m();
967
- }, C.onabort = C.onerror = function() {
967
+ }, P.onabort = P.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, C) {
982
+ W(c._dbInfo, L, function(o, P) {
983
983
  if (o)
984
984
  return v(o);
985
985
  try {
986
- var R = C.objectStore(c._dbInfo.storeName), B = R.count();
986
+ var R = P.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(C, R) {
1008
- if (C)
1009
- return o(C);
1007
+ W(a._dbInfo, L, function(P, R) {
1008
+ if (P)
1009
+ return o(P);
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, C) {
1033
+ W(c._dbInfo, L, function(o, P) {
1034
1034
  if (o)
1035
1035
  return v(o);
1036
1036
  try {
1037
- var R = C.objectStore(c._dbInfo.storeName), B = R.openKeyCursor(), F = [];
1037
+ var R = P.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, C = o ? d.resolve(m._dbInfo.db) : re(n).then(function(R) {
1064
+ var o = n.name === a.name && m._dbInfo.db, P = 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 = C.then(function(R) {
1071
+ n.storeName ? v = P.then(function(R) {
1072
1072
  if (R.objectStoreNames.contains(n.storeName)) {
1073
1073
  var B = R.version + 1;
1074
- f(n);
1074
+ s(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 = C.then(function(R) {
1106
- f(n);
1105
+ }) : v = P.then(function(R) {
1106
+ s(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++) {
@@ -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, C, R, B;
1158
+ var c = n.length * 0.75, a = n.length, m, v = 0, o, P, 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]), C = Se.indexOf(n[m + 1]), R = Se.indexOf(n[m + 2]), B = Se.indexOf(n[m + 3]), k[v++] = o << 2 | C >> 4, k[v++] = (C & 15) << 4 | R >> 2, k[v++] = (R & 3) << 6 | B & 63;
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;
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 C = ir + n.type + "~" + oe(this.result);
1180
- c(ke + Ie + C);
1179
+ var P = ir + n.type + "~" + oe(this.result);
1180
+ c(ke + Ie + P);
1181
1181
  }, o.readAsArrayBuffer(n);
1182
1182
  } else
1183
1183
  try {
1184
1184
  c(JSON.stringify(n));
1185
- } catch (C) {
1186
- console.error("Couldn't convert value into a JSON string: ", n), c(null, C);
1185
+ } catch (P) {
1186
+ console.error("Couldn't convert value into a JSON string: ", n), c(null, P);
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, C) {
1241
+ var v = new d(function(o, P) {
1242
1242
  try {
1243
1243
  a.db = openDatabase(a.name, String(a.version), a.description, a.size);
1244
1244
  } catch (R) {
1245
- return C(R);
1245
+ return P(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
- C(F);
1251
+ P(F);
1252
1252
  });
1253
- }, C);
1253
+ }, P);
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(C, R) {
1259
- R.code === R.SYNTAX_ERR ? C.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?", [c.storeName], function(B, F) {
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) {
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(C, R);
1263
+ }, o) : o(P, 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 C = a._dbInfo;
1272
- C.db.transaction(function(R) {
1273
- xe(R, C, "SELECT * FROM " + C.storeName + " WHERE key = ? LIMIT 1", [n], function(B, F) {
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) {
1274
1274
  var k = F.rows.length ? F.rows.item(0).value : null;
1275
- k && (k = C.serializer.deserialize(k)), v(k);
1275
+ k && (k = P.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 C = a._dbInfo;
1288
- C.db.transaction(function(R) {
1289
- xe(R, C, "SELECT * FROM " + C.storeName, [], function(B, F) {
1287
+ var P = a._dbInfo;
1288
+ P.db.transaction(function(R) {
1289
+ xe(R, P, "SELECT * FROM " + P.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 = C.serializer.deserialize(te)), te = n(te, p.key, J + 1), te !== void 0) {
1292
+ if (te && (te = P.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(C, R) {
1309
+ var o = new d(function(P, 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
- C(B);
1316
+ P(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
- C(Ur.apply(v, [n, B, a, m - 1]));
1323
+ P(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 C = a._dbInfo;
1343
- C.db.transaction(function(R) {
1344
- xe(R, C, "DELETE FROM " + C.storeName + " WHERE key = ?", [n], function() {
1342
+ var P = a._dbInfo;
1343
+ P.db.transaction(function(R) {
1344
+ xe(R, P, "DELETE FROM " + P.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(C) {
1359
- xe(C, o, "DELETE FROM " + o.storeName, [], function() {
1358
+ o.db.transaction(function(P) {
1359
+ xe(P, 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(C) {
1374
- xe(C, o, "SELECT COUNT(key) as c FROM " + o.storeName, [], function(R, B) {
1373
+ o.db.transaction(function(P) {
1374
+ xe(P, 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 C = a._dbInfo;
1389
- C.db.transaction(function(R) {
1390
- xe(R, C, "SELECT key FROM " + C.storeName + " WHERE id = ? LIMIT 1", [n + 1], function(B, F) {
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) {
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(C) {
1406
- xe(C, o, "SELECT key FROM " + o.storeName, [], function(R, B) {
1405
+ o.db.transaction(function(P) {
1406
+ xe(P, 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 C = [], R = 0; R < o.rows.length; R++)
1423
- C.push(o.rows.item(R).name);
1422
+ for (var P = [], R = 0; R < o.rows.length; R++)
1423
+ P.push(o.rows.item(R).name);
1424
1424
  c({
1425
1425
  db: n,
1426
- storeNames: C
1426
+ storeNames: P
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 C;
1443
- n.name === a.name ? C = m._dbInfo.db : C = openDatabase(n.name, "", "", 0), n.storeName ? o({
1444
- db: C,
1442
+ var P;
1443
+ n.name === a.name ? P = m._dbInfo.db : P = openDatabase(n.name, "", "", 0), n.storeName ? o({
1444
+ db: P,
1445
1445
  storeNames: [n.storeName]
1446
- }) : o(wt(C));
1446
+ }) : o(wt(P));
1447
1447
  }).then(function(o) {
1448
- return new d(function(C, R) {
1448
+ return new d(function(P, 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
- C();
1462
+ P();
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, C = o.length, R = localStorage.length, B = 1, F = 0; F < R; F++) {
1536
+ for (var v = a._dbInfo, o = v.keyPrefix, P = 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(C), B++), q !== void 0)
1540
+ if (q && (q = v.serializer.deserialize(q)), q = n(q, k.substring(P), 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 = [], C = 0; C < v; C++) {
1562
- var R = localStorage.key(C);
1561
+ for (var m = c._dbInfo, v = localStorage.length, o = [], P = 0; P < v; P++) {
1562
+ var R = localStorage.key(P);
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(C, R) {
1590
+ return new d(function(P, 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), C(o);
1597
+ localStorage.setItem(B.keyPrefix + n, F), P(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 C = localStorage.length - 1; C >= 0; C--) {
1616
- var R = localStorage.key(C);
1615
+ for (var P = localStorage.length - 1; P >= 0; P--) {
1616
+ var R = localStorage.key(P);
1617
1617
  R.indexOf(o) === 0 && localStorage.removeItem(R);
1618
1618
  }
1619
1619
  }) : v = d.reject("Invalid arguments"), h(v, c), v;
@@ -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(C, R) {
1700
+ var o = new d(function(P, 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, C();
1727
+ ze[B] && console.info("Redefining LocalForage driver: " + B), ze[B] = a, Fr[B] = Ye, P();
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 C = this._getSupportedDrivers(a);
1751
+ var P = 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 = C[0];
1777
+ var q = P[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(C);
1779
+ o._driver = J._driver, R(), o._wrapLibraryMethodsWithReady(), o._initDriver = F(P);
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 C = a[v];
1793
- this.supports(C) && m.push(C);
1792
+ var P = a[v];
1793
+ this.supports(P) && m.push(P);
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(s) {
1840
+ async function e(f) {
1841
1841
  const g = ve();
1842
- (await g.keys()).filter((_) => _.startsWith(s)).forEach((_) => {
1842
+ (await g.keys()).filter((_) => _.startsWith(f)).forEach((_) => {
1843
1843
  g.removeItem(_);
1844
1844
  });
1845
1845
  }
1846
- async function t(s) {
1847
- return await ve().getItem(s);
1846
+ async function t(f) {
1847
+ return await ve().getItem(f);
1848
1848
  }
1849
- async function l(s) {
1850
- return await ve().removeItem(s);
1849
+ async function l(f) {
1850
+ return await ve().removeItem(f);
1851
1851
  }
1852
- async function S(s, g) {
1853
- await ve().setItem(g, s);
1852
+ async function S(f, g) {
1853
+ await ve().setItem(g, f);
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, s, g, D;
1877
- e.storeMode ?? (e.storeMode = ((S = (l = e.navigation) == null ? void 0 : l.findItem(e.nav)) == null ? void 0 : S.storeMode) ?? "session"), e.storageMode ?? (e.storageMode = ((g = (s = e.navigation) == null ? void 0 : s.findItem(e.nav)) == null ? void 0 : g.storageMode) ?? "local-cache"), e.storeName ?? (e.storeName = ((D = e.navigation) == null ? void 0 : D.findStoreName(e.nav)) ?? e.nav);
1876
+ var l, S, 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);
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((s) => s[0])).forEach((s) => {
1898
- s[1] != null && l.append(s[0], s[1].toString());
1897
+ Object.entries(e.params).sort(Re.firstBy((f) => f[0])).forEach((f) => {
1898
+ f[1] != null && l.append(f[0], f[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({}), s = e.storageMode == "local-cache", g = e.buildUrl ?? ((u = e.api) == null ? void 0 : u.buildUrl) ?? Sn;
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
1907
  function D(r) {
1908
1908
  var i, E;
1909
1909
  let y = "";
1910
- const I = r.params ?? {};
1911
- return I != null && (y = Object.entries(I).sort(Re.firstBy((w) => w[0])).map((w) => `${w[0]}=${JSON.stringify(w[1])}`).join("&")), `${e.storeName ?? "base"}_${((i = e.auth) == null ? void 0 : i.credentials.value.userID) ?? "no-user-id"}_${r.id ?? ((E = r.data) == null ? void 0 : E.id) ?? "no-item-id"}_${y ?? "no-params"}`;
1910
+ const 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"}`;
1912
1912
  }
1913
- async function P(r) {
1913
+ async function C(r) {
1914
1914
  r.additionalUrl ?? (r.additionalUrl = "/getAll"), g(r);
1915
- const y = D(r), I = r.refresh;
1916
- if (!I && l.value[y] !== void 0)
1915
+ const y = D(r), x = r.refresh;
1916
+ if (!x && l.value[y] !== void 0)
1917
1917
  return l.value[y];
1918
- if (!I && s == !0) {
1918
+ if (!x && f == !0) {
1919
1919
  const i = await ve().getItem(y);
1920
1920
  if (i != null && (e.api == null || parseFloat(i.meta.storedOn) > t - 7))
1921
1921
  return l.value[y] = i, i;
@@ -1927,13 +1927,13 @@ function An(e) {
1927
1927
  i == null && (i = new Promise(async (w, L) => {
1928
1928
  var b;
1929
1929
  try {
1930
- const T = await ((b = e.api) == null ? void 0 : b.getAll(r)), x = {
1930
+ const T = await ((b = e.api) == null ? void 0 : b.getAll(r)), I = {
1931
1931
  meta: { storedOn: t.toString() },
1932
1932
  data: T == null ? void 0 : T.data,
1933
1933
  count: T == null ? void 0 : T.count,
1934
1934
  filters: (T == null ? void 0 : T.filters) ?? []
1935
1935
  };
1936
- s == !0 && await ve().setItem(y, x), w(x);
1936
+ f == !0 && await ve().setItem(y, I), w(I);
1937
1937
  } catch (T) {
1938
1938
  L(T);
1939
1939
  } finally {
@@ -1952,10 +1952,10 @@ function An(e) {
1952
1952
  }
1953
1953
  async function _(r) {
1954
1954
  r.additionalUrl ?? (r.additionalUrl = "/get"), g(r);
1955
- const y = D(r), I = r.refresh;
1956
- if (!I && l.value[y] !== void 0)
1955
+ const y = D(r), x = r.refresh;
1956
+ if (!x && l.value[y] !== void 0)
1957
1957
  return l.value[y];
1958
- if (!I && s == !0) {
1958
+ if (!x && f == !0) {
1959
1959
  const i = await ve().getItem(y);
1960
1960
  if (i != null && (e.api == null || parseFloat(i.meta.storedOn) > t - 7))
1961
1961
  return l.value[y] = i, { data: i.data };
@@ -1968,11 +1968,11 @@ function An(e) {
1968
1968
  var b;
1969
1969
  try {
1970
1970
  let T = await ((b = e.api) == null ? void 0 : b.get(r));
1971
- const x = {
1971
+ const I = {
1972
1972
  meta: { storedOn: t.toString() },
1973
1973
  data: T == null ? void 0 : T.data
1974
1974
  };
1975
- s == !0 && await ve().setItem(y, x), w(x);
1975
+ f == !0 && await ve().setItem(y, I), w(I);
1976
1976
  } catch (T) {
1977
1977
  L(T);
1978
1978
  } finally {
@@ -1989,54 +1989,54 @@ function An(e) {
1989
1989
  var i;
1990
1990
  r.additionalUrl ?? (r.additionalUrl = "/patch"), g(r);
1991
1991
  const y = D(r);
1992
- let I;
1992
+ let x;
1993
1993
  if (e.api != null)
1994
1994
  try {
1995
1995
  let E = await e.api.patch(r);
1996
- I = E == null ? void 0 : E.data;
1996
+ x = E == null ? void 0 : E.data;
1997
1997
  } catch (E) {
1998
1998
  throw E;
1999
1999
  }
2000
2000
  else
2001
- I = r.data;
2002
- if (I != null) {
2001
+ x = r.data;
2002
+ if (x != null) {
2003
2003
  let E = {
2004
2004
  meta: { storedOn: t.toString() },
2005
- data: { ...(i = l.value[y]) == null ? void 0 : i.data, ...I }
2005
+ data: { ...(i = l.value[y]) == null ? void 0 : i.data, ...x }
2006
2006
  };
2007
- return l.value[y] = E, s == !0 && await ve().setItem(y, E), I.id != null && I.rowVersion != null && Object.entries(l.value).forEach((L) => {
2007
+ return l.value[y] = E, f == !0 && await ve().setItem(y, E), x.id != null && x.rowVersion != null && Object.entries(l.value).forEach((L) => {
2008
2008
  const b = L[1].data;
2009
2009
  if (b != null)
2010
2010
  if (Array.isArray(b))
2011
2011
  for (let T = 0; T < b.length; T++)
2012
- b[T].id == I.id && b.splice(T, 1, E.data);
2012
+ b[T].id == x.id && b.splice(T, 1, E.data);
2013
2013
  else
2014
- b.id == I.id && (l.value[L[0]] = E);
2014
+ b.id == x.id && (l.value[L[0]] = E);
2015
2015
  }), E.data;
2016
2016
  }
2017
- return I;
2017
+ return x;
2018
2018
  }
2019
2019
  async function $(r) {
2020
2020
  r.additionalUrl ?? (r.additionalUrl = "/post"), g(r);
2021
2021
  const y = D(r);
2022
- let I;
2022
+ let x;
2023
2023
  if (e.api != null)
2024
2024
  try {
2025
2025
  let i = await e.api.post(r);
2026
- I = i == null ? void 0 : i.data;
2026
+ x = i == null ? void 0 : i.data;
2027
2027
  } catch (i) {
2028
2028
  throw i;
2029
2029
  }
2030
2030
  else
2031
- I = r.data;
2032
- if (I != null) {
2031
+ x = r.data;
2032
+ if (x != null) {
2033
2033
  let i = {
2034
2034
  meta: { storedOn: t.toString() },
2035
- data: I
2035
+ data: x
2036
2036
  };
2037
- return s == !0 && await ve().setItem(y, i), l.value[y] = i, i.data;
2037
+ return f == !0 && await ve().setItem(y, i), l.value[y] = i, i.data;
2038
2038
  }
2039
- return I;
2039
+ return x;
2040
2040
  }
2041
2041
  async function d(r) {
2042
2042
  var i;
@@ -2051,16 +2051,16 @@ function An(e) {
2051
2051
  throw E;
2052
2052
  }
2053
2053
  delete l.value[y];
2054
- const I = ((i = r.data) == null ? void 0 : i.id) ?? r.id;
2055
- I != null && Object.entries(l.value).forEach((w) => {
2054
+ const x = ((i = r.data) == null ? void 0 : i.id) ?? r.id;
2055
+ x != null && Object.entries(l.value).forEach((w) => {
2056
2056
  const L = w[1].data;
2057
2057
  if (L != null)
2058
2058
  if (Array.isArray(L))
2059
2059
  for (let b = 0; b < L.length; b++)
2060
- L[b].id == I && L.splice(b, 1);
2060
+ L[b].id == x && L.splice(b, 1);
2061
2061
  else
2062
2062
  delete l.value[w[0]];
2063
- }), s == !0 && await ve().removeItem(y);
2063
+ }), f == !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)
@@ -2074,52 +2074,55 @@ function An(e) {
2074
2074
  return {
2075
2075
  deleteItem: d,
2076
2076
  get: _,
2077
- getAll: P,
2077
+ getAll: C,
2078
2078
  patch: M,
2079
2079
  post: $,
2080
2080
  restore: h,
2081
- searchMemory: l
2081
+ searchMemory: l,
2082
2082
  //mainly for testing
2083
+ currentTimeStampDays: t,
2084
+ promiseMemory: S,
2085
+ cacheLocally: f
2083
2086
  };
2084
2087
  });
2085
2088
  }
2086
2089
  function qr(e) {
2087
2090
  return pr(e.storeName, () => {
2088
- const t = z(), l = z(0), S = he.utc().toSeconds() / 3600, s = z(), g = z(), D = z({}), P = e.storageMode == "local-cache";
2091
+ const t = z(), l = z(0), S = he.utc().toSeconds() / 3600, f = z(), g = z(), D = z({}), C = e.storageMode == "local-cache";
2089
2092
  function _() {
2090
2093
  var i;
2091
2094
  return `${e.storeName}_${((i = e.auth) == null ? void 0 : i.credentials.value.userID) ?? "no-user-id"}`;
2092
2095
  }
2093
2096
  async function M() {
2094
- P == !0 && await ve().setItem(_(), {
2097
+ console.log("trying save"), C == !0 && (console.log("saving"), await ve().setItem(_(), {
2095
2098
  meta: g.value,
2096
2099
  data: t.value,
2097
2100
  count: l.value,
2098
2101
  filters: []
2099
- });
2102
+ }));
2100
2103
  }
2101
2104
  function $(i) {
2102
2105
  const E = _();
2103
2106
  return D.value[E] || (D.value[E] = new Promise(async (w, L) => {
2104
2107
  var b, T;
2105
2108
  try {
2106
- let x = await ((T = e.api) == null ? void 0 : T.getAll({
2109
+ let I = await ((T = e.api) == null ? void 0 : T.getAll({
2107
2110
  additionalUrl: "/getAll",
2108
2111
  nav: i.nav,
2109
2112
  params: {
2110
2113
  lastUpdate: ((b = g.value) == null ? void 0 : b.lastUpdate) ?? ln()
2111
2114
  }
2112
2115
  }));
2113
- x == null ? L(x) : (t.value ?? (t.value = []), x.data.forEach((N) => {
2116
+ console.log("res"), console.log(I), I == null ? L(I) : (t.value ?? (t.value = []), I.data.forEach((N) => {
2114
2117
  var A, j;
2115
- const f = t.value.findIndex((X) => X.id == N.id);
2116
- f >= 0 ? (A = t.value) == null || A.splice(f, 1, N) : (j = t.value) == null || j.push(N);
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);
2117
2120
  }), l.value = t.value.length, g.value = {
2118
2121
  lastUpdate: he.utc().toString(),
2119
2122
  storedOn: S.toString()
2120
- }, await M(), w(x));
2121
- } catch (x) {
2122
- L(x);
2123
+ }, await M(), console.log("resolving"), console.log(I), w(I));
2124
+ } catch (I) {
2125
+ L(I);
2123
2126
  } finally {
2124
2127
  delete D.value[E];
2125
2128
  }
@@ -2128,50 +2131,51 @@ function qr(e) {
2128
2131
  async function d(i) {
2129
2132
  var L, b, T;
2130
2133
  const E = _(), w = i.refresh;
2131
- if (!w && t.value != null)
2132
- return {
2134
+ if (console.log("getting all from"), console.log(E), !w && t.value != null)
2135
+ return console.log("not refresh and ditems not null"), {
2133
2136
  count: (L = t.value) == null ? void 0 : L.length,
2134
2137
  data: t.value,
2135
2138
  filters: []
2136
2139
  };
2137
- if (!w && P == !0) {
2138
- const x = await ve().getItem(E);
2139
- if (x != null && parseFloat(x.meta.storedOn) > S - 7)
2140
- return t.value = x.data, l.value = x.data.length, s.value = x.filters ?? [], g.value = x.meta, {
2140
+ if (!w && C == !0) {
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, {
2141
2145
  count: (b = t.value) == null ? void 0 : b.length,
2142
2146
  data: t.value ?? [],
2143
2147
  filters: []
2144
2148
  };
2145
2149
  }
2146
2150
  if (e.api == null)
2147
- return {
2151
+ return console.log("no api"), {
2148
2152
  count: (T = t.value) == null ? void 0 : T.length,
2149
2153
  data: t.value ?? [],
2150
- filters: s.value
2154
+ filters: f.value
2151
2155
  };
2152
- t.value ?? (t.value = []);
2156
+ console.log("setting dataitems"), t.value ?? (t.value = []);
2153
2157
  try {
2154
- return await $(i);
2155
- } catch (x) {
2156
- let N = x;
2158
+ return console.log("create refresh promise"), await $(i);
2159
+ } catch (I) {
2160
+ let N = I;
2157
2161
  throw new Error(N.message ?? "Problem");
2158
2162
  }
2159
2163
  }
2160
2164
  async function h(i) {
2161
- var b, T, x, N;
2165
+ var b, T, I, N;
2162
2166
  const E = _(), w = i.id ?? ((b = i.data) == null ? void 0 : b.id);
2163
2167
  if (w == null)
2164
2168
  throw new Error("no id provided");
2165
2169
  let L = i.refresh;
2166
2170
  if (!L && t.value != null) {
2167
- const f = t.value.find((A) => A.id == w);
2168
- if (f != null)
2169
- return { data: f };
2171
+ const s = t.value.find((A) => A.id == w);
2172
+ if (s != null)
2173
+ return { data: s };
2170
2174
  }
2171
- if (!L && P == !0) {
2172
- const f = await ve().getItem(E);
2173
- if (f != null && parseFloat(f.meta.storedOn) > S - 12) {
2174
- t.value = f.data, l.value = f.data.length, s.value = f.filters ?? [], g.value = f.meta;
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;
2175
2179
  let A = (T = t.value) == null ? void 0 : T.find((j) => j.id == i.id);
2176
2180
  if (A != null)
2177
2181
  return { data: A };
@@ -2179,13 +2183,13 @@ function qr(e) {
2179
2183
  }
2180
2184
  if (e.api == null)
2181
2185
  return {
2182
- data: (x = t.value) == null ? void 0 : x.find((f) => f.id == i.id)
2186
+ data: (I = t.value) == null ? void 0 : I.find((s) => s.id == i.id)
2183
2187
  };
2184
2188
  t.value ?? (t.value = []);
2185
2189
  try {
2186
- return await $(i), { data: (N = t.value) == null ? void 0 : N.find((f) => f.id == i.id) };
2187
- } catch (f) {
2188
- let A = f;
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;
2189
2193
  throw new Error(A.message ?? "Problem");
2190
2194
  }
2191
2195
  }
@@ -2198,13 +2202,13 @@ function qr(e) {
2198
2202
  let T = await e.api.patch(i);
2199
2203
  E = { ...i.data, ...T == null ? void 0 : T.data };
2200
2204
  } catch (T) {
2201
- let x = T;
2202
- throw new Error(x.message ?? "Patch Problem");
2205
+ let I = T;
2206
+ throw new Error(I.message ?? "Patch Problem");
2203
2207
  }
2204
2208
  else
2205
2209
  E = i.data;
2206
2210
  if (E != null) {
2207
- let T = (w = t.value) == null ? void 0 : w.findIndex((x) => x.id == E.id);
2211
+ let T = (w = t.value) == null ? void 0 : w.findIndex((I) => I.id == E.id);
2208
2212
  T != null && T >= 0 && (t.value ?? (t.value = []), (L = t.value) == null || L.splice(T, 1, E), await M());
2209
2213
  }
2210
2214
  return (b = t.value) == null ? void 0 : b.find((T) => T.id == (i.id ?? i.data.id));
@@ -2242,7 +2246,7 @@ function qr(e) {
2242
2246
  b != null && b >= 0 && (t.value ?? (t.value = []), (L = t.value) == null || L.splice(b, 1), await M());
2243
2247
  }
2244
2248
  }
2245
- async function I(i) {
2249
+ async function x(i) {
2246
2250
  var E;
2247
2251
  if (i.additionalUrl ?? (i.additionalUrl = `/patch/restore?id=${i.data.id}`), e.api != null)
2248
2252
  try {
@@ -2265,7 +2269,15 @@ function qr(e) {
2265
2269
  getAll: d,
2266
2270
  patch: u,
2267
2271
  post: r,
2268
- restore: I
2272
+ restore: x,
2273
+ //other stuff
2274
+ dataItems: t,
2275
+ count: l,
2276
+ currentTimeStampHours: S,
2277
+ filters: f,
2278
+ meta: g,
2279
+ promiseMemory: D,
2280
+ cacheLocally: C
2269
2281
  };
2270
2282
  });
2271
2283
  }
@@ -2274,7 +2286,7 @@ function Er() {
2274
2286
  return Ar;
2275
2287
  }
2276
2288
  function En(e) {
2277
- const t = (e == null ? void 0 : e.buildHeaders) ?? P, l = (e == null ? void 0 : e.buildQuery) ?? g, S = (e == null ? void 0 : e.buildUrl) ?? D, s = e == null ? void 0 : e.demo;
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;
2278
2290
  function g(u) {
2279
2291
  let r = new URLSearchParams();
2280
2292
  return Object.entries(u).forEach((y) => {
@@ -2287,16 +2299,16 @@ function En(e) {
2287
2299
  let r = Q(u.url) ?? void 0, y = Q(u.id);
2288
2300
  return r == null && (e == null ? void 0 : e.findPath) != null && (r = e.findPath(u.nav)), u.additionalUrl != null && (r == null ? r = u.additionalUrl : r = Ue(r, u.additionalUrl)), y != null && (r != null && r.includes("{id}") ? r = r.replaceAll("{id}", y) : r = Ue(r, y)), u.params != null && (r = `${r}?${l(u.params)}`), u.finalUrl = r, u.finalUrl ?? "";
2289
2301
  }
2290
- function P(u) {
2291
- var y, I;
2302
+ function C(u) {
2303
+ var y, x;
2292
2304
  let r = { ...u.headers };
2293
- return u.proxyID && (r.ManagedCompanyAccountID ?? (r.ManagedCompanyAccountID = u.proxyID)), (e == null ? void 0 : e.useBearerToken) != !1 && ((y = e == null ? void 0 : e.auth) == null ? void 0 : y.isLoggedIn.value) == !0 && (r.authorization ?? (r.authorization = `bearer ${(I = e == null ? void 0 : e.auth) == null ? void 0 : I.credentials.value.token}`)), r["Content-Type"] ?? (r["Content-Type"] = u.contentType ?? (e == null ? void 0 : e.defaultContentType) ?? "application/json"), r;
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;
2294
2306
  }
2295
2307
  async function _(u) {
2296
- const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, I = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
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;
2297
2309
  let i = u.finalUrl, E = u.headers;
2298
- if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
2299
- return console.log(`DEMO: Get from ${i}`), s.get(u);
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);
2300
2312
  console.log(`Get from ${i}`);
2301
2313
  let w;
2302
2314
  try {
@@ -2315,7 +2327,7 @@ function En(e) {
2315
2327
  let L = await w.text();
2316
2328
  throw new Error(L ?? w.statusText ?? "Get error");
2317
2329
  }
2318
- if (I)
2330
+ if (x)
2319
2331
  return await w.text();
2320
2332
  if (y)
2321
2333
  return await w.json();
@@ -2328,10 +2340,10 @@ function En(e) {
2328
2340
  }
2329
2341
  }
2330
2342
  async function M(u) {
2331
- const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, I = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
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;
2332
2344
  let i = u.finalUrl, E = u.headers;
2333
- if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
2334
- return console.log(`DEMO: Get all from ${i}`), s.getAll(u);
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);
2335
2347
  console.log(`Get all from ${i}`);
2336
2348
  let w;
2337
2349
  try {
@@ -2350,7 +2362,7 @@ function En(e) {
2350
2362
  let L = await w.text();
2351
2363
  throw new Error(L ?? w.statusText ?? "Get all error");
2352
2364
  }
2353
- if (I)
2365
+ if (x)
2354
2366
  return await w.text();
2355
2367
  if (y)
2356
2368
  return await w.json();
@@ -2363,10 +2375,10 @@ function En(e) {
2363
2375
  }
2364
2376
  }
2365
2377
  async function $(u) {
2366
- const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, I = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
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;
2367
2379
  let i = u.finalUrl, E = u.headers;
2368
- if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
2369
- return console.log(`DEMO: Post to ${i}`), s.post(u);
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);
2370
2382
  console.log(`Post to ${i}`);
2371
2383
  let w;
2372
2384
  try {
@@ -2386,7 +2398,7 @@ function En(e) {
2386
2398
  let L = await w.text();
2387
2399
  throw new Error(L ?? w.statusText ?? "Post error!");
2388
2400
  }
2389
- if (I)
2401
+ if (x)
2390
2402
  return await w.text();
2391
2403
  if (y)
2392
2404
  return await w.json();
@@ -2399,10 +2411,10 @@ function En(e) {
2399
2411
  }
2400
2412
  }
2401
2413
  async function d(u) {
2402
- const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, I = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
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;
2403
2415
  let i = u.finalUrl, E = u.headers;
2404
- if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
2405
- return console.log(`DEMO: Patch to ${i}`), s.patch(u);
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);
2406
2418
  console.log(`Patch to ${i}`);
2407
2419
  let w;
2408
2420
  try {
@@ -2422,7 +2434,7 @@ function En(e) {
2422
2434
  let L = await w.text();
2423
2435
  throw new Error(L ?? w.statusText ?? "Patch error!");
2424
2436
  }
2425
- if (I)
2437
+ if (x)
2426
2438
  return await w.text();
2427
2439
  if (y)
2428
2440
  return await w.json();
@@ -2436,9 +2448,9 @@ function En(e) {
2436
2448
  }
2437
2449
  async function h(u) {
2438
2450
  const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0;
2439
- let y = u.finalUrl, I = u.headers;
2440
- if (y == null && (y = S(u)), u.overrideHeaders !== !0 && (I = t(u)), s != null && s.isDemoing.value)
2441
- return console.log(`DEMO: Delete ${y}`), s.deleteItem(u);
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);
2442
2454
  console.log(`Delete ${y}`);
2443
2455
  let i;
2444
2456
  try {
@@ -2446,7 +2458,7 @@ function En(e) {
2446
2458
  method: "DELETE",
2447
2459
  mode: "cors",
2448
2460
  cache: "no-cache",
2449
- headers: I,
2461
+ headers: x,
2450
2462
  body: JSON.stringify(u.data)
2451
2463
  }), i.status == 401)
2452
2464
  throw {
@@ -2474,18 +2486,18 @@ function En(e) {
2474
2486
  }, Ar;
2475
2487
  }
2476
2488
  function ut(e) {
2477
- const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors: S, isLoading: s, doAction: g, logError: D } = en(e);
2478
- function P(r) {
2489
+ const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors: S, isLoading: f, doAction: g, logError: D } = en(e);
2490
+ function C(r) {
2479
2491
  r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to delete this item?" : void 0);
2480
2492
  let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2481
- const I = (e == null ? void 0 : e.items) ?? [];
2493
+ const x = (e == null ? void 0 : e.items) ?? [];
2482
2494
  return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null ? r.onDeleteAsync ?? (r.onDeleteAsync = () => y().deleteItem(r)) : r.onDeleteAsync ?? (r.onDeleteAsync = () => {
2483
2495
  var w;
2484
2496
  const i = r.id ?? ((w = r.data) == null ? void 0 : w.id);
2485
2497
  if (i == null)
2486
2498
  return Promise.resolve("No id found in delete action");
2487
- const E = I.findIndex((L) => L.id == i);
2488
- return E >= 0 && I.splice(E, 1), Promise.resolve(void 0);
2499
+ const E = x.findIndex((L) => L.id == i);
2500
+ return E >= 0 && x.splice(E, 1), Promise.resolve(void 0);
2489
2501
  }), g(async () => {
2490
2502
  let i;
2491
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);
@@ -2501,11 +2513,11 @@ function ut(e) {
2501
2513
  function _(r) {
2502
2514
  r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to get this item?" : void 0);
2503
2515
  let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2504
- const I = (e == null ? void 0 : e.items) ?? [];
2516
+ const x = (e == null ? void 0 : e.items) ?? [];
2505
2517
  return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null ? r.onGetAsync ?? (r.onGetAsync = async () => (await y().get(r)).data) : r.onGetAsync ?? (r.onGetAsync = () => {
2506
2518
  var E;
2507
2519
  const i = r.id ?? ((E = r.data) == null ? void 0 : E.id);
2508
- return i == null ? Promise.resolve(void 0) : Promise.resolve(I.find((w) => w.id == i));
2520
+ return i == null ? Promise.resolve(void 0) : Promise.resolve(x.find((w) => w.id == i));
2509
2521
  }), g(async () => {
2510
2522
  let i;
2511
2523
  return r.onGetAsync != null && (i = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (i = await r.onGetSuccessAsync(i, r)), i;
@@ -2521,8 +2533,8 @@ function ut(e) {
2521
2533
  function M(r) {
2522
2534
  r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to get these items?" : void 0);
2523
2535
  let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2524
- const I = (e == null ? void 0 : e.items) ?? [];
2525
- return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null ? r.onGetAsync ?? (r.onGetAsync = () => y().getAll(r)) : r.onGetAsync ?? (r.onGetAsync = () => Promise.resolve(I)), g(async () => {
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 () => {
2526
2538
  let i;
2527
2539
  return r.onGetAsync != null && (i = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (i = await r.onGetSuccessAsync(i, r)), i;
2528
2540
  }, {
@@ -2538,8 +2550,8 @@ function ut(e) {
2538
2550
  r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to restore this item?" : void 0);
2539
2551
  let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2540
2552
  return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null && (r.onRestoreAsync ?? (r.onRestoreAsync = () => y().restore(r))), g(async () => {
2541
- let I, i;
2542
- return r.onCanRestoreAsync != null && (I = await r.onCanRestoreAsync(r.data)), I == null && r.onRestoreAsync != null && (i = await r.onRestoreAsync(r.data)), i != null && r.onRestoreSuccessAsync != null && await r.onRestoreSuccessAsync(i), D(I), i;
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;
2543
2555
  }, {
2544
2556
  completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
2545
2557
  confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
@@ -2552,13 +2564,13 @@ function ut(e) {
2552
2564
  function d(r) {
2553
2565
  r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to save this item?" : void 0);
2554
2566
  let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2555
- const I = (e == null ? void 0 : e.items) ?? [];
2567
+ const x = (e == null ? void 0 : e.items) ?? [];
2556
2568
  return r.onGetSaveAsync ?? (r.onGetSaveAsync = (i) => i), r.onCanSaveAsync ?? (r.onCanSaveAsync = () => Promise.resolve(void 0)), y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null ? r.onSaveAsync ?? (r.onSaveAsync = async () => {
2557
2569
  var i;
2558
2570
  return r.mode ?? (r.mode = ((i = r.data) == null ? void 0 : i.id) == null ? "new" : "edit"), r.mode == "new" ? await y().post(r) : await y().patch(r);
2559
2571
  }) : r.onSaveAsync ?? (r.onSaveAsync = (i) => {
2560
- const E = I.findIndex((w) => w.id == i.id);
2561
- return E >= 0 ? I.splice(E, 1, i) : I.push(i), Promise.resolve(i);
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);
2562
2574
  }), g(async () => {
2563
2575
  let i;
2564
2576
  if (r.onGetSaveAsync != null && (i = await r.onGetSaveAsync(r.data)), i == null)
@@ -2591,11 +2603,11 @@ function ut(e) {
2591
2603
  apiGet: h,
2592
2604
  apiPost: u,
2593
2605
  clearErrors: S,
2594
- deleteItem: P,
2606
+ deleteItem: C,
2595
2607
  doAction: g,
2596
2608
  getAllItems: M,
2597
2609
  getItem: _,
2598
- isLoading: s,
2610
+ isLoading: f,
2599
2611
  logError: D,
2600
2612
  restoreItem: $,
2601
2613
  saveItem: d
@@ -2613,19 +2625,19 @@ function Dn(e) {
2613
2625
  function S() {
2614
2626
  l.value = Math.random().toString(36).substring(4, 19) + Math.random().toString(12).substring(1, 11), localStorage.setItem(Hr, l.value);
2615
2627
  }
2616
- const s = Zt("auth-credentials", {});
2617
- function g(x) {
2618
- if (x == null)
2628
+ const f = Zt("auth-credentials", {});
2629
+ function g(I) {
2630
+ if (I == null)
2619
2631
  return !0;
2620
- var N = e.getAuthItem != null ? e.getAuthItem(x) : null;
2632
+ var N = e.getAuthItem != null ? e.getAuthItem(I) : null;
2621
2633
  if (N == null)
2622
2634
  return !1;
2623
2635
  if (N.requiresAuth === !1)
2624
2636
  return !0;
2625
- const f = Q(s);
2626
- if (f.isSuspended && N.ignoreSuspension !== !0)
2637
+ const s = Q(f);
2638
+ if (s.isSuspended && N.ignoreSuspension !== !0)
2627
2639
  return !1;
2628
- if (f.isGlobalAdmin)
2640
+ if (s.isGlobalAdmin)
2629
2641
  return !0;
2630
2642
  if (N.permissions != null) {
2631
2643
  for (var A = 0; A < N.permissions.length; A++)
@@ -2634,28 +2646,28 @@ function Dn(e) {
2634
2646
  }
2635
2647
  return !0;
2636
2648
  }
2637
- function D(x) {
2638
- const N = Q(s);
2649
+ function D(I) {
2650
+ const N = Q(f);
2639
2651
  if (N.userPermissions != null)
2640
- for (var f = 0; f < N.userPermissions.length; f++) {
2641
- var A = N.userPermissions[f].split(".");
2642
- if (N.userPermissions[f] == "everything.edit" || x == A[0] && A.length > 1 && A[1] == "edit")
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")
2643
2655
  return !0;
2644
2656
  }
2645
2657
  return !1;
2646
2658
  }
2647
- function P(x) {
2648
- if (x == null)
2659
+ function C(I) {
2660
+ if (I == null)
2649
2661
  return !0;
2650
- var N = e.getAuthItem != null ? e.getAuthItem(x) : null;
2662
+ var N = e.getAuthItem != null ? e.getAuthItem(I) : null;
2651
2663
  if (N == null)
2652
2664
  return !1;
2653
2665
  if (N.requiresAuth === !1)
2654
2666
  return !0;
2655
- const f = Q(s);
2656
- if (f.isSuspended && N.ignoreSuspension !== !0)
2667
+ const s = Q(f);
2668
+ if (s.isSuspended && N.ignoreSuspension !== !0)
2657
2669
  return !1;
2658
- if (f.isGlobalAdmin)
2670
+ if (s.isGlobalAdmin)
2659
2671
  return !0;
2660
2672
  if (N.permissions != null) {
2661
2673
  for (var A = 0; A < N.permissions.length; A++)
@@ -2664,142 +2676,142 @@ function Dn(e) {
2664
2676
  }
2665
2677
  return !0;
2666
2678
  }
2667
- function _(x) {
2668
- const N = Q(s);
2679
+ function _(I) {
2680
+ const N = Q(f);
2669
2681
  if (N.userPermissions != null)
2670
- for (var f = 0; f < N.userPermissions.length; f++) {
2671
- var A = N.userPermissions[f].split(".");
2672
- if (x == A[0] || x == "everything" || N.userPermissions[f] == "everything.view" || N.userPermissions[f] == "everything.edit")
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")
2673
2685
  return !0;
2674
2686
  }
2675
2687
  return !1;
2676
2688
  }
2677
- function M(x, N, f) {
2689
+ function M(I, N, s) {
2678
2690
  let A = !0;
2679
- return Q(s).isGlobalAdmin ? !0 : (N != null && N.length > 0 && N.forEach((X) => {
2680
- f == "edit" ? D(X) || (A = !1) : _(X) || (A = !1);
2681
- }), x != null && x.length > 0 && (x.some((X) => u(X)) || (A = !1)), A);
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);
2682
2694
  }
2683
- function $(x, N = !1) {
2684
- var f = e.getAuthItem != null ? e.getAuthItem(x) : null;
2695
+ function $(I, N = !1) {
2696
+ var s = e.getAuthItem != null ? e.getAuthItem(I) : null;
2685
2697
  let A = !1;
2686
- if (f == null)
2698
+ if (s == null)
2687
2699
  return !1;
2688
- let j = f.subscriptions ?? [], X = f.permissions ?? [], re = M(j, X, "view");
2689
- return re || !N || !_e(f.children) ? re : ((f == null ? void 0 : f.children) != null && f.children.forEach((ue) => {
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) => {
2690
2702
  $(ue, !0) && (A = !0);
2691
2703
  }), A);
2692
2704
  }
2693
- function d(x) {
2694
- return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (N, f) => {
2695
- const A = Ue(Wr(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${f}`);
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}`);
2696
2708
  return N ? `${A}&redirect_path=${N}` : A;
2697
- }), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(x, l.value) ?? "" : "";
2709
+ }), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(I, l.value) ?? "" : "";
2698
2710
  }
2699
- function h(x) {
2700
- var f;
2701
- return x == null ? 0 : ((f = (e.subscriptionOptions ?? []).find((A) => A.code == x)) == null ? void 0 : f.value) ?? 0;
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;
2702
2714
  }
2703
- function u(x) {
2704
- const N = Q(s);
2715
+ function u(I) {
2716
+ const N = Q(f);
2705
2717
  if (N.subscriptionCode == null)
2706
2718
  return !1;
2707
- if (N.subscriptionCode == x)
2719
+ if (N.subscriptionCode == I)
2708
2720
  return !0;
2709
- const f = h(x), A = h(N.subscriptionCode);
2710
- return f <= A;
2721
+ const s = h(I), A = h(N.subscriptionCode);
2722
+ return s <= A;
2711
2723
  }
2712
- function r(x) {
2713
- const f = x.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), A = decodeURIComponent(
2714
- atob(f).split("").map(function(j) {
2724
+ function r(I) {
2725
+ const s = I.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), A = decodeURIComponent(
2726
+ atob(s).split("").map(function(j) {
2715
2727
  return "%" + ("00" + j.charCodeAt(0).toString(16)).slice(-2);
2716
2728
  }).join("")
2717
2729
  );
2718
2730
  return JSON.parse(A);
2719
2731
  }
2720
- function y(x, N) {
2721
- s.value = void 0, L(), x != null && N != null && N.currentRoute.value.path != x && N.push({ path: x });
2732
+ function y(I, N) {
2733
+ f.value = void 0, L(), I != null && N != null && N.currentRoute.value.path != I && N.push({ path: I });
2722
2734
  }
2723
- function I(x) {
2724
- var f;
2725
- Q(s).isLoggedIn || ((f = e.demo) == null || f.endDemo(), T() && (y(), window.location.href = d(x)));
2735
+ function x(I) {
2736
+ var s;
2737
+ Q(f).isLoggedIn || ((s = e.demo) == null || s.endDemo(), T() && (y(), window.location.href = d(I)));
2726
2738
  }
2727
- async function i(x, N) {
2739
+ async function i(I, N) {
2728
2740
  return e.getToken ?? (e.getToken = async () => {
2729
- let f = x, A = N, j = e.oauthGrantType ?? "authorization_token", X = e.oauthClientID ?? "";
2730
- if (f == null || A == null)
2741
+ let s = I, A = N, j = e.oauthGrantType ?? "authorization_token", X = e.oauthClientID ?? "";
2742
+ if (s == null || A == null)
2731
2743
  throw new Error("Code and State required in OAuth token process");
2732
2744
  if (A != l.value)
2733
2745
  throw new Error("state does not match");
2734
2746
  let re = "";
2735
- e.getTokenUrl ?? (e.getTokenUrl = () => Ue(Wr(), "token")), re = e.getTokenUrl(f, `${window.location.origin}/authentication`, j, X);
2747
+ e.getTokenUrl ?? (e.getTokenUrl = () => Ue(Wr(), "token")), re = e.getTokenUrl(s, `${window.location.origin}/authentication`, j, X);
2736
2748
  const ue = {};
2737
- ue.grant_type = j, ue.code = f, ue.redirect_uri = `${window.location.origin}/authentication`, ue.client_id = X;
2749
+ ue.grant_type = j, ue.code = s, ue.redirect_uri = `${window.location.origin}/authentication`, ue.client_id = X;
2738
2750
  const G = await Er().post({
2739
2751
  additionalUrl: re,
2740
2752
  data: ue
2741
2753
  });
2742
2754
  E(G.access_token);
2743
- }), await e.getToken(x, N);
2755
+ }), await e.getToken(I, N);
2744
2756
  }
2745
- function E(x) {
2746
- if (x != null && (e.demo == null || !e.demo.isDemoing.value)) {
2747
- const N = r(x);
2748
- w(N, x), e.processTokenPayload != null && e.processTokenPayload(s, N);
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);
2749
2761
  }
2750
2762
  }
2751
- function w(x, N) {
2763
+ function w(I, N) {
2752
2764
  var A;
2753
- const f = s.value;
2754
- f.expiresOn = x.ExpiresOn, f.isGlobalAdmin = x.IsGlobalAdmin == "True", f.isLoggedIn = !0, f.permissions = x.Permissions, f.subscriptionCode = x.Subscription, f.timeZone ?? (f.timeZone = e.defaultTimeZone ?? hr), f.token = N, f.userID = x.UserLoginID, f.userPermissions = ((A = x.Permissions) == null ? void 0 : A.split(",")) ?? [];
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(",")) ?? [];
2755
2767
  }
2756
2768
  function L() {
2757
- var x;
2758
- s.value ?? (s.value = {}), (x = s.value).timeZone ?? (x.timeZone = e.defaultTimeZone ?? hr);
2769
+ var I;
2770
+ f.value ?? (f.value = {}), (I = f.value).timeZone ?? (I.timeZone = e.defaultTimeZone ?? hr);
2759
2771
  }
2760
2772
  function b() {
2761
- const x = Q(s);
2762
- return x.isLoggedIn && T() && (y(), window.location.href = d()), x.isLoggedIn;
2773
+ const I = Q(f);
2774
+ return I.isLoggedIn && T() && (y(), window.location.href = d()), I.isLoggedIn;
2763
2775
  }
2764
2776
  function T() {
2765
- const x = Q(s);
2766
- if (x == null || x.expiresOn == null)
2777
+ const I = Q(f);
2778
+ if (I == null || I.expiresOn == null)
2767
2779
  return !0;
2768
- const N = he.fromFormat(x.expiresOn, t), f = he.utc();
2769
- return N <= f;
2780
+ const N = he.fromFormat(I.expiresOn, t), s = he.utc();
2781
+ return N <= s;
2770
2782
  }
2771
2783
  return L(), Ir = {
2772
2784
  authState: l,
2773
2785
  canEdit: g,
2774
2786
  canEditPermit: D,
2775
- canView: P,
2787
+ canView: C,
2776
2788
  canViewPermit: _,
2777
- credentials: s,
2789
+ credentials: f,
2778
2790
  doShow: M,
2779
2791
  doShowByNav: $,
2780
2792
  getAuthorizeUrl: d,
2781
2793
  getToken: i,
2782
- isLoggedIn: ee(() => s.value.isLoggedIn === !0),
2783
- login: I,
2794
+ isLoggedIn: ee(() => f.value.isLoggedIn === !0),
2795
+ login: x,
2784
2796
  logout: y,
2785
2797
  resetAuthState: S,
2786
2798
  setAuth: E,
2787
- timeZone: ee(() => s.value.timeZone ?? e.defaultTimeZone ?? hr),
2799
+ timeZone: ee(() => f.value.timeZone ?? e.defaultTimeZone ?? hr),
2788
2800
  tryLogin: b
2789
2801
  }, Ir;
2790
2802
  }
2791
2803
  function xn(e, t, l = {}) {
2792
2804
  const {
2793
2805
  preventDefault: S = !1,
2794
- stopPropagation: s = !1,
2806
+ stopPropagation: f = !1,
2795
2807
  axis: g = "both"
2796
2808
  } = l, D = { capture: l.capture ?? !0 };
2797
- let P = { x: 0, y: 0 }, _ = { x: 0, y: 0 }, M = { x: 0, y: 0 }, $ = [], d = [], h = z(!1);
2809
+ let C = { x: 0, y: 0 }, _ = { x: 0, y: 0 }, M = { x: 0, y: 0 }, $ = [], d = [], h = z(!1);
2798
2810
  function u(L) {
2799
- Q(S) && L.preventDefault(), Q(s) && L.stopPropagation();
2811
+ Q(S) && L.preventDefault(), Q(f) && L.stopPropagation();
2800
2812
  }
2801
2813
  function r(L) {
2802
- var f;
2814
+ var s;
2803
2815
  const b = Q(e);
2804
2816
  if (!b)
2805
2817
  return;
@@ -2807,24 +2819,24 @@ function xn(e, t, l = {}) {
2807
2819
  M = { x: N.clientX, y: N.clientY }, _ = {
2808
2820
  x: T.offsetLeft,
2809
2821
  y: T.offsetTop
2810
- }, P = {
2822
+ }, C = {
2811
2823
  x: T.offsetLeft,
2812
2824
  y: T.offsetTop
2813
- }, ((f = l.onStart) == null ? void 0 : f.call(l, M, L)) !== !1 && (d.push(me("mousemove", y)), d.push(me("touchmove", y)), d.push(me("mouseup", I)), d.push(me("touchend", I)), u(L));
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));
2814
2826
  }
2815
2827
  function y(L) {
2816
2828
  var A;
2817
2829
  if (!M || !Q(e))
2818
2830
  return;
2819
- const x = L.type === "touchmove" && L.touches.length > 0 ? L.touches[0] : L;
2820
- let N = x.clientX - M.x, f = x.clientY - M.y;
2821
- (g === "x" || g === "both") && (P.x = _.x + N), (g === "y" || g === "both") && (P.y = _.y + f), (A = l.onMove) == null || A.call(l, P, L), u(L), i(P);
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);
2822
2834
  }
2823
- function I(L) {
2835
+ function x(L) {
2824
2836
  var b;
2825
2837
  document.documentElement.style.cursor = "", d.forEach((T) => {
2826
2838
  T();
2827
- }), d.length = 0, (b = l.onEnd) == null || b.call(l, P, L), u(L);
2839
+ }), d.length = 0, (b = l.onEnd) == null || b.call(l, C, L), u(L);
2828
2840
  }
2829
2841
  function i(L) {
2830
2842
  const b = Q(e);
@@ -2861,23 +2873,23 @@ function xn(e, t, l = {}) {
2861
2873
  }
2862
2874
  const Tn = ["t", "r", "b", "l", "tr", "br", "bl", "tl"];
2863
2875
  function _n(e, t = {}) {
2864
- let l, S = t.handleWidth ?? 12, s = t.handleZIndex ?? 100, g = t.minWidth ?? 0, D = t.maxWidth ?? Number.MAX_SAFE_INTEGER, P = t.minHeight ?? 0, _ = t.maxHeight ?? Number.MAX_SAFE_INTEGER, M = t.preventDefault ?? !1, $ = t.stopPropagation ?? !1, d, h = [];
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 = [];
2865
2877
  const u = z(!1);
2866
2878
  let r = [], y = [];
2867
- const I = z(!1), i = z({ x: 0, y: 0 });
2879
+ const x = z(!1), i = z({ x: 0, y: 0 });
2868
2880
  let E = { left: 0, top: 0, height: 0, width: 0, position: "absolute" }, w = {};
2869
2881
  function L(G) {
2870
2882
  Ee(M) && G.preventDefault(), Ee($) && G.stopPropagation();
2871
2883
  }
2872
2884
  function b(G, Y) {
2873
- h = Y.map(x), h.forEach((H) => G.$el.appendChild(H));
2885
+ h = Y.map(I), h.forEach((H) => G.$el.appendChild(H));
2874
2886
  }
2875
2887
  function T(G) {
2876
2888
  h.forEach((Y) => G.$el.removeChild(Y));
2877
2889
  }
2878
- function x(G) {
2879
- const Y = S + "px", H = -S / 2 + "px", ie = s + 1, Z = document.createElement("div");
2880
- return Z.dataset.handle = G, Z.style.position = "absolute", Z.style.touchAction = "none", Z.style.userSelect = "none", Z.style.zIndex = (G.length === 1 ? s : ie).toString(), Z.style.cursor = j(G), G.includes("t") && (Z.style.top = H, Z.style.height = Y, G === "t" && (Z.style.left = "0", Z.style.width = "100%")), G.includes("b") && (Z.style.bottom = H, Z.style.height = Y, G === "b" && (Z.style.left = "0", Z.style.width = "100%")), G.includes("r") && (Z.style.right = H, Z.style.width = Y, G === "r" && (Z.style.top = "0", Z.style.height = "100%")), G.includes("l") && (Z.style.left = H, Z.style.width = Y, G === "l" && (Z.style.top = "0", Z.style.height = "100%")), Z;
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;
2881
2893
  }
2882
2894
  function N(G) {
2883
2895
  var ne;
@@ -2895,9 +2907,9 @@ function _n(e, t = {}) {
2895
2907
  }, w = Nr(E), ((ne = t.onStart) == null ? void 0 : ne.call(t, i.value, G)) === !1)
2896
2908
  return;
2897
2909
  let W = G.target;
2898
- document.documentElement.style.cursor = j(W.dataset.handle), d = W.dataset.handle, y.push(me("mousemove", f)), y.push(me("mouseup", A)), y.push(me("touchmove", f)), y.push(me("touchend", A)), L(G);
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);
2899
2911
  }
2900
- function f(G) {
2912
+ function s(G) {
2901
2913
  const Y = Ee(e);
2902
2914
  if (!Y)
2903
2915
  return;
@@ -2905,11 +2917,11 @@ function _n(e, t = {}) {
2905
2917
  let W = Z.clientX - i.value.x, ne = Z.clientY - i.value.y;
2906
2918
  const ce = Ee(E);
2907
2919
  if (d.includes("t")) {
2908
- const se = Math.min(_, Math.max(P, (ce.height ?? 0) - ne));
2920
+ const se = Math.min(_, Math.max(C, (ce.height ?? 0) - ne));
2909
2921
  w.height = se, w.top = (ce.top ?? 0) + ne;
2910
2922
  }
2911
2923
  if (d.includes("b")) {
2912
- const se = Math.min(_, Math.max(P, (ce.height ?? 0) + ne));
2924
+ const se = Math.min(_, Math.max(C, (ce.height ?? 0) + ne));
2913
2925
  w.height = se;
2914
2926
  }
2915
2927
  if (d.includes("l")) {
@@ -2991,33 +3003,33 @@ function _n(e, t = {}) {
2991
3003
  G.top ? H.style.top = `${G.top}px` : H.style.top = void 0, G.left ? H.style.left = `${G.left}px` : H.style.left = void 0, G.height ? H.style.height = `${G.height}px` : H.style.height = void 0, G.width ? H.style.width = `${G.width}px` : H.style.width = void 0, G.position ? H.style.position = `${G.position}` : H.style.position = void 0, console.log(H.style.position);
2992
3004
  }
2993
3005
  function ue(G, Y) {
2994
- if (I.value)
3006
+ if (x.value)
2995
3007
  return;
2996
3008
  const H = Ee(e);
2997
- H && (b(H, G ?? Tn), X(Y), r.push(me(H.$el, "mousedown", N)), r.push(me(H.$el, "touchstart", N)), I.value = !0, l = Y);
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);
2998
3010
  }
2999
3011
  function be(G) {
3000
- if (!I.value)
3012
+ if (!x.value)
3001
3013
  return;
3002
3014
  const Y = Ee(e);
3003
3015
  Y && (T(Y), X(G), r.forEach((H) => {
3004
3016
  H();
3005
- }), r.length = 0, I.value = !1);
3017
+ }), r.length = 0, x.value = !1);
3006
3018
  }
3007
3019
  return {
3008
- resizingIsOn: I,
3020
+ resizingIsOn: x,
3009
3021
  turnResizingOn: ue,
3010
3022
  turnResizingOff: be
3011
3023
  };
3012
3024
  }
3013
3025
  function Cn(e) {
3014
- const t = (e == null ? void 0 : e.blade) ?? z(null), l = (e == null ? void 0 : e.handle) ?? z(null), S = z(!1), s = (e == null ? void 0 : e.mobileBreakpoint) ?? 500, g = z((e == null ? void 0 : e.defaultVariant) ?? "page"), D = z({}), { turnResizingOff: P, turnResizingOn: _ } = _n(t), { turnDraggableOff: M, turnDraggableOn: $ } = xn(t, l);
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);
3015
3027
  jt(t, (h) => {
3016
3028
  const u = h[0], { width: r } = u.contentRect;
3017
- S.value = r < s;
3029
+ S.value = r < f;
3018
3030
  });
3019
3031
  function d(h) {
3020
- M(), h == "page" ? P(h) : h == "blade" ? _(["l", "r"], h) : h == "freestyle" ? (P(), _(void 0, h), $()) : h == "inline" && P();
3032
+ M(), h == "page" ? C(h) : h == "blade" ? _(["l", "r"], h) : h == "freestyle" ? (C(), _(void 0, h), $()) : h == "inline" && C();
3021
3033
  }
3022
3034
  return d(g.value), Te(g, (h) => d(h)), {
3023
3035
  isMobile: S,
@@ -3074,7 +3086,7 @@ function Pn(e) {
3074
3086
  drawerStick: e.defaultDrawerStick ?? !1
3075
3087
  };
3076
3088
  }
3077
- function s() {
3089
+ function f() {
3078
3090
  localStorage.setItem("cosmetics", JSON.stringify(t.value));
3079
3091
  }
3080
3092
  function g(d) {
@@ -3099,7 +3111,7 @@ function Pn(e) {
3099
3111
  u.colors.primary = d, r.colors.primary = d, (h = document.querySelector('meta[name="theme-color"]')) == null || h.setAttribute("content", d);
3100
3112
  }
3101
3113
  }
3102
- function P() {
3114
+ function C() {
3103
3115
  t.value.drawer = !t.value.drawer;
3104
3116
  }
3105
3117
  function _() {
@@ -3116,12 +3128,12 @@ function Pn(e) {
3116
3128
  }
3117
3129
  }
3118
3130
  return S(), Te(t, () => {
3119
- s();
3131
+ f();
3120
3132
  }), Dr = {
3121
3133
  state: t,
3122
3134
  resetCosmetics: g,
3123
3135
  setTemporaryColor: D,
3124
- toggleDrawer: P,
3136
+ toggleDrawer: C,
3125
3137
  toggleDrawerStick: _,
3126
3138
  toggleLightDark: M,
3127
3139
  undoTemporaryColor: $
@@ -3135,35 +3147,35 @@ function Mn() {
3135
3147
  const {
3136
3148
  items: l,
3137
3149
  headers: S,
3138
- fileName: s = "data.csv",
3150
+ fileName: f = "data.csv",
3139
3151
  format: g = "file"
3140
3152
  } = t;
3141
3153
  if (!_e(l))
3142
3154
  return;
3143
3155
  let D = [];
3144
- S != null ? D = S == null ? void 0 : S.filter((I) => (I.csv ?? I.csvText ?? I.csvFilter ?? I.csvArray) != null).map((I) => ({
3145
- header: I.title ?? I.value ?? "",
3146
- itemText: I.itemText,
3147
- value: I.value
3148
- })) : D = Object.keys(l[0]).map((I) => ({ header: tn(I) ?? "", value: I })), D = D.filter((I) => I.header.length > 0);
3149
- var P = [];
3150
- for (let I = 0; I < l.length; I++) {
3151
- const i = l[I];
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);
3161
+ var C = [];
3162
+ for (let x = 0; x < l.length; x++) {
3163
+ const i = l[x];
3152
3164
  var _ = {}, M = [];
3153
3165
  for (let E = 0; E < D.length; E++) {
3154
3166
  const w = D[E];
3155
3167
  var $ = null;
3156
3168
  typeof w.value == "function" ? $ = w.value(i) : typeof w.value == "string" && ($ = Sr(i, w.value)), w.itemText != null ? _[w.header] = Sr($, w.itemText) : _[w.header] = $;
3157
3169
  }
3158
- P.push(_), _e(M) && M.forEach((E) => {
3159
- P.push(E);
3170
+ C.push(_), _e(M) && M.forEach((E) => {
3171
+ C.push(E);
3160
3172
  }), M = [];
3161
3173
  }
3162
3174
  var d = [];
3163
- if (d.push(D.map((I) => I.header).toString()), P.forEach((I) => {
3175
+ if (d.push(D.map((x) => x.header).toString()), C.forEach((x) => {
3164
3176
  let i = [];
3165
3177
  D.forEach(function(E) {
3166
- var w = I[E.header];
3178
+ var w = x[E.header];
3167
3179
  i.push(w ?? "");
3168
3180
  }), d.push(i.join(","));
3169
3181
  }), g == "array")
@@ -3171,10 +3183,10 @@ function Mn() {
3171
3183
  var h = d.join(`
3172
3184
  `), u = new Blob([h], { type: "text/plain;charset=utf-8" });
3173
3185
  if (window.navigator.msSaveOrOpenBlob)
3174
- window.navigator.msSaveOrOpenBlob(u, s);
3186
+ window.navigator.msSaveOrOpenBlob(u, f);
3175
3187
  else {
3176
3188
  var r = document.createElement("a"), y = URL.createObjectURL(u);
3177
- r.href = y, r.download = s, document.body.appendChild(r), r.click(), setTimeout(function() {
3189
+ r.href = y, r.download = f, document.body.appendChild(r), r.click(), setTimeout(function() {
3178
3190
  document.body.removeChild(r), window.URL.revokeObjectURL(y);
3179
3191
  }, 0);
3180
3192
  }
@@ -3190,12 +3202,12 @@ function ba() {
3190
3202
  function Ln(e) {
3191
3203
  const t = e.getUTC ?? he.utc;
3192
3204
  function l() {
3193
- return s().startOf("day").toUTC().toString() ?? "";
3205
+ return f().startOf("day").toUTC().toString() ?? "";
3194
3206
  }
3195
3207
  function S() {
3196
- return s().startOf("day").plus({ day: 1 }).toUTC().toString() ?? "";
3208
+ return f().startOf("day").plus({ day: 1 }).toUTC().toString() ?? "";
3197
3209
  }
3198
- function s(_, M) {
3210
+ function f(_, M) {
3199
3211
  return _ == null ? t().setZone(e.getTimeZone()) : M ? he.fromFormat(_, M, { zone: e.getTimeZone() }) : he.fromISO(_, { zone: e.getTimeZone() });
3200
3212
  }
3201
3213
  function g(_, M, $) {
@@ -3211,7 +3223,7 @@ function Ln(e) {
3211
3223
  function D(_, M) {
3212
3224
  return _ == null ? t() : M ? he.fromFormat(_, M) : he.fromISO(_);
3213
3225
  }
3214
- function P(_, M, $) {
3226
+ function C(_, M, $) {
3215
3227
  if (_ == null)
3216
3228
  return M ? t().toFormat(M) : t().toString();
3217
3229
  {
@@ -3222,10 +3234,10 @@ function Ln(e) {
3222
3234
  return xr = {
3223
3235
  getToday: l,
3224
3236
  getTomorrow: S,
3225
- tzDate: s,
3237
+ tzDate: f,
3226
3238
  tzString: g,
3227
3239
  utcDate: D,
3228
- utcString: P
3240
+ utcString: C
3229
3241
  }, xr;
3230
3242
  }
3231
3243
  let Tr;
@@ -3237,7 +3249,7 @@ function Nn(e) {
3237
3249
  function S() {
3238
3250
  t.value = !0;
3239
3251
  }
3240
- function s() {
3252
+ function f() {
3241
3253
  t.value = !1;
3242
3254
  }
3243
3255
  function g(d) {
@@ -3254,7 +3266,7 @@ function Nn(e) {
3254
3266
  return Promise.resolve("no demo data available for this api");
3255
3267
  const h = d.id ?? ((r = d.data) == null ? void 0 : r.id), u = g(d);
3256
3268
  if (h != null && (u == null ? void 0 : u.data) != null) {
3257
- const y = u.data.findIndex((I) => I.id == h);
3269
+ const y = u.data.findIndex((x) => x.id == h);
3258
3270
  y >= 0 && u.data.splice(y, 1);
3259
3271
  }
3260
3272
  return new Promise(function(y) {
@@ -3263,13 +3275,13 @@ function Nn(e) {
3263
3275
  }, 200);
3264
3276
  });
3265
3277
  }
3266
- function P(d) {
3267
- var y, I, i;
3278
+ function C(d) {
3279
+ var y, x, i;
3268
3280
  if (l == null)
3269
3281
  throw new Error("no demo data available for this api");
3270
3282
  const h = d.id ?? ((y = d.data) == null ? void 0 : y.id), u = g(d);
3271
3283
  let r;
3272
- return u != null && (u.data ?? (u.data = []), u.getAction != null ? r = u.getAction(u.data, h) : h != null ? r = (I = u.data) == null ? void 0 : I.find((E) => E.id == h) : u.path != null && ((i = u.data) == null ? void 0 : i.length) == 1 && (r = u.data[0])), r == null ? Promise.resolve(void 0) : new Promise((E) => {
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) => {
3273
3285
  setTimeout(() => {
3274
3286
  E({
3275
3287
  data: r
@@ -3298,9 +3310,9 @@ function Nn(e) {
3298
3310
  throw new Error("no demo data available for this api");
3299
3311
  const h = g(d);
3300
3312
  let u;
3301
- return h != null && (h.data ?? (h.data = []), h.postAction != null ? u = h.postAction(h.data, d.data) : d.data != null && (d.data.id == null && (d.data.id = ((((r = h.data) == null ? void 0 : r.length) ?? 0) + 1).toString()), u = d.data, (y = h.data) == null || y.push(u))), u == null ? Promise.resolve(void 0) : new Promise((I) => {
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) => {
3302
3314
  setTimeout(() => {
3303
- I({
3315
+ x({
3304
3316
  data: u
3305
3317
  });
3306
3318
  });
@@ -3316,25 +3328,25 @@ function Nn(e) {
3316
3328
  if (h.data ?? (h.data = []), h.patchAction != null)
3317
3329
  u = h.patchAction(h.data, d.data);
3318
3330
  else if (d.data.id != null) {
3319
- const I = (r = h.data) == null ? void 0 : r.findIndex((i) => i.id == d.data.id);
3320
- I != null && I > -1 && ((y = h.data) == null || y.splice(I, 1, d.data)), u = d.data;
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;
3321
3333
  }
3322
3334
  }
3323
- return u == null ? Promise.resolve(void 0) : new Promise((I) => {
3335
+ return u == null ? Promise.resolve(void 0) : new Promise((x) => {
3324
3336
  setTimeout(() => {
3325
- I({
3337
+ x({
3326
3338
  data: u
3327
3339
  });
3328
3340
  });
3329
3341
  });
3330
3342
  }
3331
3343
  return Tr = {
3332
- endDemo: s,
3344
+ endDemo: f,
3333
3345
  isDemoing: t,
3334
3346
  startDemo: S,
3335
3347
  data: l,
3336
3348
  deleteItem: D,
3337
- get: P,
3349
+ get: C,
3338
3350
  getAll: _,
3339
3351
  post: M,
3340
3352
  patch: $
@@ -3343,14 +3355,14 @@ function Nn(e) {
3343
3355
  var Rn = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
3344
3356
  function Aa(e) {
3345
3357
  function t(l) {
3346
- var s;
3358
+ var f;
3347
3359
  const S = l.matched.slice().reverse().find((g) => g.meta && g.meta.title);
3348
3360
  if (S)
3349
3361
  document.title = S.meta.title;
3350
3362
  else {
3351
3363
  const g = Rn.VITE_NODE_ENV;
3352
3364
  let D = "";
3353
- g == "development" ? D = "BWeb Dev" : g == "staging" ? D = "BlitzIt Sandpit" : D = "BlitzIt Web | Cloud-Based Wholesale Logistics Platform", ((s = e == null ? void 0 : e.demo) == null ? void 0 : s.isDemoing.value) == !0 && (D = `Training: ${D}`), document.title = D;
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;
3354
3366
  }
3355
3367
  }
3356
3368
  return {
@@ -3362,103 +3374,103 @@ function Ea() {
3362
3374
  return _r;
3363
3375
  }
3364
3376
  function Un(e) {
3365
- function t(f, A, j) {
3366
- return f ? an(f) ? j ?? "" : e.dates.tzString(f, A) : j ?? f ?? "";
3377
+ function t(s, A, j) {
3378
+ return s ? an(s) ? j ?? "" : e.dates.tzString(s, A) : j ?? s ?? "";
3367
3379
  }
3368
- function l(f) {
3369
- if (!f)
3380
+ function l(s) {
3381
+ if (!s)
3370
3382
  return "";
3371
- if (typeof f != "object")
3372
- return f;
3383
+ if (typeof s != "object")
3384
+ return s;
3373
3385
  var A = "";
3374
- 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;
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;
3375
3387
  }
3376
- function S(f) {
3377
- if (typeof f != "number")
3378
- return f;
3388
+ function S(s) {
3389
+ if (typeof s != "number")
3390
+ return s;
3379
3391
  var A = new Intl.NumberFormat("en-US", {
3380
3392
  style: "currency",
3381
3393
  currency: "AUD",
3382
3394
  minimumFractionDigits: 2
3383
3395
  });
3384
- return A.format(f);
3396
+ return A.format(s);
3385
3397
  }
3386
- function s(f, A) {
3387
- return t(f, "ccc | d LLL", A);
3398
+ function f(s, A) {
3399
+ return t(s, "ccc | d LLL", A);
3388
3400
  }
3389
- function g(f, A) {
3390
- return t(f, "d LLL", A);
3401
+ function g(s, A) {
3402
+ return t(s, "d LLL", A);
3391
3403
  }
3392
- function D(f, A) {
3393
- return t(f, "ccc", A);
3404
+ function D(s, A) {
3405
+ return t(s, "ccc", A);
3394
3406
  }
3395
- function P(f, A) {
3396
- return t(f, "ccc dd LLL yyyy", A);
3407
+ function C(s, A) {
3408
+ return t(s, "ccc dd LLL yyyy", A);
3397
3409
  }
3398
- function _(f, A) {
3399
- return t(f, "ccc dd LLL @ hh:mm a", A);
3410
+ function _(s, A) {
3411
+ return t(s, "ccc dd LLL @ hh:mm a", A);
3400
3412
  }
3401
- function M(f) {
3402
- return new Intl.NumberFormat().format(f);
3413
+ function M(s) {
3414
+ return new Intl.NumberFormat().format(s);
3403
3415
  }
3404
- function $(f) {
3405
- return f == 0 ? "" : new Intl.NumberFormat().format(f);
3416
+ function $(s) {
3417
+ return s == 0 ? "" : new Intl.NumberFormat().format(s);
3406
3418
  }
3407
- function d(f) {
3408
- if (f == 0)
3419
+ function d(s) {
3420
+ if (s == 0)
3409
3421
  return "";
3410
- var A = new Intl.NumberFormat().format(f);
3411
- return f > 0 ? "+" + A : A;
3422
+ var A = new Intl.NumberFormat().format(s);
3423
+ return s > 0 ? "+" + A : A;
3412
3424
  }
3413
- function h(f, A) {
3414
- return e.dates.utcString(f, A);
3425
+ function h(s, A) {
3426
+ return e.dates.utcString(s, A);
3415
3427
  }
3416
- function u(f) {
3417
- return rt(f, !1);
3428
+ function u(s) {
3429
+ return rt(s, !1);
3418
3430
  }
3419
- function r(f) {
3420
- if (!f)
3431
+ function r(s) {
3432
+ if (!s)
3421
3433
  return "";
3422
- if (typeof f != "object")
3423
- return f;
3434
+ if (typeof s != "object")
3435
+ return s;
3424
3436
  var A = "";
3425
- 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;
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;
3426
3438
  }
3427
- function y(f, A) {
3428
- return t(f, "ddd DD MMM YYYY", A);
3439
+ function y(s, A) {
3440
+ return t(s, "ddd DD MMM YYYY", A);
3429
3441
  }
3430
- function I(f, A) {
3431
- return t(f, "ccc dd LLL yyyy hh:mm a", A);
3442
+ function x(s, A) {
3443
+ return t(s, "ccc dd LLL yyyy hh:mm a", A);
3432
3444
  }
3433
- function i(f) {
3445
+ function i(s) {
3434
3446
  var A = new Intl.NumberFormat("en-US", {
3435
3447
  style: "percent",
3436
3448
  minimumFractionDigits: 2
3437
3449
  });
3438
- return A.format(f);
3450
+ return A.format(s);
3439
3451
  }
3440
- function E(f) {
3441
- return f.replaceAll(",", " ");
3452
+ function E(s) {
3453
+ return s.replaceAll(",", " ");
3442
3454
  }
3443
- function w(f, A) {
3444
- return t(f, "dd LLL yyyy", A);
3455
+ function w(s, A) {
3456
+ return t(s, "dd LLL yyyy", A);
3445
3457
  }
3446
- function L(f, A) {
3447
- return t(f, "dd LLL yyyy hh:mm a", A);
3458
+ function L(s, A) {
3459
+ return t(s, "dd LLL yyyy hh:mm a", A);
3448
3460
  }
3449
- function b(f, A) {
3450
- return t(f, "hh:mm a", A);
3461
+ function b(s, A) {
3462
+ return t(s, "hh:mm a", A);
3451
3463
  }
3452
- function T(f) {
3453
- return f == null ? "" : typeof f == "number" ? e.dates.tzDate().startOf("day").plus({ minutes: f }).toFormat("T") : typeof f == "string" ? e.dates.tzString(f, "t") : "unknown";
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";
3454
3466
  }
3455
- const x = {
3467
+ const I = {
3456
3468
  toCompanyNameAndLocationLine: l,
3457
3469
  toCurrency: S,
3458
- toDayDate: s,
3470
+ toDayDate: f,
3459
3471
  toDayMonth: g,
3460
3472
  toDayOfWeek: D,
3461
- toDayShortDate: P,
3473
+ toDayShortDate: C,
3462
3474
  toDayShortDateAndTime: _,
3463
3475
  toDisplayNumber: M,
3464
3476
  toDisplayNumberOver: $,
@@ -3467,7 +3479,7 @@ function Un(e) {
3467
3479
  toLocationLine: u,
3468
3480
  toLocationLineNoCommas: r,
3469
3481
  toLongDate: y,
3470
- toLongDateAndTime: I,
3482
+ toLongDateAndTime: x,
3471
3483
  toPercent: i,
3472
3484
  toPrettyCSV: E,
3473
3485
  toShortDate: w,
@@ -3475,35 +3487,35 @@ function Un(e) {
3475
3487
  toTime: b,
3476
3488
  toTimeOfDay: T
3477
3489
  };
3478
- function N(f) {
3479
- if (f != null) {
3480
- let A = f;
3481
- if (A != null && x[A] != null)
3482
- return x[A];
3490
+ function N(s) {
3491
+ if (s != null) {
3492
+ let A = s;
3493
+ if (A != null && I[A] != null)
3494
+ return I[A];
3483
3495
  }
3484
3496
  return (A) => A;
3485
3497
  }
3486
3498
  return _r = {
3487
3499
  findFilter: N,
3488
- ...x
3500
+ ...I
3489
3501
  }, _r;
3490
3502
  }
3491
3503
  function Bn(e, t) {
3492
3504
  const l = z(!1), S = Yt(e);
3493
- let s = g(Q(e));
3494
- (t == null ? void 0 : t.useTracker) !== !1 && Te(S, (P) => {
3495
- l.value = g(P) != s;
3505
+ let f = g(Q(e));
3506
+ (t == null ? void 0 : t.useTracker) !== !1 && Te(S, (C) => {
3507
+ l.value = g(C) != f;
3496
3508
  }, { deep: !0 });
3497
- function g(P) {
3498
- const _ = Nr(P);
3509
+ function g(C) {
3510
+ const _ = Nr(C);
3499
3511
  return t != null && (t.propsToIgnore != null ? t.propsToIgnore.forEach((M) => {
3500
3512
  delete _[M];
3501
- }) : t.propsToTrack != null && Object.keys(P).forEach(($) => {
3513
+ }) : t.propsToTrack != null && Object.keys(C).forEach(($) => {
3502
3514
  t.propsToTrack.some((d) => d == $) || delete _[$];
3503
3515
  })), JSON.stringify(_);
3504
3516
  }
3505
3517
  function D() {
3506
- s = g(Q(S)), l.value = !1;
3518
+ f = g(Q(S)), l.value = !1;
3507
3519
  }
3508
3520
  return {
3509
3521
  asyncItem: S,
@@ -3516,22 +3528,22 @@ function Ia(e, t) {
3516
3528
  const {
3517
3529
  // useBladeSrc = true,
3518
3530
  useRouteSrc: l = !0
3519
- } = t ?? {}, S = e.storeMode ?? (t == null ? void 0 : t.storeMode), s = e.storageMode ?? (t == null ? void 0 : t.storageMode), g = e.nav ?? e.bladeName ?? "basic", D = Lr(), P = et(), _ = Q(e.proxyQueryKey), M = ee(() => {
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(() => {
3520
3532
  var W;
3521
- return Q(e.proxyID) ?? (_ != null ? (W = P == null ? void 0 : P.query) == null ? void 0 : W[_] : void 0);
3522
- }), $ = z(void 0), { actionErrorMsg: d, actionLoadingMsg: h, deleteItem: u, getItem: r, getAllItems: y, restoreItem: I, saveItem: i } = ut({
3533
+ 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({
3523
3535
  nav: g,
3524
3536
  onError: e.onError ?? (t == null ? void 0 : t.onError),
3525
3537
  proxyID: M.value,
3526
3538
  store: Le({
3527
3539
  storeMode: S,
3528
- storageMode: s,
3540
+ storageMode: f,
3529
3541
  nav: g
3530
3542
  })
3531
- }), E = ee(() => e.errorMsg ?? d.value), w = ee(() => e.loadingMsg ?? h.value), L = ee(() => w.value != null), b = z(e.itemID ?? (l ? (Z = P == null ? void 0 : P.params) == null ? void 0 : Z.id : void 0)), T = z(b.value == "new" ? "new" : e.startEditing ? "edit" : "view"), x = Ne(!1), N = ee(() => {
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(() => {
3532
3544
  let W = e.params != null ? { ...e.params } : {};
3533
3545
  return e.includeDetails != null && (W.includeDetails = e.includeDetails), W;
3534
- }), f = ee(() => {
3546
+ }), s = ee(() => {
3535
3547
  if (T.value == "new")
3536
3548
  return !1;
3537
3549
  const W = Q($);
@@ -3580,7 +3592,7 @@ function Ia(e, t) {
3580
3592
  onRestoreSuccessAsync: se,
3581
3593
  proxyID: ge
3582
3594
  } = { ...e };
3583
- I({
3595
+ x({
3584
3596
  additionalUrl: ne,
3585
3597
  data: W,
3586
3598
  nav: g,
@@ -3592,7 +3604,7 @@ function Ia(e, t) {
3592
3604
  });
3593
3605
  }
3594
3606
  async function Y(W) {
3595
- if (x.value = !1, e.item != null)
3607
+ if (I.value = !1, e.item != null)
3596
3608
  $.value = e.item;
3597
3609
  else {
3598
3610
  const ne = {
@@ -3643,18 +3655,18 @@ function Ia(e, t) {
3643
3655
  !W || W == "view" ? T.value = "edit" : W == "edit" && (T.value = "view");
3644
3656
  }
3645
3657
  return Te(E, (W) => {
3646
- x.value = W != null;
3658
+ I.value = W != null;
3647
3659
  }), Te(() => e.refreshToggle, () => {
3648
3660
  Y({ deepRefresh: !0 });
3649
3661
  }), Xr(async () => {
3650
3662
  var W;
3651
- e.eager == !0 && await Y({ deepRefresh: ((W = P == null ? void 0 : P.params) == null ? void 0 : W.refresh) == "true" });
3663
+ e.eager == !0 && await Y({ deepRefresh: ((W = C == null ? void 0 : C.params) == null ? void 0 : W.refresh) == "true" });
3652
3664
  }), {
3653
3665
  asyncItem: $,
3654
3666
  deleteItem: be,
3655
3667
  errorMsg: E,
3656
3668
  isChanged: re,
3657
- isDeletable: f,
3669
+ isDeletable: s,
3658
3670
  isEditing: ee(() => T.value == "new" || T.value == "edit"),
3659
3671
  isEditable: A,
3660
3672
  isLoading: L,
@@ -3666,7 +3678,7 @@ function Ia(e, t) {
3666
3678
  refresh: Y,
3667
3679
  restoreItem: G,
3668
3680
  saveItem: H,
3669
- showError: x,
3681
+ showError: I,
3670
3682
  toggleMode: ie
3671
3683
  };
3672
3684
  }
@@ -3689,35 +3701,35 @@ function $n(e) {
3689
3701
  }));
3690
3702
  function S(h) {
3691
3703
  var u;
3692
- return (u = P(h)) == null ? void 0 : u.archiveName;
3704
+ return (u = C(h)) == null ? void 0 : u.archiveName;
3693
3705
  }
3694
- function s(h) {
3706
+ function f(h) {
3695
3707
  var u;
3696
- return ((u = P(h)) == null ? void 0 : u.cacheExpiryHours) ?? t;
3708
+ return ((u = C(h)) == null ? void 0 : u.cacheExpiryHours) ?? t;
3697
3709
  }
3698
3710
  function g(h) {
3699
3711
  var u;
3700
- return (u = P(h)) == null ? void 0 : u.displayName;
3712
+ return (u = C(h)) == null ? void 0 : u.displayName;
3701
3713
  }
3702
3714
  function D(h) {
3703
3715
  var u;
3704
- return (u = P(h)) == null ? void 0 : u.icon;
3716
+ return (u = C(h)) == null ? void 0 : u.icon;
3705
3717
  }
3706
- function P(h) {
3718
+ function C(h) {
3707
3719
  return h == null ? null : typeof h != "string" ? h : tt(l, (r) => r.children).find((r) => {
3708
3720
  var y;
3709
- return r.name == h || r.singleName == h || ((y = r.aliases) == null ? void 0 : y.some((I) => I == h));
3721
+ return r.name == h || r.singleName == h || ((y = r.aliases) == null ? void 0 : y.some((x) => x == h));
3710
3722
  }) ?? null;
3711
3723
  }
3712
3724
  function _(h) {
3713
- const u = P(h);
3725
+ const u = C(h);
3714
3726
  if (u == null)
3715
3727
  return;
3716
3728
  let r = gn(u.microservice ?? "default") ?? "";
3717
3729
  return u.path != null && (r = Ue(r, u.path)), r != null && r.endsWith("/") && (r = r.slice(0, r.length - 1)), r;
3718
3730
  }
3719
3731
  function M(h) {
3720
- const u = P(h);
3732
+ const u = C(h);
3721
3733
  if ((u == null ? void 0 : u.singleName) != null)
3722
3734
  return u.singleName;
3723
3735
  const r = u == null ? void 0 : u.displayName;
@@ -3725,13 +3737,13 @@ function $n(e) {
3725
3737
  return mn(r);
3726
3738
  }
3727
3739
  function $(h) {
3728
- const u = P(h);
3740
+ const u = C(h);
3729
3741
  return (u == null ? void 0 : u.name) ?? (u == null ? void 0 : u.singleName);
3730
3742
  }
3731
3743
  function d(h) {
3732
3744
  if (h == null)
3733
3745
  return;
3734
- const u = typeof h == "string" ? P(h) : h;
3746
+ const u = typeof h == "string" ? C(h) : h;
3735
3747
  Yr.value = u == null ? void 0 : u.background, zr.value = (u == null ? void 0 : u.hideNavigation) !== !0, Vr.value = (u == null ? void 0 : u.hideAppBar) !== !0, yr != null && yr(), gr.value = (u == null ? void 0 : u.hesitate) === !0, gr.value && (yr = window.addEventListener("beforeunload", (r) => {
3736
3748
  r.preventDefault();
3737
3749
  }));
@@ -3743,10 +3755,10 @@ function $n(e) {
3743
3755
  hesitate: gr,
3744
3756
  navigationItems: l,
3745
3757
  findArchiveName: S,
3746
- findCacheHours: s,
3758
+ findCacheHours: f,
3747
3759
  findDisplay: g,
3748
3760
  findIcon: D,
3749
- findItem: P,
3761
+ findItem: C,
3750
3762
  findStoreName: $,
3751
3763
  findPath: _,
3752
3764
  findSingleDisplay: M,
@@ -3755,17 +3767,17 @@ function $n(e) {
3755
3767
  }
3756
3768
  function Da(e, t, l) {
3757
3769
  var He, Ve;
3758
- const S = Mn(), s = it(), g = Lr(), D = et(), { bladeData: P } = Cn({}), _ = e.useBladeSrc ?? !0, M = e.useRouteSrc ?? !0, $ = e.nav ?? e.bladeName ?? e.itemBladeName ?? "basic", d = e.storeMode ?? ((He = s.findItem($)) == null ? void 0 : He.storeMode), h = e.storageMode ?? ((Ve = s.findItem($)) == null ? void 0 : Ve.storageMode), u = Q(e.customFilters) ?? [], r = z([]), y = ee(() => Kt([
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([
3759
3771
  ...u.filter((U) => U.name != null).map((U) => U.name),
3760
3772
  ...e.defaultFilters ?? [],
3761
3773
  ...r.value
3762
- ]).value), I = z((e.defaultFilters ?? []).map((U) => y.value.indexOf(U)));
3763
- let i = z([...I.value]);
3764
- const E = ee(() => Gr(i, I).value.length > 0 || Gr(I, i).value.length > 0), w = z(L());
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());
3765
3777
  function L() {
3766
3778
  var U, K;
3767
3779
  if (_) {
3768
- const V = (U = P.value) == null ? void 0 : U.page;
3780
+ const V = (U = C.value) == null ? void 0 : U.page;
3769
3781
  if (V != null)
3770
3782
  return Number.parseInt(V);
3771
3783
  }
@@ -3779,7 +3791,7 @@ function Da(e, t, l) {
3779
3791
  const b = ee(() => {
3780
3792
  var U, K;
3781
3793
  if (_) {
3782
- const V = (U = P.value) == null ? void 0 : U.proxyID;
3794
+ const V = (U = C.value) == null ? void 0 : U.proxyID;
3783
3795
  if (V != null)
3784
3796
  return V;
3785
3797
  }
@@ -3789,11 +3801,11 @@ function Da(e, t, l) {
3789
3801
  return V;
3790
3802
  }
3791
3803
  return e.proxyID;
3792
- }), T = z(x());
3793
- function x() {
3804
+ }), T = z(I());
3805
+ function I() {
3794
3806
  var U, K;
3795
3807
  if (_) {
3796
- const V = (U = P.value) == null ? void 0 : U.search;
3808
+ const V = (U = C.value) == null ? void 0 : U.search;
3797
3809
  if (V != null)
3798
3810
  return V;
3799
3811
  }
@@ -3803,7 +3815,7 @@ function Da(e, t, l) {
3803
3815
  return V;
3804
3816
  }
3805
3817
  }
3806
- const N = z(Q(e.startShowingInactive) ?? !1), f = ee(() => [
3818
+ const N = z(Q(e.startShowingInactive) ?? !1), s = ee(() => [
3807
3819
  ...e.searchProps ?? [],
3808
3820
  ...(e.headers ?? []).filter((U) => U.searchable != null && U.value != null).map((U) => U.value ?? "")
3809
3821
  ]), A = z([]), j = Ne([]), X = z([]);
@@ -3819,7 +3831,7 @@ function Da(e, t, l) {
3819
3831
  })
3820
3832
  }), W = ee(() => e.errorMsg ?? ue.value), ne = ee(() => e.loadingMsg ?? be.value), ce = ee(() => ne.value != null), se = Ne(!1), ge = Ne(e.showSearch ?? !0), Be = z(0), $e = ee(() => {
3821
3833
  let U, K = [];
3822
- I.value.forEach((O) => {
3834
+ x.value.forEach((O) => {
3823
3835
  const de = y.value[O], ye = u.find((De) => De.name == de);
3824
3836
  ye != null ? U = U != null ? `${U}ANDALSO${ye.filterFunction()}` : ye.filterFunction() : K.push(de);
3825
3837
  });
@@ -3906,7 +3918,7 @@ function Da(e, t, l) {
3906
3918
  function Pe() {
3907
3919
  let U = Q(A);
3908
3920
  if (U = e.onFilter ? e.onFilter(U) : U, T.value != null && T.value.length > 0) {
3909
- let K = [...f.value];
3921
+ let K = [...s.value];
3910
3922
  e.itemText && K.push(e.itemText), _e(K) && (U = U.filter((V) => dn(V, T.value, K)));
3911
3923
  }
3912
3924
  j.value = U;
@@ -3944,7 +3956,7 @@ function Da(e, t, l) {
3944
3956
  return r.value = (O == null ? void 0 : O.filters) ?? [], e.useServerPagination === !0 && e.itemsPerPage && O.count && (Be.value = Math.ceil(O.count / e.itemsPerPage)), e.onGetSuccessAsync != null && (ye = await e.onGetSuccessAsync(ye, de)), ye;
3945
3957
  }
3946
3958
  });
3947
- A.value = V, i.value = [...I.value];
3959
+ A.value = V, i.value = [...x.value];
3948
3960
  }
3949
3961
  Pe();
3950
3962
  }
@@ -4001,7 +4013,7 @@ function Da(e, t, l) {
4001
4013
  refresh: Ie,
4002
4014
  restoreItem: Je,
4003
4015
  searchString: T,
4004
- selectedFilters: I,
4016
+ selectedFilters: x,
4005
4017
  selectItem: je,
4006
4018
  // serverFilters,
4007
4019
  showError: se,
@@ -4031,17 +4043,17 @@ function xa() {
4031
4043
  sidebarNavItems: ee(() => {
4032
4044
  var g;
4033
4045
  S = S.filter((D) => D.meta != null && D.meta.menuGroup != null);
4034
- const s = [];
4046
+ const f = [];
4035
4047
  return S.forEach((D) => {
4036
4048
  var d;
4037
- const P = We.groupOptions.value.find((h) => h.displayName == D.meta.menuGroup), _ = t.findItem(D.meta.nav), M = D.meta;
4038
- let $ = s.find((h) => h.displayName == M.menuGroup);
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);
4039
4051
  $ == null && ($ = {
4040
4052
  displayName: M.menuGroup,
4041
- icon: (P == null ? void 0 : P.icon) ?? (M == null ? void 0 : M.icon) ?? (_ == null ? void 0 : _.icon),
4053
+ icon: (C == null ? void 0 : C.icon) ?? (M == null ? void 0 : M.icon) ?? (_ == null ? void 0 : _.icon),
4042
4054
  isGroup: !0,
4043
4055
  items: []
4044
- }, s.push($)), (d = $.items) == null || d.push({
4056
+ }, f.push($)), (d = $.items) == null || d.push({
4045
4057
  displayName: (M == null ? void 0 : M.displayName) ?? t.findDisplay(_ ?? void 0),
4046
4058
  icon: (M == null ? void 0 : M.icon) ?? t.findIcon(_ ?? void 0),
4047
4059
  permissions: (M == null ? void 0 : M.permissions) ?? (_ == null ? void 0 : _.permissions) ?? [],
@@ -4050,10 +4062,10 @@ function xa() {
4050
4062
  subFilters: (M == null ? void 0 : M.subFilters) ?? (_ == null ? void 0 : _.subFilters) ?? [],
4051
4063
  routeName: D.name
4052
4064
  });
4053
- }), s.forEach((D) => {
4054
- var P;
4055
- D.items = (P = D.items) == null ? void 0 : P.filter((_) => !_.requiresAuth || l.doShow(_.subscriptions, _.permissions, "view")).sort(Re.firstBy((_) => _.displayName));
4056
- }), We.currentGroup.value != null ? ((g = s.find((D) => D.displayName == We.currentGroup.value)) == null ? void 0 : g.items) ?? [] : s.filter((D) => !D.requiresAuth || l.doShow(D.subscriptions, D.permissions, "view"));
4065
+ }), f.forEach((D) => {
4066
+ 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"));
4057
4069
  })
4058
4070
  };
4059
4071
  }
@@ -4092,14 +4104,14 @@ function Gn() {
4092
4104
  function S() {
4093
4105
  return !!window.matchMedia("(display-mode: standalone)").matches;
4094
4106
  }
4095
- function s(D) {
4107
+ function f(D) {
4096
4108
  D.preventDefault(), wr.value = !0, Qr.value = D;
4097
4109
  }
4098
4110
  function g() {
4099
4111
  br.value = !1, !(!er.value || !er.value.waiting) && er.value.waiting.postMessage({ type: "SKIP_WAITING" });
4100
4112
  }
4101
4113
  return Xt(() => {
4102
- Zr == null && (Zr = document.addEventListener("swUpdated", e, { once: !0 })), Jr == null && (Jr = navigator.serviceWorker.addEventListener("controllerchange", t)), jr == null && (jr = window.addEventListener("beforeinstallprompt", s));
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));
4103
4115
  }), Mr = {
4104
4116
  canInstallApp: wr,
4105
4117
  canUpdateApp: br,
@@ -4117,23 +4129,23 @@ function Pa(e) {
4117
4129
  install(t, l) {
4118
4130
  var _;
4119
4131
  console.log(t), e.vuetifyInstance ?? (e.vuetifyInstance = l.vuetifyInstance), yn(e.urls), Pn(e);
4120
- const S = Nn(), s = $n(e);
4121
- kn(e), (_ = e.auth).demo ?? (_.demo = S), e.auth.getAuthItem = s.findItem;
4132
+ const S = Nn(), f = $n(e);
4133
+ kn(e), (_ = e.auth).demo ?? (_.demo = S), e.auth.getAuthItem = f.findItem;
4122
4134
  const g = Dn(e.auth);
4123
4135
  Fn(e.menu);
4124
4136
  const D = En({
4125
4137
  auth: g,
4126
- findPath: s.findPath,
4138
+ findPath: f.findPath,
4127
4139
  useBearerToken: !0
4128
- }), P = Ln({
4140
+ }), C = Ln({
4129
4141
  getTimeZone: () => g.timeZone.value
4130
4142
  });
4131
4143
  Un({
4132
- dates: P
4144
+ dates: C
4133
4145
  }), Gn(), wn({
4134
4146
  api: D,
4135
4147
  auth: g,
4136
- navigation: s
4148
+ navigation: f
4137
4149
  });
4138
4150
  }
4139
4151
  };