bt-core-app 1.4.53 → 1.4.55

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.
@@ -11,8 +11,8 @@ function Ot(e) {
11
11
  return (e == "x" ? t : t & 3 | 8).toString(16);
12
12
  }
13
13
  function pt(e) {
14
- const t = z([]), u = Le(), S = Le(), o = Le(), g = te(() => u.value != null);
15
- function _(h) {
14
+ const t = z([]), u = Le(), b = Le(), o = Le(), g = te(() => u.value != null);
15
+ function x(h) {
16
16
  t.value = t.value.filter((m) => m.id != h);
17
17
  }
18
18
  function P(h) {
@@ -23,30 +23,30 @@ function pt(e) {
23
23
  return t.value.push(m), m.id;
24
24
  }
25
25
  function N(h) {
26
- h != null && (S.value = h.toString());
26
+ h != null && (b.value = h.toString());
27
27
  }
28
28
  function $() {
29
- S.value = void 0;
29
+ b.value = void 0;
30
30
  }
31
31
  async function F(h, m) {
32
32
  const l = { ...m };
33
33
  l.completionMsg ?? (l.completionMsg = e == null ? void 0 : e.completionMsg), l.confirmationMsg ?? (l.confirmationMsg = e == null ? void 0 : e.confirmationMsg), l.errorMsg ?? (l.errorMsg = e == null ? void 0 : e.errorMsg), l.loadingMsg ?? (l.loadingMsg = (e == null ? void 0 : e.loadingMsg) ?? "Loading"), l.requireConfirmation ?? (l.requireConfirmation = e == null ? void 0 : e.requireConfirmation);
34
34
  const r = P(l.loadingMsg);
35
- let E = null;
35
+ let y = null;
36
36
  try {
37
- return l.requireConfirmation || l.confirmationMsg, E = await h(), l.completionMsg != null && (o.value = l.completionMsg), E;
38
- } catch (y) {
37
+ return l.requireConfirmation || l.confirmationMsg, y = await h(), l.completionMsg != null && (o.value = l.completionMsg), y;
38
+ } catch (S) {
39
39
  if (l.throwError == !0)
40
- return E;
41
- N(l.errorMsg ?? y ?? "error");
40
+ return y;
41
+ N(l.errorMsg ?? S ?? "error");
42
42
  } finally {
43
- _(r);
43
+ x(r);
44
44
  }
45
45
  }
46
46
  return Qr(t, (h) => {
47
47
  u.value = h.length > 0 ? h[0].msg : void 0;
48
48
  }, { deep: !0 }), {
49
- actionErrorMsg: S,
49
+ actionErrorMsg: b,
50
50
  actionLoadingMsg: u,
51
51
  actionCompleteMsg: o,
52
52
  clearErrors: $,
@@ -68,9 +68,9 @@ var qe = function() {
68
68
  }
69
69
  function u(o, g) {
70
70
  if (g = typeof g == "object" ? g : { direction: g }, typeof o != "function") {
71
- var _ = o;
71
+ var x = o;
72
72
  o = function(h) {
73
- return h[_] ? h[_] : "";
73
+ return h[x] ? h[x] : "";
74
74
  };
75
75
  }
76
76
  if (o.length === 1) {
@@ -86,25 +86,25 @@ var qe = function() {
86
86
  return -o(h, m);
87
87
  } : o;
88
88
  }
89
- function S(o, g) {
90
- var _ = typeof this == "function" && !this.firstBy ? this : !1, P = u(o, g), N = _ ? function($, F) {
91
- return _($, F) || P($, F);
89
+ function b(o, g) {
90
+ var x = typeof this == "function" && !this.firstBy ? this : !1, P = u(o, g), N = x ? function($, F) {
91
+ return x($, F) || P($, F);
92
92
  } : P;
93
- return N.thenBy = S, N;
93
+ return N.thenBy = b, N;
94
94
  }
95
- return S.firstBy = S, S;
95
+ return b.firstBy = b, b;
96
96
  }();
97
97
  function Ne(e, t) {
98
- let u = e ?? "", S = t ?? "";
98
+ let u = e ?? "", b = t ?? "";
99
99
  if (u.endsWith("/"))
100
100
  do
101
101
  u = u.slice(0, u.length - 1);
102
102
  while (u.endsWith("/"));
103
- if (S.startsWith("/"))
103
+ if (b.startsWith("/"))
104
104
  do
105
- S = S.slice(1, S.length);
106
- while (S.startsWith("/"));
107
- return `${u}/${S}`;
105
+ b = b.slice(1, b.length);
106
+ while (b.startsWith("/"));
107
+ return `${u}/${b}`;
108
108
  }
109
109
  function zn(e) {
110
110
  return e == null || !Array.isArray(e) ? e : [...new Set(e.map((t) => t))];
@@ -155,21 +155,21 @@ function et(e, t = !1) {
155
155
  }
156
156
  function Qn(e, t, u) {
157
157
  if (e) {
158
- var S = new Image();
159
- S.onload = t, S.onerror = u, S.src = e;
158
+ var b = new Image();
159
+ b.onload = t, b.onerror = u, b.src = e;
160
160
  }
161
161
  }
162
162
  async function Xn(e, t = !0) {
163
- return new Promise((u, S) => {
164
- e == null && S("no url given");
163
+ return new Promise((u, b) => {
164
+ e == null && b("no url given");
165
165
  var o = new Image();
166
166
  o.setAttribute("crossOrigin", "anonymous"), o.onload = function() {
167
167
  var g = document.createElement("canvas");
168
168
  g.width = this.width, g.height = this.height;
169
- var _ = g.getContext("2d");
170
- _ == null || _.drawImage(this, 0, 0), u(g.toDataURL("image/png"));
169
+ var x = g.getContext("2d");
170
+ x == null || x.drawImage(this, 0, 0), u(g.toDataURL("image/png"));
171
171
  }, o.onerror = function() {
172
- console.log("errr"), t ? S("image could not be loaded for some reason") : u(null);
172
+ console.log("errr"), t ? b("image could not be loaded for some reason") : u(null);
173
173
  }, e != null && (o.src = e);
174
174
  });
175
175
  }
@@ -198,33 +198,33 @@ const He = [
198
198
  function pn(e) {
199
199
  if (e == null)
200
200
  return 0;
201
- const t = e.replaceAll(" ", "").split(",").map((S) => S.toLowerCase()), u = He.filter((S) => S.values.some((o) => t.some((g) => o == g))).map((S) => S.value);
201
+ const t = e.replaceAll(" ", "").split(",").map((b) => b.toLowerCase()), u = He.filter((b) => b.values.some((o) => t.some((g) => o == g))).map((b) => b.value);
202
202
  return u.length == 0 ? 8 : Math.min(...u);
203
203
  }
204
204
  function ea(e) {
205
205
  return e == null ? e : e.toLowerCase().replaceAll(" ", "").split(",").map((t) => {
206
- let u = He.find((S) => S.values.some((o) => o == t));
206
+ let u = He.find((b) => b.values.some((o) => o == t));
207
207
  return u != null ? u.short : "";
208
208
  }).filter((t) => t != null && t.length > 0).toString();
209
209
  }
210
210
  function ra(e, t) {
211
211
  if (e == null || t == null)
212
212
  return !0;
213
- const u = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), S = t.replaceAll(" ", "").toLowerCase(), o = He.find((g) => g.values.some((_) => _ == S));
214
- return o != null && u.some((g) => g == o.short || o.values.some((_) => _ == g));
213
+ const u = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), b = t.replaceAll(" ", "").toLowerCase(), o = He.find((g) => g.values.some((x) => x == b));
214
+ return o != null && u.some((g) => g == o.short || o.values.some((x) => x == g));
215
215
  }
216
216
  function ta(e, t) {
217
217
  if (t == null)
218
218
  return e;
219
219
  let u = e ?? "";
220
220
  u = `${u},${t}`;
221
- let S = [...new Set(u.replaceAll(" ", "").toLowerCase().split(",").map((o) => He.find((g) => g.values.some((_) => _ == o))).filter((o) => o != null).sort(qe.firstBy((o) => (o == null ? void 0 : o.value) ?? 0)).map((o) => o == null ? void 0 : o.short))].toString();
222
- return S.length > 0 ? S : void 0;
221
+ let b = [...new Set(u.replaceAll(" ", "").toLowerCase().split(",").map((o) => He.find((g) => g.values.some((x) => x == o))).filter((o) => o != null).sort(qe.firstBy((o) => (o == null ? void 0 : o.value) ?? 0)).map((o) => o == null ? void 0 : o.short))].toString();
222
+ return b.length > 0 ? b : void 0;
223
223
  }
224
224
  function na(e, t) {
225
225
  if (t == null || e == null)
226
226
  return e;
227
- let u = e ?? "", S = t.replaceAll(" ", "").toLowerCase(), o = [...new Set(u.replaceAll(" ", "").toLowerCase().split(",").map((g) => He.find((_) => _.values.some((P) => P == g && P != S))).filter((g) => g != null).sort(qe.firstBy((g) => (g == null ? void 0 : g.value) ?? 0)).map((g) => g == null ? void 0 : g.short))].toString();
227
+ let u = e ?? "", b = t.replaceAll(" ", "").toLowerCase(), o = [...new Set(u.replaceAll(" ", "").toLowerCase().split(",").map((g) => He.find((x) => x.values.some((P) => P == g && P != b))).filter((g) => g != null).sort(qe.firstBy((g) => (g == null ? void 0 : g.value) ?? 0)).map((g) => g == null ? void 0 : g.short))].toString();
228
228
  return o.length > 0 ? o : void 0;
229
229
  }
230
230
  function aa(e, t) {
@@ -243,38 +243,38 @@ function an() {
243
243
  return "0001-01-01T00:00:00Z";
244
244
  }
245
245
  function ua(e, t) {
246
- let u = "1", S = 0;
247
- if (S < t)
246
+ let u = "1", b = 0;
247
+ if (b < t)
248
248
  do
249
- u = u + "0", S += 1;
250
- while (S < t);
249
+ u = u + "0", b += 1;
250
+ while (b < t);
251
251
  let o = Number.parseInt(u);
252
252
  return Math.round(e * o) / o;
253
253
  }
254
254
  function ia(e, t) {
255
255
  let u = e ?? "";
256
- return t != null && (ln(u, t) ? u = u.split(",").filter((S) => S != t).toString() : u != null ? u = `${u},${t}` : u = t), u != null && u.length > 0 ? u : null;
256
+ return t != null && (ln(u, t) ? u = u.split(",").filter((b) => b != t).toString() : u != null ? u = `${u},${t}` : u = t), u != null && u.length > 0 ? u : null;
257
257
  }
258
258
  function ln(e, t) {
259
259
  if (e == null || e.length == 0)
260
260
  return !1;
261
261
  if (!t)
262
262
  return !0;
263
- var u = e.split(","), S = t.split(",");
264
- return u.some((o) => S.some((g) => g == o));
263
+ var u = e.split(","), b = t.split(",");
264
+ return u.some((o) => b.some((g) => g == o));
265
265
  }
266
266
  function Pr(e) {
267
267
  if (!e)
268
268
  return e;
269
269
  let t, u = Array.isArray(e) ? [] : {};
270
- for (const S in e)
271
- t = e[S], u[S] = typeof t == "object" ? Pr(t) : t;
270
+ for (const b in e)
271
+ t = e[b], u[b] = typeof t == "object" ? Pr(t) : t;
272
272
  return u;
273
273
  }
274
274
  function un(e) {
275
275
  return e && Object.keys(e).sort().reduce(function(t, u) {
276
- let S = e[u];
277
- return t[u] = typeof S == "object" && S !== null ? un(S) : S, t;
276
+ let b = e[u];
277
+ return t[u] = typeof b == "object" && b !== null ? un(b) : b, t;
278
278
  }, Array.isArray(e) ? [] : {});
279
279
  }
280
280
  function cn(e, t) {
@@ -284,17 +284,17 @@ function rt(e, t = (u) => u) {
284
284
  if (e == null)
285
285
  return [];
286
286
  const u = Array.isArray(e) ? e : t(e);
287
- return Te(u) ? [...u.reduce((S, o) => {
288
- S.push(o);
287
+ return Te(u) ? [...u.reduce((b, o) => {
288
+ b.push(o);
289
289
  const g = rt(o, t);
290
- return Te(g) && S.push(...g), S;
290
+ return Te(g) && b.push(...g), b;
291
291
  }, [])] : [];
292
292
  }
293
293
  function ca(e) {
294
- const t = e.split(","), u = t[0].indexOf("base64") >= 0 ? atob(t[1]) : decodeURI(t[1]), S = t[0].split(":")[1].split(";")[0], o = new Uint8Array(u.length);
294
+ const t = e.split(","), u = t[0].indexOf("base64") >= 0 ? atob(t[1]) : decodeURI(t[1]), b = t[0].split(":")[1].split(";")[0], o = new Uint8Array(u.length);
295
295
  for (let g = 0; g < u.length; g++)
296
296
  o[g] = u.charCodeAt(g);
297
- return new Blob([o], { type: S });
297
+ return new Blob([o], { type: b });
298
298
  }
299
299
  function fn(e) {
300
300
  var t = "";
@@ -320,8 +320,8 @@ function on(e, t, u) {
320
320
  return !1;
321
321
  for (let o = 0; o < u.length; o++) {
322
322
  const g = u[o];
323
- var S = wr(e, g);
324
- if (S != null && typeof S == "string" && cn(S, t))
323
+ var b = wr(e, g);
324
+ if (b != null && typeof b == "string" && cn(b, t))
325
325
  return !0;
326
326
  }
327
327
  return !1;
@@ -338,8 +338,8 @@ function wr(e, t) {
338
338
  if (e == null || e == null || !t)
339
339
  return null;
340
340
  var u = t.split(".");
341
- let S = u.length;
342
- for (var o = e, g = 0; g < S; g++)
341
+ let b = u.length;
342
+ for (var o = e, g = 0; g < b; g++)
343
343
  if (o = o[u[g]], o == null)
344
344
  return null;
345
345
  return o;
@@ -355,168 +355,168 @@ function Sr() {
355
355
  return br;
356
356
  }
357
357
  function mn(e) {
358
- const t = (e == null ? void 0 : e.buildHeaders) ?? P, u = (e == null ? void 0 : e.buildQuery) ?? g, S = (e == null ? void 0 : e.buildUrl) ?? _, o = e == null ? void 0 : e.demo;
358
+ const t = (e == null ? void 0 : e.buildHeaders) ?? P, u = (e == null ? void 0 : e.buildQuery) ?? g, b = (e == null ? void 0 : e.buildUrl) ?? x, o = e == null ? void 0 : e.demo;
359
359
  function g(l) {
360
360
  let r = new URLSearchParams();
361
- return Object.entries(l).forEach((E) => {
362
- E[1] != null && r.append(E[0], E[1]);
363
- }), l.filterBy && r.set("filterBy", l.filterBy), l.includeCount && r.set("includeCount", l.includeCount.toString()), l.includeDetails != null && r.set("includeDetails", l.includeDetails.toString()), l.includeInactive && r.set("includeInactive", l.includeInactive.toString()), l.properties && r.set("properties", l.properties.toString()), l.query && r.set("query", l.query.toString()), l.searchString && r.set("searchString", l.searchString), l.sortOrder && r.set("sortOrder", l.sortOrder), l.sortBy && r.set("sortBy", l.sortBy), l.takeFrom && r.set("takeFrom", l.takeFrom.toString()), l.takeAmount && r.set("takeAmount", l.takeAmount.toString()), l.other && Object.entries(l.other).forEach((E) => {
364
- E[1] != null && r.append(E[0], E[1].toString());
361
+ return Object.entries(l).forEach((y) => {
362
+ y[1] != null && r.append(y[0], y[1]);
363
+ }), l.filterBy && r.set("filterBy", l.filterBy), l.includeCount && r.set("includeCount", l.includeCount.toString()), l.includeDetails != null && r.set("includeDetails", l.includeDetails.toString()), l.includeInactive && r.set("includeInactive", l.includeInactive.toString()), l.properties && r.set("properties", l.properties.toString()), l.query && r.set("query", l.query.toString()), l.searchString && r.set("searchString", l.searchString), l.sortOrder && r.set("sortOrder", l.sortOrder), l.sortBy && r.set("sortBy", l.sortBy), l.takeFrom && r.set("takeFrom", l.takeFrom.toString()), l.takeAmount && r.set("takeAmount", l.takeAmount.toString()), l.other && Object.entries(l.other).forEach((y) => {
364
+ y[1] != null && r.append(y[0], y[1].toString());
365
365
  }), r.toString();
366
366
  }
367
- function _(l) {
368
- let r = j(l.url) ?? void 0, E = j(l.id);
369
- return r == null && (e == null ? void 0 : e.findPath) != null && (r = e.findPath(l.nav)), l.additionalUrl != null && (r == null ? r = l.additionalUrl : r = Ne(r, l.additionalUrl)), E != null && (r != null && r.includes("{id}") ? r = r.replaceAll("{id}", E) : r = Ne(r, E)), l.params != null && (r = `${r}?${u(l.params)}`), l.finalUrl = r, l.finalUrl ?? "";
367
+ function x(l) {
368
+ let r = j(l.url) ?? void 0, y = j(l.id);
369
+ return r == null && (e == null ? void 0 : e.findPath) != null && (r = e.findPath(l.nav)), l.additionalUrl != null && (r == null ? r = l.additionalUrl : r = Ne(r, l.additionalUrl)), y != null && (r != null && r.includes("{id}") ? r = r.replaceAll("{id}", y) : r = Ne(r, y)), l.params != null && (r = `${r}?${u(l.params)}`), l.finalUrl = r, l.finalUrl ?? "";
370
370
  }
371
371
  function P(l) {
372
- var E, y;
372
+ var y, S;
373
373
  let r = { ...l.headers };
374
- return l.proxyID && (r.ManagedCompanyAccountID ?? (r.ManagedCompanyAccountID = l.proxyID)), (e == null ? void 0 : e.useBearerToken) != !1 && ((E = e == null ? void 0 : e.auth) == null ? void 0 : E.isLoggedIn.value) == !0 && (r.authorization ?? (r.authorization = `bearer ${(y = e == null ? void 0 : e.auth) == null ? void 0 : y.credentials.value.token}`)), r["Content-Type"] ?? (r["Content-Type"] = l.contentType ?? (e == null ? void 0 : e.defaultContentType) ?? "application/json"), r;
374
+ return l.proxyID && (r.ManagedCompanyAccountID ?? (r.ManagedCompanyAccountID = l.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 ${(S = e == null ? void 0 : e.auth) == null ? void 0 : S.credentials.value.token}`)), r["Content-Type"] ?? (r["Content-Type"] = l.contentType ?? (e == null ? void 0 : e.defaultContentType) ?? "application/json"), r;
375
375
  }
376
376
  async function N(l) {
377
- const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, E = l.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, y = l.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
378
- let c = l.finalUrl, x = l.headers;
379
- if (c == null && (c = S(l)), l.overrideHeaders !== !0 && (x = t(l)), o != null && o.isDemoing.value)
377
+ const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = l.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, S = l.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
378
+ let c = l.finalUrl, D = l.headers;
379
+ if (c == null && (c = b(l)), l.overrideHeaders !== !0 && (D = t(l)), o != null && o.isDemoing.value)
380
380
  return console.log(`DEMO: Get from ${c}`), o.get(l);
381
381
  console.log(`Get from ${c}`);
382
- let w;
382
+ let E;
383
383
  try {
384
- if (w = await fetch(c, {
384
+ if (E = await fetch(c, {
385
385
  method: "GET",
386
386
  mode: "cors",
387
387
  cache: "no-cache",
388
- headers: x
389
- }), !w.ok) {
390
- let M = await w.text();
391
- throw new Error(M ?? w.statusText ?? "Get error");
388
+ headers: D
389
+ }), !E.ok) {
390
+ let M = await E.text();
391
+ throw new Error(M ?? E.statusText ?? "Get error");
392
392
  }
393
+ if (S)
394
+ return await E.text();
393
395
  if (y)
394
- return await w.text();
395
- if (E)
396
- return await w.json();
396
+ return await E.json();
397
397
  throw new Error();
398
398
  } catch (M) {
399
- const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${M.message}`;
399
+ const w = `${(E == null ? void 0 : E.status) ?? ""} ${(E == null ? void 0 : E.statusText) ?? ""} ${M.message}`;
400
400
  if (!r)
401
401
  return;
402
- throw new Error(b);
402
+ throw new Error(w);
403
403
  }
404
404
  }
405
405
  async function $(l) {
406
- const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, E = l.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, y = l.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
407
- let c = l.finalUrl, x = l.headers;
408
- if (c == null && (c = S(l)), l.overrideHeaders !== !0 && (x = t(l)), o != null && o.isDemoing.value)
406
+ const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = l.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, S = l.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
407
+ let c = l.finalUrl, D = l.headers;
408
+ if (c == null && (c = b(l)), l.overrideHeaders !== !0 && (D = t(l)), o != null && o.isDemoing.value)
409
409
  return console.log(`DEMO: Get all from ${c}`), o.getAll(l);
410
410
  console.log(`Get all from ${c}`);
411
- let w;
411
+ let E;
412
412
  try {
413
- if (w = await fetch(c, {
413
+ if (E = await fetch(c, {
414
414
  method: "GET",
415
415
  mode: "cors",
416
416
  cache: "no-cache",
417
- headers: x
418
- }), !w.ok) {
419
- let M = await w.text();
420
- throw new Error(M ?? w.statusText ?? "Get all error");
417
+ headers: D
418
+ }), !E.ok) {
419
+ let M = await E.text();
420
+ throw new Error(M ?? E.statusText ?? "Get all error");
421
421
  }
422
+ if (S)
423
+ return await E.text();
422
424
  if (y)
423
- return await w.text();
424
- if (E)
425
- return await w.json();
425
+ return await E.json();
426
426
  throw new Error();
427
427
  } catch (M) {
428
- const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${M.message}`;
428
+ const w = `${(E == null ? void 0 : E.status) ?? ""} ${(E == null ? void 0 : E.statusText) ?? ""} ${M.message}`;
429
429
  if (!r)
430
430
  return;
431
- throw new Error(b);
431
+ throw new Error(w);
432
432
  }
433
433
  }
434
434
  async function F(l) {
435
- const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, E = l.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, y = l.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
436
- let c = l.finalUrl, x = l.headers;
437
- if (c == null && (c = S(l)), l.overrideHeaders !== !0 && (x = t(l)), o != null && o.isDemoing.value)
435
+ const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = l.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, S = l.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
436
+ let c = l.finalUrl, D = l.headers;
437
+ if (c == null && (c = b(l)), l.overrideHeaders !== !0 && (D = t(l)), o != null && o.isDemoing.value)
438
438
  return console.log(`DEMO: Post to ${c}`), o.post(l);
439
439
  console.log(`Post to ${c}`);
440
- let w;
440
+ let E;
441
441
  try {
442
- if (w = await fetch(c, {
442
+ if (E = await fetch(c, {
443
443
  method: "POST",
444
444
  mode: "cors",
445
445
  cache: "no-cache",
446
- headers: x,
446
+ headers: D,
447
447
  body: JSON.stringify(l.data)
448
- }), !w.ok) {
449
- let M = await w.text();
450
- throw new Error(M ?? w.statusText ?? "Post error!");
448
+ }), !E.ok) {
449
+ let M = await E.text();
450
+ throw new Error(M ?? E.statusText ?? "Post error!");
451
451
  }
452
+ if (S)
453
+ return await E.text();
452
454
  if (y)
453
- return await w.text();
454
- if (E)
455
- return await w.json();
455
+ return await E.json();
456
456
  throw new Error();
457
457
  } catch (M) {
458
- if (w.status == 200 || !r)
458
+ if (E.status == 200 || !r)
459
459
  return;
460
- const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${M.message}`;
461
- throw new Error(b);
460
+ const w = `${(E == null ? void 0 : E.status) ?? ""} ${(E == null ? void 0 : E.statusText) ?? ""} ${M.message}`;
461
+ throw new Error(w);
462
462
  }
463
463
  }
464
464
  async function h(l) {
465
- const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, E = l.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, y = l.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
466
- let c = l.finalUrl, x = l.headers;
467
- if (c == null && (c = S(l)), l.overrideHeaders !== !0 && (x = t(l)), o != null && o.isDemoing.value)
465
+ const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = l.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, S = l.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
466
+ let c = l.finalUrl, D = l.headers;
467
+ if (c == null && (c = b(l)), l.overrideHeaders !== !0 && (D = t(l)), o != null && o.isDemoing.value)
468
468
  return console.log(`DEMO: Patch to ${c}`), o.patch(l);
469
469
  console.log(`Patch to ${c}`);
470
- let w;
470
+ let E;
471
471
  try {
472
- if (w = await fetch(c, {
472
+ if (E = await fetch(c, {
473
473
  method: "PATCH",
474
474
  mode: "cors",
475
475
  cache: "no-cache",
476
- headers: x,
476
+ headers: D,
477
477
  body: JSON.stringify(l.data)
478
- }), !w.ok) {
479
- let M = await w.text();
480
- throw new Error(M ?? w.statusText ?? "Patch error!");
478
+ }), !E.ok) {
479
+ let M = await E.text();
480
+ throw new Error(M ?? E.statusText ?? "Patch error!");
481
481
  }
482
+ if (S)
483
+ return await E.text();
482
484
  if (y)
483
- return await w.text();
484
- if (E)
485
- return await w.json();
485
+ return await E.json();
486
486
  throw new Error();
487
487
  } catch (M) {
488
- if (w.status == 200 || !r)
488
+ if (E.status == 200 || !r)
489
489
  return;
490
- const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${M.message}`;
491
- throw new Error(b);
490
+ const w = `${(E == null ? void 0 : E.status) ?? ""} ${(E == null ? void 0 : E.statusText) ?? ""} ${M.message}`;
491
+ throw new Error(w);
492
492
  }
493
493
  }
494
494
  async function m(l) {
495
495
  const r = l.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0;
496
- let E = l.finalUrl, y = l.headers;
497
- if (E == null && (E = S(l)), l.overrideHeaders !== !0 && (y = t(l)), o != null && o.isDemoing.value)
498
- return console.log(`DEMO: Delete ${E}`), o.deleteItem(l);
499
- console.log(`Delete ${E}`);
496
+ let y = l.finalUrl, S = l.headers;
497
+ if (y == null && (y = b(l)), l.overrideHeaders !== !0 && (S = t(l)), o != null && o.isDemoing.value)
498
+ return console.log(`DEMO: Delete ${y}`), o.deleteItem(l);
499
+ console.log(`Delete ${y}`);
500
500
  let c;
501
501
  try {
502
- return c = await fetch(E, {
502
+ return c = await fetch(y, {
503
503
  method: "DELETE",
504
504
  mode: "cors",
505
505
  cache: "no-cache",
506
- headers: y,
506
+ headers: S,
507
507
  body: JSON.stringify(l.data)
508
508
  }), c.status == 200 ? void 0 : c.statusText;
509
- } catch (x) {
510
- const w = `${(c == null ? void 0 : c.status) ?? ""} ${(c == null ? void 0 : c.statusText) ?? ""} ${x.message}`;
509
+ } catch (D) {
510
+ const E = `${(c == null ? void 0 : c.status) ?? ""} ${(c == null ? void 0 : c.statusText) ?? ""} ${D.message}`;
511
511
  if (!r)
512
- return w;
513
- throw new Error(`${c.status} ${c.statusText} ${x.message}`);
512
+ return E;
513
+ throw new Error(`${c.status} ${c.statusText} ${D.message}`);
514
514
  }
515
515
  }
516
516
  return br = {
517
517
  buildHeaders: t,
518
518
  buildQuery: u,
519
- buildUrl: S,
519
+ buildUrl: b,
520
520
  deleteItem: m,
521
521
  get: N,
522
522
  getAll: $,
@@ -525,20 +525,20 @@ function mn(e) {
525
525
  }, br;
526
526
  }
527
527
  function tt(e) {
528
- const { actionErrorMsg: t, actionLoadingMsg: u, clearErrors: S, isLoading: o, doAction: g, logError: _ } = pt(e);
528
+ const { actionErrorMsg: t, actionLoadingMsg: u, clearErrors: b, isLoading: o, doAction: g, logError: x } = pt(e);
529
529
  function P(r) {
530
530
  r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to delete this item?" : void 0), r.store ?? (r.store = e == null ? void 0 : e.store);
531
- const E = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store), y = (e == null ? void 0 : e.items) ?? [];
532
- return E != null ? r.onDeleteAsync ?? (r.onDeleteAsync = () => E().deleteItem(r)) : r.onDeleteAsync ?? (r.onDeleteAsync = () => {
533
- var w;
534
- const c = r.id ?? ((w = r.data) == null ? void 0 : w.id);
531
+ const y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store), S = (e == null ? void 0 : e.items) ?? [];
532
+ return y != null ? r.onDeleteAsync ?? (r.onDeleteAsync = () => y().deleteItem(r)) : r.onDeleteAsync ?? (r.onDeleteAsync = () => {
533
+ var E;
534
+ const c = r.id ?? ((E = r.data) == null ? void 0 : E.id);
535
535
  if (c == null)
536
536
  return Promise.resolve("No id found in delete action");
537
- const x = y.findIndex((M) => M.id == c);
538
- return x >= 0 && y.splice(x, 1), Promise.resolve(void 0);
537
+ const D = S.findIndex((M) => M.id == c);
538
+ return D >= 0 && S.splice(D, 1), Promise.resolve(void 0);
539
539
  }), g(async () => {
540
540
  let c;
541
- r.onCanDeleteAsync != null && (c = await r.onCanDeleteAsync(r.data)), c == null && r.onDeleteAsync != null && (c = await r.onDeleteAsync(r.data)), c == null && r.onDeleteSuccessAsync != null && await r.onDeleteSuccessAsync(r.data), _(c);
541
+ r.onCanDeleteAsync != null && (c = await r.onCanDeleteAsync(r.data)), c == null && r.onDeleteAsync != null && (c = await r.onDeleteAsync(r.data)), c == null && r.onDeleteSuccessAsync != null && await r.onDeleteSuccessAsync(r.data), x(c);
542
542
  }, {
543
543
  completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
544
544
  confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
@@ -550,11 +550,11 @@ function tt(e) {
550
550
  }
551
551
  function N(r) {
552
552
  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);
553
- const E = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store), y = (e == null ? void 0 : e.items) ?? [];
554
- return E != null ? r.onGetAsync ?? (r.onGetAsync = async () => (await E().get(r)).data) : r.onGetAsync ?? (r.onGetAsync = () => {
555
- var x;
556
- const c = r.id ?? ((x = r.data) == null ? void 0 : x.id);
557
- return c == null ? Promise.resolve(void 0) : Promise.resolve(y.find((w) => w.id == c));
553
+ const y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store), S = (e == null ? void 0 : e.items) ?? [];
554
+ return y != null ? r.onGetAsync ?? (r.onGetAsync = async () => (await y().get(r)).data) : r.onGetAsync ?? (r.onGetAsync = () => {
555
+ var D;
556
+ const c = r.id ?? ((D = r.data) == null ? void 0 : D.id);
557
+ return c == null ? Promise.resolve(void 0) : Promise.resolve(S.find((E) => E.id == c));
558
558
  }), g(async () => {
559
559
  let c;
560
560
  return r.onGetAsync != null && (c = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (c = await r.onGetSuccessAsync(c, r)), c;
@@ -569,8 +569,8 @@ function tt(e) {
569
569
  }
570
570
  function $(r) {
571
571
  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);
572
- const E = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store), y = (e == null ? void 0 : e.items) ?? [];
573
- return E != null ? r.onGetAsync ?? (r.onGetAsync = () => E().getAll(r)) : r.onGetAsync ?? (r.onGetAsync = () => Promise.resolve(y)), g(async () => {
572
+ const y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store), S = (e == null ? void 0 : e.items) ?? [];
573
+ return y != null ? r.onGetAsync ?? (r.onGetAsync = () => y().getAll(r)) : r.onGetAsync ?? (r.onGetAsync = () => Promise.resolve(S)), g(async () => {
574
574
  let c;
575
575
  return r.onGetAsync != null && (c = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (c = await r.onGetSuccessAsync(c, r)), c;
576
576
  }, {
@@ -584,10 +584,10 @@ function tt(e) {
584
584
  }
585
585
  function F(r) {
586
586
  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);
587
- const E = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
588
- return E != null && (r.onRestoreAsync ?? (r.onRestoreAsync = () => E().restore(r))), g(async () => {
589
- let y, c;
590
- return r.onCanRestoreAsync != null && (y = await r.onCanRestoreAsync(r.data)), y == null && r.onRestoreAsync != null && (c = await r.onRestoreAsync(r.data)), c != null && r.onRestoreSuccessAsync != null && await r.onRestoreSuccessAsync(c), _(y), c;
587
+ const y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
588
+ return y != null && (r.onRestoreAsync ?? (r.onRestoreAsync = () => y().restore(r))), g(async () => {
589
+ let S, c;
590
+ return r.onCanRestoreAsync != null && (S = await r.onCanRestoreAsync(r.data)), S == null && r.onRestoreAsync != null && (c = await r.onRestoreAsync(r.data)), c != null && r.onRestoreSuccessAsync != null && await r.onRestoreSuccessAsync(c), x(S), c;
591
591
  }, {
592
592
  completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
593
593
  confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
@@ -599,24 +599,24 @@ function tt(e) {
599
599
  }
600
600
  function h(r) {
601
601
  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);
602
- const E = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store), y = (e == null ? void 0 : e.items) ?? [];
603
- return r.onGetSaveAsync ?? (r.onGetSaveAsync = (c) => c), r.onCanSaveAsync ?? (r.onCanSaveAsync = () => Promise.resolve(void 0)), E != null ? r.onSaveAsync ?? (r.onSaveAsync = async () => {
602
+ const y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store), S = (e == null ? void 0 : e.items) ?? [];
603
+ return r.onGetSaveAsync ?? (r.onGetSaveAsync = (c) => c), r.onCanSaveAsync ?? (r.onCanSaveAsync = () => Promise.resolve(void 0)), y != null ? r.onSaveAsync ?? (r.onSaveAsync = async () => {
604
604
  var c;
605
- return r.mode ?? (r.mode = ((c = r.data) == null ? void 0 : c.id) == null ? "new" : "edit"), r.mode == "new" ? await E().post(r) : await E().patch(r);
605
+ return r.mode ?? (r.mode = ((c = r.data) == null ? void 0 : c.id) == null ? "new" : "edit"), r.mode == "new" ? await y().post(r) : await y().patch(r);
606
606
  }) : r.onSaveAsync ?? (r.onSaveAsync = (c) => {
607
- const x = y.findIndex((w) => w.id == c.id);
608
- return x >= 0 ? y.splice(x, 1, c) : y.push(c), Promise.resolve(c);
607
+ const D = S.findIndex((E) => E.id == c.id);
608
+ return D >= 0 ? S.splice(D, 1, c) : S.push(c), Promise.resolve(c);
609
609
  }), g(async () => {
610
610
  let c;
611
611
  if (r.onGetSaveAsync != null && (c = await r.onGetSaveAsync(r.data)), c == null)
612
612
  return;
613
613
  if (r.onCanSaveAsync != null) {
614
- let w = await r.onCanSaveAsync(c);
615
- if (_(w), w != null)
614
+ let E = await r.onCanSaveAsync(c);
615
+ if (x(E), E != null)
616
616
  return;
617
617
  }
618
- let x;
619
- return r.onSaveAsync != null && (x = await r.onSaveAsync(c), x = x.data != null ? x.data : x), r.onSaveSuccessAsync != null && (x = await r.onSaveSuccessAsync(x)), x;
618
+ let D;
619
+ return r.onSaveAsync != null && (D = await r.onSaveAsync(c), D = D.data != null ? D.data : D), r.onSaveSuccessAsync != null && (D = await r.onSaveSuccessAsync(D)), D;
620
620
  }, {
621
621
  completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
622
622
  confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
@@ -637,13 +637,13 @@ function tt(e) {
637
637
  actionErrorMsg: t,
638
638
  apiGet: m,
639
639
  apiPost: l,
640
- clearErrors: S,
640
+ clearErrors: b,
641
641
  deleteItem: P,
642
642
  doAction: g,
643
643
  getAllItems: $,
644
644
  getItem: N,
645
645
  isLoading: o,
646
- logError: _,
646
+ logError: x,
647
647
  restoreItem: F,
648
648
  saveItem: h
649
649
  };
@@ -679,37 +679,37 @@ function da() {
679
679
  function yn(e) {
680
680
  const t = e.expiryTokenFormat ?? "d/MM/yyyy h:mm:ss a";
681
681
  let u = z(localStorage.getItem(Gr) ?? "");
682
- u.value.length == 0 && S();
683
- function S() {
682
+ u.value.length == 0 && b();
683
+ function b() {
684
684
  u.value = Math.random().toString(36).substring(4, 19) + Math.random().toString(12).substring(1, 11), localStorage.setItem(Gr, u.value);
685
685
  }
686
686
  const o = Yt("auth-credentials", {});
687
687
  function g(I) {
688
688
  if (I == null)
689
689
  return !0;
690
- var D = e.getAuthItem != null ? e.getAuthItem(I) : null;
691
- if (D == null)
690
+ var _ = e.getAuthItem != null ? e.getAuthItem(I) : null;
691
+ if (_ == null)
692
692
  return !1;
693
- if (D.requiresAuth === !1)
693
+ if (_.requiresAuth === !1)
694
694
  return !0;
695
695
  const s = j(o);
696
- if (s.isSuspended && D.ignoreSuspension !== !0)
696
+ if (s.isSuspended && _.ignoreSuspension !== !0)
697
697
  return !1;
698
698
  if (s.isGlobalAdmin)
699
699
  return !0;
700
- if (D.permissions != null) {
701
- for (var A = 0; A < D.permissions.length; A++)
702
- if (!_(D.permissions[A]))
700
+ if (_.permissions != null) {
701
+ for (var A = 0; A < _.permissions.length; A++)
702
+ if (!x(_.permissions[A]))
703
703
  return !1;
704
704
  }
705
705
  return !0;
706
706
  }
707
- function _(I) {
708
- const D = j(o);
709
- if (D.userPermissions != null)
710
- for (var s = 0; s < D.userPermissions.length; s++) {
711
- var A = D.userPermissions[s].split(".");
712
- if (D.userPermissions[s] == "everything.edit" || I == A[0] && A.length > 1 && A[1] == "edit")
707
+ function x(I) {
708
+ const _ = j(o);
709
+ if (_.userPermissions != null)
710
+ for (var s = 0; s < _.userPermissions.length; s++) {
711
+ var A = _.userPermissions[s].split(".");
712
+ if (_.userPermissions[s] == "everything.edit" || I == A[0] && A.length > 1 && A[1] == "edit")
713
713
  return !0;
714
714
  }
715
715
  return !1;
@@ -717,53 +717,53 @@ function yn(e) {
717
717
  function P(I) {
718
718
  if (I == null)
719
719
  return !0;
720
- var D = e.getAuthItem != null ? e.getAuthItem(I) : null;
721
- if (D == null)
720
+ var _ = e.getAuthItem != null ? e.getAuthItem(I) : null;
721
+ if (_ == null)
722
722
  return !1;
723
- if (D.requiresAuth === !1)
723
+ if (_.requiresAuth === !1)
724
724
  return !0;
725
725
  const s = j(o);
726
- if (s.isSuspended && D.ignoreSuspension !== !0)
726
+ if (s.isSuspended && _.ignoreSuspension !== !0)
727
727
  return !1;
728
728
  if (s.isGlobalAdmin)
729
729
  return !0;
730
- if (D.permissions != null) {
731
- for (var A = 0; A < D.permissions.length; A++)
732
- if (!N(D.permissions[A]))
730
+ if (_.permissions != null) {
731
+ for (var A = 0; A < _.permissions.length; A++)
732
+ if (!N(_.permissions[A]))
733
733
  return !1;
734
734
  }
735
735
  return !0;
736
736
  }
737
737
  function N(I) {
738
- const D = j(o);
739
- if (D.userPermissions != null)
740
- for (var s = 0; s < D.userPermissions.length; s++) {
741
- var A = D.userPermissions[s].split(".");
742
- if (I == A[0] || I == "everything" || D.userPermissions[s] == "everything.view" || D.userPermissions[s] == "everything.edit")
738
+ const _ = j(o);
739
+ if (_.userPermissions != null)
740
+ for (var s = 0; s < _.userPermissions.length; s++) {
741
+ var A = _.userPermissions[s].split(".");
742
+ if (I == A[0] || I == "everything" || _.userPermissions[s] == "everything.view" || _.userPermissions[s] == "everything.edit")
743
743
  return !0;
744
744
  }
745
745
  return !1;
746
746
  }
747
- function $(I, D, s) {
747
+ function $(I, _, s) {
748
748
  let A = !0;
749
- return j(o).isGlobalAdmin ? !0 : (D != null && D.length > 0 && D.forEach((Q) => {
750
- s == "edit" ? _(Q) || (A = !1) : N(Q) || (A = !1);
749
+ return j(o).isGlobalAdmin ? !0 : (_ != null && _.length > 0 && _.forEach((Q) => {
750
+ s == "edit" ? x(Q) || (A = !1) : N(Q) || (A = !1);
751
751
  }), I != null && I.length > 0 && (I.some((Q) => l(Q)) || (A = !1)), A);
752
752
  }
753
- function F(I, D = !1) {
753
+ function F(I, _ = !1) {
754
754
  var s = e.getAuthItem != null ? e.getAuthItem(I) : null;
755
755
  let A = !1;
756
756
  if (s == null)
757
757
  return !1;
758
758
  let K = s.subscriptions ?? [], Q = s.permissions ?? [], re = $(K, Q, "view");
759
- return re || !D || !Te(s.children) ? re : ((s == null ? void 0 : s.children) != null && s.children.forEach((ie) => {
759
+ return re || !_ || !Te(s.children) ? re : ((s == null ? void 0 : s.children) != null && s.children.forEach((ie) => {
760
760
  F(ie, !0) && (A = !0);
761
761
  }), A);
762
762
  }
763
763
  function h(I) {
764
- return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (D, s) => {
764
+ return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (_, s) => {
765
765
  const A = Ne(kr(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${s}`);
766
- return D ? `${A}&redirect_path=${D}` : A;
766
+ return _ ? `${A}&redirect_path=${_}` : A;
767
767
  }), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(I, u.value) ?? "" : "";
768
768
  }
769
769
  function m(I) {
@@ -771,12 +771,12 @@ function yn(e) {
771
771
  return I == null ? 0 : ((s = (e.subscriptionOptions ?? []).find((A) => A.code == I)) == null ? void 0 : s.value) ?? 0;
772
772
  }
773
773
  function l(I) {
774
- const D = j(o);
775
- if (D.subscriptionCode == null)
774
+ const _ = j(o);
775
+ if (_.subscriptionCode == null)
776
776
  return !1;
777
- if (D.subscriptionCode == I)
777
+ if (_.subscriptionCode == I)
778
778
  return !0;
779
- const s = m(I), A = m(D.subscriptionCode);
779
+ const s = m(I), A = m(_.subscriptionCode);
780
780
  return s <= A;
781
781
  }
782
782
  function r(I) {
@@ -787,16 +787,16 @@ function yn(e) {
787
787
  );
788
788
  return JSON.parse(A);
789
789
  }
790
- function E(I, D) {
791
- o.value = void 0, M(), I != null && D != null && D.currentRoute.value.path != I && D.push({ path: I });
790
+ function y(I, _) {
791
+ o.value = void 0, M(), I != null && _ != null && _.currentRoute.value.path != I && _.push({ path: I });
792
792
  }
793
- function y(I) {
793
+ function S(I) {
794
794
  var s;
795
- j(o).isLoggedIn || ((s = e.demo) == null || s.endDemo(), C() && (E(), window.location.href = h(I)));
795
+ j(o).isLoggedIn || ((s = e.demo) == null || s.endDemo(), C() && (y(), window.location.href = h(I)));
796
796
  }
797
- async function c(I, D) {
797
+ async function c(I, _) {
798
798
  return e.getToken ?? (e.getToken = async () => {
799
- let s = I, A = D, K = e.oauthGrantType ?? "authorization_token", Q = e.oauthClientID ?? "";
799
+ let s = I, A = _, K = e.oauthGrantType ?? "authorization_token", Q = e.oauthClientID ?? "";
800
800
  if (s == null || A == null)
801
801
  throw new Error("Code and State required in OAuth token process");
802
802
  if (A != u.value)
@@ -809,39 +809,39 @@ function yn(e) {
809
809
  additionalUrl: re,
810
810
  data: ie
811
811
  });
812
- x(W.access_token);
813
- }), await e.getToken(I, D);
812
+ D(W.access_token);
813
+ }), await e.getToken(I, _);
814
814
  }
815
- function x(I) {
815
+ function D(I) {
816
816
  if (I != null && (e.demo == null || !e.demo.isDemoing.value)) {
817
- const D = r(I);
818
- w(D, I), e.processTokenPayload != null && e.processTokenPayload(o, D);
817
+ const _ = r(I);
818
+ E(_, I), e.processTokenPayload != null && e.processTokenPayload(o, _);
819
819
  }
820
820
  }
821
- function w(I, D) {
821
+ function E(I, _) {
822
822
  var A;
823
823
  const s = o.value;
824
- s.expiresOn = I.ExpiresOn, s.isGlobalAdmin = I.IsGlobalAdmin == "True", s.isLoggedIn = !0, s.permissions = I.Permissions, s.subscriptionCode = I.Subscription, s.timeZone ?? (s.timeZone = e.defaultTimeZone ?? or), s.token = D, s.userID = I.UserLoginID, s.userPermissions = ((A = I.Permissions) == null ? void 0 : A.split(",")) ?? [];
824
+ s.expiresOn = I.ExpiresOn, s.isGlobalAdmin = I.IsGlobalAdmin == "True", s.isLoggedIn = !0, s.permissions = I.Permissions, s.subscriptionCode = I.Subscription, s.timeZone ?? (s.timeZone = e.defaultTimeZone ?? or), s.token = _, s.userID = I.UserLoginID, s.userPermissions = ((A = I.Permissions) == null ? void 0 : A.split(",")) ?? [];
825
825
  }
826
826
  function M() {
827
827
  var I;
828
828
  o.value ?? (o.value = {}), (I = o.value).timeZone ?? (I.timeZone = e.defaultTimeZone ?? or);
829
829
  }
830
- function b() {
830
+ function w() {
831
831
  const I = j(o);
832
- return I.isLoggedIn && C() && (E(), window.location.href = h()), I.isLoggedIn;
832
+ return I.isLoggedIn && C() && (y(), window.location.href = h()), I.isLoggedIn;
833
833
  }
834
834
  function C() {
835
835
  const I = j(o);
836
836
  if (I == null || I.expiresOn == null)
837
837
  return !0;
838
- const D = de.fromFormat(I.expiresOn, t), s = de.utc();
839
- return D <= s;
838
+ const _ = de.fromFormat(I.expiresOn, t), s = de.utc();
839
+ return _ <= s;
840
840
  }
841
841
  return M(), Ar = {
842
842
  authState: u,
843
843
  canEdit: g,
844
- canEditPermit: _,
844
+ canEditPermit: x,
845
845
  canView: P,
846
846
  canViewPermit: N,
847
847
  credentials: o,
@@ -850,106 +850,106 @@ function yn(e) {
850
850
  getAuthorizeUrl: h,
851
851
  getToken: c,
852
852
  isLoggedIn: te(() => o.value.isLoggedIn === !0),
853
- login: y,
854
- logout: E,
855
- resetAuthState: S,
856
- setAuth: x,
853
+ login: S,
854
+ logout: y,
855
+ resetAuthState: b,
856
+ setAuth: D,
857
857
  timeZone: te(() => o.value.timeZone ?? e.defaultTimeZone ?? or),
858
- tryLogin: b
858
+ tryLogin: w
859
859
  }, Ar;
860
860
  }
861
861
  function wn(e, t, u = {}) {
862
862
  const {
863
- preventDefault: S = !1,
863
+ preventDefault: b = !1,
864
864
  stopPropagation: o = !1,
865
865
  axis: g = "both"
866
- } = u, _ = { capture: u.capture ?? !0 };
866
+ } = u, x = { capture: u.capture ?? !0 };
867
867
  let P = { x: 0, y: 0 }, N = { x: 0, y: 0 }, $ = { x: 0, y: 0 }, F = [], h = [], m = z(!1);
868
868
  function l(M) {
869
- j(S) && M.preventDefault(), j(o) && M.stopPropagation();
869
+ j(b) && M.preventDefault(), j(o) && M.stopPropagation();
870
870
  }
871
871
  function r(M) {
872
872
  var s;
873
- const b = j(e);
874
- if (!b)
873
+ const w = j(e);
874
+ if (!w)
875
875
  return;
876
- const C = b.$el, D = M.type === "touchstart" && M.touches.length > 0 ? M.touches[0] : M;
877
- $ = { x: D.clientX, y: D.clientY }, N = {
876
+ const C = w.$el, _ = M.type === "touchstart" && M.touches.length > 0 ? M.touches[0] : M;
877
+ $ = { x: _.clientX, y: _.clientY }, N = {
878
878
  x: C.offsetLeft,
879
879
  y: C.offsetTop
880
880
  }, P = {
881
881
  x: C.offsetLeft,
882
882
  y: C.offsetTop
883
- }, ((s = u.onStart) == null ? void 0 : s.call(u, $, M)) !== !1 && (h.push(he("mousemove", E)), h.push(he("touchmove", E)), h.push(he("mouseup", y)), h.push(he("touchend", y)), l(M));
883
+ }, ((s = u.onStart) == null ? void 0 : s.call(u, $, M)) !== !1 && (h.push(he("mousemove", y)), h.push(he("touchmove", y)), h.push(he("mouseup", S)), h.push(he("touchend", S)), l(M));
884
884
  }
885
- function E(M) {
885
+ function y(M) {
886
886
  var A;
887
887
  if (!$ || !j(e))
888
888
  return;
889
889
  const I = M.type === "touchmove" && M.touches.length > 0 ? M.touches[0] : M;
890
- let D = I.clientX - $.x, s = I.clientY - $.y;
891
- (g === "x" || g === "both") && (P.x = N.x + D), (g === "y" || g === "both") && (P.y = N.y + s), (A = u.onMove) == null || A.call(u, P, M), l(M), c(P);
890
+ let _ = I.clientX - $.x, s = I.clientY - $.y;
891
+ (g === "x" || g === "both") && (P.x = N.x + _), (g === "y" || g === "both") && (P.y = N.y + s), (A = u.onMove) == null || A.call(u, P, M), l(M), c(P);
892
892
  }
893
- function y(M) {
894
- var b;
893
+ function S(M) {
894
+ var w;
895
895
  document.documentElement.style.cursor = "", h.forEach((C) => {
896
896
  C();
897
- }), h.length = 0, (b = u.onEnd) == null || b.call(u, P, M), l(M);
897
+ }), h.length = 0, (w = u.onEnd) == null || w.call(u, P, M), l(M);
898
898
  }
899
899
  function c(M) {
900
- const b = j(e);
901
- if (!b)
900
+ const w = j(e);
901
+ if (!w)
902
902
  return;
903
- const C = b.$el;
903
+ const C = w.$el;
904
904
  C.style.left = `${M.x}px`, C.style.top = `${M.y}px`;
905
905
  }
906
- function x() {
906
+ function D() {
907
907
  if (j(m))
908
908
  return;
909
909
  const M = j(t);
910
910
  if (!M)
911
911
  return;
912
- const b = M.$el;
913
- b.style.cursor = "move", F.push(he(b, "mousedown", r, _)), F.push(he(b, "touchstart", r, _)), m.value = !0;
912
+ const w = M.$el;
913
+ w.style.cursor = "move", F.push(he(w, "mousedown", r, x)), F.push(he(w, "touchstart", r, x)), m.value = !0;
914
914
  }
915
- function w() {
915
+ function E() {
916
916
  if (!j(m))
917
917
  return;
918
918
  const M = j(t);
919
919
  if (!M)
920
920
  return;
921
- const b = M.$el;
922
- b.style.cursor = "", F.forEach((C) => {
921
+ const w = M.$el;
922
+ w.style.cursor = "", F.forEach((C) => {
923
923
  C();
924
924
  }), F.length = 0, m.value = !1;
925
925
  }
926
926
  return {
927
927
  draggingIsOn: m,
928
- turnDraggableOff: w,
929
- turnDraggableOn: x
928
+ turnDraggableOff: E,
929
+ turnDraggableOn: D
930
930
  };
931
931
  }
932
932
  const bn = ["t", "r", "b", "l", "tr", "br", "bl", "tl"];
933
933
  function Sn(e, t = {}) {
934
- let u, S = t.handleWidth ?? 12, o = t.handleZIndex ?? 100, g = t.minWidth ?? 0, _ = t.maxWidth ?? Number.MAX_SAFE_INTEGER, P = t.minHeight ?? 0, N = t.maxHeight ?? Number.MAX_SAFE_INTEGER, $ = t.preventDefault ?? !1, F = t.stopPropagation ?? !1, h, m = [];
934
+ let u, b = t.handleWidth ?? 12, o = t.handleZIndex ?? 100, g = t.minWidth ?? 0, x = t.maxWidth ?? Number.MAX_SAFE_INTEGER, P = t.minHeight ?? 0, N = t.maxHeight ?? Number.MAX_SAFE_INTEGER, $ = t.preventDefault ?? !1, F = t.stopPropagation ?? !1, h, m = [];
935
935
  const l = z(!1);
936
- let r = [], E = [];
937
- const y = z(!1), c = z({ x: 0, y: 0 });
938
- let x = { left: 0, top: 0, height: 0, width: 0, position: "absolute" }, w = {};
936
+ let r = [], y = [];
937
+ const S = z(!1), c = z({ x: 0, y: 0 });
938
+ let D = { left: 0, top: 0, height: 0, width: 0, position: "absolute" }, E = {};
939
939
  function M(W) {
940
940
  Ae($) && W.preventDefault(), Ae(F) && W.stopPropagation();
941
941
  }
942
- function b(W, Y) {
942
+ function w(W, Y) {
943
943
  m = Y.map(I), m.forEach((H) => W.$el.appendChild(H));
944
944
  }
945
945
  function C(W) {
946
946
  m.forEach((Y) => W.$el.removeChild(Y));
947
947
  }
948
948
  function I(W) {
949
- const Y = S + "px", H = -S / 2 + "px", ae = o + 1, G = document.createElement("div");
949
+ const Y = b + "px", H = -b / 2 + "px", ae = o + 1, G = document.createElement("div");
950
950
  return G.dataset.handle = W, G.style.position = "absolute", G.style.touchAction = "none", G.style.userSelect = "none", G.style.zIndex = (W.length === 1 ? o : ae).toString(), G.style.cursor = K(W), W.includes("t") && (G.style.top = H, G.style.height = Y, W === "t" && (G.style.left = "0", G.style.width = "100%")), W.includes("b") && (G.style.bottom = H, G.style.height = Y, W === "b" && (G.style.left = "0", G.style.width = "100%")), W.includes("r") && (G.style.right = H, G.style.width = Y, W === "r" && (G.style.top = "0", G.style.height = "100%")), W.includes("l") && (G.style.left = H, G.style.width = Y, W === "l" && (G.style.top = "0", G.style.height = "100%")), G;
951
951
  }
952
- function D(W) {
952
+ function _(W) {
953
953
  var ne;
954
954
  if (!m.some((fe) => fe == W.target))
955
955
  return;
@@ -957,15 +957,15 @@ function Sn(e, t = {}) {
957
957
  if (!Y)
958
958
  return;
959
959
  const H = Y.$el, G = W.type === "touchstart" && W.touches.length > 0 ? W.touches[0] : W;
960
- if (c.value.x = G.clientX, c.value.y = G.clientY, x = {
960
+ if (c.value.x = G.clientX, c.value.y = G.clientY, D = {
961
961
  left: H.offsetLeft,
962
962
  top: H.offsetTop,
963
963
  height: parseInt(window.getComputedStyle(H).getPropertyValue("height")),
964
964
  width: parseInt(window.getComputedStyle(H).getPropertyValue("width"))
965
- }, w = Pr(x), ((ne = t.onStart) == null ? void 0 : ne.call(t, c.value, W)) === !1)
965
+ }, E = Pr(D), ((ne = t.onStart) == null ? void 0 : ne.call(t, c.value, W)) === !1)
966
966
  return;
967
967
  let X = W.target;
968
- document.documentElement.style.cursor = K(X.dataset.handle), h = X.dataset.handle, E.push(he("mousemove", s)), E.push(he("mouseup", A)), E.push(he("touchmove", s)), E.push(he("touchend", A)), M(W);
968
+ document.documentElement.style.cursor = K(X.dataset.handle), h = X.dataset.handle, y.push(he("mousemove", s)), y.push(he("mouseup", A)), y.push(he("touchmove", s)), y.push(he("touchend", A)), M(W);
969
969
  }
970
970
  function s(W) {
971
971
  const Y = Ae(e);
@@ -973,29 +973,29 @@ function Sn(e, t = {}) {
973
973
  return;
974
974
  const H = Y.$el, G = W.type === "touchmove" && W.touches.length > 0 ? W.touches[0] : W;
975
975
  let X = G.clientX - c.value.x, ne = G.clientY - c.value.y;
976
- const fe = Ae(x);
976
+ const fe = Ae(D);
977
977
  if (h.includes("t")) {
978
978
  const ce = Math.min(N, Math.max(P, (fe.height ?? 0) - ne));
979
- w.height = ce, w.top = (fe.top ?? 0) + ne;
979
+ E.height = ce, E.top = (fe.top ?? 0) + ne;
980
980
  }
981
981
  if (h.includes("b")) {
982
982
  const ce = Math.min(N, Math.max(P, (fe.height ?? 0) + ne));
983
- w.height = ce;
983
+ E.height = ce;
984
984
  }
985
985
  if (h.includes("l")) {
986
- const ce = Math.min(_, Math.max(g, (fe.width ?? 0) - X));
987
- w.width = ce, w.left = (fe.left ?? 0) + X;
986
+ const ce = Math.min(x, Math.max(g, (fe.width ?? 0) - X));
987
+ E.width = ce, E.left = (fe.left ?? 0) + X;
988
988
  }
989
989
  if (h.includes("r")) {
990
- const ce = Math.min(_, Math.max(g, (fe.width ?? 0) + X));
991
- w.width = ce;
990
+ const ce = Math.min(x, Math.max(g, (fe.width ?? 0) + X));
991
+ E.width = ce;
992
992
  }
993
- H.dispatchEvent(new CustomEvent("resize")), M(W), re(w);
993
+ H.dispatchEvent(new CustomEvent("resize")), M(W), re(E);
994
994
  }
995
995
  function A() {
996
- document.documentElement.style.cursor = "", h = null, E.forEach((W) => {
996
+ document.documentElement.style.cursor = "", h = null, y.forEach((W) => {
997
997
  W();
998
- }), E.length = 0;
998
+ }), y.length = 0;
999
999
  }
1000
1000
  function K(W) {
1001
1001
  const Y = {
@@ -1028,27 +1028,27 @@ function Sn(e, t = {}) {
1028
1028
  H.style.width = "auto", H.style.top = "", H.style.left = "", H.style.position = "", H.style.transition = "", l.value = !1;
1029
1029
  }, { once: !0 });
1030
1030
  } else if ((u == "page" || Y.$el.style.position !== "absolute") && W !== "page") {
1031
- H.style.transition = "width 0.5s, height 0.5s, top 0.5s, left 0.5s", l.value = !0, x = {
1031
+ H.style.transition = "width 0.5s, height 0.5s, top 0.5s, left 0.5s", l.value = !0, D = {
1032
1032
  height: parseInt(window.getComputedStyle(H).getPropertyValue("height")),
1033
1033
  width: parseInt(window.getComputedStyle(H).getPropertyValue("width")),
1034
1034
  top: H.offsetTop,
1035
1035
  left: H.offsetLeft,
1036
1036
  position: "absolute"
1037
- }, re(x), H.offsetHeight;
1038
- const ae = x;
1039
- W == "freestyle" ? w = {
1037
+ }, re(D), H.offsetHeight;
1038
+ const ae = D;
1039
+ W == "freestyle" ? E = {
1040
1040
  height: ae.height,
1041
1041
  width: (ae.width ?? 100) / 2,
1042
1042
  top: (ae.top ?? 0) + 2,
1043
1043
  left: (ae.left ?? 0) + 2,
1044
1044
  position: "absolute"
1045
- } : W == "blade" && (w = {
1045
+ } : W == "blade" && (E = {
1046
1046
  height: ae.height,
1047
1047
  width: (ae.width ?? 100) / 2,
1048
1048
  top: (ae.top ?? 0) + 2,
1049
1049
  left: (ae.left ?? 0) + 2,
1050
1050
  position: "absolute"
1051
- }), re(w), he(H, "transitionend", () => {
1051
+ }), re(E), he(H, "transitionend", () => {
1052
1052
  H.style.transition = "", l.value = !1;
1053
1053
  }, { once: !0 });
1054
1054
  }
@@ -1061,38 +1061,38 @@ function Sn(e, t = {}) {
1061
1061
  W.top ? H.style.top = `${W.top}px` : H.style.top = void 0, W.left ? H.style.left = `${W.left}px` : H.style.left = void 0, W.height ? H.style.height = `${W.height}px` : H.style.height = void 0, W.width ? H.style.width = `${W.width}px` : H.style.width = void 0, W.position ? H.style.position = `${W.position}` : H.style.position = void 0, console.log(H.style.position);
1062
1062
  }
1063
1063
  function ie(W, Y) {
1064
- if (y.value)
1064
+ if (S.value)
1065
1065
  return;
1066
1066
  const H = Ae(e);
1067
- H && (b(H, W ?? bn), Q(Y), r.push(he(H.$el, "mousedown", D)), r.push(he(H.$el, "touchstart", D)), y.value = !0, u = Y);
1067
+ H && (w(H, W ?? bn), Q(Y), r.push(he(H.$el, "mousedown", _)), r.push(he(H.$el, "touchstart", _)), S.value = !0, u = Y);
1068
1068
  }
1069
1069
  function we(W) {
1070
- if (!y.value)
1070
+ if (!S.value)
1071
1071
  return;
1072
1072
  const Y = Ae(e);
1073
1073
  Y && (C(Y), Q(W), r.forEach((H) => {
1074
1074
  H();
1075
- }), r.length = 0, y.value = !1);
1075
+ }), r.length = 0, S.value = !1);
1076
1076
  }
1077
1077
  return {
1078
- resizingIsOn: y,
1078
+ resizingIsOn: S,
1079
1079
  turnResizingOn: ie,
1080
1080
  turnResizingOff: we
1081
1081
  };
1082
1082
  }
1083
1083
  function An(e) {
1084
- const t = (e == null ? void 0 : e.blade) ?? z(null), u = (e == null ? void 0 : e.handle) ?? z(null), S = z(!1), o = (e == null ? void 0 : e.mobileBreakpoint) ?? 500, g = z((e == null ? void 0 : e.defaultVariant) ?? "page"), _ = z({}), { turnResizingOff: P, turnResizingOn: N } = Sn(t), { turnDraggableOff: $, turnDraggableOn: F } = wn(t, u);
1084
+ const t = (e == null ? void 0 : e.blade) ?? z(null), u = (e == null ? void 0 : e.handle) ?? z(null), b = z(!1), o = (e == null ? void 0 : e.mobileBreakpoint) ?? 500, g = z((e == null ? void 0 : e.defaultVariant) ?? "page"), x = z({}), { turnResizingOff: P, turnResizingOn: N } = Sn(t), { turnDraggableOff: $, turnDraggableOn: F } = wn(t, u);
1085
1085
  Jt(t, (m) => {
1086
1086
  const l = m[0], { width: r } = l.contentRect;
1087
- S.value = r < o;
1087
+ b.value = r < o;
1088
1088
  });
1089
1089
  function h(m) {
1090
1090
  $(), m == "page" ? P(m) : m == "blade" ? N(["l", "r"], m) : m == "freestyle" ? (P(), N(void 0, m), F()) : m == "inline" && P();
1091
1091
  }
1092
1092
  return h(g.value), _e(g, (m) => h(m)), {
1093
- isMobile: S,
1093
+ isMobile: b,
1094
1094
  variant: g,
1095
- bladeData: _
1095
+ bladeData: x
1096
1096
  };
1097
1097
  }
1098
1098
  const dr = {
@@ -1134,12 +1134,12 @@ function ma(e) {
1134
1134
  function En(e) {
1135
1135
  const t = z({});
1136
1136
  let u = e.vuetifyInstance;
1137
- function S() {
1137
+ function b() {
1138
1138
  const h = localStorage.getItem("cosmetics");
1139
1139
  h != null && h.length > 0 ? t.value = JSON.parse(h) : t.value = {
1140
1140
  theme: e.defaultTheme ?? "light",
1141
- light: e.defaultLightTheme ?? dr,
1142
- dark: e.defaultDarkTheme ?? hr,
1141
+ light: { ...dr, ...e.defaultLightTheme },
1142
+ dark: { ...hr, ...e.defaultDarkTheme },
1143
1143
  drawer: e.defaultDrawer ?? !0,
1144
1144
  drawerStick: e.defaultDrawerStick ?? !1
1145
1145
  };
@@ -1148,13 +1148,13 @@ function En(e) {
1148
1148
  localStorage.setItem("cosmetics", JSON.stringify(t.value));
1149
1149
  }
1150
1150
  function g(h) {
1151
- u != null && (u.global.name.value = t.value.theme, u.global.name.value == "dark" ? (h && (t.value.dark = { ...e.defaultDarkTheme ?? hr }), u.themes.value.dark = {
1151
+ u != null && (u.global.name.value = t.value.theme, u.global.name.value == "dark" ? (h && (t.value.dark = { ...hr, ...e.defaultDarkTheme }), u.themes.value.dark = {
1152
1152
  ...u.themes.value.dark,
1153
1153
  colors: {
1154
1154
  ...u.themes.value.dark.colors,
1155
1155
  ...t.value.dark
1156
1156
  }
1157
- }) : (h && (t.value.light = { ...e.defaultLightTheme ?? dr }), u.themes.value.light = {
1157
+ }) : (h && (t.value.light = { ...dr, ...e.defaultLightTheme }), u.themes.value.light = {
1158
1158
  ...u.themes.value.light,
1159
1159
  colors: {
1160
1160
  ...u.themes.value.light.colors,
@@ -1162,7 +1162,7 @@ function En(e) {
1162
1162
  }
1163
1163
  }));
1164
1164
  }
1165
- function _(h) {
1165
+ function x(h) {
1166
1166
  var m;
1167
1167
  if (u != null) {
1168
1168
  const l = u.themes.value.dark, r = u.themes.value.light;
@@ -1182,15 +1182,15 @@ function En(e) {
1182
1182
  var h;
1183
1183
  if (u != null) {
1184
1184
  const m = u.themes.value.dark, l = u.themes.value.light;
1185
- m.colors.primary = (t.value.dark ?? e.defaultDarkTheme ?? hr).primary, l.colors.primary = (t.value.light ?? e.defaultLightTheme ?? dr).primary, (h = document.querySelector('meta[name="theme-color"]')) == null || h.setAttribute("content", "");
1185
+ m.colors.primary = (t.value.dark ?? { ...hr, ...e.defaultDarkTheme }).primary, l.colors.primary = (t.value.light ?? { ...dr, ...e.defaultLightTheme }).primary, (h = document.querySelector('meta[name="theme-color"]')) == null || h.setAttribute("content", "");
1186
1186
  }
1187
1187
  }
1188
- return S(), _e(t, () => {
1188
+ return b(), _e(t, () => {
1189
1189
  o();
1190
1190
  }), Er = {
1191
1191
  state: t,
1192
1192
  resetCosmetics: g,
1193
- setTemporaryColor: _,
1193
+ setTemporaryColor: x,
1194
1194
  toggleDrawer: P,
1195
1195
  toggleDrawerStick: N,
1196
1196
  toggleLightDark: $,
@@ -1204,37 +1204,37 @@ function In() {
1204
1204
  function e(t) {
1205
1205
  const {
1206
1206
  items: u,
1207
- headers: S,
1207
+ headers: b,
1208
1208
  fileName: o = "data.csv",
1209
1209
  format: g = "file"
1210
1210
  } = t;
1211
1211
  if (!Te(u))
1212
1212
  return;
1213
- let _ = [];
1214
- S != null ? _ = S == null ? void 0 : S.filter((y) => (y.csv ?? y.csvText ?? y.csvFilter ?? y.csvArray) != null).map((y) => ({
1215
- header: y.title ?? y.value ?? "",
1216
- itemText: y.itemText,
1217
- value: y.value
1218
- })) : _ = Object.keys(u[0]).map((y) => ({ header: rn(y) ?? "", value: y })), _ = _.filter((y) => y.header.length > 0);
1213
+ let x = [];
1214
+ b != null ? x = b == null ? void 0 : b.filter((S) => (S.csv ?? S.csvText ?? S.csvFilter ?? S.csvArray) != null).map((S) => ({
1215
+ header: S.title ?? S.value ?? "",
1216
+ itemText: S.itemText,
1217
+ value: S.value
1218
+ })) : x = Object.keys(u[0]).map((S) => ({ header: rn(S) ?? "", value: S })), x = x.filter((S) => S.header.length > 0);
1219
1219
  var P = [];
1220
- for (let y = 0; y < u.length; y++) {
1221
- const c = u[y];
1220
+ for (let S = 0; S < u.length; S++) {
1221
+ const c = u[S];
1222
1222
  var N = {}, $ = [];
1223
- for (let x = 0; x < _.length; x++) {
1224
- const w = _[x];
1223
+ for (let D = 0; D < x.length; D++) {
1224
+ const E = x[D];
1225
1225
  var F = null;
1226
- typeof w.value == "function" ? F = w.value(c) : typeof w.value == "string" && (F = wr(c, w.value)), w.itemText != null ? N[w.header] = wr(F, w.itemText) : N[w.header] = F;
1226
+ typeof E.value == "function" ? F = E.value(c) : typeof E.value == "string" && (F = wr(c, E.value)), E.itemText != null ? N[E.header] = wr(F, E.itemText) : N[E.header] = F;
1227
1227
  }
1228
- P.push(N), Te($) && $.forEach((x) => {
1229
- P.push(x);
1228
+ P.push(N), Te($) && $.forEach((D) => {
1229
+ P.push(D);
1230
1230
  }), $ = [];
1231
1231
  }
1232
1232
  var h = [];
1233
- if (h.push(_.map((y) => y.header).toString()), P.forEach((y) => {
1233
+ if (h.push(x.map((S) => S.header).toString()), P.forEach((S) => {
1234
1234
  let c = [];
1235
- _.forEach(function(x) {
1236
- var w = y[x.header];
1237
- c.push(w ?? "");
1235
+ x.forEach(function(D) {
1236
+ var E = S[D.header];
1237
+ c.push(E ?? "");
1238
1238
  }), h.push(c.join(","));
1239
1239
  }), g == "array")
1240
1240
  return h;
@@ -1243,9 +1243,9 @@ function In() {
1243
1243
  if (window.navigator.msSaveOrOpenBlob)
1244
1244
  window.navigator.msSaveOrOpenBlob(l, o);
1245
1245
  else {
1246
- var r = document.createElement("a"), E = URL.createObjectURL(l);
1247
- r.href = E, r.download = o, document.body.appendChild(r), r.click(), setTimeout(function() {
1248
- document.body.removeChild(r), window.URL.revokeObjectURL(E);
1246
+ var r = document.createElement("a"), y = URL.createObjectURL(l);
1247
+ r.href = y, r.download = o, document.body.appendChild(r), r.click(), setTimeout(function() {
1248
+ document.body.removeChild(r), window.URL.revokeObjectURL(y);
1249
1249
  }, 0);
1250
1250
  }
1251
1251
  }
@@ -1262,7 +1262,7 @@ function Dn(e) {
1262
1262
  function u() {
1263
1263
  return o().startOf("day").toUTC().toString() ?? "";
1264
1264
  }
1265
- function S() {
1265
+ function b() {
1266
1266
  return o().startOf("day").plus({ day: 1 }).toUTC().toString() ?? "";
1267
1267
  }
1268
1268
  function o(N, $) {
@@ -1278,7 +1278,7 @@ function Dn(e) {
1278
1278
  const h = F ? de.fromFormat(N, F, { zone: e.getTimeZone() }) : de.fromISO(N, { zone: e.getTimeZone() });
1279
1279
  return $ ? h.toFormat($) : h == null ? void 0 : h.toString();
1280
1280
  }
1281
- function _(N, $) {
1281
+ function x(N, $) {
1282
1282
  return N == null ? t() : $ ? de.fromFormat(N, $) : de.fromISO(N);
1283
1283
  }
1284
1284
  function P(N, $, F) {
@@ -1291,10 +1291,10 @@ function Dn(e) {
1291
1291
  }
1292
1292
  return Ir = {
1293
1293
  getToday: u,
1294
- getTomorrow: S,
1294
+ getTomorrow: b,
1295
1295
  tzDate: o,
1296
1296
  tzString: g,
1297
- utcDate: _,
1297
+ utcDate: x,
1298
1298
  utcString: P
1299
1299
  }, Ir;
1300
1300
  }
@@ -1304,7 +1304,7 @@ function ya() {
1304
1304
  }
1305
1305
  function xn(e) {
1306
1306
  const t = z(!1), u = (e == null ? void 0 : e.apis) ?? [];
1307
- function S() {
1307
+ function b() {
1308
1308
  t.value = !0;
1309
1309
  }
1310
1310
  function o() {
@@ -1318,30 +1318,30 @@ function xn(e) {
1318
1318
  }
1319
1319
  return m == null && (m = u.find((l) => Array.isArray(l.nav) ? l.nav.some((r) => r == h.nav) : l.nav == h.nav)), m;
1320
1320
  }
1321
- function _(h) {
1321
+ function x(h) {
1322
1322
  var r;
1323
1323
  if (u == null)
1324
1324
  return Promise.resolve("no demo data available for this api");
1325
1325
  const m = h.id ?? ((r = h.data) == null ? void 0 : r.id), l = g(h);
1326
1326
  if (m != null && (l == null ? void 0 : l.data) != null) {
1327
- const E = l.data.findIndex((y) => y.id == m);
1328
- E >= 0 && l.data.splice(E, 1);
1327
+ const y = l.data.findIndex((S) => S.id == m);
1328
+ y >= 0 && l.data.splice(y, 1);
1329
1329
  }
1330
- return new Promise(function(E) {
1330
+ return new Promise(function(y) {
1331
1331
  setTimeout(function() {
1332
- E(void 0);
1332
+ y(void 0);
1333
1333
  }, 200);
1334
1334
  });
1335
1335
  }
1336
1336
  function P(h) {
1337
- var E, y, c;
1337
+ var y, S, c;
1338
1338
  if (u == null)
1339
1339
  throw new Error("no demo data available for this api");
1340
- const m = h.id ?? ((E = h.data) == null ? void 0 : E.id), l = g(h);
1340
+ const m = h.id ?? ((y = h.data) == null ? void 0 : y.id), l = g(h);
1341
1341
  let r;
1342
- return l != null && (l.data ?? (l.data = []), l.getAction != null ? r = l.getAction(l.data, m) : m != null ? r = (y = l.data) == null ? void 0 : y.find((x) => x.id == m) : l.path != null && ((c = l.data) == null ? void 0 : c.length) == 1 && (r = l.data[0])), r == null ? Promise.resolve(void 0) : new Promise((x) => {
1342
+ return l != null && (l.data ?? (l.data = []), l.getAction != null ? r = l.getAction(l.data, m) : m != null ? r = (S = l.data) == null ? void 0 : S.find((D) => D.id == m) : l.path != null && ((c = l.data) == null ? void 0 : c.length) == 1 && (r = l.data[0])), r == null ? Promise.resolve(void 0) : new Promise((D) => {
1343
1343
  setTimeout(() => {
1344
- x({
1344
+ D({
1345
1345
  data: r
1346
1346
  });
1347
1347
  });
@@ -1363,21 +1363,21 @@ function xn(e) {
1363
1363
  });
1364
1364
  }
1365
1365
  function $(h) {
1366
- var r, E;
1366
+ var r, y;
1367
1367
  if (u == null)
1368
1368
  throw new Error("no demo data available for this api");
1369
1369
  const m = g(h);
1370
1370
  let l;
1371
- return m != null && (m.data ?? (m.data = []), m.postAction != null ? l = m.postAction(m.data, h.data) : h.data != null && (h.data.id == null && (h.data.id = ((((r = m.data) == null ? void 0 : r.length) ?? 0) + 1).toString()), l = h.data, (E = m.data) == null || E.push(l))), l == null ? Promise.resolve(void 0) : new Promise((y) => {
1371
+ return m != null && (m.data ?? (m.data = []), m.postAction != null ? l = m.postAction(m.data, h.data) : h.data != null && (h.data.id == null && (h.data.id = ((((r = m.data) == null ? void 0 : r.length) ?? 0) + 1).toString()), l = h.data, (y = m.data) == null || y.push(l))), l == null ? Promise.resolve(void 0) : new Promise((S) => {
1372
1372
  setTimeout(() => {
1373
- y({
1373
+ S({
1374
1374
  data: l
1375
1375
  });
1376
1376
  });
1377
1377
  });
1378
1378
  }
1379
1379
  function F(h) {
1380
- var r, E;
1380
+ var r, y;
1381
1381
  if (u == null)
1382
1382
  throw new Error("no demo data available for this api");
1383
1383
  const m = g(h);
@@ -1386,13 +1386,13 @@ function xn(e) {
1386
1386
  if (m.data ?? (m.data = []), m.patchAction != null)
1387
1387
  l = m.patchAction(m.data, h.data);
1388
1388
  else if (h.data.id != null) {
1389
- const y = (r = m.data) == null ? void 0 : r.findIndex((c) => c.id == h.data.id);
1390
- y != null && y > -1 && ((E = m.data) == null || E.splice(y, 1, h.data)), l = h.data;
1389
+ const S = (r = m.data) == null ? void 0 : r.findIndex((c) => c.id == h.data.id);
1390
+ S != null && S > -1 && ((y = m.data) == null || y.splice(S, 1, h.data)), l = h.data;
1391
1391
  }
1392
1392
  }
1393
- return l == null ? Promise.resolve(void 0) : new Promise((y) => {
1393
+ return l == null ? Promise.resolve(void 0) : new Promise((S) => {
1394
1394
  setTimeout(() => {
1395
- y({
1395
+ S({
1396
1396
  data: l
1397
1397
  });
1398
1398
  });
@@ -1401,9 +1401,9 @@ function xn(e) {
1401
1401
  return Dr = {
1402
1402
  endDemo: o,
1403
1403
  isDemoing: t,
1404
- startDemo: S,
1404
+ startDemo: b,
1405
1405
  data: u,
1406
- deleteItem: _,
1406
+ deleteItem: x,
1407
1407
  get: P,
1408
1408
  getAll: N,
1409
1409
  post: $,
@@ -1414,13 +1414,13 @@ var _n = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
1414
1414
  function wa(e) {
1415
1415
  function t(u) {
1416
1416
  var o;
1417
- const S = u.matched.slice().reverse().find((g) => g.meta && g.meta.title);
1418
- if (S)
1419
- document.title = S.meta.title;
1417
+ const b = u.matched.slice().reverse().find((g) => g.meta && g.meta.title);
1418
+ if (b)
1419
+ document.title = b.meta.title;
1420
1420
  else {
1421
1421
  const g = _n.NODE_ENV;
1422
- let _ = "";
1423
- g == "development" ? _ = "BWeb Dev" : g == "staging" ? _ = "BlitzIt Sandpit" : _ = "BlitzIt Web | Cloud-Based Wholesale Logistics Platform", ((o = e == null ? void 0 : e.demo) == null ? void 0 : o.isDemoing.value) == !0 && (_ = `Training: ${_}`), document.title = _;
1422
+ let x = "";
1423
+ g == "development" ? x = "BWeb Dev" : g == "staging" ? x = "BlitzIt Sandpit" : x = "BlitzIt Web | Cloud-Based Wholesale Logistics Platform", ((o = e == null ? void 0 : e.demo) == null ? void 0 : o.isDemoing.value) == !0 && (x = `Training: ${x}`), document.title = x;
1424
1424
  }
1425
1425
  }
1426
1426
  return {
@@ -1443,7 +1443,7 @@ function Tn(e) {
1443
1443
  var A = "";
1444
1444
  return s.companyAccount != null && (A = s.companyAccount.companyName + " | "), s.addressLineOne != null && (A = A + s.addressLineOne + " "), s.streetNumber != null && (A = A + s.streetNumber + " "), s.streetName != null && (A = A + s.streetName + ", "), s.suburb != null && (A = A + s.suburb + " "), s.state != null && (A = A + s.state + " "), s.postcode != null && (A = A + s.postcode), A;
1445
1445
  }
1446
- function S(s) {
1446
+ function b(s) {
1447
1447
  if (typeof s != "number")
1448
1448
  return s;
1449
1449
  var A = new Intl.NumberFormat("en-US", {
@@ -1459,7 +1459,7 @@ function Tn(e) {
1459
1459
  function g(s, A) {
1460
1460
  return t(s, "d LLL", A);
1461
1461
  }
1462
- function _(s, A) {
1462
+ function x(s, A) {
1463
1463
  return t(s, "ccc", A);
1464
1464
  }
1465
1465
  function P(s, A) {
@@ -1494,10 +1494,10 @@ function Tn(e) {
1494
1494
  var A = "";
1495
1495
  return s.addressLineOne != null && (A = s.addressLineOne + " "), s.streetNumber != null && (A = A + s.streetNumber + " "), s.streetName != null && (A = A + s.streetName + " "), s.suburb != null && (A = A + s.suburb + " "), s.state != null && (A = A + s.state + " "), s.postcode != null && (A = A + s.postcode), A = A.replaceAll(",", " "), A;
1496
1496
  }
1497
- function E(s, A) {
1497
+ function y(s, A) {
1498
1498
  return t(s, "ddd DD MMM YYYY", A);
1499
1499
  }
1500
- function y(s, A) {
1500
+ function S(s, A) {
1501
1501
  return t(s, "ccc dd LLL yyyy hh:mm a", A);
1502
1502
  }
1503
1503
  function c(s) {
@@ -1507,16 +1507,16 @@ function Tn(e) {
1507
1507
  });
1508
1508
  return A.format(s);
1509
1509
  }
1510
- function x(s) {
1510
+ function D(s) {
1511
1511
  return s.replaceAll(",", " ");
1512
1512
  }
1513
- function w(s, A) {
1513
+ function E(s, A) {
1514
1514
  return t(s, "dd LLL yyyy", A);
1515
1515
  }
1516
1516
  function M(s, A) {
1517
1517
  return t(s, "dd LLL yyyy hh:mm a", A);
1518
1518
  }
1519
- function b(s, A) {
1519
+ function w(s, A) {
1520
1520
  return t(s, "hh:mm a", A);
1521
1521
  }
1522
1522
  function C(s) {
@@ -1524,10 +1524,10 @@ function Tn(e) {
1524
1524
  }
1525
1525
  const I = {
1526
1526
  toCompanyNameAndLocationLine: u,
1527
- toCurrency: S,
1527
+ toCurrency: b,
1528
1528
  toDayDate: o,
1529
1529
  toDayMonth: g,
1530
- toDayOfWeek: _,
1530
+ toDayOfWeek: x,
1531
1531
  toDayShortDate: P,
1532
1532
  toDayShortDateAndTime: N,
1533
1533
  toDisplayNumber: $,
@@ -1536,16 +1536,16 @@ function Tn(e) {
1536
1536
  toFormat: m,
1537
1537
  toLocationLine: l,
1538
1538
  toLocationLineNoCommas: r,
1539
- toLongDate: E,
1540
- toLongDateAndTime: y,
1539
+ toLongDate: y,
1540
+ toLongDateAndTime: S,
1541
1541
  toPercent: c,
1542
- toPrettyCSV: x,
1543
- toShortDate: w,
1542
+ toPrettyCSV: D,
1543
+ toShortDate: E,
1544
1544
  toShortDateAndTime: M,
1545
- toTime: b,
1545
+ toTime: w,
1546
1546
  toTimeOfDay: C
1547
1547
  };
1548
- function D(s) {
1548
+ function _(s) {
1549
1549
  if (s != null) {
1550
1550
  let A = s;
1551
1551
  if (A != null && I[A] != null)
@@ -1554,7 +1554,7 @@ function Tn(e) {
1554
1554
  return (A) => A;
1555
1555
  }
1556
1556
  return xr = {
1557
- findFilter: D,
1557
+ findFilter: _,
1558
1558
  ...I
1559
1559
  }, xr;
1560
1560
  }
@@ -1572,10 +1572,10 @@ var at = { exports: {} };
1572
1572
  (function(u) {
1573
1573
  e.exports = u();
1574
1574
  })(function() {
1575
- return function u(S, o, g) {
1576
- function _($, F) {
1575
+ return function u(b, o, g) {
1576
+ function x($, F) {
1577
1577
  if (!o[$]) {
1578
- if (!S[$]) {
1578
+ if (!b[$]) {
1579
1579
  var h = typeof Ke == "function" && Ke;
1580
1580
  if (!F && h)
1581
1581
  return h($, !0);
@@ -1585,21 +1585,21 @@ var at = { exports: {} };
1585
1585
  throw m.code = "MODULE_NOT_FOUND", m;
1586
1586
  }
1587
1587
  var l = o[$] = { exports: {} };
1588
- S[$][0].call(l.exports, function(r) {
1589
- var E = S[$][1][r];
1590
- return _(E || r);
1591
- }, l, l.exports, u, S, o, g);
1588
+ b[$][0].call(l.exports, function(r) {
1589
+ var y = b[$][1][r];
1590
+ return x(y || r);
1591
+ }, l, l.exports, u, b, o, g);
1592
1592
  }
1593
1593
  return o[$].exports;
1594
1594
  }
1595
1595
  for (var P = typeof Ke == "function" && Ke, N = 0; N < g.length; N++)
1596
- _(g[N]);
1597
- return _;
1598
- }({ 1: [function(u, S, o) {
1596
+ x(g[N]);
1597
+ return x;
1598
+ }({ 1: [function(u, b, o) {
1599
1599
  (function(g) {
1600
- var _ = g.MutationObserver || g.WebKitMutationObserver, P;
1601
- if (_) {
1602
- var N = 0, $ = new _(r), F = g.document.createTextNode("");
1600
+ var x = g.MutationObserver || g.WebKitMutationObserver, P;
1601
+ if (x) {
1602
+ var N = 0, $ = new x(r), F = g.document.createTextNode("");
1603
1603
  $.observe(F, {
1604
1604
  characterData: !0
1605
1605
  }), P = function() {
@@ -1612,183 +1612,183 @@ var at = { exports: {} };
1612
1612
  };
1613
1613
  } else
1614
1614
  "document" in g && "onreadystatechange" in g.document.createElement("script") ? P = function() {
1615
- var y = g.document.createElement("script");
1616
- y.onreadystatechange = function() {
1617
- r(), y.onreadystatechange = null, y.parentNode.removeChild(y), y = null;
1618
- }, g.document.documentElement.appendChild(y);
1615
+ var S = g.document.createElement("script");
1616
+ S.onreadystatechange = function() {
1617
+ r(), S.onreadystatechange = null, S.parentNode.removeChild(S), S = null;
1618
+ }, g.document.documentElement.appendChild(S);
1619
1619
  } : P = function() {
1620
1620
  setTimeout(r, 0);
1621
1621
  };
1622
1622
  var m, l = [];
1623
1623
  function r() {
1624
1624
  m = !0;
1625
- for (var y, c, x = l.length; x; ) {
1626
- for (c = l, l = [], y = -1; ++y < x; )
1627
- c[y]();
1628
- x = l.length;
1625
+ for (var S, c, D = l.length; D; ) {
1626
+ for (c = l, l = [], S = -1; ++S < D; )
1627
+ c[S]();
1628
+ D = l.length;
1629
1629
  }
1630
1630
  m = !1;
1631
1631
  }
1632
- S.exports = E;
1633
- function E(y) {
1634
- l.push(y) === 1 && !m && P();
1632
+ b.exports = y;
1633
+ function y(S) {
1634
+ l.push(S) === 1 && !m && P();
1635
1635
  }
1636
1636
  }).call(this, typeof je < "u" ? je : typeof self < "u" ? self : typeof window < "u" ? window : {});
1637
- }, {}], 2: [function(u, S, o) {
1637
+ }, {}], 2: [function(u, b, o) {
1638
1638
  var g = u(1);
1639
- function _() {
1639
+ function x() {
1640
1640
  }
1641
1641
  var P = {}, N = ["REJECTED"], $ = ["FULFILLED"], F = ["PENDING"];
1642
- S.exports = h;
1643
- function h(b) {
1644
- if (typeof b != "function")
1642
+ b.exports = h;
1643
+ function h(w) {
1644
+ if (typeof w != "function")
1645
1645
  throw new TypeError("resolver must be a function");
1646
- this.state = F, this.queue = [], this.outcome = void 0, b !== _ && E(this, b);
1646
+ this.state = F, this.queue = [], this.outcome = void 0, w !== x && y(this, w);
1647
1647
  }
1648
- h.prototype.catch = function(b) {
1649
- return this.then(null, b);
1650
- }, h.prototype.then = function(b, C) {
1651
- if (typeof b != "function" && this.state === $ || typeof C != "function" && this.state === N)
1648
+ h.prototype.catch = function(w) {
1649
+ return this.then(null, w);
1650
+ }, h.prototype.then = function(w, C) {
1651
+ if (typeof w != "function" && this.state === $ || typeof C != "function" && this.state === N)
1652
1652
  return this;
1653
- var I = new this.constructor(_);
1653
+ var I = new this.constructor(x);
1654
1654
  if (this.state !== F) {
1655
- var D = this.state === $ ? b : C;
1656
- l(I, D, this.outcome);
1655
+ var _ = this.state === $ ? w : C;
1656
+ l(I, _, this.outcome);
1657
1657
  } else
1658
- this.queue.push(new m(I, b, C));
1658
+ this.queue.push(new m(I, w, C));
1659
1659
  return I;
1660
1660
  };
1661
- function m(b, C, I) {
1662
- this.promise = b, typeof C == "function" && (this.onFulfilled = C, this.callFulfilled = this.otherCallFulfilled), typeof I == "function" && (this.onRejected = I, this.callRejected = this.otherCallRejected);
1661
+ function m(w, C, I) {
1662
+ this.promise = w, typeof C == "function" && (this.onFulfilled = C, this.callFulfilled = this.otherCallFulfilled), typeof I == "function" && (this.onRejected = I, this.callRejected = this.otherCallRejected);
1663
1663
  }
1664
- m.prototype.callFulfilled = function(b) {
1665
- P.resolve(this.promise, b);
1666
- }, m.prototype.otherCallFulfilled = function(b) {
1667
- l(this.promise, this.onFulfilled, b);
1668
- }, m.prototype.callRejected = function(b) {
1669
- P.reject(this.promise, b);
1670
- }, m.prototype.otherCallRejected = function(b) {
1671
- l(this.promise, this.onRejected, b);
1664
+ m.prototype.callFulfilled = function(w) {
1665
+ P.resolve(this.promise, w);
1666
+ }, m.prototype.otherCallFulfilled = function(w) {
1667
+ l(this.promise, this.onFulfilled, w);
1668
+ }, m.prototype.callRejected = function(w) {
1669
+ P.reject(this.promise, w);
1670
+ }, m.prototype.otherCallRejected = function(w) {
1671
+ l(this.promise, this.onRejected, w);
1672
1672
  };
1673
- function l(b, C, I) {
1673
+ function l(w, C, I) {
1674
1674
  g(function() {
1675
- var D;
1675
+ var _;
1676
1676
  try {
1677
- D = C(I);
1677
+ _ = C(I);
1678
1678
  } catch (s) {
1679
- return P.reject(b, s);
1679
+ return P.reject(w, s);
1680
1680
  }
1681
- D === b ? P.reject(b, new TypeError("Cannot resolve promise with itself")) : P.resolve(b, D);
1681
+ _ === w ? P.reject(w, new TypeError("Cannot resolve promise with itself")) : P.resolve(w, _);
1682
1682
  });
1683
1683
  }
1684
- P.resolve = function(b, C) {
1685
- var I = y(r, C);
1684
+ P.resolve = function(w, C) {
1685
+ var I = S(r, C);
1686
1686
  if (I.status === "error")
1687
- return P.reject(b, I.value);
1688
- var D = I.value;
1689
- if (D)
1690
- E(b, D);
1687
+ return P.reject(w, I.value);
1688
+ var _ = I.value;
1689
+ if (_)
1690
+ y(w, _);
1691
1691
  else {
1692
- b.state = $, b.outcome = C;
1693
- for (var s = -1, A = b.queue.length; ++s < A; )
1694
- b.queue[s].callFulfilled(C);
1692
+ w.state = $, w.outcome = C;
1693
+ for (var s = -1, A = w.queue.length; ++s < A; )
1694
+ w.queue[s].callFulfilled(C);
1695
1695
  }
1696
- return b;
1697
- }, P.reject = function(b, C) {
1698
- b.state = N, b.outcome = C;
1699
- for (var I = -1, D = b.queue.length; ++I < D; )
1700
- b.queue[I].callRejected(C);
1701
- return b;
1696
+ return w;
1697
+ }, P.reject = function(w, C) {
1698
+ w.state = N, w.outcome = C;
1699
+ for (var I = -1, _ = w.queue.length; ++I < _; )
1700
+ w.queue[I].callRejected(C);
1701
+ return w;
1702
1702
  };
1703
- function r(b) {
1704
- var C = b && b.then;
1705
- if (b && (typeof b == "object" || typeof b == "function") && typeof C == "function")
1703
+ function r(w) {
1704
+ var C = w && w.then;
1705
+ if (w && (typeof w == "object" || typeof w == "function") && typeof C == "function")
1706
1706
  return function() {
1707
- C.apply(b, arguments);
1707
+ C.apply(w, arguments);
1708
1708
  };
1709
1709
  }
1710
- function E(b, C) {
1710
+ function y(w, C) {
1711
1711
  var I = !1;
1712
- function D(Q) {
1713
- I || (I = !0, P.reject(b, Q));
1712
+ function _(Q) {
1713
+ I || (I = !0, P.reject(w, Q));
1714
1714
  }
1715
1715
  function s(Q) {
1716
- I || (I = !0, P.resolve(b, Q));
1716
+ I || (I = !0, P.resolve(w, Q));
1717
1717
  }
1718
1718
  function A() {
1719
- C(s, D);
1719
+ C(s, _);
1720
1720
  }
1721
- var K = y(A);
1722
- K.status === "error" && D(K.value);
1721
+ var K = S(A);
1722
+ K.status === "error" && _(K.value);
1723
1723
  }
1724
- function y(b, C) {
1724
+ function S(w, C) {
1725
1725
  var I = {};
1726
1726
  try {
1727
- I.value = b(C), I.status = "success";
1728
- } catch (D) {
1729
- I.status = "error", I.value = D;
1727
+ I.value = w(C), I.status = "success";
1728
+ } catch (_) {
1729
+ I.status = "error", I.value = _;
1730
1730
  }
1731
1731
  return I;
1732
1732
  }
1733
1733
  h.resolve = c;
1734
- function c(b) {
1735
- return b instanceof this ? b : P.resolve(new this(_), b);
1734
+ function c(w) {
1735
+ return w instanceof this ? w : P.resolve(new this(x), w);
1736
1736
  }
1737
- h.reject = x;
1738
- function x(b) {
1739
- var C = new this(_);
1740
- return P.reject(C, b);
1737
+ h.reject = D;
1738
+ function D(w) {
1739
+ var C = new this(x);
1740
+ return P.reject(C, w);
1741
1741
  }
1742
- h.all = w;
1743
- function w(b) {
1742
+ h.all = E;
1743
+ function E(w) {
1744
1744
  var C = this;
1745
- if (Object.prototype.toString.call(b) !== "[object Array]")
1745
+ if (Object.prototype.toString.call(w) !== "[object Array]")
1746
1746
  return this.reject(new TypeError("must be an array"));
1747
- var I = b.length, D = !1;
1747
+ var I = w.length, _ = !1;
1748
1748
  if (!I)
1749
1749
  return this.resolve([]);
1750
- for (var s = new Array(I), A = 0, K = -1, Q = new this(_); ++K < I; )
1751
- re(b[K], K);
1750
+ for (var s = new Array(I), A = 0, K = -1, Q = new this(x); ++K < I; )
1751
+ re(w[K], K);
1752
1752
  return Q;
1753
1753
  function re(ie, we) {
1754
1754
  C.resolve(ie).then(W, function(Y) {
1755
- D || (D = !0, P.reject(Q, Y));
1755
+ _ || (_ = !0, P.reject(Q, Y));
1756
1756
  });
1757
1757
  function W(Y) {
1758
- s[we] = Y, ++A === I && !D && (D = !0, P.resolve(Q, s));
1758
+ s[we] = Y, ++A === I && !_ && (_ = !0, P.resolve(Q, s));
1759
1759
  }
1760
1760
  }
1761
1761
  }
1762
1762
  h.race = M;
1763
- function M(b) {
1763
+ function M(w) {
1764
1764
  var C = this;
1765
- if (Object.prototype.toString.call(b) !== "[object Array]")
1765
+ if (Object.prototype.toString.call(w) !== "[object Array]")
1766
1766
  return this.reject(new TypeError("must be an array"));
1767
- var I = b.length, D = !1;
1767
+ var I = w.length, _ = !1;
1768
1768
  if (!I)
1769
1769
  return this.resolve([]);
1770
- for (var s = -1, A = new this(_); ++s < I; )
1771
- K(b[s]);
1770
+ for (var s = -1, A = new this(x); ++s < I; )
1771
+ K(w[s]);
1772
1772
  return A;
1773
1773
  function K(Q) {
1774
1774
  C.resolve(Q).then(function(re) {
1775
- D || (D = !0, P.resolve(A, re));
1775
+ _ || (_ = !0, P.resolve(A, re));
1776
1776
  }, function(re) {
1777
- D || (D = !0, P.reject(A, re));
1777
+ _ || (_ = !0, P.reject(A, re));
1778
1778
  });
1779
1779
  }
1780
1780
  }
1781
- }, { 1: 1 }], 3: [function(u, S, o) {
1781
+ }, { 1: 1 }], 3: [function(u, b, o) {
1782
1782
  (function(g) {
1783
1783
  typeof g.Promise != "function" && (g.Promise = u(2));
1784
1784
  }).call(this, typeof je < "u" ? je : typeof self < "u" ? self : typeof window < "u" ? window : {});
1785
- }, { 2: 2 }], 4: [function(u, S, o) {
1785
+ }, { 2: 2 }], 4: [function(u, b, o) {
1786
1786
  var g = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
1787
1787
  return typeof n;
1788
1788
  } : function(n) {
1789
1789
  return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
1790
1790
  };
1791
- function _(n, i) {
1791
+ function x(n, i) {
1792
1792
  if (!(n instanceof i))
1793
1793
  throw new TypeError("Cannot call a class as a function");
1794
1794
  }
@@ -1850,11 +1850,11 @@ var at = { exports: {} };
1850
1850
  function r(n) {
1851
1851
  return typeof n != "string" && (console.warn(n + " used as a key, but it is not a string."), n = String(n)), n;
1852
1852
  }
1853
- function E() {
1853
+ function y() {
1854
1854
  if (arguments.length && typeof arguments[arguments.length - 1] == "function")
1855
1855
  return arguments[arguments.length - 1];
1856
1856
  }
1857
- var y = "local-forage-detect-blob-support", c = void 0, x = {}, w = Object.prototype.toString, M = "readonly", b = "readwrite";
1857
+ var S = "local-forage-detect-blob-support", c = void 0, D = {}, E = Object.prototype.toString, M = "readonly", w = "readwrite";
1858
1858
  function C(n) {
1859
1859
  for (var i = n.length, a = new ArrayBuffer(i), d = new Uint8Array(a), v = 0; v < i; v++)
1860
1860
  d[v] = n.charCodeAt(v);
@@ -1862,8 +1862,8 @@ var at = { exports: {} };
1862
1862
  }
1863
1863
  function I(n) {
1864
1864
  return new h(function(i) {
1865
- var a = n.transaction(y, b), d = F([""]);
1866
- a.objectStore(y).put(d, "key"), a.onabort = function(v) {
1865
+ var a = n.transaction(S, w), d = F([""]);
1866
+ a.objectStore(S).put(d, "key"), a.onabort = function(v) {
1867
1867
  v.preventDefault(), v.stopPropagation(), i(!1);
1868
1868
  }, a.oncomplete = function() {
1869
1869
  var v = navigator.userAgent.match(/Chrome\/(\d+)/), f = navigator.userAgent.match(/Edge\//);
@@ -1873,13 +1873,13 @@ var at = { exports: {} };
1873
1873
  return !1;
1874
1874
  });
1875
1875
  }
1876
- function D(n) {
1876
+ function _(n) {
1877
1877
  return typeof c == "boolean" ? h.resolve(c) : I(n).then(function(i) {
1878
1878
  return c = i, c;
1879
1879
  });
1880
1880
  }
1881
1881
  function s(n) {
1882
- var i = x[n.name], a = {};
1882
+ var i = D[n.name], a = {};
1883
1883
  a.promise = new h(function(d, v) {
1884
1884
  a.resolve = d, a.reject = v;
1885
1885
  }), i.deferredOperations.push(a), i.dbReady ? i.dbReady = i.dbReady.then(function() {
@@ -1887,18 +1887,18 @@ var at = { exports: {} };
1887
1887
  }) : i.dbReady = a.promise;
1888
1888
  }
1889
1889
  function A(n) {
1890
- var i = x[n.name], a = i.deferredOperations.pop();
1890
+ var i = D[n.name], a = i.deferredOperations.pop();
1891
1891
  if (a)
1892
1892
  return a.resolve(), a.promise;
1893
1893
  }
1894
1894
  function K(n, i) {
1895
- var a = x[n.name], d = a.deferredOperations.pop();
1895
+ var a = D[n.name], d = a.deferredOperations.pop();
1896
1896
  if (d)
1897
1897
  return d.reject(i), d.promise;
1898
1898
  }
1899
1899
  function Q(n, i) {
1900
1900
  return new h(function(a, d) {
1901
- if (x[n.name] = x[n.name] || ne(), n.db)
1901
+ if (D[n.name] = D[n.name] || ne(), n.db)
1902
1902
  if (i)
1903
1903
  s(n), n.db.close();
1904
1904
  else
@@ -1909,7 +1909,7 @@ var at = { exports: {} };
1909
1909
  i && (f.onupgradeneeded = function(T) {
1910
1910
  var L = f.result;
1911
1911
  try {
1912
- L.createObjectStore(n.storeName), T.oldVersion <= 1 && L.createObjectStore(y);
1912
+ L.createObjectStore(n.storeName), T.oldVersion <= 1 && L.createObjectStore(S);
1913
1913
  } catch (U) {
1914
1914
  if (U.name === "ConstraintError")
1915
1915
  console.warn('The database "' + n.name + '" has been upgraded from version ' + T.oldVersion + " to version " + T.newVersion + ', but the storage "' + n.storeName + '" already exists.');
@@ -1967,7 +1967,7 @@ var at = { exports: {} };
1967
1967
  }
1968
1968
  function ae(n) {
1969
1969
  var i = this, a = i._initReady().then(function() {
1970
- var d = x[i._dbInfo.name];
1970
+ var d = D[i._dbInfo.name];
1971
1971
  if (d && d.dbReady)
1972
1972
  return d.dbReady;
1973
1973
  });
@@ -1975,7 +1975,7 @@ var at = { exports: {} };
1975
1975
  }
1976
1976
  function G(n) {
1977
1977
  s(n);
1978
- for (var i = x[n.name], a = i.forages, d = 0; d < a.length; d++) {
1978
+ for (var i = D[n.name], a = i.forages, d = 0; d < a.length; d++) {
1979
1979
  var v = a[d];
1980
1980
  v._dbInfo.db && (v._dbInfo.db.close(), v._dbInfo.db = null);
1981
1981
  }
@@ -2026,8 +2026,8 @@ var at = { exports: {} };
2026
2026
  if (n)
2027
2027
  for (var d in n)
2028
2028
  a[d] = n[d];
2029
- var v = x[a.name];
2030
- v || (v = ne(), x[a.name] = v), v.forages.push(i), i._initReady || (i._initReady = i.ready, i.ready = ae);
2029
+ var v = D[a.name];
2030
+ v || (v = ne(), D[a.name] = v), v.forages.push(i), i._initReady || (i._initReady = i.ready, i.ready = ae);
2031
2031
  var f = [];
2032
2032
  function T() {
2033
2033
  return h.resolve();
@@ -2107,11 +2107,11 @@ var at = { exports: {} };
2107
2107
  var v = new h(function(f, T) {
2108
2108
  var L;
2109
2109
  d.ready().then(function() {
2110
- return L = d._dbInfo, w.call(i) === "[object Blob]" ? D(L.db).then(function(U) {
2110
+ return L = d._dbInfo, E.call(i) === "[object Blob]" ? _(L.db).then(function(U) {
2111
2111
  return U ? i : W(i);
2112
2112
  }) : i;
2113
2113
  }).then(function(U) {
2114
- X(d._dbInfo, b, function(B, k) {
2114
+ X(d._dbInfo, w, function(B, k) {
2115
2115
  if (B)
2116
2116
  return T(B);
2117
2117
  try {
@@ -2137,7 +2137,7 @@ var at = { exports: {} };
2137
2137
  n = r(n);
2138
2138
  var d = new h(function(v, f) {
2139
2139
  a.ready().then(function() {
2140
- X(a._dbInfo, b, function(T, L) {
2140
+ X(a._dbInfo, w, function(T, L) {
2141
2141
  if (T)
2142
2142
  return f(T);
2143
2143
  try {
@@ -2161,7 +2161,7 @@ var at = { exports: {} };
2161
2161
  function pe(n) {
2162
2162
  var i = this, a = new h(function(d, v) {
2163
2163
  i.ready().then(function() {
2164
- X(i._dbInfo, b, function(f, T) {
2164
+ X(i._dbInfo, w, function(f, T) {
2165
2165
  if (f)
2166
2166
  return v(f);
2167
2167
  try {
@@ -2258,7 +2258,7 @@ var at = { exports: {} };
2258
2258
  return m(a, n), a;
2259
2259
  }
2260
2260
  function tr(n, i) {
2261
- i = E.apply(this, arguments);
2261
+ i = y.apply(this, arguments);
2262
2262
  var a = this.config();
2263
2263
  n = typeof n != "function" && n || {}, n.name || (n.name = n.name || a.name, n.storeName = n.storeName || a.storeName);
2264
2264
  var d = this, v;
@@ -2266,7 +2266,7 @@ var at = { exports: {} };
2266
2266
  v = h.reject("Invalid arguments");
2267
2267
  else {
2268
2268
  var f = n.name === a.name && d._dbInfo.db, T = f ? h.resolve(d._dbInfo.db) : re(n).then(function(L) {
2269
- var U = x[n.name], B = U.forages;
2269
+ var U = D[n.name], B = U.forages;
2270
2270
  U.db = L;
2271
2271
  for (var k = 0; k < B.length; k++)
2272
2272
  B[k]._dbInfo.db = L;
@@ -2276,7 +2276,7 @@ var at = { exports: {} };
2276
2276
  if (L.objectStoreNames.contains(n.storeName)) {
2277
2277
  var U = L.version + 1;
2278
2278
  s(n);
2279
- var B = x[n.name], k = B.forages;
2279
+ var B = D[n.name], k = B.forages;
2280
2280
  L.close();
2281
2281
  for (var q = 0; q < k.length; q++) {
2282
2282
  var Z = k[q];
@@ -2308,7 +2308,7 @@ var at = { exports: {} };
2308
2308
  }
2309
2309
  }) : v = T.then(function(L) {
2310
2310
  s(n);
2311
- var U = x[n.name], B = U.forages;
2311
+ var U = D[n.name], B = U.forages;
2312
2312
  L.close();
2313
2313
  for (var k = 0; k < B.length; k++) {
2314
2314
  var q = B[k];
@@ -2638,7 +2638,7 @@ var at = { exports: {} };
2638
2638
  });
2639
2639
  }
2640
2640
  function wt(n, i) {
2641
- i = E.apply(this, arguments);
2641
+ i = y.apply(this, arguments);
2642
2642
  var a = this.config();
2643
2643
  n = typeof n != "function" && n || {}, n.name || (n.name = n.name || a.name, n.storeName = n.storeName || a.storeName);
2644
2644
  var d = this, v;
@@ -2808,7 +2808,7 @@ var at = { exports: {} };
2808
2808
  return m(v, a), v;
2809
2809
  }
2810
2810
  function Nt(n, i) {
2811
- if (i = E.apply(this, arguments), n = typeof n != "function" && n || {}, !n.name) {
2811
+ if (i = y.apply(this, arguments), n = typeof n != "function" && n || {}, !n.name) {
2812
2812
  var a = this.config();
2813
2813
  n.name = n.name || a.name, n.storeName = n.storeName || a.storeName;
2814
2814
  }
@@ -2879,7 +2879,7 @@ var at = { exports: {} };
2879
2879
  }
2880
2880
  var Gt = function() {
2881
2881
  function n(i) {
2882
- _(this, n);
2882
+ x(this, n);
2883
2883
  for (var a in Be)
2884
2884
  if (Be.hasOwnProperty(a)) {
2885
2885
  var d = Be[a], v = d._driver;
@@ -3004,7 +3004,7 @@ var at = { exports: {} };
3004
3004
  return new n(a);
3005
3005
  }, n;
3006
3006
  }(), Wt = new Gt();
3007
- S.exports = Wt;
3007
+ b.exports = Wt;
3008
3008
  }, { 3: 3 }] }, {}, [4])(4);
3009
3009
  });
3010
3010
  })(at);
@@ -3031,14 +3031,14 @@ function Sa() {
3031
3031
  async function u(o) {
3032
3032
  return await me().removeItem(o);
3033
3033
  }
3034
- async function S(o, g) {
3034
+ async function b(o, g) {
3035
3035
  await me().setItem(g, o);
3036
3036
  }
3037
3037
  return {
3038
3038
  clearAsync: e,
3039
3039
  getAsync: t,
3040
3040
  removeAsync: u,
3041
- saveAsync: S
3041
+ saveAsync: b
3042
3042
  };
3043
3043
  }
3044
3044
  let Oe;
@@ -3086,156 +3086,155 @@ const Ln = (e) => {
3086
3086
  function Nn(e) {
3087
3087
  return Xr(e.storeName, () => {
3088
3088
  var l;
3089
- const t = de.utc().toSeconds() / 86400, u = z({}), S = z({}), o = e.storageMode == "local-cache", g = e.buildUrl ?? ((l = e.api) == null ? void 0 : l.buildUrl) ?? Ln;
3090
- function _(r) {
3091
- var E, y;
3092
- return `${e.storeName ?? "base"}_${((E = e.auth) == null ? void 0 : E.credentials.value.userID) ?? "no-user-id"}_${r.id ?? ((y = r.data) == null ? void 0 : y.id) ?? "no-item-id"}`;
3089
+ const t = de.utc().toSeconds() / 86400, u = z({}), b = z({}), o = e.storageMode == "local-cache", g = e.buildUrl ?? ((l = e.api) == null ? void 0 : l.buildUrl) ?? Ln;
3090
+ function x(r) {
3091
+ var y, S;
3092
+ return `${e.storeName ?? "base"}_${((y = e.auth) == null ? void 0 : y.credentials.value.userID) ?? "no-user-id"}_${r.id ?? ((S = r.data) == null ? void 0 : S.id) ?? "no-item-id"}_${r.finalUrl}`;
3093
3093
  }
3094
3094
  async function P(r) {
3095
- var x;
3096
- r.additionalUrl ?? (r.additionalUrl = "/getAll");
3097
- const E = g(r), y = `${e.storeName}_${((x = e.auth) == null ? void 0 : x.credentials.value.userID) ?? "no-user-id"}_${E}`, c = r.refresh;
3098
- if (!c && u.value[y] !== void 0)
3095
+ r.additionalUrl ?? (r.additionalUrl = "/getAll"), g(r);
3096
+ const y = x(r), S = r.refresh;
3097
+ if (!S && u.value[y] !== void 0)
3099
3098
  return u.value[y] ?? null;
3100
- if (!c && o == !0) {
3101
- const w = await me().getItem(y);
3102
- if (w != null && (e.api == null || parseFloat(w.meta.storedOn) > t - 7))
3103
- return u.value[y] = w, w;
3099
+ if (!S && o == !0) {
3100
+ const c = await me().getItem(y);
3101
+ if (c != null && (e.api == null || parseFloat(c.meta.storedOn) > t - 7))
3102
+ return u.value[y] = c, c;
3104
3103
  }
3105
3104
  if (e.api == null)
3106
3105
  return u.value[y];
3107
3106
  try {
3108
- let w = S.value[y];
3109
- w == null && (w = new Promise(async (b, C) => {
3110
- var I;
3107
+ let c = b.value[y];
3108
+ c == null && (c = new Promise(async (E, M) => {
3109
+ var w;
3111
3110
  try {
3112
- let D = await ((I = e.api) == null ? void 0 : I.getAll(r));
3111
+ let C = await ((w = e.api) == null ? void 0 : w.getAll(r));
3113
3112
  o == !0 && await me().setItem(y, {
3114
3113
  meta: { storedOn: t },
3115
- ...D
3116
- }), b(D);
3117
- } catch (D) {
3118
- C(D);
3114
+ ...C
3115
+ }), E(C);
3116
+ } catch (C) {
3117
+ M(C);
3119
3118
  } finally {
3120
- delete S.value[y];
3119
+ delete b.value[y];
3121
3120
  }
3122
- }), S.value[y] = w);
3123
- const M = await w;
3124
- return u.value[y] = M, M;
3125
- } catch (w) {
3126
- let M = w;
3127
- throw new Error(M.message ?? "Problem");
3121
+ }), b.value[y] = c);
3122
+ const D = await c;
3123
+ return u.value[y] = D, D;
3124
+ } catch (c) {
3125
+ let D = c;
3126
+ throw new Error(D.message ?? "Problem");
3128
3127
  }
3129
3128
  }
3130
3129
  async function N(r) {
3131
- r.additionalUrl ?? (r.additionalUrl = "/get");
3132
- const E = _(r), y = r.refresh;
3133
- if (!y && u.value[E] !== void 0)
3134
- return u.value[E] ?? [];
3135
- if (!y && o == !0) {
3136
- const c = await me().getItem(E);
3130
+ r.additionalUrl ?? (r.additionalUrl = "/get"), g(r);
3131
+ const y = x(r), S = r.refresh;
3132
+ if (!S && u.value[y] !== void 0)
3133
+ return u.value[y] ?? [];
3134
+ if (!S && o == !0) {
3135
+ const c = await me().getItem(y);
3137
3136
  if (c != null && (e.api == null || parseFloat(c.meta.storedOn) > t - 7))
3138
- return u.value[E] = c, c;
3137
+ return u.value[y] = c, c;
3139
3138
  }
3140
3139
  if (e.api == null)
3141
- return u.value[E];
3140
+ return u.value[y];
3142
3141
  try {
3143
- let c = S.value[E];
3144
- c == null && (c = new Promise(async (w, M) => {
3145
- var b;
3142
+ let c = b.value[y];
3143
+ c == null && (c = new Promise(async (E, M) => {
3144
+ var w;
3146
3145
  try {
3147
- let C = await ((b = e.api) == null ? void 0 : b.get(r));
3148
- o == !0 && await me().setItem(E, {
3146
+ let C = await ((w = e.api) == null ? void 0 : w.get(r));
3147
+ o == !0 && await me().setItem(y, {
3149
3148
  meta: { storedOn: t },
3150
3149
  ...C
3151
- }), w(C);
3150
+ }), E(C);
3152
3151
  } catch (C) {
3153
3152
  M(C);
3154
3153
  } finally {
3155
- delete S.value[E];
3154
+ delete b.value[y];
3156
3155
  }
3157
- }), S.value[E] = c);
3158
- const x = await c;
3159
- return u.value[E] = x, x;
3156
+ }), b.value[y] = c);
3157
+ const D = await c;
3158
+ return u.value[y] = D, D;
3160
3159
  } catch (c) {
3161
- let x = c;
3162
- throw new Error(x.message ?? "Problem");
3160
+ let D = c;
3161
+ throw new Error(D.message ?? "Problem");
3163
3162
  }
3164
3163
  }
3165
3164
  async function $(r) {
3166
- r.additionalUrl ?? (r.additionalUrl = "/patch");
3167
- const E = _(r);
3168
- let y;
3165
+ r.additionalUrl ?? (r.additionalUrl = "/patch"), g(r);
3166
+ const y = x(r);
3167
+ let S;
3169
3168
  if (e.api != null)
3170
3169
  try {
3171
3170
  let c = await e.api.patch(r);
3172
- y = c == null ? void 0 : c.data;
3171
+ S = c == null ? void 0 : c.data;
3173
3172
  } catch (c) {
3174
- let x = c;
3175
- throw new Error(x.message ?? "Patch Problem");
3173
+ let D = c;
3174
+ throw new Error(D.message ?? "Patch Problem");
3176
3175
  }
3177
3176
  else
3178
- y = r.data;
3179
- if (y != null) {
3180
- const c = u.value[E];
3181
- c != null && (c.data = { ...c.data, ...y }, o == !0 && await me().setItem(E, {
3177
+ S = r.data;
3178
+ if (S != null) {
3179
+ const c = u.value[y];
3180
+ c != null && (c.data = { ...c.data, ...S }, o == !0 && await me().setItem(y, {
3182
3181
  meta: { storedOn: t },
3183
3182
  ...c
3184
- })), y.id != null && y.rowVersion != null && Object.entries(u.value).forEach((w) => {
3185
- let M = w[1];
3183
+ })), S.id != null && S.rowVersion != null && Object.entries(u.value).forEach((E) => {
3184
+ let M = E[1];
3186
3185
  if (M = M.data, M != null)
3187
3186
  if (Array.isArray(M))
3188
- for (let b = 0; b < M.length; b++) {
3189
- const C = M[b];
3190
- C.id == y.id && M.splice(b, 1, { ...C, ...y });
3187
+ for (let w = 0; w < M.length; w++) {
3188
+ const C = M[w];
3189
+ C.id == S.id && M.splice(w, 1, { ...C, ...S });
3191
3190
  }
3192
3191
  else
3193
- M.id == y.id && (u.value[w[0]].data = { ...M, ...y });
3192
+ M.id == S.id && (u.value[E[0]].data = { ...M, ...S });
3194
3193
  });
3195
3194
  }
3196
- return y;
3195
+ return S;
3197
3196
  }
3198
3197
  async function F(r) {
3199
- r.additionalUrl ?? (r.additionalUrl = "/post");
3200
- const E = _(r);
3201
- let y;
3198
+ r.additionalUrl ?? (r.additionalUrl = "/post"), g(r);
3199
+ const y = x(r);
3200
+ let S;
3202
3201
  if (e.api != null)
3203
3202
  try {
3204
3203
  let c = await e.api.post(r);
3205
- y = c == null ? void 0 : c.data;
3204
+ S = c == null ? void 0 : c.data;
3206
3205
  } catch (c) {
3207
- let x = c;
3208
- throw new Error(x.message ?? "Patch Problem");
3206
+ let D = c;
3207
+ throw new Error(D.message ?? "Patch Problem");
3209
3208
  }
3210
3209
  else
3211
- y = r.data;
3212
- return u.value[E] = {
3210
+ S = r.data;
3211
+ return u.value[y] = {
3213
3212
  meta: { storedOn: t },
3214
- data: y
3215
- }, o == !0 && await me().setItem(E, u.value[E]), y;
3213
+ data: S
3214
+ }, o == !0 && await me().setItem(y, u.value[y]), S;
3216
3215
  }
3217
3216
  async function h(r) {
3218
- r.additionalUrl ?? (r.additionalUrl = "/delete");
3219
- const E = _(r);
3217
+ r.additionalUrl ?? (r.additionalUrl = "/delete"), g(r);
3218
+ const y = x(r);
3220
3219
  if (e.api != null)
3221
3220
  try {
3222
- let y = await e.api.deleteItem(r);
3223
- if (y != null)
3224
- return y;
3225
- } catch (y) {
3226
- let c = y;
3221
+ let S = await e.api.deleteItem(r);
3222
+ if (S != null)
3223
+ return S;
3224
+ } catch (S) {
3225
+ let c = S;
3227
3226
  throw new Error(c.message ?? "Patch Problem");
3228
3227
  }
3229
- delete u.value[E], o == !0 && await me().removeItem(E);
3228
+ delete u.value[y], o == !0 && await me().removeItem(y);
3230
3229
  }
3231
3230
  async function m(r) {
3232
3231
  if (r.additionalUrl ?? (r.additionalUrl = `/patch/restore?id=${r.data.id}`), g(r), e.api != null)
3233
3232
  try {
3234
- let E = await e.api.patch(r);
3235
- return E == null ? void 0 : E.data;
3236
- } catch (E) {
3237
- let y = E;
3238
- throw new Error(y.message ?? "Patch Problem");
3233
+ let y = await e.api.patch(r);
3234
+ return y == null ? void 0 : y.data;
3235
+ } catch (y) {
3236
+ let S = y;
3237
+ throw new Error(S.message ?? "Patch Problem");
3239
3238
  }
3240
3239
  }
3241
3240
  return {
@@ -3252,7 +3251,7 @@ function Nn(e) {
3252
3251
  }
3253
3252
  function Wr(e) {
3254
3253
  return Xr(e.storeName, () => {
3255
- const t = z(), u = z(0), S = de.utc().toSeconds() / 3600, o = z(), g = z(), _ = z({}), P = e.storageMode == "local-cache";
3254
+ const t = z(), u = z(0), b = de.utc().toSeconds() / 3600, o = z(), g = z(), x = z({}), P = e.storageMode == "local-cache";
3256
3255
  function N() {
3257
3256
  var c;
3258
3257
  return `${e.storeName}_${((c = e.auth) == null ? void 0 : c.credentials.value.userID) ?? "no-user-id"}`;
@@ -3266,46 +3265,46 @@ function Wr(e) {
3266
3265
  });
3267
3266
  }
3268
3267
  function F(c) {
3269
- const x = N();
3270
- return _.value[x] || (_.value[x] = new Promise(async (w, M) => {
3271
- var b, C;
3268
+ const D = N();
3269
+ return x.value[D] || (x.value[D] = new Promise(async (E, M) => {
3270
+ var w, C;
3272
3271
  try {
3273
3272
  let I = await ((C = e.api) == null ? void 0 : C.getAll({
3274
3273
  additionalUrl: "/getAll",
3275
3274
  nav: c.nav,
3276
3275
  params: {
3277
- lastUpdate: ((b = g.value) == null ? void 0 : b.lastUpdate) ?? an()
3276
+ lastUpdate: ((w = g.value) == null ? void 0 : w.lastUpdate) ?? an()
3278
3277
  }
3279
3278
  }));
3280
- I == null ? M(I) : (t.value ?? (t.value = []), I.data.forEach((D) => {
3279
+ I == null ? M(I) : (t.value ?? (t.value = []), I.data.forEach((_) => {
3281
3280
  var A, K;
3282
- const s = t.value.findIndex((Q) => Q.id == D.id);
3283
- s >= 0 ? (A = t.value) == null || A.splice(s, 1, D) : (K = t.value) == null || K.push(D);
3281
+ const s = t.value.findIndex((Q) => Q.id == _.id);
3282
+ s >= 0 ? (A = t.value) == null || A.splice(s, 1, _) : (K = t.value) == null || K.push(_);
3284
3283
  }), u.value = t.value.length, g.value = {
3285
3284
  lastUpdate: de.utc().toString(),
3286
- storedOn: S.toString()
3287
- }, await $(), w(I));
3285
+ storedOn: b.toString()
3286
+ }, await $(), E(I));
3288
3287
  } catch (I) {
3289
3288
  M(I);
3290
3289
  } finally {
3291
- delete _.value[x];
3290
+ delete x.value[D];
3292
3291
  }
3293
- })), _.value[x];
3292
+ })), x.value[D];
3294
3293
  }
3295
3294
  async function h(c) {
3296
- var M, b, C;
3297
- const x = N(), w = c.refresh;
3298
- if (!w && t.value != null)
3295
+ var M, w, C;
3296
+ const D = N(), E = c.refresh;
3297
+ if (!E && t.value != null)
3299
3298
  return {
3300
3299
  count: (M = t.value) == null ? void 0 : M.length,
3301
3300
  data: t.value,
3302
3301
  filters: []
3303
3302
  };
3304
- if (!w && P == !0) {
3305
- const I = await me().getItem(x);
3306
- if (I != null && parseFloat(I.meta.storedOn) > S - 12)
3303
+ if (!E && P == !0) {
3304
+ const I = await me().getItem(D);
3305
+ if (I != null && parseFloat(I.meta.storedOn) > b - 12)
3307
3306
  return t.value = I.data, u.value = I.data.length, o.value = I.filters ?? [], g.value = I.meta, {
3308
- count: (b = t.value) == null ? void 0 : b.length,
3307
+ count: (w = t.value) == null ? void 0 : w.length,
3309
3308
  data: t.value,
3310
3309
  filters: []
3311
3310
  };
@@ -3320,25 +3319,25 @@ function Wr(e) {
3320
3319
  try {
3321
3320
  return await F(c);
3322
3321
  } catch (I) {
3323
- let D = I;
3324
- throw new Error(D.message ?? "Problem");
3322
+ let _ = I;
3323
+ throw new Error(_.message ?? "Problem");
3325
3324
  }
3326
3325
  }
3327
3326
  async function m(c) {
3328
- var b, C, I;
3329
- const x = N(), w = c.id ?? ((b = c.data) == null ? void 0 : b.id);
3330
- if (w == null)
3327
+ var w, C, I;
3328
+ const D = N(), E = c.id ?? ((w = c.data) == null ? void 0 : w.id);
3329
+ if (E == null)
3331
3330
  throw new Error("no id provided");
3332
3331
  let M = c.refresh;
3333
3332
  if (!M && t.value != null) {
3334
- const D = t.value.find((s) => s.id == w);
3335
- if (D != null)
3336
- return { data: D };
3333
+ const _ = t.value.find((s) => s.id == E);
3334
+ if (_ != null)
3335
+ return { data: _ };
3337
3336
  }
3338
3337
  if (!M && P == !0) {
3339
- const D = await me().getItem(x);
3340
- if (D != null && parseFloat(D.meta.storedOn) > S - 12) {
3341
- t.value = D.data, u.value = D.data.length, o.value = D.filters ?? [], g.value = D.meta;
3338
+ const _ = await me().getItem(D);
3339
+ if (_ != null && parseFloat(_.meta.storedOn) > b - 12) {
3340
+ t.value = _.data, u.value = _.data.length, o.value = _.filters ?? [], g.value = _.meta;
3342
3341
  let s = t.value.find((A) => A.id == c.id);
3343
3342
  if (s != null)
3344
3343
  return { data: s };
@@ -3346,100 +3345,100 @@ function Wr(e) {
3346
3345
  }
3347
3346
  if (e.api == null)
3348
3347
  return {
3349
- data: (C = t.value) == null ? void 0 : C.find((D) => D.id == c.id)
3348
+ data: (C = t.value) == null ? void 0 : C.find((_) => _.id == c.id)
3350
3349
  };
3351
3350
  t.value ?? (t.value = []);
3352
3351
  try {
3353
- return await F(c), { data: (I = t.value) == null ? void 0 : I.find((D) => D.id == c.id) };
3354
- } catch (D) {
3355
- let s = D;
3352
+ return await F(c), { data: (I = t.value) == null ? void 0 : I.find((_) => _.id == c.id) };
3353
+ } catch (_) {
3354
+ let s = _;
3356
3355
  throw new Error(s.message ?? "Problem");
3357
3356
  }
3358
3357
  }
3359
3358
  async function l(c) {
3360
- var w, M, b;
3359
+ var E, M, w;
3361
3360
  c.additionalUrl ?? (c.additionalUrl = "/patch");
3362
- let x;
3361
+ let D;
3363
3362
  if (e.api != null)
3364
3363
  try {
3365
3364
  let C = await e.api.patch(c);
3366
- x = { ...c.data, ...C == null ? void 0 : C.data };
3365
+ D = { ...c.data, ...C == null ? void 0 : C.data };
3367
3366
  } catch (C) {
3368
3367
  let I = C;
3369
3368
  throw new Error(I.message ?? "Patch Problem");
3370
3369
  }
3371
3370
  else
3372
- x = c.data;
3373
- if (x != null) {
3374
- let C = (w = t.value) == null ? void 0 : w.findIndex((I) => I.id == x.id);
3375
- C != null && C >= 0 && (t.value ?? (t.value = []), (M = t.value) == null || M.splice(C, 1, x), await $());
3371
+ D = c.data;
3372
+ if (D != null) {
3373
+ let C = (E = t.value) == null ? void 0 : E.findIndex((I) => I.id == D.id);
3374
+ C != null && C >= 0 && (t.value ?? (t.value = []), (M = t.value) == null || M.splice(C, 1, D), await $());
3376
3375
  }
3377
- return (b = t.value) == null ? void 0 : b.find((C) => C.id == (c.id ?? c.data.id));
3376
+ return (w = t.value) == null ? void 0 : w.find((C) => C.id == (c.id ?? c.data.id));
3378
3377
  }
3379
3378
  async function r(c) {
3380
- var w, M;
3379
+ var E, M;
3381
3380
  c.additionalUrl ?? (c.additionalUrl = "/post");
3382
- let x;
3381
+ let D;
3383
3382
  if (e.api != null)
3384
3383
  try {
3385
- let b = await e.api.post(c);
3386
- x = b == null ? void 0 : b.data;
3387
- } catch (b) {
3388
- let C = b;
3384
+ let w = await e.api.post(c);
3385
+ D = w == null ? void 0 : w.data;
3386
+ } catch (w) {
3387
+ let C = w;
3389
3388
  throw new Error(C.message ?? "Patch Problem");
3390
3389
  }
3391
3390
  else
3392
- x = c.data;
3393
- return x != null && (t.value ?? (t.value = []), (w = t.value) == null || w.unshift(x), u.value += 1, await $()), (M = t.value) == null ? void 0 : M.find((b) => b.id == (c.id ?? c.data.id));
3391
+ D = c.data;
3392
+ return D != null && (t.value ?? (t.value = []), (E = t.value) == null || E.unshift(D), u.value += 1, await $()), (M = t.value) == null ? void 0 : M.find((w) => w.id == (c.id ?? c.data.id));
3394
3393
  }
3395
- async function E(c) {
3396
- var w, M;
3394
+ async function y(c) {
3395
+ var E, M;
3397
3396
  if (c.additionalUrl ?? (c.additionalUrl = "/delete"), e.api != null)
3398
3397
  try {
3399
- let b = await e.api.deleteItem(c);
3400
- if (b != null)
3401
- return b;
3402
- } catch (b) {
3403
- let C = b;
3398
+ let w = await e.api.deleteItem(c);
3399
+ if (w != null)
3400
+ return w;
3401
+ } catch (w) {
3402
+ let C = w;
3404
3403
  throw new Error(C.message ?? "Patch Problem");
3405
3404
  }
3406
- const x = c.id ?? c.data.id;
3407
- if (x != null) {
3408
- let b = (w = t.value) == null ? void 0 : w.findIndex((C) => C.id == x);
3409
- b != null && b >= 0 && (t.value ?? (t.value = []), (M = t.value) == null || M.splice(b, 1), await $());
3405
+ const D = c.id ?? c.data.id;
3406
+ if (D != null) {
3407
+ let w = (E = t.value) == null ? void 0 : E.findIndex((C) => C.id == D);
3408
+ w != null && w >= 0 && (t.value ?? (t.value = []), (M = t.value) == null || M.splice(w, 1), await $());
3410
3409
  }
3411
3410
  }
3412
- async function y(c) {
3413
- var x;
3411
+ async function S(c) {
3412
+ var D;
3414
3413
  if (c.additionalUrl ?? (c.additionalUrl = `/patch/restore?id=${c.data.id}`), e.api != null)
3415
3414
  try {
3416
3415
  await e.api.patch(c);
3417
- } catch (w) {
3418
- let M = w;
3416
+ } catch (E) {
3417
+ let M = E;
3419
3418
  throw new Error(M.message ?? "Patch Problem");
3420
3419
  }
3421
3420
  try {
3422
3421
  c.additionalUrl = "/getAll", await F(c);
3423
- } catch (w) {
3424
- let M = w;
3422
+ } catch (E) {
3423
+ let M = E;
3425
3424
  throw new Error(M.message ?? "Problem");
3426
3425
  }
3427
- return (x = t.value) == null ? void 0 : x.find((w) => w.id == (c.id ?? c.data.id));
3426
+ return (D = t.value) == null ? void 0 : D.find((E) => E.id == (c.id ?? c.data.id));
3428
3427
  }
3429
3428
  return {
3430
- deleteItem: E,
3429
+ deleteItem: y,
3431
3430
  get: m,
3432
3431
  getAll: h,
3433
3432
  patch: l,
3434
3433
  post: r,
3435
- restore: y
3434
+ restore: S
3436
3435
  };
3437
3436
  });
3438
3437
  }
3439
3438
  function Rn(e, t) {
3440
- const u = z(!1), S = zt(e);
3439
+ const u = z(!1), b = zt(e);
3441
3440
  let o = g(j(e));
3442
- (t == null ? void 0 : t.useTracker) !== !1 && _e(S, (P) => {
3441
+ (t == null ? void 0 : t.useTracker) !== !1 && _e(b, (P) => {
3443
3442
  u.value = g(P) != o;
3444
3443
  }, { deep: !0 });
3445
3444
  function g(P) {
@@ -3450,13 +3449,13 @@ function Rn(e, t) {
3450
3449
  t.propsToTrack.some((h) => h == F) || delete N[F];
3451
3450
  })), JSON.stringify(N);
3452
3451
  }
3453
- function _() {
3454
- o = g(j(S)), u.value = !1;
3452
+ function x() {
3453
+ o = g(j(b)), u.value = !1;
3455
3454
  }
3456
3455
  return {
3457
- asyncItem: S,
3456
+ asyncItem: b,
3458
3457
  isChanged: u,
3459
- restartTracker: _
3458
+ restartTracker: x
3460
3459
  };
3461
3460
  }
3462
3461
  function Ea(e, t) {
@@ -3464,18 +3463,18 @@ function Ea(e, t) {
3464
3463
  const {
3465
3464
  // useBladeSrc = true,
3466
3465
  useRouteSrc: u = !0
3467
- } = t ?? {}, S = e.storeMode ?? (t == null ? void 0 : t.storeMode) ?? "session", o = e.storageMode ?? (t == null ? void 0 : t.storageMode) ?? "local-cache", g = e.nav ?? e.bladeName ?? "basic", _ = Or(), P = pr(), N = j(e.proxyQueryKey), $ = te(() => {
3466
+ } = t ?? {}, b = e.storeMode ?? (t == null ? void 0 : t.storeMode) ?? "session", o = e.storageMode ?? (t == null ? void 0 : t.storageMode) ?? "local-cache", g = e.nav ?? e.bladeName ?? "basic", x = Or(), P = pr(), N = j(e.proxyQueryKey), $ = te(() => {
3468
3467
  var G;
3469
3468
  return j(e.proxyID) ?? (N != null ? (G = P == null ? void 0 : P.query) == null ? void 0 : G[N] : void 0);
3470
- }), F = z(void 0), { actionErrorMsg: h, actionLoadingMsg: m, deleteItem: l, getItem: r, getAllItems: E, restoreItem: y, saveItem: c } = tt({
3469
+ }), F = z(void 0), { actionErrorMsg: h, actionLoadingMsg: m, deleteItem: l, getItem: r, getAllItems: y, restoreItem: S, saveItem: c } = tt({
3471
3470
  nav: g,
3472
3471
  proxyID: $.value,
3473
3472
  store: ut({
3474
- storeMode: S,
3473
+ storeMode: b,
3475
3474
  storageMode: o,
3476
3475
  nav: g
3477
3476
  })
3478
- }), x = te(() => e.errorMsg ?? h.value), w = te(() => e.loadingMsg ?? m.value), M = te(() => w.value != null), b = z(e.itemID ?? (u ? (ae = P == null ? void 0 : P.params) == null ? void 0 : ae.id : void 0)), C = z(b.value == "new" ? "new" : e.startEditing ? "edit" : "view"), I = Le(!1), D = te(() => {
3477
+ }), D = te(() => e.errorMsg ?? h.value), E = te(() => e.loadingMsg ?? m.value), M = te(() => E.value != null), w = z(e.itemID ?? (u ? (ae = P == null ? void 0 : P.params) == null ? void 0 : ae.id : void 0)), C = z(w.value == "new" ? "new" : e.startEditing ? "edit" : "view"), I = Le(!1), _ = te(() => {
3479
3478
  if (C.value == "new")
3480
3479
  return !1;
3481
3480
  const G = j(F);
@@ -3502,7 +3501,7 @@ function Ea(e, t) {
3502
3501
  const {
3503
3502
  additionalUrl: X,
3504
3503
  onDeleteAsync: ne,
3505
- onDeleteSuccessAsync: fe = () => (_.back(), Promise.resolve(void 0)),
3504
+ onDeleteSuccessAsync: fe = () => (x.back(), Promise.resolve(void 0)),
3506
3505
  proxyID: ce
3507
3506
  } = { ...e };
3508
3507
  l({
@@ -3524,7 +3523,7 @@ function Ea(e, t) {
3524
3523
  onRestoreSuccessAsync: fe,
3525
3524
  proxyID: ce
3526
3525
  } = { ...e };
3527
- y({
3526
+ S({
3528
3527
  additionalUrl: X,
3529
3528
  data: G,
3530
3529
  nav: g,
@@ -3541,7 +3540,7 @@ function Ea(e, t) {
3541
3540
  else {
3542
3541
  const X = {
3543
3542
  additionalUrl: e.additionalUrl,
3544
- id: b.value,
3543
+ id: w.value,
3545
3544
  nav: g,
3546
3545
  proxyID: $.value,
3547
3546
  params: e.params,
@@ -3553,7 +3552,7 @@ function Ea(e, t) {
3553
3552
  if (e.isSingle === !0)
3554
3553
  X.id === "new" ? F.value = e.onGetNew ? e.onGetNew() : {} : F.value = await r(X);
3555
3554
  else {
3556
- const ne = await E(X);
3555
+ const ne = await y(X);
3557
3556
  F.value = ne.data;
3558
3557
  }
3559
3558
  }
@@ -3565,7 +3564,7 @@ function Ea(e, t) {
3565
3564
  onCanSaveAsync: fe,
3566
3565
  onGetSaveAsync: ce,
3567
3566
  onSaveAsync: Ee,
3568
- onSaveSuccessAsync: Re = () => ((X == null ? void 0 : X.navBack) === !0 ? _.back() : C.value = "view", Promise.resolve(void 0))
3567
+ onSaveSuccessAsync: Re = () => ((X == null ? void 0 : X.navBack) === !0 ? x.back() : C.value = "view", Promise.resolve(void 0))
3569
3568
  } = { ...e };
3570
3569
  c({
3571
3570
  additionalUrl: ne,
@@ -3585,7 +3584,7 @@ function Ea(e, t) {
3585
3584
  const G = j(C);
3586
3585
  !G || G == "view" ? C.value = "edit" : G == "edit" && (C.value = "view");
3587
3586
  }
3588
- return _e(x, (G) => {
3587
+ return _e(D, (G) => {
3589
3588
  I.value = G != null;
3590
3589
  }), _e(() => e.refreshToggle, () => {
3591
3590
  W({ deepRefresh: !0 });
@@ -3595,15 +3594,15 @@ function Ea(e, t) {
3595
3594
  }), {
3596
3595
  asyncItem: F,
3597
3596
  deleteItem: ie,
3598
- errorMsg: x,
3597
+ errorMsg: D,
3599
3598
  isChanged: Q,
3600
- isDeletable: D,
3599
+ isDeletable: _,
3601
3600
  isEditing: te(() => C.value == "new" || C.value == "edit"),
3602
3601
  isEditable: s,
3603
3602
  isLoading: M,
3604
3603
  isRestorable: A,
3605
3604
  isSaveable: K,
3606
- loadingMsg: w,
3605
+ loadingMsg: E,
3607
3606
  mode: C,
3608
3607
  refresh: W,
3609
3608
  restoreItem: we,
@@ -3629,7 +3628,7 @@ function Bn(e) {
3629
3628
  displayName: m.displayName ?? e.getDisplayName(m),
3630
3629
  ...m
3631
3630
  }));
3632
- function S(m) {
3631
+ function b(m) {
3633
3632
  var l;
3634
3633
  return (l = P(m)) == null ? void 0 : l.archiveName;
3635
3634
  }
@@ -3641,14 +3640,14 @@ function Bn(e) {
3641
3640
  var l;
3642
3641
  return (l = P(m)) == null ? void 0 : l.displayName;
3643
3642
  }
3644
- function _(m) {
3643
+ function x(m) {
3645
3644
  var l;
3646
3645
  return (l = P(m)) == null ? void 0 : l.icon;
3647
3646
  }
3648
3647
  function P(m) {
3649
3648
  return m == null ? null : typeof m != "string" ? m : rt(u, (r) => r.children).find((r) => {
3650
- var E;
3651
- return r.name == m || r.singleName == m || ((E = r.aliases) == null ? void 0 : E.some((y) => y == m));
3649
+ var y;
3650
+ return r.name == m || r.singleName == m || ((y = r.aliases) == null ? void 0 : y.some((S) => S == m));
3652
3651
  }) ?? null;
3653
3652
  }
3654
3653
  function N(m) {
@@ -3684,10 +3683,10 @@ function Bn(e) {
3684
3683
  backgroundName: Vr,
3685
3684
  hesitate: mr,
3686
3685
  navigationItems: u,
3687
- findArchiveName: S,
3686
+ findArchiveName: b,
3688
3687
  findCacheHours: o,
3689
3688
  findDisplay: g,
3690
- findIcon: _,
3689
+ findIcon: x,
3691
3690
  findItem: P,
3692
3691
  findStoreName: F,
3693
3692
  findPath: N,
@@ -3697,13 +3696,13 @@ function Bn(e) {
3697
3696
  }
3698
3697
  function Ia(e, t, u) {
3699
3698
  var Fe, ke;
3700
- const S = In(), o = Un(), g = Or(), _ = pr(), { bladeData: P } = An({}), N = e.useBladeSrc ?? !0, $ = e.useRouteSrc ?? !0, F = e.nav ?? e.bladeName ?? e.itemBladeName ?? "basic", h = e.storeMode ?? ((Fe = o.findItem(F)) == null ? void 0 : Fe.storeMode) ?? "session", m = e.storageMode ?? ((ke = o.findItem(F)) == null ? void 0 : ke.storageMode) ?? "local-cache", l = j(e.customFilters) ?? [], r = z([]), E = te(() => jt([
3699
+ const b = In(), o = Un(), g = Or(), x = pr(), { bladeData: P } = An({}), N = e.useBladeSrc ?? !0, $ = e.useRouteSrc ?? !0, F = e.nav ?? e.bladeName ?? e.itemBladeName ?? "basic", h = e.storeMode ?? ((Fe = o.findItem(F)) == null ? void 0 : Fe.storeMode) ?? "session", m = e.storageMode ?? ((ke = o.findItem(F)) == null ? void 0 : ke.storageMode) ?? "local-cache", l = j(e.customFilters) ?? [], r = z([]), y = te(() => jt([
3701
3700
  ...l.filter((R) => R.name != null).map((R) => R.name),
3702
3701
  ...e.defaultFilters ?? [],
3703
3702
  ...r.value
3704
- ]).value), y = z((e.defaultFilters ?? []).map((R) => E.value.indexOf(R)));
3705
- let c = z([...y.value]);
3706
- const x = te(() => Fr(c, y).value.length > 0 || Fr(y, c).value.length > 0), w = z(M());
3703
+ ]).value), S = z((e.defaultFilters ?? []).map((R) => y.value.indexOf(R)));
3704
+ let c = z([...S.value]);
3705
+ const D = te(() => Fr(c, S).value.length > 0 || Fr(S, c).value.length > 0), E = z(M());
3707
3706
  function M() {
3708
3707
  var R, J;
3709
3708
  if (N) {
@@ -3712,13 +3711,13 @@ function Ia(e, t, u) {
3712
3711
  return Number.parseInt(V);
3713
3712
  }
3714
3713
  if ($) {
3715
- const V = (J = _ == null ? void 0 : _.query) == null ? void 0 : J.page;
3714
+ const V = (J = x == null ? void 0 : x.query) == null ? void 0 : J.page;
3716
3715
  if (V != null)
3717
3716
  return Number.parseInt(typeof V == "string" ? V : V.toString());
3718
3717
  }
3719
3718
  return 1;
3720
3719
  }
3721
- const b = te(() => {
3720
+ const w = te(() => {
3722
3721
  var R, J;
3723
3722
  if (N) {
3724
3723
  const V = (R = P.value) == null ? void 0 : R.proxyID;
@@ -3726,7 +3725,7 @@ function Ia(e, t, u) {
3726
3725
  return V;
3727
3726
  }
3728
3727
  if ($) {
3729
- const V = (J = _ == null ? void 0 : _.query) == null ? void 0 : J.query;
3728
+ const V = (J = x == null ? void 0 : x.query) == null ? void 0 : J.query;
3730
3729
  if (V != null)
3731
3730
  return V;
3732
3731
  }
@@ -3740,19 +3739,19 @@ function Ia(e, t, u) {
3740
3739
  return V;
3741
3740
  }
3742
3741
  if ($) {
3743
- const V = (J = _ == null ? void 0 : _.query) == null ? void 0 : J.search;
3742
+ const V = (J = x == null ? void 0 : x.query) == null ? void 0 : J.search;
3744
3743
  if (V != null)
3745
3744
  return V;
3746
3745
  }
3747
3746
  }
3748
- const D = z(j(e.startShowingInactive) ?? !1), s = te(() => [
3747
+ const _ = z(j(e.startShowingInactive) ?? !1), s = te(() => [
3749
3748
  ...e.searchProps ?? [],
3750
3749
  ...(e.headers ?? []).filter((R) => R.searchable != null && R.value != null).map((R) => R.value ?? "")
3751
3750
  ]), A = z([]), K = Le([]), Q = z([]);
3752
3751
  let re;
3753
3752
  const { actionErrorMsg: ie, actionLoadingMsg: we, deleteItem: W, doAction: Y, getItem: H, getAllItems: ae, restoreItem: G } = tt({
3754
3753
  nav: F,
3755
- proxyID: b.value,
3754
+ proxyID: w.value,
3756
3755
  store: ut({
3757
3756
  storeMode: h,
3758
3757
  storageMode: m,
@@ -3760,8 +3759,8 @@ function Ia(e, t, u) {
3760
3759
  })
3761
3760
  }), X = te(() => e.errorMsg ?? ie.value), ne = te(() => e.loadingMsg ?? we.value), fe = te(() => ne.value != null), ce = Le(!1), Ee = Le(e.showSearch ?? !0), Re = z(0), Ve = te(() => {
3762
3761
  let R, J = [];
3763
- y.value.forEach((O) => {
3764
- const oe = E.value[O], ve = l.find((De) => De.name == oe);
3762
+ S.value.forEach((O) => {
3763
+ const oe = y.value[O], ve = l.find((De) => De.name == oe);
3765
3764
  ve != null ? R = R != null ? `${R}ANDALSO${ve.filterFunction()}` : ve.filterFunction() : J.push(oe);
3766
3765
  });
3767
3766
  const V = {};
@@ -3769,8 +3768,8 @@ function Ia(e, t, u) {
3769
3768
  }), pe = te(() => {
3770
3769
  var J;
3771
3770
  let R = e.params != null ? { ...e.params } : {};
3772
- return e.useServerPagination && e.itemsPerPage != null && (R.includeCount = !0, R.takeAmount = e.itemsPerPage, R.takeFrom = (w.value - 1) * e.itemsPerPage), Ve.value != null && (R = { ...R, ...Ve.value }), D.value && (R.includeInactive = !0), Te(e.selectProps) && (R.properties = (J = e.selectProps) == null ? void 0 : J.toString()), C.value != null && (R.searchString = C.value), R;
3773
- }), er = te(() => (R) => e.onCanDelete != null ? e.onCanDelete(R) : !(R != null && R.isInactive === !0)), rr = te(() => (R) => D.value ? e.onCanRestore != null ? e.onCanRestore(R) : (R == null ? void 0 : R.isInactive) === !0 : !1), Ce = te(() => Q.value.filter((R) => !R.hide)), tr = te(() => {
3771
+ return e.useServerPagination && e.itemsPerPage != null && (R.includeCount = !0, R.takeAmount = e.itemsPerPage, R.takeFrom = (E.value - 1) * e.itemsPerPage), Ve.value != null && (R = { ...R, ...Ve.value }), _.value && (R.includeInactive = !0), Te(e.selectProps) && (R.properties = (J = e.selectProps) == null ? void 0 : J.toString()), C.value != null && (R.searchString = C.value), R;
3772
+ }), er = te(() => (R) => e.onCanDelete != null ? e.onCanDelete(R) : !(R != null && R.isInactive === !0)), rr = te(() => (R) => _.value ? e.onCanRestore != null ? e.onCanRestore(R) : (R == null ? void 0 : R.isInactive) === !0 : !1), Ce = te(() => Q.value.filter((R) => !R.hide)), tr = te(() => {
3774
3773
  let R = new Array();
3775
3774
  return Ce.value.filter((V) => V.sublevel != null).forEach((V) => {
3776
3775
  let O = R.find((oe) => oe.position == V.sublevel);
@@ -3822,7 +3821,7 @@ function Ia(e, t, u) {
3822
3821
  onCanDeleteAsync: e.onCanDeleteAsync,
3823
3822
  onDeleteAsync: V,
3824
3823
  onDeleteSuccessAsync: async () => (ve(oe), e.onDeleteSuccessAsync != null ? e.onDeleteSuccessAsync(O) : Promise.resolve(void 0)),
3825
- proxyID: b.value,
3824
+ proxyID: w.value,
3826
3825
  // ...(useBladeSrc ? bladeData.value : {}),
3827
3826
  requireConfirmation: !0
3828
3827
  }), t && t("deleted", R);
@@ -3835,13 +3834,13 @@ function Ia(e, t, u) {
3835
3834
  onCanRestoreAsync: e.onCanRestoreAsync,
3836
3835
  onRestoreAsync: e.onRestoreAsync,
3837
3836
  onRestoreSuccessAsync: e.onRestoreSuccessAsync,
3838
- proxyID: b.value
3837
+ proxyID: w.value
3839
3838
  // ...(useBladeSrc ? bladeData.value : {})
3840
3839
  });
3841
3840
  }
3842
3841
  function Ue() {
3843
3842
  Y(() => {
3844
- S.exportToCSV(Ce.value, K.value);
3843
+ b.exportToCSV(Ce.value, K.value);
3845
3844
  }, { loadingMsg: "Exporting to CSV" });
3846
3845
  }
3847
3846
  function Pe() {
@@ -3868,7 +3867,7 @@ function Ia(e, t, u) {
3868
3867
  params: pe.value,
3869
3868
  //params,
3870
3869
  // params: params.getParamOptions(),
3871
- proxyID: b.value,
3870
+ proxyID: w.value,
3872
3871
  // ...(useBladeSrc ? bladeData.value : {}),
3873
3872
  // ...(props.useInterEvents ? eventData : {}),
3874
3873
  refresh: (R == null ? void 0 : R.deepRefresh) ?? !1,
@@ -3911,7 +3910,7 @@ function Ia(e, t, u) {
3911
3910
  }
3912
3911
  return $e(), Kt([C], () => {
3913
3912
  Pe();
3914
- }, { debounce: 500, maxWait: 500 }), _e([D, w], async () => {
3913
+ }, { debounce: 500, maxWait: 500 }), _e([_, E], async () => {
3915
3914
  await Ie();
3916
3915
  }), _e([X, () => e.errorMsg], ([R, J]) => {
3917
3916
  ce.value = R != null || J != null;
@@ -3921,18 +3920,18 @@ function Ia(e, t, u) {
3921
3920
  Pe();
3922
3921
  }), Kr(async () => {
3923
3922
  var R;
3924
- e.eager == !0 && await Ie({ deepRefresh: ((R = _ == null ? void 0 : _.params) == null ? void 0 : R.refresh) == "true" });
3923
+ e.eager == !0 && await Ie({ deepRefresh: ((R = x == null ? void 0 : x.params) == null ? void 0 : R.refresh) == "true" });
3925
3924
  }), {
3926
3925
  add: be,
3927
3926
  asyncItems: A,
3928
- currentPage: w,
3927
+ currentPage: E,
3929
3928
  deleteItem: lr,
3930
3929
  displayHeaders: ar,
3931
3930
  errorMsg: X,
3932
3931
  exportToCSV: Ue,
3933
3932
  filteredItems: K,
3934
- filters: E,
3935
- filtersChanged: x,
3933
+ filters: y,
3934
+ filtersChanged: D,
3936
3935
  headerOptions: Q,
3937
3936
  isDeletable: er,
3938
3937
  isLoading: fe,
@@ -3941,11 +3940,11 @@ function Ia(e, t, u) {
3941
3940
  refresh: Ie,
3942
3941
  restoreItem: ze,
3943
3942
  searchString: C,
3944
- selectedFilters: y,
3943
+ selectedFilters: S,
3945
3944
  selectItem: Ye,
3946
3945
  // serverFilters,
3947
3946
  showError: ce,
3948
- showInactive: D,
3947
+ showInactive: _,
3949
3948
  showSearch: Ee,
3950
3949
  subtitleOptions: tr,
3951
3950
  tableHeaders: Ce,
@@ -3962,8 +3961,8 @@ function $n(e) {
3962
3961
  function t(u) {
3963
3962
  if (!u)
3964
3963
  return {};
3965
- let S = u;
3966
- return e.presets[S] ?? {};
3964
+ let b = u;
3965
+ return e.presets[b] ?? {};
3967
3966
  }
3968
3967
  return Tr = {
3969
3968
  usePresets: t
@@ -3976,21 +3975,21 @@ function xa() {
3976
3975
  return Cr;
3977
3976
  }
3978
3977
  function Fn() {
3979
- function e(_) {
3980
- Xe.value = _.detail, yr.value = !0;
3978
+ function e(x) {
3979
+ Xe.value = x.detail, yr.value = !0;
3981
3980
  }
3982
3981
  function t() {
3983
3982
  Jr || (Jr = !0, window.location.reload());
3984
3983
  }
3985
3984
  function u() {
3986
- var _;
3987
- (_ = jr.value) == null || _.prompt(), gr.value = !1;
3985
+ var x;
3986
+ (x = jr.value) == null || x.prompt(), gr.value = !1;
3988
3987
  }
3989
- function S() {
3988
+ function b() {
3990
3989
  return !!window.matchMedia("(display-mode: standalone)").matches;
3991
3990
  }
3992
- function o(_) {
3993
- _.preventDefault(), gr.value = !0, jr.value = _;
3991
+ function o(x) {
3992
+ x.preventDefault(), gr.value = !0, jr.value = x;
3994
3993
  }
3995
3994
  function g() {
3996
3995
  yr.value = !1, !(!Xe.value || !Xe.value.waiting) && Xe.value.waiting.postMessage({ type: "SKIP_WAITING" });
@@ -4001,7 +4000,7 @@ function Fn() {
4001
4000
  canInstallApp: gr,
4002
4001
  canUpdateApp: yr,
4003
4002
  installApp: u,
4004
- isInstalled: S,
4003
+ isInstalled: b,
4005
4004
  updateApp: g
4006
4005
  }, Cr;
4007
4006
  }
@@ -4014,9 +4013,9 @@ function Ta(e) {
4014
4013
  install(t, u) {
4015
4014
  var N;
4016
4015
  console.log(t), e.vuetifyInstance ?? (e.vuetifyInstance = u.vuetifyInstance), En(e);
4017
- const S = xn(), o = Bn(e);
4018
- $n(e), (N = e.auth).demo ?? (N.demo = S), e.auth.getAuthItem = o.findItem;
4019
- const g = yn(e.auth), _ = mn({
4016
+ const b = xn(), o = Bn(e);
4017
+ $n(e), (N = e.auth).demo ?? (N.demo = b), e.auth.getAuthItem = o.findItem;
4018
+ const g = yn(e.auth), x = mn({
4020
4019
  auth: g,
4021
4020
  findPath: o.findPath,
4022
4021
  useBearerToken: !0
@@ -4026,7 +4025,7 @@ function Ta(e) {
4026
4025
  Tn({
4027
4026
  dates: P
4028
4027
  }), Fn(), Pn({
4029
- api: _,
4028
+ api: x,
4030
4029
  auth: g,
4031
4030
  navigation: o
4032
4031
  }), gn(e.urls);