bt-core-app 1.4.60 → 1.4.62
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 +1308 -1287
- package/dist/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/bt-core-app.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as Y, shallowRef as
|
|
1
|
+
import { ref as Y, shallowRef as Re, computed as te, toValue as K, watch as _e, toRef as zt, onMounted as Or } from "vue";
|
|
2
2
|
import { watchArray as pr, useStorage as Jt, useEventListener as he, toValue as Ae, useParentElement as jt, useResizeObserver as Kt, useArrayUnique as Qt, useArrayDifference as Wr, watchDebounced as Xt, tryOnMounted as Ot } from "@vueuse/core";
|
|
3
3
|
import { defineStore as et } from "pinia";
|
|
4
4
|
import { DateTime as de } from "luxon";
|
|
@@ -11,45 +11,45 @@ function en(e) {
|
|
|
11
11
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
12
12
|
}
|
|
13
13
|
function rn(e) {
|
|
14
|
-
const t = Y([]), l =
|
|
15
|
-
function
|
|
16
|
-
t.value = t.value.filter((h) => h.id !=
|
|
14
|
+
const t = Y([]), l = Re(), A = Re(), s = Re(), g = te(() => l.value != null);
|
|
15
|
+
function x(d) {
|
|
16
|
+
t.value = t.value.filter((h) => h.id != d);
|
|
17
17
|
}
|
|
18
|
-
function C(
|
|
18
|
+
function C(d) {
|
|
19
19
|
const h = {
|
|
20
20
|
id: pt(),
|
|
21
|
-
msg:
|
|
21
|
+
msg: d ?? "Loading"
|
|
22
22
|
};
|
|
23
23
|
return t.value.push(h), h.id;
|
|
24
24
|
}
|
|
25
|
-
function T(
|
|
26
|
-
|
|
25
|
+
function T(d) {
|
|
26
|
+
d != null && (A.value = d.toString());
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
|
|
28
|
+
function P() {
|
|
29
|
+
A.value = void 0;
|
|
30
30
|
}
|
|
31
|
-
async function $(
|
|
31
|
+
async function $(d, h) {
|
|
32
32
|
const u = { ...h };
|
|
33
33
|
u.completionMsg ?? (u.completionMsg = e == null ? void 0 : e.completionMsg), u.confirmationMsg ?? (u.confirmationMsg = e == null ? void 0 : e.confirmationMsg), u.errorMsg ?? (u.errorMsg = e == null ? void 0 : e.errorMsg), u.loadingMsg ?? (u.loadingMsg = (e == null ? void 0 : e.loadingMsg) ?? "Loading"), u.requireConfirmation ?? (u.requireConfirmation = e == null ? void 0 : e.requireConfirmation);
|
|
34
34
|
const r = C(u.loadingMsg);
|
|
35
35
|
let y = null;
|
|
36
36
|
try {
|
|
37
|
-
return u.requireConfirmation || u.confirmationMsg, y = await
|
|
38
|
-
} catch (
|
|
37
|
+
return u.requireConfirmation || u.confirmationMsg, y = await d(), u.completionMsg != null && (s.value = u.completionMsg), y;
|
|
38
|
+
} catch (E) {
|
|
39
39
|
if (u.throwError == !0)
|
|
40
40
|
return y;
|
|
41
|
-
T(u.errorMsg ??
|
|
41
|
+
T(u.errorMsg ?? E ?? "error");
|
|
42
42
|
} finally {
|
|
43
|
-
|
|
43
|
+
x(r);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
return pr(t, (
|
|
47
|
-
l.value =
|
|
46
|
+
return pr(t, (d) => {
|
|
47
|
+
l.value = d.length > 0 ? d[0].msg : void 0;
|
|
48
48
|
}, { deep: !0 }), {
|
|
49
|
-
actionErrorMsg:
|
|
49
|
+
actionErrorMsg: A,
|
|
50
50
|
actionLoadingMsg: l,
|
|
51
|
-
actionCompleteMsg:
|
|
52
|
-
clearErrors:
|
|
51
|
+
actionCompleteMsg: s,
|
|
52
|
+
clearErrors: P,
|
|
53
53
|
doAction: $,
|
|
54
54
|
isLoading: g,
|
|
55
55
|
logError: T
|
|
@@ -59,52 +59,52 @@ var Qe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
59
59
|
function tn(e) {
|
|
60
60
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
61
61
|
}
|
|
62
|
-
var
|
|
63
|
-
function e(
|
|
64
|
-
return
|
|
65
|
-
}
|
|
66
|
-
function t(
|
|
67
|
-
return typeof
|
|
68
|
-
}
|
|
69
|
-
function l(
|
|
70
|
-
if (g = typeof g == "object" ? g : { direction: g }, typeof
|
|
71
|
-
var
|
|
72
|
-
|
|
73
|
-
return
|
|
62
|
+
var Ge = function() {
|
|
63
|
+
function e(s) {
|
|
64
|
+
return s;
|
|
65
|
+
}
|
|
66
|
+
function t(s) {
|
|
67
|
+
return typeof s == "string" ? s.toLowerCase() : s;
|
|
68
|
+
}
|
|
69
|
+
function l(s, g) {
|
|
70
|
+
if (g = typeof g == "object" ? g : { direction: g }, typeof s != "function") {
|
|
71
|
+
var x = s;
|
|
72
|
+
s = function(d) {
|
|
73
|
+
return d[x] ? d[x] : "";
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
-
if (
|
|
77
|
-
var C =
|
|
78
|
-
return
|
|
76
|
+
if (s.length === 1) {
|
|
77
|
+
var C = s, T = g.ignoreCase ? t : e, P = g.cmp || function(d, h) {
|
|
78
|
+
return d < h ? -1 : d > h ? 1 : 0;
|
|
79
79
|
};
|
|
80
|
-
|
|
81
|
-
return
|
|
80
|
+
s = function(d, h) {
|
|
81
|
+
return P(T(C(d)), T(C(h)));
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
const $ = { "-1": "", desc: "" };
|
|
85
|
-
return g.direction in $ ? function(
|
|
86
|
-
return -
|
|
87
|
-
} :
|
|
85
|
+
return g.direction in $ ? function(d, h) {
|
|
86
|
+
return -s(d, h);
|
|
87
|
+
} : s;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
var
|
|
91
|
-
return
|
|
89
|
+
function A(s, g) {
|
|
90
|
+
var x = typeof this == "function" && !this.firstBy ? this : !1, C = l(s, g), T = x ? function(P, $) {
|
|
91
|
+
return x(P, $) || C(P, $);
|
|
92
92
|
} : C;
|
|
93
|
-
return T.thenBy =
|
|
93
|
+
return T.thenBy = A, T;
|
|
94
94
|
}
|
|
95
|
-
return
|
|
95
|
+
return A.firstBy = A, A;
|
|
96
96
|
}();
|
|
97
|
-
function
|
|
98
|
-
let l = e ?? "",
|
|
97
|
+
function Ue(e, t) {
|
|
98
|
+
let l = e ?? "", A = t ?? "";
|
|
99
99
|
if (l.endsWith("/"))
|
|
100
100
|
do
|
|
101
101
|
l = l.slice(0, l.length - 1);
|
|
102
102
|
while (l.endsWith("/"));
|
|
103
|
-
if (
|
|
103
|
+
if (A.startsWith("/"))
|
|
104
104
|
do
|
|
105
|
-
|
|
106
|
-
while (
|
|
107
|
-
return `${l}/${
|
|
105
|
+
A = A.slice(1, A.length);
|
|
106
|
+
while (A.startsWith("/"));
|
|
107
|
+
return `${l}/${A}`;
|
|
108
108
|
}
|
|
109
109
|
function Jn(e) {
|
|
110
110
|
return e == null || !Array.isArray(e) ? e : [...new Set(e.map((t) => t))];
|
|
@@ -155,22 +155,22 @@ function tt(e, t = !1) {
|
|
|
155
155
|
}
|
|
156
156
|
function pn(e, t, l) {
|
|
157
157
|
if (e) {
|
|
158
|
-
var
|
|
159
|
-
|
|
158
|
+
var A = new Image();
|
|
159
|
+
A.onload = t, A.onerror = l, A.src = e;
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
async function ea(e, t = !0) {
|
|
163
|
-
return new Promise((l,
|
|
164
|
-
e == null &&
|
|
165
|
-
var
|
|
166
|
-
|
|
163
|
+
return new Promise((l, A) => {
|
|
164
|
+
e == null && A("no url given");
|
|
165
|
+
var s = new Image();
|
|
166
|
+
s.setAttribute("crossOrigin", "anonymous"), s.onload = function() {
|
|
167
167
|
var g = document.createElement("canvas");
|
|
168
168
|
g.width = this.width, g.height = this.height;
|
|
169
|
-
var
|
|
170
|
-
|
|
171
|
-
},
|
|
172
|
-
console.log("errr"), t ?
|
|
173
|
-
}, e != null && (
|
|
169
|
+
var x = g.getContext("2d");
|
|
170
|
+
x == null || x.drawImage(this, 0, 0), l(g.toDataURL("image/png"));
|
|
171
|
+
}, s.onerror = function() {
|
|
172
|
+
console.log("errr"), t ? A("image could not be loaded for some reason") : l(null);
|
|
173
|
+
}, e != null && (s.src = e);
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
176
|
function nn(e) {
|
|
@@ -185,7 +185,7 @@ function ra(e) {
|
|
|
185
185
|
function an(e) {
|
|
186
186
|
return e == null ? e : e.replace(/\w\S*/g, (t) => t.replace(/^\w/, (l) => l.toUpperCase()));
|
|
187
187
|
}
|
|
188
|
-
const
|
|
188
|
+
const Ze = [
|
|
189
189
|
{ value: 1, short: "sun", values: ["sun", "sunday"] },
|
|
190
190
|
{ value: 2, short: "mon", values: ["mon", "monday"] },
|
|
191
191
|
{ value: 3, short: "tue", values: ["tue", "tues", "tuesday"] },
|
|
@@ -198,34 +198,34 @@ const Ye = [
|
|
|
198
198
|
function ta(e) {
|
|
199
199
|
if (e == null)
|
|
200
200
|
return 0;
|
|
201
|
-
const t = e.replaceAll(" ", "").split(",").map((
|
|
201
|
+
const t = e.replaceAll(" ", "").split(",").map((A) => A.toLowerCase()), l = Ze.filter((A) => A.values.some((s) => t.some((g) => s == g))).map((A) => A.value);
|
|
202
202
|
return l.length == 0 ? 8 : Math.min(...l);
|
|
203
203
|
}
|
|
204
204
|
function na(e) {
|
|
205
205
|
return e == null ? e : e.toLowerCase().replaceAll(" ", "").split(",").map((t) => {
|
|
206
|
-
let l =
|
|
206
|
+
let l = Ze.find((A) => A.values.some((s) => s == t));
|
|
207
207
|
return l != null ? l.short : "";
|
|
208
208
|
}).filter((t) => t != null && t.length > 0).toString();
|
|
209
209
|
}
|
|
210
210
|
function aa(e, t) {
|
|
211
211
|
if (e == null || t == null)
|
|
212
212
|
return !0;
|
|
213
|
-
const l = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()),
|
|
214
|
-
return
|
|
213
|
+
const l = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), A = t.replaceAll(" ", "").toLowerCase(), s = Ze.find((g) => g.values.some((x) => x == A));
|
|
214
|
+
return s != null && l.some((g) => g == s.short || s.values.some((x) => x == g));
|
|
215
215
|
}
|
|
216
216
|
function la(e, t) {
|
|
217
217
|
if (t == null)
|
|
218
218
|
return e;
|
|
219
219
|
let l = e ?? "";
|
|
220
220
|
l = `${l},${t}`;
|
|
221
|
-
let
|
|
222
|
-
return
|
|
221
|
+
let A = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((s) => Ze.find((g) => g.values.some((x) => x == s))).filter((s) => s != null).sort(Ge.firstBy((s) => (s == null ? void 0 : s.value) ?? 0)).map((s) => s == null ? void 0 : s.short))].toString();
|
|
222
|
+
return A.length > 0 ? A : void 0;
|
|
223
223
|
}
|
|
224
224
|
function ua(e, t) {
|
|
225
225
|
if (t == null || e == null)
|
|
226
226
|
return e;
|
|
227
|
-
let l = e ?? "",
|
|
228
|
-
return
|
|
227
|
+
let l = e ?? "", A = t.replaceAll(" ", "").toLowerCase(), s = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((g) => Ze.find((x) => x.values.some((C) => C == g && C != A))).filter((g) => g != null).sort(Ge.firstBy((g) => (g == null ? void 0 : g.value) ?? 0)).map((g) => g == null ? void 0 : g.short))].toString();
|
|
228
|
+
return s.length > 0 ? s : void 0;
|
|
229
229
|
}
|
|
230
230
|
function ca(e, t) {
|
|
231
231
|
return e != null && Array.isArray(e) && e.length == t;
|
|
@@ -243,38 +243,38 @@ function un() {
|
|
|
243
243
|
return "0001-01-01T00:00:00Z";
|
|
244
244
|
}
|
|
245
245
|
function fa(e, t) {
|
|
246
|
-
let l = "1",
|
|
247
|
-
if (
|
|
246
|
+
let l = "1", A = 0;
|
|
247
|
+
if (A < t)
|
|
248
248
|
do
|
|
249
|
-
l = l + "0",
|
|
250
|
-
while (
|
|
251
|
-
let
|
|
252
|
-
return Math.round(e *
|
|
249
|
+
l = l + "0", A += 1;
|
|
250
|
+
while (A < t);
|
|
251
|
+
let s = Number.parseInt(l);
|
|
252
|
+
return Math.round(e * s) / s;
|
|
253
253
|
}
|
|
254
254
|
function sa(e, t) {
|
|
255
255
|
let l = e ?? "";
|
|
256
|
-
return t != null && (cn(l, t) ? l = l.split(",").filter((
|
|
256
|
+
return t != null && (cn(l, t) ? l = l.split(",").filter((A) => A != t).toString() : l != null ? l = `${l},${t}` : l = t), l != null && l.length > 0 ? l : null;
|
|
257
257
|
}
|
|
258
258
|
function cn(e, t) {
|
|
259
259
|
if (e == null || e.length == 0)
|
|
260
260
|
return !1;
|
|
261
261
|
if (!t)
|
|
262
262
|
return !0;
|
|
263
|
-
var l = e.split(","),
|
|
264
|
-
return l.some((
|
|
263
|
+
var l = e.split(","), A = t.split(",");
|
|
264
|
+
return l.some((s) => A.some((g) => g == s));
|
|
265
265
|
}
|
|
266
266
|
function Lr(e) {
|
|
267
267
|
if (!e)
|
|
268
268
|
return e;
|
|
269
269
|
let t, l = Array.isArray(e) ? [] : {};
|
|
270
|
-
for (const
|
|
271
|
-
t = e[
|
|
270
|
+
for (const A in e)
|
|
271
|
+
t = e[A], l[A] = typeof t == "object" ? Lr(t) : t;
|
|
272
272
|
return l;
|
|
273
273
|
}
|
|
274
274
|
function fn(e) {
|
|
275
275
|
return e && Object.keys(e).sort().reduce(function(t, l) {
|
|
276
|
-
let
|
|
277
|
-
return t[l] = typeof
|
|
276
|
+
let A = e[l];
|
|
277
|
+
return t[l] = typeof A == "object" && A !== null ? fn(A) : A, t;
|
|
278
278
|
}, Array.isArray(e) ? [] : {});
|
|
279
279
|
}
|
|
280
280
|
function sn(e, t) {
|
|
@@ -284,17 +284,17 @@ function nt(e, t = (l) => l) {
|
|
|
284
284
|
if (e == null)
|
|
285
285
|
return [];
|
|
286
286
|
const l = Array.isArray(e) ? e : t(e);
|
|
287
|
-
return Te(l) ? [...l.reduce((
|
|
288
|
-
|
|
289
|
-
const g = nt(
|
|
290
|
-
return Te(g) &&
|
|
287
|
+
return Te(l) ? [...l.reduce((A, s) => {
|
|
288
|
+
A.push(s);
|
|
289
|
+
const g = nt(s, t);
|
|
290
|
+
return Te(g) && A.push(...g), A;
|
|
291
291
|
}, [])] : [];
|
|
292
292
|
}
|
|
293
293
|
function oa(e) {
|
|
294
|
-
const t = e.split(","), l = t[0].indexOf("base64") >= 0 ? atob(t[1]) : decodeURI(t[1]),
|
|
294
|
+
const t = e.split(","), l = t[0].indexOf("base64") >= 0 ? atob(t[1]) : decodeURI(t[1]), A = t[0].split(":")[1].split(";")[0], s = new Uint8Array(l.length);
|
|
295
295
|
for (let g = 0; g < l.length; g++)
|
|
296
|
-
|
|
297
|
-
return new Blob([
|
|
296
|
+
s[g] = l.charCodeAt(g);
|
|
297
|
+
return new Blob([s], { type: A });
|
|
298
298
|
}
|
|
299
299
|
function on(e) {
|
|
300
300
|
var t = "";
|
|
@@ -318,10 +318,10 @@ function hn(e, t, l) {
|
|
|
318
318
|
return !0;
|
|
319
319
|
if (e == null || l == null)
|
|
320
320
|
return !1;
|
|
321
|
-
for (let
|
|
322
|
-
const g = l[
|
|
323
|
-
var
|
|
324
|
-
if (
|
|
321
|
+
for (let s = 0; s < l.length; s++) {
|
|
322
|
+
const g = l[s];
|
|
323
|
+
var A = Sr(e, g);
|
|
324
|
+
if (A != null && typeof A == "string" && sn(A, t))
|
|
325
325
|
return !0;
|
|
326
326
|
}
|
|
327
327
|
return !1;
|
|
@@ -338,11 +338,11 @@ function Sr(e, t) {
|
|
|
338
338
|
if (e == null || e == null || !t)
|
|
339
339
|
return null;
|
|
340
340
|
var l = t.split(".");
|
|
341
|
-
let
|
|
342
|
-
for (var
|
|
343
|
-
if (
|
|
341
|
+
let A = l.length;
|
|
342
|
+
for (var s = e, g = 0; g < A; g++)
|
|
343
|
+
if (s = s[l[g]], s == null)
|
|
344
344
|
return null;
|
|
345
|
-
return
|
|
345
|
+
return s;
|
|
346
346
|
}
|
|
347
347
|
function mn(e) {
|
|
348
348
|
return e ? /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(e) : !1;
|
|
@@ -364,94 +364,94 @@ var at = { exports: {} };
|
|
|
364
364
|
(function(l) {
|
|
365
365
|
e.exports = l();
|
|
366
366
|
})(function() {
|
|
367
|
-
return function l(
|
|
368
|
-
function
|
|
369
|
-
if (!
|
|
370
|
-
if (!
|
|
371
|
-
var
|
|
372
|
-
if (!$ &&
|
|
373
|
-
return
|
|
367
|
+
return function l(A, s, g) {
|
|
368
|
+
function x(P, $) {
|
|
369
|
+
if (!s[P]) {
|
|
370
|
+
if (!A[P]) {
|
|
371
|
+
var d = typeof Xe == "function" && Xe;
|
|
372
|
+
if (!$ && d)
|
|
373
|
+
return d(P, !0);
|
|
374
374
|
if (C)
|
|
375
|
-
return C(
|
|
376
|
-
var h = new Error("Cannot find module '" +
|
|
375
|
+
return C(P, !0);
|
|
376
|
+
var h = new Error("Cannot find module '" + P + "'");
|
|
377
377
|
throw h.code = "MODULE_NOT_FOUND", h;
|
|
378
378
|
}
|
|
379
|
-
var u =
|
|
380
|
-
|
|
381
|
-
var y =
|
|
382
|
-
return
|
|
383
|
-
}, u, u.exports, l,
|
|
379
|
+
var u = s[P] = { exports: {} };
|
|
380
|
+
A[P][0].call(u.exports, function(r) {
|
|
381
|
+
var y = A[P][1][r];
|
|
382
|
+
return x(y || r);
|
|
383
|
+
}, u, u.exports, l, A, s, g);
|
|
384
384
|
}
|
|
385
|
-
return
|
|
385
|
+
return s[P].exports;
|
|
386
386
|
}
|
|
387
387
|
for (var C = typeof Xe == "function" && Xe, T = 0; T < g.length; T++)
|
|
388
|
-
|
|
389
|
-
return
|
|
390
|
-
}({ 1: [function(l,
|
|
388
|
+
x(g[T]);
|
|
389
|
+
return x;
|
|
390
|
+
}({ 1: [function(l, A, s) {
|
|
391
391
|
(function(g) {
|
|
392
|
-
var
|
|
393
|
-
if (
|
|
394
|
-
var T = 0,
|
|
395
|
-
|
|
392
|
+
var x = g.MutationObserver || g.WebKitMutationObserver, C;
|
|
393
|
+
if (x) {
|
|
394
|
+
var T = 0, P = new x(r), $ = g.document.createTextNode("");
|
|
395
|
+
P.observe($, {
|
|
396
396
|
characterData: !0
|
|
397
397
|
}), C = function() {
|
|
398
398
|
$.data = T = ++T % 2;
|
|
399
399
|
};
|
|
400
400
|
} else if (!g.setImmediate && typeof g.MessageChannel < "u") {
|
|
401
|
-
var
|
|
402
|
-
|
|
403
|
-
|
|
401
|
+
var d = new g.MessageChannel();
|
|
402
|
+
d.port1.onmessage = r, C = function() {
|
|
403
|
+
d.port2.postMessage(0);
|
|
404
404
|
};
|
|
405
405
|
} else
|
|
406
406
|
"document" in g && "onreadystatechange" in g.document.createElement("script") ? C = function() {
|
|
407
|
-
var
|
|
408
|
-
|
|
409
|
-
r(),
|
|
410
|
-
}, g.document.documentElement.appendChild(
|
|
407
|
+
var E = g.document.createElement("script");
|
|
408
|
+
E.onreadystatechange = function() {
|
|
409
|
+
r(), E.onreadystatechange = null, E.parentNode.removeChild(E), E = null;
|
|
410
|
+
}, g.document.documentElement.appendChild(E);
|
|
411
411
|
} : C = function() {
|
|
412
412
|
setTimeout(r, 0);
|
|
413
413
|
};
|
|
414
414
|
var h, u = [];
|
|
415
415
|
function r() {
|
|
416
416
|
h = !0;
|
|
417
|
-
for (var
|
|
418
|
-
for (i = u, u = [],
|
|
419
|
-
i[
|
|
420
|
-
|
|
417
|
+
for (var E, i, S = u.length; S; ) {
|
|
418
|
+
for (i = u, u = [], E = -1; ++E < S; )
|
|
419
|
+
i[E]();
|
|
420
|
+
S = u.length;
|
|
421
421
|
}
|
|
422
422
|
h = !1;
|
|
423
423
|
}
|
|
424
|
-
|
|
425
|
-
function y(
|
|
426
|
-
u.push(
|
|
424
|
+
A.exports = y;
|
|
425
|
+
function y(E) {
|
|
426
|
+
u.push(E) === 1 && !h && C();
|
|
427
427
|
}
|
|
428
428
|
}).call(this, typeof Qe < "u" ? Qe : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
429
|
-
}, {}], 2: [function(l,
|
|
429
|
+
}, {}], 2: [function(l, A, s) {
|
|
430
430
|
var g = l(1);
|
|
431
|
-
function
|
|
431
|
+
function x() {
|
|
432
432
|
}
|
|
433
|
-
var C = {}, T = ["REJECTED"],
|
|
434
|
-
|
|
435
|
-
function
|
|
433
|
+
var C = {}, T = ["REJECTED"], P = ["FULFILLED"], $ = ["PENDING"];
|
|
434
|
+
A.exports = d;
|
|
435
|
+
function d(w) {
|
|
436
436
|
if (typeof w != "function")
|
|
437
437
|
throw new TypeError("resolver must be a function");
|
|
438
|
-
this.state = $, this.queue = [], this.outcome = void 0, w !==
|
|
438
|
+
this.state = $, this.queue = [], this.outcome = void 0, w !== x && y(this, w);
|
|
439
439
|
}
|
|
440
|
-
|
|
440
|
+
d.prototype.catch = function(w) {
|
|
441
441
|
return this.then(null, w);
|
|
442
|
-
},
|
|
443
|
-
if (typeof w != "function" && this.state ===
|
|
442
|
+
}, d.prototype.then = function(w, _) {
|
|
443
|
+
if (typeof w != "function" && this.state === P || typeof _ != "function" && this.state === T)
|
|
444
444
|
return this;
|
|
445
|
-
var D = new this.constructor(
|
|
445
|
+
var D = new this.constructor(x);
|
|
446
446
|
if (this.state !== $) {
|
|
447
|
-
var
|
|
448
|
-
u(D,
|
|
447
|
+
var N = this.state === P ? w : _;
|
|
448
|
+
u(D, N, this.outcome);
|
|
449
449
|
} else
|
|
450
|
-
this.queue.push(new h(D, w,
|
|
450
|
+
this.queue.push(new h(D, w, _));
|
|
451
451
|
return D;
|
|
452
452
|
};
|
|
453
|
-
function h(w,
|
|
454
|
-
this.promise = w, typeof
|
|
453
|
+
function h(w, _, D) {
|
|
454
|
+
this.promise = w, typeof _ == "function" && (this.onFulfilled = _, this.callFulfilled = this.otherCallFulfilled), typeof D == "function" && (this.onRejected = D, this.callRejected = this.otherCallRejected);
|
|
455
455
|
}
|
|
456
456
|
h.prototype.callFulfilled = function(w) {
|
|
457
457
|
C.resolve(this.promise, w);
|
|
@@ -462,125 +462,125 @@ var at = { exports: {} };
|
|
|
462
462
|
}, h.prototype.otherCallRejected = function(w) {
|
|
463
463
|
u(this.promise, this.onRejected, w);
|
|
464
464
|
};
|
|
465
|
-
function u(w,
|
|
465
|
+
function u(w, _, D) {
|
|
466
466
|
g(function() {
|
|
467
|
-
var
|
|
467
|
+
var N;
|
|
468
468
|
try {
|
|
469
|
-
|
|
470
|
-
} catch (
|
|
471
|
-
return C.reject(w,
|
|
469
|
+
N = _(D);
|
|
470
|
+
} catch (f) {
|
|
471
|
+
return C.reject(w, f);
|
|
472
472
|
}
|
|
473
|
-
|
|
473
|
+
N === w ? C.reject(w, new TypeError("Cannot resolve promise with itself")) : C.resolve(w, N);
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
|
-
C.resolve = function(w,
|
|
477
|
-
var D =
|
|
476
|
+
C.resolve = function(w, _) {
|
|
477
|
+
var D = E(r, _);
|
|
478
478
|
if (D.status === "error")
|
|
479
479
|
return C.reject(w, D.value);
|
|
480
|
-
var
|
|
481
|
-
if (
|
|
482
|
-
y(w,
|
|
480
|
+
var N = D.value;
|
|
481
|
+
if (N)
|
|
482
|
+
y(w, N);
|
|
483
483
|
else {
|
|
484
|
-
w.state =
|
|
485
|
-
for (var
|
|
486
|
-
w.queue[
|
|
484
|
+
w.state = P, w.outcome = _;
|
|
485
|
+
for (var f = -1, b = w.queue.length; ++f < b; )
|
|
486
|
+
w.queue[f].callFulfilled(_);
|
|
487
487
|
}
|
|
488
488
|
return w;
|
|
489
|
-
}, C.reject = function(w,
|
|
490
|
-
w.state = T, w.outcome =
|
|
491
|
-
for (var D = -1,
|
|
492
|
-
w.queue[D].callRejected(
|
|
489
|
+
}, C.reject = function(w, _) {
|
|
490
|
+
w.state = T, w.outcome = _;
|
|
491
|
+
for (var D = -1, N = w.queue.length; ++D < N; )
|
|
492
|
+
w.queue[D].callRejected(_);
|
|
493
493
|
return w;
|
|
494
494
|
};
|
|
495
495
|
function r(w) {
|
|
496
|
-
var
|
|
497
|
-
if (w && (typeof w == "object" || typeof w == "function") && typeof
|
|
496
|
+
var _ = w && w.then;
|
|
497
|
+
if (w && (typeof w == "object" || typeof w == "function") && typeof _ == "function")
|
|
498
498
|
return function() {
|
|
499
|
-
|
|
499
|
+
_.apply(w, arguments);
|
|
500
500
|
};
|
|
501
501
|
}
|
|
502
|
-
function y(w,
|
|
502
|
+
function y(w, _) {
|
|
503
503
|
var D = !1;
|
|
504
|
-
function
|
|
504
|
+
function N(Q) {
|
|
505
505
|
D || (D = !0, C.reject(w, Q));
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function f(Q) {
|
|
508
508
|
D || (D = !0, C.resolve(w, Q));
|
|
509
509
|
}
|
|
510
|
-
function
|
|
511
|
-
|
|
510
|
+
function b() {
|
|
511
|
+
_(f, N);
|
|
512
512
|
}
|
|
513
|
-
var
|
|
514
|
-
|
|
513
|
+
var J = E(b);
|
|
514
|
+
J.status === "error" && N(J.value);
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function E(w, _) {
|
|
517
517
|
var D = {};
|
|
518
518
|
try {
|
|
519
|
-
D.value = w(
|
|
520
|
-
} catch (
|
|
521
|
-
D.status = "error", D.value =
|
|
519
|
+
D.value = w(_), D.status = "success";
|
|
520
|
+
} catch (N) {
|
|
521
|
+
D.status = "error", D.value = N;
|
|
522
522
|
}
|
|
523
523
|
return D;
|
|
524
524
|
}
|
|
525
|
-
|
|
525
|
+
d.resolve = i;
|
|
526
526
|
function i(w) {
|
|
527
|
-
return w instanceof this ? w : C.resolve(new this(
|
|
527
|
+
return w instanceof this ? w : C.resolve(new this(x), w);
|
|
528
528
|
}
|
|
529
|
-
|
|
530
|
-
function
|
|
531
|
-
var
|
|
532
|
-
return C.reject(
|
|
529
|
+
d.reject = S;
|
|
530
|
+
function S(w) {
|
|
531
|
+
var _ = new this(x);
|
|
532
|
+
return C.reject(_, w);
|
|
533
533
|
}
|
|
534
|
-
|
|
534
|
+
d.all = I;
|
|
535
535
|
function I(w) {
|
|
536
|
-
var
|
|
536
|
+
var _ = this;
|
|
537
537
|
if (Object.prototype.toString.call(w) !== "[object Array]")
|
|
538
538
|
return this.reject(new TypeError("must be an array"));
|
|
539
|
-
var D = w.length,
|
|
539
|
+
var D = w.length, N = !1;
|
|
540
540
|
if (!D)
|
|
541
541
|
return this.resolve([]);
|
|
542
|
-
for (var
|
|
543
|
-
ee(w[
|
|
542
|
+
for (var f = new Array(D), b = 0, J = -1, Q = new this(x); ++J < D; )
|
|
543
|
+
ee(w[J], J);
|
|
544
544
|
return Q;
|
|
545
545
|
function ee(ce, we) {
|
|
546
|
-
|
|
547
|
-
|
|
546
|
+
_.resolve(ce).then(W, function(Z) {
|
|
547
|
+
N || (N = !0, C.reject(Q, Z));
|
|
548
548
|
});
|
|
549
549
|
function W(Z) {
|
|
550
|
-
|
|
550
|
+
f[we] = Z, ++b === D && !N && (N = !0, C.resolve(Q, f));
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
|
-
|
|
554
|
+
d.race = L;
|
|
555
555
|
function L(w) {
|
|
556
|
-
var
|
|
556
|
+
var _ = this;
|
|
557
557
|
if (Object.prototype.toString.call(w) !== "[object Array]")
|
|
558
558
|
return this.reject(new TypeError("must be an array"));
|
|
559
|
-
var D = w.length,
|
|
559
|
+
var D = w.length, N = !1;
|
|
560
560
|
if (!D)
|
|
561
561
|
return this.resolve([]);
|
|
562
|
-
for (var
|
|
563
|
-
|
|
564
|
-
return
|
|
565
|
-
function
|
|
566
|
-
|
|
567
|
-
|
|
562
|
+
for (var f = -1, b = new this(x); ++f < D; )
|
|
563
|
+
J(w[f]);
|
|
564
|
+
return b;
|
|
565
|
+
function J(Q) {
|
|
566
|
+
_.resolve(Q).then(function(ee) {
|
|
567
|
+
N || (N = !0, C.resolve(b, ee));
|
|
568
568
|
}, function(ee) {
|
|
569
|
-
|
|
569
|
+
N || (N = !0, C.reject(b, ee));
|
|
570
570
|
});
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
}, { 1: 1 }], 3: [function(l,
|
|
573
|
+
}, { 1: 1 }], 3: [function(l, A, s) {
|
|
574
574
|
(function(g) {
|
|
575
575
|
typeof g.Promise != "function" && (g.Promise = l(2));
|
|
576
576
|
}).call(this, typeof Qe < "u" ? Qe : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
577
|
-
}, { 2: 2 }], 4: [function(l,
|
|
577
|
+
}, { 2: 2 }], 4: [function(l, A, s) {
|
|
578
578
|
var g = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
|
|
579
579
|
return typeof n;
|
|
580
580
|
} : function(n) {
|
|
581
581
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
582
582
|
};
|
|
583
|
-
function
|
|
583
|
+
function x(n, c) {
|
|
584
584
|
if (!(n instanceof c))
|
|
585
585
|
throw new TypeError("Cannot call a class as a function");
|
|
586
586
|
}
|
|
@@ -601,7 +601,7 @@ var at = { exports: {} };
|
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
603
|
var T = C();
|
|
604
|
-
function
|
|
604
|
+
function P() {
|
|
605
605
|
try {
|
|
606
606
|
if (!T || !T.open)
|
|
607
607
|
return !1;
|
|
@@ -619,16 +619,16 @@ var at = { exports: {} };
|
|
|
619
619
|
n = n || [], c = c || {};
|
|
620
620
|
try {
|
|
621
621
|
return new Blob(n, c);
|
|
622
|
-
} catch (
|
|
623
|
-
if (
|
|
624
|
-
throw
|
|
622
|
+
} catch (o) {
|
|
623
|
+
if (o.name !== "TypeError")
|
|
624
|
+
throw o;
|
|
625
625
|
for (var a = typeof BlobBuilder < "u" ? BlobBuilder : typeof MSBlobBuilder < "u" ? MSBlobBuilder : typeof MozBlobBuilder < "u" ? MozBlobBuilder : WebKitBlobBuilder, m = new a(), v = 0; v < n.length; v += 1)
|
|
626
626
|
m.append(n[v]);
|
|
627
627
|
return m.getBlob(c.type);
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
630
|
typeof Promise > "u" && l(3);
|
|
631
|
-
var
|
|
631
|
+
var d = Promise;
|
|
632
632
|
function h(n, c) {
|
|
633
633
|
c && n.then(function(a) {
|
|
634
634
|
c(null, a);
|
|
@@ -646,75 +646,75 @@ var at = { exports: {} };
|
|
|
646
646
|
if (arguments.length && typeof arguments[arguments.length - 1] == "function")
|
|
647
647
|
return arguments[arguments.length - 1];
|
|
648
648
|
}
|
|
649
|
-
var
|
|
650
|
-
function
|
|
649
|
+
var E = "local-forage-detect-blob-support", i = void 0, S = {}, I = Object.prototype.toString, L = "readonly", w = "readwrite";
|
|
650
|
+
function _(n) {
|
|
651
651
|
for (var c = n.length, a = new ArrayBuffer(c), m = new Uint8Array(a), v = 0; v < c; v++)
|
|
652
652
|
m[v] = n.charCodeAt(v);
|
|
653
653
|
return a;
|
|
654
654
|
}
|
|
655
655
|
function D(n) {
|
|
656
|
-
return new
|
|
657
|
-
var a = n.transaction(
|
|
658
|
-
a.objectStore(
|
|
656
|
+
return new d(function(c) {
|
|
657
|
+
var a = n.transaction(E, w), m = $([""]);
|
|
658
|
+
a.objectStore(E).put(m, "key"), a.onabort = function(v) {
|
|
659
659
|
v.preventDefault(), v.stopPropagation(), c(!1);
|
|
660
660
|
}, a.oncomplete = function() {
|
|
661
|
-
var v = navigator.userAgent.match(/Chrome\/(\d+)/),
|
|
662
|
-
c(
|
|
661
|
+
var v = navigator.userAgent.match(/Chrome\/(\d+)/), o = navigator.userAgent.match(/Edge\//);
|
|
662
|
+
c(o || !v || parseInt(v[1], 10) >= 43);
|
|
663
663
|
};
|
|
664
664
|
}).catch(function() {
|
|
665
665
|
return !1;
|
|
666
666
|
});
|
|
667
667
|
}
|
|
668
|
-
function
|
|
669
|
-
return typeof i == "boolean" ?
|
|
668
|
+
function N(n) {
|
|
669
|
+
return typeof i == "boolean" ? d.resolve(i) : D(n).then(function(c) {
|
|
670
670
|
return i = c, i;
|
|
671
671
|
});
|
|
672
672
|
}
|
|
673
|
-
function
|
|
674
|
-
var c =
|
|
675
|
-
a.promise = new
|
|
673
|
+
function f(n) {
|
|
674
|
+
var c = S[n.name], a = {};
|
|
675
|
+
a.promise = new d(function(m, v) {
|
|
676
676
|
a.resolve = m, a.reject = v;
|
|
677
677
|
}), c.deferredOperations.push(a), c.dbReady ? c.dbReady = c.dbReady.then(function() {
|
|
678
678
|
return a.promise;
|
|
679
679
|
}) : c.dbReady = a.promise;
|
|
680
680
|
}
|
|
681
|
-
function
|
|
682
|
-
var c =
|
|
681
|
+
function b(n) {
|
|
682
|
+
var c = S[n.name], a = c.deferredOperations.pop();
|
|
683
683
|
if (a)
|
|
684
684
|
return a.resolve(), a.promise;
|
|
685
685
|
}
|
|
686
|
-
function
|
|
687
|
-
var a =
|
|
686
|
+
function J(n, c) {
|
|
687
|
+
var a = S[n.name], m = a.deferredOperations.pop();
|
|
688
688
|
if (m)
|
|
689
689
|
return m.reject(c), m.promise;
|
|
690
690
|
}
|
|
691
691
|
function Q(n, c) {
|
|
692
|
-
return new
|
|
693
|
-
if (
|
|
692
|
+
return new d(function(a, m) {
|
|
693
|
+
if (S[n.name] = S[n.name] || ne(), n.db)
|
|
694
694
|
if (c)
|
|
695
|
-
|
|
695
|
+
f(n), n.db.close();
|
|
696
696
|
else
|
|
697
697
|
return a(n.db);
|
|
698
698
|
var v = [n.name];
|
|
699
699
|
c && v.push(n.version);
|
|
700
|
-
var
|
|
701
|
-
c && (
|
|
702
|
-
var R =
|
|
700
|
+
var o = T.open.apply(T, v);
|
|
701
|
+
c && (o.onupgradeneeded = function(M) {
|
|
702
|
+
var R = o.result;
|
|
703
703
|
try {
|
|
704
|
-
R.createObjectStore(n.storeName), M.oldVersion <= 1 && R.createObjectStore(
|
|
704
|
+
R.createObjectStore(n.storeName), M.oldVersion <= 1 && R.createObjectStore(E);
|
|
705
705
|
} catch (B) {
|
|
706
706
|
if (B.name === "ConstraintError")
|
|
707
707
|
console.warn('The database "' + n.name + '" has been upgraded from version ' + M.oldVersion + " to version " + M.newVersion + ', but the storage "' + n.storeName + '" already exists.');
|
|
708
708
|
else
|
|
709
709
|
throw B;
|
|
710
710
|
}
|
|
711
|
-
}),
|
|
712
|
-
M.preventDefault(), m(
|
|
713
|
-
},
|
|
714
|
-
var M =
|
|
711
|
+
}), o.onerror = function(M) {
|
|
712
|
+
M.preventDefault(), m(o.error);
|
|
713
|
+
}, o.onsuccess = function() {
|
|
714
|
+
var M = o.result;
|
|
715
715
|
M.onversionchange = function(R) {
|
|
716
716
|
R.target.close();
|
|
717
|
-
}, a(M),
|
|
717
|
+
}, a(M), b(n);
|
|
718
718
|
};
|
|
719
719
|
});
|
|
720
720
|
}
|
|
@@ -730,55 +730,55 @@ var at = { exports: {} };
|
|
|
730
730
|
var a = !n.db.objectStoreNames.contains(n.storeName), m = n.version < n.db.version, v = n.version > n.db.version;
|
|
731
731
|
if (m && (n.version !== c && console.warn('The database "' + n.name + `" can't be downgraded from version ` + n.db.version + " to version " + n.version + "."), n.version = n.db.version), v || a) {
|
|
732
732
|
if (a) {
|
|
733
|
-
var
|
|
734
|
-
|
|
733
|
+
var o = n.db.version + 1;
|
|
734
|
+
o > n.version && (n.version = o);
|
|
735
735
|
}
|
|
736
736
|
return !0;
|
|
737
737
|
}
|
|
738
738
|
return !1;
|
|
739
739
|
}
|
|
740
740
|
function W(n) {
|
|
741
|
-
return new
|
|
741
|
+
return new d(function(c, a) {
|
|
742
742
|
var m = new FileReader();
|
|
743
743
|
m.onerror = a, m.onloadend = function(v) {
|
|
744
|
-
var
|
|
744
|
+
var o = btoa(v.target.result || "");
|
|
745
745
|
c({
|
|
746
746
|
__local_forage_encoded_blob: !0,
|
|
747
|
-
data:
|
|
747
|
+
data: o,
|
|
748
748
|
type: n.type
|
|
749
749
|
});
|
|
750
750
|
}, m.readAsBinaryString(n);
|
|
751
751
|
});
|
|
752
752
|
}
|
|
753
753
|
function Z(n) {
|
|
754
|
-
var c =
|
|
754
|
+
var c = _(atob(n.data));
|
|
755
755
|
return $([c], { type: n.type });
|
|
756
756
|
}
|
|
757
|
-
function
|
|
757
|
+
function V(n) {
|
|
758
758
|
return n && n.__local_forage_encoded_blob;
|
|
759
759
|
}
|
|
760
760
|
function ae(n) {
|
|
761
761
|
var c = this, a = c._initReady().then(function() {
|
|
762
|
-
var m =
|
|
762
|
+
var m = S[c._dbInfo.name];
|
|
763
763
|
if (m && m.dbReady)
|
|
764
764
|
return m.dbReady;
|
|
765
765
|
});
|
|
766
766
|
return u(a, n, n), a;
|
|
767
767
|
}
|
|
768
768
|
function G(n) {
|
|
769
|
-
|
|
770
|
-
for (var c =
|
|
769
|
+
f(n);
|
|
770
|
+
for (var c = S[n.name], a = c.forages, m = 0; m < a.length; m++) {
|
|
771
771
|
var v = a[m];
|
|
772
772
|
v._dbInfo.db && (v._dbInfo.db.close(), v._dbInfo.db = null);
|
|
773
773
|
}
|
|
774
|
-
return n.db = null, ee(n).then(function(
|
|
775
|
-
return n.db =
|
|
776
|
-
}).then(function(
|
|
777
|
-
n.db = c.db =
|
|
774
|
+
return n.db = null, ee(n).then(function(o) {
|
|
775
|
+
return n.db = o, we(n) ? ce(n) : o;
|
|
776
|
+
}).then(function(o) {
|
|
777
|
+
n.db = c.db = o;
|
|
778
778
|
for (var M = 0; M < a.length; M++)
|
|
779
|
-
a[M]._dbInfo.db =
|
|
780
|
-
}).catch(function(
|
|
781
|
-
throw
|
|
779
|
+
a[M]._dbInfo.db = o;
|
|
780
|
+
}).catch(function(o) {
|
|
781
|
+
throw J(n, o), o;
|
|
782
782
|
});
|
|
783
783
|
}
|
|
784
784
|
function X(n, c, a, m) {
|
|
@@ -786,17 +786,17 @@ var at = { exports: {} };
|
|
|
786
786
|
try {
|
|
787
787
|
var v = n.db.transaction(n.storeName, c);
|
|
788
788
|
a(null, v);
|
|
789
|
-
} catch (
|
|
790
|
-
if (m > 0 && (!n.db ||
|
|
791
|
-
return
|
|
792
|
-
if (!n.db ||
|
|
789
|
+
} catch (o) {
|
|
790
|
+
if (m > 0 && (!n.db || o.name === "InvalidStateError" || o.name === "NotFoundError"))
|
|
791
|
+
return d.resolve().then(function() {
|
|
792
|
+
if (!n.db || o.name === "NotFoundError" && !n.db.objectStoreNames.contains(n.storeName) && n.version <= n.db.version)
|
|
793
793
|
return n.db && (n.version = n.db.version + 1), ce(n);
|
|
794
794
|
}).then(function() {
|
|
795
795
|
return G(n).then(function() {
|
|
796
796
|
X(n, c, a, m - 1);
|
|
797
797
|
});
|
|
798
798
|
}).catch(a);
|
|
799
|
-
a(
|
|
799
|
+
a(o);
|
|
800
800
|
}
|
|
801
801
|
}
|
|
802
802
|
function ne() {
|
|
@@ -818,18 +818,18 @@ var at = { exports: {} };
|
|
|
818
818
|
if (n)
|
|
819
819
|
for (var m in n)
|
|
820
820
|
a[m] = n[m];
|
|
821
|
-
var v =
|
|
822
|
-
v || (v = ne(),
|
|
823
|
-
var
|
|
821
|
+
var v = S[a.name];
|
|
822
|
+
v || (v = ne(), S[a.name] = v), v.forages.push(c), c._initReady || (c._initReady = c.ready, c.ready = ae);
|
|
823
|
+
var o = [];
|
|
824
824
|
function M() {
|
|
825
|
-
return
|
|
825
|
+
return d.resolve();
|
|
826
826
|
}
|
|
827
827
|
for (var R = 0; R < v.forages.length; R++) {
|
|
828
828
|
var B = v.forages[R];
|
|
829
|
-
B !== c &&
|
|
829
|
+
B !== c && o.push(B._initReady().catch(M));
|
|
830
830
|
}
|
|
831
831
|
var F = v.forages.slice(0);
|
|
832
|
-
return
|
|
832
|
+
return d.all(o).then(function() {
|
|
833
833
|
return a.db = v.db, ee(a);
|
|
834
834
|
}).then(function(k) {
|
|
835
835
|
return a.db = k, we(a, c._defaultConfig.version) ? ce(a) : k;
|
|
@@ -844,62 +844,62 @@ var at = { exports: {} };
|
|
|
844
844
|
function ie(n, c) {
|
|
845
845
|
var a = this;
|
|
846
846
|
n = r(n);
|
|
847
|
-
var m = new
|
|
847
|
+
var m = new d(function(v, o) {
|
|
848
848
|
a.ready().then(function() {
|
|
849
849
|
X(a._dbInfo, L, function(M, R) {
|
|
850
850
|
if (M)
|
|
851
|
-
return
|
|
851
|
+
return o(M);
|
|
852
852
|
try {
|
|
853
853
|
var B = R.objectStore(a._dbInfo.storeName), F = B.get(n);
|
|
854
854
|
F.onsuccess = function() {
|
|
855
855
|
var k = F.result;
|
|
856
|
-
k === void 0 && (k = null),
|
|
856
|
+
k === void 0 && (k = null), V(k) && (k = Z(k)), v(k);
|
|
857
857
|
}, F.onerror = function() {
|
|
858
|
-
|
|
858
|
+
o(F.error);
|
|
859
859
|
};
|
|
860
860
|
} catch (k) {
|
|
861
|
-
|
|
861
|
+
o(k);
|
|
862
862
|
}
|
|
863
863
|
});
|
|
864
|
-
}).catch(
|
|
864
|
+
}).catch(o);
|
|
865
865
|
});
|
|
866
866
|
return h(m, c), m;
|
|
867
867
|
}
|
|
868
868
|
function Ee(n, c) {
|
|
869
|
-
var a = this, m = new
|
|
869
|
+
var a = this, m = new d(function(v, o) {
|
|
870
870
|
a.ready().then(function() {
|
|
871
871
|
X(a._dbInfo, L, function(M, R) {
|
|
872
872
|
if (M)
|
|
873
|
-
return
|
|
873
|
+
return o(M);
|
|
874
874
|
try {
|
|
875
875
|
var B = R.objectStore(a._dbInfo.storeName), F = B.openCursor(), k = 1;
|
|
876
876
|
F.onsuccess = function() {
|
|
877
877
|
var q = F.result;
|
|
878
878
|
if (q) {
|
|
879
879
|
var z = q.value;
|
|
880
|
-
|
|
880
|
+
V(z) && (z = Z(z));
|
|
881
881
|
var p = n(z, q.key, k++);
|
|
882
882
|
p !== void 0 ? v(p) : q.continue();
|
|
883
883
|
} else
|
|
884
884
|
v();
|
|
885
885
|
}, F.onerror = function() {
|
|
886
|
-
|
|
886
|
+
o(F.error);
|
|
887
887
|
};
|
|
888
888
|
} catch (q) {
|
|
889
|
-
|
|
889
|
+
o(q);
|
|
890
890
|
}
|
|
891
891
|
});
|
|
892
|
-
}).catch(
|
|
892
|
+
}).catch(o);
|
|
893
893
|
});
|
|
894
894
|
return h(m, c), m;
|
|
895
895
|
}
|
|
896
|
-
function
|
|
896
|
+
function Be(n, c, a) {
|
|
897
897
|
var m = this;
|
|
898
898
|
n = r(n);
|
|
899
|
-
var v = new
|
|
899
|
+
var v = new d(function(o, M) {
|
|
900
900
|
var R;
|
|
901
901
|
m.ready().then(function() {
|
|
902
|
-
return R = m._dbInfo, I.call(c) === "[object Blob]" ?
|
|
902
|
+
return R = m._dbInfo, I.call(c) === "[object Blob]" ? N(R.db).then(function(B) {
|
|
903
903
|
return B ? c : W(c);
|
|
904
904
|
}) : c;
|
|
905
905
|
}).then(function(B) {
|
|
@@ -911,7 +911,7 @@ var at = { exports: {} };
|
|
|
911
911
|
B === null && (B = void 0);
|
|
912
912
|
var z = q.put(B, n);
|
|
913
913
|
k.oncomplete = function() {
|
|
914
|
-
B === void 0 && (B = null),
|
|
914
|
+
B === void 0 && (B = null), o(B);
|
|
915
915
|
}, k.onabort = k.onerror = function() {
|
|
916
916
|
var p = z.error ? z.error : z.transaction.error;
|
|
917
917
|
M(p);
|
|
@@ -924,38 +924,38 @@ var at = { exports: {} };
|
|
|
924
924
|
});
|
|
925
925
|
return h(v, a), v;
|
|
926
926
|
}
|
|
927
|
-
function
|
|
927
|
+
function Me(n, c) {
|
|
928
928
|
var a = this;
|
|
929
929
|
n = r(n);
|
|
930
|
-
var m = new
|
|
930
|
+
var m = new d(function(v, o) {
|
|
931
931
|
a.ready().then(function() {
|
|
932
932
|
X(a._dbInfo, w, function(M, R) {
|
|
933
933
|
if (M)
|
|
934
|
-
return
|
|
934
|
+
return o(M);
|
|
935
935
|
try {
|
|
936
936
|
var B = R.objectStore(a._dbInfo.storeName), F = B.delete(n);
|
|
937
937
|
R.oncomplete = function() {
|
|
938
938
|
v();
|
|
939
939
|
}, R.onerror = function() {
|
|
940
|
-
|
|
940
|
+
o(F.error);
|
|
941
941
|
}, R.onabort = function() {
|
|
942
942
|
var k = F.error ? F.error : F.transaction.error;
|
|
943
|
-
|
|
943
|
+
o(k);
|
|
944
944
|
};
|
|
945
945
|
} catch (k) {
|
|
946
|
-
|
|
946
|
+
o(k);
|
|
947
947
|
}
|
|
948
948
|
});
|
|
949
|
-
}).catch(
|
|
949
|
+
}).catch(o);
|
|
950
950
|
});
|
|
951
951
|
return h(m, c), m;
|
|
952
952
|
}
|
|
953
953
|
function rr(n) {
|
|
954
|
-
var c = this, a = new
|
|
954
|
+
var c = this, a = new d(function(m, v) {
|
|
955
955
|
c.ready().then(function() {
|
|
956
|
-
X(c._dbInfo, w, function(
|
|
957
|
-
if (
|
|
958
|
-
return v(
|
|
956
|
+
X(c._dbInfo, w, function(o, M) {
|
|
957
|
+
if (o)
|
|
958
|
+
return v(o);
|
|
959
959
|
try {
|
|
960
960
|
var R = M.objectStore(c._dbInfo.storeName), B = R.clear();
|
|
961
961
|
M.oncomplete = function() {
|
|
@@ -973,11 +973,11 @@ var at = { exports: {} };
|
|
|
973
973
|
return h(a, n), a;
|
|
974
974
|
}
|
|
975
975
|
function tr(n) {
|
|
976
|
-
var c = this, a = new
|
|
976
|
+
var c = this, a = new d(function(m, v) {
|
|
977
977
|
c.ready().then(function() {
|
|
978
|
-
X(c._dbInfo, L, function(
|
|
979
|
-
if (
|
|
980
|
-
return v(
|
|
978
|
+
X(c._dbInfo, L, function(o, M) {
|
|
979
|
+
if (o)
|
|
980
|
+
return v(o);
|
|
981
981
|
try {
|
|
982
982
|
var R = M.objectStore(c._dbInfo.storeName), B = R.count();
|
|
983
983
|
B.onsuccess = function() {
|
|
@@ -994,7 +994,7 @@ var at = { exports: {} };
|
|
|
994
994
|
return h(a, n), a;
|
|
995
995
|
}
|
|
996
996
|
function nr(n, c) {
|
|
997
|
-
var a = this, m = new
|
|
997
|
+
var a = this, m = new d(function(v, o) {
|
|
998
998
|
if (n < 0) {
|
|
999
999
|
v(null);
|
|
1000
1000
|
return;
|
|
@@ -1002,7 +1002,7 @@ var at = { exports: {} };
|
|
|
1002
1002
|
a.ready().then(function() {
|
|
1003
1003
|
X(a._dbInfo, L, function(M, R) {
|
|
1004
1004
|
if (M)
|
|
1005
|
-
return
|
|
1005
|
+
return o(M);
|
|
1006
1006
|
try {
|
|
1007
1007
|
var B = R.objectStore(a._dbInfo.storeName), F = !1, k = B.openKeyCursor();
|
|
1008
1008
|
k.onsuccess = function() {
|
|
@@ -1013,22 +1013,22 @@ var at = { exports: {} };
|
|
|
1013
1013
|
}
|
|
1014
1014
|
n === 0 || F ? v(q.key) : (F = !0, q.advance(n));
|
|
1015
1015
|
}, k.onerror = function() {
|
|
1016
|
-
|
|
1016
|
+
o(k.error);
|
|
1017
1017
|
};
|
|
1018
1018
|
} catch (q) {
|
|
1019
|
-
|
|
1019
|
+
o(q);
|
|
1020
1020
|
}
|
|
1021
1021
|
});
|
|
1022
|
-
}).catch(
|
|
1022
|
+
}).catch(o);
|
|
1023
1023
|
});
|
|
1024
1024
|
return h(m, c), m;
|
|
1025
1025
|
}
|
|
1026
|
-
function
|
|
1027
|
-
var c = this, a = new
|
|
1026
|
+
function Ce(n) {
|
|
1027
|
+
var c = this, a = new d(function(m, v) {
|
|
1028
1028
|
c.ready().then(function() {
|
|
1029
|
-
X(c._dbInfo, L, function(
|
|
1030
|
-
if (
|
|
1031
|
-
return v(
|
|
1029
|
+
X(c._dbInfo, L, function(o, M) {
|
|
1030
|
+
if (o)
|
|
1031
|
+
return v(o);
|
|
1032
1032
|
try {
|
|
1033
1033
|
var R = M.objectStore(c._dbInfo.storeName), B = R.openKeyCursor(), F = [];
|
|
1034
1034
|
B.onsuccess = function() {
|
|
@@ -1055,10 +1055,10 @@ var at = { exports: {} };
|
|
|
1055
1055
|
n = typeof n != "function" && n || {}, n.name || (n.name = n.name || a.name, n.storeName = n.storeName || a.storeName);
|
|
1056
1056
|
var m = this, v;
|
|
1057
1057
|
if (!n.name)
|
|
1058
|
-
v =
|
|
1058
|
+
v = d.reject("Invalid arguments");
|
|
1059
1059
|
else {
|
|
1060
|
-
var
|
|
1061
|
-
var B =
|
|
1060
|
+
var o = n.name === a.name && m._dbInfo.db, M = o ? d.resolve(m._dbInfo.db) : ee(n).then(function(R) {
|
|
1061
|
+
var B = S[n.name], F = B.forages;
|
|
1062
1062
|
B.db = R;
|
|
1063
1063
|
for (var k = 0; k < F.length; k++)
|
|
1064
1064
|
F[k]._dbInfo.db = R;
|
|
@@ -1067,18 +1067,18 @@ var at = { exports: {} };
|
|
|
1067
1067
|
n.storeName ? v = M.then(function(R) {
|
|
1068
1068
|
if (R.objectStoreNames.contains(n.storeName)) {
|
|
1069
1069
|
var B = R.version + 1;
|
|
1070
|
-
|
|
1071
|
-
var F =
|
|
1070
|
+
f(n);
|
|
1071
|
+
var F = S[n.name], k = F.forages;
|
|
1072
1072
|
R.close();
|
|
1073
1073
|
for (var q = 0; q < k.length; q++) {
|
|
1074
1074
|
var z = k[q];
|
|
1075
1075
|
z._dbInfo.db = null, z._dbInfo.version = B;
|
|
1076
1076
|
}
|
|
1077
|
-
var p = new
|
|
1077
|
+
var p = new d(function(re, ue) {
|
|
1078
1078
|
var le = T.open(n.name, B);
|
|
1079
1079
|
le.onerror = function(ge) {
|
|
1080
|
-
var
|
|
1081
|
-
|
|
1080
|
+
var Ye = le.result;
|
|
1081
|
+
Ye.close(), ue(ge);
|
|
1082
1082
|
}, le.onupgradeneeded = function() {
|
|
1083
1083
|
var ge = le.result;
|
|
1084
1084
|
ge.deleteObjectStore(n.storeName);
|
|
@@ -1091,22 +1091,22 @@ var at = { exports: {} };
|
|
|
1091
1091
|
F.db = re;
|
|
1092
1092
|
for (var ue = 0; ue < k.length; ue++) {
|
|
1093
1093
|
var le = k[ue];
|
|
1094
|
-
le._dbInfo.db = re,
|
|
1094
|
+
le._dbInfo.db = re, b(le._dbInfo);
|
|
1095
1095
|
}
|
|
1096
1096
|
}).catch(function(re) {
|
|
1097
|
-
throw (
|
|
1097
|
+
throw (J(n, re) || d.resolve()).catch(function() {
|
|
1098
1098
|
}), re;
|
|
1099
1099
|
});
|
|
1100
1100
|
}
|
|
1101
1101
|
}) : v = M.then(function(R) {
|
|
1102
|
-
|
|
1103
|
-
var B =
|
|
1102
|
+
f(n);
|
|
1103
|
+
var B = S[n.name], F = B.forages;
|
|
1104
1104
|
R.close();
|
|
1105
1105
|
for (var k = 0; k < F.length; k++) {
|
|
1106
1106
|
var q = F[k];
|
|
1107
1107
|
q._dbInfo.db = null;
|
|
1108
1108
|
}
|
|
1109
|
-
var z = new
|
|
1109
|
+
var z = new d(function(p, re) {
|
|
1110
1110
|
var ue = T.deleteDatabase(n.name);
|
|
1111
1111
|
ue.onerror = function() {
|
|
1112
1112
|
var le = ue.result;
|
|
@@ -1122,10 +1122,10 @@ var at = { exports: {} };
|
|
|
1122
1122
|
B.db = p;
|
|
1123
1123
|
for (var re = 0; re < F.length; re++) {
|
|
1124
1124
|
var ue = F[re];
|
|
1125
|
-
|
|
1125
|
+
b(ue._dbInfo);
|
|
1126
1126
|
}
|
|
1127
1127
|
}).catch(function(p) {
|
|
1128
|
-
throw (
|
|
1128
|
+
throw (J(n, p) || d.resolve()).catch(function() {
|
|
1129
1129
|
}), p;
|
|
1130
1130
|
});
|
|
1131
1131
|
});
|
|
@@ -1135,27 +1135,27 @@ var at = { exports: {} };
|
|
|
1135
1135
|
var lr = {
|
|
1136
1136
|
_driver: "asyncStorage",
|
|
1137
1137
|
_initStorage: fe,
|
|
1138
|
-
_support:
|
|
1138
|
+
_support: P(),
|
|
1139
1139
|
iterate: Ee,
|
|
1140
1140
|
getItem: ie,
|
|
1141
|
-
setItem:
|
|
1142
|
-
removeItem:
|
|
1141
|
+
setItem: Be,
|
|
1142
|
+
removeItem: Me,
|
|
1143
1143
|
clear: rr,
|
|
1144
1144
|
length: tr,
|
|
1145
1145
|
key: nr,
|
|
1146
|
-
keys:
|
|
1146
|
+
keys: Ce,
|
|
1147
1147
|
dropInstance: ar
|
|
1148
1148
|
};
|
|
1149
1149
|
function ur() {
|
|
1150
1150
|
return typeof openDatabase == "function";
|
|
1151
1151
|
}
|
|
1152
|
-
var be = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", cr = "~~local_forage_type~", ze = /^~~local_forage_type~([^~]+)~/,
|
|
1152
|
+
var be = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", cr = "~~local_forage_type~", ze = /^~~local_forage_type~([^~]+)~/, $e = "__lfsc__:", Pe = $e.length, We = "arbf", Ie = "blob", Je = "si08", je = "ui08", qe = "uic8", Ve = "si16", U = "si32", j = "ur16", H = "ui32", O = "fl32", oe = "fl64", ve = Pe + We.length, De = Object.prototype.toString;
|
|
1153
1153
|
function Se(n) {
|
|
1154
|
-
var c = n.length * 0.75, a = n.length, m, v = 0,
|
|
1154
|
+
var c = n.length * 0.75, a = n.length, m, v = 0, o, M, R, B;
|
|
1155
1155
|
n[n.length - 1] === "=" && (c--, n[n.length - 2] === "=" && c--);
|
|
1156
1156
|
var F = new ArrayBuffer(c), k = new Uint8Array(F);
|
|
1157
1157
|
for (m = 0; m < a; m += 4)
|
|
1158
|
-
|
|
1158
|
+
o = be.indexOf(n[m]), M = be.indexOf(n[m + 1]), R = be.indexOf(n[m + 2]), B = be.indexOf(n[m + 3]), k[v++] = o << 2 | M >> 4, k[v++] = (M & 15) << 4 | R >> 2, k[v++] = (R & 3) << 6 | B & 63;
|
|
1159
1159
|
return F;
|
|
1160
1160
|
}
|
|
1161
1161
|
function se(n) {
|
|
@@ -1164,17 +1164,17 @@ var at = { exports: {} };
|
|
|
1164
1164
|
a += be[c[m] >> 2], a += be[(c[m] & 3) << 4 | c[m + 1] >> 4], a += be[(c[m + 1] & 15) << 2 | c[m + 2] >> 6], a += be[c[m + 2] & 63];
|
|
1165
1165
|
return c.length % 3 === 2 ? a = a.substring(0, a.length - 1) + "=" : c.length % 3 === 1 && (a = a.substring(0, a.length - 2) + "=="), a;
|
|
1166
1166
|
}
|
|
1167
|
-
function
|
|
1167
|
+
function Ne(n, c) {
|
|
1168
1168
|
var a = "";
|
|
1169
1169
|
if (n && (a = De.call(n)), n && (a === "[object ArrayBuffer]" || n.buffer && De.call(n.buffer) === "[object ArrayBuffer]")) {
|
|
1170
|
-
var m, v =
|
|
1171
|
-
n instanceof ArrayBuffer ? (m = n, v +=
|
|
1170
|
+
var m, v = $e;
|
|
1171
|
+
n instanceof ArrayBuffer ? (m = n, v += We) : (m = n.buffer, a === "[object Int8Array]" ? v += Je : a === "[object Uint8Array]" ? v += je : a === "[object Uint8ClampedArray]" ? v += qe : a === "[object Int16Array]" ? v += Ve : a === "[object Uint16Array]" ? v += j : a === "[object Int32Array]" ? v += U : a === "[object Uint32Array]" ? v += H : a === "[object Float32Array]" ? v += O : a === "[object Float64Array]" ? v += oe : c(new Error("Failed to get type for BinaryArray"))), c(v + se(m));
|
|
1172
1172
|
} else if (a === "[object Blob]") {
|
|
1173
|
-
var
|
|
1174
|
-
|
|
1173
|
+
var o = new FileReader();
|
|
1174
|
+
o.onload = function() {
|
|
1175
1175
|
var M = cr + n.type + "~" + se(this.result);
|
|
1176
|
-
c(
|
|
1177
|
-
},
|
|
1176
|
+
c($e + Ie + M);
|
|
1177
|
+
}, o.readAsArrayBuffer(n);
|
|
1178
1178
|
} else
|
|
1179
1179
|
try {
|
|
1180
1180
|
c(JSON.stringify(n));
|
|
@@ -1183,43 +1183,43 @@ var at = { exports: {} };
|
|
|
1183
1183
|
}
|
|
1184
1184
|
}
|
|
1185
1185
|
function ft(n) {
|
|
1186
|
-
if (n.substring(0,
|
|
1186
|
+
if (n.substring(0, Pe) !== $e)
|
|
1187
1187
|
return JSON.parse(n);
|
|
1188
|
-
var c = n.substring(ve), a = n.substring(
|
|
1188
|
+
var c = n.substring(ve), a = n.substring(Pe, ve), m;
|
|
1189
1189
|
if (a === Ie && ze.test(c)) {
|
|
1190
1190
|
var v = c.match(ze);
|
|
1191
1191
|
m = v[1], c = c.substring(v[0].length);
|
|
1192
1192
|
}
|
|
1193
|
-
var
|
|
1193
|
+
var o = Se(c);
|
|
1194
1194
|
switch (a) {
|
|
1195
|
-
case
|
|
1196
|
-
return
|
|
1195
|
+
case We:
|
|
1196
|
+
return o;
|
|
1197
1197
|
case Ie:
|
|
1198
|
-
return $([
|
|
1198
|
+
return $([o], { type: m });
|
|
1199
1199
|
case Je:
|
|
1200
|
-
return new Int8Array(
|
|
1200
|
+
return new Int8Array(o);
|
|
1201
1201
|
case je:
|
|
1202
|
-
return new Uint8Array(
|
|
1203
|
-
case We:
|
|
1204
|
-
return new Uint8ClampedArray(s);
|
|
1202
|
+
return new Uint8Array(o);
|
|
1205
1203
|
case qe:
|
|
1206
|
-
return new
|
|
1207
|
-
case
|
|
1208
|
-
return new
|
|
1204
|
+
return new Uint8ClampedArray(o);
|
|
1205
|
+
case Ve:
|
|
1206
|
+
return new Int16Array(o);
|
|
1207
|
+
case j:
|
|
1208
|
+
return new Uint16Array(o);
|
|
1209
1209
|
case U:
|
|
1210
|
-
return new Int32Array(
|
|
1211
|
-
case
|
|
1212
|
-
return new Uint32Array(
|
|
1210
|
+
return new Int32Array(o);
|
|
1211
|
+
case H:
|
|
1212
|
+
return new Uint32Array(o);
|
|
1213
1213
|
case O:
|
|
1214
|
-
return new Float32Array(
|
|
1214
|
+
return new Float32Array(o);
|
|
1215
1215
|
case oe:
|
|
1216
|
-
return new Float64Array(
|
|
1216
|
+
return new Float64Array(o);
|
|
1217
1217
|
default:
|
|
1218
1218
|
throw new Error("Unkown type: " + a);
|
|
1219
1219
|
}
|
|
1220
1220
|
}
|
|
1221
1221
|
var ir = {
|
|
1222
|
-
serialize:
|
|
1222
|
+
serialize: Ne,
|
|
1223
1223
|
deserialize: ft,
|
|
1224
1224
|
stringToBuffer: Se,
|
|
1225
1225
|
bufferToString: se
|
|
@@ -1234,7 +1234,7 @@ var at = { exports: {} };
|
|
|
1234
1234
|
if (n)
|
|
1235
1235
|
for (var m in n)
|
|
1236
1236
|
a[m] = typeof n[m] != "string" ? n[m].toString() : n[m];
|
|
1237
|
-
var v = new
|
|
1237
|
+
var v = new d(function(o, M) {
|
|
1238
1238
|
try {
|
|
1239
1239
|
a.db = openDatabase(a.name, String(a.version), a.description, a.size);
|
|
1240
1240
|
} catch (R) {
|
|
@@ -1242,7 +1242,7 @@ var at = { exports: {} };
|
|
|
1242
1242
|
}
|
|
1243
1243
|
a.db.transaction(function(R) {
|
|
1244
1244
|
Ur(R, a, function() {
|
|
1245
|
-
c._dbInfo = a,
|
|
1245
|
+
c._dbInfo = a, o();
|
|
1246
1246
|
}, function(B, F) {
|
|
1247
1247
|
M(F);
|
|
1248
1248
|
});
|
|
@@ -1250,19 +1250,19 @@ var at = { exports: {} };
|
|
|
1250
1250
|
});
|
|
1251
1251
|
return a.serializer = ir, v;
|
|
1252
1252
|
}
|
|
1253
|
-
function xe(n, c, a, m, v,
|
|
1253
|
+
function xe(n, c, a, m, v, o) {
|
|
1254
1254
|
n.executeSql(a, m, v, function(M, R) {
|
|
1255
1255
|
R.code === R.SYNTAX_ERR ? M.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?", [c.storeName], function(B, F) {
|
|
1256
|
-
F.rows.length ?
|
|
1257
|
-
B.executeSql(a, m, v,
|
|
1258
|
-
},
|
|
1259
|
-
},
|
|
1260
|
-
},
|
|
1256
|
+
F.rows.length ? o(B, R) : Ur(B, c, function() {
|
|
1257
|
+
B.executeSql(a, m, v, o);
|
|
1258
|
+
}, o);
|
|
1259
|
+
}, o) : o(M, R);
|
|
1260
|
+
}, o);
|
|
1261
1261
|
}
|
|
1262
1262
|
function ot(n, c) {
|
|
1263
1263
|
var a = this;
|
|
1264
1264
|
n = r(n);
|
|
1265
|
-
var m = new
|
|
1265
|
+
var m = new d(function(v, o) {
|
|
1266
1266
|
a.ready().then(function() {
|
|
1267
1267
|
var M = a._dbInfo;
|
|
1268
1268
|
M.db.transaction(function(R) {
|
|
@@ -1270,15 +1270,15 @@ var at = { exports: {} };
|
|
|
1270
1270
|
var k = F.rows.length ? F.rows.item(0).value : null;
|
|
1271
1271
|
k && (k = M.serializer.deserialize(k)), v(k);
|
|
1272
1272
|
}, function(B, F) {
|
|
1273
|
-
|
|
1273
|
+
o(F);
|
|
1274
1274
|
});
|
|
1275
1275
|
});
|
|
1276
|
-
}).catch(
|
|
1276
|
+
}).catch(o);
|
|
1277
1277
|
});
|
|
1278
1278
|
return h(m, c), m;
|
|
1279
1279
|
}
|
|
1280
1280
|
function dt(n, c) {
|
|
1281
|
-
var a = this, m = new
|
|
1281
|
+
var a = this, m = new d(function(v, o) {
|
|
1282
1282
|
a.ready().then(function() {
|
|
1283
1283
|
var M = a._dbInfo;
|
|
1284
1284
|
M.db.transaction(function(R) {
|
|
@@ -1292,17 +1292,17 @@ var at = { exports: {} };
|
|
|
1292
1292
|
}
|
|
1293
1293
|
v();
|
|
1294
1294
|
}, function(B, F) {
|
|
1295
|
-
|
|
1295
|
+
o(F);
|
|
1296
1296
|
});
|
|
1297
1297
|
});
|
|
1298
|
-
}).catch(
|
|
1298
|
+
}).catch(o);
|
|
1299
1299
|
});
|
|
1300
1300
|
return h(m, c), m;
|
|
1301
1301
|
}
|
|
1302
1302
|
function Br(n, c, a, m) {
|
|
1303
1303
|
var v = this;
|
|
1304
1304
|
n = r(n);
|
|
1305
|
-
var
|
|
1305
|
+
var o = new d(function(M, R) {
|
|
1306
1306
|
v.ready().then(function() {
|
|
1307
1307
|
c === void 0 && (c = null);
|
|
1308
1308
|
var B = c, F = v._dbInfo;
|
|
@@ -1325,7 +1325,7 @@ var at = { exports: {} };
|
|
|
1325
1325
|
});
|
|
1326
1326
|
}).catch(R);
|
|
1327
1327
|
});
|
|
1328
|
-
return h(
|
|
1328
|
+
return h(o, a), o;
|
|
1329
1329
|
}
|
|
1330
1330
|
function ht(n, c, a) {
|
|
1331
1331
|
return Br.apply(this, [n, c, a, 1]);
|
|
@@ -1333,26 +1333,26 @@ var at = { exports: {} };
|
|
|
1333
1333
|
function mt(n, c) {
|
|
1334
1334
|
var a = this;
|
|
1335
1335
|
n = r(n);
|
|
1336
|
-
var m = new
|
|
1336
|
+
var m = new d(function(v, o) {
|
|
1337
1337
|
a.ready().then(function() {
|
|
1338
1338
|
var M = a._dbInfo;
|
|
1339
1339
|
M.db.transaction(function(R) {
|
|
1340
1340
|
xe(R, M, "DELETE FROM " + M.storeName + " WHERE key = ?", [n], function() {
|
|
1341
1341
|
v();
|
|
1342
1342
|
}, function(B, F) {
|
|
1343
|
-
|
|
1343
|
+
o(F);
|
|
1344
1344
|
});
|
|
1345
1345
|
});
|
|
1346
|
-
}).catch(
|
|
1346
|
+
}).catch(o);
|
|
1347
1347
|
});
|
|
1348
1348
|
return h(m, c), m;
|
|
1349
1349
|
}
|
|
1350
1350
|
function vt(n) {
|
|
1351
|
-
var c = this, a = new
|
|
1351
|
+
var c = this, a = new d(function(m, v) {
|
|
1352
1352
|
c.ready().then(function() {
|
|
1353
|
-
var
|
|
1354
|
-
|
|
1355
|
-
xe(M,
|
|
1353
|
+
var o = c._dbInfo;
|
|
1354
|
+
o.db.transaction(function(M) {
|
|
1355
|
+
xe(M, o, "DELETE FROM " + o.storeName, [], function() {
|
|
1356
1356
|
m();
|
|
1357
1357
|
}, function(R, B) {
|
|
1358
1358
|
v(B);
|
|
@@ -1363,11 +1363,11 @@ var at = { exports: {} };
|
|
|
1363
1363
|
return h(a, n), a;
|
|
1364
1364
|
}
|
|
1365
1365
|
function gt(n) {
|
|
1366
|
-
var c = this, a = new
|
|
1366
|
+
var c = this, a = new d(function(m, v) {
|
|
1367
1367
|
c.ready().then(function() {
|
|
1368
|
-
var
|
|
1369
|
-
|
|
1370
|
-
xe(M,
|
|
1368
|
+
var o = c._dbInfo;
|
|
1369
|
+
o.db.transaction(function(M) {
|
|
1370
|
+
xe(M, o, "SELECT COUNT(key) as c FROM " + o.storeName, [], function(R, B) {
|
|
1371
1371
|
var F = B.rows.item(0).c;
|
|
1372
1372
|
m(F);
|
|
1373
1373
|
}, function(R, B) {
|
|
@@ -1379,7 +1379,7 @@ var at = { exports: {} };
|
|
|
1379
1379
|
return h(a, n), a;
|
|
1380
1380
|
}
|
|
1381
1381
|
function yt(n, c) {
|
|
1382
|
-
var a = this, m = new
|
|
1382
|
+
var a = this, m = new d(function(v, o) {
|
|
1383
1383
|
a.ready().then(function() {
|
|
1384
1384
|
var M = a._dbInfo;
|
|
1385
1385
|
M.db.transaction(function(R) {
|
|
@@ -1387,19 +1387,19 @@ var at = { exports: {} };
|
|
|
1387
1387
|
var k = F.rows.length ? F.rows.item(0).key : null;
|
|
1388
1388
|
v(k);
|
|
1389
1389
|
}, function(B, F) {
|
|
1390
|
-
|
|
1390
|
+
o(F);
|
|
1391
1391
|
});
|
|
1392
1392
|
});
|
|
1393
|
-
}).catch(
|
|
1393
|
+
}).catch(o);
|
|
1394
1394
|
});
|
|
1395
1395
|
return h(m, c), m;
|
|
1396
1396
|
}
|
|
1397
1397
|
function wt(n) {
|
|
1398
|
-
var c = this, a = new
|
|
1398
|
+
var c = this, a = new d(function(m, v) {
|
|
1399
1399
|
c.ready().then(function() {
|
|
1400
|
-
var
|
|
1401
|
-
|
|
1402
|
-
xe(M,
|
|
1400
|
+
var o = c._dbInfo;
|
|
1401
|
+
o.db.transaction(function(M) {
|
|
1402
|
+
xe(M, o, "SELECT key FROM " + o.storeName, [], function(R, B) {
|
|
1403
1403
|
for (var F = [], k = 0; k < B.rows.length; k++)
|
|
1404
1404
|
F.push(B.rows.item(k).key);
|
|
1405
1405
|
m(F);
|
|
@@ -1412,17 +1412,17 @@ var at = { exports: {} };
|
|
|
1412
1412
|
return h(a, n), a;
|
|
1413
1413
|
}
|
|
1414
1414
|
function bt(n) {
|
|
1415
|
-
return new
|
|
1415
|
+
return new d(function(c, a) {
|
|
1416
1416
|
n.transaction(function(m) {
|
|
1417
|
-
m.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'", [], function(v,
|
|
1418
|
-
for (var M = [], R = 0; R <
|
|
1419
|
-
M.push(
|
|
1417
|
+
m.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'", [], function(v, o) {
|
|
1418
|
+
for (var M = [], R = 0; R < o.rows.length; R++)
|
|
1419
|
+
M.push(o.rows.item(R).name);
|
|
1420
1420
|
c({
|
|
1421
1421
|
db: n,
|
|
1422
1422
|
storeNames: M
|
|
1423
1423
|
});
|
|
1424
|
-
}, function(v,
|
|
1425
|
-
a(
|
|
1424
|
+
}, function(v, o) {
|
|
1425
|
+
a(o);
|
|
1426
1426
|
});
|
|
1427
1427
|
}, function(m) {
|
|
1428
1428
|
a(m);
|
|
@@ -1434,17 +1434,17 @@ var at = { exports: {} };
|
|
|
1434
1434
|
var a = this.config();
|
|
1435
1435
|
n = typeof n != "function" && n || {}, n.name || (n.name = n.name || a.name, n.storeName = n.storeName || a.storeName);
|
|
1436
1436
|
var m = this, v;
|
|
1437
|
-
return n.name ? v = new
|
|
1437
|
+
return n.name ? v = new d(function(o) {
|
|
1438
1438
|
var M;
|
|
1439
|
-
n.name === a.name ? M = m._dbInfo.db : M = openDatabase(n.name, "", "", 0), n.storeName ?
|
|
1439
|
+
n.name === a.name ? M = m._dbInfo.db : M = openDatabase(n.name, "", "", 0), n.storeName ? o({
|
|
1440
1440
|
db: M,
|
|
1441
1441
|
storeNames: [n.storeName]
|
|
1442
|
-
}) :
|
|
1443
|
-
}).then(function(
|
|
1444
|
-
return new
|
|
1445
|
-
|
|
1442
|
+
}) : o(bt(M));
|
|
1443
|
+
}).then(function(o) {
|
|
1444
|
+
return new d(function(M, R) {
|
|
1445
|
+
o.db.transaction(function(B) {
|
|
1446
1446
|
function F(p) {
|
|
1447
|
-
return new
|
|
1447
|
+
return new d(function(re, ue) {
|
|
1448
1448
|
B.executeSql("DROP TABLE IF EXISTS " + p, [], function() {
|
|
1449
1449
|
re();
|
|
1450
1450
|
}, function(le, ge) {
|
|
@@ -1452,9 +1452,9 @@ var at = { exports: {} };
|
|
|
1452
1452
|
});
|
|
1453
1453
|
});
|
|
1454
1454
|
}
|
|
1455
|
-
for (var k = [], q = 0, z =
|
|
1456
|
-
k.push(F(
|
|
1457
|
-
|
|
1455
|
+
for (var k = [], q = 0, z = o.storeNames.length; q < z; q++)
|
|
1456
|
+
k.push(F(o.storeNames[q]));
|
|
1457
|
+
d.all(k).then(function() {
|
|
1458
1458
|
M();
|
|
1459
1459
|
}).catch(function(p) {
|
|
1460
1460
|
R(p);
|
|
@@ -1463,7 +1463,7 @@ var at = { exports: {} };
|
|
|
1463
1463
|
R(B);
|
|
1464
1464
|
});
|
|
1465
1465
|
});
|
|
1466
|
-
}) : v =
|
|
1466
|
+
}) : v = d.reject("Invalid arguments"), h(v, c), v;
|
|
1467
1467
|
}
|
|
1468
1468
|
var At = {
|
|
1469
1469
|
_driver: "webSQLStorage",
|
|
@@ -1507,13 +1507,13 @@ var at = { exports: {} };
|
|
|
1507
1507
|
if (n)
|
|
1508
1508
|
for (var m in n)
|
|
1509
1509
|
a[m] = n[m];
|
|
1510
|
-
return a.keyPrefix = $r(n, c._defaultConfig), Dt() ? (c._dbInfo = a, a.serializer = ir,
|
|
1510
|
+
return a.keyPrefix = $r(n, c._defaultConfig), Dt() ? (c._dbInfo = a, a.serializer = ir, d.resolve()) : d.reject();
|
|
1511
1511
|
}
|
|
1512
1512
|
function _t(n) {
|
|
1513
1513
|
var c = this, a = c.ready().then(function() {
|
|
1514
1514
|
for (var m = c._dbInfo.keyPrefix, v = localStorage.length - 1; v >= 0; v--) {
|
|
1515
|
-
var
|
|
1516
|
-
|
|
1515
|
+
var o = localStorage.key(v);
|
|
1516
|
+
o.indexOf(m) === 0 && localStorage.removeItem(o);
|
|
1517
1517
|
}
|
|
1518
1518
|
});
|
|
1519
1519
|
return h(a, n), a;
|
|
@@ -1522,16 +1522,16 @@ var at = { exports: {} };
|
|
|
1522
1522
|
var a = this;
|
|
1523
1523
|
n = r(n);
|
|
1524
1524
|
var m = a.ready().then(function() {
|
|
1525
|
-
var v = a._dbInfo,
|
|
1526
|
-
return
|
|
1525
|
+
var v = a._dbInfo, o = localStorage.getItem(v.keyPrefix + n);
|
|
1526
|
+
return o && (o = v.serializer.deserialize(o)), o;
|
|
1527
1527
|
});
|
|
1528
1528
|
return h(m, c), m;
|
|
1529
1529
|
}
|
|
1530
1530
|
function Mt(n, c) {
|
|
1531
1531
|
var a = this, m = a.ready().then(function() {
|
|
1532
|
-
for (var v = a._dbInfo,
|
|
1532
|
+
for (var v = a._dbInfo, o = v.keyPrefix, M = o.length, R = localStorage.length, B = 1, F = 0; F < R; F++) {
|
|
1533
1533
|
var k = localStorage.key(F);
|
|
1534
|
-
if (k.indexOf(
|
|
1534
|
+
if (k.indexOf(o) === 0) {
|
|
1535
1535
|
var q = localStorage.getItem(k);
|
|
1536
1536
|
if (q && (q = v.serializer.deserialize(q)), q = n(q, k.substring(M), B++), q !== void 0)
|
|
1537
1537
|
return q;
|
|
@@ -1542,23 +1542,23 @@ var at = { exports: {} };
|
|
|
1542
1542
|
}
|
|
1543
1543
|
function Ct(n, c) {
|
|
1544
1544
|
var a = this, m = a.ready().then(function() {
|
|
1545
|
-
var v = a._dbInfo,
|
|
1545
|
+
var v = a._dbInfo, o;
|
|
1546
1546
|
try {
|
|
1547
|
-
|
|
1547
|
+
o = localStorage.key(n);
|
|
1548
1548
|
} catch {
|
|
1549
|
-
|
|
1549
|
+
o = null;
|
|
1550
1550
|
}
|
|
1551
|
-
return
|
|
1551
|
+
return o && (o = o.substring(v.keyPrefix.length)), o;
|
|
1552
1552
|
});
|
|
1553
1553
|
return h(m, c), m;
|
|
1554
1554
|
}
|
|
1555
1555
|
function Pt(n) {
|
|
1556
1556
|
var c = this, a = c.ready().then(function() {
|
|
1557
|
-
for (var m = c._dbInfo, v = localStorage.length,
|
|
1557
|
+
for (var m = c._dbInfo, v = localStorage.length, o = [], M = 0; M < v; M++) {
|
|
1558
1558
|
var R = localStorage.key(M);
|
|
1559
|
-
R.indexOf(m.keyPrefix) === 0 &&
|
|
1559
|
+
R.indexOf(m.keyPrefix) === 0 && o.push(R.substring(m.keyPrefix.length));
|
|
1560
1560
|
}
|
|
1561
|
-
return
|
|
1561
|
+
return o;
|
|
1562
1562
|
});
|
|
1563
1563
|
return h(a, n), a;
|
|
1564
1564
|
}
|
|
@@ -1582,15 +1582,15 @@ var at = { exports: {} };
|
|
|
1582
1582
|
n = r(n);
|
|
1583
1583
|
var v = m.ready().then(function() {
|
|
1584
1584
|
c === void 0 && (c = null);
|
|
1585
|
-
var
|
|
1586
|
-
return new
|
|
1585
|
+
var o = c;
|
|
1586
|
+
return new d(function(M, R) {
|
|
1587
1587
|
var B = m._dbInfo;
|
|
1588
1588
|
B.serializer.serialize(c, function(F, k) {
|
|
1589
1589
|
if (k)
|
|
1590
1590
|
R(k);
|
|
1591
1591
|
else
|
|
1592
1592
|
try {
|
|
1593
|
-
localStorage.setItem(B.keyPrefix + n, F), M(
|
|
1593
|
+
localStorage.setItem(B.keyPrefix + n, F), M(o);
|
|
1594
1594
|
} catch (q) {
|
|
1595
1595
|
(q.name === "QuotaExceededError" || q.name === "NS_ERROR_DOM_QUOTA_REACHED") && R(q), R(q);
|
|
1596
1596
|
}
|
|
@@ -1605,14 +1605,14 @@ var at = { exports: {} };
|
|
|
1605
1605
|
n.name = n.name || a.name, n.storeName = n.storeName || a.storeName;
|
|
1606
1606
|
}
|
|
1607
1607
|
var m = this, v;
|
|
1608
|
-
return n.name ? v = new
|
|
1609
|
-
n.storeName ?
|
|
1610
|
-
}).then(function(
|
|
1608
|
+
return n.name ? v = new d(function(o) {
|
|
1609
|
+
n.storeName ? o($r(n, m._defaultConfig)) : o(n.name + "/");
|
|
1610
|
+
}).then(function(o) {
|
|
1611
1611
|
for (var M = localStorage.length - 1; M >= 0; M--) {
|
|
1612
1612
|
var R = localStorage.key(M);
|
|
1613
|
-
R.indexOf(
|
|
1613
|
+
R.indexOf(o) === 0 && localStorage.removeItem(R);
|
|
1614
1614
|
}
|
|
1615
|
-
}) : v =
|
|
1615
|
+
}) : v = d.reject("Invalid arguments"), h(v, c), v;
|
|
1616
1616
|
}
|
|
1617
1617
|
var Bt = {
|
|
1618
1618
|
_driver: "localStorageWrapper",
|
|
@@ -1638,11 +1638,11 @@ var at = { exports: {} };
|
|
|
1638
1638
|
return !1;
|
|
1639
1639
|
}, Fr = Array.isArray || function(n) {
|
|
1640
1640
|
return Object.prototype.toString.call(n) === "[object Array]";
|
|
1641
|
-
}, He = {}, kr = {},
|
|
1641
|
+
}, He = {}, kr = {}, Fe = {
|
|
1642
1642
|
INDEXEDDB: lr,
|
|
1643
1643
|
WEBSQL: At,
|
|
1644
1644
|
LOCALSTORAGE: Bt
|
|
1645
|
-
}, kt = [
|
|
1645
|
+
}, kt = [Fe.INDEXEDDB._driver, Fe.WEBSQL._driver, Fe.LOCALSTORAGE._driver], Ke = ["dropInstance"], fr = ["clear", "getItem", "iterate", "key", "keys", "length", "removeItem", "setItem"].concat(Ke), Gt = {
|
|
1646
1646
|
description: "",
|
|
1647
1647
|
driver: kt.slice(),
|
|
1648
1648
|
name: "localforage",
|
|
@@ -1671,10 +1671,10 @@ var at = { exports: {} };
|
|
|
1671
1671
|
}
|
|
1672
1672
|
var qt = function() {
|
|
1673
1673
|
function n(c) {
|
|
1674
|
-
|
|
1675
|
-
for (var a in
|
|
1676
|
-
if (
|
|
1677
|
-
var m =
|
|
1674
|
+
x(this, n);
|
|
1675
|
+
for (var a in Fe)
|
|
1676
|
+
if (Fe.hasOwnProperty(a)) {
|
|
1677
|
+
var m = Fe[a], v = m._driver;
|
|
1678
1678
|
this[a] = v, He[v] || this.defineDriver(m);
|
|
1679
1679
|
}
|
|
1680
1680
|
this._defaultConfig = sr({}, Gt), this._config = sr({}, this._defaultConfig, c), this._driverSet = null, this._initDriver = null, this._ready = !1, this._dbInfo = null, this._wrapLibraryMethodsWithReady(), this.setDriver(this._config.driver).catch(function() {
|
|
@@ -1693,7 +1693,7 @@ var at = { exports: {} };
|
|
|
1693
1693
|
} else
|
|
1694
1694
|
return typeof a == "string" ? this._config[a] : this._config;
|
|
1695
1695
|
}, n.prototype.defineDriver = function(a, m, v) {
|
|
1696
|
-
var
|
|
1696
|
+
var o = new d(function(M, R) {
|
|
1697
1697
|
try {
|
|
1698
1698
|
var B = a._driver, F = new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");
|
|
1699
1699
|
if (!a._driver) {
|
|
@@ -1708,33 +1708,33 @@ var at = { exports: {} };
|
|
|
1708
1708
|
}
|
|
1709
1709
|
}
|
|
1710
1710
|
var ue = function() {
|
|
1711
|
-
for (var
|
|
1711
|
+
for (var Ye = function(Yt) {
|
|
1712
1712
|
return function() {
|
|
1713
|
-
var Zt = new Error("Method " + Yt + " is not implemented by the current driver"), Gr =
|
|
1713
|
+
var Zt = new Error("Method " + Yt + " is not implemented by the current driver"), Gr = d.reject(Zt);
|
|
1714
1714
|
return h(Gr, arguments[arguments.length - 1]), Gr;
|
|
1715
1715
|
};
|
|
1716
|
-
}, or = 0,
|
|
1716
|
+
}, or = 0, Ht = Ke.length; or < Ht; or++) {
|
|
1717
1717
|
var dr = Ke[or];
|
|
1718
|
-
a[dr] || (a[dr] =
|
|
1718
|
+
a[dr] || (a[dr] = Ye(dr));
|
|
1719
1719
|
}
|
|
1720
1720
|
};
|
|
1721
1721
|
ue();
|
|
1722
|
-
var le = function(
|
|
1723
|
-
He[B] && console.info("Redefining LocalForage driver: " + B), He[B] = a, kr[B] =
|
|
1722
|
+
var le = function(Ye) {
|
|
1723
|
+
He[B] && console.info("Redefining LocalForage driver: " + B), He[B] = a, kr[B] = Ye, M();
|
|
1724
1724
|
};
|
|
1725
1725
|
"_support" in a ? a._support && typeof a._support == "function" ? a._support().then(le, R) : le(!!a._support) : le(!0);
|
|
1726
1726
|
} catch (ge) {
|
|
1727
1727
|
R(ge);
|
|
1728
1728
|
}
|
|
1729
1729
|
});
|
|
1730
|
-
return u(
|
|
1730
|
+
return u(o, m, v), o;
|
|
1731
1731
|
}, n.prototype.driver = function() {
|
|
1732
1732
|
return this._driver || null;
|
|
1733
1733
|
}, n.prototype.getDriver = function(a, m, v) {
|
|
1734
|
-
var
|
|
1735
|
-
return u(
|
|
1734
|
+
var o = He[a] ? d.resolve(He[a]) : d.reject(new Error("Driver not found."));
|
|
1735
|
+
return u(o, m, v), o;
|
|
1736
1736
|
}, n.prototype.getSerializer = function(a) {
|
|
1737
|
-
var m =
|
|
1737
|
+
var m = d.resolve(ir);
|
|
1738
1738
|
return u(m, a), m;
|
|
1739
1739
|
}, n.prototype.ready = function(a) {
|
|
1740
1740
|
var m = this, v = m._driverSet.then(function() {
|
|
@@ -1742,14 +1742,14 @@ var at = { exports: {} };
|
|
|
1742
1742
|
});
|
|
1743
1743
|
return u(v, a, a), v;
|
|
1744
1744
|
}, n.prototype.setDriver = function(a, m, v) {
|
|
1745
|
-
var
|
|
1745
|
+
var o = this;
|
|
1746
1746
|
Fr(a) || (a = [a]);
|
|
1747
1747
|
var M = this._getSupportedDrivers(a);
|
|
1748
1748
|
function R() {
|
|
1749
|
-
|
|
1749
|
+
o._config.driver = o.driver();
|
|
1750
1750
|
}
|
|
1751
1751
|
function B(q) {
|
|
1752
|
-
return
|
|
1752
|
+
return o._extend(q), R(), o._ready = o._initStorage(o._config), o._ready;
|
|
1753
1753
|
}
|
|
1754
1754
|
function F(q) {
|
|
1755
1755
|
return function() {
|
|
@@ -1757,34 +1757,34 @@ var at = { exports: {} };
|
|
|
1757
1757
|
function p() {
|
|
1758
1758
|
for (; z < q.length; ) {
|
|
1759
1759
|
var re = q[z];
|
|
1760
|
-
return z++,
|
|
1760
|
+
return z++, o._dbInfo = null, o._ready = null, o.getDriver(re).then(B).catch(p);
|
|
1761
1761
|
}
|
|
1762
1762
|
R();
|
|
1763
1763
|
var ue = new Error("No available storage method found.");
|
|
1764
|
-
return
|
|
1764
|
+
return o._driverSet = d.reject(ue), o._driverSet;
|
|
1765
1765
|
}
|
|
1766
1766
|
return p();
|
|
1767
1767
|
};
|
|
1768
1768
|
}
|
|
1769
1769
|
var k = this._driverSet !== null ? this._driverSet.catch(function() {
|
|
1770
|
-
return
|
|
1771
|
-
}) :
|
|
1770
|
+
return d.resolve();
|
|
1771
|
+
}) : d.resolve();
|
|
1772
1772
|
return this._driverSet = k.then(function() {
|
|
1773
1773
|
var q = M[0];
|
|
1774
|
-
return
|
|
1775
|
-
|
|
1774
|
+
return o._dbInfo = null, o._ready = null, o.getDriver(q).then(function(z) {
|
|
1775
|
+
o._driver = z._driver, R(), o._wrapLibraryMethodsWithReady(), o._initDriver = F(M);
|
|
1776
1776
|
});
|
|
1777
1777
|
}).catch(function() {
|
|
1778
1778
|
R();
|
|
1779
1779
|
var q = new Error("No available storage method found.");
|
|
1780
|
-
return
|
|
1780
|
+
return o._driverSet = d.reject(q), o._driverSet;
|
|
1781
1781
|
}), u(this._driverSet, m, v), this._driverSet;
|
|
1782
1782
|
}, n.prototype.supports = function(a) {
|
|
1783
1783
|
return !!kr[a];
|
|
1784
1784
|
}, n.prototype._extend = function(a) {
|
|
1785
1785
|
sr(this, a);
|
|
1786
1786
|
}, n.prototype._getSupportedDrivers = function(a) {
|
|
1787
|
-
for (var m = [], v = 0,
|
|
1787
|
+
for (var m = [], v = 0, o = a.length; v < o; v++) {
|
|
1788
1788
|
var M = a[v];
|
|
1789
1789
|
this.supports(M) && m.push(M);
|
|
1790
1790
|
}
|
|
@@ -1795,8 +1795,8 @@ var at = { exports: {} };
|
|
|
1795
1795
|
}, n.prototype.createInstance = function(a) {
|
|
1796
1796
|
return new n(a);
|
|
1797
1797
|
}, n;
|
|
1798
|
-
}(),
|
|
1799
|
-
|
|
1798
|
+
}(), Vt = new qt();
|
|
1799
|
+
A.exports = Vt;
|
|
1800
1800
|
}, { 3: 3 }] }, {}, [4])(4);
|
|
1801
1801
|
});
|
|
1802
1802
|
})(at);
|
|
@@ -1834,33 +1834,33 @@ function me() {
|
|
|
1834
1834
|
return (Oe == null || Oe.config.name != e) && (Oe = lt.createInstance({ name: e })), Oe;
|
|
1835
1835
|
}
|
|
1836
1836
|
function va() {
|
|
1837
|
-
async function e(
|
|
1837
|
+
async function e(s) {
|
|
1838
1838
|
const g = me();
|
|
1839
|
-
(await g.keys()).filter((T) => T.startsWith(
|
|
1839
|
+
(await g.keys()).filter((T) => T.startsWith(s)).forEach((T) => {
|
|
1840
1840
|
g.removeItem(T);
|
|
1841
1841
|
});
|
|
1842
1842
|
}
|
|
1843
|
-
async function t(
|
|
1844
|
-
return await me().getItem(
|
|
1843
|
+
async function t(s) {
|
|
1844
|
+
return await me().getItem(s);
|
|
1845
1845
|
}
|
|
1846
|
-
async function l(
|
|
1847
|
-
return await me().removeItem(
|
|
1846
|
+
async function l(s) {
|
|
1847
|
+
return await me().removeItem(s);
|
|
1848
1848
|
}
|
|
1849
|
-
async function
|
|
1850
|
-
await me().setItem(g,
|
|
1849
|
+
async function A(s, g) {
|
|
1850
|
+
await me().setItem(g, s);
|
|
1851
1851
|
}
|
|
1852
1852
|
return {
|
|
1853
1853
|
clearAsync: e,
|
|
1854
1854
|
getAsync: t,
|
|
1855
1855
|
removeAsync: l,
|
|
1856
|
-
saveAsync:
|
|
1856
|
+
saveAsync: A
|
|
1857
1857
|
};
|
|
1858
1858
|
}
|
|
1859
1859
|
let er;
|
|
1860
1860
|
function ga(e) {
|
|
1861
1861
|
return er(e)();
|
|
1862
1862
|
}
|
|
1863
|
-
function
|
|
1863
|
+
function Le(e) {
|
|
1864
1864
|
return er(e);
|
|
1865
1865
|
}
|
|
1866
1866
|
function bn(e) {
|
|
@@ -1879,21 +1879,21 @@ function Sn(e) {
|
|
|
1879
1879
|
if (e.storeMode == "whole-last-updated") {
|
|
1880
1880
|
if (e.api == null)
|
|
1881
1881
|
throw new Error("Must supply an api object to use store");
|
|
1882
|
-
return
|
|
1882
|
+
return Vr({ ...e, storeName: e.storeName ?? "" });
|
|
1883
1883
|
} else if (e.storeMode == "partial-last-updated") {
|
|
1884
1884
|
if (e.api == null)
|
|
1885
1885
|
throw new Error("Must supply an api object to use store");
|
|
1886
|
-
return
|
|
1886
|
+
return Vr({ ...e, storeName: e.storeName ?? "" });
|
|
1887
1887
|
} else
|
|
1888
1888
|
return En({ ...e, storeName: e.storeName ?? "" });
|
|
1889
1889
|
}
|
|
1890
1890
|
const An = (e) => {
|
|
1891
|
-
let t =
|
|
1892
|
-
if (e.additionalUrl != null && (t == null ? t = e.additionalUrl : t =
|
|
1891
|
+
let t = K(e.url) ?? void 0;
|
|
1892
|
+
if (e.additionalUrl != null && (t == null ? t = e.additionalUrl : t = Ue(t, e.additionalUrl)), e.id != null && (t != null && t.includes("{id}") ? t = t.replaceAll("{id}", e.id) : t = Ue(t, e.id)), e.params != null) {
|
|
1893
1893
|
t ?? (t = "");
|
|
1894
1894
|
let l = new URLSearchParams();
|
|
1895
|
-
Object.entries(e.params).sort(
|
|
1896
|
-
|
|
1895
|
+
Object.entries(e.params).sort(Ge.firstBy((s) => s[0])).forEach((s) => {
|
|
1896
|
+
s[1] != null && l.append(s[0], s[1].toString());
|
|
1897
1897
|
}), t = `${t}?${l.toString()}`;
|
|
1898
1898
|
}
|
|
1899
1899
|
return e.finalUrl = t, e.finalUrl ?? "";
|
|
@@ -1901,17 +1901,17 @@ const An = (e) => {
|
|
|
1901
1901
|
function En(e) {
|
|
1902
1902
|
return et(e.storeName, () => {
|
|
1903
1903
|
var u;
|
|
1904
|
-
const t = de.utc().toSeconds() / 86400, l = Y({}),
|
|
1905
|
-
function
|
|
1906
|
-
var y,
|
|
1907
|
-
return `${e.storeName ?? "base"}_${((y = e.auth) == null ? void 0 : y.credentials.value.userID) ?? "no-user-id"}_${r.id ?? ((
|
|
1904
|
+
const t = de.utc().toSeconds() / 86400, l = Y({}), A = Y({}), s = e.storageMode == "local-cache", g = e.buildUrl ?? ((u = e.api) == null ? void 0 : u.buildUrl) ?? An;
|
|
1905
|
+
function x(r) {
|
|
1906
|
+
var y, E;
|
|
1907
|
+
return `${e.storeName ?? "base"}_${((y = e.auth) == null ? void 0 : y.credentials.value.userID) ?? "no-user-id"}_${r.id ?? ((E = r.data) == null ? void 0 : E.id) ?? "no-item-id"}_${r.params ?? "no-params"}`;
|
|
1908
1908
|
}
|
|
1909
1909
|
async function C(r) {
|
|
1910
1910
|
r.additionalUrl ?? (r.additionalUrl = "/getAll"), g(r);
|
|
1911
|
-
const y =
|
|
1912
|
-
if (!
|
|
1913
|
-
return l.value[y]
|
|
1914
|
-
if (!
|
|
1911
|
+
const y = x(r), E = r.refresh;
|
|
1912
|
+
if (!E && l.value[y] !== void 0)
|
|
1913
|
+
return l.value[y];
|
|
1914
|
+
if (!E && s == !0) {
|
|
1915
1915
|
const i = await me().getItem(y);
|
|
1916
1916
|
if (i != null && (e.api == null || parseFloat(i.meta.storedOn) > t - 7))
|
|
1917
1917
|
return l.value[y] = i, i;
|
|
@@ -1919,128 +1919,149 @@ function En(e) {
|
|
|
1919
1919
|
if (e.api == null)
|
|
1920
1920
|
return l.value[y];
|
|
1921
1921
|
try {
|
|
1922
|
-
let i =
|
|
1922
|
+
let i = A.value[y];
|
|
1923
1923
|
i == null && (i = new Promise(async (I, L) => {
|
|
1924
1924
|
var w;
|
|
1925
1925
|
try {
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1926
|
+
const _ = await ((w = e.api) == null ? void 0 : w.getAll(r)), D = {
|
|
1927
|
+
meta: { storedOn: t.toString() },
|
|
1928
|
+
data: _ == null ? void 0 : _.data,
|
|
1929
|
+
count: _ == null ? void 0 : _.count,
|
|
1930
|
+
filters: (_ == null ? void 0 : _.filters) ?? []
|
|
1931
|
+
};
|
|
1932
|
+
s == !0 && await me().setItem(y, D), I(D);
|
|
1933
|
+
} catch (_) {
|
|
1934
|
+
L(_);
|
|
1933
1935
|
} finally {
|
|
1934
|
-
delete
|
|
1936
|
+
delete A.value[y];
|
|
1935
1937
|
}
|
|
1936
|
-
}),
|
|
1937
|
-
const
|
|
1938
|
-
return l.value[y] =
|
|
1938
|
+
}), A.value[y] = i);
|
|
1939
|
+
const S = await i;
|
|
1940
|
+
return l.value[y] = S, {
|
|
1941
|
+
data: S == null ? void 0 : S.data,
|
|
1942
|
+
filters: S == null ? void 0 : S.filters,
|
|
1943
|
+
count: S == null ? void 0 : S.count
|
|
1944
|
+
};
|
|
1939
1945
|
} catch (i) {
|
|
1940
|
-
let
|
|
1941
|
-
throw new Error(
|
|
1946
|
+
let S = i;
|
|
1947
|
+
throw new Error(S.message ?? "Problem");
|
|
1942
1948
|
}
|
|
1943
1949
|
}
|
|
1944
1950
|
async function T(r) {
|
|
1945
1951
|
r.additionalUrl ?? (r.additionalUrl = "/get"), g(r);
|
|
1946
|
-
const y =
|
|
1947
|
-
if (!
|
|
1948
|
-
return l.value[y]
|
|
1949
|
-
if (!
|
|
1952
|
+
const y = x(r), E = r.refresh;
|
|
1953
|
+
if (!E && l.value[y] !== void 0)
|
|
1954
|
+
return l.value[y];
|
|
1955
|
+
if (!E && s == !0) {
|
|
1950
1956
|
const i = await me().getItem(y);
|
|
1951
1957
|
if (i != null && (e.api == null || parseFloat(i.meta.storedOn) > t - 7))
|
|
1952
|
-
return l.value[y] = i, i;
|
|
1958
|
+
return l.value[y] = i, { data: i.data };
|
|
1953
1959
|
}
|
|
1954
1960
|
if (e.api == null)
|
|
1955
1961
|
return l.value[y];
|
|
1956
1962
|
try {
|
|
1957
|
-
let i =
|
|
1963
|
+
let i = A.value[y];
|
|
1958
1964
|
i == null && (i = new Promise(async (I, L) => {
|
|
1959
1965
|
var w;
|
|
1960
1966
|
try {
|
|
1961
|
-
let
|
|
1962
|
-
|
|
1963
|
-
meta: { storedOn: t },
|
|
1964
|
-
|
|
1965
|
-
}
|
|
1966
|
-
|
|
1967
|
-
|
|
1967
|
+
let _ = await ((w = e.api) == null ? void 0 : w.get(r));
|
|
1968
|
+
const D = {
|
|
1969
|
+
meta: { storedOn: t.toString() },
|
|
1970
|
+
data: _ == null ? void 0 : _.data
|
|
1971
|
+
};
|
|
1972
|
+
s == !0 && await me().setItem(y, D), I(D);
|
|
1973
|
+
} catch (_) {
|
|
1974
|
+
L(_);
|
|
1968
1975
|
} finally {
|
|
1969
|
-
delete
|
|
1976
|
+
delete A.value[y];
|
|
1970
1977
|
}
|
|
1971
|
-
}),
|
|
1972
|
-
const
|
|
1973
|
-
return l.value[y] =
|
|
1978
|
+
}), A.value[y] = i);
|
|
1979
|
+
const S = await i;
|
|
1980
|
+
return l.value[y] = S, { data: S.data };
|
|
1974
1981
|
} catch (i) {
|
|
1975
|
-
let
|
|
1976
|
-
throw new Error(
|
|
1982
|
+
let S = i;
|
|
1983
|
+
throw new Error(S.message ?? "Problem");
|
|
1977
1984
|
}
|
|
1978
1985
|
}
|
|
1979
|
-
async function
|
|
1986
|
+
async function P(r) {
|
|
1987
|
+
var i;
|
|
1980
1988
|
r.additionalUrl ?? (r.additionalUrl = "/patch"), g(r);
|
|
1981
|
-
const y =
|
|
1982
|
-
let
|
|
1989
|
+
const y = x(r);
|
|
1990
|
+
let E;
|
|
1983
1991
|
if (e.api != null)
|
|
1984
1992
|
try {
|
|
1985
|
-
let
|
|
1986
|
-
|
|
1987
|
-
} catch (
|
|
1988
|
-
let
|
|
1989
|
-
throw new Error(
|
|
1993
|
+
let S = await e.api.patch(r);
|
|
1994
|
+
E = S == null ? void 0 : S.data;
|
|
1995
|
+
} catch (S) {
|
|
1996
|
+
let I = S;
|
|
1997
|
+
throw new Error(I.message ?? "Patch Problem");
|
|
1990
1998
|
}
|
|
1991
1999
|
else
|
|
1992
|
-
|
|
1993
|
-
if (
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
if (
|
|
2001
|
-
if (Array.isArray(
|
|
2002
|
-
for (let
|
|
2003
|
-
|
|
2004
|
-
P.id == S.id && L.splice(w, 1, { ...P, ...S });
|
|
2005
|
-
}
|
|
2000
|
+
E = r.data;
|
|
2001
|
+
if (E != null) {
|
|
2002
|
+
let S = {
|
|
2003
|
+
meta: { storedOn: t.toString() },
|
|
2004
|
+
data: { ...(i = l.value[y]) == null ? void 0 : i.data, ...E }
|
|
2005
|
+
};
|
|
2006
|
+
return l.value[y] = S, s == !0 && await me().setItem(y, S), E.id != null && E.rowVersion != null && Object.entries(l.value).forEach((L) => {
|
|
2007
|
+
const w = L[1].data;
|
|
2008
|
+
if (w != null)
|
|
2009
|
+
if (Array.isArray(w))
|
|
2010
|
+
for (let _ = 0; _ < w.length; _++)
|
|
2011
|
+
w[_].id == E.id && w.splice(_, 1, S.data);
|
|
2006
2012
|
else
|
|
2007
|
-
|
|
2008
|
-
});
|
|
2013
|
+
w.id == E.id && (l.value[L[0]] = S);
|
|
2014
|
+
}), S.data;
|
|
2009
2015
|
}
|
|
2010
|
-
return
|
|
2016
|
+
return E;
|
|
2011
2017
|
}
|
|
2012
2018
|
async function $(r) {
|
|
2013
2019
|
r.additionalUrl ?? (r.additionalUrl = "/post"), g(r);
|
|
2014
|
-
const y =
|
|
2015
|
-
let
|
|
2020
|
+
const y = x(r);
|
|
2021
|
+
let E;
|
|
2016
2022
|
if (e.api != null)
|
|
2017
2023
|
try {
|
|
2018
2024
|
let i = await e.api.post(r);
|
|
2019
|
-
|
|
2025
|
+
E = i == null ? void 0 : i.data;
|
|
2020
2026
|
} catch (i) {
|
|
2021
|
-
let
|
|
2022
|
-
throw new Error(
|
|
2027
|
+
let S = i;
|
|
2028
|
+
throw new Error(S.message ?? "Patch Problem");
|
|
2023
2029
|
}
|
|
2024
2030
|
else
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2031
|
+
E = r.data;
|
|
2032
|
+
if (E != null) {
|
|
2033
|
+
let i = {
|
|
2034
|
+
meta: { storedOn: t.toString() },
|
|
2035
|
+
data: E
|
|
2036
|
+
};
|
|
2037
|
+
return s == !0 && await me().setItem(y, i), l.value[y] = i, i.data;
|
|
2038
|
+
}
|
|
2039
|
+
return E;
|
|
2030
2040
|
}
|
|
2031
|
-
async function
|
|
2041
|
+
async function d(r) {
|
|
2042
|
+
var i;
|
|
2032
2043
|
r.additionalUrl ?? (r.additionalUrl = "/delete"), g(r);
|
|
2033
|
-
const y =
|
|
2044
|
+
const y = x(r);
|
|
2034
2045
|
if (e.api != null)
|
|
2035
2046
|
try {
|
|
2036
2047
|
let S = await e.api.deleteItem(r);
|
|
2037
2048
|
if (S != null)
|
|
2038
2049
|
return S;
|
|
2039
2050
|
} catch (S) {
|
|
2040
|
-
let
|
|
2041
|
-
throw new Error(
|
|
2051
|
+
let I = S;
|
|
2052
|
+
throw new Error(I.message ?? "Patch Problem");
|
|
2042
2053
|
}
|
|
2043
|
-
delete l.value[y]
|
|
2054
|
+
delete l.value[y];
|
|
2055
|
+
const E = ((i = r.data) == null ? void 0 : i.id) ?? r.id;
|
|
2056
|
+
E != null && Object.entries(l.value).forEach((I) => {
|
|
2057
|
+
const L = I[1].data;
|
|
2058
|
+
if (L != null)
|
|
2059
|
+
if (Array.isArray(L))
|
|
2060
|
+
for (let w = 0; w < L.length; w++)
|
|
2061
|
+
L[w].id == E && L.splice(w, 1);
|
|
2062
|
+
else
|
|
2063
|
+
delete l.value[I[0]];
|
|
2064
|
+
}), s == !0 && await me().removeItem(y);
|
|
2044
2065
|
}
|
|
2045
2066
|
async function h(r) {
|
|
2046
2067
|
if (r.additionalUrl ?? (r.additionalUrl = `/patch/restore?id=${r.data.id}`), g(r), e.api != null)
|
|
@@ -2048,15 +2069,15 @@ function En(e) {
|
|
|
2048
2069
|
let y = await e.api.patch(r);
|
|
2049
2070
|
return y == null ? void 0 : y.data;
|
|
2050
2071
|
} catch (y) {
|
|
2051
|
-
let
|
|
2052
|
-
throw new Error(
|
|
2072
|
+
let E = y;
|
|
2073
|
+
throw new Error(E.message ?? "Patch Problem");
|
|
2053
2074
|
}
|
|
2054
2075
|
}
|
|
2055
2076
|
return {
|
|
2056
|
-
deleteItem:
|
|
2077
|
+
deleteItem: d,
|
|
2057
2078
|
get: T,
|
|
2058
2079
|
getAll: C,
|
|
2059
|
-
patch:
|
|
2080
|
+
patch: P,
|
|
2060
2081
|
post: $,
|
|
2061
2082
|
restore: h,
|
|
2062
2083
|
searchMemory: l
|
|
@@ -2064,14 +2085,14 @@ function En(e) {
|
|
|
2064
2085
|
};
|
|
2065
2086
|
});
|
|
2066
2087
|
}
|
|
2067
|
-
function
|
|
2088
|
+
function Vr(e) {
|
|
2068
2089
|
return et(e.storeName, () => {
|
|
2069
|
-
const t = Y(), l = Y(0),
|
|
2090
|
+
const t = Y(), l = Y(0), A = de.utc().toSeconds() / 3600, s = Y(), g = Y(), x = Y({}), C = e.storageMode == "local-cache";
|
|
2070
2091
|
function T() {
|
|
2071
2092
|
var i;
|
|
2072
2093
|
return `${e.storeName}_${((i = e.auth) == null ? void 0 : i.credentials.value.userID) ?? "no-user-id"}`;
|
|
2073
2094
|
}
|
|
2074
|
-
async function
|
|
2095
|
+
async function P() {
|
|
2075
2096
|
C == !0 && await me().setItem(T(), {
|
|
2076
2097
|
meta: g.value,
|
|
2077
2098
|
data: t.value,
|
|
@@ -2080,35 +2101,35 @@ function Hr(e) {
|
|
|
2080
2101
|
});
|
|
2081
2102
|
}
|
|
2082
2103
|
function $(i) {
|
|
2083
|
-
const
|
|
2084
|
-
return
|
|
2085
|
-
var w,
|
|
2104
|
+
const S = T();
|
|
2105
|
+
return x.value[S] || (x.value[S] = new Promise(async (I, L) => {
|
|
2106
|
+
var w, _;
|
|
2086
2107
|
try {
|
|
2087
|
-
let D = await ((
|
|
2108
|
+
let D = await ((_ = e.api) == null ? void 0 : _.getAll({
|
|
2088
2109
|
additionalUrl: "/getAll",
|
|
2089
2110
|
nav: i.nav,
|
|
2090
2111
|
params: {
|
|
2091
2112
|
lastUpdate: ((w = g.value) == null ? void 0 : w.lastUpdate) ?? un()
|
|
2092
2113
|
}
|
|
2093
2114
|
}));
|
|
2094
|
-
D == null ? L(D) : (t.value ?? (t.value = []), D.data.forEach((
|
|
2095
|
-
var
|
|
2096
|
-
const
|
|
2097
|
-
|
|
2115
|
+
D == null ? L(D) : (t.value ?? (t.value = []), D.data.forEach((N) => {
|
|
2116
|
+
var b, J;
|
|
2117
|
+
const f = t.value.findIndex((Q) => Q.id == N.id);
|
|
2118
|
+
f >= 0 ? (b = t.value) == null || b.splice(f, 1, N) : (J = t.value) == null || J.push(N);
|
|
2098
2119
|
}), l.value = t.value.length, g.value = {
|
|
2099
2120
|
lastUpdate: de.utc().toString(),
|
|
2100
|
-
storedOn:
|
|
2101
|
-
}, await
|
|
2121
|
+
storedOn: A.toString()
|
|
2122
|
+
}, await P(), I(D));
|
|
2102
2123
|
} catch (D) {
|
|
2103
2124
|
L(D);
|
|
2104
2125
|
} finally {
|
|
2105
|
-
delete
|
|
2126
|
+
delete x.value[S];
|
|
2106
2127
|
}
|
|
2107
|
-
})),
|
|
2128
|
+
})), x.value[S];
|
|
2108
2129
|
}
|
|
2109
|
-
async function
|
|
2110
|
-
var L, w,
|
|
2111
|
-
const
|
|
2130
|
+
async function d(i) {
|
|
2131
|
+
var L, w, _;
|
|
2132
|
+
const S = T(), I = i.refresh;
|
|
2112
2133
|
if (!I && t.value != null)
|
|
2113
2134
|
return {
|
|
2114
2135
|
count: (L = t.value) == null ? void 0 : L.length,
|
|
@@ -2116,95 +2137,95 @@ function Hr(e) {
|
|
|
2116
2137
|
filters: []
|
|
2117
2138
|
};
|
|
2118
2139
|
if (!I && C == !0) {
|
|
2119
|
-
const D = await me().getItem(
|
|
2120
|
-
if (D != null && parseFloat(D.meta.storedOn) >
|
|
2121
|
-
return t.value = D.data, l.value = D.data.length,
|
|
2140
|
+
const D = await me().getItem(S);
|
|
2141
|
+
if (D != null && parseFloat(D.meta.storedOn) > A - 7)
|
|
2142
|
+
return t.value = D.data, l.value = D.data.length, s.value = D.filters ?? [], g.value = D.meta, {
|
|
2122
2143
|
count: (w = t.value) == null ? void 0 : w.length,
|
|
2123
|
-
data: t.value,
|
|
2144
|
+
data: t.value ?? [],
|
|
2124
2145
|
filters: []
|
|
2125
2146
|
};
|
|
2126
2147
|
}
|
|
2127
2148
|
if (e.api == null)
|
|
2128
2149
|
return {
|
|
2129
|
-
count: (
|
|
2150
|
+
count: (_ = t.value) == null ? void 0 : _.length,
|
|
2130
2151
|
data: t.value ?? [],
|
|
2131
|
-
filters:
|
|
2152
|
+
filters: s.value
|
|
2132
2153
|
};
|
|
2133
2154
|
t.value ?? (t.value = []);
|
|
2134
2155
|
try {
|
|
2135
2156
|
return await $(i);
|
|
2136
2157
|
} catch (D) {
|
|
2137
|
-
let
|
|
2138
|
-
throw new Error(
|
|
2158
|
+
let N = D;
|
|
2159
|
+
throw new Error(N.message ?? "Problem");
|
|
2139
2160
|
}
|
|
2140
2161
|
}
|
|
2141
2162
|
async function h(i) {
|
|
2142
|
-
var w,
|
|
2143
|
-
const
|
|
2163
|
+
var w, _, D, N;
|
|
2164
|
+
const S = T(), I = i.id ?? ((w = i.data) == null ? void 0 : w.id);
|
|
2144
2165
|
if (I == null)
|
|
2145
2166
|
throw new Error("no id provided");
|
|
2146
2167
|
let L = i.refresh;
|
|
2147
2168
|
if (!L && t.value != null) {
|
|
2148
|
-
const
|
|
2149
|
-
if (
|
|
2150
|
-
return { data:
|
|
2169
|
+
const f = t.value.find((b) => b.id == I);
|
|
2170
|
+
if (f != null)
|
|
2171
|
+
return { data: f };
|
|
2151
2172
|
}
|
|
2152
2173
|
if (!L && C == !0) {
|
|
2153
|
-
const
|
|
2154
|
-
if (
|
|
2155
|
-
t.value =
|
|
2156
|
-
let
|
|
2157
|
-
if (
|
|
2158
|
-
return { data:
|
|
2174
|
+
const f = await me().getItem(S);
|
|
2175
|
+
if (f != null && parseFloat(f.meta.storedOn) > A - 12) {
|
|
2176
|
+
t.value = f.data, l.value = f.data.length, s.value = f.filters ?? [], g.value = f.meta;
|
|
2177
|
+
let b = (_ = t.value) == null ? void 0 : _.find((J) => J.id == i.id);
|
|
2178
|
+
if (b != null)
|
|
2179
|
+
return { data: b };
|
|
2159
2180
|
}
|
|
2160
2181
|
}
|
|
2161
2182
|
if (e.api == null)
|
|
2162
2183
|
return {
|
|
2163
|
-
data: (
|
|
2184
|
+
data: (D = t.value) == null ? void 0 : D.find((f) => f.id == i.id)
|
|
2164
2185
|
};
|
|
2165
2186
|
t.value ?? (t.value = []);
|
|
2166
2187
|
try {
|
|
2167
|
-
return await $(i), { data: (
|
|
2168
|
-
} catch (
|
|
2169
|
-
let
|
|
2170
|
-
throw new Error(
|
|
2188
|
+
return await $(i), { data: (N = t.value) == null ? void 0 : N.find((f) => f.id == i.id) };
|
|
2189
|
+
} catch (f) {
|
|
2190
|
+
let b = f;
|
|
2191
|
+
throw new Error(b.message ?? "Problem");
|
|
2171
2192
|
}
|
|
2172
2193
|
}
|
|
2173
2194
|
async function u(i) {
|
|
2174
2195
|
var I, L, w;
|
|
2175
2196
|
i.additionalUrl ?? (i.additionalUrl = "/patch");
|
|
2176
|
-
let
|
|
2197
|
+
let S;
|
|
2177
2198
|
if (e.api != null)
|
|
2178
2199
|
try {
|
|
2179
|
-
let
|
|
2180
|
-
|
|
2181
|
-
} catch (
|
|
2182
|
-
let D =
|
|
2200
|
+
let _ = await e.api.patch(i);
|
|
2201
|
+
S = { ...i.data, ..._ == null ? void 0 : _.data };
|
|
2202
|
+
} catch (_) {
|
|
2203
|
+
let D = _;
|
|
2183
2204
|
throw new Error(D.message ?? "Patch Problem");
|
|
2184
2205
|
}
|
|
2185
2206
|
else
|
|
2186
|
-
|
|
2187
|
-
if (
|
|
2188
|
-
let
|
|
2189
|
-
|
|
2207
|
+
S = i.data;
|
|
2208
|
+
if (S != null) {
|
|
2209
|
+
let _ = (I = t.value) == null ? void 0 : I.findIndex((D) => D.id == S.id);
|
|
2210
|
+
_ != null && _ >= 0 && (t.value ?? (t.value = []), (L = t.value) == null || L.splice(_, 1, S), await P());
|
|
2190
2211
|
}
|
|
2191
|
-
return (w = t.value) == null ? void 0 : w.find((
|
|
2212
|
+
return (w = t.value) == null ? void 0 : w.find((_) => _.id == (i.id ?? i.data.id));
|
|
2192
2213
|
}
|
|
2193
2214
|
async function r(i) {
|
|
2194
2215
|
var I, L;
|
|
2195
2216
|
i.additionalUrl ?? (i.additionalUrl = "/post");
|
|
2196
|
-
let
|
|
2217
|
+
let S;
|
|
2197
2218
|
if (e.api != null)
|
|
2198
2219
|
try {
|
|
2199
2220
|
let w = await e.api.post(i);
|
|
2200
|
-
|
|
2221
|
+
S = w == null ? void 0 : w.data;
|
|
2201
2222
|
} catch (w) {
|
|
2202
|
-
let
|
|
2203
|
-
throw new Error(
|
|
2223
|
+
let _ = w;
|
|
2224
|
+
throw new Error(_.message ?? "Patch Problem");
|
|
2204
2225
|
}
|
|
2205
2226
|
else
|
|
2206
|
-
|
|
2207
|
-
return
|
|
2227
|
+
S = i.data;
|
|
2228
|
+
return S != null && (t.value ?? (t.value = []), (I = t.value) == null || I.unshift(S), l.value += 1, await P()), (L = t.value) == null ? void 0 : L.find((w) => w.id == (i.id ?? i.data.id));
|
|
2208
2229
|
}
|
|
2209
2230
|
async function y(i) {
|
|
2210
2231
|
var I, L;
|
|
@@ -2214,17 +2235,17 @@ function Hr(e) {
|
|
|
2214
2235
|
if (w != null)
|
|
2215
2236
|
return w;
|
|
2216
2237
|
} catch (w) {
|
|
2217
|
-
let
|
|
2218
|
-
throw new Error(
|
|
2238
|
+
let _ = w;
|
|
2239
|
+
throw new Error(_.message ?? "Patch Problem");
|
|
2219
2240
|
}
|
|
2220
|
-
const
|
|
2221
|
-
if (
|
|
2222
|
-
let w = (I = t.value) == null ? void 0 : I.findIndex((
|
|
2223
|
-
w != null && w >= 0 && (t.value ?? (t.value = []), (L = t.value) == null || L.splice(w, 1), await
|
|
2241
|
+
const S = i.id ?? i.data.id;
|
|
2242
|
+
if (S != null) {
|
|
2243
|
+
let w = (I = t.value) == null ? void 0 : I.findIndex((_) => _.id == S);
|
|
2244
|
+
w != null && w >= 0 && (t.value ?? (t.value = []), (L = t.value) == null || L.splice(w, 1), await P());
|
|
2224
2245
|
}
|
|
2225
2246
|
}
|
|
2226
|
-
async function
|
|
2227
|
-
var
|
|
2247
|
+
async function E(i) {
|
|
2248
|
+
var S;
|
|
2228
2249
|
if (i.additionalUrl ?? (i.additionalUrl = `/patch/restore?id=${i.data.id}`), e.api != null)
|
|
2229
2250
|
try {
|
|
2230
2251
|
await e.api.patch(i);
|
|
@@ -2238,15 +2259,15 @@ function Hr(e) {
|
|
|
2238
2259
|
let L = I;
|
|
2239
2260
|
throw new Error(L.message ?? "Problem");
|
|
2240
2261
|
}
|
|
2241
|
-
return (
|
|
2262
|
+
return (S = t.value) == null ? void 0 : S.find((I) => I.id == (i.id ?? i.data.id));
|
|
2242
2263
|
}
|
|
2243
2264
|
return {
|
|
2244
2265
|
deleteItem: y,
|
|
2245
2266
|
get: h,
|
|
2246
|
-
getAll:
|
|
2267
|
+
getAll: d,
|
|
2247
2268
|
patch: u,
|
|
2248
2269
|
post: r,
|
|
2249
|
-
restore:
|
|
2270
|
+
restore: E
|
|
2250
2271
|
};
|
|
2251
2272
|
});
|
|
2252
2273
|
}
|
|
@@ -2255,7 +2276,7 @@ function Er() {
|
|
|
2255
2276
|
return Ar;
|
|
2256
2277
|
}
|
|
2257
2278
|
function In(e) {
|
|
2258
|
-
const t = (e == null ? void 0 : e.buildHeaders) ?? C, l = (e == null ? void 0 : e.buildQuery) ?? g,
|
|
2279
|
+
const t = (e == null ? void 0 : e.buildHeaders) ?? C, l = (e == null ? void 0 : e.buildQuery) ?? g, A = (e == null ? void 0 : e.buildUrl) ?? x, s = e == null ? void 0 : e.demo;
|
|
2259
2280
|
function g(u) {
|
|
2260
2281
|
let r = new URLSearchParams();
|
|
2261
2282
|
return Object.entries(u).forEach((y) => {
|
|
@@ -2264,20 +2285,20 @@ function In(e) {
|
|
|
2264
2285
|
y[1] != null && r.append(y[0], y[1].toString());
|
|
2265
2286
|
}), r.toString();
|
|
2266
2287
|
}
|
|
2267
|
-
function
|
|
2268
|
-
let r =
|
|
2269
|
-
return r == null && (e == null ? void 0 : e.findPath) != null && (r = e.findPath(u.nav)), u.additionalUrl != null && (r == null ? r = u.additionalUrl : r =
|
|
2288
|
+
function x(u) {
|
|
2289
|
+
let r = K(u.url) ?? void 0, y = K(u.id);
|
|
2290
|
+
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 ?? "";
|
|
2270
2291
|
}
|
|
2271
2292
|
function C(u) {
|
|
2272
|
-
var y,
|
|
2293
|
+
var y, E;
|
|
2273
2294
|
let r = { ...u.headers };
|
|
2274
|
-
return u.proxyID && (r.ManagedCompanyAccountID ?? (r.ManagedCompanyAccountID = u.proxyID)), (e == null ? void 0 : e.useBearerToken) != !1 && ((y = e == null ? void 0 : e.auth) == null ? void 0 : y.isLoggedIn.value) == !0 && (r.authorization ?? (r.authorization = `bearer ${(
|
|
2295
|
+
return u.proxyID && (r.ManagedCompanyAccountID ?? (r.ManagedCompanyAccountID = u.proxyID)), (e == null ? void 0 : e.useBearerToken) != !1 && ((y = e == null ? void 0 : e.auth) == null ? void 0 : y.isLoggedIn.value) == !0 && (r.authorization ?? (r.authorization = `bearer ${(E = e == null ? void 0 : e.auth) == null ? void 0 : E.credentials.value.token}`)), r["Content-Type"] ?? (r["Content-Type"] = u.contentType ?? (e == null ? void 0 : e.defaultContentType) ?? "application/json"), r;
|
|
2275
2296
|
}
|
|
2276
2297
|
async function T(u) {
|
|
2277
|
-
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0,
|
|
2278
|
-
let i = u.finalUrl,
|
|
2279
|
-
if (i == null && (i =
|
|
2280
|
-
return console.log(`DEMO: Get from ${i}`),
|
|
2298
|
+
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, E = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2299
|
+
let i = u.finalUrl, S = u.headers;
|
|
2300
|
+
if (i == null && (i = A(u)), u.overrideHeaders !== !0 && (S = t(u)), s != null && s.isDemoing.value)
|
|
2301
|
+
return console.log(`DEMO: Get from ${i}`), s.get(u);
|
|
2281
2302
|
console.log(`Get from ${i}`);
|
|
2282
2303
|
let I;
|
|
2283
2304
|
try {
|
|
@@ -2285,12 +2306,12 @@ function In(e) {
|
|
|
2285
2306
|
method: "GET",
|
|
2286
2307
|
mode: "cors",
|
|
2287
2308
|
cache: "no-cache",
|
|
2288
|
-
headers:
|
|
2309
|
+
headers: S
|
|
2289
2310
|
}), !I.ok) {
|
|
2290
2311
|
let L = await I.text();
|
|
2291
2312
|
throw new Error(L ?? I.statusText ?? "Get error");
|
|
2292
2313
|
}
|
|
2293
|
-
if (
|
|
2314
|
+
if (E)
|
|
2294
2315
|
return await I.text();
|
|
2295
2316
|
if (y)
|
|
2296
2317
|
return await I.json();
|
|
@@ -2302,11 +2323,11 @@ function In(e) {
|
|
|
2302
2323
|
throw new Error(w);
|
|
2303
2324
|
}
|
|
2304
2325
|
}
|
|
2305
|
-
async function
|
|
2306
|
-
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0,
|
|
2307
|
-
let i = u.finalUrl,
|
|
2308
|
-
if (i == null && (i =
|
|
2309
|
-
return console.log(`DEMO: Get all from ${i}`),
|
|
2326
|
+
async function P(u) {
|
|
2327
|
+
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, E = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2328
|
+
let i = u.finalUrl, S = u.headers;
|
|
2329
|
+
if (i == null && (i = A(u)), u.overrideHeaders !== !0 && (S = t(u)), s != null && s.isDemoing.value)
|
|
2330
|
+
return console.log(`DEMO: Get all from ${i}`), s.getAll(u);
|
|
2310
2331
|
console.log(`Get all from ${i}`);
|
|
2311
2332
|
let I;
|
|
2312
2333
|
try {
|
|
@@ -2314,12 +2335,12 @@ function In(e) {
|
|
|
2314
2335
|
method: "GET",
|
|
2315
2336
|
mode: "cors",
|
|
2316
2337
|
cache: "no-cache",
|
|
2317
|
-
headers:
|
|
2338
|
+
headers: S
|
|
2318
2339
|
}), !I.ok) {
|
|
2319
2340
|
let L = await I.text();
|
|
2320
2341
|
throw new Error(L ?? I.statusText ?? "Get all error");
|
|
2321
2342
|
}
|
|
2322
|
-
if (
|
|
2343
|
+
if (E)
|
|
2323
2344
|
return await I.text();
|
|
2324
2345
|
if (y)
|
|
2325
2346
|
return await I.json();
|
|
@@ -2332,10 +2353,10 @@ function In(e) {
|
|
|
2332
2353
|
}
|
|
2333
2354
|
}
|
|
2334
2355
|
async function $(u) {
|
|
2335
|
-
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0,
|
|
2336
|
-
let i = u.finalUrl,
|
|
2337
|
-
if (i == null && (i =
|
|
2338
|
-
return console.log(`DEMO: Post to ${i}`),
|
|
2356
|
+
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, E = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2357
|
+
let i = u.finalUrl, S = u.headers;
|
|
2358
|
+
if (i == null && (i = A(u)), u.overrideHeaders !== !0 && (S = t(u)), s != null && s.isDemoing.value)
|
|
2359
|
+
return console.log(`DEMO: Post to ${i}`), s.post(u);
|
|
2339
2360
|
console.log(`Post to ${i}`);
|
|
2340
2361
|
let I;
|
|
2341
2362
|
try {
|
|
@@ -2343,13 +2364,13 @@ function In(e) {
|
|
|
2343
2364
|
method: "POST",
|
|
2344
2365
|
mode: "cors",
|
|
2345
2366
|
cache: "no-cache",
|
|
2346
|
-
headers:
|
|
2367
|
+
headers: S,
|
|
2347
2368
|
body: JSON.stringify(u.data)
|
|
2348
2369
|
}), !I.ok) {
|
|
2349
2370
|
let L = await I.text();
|
|
2350
2371
|
throw new Error(L ?? I.statusText ?? "Post error!");
|
|
2351
2372
|
}
|
|
2352
|
-
if (
|
|
2373
|
+
if (E)
|
|
2353
2374
|
return await I.text();
|
|
2354
2375
|
if (y)
|
|
2355
2376
|
return await I.json();
|
|
@@ -2361,11 +2382,11 @@ function In(e) {
|
|
|
2361
2382
|
throw new Error(w);
|
|
2362
2383
|
}
|
|
2363
2384
|
}
|
|
2364
|
-
async function
|
|
2365
|
-
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0,
|
|
2366
|
-
let i = u.finalUrl,
|
|
2367
|
-
if (i == null && (i =
|
|
2368
|
-
return console.log(`DEMO: Patch to ${i}`),
|
|
2385
|
+
async function d(u) {
|
|
2386
|
+
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, E = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2387
|
+
let i = u.finalUrl, S = u.headers;
|
|
2388
|
+
if (i == null && (i = A(u)), u.overrideHeaders !== !0 && (S = t(u)), s != null && s.isDemoing.value)
|
|
2389
|
+
return console.log(`DEMO: Patch to ${i}`), s.patch(u);
|
|
2369
2390
|
console.log(`Patch to ${i}`);
|
|
2370
2391
|
let I;
|
|
2371
2392
|
try {
|
|
@@ -2373,13 +2394,13 @@ function In(e) {
|
|
|
2373
2394
|
method: "PATCH",
|
|
2374
2395
|
mode: "cors",
|
|
2375
2396
|
cache: "no-cache",
|
|
2376
|
-
headers:
|
|
2397
|
+
headers: S,
|
|
2377
2398
|
body: JSON.stringify(u.data)
|
|
2378
2399
|
}), !I.ok) {
|
|
2379
2400
|
let L = await I.text();
|
|
2380
2401
|
throw new Error(L ?? I.statusText ?? "Patch error!");
|
|
2381
2402
|
}
|
|
2382
|
-
if (
|
|
2403
|
+
if (E)
|
|
2383
2404
|
return await I.text();
|
|
2384
2405
|
if (y)
|
|
2385
2406
|
return await I.json();
|
|
@@ -2393,9 +2414,9 @@ function In(e) {
|
|
|
2393
2414
|
}
|
|
2394
2415
|
async function h(u) {
|
|
2395
2416
|
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0;
|
|
2396
|
-
let y = u.finalUrl,
|
|
2397
|
-
if (y == null && (y =
|
|
2398
|
-
return console.log(`DEMO: Delete ${y}`),
|
|
2417
|
+
let y = u.finalUrl, E = u.headers;
|
|
2418
|
+
if (y == null && (y = A(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
|
|
2419
|
+
return console.log(`DEMO: Delete ${y}`), s.deleteItem(u);
|
|
2399
2420
|
console.log(`Delete ${y}`);
|
|
2400
2421
|
let i;
|
|
2401
2422
|
try {
|
|
@@ -2403,34 +2424,34 @@ function In(e) {
|
|
|
2403
2424
|
method: "DELETE",
|
|
2404
2425
|
mode: "cors",
|
|
2405
2426
|
cache: "no-cache",
|
|
2406
|
-
headers:
|
|
2427
|
+
headers: E,
|
|
2407
2428
|
body: JSON.stringify(u.data)
|
|
2408
2429
|
}), i.status == 200 ? void 0 : i.statusText;
|
|
2409
|
-
} catch (
|
|
2410
|
-
const I = `${(i == null ? void 0 : i.status) ?? ""} ${(i == null ? void 0 : i.statusText) ?? ""} ${
|
|
2430
|
+
} catch (S) {
|
|
2431
|
+
const I = `${(i == null ? void 0 : i.status) ?? ""} ${(i == null ? void 0 : i.statusText) ?? ""} ${S.message}`;
|
|
2411
2432
|
if (!r)
|
|
2412
2433
|
return I;
|
|
2413
|
-
throw new Error(`${i.status} ${i.statusText} ${
|
|
2434
|
+
throw new Error(`${i.status} ${i.statusText} ${S.message}`);
|
|
2414
2435
|
}
|
|
2415
2436
|
}
|
|
2416
2437
|
return Ar = {
|
|
2417
2438
|
buildHeaders: t,
|
|
2418
2439
|
buildQuery: l,
|
|
2419
|
-
buildUrl:
|
|
2440
|
+
buildUrl: A,
|
|
2420
2441
|
deleteItem: h,
|
|
2421
2442
|
get: T,
|
|
2422
|
-
getAll:
|
|
2423
|
-
patch:
|
|
2443
|
+
getAll: P,
|
|
2444
|
+
patch: d,
|
|
2424
2445
|
post: $
|
|
2425
2446
|
}, Ar;
|
|
2426
2447
|
}
|
|
2427
2448
|
function ct(e) {
|
|
2428
|
-
const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors:
|
|
2449
|
+
const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors: A, isLoading: s, doAction: g, logError: x } = rn(e);
|
|
2429
2450
|
function C(r) {
|
|
2430
2451
|
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), r.store ?? (r.store = e == null ? void 0 : e.store);
|
|
2431
2452
|
let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2432
|
-
const
|
|
2433
|
-
return y == null && r.nav != null && (y =
|
|
2453
|
+
const E = (e == null ? void 0 : e.items) ?? [];
|
|
2454
|
+
return y == null && r.nav != null && (y = Le({
|
|
2434
2455
|
storeMode: r.storeMode ?? (e == null ? void 0 : e.storeMode) ?? "session",
|
|
2435
2456
|
storageMode: r.storageMode ?? (e == null ? void 0 : e.storageMode) ?? "local-cache",
|
|
2436
2457
|
nav: r.nav ?? (e == null ? void 0 : e.nav)
|
|
@@ -2439,11 +2460,11 @@ function ct(e) {
|
|
|
2439
2460
|
const i = r.id ?? ((I = r.data) == null ? void 0 : I.id);
|
|
2440
2461
|
if (i == null)
|
|
2441
2462
|
return Promise.resolve("No id found in delete action");
|
|
2442
|
-
const
|
|
2443
|
-
return
|
|
2463
|
+
const S = E.findIndex((L) => L.id == i);
|
|
2464
|
+
return S >= 0 && E.splice(S, 1), Promise.resolve(void 0);
|
|
2444
2465
|
}), g(async () => {
|
|
2445
2466
|
let i;
|
|
2446
|
-
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),
|
|
2467
|
+
r.onCanDeleteAsync != null && (i = await r.onCanDeleteAsync(r.data)), i == null && r.onDeleteAsync != null && (i = await r.onDeleteAsync(r.data)), i == null && r.onDeleteSuccessAsync != null && await r.onDeleteSuccessAsync(r.data), x(i);
|
|
2447
2468
|
}, {
|
|
2448
2469
|
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
2449
2470
|
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
@@ -2456,15 +2477,15 @@ function ct(e) {
|
|
|
2456
2477
|
function T(r) {
|
|
2457
2478
|
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);
|
|
2458
2479
|
let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2459
|
-
const
|
|
2460
|
-
return y == null && r.nav != null && (y =
|
|
2480
|
+
const E = (e == null ? void 0 : e.items) ?? [];
|
|
2481
|
+
return y == null && r.nav != null && (y = Le({
|
|
2461
2482
|
storeMode: r.storeMode ?? (e == null ? void 0 : e.storeMode) ?? "session",
|
|
2462
2483
|
storageMode: r.storageMode ?? (e == null ? void 0 : e.storageMode) ?? "local-cache",
|
|
2463
2484
|
nav: r.nav ?? (e == null ? void 0 : e.nav)
|
|
2464
2485
|
})), y != null ? r.onGetAsync ?? (r.onGetAsync = async () => (await y().get(r)).data) : r.onGetAsync ?? (r.onGetAsync = () => {
|
|
2465
|
-
var
|
|
2466
|
-
const i = r.id ?? ((
|
|
2467
|
-
return i == null ? Promise.resolve(void 0) : Promise.resolve(
|
|
2486
|
+
var S;
|
|
2487
|
+
const i = r.id ?? ((S = r.data) == null ? void 0 : S.id);
|
|
2488
|
+
return i == null ? Promise.resolve(void 0) : Promise.resolve(E.find((I) => I.id == i));
|
|
2468
2489
|
}), g(async () => {
|
|
2469
2490
|
let i;
|
|
2470
2491
|
return r.onGetAsync != null && (i = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (i = await r.onGetSuccessAsync(i, r)), i;
|
|
@@ -2477,15 +2498,15 @@ function ct(e) {
|
|
|
2477
2498
|
throwError: r.throwError ?? (e == null ? void 0 : e.throwError)
|
|
2478
2499
|
});
|
|
2479
2500
|
}
|
|
2480
|
-
function
|
|
2501
|
+
function P(r) {
|
|
2481
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 these items?" : void 0);
|
|
2482
2503
|
let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2483
|
-
const
|
|
2484
|
-
return y == null && r.nav != null && (y =
|
|
2504
|
+
const E = (e == null ? void 0 : e.items) ?? [];
|
|
2505
|
+
return y == null && r.nav != null && (y = Le({
|
|
2485
2506
|
storeMode: r.storeMode ?? (e == null ? void 0 : e.storeMode) ?? "session",
|
|
2486
2507
|
storageMode: r.storageMode ?? (e == null ? void 0 : e.storageMode) ?? "local-cache",
|
|
2487
2508
|
nav: r.nav ?? (e == null ? void 0 : e.nav)
|
|
2488
|
-
})), y != null ? r.onGetAsync ?? (r.onGetAsync = () => y().getAll(r)) : r.onGetAsync ?? (r.onGetAsync = () => Promise.resolve(
|
|
2509
|
+
})), y != null ? r.onGetAsync ?? (r.onGetAsync = () => y().getAll(r)) : r.onGetAsync ?? (r.onGetAsync = () => Promise.resolve(E)), g(async () => {
|
|
2489
2510
|
let i;
|
|
2490
2511
|
return r.onGetAsync != null && (i = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (i = await r.onGetSuccessAsync(i, r)), i;
|
|
2491
2512
|
}, {
|
|
@@ -2500,13 +2521,13 @@ function ct(e) {
|
|
|
2500
2521
|
function $(r) {
|
|
2501
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 restore this item?" : void 0);
|
|
2502
2523
|
let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2503
|
-
return y == null && r.nav != null && (y =
|
|
2524
|
+
return y == null && r.nav != null && (y = Le({
|
|
2504
2525
|
storeMode: r.storeMode ?? (e == null ? void 0 : e.storeMode) ?? "session",
|
|
2505
2526
|
storageMode: r.storageMode ?? (e == null ? void 0 : e.storageMode) ?? "local-cache",
|
|
2506
2527
|
nav: r.nav ?? (e == null ? void 0 : e.nav)
|
|
2507
2528
|
})), y != null && (r.onRestoreAsync ?? (r.onRestoreAsync = () => y().restore(r))), g(async () => {
|
|
2508
|
-
let
|
|
2509
|
-
return r.onCanRestoreAsync != null && (
|
|
2529
|
+
let E, i;
|
|
2530
|
+
return r.onCanRestoreAsync != null && (E = await r.onCanRestoreAsync(r.data)), E == null && r.onRestoreAsync != null && (i = await r.onRestoreAsync(r.data)), i != null && r.onRestoreSuccessAsync != null && await r.onRestoreSuccessAsync(i), x(E), i;
|
|
2510
2531
|
}, {
|
|
2511
2532
|
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
2512
2533
|
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
@@ -2516,11 +2537,11 @@ function ct(e) {
|
|
|
2516
2537
|
throwError: r.throwError ?? (e == null ? void 0 : e.throwError)
|
|
2517
2538
|
});
|
|
2518
2539
|
}
|
|
2519
|
-
function
|
|
2540
|
+
function d(r) {
|
|
2520
2541
|
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);
|
|
2521
2542
|
let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2522
|
-
const
|
|
2523
|
-
return r.onGetSaveAsync ?? (r.onGetSaveAsync = (i) => i), r.onCanSaveAsync ?? (r.onCanSaveAsync = () => Promise.resolve(void 0)), y == null && r.nav != null && (y =
|
|
2543
|
+
const E = (e == null ? void 0 : e.items) ?? [];
|
|
2544
|
+
return r.onGetSaveAsync ?? (r.onGetSaveAsync = (i) => i), r.onCanSaveAsync ?? (r.onCanSaveAsync = () => Promise.resolve(void 0)), y == null && r.nav != null && (y = Le({
|
|
2524
2545
|
storeMode: r.storeMode ?? (e == null ? void 0 : e.storeMode) ?? "session",
|
|
2525
2546
|
storageMode: r.storageMode ?? (e == null ? void 0 : e.storageMode) ?? "local-cache",
|
|
2526
2547
|
nav: r.nav ?? (e == null ? void 0 : e.nav)
|
|
@@ -2528,19 +2549,19 @@ function ct(e) {
|
|
|
2528
2549
|
var i;
|
|
2529
2550
|
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);
|
|
2530
2551
|
}) : r.onSaveAsync ?? (r.onSaveAsync = (i) => {
|
|
2531
|
-
const
|
|
2532
|
-
return
|
|
2552
|
+
const S = E.findIndex((I) => I.id == i.id);
|
|
2553
|
+
return S >= 0 ? E.splice(S, 1, i) : E.push(i), Promise.resolve(i);
|
|
2533
2554
|
}), g(async () => {
|
|
2534
2555
|
let i;
|
|
2535
2556
|
if (r.onGetSaveAsync != null && (i = await r.onGetSaveAsync(r.data)), i == null)
|
|
2536
2557
|
return;
|
|
2537
2558
|
if (r.onCanSaveAsync != null) {
|
|
2538
2559
|
let I = await r.onCanSaveAsync(i);
|
|
2539
|
-
if (
|
|
2560
|
+
if (x(I), I != null)
|
|
2540
2561
|
return;
|
|
2541
2562
|
}
|
|
2542
|
-
let
|
|
2543
|
-
return r.onSaveAsync != null && (
|
|
2563
|
+
let S;
|
|
2564
|
+
return r.onSaveAsync != null && (S = await r.onSaveAsync(i), S = S.data != null ? S.data : S), r.onSaveSuccessAsync != null && (S = await r.onSaveSuccessAsync(S)), S;
|
|
2544
2565
|
}, {
|
|
2545
2566
|
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
2546
2567
|
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
@@ -2561,56 +2582,56 @@ function ct(e) {
|
|
|
2561
2582
|
actionErrorMsg: t,
|
|
2562
2583
|
apiGet: h,
|
|
2563
2584
|
apiPost: u,
|
|
2564
|
-
clearErrors:
|
|
2585
|
+
clearErrors: A,
|
|
2565
2586
|
deleteItem: C,
|
|
2566
2587
|
doAction: g,
|
|
2567
|
-
getAllItems:
|
|
2588
|
+
getAllItems: P,
|
|
2568
2589
|
getItem: T,
|
|
2569
|
-
isLoading:
|
|
2570
|
-
logError:
|
|
2590
|
+
isLoading: s,
|
|
2591
|
+
logError: x,
|
|
2571
2592
|
restoreItem: $,
|
|
2572
|
-
saveItem:
|
|
2593
|
+
saveItem: d
|
|
2573
2594
|
};
|
|
2574
2595
|
}
|
|
2575
2596
|
let hr = "Australia/Melbourne", Ir;
|
|
2576
|
-
const
|
|
2597
|
+
const Hr = "auth-credentials-state";
|
|
2577
2598
|
function Dn() {
|
|
2578
2599
|
return Ir;
|
|
2579
2600
|
}
|
|
2580
2601
|
function xn(e) {
|
|
2581
2602
|
const t = e.expiryTokenFormat ?? "d/MM/yyyy h:mm:ss a";
|
|
2582
|
-
let l = Y(localStorage.getItem(
|
|
2583
|
-
l.value.length == 0 &&
|
|
2584
|
-
function
|
|
2585
|
-
l.value = Math.random().toString(36).substring(4, 19) + Math.random().toString(12).substring(1, 11), localStorage.setItem(
|
|
2603
|
+
let l = Y(localStorage.getItem(Hr) ?? "");
|
|
2604
|
+
l.value.length == 0 && A();
|
|
2605
|
+
function A() {
|
|
2606
|
+
l.value = Math.random().toString(36).substring(4, 19) + Math.random().toString(12).substring(1, 11), localStorage.setItem(Hr, l.value);
|
|
2586
2607
|
}
|
|
2587
|
-
const
|
|
2608
|
+
const s = Jt("auth-credentials", {});
|
|
2588
2609
|
function g(D) {
|
|
2589
2610
|
if (D == null)
|
|
2590
2611
|
return !0;
|
|
2591
|
-
var
|
|
2592
|
-
if (
|
|
2612
|
+
var N = e.getAuthItem != null ? e.getAuthItem(D) : null;
|
|
2613
|
+
if (N == null)
|
|
2593
2614
|
return !1;
|
|
2594
|
-
if (
|
|
2615
|
+
if (N.requiresAuth === !1)
|
|
2595
2616
|
return !0;
|
|
2596
|
-
const
|
|
2597
|
-
if (
|
|
2617
|
+
const f = K(s);
|
|
2618
|
+
if (f.isSuspended && N.ignoreSuspension !== !0)
|
|
2598
2619
|
return !1;
|
|
2599
|
-
if (
|
|
2620
|
+
if (f.isGlobalAdmin)
|
|
2600
2621
|
return !0;
|
|
2601
|
-
if (
|
|
2602
|
-
for (var
|
|
2603
|
-
if (!
|
|
2622
|
+
if (N.permissions != null) {
|
|
2623
|
+
for (var b = 0; b < N.permissions.length; b++)
|
|
2624
|
+
if (!x(N.permissions[b]))
|
|
2604
2625
|
return !1;
|
|
2605
2626
|
}
|
|
2606
2627
|
return !0;
|
|
2607
2628
|
}
|
|
2608
|
-
function
|
|
2609
|
-
const
|
|
2610
|
-
if (
|
|
2611
|
-
for (var
|
|
2612
|
-
var
|
|
2613
|
-
if (
|
|
2629
|
+
function x(D) {
|
|
2630
|
+
const N = K(s);
|
|
2631
|
+
if (N.userPermissions != null)
|
|
2632
|
+
for (var f = 0; f < N.userPermissions.length; f++) {
|
|
2633
|
+
var b = N.userPermissions[f].split(".");
|
|
2634
|
+
if (N.userPermissions[f] == "everything.edit" || D == b[0] && b.length > 1 && b[1] == "edit")
|
|
2614
2635
|
return !0;
|
|
2615
2636
|
}
|
|
2616
2637
|
return !1;
|
|
@@ -2618,325 +2639,325 @@ function xn(e) {
|
|
|
2618
2639
|
function C(D) {
|
|
2619
2640
|
if (D == null)
|
|
2620
2641
|
return !0;
|
|
2621
|
-
var
|
|
2622
|
-
if (
|
|
2642
|
+
var N = e.getAuthItem != null ? e.getAuthItem(D) : null;
|
|
2643
|
+
if (N == null)
|
|
2623
2644
|
return !1;
|
|
2624
|
-
if (
|
|
2645
|
+
if (N.requiresAuth === !1)
|
|
2625
2646
|
return !0;
|
|
2626
|
-
const
|
|
2627
|
-
if (
|
|
2647
|
+
const f = K(s);
|
|
2648
|
+
if (f.isSuspended && N.ignoreSuspension !== !0)
|
|
2628
2649
|
return !1;
|
|
2629
|
-
if (
|
|
2650
|
+
if (f.isGlobalAdmin)
|
|
2630
2651
|
return !0;
|
|
2631
|
-
if (
|
|
2632
|
-
for (var
|
|
2633
|
-
if (!T(
|
|
2652
|
+
if (N.permissions != null) {
|
|
2653
|
+
for (var b = 0; b < N.permissions.length; b++)
|
|
2654
|
+
if (!T(N.permissions[b]))
|
|
2634
2655
|
return !1;
|
|
2635
2656
|
}
|
|
2636
2657
|
return !0;
|
|
2637
2658
|
}
|
|
2638
2659
|
function T(D) {
|
|
2639
|
-
const
|
|
2640
|
-
if (
|
|
2641
|
-
for (var
|
|
2642
|
-
var
|
|
2643
|
-
if (D ==
|
|
2660
|
+
const N = K(s);
|
|
2661
|
+
if (N.userPermissions != null)
|
|
2662
|
+
for (var f = 0; f < N.userPermissions.length; f++) {
|
|
2663
|
+
var b = N.userPermissions[f].split(".");
|
|
2664
|
+
if (D == b[0] || D == "everything" || N.userPermissions[f] == "everything.view" || N.userPermissions[f] == "everything.edit")
|
|
2644
2665
|
return !0;
|
|
2645
2666
|
}
|
|
2646
2667
|
return !1;
|
|
2647
2668
|
}
|
|
2648
|
-
function
|
|
2649
|
-
let
|
|
2650
|
-
return
|
|
2651
|
-
|
|
2652
|
-
}), D != null && D.length > 0 && (D.some((Q) => u(Q)) || (
|
|
2669
|
+
function P(D, N, f) {
|
|
2670
|
+
let b = !0;
|
|
2671
|
+
return K(s).isGlobalAdmin ? !0 : (N != null && N.length > 0 && N.forEach((Q) => {
|
|
2672
|
+
f == "edit" ? x(Q) || (b = !1) : T(Q) || (b = !1);
|
|
2673
|
+
}), D != null && D.length > 0 && (D.some((Q) => u(Q)) || (b = !1)), b);
|
|
2653
2674
|
}
|
|
2654
|
-
function $(D,
|
|
2655
|
-
var
|
|
2656
|
-
let
|
|
2657
|
-
if (
|
|
2675
|
+
function $(D, N = !1) {
|
|
2676
|
+
var f = e.getAuthItem != null ? e.getAuthItem(D) : null;
|
|
2677
|
+
let b = !1;
|
|
2678
|
+
if (f == null)
|
|
2658
2679
|
return !1;
|
|
2659
|
-
let
|
|
2660
|
-
return ee || !
|
|
2661
|
-
$(ce, !0) && (
|
|
2662
|
-
}),
|
|
2663
|
-
}
|
|
2664
|
-
function
|
|
2665
|
-
return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (
|
|
2666
|
-
const
|
|
2667
|
-
return
|
|
2680
|
+
let J = f.subscriptions ?? [], Q = f.permissions ?? [], ee = P(J, Q, "view");
|
|
2681
|
+
return ee || !N || !Te(f.children) ? ee : ((f == null ? void 0 : f.children) != null && f.children.forEach((ce) => {
|
|
2682
|
+
$(ce, !0) && (b = !0);
|
|
2683
|
+
}), b);
|
|
2684
|
+
}
|
|
2685
|
+
function d(D) {
|
|
2686
|
+
return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (N, f) => {
|
|
2687
|
+
const b = Ue(qr(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${f}`);
|
|
2688
|
+
return N ? `${b}&redirect_path=${N}` : b;
|
|
2668
2689
|
}), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(D, l.value) ?? "" : "";
|
|
2669
2690
|
}
|
|
2670
2691
|
function h(D) {
|
|
2671
|
-
var
|
|
2672
|
-
return D == null ? 0 : ((
|
|
2692
|
+
var f;
|
|
2693
|
+
return D == null ? 0 : ((f = (e.subscriptionOptions ?? []).find((b) => b.code == D)) == null ? void 0 : f.value) ?? 0;
|
|
2673
2694
|
}
|
|
2674
2695
|
function u(D) {
|
|
2675
|
-
const
|
|
2676
|
-
if (
|
|
2696
|
+
const N = K(s);
|
|
2697
|
+
if (N.subscriptionCode == null)
|
|
2677
2698
|
return !1;
|
|
2678
|
-
if (
|
|
2699
|
+
if (N.subscriptionCode == D)
|
|
2679
2700
|
return !0;
|
|
2680
|
-
const
|
|
2681
|
-
return
|
|
2701
|
+
const f = h(D), b = h(N.subscriptionCode);
|
|
2702
|
+
return f <= b;
|
|
2682
2703
|
}
|
|
2683
2704
|
function r(D) {
|
|
2684
|
-
const
|
|
2685
|
-
atob(
|
|
2686
|
-
return "%" + ("00" +
|
|
2705
|
+
const f = D.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), b = decodeURIComponent(
|
|
2706
|
+
atob(f).split("").map(function(J) {
|
|
2707
|
+
return "%" + ("00" + J.charCodeAt(0).toString(16)).slice(-2);
|
|
2687
2708
|
}).join("")
|
|
2688
2709
|
);
|
|
2689
|
-
return JSON.parse(
|
|
2710
|
+
return JSON.parse(b);
|
|
2690
2711
|
}
|
|
2691
|
-
function y(D,
|
|
2692
|
-
|
|
2712
|
+
function y(D, N) {
|
|
2713
|
+
s.value = void 0, L(), D != null && N != null && N.currentRoute.value.path != D && N.push({ path: D });
|
|
2693
2714
|
}
|
|
2694
|
-
function
|
|
2695
|
-
var
|
|
2696
|
-
|
|
2715
|
+
function E(D) {
|
|
2716
|
+
var f;
|
|
2717
|
+
K(s).isLoggedIn || ((f = e.demo) == null || f.endDemo(), _() && (y(), window.location.href = d(D)));
|
|
2697
2718
|
}
|
|
2698
|
-
async function i(D,
|
|
2719
|
+
async function i(D, N) {
|
|
2699
2720
|
return e.getToken ?? (e.getToken = async () => {
|
|
2700
|
-
let
|
|
2701
|
-
if (
|
|
2721
|
+
let f = D, b = N, J = e.oauthGrantType ?? "authorization_token", Q = e.oauthClientID ?? "";
|
|
2722
|
+
if (f == null || b == null)
|
|
2702
2723
|
throw new Error("Code and State required in OAuth token process");
|
|
2703
|
-
if (
|
|
2724
|
+
if (b != l.value)
|
|
2704
2725
|
throw new Error("state does not match");
|
|
2705
2726
|
let ee = "";
|
|
2706
|
-
e.getTokenUrl ?? (e.getTokenUrl = () =>
|
|
2727
|
+
e.getTokenUrl ?? (e.getTokenUrl = () => Ue(qr(), "token")), ee = e.getTokenUrl(f, `${window.location.origin}/authentication`, J, Q);
|
|
2707
2728
|
const ce = {};
|
|
2708
|
-
ce.grant_type =
|
|
2729
|
+
ce.grant_type = J, ce.code = f, ce.redirect_uri = `${window.location.origin}/authentication`, ce.client_id = Q;
|
|
2709
2730
|
const W = await Er().post({
|
|
2710
2731
|
additionalUrl: ee,
|
|
2711
2732
|
data: ce
|
|
2712
2733
|
});
|
|
2713
|
-
|
|
2714
|
-
}), await e.getToken(D,
|
|
2734
|
+
S(W.access_token);
|
|
2735
|
+
}), await e.getToken(D, N);
|
|
2715
2736
|
}
|
|
2716
|
-
function
|
|
2737
|
+
function S(D) {
|
|
2717
2738
|
if (D != null && (e.demo == null || !e.demo.isDemoing.value)) {
|
|
2718
|
-
const
|
|
2719
|
-
I(
|
|
2739
|
+
const N = r(D);
|
|
2740
|
+
I(N, D), e.processTokenPayload != null && e.processTokenPayload(s, N);
|
|
2720
2741
|
}
|
|
2721
2742
|
}
|
|
2722
|
-
function I(D,
|
|
2723
|
-
var
|
|
2724
|
-
const
|
|
2725
|
-
|
|
2743
|
+
function I(D, N) {
|
|
2744
|
+
var b;
|
|
2745
|
+
const f = s.value;
|
|
2746
|
+
f.expiresOn = D.ExpiresOn, f.isGlobalAdmin = D.IsGlobalAdmin == "True", f.isLoggedIn = !0, f.permissions = D.Permissions, f.subscriptionCode = D.Subscription, f.timeZone ?? (f.timeZone = e.defaultTimeZone ?? hr), f.token = N, f.userID = D.UserLoginID, f.userPermissions = ((b = D.Permissions) == null ? void 0 : b.split(",")) ?? [];
|
|
2726
2747
|
}
|
|
2727
2748
|
function L() {
|
|
2728
2749
|
var D;
|
|
2729
|
-
|
|
2750
|
+
s.value ?? (s.value = {}), (D = s.value).timeZone ?? (D.timeZone = e.defaultTimeZone ?? hr);
|
|
2730
2751
|
}
|
|
2731
2752
|
function w() {
|
|
2732
|
-
const D =
|
|
2733
|
-
return D.isLoggedIn &&
|
|
2753
|
+
const D = K(s);
|
|
2754
|
+
return D.isLoggedIn && _() && (y(), window.location.href = d()), D.isLoggedIn;
|
|
2734
2755
|
}
|
|
2735
|
-
function
|
|
2736
|
-
const D =
|
|
2756
|
+
function _() {
|
|
2757
|
+
const D = K(s);
|
|
2737
2758
|
if (D == null || D.expiresOn == null)
|
|
2738
2759
|
return !0;
|
|
2739
|
-
const
|
|
2740
|
-
return
|
|
2760
|
+
const N = de.fromFormat(D.expiresOn, t), f = de.utc();
|
|
2761
|
+
return N <= f;
|
|
2741
2762
|
}
|
|
2742
2763
|
return L(), Ir = {
|
|
2743
2764
|
authState: l,
|
|
2744
2765
|
canEdit: g,
|
|
2745
|
-
canEditPermit:
|
|
2766
|
+
canEditPermit: x,
|
|
2746
2767
|
canView: C,
|
|
2747
2768
|
canViewPermit: T,
|
|
2748
|
-
credentials:
|
|
2749
|
-
doShow:
|
|
2769
|
+
credentials: s,
|
|
2770
|
+
doShow: P,
|
|
2750
2771
|
doShowByNav: $,
|
|
2751
|
-
getAuthorizeUrl:
|
|
2772
|
+
getAuthorizeUrl: d,
|
|
2752
2773
|
getToken: i,
|
|
2753
|
-
isLoggedIn: te(() =>
|
|
2754
|
-
login:
|
|
2774
|
+
isLoggedIn: te(() => s.value.isLoggedIn === !0),
|
|
2775
|
+
login: E,
|
|
2755
2776
|
logout: y,
|
|
2756
|
-
resetAuthState:
|
|
2757
|
-
setAuth:
|
|
2758
|
-
timeZone: te(() =>
|
|
2777
|
+
resetAuthState: A,
|
|
2778
|
+
setAuth: S,
|
|
2779
|
+
timeZone: te(() => s.value.timeZone ?? e.defaultTimeZone ?? hr),
|
|
2759
2780
|
tryLogin: w
|
|
2760
2781
|
}, Ir;
|
|
2761
2782
|
}
|
|
2762
2783
|
function _n(e, t, l = {}) {
|
|
2763
2784
|
const {
|
|
2764
|
-
preventDefault:
|
|
2765
|
-
stopPropagation:
|
|
2785
|
+
preventDefault: A = !1,
|
|
2786
|
+
stopPropagation: s = !1,
|
|
2766
2787
|
axis: g = "both"
|
|
2767
|
-
} = l,
|
|
2768
|
-
let C = { x: 0, y: 0 }, T = { x: 0, y: 0 },
|
|
2788
|
+
} = l, x = { capture: l.capture ?? !0 };
|
|
2789
|
+
let C = { x: 0, y: 0 }, T = { x: 0, y: 0 }, P = { x: 0, y: 0 }, $ = [], d = [], h = Y(!1);
|
|
2769
2790
|
function u(L) {
|
|
2770
|
-
|
|
2791
|
+
K(A) && L.preventDefault(), K(s) && L.stopPropagation();
|
|
2771
2792
|
}
|
|
2772
2793
|
function r(L) {
|
|
2773
|
-
var
|
|
2774
|
-
const w =
|
|
2794
|
+
var f;
|
|
2795
|
+
const w = K(e);
|
|
2775
2796
|
if (!w)
|
|
2776
2797
|
return;
|
|
2777
|
-
const
|
|
2778
|
-
|
|
2779
|
-
x:
|
|
2780
|
-
y:
|
|
2798
|
+
const _ = w.$el, N = L.type === "touchstart" && L.touches.length > 0 ? L.touches[0] : L;
|
|
2799
|
+
P = { x: N.clientX, y: N.clientY }, T = {
|
|
2800
|
+
x: _.offsetLeft,
|
|
2801
|
+
y: _.offsetTop
|
|
2781
2802
|
}, C = {
|
|
2782
|
-
x:
|
|
2783
|
-
y:
|
|
2784
|
-
}, ((
|
|
2803
|
+
x: _.offsetLeft,
|
|
2804
|
+
y: _.offsetTop
|
|
2805
|
+
}, ((f = l.onStart) == null ? void 0 : f.call(l, P, L)) !== !1 && (d.push(he("mousemove", y)), d.push(he("touchmove", y)), d.push(he("mouseup", E)), d.push(he("touchend", E)), u(L));
|
|
2785
2806
|
}
|
|
2786
2807
|
function y(L) {
|
|
2787
|
-
var
|
|
2788
|
-
if (!
|
|
2808
|
+
var b;
|
|
2809
|
+
if (!P || !K(e))
|
|
2789
2810
|
return;
|
|
2790
2811
|
const D = L.type === "touchmove" && L.touches.length > 0 ? L.touches[0] : L;
|
|
2791
|
-
let
|
|
2792
|
-
(g === "x" || g === "both") && (C.x = T.x +
|
|
2812
|
+
let N = D.clientX - P.x, f = D.clientY - P.y;
|
|
2813
|
+
(g === "x" || g === "both") && (C.x = T.x + N), (g === "y" || g === "both") && (C.y = T.y + f), (b = l.onMove) == null || b.call(l, C, L), u(L), i(C);
|
|
2793
2814
|
}
|
|
2794
|
-
function
|
|
2815
|
+
function E(L) {
|
|
2795
2816
|
var w;
|
|
2796
|
-
document.documentElement.style.cursor = "",
|
|
2797
|
-
|
|
2798
|
-
}),
|
|
2817
|
+
document.documentElement.style.cursor = "", d.forEach((_) => {
|
|
2818
|
+
_();
|
|
2819
|
+
}), d.length = 0, (w = l.onEnd) == null || w.call(l, C, L), u(L);
|
|
2799
2820
|
}
|
|
2800
2821
|
function i(L) {
|
|
2801
|
-
const w =
|
|
2822
|
+
const w = K(e);
|
|
2802
2823
|
if (!w)
|
|
2803
2824
|
return;
|
|
2804
|
-
const
|
|
2805
|
-
|
|
2825
|
+
const _ = w.$el;
|
|
2826
|
+
_.style.left = `${L.x}px`, _.style.top = `${L.y}px`;
|
|
2806
2827
|
}
|
|
2807
|
-
function
|
|
2808
|
-
if (
|
|
2828
|
+
function S() {
|
|
2829
|
+
if (K(h))
|
|
2809
2830
|
return;
|
|
2810
|
-
const L =
|
|
2831
|
+
const L = K(t);
|
|
2811
2832
|
if (!L)
|
|
2812
2833
|
return;
|
|
2813
2834
|
const w = L.$el;
|
|
2814
|
-
w.style.cursor = "move", $.push(he(w, "mousedown", r,
|
|
2835
|
+
w.style.cursor = "move", $.push(he(w, "mousedown", r, x)), $.push(he(w, "touchstart", r, x)), h.value = !0;
|
|
2815
2836
|
}
|
|
2816
2837
|
function I() {
|
|
2817
|
-
if (!
|
|
2838
|
+
if (!K(h))
|
|
2818
2839
|
return;
|
|
2819
|
-
const L =
|
|
2840
|
+
const L = K(t);
|
|
2820
2841
|
if (!L)
|
|
2821
2842
|
return;
|
|
2822
2843
|
const w = L.$el;
|
|
2823
|
-
w.style.cursor = "", $.forEach((
|
|
2824
|
-
|
|
2844
|
+
w.style.cursor = "", $.forEach((_) => {
|
|
2845
|
+
_();
|
|
2825
2846
|
}), $.length = 0, h.value = !1;
|
|
2826
2847
|
}
|
|
2827
2848
|
return {
|
|
2828
2849
|
draggingIsOn: h,
|
|
2829
2850
|
turnDraggableOff: I,
|
|
2830
|
-
turnDraggableOn:
|
|
2851
|
+
turnDraggableOn: S
|
|
2831
2852
|
};
|
|
2832
2853
|
}
|
|
2833
2854
|
const Tn = ["t", "r", "b", "l", "tr", "br", "bl", "tl"];
|
|
2834
2855
|
function Mn(e, t = {}) {
|
|
2835
|
-
let l,
|
|
2856
|
+
let l, A = t.handleWidth ?? 12, s = t.handleZIndex ?? 100, g = t.minWidth ?? 0, x = t.maxWidth ?? Number.MAX_SAFE_INTEGER, C = t.minHeight ?? 0, T = t.maxHeight ?? Number.MAX_SAFE_INTEGER, P = t.preventDefault ?? !1, $ = t.stopPropagation ?? !1, d, h = [];
|
|
2836
2857
|
const u = Y(!1);
|
|
2837
2858
|
let r = [], y = [];
|
|
2838
|
-
const
|
|
2839
|
-
let
|
|
2859
|
+
const E = Y(!1), i = Y({ x: 0, y: 0 });
|
|
2860
|
+
let S = { left: 0, top: 0, height: 0, width: 0, position: "absolute" }, I = {};
|
|
2840
2861
|
function L(W) {
|
|
2841
|
-
Ae(
|
|
2862
|
+
Ae(P) && W.preventDefault(), Ae($) && W.stopPropagation();
|
|
2842
2863
|
}
|
|
2843
2864
|
function w(W, Z) {
|
|
2844
|
-
h = Z.map(D), h.forEach((
|
|
2865
|
+
h = Z.map(D), h.forEach((V) => W.$el.appendChild(V));
|
|
2845
2866
|
}
|
|
2846
|
-
function
|
|
2867
|
+
function _(W) {
|
|
2847
2868
|
h.forEach((Z) => W.$el.removeChild(Z));
|
|
2848
2869
|
}
|
|
2849
2870
|
function D(W) {
|
|
2850
|
-
const Z =
|
|
2851
|
-
return G.dataset.handle = W, G.style.position = "absolute", G.style.touchAction = "none", G.style.userSelect = "none", G.style.zIndex = (W.length === 1 ?
|
|
2871
|
+
const Z = A + "px", V = -A / 2 + "px", ae = s + 1, G = document.createElement("div");
|
|
2872
|
+
return G.dataset.handle = W, G.style.position = "absolute", G.style.touchAction = "none", G.style.userSelect = "none", G.style.zIndex = (W.length === 1 ? s : ae).toString(), G.style.cursor = J(W), W.includes("t") && (G.style.top = V, G.style.height = Z, W === "t" && (G.style.left = "0", G.style.width = "100%")), W.includes("b") && (G.style.bottom = V, G.style.height = Z, W === "b" && (G.style.left = "0", G.style.width = "100%")), W.includes("r") && (G.style.right = V, G.style.width = Z, W === "r" && (G.style.top = "0", G.style.height = "100%")), W.includes("l") && (G.style.left = V, G.style.width = Z, W === "l" && (G.style.top = "0", G.style.height = "100%")), G;
|
|
2852
2873
|
}
|
|
2853
|
-
function
|
|
2874
|
+
function N(W) {
|
|
2854
2875
|
var ne;
|
|
2855
2876
|
if (!h.some((fe) => fe == W.target))
|
|
2856
2877
|
return;
|
|
2857
2878
|
const Z = Ae(e);
|
|
2858
2879
|
if (!Z)
|
|
2859
2880
|
return;
|
|
2860
|
-
const
|
|
2861
|
-
if (i.value.x = G.clientX, i.value.y = G.clientY,
|
|
2862
|
-
left:
|
|
2863
|
-
top:
|
|
2864
|
-
height: parseInt(window.getComputedStyle(
|
|
2865
|
-
width: parseInt(window.getComputedStyle(
|
|
2866
|
-
}, I = Lr(
|
|
2881
|
+
const V = Z.$el, G = W.type === "touchstart" && W.touches.length > 0 ? W.touches[0] : W;
|
|
2882
|
+
if (i.value.x = G.clientX, i.value.y = G.clientY, S = {
|
|
2883
|
+
left: V.offsetLeft,
|
|
2884
|
+
top: V.offsetTop,
|
|
2885
|
+
height: parseInt(window.getComputedStyle(V).getPropertyValue("height")),
|
|
2886
|
+
width: parseInt(window.getComputedStyle(V).getPropertyValue("width"))
|
|
2887
|
+
}, I = Lr(S), ((ne = t.onStart) == null ? void 0 : ne.call(t, i.value, W)) === !1)
|
|
2867
2888
|
return;
|
|
2868
2889
|
let X = W.target;
|
|
2869
|
-
document.documentElement.style.cursor =
|
|
2890
|
+
document.documentElement.style.cursor = J(X.dataset.handle), d = X.dataset.handle, y.push(he("mousemove", f)), y.push(he("mouseup", b)), y.push(he("touchmove", f)), y.push(he("touchend", b)), L(W);
|
|
2870
2891
|
}
|
|
2871
|
-
function
|
|
2892
|
+
function f(W) {
|
|
2872
2893
|
const Z = Ae(e);
|
|
2873
2894
|
if (!Z)
|
|
2874
2895
|
return;
|
|
2875
|
-
const
|
|
2896
|
+
const V = Z.$el, G = W.type === "touchmove" && W.touches.length > 0 ? W.touches[0] : W;
|
|
2876
2897
|
let X = G.clientX - i.value.x, ne = G.clientY - i.value.y;
|
|
2877
|
-
const fe = Ae(
|
|
2878
|
-
if (
|
|
2898
|
+
const fe = Ae(S);
|
|
2899
|
+
if (d.includes("t")) {
|
|
2879
2900
|
const ie = Math.min(T, Math.max(C, (fe.height ?? 0) - ne));
|
|
2880
2901
|
I.height = ie, I.top = (fe.top ?? 0) + ne;
|
|
2881
2902
|
}
|
|
2882
|
-
if (
|
|
2903
|
+
if (d.includes("b")) {
|
|
2883
2904
|
const ie = Math.min(T, Math.max(C, (fe.height ?? 0) + ne));
|
|
2884
2905
|
I.height = ie;
|
|
2885
2906
|
}
|
|
2886
|
-
if (
|
|
2887
|
-
const ie = Math.min(
|
|
2907
|
+
if (d.includes("l")) {
|
|
2908
|
+
const ie = Math.min(x, Math.max(g, (fe.width ?? 0) - X));
|
|
2888
2909
|
I.width = ie, I.left = (fe.left ?? 0) + X;
|
|
2889
2910
|
}
|
|
2890
|
-
if (
|
|
2891
|
-
const ie = Math.min(
|
|
2911
|
+
if (d.includes("r")) {
|
|
2912
|
+
const ie = Math.min(x, Math.max(g, (fe.width ?? 0) + X));
|
|
2892
2913
|
I.width = ie;
|
|
2893
2914
|
}
|
|
2894
|
-
|
|
2915
|
+
V.dispatchEvent(new CustomEvent("resize")), L(W), ee(I);
|
|
2895
2916
|
}
|
|
2896
|
-
function
|
|
2897
|
-
document.documentElement.style.cursor = "",
|
|
2917
|
+
function b() {
|
|
2918
|
+
document.documentElement.style.cursor = "", d = null, y.forEach((W) => {
|
|
2898
2919
|
W();
|
|
2899
2920
|
}), y.length = 0;
|
|
2900
2921
|
}
|
|
2901
|
-
function
|
|
2922
|
+
function J(W) {
|
|
2902
2923
|
const Z = {
|
|
2903
2924
|
t: "n",
|
|
2904
2925
|
r: "e",
|
|
2905
2926
|
b: "s",
|
|
2906
2927
|
l: "w"
|
|
2907
2928
|
};
|
|
2908
|
-
return W.split("").map((
|
|
2929
|
+
return W.split("").map((V) => Z[V]).join("") + "-resize";
|
|
2909
2930
|
}
|
|
2910
2931
|
function Q(W) {
|
|
2911
2932
|
const Z = Ae(e);
|
|
2912
2933
|
if (!Z)
|
|
2913
2934
|
return;
|
|
2914
|
-
const
|
|
2935
|
+
const V = Z.$el;
|
|
2915
2936
|
if (console.log(l), l !== "page" && W == "page") {
|
|
2916
|
-
const ae = jt(
|
|
2937
|
+
const ae = jt(V), G = Ae(ae) ?? null;
|
|
2917
2938
|
let X = 0;
|
|
2918
2939
|
if (G != null) {
|
|
2919
2940
|
const ne = window.getComputedStyle(G);
|
|
2920
2941
|
X = parseInt(ne.getPropertyValue("width")) - G.offsetLeft;
|
|
2921
2942
|
}
|
|
2922
|
-
|
|
2943
|
+
V.style.transition = "width 0.5s, height 0.5s, top 0.5s, left 0.5s", V.offsetHeight, u.value = !0, ee({
|
|
2923
2944
|
height: void 0,
|
|
2924
2945
|
width: X,
|
|
2925
2946
|
top: 0,
|
|
2926
2947
|
left: 0,
|
|
2927
2948
|
position: void 0
|
|
2928
|
-
}), he(
|
|
2929
|
-
|
|
2949
|
+
}), he(V, "transitionend", () => {
|
|
2950
|
+
V.style.width = "auto", V.style.top = "", V.style.left = "", V.style.position = "", V.style.transition = "", u.value = !1;
|
|
2930
2951
|
}, { once: !0 });
|
|
2931
2952
|
} else if ((l == "page" || Z.$el.style.position !== "absolute") && W !== "page") {
|
|
2932
|
-
|
|
2933
|
-
height: parseInt(window.getComputedStyle(
|
|
2934
|
-
width: parseInt(window.getComputedStyle(
|
|
2935
|
-
top:
|
|
2936
|
-
left:
|
|
2953
|
+
V.style.transition = "width 0.5s, height 0.5s, top 0.5s, left 0.5s", u.value = !0, S = {
|
|
2954
|
+
height: parseInt(window.getComputedStyle(V).getPropertyValue("height")),
|
|
2955
|
+
width: parseInt(window.getComputedStyle(V).getPropertyValue("width")),
|
|
2956
|
+
top: V.offsetTop,
|
|
2957
|
+
left: V.offsetLeft,
|
|
2937
2958
|
position: "absolute"
|
|
2938
|
-
}, ee(
|
|
2939
|
-
const ae =
|
|
2959
|
+
}, ee(S), V.offsetHeight;
|
|
2960
|
+
const ae = S;
|
|
2940
2961
|
W == "freestyle" ? I = {
|
|
2941
2962
|
height: ae.height,
|
|
2942
2963
|
width: (ae.width ?? 100) / 2,
|
|
@@ -2949,8 +2970,8 @@ function Mn(e, t = {}) {
|
|
|
2949
2970
|
top: (ae.top ?? 0) + 2,
|
|
2950
2971
|
left: (ae.left ?? 0) + 2,
|
|
2951
2972
|
position: "absolute"
|
|
2952
|
-
}), ee(I), he(
|
|
2953
|
-
|
|
2973
|
+
}), ee(I), he(V, "transitionend", () => {
|
|
2974
|
+
V.style.transition = "", u.value = !1;
|
|
2954
2975
|
}, { once: !0 });
|
|
2955
2976
|
}
|
|
2956
2977
|
}
|
|
@@ -2958,42 +2979,42 @@ function Mn(e, t = {}) {
|
|
|
2958
2979
|
const Z = Ae(e);
|
|
2959
2980
|
if (!Z)
|
|
2960
2981
|
return;
|
|
2961
|
-
const
|
|
2962
|
-
W.top ?
|
|
2982
|
+
const V = Z.$el;
|
|
2983
|
+
W.top ? V.style.top = `${W.top}px` : V.style.top = void 0, W.left ? V.style.left = `${W.left}px` : V.style.left = void 0, W.height ? V.style.height = `${W.height}px` : V.style.height = void 0, W.width ? V.style.width = `${W.width}px` : V.style.width = void 0, W.position ? V.style.position = `${W.position}` : V.style.position = void 0, console.log(V.style.position);
|
|
2963
2984
|
}
|
|
2964
2985
|
function ce(W, Z) {
|
|
2965
|
-
if (
|
|
2986
|
+
if (E.value)
|
|
2966
2987
|
return;
|
|
2967
|
-
const
|
|
2968
|
-
|
|
2988
|
+
const V = Ae(e);
|
|
2989
|
+
V && (w(V, W ?? Tn), Q(Z), r.push(he(V.$el, "mousedown", N)), r.push(he(V.$el, "touchstart", N)), E.value = !0, l = Z);
|
|
2969
2990
|
}
|
|
2970
2991
|
function we(W) {
|
|
2971
|
-
if (!
|
|
2992
|
+
if (!E.value)
|
|
2972
2993
|
return;
|
|
2973
2994
|
const Z = Ae(e);
|
|
2974
|
-
Z && (
|
|
2975
|
-
|
|
2976
|
-
}), r.length = 0,
|
|
2995
|
+
Z && (_(Z), Q(W), r.forEach((V) => {
|
|
2996
|
+
V();
|
|
2997
|
+
}), r.length = 0, E.value = !1);
|
|
2977
2998
|
}
|
|
2978
2999
|
return {
|
|
2979
|
-
resizingIsOn:
|
|
3000
|
+
resizingIsOn: E,
|
|
2980
3001
|
turnResizingOn: ce,
|
|
2981
3002
|
turnResizingOff: we
|
|
2982
3003
|
};
|
|
2983
3004
|
}
|
|
2984
3005
|
function Cn(e) {
|
|
2985
|
-
const t = (e == null ? void 0 : e.blade) ?? Y(null), l = (e == null ? void 0 : e.handle) ?? Y(null),
|
|
3006
|
+
const t = (e == null ? void 0 : e.blade) ?? Y(null), l = (e == null ? void 0 : e.handle) ?? Y(null), A = Y(!1), s = (e == null ? void 0 : e.mobileBreakpoint) ?? 500, g = Y((e == null ? void 0 : e.defaultVariant) ?? "page"), x = Y({}), { turnResizingOff: C, turnResizingOn: T } = Mn(t), { turnDraggableOff: P, turnDraggableOn: $ } = _n(t, l);
|
|
2986
3007
|
Kt(t, (h) => {
|
|
2987
3008
|
const u = h[0], { width: r } = u.contentRect;
|
|
2988
|
-
|
|
3009
|
+
A.value = r < s;
|
|
2989
3010
|
});
|
|
2990
|
-
function
|
|
2991
|
-
|
|
3011
|
+
function d(h) {
|
|
3012
|
+
P(), h == "page" ? C(h) : h == "blade" ? T(["l", "r"], h) : h == "freestyle" ? (C(), T(void 0, h), $()) : h == "inline" && C();
|
|
2992
3013
|
}
|
|
2993
|
-
return
|
|
2994
|
-
isMobile:
|
|
3014
|
+
return d(g.value), _e(g, (h) => d(h)), {
|
|
3015
|
+
isMobile: A,
|
|
2995
3016
|
variant: g,
|
|
2996
|
-
bladeData:
|
|
3017
|
+
bladeData: x
|
|
2997
3018
|
};
|
|
2998
3019
|
}
|
|
2999
3020
|
const mr = {
|
|
@@ -3035,9 +3056,9 @@ function wa(e) {
|
|
|
3035
3056
|
function Pn(e) {
|
|
3036
3057
|
const t = Y({});
|
|
3037
3058
|
let l = e.vuetifyInstance;
|
|
3038
|
-
function
|
|
3039
|
-
const
|
|
3040
|
-
|
|
3059
|
+
function A() {
|
|
3060
|
+
const d = localStorage.getItem("cosmetics");
|
|
3061
|
+
d != null && d.length > 0 ? t.value = JSON.parse(d) : t.value = {
|
|
3041
3062
|
theme: e.defaultTheme ?? "light",
|
|
3042
3063
|
light: { ...mr, ...e.defaultLightTheme },
|
|
3043
3064
|
dark: { ...vr, ...e.defaultDarkTheme },
|
|
@@ -3045,17 +3066,17 @@ function Pn(e) {
|
|
|
3045
3066
|
drawerStick: e.defaultDrawerStick ?? !1
|
|
3046
3067
|
};
|
|
3047
3068
|
}
|
|
3048
|
-
function
|
|
3069
|
+
function s() {
|
|
3049
3070
|
localStorage.setItem("cosmetics", JSON.stringify(t.value));
|
|
3050
3071
|
}
|
|
3051
|
-
function g(
|
|
3052
|
-
l != null && (l.global.name.value = t.value.theme, l.global.name.value == "dark" ? (
|
|
3072
|
+
function g(d) {
|
|
3073
|
+
l != null && (l.global.name.value = t.value.theme, l.global.name.value == "dark" ? (d && (t.value.dark = { ...vr, ...e.defaultDarkTheme }), l.themes.value.dark = {
|
|
3053
3074
|
...l.themes.value.dark,
|
|
3054
3075
|
colors: {
|
|
3055
3076
|
...l.themes.value.dark.colors,
|
|
3056
3077
|
...t.value.dark
|
|
3057
3078
|
}
|
|
3058
|
-
}) : (
|
|
3079
|
+
}) : (d && (t.value.light = { ...mr, ...e.defaultLightTheme }), l.themes.value.light = {
|
|
3059
3080
|
...l.themes.value.light,
|
|
3060
3081
|
colors: {
|
|
3061
3082
|
...l.themes.value.light.colors,
|
|
@@ -3063,11 +3084,11 @@ function Pn(e) {
|
|
|
3063
3084
|
}
|
|
3064
3085
|
}));
|
|
3065
3086
|
}
|
|
3066
|
-
function
|
|
3087
|
+
function x(d) {
|
|
3067
3088
|
var h;
|
|
3068
3089
|
if (l != null) {
|
|
3069
3090
|
const u = l.themes.value.dark, r = l.themes.value.light;
|
|
3070
|
-
u.colors.primary =
|
|
3091
|
+
u.colors.primary = d, r.colors.primary = d, (h = document.querySelector('meta[name="theme-color"]')) == null || h.setAttribute("content", d);
|
|
3071
3092
|
}
|
|
3072
3093
|
}
|
|
3073
3094
|
function C() {
|
|
@@ -3076,25 +3097,25 @@ function Pn(e) {
|
|
|
3076
3097
|
function T() {
|
|
3077
3098
|
t.value.drawerStick = !t.value.drawerStick;
|
|
3078
3099
|
}
|
|
3079
|
-
function
|
|
3100
|
+
function P() {
|
|
3080
3101
|
t.value.theme = t.value.theme == "dark" ? "light" : "dark", l != null && (l.global.name.value = t.value.theme);
|
|
3081
3102
|
}
|
|
3082
3103
|
function $() {
|
|
3083
|
-
var
|
|
3104
|
+
var d;
|
|
3084
3105
|
if (l != null) {
|
|
3085
3106
|
const h = l.themes.value.dark, u = l.themes.value.light;
|
|
3086
|
-
h.colors.primary = (t.value.dark ?? { ...vr, ...e.defaultDarkTheme }).primary, u.colors.primary = (t.value.light ?? { ...mr, ...e.defaultLightTheme }).primary, (
|
|
3107
|
+
h.colors.primary = (t.value.dark ?? { ...vr, ...e.defaultDarkTheme }).primary, u.colors.primary = (t.value.light ?? { ...mr, ...e.defaultLightTheme }).primary, (d = document.querySelector('meta[name="theme-color"]')) == null || d.setAttribute("content", "");
|
|
3087
3108
|
}
|
|
3088
3109
|
}
|
|
3089
|
-
return
|
|
3090
|
-
|
|
3110
|
+
return A(), _e(t, () => {
|
|
3111
|
+
s();
|
|
3091
3112
|
}), Dr = {
|
|
3092
3113
|
state: t,
|
|
3093
3114
|
resetCosmetics: g,
|
|
3094
|
-
setTemporaryColor:
|
|
3115
|
+
setTemporaryColor: x,
|
|
3095
3116
|
toggleDrawer: C,
|
|
3096
3117
|
toggleDrawerStick: T,
|
|
3097
|
-
toggleLightDark:
|
|
3118
|
+
toggleLightDark: P,
|
|
3098
3119
|
undoTemporaryColor: $
|
|
3099
3120
|
}, Dr;
|
|
3100
3121
|
}
|
|
@@ -3105,47 +3126,47 @@ function Nn() {
|
|
|
3105
3126
|
function e(t) {
|
|
3106
3127
|
const {
|
|
3107
3128
|
items: l,
|
|
3108
|
-
headers:
|
|
3109
|
-
fileName:
|
|
3129
|
+
headers: A,
|
|
3130
|
+
fileName: s = "data.csv",
|
|
3110
3131
|
format: g = "file"
|
|
3111
3132
|
} = t;
|
|
3112
3133
|
if (!Te(l))
|
|
3113
3134
|
return;
|
|
3114
|
-
let
|
|
3115
|
-
|
|
3116
|
-
header:
|
|
3117
|
-
itemText:
|
|
3118
|
-
value:
|
|
3119
|
-
})) :
|
|
3135
|
+
let x = [];
|
|
3136
|
+
A != null ? x = A == null ? void 0 : A.filter((E) => (E.csv ?? E.csvText ?? E.csvFilter ?? E.csvArray) != null).map((E) => ({
|
|
3137
|
+
header: E.title ?? E.value ?? "",
|
|
3138
|
+
itemText: E.itemText,
|
|
3139
|
+
value: E.value
|
|
3140
|
+
})) : x = Object.keys(l[0]).map((E) => ({ header: nn(E) ?? "", value: E })), x = x.filter((E) => E.header.length > 0);
|
|
3120
3141
|
var C = [];
|
|
3121
|
-
for (let
|
|
3122
|
-
const i = l[
|
|
3123
|
-
var T = {},
|
|
3124
|
-
for (let
|
|
3125
|
-
const I =
|
|
3142
|
+
for (let E = 0; E < l.length; E++) {
|
|
3143
|
+
const i = l[E];
|
|
3144
|
+
var T = {}, P = [];
|
|
3145
|
+
for (let S = 0; S < x.length; S++) {
|
|
3146
|
+
const I = x[S];
|
|
3126
3147
|
var $ = null;
|
|
3127
3148
|
typeof I.value == "function" ? $ = I.value(i) : typeof I.value == "string" && ($ = Sr(i, I.value)), I.itemText != null ? T[I.header] = Sr($, I.itemText) : T[I.header] = $;
|
|
3128
3149
|
}
|
|
3129
|
-
C.push(T), Te(
|
|
3130
|
-
C.push(
|
|
3131
|
-
}),
|
|
3150
|
+
C.push(T), Te(P) && P.forEach((S) => {
|
|
3151
|
+
C.push(S);
|
|
3152
|
+
}), P = [];
|
|
3132
3153
|
}
|
|
3133
|
-
var
|
|
3134
|
-
if (
|
|
3154
|
+
var d = [];
|
|
3155
|
+
if (d.push(x.map((E) => E.header).toString()), C.forEach((E) => {
|
|
3135
3156
|
let i = [];
|
|
3136
|
-
|
|
3137
|
-
var I = S
|
|
3157
|
+
x.forEach(function(S) {
|
|
3158
|
+
var I = E[S.header];
|
|
3138
3159
|
i.push(I ?? "");
|
|
3139
|
-
}),
|
|
3160
|
+
}), d.push(i.join(","));
|
|
3140
3161
|
}), g == "array")
|
|
3141
|
-
return
|
|
3142
|
-
var h =
|
|
3162
|
+
return d;
|
|
3163
|
+
var h = d.join(`
|
|
3143
3164
|
`), u = new Blob([h], { type: "text/plain;charset=utf-8" });
|
|
3144
3165
|
if (window.navigator.msSaveOrOpenBlob)
|
|
3145
|
-
window.navigator.msSaveOrOpenBlob(u,
|
|
3166
|
+
window.navigator.msSaveOrOpenBlob(u, s);
|
|
3146
3167
|
else {
|
|
3147
3168
|
var r = document.createElement("a"), y = URL.createObjectURL(u);
|
|
3148
|
-
r.href = y, r.download =
|
|
3169
|
+
r.href = y, r.download = s, document.body.appendChild(r), r.click(), setTimeout(function() {
|
|
3149
3170
|
document.body.removeChild(r), window.URL.revokeObjectURL(y);
|
|
3150
3171
|
}, 0);
|
|
3151
3172
|
}
|
|
@@ -3161,41 +3182,41 @@ function Sa() {
|
|
|
3161
3182
|
function Ln(e) {
|
|
3162
3183
|
const t = e.getUTC ?? de.utc;
|
|
3163
3184
|
function l() {
|
|
3164
|
-
return
|
|
3185
|
+
return s().startOf("day").toUTC().toString() ?? "";
|
|
3165
3186
|
}
|
|
3166
|
-
function
|
|
3167
|
-
return
|
|
3187
|
+
function A() {
|
|
3188
|
+
return s().startOf("day").plus({ day: 1 }).toUTC().toString() ?? "";
|
|
3168
3189
|
}
|
|
3169
|
-
function
|
|
3170
|
-
return T == null ? t().setZone(e.getTimeZone()) :
|
|
3190
|
+
function s(T, P) {
|
|
3191
|
+
return T == null ? t().setZone(e.getTimeZone()) : P ? de.fromFormat(T, P, { zone: e.getTimeZone() }) : de.fromISO(T, { zone: e.getTimeZone() });
|
|
3171
3192
|
}
|
|
3172
|
-
function g(T,
|
|
3193
|
+
function g(T, P, $) {
|
|
3173
3194
|
if (T == null) {
|
|
3174
3195
|
const h = t().setZone(e.getTimeZone());
|
|
3175
|
-
return
|
|
3196
|
+
return P ? h.toFormat(P) : h.toString();
|
|
3176
3197
|
}
|
|
3177
3198
|
if (T == "Invalid DateTime")
|
|
3178
3199
|
return "";
|
|
3179
|
-
const
|
|
3180
|
-
return
|
|
3200
|
+
const d = $ ? de.fromFormat(T, $, { zone: e.getTimeZone() }) : de.fromISO(T, { zone: e.getTimeZone() });
|
|
3201
|
+
return P ? d.toFormat(P) : d == null ? void 0 : d.toString();
|
|
3181
3202
|
}
|
|
3182
|
-
function
|
|
3183
|
-
return T == null ? t() :
|
|
3203
|
+
function x(T, P) {
|
|
3204
|
+
return T == null ? t() : P ? de.fromFormat(T, P) : de.fromISO(T);
|
|
3184
3205
|
}
|
|
3185
|
-
function C(T,
|
|
3206
|
+
function C(T, P, $) {
|
|
3186
3207
|
if (T == null)
|
|
3187
|
-
return
|
|
3208
|
+
return P ? t().toFormat(P) : t().toString();
|
|
3188
3209
|
{
|
|
3189
|
-
const
|
|
3190
|
-
return
|
|
3210
|
+
const d = $ ? de.fromFormat(T, $) : de.fromISO(T);
|
|
3211
|
+
return P ? d.toFormat(P) : d.toString();
|
|
3191
3212
|
}
|
|
3192
3213
|
}
|
|
3193
3214
|
return xr = {
|
|
3194
3215
|
getToday: l,
|
|
3195
|
-
getTomorrow:
|
|
3196
|
-
tzDate:
|
|
3216
|
+
getTomorrow: A,
|
|
3217
|
+
tzDate: s,
|
|
3197
3218
|
tzString: g,
|
|
3198
|
-
utcDate:
|
|
3219
|
+
utcDate: x,
|
|
3199
3220
|
utcString: C
|
|
3200
3221
|
}, xr;
|
|
3201
3222
|
}
|
|
@@ -3205,27 +3226,27 @@ function Aa() {
|
|
|
3205
3226
|
}
|
|
3206
3227
|
function Rn(e) {
|
|
3207
3228
|
const t = Y(!1), l = (e == null ? void 0 : e.apis) ?? [];
|
|
3208
|
-
function
|
|
3229
|
+
function A() {
|
|
3209
3230
|
t.value = !0;
|
|
3210
3231
|
}
|
|
3211
|
-
function
|
|
3232
|
+
function s() {
|
|
3212
3233
|
t.value = !1;
|
|
3213
3234
|
}
|
|
3214
|
-
function g(
|
|
3235
|
+
function g(d) {
|
|
3215
3236
|
let h;
|
|
3216
|
-
if (
|
|
3217
|
-
const u = new URL(
|
|
3237
|
+
if (d.finalUrl != null) {
|
|
3238
|
+
const u = new URL(d.finalUrl);
|
|
3218
3239
|
h = l.find((r) => r.path == u.pathname || r.path == u.pathname + u.search);
|
|
3219
3240
|
}
|
|
3220
|
-
return h == null && (h = l.find((u) => Array.isArray(u.nav) ? u.nav.some((r) => r ==
|
|
3241
|
+
return h == null && (h = l.find((u) => Array.isArray(u.nav) ? u.nav.some((r) => r == d.nav) : u.nav == d.nav)), h;
|
|
3221
3242
|
}
|
|
3222
|
-
function
|
|
3243
|
+
function x(d) {
|
|
3223
3244
|
var r;
|
|
3224
3245
|
if (l == null)
|
|
3225
3246
|
return Promise.resolve("no demo data available for this api");
|
|
3226
|
-
const h =
|
|
3247
|
+
const h = d.id ?? ((r = d.data) == null ? void 0 : r.id), u = g(d);
|
|
3227
3248
|
if (h != null && (u == null ? void 0 : u.data) != null) {
|
|
3228
|
-
const y = u.data.findIndex((
|
|
3249
|
+
const y = u.data.findIndex((E) => E.id == h);
|
|
3229
3250
|
y >= 0 && u.data.splice(y, 1);
|
|
3230
3251
|
}
|
|
3231
3252
|
return new Promise(function(y) {
|
|
@@ -3234,26 +3255,26 @@ function Rn(e) {
|
|
|
3234
3255
|
}, 200);
|
|
3235
3256
|
});
|
|
3236
3257
|
}
|
|
3237
|
-
function C(
|
|
3238
|
-
var y,
|
|
3258
|
+
function C(d) {
|
|
3259
|
+
var y, E, i;
|
|
3239
3260
|
if (l == null)
|
|
3240
3261
|
throw new Error("no demo data available for this api");
|
|
3241
|
-
const h =
|
|
3262
|
+
const h = d.id ?? ((y = d.data) == null ? void 0 : y.id), u = g(d);
|
|
3242
3263
|
let r;
|
|
3243
|
-
return u != null && (u.data ?? (u.data = []), u.getAction != null ? r = u.getAction(u.data, h) : h != null ? r = (
|
|
3264
|
+
return u != null && (u.data ?? (u.data = []), u.getAction != null ? r = u.getAction(u.data, h) : h != null ? r = (E = u.data) == null ? void 0 : E.find((S) => S.id == h) : u.path != null && ((i = u.data) == null ? void 0 : i.length) == 1 && (r = u.data[0])), r == null ? Promise.resolve(void 0) : new Promise((S) => {
|
|
3244
3265
|
setTimeout(() => {
|
|
3245
|
-
|
|
3266
|
+
S({
|
|
3246
3267
|
data: r
|
|
3247
3268
|
});
|
|
3248
3269
|
});
|
|
3249
3270
|
});
|
|
3250
3271
|
}
|
|
3251
|
-
function T(
|
|
3272
|
+
function T(d) {
|
|
3252
3273
|
if (l == null)
|
|
3253
3274
|
throw new Error("no demo data available for this api");
|
|
3254
|
-
const h = g(
|
|
3275
|
+
const h = g(d);
|
|
3255
3276
|
let u;
|
|
3256
|
-
return h != null && (h.data ?? (h.data = []), h.getAllAction != null ? u = h.getAllAction(h.data,
|
|
3277
|
+
return h != null && (h.data ?? (h.data = []), h.getAllAction != null ? u = h.getAllAction(h.data, d.params) : u = h.data), u == null ? Promise.resolve(void 0) : new Promise((r) => {
|
|
3257
3278
|
setTimeout(() => {
|
|
3258
3279
|
r({
|
|
3259
3280
|
data: u,
|
|
@@ -3263,65 +3284,65 @@ function Rn(e) {
|
|
|
3263
3284
|
});
|
|
3264
3285
|
});
|
|
3265
3286
|
}
|
|
3266
|
-
function
|
|
3287
|
+
function P(d) {
|
|
3267
3288
|
var r, y;
|
|
3268
3289
|
if (l == null)
|
|
3269
3290
|
throw new Error("no demo data available for this api");
|
|
3270
|
-
const h = g(
|
|
3291
|
+
const h = g(d);
|
|
3271
3292
|
let u;
|
|
3272
|
-
return h != null && (h.data ?? (h.data = []), h.postAction != null ? u = h.postAction(h.data,
|
|
3293
|
+
return h != null && (h.data ?? (h.data = []), h.postAction != null ? u = h.postAction(h.data, d.data) : d.data != null && (d.data.id == null && (d.data.id = ((((r = h.data) == null ? void 0 : r.length) ?? 0) + 1).toString()), u = d.data, (y = h.data) == null || y.push(u))), u == null ? Promise.resolve(void 0) : new Promise((E) => {
|
|
3273
3294
|
setTimeout(() => {
|
|
3274
|
-
|
|
3295
|
+
E({
|
|
3275
3296
|
data: u
|
|
3276
3297
|
});
|
|
3277
3298
|
});
|
|
3278
3299
|
});
|
|
3279
3300
|
}
|
|
3280
|
-
function $(
|
|
3301
|
+
function $(d) {
|
|
3281
3302
|
var r, y;
|
|
3282
3303
|
if (l == null)
|
|
3283
3304
|
throw new Error("no demo data available for this api");
|
|
3284
|
-
const h = g(
|
|
3305
|
+
const h = g(d);
|
|
3285
3306
|
let u;
|
|
3286
3307
|
if (h != null) {
|
|
3287
3308
|
if (h.data ?? (h.data = []), h.patchAction != null)
|
|
3288
|
-
u = h.patchAction(h.data,
|
|
3289
|
-
else if (
|
|
3290
|
-
const
|
|
3291
|
-
|
|
3309
|
+
u = h.patchAction(h.data, d.data);
|
|
3310
|
+
else if (d.data.id != null) {
|
|
3311
|
+
const E = (r = h.data) == null ? void 0 : r.findIndex((i) => i.id == d.data.id);
|
|
3312
|
+
E != null && E > -1 && ((y = h.data) == null || y.splice(E, 1, d.data)), u = d.data;
|
|
3292
3313
|
}
|
|
3293
3314
|
}
|
|
3294
|
-
return u == null ? Promise.resolve(void 0) : new Promise((
|
|
3315
|
+
return u == null ? Promise.resolve(void 0) : new Promise((E) => {
|
|
3295
3316
|
setTimeout(() => {
|
|
3296
|
-
|
|
3317
|
+
E({
|
|
3297
3318
|
data: u
|
|
3298
3319
|
});
|
|
3299
3320
|
});
|
|
3300
3321
|
});
|
|
3301
3322
|
}
|
|
3302
3323
|
return _r = {
|
|
3303
|
-
endDemo:
|
|
3324
|
+
endDemo: s,
|
|
3304
3325
|
isDemoing: t,
|
|
3305
|
-
startDemo:
|
|
3326
|
+
startDemo: A,
|
|
3306
3327
|
data: l,
|
|
3307
|
-
deleteItem:
|
|
3328
|
+
deleteItem: x,
|
|
3308
3329
|
get: C,
|
|
3309
3330
|
getAll: T,
|
|
3310
|
-
post:
|
|
3331
|
+
post: P,
|
|
3311
3332
|
patch: $
|
|
3312
3333
|
}, _r;
|
|
3313
3334
|
}
|
|
3314
3335
|
var Un = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
3315
3336
|
function Ea(e) {
|
|
3316
3337
|
function t(l) {
|
|
3317
|
-
var
|
|
3318
|
-
const
|
|
3319
|
-
if (
|
|
3320
|
-
document.title =
|
|
3338
|
+
var s;
|
|
3339
|
+
const A = l.matched.slice().reverse().find((g) => g.meta && g.meta.title);
|
|
3340
|
+
if (A)
|
|
3341
|
+
document.title = A.meta.title;
|
|
3321
3342
|
else {
|
|
3322
3343
|
const g = Un.NODE_ENV;
|
|
3323
|
-
let
|
|
3324
|
-
g == "development" ?
|
|
3344
|
+
let x = "";
|
|
3345
|
+
g == "development" ? x = "BWeb Dev" : g == "staging" ? x = "BlitzIt Sandpit" : x = "BlitzIt Web | Cloud-Based Wholesale Logistics Platform", ((s = e == null ? void 0 : e.demo) == null ? void 0 : s.isDemoing.value) == !0 && (x = `Training: ${x}`), document.title = x;
|
|
3325
3346
|
}
|
|
3326
3347
|
}
|
|
3327
3348
|
return {
|
|
@@ -3333,153 +3354,153 @@ function Ia() {
|
|
|
3333
3354
|
return Tr;
|
|
3334
3355
|
}
|
|
3335
3356
|
function Bn(e) {
|
|
3336
|
-
function t(
|
|
3337
|
-
return
|
|
3357
|
+
function t(f, b, J) {
|
|
3358
|
+
return f ? ln(f) ? J ?? "" : e.dates.tzString(f, b) : J ?? f ?? "";
|
|
3338
3359
|
}
|
|
3339
|
-
function l(
|
|
3340
|
-
if (!
|
|
3360
|
+
function l(f) {
|
|
3361
|
+
if (!f)
|
|
3341
3362
|
return "";
|
|
3342
|
-
if (typeof
|
|
3343
|
-
return
|
|
3344
|
-
var
|
|
3345
|
-
return
|
|
3346
|
-
}
|
|
3347
|
-
function
|
|
3348
|
-
if (typeof
|
|
3349
|
-
return
|
|
3350
|
-
var
|
|
3363
|
+
if (typeof f != "object")
|
|
3364
|
+
return f;
|
|
3365
|
+
var b = "";
|
|
3366
|
+
return f.companyAccount != null && (b = f.companyAccount.companyName + " | "), f.addressLineOne != null && (b = b + f.addressLineOne + " "), f.streetNumber != null && (b = b + f.streetNumber + " "), f.streetName != null && (b = b + f.streetName + ", "), f.suburb != null && (b = b + f.suburb + " "), f.state != null && (b = b + f.state + " "), f.postcode != null && (b = b + f.postcode), b;
|
|
3367
|
+
}
|
|
3368
|
+
function A(f) {
|
|
3369
|
+
if (typeof f != "number")
|
|
3370
|
+
return f;
|
|
3371
|
+
var b = new Intl.NumberFormat("en-US", {
|
|
3351
3372
|
style: "currency",
|
|
3352
3373
|
currency: "AUD",
|
|
3353
3374
|
minimumFractionDigits: 2
|
|
3354
3375
|
});
|
|
3355
|
-
return
|
|
3376
|
+
return b.format(f);
|
|
3356
3377
|
}
|
|
3357
|
-
function f
|
|
3358
|
-
return t(
|
|
3378
|
+
function s(f, b) {
|
|
3379
|
+
return t(f, "ccc | d LLL", b);
|
|
3359
3380
|
}
|
|
3360
|
-
function g(
|
|
3361
|
-
return t(
|
|
3381
|
+
function g(f, b) {
|
|
3382
|
+
return t(f, "d LLL", b);
|
|
3362
3383
|
}
|
|
3363
|
-
function
|
|
3364
|
-
return t(
|
|
3384
|
+
function x(f, b) {
|
|
3385
|
+
return t(f, "ccc", b);
|
|
3365
3386
|
}
|
|
3366
|
-
function C(
|
|
3367
|
-
return t(
|
|
3387
|
+
function C(f, b) {
|
|
3388
|
+
return t(f, "ccc dd LLL yyyy", b);
|
|
3368
3389
|
}
|
|
3369
|
-
function T(
|
|
3370
|
-
return t(
|
|
3390
|
+
function T(f, b) {
|
|
3391
|
+
return t(f, "ccc dd LLL @ hh:mm a", b);
|
|
3371
3392
|
}
|
|
3372
|
-
function
|
|
3373
|
-
return new Intl.NumberFormat().format(
|
|
3393
|
+
function P(f) {
|
|
3394
|
+
return new Intl.NumberFormat().format(f);
|
|
3374
3395
|
}
|
|
3375
|
-
function $(
|
|
3376
|
-
return
|
|
3396
|
+
function $(f) {
|
|
3397
|
+
return f == 0 ? "" : new Intl.NumberFormat().format(f);
|
|
3377
3398
|
}
|
|
3378
|
-
function
|
|
3379
|
-
if (
|
|
3399
|
+
function d(f) {
|
|
3400
|
+
if (f == 0)
|
|
3380
3401
|
return "";
|
|
3381
|
-
var
|
|
3382
|
-
return
|
|
3402
|
+
var b = new Intl.NumberFormat().format(f);
|
|
3403
|
+
return f > 0 ? "+" + b : b;
|
|
3383
3404
|
}
|
|
3384
|
-
function h(
|
|
3385
|
-
return e.dates.utcString(
|
|
3405
|
+
function h(f, b) {
|
|
3406
|
+
return e.dates.utcString(f, b);
|
|
3386
3407
|
}
|
|
3387
|
-
function u(
|
|
3388
|
-
return tt(
|
|
3408
|
+
function u(f) {
|
|
3409
|
+
return tt(f, !1);
|
|
3389
3410
|
}
|
|
3390
|
-
function r(
|
|
3391
|
-
if (!
|
|
3411
|
+
function r(f) {
|
|
3412
|
+
if (!f)
|
|
3392
3413
|
return "";
|
|
3393
|
-
if (typeof
|
|
3394
|
-
return
|
|
3395
|
-
var
|
|
3396
|
-
return
|
|
3414
|
+
if (typeof f != "object")
|
|
3415
|
+
return f;
|
|
3416
|
+
var b = "";
|
|
3417
|
+
return f.addressLineOne != null && (b = f.addressLineOne + " "), f.streetNumber != null && (b = b + f.streetNumber + " "), f.streetName != null && (b = b + f.streetName + " "), f.suburb != null && (b = b + f.suburb + " "), f.state != null && (b = b + f.state + " "), f.postcode != null && (b = b + f.postcode), b = b.replaceAll(",", " "), b;
|
|
3397
3418
|
}
|
|
3398
|
-
function y(
|
|
3399
|
-
return t(
|
|
3419
|
+
function y(f, b) {
|
|
3420
|
+
return t(f, "ddd DD MMM YYYY", b);
|
|
3400
3421
|
}
|
|
3401
|
-
function
|
|
3402
|
-
return t(
|
|
3422
|
+
function E(f, b) {
|
|
3423
|
+
return t(f, "ccc dd LLL yyyy hh:mm a", b);
|
|
3403
3424
|
}
|
|
3404
|
-
function i(
|
|
3405
|
-
var
|
|
3425
|
+
function i(f) {
|
|
3426
|
+
var b = new Intl.NumberFormat("en-US", {
|
|
3406
3427
|
style: "percent",
|
|
3407
3428
|
minimumFractionDigits: 2
|
|
3408
3429
|
});
|
|
3409
|
-
return
|
|
3430
|
+
return b.format(f);
|
|
3410
3431
|
}
|
|
3411
|
-
function
|
|
3412
|
-
return
|
|
3432
|
+
function S(f) {
|
|
3433
|
+
return f.replaceAll(",", " ");
|
|
3413
3434
|
}
|
|
3414
|
-
function I(
|
|
3415
|
-
return t(
|
|
3435
|
+
function I(f, b) {
|
|
3436
|
+
return t(f, "dd LLL yyyy", b);
|
|
3416
3437
|
}
|
|
3417
|
-
function L(
|
|
3418
|
-
return t(
|
|
3438
|
+
function L(f, b) {
|
|
3439
|
+
return t(f, "dd LLL yyyy hh:mm a", b);
|
|
3419
3440
|
}
|
|
3420
|
-
function w(
|
|
3421
|
-
return t(
|
|
3441
|
+
function w(f, b) {
|
|
3442
|
+
return t(f, "hh:mm a", b);
|
|
3422
3443
|
}
|
|
3423
|
-
function
|
|
3424
|
-
return
|
|
3444
|
+
function _(f) {
|
|
3445
|
+
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";
|
|
3425
3446
|
}
|
|
3426
3447
|
const D = {
|
|
3427
3448
|
toCompanyNameAndLocationLine: l,
|
|
3428
|
-
toCurrency:
|
|
3429
|
-
toDayDate:
|
|
3449
|
+
toCurrency: A,
|
|
3450
|
+
toDayDate: s,
|
|
3430
3451
|
toDayMonth: g,
|
|
3431
|
-
toDayOfWeek:
|
|
3452
|
+
toDayOfWeek: x,
|
|
3432
3453
|
toDayShortDate: C,
|
|
3433
3454
|
toDayShortDateAndTime: T,
|
|
3434
|
-
toDisplayNumber:
|
|
3455
|
+
toDisplayNumber: P,
|
|
3435
3456
|
toDisplayNumberOver: $,
|
|
3436
|
-
toDisplayNumberSigned:
|
|
3457
|
+
toDisplayNumberSigned: d,
|
|
3437
3458
|
toFormat: h,
|
|
3438
3459
|
toLocationLine: u,
|
|
3439
3460
|
toLocationLineNoCommas: r,
|
|
3440
3461
|
toLongDate: y,
|
|
3441
|
-
toLongDateAndTime:
|
|
3462
|
+
toLongDateAndTime: E,
|
|
3442
3463
|
toPercent: i,
|
|
3443
|
-
toPrettyCSV:
|
|
3464
|
+
toPrettyCSV: S,
|
|
3444
3465
|
toShortDate: I,
|
|
3445
3466
|
toShortDateAndTime: L,
|
|
3446
3467
|
toTime: w,
|
|
3447
|
-
toTimeOfDay:
|
|
3468
|
+
toTimeOfDay: _
|
|
3448
3469
|
};
|
|
3449
|
-
function
|
|
3450
|
-
if (
|
|
3451
|
-
let
|
|
3452
|
-
if (
|
|
3453
|
-
return D[
|
|
3470
|
+
function N(f) {
|
|
3471
|
+
if (f != null) {
|
|
3472
|
+
let b = f;
|
|
3473
|
+
if (b != null && D[b] != null)
|
|
3474
|
+
return D[b];
|
|
3454
3475
|
}
|
|
3455
|
-
return (
|
|
3476
|
+
return (b) => b;
|
|
3456
3477
|
}
|
|
3457
3478
|
return Tr = {
|
|
3458
|
-
findFilter:
|
|
3479
|
+
findFilter: N,
|
|
3459
3480
|
...D
|
|
3460
3481
|
}, Tr;
|
|
3461
3482
|
}
|
|
3462
3483
|
function $n(e, t) {
|
|
3463
|
-
const l = Y(!1),
|
|
3464
|
-
let
|
|
3465
|
-
(t == null ? void 0 : t.useTracker) !== !1 && _e(
|
|
3466
|
-
l.value = g(C) !=
|
|
3484
|
+
const l = Y(!1), A = zt(e);
|
|
3485
|
+
let s = g(K(e));
|
|
3486
|
+
(t == null ? void 0 : t.useTracker) !== !1 && _e(A, (C) => {
|
|
3487
|
+
l.value = g(C) != s;
|
|
3467
3488
|
}, { deep: !0 });
|
|
3468
3489
|
function g(C) {
|
|
3469
3490
|
const T = Lr(C);
|
|
3470
|
-
return t != null && (t.propsToIgnore != null ? t.propsToIgnore.forEach((
|
|
3471
|
-
delete T[
|
|
3491
|
+
return t != null && (t.propsToIgnore != null ? t.propsToIgnore.forEach((P) => {
|
|
3492
|
+
delete T[P];
|
|
3472
3493
|
}) : t.propsToTrack != null && Object.keys(C).forEach(($) => {
|
|
3473
|
-
t.propsToTrack.some((
|
|
3494
|
+
t.propsToTrack.some((d) => d == $) || delete T[$];
|
|
3474
3495
|
})), JSON.stringify(T);
|
|
3475
3496
|
}
|
|
3476
|
-
function
|
|
3477
|
-
|
|
3497
|
+
function x() {
|
|
3498
|
+
s = g(K(A)), l.value = !1;
|
|
3478
3499
|
}
|
|
3479
3500
|
return {
|
|
3480
|
-
asyncItem:
|
|
3501
|
+
asyncItem: A,
|
|
3481
3502
|
isChanged: l,
|
|
3482
|
-
restartTracker:
|
|
3503
|
+
restartTracker: x
|
|
3483
3504
|
};
|
|
3484
3505
|
}
|
|
3485
3506
|
function Da(e, t) {
|
|
@@ -3487,34 +3508,34 @@ function Da(e, t) {
|
|
|
3487
3508
|
const {
|
|
3488
3509
|
// useBladeSrc = true,
|
|
3489
3510
|
useRouteSrc: l = !0
|
|
3490
|
-
} = t ?? {},
|
|
3511
|
+
} = t ?? {}, A = e.storeMode ?? (t == null ? void 0 : t.storeMode) ?? "session", s = e.storageMode ?? (t == null ? void 0 : t.storageMode) ?? "local-cache", g = e.nav ?? e.bladeName ?? "basic", x = Nr(), C = rt(), T = K(e.proxyQueryKey), P = te(() => {
|
|
3491
3512
|
var G;
|
|
3492
|
-
return
|
|
3493
|
-
}), $ = Y(void 0), { actionErrorMsg:
|
|
3513
|
+
return K(e.proxyID) ?? (T != null ? (G = C == null ? void 0 : C.query) == null ? void 0 : G[T] : void 0);
|
|
3514
|
+
}), $ = Y(void 0), { actionErrorMsg: d, actionLoadingMsg: h, deleteItem: u, getItem: r, getAllItems: y, restoreItem: E, saveItem: i } = ct({
|
|
3494
3515
|
nav: g,
|
|
3495
|
-
proxyID:
|
|
3496
|
-
store:
|
|
3497
|
-
storeMode:
|
|
3498
|
-
storageMode:
|
|
3516
|
+
proxyID: P.value,
|
|
3517
|
+
store: Le({
|
|
3518
|
+
storeMode: A,
|
|
3519
|
+
storageMode: s,
|
|
3499
3520
|
nav: g
|
|
3500
3521
|
})
|
|
3501
|
-
}),
|
|
3502
|
-
if (
|
|
3522
|
+
}), S = te(() => e.errorMsg ?? d.value), I = te(() => e.loadingMsg ?? h.value), L = te(() => I.value != null), w = Y(e.itemID ?? (l ? (ae = C == null ? void 0 : C.params) == null ? void 0 : ae.id : void 0)), _ = Y(w.value == "new" ? "new" : e.startEditing ? "edit" : "view"), D = Re(!1), N = te(() => {
|
|
3523
|
+
if (_.value == "new")
|
|
3503
3524
|
return !1;
|
|
3504
|
-
const G =
|
|
3525
|
+
const G = K($);
|
|
3505
3526
|
return e.onCanDelete != null ? e.onCanDelete(G) : (G == null ? void 0 : G.isInactive) !== !0;
|
|
3506
|
-
}),
|
|
3507
|
-
if (
|
|
3527
|
+
}), f = te(() => {
|
|
3528
|
+
if (_.value == "new")
|
|
3508
3529
|
return !1;
|
|
3509
|
-
const G =
|
|
3530
|
+
const G = K($);
|
|
3510
3531
|
return e.onCanEdit != null ? e.onCanEdit(G) : !0;
|
|
3511
|
-
}),
|
|
3512
|
-
if (
|
|
3532
|
+
}), b = te(() => {
|
|
3533
|
+
if (_.value == "new")
|
|
3513
3534
|
return !1;
|
|
3514
|
-
const G =
|
|
3535
|
+
const G = K($);
|
|
3515
3536
|
return e.onCanRestore != null ? e.onCanRestore(G) : (G == null ? void 0 : G.isInactive) === !0;
|
|
3516
|
-
}),
|
|
3517
|
-
const G =
|
|
3537
|
+
}), J = te(() => {
|
|
3538
|
+
const G = K($);
|
|
3518
3539
|
return e.onCanSave != null ? e.onCanSave(G) : !0;
|
|
3519
3540
|
}), { isChanged: Q, restartTracker: ee } = $n($, {
|
|
3520
3541
|
useTracker: e.trackChanges,
|
|
@@ -3525,7 +3546,7 @@ function Da(e, t) {
|
|
|
3525
3546
|
const {
|
|
3526
3547
|
additionalUrl: X,
|
|
3527
3548
|
onDeleteAsync: ne,
|
|
3528
|
-
onDeleteSuccessAsync: fe = () => (
|
|
3549
|
+
onDeleteSuccessAsync: fe = () => (x.back(), Promise.resolve(void 0)),
|
|
3529
3550
|
proxyID: ie
|
|
3530
3551
|
} = { ...e };
|
|
3531
3552
|
u({
|
|
@@ -3547,7 +3568,7 @@ function Da(e, t) {
|
|
|
3547
3568
|
onRestoreSuccessAsync: fe,
|
|
3548
3569
|
proxyID: ie
|
|
3549
3570
|
} = { ...e };
|
|
3550
|
-
|
|
3571
|
+
E({
|
|
3551
3572
|
additionalUrl: X,
|
|
3552
3573
|
data: G,
|
|
3553
3574
|
nav: g,
|
|
@@ -3566,7 +3587,7 @@ function Da(e, t) {
|
|
|
3566
3587
|
additionalUrl: e.additionalUrl,
|
|
3567
3588
|
id: w.value,
|
|
3568
3589
|
nav: g,
|
|
3569
|
-
proxyID:
|
|
3590
|
+
proxyID: P.value,
|
|
3570
3591
|
params: e.params,
|
|
3571
3592
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
3572
3593
|
refresh: (G == null ? void 0 : G.deepRefresh) ?? !1,
|
|
@@ -3588,7 +3609,7 @@ function Da(e, t) {
|
|
|
3588
3609
|
onCanSaveAsync: fe,
|
|
3589
3610
|
onGetSaveAsync: ie,
|
|
3590
3611
|
onSaveAsync: Ee,
|
|
3591
|
-
onSaveSuccessAsync:
|
|
3612
|
+
onSaveSuccessAsync: Be = (Me) => ((X == null ? void 0 : X.navBack) === !0 ? x.back() : (G.rowVersion != null && Me.rowVersion != null && (G.rowVersion = Me.rowVersion), ee(), _.value = "view"), Promise.resolve(void 0))
|
|
3592
3613
|
} = { ...e };
|
|
3593
3614
|
i({
|
|
3594
3615
|
additionalUrl: ne,
|
|
@@ -3597,18 +3618,18 @@ function Da(e, t) {
|
|
|
3597
3618
|
onCanSaveAsync: fe,
|
|
3598
3619
|
onGetSaveAsync: ie,
|
|
3599
3620
|
onSaveAsync: Ee,
|
|
3600
|
-
onSaveSuccessAsync:
|
|
3601
|
-
proxyID:
|
|
3621
|
+
onSaveSuccessAsync: Be,
|
|
3622
|
+
proxyID: P.value,
|
|
3602
3623
|
// ...params.getOptions(),
|
|
3603
3624
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
3604
|
-
mode:
|
|
3625
|
+
mode: _.value
|
|
3605
3626
|
});
|
|
3606
3627
|
}
|
|
3607
|
-
function
|
|
3608
|
-
const G =
|
|
3609
|
-
!G || G == "view" ?
|
|
3628
|
+
function V() {
|
|
3629
|
+
const G = K(_);
|
|
3630
|
+
!G || G == "view" ? _.value = "edit" : G == "edit" && (_.value = "view");
|
|
3610
3631
|
}
|
|
3611
|
-
return _e(
|
|
3632
|
+
return _e(S, (G) => {
|
|
3612
3633
|
D.value = G != null;
|
|
3613
3634
|
}), _e(() => e.refreshToggle, () => {
|
|
3614
3635
|
W({ deepRefresh: !0 });
|
|
@@ -3618,22 +3639,22 @@ function Da(e, t) {
|
|
|
3618
3639
|
}), {
|
|
3619
3640
|
asyncItem: $,
|
|
3620
3641
|
deleteItem: ce,
|
|
3621
|
-
errorMsg:
|
|
3642
|
+
errorMsg: S,
|
|
3622
3643
|
isChanged: Q,
|
|
3623
|
-
isDeletable:
|
|
3624
|
-
isEditing: te(() =>
|
|
3625
|
-
isEditable:
|
|
3644
|
+
isDeletable: N,
|
|
3645
|
+
isEditing: te(() => _.value == "new" || _.value == "edit"),
|
|
3646
|
+
isEditable: f,
|
|
3626
3647
|
isLoading: L,
|
|
3627
|
-
isNew: te(() =>
|
|
3628
|
-
isRestorable:
|
|
3629
|
-
isSaveable:
|
|
3648
|
+
isNew: te(() => _.value == "new"),
|
|
3649
|
+
isRestorable: b,
|
|
3650
|
+
isSaveable: J,
|
|
3630
3651
|
loadingMsg: I,
|
|
3631
|
-
mode:
|
|
3652
|
+
mode: _,
|
|
3632
3653
|
refresh: W,
|
|
3633
3654
|
restoreItem: we,
|
|
3634
3655
|
saveItem: Z,
|
|
3635
3656
|
showError: D,
|
|
3636
|
-
toggleMode:
|
|
3657
|
+
toggleMode: V
|
|
3637
3658
|
};
|
|
3638
3659
|
}
|
|
3639
3660
|
const Yr = Y(!0), Zr = Y(!1), zr = Y(), gr = Y(!1);
|
|
@@ -3653,11 +3674,11 @@ function Fn(e) {
|
|
|
3653
3674
|
displayName: h.displayName ?? e.getDisplayName(h),
|
|
3654
3675
|
...h
|
|
3655
3676
|
}));
|
|
3656
|
-
function
|
|
3677
|
+
function A(h) {
|
|
3657
3678
|
var u;
|
|
3658
3679
|
return (u = C(h)) == null ? void 0 : u.archiveName;
|
|
3659
3680
|
}
|
|
3660
|
-
function
|
|
3681
|
+
function s(h) {
|
|
3661
3682
|
var u;
|
|
3662
3683
|
return ((u = C(h)) == null ? void 0 : u.cacheExpiryHours) ?? t;
|
|
3663
3684
|
}
|
|
@@ -3665,14 +3686,14 @@ function Fn(e) {
|
|
|
3665
3686
|
var u;
|
|
3666
3687
|
return (u = C(h)) == null ? void 0 : u.displayName;
|
|
3667
3688
|
}
|
|
3668
|
-
function
|
|
3689
|
+
function x(h) {
|
|
3669
3690
|
var u;
|
|
3670
3691
|
return (u = C(h)) == null ? void 0 : u.icon;
|
|
3671
3692
|
}
|
|
3672
3693
|
function C(h) {
|
|
3673
3694
|
return h == null ? null : typeof h != "string" ? h : nt(l, (r) => r.children).find((r) => {
|
|
3674
3695
|
var y;
|
|
3675
|
-
return r.name == h || r.singleName == h || ((y = r.aliases) == null ? void 0 : y.some((
|
|
3696
|
+
return r.name == h || r.singleName == h || ((y = r.aliases) == null ? void 0 : y.some((E) => E == h));
|
|
3676
3697
|
}) ?? null;
|
|
3677
3698
|
}
|
|
3678
3699
|
function T(h) {
|
|
@@ -3680,9 +3701,9 @@ function Fn(e) {
|
|
|
3680
3701
|
if (u == null)
|
|
3681
3702
|
return;
|
|
3682
3703
|
let r = yn(u.microservice ?? "default") ?? "";
|
|
3683
|
-
return u.path != null && (r =
|
|
3704
|
+
return u.path != null && (r = Ue(r, u.path)), r != null && r.endsWith("/") && (r = r.slice(0, r.length - 1)), r;
|
|
3684
3705
|
}
|
|
3685
|
-
function
|
|
3706
|
+
function P(h) {
|
|
3686
3707
|
const u = C(h);
|
|
3687
3708
|
if ((u == null ? void 0 : u.singleName) != null)
|
|
3688
3709
|
return u.singleName;
|
|
@@ -3694,7 +3715,7 @@ function Fn(e) {
|
|
|
3694
3715
|
const u = C(h);
|
|
3695
3716
|
return (u == null ? void 0 : u.name) ?? (u == null ? void 0 : u.singleName);
|
|
3696
3717
|
}
|
|
3697
|
-
function
|
|
3718
|
+
function d(h) {
|
|
3698
3719
|
if (h == null)
|
|
3699
3720
|
return;
|
|
3700
3721
|
const u = typeof h == "string" ? C(h) : h;
|
|
@@ -3708,143 +3729,143 @@ function Fn(e) {
|
|
|
3708
3729
|
backgroundName: zr,
|
|
3709
3730
|
hesitate: gr,
|
|
3710
3731
|
navigationItems: l,
|
|
3711
|
-
findArchiveName:
|
|
3712
|
-
findCacheHours:
|
|
3732
|
+
findArchiveName: A,
|
|
3733
|
+
findCacheHours: s,
|
|
3713
3734
|
findDisplay: g,
|
|
3714
|
-
findIcon:
|
|
3735
|
+
findIcon: x,
|
|
3715
3736
|
findItem: C,
|
|
3716
3737
|
findStoreName: $,
|
|
3717
3738
|
findPath: T,
|
|
3718
|
-
findSingleDisplay:
|
|
3719
|
-
updateNavigationProperties:
|
|
3739
|
+
findSingleDisplay: P,
|
|
3740
|
+
updateNavigationProperties: d
|
|
3720
3741
|
}, Mr;
|
|
3721
3742
|
}
|
|
3722
3743
|
function xa(e, t, l) {
|
|
3723
|
-
var
|
|
3724
|
-
const
|
|
3744
|
+
var qe, Ve;
|
|
3745
|
+
const A = Nn(), s = it(), g = Nr(), x = rt(), { bladeData: C } = Cn({}), T = e.useBladeSrc ?? !0, P = e.useRouteSrc ?? !0, $ = e.nav ?? e.bladeName ?? e.itemBladeName ?? "basic", d = e.storeMode ?? ((qe = s.findItem($)) == null ? void 0 : qe.storeMode) ?? "session", h = e.storageMode ?? ((Ve = s.findItem($)) == null ? void 0 : Ve.storageMode) ?? "local-cache", u = K(e.customFilters) ?? [], r = Y([]), y = te(() => Qt([
|
|
3725
3746
|
...u.filter((U) => U.name != null).map((U) => U.name),
|
|
3726
3747
|
...e.defaultFilters ?? [],
|
|
3727
3748
|
...r.value
|
|
3728
|
-
]).value),
|
|
3729
|
-
let i = Y([...
|
|
3730
|
-
const
|
|
3749
|
+
]).value), E = Y((e.defaultFilters ?? []).map((U) => y.value.indexOf(U)));
|
|
3750
|
+
let i = Y([...E.value]);
|
|
3751
|
+
const S = te(() => Wr(i, E).value.length > 0 || Wr(E, i).value.length > 0), I = Y(L());
|
|
3731
3752
|
function L() {
|
|
3732
|
-
var U,
|
|
3753
|
+
var U, j;
|
|
3733
3754
|
if (T) {
|
|
3734
|
-
const
|
|
3735
|
-
if (
|
|
3736
|
-
return Number.parseInt(
|
|
3755
|
+
const H = (U = C.value) == null ? void 0 : U.page;
|
|
3756
|
+
if (H != null)
|
|
3757
|
+
return Number.parseInt(H);
|
|
3737
3758
|
}
|
|
3738
|
-
if (
|
|
3739
|
-
const
|
|
3740
|
-
if (
|
|
3741
|
-
return Number.parseInt(typeof
|
|
3759
|
+
if (P) {
|
|
3760
|
+
const H = (j = x == null ? void 0 : x.query) == null ? void 0 : j.page;
|
|
3761
|
+
if (H != null)
|
|
3762
|
+
return Number.parseInt(typeof H == "string" ? H : H.toString());
|
|
3742
3763
|
}
|
|
3743
3764
|
return 1;
|
|
3744
3765
|
}
|
|
3745
3766
|
const w = te(() => {
|
|
3746
|
-
var U,
|
|
3767
|
+
var U, j;
|
|
3747
3768
|
if (T) {
|
|
3748
|
-
const
|
|
3749
|
-
if (
|
|
3750
|
-
return
|
|
3769
|
+
const H = (U = C.value) == null ? void 0 : U.proxyID;
|
|
3770
|
+
if (H != null)
|
|
3771
|
+
return H;
|
|
3751
3772
|
}
|
|
3752
|
-
if (
|
|
3753
|
-
const
|
|
3754
|
-
if (
|
|
3755
|
-
return
|
|
3773
|
+
if (P) {
|
|
3774
|
+
const H = (j = x == null ? void 0 : x.query) == null ? void 0 : j.query;
|
|
3775
|
+
if (H != null)
|
|
3776
|
+
return H;
|
|
3756
3777
|
}
|
|
3757
3778
|
return e.proxyID;
|
|
3758
|
-
}),
|
|
3779
|
+
}), _ = Y(D());
|
|
3759
3780
|
function D() {
|
|
3760
|
-
var U,
|
|
3781
|
+
var U, j;
|
|
3761
3782
|
if (T) {
|
|
3762
|
-
const
|
|
3763
|
-
if (
|
|
3764
|
-
return
|
|
3783
|
+
const H = (U = C.value) == null ? void 0 : U.search;
|
|
3784
|
+
if (H != null)
|
|
3785
|
+
return H;
|
|
3765
3786
|
}
|
|
3766
|
-
if (
|
|
3767
|
-
const
|
|
3768
|
-
if (
|
|
3769
|
-
return
|
|
3787
|
+
if (P) {
|
|
3788
|
+
const H = (j = x == null ? void 0 : x.query) == null ? void 0 : j.search;
|
|
3789
|
+
if (H != null)
|
|
3790
|
+
return H;
|
|
3770
3791
|
}
|
|
3771
3792
|
}
|
|
3772
|
-
const
|
|
3793
|
+
const N = Y(K(e.startShowingInactive) ?? !1), f = te(() => [
|
|
3773
3794
|
...e.searchProps ?? [],
|
|
3774
3795
|
...(e.headers ?? []).filter((U) => U.searchable != null && U.value != null).map((U) => U.value ?? "")
|
|
3775
|
-
]),
|
|
3796
|
+
]), b = Y([]), J = Re([]), Q = Y([]);
|
|
3776
3797
|
let ee;
|
|
3777
|
-
const { actionErrorMsg: ce, actionLoadingMsg: we, deleteItem: W, doAction: Z, getItem:
|
|
3798
|
+
const { actionErrorMsg: ce, actionLoadingMsg: we, deleteItem: W, doAction: Z, getItem: V, getAllItems: ae, restoreItem: G } = ct({
|
|
3778
3799
|
nav: $,
|
|
3779
3800
|
proxyID: w.value,
|
|
3780
|
-
store:
|
|
3781
|
-
storeMode:
|
|
3801
|
+
store: Le({
|
|
3802
|
+
storeMode: d,
|
|
3782
3803
|
storageMode: h,
|
|
3783
3804
|
nav: $
|
|
3784
3805
|
})
|
|
3785
|
-
}), X = te(() => e.errorMsg ?? ce.value), ne = te(() => e.loadingMsg ?? we.value), fe = te(() => ne.value != null), ie =
|
|
3786
|
-
let U,
|
|
3787
|
-
|
|
3806
|
+
}), X = te(() => e.errorMsg ?? ce.value), ne = te(() => e.loadingMsg ?? we.value), fe = te(() => ne.value != null), ie = Re(!1), Ee = Re(e.showSearch ?? !0), Be = Y(0), Me = te(() => {
|
|
3807
|
+
let U, j = [];
|
|
3808
|
+
E.value.forEach((O) => {
|
|
3788
3809
|
const oe = y.value[O], ve = u.find((De) => De.name == oe);
|
|
3789
|
-
ve != null ? U = U != null ? `${U}ANDALSO${ve.filterFunction()}` : ve.filterFunction() :
|
|
3810
|
+
ve != null ? U = U != null ? `${U}ANDALSO${ve.filterFunction()}` : ve.filterFunction() : j.push(oe);
|
|
3790
3811
|
});
|
|
3791
|
-
const
|
|
3792
|
-
return Te(
|
|
3812
|
+
const H = {};
|
|
3813
|
+
return Te(j) && (H.filterBy = j.toString()), U != null && (H.query = U), H;
|
|
3793
3814
|
}), rr = te(() => {
|
|
3794
|
-
var
|
|
3815
|
+
var j;
|
|
3795
3816
|
let U = e.params != null ? { ...e.params } : {};
|
|
3796
|
-
return e.useServerPagination && e.itemsPerPage != null && (U.includeCount = !0, U.takeAmount = e.itemsPerPage, U.takeFrom = (I.value - 1) * e.itemsPerPage),
|
|
3797
|
-
}), tr = te(() => (U) => e.onCanDelete != null ? e.onCanDelete(U) : !(U != null && U.isInactive === !0)), nr = te(() => (U) =>
|
|
3817
|
+
return e.useServerPagination && e.itemsPerPage != null && (U.includeCount = !0, U.takeAmount = e.itemsPerPage, U.takeFrom = (I.value - 1) * e.itemsPerPage), Me.value != null && (U = { ...U, ...Me.value }), N.value && (U.includeInactive = !0), Te(e.selectProps) && (U.properties = (j = e.selectProps) == null ? void 0 : j.toString()), _.value != null && (U.searchString = _.value), U;
|
|
3818
|
+
}), tr = te(() => (U) => e.onCanDelete != null ? e.onCanDelete(U) : !(U != null && U.isInactive === !0)), nr = te(() => (U) => N.value ? e.onCanRestore != null ? e.onCanRestore(U) : (U == null ? void 0 : U.isInactive) === !0 : !1), Ce = te(() => Q.value.filter((U) => !U.hide)), ar = te(() => {
|
|
3798
3819
|
let U = new Array();
|
|
3799
|
-
return
|
|
3800
|
-
let O = U.find((oe) => oe.position ==
|
|
3801
|
-
O == null ? U.push({ position:
|
|
3802
|
-
}), U.sort(
|
|
3820
|
+
return Ce.value.filter((H) => H.sublevel != null).forEach((H) => {
|
|
3821
|
+
let O = U.find((oe) => oe.position == H.sublevel);
|
|
3822
|
+
O == null ? U.push({ position: H.sublevel ?? 0, values: [H] }) : O.values.push(H);
|
|
3823
|
+
}), U.sort(Ge.firstBy((H) => H.position));
|
|
3803
3824
|
}), lr = te(() => {
|
|
3804
3825
|
let U = new Array();
|
|
3805
|
-
return
|
|
3806
|
-
let O = U.find((oe) => oe.position ==
|
|
3807
|
-
O == null ? U.push({ position:
|
|
3808
|
-
}), U.sort(
|
|
3809
|
-
}), ur = te(() =>
|
|
3826
|
+
return Ce.value.filter((H) => H.level != null).forEach((H) => {
|
|
3827
|
+
let O = U.find((oe) => oe.position == H.level);
|
|
3828
|
+
O == null ? U.push({ position: H.level ?? 0, values: [H] }) : O.values.push(H);
|
|
3829
|
+
}), U.sort(Ge.firstBy((H) => H.position));
|
|
3830
|
+
}), ur = te(() => Ce.value.filter((U) => U.nav != null && U.itemText != null || U.textFilter != null || U.display != null || U.bool != null));
|
|
3810
3831
|
function be(U) {
|
|
3811
3832
|
if (e.itemBladeName != null) {
|
|
3812
|
-
let
|
|
3833
|
+
let j = {
|
|
3813
3834
|
bladeName: e.itemBladeName,
|
|
3814
3835
|
id: "new",
|
|
3815
3836
|
nav: $
|
|
3816
3837
|
};
|
|
3817
3838
|
U == "page" && g.push({
|
|
3818
|
-
name:
|
|
3839
|
+
name: j.bladeName,
|
|
3819
3840
|
params: { id: "new" }
|
|
3820
3841
|
});
|
|
3821
3842
|
}
|
|
3822
3843
|
}
|
|
3823
3844
|
function cr(U) {
|
|
3824
3845
|
const {
|
|
3825
|
-
additionalUrl:
|
|
3826
|
-
onDeleteAsync:
|
|
3827
|
-
} = { ...e }, O =
|
|
3846
|
+
additionalUrl: j,
|
|
3847
|
+
onDeleteAsync: H
|
|
3848
|
+
} = { ...e }, O = K(U), oe = O.id, ve = (De) => {
|
|
3828
3849
|
if (De != null) {
|
|
3829
|
-
let Se =
|
|
3830
|
-
if (Se > -1 &&
|
|
3831
|
-
let se = e.items.findIndex((
|
|
3850
|
+
let Se = b.value.findIndex((se) => se.id == De);
|
|
3851
|
+
if (Se > -1 && b.value.splice(Se, 1), e.items != null) {
|
|
3852
|
+
let se = e.items.findIndex((Ne) => Ne.id == De);
|
|
3832
3853
|
se > -1 && e.items.splice(se, 1);
|
|
3833
3854
|
}
|
|
3834
3855
|
} else {
|
|
3835
|
-
let Se =
|
|
3836
|
-
if (Se == -1 && (Se =
|
|
3837
|
-
let se = e.items.findIndex((
|
|
3838
|
-
se == -1 && (se = e.items.findIndex((
|
|
3856
|
+
let Se = b.value.findIndex((se) => se === O);
|
|
3857
|
+
if (Se == -1 && (Se = b.value.findIndex((se) => se == O)), Se > -1 && b.value.splice(Se, 1), e.items != null) {
|
|
3858
|
+
let se = e.items.findIndex((Ne) => Ne === O);
|
|
3859
|
+
se == -1 && (se = e.items.findIndex((Ne) => Ne == O)), se > -1 && e.items.splice(se, 1);
|
|
3839
3860
|
}
|
|
3840
3861
|
}
|
|
3841
3862
|
};
|
|
3842
3863
|
e.localOnly == !0 || $ == null ? ve(oe) : W({
|
|
3843
|
-
additionalUrl:
|
|
3864
|
+
additionalUrl: j,
|
|
3844
3865
|
data: O,
|
|
3845
3866
|
nav: $,
|
|
3846
3867
|
onCanDeleteAsync: e.onCanDeleteAsync,
|
|
3847
|
-
onDeleteAsync:
|
|
3868
|
+
onDeleteAsync: H,
|
|
3848
3869
|
onDeleteSuccessAsync: async () => (ve(oe), e.onDeleteSuccessAsync != null ? e.onDeleteSuccessAsync(O) : Promise.resolve(void 0)),
|
|
3849
3870
|
proxyID: w.value,
|
|
3850
3871
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
@@ -3853,7 +3874,7 @@ function xa(e, t, l) {
|
|
|
3853
3874
|
}
|
|
3854
3875
|
function ze(U) {
|
|
3855
3876
|
G({
|
|
3856
|
-
data:
|
|
3877
|
+
data: K(U),
|
|
3857
3878
|
additionalUrl: e.additionalUrl,
|
|
3858
3879
|
nav: $,
|
|
3859
3880
|
onCanRestoreAsync: e.onCanRestoreAsync,
|
|
@@ -3863,29 +3884,29 @@ function xa(e, t, l) {
|
|
|
3863
3884
|
// ...(useBladeSrc ? bladeData.value : {})
|
|
3864
3885
|
});
|
|
3865
3886
|
}
|
|
3866
|
-
function
|
|
3887
|
+
function $e() {
|
|
3867
3888
|
Z(() => {
|
|
3868
|
-
|
|
3889
|
+
A.exportToCSV(Ce.value, J.value);
|
|
3869
3890
|
}, { loadingMsg: "Exporting to CSV" });
|
|
3870
3891
|
}
|
|
3871
|
-
function
|
|
3872
|
-
let U =
|
|
3873
|
-
if (U = e.onFilter ? e.onFilter(U) : U,
|
|
3874
|
-
let
|
|
3875
|
-
e.itemText &&
|
|
3892
|
+
function Pe() {
|
|
3893
|
+
let U = K(b);
|
|
3894
|
+
if (U = e.onFilter ? e.onFilter(U) : U, _.value != null && _.value.length > 0) {
|
|
3895
|
+
let j = [...f.value];
|
|
3896
|
+
e.itemText && j.push(e.itemText), Te(j) && (U = U.filter((H) => hn(H, _.value, j)));
|
|
3876
3897
|
}
|
|
3877
|
-
|
|
3898
|
+
J.value = U;
|
|
3878
3899
|
}
|
|
3879
|
-
function
|
|
3900
|
+
function We() {
|
|
3880
3901
|
const U = (l == null ? void 0 : l.hideActions) ?? e.hideActions;
|
|
3881
3902
|
e.headers != null && (Q.value = [...e.headers], U || Q.value.push({ title: "Actions", value: "itemActions", align: "end" }));
|
|
3882
3903
|
}
|
|
3883
3904
|
async function Ie(U) {
|
|
3884
|
-
if (ie.value = !1, (U == null ? void 0 : U.resetSearch) === !0 && (Ee.value = e.showSearch ?? !1,
|
|
3885
|
-
|
|
3905
|
+
if (ie.value = !1, (U == null ? void 0 : U.resetSearch) === !0 && (Ee.value = e.showSearch ?? !1, _.value = void 0), e.items != null) {
|
|
3906
|
+
b.value = e.onGetSuccessAsync != null ? await e.onGetSuccessAsync(e.items) : e.items;
|
|
3886
3907
|
return;
|
|
3887
3908
|
}
|
|
3888
|
-
const
|
|
3909
|
+
const j = {
|
|
3889
3910
|
additionalUrl: e.additionalUrl,
|
|
3890
3911
|
id: e.itemID,
|
|
3891
3912
|
nav: $,
|
|
@@ -3900,63 +3921,63 @@ function xa(e, t, l) {
|
|
|
3900
3921
|
onGetSuccessAsync: e.onGetSuccessAsync
|
|
3901
3922
|
};
|
|
3902
3923
|
if (e.isSingle === !0)
|
|
3903
|
-
|
|
3924
|
+
j.id === "new" ? b.value = [] : b.value = await V(j);
|
|
3904
3925
|
else {
|
|
3905
|
-
let
|
|
3906
|
-
...
|
|
3926
|
+
let H = await ae({
|
|
3927
|
+
...j,
|
|
3907
3928
|
onGetSuccessAsync: async (O, oe) => {
|
|
3908
3929
|
let ve = O == null ? void 0 : O.data;
|
|
3909
|
-
return r.value = (O == null ? void 0 : O.filters) ?? [], e.useServerPagination === !0 && e.itemsPerPage && O.count && (
|
|
3930
|
+
return r.value = (O == null ? void 0 : O.filters) ?? [], e.useServerPagination === !0 && e.itemsPerPage && O.count && (Be.value = Math.ceil(O.count / e.itemsPerPage)), e.onGetSuccessAsync != null && (ve = await e.onGetSuccessAsync(ve, oe)), ve;
|
|
3910
3931
|
}
|
|
3911
3932
|
});
|
|
3912
|
-
|
|
3933
|
+
b.value = H;
|
|
3913
3934
|
}
|
|
3914
|
-
|
|
3935
|
+
Pe();
|
|
3915
3936
|
}
|
|
3916
|
-
function Je(U,
|
|
3917
|
-
const
|
|
3918
|
-
if (
|
|
3937
|
+
function Je(U, j) {
|
|
3938
|
+
const H = K(U);
|
|
3939
|
+
if (H != null && H === ee && e.canUnselect ? ee = null : ee = H, t != null && t("select", ee), !(!e.canSelect || e.onCanSelectItem != null && !e.onCanSelectItem(H)))
|
|
3919
3940
|
if (e.onSelectItem != null)
|
|
3920
3941
|
e.onSelectItem(ee);
|
|
3921
3942
|
else {
|
|
3922
3943
|
let O = {
|
|
3923
3944
|
bladeName: e.itemBladeName,
|
|
3924
|
-
id:
|
|
3945
|
+
id: H.id,
|
|
3925
3946
|
nav: $
|
|
3926
3947
|
};
|
|
3927
|
-
|
|
3948
|
+
j == "page" && g.push({
|
|
3928
3949
|
name: O.bladeName,
|
|
3929
3950
|
params: { id: O.id }
|
|
3930
3951
|
});
|
|
3931
3952
|
}
|
|
3932
3953
|
}
|
|
3933
3954
|
function je() {
|
|
3934
|
-
Ee.value ? (Ee.value = e.showSearch ?? !1,
|
|
3955
|
+
Ee.value ? (Ee.value = e.showSearch ?? !1, _.value = void 0, Ie()) : Ee.value = e.showSearch ?? !0;
|
|
3935
3956
|
}
|
|
3936
|
-
return
|
|
3937
|
-
|
|
3938
|
-
}, { debounce: 500, maxWait: 500 }), _e([
|
|
3957
|
+
return We(), Xt([_], () => {
|
|
3958
|
+
Pe();
|
|
3959
|
+
}, { debounce: 500, maxWait: 500 }), _e([N, I], async () => {
|
|
3939
3960
|
await Ie();
|
|
3940
|
-
}), _e([X, () => e.errorMsg], ([U,
|
|
3941
|
-
ie.value = U != null ||
|
|
3961
|
+
}), _e([X, () => e.errorMsg], ([U, j]) => {
|
|
3962
|
+
ie.value = U != null || j != null;
|
|
3942
3963
|
}), _e(() => e.refreshToggle, () => {
|
|
3943
3964
|
Ie({ deepRefresh: !0 });
|
|
3944
|
-
}), pr([
|
|
3945
|
-
|
|
3965
|
+
}), pr([b, () => e.items], () => {
|
|
3966
|
+
Pe();
|
|
3946
3967
|
}), Or(async () => {
|
|
3947
3968
|
var U;
|
|
3948
|
-
e.eager == !0 && await Ie({ deepRefresh: ((U =
|
|
3969
|
+
e.eager == !0 && await Ie({ deepRefresh: ((U = x == null ? void 0 : x.params) == null ? void 0 : U.refresh) == "true" });
|
|
3949
3970
|
}), {
|
|
3950
3971
|
add: be,
|
|
3951
|
-
asyncItems:
|
|
3972
|
+
asyncItems: b,
|
|
3952
3973
|
currentPage: I,
|
|
3953
3974
|
deleteItem: cr,
|
|
3954
3975
|
displayHeaders: ur,
|
|
3955
3976
|
errorMsg: X,
|
|
3956
|
-
exportToCSV:
|
|
3957
|
-
filteredItems:
|
|
3977
|
+
exportToCSV: $e,
|
|
3978
|
+
filteredItems: J,
|
|
3958
3979
|
filters: y,
|
|
3959
|
-
filtersChanged:
|
|
3980
|
+
filtersChanged: S,
|
|
3960
3981
|
headerOptions: Q,
|
|
3961
3982
|
isDeletable: tr,
|
|
3962
3983
|
isLoading: fe,
|
|
@@ -3964,59 +3985,59 @@ function xa(e, t, l) {
|
|
|
3964
3985
|
loadingMsg: ne,
|
|
3965
3986
|
refresh: Ie,
|
|
3966
3987
|
restoreItem: ze,
|
|
3967
|
-
searchString:
|
|
3968
|
-
selectedFilters:
|
|
3988
|
+
searchString: _,
|
|
3989
|
+
selectedFilters: E,
|
|
3969
3990
|
selectItem: Je,
|
|
3970
3991
|
// serverFilters,
|
|
3971
3992
|
showError: ie,
|
|
3972
|
-
showInactive:
|
|
3993
|
+
showInactive: N,
|
|
3973
3994
|
showSearch: Ee,
|
|
3974
3995
|
subtitleOptions: ar,
|
|
3975
|
-
tableHeaders:
|
|
3996
|
+
tableHeaders: Ce,
|
|
3976
3997
|
titleOptions: lr,
|
|
3977
3998
|
toggleSearch: je,
|
|
3978
|
-
totalPages:
|
|
3999
|
+
totalPages: Be
|
|
3979
4000
|
};
|
|
3980
4001
|
}
|
|
3981
|
-
let
|
|
4002
|
+
let ke;
|
|
3982
4003
|
function kn(e) {
|
|
3983
4004
|
const t = Y((e == null ? void 0 : e.default) ?? "Admin"), l = Y((e == null ? void 0 : e.groups) ?? []);
|
|
3984
|
-
return
|
|
4005
|
+
return ke = {
|
|
3985
4006
|
currentGroup: t,
|
|
3986
4007
|
groupOptions: l,
|
|
3987
4008
|
useRoutes: e == null ? void 0 : e.useRoutes
|
|
3988
|
-
},
|
|
4009
|
+
}, ke;
|
|
3989
4010
|
}
|
|
3990
4011
|
function _a() {
|
|
3991
4012
|
const e = Nr(), t = it(), l = Dn();
|
|
3992
4013
|
return {
|
|
3993
|
-
...
|
|
4014
|
+
...ke,
|
|
3994
4015
|
sidebarNavItems: te(() => {
|
|
3995
4016
|
var g;
|
|
3996
|
-
let
|
|
3997
|
-
const
|
|
3998
|
-
return
|
|
3999
|
-
var
|
|
4000
|
-
const C =
|
|
4001
|
-
let $ =
|
|
4017
|
+
let A = e.getRoutes().filter((x) => x.meta != null && x.meta.menuGroup != null);
|
|
4018
|
+
const s = [];
|
|
4019
|
+
return A.forEach((x) => {
|
|
4020
|
+
var d;
|
|
4021
|
+
const C = ke.groupOptions.value.find((h) => h.displayName == x.meta.menuGroup), T = t.findItem(x.meta.nav), P = x.meta;
|
|
4022
|
+
let $ = s.find((h) => h.displayName == P.menuGroup);
|
|
4002
4023
|
$ == null && ($ = {
|
|
4003
|
-
displayName:
|
|
4004
|
-
icon: (C == null ? void 0 : C.icon) ?? (
|
|
4024
|
+
displayName: P.menuGroup,
|
|
4025
|
+
icon: (C == null ? void 0 : C.icon) ?? (P == null ? void 0 : P.icon) ?? (T == null ? void 0 : T.icon),
|
|
4005
4026
|
isGroup: !0,
|
|
4006
4027
|
items: []
|
|
4007
|
-
},
|
|
4008
|
-
displayName: (
|
|
4009
|
-
icon: (
|
|
4010
|
-
permissions: (
|
|
4011
|
-
requiresAuth: (
|
|
4012
|
-
subscriptions: (
|
|
4013
|
-
subFilters: (
|
|
4014
|
-
routeName:
|
|
4028
|
+
}, s.push($)), (d = $.items) == null || d.push({
|
|
4029
|
+
displayName: (P == null ? void 0 : P.displayName) ?? t.findDisplay(T ?? void 0),
|
|
4030
|
+
icon: (P == null ? void 0 : P.icon) ?? t.findIcon(T ?? void 0),
|
|
4031
|
+
permissions: (P == null ? void 0 : P.permissions) ?? (T == null ? void 0 : T.permissions) ?? [],
|
|
4032
|
+
requiresAuth: (P == null ? void 0 : P.requiresAuth) !== !1,
|
|
4033
|
+
subscriptions: (P == null ? void 0 : P.subscriptions) ?? (T == null ? void 0 : T.subscriptions) ?? [],
|
|
4034
|
+
subFilters: (P == null ? void 0 : P.subFilters) ?? (T == null ? void 0 : T.subFilters) ?? [],
|
|
4035
|
+
routeName: x.name
|
|
4015
4036
|
});
|
|
4016
|
-
}),
|
|
4037
|
+
}), s.forEach((x) => {
|
|
4017
4038
|
var C;
|
|
4018
|
-
|
|
4019
|
-
}),
|
|
4039
|
+
x.items = (C = x.items) == null ? void 0 : C.filter((T) => !T.requiresAuth || l.doShow(T.subscriptions, T.permissions, "view")).sort(Ge.firstBy((T) => T.displayName));
|
|
4040
|
+
}), ke.currentGroup.value != null ? ((g = s.find((x) => x.displayName == ke.currentGroup.value)) == null ? void 0 : g.items) ?? [] : s.filter((x) => !x.requiresAuth || l.doShow(x.subscriptions, x.permissions, "view"));
|
|
4020
4041
|
})
|
|
4021
4042
|
};
|
|
4022
4043
|
}
|
|
@@ -4028,8 +4049,8 @@ function Gn(e) {
|
|
|
4028
4049
|
function t(l) {
|
|
4029
4050
|
if (!l)
|
|
4030
4051
|
return {};
|
|
4031
|
-
let
|
|
4032
|
-
return e.presets[
|
|
4052
|
+
let A = l;
|
|
4053
|
+
return e.presets[A] ?? {};
|
|
4033
4054
|
}
|
|
4034
4055
|
return Cr = {
|
|
4035
4056
|
usePresets: t
|
|
@@ -4042,32 +4063,32 @@ function Ma() {
|
|
|
4042
4063
|
return Pr;
|
|
4043
4064
|
}
|
|
4044
4065
|
function Wn() {
|
|
4045
|
-
function e(
|
|
4046
|
-
pe.value =
|
|
4066
|
+
function e(x) {
|
|
4067
|
+
pe.value = x.detail, br.value = !0;
|
|
4047
4068
|
}
|
|
4048
4069
|
function t() {
|
|
4049
4070
|
Qr || (Qr = !0, window.location.reload());
|
|
4050
4071
|
}
|
|
4051
4072
|
function l() {
|
|
4052
|
-
var
|
|
4053
|
-
(
|
|
4073
|
+
var x;
|
|
4074
|
+
(x = Xr.value) == null || x.prompt(), wr.value = !1;
|
|
4054
4075
|
}
|
|
4055
|
-
function
|
|
4076
|
+
function A() {
|
|
4056
4077
|
return !!window.matchMedia("(display-mode: standalone)").matches;
|
|
4057
4078
|
}
|
|
4058
|
-
function
|
|
4059
|
-
|
|
4079
|
+
function s(x) {
|
|
4080
|
+
x.preventDefault(), wr.value = !0, Xr.value = x;
|
|
4060
4081
|
}
|
|
4061
4082
|
function g() {
|
|
4062
4083
|
br.value = !1, !(!pe.value || !pe.value.waiting) && pe.value.waiting.postMessage({ type: "SKIP_WAITING" });
|
|
4063
4084
|
}
|
|
4064
4085
|
return Ot(() => {
|
|
4065
|
-
Jr == null && (Jr = document.addEventListener("swUpdated", e, { once: !0 })), jr == null && (jr = navigator.serviceWorker.addEventListener("controllerchange", t)), Kr == null && (Kr = window.addEventListener("beforeinstallprompt",
|
|
4086
|
+
Jr == null && (Jr = document.addEventListener("swUpdated", e, { once: !0 })), jr == null && (jr = navigator.serviceWorker.addEventListener("controllerchange", t)), Kr == null && (Kr = window.addEventListener("beforeinstallprompt", s));
|
|
4066
4087
|
}), Pr = {
|
|
4067
4088
|
canInstallApp: wr,
|
|
4068
4089
|
canUpdateApp: br,
|
|
4069
4090
|
installApp: l,
|
|
4070
|
-
isInstalled:
|
|
4091
|
+
isInstalled: A,
|
|
4071
4092
|
updateApp: g
|
|
4072
4093
|
}, Pr;
|
|
4073
4094
|
}
|
|
@@ -4080,13 +4101,13 @@ function Pa(e) {
|
|
|
4080
4101
|
install(t, l) {
|
|
4081
4102
|
var T;
|
|
4082
4103
|
console.log(t), e.vuetifyInstance ?? (e.vuetifyInstance = l.vuetifyInstance), Pn(e);
|
|
4083
|
-
const
|
|
4084
|
-
Gn(e), (T = e.auth).demo ?? (T.demo =
|
|
4104
|
+
const A = Rn(), s = Fn(e);
|
|
4105
|
+
Gn(e), (T = e.auth).demo ?? (T.demo = A), e.auth.getAuthItem = s.findItem;
|
|
4085
4106
|
const g = xn(e.auth);
|
|
4086
4107
|
kn(e.menu);
|
|
4087
|
-
const
|
|
4108
|
+
const x = In({
|
|
4088
4109
|
auth: g,
|
|
4089
|
-
findPath:
|
|
4110
|
+
findPath: s.findPath,
|
|
4090
4111
|
useBearerToken: !0
|
|
4091
4112
|
}), C = Ln({
|
|
4092
4113
|
getTimeZone: () => g.timeZone.value
|
|
@@ -4094,9 +4115,9 @@ function Pa(e) {
|
|
|
4094
4115
|
Bn({
|
|
4095
4116
|
dates: C
|
|
4096
4117
|
}), Wn(), bn({
|
|
4097
|
-
api:
|
|
4118
|
+
api: x,
|
|
4098
4119
|
auth: g,
|
|
4099
|
-
navigation:
|
|
4120
|
+
navigation: s
|
|
4100
4121
|
}), wn(e.urls);
|
|
4101
4122
|
}
|
|
4102
4123
|
};
|
|
@@ -4104,7 +4125,7 @@ function Pa(e) {
|
|
|
4104
4125
|
export {
|
|
4105
4126
|
oa as DataURIToBlob,
|
|
4106
4127
|
la as addWeekday,
|
|
4107
|
-
|
|
4128
|
+
Ue as appendUrl,
|
|
4108
4129
|
an as capitalizeWords,
|
|
4109
4130
|
pn as checkImage,
|
|
4110
4131
|
sn as containsSearch,
|
|
@@ -4125,7 +4146,7 @@ export {
|
|
|
4125
4146
|
En as createSessionStoreDefinition,
|
|
4126
4147
|
bn as createStoreBuilder,
|
|
4127
4148
|
wn as createUrl,
|
|
4128
|
-
|
|
4149
|
+
Vr as createWholeLastUpdateStoreDefinition,
|
|
4129
4150
|
cn as csvContains,
|
|
4130
4151
|
ba as csvDefaults,
|
|
4131
4152
|
nt as deepSelect,
|
|
@@ -4182,11 +4203,11 @@ export {
|
|
|
4182
4203
|
Mn as useResizable,
|
|
4183
4204
|
Ca as useRules,
|
|
4184
4205
|
ga as useStore,
|
|
4185
|
-
|
|
4206
|
+
Le as useStoreDefinition,
|
|
4186
4207
|
$n as useTracker,
|
|
4187
4208
|
ma as useUrls,
|
|
4188
4209
|
mn as validEmail,
|
|
4189
|
-
|
|
4210
|
+
Ze as weekdayPairs,
|
|
4190
4211
|
na as weekdayShortName,
|
|
4191
4212
|
ta as weekdayValue
|
|
4192
4213
|
};
|