bt-core-app 1.4.54 → 1.4.56

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.
@@ -1,52 +1,52 @@
1
- import { ref as z, shallowRef as Le, computed as te, toValue as j, watch as _e, toRef as zt, onMounted as Kr } from "vue";
2
- import { watchArray as Qr, useStorage as Yt, useEventListener as he, toValue as Ae, useParentElement as Zt, useResizeObserver as Jt, useArrayUnique as jt, useArrayDifference as Fr, watchDebounced as Kt, tryOnMounted as Qt } from "@vueuse/core";
1
+ import { ref as z, shallowRef as Le, computed as te, toValue as j, watch as _e, toRef as Yt, onMounted as Qr } from "vue";
2
+ import { watchArray as Xr, useStorage as Zt, useEventListener as he, toValue as Ae, useParentElement as Jt, useResizeObserver as jt, useArrayUnique as Kt, useArrayDifference as Fr, watchDebounced as Qt, tryOnMounted as Xt } from "@vueuse/core";
3
3
  import { DateTime as de } from "luxon";
4
- import { defineStore as Xr } from "pinia";
5
- import { useRouter as Or, useRoute as pr } from "vue-router";
6
- function Xt(e) {
7
- return (e || "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx").replace(/[xy]/g, Ot);
8
- }
4
+ import { defineStore as Or } from "pinia";
5
+ import { useRouter as pr, useRoute as et } from "vue-router";
9
6
  function Ot(e) {
7
+ return (e || "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx").replace(/[xy]/g, pt);
8
+ }
9
+ function pt(e) {
10
10
  const t = Math.random() * 16 | 0;
11
11
  return (e == "x" ? t : t & 3 | 8).toString(16);
12
12
  }
