@qikdev/sdk 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +179 -163
- package/package.json +1 -1
- package/src/api/qik.auth.js +2 -1
- package/src/api/qik.utils.js +39 -5
- package/src/version.js +1 -1
package/dist/main.js
CHANGED
|
@@ -116,10 +116,10 @@ function yr() {
|
|
|
116
116
|
var e = Xr();
|
|
117
117
|
return Xe = Function.prototype.bind || e, Xe;
|
|
118
118
|
}
|
|
119
|
-
var er,
|
|
119
|
+
var er, Ir;
|
|
120
120
|
function et() {
|
|
121
|
-
if (
|
|
122
|
-
|
|
121
|
+
if (Ir) return er;
|
|
122
|
+
Ir = 1;
|
|
123
123
|
var e = yr();
|
|
124
124
|
return er = e.call(Function.call, Object.prototype.hasOwnProperty), er;
|
|
125
125
|
}
|
|
@@ -228,11 +228,11 @@ function hr() {
|
|
|
228
228
|
else if (L === "%AsyncGeneratorFunction%")
|
|
229
229
|
F = n("async function* () {}");
|
|
230
230
|
else if (L === "%AsyncGenerator%") {
|
|
231
|
-
var
|
|
232
|
-
|
|
231
|
+
var R = $("%AsyncGeneratorFunction%");
|
|
232
|
+
R && (F = R.prototype);
|
|
233
233
|
} else if (L === "%AsyncIteratorPrototype%") {
|
|
234
|
-
var
|
|
235
|
-
|
|
234
|
+
var k = $("%AsyncGenerator%");
|
|
235
|
+
k && (F = m(k.prototype));
|
|
236
236
|
}
|
|
237
237
|
return u[L] = F, F;
|
|
238
238
|
}, f = {
|
|
@@ -288,24 +288,24 @@ function hr() {
|
|
|
288
288
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
289
289
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
290
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),
|
|
292
|
-
if (F === "%" &&
|
|
291
|
+
var F = P(L, 0, 1), R = P(L, -1);
|
|
292
|
+
if (F === "%" && R !== "%")
|
|
293
293
|
throw new r("invalid intrinsic syntax, expected closing `%`");
|
|
294
|
-
if (
|
|
294
|
+
if (R === "%" && F !== "%")
|
|
295
295
|
throw new r("invalid intrinsic syntax, expected opening `%`");
|
|
296
|
-
var
|
|
296
|
+
var k = [];
|
|
297
297
|
return S(L, T, function(U, z, _, Z) {
|
|
298
|
-
|
|
299
|
-
}),
|
|
298
|
+
k[k.length] = _ ? S(Z, N, "$1") : z || U;
|
|
299
|
+
}), k;
|
|
300
300
|
}, V = function(L, F) {
|
|
301
|
-
var
|
|
302
|
-
if (c(f,
|
|
303
|
-
var U = u[
|
|
304
|
-
if (U === w && (U = o(
|
|
301
|
+
var R = L, k;
|
|
302
|
+
if (c(f, R) && (k = f[R], R = "%" + k[0] + "%"), c(u, R)) {
|
|
303
|
+
var U = u[R];
|
|
304
|
+
if (U === w && (U = o(R)), typeof U > "u" && !F)
|
|
305
305
|
throw new t("intrinsic " + L + " exists, but is not available. Please file an issue!");
|
|
306
306
|
return {
|
|
307
|
-
alias:
|
|
308
|
-
name:
|
|
307
|
+
alias: k,
|
|
308
|
+
name: R,
|
|
309
309
|
value: U
|
|
310
310
|
};
|
|
311
311
|
}
|
|
@@ -318,13 +318,13 @@ function hr() {
|
|
|
318
318
|
throw new t('"allowMissing" argument must be a boolean');
|
|
319
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 R = M(L), k = R.length > 0 ? R[0] : "", U = V("%" + k + "%", F), z = U.name, _ = U.value, Z = !1, Q = U.alias;
|
|
322
|
+
Q && (k = Q[0], A(R, s([0, 1], Q)));
|
|
323
|
+
for (var ne = 1, X = !0; ne < R.length; ne += 1) {
|
|
324
|
+
var W = R[ne], ie = P(W, 0, 1), re = P(W, -1);
|
|
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),
|
|
327
|
+
if ((W === "constructor" || !X) && (Z = !0), k += "." + W, z = "%" + k + "%", c(u, z))
|
|
328
328
|
_ = u[z];
|
|
329
329
|
else if (_ != null) {
|
|
330
330
|
if (!(W in _)) {
|
|
@@ -332,7 +332,7 @@ function hr() {
|
|
|
332
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 >= R.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
|
|
@@ -343,9 +343,9 @@ function hr() {
|
|
|
343
343
|
return _;
|
|
344
344
|
}, rr;
|
|
345
345
|
}
|
|
346
|
-
var tr = { exports: {} },
|
|
346
|
+
var tr = { exports: {} }, Rr;
|
|
347
347
|
function rt() {
|
|
348
|
-
return
|
|
348
|
+
return Rr || (Rr = 1, (function(e) {
|
|
349
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 {
|
|
@@ -371,10 +371,10 @@ function rt() {
|
|
|
371
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, kr;
|
|
375
375
|
function tt() {
|
|
376
|
-
if (
|
|
377
|
-
|
|
376
|
+
if (kr) return ar;
|
|
377
|
+
kr = 1;
|
|
378
378
|
var e = hr(), r = rt(), a = r(e("String.prototype.indexOf"));
|
|
379
379
|
return ar = function(n, i) {
|
|
380
380
|
var y = e(n, !!i);
|
|
@@ -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, 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,
|
|
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, R = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, k = typeof Symbol == "function" && typeof Symbol.iterator == "object", U = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === k || !0) ? Symbol.toStringTag : null, z = Object.prototype.propertyIsEnumerable, _ = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(h) {
|
|
393
393
|
return h.__proto__;
|
|
394
394
|
} : null);
|
|
395
395
|
function Z(h, v) {
|
|
@@ -456,12 +456,12 @@ function ot() {
|
|
|
456
456
|
return h(Me, O, d + 1, E);
|
|
457
457
|
}
|
|
458
458
|
if (typeof v == "function" && !ce(v)) {
|
|
459
|
-
var Y =
|
|
459
|
+
var Y = Ie(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 = k ? S.call(String(v), /^(Symbol\(.*\))_[^)]*$/, "$1") : R.call(v);
|
|
464
|
+
return typeof v == "object" && !k ? 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++)
|
|
@@ -490,7 +490,7 @@ 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 (Re(v)) {
|
|
494
494
|
var Sr = [];
|
|
495
495
|
return l.call(v, function(Me) {
|
|
496
496
|
Sr.push(H(Me, v));
|
|
@@ -498,7 +498,7 @@ function ot() {
|
|
|
498
498
|
}
|
|
499
499
|
if (me(v))
|
|
500
500
|
return fe("WeakMap");
|
|
501
|
-
if (
|
|
501
|
+
if (ke(v))
|
|
502
502
|
return fe("WeakSet");
|
|
503
503
|
if (Pe(v))
|
|
504
504
|
return fe("WeakRef");
|
|
@@ -545,14 +545,14 @@ 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 (k)
|
|
549
549
|
return h && typeof h == "object" && h instanceof Symbol;
|
|
550
550
|
if (typeof h == "symbol")
|
|
551
551
|
return !0;
|
|
552
|
-
if (!h || typeof h != "object" || !
|
|
552
|
+
if (!h || typeof h != "object" || !R)
|
|
553
553
|
return !1;
|
|
554
554
|
try {
|
|
555
|
-
return
|
|
555
|
+
return R.call(h), !0;
|
|
556
556
|
} catch {
|
|
557
557
|
}
|
|
558
558
|
return !1;
|
|
@@ -575,7 +575,7 @@ function ot() {
|
|
|
575
575
|
function ee(h) {
|
|
576
576
|
return g.call(h);
|
|
577
577
|
}
|
|
578
|
-
function
|
|
578
|
+
function Ie(h) {
|
|
579
579
|
if (h.name)
|
|
580
580
|
return h.name;
|
|
581
581
|
var v = s.call(c.call(h), /^function\s*([\w$]+)/);
|
|
@@ -628,7 +628,7 @@ function ot() {
|
|
|
628
628
|
}
|
|
629
629
|
return !1;
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function Re(h) {
|
|
632
632
|
if (!y || !h || typeof h != "object")
|
|
633
633
|
return !1;
|
|
634
634
|
try {
|
|
@@ -643,7 +643,7 @@ function ot() {
|
|
|
643
643
|
}
|
|
644
644
|
return !1;
|
|
645
645
|
}
|
|
646
|
-
function
|
|
646
|
+
function ke(h) {
|
|
647
647
|
if (!b || !h || typeof h != "object")
|
|
648
648
|
return !1;
|
|
649
649
|
try {
|
|
@@ -725,13 +725,13 @@ function ot() {
|
|
|
725
725
|
d[E] = J(h, E) ? v(h[E], h) : "";
|
|
726
726
|
}
|
|
727
727
|
var O = typeof F == "function" ? F(h) : [], G;
|
|
728
|
-
if (
|
|
728
|
+
if (k) {
|
|
729
729
|
G = {};
|
|
730
730
|
for (var ae = 0; ae < O.length; ae++)
|
|
731
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 || k && G["$" + K] instanceof Symbol || (T.call(/[^\w$]/, K) ? d.push(v(K, h) + ": " + v(h[K], h)) : d.push(K + ": " + v(h[K], h))));
|
|
735
735
|
if (typeof F == "function")
|
|
736
736
|
for (var C = 0; C < O.length; C++)
|
|
737
737
|
z.call(h, O[C]) && d.push("[" + v(O[C]) + "]: " + v(h[O[C]], h));
|
|
@@ -976,7 +976,7 @@ function ut() {
|
|
|
976
976
|
strictNullHandling: !1
|
|
977
977
|
}, u = function(s) {
|
|
978
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,
|
|
979
|
+
}, o = {}, f = function c(s, A, S, P, x, T, N, M, V, $, L, F, R, k, U, z) {
|
|
980
980
|
for (var _ = s, Z = z, Q = 0, ne = !1; (Z = Z.get(o)) !== void 0 && !ne; ) {
|
|
981
981
|
var X = Z.get(s);
|
|
982
982
|
if (Q += 1, typeof X < "u") {
|
|
@@ -990,20 +990,20 @@ function ut() {
|
|
|
990
990
|
return ee instanceof Date ? L(ee) : ee;
|
|
991
991
|
})), _ === null) {
|
|
992
992
|
if (x)
|
|
993
|
-
return N && !
|
|
993
|
+
return N && !k ? N(A, b.encoder, U, "key", F) : A;
|
|
994
994
|
_ = "";
|
|
995
995
|
}
|
|
996
996
|
if (u(_) || r.isBuffer(_)) {
|
|
997
997
|
if (N) {
|
|
998
|
-
var W =
|
|
999
|
-
if (S === "comma" &&
|
|
998
|
+
var W = k ? A : N(A, b.encoder, U, "key", F);
|
|
999
|
+
if (S === "comma" && k) {
|
|
1000
1000
|
for (var ie = y.call(String(_), ","), re = "", te = 0; te < ie.length; ++te)
|
|
1001
|
-
re += (te === 0 ? "" : ",") +
|
|
1002
|
-
return [
|
|
1001
|
+
re += (te === 0 ? "" : ",") + R(N(ie[te], b.encoder, U, "value", F));
|
|
1002
|
+
return [R(W) + (P && i(_) && ie.length === 1 ? "[]" : "") + "=" + re];
|
|
1003
1003
|
}
|
|
1004
|
-
return [
|
|
1004
|
+
return [R(W) + "=" + R(N(_, b.encoder, U, "value", F))];
|
|
1005
1005
|
}
|
|
1006
|
-
return [
|
|
1006
|
+
return [R(A) + "=" + R(String(_))];
|
|
1007
1007
|
}
|
|
1008
1008
|
var ce = [];
|
|
1009
1009
|
if (typeof _ > "u")
|
|
@@ -1036,8 +1036,8 @@ function ut() {
|
|
|
1036
1036
|
$,
|
|
1037
1037
|
L,
|
|
1038
1038
|
F,
|
|
1039
|
+
R,
|
|
1039
1040
|
k,
|
|
1040
|
-
I,
|
|
1041
1041
|
U,
|
|
1042
1042
|
J
|
|
1043
1043
|
));
|
|
@@ -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 R = T.join(S.delimiter), k = S.addQueryPrefix === !0 ? "?" : "";
|
|
1115
|
+
return S.charsetSentinel && (S.charset === "iso-8859-1" ? k += "utf8=%26%2310003%3B&" : k += "utf8=%E2%9C%93&"), R.length > 0 ? k + R : "";
|
|
1116
1116
|
}, ur;
|
|
1117
1117
|
}
|
|
1118
1118
|
var cr, $r;
|
|
@@ -1237,7 +1237,7 @@ function lt() {
|
|
|
1237
1237
|
}, lr;
|
|
1238
1238
|
}
|
|
1239
1239
|
var ft = lt();
|
|
1240
|
-
const dt = /* @__PURE__ */ mr(ft), vr = "1.0.
|
|
1240
|
+
const dt = /* @__PURE__ */ mr(ft), vr = "1.0.8", pt = Ae.CancelToken;
|
|
1241
1241
|
var mt = function(e) {
|
|
1242
1242
|
var r;
|
|
1243
1243
|
typeof window < "u" && (r = e.cache.get("api"));
|
|
@@ -1384,7 +1384,7 @@ function yt() {
|
|
|
1384
1384
|
return d ? "Symbol(src)_1." + d : "";
|
|
1385
1385
|
})(), T = A.toString, N = S.hasOwnProperty, M = S.toString, V = RegExp(
|
|
1386
1386
|
"^" + T.call(N).replace(m, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1387
|
-
), $ = f.Symbol, L = s.splice, F = Pe(f, "Map"),
|
|
1387
|
+
), $ = f.Symbol, L = s.splice, F = Pe(f, "Map"), R = Pe(Object, "create"), k = $ ? $.prototype : void 0, U = k ? k.toString : void 0;
|
|
1388
1388
|
function z(d) {
|
|
1389
1389
|
var E = -1, O = d ? d.length : 0;
|
|
1390
1390
|
for (this.clear(); ++E < O; ) {
|
|
@@ -1393,14 +1393,14 @@ function yt() {
|
|
|
1393
1393
|
}
|
|
1394
1394
|
}
|
|
1395
1395
|
function _() {
|
|
1396
|
-
this.__data__ =
|
|
1396
|
+
this.__data__ = R ? R(null) : {};
|
|
1397
1397
|
}
|
|
1398
1398
|
function Z(d) {
|
|
1399
1399
|
return this.has(d) && delete this.__data__[d];
|
|
1400
1400
|
}
|
|
1401
1401
|
function Q(d) {
|
|
1402
1402
|
var E = this.__data__;
|
|
1403
|
-
if (
|
|
1403
|
+
if (R) {
|
|
1404
1404
|
var O = E[d];
|
|
1405
1405
|
return O === r ? void 0 : O;
|
|
1406
1406
|
}
|
|
@@ -1408,11 +1408,11 @@ function yt() {
|
|
|
1408
1408
|
}
|
|
1409
1409
|
function ne(d) {
|
|
1410
1410
|
var E = this.__data__;
|
|
1411
|
-
return
|
|
1411
|
+
return R ? E[d] !== void 0 : N.call(E, d);
|
|
1412
1412
|
}
|
|
1413
1413
|
function X(d, E) {
|
|
1414
1414
|
var O = this.__data__;
|
|
1415
|
-
return O[d] =
|
|
1415
|
+
return O[d] = R && E === void 0 ? r : E, this;
|
|
1416
1416
|
}
|
|
1417
1417
|
z.prototype.clear = _, z.prototype.delete = Z, z.prototype.get = Q, z.prototype.has = ne, z.prototype.set = X;
|
|
1418
1418
|
function W(d) {
|
|
@@ -1478,12 +1478,12 @@ function yt() {
|
|
|
1478
1478
|
return -1;
|
|
1479
1479
|
}
|
|
1480
1480
|
function ee(d, E) {
|
|
1481
|
-
E =
|
|
1481
|
+
E = Re(E, d) ? [E] : Te(E);
|
|
1482
1482
|
for (var O = 0, G = E.length; d != null && O < G; )
|
|
1483
1483
|
d = d[Ne(E[O++])];
|
|
1484
1484
|
return O && O == G ? d : void 0;
|
|
1485
1485
|
}
|
|
1486
|
-
function
|
|
1486
|
+
function Ie(d) {
|
|
1487
1487
|
if (!he(d) || _e(d))
|
|
1488
1488
|
return !1;
|
|
1489
1489
|
var E = Le(d) || c(d) ? V : b;
|
|
@@ -1502,19 +1502,19 @@ function yt() {
|
|
|
1502
1502
|
}
|
|
1503
1503
|
function me(d, E) {
|
|
1504
1504
|
var O = d.__data__;
|
|
1505
|
-
return
|
|
1505
|
+
return ke(E) ? O[typeof E == "string" ? "string" : "hash"] : O.map;
|
|
1506
1506
|
}
|
|
1507
1507
|
function Pe(d, E) {
|
|
1508
1508
|
var O = g(d, E);
|
|
1509
|
-
return
|
|
1509
|
+
return Ie(O) ? O : void 0;
|
|
1510
1510
|
}
|
|
1511
|
-
function
|
|
1511
|
+
function Re(d, E) {
|
|
1512
1512
|
if (Ce(d))
|
|
1513
1513
|
return !1;
|
|
1514
1514
|
var O = typeof d;
|
|
1515
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);
|
|
1516
1516
|
}
|
|
1517
|
-
function
|
|
1517
|
+
function ke(d) {
|
|
1518
1518
|
var E = typeof d;
|
|
1519
1519
|
return E == "string" || E == "number" || E == "symbol" || E == "boolean" ? d !== "__proto__" : d === null;
|
|
1520
1520
|
}
|
|
@@ -1593,14 +1593,14 @@ var dr, Dr;
|
|
|
1593
1593
|
function gt() {
|
|
1594
1594
|
if (Dr) return dr;
|
|
1595
1595
|
Dr = 1;
|
|
1596
|
-
var e = "[object Symbol]", r = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, 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 + "]",
|
|
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 + "]", R = "\\u200d", k = "(?:" + x + "|" + T + ")", U = "(?:" + F + "|" + T + ")", z = "(?:" + g + "(?:d|ll|m|re|s|t|ve))?", _ = "(?:" + g + "(?:D|LL|M|RE|S|T|VE))?", Z = M + "?", Q = "[" + o + "]?", ne = "(?:" + R + "(?:" + [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
1597
|
F + "?" + x + "+" + z + "(?=" + [s, F, "$"].join("|") + ")",
|
|
1598
|
-
U + "+" + _ + "(?=" + [s, F +
|
|
1599
|
-
F + "?" +
|
|
1598
|
+
U + "+" + _ + "(?=" + [s, F + k, "$"].join("|") + ")",
|
|
1599
|
+
F + "?" + k + "+" + z,
|
|
1600
1600
|
F + "+" + _,
|
|
1601
1601
|
S,
|
|
1602
1602
|
W
|
|
1603
|
-
].join("|"), "g"), oe = RegExp("[" +
|
|
1603
|
+
].join("|"), "g"), oe = RegExp("[" + R + 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 = {
|
|
1604
1604
|
// Latin-1 Supplement block.
|
|
1605
1605
|
À: "A",
|
|
1606
1606
|
Á: "A",
|
|
@@ -1802,7 +1802,7 @@ function gt() {
|
|
|
1802
1802
|
function ee(C) {
|
|
1803
1803
|
return C.split("");
|
|
1804
1804
|
}
|
|
1805
|
-
function
|
|
1805
|
+
function Ie(C) {
|
|
1806
1806
|
return C.match(r) || [];
|
|
1807
1807
|
}
|
|
1808
1808
|
function xe(C) {
|
|
@@ -1817,10 +1817,10 @@ function gt() {
|
|
|
1817
1817
|
function Pe(C) {
|
|
1818
1818
|
return de.test(C);
|
|
1819
1819
|
}
|
|
1820
|
-
function
|
|
1821
|
-
return me(C) ?
|
|
1820
|
+
function Re(C) {
|
|
1821
|
+
return me(C) ? ke(C) : ee(C);
|
|
1822
1822
|
}
|
|
1823
|
-
function
|
|
1823
|
+
function ke(C) {
|
|
1824
1824
|
return C.match(ce) || [];
|
|
1825
1825
|
}
|
|
1826
1826
|
function _e(C) {
|
|
@@ -1849,7 +1849,7 @@ function gt() {
|
|
|
1849
1849
|
function ge(C) {
|
|
1850
1850
|
return function(B) {
|
|
1851
1851
|
B = d(B);
|
|
1852
|
-
var j = me(B) ?
|
|
1852
|
+
var j = me(B) ? Re(B) : void 0, H = j ? j[0] : B.charAt(0), Y = j ? he(j, 1).join("") : B.slice(1);
|
|
1853
1853
|
return H[C]() + Y;
|
|
1854
1854
|
};
|
|
1855
1855
|
}
|
|
@@ -1878,7 +1878,7 @@ function gt() {
|
|
|
1878
1878
|
}
|
|
1879
1879
|
var ae = ge("toUpperCase");
|
|
1880
1880
|
function K(C, B, j) {
|
|
1881
|
-
return C = d(C), B = B, B === void 0 ? Pe(C) ? _e(C) :
|
|
1881
|
+
return C = d(C), B = B, B === void 0 ? Pe(C) ? _e(C) : Ie(C) : C.match(B) || [];
|
|
1882
1882
|
}
|
|
1883
1883
|
return dr = E, dr;
|
|
1884
1884
|
}
|
|
@@ -1898,8 +1898,8 @@ function bt() {
|
|
|
1898
1898
|
return ve.isBrowser = r, ve.isWebWorker = t, ve.isNode = a, ve.isJsDom = n, ve.isDeno = i, ve;
|
|
1899
1899
|
}
|
|
1900
1900
|
bt();
|
|
1901
|
-
const
|
|
1902
|
-
|
|
1901
|
+
const I = {}, Ge = {};
|
|
1902
|
+
I.loadExternalScript = function(e) {
|
|
1903
1903
|
if (Ge[e])
|
|
1904
1904
|
return Ge[e];
|
|
1905
1905
|
const r = Ge[e] = new Promise(a);
|
|
@@ -1914,7 +1914,7 @@ R.loadExternalScript = function(e) {
|
|
|
1914
1914
|
return r;
|
|
1915
1915
|
};
|
|
1916
1916
|
const Vr = {};
|
|
1917
|
-
|
|
1917
|
+
I.loadExternalStyle = function(e) {
|
|
1918
1918
|
const r = new Promise(a);
|
|
1919
1919
|
function a(t, n) {
|
|
1920
1920
|
if (!document)
|
|
@@ -1929,7 +1929,7 @@ R.loadExternalStyle = function(e) {
|
|
|
1929
1929
|
}
|
|
1930
1930
|
return r;
|
|
1931
1931
|
};
|
|
1932
|
-
|
|
1932
|
+
I.exists = function(e) {
|
|
1933
1933
|
var r;
|
|
1934
1934
|
if (Array.isArray(e) || e === 0)
|
|
1935
1935
|
return !0;
|
|
@@ -1951,7 +1951,7 @@ R.exists = function(e) {
|
|
|
1951
1951
|
}
|
|
1952
1952
|
return !r;
|
|
1953
1953
|
};
|
|
1954
|
-
|
|
1954
|
+
I.parseDate = function(e) {
|
|
1955
1955
|
if (e) {
|
|
1956
1956
|
if (e instanceof Date)
|
|
1957
1957
|
return e;
|
|
@@ -1960,32 +1960,48 @@ R.parseDate = function(e) {
|
|
|
1960
1960
|
return r;
|
|
1961
1961
|
}
|
|
1962
1962
|
};
|
|
1963
|
-
|
|
1963
|
+
I.parseURL = function(e) {
|
|
1964
1964
|
if (!e)
|
|
1965
1965
|
return !1;
|
|
1966
1966
|
if (e.startsWith("/") || e.startsWith("://") || e.startsWith("mailto:") || e.startsWith("tel:") || e.startsWith("sms:"))
|
|
1967
1967
|
return e;
|
|
1968
|
-
var a =
|
|
1968
|
+
var a = I.parseEmail(e);
|
|
1969
1969
|
if (a && a === e)
|
|
1970
1970
|
return `mailto:${a}`;
|
|
1971
|
-
const t = (
|
|
1971
|
+
const t = (m) => /^https?:\/\//i.test(m) ? m : `http://${m}`;
|
|
1972
1972
|
e = t(e), e = e.replace(/\s/g, "");
|
|
1973
|
-
var n =
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1973
|
+
var n = String(e).replace(/^https?:\/\//i, "").split(/[/?#]/)[0], i = n.lastIndexOf(":");
|
|
1974
|
+
if (i !== -1) {
|
|
1975
|
+
if (!/^\d+$/.test(n.slice(i + 1)))
|
|
1976
|
+
return !1;
|
|
1977
|
+
n = n.slice(0, i);
|
|
1978
|
+
}
|
|
1979
|
+
if (!n)
|
|
1980
|
+
return !1;
|
|
1981
|
+
var y = n.split("."), l = y.length === 4 && y.every(function(m) {
|
|
1982
|
+
return /^\d{1,3}$/.test(m);
|
|
1983
|
+
});
|
|
1984
|
+
if (!l) {
|
|
1985
|
+
if (y.length < 2)
|
|
1986
|
+
return !1;
|
|
1987
|
+
var p = y.every(function(m) {
|
|
1988
|
+
return /^[a-z\d]([a-z\d-]*[a-z\d])?$/i.test(m);
|
|
1989
|
+
});
|
|
1990
|
+
if (!p || !/^[a-z]{2,}$/i.test(y[y.length - 1]))
|
|
1991
|
+
return !1;
|
|
1992
|
+
}
|
|
1993
|
+
return t(e);
|
|
1978
1994
|
};
|
|
1979
|
-
|
|
1995
|
+
I.parseNumber = function(e, r) {
|
|
1980
1996
|
if (!e || (e = Number(e), isNaN(e)))
|
|
1981
1997
|
return 0;
|
|
1982
1998
|
if (r) {
|
|
1983
1999
|
var a = e.toFixed(r);
|
|
1984
|
-
e =
|
|
2000
|
+
e = I.parseNumber(a);
|
|
1985
2001
|
}
|
|
1986
2002
|
return e;
|
|
1987
2003
|
};
|
|
1988
|
-
|
|
2004
|
+
I.isValidEmailAddress = function(e) {
|
|
1989
2005
|
var r = /^[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;
|
|
1990
2006
|
if (!e) return !1;
|
|
1991
2007
|
var a = e.split("@");
|
|
@@ -1998,48 +2014,48 @@ R.isValidEmailAddress = function(e) {
|
|
|
1998
2014
|
return y.length > 63;
|
|
1999
2015
|
}) || !r.test(e));
|
|
2000
2016
|
};
|
|
2001
|
-
|
|
2017
|
+
I.parseEmail = function(e) {
|
|
2002
2018
|
if (!e)
|
|
2003
2019
|
return !1;
|
|
2004
|
-
var r = String(e).toLowerCase(), a =
|
|
2020
|
+
var r = String(e).toLowerCase(), a = I.isValidEmailAddress(r);
|
|
2005
2021
|
return a ? r : !1;
|
|
2006
2022
|
};
|
|
2007
|
-
|
|
2023
|
+
I.parseInt = function(e) {
|
|
2008
2024
|
return !e || (e = parseInt(e), isNaN(e)) ? 0 : e;
|
|
2009
2025
|
};
|
|
2010
|
-
|
|
2026
|
+
I.cleanValue = function(e, r, a) {
|
|
2011
2027
|
a || (a = {});
|
|
2012
|
-
var t =
|
|
2028
|
+
var t = I.exists(e);
|
|
2013
2029
|
if (a.strict && t && r != "boolean")
|
|
2014
2030
|
return e;
|
|
2015
2031
|
switch (r) {
|
|
2016
2032
|
case "reference":
|
|
2017
|
-
return
|
|
2033
|
+
return I.id(e, !0);
|
|
2018
2034
|
case "boolean":
|
|
2019
|
-
return
|
|
2035
|
+
return I.parseBoolean(e);
|
|
2020
2036
|
case "url":
|
|
2021
|
-
return
|
|
2037
|
+
return I.parseURL(e);
|
|
2022
2038
|
case "key":
|
|
2023
|
-
return
|
|
2039
|
+
return I.machineName(e);
|
|
2024
2040
|
case "email":
|
|
2025
|
-
return
|
|
2041
|
+
return I.parseEmail(e);
|
|
2026
2042
|
case "date":
|
|
2027
|
-
var n =
|
|
2043
|
+
var n = I.parseDate(e, a);
|
|
2028
2044
|
return n === void 0 ? void 0 : n;
|
|
2029
2045
|
case "number":
|
|
2030
2046
|
case "decimal":
|
|
2031
2047
|
case "float":
|
|
2032
|
-
var i =
|
|
2048
|
+
var i = I.parseNumber(e);
|
|
2033
2049
|
return String(i) == String(Number(e)) ? i : void 0;
|
|
2034
2050
|
case "integer":
|
|
2035
|
-
var i =
|
|
2051
|
+
var i = I.parseInt(e);
|
|
2036
2052
|
return String(i) == String(parseInt(e)) ? i : void 0;
|
|
2037
2053
|
case "group":
|
|
2038
2054
|
return e;
|
|
2039
2055
|
case "object":
|
|
2040
2056
|
return typeof e == "object" && e !== null && !Array.isArray(e) ? e : void 0;
|
|
2041
2057
|
case "string":
|
|
2042
|
-
if (
|
|
2058
|
+
if (I.exists(e)) {
|
|
2043
2059
|
var y = String(e);
|
|
2044
2060
|
return y == "[object Object]" ? void 0 : y;
|
|
2045
2061
|
} else
|
|
@@ -2059,39 +2075,39 @@ R.cleanValue = function(e, r, a) {
|
|
|
2059
2075
|
return String(e);
|
|
2060
2076
|
}
|
|
2061
2077
|
};
|
|
2062
|
-
|
|
2063
|
-
var t =
|
|
2078
|
+
I.isValidValue = function(e, r, a) {
|
|
2079
|
+
var t = I.exists(e), n = typeof e == "number", i = !1;
|
|
2064
2080
|
if (!t)
|
|
2065
2081
|
return !1;
|
|
2066
2082
|
switch (r) {
|
|
2067
2083
|
case "url":
|
|
2068
|
-
a ? i = e.startsWith("/") || e.startsWith("://") || e.startsWith("http://") || e.startsWith("https://") : i = String(e) ===
|
|
2084
|
+
a ? i = e.startsWith("/") || e.startsWith("://") || e.startsWith("http://") || e.startsWith("https://") : i = String(e) === I.parseURL(e);
|
|
2069
2085
|
break;
|
|
2070
2086
|
case "key":
|
|
2071
|
-
i = String(e) ===
|
|
2087
|
+
i = String(e) === I.machineName(e);
|
|
2072
2088
|
break;
|
|
2073
2089
|
case "date":
|
|
2074
2090
|
if (a && (typeof e != "object" || !(e instanceof Date)))
|
|
2075
2091
|
return !1;
|
|
2076
|
-
var y =
|
|
2092
|
+
var y = I.parseDate(e);
|
|
2077
2093
|
return y !== void 0;
|
|
2078
2094
|
case "email":
|
|
2079
|
-
a ? i = e ===
|
|
2095
|
+
a ? i = e === I.parseEmail(e) : i = String(e).toLowerCase() === I.parseEmail(e);
|
|
2080
2096
|
break;
|
|
2081
2097
|
case "number":
|
|
2082
2098
|
case "decimal":
|
|
2083
2099
|
case "float":
|
|
2084
|
-
a ? i = n && Number(e) ===
|
|
2100
|
+
a ? i = n && Number(e) === I.parseNumber(e) : i = Number(e) === I.parseNumber(e);
|
|
2085
2101
|
break;
|
|
2086
2102
|
case "integer":
|
|
2087
|
-
a ? i = n && Number(e) ===
|
|
2103
|
+
a ? i = n && Number(e) === I.parseInt(e) : i = Number(e) === I.parseInt(e);
|
|
2088
2104
|
break;
|
|
2089
2105
|
case "boolean":
|
|
2090
|
-
var y =
|
|
2106
|
+
var y = I.parseBoolean(e);
|
|
2091
2107
|
a ? (e === !0 || e === !1) && (i = e === y) : i = y === !0 || y === !1;
|
|
2092
2108
|
break;
|
|
2093
2109
|
case "reference":
|
|
2094
|
-
a ? i = String(e) ===
|
|
2110
|
+
a ? i = String(e) === I.id(e) : i = !!I.id(e);
|
|
2095
2111
|
break;
|
|
2096
2112
|
case "string":
|
|
2097
2113
|
var l = String(e);
|
|
@@ -2111,7 +2127,7 @@ R.isValidValue = function(e, r, a) {
|
|
|
2111
2127
|
}
|
|
2112
2128
|
return i;
|
|
2113
2129
|
};
|
|
2114
|
-
|
|
2130
|
+
I.parseBoolean = function(e) {
|
|
2115
2131
|
switch (String(e).toLowerCase()) {
|
|
2116
2132
|
case "true":
|
|
2117
2133
|
case "y":
|
|
@@ -2134,10 +2150,10 @@ R.parseBoolean = function(e) {
|
|
|
2134
2150
|
}
|
|
2135
2151
|
return !!e;
|
|
2136
2152
|
};
|
|
2137
|
-
|
|
2153
|
+
I.clone = function(e) {
|
|
2138
2154
|
return JSON.parse(JSON.stringify(e));
|
|
2139
2155
|
};
|
|
2140
|
-
|
|
2156
|
+
I.getAllFields = function(e) {
|
|
2141
2157
|
const r = e.definesType === "profile" || e.key === "profile", a = e.definesType === "submission";
|
|
2142
2158
|
var t = [...e.fields], n = e.definedFields || [];
|
|
2143
2159
|
if (n.length)
|
|
@@ -2189,7 +2205,7 @@ R.getAllFields = function(e) {
|
|
|
2189
2205
|
maximum: 1,
|
|
2190
2206
|
type: "date"
|
|
2191
2207
|
}));
|
|
2192
|
-
var l =
|
|
2208
|
+
var l = I.mapFields(t).filter(function(p) {
|
|
2193
2209
|
var m = p.type == "group" && p.asObject && p.minimum == 1 && p.maximum == 1;
|
|
2194
2210
|
return !m;
|
|
2195
2211
|
}).map(function(p) {
|
|
@@ -2199,12 +2215,12 @@ R.getAllFields = function(e) {
|
|
|
2199
2215
|
});
|
|
2200
2216
|
return l;
|
|
2201
2217
|
};
|
|
2202
|
-
|
|
2218
|
+
I.mapFields = function(e, r) {
|
|
2203
2219
|
r || (r = {});
|
|
2204
2220
|
var a = [], t = [], n = [], i = 1, y = r.depth, l = r.arrayDelimeter || "[]";
|
|
2205
2221
|
e.forEach(p);
|
|
2206
2222
|
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 :
|
|
2223
|
+
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 : I.clone(m);
|
|
2208
2224
|
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
2225
|
var A = y && i >= y;
|
|
2210
2226
|
if (m.fields && m.fields.length)
|
|
@@ -2220,7 +2236,7 @@ R.mapFields = function(e, r) {
|
|
|
2220
2236
|
}
|
|
2221
2237
|
return a;
|
|
2222
2238
|
};
|
|
2223
|
-
|
|
2239
|
+
I.mapParameters = function(e) {
|
|
2224
2240
|
e = e || {};
|
|
2225
2241
|
var r = [];
|
|
2226
2242
|
return Object.entries(e).forEach(function([a, t]) {
|
|
@@ -2229,13 +2245,13 @@ R.mapParameters = function(e) {
|
|
|
2229
2245
|
}) : r.push(encodeURIComponent(a) + "=" + encodeURIComponent(t)));
|
|
2230
2246
|
}), r.join("&");
|
|
2231
2247
|
};
|
|
2232
|
-
|
|
2248
|
+
I.formatCurrency = function(e, r, a) {
|
|
2233
2249
|
(!e || isNaN(e)) && (e = 0), a = a || 2;
|
|
2234
|
-
var t =
|
|
2250
|
+
var t = I.currencySymbol(r);
|
|
2235
2251
|
return `${t}${parseFloat(Number(e) / 100).toFixed(a)}`;
|
|
2236
2252
|
};
|
|
2237
|
-
|
|
2238
|
-
if (e =
|
|
2253
|
+
I.getTypeFromID = function(e) {
|
|
2254
|
+
if (e = I.id(e), !e)
|
|
2239
2255
|
return;
|
|
2240
2256
|
const r = {
|
|
2241
2257
|
21: "organisation",
|
|
@@ -2298,7 +2314,7 @@ R.getTypeFromID = function(e) {
|
|
|
2298
2314
|
return r[a];
|
|
2299
2315
|
};
|
|
2300
2316
|
const St = { gbp: "£", eur: "€" };
|
|
2301
|
-
|
|
2317
|
+
I.currencySymbol = function(e) {
|
|
2302
2318
|
return St[String(e).toLowerCase()] || "$";
|
|
2303
2319
|
};
|
|
2304
2320
|
const wt = [
|
|
@@ -2309,9 +2325,9 @@ const wt = [
|
|
|
2309
2325
|
{ code: "nzd", countries: ["NZ"] },
|
|
2310
2326
|
{ code: "sgd", countries: ["SG"] }
|
|
2311
2327
|
];
|
|
2312
|
-
|
|
2328
|
+
I.getAvailableCurrencies = function(e) {
|
|
2313
2329
|
let r = wt.map(({ code: a, countries: t }) => ({
|
|
2314
|
-
name: `${a.toUpperCase()} (${
|
|
2330
|
+
name: `${a.toUpperCase()} (${I.currencySymbol(a)})`,
|
|
2315
2331
|
value: a,
|
|
2316
2332
|
countryCode: Object.fromEntries(t.map((n) => [n, !0]))
|
|
2317
2333
|
}));
|
|
@@ -2324,13 +2340,13 @@ R.getAvailableCurrencies = function(e) {
|
|
|
2324
2340
|
}
|
|
2325
2341
|
return r;
|
|
2326
2342
|
};
|
|
2327
|
-
|
|
2343
|
+
I.hash = function(e, r) {
|
|
2328
2344
|
return e = Array.isArray(e) ? e : [], e.reduce(function(a, t) {
|
|
2329
2345
|
const n = r ? je(t, r) : t;
|
|
2330
2346
|
return a[n] = t, a;
|
|
2331
2347
|
}, {});
|
|
2332
2348
|
};
|
|
2333
|
-
|
|
2349
|
+
I.extractFromArray = function(e, r, a, t, n, i, y) {
|
|
2334
2350
|
y = y || {}, a && (y.sum = a), t && (y.flatten = !0), n && (y.unique = !0), i && (y.excludeNull = !0);
|
|
2335
2351
|
var l = e.reduce(function(p, m) {
|
|
2336
2352
|
var w = je(m, r), b = !w && w !== !1 && w !== 0;
|
|
@@ -2340,7 +2356,7 @@ R.extractFromArray = function(e, r, a, t, n, i, y) {
|
|
|
2340
2356
|
return p + m;
|
|
2341
2357
|
}, 0)), l;
|
|
2342
2358
|
};
|
|
2343
|
-
|
|
2359
|
+
I.matchInArray = function(e, r, a, t) {
|
|
2344
2360
|
var n = e.filter(function(i) {
|
|
2345
2361
|
var y = je(i, r), l;
|
|
2346
2362
|
switch (t) {
|
|
@@ -2368,53 +2384,53 @@ R.matchInArray = function(e, r, a, t) {
|
|
|
2368
2384
|
});
|
|
2369
2385
|
return n;
|
|
2370
2386
|
};
|
|
2371
|
-
|
|
2387
|
+
I.comma = function(e, r, a) {
|
|
2372
2388
|
return a && (e = e.slice(0, a)), e.filter(function(t) {
|
|
2373
2389
|
return t != null && t !== void 0 && t !== "";
|
|
2374
2390
|
}).map(function(t) {
|
|
2375
2391
|
return r && r.length ? je(t, r) : t;
|
|
2376
2392
|
}).join(", ");
|
|
2377
2393
|
};
|
|
2378
|
-
|
|
2394
|
+
I.id = function(e) {
|
|
2379
2395
|
if (e) {
|
|
2380
2396
|
var r;
|
|
2381
2397
|
e._id ? r = String(e._id) : r = String(e);
|
|
2382
|
-
var a =
|
|
2398
|
+
var a = I.isValidID(r);
|
|
2383
2399
|
if (a)
|
|
2384
2400
|
return r;
|
|
2385
2401
|
}
|
|
2386
2402
|
};
|
|
2387
|
-
|
|
2403
|
+
I.ids = function(e) {
|
|
2388
2404
|
if (!e)
|
|
2389
2405
|
return [];
|
|
2390
2406
|
var r = Object.keys(
|
|
2391
2407
|
e.reduce(function(a, t) {
|
|
2392
2408
|
if (!t)
|
|
2393
2409
|
return a;
|
|
2394
|
-
var n =
|
|
2410
|
+
var n = I.id(t);
|
|
2395
2411
|
return n && (a[n] = 1), a;
|
|
2396
2412
|
}, {})
|
|
2397
2413
|
);
|
|
2398
2414
|
return r;
|
|
2399
2415
|
};
|
|
2400
|
-
|
|
2416
|
+
I.isValidID = function(e) {
|
|
2401
2417
|
var r = new RegExp("^[0-9a-fA-F]{24}$");
|
|
2402
2418
|
return r.test(String(e));
|
|
2403
2419
|
};
|
|
2404
|
-
|
|
2420
|
+
I.errorMessage = function(e) {
|
|
2405
2421
|
if (!e)
|
|
2406
2422
|
return;
|
|
2407
2423
|
Array.isArray(e) && (e = e[0]);
|
|
2408
2424
|
let r = e?.response?.data?.message || (typeof e?.response?.data == "string" ? e.response.data : null) || e?.message || null;
|
|
2409
2425
|
return Array.isArray(r) && (r = r[0]), r || JSON.stringify(e);
|
|
2410
2426
|
};
|
|
2411
|
-
|
|
2427
|
+
I.guid = function() {
|
|
2412
2428
|
return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
2413
2429
|
const r = Math.random() * 16 | 0;
|
|
2414
2430
|
return (e === "x" ? r : r & 3 | 8).toString(16);
|
|
2415
2431
|
});
|
|
2416
2432
|
};
|
|
2417
|
-
|
|
2433
|
+
I.machineName = function(e) {
|
|
2418
2434
|
if (!(!e || !e.length)) {
|
|
2419
2435
|
var r = /[^a-zA-Z0-9-_]+/g;
|
|
2420
2436
|
return String(e).replace(r, " ").split("_").map((a) => At(a)).join("_");
|
|
@@ -2783,7 +2799,7 @@ var Pt = function(e) {
|
|
|
2783
2799
|
}, t.ensureValidToken = async function(l) {
|
|
2784
2800
|
var p = t.getCurrentUser();
|
|
2785
2801
|
if (!p)
|
|
2786
|
-
return Promise.reject("No user");
|
|
2802
|
+
return Promise.reject(new Error("No user"));
|
|
2787
2803
|
if (r.isCookieMode && r.isCookieMode())
|
|
2788
2804
|
return l ? await t.refreshAccessToken() : "cookie_mode_token";
|
|
2789
2805
|
var { token: w } = p;
|
|
@@ -3293,7 +3309,7 @@ var Ue = {}, Ct = {
|
|
|
3293
3309
|
);
|
|
3294
3310
|
}, r;
|
|
3295
3311
|
};
|
|
3296
|
-
function
|
|
3312
|
+
function It(e) {
|
|
3297
3313
|
if (!e.api)
|
|
3298
3314
|
throw new Error("Can't Instantiate QikContent before QikAPI exists");
|
|
3299
3315
|
var r = {
|
|
@@ -3458,9 +3474,9 @@ function Rt(e) {
|
|
|
3458
3474
|
status: 400
|
|
3459
3475
|
});
|
|
3460
3476
|
var T = u;
|
|
3461
|
-
if (T = T.filter(function(
|
|
3462
|
-
var
|
|
3463
|
-
return !
|
|
3477
|
+
if (T = T.filter(function(R) {
|
|
3478
|
+
var k = R == null || R === "";
|
|
3479
|
+
return !k;
|
|
3464
3480
|
}), c == s && c && T.length != c)
|
|
3465
3481
|
return {
|
|
3466
3482
|
valid: !1,
|
|
@@ -3480,19 +3496,19 @@ function Rt(e) {
|
|
|
3480
3496
|
status: 400
|
|
3481
3497
|
};
|
|
3482
3498
|
var N;
|
|
3483
|
-
if (T.find(function(
|
|
3484
|
-
var
|
|
3485
|
-
o.type === "group" && (
|
|
3499
|
+
if (T.find(function(R) {
|
|
3500
|
+
var k = g;
|
|
3501
|
+
o.type === "group" && (k = "object"), o.type === "reference" && o.widget === "form" && (k = "object");
|
|
3486
3502
|
var U = e.utils.isValidValue(
|
|
3503
|
+
R,
|
|
3487
3504
|
k,
|
|
3488
|
-
I,
|
|
3489
3505
|
f.strict
|
|
3490
3506
|
);
|
|
3491
3507
|
if (!U)
|
|
3492
3508
|
return N = !0, !0;
|
|
3493
3509
|
if (o.validation) {
|
|
3494
3510
|
var z = r.meetsValidationRequirements(
|
|
3495
|
-
|
|
3511
|
+
R,
|
|
3496
3512
|
g,
|
|
3497
3513
|
o.validation
|
|
3498
3514
|
);
|
|
@@ -3525,12 +3541,12 @@ function Rt(e) {
|
|
|
3525
3541
|
},
|
|
3526
3542
|
status: 400
|
|
3527
3543
|
};
|
|
3528
|
-
let
|
|
3529
|
-
const
|
|
3530
|
-
if (String(o.minValue) && (
|
|
3544
|
+
let R = !1;
|
|
3545
|
+
const k = {};
|
|
3546
|
+
if (String(o.minValue) && (k.minValue = parseInt(o.minValue), R = !0), String(o.maxValue) && (k.maxValue = parseInt(o.maxValue), R = !0), String(o.minLength) && (k.minLength = parseInt(o.minLength), R = !0), String(o.maxLength) && (k.maxLength = parseInt(o.maxLength), R = !0), R) {
|
|
3531
3547
|
const U = Object.assign(
|
|
3532
3548
|
{},
|
|
3533
|
-
|
|
3549
|
+
k,
|
|
3534
3550
|
o.validation || {}
|
|
3535
3551
|
);
|
|
3536
3552
|
var F = r.meetsValidationRequirements(
|
|
@@ -3629,7 +3645,7 @@ function Tt(e) {
|
|
|
3629
3645
|
})), a;
|
|
3630
3646
|
}, r;
|
|
3631
3647
|
}
|
|
3632
|
-
function
|
|
3648
|
+
function Rt(e) {
|
|
3633
3649
|
var r = {};
|
|
3634
3650
|
function a() {
|
|
3635
3651
|
return !(typeof window > "u" || !window.navigator || !window.navigator.geolocation);
|
|
@@ -4372,7 +4388,7 @@ function kt(e) {
|
|
|
4372
4388
|
}
|
|
4373
4389
|
}, r;
|
|
4374
4390
|
}
|
|
4375
|
-
const
|
|
4391
|
+
const kt = function(e, r) {
|
|
4376
4392
|
if (r = r || "production", !e.auth)
|
|
4377
4393
|
throw new Error("Can't Instantiate QikSocket before QikAuth exists");
|
|
4378
4394
|
const a = e.utils.guid();
|
|
@@ -4498,7 +4514,7 @@ function Ft(e) {
|
|
|
4498
4514
|
value: Ct,
|
|
4499
4515
|
writable: !1
|
|
4500
4516
|
});
|
|
4501
|
-
const t =
|
|
4517
|
+
const t = I;
|
|
4502
4518
|
Object.defineProperty(r, "utils", {
|
|
4503
4519
|
value: t,
|
|
4504
4520
|
writable: !1
|
|
@@ -4525,7 +4541,7 @@ function Ft(e) {
|
|
|
4525
4541
|
value: p,
|
|
4526
4542
|
writable: !1
|
|
4527
4543
|
});
|
|
4528
|
-
const m = new
|
|
4544
|
+
const m = new kt(r);
|
|
4529
4545
|
Object.defineProperty(r, "socket", {
|
|
4530
4546
|
value: m,
|
|
4531
4547
|
writable: !1
|
|
@@ -4540,12 +4556,12 @@ function Ft(e) {
|
|
|
4540
4556
|
value: b,
|
|
4541
4557
|
writable: !1
|
|
4542
4558
|
});
|
|
4543
|
-
const u = new
|
|
4559
|
+
const u = new Rt(r);
|
|
4544
4560
|
Object.defineProperty(r, "geo", {
|
|
4545
4561
|
value: u,
|
|
4546
4562
|
writable: !1
|
|
4547
4563
|
});
|
|
4548
|
-
const o = new
|
|
4564
|
+
const o = new It(r);
|
|
4549
4565
|
return Object.defineProperty(r, "content", {
|
|
4550
4566
|
value: o,
|
|
4551
4567
|
writable: !1
|
package/package.json
CHANGED
package/src/api/qik.auth.js
CHANGED
|
@@ -607,7 +607,8 @@ var QikAuth = function(qik) {
|
|
|
607
607
|
|
|
608
608
|
var currentUser = service.getCurrentUser();
|
|
609
609
|
if (!currentUser) {
|
|
610
|
-
|
|
610
|
+
// Reject with an Error so uncaught rejections carry a stacktrace
|
|
611
|
+
return Promise.reject(new Error('No user'));
|
|
611
612
|
}
|
|
612
613
|
|
|
613
614
|
// Check if we're in cookie mode
|
package/src/api/qik.utils.js
CHANGED
|
@@ -243,15 +243,49 @@ service.parseURL = function (string) {
|
|
|
243
243
|
//TODO: test this more.
|
|
244
244
|
string = string.replace(/\s/g, "");
|
|
245
245
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
246
|
+
// Validate the host portion in linear time. The previous single-regex
|
|
247
|
+
// validation suffered catastrophic backtracking (40s+ freezing the main
|
|
248
|
+
// thread) on long URLs it couldn't match, and rejected legitimate URLs with
|
|
249
|
+
// hyphens in the query string. Anything after the host is accepted as-is.
|
|
250
|
+
var host = String(string)
|
|
251
|
+
.replace(/^https?:\/\//i, "")
|
|
252
|
+
.split(/[/?#]/)[0];
|
|
253
|
+
|
|
254
|
+
var portIndex = host.lastIndexOf(":");
|
|
255
|
+
if (portIndex !== -1) {
|
|
256
|
+
if (!/^\d+$/.test(host.slice(portIndex + 1))) {
|
|
257
|
+
return false;
|
|
258
|
+
}
|
|
259
|
+
host = host.slice(0, portIndex);
|
|
260
|
+
}
|
|
250
261
|
|
|
251
|
-
if (!
|
|
262
|
+
if (!host) {
|
|
252
263
|
return false;
|
|
253
264
|
}
|
|
254
265
|
|
|
266
|
+
var labels = host.split(".");
|
|
267
|
+
var isIPv4 =
|
|
268
|
+
labels.length === 4 &&
|
|
269
|
+
labels.every(function (label) {
|
|
270
|
+
return /^\d{1,3}$/.test(label);
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
if (!isIPv4) {
|
|
274
|
+
// Domains need at least two labels ("roger" is invalid, "www.roger" is
|
|
275
|
+
// allowed) and an alphabetic final label of 2+ characters
|
|
276
|
+
if (labels.length < 2) {
|
|
277
|
+
return false;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
var validLabels = labels.every(function (label) {
|
|
281
|
+
return /^[a-z\d]([a-z\d-]*[a-z\d])?$/i.test(label);
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
if (!validLabels || !/^[a-z]{2,}$/i.test(labels[labels.length - 1])) {
|
|
285
|
+
return false;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
255
289
|
///////////////////////////
|
|
256
290
|
|
|
257
291
|
return withHttp(string);
|
package/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "1.0.
|
|
1
|
+
export const version = "1.0.8";
|