authhero 0.42.0 → 0.43.0
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/authhero.cjs +5 -5
- package/dist/authhero.mjs +80 -80
- package/package.json +1 -1
package/dist/authhero.mjs
CHANGED
|
@@ -340,15 +340,15 @@ class lr extends Gr {
|
|
|
340
340
|
} = this.extractFromKey(e[e.length - 1], t), l = c[c.length - 1], u = t.lng || this.language, p = t.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
341
341
|
if ((u == null ? void 0 : u.toLowerCase()) === "cimode") {
|
|
342
342
|
if (p) {
|
|
343
|
-
const
|
|
343
|
+
const q = t.nsSeparator || this.options.nsSeparator;
|
|
344
344
|
return r ? {
|
|
345
|
-
res: `${l}${
|
|
345
|
+
res: `${l}${q}${o}`,
|
|
346
346
|
usedKey: o,
|
|
347
347
|
exactUsedKey: o,
|
|
348
348
|
usedLng: u,
|
|
349
349
|
usedNS: l,
|
|
350
350
|
usedParams: this.getUsedParamsDetails(t)
|
|
351
|
-
} : `${l}${
|
|
351
|
+
} : `${l}${q}${o}`;
|
|
352
352
|
}
|
|
353
353
|
return r ? {
|
|
354
354
|
res: o,
|
|
@@ -365,14 +365,14 @@ class lr extends Gr {
|
|
|
365
365
|
if (O && m && R && b.indexOf(_) < 0 && !(Q(S) && Array.isArray(m))) {
|
|
366
366
|
if (!t.returnObjects && !this.options.returnObjects) {
|
|
367
367
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
368
|
-
const
|
|
368
|
+
const q = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(x, m, {
|
|
369
369
|
...t,
|
|
370
370
|
ns: c
|
|
371
371
|
}) : `key '${o} (${this.language})' returned an object instead of string.`;
|
|
372
|
-
return r ? (g.res =
|
|
372
|
+
return r ? (g.res = q, g.usedParams = this.getUsedParamsDetails(t), g) : q;
|
|
373
373
|
}
|
|
374
374
|
if (s) {
|
|
375
|
-
const
|
|
375
|
+
const q = Array.isArray(m), ae = q ? [] : {}, fe = q ? h : x;
|
|
376
376
|
for (const le in m)
|
|
377
377
|
if (Object.prototype.hasOwnProperty.call(m, le)) {
|
|
378
378
|
const Ue = `${fe}${s}${le}`;
|
|
@@ -387,13 +387,13 @@ class lr extends Gr {
|
|
|
387
387
|
} else if (O && Q(S) && Array.isArray(m))
|
|
388
388
|
m = m.join(S), m && (m = this.extendTranslation(m, e, t, i));
|
|
389
389
|
else {
|
|
390
|
-
let
|
|
390
|
+
let q = !1, ae = !1;
|
|
391
391
|
const fe = t.count !== void 0 && !Q(t.count), le = lr.hasDefaultValue(t), Ue = fe ? this.pluralResolver.getSuffix(u, t.count, t) : "", rt = t.ordinal && fe ? this.pluralResolver.getSuffix(u, t.count, {
|
|
392
392
|
ordinal: !1
|
|
393
393
|
}) : "", qe = fe && !t.ordinal && t.count === 0, $ = qe && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${Ue}`] || t[`defaultValue${rt}`] || t.defaultValue;
|
|
394
|
-
!this.isValidLookup(m) && le && (
|
|
394
|
+
!this.isValidLookup(m) && le && (q = !0, m = $), this.isValidLookup(m) || (ae = !0, m = o);
|
|
395
395
|
const A = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && ae ? void 0 : m, w = le && $ !== m && this.options.updateMissing;
|
|
396
|
-
if (ae ||
|
|
396
|
+
if (ae || q || w) {
|
|
397
397
|
if (this.logger.log(w ? "updateKey" : "missingKey", u, l, o, w ? $ : m), s) {
|
|
398
398
|
const Y = this.resolve(o, {
|
|
399
399
|
...t,
|
|
@@ -407,19 +407,19 @@ class lr extends Gr {
|
|
|
407
407
|
for (let Y = 0; Y < C.length; Y++)
|
|
408
408
|
v.push(C[Y]);
|
|
409
409
|
else this.options.saveMissingTo === "all" ? v = this.languageUtils.toResolveHierarchy(t.lng || this.language) : v.push(t.lng || this.language);
|
|
410
|
-
const P = (Y,
|
|
410
|
+
const P = (Y, K, te) => {
|
|
411
411
|
var z;
|
|
412
412
|
const oe = le && te !== m ? te : A;
|
|
413
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(Y, l,
|
|
413
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(Y, l, K, oe, w, t) : (z = this.backendConnector) != null && z.saveMissing && this.backendConnector.saveMissing(Y, l, K, oe, w, t), this.emit("missingKey", Y, l, K, m);
|
|
414
414
|
};
|
|
415
415
|
this.options.saveMissing && (this.options.saveMissingPlurals && fe ? v.forEach((Y) => {
|
|
416
|
-
const
|
|
417
|
-
qe && t[`defaultValue${this.options.pluralSeparator}zero`] &&
|
|
416
|
+
const K = this.pluralResolver.getSuffixes(Y, t);
|
|
417
|
+
qe && t[`defaultValue${this.options.pluralSeparator}zero`] && K.indexOf(`${this.options.pluralSeparator}zero`) < 0 && K.push(`${this.options.pluralSeparator}zero`), K.forEach((te) => {
|
|
418
418
|
P([Y], o + te, t[`defaultValue${te}`] || $);
|
|
419
419
|
});
|
|
420
420
|
}) : P(v, o, $));
|
|
421
421
|
}
|
|
422
|
-
m = this.extendTranslation(m, e, t, g, i), ae && m === o && this.options.appendNamespaceToMissingKey && (m = `${l}:${o}`), (ae ||
|
|
422
|
+
m = this.extendTranslation(m, e, t, g, i), ae && m === o && this.options.appendNamespaceToMissingKey && (m = `${l}:${o}`), (ae || q) && this.options.parseMissingKeyHandler && (m = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}:${o}` : o, q ? m : void 0));
|
|
423
423
|
}
|
|
424
424
|
return r ? (g.res = m, g.usedParams = this.getUsedParamsDetails(t), g) : m;
|
|
425
425
|
}
|
|
@@ -485,20 +485,20 @@ class lr extends Gr {
|
|
|
485
485
|
var fe;
|
|
486
486
|
if (this.isValidLookup(i)) return;
|
|
487
487
|
o = R;
|
|
488
|
-
const
|
|
488
|
+
const q = [p];
|
|
489
489
|
if ((fe = this.i18nFormat) != null && fe.addLookupKeys)
|
|
490
|
-
this.i18nFormat.addLookupKeys(
|
|
490
|
+
this.i18nFormat.addLookupKeys(q, p, R, b, t);
|
|
491
491
|
else {
|
|
492
492
|
let le;
|
|
493
493
|
m && (le = this.pluralResolver.getSuffix(R, t.count, t));
|
|
494
494
|
const Ue = `${this.options.pluralSeparator}zero`, rt = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
495
|
-
if (m && (
|
|
495
|
+
if (m && (q.push(p + le), t.ordinal && le.indexOf(rt) === 0 && q.push(p + le.replace(rt, this.options.pluralSeparator)), x && q.push(p + Ue)), h) {
|
|
496
496
|
const qe = `${p}${this.options.contextSeparator}${t.context}`;
|
|
497
|
-
|
|
497
|
+
q.push(qe), m && (q.push(qe + le), t.ordinal && le.indexOf(rt) === 0 && q.push(qe + le.replace(rt, this.options.pluralSeparator)), x && q.push(qe + Ue));
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
500
|
let ae;
|
|
501
|
-
for (; ae =
|
|
501
|
+
for (; ae = q.pop(); )
|
|
502
502
|
this.isValidLookup(i) || (s = ae, i = this.getResource(R, b, ae, t));
|
|
503
503
|
}));
|
|
504
504
|
});
|
|
@@ -2146,12 +2146,12 @@ const Xh = {}, Qh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
2146
2146
|
v(A);
|
|
2147
2147
|
} else
|
|
2148
2148
|
return new Promise(function(C, P) {
|
|
2149
|
-
v(function(Y,
|
|
2149
|
+
v(function(Y, K) {
|
|
2150
2150
|
if (Y) {
|
|
2151
2151
|
P(Y);
|
|
2152
2152
|
return;
|
|
2153
2153
|
}
|
|
2154
|
-
C(
|
|
2154
|
+
C(K);
|
|
2155
2155
|
});
|
|
2156
2156
|
});
|
|
2157
2157
|
};
|
|
@@ -2184,12 +2184,12 @@ const Xh = {}, Qh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
2184
2184
|
v(A);
|
|
2185
2185
|
} else
|
|
2186
2186
|
return new Promise(function(C, P) {
|
|
2187
|
-
v(function(Y,
|
|
2187
|
+
v(function(Y, K) {
|
|
2188
2188
|
if (Y) {
|
|
2189
2189
|
P(Y);
|
|
2190
2190
|
return;
|
|
2191
2191
|
}
|
|
2192
|
-
C(
|
|
2192
|
+
C(K);
|
|
2193
2193
|
});
|
|
2194
2194
|
});
|
|
2195
2195
|
}, e.getRounds = function($) {
|
|
@@ -2360,11 +2360,11 @@ const Xh = {}, Qh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
2360
2360
|
return w.join("");
|
|
2361
2361
|
}
|
|
2362
2362
|
function m($, E) {
|
|
2363
|
-
var A = 0, w = $.length, v = 0, C = [], P, Y,
|
|
2363
|
+
var A = 0, w = $.length, v = 0, C = [], P, Y, K, te, oe, z;
|
|
2364
2364
|
if (E <= 0)
|
|
2365
2365
|
throw Error("Illegal len: " + E);
|
|
2366
|
-
for (; A < w - 1 && v < E && (z = $.charCodeAt(A++), P = z < u.length ? u[z] : -1, z = $.charCodeAt(A++), Y = z < u.length ? u[z] : -1, !(P == -1 || Y == -1 || (oe = P << 2 >>> 0, oe |= (Y & 48) >> 4, C.push(p(oe)), ++v >= E || A >= w) || (z = $.charCodeAt(A++),
|
|
2367
|
-
z = $.charCodeAt(A++), te = z < u.length ? u[z] : -1, oe = (
|
|
2366
|
+
for (; A < w - 1 && v < E && (z = $.charCodeAt(A++), P = z < u.length ? u[z] : -1, z = $.charCodeAt(A++), Y = z < u.length ? u[z] : -1, !(P == -1 || Y == -1 || (oe = P << 2 >>> 0, oe |= (Y & 48) >> 4, C.push(p(oe)), ++v >= E || A >= w) || (z = $.charCodeAt(A++), K = z < u.length ? u[z] : -1, K == -1) || (oe = (Y & 15) << 4 >>> 0, oe |= (K & 60) >> 2, C.push(p(oe)), ++v >= E || A >= w))); )
|
|
2367
|
+
z = $.charCodeAt(A++), te = z < u.length ? u[z] : -1, oe = (K & 3) << 6 >>> 0, oe |= te, C.push(p(oe)), ++v;
|
|
2368
2368
|
var Ie = [];
|
|
2369
2369
|
for (A = 0; A < v; A++)
|
|
2370
2370
|
Ie.push(C[A].charCodeAt(0));
|
|
@@ -2379,10 +2379,10 @@ const Xh = {}, Qh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
2379
2379
|
}); w !== null || (w = E()) !== null; )
|
|
2380
2380
|
w < 128 ? A(w & 127) : w < 2048 ? (A(w >> 6 & 31 | 192), A(w & 63 | 128)) : w < 65536 ? (A(w >> 12 & 15 | 224), A(w >> 6 & 63 | 128), A(w & 63 | 128)) : (A(w >> 18 & 7 | 240), A(w >> 12 & 63 | 128), A(w >> 6 & 63 | 128), A(w & 63 | 128)), w = null;
|
|
2381
2381
|
}, $.decodeUTF8 = function(E, A) {
|
|
2382
|
-
for (var w, v, C, P, Y = function(
|
|
2383
|
-
|
|
2384
|
-
var te = Error(
|
|
2385
|
-
throw te.name = "TruncatedError", te.bytes =
|
|
2382
|
+
for (var w, v, C, P, Y = function(K) {
|
|
2383
|
+
K = K.slice(0, K.indexOf(null));
|
|
2384
|
+
var te = Error(K.toString());
|
|
2385
|
+
throw te.name = "TruncatedError", te.bytes = K, te;
|
|
2386
2386
|
}; (w = E()) !== null; )
|
|
2387
2387
|
if (!(w & 128))
|
|
2388
2388
|
A(w);
|
|
@@ -3476,7 +3476,7 @@ const Xh = {}, Qh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
3476
3476
|
3463963227,
|
|
3477
3477
|
1469046755,
|
|
3478
3478
|
985887462
|
|
3479
|
-
],
|
|
3479
|
+
], q = [
|
|
3480
3480
|
1332899944,
|
|
3481
3481
|
1700884034,
|
|
3482
3482
|
1701343084,
|
|
@@ -3494,23 +3494,23 @@ const Xh = {}, Qh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
3494
3494
|
return { key: w, offp: E };
|
|
3495
3495
|
}
|
|
3496
3496
|
function le($, E, A) {
|
|
3497
|
-
for (var w = 0, v = [0, 0], C = E.length, P = A.length, Y,
|
|
3498
|
-
Y = fe($, w), w = Y.offp, E[
|
|
3499
|
-
for (
|
|
3500
|
-
v = ae(v, 0, E, A), E[
|
|
3501
|
-
for (
|
|
3502
|
-
v = ae(v, 0, E, A), A[
|
|
3497
|
+
for (var w = 0, v = [0, 0], C = E.length, P = A.length, Y, K = 0; K < C; K++)
|
|
3498
|
+
Y = fe($, w), w = Y.offp, E[K] = E[K] ^ Y.key;
|
|
3499
|
+
for (K = 0; K < C; K += 2)
|
|
3500
|
+
v = ae(v, 0, E, A), E[K] = v[0], E[K + 1] = v[1];
|
|
3501
|
+
for (K = 0; K < P; K += 2)
|
|
3502
|
+
v = ae(v, 0, E, A), A[K] = v[0], A[K + 1] = v[1];
|
|
3503
3503
|
}
|
|
3504
3504
|
function Ue($, E, A, w) {
|
|
3505
|
-
for (var v = 0, C = [0, 0], P = A.length, Y = w.length,
|
|
3506
|
-
|
|
3505
|
+
for (var v = 0, C = [0, 0], P = A.length, Y = w.length, K, te = 0; te < P; te++)
|
|
3506
|
+
K = fe(E, v), v = K.offp, A[te] = A[te] ^ K.key;
|
|
3507
3507
|
for (v = 0, te = 0; te < P; te += 2)
|
|
3508
|
-
|
|
3508
|
+
K = fe($, v), v = K.offp, C[0] ^= K.key, K = fe($, v), v = K.offp, C[1] ^= K.key, C = ae(C, 0, A, w), A[te] = C[0], A[te + 1] = C[1];
|
|
3509
3509
|
for (te = 0; te < Y; te += 2)
|
|
3510
|
-
|
|
3510
|
+
K = fe($, v), v = K.offp, C[0] ^= K.key, K = fe($, v), v = K.offp, C[1] ^= K.key, C = ae(C, 0, A, w), w[te] = C[0], w[te + 1] = C[1];
|
|
3511
3511
|
}
|
|
3512
3512
|
function rt($, E, A, w, v) {
|
|
3513
|
-
var C =
|
|
3513
|
+
var C = q.slice(), P = C.length, Y;
|
|
3514
3514
|
if (A < 4 || A > 31)
|
|
3515
3515
|
if (Y = Error("Illegal number of rounds (4-31): " + A), w) {
|
|
3516
3516
|
o(w.bind(this, Y));
|
|
@@ -3524,16 +3524,16 @@ const Xh = {}, Qh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
3524
3524
|
} else
|
|
3525
3525
|
throw Y;
|
|
3526
3526
|
A = 1 << A >>> 0;
|
|
3527
|
-
var
|
|
3528
|
-
Int32Array ? (
|
|
3527
|
+
var K, te, oe = 0, z;
|
|
3528
|
+
Int32Array ? (K = new Int32Array(O), te = new Int32Array(R)) : (K = O.slice(), te = R.slice()), Ue(E, $, K, te);
|
|
3529
3529
|
function Ie() {
|
|
3530
3530
|
if (v && v(oe / A), oe < A)
|
|
3531
|
-
for (var pe = Date.now(); oe < A && (oe = oe + 1, le($,
|
|
3531
|
+
for (var pe = Date.now(); oe < A && (oe = oe + 1, le($, K, te), le(E, K, te), !(Date.now() - pe > S)); )
|
|
3532
3532
|
;
|
|
3533
3533
|
else {
|
|
3534
3534
|
for (oe = 0; oe < 64; oe++)
|
|
3535
3535
|
for (z = 0; z < P >> 1; z++)
|
|
3536
|
-
ae(C, z << 1,
|
|
3536
|
+
ae(C, z << 1, K, te);
|
|
3537
3537
|
var ke = [];
|
|
3538
3538
|
for (oe = 0; oe < P; oe++)
|
|
3539
3539
|
ke.push((C[oe] >> 24 & 255) >>> 0), ke.push((C[oe] >> 16 & 255) >>> 0), ke.push((C[oe] >> 8 & 255) >>> 0), ke.push((C[oe] & 255) >>> 0);
|
|
@@ -3584,12 +3584,12 @@ const Xh = {}, Qh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
3584
3584
|
return;
|
|
3585
3585
|
} else
|
|
3586
3586
|
throw v;
|
|
3587
|
-
var Y = parseInt(E.substring(P, P + 1), 10) * 10,
|
|
3587
|
+
var Y = parseInt(E.substring(P, P + 1), 10) * 10, K = parseInt(E.substring(P + 1, P + 2), 10), te = Y + K, oe = E.substring(P + 3, P + 25);
|
|
3588
3588
|
$ += C >= "a" ? "\0" : "";
|
|
3589
3589
|
var z = c($), Ie = m(oe, h);
|
|
3590
3590
|
function qt(pe) {
|
|
3591
3591
|
var ke = [];
|
|
3592
|
-
return ke.push("$2"), C >= "a" && ke.push(C), ke.push("$"), te < 10 && ke.push("0"), ke.push(te.toString()), ke.push("$"), ke.push(g(Ie, Ie.length)), ke.push(g(pe,
|
|
3592
|
+
return ke.push("$2"), C >= "a" && ke.push(C), ke.push("$"), te < 10 && ke.push("0"), ke.push(te.toString()), ke.push("$"), ke.push(g(Ie, Ie.length)), ke.push(g(pe, q.length * 4 - 1)), ke.join("");
|
|
3593
3593
|
}
|
|
3594
3594
|
if (typeof A > "u")
|
|
3595
3595
|
return qt(rt(z, Ie, te));
|
|
@@ -4314,12 +4314,12 @@ var ml;
|
|
|
4314
4314
|
return j;
|
|
4315
4315
|
}
|
|
4316
4316
|
e("metadata", R);
|
|
4317
|
-
function
|
|
4317
|
+
function q(k, I, j, L) {
|
|
4318
4318
|
if (!pe(j))
|
|
4319
4319
|
throw new TypeError();
|
|
4320
4320
|
return z(L) || (L = pt(L)), Y(k, I, j, L);
|
|
4321
4321
|
}
|
|
4322
|
-
e("defineMetadata",
|
|
4322
|
+
e("defineMetadata", q);
|
|
4323
4323
|
function ae(k, I, j) {
|
|
4324
4324
|
if (!pe(I))
|
|
4325
4325
|
throw new TypeError();
|
|
@@ -4347,7 +4347,7 @@ var ml;
|
|
|
4347
4347
|
function rt(k, I) {
|
|
4348
4348
|
if (!pe(k))
|
|
4349
4349
|
throw new TypeError();
|
|
4350
|
-
return z(I) || (I = pt(I)),
|
|
4350
|
+
return z(I) || (I = pt(I)), K(k, I);
|
|
4351
4351
|
}
|
|
4352
4352
|
e("getMetadataKeys", rt);
|
|
4353
4353
|
function qe(k, I) {
|
|
@@ -4436,11 +4436,11 @@ var ml;
|
|
|
4436
4436
|
);
|
|
4437
4437
|
X.OrdinaryDefineOwnMetadata(k, I, j, L);
|
|
4438
4438
|
}
|
|
4439
|
-
function
|
|
4439
|
+
function K(k, I) {
|
|
4440
4440
|
var j = te(k, I), L = Fs(k);
|
|
4441
4441
|
if (L === null)
|
|
4442
4442
|
return j;
|
|
4443
|
-
var X =
|
|
4443
|
+
var X = K(L, I);
|
|
4444
4444
|
if (X.length <= 0)
|
|
4445
4445
|
return j;
|
|
4446
4446
|
if (j.length <= 0)
|
|
@@ -8112,12 +8112,12 @@ var $p = { exports: {} };
|
|
|
8112
8112
|
function u(h, _) {
|
|
8113
8113
|
if (h.indexOf("::") !== h.lastIndexOf("::"))
|
|
8114
8114
|
return null;
|
|
8115
|
-
let b = 0, S = -1, O = (h.match(l.zoneIndex) || [])[0], R,
|
|
8115
|
+
let b = 0, S = -1, O = (h.match(l.zoneIndex) || [])[0], R, q;
|
|
8116
8116
|
for (O && (O = O.substring(1), h = h.replace(/%.+$/, "")); (S = h.indexOf(":", S + 1)) >= 0; )
|
|
8117
8117
|
b++;
|
|
8118
8118
|
if (h.substr(0, 2) === "::" && b--, h.substr(-2, 2) === "::" && b--, b > _)
|
|
8119
8119
|
return null;
|
|
8120
|
-
for (
|
|
8120
|
+
for (q = _ - b, R = ":"; q--; )
|
|
8121
8121
|
R += "0:";
|
|
8122
8122
|
return h = h.replace("::", R), h[0] === ":" && (h = h.slice(1)), h[h.length - 1] === ":" && (h = h.slice(0, -1)), _ = function() {
|
|
8123
8123
|
const ae = h.split(":"), fe = [];
|
|
@@ -8222,12 +8222,12 @@ var $p = { exports: {} };
|
|
|
8222
8222
|
254: 1,
|
|
8223
8223
|
255: 0
|
|
8224
8224
|
};
|
|
8225
|
-
let O, R,
|
|
8225
|
+
let O, R, q;
|
|
8226
8226
|
for (O = 3; O >= 0; O -= 1)
|
|
8227
8227
|
if (R = this.octets[O], R in S) {
|
|
8228
|
-
if (
|
|
8228
|
+
if (q = S[R], b && q !== 0)
|
|
8229
8229
|
return null;
|
|
8230
|
-
|
|
8230
|
+
q !== 8 && (b = !0), _ += q;
|
|
8231
8231
|
} else
|
|
8232
8232
|
return null;
|
|
8233
8233
|
return 32 - _;
|
|
@@ -8301,8 +8301,8 @@ var $p = { exports: {} };
|
|
|
8301
8301
|
if (_ = h.match(i.fourOctet))
|
|
8302
8302
|
return function() {
|
|
8303
8303
|
const O = _.slice(1, 6), R = [];
|
|
8304
|
-
for (let
|
|
8305
|
-
b = O[
|
|
8304
|
+
for (let q = 0; q < O.length; q++)
|
|
8305
|
+
b = O[q], R.push(g(b));
|
|
8306
8306
|
return R;
|
|
8307
8307
|
}();
|
|
8308
8308
|
if (_ = h.match(i.longValue)) {
|
|
@@ -8416,8 +8416,8 @@ var $p = { exports: {} };
|
|
|
8416
8416
|
65535: 0
|
|
8417
8417
|
};
|
|
8418
8418
|
let O, R;
|
|
8419
|
-
for (let
|
|
8420
|
-
if (O = this.parts[
|
|
8419
|
+
for (let q = 7; q >= 0; q -= 1)
|
|
8420
|
+
if (O = this.parts[q], O in S) {
|
|
8421
8421
|
if (R = S[O], b && R !== 0)
|
|
8422
8422
|
return null;
|
|
8423
8423
|
R !== 16 && (b = !0), _ += R;
|
|
@@ -8499,8 +8499,8 @@ var $p = { exports: {} };
|
|
|
8499
8499
|
for (_ = this.parseCIDR(h), S = _[0].toByteArray(), R = this.subnetMaskFromPrefixLength(_[1]).toByteArray(), O = [], b = 0; b < 16; )
|
|
8500
8500
|
O.push(parseInt(S[b], 10) & parseInt(R[b], 10)), b++;
|
|
8501
8501
|
return new this(O);
|
|
8502
|
-
} catch (
|
|
8503
|
-
throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${
|
|
8502
|
+
} catch (q) {
|
|
8503
|
+
throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${q})`);
|
|
8504
8504
|
}
|
|
8505
8505
|
}, x.IPv6.parse = function(h) {
|
|
8506
8506
|
const _ = this.parser(h);
|
|
@@ -8517,12 +8517,12 @@ var $p = { exports: {} };
|
|
|
8517
8517
|
}), S;
|
|
8518
8518
|
throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range");
|
|
8519
8519
|
}, x.IPv6.parser = function(h) {
|
|
8520
|
-
let _, b, S, O, R,
|
|
8520
|
+
let _, b, S, O, R, q;
|
|
8521
8521
|
if (S = h.match(l.deprecatedTransitional))
|
|
8522
8522
|
return this.parser(`::ffff:${S[1]}`);
|
|
8523
8523
|
if (l.native.test(h))
|
|
8524
8524
|
return u(h, 8);
|
|
8525
|
-
if ((S = h.match(l.transitional)) && (
|
|
8525
|
+
if ((S = h.match(l.transitional)) && (q = S[6] || "", _ = S[1], S[1].endsWith("::") || (_ = _.slice(0, -1)), _ = u(_ + q, 6), _.parts)) {
|
|
8526
8526
|
for (R = [
|
|
8527
8527
|
parseInt(S[2]),
|
|
8528
8528
|
parseInt(S[3]),
|
|
@@ -8577,12 +8577,12 @@ var $p = { exports: {} };
|
|
|
8577
8577
|
const _ = this.parse(h);
|
|
8578
8578
|
return _.kind() === "ipv6" && _.isIPv4MappedAddress() ? _.toIPv4Address() : _;
|
|
8579
8579
|
}, x.subnetMatch = function(h, _, b) {
|
|
8580
|
-
let S, O, R,
|
|
8580
|
+
let S, O, R, q;
|
|
8581
8581
|
b == null && (b = "unicast");
|
|
8582
8582
|
for (O in _)
|
|
8583
8583
|
if (Object.prototype.hasOwnProperty.call(_, O)) {
|
|
8584
8584
|
for (R = _[O], R[0] && !(R[0] instanceof Array) && (R = [R]), S = 0; S < R.length; S++)
|
|
8585
|
-
if (
|
|
8585
|
+
if (q = R[S], h.kind() === q[0].kind() && h.match.apply(h, q))
|
|
8586
8586
|
return O;
|
|
8587
8587
|
}
|
|
8588
8588
|
return b;
|
|
@@ -19204,8 +19204,8 @@ const wv = new _e().openapi(
|
|
|
19204
19204
|
ui_locales: R
|
|
19205
19205
|
} = n.req.valid("query");
|
|
19206
19206
|
n.set("log", "authorize");
|
|
19207
|
-
const
|
|
19208
|
-
n.set("client_id",
|
|
19207
|
+
const q = await Lc(e, t);
|
|
19208
|
+
n.set("client_id", q.id), n.set("tenant_id", q.tenant.id);
|
|
19209
19209
|
const ae = {
|
|
19210
19210
|
redirect_uri: r,
|
|
19211
19211
|
scope: s,
|
|
@@ -19222,18 +19222,18 @@ const wv = new _e().openapi(
|
|
|
19222
19222
|
username: O,
|
|
19223
19223
|
ui_locales: R
|
|
19224
19224
|
}, fe = n.req.header("origin");
|
|
19225
|
-
if (fe && !gv(fe,
|
|
19225
|
+
if (fe && !gv(fe, q.web_origins || []))
|
|
19226
19226
|
throw new B(403, {
|
|
19227
19227
|
message: `Origin ${fe} not allowed`
|
|
19228
19228
|
});
|
|
19229
|
-
if (ae.redirect_uri && !Ms(ae.redirect_uri,
|
|
19229
|
+
if (ae.redirect_uri && !Ms(ae.redirect_uri, q.callbacks || []))
|
|
19230
19230
|
throw new B(400, {
|
|
19231
19231
|
message: `Invalid redirect URI - ${ae.redirect_uri}`
|
|
19232
19232
|
});
|
|
19233
19233
|
const le = Bf(
|
|
19234
|
-
|
|
19234
|
+
q.tenant.id,
|
|
19235
19235
|
n.req.header("cookie")
|
|
19236
|
-
), Ue = le ? await e.data.sessions.get(
|
|
19236
|
+
), Ue = le ? await e.data.sessions.get(q.tenant.id, le) : void 0;
|
|
19237
19237
|
if (h == "none") {
|
|
19238
19238
|
if (!p)
|
|
19239
19239
|
throw new B(400, {
|
|
@@ -19245,7 +19245,7 @@ const wv = new _e().openapi(
|
|
|
19245
19245
|
redirect_uri: r,
|
|
19246
19246
|
state: o,
|
|
19247
19247
|
response_type: p,
|
|
19248
|
-
client:
|
|
19248
|
+
client: q,
|
|
19249
19249
|
nonce: l,
|
|
19250
19250
|
code_challenge_method: x,
|
|
19251
19251
|
code_challenge: m,
|
|
@@ -19253,21 +19253,21 @@ const wv = new _e().openapi(
|
|
|
19253
19253
|
scope: s
|
|
19254
19254
|
});
|
|
19255
19255
|
}
|
|
19256
|
-
return u && u !== "email" ? Jy(n,
|
|
19256
|
+
return u && u !== "email" ? Jy(n, q, u, ae) : _ ? yv(
|
|
19257
19257
|
n,
|
|
19258
|
-
|
|
19258
|
+
q.tenant.id,
|
|
19259
19259
|
_,
|
|
19260
19260
|
ae,
|
|
19261
19261
|
b
|
|
19262
|
-
) :
|
|
19262
|
+
) : _v({
|
|
19263
19263
|
ctx: n,
|
|
19264
|
-
client:
|
|
19264
|
+
client: q,
|
|
19265
19265
|
auth0Client: S,
|
|
19266
19266
|
authParams: ae,
|
|
19267
19267
|
session: Ue || void 0,
|
|
19268
19268
|
connection: u,
|
|
19269
19269
|
login_hint: O
|
|
19270
|
-
})
|
|
19270
|
+
});
|
|
19271
19271
|
}
|
|
19272
19272
|
);
|
|
19273
19273
|
function bv() {
|