13
- function pt(e) {
14
- const t = z([]), u = Le(), S = Le(), o = Le(), g = te(() => u.value != null);
15
- function _(h) {
13
+ function en(e) {
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) {
19
19
  const m = {
20
- id: Xt(),
20
+ id: Ot(),
21
21
  msg: h ?? "Loading"
22
22
  };
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
- return Qr(t, (h) => {
46
+ return Xr(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: $,
@@ -56,7 +56,7 @@ function pt(e) {
56
56
  };
57
57
  }
58
58
  var je = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
59
- function en(e) {
59
+ function rn(e) {
60
60
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
61
61
  }
62
62
  var qe = function() {
@@ -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,38 +86,38 @@ 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
- function zn(e) {
109
+ function Zn(e) {
110
110
  return e == null || !Array.isArray(e) ? e : [...new Set(e.map((t) => t))];
111
111
  }
112
- function Yn(e = "blitzItExtensionExists") {
112
+ function Jn(e = "blitzItExtensionExists") {
113
113
  try {
114
114
  var t = document.getElementById(e);
115
115
  return t != null;
116
116
  } catch (u) {
117
- return console.log(fn(u)), !1;
117
+ return console.log(sn(u)), !1;
118
118
  }
119
119
  }
120
- function Zn(e, t) {
120
+ function jn(e, t) {
121
121
  return [
122
122
  { lat: e.lat - t, lng: e.lng + t },
123
123
  { lat: e.lat - t, lng: e.lng - t },
@@ -125,7 +125,7 @@ function Zn(e, t) {
125
125
  { lat: e.lat + t, lng: e.lng + t }
126
126
  ];
127
127
  }
128
- function Jn(e, t) {
128
+ function Kn(e, t) {
129
129
  return [
130
130
  { lat: e.lat - t * 2, lng: e.lng + t },
131
131
  { lat: e.lat - t * 2, lng: e.lng - t },
@@ -133,7 +133,7 @@ function Jn(e, t) {
133
133
  { lat: e.lat, lng: e.lng + t }
134
134
  ];
135
135
  }
136
- function jn(e, t) {
136
+ function Qn(e, t) {
137
137
  return [
138
138
  { lat: e.lat, lng: e.lng + t },
139
139
  { lat: e.lat, lng: e.lng - t },
@@ -141,11 +141,11 @@ function jn(e, t) {
141
141
  { lat: e.lat + t * 2, lng: e.lng + t }
142
142
  ];
143
143
  }
144
- function Kn(e) {
145
- var t = et(e, !0);
144
+ function Xn(e) {
145
+ var t = rt(e, !0);
146
146
  return t = t.toLowerCase(), t = t.replace(" victoria ", "vic"), t = t.replace(" queensland ", "qld"), t = t.replace(" new south wales ", "nsw"), t = t.replace(" northern territory ", "nt"), t = t.replace(" western australia ", "wa"), t = t.replace(" tasmania ", "tas"), t = t.replace(" south australia ", "sa"), t = t.replace(" australian captial territory ", "act"), t = t.replace(" & ", " and "), t = t.replace(" road", " rd"), t = t.replace(" street", " st"), t = t.replace(" lane", " ln"), t = t.replace(" alley", " aly"), t = t.replace(" arcade", " arc"), t = t.replace(" boulevard", " blvd"), t = t.replace(" court", " ct"), t = t.replace(" cove", " cv"), t = t.replace(" highway", " hwy"), t.replaceAll(" ", "");
147
147
  }
148
- function et(e, t = !1) {
148
+ function rt(e, t = !1) {
149
149
  if (e == null)
150
150
  return "";
151
151
  if (typeof e != "object")
@@ -153,36 +153,36 @@ function et(e, t = !1) {
153
153
  var u = "";
154
154
  return e.addressLineOne != null && !t && (u = e.addressLineOne + " "), e.streetNumber != null && (u = u + e.streetNumber + " "), e.streetName != null && (u = u + e.streetName + ", "), e.suburb != null && (u = u + e.suburb + " "), e.state != null && (u = u + e.state + " "), e.postcode != null && (u = u + e.postcode), u;
155
155
  }
156
- function Qn(e, t, u) {
156
+ function On(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
- async function Xn(e, t = !0) {
163
- return new Promise((u, S) => {
164
- e == null && S("no url given");
162
+ async function pn(e, t = !0) {
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
  }
176
- function rn(e) {
176
+ function tn(e) {
177
177
  return e && e.replace(/([A-Z])/g, " $1").replace(/^./, (t) => t.toUpperCase());
178
178
  }
179
- function On(e) {
179
+ function ea(e) {
180
180
  if (e != null && typeof e == "object")
181
181
  for (var t in e)
182
182
  /^[A-Z]/.test(t) && Object.hasOwnProperty.call(e, t) && (e[t.charAt(0).toLowerCase() + t.substring(1)] = e[t], delete e[t]);
183
183
  return e;
184
184
  }
185
- function tn(e) {
185
+ function nn(e) {
186
186
  return e == null ? e : e.replace(/\w\S*/g, (t) => t.replace(/^\w/, (u) => u.toUpperCase()));
187
187
  }
188
188
  const He = [
@@ -195,108 +195,108 @@ const He = [
195
195
  { value: 7, short: "sat", values: ["sat", "saturday"] },
196
196
  { value: 0, short: "always", values: ["always", null, void 0] }
197
197
  ];
198
- function pn(e) {
198
+ function ra(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
- function ea(e) {
204
+ function ta(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
- function ra(e, t) {
210
+ function na(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
- function ta(e, t) {
216
+ function aa(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
- function na(e, t) {
224
+ function la(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
- function aa(e, t) {
230
+ function ua(e, t) {
231
231
  return e != null && Array.isArray(e) && e.length == t;
232
232
  }
233
233
  function Te(e, t = 0) {
234
234
  return e != null && Array.isArray(e) && e.length > t;
235
235
  }
236
- function nn(e) {
236
+ function an(e) {
237
237
  return e == "0001-01-01T00:00:00Z";
238
238
  }
239
- function la() {
239
+ function ca() {
240
240
  return (/* @__PURE__ */ new Date("0001-01-01T00:00:00Z")).getTime();
241
241
  }
242
- function an() {
242
+ function ln() {
243
243
  return "0001-01-01T00:00:00Z";
244
244
  }
245
- function ua(e, t) {
246
- let u = "1", S = 0;
247
- if (S < t)
245
+ function ia(e, 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
- function ia(e, t) {
254
+ function fa(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 && (un(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
- function ln(e, t) {
258
+ function un(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
- function un(e) {
274
+ function cn(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 ? cn(b) : b, t;
278
278
  }, Array.isArray(e) ? [] : {});
279
279
  }
280
- function cn(e, t) {
280
+ function fn(e, t) {
281
281
  return t == null ? !0 : e == null ? !1 : e.toLowerCase().includes(t.toLowerCase());
282
282
  }
283
- function rt(e, t = (u) => u) {
283
+ function tt(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);
289
- const g = rt(o, t);
290
- return Te(g) && S.push(...g), S;
287
+ return Te(u) ? [...u.reduce((b, o) => {
288
+ b.push(o);
289
+ const g = tt(o, t);
290
+ return Te(g) && b.push(...g), b;
291
291
  }, [])] : [];
292
292
  }
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);
293
+ function sa(e) {
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
- function fn(e) {
299
+ function sn(e) {
300
300
  var t = "";
301
301
  if (e) {
302
302
  if (e.message && (t = e.message), e.response && e.response.data) {
@@ -309,27 +309,27 @@ function fn(e) {
309
309
  }
310
310
  return "hmmm no error was supplied";
311
311
  }
312
- function sn() {
312
+ function on() {
313
313
  const e = "#" + Math.floor(Math.random() * 16777215).toString(16);
314
- return e.length !== 7 ? sn() : e;
314
+ return e.length !== 7 ? on() : e;
315
315
  }
316
- function on(e, t, u) {
316
+ function dn(e, t, u) {
317
317
  if (t == null)
318
318
  return !0;
319
319
  if (e == null || u == null)
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" && fn(b, t))
325
325
  return !0;
326
326
  }
327
327
  return !1;
328
328
  }
329
- function fa(e) {
329
+ function oa(e) {
330
330
  return e != null ? e.replaceAll(" ", "").toLowerCase() : null;
331
331
  }
332
- function sa(e = 2e3) {
332
+ function da(e = 2e3) {
333
333
  return new Promise((t) => {
334
334
  setTimeout(() => t(), e);
335
335
  });
@@ -338,185 +338,185 @@ 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;
346
346
  }
347
- function dn(e) {
347
+ function hn(e) {
348
348
  return e ? /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(e) : !1;
349
349
  }
350
- function hn(e) {
350
+ function mn(e) {
351
351
  return e.endsWith("ies") ? e.slice(0, e.length - 3) : e.endsWith("s") ? e.slice(0, e.length - 1) : e;
352
352
  }
353
353
  let br;
354
354
  function Sr() {
355
355
  return br;
356
356
  }
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;
357
+ function vn(e) {
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)
380
- return console.log(`DEMO: Get from ${c}`), o.get(l);
381
- console.log(`Get from ${c}`);
382
- let w;
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 i = l.finalUrl, D = l.headers;
379
+ if (i == null && (i = b(l)), l.overrideHeaders !== !0 && (D = t(l)), o != null && o.isDemoing.value)
380
+ return console.log(`DEMO: Get from ${i}`), o.get(l);
381
+ console.log(`Get from ${i}`);
382
+ let E;
383
383
  try {
384
- if (w = await fetch(c, {
384
+ if (E = await fetch(i, {
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)
409
- return console.log(`DEMO: Get all from ${c}`), o.getAll(l);
410
- console.log(`Get all from ${c}`);
411
- let w;
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 i = l.finalUrl, D = l.headers;
408
+ if (i == null && (i = b(l)), l.overrideHeaders !== !0 && (D = t(l)), o != null && o.isDemoing.value)
409
+ return console.log(`DEMO: Get all from ${i}`), o.getAll(l);
410
+ console.log(`Get all from ${i}`);
411
+ let E;
412
412
  try {
413
- if (w = await fetch(c, {
413
+ if (E = await fetch(i, {
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)
438
- return console.log(`DEMO: Post to ${c}`), o.post(l);
439
- console.log(`Post to ${c}`);
440
- let w;
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 i = l.finalUrl, D = l.headers;
437
+ if (i == null && (i = b(l)), l.overrideHeaders !== !0 && (D = t(l)), o != null && o.isDemoing.value)
438
+ return console.log(`DEMO: Post to ${i}`), o.post(l);
439
+ console.log(`Post to ${i}`);
440
+ let E;
441
441
  try {
442
- if (w = await fetch(c, {
442
+ if (E = await fetch(i, {
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)
468
- return console.log(`DEMO: Patch to ${c}`), o.patch(l);
469
- console.log(`Patch to ${c}`);
470
- let w;
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 i = l.finalUrl, D = l.headers;
467
+ if (i == null && (i = b(l)), l.overrideHeaders !== !0 && (D = t(l)), o != null && o.isDemoing.value)
468
+ return console.log(`DEMO: Patch to ${i}`), o.patch(l);
469
+ console.log(`Patch to ${i}`);
470
+ let E;
471
471
  try {
472
- if (w = await fetch(c, {
472
+ if (E = await fetch(i, {
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}`);
500
- let c;
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
+ let i;
501
501
  try {
502
- return c = await fetch(E, {
502
+ return i = 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
- }), 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}`;
508
+ }), i.status == 200 ? void 0 : i.statusText;
509
+ } catch (D) {
510
+ const E = `${(i == null ? void 0 : i.status) ?? ""} ${(i == null ? void 0 : i.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(`${i.status} ${i.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: $,
@@ -524,21 +524,21 @@ function mn(e) {
524
524
  post: F
525
525
  }, br;
526
526
  }
527
- function tt(e) {
528
- const { actionErrorMsg: t, actionLoadingMsg: u, clearErrors: S, isLoading: o, doAction: g, logError: _ } = pt(e);
527
+ function nt(e) {
528
+ const { actionErrorMsg: t, actionLoadingMsg: u, clearErrors: b, isLoading: o, doAction: g, logError: x } = en(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);
535
- if (c == null)
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 i = r.id ?? ((E = r.data) == null ? void 0 : E.id);
535
+ if (i == 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 == i);
538
+ return D >= 0 && S.splice(D, 1), Promise.resolve(void 0);
539
539
  }), g(async () => {
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);
540
+ let i;
541
+ r.onCanDeleteAsync != null && (i = await r.onCanDeleteAsync(r.data)), i == null && r.onDeleteAsync != null && (i = await r.onDeleteAsync(r.data)), i == null && r.onDeleteSuccessAsync != null && await r.onDeleteSuccessAsync(r.data), x(i);
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,14 +550,14 @@ 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 i = r.id ?? ((D = r.data) == null ? void 0 : D.id);
557
+ return i == null ? Promise.resolve(void 0) : Promise.resolve(S.find((E) => E.id == i));
558
558
  }), g(async () => {
559
- let c;
560
- return r.onGetAsync != null && (c = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (c = await r.onGetSuccessAsync(c, r)), c;
559
+ let i;
560
+ return r.onGetAsync != null && (i = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (i = await r.onGetSuccessAsync(i, r)), i;
561
561
  }, {
562
562
  completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
563
563
  confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
@@ -569,10 +569,10 @@ 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 () => {
574
- let c;
575
- return r.onGetAsync != null && (c = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (c = await r.onGetSuccessAsync(c, r)), c;
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
+ let i;
575
+ return r.onGetAsync != null && (i = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (i = await r.onGetSuccessAsync(i, r)), i;
576
576
  }, {
577
577
  completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
578
578
  confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
@@ -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, i;
590
+ return r.onCanRestoreAsync != null && (S = await r.onCanRestoreAsync(r.data)), S == null && r.onRestoreAsync != null && (i = await r.onRestoreAsync(r.data)), i != null && r.onRestoreSuccessAsync != null && await r.onRestoreSuccessAsync(i), x(S), i;
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 () => {
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);
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);
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 = (i) => i), r.onCanSaveAsync ?? (r.onCanSaveAsync = () => Promise.resolve(void 0)), y != null ? r.onSaveAsync ?? (r.onSaveAsync = async () => {
604
+ var i;
605
+ return r.mode ?? (r.mode = ((i = r.data) == null ? void 0 : i.id) == null ? "new" : "edit"), r.mode == "new" ? await y().post(r) : await y().patch(r);
606
+ }) : r.onSaveAsync ?? (r.onSaveAsync = (i) => {
607
+ const D = S.findIndex((E) => E.id == i.id);
608
+ return D >= 0 ? S.splice(D, 1, i) : S.push(i), Promise.resolve(i);
609
609
  }), g(async () => {
610
- let c;
611
- if (r.onGetSaveAsync != null && (c = await r.onGetSaveAsync(r.data)), c == null)
610
+ let i;
611
+ if (r.onGetSaveAsync != null && (i = await r.onGetSaveAsync(r.data)), i == 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(i);
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(i), 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,20 +637,20 @@ 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
  };
650
650
  }
651
651
  var Mr = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
652
652
  let ye;
653
- function nt() {
653
+ function at() {
654
654
  const e = Mr.NODE_ENV;
655
655
  return ye == null ? e : (ye[e] ?? ye.development).localDbName ?? e;
656
656
  }
@@ -658,58 +658,58 @@ function kr() {
658
658
  const e = Mr.NODE_ENV;
659
659
  return ye == null ? "" : (ye[e] ?? ye.development).auth ?? "";
660
660
  }
661
- function vn(e) {
661
+ function gn(e) {
662
662
  const t = Mr.NODE_ENV;
663
663
  if (ye == null)
664
664
  return "";
665
665
  const u = ye[t] ?? ye.development;
666
666
  return e == null ? u.data ?? "" : u.other[e] ?? u.data ?? "";
667
667
  }
668
- function oa() {
668
+ function ha() {
669
669
  return ye;
670
670
  }
671
- function gn(e) {
671
+ function yn(e) {
672
672
  return ye = e, ye;
673
673
  }
674
674
  let or = "Australia/Melbourne", Ar;
675
675
  const Gr = "auth-credentials-state";
676
- function da() {
676
+ function ma() {
677
677
  return Ar;
678
678
  }
679
- function yn(e) {
679
+ function wn(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
- const o = Yt("auth-credentials", {});
686
+ const o = Zt("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) => {
760
- F(ie, !0) && (A = !0);
759
+ return re || !_ || !Te(s.children) ? re : ((s == null ? void 0 : s.children) != null && s.children.forEach((ce) => {
760
+ F(ce, !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,169 +787,169 @@ 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 i(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)
803
803
  throw new Error("state does not match");
804
804
  let re = "";
805
805
  e.getTokenUrl ?? (e.getTokenUrl = () => Ne(kr(), "token")), re = e.getTokenUrl(s, `${window.location.origin}/authentication`, K, Q);
806
- const ie = {};
807
- ie.grant_type = K, ie.code = s, ie.redirect_uri = `${window.location.origin}/authentication`, ie.client_id = Q;
806
+ const ce = {};
807
+ ce.grant_type = K, ce.code = s, ce.redirect_uri = `${window.location.origin}/authentication`, ce.client_id = Q;
808
808
  const W = await Sr().post({
809
809
  additionalUrl: re,
810
- data: ie
810
+ data: ce
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,
848
848
  doShow: $,
849
849
  doShowByNav: F,
850
850
  getAuthorizeUrl: h,
851
- getToken: c,
851
+ getToken: i,
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
- function wn(e, t, u = {}) {
861
+ function bn(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), i(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
- function c(M) {
900
- const b = j(e);
901
- if (!b)
899
+ function i(M) {
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
- const bn = ["t", "r", "b", "l", "tr", "br", "bl", "tl"];
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 = [];
932
+ const Sn = ["t", "r", "b", "l", "tr", "br", "bl", "tl"];
933
+ function An(e, t = {}) {
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), i = 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,45 +957,45 @@ 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 (i.value.x = G.clientX, i.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, i.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);
972
972
  if (!Y)
973
973
  return;
974
974
  const H = Y.$el, G = W.type === "touchmove" && W.touches.length > 0 ? W.touches[0] : W;
975
- let X = G.clientX - c.value.x, ne = G.clientY - c.value.y;
976
- const fe = Ae(x);
975
+ let X = G.clientX - i.value.x, ne = G.clientY - i.value.y;
976
+ const fe = Ae(D);
977
977
  if (h.includes("t")) {
978
- const ce = Math.min(N, Math.max(P, (fe.height ?? 0) - ne));
979
- w.height = ce, w.top = (fe.top ?? 0) + ne;
978
+ const ie = Math.min(N, Math.max(P, (fe.height ?? 0) - ne));
979
+ E.height = ie, E.top = (fe.top ?? 0) + ne;
980
980
  }
981
981
  if (h.includes("b")) {
982
- const ce = Math.min(N, Math.max(P, (fe.height ?? 0) + ne));
983
- w.height = ce;
982
+ const ie = Math.min(N, Math.max(P, (fe.height ?? 0) + ne));
983
+ E.height = ie;
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 ie = Math.min(x, Math.max(g, (fe.width ?? 0) - X));
987
+ E.width = ie, 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 ie = Math.min(x, Math.max(g, (fe.width ?? 0) + X));
991
+ E.width = ie;
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 = {
@@ -1012,7 +1012,7 @@ function Sn(e, t = {}) {
1012
1012
  return;
1013
1013
  const H = Y.$el;
1014
1014
  if (console.log(u), u !== "page" && W == "page") {
1015
- const ae = Zt(H), G = Ae(ae) ?? null;
1015
+ const ae = Jt(H), G = Ae(ae) ?? null;
1016
1016
  let X = 0;
1017
1017
  if (G != null) {
1018
1018
  const ne = window.getComputedStyle(G);
@@ -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
  }
@@ -1060,39 +1060,39 @@ function Sn(e, t = {}) {
1060
1060
  const H = Y.$el;
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
- function ie(W, Y) {
1064
- if (y.value)
1063
+ function ce(W, Y) {
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 ?? Sn), 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,
1079
- turnResizingOn: ie,
1078
+ resizingIsOn: S,
1079
+ turnResizingOn: ce,
1080
1080
  turnResizingOff: we
1081
1081
  };
1082
1082
  }
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);
1085
- Jt(t, (m) => {
1083
+ function En(e) {
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 } = An(t), { turnDraggableOff: $, turnDraggableOn: F } = bn(t, u);
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 = {
@@ -1113,10 +1113,10 @@ const dr = {
1113
1113
  warning: "#FB8C00"
1114
1114
  };
1115
1115
  let Er;
1116
- function ha() {
1116
+ function va() {
1117
1117
  return Er;
1118
1118
  }
1119
- function ma(e) {
1119
+ function ga(e) {
1120
1120
  const t = localStorage.getItem("cosmetics");
1121
1121
  let u;
1122
1122
  return t != null && t.length > 0 && (u = JSON.parse(t)), u ?? (u = {}), u.dark ?? (u.dark = e == null ? void 0 : e.dark), u.light ?? (u.light = e == null ? void 0 : e.light), u.theme ?? (u.theme = e == null ? void 0 : e.defaultTheme), {
@@ -1131,10 +1131,10 @@ function ma(e) {
1131
1131
  }
1132
1132
  };
1133
1133
  }
1134
- function En(e) {
1134
+ function In(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",
@@ -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;
@@ -1185,57 +1185,57 @@ function En(e) {
1185
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: $,
1197
1197
  undoTemporaryColor: F
1198
1198
  }, Er;
1199
1199
  }
1200
- const va = {
1200
+ const ya = {
1201
1201
  canExportCSV: !1
1202
1202
  };
1203
- function In() {
1203
+ function Dn() {
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: tn(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 i = 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(i) : typeof E.value == "string" && (F = wr(i, 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) => {
1234
- let c = [];
1235
- _.forEach(function(x) {
1236
- var w = y[x.header];
1237
- c.push(w ?? "");
1238
- }), h.push(c.join(","));
1233
+ if (h.push(x.map((S) => S.header).toString()), P.forEach((S) => {
1234
+ let i = [];
1235
+ x.forEach(function(D) {
1236
+ var E = S[D.header];
1237
+ i.push(E ?? "");
1238
+ }), h.push(i.join(","));
1239
1239
  }), g == "array")
1240
1240
  return h;
1241
1241
  var m = h.join(`
@@ -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
  }
@@ -1254,15 +1254,15 @@ function In() {
1254
1254
  };
1255
1255
  }
1256
1256
  let Ir;
1257
- function ga() {
1257
+ function wa() {
1258
1258
  return Ir;
1259
1259
  }
1260
- function Dn(e) {
1260
+ function xn(e) {
1261
1261
  const t = e.getUTC ?? de.utc;
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,20 +1291,20 @@ 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
  }
1301
1301
  let Dr;
1302
- function ya() {
1302
+ function ba() {
1303
1303
  return Dr;
1304
1304
  }
1305
- function xn(e) {
1305
+ function _n(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, i;
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 && ((i = l.data) == null ? void 0 : i.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((i) => i.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,26 +1401,26 @@ 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: $,
1410
1410
  patch: F
1411
1411
  }, Dr;
1412
1412
  }
1413
- var _n = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
1414
- function wa(e) {
1413
+ var Tn = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
1414
+ function Sa(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
- 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 = _;
1421
+ const g = Tn.NODE_ENV;
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 {
@@ -1428,12 +1428,12 @@ function wa(e) {
1428
1428
  };
1429
1429
  }
1430
1430
  let xr;
1431
- function ba() {
1431
+ function Aa() {
1432
1432
  return xr;
1433
1433
  }
1434
- function Tn(e) {
1434
+ function Cn(e) {
1435
1435
  function t(s, A, K) {
1436
- return s ? nn(s) ? K ?? "" : e.dates.tzString(s, A) : K ?? s ?? "";
1436
+ return s ? an(s) ? K ?? "" : e.dates.tzString(s, A) : K ?? s ?? "";
1437
1437
  }
1438
1438
  function u(s) {
1439
1439
  if (!s)
@@ -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) {
@@ -1484,7 +1484,7 @@ function Tn(e) {
1484
1484
  return e.dates.utcString(s, A);
1485
1485
  }
1486
1486
  function l(s) {
1487
- return et(s, !1);
1487
+ return rt(s, !1);
1488
1488
  }
1489
1489
  function r(s) {
1490
1490
  if (!s)
@@ -1494,29 +1494,29 @@ 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
- function c(s) {
1503
+ function i(s) {
1504
1504
  var A = new Intl.NumberFormat("en-US", {
1505
1505
  style: "percent",
1506
1506
  minimumFractionDigits: 2
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,
1541
- toPercent: c,
1542
- toPrettyCSV: x,
1543
- toShortDate: w,
1539
+ toLongDate: y,
1540
+ toLongDateAndTime: S,
1541
+ toPercent: i,
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,14 +1554,14 @@ 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
  }
1561
1561
  function Ke(e) {
1562
1562
  throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
1563
1563
  }
1564
- var at = { exports: {} };
1564
+ var lt = { exports: {} };
1565
1565
  /*!
1566
1566
  localForage -- Offline Storage, Improved
1567
1567
  Version 1.10.0
@@ -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,184 +1612,184 @@ 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, i, D = l.length; D; ) {
1626
+ for (i = l, l = [], S = -1; ++S < D; )
1627
+ i[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
- h.resolve = c;
1734
- function c(b) {
1735
- return b instanceof this ? b : P.resolve(new this(_), b);
1733
+ h.resolve = i;
1734
+ function i(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
- function re(ie, we) {
1754
- C.resolve(ie).then(W, function(Y) {
1755
- D || (D = !0, P.reject(Q, Y));
1753
+ function re(ce, we) {
1754
+ C.resolve(ce).then(W, function(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) {
1792
- if (!(n instanceof i))
1791
+ function x(n, c) {
1792
+ if (!(n instanceof c))
1793
1793
  throw new TypeError("Cannot call a class as a function");
1794
1794
  }
1795
1795
  function P() {
@@ -1813,8 +1813,8 @@ var at = { exports: {} };
1813
1813
  try {
1814
1814
  if (!N || !N.open)
1815
1815
  return !1;
1816
- var n = typeof openDatabase < "u" && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform), i = typeof fetch == "function" && fetch.toString().indexOf("[native code") !== -1;
1817
- return (!n || i) && typeof indexedDB < "u" && // some outdated implementations of IDB that appear on Samsung
1816
+ var n = typeof openDatabase < "u" && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform), c = typeof fetch == "function" && fetch.toString().indexOf("[native code") !== -1;
1817
+ return (!n || c) && typeof indexedDB < "u" && // some outdated implementations of IDB that appear on Samsung
1818
1818
  // and HTC Android devices <4.4 are missing IDBKeyRange
1819
1819
  // See: https://github.com/mozilla/localForage/issues/128
1820
1820
  // See: https://github.com/mozilla/localForage/issues/272
@@ -1823,93 +1823,93 @@ var at = { exports: {} };
1823
1823
  return !1;
1824
1824
  }
1825
1825
  }
1826
- function F(n, i) {
1827
- n = n || [], i = i || {};
1826
+ function F(n, c) {
1827
+ n = n || [], c = c || {};
1828
1828
  try {
1829
- return new Blob(n, i);
1829
+ return new Blob(n, c);
1830
1830
  } catch (f) {
1831
1831
  if (f.name !== "TypeError")
1832
1832
  throw f;
1833
1833
  for (var a = typeof BlobBuilder < "u" ? BlobBuilder : typeof MSBlobBuilder < "u" ? MSBlobBuilder : typeof MozBlobBuilder < "u" ? MozBlobBuilder : WebKitBlobBuilder, d = new a(), v = 0; v < n.length; v += 1)
1834
1834
  d.append(n[v]);
1835
- return d.getBlob(i.type);
1835
+ return d.getBlob(c.type);
1836
1836
  }
1837
1837
  }
1838
1838
  typeof Promise > "u" && u(3);
1839
1839
  var h = Promise;
1840
- function m(n, i) {
1841
- i && n.then(function(a) {
1842
- i(null, a);
1840
+ function m(n, c) {
1841
+ c && n.then(function(a) {
1842
+ c(null, a);
1843
1843
  }, function(a) {
1844
- i(a);
1844
+ c(a);
1845
1845
  });
1846
1846
  }
1847
- function l(n, i, a) {
1848
- typeof i == "function" && n.then(i), typeof a == "function" && n.catch(a);
1847
+ function l(n, c, a) {
1848
+ typeof c == "function" && n.then(c), typeof a == "function" && n.catch(a);
1849
1849
  }
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", i = void 0, D = {}, E = Object.prototype.toString, M = "readonly", w = "readwrite";
1858
1858
  function C(n) {
1859
- for (var i = n.length, a = new ArrayBuffer(i), d = new Uint8Array(a), v = 0; v < i; v++)
1859
+ for (var c = n.length, a = new ArrayBuffer(c), d = new Uint8Array(a), v = 0; v < c; v++)
1860
1860
  d[v] = n.charCodeAt(v);
1861
1861
  return a;
1862
1862
  }
1863
1863
  function I(n) {
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) {
1867
- v.preventDefault(), v.stopPropagation(), i(!1);
1864
+ return new h(function(c) {
1865
+ var a = n.transaction(S, w), d = F([""]);
1866
+ a.objectStore(S).put(d, "key"), a.onabort = function(v) {
1867
+ v.preventDefault(), v.stopPropagation(), c(!1);
1868
1868
  }, a.oncomplete = function() {
1869
1869
  var v = navigator.userAgent.match(/Chrome\/(\d+)/), f = navigator.userAgent.match(/Edge\//);
1870
- i(f || !v || parseInt(v[1], 10) >= 43);
1870
+ c(f || !v || parseInt(v[1], 10) >= 43);
1871
1871
  };
1872
1872
  }).catch(function() {
1873
1873
  return !1;
1874
1874
  });
1875
1875
  }
1876
- function D(n) {
1877
- return typeof c == "boolean" ? h.resolve(c) : I(n).then(function(i) {
1878
- return c = i, c;
1876
+ function _(n) {
1877
+ return typeof i == "boolean" ? h.resolve(i) : I(n).then(function(c) {
1878
+ return i = c, i;
1879
1879
  });
1880
1880
  }
1881
1881
  function s(n) {
1882
- var i = x[n.name], a = {};
1882
+ var c = D[n.name], a = {};
1883
1883
  a.promise = new h(function(d, v) {
1884
1884
  a.resolve = d, a.reject = v;
1885
- }), i.deferredOperations.push(a), i.dbReady ? i.dbReady = i.dbReady.then(function() {
1885
+ }), c.deferredOperations.push(a), c.dbReady ? c.dbReady = c.dbReady.then(function() {
1886
1886
  return a.promise;
1887
- }) : i.dbReady = a.promise;
1887
+ }) : c.dbReady = a.promise;
1888
1888
  }
1889
1889
  function A(n) {
1890
- var i = x[n.name], a = i.deferredOperations.pop();
1890
+ var c = D[n.name], a = c.deferredOperations.pop();
1891
1891
  if (a)
1892
1892
  return a.resolve(), a.promise;
1893
1893
  }
1894
- function K(n, i) {
1895
- var a = x[n.name], d = a.deferredOperations.pop();
1894
+ function K(n, c) {
1895
+ var a = D[n.name], d = a.deferredOperations.pop();
1896
1896
  if (d)
1897
- return d.reject(i), d.promise;
1897
+ return d.reject(c), d.promise;
1898
1898
  }
1899
- function Q(n, i) {
1899
+ function Q(n, c) {
1900
1900
  return new h(function(a, d) {
1901
- if (x[n.name] = x[n.name] || ne(), n.db)
1902
- if (i)
1901
+ if (D[n.name] = D[n.name] || ne(), n.db)
1902
+ if (c)
1903
1903
  s(n), n.db.close();
1904
1904
  else
1905
1905
  return a(n.db);
1906
1906
  var v = [n.name];
1907
- i && v.push(n.version);
1907
+ c && v.push(n.version);
1908
1908
  var f = N.open.apply(N, v);
1909
- i && (f.onupgradeneeded = function(T) {
1909
+ c && (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.');
@@ -1929,14 +1929,14 @@ var at = { exports: {} };
1929
1929
  function re(n) {
1930
1930
  return Q(n, !1);
1931
1931
  }
1932
- function ie(n) {
1932
+ function ce(n) {
1933
1933
  return Q(n, !0);
1934
1934
  }
1935
- function we(n, i) {
1935
+ function we(n, c) {
1936
1936
  if (!n.db)
1937
1937
  return !0;
1938
1938
  var a = !n.db.objectStoreNames.contains(n.storeName), d = n.version < n.db.version, v = n.version > n.db.version;
1939
- if (d && (n.version !== i && console.warn('The database "' + n.name + `" can't be downgraded from version ` + n.db.version + " to version " + n.version + "."), n.version = n.db.version), v || a) {
1939
+ if (d && (n.version !== c && console.warn('The database "' + n.name + `" can't be downgraded from version ` + n.db.version + " to version " + n.version + "."), n.version = n.db.version), v || a) {
1940
1940
  if (a) {
1941
1941
  var f = n.db.version + 1;
1942
1942
  f > n.version && (n.version = f);
@@ -1946,11 +1946,11 @@ var at = { exports: {} };
1946
1946
  return !1;
1947
1947
  }
1948
1948
  function W(n) {
1949
- return new h(function(i, a) {
1949
+ return new h(function(c, a) {
1950
1950
  var d = new FileReader();
1951
1951
  d.onerror = a, d.onloadend = function(v) {
1952
1952
  var f = btoa(v.target.result || "");
1953
- i({
1953
+ c({
1954
1954
  __local_forage_encoded_blob: !0,
1955
1955
  data: f,
1956
1956
  type: n.type
@@ -1959,15 +1959,15 @@ var at = { exports: {} };
1959
1959
  });
1960
1960
  }
1961
1961
  function Y(n) {
1962
- var i = C(atob(n.data));
1963
- return F([i], { type: n.type });
1962
+ var c = C(atob(n.data));
1963
+ return F([c], { type: n.type });
1964
1964
  }
1965
1965
  function H(n) {
1966
1966
  return n && n.__local_forage_encoded_blob;
1967
1967
  }
1968
1968
  function ae(n) {
1969
- var i = this, a = i._initReady().then(function() {
1970
- var d = x[i._dbInfo.name];
1969
+ var c = this, a = c._initReady().then(function() {
1970
+ var d = D[c._dbInfo.name];
1971
1971
  if (d && d.dbReady)
1972
1972
  return d.dbReady;
1973
1973
  });
@@ -1975,33 +1975,33 @@ 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 c = D[n.name], a = c.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
  }
1982
1982
  return n.db = null, re(n).then(function(f) {
1983
- return n.db = f, we(n) ? ie(n) : f;
1983
+ return n.db = f, we(n) ? ce(n) : f;
1984
1984
  }).then(function(f) {
1985
- n.db = i.db = f;
1985
+ n.db = c.db = f;
1986
1986
  for (var T = 0; T < a.length; T++)
1987
1987
  a[T]._dbInfo.db = f;
1988
1988
  }).catch(function(f) {
1989
1989
  throw K(n, f), f;
1990
1990
  });
1991
1991
  }
1992
- function X(n, i, a, d) {
1992
+ function X(n, c, a, d) {
1993
1993
  d === void 0 && (d = 1);
1994
1994
  try {
1995
- var v = n.db.transaction(n.storeName, i);
1995
+ var v = n.db.transaction(n.storeName, c);
1996
1996
  a(null, v);
1997
1997
  } catch (f) {
1998
1998
  if (d > 0 && (!n.db || f.name === "InvalidStateError" || f.name === "NotFoundError"))
1999
1999
  return h.resolve().then(function() {
2000
2000
  if (!n.db || f.name === "NotFoundError" && !n.db.objectStoreNames.contains(n.storeName) && n.version <= n.db.version)
2001
- return n.db && (n.version = n.db.version + 1), ie(n);
2001
+ return n.db && (n.version = n.db.version + 1), ce(n);
2002
2002
  }).then(function() {
2003
2003
  return G(n).then(function() {
2004
- X(n, i, a, d - 1);
2004
+ X(n, c, a, d - 1);
2005
2005
  });
2006
2006
  }).catch(a);
2007
2007
  a(f);
@@ -2020,36 +2020,36 @@ var at = { exports: {} };
2020
2020
  };
2021
2021
  }
2022
2022
  function fe(n) {
2023
- var i = this, a = {
2023
+ var c = this, a = {
2024
2024
  db: null
2025
2025
  };
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(c), c._initReady || (c._initReady = c.ready, c.ready = ae);
2031
2031
  var f = [];
2032
2032
  function T() {
2033
2033
  return h.resolve();
2034
2034
  }
2035
2035
  for (var L = 0; L < v.forages.length; L++) {
2036
2036
  var U = v.forages[L];
2037
- U !== i && f.push(U._initReady().catch(T));
2037
+ U !== c && f.push(U._initReady().catch(T));
2038
2038
  }
2039
2039
  var B = v.forages.slice(0);
2040
2040
  return h.all(f).then(function() {
2041
2041
  return a.db = v.db, re(a);
2042
2042
  }).then(function(k) {
2043
- return a.db = k, we(a, i._defaultConfig.version) ? ie(a) : k;
2043
+ return a.db = k, we(a, c._defaultConfig.version) ? ce(a) : k;
2044
2044
  }).then(function(k) {
2045
- a.db = v.db = k, i._dbInfo = a;
2045
+ a.db = v.db = k, c._dbInfo = a;
2046
2046
  for (var q = 0; q < B.length; q++) {
2047
2047
  var Z = B[q];
2048
- Z !== i && (Z._dbInfo.db = a.db, Z._dbInfo.version = a.version);
2048
+ Z !== c && (Z._dbInfo.db = a.db, Z._dbInfo.version = a.version);
2049
2049
  }
2050
2050
  });
2051
2051
  }
2052
- function ce(n, i) {
2052
+ function ie(n, c) {
2053
2053
  var a = this;
2054
2054
  n = r(n);
2055
2055
  var d = new h(function(v, f) {
@@ -2071,9 +2071,9 @@ var at = { exports: {} };
2071
2071
  });
2072
2072
  }).catch(f);
2073
2073
  });
2074
- return m(d, i), d;
2074
+ return m(d, c), d;
2075
2075
  }
2076
- function Ee(n, i) {
2076
+ function Ee(n, c) {
2077
2077
  var a = this, d = new h(function(v, f) {
2078
2078
  a.ready().then(function() {
2079
2079
  X(a._dbInfo, M, function(T, L) {
@@ -2099,19 +2099,19 @@ var at = { exports: {} };
2099
2099
  });
2100
2100
  }).catch(f);
2101
2101
  });
2102
- return m(d, i), d;
2102
+ return m(d, c), d;
2103
2103
  }
2104
- function Re(n, i, a) {
2104
+ function Re(n, c, a) {
2105
2105
  var d = this;
2106
2106
  n = r(n);
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) {
2111
- return U ? i : W(i);
2112
- }) : i;
2110
+ return L = d._dbInfo, E.call(c) === "[object Blob]" ? _(L.db).then(function(U) {
2111
+ return U ? c : W(c);
2112
+ }) : c;
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 {
@@ -2132,12 +2132,12 @@ var at = { exports: {} };
2132
2132
  });
2133
2133
  return m(v, a), v;
2134
2134
  }
2135
- function Ve(n, i) {
2135
+ function Ve(n, c) {
2136
2136
  var a = this;
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 {
@@ -2156,16 +2156,16 @@ var at = { exports: {} };
2156
2156
  });
2157
2157
  }).catch(f);
2158
2158
  });
2159
- return m(d, i), d;
2159
+ return m(d, c), d;
2160
2160
  }
2161
2161
  function pe(n) {
2162
- var i = this, a = new h(function(d, v) {
2163
- i.ready().then(function() {
2164
- X(i._dbInfo, b, function(f, T) {
2162
+ var c = this, a = new h(function(d, v) {
2163
+ c.ready().then(function() {
2164
+ X(c._dbInfo, w, function(f, T) {
2165
2165
  if (f)
2166
2166
  return v(f);
2167
2167
  try {
2168
- var L = T.objectStore(i._dbInfo.storeName), U = L.clear();
2168
+ var L = T.objectStore(c._dbInfo.storeName), U = L.clear();
2169
2169
  T.oncomplete = function() {
2170
2170
  d();
2171
2171
  }, T.onabort = T.onerror = function() {
@@ -2181,13 +2181,13 @@ var at = { exports: {} };
2181
2181
  return m(a, n), a;
2182
2182
  }
2183
2183
  function er(n) {
2184
- var i = this, a = new h(function(d, v) {
2185
- i.ready().then(function() {
2186
- X(i._dbInfo, M, function(f, T) {
2184
+ var c = this, a = new h(function(d, v) {
2185
+ c.ready().then(function() {
2186
+ X(c._dbInfo, M, function(f, T) {
2187
2187
  if (f)
2188
2188
  return v(f);
2189
2189
  try {
2190
- var L = T.objectStore(i._dbInfo.storeName), U = L.count();
2190
+ var L = T.objectStore(c._dbInfo.storeName), U = L.count();
2191
2191
  U.onsuccess = function() {
2192
2192
  d(U.result);
2193
2193
  }, U.onerror = function() {
@@ -2201,7 +2201,7 @@ var at = { exports: {} };
2201
2201
  });
2202
2202
  return m(a, n), a;
2203
2203
  }
2204
- function rr(n, i) {
2204
+ function rr(n, c) {
2205
2205
  var a = this, d = new h(function(v, f) {
2206
2206
  if (n < 0) {
2207
2207
  v(null);
@@ -2229,16 +2229,16 @@ var at = { exports: {} };
2229
2229
  });
2230
2230
  }).catch(f);
2231
2231
  });
2232
- return m(d, i), d;
2232
+ return m(d, c), d;
2233
2233
  }
2234
2234
  function Ce(n) {
2235
- var i = this, a = new h(function(d, v) {
2236
- i.ready().then(function() {
2237
- X(i._dbInfo, M, function(f, T) {
2235
+ var c = this, a = new h(function(d, v) {
2236
+ c.ready().then(function() {
2237
+ X(c._dbInfo, M, function(f, T) {
2238
2238
  if (f)
2239
2239
  return v(f);
2240
2240
  try {
2241
- var L = T.objectStore(i._dbInfo.storeName), U = L.openKeyCursor(), B = [];
2241
+ var L = T.objectStore(c._dbInfo.storeName), U = L.openKeyCursor(), B = [];
2242
2242
  U.onsuccess = function() {
2243
2243
  var k = U.result;
2244
2244
  if (!k) {
@@ -2257,8 +2257,8 @@ var at = { exports: {} };
2257
2257
  });
2258
2258
  return m(a, n), a;
2259
2259
  }
2260
- function tr(n, i) {
2261
- i = E.apply(this, arguments);
2260
+ function tr(n, c) {
2261
+ c = 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];
@@ -2338,14 +2338,14 @@ var at = { exports: {} };
2338
2338
  });
2339
2339
  });
2340
2340
  }
2341
- return m(v, i), v;
2341
+ return m(v, c), v;
2342
2342
  }
2343
2343
  var nr = {
2344
2344
  _driver: "asyncStorage",
2345
2345
  _initStorage: fe,
2346
2346
  _support: $(),
2347
2347
  iterate: Ee,
2348
- getItem: ce,
2348
+ getItem: ie,
2349
2349
  setItem: Re,
2350
2350
  removeItem: Ve,
2351
2351
  clear: pe,
@@ -2359,46 +2359,46 @@ var at = { exports: {} };
2359
2359
  }
2360
2360
  var be = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", lr = "~~local_forage_type~", ze = /^~~local_forage_type~([^~]+)~/, Ue = "__lfsc__:", Pe = Ue.length, $e = "arbf", Ie = "blob", Ye = "si08", Ze = "ui08", Fe = "uic8", ke = "si16", R = "si32", J = "ur16", V = "ui32", O = "fl32", oe = "fl64", ve = Pe + $e.length, De = Object.prototype.toString;
2361
2361
  function Se(n) {
2362
- var i = n.length * 0.75, a = n.length, d, v = 0, f, T, L, U;
2363
- n[n.length - 1] === "=" && (i--, n[n.length - 2] === "=" && i--);
2364
- var B = new ArrayBuffer(i), k = new Uint8Array(B);
2362
+ var c = n.length * 0.75, a = n.length, d, v = 0, f, T, L, U;
2363
+ n[n.length - 1] === "=" && (c--, n[n.length - 2] === "=" && c--);
2364
+ var B = new ArrayBuffer(c), k = new Uint8Array(B);
2365
2365
  for (d = 0; d < a; d += 4)
2366
2366
  f = be.indexOf(n[d]), T = be.indexOf(n[d + 1]), L = be.indexOf(n[d + 2]), U = be.indexOf(n[d + 3]), k[v++] = f << 2 | T >> 4, k[v++] = (T & 15) << 4 | L >> 2, k[v++] = (L & 3) << 6 | U & 63;
2367
2367
  return B;
2368
2368
  }
2369
2369
  function se(n) {
2370
- var i = new Uint8Array(n), a = "", d;
2371
- for (d = 0; d < i.length; d += 3)
2372
- a += be[i[d] >> 2], a += be[(i[d] & 3) << 4 | i[d + 1] >> 4], a += be[(i[d + 1] & 15) << 2 | i[d + 2] >> 6], a += be[i[d + 2] & 63];
2373
- return i.length % 3 === 2 ? a = a.substring(0, a.length - 1) + "=" : i.length % 3 === 1 && (a = a.substring(0, a.length - 2) + "=="), a;
2370
+ var c = new Uint8Array(n), a = "", d;
2371
+ for (d = 0; d < c.length; d += 3)
2372
+ a += be[c[d] >> 2], a += be[(c[d] & 3) << 4 | c[d + 1] >> 4], a += be[(c[d + 1] & 15) << 2 | c[d + 2] >> 6], a += be[c[d + 2] & 63];
2373
+ return c.length % 3 === 2 ? a = a.substring(0, a.length - 1) + "=" : c.length % 3 === 1 && (a = a.substring(0, a.length - 2) + "=="), a;
2374
2374
  }
2375
- function Me(n, i) {
2375
+ function Me(n, c) {
2376
2376
  var a = "";
2377
2377
  if (n && (a = De.call(n)), n && (a === "[object ArrayBuffer]" || n.buffer && De.call(n.buffer) === "[object ArrayBuffer]")) {
2378
2378
  var d, v = Ue;
2379
- n instanceof ArrayBuffer ? (d = n, v += $e) : (d = n.buffer, a === "[object Int8Array]" ? v += Ye : a === "[object Uint8Array]" ? v += Ze : a === "[object Uint8ClampedArray]" ? v += Fe : a === "[object Int16Array]" ? v += ke : a === "[object Uint16Array]" ? v += J : a === "[object Int32Array]" ? v += R : a === "[object Uint32Array]" ? v += V : a === "[object Float32Array]" ? v += O : a === "[object Float64Array]" ? v += oe : i(new Error("Failed to get type for BinaryArray"))), i(v + se(d));
2379
+ n instanceof ArrayBuffer ? (d = n, v += $e) : (d = n.buffer, a === "[object Int8Array]" ? v += Ye : a === "[object Uint8Array]" ? v += Ze : a === "[object Uint8ClampedArray]" ? v += Fe : a === "[object Int16Array]" ? v += ke : a === "[object Uint16Array]" ? v += J : a === "[object Int32Array]" ? v += R : a === "[object Uint32Array]" ? v += V : a === "[object Float32Array]" ? v += O : a === "[object Float64Array]" ? v += oe : c(new Error("Failed to get type for BinaryArray"))), c(v + se(d));
2380
2380
  } else if (a === "[object Blob]") {
2381
2381
  var f = new FileReader();
2382
2382
  f.onload = function() {
2383
2383
  var T = lr + n.type + "~" + se(this.result);
2384
- i(Ue + Ie + T);
2384
+ c(Ue + Ie + T);
2385
2385
  }, f.readAsArrayBuffer(n);
2386
2386
  } else
2387
2387
  try {
2388
- i(JSON.stringify(n));
2388
+ c(JSON.stringify(n));
2389
2389
  } catch (T) {
2390
- console.error("Couldn't convert value into a JSON string: ", n), i(null, T);
2390
+ console.error("Couldn't convert value into a JSON string: ", n), c(null, T);
2391
2391
  }
2392
2392
  }
2393
2393
  function it(n) {
2394
2394
  if (n.substring(0, Pe) !== Ue)
2395
2395
  return JSON.parse(n);
2396
- var i = n.substring(ve), a = n.substring(Pe, ve), d;
2397
- if (a === Ie && ze.test(i)) {
2398
- var v = i.match(ze);
2399
- d = v[1], i = i.substring(v[0].length);
2396
+ var c = n.substring(ve), a = n.substring(Pe, ve), d;
2397
+ if (a === Ie && ze.test(c)) {
2398
+ var v = c.match(ze);
2399
+ d = v[1], c = c.substring(v[0].length);
2400
2400
  }
2401
- var f = Se(i);
2401
+ var f = Se(c);
2402
2402
  switch (a) {
2403
2403
  case $e:
2404
2404
  return f;
@@ -2432,11 +2432,11 @@ var at = { exports: {} };
2432
2432
  stringToBuffer: Se,
2433
2433
  bufferToString: se
2434
2434
  };
2435
- function Lr(n, i, a, d) {
2436
- n.executeSql("CREATE TABLE IF NOT EXISTS " + i.storeName + " (id INTEGER PRIMARY KEY, key unique, value)", [], a, d);
2435
+ function Lr(n, c, a, d) {
2436
+ n.executeSql("CREATE TABLE IF NOT EXISTS " + c.storeName + " (id INTEGER PRIMARY KEY, key unique, value)", [], a, d);
2437
2437
  }
2438
- function ct(n) {
2439
- var i = this, a = {
2438
+ function ft(n) {
2439
+ var c = this, a = {
2440
2440
  db: null
2441
2441
  };
2442
2442
  if (n)
@@ -2450,7 +2450,7 @@ var at = { exports: {} };
2450
2450
  }
2451
2451
  a.db.transaction(function(L) {
2452
2452
  Lr(L, a, function() {
2453
- i._dbInfo = a, f();
2453
+ c._dbInfo = a, f();
2454
2454
  }, function(U, B) {
2455
2455
  T(B);
2456
2456
  });
@@ -2458,16 +2458,16 @@ var at = { exports: {} };
2458
2458
  });
2459
2459
  return a.serializer = ur, v;
2460
2460
  }
2461
- function xe(n, i, a, d, v, f) {
2461
+ function xe(n, c, a, d, v, f) {
2462
2462
  n.executeSql(a, d, v, function(T, L) {
2463
- L.code === L.SYNTAX_ERR ? T.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?", [i.storeName], function(U, B) {
2464
- B.rows.length ? f(U, L) : Lr(U, i, function() {
2463
+ L.code === L.SYNTAX_ERR ? T.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?", [c.storeName], function(U, B) {
2464
+ B.rows.length ? f(U, L) : Lr(U, c, function() {
2465
2465
  U.executeSql(a, d, v, f);
2466
2466
  }, f);
2467
2467
  }, f) : f(T, L);
2468
2468
  }, f);
2469
2469
  }
2470
- function ft(n, i) {
2470
+ function st(n, c) {
2471
2471
  var a = this;
2472
2472
  n = r(n);
2473
2473
  var d = new h(function(v, f) {
@@ -2483,9 +2483,9 @@ var at = { exports: {} };
2483
2483
  });
2484
2484
  }).catch(f);
2485
2485
  });
2486
- return m(d, i), d;
2486
+ return m(d, c), d;
2487
2487
  }
2488
- function st(n, i) {
2488
+ function ot(n, c) {
2489
2489
  var a = this, d = new h(function(v, f) {
2490
2490
  a.ready().then(function() {
2491
2491
  var T = a._dbInfo;
@@ -2505,16 +2505,16 @@ var at = { exports: {} };
2505
2505
  });
2506
2506
  }).catch(f);
2507
2507
  });
2508
- return m(d, i), d;
2508
+ return m(d, c), d;
2509
2509
  }
2510
- function Nr(n, i, a, d) {
2510
+ function Nr(n, c, a, d) {
2511
2511
  var v = this;
2512
2512
  n = r(n);
2513
2513
  var f = new h(function(T, L) {
2514
2514
  v.ready().then(function() {
2515
- i === void 0 && (i = null);
2516
- var U = i, B = v._dbInfo;
2517
- B.serializer.serialize(i, function(k, q) {
2515
+ c === void 0 && (c = null);
2516
+ var U = c, B = v._dbInfo;
2517
+ B.serializer.serialize(c, function(k, q) {
2518
2518
  q ? L(q) : B.db.transaction(function(Z) {
2519
2519
  xe(Z, B, "INSERT OR REPLACE INTO " + B.storeName + " (key, value) VALUES (?, ?)", [n, k], function() {
2520
2520
  T(U);
@@ -2535,10 +2535,10 @@ var at = { exports: {} };
2535
2535
  });
2536
2536
  return m(f, a), f;
2537
2537
  }
2538
- function ot(n, i, a) {
2539
- return Nr.apply(this, [n, i, a, 1]);
2538
+ function dt(n, c, a) {
2539
+ return Nr.apply(this, [n, c, a, 1]);
2540
2540
  }
2541
- function dt(n, i) {
2541
+ function ht(n, c) {
2542
2542
  var a = this;
2543
2543
  n = r(n);
2544
2544
  var d = new h(function(v, f) {
@@ -2553,12 +2553,12 @@ var at = { exports: {} };
2553
2553
  });
2554
2554
  }).catch(f);
2555
2555
  });
2556
- return m(d, i), d;
2556
+ return m(d, c), d;
2557
2557
  }
2558
- function ht(n) {
2559
- var i = this, a = new h(function(d, v) {
2560
- i.ready().then(function() {
2561
- var f = i._dbInfo;
2558
+ function mt(n) {
2559
+ var c = this, a = new h(function(d, v) {
2560
+ c.ready().then(function() {
2561
+ var f = c._dbInfo;
2562
2562
  f.db.transaction(function(T) {
2563
2563
  xe(T, f, "DELETE FROM " + f.storeName, [], function() {
2564
2564
  d();
@@ -2570,10 +2570,10 @@ var at = { exports: {} };
2570
2570
  });
2571
2571
  return m(a, n), a;
2572
2572
  }
2573
- function mt(n) {
2574
- var i = this, a = new h(function(d, v) {
2575
- i.ready().then(function() {
2576
- var f = i._dbInfo;
2573
+ function vt(n) {
2574
+ var c = this, a = new h(function(d, v) {
2575
+ c.ready().then(function() {
2576
+ var f = c._dbInfo;
2577
2577
  f.db.transaction(function(T) {
2578
2578
  xe(T, f, "SELECT COUNT(key) as c FROM " + f.storeName, [], function(L, U) {
2579
2579
  var B = U.rows.item(0).c;
@@ -2586,7 +2586,7 @@ var at = { exports: {} };
2586
2586
  });
2587
2587
  return m(a, n), a;
2588
2588
  }
2589
- function vt(n, i) {
2589
+ function gt(n, c) {
2590
2590
  var a = this, d = new h(function(v, f) {
2591
2591
  a.ready().then(function() {
2592
2592
  var T = a._dbInfo;
@@ -2600,12 +2600,12 @@ var at = { exports: {} };
2600
2600
  });
2601
2601
  }).catch(f);
2602
2602
  });
2603
- return m(d, i), d;
2603
+ return m(d, c), d;
2604
2604
  }
2605
- function gt(n) {
2606
- var i = this, a = new h(function(d, v) {
2607
- i.ready().then(function() {
2608
- var f = i._dbInfo;
2605
+ function yt(n) {
2606
+ var c = this, a = new h(function(d, v) {
2607
+ c.ready().then(function() {
2608
+ var f = c._dbInfo;
2609
2609
  f.db.transaction(function(T) {
2610
2610
  xe(T, f, "SELECT key FROM " + f.storeName, [], function(L, U) {
2611
2611
  for (var B = [], k = 0; k < U.rows.length; k++)
@@ -2619,13 +2619,13 @@ var at = { exports: {} };
2619
2619
  });
2620
2620
  return m(a, n), a;
2621
2621
  }
2622
- function yt(n) {
2623
- return new h(function(i, a) {
2622
+ function wt(n) {
2623
+ return new h(function(c, a) {
2624
2624
  n.transaction(function(d) {
2625
2625
  d.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'", [], function(v, f) {
2626
2626
  for (var T = [], L = 0; L < f.rows.length; L++)
2627
2627
  T.push(f.rows.item(L).name);
2628
- i({
2628
+ c({
2629
2629
  db: n,
2630
2630
  storeNames: T
2631
2631
  });
@@ -2637,8 +2637,8 @@ var at = { exports: {} };
2637
2637
  });
2638
2638
  });
2639
2639
  }
2640
- function wt(n, i) {
2641
- i = E.apply(this, arguments);
2640
+ function bt(n, c) {
2641
+ c = 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;
@@ -2647,7 +2647,7 @@ var at = { exports: {} };
2647
2647
  n.name === a.name ? T = d._dbInfo.db : T = openDatabase(n.name, "", "", 0), n.storeName ? f({
2648
2648
  db: T,
2649
2649
  storeNames: [n.storeName]
2650
- }) : f(yt(T));
2650
+ }) : f(wt(T));
2651
2651
  }).then(function(f) {
2652
2652
  return new h(function(T, L) {
2653
2653
  f.db.transaction(function(U) {
@@ -2671,23 +2671,23 @@ var at = { exports: {} };
2671
2671
  L(U);
2672
2672
  });
2673
2673
  });
2674
- }) : v = h.reject("Invalid arguments"), m(v, i), v;
2674
+ }) : v = h.reject("Invalid arguments"), m(v, c), v;
2675
2675
  }
2676
- var bt = {
2676
+ var St = {
2677
2677
  _driver: "webSQLStorage",
2678
- _initStorage: ct,
2678
+ _initStorage: ft,
2679
2679
  _support: ar(),
2680
- iterate: st,
2681
- getItem: ft,
2682
- setItem: ot,
2683
- removeItem: dt,
2684
- clear: ht,
2685
- length: mt,
2686
- key: vt,
2687
- keys: gt,
2688
- dropInstance: wt
2680
+ iterate: ot,
2681
+ getItem: st,
2682
+ setItem: dt,
2683
+ removeItem: ht,
2684
+ clear: mt,
2685
+ length: vt,
2686
+ key: gt,
2687
+ keys: yt,
2688
+ dropInstance: bt
2689
2689
  };
2690
- function St() {
2690
+ function At() {
2691
2691
  try {
2692
2692
  return typeof localStorage < "u" && "setItem" in localStorage && // in IE8 typeof localStorage.setItem === 'object'
2693
2693
  !!localStorage.setItem;
@@ -2695,11 +2695,11 @@ var at = { exports: {} };
2695
2695
  return !1;
2696
2696
  }
2697
2697
  }
2698
- function Rr(n, i) {
2698
+ function Rr(n, c) {
2699
2699
  var a = n.name + "/";
2700
- return n.storeName !== i.storeName && (a += n.storeName + "/"), a;
2700
+ return n.storeName !== c.storeName && (a += n.storeName + "/"), a;
2701
2701
  }
2702
- function At() {
2702
+ function Et() {
2703
2703
  var n = "_localforage_support_test";
2704
2704
  try {
2705
2705
  return localStorage.setItem(n, !0), localStorage.removeItem(n), !1;
@@ -2707,35 +2707,35 @@ var at = { exports: {} };
2707
2707
  return !0;
2708
2708
  }
2709
2709
  }
2710
- function Et() {
2711
- return !At() || localStorage.length > 0;
2710
+ function It() {
2711
+ return !Et() || localStorage.length > 0;
2712
2712
  }
2713
- function It(n) {
2714
- var i = this, a = {};
2713
+ function Dt(n) {
2714
+ var c = this, a = {};
2715
2715
  if (n)
2716
2716
  for (var d in n)
2717
2717
  a[d] = n[d];
2718
- return a.keyPrefix = Rr(n, i._defaultConfig), Et() ? (i._dbInfo = a, a.serializer = ur, h.resolve()) : h.reject();
2718
+ return a.keyPrefix = Rr(n, c._defaultConfig), It() ? (c._dbInfo = a, a.serializer = ur, h.resolve()) : h.reject();
2719
2719
  }
2720
- function Dt(n) {
2721
- var i = this, a = i.ready().then(function() {
2722
- for (var d = i._dbInfo.keyPrefix, v = localStorage.length - 1; v >= 0; v--) {
2720
+ function xt(n) {
2721
+ var c = this, a = c.ready().then(function() {
2722
+ for (var d = c._dbInfo.keyPrefix, v = localStorage.length - 1; v >= 0; v--) {
2723
2723
  var f = localStorage.key(v);
2724
2724
  f.indexOf(d) === 0 && localStorage.removeItem(f);
2725
2725
  }
2726
2726
  });
2727
2727
  return m(a, n), a;
2728
2728
  }
2729
- function xt(n, i) {
2729
+ function _t(n, c) {
2730
2730
  var a = this;
2731
2731
  n = r(n);
2732
2732
  var d = a.ready().then(function() {
2733
2733
  var v = a._dbInfo, f = localStorage.getItem(v.keyPrefix + n);
2734
2734
  return f && (f = v.serializer.deserialize(f)), f;
2735
2735
  });
2736
- return m(d, i), d;
2736
+ return m(d, c), d;
2737
2737
  }
2738
- function _t(n, i) {
2738
+ function Tt(n, c) {
2739
2739
  var a = this, d = a.ready().then(function() {
2740
2740
  for (var v = a._dbInfo, f = v.keyPrefix, T = f.length, L = localStorage.length, U = 1, B = 0; B < L; B++) {
2741
2741
  var k = localStorage.key(B);
@@ -2746,9 +2746,9 @@ var at = { exports: {} };
2746
2746
  }
2747
2747
  }
2748
2748
  });
2749
- return m(d, i), d;
2749
+ return m(d, c), d;
2750
2750
  }
2751
- function Tt(n, i) {
2751
+ function Ct(n, c) {
2752
2752
  var a = this, d = a.ready().then(function() {
2753
2753
  var v = a._dbInfo, f;
2754
2754
  try {
@@ -2758,11 +2758,11 @@ var at = { exports: {} };
2758
2758
  }
2759
2759
  return f && (f = f.substring(v.keyPrefix.length)), f;
2760
2760
  });
2761
- return m(d, i), d;
2761
+ return m(d, c), d;
2762
2762
  }
2763
- function Ct(n) {
2764
- var i = this, a = i.ready().then(function() {
2765
- for (var d = i._dbInfo, v = localStorage.length, f = [], T = 0; T < v; T++) {
2763
+ function Pt(n) {
2764
+ var c = this, a = c.ready().then(function() {
2765
+ for (var d = c._dbInfo, v = localStorage.length, f = [], T = 0; T < v; T++) {
2766
2766
  var L = localStorage.key(T);
2767
2767
  L.indexOf(d.keyPrefix) === 0 && f.push(L.substring(d.keyPrefix.length));
2768
2768
  }
@@ -2770,30 +2770,30 @@ var at = { exports: {} };
2770
2770
  });
2771
2771
  return m(a, n), a;
2772
2772
  }
2773
- function Pt(n) {
2774
- var i = this, a = i.keys().then(function(d) {
2773
+ function Mt(n) {
2774
+ var c = this, a = c.keys().then(function(d) {
2775
2775
  return d.length;
2776
2776
  });
2777
2777
  return m(a, n), a;
2778
2778
  }
2779
- function Mt(n, i) {
2779
+ function Lt(n, c) {
2780
2780
  var a = this;
2781
2781
  n = r(n);
2782
2782
  var d = a.ready().then(function() {
2783
2783
  var v = a._dbInfo;
2784
2784
  localStorage.removeItem(v.keyPrefix + n);
2785
2785
  });
2786
- return m(d, i), d;
2786
+ return m(d, c), d;
2787
2787
  }
2788
- function Lt(n, i, a) {
2788
+ function Nt(n, c, a) {
2789
2789
  var d = this;
2790
2790
  n = r(n);
2791
2791
  var v = d.ready().then(function() {
2792
- i === void 0 && (i = null);
2793
- var f = i;
2792
+ c === void 0 && (c = null);
2793
+ var f = c;
2794
2794
  return new h(function(T, L) {
2795
2795
  var U = d._dbInfo;
2796
- U.serializer.serialize(i, function(B, k) {
2796
+ U.serializer.serialize(c, function(B, k) {
2797
2797
  if (k)
2798
2798
  L(k);
2799
2799
  else
@@ -2807,8 +2807,8 @@ var at = { exports: {} };
2807
2807
  });
2808
2808
  return m(v, a), v;
2809
2809
  }
2810
- function Nt(n, i) {
2811
- if (i = E.apply(this, arguments), n = typeof n != "function" && n || {}, !n.name) {
2810
+ function Rt(n, c) {
2811
+ if (c = 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
  }
@@ -2820,26 +2820,26 @@ var at = { exports: {} };
2820
2820
  var L = localStorage.key(T);
2821
2821
  L.indexOf(f) === 0 && localStorage.removeItem(L);
2822
2822
  }
2823
- }) : v = h.reject("Invalid arguments"), m(v, i), v;
2823
+ }) : v = h.reject("Invalid arguments"), m(v, c), v;
2824
2824
  }
2825
- var Rt = {
2825
+ var Ut = {
2826
2826
  _driver: "localStorageWrapper",
2827
- _initStorage: It,
2828
- _support: St(),
2829
- iterate: _t,
2830
- getItem: xt,
2831
- setItem: Lt,
2832
- removeItem: Mt,
2833
- clear: Dt,
2834
- length: Pt,
2835
- key: Tt,
2836
- keys: Ct,
2837
- dropInstance: Nt
2838
- }, Ut = function(i, a) {
2839
- return i === a || typeof i == "number" && typeof a == "number" && isNaN(i) && isNaN(a);
2840
- }, Bt = function(i, a) {
2841
- for (var d = i.length, v = 0; v < d; ) {
2842
- if (Ut(i[v], a))
2827
+ _initStorage: Dt,
2828
+ _support: At(),
2829
+ iterate: Tt,
2830
+ getItem: _t,
2831
+ setItem: Nt,
2832
+ removeItem: Lt,
2833
+ clear: xt,
2834
+ length: Mt,
2835
+ key: Ct,
2836
+ keys: Pt,
2837
+ dropInstance: Rt
2838
+ }, Bt = function(c, a) {
2839
+ return c === a || typeof c == "number" && typeof a == "number" && isNaN(c) && isNaN(a);
2840
+ }, $t = function(c, a) {
2841
+ for (var d = c.length, v = 0; v < d; ) {
2842
+ if (Bt(c[v], a))
2843
2843
  return !0;
2844
2844
  v++;
2845
2845
  }
@@ -2848,11 +2848,11 @@ var at = { exports: {} };
2848
2848
  return Object.prototype.toString.call(n) === "[object Array]";
2849
2849
  }, Ge = {}, Br = {}, Be = {
2850
2850
  INDEXEDDB: nr,
2851
- WEBSQL: bt,
2852
- LOCALSTORAGE: Rt
2853
- }, $t = [Be.INDEXEDDB._driver, Be.WEBSQL._driver, Be.LOCALSTORAGE._driver], Je = ["dropInstance"], ir = ["clear", "getItem", "iterate", "key", "keys", "length", "removeItem", "setItem"].concat(Je), Ft = {
2851
+ WEBSQL: St,
2852
+ LOCALSTORAGE: Ut
2853
+ }, Ft = [Be.INDEXEDDB._driver, Be.WEBSQL._driver, Be.LOCALSTORAGE._driver], Je = ["dropInstance"], cr = ["clear", "getItem", "iterate", "key", "keys", "length", "removeItem", "setItem"].concat(Je), kt = {
2854
2854
  description: "",
2855
- driver: $t.slice(),
2855
+ driver: Ft.slice(),
2856
2856
  name: "localforage",
2857
2857
  // Default DB size is _JUST UNDER_ 5MB, as it's the highest size
2858
2858
  // we can use without a prompt.
@@ -2860,32 +2860,32 @@ var at = { exports: {} };
2860
2860
  storeName: "keyvaluepairs",
2861
2861
  version: 1
2862
2862
  };
2863
- function kt(n, i) {
2864
- n[i] = function() {
2863
+ function Gt(n, c) {
2864
+ n[c] = function() {
2865
2865
  var a = arguments;
2866
2866
  return n.ready().then(function() {
2867
- return n[i].apply(n, a);
2867
+ return n[c].apply(n, a);
2868
2868
  });
2869
2869
  };
2870
2870
  }
2871
- function cr() {
2871
+ function ir() {
2872
2872
  for (var n = 1; n < arguments.length; n++) {
2873
- var i = arguments[n];
2874
- if (i)
2875
- for (var a in i)
2876
- i.hasOwnProperty(a) && (Ur(i[a]) ? arguments[0][a] = i[a].slice() : arguments[0][a] = i[a]);
2873
+ var c = arguments[n];
2874
+ if (c)
2875
+ for (var a in c)
2876
+ c.hasOwnProperty(a) && (Ur(c[a]) ? arguments[0][a] = c[a].slice() : arguments[0][a] = c[a]);
2877
2877
  }
2878
2878
  return arguments[0];
2879
2879
  }
2880
- var Gt = function() {
2881
- function n(i) {
2882
- _(this, n);
2880
+ var Wt = function() {
2881
+ function n(c) {
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;
2886
2886
  this[a] = v, Ge[v] || this.defineDriver(d);
2887
2887
  }
2888
- this._defaultConfig = cr({}, Ft), this._config = cr({}, this._defaultConfig, i), this._driverSet = null, this._initDriver = null, this._ready = !1, this._dbInfo = null, this._wrapLibraryMethodsWithReady(), this.setDriver(this._config.driver).catch(function() {
2888
+ this._defaultConfig = ir({}, kt), this._config = ir({}, this._defaultConfig, c), this._driverSet = null, this._initDriver = null, this._ready = !1, this._dbInfo = null, this._wrapLibraryMethodsWithReady(), this.setDriver(this._config.driver).catch(function() {
2889
2889
  });
2890
2890
  }
2891
2891
  return n.prototype.config = function(a) {
@@ -2908,20 +2908,20 @@ var at = { exports: {} };
2908
2908
  L(B);
2909
2909
  return;
2910
2910
  }
2911
- for (var k = ir.concat("_initStorage"), q = 0, Z = k.length; q < Z; q++) {
2912
- var p = k[q], ee = !Bt(Je, p);
2911
+ for (var k = cr.concat("_initStorage"), q = 0, Z = k.length; q < Z; q++) {
2912
+ var p = k[q], ee = !$t(Je, p);
2913
2913
  if ((ee || a[p]) && typeof a[p] != "function") {
2914
2914
  L(B);
2915
2915
  return;
2916
2916
  }
2917
2917
  }
2918
2918
  var ue = function() {
2919
- for (var We = function(Ht) {
2919
+ for (var We = function(Vt) {
2920
2920
  return function() {
2921
- var Vt = new Error("Method " + Ht + " is not implemented by the current driver"), $r = h.reject(Vt);
2921
+ var zt = new Error("Method " + Vt + " is not implemented by the current driver"), $r = h.reject(zt);
2922
2922
  return m($r, arguments[arguments.length - 1]), $r;
2923
2923
  };
2924
- }, fr = 0, qt = Je.length; fr < qt; fr++) {
2924
+ }, fr = 0, Ht = Je.length; fr < Ht; fr++) {
2925
2925
  var sr = Je[fr];
2926
2926
  a[sr] || (a[sr] = We(sr));
2927
2927
  }
@@ -2990,7 +2990,7 @@ var at = { exports: {} };
2990
2990
  }, n.prototype.supports = function(a) {
2991
2991
  return !!Br[a];
2992
2992
  }, n.prototype._extend = function(a) {
2993
- cr(this, a);
2993
+ ir(this, a);
2994
2994
  }, n.prototype._getSupportedDrivers = function(a) {
2995
2995
  for (var d = [], v = 0, f = a.length; v < f; v++) {
2996
2996
  var T = a[v];
@@ -2998,27 +2998,27 @@ var at = { exports: {} };
2998
2998
  }
2999
2999
  return d;
3000
3000
  }, n.prototype._wrapLibraryMethodsWithReady = function() {
3001
- for (var a = 0, d = ir.length; a < d; a++)
3002
- kt(this, ir[a]);
3001
+ for (var a = 0, d = cr.length; a < d; a++)
3002
+ Gt(this, cr[a]);
3003
3003
  }, n.prototype.createInstance = function(a) {
3004
3004
  return new n(a);
3005
3005
  }, n;
3006
- }(), Wt = new Gt();
3007
- S.exports = Wt;
3006
+ }(), qt = new Wt();
3007
+ b.exports = qt;
3008
3008
  }, { 3: 3 }] }, {}, [4])(4);
3009
3009
  });
3010
- })(at);
3011
- var Cn = at.exports;
3012
- const lt = /* @__PURE__ */ en(Cn);
3010
+ })(lt);
3011
+ var Pn = lt.exports;
3012
+ const ut = /* @__PURE__ */ rn(Pn);
3013
3013
  let Qe = null;
3014
- lt.config({
3015
- name: nt()
3014
+ ut.config({
3015
+ name: at()
3016
3016
  });
3017
3017
  function me() {
3018
- const e = nt();
3019
- return (Qe == null || Qe.config.name != e) && (Qe = lt.createInstance({ name: e })), Qe;
3018
+ const e = at();
3019
+ return (Qe == null || Qe.config.name != e) && (Qe = ut.createInstance({ name: e })), Qe;
3020
3020
  }
3021
- function Sa() {
3021
+ function Ea() {
3022
3022
  async function e(o) {
3023
3023
  const g = me();
3024
3024
  (await g.keys()).filter((N) => N.startsWith(o)).forEach((N) => {
@@ -3031,30 +3031,30 @@ 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;
3045
- function Aa(e) {
3045
+ function Ia(e) {
3046
3046
  return Oe(e)();
3047
3047
  }
3048
- function ut(e) {
3048
+ function ct(e) {
3049
3049
  return Oe(e);
3050
3050
  }
3051
- function Pn(e) {
3052
- return Oe = (t) => Mn({
3051
+ function Mn(e) {
3052
+ return Oe = (t) => Ln({
3053
3053
  ...e,
3054
3054
  ...t
3055
3055
  }), Oe;
3056
3056
  }
3057
- function Mn(e) {
3057
+ function Ln(e) {
3058
3058
  if (console.log("getting store definition"), e.storeMode == null && e.nav != null && e.navigation != null) {
3059
3059
  const t = e.navigation.findItem(e.nav);
3060
3060
  e.storeMode = t == null ? void 0 : t.storeMode, e.storeName ?? (e.storeName = e.navigation.findStoreName(e.nav));
@@ -3070,9 +3070,9 @@ function Mn(e) {
3070
3070
  throw new Error("Must supply an api object to use store");
3071
3071
  return Wr({ ...e, storeName: e.storeName ?? "" });
3072
3072
  } else
3073
- return Nn({ ...e, storeName: e.storeName ?? "" });
3073
+ return Rn({ ...e, storeName: e.storeName ?? "" });
3074
3074
  }
3075
- const Ln = (e) => {
3075
+ const Nn = (e) => {
3076
3076
  let t = j(e.url) ?? void 0;
3077
3077
  if (e.additionalUrl != null && (t == null ? t = e.additionalUrl : t = Ne(t, e.additionalUrl)), e.id != null && (t != null && t.includes("{id}") ? t = t.replaceAll("{id}", e.id) : t = Ne(t, e.id)), e.params != null) {
3078
3078
  t ?? (t = "");
@@ -3083,159 +3083,158 @@ const Ln = (e) => {
3083
3083
  }
3084
3084
  return e.finalUrl = t, e.finalUrl ?? "";
3085
3085
  };
3086
- function Nn(e) {
3087
- return Xr(e.storeName, () => {
3086
+ function Rn(e) {
3087
+ return Or(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) ?? Nn;
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 i = await me().getItem(y);
3101
+ if (i != null && (e.api == null || parseFloat(i.meta.storedOn) > t - 7))
3102
+ return u.value[y] = i, i;
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 i = b.value[y];
3108
+ i == null && (i = 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] = i);
3122
+ const D = await i;
3123
+ return u.value[y] = D, D;
3124
+ } catch (i) {
3125
+ let D = i;
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);
3137
- if (c != null && (e.api == null || parseFloat(c.meta.storedOn) > t - 7))
3138
- return u.value[E] = c, c;
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 i = await me().getItem(y);
3136
+ if (i != null && (e.api == null || parseFloat(i.meta.storedOn) > t - 7))
3137
+ return u.value[y] = i, i;
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 i = b.value[y];
3143
+ i == null && (i = 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;
3160
- } catch (c) {
3161
- let x = c;
3162
- throw new Error(x.message ?? "Problem");
3156
+ }), b.value[y] = i);
3157
+ const D = await i;
3158
+ return u.value[y] = D, D;
3159
+ } catch (i) {
3160
+ let D = i;
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
- let c = await e.api.patch(r);
3172
- y = c == null ? void 0 : c.data;
3173
- } catch (c) {
3174
- let x = c;
3175
- throw new Error(x.message ?? "Patch Problem");
3170
+ let i = await e.api.patch(r);
3171
+ S = i == null ? void 0 : i.data;
3172
+ } catch (i) {
3173
+ let D = i;
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 i = u.value[y];
3180
+ i != null && (i.data = { ...i.data, ...S }, o == !0 && await me().setItem(y, {
3182
3181
  meta: { storedOn: t },
3183
- ...c
3184
- })), y.id != null && y.rowVersion != null && Object.entries(u.value).forEach((w) => {
3185
- let M = w[1];
3182
+ ...i
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
- let c = await e.api.post(r);
3205
- y = c == null ? void 0 : c.data;
3206
- } catch (c) {
3207
- let x = c;
3208
- throw new Error(x.message ?? "Patch Problem");
3203
+ let i = await e.api.post(r);
3204
+ S = i == null ? void 0 : i.data;
3205
+ } catch (i) {
3206
+ let D = i;
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;
3227
- throw new Error(c.message ?? "Patch Problem");
3221
+ let S = await e.api.deleteItem(r);
3222
+ if (S != null)
3223
+ return S;
3224
+ } catch (S) {
3225
+ let i = S;
3226
+ throw new Error(i.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 {
@@ -3251,11 +3250,11 @@ function Nn(e) {
3251
3250
  });
3252
3251
  }
3253
3252
  function Wr(e) {
3254
- 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";
3253
+ return Or(e.storeName, () => {
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
- var c;
3258
- return `${e.storeName}_${((c = e.auth) == null ? void 0 : c.credentials.value.userID) ?? "no-user-id"}`;
3256
+ var i;
3257
+ return `${e.storeName}_${((i = e.auth) == null ? void 0 : i.credentials.value.userID) ?? "no-user-id"}`;
3259
3258
  }
3260
3259
  async function $() {
3261
3260
  P == !0 && await me().setItem(N(), {
@@ -3265,47 +3264,47 @@ function Wr(e) {
3265
3264
  filters: []
3266
3265
  });
3267
3266
  }
3268
- function F(c) {
3269
- const x = N();
3270
- return _.value[x] || (_.value[x] = new Promise(async (w, M) => {
3271
- var b, C;
3267
+ function F(i) {
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
- nav: c.nav,
3274
+ nav: i.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) ?? ln()
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
- async function h(c) {
3296
- var M, b, C;
3297
- const x = N(), w = c.refresh;
3298
- if (!w && t.value != null)
3294
+ async function h(i) {
3295
+ var M, w, C;
3296
+ const D = N(), E = i.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
  };
@@ -3318,128 +3317,128 @@ function Wr(e) {
3318
3317
  };
3319
3318
  t.value ?? (t.value = []);
3320
3319
  try {
3321
- return await F(c);
3320
+ return await F(i);
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
- 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)
3326
+ async function m(i) {
3327
+ var w, C, I;
3328
+ const D = N(), E = i.id ?? ((w = i.data) == null ? void 0 : w.id);
3329
+ if (E == null)
3331
3330
  throw new Error("no id provided");
3332
- let M = c.refresh;
3331
+ let M = i.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;
3342
- let s = t.value.find((A) => A.id == c.id);
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;
3341
+ let s = t.value.find((A) => A.id == i.id);
3343
3342
  if (s != null)
3344
3343
  return { data: s };
3345
3344
  }
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 == i.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(i), { data: (I = t.value) == null ? void 0 : I.find((_) => _.id == i.id) };
3353
+ } catch (_) {
3354
+ let s = _;
3356
3355
  throw new Error(s.message ?? "Problem");
3357
3356
  }
3358
3357
  }
3359
- async function l(c) {
3360
- var w, M, b;
3361
- c.additionalUrl ?? (c.additionalUrl = "/patch");
3362
- let x;
3358
+ async function l(i) {
3359
+ var E, M, w;
3360
+ i.additionalUrl ?? (i.additionalUrl = "/patch");
3361
+ let D;
3363
3362
  if (e.api != null)
3364
3363
  try {
3365
- let C = await e.api.patch(c);
3366
- x = { ...c.data, ...C == null ? void 0 : C.data };
3364
+ let C = await e.api.patch(i);
3365
+ D = { ...i.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 = i.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 == (i.id ?? i.data.id));
3378
3377
  }
3379
- async function r(c) {
3380
- var w, M;
3381
- c.additionalUrl ?? (c.additionalUrl = "/post");
3382
- let x;
3378
+ async function r(i) {
3379
+ var E, M;
3380
+ i.additionalUrl ?? (i.additionalUrl = "/post");
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(i);
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 = i.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 == (i.id ?? i.data.id));
3394
3393
  }
3395
- async function E(c) {
3396
- var w, M;
3397
- if (c.additionalUrl ?? (c.additionalUrl = "/delete"), e.api != null)
3394
+ async function y(i) {
3395
+ var E, M;
3396
+ if (i.additionalUrl ?? (i.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(i);
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 = i.id ?? i.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;
3414
- if (c.additionalUrl ?? (c.additionalUrl = `/patch/restore?id=${c.data.id}`), e.api != null)
3411
+ async function S(i) {
3412
+ var D;
3413
+ if (i.additionalUrl ?? (i.additionalUrl = `/patch/restore?id=${i.data.id}`), e.api != null)
3415
3414
  try {
3416
- await e.api.patch(c);
3417
- } catch (w) {
3418
- let M = w;
3415
+ await e.api.patch(i);
3416
+ } catch (E) {
3417
+ let M = E;
3419
3418
  throw new Error(M.message ?? "Patch Problem");
3420
3419
  }
3421
3420
  try {
3422
- c.additionalUrl = "/getAll", await F(c);
3423
- } catch (w) {
3424
- let M = w;
3421
+ i.additionalUrl = "/getAll", await F(i);
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 == (i.id ?? i.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
- function Rn(e, t) {
3440
- const u = z(!1), S = zt(e);
3438
+ function Un(e, t) {
3439
+ const u = z(!1), b = Yt(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,32 +3449,32 @@ 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
- function Ea(e, t) {
3461
+ function Da(e, t) {
3463
3462
  var ae;
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 = pr(), P = et(), 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: i } = nt({
3471
3470
  nav: g,
3472
3471
  proxyID: $.value,
3473
- store: ut({
3474
- storeMode: S,
3472
+ store: ct({
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);
@@ -3493,17 +3492,17 @@ function Ea(e, t) {
3493
3492
  }), K = te(() => {
3494
3493
  const G = j(F);
3495
3494
  return e.onCanSave != null ? e.onCanSave(G) : !0;
3496
- }), { isChanged: Q, restartTracker: re } = Rn(F, {
3495
+ }), { isChanged: Q, restartTracker: re } = Un(F, {
3497
3496
  useTracker: e.trackChanges,
3498
3497
  propsToIgnore: e.trackIgnoreProps,
3499
3498
  propsToTrack: e.trackProps
3500
3499
  });
3501
- function ie(G) {
3500
+ function ce(G) {
3502
3501
  const {
3503
3502
  additionalUrl: X,
3504
3503
  onDeleteAsync: ne,
3505
- onDeleteSuccessAsync: fe = () => (_.back(), Promise.resolve(void 0)),
3506
- proxyID: ce
3504
+ onDeleteSuccessAsync: fe = () => (x.back(), Promise.resolve(void 0)),
3505
+ proxyID: ie
3507
3506
  } = { ...e };
3508
3507
  l({
3509
3508
  additionalUrl: X,
@@ -3511,7 +3510,7 @@ function Ea(e, t) {
3511
3510
  nav: g,
3512
3511
  onDeleteAsync: ne,
3513
3512
  onDeleteSuccessAsync: fe,
3514
- proxyID: ce
3513
+ proxyID: ie
3515
3514
  // ...params.getOptions(),
3516
3515
  //...(useBladeSrc ? bladeData.value : {}),
3517
3516
  //requireConfirmation: true
@@ -3522,15 +3521,15 @@ function Ea(e, t) {
3522
3521
  additionalUrl: X,
3523
3522
  onRestoreAsync: ne,
3524
3523
  onRestoreSuccessAsync: fe,
3525
- proxyID: ce
3524
+ proxyID: ie
3526
3525
  } = { ...e };
3527
- y({
3526
+ S({
3528
3527
  additionalUrl: X,
3529
3528
  data: G,
3530
3529
  nav: g,
3531
3530
  onRestoreAsync: ne,
3532
3531
  onRestoreSuccessAsync: fe,
3533
- proxyID: ce
3532
+ proxyID: ie
3534
3533
  // ...params.getOptions(),
3535
3534
  // ...(useBladeSrc ? bladeData.value : {}),
3536
3535
  });
@@ -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
  }
@@ -3563,16 +3562,16 @@ function Ea(e, t) {
3563
3562
  const {
3564
3563
  additionalUrl: ne,
3565
3564
  onCanSaveAsync: fe,
3566
- onGetSaveAsync: ce,
3565
+ onGetSaveAsync: ie,
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
- c({
3569
+ i({
3571
3570
  additionalUrl: ne,
3572
3571
  data: G,
3573
3572
  nav: g,
3574
3573
  onCanSaveAsync: fe,
3575
- onGetSaveAsync: ce,
3574
+ onGetSaveAsync: ie,
3576
3575
  onSaveAsync: Ee,
3577
3576
  onSaveSuccessAsync: Re,
3578
3577
  proxyID: $.value,
@@ -3585,25 +3584,25 @@ 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 });
3592
- }), Kr(async () => {
3591
+ }), Qr(async () => {
3593
3592
  var G;
3594
3593
  e.eager == !0 && await W({ deepRefresh: ((G = P == null ? void 0 : P.params) == null ? void 0 : G.refresh) == "true" });
3595
3594
  }), {
3596
3595
  asyncItem: F,
3597
- deleteItem: ie,
3598
- errorMsg: x,
3596
+ deleteItem: ce,
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,
@@ -3614,22 +3613,22 @@ function Ea(e, t) {
3614
3613
  }
3615
3614
  const qr = z(!0), Hr = z(!1), Vr = z(), mr = z(!1);
3616
3615
  let vr = null, _r;
3617
- function Un() {
3616
+ function Bn() {
3618
3617
  return _r;
3619
3618
  }
3620
- function Bn(e) {
3619
+ function $n(e) {
3621
3620
  const t = e.defaultCacheExpiryHours ?? 7;
3622
3621
  e.getDisplayName ?? (e.getDisplayName = (m) => {
3623
3622
  if (m.displayName != null)
3624
3623
  return m.displayName;
3625
3624
  if (m.name != null)
3626
- return tn(m.name.replaceAll("-", " "));
3625
+ return nn(m.name.replaceAll("-", " "));
3627
3626
  });
3628
3627
  const u = (e.navItems ?? []).map((m) => ({
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,21 +3640,21 @@ 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
- 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));
3648
+ return m == null ? null : typeof m != "string" ? m : tt(u, (r) => r.children).find((r) => {
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) {
3655
3654
  const l = P(m);
3656
3655
  if (l == null)
3657
3656
  return;
3658
- let r = vn(l.microservice ?? "default") ?? "";
3657
+ let r = gn(l.microservice ?? "default") ?? "";
3659
3658
  return l.path != null && (r = Ne(r, l.path)), r != null && r.endsWith("/") && (r = r.slice(0, r.length - 1)), r;
3660
3659
  }
3661
3660
  function $(m) {
@@ -3664,7 +3663,7 @@ function Bn(e) {
3664
3663
  return l.singleName;
3665
3664
  const r = l == null ? void 0 : l.displayName;
3666
3665
  if (r != null)
3667
- return hn(r);
3666
+ return mn(r);
3668
3667
  }
3669
3668
  function F(m) {
3670
3669
  const l = P(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,
@@ -3695,15 +3694,15 @@ function Bn(e) {
3695
3694
  updateNavigationProperties: h
3696
3695
  }, _r;
3697
3696
  }
3698
- function Ia(e, t, u) {
3697
+ function xa(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 = Dn(), o = Bn(), g = pr(), x = et(), { bladeData: P } = En({}), 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(() => Kt([
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 i = z([...S.value]);
3705
+ const D = te(() => Fr(i, S).value.length > 0 || Fr(S, i).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,28 +3739,28 @@ 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
- const { actionErrorMsg: ie, actionLoadingMsg: we, deleteItem: W, doAction: Y, getItem: H, getAllItems: ae, restoreItem: G } = tt({
3752
+ const { actionErrorMsg: ce, actionLoadingMsg: we, deleteItem: W, doAction: Y, getItem: H, getAllItems: ae, restoreItem: G } = nt({
3754
3753
  nav: F,
3755
- proxyID: b.value,
3756
- store: ut({
3754
+ proxyID: w.value,
3755
+ store: ct({
3757
3756
  storeMode: h,
3758
3757
  storageMode: m,
3759
3758
  nav: F
3760
3759
  })
3761
- }), 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(() => {
3760
+ }), X = te(() => e.errorMsg ?? ce.value), ne = te(() => e.loadingMsg ?? we.value), fe = te(() => ne.value != null), ie = 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,20 +3834,20 @@ 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() {
3848
3847
  let R = j(A);
3849
3848
  if (R = e.onFilter ? e.onFilter(R) : R, C.value != null && C.value.length > 0) {
3850
3849
  let J = [...s.value];
3851
- e.itemText && J.push(e.itemText), Te(J) && (R = R.filter((V) => on(V, C.value, J)));
3850
+ e.itemText && J.push(e.itemText), Te(J) && (R = R.filter((V) => dn(V, C.value, J)));
3852
3851
  }
3853
3852
  K.value = R;
3854
3853
  }
@@ -3857,7 +3856,7 @@ function Ia(e, t, u) {
3857
3856
  e.headers != null && (Q.value = [...e.headers], R || Q.value.push({ title: "Actions", value: "itemActions", align: "end" }));
3858
3857
  }
3859
3858
  async function Ie(R) {
3860
- if (ce.value = !1, (R == null ? void 0 : R.resetSearch) === !0 && (Ee.value = e.showSearch ?? !1, C.value = void 0), e.items != null) {
3859
+ if (ie.value = !1, (R == null ? void 0 : R.resetSearch) === !0 && (Ee.value = e.showSearch ?? !1, C.value = void 0), e.items != null) {
3861
3860
  A.value = e.onGetSuccessAsync != null ? await e.onGetSuccessAsync(e.items) : e.items;
3862
3861
  return;
3863
3862
  }
@@ -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,
@@ -3909,30 +3908,30 @@ function Ia(e, t, u) {
3909
3908
  function Ze() {
3910
3909
  Ee.value ? (Ee.value = e.showSearch ?? !1, C.value = void 0, Ie()) : Ee.value = e.showSearch ?? !0;
3911
3910
  }
3912
- return $e(), Kt([C], () => {
3911
+ return $e(), Qt([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
- ce.value = R != null || J != null;
3916
+ ie.value = R != null || J != null;
3918
3917
  }), _e(() => e.refreshToggle, () => {
3919
3918
  Ie({ deepRefresh: !0 });
3920
- }), Qr([A, () => e.items], () => {
3919
+ }), Xr([A, () => e.items], () => {
3921
3920
  Pe();
3922
- }), Kr(async () => {
3921
+ }), Qr(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
- showError: ce,
3948
- showInactive: D,
3946
+ showError: ie,
3947
+ showInactive: _,
3949
3948
  showSearch: Ee,
3950
3949
  subtitleOptions: tr,
3951
3950
  tableHeaders: Ce,
@@ -3955,15 +3954,15 @@ function Ia(e, t, u) {
3955
3954
  };
3956
3955
  }
3957
3956
  let Tr;
3958
- function Da(e) {
3957
+ function _a(e) {
3959
3958
  return Tr.usePresets(e);
3960
3959
  }
3961
- function $n(e) {
3960
+ function Fn(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
@@ -3972,151 +3971,162 @@ function $n(e) {
3972
3971
  let zr, Yr, Zr, Jr = !1;
3973
3972
  const gr = z(!1), yr = z(!1), jr = z(), Xe = z();
3974
3973
  let Cr;
3975
- function xa() {
3974
+ function Ta() {
3976
3975
  return Cr;
3977
3976
  }
3978
- function Fn() {
3979
- function e(_) {
3980
- Xe.value = _.detail, yr.value = !0;
3977
+ function kn() {
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" });
3997
3996
  }
3998
- return Qt(() => {
3997
+ return Xt(() => {
3999
3998
  zr == null && (zr = document.addEventListener("swUpdated", e, { once: !0 })), Yr == null && (Yr = navigator.serviceWorker.addEventListener("controllerchange", t)), Zr == null && (Zr = window.addEventListener("beforeinstallprompt", o));
4000
3999
  }), Cr = {
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
  }
4008
- function _a(e) {
4007
+ function Ca(e) {
4009
4008
  const t = [];
4010
- return (e == null ? void 0 : e.required) == !0 && t.push((u) => !!u || "Field is required"), (e == null ? void 0 : e.otherRules) != null && (Array.isArray(e == null ? void 0 : e.otherRules) ? t.push(...e.otherRules) : t.push(e.otherRules)), (e == null ? void 0 : e.forPassword) == !0 && (t.push((u) => !!u || "Password is required"), t.push((u) => u != null && u.length > 9 || "Password must be 10 or more characters"), t.push((u) => /^(.*[a-z].*)$/.test(u) || "Password must contain a lowercase letter"), t.push((u) => /^(.*[A-Z].*)$/.test(u) || "Password must contain an uppercase letter"), t.push((u) => /^(.*\d.*)$/.test(u) || "Password must contain a number")), (e == null ? void 0 : e.forEmail) == !0 && (t.push((u) => !!u || "Email is required"), t.push((u) => dn(u) || "Email must be valid")), t;
4009
+ return (e == null ? void 0 : e.required) == !0 && t.push((u) => !!u || "Field is required"), (e == null ? void 0 : e.otherRules) != null && (Array.isArray(e == null ? void 0 : e.otherRules) ? t.push(...e.otherRules) : t.push(e.otherRules)), (e == null ? void 0 : e.forPassword) == !0 && (t.push((u) => !!u || "Password is required"), t.push((u) => u != null && u.length > 9 || "Password must be 10 or more characters"), t.push((u) => /^(.*[a-z].*)$/.test(u) || "Password must contain a lowercase letter"), t.push((u) => /^(.*[A-Z].*)$/.test(u) || "Password must contain an uppercase letter"), t.push((u) => /^(.*\d.*)$/.test(u) || "Password must contain a number")), (e == null ? void 0 : e.forEmail) == !0 && (t.push((u) => !!u || "Email is required"), t.push((u) => hn(u) || "Email must be valid")), t;
4010
+ }
4011
+ let Kr;
4012
+ function Gn(e) {
4013
+ const t = z((e == null ? void 0 : e.default) ?? "Admin"), u = z((e == null ? void 0 : e.groups) ?? []);
4014
+ return Kr = {
4015
+ currentGroup: t,
4016
+ groupOptions: u,
4017
+ useRoutes: e == null ? void 0 : e.useRoutes
4018
+ }, Kr;
4011
4019
  }
4012
- function Ta(e) {
4020
+ function Pa(e) {
4013
4021
  return {
4014
4022
  install(t, u) {
4015
4023
  var N;
4016
- 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({
4024
+ console.log(t), e.vuetifyInstance ?? (e.vuetifyInstance = u.vuetifyInstance), In(e);
4025
+ const b = _n(), o = $n(e);
4026
+ Fn(e), (N = e.auth).demo ?? (N.demo = b), e.auth.getAuthItem = o.findItem;
4027
+ const g = wn(e.auth);
4028
+ Gn(e.menu);
4029
+ const x = vn({
4020
4030
  auth: g,
4021
4031
  findPath: o.findPath,
4022
4032
  useBearerToken: !0
4023
- }), P = Dn({
4033
+ }), P = xn({
4024
4034
  getTimeZone: () => g.timeZone.value
4025
4035
  });
4026
- Tn({
4036
+ Cn({
4027
4037
  dates: P
4028
- }), Fn(), Pn({
4029
- api: _,
4038
+ }), kn(), Mn({
4039
+ api: x,
4030
4040
  auth: g,
4031
4041
  navigation: o
4032
- }), gn(e.urls);
4042
+ }), yn(e.urls);
4033
4043
  }
4034
4044
  };
4035
4045
  }
4036
4046
  export {
4037
- ca as DataURIToBlob,
4038
- ta as addWeekday,
4047
+ sa as DataURIToBlob,
4048
+ aa as addWeekday,
4039
4049
  Ne as appendUrl,
4040
- tn as capitalizeWords,
4041
- Qn as checkImage,
4042
- cn as containsSearch,
4043
- ra as containsWeekday,
4050
+ nn as capitalizeWords,
4051
+ On as checkImage,
4052
+ fn as containsSearch,
4053
+ na as containsWeekday,
4044
4054
  Pr as copyDeep,
4045
- un as copyItemByAlphabet,
4046
- mn as createApi,
4047
- yn as createAuth,
4048
- Ta as createCore,
4049
- En as createCosmetics,
4050
- Dn as createDates,
4051
- xn as createDemo,
4052
- Tn as createFilters,
4053
- Bn as createNavigation,
4054
- Fn as createPWA,
4055
- $n as createPresets,
4056
- Nn as createSessionStoreDefinition,
4057
- Pn as createStoreBuilder,
4058
- gn as createUrl,
4055
+ cn as copyItemByAlphabet,
4056
+ vn as createApi,
4057
+ wn as createAuth,
4058
+ Pa as createCore,
4059
+ In as createCosmetics,
4060
+ xn as createDates,
4061
+ _n as createDemo,
4062
+ Cn as createFilters,
4063
+ $n as createNavigation,
4064
+ kn as createPWA,
4065
+ Fn as createPresets,
4066
+ Rn as createSessionStoreDefinition,
4067
+ Mn as createStoreBuilder,
4068
+ yn as createUrl,
4059
4069
  Wr as createWholeLastUpdateStoreDefinition,
4060
- ln as csvContains,
4061
- va as csvDefaults,
4062
- rt as deepSelect,
4063
- zn as distinct,
4064
- Yn as extensionExists,
4065
- fn as extractErrorDescription,
4066
- rn as fromCamelCase,
4067
- Zn as getAreaAround,
4068
- Jn as getAreaToLeft,
4069
- jn as getAreaToRight,
4070
- Kn as getGoogleMapsLocationLine,
4071
- Xn as getImageData,
4072
- et as getLocationLine,
4073
- la as getMinDate,
4074
- an as getMinDateString,
4075
- sn as getRandomColor,
4076
- on as hasSearch,
4077
- aa as isArrayOfLength,
4070
+ un as csvContains,
4071
+ ya as csvDefaults,
4072
+ tt as deepSelect,
4073
+ Zn as distinct,
4074
+ Jn as extensionExists,
4075
+ sn as extractErrorDescription,
4076
+ tn as fromCamelCase,
4077
+ jn as getAreaAround,
4078
+ Kn as getAreaToLeft,
4079
+ Qn as getAreaToRight,
4080
+ Xn as getGoogleMapsLocationLine,
4081
+ pn as getImageData,
4082
+ rt as getLocationLine,
4083
+ ca as getMinDate,
4084
+ ln as getMinDateString,
4085
+ on as getRandomColor,
4086
+ dn as hasSearch,
4087
+ ua as isArrayOfLength,
4078
4088
  Te as isLengthyArray,
4079
- nn as isMinDate,
4089
+ an as isMinDate,
4080
4090
  wr as nestedValue,
4081
- na as removeWeekday,
4082
- ua as roundTo,
4083
- hn as singularize,
4084
- On as toCamelCase,
4085
- fa as toCompareString,
4086
- ia as toggleCSV,
4087
- sa as twiddleThumbs,
4088
- tt as useActions,
4089
- pt as useActionsTracker,
4091
+ la as removeWeekday,
4092
+ ia as roundTo,
4093
+ mn as singularize,
4094
+ ea as toCamelCase,
4095
+ oa as toCompareString,
4096
+ fa as toggleCSV,
4097
+ da as twiddleThumbs,
4098
+ nt as useActions,
4099
+ en as useActionsTracker,
4090
4100
  Sr as useApi,
4091
- da as useAuth,
4101
+ ma as useAuth,
4092
4102
  kr as useAuthUrl,
4093
- An as useBlade,
4094
- In as useCSV,
4095
- ha as useCosmetics,
4096
- vn as useDataUrl,
4097
- ga as useDates,
4098
- nt as useDbName,
4099
- ya as useDemo,
4100
- wa as useDocumentMeta,
4101
- wn as useDraggable,
4102
- ba as useFilters,
4103
- Xt as useId,
4104
- Ea as useItem,
4105
- Ia as useList,
4106
- Sa as useLocalCache,
4107
- ma as useLocalCosmetics,
4103
+ En as useBlade,
4104
+ Dn as useCSV,
4105
+ va as useCosmetics,
4106
+ gn as useDataUrl,
4107
+ wa as useDates,
4108
+ at as useDbName,
4109
+ ba as useDemo,
4110
+ Sa as useDocumentMeta,
4111
+ bn as useDraggable,
4112
+ Aa as useFilters,
4113
+ Ot as useId,
4114
+ Da as useItem,
4115
+ xa as useList,
4116
+ Ea as useLocalCache,
4117
+ ga as useLocalCosmetics,
4108
4118
  me as useLocalDb,
4109
- Un as useNavigation,
4110
- xa as usePWA,
4111
- Da as usePresets,
4112
- Sn as useResizable,
4113
- _a as useRules,
4114
- Aa as useStore,
4115
- ut as useStoreDefinition,
4116
- Rn as useTracker,
4117
- oa as useUrls,
4118
- dn as validEmail,
4119
+ Bn as useNavigation,
4120
+ Ta as usePWA,
4121
+ _a as usePresets,
4122
+ An as useResizable,
4123
+ Ca as useRules,
4124
+ Ia as useStore,
4125
+ ct as useStoreDefinition,
4126
+ Un as useTracker,
4127
+ ha as useUrls,
4128
+ hn as validEmail,
4119
4129
  He as weekdayPairs,
4120
- ea as weekdayShortName,
4121
- pn as weekdayValue
4130
+ ta as weekdayShortName,
4131
+ ra as weekdayValue
4122
4132
  };