@qikdev/sdk 1.0.5 → 1.0.7
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/access.html +1 -1
- package/dist/api.html +1 -1
- package/dist/auth.html +1 -1
- package/dist/cache.html +1 -1
- package/dist/content.html +1 -1
- package/dist/files.html +1 -1
- package/dist/filter.html +1 -1
- package/dist/geo.html +1 -1
- package/dist/global.html +1 -1
- package/dist/index.html +1 -1
- package/dist/main.js +857 -838
- package/dist/module-QikStorage-CookieStorageAdapter.html +1 -1
- package/dist/module-QikStorage-LocalStorageAdapter.html +1 -1
- package/dist/module-QikStorage-StorageAdapter.html +1 -1
- package/dist/module-QikStorage.html +1 -1
- package/dist/qik.access.js.html +1 -1
- package/dist/qik.api.js.html +1 -1
- package/dist/qik.auth.js.html +1 -1
- package/dist/qik.cache.js.html +1 -1
- package/dist/qik.content.js.html +1 -1
- package/dist/qik.core.js.html +1 -1
- package/dist/qik.files.js.html +1 -1
- package/dist/qik.filter.js.html +1 -1
- package/dist/qik.geo.js.html +1 -1
- package/dist/qik.socket.js.html +1 -1
- package/dist/qik.storage.js.html +1 -1
- package/dist/qik.system.js.html +1 -1
- package/dist/qik.utils.js.html +1 -1
- package/dist/socket.html +1 -1
- package/dist/system.html +1 -1
- package/dist/utils.html +1 -1
- package/package.json +1 -1
- package/src/api/qik.api.js +28 -0
- package/src/api/qik.socket.js +20 -10
- package/src/version.js +1 -1
package/dist/main.js
CHANGED
|
@@ -48,65 +48,65 @@ function Qr() {
|
|
|
48
48
|
if (i.length !== 1 || i[0] !== a || !Object.prototype.propertyIsEnumerable.call(r, a))
|
|
49
49
|
return !1;
|
|
50
50
|
if (typeof Object.getOwnPropertyDescriptor == "function") {
|
|
51
|
-
var
|
|
52
|
-
if (
|
|
51
|
+
var y = Object.getOwnPropertyDescriptor(r, a);
|
|
52
|
+
if (y.value !== n || y.enumerable !== !0)
|
|
53
53
|
return !1;
|
|
54
54
|
}
|
|
55
55
|
return !0;
|
|
56
56
|
}), Ze;
|
|
57
57
|
}
|
|
58
|
-
var Qe,
|
|
58
|
+
var Qe, Or;
|
|
59
59
|
function Yr() {
|
|
60
|
-
if (
|
|
61
|
-
|
|
60
|
+
if (Or) return Qe;
|
|
61
|
+
Or = 1;
|
|
62
62
|
var e = typeof Symbol < "u" && Symbol, r = Qr();
|
|
63
63
|
return Qe = function() {
|
|
64
64
|
return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : r();
|
|
65
65
|
}, Qe;
|
|
66
66
|
}
|
|
67
|
-
var Ye,
|
|
67
|
+
var Ye, Cr;
|
|
68
68
|
function Xr() {
|
|
69
|
-
if (
|
|
70
|
-
|
|
71
|
-
var e = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, a = Math.max, t = "[object Function]", n = function(p,
|
|
72
|
-
for (var w = [],
|
|
73
|
-
w[
|
|
74
|
-
for (var
|
|
75
|
-
w[
|
|
69
|
+
if (Cr) return Ye;
|
|
70
|
+
Cr = 1;
|
|
71
|
+
var e = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, a = Math.max, t = "[object Function]", n = function(p, m) {
|
|
72
|
+
for (var w = [], b = 0; b < p.length; b += 1)
|
|
73
|
+
w[b] = p[b];
|
|
74
|
+
for (var u = 0; u < m.length; u += 1)
|
|
75
|
+
w[u + p.length] = m[u];
|
|
76
76
|
return w;
|
|
77
|
-
}, i = function(p,
|
|
78
|
-
for (var w = [],
|
|
79
|
-
w[
|
|
77
|
+
}, i = function(p, m) {
|
|
78
|
+
for (var w = [], b = m, u = 0; b < p.length; b += 1, u += 1)
|
|
79
|
+
w[u] = p[b];
|
|
80
80
|
return w;
|
|
81
|
-
},
|
|
82
|
-
for (var
|
|
83
|
-
|
|
84
|
-
return
|
|
81
|
+
}, y = function(l, p) {
|
|
82
|
+
for (var m = "", w = 0; w < l.length; w += 1)
|
|
83
|
+
m += l[w], w + 1 < l.length && (m += p);
|
|
84
|
+
return m;
|
|
85
85
|
};
|
|
86
86
|
return Ye = function(p) {
|
|
87
|
-
var
|
|
88
|
-
if (typeof
|
|
89
|
-
throw new TypeError(e +
|
|
90
|
-
for (var w = i(arguments, 1),
|
|
91
|
-
if (this instanceof
|
|
92
|
-
var
|
|
87
|
+
var m = this;
|
|
88
|
+
if (typeof m != "function" || r.apply(m) !== t)
|
|
89
|
+
throw new TypeError(e + m);
|
|
90
|
+
for (var w = i(arguments, 1), b, u = function() {
|
|
91
|
+
if (this instanceof b) {
|
|
92
|
+
var s = m.apply(
|
|
93
93
|
this,
|
|
94
94
|
n(w, arguments)
|
|
95
95
|
);
|
|
96
|
-
return Object(
|
|
96
|
+
return Object(s) === s ? s : this;
|
|
97
97
|
}
|
|
98
|
-
return
|
|
98
|
+
return m.apply(
|
|
99
99
|
p,
|
|
100
100
|
n(w, arguments)
|
|
101
101
|
);
|
|
102
|
-
}, o = a(0,
|
|
102
|
+
}, o = a(0, m.length - w.length), f = [], g = 0; g < o; g++)
|
|
103
103
|
f[g] = "$" + g;
|
|
104
|
-
if (
|
|
104
|
+
if (b = Function("binder", "return function (" + y(f, ",") + "){ return binder.apply(this,arguments); }")(u), m.prototype) {
|
|
105
105
|
var c = function() {
|
|
106
106
|
};
|
|
107
|
-
c.prototype =
|
|
107
|
+
c.prototype = m.prototype, b.prototype = new c(), c.prototype = null;
|
|
108
108
|
}
|
|
109
|
-
return
|
|
109
|
+
return b;
|
|
110
110
|
}, Ye;
|
|
111
111
|
}
|
|
112
112
|
var Xe, Mr;
|
|
@@ -139,25 +139,25 @@ function hr() {
|
|
|
139
139
|
} catch {
|
|
140
140
|
i = null;
|
|
141
141
|
}
|
|
142
|
-
var
|
|
142
|
+
var y = function() {
|
|
143
143
|
throw new t();
|
|
144
144
|
}, l = i ? (function() {
|
|
145
145
|
try {
|
|
146
|
-
return arguments.callee,
|
|
146
|
+
return arguments.callee, y;
|
|
147
147
|
} catch {
|
|
148
148
|
try {
|
|
149
149
|
return i(arguments, "callee").get;
|
|
150
150
|
} catch {
|
|
151
|
-
return
|
|
151
|
+
return y;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
-
})() :
|
|
154
|
+
})() : y, p = Yr()(), m = Object.getPrototypeOf || function($) {
|
|
155
155
|
return $.__proto__;
|
|
156
|
-
}, w = {},
|
|
156
|
+
}, w = {}, b = typeof Uint8Array > "u" ? e : m(Uint8Array), u = {
|
|
157
157
|
"%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
|
|
158
158
|
"%Array%": Array,
|
|
159
159
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? e : ArrayBuffer,
|
|
160
|
-
"%ArrayIteratorPrototype%": p ?
|
|
160
|
+
"%ArrayIteratorPrototype%": p ? m([][Symbol.iterator]()) : e,
|
|
161
161
|
"%AsyncFromSyncIteratorPrototype%": e,
|
|
162
162
|
"%AsyncFunction%": w,
|
|
163
163
|
"%AsyncGenerator%": w,
|
|
@@ -186,10 +186,10 @@ function hr() {
|
|
|
186
186
|
"%Int32Array%": typeof Int32Array > "u" ? e : Int32Array,
|
|
187
187
|
"%isFinite%": isFinite,
|
|
188
188
|
"%isNaN%": isNaN,
|
|
189
|
-
"%IteratorPrototype%": p ?
|
|
189
|
+
"%IteratorPrototype%": p ? m(m([][Symbol.iterator]())) : e,
|
|
190
190
|
"%JSON%": typeof JSON == "object" ? JSON : e,
|
|
191
191
|
"%Map%": typeof Map > "u" ? e : Map,
|
|
192
|
-
"%MapIteratorPrototype%": typeof Map > "u" || !p ? e :
|
|
192
|
+
"%MapIteratorPrototype%": typeof Map > "u" || !p ? e : m((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
193
193
|
"%Math%": Math,
|
|
194
194
|
"%Number%": Number,
|
|
195
195
|
"%Object%": Object,
|
|
@@ -202,14 +202,14 @@ function hr() {
|
|
|
202
202
|
"%Reflect%": typeof Reflect > "u" ? e : Reflect,
|
|
203
203
|
"%RegExp%": RegExp,
|
|
204
204
|
"%Set%": typeof Set > "u" ? e : Set,
|
|
205
|
-
"%SetIteratorPrototype%": typeof Set > "u" || !p ? e :
|
|
205
|
+
"%SetIteratorPrototype%": typeof Set > "u" || !p ? e : m((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
206
206
|
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? e : SharedArrayBuffer,
|
|
207
207
|
"%String%": String,
|
|
208
|
-
"%StringIteratorPrototype%": p ?
|
|
208
|
+
"%StringIteratorPrototype%": p ? m(""[Symbol.iterator]()) : e,
|
|
209
209
|
"%Symbol%": p ? Symbol : e,
|
|
210
210
|
"%SyntaxError%": r,
|
|
211
211
|
"%ThrowTypeError%": l,
|
|
212
|
-
"%TypedArray%":
|
|
212
|
+
"%TypedArray%": b,
|
|
213
213
|
"%TypeError%": t,
|
|
214
214
|
"%Uint8Array%": typeof Uint8Array > "u" ? e : Uint8Array,
|
|
215
215
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? e : Uint8ClampedArray,
|
|
@@ -219,22 +219,22 @@ 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 $(
|
|
222
|
+
}, o = function $(L) {
|
|
223
223
|
var F;
|
|
224
|
-
if (
|
|
224
|
+
if (L === "%AsyncFunction%")
|
|
225
225
|
F = n("async function () {}");
|
|
226
|
-
else if (
|
|
226
|
+
else if (L === "%GeneratorFunction%")
|
|
227
227
|
F = n("function* () {}");
|
|
228
|
-
else if (
|
|
228
|
+
else if (L === "%AsyncGeneratorFunction%")
|
|
229
229
|
F = n("async function* () {}");
|
|
230
|
-
else if (
|
|
231
|
-
var
|
|
232
|
-
|
|
233
|
-
} else if (
|
|
234
|
-
var
|
|
235
|
-
|
|
230
|
+
else if (L === "%AsyncGenerator%") {
|
|
231
|
+
var k = $("%AsyncGeneratorFunction%");
|
|
232
|
+
k && (F = k.prototype);
|
|
233
|
+
} else if (L === "%AsyncIteratorPrototype%") {
|
|
234
|
+
var I = $("%AsyncGenerator%");
|
|
235
|
+
I && (F = m(I.prototype));
|
|
236
236
|
}
|
|
237
|
-
return
|
|
237
|
+
return u[L] = F, F;
|
|
238
238
|
}, f = {
|
|
239
239
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
240
240
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
@@ -287,98 +287,98 @@ function hr() {
|
|
|
287
287
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
288
288
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
289
289
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
290
|
-
}, g = yr(), c = et(),
|
|
291
|
-
var F = P(
|
|
292
|
-
if (F === "%" &&
|
|
290
|
+
}, g = yr(), c = et(), s = g.call(Function.call, Array.prototype.concat), A = g.call(Function.apply, Array.prototype.splice), S = g.call(Function.call, String.prototype.replace), P = g.call(Function.call, String.prototype.slice), x = g.call(Function.call, RegExp.prototype.exec), T = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, N = /\\(\\)?/g, M = function(L) {
|
|
291
|
+
var F = P(L, 0, 1), k = P(L, -1);
|
|
292
|
+
if (F === "%" && k !== "%")
|
|
293
293
|
throw new r("invalid intrinsic syntax, expected closing `%`");
|
|
294
|
-
if (
|
|
294
|
+
if (k === "%" && F !== "%")
|
|
295
295
|
throw new r("invalid intrinsic syntax, expected opening `%`");
|
|
296
|
-
var
|
|
297
|
-
return S(
|
|
298
|
-
|
|
299
|
-
}),
|
|
300
|
-
}, V = function(
|
|
301
|
-
var
|
|
302
|
-
if (c(f,
|
|
303
|
-
var U =
|
|
304
|
-
if (U === w && (U = o(
|
|
305
|
-
throw new t("intrinsic " +
|
|
296
|
+
var I = [];
|
|
297
|
+
return S(L, T, function(U, z, _, Z) {
|
|
298
|
+
I[I.length] = _ ? S(Z, N, "$1") : z || U;
|
|
299
|
+
}), I;
|
|
300
|
+
}, V = function(L, F) {
|
|
301
|
+
var k = L, I;
|
|
302
|
+
if (c(f, k) && (I = f[k], k = "%" + I[0] + "%"), c(u, k)) {
|
|
303
|
+
var U = u[k];
|
|
304
|
+
if (U === w && (U = o(k)), typeof U > "u" && !F)
|
|
305
|
+
throw new t("intrinsic " + L + " exists, but is not available. Please file an issue!");
|
|
306
306
|
return {
|
|
307
|
-
alias:
|
|
308
|
-
name:
|
|
307
|
+
alias: I,
|
|
308
|
+
name: k,
|
|
309
309
|
value: U
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
throw new r("intrinsic " +
|
|
312
|
+
throw new r("intrinsic " + L + " does not exist!");
|
|
313
313
|
};
|
|
314
|
-
return rr = function(
|
|
315
|
-
if (typeof
|
|
314
|
+
return rr = function(L, F) {
|
|
315
|
+
if (typeof L != "string" || L.length === 0)
|
|
316
316
|
throw new t("intrinsic name must be a non-empty string");
|
|
317
317
|
if (arguments.length > 1 && typeof F != "boolean")
|
|
318
318
|
throw new t('"allowMissing" argument must be a boolean');
|
|
319
|
-
if (x(/^%?[^%]*%?$/,
|
|
319
|
+
if (x(/^%?[^%]*%?$/, L) === 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 W =
|
|
321
|
+
var k = M(L), I = k.length > 0 ? k[0] : "", U = V("%" + I + "%", F), z = U.name, _ = U.value, Z = !1, Q = U.alias;
|
|
322
|
+
Q && (I = Q[0], A(k, s([0, 1], Q)));
|
|
323
|
+
for (var ne = 1, X = !0; ne < k.length; ne += 1) {
|
|
324
|
+
var W = k[ne], ie = P(W, 0, 1), re = P(W, -1);
|
|
325
325
|
if ((ie === '"' || ie === "'" || ie === "`" || re === '"' || re === "'" || re === "`") && ie !== re)
|
|
326
326
|
throw new r("property names with quotes must have matching quotes");
|
|
327
|
-
if ((W === "constructor" || !X) && (Z = !0),
|
|
328
|
-
_ =
|
|
327
|
+
if ((W === "constructor" || !X) && (Z = !0), I += "." + W, z = "%" + I + "%", c(u, z))
|
|
328
|
+
_ = u[z];
|
|
329
329
|
else if (_ != null) {
|
|
330
330
|
if (!(W in _)) {
|
|
331
331
|
if (!F)
|
|
332
|
-
throw new t("base intrinsic for " +
|
|
332
|
+
throw new t("base intrinsic for " + L + " exists, but the property is not available.");
|
|
333
333
|
return;
|
|
334
334
|
}
|
|
335
|
-
if (i && ne + 1 >=
|
|
335
|
+
if (i && ne + 1 >= k.length) {
|
|
336
336
|
var te = i(_, W);
|
|
337
337
|
X = !!te, X && "get" in te && !("originalValue" in te.get) ? _ = te.get : _ = _[W];
|
|
338
338
|
} else
|
|
339
339
|
X = c(_, W), _ = _[W];
|
|
340
|
-
X && !Z && (
|
|
340
|
+
X && !Z && (u[z] = _);
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
return _;
|
|
344
344
|
}, rr;
|
|
345
345
|
}
|
|
346
|
-
var tr = { exports: {} },
|
|
346
|
+
var tr = { exports: {} }, kr;
|
|
347
347
|
function rt() {
|
|
348
|
-
return
|
|
349
|
-
var r = yr(), a = hr(), t = a("%Function.prototype.apply%"), n = a("%Function.prototype.call%"), i = a("%Reflect.apply%", !0) || r.call(n, t),
|
|
348
|
+
return kr || (kr = 1, (function(e) {
|
|
349
|
+
var r = yr(), a = hr(), t = a("%Function.prototype.apply%"), n = a("%Function.prototype.call%"), i = a("%Reflect.apply%", !0) || r.call(n, t), y = a("%Object.getOwnPropertyDescriptor%", !0), l = a("%Object.defineProperty%", !0), p = a("%Math.max%");
|
|
350
350
|
if (l)
|
|
351
351
|
try {
|
|
352
352
|
l({}, "a", { value: 1 });
|
|
353
353
|
} catch {
|
|
354
354
|
l = null;
|
|
355
355
|
}
|
|
356
|
-
e.exports = function(
|
|
357
|
-
var
|
|
358
|
-
if (
|
|
359
|
-
var o =
|
|
356
|
+
e.exports = function(b) {
|
|
357
|
+
var u = i(r, n, arguments);
|
|
358
|
+
if (y && l) {
|
|
359
|
+
var o = y(u, "length");
|
|
360
360
|
o.configurable && l(
|
|
361
|
-
|
|
361
|
+
u,
|
|
362
362
|
"length",
|
|
363
|
-
{ value: 1 + p(0,
|
|
363
|
+
{ value: 1 + p(0, b.length - (arguments.length - 1)) }
|
|
364
364
|
);
|
|
365
365
|
}
|
|
366
|
-
return
|
|
366
|
+
return u;
|
|
367
367
|
};
|
|
368
|
-
var
|
|
368
|
+
var m = function() {
|
|
369
369
|
return i(r, t, arguments);
|
|
370
370
|
};
|
|
371
|
-
l ? l(e.exports, "apply", { value:
|
|
371
|
+
l ? l(e.exports, "apply", { value: m }) : e.exports.apply = m;
|
|
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(), a = r(e("String.prototype.indexOf"));
|
|
379
379
|
return ar = function(n, i) {
|
|
380
|
-
var
|
|
381
|
-
return typeof
|
|
380
|
+
var y = e(n, !!i);
|
|
381
|
+
return typeof y == "function" && a(n, ".prototype.") > -1 ? r(y) : y;
|
|
382
382
|
}, ar;
|
|
383
383
|
}
|
|
384
384
|
const at = {}, nt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -389,7 +389,7 @@ var nr, _r;
|
|
|
389
389
|
function ot() {
|
|
390
390
|
if (_r) return nr;
|
|
391
391
|
_r = 1;
|
|
392
|
-
var e = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, a = e && r && typeof r.get == "function" ? r.get : null, t = e && Map.prototype.forEach, n = typeof Set == "function" && Set.prototype, i = Object.getOwnPropertyDescriptor && n ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null,
|
|
392
|
+
var e = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, a = e && r && typeof r.get == "function" ? r.get : null, t = e && Map.prototype.forEach, n = typeof Set == "function" && Set.prototype, i = Object.getOwnPropertyDescriptor && n ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, y = n && i && typeof i.get == "function" ? i.get : null, l = n && Set.prototype.forEach, p = typeof WeakMap == "function" && WeakMap.prototype, m = p ? WeakMap.prototype.has : null, w = typeof WeakSet == "function" && WeakSet.prototype, b = w ? WeakSet.prototype.has : null, u = typeof WeakRef == "function" && WeakRef.prototype, o = u ? WeakRef.prototype.deref : null, f = Boolean.prototype.valueOf, g = Object.prototype.toString, c = Function.prototype.toString, s = String.prototype.match, A = String.prototype.slice, S = String.prototype.replace, P = String.prototype.toUpperCase, x = String.prototype.toLowerCase, T = RegExp.prototype.test, N = Array.prototype.concat, M = Array.prototype.join, V = Array.prototype.slice, $ = Math.floor, L = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, F = Object.getOwnPropertySymbols, k = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, I = typeof Symbol == "function" && typeof Symbol.iterator == "object", U = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === I || !0) ? Symbol.toStringTag : null, z = Object.prototype.propertyIsEnumerable, _ = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(h) {
|
|
393
393
|
return h.__proto__;
|
|
394
394
|
} : null);
|
|
395
395
|
function Z(h, v) {
|
|
@@ -399,27 +399,27 @@ function ot() {
|
|
|
399
399
|
if (typeof h == "number") {
|
|
400
400
|
var d = h < 0 ? -$(-h) : $(h);
|
|
401
401
|
if (d !== h) {
|
|
402
|
-
var E = String(d),
|
|
403
|
-
return S.call(E, D, "$&_") + "." + S.call(S.call(
|
|
402
|
+
var E = String(d), O = A.call(v, E.length + 1);
|
|
403
|
+
return S.call(E, D, "$&_") + "." + S.call(S.call(O, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
return S.call(v, D, "$&_");
|
|
407
407
|
}
|
|
408
408
|
var Q = it, ne = Q.custom, X = se(ne) ? ne : null;
|
|
409
409
|
nr = function h(v, D, d, E) {
|
|
410
|
-
var
|
|
411
|
-
if (J(
|
|
410
|
+
var O = D || {};
|
|
411
|
+
if (J(O, "quoteStyle") && O.quoteStyle !== "single" && O.quoteStyle !== "double")
|
|
412
412
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
413
|
-
if (J(
|
|
413
|
+
if (J(O, "maxStringLength") && (typeof O.maxStringLength == "number" ? O.maxStringLength < 0 && O.maxStringLength !== 1 / 0 : O.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(O, "customInspect") ? O.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(O, "indent") && O.indent !== null && O.indent !== " " && !(parseInt(O.indent, 10) === O.indent && O.indent > 0))
|
|
419
419
|
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
420
|
-
if (J(
|
|
420
|
+
if (J(O, "numericSeparator") && typeof O.numericSeparator != "boolean")
|
|
421
421
|
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
422
|
-
var ae =
|
|
422
|
+
var ae = O.numericSeparator;
|
|
423
423
|
if (typeof v > "u")
|
|
424
424
|
return "undefined";
|
|
425
425
|
if (v === null)
|
|
@@ -427,7 +427,7 @@ function ot() {
|
|
|
427
427
|
if (typeof v == "boolean")
|
|
428
428
|
return v ? "true" : "false";
|
|
429
429
|
if (typeof v == "string")
|
|
430
|
-
return
|
|
430
|
+
return Oe(v, O);
|
|
431
431
|
if (typeof v == "number") {
|
|
432
432
|
if (v === 0)
|
|
433
433
|
return 1 / 0 / v > 0 ? "0" : "-0";
|
|
@@ -435,13 +435,13 @@ function ot() {
|
|
|
435
435
|
return ae ? Z(v, K) : K;
|
|
436
436
|
}
|
|
437
437
|
if (typeof v == "bigint") {
|
|
438
|
-
var
|
|
439
|
-
return ae ? Z(v,
|
|
438
|
+
var C = String(v) + "n";
|
|
439
|
+
return ae ? Z(v, C) : C;
|
|
440
440
|
}
|
|
441
|
-
var B = typeof
|
|
441
|
+
var B = typeof O.depth > "u" ? 5 : O.depth;
|
|
442
442
|
if (typeof d > "u" && (d = 0), d >= B && B > 0 && typeof v == "object")
|
|
443
443
|
return re(v) ? "[Array]" : "[Object]";
|
|
444
|
-
var j =
|
|
444
|
+
var j = Le(O, d);
|
|
445
445
|
if (typeof E > "u")
|
|
446
446
|
E = [];
|
|
447
447
|
else if (xe(E, v) >= 0)
|
|
@@ -449,34 +449,34 @@ function ot() {
|
|
|
449
449
|
function H(Me, Be, Jr) {
|
|
450
450
|
if (Be && (E = V.call(E), E.push(Be)), Jr) {
|
|
451
451
|
var xr = {
|
|
452
|
-
depth:
|
|
452
|
+
depth: O.depth
|
|
453
453
|
};
|
|
454
|
-
return J(
|
|
454
|
+
return J(O, "quoteStyle") && (xr.quoteStyle = O.quoteStyle), h(Me, xr, d + 1, E);
|
|
455
455
|
}
|
|
456
|
-
return h(Me,
|
|
456
|
+
return h(Me, O, d + 1, E);
|
|
457
457
|
}
|
|
458
458
|
if (typeof v == "function" && !ce(v)) {
|
|
459
459
|
var Y = Re(v), Ee = ge(v, H);
|
|
460
460
|
return "[Function" + (Y ? ": " + Y : " (anonymous)") + "]" + (Ee.length > 0 ? " { " + M.call(Ee, ", ") + " }" : "");
|
|
461
461
|
}
|
|
462
462
|
if (se(v)) {
|
|
463
|
-
var Ar =
|
|
464
|
-
return typeof v == "object" && !
|
|
463
|
+
var Ar = I ? S.call(String(v), /^(Symbol\(.*\))_[^)]*$/, "$1") : k.call(v);
|
|
464
|
+
return typeof v == "object" && !I ? le(Ar) : Ar;
|
|
465
465
|
}
|
|
466
466
|
if (_e(v)) {
|
|
467
467
|
for (var Fe = "<" + x.call(String(v.nodeName)), ze = v.attributes || [], $e = 0; $e < ze.length; $e++)
|
|
468
|
-
Fe += " " + ze[$e].name + "=" + W(ie(ze[$e].value), "double",
|
|
468
|
+
Fe += " " + ze[$e].name + "=" + W(ie(ze[$e].value), "double", O);
|
|
469
469
|
return Fe += ">", v.childNodes && v.childNodes.length && (Fe += "..."), Fe += "</" + x.call(String(v.nodeName)) + ">", Fe;
|
|
470
470
|
}
|
|
471
471
|
if (re(v)) {
|
|
472
472
|
if (v.length === 0)
|
|
473
473
|
return "[]";
|
|
474
474
|
var We = ge(v, H);
|
|
475
|
-
return j && !
|
|
475
|
+
return j && !Ce(We) ? "[" + he(We, j) + "]" : "[ " + M.call(We, ", ") + " ]";
|
|
476
476
|
}
|
|
477
477
|
if (ue(v)) {
|
|
478
478
|
var Ke = ge(v, H);
|
|
479
|
-
return !("cause" in Error.prototype) && "cause" in v && !z.call(v, "cause") ? "{ [" + String(v) + "] " + M.call(
|
|
479
|
+
return !("cause" in Error.prototype) && "cause" in v && !z.call(v, "cause") ? "{ [" + String(v) + "] " + M.call(N.call("[cause]: " + H(v.cause), Ke), ", ") + " }" : Ke.length === 0 ? "[" + String(v) + "]" : "{ [" + String(v) + "] " + M.call(Ke, ", ") + " }";
|
|
480
480
|
}
|
|
481
481
|
if (typeof v == "object" && G) {
|
|
482
482
|
if (X && typeof v[X] == "function" && Q)
|
|
@@ -490,28 +490,28 @@ function ot() {
|
|
|
490
490
|
br.push(H(Be, v, !0) + " => " + H(Me, v));
|
|
491
491
|
}), we("Map", a.call(v), br, j);
|
|
492
492
|
}
|
|
493
|
-
if (
|
|
493
|
+
if (ke(v)) {
|
|
494
494
|
var Sr = [];
|
|
495
495
|
return l.call(v, function(Me) {
|
|
496
496
|
Sr.push(H(Me, v));
|
|
497
|
-
}), we("Set",
|
|
497
|
+
}), we("Set", y.call(v), Sr, j);
|
|
498
498
|
}
|
|
499
499
|
if (me(v))
|
|
500
500
|
return fe("WeakMap");
|
|
501
|
-
if (
|
|
501
|
+
if (Ie(v))
|
|
502
502
|
return fe("WeakSet");
|
|
503
503
|
if (Pe(v))
|
|
504
504
|
return fe("WeakRef");
|
|
505
505
|
if (de(v))
|
|
506
506
|
return le(H(Number(v)));
|
|
507
507
|
if (ye(v))
|
|
508
|
-
return le(H(
|
|
508
|
+
return le(H(L.call(v)));
|
|
509
509
|
if (pe(v))
|
|
510
510
|
return le(f.call(v));
|
|
511
511
|
if (oe(v))
|
|
512
512
|
return le(H(String(v)));
|
|
513
513
|
if (!te(v) && !ce(v)) {
|
|
514
|
-
var He = ge(v, H), wr = _ ? _(v) === Object.prototype : v instanceof Object || v.constructor === Object, Je = v instanceof Object ? "" : "null prototype", Er = !wr && U && Object(v) === v && U in v ?
|
|
514
|
+
var He = ge(v, H), wr = _ ? _(v) === Object.prototype : v instanceof Object || v.constructor === Object, Je = v instanceof Object ? "" : "null prototype", Er = !wr && U && Object(v) === v && U in v ? A.call(ee(v), 8, -1) : Je ? "Object" : "", Hr = wr || typeof v.constructor != "function" ? "" : v.constructor.name ? v.constructor.name + " " : "", qe = Hr + (Er || Je ? "[" + M.call(N.call([], Er || [], Je || []), ": ") + "] " : "");
|
|
515
515
|
return He.length === 0 ? qe + "{}" : j ? qe + "{" + he(He, j) + "}" : qe + "{ " + M.call(He, ", ") + " }";
|
|
516
516
|
}
|
|
517
517
|
return String(v);
|
|
@@ -545,23 +545,23 @@ function ot() {
|
|
|
545
545
|
return ee(h) === "[object Boolean]" && (!U || !(typeof h == "object" && U in h));
|
|
546
546
|
}
|
|
547
547
|
function se(h) {
|
|
548
|
-
if (
|
|
548
|
+
if (I)
|
|
549
549
|
return h && typeof h == "object" && h instanceof Symbol;
|
|
550
550
|
if (typeof h == "symbol")
|
|
551
551
|
return !0;
|
|
552
|
-
if (!h || typeof h != "object" || !
|
|
552
|
+
if (!h || typeof h != "object" || !k)
|
|
553
553
|
return !1;
|
|
554
554
|
try {
|
|
555
|
-
return
|
|
555
|
+
return k.call(h), !0;
|
|
556
556
|
} catch {
|
|
557
557
|
}
|
|
558
558
|
return !1;
|
|
559
559
|
}
|
|
560
560
|
function ye(h) {
|
|
561
|
-
if (!h || typeof h != "object" || !
|
|
561
|
+
if (!h || typeof h != "object" || !L)
|
|
562
562
|
return !1;
|
|
563
563
|
try {
|
|
564
|
-
return
|
|
564
|
+
return L.call(h), !0;
|
|
565
565
|
} catch {
|
|
566
566
|
}
|
|
567
567
|
return !1;
|
|
@@ -578,7 +578,7 @@ function ot() {
|
|
|
578
578
|
function Re(h) {
|
|
579
579
|
if (h.name)
|
|
580
580
|
return h.name;
|
|
581
|
-
var v =
|
|
581
|
+
var v = s.call(c.call(h), /^function\s*([\w$]+)/);
|
|
582
582
|
return v ? v[1] : null;
|
|
583
583
|
}
|
|
584
584
|
function xe(h, v) {
|
|
@@ -595,7 +595,7 @@ function ot() {
|
|
|
595
595
|
try {
|
|
596
596
|
a.call(h);
|
|
597
597
|
try {
|
|
598
|
-
|
|
598
|
+
y.call(h);
|
|
599
599
|
} catch {
|
|
600
600
|
return !0;
|
|
601
601
|
}
|
|
@@ -605,12 +605,12 @@ function ot() {
|
|
|
605
605
|
return !1;
|
|
606
606
|
}
|
|
607
607
|
function me(h) {
|
|
608
|
-
if (!
|
|
608
|
+
if (!m || !h || typeof h != "object")
|
|
609
609
|
return !1;
|
|
610
610
|
try {
|
|
611
|
-
|
|
611
|
+
m.call(h, m);
|
|
612
612
|
try {
|
|
613
|
-
|
|
613
|
+
b.call(h, b);
|
|
614
614
|
} catch {
|
|
615
615
|
return !0;
|
|
616
616
|
}
|
|
@@ -628,11 +628,11 @@ function ot() {
|
|
|
628
628
|
}
|
|
629
629
|
return !1;
|
|
630
630
|
}
|
|
631
|
-
function
|
|
632
|
-
if (!
|
|
631
|
+
function ke(h) {
|
|
632
|
+
if (!y || !h || typeof h != "object")
|
|
633
633
|
return !1;
|
|
634
634
|
try {
|
|
635
|
-
|
|
635
|
+
y.call(h);
|
|
636
636
|
try {
|
|
637
637
|
a.call(h);
|
|
638
638
|
} catch {
|
|
@@ -643,13 +643,13 @@ function ot() {
|
|
|
643
643
|
}
|
|
644
644
|
return !1;
|
|
645
645
|
}
|
|
646
|
-
function
|
|
647
|
-
if (!
|
|
646
|
+
function Ie(h) {
|
|
647
|
+
if (!b || !h || typeof h != "object")
|
|
648
648
|
return !1;
|
|
649
649
|
try {
|
|
650
|
-
|
|
650
|
+
b.call(h, b);
|
|
651
651
|
try {
|
|
652
|
-
|
|
652
|
+
m.call(h, m);
|
|
653
653
|
} catch {
|
|
654
654
|
return !0;
|
|
655
655
|
}
|
|
@@ -661,15 +661,15 @@ function ot() {
|
|
|
661
661
|
function _e(h) {
|
|
662
662
|
return !h || typeof h != "object" ? !1 : typeof HTMLElement < "u" && h instanceof HTMLElement ? !0 : typeof h.nodeName == "string" && typeof h.getAttribute == "function";
|
|
663
663
|
}
|
|
664
|
-
function
|
|
664
|
+
function Oe(h, v) {
|
|
665
665
|
if (h.length > v.maxStringLength) {
|
|
666
666
|
var D = h.length - v.maxStringLength, d = "... " + D + " more character" + (D > 1 ? "s" : "");
|
|
667
|
-
return
|
|
667
|
+
return Oe(A.call(h, 0, v.maxStringLength), v) + d;
|
|
668
668
|
}
|
|
669
|
-
var E = S.call(S.call(h, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g,
|
|
669
|
+
var E = S.call(S.call(h, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Ne);
|
|
670
670
|
return W(E, "single", v);
|
|
671
671
|
}
|
|
672
|
-
function
|
|
672
|
+
function Ne(h) {
|
|
673
673
|
var v = h.charCodeAt(0), D = {
|
|
674
674
|
8: "b",
|
|
675
675
|
9: "t",
|
|
@@ -689,14 +689,14 @@ function ot() {
|
|
|
689
689
|
var E = d ? he(D, d) : M.call(D, ", ");
|
|
690
690
|
return h + " (" + v + ") {" + E + "}";
|
|
691
691
|
}
|
|
692
|
-
function
|
|
692
|
+
function Ce(h) {
|
|
693
693
|
for (var v = 0; v < h.length; v++)
|
|
694
694
|
if (xe(h[v], `
|
|
695
695
|
`) >= 0)
|
|
696
696
|
return !1;
|
|
697
697
|
return !0;
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function Le(h, v) {
|
|
700
700
|
var D;
|
|
701
701
|
if (h.indent === " ")
|
|
702
702
|
D = " ";
|
|
@@ -724,81 +724,81 @@ function ot() {
|
|
|
724
724
|
for (var E = 0; E < h.length; E++)
|
|
725
725
|
d[E] = J(h, E) ? v(h[E], h) : "";
|
|
726
726
|
}
|
|
727
|
-
var
|
|
728
|
-
if (
|
|
727
|
+
var O = typeof F == "function" ? F(h) : [], G;
|
|
728
|
+
if (I) {
|
|
729
729
|
G = {};
|
|
730
|
-
for (var ae = 0; ae <
|
|
731
|
-
G["$" +
|
|
730
|
+
for (var ae = 0; ae < O.length; ae++)
|
|
731
|
+
G["$" + O[ae]] = O[ae];
|
|
732
732
|
}
|
|
733
733
|
for (var K in h)
|
|
734
|
-
J(h, K) && (D && String(Number(K)) === K && K < h.length ||
|
|
734
|
+
J(h, K) && (D && String(Number(K)) === K && K < h.length || I && G["$" + K] instanceof Symbol || (T.call(/[^\w$]/, K) ? d.push(v(K, h) + ": " + v(h[K], h)) : d.push(K + ": " + v(h[K], h))));
|
|
735
735
|
if (typeof F == "function")
|
|
736
|
-
for (var
|
|
737
|
-
z.call(h, C
|
|
736
|
+
for (var C = 0; C < O.length; C++)
|
|
737
|
+
z.call(h, O[C]) && d.push("[" + v(O[C]) + "]: " + v(h[O[C]], h));
|
|
738
738
|
return d;
|
|
739
739
|
}
|
|
740
740
|
return nr;
|
|
741
741
|
}
|
|
742
|
-
var ir,
|
|
742
|
+
var ir, Nr;
|
|
743
743
|
function st() {
|
|
744
|
-
if (
|
|
745
|
-
|
|
746
|
-
var e = hr(), r = tt(), a = /* @__PURE__ */ ot(), t = e("%TypeError%"), n = e("%WeakMap%", !0), i = e("%Map%", !0),
|
|
747
|
-
for (var
|
|
748
|
-
if (S.key ===
|
|
749
|
-
return
|
|
750
|
-
}, o = function(c,
|
|
751
|
-
var
|
|
752
|
-
return
|
|
753
|
-
}, f = function(c,
|
|
754
|
-
var S =
|
|
755
|
-
S ? S.value =
|
|
744
|
+
if (Nr) return ir;
|
|
745
|
+
Nr = 1;
|
|
746
|
+
var e = hr(), r = tt(), a = /* @__PURE__ */ ot(), t = e("%TypeError%"), n = e("%WeakMap%", !0), i = e("%Map%", !0), y = r("WeakMap.prototype.get", !0), l = r("WeakMap.prototype.set", !0), p = r("WeakMap.prototype.has", !0), m = r("Map.prototype.get", !0), w = r("Map.prototype.set", !0), b = r("Map.prototype.has", !0), u = function(c, s) {
|
|
747
|
+
for (var A = c, S; (S = A.next) !== null; A = S)
|
|
748
|
+
if (S.key === s)
|
|
749
|
+
return A.next = S.next, S.next = c.next, c.next = S, S;
|
|
750
|
+
}, o = function(c, s) {
|
|
751
|
+
var A = u(c, s);
|
|
752
|
+
return A && A.value;
|
|
753
|
+
}, f = function(c, s, A) {
|
|
754
|
+
var S = u(c, s);
|
|
755
|
+
S ? S.value = A : c.next = {
|
|
756
756
|
// eslint-disable-line no-param-reassign
|
|
757
|
-
key:
|
|
757
|
+
key: s,
|
|
758
758
|
next: c.next,
|
|
759
|
-
value:
|
|
759
|
+
value: A
|
|
760
760
|
};
|
|
761
|
-
}, g = function(c,
|
|
762
|
-
return !!
|
|
761
|
+
}, g = function(c, s) {
|
|
762
|
+
return !!u(c, s);
|
|
763
763
|
};
|
|
764
764
|
return ir = function() {
|
|
765
|
-
var
|
|
765
|
+
var s, A, S, P = {
|
|
766
766
|
assert: function(x) {
|
|
767
767
|
if (!P.has(x))
|
|
768
768
|
throw new t("Side channel does not contain " + a(x));
|
|
769
769
|
},
|
|
770
770
|
get: function(x) {
|
|
771
771
|
if (n && x && (typeof x == "object" || typeof x == "function")) {
|
|
772
|
-
if (
|
|
773
|
-
return
|
|
772
|
+
if (s)
|
|
773
|
+
return y(s, x);
|
|
774
774
|
} else if (i) {
|
|
775
|
-
if (
|
|
776
|
-
return
|
|
775
|
+
if (A)
|
|
776
|
+
return m(A, x);
|
|
777
777
|
} else if (S)
|
|
778
778
|
return o(S, x);
|
|
779
779
|
},
|
|
780
780
|
has: function(x) {
|
|
781
781
|
if (n && x && (typeof x == "object" || typeof x == "function")) {
|
|
782
|
-
if (
|
|
783
|
-
return p(
|
|
782
|
+
if (s)
|
|
783
|
+
return p(s, x);
|
|
784
784
|
} else if (i) {
|
|
785
|
-
if (
|
|
786
|
-
return A
|
|
785
|
+
if (A)
|
|
786
|
+
return b(A, x);
|
|
787
787
|
} else if (S)
|
|
788
788
|
return g(S, x);
|
|
789
789
|
return !1;
|
|
790
790
|
},
|
|
791
791
|
set: function(x, T) {
|
|
792
|
-
n && x && (typeof x == "object" || typeof x == "function") ? (
|
|
792
|
+
n && x && (typeof x == "object" || typeof x == "function") ? (s || (s = new n()), l(s, x, T)) : i ? (A || (A = new i()), w(A, x, T)) : (S || (S = { key: {}, next: null }), f(S, x, T));
|
|
793
793
|
}
|
|
794
794
|
};
|
|
795
795
|
return P;
|
|
796
796
|
}, ir;
|
|
797
797
|
}
|
|
798
|
-
var or,
|
|
798
|
+
var or, Lr;
|
|
799
799
|
function gr() {
|
|
800
|
-
if (
|
|
801
|
-
|
|
800
|
+
if (Lr) return or;
|
|
801
|
+
Lr = 1;
|
|
802
802
|
var e = String.prototype.replace, r = /%20/g, a = {
|
|
803
803
|
RFC1738: "RFC1738",
|
|
804
804
|
RFC3986: "RFC3986"
|
|
@@ -827,67 +827,67 @@ function Wr() {
|
|
|
827
827
|
return g;
|
|
828
828
|
})(), n = function(c) {
|
|
829
829
|
for (; c.length > 1; ) {
|
|
830
|
-
var
|
|
831
|
-
if (a(
|
|
832
|
-
for (var S = [], P = 0; P <
|
|
833
|
-
typeof
|
|
834
|
-
|
|
830
|
+
var s = c.pop(), A = s.obj[s.prop];
|
|
831
|
+
if (a(A)) {
|
|
832
|
+
for (var S = [], P = 0; P < A.length; ++P)
|
|
833
|
+
typeof A[P] < "u" && S.push(A[P]);
|
|
834
|
+
s.obj[s.prop] = S;
|
|
835
835
|
}
|
|
836
836
|
}
|
|
837
|
-
}, i = function(c,
|
|
838
|
-
for (var
|
|
839
|
-
typeof c[S] < "u" && (
|
|
840
|
-
return
|
|
841
|
-
},
|
|
842
|
-
if (!
|
|
837
|
+
}, i = function(c, s) {
|
|
838
|
+
for (var A = s && s.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, S = 0; S < c.length; ++S)
|
|
839
|
+
typeof c[S] < "u" && (A[S] = c[S]);
|
|
840
|
+
return A;
|
|
841
|
+
}, y = function g(c, s, A) {
|
|
842
|
+
if (!s)
|
|
843
843
|
return c;
|
|
844
|
-
if (typeof
|
|
844
|
+
if (typeof s != "object") {
|
|
845
845
|
if (a(c))
|
|
846
|
-
c.push(
|
|
846
|
+
c.push(s);
|
|
847
847
|
else if (c && typeof c == "object")
|
|
848
|
-
(
|
|
848
|
+
(A && (A.plainObjects || A.allowPrototypes) || !r.call(Object.prototype, s)) && (c[s] = !0);
|
|
849
849
|
else
|
|
850
|
-
return [c,
|
|
850
|
+
return [c, s];
|
|
851
851
|
return c;
|
|
852
852
|
}
|
|
853
853
|
if (!c || typeof c != "object")
|
|
854
|
-
return [c].concat(
|
|
854
|
+
return [c].concat(s);
|
|
855
855
|
var S = c;
|
|
856
|
-
return a(c) && !a(
|
|
856
|
+
return a(c) && !a(s) && (S = i(c, A)), a(c) && a(s) ? (s.forEach(function(P, x) {
|
|
857
857
|
if (r.call(c, x)) {
|
|
858
858
|
var T = c[x];
|
|
859
|
-
T && typeof T == "object" && P && typeof P == "object" ? c[x] = g(T, P,
|
|
859
|
+
T && typeof T == "object" && P && typeof P == "object" ? c[x] = g(T, P, A) : c.push(P);
|
|
860
860
|
} else
|
|
861
861
|
c[x] = P;
|
|
862
|
-
}), c) : Object.keys(
|
|
863
|
-
var T =
|
|
864
|
-
return r.call(P, x) ? P[x] = g(P[x], T,
|
|
862
|
+
}), c) : Object.keys(s).reduce(function(P, x) {
|
|
863
|
+
var T = s[x];
|
|
864
|
+
return r.call(P, x) ? P[x] = g(P[x], T, A) : P[x] = T, P;
|
|
865
865
|
}, S);
|
|
866
|
-
}, l = function(c,
|
|
867
|
-
return Object.keys(
|
|
868
|
-
return
|
|
866
|
+
}, l = function(c, s) {
|
|
867
|
+
return Object.keys(s).reduce(function(A, S) {
|
|
868
|
+
return A[S] = s[S], A;
|
|
869
869
|
}, c);
|
|
870
|
-
}, p = function(g, c,
|
|
871
|
-
var
|
|
872
|
-
if (
|
|
873
|
-
return
|
|
870
|
+
}, p = function(g, c, s) {
|
|
871
|
+
var A = g.replace(/\+/g, " ");
|
|
872
|
+
if (s === "iso-8859-1")
|
|
873
|
+
return A.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
874
874
|
try {
|
|
875
|
-
return decodeURIComponent(
|
|
875
|
+
return decodeURIComponent(A);
|
|
876
876
|
} catch {
|
|
877
|
-
return
|
|
877
|
+
return A;
|
|
878
878
|
}
|
|
879
|
-
},
|
|
879
|
+
}, m = function(c, s, A, S, P) {
|
|
880
880
|
if (c.length === 0)
|
|
881
881
|
return c;
|
|
882
882
|
var x = c;
|
|
883
|
-
if (typeof c == "symbol" ? x = Symbol.prototype.toString.call(c) : typeof c != "string" && (x = String(c)),
|
|
883
|
+
if (typeof c == "symbol" ? x = Symbol.prototype.toString.call(c) : typeof c != "string" && (x = String(c)), A === "iso-8859-1")
|
|
884
884
|
return escape(x).replace(/%u[0-9a-f]{4}/gi, function(V) {
|
|
885
885
|
return "%26%23" + parseInt(V.slice(2), 16) + "%3B";
|
|
886
886
|
});
|
|
887
|
-
for (var T = "",
|
|
888
|
-
var M = x.charCodeAt(
|
|
887
|
+
for (var T = "", N = 0; N < x.length; ++N) {
|
|
888
|
+
var M = x.charCodeAt(N);
|
|
889
889
|
if (M === 45 || M === 46 || M === 95 || M === 126 || M >= 48 && M <= 57 || M >= 65 && M <= 90 || M >= 97 && M <= 122 || P === e.RFC1738 && (M === 40 || M === 41)) {
|
|
890
|
-
T += x.charAt(
|
|
890
|
+
T += x.charAt(N);
|
|
891
891
|
continue;
|
|
892
892
|
}
|
|
893
893
|
if (M < 128) {
|
|
@@ -902,29 +902,29 @@ function Wr() {
|
|
|
902
902
|
T = T + (t[224 | M >> 12] + t[128 | M >> 6 & 63] + t[128 | M & 63]);
|
|
903
903
|
continue;
|
|
904
904
|
}
|
|
905
|
-
|
|
905
|
+
N += 1, M = 65536 + ((M & 1023) << 10 | x.charCodeAt(N) & 1023), T += t[240 | M >> 18] + t[128 | M >> 12 & 63] + t[128 | M >> 6 & 63] + t[128 | M & 63];
|
|
906
906
|
}
|
|
907
907
|
return T;
|
|
908
908
|
}, w = function(c) {
|
|
909
|
-
for (var
|
|
910
|
-
for (var P =
|
|
911
|
-
var M = T[
|
|
912
|
-
typeof V == "object" && V !== null &&
|
|
909
|
+
for (var s = [{ obj: { o: c }, prop: "o" }], A = [], S = 0; S < s.length; ++S)
|
|
910
|
+
for (var P = s[S], x = P.obj[P.prop], T = Object.keys(x), N = 0; N < T.length; ++N) {
|
|
911
|
+
var M = T[N], V = x[M];
|
|
912
|
+
typeof V == "object" && V !== null && A.indexOf(V) === -1 && (s.push({ obj: x, prop: M }), A.push(V));
|
|
913
913
|
}
|
|
914
|
-
return n(
|
|
915
|
-
},
|
|
914
|
+
return n(s), c;
|
|
915
|
+
}, b = function(c) {
|
|
916
916
|
return Object.prototype.toString.call(c) === "[object RegExp]";
|
|
917
|
-
},
|
|
917
|
+
}, u = function(c) {
|
|
918
918
|
return !c || typeof c != "object" ? !1 : !!(c.constructor && c.constructor.isBuffer && c.constructor.isBuffer(c));
|
|
919
|
-
}, o = function(c,
|
|
920
|
-
return [].concat(c,
|
|
921
|
-
}, f = function(c,
|
|
919
|
+
}, o = function(c, s) {
|
|
920
|
+
return [].concat(c, s);
|
|
921
|
+
}, f = function(c, s) {
|
|
922
922
|
if (a(c)) {
|
|
923
|
-
for (var
|
|
924
|
-
|
|
925
|
-
return
|
|
923
|
+
for (var A = [], S = 0; S < c.length; S += 1)
|
|
924
|
+
A.push(s(c[S]));
|
|
925
|
+
return A;
|
|
926
926
|
}
|
|
927
|
-
return
|
|
927
|
+
return s(c);
|
|
928
928
|
};
|
|
929
929
|
return sr = {
|
|
930
930
|
arrayToObject: i,
|
|
@@ -932,11 +932,11 @@ function Wr() {
|
|
|
932
932
|
combine: o,
|
|
933
933
|
compact: w,
|
|
934
934
|
decode: p,
|
|
935
|
-
encode:
|
|
936
|
-
isBuffer:
|
|
937
|
-
isRegExp:
|
|
935
|
+
encode: m,
|
|
936
|
+
isBuffer: u,
|
|
937
|
+
isRegExp: b,
|
|
938
938
|
maybeMap: f,
|
|
939
|
-
merge:
|
|
939
|
+
merge: y
|
|
940
940
|
}, sr;
|
|
941
941
|
}
|
|
942
942
|
var ur, Ur;
|
|
@@ -944,19 +944,19 @@ function ut() {
|
|
|
944
944
|
if (Ur) return ur;
|
|
945
945
|
Ur = 1;
|
|
946
946
|
var e = st(), r = Wr(), a = gr(), t = Object.prototype.hasOwnProperty, n = {
|
|
947
|
-
brackets: function(
|
|
948
|
-
return
|
|
947
|
+
brackets: function(s) {
|
|
948
|
+
return s + "[]";
|
|
949
949
|
},
|
|
950
950
|
comma: "comma",
|
|
951
|
-
indices: function(
|
|
952
|
-
return
|
|
951
|
+
indices: function(s, A) {
|
|
952
|
+
return s + "[" + A + "]";
|
|
953
953
|
},
|
|
954
|
-
repeat: function(
|
|
955
|
-
return
|
|
954
|
+
repeat: function(s) {
|
|
955
|
+
return s;
|
|
956
956
|
}
|
|
957
|
-
}, i = Array.isArray,
|
|
958
|
-
l.apply(c, i(
|
|
959
|
-
},
|
|
957
|
+
}, i = Array.isArray, y = String.prototype.split, l = Array.prototype.push, p = function(c, s) {
|
|
958
|
+
l.apply(c, i(s) ? s : [s]);
|
|
959
|
+
}, m = Date.prototype.toISOString, w = a.default, b = {
|
|
960
960
|
addQueryPrefix: !1,
|
|
961
961
|
allowDots: !1,
|
|
962
962
|
charset: "utf-8",
|
|
@@ -969,16 +969,16 @@ function ut() {
|
|
|
969
969
|
formatter: a.formatters[w],
|
|
970
970
|
// deprecated
|
|
971
971
|
indices: !1,
|
|
972
|
-
serializeDate: function(
|
|
973
|
-
return
|
|
972
|
+
serializeDate: function(s) {
|
|
973
|
+
return m.call(s);
|
|
974
974
|
},
|
|
975
975
|
skipNulls: !1,
|
|
976
976
|
strictNullHandling: !1
|
|
977
|
-
},
|
|
978
|
-
return typeof
|
|
979
|
-
}, o = {}, f = function c(
|
|
980
|
-
for (var _ =
|
|
981
|
-
var X = Z.get(
|
|
977
|
+
}, u = function(s) {
|
|
978
|
+
return typeof s == "string" || typeof s == "number" || typeof s == "boolean" || typeof s == "symbol" || typeof s == "bigint";
|
|
979
|
+
}, o = {}, f = function c(s, A, S, P, x, T, N, M, V, $, L, F, k, I, U, z) {
|
|
980
|
+
for (var _ = s, Z = z, Q = 0, ne = !1; (Z = Z.get(o)) !== void 0 && !ne; ) {
|
|
981
|
+
var X = Z.get(s);
|
|
982
982
|
if (Q += 1, typeof X < "u") {
|
|
983
983
|
if (X === Q)
|
|
984
984
|
throw new RangeError("Cyclic object value");
|
|
@@ -986,24 +986,24 @@ function ut() {
|
|
|
986
986
|
}
|
|
987
987
|
typeof Z.get(o) > "u" && (Q = 0);
|
|
988
988
|
}
|
|
989
|
-
if (typeof M == "function" ? _ = M(
|
|
990
|
-
return ee instanceof Date ?
|
|
989
|
+
if (typeof M == "function" ? _ = M(A, _) : _ instanceof Date ? _ = L(_) : S === "comma" && i(_) && (_ = r.maybeMap(_, function(ee) {
|
|
990
|
+
return ee instanceof Date ? L(ee) : ee;
|
|
991
991
|
})), _ === null) {
|
|
992
992
|
if (x)
|
|
993
|
-
return
|
|
993
|
+
return N && !I ? N(A, b.encoder, U, "key", F) : A;
|
|
994
994
|
_ = "";
|
|
995
995
|
}
|
|
996
|
-
if (
|
|
997
|
-
if (
|
|
998
|
-
var W =
|
|
999
|
-
if (S === "comma" &&
|
|
1000
|
-
for (var ie =
|
|
1001
|
-
re += (te === 0 ? "" : ",") +
|
|
1002
|
-
return [
|
|
996
|
+
if (u(_) || r.isBuffer(_)) {
|
|
997
|
+
if (N) {
|
|
998
|
+
var W = I ? A : N(A, b.encoder, U, "key", F);
|
|
999
|
+
if (S === "comma" && I) {
|
|
1000
|
+
for (var ie = y.call(String(_), ","), re = "", te = 0; te < ie.length; ++te)
|
|
1001
|
+
re += (te === 0 ? "" : ",") + k(N(ie[te], b.encoder, U, "value", F));
|
|
1002
|
+
return [k(W) + (P && i(_) && ie.length === 1 ? "[]" : "") + "=" + re];
|
|
1003
1003
|
}
|
|
1004
|
-
return [
|
|
1004
|
+
return [k(W) + "=" + k(N(_, b.encoder, U, "value", F))];
|
|
1005
1005
|
}
|
|
1006
|
-
return [
|
|
1006
|
+
return [k(A) + "=" + k(String(_))];
|
|
1007
1007
|
}
|
|
1008
1008
|
var ce = [];
|
|
1009
1009
|
if (typeof _ > "u")
|
|
@@ -1017,11 +1017,11 @@ function ut() {
|
|
|
1017
1017
|
var oe = Object.keys(_);
|
|
1018
1018
|
ue = V ? oe.sort(V) : oe;
|
|
1019
1019
|
}
|
|
1020
|
-
for (var de = P && i(_) && _.length === 1 ?
|
|
1020
|
+
for (var de = P && i(_) && _.length === 1 ? A + "[]" : A, pe = 0; pe < ue.length; ++pe) {
|
|
1021
1021
|
var se = ue[pe], ye = typeof se == "object" && typeof se.value < "u" ? se.value : _[se];
|
|
1022
1022
|
if (!(T && ye === null)) {
|
|
1023
1023
|
var Se = i(_) ? typeof S == "function" ? S(de, se) : de : de + ($ ? "." + se : "[" + se + "]");
|
|
1024
|
-
z.set(
|
|
1024
|
+
z.set(s, Q);
|
|
1025
1025
|
var J = e();
|
|
1026
1026
|
J.set(o, z), p(ce, c(
|
|
1027
1027
|
ye,
|
|
@@ -1030,70 +1030,70 @@ function ut() {
|
|
|
1030
1030
|
P,
|
|
1031
1031
|
x,
|
|
1032
1032
|
T,
|
|
1033
|
-
|
|
1033
|
+
N,
|
|
1034
1034
|
M,
|
|
1035
1035
|
V,
|
|
1036
1036
|
$,
|
|
1037
|
-
|
|
1037
|
+
L,
|
|
1038
1038
|
F,
|
|
1039
|
-
I,
|
|
1040
1039
|
k,
|
|
1040
|
+
I,
|
|
1041
1041
|
U,
|
|
1042
1042
|
J
|
|
1043
1043
|
));
|
|
1044
1044
|
}
|
|
1045
1045
|
}
|
|
1046
1046
|
return ce;
|
|
1047
|
-
}, g = function(
|
|
1048
|
-
if (!
|
|
1049
|
-
return
|
|
1050
|
-
if (
|
|
1047
|
+
}, g = function(s) {
|
|
1048
|
+
if (!s)
|
|
1049
|
+
return b;
|
|
1050
|
+
if (s.encoder !== null && typeof s.encoder < "u" && typeof s.encoder != "function")
|
|
1051
1051
|
throw new TypeError("Encoder has to be a function.");
|
|
1052
|
-
var
|
|
1053
|
-
if (typeof
|
|
1052
|
+
var A = s.charset || b.charset;
|
|
1053
|
+
if (typeof s.charset < "u" && s.charset !== "utf-8" && s.charset !== "iso-8859-1")
|
|
1054
1054
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
1055
1055
|
var S = a.default;
|
|
1056
|
-
if (typeof
|
|
1057
|
-
if (!t.call(a.formatters,
|
|
1056
|
+
if (typeof s.format < "u") {
|
|
1057
|
+
if (!t.call(a.formatters, s.format))
|
|
1058
1058
|
throw new TypeError("Unknown format option provided.");
|
|
1059
|
-
S =
|
|
1059
|
+
S = s.format;
|
|
1060
1060
|
}
|
|
1061
|
-
var P = a.formatters[S], x =
|
|
1062
|
-
return (typeof
|
|
1063
|
-
addQueryPrefix: typeof
|
|
1064
|
-
allowDots: typeof
|
|
1065
|
-
charset:
|
|
1066
|
-
charsetSentinel: typeof
|
|
1067
|
-
delimiter: typeof
|
|
1068
|
-
encode: typeof
|
|
1069
|
-
encoder: typeof
|
|
1070
|
-
encodeValuesOnly: typeof
|
|
1061
|
+
var P = a.formatters[S], x = b.filter;
|
|
1062
|
+
return (typeof s.filter == "function" || i(s.filter)) && (x = s.filter), {
|
|
1063
|
+
addQueryPrefix: typeof s.addQueryPrefix == "boolean" ? s.addQueryPrefix : b.addQueryPrefix,
|
|
1064
|
+
allowDots: typeof s.allowDots > "u" ? b.allowDots : !!s.allowDots,
|
|
1065
|
+
charset: A,
|
|
1066
|
+
charsetSentinel: typeof s.charsetSentinel == "boolean" ? s.charsetSentinel : b.charsetSentinel,
|
|
1067
|
+
delimiter: typeof s.delimiter > "u" ? b.delimiter : s.delimiter,
|
|
1068
|
+
encode: typeof s.encode == "boolean" ? s.encode : b.encode,
|
|
1069
|
+
encoder: typeof s.encoder == "function" ? s.encoder : b.encoder,
|
|
1070
|
+
encodeValuesOnly: typeof s.encodeValuesOnly == "boolean" ? s.encodeValuesOnly : b.encodeValuesOnly,
|
|
1071
1071
|
filter: x,
|
|
1072
1072
|
format: S,
|
|
1073
1073
|
formatter: P,
|
|
1074
|
-
serializeDate: typeof
|
|
1075
|
-
skipNulls: typeof
|
|
1076
|
-
sort: typeof
|
|
1077
|
-
strictNullHandling: typeof
|
|
1074
|
+
serializeDate: typeof s.serializeDate == "function" ? s.serializeDate : b.serializeDate,
|
|
1075
|
+
skipNulls: typeof s.skipNulls == "boolean" ? s.skipNulls : b.skipNulls,
|
|
1076
|
+
sort: typeof s.sort == "function" ? s.sort : null,
|
|
1077
|
+
strictNullHandling: typeof s.strictNullHandling == "boolean" ? s.strictNullHandling : b.strictNullHandling
|
|
1078
1078
|
};
|
|
1079
1079
|
};
|
|
1080
|
-
return ur = function(c,
|
|
1081
|
-
var
|
|
1082
|
-
typeof S.filter == "function" ? (x = S.filter,
|
|
1080
|
+
return ur = function(c, s) {
|
|
1081
|
+
var A = c, S = g(s), P, x;
|
|
1082
|
+
typeof S.filter == "function" ? (x = S.filter, A = x("", A)) : i(S.filter) && (x = S.filter, P = x);
|
|
1083
1083
|
var T = [];
|
|
1084
|
-
if (typeof
|
|
1084
|
+
if (typeof A != "object" || A === null)
|
|
1085
1085
|
return "";
|
|
1086
|
-
var
|
|
1087
|
-
|
|
1088
|
-
var M = n[
|
|
1089
|
-
if (
|
|
1086
|
+
var N;
|
|
1087
|
+
s && s.arrayFormat in n ? N = s.arrayFormat : s && "indices" in s ? N = s.indices ? "indices" : "repeat" : N = "indices";
|
|
1088
|
+
var M = n[N];
|
|
1089
|
+
if (s && "commaRoundTrip" in s && typeof s.commaRoundTrip != "boolean")
|
|
1090
1090
|
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
1091
|
-
var V = M === "comma" &&
|
|
1092
|
-
P || (P = Object.keys(
|
|
1093
|
-
for (var $ = e(),
|
|
1094
|
-
var F = P[
|
|
1095
|
-
S.skipNulls &&
|
|
1096
|
-
|
|
1091
|
+
var V = M === "comma" && s && s.commaRoundTrip;
|
|
1092
|
+
P || (P = Object.keys(A)), S.sort && P.sort(S.sort);
|
|
1093
|
+
for (var $ = e(), L = 0; L < P.length; ++L) {
|
|
1094
|
+
var F = P[L];
|
|
1095
|
+
S.skipNulls && A[F] === null || p(T, f(
|
|
1096
|
+
A[F],
|
|
1097
1097
|
F,
|
|
1098
1098
|
M,
|
|
1099
1099
|
V,
|
|
@@ -1111,8 +1111,8 @@ function ut() {
|
|
|
1111
1111
|
$
|
|
1112
1112
|
));
|
|
1113
1113
|
}
|
|
1114
|
-
var
|
|
1115
|
-
return S.charsetSentinel && (S.charset === "iso-8859-1" ?
|
|
1114
|
+
var k = T.join(S.delimiter), I = S.addQueryPrefix === !0 ? "?" : "";
|
|
1115
|
+
return S.charsetSentinel && (S.charset === "iso-8859-1" ? I += "utf8=%26%2310003%3B&" : I += "utf8=%E2%9C%93&"), k.length > 0 ? I + k : "";
|
|
1116
1116
|
}, ur;
|
|
1117
1117
|
}
|
|
1118
1118
|
var cr, $r;
|
|
@@ -1136,57 +1136,57 @@ function ct() {
|
|
|
1136
1136
|
parseArrays: !0,
|
|
1137
1137
|
plainObjects: !1,
|
|
1138
1138
|
strictNullHandling: !1
|
|
1139
|
-
}, n = function(
|
|
1140
|
-
return
|
|
1139
|
+
}, n = function(u) {
|
|
1140
|
+
return u.replace(/&#(\d+);/g, function(o, f) {
|
|
1141
1141
|
return String.fromCharCode(parseInt(f, 10));
|
|
1142
1142
|
});
|
|
1143
|
-
}, i = function(
|
|
1144
|
-
return
|
|
1145
|
-
},
|
|
1146
|
-
var g = {}, c = f.ignoreQueryPrefix ? o.replace(/^\?/, "") : o,
|
|
1143
|
+
}, i = function(u, o) {
|
|
1144
|
+
return u && typeof u == "string" && o.comma && u.indexOf(",") > -1 ? u.split(",") : u;
|
|
1145
|
+
}, y = "utf8=%26%2310003%3B", l = "utf8=%E2%9C%93", p = function(o, f) {
|
|
1146
|
+
var g = {}, c = f.ignoreQueryPrefix ? o.replace(/^\?/, "") : o, s = f.parameterLimit === 1 / 0 ? void 0 : f.parameterLimit, A = c.split(f.delimiter, s), S = -1, P, x = f.charset;
|
|
1147
1147
|
if (f.charsetSentinel)
|
|
1148
|
-
for (P = 0; P <
|
|
1149
|
-
|
|
1150
|
-
for (P = 0; P <
|
|
1148
|
+
for (P = 0; P < A.length; ++P)
|
|
1149
|
+
A[P].indexOf("utf8=") === 0 && (A[P] === l ? x = "utf-8" : A[P] === y && (x = "iso-8859-1"), S = P, P = A.length);
|
|
1150
|
+
for (P = 0; P < A.length; ++P)
|
|
1151
1151
|
if (P !== S) {
|
|
1152
|
-
var T =
|
|
1152
|
+
var T = A[P], N = T.indexOf("]="), M = N === -1 ? T.indexOf("=") : N + 1, V, $;
|
|
1153
1153
|
M === -1 ? (V = f.decoder(T, t.decoder, x, "key"), $ = f.strictNullHandling ? null : "") : (V = f.decoder(T.slice(0, M), t.decoder, x, "key"), $ = e.maybeMap(
|
|
1154
1154
|
i(T.slice(M + 1), f),
|
|
1155
|
-
function(
|
|
1156
|
-
return f.decoder(
|
|
1155
|
+
function(L) {
|
|
1156
|
+
return f.decoder(L, t.decoder, x, "value");
|
|
1157
1157
|
}
|
|
1158
1158
|
)), $ && f.interpretNumericEntities && x === "iso-8859-1" && ($ = n($)), T.indexOf("[]=") > -1 && ($ = a($) ? [$] : $), r.call(g, V) ? g[V] = e.combine(g[V], $) : g[V] = $;
|
|
1159
1159
|
}
|
|
1160
1160
|
return g;
|
|
1161
|
-
},
|
|
1162
|
-
for (var c = g ? o : i(o, f),
|
|
1163
|
-
var
|
|
1161
|
+
}, m = function(u, o, f, g) {
|
|
1162
|
+
for (var c = g ? o : i(o, f), s = u.length - 1; s >= 0; --s) {
|
|
1163
|
+
var A, S = u[s];
|
|
1164
1164
|
if (S === "[]" && f.parseArrays)
|
|
1165
|
-
|
|
1165
|
+
A = [].concat(c);
|
|
1166
1166
|
else {
|
|
1167
|
-
|
|
1167
|
+
A = f.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
1168
1168
|
var P = S.charAt(0) === "[" && S.charAt(S.length - 1) === "]" ? S.slice(1, -1) : S, x = parseInt(P, 10);
|
|
1169
|
-
!f.parseArrays && P === "" ?
|
|
1169
|
+
!f.parseArrays && P === "" ? A = { 0: c } : !isNaN(x) && S !== P && String(x) === P && x >= 0 && f.parseArrays && x <= f.arrayLimit ? (A = [], A[x] = c) : P !== "__proto__" && (A[P] = c);
|
|
1170
1170
|
}
|
|
1171
|
-
c =
|
|
1171
|
+
c = A;
|
|
1172
1172
|
}
|
|
1173
1173
|
return c;
|
|
1174
1174
|
}, w = function(o, f, g, c) {
|
|
1175
1175
|
if (o) {
|
|
1176
|
-
var
|
|
1176
|
+
var s = g.allowDots ? o.replace(/\.([^.[]+)/g, "[$1]") : o, A = /(\[[^[\]]*])/, S = /(\[[^[\]]*])/g, P = g.depth > 0 && A.exec(s), x = P ? s.slice(0, P.index) : s, T = [];
|
|
1177
1177
|
if (x) {
|
|
1178
1178
|
if (!g.plainObjects && r.call(Object.prototype, x) && !g.allowPrototypes)
|
|
1179
1179
|
return;
|
|
1180
1180
|
T.push(x);
|
|
1181
1181
|
}
|
|
1182
|
-
for (var
|
|
1183
|
-
if (
|
|
1182
|
+
for (var N = 0; g.depth > 0 && (P = S.exec(s)) !== null && N < g.depth; ) {
|
|
1183
|
+
if (N += 1, !g.plainObjects && r.call(Object.prototype, P[1].slice(1, -1)) && !g.allowPrototypes)
|
|
1184
1184
|
return;
|
|
1185
1185
|
T.push(P[1]);
|
|
1186
1186
|
}
|
|
1187
|
-
return P && T.push("[" +
|
|
1187
|
+
return P && T.push("[" + s.slice(P.index) + "]"), m(T, f, g, c);
|
|
1188
1188
|
}
|
|
1189
|
-
},
|
|
1189
|
+
}, b = function(o) {
|
|
1190
1190
|
if (!o)
|
|
1191
1191
|
return t;
|
|
1192
1192
|
if (o.decoder !== null && o.decoder !== void 0 && typeof o.decoder != "function")
|
|
@@ -1214,12 +1214,12 @@ function ct() {
|
|
|
1214
1214
|
strictNullHandling: typeof o.strictNullHandling == "boolean" ? o.strictNullHandling : t.strictNullHandling
|
|
1215
1215
|
};
|
|
1216
1216
|
};
|
|
1217
|
-
return cr = function(
|
|
1218
|
-
var f =
|
|
1219
|
-
if (
|
|
1217
|
+
return cr = function(u, o) {
|
|
1218
|
+
var f = b(o);
|
|
1219
|
+
if (u === "" || u === null || typeof u > "u")
|
|
1220
1220
|
return f.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
1221
|
-
for (var g = typeof
|
|
1222
|
-
var S =
|
|
1221
|
+
for (var g = typeof u == "string" ? p(u, f) : u, c = f.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, s = Object.keys(g), A = 0; A < s.length; ++A) {
|
|
1222
|
+
var S = s[A], P = w(S, g[S], f, typeof u == "string");
|
|
1223
1223
|
c = e.merge(c, P, f);
|
|
1224
1224
|
}
|
|
1225
1225
|
return f.allowSparse === !0 ? c : e.compact(c);
|
|
@@ -1237,13 +1237,13 @@ 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.7", pt = Ae.CancelToken;
|
|
1241
1241
|
var mt = function(e) {
|
|
1242
1242
|
var r;
|
|
1243
1243
|
typeof window < "u" && (r = e.cache.get("api"));
|
|
1244
1244
|
const a = Ae.getAdapter(Ae.defaults.adapter);
|
|
1245
1245
|
function t(p) {
|
|
1246
|
-
var
|
|
1246
|
+
var m = [
|
|
1247
1247
|
p.method,
|
|
1248
1248
|
p.url,
|
|
1249
1249
|
p.headers?.Authorization,
|
|
@@ -1253,12 +1253,12 @@ var mt = function(e) {
|
|
|
1253
1253
|
data: p.data
|
|
1254
1254
|
})
|
|
1255
1255
|
].filter(Boolean).join("-");
|
|
1256
|
-
return
|
|
1256
|
+
return m;
|
|
1257
1257
|
}
|
|
1258
|
-
const n = {},
|
|
1259
|
-
var
|
|
1260
|
-
return n[
|
|
1261
|
-
var
|
|
1258
|
+
const n = {}, y = l(function(p) {
|
|
1259
|
+
var m = t(p);
|
|
1260
|
+
return n[m] || (n[m] = new Promise(function(w, b) {
|
|
1261
|
+
var u, o;
|
|
1262
1262
|
switch (String(p.method).toLowerCase()) {
|
|
1263
1263
|
case "post":
|
|
1264
1264
|
case "patch":
|
|
@@ -1267,91 +1267,106 @@ var mt = function(e) {
|
|
|
1267
1267
|
p.cache || (p.cache = !1);
|
|
1268
1268
|
break;
|
|
1269
1269
|
}
|
|
1270
|
-
return p.cache === !1 || (
|
|
1270
|
+
return p.cache === !1 || (u = p.cache || r, u && (o = u.get(m))), o ? w(o) : (Object.assign(p, { adapter: a }), Ae.request(p).then(
|
|
1271
1271
|
function(f) {
|
|
1272
|
-
delete n[
|
|
1272
|
+
delete n[m], w(f);
|
|
1273
1273
|
},
|
|
1274
1274
|
function(f) {
|
|
1275
|
-
delete n[
|
|
1275
|
+
delete n[m], b(f);
|
|
1276
1276
|
}
|
|
1277
1277
|
));
|
|
1278
|
-
})), n[
|
|
1278
|
+
})), n[m];
|
|
1279
1279
|
});
|
|
1280
|
-
|
|
1281
|
-
w = w || {},
|
|
1282
|
-
var
|
|
1283
|
-
const
|
|
1284
|
-
w.withoutToken || (delete
|
|
1285
|
-
var o = e.utils.mapParameters(
|
|
1286
|
-
|
|
1287
|
-
var f = `${
|
|
1280
|
+
y.generateEndpointURL = function(p, m, w) {
|
|
1281
|
+
w = w || {}, m = m || {};
|
|
1282
|
+
var b;
|
|
1283
|
+
const u = w.file && e.fileAPI || e.apiURL;
|
|
1284
|
+
w.withoutToken || (delete m.access_token, b = e.auth.getCurrentToken()), p[0] == "/" && p.slice(1);
|
|
1285
|
+
var o = e.utils.mapParameters(m);
|
|
1286
|
+
b ? o = o ? `?access_token=${b}&${o}` : `?access_token=${b}` : o = o ? `?${o}` : "";
|
|
1287
|
+
var f = `${u}${p}${o}`;
|
|
1288
1288
|
return f;
|
|
1289
|
-
},
|
|
1289
|
+
}, y.wasCancelled = function(p) {
|
|
1290
1290
|
return Ae.isCancel(p);
|
|
1291
1291
|
};
|
|
1292
1292
|
function l(p) {
|
|
1293
|
-
var
|
|
1293
|
+
var m = Ae.create({
|
|
1294
1294
|
paramsSerializer: {
|
|
1295
|
-
serialize: (
|
|
1295
|
+
serialize: (b) => dt.stringify(b, { arrayFormat: "repeat" })
|
|
1296
1296
|
},
|
|
1297
1297
|
adapter: p
|
|
1298
1298
|
});
|
|
1299
|
-
|
|
1300
|
-
if (t(
|
|
1301
|
-
return
|
|
1302
|
-
if (
|
|
1299
|
+
m.defaults.baseURL = e.apiURL, m.defaults.headers.common.Accept = "application/json", m.interceptors.request.use(function(b) {
|
|
1300
|
+
if (t(b), b.withoutToken)
|
|
1301
|
+
return b;
|
|
1302
|
+
if (b.headers["qik-request-date"] = (/* @__PURE__ */ new Date()).getTime(), Intl) {
|
|
1303
1303
|
const o = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
1304
|
-
o && (
|
|
1304
|
+
o && (b.headers["qik-request-timezone"] = o);
|
|
1305
1305
|
}
|
|
1306
|
-
|
|
1307
|
-
var
|
|
1308
|
-
return
|
|
1306
|
+
b.headers["qik-api-version"] = vr, e?.socket?.windowID && (b.headers["qik-socket-window"] = e.socket.windowID);
|
|
1307
|
+
var u = e.auth.getCurrentToken();
|
|
1308
|
+
return u && (b.headers.Authorization = `Bearer ${u}`, b.params && b.params.access_token && delete b.params.access_token), b;
|
|
1309
1309
|
});
|
|
1310
1310
|
let w = 0;
|
|
1311
|
-
return
|
|
1312
|
-
function(
|
|
1313
|
-
var
|
|
1311
|
+
return m.interceptors.response.use(
|
|
1312
|
+
function(b) {
|
|
1313
|
+
var u = b.config, o = b.status;
|
|
1314
1314
|
switch (o) {
|
|
1315
1315
|
case 204:
|
|
1316
1316
|
if (w < 5)
|
|
1317
1317
|
return w++, new Promise(function(f, g) {
|
|
1318
1318
|
setTimeout(function() {
|
|
1319
|
-
return
|
|
1319
|
+
return m.request(u).then(f, g);
|
|
1320
1320
|
}, 800);
|
|
1321
1321
|
});
|
|
1322
1322
|
console.log("Failed after 5 retries"), w = 0;
|
|
1323
1323
|
break;
|
|
1324
1324
|
}
|
|
1325
|
-
return
|
|
1325
|
+
return b;
|
|
1326
1326
|
},
|
|
1327
|
-
function(
|
|
1328
|
-
if (Ae.isCancel(
|
|
1329
|
-
return Promise.reject(
|
|
1330
|
-
var
|
|
1331
|
-
switch (
|
|
1327
|
+
function(b) {
|
|
1328
|
+
if (Ae.isCancel(b))
|
|
1329
|
+
return Promise.reject(b);
|
|
1330
|
+
var u = b?.response?.status || b.status;
|
|
1331
|
+
switch (u) {
|
|
1332
1332
|
case 401:
|
|
1333
1333
|
break;
|
|
1334
|
+
case 429: {
|
|
1335
|
+
var o = b.config || {};
|
|
1336
|
+
if (o.__retry429 = (o.__retry429 || 0) + 1, o.__retry429 <= 3) {
|
|
1337
|
+
var f = parseInt(
|
|
1338
|
+
b?.response?.headers?.["retry-after"],
|
|
1339
|
+
10
|
|
1340
|
+
), g = Number.isFinite(f) ? f * 1e3 : 800 * o.__retry429, c = Math.floor(Math.random() * 500);
|
|
1341
|
+
return new Promise(function(s, A) {
|
|
1342
|
+
setTimeout(function() {
|
|
1343
|
+
return m.request(o).then(s, A);
|
|
1344
|
+
}, g + c);
|
|
1345
|
+
});
|
|
1346
|
+
}
|
|
1347
|
+
break;
|
|
1348
|
+
}
|
|
1334
1349
|
case 502:
|
|
1335
1350
|
case 504:
|
|
1336
1351
|
if (w < 5)
|
|
1337
|
-
return w++, new Promise(function(
|
|
1352
|
+
return w++, new Promise(function(s, A) {
|
|
1338
1353
|
setTimeout(function() {
|
|
1339
|
-
return
|
|
1354
|
+
return m.request(b.config).then(s, A);
|
|
1340
1355
|
}, 800);
|
|
1341
1356
|
});
|
|
1342
1357
|
console.log("Failed after 5 retries"), w = 0;
|
|
1343
1358
|
break;
|
|
1344
1359
|
}
|
|
1345
|
-
return Promise.reject(
|
|
1360
|
+
return Promise.reject(b);
|
|
1346
1361
|
}
|
|
1347
|
-
),
|
|
1362
|
+
), m;
|
|
1348
1363
|
}
|
|
1349
|
-
return
|
|
1364
|
+
return y.CancelToken = pt, y.axios = Ae, y;
|
|
1350
1365
|
}, fr, Gr;
|
|
1351
1366
|
function yt() {
|
|
1352
1367
|
if (Gr) return fr;
|
|
1353
1368
|
Gr = 1;
|
|
1354
|
-
var e = "Expected a function", r = "__lodash_hash_undefined__", a = "[object Function]", t = "[object GeneratorFunction]", n = "[object Symbol]", i = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
1369
|
+
var e = "Expected a function", r = "__lodash_hash_undefined__", a = "[object Function]", t = "[object GeneratorFunction]", n = "[object Symbol]", i = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, y = /^\w*$/, l = /^\./, p = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, m = /[\\^$.*+?()[\]{}|]/g, w = /\\(\\)?/g, b = /^\[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")();
|
|
1355
1370
|
function g(d, E) {
|
|
1356
1371
|
return d?.[E];
|
|
1357
1372
|
}
|
|
@@ -1364,45 +1379,45 @@ function yt() {
|
|
|
1364
1379
|
}
|
|
1365
1380
|
return E;
|
|
1366
1381
|
}
|
|
1367
|
-
var
|
|
1382
|
+
var s = Array.prototype, A = Function.prototype, S = Object.prototype, P = f["__core-js_shared__"], x = (function() {
|
|
1368
1383
|
var d = /[^.]+$/.exec(P && P.keys && P.keys.IE_PROTO || "");
|
|
1369
1384
|
return d ? "Symbol(src)_1." + d : "";
|
|
1370
|
-
})(), T =
|
|
1371
|
-
"^" + T.call(
|
|
1372
|
-
), $ = f.Symbol,
|
|
1385
|
+
})(), T = A.toString, N = S.hasOwnProperty, M = S.toString, V = RegExp(
|
|
1386
|
+
"^" + T.call(N).replace(m, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1387
|
+
), $ = f.Symbol, L = s.splice, F = Pe(f, "Map"), k = Pe(Object, "create"), I = $ ? $.prototype : void 0, U = I ? I.toString : void 0;
|
|
1373
1388
|
function z(d) {
|
|
1374
|
-
var E = -1,
|
|
1375
|
-
for (this.clear(); ++E <
|
|
1389
|
+
var E = -1, O = d ? d.length : 0;
|
|
1390
|
+
for (this.clear(); ++E < O; ) {
|
|
1376
1391
|
var G = d[E];
|
|
1377
1392
|
this.set(G[0], G[1]);
|
|
1378
1393
|
}
|
|
1379
1394
|
}
|
|
1380
1395
|
function _() {
|
|
1381
|
-
this.__data__ =
|
|
1396
|
+
this.__data__ = k ? k(null) : {};
|
|
1382
1397
|
}
|
|
1383
1398
|
function Z(d) {
|
|
1384
1399
|
return this.has(d) && delete this.__data__[d];
|
|
1385
1400
|
}
|
|
1386
1401
|
function Q(d) {
|
|
1387
1402
|
var E = this.__data__;
|
|
1388
|
-
if (
|
|
1389
|
-
var
|
|
1390
|
-
return
|
|
1403
|
+
if (k) {
|
|
1404
|
+
var O = E[d];
|
|
1405
|
+
return O === r ? void 0 : O;
|
|
1391
1406
|
}
|
|
1392
|
-
return
|
|
1407
|
+
return N.call(E, d) ? E[d] : void 0;
|
|
1393
1408
|
}
|
|
1394
1409
|
function ne(d) {
|
|
1395
1410
|
var E = this.__data__;
|
|
1396
|
-
return
|
|
1411
|
+
return k ? E[d] !== void 0 : N.call(E, d);
|
|
1397
1412
|
}
|
|
1398
1413
|
function X(d, E) {
|
|
1399
|
-
var
|
|
1400
|
-
return
|
|
1414
|
+
var O = this.__data__;
|
|
1415
|
+
return O[d] = k && E === void 0 ? r : E, this;
|
|
1401
1416
|
}
|
|
1402
1417
|
z.prototype.clear = _, z.prototype.delete = Z, z.prototype.get = Q, z.prototype.has = ne, z.prototype.set = X;
|
|
1403
1418
|
function W(d) {
|
|
1404
|
-
var E = -1,
|
|
1405
|
-
for (this.clear(); ++E <
|
|
1419
|
+
var E = -1, O = d ? d.length : 0;
|
|
1420
|
+
for (this.clear(); ++E < O; ) {
|
|
1406
1421
|
var G = d[E];
|
|
1407
1422
|
this.set(G[0], G[1]);
|
|
1408
1423
|
}
|
|
@@ -1411,27 +1426,27 @@ function yt() {
|
|
|
1411
1426
|
this.__data__ = [];
|
|
1412
1427
|
}
|
|
1413
1428
|
function re(d) {
|
|
1414
|
-
var E = this.__data__,
|
|
1415
|
-
if (
|
|
1429
|
+
var E = this.__data__, O = J(E, d);
|
|
1430
|
+
if (O < 0)
|
|
1416
1431
|
return !1;
|
|
1417
1432
|
var G = E.length - 1;
|
|
1418
|
-
return
|
|
1433
|
+
return O == G ? E.pop() : L.call(E, O, 1), !0;
|
|
1419
1434
|
}
|
|
1420
1435
|
function te(d) {
|
|
1421
|
-
var E = this.__data__,
|
|
1422
|
-
return
|
|
1436
|
+
var E = this.__data__, O = J(E, d);
|
|
1437
|
+
return O < 0 ? void 0 : E[O][1];
|
|
1423
1438
|
}
|
|
1424
1439
|
function ce(d) {
|
|
1425
1440
|
return J(this.__data__, d) > -1;
|
|
1426
1441
|
}
|
|
1427
1442
|
function ue(d, E) {
|
|
1428
|
-
var
|
|
1429
|
-
return G < 0 ?
|
|
1443
|
+
var O = this.__data__, G = J(O, d);
|
|
1444
|
+
return G < 0 ? O.push([d, E]) : O[G][1] = E, this;
|
|
1430
1445
|
}
|
|
1431
1446
|
W.prototype.clear = ie, W.prototype.delete = re, W.prototype.get = te, W.prototype.has = ce, W.prototype.set = ue;
|
|
1432
1447
|
function oe(d) {
|
|
1433
|
-
var E = -1,
|
|
1434
|
-
for (this.clear(); ++E <
|
|
1448
|
+
var E = -1, O = d ? d.length : 0;
|
|
1449
|
+
for (this.clear(); ++E < O; ) {
|
|
1435
1450
|
var G = d[E];
|
|
1436
1451
|
this.set(G[0], G[1]);
|
|
1437
1452
|
}
|
|
@@ -1457,21 +1472,21 @@ function yt() {
|
|
|
1457
1472
|
}
|
|
1458
1473
|
oe.prototype.clear = de, oe.prototype.delete = pe, oe.prototype.get = se, oe.prototype.has = ye, oe.prototype.set = Se;
|
|
1459
1474
|
function J(d, E) {
|
|
1460
|
-
for (var
|
|
1461
|
-
if (we(d[
|
|
1462
|
-
return
|
|
1475
|
+
for (var O = d.length; O--; )
|
|
1476
|
+
if (we(d[O][0], E))
|
|
1477
|
+
return O;
|
|
1463
1478
|
return -1;
|
|
1464
1479
|
}
|
|
1465
1480
|
function ee(d, E) {
|
|
1466
|
-
E =
|
|
1467
|
-
for (var
|
|
1468
|
-
d = d[
|
|
1469
|
-
return
|
|
1481
|
+
E = ke(E, d) ? [E] : Te(E);
|
|
1482
|
+
for (var O = 0, G = E.length; d != null && O < G; )
|
|
1483
|
+
d = d[Ne(E[O++])];
|
|
1484
|
+
return O && O == G ? d : void 0;
|
|
1470
1485
|
}
|
|
1471
1486
|
function Re(d) {
|
|
1472
1487
|
if (!he(d) || _e(d))
|
|
1473
1488
|
return !1;
|
|
1474
|
-
var E =
|
|
1489
|
+
var E = Le(d) || c(d) ? V : b;
|
|
1475
1490
|
return E.test(le(d));
|
|
1476
1491
|
}
|
|
1477
1492
|
function xe(d) {
|
|
@@ -1483,37 +1498,37 @@ function yt() {
|
|
|
1483
1498
|
return E == "0" && 1 / d == -1 / 0 ? "-0" : E;
|
|
1484
1499
|
}
|
|
1485
1500
|
function Te(d) {
|
|
1486
|
-
return
|
|
1501
|
+
return Ce(d) ? d : Oe(d);
|
|
1487
1502
|
}
|
|
1488
1503
|
function me(d, E) {
|
|
1489
|
-
var
|
|
1490
|
-
return
|
|
1504
|
+
var O = d.__data__;
|
|
1505
|
+
return Ie(E) ? O[typeof E == "string" ? "string" : "hash"] : O.map;
|
|
1491
1506
|
}
|
|
1492
1507
|
function Pe(d, E) {
|
|
1493
|
-
var
|
|
1494
|
-
return Re(
|
|
1508
|
+
var O = g(d, E);
|
|
1509
|
+
return Re(O) ? O : void 0;
|
|
1495
1510
|
}
|
|
1496
|
-
function
|
|
1497
|
-
if (
|
|
1511
|
+
function ke(d, E) {
|
|
1512
|
+
if (Ce(d))
|
|
1498
1513
|
return !1;
|
|
1499
|
-
var
|
|
1500
|
-
return
|
|
1514
|
+
var O = typeof d;
|
|
1515
|
+
return O == "number" || O == "symbol" || O == "boolean" || d == null || h(d) ? !0 : y.test(d) || !i.test(d) || E != null && d in Object(E);
|
|
1501
1516
|
}
|
|
1502
|
-
function
|
|
1517
|
+
function Ie(d) {
|
|
1503
1518
|
var E = typeof d;
|
|
1504
1519
|
return E == "string" || E == "number" || E == "symbol" || E == "boolean" ? d !== "__proto__" : d === null;
|
|
1505
1520
|
}
|
|
1506
1521
|
function _e(d) {
|
|
1507
1522
|
return !!x && x in d;
|
|
1508
1523
|
}
|
|
1509
|
-
var
|
|
1524
|
+
var Oe = fe(function(d) {
|
|
1510
1525
|
d = v(d);
|
|
1511
1526
|
var E = [];
|
|
1512
|
-
return l.test(d) && E.push(""), d.replace(p, function(
|
|
1513
|
-
E.push(ae ? K.replace(w, "$1") : G ||
|
|
1527
|
+
return l.test(d) && E.push(""), d.replace(p, function(O, G, ae, K) {
|
|
1528
|
+
E.push(ae ? K.replace(w, "$1") : G || O);
|
|
1514
1529
|
}), E;
|
|
1515
1530
|
});
|
|
1516
|
-
function
|
|
1531
|
+
function Ne(d) {
|
|
1517
1532
|
if (typeof d == "string" || h(d))
|
|
1518
1533
|
return d;
|
|
1519
1534
|
var E = d + "";
|
|
@@ -1535,21 +1550,21 @@ function yt() {
|
|
|
1535
1550
|
function fe(d, E) {
|
|
1536
1551
|
if (typeof d != "function" || E && typeof E != "function")
|
|
1537
1552
|
throw new TypeError(e);
|
|
1538
|
-
var
|
|
1539
|
-
var G = arguments, ae = E ? E.apply(this, G) : G[0], K =
|
|
1553
|
+
var O = function() {
|
|
1554
|
+
var G = arguments, ae = E ? E.apply(this, G) : G[0], K = O.cache;
|
|
1540
1555
|
if (K.has(ae))
|
|
1541
1556
|
return K.get(ae);
|
|
1542
|
-
var
|
|
1543
|
-
return
|
|
1557
|
+
var C = d.apply(this, G);
|
|
1558
|
+
return O.cache = K.set(ae, C), C;
|
|
1544
1559
|
};
|
|
1545
|
-
return
|
|
1560
|
+
return O.cache = new (fe.Cache || oe)(), O;
|
|
1546
1561
|
}
|
|
1547
1562
|
fe.Cache = oe;
|
|
1548
1563
|
function we(d, E) {
|
|
1549
1564
|
return d === E || d !== d && E !== E;
|
|
1550
1565
|
}
|
|
1551
|
-
var
|
|
1552
|
-
function
|
|
1566
|
+
var Ce = Array.isArray;
|
|
1567
|
+
function Le(d) {
|
|
1553
1568
|
var E = he(d) ? M.call(d) : "";
|
|
1554
1569
|
return E == a || E == t;
|
|
1555
1570
|
}
|
|
@@ -1566,9 +1581,9 @@ function yt() {
|
|
|
1566
1581
|
function v(d) {
|
|
1567
1582
|
return d == null ? "" : xe(d);
|
|
1568
1583
|
}
|
|
1569
|
-
function D(d, E,
|
|
1584
|
+
function D(d, E, O) {
|
|
1570
1585
|
var G = d == null ? void 0 : ee(d, E);
|
|
1571
|
-
return G === void 0 ?
|
|
1586
|
+
return G === void 0 ? O : G;
|
|
1572
1587
|
}
|
|
1573
1588
|
return fr = D, fr;
|
|
1574
1589
|
}
|
|
@@ -1578,14 +1593,14 @@ var dr, Dr;
|
|
|
1578
1593
|
function gt() {
|
|
1579
1594
|
if (Dr) return dr;
|
|
1580
1595
|
Dr = 1;
|
|
1581
|
-
var e = "[object Symbol]", r = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, a = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, t = "\\ud800-\\udfff", n = "\\u0300-\\u036f\\ufe20-\\ufe23", i = "\\u20d0-\\u20f0",
|
|
1582
|
-
F + "?" + x + "+" + z + "(?=" + [
|
|
1583
|
-
U + "+" + _ + "(?=" + [
|
|
1584
|
-
F + "?" +
|
|
1596
|
+
var e = "[object Symbol]", r = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, a = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, t = "\\ud800-\\udfff", n = "\\u0300-\\u036f\\ufe20-\\ufe23", i = "\\u20d0-\\u20f0", y = "\\u2700-\\u27bf", l = "a-z\\xdf-\\xf6\\xf8-\\xff", p = "\\xac\\xb1\\xd7\\xf7", m = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", w = "\\u2000-\\u206f", b = " \\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 = p + m + w + b, g = "['’]", c = "[" + t + "]", s = "[" + f + "]", A = "[" + n + i + "]", S = "\\d+", P = "[" + y + "]", x = "[" + l + "]", T = "[^" + t + f + S + y + l + u + "]", N = "\\ud83c[\\udffb-\\udfff]", M = "(?:" + A + "|" + N + ")", V = "[^" + t + "]", $ = "(?:\\ud83c[\\udde6-\\uddff]){2}", L = "[\\ud800-\\udbff][\\udc00-\\udfff]", F = "[" + u + "]", k = "\\u200d", I = "(?:" + x + "|" + T + ")", U = "(?:" + F + "|" + T + ")", z = "(?:" + g + "(?:d|ll|m|re|s|t|ve))?", _ = "(?:" + g + "(?:D|LL|M|RE|S|T|VE))?", Z = M + "?", Q = "[" + o + "]?", ne = "(?:" + k + "(?:" + [V, $, L].join("|") + ")" + Q + Z + ")*", X = Q + Z + ne, W = "(?:" + [P, $, L].join("|") + ")" + X, ie = "(?:" + [V + A + "?", A, $, L, c].join("|") + ")", re = RegExp(g, "g"), te = RegExp(A, "g"), ce = RegExp(N + "(?=" + N + ")|" + ie + X, "g"), ue = RegExp([
|
|
1597
|
+
F + "?" + x + "+" + z + "(?=" + [s, F, "$"].join("|") + ")",
|
|
1598
|
+
U + "+" + _ + "(?=" + [s, F + I, "$"].join("|") + ")",
|
|
1599
|
+
F + "?" + I + "+" + z,
|
|
1585
1600
|
F + "+" + _,
|
|
1586
1601
|
S,
|
|
1587
1602
|
W
|
|
1588
|
-
].join("|"), "g"), oe = RegExp("[" +
|
|
1603
|
+
].join("|"), "g"), oe = RegExp("[" + k + t + n + i + o + "]"), de = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, pe = {
|
|
1589
1604
|
// Latin-1 Supplement block.
|
|
1590
1605
|
À: "A",
|
|
1591
1606
|
Á: "A",
|
|
@@ -1779,91 +1794,91 @@ function gt() {
|
|
|
1779
1794
|
ʼn: "'n",
|
|
1780
1795
|
ſ: "ss"
|
|
1781
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")();
|
|
1782
|
-
function J(
|
|
1783
|
-
for (var Y = -1, Ee =
|
|
1784
|
-
j = B(j,
|
|
1797
|
+
function J(C, B, j, H) {
|
|
1798
|
+
for (var Y = -1, Ee = C ? C.length : 0; ++Y < Ee; )
|
|
1799
|
+
j = B(j, C[Y], Y, C);
|
|
1785
1800
|
return j;
|
|
1786
1801
|
}
|
|
1787
|
-
function ee(
|
|
1788
|
-
return
|
|
1802
|
+
function ee(C) {
|
|
1803
|
+
return C.split("");
|
|
1789
1804
|
}
|
|
1790
|
-
function Re(
|
|
1791
|
-
return
|
|
1805
|
+
function Re(C) {
|
|
1806
|
+
return C.match(r) || [];
|
|
1792
1807
|
}
|
|
1793
|
-
function xe(
|
|
1808
|
+
function xe(C) {
|
|
1794
1809
|
return function(B) {
|
|
1795
|
-
return
|
|
1810
|
+
return C?.[B];
|
|
1796
1811
|
};
|
|
1797
1812
|
}
|
|
1798
1813
|
var Te = xe(pe);
|
|
1799
|
-
function me(
|
|
1800
|
-
return oe.test(
|
|
1814
|
+
function me(C) {
|
|
1815
|
+
return oe.test(C);
|
|
1801
1816
|
}
|
|
1802
|
-
function Pe(
|
|
1803
|
-
return de.test(
|
|
1817
|
+
function Pe(C) {
|
|
1818
|
+
return de.test(C);
|
|
1804
1819
|
}
|
|
1805
|
-
function
|
|
1806
|
-
return me(
|
|
1820
|
+
function ke(C) {
|
|
1821
|
+
return me(C) ? Ie(C) : ee(C);
|
|
1807
1822
|
}
|
|
1808
|
-
function
|
|
1809
|
-
return
|
|
1823
|
+
function Ie(C) {
|
|
1824
|
+
return C.match(ce) || [];
|
|
1810
1825
|
}
|
|
1811
|
-
function _e(
|
|
1812
|
-
return
|
|
1826
|
+
function _e(C) {
|
|
1827
|
+
return C.match(ue) || [];
|
|
1813
1828
|
}
|
|
1814
|
-
var
|
|
1815
|
-
function
|
|
1816
|
-
var H = -1, Y =
|
|
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(C, B, j) {
|
|
1831
|
+
var H = -1, Y = C.length;
|
|
1817
1832
|
B < 0 && (B = -B > Y ? 0 : Y + B), j = j > Y ? Y : j, j < 0 && (j += Y), Y = B > j ? 0 : j - B >>> 0, B >>>= 0;
|
|
1818
1833
|
for (var Ee = Array(Y); ++H < Y; )
|
|
1819
|
-
Ee[H] =
|
|
1834
|
+
Ee[H] = C[H + B];
|
|
1820
1835
|
return Ee;
|
|
1821
1836
|
}
|
|
1822
|
-
function
|
|
1823
|
-
if (typeof
|
|
1824
|
-
return
|
|
1825
|
-
if (D(
|
|
1826
|
-
return we ? we.call(
|
|
1827
|
-
var B =
|
|
1828
|
-
return B == "0" && 1 /
|
|
1837
|
+
function Le(C) {
|
|
1838
|
+
if (typeof C == "string")
|
|
1839
|
+
return C;
|
|
1840
|
+
if (D(C))
|
|
1841
|
+
return we ? we.call(C) : "";
|
|
1842
|
+
var B = C + "";
|
|
1843
|
+
return B == "0" && 1 / C == -1 / 0 ? "-0" : B;
|
|
1829
1844
|
}
|
|
1830
|
-
function he(
|
|
1831
|
-
var H =
|
|
1832
|
-
return j = j === void 0 ? H : j, !B && j >= H ?
|
|
1845
|
+
function he(C, B, j) {
|
|
1846
|
+
var H = C.length;
|
|
1847
|
+
return j = j === void 0 ? H : j, !B && j >= H ? C : Ce(C, B, j);
|
|
1833
1848
|
}
|
|
1834
|
-
function ge(
|
|
1849
|
+
function ge(C) {
|
|
1835
1850
|
return function(B) {
|
|
1836
1851
|
B = d(B);
|
|
1837
|
-
var j = me(B) ?
|
|
1838
|
-
return H[
|
|
1852
|
+
var j = me(B) ? ke(B) : void 0, H = j ? j[0] : B.charAt(0), Y = j ? he(j, 1).join("") : B.slice(1);
|
|
1853
|
+
return H[C]() + Y;
|
|
1839
1854
|
};
|
|
1840
1855
|
}
|
|
1841
|
-
function h(
|
|
1856
|
+
function h(C) {
|
|
1842
1857
|
return function(B) {
|
|
1843
|
-
return J(K(G(B).replace(re, "")),
|
|
1858
|
+
return J(K(G(B).replace(re, "")), C, "");
|
|
1844
1859
|
};
|
|
1845
1860
|
}
|
|
1846
|
-
function v(
|
|
1847
|
-
return !!
|
|
1861
|
+
function v(C) {
|
|
1862
|
+
return !!C && typeof C == "object";
|
|
1848
1863
|
}
|
|
1849
|
-
function D(
|
|
1850
|
-
return typeof
|
|
1864
|
+
function D(C) {
|
|
1865
|
+
return typeof C == "symbol" || v(C) && Ne.call(C) == e;
|
|
1851
1866
|
}
|
|
1852
|
-
function d(
|
|
1853
|
-
return
|
|
1867
|
+
function d(C) {
|
|
1868
|
+
return C == null ? "" : Le(C);
|
|
1854
1869
|
}
|
|
1855
|
-
var E = h(function(
|
|
1856
|
-
return B = B.toLowerCase(),
|
|
1870
|
+
var E = h(function(C, B, j) {
|
|
1871
|
+
return B = B.toLowerCase(), C + (j ? O(B) : B);
|
|
1857
1872
|
});
|
|
1858
|
-
function C
|
|
1859
|
-
return ae(d(
|
|
1873
|
+
function O(C) {
|
|
1874
|
+
return ae(d(C).toLowerCase());
|
|
1860
1875
|
}
|
|
1861
|
-
function G(
|
|
1862
|
-
return
|
|
1876
|
+
function G(C) {
|
|
1877
|
+
return C = d(C), C && C.replace(a, Te).replace(te, "");
|
|
1863
1878
|
}
|
|
1864
1879
|
var ae = ge("toUpperCase");
|
|
1865
|
-
function K(
|
|
1866
|
-
return
|
|
1880
|
+
function K(C, B, j) {
|
|
1881
|
+
return C = d(C), B = B, B === void 0 ? Pe(C) ? _e(C) : Re(C) : C.match(B) || [];
|
|
1867
1882
|
}
|
|
1868
1883
|
return dr = E, dr;
|
|
1869
1884
|
}
|
|
@@ -1875,10 +1890,10 @@ function bt() {
|
|
|
1875
1890
|
jr = 1, Object.defineProperty(ve, "__esModule", {
|
|
1876
1891
|
value: !0
|
|
1877
1892
|
});
|
|
1878
|
-
var e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(
|
|
1879
|
-
return typeof
|
|
1880
|
-
} : function(
|
|
1881
|
-
return
|
|
1893
|
+
var e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(y) {
|
|
1894
|
+
return typeof y;
|
|
1895
|
+
} : function(y) {
|
|
1896
|
+
return y && typeof Symbol == "function" && y.constructor === Symbol && y !== Symbol.prototype ? "symbol" : typeof y;
|
|
1882
1897
|
}, r = typeof window < "u" && typeof window.document < "u", a = typeof process < "u" && process.versions != null && process.versions.node != null, t = (typeof self > "u" ? "undefined" : e(self)) === "object" && self.constructor && self.constructor.name === "DedicatedWorkerGlobalScope", n = typeof window < "u" && window.name === "nodejs" || typeof navigator < "u" && (navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom")), i = typeof Deno < "u" && typeof Deno.core < "u";
|
|
1883
1898
|
return ve.isBrowser = r, ve.isWebWorker = t, ve.isNode = a, ve.isJsDom = n, ve.isDeno = i, ve;
|
|
1884
1899
|
}
|
|
@@ -1979,8 +1994,8 @@ R.isValidEmailAddress = function(e) {
|
|
|
1979
1994
|
if (t.length > 64) return !1;
|
|
1980
1995
|
if (n.length > 255) return !1;
|
|
1981
1996
|
var i = n.split(".");
|
|
1982
|
-
return !(i.some(function(
|
|
1983
|
-
return
|
|
1997
|
+
return !(i.some(function(y) {
|
|
1998
|
+
return y.length > 63;
|
|
1984
1999
|
}) || !r.test(e));
|
|
1985
2000
|
};
|
|
1986
2001
|
R.parseEmail = function(e) {
|
|
@@ -2025,8 +2040,8 @@ R.cleanValue = function(e, r, a) {
|
|
|
2025
2040
|
return typeof e == "object" && e !== null && !Array.isArray(e) ? e : void 0;
|
|
2026
2041
|
case "string":
|
|
2027
2042
|
if (R.exists(e)) {
|
|
2028
|
-
var
|
|
2029
|
-
return
|
|
2043
|
+
var y = String(e);
|
|
2044
|
+
return y == "[object Object]" ? void 0 : y;
|
|
2030
2045
|
} else
|
|
2031
2046
|
return;
|
|
2032
2047
|
// if(!data) {
|
|
@@ -2058,8 +2073,8 @@ R.isValidValue = function(e, r, a) {
|
|
|
2058
2073
|
case "date":
|
|
2059
2074
|
if (a && (typeof e != "object" || !(e instanceof Date)))
|
|
2060
2075
|
return !1;
|
|
2061
|
-
var
|
|
2062
|
-
return
|
|
2076
|
+
var y = R.parseDate(e);
|
|
2077
|
+
return y !== void 0;
|
|
2063
2078
|
case "email":
|
|
2064
2079
|
a ? i = e === R.parseEmail(e) : i = String(e).toLowerCase() === R.parseEmail(e);
|
|
2065
2080
|
break;
|
|
@@ -2072,8 +2087,8 @@ R.isValidValue = function(e, r, a) {
|
|
|
2072
2087
|
a ? i = n && Number(e) === R.parseInt(e) : i = Number(e) === R.parseInt(e);
|
|
2073
2088
|
break;
|
|
2074
2089
|
case "boolean":
|
|
2075
|
-
var
|
|
2076
|
-
a ? (e === !0 || e === !1) && (i = e ===
|
|
2090
|
+
var y = R.parseBoolean(e);
|
|
2091
|
+
a ? (e === !0 || e === !1) && (i = e === y) : i = y === !0 || y === !1;
|
|
2077
2092
|
break;
|
|
2078
2093
|
case "reference":
|
|
2079
2094
|
a ? i = String(e) === R.id(e) : i = !!R.id(e);
|
|
@@ -2137,20 +2152,20 @@ R.getAllFields = function(e) {
|
|
|
2137
2152
|
fields: n
|
|
2138
2153
|
};
|
|
2139
2154
|
t.push(i);
|
|
2140
|
-
var
|
|
2155
|
+
var y = {
|
|
2141
2156
|
title: "Data",
|
|
2142
2157
|
minimum: 1,
|
|
2143
2158
|
maximum: 1,
|
|
2144
2159
|
key: "data",
|
|
2145
2160
|
asObject: !0,
|
|
2146
2161
|
type: "group",
|
|
2147
|
-
fields: n.map(function(
|
|
2148
|
-
return
|
|
2162
|
+
fields: n.map(function(m) {
|
|
2163
|
+
return m.type === "reference" && (m = JSON.parse(JSON.stringify(m)), delete m.fields), m;
|
|
2149
2164
|
})
|
|
2150
2165
|
};
|
|
2151
|
-
t.push(
|
|
2166
|
+
t.push(y);
|
|
2152
2167
|
} else {
|
|
2153
|
-
var
|
|
2168
|
+
var y = {
|
|
2154
2169
|
title: `${e.title}`,
|
|
2155
2170
|
minimum: 1,
|
|
2156
2171
|
maximum: 1,
|
|
@@ -2159,7 +2174,7 @@ R.getAllFields = function(e) {
|
|
|
2159
2174
|
type: "group",
|
|
2160
2175
|
fields: n
|
|
2161
2176
|
};
|
|
2162
|
-
t.push(
|
|
2177
|
+
t.push(y);
|
|
2163
2178
|
}
|
|
2164
2179
|
r && (t.push({
|
|
2165
2180
|
title: "Age",
|
|
@@ -2175,32 +2190,32 @@ R.getAllFields = function(e) {
|
|
|
2175
2190
|
type: "date"
|
|
2176
2191
|
}));
|
|
2177
2192
|
var l = R.mapFields(t).filter(function(p) {
|
|
2178
|
-
var
|
|
2179
|
-
return !
|
|
2193
|
+
var m = p.type == "group" && p.asObject && p.minimum == 1 && p.maximum == 1;
|
|
2194
|
+
return !m;
|
|
2180
2195
|
}).map(function(p) {
|
|
2181
2196
|
return p.title = p.filterTitle || p.titles.filter(Boolean).join(" › "), p;
|
|
2182
|
-
}).sort(function(p,
|
|
2183
|
-
return p.title <
|
|
2197
|
+
}).sort(function(p, m) {
|
|
2198
|
+
return p.title < m.title ? -1 : 1;
|
|
2184
2199
|
});
|
|
2185
2200
|
return l;
|
|
2186
2201
|
};
|
|
2187
2202
|
R.mapFields = function(e, r) {
|
|
2188
2203
|
r || (r = {});
|
|
2189
|
-
var a = [], t = [], n = [], i = 1,
|
|
2204
|
+
var a = [], t = [], n = [], i = 1, y = r.depth, l = r.arrayDelimeter || "[]";
|
|
2190
2205
|
e.forEach(p);
|
|
2191
|
-
function p(
|
|
2192
|
-
var
|
|
2193
|
-
c.trail = t.slice(), c.trail.push(
|
|
2194
|
-
var
|
|
2195
|
-
if (
|
|
2206
|
+
function p(m, w) {
|
|
2207
|
+
var b = m.key, u = m.type == "group", o = m.minimum === m.maximum && m.minimum === 1, f = m.asObject, g = u && !f, c = r.original ? m : R.clone(m);
|
|
2208
|
+
c.trail = t.slice(), c.trail.push(b), c.path = c.trail.join("."), c.titles = n.slice(), c.titles.push(m.filterTitle || m.title || ""), (!g || r.includeLayout) && a.push(c);
|
|
2209
|
+
var A = y && i >= y;
|
|
2210
|
+
if (m.fields && m.fields.length)
|
|
2196
2211
|
if (g)
|
|
2197
|
-
|
|
2212
|
+
m.fields.forEach(p);
|
|
2198
2213
|
else {
|
|
2199
|
-
if (
|
|
2214
|
+
if (A)
|
|
2200
2215
|
return;
|
|
2201
2216
|
i++;
|
|
2202
|
-
let S =
|
|
2203
|
-
r.includeArrayDelimeter && (o || (S = `${
|
|
2217
|
+
let S = b;
|
|
2218
|
+
r.includeArrayDelimeter && (o || (S = `${b}${l}`)), t.push(S), n.push(m.filterTitle || m.title), m.fields.forEach(p), i--, t.pop(), n.pop();
|
|
2204
2219
|
}
|
|
2205
2220
|
}
|
|
2206
2221
|
return a;
|
|
@@ -2315,38 +2330,38 @@ R.hash = function(e, r) {
|
|
|
2315
2330
|
return a[n] = t, a;
|
|
2316
2331
|
}, {});
|
|
2317
2332
|
};
|
|
2318
|
-
R.extractFromArray = function(e, r, a, t, n, i,
|
|
2319
|
-
|
|
2320
|
-
var l = e.reduce(function(p,
|
|
2321
|
-
var w = je(
|
|
2322
|
-
return
|
|
2333
|
+
R.extractFromArray = function(e, r, a, t, n, i, y) {
|
|
2334
|
+
y = y || {}, a && (y.sum = a), t && (y.flatten = !0), n && (y.unique = !0), i && (y.excludeNull = !0);
|
|
2335
|
+
var l = e.reduce(function(p, m) {
|
|
2336
|
+
var w = je(m, r), b = !w && w !== !1 && w !== 0;
|
|
2337
|
+
return y.excludeNull && b || p.push(w), p;
|
|
2323
2338
|
}, []);
|
|
2324
|
-
return
|
|
2325
|
-
return p +
|
|
2339
|
+
return y.flatten && (l = l.flat()), y.unique && (l = [...new Set(l)]), y.sum && (l = l.reduce(function(p, m) {
|
|
2340
|
+
return p + m;
|
|
2326
2341
|
}, 0)), l;
|
|
2327
2342
|
};
|
|
2328
2343
|
R.matchInArray = function(e, r, a, t) {
|
|
2329
2344
|
var n = e.filter(function(i) {
|
|
2330
|
-
var
|
|
2345
|
+
var y = je(i, r), l;
|
|
2331
2346
|
switch (t) {
|
|
2332
2347
|
case "in":
|
|
2333
|
-
l =
|
|
2348
|
+
l = y.includes(a);
|
|
2334
2349
|
break;
|
|
2335
2350
|
case ">=":
|
|
2336
|
-
l =
|
|
2351
|
+
l = y >= a;
|
|
2337
2352
|
break;
|
|
2338
2353
|
case "<=":
|
|
2339
|
-
l =
|
|
2354
|
+
l = y <= a;
|
|
2340
2355
|
break;
|
|
2341
2356
|
case "<":
|
|
2342
|
-
l =
|
|
2357
|
+
l = y < a;
|
|
2343
2358
|
break;
|
|
2344
2359
|
case ">":
|
|
2345
|
-
l =
|
|
2360
|
+
l = y > a;
|
|
2346
2361
|
break;
|
|
2347
2362
|
case "==":
|
|
2348
2363
|
default:
|
|
2349
|
-
a === void 0 ? l =
|
|
2364
|
+
a === void 0 ? l = y : l = y == a;
|
|
2350
2365
|
break;
|
|
2351
2366
|
}
|
|
2352
2367
|
return l;
|
|
@@ -2638,35 +2653,35 @@ var Pt = function(e) {
|
|
|
2638
2653
|
var p = r.getUser();
|
|
2639
2654
|
t.onChange && t.onChange(p), n.dispatch("change", p, l);
|
|
2640
2655
|
}
|
|
2641
|
-
t.set = function(l, p,
|
|
2656
|
+
t.set = function(l, p, m) {
|
|
2642
2657
|
const w = r.getUser();
|
|
2643
|
-
if (JSON.stringify(w) != JSON.stringify(l) && (r.setUser(l), !
|
|
2658
|
+
if (JSON.stringify(w) != JSON.stringify(l) && (r.setUser(l), !m))
|
|
2644
2659
|
return i(p);
|
|
2645
2660
|
}, t.logout = function() {
|
|
2646
2661
|
return r.clearUser(), e.cache.reset(), i();
|
|
2647
2662
|
}, t.changeOrganisation = function(l, p) {
|
|
2648
2663
|
l = e.utils.id(l), p || (p = {});
|
|
2649
|
-
var
|
|
2650
|
-
return p.disableAutoAuthentication && (
|
|
2651
|
-
e.api.post(`/user/switch/${l}`).then(function(
|
|
2652
|
-
|
|
2653
|
-
}).catch(
|
|
2664
|
+
var m = !0;
|
|
2665
|
+
return p.disableAutoAuthentication && (m = !1), new Promise(function(w, b) {
|
|
2666
|
+
e.api.post(`/user/switch/${l}`).then(function(u) {
|
|
2667
|
+
m && (e.cache.reset(), t.set(u.data)), w(u.data);
|
|
2668
|
+
}).catch(b);
|
|
2654
2669
|
});
|
|
2655
2670
|
}, t.impersonate = function(l, p) {
|
|
2656
2671
|
l = e.utils.id(l), p || (p = {});
|
|
2657
|
-
var
|
|
2658
|
-
p.disableAutoAuthentication && (
|
|
2672
|
+
var m = !0;
|
|
2673
|
+
p.disableAutoAuthentication && (m = !1);
|
|
2659
2674
|
var w = e.api.post(`/user/impersonate/${l}`);
|
|
2660
|
-
return w.then(function(
|
|
2661
|
-
|
|
2662
|
-
}, function(
|
|
2675
|
+
return w.then(function(b) {
|
|
2676
|
+
m && (e.cache.reset(), t.set(b.data));
|
|
2677
|
+
}, function(b) {
|
|
2663
2678
|
}), w;
|
|
2664
2679
|
}, t.login = async function(l, p) {
|
|
2665
2680
|
p || (p = {});
|
|
2666
|
-
var
|
|
2667
|
-
p.disableAutoAuthentication && (
|
|
2668
|
-
var w = new Promise(
|
|
2669
|
-
function
|
|
2681
|
+
var m = !0;
|
|
2682
|
+
p.disableAutoAuthentication && (m = !1);
|
|
2683
|
+
var w = new Promise(b);
|
|
2684
|
+
function b(u, o) {
|
|
2670
2685
|
if (!l)
|
|
2671
2686
|
return o({
|
|
2672
2687
|
message: "Login requires an email and password"
|
|
@@ -2684,17 +2699,17 @@ var Pt = function(e) {
|
|
|
2684
2699
|
};
|
|
2685
2700
|
r.isCookieMode && r.isCookieMode() && (l.useCookies = !0, f.withCredentials = !0);
|
|
2686
2701
|
var c = `${e.apiURL}/user/login`;
|
|
2687
|
-
p.url && (c = p.url), e.api.post(c, l, f).then(function(
|
|
2688
|
-
|
|
2702
|
+
p.url && (c = p.url), e.api.post(c, l, f).then(function(s) {
|
|
2703
|
+
m && t.set(s.data), u(s);
|
|
2689
2704
|
}, o);
|
|
2690
2705
|
}
|
|
2691
2706
|
return w;
|
|
2692
2707
|
}, t.signup = async function(l, p) {
|
|
2693
2708
|
p || (p = {});
|
|
2694
|
-
var
|
|
2695
|
-
p.disableAutoAuthentication && (
|
|
2696
|
-
var w = new Promise(
|
|
2697
|
-
function
|
|
2709
|
+
var m = !0;
|
|
2710
|
+
p.disableAutoAuthentication && (m = !1);
|
|
2711
|
+
var w = new Promise(b);
|
|
2712
|
+
function b(u, o) {
|
|
2698
2713
|
if (!l)
|
|
2699
2714
|
return o({
|
|
2700
2715
|
message: "Signup details are required"
|
|
@@ -2728,40 +2743,40 @@ var Pt = function(e) {
|
|
|
2728
2743
|
};
|
|
2729
2744
|
r.isCookieMode && r.isCookieMode() && (l.useCookies = !0, f.withCredentials = !0);
|
|
2730
2745
|
var c = `${e.apiURL}/user/signup`;
|
|
2731
|
-
p.application && (c = `${e.domain || ""}/qik/application/signup`), p.url && (c = p.url), e.api.post(c, l, f).then(function(
|
|
2732
|
-
|
|
2746
|
+
p.application && (c = `${e.domain || ""}/qik/application/signup`), p.url && (c = p.url), e.api.post(c, l, f).then(function(s) {
|
|
2747
|
+
m && t.set(s.data), u(s);
|
|
2733
2748
|
}, o);
|
|
2734
2749
|
}
|
|
2735
2750
|
return w;
|
|
2736
2751
|
}, t.retrieveUserFromResetToken = async function(l, p) {
|
|
2737
2752
|
p || (p = {});
|
|
2738
|
-
var
|
|
2753
|
+
var m = {
|
|
2739
2754
|
bypassInterceptor: !0
|
|
2740
2755
|
};
|
|
2741
|
-
return new Promise(function(w,
|
|
2742
|
-
e.api.get(p.url || `${e.apiURL}/user/reset/${l}`,
|
|
2743
|
-
return w(
|
|
2744
|
-
},
|
|
2756
|
+
return new Promise(function(w, b) {
|
|
2757
|
+
e.api.get(p.url || `${e.apiURL}/user/reset/${l}`, m).then(function(u) {
|
|
2758
|
+
return w(u.data);
|
|
2759
|
+
}, b);
|
|
2745
2760
|
});
|
|
2746
|
-
}, t.updateUserWithToken = async function(l, p,
|
|
2747
|
-
|
|
2761
|
+
}, t.updateUserWithToken = async function(l, p, m) {
|
|
2762
|
+
m || (m = {});
|
|
2748
2763
|
var w = !0;
|
|
2749
|
-
return
|
|
2764
|
+
return m.disableAutoAuthentication && (w = !1), new Promise(function(b, u) {
|
|
2750
2765
|
var o = {
|
|
2751
2766
|
bypassInterceptor: !0
|
|
2752
2767
|
};
|
|
2753
|
-
e.api.post(
|
|
2754
|
-
return w && (e.cache.reset(), t.set(f.data)),
|
|
2755
|
-
},
|
|
2768
|
+
e.api.post(m.url || `${e.apiURL}/user/reset/${l}`, p, o).then(function(f) {
|
|
2769
|
+
return w && (e.cache.reset(), t.set(f.data)), b(f.data);
|
|
2770
|
+
}, u);
|
|
2756
2771
|
});
|
|
2757
2772
|
}, t.sendResetPasswordRequest = function(l, p) {
|
|
2758
2773
|
return p || (p = {}), l ? !l.email || !l.email.length ? Promise.reject({
|
|
2759
2774
|
message: "An email address is required for password reset"
|
|
2760
|
-
}) : new Promise(function(
|
|
2761
|
-
var
|
|
2775
|
+
}) : new Promise(function(m, w) {
|
|
2776
|
+
var b = {
|
|
2762
2777
|
bypassInterceptor: !0
|
|
2763
2778
|
};
|
|
2764
|
-
e.api.post(p.url || `${e.apiURL}/user/forgot`, l,
|
|
2779
|
+
e.api.post(p.url || `${e.apiURL}/user/forgot`, l, b).then(m, w);
|
|
2765
2780
|
}) : Promise.reject({
|
|
2766
2781
|
message: "Please provide your account details to reset your password"
|
|
2767
2782
|
});
|
|
@@ -2774,53 +2789,53 @@ var Pt = function(e) {
|
|
|
2774
2789
|
var { token: w } = p;
|
|
2775
2790
|
if (!w)
|
|
2776
2791
|
return Promise.reject("No token");
|
|
2777
|
-
var
|
|
2778
|
-
|
|
2779
|
-
var
|
|
2780
|
-
return l ? await t.refreshAccessToken(w.refreshToken) :
|
|
2792
|
+
var b = /* @__PURE__ */ new Date();
|
|
2793
|
+
b.setSeconds(b.getSeconds() + a);
|
|
2794
|
+
var u = new Date(w.expires);
|
|
2795
|
+
return l ? await t.refreshAccessToken(w.refreshToken) : b < u ? w : await t.refreshAccessToken(w.refreshToken);
|
|
2781
2796
|
};
|
|
2782
|
-
const
|
|
2797
|
+
const y = {};
|
|
2783
2798
|
return t.refreshAccessToken = async function(l) {
|
|
2784
|
-
if (
|
|
2785
|
-
return
|
|
2799
|
+
if (y.inflightRefreshRequest)
|
|
2800
|
+
return y.inflightRefreshRequest;
|
|
2786
2801
|
const p = r.isCookieMode && r.isCookieMode();
|
|
2787
|
-
return
|
|
2788
|
-
let
|
|
2802
|
+
return y.inflightRefreshRequest = new Promise(function(m, w) {
|
|
2803
|
+
let b = {}, u = {
|
|
2789
2804
|
bypassInterceptor: !0,
|
|
2790
2805
|
withoutToken: !0
|
|
2791
2806
|
};
|
|
2792
2807
|
if (p)
|
|
2793
|
-
|
|
2808
|
+
u.withCredentials = !0;
|
|
2794
2809
|
else {
|
|
2795
2810
|
if (!l)
|
|
2796
|
-
return
|
|
2797
|
-
|
|
2811
|
+
return y.inflightRefreshRequest = null, w(new Error("No refresh token provided for localStorage mode"));
|
|
2812
|
+
b.refreshToken = l;
|
|
2798
2813
|
}
|
|
2799
|
-
e.api.post("/user/refresh",
|
|
2814
|
+
e.api.post("/user/refresh", b, u).then(function(f) {
|
|
2800
2815
|
if (!f || !f.data)
|
|
2801
|
-
return
|
|
2816
|
+
return y.inflightRefreshRequest = null, w(new Error("Invalid refresh response"));
|
|
2802
2817
|
if (t.set(f.data), i(), p)
|
|
2803
|
-
|
|
2818
|
+
m("cookie_token_refreshed");
|
|
2804
2819
|
else {
|
|
2805
2820
|
const g = f.data.token?.accessToken;
|
|
2806
|
-
g ?
|
|
2821
|
+
g ? m(g) : w(new Error("No access token in refresh response"));
|
|
2807
2822
|
}
|
|
2808
2823
|
setTimeout(function() {
|
|
2809
|
-
|
|
2824
|
+
y.inflightRefreshRequest = null;
|
|
2810
2825
|
});
|
|
2811
2826
|
}).catch(function(o) {
|
|
2812
2827
|
setTimeout(function() {
|
|
2813
|
-
|
|
2828
|
+
y.inflightRefreshRequest = null;
|
|
2814
2829
|
}), w(o);
|
|
2815
2830
|
});
|
|
2816
|
-
}),
|
|
2831
|
+
}), y.inflightRefreshRequest;
|
|
2817
2832
|
}, t.sync = function() {
|
|
2818
2833
|
return e.api.get("/user").then(function(l) {
|
|
2819
2834
|
if (l.data) {
|
|
2820
2835
|
const p = r.getUser();
|
|
2821
2836
|
if (p) {
|
|
2822
|
-
const
|
|
2823
|
-
|
|
2837
|
+
const m = { ...p };
|
|
2838
|
+
m.session ? Object.assign(m.session, l.data) : m.session = l.data, t.set(m);
|
|
2824
2839
|
} else
|
|
2825
2840
|
t.set(l.data);
|
|
2826
2841
|
} else
|
|
@@ -2838,9 +2853,9 @@ var Pt = function(e) {
|
|
|
2838
2853
|
var p = t.getCurrentUser();
|
|
2839
2854
|
if (!p)
|
|
2840
2855
|
return e.applicationToken ? e.applicationToken : void 0;
|
|
2841
|
-
var { token:
|
|
2842
|
-
if (
|
|
2843
|
-
return
|
|
2856
|
+
var { token: m } = p;
|
|
2857
|
+
if (m)
|
|
2858
|
+
return m.accessToken;
|
|
2844
2859
|
}, e.api.interceptors.request.use(
|
|
2845
2860
|
async function(l) {
|
|
2846
2861
|
if (l.bypassInterceptor)
|
|
@@ -2848,25 +2863,25 @@ var Pt = function(e) {
|
|
|
2848
2863
|
var p = l;
|
|
2849
2864
|
if (r.isCookieMode && r.isCookieMode())
|
|
2850
2865
|
return p.withCredentials || (p.withCredentials = !0), p;
|
|
2851
|
-
var w = t.getCurrentUser(),
|
|
2866
|
+
var w = t.getCurrentUser(), b, u, o;
|
|
2852
2867
|
if (w) {
|
|
2853
2868
|
var { token: f } = w;
|
|
2854
|
-
f && (
|
|
2869
|
+
f && (b = f.accessToken, u = f.refreshToken, o = f.expires);
|
|
2855
2870
|
}
|
|
2856
|
-
if (
|
|
2857
|
-
p.headers.Authorization = `Bearer ${
|
|
2871
|
+
if (b)
|
|
2872
|
+
p.headers.Authorization = `Bearer ${b}`;
|
|
2858
2873
|
else
|
|
2859
2874
|
return p;
|
|
2860
|
-
if (!
|
|
2875
|
+
if (!u)
|
|
2861
2876
|
return p;
|
|
2862
2877
|
var g = /* @__PURE__ */ new Date();
|
|
2863
2878
|
g.setSeconds(g.getSeconds() + a);
|
|
2864
2879
|
var c = new Date(o);
|
|
2865
|
-
return g < c ? p : new Promise(async function(
|
|
2866
|
-
await t.refreshAccessToken(
|
|
2867
|
-
return p.headers.Authorization = `Bearer ${S}`,
|
|
2880
|
+
return g < c ? p : new Promise(async function(s, A) {
|
|
2881
|
+
await t.refreshAccessToken(u).then(function(S) {
|
|
2882
|
+
return p.headers.Authorization = `Bearer ${S}`, s(p);
|
|
2868
2883
|
}).catch(function(S) {
|
|
2869
|
-
return
|
|
2884
|
+
return A(S);
|
|
2870
2885
|
});
|
|
2871
2886
|
});
|
|
2872
2887
|
},
|
|
@@ -2929,8 +2944,8 @@ q.activeFilters = function(e) {
|
|
|
2929
2944
|
function a(t, n) {
|
|
2930
2945
|
if (t) {
|
|
2931
2946
|
var i = q.isValidFilter(t);
|
|
2932
|
-
i && n.push(t), t.filters && t.filters.length && t.filters.forEach(function(
|
|
2933
|
-
a(
|
|
2947
|
+
i && n.push(t), t.filters && t.filters.length && t.filters.forEach(function(y) {
|
|
2948
|
+
a(y, n);
|
|
2934
2949
|
});
|
|
2935
2950
|
}
|
|
2936
2951
|
}
|
|
@@ -2939,8 +2954,8 @@ q.activeFilterKeys = function(e, r) {
|
|
|
2939
2954
|
r = r || {};
|
|
2940
2955
|
var a = q.activeFilters(e), t = a.filter(function(i) {
|
|
2941
2956
|
return !i.operator;
|
|
2942
|
-
}).reduce(function(i,
|
|
2943
|
-
var l = q.cleanKey(
|
|
2957
|
+
}).reduce(function(i, y) {
|
|
2958
|
+
var l = q.cleanKey(y.key);
|
|
2944
2959
|
return r.trimArrayDelimeters !== !1 && (l = l.split("[]").join("")), i[l] = !0, i;
|
|
2945
2960
|
}, {}), n = Object.keys(t);
|
|
2946
2961
|
return n;
|
|
@@ -2969,8 +2984,8 @@ q.activeFilterValues = function(e, r) {
|
|
|
2969
2984
|
}
|
|
2970
2985
|
var n = a.filter(function(i) {
|
|
2971
2986
|
return !i.operator;
|
|
2972
|
-
}).reduce(function(i,
|
|
2973
|
-
return i = [...i, ...(
|
|
2987
|
+
}).reduce(function(i, y) {
|
|
2988
|
+
return i = [...i, ...(y.values || []).map(t), t(y.value), t(y.value2)], i;
|
|
2974
2989
|
}, []).filter(Kr);
|
|
2975
2990
|
return n;
|
|
2976
2991
|
};
|
|
@@ -2978,21 +2993,21 @@ q.filterChangeString = function(e) {
|
|
|
2978
2993
|
var r = q.activeFilters(e);
|
|
2979
2994
|
return JSON.stringify(r);
|
|
2980
2995
|
};
|
|
2981
|
-
function
|
|
2996
|
+
function Ot(e) {
|
|
2982
2997
|
var r = {};
|
|
2983
2998
|
return r.downloadUrl = function(a, t, n, i) {
|
|
2984
2999
|
return i = i || {}, n = n || {}, n.download = !0, t = e.utils.id(t), e.api.generateEndpointURL(`/${a}/${t}`, n, i);
|
|
2985
3000
|
}, r.duration = function(a) {
|
|
2986
|
-
const t = Math.round(a), n = Math.floor(t / 3600), i = Math.floor(t % 3600 / 60),
|
|
2987
|
-
return n > 0 ? `${n}:${i.toString().padStart(2, "0")}:${
|
|
3001
|
+
const t = Math.round(a), n = Math.floor(t / 3600), i = Math.floor(t % 3600 / 60), y = t % 60;
|
|
3002
|
+
return n > 0 ? `${n}:${i.toString().padStart(2, "0")}:${y.toString().padStart(2, "0")}` : `${i}:${y.toString().padStart(2, "0")}`;
|
|
2988
3003
|
}, r.mediaUrl = function(a, t, n, i) {
|
|
2989
3004
|
i = i || {}, n = n || {}, t = e.utils.id(t);
|
|
2990
|
-
let
|
|
2991
|
-
return i.extension?.length && (i.extension.includes(".") ?
|
|
3005
|
+
let y = `/${a}/${t}`;
|
|
3006
|
+
return i.extension?.length && (i.extension.includes(".") ? y = `${y}/${i.extension}` : y = `${y}/${a}.${i.extension}`), e.api.generateEndpointURL(y, n, i);
|
|
2992
3007
|
}, r.filesize = function(a, t) {
|
|
2993
3008
|
if (a == 0) return "0 Bytes";
|
|
2994
|
-
var n = 1024, i = t || 2,
|
|
2995
|
-
return parseFloat((a / Math.pow(n, l)).toFixed(i)) + " " +
|
|
3009
|
+
var n = 1024, i = t || 2, y = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], l = Math.floor(Math.log(a) / Math.log(n));
|
|
3010
|
+
return parseFloat((a / Math.pow(n, l)).toFixed(i)) + " " + y[l];
|
|
2996
3011
|
}, r.getBinaryTypeFromMime = function(a) {
|
|
2997
3012
|
if (!a)
|
|
2998
3013
|
return "file";
|
|
@@ -3032,7 +3047,7 @@ function Ct(e) {
|
|
|
3032
3047
|
}
|
|
3033
3048
|
}, r;
|
|
3034
3049
|
}
|
|
3035
|
-
var Ue = {},
|
|
3050
|
+
var Ue = {}, Ct = {
|
|
3036
3051
|
///////////////////////////////////////////////////
|
|
3037
3052
|
/**
|
|
3038
3053
|
* A helper function to reset all caches, useful if changing organisation or logging in or out as another user
|
|
@@ -3072,8 +3087,8 @@ var Ue = {}, Ot = {
|
|
|
3072
3087
|
var t = [];
|
|
3073
3088
|
n(a);
|
|
3074
3089
|
function n(i) {
|
|
3075
|
-
var
|
|
3076
|
-
t.push(
|
|
3090
|
+
var y = e.utils.id(i);
|
|
3091
|
+
t.push(y), (i.children || []).forEach(function(l) {
|
|
3077
3092
|
n(l);
|
|
3078
3093
|
});
|
|
3079
3094
|
}
|
|
@@ -3081,10 +3096,10 @@ var Ue = {}, Ot = {
|
|
|
3081
3096
|
}, r.hashPermissions = function(a) {
|
|
3082
3097
|
var t = {};
|
|
3083
3098
|
for (var n in a?.permissions || {}) {
|
|
3084
|
-
var i = a?.permissions[n],
|
|
3099
|
+
var i = a?.permissions[n], y = r.getAllDescendants(i);
|
|
3085
3100
|
(i.permissions || []).forEach(function(l) {
|
|
3086
3101
|
t[l] || (t[l] = []), t[l] = [
|
|
3087
|
-
...new Set(t[l].concat(
|
|
3102
|
+
...new Set(t[l].concat(y))
|
|
3088
3103
|
];
|
|
3089
3104
|
});
|
|
3090
3105
|
}
|
|
@@ -3094,39 +3109,39 @@ var Ue = {}, Ot = {
|
|
|
3094
3109
|
function i(l) {
|
|
3095
3110
|
if (l) {
|
|
3096
3111
|
var p = e.utils.id(l);
|
|
3097
|
-
p && (t[p] = 1, l.children && l.children.length && l.children.forEach(function(
|
|
3098
|
-
i(
|
|
3112
|
+
p && (t[p] = 1, l.children && l.children.length && l.children.forEach(function(m) {
|
|
3113
|
+
i(m);
|
|
3099
3114
|
}));
|
|
3100
3115
|
}
|
|
3101
3116
|
}
|
|
3102
|
-
for (var
|
|
3103
|
-
i(n[
|
|
3117
|
+
for (var y in n)
|
|
3118
|
+
i(n[y]);
|
|
3104
3119
|
return Object.keys(t);
|
|
3105
|
-
}, r.actionableScopes = function(a, t, n, i,
|
|
3106
|
-
|
|
3120
|
+
}, r.actionableScopes = function(a, t, n, i, y) {
|
|
3121
|
+
y = y || {};
|
|
3107
3122
|
var l = [];
|
|
3108
3123
|
if (a?.userType == "administrator")
|
|
3109
|
-
l = r.allUserScopes(a,
|
|
3124
|
+
l = r.allUserScopes(a, y);
|
|
3110
3125
|
else {
|
|
3111
|
-
var p = r.hashPermissions(a),
|
|
3112
|
-
if (!
|
|
3126
|
+
var p = r.hashPermissions(a), m = n || i;
|
|
3127
|
+
if (!m)
|
|
3113
3128
|
return l;
|
|
3114
|
-
let w = n ? p[`${n}.${t}`] || [] : [],
|
|
3115
|
-
l = [...w, ...
|
|
3129
|
+
let w = n ? p[`${n}.${t}`] || [] : [], b = i ? p[`${i}.${t}`] || [] : [];
|
|
3130
|
+
l = [...w, ...b];
|
|
3116
3131
|
}
|
|
3117
3132
|
return l || [];
|
|
3118
3133
|
}, r.isOwner = function(a, t) {
|
|
3119
|
-
var n = e.utils.id(a), i = e.utils.id(a?.persona),
|
|
3120
|
-
if (!
|
|
3134
|
+
var n = e.utils.id(a), i = e.utils.id(a?.persona), y = t.meta;
|
|
3135
|
+
if (!y)
|
|
3121
3136
|
return !1;
|
|
3122
|
-
var l =
|
|
3123
|
-
if (
|
|
3137
|
+
var l = y.userOwners || [], p = e.utils.ids([...l, y.userAuthor]), m = e.utils.hash(p);
|
|
3138
|
+
if (m[n])
|
|
3124
3139
|
return !0;
|
|
3125
|
-
var w =
|
|
3140
|
+
var w = y.personaOwners || [], b = e.utils.ids([
|
|
3126
3141
|
...w,
|
|
3127
|
-
|
|
3128
|
-
]),
|
|
3129
|
-
return
|
|
3142
|
+
y.personaAuthor
|
|
3143
|
+
]), u = e.utils.hash(b);
|
|
3144
|
+
return u[i] ? !0 : r.isAssignee(a, t);
|
|
3130
3145
|
}, r.isAssignee = function(a, t) {
|
|
3131
3146
|
const n = e.utils.ids(a?.profiles);
|
|
3132
3147
|
if (!n.length)
|
|
@@ -3134,8 +3149,8 @@ var Ue = {}, Ot = {
|
|
|
3134
3149
|
const i = e.utils.ids(t.assignees);
|
|
3135
3150
|
if (!i.length)
|
|
3136
3151
|
return !1;
|
|
3137
|
-
const
|
|
3138
|
-
return !!n.filter((
|
|
3152
|
+
const y = new Set(i);
|
|
3153
|
+
return !!n.filter((m) => y.has(m)).length;
|
|
3139
3154
|
}, r.allPermissions = function(a) {
|
|
3140
3155
|
var t = Object.values(a?.permissions || {}).map(function(n) {
|
|
3141
3156
|
return n.permissions;
|
|
@@ -3143,54 +3158,54 @@ var Ue = {}, Ot = {
|
|
|
3143
3158
|
return t;
|
|
3144
3159
|
}, r.allPermissionTypes = function(a, t) {
|
|
3145
3160
|
return t ? r.allPermissions(a).reduce(function(n, i) {
|
|
3146
|
-
var
|
|
3147
|
-
return n[
|
|
3161
|
+
var y = i.split(".")[0];
|
|
3162
|
+
return n[y] = !0, n;
|
|
3148
3163
|
}, {}) : r.allPermissions(a).map(function(n) {
|
|
3149
3164
|
return n.split(".")[0];
|
|
3150
3165
|
});
|
|
3151
3166
|
}, r.canKnowOf = function(a, t, n) {
|
|
3152
3167
|
return n = n || {}, n.cache = n.cache || {}, r.allPermissionTypes(a, !0)[t];
|
|
3153
|
-
}, r.checkActionAccess = function(a, t, n, i,
|
|
3154
|
-
if (
|
|
3168
|
+
}, r.checkActionAccess = function(a, t, n, i, y) {
|
|
3169
|
+
if (y = y || {}, y.cache = y.cache || {}, r.isAdministrator(a))
|
|
3155
3170
|
return !0;
|
|
3156
3171
|
var l = t.meta?.type, p = t.meta?.definition || l;
|
|
3157
3172
|
if (!p)
|
|
3158
3173
|
return !1;
|
|
3159
3174
|
if ((n == "listany" || i == "listown") && l === "scope") {
|
|
3160
|
-
var
|
|
3161
|
-
return !!a.permissions[
|
|
3175
|
+
var m = e.utils.id(t);
|
|
3176
|
+
return !!a.permissions[m];
|
|
3162
3177
|
}
|
|
3163
3178
|
var w = e.utils.ids(t.meta.scopes || []);
|
|
3164
3179
|
l === "scope" && (w = [
|
|
3165
3180
|
...e.utils.ids(t.path || []),
|
|
3166
3181
|
e.utils.id(t)
|
|
3167
3182
|
]);
|
|
3168
|
-
var
|
|
3169
|
-
if (
|
|
3170
|
-
|
|
3183
|
+
var b, u = `access-${a?.cacheKey}-${n}-${p}-${l}`;
|
|
3184
|
+
if (y.cache[u])
|
|
3185
|
+
b = y.cache[u];
|
|
3171
3186
|
else {
|
|
3172
3187
|
var o = e.utils.ids(
|
|
3173
|
-
r.actionableScopes(a, n, p, l,
|
|
3188
|
+
r.actionableScopes(a, n, p, l, y)
|
|
3174
3189
|
);
|
|
3175
|
-
|
|
3190
|
+
b = e.utils.hash(o), y.cache[u] = b;
|
|
3176
3191
|
}
|
|
3177
|
-
if (
|
|
3192
|
+
if (b) {
|
|
3178
3193
|
var f = w.some(function(P) {
|
|
3179
|
-
return
|
|
3194
|
+
return b[P];
|
|
3180
3195
|
});
|
|
3181
3196
|
if (f)
|
|
3182
3197
|
return !0;
|
|
3183
3198
|
}
|
|
3184
3199
|
var g = r.isOwner(a, t);
|
|
3185
3200
|
if (g) {
|
|
3186
|
-
var c,
|
|
3187
|
-
if (
|
|
3188
|
-
c =
|
|
3201
|
+
var c, s = `access-${a?.cacheKey}-${i}-${p}-${l}`;
|
|
3202
|
+
if (y.cache[s])
|
|
3203
|
+
c = y.cache[s];
|
|
3189
3204
|
else {
|
|
3190
|
-
var
|
|
3191
|
-
r.actionableScopes(a, i, p, l,
|
|
3205
|
+
var A = e.utils.ids(
|
|
3206
|
+
r.actionableScopes(a, i, p, l, y)
|
|
3192
3207
|
);
|
|
3193
|
-
c = e.utils.hash(
|
|
3208
|
+
c = e.utils.hash(A), y.cache[s] = c;
|
|
3194
3209
|
}
|
|
3195
3210
|
if (c) {
|
|
3196
3211
|
var S = w.some(function(P) {
|
|
@@ -3209,13 +3224,13 @@ var Ue = {}, Ot = {
|
|
|
3209
3224
|
}, r.canCreate = function(a, t, n, i) {
|
|
3210
3225
|
if (i = i || {}, i.cache = i.cache || {}, r.isAdministrator(a))
|
|
3211
3226
|
return !0;
|
|
3212
|
-
var
|
|
3227
|
+
var y = r.actionableScopes(
|
|
3213
3228
|
a,
|
|
3214
3229
|
"create",
|
|
3215
3230
|
t,
|
|
3216
3231
|
n
|
|
3217
3232
|
);
|
|
3218
|
-
return
|
|
3233
|
+
return y.length;
|
|
3219
3234
|
}, r.canListItem = function(a, t, n) {
|
|
3220
3235
|
n = n || {}, n.cache = n.cache || {};
|
|
3221
3236
|
var i = r.checkActionAccess(
|
|
@@ -3227,8 +3242,8 @@ var Ue = {}, Ot = {
|
|
|
3227
3242
|
);
|
|
3228
3243
|
if (i)
|
|
3229
3244
|
return !0;
|
|
3230
|
-
var
|
|
3231
|
-
return !!
|
|
3245
|
+
var y = r.canViewItem(a, t, n);
|
|
3246
|
+
return !!y;
|
|
3232
3247
|
}, r.canViewItem = function(a, t, n) {
|
|
3233
3248
|
n = n || {}, n.cache = n.cache || {};
|
|
3234
3249
|
var i = r.checkActionAccess(
|
|
@@ -3240,8 +3255,8 @@ var Ue = {}, Ot = {
|
|
|
3240
3255
|
);
|
|
3241
3256
|
if (i)
|
|
3242
3257
|
return !0;
|
|
3243
|
-
var
|
|
3244
|
-
return !!
|
|
3258
|
+
var y = r.canEditItem(a, t, n);
|
|
3259
|
+
return !!y;
|
|
3245
3260
|
}, r.canEditItem = function(a, t, n) {
|
|
3246
3261
|
n = n || {}, n.cache = n.cache || {};
|
|
3247
3262
|
var i = r.checkActionAccess(
|
|
@@ -3287,15 +3302,15 @@ function Rt(e) {
|
|
|
3287
3302
|
};
|
|
3288
3303
|
const a = {};
|
|
3289
3304
|
let t;
|
|
3290
|
-
r.variables = async function(
|
|
3291
|
-
o = o || {},
|
|
3305
|
+
r.variables = async function(u, o) {
|
|
3306
|
+
o = o || {}, u = u || [];
|
|
3292
3307
|
var f = o.refresh || o.reload || !a.data;
|
|
3293
3308
|
if (f) {
|
|
3294
3309
|
if (!t) {
|
|
3295
3310
|
let c = function() {
|
|
3296
3311
|
t = null;
|
|
3297
3312
|
};
|
|
3298
|
-
t = e.api.post("/variables", { keys:
|
|
3313
|
+
t = e.api.post("/variables", { keys: u }), t.then(c, c);
|
|
3299
3314
|
}
|
|
3300
3315
|
const { data: g } = await t;
|
|
3301
3316
|
a.data = g, e.dispatch("variables", g);
|
|
@@ -3304,35 +3319,35 @@ function Rt(e) {
|
|
|
3304
3319
|
};
|
|
3305
3320
|
const n = e.cache.get("user:glossary");
|
|
3306
3321
|
let i;
|
|
3307
|
-
function
|
|
3308
|
-
return new Promise((
|
|
3309
|
-
typeof requestIdleCallback == "function" ? requestIdleCallback(
|
|
3322
|
+
function y() {
|
|
3323
|
+
return new Promise((u) => {
|
|
3324
|
+
typeof requestIdleCallback == "function" ? requestIdleCallback(u, { timeout: 50 }) : setTimeout(u, 0);
|
|
3310
3325
|
});
|
|
3311
3326
|
}
|
|
3312
|
-
async function l({ _s:
|
|
3313
|
-
function g(
|
|
3314
|
-
if (typeof
|
|
3315
|
-
return
|
|
3316
|
-
if (Array.isArray(
|
|
3317
|
-
if (
|
|
3327
|
+
async function l({ _s: u, _k: o, types: f }) {
|
|
3328
|
+
function g(A) {
|
|
3329
|
+
if (typeof A == "string" && A[0] === "~")
|
|
3330
|
+
return u[parseInt(A.slice(1))];
|
|
3331
|
+
if (Array.isArray(A)) return A.map(g);
|
|
3332
|
+
if (A && typeof A == "object") {
|
|
3318
3333
|
const S = {};
|
|
3319
|
-
for (const [P, x] of Object.entries(
|
|
3334
|
+
for (const [P, x] of Object.entries(A))
|
|
3320
3335
|
S[o[P] || P] = g(x);
|
|
3321
3336
|
return S;
|
|
3322
3337
|
}
|
|
3323
|
-
return
|
|
3338
|
+
return A;
|
|
3324
3339
|
}
|
|
3325
|
-
const c = 50,
|
|
3326
|
-
for (let
|
|
3327
|
-
const S = f.slice(
|
|
3328
|
-
|
|
3340
|
+
const c = 50, s = [];
|
|
3341
|
+
for (let A = 0; A < f.length; A += c) {
|
|
3342
|
+
const S = f.slice(A, A + c);
|
|
3343
|
+
s.push(...S.map(g)), A + c < f.length && await y();
|
|
3329
3344
|
}
|
|
3330
|
-
return
|
|
3345
|
+
return s;
|
|
3331
3346
|
}
|
|
3332
|
-
r.glossary = async function(
|
|
3333
|
-
|
|
3334
|
-
let o = n.get("glossary"), g = !!!
|
|
3335
|
-
var c =
|
|
3347
|
+
r.glossary = async function(u) {
|
|
3348
|
+
u = u || {};
|
|
3349
|
+
let o = n.get("glossary"), g = !!!u.uncompressed;
|
|
3350
|
+
var c = u.refresh || u.reload || !o;
|
|
3336
3351
|
if (c) {
|
|
3337
3352
|
if (!i) {
|
|
3338
3353
|
let x = function() {
|
|
@@ -3342,85 +3357,85 @@ function Rt(e) {
|
|
|
3342
3357
|
const P = g ? "/glossary/compressed" : "/glossary";
|
|
3343
3358
|
i = e.api.get(P, { cache: !1 }), i.then(x, x);
|
|
3344
3359
|
}
|
|
3345
|
-
const { data:
|
|
3360
|
+
const { data: A } = await i, S = A._s && A._k && A.types ? await l(A) : A;
|
|
3346
3361
|
n.set("glossary", S), o = S, e.dispatch("glossary", S);
|
|
3347
3362
|
}
|
|
3348
|
-
if (
|
|
3349
|
-
var
|
|
3350
|
-
return
|
|
3363
|
+
if (u.hash) {
|
|
3364
|
+
var s = e.utils.hash(o, "key");
|
|
3365
|
+
return s;
|
|
3351
3366
|
}
|
|
3352
|
-
if (
|
|
3353
|
-
var
|
|
3354
|
-
return
|
|
3367
|
+
if (u.hex) {
|
|
3368
|
+
var s = e.utils.hash(o, "hex");
|
|
3369
|
+
return s;
|
|
3355
3370
|
}
|
|
3356
3371
|
return o;
|
|
3357
3372
|
};
|
|
3358
3373
|
const p = {};
|
|
3359
|
-
let
|
|
3360
|
-
r.scopeGlossary = async function(
|
|
3361
|
-
|
|
3362
|
-
var o =
|
|
3374
|
+
let m;
|
|
3375
|
+
r.scopeGlossary = async function(u) {
|
|
3376
|
+
u = u || {};
|
|
3377
|
+
var o = u.refresh || u.reload || !p.data;
|
|
3363
3378
|
if (o) {
|
|
3364
|
-
if (!
|
|
3379
|
+
if (!m) {
|
|
3365
3380
|
let c = function() {
|
|
3366
|
-
|
|
3381
|
+
m = null;
|
|
3367
3382
|
};
|
|
3368
|
-
|
|
3383
|
+
m = e.api.get("/scope/glossary", {
|
|
3369
3384
|
cache: !1
|
|
3370
|
-
}),
|
|
3385
|
+
}), m.then(c, c);
|
|
3371
3386
|
}
|
|
3372
|
-
const { data: g } = await
|
|
3387
|
+
const { data: g } = await m;
|
|
3373
3388
|
p.data = g;
|
|
3374
3389
|
}
|
|
3375
|
-
if (
|
|
3390
|
+
if (u.hash) {
|
|
3376
3391
|
var f = e.utils.hash(p.data, "_id");
|
|
3377
3392
|
return f;
|
|
3378
3393
|
}
|
|
3379
3394
|
return p.data;
|
|
3380
3395
|
};
|
|
3381
3396
|
const w = {};
|
|
3382
|
-
r.comparators = async function(
|
|
3383
|
-
|
|
3384
|
-
var o =
|
|
3397
|
+
r.comparators = async function(u) {
|
|
3398
|
+
u = u || {};
|
|
3399
|
+
var o = u.reload || u.refresh || !w.data;
|
|
3385
3400
|
if (o) {
|
|
3386
3401
|
const { data: f } = await e.api.get("/system/comparators");
|
|
3387
3402
|
f.available = {}, Object.entries(f.types).forEach(([g, c]) => {
|
|
3388
|
-
f.available[g] = c.map(function(
|
|
3389
|
-
return f.hash[
|
|
3403
|
+
f.available[g] = c.map(function(s) {
|
|
3404
|
+
return f.hash[s];
|
|
3390
3405
|
});
|
|
3391
3406
|
}), w.data = f;
|
|
3392
3407
|
}
|
|
3393
3408
|
return w.data;
|
|
3394
3409
|
};
|
|
3395
|
-
function
|
|
3396
|
-
var { minimum: o, maximum: f } =
|
|
3410
|
+
function b(u) {
|
|
3411
|
+
var { minimum: o, maximum: f } = u;
|
|
3397
3412
|
return o = e.utils.parseInt(o), o = Math.max(o, 0), f = e.utils.parseInt(f), f = Math.max(f, 0), f == 0 || (f = Math.max(f, o)), { minimum: o, maximum: f };
|
|
3398
3413
|
}
|
|
3399
|
-
return r.meetsValidationRequirements = function(
|
|
3414
|
+
return r.meetsValidationRequirements = function(u, o, f) {
|
|
3400
3415
|
if (f.minLength) {
|
|
3401
|
-
var g = String(
|
|
3416
|
+
var g = String(u).length;
|
|
3402
3417
|
if (g < f.minLength)
|
|
3403
3418
|
return `Must be at least ${f.minLength} characters`;
|
|
3404
3419
|
}
|
|
3405
3420
|
if (f.maxLength) {
|
|
3406
|
-
var g = String(
|
|
3421
|
+
var g = String(u).length;
|
|
3407
3422
|
if (g > f.maxLength)
|
|
3408
3423
|
return `Can be no more than ${f.maxLength} characters`;
|
|
3409
3424
|
}
|
|
3410
|
-
if (f.minValue &&
|
|
3411
|
-
var c = Number(
|
|
3425
|
+
if (f.minValue && u !== void 0) {
|
|
3426
|
+
var c = Number(u);
|
|
3412
3427
|
if (c < f.minValue)
|
|
3413
3428
|
return `Must be at least ${f.minValue}`;
|
|
3414
3429
|
}
|
|
3415
|
-
if (f.maxValue &&
|
|
3416
|
-
var c = Number(
|
|
3430
|
+
if (f.maxValue && u !== void 0) {
|
|
3431
|
+
var c = Number(u);
|
|
3417
3432
|
if (c > f.maxValue)
|
|
3418
3433
|
return `Can be no greater than ${f.maxValue}`;
|
|
3419
3434
|
}
|
|
3420
|
-
}, r.validateField = function(
|
|
3435
|
+
}, r.validateField = function(u, o, f) {
|
|
3421
3436
|
f = f || {};
|
|
3422
|
-
var g = o.type || "string", { minimum: c, maximum:
|
|
3423
|
-
if (o.type === "boolean" &&
|
|
3437
|
+
var g = o.type || "string", { minimum: c, maximum: s } = b(o), A = o.type == "group" && o.asObject, S = A ? c === s && s === 1 : s === 1, P = !S, x = e.utils.exists(u);
|
|
3438
|
+
if (o.type === "boolean" && u !== !0 && (x = !1), c) {
|
|
3424
3439
|
if (!x)
|
|
3425
3440
|
return {
|
|
3426
3441
|
valid: !1,
|
|
@@ -3432,30 +3447,30 @@ function Rt(e) {
|
|
|
3432
3447
|
valid: !0
|
|
3433
3448
|
};
|
|
3434
3449
|
if (P) {
|
|
3435
|
-
if (!Array.isArray(
|
|
3450
|
+
if (!Array.isArray(u))
|
|
3436
3451
|
return c ? {
|
|
3437
3452
|
valid: !1,
|
|
3438
3453
|
message: `${o.title} requires at least ${c} values`,
|
|
3439
3454
|
status: 400
|
|
3440
|
-
} : (console.log("NOT PROVIDED AS ARRAY", o.title,
|
|
3455
|
+
} : (console.log("NOT PROVIDED AS ARRAY", o.title, u), {
|
|
3441
3456
|
valid: !1,
|
|
3442
3457
|
message: `${o.title} must be provided as an array`,
|
|
3443
3458
|
status: 400
|
|
3444
3459
|
});
|
|
3445
|
-
var T =
|
|
3446
|
-
if (T = T.filter(function(
|
|
3447
|
-
var
|
|
3448
|
-
return !
|
|
3449
|
-
}), c ==
|
|
3460
|
+
var T = u;
|
|
3461
|
+
if (T = T.filter(function(k) {
|
|
3462
|
+
var I = k == null || k === "";
|
|
3463
|
+
return !I;
|
|
3464
|
+
}), c == s && c && T.length != c)
|
|
3450
3465
|
return {
|
|
3451
3466
|
valid: !1,
|
|
3452
|
-
message: `${o.title} requires exactly ${
|
|
3467
|
+
message: `${o.title} requires exactly ${s} values`,
|
|
3453
3468
|
status: 400
|
|
3454
3469
|
};
|
|
3455
|
-
if (
|
|
3470
|
+
if (s && T.length > s)
|
|
3456
3471
|
return {
|
|
3457
3472
|
valid: !1,
|
|
3458
|
-
message: `${o.title} requires less than ${
|
|
3473
|
+
message: `${o.title} requires less than ${s + 1} values`,
|
|
3459
3474
|
status: 400
|
|
3460
3475
|
};
|
|
3461
3476
|
if (T.length < c)
|
|
@@ -3464,27 +3479,27 @@ function Rt(e) {
|
|
|
3464
3479
|
message: `${o.title} requires at least ${c} values`,
|
|
3465
3480
|
status: 400
|
|
3466
3481
|
};
|
|
3467
|
-
var
|
|
3468
|
-
if (T.find(function(
|
|
3469
|
-
var
|
|
3470
|
-
o.type === "group" && (
|
|
3482
|
+
var N;
|
|
3483
|
+
if (T.find(function(k) {
|
|
3484
|
+
var I = g;
|
|
3485
|
+
o.type === "group" && (I = "object"), o.type === "reference" && o.widget === "form" && (I = "object");
|
|
3471
3486
|
var U = e.utils.isValidValue(
|
|
3472
|
-
I,
|
|
3473
3487
|
k,
|
|
3488
|
+
I,
|
|
3474
3489
|
f.strict
|
|
3475
3490
|
);
|
|
3476
3491
|
if (!U)
|
|
3477
|
-
return
|
|
3492
|
+
return N = !0, !0;
|
|
3478
3493
|
if (o.validation) {
|
|
3479
3494
|
var z = r.meetsValidationRequirements(
|
|
3480
|
-
|
|
3495
|
+
k,
|
|
3481
3496
|
g,
|
|
3482
3497
|
o.validation
|
|
3483
3498
|
);
|
|
3484
3499
|
if (z)
|
|
3485
|
-
return
|
|
3500
|
+
return N = !0, !0;
|
|
3486
3501
|
}
|
|
3487
|
-
}),
|
|
3502
|
+
}), N)
|
|
3488
3503
|
return {
|
|
3489
3504
|
valid: !1,
|
|
3490
3505
|
message: `Invalid input for ${o.title}`,
|
|
@@ -3493,33 +3508,33 @@ function Rt(e) {
|
|
|
3493
3508
|
} else {
|
|
3494
3509
|
var M = g, V = o.widget;
|
|
3495
3510
|
M === "group" && (M = "object"), M === "reference" && V === "form" && (M = "object");
|
|
3496
|
-
var $ = r.getCleanedValue(
|
|
3511
|
+
var $ = r.getCleanedValue(u, M, f), L = e.utils.isValidValue(
|
|
3497
3512
|
$,
|
|
3498
3513
|
M,
|
|
3499
3514
|
f.strict
|
|
3500
3515
|
);
|
|
3501
|
-
if (!
|
|
3516
|
+
if (!L)
|
|
3502
3517
|
return {
|
|
3503
3518
|
valid: !1,
|
|
3504
|
-
message: `Single value '${
|
|
3519
|
+
message: `Single value '${u}' is not a valid ${M} for ${o.title}`,
|
|
3505
3520
|
criteria: {
|
|
3506
|
-
isValidValue:
|
|
3521
|
+
isValidValue: L,
|
|
3507
3522
|
cleanedValue: $,
|
|
3508
3523
|
fieldType: g,
|
|
3509
3524
|
options: f
|
|
3510
3525
|
},
|
|
3511
3526
|
status: 400
|
|
3512
3527
|
};
|
|
3513
|
-
let
|
|
3514
|
-
const
|
|
3515
|
-
if (String(o.minValue) && (
|
|
3528
|
+
let k = !1;
|
|
3529
|
+
const I = {};
|
|
3530
|
+
if (String(o.minValue) && (I.minValue = parseInt(o.minValue), k = !0), String(o.maxValue) && (I.maxValue = parseInt(o.maxValue), k = !0), String(o.minLength) && (I.minLength = parseInt(o.minLength), k = !0), String(o.maxLength) && (I.maxLength = parseInt(o.maxLength), k = !0), k) {
|
|
3516
3531
|
const U = Object.assign(
|
|
3517
3532
|
{},
|
|
3518
|
-
|
|
3533
|
+
I,
|
|
3519
3534
|
o.validation || {}
|
|
3520
3535
|
);
|
|
3521
3536
|
var F = r.meetsValidationRequirements(
|
|
3522
|
-
|
|
3537
|
+
u,
|
|
3523
3538
|
g,
|
|
3524
3539
|
U
|
|
3525
3540
|
);
|
|
@@ -3534,73 +3549,73 @@ function Rt(e) {
|
|
|
3534
3549
|
return {
|
|
3535
3550
|
valid: !0
|
|
3536
3551
|
};
|
|
3537
|
-
}, r.getCleanedValue = function(
|
|
3552
|
+
}, r.getCleanedValue = function(u, o, f) {
|
|
3538
3553
|
switch (o) {
|
|
3539
3554
|
case "number":
|
|
3540
3555
|
case "float":
|
|
3541
3556
|
case "decimal":
|
|
3542
|
-
return e.utils.exists(
|
|
3557
|
+
return e.utils.exists(u) ? Number(u) : void 0;
|
|
3543
3558
|
case "integer":
|
|
3544
|
-
return e.utils.exists(
|
|
3559
|
+
return e.utils.exists(u) ? parseInt(u) : void 0;
|
|
3545
3560
|
case "boolean":
|
|
3546
|
-
return e.utils.exists(
|
|
3561
|
+
return e.utils.exists(u) ? e.utils.parseBoolean(u) : void 0;
|
|
3547
3562
|
case "email":
|
|
3548
|
-
return f.strict ?
|
|
3563
|
+
return f.strict ? u : String(u).toLowerCase();
|
|
3549
3564
|
case "reference":
|
|
3550
|
-
return f.strict ?
|
|
3565
|
+
return f.strict ? u : e.utils.id(u);
|
|
3551
3566
|
default:
|
|
3552
|
-
return f.strict ?
|
|
3567
|
+
return f.strict ? u : e.utils.cleanValue(u, o, f);
|
|
3553
3568
|
}
|
|
3554
|
-
return
|
|
3555
|
-
}, r.list = async function(
|
|
3569
|
+
return u;
|
|
3570
|
+
}, r.list = async function(u, o, f) {
|
|
3556
3571
|
f || (f = {});
|
|
3557
|
-
const g = f.remoteURL || `/content/${
|
|
3572
|
+
const g = f.remoteURL || `/content/${u}/list`;
|
|
3558
3573
|
if (f.cancellable) {
|
|
3559
3574
|
f.config || (f.config = {});
|
|
3560
|
-
const
|
|
3561
|
-
return f.config.cancelToken =
|
|
3575
|
+
const s = e.api.CancelToken.source();
|
|
3576
|
+
return f.config.cancelToken = s.token, {
|
|
3562
3577
|
promise: e.api.post(g, o, f.config),
|
|
3563
3578
|
cancel(S) {
|
|
3564
|
-
|
|
3579
|
+
s.cancel(S || "Operation canceled by the user.");
|
|
3565
3580
|
}
|
|
3566
3581
|
};
|
|
3567
3582
|
} else {
|
|
3568
3583
|
const { data: c } = await e.api.post(g, o, f.config);
|
|
3569
3584
|
return c;
|
|
3570
3585
|
}
|
|
3571
|
-
}, r.create = async function(
|
|
3586
|
+
}, r.create = async function(u, o) {
|
|
3572
3587
|
const f = { ...o };
|
|
3573
3588
|
f.meta?.scopes && (f.meta.scopes = e.utils.ids(f.meta.scopes));
|
|
3574
|
-
const { data: g } = await e.api.post(`/content/${
|
|
3589
|
+
const { data: g } = await e.api.post(`/content/${u}/create`, f);
|
|
3575
3590
|
return g;
|
|
3576
|
-
}, r.update = async function(
|
|
3577
|
-
|
|
3591
|
+
}, r.update = async function(u, o) {
|
|
3592
|
+
u = e.utils.id(u);
|
|
3578
3593
|
const f = { ...o };
|
|
3579
3594
|
f.meta?.scopes && (f.meta.scopes = e.utils.ids(f.meta.scopes));
|
|
3580
|
-
const { data: g } = await e.api.put(`/content/${
|
|
3595
|
+
const { data: g } = await e.api.put(`/content/${u}`, f);
|
|
3581
3596
|
return g;
|
|
3582
|
-
}, r.patch = async function(
|
|
3583
|
-
|
|
3597
|
+
}, r.patch = async function(u, o) {
|
|
3598
|
+
u = e.utils.id(u);
|
|
3584
3599
|
const f = { ...o };
|
|
3585
3600
|
f.meta?.scopes && (f.meta.scopes = e.utils.ids(f.meta.scopes));
|
|
3586
|
-
const { data: g } = await e.api.patch(`/content/${
|
|
3601
|
+
const { data: g } = await e.api.patch(`/content/${u}`, f);
|
|
3587
3602
|
return g;
|
|
3588
|
-
}, r.get = async function(
|
|
3589
|
-
|
|
3590
|
-
const { data: f } = await e.api.get(`/content/${
|
|
3603
|
+
}, r.get = async function(u, o) {
|
|
3604
|
+
u = e.utils.id(u), o = o || {};
|
|
3605
|
+
const { data: f } = await e.api.get(`/content/${u}`, o);
|
|
3591
3606
|
return f;
|
|
3592
|
-
}, r.getFromID = async function(
|
|
3593
|
-
return r.get(
|
|
3594
|
-
}, r.delete = async function(
|
|
3595
|
-
|
|
3596
|
-
const { data: f } = await e.api.delete(`/content/${
|
|
3607
|
+
}, r.getFromID = async function(u) {
|
|
3608
|
+
return r.get(u);
|
|
3609
|
+
}, r.delete = async function(u, o) {
|
|
3610
|
+
u = e.utils.id(u);
|
|
3611
|
+
const { data: f } = await e.api.delete(`/content/${u}`, o);
|
|
3597
3612
|
return f;
|
|
3598
|
-
}, r.restore = async function(
|
|
3599
|
-
|
|
3600
|
-
const { data: f } = await e.api.get(`/content/${
|
|
3613
|
+
}, r.restore = async function(u, o) {
|
|
3614
|
+
u = e.utils.id(u);
|
|
3615
|
+
const { data: f } = await e.api.get(`/content/${u}/restore`, o);
|
|
3601
3616
|
return f;
|
|
3602
|
-
}, r.getFromSlug = async function(
|
|
3603
|
-
const { data: o } = await e.api.get(`/content/slug/${
|
|
3617
|
+
}, r.getFromSlug = async function(u) {
|
|
3618
|
+
const { data: o } = await e.api.get(`/content/slug/${u}`);
|
|
3604
3619
|
return o;
|
|
3605
3620
|
}, r;
|
|
3606
3621
|
}
|
|
@@ -3614,16 +3629,16 @@ function Tt(e) {
|
|
|
3614
3629
|
})), a;
|
|
3615
3630
|
}, r;
|
|
3616
3631
|
}
|
|
3617
|
-
function
|
|
3632
|
+
function kt(e) {
|
|
3618
3633
|
var r = {};
|
|
3619
3634
|
function a() {
|
|
3620
3635
|
return !(typeof window > "u" || !window.navigator || !window.navigator.geolocation);
|
|
3621
3636
|
}
|
|
3622
|
-
return r.distance = function({ lat: t, lon: n }, { lat: i, lon:
|
|
3637
|
+
return r.distance = function({ lat: t, lon: n }, { lat: i, lon: y }) {
|
|
3623
3638
|
function l(f) {
|
|
3624
3639
|
return f * (Math.PI / 180);
|
|
3625
3640
|
}
|
|
3626
|
-
var p = 6371e3,
|
|
3641
|
+
var p = 6371e3, m = l(i - t), w = l(y - n), b = Math.sin(m / 2) * Math.sin(m / 2) + Math.cos(l(t)) * Math.cos(l(i)) * Math.sin(w / 2) * Math.sin(w / 2), u = 2 * Math.atan2(Math.sqrt(b), Math.sqrt(1 - b)), o = p * u;
|
|
3627
3642
|
return o;
|
|
3628
3643
|
}, r.getPosition = async function() {
|
|
3629
3644
|
return a() ? (console.log("qik:geo: getting location"), new Promise(function(t, n) {
|
|
@@ -3631,9 +3646,9 @@ function It(e) {
|
|
|
3631
3646
|
})) : Promise.reject({ message: "Geolocation is not enabled" });
|
|
3632
3647
|
}, r.watchPosition = async function(t) {
|
|
3633
3648
|
return a() ? (console.log("qik:geo: watching location"), new Promise(function(n, i) {
|
|
3634
|
-
const
|
|
3649
|
+
const y = navigator.geolocation.watchPosition(t, i);
|
|
3635
3650
|
n({
|
|
3636
|
-
id:
|
|
3651
|
+
id: y
|
|
3637
3652
|
});
|
|
3638
3653
|
})) : Promise.reject({ message: "Geolocation is not enabled" });
|
|
3639
3654
|
}, r.stopWatchPosition = async function(t) {
|
|
@@ -4357,7 +4372,7 @@ function It(e) {
|
|
|
4357
4372
|
}
|
|
4358
4373
|
}, r;
|
|
4359
4374
|
}
|
|
4360
|
-
const
|
|
4375
|
+
const It = function(e, r) {
|
|
4361
4376
|
if (r = r || "production", !e.auth)
|
|
4362
4377
|
throw new Error("Can't Instantiate QikSocket before QikAuth exists");
|
|
4363
4378
|
const a = e.utils.guid();
|
|
@@ -4368,32 +4383,41 @@ const kt = function(e, r) {
|
|
|
4368
4383
|
windowID: a,
|
|
4369
4384
|
autoreconnect: !0
|
|
4370
4385
|
}, n, i = {};
|
|
4371
|
-
const
|
|
4386
|
+
const y = {}, l = new De();
|
|
4372
4387
|
l.bootstrap(t), t.channel = async function(g) {
|
|
4373
4388
|
if (i[g])
|
|
4374
4389
|
return i[g];
|
|
4375
4390
|
const c = new De();
|
|
4376
|
-
function
|
|
4377
|
-
c.dispatch("message",
|
|
4391
|
+
function s(A) {
|
|
4392
|
+
c.dispatch("message", A);
|
|
4378
4393
|
}
|
|
4379
4394
|
return c.destroy = function() {
|
|
4380
|
-
t.removeEventListener(g,
|
|
4381
|
-
}, i[g] = c, t.connected || await t.connect(), t.subscribe(g), t.addEventListener(g,
|
|
4395
|
+
t.removeEventListener(g, s), t.unsubscribe(g), c.removeAllListeners(), delete i[g];
|
|
4396
|
+
}, i[g] = c, t.connected || await t.connect(), t.subscribe(g), t.addEventListener(g, s), i[g];
|
|
4382
4397
|
};
|
|
4383
4398
|
function p(g) {
|
|
4384
|
-
t.debug && console.log("[socket] Connection open", g), t.connected = !0, l.dispatch("connected", g)
|
|
4399
|
+
t.debug && console.log("[socket] Connection open", g), t.connected = !0, l.dispatch("connected", g), Object.keys(y).forEach(function(c) {
|
|
4400
|
+
u({
|
|
4401
|
+
action: "subscribe",
|
|
4402
|
+
channel: c
|
|
4403
|
+
});
|
|
4404
|
+
});
|
|
4385
4405
|
}
|
|
4386
|
-
async function
|
|
4406
|
+
async function m(g) {
|
|
4387
4407
|
g.wasClean ? t.debug && console.log(`[socket] Connection closed cleanly, code=${g.code} reason=${g.reason}`) : t.debug && console.log("[socket] - connection closed due to error", g), t.connected = !1, l.dispatch("disconnected", g), n = null, t.autoreconnect && t.reconnect();
|
|
4388
4408
|
}
|
|
4389
4409
|
function w(g) {
|
|
4390
4410
|
console.log("[event] socketError", event), t.debug && console.log("[socket] Error", g), l.dispatch("error", g);
|
|
4391
4411
|
}
|
|
4392
|
-
function
|
|
4412
|
+
function b(g) {
|
|
4393
4413
|
const c = JSON.parse(g.data);
|
|
4394
4414
|
t.debug && console.log("[socket] message received", c), l.dispatch("message", c), c.channel && l.dispatch(c.channel, c);
|
|
4395
4415
|
}
|
|
4396
|
-
async function
|
|
4416
|
+
async function u(g) {
|
|
4417
|
+
if (!n || n.readyState !== WebSocket.OPEN) {
|
|
4418
|
+
t.debug && console.log("[socket] - frame dropped, socket not open", g);
|
|
4419
|
+
return;
|
|
4420
|
+
}
|
|
4397
4421
|
n.send(JSON.stringify(g));
|
|
4398
4422
|
}
|
|
4399
4423
|
function o() {
|
|
@@ -4414,40 +4438,35 @@ const kt = function(e, r) {
|
|
|
4414
4438
|
t.debug && console.log("[socket] - Must be authenticated to connect to socket");
|
|
4415
4439
|
return;
|
|
4416
4440
|
}
|
|
4417
|
-
return n = new WebSocket(`${t.url}?access_token=${g}&windowid=${a}`), n.addEventListener("close",
|
|
4441
|
+
return n = new WebSocket(`${t.url}?access_token=${g}&windowid=${a}`), n.addEventListener("close", m), n.addEventListener("error", w), n.addEventListener("open", p), n.addEventListener("message", b), t.debug && console.log("[socket] - Connected with event listeners"), o();
|
|
4418
4442
|
}, t.reconnect = async function() {
|
|
4419
|
-
if (t.connected)
|
|
4420
|
-
return;
|
|
4421
|
-
t.debug && console.log("[socket] reconnecting...");
|
|
4422
|
-
const g = await t.connect();
|
|
4423
|
-
return Object.keys(m).forEach(function(u) {
|
|
4424
|
-
t.subscribe(u);
|
|
4425
|
-
}), g;
|
|
4443
|
+
if (!t.connected)
|
|
4444
|
+
return t.debug && console.log("[socket] reconnecting..."), await t.connect();
|
|
4426
4445
|
}, t.close = async function() {
|
|
4427
4446
|
if (!n) {
|
|
4428
4447
|
console.log("[socket] - Socket is not connected");
|
|
4429
4448
|
return;
|
|
4430
4449
|
}
|
|
4431
4450
|
const g = t.autoreconnect;
|
|
4432
|
-
t.autoreconnect = !1, n.close(), n.removeEventListener("close",
|
|
4451
|
+
t.autoreconnect = !1, n.close(), n.removeEventListener("close", m), n.removeEventListener("error", w), n.removeEventListener("open", p), n.removeEventListener("message", b), n = null, m({ wasClean: !0 }), t.autoreconnect = g;
|
|
4433
4452
|
}, t.disconnect = t.close, t.subscribe = async function(g) {
|
|
4434
4453
|
if (!n) {
|
|
4435
4454
|
console.log("[socket] - Can't subscribe to channel as socket is not connected");
|
|
4436
4455
|
return;
|
|
4437
4456
|
}
|
|
4438
|
-
|
|
4457
|
+
u({
|
|
4439
4458
|
action: "subscribe",
|
|
4440
4459
|
channel: g
|
|
4441
|
-
}),
|
|
4460
|
+
}), y[g] = !0, l.dispatch("subscribe", g), t.debug && console.log(`[socket] - subscribed to ${g}`);
|
|
4442
4461
|
}, t.unsubscribe = async function(g) {
|
|
4443
4462
|
if (!n) {
|
|
4444
4463
|
console.log("[socket] - Can't unsubscribe from channel as socket is not connected");
|
|
4445
4464
|
return;
|
|
4446
4465
|
}
|
|
4447
|
-
|
|
4466
|
+
u({
|
|
4448
4467
|
action: "unsubscribe",
|
|
4449
4468
|
channel: g
|
|
4450
|
-
}), delete
|
|
4469
|
+
}), delete y[g], l.dispatch("unsubscribe", g), t.debug && console.log(`[socket] - unsubscribed from ${g}`);
|
|
4451
4470
|
};
|
|
4452
4471
|
let f = e.utils.id(e.auth.getCurrentUser()?.organisation);
|
|
4453
4472
|
return e.auth.addEventListener("change", async function(g) {
|
|
@@ -4476,7 +4495,7 @@ function Ft(e) {
|
|
|
4476
4495
|
global: {}
|
|
4477
4496
|
});
|
|
4478
4497
|
Object.defineProperty(r, "cache", {
|
|
4479
|
-
value:
|
|
4498
|
+
value: Ct,
|
|
4480
4499
|
writable: !1
|
|
4481
4500
|
});
|
|
4482
4501
|
const t = R;
|
|
@@ -4487,7 +4506,7 @@ function Ft(e) {
|
|
|
4487
4506
|
value: q,
|
|
4488
4507
|
writable: !1
|
|
4489
4508
|
});
|
|
4490
|
-
const i = new
|
|
4509
|
+
const i = new Ot(r);
|
|
4491
4510
|
Object.defineProperty(r, "files", {
|
|
4492
4511
|
value: i,
|
|
4493
4512
|
writable: !1
|
|
@@ -4506,9 +4525,9 @@ function Ft(e) {
|
|
|
4506
4525
|
value: p,
|
|
4507
4526
|
writable: !1
|
|
4508
4527
|
});
|
|
4509
|
-
const
|
|
4528
|
+
const m = new It(r);
|
|
4510
4529
|
Object.defineProperty(r, "socket", {
|
|
4511
|
-
value:
|
|
4530
|
+
value: m,
|
|
4512
4531
|
writable: !1
|
|
4513
4532
|
});
|
|
4514
4533
|
const w = new Mt(r);
|
|
@@ -4516,14 +4535,14 @@ function Ft(e) {
|
|
|
4516
4535
|
value: w,
|
|
4517
4536
|
writable: !1
|
|
4518
4537
|
});
|
|
4519
|
-
const
|
|
4538
|
+
const b = new Tt(r);
|
|
4520
4539
|
Object.defineProperty(r, "system", {
|
|
4521
|
-
value:
|
|
4540
|
+
value: b,
|
|
4522
4541
|
writable: !1
|
|
4523
4542
|
});
|
|
4524
|
-
const
|
|
4543
|
+
const u = new kt(r);
|
|
4525
4544
|
Object.defineProperty(r, "geo", {
|
|
4526
|
-
value:
|
|
4545
|
+
value: u,
|
|
4527
4546
|
writable: !1
|
|
4528
4547
|
});
|
|
4529
4548
|
const o = new Rt(r);
|