@qikdev/sdk 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -44,8 +44,8 @@ function Qr() {
44
44
  return !1;
45
45
  if (typeof Object.keys == "function" && Object.keys(r).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(r).length !== 0)
46
46
  return !1;
47
- var o = Object.getOwnPropertySymbols(r);
48
- if (o.length !== 1 || o[0] !== a || !Object.prototype.propertyIsEnumerable.call(r, a))
47
+ var i = Object.getOwnPropertySymbols(r);
48
+ if (i.length !== 1 || i[0] !== a || !Object.prototype.propertyIsEnumerable.call(r, a))
49
49
  return !1;
50
50
  if (typeof Object.getOwnPropertyDescriptor == "function") {
51
51
  var m = Object.getOwnPropertyDescriptor(r, a);
@@ -69,14 +69,14 @@ function Xr() {
69
69
  if (Or) return Ye;
70
70
  Or = 1;
71
71
  var e = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, a = Math.max, t = "[object Function]", n = function(p, y) {
72
- for (var w = [], v = 0; v < p.length; v += 1)
73
- w[v] = p[v];
74
- for (var u = 0; u < y.length; u += 1)
75
- w[u + p.length] = y[u];
72
+ for (var w = [], A = 0; A < p.length; A += 1)
73
+ w[A] = p[A];
74
+ for (var s = 0; s < y.length; s += 1)
75
+ w[s + p.length] = y[s];
76
76
  return w;
77
- }, o = function(p, y) {
78
- for (var w = [], v = y, u = 0; v < p.length; v += 1, u += 1)
79
- w[u] = p[v];
77
+ }, i = function(p, y) {
78
+ for (var w = [], A = y, s = 0; A < p.length; A += 1, s += 1)
79
+ w[s] = p[A];
80
80
  return w;
81
81
  }, m = function(l, p) {
82
82
  for (var y = "", w = 0; w < l.length; w += 1)
@@ -87,26 +87,26 @@ function Xr() {
87
87
  var y = this;
88
88
  if (typeof y != "function" || r.apply(y) !== t)
89
89
  throw new TypeError(e + y);
90
- for (var w = o(arguments, 1), v, u = function() {
91
- if (this instanceof v) {
92
- var c = y.apply(
90
+ for (var w = i(arguments, 1), A, s = function() {
91
+ if (this instanceof A) {
92
+ var u = y.apply(
93
93
  this,
94
94
  n(w, arguments)
95
95
  );
96
- return Object(c) === c ? c : this;
96
+ return Object(u) === u ? u : this;
97
97
  }
98
98
  return y.apply(
99
99
  p,
100
100
  n(w, arguments)
101
101
  );
102
- }, s = a(0, y.length - w.length), i = [], S = 0; S < s; S++)
103
- i[S] = "$" + S;
104
- if (v = Function("binder", "return function (" + m(i, ",") + "){ return binder.apply(this,arguments); }")(u), y.prototype) {
105
- var f = function() {
102
+ }, o = a(0, y.length - w.length), f = [], g = 0; g < o; g++)
103
+ f[g] = "$" + g;
104
+ if (A = Function("binder", "return function (" + m(f, ",") + "){ return binder.apply(this,arguments); }")(s), y.prototype) {
105
+ var c = function() {
106
106
  };
107
- f.prototype = y.prototype, v.prototype = new f(), f.prototype = null;
107
+ c.prototype = y.prototype, A.prototype = new c(), c.prototype = null;
108
108
  }
109
- return v;
109
+ return A;
110
110
  }, Ye;
111
111
  }
112
112
  var Xe, Mr;
@@ -116,44 +116,44 @@ function yr() {
116
116
  var e = Xr();
117
117
  return Xe = Function.prototype.bind || e, Xe;
118
118
  }
119
- var er, Ir;
119
+ var er, Rr;
120
120
  function et() {
121
- if (Ir) return er;
122
- Ir = 1;
121
+ if (Rr) return er;
122
+ Rr = 1;
123
123
  var e = yr();
124
124
  return er = e.call(Function.call, Object.prototype.hasOwnProperty), er;
125
125
  }
126
- var rr, kr;
126
+ var rr, Tr;
127
127
  function hr() {
128
- if (kr) return rr;
129
- kr = 1;
128
+ if (Tr) return rr;
129
+ Tr = 1;
130
130
  var e, r = SyntaxError, a = Function, t = TypeError, n = function($) {
131
131
  try {
132
132
  return a('"use strict"; return (' + $ + ").constructor;")();
133
133
  } catch {
134
134
  }
135
- }, o = Object.getOwnPropertyDescriptor;
136
- if (o)
135
+ }, i = Object.getOwnPropertyDescriptor;
136
+ if (i)
137
137
  try {
138
- o({}, "");
138
+ i({}, "");
139
139
  } catch {
140
- o = null;
140
+ i = null;
141
141
  }
142
142
  var m = function() {
143
143
  throw new t();
144
- }, l = o ? (function() {
144
+ }, l = i ? (function() {
145
145
  try {
146
146
  return arguments.callee, m;
147
147
  } catch {
148
148
  try {
149
- return o(arguments, "callee").get;
149
+ return i(arguments, "callee").get;
150
150
  } catch {
151
151
  return m;
152
152
  }
153
153
  }
154
154
  })() : m, p = Yr()(), y = Object.getPrototypeOf || function($) {
155
155
  return $.__proto__;
156
- }, w = {}, v = typeof Uint8Array > "u" ? e : y(Uint8Array), u = {
156
+ }, w = {}, A = typeof Uint8Array > "u" ? e : y(Uint8Array), s = {
157
157
  "%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
158
158
  "%Array%": Array,
159
159
  "%ArrayBuffer%": typeof ArrayBuffer > "u" ? e : ArrayBuffer,
@@ -209,7 +209,7 @@ function hr() {
209
209
  "%Symbol%": p ? Symbol : e,
210
210
  "%SyntaxError%": r,
211
211
  "%ThrowTypeError%": l,
212
- "%TypedArray%": v,
212
+ "%TypedArray%": A,
213
213
  "%TypeError%": t,
214
214
  "%Uint8Array%": typeof Uint8Array > "u" ? e : Uint8Array,
215
215
  "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? e : Uint8ClampedArray,
@@ -219,23 +219,23 @@ function hr() {
219
219
  "%WeakMap%": typeof WeakMap > "u" ? e : WeakMap,
220
220
  "%WeakRef%": typeof WeakRef > "u" ? e : WeakRef,
221
221
  "%WeakSet%": typeof WeakSet > "u" ? e : WeakSet
222
- }, s = function $(L) {
222
+ }, o = function $(N) {
223
223
  var F;
224
- if (L === "%AsyncFunction%")
224
+ if (N === "%AsyncFunction%")
225
225
  F = n("async function () {}");
226
- else if (L === "%GeneratorFunction%")
226
+ else if (N === "%GeneratorFunction%")
227
227
  F = n("function* () {}");
228
- else if (L === "%AsyncGeneratorFunction%")
228
+ else if (N === "%AsyncGeneratorFunction%")
229
229
  F = n("async function* () {}");
230
- else if (L === "%AsyncGenerator%") {
231
- var R = $("%AsyncGeneratorFunction%");
232
- R && (F = R.prototype);
233
- } else if (L === "%AsyncIteratorPrototype%") {
234
- var T = $("%AsyncGenerator%");
235
- T && (F = y(T.prototype));
230
+ else if (N === "%AsyncGenerator%") {
231
+ var I = $("%AsyncGeneratorFunction%");
232
+ I && (F = I.prototype);
233
+ } else if (N === "%AsyncIteratorPrototype%") {
234
+ var k = $("%AsyncGenerator%");
235
+ k && (F = y(k.prototype));
236
236
  }
237
- return u[L] = F, F;
238
- }, i = {
237
+ return s[N] = F, F;
238
+ }, f = {
239
239
  "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
240
240
  "%ArrayPrototype%": ["Array", "prototype"],
241
241
  "%ArrayProto_entries%": ["Array", "prototype", "entries"],
@@ -287,97 +287,97 @@ function hr() {
287
287
  "%URIErrorPrototype%": ["URIError", "prototype"],
288
288
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
289
289
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
290
- }, S = yr(), f = et(), c = S.call(Function.call, Array.prototype.concat), A = S.call(Function.apply, Array.prototype.splice), b = S.call(Function.call, String.prototype.replace), P = S.call(Function.call, String.prototype.slice), x = S.call(Function.call, RegExp.prototype.exec), k = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, N = /\\(\\)?/g, M = function(L) {
291
- var F = P(L, 0, 1), R = P(L, -1);
292
- if (F === "%" && R !== "%")
290
+ }, g = yr(), c = et(), u = g.call(Function.call, Array.prototype.concat), b = g.call(Function.apply, Array.prototype.splice), S = g.call(Function.call, String.prototype.replace), P = g.call(Function.call, String.prototype.slice), x = g.call(Function.call, RegExp.prototype.exec), T = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, L = /\\(\\)?/g, M = function(N) {
291
+ var F = P(N, 0, 1), I = P(N, -1);
292
+ if (F === "%" && I !== "%")
293
293
  throw new r("invalid intrinsic syntax, expected closing `%`");
294
- if (R === "%" && F !== "%")
294
+ if (I === "%" && F !== "%")
295
295
  throw new r("invalid intrinsic syntax, expected opening `%`");
296
- var T = [];
297
- return b(L, k, function(U, z, _, Z) {
298
- T[T.length] = _ ? b(Z, N, "$1") : z || U;
299
- }), T;
300
- }, V = function(L, F) {
301
- var R = L, T;
302
- if (f(i, R) && (T = i[R], R = "%" + T[0] + "%"), f(u, R)) {
303
- var U = u[R];
304
- if (U === w && (U = s(R)), typeof U > "u" && !F)
305
- throw new t("intrinsic " + L + " exists, but is not available. Please file an issue!");
296
+ var k = [];
297
+ return S(N, T, function(U, z, _, Z) {
298
+ k[k.length] = _ ? S(Z, L, "$1") : z || U;
299
+ }), k;
300
+ }, V = function(N, F) {
301
+ var I = N, k;
302
+ if (c(f, I) && (k = f[I], I = "%" + k[0] + "%"), c(s, I)) {
303
+ var U = s[I];
304
+ if (U === w && (U = o(I)), typeof U > "u" && !F)
305
+ throw new t("intrinsic " + N + " exists, but is not available. Please file an issue!");
306
306
  return {
307
- alias: T,
308
- name: R,
307
+ alias: k,
308
+ name: I,
309
309
  value: U
310
310
  };
311
311
  }
312
- throw new r("intrinsic " + L + " does not exist!");
312
+ throw new r("intrinsic " + N + " does not exist!");
313
313
  };
314
- return rr = function(L, F) {
315
- if (typeof L != "string" || L.length === 0)
314
+ return rr = function(N, F) {
315
+ if (typeof N != "string" || N.length === 0)
316
316
  throw new t("intrinsic name must be a non-empty string");
317
317
  if (arguments.length > 1 && typeof F != "boolean")
318
318
  throw new t('"allowMissing" argument must be a boolean');
319
- if (x(/^%?[^%]*%?$/, L) === null)
319
+ if (x(/^%?[^%]*%?$/, N) === null)
320
320
  throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
321
- var R = M(L), T = R.length > 0 ? R[0] : "", U = V("%" + T + "%", F), z = U.name, _ = U.value, Z = !1, Q = U.alias;
322
- Q && (T = Q[0], A(R, c([0, 1], Q)));
323
- for (var ne = 1, X = !0; ne < R.length; ne += 1) {
324
- var W = R[ne], ie = P(W, 0, 1), re = P(W, -1);
321
+ var I = M(N), k = I.length > 0 ? I[0] : "", U = V("%" + k + "%", F), z = U.name, _ = U.value, Z = !1, Q = U.alias;
322
+ Q && (k = Q[0], b(I, u([0, 1], Q)));
323
+ for (var ne = 1, X = !0; ne < I.length; ne += 1) {
324
+ var W = I[ne], ie = P(W, 0, 1), re = P(W, -1);
325
325
  if ((ie === '"' || ie === "'" || ie === "`" || re === '"' || re === "'" || re === "`") && ie !== re)
326
326
  throw new r("property names with quotes must have matching quotes");
327
- if ((W === "constructor" || !X) && (Z = !0), T += "." + W, z = "%" + T + "%", f(u, z))
328
- _ = u[z];
327
+ if ((W === "constructor" || !X) && (Z = !0), k += "." + W, z = "%" + k + "%", c(s, z))
328
+ _ = s[z];
329
329
  else if (_ != null) {
330
330
  if (!(W in _)) {
331
331
  if (!F)
332
- throw new t("base intrinsic for " + L + " exists, but the property is not available.");
332
+ throw new t("base intrinsic for " + N + " exists, but the property is not available.");
333
333
  return;
334
334
  }
335
- if (o && ne + 1 >= R.length) {
336
- var te = o(_, W);
335
+ if (i && ne + 1 >= I.length) {
336
+ var te = i(_, W);
337
337
  X = !!te, X && "get" in te && !("originalValue" in te.get) ? _ = te.get : _ = _[W];
338
338
  } else
339
- X = f(_, W), _ = _[W];
340
- X && !Z && (u[z] = _);
339
+ X = c(_, W), _ = _[W];
340
+ X && !Z && (s[z] = _);
341
341
  }
342
342
  }
343
343
  return _;
344
344
  }, rr;
345
345
  }
346
- var tr = { exports: {} }, Rr;
346
+ var tr = { exports: {} }, Ir;
347
347
  function rt() {
348
- return Rr || (Rr = 1, (function(e) {
349
- var r = yr(), a = hr(), t = a("%Function.prototype.apply%"), n = a("%Function.prototype.call%"), o = a("%Reflect.apply%", !0) || r.call(n, t), m = a("%Object.getOwnPropertyDescriptor%", !0), l = a("%Object.defineProperty%", !0), p = a("%Math.max%");
348
+ return Ir || (Ir = 1, (function(e) {
349
+ var r = yr(), a = hr(), t = a("%Function.prototype.apply%"), n = a("%Function.prototype.call%"), i = a("%Reflect.apply%", !0) || r.call(n, t), m = a("%Object.getOwnPropertyDescriptor%", !0), l = a("%Object.defineProperty%", !0), p = a("%Math.max%");
350
350
  if (l)
351
351
  try {
352
352
  l({}, "a", { value: 1 });
353
353
  } catch {
354
354
  l = null;
355
355
  }
356
- e.exports = function(v) {
357
- var u = o(r, n, arguments);
356
+ e.exports = function(A) {
357
+ var s = i(r, n, arguments);
358
358
  if (m && l) {
359
- var s = m(u, "length");
360
- s.configurable && l(
361
- u,
359
+ var o = m(s, "length");
360
+ o.configurable && l(
361
+ s,
362
362
  "length",
363
- { value: 1 + p(0, v.length - (arguments.length - 1)) }
363
+ { value: 1 + p(0, A.length - (arguments.length - 1)) }
364
364
  );
365
365
  }
366
- return u;
366
+ return s;
367
367
  };
368
368
  var y = function() {
369
- return o(r, t, arguments);
369
+ return i(r, t, arguments);
370
370
  };
371
371
  l ? l(e.exports, "apply", { value: y }) : e.exports.apply = y;
372
372
  })(tr)), tr.exports;
373
373
  }
374
- var ar, Tr;
374
+ var ar, kr;
375
375
  function tt() {
376
- if (Tr) return ar;
377
- Tr = 1;
376
+ if (kr) return ar;
377
+ kr = 1;
378
378
  var e = hr(), r = rt(), a = r(e("String.prototype.indexOf"));
379
- return ar = function(n, o) {
380
- var m = e(n, !!o);
379
+ return ar = function(n, i) {
380
+ var m = e(n, !!i);
381
381
  return typeof m == "function" && a(n, ".prototype.") > -1 ? r(m) : m;
382
382
  }, ar;
383
383
  }
@@ -389,24 +389,24 @@ var nr, _r;
389
389
  function ot() {
390
390
  if (_r) return nr;
391
391
  _r = 1;
392
- var e = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, a = e && r && typeof r.get == "function" ? r.get : null, t = e && Map.prototype.forEach, n = typeof Set == "function" && Set.prototype, o = Object.getOwnPropertyDescriptor && n ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, m = n && o && typeof o.get == "function" ? o.get : null, l = n && Set.prototype.forEach, p = typeof WeakMap == "function" && WeakMap.prototype, y = p ? WeakMap.prototype.has : null, w = typeof WeakSet == "function" && WeakSet.prototype, v = w ? WeakSet.prototype.has : null, u = typeof WeakRef == "function" && WeakRef.prototype, s = u ? WeakRef.prototype.deref : null, i = Boolean.prototype.valueOf, S = Object.prototype.toString, f = Function.prototype.toString, c = String.prototype.match, A = String.prototype.slice, b = String.prototype.replace, P = String.prototype.toUpperCase, x = String.prototype.toLowerCase, k = RegExp.prototype.test, N = Array.prototype.concat, M = Array.prototype.join, V = Array.prototype.slice, $ = Math.floor, L = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, F = Object.getOwnPropertySymbols, R = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, T = typeof Symbol == "function" && typeof Symbol.iterator == "object", U = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === T || !0) ? Symbol.toStringTag : null, z = Object.prototype.propertyIsEnumerable, _ = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(h) {
392
+ var e = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, a = e && r && typeof r.get == "function" ? r.get : null, t = e && Map.prototype.forEach, n = typeof Set == "function" && Set.prototype, i = Object.getOwnPropertyDescriptor && n ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, m = n && i && typeof i.get == "function" ? i.get : null, l = n && Set.prototype.forEach, p = typeof WeakMap == "function" && WeakMap.prototype, y = p ? WeakMap.prototype.has : null, w = typeof WeakSet == "function" && WeakSet.prototype, A = w ? WeakSet.prototype.has : null, s = typeof WeakRef == "function" && WeakRef.prototype, o = s ? WeakRef.prototype.deref : null, f = Boolean.prototype.valueOf, g = Object.prototype.toString, c = Function.prototype.toString, u = String.prototype.match, b = String.prototype.slice, S = String.prototype.replace, P = String.prototype.toUpperCase, x = String.prototype.toLowerCase, T = RegExp.prototype.test, L = Array.prototype.concat, M = Array.prototype.join, V = Array.prototype.slice, $ = Math.floor, N = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, F = Object.getOwnPropertySymbols, I = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, k = typeof Symbol == "function" && typeof Symbol.iterator == "object", U = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === k || !0) ? Symbol.toStringTag : null, z = Object.prototype.propertyIsEnumerable, _ = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(h) {
393
393
  return h.__proto__;
394
394
  } : null);
395
- function Z(h, g) {
396
- if (h === 1 / 0 || h === -1 / 0 || h !== h || h && h > -1e3 && h < 1e3 || k.call(/e/, g))
397
- return g;
395
+ function Z(h, v) {
396
+ if (h === 1 / 0 || h === -1 / 0 || h !== h || h && h > -1e3 && h < 1e3 || T.call(/e/, v))
397
+ return v;
398
398
  var D = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
399
399
  if (typeof h == "number") {
400
400
  var d = h < 0 ? -$(-h) : $(h);
401
401
  if (d !== h) {
402
- var E = String(d), C = A.call(g, E.length + 1);
403
- return b.call(E, D, "$&_") + "." + b.call(b.call(C, /([0-9]{3})/g, "$&_"), /_$/, "");
402
+ var E = String(d), C = b.call(v, E.length + 1);
403
+ return S.call(E, D, "$&_") + "." + S.call(S.call(C, /([0-9]{3})/g, "$&_"), /_$/, "");
404
404
  }
405
405
  }
406
- return b.call(g, D, "$&_");
406
+ return S.call(v, D, "$&_");
407
407
  }
408
408
  var Q = it, ne = Q.custom, X = se(ne) ? ne : null;
409
- nr = function h(g, D, d, E) {
409
+ nr = function h(v, D, d, E) {
410
410
  var C = D || {};
411
411
  if (J(C, "quoteStyle") && C.quoteStyle !== "single" && C.quoteStyle !== "double")
412
412
  throw new TypeError('option "quoteStyle" must be "single" or "double"');
@@ -420,31 +420,31 @@ function ot() {
420
420
  if (J(C, "numericSeparator") && typeof C.numericSeparator != "boolean")
421
421
  throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
422
422
  var ae = C.numericSeparator;
423
- if (typeof g > "u")
423
+ if (typeof v > "u")
424
424
  return "undefined";
425
- if (g === null)
425
+ if (v === null)
426
426
  return "null";
427
- if (typeof g == "boolean")
428
- return g ? "true" : "false";
429
- if (typeof g == "string")
430
- return Ce(g, C);
431
- if (typeof g == "number") {
432
- if (g === 0)
433
- return 1 / 0 / g > 0 ? "0" : "-0";
434
- var K = String(g);
435
- return ae ? Z(g, K) : K;
427
+ if (typeof v == "boolean")
428
+ return v ? "true" : "false";
429
+ if (typeof v == "string")
430
+ return Ce(v, C);
431
+ if (typeof v == "number") {
432
+ if (v === 0)
433
+ return 1 / 0 / v > 0 ? "0" : "-0";
434
+ var K = String(v);
435
+ return ae ? Z(v, K) : K;
436
436
  }
437
- if (typeof g == "bigint") {
438
- var O = String(g) + "n";
439
- return ae ? Z(g, O) : O;
437
+ if (typeof v == "bigint") {
438
+ var O = String(v) + "n";
439
+ return ae ? Z(v, O) : O;
440
440
  }
441
441
  var B = typeof C.depth > "u" ? 5 : C.depth;
442
- if (typeof d > "u" && (d = 0), d >= B && B > 0 && typeof g == "object")
443
- return re(g) ? "[Array]" : "[Object]";
444
- var j = Le(C, d);
442
+ if (typeof d > "u" && (d = 0), d >= B && B > 0 && typeof v == "object")
443
+ return re(v) ? "[Array]" : "[Object]";
444
+ var j = Ne(C, d);
445
445
  if (typeof E > "u")
446
446
  E = [];
447
- else if (xe(E, g) >= 0)
447
+ else if (xe(E, v) >= 0)
448
448
  return "[Circular]";
449
449
  function H(Me, Be, Jr) {
450
450
  if (Be && (E = V.call(E), E.push(Be)), Jr) {
@@ -455,73 +455,73 @@ function ot() {
455
455
  }
456
456
  return h(Me, C, d + 1, E);
457
457
  }
458
- if (typeof g == "function" && !ce(g)) {
459
- var Y = Ie(g), Ee = ge(g, H);
458
+ if (typeof v == "function" && !ce(v)) {
459
+ var Y = Re(v), Ee = ge(v, H);
460
460
  return "[Function" + (Y ? ": " + Y : " (anonymous)") + "]" + (Ee.length > 0 ? " { " + M.call(Ee, ", ") + " }" : "");
461
461
  }
462
- if (se(g)) {
463
- var Ar = T ? b.call(String(g), /^(Symbol\(.*\))_[^)]*$/, "$1") : R.call(g);
464
- return typeof g == "object" && !T ? le(Ar) : Ar;
462
+ if (se(v)) {
463
+ var Ar = k ? S.call(String(v), /^(Symbol\(.*\))_[^)]*$/, "$1") : I.call(v);
464
+ return typeof v == "object" && !k ? le(Ar) : Ar;
465
465
  }
466
- if (_e(g)) {
467
- for (var Fe = "<" + x.call(String(g.nodeName)), ze = g.attributes || [], $e = 0; $e < ze.length; $e++)
466
+ if (_e(v)) {
467
+ for (var Fe = "<" + x.call(String(v.nodeName)), ze = v.attributes || [], $e = 0; $e < ze.length; $e++)
468
468
  Fe += " " + ze[$e].name + "=" + W(ie(ze[$e].value), "double", C);
469
- return Fe += ">", g.childNodes && g.childNodes.length && (Fe += "..."), Fe += "</" + x.call(String(g.nodeName)) + ">", Fe;
469
+ return Fe += ">", v.childNodes && v.childNodes.length && (Fe += "..."), Fe += "</" + x.call(String(v.nodeName)) + ">", Fe;
470
470
  }
471
- if (re(g)) {
472
- if (g.length === 0)
471
+ if (re(v)) {
472
+ if (v.length === 0)
473
473
  return "[]";
474
- var We = ge(g, H);
474
+ var We = ge(v, H);
475
475
  return j && !Oe(We) ? "[" + he(We, j) + "]" : "[ " + M.call(We, ", ") + " ]";
476
476
  }
477
- if (ue(g)) {
478
- var Ke = ge(g, H);
479
- return !("cause" in Error.prototype) && "cause" in g && !z.call(g, "cause") ? "{ [" + String(g) + "] " + M.call(N.call("[cause]: " + H(g.cause), Ke), ", ") + " }" : Ke.length === 0 ? "[" + String(g) + "]" : "{ [" + String(g) + "] " + M.call(Ke, ", ") + " }";
477
+ if (ue(v)) {
478
+ var Ke = ge(v, H);
479
+ return !("cause" in Error.prototype) && "cause" in v && !z.call(v, "cause") ? "{ [" + String(v) + "] " + M.call(L.call("[cause]: " + H(v.cause), Ke), ", ") + " }" : Ke.length === 0 ? "[" + String(v) + "]" : "{ [" + String(v) + "] " + M.call(Ke, ", ") + " }";
480
480
  }
481
- if (typeof g == "object" && G) {
482
- if (X && typeof g[X] == "function" && Q)
483
- return Q(g, { depth: B - d });
484
- if (G !== "symbol" && typeof g.inspect == "function")
485
- return g.inspect();
481
+ if (typeof v == "object" && G) {
482
+ if (X && typeof v[X] == "function" && Q)
483
+ return Q(v, { depth: B - d });
484
+ if (G !== "symbol" && typeof v.inspect == "function")
485
+ return v.inspect();
486
486
  }
487
- if (ke(g)) {
487
+ if (Te(v)) {
488
488
  var br = [];
489
- return t.call(g, function(Me, Be) {
490
- br.push(H(Be, g, !0) + " => " + H(Me, g));
491
- }), we("Map", a.call(g), br, j);
489
+ return t.call(v, function(Me, Be) {
490
+ br.push(H(Be, v, !0) + " => " + H(Me, v));
491
+ }), we("Map", a.call(v), br, j);
492
492
  }
493
- if (Re(g)) {
493
+ if (Ie(v)) {
494
494
  var Sr = [];
495
- return l.call(g, function(Me) {
496
- Sr.push(H(Me, g));
497
- }), we("Set", m.call(g), Sr, j);
495
+ return l.call(v, function(Me) {
496
+ Sr.push(H(Me, v));
497
+ }), we("Set", m.call(v), Sr, j);
498
498
  }
499
- if (me(g))
499
+ if (me(v))
500
500
  return fe("WeakMap");
501
- if (Te(g))
501
+ if (ke(v))
502
502
  return fe("WeakSet");
503
- if (Pe(g))
503
+ if (Pe(v))
504
504
  return fe("WeakRef");
505
- if (de(g))
506
- return le(H(Number(g)));
507
- if (ye(g))
508
- return le(H(L.call(g)));
509
- if (pe(g))
510
- return le(i.call(g));
511
- if (oe(g))
512
- return le(H(String(g)));
513
- if (!te(g) && !ce(g)) {
514
- var He = ge(g, H), wr = _ ? _(g) === Object.prototype : g instanceof Object || g.constructor === Object, Je = g instanceof Object ? "" : "null prototype", Er = !wr && U && Object(g) === g && U in g ? A.call(ee(g), 8, -1) : Je ? "Object" : "", Hr = wr || typeof g.constructor != "function" ? "" : g.constructor.name ? g.constructor.name + " " : "", qe = Hr + (Er || Je ? "[" + M.call(N.call([], Er || [], Je || []), ": ") + "] " : "");
505
+ if (de(v))
506
+ return le(H(Number(v)));
507
+ if (ye(v))
508
+ return le(H(N.call(v)));
509
+ if (pe(v))
510
+ return le(f.call(v));
511
+ if (oe(v))
512
+ return le(H(String(v)));
513
+ if (!te(v) && !ce(v)) {
514
+ var He = ge(v, H), wr = _ ? _(v) === Object.prototype : v instanceof Object || v.constructor === Object, Je = v instanceof Object ? "" : "null prototype", Er = !wr && U && Object(v) === v && U in v ? b.call(ee(v), 8, -1) : Je ? "Object" : "", Hr = wr || typeof v.constructor != "function" ? "" : v.constructor.name ? v.constructor.name + " " : "", qe = Hr + (Er || Je ? "[" + M.call(L.call([], Er || [], Je || []), ": ") + "] " : "");
515
515
  return He.length === 0 ? qe + "{}" : j ? qe + "{" + he(He, j) + "}" : qe + "{ " + M.call(He, ", ") + " }";
516
516
  }
517
- return String(g);
517
+ return String(v);
518
518
  };
519
- function W(h, g, D) {
520
- var d = (D.quoteStyle || g) === "double" ? '"' : "'";
519
+ function W(h, v, D) {
520
+ var d = (D.quoteStyle || v) === "double" ? '"' : "'";
521
521
  return d + h + d;
522
522
  }
523
523
  function ie(h) {
524
- return b.call(String(h), /"/g, "&quot;");
524
+ return S.call(String(h), /"/g, "&quot;");
525
525
  }
526
526
  function re(h) {
527
527
  return ee(h) === "[object Array]" && (!U || !(typeof h == "object" && U in h));
@@ -545,23 +545,23 @@ function ot() {
545
545
  return ee(h) === "[object Boolean]" && (!U || !(typeof h == "object" && U in h));
546
546
  }
547
547
  function se(h) {
548
- if (T)
548
+ if (k)
549
549
  return h && typeof h == "object" && h instanceof Symbol;
550
550
  if (typeof h == "symbol")
551
551
  return !0;
552
- if (!h || typeof h != "object" || !R)
552
+ if (!h || typeof h != "object" || !I)
553
553
  return !1;
554
554
  try {
555
- return R.call(h), !0;
555
+ return I.call(h), !0;
556
556
  } catch {
557
557
  }
558
558
  return !1;
559
559
  }
560
560
  function ye(h) {
561
- if (!h || typeof h != "object" || !L)
561
+ if (!h || typeof h != "object" || !N)
562
562
  return !1;
563
563
  try {
564
- return L.call(h), !0;
564
+ return N.call(h), !0;
565
565
  } catch {
566
566
  }
567
567
  return !1;
@@ -569,27 +569,27 @@ function ot() {
569
569
  var Se = Object.prototype.hasOwnProperty || function(h) {
570
570
  return h in this;
571
571
  };
572
- function J(h, g) {
573
- return Se.call(h, g);
572
+ function J(h, v) {
573
+ return Se.call(h, v);
574
574
  }
575
575
  function ee(h) {
576
- return S.call(h);
576
+ return g.call(h);
577
577
  }
578
- function Ie(h) {
578
+ function Re(h) {
579
579
  if (h.name)
580
580
  return h.name;
581
- var g = c.call(f.call(h), /^function\s*([\w$]+)/);
582
- return g ? g[1] : null;
581
+ var v = u.call(c.call(h), /^function\s*([\w$]+)/);
582
+ return v ? v[1] : null;
583
583
  }
584
- function xe(h, g) {
584
+ function xe(h, v) {
585
585
  if (h.indexOf)
586
- return h.indexOf(g);
586
+ return h.indexOf(v);
587
587
  for (var D = 0, d = h.length; D < d; D++)
588
- if (h[D] === g)
588
+ if (h[D] === v)
589
589
  return D;
590
590
  return -1;
591
591
  }
592
- function ke(h) {
592
+ function Te(h) {
593
593
  if (!a || !h || typeof h != "object")
594
594
  return !1;
595
595
  try {
@@ -610,7 +610,7 @@ function ot() {
610
610
  try {
611
611
  y.call(h, y);
612
612
  try {
613
- v.call(h, v);
613
+ A.call(h, A);
614
614
  } catch {
615
615
  return !0;
616
616
  }
@@ -620,15 +620,15 @@ function ot() {
620
620
  return !1;
621
621
  }
622
622
  function Pe(h) {
623
- if (!s || !h || typeof h != "object")
623
+ if (!o || !h || typeof h != "object")
624
624
  return !1;
625
625
  try {
626
- return s.call(h), !0;
626
+ return o.call(h), !0;
627
627
  } catch {
628
628
  }
629
629
  return !1;
630
630
  }
631
- function Re(h) {
631
+ function Ie(h) {
632
632
  if (!m || !h || typeof h != "object")
633
633
  return !1;
634
634
  try {
@@ -643,11 +643,11 @@ function ot() {
643
643
  }
644
644
  return !1;
645
645
  }
646
- function Te(h) {
647
- if (!v || !h || typeof h != "object")
646
+ function ke(h) {
647
+ if (!A || !h || typeof h != "object")
648
648
  return !1;
649
649
  try {
650
- v.call(h, v);
650
+ A.call(h, A);
651
651
  try {
652
652
  y.call(h, y);
653
653
  } catch {
@@ -661,23 +661,23 @@ function ot() {
661
661
  function _e(h) {
662
662
  return !h || typeof h != "object" ? !1 : typeof HTMLElement < "u" && h instanceof HTMLElement ? !0 : typeof h.nodeName == "string" && typeof h.getAttribute == "function";
663
663
  }
664
- function Ce(h, g) {
665
- if (h.length > g.maxStringLength) {
666
- var D = h.length - g.maxStringLength, d = "... " + D + " more character" + (D > 1 ? "s" : "");
667
- return Ce(A.call(h, 0, g.maxStringLength), g) + d;
664
+ function Ce(h, v) {
665
+ if (h.length > v.maxStringLength) {
666
+ var D = h.length - v.maxStringLength, d = "... " + D + " more character" + (D > 1 ? "s" : "");
667
+ return Ce(b.call(h, 0, v.maxStringLength), v) + d;
668
668
  }
669
- var E = b.call(b.call(h, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Ne);
670
- return W(E, "single", g);
669
+ var E = S.call(S.call(h, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Le);
670
+ return W(E, "single", v);
671
671
  }
672
- function Ne(h) {
673
- var g = h.charCodeAt(0), D = {
672
+ function Le(h) {
673
+ var v = h.charCodeAt(0), D = {
674
674
  8: "b",
675
675
  9: "t",
676
676
  10: "n",
677
677
  12: "f",
678
678
  13: "r"
679
- }[g];
680
- return D ? "\\" + D : "\\x" + (g < 16 ? "0" : "") + P.call(g.toString(16));
679
+ }[v];
680
+ return D ? "\\" + D : "\\x" + (v < 16 ? "0" : "") + P.call(v.toString(16));
681
681
  }
682
682
  function le(h) {
683
683
  return "Object(" + h + ")";
@@ -685,18 +685,18 @@ function ot() {
685
685
  function fe(h) {
686
686
  return h + " { ? }";
687
687
  }
688
- function we(h, g, D, d) {
688
+ function we(h, v, D, d) {
689
689
  var E = d ? he(D, d) : M.call(D, ", ");
690
- return h + " (" + g + ") {" + E + "}";
690
+ return h + " (" + v + ") {" + E + "}";
691
691
  }
692
692
  function Oe(h) {
693
- for (var g = 0; g < h.length; g++)
694
- if (xe(h[g], `
693
+ for (var v = 0; v < h.length; v++)
694
+ if (xe(h[v], `
695
695
  `) >= 0)
696
696
  return !1;
697
697
  return !0;
698
698
  }
699
- function Le(h, g) {
699
+ function Ne(h, v) {
700
700
  var D;
701
701
  if (h.indent === " ")
702
702
  D = " ";
@@ -706,99 +706,99 @@ function ot() {
706
706
  return null;
707
707
  return {
708
708
  base: D,
709
- prev: M.call(Array(g + 1), D)
709
+ prev: M.call(Array(v + 1), D)
710
710
  };
711
711
  }
712
- function he(h, g) {
712
+ function he(h, v) {
713
713
  if (h.length === 0)
714
714
  return "";
715
715
  var D = `
716
- ` + g.prev + g.base;
716
+ ` + v.prev + v.base;
717
717
  return D + M.call(h, "," + D) + `
718
- ` + g.prev;
718
+ ` + v.prev;
719
719
  }
720
- function ge(h, g) {
720
+ function ge(h, v) {
721
721
  var D = re(h), d = [];
722
722
  if (D) {
723
723
  d.length = h.length;
724
724
  for (var E = 0; E < h.length; E++)
725
- d[E] = J(h, E) ? g(h[E], h) : "";
725
+ d[E] = J(h, E) ? v(h[E], h) : "";
726
726
  }
727
727
  var C = typeof F == "function" ? F(h) : [], G;
728
- if (T) {
728
+ if (k) {
729
729
  G = {};
730
730
  for (var ae = 0; ae < C.length; ae++)
731
731
  G["$" + C[ae]] = C[ae];
732
732
  }
733
733
  for (var K in h)
734
- J(h, K) && (D && String(Number(K)) === K && K < h.length || T && G["$" + K] instanceof Symbol || (k.call(/[^\w$]/, K) ? d.push(g(K, h) + ": " + g(h[K], h)) : d.push(K + ": " + g(h[K], h))));
734
+ J(h, K) && (D && String(Number(K)) === K && K < h.length || k && G["$" + K] instanceof Symbol || (T.call(/[^\w$]/, K) ? d.push(v(K, h) + ": " + v(h[K], h)) : d.push(K + ": " + v(h[K], h))));
735
735
  if (typeof F == "function")
736
736
  for (var O = 0; O < C.length; O++)
737
- z.call(h, C[O]) && d.push("[" + g(C[O]) + "]: " + g(h[C[O]], h));
737
+ z.call(h, C[O]) && d.push("[" + v(C[O]) + "]: " + v(h[C[O]], h));
738
738
  return d;
739
739
  }
740
740
  return nr;
741
741
  }
742
- var ir, Nr;
742
+ var ir, Lr;
743
743
  function st() {
744
- if (Nr) return ir;
745
- Nr = 1;
746
- var e = hr(), r = tt(), a = /* @__PURE__ */ ot(), t = e("%TypeError%"), n = e("%WeakMap%", !0), o = e("%Map%", !0), m = r("WeakMap.prototype.get", !0), l = r("WeakMap.prototype.set", !0), p = r("WeakMap.prototype.has", !0), y = r("Map.prototype.get", !0), w = r("Map.prototype.set", !0), v = r("Map.prototype.has", !0), u = function(f, c) {
747
- for (var A = f, b; (b = A.next) !== null; A = b)
748
- if (b.key === c)
749
- return A.next = b.next, b.next = f.next, f.next = b, b;
750
- }, s = function(f, c) {
751
- var A = u(f, c);
752
- return A && A.value;
753
- }, i = function(f, c, A) {
754
- var b = u(f, c);
755
- b ? b.value = A : f.next = {
744
+ if (Lr) return ir;
745
+ Lr = 1;
746
+ var e = hr(), r = tt(), a = /* @__PURE__ */ ot(), t = e("%TypeError%"), n = e("%WeakMap%", !0), i = e("%Map%", !0), m = r("WeakMap.prototype.get", !0), l = r("WeakMap.prototype.set", !0), p = r("WeakMap.prototype.has", !0), y = r("Map.prototype.get", !0), w = r("Map.prototype.set", !0), A = r("Map.prototype.has", !0), s = function(c, u) {
747
+ for (var b = c, S; (S = b.next) !== null; b = S)
748
+ if (S.key === u)
749
+ return b.next = S.next, S.next = c.next, c.next = S, S;
750
+ }, o = function(c, u) {
751
+ var b = s(c, u);
752
+ return b && b.value;
753
+ }, f = function(c, u, b) {
754
+ var S = s(c, u);
755
+ S ? S.value = b : c.next = {
756
756
  // eslint-disable-line no-param-reassign
757
- key: c,
758
- next: f.next,
759
- value: A
757
+ key: u,
758
+ next: c.next,
759
+ value: b
760
760
  };
761
- }, S = function(f, c) {
762
- return !!u(f, c);
761
+ }, g = function(c, u) {
762
+ return !!s(c, u);
763
763
  };
764
764
  return ir = function() {
765
- var c, A, b, P = {
765
+ var u, b, S, P = {
766
766
  assert: function(x) {
767
767
  if (!P.has(x))
768
768
  throw new t("Side channel does not contain " + a(x));
769
769
  },
770
770
  get: function(x) {
771
771
  if (n && x && (typeof x == "object" || typeof x == "function")) {
772
- if (c)
773
- return m(c, x);
774
- } else if (o) {
775
- if (A)
776
- return y(A, x);
777
- } else if (b)
778
- return s(b, x);
772
+ if (u)
773
+ return m(u, x);
774
+ } else if (i) {
775
+ if (b)
776
+ return y(b, x);
777
+ } else if (S)
778
+ return o(S, x);
779
779
  },
780
780
  has: function(x) {
781
781
  if (n && x && (typeof x == "object" || typeof x == "function")) {
782
- if (c)
783
- return p(c, x);
784
- } else if (o) {
785
- if (A)
786
- return v(A, x);
787
- } else if (b)
788
- return S(b, x);
782
+ if (u)
783
+ return p(u, x);
784
+ } else if (i) {
785
+ if (b)
786
+ return A(b, x);
787
+ } else if (S)
788
+ return g(S, x);
789
789
  return !1;
790
790
  },
791
- set: function(x, k) {
792
- n && x && (typeof x == "object" || typeof x == "function") ? (c || (c = new n()), l(c, x, k)) : o ? (A || (A = new o()), w(A, x, k)) : (b || (b = { key: {}, next: null }), i(b, x, k));
791
+ set: function(x, T) {
792
+ n && x && (typeof x == "object" || typeof x == "function") ? (u || (u = new n()), l(u, x, T)) : i ? (b || (b = new i()), w(b, x, T)) : (S || (S = { key: {}, next: null }), f(S, x, T));
793
793
  }
794
794
  };
795
795
  return P;
796
796
  }, ir;
797
797
  }
798
- var or, Lr;
798
+ var or, Nr;
799
799
  function gr() {
800
- if (Lr) return or;
801
- Lr = 1;
800
+ if (Nr) return or;
801
+ Nr = 1;
802
802
  var e = String.prototype.replace, r = /%20/g, a = {
803
803
  RFC1738: "RFC1738",
804
804
  RFC3986: "RFC3986"
@@ -822,120 +822,120 @@ function Wr() {
822
822
  if (Fr) return sr;
823
823
  Fr = 1;
824
824
  var e = gr(), r = Object.prototype.hasOwnProperty, a = Array.isArray, t = (function() {
825
- for (var S = [], f = 0; f < 256; ++f)
826
- S.push("%" + ((f < 16 ? "0" : "") + f.toString(16)).toUpperCase());
827
- return S;
828
- })(), n = function(f) {
829
- for (; f.length > 1; ) {
830
- var c = f.pop(), A = c.obj[c.prop];
831
- if (a(A)) {
832
- for (var b = [], P = 0; P < A.length; ++P)
833
- typeof A[P] < "u" && b.push(A[P]);
834
- c.obj[c.prop] = b;
825
+ for (var g = [], c = 0; c < 256; ++c)
826
+ g.push("%" + ((c < 16 ? "0" : "") + c.toString(16)).toUpperCase());
827
+ return g;
828
+ })(), n = function(c) {
829
+ for (; c.length > 1; ) {
830
+ var u = c.pop(), b = u.obj[u.prop];
831
+ if (a(b)) {
832
+ for (var S = [], P = 0; P < b.length; ++P)
833
+ typeof b[P] < "u" && S.push(b[P]);
834
+ u.obj[u.prop] = S;
835
835
  }
836
836
  }
837
- }, o = function(f, c) {
838
- for (var A = c && c.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, b = 0; b < f.length; ++b)
839
- typeof f[b] < "u" && (A[b] = f[b]);
840
- return A;
841
- }, m = function S(f, c, A) {
842
- if (!c)
843
- return f;
844
- if (typeof c != "object") {
845
- if (a(f))
846
- f.push(c);
847
- else if (f && typeof f == "object")
848
- (A && (A.plainObjects || A.allowPrototypes) || !r.call(Object.prototype, c)) && (f[c] = !0);
837
+ }, i = function(c, u) {
838
+ for (var b = u && u.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, S = 0; S < c.length; ++S)
839
+ typeof c[S] < "u" && (b[S] = c[S]);
840
+ return b;
841
+ }, m = function g(c, u, b) {
842
+ if (!u)
843
+ return c;
844
+ if (typeof u != "object") {
845
+ if (a(c))
846
+ c.push(u);
847
+ else if (c && typeof c == "object")
848
+ (b && (b.plainObjects || b.allowPrototypes) || !r.call(Object.prototype, u)) && (c[u] = !0);
849
849
  else
850
- return [f, c];
851
- return f;
850
+ return [c, u];
851
+ return c;
852
852
  }
853
- if (!f || typeof f != "object")
854
- return [f].concat(c);
855
- var b = f;
856
- return a(f) && !a(c) && (b = o(f, A)), a(f) && a(c) ? (c.forEach(function(P, x) {
857
- if (r.call(f, x)) {
858
- var k = f[x];
859
- k && typeof k == "object" && P && typeof P == "object" ? f[x] = S(k, P, A) : f.push(P);
853
+ if (!c || typeof c != "object")
854
+ return [c].concat(u);
855
+ var S = c;
856
+ return a(c) && !a(u) && (S = i(c, b)), a(c) && a(u) ? (u.forEach(function(P, x) {
857
+ if (r.call(c, x)) {
858
+ var T = c[x];
859
+ T && typeof T == "object" && P && typeof P == "object" ? c[x] = g(T, P, b) : c.push(P);
860
860
  } else
861
- f[x] = P;
862
- }), f) : Object.keys(c).reduce(function(P, x) {
863
- var k = c[x];
864
- return r.call(P, x) ? P[x] = S(P[x], k, A) : P[x] = k, P;
865
- }, b);
866
- }, l = function(f, c) {
867
- return Object.keys(c).reduce(function(A, b) {
868
- return A[b] = c[b], A;
869
- }, f);
870
- }, p = function(S, f, c) {
871
- var A = S.replace(/\+/g, " ");
872
- if (c === "iso-8859-1")
873
- return A.replace(/%[0-9a-f]{2}/gi, unescape);
861
+ c[x] = P;
862
+ }), c) : Object.keys(u).reduce(function(P, x) {
863
+ var T = u[x];
864
+ return r.call(P, x) ? P[x] = g(P[x], T, b) : P[x] = T, P;
865
+ }, S);
866
+ }, l = function(c, u) {
867
+ return Object.keys(u).reduce(function(b, S) {
868
+ return b[S] = u[S], b;
869
+ }, c);
870
+ }, p = function(g, c, u) {
871
+ var b = g.replace(/\+/g, " ");
872
+ if (u === "iso-8859-1")
873
+ return b.replace(/%[0-9a-f]{2}/gi, unescape);
874
874
  try {
875
- return decodeURIComponent(A);
875
+ return decodeURIComponent(b);
876
876
  } catch {
877
- return A;
877
+ return b;
878
878
  }
879
- }, y = function(f, c, A, b, P) {
880
- if (f.length === 0)
881
- return f;
882
- var x = f;
883
- if (typeof f == "symbol" ? x = Symbol.prototype.toString.call(f) : typeof f != "string" && (x = String(f)), A === "iso-8859-1")
879
+ }, y = function(c, u, b, S, P) {
880
+ if (c.length === 0)
881
+ return c;
882
+ var x = c;
883
+ if (typeof c == "symbol" ? x = Symbol.prototype.toString.call(c) : typeof c != "string" && (x = String(c)), b === "iso-8859-1")
884
884
  return escape(x).replace(/%u[0-9a-f]{4}/gi, function(V) {
885
885
  return "%26%23" + parseInt(V.slice(2), 16) + "%3B";
886
886
  });
887
- for (var k = "", N = 0; N < x.length; ++N) {
888
- var M = x.charCodeAt(N);
887
+ for (var T = "", L = 0; L < x.length; ++L) {
888
+ var M = x.charCodeAt(L);
889
889
  if (M === 45 || M === 46 || M === 95 || M === 126 || M >= 48 && M <= 57 || M >= 65 && M <= 90 || M >= 97 && M <= 122 || P === e.RFC1738 && (M === 40 || M === 41)) {
890
- k += x.charAt(N);
890
+ T += x.charAt(L);
891
891
  continue;
892
892
  }
893
893
  if (M < 128) {
894
- k = k + t[M];
894
+ T = T + t[M];
895
895
  continue;
896
896
  }
897
897
  if (M < 2048) {
898
- k = k + (t[192 | M >> 6] + t[128 | M & 63]);
898
+ T = T + (t[192 | M >> 6] + t[128 | M & 63]);
899
899
  continue;
900
900
  }
901
901
  if (M < 55296 || M >= 57344) {
902
- k = k + (t[224 | M >> 12] + t[128 | M >> 6 & 63] + t[128 | M & 63]);
902
+ T = T + (t[224 | M >> 12] + t[128 | M >> 6 & 63] + t[128 | M & 63]);
903
903
  continue;
904
904
  }
905
- N += 1, M = 65536 + ((M & 1023) << 10 | x.charCodeAt(N) & 1023), k += t[240 | M >> 18] + t[128 | M >> 12 & 63] + t[128 | M >> 6 & 63] + t[128 | M & 63];
905
+ L += 1, M = 65536 + ((M & 1023) << 10 | x.charCodeAt(L) & 1023), T += t[240 | M >> 18] + t[128 | M >> 12 & 63] + t[128 | M >> 6 & 63] + t[128 | M & 63];
906
906
  }
907
- return k;
908
- }, w = function(f) {
909
- for (var c = [{ obj: { o: f }, prop: "o" }], A = [], b = 0; b < c.length; ++b)
910
- for (var P = c[b], x = P.obj[P.prop], k = Object.keys(x), N = 0; N < k.length; ++N) {
911
- var M = k[N], V = x[M];
912
- typeof V == "object" && V !== null && A.indexOf(V) === -1 && (c.push({ obj: x, prop: M }), A.push(V));
907
+ return T;
908
+ }, w = function(c) {
909
+ for (var u = [{ obj: { o: c }, prop: "o" }], b = [], S = 0; S < u.length; ++S)
910
+ for (var P = u[S], x = P.obj[P.prop], T = Object.keys(x), L = 0; L < T.length; ++L) {
911
+ var M = T[L], V = x[M];
912
+ typeof V == "object" && V !== null && b.indexOf(V) === -1 && (u.push({ obj: x, prop: M }), b.push(V));
913
913
  }
914
- return n(c), f;
915
- }, v = function(f) {
916
- return Object.prototype.toString.call(f) === "[object RegExp]";
917
- }, u = function(f) {
918
- return !f || typeof f != "object" ? !1 : !!(f.constructor && f.constructor.isBuffer && f.constructor.isBuffer(f));
919
- }, s = function(f, c) {
920
- return [].concat(f, c);
921
- }, i = function(f, c) {
922
- if (a(f)) {
923
- for (var A = [], b = 0; b < f.length; b += 1)
924
- A.push(c(f[b]));
925
- return A;
914
+ return n(u), c;
915
+ }, A = function(c) {
916
+ return Object.prototype.toString.call(c) === "[object RegExp]";
917
+ }, s = function(c) {
918
+ return !c || typeof c != "object" ? !1 : !!(c.constructor && c.constructor.isBuffer && c.constructor.isBuffer(c));
919
+ }, o = function(c, u) {
920
+ return [].concat(c, u);
921
+ }, f = function(c, u) {
922
+ if (a(c)) {
923
+ for (var b = [], S = 0; S < c.length; S += 1)
924
+ b.push(u(c[S]));
925
+ return b;
926
926
  }
927
- return c(f);
927
+ return u(c);
928
928
  };
929
929
  return sr = {
930
- arrayToObject: o,
930
+ arrayToObject: i,
931
931
  assign: l,
932
- combine: s,
932
+ combine: o,
933
933
  compact: w,
934
934
  decode: p,
935
935
  encode: y,
936
- isBuffer: u,
937
- isRegExp: v,
938
- maybeMap: i,
936
+ isBuffer: s,
937
+ isRegExp: A,
938
+ maybeMap: f,
939
939
  merge: m
940
940
  }, sr;
941
941
  }
@@ -944,19 +944,19 @@ function ut() {
944
944
  if (Ur) return ur;
945
945
  Ur = 1;
946
946
  var e = st(), r = Wr(), a = gr(), t = Object.prototype.hasOwnProperty, n = {
947
- brackets: function(c) {
948
- return c + "[]";
947
+ brackets: function(u) {
948
+ return u + "[]";
949
949
  },
950
950
  comma: "comma",
951
- indices: function(c, A) {
952
- return c + "[" + A + "]";
951
+ indices: function(u, b) {
952
+ return u + "[" + b + "]";
953
953
  },
954
- repeat: function(c) {
955
- return c;
954
+ repeat: function(u) {
955
+ return u;
956
956
  }
957
- }, o = Array.isArray, m = String.prototype.split, l = Array.prototype.push, p = function(f, c) {
958
- l.apply(f, o(c) ? c : [c]);
959
- }, y = Date.prototype.toISOString, w = a.default, v = {
957
+ }, i = Array.isArray, m = String.prototype.split, l = Array.prototype.push, p = function(c, u) {
958
+ l.apply(c, i(u) ? u : [u]);
959
+ }, y = Date.prototype.toISOString, w = a.default, A = {
960
960
  addQueryPrefix: !1,
961
961
  allowDots: !1,
962
962
  charset: "utf-8",
@@ -969,150 +969,150 @@ function ut() {
969
969
  formatter: a.formatters[w],
970
970
  // deprecated
971
971
  indices: !1,
972
- serializeDate: function(c) {
973
- return y.call(c);
972
+ serializeDate: function(u) {
973
+ return y.call(u);
974
974
  },
975
975
  skipNulls: !1,
976
976
  strictNullHandling: !1
977
- }, u = function(c) {
978
- return typeof c == "string" || typeof c == "number" || typeof c == "boolean" || typeof c == "symbol" || typeof c == "bigint";
979
- }, s = {}, i = function f(c, A, b, P, x, k, N, M, V, $, L, F, R, T, U, z) {
980
- for (var _ = c, Z = z, Q = 0, ne = !1; (Z = Z.get(s)) !== void 0 && !ne; ) {
981
- var X = Z.get(c);
977
+ }, s = function(u) {
978
+ return typeof u == "string" || typeof u == "number" || typeof u == "boolean" || typeof u == "symbol" || typeof u == "bigint";
979
+ }, o = {}, f = function c(u, b, S, P, x, T, L, M, V, $, N, F, I, k, U, z) {
980
+ for (var _ = u, Z = z, Q = 0, ne = !1; (Z = Z.get(o)) !== void 0 && !ne; ) {
981
+ var X = Z.get(u);
982
982
  if (Q += 1, typeof X < "u") {
983
983
  if (X === Q)
984
984
  throw new RangeError("Cyclic object value");
985
985
  ne = !0;
986
986
  }
987
- typeof Z.get(s) > "u" && (Q = 0);
987
+ typeof Z.get(o) > "u" && (Q = 0);
988
988
  }
989
- if (typeof M == "function" ? _ = M(A, _) : _ instanceof Date ? _ = L(_) : b === "comma" && o(_) && (_ = r.maybeMap(_, function(ee) {
990
- return ee instanceof Date ? L(ee) : ee;
989
+ if (typeof M == "function" ? _ = M(b, _) : _ instanceof Date ? _ = N(_) : S === "comma" && i(_) && (_ = r.maybeMap(_, function(ee) {
990
+ return ee instanceof Date ? N(ee) : ee;
991
991
  })), _ === null) {
992
992
  if (x)
993
- return N && !T ? N(A, v.encoder, U, "key", F) : A;
993
+ return L && !k ? L(b, A.encoder, U, "key", F) : b;
994
994
  _ = "";
995
995
  }
996
- if (u(_) || r.isBuffer(_)) {
997
- if (N) {
998
- var W = T ? A : N(A, v.encoder, U, "key", F);
999
- if (b === "comma" && T) {
996
+ if (s(_) || r.isBuffer(_)) {
997
+ if (L) {
998
+ var W = k ? b : L(b, A.encoder, U, "key", F);
999
+ if (S === "comma" && k) {
1000
1000
  for (var ie = m.call(String(_), ","), re = "", te = 0; te < ie.length; ++te)
1001
- re += (te === 0 ? "" : ",") + R(N(ie[te], v.encoder, U, "value", F));
1002
- return [R(W) + (P && o(_) && ie.length === 1 ? "[]" : "") + "=" + re];
1001
+ re += (te === 0 ? "" : ",") + I(L(ie[te], A.encoder, U, "value", F));
1002
+ return [I(W) + (P && i(_) && ie.length === 1 ? "[]" : "") + "=" + re];
1003
1003
  }
1004
- return [R(W) + "=" + R(N(_, v.encoder, U, "value", F))];
1004
+ return [I(W) + "=" + I(L(_, A.encoder, U, "value", F))];
1005
1005
  }
1006
- return [R(A) + "=" + R(String(_))];
1006
+ return [I(b) + "=" + I(String(_))];
1007
1007
  }
1008
1008
  var ce = [];
1009
1009
  if (typeof _ > "u")
1010
1010
  return ce;
1011
1011
  var ue;
1012
- if (b === "comma" && o(_))
1012
+ if (S === "comma" && i(_))
1013
1013
  ue = [{ value: _.length > 0 ? _.join(",") || null : void 0 }];
1014
- else if (o(M))
1014
+ else if (i(M))
1015
1015
  ue = M;
1016
1016
  else {
1017
1017
  var oe = Object.keys(_);
1018
1018
  ue = V ? oe.sort(V) : oe;
1019
1019
  }
1020
- for (var de = P && o(_) && _.length === 1 ? A + "[]" : A, pe = 0; pe < ue.length; ++pe) {
1020
+ for (var de = P && i(_) && _.length === 1 ? b + "[]" : b, pe = 0; pe < ue.length; ++pe) {
1021
1021
  var se = ue[pe], ye = typeof se == "object" && typeof se.value < "u" ? se.value : _[se];
1022
- if (!(k && ye === null)) {
1023
- var Se = o(_) ? typeof b == "function" ? b(de, se) : de : de + ($ ? "." + se : "[" + se + "]");
1024
- z.set(c, Q);
1022
+ if (!(T && ye === null)) {
1023
+ var Se = i(_) ? typeof S == "function" ? S(de, se) : de : de + ($ ? "." + se : "[" + se + "]");
1024
+ z.set(u, Q);
1025
1025
  var J = e();
1026
- J.set(s, z), p(ce, f(
1026
+ J.set(o, z), p(ce, c(
1027
1027
  ye,
1028
1028
  Se,
1029
- b,
1029
+ S,
1030
1030
  P,
1031
1031
  x,
1032
- k,
1033
- N,
1032
+ T,
1033
+ L,
1034
1034
  M,
1035
1035
  V,
1036
1036
  $,
1037
- L,
1037
+ N,
1038
1038
  F,
1039
- R,
1040
- T,
1039
+ I,
1040
+ k,
1041
1041
  U,
1042
1042
  J
1043
1043
  ));
1044
1044
  }
1045
1045
  }
1046
1046
  return ce;
1047
- }, S = function(c) {
1048
- if (!c)
1049
- return v;
1050
- if (c.encoder !== null && typeof c.encoder < "u" && typeof c.encoder != "function")
1047
+ }, g = function(u) {
1048
+ if (!u)
1049
+ return A;
1050
+ if (u.encoder !== null && typeof u.encoder < "u" && typeof u.encoder != "function")
1051
1051
  throw new TypeError("Encoder has to be a function.");
1052
- var A = c.charset || v.charset;
1053
- if (typeof c.charset < "u" && c.charset !== "utf-8" && c.charset !== "iso-8859-1")
1052
+ var b = u.charset || A.charset;
1053
+ if (typeof u.charset < "u" && u.charset !== "utf-8" && u.charset !== "iso-8859-1")
1054
1054
  throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
1055
- var b = a.default;
1056
- if (typeof c.format < "u") {
1057
- if (!t.call(a.formatters, c.format))
1055
+ var S = a.default;
1056
+ if (typeof u.format < "u") {
1057
+ if (!t.call(a.formatters, u.format))
1058
1058
  throw new TypeError("Unknown format option provided.");
1059
- b = c.format;
1059
+ S = u.format;
1060
1060
  }
1061
- var P = a.formatters[b], x = v.filter;
1062
- return (typeof c.filter == "function" || o(c.filter)) && (x = c.filter), {
1063
- addQueryPrefix: typeof c.addQueryPrefix == "boolean" ? c.addQueryPrefix : v.addQueryPrefix,
1064
- allowDots: typeof c.allowDots > "u" ? v.allowDots : !!c.allowDots,
1065
- charset: A,
1066
- charsetSentinel: typeof c.charsetSentinel == "boolean" ? c.charsetSentinel : v.charsetSentinel,
1067
- delimiter: typeof c.delimiter > "u" ? v.delimiter : c.delimiter,
1068
- encode: typeof c.encode == "boolean" ? c.encode : v.encode,
1069
- encoder: typeof c.encoder == "function" ? c.encoder : v.encoder,
1070
- encodeValuesOnly: typeof c.encodeValuesOnly == "boolean" ? c.encodeValuesOnly : v.encodeValuesOnly,
1061
+ var P = a.formatters[S], x = A.filter;
1062
+ return (typeof u.filter == "function" || i(u.filter)) && (x = u.filter), {
1063
+ addQueryPrefix: typeof u.addQueryPrefix == "boolean" ? u.addQueryPrefix : A.addQueryPrefix,
1064
+ allowDots: typeof u.allowDots > "u" ? A.allowDots : !!u.allowDots,
1065
+ charset: b,
1066
+ charsetSentinel: typeof u.charsetSentinel == "boolean" ? u.charsetSentinel : A.charsetSentinel,
1067
+ delimiter: typeof u.delimiter > "u" ? A.delimiter : u.delimiter,
1068
+ encode: typeof u.encode == "boolean" ? u.encode : A.encode,
1069
+ encoder: typeof u.encoder == "function" ? u.encoder : A.encoder,
1070
+ encodeValuesOnly: typeof u.encodeValuesOnly == "boolean" ? u.encodeValuesOnly : A.encodeValuesOnly,
1071
1071
  filter: x,
1072
- format: b,
1072
+ format: S,
1073
1073
  formatter: P,
1074
- serializeDate: typeof c.serializeDate == "function" ? c.serializeDate : v.serializeDate,
1075
- skipNulls: typeof c.skipNulls == "boolean" ? c.skipNulls : v.skipNulls,
1076
- sort: typeof c.sort == "function" ? c.sort : null,
1077
- strictNullHandling: typeof c.strictNullHandling == "boolean" ? c.strictNullHandling : v.strictNullHandling
1074
+ serializeDate: typeof u.serializeDate == "function" ? u.serializeDate : A.serializeDate,
1075
+ skipNulls: typeof u.skipNulls == "boolean" ? u.skipNulls : A.skipNulls,
1076
+ sort: typeof u.sort == "function" ? u.sort : null,
1077
+ strictNullHandling: typeof u.strictNullHandling == "boolean" ? u.strictNullHandling : A.strictNullHandling
1078
1078
  };
1079
1079
  };
1080
- return ur = function(f, c) {
1081
- var A = f, b = S(c), P, x;
1082
- typeof b.filter == "function" ? (x = b.filter, A = x("", A)) : o(b.filter) && (x = b.filter, P = x);
1083
- var k = [];
1084
- if (typeof A != "object" || A === null)
1080
+ return ur = function(c, u) {
1081
+ var b = c, S = g(u), P, x;
1082
+ typeof S.filter == "function" ? (x = S.filter, b = x("", b)) : i(S.filter) && (x = S.filter, P = x);
1083
+ var T = [];
1084
+ if (typeof b != "object" || b === null)
1085
1085
  return "";
1086
- var N;
1087
- c && c.arrayFormat in n ? N = c.arrayFormat : c && "indices" in c ? N = c.indices ? "indices" : "repeat" : N = "indices";
1088
- var M = n[N];
1089
- if (c && "commaRoundTrip" in c && typeof c.commaRoundTrip != "boolean")
1086
+ var L;
1087
+ u && u.arrayFormat in n ? L = u.arrayFormat : u && "indices" in u ? L = u.indices ? "indices" : "repeat" : L = "indices";
1088
+ var M = n[L];
1089
+ if (u && "commaRoundTrip" in u && typeof u.commaRoundTrip != "boolean")
1090
1090
  throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
1091
- var V = M === "comma" && c && c.commaRoundTrip;
1092
- P || (P = Object.keys(A)), b.sort && P.sort(b.sort);
1093
- for (var $ = e(), L = 0; L < P.length; ++L) {
1094
- var F = P[L];
1095
- b.skipNulls && A[F] === null || p(k, i(
1096
- A[F],
1091
+ var V = M === "comma" && u && u.commaRoundTrip;
1092
+ P || (P = Object.keys(b)), S.sort && P.sort(S.sort);
1093
+ for (var $ = e(), N = 0; N < P.length; ++N) {
1094
+ var F = P[N];
1095
+ S.skipNulls && b[F] === null || p(T, f(
1096
+ b[F],
1097
1097
  F,
1098
1098
  M,
1099
1099
  V,
1100
- b.strictNullHandling,
1101
- b.skipNulls,
1102
- b.encode ? b.encoder : null,
1103
- b.filter,
1104
- b.sort,
1105
- b.allowDots,
1106
- b.serializeDate,
1107
- b.format,
1108
- b.formatter,
1109
- b.encodeValuesOnly,
1110
- b.charset,
1100
+ S.strictNullHandling,
1101
+ S.skipNulls,
1102
+ S.encode ? S.encoder : null,
1103
+ S.filter,
1104
+ S.sort,
1105
+ S.allowDots,
1106
+ S.serializeDate,
1107
+ S.format,
1108
+ S.formatter,
1109
+ S.encodeValuesOnly,
1110
+ S.charset,
1111
1111
  $
1112
1112
  ));
1113
1113
  }
1114
- var R = k.join(b.delimiter), T = b.addQueryPrefix === !0 ? "?" : "";
1115
- return b.charsetSentinel && (b.charset === "iso-8859-1" ? T += "utf8=%26%2310003%3B&" : T += "utf8=%E2%9C%93&"), R.length > 0 ? T + R : "";
1114
+ var I = T.join(S.delimiter), k = S.addQueryPrefix === !0 ? "?" : "";
1115
+ return S.charsetSentinel && (S.charset === "iso-8859-1" ? k += "utf8=%26%2310003%3B&" : k += "utf8=%E2%9C%93&"), I.length > 0 ? k + I : "";
1116
1116
  }, ur;
1117
1117
  }
1118
1118
  var cr, $r;
@@ -1136,93 +1136,93 @@ function ct() {
1136
1136
  parseArrays: !0,
1137
1137
  plainObjects: !1,
1138
1138
  strictNullHandling: !1
1139
- }, n = function(u) {
1140
- return u.replace(/&#(\d+);/g, function(s, i) {
1141
- return String.fromCharCode(parseInt(i, 10));
1139
+ }, n = function(s) {
1140
+ return s.replace(/&#(\d+);/g, function(o, f) {
1141
+ return String.fromCharCode(parseInt(f, 10));
1142
1142
  });
1143
- }, o = function(u, s) {
1144
- return u && typeof u == "string" && s.comma && u.indexOf(",") > -1 ? u.split(",") : u;
1145
- }, m = "utf8=%26%2310003%3B", l = "utf8=%E2%9C%93", p = function(s, i) {
1146
- var S = {}, f = i.ignoreQueryPrefix ? s.replace(/^\?/, "") : s, c = i.parameterLimit === 1 / 0 ? void 0 : i.parameterLimit, A = f.split(i.delimiter, c), b = -1, P, x = i.charset;
1147
- if (i.charsetSentinel)
1148
- for (P = 0; P < A.length; ++P)
1149
- A[P].indexOf("utf8=") === 0 && (A[P] === l ? x = "utf-8" : A[P] === m && (x = "iso-8859-1"), b = P, P = A.length);
1150
- for (P = 0; P < A.length; ++P)
1151
- if (P !== b) {
1152
- var k = A[P], N = k.indexOf("]="), M = N === -1 ? k.indexOf("=") : N + 1, V, $;
1153
- M === -1 ? (V = i.decoder(k, t.decoder, x, "key"), $ = i.strictNullHandling ? null : "") : (V = i.decoder(k.slice(0, M), t.decoder, x, "key"), $ = e.maybeMap(
1154
- o(k.slice(M + 1), i),
1155
- function(L) {
1156
- return i.decoder(L, t.decoder, x, "value");
1143
+ }, i = function(s, o) {
1144
+ return s && typeof s == "string" && o.comma && s.indexOf(",") > -1 ? s.split(",") : s;
1145
+ }, m = "utf8=%26%2310003%3B", l = "utf8=%E2%9C%93", p = function(o, f) {
1146
+ var g = {}, c = f.ignoreQueryPrefix ? o.replace(/^\?/, "") : o, u = f.parameterLimit === 1 / 0 ? void 0 : f.parameterLimit, b = c.split(f.delimiter, u), S = -1, P, x = f.charset;
1147
+ if (f.charsetSentinel)
1148
+ for (P = 0; P < b.length; ++P)
1149
+ b[P].indexOf("utf8=") === 0 && (b[P] === l ? x = "utf-8" : b[P] === m && (x = "iso-8859-1"), S = P, P = b.length);
1150
+ for (P = 0; P < b.length; ++P)
1151
+ if (P !== S) {
1152
+ var T = b[P], L = T.indexOf("]="), M = L === -1 ? T.indexOf("=") : L + 1, V, $;
1153
+ M === -1 ? (V = f.decoder(T, t.decoder, x, "key"), $ = f.strictNullHandling ? null : "") : (V = f.decoder(T.slice(0, M), t.decoder, x, "key"), $ = e.maybeMap(
1154
+ i(T.slice(M + 1), f),
1155
+ function(N) {
1156
+ return f.decoder(N, t.decoder, x, "value");
1157
1157
  }
1158
- )), $ && i.interpretNumericEntities && x === "iso-8859-1" && ($ = n($)), k.indexOf("[]=") > -1 && ($ = a($) ? [$] : $), r.call(S, V) ? S[V] = e.combine(S[V], $) : S[V] = $;
1158
+ )), $ && f.interpretNumericEntities && x === "iso-8859-1" && ($ = n($)), T.indexOf("[]=") > -1 && ($ = a($) ? [$] : $), r.call(g, V) ? g[V] = e.combine(g[V], $) : g[V] = $;
1159
1159
  }
1160
- return S;
1161
- }, y = function(u, s, i, S) {
1162
- for (var f = S ? s : o(s, i), c = u.length - 1; c >= 0; --c) {
1163
- var A, b = u[c];
1164
- if (b === "[]" && i.parseArrays)
1165
- A = [].concat(f);
1160
+ return g;
1161
+ }, y = function(s, o, f, g) {
1162
+ for (var c = g ? o : i(o, f), u = s.length - 1; u >= 0; --u) {
1163
+ var b, S = s[u];
1164
+ if (S === "[]" && f.parseArrays)
1165
+ b = [].concat(c);
1166
1166
  else {
1167
- A = i.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
1168
- var P = b.charAt(0) === "[" && b.charAt(b.length - 1) === "]" ? b.slice(1, -1) : b, x = parseInt(P, 10);
1169
- !i.parseArrays && P === "" ? A = { 0: f } : !isNaN(x) && b !== P && String(x) === P && x >= 0 && i.parseArrays && x <= i.arrayLimit ? (A = [], A[x] = f) : P !== "__proto__" && (A[P] = f);
1167
+ b = f.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
1168
+ var P = S.charAt(0) === "[" && S.charAt(S.length - 1) === "]" ? S.slice(1, -1) : S, x = parseInt(P, 10);
1169
+ !f.parseArrays && P === "" ? b = { 0: c } : !isNaN(x) && S !== P && String(x) === P && x >= 0 && f.parseArrays && x <= f.arrayLimit ? (b = [], b[x] = c) : P !== "__proto__" && (b[P] = c);
1170
1170
  }
1171
- f = A;
1171
+ c = b;
1172
1172
  }
1173
- return f;
1174
- }, w = function(s, i, S, f) {
1175
- if (s) {
1176
- var c = S.allowDots ? s.replace(/\.([^.[]+)/g, "[$1]") : s, A = /(\[[^[\]]*])/, b = /(\[[^[\]]*])/g, P = S.depth > 0 && A.exec(c), x = P ? c.slice(0, P.index) : c, k = [];
1173
+ return c;
1174
+ }, w = function(o, f, g, c) {
1175
+ if (o) {
1176
+ var u = g.allowDots ? o.replace(/\.([^.[]+)/g, "[$1]") : o, b = /(\[[^[\]]*])/, S = /(\[[^[\]]*])/g, P = g.depth > 0 && b.exec(u), x = P ? u.slice(0, P.index) : u, T = [];
1177
1177
  if (x) {
1178
- if (!S.plainObjects && r.call(Object.prototype, x) && !S.allowPrototypes)
1178
+ if (!g.plainObjects && r.call(Object.prototype, x) && !g.allowPrototypes)
1179
1179
  return;
1180
- k.push(x);
1180
+ T.push(x);
1181
1181
  }
1182
- for (var N = 0; S.depth > 0 && (P = b.exec(c)) !== null && N < S.depth; ) {
1183
- if (N += 1, !S.plainObjects && r.call(Object.prototype, P[1].slice(1, -1)) && !S.allowPrototypes)
1182
+ for (var L = 0; g.depth > 0 && (P = S.exec(u)) !== null && L < g.depth; ) {
1183
+ if (L += 1, !g.plainObjects && r.call(Object.prototype, P[1].slice(1, -1)) && !g.allowPrototypes)
1184
1184
  return;
1185
- k.push(P[1]);
1185
+ T.push(P[1]);
1186
1186
  }
1187
- return P && k.push("[" + c.slice(P.index) + "]"), y(k, i, S, f);
1187
+ return P && T.push("[" + u.slice(P.index) + "]"), y(T, f, g, c);
1188
1188
  }
1189
- }, v = function(s) {
1190
- if (!s)
1189
+ }, A = function(o) {
1190
+ if (!o)
1191
1191
  return t;
1192
- if (s.decoder !== null && s.decoder !== void 0 && typeof s.decoder != "function")
1192
+ if (o.decoder !== null && o.decoder !== void 0 && typeof o.decoder != "function")
1193
1193
  throw new TypeError("Decoder has to be a function.");
1194
- if (typeof s.charset < "u" && s.charset !== "utf-8" && s.charset !== "iso-8859-1")
1194
+ if (typeof o.charset < "u" && o.charset !== "utf-8" && o.charset !== "iso-8859-1")
1195
1195
  throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
1196
- var i = typeof s.charset > "u" ? t.charset : s.charset;
1196
+ var f = typeof o.charset > "u" ? t.charset : o.charset;
1197
1197
  return {
1198
- allowDots: typeof s.allowDots > "u" ? t.allowDots : !!s.allowDots,
1199
- allowPrototypes: typeof s.allowPrototypes == "boolean" ? s.allowPrototypes : t.allowPrototypes,
1200
- allowSparse: typeof s.allowSparse == "boolean" ? s.allowSparse : t.allowSparse,
1201
- arrayLimit: typeof s.arrayLimit == "number" ? s.arrayLimit : t.arrayLimit,
1202
- charset: i,
1203
- charsetSentinel: typeof s.charsetSentinel == "boolean" ? s.charsetSentinel : t.charsetSentinel,
1204
- comma: typeof s.comma == "boolean" ? s.comma : t.comma,
1205
- decoder: typeof s.decoder == "function" ? s.decoder : t.decoder,
1206
- delimiter: typeof s.delimiter == "string" || e.isRegExp(s.delimiter) ? s.delimiter : t.delimiter,
1198
+ allowDots: typeof o.allowDots > "u" ? t.allowDots : !!o.allowDots,
1199
+ allowPrototypes: typeof o.allowPrototypes == "boolean" ? o.allowPrototypes : t.allowPrototypes,
1200
+ allowSparse: typeof o.allowSparse == "boolean" ? o.allowSparse : t.allowSparse,
1201
+ arrayLimit: typeof o.arrayLimit == "number" ? o.arrayLimit : t.arrayLimit,
1202
+ charset: f,
1203
+ charsetSentinel: typeof o.charsetSentinel == "boolean" ? o.charsetSentinel : t.charsetSentinel,
1204
+ comma: typeof o.comma == "boolean" ? o.comma : t.comma,
1205
+ decoder: typeof o.decoder == "function" ? o.decoder : t.decoder,
1206
+ delimiter: typeof o.delimiter == "string" || e.isRegExp(o.delimiter) ? o.delimiter : t.delimiter,
1207
1207
  // eslint-disable-next-line no-implicit-coercion, no-extra-parens
1208
- depth: typeof s.depth == "number" || s.depth === !1 ? +s.depth : t.depth,
1209
- ignoreQueryPrefix: s.ignoreQueryPrefix === !0,
1210
- interpretNumericEntities: typeof s.interpretNumericEntities == "boolean" ? s.interpretNumericEntities : t.interpretNumericEntities,
1211
- parameterLimit: typeof s.parameterLimit == "number" ? s.parameterLimit : t.parameterLimit,
1212
- parseArrays: s.parseArrays !== !1,
1213
- plainObjects: typeof s.plainObjects == "boolean" ? s.plainObjects : t.plainObjects,
1214
- strictNullHandling: typeof s.strictNullHandling == "boolean" ? s.strictNullHandling : t.strictNullHandling
1208
+ depth: typeof o.depth == "number" || o.depth === !1 ? +o.depth : t.depth,
1209
+ ignoreQueryPrefix: o.ignoreQueryPrefix === !0,
1210
+ interpretNumericEntities: typeof o.interpretNumericEntities == "boolean" ? o.interpretNumericEntities : t.interpretNumericEntities,
1211
+ parameterLimit: typeof o.parameterLimit == "number" ? o.parameterLimit : t.parameterLimit,
1212
+ parseArrays: o.parseArrays !== !1,
1213
+ plainObjects: typeof o.plainObjects == "boolean" ? o.plainObjects : t.plainObjects,
1214
+ strictNullHandling: typeof o.strictNullHandling == "boolean" ? o.strictNullHandling : t.strictNullHandling
1215
1215
  };
1216
1216
  };
1217
- return cr = function(u, s) {
1218
- var i = v(s);
1219
- if (u === "" || u === null || typeof u > "u")
1220
- return i.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
1221
- for (var S = typeof u == "string" ? p(u, i) : u, f = i.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, c = Object.keys(S), A = 0; A < c.length; ++A) {
1222
- var b = c[A], P = w(b, S[b], i, typeof u == "string");
1223
- f = e.merge(f, P, i);
1217
+ return cr = function(s, o) {
1218
+ var f = A(o);
1219
+ if (s === "" || s === null || typeof s > "u")
1220
+ return f.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
1221
+ for (var g = typeof s == "string" ? p(s, f) : s, c = f.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, u = Object.keys(g), b = 0; b < u.length; ++b) {
1222
+ var S = u[b], P = w(S, g[S], f, typeof s == "string");
1223
+ c = e.merge(c, P, f);
1224
1224
  }
1225
- return i.allowSparse === !0 ? f : e.compact(f);
1225
+ return f.allowSparse === !0 ? c : e.compact(c);
1226
1226
  }, cr;
1227
1227
  }
1228
1228
  var lr, Br;
@@ -1257,8 +1257,8 @@ var mt = function(e) {
1257
1257
  }
1258
1258
  const n = {}, m = l(function(p) {
1259
1259
  var y = t(p);
1260
- return n[y] || (n[y] = new Promise(function(w, v) {
1261
- var u, s;
1260
+ return n[y] || (n[y] = new Promise(function(w, A) {
1261
+ var s, o;
1262
1262
  switch (String(p.method).toLowerCase()) {
1263
1263
  case "post":
1264
1264
  case "patch":
@@ -1267,82 +1267,82 @@ var mt = function(e) {
1267
1267
  p.cache || (p.cache = !1);
1268
1268
  break;
1269
1269
  }
1270
- return p.cache === !1 || (u = p.cache || r, u && (s = u.get(y))), s ? w(s) : (Object.assign(p, { adapter: a }), Ae.request(p).then(
1271
- function(i) {
1272
- delete n[y], w(i);
1270
+ return p.cache === !1 || (s = p.cache || r, s && (o = s.get(y))), o ? w(o) : (Object.assign(p, { adapter: a }), Ae.request(p).then(
1271
+ function(f) {
1272
+ delete n[y], w(f);
1273
1273
  },
1274
- function(i) {
1275
- delete n[y], v(i);
1274
+ function(f) {
1275
+ delete n[y], A(f);
1276
1276
  }
1277
1277
  ));
1278
1278
  })), n[y];
1279
1279
  });
1280
1280
  m.generateEndpointURL = function(p, y, w) {
1281
1281
  w = w || {}, y = y || {};
1282
- var v;
1283
- const u = w.file && e.fileAPI || e.apiURL;
1284
- w.withoutToken || (delete y.access_token, v = e.auth.getCurrentToken()), p[0] == "/" && p.slice(1);
1285
- var s = e.utils.mapParameters(y);
1286
- v ? s = s ? `?access_token=${v}&${s}` : `?access_token=${v}` : s = s ? `?${s}` : "";
1287
- var i = `${u}${p}${s}`;
1288
- return i;
1282
+ var A;
1283
+ const s = w.file && e.fileAPI || e.apiURL;
1284
+ w.withoutToken || (delete y.access_token, A = e.auth.getCurrentToken()), p[0] == "/" && p.slice(1);
1285
+ var o = e.utils.mapParameters(y);
1286
+ A ? o = o ? `?access_token=${A}&${o}` : `?access_token=${A}` : o = o ? `?${o}` : "";
1287
+ var f = `${s}${p}${o}`;
1288
+ return f;
1289
1289
  }, m.wasCancelled = function(p) {
1290
1290
  return Ae.isCancel(p);
1291
1291
  };
1292
1292
  function l(p) {
1293
1293
  var y = Ae.create({
1294
1294
  paramsSerializer: {
1295
- serialize: (v) => dt.stringify(v, { arrayFormat: "repeat" })
1295
+ serialize: (A) => dt.stringify(A, { arrayFormat: "repeat" })
1296
1296
  },
1297
1297
  adapter: p
1298
1298
  });
1299
- y.defaults.baseURL = e.apiURL, y.defaults.headers.common.Accept = "application/json", y.interceptors.request.use(function(v) {
1300
- if (t(v), v.withoutToken)
1301
- return v;
1302
- if (v.headers["qik-request-date"] = (/* @__PURE__ */ new Date()).getTime(), Intl) {
1303
- const s = Intl.DateTimeFormat().resolvedOptions().timeZone;
1304
- s && (v.headers["qik-request-timezone"] = s);
1299
+ y.defaults.baseURL = e.apiURL, y.defaults.headers.common.Accept = "application/json", y.interceptors.request.use(function(A) {
1300
+ if (t(A), A.withoutToken)
1301
+ return A;
1302
+ if (A.headers["qik-request-date"] = (/* @__PURE__ */ new Date()).getTime(), Intl) {
1303
+ const o = Intl.DateTimeFormat().resolvedOptions().timeZone;
1304
+ o && (A.headers["qik-request-timezone"] = o);
1305
1305
  }
1306
- v.headers["qik-api-version"] = vr, e?.socket?.windowID && (v.headers["qik-socket-window"] = e.socket.windowID);
1307
- var u = e.auth.getCurrentToken();
1308
- return u && (v.headers.Authorization = `Bearer ${u}`, v.params && v.params.access_token && delete v.params.access_token), v;
1306
+ A.headers["qik-api-version"] = vr, e?.socket?.windowID && (A.headers["qik-socket-window"] = e.socket.windowID);
1307
+ var s = e.auth.getCurrentToken();
1308
+ return s && (A.headers.Authorization = `Bearer ${s}`, A.params && A.params.access_token && delete A.params.access_token), A;
1309
1309
  });
1310
1310
  let w = 0;
1311
1311
  return y.interceptors.response.use(
1312
- function(v) {
1313
- var u = v.config, s = v.status;
1314
- switch (s) {
1312
+ function(A) {
1313
+ var s = A.config, o = A.status;
1314
+ switch (o) {
1315
1315
  case 204:
1316
1316
  if (w < 5)
1317
- return w++, new Promise(function(i, S) {
1317
+ return w++, new Promise(function(f, g) {
1318
1318
  setTimeout(function() {
1319
- return y.request(u).then(i, S);
1319
+ return y.request(s).then(f, g);
1320
1320
  }, 800);
1321
1321
  });
1322
1322
  console.log("Failed after 5 retries"), w = 0;
1323
1323
  break;
1324
1324
  }
1325
- return v;
1325
+ return A;
1326
1326
  },
1327
- function(v) {
1328
- if (Ae.isCancel(v))
1329
- return Promise.reject(v);
1330
- var u = v?.response?.status || v.status;
1331
- switch (u) {
1327
+ function(A) {
1328
+ if (Ae.isCancel(A))
1329
+ return Promise.reject(A);
1330
+ var s = A?.response?.status || A.status;
1331
+ switch (s) {
1332
1332
  case 401:
1333
1333
  break;
1334
1334
  case 502:
1335
1335
  case 504:
1336
1336
  if (w < 5)
1337
- return w++, new Promise(function(s, i) {
1337
+ return w++, new Promise(function(o, f) {
1338
1338
  setTimeout(function() {
1339
- return y.request(v.config).then(s, i);
1339
+ return y.request(A.config).then(o, f);
1340
1340
  }, 800);
1341
1341
  });
1342
1342
  console.log("Failed after 5 retries"), w = 0;
1343
1343
  break;
1344
1344
  }
1345
- return Promise.reject(v);
1345
+ return Promise.reject(A);
1346
1346
  }
1347
1347
  ), y;
1348
1348
  }
@@ -1351,11 +1351,11 @@ var mt = function(e) {
1351
1351
  function yt() {
1352
1352
  if (Gr) return fr;
1353
1353
  Gr = 1;
1354
- var e = "Expected a function", r = "__lodash_hash_undefined__", a = "[object Function]", t = "[object GeneratorFunction]", n = "[object Symbol]", o = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, m = /^\w*$/, l = /^\./, p = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, y = /[\\^$.*+?()[\]{}|]/g, w = /\\(\\)?/g, v = /^\[object .+?Constructor\]$/, u = typeof be == "object" && be && be.Object === Object && be, s = typeof self == "object" && self && self.Object === Object && self, i = u || s || Function("return this")();
1355
- function S(d, E) {
1354
+ var e = "Expected a function", r = "__lodash_hash_undefined__", a = "[object Function]", t = "[object GeneratorFunction]", n = "[object Symbol]", i = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, m = /^\w*$/, l = /^\./, p = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, y = /[\\^$.*+?()[\]{}|]/g, w = /\\(\\)?/g, A = /^\[object .+?Constructor\]$/, s = typeof be == "object" && be && be.Object === Object && be, o = typeof self == "object" && self && self.Object === Object && self, f = s || o || Function("return this")();
1355
+ function g(d, E) {
1356
1356
  return d?.[E];
1357
1357
  }
1358
- function f(d) {
1358
+ function c(d) {
1359
1359
  var E = !1;
1360
1360
  if (d != null && typeof d.toString != "function")
1361
1361
  try {
@@ -1364,12 +1364,12 @@ function yt() {
1364
1364
  }
1365
1365
  return E;
1366
1366
  }
1367
- var c = Array.prototype, A = Function.prototype, b = Object.prototype, P = i["__core-js_shared__"], x = (function() {
1367
+ var u = Array.prototype, b = Function.prototype, S = Object.prototype, P = f["__core-js_shared__"], x = (function() {
1368
1368
  var d = /[^.]+$/.exec(P && P.keys && P.keys.IE_PROTO || "");
1369
1369
  return d ? "Symbol(src)_1." + d : "";
1370
- })(), k = A.toString, N = b.hasOwnProperty, M = b.toString, V = RegExp(
1371
- "^" + k.call(N).replace(y, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1372
- ), $ = i.Symbol, L = c.splice, F = Pe(i, "Map"), R = Pe(Object, "create"), T = $ ? $.prototype : void 0, U = T ? T.toString : void 0;
1370
+ })(), T = b.toString, L = S.hasOwnProperty, M = S.toString, V = RegExp(
1371
+ "^" + T.call(L).replace(y, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1372
+ ), $ = f.Symbol, N = u.splice, F = Pe(f, "Map"), I = Pe(Object, "create"), k = $ ? $.prototype : void 0, U = k ? k.toString : void 0;
1373
1373
  function z(d) {
1374
1374
  var E = -1, C = d ? d.length : 0;
1375
1375
  for (this.clear(); ++E < C; ) {
@@ -1378,26 +1378,26 @@ function yt() {
1378
1378
  }
1379
1379
  }
1380
1380
  function _() {
1381
- this.__data__ = R ? R(null) : {};
1381
+ this.__data__ = I ? I(null) : {};
1382
1382
  }
1383
1383
  function Z(d) {
1384
1384
  return this.has(d) && delete this.__data__[d];
1385
1385
  }
1386
1386
  function Q(d) {
1387
1387
  var E = this.__data__;
1388
- if (R) {
1388
+ if (I) {
1389
1389
  var C = E[d];
1390
1390
  return C === r ? void 0 : C;
1391
1391
  }
1392
- return N.call(E, d) ? E[d] : void 0;
1392
+ return L.call(E, d) ? E[d] : void 0;
1393
1393
  }
1394
1394
  function ne(d) {
1395
1395
  var E = this.__data__;
1396
- return R ? E[d] !== void 0 : N.call(E, d);
1396
+ return I ? E[d] !== void 0 : L.call(E, d);
1397
1397
  }
1398
1398
  function X(d, E) {
1399
1399
  var C = this.__data__;
1400
- return C[d] = R && E === void 0 ? r : E, this;
1400
+ return C[d] = I && E === void 0 ? r : E, this;
1401
1401
  }
1402
1402
  z.prototype.clear = _, z.prototype.delete = Z, z.prototype.get = Q, z.prototype.has = ne, z.prototype.set = X;
1403
1403
  function W(d) {
@@ -1415,7 +1415,7 @@ function yt() {
1415
1415
  if (C < 0)
1416
1416
  return !1;
1417
1417
  var G = E.length - 1;
1418
- return C == G ? E.pop() : L.call(E, C, 1), !0;
1418
+ return C == G ? E.pop() : N.call(E, C, 1), !0;
1419
1419
  }
1420
1420
  function te(d) {
1421
1421
  var E = this.__data__, C = J(E, d);
@@ -1463,15 +1463,15 @@ function yt() {
1463
1463
  return -1;
1464
1464
  }
1465
1465
  function ee(d, E) {
1466
- E = Re(E, d) ? [E] : ke(E);
1466
+ E = Ie(E, d) ? [E] : Te(E);
1467
1467
  for (var C = 0, G = E.length; d != null && C < G; )
1468
- d = d[Ne(E[C++])];
1468
+ d = d[Le(E[C++])];
1469
1469
  return C && C == G ? d : void 0;
1470
1470
  }
1471
- function Ie(d) {
1471
+ function Re(d) {
1472
1472
  if (!he(d) || _e(d))
1473
1473
  return !1;
1474
- var E = Le(d) || f(d) ? V : v;
1474
+ var E = Ne(d) || c(d) ? V : A;
1475
1475
  return E.test(le(d));
1476
1476
  }
1477
1477
  function xe(d) {
@@ -1482,24 +1482,24 @@ function yt() {
1482
1482
  var E = d + "";
1483
1483
  return E == "0" && 1 / d == -1 / 0 ? "-0" : E;
1484
1484
  }
1485
- function ke(d) {
1485
+ function Te(d) {
1486
1486
  return Oe(d) ? d : Ce(d);
1487
1487
  }
1488
1488
  function me(d, E) {
1489
1489
  var C = d.__data__;
1490
- return Te(E) ? C[typeof E == "string" ? "string" : "hash"] : C.map;
1490
+ return ke(E) ? C[typeof E == "string" ? "string" : "hash"] : C.map;
1491
1491
  }
1492
1492
  function Pe(d, E) {
1493
- var C = S(d, E);
1494
- return Ie(C) ? C : void 0;
1493
+ var C = g(d, E);
1494
+ return Re(C) ? C : void 0;
1495
1495
  }
1496
- function Re(d, E) {
1496
+ function Ie(d, E) {
1497
1497
  if (Oe(d))
1498
1498
  return !1;
1499
1499
  var C = typeof d;
1500
- return C == "number" || C == "symbol" || C == "boolean" || d == null || h(d) ? !0 : m.test(d) || !o.test(d) || E != null && d in Object(E);
1500
+ return C == "number" || C == "symbol" || C == "boolean" || d == null || h(d) ? !0 : m.test(d) || !i.test(d) || E != null && d in Object(E);
1501
1501
  }
1502
- function Te(d) {
1502
+ function ke(d) {
1503
1503
  var E = typeof d;
1504
1504
  return E == "string" || E == "number" || E == "symbol" || E == "boolean" ? d !== "__proto__" : d === null;
1505
1505
  }
@@ -1507,13 +1507,13 @@ function yt() {
1507
1507
  return !!x && x in d;
1508
1508
  }
1509
1509
  var Ce = fe(function(d) {
1510
- d = g(d);
1510
+ d = v(d);
1511
1511
  var E = [];
1512
1512
  return l.test(d) && E.push(""), d.replace(p, function(C, G, ae, K) {
1513
1513
  E.push(ae ? K.replace(w, "$1") : G || C);
1514
1514
  }), E;
1515
1515
  });
1516
- function Ne(d) {
1516
+ function Le(d) {
1517
1517
  if (typeof d == "string" || h(d))
1518
1518
  return d;
1519
1519
  var E = d + "";
@@ -1522,7 +1522,7 @@ function yt() {
1522
1522
  function le(d) {
1523
1523
  if (d != null) {
1524
1524
  try {
1525
- return k.call(d);
1525
+ return T.call(d);
1526
1526
  } catch {
1527
1527
  }
1528
1528
  try {
@@ -1549,7 +1549,7 @@ function yt() {
1549
1549
  return d === E || d !== d && E !== E;
1550
1550
  }
1551
1551
  var Oe = Array.isArray;
1552
- function Le(d) {
1552
+ function Ne(d) {
1553
1553
  var E = he(d) ? M.call(d) : "";
1554
1554
  return E == a || E == t;
1555
1555
  }
@@ -1563,7 +1563,7 @@ function yt() {
1563
1563
  function h(d) {
1564
1564
  return typeof d == "symbol" || ge(d) && M.call(d) == n;
1565
1565
  }
1566
- function g(d) {
1566
+ function v(d) {
1567
1567
  return d == null ? "" : xe(d);
1568
1568
  }
1569
1569
  function D(d, E, C) {
@@ -1578,14 +1578,14 @@ var dr, Dr;
1578
1578
  function gt() {
1579
1579
  if (Dr) return dr;
1580
1580
  Dr = 1;
1581
- var e = "[object Symbol]", r = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, a = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, t = "\\ud800-\\udfff", n = "\\u0300-\\u036f\\ufe20-\\ufe23", o = "\\u20d0-\\u20f0", m = "\\u2700-\\u27bf", l = "a-z\\xdf-\\xf6\\xf8-\\xff", p = "\\xac\\xb1\\xd7\\xf7", y = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", w = "\\u2000-\\u206f", v = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", u = "A-Z\\xc0-\\xd6\\xd8-\\xde", s = "\\ufe0e\\ufe0f", i = p + y + w + v, S = "['’]", f = "[" + t + "]", c = "[" + i + "]", A = "[" + n + o + "]", b = "\\d+", P = "[" + m + "]", x = "[" + l + "]", k = "[^" + t + i + b + m + l + u + "]", N = "\\ud83c[\\udffb-\\udfff]", M = "(?:" + A + "|" + N + ")", V = "[^" + t + "]", $ = "(?:\\ud83c[\\udde6-\\uddff]){2}", L = "[\\ud800-\\udbff][\\udc00-\\udfff]", F = "[" + u + "]", R = "\\u200d", T = "(?:" + x + "|" + k + ")", U = "(?:" + F + "|" + k + ")", z = "(?:" + S + "(?:d|ll|m|re|s|t|ve))?", _ = "(?:" + S + "(?:D|LL|M|RE|S|T|VE))?", Z = M + "?", Q = "[" + s + "]?", ne = "(?:" + R + "(?:" + [V, $, L].join("|") + ")" + Q + Z + ")*", X = Q + Z + ne, W = "(?:" + [P, $, L].join("|") + ")" + X, ie = "(?:" + [V + A + "?", A, $, L, f].join("|") + ")", re = RegExp(S, "g"), te = RegExp(A, "g"), ce = RegExp(N + "(?=" + N + ")|" + ie + X, "g"), ue = RegExp([
1582
- F + "?" + x + "+" + z + "(?=" + [c, F, "$"].join("|") + ")",
1583
- U + "+" + _ + "(?=" + [c, F + T, "$"].join("|") + ")",
1584
- F + "?" + T + "+" + z,
1581
+ var e = "[object Symbol]", r = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, a = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, t = "\\ud800-\\udfff", n = "\\u0300-\\u036f\\ufe20-\\ufe23", i = "\\u20d0-\\u20f0", m = "\\u2700-\\u27bf", l = "a-z\\xdf-\\xf6\\xf8-\\xff", p = "\\xac\\xb1\\xd7\\xf7", y = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", w = "\\u2000-\\u206f", A = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", s = "A-Z\\xc0-\\xd6\\xd8-\\xde", o = "\\ufe0e\\ufe0f", f = p + y + w + A, g = "['’]", c = "[" + t + "]", u = "[" + f + "]", b = "[" + n + i + "]", S = "\\d+", P = "[" + m + "]", x = "[" + l + "]", T = "[^" + t + f + S + m + l + s + "]", L = "\\ud83c[\\udffb-\\udfff]", M = "(?:" + b + "|" + L + ")", V = "[^" + t + "]", $ = "(?:\\ud83c[\\udde6-\\uddff]){2}", N = "[\\ud800-\\udbff][\\udc00-\\udfff]", F = "[" + s + "]", I = "\\u200d", k = "(?:" + x + "|" + T + ")", U = "(?:" + F + "|" + T + ")", z = "(?:" + g + "(?:d|ll|m|re|s|t|ve))?", _ = "(?:" + g + "(?:D|LL|M|RE|S|T|VE))?", Z = M + "?", Q = "[" + o + "]?", ne = "(?:" + I + "(?:" + [V, $, N].join("|") + ")" + Q + Z + ")*", X = Q + Z + ne, W = "(?:" + [P, $, N].join("|") + ")" + X, ie = "(?:" + [V + b + "?", b, $, N, c].join("|") + ")", re = RegExp(g, "g"), te = RegExp(b, "g"), ce = RegExp(L + "(?=" + L + ")|" + ie + X, "g"), ue = RegExp([
1582
+ F + "?" + x + "+" + z + "(?=" + [u, F, "$"].join("|") + ")",
1583
+ U + "+" + _ + "(?=" + [u, F + k, "$"].join("|") + ")",
1584
+ F + "?" + k + "+" + z,
1585
1585
  F + "+" + _,
1586
- b,
1586
+ S,
1587
1587
  W
1588
- ].join("|"), "g"), oe = RegExp("[" + R + t + n + o + s + "]"), de = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, pe = {
1588
+ ].join("|"), "g"), oe = RegExp("[" + I + t + n + i + o + "]"), de = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, pe = {
1589
1589
  // Latin-1 Supplement block.
1590
1590
  À: "A",
1591
1591
  Á: "A",
@@ -1787,7 +1787,7 @@ function gt() {
1787
1787
  function ee(O) {
1788
1788
  return O.split("");
1789
1789
  }
1790
- function Ie(O) {
1790
+ function Re(O) {
1791
1791
  return O.match(r) || [];
1792
1792
  }
1793
1793
  function xe(O) {
@@ -1795,23 +1795,23 @@ function gt() {
1795
1795
  return O?.[B];
1796
1796
  };
1797
1797
  }
1798
- var ke = xe(pe);
1798
+ var Te = xe(pe);
1799
1799
  function me(O) {
1800
1800
  return oe.test(O);
1801
1801
  }
1802
1802
  function Pe(O) {
1803
1803
  return de.test(O);
1804
1804
  }
1805
- function Re(O) {
1806
- return me(O) ? Te(O) : ee(O);
1805
+ function Ie(O) {
1806
+ return me(O) ? ke(O) : ee(O);
1807
1807
  }
1808
- function Te(O) {
1808
+ function ke(O) {
1809
1809
  return O.match(ce) || [];
1810
1810
  }
1811
1811
  function _e(O) {
1812
1812
  return O.match(ue) || [];
1813
1813
  }
1814
- var Ce = Object.prototype, Ne = Ce.toString, le = Se.Symbol, fe = le ? le.prototype : void 0, we = fe ? fe.toString : void 0;
1814
+ var Ce = Object.prototype, Le = Ce.toString, le = Se.Symbol, fe = le ? le.prototype : void 0, we = fe ? fe.toString : void 0;
1815
1815
  function Oe(O, B, j) {
1816
1816
  var H = -1, Y = O.length;
1817
1817
  B < 0 && (B = -B > Y ? 0 : Y + B), j = j > Y ? Y : j, j < 0 && (j += Y), Y = B > j ? 0 : j - B >>> 0, B >>>= 0;
@@ -1819,7 +1819,7 @@ function gt() {
1819
1819
  Ee[H] = O[H + B];
1820
1820
  return Ee;
1821
1821
  }
1822
- function Le(O) {
1822
+ function Ne(O) {
1823
1823
  if (typeof O == "string")
1824
1824
  return O;
1825
1825
  if (D(O))
@@ -1834,7 +1834,7 @@ function gt() {
1834
1834
  function ge(O) {
1835
1835
  return function(B) {
1836
1836
  B = d(B);
1837
- var j = me(B) ? Re(B) : void 0, H = j ? j[0] : B.charAt(0), Y = j ? he(j, 1).join("") : B.slice(1);
1837
+ var j = me(B) ? Ie(B) : void 0, H = j ? j[0] : B.charAt(0), Y = j ? he(j, 1).join("") : B.slice(1);
1838
1838
  return H[O]() + Y;
1839
1839
  };
1840
1840
  }
@@ -1843,14 +1843,14 @@ function gt() {
1843
1843
  return J(K(G(B).replace(re, "")), O, "");
1844
1844
  };
1845
1845
  }
1846
- function g(O) {
1846
+ function v(O) {
1847
1847
  return !!O && typeof O == "object";
1848
1848
  }
1849
1849
  function D(O) {
1850
- return typeof O == "symbol" || g(O) && Ne.call(O) == e;
1850
+ return typeof O == "symbol" || v(O) && Le.call(O) == e;
1851
1851
  }
1852
1852
  function d(O) {
1853
- return O == null ? "" : Le(O);
1853
+ return O == null ? "" : Ne(O);
1854
1854
  }
1855
1855
  var E = h(function(O, B, j) {
1856
1856
  return B = B.toLowerCase(), O + (j ? C(B) : B);
@@ -1859,11 +1859,11 @@ function gt() {
1859
1859
  return ae(d(O).toLowerCase());
1860
1860
  }
1861
1861
  function G(O) {
1862
- return O = d(O), O && O.replace(a, ke).replace(te, "");
1862
+ return O = d(O), O && O.replace(a, Te).replace(te, "");
1863
1863
  }
1864
1864
  var ae = ge("toUpperCase");
1865
1865
  function K(O, B, j) {
1866
- return O = d(O), B = B, B === void 0 ? Pe(O) ? _e(O) : Ie(O) : O.match(B) || [];
1866
+ return O = d(O), B = B, B === void 0 ? Pe(O) ? _e(O) : Re(O) : O.match(B) || [];
1867
1867
  }
1868
1868
  return dr = E, dr;
1869
1869
  }
@@ -1879,27 +1879,27 @@ function bt() {
1879
1879
  return typeof m;
1880
1880
  } : function(m) {
1881
1881
  return m && typeof Symbol == "function" && m.constructor === Symbol && m !== Symbol.prototype ? "symbol" : typeof m;
1882
- }, r = typeof window < "u" && typeof window.document < "u", a = typeof process < "u" && process.versions != null && process.versions.node != null, t = (typeof self > "u" ? "undefined" : e(self)) === "object" && self.constructor && self.constructor.name === "DedicatedWorkerGlobalScope", n = typeof window < "u" && window.name === "nodejs" || typeof navigator < "u" && (navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom")), o = typeof Deno < "u" && typeof Deno.core < "u";
1883
- return ve.isBrowser = r, ve.isWebWorker = t, ve.isNode = a, ve.isJsDom = n, ve.isDeno = o, ve;
1882
+ }, r = typeof window < "u" && typeof window.document < "u", a = typeof process < "u" && process.versions != null && process.versions.node != null, t = (typeof self > "u" ? "undefined" : e(self)) === "object" && self.constructor && self.constructor.name === "DedicatedWorkerGlobalScope", n = typeof window < "u" && window.name === "nodejs" || typeof navigator < "u" && (navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom")), i = typeof Deno < "u" && typeof Deno.core < "u";
1883
+ return ve.isBrowser = r, ve.isWebWorker = t, ve.isNode = a, ve.isJsDom = n, ve.isDeno = i, ve;
1884
1884
  }
1885
1885
  bt();
1886
- const I = {}, Ge = {};
1887
- I.loadExternalScript = function(e) {
1886
+ const R = {}, Ge = {};
1887
+ R.loadExternalScript = function(e) {
1888
1888
  if (Ge[e])
1889
1889
  return Ge[e];
1890
1890
  const r = Ge[e] = new Promise(a);
1891
1891
  function a(t, n) {
1892
1892
  if (!document)
1893
1893
  return delete Ge[e], n("document is undefined");
1894
- var o = document.createElement("script");
1895
- o.type = "text/javascript", o.async = !0, o.onload = function() {
1894
+ var i = document.createElement("script");
1895
+ i.type = "text/javascript", i.async = !0, i.onload = function() {
1896
1896
  return console.log("Loaded external script", e), t(e);
1897
- }, o.src = e, document.head.appendChild(o);
1897
+ }, i.src = e, document.head.appendChild(i);
1898
1898
  }
1899
1899
  return r;
1900
1900
  };
1901
1901
  const Vr = {};
1902
- I.loadExternalStyle = function(e) {
1902
+ R.loadExternalStyle = function(e) {
1903
1903
  const r = new Promise(a);
1904
1904
  function a(t, n) {
1905
1905
  if (!document)
@@ -1907,14 +1907,14 @@ I.loadExternalStyle = function(e) {
1907
1907
  if (Vr[e])
1908
1908
  return t(e);
1909
1909
  Vr[e] = !0;
1910
- var o = document.createElement("link");
1911
- o.setAttribute("rel", "stylesheet"), o.setAttribute("type", "text/css"), o.setAttribute("href", e), o.onload = function() {
1910
+ var i = document.createElement("link");
1911
+ i.setAttribute("rel", "stylesheet"), i.setAttribute("type", "text/css"), i.setAttribute("href", e), i.onload = function() {
1912
1912
  return console.log("Loaded external stylesheet", e), t(e);
1913
- }, document.head.appendChild(o);
1913
+ }, document.head.appendChild(i);
1914
1914
  }
1915
1915
  return r;
1916
1916
  };
1917
- I.exists = function(e) {
1917
+ R.exists = function(e) {
1918
1918
  var r;
1919
1919
  if (Array.isArray(e) || e === 0)
1920
1920
  return !0;
@@ -1936,7 +1936,7 @@ I.exists = function(e) {
1936
1936
  }
1937
1937
  return !r;
1938
1938
  };
1939
- I.parseDate = function(e) {
1939
+ R.parseDate = function(e) {
1940
1940
  if (e) {
1941
1941
  if (e instanceof Date)
1942
1942
  return e;
@@ -1945,15 +1945,15 @@ I.parseDate = function(e) {
1945
1945
  return r;
1946
1946
  }
1947
1947
  };
1948
- I.parseURL = function(e) {
1948
+ R.parseURL = function(e) {
1949
1949
  if (!e)
1950
1950
  return !1;
1951
1951
  if (e.startsWith("/") || e.startsWith("://") || e.startsWith("mailto:") || e.startsWith("tel:") || e.startsWith("sms:"))
1952
1952
  return e;
1953
- var a = I.parseEmail(e);
1953
+ var a = R.parseEmail(e);
1954
1954
  if (a && a === e)
1955
1955
  return `mailto:${a}`;
1956
- const t = (o) => /^https?:\/\//i.test(o) ? o : `http://${o}`;
1956
+ const t = (i) => /^https?:\/\//i.test(i) ? i : `http://${i}`;
1957
1957
  e = t(e), e = e.replace(/\s/g, "");
1958
1958
  var n = RegExp(
1959
1959
  "(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+@]*)*(\\?[;&a-z\\d%_.~+=-@]*)?(\\#[-a-z\\d_@]*)?$",
@@ -1961,16 +1961,16 @@ I.parseURL = function(e) {
1961
1961
  ).test(e);
1962
1962
  return n ? t(e) : !1;
1963
1963
  };
1964
- I.parseNumber = function(e, r) {
1964
+ R.parseNumber = function(e, r) {
1965
1965
  if (!e || (e = Number(e), isNaN(e)))
1966
1966
  return 0;
1967
1967
  if (r) {
1968
1968
  var a = e.toFixed(r);
1969
- e = I.parseNumber(a);
1969
+ e = R.parseNumber(a);
1970
1970
  }
1971
1971
  return e;
1972
1972
  };
1973
- I.isValidEmailAddress = function(e) {
1973
+ R.isValidEmailAddress = function(e) {
1974
1974
  var r = /^[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;
1975
1975
  if (!e) return !1;
1976
1976
  var a = e.split("@");
@@ -1978,53 +1978,53 @@ I.isValidEmailAddress = function(e) {
1978
1978
  var t = a[0], n = a[1];
1979
1979
  if (t.length > 64) return !1;
1980
1980
  if (n.length > 255) return !1;
1981
- var o = n.split(".");
1982
- return !(o.some(function(m) {
1981
+ var i = n.split(".");
1982
+ return !(i.some(function(m) {
1983
1983
  return m.length > 63;
1984
1984
  }) || !r.test(e));
1985
1985
  };
1986
- I.parseEmail = function(e) {
1986
+ R.parseEmail = function(e) {
1987
1987
  if (!e)
1988
1988
  return !1;
1989
- var r = String(e).toLowerCase(), a = I.isValidEmailAddress(r);
1989
+ var r = String(e).toLowerCase(), a = R.isValidEmailAddress(r);
1990
1990
  return a ? r : !1;
1991
1991
  };
1992
- I.parseInt = function(e) {
1992
+ R.parseInt = function(e) {
1993
1993
  return !e || (e = parseInt(e), isNaN(e)) ? 0 : e;
1994
1994
  };
1995
- I.cleanValue = function(e, r, a) {
1995
+ R.cleanValue = function(e, r, a) {
1996
1996
  a || (a = {});
1997
- var t = I.exists(e);
1997
+ var t = R.exists(e);
1998
1998
  if (a.strict && t && r != "boolean")
1999
1999
  return e;
2000
2000
  switch (r) {
2001
2001
  case "reference":
2002
- return I.id(e, !0);
2002
+ return R.id(e, !0);
2003
2003
  case "boolean":
2004
- return I.parseBoolean(e);
2004
+ return R.parseBoolean(e);
2005
2005
  case "url":
2006
- return I.parseURL(e);
2006
+ return R.parseURL(e);
2007
2007
  case "key":
2008
- return I.machineName(e);
2008
+ return R.machineName(e);
2009
2009
  case "email":
2010
- return I.parseEmail(e);
2010
+ return R.parseEmail(e);
2011
2011
  case "date":
2012
- var n = I.parseDate(e, a);
2012
+ var n = R.parseDate(e, a);
2013
2013
  return n === void 0 ? void 0 : n;
2014
2014
  case "number":
2015
2015
  case "decimal":
2016
2016
  case "float":
2017
- var o = I.parseNumber(e);
2018
- return String(o) == String(Number(e)) ? o : void 0;
2017
+ var i = R.parseNumber(e);
2018
+ return String(i) == String(Number(e)) ? i : void 0;
2019
2019
  case "integer":
2020
- var o = I.parseInt(e);
2021
- return String(o) == String(parseInt(e)) ? o : void 0;
2020
+ var i = R.parseInt(e);
2021
+ return String(i) == String(parseInt(e)) ? i : void 0;
2022
2022
  case "group":
2023
2023
  return e;
2024
2024
  case "object":
2025
2025
  return typeof e == "object" && e !== null && !Array.isArray(e) ? e : void 0;
2026
2026
  case "string":
2027
- if (I.exists(e)) {
2027
+ if (R.exists(e)) {
2028
2028
  var m = String(e);
2029
2029
  return m == "[object Object]" ? void 0 : m;
2030
2030
  } else
@@ -2044,59 +2044,59 @@ I.cleanValue = function(e, r, a) {
2044
2044
  return String(e);
2045
2045
  }
2046
2046
  };
2047
- I.isValidValue = function(e, r, a) {
2048
- var t = I.exists(e), n = typeof e == "number", o = !1;
2047
+ R.isValidValue = function(e, r, a) {
2048
+ var t = R.exists(e), n = typeof e == "number", i = !1;
2049
2049
  if (!t)
2050
2050
  return !1;
2051
2051
  switch (r) {
2052
2052
  case "url":
2053
- a ? o = e.startsWith("/") || e.startsWith("://") || e.startsWith("http://") || e.startsWith("https://") : o = String(e) === I.parseURL(e);
2053
+ a ? i = e.startsWith("/") || e.startsWith("://") || e.startsWith("http://") || e.startsWith("https://") : i = String(e) === R.parseURL(e);
2054
2054
  break;
2055
2055
  case "key":
2056
- o = String(e) === I.machineName(e);
2056
+ i = String(e) === R.machineName(e);
2057
2057
  break;
2058
2058
  case "date":
2059
2059
  if (a && (typeof e != "object" || !(e instanceof Date)))
2060
2060
  return !1;
2061
- var m = I.parseDate(e);
2061
+ var m = R.parseDate(e);
2062
2062
  return m !== void 0;
2063
2063
  case "email":
2064
- a ? o = e === I.parseEmail(e) : o = String(e).toLowerCase() === I.parseEmail(e);
2064
+ a ? i = e === R.parseEmail(e) : i = String(e).toLowerCase() === R.parseEmail(e);
2065
2065
  break;
2066
2066
  case "number":
2067
2067
  case "decimal":
2068
2068
  case "float":
2069
- a ? o = n && Number(e) === I.parseNumber(e) : o = Number(e) === I.parseNumber(e);
2069
+ a ? i = n && Number(e) === R.parseNumber(e) : i = Number(e) === R.parseNumber(e);
2070
2070
  break;
2071
2071
  case "integer":
2072
- a ? o = n && Number(e) === I.parseInt(e) : o = Number(e) === I.parseInt(e);
2072
+ a ? i = n && Number(e) === R.parseInt(e) : i = Number(e) === R.parseInt(e);
2073
2073
  break;
2074
2074
  case "boolean":
2075
- var m = I.parseBoolean(e);
2076
- a ? (e === !0 || e === !1) && (o = e === m) : o = m === !0 || m === !1;
2075
+ var m = R.parseBoolean(e);
2076
+ a ? (e === !0 || e === !1) && (i = e === m) : i = m === !0 || m === !1;
2077
2077
  break;
2078
2078
  case "reference":
2079
- a ? o = String(e) === I.id(e) : o = !!I.id(e);
2079
+ a ? i = String(e) === R.id(e) : i = !!R.id(e);
2080
2080
  break;
2081
2081
  case "string":
2082
2082
  var l = String(e);
2083
2083
  if (a && typeof e != "string" || l == "[object Object]")
2084
2084
  return !1;
2085
- o = !0;
2085
+ i = !0;
2086
2086
  break;
2087
2087
  // case 'group':
2088
2088
  // isValidEntry = _isObject(value);
2089
2089
  // break;
2090
2090
  case "object":
2091
- o = typeof e == "object" && e !== null && !Array.isArray(e);
2091
+ i = typeof e == "object" && e !== null && !Array.isArray(e);
2092
2092
  break;
2093
2093
  case "array":
2094
- o = Array.isArray(e);
2094
+ i = Array.isArray(e);
2095
2095
  break;
2096
2096
  }
2097
- return o;
2097
+ return i;
2098
2098
  };
2099
- I.parseBoolean = function(e) {
2099
+ R.parseBoolean = function(e) {
2100
2100
  switch (String(e).toLowerCase()) {
2101
2101
  case "true":
2102
2102
  case "y":
@@ -2119,15 +2119,15 @@ I.parseBoolean = function(e) {
2119
2119
  }
2120
2120
  return !!e;
2121
2121
  };
2122
- I.clone = function(e) {
2122
+ R.clone = function(e) {
2123
2123
  return JSON.parse(JSON.stringify(e));
2124
2124
  };
2125
- I.getAllFields = function(e) {
2125
+ R.getAllFields = function(e) {
2126
2126
  const r = e.definesType === "profile" || e.key === "profile", a = e.definesType === "submission";
2127
2127
  var t = [...e.fields], n = e.definedFields || [];
2128
2128
  if (n.length)
2129
2129
  if (a) {
2130
- var o = {
2130
+ var i = {
2131
2131
  title: "Form Data",
2132
2132
  minimum: 1,
2133
2133
  maximum: 1,
@@ -2136,7 +2136,7 @@ I.getAllFields = function(e) {
2136
2136
  type: "group",
2137
2137
  fields: n
2138
2138
  };
2139
- t.push(o);
2139
+ t.push(i);
2140
2140
  var m = {
2141
2141
  title: "Data",
2142
2142
  minimum: 1,
@@ -2174,7 +2174,7 @@ I.getAllFields = function(e) {
2174
2174
  maximum: 1,
2175
2175
  type: "date"
2176
2176
  }));
2177
- var l = I.mapFields(t).filter(function(p) {
2177
+ var l = R.mapFields(t).filter(function(p) {
2178
2178
  var y = p.type == "group" && p.asObject && p.minimum == 1 && p.maximum == 1;
2179
2179
  return !y;
2180
2180
  }).map(function(p) {
@@ -2184,28 +2184,28 @@ I.getAllFields = function(e) {
2184
2184
  });
2185
2185
  return l;
2186
2186
  };
2187
- I.mapFields = function(e, r) {
2187
+ R.mapFields = function(e, r) {
2188
2188
  r || (r = {});
2189
- var a = [], t = [], n = [], o = 1, m = r.depth, l = r.arrayDelimeter || "[]";
2189
+ var a = [], t = [], n = [], i = 1, m = r.depth, l = r.arrayDelimeter || "[]";
2190
2190
  e.forEach(p);
2191
2191
  function p(y, w) {
2192
- var v = y.key, u = y.type == "group", s = y.minimum === y.maximum && y.minimum === 1, i = y.asObject, S = u && !i, f = r.original ? y : I.clone(y);
2193
- f.trail = t.slice(), f.trail.push(v), f.path = f.trail.join("."), f.titles = n.slice(), f.titles.push(y.filterTitle || y.title || ""), (!S || r.includeLayout) && a.push(f);
2194
- var A = m && o >= m;
2192
+ var A = y.key, s = y.type == "group", o = y.minimum === y.maximum && y.minimum === 1, f = y.asObject, g = s && !f, c = r.original ? y : R.clone(y);
2193
+ c.trail = t.slice(), c.trail.push(A), c.path = c.trail.join("."), c.titles = n.slice(), c.titles.push(y.filterTitle || y.title || ""), (!g || r.includeLayout) && a.push(c);
2194
+ var b = m && i >= m;
2195
2195
  if (y.fields && y.fields.length)
2196
- if (S)
2196
+ if (g)
2197
2197
  y.fields.forEach(p);
2198
2198
  else {
2199
- if (A)
2199
+ if (b)
2200
2200
  return;
2201
- o++;
2202
- let b = v;
2203
- r.includeArrayDelimeter && (s || (b = `${v}${l}`)), t.push(b), n.push(y.filterTitle || y.title), y.fields.forEach(p), o--, t.pop(), n.pop();
2201
+ i++;
2202
+ let S = A;
2203
+ r.includeArrayDelimeter && (o || (S = `${A}${l}`)), t.push(S), n.push(y.filterTitle || y.title), y.fields.forEach(p), i--, t.pop(), n.pop();
2204
2204
  }
2205
2205
  }
2206
2206
  return a;
2207
2207
  };
2208
- I.mapParameters = function(e) {
2208
+ R.mapParameters = function(e) {
2209
2209
  e = e || {};
2210
2210
  var r = [];
2211
2211
  return Object.entries(e).forEach(function([a, t]) {
@@ -2214,13 +2214,13 @@ I.mapParameters = function(e) {
2214
2214
  }) : r.push(encodeURIComponent(a) + "=" + encodeURIComponent(t)));
2215
2215
  }), r.join("&");
2216
2216
  };
2217
- I.formatCurrency = function(e, r, a) {
2217
+ R.formatCurrency = function(e, r, a) {
2218
2218
  (!e || isNaN(e)) && (e = 0), a = a || 2;
2219
- var t = I.currencySymbol(r);
2219
+ var t = R.currencySymbol(r);
2220
2220
  return `${t}${parseFloat(Number(e) / 100).toFixed(a)}`;
2221
2221
  };
2222
- I.getTypeFromID = function(e) {
2223
- if (e = I.id(e), !e)
2222
+ R.getTypeFromID = function(e) {
2223
+ if (e = R.id(e), !e)
2224
2224
  return;
2225
2225
  const r = {
2226
2226
  21: "organisation",
@@ -2283,7 +2283,7 @@ I.getTypeFromID = function(e) {
2283
2283
  return r[a];
2284
2284
  };
2285
2285
  const St = { gbp: "£", eur: "€" };
2286
- I.currencySymbol = function(e) {
2286
+ R.currencySymbol = function(e) {
2287
2287
  return St[String(e).toLowerCase()] || "$";
2288
2288
  };
2289
2289
  const wt = [
@@ -2294,9 +2294,9 @@ const wt = [
2294
2294
  { code: "nzd", countries: ["NZ"] },
2295
2295
  { code: "sgd", countries: ["SG"] }
2296
2296
  ];
2297
- I.getAvailableCurrencies = function(e) {
2297
+ R.getAvailableCurrencies = function(e) {
2298
2298
  let r = wt.map(({ code: a, countries: t }) => ({
2299
- name: `${a.toUpperCase()} (${I.currencySymbol(a)})`,
2299
+ name: `${a.toUpperCase()} (${R.currencySymbol(a)})`,
2300
2300
  value: a,
2301
2301
  countryCode: Object.fromEntries(t.map((n) => [n, !0]))
2302
2302
  }));
@@ -2309,25 +2309,25 @@ I.getAvailableCurrencies = function(e) {
2309
2309
  }
2310
2310
  return r;
2311
2311
  };
2312
- I.hash = function(e, r) {
2312
+ R.hash = function(e, r) {
2313
2313
  return e = Array.isArray(e) ? e : [], e.reduce(function(a, t) {
2314
2314
  const n = r ? je(t, r) : t;
2315
2315
  return a[n] = t, a;
2316
2316
  }, {});
2317
2317
  };
2318
- I.extractFromArray = function(e, r, a, t, n, o, m) {
2319
- m = m || {}, a && (m.sum = a), t && (m.flatten = !0), n && (m.unique = !0), o && (m.excludeNull = !0);
2318
+ R.extractFromArray = function(e, r, a, t, n, i, m) {
2319
+ m = m || {}, a && (m.sum = a), t && (m.flatten = !0), n && (m.unique = !0), i && (m.excludeNull = !0);
2320
2320
  var l = e.reduce(function(p, y) {
2321
- var w = je(y, r), v = !w && w !== !1 && w !== 0;
2322
- return m.excludeNull && v || p.push(w), p;
2321
+ var w = je(y, r), A = !w && w !== !1 && w !== 0;
2322
+ return m.excludeNull && A || p.push(w), p;
2323
2323
  }, []);
2324
2324
  return m.flatten && (l = l.flat()), m.unique && (l = [...new Set(l)]), m.sum && (l = l.reduce(function(p, y) {
2325
2325
  return p + y;
2326
2326
  }, 0)), l;
2327
2327
  };
2328
- I.matchInArray = function(e, r, a, t) {
2329
- var n = e.filter(function(o) {
2330
- var m = je(o, r), l;
2328
+ R.matchInArray = function(e, r, a, t) {
2329
+ var n = e.filter(function(i) {
2330
+ var m = je(i, r), l;
2331
2331
  switch (t) {
2332
2332
  case "in":
2333
2333
  l = m.includes(a);
@@ -2353,53 +2353,53 @@ I.matchInArray = function(e, r, a, t) {
2353
2353
  });
2354
2354
  return n;
2355
2355
  };
2356
- I.comma = function(e, r, a) {
2356
+ R.comma = function(e, r, a) {
2357
2357
  return a && (e = e.slice(0, a)), e.filter(function(t) {
2358
2358
  return t != null && t !== void 0 && t !== "";
2359
2359
  }).map(function(t) {
2360
2360
  return r && r.length ? je(t, r) : t;
2361
2361
  }).join(", ");
2362
2362
  };
2363
- I.id = function(e) {
2363
+ R.id = function(e) {
2364
2364
  if (e) {
2365
2365
  var r;
2366
2366
  e._id ? r = String(e._id) : r = String(e);
2367
- var a = I.isValidID(r);
2367
+ var a = R.isValidID(r);
2368
2368
  if (a)
2369
2369
  return r;
2370
2370
  }
2371
2371
  };
2372
- I.ids = function(e) {
2372
+ R.ids = function(e) {
2373
2373
  if (!e)
2374
2374
  return [];
2375
2375
  var r = Object.keys(
2376
2376
  e.reduce(function(a, t) {
2377
2377
  if (!t)
2378
2378
  return a;
2379
- var n = I.id(t);
2379
+ var n = R.id(t);
2380
2380
  return n && (a[n] = 1), a;
2381
2381
  }, {})
2382
2382
  );
2383
2383
  return r;
2384
2384
  };
2385
- I.isValidID = function(e) {
2385
+ R.isValidID = function(e) {
2386
2386
  var r = new RegExp("^[0-9a-fA-F]{24}$");
2387
2387
  return r.test(String(e));
2388
2388
  };
2389
- I.errorMessage = function(e) {
2389
+ R.errorMessage = function(e) {
2390
2390
  if (!e)
2391
2391
  return;
2392
2392
  Array.isArray(e) && (e = e[0]);
2393
2393
  let r = e?.response?.data?.message || (typeof e?.response?.data == "string" ? e.response.data : null) || e?.message || null;
2394
2394
  return Array.isArray(r) && (r = r[0]), r || JSON.stringify(e);
2395
2395
  };
2396
- I.guid = function() {
2396
+ R.guid = function() {
2397
2397
  return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
2398
2398
  const r = Math.random() * 16 | 0;
2399
2399
  return (e === "x" ? r : r & 3 | 8).toString(16);
2400
2400
  });
2401
2401
  };
2402
- I.machineName = function(e) {
2402
+ R.machineName = function(e) {
2403
2403
  if (!(!e || !e.length)) {
2404
2404
  var r = /[^a-zA-Z0-9-_]+/g;
2405
2405
  return String(e).replace(r, " ").split("_").map((a) => At(a)).join("_");
@@ -2410,8 +2410,8 @@ function De() {
2410
2410
  dispatch(a, t) {
2411
2411
  const n = e.get(a);
2412
2412
  if (n)
2413
- for (const o of n)
2414
- o(t);
2413
+ for (const i of n)
2414
+ i(t);
2415
2415
  },
2416
2416
  addEventListener(a, t) {
2417
2417
  if (typeof t != "function")
@@ -2551,8 +2551,8 @@ class Et extends Ve {
2551
2551
  _setCookie(r, a, t = {}) {
2552
2552
  if (typeof document > "u") return;
2553
2553
  const n = { ...this.options, ...t };
2554
- let o = `${r}=${a}`;
2555
- n.domain && (o += `; Domain=${n.domain}`), n.secure && (o += "; Secure"), n.sameSite && (o += `; SameSite=${n.sameSite}`), n.maxAge && (o += `; Max-Age=${n.maxAge}`), document.cookie = o;
2554
+ let i = `${r}=${a}`;
2555
+ n.domain && (i += `; Domain=${n.domain}`), n.secure && (i += "; Secure"), n.sameSite && (i += `; SameSite=${n.sameSite}`), n.maxAge && (i += `; Max-Age=${n.maxAge}`), document.cookie = i;
2556
2556
  }
2557
2557
  /**
2558
2558
  * Delete a cookie
@@ -2634,103 +2634,103 @@ var Pt = function(e) {
2634
2634
  });
2635
2635
  const n = new De();
2636
2636
  n.bootstrap(t);
2637
- function o(l) {
2637
+ function i(l) {
2638
2638
  var p = r.getUser();
2639
2639
  t.onChange && t.onChange(p), n.dispatch("change", p, l);
2640
2640
  }
2641
2641
  t.set = function(l, p, y) {
2642
2642
  const w = r.getUser();
2643
2643
  if (JSON.stringify(w) != JSON.stringify(l) && (r.setUser(l), !y))
2644
- return o(p);
2644
+ return i(p);
2645
2645
  }, t.logout = function() {
2646
- return r.clearUser(), e.cache.reset(), o();
2646
+ return r.clearUser(), e.cache.reset(), i();
2647
2647
  }, t.changeOrganisation = function(l, p) {
2648
2648
  l = e.utils.id(l), p || (p = {});
2649
2649
  var y = !0;
2650
- return p.disableAutoAuthentication && (y = !1), new Promise(function(w, v) {
2651
- e.api.post(`/user/switch/${l}`).then(function(u) {
2652
- y && (e.cache.reset(), t.set(u.data)), w(u.data);
2653
- }).catch(v);
2650
+ return p.disableAutoAuthentication && (y = !1), new Promise(function(w, A) {
2651
+ e.api.post(`/user/switch/${l}`).then(function(s) {
2652
+ y && (e.cache.reset(), t.set(s.data)), w(s.data);
2653
+ }).catch(A);
2654
2654
  });
2655
2655
  }, t.impersonate = function(l, p) {
2656
2656
  l = e.utils.id(l), p || (p = {});
2657
2657
  var y = !0;
2658
2658
  p.disableAutoAuthentication && (y = !1);
2659
2659
  var w = e.api.post(`/user/impersonate/${l}`);
2660
- return w.then(function(v) {
2661
- y && (e.cache.reset(), t.set(v.data));
2662
- }, function(v) {
2660
+ return w.then(function(A) {
2661
+ y && (e.cache.reset(), t.set(A.data));
2662
+ }, function(A) {
2663
2663
  }), w;
2664
2664
  }, t.login = async function(l, p) {
2665
2665
  p || (p = {});
2666
2666
  var y = !0;
2667
2667
  p.disableAutoAuthentication && (y = !1);
2668
- var w = new Promise(v);
2669
- function v(u, s) {
2668
+ var w = new Promise(A);
2669
+ function A(s, o) {
2670
2670
  if (!l)
2671
- return s({
2671
+ return o({
2672
2672
  message: "Login requires an email and password"
2673
2673
  });
2674
2674
  if (!l.email || !l.email.length)
2675
- return s({
2675
+ return o({
2676
2676
  message: "An email address is required to log in"
2677
2677
  });
2678
2678
  if (!l.password || !l.password.length)
2679
- return s({
2679
+ return o({
2680
2680
  message: "A password is required to log in"
2681
2681
  });
2682
- var i = {
2682
+ var f = {
2683
2683
  bypassInterceptor: !0
2684
2684
  };
2685
- r.isCookieMode && r.isCookieMode() && (l.useCookies = !0, i.withCredentials = !0);
2686
- var f = `${e.apiURL}/user/login`;
2687
- p.url && (f = p.url), e.api.post(f, l, i).then(function(c) {
2688
- y && t.set(c.data), u(c);
2689
- }, s);
2685
+ r.isCookieMode && r.isCookieMode() && (l.useCookies = !0, f.withCredentials = !0);
2686
+ var c = `${e.apiURL}/user/login`;
2687
+ p.url && (c = p.url), e.api.post(c, l, f).then(function(u) {
2688
+ y && t.set(u.data), s(u);
2689
+ }, o);
2690
2690
  }
2691
2691
  return w;
2692
2692
  }, t.signup = async function(l, p) {
2693
2693
  p || (p = {});
2694
2694
  var y = !0;
2695
2695
  p.disableAutoAuthentication && (y = !1);
2696
- var w = new Promise(v);
2697
- function v(u, s) {
2696
+ var w = new Promise(A);
2697
+ function A(s, o) {
2698
2698
  if (!l)
2699
- return s({
2699
+ return o({
2700
2700
  message: "Signup details are required"
2701
2701
  });
2702
2702
  if (!l.firstName || !l.firstName.length)
2703
- return s({
2703
+ return o({
2704
2704
  message: "Please provide a first name"
2705
2705
  });
2706
2706
  if (!l.lastName || !l.lastName.length)
2707
- return s({
2707
+ return o({
2708
2708
  message: "Please provide a last name"
2709
2709
  });
2710
2710
  if (!l.email || !l.email.length)
2711
- return s({
2711
+ return o({
2712
2712
  message: "An email address is required to sign up"
2713
2713
  });
2714
2714
  if (!l.password || !l.password.length)
2715
- return s({
2715
+ return o({
2716
2716
  message: "A password is required to sign up"
2717
2717
  });
2718
2718
  if (!l.confirmPassword || !l.confirmPassword.length)
2719
- return s({
2719
+ return o({
2720
2720
  message: "Please confirm your password"
2721
2721
  });
2722
2722
  if (l.confirmPassword != l.password)
2723
- return s({
2723
+ return o({
2724
2724
  message: "Password and confirmation do not match"
2725
2725
  });
2726
- var i = {
2726
+ var f = {
2727
2727
  bypassInterceptor: !0
2728
2728
  };
2729
- r.isCookieMode && r.isCookieMode() && (l.useCookies = !0, i.withCredentials = !0);
2730
- var f = `${e.apiURL}/user/signup`;
2731
- p.application && (f = `${e.domain || ""}/qik/application/signup`), p.url && (f = p.url), e.api.post(f, l, i).then(function(c) {
2732
- y && t.set(c.data), u(c);
2733
- }, s);
2729
+ r.isCookieMode && r.isCookieMode() && (l.useCookies = !0, f.withCredentials = !0);
2730
+ var c = `${e.apiURL}/user/signup`;
2731
+ p.application && (c = `${e.domain || ""}/qik/application/signup`), p.url && (c = p.url), e.api.post(c, l, f).then(function(u) {
2732
+ y && t.set(u.data), s(u);
2733
+ }, o);
2734
2734
  }
2735
2735
  return w;
2736
2736
  }, t.retrieveUserFromResetToken = async function(l, p) {
@@ -2738,30 +2738,30 @@ var Pt = function(e) {
2738
2738
  var y = {
2739
2739
  bypassInterceptor: !0
2740
2740
  };
2741
- return new Promise(function(w, v) {
2742
- e.api.get(p.url || `${e.apiURL}/user/reset/${l}`, y).then(function(u) {
2743
- return w(u.data);
2744
- }, v);
2741
+ return new Promise(function(w, A) {
2742
+ e.api.get(p.url || `${e.apiURL}/user/reset/${l}`, y).then(function(s) {
2743
+ return w(s.data);
2744
+ }, A);
2745
2745
  });
2746
2746
  }, t.updateUserWithToken = async function(l, p, y) {
2747
2747
  y || (y = {});
2748
2748
  var w = !0;
2749
- return y.disableAutoAuthentication && (w = !1), new Promise(function(v, u) {
2750
- var s = {
2749
+ return y.disableAutoAuthentication && (w = !1), new Promise(function(A, s) {
2750
+ var o = {
2751
2751
  bypassInterceptor: !0
2752
2752
  };
2753
- e.api.post(y.url || `${e.apiURL}/user/reset/${l}`, p, s).then(function(i) {
2754
- return w && (e.cache.reset(), t.set(i.data)), v(i.data);
2755
- }, u);
2753
+ e.api.post(y.url || `${e.apiURL}/user/reset/${l}`, p, o).then(function(f) {
2754
+ return w && (e.cache.reset(), t.set(f.data)), A(f.data);
2755
+ }, s);
2756
2756
  });
2757
2757
  }, t.sendResetPasswordRequest = function(l, p) {
2758
2758
  return p || (p = {}), l ? !l.email || !l.email.length ? Promise.reject({
2759
2759
  message: "An email address is required for password reset"
2760
2760
  }) : new Promise(function(y, w) {
2761
- var v = {
2761
+ var A = {
2762
2762
  bypassInterceptor: !0
2763
2763
  };
2764
- e.api.post(p.url || `${e.apiURL}/user/forgot`, l, v).then(y, w);
2764
+ e.api.post(p.url || `${e.apiURL}/user/forgot`, l, A).then(y, w);
2765
2765
  }) : Promise.reject({
2766
2766
  message: "Please provide your account details to reset your password"
2767
2767
  });
@@ -2774,10 +2774,10 @@ var Pt = function(e) {
2774
2774
  var { token: w } = p;
2775
2775
  if (!w)
2776
2776
  return Promise.reject("No token");
2777
- var v = /* @__PURE__ */ new Date();
2778
- v.setSeconds(v.getSeconds() + a);
2779
- var u = new Date(w.expires);
2780
- return l ? await t.refreshAccessToken(w.refreshToken) : v < u ? w : await t.refreshAccessToken(w.refreshToken);
2777
+ var A = /* @__PURE__ */ new Date();
2778
+ A.setSeconds(A.getSeconds() + a);
2779
+ var s = new Date(w.expires);
2780
+ return l ? await t.refreshAccessToken(w.refreshToken) : A < s ? w : await t.refreshAccessToken(w.refreshToken);
2781
2781
  };
2782
2782
  const m = {};
2783
2783
  return t.refreshAccessToken = async function(l) {
@@ -2785,33 +2785,33 @@ var Pt = function(e) {
2785
2785
  return m.inflightRefreshRequest;
2786
2786
  const p = r.isCookieMode && r.isCookieMode();
2787
2787
  return m.inflightRefreshRequest = new Promise(function(y, w) {
2788
- let v = {}, u = {
2788
+ let A = {}, s = {
2789
2789
  bypassInterceptor: !0,
2790
2790
  withoutToken: !0
2791
2791
  };
2792
2792
  if (p)
2793
- u.withCredentials = !0;
2793
+ s.withCredentials = !0;
2794
2794
  else {
2795
2795
  if (!l)
2796
2796
  return m.inflightRefreshRequest = null, w(new Error("No refresh token provided for localStorage mode"));
2797
- v.refreshToken = l;
2797
+ A.refreshToken = l;
2798
2798
  }
2799
- e.api.post("/user/refresh", v, u).then(function(i) {
2800
- if (!i || !i.data)
2799
+ e.api.post("/user/refresh", A, s).then(function(f) {
2800
+ if (!f || !f.data)
2801
2801
  return m.inflightRefreshRequest = null, w(new Error("Invalid refresh response"));
2802
- if (t.set(i.data), o(), p)
2802
+ if (t.set(f.data), i(), p)
2803
2803
  y("cookie_token_refreshed");
2804
2804
  else {
2805
- const S = i.data.token?.accessToken;
2806
- S ? y(S) : w(new Error("No access token in refresh response"));
2805
+ const g = f.data.token?.accessToken;
2806
+ g ? y(g) : w(new Error("No access token in refresh response"));
2807
2807
  }
2808
2808
  setTimeout(function() {
2809
2809
  m.inflightRefreshRequest = null;
2810
2810
  });
2811
- }).catch(function(s) {
2811
+ }).catch(function(o) {
2812
2812
  setTimeout(function() {
2813
2813
  m.inflightRefreshRequest = null;
2814
- }), w(s);
2814
+ }), w(o);
2815
2815
  });
2816
2816
  }), m.inflightRefreshRequest;
2817
2817
  }, t.sync = function() {
@@ -2825,9 +2825,9 @@ var Pt = function(e) {
2825
2825
  t.set(l.data);
2826
2826
  } else
2827
2827
  t.set(null);
2828
- o();
2828
+ i();
2829
2829
  }).catch(function(l) {
2830
- t.set(null), o();
2830
+ t.set(null), i();
2831
2831
  });
2832
2832
  }, t.getCurrentUser = function() {
2833
2833
  return r.getUser();
@@ -2848,25 +2848,25 @@ var Pt = function(e) {
2848
2848
  var p = l;
2849
2849
  if (r.isCookieMode && r.isCookieMode())
2850
2850
  return p.withCredentials || (p.withCredentials = !0), p;
2851
- var w = t.getCurrentUser(), v, u, s;
2851
+ var w = t.getCurrentUser(), A, s, o;
2852
2852
  if (w) {
2853
- var { token: i } = w;
2854
- i && (v = i.accessToken, u = i.refreshToken, s = i.expires);
2853
+ var { token: f } = w;
2854
+ f && (A = f.accessToken, s = f.refreshToken, o = f.expires);
2855
2855
  }
2856
- if (v)
2857
- p.headers.Authorization = `Bearer ${v}`;
2856
+ if (A)
2857
+ p.headers.Authorization = `Bearer ${A}`;
2858
2858
  else
2859
2859
  return p;
2860
- if (!u)
2860
+ if (!s)
2861
2861
  return p;
2862
- var S = /* @__PURE__ */ new Date();
2863
- S.setSeconds(S.getSeconds() + a);
2864
- var f = new Date(s);
2865
- return S < f ? p : new Promise(async function(c, A) {
2866
- await t.refreshAccessToken(u).then(function(b) {
2867
- return p.headers.Authorization = `Bearer ${b}`, c(p);
2868
- }).catch(function(b) {
2869
- return A(b);
2862
+ var g = /* @__PURE__ */ new Date();
2863
+ g.setSeconds(g.getSeconds() + a);
2864
+ var c = new Date(o);
2865
+ return g < c ? p : new Promise(async function(u, b) {
2866
+ await t.refreshAccessToken(s).then(function(S) {
2867
+ return p.headers.Authorization = `Bearer ${S}`, u(p);
2868
+ }).catch(function(S) {
2869
+ return b(S);
2870
2870
  });
2871
2871
  });
2872
2872
  },
@@ -2928,8 +2928,8 @@ q.activeFilters = function(e) {
2928
2928
  return a(e, r), r;
2929
2929
  function a(t, n) {
2930
2930
  if (t) {
2931
- var o = q.isValidFilter(t);
2932
- o && n.push(t), t.filters && t.filters.length && t.filters.forEach(function(m) {
2931
+ var i = q.isValidFilter(t);
2932
+ i && n.push(t), t.filters && t.filters.length && t.filters.forEach(function(m) {
2933
2933
  a(m, n);
2934
2934
  });
2935
2935
  }
@@ -2937,11 +2937,11 @@ q.activeFilters = function(e) {
2937
2937
  };
2938
2938
  q.activeFilterKeys = function(e, r) {
2939
2939
  r = r || {};
2940
- var a = q.activeFilters(e), t = a.filter(function(o) {
2941
- return !o.operator;
2942
- }).reduce(function(o, m) {
2940
+ var a = q.activeFilters(e), t = a.filter(function(i) {
2941
+ return !i.operator;
2942
+ }).reduce(function(i, m) {
2943
2943
  var l = q.cleanKey(m.key);
2944
- return r.trimArrayDelimeters !== !1 && (l = l.split("[]").join("")), o[l] = !0, o;
2944
+ return r.trimArrayDelimeters !== !1 && (l = l.split("[]").join("")), i[l] = !0, i;
2945
2945
  }, {}), n = Object.keys(t);
2946
2946
  return n;
2947
2947
  };
@@ -2963,14 +2963,14 @@ q.activeFilterOperators = function(e) {
2963
2963
  };
2964
2964
  q.activeFilterValues = function(e, r) {
2965
2965
  var a = q.activeFilters(e);
2966
- function t(o) {
2967
- if (o)
2968
- return o._id || o.id || o.title || o.name || o;
2969
- }
2970
- var n = a.filter(function(o) {
2971
- return !o.operator;
2972
- }).reduce(function(o, m) {
2973
- return o = [...o, ...(m.values || []).map(t), t(m.value), t(m.value2)], o;
2966
+ function t(i) {
2967
+ if (i)
2968
+ return i._id || i.id || i.title || i.name || i;
2969
+ }
2970
+ var n = a.filter(function(i) {
2971
+ return !i.operator;
2972
+ }).reduce(function(i, m) {
2973
+ return i = [...i, ...(m.values || []).map(t), t(m.value), t(m.value2)], i;
2974
2974
  }, []).filter(Kr);
2975
2975
  return n;
2976
2976
  };
@@ -2980,19 +2980,19 @@ q.filterChangeString = function(e) {
2980
2980
  };
2981
2981
  function Ct(e) {
2982
2982
  var r = {};
2983
- return r.downloadUrl = function(a, t, n, o) {
2984
- return o = o || {}, n = n || {}, n.download = !0, t = e.utils.id(t), e.api.generateEndpointURL(`/${a}/${t}`, n, o);
2983
+ return r.downloadUrl = function(a, t, n, i) {
2984
+ return i = i || {}, n = n || {}, n.download = !0, t = e.utils.id(t), e.api.generateEndpointURL(`/${a}/${t}`, n, i);
2985
2985
  }, r.duration = function(a) {
2986
- const t = Math.round(a), n = Math.floor(t / 3600), o = Math.floor(t % 3600 / 60), m = t % 60;
2987
- return n > 0 ? `${n}:${o.toString().padStart(2, "0")}:${m.toString().padStart(2, "0")}` : `${o}:${m.toString().padStart(2, "0")}`;
2988
- }, r.mediaUrl = function(a, t, n, o) {
2989
- o = o || {}, n = n || {}, t = e.utils.id(t);
2986
+ const t = Math.round(a), n = Math.floor(t / 3600), i = Math.floor(t % 3600 / 60), m = t % 60;
2987
+ return n > 0 ? `${n}:${i.toString().padStart(2, "0")}:${m.toString().padStart(2, "0")}` : `${i}:${m.toString().padStart(2, "0")}`;
2988
+ }, r.mediaUrl = function(a, t, n, i) {
2989
+ i = i || {}, n = n || {}, t = e.utils.id(t);
2990
2990
  let m = `/${a}/${t}`;
2991
- return o.extension?.length && (o.extension.includes(".") ? m = `${m}/${o.extension}` : m = `${m}/${a}.${o.extension}`), e.api.generateEndpointURL(m, n, o);
2991
+ return i.extension?.length && (i.extension.includes(".") ? m = `${m}/${i.extension}` : m = `${m}/${a}.${i.extension}`), e.api.generateEndpointURL(m, n, i);
2992
2992
  }, r.filesize = function(a, t) {
2993
2993
  if (a == 0) return "0 Bytes";
2994
- var n = 1024, o = t || 2, m = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], l = Math.floor(Math.log(a) / Math.log(n));
2995
- return parseFloat((a / Math.pow(n, l)).toFixed(o)) + " " + m[l];
2994
+ var n = 1024, i = t || 2, m = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], l = Math.floor(Math.log(a) / Math.log(n));
2995
+ return parseFloat((a / Math.pow(n, l)).toFixed(i)) + " " + m[l];
2996
2996
  }, r.getBinaryTypeFromMime = function(a) {
2997
2997
  if (!a)
2998
2998
  return "file";
@@ -3063,47 +3063,17 @@ var Ue = {}, Ot = {
3063
3063
  "Can't Instantiate QikAccess before QikCore.utils has been initialized"
3064
3064
  );
3065
3065
  var r = {};
3066
- return r.featureFlags = {
3067
- all: 1,
3068
- impersonation: 2,
3069
- products: 4,
3070
- checkin: 8,
3071
- events: 16,
3072
- ticketing: 32,
3073
- emails: 64,
3074
- sms: 128,
3075
- images: 256,
3076
- actions: 512,
3077
- timers: 1024,
3078
- listenertriggers: 2048,
3079
- builder: 4096,
3080
- scopes: 8192,
3081
- components: 16384,
3082
- video: 32768,
3083
- audio: 65536,
3084
- files: 131072,
3085
- developer: 262144,
3086
- notifications: 524288,
3087
- payments: 1048576,
3088
- comments: 2097152,
3089
- workflows: 4194304,
3090
- forms: 8388608
3091
- }, r.featureIsIncludedInByteflag = function(a, t) {
3092
- return (a & r.featureFlags[t]) === r.featureFlags[t];
3093
- }, r.hasFeature = function(a, t) {
3094
- const n = a?.organisation || {}, o = n.features || {};
3095
- if (o.all || o[t])
3096
- return !0;
3097
- const m = n.ff;
3098
- return r.featureIsIncludedInByteflag(m, "all") ? !0 : r.featureIsIncludedInByteflag(m, t);
3066
+ return r.hasFeature = function(a, t) {
3067
+ const n = a?.organisation?.features || {};
3068
+ return n.all ? !0 : !!n[t];
3099
3069
  }, r.isAdministrator = function(a) {
3100
3070
  return a && a?.userType == "administrator";
3101
3071
  }, r.getAllDescendants = function(a) {
3102
3072
  var t = [];
3103
3073
  n(a);
3104
- function n(o) {
3105
- var m = e.utils.id(o);
3106
- t.push(m), (o.children || []).forEach(function(l) {
3074
+ function n(i) {
3075
+ var m = e.utils.id(i);
3076
+ t.push(m), (i.children || []).forEach(function(l) {
3107
3077
  n(l);
3108
3078
  });
3109
3079
  }
@@ -3111,8 +3081,8 @@ var Ue = {}, Ot = {
3111
3081
  }, r.hashPermissions = function(a) {
3112
3082
  var t = {};
3113
3083
  for (var n in a?.permissions || {}) {
3114
- var o = a?.permissions[n], m = r.getAllDescendants(o);
3115
- (o.permissions || []).forEach(function(l) {
3084
+ var i = a?.permissions[n], m = r.getAllDescendants(i);
3085
+ (i.permissions || []).forEach(function(l) {
3116
3086
  t[l] || (t[l] = []), t[l] = [
3117
3087
  ...new Set(t[l].concat(m))
3118
3088
  ];
@@ -3121,50 +3091,50 @@ var Ue = {}, Ot = {
3121
3091
  return t;
3122
3092
  }, r.allUserScopes = function(a) {
3123
3093
  var t = {}, n = a?.permissions || {};
3124
- function o(l) {
3094
+ function i(l) {
3125
3095
  if (l) {
3126
3096
  var p = e.utils.id(l);
3127
3097
  p && (t[p] = 1, l.children && l.children.length && l.children.forEach(function(y) {
3128
- o(y);
3098
+ i(y);
3129
3099
  }));
3130
3100
  }
3131
3101
  }
3132
3102
  for (var m in n)
3133
- o(n[m]);
3103
+ i(n[m]);
3134
3104
  return Object.keys(t);
3135
- }, r.actionableScopes = function(a, t, n, o, m) {
3105
+ }, r.actionableScopes = function(a, t, n, i, m) {
3136
3106
  m = m || {};
3137
3107
  var l = [];
3138
3108
  if (a?.userType == "administrator")
3139
3109
  l = r.allUserScopes(a, m);
3140
3110
  else {
3141
- var p = r.hashPermissions(a), y = n || o;
3111
+ var p = r.hashPermissions(a), y = n || i;
3142
3112
  if (!y)
3143
3113
  return l;
3144
- let w = n ? p[`${n}.${t}`] || [] : [], v = o ? p[`${o}.${t}`] || [] : [];
3145
- l = [...w, ...v];
3114
+ let w = n ? p[`${n}.${t}`] || [] : [], A = i ? p[`${i}.${t}`] || [] : [];
3115
+ l = [...w, ...A];
3146
3116
  }
3147
3117
  return l || [];
3148
3118
  }, r.isOwner = function(a, t) {
3149
- var n = e.utils.id(a), o = e.utils.id(a?.persona), m = t.meta;
3119
+ var n = e.utils.id(a), i = e.utils.id(a?.persona), m = t.meta;
3150
3120
  if (!m)
3151
3121
  return !1;
3152
3122
  var l = m.userOwners || [], p = e.utils.ids([...l, m.userAuthor]), y = e.utils.hash(p);
3153
3123
  if (y[n])
3154
3124
  return !0;
3155
- var w = m.personaOwners || [], v = e.utils.ids([
3125
+ var w = m.personaOwners || [], A = e.utils.ids([
3156
3126
  ...w,
3157
3127
  m.personaAuthor
3158
- ]), u = e.utils.hash(v);
3159
- return u[o] ? !0 : r.isAssignee(a, t);
3128
+ ]), s = e.utils.hash(A);
3129
+ return s[i] ? !0 : r.isAssignee(a, t);
3160
3130
  }, r.isAssignee = function(a, t) {
3161
3131
  const n = e.utils.ids(a?.profiles);
3162
3132
  if (!n.length)
3163
3133
  return !1;
3164
- const o = e.utils.ids(t.assignees);
3165
- if (!o.length)
3134
+ const i = e.utils.ids(t.assignees);
3135
+ if (!i.length)
3166
3136
  return !1;
3167
- const m = new Set(o);
3137
+ const m = new Set(i);
3168
3138
  return !!n.filter((y) => m.has(y)).length;
3169
3139
  }, r.allPermissions = function(a) {
3170
3140
  var t = Object.values(a?.permissions || {}).map(function(n) {
@@ -3172,21 +3142,21 @@ var Ue = {}, Ot = {
3172
3142
  }).flat();
3173
3143
  return t;
3174
3144
  }, r.allPermissionTypes = function(a, t) {
3175
- return t ? r.allPermissions(a).reduce(function(n, o) {
3176
- var m = o.split(".")[0];
3145
+ return t ? r.allPermissions(a).reduce(function(n, i) {
3146
+ var m = i.split(".")[0];
3177
3147
  return n[m] = !0, n;
3178
3148
  }, {}) : r.allPermissions(a).map(function(n) {
3179
3149
  return n.split(".")[0];
3180
3150
  });
3181
3151
  }, r.canKnowOf = function(a, t, n) {
3182
3152
  return n = n || {}, n.cache = n.cache || {}, r.allPermissionTypes(a, !0)[t];
3183
- }, r.checkActionAccess = function(a, t, n, o, m) {
3153
+ }, r.checkActionAccess = function(a, t, n, i, m) {
3184
3154
  if (m = m || {}, m.cache = m.cache || {}, r.isAdministrator(a))
3185
3155
  return !0;
3186
3156
  var l = t.meta?.type, p = t.meta?.definition || l;
3187
3157
  if (!p)
3188
3158
  return !1;
3189
- if ((n == "listany" || o == "listown") && l === "scope") {
3159
+ if ((n == "listany" || i == "listown") && l === "scope") {
3190
3160
  var y = e.utils.id(t);
3191
3161
  return !!a.permissions[y];
3192
3162
  }
@@ -3195,38 +3165,38 @@ var Ue = {}, Ot = {
3195
3165
  ...e.utils.ids(t.path || []),
3196
3166
  e.utils.id(t)
3197
3167
  ]);
3198
- var v, u = `access-${a?.cacheKey}-${n}-${p}-${l}`;
3199
- if (m.cache[u])
3200
- v = m.cache[u];
3168
+ var A, s = `access-${a?.cacheKey}-${n}-${p}-${l}`;
3169
+ if (m.cache[s])
3170
+ A = m.cache[s];
3201
3171
  else {
3202
- var s = e.utils.ids(
3172
+ var o = e.utils.ids(
3203
3173
  r.actionableScopes(a, n, p, l, m)
3204
3174
  );
3205
- v = e.utils.hash(s), m.cache[u] = v;
3175
+ A = e.utils.hash(o), m.cache[s] = A;
3206
3176
  }
3207
- if (v) {
3208
- var i = w.some(function(P) {
3209
- return v[P];
3177
+ if (A) {
3178
+ var f = w.some(function(P) {
3179
+ return A[P];
3210
3180
  });
3211
- if (i)
3181
+ if (f)
3212
3182
  return !0;
3213
3183
  }
3214
- var S = r.isOwner(a, t);
3215
- if (S) {
3216
- var f, c = `access-${a?.cacheKey}-${o}-${p}-${l}`;
3217
- if (m.cache[c])
3218
- f = m.cache[c];
3184
+ var g = r.isOwner(a, t);
3185
+ if (g) {
3186
+ var c, u = `access-${a?.cacheKey}-${i}-${p}-${l}`;
3187
+ if (m.cache[u])
3188
+ c = m.cache[u];
3219
3189
  else {
3220
- var A = e.utils.ids(
3221
- r.actionableScopes(a, o, p, l, m)
3190
+ var b = e.utils.ids(
3191
+ r.actionableScopes(a, i, p, l, m)
3222
3192
  );
3223
- f = e.utils.hash(A), m.cache[c] = f;
3193
+ c = e.utils.hash(b), m.cache[u] = c;
3224
3194
  }
3225
- if (f) {
3226
- var b = w.some(function(P) {
3227
- return f[P];
3195
+ if (c) {
3196
+ var S = w.some(function(P) {
3197
+ return c[P];
3228
3198
  });
3229
- if (b)
3199
+ if (S)
3230
3200
  return !0;
3231
3201
  }
3232
3202
  }
@@ -3236,8 +3206,8 @@ var Ue = {}, Ot = {
3236
3206
  return !0;
3237
3207
  var n = r.hashPermissions(a);
3238
3208
  return n[t];
3239
- }, r.canCreate = function(a, t, n, o) {
3240
- if (o = o || {}, o.cache = o.cache || {}, r.isAdministrator(a))
3209
+ }, r.canCreate = function(a, t, n, i) {
3210
+ if (i = i || {}, i.cache = i.cache || {}, r.isAdministrator(a))
3241
3211
  return !0;
3242
3212
  var m = r.actionableScopes(
3243
3213
  a,
@@ -3248,40 +3218,40 @@ var Ue = {}, Ot = {
3248
3218
  return m.length;
3249
3219
  }, r.canListItem = function(a, t, n) {
3250
3220
  n = n || {}, n.cache = n.cache || {};
3251
- var o = r.checkActionAccess(
3221
+ var i = r.checkActionAccess(
3252
3222
  a,
3253
3223
  t,
3254
3224
  "listany",
3255
3225
  "listown",
3256
3226
  n
3257
3227
  );
3258
- if (o)
3228
+ if (i)
3259
3229
  return !0;
3260
3230
  var m = r.canViewItem(a, t, n);
3261
3231
  return !!m;
3262
3232
  }, r.canViewItem = function(a, t, n) {
3263
3233
  n = n || {}, n.cache = n.cache || {};
3264
- var o = r.checkActionAccess(
3234
+ var i = r.checkActionAccess(
3265
3235
  a,
3266
3236
  t,
3267
3237
  "viewany",
3268
3238
  "viewOwn",
3269
3239
  n
3270
3240
  );
3271
- if (o)
3241
+ if (i)
3272
3242
  return !0;
3273
3243
  var m = r.canEditItem(a, t, n);
3274
3244
  return !!m;
3275
3245
  }, r.canEditItem = function(a, t, n) {
3276
3246
  n = n || {}, n.cache = n.cache || {};
3277
- var o = r.checkActionAccess(
3247
+ var i = r.checkActionAccess(
3278
3248
  a,
3279
3249
  t,
3280
3250
  "editany",
3281
3251
  "editown",
3282
3252
  n
3283
3253
  );
3284
- return o;
3254
+ return i;
3285
3255
  }, r.canDeleteItem = function(a, t, n) {
3286
3256
  return n = n || {}, n.cache = n.cache || {}, r.checkActionAccess(
3287
3257
  a,
@@ -3308,7 +3278,7 @@ var Ue = {}, Ot = {
3308
3278
  );
3309
3279
  }, r;
3310
3280
  };
3311
- function It(e) {
3281
+ function Rt(e) {
3312
3282
  if (!e.api)
3313
3283
  throw new Error("Can't Instantiate QikContent before QikAPI exists");
3314
3284
  var r = {
@@ -3317,144 +3287,144 @@ function It(e) {
3317
3287
  };
3318
3288
  const a = {};
3319
3289
  let t;
3320
- r.variables = async function(u, s) {
3321
- s = s || {}, u = u || [];
3322
- var i = s.refresh || s.reload || !a.data;
3323
- if (i) {
3290
+ r.variables = async function(s, o) {
3291
+ o = o || {}, s = s || [];
3292
+ var f = o.refresh || o.reload || !a.data;
3293
+ if (f) {
3324
3294
  if (!t) {
3325
- let f = function() {
3295
+ let c = function() {
3326
3296
  t = null;
3327
3297
  };
3328
- t = e.api.post("/variables", { keys: u }), t.then(f, f);
3298
+ t = e.api.post("/variables", { keys: s }), t.then(c, c);
3329
3299
  }
3330
- const { data: S } = await t;
3331
- a.data = S, e.dispatch("variables", S);
3300
+ const { data: g } = await t;
3301
+ a.data = g, e.dispatch("variables", g);
3332
3302
  }
3333
3303
  return a.data;
3334
3304
  };
3335
3305
  const n = e.cache.get("user:glossary");
3336
- let o;
3306
+ let i;
3337
3307
  function m() {
3338
- return new Promise((u) => {
3339
- typeof requestIdleCallback == "function" ? requestIdleCallback(u, { timeout: 50 }) : setTimeout(u, 0);
3308
+ return new Promise((s) => {
3309
+ typeof requestIdleCallback == "function" ? requestIdleCallback(s, { timeout: 50 }) : setTimeout(s, 0);
3340
3310
  });
3341
3311
  }
3342
- async function l({ _s: u, _k: s, types: i }) {
3343
- function S(A) {
3344
- if (typeof A == "string" && A[0] === "~")
3345
- return u[parseInt(A.slice(1))];
3346
- if (Array.isArray(A)) return A.map(S);
3347
- if (A && typeof A == "object") {
3348
- const b = {};
3349
- for (const [P, x] of Object.entries(A))
3350
- b[s[P] || P] = S(x);
3351
- return b;
3312
+ async function l({ _s: s, _k: o, types: f }) {
3313
+ function g(b) {
3314
+ if (typeof b == "string" && b[0] === "~")
3315
+ return s[parseInt(b.slice(1))];
3316
+ if (Array.isArray(b)) return b.map(g);
3317
+ if (b && typeof b == "object") {
3318
+ const S = {};
3319
+ for (const [P, x] of Object.entries(b))
3320
+ S[o[P] || P] = g(x);
3321
+ return S;
3352
3322
  }
3353
- return A;
3323
+ return b;
3354
3324
  }
3355
- const f = 50, c = [];
3356
- for (let A = 0; A < i.length; A += f) {
3357
- const b = i.slice(A, A + f);
3358
- c.push(...b.map(S)), A + f < i.length && await m();
3325
+ const c = 50, u = [];
3326
+ for (let b = 0; b < f.length; b += c) {
3327
+ const S = f.slice(b, b + c);
3328
+ u.push(...S.map(g)), b + c < f.length && await m();
3359
3329
  }
3360
- return c;
3330
+ return u;
3361
3331
  }
3362
- r.glossary = async function(u) {
3363
- u = u || {};
3364
- let s = n.get("glossary"), S = !!!u.uncompressed;
3365
- var f = u.refresh || u.reload || !s;
3366
- if (f) {
3367
- if (!o) {
3332
+ r.glossary = async function(s) {
3333
+ s = s || {};
3334
+ let o = n.get("glossary"), g = !!!s.uncompressed;
3335
+ var c = s.refresh || s.reload || !o;
3336
+ if (c) {
3337
+ if (!i) {
3368
3338
  let x = function() {
3369
- o = null, r.loadingGlossary = !1;
3339
+ i = null, r.loadingGlossary = !1;
3370
3340
  };
3371
3341
  r.loadingGlossary = !0;
3372
- const P = S ? "/glossary/compressed" : "/glossary";
3373
- o = e.api.get(P, { cache: !1 }), o.then(x, x);
3342
+ const P = g ? "/glossary/compressed" : "/glossary";
3343
+ i = e.api.get(P, { cache: !1 }), i.then(x, x);
3374
3344
  }
3375
- const { data: A } = await o, b = A._s && A._k && A.types ? await l(A) : A;
3376
- n.set("glossary", b), s = b, e.dispatch("glossary", b);
3345
+ const { data: b } = await i, S = b._s && b._k && b.types ? await l(b) : b;
3346
+ n.set("glossary", S), o = S, e.dispatch("glossary", S);
3377
3347
  }
3378
- if (u.hash) {
3379
- var c = e.utils.hash(s, "key");
3380
- return c;
3348
+ if (s.hash) {
3349
+ var u = e.utils.hash(o, "key");
3350
+ return u;
3381
3351
  }
3382
- if (u.hex) {
3383
- var c = e.utils.hash(s, "hex");
3384
- return c;
3352
+ if (s.hex) {
3353
+ var u = e.utils.hash(o, "hex");
3354
+ return u;
3385
3355
  }
3386
- return s;
3356
+ return o;
3387
3357
  };
3388
3358
  const p = {};
3389
3359
  let y;
3390
- r.scopeGlossary = async function(u) {
3391
- u = u || {};
3392
- var s = u.refresh || u.reload || !p.data;
3393
- if (s) {
3360
+ r.scopeGlossary = async function(s) {
3361
+ s = s || {};
3362
+ var o = s.refresh || s.reload || !p.data;
3363
+ if (o) {
3394
3364
  if (!y) {
3395
- let f = function() {
3365
+ let c = function() {
3396
3366
  y = null;
3397
3367
  };
3398
3368
  y = e.api.get("/scope/glossary", {
3399
3369
  cache: !1
3400
- }), y.then(f, f);
3370
+ }), y.then(c, c);
3401
3371
  }
3402
- const { data: S } = await y;
3403
- p.data = S;
3372
+ const { data: g } = await y;
3373
+ p.data = g;
3404
3374
  }
3405
- if (u.hash) {
3406
- var i = e.utils.hash(p.data, "_id");
3407
- return i;
3375
+ if (s.hash) {
3376
+ var f = e.utils.hash(p.data, "_id");
3377
+ return f;
3408
3378
  }
3409
3379
  return p.data;
3410
3380
  };
3411
3381
  const w = {};
3412
- r.comparators = async function(u) {
3413
- u = u || {};
3414
- var s = u.reload || u.refresh || !w.data;
3415
- if (s) {
3416
- const { data: i } = await e.api.get("/system/comparators");
3417
- i.available = {}, Object.entries(i.types).forEach(([S, f]) => {
3418
- i.available[S] = f.map(function(c) {
3419
- return i.hash[c];
3382
+ r.comparators = async function(s) {
3383
+ s = s || {};
3384
+ var o = s.reload || s.refresh || !w.data;
3385
+ if (o) {
3386
+ const { data: f } = await e.api.get("/system/comparators");
3387
+ f.available = {}, Object.entries(f.types).forEach(([g, c]) => {
3388
+ f.available[g] = c.map(function(u) {
3389
+ return f.hash[u];
3420
3390
  });
3421
- }), w.data = i;
3391
+ }), w.data = f;
3422
3392
  }
3423
3393
  return w.data;
3424
3394
  };
3425
- function v(u) {
3426
- var { minimum: s, maximum: i } = u;
3427
- return s = e.utils.parseInt(s), s = Math.max(s, 0), i = e.utils.parseInt(i), i = Math.max(i, 0), i == 0 || (i = Math.max(i, s)), { minimum: s, maximum: i };
3428
- }
3429
- return r.meetsValidationRequirements = function(u, s, i) {
3430
- if (i.minLength) {
3431
- var S = String(u).length;
3432
- if (S < i.minLength)
3433
- return `Must be at least ${i.minLength} characters`;
3395
+ function A(s) {
3396
+ var { minimum: o, maximum: f } = s;
3397
+ return o = e.utils.parseInt(o), o = Math.max(o, 0), f = e.utils.parseInt(f), f = Math.max(f, 0), f == 0 || (f = Math.max(f, o)), { minimum: o, maximum: f };
3398
+ }
3399
+ return r.meetsValidationRequirements = function(s, o, f) {
3400
+ if (f.minLength) {
3401
+ var g = String(s).length;
3402
+ if (g < f.minLength)
3403
+ return `Must be at least ${f.minLength} characters`;
3434
3404
  }
3435
- if (i.maxLength) {
3436
- var S = String(u).length;
3437
- if (S > i.maxLength)
3438
- return `Can be no more than ${i.maxLength} characters`;
3405
+ if (f.maxLength) {
3406
+ var g = String(s).length;
3407
+ if (g > f.maxLength)
3408
+ return `Can be no more than ${f.maxLength} characters`;
3439
3409
  }
3440
- if (i.minValue && u !== void 0) {
3441
- var f = Number(u);
3442
- if (f < i.minValue)
3443
- return `Must be at least ${i.minValue}`;
3410
+ if (f.minValue && s !== void 0) {
3411
+ var c = Number(s);
3412
+ if (c < f.minValue)
3413
+ return `Must be at least ${f.minValue}`;
3444
3414
  }
3445
- if (i.maxValue && u !== void 0) {
3446
- var f = Number(u);
3447
- if (f > i.maxValue)
3448
- return `Can be no greater than ${i.maxValue}`;
3415
+ if (f.maxValue && s !== void 0) {
3416
+ var c = Number(s);
3417
+ if (c > f.maxValue)
3418
+ return `Can be no greater than ${f.maxValue}`;
3449
3419
  }
3450
- }, r.validateField = function(u, s, i) {
3451
- i = i || {};
3452
- var S = s.type || "string", { minimum: f, maximum: c } = v(s), A = s.type == "group" && s.asObject, b = A ? f === c && c === 1 : c === 1, P = !b, x = e.utils.exists(u);
3453
- if (s.type === "boolean" && u !== !0 && (x = !1), f) {
3420
+ }, r.validateField = function(s, o, f) {
3421
+ f = f || {};
3422
+ var g = o.type || "string", { minimum: c, maximum: u } = A(o), b = o.type == "group" && o.asObject, S = b ? c === u && u === 1 : u === 1, P = !S, x = e.utils.exists(s);
3423
+ if (o.type === "boolean" && s !== !0 && (x = !1), c) {
3454
3424
  if (!x)
3455
3425
  return {
3456
3426
  valid: !1,
3457
- message: `${s.title} is a required field`,
3427
+ message: `${o.title} is a required field`,
3458
3428
  status: 400
3459
3429
  };
3460
3430
  } else if (!x)
@@ -3462,95 +3432,95 @@ function It(e) {
3462
3432
  valid: !0
3463
3433
  };
3464
3434
  if (P) {
3465
- if (!Array.isArray(u))
3466
- return f ? {
3435
+ if (!Array.isArray(s))
3436
+ return c ? {
3467
3437
  valid: !1,
3468
- message: `${s.title} requires at least ${f} values`,
3438
+ message: `${o.title} requires at least ${c} values`,
3469
3439
  status: 400
3470
- } : (console.log("NOT PROVIDED AS ARRAY", s.title, u), {
3440
+ } : (console.log("NOT PROVIDED AS ARRAY", o.title, s), {
3471
3441
  valid: !1,
3472
- message: `${s.title} must be provided as an array`,
3442
+ message: `${o.title} must be provided as an array`,
3473
3443
  status: 400
3474
3444
  });
3475
- var k = u;
3476
- if (k = k.filter(function(R) {
3477
- var T = R == null || R === "";
3478
- return !T;
3479
- }), f == c && f && k.length != f)
3445
+ var T = s;
3446
+ if (T = T.filter(function(I) {
3447
+ var k = I == null || I === "";
3448
+ return !k;
3449
+ }), c == u && c && T.length != c)
3480
3450
  return {
3481
3451
  valid: !1,
3482
- message: `${s.title} requires exactly ${c} values`,
3452
+ message: `${o.title} requires exactly ${u} values`,
3483
3453
  status: 400
3484
3454
  };
3485
- if (c && k.length > c)
3455
+ if (u && T.length > u)
3486
3456
  return {
3487
3457
  valid: !1,
3488
- message: `${s.title} requires less than ${c + 1} values`,
3458
+ message: `${o.title} requires less than ${u + 1} values`,
3489
3459
  status: 400
3490
3460
  };
3491
- if (k.length < f)
3461
+ if (T.length < c)
3492
3462
  return {
3493
3463
  valid: !1,
3494
- message: `${s.title} requires at least ${f} values`,
3464
+ message: `${o.title} requires at least ${c} values`,
3495
3465
  status: 400
3496
3466
  };
3497
- var N;
3498
- if (k.find(function(R) {
3499
- var T = S;
3500
- s.type === "group" && (T = "object"), s.type === "reference" && s.widget === "form" && (T = "object");
3467
+ var L;
3468
+ if (T.find(function(I) {
3469
+ var k = g;
3470
+ o.type === "group" && (k = "object"), o.type === "reference" && o.widget === "form" && (k = "object");
3501
3471
  var U = e.utils.isValidValue(
3502
- R,
3503
- T,
3504
- i.strict
3472
+ I,
3473
+ k,
3474
+ f.strict
3505
3475
  );
3506
3476
  if (!U)
3507
- return N = !0, !0;
3508
- if (s.validation) {
3477
+ return L = !0, !0;
3478
+ if (o.validation) {
3509
3479
  var z = r.meetsValidationRequirements(
3510
- R,
3511
- S,
3512
- s.validation
3480
+ I,
3481
+ g,
3482
+ o.validation
3513
3483
  );
3514
3484
  if (z)
3515
- return N = !0, !0;
3485
+ return L = !0, !0;
3516
3486
  }
3517
- }), N)
3487
+ }), L)
3518
3488
  return {
3519
3489
  valid: !1,
3520
- message: `Invalid input for ${s.title}`,
3490
+ message: `Invalid input for ${o.title}`,
3521
3491
  status: 400
3522
3492
  };
3523
3493
  } else {
3524
- var M = S, V = s.widget;
3494
+ var M = g, V = o.widget;
3525
3495
  M === "group" && (M = "object"), M === "reference" && V === "form" && (M = "object");
3526
- var $ = r.getCleanedValue(u, M, i), L = e.utils.isValidValue(
3496
+ var $ = r.getCleanedValue(s, M, f), N = e.utils.isValidValue(
3527
3497
  $,
3528
3498
  M,
3529
- i.strict
3499
+ f.strict
3530
3500
  );
3531
- if (!L)
3501
+ if (!N)
3532
3502
  return {
3533
3503
  valid: !1,
3534
- message: `Single value '${u}' is not a valid ${M} for ${s.title}`,
3504
+ message: `Single value '${s}' is not a valid ${M} for ${o.title}`,
3535
3505
  criteria: {
3536
- isValidValue: L,
3506
+ isValidValue: N,
3537
3507
  cleanedValue: $,
3538
- fieldType: S,
3539
- options: i
3508
+ fieldType: g,
3509
+ options: f
3540
3510
  },
3541
3511
  status: 400
3542
3512
  };
3543
- let R = !1;
3544
- const T = {};
3545
- if (String(s.minValue) && (T.minValue = parseInt(s.minValue), R = !0), String(s.maxValue) && (T.maxValue = parseInt(s.maxValue), R = !0), String(s.minLength) && (T.minLength = parseInt(s.minLength), R = !0), String(s.maxLength) && (T.maxLength = parseInt(s.maxLength), R = !0), R) {
3513
+ let I = !1;
3514
+ const k = {};
3515
+ if (String(o.minValue) && (k.minValue = parseInt(o.minValue), I = !0), String(o.maxValue) && (k.maxValue = parseInt(o.maxValue), I = !0), String(o.minLength) && (k.minLength = parseInt(o.minLength), I = !0), String(o.maxLength) && (k.maxLength = parseInt(o.maxLength), I = !0), I) {
3546
3516
  const U = Object.assign(
3547
3517
  {},
3548
- T,
3549
- s.validation || {}
3518
+ k,
3519
+ o.validation || {}
3550
3520
  );
3551
3521
  var F = r.meetsValidationRequirements(
3552
- u,
3553
- S,
3522
+ s,
3523
+ g,
3554
3524
  U
3555
3525
  );
3556
3526
  if (F)
@@ -3564,104 +3534,104 @@ function It(e) {
3564
3534
  return {
3565
3535
  valid: !0
3566
3536
  };
3567
- }, r.getCleanedValue = function(u, s, i) {
3568
- switch (s) {
3537
+ }, r.getCleanedValue = function(s, o, f) {
3538
+ switch (o) {
3569
3539
  case "number":
3570
3540
  case "float":
3571
3541
  case "decimal":
3572
- return e.utils.exists(u) ? Number(u) : void 0;
3542
+ return e.utils.exists(s) ? Number(s) : void 0;
3573
3543
  case "integer":
3574
- return e.utils.exists(u) ? parseInt(u) : void 0;
3544
+ return e.utils.exists(s) ? parseInt(s) : void 0;
3575
3545
  case "boolean":
3576
- return e.utils.exists(u) ? e.utils.parseBoolean(u) : void 0;
3546
+ return e.utils.exists(s) ? e.utils.parseBoolean(s) : void 0;
3577
3547
  case "email":
3578
- return i.strict ? u : String(u).toLowerCase();
3548
+ return f.strict ? s : String(s).toLowerCase();
3579
3549
  case "reference":
3580
- return i.strict ? u : e.utils.id(u);
3550
+ return f.strict ? s : e.utils.id(s);
3581
3551
  default:
3582
- return i.strict ? u : e.utils.cleanValue(u, s, i);
3552
+ return f.strict ? s : e.utils.cleanValue(s, o, f);
3583
3553
  }
3584
- return u;
3585
- }, r.list = async function(u, s, i) {
3586
- i || (i = {});
3587
- const S = i.remoteURL || `/content/${u}/list`;
3588
- if (i.cancellable) {
3589
- i.config || (i.config = {});
3590
- const c = e.api.CancelToken.source();
3591
- return i.config.cancelToken = c.token, {
3592
- promise: e.api.post(S, s, i.config),
3593
- cancel(b) {
3594
- c.cancel(b || "Operation canceled by the user.");
3554
+ return s;
3555
+ }, r.list = async function(s, o, f) {
3556
+ f || (f = {});
3557
+ const g = f.remoteURL || `/content/${s}/list`;
3558
+ if (f.cancellable) {
3559
+ f.config || (f.config = {});
3560
+ const u = e.api.CancelToken.source();
3561
+ return f.config.cancelToken = u.token, {
3562
+ promise: e.api.post(g, o, f.config),
3563
+ cancel(S) {
3564
+ u.cancel(S || "Operation canceled by the user.");
3595
3565
  }
3596
3566
  };
3597
3567
  } else {
3598
- const { data: f } = await e.api.post(S, s, i.config);
3599
- return f;
3568
+ const { data: c } = await e.api.post(g, o, f.config);
3569
+ return c;
3600
3570
  }
3601
- }, r.create = async function(u, s) {
3602
- const i = { ...s };
3603
- i.meta?.scopes && (i.meta.scopes = e.utils.ids(i.meta.scopes));
3604
- const { data: S } = await e.api.post(`/content/${u}/create`, i);
3605
- return S;
3606
- }, r.update = async function(u, s) {
3607
- u = e.utils.id(u);
3608
- const i = { ...s };
3609
- i.meta?.scopes && (i.meta.scopes = e.utils.ids(i.meta.scopes));
3610
- const { data: S } = await e.api.put(`/content/${u}`, i);
3611
- return S;
3612
- }, r.patch = async function(u, s) {
3613
- u = e.utils.id(u);
3614
- const i = { ...s };
3615
- i.meta?.scopes && (i.meta.scopes = e.utils.ids(i.meta.scopes));
3616
- const { data: S } = await e.api.patch(`/content/${u}`, i);
3617
- return S;
3618
- }, r.get = async function(u, s) {
3619
- u = e.utils.id(u), s = s || {};
3620
- const { data: i } = await e.api.get(`/content/${u}`, s);
3621
- return i;
3622
- }, r.getFromID = async function(u) {
3623
- return r.get(u);
3624
- }, r.delete = async function(u, s) {
3625
- u = e.utils.id(u);
3626
- const { data: i } = await e.api.delete(`/content/${u}`, s);
3627
- return i;
3628
- }, r.restore = async function(u, s) {
3629
- u = e.utils.id(u);
3630
- const { data: i } = await e.api.get(`/content/${u}/restore`, s);
3631
- return i;
3632
- }, r.getFromSlug = async function(u) {
3633
- const { data: s } = await e.api.get(`/content/slug/${u}`);
3634
- return s;
3571
+ }, r.create = async function(s, o) {
3572
+ const f = { ...o };
3573
+ f.meta?.scopes && (f.meta.scopes = e.utils.ids(f.meta.scopes));
3574
+ const { data: g } = await e.api.post(`/content/${s}/create`, f);
3575
+ return g;
3576
+ }, r.update = async function(s, o) {
3577
+ s = e.utils.id(s);
3578
+ const f = { ...o };
3579
+ f.meta?.scopes && (f.meta.scopes = e.utils.ids(f.meta.scopes));
3580
+ const { data: g } = await e.api.put(`/content/${s}`, f);
3581
+ return g;
3582
+ }, r.patch = async function(s, o) {
3583
+ s = e.utils.id(s);
3584
+ const f = { ...o };
3585
+ f.meta?.scopes && (f.meta.scopes = e.utils.ids(f.meta.scopes));
3586
+ const { data: g } = await e.api.patch(`/content/${s}`, f);
3587
+ return g;
3588
+ }, r.get = async function(s, o) {
3589
+ s = e.utils.id(s), o = o || {};
3590
+ const { data: f } = await e.api.get(`/content/${s}`, o);
3591
+ return f;
3592
+ }, r.getFromID = async function(s) {
3593
+ return r.get(s);
3594
+ }, r.delete = async function(s, o) {
3595
+ s = e.utils.id(s);
3596
+ const { data: f } = await e.api.delete(`/content/${s}`, o);
3597
+ return f;
3598
+ }, r.restore = async function(s, o) {
3599
+ s = e.utils.id(s);
3600
+ const { data: f } = await e.api.get(`/content/${s}/restore`, o);
3601
+ return f;
3602
+ }, r.getFromSlug = async function(s) {
3603
+ const { data: o } = await e.api.get(`/content/slug/${s}`);
3604
+ return o;
3635
3605
  }, r;
3636
3606
  }
3637
- function kt(e) {
3607
+ function Tt(e) {
3638
3608
  var r = {}, a;
3639
3609
  return r.countries = async function() {
3640
3610
  return a || (a = new Promise(async function(t, n) {
3641
- e.api.get("/system/countries").then(function(o) {
3642
- return t(o.data);
3611
+ e.api.get("/system/countries").then(function(i) {
3612
+ return t(i.data);
3643
3613
  }).catch(n);
3644
3614
  })), a;
3645
3615
  }, r;
3646
3616
  }
3647
- function Rt(e) {
3617
+ function It(e) {
3648
3618
  var r = {};
3649
3619
  function a() {
3650
3620
  return !(typeof window > "u" || !window.navigator || !window.navigator.geolocation);
3651
3621
  }
3652
- return r.distance = function({ lat: t, lon: n }, { lat: o, lon: m }) {
3653
- function l(i) {
3654
- return i * (Math.PI / 180);
3622
+ return r.distance = function({ lat: t, lon: n }, { lat: i, lon: m }) {
3623
+ function l(f) {
3624
+ return f * (Math.PI / 180);
3655
3625
  }
3656
- var p = 6371e3, y = l(o - t), w = l(m - n), v = Math.sin(y / 2) * Math.sin(y / 2) + Math.cos(l(t)) * Math.cos(l(o)) * Math.sin(w / 2) * Math.sin(w / 2), u = 2 * Math.atan2(Math.sqrt(v), Math.sqrt(1 - v)), s = p * u;
3657
- return s;
3626
+ var p = 6371e3, y = l(i - t), w = l(m - n), A = Math.sin(y / 2) * Math.sin(y / 2) + Math.cos(l(t)) * Math.cos(l(i)) * Math.sin(w / 2) * Math.sin(w / 2), s = 2 * Math.atan2(Math.sqrt(A), Math.sqrt(1 - A)), o = p * s;
3627
+ return o;
3658
3628
  }, r.getPosition = async function() {
3659
3629
  return a() ? (console.log("qik:geo: getting location"), new Promise(function(t, n) {
3660
3630
  navigator.geolocation.getCurrentPosition(t, n);
3661
3631
  })) : Promise.reject({ message: "Geolocation is not enabled" });
3662
3632
  }, r.watchPosition = async function(t) {
3663
- return a() ? (console.log("qik:geo: watching location"), new Promise(function(n, o) {
3664
- const m = navigator.geolocation.watchPosition(t, o);
3633
+ return a() ? (console.log("qik:geo: watching location"), new Promise(function(n, i) {
3634
+ const m = navigator.geolocation.watchPosition(t, i);
3665
3635
  n({
3666
3636
  id: m
3667
3637
  });
@@ -4378,16 +4348,16 @@ function Rt(e) {
4378
4348
  if (t) {
4379
4349
  const n = t?.organisation?.countryCode;
4380
4350
  if (n) {
4381
- const o = r.countryLookup[n];
4351
+ const i = r.countryLookup[n];
4382
4352
  return {
4383
4353
  code: n,
4384
- name: o
4354
+ name: i
4385
4355
  };
4386
4356
  }
4387
4357
  }
4388
4358
  }, r;
4389
4359
  }
4390
- const Tt = function(e, r) {
4360
+ const kt = function(e, r) {
4391
4361
  if (r = r || "production", !e.auth)
4392
4362
  throw new Error("Can't Instantiate QikSocket before QikAuth exists");
4393
4363
  const a = e.utils.guid();
@@ -4397,89 +4367,94 @@ const Tt = function(e, r) {
4397
4367
  connected: !1,
4398
4368
  windowID: a,
4399
4369
  autoreconnect: !0
4400
- }, n, o = {};
4370
+ }, n, i = {};
4401
4371
  const m = {}, l = new De();
4402
- l.bootstrap(t), t.channel = async function(i) {
4403
- if (o[i])
4404
- return o[i];
4405
- const S = new De();
4406
- o[i] = S, t.connected || await t.connect(), t.subscribe(i), t.addEventListener(i, f);
4407
- function f(c) {
4408
- S.dispatch("message", c);
4372
+ l.bootstrap(t), t.channel = async function(g) {
4373
+ if (i[g])
4374
+ return i[g];
4375
+ const c = new De();
4376
+ i[g] = c, t.connected || await t.connect(), t.subscribe(g), t.addEventListener(g, u);
4377
+ function u(b) {
4378
+ c.dispatch("message", b);
4409
4379
  }
4410
- return S.destroy = function() {
4411
- t.removeAllListeners(), o[i] = null;
4412
- }, o[i];
4380
+ return c.destroy = function() {
4381
+ t.removeEventListener(g, u), t.unsubscribe(g), c.removeAllListeners(), delete i[g];
4382
+ }, i[g];
4413
4383
  };
4414
- function p(i) {
4415
- t.debug && console.log("[socket] Connection open", i), t.connected = !0, l.dispatch("connected", i);
4384
+ function p(g) {
4385
+ t.debug && console.log("[socket] Connection open", g), t.connected = !0, l.dispatch("connected", g);
4416
4386
  }
4417
- async function y(i) {
4418
- i.wasClean ? t.debug && console.log(`[socket] Connection closed cleanly, code=${i.code} reason=${i.reason}`) : t.debug && console.log("[socket] - connection closed due to error", i), t.connected = !1, l.dispatch("disconnected", i), n = null, t.autoreconnect && t.reconnect();
4387
+ async function y(g) {
4388
+ g.wasClean ? t.debug && console.log(`[socket] Connection closed cleanly, code=${g.code} reason=${g.reason}`) : t.debug && console.log("[socket] - connection closed due to error", g), t.connected = !1, l.dispatch("disconnected", g), n = null, t.autoreconnect && t.reconnect();
4419
4389
  }
4420
- function w(i) {
4421
- console.log("[event] socketError", event), t.debug && console.log("[socket] Error", i), l.dispatch("error", i);
4390
+ function w(g) {
4391
+ console.log("[event] socketError", event), t.debug && console.log("[socket] Error", g), l.dispatch("error", g);
4422
4392
  }
4423
- function v(i) {
4424
- const S = JSON.parse(i.data);
4425
- t.debug && console.log("[socket] message received", S), l.dispatch("message", S), S.channel && l.dispatch(S.channel, S);
4393
+ function A(g) {
4394
+ const c = JSON.parse(g.data);
4395
+ t.debug && console.log("[socket] message received", c), l.dispatch("message", c), c.channel && l.dispatch(c.channel, c);
4426
4396
  }
4427
- async function u(i) {
4428
- n.send(JSON.stringify(i));
4397
+ async function s(g) {
4398
+ n.send(JSON.stringify(g));
4429
4399
  }
4430
- function s() {
4431
- return new Promise(function(i) {
4432
- function S() {
4400
+ function o() {
4401
+ return new Promise(function(g) {
4402
+ function c() {
4433
4403
  if (t.connected)
4434
- return i(n);
4435
- setTimeout(S, 1e3);
4404
+ return g(n);
4405
+ setTimeout(c, 1e3);
4436
4406
  }
4437
- S();
4407
+ c();
4438
4408
  });
4439
4409
  }
4440
- return t.connect = async function() {
4410
+ t.connect = async function() {
4441
4411
  if (n)
4442
- return n.connected ? (console.log("[socket] - Socket is already connected"), n) : s();
4443
- const i = e.auth.getCurrentToken();
4444
- if (!i) {
4412
+ return n.connected ? (console.log("[socket] - Socket is already connected"), n) : o();
4413
+ const g = e.auth.getCurrentToken();
4414
+ if (!g) {
4445
4415
  t.debug && console.log("[socket] - Must be authenticated to connect to socket");
4446
4416
  return;
4447
4417
  }
4448
- return n = new WebSocket(`${t.url}?access_token=${i}&windowid=${a}`), n.addEventListener("close", y), n.addEventListener("error", w), n.addEventListener("open", p), n.addEventListener("message", v), t.debug && console.log("[socket] - Connected with event listeners"), s();
4418
+ return n = new WebSocket(`${t.url}?access_token=${g}&windowid=${a}`), n.addEventListener("close", y), n.addEventListener("error", w), n.addEventListener("open", p), n.addEventListener("message", A), t.debug && console.log("[socket] - Connected with event listeners"), o();
4449
4419
  }, t.reconnect = async function() {
4450
4420
  if (t.connected)
4451
4421
  return;
4452
4422
  t.debug && console.log("[socket] reconnecting...");
4453
- const i = await t.connect();
4454
- return Object.keys(m).forEach(function(f) {
4455
- t.subscribe(f);
4456
- }), i;
4423
+ const g = await t.connect();
4424
+ return Object.keys(m).forEach(function(u) {
4425
+ t.subscribe(u);
4426
+ }), g;
4457
4427
  }, t.close = async function() {
4458
4428
  if (!n) {
4459
4429
  console.log("[socket] - Socket is not connected");
4460
4430
  return;
4461
4431
  }
4462
- const i = t.autoreconnect;
4463
- t.autoreconnect = !1, n.close(), n.removeEventListener("close", y), n.removeEventListener("error", w), n.removeEventListener("open", p), n.removeEventListener("message", v), n = null, y({ wasClean: !0 }), t.autoreconnect = i;
4464
- }, t.disconnect = t.close, t.subscribe = async function(i) {
4432
+ const g = t.autoreconnect;
4433
+ t.autoreconnect = !1, n.close(), n.removeEventListener("close", y), n.removeEventListener("error", w), n.removeEventListener("open", p), n.removeEventListener("message", A), n = null, y({ wasClean: !0 }), t.autoreconnect = g;
4434
+ }, t.disconnect = t.close, t.subscribe = async function(g) {
4465
4435
  if (!n) {
4466
4436
  console.log("[socket] - Can't subscribe to channel as socket is not connected");
4467
4437
  return;
4468
4438
  }
4469
- u({
4439
+ s({
4470
4440
  action: "subscribe",
4471
- channel: i
4472
- }), m[i] = !0, l.dispatch("subscribe", i), t.debug && console.log(`[socket] - subscribed to ${i}`);
4473
- }, t.unsubscribe = async function(i) {
4441
+ channel: g
4442
+ }), m[g] = !0, l.dispatch("subscribe", g), t.debug && console.log(`[socket] - subscribed to ${g}`);
4443
+ }, t.unsubscribe = async function(g) {
4474
4444
  if (!n) {
4475
4445
  console.log("[socket] - Can't unsubscribe from channel as socket is not connected");
4476
4446
  return;
4477
4447
  }
4478
- u({
4448
+ s({
4479
4449
  action: "unsubscribe",
4480
- channel: i
4481
- }), delete m[i], l.dispatch("unsubscribe", i), t.debug && console.log(`[socket] - unsubscribed from ${i}`);
4482
- }, t;
4450
+ channel: g
4451
+ }), delete m[g], l.dispatch("unsubscribe", g), t.debug && console.log(`[socket] - unsubscribed from ${g}`);
4452
+ };
4453
+ let f = e.utils.id(e.auth.getCurrentUser()?.organisation);
4454
+ return e.auth.addEventListener("change", async function(g) {
4455
+ const c = e.utils.id(g?.organisation);
4456
+ c !== f && (f = c, n && (t.debug && console.log("[socket] - organisation changed, reconnecting"), await t.close(), await t.reconnect()));
4457
+ }), t;
4483
4458
  };
4484
4459
  function Ft(e) {
4485
4460
  switch (e || (e = {
@@ -4505,7 +4480,7 @@ function Ft(e) {
4505
4480
  value: Ot,
4506
4481
  writable: !1
4507
4482
  });
4508
- const t = I;
4483
+ const t = R;
4509
4484
  Object.defineProperty(r, "utils", {
4510
4485
  value: t,
4511
4486
  writable: !1
@@ -4513,14 +4488,14 @@ function Ft(e) {
4513
4488
  value: q,
4514
4489
  writable: !1
4515
4490
  });
4516
- const o = new Ct(r);
4491
+ const i = new Ct(r);
4517
4492
  Object.defineProperty(r, "files", {
4518
- value: o,
4493
+ value: i,
4519
4494
  writable: !1
4520
- }), new De().bootstrap(r), r.error = function(i) {
4521
- return r.dispatch("error", t.errorMessage(i));
4522
- }, r.notify = function(i, S) {
4523
- return r.dispatch("notification", { message: i, options: S });
4495
+ }), new De().bootstrap(r), r.error = function(f) {
4496
+ return r.dispatch("error", t.errorMessage(f));
4497
+ }, r.notify = function(f, g) {
4498
+ return r.dispatch("notification", { message: f, options: g });
4524
4499
  };
4525
4500
  const l = new mt(r);
4526
4501
  Object.defineProperty(r, "api", {
@@ -4532,7 +4507,7 @@ function Ft(e) {
4532
4507
  value: p,
4533
4508
  writable: !1
4534
4509
  });
4535
- const y = new Tt(r);
4510
+ const y = new kt(r);
4536
4511
  Object.defineProperty(r, "socket", {
4537
4512
  value: y,
4538
4513
  writable: !1
@@ -4542,19 +4517,19 @@ function Ft(e) {
4542
4517
  value: w,
4543
4518
  writable: !1
4544
4519
  });
4545
- const v = new kt(r);
4520
+ const A = new Tt(r);
4546
4521
  Object.defineProperty(r, "system", {
4547
- value: v,
4522
+ value: A,
4548
4523
  writable: !1
4549
4524
  });
4550
- const u = new Rt(r);
4525
+ const s = new It(r);
4551
4526
  Object.defineProperty(r, "geo", {
4552
- value: u,
4527
+ value: s,
4553
4528
  writable: !1
4554
4529
  });
4555
- const s = new It(r);
4530
+ const o = new Rt(r);
4556
4531
  return Object.defineProperty(r, "content", {
4557
- value: s,
4532
+ value: o,
4558
4533
  writable: !1
4559
4534
  }), r;
4560
4535
  }