bt-core-app 1.4.93 → 1.4.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bt-core-app.js +459 -457
- package/package.json +1 -1
package/dist/bt-core-app.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ref as z, shallowRef as
|
|
1
|
+
import { ref as z, shallowRef as Ne, computed as ee, toValue as Q, watch as Te, toRef as Yt, onMounted as Xr } from "vue";
|
|
2
2
|
import { watchArray as Or, useStorage as Zt, useEventListener as me, toValue as Ee, useParentElement as Jt, useResizeObserver as jt, useArrayUnique as Kt, useArrayDifference as Gr, watchDebounced as Qt, tryOnMounted as Xt } from "@vueuse/core";
|
|
3
3
|
import { defineStore as pr } from "pinia";
|
|
4
4
|
import { DateTime as he } from "luxon";
|
|
5
|
-
import { useRouter as
|
|
5
|
+
import { useRouter as Lr, useRoute as et } from "vue-router";
|
|
6
6
|
function Ot(e) {
|
|
7
7
|
return (e || "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx").replace(/[xy]/g, pt);
|
|
8
8
|
}
|
|
@@ -11,8 +11,8 @@ function pt(e) {
|
|
|
11
11
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
12
12
|
}
|
|
13
13
|
function en(e) {
|
|
14
|
-
const t = z([]), l =
|
|
15
|
-
function
|
|
14
|
+
const t = z([]), l = Ne(), S = Ne(), s = Ne(), g = ee(() => l.value != null);
|
|
15
|
+
function D(d) {
|
|
16
16
|
t.value = t.value.filter((h) => h.id != d);
|
|
17
17
|
}
|
|
18
18
|
function P(d) {
|
|
@@ -25,7 +25,7 @@ function en(e) {
|
|
|
25
25
|
function _(d) {
|
|
26
26
|
d != null && (S.value = d.toString());
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function M() {
|
|
29
29
|
S.value = void 0;
|
|
30
30
|
}
|
|
31
31
|
async function $(d, h) {
|
|
@@ -44,7 +44,7 @@ function en(e) {
|
|
|
44
44
|
_(u.errorMsg ?? I ?? "error");
|
|
45
45
|
}
|
|
46
46
|
} finally {
|
|
47
|
-
|
|
47
|
+
D(r);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
return Or(t, (d) => {
|
|
@@ -53,7 +53,7 @@ function en(e) {
|
|
|
53
53
|
actionErrorMsg: S,
|
|
54
54
|
actionLoadingMsg: l,
|
|
55
55
|
actionCompleteMsg: s,
|
|
56
|
-
clearErrors:
|
|
56
|
+
clearErrors: M,
|
|
57
57
|
doAction: $,
|
|
58
58
|
isLoading: g,
|
|
59
59
|
logError: _
|
|
@@ -72,17 +72,17 @@ var Re = function() {
|
|
|
72
72
|
}
|
|
73
73
|
function l(s, g) {
|
|
74
74
|
if (g = typeof g == "object" ? g : { direction: g }, typeof s != "function") {
|
|
75
|
-
var
|
|
75
|
+
var D = s;
|
|
76
76
|
s = function(d) {
|
|
77
|
-
return d[
|
|
77
|
+
return d[D] ? d[D] : "";
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
if (s.length === 1) {
|
|
81
|
-
var P = s, _ = g.ignoreCase ? t : e,
|
|
81
|
+
var P = s, _ = g.ignoreCase ? t : e, M = g.cmp || function(d, h) {
|
|
82
82
|
return d < h ? -1 : d > h ? 1 : 0;
|
|
83
83
|
};
|
|
84
84
|
s = function(d, h) {
|
|
85
|
-
return
|
|
85
|
+
return M(_(P(d)), _(P(h)));
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
const $ = { "-1": "", desc: "" };
|
|
@@ -91,8 +91,8 @@ var Re = function() {
|
|
|
91
91
|
} : s;
|
|
92
92
|
}
|
|
93
93
|
function S(s, g) {
|
|
94
|
-
var
|
|
95
|
-
return
|
|
94
|
+
var D = typeof this == "function" && !this.firstBy ? this : !1, P = l(s, g), _ = D ? function(M, $) {
|
|
95
|
+
return D(M, $) || P(M, $);
|
|
96
96
|
} : P;
|
|
97
97
|
return _.thenBy = S, _;
|
|
98
98
|
}
|
|
@@ -170,8 +170,8 @@ async function pn(e, t = !0) {
|
|
|
170
170
|
s.setAttribute("crossOrigin", "anonymous"), s.onload = function() {
|
|
171
171
|
var g = document.createElement("canvas");
|
|
172
172
|
g.width = this.width, g.height = this.height;
|
|
173
|
-
var
|
|
174
|
-
|
|
173
|
+
var D = g.getContext("2d");
|
|
174
|
+
D == null || D.drawImage(this, 0, 0), l(g.toDataURL("image/png"));
|
|
175
175
|
}, s.onerror = function() {
|
|
176
176
|
console.log("errr"), t ? S("image could not be loaded for some reason") : l(null);
|
|
177
177
|
}, e != null && (s.src = e);
|
|
@@ -214,21 +214,21 @@ function ta(e) {
|
|
|
214
214
|
function na(e, t) {
|
|
215
215
|
if (e == null || t == null)
|
|
216
216
|
return !0;
|
|
217
|
-
const l = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), S = t.replaceAll(" ", "").toLowerCase(), s = Ze.find((g) => g.values.some((
|
|
218
|
-
return s != null && l.some((g) => g == s.short || s.values.some((
|
|
217
|
+
const l = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), S = t.replaceAll(" ", "").toLowerCase(), s = Ze.find((g) => g.values.some((D) => D == S));
|
|
218
|
+
return s != null && l.some((g) => g == s.short || s.values.some((D) => D == g));
|
|
219
219
|
}
|
|
220
220
|
function aa(e, t) {
|
|
221
221
|
if (t == null)
|
|
222
222
|
return e;
|
|
223
223
|
let l = e ?? "";
|
|
224
224
|
l = `${l},${t}`;
|
|
225
|
-
let S = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((s) => Ze.find((g) => g.values.some((
|
|
225
|
+
let S = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((s) => Ze.find((g) => g.values.some((D) => D == s))).filter((s) => s != null).sort(Re.firstBy((s) => (s == null ? void 0 : s.value) ?? 0)).map((s) => s == null ? void 0 : s.short))].toString();
|
|
226
226
|
return S.length > 0 ? S : void 0;
|
|
227
227
|
}
|
|
228
228
|
function la(e, t) {
|
|
229
229
|
if (t == null || e == null)
|
|
230
230
|
return e;
|
|
231
|
-
let l = e ?? "", S = t.replaceAll(" ", "").toLowerCase(), s = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((g) => Ze.find((
|
|
231
|
+
let l = e ?? "", S = t.replaceAll(" ", "").toLowerCase(), s = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((g) => Ze.find((D) => D.values.some((P) => P == g && P != S))).filter((g) => g != null).sort(Re.firstBy((g) => (g == null ? void 0 : g.value) ?? 0)).map((g) => g == null ? void 0 : g.short))].toString();
|
|
232
232
|
return s.length > 0 ? s : void 0;
|
|
233
233
|
}
|
|
234
234
|
function ua(e, t) {
|
|
@@ -267,12 +267,12 @@ function un(e, t) {
|
|
|
267
267
|
var l = e.split(","), S = t.split(",");
|
|
268
268
|
return l.some((s) => S.some((g) => g == s));
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function Nr(e) {
|
|
271
271
|
if (!e)
|
|
272
272
|
return e;
|
|
273
273
|
let t, l = Array.isArray(e) ? [] : {};
|
|
274
274
|
for (const S in e)
|
|
275
|
-
t = e[S], l[S] = typeof t == "object" ?
|
|
275
|
+
t = e[S], l[S] = typeof t == "object" ? Nr(t) : t;
|
|
276
276
|
return l;
|
|
277
277
|
}
|
|
278
278
|
function cn(e) {
|
|
@@ -369,34 +369,34 @@ var nt = { exports: {} };
|
|
|
369
369
|
e.exports = l();
|
|
370
370
|
})(function() {
|
|
371
371
|
return function l(S, s, g) {
|
|
372
|
-
function
|
|
373
|
-
if (!s[
|
|
374
|
-
if (!S[
|
|
372
|
+
function D(M, $) {
|
|
373
|
+
if (!s[M]) {
|
|
374
|
+
if (!S[M]) {
|
|
375
375
|
var d = typeof Oe == "function" && Oe;
|
|
376
376
|
if (!$ && d)
|
|
377
|
-
return d(
|
|
377
|
+
return d(M, !0);
|
|
378
378
|
if (P)
|
|
379
|
-
return P(
|
|
380
|
-
var h = new Error("Cannot find module '" +
|
|
379
|
+
return P(M, !0);
|
|
380
|
+
var h = new Error("Cannot find module '" + M + "'");
|
|
381
381
|
throw h.code = "MODULE_NOT_FOUND", h;
|
|
382
382
|
}
|
|
383
|
-
var u = s[
|
|
384
|
-
S[
|
|
385
|
-
var y = S[
|
|
386
|
-
return
|
|
383
|
+
var u = s[M] = { exports: {} };
|
|
384
|
+
S[M][0].call(u.exports, function(r) {
|
|
385
|
+
var y = S[M][1][r];
|
|
386
|
+
return D(y || r);
|
|
387
387
|
}, u, u.exports, l, S, s, g);
|
|
388
388
|
}
|
|
389
|
-
return s[
|
|
389
|
+
return s[M].exports;
|
|
390
390
|
}
|
|
391
391
|
for (var P = typeof Oe == "function" && Oe, _ = 0; _ < g.length; _++)
|
|
392
|
-
|
|
393
|
-
return
|
|
392
|
+
D(g[_]);
|
|
393
|
+
return D;
|
|
394
394
|
}({ 1: [function(l, S, s) {
|
|
395
395
|
(function(g) {
|
|
396
|
-
var
|
|
397
|
-
if (
|
|
398
|
-
var _ = 0,
|
|
399
|
-
|
|
396
|
+
var D = g.MutationObserver || g.WebKitMutationObserver, P;
|
|
397
|
+
if (D) {
|
|
398
|
+
var _ = 0, M = new D(r), $ = g.document.createTextNode("");
|
|
399
|
+
M.observe($, {
|
|
400
400
|
characterData: !0
|
|
401
401
|
}), P = function() {
|
|
402
402
|
$.data = _ = ++_ % 2;
|
|
@@ -432,30 +432,30 @@ var nt = { exports: {} };
|
|
|
432
432
|
}).call(this, typeof Xe < "u" ? Xe : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
433
433
|
}, {}], 2: [function(l, S, s) {
|
|
434
434
|
var g = l(1);
|
|
435
|
-
function
|
|
435
|
+
function D() {
|
|
436
436
|
}
|
|
437
|
-
var P = {}, _ = ["REJECTED"],
|
|
437
|
+
var P = {}, _ = ["REJECTED"], M = ["FULFILLED"], $ = ["PENDING"];
|
|
438
438
|
S.exports = d;
|
|
439
439
|
function d(b) {
|
|
440
440
|
if (typeof b != "function")
|
|
441
441
|
throw new TypeError("resolver must be a function");
|
|
442
|
-
this.state = $, this.queue = [], this.outcome = void 0, b !==
|
|
442
|
+
this.state = $, this.queue = [], this.outcome = void 0, b !== D && y(this, b);
|
|
443
443
|
}
|
|
444
444
|
d.prototype.catch = function(b) {
|
|
445
445
|
return this.then(null, b);
|
|
446
446
|
}, d.prototype.then = function(b, T) {
|
|
447
|
-
if (typeof b != "function" && this.state ===
|
|
447
|
+
if (typeof b != "function" && this.state === M || typeof T != "function" && this.state === _)
|
|
448
448
|
return this;
|
|
449
|
-
var
|
|
449
|
+
var x = new this.constructor(D);
|
|
450
450
|
if (this.state !== $) {
|
|
451
|
-
var
|
|
452
|
-
u(
|
|
451
|
+
var N = this.state === M ? b : T;
|
|
452
|
+
u(x, N, this.outcome);
|
|
453
453
|
} else
|
|
454
|
-
this.queue.push(new h(
|
|
455
|
-
return
|
|
454
|
+
this.queue.push(new h(x, b, T));
|
|
455
|
+
return x;
|
|
456
456
|
};
|
|
457
|
-
function h(b, T,
|
|
458
|
-
this.promise = b, typeof T == "function" && (this.onFulfilled = T, this.callFulfilled = this.otherCallFulfilled), typeof
|
|
457
|
+
function h(b, T, x) {
|
|
458
|
+
this.promise = b, typeof T == "function" && (this.onFulfilled = T, this.callFulfilled = this.otherCallFulfilled), typeof x == "function" && (this.onRejected = x, this.callRejected = this.otherCallRejected);
|
|
459
459
|
}
|
|
460
460
|
h.prototype.callFulfilled = function(b) {
|
|
461
461
|
P.resolve(this.promise, b);
|
|
@@ -466,34 +466,34 @@ var nt = { exports: {} };
|
|
|
466
466
|
}, h.prototype.otherCallRejected = function(b) {
|
|
467
467
|
u(this.promise, this.onRejected, b);
|
|
468
468
|
};
|
|
469
|
-
function u(b, T,
|
|
469
|
+
function u(b, T, x) {
|
|
470
470
|
g(function() {
|
|
471
|
-
var
|
|
471
|
+
var N;
|
|
472
472
|
try {
|
|
473
|
-
|
|
473
|
+
N = T(x);
|
|
474
474
|
} catch (f) {
|
|
475
475
|
return P.reject(b, f);
|
|
476
476
|
}
|
|
477
|
-
|
|
477
|
+
N === b ? P.reject(b, new TypeError("Cannot resolve promise with itself")) : P.resolve(b, N);
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
480
|
P.resolve = function(b, T) {
|
|
481
|
-
var
|
|
482
|
-
if (
|
|
483
|
-
return P.reject(b,
|
|
484
|
-
var
|
|
485
|
-
if (
|
|
486
|
-
y(b,
|
|
481
|
+
var x = I(r, T);
|
|
482
|
+
if (x.status === "error")
|
|
483
|
+
return P.reject(b, x.value);
|
|
484
|
+
var N = x.value;
|
|
485
|
+
if (N)
|
|
486
|
+
y(b, N);
|
|
487
487
|
else {
|
|
488
|
-
b.state =
|
|
488
|
+
b.state = M, b.outcome = T;
|
|
489
489
|
for (var f = -1, A = b.queue.length; ++f < A; )
|
|
490
490
|
b.queue[f].callFulfilled(T);
|
|
491
491
|
}
|
|
492
492
|
return b;
|
|
493
493
|
}, P.reject = function(b, T) {
|
|
494
494
|
b.state = _, b.outcome = T;
|
|
495
|
-
for (var
|
|
496
|
-
b.queue[
|
|
495
|
+
for (var x = -1, N = b.queue.length; ++x < N; )
|
|
496
|
+
b.queue[x].callRejected(T);
|
|
497
497
|
return b;
|
|
498
498
|
};
|
|
499
499
|
function r(b) {
|
|
@@ -504,35 +504,35 @@ var nt = { exports: {} };
|
|
|
504
504
|
};
|
|
505
505
|
}
|
|
506
506
|
function y(b, T) {
|
|
507
|
-
var
|
|
508
|
-
function
|
|
509
|
-
|
|
507
|
+
var x = !1;
|
|
508
|
+
function N(X) {
|
|
509
|
+
x || (x = !0, P.reject(b, X));
|
|
510
510
|
}
|
|
511
511
|
function f(X) {
|
|
512
|
-
|
|
512
|
+
x || (x = !0, P.resolve(b, X));
|
|
513
513
|
}
|
|
514
514
|
function A() {
|
|
515
|
-
T(f,
|
|
515
|
+
T(f, N);
|
|
516
516
|
}
|
|
517
517
|
var j = I(A);
|
|
518
|
-
j.status === "error" &&
|
|
518
|
+
j.status === "error" && N(j.value);
|
|
519
519
|
}
|
|
520
520
|
function I(b, T) {
|
|
521
|
-
var
|
|
521
|
+
var x = {};
|
|
522
522
|
try {
|
|
523
|
-
|
|
524
|
-
} catch (
|
|
525
|
-
|
|
523
|
+
x.value = b(T), x.status = "success";
|
|
524
|
+
} catch (N) {
|
|
525
|
+
x.status = "error", x.value = N;
|
|
526
526
|
}
|
|
527
|
-
return
|
|
527
|
+
return x;
|
|
528
528
|
}
|
|
529
529
|
d.resolve = i;
|
|
530
530
|
function i(b) {
|
|
531
|
-
return b instanceof this ? b : P.resolve(new this(
|
|
531
|
+
return b instanceof this ? b : P.resolve(new this(D), b);
|
|
532
532
|
}
|
|
533
533
|
d.reject = E;
|
|
534
534
|
function E(b) {
|
|
535
|
-
var T = new this(
|
|
535
|
+
var T = new this(D);
|
|
536
536
|
return P.reject(T, b);
|
|
537
537
|
}
|
|
538
538
|
d.all = w;
|
|
@@ -540,37 +540,37 @@ var nt = { exports: {} };
|
|
|
540
540
|
var T = this;
|
|
541
541
|
if (Object.prototype.toString.call(b) !== "[object Array]")
|
|
542
542
|
return this.reject(new TypeError("must be an array"));
|
|
543
|
-
var
|
|
544
|
-
if (!
|
|
543
|
+
var x = b.length, N = !1;
|
|
544
|
+
if (!x)
|
|
545
545
|
return this.resolve([]);
|
|
546
|
-
for (var f = new Array(
|
|
546
|
+
for (var f = new Array(x), A = 0, j = -1, X = new this(D); ++j < x; )
|
|
547
547
|
re(b[j], j);
|
|
548
548
|
return X;
|
|
549
549
|
function re(ue, be) {
|
|
550
550
|
T.resolve(ue).then(G, function(Y) {
|
|
551
|
-
|
|
551
|
+
N || (N = !0, P.reject(X, Y));
|
|
552
552
|
});
|
|
553
553
|
function G(Y) {
|
|
554
|
-
f[be] = Y, ++A ===
|
|
554
|
+
f[be] = Y, ++A === x && !N && (N = !0, P.resolve(X, f));
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
|
-
d.race =
|
|
559
|
-
function
|
|
558
|
+
d.race = L;
|
|
559
|
+
function L(b) {
|
|
560
560
|
var T = this;
|
|
561
561
|
if (Object.prototype.toString.call(b) !== "[object Array]")
|
|
562
562
|
return this.reject(new TypeError("must be an array"));
|
|
563
|
-
var
|
|
564
|
-
if (!
|
|
563
|
+
var x = b.length, N = !1;
|
|
564
|
+
if (!x)
|
|
565
565
|
return this.resolve([]);
|
|
566
|
-
for (var f = -1, A = new this(
|
|
566
|
+
for (var f = -1, A = new this(D); ++f < x; )
|
|
567
567
|
j(b[f]);
|
|
568
568
|
return A;
|
|
569
569
|
function j(X) {
|
|
570
570
|
T.resolve(X).then(function(re) {
|
|
571
|
-
|
|
571
|
+
N || (N = !0, P.resolve(A, re));
|
|
572
572
|
}, function(re) {
|
|
573
|
-
|
|
573
|
+
N || (N = !0, P.reject(A, re));
|
|
574
574
|
});
|
|
575
575
|
}
|
|
576
576
|
}
|
|
@@ -584,7 +584,7 @@ var nt = { exports: {} };
|
|
|
584
584
|
} : function(n) {
|
|
585
585
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
586
586
|
};
|
|
587
|
-
function
|
|
587
|
+
function D(n, c) {
|
|
588
588
|
if (!(n instanceof c))
|
|
589
589
|
throw new TypeError("Cannot call a class as a function");
|
|
590
590
|
}
|
|
@@ -605,7 +605,7 @@ var nt = { exports: {} };
|
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
607
|
var _ = P();
|
|
608
|
-
function
|
|
608
|
+
function M() {
|
|
609
609
|
try {
|
|
610
610
|
if (!_ || !_.open)
|
|
611
611
|
return !1;
|
|
@@ -650,13 +650,13 @@ var nt = { exports: {} };
|
|
|
650
650
|
if (arguments.length && typeof arguments[arguments.length - 1] == "function")
|
|
651
651
|
return arguments[arguments.length - 1];
|
|
652
652
|
}
|
|
653
|
-
var I = "local-forage-detect-blob-support", i = void 0, E = {}, w = Object.prototype.toString,
|
|
653
|
+
var I = "local-forage-detect-blob-support", i = void 0, E = {}, w = Object.prototype.toString, L = "readonly", b = "readwrite";
|
|
654
654
|
function T(n) {
|
|
655
655
|
for (var c = n.length, a = new ArrayBuffer(c), m = new Uint8Array(a), v = 0; v < c; v++)
|
|
656
656
|
m[v] = n.charCodeAt(v);
|
|
657
657
|
return a;
|
|
658
658
|
}
|
|
659
|
-
function
|
|
659
|
+
function x(n) {
|
|
660
660
|
return new d(function(c) {
|
|
661
661
|
var a = n.transaction(I, b), m = $([""]);
|
|
662
662
|
a.objectStore(I).put(m, "key"), a.onabort = function(v) {
|
|
@@ -669,8 +669,8 @@ var nt = { exports: {} };
|
|
|
669
669
|
return !1;
|
|
670
670
|
});
|
|
671
671
|
}
|
|
672
|
-
function
|
|
673
|
-
return typeof i == "boolean" ? d.resolve(i) :
|
|
672
|
+
function N(n) {
|
|
673
|
+
return typeof i == "boolean" ? d.resolve(i) : x(n).then(function(c) {
|
|
674
674
|
return i = c, i;
|
|
675
675
|
});
|
|
676
676
|
}
|
|
@@ -850,7 +850,7 @@ 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,
|
|
853
|
+
W(a._dbInfo, L, function(C, R) {
|
|
854
854
|
if (C)
|
|
855
855
|
return o(C);
|
|
856
856
|
try {
|
|
@@ -872,7 +872,7 @@ 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,
|
|
875
|
+
W(a._dbInfo, L, function(C, R) {
|
|
876
876
|
if (C)
|
|
877
877
|
return o(C);
|
|
878
878
|
try {
|
|
@@ -903,7 +903,7 @@ var nt = { exports: {} };
|
|
|
903
903
|
var v = new d(function(o, C) {
|
|
904
904
|
var R;
|
|
905
905
|
m.ready().then(function() {
|
|
906
|
-
return R = m._dbInfo, w.call(c) === "[object Blob]" ?
|
|
906
|
+
return R = m._dbInfo, w.call(c) === "[object Blob]" ? N(R.db).then(function(B) {
|
|
907
907
|
return B ? c : G(c);
|
|
908
908
|
}) : c;
|
|
909
909
|
}).then(function(B) {
|
|
@@ -979,7 +979,7 @@ var nt = { exports: {} };
|
|
|
979
979
|
function tr(n) {
|
|
980
980
|
var c = this, a = new d(function(m, v) {
|
|
981
981
|
c.ready().then(function() {
|
|
982
|
-
W(c._dbInfo,
|
|
982
|
+
W(c._dbInfo, L, function(o, C) {
|
|
983
983
|
if (o)
|
|
984
984
|
return v(o);
|
|
985
985
|
try {
|
|
@@ -1004,7 +1004,7 @@ var nt = { exports: {} };
|
|
|
1004
1004
|
return;
|
|
1005
1005
|
}
|
|
1006
1006
|
a.ready().then(function() {
|
|
1007
|
-
W(a._dbInfo,
|
|
1007
|
+
W(a._dbInfo, L, function(C, R) {
|
|
1008
1008
|
if (C)
|
|
1009
1009
|
return o(C);
|
|
1010
1010
|
try {
|
|
@@ -1030,7 +1030,7 @@ 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,
|
|
1033
|
+
W(c._dbInfo, L, function(o, C) {
|
|
1034
1034
|
if (o)
|
|
1035
1035
|
return v(o);
|
|
1036
1036
|
try {
|
|
@@ -1139,7 +1139,7 @@ var nt = { exports: {} };
|
|
|
1139
1139
|
var lr = {
|
|
1140
1140
|
_driver: "asyncStorage",
|
|
1141
1141
|
_initStorage: ce,
|
|
1142
|
-
_support:
|
|
1142
|
+
_support: M(),
|
|
1143
1143
|
iterate: ge,
|
|
1144
1144
|
getItem: se,
|
|
1145
1145
|
setItem: Be,
|
|
@@ -1168,7 +1168,7 @@ var nt = { exports: {} };
|
|
|
1168
1168
|
a += Se[c[m] >> 2], a += Se[(c[m] & 3) << 4 | c[m + 1] >> 4], a += Se[(c[m + 1] & 15) << 2 | c[m + 2] >> 6], a += Se[c[m + 2] & 63];
|
|
1169
1169
|
return c.length % 3 === 2 ? a = a.substring(0, a.length - 1) + "=" : c.length % 3 === 1 && (a = a.substring(0, a.length - 2) + "=="), a;
|
|
1170
1170
|
}
|
|
1171
|
-
function
|
|
1171
|
+
function Me(n, c) {
|
|
1172
1172
|
var a = "";
|
|
1173
1173
|
if (n && (a = De.call(n)), n && (a === "[object ArrayBuffer]" || n.buffer && De.call(n.buffer) === "[object ArrayBuffer]")) {
|
|
1174
1174
|
var m, v = ke;
|
|
@@ -1223,7 +1223,7 @@ var nt = { exports: {} };
|
|
|
1223
1223
|
}
|
|
1224
1224
|
}
|
|
1225
1225
|
var cr = {
|
|
1226
|
-
serialize:
|
|
1226
|
+
serialize: Me,
|
|
1227
1227
|
deserialize: ct,
|
|
1228
1228
|
stringToBuffer: Ae,
|
|
1229
1229
|
bufferToString: oe
|
|
@@ -1566,13 +1566,13 @@ var nt = { exports: {} };
|
|
|
1566
1566
|
});
|
|
1567
1567
|
return h(a, n), a;
|
|
1568
1568
|
}
|
|
1569
|
-
function
|
|
1569
|
+
function Mt(n) {
|
|
1570
1570
|
var c = this, a = c.keys().then(function(m) {
|
|
1571
1571
|
return m.length;
|
|
1572
1572
|
});
|
|
1573
1573
|
return h(a, n), a;
|
|
1574
1574
|
}
|
|
1575
|
-
function
|
|
1575
|
+
function Lt(n, c) {
|
|
1576
1576
|
var a = this;
|
|
1577
1577
|
n = r(n);
|
|
1578
1578
|
var m = a.ready().then(function() {
|
|
@@ -1581,7 +1581,7 @@ var nt = { exports: {} };
|
|
|
1581
1581
|
});
|
|
1582
1582
|
return h(m, c), m;
|
|
1583
1583
|
}
|
|
1584
|
-
function
|
|
1584
|
+
function Nt(n, c, a) {
|
|
1585
1585
|
var m = this;
|
|
1586
1586
|
n = r(n);
|
|
1587
1587
|
var v = m.ready().then(function() {
|
|
@@ -1624,10 +1624,10 @@ var nt = { exports: {} };
|
|
|
1624
1624
|
_support: At(),
|
|
1625
1625
|
iterate: _t,
|
|
1626
1626
|
getItem: Tt,
|
|
1627
|
-
setItem:
|
|
1628
|
-
removeItem:
|
|
1627
|
+
setItem: Nt,
|
|
1628
|
+
removeItem: Lt,
|
|
1629
1629
|
clear: xt,
|
|
1630
|
-
length:
|
|
1630
|
+
length: Mt,
|
|
1631
1631
|
key: Ct,
|
|
1632
1632
|
keys: Pt,
|
|
1633
1633
|
dropInstance: Rt
|
|
@@ -1675,7 +1675,7 @@ var nt = { exports: {} };
|
|
|
1675
1675
|
}
|
|
1676
1676
|
var Wt = function() {
|
|
1677
1677
|
function n(c) {
|
|
1678
|
-
|
|
1678
|
+
D(this, n);
|
|
1679
1679
|
for (var a in Ge)
|
|
1680
1680
|
if (Ge.hasOwnProperty(a)) {
|
|
1681
1681
|
var m = Ge[a], v = m._driver;
|
|
@@ -1863,7 +1863,7 @@ let rr;
|
|
|
1863
1863
|
function va(e) {
|
|
1864
1864
|
return rr(e)();
|
|
1865
1865
|
}
|
|
1866
|
-
function
|
|
1866
|
+
function Le(e) {
|
|
1867
1867
|
return rr(e);
|
|
1868
1868
|
}
|
|
1869
1869
|
function wn(e) {
|
|
@@ -1873,19 +1873,21 @@ function wn(e) {
|
|
|
1873
1873
|
}), rr;
|
|
1874
1874
|
}
|
|
1875
1875
|
function bn(e) {
|
|
1876
|
-
var
|
|
1877
|
-
|
|
1876
|
+
var l, S, s, g, D;
|
|
1877
|
+
e.storeMode ?? (e.storeMode = ((S = (l = e.navigation) == null ? void 0 : l.findItem(e.nav)) == null ? void 0 : S.storeMode) ?? "session"), e.storageMode ?? (e.storageMode = ((g = (s = e.navigation) == null ? void 0 : s.findItem(e.nav)) == null ? void 0 : g.storageMode) ?? "local-cache"), e.storeName ?? (e.storeName = ((D = e.navigation) == null ? void 0 : D.findStoreName(e.nav)) ?? e.nav);
|
|
1878
|
+
const t = { ...e, storeName: e.storeName ?? "" };
|
|
1879
|
+
if (console.log("creating store def"), console.log(t), e.storeName == null)
|
|
1878
1880
|
throw new Error("no store name provided");
|
|
1879
1881
|
if (e.storeMode == "whole-last-updated") {
|
|
1880
1882
|
if (e.api == null)
|
|
1881
1883
|
throw new Error("Must supply an api object to use store");
|
|
1882
|
-
return qr(
|
|
1884
|
+
return qr(t);
|
|
1883
1885
|
} else if (e.storeMode == "partial-last-updated") {
|
|
1884
1886
|
if (e.api == null)
|
|
1885
1887
|
throw new Error("Must supply an api object to use store");
|
|
1886
|
-
return qr(
|
|
1888
|
+
return qr(t);
|
|
1887
1889
|
} else
|
|
1888
|
-
return An(
|
|
1890
|
+
return An(t);
|
|
1889
1891
|
}
|
|
1890
1892
|
const Sn = (e) => {
|
|
1891
1893
|
let t = Q(e.url) ?? void 0;
|
|
@@ -1902,7 +1904,7 @@ function An(e) {
|
|
|
1902
1904
|
return pr(e.storeName, () => {
|
|
1903
1905
|
var u;
|
|
1904
1906
|
const t = he.utc().toSeconds() / 86400, l = z({}), S = z({}), s = e.storageMode == "local-cache", g = e.buildUrl ?? ((u = e.api) == null ? void 0 : u.buildUrl) ?? Sn;
|
|
1905
|
-
function
|
|
1907
|
+
function D(r) {
|
|
1906
1908
|
var i, E;
|
|
1907
1909
|
let y = "";
|
|
1908
1910
|
const I = r.params ?? {};
|
|
@@ -1910,7 +1912,7 @@ function An(e) {
|
|
|
1910
1912
|
}
|
|
1911
1913
|
async function P(r) {
|
|
1912
1914
|
r.additionalUrl ?? (r.additionalUrl = "/getAll"), g(r);
|
|
1913
|
-
const y =
|
|
1915
|
+
const y = D(r), I = r.refresh;
|
|
1914
1916
|
if (!I && l.value[y] !== void 0)
|
|
1915
1917
|
return l.value[y];
|
|
1916
1918
|
if (!I && s == !0) {
|
|
@@ -1922,18 +1924,18 @@ function An(e) {
|
|
|
1922
1924
|
return l.value[y];
|
|
1923
1925
|
try {
|
|
1924
1926
|
let i = S.value[y];
|
|
1925
|
-
i == null && (i = new Promise(async (w,
|
|
1927
|
+
i == null && (i = new Promise(async (w, L) => {
|
|
1926
1928
|
var b;
|
|
1927
1929
|
try {
|
|
1928
|
-
const T = await ((b = e.api) == null ? void 0 : b.getAll(r)),
|
|
1930
|
+
const T = await ((b = e.api) == null ? void 0 : b.getAll(r)), x = {
|
|
1929
1931
|
meta: { storedOn: t.toString() },
|
|
1930
1932
|
data: T == null ? void 0 : T.data,
|
|
1931
1933
|
count: T == null ? void 0 : T.count,
|
|
1932
1934
|
filters: (T == null ? void 0 : T.filters) ?? []
|
|
1933
1935
|
};
|
|
1934
|
-
s == !0 && await ve().setItem(y,
|
|
1936
|
+
s == !0 && await ve().setItem(y, x), w(x);
|
|
1935
1937
|
} catch (T) {
|
|
1936
|
-
|
|
1938
|
+
L(T);
|
|
1937
1939
|
} finally {
|
|
1938
1940
|
delete S.value[y];
|
|
1939
1941
|
}
|
|
@@ -1950,7 +1952,7 @@ function An(e) {
|
|
|
1950
1952
|
}
|
|
1951
1953
|
async function _(r) {
|
|
1952
1954
|
r.additionalUrl ?? (r.additionalUrl = "/get"), g(r);
|
|
1953
|
-
const y =
|
|
1955
|
+
const y = D(r), I = r.refresh;
|
|
1954
1956
|
if (!I && l.value[y] !== void 0)
|
|
1955
1957
|
return l.value[y];
|
|
1956
1958
|
if (!I && s == !0) {
|
|
@@ -1962,17 +1964,17 @@ function An(e) {
|
|
|
1962
1964
|
return l.value[y];
|
|
1963
1965
|
try {
|
|
1964
1966
|
let i = S.value[y];
|
|
1965
|
-
i == null && (i = new Promise(async (w,
|
|
1967
|
+
i == null && (i = new Promise(async (w, L) => {
|
|
1966
1968
|
var b;
|
|
1967
1969
|
try {
|
|
1968
1970
|
let T = await ((b = e.api) == null ? void 0 : b.get(r));
|
|
1969
|
-
const
|
|
1971
|
+
const x = {
|
|
1970
1972
|
meta: { storedOn: t.toString() },
|
|
1971
1973
|
data: T == null ? void 0 : T.data
|
|
1972
1974
|
};
|
|
1973
|
-
s == !0 && await ve().setItem(y,
|
|
1975
|
+
s == !0 && await ve().setItem(y, x), w(x);
|
|
1974
1976
|
} catch (T) {
|
|
1975
|
-
|
|
1977
|
+
L(T);
|
|
1976
1978
|
} finally {
|
|
1977
1979
|
delete S.value[y];
|
|
1978
1980
|
}
|
|
@@ -1983,10 +1985,10 @@ function An(e) {
|
|
|
1983
1985
|
throw i;
|
|
1984
1986
|
}
|
|
1985
1987
|
}
|
|
1986
|
-
async function
|
|
1988
|
+
async function M(r) {
|
|
1987
1989
|
var i;
|
|
1988
1990
|
r.additionalUrl ?? (r.additionalUrl = "/patch"), g(r);
|
|
1989
|
-
const y =
|
|
1991
|
+
const y = D(r);
|
|
1990
1992
|
let I;
|
|
1991
1993
|
if (e.api != null)
|
|
1992
1994
|
try {
|
|
@@ -2002,21 +2004,21 @@ function An(e) {
|
|
|
2002
2004
|
meta: { storedOn: t.toString() },
|
|
2003
2005
|
data: { ...(i = l.value[y]) == null ? void 0 : i.data, ...I }
|
|
2004
2006
|
};
|
|
2005
|
-
return l.value[y] = E, s == !0 && await ve().setItem(y, E), I.id != null && I.rowVersion != null && Object.entries(l.value).forEach((
|
|
2006
|
-
const b =
|
|
2007
|
+
return l.value[y] = E, s == !0 && await ve().setItem(y, E), I.id != null && I.rowVersion != null && Object.entries(l.value).forEach((L) => {
|
|
2008
|
+
const b = L[1].data;
|
|
2007
2009
|
if (b != null)
|
|
2008
2010
|
if (Array.isArray(b))
|
|
2009
2011
|
for (let T = 0; T < b.length; T++)
|
|
2010
2012
|
b[T].id == I.id && b.splice(T, 1, E.data);
|
|
2011
2013
|
else
|
|
2012
|
-
b.id == I.id && (l.value[
|
|
2014
|
+
b.id == I.id && (l.value[L[0]] = E);
|
|
2013
2015
|
}), E.data;
|
|
2014
2016
|
}
|
|
2015
2017
|
return I;
|
|
2016
2018
|
}
|
|
2017
2019
|
async function $(r) {
|
|
2018
2020
|
r.additionalUrl ?? (r.additionalUrl = "/post"), g(r);
|
|
2019
|
-
const y =
|
|
2021
|
+
const y = D(r);
|
|
2020
2022
|
let I;
|
|
2021
2023
|
if (e.api != null)
|
|
2022
2024
|
try {
|
|
@@ -2039,7 +2041,7 @@ function An(e) {
|
|
|
2039
2041
|
async function d(r) {
|
|
2040
2042
|
var i;
|
|
2041
2043
|
r.additionalUrl ?? (r.additionalUrl = "/delete"), g(r);
|
|
2042
|
-
const y =
|
|
2044
|
+
const y = D(r);
|
|
2043
2045
|
if (e.api != null)
|
|
2044
2046
|
try {
|
|
2045
2047
|
let E = await e.api.deleteItem(r);
|
|
@@ -2051,11 +2053,11 @@ function An(e) {
|
|
|
2051
2053
|
delete l.value[y];
|
|
2052
2054
|
const I = ((i = r.data) == null ? void 0 : i.id) ?? r.id;
|
|
2053
2055
|
I != null && Object.entries(l.value).forEach((w) => {
|
|
2054
|
-
const
|
|
2055
|
-
if (
|
|
2056
|
-
if (Array.isArray(
|
|
2057
|
-
for (let b = 0; b <
|
|
2058
|
-
|
|
2056
|
+
const L = w[1].data;
|
|
2057
|
+
if (L != null)
|
|
2058
|
+
if (Array.isArray(L))
|
|
2059
|
+
for (let b = 0; b < L.length; b++)
|
|
2060
|
+
L[b].id == I && L.splice(b, 1);
|
|
2059
2061
|
else
|
|
2060
2062
|
delete l.value[w[0]];
|
|
2061
2063
|
}), s == !0 && await ve().removeItem(y);
|
|
@@ -2073,7 +2075,7 @@ function An(e) {
|
|
|
2073
2075
|
deleteItem: d,
|
|
2074
2076
|
get: _,
|
|
2075
2077
|
getAll: P,
|
|
2076
|
-
patch:
|
|
2078
|
+
patch: M,
|
|
2077
2079
|
post: $,
|
|
2078
2080
|
restore: h,
|
|
2079
2081
|
searchMemory: l
|
|
@@ -2083,12 +2085,12 @@ function An(e) {
|
|
|
2083
2085
|
}
|
|
2084
2086
|
function qr(e) {
|
|
2085
2087
|
return pr(e.storeName, () => {
|
|
2086
|
-
const t = z(), l = z(0), S = he.utc().toSeconds() / 3600, s = z(), g = z(),
|
|
2088
|
+
const t = z(), l = z(0), S = he.utc().toSeconds() / 3600, s = z(), g = z(), D = z({}), P = e.storageMode == "local-cache";
|
|
2087
2089
|
function _() {
|
|
2088
2090
|
var i;
|
|
2089
2091
|
return `${e.storeName}_${((i = e.auth) == null ? void 0 : i.credentials.value.userID) ?? "no-user-id"}`;
|
|
2090
2092
|
}
|
|
2091
|
-
async function
|
|
2093
|
+
async function M() {
|
|
2092
2094
|
P == !0 && await ve().setItem(_(), {
|
|
2093
2095
|
meta: g.value,
|
|
2094
2096
|
data: t.value,
|
|
@@ -2098,44 +2100,44 @@ function qr(e) {
|
|
|
2098
2100
|
}
|
|
2099
2101
|
function $(i) {
|
|
2100
2102
|
const E = _();
|
|
2101
|
-
return
|
|
2103
|
+
return D.value[E] || (D.value[E] = new Promise(async (w, L) => {
|
|
2102
2104
|
var b, T;
|
|
2103
2105
|
try {
|
|
2104
|
-
let
|
|
2106
|
+
let x = await ((T = e.api) == null ? void 0 : T.getAll({
|
|
2105
2107
|
additionalUrl: "/getAll",
|
|
2106
2108
|
nav: i.nav,
|
|
2107
2109
|
params: {
|
|
2108
2110
|
lastUpdate: ((b = g.value) == null ? void 0 : b.lastUpdate) ?? ln()
|
|
2109
2111
|
}
|
|
2110
2112
|
}));
|
|
2111
|
-
|
|
2113
|
+
x == null ? L(x) : (t.value ?? (t.value = []), x.data.forEach((N) => {
|
|
2112
2114
|
var A, j;
|
|
2113
|
-
const f = t.value.findIndex((X) => X.id ==
|
|
2114
|
-
f >= 0 ? (A = t.value) == null || A.splice(f, 1,
|
|
2115
|
+
const f = t.value.findIndex((X) => X.id == N.id);
|
|
2116
|
+
f >= 0 ? (A = t.value) == null || A.splice(f, 1, N) : (j = t.value) == null || j.push(N);
|
|
2115
2117
|
}), l.value = t.value.length, g.value = {
|
|
2116
2118
|
lastUpdate: he.utc().toString(),
|
|
2117
2119
|
storedOn: S.toString()
|
|
2118
|
-
}, await
|
|
2119
|
-
} catch (
|
|
2120
|
-
|
|
2120
|
+
}, await M(), w(x));
|
|
2121
|
+
} catch (x) {
|
|
2122
|
+
L(x);
|
|
2121
2123
|
} finally {
|
|
2122
|
-
delete
|
|
2124
|
+
delete D.value[E];
|
|
2123
2125
|
}
|
|
2124
|
-
})),
|
|
2126
|
+
})), D.value[E];
|
|
2125
2127
|
}
|
|
2126
2128
|
async function d(i) {
|
|
2127
|
-
var
|
|
2129
|
+
var L, b, T;
|
|
2128
2130
|
const E = _(), w = i.refresh;
|
|
2129
2131
|
if (!w && t.value != null)
|
|
2130
2132
|
return {
|
|
2131
|
-
count: (
|
|
2133
|
+
count: (L = t.value) == null ? void 0 : L.length,
|
|
2132
2134
|
data: t.value,
|
|
2133
2135
|
filters: []
|
|
2134
2136
|
};
|
|
2135
2137
|
if (!w && P == !0) {
|
|
2136
|
-
const
|
|
2137
|
-
if (
|
|
2138
|
-
return t.value =
|
|
2138
|
+
const x = await ve().getItem(E);
|
|
2139
|
+
if (x != null && parseFloat(x.meta.storedOn) > S - 7)
|
|
2140
|
+
return t.value = x.data, l.value = x.data.length, s.value = x.filters ?? [], g.value = x.meta, {
|
|
2139
2141
|
count: (b = t.value) == null ? void 0 : b.length,
|
|
2140
2142
|
data: t.value ?? [],
|
|
2141
2143
|
filters: []
|
|
@@ -2150,23 +2152,23 @@ function qr(e) {
|
|
|
2150
2152
|
t.value ?? (t.value = []);
|
|
2151
2153
|
try {
|
|
2152
2154
|
return await $(i);
|
|
2153
|
-
} catch (
|
|
2154
|
-
let
|
|
2155
|
-
throw new Error(
|
|
2155
|
+
} catch (x) {
|
|
2156
|
+
let N = x;
|
|
2157
|
+
throw new Error(N.message ?? "Problem");
|
|
2156
2158
|
}
|
|
2157
2159
|
}
|
|
2158
2160
|
async function h(i) {
|
|
2159
|
-
var b, T,
|
|
2161
|
+
var b, T, x, N;
|
|
2160
2162
|
const E = _(), w = i.id ?? ((b = i.data) == null ? void 0 : b.id);
|
|
2161
2163
|
if (w == null)
|
|
2162
2164
|
throw new Error("no id provided");
|
|
2163
|
-
let
|
|
2164
|
-
if (!
|
|
2165
|
+
let L = i.refresh;
|
|
2166
|
+
if (!L && t.value != null) {
|
|
2165
2167
|
const f = t.value.find((A) => A.id == w);
|
|
2166
2168
|
if (f != null)
|
|
2167
2169
|
return { data: f };
|
|
2168
2170
|
}
|
|
2169
|
-
if (!
|
|
2171
|
+
if (!L && P == !0) {
|
|
2170
2172
|
const f = await ve().getItem(E);
|
|
2171
2173
|
if (f != null && parseFloat(f.meta.storedOn) > S - 12) {
|
|
2172
2174
|
t.value = f.data, l.value = f.data.length, s.value = f.filters ?? [], g.value = f.meta;
|
|
@@ -2177,18 +2179,18 @@ function qr(e) {
|
|
|
2177
2179
|
}
|
|
2178
2180
|
if (e.api == null)
|
|
2179
2181
|
return {
|
|
2180
|
-
data: (
|
|
2182
|
+
data: (x = t.value) == null ? void 0 : x.find((f) => f.id == i.id)
|
|
2181
2183
|
};
|
|
2182
2184
|
t.value ?? (t.value = []);
|
|
2183
2185
|
try {
|
|
2184
|
-
return await $(i), { data: (
|
|
2186
|
+
return await $(i), { data: (N = t.value) == null ? void 0 : N.find((f) => f.id == i.id) };
|
|
2185
2187
|
} catch (f) {
|
|
2186
2188
|
let A = f;
|
|
2187
2189
|
throw new Error(A.message ?? "Problem");
|
|
2188
2190
|
}
|
|
2189
2191
|
}
|
|
2190
2192
|
async function u(i) {
|
|
2191
|
-
var w,
|
|
2193
|
+
var w, L, b;
|
|
2192
2194
|
i.additionalUrl ?? (i.additionalUrl = "/patch");
|
|
2193
2195
|
let E;
|
|
2194
2196
|
if (e.api != null)
|
|
@@ -2196,19 +2198,19 @@ function qr(e) {
|
|
|
2196
2198
|
let T = await e.api.patch(i);
|
|
2197
2199
|
E = { ...i.data, ...T == null ? void 0 : T.data };
|
|
2198
2200
|
} catch (T) {
|
|
2199
|
-
let
|
|
2200
|
-
throw new Error(
|
|
2201
|
+
let x = T;
|
|
2202
|
+
throw new Error(x.message ?? "Patch Problem");
|
|
2201
2203
|
}
|
|
2202
2204
|
else
|
|
2203
2205
|
E = i.data;
|
|
2204
2206
|
if (E != null) {
|
|
2205
|
-
let T = (w = t.value) == null ? void 0 : w.findIndex((
|
|
2206
|
-
T != null && T >= 0 && (t.value ?? (t.value = []), (
|
|
2207
|
+
let T = (w = t.value) == null ? void 0 : w.findIndex((x) => x.id == E.id);
|
|
2208
|
+
T != null && T >= 0 && (t.value ?? (t.value = []), (L = t.value) == null || L.splice(T, 1, E), await M());
|
|
2207
2209
|
}
|
|
2208
2210
|
return (b = t.value) == null ? void 0 : b.find((T) => T.id == (i.id ?? i.data.id));
|
|
2209
2211
|
}
|
|
2210
2212
|
async function r(i) {
|
|
2211
|
-
var w,
|
|
2213
|
+
var w, L;
|
|
2212
2214
|
i.additionalUrl ?? (i.additionalUrl = "/post");
|
|
2213
2215
|
let E;
|
|
2214
2216
|
if (e.api != null)
|
|
@@ -2221,10 +2223,10 @@ function qr(e) {
|
|
|
2221
2223
|
}
|
|
2222
2224
|
else
|
|
2223
2225
|
E = i.data;
|
|
2224
|
-
return E != null && (t.value ?? (t.value = []), (w = t.value) == null || w.unshift(E), l.value += 1, await
|
|
2226
|
+
return E != null && (t.value ?? (t.value = []), (w = t.value) == null || w.unshift(E), l.value += 1, await M()), (L = t.value) == null ? void 0 : L.find((b) => b.id == (i.id ?? i.data.id));
|
|
2225
2227
|
}
|
|
2226
2228
|
async function y(i) {
|
|
2227
|
-
var w,
|
|
2229
|
+
var w, L;
|
|
2228
2230
|
if (i.additionalUrl ?? (i.additionalUrl = "/delete"), e.api != null)
|
|
2229
2231
|
try {
|
|
2230
2232
|
let b = await e.api.deleteItem(i);
|
|
@@ -2237,7 +2239,7 @@ function qr(e) {
|
|
|
2237
2239
|
const E = i.id ?? i.data.id;
|
|
2238
2240
|
if (E != null) {
|
|
2239
2241
|
let b = (w = t.value) == null ? void 0 : w.findIndex((T) => T.id == E);
|
|
2240
|
-
b != null && b >= 0 && (t.value ?? (t.value = []), (
|
|
2242
|
+
b != null && b >= 0 && (t.value ?? (t.value = []), (L = t.value) == null || L.splice(b, 1), await M());
|
|
2241
2243
|
}
|
|
2242
2244
|
}
|
|
2243
2245
|
async function I(i) {
|
|
@@ -2246,14 +2248,14 @@ function qr(e) {
|
|
|
2246
2248
|
try {
|
|
2247
2249
|
await e.api.patch(i);
|
|
2248
2250
|
} catch (w) {
|
|
2249
|
-
let
|
|
2250
|
-
throw new Error(
|
|
2251
|
+
let L = w;
|
|
2252
|
+
throw new Error(L.message ?? "Patch Problem");
|
|
2251
2253
|
}
|
|
2252
2254
|
try {
|
|
2253
2255
|
i.additionalUrl = "/getAll", await $(i);
|
|
2254
2256
|
} catch (w) {
|
|
2255
|
-
let
|
|
2256
|
-
throw new Error(
|
|
2257
|
+
let L = w;
|
|
2258
|
+
throw new Error(L.message ?? "Problem");
|
|
2257
2259
|
}
|
|
2258
2260
|
return (E = t.value) == null ? void 0 : E.find((w) => w.id == (i.id ?? i.data.id));
|
|
2259
2261
|
}
|
|
@@ -2272,7 +2274,7 @@ function Er() {
|
|
|
2272
2274
|
return Ar;
|
|
2273
2275
|
}
|
|
2274
2276
|
function En(e) {
|
|
2275
|
-
const t = (e == null ? void 0 : e.buildHeaders) ?? P, l = (e == null ? void 0 : e.buildQuery) ?? g, S = (e == null ? void 0 : e.buildUrl) ??
|
|
2277
|
+
const t = (e == null ? void 0 : e.buildHeaders) ?? P, l = (e == null ? void 0 : e.buildQuery) ?? g, S = (e == null ? void 0 : e.buildUrl) ?? D, s = e == null ? void 0 : e.demo;
|
|
2276
2278
|
function g(u) {
|
|
2277
2279
|
let r = new URLSearchParams();
|
|
2278
2280
|
return Object.entries(u).forEach((y) => {
|
|
@@ -2281,7 +2283,7 @@ function En(e) {
|
|
|
2281
2283
|
y[1] != null && r.append(y[0], y[1].toString());
|
|
2282
2284
|
}), r.toString();
|
|
2283
2285
|
}
|
|
2284
|
-
function
|
|
2286
|
+
function D(u) {
|
|
2285
2287
|
let r = Q(u.url) ?? void 0, y = Q(u.id);
|
|
2286
2288
|
return r == null && (e == null ? void 0 : e.findPath) != null && (r = e.findPath(u.nav)), u.additionalUrl != null && (r == null ? r = u.additionalUrl : r = Ue(r, u.additionalUrl)), y != null && (r != null && r.includes("{id}") ? r = r.replaceAll("{id}", y) : r = Ue(r, y)), u.params != null && (r = `${r}?${l(u.params)}`), u.finalUrl = r, u.finalUrl ?? "";
|
|
2287
2289
|
}
|
|
@@ -2310,22 +2312,22 @@ function En(e) {
|
|
|
2310
2312
|
name: "Unauthorized",
|
|
2311
2313
|
message: w.statusText
|
|
2312
2314
|
};
|
|
2313
|
-
let
|
|
2314
|
-
throw new Error(
|
|
2315
|
+
let L = await w.text();
|
|
2316
|
+
throw new Error(L ?? w.statusText ?? "Get error");
|
|
2315
2317
|
}
|
|
2316
2318
|
if (I)
|
|
2317
2319
|
return await w.text();
|
|
2318
2320
|
if (y)
|
|
2319
2321
|
return await w.json();
|
|
2320
2322
|
throw new Error();
|
|
2321
|
-
} catch (
|
|
2322
|
-
const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${
|
|
2323
|
+
} catch (L) {
|
|
2324
|
+
const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${L.message}`;
|
|
2323
2325
|
if (!r)
|
|
2324
2326
|
return;
|
|
2325
|
-
throw
|
|
2327
|
+
throw L.code == 401 ? L : new Error(b);
|
|
2326
2328
|
}
|
|
2327
2329
|
}
|
|
2328
|
-
async function
|
|
2330
|
+
async function M(u) {
|
|
2329
2331
|
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, I = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2330
2332
|
let i = u.finalUrl, E = u.headers;
|
|
2331
2333
|
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
|
|
@@ -2345,19 +2347,19 @@ function En(e) {
|
|
|
2345
2347
|
name: "Unauthorized",
|
|
2346
2348
|
message: w.statusText
|
|
2347
2349
|
};
|
|
2348
|
-
let
|
|
2349
|
-
throw new Error(
|
|
2350
|
+
let L = await w.text();
|
|
2351
|
+
throw new Error(L ?? w.statusText ?? "Get all error");
|
|
2350
2352
|
}
|
|
2351
2353
|
if (I)
|
|
2352
2354
|
return await w.text();
|
|
2353
2355
|
if (y)
|
|
2354
2356
|
return await w.json();
|
|
2355
2357
|
throw new Error();
|
|
2356
|
-
} catch (
|
|
2357
|
-
const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${
|
|
2358
|
+
} catch (L) {
|
|
2359
|
+
const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${L.message}`;
|
|
2358
2360
|
if (!r)
|
|
2359
2361
|
return;
|
|
2360
|
-
throw
|
|
2362
|
+
throw L.code == 401 ? L : new Error(b);
|
|
2361
2363
|
}
|
|
2362
2364
|
}
|
|
2363
2365
|
async function $(u) {
|
|
@@ -2381,19 +2383,19 @@ function En(e) {
|
|
|
2381
2383
|
name: "Unauthorized",
|
|
2382
2384
|
message: w.statusText
|
|
2383
2385
|
};
|
|
2384
|
-
let
|
|
2385
|
-
throw new Error(
|
|
2386
|
+
let L = await w.text();
|
|
2387
|
+
throw new Error(L ?? w.statusText ?? "Post error!");
|
|
2386
2388
|
}
|
|
2387
2389
|
if (I)
|
|
2388
2390
|
return await w.text();
|
|
2389
2391
|
if (y)
|
|
2390
2392
|
return await w.json();
|
|
2391
2393
|
throw new Error();
|
|
2392
|
-
} catch (
|
|
2394
|
+
} catch (L) {
|
|
2393
2395
|
if (w.status == 200 || !r)
|
|
2394
2396
|
return;
|
|
2395
|
-
const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${
|
|
2396
|
-
throw
|
|
2397
|
+
const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${L.message}`;
|
|
2398
|
+
throw L.code == 401 ? L : new Error(b);
|
|
2397
2399
|
}
|
|
2398
2400
|
}
|
|
2399
2401
|
async function d(u) {
|
|
@@ -2417,19 +2419,19 @@ function En(e) {
|
|
|
2417
2419
|
name: "Unauthorized",
|
|
2418
2420
|
message: w.statusText
|
|
2419
2421
|
};
|
|
2420
|
-
let
|
|
2421
|
-
throw new Error(
|
|
2422
|
+
let L = await w.text();
|
|
2423
|
+
throw new Error(L ?? w.statusText ?? "Patch error!");
|
|
2422
2424
|
}
|
|
2423
2425
|
if (I)
|
|
2424
2426
|
return await w.text();
|
|
2425
2427
|
if (y)
|
|
2426
2428
|
return await w.json();
|
|
2427
2429
|
throw new Error();
|
|
2428
|
-
} catch (
|
|
2430
|
+
} catch (L) {
|
|
2429
2431
|
if (w.status == 200 || !r)
|
|
2430
2432
|
return;
|
|
2431
|
-
const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${
|
|
2432
|
-
throw
|
|
2433
|
+
const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${L.message}`;
|
|
2434
|
+
throw L.code == 401 ? L : new Error(b);
|
|
2433
2435
|
}
|
|
2434
2436
|
}
|
|
2435
2437
|
async function h(u) {
|
|
@@ -2466,27 +2468,27 @@ function En(e) {
|
|
|
2466
2468
|
buildUrl: S,
|
|
2467
2469
|
deleteItem: h,
|
|
2468
2470
|
get: _,
|
|
2469
|
-
getAll:
|
|
2471
|
+
getAll: M,
|
|
2470
2472
|
patch: d,
|
|
2471
2473
|
post: $
|
|
2472
2474
|
}, Ar;
|
|
2473
2475
|
}
|
|
2474
2476
|
function ut(e) {
|
|
2475
|
-
const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors: S, isLoading: s, doAction: g, logError:
|
|
2477
|
+
const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors: S, isLoading: s, doAction: g, logError: D } = en(e);
|
|
2476
2478
|
function P(r) {
|
|
2477
2479
|
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to delete this item?" : void 0);
|
|
2478
2480
|
let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2479
2481
|
const I = (e == null ? void 0 : e.items) ?? [];
|
|
2480
|
-
return y == null && r.nav != null && (y =
|
|
2482
|
+
return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null ? r.onDeleteAsync ?? (r.onDeleteAsync = () => y().deleteItem(r)) : r.onDeleteAsync ?? (r.onDeleteAsync = () => {
|
|
2481
2483
|
var w;
|
|
2482
2484
|
const i = r.id ?? ((w = r.data) == null ? void 0 : w.id);
|
|
2483
2485
|
if (i == null)
|
|
2484
2486
|
return Promise.resolve("No id found in delete action");
|
|
2485
|
-
const E = I.findIndex((
|
|
2487
|
+
const E = I.findIndex((L) => L.id == i);
|
|
2486
2488
|
return E >= 0 && I.splice(E, 1), Promise.resolve(void 0);
|
|
2487
2489
|
}), g(async () => {
|
|
2488
2490
|
let i;
|
|
2489
|
-
r.onCanDeleteAsync != null && (i = await r.onCanDeleteAsync(r.data)), i == null && r.onDeleteAsync != null && (i = await r.onDeleteAsync(r.data)), i == null && r.onDeleteSuccessAsync != null && await r.onDeleteSuccessAsync(r.data),
|
|
2491
|
+
r.onCanDeleteAsync != null && (i = await r.onCanDeleteAsync(r.data)), i == null && r.onDeleteAsync != null && (i = await r.onDeleteAsync(r.data)), i == null && r.onDeleteSuccessAsync != null && await r.onDeleteSuccessAsync(r.data), D(i);
|
|
2490
2492
|
}, {
|
|
2491
2493
|
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
2492
2494
|
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
@@ -2500,7 +2502,7 @@ function ut(e) {
|
|
|
2500
2502
|
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);
|
|
2501
2503
|
let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2502
2504
|
const I = (e == null ? void 0 : e.items) ?? [];
|
|
2503
|
-
return y == null && r.nav != null && (y =
|
|
2505
|
+
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 = () => {
|
|
2504
2506
|
var E;
|
|
2505
2507
|
const i = r.id ?? ((E = r.data) == null ? void 0 : E.id);
|
|
2506
2508
|
return i == null ? Promise.resolve(void 0) : Promise.resolve(I.find((w) => w.id == i));
|
|
@@ -2516,11 +2518,11 @@ function ut(e) {
|
|
|
2516
2518
|
throwError: r.throwError ?? (e == null ? void 0 : e.throwError)
|
|
2517
2519
|
});
|
|
2518
2520
|
}
|
|
2519
|
-
function
|
|
2521
|
+
function M(r) {
|
|
2520
2522
|
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to get these items?" : void 0);
|
|
2521
2523
|
let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2522
2524
|
const I = (e == null ? void 0 : e.items) ?? [];
|
|
2523
|
-
return y == null && r.nav != null && (y =
|
|
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 () => {
|
|
2524
2526
|
let i;
|
|
2525
2527
|
return r.onGetAsync != null && (i = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (i = await r.onGetSuccessAsync(i, r)), i;
|
|
2526
2528
|
}, {
|
|
@@ -2535,9 +2537,9 @@ function ut(e) {
|
|
|
2535
2537
|
function $(r) {
|
|
2536
2538
|
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to restore this item?" : void 0);
|
|
2537
2539
|
let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2538
|
-
return y == null && r.nav != null && (y =
|
|
2540
|
+
return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null && (r.onRestoreAsync ?? (r.onRestoreAsync = () => y().restore(r))), g(async () => {
|
|
2539
2541
|
let I, i;
|
|
2540
|
-
return r.onCanRestoreAsync != null && (I = await r.onCanRestoreAsync(r.data)), I == null && r.onRestoreAsync != null && (i = await r.onRestoreAsync(r.data)), i != null && r.onRestoreSuccessAsync != null && await r.onRestoreSuccessAsync(i),
|
|
2542
|
+
return r.onCanRestoreAsync != null && (I = await r.onCanRestoreAsync(r.data)), I == null && r.onRestoreAsync != null && (i = await r.onRestoreAsync(r.data)), i != null && r.onRestoreSuccessAsync != null && await r.onRestoreSuccessAsync(i), D(I), i;
|
|
2541
2543
|
}, {
|
|
2542
2544
|
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
2543
2545
|
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
@@ -2551,7 +2553,7 @@ function ut(e) {
|
|
|
2551
2553
|
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);
|
|
2552
2554
|
let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2553
2555
|
const I = (e == null ? void 0 : e.items) ?? [];
|
|
2554
|
-
return r.onGetSaveAsync ?? (r.onGetSaveAsync = (i) => i), r.onCanSaveAsync ?? (r.onCanSaveAsync = () => Promise.resolve(void 0)), y == null && r.nav != null && (y =
|
|
2556
|
+
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 () => {
|
|
2555
2557
|
var i;
|
|
2556
2558
|
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);
|
|
2557
2559
|
}) : r.onSaveAsync ?? (r.onSaveAsync = (i) => {
|
|
@@ -2563,7 +2565,7 @@ function ut(e) {
|
|
|
2563
2565
|
return;
|
|
2564
2566
|
if (r.onCanSaveAsync != null) {
|
|
2565
2567
|
let w = await r.onCanSaveAsync(i);
|
|
2566
|
-
if (
|
|
2568
|
+
if (D(w), w != null)
|
|
2567
2569
|
return;
|
|
2568
2570
|
}
|
|
2569
2571
|
let E;
|
|
@@ -2591,10 +2593,10 @@ function ut(e) {
|
|
|
2591
2593
|
clearErrors: S,
|
|
2592
2594
|
deleteItem: P,
|
|
2593
2595
|
doAction: g,
|
|
2594
|
-
getAllItems:
|
|
2596
|
+
getAllItems: M,
|
|
2595
2597
|
getItem: _,
|
|
2596
2598
|
isLoading: s,
|
|
2597
|
-
logError:
|
|
2599
|
+
logError: D,
|
|
2598
2600
|
restoreItem: $,
|
|
2599
2601
|
saveItem: d
|
|
2600
2602
|
};
|
|
@@ -2612,119 +2614,119 @@ function Dn(e) {
|
|
|
2612
2614
|
l.value = Math.random().toString(36).substring(4, 19) + Math.random().toString(12).substring(1, 11), localStorage.setItem(Hr, l.value);
|
|
2613
2615
|
}
|
|
2614
2616
|
const s = Zt("auth-credentials", {});
|
|
2615
|
-
function g(
|
|
2616
|
-
if (
|
|
2617
|
+
function g(x) {
|
|
2618
|
+
if (x == null)
|
|
2617
2619
|
return !0;
|
|
2618
|
-
var
|
|
2619
|
-
if (
|
|
2620
|
+
var N = e.getAuthItem != null ? e.getAuthItem(x) : null;
|
|
2621
|
+
if (N == null)
|
|
2620
2622
|
return !1;
|
|
2621
|
-
if (
|
|
2623
|
+
if (N.requiresAuth === !1)
|
|
2622
2624
|
return !0;
|
|
2623
2625
|
const f = Q(s);
|
|
2624
|
-
if (f.isSuspended &&
|
|
2626
|
+
if (f.isSuspended && N.ignoreSuspension !== !0)
|
|
2625
2627
|
return !1;
|
|
2626
2628
|
if (f.isGlobalAdmin)
|
|
2627
2629
|
return !0;
|
|
2628
|
-
if (
|
|
2629
|
-
for (var A = 0; A <
|
|
2630
|
-
if (!
|
|
2630
|
+
if (N.permissions != null) {
|
|
2631
|
+
for (var A = 0; A < N.permissions.length; A++)
|
|
2632
|
+
if (!D(N.permissions[A]))
|
|
2631
2633
|
return !1;
|
|
2632
2634
|
}
|
|
2633
2635
|
return !0;
|
|
2634
2636
|
}
|
|
2635
|
-
function x
|
|
2636
|
-
const
|
|
2637
|
-
if (
|
|
2638
|
-
for (var f = 0; f <
|
|
2639
|
-
var A =
|
|
2640
|
-
if (
|
|
2637
|
+
function D(x) {
|
|
2638
|
+
const N = Q(s);
|
|
2639
|
+
if (N.userPermissions != null)
|
|
2640
|
+
for (var f = 0; f < N.userPermissions.length; f++) {
|
|
2641
|
+
var A = N.userPermissions[f].split(".");
|
|
2642
|
+
if (N.userPermissions[f] == "everything.edit" || x == A[0] && A.length > 1 && A[1] == "edit")
|
|
2641
2643
|
return !0;
|
|
2642
2644
|
}
|
|
2643
2645
|
return !1;
|
|
2644
2646
|
}
|
|
2645
|
-
function P(
|
|
2646
|
-
if (
|
|
2647
|
+
function P(x) {
|
|
2648
|
+
if (x == null)
|
|
2647
2649
|
return !0;
|
|
2648
|
-
var
|
|
2649
|
-
if (
|
|
2650
|
+
var N = e.getAuthItem != null ? e.getAuthItem(x) : null;
|
|
2651
|
+
if (N == null)
|
|
2650
2652
|
return !1;
|
|
2651
|
-
if (
|
|
2653
|
+
if (N.requiresAuth === !1)
|
|
2652
2654
|
return !0;
|
|
2653
2655
|
const f = Q(s);
|
|
2654
|
-
if (f.isSuspended &&
|
|
2656
|
+
if (f.isSuspended && N.ignoreSuspension !== !0)
|
|
2655
2657
|
return !1;
|
|
2656
2658
|
if (f.isGlobalAdmin)
|
|
2657
2659
|
return !0;
|
|
2658
|
-
if (
|
|
2659
|
-
for (var A = 0; A <
|
|
2660
|
-
if (!_(
|
|
2660
|
+
if (N.permissions != null) {
|
|
2661
|
+
for (var A = 0; A < N.permissions.length; A++)
|
|
2662
|
+
if (!_(N.permissions[A]))
|
|
2661
2663
|
return !1;
|
|
2662
2664
|
}
|
|
2663
2665
|
return !0;
|
|
2664
2666
|
}
|
|
2665
|
-
function _(
|
|
2666
|
-
const
|
|
2667
|
-
if (
|
|
2668
|
-
for (var f = 0; f <
|
|
2669
|
-
var A =
|
|
2670
|
-
if (
|
|
2667
|
+
function _(x) {
|
|
2668
|
+
const N = Q(s);
|
|
2669
|
+
if (N.userPermissions != null)
|
|
2670
|
+
for (var f = 0; f < N.userPermissions.length; f++) {
|
|
2671
|
+
var A = N.userPermissions[f].split(".");
|
|
2672
|
+
if (x == A[0] || x == "everything" || N.userPermissions[f] == "everything.view" || N.userPermissions[f] == "everything.edit")
|
|
2671
2673
|
return !0;
|
|
2672
2674
|
}
|
|
2673
2675
|
return !1;
|
|
2674
2676
|
}
|
|
2675
|
-
function
|
|
2677
|
+
function M(x, N, f) {
|
|
2676
2678
|
let A = !0;
|
|
2677
|
-
return Q(s).isGlobalAdmin ? !0 : (
|
|
2678
|
-
f == "edit" ?
|
|
2679
|
-
}),
|
|
2679
|
+
return Q(s).isGlobalAdmin ? !0 : (N != null && N.length > 0 && N.forEach((X) => {
|
|
2680
|
+
f == "edit" ? D(X) || (A = !1) : _(X) || (A = !1);
|
|
2681
|
+
}), x != null && x.length > 0 && (x.some((X) => u(X)) || (A = !1)), A);
|
|
2680
2682
|
}
|
|
2681
|
-
function $(
|
|
2682
|
-
var f = e.getAuthItem != null ? e.getAuthItem(
|
|
2683
|
+
function $(x, N = !1) {
|
|
2684
|
+
var f = e.getAuthItem != null ? e.getAuthItem(x) : null;
|
|
2683
2685
|
let A = !1;
|
|
2684
2686
|
if (f == null)
|
|
2685
2687
|
return !1;
|
|
2686
|
-
let j = f.subscriptions ?? [], X = f.permissions ?? [], re =
|
|
2687
|
-
return re || !
|
|
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) => {
|
|
2688
2690
|
$(ue, !0) && (A = !0);
|
|
2689
2691
|
}), A);
|
|
2690
2692
|
}
|
|
2691
|
-
function d(
|
|
2692
|
-
return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (
|
|
2693
|
+
function d(x) {
|
|
2694
|
+
return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (N, f) => {
|
|
2693
2695
|
const A = Ue(Wr(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${f}`);
|
|
2694
|
-
return
|
|
2695
|
-
}), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(
|
|
2696
|
+
return N ? `${A}&redirect_path=${N}` : A;
|
|
2697
|
+
}), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(x, l.value) ?? "" : "";
|
|
2696
2698
|
}
|
|
2697
|
-
function h(
|
|
2699
|
+
function h(x) {
|
|
2698
2700
|
var f;
|
|
2699
|
-
return
|
|
2701
|
+
return x == null ? 0 : ((f = (e.subscriptionOptions ?? []).find((A) => A.code == x)) == null ? void 0 : f.value) ?? 0;
|
|
2700
2702
|
}
|
|
2701
|
-
function u(
|
|
2702
|
-
const
|
|
2703
|
-
if (
|
|
2703
|
+
function u(x) {
|
|
2704
|
+
const N = Q(s);
|
|
2705
|
+
if (N.subscriptionCode == null)
|
|
2704
2706
|
return !1;
|
|
2705
|
-
if (
|
|
2707
|
+
if (N.subscriptionCode == x)
|
|
2706
2708
|
return !0;
|
|
2707
|
-
const f = h(
|
|
2709
|
+
const f = h(x), A = h(N.subscriptionCode);
|
|
2708
2710
|
return f <= A;
|
|
2709
2711
|
}
|
|
2710
|
-
function r(
|
|
2711
|
-
const f =
|
|
2712
|
+
function r(x) {
|
|
2713
|
+
const f = x.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), A = decodeURIComponent(
|
|
2712
2714
|
atob(f).split("").map(function(j) {
|
|
2713
2715
|
return "%" + ("00" + j.charCodeAt(0).toString(16)).slice(-2);
|
|
2714
2716
|
}).join("")
|
|
2715
2717
|
);
|
|
2716
2718
|
return JSON.parse(A);
|
|
2717
2719
|
}
|
|
2718
|
-
function y(
|
|
2719
|
-
s.value = void 0,
|
|
2720
|
+
function y(x, N) {
|
|
2721
|
+
s.value = void 0, L(), x != null && N != null && N.currentRoute.value.path != x && N.push({ path: x });
|
|
2720
2722
|
}
|
|
2721
|
-
function I(
|
|
2723
|
+
function I(x) {
|
|
2722
2724
|
var f;
|
|
2723
|
-
Q(s).isLoggedIn || ((f = e.demo) == null || f.endDemo(), T() && (y(), window.location.href = d(
|
|
2725
|
+
Q(s).isLoggedIn || ((f = e.demo) == null || f.endDemo(), T() && (y(), window.location.href = d(x)));
|
|
2724
2726
|
}
|
|
2725
|
-
async function i(
|
|
2727
|
+
async function i(x, N) {
|
|
2726
2728
|
return e.getToken ?? (e.getToken = async () => {
|
|
2727
|
-
let f =
|
|
2729
|
+
let f = x, A = N, j = e.oauthGrantType ?? "authorization_token", X = e.oauthClientID ?? "";
|
|
2728
2730
|
if (f == null || A == null)
|
|
2729
2731
|
throw new Error("Code and State required in OAuth token process");
|
|
2730
2732
|
if (A != l.value)
|
|
@@ -2738,42 +2740,42 @@ function Dn(e) {
|
|
|
2738
2740
|
data: ue
|
|
2739
2741
|
});
|
|
2740
2742
|
E(G.access_token);
|
|
2741
|
-
}), await e.getToken(
|
|
2743
|
+
}), await e.getToken(x, N);
|
|
2742
2744
|
}
|
|
2743
|
-
function E(
|
|
2744
|
-
if (
|
|
2745
|
-
const
|
|
2746
|
-
w(
|
|
2745
|
+
function E(x) {
|
|
2746
|
+
if (x != null && (e.demo == null || !e.demo.isDemoing.value)) {
|
|
2747
|
+
const N = r(x);
|
|
2748
|
+
w(N, x), e.processTokenPayload != null && e.processTokenPayload(s, N);
|
|
2747
2749
|
}
|
|
2748
2750
|
}
|
|
2749
|
-
function w(
|
|
2751
|
+
function w(x, N) {
|
|
2750
2752
|
var A;
|
|
2751
2753
|
const f = s.value;
|
|
2752
|
-
f.expiresOn =
|
|
2754
|
+
f.expiresOn = x.ExpiresOn, f.isGlobalAdmin = x.IsGlobalAdmin == "True", f.isLoggedIn = !0, f.permissions = x.Permissions, f.subscriptionCode = x.Subscription, f.timeZone ?? (f.timeZone = e.defaultTimeZone ?? hr), f.token = N, f.userID = x.UserLoginID, f.userPermissions = ((A = x.Permissions) == null ? void 0 : A.split(",")) ?? [];
|
|
2753
2755
|
}
|
|
2754
|
-
function
|
|
2755
|
-
var
|
|
2756
|
-
s.value ?? (s.value = {}), (
|
|
2756
|
+
function L() {
|
|
2757
|
+
var x;
|
|
2758
|
+
s.value ?? (s.value = {}), (x = s.value).timeZone ?? (x.timeZone = e.defaultTimeZone ?? hr);
|
|
2757
2759
|
}
|
|
2758
2760
|
function b() {
|
|
2759
|
-
const
|
|
2760
|
-
return
|
|
2761
|
+
const x = Q(s);
|
|
2762
|
+
return x.isLoggedIn && T() && (y(), window.location.href = d()), x.isLoggedIn;
|
|
2761
2763
|
}
|
|
2762
2764
|
function T() {
|
|
2763
|
-
const
|
|
2764
|
-
if (
|
|
2765
|
+
const x = Q(s);
|
|
2766
|
+
if (x == null || x.expiresOn == null)
|
|
2765
2767
|
return !0;
|
|
2766
|
-
const
|
|
2767
|
-
return
|
|
2768
|
+
const N = he.fromFormat(x.expiresOn, t), f = he.utc();
|
|
2769
|
+
return N <= f;
|
|
2768
2770
|
}
|
|
2769
|
-
return
|
|
2771
|
+
return L(), Ir = {
|
|
2770
2772
|
authState: l,
|
|
2771
2773
|
canEdit: g,
|
|
2772
|
-
canEditPermit:
|
|
2774
|
+
canEditPermit: D,
|
|
2773
2775
|
canView: P,
|
|
2774
2776
|
canViewPermit: _,
|
|
2775
2777
|
credentials: s,
|
|
2776
|
-
doShow:
|
|
2778
|
+
doShow: M,
|
|
2777
2779
|
doShowByNav: $,
|
|
2778
2780
|
getAuthorizeUrl: d,
|
|
2779
2781
|
getToken: i,
|
|
@@ -2791,62 +2793,62 @@ function xn(e, t, l = {}) {
|
|
|
2791
2793
|
preventDefault: S = !1,
|
|
2792
2794
|
stopPropagation: s = !1,
|
|
2793
2795
|
axis: g = "both"
|
|
2794
|
-
} = l,
|
|
2795
|
-
let P = { x: 0, y: 0 }, _ = { x: 0, y: 0 },
|
|
2796
|
-
function u(
|
|
2797
|
-
Q(S) &&
|
|
2796
|
+
} = l, D = { capture: l.capture ?? !0 };
|
|
2797
|
+
let P = { x: 0, y: 0 }, _ = { x: 0, y: 0 }, M = { x: 0, y: 0 }, $ = [], d = [], h = z(!1);
|
|
2798
|
+
function u(L) {
|
|
2799
|
+
Q(S) && L.preventDefault(), Q(s) && L.stopPropagation();
|
|
2798
2800
|
}
|
|
2799
|
-
function r(
|
|
2801
|
+
function r(L) {
|
|
2800
2802
|
var f;
|
|
2801
2803
|
const b = Q(e);
|
|
2802
2804
|
if (!b)
|
|
2803
2805
|
return;
|
|
2804
|
-
const T = b.$el,
|
|
2805
|
-
|
|
2806
|
+
const T = b.$el, N = L.type === "touchstart" && L.touches.length > 0 ? L.touches[0] : L;
|
|
2807
|
+
M = { x: N.clientX, y: N.clientY }, _ = {
|
|
2806
2808
|
x: T.offsetLeft,
|
|
2807
2809
|
y: T.offsetTop
|
|
2808
2810
|
}, P = {
|
|
2809
2811
|
x: T.offsetLeft,
|
|
2810
2812
|
y: T.offsetTop
|
|
2811
|
-
}, ((f = l.onStart) == null ? void 0 : f.call(l,
|
|
2813
|
+
}, ((f = l.onStart) == null ? void 0 : f.call(l, M, L)) !== !1 && (d.push(me("mousemove", y)), d.push(me("touchmove", y)), d.push(me("mouseup", I)), d.push(me("touchend", I)), u(L));
|
|
2812
2814
|
}
|
|
2813
|
-
function y(
|
|
2815
|
+
function y(L) {
|
|
2814
2816
|
var A;
|
|
2815
|
-
if (!
|
|
2817
|
+
if (!M || !Q(e))
|
|
2816
2818
|
return;
|
|
2817
|
-
const
|
|
2818
|
-
let
|
|
2819
|
-
(g === "x" || g === "both") && (P.x = _.x +
|
|
2819
|
+
const x = L.type === "touchmove" && L.touches.length > 0 ? L.touches[0] : L;
|
|
2820
|
+
let N = x.clientX - M.x, f = x.clientY - M.y;
|
|
2821
|
+
(g === "x" || g === "both") && (P.x = _.x + N), (g === "y" || g === "both") && (P.y = _.y + f), (A = l.onMove) == null || A.call(l, P, L), u(L), i(P);
|
|
2820
2822
|
}
|
|
2821
|
-
function I(
|
|
2823
|
+
function I(L) {
|
|
2822
2824
|
var b;
|
|
2823
2825
|
document.documentElement.style.cursor = "", d.forEach((T) => {
|
|
2824
2826
|
T();
|
|
2825
|
-
}), d.length = 0, (b = l.onEnd) == null || b.call(l, P,
|
|
2827
|
+
}), d.length = 0, (b = l.onEnd) == null || b.call(l, P, L), u(L);
|
|
2826
2828
|
}
|
|
2827
|
-
function i(
|
|
2829
|
+
function i(L) {
|
|
2828
2830
|
const b = Q(e);
|
|
2829
2831
|
if (!b)
|
|
2830
2832
|
return;
|
|
2831
2833
|
const T = b.$el;
|
|
2832
|
-
T.style.left = `${
|
|
2834
|
+
T.style.left = `${L.x}px`, T.style.top = `${L.y}px`;
|
|
2833
2835
|
}
|
|
2834
2836
|
function E() {
|
|
2835
2837
|
if (Q(h))
|
|
2836
2838
|
return;
|
|
2837
|
-
const
|
|
2838
|
-
if (!
|
|
2839
|
+
const L = Q(t);
|
|
2840
|
+
if (!L)
|
|
2839
2841
|
return;
|
|
2840
|
-
const b =
|
|
2841
|
-
b.style.cursor = "move", $.push(me(b, "mousedown", r,
|
|
2842
|
+
const b = L.$el;
|
|
2843
|
+
b.style.cursor = "move", $.push(me(b, "mousedown", r, D)), $.push(me(b, "touchstart", r, D)), h.value = !0;
|
|
2842
2844
|
}
|
|
2843
2845
|
function w() {
|
|
2844
2846
|
if (!Q(h))
|
|
2845
2847
|
return;
|
|
2846
|
-
const
|
|
2847
|
-
if (!
|
|
2848
|
+
const L = Q(t);
|
|
2849
|
+
if (!L)
|
|
2848
2850
|
return;
|
|
2849
|
-
const b =
|
|
2851
|
+
const b = L.$el;
|
|
2850
2852
|
b.style.cursor = "", $.forEach((T) => {
|
|
2851
2853
|
T();
|
|
2852
2854
|
}), $.length = 0, h.value = !1;
|
|
@@ -2859,25 +2861,25 @@ function xn(e, t, l = {}) {
|
|
|
2859
2861
|
}
|
|
2860
2862
|
const Tn = ["t", "r", "b", "l", "tr", "br", "bl", "tl"];
|
|
2861
2863
|
function _n(e, t = {}) {
|
|
2862
|
-
let l, S = t.handleWidth ?? 12, s = t.handleZIndex ?? 100, g = t.minWidth ?? 0,
|
|
2864
|
+
let l, S = t.handleWidth ?? 12, s = t.handleZIndex ?? 100, g = t.minWidth ?? 0, D = t.maxWidth ?? Number.MAX_SAFE_INTEGER, P = t.minHeight ?? 0, _ = t.maxHeight ?? Number.MAX_SAFE_INTEGER, M = t.preventDefault ?? !1, $ = t.stopPropagation ?? !1, d, h = [];
|
|
2863
2865
|
const u = z(!1);
|
|
2864
2866
|
let r = [], y = [];
|
|
2865
2867
|
const I = z(!1), i = z({ x: 0, y: 0 });
|
|
2866
2868
|
let E = { left: 0, top: 0, height: 0, width: 0, position: "absolute" }, w = {};
|
|
2867
|
-
function
|
|
2868
|
-
Ee(
|
|
2869
|
+
function L(G) {
|
|
2870
|
+
Ee(M) && G.preventDefault(), Ee($) && G.stopPropagation();
|
|
2869
2871
|
}
|
|
2870
2872
|
function b(G, Y) {
|
|
2871
|
-
h = Y.map(
|
|
2873
|
+
h = Y.map(x), h.forEach((H) => G.$el.appendChild(H));
|
|
2872
2874
|
}
|
|
2873
2875
|
function T(G) {
|
|
2874
2876
|
h.forEach((Y) => G.$el.removeChild(Y));
|
|
2875
2877
|
}
|
|
2876
|
-
function
|
|
2878
|
+
function x(G) {
|
|
2877
2879
|
const Y = S + "px", H = -S / 2 + "px", ie = s + 1, Z = document.createElement("div");
|
|
2878
2880
|
return Z.dataset.handle = G, Z.style.position = "absolute", Z.style.touchAction = "none", Z.style.userSelect = "none", Z.style.zIndex = (G.length === 1 ? s : ie).toString(), Z.style.cursor = j(G), G.includes("t") && (Z.style.top = H, Z.style.height = Y, G === "t" && (Z.style.left = "0", Z.style.width = "100%")), G.includes("b") && (Z.style.bottom = H, Z.style.height = Y, G === "b" && (Z.style.left = "0", Z.style.width = "100%")), G.includes("r") && (Z.style.right = H, Z.style.width = Y, G === "r" && (Z.style.top = "0", Z.style.height = "100%")), G.includes("l") && (Z.style.left = H, Z.style.width = Y, G === "l" && (Z.style.top = "0", Z.style.height = "100%")), Z;
|
|
2879
2881
|
}
|
|
2880
|
-
function
|
|
2882
|
+
function N(G) {
|
|
2881
2883
|
var ne;
|
|
2882
2884
|
if (!h.some((ce) => ce == G.target))
|
|
2883
2885
|
return;
|
|
@@ -2890,10 +2892,10 @@ function _n(e, t = {}) {
|
|
|
2890
2892
|
top: H.offsetTop,
|
|
2891
2893
|
height: parseInt(window.getComputedStyle(H).getPropertyValue("height")),
|
|
2892
2894
|
width: parseInt(window.getComputedStyle(H).getPropertyValue("width"))
|
|
2893
|
-
}, w =
|
|
2895
|
+
}, w = Nr(E), ((ne = t.onStart) == null ? void 0 : ne.call(t, i.value, G)) === !1)
|
|
2894
2896
|
return;
|
|
2895
2897
|
let W = G.target;
|
|
2896
|
-
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)),
|
|
2898
|
+
document.documentElement.style.cursor = j(W.dataset.handle), d = W.dataset.handle, y.push(me("mousemove", f)), y.push(me("mouseup", A)), y.push(me("touchmove", f)), y.push(me("touchend", A)), L(G);
|
|
2897
2899
|
}
|
|
2898
2900
|
function f(G) {
|
|
2899
2901
|
const Y = Ee(e);
|
|
@@ -2911,14 +2913,14 @@ function _n(e, t = {}) {
|
|
|
2911
2913
|
w.height = se;
|
|
2912
2914
|
}
|
|
2913
2915
|
if (d.includes("l")) {
|
|
2914
|
-
const se = Math.min(
|
|
2916
|
+
const se = Math.min(D, Math.max(g, (ce.width ?? 0) - W));
|
|
2915
2917
|
w.width = se, w.left = (ce.left ?? 0) + W;
|
|
2916
2918
|
}
|
|
2917
2919
|
if (d.includes("r")) {
|
|
2918
|
-
const se = Math.min(
|
|
2920
|
+
const se = Math.min(D, Math.max(g, (ce.width ?? 0) + W));
|
|
2919
2921
|
w.width = se;
|
|
2920
2922
|
}
|
|
2921
|
-
H.dispatchEvent(new CustomEvent("resize")),
|
|
2923
|
+
H.dispatchEvent(new CustomEvent("resize")), L(G), re(w);
|
|
2922
2924
|
}
|
|
2923
2925
|
function A() {
|
|
2924
2926
|
document.documentElement.style.cursor = "", d = null, y.forEach((G) => {
|
|
@@ -2992,7 +2994,7 @@ function _n(e, t = {}) {
|
|
|
2992
2994
|
if (I.value)
|
|
2993
2995
|
return;
|
|
2994
2996
|
const H = Ee(e);
|
|
2995
|
-
H && (b(H, G ?? Tn), X(Y), r.push(me(H.$el, "mousedown",
|
|
2997
|
+
H && (b(H, G ?? Tn), X(Y), r.push(me(H.$el, "mousedown", N)), r.push(me(H.$el, "touchstart", N)), I.value = !0, l = Y);
|
|
2996
2998
|
}
|
|
2997
2999
|
function be(G) {
|
|
2998
3000
|
if (!I.value)
|
|
@@ -3009,18 +3011,18 @@ function _n(e, t = {}) {
|
|
|
3009
3011
|
};
|
|
3010
3012
|
}
|
|
3011
3013
|
function Cn(e) {
|
|
3012
|
-
const t = (e == null ? void 0 : e.blade) ?? z(null), l = (e == null ? void 0 : e.handle) ?? z(null), S = z(!1), s = (e == null ? void 0 : e.mobileBreakpoint) ?? 500, g = z((e == null ? void 0 : e.defaultVariant) ?? "page"),
|
|
3014
|
+
const t = (e == null ? void 0 : e.blade) ?? z(null), l = (e == null ? void 0 : e.handle) ?? z(null), S = z(!1), s = (e == null ? void 0 : e.mobileBreakpoint) ?? 500, g = z((e == null ? void 0 : e.defaultVariant) ?? "page"), D = z({}), { turnResizingOff: P, turnResizingOn: _ } = _n(t), { turnDraggableOff: M, turnDraggableOn: $ } = xn(t, l);
|
|
3013
3015
|
jt(t, (h) => {
|
|
3014
3016
|
const u = h[0], { width: r } = u.contentRect;
|
|
3015
3017
|
S.value = r < s;
|
|
3016
3018
|
});
|
|
3017
3019
|
function d(h) {
|
|
3018
|
-
|
|
3020
|
+
M(), h == "page" ? P(h) : h == "blade" ? _(["l", "r"], h) : h == "freestyle" ? (P(), _(void 0, h), $()) : h == "inline" && P();
|
|
3019
3021
|
}
|
|
3020
3022
|
return d(g.value), Te(g, (h) => d(h)), {
|
|
3021
3023
|
isMobile: S,
|
|
3022
3024
|
variant: g,
|
|
3023
|
-
bladeData:
|
|
3025
|
+
bladeData: D
|
|
3024
3026
|
};
|
|
3025
3027
|
}
|
|
3026
3028
|
const mr = {
|
|
@@ -3090,7 +3092,7 @@ function Pn(e) {
|
|
|
3090
3092
|
}
|
|
3091
3093
|
}));
|
|
3092
3094
|
}
|
|
3093
|
-
function
|
|
3095
|
+
function D(d) {
|
|
3094
3096
|
var h;
|
|
3095
3097
|
if (l != null) {
|
|
3096
3098
|
const u = l.themes.value.dark, r = l.themes.value.light;
|
|
@@ -3103,7 +3105,7 @@ function Pn(e) {
|
|
|
3103
3105
|
function _() {
|
|
3104
3106
|
t.value.drawerStick = !t.value.drawerStick;
|
|
3105
3107
|
}
|
|
3106
|
-
function
|
|
3108
|
+
function M() {
|
|
3107
3109
|
t.value.theme = t.value.theme == "dark" ? "light" : "dark", l != null && (l.global.name.value = t.value.theme);
|
|
3108
3110
|
}
|
|
3109
3111
|
function $() {
|
|
@@ -3118,17 +3120,17 @@ function Pn(e) {
|
|
|
3118
3120
|
}), Dr = {
|
|
3119
3121
|
state: t,
|
|
3120
3122
|
resetCosmetics: g,
|
|
3121
|
-
setTemporaryColor:
|
|
3123
|
+
setTemporaryColor: D,
|
|
3122
3124
|
toggleDrawer: P,
|
|
3123
3125
|
toggleDrawerStick: _,
|
|
3124
|
-
toggleLightDark:
|
|
3126
|
+
toggleLightDark: M,
|
|
3125
3127
|
undoTemporaryColor: $
|
|
3126
3128
|
}, Dr;
|
|
3127
3129
|
}
|
|
3128
3130
|
const wa = {
|
|
3129
3131
|
canExportCSV: !1
|
|
3130
3132
|
};
|
|
3131
|
-
function
|
|
3133
|
+
function Mn() {
|
|
3132
3134
|
function e(t) {
|
|
3133
3135
|
const {
|
|
3134
3136
|
items: l,
|
|
@@ -3138,29 +3140,29 @@ function Nn() {
|
|
|
3138
3140
|
} = t;
|
|
3139
3141
|
if (!_e(l))
|
|
3140
3142
|
return;
|
|
3141
|
-
let
|
|
3142
|
-
S != null ?
|
|
3143
|
+
let D = [];
|
|
3144
|
+
S != null ? D = S == null ? void 0 : S.filter((I) => (I.csv ?? I.csvText ?? I.csvFilter ?? I.csvArray) != null).map((I) => ({
|
|
3143
3145
|
header: I.title ?? I.value ?? "",
|
|
3144
3146
|
itemText: I.itemText,
|
|
3145
3147
|
value: I.value
|
|
3146
|
-
})) :
|
|
3148
|
+
})) : D = Object.keys(l[0]).map((I) => ({ header: tn(I) ?? "", value: I })), D = D.filter((I) => I.header.length > 0);
|
|
3147
3149
|
var P = [];
|
|
3148
3150
|
for (let I = 0; I < l.length; I++) {
|
|
3149
3151
|
const i = l[I];
|
|
3150
|
-
var _ = {},
|
|
3151
|
-
for (let E = 0; E <
|
|
3152
|
-
const w =
|
|
3152
|
+
var _ = {}, M = [];
|
|
3153
|
+
for (let E = 0; E < D.length; E++) {
|
|
3154
|
+
const w = D[E];
|
|
3153
3155
|
var $ = null;
|
|
3154
3156
|
typeof w.value == "function" ? $ = w.value(i) : typeof w.value == "string" && ($ = Sr(i, w.value)), w.itemText != null ? _[w.header] = Sr($, w.itemText) : _[w.header] = $;
|
|
3155
3157
|
}
|
|
3156
|
-
P.push(_), _e(
|
|
3158
|
+
P.push(_), _e(M) && M.forEach((E) => {
|
|
3157
3159
|
P.push(E);
|
|
3158
|
-
}),
|
|
3160
|
+
}), M = [];
|
|
3159
3161
|
}
|
|
3160
3162
|
var d = [];
|
|
3161
|
-
if (d.push(
|
|
3163
|
+
if (d.push(D.map((I) => I.header).toString()), P.forEach((I) => {
|
|
3162
3164
|
let i = [];
|
|
3163
|
-
|
|
3165
|
+
D.forEach(function(E) {
|
|
3164
3166
|
var w = I[E.header];
|
|
3165
3167
|
i.push(w ?? "");
|
|
3166
3168
|
}), d.push(i.join(","));
|
|
@@ -3185,7 +3187,7 @@ let xr;
|
|
|
3185
3187
|
function ba() {
|
|
3186
3188
|
return xr;
|
|
3187
3189
|
}
|
|
3188
|
-
function
|
|
3190
|
+
function Ln(e) {
|
|
3189
3191
|
const t = e.getUTC ?? he.utc;
|
|
3190
3192
|
function l() {
|
|
3191
3193
|
return s().startOf("day").toUTC().toString() ?? "";
|
|
@@ -3193,28 +3195,28 @@ function Mn(e) {
|
|
|
3193
3195
|
function S() {
|
|
3194
3196
|
return s().startOf("day").plus({ day: 1 }).toUTC().toString() ?? "";
|
|
3195
3197
|
}
|
|
3196
|
-
function s(_,
|
|
3197
|
-
return _ == null ? t().setZone(e.getTimeZone()) :
|
|
3198
|
+
function s(_, M) {
|
|
3199
|
+
return _ == null ? t().setZone(e.getTimeZone()) : M ? he.fromFormat(_, M, { zone: e.getTimeZone() }) : he.fromISO(_, { zone: e.getTimeZone() });
|
|
3198
3200
|
}
|
|
3199
|
-
function g(_,
|
|
3201
|
+
function g(_, M, $) {
|
|
3200
3202
|
if (_ == null) {
|
|
3201
3203
|
const h = t().setZone(e.getTimeZone());
|
|
3202
|
-
return
|
|
3204
|
+
return M ? h.toFormat(M) : h.toString();
|
|
3203
3205
|
}
|
|
3204
3206
|
if (_ == "Invalid DateTime")
|
|
3205
3207
|
return "";
|
|
3206
3208
|
const d = $ ? he.fromFormat(_, $, { zone: e.getTimeZone() }) : he.fromISO(_, { zone: e.getTimeZone() });
|
|
3207
|
-
return
|
|
3209
|
+
return M ? d.toFormat(M) : d == null ? void 0 : d.toString();
|
|
3208
3210
|
}
|
|
3209
|
-
function
|
|
3210
|
-
return _ == null ? t() :
|
|
3211
|
+
function D(_, M) {
|
|
3212
|
+
return _ == null ? t() : M ? he.fromFormat(_, M) : he.fromISO(_);
|
|
3211
3213
|
}
|
|
3212
|
-
function P(_,
|
|
3214
|
+
function P(_, M, $) {
|
|
3213
3215
|
if (_ == null)
|
|
3214
|
-
return
|
|
3216
|
+
return M ? t().toFormat(M) : t().toString();
|
|
3215
3217
|
{
|
|
3216
3218
|
const d = $ ? he.fromFormat(_, $) : he.fromISO(_);
|
|
3217
|
-
return
|
|
3219
|
+
return M ? d.toFormat(M) : d.toString();
|
|
3218
3220
|
}
|
|
3219
3221
|
}
|
|
3220
3222
|
return xr = {
|
|
@@ -3222,7 +3224,7 @@ function Mn(e) {
|
|
|
3222
3224
|
getTomorrow: S,
|
|
3223
3225
|
tzDate: s,
|
|
3224
3226
|
tzString: g,
|
|
3225
|
-
utcDate:
|
|
3227
|
+
utcDate: D,
|
|
3226
3228
|
utcString: P
|
|
3227
3229
|
}, xr;
|
|
3228
3230
|
}
|
|
@@ -3230,7 +3232,7 @@ let Tr;
|
|
|
3230
3232
|
function Sa() {
|
|
3231
3233
|
return Tr;
|
|
3232
3234
|
}
|
|
3233
|
-
function
|
|
3235
|
+
function Nn(e) {
|
|
3234
3236
|
const t = z(!1), l = (e == null ? void 0 : e.apis) ?? [];
|
|
3235
3237
|
function S() {
|
|
3236
3238
|
t.value = !0;
|
|
@@ -3246,7 +3248,7 @@ function Ln(e) {
|
|
|
3246
3248
|
}
|
|
3247
3249
|
return h == null && (h = l.find((u) => Array.isArray(u.nav) ? u.nav.some((r) => r == d.nav) : u.nav == d.nav)), h;
|
|
3248
3250
|
}
|
|
3249
|
-
function
|
|
3251
|
+
function D(d) {
|
|
3250
3252
|
var r;
|
|
3251
3253
|
if (l == null)
|
|
3252
3254
|
return Promise.resolve("no demo data available for this api");
|
|
@@ -3290,7 +3292,7 @@ function Ln(e) {
|
|
|
3290
3292
|
});
|
|
3291
3293
|
});
|
|
3292
3294
|
}
|
|
3293
|
-
function
|
|
3295
|
+
function M(d) {
|
|
3294
3296
|
var r, y;
|
|
3295
3297
|
if (l == null)
|
|
3296
3298
|
throw new Error("no demo data available for this api");
|
|
@@ -3331,10 +3333,10 @@ function Ln(e) {
|
|
|
3331
3333
|
isDemoing: t,
|
|
3332
3334
|
startDemo: S,
|
|
3333
3335
|
data: l,
|
|
3334
|
-
deleteItem:
|
|
3336
|
+
deleteItem: D,
|
|
3335
3337
|
get: P,
|
|
3336
3338
|
getAll: _,
|
|
3337
|
-
post:
|
|
3339
|
+
post: M,
|
|
3338
3340
|
patch: $
|
|
3339
3341
|
}, Tr;
|
|
3340
3342
|
}
|
|
@@ -3347,8 +3349,8 @@ function Aa(e) {
|
|
|
3347
3349
|
document.title = S.meta.title;
|
|
3348
3350
|
else {
|
|
3349
3351
|
const g = Rn.VITE_NODE_ENV;
|
|
3350
|
-
let
|
|
3351
|
-
g == "development" ?
|
|
3352
|
+
let D = "";
|
|
3353
|
+
g == "development" ? D = "BWeb Dev" : g == "staging" ? D = "BlitzIt Sandpit" : D = "BlitzIt Web | Cloud-Based Wholesale Logistics Platform", ((s = e == null ? void 0 : e.demo) == null ? void 0 : s.isDemoing.value) == !0 && (D = `Training: ${D}`), document.title = D;
|
|
3352
3354
|
}
|
|
3353
3355
|
}
|
|
3354
3356
|
return {
|
|
@@ -3387,7 +3389,7 @@ function Un(e) {
|
|
|
3387
3389
|
function g(f, A) {
|
|
3388
3390
|
return t(f, "d LLL", A);
|
|
3389
3391
|
}
|
|
3390
|
-
function
|
|
3392
|
+
function D(f, A) {
|
|
3391
3393
|
return t(f, "ccc", A);
|
|
3392
3394
|
}
|
|
3393
3395
|
function P(f, A) {
|
|
@@ -3396,7 +3398,7 @@ function Un(e) {
|
|
|
3396
3398
|
function _(f, A) {
|
|
3397
3399
|
return t(f, "ccc dd LLL @ hh:mm a", A);
|
|
3398
3400
|
}
|
|
3399
|
-
function
|
|
3401
|
+
function M(f) {
|
|
3400
3402
|
return new Intl.NumberFormat().format(f);
|
|
3401
3403
|
}
|
|
3402
3404
|
function $(f) {
|
|
@@ -3441,7 +3443,7 @@ function Un(e) {
|
|
|
3441
3443
|
function w(f, A) {
|
|
3442
3444
|
return t(f, "dd LLL yyyy", A);
|
|
3443
3445
|
}
|
|
3444
|
-
function
|
|
3446
|
+
function L(f, A) {
|
|
3445
3447
|
return t(f, "dd LLL yyyy hh:mm a", A);
|
|
3446
3448
|
}
|
|
3447
3449
|
function b(f, A) {
|
|
@@ -3450,15 +3452,15 @@ function Un(e) {
|
|
|
3450
3452
|
function T(f) {
|
|
3451
3453
|
return f == null ? "" : typeof f == "number" ? e.dates.tzDate().startOf("day").plus({ minutes: f }).toFormat("T") : typeof f == "string" ? e.dates.tzString(f, "t") : "unknown";
|
|
3452
3454
|
}
|
|
3453
|
-
const
|
|
3455
|
+
const x = {
|
|
3454
3456
|
toCompanyNameAndLocationLine: l,
|
|
3455
3457
|
toCurrency: S,
|
|
3456
3458
|
toDayDate: s,
|
|
3457
3459
|
toDayMonth: g,
|
|
3458
|
-
toDayOfWeek:
|
|
3460
|
+
toDayOfWeek: D,
|
|
3459
3461
|
toDayShortDate: P,
|
|
3460
3462
|
toDayShortDateAndTime: _,
|
|
3461
|
-
toDisplayNumber:
|
|
3463
|
+
toDisplayNumber: M,
|
|
3462
3464
|
toDisplayNumberOver: $,
|
|
3463
3465
|
toDisplayNumberSigned: d,
|
|
3464
3466
|
toFormat: h,
|
|
@@ -3469,21 +3471,21 @@ function Un(e) {
|
|
|
3469
3471
|
toPercent: i,
|
|
3470
3472
|
toPrettyCSV: E,
|
|
3471
3473
|
toShortDate: w,
|
|
3472
|
-
toShortDateAndTime:
|
|
3474
|
+
toShortDateAndTime: L,
|
|
3473
3475
|
toTime: b,
|
|
3474
3476
|
toTimeOfDay: T
|
|
3475
3477
|
};
|
|
3476
|
-
function
|
|
3478
|
+
function N(f) {
|
|
3477
3479
|
if (f != null) {
|
|
3478
3480
|
let A = f;
|
|
3479
|
-
if (A != null &&
|
|
3480
|
-
return
|
|
3481
|
+
if (A != null && x[A] != null)
|
|
3482
|
+
return x[A];
|
|
3481
3483
|
}
|
|
3482
3484
|
return (A) => A;
|
|
3483
3485
|
}
|
|
3484
3486
|
return _r = {
|
|
3485
|
-
findFilter:
|
|
3486
|
-
...
|
|
3487
|
+
findFilter: N,
|
|
3488
|
+
...x
|
|
3487
3489
|
}, _r;
|
|
3488
3490
|
}
|
|
3489
3491
|
function Bn(e, t) {
|
|
@@ -3493,20 +3495,20 @@ function Bn(e, t) {
|
|
|
3493
3495
|
l.value = g(P) != s;
|
|
3494
3496
|
}, { deep: !0 });
|
|
3495
3497
|
function g(P) {
|
|
3496
|
-
const _ =
|
|
3497
|
-
return t != null && (t.propsToIgnore != null ? t.propsToIgnore.forEach((
|
|
3498
|
-
delete _[
|
|
3498
|
+
const _ = Nr(P);
|
|
3499
|
+
return t != null && (t.propsToIgnore != null ? t.propsToIgnore.forEach((M) => {
|
|
3500
|
+
delete _[M];
|
|
3499
3501
|
}) : t.propsToTrack != null && Object.keys(P).forEach(($) => {
|
|
3500
3502
|
t.propsToTrack.some((d) => d == $) || delete _[$];
|
|
3501
3503
|
})), JSON.stringify(_);
|
|
3502
3504
|
}
|
|
3503
|
-
function
|
|
3505
|
+
function D() {
|
|
3504
3506
|
s = g(Q(S)), l.value = !1;
|
|
3505
3507
|
}
|
|
3506
3508
|
return {
|
|
3507
3509
|
asyncItem: S,
|
|
3508
3510
|
isChanged: l,
|
|
3509
|
-
restartTracker:
|
|
3511
|
+
restartTracker: D
|
|
3510
3512
|
};
|
|
3511
3513
|
}
|
|
3512
3514
|
function Ia(e, t) {
|
|
@@ -3514,19 +3516,19 @@ function Ia(e, t) {
|
|
|
3514
3516
|
const {
|
|
3515
3517
|
// useBladeSrc = true,
|
|
3516
3518
|
useRouteSrc: l = !0
|
|
3517
|
-
} = t ?? {}, S = e.storeMode ?? (t == null ? void 0 : t.storeMode), s = e.storageMode ?? (t == null ? void 0 : t.storageMode), g = e.nav ?? e.bladeName ?? "basic",
|
|
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(() => {
|
|
3518
3520
|
var W;
|
|
3519
3521
|
return Q(e.proxyID) ?? (_ != null ? (W = P == null ? void 0 : P.query) == null ? void 0 : W[_] : void 0);
|
|
3520
3522
|
}), $ = z(void 0), { actionErrorMsg: d, actionLoadingMsg: h, deleteItem: u, getItem: r, getAllItems: y, restoreItem: I, saveItem: i } = ut({
|
|
3521
3523
|
nav: g,
|
|
3522
3524
|
onError: e.onError ?? (t == null ? void 0 : t.onError),
|
|
3523
|
-
proxyID:
|
|
3524
|
-
store:
|
|
3525
|
+
proxyID: M.value,
|
|
3526
|
+
store: Le({
|
|
3525
3527
|
storeMode: S,
|
|
3526
3528
|
storageMode: s,
|
|
3527
3529
|
nav: g
|
|
3528
3530
|
})
|
|
3529
|
-
}), E = ee(() => e.errorMsg ?? d.value), w = ee(() => e.loadingMsg ?? h.value),
|
|
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(() => {
|
|
3530
3532
|
let W = e.params != null ? { ...e.params } : {};
|
|
3531
3533
|
return e.includeDetails != null && (W.includeDetails = e.includeDetails), W;
|
|
3532
3534
|
}), f = ee(() => {
|
|
@@ -3556,7 +3558,7 @@ function Ia(e, t) {
|
|
|
3556
3558
|
const {
|
|
3557
3559
|
additionalUrl: ne,
|
|
3558
3560
|
onDeleteAsync: ce,
|
|
3559
|
-
onDeleteSuccessAsync: se = () => (
|
|
3561
|
+
onDeleteSuccessAsync: se = () => (D.back(), Promise.resolve(void 0)),
|
|
3560
3562
|
proxyID: ge
|
|
3561
3563
|
} = { ...e };
|
|
3562
3564
|
u({
|
|
@@ -3590,15 +3592,15 @@ function Ia(e, t) {
|
|
|
3590
3592
|
});
|
|
3591
3593
|
}
|
|
3592
3594
|
async function Y(W) {
|
|
3593
|
-
if (
|
|
3595
|
+
if (x.value = !1, e.item != null)
|
|
3594
3596
|
$.value = e.item;
|
|
3595
3597
|
else {
|
|
3596
3598
|
const ne = {
|
|
3597
3599
|
additionalUrl: e.additionalUrl,
|
|
3598
3600
|
id: b.value,
|
|
3599
3601
|
nav: g,
|
|
3600
|
-
proxyID:
|
|
3601
|
-
params:
|
|
3602
|
+
proxyID: M.value,
|
|
3603
|
+
params: N.value,
|
|
3602
3604
|
//props.params,
|
|
3603
3605
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
3604
3606
|
refresh: (W == null ? void 0 : W.deepRefresh) ?? !1,
|
|
@@ -3620,7 +3622,7 @@ function Ia(e, t) {
|
|
|
3620
3622
|
onCanSaveAsync: se,
|
|
3621
3623
|
onGetSaveAsync: ge,
|
|
3622
3624
|
onSaveAsync: Be,
|
|
3623
|
-
onSaveSuccessAsync: $e = (Fe) => ((ne == null ? void 0 : ne.navBack) === !0 ?
|
|
3625
|
+
onSaveSuccessAsync: $e = (Fe) => ((ne == null ? void 0 : ne.navBack) === !0 ? D.back() : (W.rowVersion != null && Fe.rowVersion != null && (W.rowVersion = Fe.rowVersion), ue(), T.value = "view"), Promise.resolve(void 0))
|
|
3624
3626
|
} = { ...e };
|
|
3625
3627
|
i({
|
|
3626
3628
|
additionalUrl: ce,
|
|
@@ -3630,7 +3632,7 @@ function Ia(e, t) {
|
|
|
3630
3632
|
onGetSaveAsync: ge,
|
|
3631
3633
|
onSaveAsync: Be,
|
|
3632
3634
|
onSaveSuccessAsync: $e,
|
|
3633
|
-
proxyID:
|
|
3635
|
+
proxyID: M.value,
|
|
3634
3636
|
// ...params.getOptions(),
|
|
3635
3637
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
3636
3638
|
mode: T.value
|
|
@@ -3641,7 +3643,7 @@ function Ia(e, t) {
|
|
|
3641
3643
|
!W || W == "view" ? T.value = "edit" : W == "edit" && (T.value = "view");
|
|
3642
3644
|
}
|
|
3643
3645
|
return Te(E, (W) => {
|
|
3644
|
-
|
|
3646
|
+
x.value = W != null;
|
|
3645
3647
|
}), Te(() => e.refreshToggle, () => {
|
|
3646
3648
|
Y({ deepRefresh: !0 });
|
|
3647
3649
|
}), Xr(async () => {
|
|
@@ -3655,7 +3657,7 @@ function Ia(e, t) {
|
|
|
3655
3657
|
isDeletable: f,
|
|
3656
3658
|
isEditing: ee(() => T.value == "new" || T.value == "edit"),
|
|
3657
3659
|
isEditable: A,
|
|
3658
|
-
isLoading:
|
|
3660
|
+
isLoading: L,
|
|
3659
3661
|
isNew: ee(() => T.value == "new"),
|
|
3660
3662
|
isRestorable: j,
|
|
3661
3663
|
isSaveable: X,
|
|
@@ -3664,7 +3666,7 @@ function Ia(e, t) {
|
|
|
3664
3666
|
refresh: Y,
|
|
3665
3667
|
restoreItem: G,
|
|
3666
3668
|
saveItem: H,
|
|
3667
|
-
showError:
|
|
3669
|
+
showError: x,
|
|
3668
3670
|
toggleMode: ie
|
|
3669
3671
|
};
|
|
3670
3672
|
}
|
|
@@ -3697,7 +3699,7 @@ function $n(e) {
|
|
|
3697
3699
|
var u;
|
|
3698
3700
|
return (u = P(h)) == null ? void 0 : u.displayName;
|
|
3699
3701
|
}
|
|
3700
|
-
function
|
|
3702
|
+
function D(h) {
|
|
3701
3703
|
var u;
|
|
3702
3704
|
return (u = P(h)) == null ? void 0 : u.icon;
|
|
3703
3705
|
}
|
|
@@ -3714,7 +3716,7 @@ function $n(e) {
|
|
|
3714
3716
|
let r = gn(u.microservice ?? "default") ?? "";
|
|
3715
3717
|
return u.path != null && (r = Ue(r, u.path)), r != null && r.endsWith("/") && (r = r.slice(0, r.length - 1)), r;
|
|
3716
3718
|
}
|
|
3717
|
-
function
|
|
3719
|
+
function M(h) {
|
|
3718
3720
|
const u = P(h);
|
|
3719
3721
|
if ((u == null ? void 0 : u.singleName) != null)
|
|
3720
3722
|
return u.singleName;
|
|
@@ -3743,32 +3745,32 @@ function $n(e) {
|
|
|
3743
3745
|
findArchiveName: S,
|
|
3744
3746
|
findCacheHours: s,
|
|
3745
3747
|
findDisplay: g,
|
|
3746
|
-
findIcon:
|
|
3748
|
+
findIcon: D,
|
|
3747
3749
|
findItem: P,
|
|
3748
3750
|
findStoreName: $,
|
|
3749
3751
|
findPath: _,
|
|
3750
|
-
findSingleDisplay:
|
|
3752
|
+
findSingleDisplay: M,
|
|
3751
3753
|
updateNavigationProperties: d
|
|
3752
3754
|
}, Cr;
|
|
3753
3755
|
}
|
|
3754
3756
|
function Da(e, t, l) {
|
|
3755
3757
|
var He, Ve;
|
|
3756
|
-
const S =
|
|
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([
|
|
3757
3759
|
...u.filter((U) => U.name != null).map((U) => U.name),
|
|
3758
3760
|
...e.defaultFilters ?? [],
|
|
3759
3761
|
...r.value
|
|
3760
3762
|
]).value), I = z((e.defaultFilters ?? []).map((U) => y.value.indexOf(U)));
|
|
3761
3763
|
let i = z([...I.value]);
|
|
3762
|
-
const E = ee(() => Gr(i, I).value.length > 0 || Gr(I, i).value.length > 0), w = z(
|
|
3763
|
-
function
|
|
3764
|
+
const E = ee(() => Gr(i, I).value.length > 0 || Gr(I, i).value.length > 0), w = z(L());
|
|
3765
|
+
function L() {
|
|
3764
3766
|
var U, K;
|
|
3765
3767
|
if (_) {
|
|
3766
3768
|
const V = (U = P.value) == null ? void 0 : U.page;
|
|
3767
3769
|
if (V != null)
|
|
3768
3770
|
return Number.parseInt(V);
|
|
3769
3771
|
}
|
|
3770
|
-
if (
|
|
3771
|
-
const V = (K =
|
|
3772
|
+
if (M) {
|
|
3773
|
+
const V = (K = D == null ? void 0 : D.query) == null ? void 0 : K.page;
|
|
3772
3774
|
if (V != null)
|
|
3773
3775
|
return Number.parseInt(typeof V == "string" ? V : V.toString());
|
|
3774
3776
|
}
|
|
@@ -3781,41 +3783,41 @@ function Da(e, t, l) {
|
|
|
3781
3783
|
if (V != null)
|
|
3782
3784
|
return V;
|
|
3783
3785
|
}
|
|
3784
|
-
if (
|
|
3785
|
-
const V = (K =
|
|
3786
|
+
if (M) {
|
|
3787
|
+
const V = (K = D == null ? void 0 : D.query) == null ? void 0 : K.query;
|
|
3786
3788
|
if (V != null)
|
|
3787
3789
|
return V;
|
|
3788
3790
|
}
|
|
3789
3791
|
return e.proxyID;
|
|
3790
|
-
}), T = z(
|
|
3791
|
-
function
|
|
3792
|
+
}), T = z(x());
|
|
3793
|
+
function x() {
|
|
3792
3794
|
var U, K;
|
|
3793
3795
|
if (_) {
|
|
3794
3796
|
const V = (U = P.value) == null ? void 0 : U.search;
|
|
3795
3797
|
if (V != null)
|
|
3796
3798
|
return V;
|
|
3797
3799
|
}
|
|
3798
|
-
if (
|
|
3799
|
-
const V = (K =
|
|
3800
|
+
if (M) {
|
|
3801
|
+
const V = (K = D == null ? void 0 : D.query) == null ? void 0 : K.search;
|
|
3800
3802
|
if (V != null)
|
|
3801
3803
|
return V;
|
|
3802
3804
|
}
|
|
3803
3805
|
}
|
|
3804
|
-
const
|
|
3806
|
+
const N = z(Q(e.startShowingInactive) ?? !1), f = ee(() => [
|
|
3805
3807
|
...e.searchProps ?? [],
|
|
3806
3808
|
...(e.headers ?? []).filter((U) => U.searchable != null && U.value != null).map((U) => U.value ?? "")
|
|
3807
|
-
]), A = z([]), j =
|
|
3809
|
+
]), A = z([]), j = Ne([]), X = z([]);
|
|
3808
3810
|
let re;
|
|
3809
3811
|
const { actionErrorMsg: ue, actionLoadingMsg: be, deleteItem: G, doAction: Y, getItem: H, getAllItems: ie, restoreItem: Z } = ut({
|
|
3810
3812
|
nav: $,
|
|
3811
3813
|
onError: e.onError ?? (l == null ? void 0 : l.onError),
|
|
3812
3814
|
proxyID: b.value,
|
|
3813
|
-
store:
|
|
3815
|
+
store: Le({
|
|
3814
3816
|
storeMode: d,
|
|
3815
3817
|
storageMode: h,
|
|
3816
3818
|
nav: $
|
|
3817
3819
|
})
|
|
3818
|
-
}), W = ee(() => e.errorMsg ?? ue.value), ne = ee(() => e.loadingMsg ?? be.value), ce = ee(() => ne.value != null), se =
|
|
3820
|
+
}), W = ee(() => e.errorMsg ?? ue.value), ne = ee(() => e.loadingMsg ?? be.value), ce = ee(() => ne.value != null), se = Ne(!1), ge = Ne(e.showSearch ?? !0), Be = z(0), $e = ee(() => {
|
|
3819
3821
|
let U, K = [];
|
|
3820
3822
|
I.value.forEach((O) => {
|
|
3821
3823
|
const de = y.value[O], ye = u.find((De) => De.name == de);
|
|
@@ -3826,8 +3828,8 @@ function Da(e, t, l) {
|
|
|
3826
3828
|
}), Fe = ee(() => {
|
|
3827
3829
|
var K;
|
|
3828
3830
|
let U = e.params != null ? { ...e.params } : {};
|
|
3829
|
-
return e.useServerPagination && e.itemsPerPage != null && (U.includeCount = !0, U.takeAmount = e.itemsPerPage, U.takeFrom = (w.value - 1) * e.itemsPerPage), $e.value != null && (U = { ...U, ...$e.value }),
|
|
3830
|
-
}), tr = ee(() => (U) => e.onCanDelete != null ? e.onCanDelete(U) : !(U != null && U.isInactive === !0)), nr = ee(() => (U) =>
|
|
3831
|
+
return e.useServerPagination && e.itemsPerPage != null && (U.includeCount = !0, U.takeAmount = e.itemsPerPage, U.takeFrom = (w.value - 1) * e.itemsPerPage), $e.value != null && (U = { ...U, ...$e.value }), N.value && (U.includeInactive = !0), _e(e.selectProps) && (U.properties = (K = e.selectProps) == null ? void 0 : K.toString()), T.value != null && (U.searchString = T.value), U;
|
|
3832
|
+
}), tr = ee(() => (U) => e.onCanDelete != null ? e.onCanDelete(U) : !(U != null && U.isInactive === !0)), nr = ee(() => (U) => N.value ? e.onCanRestore != null ? e.onCanRestore(U) : (U == null ? void 0 : U.isInactive) === !0 : !1), Ce = ee(() => X.value.filter((U) => !U.hide)), ar = ee(() => {
|
|
3831
3833
|
let U = new Array();
|
|
3832
3834
|
return Ce.value.filter((V) => V.sublevel != null).forEach((V) => {
|
|
3833
3835
|
let O = U.find((de) => de.position == V.sublevel);
|
|
@@ -3861,14 +3863,14 @@ function Da(e, t, l) {
|
|
|
3861
3863
|
if (De != null) {
|
|
3862
3864
|
let Ae = A.value.findIndex((oe) => oe.id == De);
|
|
3863
3865
|
if (Ae > -1 && A.value.splice(Ae, 1), e.items != null) {
|
|
3864
|
-
let oe = e.items.findIndex((
|
|
3866
|
+
let oe = e.items.findIndex((Me) => Me.id == De);
|
|
3865
3867
|
oe > -1 && e.items.splice(oe, 1);
|
|
3866
3868
|
}
|
|
3867
3869
|
} else {
|
|
3868
3870
|
let Ae = A.value.findIndex((oe) => oe === O);
|
|
3869
3871
|
if (Ae == -1 && (Ae = A.value.findIndex((oe) => oe == O)), Ae > -1 && A.value.splice(Ae, 1), e.items != null) {
|
|
3870
|
-
let oe = e.items.findIndex((
|
|
3871
|
-
oe == -1 && (oe = e.items.findIndex((
|
|
3872
|
+
let oe = e.items.findIndex((Me) => Me === O);
|
|
3873
|
+
oe == -1 && (oe = e.items.findIndex((Me) => Me == O)), oe > -1 && e.items.splice(oe, 1);
|
|
3872
3874
|
}
|
|
3873
3875
|
}
|
|
3874
3876
|
};
|
|
@@ -3969,7 +3971,7 @@ function Da(e, t, l) {
|
|
|
3969
3971
|
}
|
|
3970
3972
|
return qe(), Qt([T], () => {
|
|
3971
3973
|
Pe();
|
|
3972
|
-
}, { debounce: 500, maxWait: 500 }), Te([
|
|
3974
|
+
}, { debounce: 500, maxWait: 500 }), Te([N, w], async () => {
|
|
3973
3975
|
await Ie();
|
|
3974
3976
|
}), Te([W, () => e.errorMsg], ([U, K]) => {
|
|
3975
3977
|
se.value = U != null || K != null;
|
|
@@ -3979,7 +3981,7 @@ function Da(e, t, l) {
|
|
|
3979
3981
|
Pe();
|
|
3980
3982
|
}), Xr(async () => {
|
|
3981
3983
|
var U;
|
|
3982
|
-
e.eager == !0 && await Ie({ deepRefresh: ((U =
|
|
3984
|
+
e.eager == !0 && await Ie({ deepRefresh: ((U = D == null ? void 0 : D.params) == null ? void 0 : U.refresh) == "true" });
|
|
3983
3985
|
}), {
|
|
3984
3986
|
add: Se,
|
|
3985
3987
|
asyncItems: A,
|
|
@@ -4003,7 +4005,7 @@ function Da(e, t, l) {
|
|
|
4003
4005
|
selectItem: je,
|
|
4004
4006
|
// serverFilters,
|
|
4005
4007
|
showError: se,
|
|
4006
|
-
showInactive:
|
|
4008
|
+
showInactive: N,
|
|
4007
4009
|
showSearch: ge,
|
|
4008
4010
|
subtitleOptions: ar,
|
|
4009
4011
|
tableHeaders: Ce,
|
|
@@ -4022,36 +4024,36 @@ function Fn(e) {
|
|
|
4022
4024
|
}, We;
|
|
4023
4025
|
}
|
|
4024
4026
|
function xa() {
|
|
4025
|
-
const e =
|
|
4027
|
+
const e = Lr(), t = it(), l = In();
|
|
4026
4028
|
let S = e.getRoutes();
|
|
4027
4029
|
return {
|
|
4028
4030
|
...We,
|
|
4029
4031
|
sidebarNavItems: ee(() => {
|
|
4030
4032
|
var g;
|
|
4031
|
-
S = S.filter((
|
|
4033
|
+
S = S.filter((D) => D.meta != null && D.meta.menuGroup != null);
|
|
4032
4034
|
const s = [];
|
|
4033
|
-
return S.forEach((
|
|
4035
|
+
return S.forEach((D) => {
|
|
4034
4036
|
var d;
|
|
4035
|
-
const P = We.groupOptions.value.find((h) => h.displayName ==
|
|
4036
|
-
let $ = s.find((h) => h.displayName ==
|
|
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);
|
|
4037
4039
|
$ == null && ($ = {
|
|
4038
|
-
displayName:
|
|
4039
|
-
icon: (P == null ? void 0 : P.icon) ?? (
|
|
4040
|
+
displayName: M.menuGroup,
|
|
4041
|
+
icon: (P == null ? void 0 : P.icon) ?? (M == null ? void 0 : M.icon) ?? (_ == null ? void 0 : _.icon),
|
|
4040
4042
|
isGroup: !0,
|
|
4041
4043
|
items: []
|
|
4042
4044
|
}, s.push($)), (d = $.items) == null || d.push({
|
|
4043
|
-
displayName: (
|
|
4044
|
-
icon: (
|
|
4045
|
-
permissions: (
|
|
4046
|
-
requiresAuth: (
|
|
4047
|
-
subscriptions: (
|
|
4048
|
-
subFilters: (
|
|
4049
|
-
routeName:
|
|
4045
|
+
displayName: (M == null ? void 0 : M.displayName) ?? t.findDisplay(_ ?? void 0),
|
|
4046
|
+
icon: (M == null ? void 0 : M.icon) ?? t.findIcon(_ ?? void 0),
|
|
4047
|
+
permissions: (M == null ? void 0 : M.permissions) ?? (_ == null ? void 0 : _.permissions) ?? [],
|
|
4048
|
+
requiresAuth: (M == null ? void 0 : M.requiresAuth) !== !1,
|
|
4049
|
+
subscriptions: (M == null ? void 0 : M.subscriptions) ?? (_ == null ? void 0 : _.subscriptions) ?? [],
|
|
4050
|
+
subFilters: (M == null ? void 0 : M.subFilters) ?? (_ == null ? void 0 : _.subFilters) ?? [],
|
|
4051
|
+
routeName: D.name
|
|
4050
4052
|
});
|
|
4051
|
-
}), s.forEach((
|
|
4053
|
+
}), s.forEach((D) => {
|
|
4052
4054
|
var P;
|
|
4053
|
-
|
|
4054
|
-
}), We.currentGroup.value != null ? ((g = s.find((
|
|
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"));
|
|
4055
4057
|
})
|
|
4056
4058
|
};
|
|
4057
4059
|
}
|
|
@@ -4072,39 +4074,39 @@ function kn(e) {
|
|
|
4072
4074
|
}
|
|
4073
4075
|
let Zr, Jr, jr, Kr = !1;
|
|
4074
4076
|
const wr = z(!1), br = z(!1), Qr = z(), er = z();
|
|
4075
|
-
let
|
|
4077
|
+
let Mr;
|
|
4076
4078
|
function _a() {
|
|
4077
|
-
return
|
|
4079
|
+
return Mr;
|
|
4078
4080
|
}
|
|
4079
4081
|
function Gn() {
|
|
4080
|
-
function e(
|
|
4081
|
-
er.value =
|
|
4082
|
+
function e(D) {
|
|
4083
|
+
er.value = D.detail, br.value = !0;
|
|
4082
4084
|
}
|
|
4083
4085
|
function t() {
|
|
4084
4086
|
Kr || (Kr = !0, window.location.reload());
|
|
4085
4087
|
}
|
|
4086
4088
|
function l() {
|
|
4087
|
-
var
|
|
4088
|
-
(
|
|
4089
|
+
var D;
|
|
4090
|
+
(D = Qr.value) == null || D.prompt(), wr.value = !1;
|
|
4089
4091
|
}
|
|
4090
4092
|
function S() {
|
|
4091
4093
|
return !!window.matchMedia("(display-mode: standalone)").matches;
|
|
4092
4094
|
}
|
|
4093
|
-
function s(
|
|
4094
|
-
|
|
4095
|
+
function s(D) {
|
|
4096
|
+
D.preventDefault(), wr.value = !0, Qr.value = D;
|
|
4095
4097
|
}
|
|
4096
4098
|
function g() {
|
|
4097
4099
|
br.value = !1, !(!er.value || !er.value.waiting) && er.value.waiting.postMessage({ type: "SKIP_WAITING" });
|
|
4098
4100
|
}
|
|
4099
4101
|
return Xt(() => {
|
|
4100
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));
|
|
4101
|
-
}),
|
|
4103
|
+
}), Mr = {
|
|
4102
4104
|
canInstallApp: wr,
|
|
4103
4105
|
canUpdateApp: br,
|
|
4104
4106
|
installApp: l,
|
|
4105
4107
|
isInstalled: S,
|
|
4106
4108
|
updateApp: g
|
|
4107
|
-
},
|
|
4109
|
+
}, Mr;
|
|
4108
4110
|
}
|
|
4109
4111
|
function Ca(e) {
|
|
4110
4112
|
const t = [];
|
|
@@ -4115,21 +4117,21 @@ function Pa(e) {
|
|
|
4115
4117
|
install(t, l) {
|
|
4116
4118
|
var _;
|
|
4117
4119
|
console.log(t), e.vuetifyInstance ?? (e.vuetifyInstance = l.vuetifyInstance), yn(e.urls), Pn(e);
|
|
4118
|
-
const S =
|
|
4120
|
+
const S = Nn(), s = $n(e);
|
|
4119
4121
|
kn(e), (_ = e.auth).demo ?? (_.demo = S), e.auth.getAuthItem = s.findItem;
|
|
4120
4122
|
const g = Dn(e.auth);
|
|
4121
4123
|
Fn(e.menu);
|
|
4122
|
-
const
|
|
4124
|
+
const D = En({
|
|
4123
4125
|
auth: g,
|
|
4124
4126
|
findPath: s.findPath,
|
|
4125
4127
|
useBearerToken: !0
|
|
4126
|
-
}), P =
|
|
4128
|
+
}), P = Ln({
|
|
4127
4129
|
getTimeZone: () => g.timeZone.value
|
|
4128
4130
|
});
|
|
4129
4131
|
Un({
|
|
4130
4132
|
dates: P
|
|
4131
4133
|
}), Gn(), wn({
|
|
4132
|
-
api:
|
|
4134
|
+
api: D,
|
|
4133
4135
|
auth: g,
|
|
4134
4136
|
navigation: s
|
|
4135
4137
|
});
|
|
@@ -4144,14 +4146,14 @@ export {
|
|
|
4144
4146
|
On as checkImage,
|
|
4145
4147
|
fn as containsSearch,
|
|
4146
4148
|
na as containsWeekday,
|
|
4147
|
-
|
|
4149
|
+
Nr as copyDeep,
|
|
4148
4150
|
cn as copyItemByAlphabet,
|
|
4149
4151
|
En as createApi,
|
|
4150
4152
|
Dn as createAuth,
|
|
4151
4153
|
Pa as createCore,
|
|
4152
4154
|
Pn as createCosmetics,
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
+
Ln as createDates,
|
|
4156
|
+
Nn as createDemo,
|
|
4155
4157
|
Un as createFilters,
|
|
4156
4158
|
Fn as createMenu,
|
|
4157
4159
|
$n as createNavigation,
|
|
@@ -4195,7 +4197,7 @@ export {
|
|
|
4195
4197
|
In as useAuth,
|
|
4196
4198
|
Wr as useAuthUrl,
|
|
4197
4199
|
Cn as useBlade,
|
|
4198
|
-
|
|
4200
|
+
Mn as useCSV,
|
|
4199
4201
|
ga as useCosmetics,
|
|
4200
4202
|
gn as useDataUrl,
|
|
4201
4203
|
ba as useDates,
|
|
@@ -4217,7 +4219,7 @@ export {
|
|
|
4217
4219
|
_n as useResizable,
|
|
4218
4220
|
Ca as useRules,
|
|
4219
4221
|
va as useStore,
|
|
4220
|
-
|
|
4222
|
+
Le as useStoreDefinition,
|
|
4221
4223
|
Bn as useTracker,
|
|
4222
4224
|
ha as useUrls,
|
|
4223
4225
|
hn as validEmail,
|