bt-core-app 1.4.69 → 1.4.70
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 +824 -818
- package/dist/index.d.ts +0 -3
- package/package.json +1 -1
package/dist/bt-core-app.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { ref as z, shallowRef as Re, computed as te, toValue as K, watch as
|
|
2
|
-
import { watchArray as
|
|
3
|
-
import { defineStore as
|
|
1
|
+
import { ref as z, shallowRef as Re, computed as te, toValue as K, watch as _e, toRef as Zt, onMounted as Or } from "vue";
|
|
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
|
+
import { defineStore as et } from "pinia";
|
|
4
4
|
import { DateTime as de } from "luxon";
|
|
5
|
-
import { useRouter as Mr, useRoute as
|
|
6
|
-
function Ot(e) {
|
|
7
|
-
return (e || "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx").replace(/[xy]/g, pt);
|
|
8
|
-
}
|
|
5
|
+
import { useRouter as Mr, useRoute as rt } from "vue-router";
|
|
9
6
|
function pt(e) {
|
|
7
|
+
return (e || "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx").replace(/[xy]/g, en);
|
|
8
|
+
}
|
|
9
|
+
function en(e) {
|
|
10
10
|
const t = Math.random() * 16 | 0;
|
|
11
11
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function rn(e) {
|
|
14
14
|
const t = z([]), l = Re(), S = Re(), s = Re(), g = te(() => l.value != null);
|
|
15
15
|
function x(d) {
|
|
16
16
|
t.value = t.value.filter((h) => h.id != d);
|
|
17
17
|
}
|
|
18
18
|
function P(d) {
|
|
19
19
|
const h = {
|
|
20
|
-
id:
|
|
20
|
+
id: pt(),
|
|
21
21
|
msg: d ?? "Loading"
|
|
22
22
|
};
|
|
23
23
|
return t.value.push(h), h.id;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function T(d) {
|
|
26
26
|
d != null && (S.value = d.toString());
|
|
27
27
|
}
|
|
28
28
|
function N() {
|
|
@@ -35,19 +35,19 @@ function en(e) {
|
|
|
35
35
|
let y = null;
|
|
36
36
|
try {
|
|
37
37
|
return u.requireConfirmation || u.confirmationMsg, y = await d(), u.completionMsg != null && (s.value = u.completionMsg), y;
|
|
38
|
-
} catch (
|
|
38
|
+
} catch (I) {
|
|
39
39
|
if ((e == null ? void 0 : e.onError) != null)
|
|
40
|
-
e.onError(
|
|
40
|
+
e.onError(I);
|
|
41
41
|
else {
|
|
42
42
|
if (u.throwError == !0)
|
|
43
|
-
return
|
|
44
|
-
|
|
43
|
+
return I;
|
|
44
|
+
T(u.errorMsg ?? I ?? "error");
|
|
45
45
|
}
|
|
46
46
|
} finally {
|
|
47
47
|
x(r);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
return
|
|
50
|
+
return pr(t, (d) => {
|
|
51
51
|
l.value = d.length > 0 ? d[0].msg : void 0;
|
|
52
52
|
}, { deep: !0 }), {
|
|
53
53
|
actionErrorMsg: S,
|
|
@@ -56,11 +56,11 @@ function en(e) {
|
|
|
56
56
|
clearErrors: N,
|
|
57
57
|
doAction: $,
|
|
58
58
|
isLoading: g,
|
|
59
|
-
logError:
|
|
59
|
+
logError: T
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
var Qe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
63
|
-
function
|
|
63
|
+
function tn(e) {
|
|
64
64
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
65
65
|
}
|
|
66
66
|
var Ue = function() {
|
|
@@ -78,11 +78,11 @@ var Ue = function() {
|
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
if (s.length === 1) {
|
|
81
|
-
var P = s,
|
|
81
|
+
var P = s, T = g.ignoreCase ? t : e, N = g.cmp || function(d, h) {
|
|
82
82
|
return d < h ? -1 : d > h ? 1 : 0;
|
|
83
83
|
};
|
|
84
84
|
s = function(d, h) {
|
|
85
|
-
return N(
|
|
85
|
+
return N(T(P(d)), T(P(h)));
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
const $ = { "-1": "", desc: "" };
|
|
@@ -91,10 +91,10 @@ var Ue = function() {
|
|
|
91
91
|
} : s;
|
|
92
92
|
}
|
|
93
93
|
function S(s, g) {
|
|
94
|
-
var x = typeof this == "function" && !this.firstBy ? this : !1, P = l(s, g),
|
|
94
|
+
var x = typeof this == "function" && !this.firstBy ? this : !1, P = l(s, g), T = x ? function(N, $) {
|
|
95
95
|
return x(N, $) || P(N, $);
|
|
96
96
|
} : P;
|
|
97
|
-
return
|
|
97
|
+
return T.thenBy = S, T;
|
|
98
98
|
}
|
|
99
99
|
return S.firstBy = S, S;
|
|
100
100
|
}();
|
|
@@ -110,18 +110,18 @@ function Be(e, t) {
|
|
|
110
110
|
while (S.startsWith("/"));
|
|
111
111
|
return `${l}/${S}`;
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function Jn(e) {
|
|
114
114
|
return e == null || !Array.isArray(e) ? e : [...new Set(e.map((t) => t))];
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function jn(e = "blitzItExtensionExists") {
|
|
117
117
|
try {
|
|
118
118
|
var t = document.getElementById(e);
|
|
119
119
|
return t != null;
|
|
120
120
|
} catch (l) {
|
|
121
|
-
return console.log(
|
|
121
|
+
return console.log(on(l)), !1;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function Kn(e, t) {
|
|
125
125
|
return [
|
|
126
126
|
{ lat: e.lat - t, lng: e.lng + t },
|
|
127
127
|
{ lat: e.lat - t, lng: e.lng - t },
|
|
@@ -129,7 +129,7 @@ function jn(e, t) {
|
|
|
129
129
|
{ lat: e.lat + t, lng: e.lng + t }
|
|
130
130
|
];
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function Qn(e, t) {
|
|
133
133
|
return [
|
|
134
134
|
{ lat: e.lat - t * 2, lng: e.lng + t },
|
|
135
135
|
{ lat: e.lat - t * 2, lng: e.lng - t },
|
|
@@ -137,7 +137,7 @@ function Kn(e, t) {
|
|
|
137
137
|
{ lat: e.lat, lng: e.lng + t }
|
|
138
138
|
];
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function Xn(e, t) {
|
|
141
141
|
return [
|
|
142
142
|
{ lat: e.lat, lng: e.lng + t },
|
|
143
143
|
{ lat: e.lat, lng: e.lng - t },
|
|
@@ -145,11 +145,11 @@ function Qn(e, t) {
|
|
|
145
145
|
{ lat: e.lat + t * 2, lng: e.lng + t }
|
|
146
146
|
];
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
var t =
|
|
148
|
+
function On(e) {
|
|
149
|
+
var t = tt(e, !0);
|
|
150
150
|
return t = t.toLowerCase(), t = t.replace(" victoria ", "vic"), t = t.replace(" queensland ", "qld"), t = t.replace(" new south wales ", "nsw"), t = t.replace(" northern territory ", "nt"), t = t.replace(" western australia ", "wa"), t = t.replace(" tasmania ", "tas"), t = t.replace(" south australia ", "sa"), t = t.replace(" australian captial territory ", "act"), t = t.replace(" & ", " and "), t = t.replace(" road", " rd"), t = t.replace(" street", " st"), t = t.replace(" lane", " ln"), t = t.replace(" alley", " aly"), t = t.replace(" arcade", " arc"), t = t.replace(" boulevard", " blvd"), t = t.replace(" court", " ct"), t = t.replace(" cove", " cv"), t = t.replace(" highway", " hwy"), t.replaceAll(" ", "");
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function tt(e, t = !1) {
|
|
153
153
|
if (e == null)
|
|
154
154
|
return "";
|
|
155
155
|
if (typeof e != "object")
|
|
@@ -157,13 +157,13 @@ function rt(e, t = !1) {
|
|
|
157
157
|
var l = "";
|
|
158
158
|
return e.addressLineOne != null && !t && (l = e.addressLineOne + " "), e.streetNumber != null && (l = l + e.streetNumber + " "), e.streetName != null && (l = l + e.streetName + ", "), e.suburb != null && (l = l + e.suburb + " "), e.state != null && (l = l + e.state + " "), e.postcode != null && (l = l + e.postcode), l;
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function pn(e, t, l) {
|
|
161
161
|
if (e) {
|
|
162
162
|
var S = new Image();
|
|
163
163
|
S.onload = t, S.onerror = l, S.src = e;
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
async function
|
|
166
|
+
async function ea(e, t = !0) {
|
|
167
167
|
return new Promise((l, S) => {
|
|
168
168
|
e == null && S("no url given");
|
|
169
169
|
var s = new Image();
|
|
@@ -177,16 +177,16 @@ async function pn(e, t = !0) {
|
|
|
177
177
|
}, e != null && (s.src = e);
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function nn(e) {
|
|
181
181
|
return e && e.replace(/([A-Z])/g, " $1").replace(/^./, (t) => t.toUpperCase());
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function ra(e) {
|
|
184
184
|
if (e != null && typeof e == "object")
|
|
185
185
|
for (var t in e)
|
|
186
186
|
/^[A-Z]/.test(t) && Object.hasOwnProperty.call(e, t) && (e[t.charAt(0).toLowerCase() + t.substring(1)] = e[t], delete e[t]);
|
|
187
187
|
return e;
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function an(e) {
|
|
190
190
|
return e == null ? e : e.replace(/\w\S*/g, (t) => t.replace(/^\w/, (l) => l.toUpperCase()));
|
|
191
191
|
}
|
|
192
192
|
const Ye = [
|
|
@@ -199,25 +199,25 @@ const Ye = [
|
|
|
199
199
|
{ value: 7, short: "sat", values: ["sat", "saturday"] },
|
|
200
200
|
{ value: 0, short: "always", values: ["always", null, void 0] }
|
|
201
201
|
];
|
|
202
|
-
function
|
|
202
|
+
function ta(e) {
|
|
203
203
|
if (e == null)
|
|
204
204
|
return 0;
|
|
205
205
|
const t = e.replaceAll(" ", "").split(",").map((S) => S.toLowerCase()), l = Ye.filter((S) => S.values.some((s) => t.some((g) => s == g))).map((S) => S.value);
|
|
206
206
|
return l.length == 0 ? 8 : Math.min(...l);
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function na(e) {
|
|
209
209
|
return e == null ? e : e.toLowerCase().replaceAll(" ", "").split(",").map((t) => {
|
|
210
210
|
let l = Ye.find((S) => S.values.some((s) => s == t));
|
|
211
211
|
return l != null ? l.short : "";
|
|
212
212
|
}).filter((t) => t != null && t.length > 0).toString();
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function aa(e, t) {
|
|
215
215
|
if (e == null || t == null)
|
|
216
216
|
return !0;
|
|
217
217
|
const l = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), S = t.replaceAll(" ", "").toLowerCase(), s = Ye.find((g) => g.values.some((x) => x == S));
|
|
218
218
|
return s != null && l.some((g) => g == s.short || s.values.some((x) => x == g));
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function la(e, t) {
|
|
221
221
|
if (t == null)
|
|
222
222
|
return e;
|
|
223
223
|
let l = e ?? "";
|
|
@@ -225,28 +225,28 @@ function aa(e, t) {
|
|
|
225
225
|
let S = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((s) => Ye.find((g) => g.values.some((x) => x == s))).filter((s) => s != null).sort(Ue.firstBy((s) => (s == null ? void 0 : s.value) ?? 0)).map((s) => s == null ? void 0 : s.short))].toString();
|
|
226
226
|
return S.length > 0 ? S : void 0;
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function ua(e, t) {
|
|
229
229
|
if (t == null || e == null)
|
|
230
230
|
return e;
|
|
231
231
|
let l = e ?? "", S = t.replaceAll(" ", "").toLowerCase(), s = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((g) => Ye.find((x) => x.values.some((P) => P == g && P != S))).filter((g) => g != null).sort(Ue.firstBy((g) => (g == null ? void 0 : g.value) ?? 0)).map((g) => g == null ? void 0 : g.short))].toString();
|
|
232
232
|
return s.length > 0 ? s : void 0;
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function ia(e, t) {
|
|
235
235
|
return e != null && Array.isArray(e) && e.length == t;
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function Te(e, t = 0) {
|
|
238
238
|
return e != null && Array.isArray(e) && e.length > t;
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function ln(e) {
|
|
241
241
|
return e == "0001-01-01T00:00:00Z";
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function ca() {
|
|
244
244
|
return (/* @__PURE__ */ new Date("0001-01-01T00:00:00Z")).getTime();
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function un() {
|
|
247
247
|
return "0001-01-01T00:00:00Z";
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function fa(e, t) {
|
|
250
250
|
let l = "1", S = 0;
|
|
251
251
|
if (S < t)
|
|
252
252
|
do
|
|
@@ -255,11 +255,11 @@ function ca(e, t) {
|
|
|
255
255
|
let s = Number.parseInt(l);
|
|
256
256
|
return Math.round(e * s) / s;
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function sa(e, t) {
|
|
259
259
|
let l = e ?? "";
|
|
260
|
-
return t != null && (
|
|
260
|
+
return t != null && (cn(l, t) ? l = l.split(",").filter((S) => S != t).toString() : l != null ? l = `${l},${t}` : l = t), l != null && l.length > 0 ? l : null;
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function cn(e, t) {
|
|
263
263
|
if (e == null || e.length == 0)
|
|
264
264
|
return !1;
|
|
265
265
|
if (!t)
|
|
@@ -275,32 +275,32 @@ function Lr(e) {
|
|
|
275
275
|
t = e[S], l[S] = typeof t == "object" ? Lr(t) : t;
|
|
276
276
|
return l;
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function fn(e) {
|
|
279
279
|
return e && Object.keys(e).sort().reduce(function(t, l) {
|
|
280
280
|
let S = e[l];
|
|
281
|
-
return t[l] = typeof S == "object" && S !== null ?
|
|
281
|
+
return t[l] = typeof S == "object" && S !== null ? fn(S) : S, t;
|
|
282
282
|
}, Array.isArray(e) ? [] : {});
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function sn(e, t) {
|
|
285
285
|
return t == null ? !0 : e == null ? !1 : e.toLowerCase().includes(t.toLowerCase());
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function nt(e, t = (l) => l) {
|
|
288
288
|
if (e == null)
|
|
289
289
|
return [];
|
|
290
290
|
const l = Array.isArray(e) ? e : t(e);
|
|
291
|
-
return
|
|
291
|
+
return Te(l) ? [...l.reduce((S, s) => {
|
|
292
292
|
S.push(s);
|
|
293
|
-
const g =
|
|
294
|
-
return
|
|
293
|
+
const g = nt(s, t);
|
|
294
|
+
return Te(g) && S.push(...g), S;
|
|
295
295
|
}, [])] : [];
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function oa(e) {
|
|
298
298
|
const t = e.split(","), l = t[0].indexOf("base64") >= 0 ? atob(t[1]) : decodeURI(t[1]), S = t[0].split(":")[1].split(";")[0], s = new Uint8Array(l.length);
|
|
299
299
|
for (let g = 0; g < l.length; g++)
|
|
300
300
|
s[g] = l.charCodeAt(g);
|
|
301
301
|
return new Blob([s], { type: S });
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function on(e) {
|
|
304
304
|
var t = "";
|
|
305
305
|
if (e) {
|
|
306
306
|
if (e.message && (t = e.message), e.response && e.response.data) {
|
|
@@ -313,11 +313,11 @@ function sn(e) {
|
|
|
313
313
|
}
|
|
314
314
|
return "hmmm no error was supplied";
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function dn() {
|
|
317
317
|
const e = "#" + Math.floor(Math.random() * 16777215).toString(16);
|
|
318
|
-
return e.length !== 7 ?
|
|
318
|
+
return e.length !== 7 ? dn() : e;
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function hn(e, t, l) {
|
|
321
321
|
if (t == null)
|
|
322
322
|
return !0;
|
|
323
323
|
if (e == null || l == null)
|
|
@@ -325,15 +325,15 @@ function dn(e, t, l) {
|
|
|
325
325
|
for (let s = 0; s < l.length; s++) {
|
|
326
326
|
const g = l[s];
|
|
327
327
|
var S = Sr(e, g);
|
|
328
|
-
if (S != null && typeof S == "string" &&
|
|
328
|
+
if (S != null && typeof S == "string" && sn(S, t))
|
|
329
329
|
return !0;
|
|
330
330
|
}
|
|
331
331
|
return !1;
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function da(e) {
|
|
334
334
|
return e != null ? e.replaceAll(" ", "").toLowerCase() : null;
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function ha(e = 2e3) {
|
|
337
337
|
return new Promise((t) => {
|
|
338
338
|
setTimeout(() => t(), e);
|
|
339
339
|
});
|
|
@@ -348,16 +348,16 @@ function Sr(e, t) {
|
|
|
348
348
|
return null;
|
|
349
349
|
return s;
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function mn(e) {
|
|
352
352
|
return e ? /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(e) : !1;
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function vn(e) {
|
|
355
355
|
return e.endsWith("ies") ? e.slice(0, e.length - 3) : e.endsWith("s") ? e.slice(0, e.length - 1) : e;
|
|
356
356
|
}
|
|
357
357
|
function Xe(e) {
|
|
358
358
|
throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
359
359
|
}
|
|
360
|
-
var
|
|
360
|
+
var at = { exports: {} };
|
|
361
361
|
/*!
|
|
362
362
|
localForage -- Offline Storage, Improved
|
|
363
363
|
Version 1.10.0
|
|
@@ -388,18 +388,18 @@ var nt = { exports: {} };
|
|
|
388
388
|
}
|
|
389
389
|
return s[N].exports;
|
|
390
390
|
}
|
|
391
|
-
for (var P = typeof Xe == "function" && Xe,
|
|
392
|
-
x(g[
|
|
391
|
+
for (var P = typeof Xe == "function" && Xe, T = 0; T < g.length; T++)
|
|
392
|
+
x(g[T]);
|
|
393
393
|
return x;
|
|
394
394
|
}({ 1: [function(l, S, s) {
|
|
395
395
|
(function(g) {
|
|
396
396
|
var x = g.MutationObserver || g.WebKitMutationObserver, P;
|
|
397
397
|
if (x) {
|
|
398
|
-
var
|
|
398
|
+
var T = 0, N = new x(r), $ = g.document.createTextNode("");
|
|
399
399
|
N.observe($, {
|
|
400
400
|
characterData: !0
|
|
401
401
|
}), P = function() {
|
|
402
|
-
$.data =
|
|
402
|
+
$.data = T = ++T % 2;
|
|
403
403
|
};
|
|
404
404
|
} else if (!g.setImmediate && typeof g.MessageChannel < "u") {
|
|
405
405
|
var d = new g.MessageChannel();
|
|
@@ -408,33 +408,33 @@ var nt = { exports: {} };
|
|
|
408
408
|
};
|
|
409
409
|
} else
|
|
410
410
|
"document" in g && "onreadystatechange" in g.document.createElement("script") ? P = function() {
|
|
411
|
-
var
|
|
412
|
-
|
|
413
|
-
r(),
|
|
414
|
-
}, g.document.documentElement.appendChild(
|
|
411
|
+
var I = g.document.createElement("script");
|
|
412
|
+
I.onreadystatechange = function() {
|
|
413
|
+
r(), I.onreadystatechange = null, I.parentNode.removeChild(I), I = null;
|
|
414
|
+
}, g.document.documentElement.appendChild(I);
|
|
415
415
|
} : P = function() {
|
|
416
416
|
setTimeout(r, 0);
|
|
417
417
|
};
|
|
418
418
|
var h, u = [];
|
|
419
419
|
function r() {
|
|
420
420
|
h = !0;
|
|
421
|
-
for (var
|
|
422
|
-
for (i = u, u = [],
|
|
423
|
-
i[
|
|
424
|
-
|
|
421
|
+
for (var I, i, E = u.length; E; ) {
|
|
422
|
+
for (i = u, u = [], I = -1; ++I < E; )
|
|
423
|
+
i[I]();
|
|
424
|
+
E = u.length;
|
|
425
425
|
}
|
|
426
426
|
h = !1;
|
|
427
427
|
}
|
|
428
428
|
S.exports = y;
|
|
429
|
-
function y(
|
|
430
|
-
u.push(
|
|
429
|
+
function y(I) {
|
|
430
|
+
u.push(I) === 1 && !h && P();
|
|
431
431
|
}
|
|
432
432
|
}).call(this, typeof Qe < "u" ? Qe : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
433
433
|
}, {}], 2: [function(l, S, s) {
|
|
434
434
|
var g = l(1);
|
|
435
435
|
function x() {
|
|
436
436
|
}
|
|
437
|
-
var P = {},
|
|
437
|
+
var P = {}, T = ["REJECTED"], N = ["FULFILLED"], $ = ["PENDING"];
|
|
438
438
|
S.exports = d;
|
|
439
439
|
function d(b) {
|
|
440
440
|
if (typeof b != "function")
|
|
@@ -443,19 +443,19 @@ var nt = { exports: {} };
|
|
|
443
443
|
}
|
|
444
444
|
d.prototype.catch = function(b) {
|
|
445
445
|
return this.then(null, b);
|
|
446
|
-
}, d.prototype.then = function(b,
|
|
447
|
-
if (typeof b != "function" && this.state === N || typeof
|
|
446
|
+
}, d.prototype.then = function(b, _) {
|
|
447
|
+
if (typeof b != "function" && this.state === N || typeof _ != "function" && this.state === T)
|
|
448
448
|
return this;
|
|
449
449
|
var D = new this.constructor(x);
|
|
450
450
|
if (this.state !== $) {
|
|
451
|
-
var L = this.state === N ? b :
|
|
451
|
+
var L = this.state === N ? b : _;
|
|
452
452
|
u(D, L, this.outcome);
|
|
453
453
|
} else
|
|
454
|
-
this.queue.push(new h(D, b,
|
|
454
|
+
this.queue.push(new h(D, b, _));
|
|
455
455
|
return D;
|
|
456
456
|
};
|
|
457
|
-
function h(b,
|
|
458
|
-
this.promise = b, typeof
|
|
457
|
+
function h(b, _, D) {
|
|
458
|
+
this.promise = b, typeof _ == "function" && (this.onFulfilled = _, this.callFulfilled = this.otherCallFulfilled), typeof D == "function" && (this.onRejected = D, this.callRejected = this.otherCallRejected);
|
|
459
459
|
}
|
|
460
460
|
h.prototype.callFulfilled = function(b) {
|
|
461
461
|
P.resolve(this.promise, b);
|
|
@@ -466,44 +466,44 @@ var nt = { exports: {} };
|
|
|
466
466
|
}, h.prototype.otherCallRejected = function(b) {
|
|
467
467
|
u(this.promise, this.onRejected, b);
|
|
468
468
|
};
|
|
469
|
-
function u(b,
|
|
469
|
+
function u(b, _, D) {
|
|
470
470
|
g(function() {
|
|
471
471
|
var L;
|
|
472
472
|
try {
|
|
473
|
-
L =
|
|
473
|
+
L = _(D);
|
|
474
474
|
} catch (f) {
|
|
475
475
|
return P.reject(b, f);
|
|
476
476
|
}
|
|
477
477
|
L === b ? P.reject(b, new TypeError("Cannot resolve promise with itself")) : P.resolve(b, L);
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
|
-
P.resolve = function(b,
|
|
481
|
-
var D =
|
|
480
|
+
P.resolve = function(b, _) {
|
|
481
|
+
var D = I(r, _);
|
|
482
482
|
if (D.status === "error")
|
|
483
483
|
return P.reject(b, D.value);
|
|
484
484
|
var L = D.value;
|
|
485
485
|
if (L)
|
|
486
486
|
y(b, L);
|
|
487
487
|
else {
|
|
488
|
-
b.state = N, b.outcome =
|
|
488
|
+
b.state = N, b.outcome = _;
|
|
489
489
|
for (var f = -1, A = b.queue.length; ++f < A; )
|
|
490
|
-
b.queue[f].callFulfilled(
|
|
490
|
+
b.queue[f].callFulfilled(_);
|
|
491
491
|
}
|
|
492
492
|
return b;
|
|
493
|
-
}, P.reject = function(b,
|
|
494
|
-
b.state =
|
|
493
|
+
}, P.reject = function(b, _) {
|
|
494
|
+
b.state = T, b.outcome = _;
|
|
495
495
|
for (var D = -1, L = b.queue.length; ++D < L; )
|
|
496
|
-
b.queue[D].callRejected(
|
|
496
|
+
b.queue[D].callRejected(_);
|
|
497
497
|
return b;
|
|
498
498
|
};
|
|
499
499
|
function r(b) {
|
|
500
|
-
var
|
|
501
|
-
if (b && (typeof b == "object" || typeof b == "function") && typeof
|
|
500
|
+
var _ = b && b.then;
|
|
501
|
+
if (b && (typeof b == "object" || typeof b == "function") && typeof _ == "function")
|
|
502
502
|
return function() {
|
|
503
|
-
|
|
503
|
+
_.apply(b, arguments);
|
|
504
504
|
};
|
|
505
505
|
}
|
|
506
|
-
function y(b,
|
|
506
|
+
function y(b, _) {
|
|
507
507
|
var D = !1;
|
|
508
508
|
function L(Q) {
|
|
509
509
|
D || (D = !0, P.reject(b, Q));
|
|
@@ -512,15 +512,15 @@ var nt = { exports: {} };
|
|
|
512
512
|
D || (D = !0, P.resolve(b, Q));
|
|
513
513
|
}
|
|
514
514
|
function A() {
|
|
515
|
-
|
|
515
|
+
_(f, L);
|
|
516
516
|
}
|
|
517
|
-
var J =
|
|
517
|
+
var J = I(A);
|
|
518
518
|
J.status === "error" && L(J.value);
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function I(b, _) {
|
|
521
521
|
var D = {};
|
|
522
522
|
try {
|
|
523
|
-
D.value = b(
|
|
523
|
+
D.value = b(_), D.status = "success";
|
|
524
524
|
} catch (L) {
|
|
525
525
|
D.status = "error", D.value = L;
|
|
526
526
|
}
|
|
@@ -530,14 +530,14 @@ var nt = { exports: {} };
|
|
|
530
530
|
function i(b) {
|
|
531
531
|
return b instanceof this ? b : P.resolve(new this(x), b);
|
|
532
532
|
}
|
|
533
|
-
d.reject =
|
|
534
|
-
function
|
|
535
|
-
var
|
|
536
|
-
return P.reject(
|
|
533
|
+
d.reject = E;
|
|
534
|
+
function E(b) {
|
|
535
|
+
var _ = new this(x);
|
|
536
|
+
return P.reject(_, b);
|
|
537
537
|
}
|
|
538
538
|
d.all = w;
|
|
539
539
|
function w(b) {
|
|
540
|
-
var
|
|
540
|
+
var _ = this;
|
|
541
541
|
if (Object.prototype.toString.call(b) !== "[object Array]")
|
|
542
542
|
return this.reject(new TypeError("must be an array"));
|
|
543
543
|
var D = b.length, L = !1;
|
|
@@ -547,7 +547,7 @@ var nt = { exports: {} };
|
|
|
547
547
|
ee(b[J], J);
|
|
548
548
|
return Q;
|
|
549
549
|
function ee(ie, we) {
|
|
550
|
-
|
|
550
|
+
_.resolve(ie).then(W, function(Y) {
|
|
551
551
|
L || (L = !0, P.reject(Q, Y));
|
|
552
552
|
});
|
|
553
553
|
function W(Y) {
|
|
@@ -557,7 +557,7 @@ var nt = { exports: {} };
|
|
|
557
557
|
}
|
|
558
558
|
d.race = M;
|
|
559
559
|
function M(b) {
|
|
560
|
-
var
|
|
560
|
+
var _ = this;
|
|
561
561
|
if (Object.prototype.toString.call(b) !== "[object Array]")
|
|
562
562
|
return this.reject(new TypeError("must be an array"));
|
|
563
563
|
var D = b.length, L = !1;
|
|
@@ -567,7 +567,7 @@ var nt = { exports: {} };
|
|
|
567
567
|
J(b[f]);
|
|
568
568
|
return A;
|
|
569
569
|
function J(Q) {
|
|
570
|
-
|
|
570
|
+
_.resolve(Q).then(function(ee) {
|
|
571
571
|
L || (L = !0, P.resolve(A, ee));
|
|
572
572
|
}, function(ee) {
|
|
573
573
|
L || (L = !0, P.reject(A, ee));
|
|
@@ -604,10 +604,10 @@ var nt = { exports: {} };
|
|
|
604
604
|
return;
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
|
-
var
|
|
607
|
+
var T = P();
|
|
608
608
|
function N() {
|
|
609
609
|
try {
|
|
610
|
-
if (!
|
|
610
|
+
if (!T || !T.open)
|
|
611
611
|
return !1;
|
|
612
612
|
var n = typeof openDatabase < "u" && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform), c = typeof fetch == "function" && fetch.toString().indexOf("[native code") !== -1;
|
|
613
613
|
return (!n || c) && typeof indexedDB < "u" && // some outdated implementations of IDB that appear on Samsung
|
|
@@ -650,16 +650,16 @@ var nt = { exports: {} };
|
|
|
650
650
|
if (arguments.length && typeof arguments[arguments.length - 1] == "function")
|
|
651
651
|
return arguments[arguments.length - 1];
|
|
652
652
|
}
|
|
653
|
-
var
|
|
654
|
-
function
|
|
653
|
+
var I = "local-forage-detect-blob-support", i = void 0, E = {}, w = Object.prototype.toString, M = "readonly", b = "readwrite";
|
|
654
|
+
function _(n) {
|
|
655
655
|
for (var c = n.length, a = new ArrayBuffer(c), m = new Uint8Array(a), v = 0; v < c; v++)
|
|
656
656
|
m[v] = n.charCodeAt(v);
|
|
657
657
|
return a;
|
|
658
658
|
}
|
|
659
659
|
function D(n) {
|
|
660
660
|
return new d(function(c) {
|
|
661
|
-
var a = n.transaction(
|
|
662
|
-
a.objectStore(
|
|
661
|
+
var a = n.transaction(I, b), m = $([""]);
|
|
662
|
+
a.objectStore(I).put(m, "key"), a.onabort = function(v) {
|
|
663
663
|
v.preventDefault(), v.stopPropagation(), c(!1);
|
|
664
664
|
}, a.oncomplete = function() {
|
|
665
665
|
var v = navigator.userAgent.match(/Chrome\/(\d+)/), o = navigator.userAgent.match(/Edge\//);
|
|
@@ -675,7 +675,7 @@ var nt = { exports: {} };
|
|
|
675
675
|
});
|
|
676
676
|
}
|
|
677
677
|
function f(n) {
|
|
678
|
-
var c =
|
|
678
|
+
var c = E[n.name], a = {};
|
|
679
679
|
a.promise = new d(function(m, v) {
|
|
680
680
|
a.resolve = m, a.reject = v;
|
|
681
681
|
}), c.deferredOperations.push(a), c.dbReady ? c.dbReady = c.dbReady.then(function() {
|
|
@@ -683,29 +683,29 @@ var nt = { exports: {} };
|
|
|
683
683
|
}) : c.dbReady = a.promise;
|
|
684
684
|
}
|
|
685
685
|
function A(n) {
|
|
686
|
-
var c =
|
|
686
|
+
var c = E[n.name], a = c.deferredOperations.pop();
|
|
687
687
|
if (a)
|
|
688
688
|
return a.resolve(), a.promise;
|
|
689
689
|
}
|
|
690
690
|
function J(n, c) {
|
|
691
|
-
var a =
|
|
691
|
+
var a = E[n.name], m = a.deferredOperations.pop();
|
|
692
692
|
if (m)
|
|
693
693
|
return m.reject(c), m.promise;
|
|
694
694
|
}
|
|
695
695
|
function Q(n, c) {
|
|
696
696
|
return new d(function(a, m) {
|
|
697
|
-
if (
|
|
697
|
+
if (E[n.name] = E[n.name] || ne(), n.db)
|
|
698
698
|
if (c)
|
|
699
699
|
f(n), n.db.close();
|
|
700
700
|
else
|
|
701
701
|
return a(n.db);
|
|
702
702
|
var v = [n.name];
|
|
703
703
|
c && v.push(n.version);
|
|
704
|
-
var o =
|
|
704
|
+
var o = T.open.apply(T, v);
|
|
705
705
|
c && (o.onupgradeneeded = function(C) {
|
|
706
706
|
var R = o.result;
|
|
707
707
|
try {
|
|
708
|
-
R.createObjectStore(n.storeName), C.oldVersion <= 1 && R.createObjectStore(
|
|
708
|
+
R.createObjectStore(n.storeName), C.oldVersion <= 1 && R.createObjectStore(I);
|
|
709
709
|
} catch (B) {
|
|
710
710
|
if (B.name === "ConstraintError")
|
|
711
711
|
console.warn('The database "' + n.name + '" has been upgraded from version ' + C.oldVersion + " to version " + C.newVersion + ', but the storage "' + n.storeName + '" already exists.');
|
|
@@ -755,15 +755,15 @@ var nt = { exports: {} };
|
|
|
755
755
|
});
|
|
756
756
|
}
|
|
757
757
|
function Y(n) {
|
|
758
|
-
var c =
|
|
758
|
+
var c = _(atob(n.data));
|
|
759
759
|
return $([c], { type: n.type });
|
|
760
760
|
}
|
|
761
|
-
function
|
|
761
|
+
function V(n) {
|
|
762
762
|
return n && n.__local_forage_encoded_blob;
|
|
763
763
|
}
|
|
764
764
|
function ae(n) {
|
|
765
765
|
var c = this, a = c._initReady().then(function() {
|
|
766
|
-
var m =
|
|
766
|
+
var m = E[c._dbInfo.name];
|
|
767
767
|
if (m && m.dbReady)
|
|
768
768
|
return m.dbReady;
|
|
769
769
|
});
|
|
@@ -771,7 +771,7 @@ var nt = { exports: {} };
|
|
|
771
771
|
}
|
|
772
772
|
function G(n) {
|
|
773
773
|
f(n);
|
|
774
|
-
for (var c =
|
|
774
|
+
for (var c = E[n.name], a = c.forages, m = 0; m < a.length; m++) {
|
|
775
775
|
var v = a[m];
|
|
776
776
|
v._dbInfo.db && (v._dbInfo.db.close(), v._dbInfo.db = null);
|
|
777
777
|
}
|
|
@@ -822,8 +822,8 @@ var nt = { exports: {} };
|
|
|
822
822
|
if (n)
|
|
823
823
|
for (var m in n)
|
|
824
824
|
a[m] = n[m];
|
|
825
|
-
var v =
|
|
826
|
-
v || (v = ne(),
|
|
825
|
+
var v = E[a.name];
|
|
826
|
+
v || (v = ne(), E[a.name] = v), v.forages.push(c), c._initReady || (c._initReady = c.ready, c.ready = ae);
|
|
827
827
|
var o = [];
|
|
828
828
|
function C() {
|
|
829
829
|
return d.resolve();
|
|
@@ -857,7 +857,7 @@ var nt = { exports: {} };
|
|
|
857
857
|
var B = R.objectStore(a._dbInfo.storeName), F = B.get(n);
|
|
858
858
|
F.onsuccess = function() {
|
|
859
859
|
var k = F.result;
|
|
860
|
-
k === void 0 && (k = null),
|
|
860
|
+
k === void 0 && (k = null), V(k) && (k = Y(k)), v(k);
|
|
861
861
|
}, F.onerror = function() {
|
|
862
862
|
o(F.error);
|
|
863
863
|
};
|
|
@@ -869,7 +869,7 @@ var nt = { exports: {} };
|
|
|
869
869
|
});
|
|
870
870
|
return h(m, c), m;
|
|
871
871
|
}
|
|
872
|
-
function
|
|
872
|
+
function Ee(n, c) {
|
|
873
873
|
var a = this, m = new d(function(v, o) {
|
|
874
874
|
a.ready().then(function() {
|
|
875
875
|
X(a._dbInfo, M, function(C, R) {
|
|
@@ -881,7 +881,7 @@ var nt = { exports: {} };
|
|
|
881
881
|
var q = F.result;
|
|
882
882
|
if (q) {
|
|
883
883
|
var Z = q.value;
|
|
884
|
-
|
|
884
|
+
V(Z) && (Z = Y(Z));
|
|
885
885
|
var p = n(Z, q.key, k++);
|
|
886
886
|
p !== void 0 ? v(p) : q.continue();
|
|
887
887
|
} else
|
|
@@ -1062,7 +1062,7 @@ var nt = { exports: {} };
|
|
|
1062
1062
|
v = d.reject("Invalid arguments");
|
|
1063
1063
|
else {
|
|
1064
1064
|
var o = n.name === a.name && m._dbInfo.db, C = o ? d.resolve(m._dbInfo.db) : ee(n).then(function(R) {
|
|
1065
|
-
var B =
|
|
1065
|
+
var B = E[n.name], F = B.forages;
|
|
1066
1066
|
B.db = R;
|
|
1067
1067
|
for (var k = 0; k < F.length; k++)
|
|
1068
1068
|
F[k]._dbInfo.db = R;
|
|
@@ -1072,23 +1072,23 @@ var nt = { exports: {} };
|
|
|
1072
1072
|
if (R.objectStoreNames.contains(n.storeName)) {
|
|
1073
1073
|
var B = R.version + 1;
|
|
1074
1074
|
f(n);
|
|
1075
|
-
var F =
|
|
1075
|
+
var F = E[n.name], k = F.forages;
|
|
1076
1076
|
R.close();
|
|
1077
1077
|
for (var q = 0; q < k.length; q++) {
|
|
1078
1078
|
var Z = k[q];
|
|
1079
1079
|
Z._dbInfo.db = null, Z._dbInfo.version = B;
|
|
1080
1080
|
}
|
|
1081
1081
|
var p = new d(function(re, ue) {
|
|
1082
|
-
var le =
|
|
1083
|
-
le.onerror = function(
|
|
1082
|
+
var le = T.open(n.name, B);
|
|
1083
|
+
le.onerror = function(ge) {
|
|
1084
1084
|
var ze = le.result;
|
|
1085
|
-
ze.close(), ue(
|
|
1085
|
+
ze.close(), ue(ge);
|
|
1086
1086
|
}, le.onupgradeneeded = function() {
|
|
1087
|
-
var
|
|
1088
|
-
|
|
1087
|
+
var ge = le.result;
|
|
1088
|
+
ge.deleteObjectStore(n.storeName);
|
|
1089
1089
|
}, le.onsuccess = function() {
|
|
1090
|
-
var
|
|
1091
|
-
|
|
1090
|
+
var ge = le.result;
|
|
1091
|
+
ge.close(), re(ge);
|
|
1092
1092
|
};
|
|
1093
1093
|
});
|
|
1094
1094
|
return p.then(function(re) {
|
|
@@ -1104,14 +1104,14 @@ var nt = { exports: {} };
|
|
|
1104
1104
|
}
|
|
1105
1105
|
}) : v = C.then(function(R) {
|
|
1106
1106
|
f(n);
|
|
1107
|
-
var B =
|
|
1107
|
+
var B = E[n.name], F = B.forages;
|
|
1108
1108
|
R.close();
|
|
1109
1109
|
for (var k = 0; k < F.length; k++) {
|
|
1110
1110
|
var q = F[k];
|
|
1111
1111
|
q._dbInfo.db = null;
|
|
1112
1112
|
}
|
|
1113
1113
|
var Z = new d(function(p, re) {
|
|
1114
|
-
var ue =
|
|
1114
|
+
var ue = T.deleteDatabase(n.name);
|
|
1115
1115
|
ue.onerror = function() {
|
|
1116
1116
|
var le = ue.result;
|
|
1117
1117
|
le && le.close(), re(ue.error);
|
|
@@ -1140,7 +1140,7 @@ var nt = { exports: {} };
|
|
|
1140
1140
|
_driver: "asyncStorage",
|
|
1141
1141
|
_initStorage: fe,
|
|
1142
1142
|
_support: N(),
|
|
1143
|
-
iterate:
|
|
1143
|
+
iterate: Ee,
|
|
1144
1144
|
getItem: ce,
|
|
1145
1145
|
setItem: $e,
|
|
1146
1146
|
removeItem: Ce,
|
|
@@ -1153,7 +1153,7 @@ var nt = { exports: {} };
|
|
|
1153
1153
|
function ur() {
|
|
1154
1154
|
return typeof openDatabase == "function";
|
|
1155
1155
|
}
|
|
1156
|
-
var be = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", ir = "~~local_forage_type~", Ze = /^~~local_forage_type~([^~]+)~/, Fe = "__lfsc__:", Ne = Fe.length, We = "arbf",
|
|
1156
|
+
var be = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", ir = "~~local_forage_type~", Ze = /^~~local_forage_type~([^~]+)~/, Fe = "__lfsc__:", Ne = Fe.length, We = "arbf", Ie = "blob", Je = "si08", je = "ui08", qe = "uic8", Ve = "si16", U = "si32", j = "ur16", H = "ui32", O = "fl32", oe = "fl64", ve = Ne + We.length, De = Object.prototype.toString;
|
|
1157
1157
|
function Se(n) {
|
|
1158
1158
|
var c = n.length * 0.75, a = n.length, m, v = 0, o, C, R, B;
|
|
1159
1159
|
n[n.length - 1] === "=" && (c--, n[n.length - 2] === "=" && c--);
|
|
@@ -1172,12 +1172,12 @@ var nt = { exports: {} };
|
|
|
1172
1172
|
var a = "";
|
|
1173
1173
|
if (n && (a = De.call(n)), n && (a === "[object ArrayBuffer]" || n.buffer && De.call(n.buffer) === "[object ArrayBuffer]")) {
|
|
1174
1174
|
var m, v = Fe;
|
|
1175
|
-
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 +=
|
|
1175
|
+
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));
|
|
1176
1176
|
} else if (a === "[object Blob]") {
|
|
1177
1177
|
var o = new FileReader();
|
|
1178
1178
|
o.onload = function() {
|
|
1179
1179
|
var C = ir + n.type + "~" + se(this.result);
|
|
1180
|
-
c(Fe +
|
|
1180
|
+
c(Fe + Ie + C);
|
|
1181
1181
|
}, o.readAsArrayBuffer(n);
|
|
1182
1182
|
} else
|
|
1183
1183
|
try {
|
|
@@ -1186,11 +1186,11 @@ var nt = { exports: {} };
|
|
|
1186
1186
|
console.error("Couldn't convert value into a JSON string: ", n), c(null, C);
|
|
1187
1187
|
}
|
|
1188
1188
|
}
|
|
1189
|
-
function
|
|
1189
|
+
function ft(n) {
|
|
1190
1190
|
if (n.substring(0, Ne) !== Fe)
|
|
1191
1191
|
return JSON.parse(n);
|
|
1192
1192
|
var c = n.substring(ve), a = n.substring(Ne, ve), m;
|
|
1193
|
-
if (a ===
|
|
1193
|
+
if (a === Ie && Ze.test(c)) {
|
|
1194
1194
|
var v = c.match(Ze);
|
|
1195
1195
|
m = v[1], c = c.substring(v[0].length);
|
|
1196
1196
|
}
|
|
@@ -1198,7 +1198,7 @@ var nt = { exports: {} };
|
|
|
1198
1198
|
switch (a) {
|
|
1199
1199
|
case We:
|
|
1200
1200
|
return o;
|
|
1201
|
-
case
|
|
1201
|
+
case Ie:
|
|
1202
1202
|
return $([o], { type: m });
|
|
1203
1203
|
case Je:
|
|
1204
1204
|
return new Int8Array(o);
|
|
@@ -1206,13 +1206,13 @@ var nt = { exports: {} };
|
|
|
1206
1206
|
return new Uint8Array(o);
|
|
1207
1207
|
case qe:
|
|
1208
1208
|
return new Uint8ClampedArray(o);
|
|
1209
|
-
case
|
|
1209
|
+
case Ve:
|
|
1210
1210
|
return new Int16Array(o);
|
|
1211
1211
|
case j:
|
|
1212
1212
|
return new Uint16Array(o);
|
|
1213
1213
|
case U:
|
|
1214
1214
|
return new Int32Array(o);
|
|
1215
|
-
case
|
|
1215
|
+
case H:
|
|
1216
1216
|
return new Uint32Array(o);
|
|
1217
1217
|
case O:
|
|
1218
1218
|
return new Float32Array(o);
|
|
@@ -1224,14 +1224,14 @@ var nt = { exports: {} };
|
|
|
1224
1224
|
}
|
|
1225
1225
|
var cr = {
|
|
1226
1226
|
serialize: Me,
|
|
1227
|
-
deserialize:
|
|
1227
|
+
deserialize: ft,
|
|
1228
1228
|
stringToBuffer: Se,
|
|
1229
1229
|
bufferToString: se
|
|
1230
1230
|
};
|
|
1231
|
-
function
|
|
1231
|
+
function Ur(n, c, a, m) {
|
|
1232
1232
|
n.executeSql("CREATE TABLE IF NOT EXISTS " + c.storeName + " (id INTEGER PRIMARY KEY, key unique, value)", [], a, m);
|
|
1233
1233
|
}
|
|
1234
|
-
function
|
|
1234
|
+
function st(n) {
|
|
1235
1235
|
var c = this, a = {
|
|
1236
1236
|
db: null
|
|
1237
1237
|
};
|
|
@@ -1245,7 +1245,7 @@ var nt = { exports: {} };
|
|
|
1245
1245
|
return C(R);
|
|
1246
1246
|
}
|
|
1247
1247
|
a.db.transaction(function(R) {
|
|
1248
|
-
|
|
1248
|
+
Ur(R, a, function() {
|
|
1249
1249
|
c._dbInfo = a, o();
|
|
1250
1250
|
}, function(B, F) {
|
|
1251
1251
|
C(F);
|
|
@@ -1257,13 +1257,13 @@ var nt = { exports: {} };
|
|
|
1257
1257
|
function xe(n, c, a, m, v, o) {
|
|
1258
1258
|
n.executeSql(a, m, v, function(C, R) {
|
|
1259
1259
|
R.code === R.SYNTAX_ERR ? C.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?", [c.storeName], function(B, F) {
|
|
1260
|
-
F.rows.length ? o(B, R) :
|
|
1260
|
+
F.rows.length ? o(B, R) : Ur(B, c, function() {
|
|
1261
1261
|
B.executeSql(a, m, v, o);
|
|
1262
1262
|
}, o);
|
|
1263
1263
|
}, o) : o(C, R);
|
|
1264
1264
|
}, o);
|
|
1265
1265
|
}
|
|
1266
|
-
function
|
|
1266
|
+
function ot(n, c) {
|
|
1267
1267
|
var a = this;
|
|
1268
1268
|
n = r(n);
|
|
1269
1269
|
var m = new d(function(v, o) {
|
|
@@ -1281,7 +1281,7 @@ var nt = { exports: {} };
|
|
|
1281
1281
|
});
|
|
1282
1282
|
return h(m, c), m;
|
|
1283
1283
|
}
|
|
1284
|
-
function
|
|
1284
|
+
function dt(n, c) {
|
|
1285
1285
|
var a = this, m = new d(function(v, o) {
|
|
1286
1286
|
a.ready().then(function() {
|
|
1287
1287
|
var C = a._dbInfo;
|
|
@@ -1303,7 +1303,7 @@ var nt = { exports: {} };
|
|
|
1303
1303
|
});
|
|
1304
1304
|
return h(m, c), m;
|
|
1305
1305
|
}
|
|
1306
|
-
function
|
|
1306
|
+
function Br(n, c, a, m) {
|
|
1307
1307
|
var v = this;
|
|
1308
1308
|
n = r(n);
|
|
1309
1309
|
var o = new d(function(C, R) {
|
|
@@ -1320,7 +1320,7 @@ var nt = { exports: {} };
|
|
|
1320
1320
|
}, function(Z) {
|
|
1321
1321
|
if (Z.code === Z.QUOTA_ERR) {
|
|
1322
1322
|
if (m > 0) {
|
|
1323
|
-
C(
|
|
1323
|
+
C(Br.apply(v, [n, B, a, m - 1]));
|
|
1324
1324
|
return;
|
|
1325
1325
|
}
|
|
1326
1326
|
R(Z);
|
|
@@ -1331,10 +1331,10 @@ var nt = { exports: {} };
|
|
|
1331
1331
|
});
|
|
1332
1332
|
return h(o, a), o;
|
|
1333
1333
|
}
|
|
1334
|
-
function
|
|
1335
|
-
return
|
|
1334
|
+
function ht(n, c, a) {
|
|
1335
|
+
return Br.apply(this, [n, c, a, 1]);
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function mt(n, c) {
|
|
1338
1338
|
var a = this;
|
|
1339
1339
|
n = r(n);
|
|
1340
1340
|
var m = new d(function(v, o) {
|
|
@@ -1351,7 +1351,7 @@ var nt = { exports: {} };
|
|
|
1351
1351
|
});
|
|
1352
1352
|
return h(m, c), m;
|
|
1353
1353
|
}
|
|
1354
|
-
function
|
|
1354
|
+
function vt(n) {
|
|
1355
1355
|
var c = this, a = new d(function(m, v) {
|
|
1356
1356
|
c.ready().then(function() {
|
|
1357
1357
|
var o = c._dbInfo;
|
|
@@ -1366,7 +1366,7 @@ var nt = { exports: {} };
|
|
|
1366
1366
|
});
|
|
1367
1367
|
return h(a, n), a;
|
|
1368
1368
|
}
|
|
1369
|
-
function
|
|
1369
|
+
function gt(n) {
|
|
1370
1370
|
var c = this, a = new d(function(m, v) {
|
|
1371
1371
|
c.ready().then(function() {
|
|
1372
1372
|
var o = c._dbInfo;
|
|
@@ -1382,7 +1382,7 @@ var nt = { exports: {} };
|
|
|
1382
1382
|
});
|
|
1383
1383
|
return h(a, n), a;
|
|
1384
1384
|
}
|
|
1385
|
-
function
|
|
1385
|
+
function yt(n, c) {
|
|
1386
1386
|
var a = this, m = new d(function(v, o) {
|
|
1387
1387
|
a.ready().then(function() {
|
|
1388
1388
|
var C = a._dbInfo;
|
|
@@ -1398,7 +1398,7 @@ var nt = { exports: {} };
|
|
|
1398
1398
|
});
|
|
1399
1399
|
return h(m, c), m;
|
|
1400
1400
|
}
|
|
1401
|
-
function
|
|
1401
|
+
function wt(n) {
|
|
1402
1402
|
var c = this, a = new d(function(m, v) {
|
|
1403
1403
|
c.ready().then(function() {
|
|
1404
1404
|
var o = c._dbInfo;
|
|
@@ -1415,7 +1415,7 @@ var nt = { exports: {} };
|
|
|
1415
1415
|
});
|
|
1416
1416
|
return h(a, n), a;
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1418
|
+
function bt(n) {
|
|
1419
1419
|
return new d(function(c, a) {
|
|
1420
1420
|
n.transaction(function(m) {
|
|
1421
1421
|
m.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'", [], function(v, o) {
|
|
@@ -1433,7 +1433,7 @@ var nt = { exports: {} };
|
|
|
1433
1433
|
});
|
|
1434
1434
|
});
|
|
1435
1435
|
}
|
|
1436
|
-
function
|
|
1436
|
+
function St(n, c) {
|
|
1437
1437
|
c = y.apply(this, arguments);
|
|
1438
1438
|
var a = this.config();
|
|
1439
1439
|
n = typeof n != "function" && n || {}, n.name || (n.name = n.name || a.name, n.storeName = n.storeName || a.storeName);
|
|
@@ -1443,7 +1443,7 @@ var nt = { exports: {} };
|
|
|
1443
1443
|
n.name === a.name ? C = m._dbInfo.db : C = openDatabase(n.name, "", "", 0), n.storeName ? o({
|
|
1444
1444
|
db: C,
|
|
1445
1445
|
storeNames: [n.storeName]
|
|
1446
|
-
}) : o(
|
|
1446
|
+
}) : o(bt(C));
|
|
1447
1447
|
}).then(function(o) {
|
|
1448
1448
|
return new d(function(C, R) {
|
|
1449
1449
|
o.db.transaction(function(B) {
|
|
@@ -1451,8 +1451,8 @@ var nt = { exports: {} };
|
|
|
1451
1451
|
return new d(function(re, ue) {
|
|
1452
1452
|
B.executeSql("DROP TABLE IF EXISTS " + p, [], function() {
|
|
1453
1453
|
re();
|
|
1454
|
-
}, function(le,
|
|
1455
|
-
ue(
|
|
1454
|
+
}, function(le, ge) {
|
|
1455
|
+
ue(ge);
|
|
1456
1456
|
});
|
|
1457
1457
|
});
|
|
1458
1458
|
}
|
|
@@ -1469,21 +1469,21 @@ var nt = { exports: {} };
|
|
|
1469
1469
|
});
|
|
1470
1470
|
}) : v = d.reject("Invalid arguments"), h(v, c), v;
|
|
1471
1471
|
}
|
|
1472
|
-
var
|
|
1472
|
+
var At = {
|
|
1473
1473
|
_driver: "webSQLStorage",
|
|
1474
|
-
_initStorage:
|
|
1474
|
+
_initStorage: st,
|
|
1475
1475
|
_support: ur(),
|
|
1476
|
-
iterate:
|
|
1477
|
-
getItem:
|
|
1478
|
-
setItem:
|
|
1479
|
-
removeItem:
|
|
1480
|
-
clear:
|
|
1481
|
-
length:
|
|
1482
|
-
key:
|
|
1483
|
-
keys:
|
|
1484
|
-
dropInstance:
|
|
1476
|
+
iterate: dt,
|
|
1477
|
+
getItem: ot,
|
|
1478
|
+
setItem: ht,
|
|
1479
|
+
removeItem: mt,
|
|
1480
|
+
clear: vt,
|
|
1481
|
+
length: gt,
|
|
1482
|
+
key: yt,
|
|
1483
|
+
keys: wt,
|
|
1484
|
+
dropInstance: St
|
|
1485
1485
|
};
|
|
1486
|
-
function
|
|
1486
|
+
function Et() {
|
|
1487
1487
|
try {
|
|
1488
1488
|
return typeof localStorage < "u" && "setItem" in localStorage && // in IE8 typeof localStorage.setItem === 'object'
|
|
1489
1489
|
!!localStorage.setItem;
|
|
@@ -1491,7 +1491,7 @@ var nt = { exports: {} };
|
|
|
1491
1491
|
return !1;
|
|
1492
1492
|
}
|
|
1493
1493
|
}
|
|
1494
|
-
function
|
|
1494
|
+
function $r(n, c) {
|
|
1495
1495
|
var a = n.name + "/";
|
|
1496
1496
|
return n.storeName !== c.storeName && (a += n.storeName + "/"), a;
|
|
1497
1497
|
}
|
|
@@ -1503,17 +1503,17 @@ var nt = { exports: {} };
|
|
|
1503
1503
|
return !0;
|
|
1504
1504
|
}
|
|
1505
1505
|
}
|
|
1506
|
-
function
|
|
1506
|
+
function Dt() {
|
|
1507
1507
|
return !It() || localStorage.length > 0;
|
|
1508
1508
|
}
|
|
1509
|
-
function
|
|
1509
|
+
function xt(n) {
|
|
1510
1510
|
var c = this, a = {};
|
|
1511
1511
|
if (n)
|
|
1512
1512
|
for (var m in n)
|
|
1513
1513
|
a[m] = n[m];
|
|
1514
|
-
return a.keyPrefix =
|
|
1514
|
+
return a.keyPrefix = $r(n, c._defaultConfig), Dt() ? (c._dbInfo = a, a.serializer = cr, d.resolve()) : d.reject();
|
|
1515
1515
|
}
|
|
1516
|
-
function
|
|
1516
|
+
function _t(n) {
|
|
1517
1517
|
var c = this, a = c.ready().then(function() {
|
|
1518
1518
|
for (var m = c._dbInfo.keyPrefix, v = localStorage.length - 1; v >= 0; v--) {
|
|
1519
1519
|
var o = localStorage.key(v);
|
|
@@ -1531,7 +1531,7 @@ var nt = { exports: {} };
|
|
|
1531
1531
|
});
|
|
1532
1532
|
return h(m, c), m;
|
|
1533
1533
|
}
|
|
1534
|
-
function
|
|
1534
|
+
function Ct(n, c) {
|
|
1535
1535
|
var a = this, m = a.ready().then(function() {
|
|
1536
1536
|
for (var v = a._dbInfo, o = v.keyPrefix, C = o.length, R = localStorage.length, B = 1, F = 0; F < R; F++) {
|
|
1537
1537
|
var k = localStorage.key(F);
|
|
@@ -1544,7 +1544,7 @@ var nt = { exports: {} };
|
|
|
1544
1544
|
});
|
|
1545
1545
|
return h(m, c), m;
|
|
1546
1546
|
}
|
|
1547
|
-
function
|
|
1547
|
+
function Pt(n, c) {
|
|
1548
1548
|
var a = this, m = a.ready().then(function() {
|
|
1549
1549
|
var v = a._dbInfo, o;
|
|
1550
1550
|
try {
|
|
@@ -1556,7 +1556,7 @@ var nt = { exports: {} };
|
|
|
1556
1556
|
});
|
|
1557
1557
|
return h(m, c), m;
|
|
1558
1558
|
}
|
|
1559
|
-
function
|
|
1559
|
+
function Nt(n) {
|
|
1560
1560
|
var c = this, a = c.ready().then(function() {
|
|
1561
1561
|
for (var m = c._dbInfo, v = localStorage.length, o = [], C = 0; C < v; C++) {
|
|
1562
1562
|
var R = localStorage.key(C);
|
|
@@ -1566,13 +1566,13 @@ var nt = { exports: {} };
|
|
|
1566
1566
|
});
|
|
1567
1567
|
return h(a, n), a;
|
|
1568
1568
|
}
|
|
1569
|
-
function
|
|
1569
|
+
function Mt(n) {
|
|
1570
1570
|
var c = this, a = c.keys().then(function(m) {
|
|
1571
1571
|
return m.length;
|
|
1572
1572
|
});
|
|
1573
1573
|
return h(a, n), a;
|
|
1574
1574
|
}
|
|
1575
|
-
function
|
|
1575
|
+
function Lt(n, c) {
|
|
1576
1576
|
var a = this;
|
|
1577
1577
|
n = r(n);
|
|
1578
1578
|
var m = a.ready().then(function() {
|
|
@@ -1581,7 +1581,7 @@ var nt = { exports: {} };
|
|
|
1581
1581
|
});
|
|
1582
1582
|
return h(m, c), m;
|
|
1583
1583
|
}
|
|
1584
|
-
function
|
|
1584
|
+
function Rt(n, c, a) {
|
|
1585
1585
|
var m = this;
|
|
1586
1586
|
n = r(n);
|
|
1587
1587
|
var v = m.ready().then(function() {
|
|
@@ -1603,14 +1603,14 @@ var nt = { exports: {} };
|
|
|
1603
1603
|
});
|
|
1604
1604
|
return h(v, a), v;
|
|
1605
1605
|
}
|
|
1606
|
-
function
|
|
1606
|
+
function Ut(n, c) {
|
|
1607
1607
|
if (c = y.apply(this, arguments), n = typeof n != "function" && n || {}, !n.name) {
|
|
1608
1608
|
var a = this.config();
|
|
1609
1609
|
n.name = n.name || a.name, n.storeName = n.storeName || a.storeName;
|
|
1610
1610
|
}
|
|
1611
1611
|
var m = this, v;
|
|
1612
1612
|
return n.name ? v = new d(function(o) {
|
|
1613
|
-
n.storeName ? o(
|
|
1613
|
+
n.storeName ? o($r(n, m._defaultConfig)) : o(n.name + "/");
|
|
1614
1614
|
}).then(function(o) {
|
|
1615
1615
|
for (var C = localStorage.length - 1; C >= 0; C--) {
|
|
1616
1616
|
var R = localStorage.key(C);
|
|
@@ -1618,37 +1618,37 @@ var nt = { exports: {} };
|
|
|
1618
1618
|
}
|
|
1619
1619
|
}) : v = d.reject("Invalid arguments"), h(v, c), v;
|
|
1620
1620
|
}
|
|
1621
|
-
var
|
|
1621
|
+
var Bt = {
|
|
1622
1622
|
_driver: "localStorageWrapper",
|
|
1623
|
-
_initStorage:
|
|
1624
|
-
_support:
|
|
1625
|
-
iterate:
|
|
1623
|
+
_initStorage: xt,
|
|
1624
|
+
_support: Et(),
|
|
1625
|
+
iterate: Ct,
|
|
1626
1626
|
getItem: Tt,
|
|
1627
|
-
setItem:
|
|
1628
|
-
removeItem:
|
|
1629
|
-
clear:
|
|
1630
|
-
length:
|
|
1631
|
-
key:
|
|
1632
|
-
keys:
|
|
1633
|
-
dropInstance:
|
|
1634
|
-
}, Bt = function(c, a) {
|
|
1635
|
-
return c === a || typeof c == "number" && typeof a == "number" && isNaN(c) && isNaN(a);
|
|
1627
|
+
setItem: Rt,
|
|
1628
|
+
removeItem: Lt,
|
|
1629
|
+
clear: _t,
|
|
1630
|
+
length: Mt,
|
|
1631
|
+
key: Pt,
|
|
1632
|
+
keys: Nt,
|
|
1633
|
+
dropInstance: Ut
|
|
1636
1634
|
}, $t = function(c, a) {
|
|
1635
|
+
return c === a || typeof c == "number" && typeof a == "number" && isNaN(c) && isNaN(a);
|
|
1636
|
+
}, Ft = function(c, a) {
|
|
1637
1637
|
for (var m = c.length, v = 0; v < m; ) {
|
|
1638
|
-
if (
|
|
1638
|
+
if ($t(c[v], a))
|
|
1639
1639
|
return !0;
|
|
1640
1640
|
v++;
|
|
1641
1641
|
}
|
|
1642
1642
|
return !1;
|
|
1643
|
-
},
|
|
1643
|
+
}, Fr = Array.isArray || function(n) {
|
|
1644
1644
|
return Object.prototype.toString.call(n) === "[object Array]";
|
|
1645
|
-
},
|
|
1645
|
+
}, He = {}, kr = {}, ke = {
|
|
1646
1646
|
INDEXEDDB: lr,
|
|
1647
|
-
WEBSQL:
|
|
1648
|
-
LOCALSTORAGE:
|
|
1649
|
-
},
|
|
1647
|
+
WEBSQL: At,
|
|
1648
|
+
LOCALSTORAGE: Bt
|
|
1649
|
+
}, kt = [ke.INDEXEDDB._driver, ke.WEBSQL._driver, ke.LOCALSTORAGE._driver], Ke = ["dropInstance"], fr = ["clear", "getItem", "iterate", "key", "keys", "length", "removeItem", "setItem"].concat(Ke), Gt = {
|
|
1650
1650
|
description: "",
|
|
1651
|
-
driver:
|
|
1651
|
+
driver: kt.slice(),
|
|
1652
1652
|
name: "localforage",
|
|
1653
1653
|
// Default DB size is _JUST UNDER_ 5MB, as it's the highest size
|
|
1654
1654
|
// we can use without a prompt.
|
|
@@ -1656,7 +1656,7 @@ var nt = { exports: {} };
|
|
|
1656
1656
|
storeName: "keyvaluepairs",
|
|
1657
1657
|
version: 1
|
|
1658
1658
|
};
|
|
1659
|
-
function
|
|
1659
|
+
function Wt(n, c) {
|
|
1660
1660
|
n[c] = function() {
|
|
1661
1661
|
var a = arguments;
|
|
1662
1662
|
return n.ready().then(function() {
|
|
@@ -1669,19 +1669,19 @@ var nt = { exports: {} };
|
|
|
1669
1669
|
var c = arguments[n];
|
|
1670
1670
|
if (c)
|
|
1671
1671
|
for (var a in c)
|
|
1672
|
-
c.hasOwnProperty(a) && (
|
|
1672
|
+
c.hasOwnProperty(a) && (Fr(c[a]) ? arguments[0][a] = c[a].slice() : arguments[0][a] = c[a]);
|
|
1673
1673
|
}
|
|
1674
1674
|
return arguments[0];
|
|
1675
1675
|
}
|
|
1676
|
-
var
|
|
1676
|
+
var qt = function() {
|
|
1677
1677
|
function n(c) {
|
|
1678
1678
|
x(this, n);
|
|
1679
1679
|
for (var a in ke)
|
|
1680
1680
|
if (ke.hasOwnProperty(a)) {
|
|
1681
1681
|
var m = ke[a], v = m._driver;
|
|
1682
|
-
this[a] = v,
|
|
1682
|
+
this[a] = v, He[v] || this.defineDriver(m);
|
|
1683
1683
|
}
|
|
1684
|
-
this._defaultConfig = sr({},
|
|
1684
|
+
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() {
|
|
1685
1685
|
});
|
|
1686
1686
|
}
|
|
1687
1687
|
return n.prototype.config = function(a) {
|
|
@@ -1705,17 +1705,17 @@ var nt = { exports: {} };
|
|
|
1705
1705
|
return;
|
|
1706
1706
|
}
|
|
1707
1707
|
for (var k = fr.concat("_initStorage"), q = 0, Z = k.length; q < Z; q++) {
|
|
1708
|
-
var p = k[q], re =
|
|
1708
|
+
var p = k[q], re = !Ft(Ke, p);
|
|
1709
1709
|
if ((re || a[p]) && typeof a[p] != "function") {
|
|
1710
1710
|
R(F);
|
|
1711
1711
|
return;
|
|
1712
1712
|
}
|
|
1713
1713
|
}
|
|
1714
1714
|
var ue = function() {
|
|
1715
|
-
for (var ze = function(
|
|
1715
|
+
for (var ze = function(zt) {
|
|
1716
1716
|
return function() {
|
|
1717
|
-
var
|
|
1718
|
-
return h(
|
|
1717
|
+
var Yt = new Error("Method " + zt + " is not implemented by the current driver"), Gr = d.reject(Yt);
|
|
1718
|
+
return h(Gr, arguments[arguments.length - 1]), Gr;
|
|
1719
1719
|
};
|
|
1720
1720
|
}, or = 0, Ht = Ke.length; or < Ht; or++) {
|
|
1721
1721
|
var dr = Ke[or];
|
|
@@ -1724,18 +1724,18 @@ var nt = { exports: {} };
|
|
|
1724
1724
|
};
|
|
1725
1725
|
ue();
|
|
1726
1726
|
var le = function(ze) {
|
|
1727
|
-
|
|
1727
|
+
He[B] && console.info("Redefining LocalForage driver: " + B), He[B] = a, kr[B] = ze, C();
|
|
1728
1728
|
};
|
|
1729
1729
|
"_support" in a ? a._support && typeof a._support == "function" ? a._support().then(le, R) : le(!!a._support) : le(!0);
|
|
1730
|
-
} catch (
|
|
1731
|
-
R(
|
|
1730
|
+
} catch (ge) {
|
|
1731
|
+
R(ge);
|
|
1732
1732
|
}
|
|
1733
1733
|
});
|
|
1734
1734
|
return u(o, m, v), o;
|
|
1735
1735
|
}, n.prototype.driver = function() {
|
|
1736
1736
|
return this._driver || null;
|
|
1737
1737
|
}, n.prototype.getDriver = function(a, m, v) {
|
|
1738
|
-
var o =
|
|
1738
|
+
var o = He[a] ? d.resolve(He[a]) : d.reject(new Error("Driver not found."));
|
|
1739
1739
|
return u(o, m, v), o;
|
|
1740
1740
|
}, n.prototype.getSerializer = function(a) {
|
|
1741
1741
|
var m = d.resolve(cr);
|
|
@@ -1747,7 +1747,7 @@ var nt = { exports: {} };
|
|
|
1747
1747
|
return u(v, a, a), v;
|
|
1748
1748
|
}, n.prototype.setDriver = function(a, m, v) {
|
|
1749
1749
|
var o = this;
|
|
1750
|
-
|
|
1750
|
+
Fr(a) || (a = [a]);
|
|
1751
1751
|
var C = this._getSupportedDrivers(a);
|
|
1752
1752
|
function R() {
|
|
1753
1753
|
o._config.driver = o.driver();
|
|
@@ -1784,7 +1784,7 @@ var nt = { exports: {} };
|
|
|
1784
1784
|
return o._driverSet = d.reject(q), o._driverSet;
|
|
1785
1785
|
}), u(this._driverSet, m, v), this._driverSet;
|
|
1786
1786
|
}, n.prototype.supports = function(a) {
|
|
1787
|
-
return !!
|
|
1787
|
+
return !!kr[a];
|
|
1788
1788
|
}, n.prototype._extend = function(a) {
|
|
1789
1789
|
sr(this, a);
|
|
1790
1790
|
}, n.prototype._getSupportedDrivers = function(a) {
|
|
@@ -1795,47 +1795,53 @@ var nt = { exports: {} };
|
|
|
1795
1795
|
return m;
|
|
1796
1796
|
}, n.prototype._wrapLibraryMethodsWithReady = function() {
|
|
1797
1797
|
for (var a = 0, m = fr.length; a < m; a++)
|
|
1798
|
-
|
|
1798
|
+
Wt(this, fr[a]);
|
|
1799
1799
|
}, n.prototype.createInstance = function(a) {
|
|
1800
1800
|
return new n(a);
|
|
1801
1801
|
}, n;
|
|
1802
|
-
}(),
|
|
1803
|
-
S.exports =
|
|
1802
|
+
}(), Vt = new qt();
|
|
1803
|
+
S.exports = Vt;
|
|
1804
1804
|
}, { 3: 3 }] }, {}, [4])(4);
|
|
1805
1805
|
});
|
|
1806
|
-
})(
|
|
1807
|
-
var
|
|
1808
|
-
const
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1806
|
+
})(at);
|
|
1807
|
+
var gn = at.exports;
|
|
1808
|
+
const lt = /* @__PURE__ */ tn(gn);
|
|
1809
|
+
var Rr = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
1810
|
+
let ye;
|
|
1811
|
+
function ut() {
|
|
1812
|
+
const e = Rr.VITE_NODE_ENV;
|
|
1813
|
+
return ye == null ? e : (ye[e] ?? ye.development).localDbName ?? e;
|
|
1812
1814
|
}
|
|
1813
|
-
function
|
|
1814
|
-
|
|
1815
|
+
function qr() {
|
|
1816
|
+
const e = Rr.VITE_NODE_ENV;
|
|
1817
|
+
return console.log(`env var: ${e}`), ye == null ? "" : (ye[e] ?? ye.development).auth ?? "";
|
|
1815
1818
|
}
|
|
1816
|
-
function
|
|
1817
|
-
const t =
|
|
1818
|
-
|
|
1819
|
+
function yn(e) {
|
|
1820
|
+
const t = Rr.VITE_NODE_ENV;
|
|
1821
|
+
if (ye == null)
|
|
1822
|
+
return "";
|
|
1823
|
+
const l = ye[t] ?? ye.development;
|
|
1824
|
+
return e == null ? l.data ?? "" : l.other[e] ?? l.data ?? "";
|
|
1819
1825
|
}
|
|
1820
|
-
function
|
|
1821
|
-
return
|
|
1826
|
+
function ma() {
|
|
1827
|
+
return ye;
|
|
1822
1828
|
}
|
|
1823
|
-
function
|
|
1824
|
-
return
|
|
1829
|
+
function wn(e) {
|
|
1830
|
+
return ye = e, ye;
|
|
1825
1831
|
}
|
|
1826
1832
|
let Oe = null;
|
|
1827
|
-
|
|
1828
|
-
name:
|
|
1833
|
+
lt.config({
|
|
1834
|
+
name: ut()
|
|
1829
1835
|
});
|
|
1830
1836
|
function me() {
|
|
1831
|
-
const e =
|
|
1832
|
-
return (Oe == null || Oe.config.name != e) && (Oe =
|
|
1837
|
+
const e = ut();
|
|
1838
|
+
return (Oe == null || Oe.config.name != e) && (Oe = lt.createInstance({ name: e })), Oe;
|
|
1833
1839
|
}
|
|
1834
|
-
function
|
|
1840
|
+
function va() {
|
|
1835
1841
|
async function e(s) {
|
|
1836
1842
|
const g = me();
|
|
1837
|
-
(await g.keys()).filter((
|
|
1838
|
-
g.removeItem(
|
|
1843
|
+
(await g.keys()).filter((T) => T.startsWith(s)).forEach((T) => {
|
|
1844
|
+
g.removeItem(T);
|
|
1839
1845
|
});
|
|
1840
1846
|
}
|
|
1841
1847
|
async function t(s) {
|
|
@@ -1855,34 +1861,34 @@ function ma() {
|
|
|
1855
1861
|
};
|
|
1856
1862
|
}
|
|
1857
1863
|
let er;
|
|
1858
|
-
function
|
|
1864
|
+
function ga(e) {
|
|
1859
1865
|
return er(e)();
|
|
1860
1866
|
}
|
|
1861
1867
|
function Le(e) {
|
|
1862
1868
|
return er(e);
|
|
1863
1869
|
}
|
|
1864
|
-
function
|
|
1865
|
-
return er = (t) =>
|
|
1870
|
+
function bn(e) {
|
|
1871
|
+
return er = (t) => Sn({
|
|
1866
1872
|
...e,
|
|
1867
1873
|
...t
|
|
1868
1874
|
}), er;
|
|
1869
1875
|
}
|
|
1870
|
-
function
|
|
1876
|
+
function Sn(e) {
|
|
1871
1877
|
var t, l, S, s, g;
|
|
1872
1878
|
if (e.storeMode ?? (e.storeMode = ((l = (t = e.navigation) == null ? void 0 : t.findItem(e.nav)) == null ? void 0 : l.storeMode) ?? "session"), e.storageMode ?? (e.storageMode = ((s = (S = e.navigation) == null ? void 0 : S.findItem(e.nav)) == null ? void 0 : s.storageMode) ?? "local-cache"), e.storeName ?? (e.storeName = ((g = e.navigation) == null ? void 0 : g.findStoreName(e.nav)) ?? e.nav), e.storeName == null)
|
|
1873
1879
|
throw new Error("no store name provided");
|
|
1874
1880
|
if (e.storeMode == "whole-last-updated") {
|
|
1875
1881
|
if (e.api == null)
|
|
1876
1882
|
throw new Error("Must supply an api object to use store");
|
|
1877
|
-
return
|
|
1883
|
+
return Vr({ ...e, storeName: e.storeName ?? "" });
|
|
1878
1884
|
} else if (e.storeMode == "partial-last-updated") {
|
|
1879
1885
|
if (e.api == null)
|
|
1880
1886
|
throw new Error("Must supply an api object to use store");
|
|
1881
|
-
return
|
|
1887
|
+
return Vr({ ...e, storeName: e.storeName ?? "" });
|
|
1882
1888
|
} else
|
|
1883
|
-
return
|
|
1889
|
+
return En({ ...e, storeName: e.storeName ?? "" });
|
|
1884
1890
|
}
|
|
1885
|
-
const
|
|
1891
|
+
const An = (e) => {
|
|
1886
1892
|
let t = K(e.url) ?? void 0;
|
|
1887
1893
|
if (e.additionalUrl != null && (t == null ? t = e.additionalUrl : t = Be(t, e.additionalUrl)), e.id != null && (t != null && t.includes("{id}") ? t = t.replaceAll("{id}", e.id) : t = Be(t, e.id)), e.params != null) {
|
|
1888
1894
|
t ?? (t = "");
|
|
@@ -1893,22 +1899,22 @@ const Sn = (e) => {
|
|
|
1893
1899
|
}
|
|
1894
1900
|
return e.finalUrl = t, e.finalUrl ?? "";
|
|
1895
1901
|
};
|
|
1896
|
-
function
|
|
1897
|
-
return
|
|
1902
|
+
function En(e) {
|
|
1903
|
+
return et(e.storeName, () => {
|
|
1898
1904
|
var u;
|
|
1899
|
-
const t = de.utc().toSeconds() / 86400, l = z({}), S = z({}), s = e.storageMode == "local-cache", g = e.buildUrl ?? ((u = e.api) == null ? void 0 : u.buildUrl) ??
|
|
1905
|
+
const t = de.utc().toSeconds() / 86400, l = z({}), S = z({}), s = e.storageMode == "local-cache", g = e.buildUrl ?? ((u = e.api) == null ? void 0 : u.buildUrl) ?? An;
|
|
1900
1906
|
function x(r) {
|
|
1901
|
-
var i,
|
|
1907
|
+
var i, E;
|
|
1902
1908
|
let y = "";
|
|
1903
|
-
const
|
|
1904
|
-
return
|
|
1909
|
+
const I = r.params ?? {};
|
|
1910
|
+
return I != null && (y = Object.entries(I).sort(Ue.firstBy((w) => w[0])).map((w) => `${w[0]}=${JSON.stringify(w[1])}`).join("&")), `${e.storeName ?? "base"}_${((i = e.auth) == null ? void 0 : i.credentials.value.userID) ?? "no-user-id"}_${r.id ?? ((E = r.data) == null ? void 0 : E.id) ?? "no-item-id"}_${y ?? "no-params"}`;
|
|
1905
1911
|
}
|
|
1906
1912
|
async function P(r) {
|
|
1907
1913
|
r.additionalUrl ?? (r.additionalUrl = "/getAll"), g(r);
|
|
1908
|
-
const y = x(r),
|
|
1909
|
-
if (!
|
|
1914
|
+
const y = x(r), I = r.refresh;
|
|
1915
|
+
if (!I && l.value[y] !== void 0)
|
|
1910
1916
|
return l.value[y];
|
|
1911
|
-
if (!
|
|
1917
|
+
if (!I && s == !0) {
|
|
1912
1918
|
const i = await me().getItem(y);
|
|
1913
1919
|
if (i != null && (e.api == null || parseFloat(i.meta.storedOn) > t - 7))
|
|
1914
1920
|
return l.value[y] = i, i;
|
|
@@ -1920,35 +1926,35 @@ function An(e) {
|
|
|
1920
1926
|
i == null && (i = new Promise(async (w, M) => {
|
|
1921
1927
|
var b;
|
|
1922
1928
|
try {
|
|
1923
|
-
const
|
|
1929
|
+
const _ = await ((b = e.api) == null ? void 0 : b.getAll(r)), D = {
|
|
1924
1930
|
meta: { storedOn: t.toString() },
|
|
1925
|
-
data:
|
|
1926
|
-
count:
|
|
1927
|
-
filters: (
|
|
1931
|
+
data: _ == null ? void 0 : _.data,
|
|
1932
|
+
count: _ == null ? void 0 : _.count,
|
|
1933
|
+
filters: (_ == null ? void 0 : _.filters) ?? []
|
|
1928
1934
|
};
|
|
1929
1935
|
s == !0 && await me().setItem(y, D), w(D);
|
|
1930
|
-
} catch (
|
|
1931
|
-
M(
|
|
1936
|
+
} catch (_) {
|
|
1937
|
+
M(_);
|
|
1932
1938
|
} finally {
|
|
1933
1939
|
delete S.value[y];
|
|
1934
1940
|
}
|
|
1935
1941
|
}), S.value[y] = i);
|
|
1936
|
-
const
|
|
1937
|
-
return l.value[y] =
|
|
1938
|
-
data:
|
|
1939
|
-
filters:
|
|
1940
|
-
count:
|
|
1942
|
+
const E = await i;
|
|
1943
|
+
return l.value[y] = E, {
|
|
1944
|
+
data: E == null ? void 0 : E.data,
|
|
1945
|
+
filters: E == null ? void 0 : E.filters,
|
|
1946
|
+
count: E == null ? void 0 : E.count
|
|
1941
1947
|
};
|
|
1942
1948
|
} catch (i) {
|
|
1943
1949
|
throw i;
|
|
1944
1950
|
}
|
|
1945
1951
|
}
|
|
1946
|
-
async function
|
|
1952
|
+
async function T(r) {
|
|
1947
1953
|
r.additionalUrl ?? (r.additionalUrl = "/get"), g(r);
|
|
1948
|
-
const y = x(r),
|
|
1949
|
-
if (!
|
|
1954
|
+
const y = x(r), I = r.refresh;
|
|
1955
|
+
if (!I && l.value[y] !== void 0)
|
|
1950
1956
|
return l.value[y];
|
|
1951
|
-
if (!
|
|
1957
|
+
if (!I && s == !0) {
|
|
1952
1958
|
const i = await me().getItem(y);
|
|
1953
1959
|
if (i != null && (e.api == null || parseFloat(i.meta.storedOn) > t - 7))
|
|
1954
1960
|
return l.value[y] = i, { data: i.data };
|
|
@@ -1960,20 +1966,20 @@ function An(e) {
|
|
|
1960
1966
|
i == null && (i = new Promise(async (w, M) => {
|
|
1961
1967
|
var b;
|
|
1962
1968
|
try {
|
|
1963
|
-
let
|
|
1969
|
+
let _ = await ((b = e.api) == null ? void 0 : b.get(r));
|
|
1964
1970
|
const D = {
|
|
1965
1971
|
meta: { storedOn: t.toString() },
|
|
1966
|
-
data:
|
|
1972
|
+
data: _ == null ? void 0 : _.data
|
|
1967
1973
|
};
|
|
1968
1974
|
s == !0 && await me().setItem(y, D), w(D);
|
|
1969
|
-
} catch (
|
|
1970
|
-
M(
|
|
1975
|
+
} catch (_) {
|
|
1976
|
+
M(_);
|
|
1971
1977
|
} finally {
|
|
1972
1978
|
delete S.value[y];
|
|
1973
1979
|
}
|
|
1974
1980
|
}), S.value[y] = i);
|
|
1975
|
-
const
|
|
1976
|
-
return l.value[y] =
|
|
1981
|
+
const E = await i;
|
|
1982
|
+
return l.value[y] = E, { data: E.data };
|
|
1977
1983
|
} catch (i) {
|
|
1978
1984
|
throw i;
|
|
1979
1985
|
}
|
|
@@ -1982,54 +1988,54 @@ function An(e) {
|
|
|
1982
1988
|
var i;
|
|
1983
1989
|
r.additionalUrl ?? (r.additionalUrl = "/patch"), g(r);
|
|
1984
1990
|
const y = x(r);
|
|
1985
|
-
let
|
|
1991
|
+
let I;
|
|
1986
1992
|
if (e.api != null)
|
|
1987
1993
|
try {
|
|
1988
|
-
let
|
|
1989
|
-
|
|
1990
|
-
} catch (
|
|
1991
|
-
throw
|
|
1994
|
+
let E = await e.api.patch(r);
|
|
1995
|
+
I = E == null ? void 0 : E.data;
|
|
1996
|
+
} catch (E) {
|
|
1997
|
+
throw E;
|
|
1992
1998
|
}
|
|
1993
1999
|
else
|
|
1994
|
-
|
|
1995
|
-
if (
|
|
1996
|
-
let
|
|
2000
|
+
I = r.data;
|
|
2001
|
+
if (I != null) {
|
|
2002
|
+
let E = {
|
|
1997
2003
|
meta: { storedOn: t.toString() },
|
|
1998
|
-
data: { ...(i = l.value[y]) == null ? void 0 : i.data, ...
|
|
2004
|
+
data: { ...(i = l.value[y]) == null ? void 0 : i.data, ...I }
|
|
1999
2005
|
};
|
|
2000
|
-
return l.value[y] =
|
|
2006
|
+
return l.value[y] = E, s == !0 && await me().setItem(y, E), I.id != null && I.rowVersion != null && Object.entries(l.value).forEach((M) => {
|
|
2001
2007
|
const b = M[1].data;
|
|
2002
2008
|
if (b != null)
|
|
2003
2009
|
if (Array.isArray(b))
|
|
2004
|
-
for (let
|
|
2005
|
-
b[
|
|
2010
|
+
for (let _ = 0; _ < b.length; _++)
|
|
2011
|
+
b[_].id == I.id && b.splice(_, 1, E.data);
|
|
2006
2012
|
else
|
|
2007
|
-
b.id ==
|
|
2008
|
-
}),
|
|
2013
|
+
b.id == I.id && (l.value[M[0]] = E);
|
|
2014
|
+
}), E.data;
|
|
2009
2015
|
}
|
|
2010
|
-
return
|
|
2016
|
+
return I;
|
|
2011
2017
|
}
|
|
2012
2018
|
async function $(r) {
|
|
2013
2019
|
r.additionalUrl ?? (r.additionalUrl = "/post"), g(r);
|
|
2014
2020
|
const y = x(r);
|
|
2015
|
-
let
|
|
2021
|
+
let I;
|
|
2016
2022
|
if (e.api != null)
|
|
2017
2023
|
try {
|
|
2018
2024
|
let i = await e.api.post(r);
|
|
2019
|
-
|
|
2025
|
+
I = i == null ? void 0 : i.data;
|
|
2020
2026
|
} catch (i) {
|
|
2021
2027
|
throw i;
|
|
2022
2028
|
}
|
|
2023
2029
|
else
|
|
2024
|
-
|
|
2025
|
-
if (
|
|
2030
|
+
I = r.data;
|
|
2031
|
+
if (I != null) {
|
|
2026
2032
|
let i = {
|
|
2027
2033
|
meta: { storedOn: t.toString() },
|
|
2028
|
-
data:
|
|
2034
|
+
data: I
|
|
2029
2035
|
};
|
|
2030
2036
|
return s == !0 && await me().setItem(y, i), l.value[y] = i, i.data;
|
|
2031
2037
|
}
|
|
2032
|
-
return
|
|
2038
|
+
return I;
|
|
2033
2039
|
}
|
|
2034
2040
|
async function d(r) {
|
|
2035
2041
|
var i;
|
|
@@ -2037,20 +2043,20 @@ function An(e) {
|
|
|
2037
2043
|
const y = x(r);
|
|
2038
2044
|
if (e.api != null)
|
|
2039
2045
|
try {
|
|
2040
|
-
let
|
|
2041
|
-
if (
|
|
2042
|
-
return
|
|
2043
|
-
} catch (
|
|
2044
|
-
throw
|
|
2046
|
+
let E = await e.api.deleteItem(r);
|
|
2047
|
+
if (E != null)
|
|
2048
|
+
return E;
|
|
2049
|
+
} catch (E) {
|
|
2050
|
+
throw E;
|
|
2045
2051
|
}
|
|
2046
2052
|
delete l.value[y];
|
|
2047
|
-
const
|
|
2048
|
-
|
|
2053
|
+
const I = ((i = r.data) == null ? void 0 : i.id) ?? r.id;
|
|
2054
|
+
I != null && Object.entries(l.value).forEach((w) => {
|
|
2049
2055
|
const M = w[1].data;
|
|
2050
2056
|
if (M != null)
|
|
2051
2057
|
if (Array.isArray(M))
|
|
2052
2058
|
for (let b = 0; b < M.length; b++)
|
|
2053
|
-
M[b].id ==
|
|
2059
|
+
M[b].id == I && M.splice(b, 1);
|
|
2054
2060
|
else
|
|
2055
2061
|
delete l.value[w[0]];
|
|
2056
2062
|
}), s == !0 && await me().removeItem(y);
|
|
@@ -2066,7 +2072,7 @@ function An(e) {
|
|
|
2066
2072
|
}
|
|
2067
2073
|
return {
|
|
2068
2074
|
deleteItem: d,
|
|
2069
|
-
get:
|
|
2075
|
+
get: T,
|
|
2070
2076
|
getAll: P,
|
|
2071
2077
|
patch: N,
|
|
2072
2078
|
post: $,
|
|
@@ -2076,15 +2082,15 @@ function An(e) {
|
|
|
2076
2082
|
};
|
|
2077
2083
|
});
|
|
2078
2084
|
}
|
|
2079
|
-
function
|
|
2080
|
-
return
|
|
2085
|
+
function Vr(e) {
|
|
2086
|
+
return et(e.storeName, () => {
|
|
2081
2087
|
const t = z(), l = z(0), S = de.utc().toSeconds() / 3600, s = z(), g = z(), x = z({}), P = e.storageMode == "local-cache";
|
|
2082
|
-
function
|
|
2088
|
+
function T() {
|
|
2083
2089
|
var i;
|
|
2084
2090
|
return `${e.storeName}_${((i = e.auth) == null ? void 0 : i.credentials.value.userID) ?? "no-user-id"}`;
|
|
2085
2091
|
}
|
|
2086
2092
|
async function N() {
|
|
2087
|
-
P == !0 && await me().setItem(
|
|
2093
|
+
P == !0 && await me().setItem(T(), {
|
|
2088
2094
|
meta: g.value,
|
|
2089
2095
|
data: t.value,
|
|
2090
2096
|
count: l.value,
|
|
@@ -2092,15 +2098,15 @@ function qr(e) {
|
|
|
2092
2098
|
});
|
|
2093
2099
|
}
|
|
2094
2100
|
function $(i) {
|
|
2095
|
-
const
|
|
2096
|
-
return x.value[
|
|
2097
|
-
var b,
|
|
2101
|
+
const E = T();
|
|
2102
|
+
return x.value[E] || (x.value[E] = new Promise(async (w, M) => {
|
|
2103
|
+
var b, _;
|
|
2098
2104
|
try {
|
|
2099
|
-
let D = await ((
|
|
2105
|
+
let D = await ((_ = e.api) == null ? void 0 : _.getAll({
|
|
2100
2106
|
additionalUrl: "/getAll",
|
|
2101
2107
|
nav: i.nav,
|
|
2102
2108
|
params: {
|
|
2103
|
-
lastUpdate: ((b = g.value) == null ? void 0 : b.lastUpdate) ??
|
|
2109
|
+
lastUpdate: ((b = g.value) == null ? void 0 : b.lastUpdate) ?? un()
|
|
2104
2110
|
}
|
|
2105
2111
|
}));
|
|
2106
2112
|
D == null ? M(D) : (t.value ?? (t.value = []), D.data.forEach((L) => {
|
|
@@ -2114,13 +2120,13 @@ function qr(e) {
|
|
|
2114
2120
|
} catch (D) {
|
|
2115
2121
|
M(D);
|
|
2116
2122
|
} finally {
|
|
2117
|
-
delete x.value[
|
|
2123
|
+
delete x.value[E];
|
|
2118
2124
|
}
|
|
2119
|
-
})), x.value[
|
|
2125
|
+
})), x.value[E];
|
|
2120
2126
|
}
|
|
2121
2127
|
async function d(i) {
|
|
2122
|
-
var M, b,
|
|
2123
|
-
const
|
|
2128
|
+
var M, b, _;
|
|
2129
|
+
const E = T(), w = i.refresh;
|
|
2124
2130
|
if (!w && t.value != null)
|
|
2125
2131
|
return {
|
|
2126
2132
|
count: (M = t.value) == null ? void 0 : M.length,
|
|
@@ -2128,7 +2134,7 @@ function qr(e) {
|
|
|
2128
2134
|
filters: []
|
|
2129
2135
|
};
|
|
2130
2136
|
if (!w && P == !0) {
|
|
2131
|
-
const D = await me().getItem(
|
|
2137
|
+
const D = await me().getItem(E);
|
|
2132
2138
|
if (D != null && parseFloat(D.meta.storedOn) > S - 7)
|
|
2133
2139
|
return t.value = D.data, l.value = D.data.length, s.value = D.filters ?? [], g.value = D.meta, {
|
|
2134
2140
|
count: (b = t.value) == null ? void 0 : b.length,
|
|
@@ -2138,7 +2144,7 @@ function qr(e) {
|
|
|
2138
2144
|
}
|
|
2139
2145
|
if (e.api == null)
|
|
2140
2146
|
return {
|
|
2141
|
-
count: (
|
|
2147
|
+
count: (_ = t.value) == null ? void 0 : _.length,
|
|
2142
2148
|
data: t.value ?? [],
|
|
2143
2149
|
filters: s.value
|
|
2144
2150
|
};
|
|
@@ -2151,8 +2157,8 @@ function qr(e) {
|
|
|
2151
2157
|
}
|
|
2152
2158
|
}
|
|
2153
2159
|
async function h(i) {
|
|
2154
|
-
var b,
|
|
2155
|
-
const
|
|
2160
|
+
var b, _, D, L;
|
|
2161
|
+
const E = T(), w = i.id ?? ((b = i.data) == null ? void 0 : b.id);
|
|
2156
2162
|
if (w == null)
|
|
2157
2163
|
throw new Error("no id provided");
|
|
2158
2164
|
let M = i.refresh;
|
|
@@ -2162,10 +2168,10 @@ function qr(e) {
|
|
|
2162
2168
|
return { data: f };
|
|
2163
2169
|
}
|
|
2164
2170
|
if (!M && P == !0) {
|
|
2165
|
-
const f = await me().getItem(
|
|
2171
|
+
const f = await me().getItem(E);
|
|
2166
2172
|
if (f != null && parseFloat(f.meta.storedOn) > S - 12) {
|
|
2167
2173
|
t.value = f.data, l.value = f.data.length, s.value = f.filters ?? [], g.value = f.meta;
|
|
2168
|
-
let A = (
|
|
2174
|
+
let A = (_ = t.value) == null ? void 0 : _.find((J) => J.id == i.id);
|
|
2169
2175
|
if (A != null)
|
|
2170
2176
|
return { data: A };
|
|
2171
2177
|
}
|
|
@@ -2185,38 +2191,38 @@ function qr(e) {
|
|
|
2185
2191
|
async function u(i) {
|
|
2186
2192
|
var w, M, b;
|
|
2187
2193
|
i.additionalUrl ?? (i.additionalUrl = "/patch");
|
|
2188
|
-
let
|
|
2194
|
+
let E;
|
|
2189
2195
|
if (e.api != null)
|
|
2190
2196
|
try {
|
|
2191
|
-
let
|
|
2192
|
-
|
|
2193
|
-
} catch (
|
|
2194
|
-
let D =
|
|
2197
|
+
let _ = await e.api.patch(i);
|
|
2198
|
+
E = { ...i.data, ..._ == null ? void 0 : _.data };
|
|
2199
|
+
} catch (_) {
|
|
2200
|
+
let D = _;
|
|
2195
2201
|
throw new Error(D.message ?? "Patch Problem");
|
|
2196
2202
|
}
|
|
2197
2203
|
else
|
|
2198
|
-
|
|
2199
|
-
if (
|
|
2200
|
-
let
|
|
2201
|
-
|
|
2204
|
+
E = i.data;
|
|
2205
|
+
if (E != null) {
|
|
2206
|
+
let _ = (w = t.value) == null ? void 0 : w.findIndex((D) => D.id == E.id);
|
|
2207
|
+
_ != null && _ >= 0 && (t.value ?? (t.value = []), (M = t.value) == null || M.splice(_, 1, E), await N());
|
|
2202
2208
|
}
|
|
2203
|
-
return (b = t.value) == null ? void 0 : b.find((
|
|
2209
|
+
return (b = t.value) == null ? void 0 : b.find((_) => _.id == (i.id ?? i.data.id));
|
|
2204
2210
|
}
|
|
2205
2211
|
async function r(i) {
|
|
2206
2212
|
var w, M;
|
|
2207
2213
|
i.additionalUrl ?? (i.additionalUrl = "/post");
|
|
2208
|
-
let
|
|
2214
|
+
let E;
|
|
2209
2215
|
if (e.api != null)
|
|
2210
2216
|
try {
|
|
2211
2217
|
let b = await e.api.post(i);
|
|
2212
|
-
|
|
2218
|
+
E = b == null ? void 0 : b.data;
|
|
2213
2219
|
} catch (b) {
|
|
2214
|
-
let
|
|
2215
|
-
throw new Error(
|
|
2220
|
+
let _ = b;
|
|
2221
|
+
throw new Error(_.message ?? "Patch Problem");
|
|
2216
2222
|
}
|
|
2217
2223
|
else
|
|
2218
|
-
|
|
2219
|
-
return
|
|
2224
|
+
E = i.data;
|
|
2225
|
+
return E != null && (t.value ?? (t.value = []), (w = t.value) == null || w.unshift(E), l.value += 1, await N()), (M = t.value) == null ? void 0 : M.find((b) => b.id == (i.id ?? i.data.id));
|
|
2220
2226
|
}
|
|
2221
2227
|
async function y(i) {
|
|
2222
2228
|
var w, M;
|
|
@@ -2226,17 +2232,17 @@ function qr(e) {
|
|
|
2226
2232
|
if (b != null)
|
|
2227
2233
|
return b;
|
|
2228
2234
|
} catch (b) {
|
|
2229
|
-
let
|
|
2230
|
-
throw new Error(
|
|
2235
|
+
let _ = b;
|
|
2236
|
+
throw new Error(_.message ?? "Patch Problem");
|
|
2231
2237
|
}
|
|
2232
|
-
const
|
|
2233
|
-
if (
|
|
2234
|
-
let b = (w = t.value) == null ? void 0 : w.findIndex((
|
|
2238
|
+
const E = i.id ?? i.data.id;
|
|
2239
|
+
if (E != null) {
|
|
2240
|
+
let b = (w = t.value) == null ? void 0 : w.findIndex((_) => _.id == E);
|
|
2235
2241
|
b != null && b >= 0 && (t.value ?? (t.value = []), (M = t.value) == null || M.splice(b, 1), await N());
|
|
2236
2242
|
}
|
|
2237
2243
|
}
|
|
2238
|
-
async function
|
|
2239
|
-
var
|
|
2244
|
+
async function I(i) {
|
|
2245
|
+
var E;
|
|
2240
2246
|
if (i.additionalUrl ?? (i.additionalUrl = `/patch/restore?id=${i.data.id}`), e.api != null)
|
|
2241
2247
|
try {
|
|
2242
2248
|
await e.api.patch(i);
|
|
@@ -2250,7 +2256,7 @@ function qr(e) {
|
|
|
2250
2256
|
let M = w;
|
|
2251
2257
|
throw new Error(M.message ?? "Problem");
|
|
2252
2258
|
}
|
|
2253
|
-
return (
|
|
2259
|
+
return (E = t.value) == null ? void 0 : E.find((w) => w.id == (i.id ?? i.data.id));
|
|
2254
2260
|
}
|
|
2255
2261
|
return {
|
|
2256
2262
|
deleteItem: y,
|
|
@@ -2258,12 +2264,12 @@ function qr(e) {
|
|
|
2258
2264
|
getAll: d,
|
|
2259
2265
|
patch: u,
|
|
2260
2266
|
post: r,
|
|
2261
|
-
restore:
|
|
2267
|
+
restore: I
|
|
2262
2268
|
};
|
|
2263
2269
|
});
|
|
2264
2270
|
}
|
|
2265
2271
|
let Ar;
|
|
2266
|
-
function
|
|
2272
|
+
function Er() {
|
|
2267
2273
|
return Ar;
|
|
2268
2274
|
}
|
|
2269
2275
|
function In(e) {
|
|
@@ -2281,14 +2287,14 @@ function In(e) {
|
|
|
2281
2287
|
return r == null && (e == null ? void 0 : e.findPath) != null && (r = e.findPath(u.nav)), u.additionalUrl != null && (r == null ? r = u.additionalUrl : r = Be(r, u.additionalUrl)), y != null && (r != null && r.includes("{id}") ? r = r.replaceAll("{id}", y) : r = Be(r, y)), u.params != null && (r = `${r}?${l(u.params)}`), u.finalUrl = r, u.finalUrl ?? "";
|
|
2282
2288
|
}
|
|
2283
2289
|
function P(u) {
|
|
2284
|
-
var y,
|
|
2290
|
+
var y, I;
|
|
2285
2291
|
let r = { ...u.headers };
|
|
2286
|
-
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 ${(
|
|
2292
|
+
return u.proxyID && (r.ManagedCompanyAccountID ?? (r.ManagedCompanyAccountID = u.proxyID)), (e == null ? void 0 : e.useBearerToken) != !1 && ((y = e == null ? void 0 : e.auth) == null ? void 0 : y.isLoggedIn.value) == !0 && (r.authorization ?? (r.authorization = `bearer ${(I = e == null ? void 0 : e.auth) == null ? void 0 : I.credentials.value.token}`)), r["Content-Type"] ?? (r["Content-Type"] = u.contentType ?? (e == null ? void 0 : e.defaultContentType) ?? "application/json"), r;
|
|
2287
2293
|
}
|
|
2288
|
-
async function
|
|
2289
|
-
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0,
|
|
2290
|
-
let i = u.finalUrl,
|
|
2291
|
-
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (
|
|
2294
|
+
async function T(u) {
|
|
2295
|
+
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, I = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2296
|
+
let i = u.finalUrl, E = u.headers;
|
|
2297
|
+
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
|
|
2292
2298
|
return console.log(`DEMO: Get from ${i}`), s.get(u);
|
|
2293
2299
|
console.log(`Get from ${i}`);
|
|
2294
2300
|
let w;
|
|
@@ -2297,7 +2303,7 @@ function In(e) {
|
|
|
2297
2303
|
method: "GET",
|
|
2298
2304
|
mode: "cors",
|
|
2299
2305
|
cache: "no-cache",
|
|
2300
|
-
headers:
|
|
2306
|
+
headers: E
|
|
2301
2307
|
}), !w.ok) {
|
|
2302
2308
|
if (w.status == 401)
|
|
2303
2309
|
throw {
|
|
@@ -2308,7 +2314,7 @@ function In(e) {
|
|
|
2308
2314
|
let M = await w.text();
|
|
2309
2315
|
throw new Error(M ?? w.statusText ?? "Get error");
|
|
2310
2316
|
}
|
|
2311
|
-
if (
|
|
2317
|
+
if (I)
|
|
2312
2318
|
return await w.text();
|
|
2313
2319
|
if (y)
|
|
2314
2320
|
return await w.json();
|
|
@@ -2321,9 +2327,9 @@ function In(e) {
|
|
|
2321
2327
|
}
|
|
2322
2328
|
}
|
|
2323
2329
|
async function N(u) {
|
|
2324
|
-
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0,
|
|
2325
|
-
let i = u.finalUrl,
|
|
2326
|
-
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (
|
|
2330
|
+
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, I = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2331
|
+
let i = u.finalUrl, E = u.headers;
|
|
2332
|
+
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
|
|
2327
2333
|
return console.log(`DEMO: Get all from ${i}`), s.getAll(u);
|
|
2328
2334
|
console.log(`Get all from ${i}`);
|
|
2329
2335
|
let w;
|
|
@@ -2332,7 +2338,7 @@ function In(e) {
|
|
|
2332
2338
|
method: "GET",
|
|
2333
2339
|
mode: "cors",
|
|
2334
2340
|
cache: "no-cache",
|
|
2335
|
-
headers:
|
|
2341
|
+
headers: E
|
|
2336
2342
|
}), !w.ok) {
|
|
2337
2343
|
if (w.status == 401)
|
|
2338
2344
|
throw {
|
|
@@ -2343,7 +2349,7 @@ function In(e) {
|
|
|
2343
2349
|
let M = await w.text();
|
|
2344
2350
|
throw new Error(M ?? w.statusText ?? "Get all error");
|
|
2345
2351
|
}
|
|
2346
|
-
if (
|
|
2352
|
+
if (I)
|
|
2347
2353
|
return await w.text();
|
|
2348
2354
|
if (y)
|
|
2349
2355
|
return await w.json();
|
|
@@ -2356,9 +2362,9 @@ function In(e) {
|
|
|
2356
2362
|
}
|
|
2357
2363
|
}
|
|
2358
2364
|
async function $(u) {
|
|
2359
|
-
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0,
|
|
2360
|
-
let i = u.finalUrl,
|
|
2361
|
-
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (
|
|
2365
|
+
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, I = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2366
|
+
let i = u.finalUrl, E = u.headers;
|
|
2367
|
+
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
|
|
2362
2368
|
return console.log(`DEMO: Post to ${i}`), s.post(u);
|
|
2363
2369
|
console.log(`Post to ${i}`);
|
|
2364
2370
|
let w;
|
|
@@ -2367,7 +2373,7 @@ function In(e) {
|
|
|
2367
2373
|
method: "POST",
|
|
2368
2374
|
mode: "cors",
|
|
2369
2375
|
cache: "no-cache",
|
|
2370
|
-
headers:
|
|
2376
|
+
headers: E,
|
|
2371
2377
|
body: JSON.stringify(u.data)
|
|
2372
2378
|
}), !w.ok) {
|
|
2373
2379
|
if (w.status == 401)
|
|
@@ -2379,7 +2385,7 @@ function In(e) {
|
|
|
2379
2385
|
let M = await w.text();
|
|
2380
2386
|
throw new Error(M ?? w.statusText ?? "Post error!");
|
|
2381
2387
|
}
|
|
2382
|
-
if (
|
|
2388
|
+
if (I)
|
|
2383
2389
|
return await w.text();
|
|
2384
2390
|
if (y)
|
|
2385
2391
|
return await w.json();
|
|
@@ -2392,9 +2398,9 @@ function In(e) {
|
|
|
2392
2398
|
}
|
|
2393
2399
|
}
|
|
2394
2400
|
async function d(u) {
|
|
2395
|
-
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0,
|
|
2396
|
-
let i = u.finalUrl,
|
|
2397
|
-
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (
|
|
2401
|
+
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, I = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2402
|
+
let i = u.finalUrl, E = u.headers;
|
|
2403
|
+
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
|
|
2398
2404
|
return console.log(`DEMO: Patch to ${i}`), s.patch(u);
|
|
2399
2405
|
console.log(`Patch to ${i}`);
|
|
2400
2406
|
let w;
|
|
@@ -2403,7 +2409,7 @@ function In(e) {
|
|
|
2403
2409
|
method: "PATCH",
|
|
2404
2410
|
mode: "cors",
|
|
2405
2411
|
cache: "no-cache",
|
|
2406
|
-
headers:
|
|
2412
|
+
headers: E,
|
|
2407
2413
|
body: JSON.stringify(u.data)
|
|
2408
2414
|
}), !w.ok) {
|
|
2409
2415
|
if (w.status == 401)
|
|
@@ -2415,7 +2421,7 @@ function In(e) {
|
|
|
2415
2421
|
let M = await w.text();
|
|
2416
2422
|
throw new Error(M ?? w.statusText ?? "Patch error!");
|
|
2417
2423
|
}
|
|
2418
|
-
if (
|
|
2424
|
+
if (I)
|
|
2419
2425
|
return await w.text();
|
|
2420
2426
|
if (y)
|
|
2421
2427
|
return await w.json();
|
|
@@ -2429,8 +2435,8 @@ function In(e) {
|
|
|
2429
2435
|
}
|
|
2430
2436
|
async function h(u) {
|
|
2431
2437
|
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0;
|
|
2432
|
-
let y = u.finalUrl,
|
|
2433
|
-
if (y == null && (y = S(u)), u.overrideHeaders !== !0 && (
|
|
2438
|
+
let y = u.finalUrl, I = u.headers;
|
|
2439
|
+
if (y == null && (y = S(u)), u.overrideHeaders !== !0 && (I = t(u)), s != null && s.isDemoing.value)
|
|
2434
2440
|
return console.log(`DEMO: Delete ${y}`), s.deleteItem(u);
|
|
2435
2441
|
console.log(`Delete ${y}`);
|
|
2436
2442
|
let i;
|
|
@@ -2439,7 +2445,7 @@ function In(e) {
|
|
|
2439
2445
|
method: "DELETE",
|
|
2440
2446
|
mode: "cors",
|
|
2441
2447
|
cache: "no-cache",
|
|
2442
|
-
headers:
|
|
2448
|
+
headers: I,
|
|
2443
2449
|
body: JSON.stringify(u.data)
|
|
2444
2450
|
}), i.status == 401)
|
|
2445
2451
|
throw {
|
|
@@ -2448,11 +2454,11 @@ function In(e) {
|
|
|
2448
2454
|
message: i.statusText
|
|
2449
2455
|
};
|
|
2450
2456
|
return i.status == 200 ? void 0 : i.statusText;
|
|
2451
|
-
} catch (
|
|
2452
|
-
const w = `${(i == null ? void 0 : i.status) ?? ""} ${(i == null ? void 0 : i.statusText) ?? ""} ${
|
|
2457
|
+
} catch (E) {
|
|
2458
|
+
const w = `${(i == null ? void 0 : i.status) ?? ""} ${(i == null ? void 0 : i.statusText) ?? ""} ${E.message}`;
|
|
2453
2459
|
if (!r)
|
|
2454
2460
|
return w;
|
|
2455
|
-
throw
|
|
2461
|
+
throw E.code == 401 ? E : new Error(`${i.status} ${i.statusText} ${E.message}`);
|
|
2456
2462
|
}
|
|
2457
2463
|
}
|
|
2458
2464
|
return Ar = {
|
|
@@ -2460,25 +2466,25 @@ function In(e) {
|
|
|
2460
2466
|
buildQuery: l,
|
|
2461
2467
|
buildUrl: S,
|
|
2462
2468
|
deleteItem: h,
|
|
2463
|
-
get:
|
|
2469
|
+
get: T,
|
|
2464
2470
|
getAll: N,
|
|
2465
2471
|
patch: d,
|
|
2466
2472
|
post: $
|
|
2467
2473
|
}, Ar;
|
|
2468
2474
|
}
|
|
2469
|
-
function
|
|
2470
|
-
const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors: S, isLoading: s, doAction: g, logError: x } =
|
|
2475
|
+
function it(e) {
|
|
2476
|
+
const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors: S, isLoading: s, doAction: g, logError: x } = rn(e);
|
|
2471
2477
|
function P(r) {
|
|
2472
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 delete this item?" : void 0);
|
|
2473
2479
|
let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2474
|
-
const
|
|
2480
|
+
const I = (e == null ? void 0 : e.items) ?? [];
|
|
2475
2481
|
return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null ? r.onDeleteAsync ?? (r.onDeleteAsync = () => y().deleteItem(r)) : r.onDeleteAsync ?? (r.onDeleteAsync = () => {
|
|
2476
2482
|
var w;
|
|
2477
2483
|
const i = r.id ?? ((w = r.data) == null ? void 0 : w.id);
|
|
2478
2484
|
if (i == null)
|
|
2479
2485
|
return Promise.resolve("No id found in delete action");
|
|
2480
|
-
const
|
|
2481
|
-
return
|
|
2486
|
+
const E = I.findIndex((M) => M.id == i);
|
|
2487
|
+
return E >= 0 && I.splice(E, 1), Promise.resolve(void 0);
|
|
2482
2488
|
}), g(async () => {
|
|
2483
2489
|
let i;
|
|
2484
2490
|
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);
|
|
@@ -2491,14 +2497,14 @@ function ut(e) {
|
|
|
2491
2497
|
throwError: r.throwError ?? (e == null ? void 0 : e.throwError)
|
|
2492
2498
|
});
|
|
2493
2499
|
}
|
|
2494
|
-
function
|
|
2500
|
+
function T(r) {
|
|
2495
2501
|
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);
|
|
2496
2502
|
let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2497
|
-
const
|
|
2503
|
+
const I = (e == null ? void 0 : e.items) ?? [];
|
|
2498
2504
|
return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null ? r.onGetAsync ?? (r.onGetAsync = async () => (await y().get(r)).data) : r.onGetAsync ?? (r.onGetAsync = () => {
|
|
2499
|
-
var
|
|
2500
|
-
const i = r.id ?? ((
|
|
2501
|
-
return i == null ? Promise.resolve(void 0) : Promise.resolve(
|
|
2505
|
+
var E;
|
|
2506
|
+
const i = r.id ?? ((E = r.data) == null ? void 0 : E.id);
|
|
2507
|
+
return i == null ? Promise.resolve(void 0) : Promise.resolve(I.find((w) => w.id == i));
|
|
2502
2508
|
}), g(async () => {
|
|
2503
2509
|
let i;
|
|
2504
2510
|
return r.onGetAsync != null && (i = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (i = await r.onGetSuccessAsync(i, r)), i;
|
|
@@ -2514,8 +2520,8 @@ function ut(e) {
|
|
|
2514
2520
|
function N(r) {
|
|
2515
2521
|
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);
|
|
2516
2522
|
let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2517
|
-
const
|
|
2518
|
-
return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null ? r.onGetAsync ?? (r.onGetAsync = () => y().getAll(r)) : r.onGetAsync ?? (r.onGetAsync = () => Promise.resolve(
|
|
2523
|
+
const I = (e == null ? void 0 : e.items) ?? [];
|
|
2524
|
+
return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null ? r.onGetAsync ?? (r.onGetAsync = () => y().getAll(r)) : r.onGetAsync ?? (r.onGetAsync = () => Promise.resolve(I)), g(async () => {
|
|
2519
2525
|
let i;
|
|
2520
2526
|
return r.onGetAsync != null && (i = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (i = await r.onGetSuccessAsync(i, r)), i;
|
|
2521
2527
|
}, {
|
|
@@ -2531,8 +2537,8 @@ function ut(e) {
|
|
|
2531
2537
|
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);
|
|
2532
2538
|
let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2533
2539
|
return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null && (r.onRestoreAsync ?? (r.onRestoreAsync = () => y().restore(r))), g(async () => {
|
|
2534
|
-
let
|
|
2535
|
-
return r.onCanRestoreAsync != null && (
|
|
2540
|
+
let I, i;
|
|
2541
|
+
return r.onCanRestoreAsync != null && (I = await r.onCanRestoreAsync(r.data)), I == null && r.onRestoreAsync != null && (i = await r.onRestoreAsync(r.data)), i != null && r.onRestoreSuccessAsync != null && await r.onRestoreSuccessAsync(i), x(I), i;
|
|
2536
2542
|
}, {
|
|
2537
2543
|
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
2538
2544
|
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
@@ -2545,13 +2551,13 @@ function ut(e) {
|
|
|
2545
2551
|
function d(r) {
|
|
2546
2552
|
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);
|
|
2547
2553
|
let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2548
|
-
const
|
|
2554
|
+
const I = (e == null ? void 0 : e.items) ?? [];
|
|
2549
2555
|
return r.onGetSaveAsync ?? (r.onGetSaveAsync = (i) => i), r.onCanSaveAsync ?? (r.onCanSaveAsync = () => Promise.resolve(void 0)), y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null ? r.onSaveAsync ?? (r.onSaveAsync = async () => {
|
|
2550
2556
|
var i;
|
|
2551
2557
|
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);
|
|
2552
2558
|
}) : r.onSaveAsync ?? (r.onSaveAsync = (i) => {
|
|
2553
|
-
const
|
|
2554
|
-
return
|
|
2559
|
+
const E = I.findIndex((w) => w.id == i.id);
|
|
2560
|
+
return E >= 0 ? I.splice(E, 1, i) : I.push(i), Promise.resolve(i);
|
|
2555
2561
|
}), g(async () => {
|
|
2556
2562
|
let i;
|
|
2557
2563
|
if (r.onGetSaveAsync != null && (i = await r.onGetSaveAsync(r.data)), i == null)
|
|
@@ -2561,8 +2567,8 @@ function ut(e) {
|
|
|
2561
2567
|
if (x(w), w != null)
|
|
2562
2568
|
return;
|
|
2563
2569
|
}
|
|
2564
|
-
let
|
|
2565
|
-
return r.onSaveAsync != null && (
|
|
2570
|
+
let E;
|
|
2571
|
+
return r.onSaveAsync != null && (E = await r.onSaveAsync(i), E = E.data != null ? E.data : E), r.onSaveSuccessAsync != null && (E = await r.onSaveSuccessAsync(E)), E;
|
|
2566
2572
|
}, {
|
|
2567
2573
|
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
2568
2574
|
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
@@ -2573,10 +2579,10 @@ function ut(e) {
|
|
|
2573
2579
|
});
|
|
2574
2580
|
}
|
|
2575
2581
|
function h(r) {
|
|
2576
|
-
return r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), g(async () => await (r.api ??
|
|
2582
|
+
return r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), g(async () => await (r.api ?? Er()).get(r), { ...e, ...r });
|
|
2577
2583
|
}
|
|
2578
2584
|
function u(r) {
|
|
2579
|
-
return r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), g(async () => await (r.api ??
|
|
2585
|
+
return r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), g(async () => await (r.api ?? Er()).post(r), { ...e, ...r });
|
|
2580
2586
|
}
|
|
2581
2587
|
return {
|
|
2582
2588
|
actionLoadingMsg: l,
|
|
@@ -2587,26 +2593,26 @@ function ut(e) {
|
|
|
2587
2593
|
deleteItem: P,
|
|
2588
2594
|
doAction: g,
|
|
2589
2595
|
getAllItems: N,
|
|
2590
|
-
getItem:
|
|
2596
|
+
getItem: T,
|
|
2591
2597
|
isLoading: s,
|
|
2592
2598
|
logError: x,
|
|
2593
2599
|
restoreItem: $,
|
|
2594
2600
|
saveItem: d
|
|
2595
2601
|
};
|
|
2596
2602
|
}
|
|
2597
|
-
let hr = "Australia/Melbourne",
|
|
2603
|
+
let hr = "Australia/Melbourne", Ir;
|
|
2598
2604
|
const Hr = "auth-credentials-state";
|
|
2599
|
-
function
|
|
2600
|
-
return
|
|
2605
|
+
function Dn() {
|
|
2606
|
+
return Ir;
|
|
2601
2607
|
}
|
|
2602
|
-
function
|
|
2608
|
+
function xn(e) {
|
|
2603
2609
|
const t = e.expiryTokenFormat ?? "d/MM/yyyy h:mm:ss a";
|
|
2604
2610
|
let l = z(localStorage.getItem(Hr) ?? "");
|
|
2605
2611
|
l.value.length == 0 && S();
|
|
2606
2612
|
function S() {
|
|
2607
2613
|
l.value = Math.random().toString(36).substring(4, 19) + Math.random().toString(12).substring(1, 11), localStorage.setItem(Hr, l.value);
|
|
2608
2614
|
}
|
|
2609
|
-
const s =
|
|
2615
|
+
const s = Jt("auth-credentials", {});
|
|
2610
2616
|
function g(D) {
|
|
2611
2617
|
if (D == null)
|
|
2612
2618
|
return !0;
|
|
@@ -2652,12 +2658,12 @@ function Dn(e) {
|
|
|
2652
2658
|
return !0;
|
|
2653
2659
|
if (L.permissions != null) {
|
|
2654
2660
|
for (var A = 0; A < L.permissions.length; A++)
|
|
2655
|
-
if (!
|
|
2661
|
+
if (!T(L.permissions[A]))
|
|
2656
2662
|
return !1;
|
|
2657
2663
|
}
|
|
2658
2664
|
return !0;
|
|
2659
2665
|
}
|
|
2660
|
-
function
|
|
2666
|
+
function T(D) {
|
|
2661
2667
|
const L = K(s);
|
|
2662
2668
|
if (L.userPermissions != null)
|
|
2663
2669
|
for (var f = 0; f < L.userPermissions.length; f++) {
|
|
@@ -2670,7 +2676,7 @@ function Dn(e) {
|
|
|
2670
2676
|
function N(D, L, f) {
|
|
2671
2677
|
let A = !0;
|
|
2672
2678
|
return K(s).isGlobalAdmin ? !0 : (L != null && L.length > 0 && L.forEach((Q) => {
|
|
2673
|
-
f == "edit" ? x(Q) || (A = !1) :
|
|
2679
|
+
f == "edit" ? x(Q) || (A = !1) : T(Q) || (A = !1);
|
|
2674
2680
|
}), D != null && D.length > 0 && (D.some((Q) => u(Q)) || (A = !1)), A);
|
|
2675
2681
|
}
|
|
2676
2682
|
function $(D, L = !1) {
|
|
@@ -2679,13 +2685,13 @@ function Dn(e) {
|
|
|
2679
2685
|
if (f == null)
|
|
2680
2686
|
return !1;
|
|
2681
2687
|
let J = f.subscriptions ?? [], Q = f.permissions ?? [], ee = N(J, Q, "view");
|
|
2682
|
-
return ee || !L || !
|
|
2688
|
+
return ee || !L || !Te(f.children) ? ee : ((f == null ? void 0 : f.children) != null && f.children.forEach((ie) => {
|
|
2683
2689
|
$(ie, !0) && (A = !0);
|
|
2684
2690
|
}), A);
|
|
2685
2691
|
}
|
|
2686
2692
|
function d(D) {
|
|
2687
2693
|
return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (L, f) => {
|
|
2688
|
-
const A = Be(
|
|
2694
|
+
const A = Be(qr(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${f}`);
|
|
2689
2695
|
return L ? `${A}&redirect_path=${L}` : A;
|
|
2690
2696
|
}), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(D, l.value) ?? "" : "";
|
|
2691
2697
|
}
|
|
@@ -2713,9 +2719,9 @@ function Dn(e) {
|
|
|
2713
2719
|
function y(D, L) {
|
|
2714
2720
|
s.value = void 0, M(), D != null && L != null && L.currentRoute.value.path != D && L.push({ path: D });
|
|
2715
2721
|
}
|
|
2716
|
-
function
|
|
2722
|
+
function I(D) {
|
|
2717
2723
|
var f;
|
|
2718
|
-
K(s).isLoggedIn || ((f = e.demo) == null || f.endDemo(),
|
|
2724
|
+
K(s).isLoggedIn || ((f = e.demo) == null || f.endDemo(), _() && (y(), window.location.href = d(D)));
|
|
2719
2725
|
}
|
|
2720
2726
|
async function i(D, L) {
|
|
2721
2727
|
return e.getToken ?? (e.getToken = async () => {
|
|
@@ -2725,17 +2731,17 @@ function Dn(e) {
|
|
|
2725
2731
|
if (A != l.value)
|
|
2726
2732
|
throw new Error("state does not match");
|
|
2727
2733
|
let ee = "";
|
|
2728
|
-
e.getTokenUrl ?? (e.getTokenUrl = () => Be(
|
|
2734
|
+
e.getTokenUrl ?? (e.getTokenUrl = () => Be(qr(), "token")), ee = e.getTokenUrl(f, `${window.location.origin}/authentication`, J, Q);
|
|
2729
2735
|
const ie = {};
|
|
2730
2736
|
ie.grant_type = J, ie.code = f, ie.redirect_uri = `${window.location.origin}/authentication`, ie.client_id = Q;
|
|
2731
|
-
const W = await
|
|
2737
|
+
const W = await Er().post({
|
|
2732
2738
|
additionalUrl: ee,
|
|
2733
2739
|
data: ie
|
|
2734
2740
|
});
|
|
2735
|
-
|
|
2741
|
+
E(W.access_token);
|
|
2736
2742
|
}), await e.getToken(D, L);
|
|
2737
2743
|
}
|
|
2738
|
-
function
|
|
2744
|
+
function E(D) {
|
|
2739
2745
|
if (D != null && (e.demo == null || !e.demo.isDemoing.value)) {
|
|
2740
2746
|
const L = r(D);
|
|
2741
2747
|
w(L, D), e.processTokenPayload != null && e.processTokenPayload(s, L);
|
|
@@ -2752,42 +2758,42 @@ function Dn(e) {
|
|
|
2752
2758
|
}
|
|
2753
2759
|
function b() {
|
|
2754
2760
|
const D = K(s);
|
|
2755
|
-
return D.isLoggedIn &&
|
|
2761
|
+
return D.isLoggedIn && _() && (y(), window.location.href = d()), D.isLoggedIn;
|
|
2756
2762
|
}
|
|
2757
|
-
function
|
|
2763
|
+
function _() {
|
|
2758
2764
|
const D = K(s);
|
|
2759
2765
|
if (D == null || D.expiresOn == null)
|
|
2760
2766
|
return !0;
|
|
2761
2767
|
const L = de.fromFormat(D.expiresOn, t), f = de.utc();
|
|
2762
2768
|
return L <= f;
|
|
2763
2769
|
}
|
|
2764
|
-
return M(),
|
|
2770
|
+
return M(), Ir = {
|
|
2765
2771
|
authState: l,
|
|
2766
2772
|
canEdit: g,
|
|
2767
2773
|
canEditPermit: x,
|
|
2768
2774
|
canView: P,
|
|
2769
|
-
canViewPermit:
|
|
2775
|
+
canViewPermit: T,
|
|
2770
2776
|
credentials: s,
|
|
2771
2777
|
doShow: N,
|
|
2772
2778
|
doShowByNav: $,
|
|
2773
2779
|
getAuthorizeUrl: d,
|
|
2774
2780
|
getToken: i,
|
|
2775
2781
|
isLoggedIn: te(() => s.value.isLoggedIn === !0),
|
|
2776
|
-
login:
|
|
2782
|
+
login: I,
|
|
2777
2783
|
logout: y,
|
|
2778
2784
|
resetAuthState: S,
|
|
2779
|
-
setAuth:
|
|
2785
|
+
setAuth: E,
|
|
2780
2786
|
timeZone: te(() => s.value.timeZone ?? e.defaultTimeZone ?? hr),
|
|
2781
2787
|
tryLogin: b
|
|
2782
|
-
},
|
|
2788
|
+
}, Ir;
|
|
2783
2789
|
}
|
|
2784
|
-
function
|
|
2790
|
+
function _n(e, t, l = {}) {
|
|
2785
2791
|
const {
|
|
2786
2792
|
preventDefault: S = !1,
|
|
2787
2793
|
stopPropagation: s = !1,
|
|
2788
2794
|
axis: g = "both"
|
|
2789
2795
|
} = l, x = { capture: l.capture ?? !0 };
|
|
2790
|
-
let P = { x: 0, y: 0 },
|
|
2796
|
+
let P = { x: 0, y: 0 }, T = { x: 0, y: 0 }, N = { x: 0, y: 0 }, $ = [], d = [], h = z(!1);
|
|
2791
2797
|
function u(M) {
|
|
2792
2798
|
K(S) && M.preventDefault(), K(s) && M.stopPropagation();
|
|
2793
2799
|
}
|
|
@@ -2796,14 +2802,14 @@ function xn(e, t, l = {}) {
|
|
|
2796
2802
|
const b = K(e);
|
|
2797
2803
|
if (!b)
|
|
2798
2804
|
return;
|
|
2799
|
-
const
|
|
2800
|
-
N = { x: L.clientX, y: L.clientY },
|
|
2801
|
-
x:
|
|
2802
|
-
y:
|
|
2805
|
+
const _ = b.$el, L = M.type === "touchstart" && M.touches.length > 0 ? M.touches[0] : M;
|
|
2806
|
+
N = { x: L.clientX, y: L.clientY }, T = {
|
|
2807
|
+
x: _.offsetLeft,
|
|
2808
|
+
y: _.offsetTop
|
|
2803
2809
|
}, P = {
|
|
2804
|
-
x:
|
|
2805
|
-
y:
|
|
2806
|
-
}, ((f = l.onStart) == null ? void 0 : f.call(l, N, M)) !== !1 && (d.push(he("mousemove", y)), d.push(he("touchmove", y)), d.push(he("mouseup",
|
|
2810
|
+
x: _.offsetLeft,
|
|
2811
|
+
y: _.offsetTop
|
|
2812
|
+
}, ((f = l.onStart) == null ? void 0 : f.call(l, N, M)) !== !1 && (d.push(he("mousemove", y)), d.push(he("touchmove", y)), d.push(he("mouseup", I)), d.push(he("touchend", I)), u(M));
|
|
2807
2813
|
}
|
|
2808
2814
|
function y(M) {
|
|
2809
2815
|
var A;
|
|
@@ -2811,22 +2817,22 @@ function xn(e, t, l = {}) {
|
|
|
2811
2817
|
return;
|
|
2812
2818
|
const D = M.type === "touchmove" && M.touches.length > 0 ? M.touches[0] : M;
|
|
2813
2819
|
let L = D.clientX - N.x, f = D.clientY - N.y;
|
|
2814
|
-
(g === "x" || g === "both") && (P.x =
|
|
2820
|
+
(g === "x" || g === "both") && (P.x = T.x + L), (g === "y" || g === "both") && (P.y = T.y + f), (A = l.onMove) == null || A.call(l, P, M), u(M), i(P);
|
|
2815
2821
|
}
|
|
2816
|
-
function
|
|
2822
|
+
function I(M) {
|
|
2817
2823
|
var b;
|
|
2818
|
-
document.documentElement.style.cursor = "", d.forEach((
|
|
2819
|
-
|
|
2824
|
+
document.documentElement.style.cursor = "", d.forEach((_) => {
|
|
2825
|
+
_();
|
|
2820
2826
|
}), d.length = 0, (b = l.onEnd) == null || b.call(l, P, M), u(M);
|
|
2821
2827
|
}
|
|
2822
2828
|
function i(M) {
|
|
2823
2829
|
const b = K(e);
|
|
2824
2830
|
if (!b)
|
|
2825
2831
|
return;
|
|
2826
|
-
const
|
|
2827
|
-
|
|
2832
|
+
const _ = b.$el;
|
|
2833
|
+
_.style.left = `${M.x}px`, _.style.top = `${M.y}px`;
|
|
2828
2834
|
}
|
|
2829
|
-
function
|
|
2835
|
+
function E() {
|
|
2830
2836
|
if (K(h))
|
|
2831
2837
|
return;
|
|
2832
2838
|
const M = K(t);
|
|
@@ -2842,35 +2848,35 @@ function xn(e, t, l = {}) {
|
|
|
2842
2848
|
if (!M)
|
|
2843
2849
|
return;
|
|
2844
2850
|
const b = M.$el;
|
|
2845
|
-
b.style.cursor = "", $.forEach((
|
|
2846
|
-
|
|
2851
|
+
b.style.cursor = "", $.forEach((_) => {
|
|
2852
|
+
_();
|
|
2847
2853
|
}), $.length = 0, h.value = !1;
|
|
2848
2854
|
}
|
|
2849
2855
|
return {
|
|
2850
2856
|
draggingIsOn: h,
|
|
2851
2857
|
turnDraggableOff: w,
|
|
2852
|
-
turnDraggableOn:
|
|
2858
|
+
turnDraggableOn: E
|
|
2853
2859
|
};
|
|
2854
2860
|
}
|
|
2855
2861
|
const Tn = ["t", "r", "b", "l", "tr", "br", "bl", "tl"];
|
|
2856
|
-
function
|
|
2857
|
-
let l, S = t.handleWidth ?? 12, s = t.handleZIndex ?? 100, g = t.minWidth ?? 0, x = t.maxWidth ?? Number.MAX_SAFE_INTEGER, P = t.minHeight ?? 0,
|
|
2862
|
+
function Cn(e, t = {}) {
|
|
2863
|
+
let l, S = t.handleWidth ?? 12, s = t.handleZIndex ?? 100, g = t.minWidth ?? 0, x = t.maxWidth ?? Number.MAX_SAFE_INTEGER, P = t.minHeight ?? 0, T = t.maxHeight ?? Number.MAX_SAFE_INTEGER, N = t.preventDefault ?? !1, $ = t.stopPropagation ?? !1, d, h = [];
|
|
2858
2864
|
const u = z(!1);
|
|
2859
2865
|
let r = [], y = [];
|
|
2860
|
-
const
|
|
2861
|
-
let
|
|
2866
|
+
const I = z(!1), i = z({ x: 0, y: 0 });
|
|
2867
|
+
let E = { left: 0, top: 0, height: 0, width: 0, position: "absolute" }, w = {};
|
|
2862
2868
|
function M(W) {
|
|
2863
2869
|
Ae(N) && W.preventDefault(), Ae($) && W.stopPropagation();
|
|
2864
2870
|
}
|
|
2865
2871
|
function b(W, Y) {
|
|
2866
|
-
h = Y.map(D), h.forEach((
|
|
2872
|
+
h = Y.map(D), h.forEach((V) => W.$el.appendChild(V));
|
|
2867
2873
|
}
|
|
2868
|
-
function
|
|
2874
|
+
function _(W) {
|
|
2869
2875
|
h.forEach((Y) => W.$el.removeChild(Y));
|
|
2870
2876
|
}
|
|
2871
2877
|
function D(W) {
|
|
2872
|
-
const Y = S + "px",
|
|
2873
|
-
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 =
|
|
2878
|
+
const Y = S + "px", V = -S / 2 + "px", ae = s + 1, G = document.createElement("div");
|
|
2879
|
+
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 = Y, W === "t" && (G.style.left = "0", G.style.width = "100%")), W.includes("b") && (G.style.bottom = V, G.style.height = Y, W === "b" && (G.style.left = "0", G.style.width = "100%")), W.includes("r") && (G.style.right = V, G.style.width = Y, W === "r" && (G.style.top = "0", G.style.height = "100%")), W.includes("l") && (G.style.left = V, G.style.width = Y, W === "l" && (G.style.top = "0", G.style.height = "100%")), G;
|
|
2874
2880
|
}
|
|
2875
2881
|
function L(W) {
|
|
2876
2882
|
var ne;
|
|
@@ -2879,13 +2885,13 @@ function _n(e, t = {}) {
|
|
|
2879
2885
|
const Y = Ae(e);
|
|
2880
2886
|
if (!Y)
|
|
2881
2887
|
return;
|
|
2882
|
-
const
|
|
2883
|
-
if (i.value.x = G.clientX, i.value.y = G.clientY,
|
|
2884
|
-
left:
|
|
2885
|
-
top:
|
|
2886
|
-
height: parseInt(window.getComputedStyle(
|
|
2887
|
-
width: parseInt(window.getComputedStyle(
|
|
2888
|
-
}, w = Lr(
|
|
2888
|
+
const V = Y.$el, G = W.type === "touchstart" && W.touches.length > 0 ? W.touches[0] : W;
|
|
2889
|
+
if (i.value.x = G.clientX, i.value.y = G.clientY, E = {
|
|
2890
|
+
left: V.offsetLeft,
|
|
2891
|
+
top: V.offsetTop,
|
|
2892
|
+
height: parseInt(window.getComputedStyle(V).getPropertyValue("height")),
|
|
2893
|
+
width: parseInt(window.getComputedStyle(V).getPropertyValue("width"))
|
|
2894
|
+
}, w = Lr(E), ((ne = t.onStart) == null ? void 0 : ne.call(t, i.value, W)) === !1)
|
|
2889
2895
|
return;
|
|
2890
2896
|
let X = W.target;
|
|
2891
2897
|
document.documentElement.style.cursor = J(X.dataset.handle), d = X.dataset.handle, y.push(he("mousemove", f)), y.push(he("mouseup", A)), y.push(he("touchmove", f)), y.push(he("touchend", A)), M(W);
|
|
@@ -2894,15 +2900,15 @@ function _n(e, t = {}) {
|
|
|
2894
2900
|
const Y = Ae(e);
|
|
2895
2901
|
if (!Y)
|
|
2896
2902
|
return;
|
|
2897
|
-
const
|
|
2903
|
+
const V = Y.$el, G = W.type === "touchmove" && W.touches.length > 0 ? W.touches[0] : W;
|
|
2898
2904
|
let X = G.clientX - i.value.x, ne = G.clientY - i.value.y;
|
|
2899
|
-
const fe = Ae(
|
|
2905
|
+
const fe = Ae(E);
|
|
2900
2906
|
if (d.includes("t")) {
|
|
2901
|
-
const ce = Math.min(
|
|
2907
|
+
const ce = Math.min(T, Math.max(P, (fe.height ?? 0) - ne));
|
|
2902
2908
|
w.height = ce, w.top = (fe.top ?? 0) + ne;
|
|
2903
2909
|
}
|
|
2904
2910
|
if (d.includes("b")) {
|
|
2905
|
-
const ce = Math.min(
|
|
2911
|
+
const ce = Math.min(T, Math.max(P, (fe.height ?? 0) + ne));
|
|
2906
2912
|
w.height = ce;
|
|
2907
2913
|
}
|
|
2908
2914
|
if (d.includes("l")) {
|
|
@@ -2913,7 +2919,7 @@ function _n(e, t = {}) {
|
|
|
2913
2919
|
const ce = Math.min(x, Math.max(g, (fe.width ?? 0) + X));
|
|
2914
2920
|
w.width = ce;
|
|
2915
2921
|
}
|
|
2916
|
-
|
|
2922
|
+
V.dispatchEvent(new CustomEvent("resize")), M(W), ee(w);
|
|
2917
2923
|
}
|
|
2918
2924
|
function A() {
|
|
2919
2925
|
document.documentElement.style.cursor = "", d = null, y.forEach((W) => {
|
|
@@ -2927,38 +2933,38 @@ function _n(e, t = {}) {
|
|
|
2927
2933
|
b: "s",
|
|
2928
2934
|
l: "w"
|
|
2929
2935
|
};
|
|
2930
|
-
return W.split("").map((
|
|
2936
|
+
return W.split("").map((V) => Y[V]).join("") + "-resize";
|
|
2931
2937
|
}
|
|
2932
2938
|
function Q(W) {
|
|
2933
2939
|
const Y = Ae(e);
|
|
2934
2940
|
if (!Y)
|
|
2935
2941
|
return;
|
|
2936
|
-
const
|
|
2942
|
+
const V = Y.$el;
|
|
2937
2943
|
if (console.log(l), l !== "page" && W == "page") {
|
|
2938
|
-
const ae =
|
|
2944
|
+
const ae = jt(V), G = Ae(ae) ?? null;
|
|
2939
2945
|
let X = 0;
|
|
2940
2946
|
if (G != null) {
|
|
2941
2947
|
const ne = window.getComputedStyle(G);
|
|
2942
2948
|
X = parseInt(ne.getPropertyValue("width")) - G.offsetLeft;
|
|
2943
2949
|
}
|
|
2944
|
-
|
|
2950
|
+
V.style.transition = "width 0.5s, height 0.5s, top 0.5s, left 0.5s", V.offsetHeight, u.value = !0, ee({
|
|
2945
2951
|
height: void 0,
|
|
2946
2952
|
width: X,
|
|
2947
2953
|
top: 0,
|
|
2948
2954
|
left: 0,
|
|
2949
2955
|
position: void 0
|
|
2950
|
-
}), he(
|
|
2951
|
-
|
|
2956
|
+
}), he(V, "transitionend", () => {
|
|
2957
|
+
V.style.width = "auto", V.style.top = "", V.style.left = "", V.style.position = "", V.style.transition = "", u.value = !1;
|
|
2952
2958
|
}, { once: !0 });
|
|
2953
2959
|
} else if ((l == "page" || Y.$el.style.position !== "absolute") && W !== "page") {
|
|
2954
|
-
|
|
2955
|
-
height: parseInt(window.getComputedStyle(
|
|
2956
|
-
width: parseInt(window.getComputedStyle(
|
|
2957
|
-
top:
|
|
2958
|
-
left:
|
|
2960
|
+
V.style.transition = "width 0.5s, height 0.5s, top 0.5s, left 0.5s", u.value = !0, E = {
|
|
2961
|
+
height: parseInt(window.getComputedStyle(V).getPropertyValue("height")),
|
|
2962
|
+
width: parseInt(window.getComputedStyle(V).getPropertyValue("width")),
|
|
2963
|
+
top: V.offsetTop,
|
|
2964
|
+
left: V.offsetLeft,
|
|
2959
2965
|
position: "absolute"
|
|
2960
|
-
}, ee(
|
|
2961
|
-
const ae =
|
|
2966
|
+
}, ee(E), V.offsetHeight;
|
|
2967
|
+
const ae = E;
|
|
2962
2968
|
W == "freestyle" ? w = {
|
|
2963
2969
|
height: ae.height,
|
|
2964
2970
|
width: (ae.width ?? 100) / 2,
|
|
@@ -2971,8 +2977,8 @@ function _n(e, t = {}) {
|
|
|
2971
2977
|
top: (ae.top ?? 0) + 2,
|
|
2972
2978
|
left: (ae.left ?? 0) + 2,
|
|
2973
2979
|
position: "absolute"
|
|
2974
|
-
}), ee(w), he(
|
|
2975
|
-
|
|
2980
|
+
}), ee(w), he(V, "transitionend", () => {
|
|
2981
|
+
V.style.transition = "", u.value = !1;
|
|
2976
2982
|
}, { once: !0 });
|
|
2977
2983
|
}
|
|
2978
2984
|
}
|
|
@@ -2980,39 +2986,39 @@ function _n(e, t = {}) {
|
|
|
2980
2986
|
const Y = Ae(e);
|
|
2981
2987
|
if (!Y)
|
|
2982
2988
|
return;
|
|
2983
|
-
const
|
|
2984
|
-
W.top ?
|
|
2989
|
+
const V = Y.$el;
|
|
2990
|
+
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);
|
|
2985
2991
|
}
|
|
2986
2992
|
function ie(W, Y) {
|
|
2987
|
-
if (
|
|
2993
|
+
if (I.value)
|
|
2988
2994
|
return;
|
|
2989
|
-
const
|
|
2990
|
-
|
|
2995
|
+
const V = Ae(e);
|
|
2996
|
+
V && (b(V, W ?? Tn), Q(Y), r.push(he(V.$el, "mousedown", L)), r.push(he(V.$el, "touchstart", L)), I.value = !0, l = Y);
|
|
2991
2997
|
}
|
|
2992
2998
|
function we(W) {
|
|
2993
|
-
if (!
|
|
2999
|
+
if (!I.value)
|
|
2994
3000
|
return;
|
|
2995
3001
|
const Y = Ae(e);
|
|
2996
|
-
Y && (
|
|
2997
|
-
|
|
2998
|
-
}), r.length = 0,
|
|
3002
|
+
Y && (_(Y), Q(W), r.forEach((V) => {
|
|
3003
|
+
V();
|
|
3004
|
+
}), r.length = 0, I.value = !1);
|
|
2999
3005
|
}
|
|
3000
3006
|
return {
|
|
3001
|
-
resizingIsOn:
|
|
3007
|
+
resizingIsOn: I,
|
|
3002
3008
|
turnResizingOn: ie,
|
|
3003
3009
|
turnResizingOff: we
|
|
3004
3010
|
};
|
|
3005
3011
|
}
|
|
3006
|
-
function
|
|
3007
|
-
const t = (e == null ? void 0 : e.blade) ?? z(null), l = (e == null ? void 0 : e.handle) ?? z(null), S = z(!1), s = (e == null ? void 0 : e.mobileBreakpoint) ?? 500, g = z((e == null ? void 0 : e.defaultVariant) ?? "page"), x = z({}), { turnResizingOff: P, turnResizingOn:
|
|
3008
|
-
|
|
3012
|
+
function Pn(e) {
|
|
3013
|
+
const t = (e == null ? void 0 : e.blade) ?? z(null), l = (e == null ? void 0 : e.handle) ?? z(null), S = z(!1), s = (e == null ? void 0 : e.mobileBreakpoint) ?? 500, g = z((e == null ? void 0 : e.defaultVariant) ?? "page"), x = z({}), { turnResizingOff: P, turnResizingOn: T } = Cn(t), { turnDraggableOff: N, turnDraggableOn: $ } = _n(t, l);
|
|
3014
|
+
Kt(t, (h) => {
|
|
3009
3015
|
const u = h[0], { width: r } = u.contentRect;
|
|
3010
3016
|
S.value = r < s;
|
|
3011
3017
|
});
|
|
3012
3018
|
function d(h) {
|
|
3013
|
-
N(), h == "page" ? P(h) : h == "blade" ?
|
|
3019
|
+
N(), h == "page" ? P(h) : h == "blade" ? T(["l", "r"], h) : h == "freestyle" ? (P(), T(void 0, h), $()) : h == "inline" && P();
|
|
3014
3020
|
}
|
|
3015
|
-
return d(g.value),
|
|
3021
|
+
return d(g.value), _e(g, (h) => d(h)), {
|
|
3016
3022
|
isMobile: S,
|
|
3017
3023
|
variant: g,
|
|
3018
3024
|
bladeData: x
|
|
@@ -3036,10 +3042,10 @@ const mr = {
|
|
|
3036
3042
|
warning: "#FB8C00"
|
|
3037
3043
|
};
|
|
3038
3044
|
let Dr;
|
|
3039
|
-
function
|
|
3045
|
+
function ya() {
|
|
3040
3046
|
return Dr;
|
|
3041
3047
|
}
|
|
3042
|
-
function
|
|
3048
|
+
function wa(e) {
|
|
3043
3049
|
const t = localStorage.getItem("cosmetics");
|
|
3044
3050
|
let l;
|
|
3045
3051
|
return t != null && t.length > 0 && (l = JSON.parse(t)), l ?? (l = {}), l.dark ?? (l.dark = e == null ? void 0 : e.dark), l.light ?? (l.light = e == null ? void 0 : e.light), l.theme ?? (l.theme = e == null ? void 0 : e.defaultTheme), {
|
|
@@ -3054,7 +3060,7 @@ function ya(e) {
|
|
|
3054
3060
|
}
|
|
3055
3061
|
};
|
|
3056
3062
|
}
|
|
3057
|
-
function
|
|
3063
|
+
function Nn(e) {
|
|
3058
3064
|
const t = z({});
|
|
3059
3065
|
let l = e.vuetifyInstance;
|
|
3060
3066
|
function S() {
|
|
@@ -3095,7 +3101,7 @@ function Pn(e) {
|
|
|
3095
3101
|
function P() {
|
|
3096
3102
|
t.value.drawer = !t.value.drawer;
|
|
3097
3103
|
}
|
|
3098
|
-
function
|
|
3104
|
+
function T() {
|
|
3099
3105
|
t.value.drawerStick = !t.value.drawerStick;
|
|
3100
3106
|
}
|
|
3101
3107
|
function N() {
|
|
@@ -3108,22 +3114,22 @@ function Pn(e) {
|
|
|
3108
3114
|
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", "");
|
|
3109
3115
|
}
|
|
3110
3116
|
}
|
|
3111
|
-
return S(),
|
|
3117
|
+
return S(), _e(t, () => {
|
|
3112
3118
|
s();
|
|
3113
3119
|
}), Dr = {
|
|
3114
3120
|
state: t,
|
|
3115
3121
|
resetCosmetics: g,
|
|
3116
3122
|
setTemporaryColor: x,
|
|
3117
3123
|
toggleDrawer: P,
|
|
3118
|
-
toggleDrawerStick:
|
|
3124
|
+
toggleDrawerStick: T,
|
|
3119
3125
|
toggleLightDark: N,
|
|
3120
3126
|
undoTemporaryColor: $
|
|
3121
3127
|
}, Dr;
|
|
3122
3128
|
}
|
|
3123
|
-
const
|
|
3129
|
+
const ba = {
|
|
3124
3130
|
canExportCSV: !1
|
|
3125
3131
|
};
|
|
3126
|
-
function
|
|
3132
|
+
function Mn() {
|
|
3127
3133
|
function e(t) {
|
|
3128
3134
|
const {
|
|
3129
3135
|
items: l,
|
|
@@ -3131,32 +3137,32 @@ function Nn() {
|
|
|
3131
3137
|
fileName: s = "data.csv",
|
|
3132
3138
|
format: g = "file"
|
|
3133
3139
|
} = t;
|
|
3134
|
-
if (!
|
|
3140
|
+
if (!Te(l))
|
|
3135
3141
|
return;
|
|
3136
3142
|
let x = [];
|
|
3137
|
-
S != null ? x = S == null ? void 0 : S.filter((
|
|
3138
|
-
header:
|
|
3139
|
-
itemText:
|
|
3140
|
-
value:
|
|
3141
|
-
})) : x = Object.keys(l[0]).map((
|
|
3143
|
+
S != null ? x = S == null ? void 0 : S.filter((I) => (I.csv ?? I.csvText ?? I.csvFilter ?? I.csvArray) != null).map((I) => ({
|
|
3144
|
+
header: I.title ?? I.value ?? "",
|
|
3145
|
+
itemText: I.itemText,
|
|
3146
|
+
value: I.value
|
|
3147
|
+
})) : x = Object.keys(l[0]).map((I) => ({ header: nn(I) ?? "", value: I })), x = x.filter((I) => I.header.length > 0);
|
|
3142
3148
|
var P = [];
|
|
3143
|
-
for (let
|
|
3144
|
-
const i = l[
|
|
3145
|
-
var
|
|
3146
|
-
for (let
|
|
3147
|
-
const w = x[
|
|
3149
|
+
for (let I = 0; I < l.length; I++) {
|
|
3150
|
+
const i = l[I];
|
|
3151
|
+
var T = {}, N = [];
|
|
3152
|
+
for (let E = 0; E < x.length; E++) {
|
|
3153
|
+
const w = x[E];
|
|
3148
3154
|
var $ = null;
|
|
3149
|
-
typeof w.value == "function" ? $ = w.value(i) : typeof w.value == "string" && ($ = Sr(i, w.value)), w.itemText != null ?
|
|
3155
|
+
typeof w.value == "function" ? $ = w.value(i) : typeof w.value == "string" && ($ = Sr(i, w.value)), w.itemText != null ? T[w.header] = Sr($, w.itemText) : T[w.header] = $;
|
|
3150
3156
|
}
|
|
3151
|
-
P.push(
|
|
3152
|
-
P.push(
|
|
3157
|
+
P.push(T), Te(N) && N.forEach((E) => {
|
|
3158
|
+
P.push(E);
|
|
3153
3159
|
}), N = [];
|
|
3154
3160
|
}
|
|
3155
3161
|
var d = [];
|
|
3156
|
-
if (d.push(x.map((
|
|
3162
|
+
if (d.push(x.map((I) => I.header).toString()), P.forEach((I) => {
|
|
3157
3163
|
let i = [];
|
|
3158
|
-
x.forEach(function(
|
|
3159
|
-
var w = E
|
|
3164
|
+
x.forEach(function(E) {
|
|
3165
|
+
var w = I[E.header];
|
|
3160
3166
|
i.push(w ?? "");
|
|
3161
3167
|
}), d.push(i.join(","));
|
|
3162
3168
|
}), g == "array")
|
|
@@ -3177,10 +3183,10 @@ function Nn() {
|
|
|
3177
3183
|
};
|
|
3178
3184
|
}
|
|
3179
3185
|
let xr;
|
|
3180
|
-
function
|
|
3186
|
+
function Sa() {
|
|
3181
3187
|
return xr;
|
|
3182
3188
|
}
|
|
3183
|
-
function
|
|
3189
|
+
function Ln(e) {
|
|
3184
3190
|
const t = e.getUTC ?? de.utc;
|
|
3185
3191
|
function l() {
|
|
3186
3192
|
return s().startOf("day").toUTC().toString() ?? "";
|
|
@@ -3188,27 +3194,27 @@ function Mn(e) {
|
|
|
3188
3194
|
function S() {
|
|
3189
3195
|
return s().startOf("day").plus({ day: 1 }).toUTC().toString() ?? "";
|
|
3190
3196
|
}
|
|
3191
|
-
function s(
|
|
3192
|
-
return
|
|
3197
|
+
function s(T, N) {
|
|
3198
|
+
return T == null ? t().setZone(e.getTimeZone()) : N ? de.fromFormat(T, N, { zone: e.getTimeZone() }) : de.fromISO(T, { zone: e.getTimeZone() });
|
|
3193
3199
|
}
|
|
3194
|
-
function g(
|
|
3195
|
-
if (
|
|
3200
|
+
function g(T, N, $) {
|
|
3201
|
+
if (T == null) {
|
|
3196
3202
|
const h = t().setZone(e.getTimeZone());
|
|
3197
3203
|
return N ? h.toFormat(N) : h.toString();
|
|
3198
3204
|
}
|
|
3199
|
-
if (
|
|
3205
|
+
if (T == "Invalid DateTime")
|
|
3200
3206
|
return "";
|
|
3201
|
-
const d = $ ? de.fromFormat(
|
|
3207
|
+
const d = $ ? de.fromFormat(T, $, { zone: e.getTimeZone() }) : de.fromISO(T, { zone: e.getTimeZone() });
|
|
3202
3208
|
return N ? d.toFormat(N) : d == null ? void 0 : d.toString();
|
|
3203
3209
|
}
|
|
3204
|
-
function x(
|
|
3205
|
-
return
|
|
3210
|
+
function x(T, N) {
|
|
3211
|
+
return T == null ? t() : N ? de.fromFormat(T, N) : de.fromISO(T);
|
|
3206
3212
|
}
|
|
3207
|
-
function P(
|
|
3208
|
-
if (
|
|
3213
|
+
function P(T, N, $) {
|
|
3214
|
+
if (T == null)
|
|
3209
3215
|
return N ? t().toFormat(N) : t().toString();
|
|
3210
3216
|
{
|
|
3211
|
-
const d = $ ? de.fromFormat(
|
|
3217
|
+
const d = $ ? de.fromFormat(T, $) : de.fromISO(T);
|
|
3212
3218
|
return N ? d.toFormat(N) : d.toString();
|
|
3213
3219
|
}
|
|
3214
3220
|
}
|
|
@@ -3221,11 +3227,11 @@ function Mn(e) {
|
|
|
3221
3227
|
utcString: P
|
|
3222
3228
|
}, xr;
|
|
3223
3229
|
}
|
|
3224
|
-
let
|
|
3225
|
-
function
|
|
3226
|
-
return
|
|
3230
|
+
let _r;
|
|
3231
|
+
function Aa() {
|
|
3232
|
+
return _r;
|
|
3227
3233
|
}
|
|
3228
|
-
function
|
|
3234
|
+
function Rn(e) {
|
|
3229
3235
|
const t = z(!1), l = (e == null ? void 0 : e.apis) ?? [];
|
|
3230
3236
|
function S() {
|
|
3231
3237
|
t.value = !0;
|
|
@@ -3247,7 +3253,7 @@ function Ln(e) {
|
|
|
3247
3253
|
return Promise.resolve("no demo data available for this api");
|
|
3248
3254
|
const h = d.id ?? ((r = d.data) == null ? void 0 : r.id), u = g(d);
|
|
3249
3255
|
if (h != null && (u == null ? void 0 : u.data) != null) {
|
|
3250
|
-
const y = u.data.findIndex((
|
|
3256
|
+
const y = u.data.findIndex((I) => I.id == h);
|
|
3251
3257
|
y >= 0 && u.data.splice(y, 1);
|
|
3252
3258
|
}
|
|
3253
3259
|
return new Promise(function(y) {
|
|
@@ -3257,20 +3263,20 @@ function Ln(e) {
|
|
|
3257
3263
|
});
|
|
3258
3264
|
}
|
|
3259
3265
|
function P(d) {
|
|
3260
|
-
var y,
|
|
3266
|
+
var y, I, i;
|
|
3261
3267
|
if (l == null)
|
|
3262
3268
|
throw new Error("no demo data available for this api");
|
|
3263
3269
|
const h = d.id ?? ((y = d.data) == null ? void 0 : y.id), u = g(d);
|
|
3264
3270
|
let r;
|
|
3265
|
-
return u != null && (u.data ?? (u.data = []), u.getAction != null ? r = u.getAction(u.data, h) : h != null ? r = (
|
|
3271
|
+
return u != null && (u.data ?? (u.data = []), u.getAction != null ? r = u.getAction(u.data, h) : h != null ? r = (I = u.data) == null ? void 0 : I.find((E) => E.id == h) : u.path != null && ((i = u.data) == null ? void 0 : i.length) == 1 && (r = u.data[0])), r == null ? Promise.resolve(void 0) : new Promise((E) => {
|
|
3266
3272
|
setTimeout(() => {
|
|
3267
|
-
|
|
3273
|
+
E({
|
|
3268
3274
|
data: r
|
|
3269
3275
|
});
|
|
3270
3276
|
});
|
|
3271
3277
|
});
|
|
3272
3278
|
}
|
|
3273
|
-
function
|
|
3279
|
+
function T(d) {
|
|
3274
3280
|
if (l == null)
|
|
3275
3281
|
throw new Error("no demo data available for this api");
|
|
3276
3282
|
const h = g(d);
|
|
@@ -3291,9 +3297,9 @@ function Ln(e) {
|
|
|
3291
3297
|
throw new Error("no demo data available for this api");
|
|
3292
3298
|
const h = g(d);
|
|
3293
3299
|
let u;
|
|
3294
|
-
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((
|
|
3300
|
+
return h != null && (h.data ?? (h.data = []), h.postAction != null ? u = h.postAction(h.data, d.data) : d.data != null && (d.data.id == null && (d.data.id = ((((r = h.data) == null ? void 0 : r.length) ?? 0) + 1).toString()), u = d.data, (y = h.data) == null || y.push(u))), u == null ? Promise.resolve(void 0) : new Promise((I) => {
|
|
3295
3301
|
setTimeout(() => {
|
|
3296
|
-
|
|
3302
|
+
I({
|
|
3297
3303
|
data: u
|
|
3298
3304
|
});
|
|
3299
3305
|
});
|
|
@@ -3309,39 +3315,39 @@ function Ln(e) {
|
|
|
3309
3315
|
if (h.data ?? (h.data = []), h.patchAction != null)
|
|
3310
3316
|
u = h.patchAction(h.data, d.data);
|
|
3311
3317
|
else if (d.data.id != null) {
|
|
3312
|
-
const
|
|
3313
|
-
|
|
3318
|
+
const I = (r = h.data) == null ? void 0 : r.findIndex((i) => i.id == d.data.id);
|
|
3319
|
+
I != null && I > -1 && ((y = h.data) == null || y.splice(I, 1, d.data)), u = d.data;
|
|
3314
3320
|
}
|
|
3315
3321
|
}
|
|
3316
|
-
return u == null ? Promise.resolve(void 0) : new Promise((
|
|
3322
|
+
return u == null ? Promise.resolve(void 0) : new Promise((I) => {
|
|
3317
3323
|
setTimeout(() => {
|
|
3318
|
-
|
|
3324
|
+
I({
|
|
3319
3325
|
data: u
|
|
3320
3326
|
});
|
|
3321
3327
|
});
|
|
3322
3328
|
});
|
|
3323
3329
|
}
|
|
3324
|
-
return
|
|
3330
|
+
return _r = {
|
|
3325
3331
|
endDemo: s,
|
|
3326
3332
|
isDemoing: t,
|
|
3327
3333
|
startDemo: S,
|
|
3328
3334
|
data: l,
|
|
3329
3335
|
deleteItem: x,
|
|
3330
3336
|
get: P,
|
|
3331
|
-
getAll:
|
|
3337
|
+
getAll: T,
|
|
3332
3338
|
post: N,
|
|
3333
3339
|
patch: $
|
|
3334
|
-
},
|
|
3340
|
+
}, _r;
|
|
3335
3341
|
}
|
|
3336
|
-
var
|
|
3337
|
-
function
|
|
3342
|
+
var Un = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
3343
|
+
function Ea(e) {
|
|
3338
3344
|
function t(l) {
|
|
3339
3345
|
var s;
|
|
3340
3346
|
const S = l.matched.slice().reverse().find((g) => g.meta && g.meta.title);
|
|
3341
3347
|
if (S)
|
|
3342
3348
|
document.title = S.meta.title;
|
|
3343
3349
|
else {
|
|
3344
|
-
const g =
|
|
3350
|
+
const g = Un.VITE_NODE_ENV;
|
|
3345
3351
|
let x = "";
|
|
3346
3352
|
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;
|
|
3347
3353
|
}
|
|
@@ -3350,13 +3356,13 @@ function Aa(e) {
|
|
|
3350
3356
|
updateMeta: t
|
|
3351
3357
|
};
|
|
3352
3358
|
}
|
|
3353
|
-
let
|
|
3359
|
+
let Tr;
|
|
3354
3360
|
function Ia() {
|
|
3355
|
-
return
|
|
3361
|
+
return Tr;
|
|
3356
3362
|
}
|
|
3357
|
-
function
|
|
3363
|
+
function Bn(e) {
|
|
3358
3364
|
function t(f, A, J) {
|
|
3359
|
-
return f ?
|
|
3365
|
+
return f ? ln(f) ? J ?? "" : e.dates.tzString(f, A) : J ?? f ?? "";
|
|
3360
3366
|
}
|
|
3361
3367
|
function l(f) {
|
|
3362
3368
|
if (!f)
|
|
@@ -3388,7 +3394,7 @@ function Un(e) {
|
|
|
3388
3394
|
function P(f, A) {
|
|
3389
3395
|
return t(f, "ccc dd LLL yyyy", A);
|
|
3390
3396
|
}
|
|
3391
|
-
function
|
|
3397
|
+
function T(f, A) {
|
|
3392
3398
|
return t(f, "ccc dd LLL @ hh:mm a", A);
|
|
3393
3399
|
}
|
|
3394
3400
|
function N(f) {
|
|
@@ -3407,7 +3413,7 @@ function Un(e) {
|
|
|
3407
3413
|
return e.dates.utcString(f, A);
|
|
3408
3414
|
}
|
|
3409
3415
|
function u(f) {
|
|
3410
|
-
return
|
|
3416
|
+
return tt(f, !1);
|
|
3411
3417
|
}
|
|
3412
3418
|
function r(f) {
|
|
3413
3419
|
if (!f)
|
|
@@ -3420,7 +3426,7 @@ function Un(e) {
|
|
|
3420
3426
|
function y(f, A) {
|
|
3421
3427
|
return t(f, "ddd DD MMM YYYY", A);
|
|
3422
3428
|
}
|
|
3423
|
-
function
|
|
3429
|
+
function I(f, A) {
|
|
3424
3430
|
return t(f, "ccc dd LLL yyyy hh:mm a", A);
|
|
3425
3431
|
}
|
|
3426
3432
|
function i(f) {
|
|
@@ -3430,7 +3436,7 @@ function Un(e) {
|
|
|
3430
3436
|
});
|
|
3431
3437
|
return A.format(f);
|
|
3432
3438
|
}
|
|
3433
|
-
function
|
|
3439
|
+
function E(f) {
|
|
3434
3440
|
return f.replaceAll(",", " ");
|
|
3435
3441
|
}
|
|
3436
3442
|
function w(f, A) {
|
|
@@ -3442,7 +3448,7 @@ function Un(e) {
|
|
|
3442
3448
|
function b(f, A) {
|
|
3443
3449
|
return t(f, "hh:mm a", A);
|
|
3444
3450
|
}
|
|
3445
|
-
function
|
|
3451
|
+
function _(f) {
|
|
3446
3452
|
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";
|
|
3447
3453
|
}
|
|
3448
3454
|
const D = {
|
|
@@ -3452,7 +3458,7 @@ function Un(e) {
|
|
|
3452
3458
|
toDayMonth: g,
|
|
3453
3459
|
toDayOfWeek: x,
|
|
3454
3460
|
toDayShortDate: P,
|
|
3455
|
-
toDayShortDateAndTime:
|
|
3461
|
+
toDayShortDateAndTime: T,
|
|
3456
3462
|
toDisplayNumber: N,
|
|
3457
3463
|
toDisplayNumberOver: $,
|
|
3458
3464
|
toDisplayNumberSigned: d,
|
|
@@ -3460,13 +3466,13 @@ function Un(e) {
|
|
|
3460
3466
|
toLocationLine: u,
|
|
3461
3467
|
toLocationLineNoCommas: r,
|
|
3462
3468
|
toLongDate: y,
|
|
3463
|
-
toLongDateAndTime:
|
|
3469
|
+
toLongDateAndTime: I,
|
|
3464
3470
|
toPercent: i,
|
|
3465
|
-
toPrettyCSV:
|
|
3471
|
+
toPrettyCSV: E,
|
|
3466
3472
|
toShortDate: w,
|
|
3467
3473
|
toShortDateAndTime: M,
|
|
3468
3474
|
toTime: b,
|
|
3469
|
-
toTimeOfDay:
|
|
3475
|
+
toTimeOfDay: _
|
|
3470
3476
|
};
|
|
3471
3477
|
function L(f) {
|
|
3472
3478
|
if (f != null) {
|
|
@@ -3476,24 +3482,24 @@ function Un(e) {
|
|
|
3476
3482
|
}
|
|
3477
3483
|
return (A) => A;
|
|
3478
3484
|
}
|
|
3479
|
-
return
|
|
3485
|
+
return Tr = {
|
|
3480
3486
|
findFilter: L,
|
|
3481
3487
|
...D
|
|
3482
|
-
},
|
|
3488
|
+
}, Tr;
|
|
3483
3489
|
}
|
|
3484
|
-
function
|
|
3485
|
-
const l = z(!1), S =
|
|
3490
|
+
function $n(e, t) {
|
|
3491
|
+
const l = z(!1), S = Zt(e);
|
|
3486
3492
|
let s = g(K(e));
|
|
3487
|
-
(t == null ? void 0 : t.useTracker) !== !1 &&
|
|
3493
|
+
(t == null ? void 0 : t.useTracker) !== !1 && _e(S, (P) => {
|
|
3488
3494
|
l.value = g(P) != s;
|
|
3489
3495
|
}, { deep: !0 });
|
|
3490
3496
|
function g(P) {
|
|
3491
|
-
const
|
|
3497
|
+
const T = Lr(P);
|
|
3492
3498
|
return t != null && (t.propsToIgnore != null ? t.propsToIgnore.forEach((N) => {
|
|
3493
|
-
delete
|
|
3499
|
+
delete T[N];
|
|
3494
3500
|
}) : t.propsToTrack != null && Object.keys(P).forEach(($) => {
|
|
3495
|
-
t.propsToTrack.some((d) => d == $) || delete
|
|
3496
|
-
})), JSON.stringify(
|
|
3501
|
+
t.propsToTrack.some((d) => d == $) || delete T[$];
|
|
3502
|
+
})), JSON.stringify(T);
|
|
3497
3503
|
}
|
|
3498
3504
|
function x() {
|
|
3499
3505
|
s = g(K(S)), l.value = !1;
|
|
@@ -3504,15 +3510,15 @@ function Bn(e, t) {
|
|
|
3504
3510
|
restartTracker: x
|
|
3505
3511
|
};
|
|
3506
3512
|
}
|
|
3507
|
-
function
|
|
3513
|
+
function Da(e, t) {
|
|
3508
3514
|
var ae;
|
|
3509
3515
|
const {
|
|
3510
3516
|
// useBladeSrc = true,
|
|
3511
3517
|
useRouteSrc: l = !0
|
|
3512
|
-
} = t ?? {}, S = e.storeMode ?? (t == null ? void 0 : t.storeMode), s = e.storageMode ?? (t == null ? void 0 : t.storageMode), g = e.nav ?? e.bladeName ?? "basic", x = Mr(), P =
|
|
3518
|
+
} = t ?? {}, S = e.storeMode ?? (t == null ? void 0 : t.storeMode), s = e.storageMode ?? (t == null ? void 0 : t.storageMode), g = e.nav ?? e.bladeName ?? "basic", x = Mr(), P = rt(), T = K(e.proxyQueryKey), N = te(() => {
|
|
3513
3519
|
var G;
|
|
3514
|
-
return K(e.proxyID) ?? (
|
|
3515
|
-
}), $ = z(void 0), { actionErrorMsg: d, actionLoadingMsg: h, deleteItem: u, getItem: r, getAllItems: y, restoreItem:
|
|
3520
|
+
return K(e.proxyID) ?? (T != null ? (G = P == null ? void 0 : P.query) == null ? void 0 : G[T] : void 0);
|
|
3521
|
+
}), $ = z(void 0), { actionErrorMsg: d, actionLoadingMsg: h, deleteItem: u, getItem: r, getAllItems: y, restoreItem: I, saveItem: i } = it({
|
|
3516
3522
|
nav: g,
|
|
3517
3523
|
onError: e.onError ?? (t == null ? void 0 : t.onError),
|
|
3518
3524
|
proxyID: N.value,
|
|
@@ -3521,25 +3527,25 @@ function Ea(e, t) {
|
|
|
3521
3527
|
storageMode: s,
|
|
3522
3528
|
nav: g
|
|
3523
3529
|
})
|
|
3524
|
-
}),
|
|
3525
|
-
if (
|
|
3530
|
+
}), E = te(() => e.errorMsg ?? d.value), w = te(() => e.loadingMsg ?? h.value), M = te(() => w.value != null), b = z(e.itemID ?? (l ? (ae = P == null ? void 0 : P.params) == null ? void 0 : ae.id : void 0)), _ = z(b.value == "new" ? "new" : e.startEditing ? "edit" : "view"), D = Re(!1), L = te(() => {
|
|
3531
|
+
if (_.value == "new")
|
|
3526
3532
|
return !1;
|
|
3527
3533
|
const G = K($);
|
|
3528
3534
|
return e.onCanDelete != null ? e.onCanDelete(G) : (G == null ? void 0 : G.isInactive) !== !0;
|
|
3529
3535
|
}), f = te(() => {
|
|
3530
|
-
if (
|
|
3536
|
+
if (_.value == "new")
|
|
3531
3537
|
return !1;
|
|
3532
3538
|
const G = K($);
|
|
3533
3539
|
return e.onCanEdit != null ? e.onCanEdit(G) : !0;
|
|
3534
3540
|
}), A = te(() => {
|
|
3535
|
-
if (
|
|
3541
|
+
if (_.value == "new")
|
|
3536
3542
|
return !1;
|
|
3537
3543
|
const G = K($);
|
|
3538
3544
|
return e.onCanRestore != null ? e.onCanRestore(G) : (G == null ? void 0 : G.isInactive) === !0;
|
|
3539
3545
|
}), J = te(() => {
|
|
3540
3546
|
const G = K($);
|
|
3541
3547
|
return e.onCanSave != null ? e.onCanSave(G) : !0;
|
|
3542
|
-
}), { isChanged: Q, restartTracker: ee } =
|
|
3548
|
+
}), { isChanged: Q, restartTracker: ee } = $n($, {
|
|
3543
3549
|
useTracker: e.trackChanges,
|
|
3544
3550
|
propsToIgnore: e.trackIgnoreProps,
|
|
3545
3551
|
propsToTrack: e.trackProps
|
|
@@ -3570,7 +3576,7 @@ function Ea(e, t) {
|
|
|
3570
3576
|
onRestoreSuccessAsync: fe,
|
|
3571
3577
|
proxyID: ce
|
|
3572
3578
|
} = { ...e };
|
|
3573
|
-
|
|
3579
|
+
I({
|
|
3574
3580
|
additionalUrl: X,
|
|
3575
3581
|
data: G,
|
|
3576
3582
|
nav: g,
|
|
@@ -3610,8 +3616,8 @@ function Ea(e, t) {
|
|
|
3610
3616
|
additionalUrl: ne,
|
|
3611
3617
|
onCanSaveAsync: fe,
|
|
3612
3618
|
onGetSaveAsync: ce,
|
|
3613
|
-
onSaveAsync:
|
|
3614
|
-
onSaveSuccessAsync: $e = (Ce) => ((X == null ? void 0 : X.navBack) === !0 ? x.back() : (G.rowVersion != null && Ce.rowVersion != null && (G.rowVersion = Ce.rowVersion), ee(),
|
|
3619
|
+
onSaveAsync: Ee,
|
|
3620
|
+
onSaveSuccessAsync: $e = (Ce) => ((X == null ? void 0 : X.navBack) === !0 ? x.back() : (G.rowVersion != null && Ce.rowVersion != null && (G.rowVersion = Ce.rowVersion), ee(), _.value = "view"), Promise.resolve(void 0))
|
|
3615
3621
|
} = { ...e };
|
|
3616
3622
|
i({
|
|
3617
3623
|
additionalUrl: ne,
|
|
@@ -3619,58 +3625,58 @@ function Ea(e, t) {
|
|
|
3619
3625
|
nav: g,
|
|
3620
3626
|
onCanSaveAsync: fe,
|
|
3621
3627
|
onGetSaveAsync: ce,
|
|
3622
|
-
onSaveAsync:
|
|
3628
|
+
onSaveAsync: Ee,
|
|
3623
3629
|
onSaveSuccessAsync: $e,
|
|
3624
3630
|
proxyID: N.value,
|
|
3625
3631
|
// ...params.getOptions(),
|
|
3626
3632
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
3627
|
-
mode:
|
|
3633
|
+
mode: _.value
|
|
3628
3634
|
});
|
|
3629
3635
|
}
|
|
3630
|
-
function
|
|
3631
|
-
const G = K(
|
|
3632
|
-
!G || G == "view" ?
|
|
3636
|
+
function V() {
|
|
3637
|
+
const G = K(_);
|
|
3638
|
+
!G || G == "view" ? _.value = "edit" : G == "edit" && (_.value = "view");
|
|
3633
3639
|
}
|
|
3634
|
-
return
|
|
3640
|
+
return _e(E, (G) => {
|
|
3635
3641
|
D.value = G != null;
|
|
3636
|
-
}),
|
|
3642
|
+
}), _e(() => e.refreshToggle, () => {
|
|
3637
3643
|
W({ deepRefresh: !0 });
|
|
3638
|
-
}),
|
|
3644
|
+
}), Or(async () => {
|
|
3639
3645
|
var G;
|
|
3640
3646
|
e.eager == !0 && await W({ deepRefresh: ((G = P == null ? void 0 : P.params) == null ? void 0 : G.refresh) == "true" });
|
|
3641
3647
|
}), {
|
|
3642
3648
|
asyncItem: $,
|
|
3643
3649
|
deleteItem: ie,
|
|
3644
|
-
errorMsg:
|
|
3650
|
+
errorMsg: E,
|
|
3645
3651
|
isChanged: Q,
|
|
3646
3652
|
isDeletable: L,
|
|
3647
|
-
isEditing: te(() =>
|
|
3653
|
+
isEditing: te(() => _.value == "new" || _.value == "edit"),
|
|
3648
3654
|
isEditable: f,
|
|
3649
3655
|
isLoading: M,
|
|
3650
|
-
isNew: te(() =>
|
|
3656
|
+
isNew: te(() => _.value == "new"),
|
|
3651
3657
|
isRestorable: A,
|
|
3652
3658
|
isSaveable: J,
|
|
3653
3659
|
loadingMsg: w,
|
|
3654
|
-
mode:
|
|
3660
|
+
mode: _,
|
|
3655
3661
|
refresh: W,
|
|
3656
3662
|
restoreItem: we,
|
|
3657
3663
|
saveItem: Y,
|
|
3658
3664
|
showError: D,
|
|
3659
|
-
toggleMode:
|
|
3665
|
+
toggleMode: V
|
|
3660
3666
|
};
|
|
3661
3667
|
}
|
|
3662
|
-
const
|
|
3668
|
+
const zr = z(!0), Yr = z(!1), Zr = z(), gr = z(!1);
|
|
3663
3669
|
let yr = null, Cr;
|
|
3664
|
-
function
|
|
3670
|
+
function ct() {
|
|
3665
3671
|
return Cr;
|
|
3666
3672
|
}
|
|
3667
|
-
function
|
|
3673
|
+
function Fn(e) {
|
|
3668
3674
|
const t = e.defaultCacheExpiryHours ?? 7;
|
|
3669
3675
|
e.getDisplayName ?? (e.getDisplayName = (h) => {
|
|
3670
3676
|
if (h.displayName != null)
|
|
3671
3677
|
return h.displayName;
|
|
3672
3678
|
if (h.name != null)
|
|
3673
|
-
return
|
|
3679
|
+
return an(h.name.replaceAll("-", " "));
|
|
3674
3680
|
});
|
|
3675
3681
|
const l = (e.navItems ?? []).map((h) => ({
|
|
3676
3682
|
displayName: h.displayName ?? e.getDisplayName(h),
|
|
@@ -3693,16 +3699,16 @@ function $n(e) {
|
|
|
3693
3699
|
return (u = P(h)) == null ? void 0 : u.icon;
|
|
3694
3700
|
}
|
|
3695
3701
|
function P(h) {
|
|
3696
|
-
return h == null ? null : typeof h != "string" ? h :
|
|
3702
|
+
return h == null ? null : typeof h != "string" ? h : nt(l, (r) => r.children).find((r) => {
|
|
3697
3703
|
var y;
|
|
3698
|
-
return r.name == h || r.singleName == h || ((y = r.aliases) == null ? void 0 : y.some((
|
|
3704
|
+
return r.name == h || r.singleName == h || ((y = r.aliases) == null ? void 0 : y.some((I) => I == h));
|
|
3699
3705
|
}) ?? null;
|
|
3700
3706
|
}
|
|
3701
|
-
function
|
|
3707
|
+
function T(h) {
|
|
3702
3708
|
const u = P(h);
|
|
3703
3709
|
if (u == null)
|
|
3704
3710
|
return;
|
|
3705
|
-
let r =
|
|
3711
|
+
let r = yn(u.microservice ?? "default") ?? "";
|
|
3706
3712
|
return u.path != null && (r = Be(r, u.path)), r != null && r.endsWith("/") && (r = r.slice(0, r.length - 1)), r;
|
|
3707
3713
|
}
|
|
3708
3714
|
function N(h) {
|
|
@@ -3711,7 +3717,7 @@ function $n(e) {
|
|
|
3711
3717
|
return u.singleName;
|
|
3712
3718
|
const r = u == null ? void 0 : u.displayName;
|
|
3713
3719
|
if (r != null)
|
|
3714
|
-
return
|
|
3720
|
+
return vn(r);
|
|
3715
3721
|
}
|
|
3716
3722
|
function $(h) {
|
|
3717
3723
|
const u = P(h);
|
|
@@ -3721,14 +3727,14 @@ function $n(e) {
|
|
|
3721
3727
|
if (h == null)
|
|
3722
3728
|
return;
|
|
3723
3729
|
const u = typeof h == "string" ? P(h) : h;
|
|
3724
|
-
|
|
3730
|
+
Zr.value = u == null ? void 0 : u.background, Yr.value = (u == null ? void 0 : u.hideNavigation) !== !0, zr.value = (u == null ? void 0 : u.hideAppBar) !== !0, yr != null && yr(), gr.value = (u == null ? void 0 : u.hesitate) === !0, gr.value && (yr = window.addEventListener("beforeunload", (r) => {
|
|
3725
3731
|
r.preventDefault();
|
|
3726
3732
|
}));
|
|
3727
3733
|
}
|
|
3728
3734
|
return Cr = {
|
|
3729
|
-
showAppBar:
|
|
3730
|
-
showAppNavigation:
|
|
3731
|
-
backgroundName:
|
|
3735
|
+
showAppBar: zr,
|
|
3736
|
+
showAppNavigation: Yr,
|
|
3737
|
+
backgroundName: Zr,
|
|
3732
3738
|
hesitate: gr,
|
|
3733
3739
|
navigationItems: l,
|
|
3734
3740
|
findArchiveName: S,
|
|
@@ -3737,59 +3743,59 @@ function $n(e) {
|
|
|
3737
3743
|
findIcon: x,
|
|
3738
3744
|
findItem: P,
|
|
3739
3745
|
findStoreName: $,
|
|
3740
|
-
findPath:
|
|
3746
|
+
findPath: T,
|
|
3741
3747
|
findSingleDisplay: N,
|
|
3742
3748
|
updateNavigationProperties: d
|
|
3743
3749
|
}, Cr;
|
|
3744
3750
|
}
|
|
3745
|
-
function
|
|
3746
|
-
var qe,
|
|
3747
|
-
const S =
|
|
3751
|
+
function xa(e, t, l) {
|
|
3752
|
+
var qe, Ve;
|
|
3753
|
+
const S = Mn(), s = ct(), g = Mr(), x = rt(), { bladeData: P } = Pn({}), T = e.useBladeSrc ?? !0, N = e.useRouteSrc ?? !0, $ = e.nav ?? e.bladeName ?? e.itemBladeName ?? "basic", d = e.storeMode ?? ((qe = s.findItem($)) == null ? void 0 : qe.storeMode), h = e.storageMode ?? ((Ve = s.findItem($)) == null ? void 0 : Ve.storageMode), u = K(e.customFilters) ?? [], r = z([]), y = te(() => Qt([
|
|
3748
3754
|
...u.filter((U) => U.name != null).map((U) => U.name),
|
|
3749
3755
|
...e.defaultFilters ?? [],
|
|
3750
3756
|
...r.value
|
|
3751
|
-
]).value),
|
|
3752
|
-
let i = z([...
|
|
3753
|
-
const
|
|
3757
|
+
]).value), I = z((e.defaultFilters ?? []).map((U) => y.value.indexOf(U)));
|
|
3758
|
+
let i = z([...I.value]);
|
|
3759
|
+
const E = te(() => Wr(i, I).value.length > 0 || Wr(I, i).value.length > 0), w = z(M());
|
|
3754
3760
|
function M() {
|
|
3755
3761
|
var U, j;
|
|
3756
|
-
if (
|
|
3757
|
-
const
|
|
3758
|
-
if (
|
|
3759
|
-
return Number.parseInt(
|
|
3762
|
+
if (T) {
|
|
3763
|
+
const H = (U = P.value) == null ? void 0 : U.page;
|
|
3764
|
+
if (H != null)
|
|
3765
|
+
return Number.parseInt(H);
|
|
3760
3766
|
}
|
|
3761
3767
|
if (N) {
|
|
3762
|
-
const
|
|
3763
|
-
if (
|
|
3764
|
-
return Number.parseInt(typeof
|
|
3768
|
+
const H = (j = x == null ? void 0 : x.query) == null ? void 0 : j.page;
|
|
3769
|
+
if (H != null)
|
|
3770
|
+
return Number.parseInt(typeof H == "string" ? H : H.toString());
|
|
3765
3771
|
}
|
|
3766
3772
|
return 1;
|
|
3767
3773
|
}
|
|
3768
3774
|
const b = te(() => {
|
|
3769
3775
|
var U, j;
|
|
3770
|
-
if (
|
|
3771
|
-
const
|
|
3772
|
-
if (
|
|
3773
|
-
return
|
|
3776
|
+
if (T) {
|
|
3777
|
+
const H = (U = P.value) == null ? void 0 : U.proxyID;
|
|
3778
|
+
if (H != null)
|
|
3779
|
+
return H;
|
|
3774
3780
|
}
|
|
3775
3781
|
if (N) {
|
|
3776
|
-
const
|
|
3777
|
-
if (
|
|
3778
|
-
return
|
|
3782
|
+
const H = (j = x == null ? void 0 : x.query) == null ? void 0 : j.query;
|
|
3783
|
+
if (H != null)
|
|
3784
|
+
return H;
|
|
3779
3785
|
}
|
|
3780
3786
|
return e.proxyID;
|
|
3781
|
-
}),
|
|
3787
|
+
}), _ = z(D());
|
|
3782
3788
|
function D() {
|
|
3783
3789
|
var U, j;
|
|
3784
|
-
if (
|
|
3785
|
-
const
|
|
3786
|
-
if (
|
|
3787
|
-
return
|
|
3790
|
+
if (T) {
|
|
3791
|
+
const H = (U = P.value) == null ? void 0 : U.search;
|
|
3792
|
+
if (H != null)
|
|
3793
|
+
return H;
|
|
3788
3794
|
}
|
|
3789
3795
|
if (N) {
|
|
3790
|
-
const
|
|
3791
|
-
if (
|
|
3792
|
-
return
|
|
3796
|
+
const H = (j = x == null ? void 0 : x.query) == null ? void 0 : j.search;
|
|
3797
|
+
if (H != null)
|
|
3798
|
+
return H;
|
|
3793
3799
|
}
|
|
3794
3800
|
}
|
|
3795
3801
|
const L = z(K(e.startShowingInactive) ?? !1), f = te(() => [
|
|
@@ -3797,7 +3803,7 @@ function Da(e, t, l) {
|
|
|
3797
3803
|
...(e.headers ?? []).filter((U) => U.searchable != null && U.value != null).map((U) => U.value ?? "")
|
|
3798
3804
|
]), A = z([]), J = Re([]), Q = z([]);
|
|
3799
3805
|
let ee;
|
|
3800
|
-
const { actionErrorMsg: ie, actionLoadingMsg: we, deleteItem: W, doAction: Y, getItem:
|
|
3806
|
+
const { actionErrorMsg: ie, actionLoadingMsg: we, deleteItem: W, doAction: Y, getItem: V, getAllItems: ae, restoreItem: G } = it({
|
|
3801
3807
|
nav: $,
|
|
3802
3808
|
onError: e.onError ?? (l == null ? void 0 : l.onError),
|
|
3803
3809
|
proxyID: b.value,
|
|
@@ -3806,30 +3812,30 @@ function Da(e, t, l) {
|
|
|
3806
3812
|
storageMode: h,
|
|
3807
3813
|
nav: $
|
|
3808
3814
|
})
|
|
3809
|
-
}), X = te(() => e.errorMsg ?? ie.value), ne = te(() => e.loadingMsg ?? we.value), fe = te(() => ne.value != null), ce = Re(!1),
|
|
3815
|
+
}), X = te(() => e.errorMsg ?? ie.value), ne = te(() => e.loadingMsg ?? we.value), fe = te(() => ne.value != null), ce = Re(!1), Ee = Re(e.showSearch ?? !0), $e = z(0), Ce = te(() => {
|
|
3810
3816
|
let U, j = [];
|
|
3811
|
-
|
|
3817
|
+
I.value.forEach((O) => {
|
|
3812
3818
|
const oe = y.value[O], ve = u.find((De) => De.name == oe);
|
|
3813
3819
|
ve != null ? U = U != null ? `${U}ANDALSO${ve.filterFunction()}` : ve.filterFunction() : j.push(oe);
|
|
3814
3820
|
});
|
|
3815
|
-
const
|
|
3816
|
-
return
|
|
3821
|
+
const H = {};
|
|
3822
|
+
return Te(j) && (H.filterBy = j.toString()), U != null && (H.query = U), H;
|
|
3817
3823
|
}), rr = te(() => {
|
|
3818
3824
|
var j;
|
|
3819
3825
|
let U = e.params != null ? { ...e.params } : {};
|
|
3820
|
-
return e.useServerPagination && e.itemsPerPage != null && (U.includeCount = !0, U.takeAmount = e.itemsPerPage, U.takeFrom = (w.value - 1) * e.itemsPerPage), Ce.value != null && (U = { ...U, ...Ce.value }), L.value && (U.includeInactive = !0),
|
|
3826
|
+
return e.useServerPagination && e.itemsPerPage != null && (U.includeCount = !0, U.takeAmount = e.itemsPerPage, U.takeFrom = (w.value - 1) * e.itemsPerPage), Ce.value != null && (U = { ...U, ...Ce.value }), L.value && (U.includeInactive = !0), Te(e.selectProps) && (U.properties = (j = e.selectProps) == null ? void 0 : j.toString()), _.value != null && (U.searchString = _.value), U;
|
|
3821
3827
|
}), tr = te(() => (U) => e.onCanDelete != null ? e.onCanDelete(U) : !(U != null && U.isInactive === !0)), nr = te(() => (U) => L.value ? e.onCanRestore != null ? e.onCanRestore(U) : (U == null ? void 0 : U.isInactive) === !0 : !1), Pe = te(() => Q.value.filter((U) => !U.hide)), ar = te(() => {
|
|
3822
3828
|
let U = new Array();
|
|
3823
|
-
return Pe.value.filter((
|
|
3824
|
-
let O = U.find((oe) => oe.position ==
|
|
3825
|
-
O == null ? U.push({ position:
|
|
3826
|
-
}), U.sort(Ue.firstBy((
|
|
3829
|
+
return Pe.value.filter((H) => H.sublevel != null).forEach((H) => {
|
|
3830
|
+
let O = U.find((oe) => oe.position == H.sublevel);
|
|
3831
|
+
O == null ? U.push({ position: H.sublevel ?? 0, values: [H] }) : O.values.push(H);
|
|
3832
|
+
}), U.sort(Ue.firstBy((H) => H.position));
|
|
3827
3833
|
}), lr = te(() => {
|
|
3828
3834
|
let U = new Array();
|
|
3829
|
-
return Pe.value.filter((
|
|
3830
|
-
let O = U.find((oe) => oe.position ==
|
|
3831
|
-
O == null ? U.push({ position:
|
|
3832
|
-
}), U.sort(Ue.firstBy((
|
|
3835
|
+
return Pe.value.filter((H) => H.level != null).forEach((H) => {
|
|
3836
|
+
let O = U.find((oe) => oe.position == H.level);
|
|
3837
|
+
O == null ? U.push({ position: H.level ?? 0, values: [H] }) : O.values.push(H);
|
|
3838
|
+
}), U.sort(Ue.firstBy((H) => H.position));
|
|
3833
3839
|
}), ur = te(() => Pe.value.filter((U) => U.nav != null && U.itemText != null || U.textFilter != null || U.display != null || U.bool != null));
|
|
3834
3840
|
function be(U) {
|
|
3835
3841
|
if (e.itemBladeName != null) {
|
|
@@ -3847,7 +3853,7 @@ function Da(e, t, l) {
|
|
|
3847
3853
|
function ir(U) {
|
|
3848
3854
|
const {
|
|
3849
3855
|
additionalUrl: j,
|
|
3850
|
-
onDeleteAsync:
|
|
3856
|
+
onDeleteAsync: H
|
|
3851
3857
|
} = { ...e }, O = K(U), oe = O.id, ve = (De) => {
|
|
3852
3858
|
if (De != null) {
|
|
3853
3859
|
let Se = A.value.findIndex((se) => se.id == De);
|
|
@@ -3868,7 +3874,7 @@ function Da(e, t, l) {
|
|
|
3868
3874
|
data: O,
|
|
3869
3875
|
nav: $,
|
|
3870
3876
|
onCanDeleteAsync: e.onCanDeleteAsync,
|
|
3871
|
-
onDeleteAsync:
|
|
3877
|
+
onDeleteAsync: H,
|
|
3872
3878
|
onDeleteSuccessAsync: async () => (ve(oe), e.onDeleteSuccessAsync != null ? e.onDeleteSuccessAsync(O) : Promise.resolve(void 0)),
|
|
3873
3879
|
proxyID: b.value,
|
|
3874
3880
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
@@ -3894,9 +3900,9 @@ function Da(e, t, l) {
|
|
|
3894
3900
|
}
|
|
3895
3901
|
function Ne() {
|
|
3896
3902
|
let U = K(A);
|
|
3897
|
-
if (U = e.onFilter ? e.onFilter(U) : U,
|
|
3903
|
+
if (U = e.onFilter ? e.onFilter(U) : U, _.value != null && _.value.length > 0) {
|
|
3898
3904
|
let j = [...f.value];
|
|
3899
|
-
e.itemText && j.push(e.itemText),
|
|
3905
|
+
e.itemText && j.push(e.itemText), Te(j) && (U = U.filter((H) => hn(H, _.value, j)));
|
|
3900
3906
|
}
|
|
3901
3907
|
J.value = U;
|
|
3902
3908
|
}
|
|
@@ -3904,8 +3910,8 @@ function Da(e, t, l) {
|
|
|
3904
3910
|
const U = (l == null ? void 0 : l.hideActions) ?? e.hideActions;
|
|
3905
3911
|
e.headers != null && (Q.value = [...e.headers], U || Q.value.push({ title: "Actions", value: "itemActions", align: "end" }));
|
|
3906
3912
|
}
|
|
3907
|
-
async function
|
|
3908
|
-
if (ce.value = !1, (U == null ? void 0 : U.resetSearch) === !0 && (
|
|
3913
|
+
async function Ie(U) {
|
|
3914
|
+
if (ce.value = !1, (U == null ? void 0 : U.resetSearch) === !0 && (Ee.value = e.showSearch ?? !1, _.value = void 0), e.items != null) {
|
|
3909
3915
|
A.value = e.onGetSuccessAsync != null ? await e.onGetSuccessAsync(e.items) : e.items;
|
|
3910
3916
|
return;
|
|
3911
3917
|
}
|
|
@@ -3924,28 +3930,28 @@ function Da(e, t, l) {
|
|
|
3924
3930
|
onGetSuccessAsync: e.onGetSuccessAsync
|
|
3925
3931
|
};
|
|
3926
3932
|
if (e.isSingle === !0)
|
|
3927
|
-
j.id === "new" ? A.value = [] : A.value = await
|
|
3933
|
+
j.id === "new" ? A.value = [] : A.value = await V(j);
|
|
3928
3934
|
else {
|
|
3929
|
-
let
|
|
3935
|
+
let H = await ae({
|
|
3930
3936
|
...j,
|
|
3931
3937
|
onGetSuccessAsync: async (O, oe) => {
|
|
3932
3938
|
let ve = O == null ? void 0 : O.data;
|
|
3933
3939
|
return r.value = (O == null ? void 0 : O.filters) ?? [], e.useServerPagination === !0 && e.itemsPerPage && O.count && ($e.value = Math.ceil(O.count / e.itemsPerPage)), e.onGetSuccessAsync != null && (ve = await e.onGetSuccessAsync(ve, oe)), ve;
|
|
3934
3940
|
}
|
|
3935
3941
|
});
|
|
3936
|
-
A.value =
|
|
3942
|
+
A.value = H, i.value = [...I.value];
|
|
3937
3943
|
}
|
|
3938
3944
|
Ne();
|
|
3939
3945
|
}
|
|
3940
3946
|
function Je(U, j) {
|
|
3941
|
-
const
|
|
3942
|
-
if (
|
|
3947
|
+
const H = K(U);
|
|
3948
|
+
if (H != null && H === ee && e.canUnselect ? ee = null : ee = H, t != null && t("select", ee), !(!e.canSelect || e.onCanSelectItem != null && !e.onCanSelectItem(H)))
|
|
3943
3949
|
if (e.onSelectItem != null)
|
|
3944
3950
|
e.onSelectItem(ee);
|
|
3945
3951
|
else {
|
|
3946
3952
|
let O = {
|
|
3947
3953
|
bladeName: e.itemBladeName,
|
|
3948
|
-
id:
|
|
3954
|
+
id: H.id,
|
|
3949
3955
|
nav: $
|
|
3950
3956
|
};
|
|
3951
3957
|
j == "page" && g.push({
|
|
@@ -3955,21 +3961,21 @@ function Da(e, t, l) {
|
|
|
3955
3961
|
}
|
|
3956
3962
|
}
|
|
3957
3963
|
function je() {
|
|
3958
|
-
|
|
3964
|
+
Ee.value ? (Ee.value = e.showSearch ?? !1, _.value = void 0, Ie()) : Ee.value = e.showSearch ?? !0;
|
|
3959
3965
|
}
|
|
3960
|
-
return We(),
|
|
3966
|
+
return We(), Xt([_], () => {
|
|
3961
3967
|
Ne();
|
|
3962
|
-
}, { debounce: 500, maxWait: 500 }),
|
|
3963
|
-
await
|
|
3964
|
-
}),
|
|
3968
|
+
}, { debounce: 500, maxWait: 500 }), _e([L, w], async () => {
|
|
3969
|
+
await Ie();
|
|
3970
|
+
}), _e([X, () => e.errorMsg], ([U, j]) => {
|
|
3965
3971
|
ce.value = U != null || j != null;
|
|
3966
|
-
}),
|
|
3967
|
-
|
|
3968
|
-
}),
|
|
3972
|
+
}), _e(() => e.refreshToggle, () => {
|
|
3973
|
+
Ie({ deepRefresh: !0 });
|
|
3974
|
+
}), pr([A, () => e.items], () => {
|
|
3969
3975
|
Ne();
|
|
3970
|
-
}),
|
|
3976
|
+
}), Or(async () => {
|
|
3971
3977
|
var U;
|
|
3972
|
-
e.eager == !0 && await
|
|
3978
|
+
e.eager == !0 && await Ie({ deepRefresh: ((U = x == null ? void 0 : x.params) == null ? void 0 : U.refresh) == "true" });
|
|
3973
3979
|
}), {
|
|
3974
3980
|
add: be,
|
|
3975
3981
|
asyncItems: A,
|
|
@@ -3980,21 +3986,21 @@ function Da(e, t, l) {
|
|
|
3980
3986
|
exportToCSV: Fe,
|
|
3981
3987
|
filteredItems: J,
|
|
3982
3988
|
filters: y,
|
|
3983
|
-
filtersChanged:
|
|
3989
|
+
filtersChanged: E,
|
|
3984
3990
|
headerOptions: Q,
|
|
3985
3991
|
isDeletable: tr,
|
|
3986
3992
|
isLoading: fe,
|
|
3987
3993
|
isRestorable: nr,
|
|
3988
3994
|
loadingMsg: ne,
|
|
3989
|
-
refresh:
|
|
3995
|
+
refresh: Ie,
|
|
3990
3996
|
restoreItem: Ze,
|
|
3991
|
-
searchString:
|
|
3992
|
-
selectedFilters:
|
|
3997
|
+
searchString: _,
|
|
3998
|
+
selectedFilters: I,
|
|
3993
3999
|
selectItem: Je,
|
|
3994
4000
|
// serverFilters,
|
|
3995
4001
|
showError: ce,
|
|
3996
4002
|
showInactive: L,
|
|
3997
|
-
showSearch:
|
|
4003
|
+
showSearch: Ee,
|
|
3998
4004
|
subtitleOptions: ar,
|
|
3999
4005
|
tableHeaders: Pe,
|
|
4000
4006
|
titleOptions: lr,
|
|
@@ -4003,7 +4009,7 @@ function Da(e, t, l) {
|
|
|
4003
4009
|
};
|
|
4004
4010
|
}
|
|
4005
4011
|
let Ge;
|
|
4006
|
-
function
|
|
4012
|
+
function kn(e) {
|
|
4007
4013
|
const t = z((e == null ? void 0 : e.default) ?? "Admin"), l = z((e == null ? void 0 : e.groups) ?? []);
|
|
4008
4014
|
return Ge = {
|
|
4009
4015
|
currentGroup: t,
|
|
@@ -4011,8 +4017,8 @@ function Fn(e) {
|
|
|
4011
4017
|
useRoutes: e == null ? void 0 : e.useRoutes
|
|
4012
4018
|
}, Ge;
|
|
4013
4019
|
}
|
|
4014
|
-
function
|
|
4015
|
-
const e = Mr(), t =
|
|
4020
|
+
function _a() {
|
|
4021
|
+
const e = Mr(), t = ct(), l = Dn();
|
|
4016
4022
|
let S = e.getRoutes();
|
|
4017
4023
|
return {
|
|
4018
4024
|
...Ge,
|
|
@@ -4022,25 +4028,25 @@ function xa() {
|
|
|
4022
4028
|
const s = [];
|
|
4023
4029
|
return S.forEach((x) => {
|
|
4024
4030
|
var d;
|
|
4025
|
-
const P = Ge.groupOptions.value.find((h) => h.displayName == x.meta.menuGroup),
|
|
4031
|
+
const P = Ge.groupOptions.value.find((h) => h.displayName == x.meta.menuGroup), T = t.findItem(x.meta.nav), N = x.meta;
|
|
4026
4032
|
let $ = s.find((h) => h.displayName == N.menuGroup);
|
|
4027
4033
|
$ == null && ($ = {
|
|
4028
4034
|
displayName: N.menuGroup,
|
|
4029
|
-
icon: (P == null ? void 0 : P.icon) ?? (N == null ? void 0 : N.icon) ?? (
|
|
4035
|
+
icon: (P == null ? void 0 : P.icon) ?? (N == null ? void 0 : N.icon) ?? (T == null ? void 0 : T.icon),
|
|
4030
4036
|
isGroup: !0,
|
|
4031
4037
|
items: []
|
|
4032
4038
|
}, s.push($)), (d = $.items) == null || d.push({
|
|
4033
|
-
displayName: (N == null ? void 0 : N.displayName) ?? t.findDisplay(
|
|
4034
|
-
icon: (N == null ? void 0 : N.icon) ?? t.findIcon(
|
|
4035
|
-
permissions: (N == null ? void 0 : N.permissions) ?? (
|
|
4039
|
+
displayName: (N == null ? void 0 : N.displayName) ?? t.findDisplay(T ?? void 0),
|
|
4040
|
+
icon: (N == null ? void 0 : N.icon) ?? t.findIcon(T ?? void 0),
|
|
4041
|
+
permissions: (N == null ? void 0 : N.permissions) ?? (T == null ? void 0 : T.permissions) ?? [],
|
|
4036
4042
|
requiresAuth: (N == null ? void 0 : N.requiresAuth) !== !1,
|
|
4037
|
-
subscriptions: (N == null ? void 0 : N.subscriptions) ?? (
|
|
4038
|
-
subFilters: (N == null ? void 0 : N.subFilters) ?? (
|
|
4043
|
+
subscriptions: (N == null ? void 0 : N.subscriptions) ?? (T == null ? void 0 : T.subscriptions) ?? [],
|
|
4044
|
+
subFilters: (N == null ? void 0 : N.subFilters) ?? (T == null ? void 0 : T.subFilters) ?? [],
|
|
4039
4045
|
routeName: x.name
|
|
4040
4046
|
});
|
|
4041
4047
|
}), s.forEach((x) => {
|
|
4042
4048
|
var P;
|
|
4043
|
-
x.items = (P = x.items) == null ? void 0 : P.filter((
|
|
4049
|
+
x.items = (P = x.items) == null ? void 0 : P.filter((T) => !T.requiresAuth || l.doShow(T.subscriptions, T.permissions, "view")).sort(Ue.firstBy((T) => T.displayName));
|
|
4044
4050
|
}), Ge.currentGroup.value != null ? ((g = s.find((x) => x.displayName == Ge.currentGroup.value)) == null ? void 0 : g.items) ?? [] : s.filter((x) => !x.requiresAuth || l.doShow(x.subscriptions, x.permissions, "view"));
|
|
4045
4051
|
})
|
|
4046
4052
|
};
|
|
@@ -4049,7 +4055,7 @@ let Pr;
|
|
|
4049
4055
|
function Ta(e) {
|
|
4050
4056
|
return Pr.usePresets(e);
|
|
4051
4057
|
}
|
|
4052
|
-
function
|
|
4058
|
+
function Gn(e) {
|
|
4053
4059
|
function t(l) {
|
|
4054
4060
|
if (!l)
|
|
4055
4061
|
return {};
|
|
@@ -4060,34 +4066,34 @@ function kn(e) {
|
|
|
4060
4066
|
usePresets: t
|
|
4061
4067
|
}, Pr;
|
|
4062
4068
|
}
|
|
4063
|
-
let
|
|
4064
|
-
const wr = z(!1), br = z(!1),
|
|
4069
|
+
let Jr, jr, Kr, Qr = !1;
|
|
4070
|
+
const wr = z(!1), br = z(!1), Xr = z(), pe = z();
|
|
4065
4071
|
let Nr;
|
|
4066
|
-
function
|
|
4072
|
+
function Ca() {
|
|
4067
4073
|
return Nr;
|
|
4068
4074
|
}
|
|
4069
|
-
function
|
|
4075
|
+
function Wn() {
|
|
4070
4076
|
function e(x) {
|
|
4071
4077
|
pe.value = x.detail, br.value = !0;
|
|
4072
4078
|
}
|
|
4073
4079
|
function t() {
|
|
4074
|
-
|
|
4080
|
+
Qr || (Qr = !0, window.location.reload());
|
|
4075
4081
|
}
|
|
4076
4082
|
function l() {
|
|
4077
4083
|
var x;
|
|
4078
|
-
(x =
|
|
4084
|
+
(x = Xr.value) == null || x.prompt(), wr.value = !1;
|
|
4079
4085
|
}
|
|
4080
4086
|
function S() {
|
|
4081
4087
|
return !!window.matchMedia("(display-mode: standalone)").matches;
|
|
4082
4088
|
}
|
|
4083
4089
|
function s(x) {
|
|
4084
|
-
x.preventDefault(), wr.value = !0,
|
|
4090
|
+
x.preventDefault(), wr.value = !0, Xr.value = x;
|
|
4085
4091
|
}
|
|
4086
4092
|
function g() {
|
|
4087
4093
|
br.value = !1, !(!pe.value || !pe.value.waiting) && pe.value.waiting.postMessage({ type: "SKIP_WAITING" });
|
|
4088
4094
|
}
|
|
4089
|
-
return
|
|
4090
|
-
|
|
4095
|
+
return Ot(() => {
|
|
4096
|
+
Jr == null && (Jr = document.addEventListener("swUpdated", e, { once: !0 })), jr == null && (jr = navigator.serviceWorker.addEventListener("controllerchange", t)), Kr == null && (Kr = window.addEventListener("beforeinstallprompt", s));
|
|
4091
4097
|
}), Nr = {
|
|
4092
4098
|
canInstallApp: wr,
|
|
4093
4099
|
canUpdateApp: br,
|
|
@@ -4096,122 +4102,122 @@ function Gn() {
|
|
|
4096
4102
|
updateApp: g
|
|
4097
4103
|
}, Nr;
|
|
4098
4104
|
}
|
|
4099
|
-
function
|
|
4105
|
+
function Pa(e) {
|
|
4100
4106
|
const t = [];
|
|
4101
|
-
return (e == null ? void 0 : e.required) == !0 && t.push((l) => !!l || "Field is required"), (e == null ? void 0 : e.otherRules) != null && (Array.isArray(e == null ? void 0 : e.otherRules) ? t.push(...e.otherRules) : t.push(e.otherRules)), (e == null ? void 0 : e.forPassword) == !0 && (t.push((l) => !!l || "Password is required"), t.push((l) => l != null && l.length > 9 || "Password must be 10 or more characters"), t.push((l) => /^(.*[a-z].*)$/.test(l) || "Password must contain a lowercase letter"), t.push((l) => /^(.*[A-Z].*)$/.test(l) || "Password must contain an uppercase letter"), t.push((l) => /^(.*\d.*)$/.test(l) || "Password must contain a number")), (e == null ? void 0 : e.forEmail) == !0 && (t.push((l) => !!l || "Email is required"), t.push((l) =>
|
|
4107
|
+
return (e == null ? void 0 : e.required) == !0 && t.push((l) => !!l || "Field is required"), (e == null ? void 0 : e.otherRules) != null && (Array.isArray(e == null ? void 0 : e.otherRules) ? t.push(...e.otherRules) : t.push(e.otherRules)), (e == null ? void 0 : e.forPassword) == !0 && (t.push((l) => !!l || "Password is required"), t.push((l) => l != null && l.length > 9 || "Password must be 10 or more characters"), t.push((l) => /^(.*[a-z].*)$/.test(l) || "Password must contain a lowercase letter"), t.push((l) => /^(.*[A-Z].*)$/.test(l) || "Password must contain an uppercase letter"), t.push((l) => /^(.*\d.*)$/.test(l) || "Password must contain a number")), (e == null ? void 0 : e.forEmail) == !0 && (t.push((l) => !!l || "Email is required"), t.push((l) => mn(l) || "Email must be valid")), t;
|
|
4102
4108
|
}
|
|
4103
|
-
function
|
|
4109
|
+
function Na(e) {
|
|
4104
4110
|
return {
|
|
4105
4111
|
install(t, l) {
|
|
4106
|
-
var
|
|
4107
|
-
console.log(t), e.vuetifyInstance ?? (e.vuetifyInstance = l.vuetifyInstance),
|
|
4108
|
-
const S =
|
|
4109
|
-
|
|
4110
|
-
const g =
|
|
4111
|
-
|
|
4112
|
+
var T;
|
|
4113
|
+
console.log(t), e.vuetifyInstance ?? (e.vuetifyInstance = l.vuetifyInstance), Nn(e);
|
|
4114
|
+
const S = Rn(), s = Fn(e);
|
|
4115
|
+
Gn(e), (T = e.auth).demo ?? (T.demo = S), e.auth.getAuthItem = s.findItem;
|
|
4116
|
+
const g = xn(e.auth);
|
|
4117
|
+
kn(e.menu);
|
|
4112
4118
|
const x = In({
|
|
4113
4119
|
auth: g,
|
|
4114
4120
|
findPath: s.findPath,
|
|
4115
4121
|
useBearerToken: !0
|
|
4116
|
-
}), P =
|
|
4122
|
+
}), P = Ln({
|
|
4117
4123
|
getTimeZone: () => g.timeZone.value
|
|
4118
4124
|
});
|
|
4119
|
-
|
|
4125
|
+
Bn({
|
|
4120
4126
|
dates: P
|
|
4121
|
-
}),
|
|
4127
|
+
}), Wn(), bn({
|
|
4122
4128
|
api: x,
|
|
4123
4129
|
auth: g,
|
|
4124
4130
|
navigation: s
|
|
4125
|
-
}),
|
|
4131
|
+
}), wn(e.urls);
|
|
4126
4132
|
}
|
|
4127
4133
|
};
|
|
4128
4134
|
}
|
|
4129
4135
|
export {
|
|
4130
|
-
|
|
4131
|
-
|
|
4136
|
+
oa as DataURIToBlob,
|
|
4137
|
+
la as addWeekday,
|
|
4132
4138
|
Be as appendUrl,
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4139
|
+
an as capitalizeWords,
|
|
4140
|
+
pn as checkImage,
|
|
4141
|
+
sn as containsSearch,
|
|
4142
|
+
aa as containsWeekday,
|
|
4137
4143
|
Lr as copyDeep,
|
|
4138
|
-
|
|
4144
|
+
fn as copyItemByAlphabet,
|
|
4139
4145
|
In as createApi,
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4146
|
+
xn as createAuth,
|
|
4147
|
+
Na as createCore,
|
|
4148
|
+
Nn as createCosmetics,
|
|
4149
|
+
Ln as createDates,
|
|
4150
|
+
Rn as createDemo,
|
|
4151
|
+
Bn as createFilters,
|
|
4152
|
+
kn as createMenu,
|
|
4153
|
+
Fn as createNavigation,
|
|
4154
|
+
Wn as createPWA,
|
|
4155
|
+
Gn as createPresets,
|
|
4156
|
+
En as createSessionStoreDefinition,
|
|
4157
|
+
bn as createStoreBuilder,
|
|
4158
|
+
wn as createUrl,
|
|
4159
|
+
Vr as createWholeLastUpdateStoreDefinition,
|
|
4160
|
+
cn as csvContains,
|
|
4161
|
+
ba as csvDefaults,
|
|
4162
|
+
nt as deepSelect,
|
|
4163
|
+
Jn as distinct,
|
|
4164
|
+
jn as extensionExists,
|
|
4165
|
+
on as extractErrorDescription,
|
|
4166
|
+
nn as fromCamelCase,
|
|
4167
|
+
Kn as getAreaAround,
|
|
4168
|
+
Qn as getAreaToLeft,
|
|
4169
|
+
Xn as getAreaToRight,
|
|
4170
|
+
On as getGoogleMapsLocationLine,
|
|
4171
|
+
ea as getImageData,
|
|
4172
|
+
tt as getLocationLine,
|
|
4173
|
+
ca as getMinDate,
|
|
4174
|
+
un as getMinDateString,
|
|
4175
|
+
dn as getRandomColor,
|
|
4176
|
+
hn as hasSearch,
|
|
4177
|
+
ia as isArrayOfLength,
|
|
4178
|
+
Te as isLengthyArray,
|
|
4179
|
+
ln as isMinDate,
|
|
4174
4180
|
Sr as nestedValue,
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4181
|
+
ua as removeWeekday,
|
|
4182
|
+
fa as roundTo,
|
|
4183
|
+
vn as singularize,
|
|
4184
|
+
ra as toCamelCase,
|
|
4185
|
+
da as toCompareString,
|
|
4186
|
+
sa as toggleCSV,
|
|
4187
|
+
ha as twiddleThumbs,
|
|
4188
|
+
it as useActions,
|
|
4189
|
+
rn as useActionsTracker,
|
|
4190
|
+
Er as useApi,
|
|
4191
|
+
Dn as useAuth,
|
|
4192
|
+
qr as useAuthUrl,
|
|
4193
|
+
Pn as useBlade,
|
|
4194
|
+
Mn as useCSV,
|
|
4195
|
+
ya as useCosmetics,
|
|
4196
|
+
yn as useDataUrl,
|
|
4197
|
+
Sa as useDates,
|
|
4198
|
+
ut as useDbName,
|
|
4199
|
+
Aa as useDemo,
|
|
4200
|
+
Ea as useDocumentMeta,
|
|
4201
|
+
_n as useDraggable,
|
|
4196
4202
|
Ia as useFilters,
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4203
|
+
pt as useId,
|
|
4204
|
+
Da as useItem,
|
|
4205
|
+
xa as useList,
|
|
4206
|
+
va as useLocalCache,
|
|
4207
|
+
wa as useLocalCosmetics,
|
|
4202
4208
|
me as useLocalDb,
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4209
|
+
_a as useMenu,
|
|
4210
|
+
ct as useNavigation,
|
|
4211
|
+
Ca as usePWA,
|
|
4206
4212
|
Ta as usePresets,
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4213
|
+
Cn as useResizable,
|
|
4214
|
+
Pa as useRules,
|
|
4215
|
+
ga as useStore,
|
|
4210
4216
|
Le as useStoreDefinition,
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4217
|
+
$n as useTracker,
|
|
4218
|
+
ma as useUrls,
|
|
4219
|
+
mn as validEmail,
|
|
4214
4220
|
Ye as weekdayPairs,
|
|
4215
|
-
|
|
4216
|
-
|
|
4221
|
+
na as weekdayShortName,
|
|
4222
|
+
ta as weekdayValue
|
|
4217
4223
|
};
|