@qikdev/sdk 1.0.10 → 1.0.13
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 +1294 -1229
- package/package.json +1 -1
- package/src/api/qik.access.js +177 -201
- package/src/api/qik.api.js +55 -28
- package/src/api/qik.auth.js +181 -113
- package/src/api/qik.cache.js +29 -7
- package/src/api/qik.content.js +275 -147
- package/src/api/qik.core.js +19 -28
- package/src/api/qik.files.js +48 -38
- package/src/api/qik.filter.js +148 -207
- package/src/api/qik.geo.js +59 -42
- package/src/api/qik.socket.js +228 -62
- package/src/api/qik.storage.js +17 -8
- package/src/api/qik.system.js +6 -5
- package/src/api/qik.utils.js +244 -199
- package/src/version.js +1 -1
package/dist/main.js
CHANGED
|
@@ -69,44 +69,44 @@ function Xr() {
|
|
|
69
69
|
if (Cr) return Ye;
|
|
70
70
|
Cr = 1;
|
|
71
71
|
var e = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, i = Math.max, t = "[object Function]", a = function(c, p) {
|
|
72
|
-
for (var
|
|
73
|
-
|
|
72
|
+
for (var S = [], g = 0; g < c.length; g += 1)
|
|
73
|
+
S[g] = c[g];
|
|
74
74
|
for (var u = 0; u < p.length; u += 1)
|
|
75
|
-
|
|
76
|
-
return
|
|
75
|
+
S[u + c.length] = p[u];
|
|
76
|
+
return S;
|
|
77
77
|
}, n = function(c, p) {
|
|
78
|
-
for (var
|
|
79
|
-
|
|
80
|
-
return
|
|
81
|
-
}, s = function(
|
|
82
|
-
for (var p = "",
|
|
83
|
-
p +=
|
|
78
|
+
for (var S = [], g = p, u = 0; g < c.length; g += 1, u += 1)
|
|
79
|
+
S[u] = c[g];
|
|
80
|
+
return S;
|
|
81
|
+
}, s = function(d, c) {
|
|
82
|
+
for (var p = "", S = 0; S < d.length; S += 1)
|
|
83
|
+
p += d[S], S + 1 < d.length && (p += c);
|
|
84
84
|
return p;
|
|
85
85
|
};
|
|
86
86
|
return Ye = function(c) {
|
|
87
87
|
var p = this;
|
|
88
88
|
if (typeof p != "function" || r.apply(p) !== t)
|
|
89
89
|
throw new TypeError(e + p);
|
|
90
|
-
for (var
|
|
91
|
-
if (this instanceof
|
|
90
|
+
for (var S = n(arguments, 1), g, u = function() {
|
|
91
|
+
if (this instanceof g) {
|
|
92
92
|
var l = p.apply(
|
|
93
93
|
this,
|
|
94
|
-
a(
|
|
94
|
+
a(S, arguments)
|
|
95
95
|
);
|
|
96
96
|
return Object(l) === l ? l : this;
|
|
97
97
|
}
|
|
98
98
|
return p.apply(
|
|
99
99
|
c,
|
|
100
|
-
a(
|
|
100
|
+
a(S, arguments)
|
|
101
101
|
);
|
|
102
|
-
}, o = i(0, p.length -
|
|
103
|
-
|
|
104
|
-
if (
|
|
105
|
-
var
|
|
102
|
+
}, o = i(0, p.length - S.length), f = [], w = 0; w < o; w++)
|
|
103
|
+
f[w] = "$" + w;
|
|
104
|
+
if (g = Function("binder", "return function (" + s(f, ",") + "){ return binder.apply(this,arguments); }")(u), p.prototype) {
|
|
105
|
+
var m = function() {
|
|
106
106
|
};
|
|
107
|
-
|
|
107
|
+
m.prototype = p.prototype, g.prototype = new m(), m.prototype = null;
|
|
108
108
|
}
|
|
109
|
-
return
|
|
109
|
+
return g;
|
|
110
110
|
}, Ye;
|
|
111
111
|
}
|
|
112
112
|
var Xe, Mr;
|
|
@@ -116,20 +116,20 @@ function yr() {
|
|
|
116
116
|
var e = Xr();
|
|
117
117
|
return Xe = Function.prototype.bind || e, Xe;
|
|
118
118
|
}
|
|
119
|
-
var er,
|
|
119
|
+
var er, Tr;
|
|
120
120
|
function et() {
|
|
121
|
-
if (
|
|
122
|
-
|
|
121
|
+
if (Tr) return er;
|
|
122
|
+
Tr = 1;
|
|
123
123
|
var e = yr();
|
|
124
124
|
return er = e.call(Function.call, Object.prototype.hasOwnProperty), er;
|
|
125
125
|
}
|
|
126
|
-
var rr,
|
|
126
|
+
var rr, Rr;
|
|
127
127
|
function hr() {
|
|
128
|
-
if (
|
|
129
|
-
|
|
130
|
-
var e, r = SyntaxError, i = Function, t = TypeError, a = function(
|
|
128
|
+
if (Rr) return rr;
|
|
129
|
+
Rr = 1;
|
|
130
|
+
var e, r = SyntaxError, i = Function, t = TypeError, a = function(U) {
|
|
131
131
|
try {
|
|
132
|
-
return i('"use strict"; return (' +
|
|
132
|
+
return i('"use strict"; return (' + U + ").constructor;")();
|
|
133
133
|
} catch {
|
|
134
134
|
}
|
|
135
135
|
}, n = Object.getOwnPropertyDescriptor;
|
|
@@ -141,7 +141,7 @@ function hr() {
|
|
|
141
141
|
}
|
|
142
142
|
var s = function() {
|
|
143
143
|
throw new t();
|
|
144
|
-
},
|
|
144
|
+
}, d = n ? (function() {
|
|
145
145
|
try {
|
|
146
146
|
return arguments.callee, s;
|
|
147
147
|
} catch {
|
|
@@ -151,18 +151,18 @@ function hr() {
|
|
|
151
151
|
return s;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
-
})() : s, c = Yr()(), p = Object.getPrototypeOf || function(
|
|
155
|
-
return
|
|
156
|
-
},
|
|
154
|
+
})() : s, c = Yr()(), p = Object.getPrototypeOf || function(U) {
|
|
155
|
+
return U.__proto__;
|
|
156
|
+
}, S = {}, g = typeof Uint8Array > "u" ? e : p(Uint8Array), u = {
|
|
157
157
|
"%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
|
|
158
158
|
"%Array%": Array,
|
|
159
159
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? e : ArrayBuffer,
|
|
160
160
|
"%ArrayIteratorPrototype%": c ? p([][Symbol.iterator]()) : e,
|
|
161
161
|
"%AsyncFromSyncIteratorPrototype%": e,
|
|
162
|
-
"%AsyncFunction%":
|
|
163
|
-
"%AsyncGenerator%":
|
|
164
|
-
"%AsyncGeneratorFunction%":
|
|
165
|
-
"%AsyncIteratorPrototype%":
|
|
162
|
+
"%AsyncFunction%": S,
|
|
163
|
+
"%AsyncGenerator%": S,
|
|
164
|
+
"%AsyncGeneratorFunction%": S,
|
|
165
|
+
"%AsyncIteratorPrototype%": S,
|
|
166
166
|
"%Atomics%": typeof Atomics > "u" ? e : Atomics,
|
|
167
167
|
"%BigInt%": typeof BigInt > "u" ? e : BigInt,
|
|
168
168
|
"%Boolean%": Boolean,
|
|
@@ -180,7 +180,7 @@ function hr() {
|
|
|
180
180
|
"%Float64Array%": typeof Float64Array > "u" ? e : Float64Array,
|
|
181
181
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? e : FinalizationRegistry,
|
|
182
182
|
"%Function%": i,
|
|
183
|
-
"%GeneratorFunction%":
|
|
183
|
+
"%GeneratorFunction%": S,
|
|
184
184
|
"%Int8Array%": typeof Int8Array > "u" ? e : Int8Array,
|
|
185
185
|
"%Int16Array%": typeof Int16Array > "u" ? e : Int16Array,
|
|
186
186
|
"%Int32Array%": typeof Int32Array > "u" ? e : Int32Array,
|
|
@@ -208,8 +208,8 @@ function hr() {
|
|
|
208
208
|
"%StringIteratorPrototype%": c ? p(""[Symbol.iterator]()) : e,
|
|
209
209
|
"%Symbol%": c ? Symbol : e,
|
|
210
210
|
"%SyntaxError%": r,
|
|
211
|
-
"%ThrowTypeError%":
|
|
212
|
-
"%TypedArray%":
|
|
211
|
+
"%ThrowTypeError%": d,
|
|
212
|
+
"%TypedArray%": g,
|
|
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
|
-
}, o = function
|
|
223
|
-
var
|
|
224
|
-
if (
|
|
225
|
-
|
|
226
|
-
else if (
|
|
227
|
-
|
|
228
|
-
else if (
|
|
229
|
-
|
|
230
|
-
else if (
|
|
231
|
-
var
|
|
232
|
-
|
|
233
|
-
} else if (
|
|
234
|
-
var
|
|
235
|
-
|
|
222
|
+
}, o = function U(x) {
|
|
223
|
+
var T;
|
|
224
|
+
if (x === "%AsyncFunction%")
|
|
225
|
+
T = a("async function () {}");
|
|
226
|
+
else if (x === "%GeneratorFunction%")
|
|
227
|
+
T = a("function* () {}");
|
|
228
|
+
else if (x === "%AsyncGeneratorFunction%")
|
|
229
|
+
T = a("async function* () {}");
|
|
230
|
+
else if (x === "%AsyncGenerator%") {
|
|
231
|
+
var I = U("%AsyncGeneratorFunction%");
|
|
232
|
+
I && (T = I.prototype);
|
|
233
|
+
} else if (x === "%AsyncIteratorPrototype%") {
|
|
234
|
+
var N = U("%AsyncGenerator%");
|
|
235
|
+
N && (T = p(N.prototype));
|
|
236
236
|
}
|
|
237
|
-
return u[
|
|
238
|
-
},
|
|
237
|
+
return u[x] = T, T;
|
|
238
|
+
}, f = {
|
|
239
239
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
240
240
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
241
241
|
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
@@ -287,80 +287,80 @@ function hr() {
|
|
|
287
287
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
288
288
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
289
289
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
290
|
-
},
|
|
291
|
-
var
|
|
292
|
-
if (
|
|
290
|
+
}, w = yr(), m = et(), l = w.call(Function.call, Array.prototype.concat), v = w.call(Function.apply, Array.prototype.splice), b = w.call(Function.call, String.prototype.replace), O = w.call(Function.call, String.prototype.slice), P = w.call(Function.call, RegExp.prototype.exec), k = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, L = /\\(\\)?/g, R = function(x) {
|
|
291
|
+
var T = O(x, 0, 1), I = O(x, -1);
|
|
292
|
+
if (T === "%" && I !== "%")
|
|
293
293
|
throw new r("invalid intrinsic syntax, expected closing `%`");
|
|
294
|
-
if (
|
|
294
|
+
if (I === "%" && T !== "%")
|
|
295
295
|
throw new r("invalid intrinsic syntax, expected opening `%`");
|
|
296
|
-
var
|
|
297
|
-
return
|
|
298
|
-
|
|
299
|
-
}),
|
|
300
|
-
},
|
|
301
|
-
var
|
|
302
|
-
if (
|
|
303
|
-
var
|
|
304
|
-
if (
|
|
305
|
-
throw new t("intrinsic " +
|
|
296
|
+
var N = [];
|
|
297
|
+
return b(x, k, function($, z, F, Z) {
|
|
298
|
+
N[N.length] = F ? b(Z, L, "$1") : z || $;
|
|
299
|
+
}), N;
|
|
300
|
+
}, j = function(x, T) {
|
|
301
|
+
var I = x, N;
|
|
302
|
+
if (m(f, I) && (N = f[I], I = "%" + N[0] + "%"), m(u, I)) {
|
|
303
|
+
var $ = u[I];
|
|
304
|
+
if ($ === S && ($ = o(I)), typeof $ > "u" && !T)
|
|
305
|
+
throw new t("intrinsic " + x + " exists, but is not available. Please file an issue!");
|
|
306
306
|
return {
|
|
307
|
-
alias:
|
|
308
|
-
name:
|
|
309
|
-
value:
|
|
307
|
+
alias: N,
|
|
308
|
+
name: I,
|
|
309
|
+
value: $
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
throw new r("intrinsic " +
|
|
312
|
+
throw new r("intrinsic " + x + " does not exist!");
|
|
313
313
|
};
|
|
314
|
-
return rr = function(
|
|
315
|
-
if (typeof
|
|
314
|
+
return rr = function(x, T) {
|
|
315
|
+
if (typeof x != "string" || x.length === 0)
|
|
316
316
|
throw new t("intrinsic name must be a non-empty string");
|
|
317
|
-
if (arguments.length > 1 && typeof
|
|
317
|
+
if (arguments.length > 1 && typeof T != "boolean")
|
|
318
318
|
throw new t('"allowMissing" argument must be a boolean');
|
|
319
|
-
if (
|
|
319
|
+
if (P(/^%?[^%]*%?$/, x) === null)
|
|
320
320
|
throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
321
|
-
var
|
|
322
|
-
Q && (
|
|
323
|
-
for (var ne = 1, X = !0; ne <
|
|
324
|
-
var K =
|
|
321
|
+
var I = R(x), N = I.length > 0 ? I[0] : "", $ = j("%" + N + "%", T), z = $.name, F = $.value, Z = !1, Q = $.alias;
|
|
322
|
+
Q && (N = Q[0], v(I, l([0, 1], Q)));
|
|
323
|
+
for (var ne = 1, X = !0; ne < I.length; ne += 1) {
|
|
324
|
+
var K = I[ne], ie = O(K, 0, 1), re = O(K, -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 ((K === "constructor" || !X) && (Z = !0),
|
|
328
|
-
|
|
329
|
-
else if (
|
|
330
|
-
if (!(K in
|
|
331
|
-
if (!
|
|
332
|
-
throw new t("base intrinsic for " +
|
|
327
|
+
if ((K === "constructor" || !X) && (Z = !0), N += "." + K, z = "%" + N + "%", m(u, z))
|
|
328
|
+
F = u[z];
|
|
329
|
+
else if (F != null) {
|
|
330
|
+
if (!(K in F)) {
|
|
331
|
+
if (!T)
|
|
332
|
+
throw new t("base intrinsic for " + x + " exists, but the property is not available.");
|
|
333
333
|
return;
|
|
334
334
|
}
|
|
335
|
-
if (n && ne + 1 >=
|
|
336
|
-
var te = n(
|
|
337
|
-
X = !!te, X && "get" in te && !("originalValue" in te.get) ?
|
|
335
|
+
if (n && ne + 1 >= I.length) {
|
|
336
|
+
var te = n(F, K);
|
|
337
|
+
X = !!te, X && "get" in te && !("originalValue" in te.get) ? F = te.get : F = F[K];
|
|
338
338
|
} else
|
|
339
|
-
X =
|
|
340
|
-
X && !Z && (u[z] =
|
|
339
|
+
X = m(F, K), F = F[K];
|
|
340
|
+
X && !Z && (u[z] = F);
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
return
|
|
343
|
+
return F;
|
|
344
344
|
}, rr;
|
|
345
345
|
}
|
|
346
346
|
var tr = { exports: {} }, kr;
|
|
347
347
|
function rt() {
|
|
348
348
|
return kr || (kr = 1, (function(e) {
|
|
349
|
-
var r = yr(), i = hr(), t = i("%Function.prototype.apply%"), a = i("%Function.prototype.call%"), n = i("%Reflect.apply%", !0) || r.call(a, t), s = i("%Object.getOwnPropertyDescriptor%", !0),
|
|
350
|
-
if (
|
|
349
|
+
var r = yr(), i = hr(), t = i("%Function.prototype.apply%"), a = i("%Function.prototype.call%"), n = i("%Reflect.apply%", !0) || r.call(a, t), s = i("%Object.getOwnPropertyDescriptor%", !0), d = i("%Object.defineProperty%", !0), c = i("%Math.max%");
|
|
350
|
+
if (d)
|
|
351
351
|
try {
|
|
352
|
-
|
|
352
|
+
d({}, "a", { value: 1 });
|
|
353
353
|
} catch {
|
|
354
|
-
|
|
354
|
+
d = null;
|
|
355
355
|
}
|
|
356
|
-
e.exports = function(
|
|
356
|
+
e.exports = function(g) {
|
|
357
357
|
var u = n(r, a, arguments);
|
|
358
|
-
if (s &&
|
|
358
|
+
if (s && d) {
|
|
359
359
|
var o = s(u, "length");
|
|
360
|
-
o.configurable &&
|
|
360
|
+
o.configurable && d(
|
|
361
361
|
u,
|
|
362
362
|
"length",
|
|
363
|
-
{ value: 1 + c(0,
|
|
363
|
+
{ value: 1 + c(0, g.length - (arguments.length - 1)) }
|
|
364
364
|
);
|
|
365
365
|
}
|
|
366
366
|
return u;
|
|
@@ -368,13 +368,13 @@ function rt() {
|
|
|
368
368
|
var p = function() {
|
|
369
369
|
return n(r, t, arguments);
|
|
370
370
|
};
|
|
371
|
-
|
|
371
|
+
d ? d(e.exports, "apply", { value: p }) : e.exports.apply = p;
|
|
372
372
|
})(tr)), tr.exports;
|
|
373
373
|
}
|
|
374
|
-
var ar,
|
|
374
|
+
var ar, Ir;
|
|
375
375
|
function tt() {
|
|
376
|
-
if (
|
|
377
|
-
|
|
376
|
+
if (Ir) return ar;
|
|
377
|
+
Ir = 1;
|
|
378
378
|
var e = hr(), r = rt(), i = r(e("String.prototype.indexOf"));
|
|
379
379
|
return ar = function(a, n) {
|
|
380
380
|
var s = e(a, !!n);
|
|
@@ -389,352 +389,352 @@ 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, i = e && r && typeof r.get == "function" ? r.get : null, t = e && Map.prototype.forEach, a = typeof Set == "function" && Set.prototype, n = Object.getOwnPropertyDescriptor && a ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, s = a && n && typeof n.get == "function" ? n.get : null,
|
|
393
|
-
return
|
|
392
|
+
var e = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, i = e && r && typeof r.get == "function" ? r.get : null, t = e && Map.prototype.forEach, a = typeof Set == "function" && Set.prototype, n = Object.getOwnPropertyDescriptor && a ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, s = a && n && typeof n.get == "function" ? n.get : null, d = a && Set.prototype.forEach, c = typeof WeakMap == "function" && WeakMap.prototype, p = c ? WeakMap.prototype.has : null, S = typeof WeakSet == "function" && WeakSet.prototype, g = S ? WeakSet.prototype.has : null, u = typeof WeakRef == "function" && WeakRef.prototype, o = u ? WeakRef.prototype.deref : null, f = Boolean.prototype.valueOf, w = Object.prototype.toString, m = Function.prototype.toString, l = String.prototype.match, v = String.prototype.slice, b = String.prototype.replace, O = String.prototype.toUpperCase, P = String.prototype.toLowerCase, k = RegExp.prototype.test, L = Array.prototype.concat, R = Array.prototype.join, j = Array.prototype.slice, U = Math.floor, x = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, T = Object.getOwnPropertySymbols, I = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, N = typeof Symbol == "function" && typeof Symbol.iterator == "object", $ = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === N || !0) ? Symbol.toStringTag : null, z = Object.prototype.propertyIsEnumerable, F = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(h) {
|
|
393
|
+
return h.__proto__;
|
|
394
394
|
} : null);
|
|
395
|
-
function Z(
|
|
396
|
-
if (
|
|
397
|
-
return
|
|
395
|
+
function Z(h, A) {
|
|
396
|
+
if (h === 1 / 0 || h === -1 / 0 || h !== h || h && h > -1e3 && h < 1e3 || k.call(/e/, A))
|
|
397
|
+
return A;
|
|
398
398
|
var D = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
399
|
-
if (typeof
|
|
400
|
-
var y =
|
|
401
|
-
if (y !==
|
|
402
|
-
var E = String(y),
|
|
403
|
-
return
|
|
399
|
+
if (typeof h == "number") {
|
|
400
|
+
var y = h < 0 ? -U(-h) : U(h);
|
|
401
|
+
if (y !== h) {
|
|
402
|
+
var E = String(y), C = v.call(A, E.length + 1);
|
|
403
|
+
return b.call(E, D, "$&_") + "." + b.call(b.call(C, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
|
-
return
|
|
406
|
+
return b.call(A, D, "$&_");
|
|
407
407
|
}
|
|
408
408
|
var Q = it, ne = Q.custom, X = se(ne) ? ne : null;
|
|
409
|
-
nr = function
|
|
410
|
-
var
|
|
411
|
-
if (J(
|
|
409
|
+
nr = function h(A, D, y, E) {
|
|
410
|
+
var C = D || {};
|
|
411
|
+
if (J(C, "quoteStyle") && C.quoteStyle !== "single" && C.quoteStyle !== "double")
|
|
412
412
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
413
|
-
if (J(
|
|
413
|
+
if (J(C, "maxStringLength") && (typeof C.maxStringLength == "number" ? C.maxStringLength < 0 && C.maxStringLength !== 1 / 0 : C.maxStringLength !== null))
|
|
414
414
|
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
415
|
-
var G = J(
|
|
415
|
+
var G = J(C, "customInspect") ? C.customInspect : !0;
|
|
416
416
|
if (typeof G != "boolean" && G !== "symbol")
|
|
417
417
|
throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
|
|
418
|
-
if (J(
|
|
418
|
+
if (J(C, "indent") && C.indent !== null && C.indent !== " " && !(parseInt(C.indent, 10) === C.indent && C.indent > 0))
|
|
419
419
|
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
420
|
-
if (J(
|
|
420
|
+
if (J(C, "numericSeparator") && typeof C.numericSeparator != "boolean")
|
|
421
421
|
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
422
|
-
var ae =
|
|
423
|
-
if (typeof
|
|
422
|
+
var ae = C.numericSeparator;
|
|
423
|
+
if (typeof A > "u")
|
|
424
424
|
return "undefined";
|
|
425
|
-
if (
|
|
425
|
+
if (A === null)
|
|
426
426
|
return "null";
|
|
427
|
-
if (typeof
|
|
428
|
-
return
|
|
429
|
-
if (typeof
|
|
430
|
-
return Oe(
|
|
431
|
-
if (typeof
|
|
432
|
-
if (
|
|
433
|
-
return 1 / 0 /
|
|
434
|
-
var W = String(
|
|
435
|
-
return ae ? Z(
|
|
427
|
+
if (typeof A == "boolean")
|
|
428
|
+
return A ? "true" : "false";
|
|
429
|
+
if (typeof A == "string")
|
|
430
|
+
return Oe(A, C);
|
|
431
|
+
if (typeof A == "number") {
|
|
432
|
+
if (A === 0)
|
|
433
|
+
return 1 / 0 / A > 0 ? "0" : "-0";
|
|
434
|
+
var W = String(A);
|
|
435
|
+
return ae ? Z(A, W) : W;
|
|
436
436
|
}
|
|
437
|
-
if (typeof
|
|
438
|
-
var
|
|
439
|
-
return ae ? Z(
|
|
437
|
+
if (typeof A == "bigint") {
|
|
438
|
+
var M = String(A) + "n";
|
|
439
|
+
return ae ? Z(A, M) : M;
|
|
440
440
|
}
|
|
441
|
-
var B = typeof
|
|
442
|
-
if (typeof y > "u" && (y = 0), y >= B && B > 0 && typeof
|
|
443
|
-
return re(
|
|
444
|
-
var
|
|
441
|
+
var B = typeof C.depth > "u" ? 5 : C.depth;
|
|
442
|
+
if (typeof y > "u" && (y = 0), y >= B && B > 0 && typeof A == "object")
|
|
443
|
+
return re(A) ? "[Array]" : "[Object]";
|
|
444
|
+
var V = Le(C, y);
|
|
445
445
|
if (typeof E > "u")
|
|
446
446
|
E = [];
|
|
447
|
-
else if (xe(E,
|
|
447
|
+
else if (xe(E, A) >= 0)
|
|
448
448
|
return "[Circular]";
|
|
449
449
|
function H(Me, Be, Jr) {
|
|
450
|
-
if (Be && (E =
|
|
450
|
+
if (Be && (E = j.call(E), E.push(Be)), Jr) {
|
|
451
451
|
var xr = {
|
|
452
|
-
depth:
|
|
452
|
+
depth: C.depth
|
|
453
453
|
};
|
|
454
|
-
return J(
|
|
454
|
+
return J(C, "quoteStyle") && (xr.quoteStyle = C.quoteStyle), h(Me, xr, y + 1, E);
|
|
455
455
|
}
|
|
456
|
-
return
|
|
456
|
+
return h(Me, C, y + 1, E);
|
|
457
457
|
}
|
|
458
|
-
if (typeof
|
|
459
|
-
var Y =
|
|
460
|
-
return "[Function" + (Y ? ": " + Y : " (anonymous)") + "]" + (Ee.length > 0 ? " { " +
|
|
458
|
+
if (typeof A == "function" && !ce(A)) {
|
|
459
|
+
var Y = Te(A), Ee = ge(A, H);
|
|
460
|
+
return "[Function" + (Y ? ": " + Y : " (anonymous)") + "]" + (Ee.length > 0 ? " { " + R.call(Ee, ", ") + " }" : "");
|
|
461
461
|
}
|
|
462
|
-
if (se(
|
|
463
|
-
var Ar =
|
|
464
|
-
return typeof
|
|
462
|
+
if (se(A)) {
|
|
463
|
+
var Ar = N ? b.call(String(A), /^(Symbol\(.*\))_[^)]*$/, "$1") : I.call(A);
|
|
464
|
+
return typeof A == "object" && !N ? le(Ar) : Ar;
|
|
465
465
|
}
|
|
466
|
-
if (_e(
|
|
467
|
-
for (var Fe = "<" +
|
|
468
|
-
Fe += " " + ze[$e].name + "=" + K(ie(ze[$e].value), "double",
|
|
469
|
-
return Fe += ">",
|
|
466
|
+
if (_e(A)) {
|
|
467
|
+
for (var Fe = "<" + P.call(String(A.nodeName)), ze = A.attributes || [], $e = 0; $e < ze.length; $e++)
|
|
468
|
+
Fe += " " + ze[$e].name + "=" + K(ie(ze[$e].value), "double", C);
|
|
469
|
+
return Fe += ">", A.childNodes && A.childNodes.length && (Fe += "..."), Fe += "</" + P.call(String(A.nodeName)) + ">", Fe;
|
|
470
470
|
}
|
|
471
|
-
if (re(
|
|
472
|
-
if (
|
|
471
|
+
if (re(A)) {
|
|
472
|
+
if (A.length === 0)
|
|
473
473
|
return "[]";
|
|
474
|
-
var Ke = ge(
|
|
475
|
-
return
|
|
474
|
+
var Ke = ge(A, H);
|
|
475
|
+
return V && !Ce(Ke) ? "[" + he(Ke, V) + "]" : "[ " + R.call(Ke, ", ") + " ]";
|
|
476
476
|
}
|
|
477
|
-
if (ue(
|
|
478
|
-
var We = ge(
|
|
479
|
-
return !("cause" in Error.prototype) && "cause" in
|
|
477
|
+
if (ue(A)) {
|
|
478
|
+
var We = ge(A, H);
|
|
479
|
+
return !("cause" in Error.prototype) && "cause" in A && !z.call(A, "cause") ? "{ [" + String(A) + "] " + R.call(L.call("[cause]: " + H(A.cause), We), ", ") + " }" : We.length === 0 ? "[" + String(A) + "]" : "{ [" + String(A) + "] " + R.call(We, ", ") + " }";
|
|
480
480
|
}
|
|
481
|
-
if (typeof
|
|
482
|
-
if (X && typeof
|
|
483
|
-
return Q(
|
|
484
|
-
if (G !== "symbol" && typeof
|
|
485
|
-
return
|
|
481
|
+
if (typeof A == "object" && G) {
|
|
482
|
+
if (X && typeof A[X] == "function" && Q)
|
|
483
|
+
return Q(A, { depth: B - y });
|
|
484
|
+
if (G !== "symbol" && typeof A.inspect == "function")
|
|
485
|
+
return A.inspect();
|
|
486
486
|
}
|
|
487
|
-
if (
|
|
487
|
+
if (Re(A)) {
|
|
488
488
|
var br = [];
|
|
489
|
-
return t.call(
|
|
490
|
-
br.push(H(Be,
|
|
491
|
-
}), we("Map", i.call(
|
|
489
|
+
return t.call(A, function(Me, Be) {
|
|
490
|
+
br.push(H(Be, A, !0) + " => " + H(Me, A));
|
|
491
|
+
}), we("Map", i.call(A), br, V);
|
|
492
492
|
}
|
|
493
|
-
if (ke(
|
|
493
|
+
if (ke(A)) {
|
|
494
494
|
var Sr = [];
|
|
495
|
-
return
|
|
496
|
-
Sr.push(H(Me,
|
|
497
|
-
}), we("Set", s.call(
|
|
495
|
+
return d.call(A, function(Me) {
|
|
496
|
+
Sr.push(H(Me, A));
|
|
497
|
+
}), we("Set", s.call(A), Sr, V);
|
|
498
498
|
}
|
|
499
|
-
if (me(
|
|
499
|
+
if (me(A))
|
|
500
500
|
return fe("WeakMap");
|
|
501
|
-
if (
|
|
501
|
+
if (Ie(A))
|
|
502
502
|
return fe("WeakSet");
|
|
503
|
-
if (Pe(
|
|
503
|
+
if (Pe(A))
|
|
504
504
|
return fe("WeakRef");
|
|
505
|
-
if (de(
|
|
506
|
-
return le(H(Number(
|
|
507
|
-
if (ye(
|
|
508
|
-
return le(H(
|
|
509
|
-
if (pe(
|
|
510
|
-
return le(
|
|
511
|
-
if (oe(
|
|
512
|
-
return le(H(String(
|
|
513
|
-
if (!te(
|
|
514
|
-
var He = ge(
|
|
515
|
-
return He.length === 0 ? qe + "{}" :
|
|
505
|
+
if (de(A))
|
|
506
|
+
return le(H(Number(A)));
|
|
507
|
+
if (ye(A))
|
|
508
|
+
return le(H(x.call(A)));
|
|
509
|
+
if (pe(A))
|
|
510
|
+
return le(f.call(A));
|
|
511
|
+
if (oe(A))
|
|
512
|
+
return le(H(String(A)));
|
|
513
|
+
if (!te(A) && !ce(A)) {
|
|
514
|
+
var He = ge(A, H), wr = F ? F(A) === Object.prototype : A instanceof Object || A.constructor === Object, Je = A instanceof Object ? "" : "null prototype", Er = !wr && $ && Object(A) === A && $ in A ? v.call(ee(A), 8, -1) : Je ? "Object" : "", Hr = wr || typeof A.constructor != "function" ? "" : A.constructor.name ? A.constructor.name + " " : "", qe = Hr + (Er || Je ? "[" + R.call(L.call([], Er || [], Je || []), ": ") + "] " : "");
|
|
515
|
+
return He.length === 0 ? qe + "{}" : V ? qe + "{" + he(He, V) + "}" : qe + "{ " + R.call(He, ", ") + " }";
|
|
516
516
|
}
|
|
517
|
-
return String(
|
|
517
|
+
return String(A);
|
|
518
518
|
};
|
|
519
|
-
function K(
|
|
520
|
-
var y = (D.quoteStyle ||
|
|
521
|
-
return y +
|
|
519
|
+
function K(h, A, D) {
|
|
520
|
+
var y = (D.quoteStyle || A) === "double" ? '"' : "'";
|
|
521
|
+
return y + h + y;
|
|
522
522
|
}
|
|
523
|
-
function ie(
|
|
524
|
-
return
|
|
523
|
+
function ie(h) {
|
|
524
|
+
return b.call(String(h), /"/g, """);
|
|
525
525
|
}
|
|
526
|
-
function re(
|
|
527
|
-
return ee(
|
|
526
|
+
function re(h) {
|
|
527
|
+
return ee(h) === "[object Array]" && (!$ || !(typeof h == "object" && $ in h));
|
|
528
528
|
}
|
|
529
|
-
function te(
|
|
530
|
-
return ee(
|
|
529
|
+
function te(h) {
|
|
530
|
+
return ee(h) === "[object Date]" && (!$ || !(typeof h == "object" && $ in h));
|
|
531
531
|
}
|
|
532
|
-
function ce(
|
|
533
|
-
return ee(
|
|
532
|
+
function ce(h) {
|
|
533
|
+
return ee(h) === "[object RegExp]" && (!$ || !(typeof h == "object" && $ in h));
|
|
534
534
|
}
|
|
535
|
-
function ue(
|
|
536
|
-
return ee(
|
|
535
|
+
function ue(h) {
|
|
536
|
+
return ee(h) === "[object Error]" && (!$ || !(typeof h == "object" && $ in h));
|
|
537
537
|
}
|
|
538
|
-
function oe(
|
|
539
|
-
return ee(
|
|
538
|
+
function oe(h) {
|
|
539
|
+
return ee(h) === "[object String]" && (!$ || !(typeof h == "object" && $ in h));
|
|
540
540
|
}
|
|
541
|
-
function de(
|
|
542
|
-
return ee(
|
|
541
|
+
function de(h) {
|
|
542
|
+
return ee(h) === "[object Number]" && (!$ || !(typeof h == "object" && $ in h));
|
|
543
543
|
}
|
|
544
|
-
function pe(
|
|
545
|
-
return ee(
|
|
544
|
+
function pe(h) {
|
|
545
|
+
return ee(h) === "[object Boolean]" && (!$ || !(typeof h == "object" && $ in h));
|
|
546
546
|
}
|
|
547
|
-
function se(
|
|
548
|
-
if (
|
|
549
|
-
return
|
|
550
|
-
if (typeof
|
|
547
|
+
function se(h) {
|
|
548
|
+
if (N)
|
|
549
|
+
return h && typeof h == "object" && h instanceof Symbol;
|
|
550
|
+
if (typeof h == "symbol")
|
|
551
551
|
return !0;
|
|
552
|
-
if (!
|
|
552
|
+
if (!h || typeof h != "object" || !I)
|
|
553
553
|
return !1;
|
|
554
554
|
try {
|
|
555
|
-
return
|
|
555
|
+
return I.call(h), !0;
|
|
556
556
|
} catch {
|
|
557
557
|
}
|
|
558
558
|
return !1;
|
|
559
559
|
}
|
|
560
|
-
function ye(
|
|
561
|
-
if (!
|
|
560
|
+
function ye(h) {
|
|
561
|
+
if (!h || typeof h != "object" || !x)
|
|
562
562
|
return !1;
|
|
563
563
|
try {
|
|
564
|
-
return
|
|
564
|
+
return x.call(h), !0;
|
|
565
565
|
} catch {
|
|
566
566
|
}
|
|
567
567
|
return !1;
|
|
568
568
|
}
|
|
569
|
-
var Se = Object.prototype.hasOwnProperty || function(
|
|
570
|
-
return
|
|
569
|
+
var Se = Object.prototype.hasOwnProperty || function(h) {
|
|
570
|
+
return h in this;
|
|
571
571
|
};
|
|
572
|
-
function J(
|
|
573
|
-
return Se.call(
|
|
574
|
-
}
|
|
575
|
-
function ee(
|
|
576
|
-
return
|
|
577
|
-
}
|
|
578
|
-
function
|
|
579
|
-
if (
|
|
580
|
-
return
|
|
581
|
-
var
|
|
582
|
-
return
|
|
583
|
-
}
|
|
584
|
-
function xe(
|
|
585
|
-
if (
|
|
586
|
-
return
|
|
587
|
-
for (var D = 0, y =
|
|
588
|
-
if (
|
|
572
|
+
function J(h, A) {
|
|
573
|
+
return Se.call(h, A);
|
|
574
|
+
}
|
|
575
|
+
function ee(h) {
|
|
576
|
+
return w.call(h);
|
|
577
|
+
}
|
|
578
|
+
function Te(h) {
|
|
579
|
+
if (h.name)
|
|
580
|
+
return h.name;
|
|
581
|
+
var A = l.call(m.call(h), /^function\s*([\w$]+)/);
|
|
582
|
+
return A ? A[1] : null;
|
|
583
|
+
}
|
|
584
|
+
function xe(h, A) {
|
|
585
|
+
if (h.indexOf)
|
|
586
|
+
return h.indexOf(A);
|
|
587
|
+
for (var D = 0, y = h.length; D < y; D++)
|
|
588
|
+
if (h[D] === A)
|
|
589
589
|
return D;
|
|
590
590
|
return -1;
|
|
591
591
|
}
|
|
592
|
-
function
|
|
593
|
-
if (!i || !
|
|
592
|
+
function Re(h) {
|
|
593
|
+
if (!i || !h || typeof h != "object")
|
|
594
594
|
return !1;
|
|
595
595
|
try {
|
|
596
|
-
i.call(
|
|
596
|
+
i.call(h);
|
|
597
597
|
try {
|
|
598
|
-
s.call(
|
|
598
|
+
s.call(h);
|
|
599
599
|
} catch {
|
|
600
600
|
return !0;
|
|
601
601
|
}
|
|
602
|
-
return
|
|
602
|
+
return h instanceof Map;
|
|
603
603
|
} catch {
|
|
604
604
|
}
|
|
605
605
|
return !1;
|
|
606
606
|
}
|
|
607
|
-
function me(
|
|
608
|
-
if (!p || !
|
|
607
|
+
function me(h) {
|
|
608
|
+
if (!p || !h || typeof h != "object")
|
|
609
609
|
return !1;
|
|
610
610
|
try {
|
|
611
|
-
p.call(
|
|
611
|
+
p.call(h, p);
|
|
612
612
|
try {
|
|
613
|
-
|
|
613
|
+
g.call(h, g);
|
|
614
614
|
} catch {
|
|
615
615
|
return !0;
|
|
616
616
|
}
|
|
617
|
-
return
|
|
617
|
+
return h instanceof WeakMap;
|
|
618
618
|
} catch {
|
|
619
619
|
}
|
|
620
620
|
return !1;
|
|
621
621
|
}
|
|
622
|
-
function Pe(
|
|
623
|
-
if (!o || !
|
|
622
|
+
function Pe(h) {
|
|
623
|
+
if (!o || !h || typeof h != "object")
|
|
624
624
|
return !1;
|
|
625
625
|
try {
|
|
626
|
-
return o.call(
|
|
626
|
+
return o.call(h), !0;
|
|
627
627
|
} catch {
|
|
628
628
|
}
|
|
629
629
|
return !1;
|
|
630
630
|
}
|
|
631
|
-
function ke(
|
|
632
|
-
if (!s || !
|
|
631
|
+
function ke(h) {
|
|
632
|
+
if (!s || !h || typeof h != "object")
|
|
633
633
|
return !1;
|
|
634
634
|
try {
|
|
635
|
-
s.call(
|
|
635
|
+
s.call(h);
|
|
636
636
|
try {
|
|
637
|
-
i.call(
|
|
637
|
+
i.call(h);
|
|
638
638
|
} catch {
|
|
639
639
|
return !0;
|
|
640
640
|
}
|
|
641
|
-
return
|
|
641
|
+
return h instanceof Set;
|
|
642
642
|
} catch {
|
|
643
643
|
}
|
|
644
644
|
return !1;
|
|
645
645
|
}
|
|
646
|
-
function
|
|
647
|
-
if (!
|
|
646
|
+
function Ie(h) {
|
|
647
|
+
if (!g || !h || typeof h != "object")
|
|
648
648
|
return !1;
|
|
649
649
|
try {
|
|
650
|
-
|
|
650
|
+
g.call(h, g);
|
|
651
651
|
try {
|
|
652
|
-
p.call(
|
|
652
|
+
p.call(h, p);
|
|
653
653
|
} catch {
|
|
654
654
|
return !0;
|
|
655
655
|
}
|
|
656
|
-
return
|
|
656
|
+
return h instanceof WeakSet;
|
|
657
657
|
} catch {
|
|
658
658
|
}
|
|
659
659
|
return !1;
|
|
660
660
|
}
|
|
661
|
-
function _e(
|
|
662
|
-
return !
|
|
661
|
+
function _e(h) {
|
|
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 Oe(
|
|
665
|
-
if (
|
|
666
|
-
var D =
|
|
667
|
-
return Oe(v.call(
|
|
664
|
+
function Oe(h, A) {
|
|
665
|
+
if (h.length > A.maxStringLength) {
|
|
666
|
+
var D = h.length - A.maxStringLength, y = "... " + D + " more character" + (D > 1 ? "s" : "");
|
|
667
|
+
return Oe(v.call(h, 0, A.maxStringLength), A) + y;
|
|
668
668
|
}
|
|
669
|
-
var E =
|
|
670
|
-
return K(E, "single",
|
|
669
|
+
var E = b.call(b.call(h, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Ne);
|
|
670
|
+
return K(E, "single", A);
|
|
671
671
|
}
|
|
672
|
-
function Ne(
|
|
673
|
-
var
|
|
672
|
+
function Ne(h) {
|
|
673
|
+
var A = 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
|
-
}[
|
|
680
|
-
return D ? "\\" + D : "\\x" + (
|
|
679
|
+
}[A];
|
|
680
|
+
return D ? "\\" + D : "\\x" + (A < 16 ? "0" : "") + O.call(A.toString(16));
|
|
681
681
|
}
|
|
682
|
-
function le(
|
|
683
|
-
return "Object(" +
|
|
682
|
+
function le(h) {
|
|
683
|
+
return "Object(" + h + ")";
|
|
684
684
|
}
|
|
685
|
-
function fe(
|
|
686
|
-
return
|
|
685
|
+
function fe(h) {
|
|
686
|
+
return h + " { ? }";
|
|
687
687
|
}
|
|
688
|
-
function we(
|
|
689
|
-
var E = y ? he(D, y) :
|
|
690
|
-
return
|
|
688
|
+
function we(h, A, D, y) {
|
|
689
|
+
var E = y ? he(D, y) : R.call(D, ", ");
|
|
690
|
+
return h + " (" + A + ") {" + E + "}";
|
|
691
691
|
}
|
|
692
|
-
function Ce(
|
|
693
|
-
for (var
|
|
694
|
-
if (xe(
|
|
692
|
+
function Ce(h) {
|
|
693
|
+
for (var A = 0; A < h.length; A++)
|
|
694
|
+
if (xe(h[A], `
|
|
695
695
|
`) >= 0)
|
|
696
696
|
return !1;
|
|
697
697
|
return !0;
|
|
698
698
|
}
|
|
699
|
-
function Le(
|
|
699
|
+
function Le(h, A) {
|
|
700
700
|
var D;
|
|
701
|
-
if (
|
|
701
|
+
if (h.indent === " ")
|
|
702
702
|
D = " ";
|
|
703
|
-
else if (typeof
|
|
704
|
-
D =
|
|
703
|
+
else if (typeof h.indent == "number" && h.indent > 0)
|
|
704
|
+
D = R.call(Array(h.indent + 1), " ");
|
|
705
705
|
else
|
|
706
706
|
return null;
|
|
707
707
|
return {
|
|
708
708
|
base: D,
|
|
709
|
-
prev:
|
|
709
|
+
prev: R.call(Array(A + 1), D)
|
|
710
710
|
};
|
|
711
711
|
}
|
|
712
|
-
function he(
|
|
713
|
-
if (
|
|
712
|
+
function he(h, A) {
|
|
713
|
+
if (h.length === 0)
|
|
714
714
|
return "";
|
|
715
715
|
var D = `
|
|
716
|
-
` +
|
|
717
|
-
return D +
|
|
718
|
-
` +
|
|
716
|
+
` + A.prev + A.base;
|
|
717
|
+
return D + R.call(h, "," + D) + `
|
|
718
|
+
` + A.prev;
|
|
719
719
|
}
|
|
720
|
-
function ge(
|
|
721
|
-
var D = re(
|
|
720
|
+
function ge(h, A) {
|
|
721
|
+
var D = re(h), y = [];
|
|
722
722
|
if (D) {
|
|
723
|
-
y.length =
|
|
724
|
-
for (var E = 0; E <
|
|
725
|
-
y[E] = J(
|
|
723
|
+
y.length = h.length;
|
|
724
|
+
for (var E = 0; E < h.length; E++)
|
|
725
|
+
y[E] = J(h, E) ? A(h[E], h) : "";
|
|
726
726
|
}
|
|
727
|
-
var
|
|
728
|
-
if (
|
|
727
|
+
var C = typeof T == "function" ? T(h) : [], G;
|
|
728
|
+
if (N) {
|
|
729
729
|
G = {};
|
|
730
|
-
for (var ae = 0; ae <
|
|
731
|
-
G["$" +
|
|
730
|
+
for (var ae = 0; ae < C.length; ae++)
|
|
731
|
+
G["$" + C[ae]] = C[ae];
|
|
732
732
|
}
|
|
733
|
-
for (var W in
|
|
734
|
-
J(
|
|
735
|
-
if (typeof
|
|
736
|
-
for (var
|
|
737
|
-
z.call(
|
|
733
|
+
for (var W in h)
|
|
734
|
+
J(h, W) && (D && String(Number(W)) === W && W < h.length || N && G["$" + W] instanceof Symbol || (k.call(/[^\w$]/, W) ? y.push(A(W, h) + ": " + A(h[W], h)) : y.push(W + ": " + A(h[W], h))));
|
|
735
|
+
if (typeof T == "function")
|
|
736
|
+
for (var M = 0; M < C.length; M++)
|
|
737
|
+
z.call(h, C[M]) && y.push("[" + A(C[M]) + "]: " + A(h[C[M]], h));
|
|
738
738
|
return y;
|
|
739
739
|
}
|
|
740
740
|
return nr;
|
|
@@ -743,53 +743,53 @@ var ir, Nr;
|
|
|
743
743
|
function st() {
|
|
744
744
|
if (Nr) return ir;
|
|
745
745
|
Nr = 1;
|
|
746
|
-
var e = hr(), r = tt(), i = /* @__PURE__ */ ot(), t = e("%TypeError%"), a = e("%WeakMap%", !0), n = e("%Map%", !0), s = r("WeakMap.prototype.get", !0),
|
|
747
|
-
for (var v =
|
|
748
|
-
if (
|
|
749
|
-
return v.next =
|
|
750
|
-
}, o = function(
|
|
751
|
-
var v = u(
|
|
746
|
+
var e = hr(), r = tt(), i = /* @__PURE__ */ ot(), t = e("%TypeError%"), a = e("%WeakMap%", !0), n = e("%Map%", !0), s = r("WeakMap.prototype.get", !0), d = r("WeakMap.prototype.set", !0), c = r("WeakMap.prototype.has", !0), p = r("Map.prototype.get", !0), S = r("Map.prototype.set", !0), g = r("Map.prototype.has", !0), u = function(m, l) {
|
|
747
|
+
for (var v = m, b; (b = v.next) !== null; v = b)
|
|
748
|
+
if (b.key === l)
|
|
749
|
+
return v.next = b.next, b.next = m.next, m.next = b, b;
|
|
750
|
+
}, o = function(m, l) {
|
|
751
|
+
var v = u(m, l);
|
|
752
752
|
return v && v.value;
|
|
753
|
-
},
|
|
754
|
-
var
|
|
755
|
-
|
|
753
|
+
}, f = function(m, l, v) {
|
|
754
|
+
var b = u(m, l);
|
|
755
|
+
b ? b.value = v : m.next = {
|
|
756
756
|
// eslint-disable-line no-param-reassign
|
|
757
757
|
key: l,
|
|
758
|
-
next:
|
|
758
|
+
next: m.next,
|
|
759
759
|
value: v
|
|
760
760
|
};
|
|
761
|
-
},
|
|
762
|
-
return !!u(
|
|
761
|
+
}, w = function(m, l) {
|
|
762
|
+
return !!u(m, l);
|
|
763
763
|
};
|
|
764
764
|
return ir = function() {
|
|
765
|
-
var l, v,
|
|
766
|
-
assert: function(
|
|
767
|
-
if (!O.has(
|
|
768
|
-
throw new t("Side channel does not contain " + i(
|
|
765
|
+
var l, v, b, O = {
|
|
766
|
+
assert: function(P) {
|
|
767
|
+
if (!O.has(P))
|
|
768
|
+
throw new t("Side channel does not contain " + i(P));
|
|
769
769
|
},
|
|
770
|
-
get: function(
|
|
771
|
-
if (a &&
|
|
770
|
+
get: function(P) {
|
|
771
|
+
if (a && P && (typeof P == "object" || typeof P == "function")) {
|
|
772
772
|
if (l)
|
|
773
|
-
return s(l,
|
|
773
|
+
return s(l, P);
|
|
774
774
|
} else if (n) {
|
|
775
775
|
if (v)
|
|
776
|
-
return p(v,
|
|
777
|
-
} else if (
|
|
778
|
-
return o(
|
|
776
|
+
return p(v, P);
|
|
777
|
+
} else if (b)
|
|
778
|
+
return o(b, P);
|
|
779
779
|
},
|
|
780
|
-
has: function(
|
|
781
|
-
if (a &&
|
|
780
|
+
has: function(P) {
|
|
781
|
+
if (a && P && (typeof P == "object" || typeof P == "function")) {
|
|
782
782
|
if (l)
|
|
783
|
-
return c(l,
|
|
783
|
+
return c(l, P);
|
|
784
784
|
} else if (n) {
|
|
785
785
|
if (v)
|
|
786
|
-
return
|
|
787
|
-
} else if (
|
|
788
|
-
return
|
|
786
|
+
return g(v, P);
|
|
787
|
+
} else if (b)
|
|
788
|
+
return w(b, P);
|
|
789
789
|
return !1;
|
|
790
790
|
},
|
|
791
|
-
set: function(
|
|
792
|
-
a &&
|
|
791
|
+
set: function(P, k) {
|
|
792
|
+
a && P && (typeof P == "object" || typeof P == "function") ? (l || (l = new a()), d(l, P, k)) : n ? (v || (v = new n()), S(v, P, k)) : (b || (b = { key: {}, next: null }), f(b, P, k));
|
|
793
793
|
}
|
|
794
794
|
};
|
|
795
795
|
return O;
|
|
@@ -822,53 +822,53 @@ function Kr() {
|
|
|
822
822
|
if (Fr) return sr;
|
|
823
823
|
Fr = 1;
|
|
824
824
|
var e = gr(), r = Object.prototype.hasOwnProperty, i = Array.isArray, t = (function() {
|
|
825
|
-
for (var
|
|
826
|
-
|
|
827
|
-
return
|
|
828
|
-
})(), a = function(
|
|
829
|
-
for (;
|
|
830
|
-
var l =
|
|
825
|
+
for (var w = [], m = 0; m < 256; ++m)
|
|
826
|
+
w.push("%" + ((m < 16 ? "0" : "") + m.toString(16)).toUpperCase());
|
|
827
|
+
return w;
|
|
828
|
+
})(), a = function(m) {
|
|
829
|
+
for (; m.length > 1; ) {
|
|
830
|
+
var l = m.pop(), v = l.obj[l.prop];
|
|
831
831
|
if (i(v)) {
|
|
832
|
-
for (var
|
|
833
|
-
typeof v[O] < "u" &&
|
|
834
|
-
l.obj[l.prop] =
|
|
832
|
+
for (var b = [], O = 0; O < v.length; ++O)
|
|
833
|
+
typeof v[O] < "u" && b.push(v[O]);
|
|
834
|
+
l.obj[l.prop] = b;
|
|
835
835
|
}
|
|
836
836
|
}
|
|
837
|
-
}, n = function(
|
|
838
|
-
for (var v = l && l.plainObjects ? /* @__PURE__ */ Object.create(null) : {},
|
|
839
|
-
typeof
|
|
837
|
+
}, n = function(m, l) {
|
|
838
|
+
for (var v = l && l.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, b = 0; b < m.length; ++b)
|
|
839
|
+
typeof m[b] < "u" && (v[b] = m[b]);
|
|
840
840
|
return v;
|
|
841
|
-
}, s = function
|
|
841
|
+
}, s = function w(m, l, v) {
|
|
842
842
|
if (!l)
|
|
843
|
-
return
|
|
843
|
+
return m;
|
|
844
844
|
if (typeof l != "object") {
|
|
845
|
-
if (i(
|
|
846
|
-
|
|
847
|
-
else if (
|
|
848
|
-
(v && (v.plainObjects || v.allowPrototypes) || !r.call(Object.prototype, l)) && (
|
|
845
|
+
if (i(m))
|
|
846
|
+
m.push(l);
|
|
847
|
+
else if (m && typeof m == "object")
|
|
848
|
+
(v && (v.plainObjects || v.allowPrototypes) || !r.call(Object.prototype, l)) && (m[l] = !0);
|
|
849
849
|
else
|
|
850
|
-
return [
|
|
851
|
-
return
|
|
850
|
+
return [m, l];
|
|
851
|
+
return m;
|
|
852
852
|
}
|
|
853
|
-
if (!
|
|
854
|
-
return [
|
|
855
|
-
var
|
|
856
|
-
return i(
|
|
857
|
-
if (r.call(
|
|
858
|
-
var
|
|
859
|
-
|
|
853
|
+
if (!m || typeof m != "object")
|
|
854
|
+
return [m].concat(l);
|
|
855
|
+
var b = m;
|
|
856
|
+
return i(m) && !i(l) && (b = n(m, v)), i(m) && i(l) ? (l.forEach(function(O, P) {
|
|
857
|
+
if (r.call(m, P)) {
|
|
858
|
+
var k = m[P];
|
|
859
|
+
k && typeof k == "object" && O && typeof O == "object" ? m[P] = w(k, O, v) : m.push(O);
|
|
860
860
|
} else
|
|
861
|
-
|
|
862
|
-
}),
|
|
863
|
-
var
|
|
864
|
-
return r.call(O,
|
|
865
|
-
},
|
|
866
|
-
},
|
|
867
|
-
return Object.keys(l).reduce(function(v,
|
|
868
|
-
return v[
|
|
869
|
-
},
|
|
870
|
-
}, c = function(
|
|
871
|
-
var v =
|
|
861
|
+
m[P] = O;
|
|
862
|
+
}), m) : Object.keys(l).reduce(function(O, P) {
|
|
863
|
+
var k = l[P];
|
|
864
|
+
return r.call(O, P) ? O[P] = w(O[P], k, v) : O[P] = k, O;
|
|
865
|
+
}, b);
|
|
866
|
+
}, d = function(m, l) {
|
|
867
|
+
return Object.keys(l).reduce(function(v, b) {
|
|
868
|
+
return v[b] = l[b], v;
|
|
869
|
+
}, m);
|
|
870
|
+
}, c = function(w, m, l) {
|
|
871
|
+
var v = w.replace(/\+/g, " ");
|
|
872
872
|
if (l === "iso-8859-1")
|
|
873
873
|
return v.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
874
874
|
try {
|
|
@@ -876,66 +876,66 @@ function Kr() {
|
|
|
876
876
|
} catch {
|
|
877
877
|
return v;
|
|
878
878
|
}
|
|
879
|
-
}, p = function(
|
|
880
|
-
if (
|
|
881
|
-
return
|
|
882
|
-
var
|
|
883
|
-
if (typeof
|
|
884
|
-
return escape(
|
|
885
|
-
return "%26%23" + parseInt(
|
|
879
|
+
}, p = function(m, l, v, b, O) {
|
|
880
|
+
if (m.length === 0)
|
|
881
|
+
return m;
|
|
882
|
+
var P = m;
|
|
883
|
+
if (typeof m == "symbol" ? P = Symbol.prototype.toString.call(m) : typeof m != "string" && (P = String(m)), v === "iso-8859-1")
|
|
884
|
+
return escape(P).replace(/%u[0-9a-f]{4}/gi, function(j) {
|
|
885
|
+
return "%26%23" + parseInt(j.slice(2), 16) + "%3B";
|
|
886
886
|
});
|
|
887
|
-
for (var
|
|
888
|
-
var
|
|
889
|
-
if (
|
|
890
|
-
|
|
887
|
+
for (var k = "", L = 0; L < P.length; ++L) {
|
|
888
|
+
var R = P.charCodeAt(L);
|
|
889
|
+
if (R === 45 || R === 46 || R === 95 || R === 126 || R >= 48 && R <= 57 || R >= 65 && R <= 90 || R >= 97 && R <= 122 || O === e.RFC1738 && (R === 40 || R === 41)) {
|
|
890
|
+
k += P.charAt(L);
|
|
891
891
|
continue;
|
|
892
892
|
}
|
|
893
|
-
if (
|
|
894
|
-
|
|
893
|
+
if (R < 128) {
|
|
894
|
+
k = k + t[R];
|
|
895
895
|
continue;
|
|
896
896
|
}
|
|
897
|
-
if (
|
|
898
|
-
|
|
897
|
+
if (R < 2048) {
|
|
898
|
+
k = k + (t[192 | R >> 6] + t[128 | R & 63]);
|
|
899
899
|
continue;
|
|
900
900
|
}
|
|
901
|
-
if (
|
|
902
|
-
|
|
901
|
+
if (R < 55296 || R >= 57344) {
|
|
902
|
+
k = k + (t[224 | R >> 12] + t[128 | R >> 6 & 63] + t[128 | R & 63]);
|
|
903
903
|
continue;
|
|
904
904
|
}
|
|
905
|
-
|
|
905
|
+
L += 1, R = 65536 + ((R & 1023) << 10 | P.charCodeAt(L) & 1023), k += t[240 | R >> 18] + t[128 | R >> 12 & 63] + t[128 | R >> 6 & 63] + t[128 | R & 63];
|
|
906
906
|
}
|
|
907
|
-
return
|
|
908
|
-
},
|
|
909
|
-
for (var l = [{ obj: { o:
|
|
910
|
-
for (var O = l[
|
|
911
|
-
var
|
|
912
|
-
typeof
|
|
907
|
+
return k;
|
|
908
|
+
}, S = function(m) {
|
|
909
|
+
for (var l = [{ obj: { o: m }, prop: "o" }], v = [], b = 0; b < l.length; ++b)
|
|
910
|
+
for (var O = l[b], P = O.obj[O.prop], k = Object.keys(P), L = 0; L < k.length; ++L) {
|
|
911
|
+
var R = k[L], j = P[R];
|
|
912
|
+
typeof j == "object" && j !== null && v.indexOf(j) === -1 && (l.push({ obj: P, prop: R }), v.push(j));
|
|
913
913
|
}
|
|
914
|
-
return a(l),
|
|
915
|
-
},
|
|
916
|
-
return Object.prototype.toString.call(
|
|
917
|
-
}, u = function(
|
|
918
|
-
return !
|
|
919
|
-
}, o = function(
|
|
920
|
-
return [].concat(
|
|
921
|
-
},
|
|
922
|
-
if (i(
|
|
923
|
-
for (var v = [],
|
|
924
|
-
v.push(l(
|
|
914
|
+
return a(l), m;
|
|
915
|
+
}, g = function(m) {
|
|
916
|
+
return Object.prototype.toString.call(m) === "[object RegExp]";
|
|
917
|
+
}, u = function(m) {
|
|
918
|
+
return !m || typeof m != "object" ? !1 : !!(m.constructor && m.constructor.isBuffer && m.constructor.isBuffer(m));
|
|
919
|
+
}, o = function(m, l) {
|
|
920
|
+
return [].concat(m, l);
|
|
921
|
+
}, f = function(m, l) {
|
|
922
|
+
if (i(m)) {
|
|
923
|
+
for (var v = [], b = 0; b < m.length; b += 1)
|
|
924
|
+
v.push(l(m[b]));
|
|
925
925
|
return v;
|
|
926
926
|
}
|
|
927
|
-
return l(
|
|
927
|
+
return l(m);
|
|
928
928
|
};
|
|
929
929
|
return sr = {
|
|
930
930
|
arrayToObject: n,
|
|
931
|
-
assign:
|
|
931
|
+
assign: d,
|
|
932
932
|
combine: o,
|
|
933
|
-
compact:
|
|
933
|
+
compact: S,
|
|
934
934
|
decode: c,
|
|
935
935
|
encode: p,
|
|
936
936
|
isBuffer: u,
|
|
937
|
-
isRegExp:
|
|
938
|
-
maybeMap:
|
|
937
|
+
isRegExp: g,
|
|
938
|
+
maybeMap: f,
|
|
939
939
|
merge: s
|
|
940
940
|
}, sr;
|
|
941
941
|
}
|
|
@@ -954,9 +954,9 @@ function ut() {
|
|
|
954
954
|
repeat: function(l) {
|
|
955
955
|
return l;
|
|
956
956
|
}
|
|
957
|
-
}, n = Array.isArray, s = String.prototype.split,
|
|
958
|
-
|
|
959
|
-
}, p = Date.prototype.toISOString,
|
|
957
|
+
}, n = Array.isArray, s = String.prototype.split, d = Array.prototype.push, c = function(m, l) {
|
|
958
|
+
d.apply(m, n(l) ? l : [l]);
|
|
959
|
+
}, p = Date.prototype.toISOString, S = i.default, g = {
|
|
960
960
|
addQueryPrefix: !1,
|
|
961
961
|
allowDots: !1,
|
|
962
962
|
charset: "utf-8",
|
|
@@ -965,8 +965,8 @@ function ut() {
|
|
|
965
965
|
encode: !0,
|
|
966
966
|
encoder: r.encode,
|
|
967
967
|
encodeValuesOnly: !1,
|
|
968
|
-
format:
|
|
969
|
-
formatter: i.formatters[
|
|
968
|
+
format: S,
|
|
969
|
+
formatter: i.formatters[S],
|
|
970
970
|
// deprecated
|
|
971
971
|
indices: !1,
|
|
972
972
|
serializeDate: function(l) {
|
|
@@ -976,8 +976,8 @@ function ut() {
|
|
|
976
976
|
strictNullHandling: !1
|
|
977
977
|
}, u = function(l) {
|
|
978
978
|
return typeof l == "string" || typeof l == "number" || typeof l == "boolean" || typeof l == "symbol" || typeof l == "bigint";
|
|
979
|
-
}, o = {},
|
|
980
|
-
for (var
|
|
979
|
+
}, o = {}, f = function m(l, v, b, O, P, k, L, R, j, U, x, T, I, N, $, z) {
|
|
980
|
+
for (var F = l, Z = z, Q = 0, ne = !1; (Z = Z.get(o)) !== void 0 && !ne; ) {
|
|
981
981
|
var X = Z.get(l);
|
|
982
982
|
if (Q += 1, typeof X < "u") {
|
|
983
983
|
if (X === Q)
|
|
@@ -986,133 +986,133 @@ function ut() {
|
|
|
986
986
|
}
|
|
987
987
|
typeof Z.get(o) > "u" && (Q = 0);
|
|
988
988
|
}
|
|
989
|
-
if (typeof
|
|
990
|
-
return ee instanceof Date ?
|
|
991
|
-
})),
|
|
992
|
-
if (
|
|
993
|
-
return
|
|
994
|
-
|
|
989
|
+
if (typeof R == "function" ? F = R(v, F) : F instanceof Date ? F = x(F) : b === "comma" && n(F) && (F = r.maybeMap(F, function(ee) {
|
|
990
|
+
return ee instanceof Date ? x(ee) : ee;
|
|
991
|
+
})), F === null) {
|
|
992
|
+
if (P)
|
|
993
|
+
return L && !N ? L(v, g.encoder, $, "key", T) : v;
|
|
994
|
+
F = "";
|
|
995
995
|
}
|
|
996
|
-
if (u(
|
|
997
|
-
if (
|
|
998
|
-
var K =
|
|
999
|
-
if (
|
|
1000
|
-
for (var ie = s.call(String(
|
|
1001
|
-
re += (te === 0 ? "" : ",") +
|
|
1002
|
-
return [
|
|
996
|
+
if (u(F) || r.isBuffer(F)) {
|
|
997
|
+
if (L) {
|
|
998
|
+
var K = N ? v : L(v, g.encoder, $, "key", T);
|
|
999
|
+
if (b === "comma" && N) {
|
|
1000
|
+
for (var ie = s.call(String(F), ","), re = "", te = 0; te < ie.length; ++te)
|
|
1001
|
+
re += (te === 0 ? "" : ",") + I(L(ie[te], g.encoder, $, "value", T));
|
|
1002
|
+
return [I(K) + (O && n(F) && ie.length === 1 ? "[]" : "") + "=" + re];
|
|
1003
1003
|
}
|
|
1004
|
-
return [
|
|
1004
|
+
return [I(K) + "=" + I(L(F, g.encoder, $, "value", T))];
|
|
1005
1005
|
}
|
|
1006
|
-
return [
|
|
1006
|
+
return [I(v) + "=" + I(String(F))];
|
|
1007
1007
|
}
|
|
1008
1008
|
var ce = [];
|
|
1009
|
-
if (typeof
|
|
1009
|
+
if (typeof F > "u")
|
|
1010
1010
|
return ce;
|
|
1011
1011
|
var ue;
|
|
1012
|
-
if (
|
|
1013
|
-
ue = [{ value:
|
|
1014
|
-
else if (n(
|
|
1015
|
-
ue =
|
|
1012
|
+
if (b === "comma" && n(F))
|
|
1013
|
+
ue = [{ value: F.length > 0 ? F.join(",") || null : void 0 }];
|
|
1014
|
+
else if (n(R))
|
|
1015
|
+
ue = R;
|
|
1016
1016
|
else {
|
|
1017
|
-
var oe = Object.keys(
|
|
1018
|
-
ue =
|
|
1017
|
+
var oe = Object.keys(F);
|
|
1018
|
+
ue = j ? oe.sort(j) : oe;
|
|
1019
1019
|
}
|
|
1020
|
-
for (var de = O && n(
|
|
1021
|
-
var se = ue[pe], ye = typeof se == "object" && typeof se.value < "u" ? se.value :
|
|
1022
|
-
if (!(
|
|
1023
|
-
var Se = n(
|
|
1020
|
+
for (var de = O && n(F) && F.length === 1 ? v + "[]" : v, pe = 0; pe < ue.length; ++pe) {
|
|
1021
|
+
var se = ue[pe], ye = typeof se == "object" && typeof se.value < "u" ? se.value : F[se];
|
|
1022
|
+
if (!(k && ye === null)) {
|
|
1023
|
+
var Se = n(F) ? typeof b == "function" ? b(de, se) : de : de + (U ? "." + se : "[" + se + "]");
|
|
1024
1024
|
z.set(l, Q);
|
|
1025
1025
|
var J = e();
|
|
1026
|
-
J.set(o, z), c(ce,
|
|
1026
|
+
J.set(o, z), c(ce, m(
|
|
1027
1027
|
ye,
|
|
1028
1028
|
Se,
|
|
1029
|
-
|
|
1029
|
+
b,
|
|
1030
1030
|
O,
|
|
1031
|
+
P,
|
|
1032
|
+
k,
|
|
1033
|
+
L,
|
|
1034
|
+
R,
|
|
1035
|
+
j,
|
|
1036
|
+
U,
|
|
1031
1037
|
x,
|
|
1032
1038
|
T,
|
|
1039
|
+
I,
|
|
1033
1040
|
N,
|
|
1034
|
-
M,
|
|
1035
|
-
V,
|
|
1036
1041
|
$,
|
|
1037
|
-
L,
|
|
1038
|
-
F,
|
|
1039
|
-
k,
|
|
1040
|
-
R,
|
|
1041
|
-
U,
|
|
1042
1042
|
J
|
|
1043
1043
|
));
|
|
1044
1044
|
}
|
|
1045
1045
|
}
|
|
1046
1046
|
return ce;
|
|
1047
|
-
},
|
|
1047
|
+
}, w = function(l) {
|
|
1048
1048
|
if (!l)
|
|
1049
|
-
return
|
|
1049
|
+
return g;
|
|
1050
1050
|
if (l.encoder !== null && typeof l.encoder < "u" && typeof l.encoder != "function")
|
|
1051
1051
|
throw new TypeError("Encoder has to be a function.");
|
|
1052
|
-
var v = l.charset ||
|
|
1052
|
+
var v = l.charset || g.charset;
|
|
1053
1053
|
if (typeof l.charset < "u" && l.charset !== "utf-8" && l.charset !== "iso-8859-1")
|
|
1054
1054
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
1055
|
-
var
|
|
1055
|
+
var b = i.default;
|
|
1056
1056
|
if (typeof l.format < "u") {
|
|
1057
1057
|
if (!t.call(i.formatters, l.format))
|
|
1058
1058
|
throw new TypeError("Unknown format option provided.");
|
|
1059
|
-
|
|
1059
|
+
b = l.format;
|
|
1060
1060
|
}
|
|
1061
|
-
var O = i.formatters[
|
|
1062
|
-
return (typeof l.filter == "function" || n(l.filter)) && (
|
|
1063
|
-
addQueryPrefix: typeof l.addQueryPrefix == "boolean" ? l.addQueryPrefix :
|
|
1064
|
-
allowDots: typeof l.allowDots > "u" ?
|
|
1061
|
+
var O = i.formatters[b], P = g.filter;
|
|
1062
|
+
return (typeof l.filter == "function" || n(l.filter)) && (P = l.filter), {
|
|
1063
|
+
addQueryPrefix: typeof l.addQueryPrefix == "boolean" ? l.addQueryPrefix : g.addQueryPrefix,
|
|
1064
|
+
allowDots: typeof l.allowDots > "u" ? g.allowDots : !!l.allowDots,
|
|
1065
1065
|
charset: v,
|
|
1066
|
-
charsetSentinel: typeof l.charsetSentinel == "boolean" ? l.charsetSentinel :
|
|
1067
|
-
delimiter: typeof l.delimiter > "u" ?
|
|
1068
|
-
encode: typeof l.encode == "boolean" ? l.encode :
|
|
1069
|
-
encoder: typeof l.encoder == "function" ? l.encoder :
|
|
1070
|
-
encodeValuesOnly: typeof l.encodeValuesOnly == "boolean" ? l.encodeValuesOnly :
|
|
1071
|
-
filter:
|
|
1072
|
-
format:
|
|
1066
|
+
charsetSentinel: typeof l.charsetSentinel == "boolean" ? l.charsetSentinel : g.charsetSentinel,
|
|
1067
|
+
delimiter: typeof l.delimiter > "u" ? g.delimiter : l.delimiter,
|
|
1068
|
+
encode: typeof l.encode == "boolean" ? l.encode : g.encode,
|
|
1069
|
+
encoder: typeof l.encoder == "function" ? l.encoder : g.encoder,
|
|
1070
|
+
encodeValuesOnly: typeof l.encodeValuesOnly == "boolean" ? l.encodeValuesOnly : g.encodeValuesOnly,
|
|
1071
|
+
filter: P,
|
|
1072
|
+
format: b,
|
|
1073
1073
|
formatter: O,
|
|
1074
|
-
serializeDate: typeof l.serializeDate == "function" ? l.serializeDate :
|
|
1075
|
-
skipNulls: typeof l.skipNulls == "boolean" ? l.skipNulls :
|
|
1074
|
+
serializeDate: typeof l.serializeDate == "function" ? l.serializeDate : g.serializeDate,
|
|
1075
|
+
skipNulls: typeof l.skipNulls == "boolean" ? l.skipNulls : g.skipNulls,
|
|
1076
1076
|
sort: typeof l.sort == "function" ? l.sort : null,
|
|
1077
|
-
strictNullHandling: typeof l.strictNullHandling == "boolean" ? l.strictNullHandling :
|
|
1077
|
+
strictNullHandling: typeof l.strictNullHandling == "boolean" ? l.strictNullHandling : g.strictNullHandling
|
|
1078
1078
|
};
|
|
1079
1079
|
};
|
|
1080
|
-
return ur = function(
|
|
1081
|
-
var v =
|
|
1082
|
-
typeof
|
|
1083
|
-
var
|
|
1080
|
+
return ur = function(m, l) {
|
|
1081
|
+
var v = m, b = w(l), O, P;
|
|
1082
|
+
typeof b.filter == "function" ? (P = b.filter, v = P("", v)) : n(b.filter) && (P = b.filter, O = P);
|
|
1083
|
+
var k = [];
|
|
1084
1084
|
if (typeof v != "object" || v === null)
|
|
1085
1085
|
return "";
|
|
1086
|
-
var
|
|
1087
|
-
l && l.arrayFormat in a ?
|
|
1088
|
-
var
|
|
1086
|
+
var L;
|
|
1087
|
+
l && l.arrayFormat in a ? L = l.arrayFormat : l && "indices" in l ? L = l.indices ? "indices" : "repeat" : L = "indices";
|
|
1088
|
+
var R = a[L];
|
|
1089
1089
|
if (l && "commaRoundTrip" in l && typeof l.commaRoundTrip != "boolean")
|
|
1090
1090
|
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
1091
|
-
var
|
|
1092
|
-
O || (O = Object.keys(v)),
|
|
1093
|
-
for (var
|
|
1094
|
-
var
|
|
1095
|
-
|
|
1096
|
-
v[
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1091
|
+
var j = R === "comma" && l && l.commaRoundTrip;
|
|
1092
|
+
O || (O = Object.keys(v)), b.sort && O.sort(b.sort);
|
|
1093
|
+
for (var U = e(), x = 0; x < O.length; ++x) {
|
|
1094
|
+
var T = O[x];
|
|
1095
|
+
b.skipNulls && v[T] === null || c(k, f(
|
|
1096
|
+
v[T],
|
|
1097
|
+
T,
|
|
1098
|
+
R,
|
|
1099
|
+
j,
|
|
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,
|
|
1111
|
+
U
|
|
1112
1112
|
));
|
|
1113
1113
|
}
|
|
1114
|
-
var
|
|
1115
|
-
return
|
|
1114
|
+
var I = k.join(b.delimiter), N = b.addQueryPrefix === !0 ? "?" : "";
|
|
1115
|
+
return b.charsetSentinel && (b.charset === "iso-8859-1" ? N += "utf8=%26%2310003%3B&" : N += "utf8=%E2%9C%93&"), I.length > 0 ? N + I : "";
|
|
1116
1116
|
}, ur;
|
|
1117
1117
|
}
|
|
1118
1118
|
var cr, $r;
|
|
@@ -1137,69 +1137,69 @@ function ct() {
|
|
|
1137
1137
|
plainObjects: !1,
|
|
1138
1138
|
strictNullHandling: !1
|
|
1139
1139
|
}, a = function(u) {
|
|
1140
|
-
return u.replace(/&#(\d+);/g, function(o,
|
|
1141
|
-
return String.fromCharCode(parseInt(
|
|
1140
|
+
return u.replace(/&#(\d+);/g, function(o, f) {
|
|
1141
|
+
return String.fromCharCode(parseInt(f, 10));
|
|
1142
1142
|
});
|
|
1143
1143
|
}, n = function(u, o) {
|
|
1144
1144
|
return u && typeof u == "string" && o.comma && u.indexOf(",") > -1 ? u.split(",") : u;
|
|
1145
|
-
}, s = "utf8=%26%2310003%3B",
|
|
1146
|
-
var
|
|
1147
|
-
if (
|
|
1145
|
+
}, s = "utf8=%26%2310003%3B", d = "utf8=%E2%9C%93", c = function(o, f) {
|
|
1146
|
+
var w = {}, m = f.ignoreQueryPrefix ? o.replace(/^\?/, "") : o, l = f.parameterLimit === 1 / 0 ? void 0 : f.parameterLimit, v = m.split(f.delimiter, l), b = -1, O, P = f.charset;
|
|
1147
|
+
if (f.charsetSentinel)
|
|
1148
1148
|
for (O = 0; O < v.length; ++O)
|
|
1149
|
-
v[O].indexOf("utf8=") === 0 && (v[O] ===
|
|
1149
|
+
v[O].indexOf("utf8=") === 0 && (v[O] === d ? P = "utf-8" : v[O] === s && (P = "iso-8859-1"), b = O, O = v.length);
|
|
1150
1150
|
for (O = 0; O < v.length; ++O)
|
|
1151
|
-
if (O !==
|
|
1152
|
-
var
|
|
1153
|
-
|
|
1154
|
-
n(
|
|
1155
|
-
function(
|
|
1156
|
-
return
|
|
1151
|
+
if (O !== b) {
|
|
1152
|
+
var k = v[O], L = k.indexOf("]="), R = L === -1 ? k.indexOf("=") : L + 1, j, U;
|
|
1153
|
+
R === -1 ? (j = f.decoder(k, t.decoder, P, "key"), U = f.strictNullHandling ? null : "") : (j = f.decoder(k.slice(0, R), t.decoder, P, "key"), U = e.maybeMap(
|
|
1154
|
+
n(k.slice(R + 1), f),
|
|
1155
|
+
function(x) {
|
|
1156
|
+
return f.decoder(x, t.decoder, P, "value");
|
|
1157
1157
|
}
|
|
1158
|
-
)),
|
|
1158
|
+
)), U && f.interpretNumericEntities && P === "iso-8859-1" && (U = a(U)), k.indexOf("[]=") > -1 && (U = i(U) ? [U] : U), r.call(w, j) ? w[j] = e.combine(w[j], U) : w[j] = U;
|
|
1159
1159
|
}
|
|
1160
|
-
return
|
|
1161
|
-
}, p = function(u, o,
|
|
1162
|
-
for (var
|
|
1163
|
-
var v,
|
|
1164
|
-
if (
|
|
1165
|
-
v = [].concat(
|
|
1160
|
+
return w;
|
|
1161
|
+
}, p = function(u, o, f, w) {
|
|
1162
|
+
for (var m = w ? o : n(o, f), l = u.length - 1; l >= 0; --l) {
|
|
1163
|
+
var v, b = u[l];
|
|
1164
|
+
if (b === "[]" && f.parseArrays)
|
|
1165
|
+
v = [].concat(m);
|
|
1166
1166
|
else {
|
|
1167
|
-
v =
|
|
1168
|
-
var O =
|
|
1169
|
-
!
|
|
1167
|
+
v = f.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
1168
|
+
var O = b.charAt(0) === "[" && b.charAt(b.length - 1) === "]" ? b.slice(1, -1) : b, P = parseInt(O, 10);
|
|
1169
|
+
!f.parseArrays && O === "" ? v = { 0: m } : !isNaN(P) && b !== O && String(P) === O && P >= 0 && f.parseArrays && P <= f.arrayLimit ? (v = [], v[P] = m) : O !== "__proto__" && (v[O] = m);
|
|
1170
1170
|
}
|
|
1171
|
-
|
|
1171
|
+
m = v;
|
|
1172
1172
|
}
|
|
1173
|
-
return
|
|
1174
|
-
},
|
|
1173
|
+
return m;
|
|
1174
|
+
}, S = function(o, f, w, m) {
|
|
1175
1175
|
if (o) {
|
|
1176
|
-
var l =
|
|
1177
|
-
if (
|
|
1178
|
-
if (!
|
|
1176
|
+
var l = w.allowDots ? o.replace(/\.([^.[]+)/g, "[$1]") : o, v = /(\[[^[\]]*])/, b = /(\[[^[\]]*])/g, O = w.depth > 0 && v.exec(l), P = O ? l.slice(0, O.index) : l, k = [];
|
|
1177
|
+
if (P) {
|
|
1178
|
+
if (!w.plainObjects && r.call(Object.prototype, P) && !w.allowPrototypes)
|
|
1179
1179
|
return;
|
|
1180
|
-
|
|
1180
|
+
k.push(P);
|
|
1181
1181
|
}
|
|
1182
|
-
for (var
|
|
1183
|
-
if (
|
|
1182
|
+
for (var L = 0; w.depth > 0 && (O = b.exec(l)) !== null && L < w.depth; ) {
|
|
1183
|
+
if (L += 1, !w.plainObjects && r.call(Object.prototype, O[1].slice(1, -1)) && !w.allowPrototypes)
|
|
1184
1184
|
return;
|
|
1185
|
-
|
|
1185
|
+
k.push(O[1]);
|
|
1186
1186
|
}
|
|
1187
|
-
return O &&
|
|
1187
|
+
return O && k.push("[" + l.slice(O.index) + "]"), p(k, f, w, m);
|
|
1188
1188
|
}
|
|
1189
|
-
},
|
|
1189
|
+
}, g = function(o) {
|
|
1190
1190
|
if (!o)
|
|
1191
1191
|
return t;
|
|
1192
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
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
|
|
1196
|
+
var f = typeof o.charset > "u" ? t.charset : o.charset;
|
|
1197
1197
|
return {
|
|
1198
1198
|
allowDots: typeof o.allowDots > "u" ? t.allowDots : !!o.allowDots,
|
|
1199
1199
|
allowPrototypes: typeof o.allowPrototypes == "boolean" ? o.allowPrototypes : t.allowPrototypes,
|
|
1200
1200
|
allowSparse: typeof o.allowSparse == "boolean" ? o.allowSparse : t.allowSparse,
|
|
1201
1201
|
arrayLimit: typeof o.arrayLimit == "number" ? o.arrayLimit : t.arrayLimit,
|
|
1202
|
-
charset:
|
|
1202
|
+
charset: f,
|
|
1203
1203
|
charsetSentinel: typeof o.charsetSentinel == "boolean" ? o.charsetSentinel : t.charsetSentinel,
|
|
1204
1204
|
comma: typeof o.comma == "boolean" ? o.comma : t.comma,
|
|
1205
1205
|
decoder: typeof o.decoder == "function" ? o.decoder : t.decoder,
|
|
@@ -1215,14 +1215,14 @@ function ct() {
|
|
|
1215
1215
|
};
|
|
1216
1216
|
};
|
|
1217
1217
|
return cr = function(u, o) {
|
|
1218
|
-
var
|
|
1218
|
+
var f = g(o);
|
|
1219
1219
|
if (u === "" || u === null || typeof u > "u")
|
|
1220
|
-
return
|
|
1221
|
-
for (var
|
|
1222
|
-
var
|
|
1223
|
-
|
|
1220
|
+
return f.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
1221
|
+
for (var w = typeof u == "string" ? c(u, f) : u, m = f.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, l = Object.keys(w), v = 0; v < l.length; ++v) {
|
|
1222
|
+
var b = l[v], O = S(b, w[b], f, typeof u == "string");
|
|
1223
|
+
m = e.merge(m, O, f);
|
|
1224
1224
|
}
|
|
1225
|
-
return
|
|
1225
|
+
return f.allowSparse === !0 ? m : e.compact(m);
|
|
1226
1226
|
}, cr;
|
|
1227
1227
|
}
|
|
1228
1228
|
var lr, Br;
|
|
@@ -1237,7 +1237,7 @@ function lt() {
|
|
|
1237
1237
|
}, lr;
|
|
1238
1238
|
}
|
|
1239
1239
|
var ft = lt();
|
|
1240
|
-
const dt = /* @__PURE__ */ mr(ft), vr = "1.0.
|
|
1240
|
+
const dt = /* @__PURE__ */ mr(ft), vr = "1.0.13", pt = Ae.CancelToken;
|
|
1241
1241
|
var mt = function(e) {
|
|
1242
1242
|
var r;
|
|
1243
1243
|
typeof window < "u" && (r = e.cache.get("api"));
|
|
@@ -1255,9 +1255,9 @@ var mt = function(e) {
|
|
|
1255
1255
|
].filter(Boolean).join("-");
|
|
1256
1256
|
return p;
|
|
1257
1257
|
}
|
|
1258
|
-
const a = {}, s =
|
|
1258
|
+
const a = {}, s = d(function(c) {
|
|
1259
1259
|
var p = t(c);
|
|
1260
|
-
return a[p] || (a[p] = new Promise(function(
|
|
1260
|
+
return a[p] || (a[p] = new Promise(function(S, g) {
|
|
1261
1261
|
var u, o;
|
|
1262
1262
|
switch (String(c.method).toLowerCase()) {
|
|
1263
1263
|
case "post":
|
|
@@ -1267,97 +1267,97 @@ var mt = function(e) {
|
|
|
1267
1267
|
c.cache || (c.cache = !1);
|
|
1268
1268
|
break;
|
|
1269
1269
|
}
|
|
1270
|
-
return c.cache === !1 || (u = c.cache || r, u && (o = u.get(p))), o ?
|
|
1271
|
-
function(
|
|
1272
|
-
delete a[p],
|
|
1270
|
+
return c.cache === !1 || (u = c.cache || r, u && (o = u.get(p))), o ? S(o) : (Object.assign(c, { adapter: i }), Ae.request(c).then(
|
|
1271
|
+
function(f) {
|
|
1272
|
+
delete a[p], S(f);
|
|
1273
1273
|
},
|
|
1274
|
-
function(
|
|
1275
|
-
delete a[p],
|
|
1274
|
+
function(f) {
|
|
1275
|
+
delete a[p], g(f);
|
|
1276
1276
|
}
|
|
1277
1277
|
));
|
|
1278
1278
|
})), a[p];
|
|
1279
1279
|
});
|
|
1280
|
-
s.generateEndpointURL = function(c, p,
|
|
1281
|
-
|
|
1282
|
-
var
|
|
1283
|
-
const u =
|
|
1284
|
-
|
|
1280
|
+
s.generateEndpointURL = function(c, p, S) {
|
|
1281
|
+
S = S || {}, p = p || {};
|
|
1282
|
+
var g;
|
|
1283
|
+
const u = S.file && e.fileAPI || e.apiURL;
|
|
1284
|
+
S.withoutToken || (delete p.access_token, g = e.auth.getCurrentToken()), c[0] == "/" && c.slice(1);
|
|
1285
1285
|
var o = e.utils.mapParameters(p);
|
|
1286
|
-
|
|
1287
|
-
var
|
|
1288
|
-
return
|
|
1286
|
+
g ? o = o ? `?access_token=${g}&${o}` : `?access_token=${g}` : o = o ? `?${o}` : "";
|
|
1287
|
+
var f = `${u}${c}${o}`;
|
|
1288
|
+
return f;
|
|
1289
1289
|
}, s.wasCancelled = function(c) {
|
|
1290
1290
|
return Ae.isCancel(c);
|
|
1291
1291
|
};
|
|
1292
|
-
function
|
|
1292
|
+
function d(c) {
|
|
1293
1293
|
var p = Ae.create({
|
|
1294
1294
|
paramsSerializer: {
|
|
1295
|
-
serialize: (
|
|
1295
|
+
serialize: (g) => dt.stringify(g, { arrayFormat: "repeat" })
|
|
1296
1296
|
},
|
|
1297
1297
|
adapter: c
|
|
1298
1298
|
});
|
|
1299
|
-
p.defaults.baseURL = e.apiURL, p.defaults.headers.common.Accept = "application/json", p.interceptors.request.use(function(
|
|
1300
|
-
if (t(
|
|
1301
|
-
return
|
|
1302
|
-
if (
|
|
1299
|
+
p.defaults.baseURL = e.apiURL, p.defaults.headers.common.Accept = "application/json", p.interceptors.request.use(function(g) {
|
|
1300
|
+
if (t(g), g.withoutToken)
|
|
1301
|
+
return g;
|
|
1302
|
+
if (g.headers["qik-request-date"] = (/* @__PURE__ */ new Date()).getTime(), Intl) {
|
|
1303
1303
|
const o = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
1304
|
-
o && (
|
|
1304
|
+
o && (g.headers["qik-request-timezone"] = o);
|
|
1305
1305
|
}
|
|
1306
|
-
|
|
1306
|
+
g.headers["qik-api-version"] = vr, e?.socket?.windowID && (g.headers["qik-socket-window"] = e.socket.windowID);
|
|
1307
1307
|
var u = e.auth.getCurrentToken();
|
|
1308
|
-
return u && (
|
|
1308
|
+
return u && (g.headers.Authorization = `Bearer ${u}`, g.params && g.params.access_token && delete g.params.access_token), g;
|
|
1309
1309
|
});
|
|
1310
|
-
let
|
|
1310
|
+
let S = 0;
|
|
1311
1311
|
return p.interceptors.response.use(
|
|
1312
|
-
function(
|
|
1313
|
-
var u =
|
|
1312
|
+
function(g) {
|
|
1313
|
+
var u = g.config, o = g.status;
|
|
1314
1314
|
switch (o) {
|
|
1315
1315
|
case 204:
|
|
1316
|
-
if (
|
|
1317
|
-
return
|
|
1316
|
+
if (S < 5)
|
|
1317
|
+
return S++, new Promise(function(f, w) {
|
|
1318
1318
|
setTimeout(function() {
|
|
1319
|
-
return p.request(u).then(
|
|
1319
|
+
return p.request(u).then(f, w);
|
|
1320
1320
|
}, 800);
|
|
1321
1321
|
});
|
|
1322
|
-
console.log("Failed after 5 retries"),
|
|
1322
|
+
console.log("Failed after 5 retries"), S = 0;
|
|
1323
1323
|
break;
|
|
1324
1324
|
}
|
|
1325
|
-
return
|
|
1325
|
+
return g;
|
|
1326
1326
|
},
|
|
1327
|
-
function(
|
|
1328
|
-
if (Ae.isCancel(
|
|
1329
|
-
return Promise.reject(
|
|
1330
|
-
var u =
|
|
1327
|
+
function(g) {
|
|
1328
|
+
if (Ae.isCancel(g))
|
|
1329
|
+
return Promise.reject(g);
|
|
1330
|
+
var u = g?.response?.status || g.status;
|
|
1331
1331
|
switch (u) {
|
|
1332
1332
|
case 401:
|
|
1333
1333
|
break;
|
|
1334
1334
|
case 429: {
|
|
1335
|
-
var o =
|
|
1335
|
+
var o = g.config || {};
|
|
1336
1336
|
if (o.__retry429 = (o.__retry429 || 0) + 1, o.__retry429 <= 3) {
|
|
1337
|
-
var
|
|
1338
|
-
|
|
1337
|
+
var f = parseInt(
|
|
1338
|
+
g?.response?.headers?.["retry-after"],
|
|
1339
1339
|
10
|
|
1340
|
-
),
|
|
1340
|
+
), w = Number.isFinite(f) ? f * 1e3 : 800 * o.__retry429, m = Math.floor(Math.random() * 500);
|
|
1341
1341
|
return new Promise(function(l, v) {
|
|
1342
1342
|
setTimeout(function() {
|
|
1343
1343
|
return p.request(o).then(l, v);
|
|
1344
|
-
},
|
|
1344
|
+
}, w + m);
|
|
1345
1345
|
});
|
|
1346
1346
|
}
|
|
1347
1347
|
break;
|
|
1348
1348
|
}
|
|
1349
1349
|
case 502:
|
|
1350
1350
|
case 504:
|
|
1351
|
-
if (
|
|
1352
|
-
return
|
|
1351
|
+
if (S < 5)
|
|
1352
|
+
return S++, new Promise(function(l, v) {
|
|
1353
1353
|
setTimeout(function() {
|
|
1354
|
-
return p.request(
|
|
1354
|
+
return p.request(g.config).then(l, v);
|
|
1355
1355
|
}, 800);
|
|
1356
1356
|
});
|
|
1357
|
-
console.log("Failed after 5 retries"),
|
|
1357
|
+
console.log("Failed after 5 retries"), S = 0;
|
|
1358
1358
|
break;
|
|
1359
1359
|
}
|
|
1360
|
-
return Promise.reject(
|
|
1360
|
+
return Promise.reject(g);
|
|
1361
1361
|
}
|
|
1362
1362
|
), p;
|
|
1363
1363
|
}
|
|
@@ -1366,11 +1366,11 @@ var mt = function(e) {
|
|
|
1366
1366
|
function yt() {
|
|
1367
1367
|
if (Gr) return fr;
|
|
1368
1368
|
Gr = 1;
|
|
1369
|
-
var e = "Expected a function", r = "__lodash_hash_undefined__", i = "[object Function]", t = "[object GeneratorFunction]", a = "[object Symbol]", n = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, s = /^\w*$/,
|
|
1370
|
-
function
|
|
1369
|
+
var e = "Expected a function", r = "__lodash_hash_undefined__", i = "[object Function]", t = "[object GeneratorFunction]", a = "[object Symbol]", n = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, s = /^\w*$/, d = /^\./, c = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, p = /[\\^$.*+?()[\]{}|]/g, S = /\\(\\)?/g, g = /^\[object .+?Constructor\]$/, u = typeof be == "object" && be && be.Object === Object && be, o = typeof self == "object" && self && self.Object === Object && self, f = u || o || Function("return this")();
|
|
1370
|
+
function w(y, E) {
|
|
1371
1371
|
return y?.[E];
|
|
1372
1372
|
}
|
|
1373
|
-
function
|
|
1373
|
+
function m(y) {
|
|
1374
1374
|
var E = !1;
|
|
1375
1375
|
if (y != null && typeof y.toString != "function")
|
|
1376
1376
|
try {
|
|
@@ -1379,45 +1379,45 @@ function yt() {
|
|
|
1379
1379
|
}
|
|
1380
1380
|
return E;
|
|
1381
1381
|
}
|
|
1382
|
-
var l = Array.prototype, v = Function.prototype,
|
|
1382
|
+
var l = Array.prototype, v = Function.prototype, b = Object.prototype, O = f["__core-js_shared__"], P = (function() {
|
|
1383
1383
|
var y = /[^.]+$/.exec(O && O.keys && O.keys.IE_PROTO || "");
|
|
1384
1384
|
return y ? "Symbol(src)_1." + y : "";
|
|
1385
|
-
})(),
|
|
1386
|
-
"^" +
|
|
1387
|
-
),
|
|
1385
|
+
})(), k = v.toString, L = b.hasOwnProperty, R = b.toString, j = RegExp(
|
|
1386
|
+
"^" + k.call(L).replace(p, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1387
|
+
), U = f.Symbol, x = l.splice, T = Pe(f, "Map"), I = Pe(Object, "create"), N = U ? U.prototype : void 0, $ = N ? N.toString : void 0;
|
|
1388
1388
|
function z(y) {
|
|
1389
|
-
var E = -1,
|
|
1390
|
-
for (this.clear(); ++E <
|
|
1389
|
+
var E = -1, C = y ? y.length : 0;
|
|
1390
|
+
for (this.clear(); ++E < C; ) {
|
|
1391
1391
|
var G = y[E];
|
|
1392
1392
|
this.set(G[0], G[1]);
|
|
1393
1393
|
}
|
|
1394
1394
|
}
|
|
1395
|
-
function
|
|
1396
|
-
this.__data__ =
|
|
1395
|
+
function F() {
|
|
1396
|
+
this.__data__ = I ? I(null) : {};
|
|
1397
1397
|
}
|
|
1398
1398
|
function Z(y) {
|
|
1399
1399
|
return this.has(y) && delete this.__data__[y];
|
|
1400
1400
|
}
|
|
1401
1401
|
function Q(y) {
|
|
1402
1402
|
var E = this.__data__;
|
|
1403
|
-
if (
|
|
1404
|
-
var
|
|
1405
|
-
return
|
|
1403
|
+
if (I) {
|
|
1404
|
+
var C = E[y];
|
|
1405
|
+
return C === r ? void 0 : C;
|
|
1406
1406
|
}
|
|
1407
|
-
return
|
|
1407
|
+
return L.call(E, y) ? E[y] : void 0;
|
|
1408
1408
|
}
|
|
1409
1409
|
function ne(y) {
|
|
1410
1410
|
var E = this.__data__;
|
|
1411
|
-
return
|
|
1411
|
+
return I ? E[y] !== void 0 : L.call(E, y);
|
|
1412
1412
|
}
|
|
1413
1413
|
function X(y, E) {
|
|
1414
|
-
var
|
|
1415
|
-
return
|
|
1414
|
+
var C = this.__data__;
|
|
1415
|
+
return C[y] = I && E === void 0 ? r : E, this;
|
|
1416
1416
|
}
|
|
1417
|
-
z.prototype.clear =
|
|
1417
|
+
z.prototype.clear = F, z.prototype.delete = Z, z.prototype.get = Q, z.prototype.has = ne, z.prototype.set = X;
|
|
1418
1418
|
function K(y) {
|
|
1419
|
-
var E = -1,
|
|
1420
|
-
for (this.clear(); ++E <
|
|
1419
|
+
var E = -1, C = y ? y.length : 0;
|
|
1420
|
+
for (this.clear(); ++E < C; ) {
|
|
1421
1421
|
var G = y[E];
|
|
1422
1422
|
this.set(G[0], G[1]);
|
|
1423
1423
|
}
|
|
@@ -1426,27 +1426,27 @@ function yt() {
|
|
|
1426
1426
|
this.__data__ = [];
|
|
1427
1427
|
}
|
|
1428
1428
|
function re(y) {
|
|
1429
|
-
var E = this.__data__,
|
|
1430
|
-
if (
|
|
1429
|
+
var E = this.__data__, C = J(E, y);
|
|
1430
|
+
if (C < 0)
|
|
1431
1431
|
return !1;
|
|
1432
1432
|
var G = E.length - 1;
|
|
1433
|
-
return
|
|
1433
|
+
return C == G ? E.pop() : x.call(E, C, 1), !0;
|
|
1434
1434
|
}
|
|
1435
1435
|
function te(y) {
|
|
1436
|
-
var E = this.__data__,
|
|
1437
|
-
return
|
|
1436
|
+
var E = this.__data__, C = J(E, y);
|
|
1437
|
+
return C < 0 ? void 0 : E[C][1];
|
|
1438
1438
|
}
|
|
1439
1439
|
function ce(y) {
|
|
1440
1440
|
return J(this.__data__, y) > -1;
|
|
1441
1441
|
}
|
|
1442
1442
|
function ue(y, E) {
|
|
1443
|
-
var
|
|
1444
|
-
return G < 0 ?
|
|
1443
|
+
var C = this.__data__, G = J(C, y);
|
|
1444
|
+
return G < 0 ? C.push([y, E]) : C[G][1] = E, this;
|
|
1445
1445
|
}
|
|
1446
1446
|
K.prototype.clear = ie, K.prototype.delete = re, K.prototype.get = te, K.prototype.has = ce, K.prototype.set = ue;
|
|
1447
1447
|
function oe(y) {
|
|
1448
|
-
var E = -1,
|
|
1449
|
-
for (this.clear(); ++E <
|
|
1448
|
+
var E = -1, C = y ? y.length : 0;
|
|
1449
|
+
for (this.clear(); ++E < C; ) {
|
|
1450
1450
|
var G = y[E];
|
|
1451
1451
|
this.set(G[0], G[1]);
|
|
1452
1452
|
}
|
|
@@ -1454,7 +1454,7 @@ function yt() {
|
|
|
1454
1454
|
function de() {
|
|
1455
1455
|
this.__data__ = {
|
|
1456
1456
|
hash: new z(),
|
|
1457
|
-
map: new (
|
|
1457
|
+
map: new (T || K)(),
|
|
1458
1458
|
string: new z()
|
|
1459
1459
|
};
|
|
1460
1460
|
}
|
|
@@ -1472,64 +1472,64 @@ function yt() {
|
|
|
1472
1472
|
}
|
|
1473
1473
|
oe.prototype.clear = de, oe.prototype.delete = pe, oe.prototype.get = se, oe.prototype.has = ye, oe.prototype.set = Se;
|
|
1474
1474
|
function J(y, E) {
|
|
1475
|
-
for (var
|
|
1476
|
-
if (we(y[
|
|
1477
|
-
return
|
|
1475
|
+
for (var C = y.length; C--; )
|
|
1476
|
+
if (we(y[C][0], E))
|
|
1477
|
+
return C;
|
|
1478
1478
|
return -1;
|
|
1479
1479
|
}
|
|
1480
1480
|
function ee(y, E) {
|
|
1481
|
-
E = ke(E, y) ? [E] :
|
|
1482
|
-
for (var
|
|
1483
|
-
y = y[Ne(E[
|
|
1484
|
-
return
|
|
1481
|
+
E = ke(E, y) ? [E] : Re(E);
|
|
1482
|
+
for (var C = 0, G = E.length; y != null && C < G; )
|
|
1483
|
+
y = y[Ne(E[C++])];
|
|
1484
|
+
return C && C == G ? y : void 0;
|
|
1485
1485
|
}
|
|
1486
|
-
function
|
|
1486
|
+
function Te(y) {
|
|
1487
1487
|
if (!he(y) || _e(y))
|
|
1488
1488
|
return !1;
|
|
1489
|
-
var E = Le(y) ||
|
|
1489
|
+
var E = Le(y) || m(y) ? j : g;
|
|
1490
1490
|
return E.test(le(y));
|
|
1491
1491
|
}
|
|
1492
1492
|
function xe(y) {
|
|
1493
1493
|
if (typeof y == "string")
|
|
1494
1494
|
return y;
|
|
1495
|
-
if (
|
|
1496
|
-
return
|
|
1495
|
+
if (h(y))
|
|
1496
|
+
return $ ? $.call(y) : "";
|
|
1497
1497
|
var E = y + "";
|
|
1498
1498
|
return E == "0" && 1 / y == -1 / 0 ? "-0" : E;
|
|
1499
1499
|
}
|
|
1500
|
-
function
|
|
1500
|
+
function Re(y) {
|
|
1501
1501
|
return Ce(y) ? y : Oe(y);
|
|
1502
1502
|
}
|
|
1503
1503
|
function me(y, E) {
|
|
1504
|
-
var
|
|
1505
|
-
return
|
|
1504
|
+
var C = y.__data__;
|
|
1505
|
+
return Ie(E) ? C[typeof E == "string" ? "string" : "hash"] : C.map;
|
|
1506
1506
|
}
|
|
1507
1507
|
function Pe(y, E) {
|
|
1508
|
-
var
|
|
1509
|
-
return
|
|
1508
|
+
var C = w(y, E);
|
|
1509
|
+
return Te(C) ? C : void 0;
|
|
1510
1510
|
}
|
|
1511
1511
|
function ke(y, E) {
|
|
1512
1512
|
if (Ce(y))
|
|
1513
1513
|
return !1;
|
|
1514
|
-
var
|
|
1515
|
-
return
|
|
1514
|
+
var C = typeof y;
|
|
1515
|
+
return C == "number" || C == "symbol" || C == "boolean" || y == null || h(y) ? !0 : s.test(y) || !n.test(y) || E != null && y in Object(E);
|
|
1516
1516
|
}
|
|
1517
|
-
function
|
|
1517
|
+
function Ie(y) {
|
|
1518
1518
|
var E = typeof y;
|
|
1519
1519
|
return E == "string" || E == "number" || E == "symbol" || E == "boolean" ? y !== "__proto__" : y === null;
|
|
1520
1520
|
}
|
|
1521
1521
|
function _e(y) {
|
|
1522
|
-
return !!
|
|
1522
|
+
return !!P && P in y;
|
|
1523
1523
|
}
|
|
1524
1524
|
var Oe = fe(function(y) {
|
|
1525
|
-
y =
|
|
1525
|
+
y = A(y);
|
|
1526
1526
|
var E = [];
|
|
1527
|
-
return
|
|
1528
|
-
E.push(ae ? W.replace(
|
|
1527
|
+
return d.test(y) && E.push(""), y.replace(c, function(C, G, ae, W) {
|
|
1528
|
+
E.push(ae ? W.replace(S, "$1") : G || C);
|
|
1529
1529
|
}), E;
|
|
1530
1530
|
});
|
|
1531
1531
|
function Ne(y) {
|
|
1532
|
-
if (typeof y == "string" ||
|
|
1532
|
+
if (typeof y == "string" || h(y))
|
|
1533
1533
|
return y;
|
|
1534
1534
|
var E = y + "";
|
|
1535
1535
|
return E == "0" && 1 / y == -1 / 0 ? "-0" : E;
|
|
@@ -1537,7 +1537,7 @@ function yt() {
|
|
|
1537
1537
|
function le(y) {
|
|
1538
1538
|
if (y != null) {
|
|
1539
1539
|
try {
|
|
1540
|
-
return
|
|
1540
|
+
return k.call(y);
|
|
1541
1541
|
} catch {
|
|
1542
1542
|
}
|
|
1543
1543
|
try {
|
|
@@ -1550,14 +1550,14 @@ function yt() {
|
|
|
1550
1550
|
function fe(y, E) {
|
|
1551
1551
|
if (typeof y != "function" || E && typeof E != "function")
|
|
1552
1552
|
throw new TypeError(e);
|
|
1553
|
-
var
|
|
1554
|
-
var G = arguments, ae = E ? E.apply(this, G) : G[0], W =
|
|
1553
|
+
var C = function() {
|
|
1554
|
+
var G = arguments, ae = E ? E.apply(this, G) : G[0], W = C.cache;
|
|
1555
1555
|
if (W.has(ae))
|
|
1556
1556
|
return W.get(ae);
|
|
1557
|
-
var
|
|
1558
|
-
return
|
|
1557
|
+
var M = y.apply(this, G);
|
|
1558
|
+
return C.cache = W.set(ae, M), M;
|
|
1559
1559
|
};
|
|
1560
|
-
return
|
|
1560
|
+
return C.cache = new (fe.Cache || oe)(), C;
|
|
1561
1561
|
}
|
|
1562
1562
|
fe.Cache = oe;
|
|
1563
1563
|
function we(y, E) {
|
|
@@ -1565,7 +1565,7 @@ function yt() {
|
|
|
1565
1565
|
}
|
|
1566
1566
|
var Ce = Array.isArray;
|
|
1567
1567
|
function Le(y) {
|
|
1568
|
-
var E = he(y) ?
|
|
1568
|
+
var E = he(y) ? R.call(y) : "";
|
|
1569
1569
|
return E == i || E == t;
|
|
1570
1570
|
}
|
|
1571
1571
|
function he(y) {
|
|
@@ -1575,15 +1575,15 @@ function yt() {
|
|
|
1575
1575
|
function ge(y) {
|
|
1576
1576
|
return !!y && typeof y == "object";
|
|
1577
1577
|
}
|
|
1578
|
-
function
|
|
1579
|
-
return typeof y == "symbol" || ge(y) &&
|
|
1578
|
+
function h(y) {
|
|
1579
|
+
return typeof y == "symbol" || ge(y) && R.call(y) == a;
|
|
1580
1580
|
}
|
|
1581
|
-
function
|
|
1581
|
+
function A(y) {
|
|
1582
1582
|
return y == null ? "" : xe(y);
|
|
1583
1583
|
}
|
|
1584
|
-
function D(y, E,
|
|
1584
|
+
function D(y, E, C) {
|
|
1585
1585
|
var G = y == null ? void 0 : ee(y, E);
|
|
1586
|
-
return G === void 0 ?
|
|
1586
|
+
return G === void 0 ? C : G;
|
|
1587
1587
|
}
|
|
1588
1588
|
return fr = D, fr;
|
|
1589
1589
|
}
|
|
@@ -1593,14 +1593,14 @@ var dr, Dr;
|
|
|
1593
1593
|
function gt() {
|
|
1594
1594
|
if (Dr) return dr;
|
|
1595
1595
|
Dr = 1;
|
|
1596
|
-
var e = "[object Symbol]", r = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, i = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, t = "\\ud800-\\udfff", a = "\\u0300-\\u036f\\ufe20-\\ufe23", n = "\\u20d0-\\u20f0", s = "\\u2700-\\u27bf",
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1596
|
+
var e = "[object Symbol]", r = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, i = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, t = "\\ud800-\\udfff", a = "\\u0300-\\u036f\\ufe20-\\ufe23", n = "\\u20d0-\\u20f0", s = "\\u2700-\\u27bf", d = "a-z\\xdf-\\xf6\\xf8-\\xff", c = "\\xac\\xb1\\xd7\\xf7", p = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", S = "\\u2000-\\u206f", g = " \\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", o = "\\ufe0e\\ufe0f", f = c + p + S + g, w = "['’]", m = "[" + t + "]", l = "[" + f + "]", v = "[" + a + n + "]", b = "\\d+", O = "[" + s + "]", P = "[" + d + "]", k = "[^" + t + f + b + s + d + u + "]", L = "\\ud83c[\\udffb-\\udfff]", R = "(?:" + v + "|" + L + ")", j = "[^" + t + "]", U = "(?:\\ud83c[\\udde6-\\uddff]){2}", x = "[\\ud800-\\udbff][\\udc00-\\udfff]", T = "[" + u + "]", I = "\\u200d", N = "(?:" + P + "|" + k + ")", $ = "(?:" + T + "|" + k + ")", z = "(?:" + w + "(?:d|ll|m|re|s|t|ve))?", F = "(?:" + w + "(?:D|LL|M|RE|S|T|VE))?", Z = R + "?", Q = "[" + o + "]?", ne = "(?:" + I + "(?:" + [j, U, x].join("|") + ")" + Q + Z + ")*", X = Q + Z + ne, K = "(?:" + [O, U, x].join("|") + ")" + X, ie = "(?:" + [j + v + "?", v, U, x, m].join("|") + ")", re = RegExp(w, "g"), te = RegExp(v, "g"), ce = RegExp(L + "(?=" + L + ")|" + ie + X, "g"), ue = RegExp([
|
|
1597
|
+
T + "?" + P + "+" + z + "(?=" + [l, T, "$"].join("|") + ")",
|
|
1598
|
+
$ + "+" + F + "(?=" + [l, T + N, "$"].join("|") + ")",
|
|
1599
|
+
T + "?" + N + "+" + z,
|
|
1600
|
+
T + "+" + F,
|
|
1601
|
+
b,
|
|
1602
1602
|
K
|
|
1603
|
-
].join("|"), "g"), oe = RegExp("[" +
|
|
1603
|
+
].join("|"), "g"), oe = RegExp("[" + I + t + a + n + 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 = {
|
|
1604
1604
|
// Latin-1 Supplement block.
|
|
1605
1605
|
À: "A",
|
|
1606
1606
|
Á: "A",
|
|
@@ -1794,91 +1794,91 @@ function gt() {
|
|
|
1794
1794
|
ʼn: "'n",
|
|
1795
1795
|
ſ: "ss"
|
|
1796
1796
|
}, se = typeof be == "object" && be && be.Object === Object && be, ye = typeof self == "object" && self && self.Object === Object && self, Se = se || ye || Function("return this")();
|
|
1797
|
-
function J(
|
|
1798
|
-
for (var Y = -1, Ee =
|
|
1799
|
-
|
|
1800
|
-
return
|
|
1797
|
+
function J(M, B, V, H) {
|
|
1798
|
+
for (var Y = -1, Ee = M ? M.length : 0; ++Y < Ee; )
|
|
1799
|
+
V = B(V, M[Y], Y, M);
|
|
1800
|
+
return V;
|
|
1801
1801
|
}
|
|
1802
|
-
function ee(
|
|
1803
|
-
return
|
|
1802
|
+
function ee(M) {
|
|
1803
|
+
return M.split("");
|
|
1804
1804
|
}
|
|
1805
|
-
function
|
|
1806
|
-
return
|
|
1805
|
+
function Te(M) {
|
|
1806
|
+
return M.match(r) || [];
|
|
1807
1807
|
}
|
|
1808
|
-
function xe(
|
|
1808
|
+
function xe(M) {
|
|
1809
1809
|
return function(B) {
|
|
1810
|
-
return
|
|
1810
|
+
return M?.[B];
|
|
1811
1811
|
};
|
|
1812
1812
|
}
|
|
1813
|
-
var
|
|
1814
|
-
function me(
|
|
1815
|
-
return oe.test(
|
|
1813
|
+
var Re = xe(pe);
|
|
1814
|
+
function me(M) {
|
|
1815
|
+
return oe.test(M);
|
|
1816
1816
|
}
|
|
1817
|
-
function Pe(
|
|
1818
|
-
return de.test(
|
|
1817
|
+
function Pe(M) {
|
|
1818
|
+
return de.test(M);
|
|
1819
1819
|
}
|
|
1820
|
-
function ke(
|
|
1821
|
-
return me(
|
|
1820
|
+
function ke(M) {
|
|
1821
|
+
return me(M) ? Ie(M) : ee(M);
|
|
1822
1822
|
}
|
|
1823
|
-
function
|
|
1824
|
-
return
|
|
1823
|
+
function Ie(M) {
|
|
1824
|
+
return M.match(ce) || [];
|
|
1825
1825
|
}
|
|
1826
|
-
function _e(
|
|
1827
|
-
return
|
|
1826
|
+
function _e(M) {
|
|
1827
|
+
return M.match(ue) || [];
|
|
1828
1828
|
}
|
|
1829
1829
|
var Oe = Object.prototype, Ne = Oe.toString, le = Se.Symbol, fe = le ? le.prototype : void 0, we = fe ? fe.toString : void 0;
|
|
1830
|
-
function Ce(
|
|
1831
|
-
var H = -1, Y =
|
|
1832
|
-
B < 0 && (B = -B > Y ? 0 : Y + B),
|
|
1830
|
+
function Ce(M, B, V) {
|
|
1831
|
+
var H = -1, Y = M.length;
|
|
1832
|
+
B < 0 && (B = -B > Y ? 0 : Y + B), V = V > Y ? Y : V, V < 0 && (V += Y), Y = B > V ? 0 : V - B >>> 0, B >>>= 0;
|
|
1833
1833
|
for (var Ee = Array(Y); ++H < Y; )
|
|
1834
|
-
Ee[H] =
|
|
1834
|
+
Ee[H] = M[H + B];
|
|
1835
1835
|
return Ee;
|
|
1836
1836
|
}
|
|
1837
|
-
function Le(
|
|
1838
|
-
if (typeof
|
|
1839
|
-
return
|
|
1840
|
-
if (D(
|
|
1841
|
-
return we ? we.call(
|
|
1842
|
-
var B =
|
|
1843
|
-
return B == "0" && 1 /
|
|
1837
|
+
function Le(M) {
|
|
1838
|
+
if (typeof M == "string")
|
|
1839
|
+
return M;
|
|
1840
|
+
if (D(M))
|
|
1841
|
+
return we ? we.call(M) : "";
|
|
1842
|
+
var B = M + "";
|
|
1843
|
+
return B == "0" && 1 / M == -1 / 0 ? "-0" : B;
|
|
1844
1844
|
}
|
|
1845
|
-
function he(
|
|
1846
|
-
var H =
|
|
1847
|
-
return
|
|
1845
|
+
function he(M, B, V) {
|
|
1846
|
+
var H = M.length;
|
|
1847
|
+
return V = V === void 0 ? H : V, !B && V >= H ? M : Ce(M, B, V);
|
|
1848
1848
|
}
|
|
1849
|
-
function ge(
|
|
1849
|
+
function ge(M) {
|
|
1850
1850
|
return function(B) {
|
|
1851
1851
|
B = y(B);
|
|
1852
|
-
var
|
|
1853
|
-
return H[
|
|
1852
|
+
var V = me(B) ? ke(B) : void 0, H = V ? V[0] : B.charAt(0), Y = V ? he(V, 1).join("") : B.slice(1);
|
|
1853
|
+
return H[M]() + Y;
|
|
1854
1854
|
};
|
|
1855
1855
|
}
|
|
1856
|
-
function
|
|
1856
|
+
function h(M) {
|
|
1857
1857
|
return function(B) {
|
|
1858
|
-
return J(W(G(B).replace(re, "")),
|
|
1858
|
+
return J(W(G(B).replace(re, "")), M, "");
|
|
1859
1859
|
};
|
|
1860
1860
|
}
|
|
1861
|
-
function
|
|
1862
|
-
return !!
|
|
1861
|
+
function A(M) {
|
|
1862
|
+
return !!M && typeof M == "object";
|
|
1863
1863
|
}
|
|
1864
|
-
function D(
|
|
1865
|
-
return typeof
|
|
1864
|
+
function D(M) {
|
|
1865
|
+
return typeof M == "symbol" || A(M) && Ne.call(M) == e;
|
|
1866
1866
|
}
|
|
1867
|
-
function y(
|
|
1868
|
-
return
|
|
1867
|
+
function y(M) {
|
|
1868
|
+
return M == null ? "" : Le(M);
|
|
1869
1869
|
}
|
|
1870
|
-
var E =
|
|
1871
|
-
return B = B.toLowerCase(),
|
|
1870
|
+
var E = h(function(M, B, V) {
|
|
1871
|
+
return B = B.toLowerCase(), M + (V ? C(B) : B);
|
|
1872
1872
|
});
|
|
1873
|
-
function
|
|
1874
|
-
return ae(y(
|
|
1873
|
+
function C(M) {
|
|
1874
|
+
return ae(y(M).toLowerCase());
|
|
1875
1875
|
}
|
|
1876
|
-
function G(
|
|
1877
|
-
return
|
|
1876
|
+
function G(M) {
|
|
1877
|
+
return M = y(M), M && M.replace(i, Re).replace(te, "");
|
|
1878
1878
|
}
|
|
1879
1879
|
var ae = ge("toUpperCase");
|
|
1880
|
-
function W(
|
|
1881
|
-
return
|
|
1880
|
+
function W(M, B, V) {
|
|
1881
|
+
return M = y(M), B = B, B === void 0 ? Pe(M) ? _e(M) : Te(M) : M.match(B) || [];
|
|
1882
1882
|
}
|
|
1883
1883
|
return dr = E, dr;
|
|
1884
1884
|
}
|
|
@@ -1898,8 +1898,8 @@ function bt() {
|
|
|
1898
1898
|
return ve.isBrowser = r, ve.isWebWorker = t, ve.isNode = i, ve.isJsDom = a, ve.isDeno = n, ve;
|
|
1899
1899
|
}
|
|
1900
1900
|
bt();
|
|
1901
|
-
const
|
|
1902
|
-
|
|
1901
|
+
const _ = {}, Ge = {};
|
|
1902
|
+
_.loadExternalScript = function(e) {
|
|
1903
1903
|
if (Ge[e])
|
|
1904
1904
|
return Ge[e];
|
|
1905
1905
|
const r = Ge[e] = new Promise(i);
|
|
@@ -1914,7 +1914,7 @@ I.loadExternalScript = function(e) {
|
|
|
1914
1914
|
return r;
|
|
1915
1915
|
};
|
|
1916
1916
|
const Vr = {};
|
|
1917
|
-
|
|
1917
|
+
_.loadExternalStyle = function(e) {
|
|
1918
1918
|
const r = new Promise(i);
|
|
1919
1919
|
function i(t, a) {
|
|
1920
1920
|
if (!document)
|
|
@@ -1929,7 +1929,7 @@ I.loadExternalStyle = function(e) {
|
|
|
1929
1929
|
}
|
|
1930
1930
|
return r;
|
|
1931
1931
|
};
|
|
1932
|
-
|
|
1932
|
+
_.exists = function(e) {
|
|
1933
1933
|
var r;
|
|
1934
1934
|
if (Array.isArray(e) || e === 0)
|
|
1935
1935
|
return !0;
|
|
@@ -1951,7 +1951,7 @@ I.exists = function(e) {
|
|
|
1951
1951
|
}
|
|
1952
1952
|
return !r;
|
|
1953
1953
|
};
|
|
1954
|
-
|
|
1954
|
+
_.parseDate = function(e) {
|
|
1955
1955
|
if (e) {
|
|
1956
1956
|
if (e instanceof Date)
|
|
1957
1957
|
return e;
|
|
@@ -1960,12 +1960,12 @@ I.parseDate = function(e) {
|
|
|
1960
1960
|
return r;
|
|
1961
1961
|
}
|
|
1962
1962
|
};
|
|
1963
|
-
|
|
1963
|
+
_.parseURL = function(e) {
|
|
1964
1964
|
if (!e)
|
|
1965
1965
|
return !1;
|
|
1966
1966
|
if (e.startsWith("/") || e.startsWith("://") || e.startsWith("mailto:") || e.startsWith("tel:") || e.startsWith("sms:"))
|
|
1967
1967
|
return e;
|
|
1968
|
-
var i =
|
|
1968
|
+
var i = _.parseEmail(e);
|
|
1969
1969
|
if (i && i === e)
|
|
1970
1970
|
return `mailto:${i}`;
|
|
1971
1971
|
const t = (p) => /^https?:\/\//i.test(p) ? p : `http://${p}`;
|
|
@@ -1978,10 +1978,10 @@ I.parseURL = function(e) {
|
|
|
1978
1978
|
}
|
|
1979
1979
|
if (!a)
|
|
1980
1980
|
return !1;
|
|
1981
|
-
var s = a.split("."),
|
|
1981
|
+
var s = a.split("."), d = s.length === 4 && s.every(function(p) {
|
|
1982
1982
|
return /^\d{1,3}$/.test(p);
|
|
1983
1983
|
});
|
|
1984
|
-
if (!
|
|
1984
|
+
if (!d) {
|
|
1985
1985
|
if (s.length < 2)
|
|
1986
1986
|
return !1;
|
|
1987
1987
|
var c = s.every(function(p) {
|
|
@@ -1992,16 +1992,16 @@ I.parseURL = function(e) {
|
|
|
1992
1992
|
}
|
|
1993
1993
|
return t(e);
|
|
1994
1994
|
};
|
|
1995
|
-
|
|
1995
|
+
_.parseNumber = function(e, r) {
|
|
1996
1996
|
if (!e || (e = Number(e), isNaN(e)))
|
|
1997
1997
|
return 0;
|
|
1998
1998
|
if (r) {
|
|
1999
1999
|
var i = e.toFixed(r);
|
|
2000
|
-
e =
|
|
2000
|
+
e = _.parseNumber(i);
|
|
2001
2001
|
}
|
|
2002
2002
|
return e;
|
|
2003
2003
|
};
|
|
2004
|
-
|
|
2004
|
+
_.isValidEmailAddress = function(e) {
|
|
2005
2005
|
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])+$/;
|
|
2006
2006
|
if (!e) return !1;
|
|
2007
2007
|
var i = e.split("@");
|
|
@@ -2014,48 +2014,48 @@ I.isValidEmailAddress = function(e) {
|
|
|
2014
2014
|
return s.length > 63;
|
|
2015
2015
|
}) || !r.test(e));
|
|
2016
2016
|
};
|
|
2017
|
-
|
|
2017
|
+
_.parseEmail = function(e) {
|
|
2018
2018
|
if (!e)
|
|
2019
2019
|
return !1;
|
|
2020
|
-
var r = String(e).toLowerCase(), i =
|
|
2020
|
+
var r = String(e).toLowerCase(), i = _.isValidEmailAddress(r);
|
|
2021
2021
|
return i ? r : !1;
|
|
2022
2022
|
};
|
|
2023
|
-
|
|
2023
|
+
_.parseInt = function(e) {
|
|
2024
2024
|
return !e || (e = parseInt(e), isNaN(e)) ? 0 : e;
|
|
2025
2025
|
};
|
|
2026
|
-
|
|
2026
|
+
_.cleanValue = function(e, r, i) {
|
|
2027
2027
|
i || (i = {});
|
|
2028
|
-
var t =
|
|
2028
|
+
var t = _.exists(e);
|
|
2029
2029
|
if (i.strict && t && r != "boolean")
|
|
2030
2030
|
return e;
|
|
2031
2031
|
switch (r) {
|
|
2032
2032
|
case "reference":
|
|
2033
|
-
return
|
|
2033
|
+
return _.id(e, !0);
|
|
2034
2034
|
case "boolean":
|
|
2035
|
-
return
|
|
2035
|
+
return _.parseBoolean(e);
|
|
2036
2036
|
case "url":
|
|
2037
|
-
return
|
|
2037
|
+
return _.parseURL(e);
|
|
2038
2038
|
case "key":
|
|
2039
|
-
return
|
|
2039
|
+
return _.machineName(e);
|
|
2040
2040
|
case "email":
|
|
2041
|
-
return
|
|
2041
|
+
return _.parseEmail(e);
|
|
2042
2042
|
case "date":
|
|
2043
|
-
var a =
|
|
2043
|
+
var a = _.parseDate(e, i);
|
|
2044
2044
|
return a === void 0 ? void 0 : a;
|
|
2045
2045
|
case "number":
|
|
2046
2046
|
case "decimal":
|
|
2047
2047
|
case "float":
|
|
2048
|
-
var n =
|
|
2048
|
+
var n = _.parseNumber(e);
|
|
2049
2049
|
return String(n) == String(Number(e)) ? n : void 0;
|
|
2050
2050
|
case "integer":
|
|
2051
|
-
var n =
|
|
2051
|
+
var n = _.parseInt(e);
|
|
2052
2052
|
return String(n) == String(parseInt(e)) ? n : void 0;
|
|
2053
2053
|
case "group":
|
|
2054
2054
|
return e;
|
|
2055
2055
|
case "object":
|
|
2056
2056
|
return typeof e == "object" && e !== null && !Array.isArray(e) ? e : void 0;
|
|
2057
2057
|
case "string":
|
|
2058
|
-
if (
|
|
2058
|
+
if (_.exists(e)) {
|
|
2059
2059
|
var s = String(e);
|
|
2060
2060
|
return s == "[object Object]" ? void 0 : s;
|
|
2061
2061
|
} else
|
|
@@ -2075,43 +2075,43 @@ I.cleanValue = function(e, r, i) {
|
|
|
2075
2075
|
return String(e);
|
|
2076
2076
|
}
|
|
2077
2077
|
};
|
|
2078
|
-
|
|
2079
|
-
var t =
|
|
2078
|
+
_.isValidValue = function(e, r, i) {
|
|
2079
|
+
var t = _.exists(e), a = typeof e == "number", n = !1;
|
|
2080
2080
|
if (!t)
|
|
2081
2081
|
return !1;
|
|
2082
2082
|
switch (r) {
|
|
2083
2083
|
case "url":
|
|
2084
|
-
i ? n = e.startsWith("/") || e.startsWith("://") || e.startsWith("http://") || e.startsWith("https://") : n = String(e) ===
|
|
2084
|
+
i ? n = e.startsWith("/") || e.startsWith("://") || e.startsWith("http://") || e.startsWith("https://") : n = String(e) === _.parseURL(e);
|
|
2085
2085
|
break;
|
|
2086
2086
|
case "key":
|
|
2087
|
-
n = String(e) ===
|
|
2087
|
+
n = String(e) === _.machineName(e);
|
|
2088
2088
|
break;
|
|
2089
2089
|
case "date":
|
|
2090
2090
|
if (i && (typeof e != "object" || !(e instanceof Date)))
|
|
2091
2091
|
return !1;
|
|
2092
|
-
var s =
|
|
2092
|
+
var s = _.parseDate(e);
|
|
2093
2093
|
return s !== void 0;
|
|
2094
2094
|
case "email":
|
|
2095
|
-
i ? n = e ===
|
|
2095
|
+
i ? n = e === _.parseEmail(e) : n = String(e).toLowerCase() === _.parseEmail(e);
|
|
2096
2096
|
break;
|
|
2097
2097
|
case "number":
|
|
2098
2098
|
case "decimal":
|
|
2099
2099
|
case "float":
|
|
2100
|
-
i ? n = a && Number(e) ===
|
|
2100
|
+
i ? n = a && Number(e) === _.parseNumber(e) : n = Number(e) === _.parseNumber(e);
|
|
2101
2101
|
break;
|
|
2102
2102
|
case "integer":
|
|
2103
|
-
i ? n = a && Number(e) ===
|
|
2103
|
+
i ? n = a && Number(e) === _.parseInt(e) : n = Number(e) === _.parseInt(e);
|
|
2104
2104
|
break;
|
|
2105
2105
|
case "boolean":
|
|
2106
|
-
var s =
|
|
2106
|
+
var s = _.parseBoolean(e);
|
|
2107
2107
|
i ? (e === !0 || e === !1) && (n = e === s) : n = s === !0 || s === !1;
|
|
2108
2108
|
break;
|
|
2109
2109
|
case "reference":
|
|
2110
|
-
i ? n = String(e) ===
|
|
2110
|
+
i ? n = String(e) === _.id(e) : n = !!_.id(e);
|
|
2111
2111
|
break;
|
|
2112
2112
|
case "string":
|
|
2113
|
-
var
|
|
2114
|
-
if (i && typeof e != "string" ||
|
|
2113
|
+
var d = String(e);
|
|
2114
|
+
if (i && typeof e != "string" || d == "[object Object]")
|
|
2115
2115
|
return !1;
|
|
2116
2116
|
n = !0;
|
|
2117
2117
|
break;
|
|
@@ -2127,7 +2127,7 @@ I.isValidValue = function(e, r, i) {
|
|
|
2127
2127
|
}
|
|
2128
2128
|
return n;
|
|
2129
2129
|
};
|
|
2130
|
-
|
|
2130
|
+
_.parseBoolean = function(e) {
|
|
2131
2131
|
switch (String(e).toLowerCase()) {
|
|
2132
2132
|
case "true":
|
|
2133
2133
|
case "y":
|
|
@@ -2150,10 +2150,10 @@ I.parseBoolean = function(e) {
|
|
|
2150
2150
|
}
|
|
2151
2151
|
return !!e;
|
|
2152
2152
|
};
|
|
2153
|
-
|
|
2153
|
+
_.clone = function(e) {
|
|
2154
2154
|
return JSON.parse(JSON.stringify(e));
|
|
2155
2155
|
};
|
|
2156
|
-
|
|
2156
|
+
_.getAllFields = function(e) {
|
|
2157
2157
|
const r = e.definesType === "profile" || e.key === "profile", i = e.definesType === "submission";
|
|
2158
2158
|
var t = [...e.fields], a = e.definedFields || [];
|
|
2159
2159
|
if (a.length)
|
|
@@ -2205,7 +2205,7 @@ I.getAllFields = function(e) {
|
|
|
2205
2205
|
maximum: 1,
|
|
2206
2206
|
type: "date"
|
|
2207
2207
|
}));
|
|
2208
|
-
var
|
|
2208
|
+
var d = _.mapFields(t).filter(function(c) {
|
|
2209
2209
|
var p = c.type == "group" && c.asObject && c.minimum == 1 && c.maximum == 1;
|
|
2210
2210
|
return !p;
|
|
2211
2211
|
}).map(function(c) {
|
|
@@ -2213,30 +2213,30 @@ I.getAllFields = function(e) {
|
|
|
2213
2213
|
}).sort(function(c, p) {
|
|
2214
2214
|
return c.title < p.title ? -1 : 1;
|
|
2215
2215
|
});
|
|
2216
|
-
return
|
|
2216
|
+
return d;
|
|
2217
2217
|
};
|
|
2218
|
-
|
|
2218
|
+
_.mapFields = function(e, r) {
|
|
2219
2219
|
r || (r = {});
|
|
2220
|
-
var i = [], t = [], a = [], n = 1, s = r.depth,
|
|
2220
|
+
var i = [], t = [], a = [], n = 1, s = r.depth, d = r.arrayDelimeter || "[]";
|
|
2221
2221
|
e.forEach(c);
|
|
2222
|
-
function c(p,
|
|
2223
|
-
var
|
|
2224
|
-
|
|
2222
|
+
function c(p, S) {
|
|
2223
|
+
var g = p.key, u = p.type == "group", o = p.minimum === p.maximum && p.minimum === 1, f = p.asObject, w = u && !f, m = r.original ? p : _.clone(p);
|
|
2224
|
+
m.trail = t.slice(), m.trail.push(g), m.path = m.trail.join("."), m.titles = a.slice(), m.titles.push(p.filterTitle || p.title || ""), (!w || r.includeLayout) && i.push(m);
|
|
2225
2225
|
var v = s && n >= s;
|
|
2226
2226
|
if (p.fields && p.fields.length)
|
|
2227
|
-
if (
|
|
2227
|
+
if (w)
|
|
2228
2228
|
p.fields.forEach(c);
|
|
2229
2229
|
else {
|
|
2230
2230
|
if (v)
|
|
2231
2231
|
return;
|
|
2232
2232
|
n++;
|
|
2233
|
-
let
|
|
2234
|
-
r.includeArrayDelimeter && (o || (
|
|
2233
|
+
let b = g;
|
|
2234
|
+
r.includeArrayDelimeter && (o || (b = `${g}${d}`)), t.push(b), a.push(p.filterTitle || p.title), p.fields.forEach(c), n--, t.pop(), a.pop();
|
|
2235
2235
|
}
|
|
2236
2236
|
}
|
|
2237
2237
|
return i;
|
|
2238
2238
|
};
|
|
2239
|
-
|
|
2239
|
+
_.mapParameters = function(e) {
|
|
2240
2240
|
e = e || {};
|
|
2241
2241
|
var r = [];
|
|
2242
2242
|
return Object.entries(e).forEach(function([i, t]) {
|
|
@@ -2245,13 +2245,13 @@ I.mapParameters = function(e) {
|
|
|
2245
2245
|
}) : r.push(encodeURIComponent(i) + "=" + encodeURIComponent(t)));
|
|
2246
2246
|
}), r.join("&");
|
|
2247
2247
|
};
|
|
2248
|
-
|
|
2248
|
+
_.formatCurrency = function(e, r, i) {
|
|
2249
2249
|
(!e || isNaN(e)) && (e = 0), i = i || 2;
|
|
2250
|
-
var t =
|
|
2250
|
+
var t = _.currencySymbol(r);
|
|
2251
2251
|
return `${t}${parseFloat(Number(e) / 100).toFixed(i)}`;
|
|
2252
2252
|
};
|
|
2253
|
-
|
|
2254
|
-
if (e =
|
|
2253
|
+
_.getTypeFromID = function(e) {
|
|
2254
|
+
if (e = _.id(e), !e)
|
|
2255
2255
|
return;
|
|
2256
2256
|
const r = {
|
|
2257
2257
|
21: "organisation",
|
|
@@ -2314,7 +2314,7 @@ I.getTypeFromID = function(e) {
|
|
|
2314
2314
|
return r[i];
|
|
2315
2315
|
};
|
|
2316
2316
|
const St = { gbp: "£", eur: "€" };
|
|
2317
|
-
|
|
2317
|
+
_.currencySymbol = function(e) {
|
|
2318
2318
|
return St[String(e).toLowerCase()] || "$";
|
|
2319
2319
|
};
|
|
2320
2320
|
const wt = [
|
|
@@ -2325,9 +2325,9 @@ const wt = [
|
|
|
2325
2325
|
{ code: "nzd", countries: ["NZ"] },
|
|
2326
2326
|
{ code: "sgd", countries: ["SG"] }
|
|
2327
2327
|
];
|
|
2328
|
-
|
|
2328
|
+
_.getAvailableCurrencies = function(e) {
|
|
2329
2329
|
let r = wt.map(({ code: i, countries: t }) => ({
|
|
2330
|
-
name: `${i.toUpperCase()} (${
|
|
2330
|
+
name: `${i.toUpperCase()} (${_.currencySymbol(i)})`,
|
|
2331
2331
|
value: i,
|
|
2332
2332
|
countryCode: Object.fromEntries(t.map((a) => [a, !0]))
|
|
2333
2333
|
}));
|
|
@@ -2340,97 +2340,97 @@ I.getAvailableCurrencies = function(e) {
|
|
|
2340
2340
|
}
|
|
2341
2341
|
return r;
|
|
2342
2342
|
};
|
|
2343
|
-
|
|
2343
|
+
_.hash = function(e, r) {
|
|
2344
2344
|
return e = Array.isArray(e) ? e : [], e.reduce(function(i, t) {
|
|
2345
2345
|
const a = r ? je(t, r) : t;
|
|
2346
2346
|
return i[a] = t, i;
|
|
2347
2347
|
}, {});
|
|
2348
2348
|
};
|
|
2349
|
-
|
|
2349
|
+
_.extractFromArray = function(e, r, i, t, a, n, s) {
|
|
2350
2350
|
s = s || {}, i && (s.sum = i), t && (s.flatten = !0), a && (s.unique = !0), n && (s.excludeNull = !0);
|
|
2351
|
-
var
|
|
2352
|
-
var
|
|
2353
|
-
return s.excludeNull &&
|
|
2351
|
+
var d = e.reduce(function(c, p) {
|
|
2352
|
+
var S = je(p, r), g = !S && S !== !1 && S !== 0;
|
|
2353
|
+
return s.excludeNull && g || c.push(S), c;
|
|
2354
2354
|
}, []);
|
|
2355
|
-
return s.flatten && (
|
|
2355
|
+
return s.flatten && (d = d.flat()), s.unique && (d = [...new Set(d)]), s.sum && (d = d.reduce(function(c, p) {
|
|
2356
2356
|
return c + p;
|
|
2357
|
-
}, 0)),
|
|
2357
|
+
}, 0)), d;
|
|
2358
2358
|
};
|
|
2359
|
-
|
|
2359
|
+
_.matchInArray = function(e, r, i, t) {
|
|
2360
2360
|
var a = e.filter(function(n) {
|
|
2361
|
-
var s = je(n, r),
|
|
2361
|
+
var s = je(n, r), d;
|
|
2362
2362
|
switch (t) {
|
|
2363
2363
|
case "in":
|
|
2364
|
-
|
|
2364
|
+
d = s.includes(i);
|
|
2365
2365
|
break;
|
|
2366
2366
|
case ">=":
|
|
2367
|
-
|
|
2367
|
+
d = s >= i;
|
|
2368
2368
|
break;
|
|
2369
2369
|
case "<=":
|
|
2370
|
-
|
|
2370
|
+
d = s <= i;
|
|
2371
2371
|
break;
|
|
2372
2372
|
case "<":
|
|
2373
|
-
|
|
2373
|
+
d = s < i;
|
|
2374
2374
|
break;
|
|
2375
2375
|
case ">":
|
|
2376
|
-
|
|
2376
|
+
d = s > i;
|
|
2377
2377
|
break;
|
|
2378
2378
|
case "==":
|
|
2379
2379
|
default:
|
|
2380
|
-
i === void 0 ?
|
|
2380
|
+
i === void 0 ? d = s : d = s == i;
|
|
2381
2381
|
break;
|
|
2382
2382
|
}
|
|
2383
|
-
return
|
|
2383
|
+
return d;
|
|
2384
2384
|
});
|
|
2385
2385
|
return a;
|
|
2386
2386
|
};
|
|
2387
|
-
|
|
2387
|
+
_.comma = function(e, r, i) {
|
|
2388
2388
|
return i && (e = e.slice(0, i)), e.filter(function(t) {
|
|
2389
2389
|
return t != null && t !== void 0 && t !== "";
|
|
2390
2390
|
}).map(function(t) {
|
|
2391
2391
|
return r && r.length ? je(t, r) : t;
|
|
2392
2392
|
}).join(", ");
|
|
2393
2393
|
};
|
|
2394
|
-
|
|
2394
|
+
_.id = function(e) {
|
|
2395
2395
|
if (e) {
|
|
2396
2396
|
var r;
|
|
2397
2397
|
e._id ? r = String(e._id) : r = String(e);
|
|
2398
|
-
var i =
|
|
2398
|
+
var i = _.isValidID(r);
|
|
2399
2399
|
if (i)
|
|
2400
2400
|
return r;
|
|
2401
2401
|
}
|
|
2402
2402
|
};
|
|
2403
|
-
|
|
2403
|
+
_.ids = function(e) {
|
|
2404
2404
|
if (!e)
|
|
2405
2405
|
return [];
|
|
2406
2406
|
var r = Object.keys(
|
|
2407
2407
|
e.reduce(function(i, t) {
|
|
2408
2408
|
if (!t)
|
|
2409
2409
|
return i;
|
|
2410
|
-
var a =
|
|
2410
|
+
var a = _.id(t);
|
|
2411
2411
|
return a && (i[a] = 1), i;
|
|
2412
2412
|
}, {})
|
|
2413
2413
|
);
|
|
2414
2414
|
return r;
|
|
2415
2415
|
};
|
|
2416
|
-
|
|
2416
|
+
_.isValidID = function(e) {
|
|
2417
2417
|
var r = new RegExp("^[0-9a-fA-F]{24}$");
|
|
2418
2418
|
return r.test(String(e));
|
|
2419
2419
|
};
|
|
2420
|
-
|
|
2420
|
+
_.errorMessage = function(e) {
|
|
2421
2421
|
if (!e)
|
|
2422
2422
|
return;
|
|
2423
2423
|
Array.isArray(e) && (e = e[0]);
|
|
2424
2424
|
let r = e?.response?.data?.message || (typeof e?.response?.data == "string" ? e.response.data : null) || e?.message || null;
|
|
2425
2425
|
return Array.isArray(r) && (r = r[0]), r || JSON.stringify(e);
|
|
2426
2426
|
};
|
|
2427
|
-
|
|
2427
|
+
_.guid = function() {
|
|
2428
2428
|
return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
2429
2429
|
const r = Math.random() * 16 | 0;
|
|
2430
2430
|
return (e === "x" ? r : r & 3 | 8).toString(16);
|
|
2431
2431
|
});
|
|
2432
2432
|
};
|
|
2433
|
-
|
|
2433
|
+
_.machineName = function(e) {
|
|
2434
2434
|
if (!(!e || !e.length)) {
|
|
2435
2435
|
var r = /[^a-zA-Z0-9-_]+/g;
|
|
2436
2436
|
return String(e).replace(r, " ").split("_").map((i) => At(i)).join("_");
|
|
@@ -2438,11 +2438,11 @@ I.machineName = function(e) {
|
|
|
2438
2438
|
};
|
|
2439
2439
|
function De() {
|
|
2440
2440
|
const e = /* @__PURE__ */ new Map(), r = {
|
|
2441
|
-
dispatch(i, t) {
|
|
2441
|
+
dispatch(i, ...t) {
|
|
2442
2442
|
const a = e.get(i);
|
|
2443
2443
|
if (a)
|
|
2444
2444
|
for (const n of a)
|
|
2445
|
-
n(t);
|
|
2445
|
+
n(...t);
|
|
2446
2446
|
},
|
|
2447
2447
|
addEventListener(i, t) {
|
|
2448
2448
|
if (typeof t != "function")
|
|
@@ -2665,176 +2665,178 @@ var Pt = function(e) {
|
|
|
2665
2665
|
});
|
|
2666
2666
|
const a = new De();
|
|
2667
2667
|
a.bootstrap(t);
|
|
2668
|
-
function n(
|
|
2668
|
+
function n(d) {
|
|
2669
2669
|
var c = r.getUser();
|
|
2670
|
-
t.onChange && t.onChange(c), a.dispatch("change", c,
|
|
2670
|
+
t.onChange && t.onChange(c, d), a.dispatch("change", c, d);
|
|
2671
2671
|
}
|
|
2672
|
-
t.set = function(
|
|
2673
|
-
const
|
|
2674
|
-
if (JSON.stringify(
|
|
2672
|
+
t.set = function(d, c, p) {
|
|
2673
|
+
const S = r.getUser();
|
|
2674
|
+
if (JSON.stringify(S) != JSON.stringify(d) && (r.setUser(d), !p))
|
|
2675
2675
|
return n(c);
|
|
2676
2676
|
}, t.logout = function() {
|
|
2677
2677
|
return r.clearUser(), e.cache.reset(), n();
|
|
2678
|
-
}, t.changeOrganisation = function(
|
|
2679
|
-
|
|
2678
|
+
}, t.changeOrganisation = function(d, c) {
|
|
2679
|
+
d = e.utils.id(d), c || (c = {});
|
|
2680
2680
|
var p = !0;
|
|
2681
|
-
return c.disableAutoAuthentication && (p = !1), new Promise(function(
|
|
2682
|
-
e.api.post(`/user/switch/${
|
|
2683
|
-
p && (e.cache.reset(), t.set(u.data)),
|
|
2684
|
-
}).catch(
|
|
2681
|
+
return c.disableAutoAuthentication && (p = !1), new Promise(function(S, g) {
|
|
2682
|
+
e.api.post(`/user/switch/${d}`).then(function(u) {
|
|
2683
|
+
p && (e.cache.reset(), t.set(u.data)), S(u.data);
|
|
2684
|
+
}).catch(g);
|
|
2685
2685
|
});
|
|
2686
|
-
}, t.impersonate = function(
|
|
2687
|
-
|
|
2686
|
+
}, t.impersonate = function(d, c) {
|
|
2687
|
+
d = e.utils.id(d), c || (c = {});
|
|
2688
2688
|
var p = !0;
|
|
2689
2689
|
c.disableAutoAuthentication && (p = !1);
|
|
2690
|
-
var
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2690
|
+
var S = { persona: d };
|
|
2691
|
+
c.application && (S.application = e.utils.id(c.application));
|
|
2692
|
+
var g = e.api.post("/user/impersonate", S);
|
|
2693
|
+
return g.then(function(u) {
|
|
2694
|
+
p && (e.cache.reset(), t.set(u.data));
|
|
2695
|
+
}, function(u) {
|
|
2696
|
+
}), g;
|
|
2697
|
+
}, t.login = async function(d, c) {
|
|
2696
2698
|
c || (c = {});
|
|
2697
2699
|
var p = !0;
|
|
2698
2700
|
c.disableAutoAuthentication && (p = !1);
|
|
2699
|
-
var
|
|
2700
|
-
function
|
|
2701
|
-
if (!
|
|
2701
|
+
var S = new Promise(g);
|
|
2702
|
+
function g(u, o) {
|
|
2703
|
+
if (!d)
|
|
2702
2704
|
return o({
|
|
2703
2705
|
message: "Login requires an email and password"
|
|
2704
2706
|
});
|
|
2705
|
-
if (!
|
|
2707
|
+
if (!d.email || !d.email.length)
|
|
2706
2708
|
return o({
|
|
2707
2709
|
message: "An email address is required to log in"
|
|
2708
2710
|
});
|
|
2709
|
-
if (!
|
|
2711
|
+
if (!d.password || !d.password.length)
|
|
2710
2712
|
return o({
|
|
2711
2713
|
message: "A password is required to log in"
|
|
2712
2714
|
});
|
|
2713
|
-
var
|
|
2715
|
+
var f = {
|
|
2714
2716
|
bypassInterceptor: !0
|
|
2715
2717
|
};
|
|
2716
|
-
r.isCookieMode && r.isCookieMode() && (
|
|
2717
|
-
var
|
|
2718
|
-
c.url && (
|
|
2719
|
-
p && t.set(l.data), u(l);
|
|
2718
|
+
r.isCookieMode && r.isCookieMode() && (d.useCookies = !0, f.withCredentials = !0);
|
|
2719
|
+
var m = `${e.apiURL}/user/login`;
|
|
2720
|
+
c.url && (m = c.url), e.api.post(m, d, f).then(function(l) {
|
|
2721
|
+
p && !(l.data && l.data.mfa) && t.set(l.data), u(l);
|
|
2720
2722
|
}, o);
|
|
2721
2723
|
}
|
|
2722
|
-
return
|
|
2723
|
-
}, t.signup = async function(
|
|
2724
|
+
return S;
|
|
2725
|
+
}, t.signup = async function(d, c) {
|
|
2724
2726
|
c || (c = {});
|
|
2725
2727
|
var p = !0;
|
|
2726
2728
|
c.disableAutoAuthentication && (p = !1);
|
|
2727
|
-
var
|
|
2728
|
-
function
|
|
2729
|
-
if (!
|
|
2729
|
+
var S = new Promise(g);
|
|
2730
|
+
function g(u, o) {
|
|
2731
|
+
if (!d)
|
|
2730
2732
|
return o({
|
|
2731
2733
|
message: "Signup details are required"
|
|
2732
2734
|
});
|
|
2733
|
-
if (!
|
|
2735
|
+
if (!d.firstName || !d.firstName.length)
|
|
2734
2736
|
return o({
|
|
2735
2737
|
message: "Please provide a first name"
|
|
2736
2738
|
});
|
|
2737
|
-
if (!
|
|
2739
|
+
if (!d.lastName || !d.lastName.length)
|
|
2738
2740
|
return o({
|
|
2739
2741
|
message: "Please provide a last name"
|
|
2740
2742
|
});
|
|
2741
|
-
if (!
|
|
2743
|
+
if (!d.email || !d.email.length)
|
|
2742
2744
|
return o({
|
|
2743
2745
|
message: "An email address is required to sign up"
|
|
2744
2746
|
});
|
|
2745
|
-
if (!
|
|
2747
|
+
if (!d.password || !d.password.length)
|
|
2746
2748
|
return o({
|
|
2747
2749
|
message: "A password is required to sign up"
|
|
2748
2750
|
});
|
|
2749
|
-
if (!
|
|
2751
|
+
if (!d.confirmPassword || !d.confirmPassword.length)
|
|
2750
2752
|
return o({
|
|
2751
2753
|
message: "Please confirm your password"
|
|
2752
2754
|
});
|
|
2753
|
-
if (
|
|
2755
|
+
if (d.confirmPassword != d.password)
|
|
2754
2756
|
return o({
|
|
2755
2757
|
message: "Password and confirmation do not match"
|
|
2756
2758
|
});
|
|
2757
|
-
var
|
|
2759
|
+
var f = {
|
|
2758
2760
|
bypassInterceptor: !0
|
|
2759
2761
|
};
|
|
2760
|
-
r.isCookieMode && r.isCookieMode() && (
|
|
2761
|
-
var
|
|
2762
|
-
c.application && (
|
|
2762
|
+
r.isCookieMode && r.isCookieMode() && (d.useCookies = !0, f.withCredentials = !0);
|
|
2763
|
+
var m = `${e.apiURL}/user/signup`;
|
|
2764
|
+
c.application && (m = `${e.domain || ""}/qik/application/signup`), c.url && (m = c.url), e.api.post(m, d, f).then(function(l) {
|
|
2763
2765
|
p && t.set(l.data), u(l);
|
|
2764
2766
|
}, o);
|
|
2765
2767
|
}
|
|
2766
|
-
return
|
|
2767
|
-
}, t.retrieveUserFromResetToken = async function(
|
|
2768
|
+
return S;
|
|
2769
|
+
}, t.retrieveUserFromResetToken = async function(d, c) {
|
|
2768
2770
|
c || (c = {});
|
|
2769
2771
|
var p = {
|
|
2770
2772
|
bypassInterceptor: !0
|
|
2771
2773
|
};
|
|
2772
|
-
return new Promise(function(
|
|
2773
|
-
e.api.get(c.url || `${e.apiURL}/user/reset/${
|
|
2774
|
-
return
|
|
2775
|
-
},
|
|
2774
|
+
return new Promise(function(S, g) {
|
|
2775
|
+
e.api.get(c.url || `${e.apiURL}/user/reset/${d}`, p).then(function(u) {
|
|
2776
|
+
return S(u.data);
|
|
2777
|
+
}, g);
|
|
2776
2778
|
});
|
|
2777
|
-
}, t.updateUserWithToken = async function(
|
|
2779
|
+
}, t.updateUserWithToken = async function(d, c, p) {
|
|
2778
2780
|
p || (p = {});
|
|
2779
|
-
var
|
|
2780
|
-
return p.disableAutoAuthentication && (
|
|
2781
|
+
var S = !0;
|
|
2782
|
+
return p.disableAutoAuthentication && (S = !1), new Promise(function(g, u) {
|
|
2781
2783
|
var o = {
|
|
2782
2784
|
bypassInterceptor: !0
|
|
2783
2785
|
};
|
|
2784
|
-
e.api.post(p.url || `${e.apiURL}/user/reset/${
|
|
2785
|
-
return
|
|
2786
|
+
e.api.post(p.url || `${e.apiURL}/user/reset/${d}`, c, o).then(function(f) {
|
|
2787
|
+
return S && (e.cache.reset(), t.set(f.data)), g(f.data);
|
|
2786
2788
|
}, u);
|
|
2787
2789
|
});
|
|
2788
|
-
}, t.sendResetPasswordRequest = function(
|
|
2789
|
-
return c || (c = {}),
|
|
2790
|
+
}, t.sendResetPasswordRequest = function(d, c) {
|
|
2791
|
+
return c || (c = {}), d ? !d.email || !d.email.length ? Promise.reject({
|
|
2790
2792
|
message: "An email address is required for password reset"
|
|
2791
|
-
}) : new Promise(function(p,
|
|
2792
|
-
var
|
|
2793
|
+
}) : new Promise(function(p, S) {
|
|
2794
|
+
var g = {
|
|
2793
2795
|
bypassInterceptor: !0
|
|
2794
2796
|
};
|
|
2795
|
-
e.api.post(c.url || `${e.apiURL}/user/forgot`,
|
|
2797
|
+
e.api.post(c.url || `${e.apiURL}/user/forgot`, d, g).then(p, S);
|
|
2796
2798
|
}) : Promise.reject({
|
|
2797
2799
|
message: "Please provide your account details to reset your password"
|
|
2798
2800
|
});
|
|
2799
|
-
}, t.ensureValidToken = async function(
|
|
2801
|
+
}, t.ensureValidToken = async function(d) {
|
|
2800
2802
|
var c = t.getCurrentUser();
|
|
2801
2803
|
if (!c)
|
|
2802
2804
|
return Promise.reject(new Error("No user"));
|
|
2803
2805
|
if (r.isCookieMode && r.isCookieMode())
|
|
2804
|
-
return
|
|
2805
|
-
var { token:
|
|
2806
|
-
if (!
|
|
2806
|
+
return d ? await t.refreshAccessToken() : "cookie_mode_token";
|
|
2807
|
+
var { token: S } = c;
|
|
2808
|
+
if (!S)
|
|
2807
2809
|
return Promise.reject("No token");
|
|
2808
|
-
var
|
|
2809
|
-
|
|
2810
|
-
var u = new Date(
|
|
2811
|
-
return
|
|
2810
|
+
var g = /* @__PURE__ */ new Date();
|
|
2811
|
+
g.setSeconds(g.getSeconds() + i);
|
|
2812
|
+
var u = new Date(S.expires);
|
|
2813
|
+
return d ? await t.refreshAccessToken(S.refreshToken) : g < u ? S : await t.refreshAccessToken(S.refreshToken);
|
|
2812
2814
|
};
|
|
2813
2815
|
const s = {};
|
|
2814
|
-
return t.refreshAccessToken = async function(
|
|
2816
|
+
return t.refreshAccessToken = async function(d) {
|
|
2815
2817
|
if (s.inflightRefreshRequest)
|
|
2816
2818
|
return s.inflightRefreshRequest;
|
|
2817
2819
|
const c = r.isCookieMode && r.isCookieMode();
|
|
2818
|
-
return s.inflightRefreshRequest = new Promise(function(p,
|
|
2819
|
-
let
|
|
2820
|
+
return s.inflightRefreshRequest = new Promise(function(p, S) {
|
|
2821
|
+
let g = {}, u = {
|
|
2820
2822
|
bypassInterceptor: !0,
|
|
2821
2823
|
withoutToken: !0
|
|
2822
2824
|
};
|
|
2823
2825
|
if (c)
|
|
2824
2826
|
u.withCredentials = !0;
|
|
2825
2827
|
else {
|
|
2826
|
-
if (!
|
|
2827
|
-
return s.inflightRefreshRequest = null,
|
|
2828
|
-
|
|
2828
|
+
if (!d)
|
|
2829
|
+
return s.inflightRefreshRequest = null, S(new Error("No refresh token provided for localStorage mode"));
|
|
2830
|
+
g.refreshToken = d;
|
|
2829
2831
|
}
|
|
2830
|
-
e.api.post("/user/refresh",
|
|
2831
|
-
if (!
|
|
2832
|
-
return s.inflightRefreshRequest = null,
|
|
2833
|
-
if (t.set(
|
|
2832
|
+
e.api.post("/user/refresh", g, u).then(function(f) {
|
|
2833
|
+
if (!f || !f.data)
|
|
2834
|
+
return s.inflightRefreshRequest = null, S(new Error("Invalid refresh response"));
|
|
2835
|
+
if (t.set(f.data), n(), c)
|
|
2834
2836
|
p("cookie_token_refreshed");
|
|
2835
2837
|
else {
|
|
2836
|
-
const
|
|
2837
|
-
|
|
2838
|
+
const w = f.data.token?.accessToken;
|
|
2839
|
+
w ? p(w) : S(new Error("No access token in refresh response"));
|
|
2838
2840
|
}
|
|
2839
2841
|
setTimeout(function() {
|
|
2840
2842
|
s.inflightRefreshRequest = null;
|
|
@@ -2842,30 +2844,30 @@ var Pt = function(e) {
|
|
|
2842
2844
|
}).catch(function(o) {
|
|
2843
2845
|
setTimeout(function() {
|
|
2844
2846
|
s.inflightRefreshRequest = null;
|
|
2845
|
-
}),
|
|
2847
|
+
}), S(o);
|
|
2846
2848
|
});
|
|
2847
2849
|
}), s.inflightRefreshRequest;
|
|
2848
|
-
}, t.sync = function() {
|
|
2849
|
-
return e.api.get("/user").then(function(
|
|
2850
|
-
if (
|
|
2851
|
-
const
|
|
2852
|
-
if (
|
|
2853
|
-
const
|
|
2854
|
-
|
|
2850
|
+
}, t.sync = function(d) {
|
|
2851
|
+
return d = d || {}, e.api.get("/user").then(function(c) {
|
|
2852
|
+
if (c.data) {
|
|
2853
|
+
const p = r.getUser();
|
|
2854
|
+
if (p) {
|
|
2855
|
+
const S = { ...p };
|
|
2856
|
+
S.session ? Object.assign(S.session, c.data) : S.session = c.data, t.set(S);
|
|
2855
2857
|
} else
|
|
2856
|
-
t.set(
|
|
2858
|
+
t.set(c.data);
|
|
2857
2859
|
} else
|
|
2858
2860
|
t.set(null);
|
|
2859
2861
|
n();
|
|
2860
|
-
}).catch(function(
|
|
2861
|
-
t.set(null), n();
|
|
2862
|
+
}).catch(function(c) {
|
|
2863
|
+
d.keepOnError || (t.set(null), n());
|
|
2862
2864
|
});
|
|
2863
2865
|
}, t.getCurrentUser = function() {
|
|
2864
2866
|
return r.getUser();
|
|
2865
2867
|
}, t.getCurrentToken = function() {
|
|
2866
|
-
var
|
|
2867
|
-
if (
|
|
2868
|
-
return
|
|
2868
|
+
var d = r.getAccessToken();
|
|
2869
|
+
if (d)
|
|
2870
|
+
return d;
|
|
2869
2871
|
var c = t.getCurrentUser();
|
|
2870
2872
|
if (!c)
|
|
2871
2873
|
return e.applicationToken ? e.applicationToken : void 0;
|
|
@@ -2873,47 +2875,47 @@ var Pt = function(e) {
|
|
|
2873
2875
|
if (p)
|
|
2874
2876
|
return p.accessToken;
|
|
2875
2877
|
}, e.api.interceptors.request.use(
|
|
2876
|
-
async function(
|
|
2877
|
-
if (
|
|
2878
|
-
return
|
|
2879
|
-
var c =
|
|
2878
|
+
async function(d) {
|
|
2879
|
+
if (d.bypassInterceptor)
|
|
2880
|
+
return d;
|
|
2881
|
+
var c = d;
|
|
2880
2882
|
if (r.isCookieMode && r.isCookieMode())
|
|
2881
2883
|
return c.withCredentials || (c.withCredentials = !0), c;
|
|
2882
|
-
var
|
|
2883
|
-
if (
|
|
2884
|
-
var { token:
|
|
2885
|
-
|
|
2884
|
+
var S = t.getCurrentUser(), g, u, o;
|
|
2885
|
+
if (S) {
|
|
2886
|
+
var { token: f } = S;
|
|
2887
|
+
f && (g = f.accessToken, u = f.refreshToken, o = f.expires);
|
|
2886
2888
|
}
|
|
2887
|
-
if (
|
|
2888
|
-
c.headers.Authorization = `Bearer ${
|
|
2889
|
+
if (g)
|
|
2890
|
+
c.headers.Authorization = `Bearer ${g}`;
|
|
2889
2891
|
else
|
|
2890
2892
|
return c;
|
|
2891
2893
|
if (!u)
|
|
2892
2894
|
return c;
|
|
2893
|
-
var
|
|
2894
|
-
|
|
2895
|
-
var
|
|
2896
|
-
return
|
|
2897
|
-
await t.refreshAccessToken(u).then(function(
|
|
2898
|
-
return c.headers.Authorization = `Bearer ${
|
|
2899
|
-
}).catch(function(
|
|
2900
|
-
return v(
|
|
2895
|
+
var w = /* @__PURE__ */ new Date();
|
|
2896
|
+
w.setSeconds(w.getSeconds() + i);
|
|
2897
|
+
var m = new Date(o);
|
|
2898
|
+
return w < m ? c : new Promise(async function(l, v) {
|
|
2899
|
+
await t.refreshAccessToken(u).then(function(b) {
|
|
2900
|
+
return c.headers.Authorization = `Bearer ${b}`, l(c);
|
|
2901
|
+
}).catch(function(b) {
|
|
2902
|
+
return v(b);
|
|
2901
2903
|
});
|
|
2902
2904
|
});
|
|
2903
2905
|
},
|
|
2904
|
-
function(
|
|
2905
|
-
return Promise.reject(
|
|
2906
|
+
function(d) {
|
|
2907
|
+
return Promise.reject(d);
|
|
2906
2908
|
}
|
|
2907
|
-
), e.api.interceptors.response.use(function(
|
|
2908
|
-
return
|
|
2909
|
-
}, function(
|
|
2910
|
-
var c =
|
|
2909
|
+
), e.api.interceptors.response.use(function(d) {
|
|
2910
|
+
return d;
|
|
2911
|
+
}, function(d) {
|
|
2912
|
+
var c = d && d.response && d.response.status || d.status;
|
|
2911
2913
|
switch (c) {
|
|
2912
2914
|
case 401:
|
|
2913
2915
|
t.logout();
|
|
2914
2916
|
break;
|
|
2915
2917
|
}
|
|
2916
|
-
return Promise.reject(
|
|
2918
|
+
return Promise.reject(d);
|
|
2917
2919
|
}), t;
|
|
2918
2920
|
}, q = {};
|
|
2919
2921
|
function pr(e) {
|
|
@@ -2926,7 +2928,7 @@ function Wr(e) {
|
|
|
2926
2928
|
return !pr(e);
|
|
2927
2929
|
}
|
|
2928
2930
|
q.cleanKey = function(e) {
|
|
2929
|
-
return e = String(e).split("|")[0], e[0] == "." && (e = e.slice(1)), e;
|
|
2931
|
+
return e == null ? "" : (e = String(e).split("|")[0], e[0] == "." && (e = e.slice(1)), e);
|
|
2930
2932
|
};
|
|
2931
2933
|
q.isValidFilter = function(e) {
|
|
2932
2934
|
if (!e)
|
|
@@ -2971,8 +2973,8 @@ q.activeFilterKeys = function(e, r) {
|
|
|
2971
2973
|
var i = q.activeFilters(e), t = i.filter(function(n) {
|
|
2972
2974
|
return !n.operator;
|
|
2973
2975
|
}).reduce(function(n, s) {
|
|
2974
|
-
var
|
|
2975
|
-
return r.trimArrayDelimeters !== !1 && (
|
|
2976
|
+
var d = q.cleanKey(s.key);
|
|
2977
|
+
return r.trimArrayDelimeters !== !1 && (d = d.split("[]").join("")), n[d] = !0, n;
|
|
2976
2978
|
}, {}), a = Object.keys(t);
|
|
2977
2979
|
return a;
|
|
2978
2980
|
};
|
|
@@ -3022,8 +3024,8 @@ function Ot(e) {
|
|
|
3022
3024
|
return n.extension?.length && (n.extension.includes(".") ? s = `${s}/${n.extension}` : s = `${s}/${i}.${n.extension}`), e.api.generateEndpointURL(s, a, n);
|
|
3023
3025
|
}, r.filesize = function(i, t) {
|
|
3024
3026
|
if (i == 0) return "0 Bytes";
|
|
3025
|
-
var a = 1024, n = t || 2, s = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"],
|
|
3026
|
-
return parseFloat((i / Math.pow(a,
|
|
3027
|
+
var a = 1024, n = t || 2, s = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], d = Math.floor(Math.log(i) / Math.log(a));
|
|
3028
|
+
return parseFloat((i / Math.pow(a, d)).toFixed(n)) + " " + s[d];
|
|
3027
3029
|
}, r.getBinaryTypeFromMime = function(i) {
|
|
3028
3030
|
if (!i)
|
|
3029
3031
|
return "file";
|
|
@@ -3066,8 +3068,12 @@ function Ot(e) {
|
|
|
3066
3068
|
var Ue = {}, Ct = {
|
|
3067
3069
|
///////////////////////////////////////////////////
|
|
3068
3070
|
/**
|
|
3069
|
-
*
|
|
3070
|
-
*
|
|
3071
|
+
* Empties every cache created with sdk.cache.get (the caches themselves stay available, just empty).
|
|
3072
|
+
* sdk.auth.logout() and sdk.auth.changeOrganisation() call this for you.
|
|
3073
|
+
* @alias cache.reset
|
|
3074
|
+
* @returns {undefined}
|
|
3075
|
+
* @example
|
|
3076
|
+
* sdk.cache.reset();
|
|
3071
3077
|
*/
|
|
3072
3078
|
reset() {
|
|
3073
3079
|
Object.entries(Ue).forEach(([e, r]) => {
|
|
@@ -3076,10 +3082,21 @@ var Ue = {}, Ct = {
|
|
|
3076
3082
|
},
|
|
3077
3083
|
///////////////////////////////////////////////////
|
|
3078
3084
|
/**
|
|
3079
|
-
*
|
|
3080
|
-
*
|
|
3081
|
-
* @
|
|
3082
|
-
* @
|
|
3085
|
+
* Returns the cache with this name, creating it the first time. Later calls with the same name return the
|
|
3086
|
+
* same cache, whatever options they pass.
|
|
3087
|
+
* @alias cache.get
|
|
3088
|
+
* @param {String} key The cache's name.
|
|
3089
|
+
* @param {Object} [options] lru-cache options, used only when the cache is created. Default { max: 5 } (five entries).
|
|
3090
|
+
* @param {Number} [options.max] Maximum number of entries.
|
|
3091
|
+
* @param {Number} [options.ttl] Milliseconds before an entry expires.
|
|
3092
|
+
* @returns {LRUCache} An lru-cache instance: get(key), set(key, value), has(key), delete(key), clear().
|
|
3093
|
+
* @example
|
|
3094
|
+
* const cache = sdk.cache.get('people', { max: 500, ttl: 60000 });
|
|
3095
|
+
* let person = cache.get(id);
|
|
3096
|
+
* if (!person) {
|
|
3097
|
+
* person = await sdk.content.get(id);
|
|
3098
|
+
* cache.set(id, person);
|
|
3099
|
+
* }
|
|
3083
3100
|
*/
|
|
3084
3101
|
get(e, r) {
|
|
3085
3102
|
return r = r || { max: 5 }, Ue[e] || (Ue[e] = new qr(r)), Ue[e];
|
|
@@ -3102,9 +3119,9 @@ var Ue = {}, Ct = {
|
|
|
3102
3119
|
}, r.getAllDescendants = function(a) {
|
|
3103
3120
|
var n = /* @__PURE__ */ new Set();
|
|
3104
3121
|
s(a);
|
|
3105
|
-
function s(
|
|
3106
|
-
var c = e.utils.id(
|
|
3107
|
-
n.add(c), (
|
|
3122
|
+
function s(d) {
|
|
3123
|
+
var c = e.utils.id(d);
|
|
3124
|
+
n.add(c), (d.children || []).forEach(function(p) {
|
|
3108
3125
|
s(p);
|
|
3109
3126
|
});
|
|
3110
3127
|
}
|
|
@@ -3116,127 +3133,127 @@ var Ue = {}, Ct = {
|
|
|
3116
3133
|
if (n && t && t.key === n && Date.now() - t.at < i)
|
|
3117
3134
|
return t.value;
|
|
3118
3135
|
var s = /* @__PURE__ */ new Map();
|
|
3119
|
-
for (var
|
|
3120
|
-
var c = a?.permissions[
|
|
3121
|
-
(c.permissions || []).forEach(function(
|
|
3122
|
-
var u = s.get(
|
|
3123
|
-
u || (u = /* @__PURE__ */ new Set(), s.set(
|
|
3136
|
+
for (var d in a?.permissions || {}) {
|
|
3137
|
+
var c = a?.permissions[d], p = r.getAllDescendants(c);
|
|
3138
|
+
(c.permissions || []).forEach(function(g) {
|
|
3139
|
+
var u = s.get(g);
|
|
3140
|
+
u || (u = /* @__PURE__ */ new Set(), s.set(g, u));
|
|
3124
3141
|
for (var o = 0; o < p.length; o++)
|
|
3125
3142
|
u.add(p[o]);
|
|
3126
3143
|
});
|
|
3127
3144
|
}
|
|
3128
|
-
var
|
|
3129
|
-
return s.forEach(function(
|
|
3130
|
-
|
|
3131
|
-
}), n && (t = { key: n, value:
|
|
3145
|
+
var S = {};
|
|
3146
|
+
return s.forEach(function(g, u) {
|
|
3147
|
+
S[u] = Array.from(g);
|
|
3148
|
+
}), n && (t = { key: n, value: S, at: Date.now() }), S;
|
|
3132
3149
|
}, r.allUserScopes = function(a) {
|
|
3133
3150
|
var n = {}, s = a?.permissions || {};
|
|
3134
|
-
function
|
|
3151
|
+
function d(p) {
|
|
3135
3152
|
if (p) {
|
|
3136
|
-
var
|
|
3137
|
-
|
|
3138
|
-
|
|
3153
|
+
var S = e.utils.id(p);
|
|
3154
|
+
S && (n[S] = 1, p.children && p.children.length && p.children.forEach(function(g) {
|
|
3155
|
+
d(g);
|
|
3139
3156
|
}));
|
|
3140
3157
|
}
|
|
3141
3158
|
}
|
|
3142
3159
|
for (var c in s)
|
|
3143
|
-
|
|
3160
|
+
d(s[c]);
|
|
3144
3161
|
return Object.keys(n);
|
|
3145
|
-
}, r.actionableScopes = function(a, n, s,
|
|
3162
|
+
}, r.actionableScopes = function(a, n, s, d, c) {
|
|
3146
3163
|
c = c || {};
|
|
3147
3164
|
var p = [];
|
|
3148
3165
|
if (a?.userType == "administrator")
|
|
3149
3166
|
p = r.allUserScopes(a, c);
|
|
3150
3167
|
else {
|
|
3151
|
-
var
|
|
3152
|
-
if (!
|
|
3168
|
+
var S = r.hashPermissions(a), g = s || d;
|
|
3169
|
+
if (!g)
|
|
3153
3170
|
return p;
|
|
3154
|
-
let u = s ?
|
|
3171
|
+
let u = s ? S[`${s}.${n}`] || [] : [], o = d ? S[`${d}.${n}`] || [] : [];
|
|
3155
3172
|
p = [...u, ...o];
|
|
3156
3173
|
}
|
|
3157
3174
|
return p || [];
|
|
3158
3175
|
}, r.isOwner = function(a, n) {
|
|
3159
|
-
var s = e.utils.id(a),
|
|
3176
|
+
var s = e.utils.id(a), d = e.utils.id(a?.persona), c = n.meta;
|
|
3160
3177
|
if (!c)
|
|
3161
3178
|
return !1;
|
|
3162
|
-
var p = c.userOwners || [],
|
|
3163
|
-
if (
|
|
3179
|
+
var p = c.userOwners || [], S = e.utils.ids([...p, c.userAuthor]), g = e.utils.hash(S);
|
|
3180
|
+
if (g[s])
|
|
3164
3181
|
return !0;
|
|
3165
3182
|
var u = c.personaOwners || [], o = e.utils.ids([
|
|
3166
3183
|
...u,
|
|
3167
3184
|
c.personaAuthor
|
|
3168
|
-
]),
|
|
3169
|
-
return
|
|
3185
|
+
]), f = e.utils.hash(o);
|
|
3186
|
+
return f[d] ? !0 : r.isAssignee(a, n);
|
|
3170
3187
|
}, r.isAssignee = function(a, n) {
|
|
3171
3188
|
const s = e.utils.ids(a?.profiles);
|
|
3172
3189
|
if (!s.length)
|
|
3173
3190
|
return !1;
|
|
3174
|
-
const
|
|
3175
|
-
if (!
|
|
3191
|
+
const d = e.utils.ids(n.assignees);
|
|
3192
|
+
if (!d.length)
|
|
3176
3193
|
return !1;
|
|
3177
|
-
const c = new Set(
|
|
3178
|
-
return !!s.filter((
|
|
3194
|
+
const c = new Set(d);
|
|
3195
|
+
return !!s.filter((g) => c.has(g)).length;
|
|
3179
3196
|
}, r.allPermissions = function(a) {
|
|
3180
3197
|
var n = Object.values(a?.permissions || {}).map(function(s) {
|
|
3181
3198
|
return s.permissions;
|
|
3182
3199
|
}).flat();
|
|
3183
3200
|
return n;
|
|
3184
3201
|
}, r.allPermissionTypes = function(a, n) {
|
|
3185
|
-
return n ? r.allPermissions(a).reduce(function(s,
|
|
3186
|
-
var c =
|
|
3202
|
+
return n ? r.allPermissions(a).reduce(function(s, d) {
|
|
3203
|
+
var c = d.split(".")[0];
|
|
3187
3204
|
return s[c] = !0, s;
|
|
3188
3205
|
}, {}) : r.allPermissions(a).map(function(s) {
|
|
3189
3206
|
return s.split(".")[0];
|
|
3190
3207
|
});
|
|
3191
3208
|
}, r.canKnowOf = function(a, n, s) {
|
|
3192
3209
|
return s = s || {}, s.cache = s.cache || {}, r.allPermissionTypes(a, !0)[n];
|
|
3193
|
-
}, r.checkActionAccess = function(a, n, s,
|
|
3210
|
+
}, r.checkActionAccess = function(a, n, s, d, c) {
|
|
3194
3211
|
if (c = c || {}, c.cache = c.cache || {}, r.isAdministrator(a))
|
|
3195
3212
|
return !0;
|
|
3196
|
-
var p = n.meta?.type,
|
|
3197
|
-
if (!
|
|
3213
|
+
var p = n.meta?.type, S = n.meta?.definition || p;
|
|
3214
|
+
if (!S)
|
|
3198
3215
|
return !1;
|
|
3199
|
-
if ((s == "listany" ||
|
|
3200
|
-
var
|
|
3201
|
-
return !!a.permissions[
|
|
3216
|
+
if ((s == "listany" || d == "listown") && p === "scope") {
|
|
3217
|
+
var g = e.utils.id(n);
|
|
3218
|
+
return !!a.permissions[g];
|
|
3202
3219
|
}
|
|
3203
3220
|
var u = e.utils.ids(n.meta.scopes || []);
|
|
3204
3221
|
p === "scope" && (u = [
|
|
3205
3222
|
...e.utils.ids(n.path || []),
|
|
3206
3223
|
e.utils.id(n)
|
|
3207
3224
|
]);
|
|
3208
|
-
var o,
|
|
3209
|
-
if (c.cache[
|
|
3210
|
-
o = c.cache[
|
|
3225
|
+
var o, f = `access-${a?.cacheKey}-${s}-${S}-${p}`;
|
|
3226
|
+
if (c.cache[f])
|
|
3227
|
+
o = c.cache[f];
|
|
3211
3228
|
else {
|
|
3212
|
-
var
|
|
3213
|
-
r.actionableScopes(a, s,
|
|
3229
|
+
var w = e.utils.ids(
|
|
3230
|
+
r.actionableScopes(a, s, S, p, c)
|
|
3214
3231
|
);
|
|
3215
|
-
o = e.utils.hash(
|
|
3232
|
+
o = e.utils.hash(w), c.cache[f] = o;
|
|
3216
3233
|
}
|
|
3217
3234
|
if (o) {
|
|
3218
|
-
var
|
|
3219
|
-
return o[
|
|
3235
|
+
var m = u.some(function(k) {
|
|
3236
|
+
return o[k];
|
|
3220
3237
|
});
|
|
3221
|
-
if (
|
|
3238
|
+
if (m)
|
|
3222
3239
|
return !0;
|
|
3223
3240
|
}
|
|
3224
3241
|
var l = r.isOwner(a, n);
|
|
3225
3242
|
if (l) {
|
|
3226
|
-
var v,
|
|
3227
|
-
if (c.cache[
|
|
3228
|
-
v = c.cache[
|
|
3243
|
+
var v, b = `access-${a?.cacheKey}-${d}-${S}-${p}`;
|
|
3244
|
+
if (c.cache[b])
|
|
3245
|
+
v = c.cache[b];
|
|
3229
3246
|
else {
|
|
3230
3247
|
var O = e.utils.ids(
|
|
3231
|
-
r.actionableScopes(a,
|
|
3248
|
+
r.actionableScopes(a, d, S, p, c)
|
|
3232
3249
|
);
|
|
3233
|
-
v = e.utils.hash(O), c.cache[
|
|
3250
|
+
v = e.utils.hash(O), c.cache[b] = v;
|
|
3234
3251
|
}
|
|
3235
3252
|
if (v) {
|
|
3236
|
-
var
|
|
3237
|
-
return v[
|
|
3253
|
+
var P = u.some(function(k) {
|
|
3254
|
+
return v[k];
|
|
3238
3255
|
});
|
|
3239
|
-
if (
|
|
3256
|
+
if (P)
|
|
3240
3257
|
return !0;
|
|
3241
3258
|
}
|
|
3242
3259
|
}
|
|
@@ -3246,8 +3263,8 @@ var Ue = {}, Ct = {
|
|
|
3246
3263
|
return !0;
|
|
3247
3264
|
var s = r.hashPermissions(a);
|
|
3248
3265
|
return s[n];
|
|
3249
|
-
}, r.canCreate = function(a, n, s,
|
|
3250
|
-
if (
|
|
3266
|
+
}, r.canCreate = function(a, n, s, d) {
|
|
3267
|
+
if (d = d || {}, d.cache = d.cache || {}, r.isAdministrator(a))
|
|
3251
3268
|
return !0;
|
|
3252
3269
|
var c = r.actionableScopes(
|
|
3253
3270
|
a,
|
|
@@ -3258,40 +3275,40 @@ var Ue = {}, Ct = {
|
|
|
3258
3275
|
return c.length;
|
|
3259
3276
|
}, r.canListItem = function(a, n, s) {
|
|
3260
3277
|
s = s || {}, s.cache = s.cache || {};
|
|
3261
|
-
var
|
|
3278
|
+
var d = r.checkActionAccess(
|
|
3262
3279
|
a,
|
|
3263
3280
|
n,
|
|
3264
3281
|
"listany",
|
|
3265
3282
|
"listown",
|
|
3266
3283
|
s
|
|
3267
3284
|
);
|
|
3268
|
-
if (
|
|
3285
|
+
if (d)
|
|
3269
3286
|
return !0;
|
|
3270
3287
|
var c = r.canViewItem(a, n, s);
|
|
3271
3288
|
return !!c;
|
|
3272
3289
|
}, r.canViewItem = function(a, n, s) {
|
|
3273
3290
|
s = s || {}, s.cache = s.cache || {};
|
|
3274
|
-
var
|
|
3291
|
+
var d = r.checkActionAccess(
|
|
3275
3292
|
a,
|
|
3276
3293
|
n,
|
|
3277
3294
|
"viewany",
|
|
3278
|
-
"
|
|
3295
|
+
"viewown",
|
|
3279
3296
|
s
|
|
3280
3297
|
);
|
|
3281
|
-
if (
|
|
3298
|
+
if (d)
|
|
3282
3299
|
return !0;
|
|
3283
3300
|
var c = r.canEditItem(a, n, s);
|
|
3284
3301
|
return !!c;
|
|
3285
3302
|
}, r.canEditItem = function(a, n, s) {
|
|
3286
3303
|
s = s || {}, s.cache = s.cache || {};
|
|
3287
|
-
var
|
|
3304
|
+
var d = r.checkActionAccess(
|
|
3288
3305
|
a,
|
|
3289
3306
|
n,
|
|
3290
3307
|
"editany",
|
|
3291
3308
|
"editown",
|
|
3292
3309
|
s
|
|
3293
3310
|
);
|
|
3294
|
-
return
|
|
3311
|
+
return d;
|
|
3295
3312
|
}, r.canDeleteItem = function(a, n, s) {
|
|
3296
3313
|
return s = s || {}, s.cache = s.cache || {}, r.checkActionAccess(
|
|
3297
3314
|
a,
|
|
@@ -3318,7 +3335,7 @@ var Ue = {}, Ct = {
|
|
|
3318
3335
|
);
|
|
3319
3336
|
}, r;
|
|
3320
3337
|
};
|
|
3321
|
-
function
|
|
3338
|
+
function Tt(e) {
|
|
3322
3339
|
if (!e.api)
|
|
3323
3340
|
throw new Error("Can't Instantiate QikContent before QikAPI exists");
|
|
3324
3341
|
var r = {
|
|
@@ -3329,16 +3346,16 @@ function It(e) {
|
|
|
3329
3346
|
let t;
|
|
3330
3347
|
r.variables = async function(u, o) {
|
|
3331
3348
|
o = o || {}, u = u || [];
|
|
3332
|
-
var
|
|
3333
|
-
if (
|
|
3349
|
+
var f = o.refresh || o.reload || !i.data;
|
|
3350
|
+
if (f) {
|
|
3334
3351
|
if (!t) {
|
|
3335
|
-
let
|
|
3352
|
+
let m = function() {
|
|
3336
3353
|
t = null;
|
|
3337
3354
|
};
|
|
3338
|
-
t = e.api.post("/variables", { keys: u }), t.then(
|
|
3355
|
+
t = e.api.post("/variables", { keys: u }), t.then(m, m);
|
|
3339
3356
|
}
|
|
3340
|
-
const { data:
|
|
3341
|
-
i.data =
|
|
3357
|
+
const { data: w } = await t;
|
|
3358
|
+
i.data = w, e.dispatch("variables", w);
|
|
3342
3359
|
}
|
|
3343
3360
|
return i.data;
|
|
3344
3361
|
};
|
|
@@ -3349,41 +3366,41 @@ function It(e) {
|
|
|
3349
3366
|
typeof requestIdleCallback == "function" ? requestIdleCallback(u, { timeout: 50 }) : setTimeout(u, 0);
|
|
3350
3367
|
});
|
|
3351
3368
|
}
|
|
3352
|
-
async function
|
|
3353
|
-
function
|
|
3369
|
+
async function d({ _s: u, _k: o, types: f }) {
|
|
3370
|
+
function w(v) {
|
|
3354
3371
|
if (typeof v == "string" && v[0] === "~")
|
|
3355
3372
|
return u[parseInt(v.slice(1))];
|
|
3356
|
-
if (Array.isArray(v)) return v.map(
|
|
3373
|
+
if (Array.isArray(v)) return v.map(w);
|
|
3357
3374
|
if (v && typeof v == "object") {
|
|
3358
|
-
const
|
|
3359
|
-
for (const [O,
|
|
3360
|
-
|
|
3361
|
-
return
|
|
3375
|
+
const b = {};
|
|
3376
|
+
for (const [O, P] of Object.entries(v))
|
|
3377
|
+
b[o[O] || O] = w(P);
|
|
3378
|
+
return b;
|
|
3362
3379
|
}
|
|
3363
3380
|
return v;
|
|
3364
3381
|
}
|
|
3365
|
-
const
|
|
3366
|
-
for (let v = 0; v <
|
|
3367
|
-
const
|
|
3368
|
-
l.push(...
|
|
3382
|
+
const m = 50, l = [];
|
|
3383
|
+
for (let v = 0; v < f.length; v += m) {
|
|
3384
|
+
const b = f.slice(v, v + m);
|
|
3385
|
+
l.push(...b.map(w)), v + m < f.length && await s();
|
|
3369
3386
|
}
|
|
3370
3387
|
return l;
|
|
3371
3388
|
}
|
|
3372
3389
|
r.glossary = async function(u) {
|
|
3373
3390
|
u = u || {};
|
|
3374
|
-
let o = a.get("glossary"),
|
|
3375
|
-
var
|
|
3376
|
-
if (
|
|
3391
|
+
let o = a.get("glossary"), w = !!!u.uncompressed;
|
|
3392
|
+
var m = u.refresh || u.reload || !o;
|
|
3393
|
+
if (m) {
|
|
3377
3394
|
if (!n) {
|
|
3378
|
-
let
|
|
3395
|
+
let P = function() {
|
|
3379
3396
|
n = null, r.loadingGlossary = !1;
|
|
3380
3397
|
};
|
|
3381
3398
|
r.loadingGlossary = !0;
|
|
3382
|
-
const O =
|
|
3383
|
-
n = e.api.get(O, { cache: !1 }), n.then(
|
|
3399
|
+
const O = w ? "/glossary/compressed" : "/glossary";
|
|
3400
|
+
n = e.api.get(O, { cache: !1 }), n.then(P, P);
|
|
3384
3401
|
}
|
|
3385
|
-
const { data: v } = await n,
|
|
3386
|
-
a.set("glossary",
|
|
3402
|
+
const { data: v } = await n, b = v._s && v._k && v.types ? await d(v) : v;
|
|
3403
|
+
a.set("glossary", b), o = b, e.dispatch("glossary", b);
|
|
3387
3404
|
}
|
|
3388
3405
|
if (u.hash) {
|
|
3389
3406
|
var l = e.utils.hash(o, "key");
|
|
@@ -3402,171 +3419,171 @@ function It(e) {
|
|
|
3402
3419
|
var o = u.refresh || u.reload || !c.data;
|
|
3403
3420
|
if (o) {
|
|
3404
3421
|
if (!p) {
|
|
3405
|
-
let
|
|
3422
|
+
let m = function() {
|
|
3406
3423
|
p = null;
|
|
3407
3424
|
};
|
|
3408
3425
|
p = e.api.get("/scope/glossary", {
|
|
3409
3426
|
cache: !1
|
|
3410
|
-
}), p.then(
|
|
3427
|
+
}), p.then(m, m);
|
|
3411
3428
|
}
|
|
3412
|
-
const { data:
|
|
3413
|
-
c.data =
|
|
3429
|
+
const { data: w } = await p;
|
|
3430
|
+
c.data = w;
|
|
3414
3431
|
}
|
|
3415
3432
|
if (u.hash) {
|
|
3416
|
-
var
|
|
3417
|
-
return
|
|
3433
|
+
var f = e.utils.hash(c.data, "_id");
|
|
3434
|
+
return f;
|
|
3418
3435
|
}
|
|
3419
3436
|
return c.data;
|
|
3420
3437
|
};
|
|
3421
|
-
const
|
|
3438
|
+
const S = {};
|
|
3422
3439
|
r.comparators = async function(u) {
|
|
3423
3440
|
u = u || {};
|
|
3424
|
-
var o = u.reload || u.refresh || !
|
|
3441
|
+
var o = u.reload || u.refresh || !S.data;
|
|
3425
3442
|
if (o) {
|
|
3426
|
-
const { data:
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
return
|
|
3443
|
+
const { data: f } = await e.api.get("/system/comparators");
|
|
3444
|
+
f.available = {}, Object.entries(f.types).forEach(([w, m]) => {
|
|
3445
|
+
f.available[w] = m.map(function(l) {
|
|
3446
|
+
return f.hash[l];
|
|
3430
3447
|
});
|
|
3431
|
-
}),
|
|
3448
|
+
}), S.data = f;
|
|
3432
3449
|
}
|
|
3433
|
-
return
|
|
3450
|
+
return S.data;
|
|
3434
3451
|
};
|
|
3435
|
-
function
|
|
3436
|
-
var { minimum: o, maximum:
|
|
3437
|
-
return o = e.utils.parseInt(o), o = Math.max(o, 0),
|
|
3438
|
-
}
|
|
3439
|
-
return r.meetsValidationRequirements = function(u, o,
|
|
3440
|
-
if (
|
|
3441
|
-
var
|
|
3442
|
-
if (
|
|
3443
|
-
return `Must be at least ${
|
|
3452
|
+
function g(u) {
|
|
3453
|
+
var { minimum: o, maximum: f } = u;
|
|
3454
|
+
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 };
|
|
3455
|
+
}
|
|
3456
|
+
return r.meetsValidationRequirements = function(u, o, f) {
|
|
3457
|
+
if (f.minLength) {
|
|
3458
|
+
var w = String(u).length;
|
|
3459
|
+
if (w < f.minLength)
|
|
3460
|
+
return `Must be at least ${f.minLength} characters`;
|
|
3444
3461
|
}
|
|
3445
|
-
if (
|
|
3446
|
-
var
|
|
3447
|
-
if (
|
|
3448
|
-
return `Can be no more than ${
|
|
3462
|
+
if (f.maxLength) {
|
|
3463
|
+
var w = String(u).length;
|
|
3464
|
+
if (w > f.maxLength)
|
|
3465
|
+
return `Can be no more than ${f.maxLength} characters`;
|
|
3449
3466
|
}
|
|
3450
|
-
if (
|
|
3451
|
-
var
|
|
3452
|
-
if (
|
|
3453
|
-
return `Must be at least ${
|
|
3467
|
+
if (f.minValue && u !== void 0) {
|
|
3468
|
+
var m = Number(u);
|
|
3469
|
+
if (m < f.minValue)
|
|
3470
|
+
return `Must be at least ${f.minValue}`;
|
|
3454
3471
|
}
|
|
3455
|
-
if (
|
|
3456
|
-
var
|
|
3457
|
-
if (
|
|
3458
|
-
return `Can be no greater than ${
|
|
3472
|
+
if (f.maxValue && u !== void 0) {
|
|
3473
|
+
var m = Number(u);
|
|
3474
|
+
if (m > f.maxValue)
|
|
3475
|
+
return `Can be no greater than ${f.maxValue}`;
|
|
3459
3476
|
}
|
|
3460
|
-
}, r.validateField = function(u, o,
|
|
3461
|
-
|
|
3462
|
-
var
|
|
3463
|
-
if (o.type === "boolean" && u !== !0 && (
|
|
3464
|
-
if (!
|
|
3477
|
+
}, r.validateField = function(u, o, f) {
|
|
3478
|
+
f = f || {};
|
|
3479
|
+
var w = o.type || "string", { minimum: m, maximum: l } = g(o), v = o.type == "group" && o.asObject, b = v ? m === l && l === 1 : l === 1, O = !b, P = e.utils.exists(u);
|
|
3480
|
+
if (o.type === "boolean" && u !== !0 && (P = !1), m) {
|
|
3481
|
+
if (!P)
|
|
3465
3482
|
return {
|
|
3466
3483
|
valid: !1,
|
|
3467
3484
|
message: `${o.title} is a required field`,
|
|
3468
3485
|
status: 400
|
|
3469
3486
|
};
|
|
3470
|
-
} else if (!
|
|
3487
|
+
} else if (!P)
|
|
3471
3488
|
return {
|
|
3472
3489
|
valid: !0
|
|
3473
3490
|
};
|
|
3474
3491
|
if (O) {
|
|
3475
3492
|
if (!Array.isArray(u))
|
|
3476
|
-
return
|
|
3493
|
+
return m ? {
|
|
3477
3494
|
valid: !1,
|
|
3478
|
-
message: `${o.title} requires at least ${
|
|
3495
|
+
message: `${o.title} requires at least ${m} values`,
|
|
3479
3496
|
status: 400
|
|
3480
3497
|
} : (console.log("NOT PROVIDED AS ARRAY", o.title, u), {
|
|
3481
3498
|
valid: !1,
|
|
3482
3499
|
message: `${o.title} must be provided as an array`,
|
|
3483
3500
|
status: 400
|
|
3484
3501
|
});
|
|
3485
|
-
var
|
|
3486
|
-
if (
|
|
3487
|
-
var
|
|
3488
|
-
return !
|
|
3489
|
-
}),
|
|
3502
|
+
var k = u;
|
|
3503
|
+
if (k = k.filter(function(I) {
|
|
3504
|
+
var N = I == null || I === "";
|
|
3505
|
+
return !N;
|
|
3506
|
+
}), m == l && m && k.length != m)
|
|
3490
3507
|
return {
|
|
3491
3508
|
valid: !1,
|
|
3492
3509
|
message: `${o.title} requires exactly ${l} values`,
|
|
3493
3510
|
status: 400
|
|
3494
3511
|
};
|
|
3495
|
-
if (l &&
|
|
3512
|
+
if (l && k.length > l)
|
|
3496
3513
|
return {
|
|
3497
3514
|
valid: !1,
|
|
3498
3515
|
message: `${o.title} requires less than ${l + 1} values`,
|
|
3499
3516
|
status: 400
|
|
3500
3517
|
};
|
|
3501
|
-
if (
|
|
3518
|
+
if (k.length < m)
|
|
3502
3519
|
return {
|
|
3503
3520
|
valid: !1,
|
|
3504
|
-
message: `${o.title} requires at least ${
|
|
3521
|
+
message: `${o.title} requires at least ${m} values`,
|
|
3505
3522
|
status: 400
|
|
3506
3523
|
};
|
|
3507
|
-
var
|
|
3508
|
-
if (
|
|
3509
|
-
var
|
|
3510
|
-
o.type === "group" && (
|
|
3511
|
-
var
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3524
|
+
var L;
|
|
3525
|
+
if (k.find(function(I) {
|
|
3526
|
+
var N = w;
|
|
3527
|
+
o.type === "group" && (N = "object"), o.type === "reference" && o.widget === "form" && (N = "object");
|
|
3528
|
+
var $ = e.utils.isValidValue(
|
|
3529
|
+
I,
|
|
3530
|
+
N,
|
|
3531
|
+
f.strict
|
|
3515
3532
|
);
|
|
3516
|
-
if (
|
|
3517
|
-
return
|
|
3533
|
+
if (!$)
|
|
3534
|
+
return L = !0, !0;
|
|
3518
3535
|
if (o.validation) {
|
|
3519
3536
|
var z = r.meetsValidationRequirements(
|
|
3520
|
-
|
|
3521
|
-
|
|
3537
|
+
I,
|
|
3538
|
+
w,
|
|
3522
3539
|
o.validation
|
|
3523
3540
|
);
|
|
3524
3541
|
if (z)
|
|
3525
|
-
return
|
|
3542
|
+
return L = !0, !0;
|
|
3526
3543
|
}
|
|
3527
|
-
}),
|
|
3544
|
+
}), L)
|
|
3528
3545
|
return {
|
|
3529
3546
|
valid: !1,
|
|
3530
3547
|
message: `Invalid input for ${o.title}`,
|
|
3531
3548
|
status: 400
|
|
3532
3549
|
};
|
|
3533
3550
|
} else {
|
|
3534
|
-
var
|
|
3535
|
-
|
|
3536
|
-
var
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3551
|
+
var R = w, j = o.widget;
|
|
3552
|
+
R === "group" && (R = "object"), R === "reference" && j === "form" && (R = "object");
|
|
3553
|
+
var U = r.getCleanedValue(u, R, f), x = e.utils.isValidValue(
|
|
3554
|
+
U,
|
|
3555
|
+
R,
|
|
3556
|
+
f.strict
|
|
3540
3557
|
);
|
|
3541
|
-
if (!
|
|
3558
|
+
if (!x)
|
|
3542
3559
|
return {
|
|
3543
3560
|
valid: !1,
|
|
3544
|
-
message: `Single value '${u}' is not a valid ${
|
|
3561
|
+
message: `Single value '${u}' is not a valid ${R} for ${o.title}`,
|
|
3545
3562
|
criteria: {
|
|
3546
|
-
isValidValue:
|
|
3547
|
-
cleanedValue:
|
|
3548
|
-
fieldType:
|
|
3549
|
-
options:
|
|
3563
|
+
isValidValue: x,
|
|
3564
|
+
cleanedValue: U,
|
|
3565
|
+
fieldType: w,
|
|
3566
|
+
options: f
|
|
3550
3567
|
},
|
|
3551
3568
|
status: 400
|
|
3552
3569
|
};
|
|
3553
|
-
let
|
|
3554
|
-
const
|
|
3555
|
-
if (String(o.minValue) && (
|
|
3556
|
-
const
|
|
3570
|
+
let I = !1;
|
|
3571
|
+
const N = {};
|
|
3572
|
+
if (String(o.minValue) && (N.minValue = parseInt(o.minValue), I = !0), String(o.maxValue) && (N.maxValue = parseInt(o.maxValue), I = !0), String(o.minLength) && (N.minLength = parseInt(o.minLength), I = !0), String(o.maxLength) && (N.maxLength = parseInt(o.maxLength), I = !0), I) {
|
|
3573
|
+
const $ = Object.assign(
|
|
3557
3574
|
{},
|
|
3558
|
-
|
|
3575
|
+
N,
|
|
3559
3576
|
o.validation || {}
|
|
3560
3577
|
);
|
|
3561
|
-
var
|
|
3578
|
+
var T = r.meetsValidationRequirements(
|
|
3562
3579
|
u,
|
|
3563
|
-
|
|
3564
|
-
|
|
3580
|
+
w,
|
|
3581
|
+
$
|
|
3565
3582
|
);
|
|
3566
|
-
if (
|
|
3583
|
+
if (T)
|
|
3567
3584
|
return {
|
|
3568
3585
|
valid: !1,
|
|
3569
|
-
message:
|
|
3586
|
+
message: T,
|
|
3570
3587
|
status: 400
|
|
3571
3588
|
};
|
|
3572
3589
|
}
|
|
@@ -3574,8 +3591,8 @@ function It(e) {
|
|
|
3574
3591
|
return {
|
|
3575
3592
|
valid: !0
|
|
3576
3593
|
};
|
|
3577
|
-
}, r.getCleanedValue = function(u, o,
|
|
3578
|
-
switch (o) {
|
|
3594
|
+
}, r.getCleanedValue = function(u, o, f) {
|
|
3595
|
+
switch (f = f || {}, o) {
|
|
3579
3596
|
case "number":
|
|
3580
3597
|
case "float":
|
|
3581
3598
|
case "decimal":
|
|
@@ -3585,66 +3602,75 @@ function It(e) {
|
|
|
3585
3602
|
case "boolean":
|
|
3586
3603
|
return e.utils.exists(u) ? e.utils.parseBoolean(u) : void 0;
|
|
3587
3604
|
case "email":
|
|
3588
|
-
return
|
|
3605
|
+
return f.strict ? u : String(u).toLowerCase();
|
|
3589
3606
|
case "reference":
|
|
3590
|
-
return
|
|
3607
|
+
return f.strict ? u : e.utils.id(u);
|
|
3591
3608
|
default:
|
|
3592
|
-
return
|
|
3609
|
+
return f.strict ? u : e.utils.cleanValue(u, o, f);
|
|
3593
3610
|
}
|
|
3594
3611
|
return u;
|
|
3595
|
-
}, r.list = async function(u, o,
|
|
3596
|
-
|
|
3597
|
-
const
|
|
3598
|
-
if (
|
|
3599
|
-
|
|
3612
|
+
}, r.list = async function(u, o, f) {
|
|
3613
|
+
f || (f = {});
|
|
3614
|
+
const w = f.remoteURL || `/content/${u}/list`;
|
|
3615
|
+
if (f.cancellable) {
|
|
3616
|
+
f.config || (f.config = {});
|
|
3600
3617
|
const l = e.api.CancelToken.source();
|
|
3601
|
-
return
|
|
3602
|
-
promise: e.api.post(
|
|
3603
|
-
cancel(
|
|
3604
|
-
l.cancel(
|
|
3618
|
+
return f.config.cancelToken = l.token, {
|
|
3619
|
+
promise: e.api.post(w, o, f.config),
|
|
3620
|
+
cancel(b) {
|
|
3621
|
+
l.cancel(b || "Operation canceled by the user.");
|
|
3605
3622
|
}
|
|
3606
3623
|
};
|
|
3607
3624
|
} else {
|
|
3608
|
-
const { data:
|
|
3609
|
-
return
|
|
3625
|
+
const { data: m } = await e.api.post(w, o, f.config);
|
|
3626
|
+
return m;
|
|
3610
3627
|
}
|
|
3611
3628
|
}, r.create = async function(u, o) {
|
|
3612
|
-
const
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3629
|
+
const f = { ...o };
|
|
3630
|
+
f.meta?.scopes && (f.meta = {
|
|
3631
|
+
...f.meta,
|
|
3632
|
+
scopes: e.utils.ids(f.meta.scopes)
|
|
3633
|
+
});
|
|
3634
|
+
const { data: w } = await e.api.post(`/content/${u}/create`, f);
|
|
3635
|
+
return w;
|
|
3616
3636
|
}, r.update = async function(u, o) {
|
|
3617
3637
|
u = e.utils.id(u);
|
|
3618
|
-
const
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3638
|
+
const f = { ...o };
|
|
3639
|
+
f.meta?.scopes && (f.meta = {
|
|
3640
|
+
...f.meta,
|
|
3641
|
+
scopes: e.utils.ids(f.meta.scopes)
|
|
3642
|
+
});
|
|
3643
|
+
const { data: w } = await e.api.put(`/content/${u}`, f);
|
|
3644
|
+
return w;
|
|
3622
3645
|
}, r.patch = async function(u, o) {
|
|
3623
3646
|
u = e.utils.id(u);
|
|
3624
|
-
const
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3647
|
+
const f = { ...o };
|
|
3648
|
+
f.meta?.scopes && (f.meta = {
|
|
3649
|
+
...f.meta,
|
|
3650
|
+
scopes: e.utils.ids(f.meta.scopes)
|
|
3651
|
+
});
|
|
3652
|
+
const { data: w } = await e.api.patch(`/content/${u}`, f);
|
|
3653
|
+
return w;
|
|
3628
3654
|
}, r.get = async function(u, o) {
|
|
3629
3655
|
u = e.utils.id(u), o = o || {};
|
|
3630
|
-
const { data:
|
|
3631
|
-
return
|
|
3656
|
+
const { data: f } = await e.api.get(`/content/${u}`, o);
|
|
3657
|
+
return f;
|
|
3632
3658
|
}, r.getFromID = async function(u) {
|
|
3633
3659
|
return r.get(u);
|
|
3634
3660
|
}, r.delete = async function(u, o) {
|
|
3635
3661
|
u = e.utils.id(u);
|
|
3636
|
-
const { data:
|
|
3637
|
-
return
|
|
3662
|
+
const { data: f } = await e.api.delete(`/content/${u}`, o);
|
|
3663
|
+
return f;
|
|
3638
3664
|
}, r.restore = async function(u, o) {
|
|
3639
3665
|
u = e.utils.id(u);
|
|
3640
|
-
const { data:
|
|
3641
|
-
return
|
|
3666
|
+
const { data: f } = await e.api.get(`/content/${u}/restore`, o);
|
|
3667
|
+
return f;
|
|
3642
3668
|
}, r.getFromSlug = async function(u) {
|
|
3643
3669
|
const { data: o } = await e.api.get(`/content/slug/${u}`);
|
|
3644
3670
|
return o;
|
|
3645
3671
|
}, r;
|
|
3646
3672
|
}
|
|
3647
|
-
function
|
|
3673
|
+
function Rt(e) {
|
|
3648
3674
|
var r = {}, i;
|
|
3649
3675
|
return r.countries = async function() {
|
|
3650
3676
|
return i || (i = new Promise(async function(t, a) {
|
|
@@ -3660,10 +3686,10 @@ function kt(e) {
|
|
|
3660
3686
|
return !(typeof window > "u" || !window.navigator || !window.navigator.geolocation);
|
|
3661
3687
|
}
|
|
3662
3688
|
return r.distance = function({ lat: t, lon: a }, { lat: n, lon: s }) {
|
|
3663
|
-
function f
|
|
3664
|
-
return
|
|
3689
|
+
function d(f) {
|
|
3690
|
+
return f * (Math.PI / 180);
|
|
3665
3691
|
}
|
|
3666
|
-
var c = 6371e3, p =
|
|
3692
|
+
var c = 6371e3, p = d(n - t), S = d(s - a), g = Math.sin(p / 2) * Math.sin(p / 2) + Math.cos(d(t)) * Math.cos(d(n)) * Math.sin(S / 2) * Math.sin(S / 2), u = 2 * Math.atan2(Math.sqrt(g), Math.sqrt(1 - g)), o = c * u;
|
|
3667
3693
|
return o;
|
|
3668
3694
|
}, r.getPosition = async function() {
|
|
3669
3695
|
return i() ? (console.log("qik:geo: getting location"), new Promise(function(t, a) {
|
|
@@ -3677,9 +3703,9 @@ function kt(e) {
|
|
|
3677
3703
|
});
|
|
3678
3704
|
})) : Promise.reject({ message: "Geolocation is not enabled" });
|
|
3679
3705
|
}, r.stopWatchPosition = async function(t) {
|
|
3680
|
-
return i() ? (console.log("qik:geo: watch stopped"), navigator.geolocation.clearWatch(
|
|
3706
|
+
return i() ? (console.log("qik:geo: watch stopped"), navigator.geolocation.clearWatch(t), !0) : Promise.reject({ message: "Geolocation is not enabled" });
|
|
3681
3707
|
}, r.getDefaultTimezone = function() {
|
|
3682
|
-
const
|
|
3708
|
+
const t = e.auth.getCurrentUser()?.session;
|
|
3683
3709
|
if (t) {
|
|
3684
3710
|
const a = t?.organisation?.timezone;
|
|
3685
3711
|
if (a)
|
|
@@ -4384,7 +4410,7 @@ function kt(e) {
|
|
|
4384
4410
|
"Pacific/Wake",
|
|
4385
4411
|
"Pacific/Wallis"
|
|
4386
4412
|
], r.getDefaultCountry = function() {
|
|
4387
|
-
const
|
|
4413
|
+
const t = e.auth.getCurrentUser()?.session;
|
|
4388
4414
|
if (t) {
|
|
4389
4415
|
const a = t?.organisation?.countryCode;
|
|
4390
4416
|
if (a) {
|
|
@@ -4397,7 +4423,7 @@ function kt(e) {
|
|
|
4397
4423
|
}
|
|
4398
4424
|
}, r;
|
|
4399
4425
|
}
|
|
4400
|
-
const
|
|
4426
|
+
const It = function(e, r) {
|
|
4401
4427
|
if (r = r || "production", !e.auth)
|
|
4402
4428
|
throw new Error("Can't Instantiate QikSocket before QikAuth exists");
|
|
4403
4429
|
const i = e.utils.guid();
|
|
@@ -4407,64 +4433,84 @@ const Rt = function(e, r) {
|
|
|
4407
4433
|
connected: !1,
|
|
4408
4434
|
windowID: i,
|
|
4409
4435
|
autoreconnect: !0
|
|
4410
|
-
}, a, n = {};
|
|
4411
|
-
const
|
|
4412
|
-
f.bootstrap(t), t.channel = async function(
|
|
4413
|
-
if (
|
|
4414
|
-
return
|
|
4415
|
-
const
|
|
4416
|
-
function
|
|
4417
|
-
|
|
4436
|
+
}, a, n, s, d = 0, c = [], p = !1, S = {};
|
|
4437
|
+
const g = {}, u = 1e3, o = 3e4, f = new De();
|
|
4438
|
+
f.bootstrap(t), t.channel = async function(x) {
|
|
4439
|
+
if (S[x])
|
|
4440
|
+
return S[x];
|
|
4441
|
+
const T = new De();
|
|
4442
|
+
function I(N) {
|
|
4443
|
+
T.dispatch("message", N);
|
|
4418
4444
|
}
|
|
4419
|
-
return
|
|
4420
|
-
t.removeEventListener(
|
|
4421
|
-
},
|
|
4445
|
+
return T.destroy = function() {
|
|
4446
|
+
t.removeEventListener(x, I), t.unsubscribe(x), T.removeAllListeners(), delete S[x];
|
|
4447
|
+
}, S[x] = T, t.connected || await t.connect(), t.subscribe(x), t.addEventListener(x, I), S[x];
|
|
4422
4448
|
};
|
|
4423
|
-
function
|
|
4424
|
-
t.debug && console.log("[socket] Connection open",
|
|
4425
|
-
u({
|
|
4426
|
-
action: "subscribe",
|
|
4427
|
-
channel: d
|
|
4428
|
-
});
|
|
4429
|
-
});
|
|
4430
|
-
}
|
|
4431
|
-
async function p(h) {
|
|
4432
|
-
h.wasClean ? t.debug && console.log(`[socket] Connection closed cleanly, code=${h.code} reason=${h.reason}`) : t.debug && console.log("[socket] - connection closed due to error", h), t.connected = !1, f.dispatch("disconnected", h), a = null, t.autoreconnect && t.reconnect();
|
|
4449
|
+
function w(x) {
|
|
4450
|
+
t.debug && console.log("[socket] Connection open", x), t.connected = !0, d = 0, f.dispatch("connected", x), L(Object.keys(g));
|
|
4433
4451
|
}
|
|
4434
|
-
function
|
|
4435
|
-
console.log(
|
|
4452
|
+
async function m(x) {
|
|
4453
|
+
x.wasClean ? t.debug && console.log(`[socket] Connection closed cleanly, code=${x.code} reason=${x.reason}`) : t.debug && console.log("[socket] - connection closed due to error", x), t.connected = !1, f.dispatch("disconnected", x), a = null, t.autoreconnect && l();
|
|
4436
4454
|
}
|
|
4437
|
-
function
|
|
4438
|
-
|
|
4439
|
-
|
|
4455
|
+
function l() {
|
|
4456
|
+
if (s)
|
|
4457
|
+
return;
|
|
4458
|
+
const x = Math.min(o, u * Math.pow(2, d)), T = Math.round(x * (0.5 + Math.random() / 2));
|
|
4459
|
+
d++, t.debug && console.log(`[socket] reconnecting in ${T}ms`), s = setTimeout(function() {
|
|
4460
|
+
s = null, t.reconnect();
|
|
4461
|
+
}, T);
|
|
4462
|
+
}
|
|
4463
|
+
function v(x) {
|
|
4464
|
+
console.log("[event] socketError", x), t.debug && console.log("[socket] Error", x), f.dispatch("error", x);
|
|
4465
|
+
}
|
|
4466
|
+
function b(x) {
|
|
4467
|
+
const T = JSON.parse(x.data);
|
|
4468
|
+
t.debug && console.log("[socket] message received", T), f.dispatch("message", T), T.channel && f.dispatch(T.channel, T);
|
|
4469
|
+
const I = T.message;
|
|
4470
|
+
I && I.type === "session" && I.action === "changed" && Promise.resolve(e.auth.sync({ keepOnError: !0 })).catch(function() {
|
|
4471
|
+
});
|
|
4440
4472
|
}
|
|
4441
|
-
async function
|
|
4473
|
+
async function O(x) {
|
|
4442
4474
|
if (!a || a.readyState !== WebSocket.OPEN) {
|
|
4443
|
-
t.debug && console.log("[socket] - frame dropped, socket not open",
|
|
4475
|
+
t.debug && console.log("[socket] - frame dropped, socket not open", x);
|
|
4444
4476
|
return;
|
|
4445
4477
|
}
|
|
4446
|
-
a.send(JSON.stringify(
|
|
4447
|
-
}
|
|
4448
|
-
function
|
|
4449
|
-
return new Promise(function(
|
|
4450
|
-
function
|
|
4451
|
-
|
|
4452
|
-
return h(a);
|
|
4453
|
-
setTimeout(d, 1e3);
|
|
4478
|
+
a.send(JSON.stringify(x));
|
|
4479
|
+
}
|
|
4480
|
+
function P() {
|
|
4481
|
+
return t.connected ? Promise.resolve(a) : new Promise(function(x) {
|
|
4482
|
+
function T() {
|
|
4483
|
+
t.removeEventListener("connected", T), x(a);
|
|
4454
4484
|
}
|
|
4455
|
-
|
|
4485
|
+
t.addEventListener("connected", T);
|
|
4456
4486
|
});
|
|
4457
4487
|
}
|
|
4458
4488
|
t.connect = async function() {
|
|
4459
4489
|
if (a)
|
|
4460
|
-
return a.connected ? (console.log("[socket] - Socket is already connected"), a) :
|
|
4461
|
-
|
|
4462
|
-
|
|
4490
|
+
return a.connected ? (console.log("[socket] - Socket is already connected"), a) : P();
|
|
4491
|
+
if (n)
|
|
4492
|
+
return n;
|
|
4493
|
+
n = k();
|
|
4494
|
+
try {
|
|
4495
|
+
return await n;
|
|
4496
|
+
} finally {
|
|
4497
|
+
n = null;
|
|
4498
|
+
}
|
|
4499
|
+
};
|
|
4500
|
+
async function k() {
|
|
4501
|
+
try {
|
|
4502
|
+
await e.auth.ensureValidToken();
|
|
4503
|
+
} catch (T) {
|
|
4504
|
+
t.debug && console.log("[socket] - could not refresh token before connecting", T);
|
|
4505
|
+
}
|
|
4506
|
+
const x = e.auth.getCurrentToken();
|
|
4507
|
+
if (!x) {
|
|
4463
4508
|
t.debug && console.log("[socket] - Must be authenticated to connect to socket");
|
|
4464
4509
|
return;
|
|
4465
4510
|
}
|
|
4466
|
-
return a = new WebSocket(`${t.url}?access_token=${
|
|
4467
|
-
}
|
|
4511
|
+
return a = new WebSocket(`${t.url}?access_token=${x}&windowid=${i}`), a.addEventListener("close", m), a.addEventListener("error", v), a.addEventListener("open", w), a.addEventListener("message", b), t.debug && console.log("[socket] - Connected with event listeners"), P();
|
|
4512
|
+
}
|
|
4513
|
+
t.reconnect = async function() {
|
|
4468
4514
|
if (!t.connected)
|
|
4469
4515
|
return t.debug && console.log("[socket] reconnecting..."), await t.connect();
|
|
4470
4516
|
}, t.close = async function() {
|
|
@@ -4472,31 +4518,50 @@ const Rt = function(e, r) {
|
|
|
4472
4518
|
console.log("[socket] - Socket is not connected");
|
|
4473
4519
|
return;
|
|
4474
4520
|
}
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4521
|
+
s && (clearTimeout(s), s = null);
|
|
4522
|
+
const x = t.autoreconnect;
|
|
4523
|
+
t.autoreconnect = !1, a.close(), a.removeEventListener("close", m), a.removeEventListener("error", v), a.removeEventListener("open", w), a.removeEventListener("message", b), a = null, m({ wasClean: !0 }), t.autoreconnect = x;
|
|
4524
|
+
}, t.disconnect = t.close;
|
|
4525
|
+
function L(x) {
|
|
4526
|
+
x.forEach(function(T) {
|
|
4527
|
+
c.includes(T) || c.push(T);
|
|
4528
|
+
}), !p && (p = !0, setTimeout(R, 0));
|
|
4529
|
+
}
|
|
4530
|
+
function R() {
|
|
4531
|
+
p = !1;
|
|
4532
|
+
const x = c.filter(function(T) {
|
|
4533
|
+
return g[T];
|
|
4534
|
+
});
|
|
4535
|
+
c = [], x.length && (x.length === 1 ? O({ action: "subscribe", channel: x[0] }) : O({ action: "subscribe", channels: x }));
|
|
4536
|
+
}
|
|
4537
|
+
t.subscribe = async function(x) {
|
|
4478
4538
|
if (!a) {
|
|
4479
4539
|
console.log("[socket] - Can't subscribe to channel as socket is not connected");
|
|
4480
4540
|
return;
|
|
4481
4541
|
}
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
channel: h
|
|
4485
|
-
}), s[h] = !0, f.dispatch("subscribe", h), t.debug && console.log(`[socket] - subscribed to ${h}`);
|
|
4486
|
-
}, t.unsubscribe = async function(h) {
|
|
4542
|
+
g[x] = !0, L([x]), f.dispatch("subscribe", x), t.debug && console.log(`[socket] - subscribed to ${x}`);
|
|
4543
|
+
}, t.unsubscribe = async function(x) {
|
|
4487
4544
|
if (!a) {
|
|
4488
4545
|
console.log("[socket] - Can't unsubscribe from channel as socket is not connected");
|
|
4489
4546
|
return;
|
|
4490
4547
|
}
|
|
4491
|
-
|
|
4548
|
+
O({
|
|
4492
4549
|
action: "unsubscribe",
|
|
4493
|
-
channel:
|
|
4494
|
-
}), delete
|
|
4550
|
+
channel: x
|
|
4551
|
+
}), delete g[x], f.dispatch("unsubscribe", x), t.debug && console.log(`[socket] - unsubscribed from ${x}`);
|
|
4495
4552
|
};
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4553
|
+
function j(x) {
|
|
4554
|
+
const T = x && x.session;
|
|
4555
|
+
return T ? [
|
|
4556
|
+
e.utils.id(T.organisation),
|
|
4557
|
+
e.utils.id(T.persona),
|
|
4558
|
+
e.utils.id(T._id)
|
|
4559
|
+
].join("|") : "";
|
|
4560
|
+
}
|
|
4561
|
+
let U = j(e.auth.getCurrentUser());
|
|
4562
|
+
return e.auth.addEventListener("change", async function(x) {
|
|
4563
|
+
const T = j(x);
|
|
4564
|
+
T !== U && (U = T, a && (t.debug && console.log("[socket] - signed-in identity changed, reconnecting"), await t.close(), await t.reconnect()));
|
|
4500
4565
|
}), t;
|
|
4501
4566
|
};
|
|
4502
4567
|
function Ft(e) {
|
|
@@ -4523,7 +4588,7 @@ function Ft(e) {
|
|
|
4523
4588
|
value: Ct,
|
|
4524
4589
|
writable: !1
|
|
4525
4590
|
});
|
|
4526
|
-
const t =
|
|
4591
|
+
const t = _;
|
|
4527
4592
|
Object.defineProperty(r, "utils", {
|
|
4528
4593
|
value: t,
|
|
4529
4594
|
writable: !1
|
|
@@ -4535,14 +4600,14 @@ function Ft(e) {
|
|
|
4535
4600
|
Object.defineProperty(r, "files", {
|
|
4536
4601
|
value: n,
|
|
4537
4602
|
writable: !1
|
|
4538
|
-
}), new De().bootstrap(r), r.error = function(
|
|
4539
|
-
return r.dispatch("error", t.errorMessage(
|
|
4540
|
-
}, r.notify = function(
|
|
4541
|
-
return r.dispatch("notification", { message:
|
|
4603
|
+
}), new De().bootstrap(r), r.error = function(f) {
|
|
4604
|
+
return r.dispatch("error", t.errorMessage(f));
|
|
4605
|
+
}, r.notify = function(f, w) {
|
|
4606
|
+
return r.dispatch("notification", { message: f, options: w });
|
|
4542
4607
|
};
|
|
4543
|
-
const
|
|
4608
|
+
const d = new mt(r);
|
|
4544
4609
|
Object.defineProperty(r, "api", {
|
|
4545
|
-
value:
|
|
4610
|
+
value: d,
|
|
4546
4611
|
writable: !1
|
|
4547
4612
|
});
|
|
4548
4613
|
const c = new Pt(r);
|
|
@@ -4550,19 +4615,19 @@ function Ft(e) {
|
|
|
4550
4615
|
value: c,
|
|
4551
4616
|
writable: !1
|
|
4552
4617
|
});
|
|
4553
|
-
const p = new
|
|
4618
|
+
const p = new It(r);
|
|
4554
4619
|
Object.defineProperty(r, "socket", {
|
|
4555
4620
|
value: p,
|
|
4556
4621
|
writable: !1
|
|
4557
4622
|
});
|
|
4558
|
-
const
|
|
4623
|
+
const S = new Mt(r);
|
|
4559
4624
|
Object.defineProperty(r, "access", {
|
|
4560
|
-
value:
|
|
4625
|
+
value: S,
|
|
4561
4626
|
writable: !1
|
|
4562
4627
|
});
|
|
4563
|
-
const
|
|
4628
|
+
const g = new Rt(r);
|
|
4564
4629
|
Object.defineProperty(r, "system", {
|
|
4565
|
-
value:
|
|
4630
|
+
value: g,
|
|
4566
4631
|
writable: !1
|
|
4567
4632
|
});
|
|
4568
4633
|
const u = new kt(r);
|
|
@@ -4570,7 +4635,7 @@ function Ft(e) {
|
|
|
4570
4635
|
value: u,
|
|
4571
4636
|
writable: !1
|
|
4572
4637
|
});
|
|
4573
|
-
const o = new
|
|
4638
|
+
const o = new Tt(r);
|
|
4574
4639
|
return Object.defineProperty(r, "content", {
|
|
4575
4640
|
value: o,
|
|
4576
4641
|
writable: !1
|