authhero 0.88.0 → 0.90.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 +16 -16
- package/dist/authhero.d.ts +18 -6
- package/dist/authhero.mjs +366 -355
- package/package.json +3 -3
package/dist/authhero.mjs
CHANGED
|
@@ -375,12 +375,12 @@ class Qi extends Ms {
|
|
|
375
375
|
const L = Array.isArray(m), ee = L ? [] : {}, ce = L ? f : v;
|
|
376
376
|
for (const le in m)
|
|
377
377
|
if (Object.prototype.hasOwnProperty.call(m, le)) {
|
|
378
|
-
const
|
|
379
|
-
ee[le] = this.translate(
|
|
378
|
+
const ze = `${ce}${s}${le}`;
|
|
379
|
+
ee[le] = this.translate(ze, {
|
|
380
380
|
...n,
|
|
381
381
|
joinArrays: !1,
|
|
382
382
|
ns: c
|
|
383
|
-
}), ee[le] ===
|
|
383
|
+
}), ee[le] === ze && (ee[le] = m[le]);
|
|
384
384
|
}
|
|
385
385
|
m = ee;
|
|
386
386
|
}
|
|
@@ -388,9 +388,9 @@ class Qi extends Ms {
|
|
|
388
388
|
m = m.join(S), m && (m = this.extendTranslation(m, e, n, r));
|
|
389
389
|
else {
|
|
390
390
|
let L = !1, ee = !1;
|
|
391
|
-
const ce = n.count !== void 0 && !re(n.count), le = Qi.hasDefaultValue(n),
|
|
391
|
+
const ce = n.count !== void 0 && !re(n.count), le = Qi.hasDefaultValue(n), ze = ce ? this.pluralResolver.getSuffix(u, n.count, n) : "", De = n.ordinal && ce ? this.pluralResolver.getSuffix(u, n.count, {
|
|
392
392
|
ordinal: !1
|
|
393
|
-
}) : "", Ye = ce && !n.ordinal && n.count === 0, $ = Ye && n[`defaultValue${this.options.pluralSeparator}zero`] || n[`defaultValue${
|
|
393
|
+
}) : "", Ye = ce && !n.ordinal && n.count === 0, $ = Ye && n[`defaultValue${this.options.pluralSeparator}zero`] || n[`defaultValue${ze}`] || n[`defaultValue${De}`] || n.defaultValue;
|
|
394
394
|
!this.isValidLookup(m) && le && (L = !0, m = $), this.isValidLookup(m) || (ee = !0, m = o);
|
|
395
395
|
const E = (n.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && ee ? void 0 : m, x = le && $ !== m && this.options.updateMissing;
|
|
396
396
|
if (ee || L || x) {
|
|
@@ -491,10 +491,10 @@ class Qi extends Ms {
|
|
|
491
491
|
else {
|
|
492
492
|
let le;
|
|
493
493
|
m && (le = this.pluralResolver.getSuffix(T, n.count, n));
|
|
494
|
-
const
|
|
495
|
-
if (m && (L.push(p + le), n.ordinal && le.indexOf(
|
|
494
|
+
const ze = `${this.options.pluralSeparator}zero`, De = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
495
|
+
if (m && (L.push(p + le), n.ordinal && le.indexOf(De) === 0 && L.push(p + le.replace(De, this.options.pluralSeparator)), v && L.push(p + ze)), f) {
|
|
496
496
|
const Ye = `${p}${this.options.contextSeparator}${n.context}`;
|
|
497
|
-
L.push(Ye), m && (L.push(Ye + le), n.ordinal && le.indexOf(
|
|
497
|
+
L.push(Ye), m && (L.push(Ye + le), n.ordinal && le.indexOf(De) === 0 && L.push(Ye + le.replace(De, this.options.pluralSeparator)), v && L.push(Ye + ze));
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
500
|
let ee;
|
|
@@ -1712,18 +1712,20 @@ const Pm = a.enum([
|
|
|
1712
1712
|
request_parameter_supported: a.boolean(),
|
|
1713
1713
|
token_endpoint_auth_signing_alg_values_supported: a.array(a.string())
|
|
1714
1714
|
}), Um = a.object({
|
|
1715
|
+
csrf_token: a.string(),
|
|
1715
1716
|
auth0Client: a.string().optional(),
|
|
1716
1717
|
authParams: ef,
|
|
1717
1718
|
expires_at: a.string(),
|
|
1718
1719
|
deleted_at: a.string().optional(),
|
|
1719
1720
|
ip: a.string().optional(),
|
|
1720
1721
|
useragent: a.string().optional(),
|
|
1722
|
+
session: a.string().optional(),
|
|
1721
1723
|
authorization_url: a.string().optional()
|
|
1722
1724
|
}).openapi({
|
|
1723
1725
|
description: "This represents a login sesion"
|
|
1724
1726
|
}), i5 = a.object({
|
|
1725
1727
|
...Um.shape,
|
|
1726
|
-
|
|
1728
|
+
id: a.string().openapi({
|
|
1727
1729
|
description: "This is is used as the state in the universal login"
|
|
1728
1730
|
}),
|
|
1729
1731
|
created_at: a.string(),
|
|
@@ -2414,10 +2416,10 @@ const Qm = {}, e_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
2414
2416
|
throw Error("Illegal len: " + C);
|
|
2415
2417
|
for (; E < x - 1 && k < C && (H = $.charCodeAt(E++), U = H < u.length ? u[H] : -1, H = $.charCodeAt(E++), Q = H < u.length ? u[H] : -1, !(U == -1 || Q == -1 || (pe = U << 2 >>> 0, pe |= (Q & 48) >> 4, O.push(p(pe)), ++k >= C || E >= x) || (H = $.charCodeAt(E++), J = H < u.length ? u[H] : -1, J == -1) || (pe = (Q & 15) << 4 >>> 0, pe |= (J & 60) >> 2, O.push(p(pe)), ++k >= C || E >= x))); )
|
|
2416
2418
|
H = $.charCodeAt(E++), se = H < u.length ? u[H] : -1, pe = (J & 3) << 6 >>> 0, pe |= se, O.push(p(pe)), ++k;
|
|
2417
|
-
var
|
|
2419
|
+
var je = [];
|
|
2418
2420
|
for (E = 0; E < k; E++)
|
|
2419
|
-
|
|
2420
|
-
return
|
|
2421
|
+
je.push(O[E].charCodeAt(0));
|
|
2422
|
+
return je;
|
|
2421
2423
|
}
|
|
2422
2424
|
var v = function() {
|
|
2423
2425
|
var $ = {};
|
|
@@ -3550,7 +3552,7 @@ const Qm = {}, e_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
3550
3552
|
for (J = 0; J < U; J += 2)
|
|
3551
3553
|
k = ee(k, 0, C, E), E[J] = k[0], E[J + 1] = k[1];
|
|
3552
3554
|
}
|
|
3553
|
-
function
|
|
3555
|
+
function ze($, C, E, x) {
|
|
3554
3556
|
for (var k = 0, O = [0, 0], U = E.length, Q = x.length, J, se = 0; se < U; se++)
|
|
3555
3557
|
J = ce(C, k), k = J.offp, E[se] = E[se] ^ J.key;
|
|
3556
3558
|
for (k = 0, se = 0; se < U; se += 2)
|
|
@@ -3558,7 +3560,7 @@ const Qm = {}, e_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
3558
3560
|
for (se = 0; se < Q; se += 2)
|
|
3559
3561
|
J = ce($, k), k = J.offp, O[0] ^= J.key, J = ce($, k), k = J.offp, O[1] ^= J.key, O = ee(O, 0, E, x), x[se] = O[0], x[se + 1] = O[1];
|
|
3560
3562
|
}
|
|
3561
|
-
function
|
|
3563
|
+
function De($, C, E, x, k) {
|
|
3562
3564
|
var O = L.slice(), U = O.length, Q;
|
|
3563
3565
|
if (E < 4 || E > 31)
|
|
3564
3566
|
if (Q = Error("Illegal number of rounds (4-31): " + E), x) {
|
|
@@ -3574,8 +3576,8 @@ const Qm = {}, e_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
3574
3576
|
throw Q;
|
|
3575
3577
|
E = 1 << E >>> 0;
|
|
3576
3578
|
var J, se, pe = 0, H;
|
|
3577
|
-
Int32Array ? (J = new Int32Array(N), se = new Int32Array(T)) : (J = N.slice(), se = T.slice()),
|
|
3578
|
-
function
|
|
3579
|
+
Int32Array ? (J = new Int32Array(N), se = new Int32Array(T)) : (J = N.slice(), se = T.slice()), ze(C, $, J, se);
|
|
3580
|
+
function je() {
|
|
3579
3581
|
if (k && k(pe / E), pe < E)
|
|
3580
3582
|
for (var me = Date.now(); pe < E && (pe = pe + 1, le($, J, se), le(C, J, se), !(Date.now() - me > S)); )
|
|
3581
3583
|
;
|
|
@@ -3583,22 +3585,22 @@ const Qm = {}, e_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
3583
3585
|
for (pe = 0; pe < 64; pe++)
|
|
3584
3586
|
for (H = 0; H < U >> 1; H++)
|
|
3585
3587
|
ee(O, H << 1, J, se);
|
|
3586
|
-
var
|
|
3588
|
+
var Ee = [];
|
|
3587
3589
|
for (pe = 0; pe < U; pe++)
|
|
3588
|
-
|
|
3590
|
+
Ee.push((O[pe] >> 24 & 255) >>> 0), Ee.push((O[pe] >> 16 & 255) >>> 0), Ee.push((O[pe] >> 8 & 255) >>> 0), Ee.push((O[pe] & 255) >>> 0);
|
|
3589
3591
|
if (x) {
|
|
3590
|
-
x(null,
|
|
3592
|
+
x(null, Ee);
|
|
3591
3593
|
return;
|
|
3592
3594
|
} else
|
|
3593
|
-
return
|
|
3595
|
+
return Ee;
|
|
3594
3596
|
}
|
|
3595
|
-
x && o(
|
|
3597
|
+
x && o(je);
|
|
3596
3598
|
}
|
|
3597
3599
|
if (typeof x < "u")
|
|
3598
|
-
|
|
3600
|
+
je();
|
|
3599
3601
|
else
|
|
3600
3602
|
for (var ln; ; )
|
|
3601
|
-
if (typeof (ln =
|
|
3603
|
+
if (typeof (ln = je()) < "u")
|
|
3602
3604
|
return ln || [];
|
|
3603
3605
|
}
|
|
3604
3606
|
function Ye($, C, E, x) {
|
|
@@ -3635,15 +3637,15 @@ const Qm = {}, e_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
3635
3637
|
throw k;
|
|
3636
3638
|
var Q = parseInt(C.substring(U, U + 1), 10) * 10, J = parseInt(C.substring(U + 1, U + 2), 10), se = Q + J, pe = C.substring(U + 3, U + 25);
|
|
3637
3639
|
$ += O >= "a" ? "\0" : "";
|
|
3638
|
-
var H = c($),
|
|
3640
|
+
var H = c($), je = m(pe, f);
|
|
3639
3641
|
function ln(me) {
|
|
3640
|
-
var
|
|
3641
|
-
return
|
|
3642
|
+
var Ee = [];
|
|
3643
|
+
return Ee.push("$2"), O >= "a" && Ee.push(O), Ee.push("$"), se < 10 && Ee.push("0"), Ee.push(se.toString()), Ee.push("$"), Ee.push(h(je, je.length)), Ee.push(h(me, L.length * 4 - 1)), Ee.join("");
|
|
3642
3644
|
}
|
|
3643
3645
|
if (typeof E > "u")
|
|
3644
|
-
return ln(
|
|
3645
|
-
|
|
3646
|
-
me ? E(me, null) : E(null, ln(
|
|
3646
|
+
return ln(De(H, je, se));
|
|
3647
|
+
De(H, je, se, function(me, Ee) {
|
|
3648
|
+
me ? E(me, null) : E(null, ln(Ee));
|
|
3647
3649
|
}, x);
|
|
3648
3650
|
}
|
|
3649
3651
|
return e.encodeBase64 = h, e.decodeBase64 = m, e;
|
|
@@ -3661,7 +3663,7 @@ let i_ = (t) => crypto.getRandomValues(new Uint8Array(t)), s_ = (t, e, n) => {
|
|
|
3661
3663
|
if (o += t[c[l] & r] || "", o.length === s) return o;
|
|
3662
3664
|
}
|
|
3663
3665
|
};
|
|
3664
|
-
}, o_ = (t, e = 21) => s_(t, e, i_),
|
|
3666
|
+
}, o_ = (t, e = 21) => s_(t, e, i_), Ae = (t = 21) => {
|
|
3665
3667
|
let e = "", n = crypto.getRandomValues(new Uint8Array(t));
|
|
3666
3668
|
for (; t--; )
|
|
3667
3669
|
e += r_[n[t] & 63];
|
|
@@ -4169,11 +4171,11 @@ nl.validate = function(t, e) {
|
|
|
4169
4171
|
l += t[s];
|
|
4170
4172
|
if (l = l.trim(), l[l.length - 1] === "/" && (l = l.substring(0, l.length - 1), s--), !T_(l)) {
|
|
4171
4173
|
let h;
|
|
4172
|
-
return l.trim().length === 0 ? h = "Invalid space after '<'." : h = "Tag '" + l + "' is an invalid name.", xe("InvalidTag", h,
|
|
4174
|
+
return l.trim().length === 0 ? h = "Invalid space after '<'." : h = "Tag '" + l + "' is an invalid name.", xe("InvalidTag", h, Ve(t, s));
|
|
4173
4175
|
}
|
|
4174
4176
|
const u = N_(t, s);
|
|
4175
4177
|
if (u === !1)
|
|
4176
|
-
return xe("InvalidAttr", "Attributes for '" + l + "' have open quote.",
|
|
4178
|
+
return xe("InvalidAttr", "Attributes for '" + l + "' have open quote.", Ve(t, s));
|
|
4177
4179
|
let p = u.value;
|
|
4178
4180
|
if (s = u.index, p[p.length - 1] === "/") {
|
|
4179
4181
|
const h = s - p.length;
|
|
@@ -4182,32 +4184,32 @@ nl.validate = function(t, e) {
|
|
|
4182
4184
|
if (m === !0)
|
|
4183
4185
|
r = !0;
|
|
4184
4186
|
else
|
|
4185
|
-
return xe(m.err.code, m.err.msg,
|
|
4187
|
+
return xe(m.err.code, m.err.msg, Ve(t, h + m.err.line));
|
|
4186
4188
|
} else if (c)
|
|
4187
4189
|
if (u.tagClosed) {
|
|
4188
4190
|
if (p.trim().length > 0)
|
|
4189
|
-
return xe("InvalidTag", "Closing tag '" + l + "' can't have attributes or invalid starting.",
|
|
4191
|
+
return xe("InvalidTag", "Closing tag '" + l + "' can't have attributes or invalid starting.", Ve(t, o));
|
|
4190
4192
|
if (n.length === 0)
|
|
4191
|
-
return xe("InvalidTag", "Closing tag '" + l + "' has not been opened.",
|
|
4193
|
+
return xe("InvalidTag", "Closing tag '" + l + "' has not been opened.", Ve(t, o));
|
|
4192
4194
|
{
|
|
4193
4195
|
const h = n.pop();
|
|
4194
4196
|
if (l !== h.tagName) {
|
|
4195
|
-
let m =
|
|
4197
|
+
let m = Ve(t, h.tagStartPos);
|
|
4196
4198
|
return xe(
|
|
4197
4199
|
"InvalidTag",
|
|
4198
4200
|
"Expected closing tag '" + h.tagName + "' (opened in line " + m.line + ", col " + m.col + ") instead of closing tag '" + l + "'.",
|
|
4199
|
-
|
|
4201
|
+
Ve(t, o)
|
|
4200
4202
|
);
|
|
4201
4203
|
}
|
|
4202
4204
|
n.length == 0 && (i = !0);
|
|
4203
4205
|
}
|
|
4204
|
-
} else return xe("InvalidTag", "Closing tag '" + l + "' doesn't have proper closing.",
|
|
4206
|
+
} else return xe("InvalidTag", "Closing tag '" + l + "' doesn't have proper closing.", Ve(t, s));
|
|
4205
4207
|
else {
|
|
4206
4208
|
const h = Vu(p, e);
|
|
4207
4209
|
if (h !== !0)
|
|
4208
|
-
return xe(h.err.code, h.err.msg,
|
|
4210
|
+
return xe(h.err.code, h.err.msg, Ve(t, s - p.length + h.err.line));
|
|
4209
4211
|
if (i === !0)
|
|
4210
|
-
return xe("InvalidXml", "Multiple possible root nodes found.",
|
|
4212
|
+
return xe("InvalidXml", "Multiple possible root nodes found.", Ve(t, s));
|
|
4211
4213
|
e.unpairedTags.indexOf(l) !== -1 || n.push({ tagName: l, tagStartPos: o }), r = !0;
|
|
4212
4214
|
}
|
|
4213
4215
|
for (s++; s < t.length; s++)
|
|
@@ -4222,20 +4224,20 @@ nl.validate = function(t, e) {
|
|
|
4222
4224
|
else if (t[s] === "&") {
|
|
4223
4225
|
const h = O_(t, s);
|
|
4224
4226
|
if (h == -1)
|
|
4225
|
-
return xe("InvalidChar", "char '&' is not expected.",
|
|
4227
|
+
return xe("InvalidChar", "char '&' is not expected.", Ve(t, s));
|
|
4226
4228
|
s = h;
|
|
4227
4229
|
} else if (i === !0 && !Ru(t[s]))
|
|
4228
|
-
return xe("InvalidXml", "Extra text at the end",
|
|
4230
|
+
return xe("InvalidXml", "Extra text at the end", Ve(t, s));
|
|
4229
4231
|
t[s] === "<" && s--;
|
|
4230
4232
|
}
|
|
4231
4233
|
} else {
|
|
4232
4234
|
if (Ru(t[s]))
|
|
4233
4235
|
continue;
|
|
4234
|
-
return xe("InvalidChar", "char '" + t[s] + "' is not expected.",
|
|
4236
|
+
return xe("InvalidChar", "char '" + t[s] + "' is not expected.", Ve(t, s));
|
|
4235
4237
|
}
|
|
4236
4238
|
if (r) {
|
|
4237
4239
|
if (n.length == 1)
|
|
4238
|
-
return xe("InvalidTag", "Unclosed tag '" + n[0].tagName + "'.",
|
|
4240
|
+
return xe("InvalidTag", "Unclosed tag '" + n[0].tagName + "'.", Ve(t, n[0].tagStartPos));
|
|
4239
4241
|
if (n.length > 0)
|
|
4240
4242
|
return xe("InvalidXml", "Invalid '" + JSON.stringify(n.map((s) => s.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 });
|
|
4241
4243
|
} else return xe("InvalidXml", "Start tag expected.", 1);
|
|
@@ -4251,7 +4253,7 @@ function Lu(t, e) {
|
|
|
4251
4253
|
if (t[e] == "?" || t[e] == " ") {
|
|
4252
4254
|
const r = t.substr(n, e - n);
|
|
4253
4255
|
if (e > 5 && r === "xml")
|
|
4254
|
-
return xe("InvalidXml", "XML declaration allowed only at the start of the document.",
|
|
4256
|
+
return xe("InvalidXml", "XML declaration allowed only at the start of the document.", Ve(t, e));
|
|
4255
4257
|
if (t[e] == "?" && t[e + 1] == ">") {
|
|
4256
4258
|
e++;
|
|
4257
4259
|
break;
|
|
@@ -4361,7 +4363,7 @@ function B_(t) {
|
|
|
4361
4363
|
function T_(t) {
|
|
4362
4364
|
return rl.isName(t);
|
|
4363
4365
|
}
|
|
4364
|
-
function
|
|
4366
|
+
function Ve(t, e) {
|
|
4365
4367
|
const n = t.substring(0, e).split(/\r?\n/);
|
|
4366
4368
|
return {
|
|
4367
4369
|
line: n.length,
|
|
@@ -5194,7 +5196,7 @@ async function H0(t, e, n, r, i) {
|
|
|
5194
5196
|
);
|
|
5195
5197
|
}
|
|
5196
5198
|
async function K0(t, e) {
|
|
5197
|
-
const n = e.notBefore || (/* @__PURE__ */ new Date()).toISOString(), r = e.notAfter || new Date(new Date(n).getTime() + 10 * 60 * 1e3).toISOString(), i = e.issueInstant || n, s = e.sessionNotOnOrAfter || r, o = e.responseId || `_${
|
|
5199
|
+
const n = e.notBefore || (/* @__PURE__ */ new Date()).toISOString(), r = e.notAfter || new Date(new Date(n).getTime() + 10 * 60 * 1e3).toISOString(), i = e.issueInstant || n, s = e.sessionNotOnOrAfter || r, o = e.responseId || `_${Ae()}`, c = e.assertionId || `_${Ae()}`, l = [
|
|
5198
5200
|
{
|
|
5199
5201
|
"samlp:Response": [
|
|
5200
5202
|
{
|
|
@@ -5587,14 +5589,15 @@ async function bf(t, e) {
|
|
|
5587
5589
|
).toISOString(),
|
|
5588
5590
|
authParams: e.authParams,
|
|
5589
5591
|
authorization_url: t.req.url,
|
|
5592
|
+
csrf_token: Ae(),
|
|
5590
5593
|
...rn(t.req)
|
|
5591
5594
|
}
|
|
5592
5595
|
)), {
|
|
5593
5596
|
code: (await t.env.data.codes.create(e.client.tenant.id, {
|
|
5594
|
-
code_id:
|
|
5597
|
+
code_id: Ae(),
|
|
5595
5598
|
user_id: e.user.user_id,
|
|
5596
5599
|
code_type: "authorization_code",
|
|
5597
|
-
login_id: e.loginSession.
|
|
5600
|
+
login_id: e.loginSession.id,
|
|
5598
5601
|
expires_at: new Date(
|
|
5599
5602
|
Date.now() + v_ * 1e3
|
|
5600
5603
|
).toISOString()
|
|
@@ -5613,7 +5616,7 @@ async function Z0(t, e) {
|
|
|
5613
5616
|
return await t.env.data.refreshTokens.create(
|
|
5614
5617
|
n.tenant.id,
|
|
5615
5618
|
{
|
|
5616
|
-
id:
|
|
5619
|
+
id: Ae(),
|
|
5617
5620
|
session_id: s,
|
|
5618
5621
|
client_id: n.id,
|
|
5619
5622
|
expires_at: new Date(
|
|
@@ -5641,7 +5644,7 @@ async function Z0(t, e) {
|
|
|
5641
5644
|
}
|
|
5642
5645
|
async function kf(t, e) {
|
|
5643
5646
|
const { user: n, client: r, scope: i, audience: s } = e, o = await t.env.data.sessions.create(r.tenant.id, {
|
|
5644
|
-
id:
|
|
5647
|
+
id: Ae(),
|
|
5645
5648
|
user_id: n.user_id,
|
|
5646
5649
|
idle_expires_at: new Date(
|
|
5647
5650
|
Date.now() + Ds * 1e3
|
|
@@ -5683,10 +5686,10 @@ async function sn(t, e) {
|
|
|
5683
5686
|
throw new j(500, {
|
|
5684
5687
|
message: "Login session not found"
|
|
5685
5688
|
});
|
|
5686
|
-
const f = g_(), _ =
|
|
5687
|
-
code_id:
|
|
5689
|
+
const f = g_(), _ = Ae(12), w = await t.env.data.codes.create(i.tenant.id, {
|
|
5690
|
+
code_id: Ae(),
|
|
5688
5691
|
code_type: "ticket",
|
|
5689
|
-
login_id: e.loginSession.
|
|
5692
|
+
login_id: e.loginSession.id,
|
|
5690
5693
|
expires_at: new Date(Date.now() + b_).toISOString(),
|
|
5691
5694
|
// Concat the co_id and co_verifier
|
|
5692
5695
|
code_verifier: [_, f].join("|")
|
|
@@ -6567,9 +6570,9 @@ var Du;
|
|
|
6567
6570
|
throw new TypeError();
|
|
6568
6571
|
if (!me(I))
|
|
6569
6572
|
throw new TypeError();
|
|
6570
|
-
if (!me(M) && !H(M) && !
|
|
6573
|
+
if (!me(M) && !H(M) && !je(M))
|
|
6571
6574
|
throw new TypeError();
|
|
6572
|
-
return
|
|
6575
|
+
return je(M) && (M = void 0), B = wt(B), E(A, I, B, M);
|
|
6573
6576
|
}
|
|
6574
6577
|
}
|
|
6575
6578
|
e("decorate", N);
|
|
@@ -6608,18 +6611,18 @@ var Du;
|
|
|
6608
6611
|
return H(B) || (B = wt(B)), O(A, I, B);
|
|
6609
6612
|
}
|
|
6610
6613
|
e("getMetadata", le);
|
|
6611
|
-
function
|
|
6614
|
+
function ze(A, I, B) {
|
|
6612
6615
|
if (!me(I))
|
|
6613
6616
|
throw new TypeError();
|
|
6614
6617
|
return H(B) || (B = wt(B)), U(A, I, B);
|
|
6615
6618
|
}
|
|
6616
|
-
e("getOwnMetadata",
|
|
6617
|
-
function
|
|
6619
|
+
e("getOwnMetadata", ze);
|
|
6620
|
+
function De(A, I) {
|
|
6618
6621
|
if (!me(A))
|
|
6619
6622
|
throw new TypeError();
|
|
6620
6623
|
return H(I) || (I = wt(I)), J(A, I);
|
|
6621
6624
|
}
|
|
6622
|
-
e("getMetadataKeys",
|
|
6625
|
+
e("getMetadataKeys", De);
|
|
6623
6626
|
function Ye(A, I) {
|
|
6624
6627
|
if (!me(A))
|
|
6625
6628
|
throw new TypeError();
|
|
@@ -6644,7 +6647,7 @@ var Du;
|
|
|
6644
6647
|
function C(A, I) {
|
|
6645
6648
|
for (var B = A.length - 1; B >= 0; --B) {
|
|
6646
6649
|
var M = A[B], te = M(I);
|
|
6647
|
-
if (!H(te) && !
|
|
6650
|
+
if (!H(te) && !je(te)) {
|
|
6648
6651
|
if (!du(te))
|
|
6649
6652
|
throw new TypeError();
|
|
6650
6653
|
I = te;
|
|
@@ -6654,11 +6657,11 @@ var Du;
|
|
|
6654
6657
|
}
|
|
6655
6658
|
function E(A, I, B, M) {
|
|
6656
6659
|
for (var te = A.length - 1; te >= 0; --te) {
|
|
6657
|
-
var
|
|
6658
|
-
if (!H(
|
|
6659
|
-
if (!me(
|
|
6660
|
+
var $e = A[te], Ce = $e(I, B, M);
|
|
6661
|
+
if (!H(Ce) && !je(Ce)) {
|
|
6662
|
+
if (!me(Ce))
|
|
6660
6663
|
throw new TypeError();
|
|
6661
|
-
M =
|
|
6664
|
+
M = Ce;
|
|
6662
6665
|
}
|
|
6663
6666
|
}
|
|
6664
6667
|
return M;
|
|
@@ -6668,7 +6671,7 @@ var Du;
|
|
|
6668
6671
|
if (M)
|
|
6669
6672
|
return !0;
|
|
6670
6673
|
var te = Fo(I);
|
|
6671
|
-
return
|
|
6674
|
+
return je(te) ? !1 : x(A, te, B);
|
|
6672
6675
|
}
|
|
6673
6676
|
function k(A, I, B) {
|
|
6674
6677
|
var M = kr(
|
|
@@ -6684,7 +6687,7 @@ var Du;
|
|
|
6684
6687
|
if (M)
|
|
6685
6688
|
return U(A, I, B);
|
|
6686
6689
|
var te = Fo(I);
|
|
6687
|
-
if (!
|
|
6690
|
+
if (!je(te))
|
|
6688
6691
|
return O(A, te, B);
|
|
6689
6692
|
}
|
|
6690
6693
|
function U(A, I, B) {
|
|
@@ -6715,15 +6718,15 @@ var Du;
|
|
|
6715
6718
|
return B;
|
|
6716
6719
|
if (B.length <= 0)
|
|
6717
6720
|
return te;
|
|
6718
|
-
for (var
|
|
6719
|
-
var G = F[oe], Y =
|
|
6720
|
-
Y || (
|
|
6721
|
+
for (var $e = new v(), Ce = [], oe = 0, F = B; oe < F.length; oe++) {
|
|
6722
|
+
var G = F[oe], Y = $e.has(G);
|
|
6723
|
+
Y || ($e.add(G), Ce.push(G));
|
|
6721
6724
|
}
|
|
6722
6725
|
for (var X = 0, ae = te; X < ae.length; X++) {
|
|
6723
|
-
var G = ae[X], Y =
|
|
6724
|
-
Y || (
|
|
6726
|
+
var G = ae[X], Y = $e.has(G);
|
|
6727
|
+
Y || ($e.add(G), Ce.push(G));
|
|
6725
6728
|
}
|
|
6726
|
-
return
|
|
6729
|
+
return Ce;
|
|
6727
6730
|
}
|
|
6728
6731
|
function se(A, I) {
|
|
6729
6732
|
var B = kr(
|
|
@@ -6757,7 +6760,7 @@ var Du;
|
|
|
6757
6760
|
function H(A) {
|
|
6758
6761
|
return A === void 0;
|
|
6759
6762
|
}
|
|
6760
|
-
function
|
|
6763
|
+
function je(A) {
|
|
6761
6764
|
return A === null;
|
|
6762
6765
|
}
|
|
6763
6766
|
function ln(A) {
|
|
@@ -6766,7 +6769,7 @@ var Du;
|
|
|
6766
6769
|
function me(A) {
|
|
6767
6770
|
return typeof A == "object" ? A !== null : typeof A == "function";
|
|
6768
6771
|
}
|
|
6769
|
-
function
|
|
6772
|
+
function Ee(A, I) {
|
|
6770
6773
|
switch (pe(A)) {
|
|
6771
6774
|
case 0:
|
|
6772
6775
|
return A;
|
|
@@ -6815,7 +6818,7 @@ var Du;
|
|
|
6815
6818
|
return "" + A;
|
|
6816
6819
|
}
|
|
6817
6820
|
function wt(A) {
|
|
6818
|
-
var I =
|
|
6821
|
+
var I = Ee(A);
|
|
6819
6822
|
return ln(I) ? I : Xg(I);
|
|
6820
6823
|
}
|
|
6821
6824
|
function uu(A) {
|
|
@@ -6881,14 +6884,14 @@ var Du;
|
|
|
6881
6884
|
function em() {
|
|
6882
6885
|
var A;
|
|
6883
6886
|
!H(_) && typeof n.Reflect < "u" && !(_ in n.Reflect) && typeof n.Reflect.defineMetadata == "function" && (A = rm(n.Reflect));
|
|
6884
|
-
var I, B, M, te = new f(),
|
|
6885
|
-
registerProvider:
|
|
6887
|
+
var I, B, M, te = new f(), $e = {
|
|
6888
|
+
registerProvider: Ce,
|
|
6886
6889
|
getProvider: F,
|
|
6887
6890
|
setProvider: Y
|
|
6888
6891
|
};
|
|
6889
|
-
return
|
|
6890
|
-
function
|
|
6891
|
-
if (!Object.isExtensible(
|
|
6892
|
+
return $e;
|
|
6893
|
+
function Ce(X) {
|
|
6894
|
+
if (!Object.isExtensible($e))
|
|
6892
6895
|
throw new Error("Cannot add provider to a frozen registry.");
|
|
6893
6896
|
switch (!0) {
|
|
6894
6897
|
case A === X:
|
|
@@ -6966,9 +6969,9 @@ var Du;
|
|
|
6966
6969
|
var X = I.get(G);
|
|
6967
6970
|
return H(X) ? !1 : X.has(Y);
|
|
6968
6971
|
},
|
|
6969
|
-
OrdinaryDefineOwnMetadata:
|
|
6972
|
+
OrdinaryDefineOwnMetadata: Ce,
|
|
6970
6973
|
OrdinaryHasOwnMetadata: te,
|
|
6971
|
-
OrdinaryGetOwnMetadata:
|
|
6974
|
+
OrdinaryGetOwnMetadata: $e,
|
|
6972
6975
|
OrdinaryOwnMetadataKeys: oe,
|
|
6973
6976
|
OrdinaryDeleteMetadata: F
|
|
6974
6977
|
};
|
|
@@ -6998,7 +7001,7 @@ var Du;
|
|
|
6998
7001
|
);
|
|
6999
7002
|
return H(ae) ? !1 : lu(ae.has(G));
|
|
7000
7003
|
}
|
|
7001
|
-
function
|
|
7004
|
+
function $e(G, Y, X) {
|
|
7002
7005
|
var ae = M(
|
|
7003
7006
|
Y,
|
|
7004
7007
|
X,
|
|
@@ -7008,7 +7011,7 @@ var Du;
|
|
|
7008
7011
|
if (!H(ae))
|
|
7009
7012
|
return ae.get(G);
|
|
7010
7013
|
}
|
|
7011
|
-
function
|
|
7014
|
+
function Ce(G, Y, X, ae) {
|
|
7012
7015
|
var ye = M(
|
|
7013
7016
|
X,
|
|
7014
7017
|
ae,
|
|
@@ -7060,16 +7063,16 @@ var Du;
|
|
|
7060
7063
|
}
|
|
7061
7064
|
}
|
|
7062
7065
|
function rm(A) {
|
|
7063
|
-
var I = A.defineMetadata, B = A.hasOwnMetadata, M = A.getOwnMetadata, te = A.getOwnMetadataKeys,
|
|
7066
|
+
var I = A.defineMetadata, B = A.hasOwnMetadata, M = A.getOwnMetadata, te = A.getOwnMetadataKeys, $e = A.deleteMetadata, Ce = new f(), oe = {
|
|
7064
7067
|
isProviderFor: function(F, G) {
|
|
7065
|
-
var Y =
|
|
7066
|
-
return !H(Y) && Y.has(G) ? !0 : te(F, G).length ? (H(Y) && (Y = new v(),
|
|
7068
|
+
var Y = Ce.get(F);
|
|
7069
|
+
return !H(Y) && Y.has(G) ? !0 : te(F, G).length ? (H(Y) && (Y = new v(), Ce.set(F, Y)), Y.add(G), !0) : !1;
|
|
7067
7070
|
},
|
|
7068
7071
|
OrdinaryDefineOwnMetadata: I,
|
|
7069
7072
|
OrdinaryHasOwnMetadata: B,
|
|
7070
7073
|
OrdinaryGetOwnMetadata: M,
|
|
7071
7074
|
OrdinaryOwnMetadataKeys: te,
|
|
7072
|
-
OrdinaryDeleteMetadata:
|
|
7075
|
+
OrdinaryDeleteMetadata: $e
|
|
7073
7076
|
};
|
|
7074
7077
|
return oe;
|
|
7075
7078
|
}
|
|
@@ -7156,9 +7159,9 @@ var Du;
|
|
|
7156
7159
|
}, oe.prototype.keys = function() {
|
|
7157
7160
|
return new B(this._keys, this._values, te);
|
|
7158
7161
|
}, oe.prototype.values = function() {
|
|
7159
|
-
return new B(this._keys, this._values,
|
|
7162
|
+
return new B(this._keys, this._values, $e);
|
|
7160
7163
|
}, oe.prototype.entries = function() {
|
|
7161
|
-
return new B(this._keys, this._values,
|
|
7164
|
+
return new B(this._keys, this._values, Ce);
|
|
7162
7165
|
}, oe.prototype["@@iterator"] = function() {
|
|
7163
7166
|
return this.entries();
|
|
7164
7167
|
}, oe.prototype[o] = function() {
|
|
@@ -7180,10 +7183,10 @@ var Du;
|
|
|
7180
7183
|
function te(oe, F) {
|
|
7181
7184
|
return oe;
|
|
7182
7185
|
}
|
|
7183
|
-
function
|
|
7186
|
+
function $e(oe, F) {
|
|
7184
7187
|
return F;
|
|
7185
7188
|
}
|
|
7186
|
-
function
|
|
7189
|
+
function Ce(oe, F) {
|
|
7187
7190
|
return [oe, F];
|
|
7188
7191
|
}
|
|
7189
7192
|
}
|
|
@@ -7279,20 +7282,20 @@ var Du;
|
|
|
7279
7282
|
}
|
|
7280
7283
|
return F[B];
|
|
7281
7284
|
}
|
|
7282
|
-
function
|
|
7285
|
+
function $e(F, G) {
|
|
7283
7286
|
for (var Y = 0; Y < G; ++Y)
|
|
7284
7287
|
F[Y] = Math.random() * 255 | 0;
|
|
7285
7288
|
return F;
|
|
7286
7289
|
}
|
|
7287
|
-
function
|
|
7290
|
+
function Ce(F) {
|
|
7288
7291
|
if (typeof Uint8Array == "function") {
|
|
7289
7292
|
var G = new Uint8Array(F);
|
|
7290
|
-
return typeof crypto < "u" ? crypto.getRandomValues(G) : typeof msCrypto < "u" ? msCrypto.getRandomValues(G) :
|
|
7293
|
+
return typeof crypto < "u" ? crypto.getRandomValues(G) : typeof msCrypto < "u" ? msCrypto.getRandomValues(G) : $e(G, F), G;
|
|
7291
7294
|
}
|
|
7292
|
-
return
|
|
7295
|
+
return $e(new Array(F), F);
|
|
7293
7296
|
}
|
|
7294
7297
|
function oe() {
|
|
7295
|
-
var F =
|
|
7298
|
+
var F = Ce(A);
|
|
7296
7299
|
F[6] = F[6] & 79 | 64, F[8] = F[8] & 191 | 128;
|
|
7297
7300
|
for (var G = "", Y = 0; Y < A; ++Y) {
|
|
7298
7301
|
var X = F[Y];
|
|
@@ -7763,7 +7766,7 @@ class Js {
|
|
|
7763
7766
|
return ol(this.items);
|
|
7764
7767
|
}
|
|
7765
7768
|
}
|
|
7766
|
-
const Er = [new Uint8Array([1])], Hu = "0123456789", Zo = "name", Ku = "valueHexView", py = "isHexOnly", fy = "idBlock", hy = "tagClass", gy = "tagNumber", my = "isConstructed", _y = "fromBER", yy = "toBER", vy = "local",
|
|
7769
|
+
const Er = [new Uint8Array([1])], Hu = "0123456789", Zo = "name", Ku = "valueHexView", py = "isHexOnly", fy = "idBlock", hy = "tagClass", gy = "tagNumber", my = "isConstructed", _y = "fromBER", yy = "toBER", vy = "local", He = "", yt = new ArrayBuffer(0), Zs = new Uint8Array(0), Mr = "EndOfContent", If = "OCTET STRING", Cf = "BIT STRING";
|
|
7767
7770
|
function Ct(t) {
|
|
7768
7771
|
var e;
|
|
7769
7772
|
return e = class extends t {
|
|
@@ -7799,7 +7802,7 @@ function Ct(t) {
|
|
|
7799
7802
|
}, e.NAME = "hexBlock", e;
|
|
7800
7803
|
}
|
|
7801
7804
|
class On {
|
|
7802
|
-
constructor({ blockLength: e = 0, error: n =
|
|
7805
|
+
constructor({ blockLength: e = 0, error: n = He, warnings: r = [], valueBeforeDecode: i = Zs } = {}) {
|
|
7803
7806
|
this.blockLength = e, this.error = n, this.warnings = r, this.valueBeforeDecodeView = D.toUint8Array(i);
|
|
7804
7807
|
}
|
|
7805
7808
|
static blockName() {
|
|
@@ -7822,7 +7825,7 @@ class On {
|
|
|
7822
7825
|
}
|
|
7823
7826
|
}
|
|
7824
7827
|
On.NAME = "baseBlock";
|
|
7825
|
-
class
|
|
7828
|
+
class Me extends On {
|
|
7826
7829
|
fromBER(e, n, r) {
|
|
7827
7830
|
throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'");
|
|
7828
7831
|
}
|
|
@@ -7830,7 +7833,7 @@ class qe extends On {
|
|
|
7830
7833
|
throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'");
|
|
7831
7834
|
}
|
|
7832
7835
|
}
|
|
7833
|
-
|
|
7836
|
+
Me.NAME = "valueBlock";
|
|
7834
7837
|
class Nf extends Ct(On) {
|
|
7835
7838
|
constructor({ idBlock: e = {} } = {}) {
|
|
7836
7839
|
var n, r, i, s;
|
|
@@ -8010,9 +8013,9 @@ class jf extends On {
|
|
|
8010
8013
|
}
|
|
8011
8014
|
jf.NAME = "lengthBlock";
|
|
8012
8015
|
const W = {};
|
|
8013
|
-
class
|
|
8014
|
-
constructor({ name: e =
|
|
8015
|
-
super(i), this.name = e, this.optional = n, r && (this.primitiveSchema = r), this.idBlock = new Nf(i), this.lenBlock = new jf(i), this.valueBlock = s ? new s(i) : new
|
|
8016
|
+
class Pe extends On {
|
|
8017
|
+
constructor({ name: e = He, optional: n = !1, primitiveSchema: r, ...i } = {}, s) {
|
|
8018
|
+
super(i), this.name = e, this.optional = n, r && (this.primitiveSchema = r), this.idBlock = new Nf(i), this.lenBlock = new jf(i), this.valueBlock = s ? new s(i) : new Me(i);
|
|
8016
8019
|
}
|
|
8017
8020
|
fromBER(e, n, r) {
|
|
8018
8021
|
const i = this.valueBlock.fromBER(e, n, this.lenBlock.isIndefiniteForm ? r : this.lenBlock.length);
|
|
@@ -8058,15 +8061,15 @@ class Te extends On {
|
|
|
8058
8061
|
return dy(n, r);
|
|
8059
8062
|
}
|
|
8060
8063
|
}
|
|
8061
|
-
|
|
8064
|
+
Pe.NAME = "BaseBlock";
|
|
8062
8065
|
function $f(t) {
|
|
8063
8066
|
if (t instanceof W.Constructed)
|
|
8064
8067
|
for (const e of t.valueBlock.value)
|
|
8065
8068
|
$f(e) && (t.lenBlock.isIndefiniteForm = !0);
|
|
8066
8069
|
return !!t.lenBlock.isIndefiniteForm;
|
|
8067
8070
|
}
|
|
8068
|
-
class al extends
|
|
8069
|
-
constructor({ value: e =
|
|
8071
|
+
class al extends Pe {
|
|
8072
|
+
constructor({ value: e = He, ...n } = {}, r) {
|
|
8070
8073
|
super(n, r), e && this.fromString(e);
|
|
8071
8074
|
}
|
|
8072
8075
|
getValue() {
|
|
@@ -8084,14 +8087,14 @@ class al extends Te {
|
|
|
8084
8087
|
}
|
|
8085
8088
|
}
|
|
8086
8089
|
al.NAME = "BaseStringBlock";
|
|
8087
|
-
class Of extends Ct(
|
|
8090
|
+
class Of extends Ct(Me) {
|
|
8088
8091
|
constructor({ isHexOnly: e = !0, ...n } = {}) {
|
|
8089
8092
|
super(n), this.isHexOnly = e;
|
|
8090
8093
|
}
|
|
8091
8094
|
}
|
|
8092
8095
|
Of.NAME = "PrimitiveValueBlock";
|
|
8093
8096
|
var Bf;
|
|
8094
|
-
class ai extends
|
|
8097
|
+
class ai extends Pe {
|
|
8095
8098
|
constructor(e = {}) {
|
|
8096
8099
|
super(e, Of), this.idBlock.isConstructed = !1;
|
|
8097
8100
|
}
|
|
@@ -8107,7 +8110,7 @@ function wy(t, e) {
|
|
|
8107
8110
|
}
|
|
8108
8111
|
function ur(t, e = 0, n = t.length) {
|
|
8109
8112
|
const r = e;
|
|
8110
|
-
let i = new
|
|
8113
|
+
let i = new Pe({}, Me);
|
|
8111
8114
|
const s = new On();
|
|
8112
8115
|
if (!zt(s, t, e, n))
|
|
8113
8116
|
return i.error = s.error, {
|
|
@@ -8135,7 +8138,7 @@ function ur(t, e = 0, n = t.length) {
|
|
|
8135
8138
|
offset: -1,
|
|
8136
8139
|
result: i
|
|
8137
8140
|
};
|
|
8138
|
-
let l =
|
|
8141
|
+
let l = Pe;
|
|
8139
8142
|
switch (i.idBlock.tagClass) {
|
|
8140
8143
|
case 1:
|
|
8141
8144
|
if (i.idBlock.tagNumber >= 37 && i.idBlock.isHexOnly === !1)
|
|
@@ -8263,7 +8266,7 @@ function ur(t, e = 0, n = t.length) {
|
|
|
8263
8266
|
}
|
|
8264
8267
|
function Hn(t) {
|
|
8265
8268
|
if (!t.byteLength) {
|
|
8266
|
-
const e = new
|
|
8269
|
+
const e = new Pe({}, Me);
|
|
8267
8270
|
return e.error = "Input buffer has zero length", {
|
|
8268
8271
|
offset: -1,
|
|
8269
8272
|
result: e
|
|
@@ -8274,7 +8277,7 @@ function Hn(t) {
|
|
|
8274
8277
|
function by(t, e) {
|
|
8275
8278
|
return t ? 1 : e;
|
|
8276
8279
|
}
|
|
8277
|
-
class Wt extends
|
|
8280
|
+
class Wt extends Me {
|
|
8278
8281
|
constructor({ value: e = [], isIndefiniteForm: n = !1, ...r } = {}) {
|
|
8279
8282
|
super(r), this.value = e, this.isIndefiniteForm = n;
|
|
8280
8283
|
}
|
|
@@ -8313,7 +8316,7 @@ class Wt extends qe {
|
|
|
8313
8316
|
}
|
|
8314
8317
|
Wt.NAME = "ConstructedValueBlock";
|
|
8315
8318
|
var Tf;
|
|
8316
|
-
class
|
|
8319
|
+
class Ke extends Pe {
|
|
8317
8320
|
constructor(e = {}) {
|
|
8318
8321
|
super(e, Wt), this.idBlock.isConstructed = !0;
|
|
8319
8322
|
}
|
|
@@ -8334,10 +8337,10 @@ ${e.join(`
|
|
|
8334
8337
|
`)}` : `${n} :`;
|
|
8335
8338
|
}
|
|
8336
8339
|
}
|
|
8337
|
-
Tf =
|
|
8340
|
+
Tf = Ke;
|
|
8338
8341
|
W.Constructed = Tf;
|
|
8339
|
-
|
|
8340
|
-
class Pf extends
|
|
8342
|
+
Ke.NAME = "CONSTRUCTED";
|
|
8343
|
+
class Pf extends Me {
|
|
8341
8344
|
fromBER(e, n, r) {
|
|
8342
8345
|
return n;
|
|
8343
8346
|
}
|
|
@@ -8347,7 +8350,7 @@ class Pf extends qe {
|
|
|
8347
8350
|
}
|
|
8348
8351
|
Pf.override = "EndOfContentValueBlock";
|
|
8349
8352
|
var Rf;
|
|
8350
|
-
class cl extends
|
|
8353
|
+
class cl extends Pe {
|
|
8351
8354
|
constructor(e = {}) {
|
|
8352
8355
|
super(e, Pf), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 0;
|
|
8353
8356
|
}
|
|
@@ -8356,9 +8359,9 @@ Rf = cl;
|
|
|
8356
8359
|
W.EndOfContent = Rf;
|
|
8357
8360
|
cl.NAME = Mr;
|
|
8358
8361
|
var Lf;
|
|
8359
|
-
class wn extends
|
|
8362
|
+
class wn extends Pe {
|
|
8360
8363
|
constructor(e = {}) {
|
|
8361
|
-
super(e,
|
|
8364
|
+
super(e, Me), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 5;
|
|
8362
8365
|
}
|
|
8363
8366
|
fromBER(e, n, r) {
|
|
8364
8367
|
return this.lenBlock.length > 0 && this.warnings.push("Non-zero length of value block for Null type"), this.idBlock.error.length || (this.blockLength += this.idBlock.blockLength), this.lenBlock.error.length || (this.blockLength += this.lenBlock.blockLength), this.blockLength += r, n + r > e.byteLength ? (this.error = "End of input reached before message was fully decoded (inconsistent offset and length values)", -1) : n + r;
|
|
@@ -8378,7 +8381,7 @@ class wn extends Te {
|
|
|
8378
8381
|
Lf = wn;
|
|
8379
8382
|
W.Null = Lf;
|
|
8380
8383
|
wn.NAME = "NULL";
|
|
8381
|
-
class Uf extends Ct(
|
|
8384
|
+
class Uf extends Ct(Me) {
|
|
8382
8385
|
constructor({ value: e, ...n } = {}) {
|
|
8383
8386
|
super(n), n.valueHex ? this.valueHexView = D.toUint8Array(n.valueHex) : this.valueHexView = new Uint8Array(1), e && (this.value = e);
|
|
8384
8387
|
}
|
|
@@ -8407,7 +8410,7 @@ class Uf extends Ct(qe) {
|
|
|
8407
8410
|
}
|
|
8408
8411
|
Uf.NAME = "BooleanValueBlock";
|
|
8409
8412
|
var Vf;
|
|
8410
|
-
class Ys extends
|
|
8413
|
+
class Ys extends Pe {
|
|
8411
8414
|
constructor(e = {}) {
|
|
8412
8415
|
super(e, Uf), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 1;
|
|
8413
8416
|
}
|
|
@@ -8459,7 +8462,7 @@ class qf extends Ct(Wt) {
|
|
|
8459
8462
|
}
|
|
8460
8463
|
qf.NAME = "OctetStringValueBlock";
|
|
8461
8464
|
var Mf;
|
|
8462
|
-
let mn = class zf extends
|
|
8465
|
+
let mn = class zf extends Pe {
|
|
8463
8466
|
constructor({ idBlock: e = {}, lenBlock: n = {}, ...r } = {}) {
|
|
8464
8467
|
var i, s;
|
|
8465
8468
|
(i = r.isConstructed) !== null && i !== void 0 || (r.isConstructed = !!(!((s = r.value) === null || s === void 0) && s.length)), super({
|
|
@@ -8490,7 +8493,7 @@ let mn = class zf extends Te {
|
|
|
8490
8493
|
return super.fromBER(e, n, r);
|
|
8491
8494
|
}
|
|
8492
8495
|
onAsciiEncoding() {
|
|
8493
|
-
return this.valueBlock.isConstructed || this.valueBlock.value && this.valueBlock.value.length ?
|
|
8496
|
+
return this.valueBlock.isConstructed || this.valueBlock.value && this.valueBlock.value.length ? Ke.prototype.onAsciiEncoding.call(this) : `${this.constructor.NAME} : ${Z.ToHex(this.valueBlock.valueHexView)}`;
|
|
8494
8497
|
}
|
|
8495
8498
|
getValue() {
|
|
8496
8499
|
if (!this.idBlock.isConstructed)
|
|
@@ -8569,7 +8572,7 @@ class Df extends Ct(Wt) {
|
|
|
8569
8572
|
}
|
|
8570
8573
|
Df.NAME = "BitStringValueBlock";
|
|
8571
8574
|
var Ff;
|
|
8572
|
-
let _n = class extends
|
|
8575
|
+
let _n = class extends Pe {
|
|
8573
8576
|
constructor({ idBlock: e = {}, lenBlock: n = {}, ...r } = {}) {
|
|
8574
8577
|
var i, s;
|
|
8575
8578
|
(i = r.isConstructed) !== null && i !== void 0 || (r.isConstructed = !!(!((s = r.value) === null || s === void 0) && s.length)), super({
|
|
@@ -8589,7 +8592,7 @@ let _n = class extends Te {
|
|
|
8589
8592
|
}
|
|
8590
8593
|
onAsciiEncoding() {
|
|
8591
8594
|
if (this.valueBlock.isConstructed || this.valueBlock.value && this.valueBlock.value.length)
|
|
8592
|
-
return
|
|
8595
|
+
return Ke.prototype.onAsciiEncoding.call(this);
|
|
8593
8596
|
{
|
|
8594
8597
|
const e = [], n = this.valueBlock.valueHexView;
|
|
8595
8598
|
for (const i of n)
|
|
@@ -8663,7 +8666,7 @@ function xy(t, e) {
|
|
|
8663
8666
|
}
|
|
8664
8667
|
return s.slice();
|
|
8665
8668
|
}
|
|
8666
|
-
class ll extends Ct(
|
|
8669
|
+
class ll extends Ct(Me) {
|
|
8667
8670
|
constructor({ value: e, ...n } = {}) {
|
|
8668
8671
|
super(n), this._valueDec = 0, n.valueHex && this.setValueHex(), e !== void 0 && (this.valueDec = e);
|
|
8669
8672
|
}
|
|
@@ -8746,7 +8749,7 @@ Object.defineProperty(Hf.prototype, "valueHex", {
|
|
|
8746
8749
|
}
|
|
8747
8750
|
});
|
|
8748
8751
|
var Kf;
|
|
8749
|
-
class St extends
|
|
8752
|
+
class St extends Pe {
|
|
8750
8753
|
constructor(e = {}) {
|
|
8751
8754
|
super(e, ll), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 2;
|
|
8752
8755
|
}
|
|
@@ -8792,7 +8795,7 @@ class Xs extends St {
|
|
|
8792
8795
|
Wf = Xs;
|
|
8793
8796
|
W.Enumerated = Wf;
|
|
8794
8797
|
Xs.NAME = "ENUMERATED";
|
|
8795
|
-
class Na extends Ct(
|
|
8798
|
+
class Na extends Ct(Me) {
|
|
8796
8799
|
constructor({ valueDec: e = -1, isFirstSid: n = !1, ...r } = {}) {
|
|
8797
8800
|
super(r), this.valueDec = e, this.isFirstSid = n;
|
|
8798
8801
|
}
|
|
@@ -8862,8 +8865,8 @@ class Na extends Ct(qe) {
|
|
|
8862
8865
|
}
|
|
8863
8866
|
}
|
|
8864
8867
|
Na.NAME = "sidBlock";
|
|
8865
|
-
class Gf extends
|
|
8866
|
-
constructor({ value: e =
|
|
8868
|
+
class Gf extends Me {
|
|
8869
|
+
constructor({ value: e = He, ...n } = {}) {
|
|
8867
8870
|
super(n), this.value = [], e && this.fromString(e);
|
|
8868
8871
|
}
|
|
8869
8872
|
fromBER(e, n, r) {
|
|
@@ -8944,7 +8947,7 @@ class Gf extends qe {
|
|
|
8944
8947
|
}
|
|
8945
8948
|
Gf.NAME = "ObjectIdentifierValueBlock";
|
|
8946
8949
|
var Jf;
|
|
8947
|
-
class Qs extends
|
|
8950
|
+
class Qs extends Pe {
|
|
8948
8951
|
constructor(e = {}) {
|
|
8949
8952
|
super(e, Gf), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 6;
|
|
8950
8953
|
}
|
|
@@ -9019,8 +9022,8 @@ class ja extends Ct(On) {
|
|
|
9019
9022
|
}
|
|
9020
9023
|
}
|
|
9021
9024
|
ja.NAME = "relativeSidBlock";
|
|
9022
|
-
class Zf extends
|
|
9023
|
-
constructor({ value: e =
|
|
9025
|
+
class Zf extends Me {
|
|
9026
|
+
constructor({ value: e = He, ...n } = {}) {
|
|
9024
9027
|
super(n), this.value = [], e && this.fromString(e);
|
|
9025
9028
|
}
|
|
9026
9029
|
fromBER(e, n, r) {
|
|
@@ -9077,7 +9080,7 @@ class Zf extends qe {
|
|
|
9077
9080
|
}
|
|
9078
9081
|
Zf.NAME = "RelativeObjectIdentifierValueBlock";
|
|
9079
9082
|
var Yf;
|
|
9080
|
-
class ul extends
|
|
9083
|
+
class ul extends Pe {
|
|
9081
9084
|
constructor(e = {}) {
|
|
9082
9085
|
super(e, Zf), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 13;
|
|
9083
9086
|
}
|
|
@@ -9101,7 +9104,7 @@ Yf = ul;
|
|
|
9101
9104
|
W.RelativeObjectIdentifier = Yf;
|
|
9102
9105
|
ul.NAME = "RelativeObjectIdentifier";
|
|
9103
9106
|
var Xf;
|
|
9104
|
-
class Pt extends
|
|
9107
|
+
class Pt extends Ke {
|
|
9105
9108
|
constructor(e = {}) {
|
|
9106
9109
|
super(e), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 16;
|
|
9107
9110
|
}
|
|
@@ -9110,7 +9113,7 @@ Xf = Pt;
|
|
|
9110
9113
|
W.Sequence = Xf;
|
|
9111
9114
|
Pt.NAME = "SEQUENCE";
|
|
9112
9115
|
var Qf;
|
|
9113
|
-
let Rt = class extends
|
|
9116
|
+
let Rt = class extends Ke {
|
|
9114
9117
|
constructor(e = {}) {
|
|
9115
9118
|
super(e), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 17;
|
|
9116
9119
|
}
|
|
@@ -9118,9 +9121,9 @@ let Rt = class extends He {
|
|
|
9118
9121
|
Qf = Rt;
|
|
9119
9122
|
W.Set = Qf;
|
|
9120
9123
|
Rt.NAME = "SET";
|
|
9121
|
-
class eh extends Ct(
|
|
9124
|
+
class eh extends Ct(Me) {
|
|
9122
9125
|
constructor({ ...e } = {}) {
|
|
9123
|
-
super(e), this.isHexOnly = !0, this.value =
|
|
9126
|
+
super(e), this.isHexOnly = !0, this.value = He;
|
|
9124
9127
|
}
|
|
9125
9128
|
toJSON() {
|
|
9126
9129
|
return {
|
|
@@ -9529,7 +9532,7 @@ xh = gl;
|
|
|
9529
9532
|
W.TIME = xh;
|
|
9530
9533
|
gl.NAME = "TIME";
|
|
9531
9534
|
class bn {
|
|
9532
|
-
constructor({ name: e =
|
|
9535
|
+
constructor({ name: e = He, optional: n = !1 } = {}) {
|
|
9533
9536
|
this.name = e, this.optional = n;
|
|
9534
9537
|
}
|
|
9535
9538
|
}
|
|
@@ -9684,7 +9687,7 @@ function fn(t, e, n) {
|
|
|
9684
9687
|
result: t
|
|
9685
9688
|
};
|
|
9686
9689
|
}
|
|
9687
|
-
if (n.name && (n.name = n.name.replace(/^\s+|\s+$/g,
|
|
9690
|
+
if (n.name && (n.name = n.name.replace(/^\s+|\s+$/g, He), n.name && (t[n.name] = e)), n instanceof W.Constructed) {
|
|
9688
9691
|
let s = 0, o = {
|
|
9689
9692
|
verified: !1,
|
|
9690
9693
|
result: {
|
|
@@ -9703,7 +9706,7 @@ function fn(t, e, n) {
|
|
|
9703
9706
|
return l ? {
|
|
9704
9707
|
verified: !0,
|
|
9705
9708
|
result: t
|
|
9706
|
-
} : (n.name && (n.name = n.name.replace(/^\s+|\s+$/g,
|
|
9709
|
+
} : (n.name && (n.name = n.name.replace(/^\s+|\s+$/g, He), n.name && delete t[n.name]), t.error = "Inconsistent object length", {
|
|
9707
9710
|
verified: !1,
|
|
9708
9711
|
result: t
|
|
9709
9712
|
});
|
|
@@ -9715,14 +9718,14 @@ function fn(t, e, n) {
|
|
|
9715
9718
|
verified: !1,
|
|
9716
9719
|
result: t
|
|
9717
9720
|
};
|
|
9718
|
-
return t.error = "Inconsistent length between ASN.1 data and schema", n.name && (n.name = n.name.replace(/^\s+|\s+$/g,
|
|
9721
|
+
return t.error = "Inconsistent length between ASN.1 data and schema", n.name && (n.name = n.name.replace(/^\s+|\s+$/g, He), n.name && (delete t[n.name], u.name = n.name)), u;
|
|
9719
9722
|
}
|
|
9720
9723
|
} else if (n.valueBlock.value[0] instanceof is) {
|
|
9721
9724
|
if (o = fn(t, e.valueBlock.value[l], n.valueBlock.value[0].value), o.verified === !1)
|
|
9722
9725
|
if (n.valueBlock.value[0].optional)
|
|
9723
9726
|
s++;
|
|
9724
9727
|
else
|
|
9725
|
-
return n.name && (n.name = n.name.replace(/^\s+|\s+$/g,
|
|
9728
|
+
return n.name && (n.name = n.name.replace(/^\s+|\s+$/g, He), n.name && delete t[n.name]), o;
|
|
9726
9729
|
if (Zo in n.valueBlock.value[0] && n.valueBlock.value[0].name.length > 0) {
|
|
9727
9730
|
let u = {};
|
|
9728
9731
|
vy in n.valueBlock.value[0] && n.valueBlock.value[0].local ? u = e : u = t, typeof u[n.valueBlock.value[0].name] > "u" && (u[n.valueBlock.value[0].name] = []), u[n.valueBlock.value[0].name].push(e.valueBlock.value[l]);
|
|
@@ -9731,13 +9734,13 @@ function fn(t, e, n) {
|
|
|
9731
9734
|
if (n.valueBlock.value[l].optional)
|
|
9732
9735
|
s++;
|
|
9733
9736
|
else
|
|
9734
|
-
return n.name && (n.name = n.name.replace(/^\s+|\s+$/g,
|
|
9737
|
+
return n.name && (n.name = n.name.replace(/^\s+|\s+$/g, He), n.name && delete t[n.name]), o;
|
|
9735
9738
|
if (o.verified === !1) {
|
|
9736
9739
|
const l = {
|
|
9737
9740
|
verified: !1,
|
|
9738
9741
|
result: t
|
|
9739
9742
|
};
|
|
9740
|
-
return n.name && (n.name = n.name.replace(/^\s+|\s+$/g,
|
|
9743
|
+
return n.name && (n.name = n.name.replace(/^\s+|\s+$/g, He), n.name && (delete t[n.name], l.name = n.name)), l;
|
|
9741
9744
|
}
|
|
9742
9745
|
return {
|
|
9743
9746
|
verified: !0,
|
|
@@ -9751,7 +9754,7 @@ function fn(t, e, n) {
|
|
|
9751
9754
|
verified: !1,
|
|
9752
9755
|
result: s.result
|
|
9753
9756
|
};
|
|
9754
|
-
return n.name && (n.name = n.name.replace(/^\s+|\s+$/g,
|
|
9757
|
+
return n.name && (n.name = n.name.replace(/^\s+|\s+$/g, He), n.name && (delete t[n.name], o.name = n.name)), o;
|
|
9755
9758
|
}
|
|
9756
9759
|
return fn(t, s.result, n.primitiveSchema);
|
|
9757
9760
|
}
|
|
@@ -9775,14 +9778,14 @@ function Ay(t, e) {
|
|
|
9775
9778
|
const Sh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9776
9779
|
__proto__: null,
|
|
9777
9780
|
Any: bn,
|
|
9778
|
-
BaseBlock:
|
|
9781
|
+
BaseBlock: Pe,
|
|
9779
9782
|
BaseStringBlock: al,
|
|
9780
9783
|
BitString: _n,
|
|
9781
9784
|
BmpString: eo,
|
|
9782
9785
|
Boolean: Ys,
|
|
9783
9786
|
CharacterString: lo,
|
|
9784
9787
|
Choice: ml,
|
|
9785
|
-
Constructed:
|
|
9788
|
+
Constructed: Ke,
|
|
9786
9789
|
DATE: dl,
|
|
9787
9790
|
DateTime: fl,
|
|
9788
9791
|
Duration: hl,
|
|
@@ -9811,7 +9814,7 @@ const Sh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9811
9814
|
UTCTime: li,
|
|
9812
9815
|
UniversalString: to,
|
|
9813
9816
|
Utf8String: Dt,
|
|
9814
|
-
ValueBlock:
|
|
9817
|
+
ValueBlock: Me,
|
|
9815
9818
|
VideotexString: so,
|
|
9816
9819
|
ViewWriter: Js,
|
|
9817
9820
|
VisibleString: ci,
|
|
@@ -10064,7 +10067,7 @@ class Gy {
|
|
|
10064
10067
|
if (o.context !== null && o.context !== void 0)
|
|
10065
10068
|
if (o.implicit)
|
|
10066
10069
|
if (typeof o.type == "number" || Tt(o.type)) {
|
|
10067
|
-
const p = o.repeated ?
|
|
10070
|
+
const p = o.repeated ? Ke : ai;
|
|
10068
10071
|
i.push(new p({
|
|
10069
10072
|
name: c,
|
|
10070
10073
|
optional: u,
|
|
@@ -10077,7 +10080,7 @@ class Gy {
|
|
|
10077
10080
|
this.cache(o.type);
|
|
10078
10081
|
const p = !!o.repeated;
|
|
10079
10082
|
let h = p ? l : this.get(o.type, !0).schema;
|
|
10080
|
-
h = "valueBlock" in h ? h.valueBlock.value : h.value, i.push(new
|
|
10083
|
+
h = "valueBlock" in h ? h.valueBlock.value : h.value, i.push(new Ke({
|
|
10081
10084
|
name: p ? "" : c,
|
|
10082
10085
|
optional: u,
|
|
10083
10086
|
idBlock: {
|
|
@@ -10088,7 +10091,7 @@ class Gy {
|
|
|
10088
10091
|
}));
|
|
10089
10092
|
}
|
|
10090
10093
|
else
|
|
10091
|
-
i.push(new
|
|
10094
|
+
i.push(new Ke({
|
|
10092
10095
|
optional: u,
|
|
10093
10096
|
idBlock: {
|
|
10094
10097
|
tagClass: 3,
|
|
@@ -10153,8 +10156,8 @@ class Jy {
|
|
|
10153
10156
|
const i = rt.get(n);
|
|
10154
10157
|
rt.cache(n);
|
|
10155
10158
|
let s = i.schema;
|
|
10156
|
-
if (e.constructor ===
|
|
10157
|
-
s = new
|
|
10159
|
+
if (e.constructor === Ke && i.type !== P.Choice) {
|
|
10160
|
+
s = new Ke({
|
|
10158
10161
|
idBlock: {
|
|
10159
10162
|
tagClass: 3,
|
|
10160
10163
|
tagNumber: e.idBlock.tagNumber
|
|
@@ -10233,7 +10236,7 @@ class Jy {
|
|
|
10233
10236
|
}
|
|
10234
10237
|
class yl {
|
|
10235
10238
|
static serialize(e) {
|
|
10236
|
-
return e instanceof
|
|
10239
|
+
return e instanceof Pe ? e.toBER(!1) : this.toASN(e).toBER(!1);
|
|
10237
10240
|
}
|
|
10238
10241
|
static toASN(e) {
|
|
10239
10242
|
if (e && typeof e == "object" && Tt(e))
|
|
@@ -10272,7 +10275,7 @@ class yl {
|
|
|
10272
10275
|
...p
|
|
10273
10276
|
}));
|
|
10274
10277
|
} else
|
|
10275
|
-
i.push(new
|
|
10278
|
+
i.push(new Ke({
|
|
10276
10279
|
optional: c.optional,
|
|
10277
10280
|
idBlock: {
|
|
10278
10281
|
tagClass: 3,
|
|
@@ -10281,7 +10284,7 @@ class yl {
|
|
|
10281
10284
|
value: u.valueBlock.value
|
|
10282
10285
|
}));
|
|
10283
10286
|
else
|
|
10284
|
-
i.push(new
|
|
10287
|
+
i.push(new Ke({
|
|
10285
10288
|
optional: c.optional,
|
|
10286
10289
|
idBlock: {
|
|
10287
10290
|
tagClass: 3,
|
|
@@ -10883,7 +10886,7 @@ class Zu {
|
|
|
10883
10886
|
}
|
|
10884
10887
|
}
|
|
10885
10888
|
var $a, Oa, Ba;
|
|
10886
|
-
let
|
|
10889
|
+
let Re = class {
|
|
10887
10890
|
constructor(e = {}) {
|
|
10888
10891
|
Object.assign(this, e);
|
|
10889
10892
|
}
|
|
@@ -10893,23 +10896,23 @@ let Pe = class {
|
|
|
10893
10896
|
};
|
|
10894
10897
|
d([
|
|
10895
10898
|
g({ type: b.TeletexString })
|
|
10896
|
-
],
|
|
10899
|
+
], Re.prototype, "teletexString", void 0);
|
|
10897
10900
|
d([
|
|
10898
10901
|
g({ type: b.PrintableString })
|
|
10899
|
-
],
|
|
10902
|
+
], Re.prototype, "printableString", void 0);
|
|
10900
10903
|
d([
|
|
10901
10904
|
g({ type: b.UniversalString })
|
|
10902
|
-
],
|
|
10905
|
+
], Re.prototype, "universalString", void 0);
|
|
10903
10906
|
d([
|
|
10904
10907
|
g({ type: b.Utf8String })
|
|
10905
|
-
],
|
|
10908
|
+
], Re.prototype, "utf8String", void 0);
|
|
10906
10909
|
d([
|
|
10907
10910
|
g({ type: b.BmpString })
|
|
10908
|
-
],
|
|
10909
|
-
|
|
10911
|
+
], Re.prototype, "bmpString", void 0);
|
|
10912
|
+
Re = d([
|
|
10910
10913
|
R({ type: P.Choice })
|
|
10911
|
-
],
|
|
10912
|
-
let Zn = class extends
|
|
10914
|
+
], Re);
|
|
10915
|
+
let Zn = class extends Re {
|
|
10913
10916
|
constructor(e = {}) {
|
|
10914
10917
|
super(e), Object.assign(this, e);
|
|
10915
10918
|
}
|
|
@@ -10978,14 +10981,14 @@ d([
|
|
|
10978
10981
|
], zr.prototype, "value", void 0);
|
|
10979
10982
|
class vl {
|
|
10980
10983
|
constructor(e = {}) {
|
|
10981
|
-
this.partyName = new
|
|
10984
|
+
this.partyName = new Re(), Object.assign(this, e);
|
|
10982
10985
|
}
|
|
10983
10986
|
}
|
|
10984
10987
|
d([
|
|
10985
|
-
g({ type:
|
|
10988
|
+
g({ type: Re, optional: !0, context: 0, implicit: !0 })
|
|
10986
10989
|
], vl.prototype, "nameAssigner", void 0);
|
|
10987
10990
|
d([
|
|
10988
|
-
g({ type:
|
|
10991
|
+
g({ type: Re, context: 1, implicit: !0 })
|
|
10989
10992
|
], vl.prototype, "partyName", void 0);
|
|
10990
10993
|
let ie = class {
|
|
10991
10994
|
constructor(e = {}) {
|
|
@@ -11080,16 +11083,16 @@ d([
|
|
|
11080
11083
|
g({ type: b.Integer, optional: !0 })
|
|
11081
11084
|
], os.prototype, "pathLenConstraint", void 0);
|
|
11082
11085
|
var Ua;
|
|
11083
|
-
let
|
|
11086
|
+
let qe = Ua = class extends ge {
|
|
11084
11087
|
constructor(e) {
|
|
11085
11088
|
super(e), Object.setPrototypeOf(this, Ua.prototype);
|
|
11086
11089
|
}
|
|
11087
11090
|
};
|
|
11088
|
-
|
|
11091
|
+
qe = Ua = d([
|
|
11089
11092
|
R({ type: P.Sequence, itemType: ie })
|
|
11090
|
-
],
|
|
11093
|
+
], qe);
|
|
11091
11094
|
var Va;
|
|
11092
|
-
let td = Va = class extends
|
|
11095
|
+
let td = Va = class extends qe {
|
|
11093
11096
|
constructor(e) {
|
|
11094
11097
|
super(e), Object.setPrototypeOf(this, Va.prototype);
|
|
11095
11098
|
}
|
|
@@ -11264,30 +11267,30 @@ let rd = Da = class extends Kn {
|
|
|
11264
11267
|
rd = Da = d([
|
|
11265
11268
|
R({ type: P.Sequence, itemType: pr })
|
|
11266
11269
|
], rd);
|
|
11267
|
-
class
|
|
11270
|
+
class Ue {
|
|
11268
11271
|
constructor(e = {}) {
|
|
11269
|
-
this.onlyContainsUserCerts =
|
|
11272
|
+
this.onlyContainsUserCerts = Ue.ONLY, this.onlyContainsCACerts = Ue.ONLY, this.indirectCRL = Ue.ONLY, this.onlyContainsAttributeCerts = Ue.ONLY, Object.assign(this, e);
|
|
11270
11273
|
}
|
|
11271
11274
|
}
|
|
11272
|
-
|
|
11275
|
+
Ue.ONLY = !1;
|
|
11273
11276
|
d([
|
|
11274
11277
|
g({ type: kn, context: 0, optional: !0 })
|
|
11275
|
-
],
|
|
11278
|
+
], Ue.prototype, "distributionPoint", void 0);
|
|
11276
11279
|
d([
|
|
11277
|
-
g({ type: b.Boolean, context: 1, defaultValue:
|
|
11278
|
-
],
|
|
11280
|
+
g({ type: b.Boolean, context: 1, defaultValue: Ue.ONLY, implicit: !0 })
|
|
11281
|
+
], Ue.prototype, "onlyContainsUserCerts", void 0);
|
|
11279
11282
|
d([
|
|
11280
|
-
g({ type: b.Boolean, context: 2, defaultValue:
|
|
11281
|
-
],
|
|
11283
|
+
g({ type: b.Boolean, context: 2, defaultValue: Ue.ONLY, implicit: !0 })
|
|
11284
|
+
], Ue.prototype, "onlyContainsCACerts", void 0);
|
|
11282
11285
|
d([
|
|
11283
11286
|
g({ type: jh, context: 3, optional: !0, implicit: !0 })
|
|
11284
|
-
],
|
|
11287
|
+
], Ue.prototype, "onlySomeReasons", void 0);
|
|
11285
11288
|
d([
|
|
11286
|
-
g({ type: b.Boolean, context: 4, defaultValue:
|
|
11287
|
-
],
|
|
11289
|
+
g({ type: b.Boolean, context: 4, defaultValue: Ue.ONLY, implicit: !0 })
|
|
11290
|
+
], Ue.prototype, "indirectCRL", void 0);
|
|
11288
11291
|
d([
|
|
11289
|
-
g({ type: b.Boolean, context: 5, defaultValue:
|
|
11290
|
-
],
|
|
11292
|
+
g({ type: b.Boolean, context: 5, defaultValue: Ue.ONLY, implicit: !0 })
|
|
11293
|
+
], Ue.prototype, "onlyContainsAttributeCerts", void 0);
|
|
11291
11294
|
var Tr;
|
|
11292
11295
|
(function(t) {
|
|
11293
11296
|
t[t.unspecified = 0] = "unspecified", t[t.keyCompromise = 1] = "keyCompromise", t[t.cACompromise = 2] = "cACompromise", t[t.affiliationChanged = 3] = "affiliationChanged", t[t.superseded = 4] = "superseded", t[t.cessationOfOperation = 5] = "cessationOfOperation", t[t.certificateHold = 6] = "certificateHold", t[t.removeFromCRL = 8] = "removeFromCRL", t[t.privilegeWithdrawn = 9] = "privilegeWithdrawn", t[t.aACompromise = 10] = "aACompromise";
|
|
@@ -11343,7 +11346,7 @@ Wa = d([
|
|
|
11343
11346
|
R({ type: P.Choice })
|
|
11344
11347
|
], Wa);
|
|
11345
11348
|
var Ga;
|
|
11346
|
-
let id = Ga = class extends
|
|
11349
|
+
let id = Ga = class extends qe {
|
|
11347
11350
|
constructor(e) {
|
|
11348
11351
|
super(e), Object.setPrototypeOf(this, Ga.prototype);
|
|
11349
11352
|
}
|
|
@@ -11444,7 +11447,7 @@ sd = Za = d([
|
|
|
11444
11447
|
], sd);
|
|
11445
11448
|
var Ya;
|
|
11446
11449
|
const Ph = `${on}.17`;
|
|
11447
|
-
let Xa = Ya = class extends
|
|
11450
|
+
let Xa = Ya = class extends qe {
|
|
11448
11451
|
constructor(e) {
|
|
11449
11452
|
super(e), Object.setPrototypeOf(this, Ya.prototype);
|
|
11450
11453
|
}
|
|
@@ -11549,7 +11552,7 @@ d([
|
|
|
11549
11552
|
d([
|
|
11550
11553
|
g({ type: b.BitString })
|
|
11551
11554
|
], ft.prototype, "subjectPublicKey", void 0);
|
|
11552
|
-
let
|
|
11555
|
+
let Te = class {
|
|
11553
11556
|
constructor(e) {
|
|
11554
11557
|
if (e)
|
|
11555
11558
|
if (typeof e == "string" || typeof e == "number" || e instanceof Date) {
|
|
@@ -11569,25 +11572,25 @@ d([
|
|
|
11569
11572
|
g({
|
|
11570
11573
|
type: b.UTCTime
|
|
11571
11574
|
})
|
|
11572
|
-
],
|
|
11575
|
+
], Te.prototype, "utcTime", void 0);
|
|
11573
11576
|
d([
|
|
11574
11577
|
g({
|
|
11575
11578
|
type: b.GeneralizedTime
|
|
11576
11579
|
})
|
|
11577
|
-
],
|
|
11578
|
-
|
|
11580
|
+
], Te.prototype, "generalTime", void 0);
|
|
11581
|
+
Te = d([
|
|
11579
11582
|
R({ type: P.Choice })
|
|
11580
|
-
],
|
|
11583
|
+
], Te);
|
|
11581
11584
|
class di {
|
|
11582
11585
|
constructor(e) {
|
|
11583
|
-
this.notBefore = new
|
|
11586
|
+
this.notBefore = new Te(/* @__PURE__ */ new Date()), this.notAfter = new Te(/* @__PURE__ */ new Date()), e && (this.notBefore = new Te(e.notBefore), this.notAfter = new Te(e.notAfter));
|
|
11584
11587
|
}
|
|
11585
11588
|
}
|
|
11586
11589
|
d([
|
|
11587
|
-
g({ type:
|
|
11590
|
+
g({ type: Te })
|
|
11588
11591
|
], di.prototype, "notBefore", void 0);
|
|
11589
11592
|
d([
|
|
11590
|
-
g({ type:
|
|
11593
|
+
g({ type: Te })
|
|
11591
11594
|
], di.prototype, "notAfter", void 0);
|
|
11592
11595
|
var tc;
|
|
11593
11596
|
let ot = class qh {
|
|
@@ -11683,21 +11686,21 @@ d([
|
|
|
11683
11686
|
], Sn.prototype, "signatureValue", void 0);
|
|
11684
11687
|
class _o {
|
|
11685
11688
|
constructor(e = {}) {
|
|
11686
|
-
this.userCertificate = new ArrayBuffer(0), this.revocationDate = new
|
|
11689
|
+
this.userCertificate = new ArrayBuffer(0), this.revocationDate = new Te(), Object.assign(this, e);
|
|
11687
11690
|
}
|
|
11688
11691
|
}
|
|
11689
11692
|
d([
|
|
11690
11693
|
g({ type: b.Integer, converter: ve })
|
|
11691
11694
|
], _o.prototype, "userCertificate", void 0);
|
|
11692
11695
|
d([
|
|
11693
|
-
g({ type:
|
|
11696
|
+
g({ type: Te })
|
|
11694
11697
|
], _o.prototype, "revocationDate", void 0);
|
|
11695
11698
|
d([
|
|
11696
11699
|
g({ type: ot, optional: !0, repeated: "sequence" })
|
|
11697
11700
|
], _o.prototype, "crlEntryExtensions", void 0);
|
|
11698
11701
|
class Ft {
|
|
11699
11702
|
constructor(e = {}) {
|
|
11700
|
-
this.signature = new K(), this.issuer = new Se(), this.thisUpdate = new
|
|
11703
|
+
this.signature = new K(), this.issuer = new Se(), this.thisUpdate = new Te(), Object.assign(this, e);
|
|
11701
11704
|
}
|
|
11702
11705
|
}
|
|
11703
11706
|
d([
|
|
@@ -11710,10 +11713,10 @@ d([
|
|
|
11710
11713
|
g({ type: Se })
|
|
11711
11714
|
], Ft.prototype, "issuer", void 0);
|
|
11712
11715
|
d([
|
|
11713
|
-
g({ type:
|
|
11716
|
+
g({ type: Te })
|
|
11714
11717
|
], Ft.prototype, "thisUpdate", void 0);
|
|
11715
11718
|
d([
|
|
11716
|
-
g({ type:
|
|
11719
|
+
g({ type: Te, optional: !0 })
|
|
11717
11720
|
], Ft.prototype, "nextUpdate", void 0);
|
|
11718
11721
|
d([
|
|
11719
11722
|
g({ type: _o, repeated: "sequence", optional: !0 })
|
|
@@ -11840,7 +11843,7 @@ let hs = rc = class extends ge {
|
|
|
11840
11843
|
hs = rc = d([
|
|
11841
11844
|
R({ type: P.Set, itemType: Nt })
|
|
11842
11845
|
], hs);
|
|
11843
|
-
let ld = class extends
|
|
11846
|
+
let ld = class extends Te {
|
|
11844
11847
|
};
|
|
11845
11848
|
ld = d([
|
|
11846
11849
|
R({ type: P.Choice })
|
|
@@ -11892,11 +11895,11 @@ d([
|
|
|
11892
11895
|
], yo.prototype, "permitUnSpecified", void 0);
|
|
11893
11896
|
class Bn {
|
|
11894
11897
|
constructor(e = {}) {
|
|
11895
|
-
this.issuer = new
|
|
11898
|
+
this.issuer = new qe(), this.serial = new ArrayBuffer(0), this.issuerUID = new ArrayBuffer(0), Object.assign(this, e);
|
|
11896
11899
|
}
|
|
11897
11900
|
}
|
|
11898
11901
|
d([
|
|
11899
|
-
g({ type:
|
|
11902
|
+
g({ type: qe })
|
|
11900
11903
|
], Bn.prototype, "issuer", void 0);
|
|
11901
11904
|
d([
|
|
11902
11905
|
g({ type: b.Integer, converter: ve })
|
|
@@ -11931,7 +11934,7 @@ class vo {
|
|
|
11931
11934
|
}
|
|
11932
11935
|
}
|
|
11933
11936
|
d([
|
|
11934
|
-
g({ type:
|
|
11937
|
+
g({ type: qe, optional: !0 })
|
|
11935
11938
|
], vo.prototype, "issuerName", void 0);
|
|
11936
11939
|
d([
|
|
11937
11940
|
g({ type: Bn, context: 0, implicit: !0, optional: !0 })
|
|
@@ -11973,7 +11976,7 @@ d([
|
|
|
11973
11976
|
g({ type: Bn, implicit: !0, context: 0, optional: !0 })
|
|
11974
11977
|
], pi.prototype, "baseCertificateID", void 0);
|
|
11975
11978
|
d([
|
|
11976
|
-
g({ type:
|
|
11979
|
+
g({ type: qe, implicit: !0, context: 1, optional: !0 })
|
|
11977
11980
|
], pi.prototype, "entityName", void 0);
|
|
11978
11981
|
d([
|
|
11979
11982
|
g({ type: Tn, implicit: !0, context: 2, optional: !0 })
|
|
@@ -12079,7 +12082,7 @@ class Mh {
|
|
|
12079
12082
|
}
|
|
12080
12083
|
}
|
|
12081
12084
|
d([
|
|
12082
|
-
g({ type:
|
|
12085
|
+
g({ type: qe, implicit: !0, context: 0, optional: !0 })
|
|
12083
12086
|
], Mh.prototype, "policyAuthority", void 0);
|
|
12084
12087
|
d([
|
|
12085
12088
|
g({ type: ko, repeated: "sequence" })
|
|
@@ -12139,7 +12142,7 @@ class zh {
|
|
|
12139
12142
|
}
|
|
12140
12143
|
}
|
|
12141
12144
|
d([
|
|
12142
|
-
g({ type:
|
|
12145
|
+
g({ type: qe, implicit: !0, context: 0, optional: !0 })
|
|
12143
12146
|
], zh.prototype, "roleAuthority", void 0);
|
|
12144
12147
|
d([
|
|
12145
12148
|
g({ type: ie, implicit: !0, context: 1 })
|
|
@@ -12708,18 +12711,18 @@ d([
|
|
|
12708
12711
|
g({ type: b.Integer, converter: ve })
|
|
12709
12712
|
], xs.prototype, "s", void 0);
|
|
12710
12713
|
const Je = "1.2.840.113549.1.1", En = `${Je}.1`, uv = `${Je}.7`, dv = `${Je}.9`, Rr = `${Je}.10`, pv = `${Je}.2`, fv = `${Je}.4`, Ss = `${Je}.5`, hv = `${Je}.14`, vc = `${Je}.11`, As = `${Je}.12`, Es = `${Je}.13`, Fh = `${Je}.15`, Hh = `${Je}.16`, Is = "1.3.14.3.2.26", Kh = "2.16.840.1.101.3.4.2.4", Cs = "2.16.840.1.101.3.4.2.1", Ns = "2.16.840.1.101.3.4.2.2", js = "2.16.840.1.101.3.4.2.3", gv = "2.16.840.1.101.3.4.2.5", mv = "2.16.840.1.101.3.4.2.6", _v = "1.2.840.113549.2.2", yv = "1.2.840.113549.2.5", No = `${Je}.8`;
|
|
12711
|
-
function
|
|
12714
|
+
function Ne(t) {
|
|
12712
12715
|
return new K({ algorithm: t, parameters: null });
|
|
12713
12716
|
}
|
|
12714
|
-
|
|
12715
|
-
|
|
12716
|
-
const In =
|
|
12717
|
-
|
|
12718
|
-
|
|
12719
|
-
|
|
12720
|
-
|
|
12721
|
-
|
|
12722
|
-
|
|
12717
|
+
Ne(_v);
|
|
12718
|
+
Ne(yv);
|
|
12719
|
+
const In = Ne(Is);
|
|
12720
|
+
Ne(Kh);
|
|
12721
|
+
Ne(Cs);
|
|
12722
|
+
Ne(Ns);
|
|
12723
|
+
Ne(js);
|
|
12724
|
+
Ne(gv);
|
|
12725
|
+
Ne(mv);
|
|
12723
12726
|
const Wh = new K({
|
|
12724
12727
|
algorithm: No,
|
|
12725
12728
|
parameters: z.serialize(In)
|
|
@@ -12727,16 +12730,16 @@ const Wh = new K({
|
|
|
12727
12730
|
algorithm: dv,
|
|
12728
12731
|
parameters: z.serialize(ss.toASN(new Uint8Array([218, 57, 163, 238, 94, 107, 75, 13, 50, 85, 191, 239, 149, 96, 24, 144, 175, 216, 7, 9]).buffer))
|
|
12729
12732
|
});
|
|
12730
|
-
|
|
12731
|
-
|
|
12732
|
-
|
|
12733
|
-
|
|
12734
|
-
|
|
12735
|
-
|
|
12736
|
-
|
|
12737
|
-
|
|
12738
|
-
|
|
12739
|
-
|
|
12733
|
+
Ne(En);
|
|
12734
|
+
Ne(pv);
|
|
12735
|
+
Ne(fv);
|
|
12736
|
+
Ne(Ss);
|
|
12737
|
+
Ne(Fh);
|
|
12738
|
+
Ne(Hh);
|
|
12739
|
+
Ne(As);
|
|
12740
|
+
Ne(Es);
|
|
12741
|
+
Ne(Fh);
|
|
12742
|
+
Ne(Hh);
|
|
12740
12743
|
class jo {
|
|
12741
12744
|
constructor(e = {}) {
|
|
12742
12745
|
this.hashAlgorithm = new K(In), this.maskGenAlgorithm = new K({
|
|
@@ -12866,7 +12869,7 @@ var kc;
|
|
|
12866
12869
|
(function(t) {
|
|
12867
12870
|
t[t.Transient = 0] = "Transient", t[t.Singleton = 1] = "Singleton", t[t.ResolutionScoped = 2] = "ResolutionScoped", t[t.ContainerScoped = 3] = "ContainerScoped";
|
|
12868
12871
|
})(kc || (kc = {}));
|
|
12869
|
-
const
|
|
12872
|
+
const Fe = kc;
|
|
12870
12873
|
/*! *****************************************************************************
|
|
12871
12874
|
Copyright (c) Microsoft Corporation.
|
|
12872
12875
|
|
|
@@ -13162,7 +13165,7 @@ var $v = function(t) {
|
|
|
13162
13165
|
this.parent = e, this._registry = new Ev(), this.interceptors = new Bv(), this.disposed = !1, this.disposables = /* @__PURE__ */ new Set();
|
|
13163
13166
|
}
|
|
13164
13167
|
return t.prototype.register = function(e, n, r) {
|
|
13165
|
-
r === void 0 && (r = { lifecycle:
|
|
13168
|
+
r === void 0 && (r = { lifecycle: Fe.Transient }), this.ensureNotDisposed();
|
|
13166
13169
|
var i;
|
|
13167
13170
|
if (Av(n) ? i = n : i = { useClass: n }, Vi(i))
|
|
13168
13171
|
for (var s = [e], o = i; o != null; ) {
|
|
@@ -13173,8 +13176,8 @@ var $v = function(t) {
|
|
|
13173
13176
|
var l = this._registry.get(c);
|
|
13174
13177
|
l && Vi(l.provider) ? o = l.provider : o = null;
|
|
13175
13178
|
}
|
|
13176
|
-
if ((r.lifecycle ===
|
|
13177
|
-
throw new Error('Cannot use lifecycle "' +
|
|
13179
|
+
if ((r.lifecycle === Fe.Singleton || r.lifecycle == Fe.ContainerScoped || r.lifecycle == Fe.ResolutionScoped) && (qi(i) || Sc(i)))
|
|
13180
|
+
throw new Error('Cannot use lifecycle "' + Fe[r.lifecycle] + '" with ValueProviders or FactoryProviders');
|
|
13178
13181
|
return this._registry.set(e, { provider: i, options: r }), this;
|
|
13179
13182
|
}, t.prototype.registerType = function(e, n) {
|
|
13180
13183
|
return this.ensureNotDisposed(), Mn(n) ? this.register(e, {
|
|
@@ -13191,17 +13194,17 @@ var $v = function(t) {
|
|
|
13191
13194
|
if (Mn(n))
|
|
13192
13195
|
return this.register(e, {
|
|
13193
13196
|
useToken: n
|
|
13194
|
-
}, { lifecycle:
|
|
13197
|
+
}, { lifecycle: Fe.Singleton });
|
|
13195
13198
|
if (n)
|
|
13196
13199
|
return this.register(e, {
|
|
13197
13200
|
useClass: n
|
|
13198
|
-
}, { lifecycle:
|
|
13201
|
+
}, { lifecycle: Fe.Singleton });
|
|
13199
13202
|
throw new Error('Cannot register a type name as a singleton without a "to" token');
|
|
13200
13203
|
}
|
|
13201
13204
|
var r = e;
|
|
13202
13205
|
return n && !Mn(n) && (r = n), this.register(e, {
|
|
13203
13206
|
useClass: r
|
|
13204
|
-
}, { lifecycle:
|
|
13207
|
+
}, { lifecycle: Fe.Singleton });
|
|
13205
13208
|
}, t.prototype.resolve = function(e, n) {
|
|
13206
13209
|
n === void 0 && (n = new md()), this.ensureNotDisposed();
|
|
13207
13210
|
var r = this.getRegistration(e);
|
|
@@ -13257,10 +13260,10 @@ var $v = function(t) {
|
|
|
13257
13260
|
this.interceptors.postResolution.setAll(e, o);
|
|
13258
13261
|
}
|
|
13259
13262
|
}, t.prototype.resolveRegistration = function(e, n) {
|
|
13260
|
-
if (this.ensureNotDisposed(), e.options.lifecycle ===
|
|
13263
|
+
if (this.ensureNotDisposed(), e.options.lifecycle === Fe.ResolutionScoped && n.scopedResolutions.has(e))
|
|
13261
13264
|
return n.scopedResolutions.get(e);
|
|
13262
|
-
var r = e.options.lifecycle ===
|
|
13263
|
-
return qi(e.provider) ? o = e.provider.useValue : Vi(e.provider) ? o = s ? e.instance || (e.instance = this.resolve(e.provider.useToken, n)) : this.resolve(e.provider.useToken, n) : Jh(e.provider) ? o = s ? e.instance || (e.instance = this.construct(e.provider.useClass, n)) : this.construct(e.provider.useClass, n) : Sc(e.provider) ? o = e.provider.useFactory(this) : o = this.construct(e.provider, n), e.options.lifecycle ===
|
|
13265
|
+
var r = e.options.lifecycle === Fe.Singleton, i = e.options.lifecycle === Fe.ContainerScoped, s = r || i, o;
|
|
13266
|
+
return qi(e.provider) ? o = e.provider.useValue : Vi(e.provider) ? o = s ? e.instance || (e.instance = this.resolve(e.provider.useToken, n)) : this.resolve(e.provider.useToken, n) : Jh(e.provider) ? o = s ? e.instance || (e.instance = this.construct(e.provider.useClass, n)) : this.construct(e.provider.useClass, n) : Sc(e.provider) ? o = e.provider.useFactory(this) : o = this.construct(e.provider, n), e.options.lifecycle === Fe.ResolutionScoped && n.scopedResolutions.set(e, o), o;
|
|
13264
13267
|
}, t.prototype.resolveAll = function(e, n) {
|
|
13265
13268
|
var r = this;
|
|
13266
13269
|
n === void 0 && (n = new md()), this.ensureNotDisposed();
|
|
@@ -13309,9 +13312,9 @@ var $v = function(t) {
|
|
|
13309
13312
|
var o = $s(s.value, 2), c = o[0], l = o[1];
|
|
13310
13313
|
l.some(function(u) {
|
|
13311
13314
|
var p = u.options;
|
|
13312
|
-
return p.lifecycle ===
|
|
13315
|
+
return p.lifecycle === Fe.ContainerScoped;
|
|
13313
13316
|
}) && r._registry.setAll(c, l.map(function(u) {
|
|
13314
|
-
return u.options.lifecycle ===
|
|
13317
|
+
return u.options.lifecycle === Fe.ContainerScoped ? {
|
|
13315
13318
|
provider: u.provider,
|
|
13316
13319
|
options: u.options
|
|
13317
13320
|
} : u;
|
|
@@ -13387,7 +13390,7 @@ var $v = function(t) {
|
|
|
13387
13390
|
if (this.disposed)
|
|
13388
13391
|
throw new Error("This container has been disposed, you cannot interact with a disposed container");
|
|
13389
13392
|
}, t;
|
|
13390
|
-
}(),
|
|
13393
|
+
}(), Le = new Tv();
|
|
13391
13394
|
function Bo() {
|
|
13392
13395
|
return function(t) {
|
|
13393
13396
|
Yh.set(t, kv(t));
|
|
@@ -13564,7 +13567,7 @@ bd = jc = d([
|
|
|
13564
13567
|
], bd);
|
|
13565
13568
|
var $c, Oc, Bc;
|
|
13566
13569
|
const rg = "1.2.840.113549.1.9", ig = `${rg}.7`, Dl = `${rg}.14`;
|
|
13567
|
-
let Os = class extends
|
|
13570
|
+
let Os = class extends Re {
|
|
13568
13571
|
constructor(e = {}) {
|
|
13569
13572
|
super(e);
|
|
13570
13573
|
}
|
|
@@ -13612,7 +13615,7 @@ let Ad = class extends Os {
|
|
|
13612
13615
|
Ad = d([
|
|
13613
13616
|
R({ type: P.Choice })
|
|
13614
13617
|
], Ad);
|
|
13615
|
-
let Ed = class extends
|
|
13618
|
+
let Ed = class extends Re {
|
|
13616
13619
|
};
|
|
13617
13620
|
Ed = d([
|
|
13618
13621
|
R({ type: P.Choice })
|
|
@@ -13628,7 +13631,7 @@ d([
|
|
|
13628
13631
|
Pc = d([
|
|
13629
13632
|
R({ type: P.Choice })
|
|
13630
13633
|
], Pc);
|
|
13631
|
-
let Id = class extends
|
|
13634
|
+
let Id = class extends Re {
|
|
13632
13635
|
};
|
|
13633
13636
|
Id = d([
|
|
13634
13637
|
R({ type: P.Choice })
|
|
@@ -13666,7 +13669,7 @@ let Cd = class extends Bs {
|
|
|
13666
13669
|
Cd = d([
|
|
13667
13670
|
R({ type: P.Choice })
|
|
13668
13671
|
], Cd);
|
|
13669
|
-
let Nd = class extends
|
|
13672
|
+
let Nd = class extends Re {
|
|
13670
13673
|
};
|
|
13671
13674
|
Nd = d([
|
|
13672
13675
|
R({ type: P.Choice })
|
|
@@ -13685,7 +13688,7 @@ d([
|
|
|
13685
13688
|
Lc = d([
|
|
13686
13689
|
R({ type: P.Choice })
|
|
13687
13690
|
], Lc);
|
|
13688
|
-
let jd = class extends
|
|
13691
|
+
let jd = class extends Te {
|
|
13689
13692
|
};
|
|
13690
13693
|
jd = d([
|
|
13691
13694
|
R({ type: P.Choice })
|
|
@@ -13709,7 +13712,7 @@ let $d = class extends Nt {
|
|
|
13709
13712
|
$d = d([
|
|
13710
13713
|
R({ type: P.Sequence })
|
|
13711
13714
|
], $d);
|
|
13712
|
-
let Ts = class extends
|
|
13715
|
+
let Ts = class extends Re {
|
|
13713
13716
|
};
|
|
13714
13717
|
Ts = d([
|
|
13715
13718
|
R({ type: P.Choice })
|
|
@@ -13824,7 +13827,7 @@ d([
|
|
|
13824
13827
|
const ki = "crypto.algorithm";
|
|
13825
13828
|
class Pv {
|
|
13826
13829
|
getAlgorithms() {
|
|
13827
|
-
return
|
|
13830
|
+
return Le.resolveAll(ki);
|
|
13828
13831
|
}
|
|
13829
13832
|
toAsnAlgorithm(e) {
|
|
13830
13833
|
({ ...e });
|
|
@@ -13858,7 +13861,7 @@ class Pv {
|
|
|
13858
13861
|
}
|
|
13859
13862
|
}
|
|
13860
13863
|
const Nn = "crypto.algorithmProvider";
|
|
13861
|
-
|
|
13864
|
+
Le.registerSingleton(Nn, Pv);
|
|
13862
13865
|
var Mi;
|
|
13863
13866
|
const Ze = "1.3.36.3.3.2.8.1.1", Pd = `${Ze}.1`, Rd = `${Ze}.2`, Ld = `${Ze}.3`, Ud = `${Ze}.4`, Vd = `${Ze}.5`, qd = `${Ze}.6`, Md = `${Ze}.7`, zd = `${Ze}.8`, Dd = `${Ze}.9`, Fd = `${Ze}.10`, Hd = `${Ze}.11`, Kd = `${Ze}.12`, Wd = `${Ze}.13`, Gd = `${Ze}.14`, Jd = "brainpoolP160r1", Zd = "brainpoolP160t1", Yd = "brainpoolP192r1", Xd = "brainpoolP192t1", Qd = "brainpoolP224r1", ep = "brainpoolP224t1", tp = "brainpoolP256r1", np = "brainpoolP256t1", rp = "brainpoolP320r1", ip = "brainpoolP320t1", sp = "brainpoolP384r1", op = "brainpoolP384t1", ap = "brainpoolP512r1", cp = "brainpoolP512t1", we = "ECDSA";
|
|
13864
13867
|
let Jr = Mi = class {
|
|
@@ -14003,7 +14006,7 @@ Jr.SECP256K1 = "1.3.132.0.10";
|
|
|
14003
14006
|
Jr = Mi = d([
|
|
14004
14007
|
Bo()
|
|
14005
14008
|
], Jr);
|
|
14006
|
-
|
|
14009
|
+
Le.registerSingleton(ki, Jr);
|
|
14007
14010
|
const sg = Symbol("name"), og = Symbol("value");
|
|
14008
14011
|
class fe {
|
|
14009
14012
|
constructor(e, n = {}, r = "") {
|
|
@@ -14235,7 +14238,7 @@ class Ht {
|
|
|
14235
14238
|
}
|
|
14236
14239
|
ag = Symbol.toStringTag;
|
|
14237
14240
|
Ht.DEFAULT = "default";
|
|
14238
|
-
const
|
|
14241
|
+
const Be = new Ht(), Lv = /^[0-2](?:\.[1-9][0-9]*)+$/;
|
|
14239
14242
|
function Uv(t) {
|
|
14240
14243
|
return new RegExp(Lv).test(t);
|
|
14241
14244
|
}
|
|
@@ -14396,7 +14399,7 @@ class it {
|
|
|
14396
14399
|
async getThumbprint(...e) {
|
|
14397
14400
|
var n;
|
|
14398
14401
|
let r, i = "SHA-1";
|
|
14399
|
-
return e.length >= 1 && !(!((n = e[0]) === null || n === void 0) && n.subtle) ? (i = e[0] || i, r = e[1] ||
|
|
14402
|
+
return e.length >= 1 && !(!((n = e[0]) === null || n === void 0) && n.subtle) ? (i = e[0] || i, r = e[1] || Be.get()) : r = e[0] || Be.get(), await r.subtle.digest(i, this.toArrayBuffer());
|
|
14400
14403
|
}
|
|
14401
14404
|
}
|
|
14402
14405
|
const lg = "Cannot initialize GeneralName from ASN.1 data.", lp = `${lg} Unsupported string format in use.`, Mv = `${lg} Value doesn't match to GUID regular expression.`, up = /^([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})$/i, dp = "1.3.6.1.4.1.311.25.1", pp = "1.3.6.1.4.1.311.20.2.3", Xo = "dns", Qo = "dn", ea = "email", ta = "ip", na = "url", ra = "guid", ia = "upn", Bi = "id";
|
|
@@ -14474,7 +14477,7 @@ class Kt extends cn {
|
|
|
14474
14477
|
throw new Error(Mv);
|
|
14475
14478
|
this.value = r.slice(1).map((i, s) => s < 3 ? Z.ToHex(new Uint8Array(Z.FromHex(i)).reverse()) : i).join("-");
|
|
14476
14479
|
} else if (e.otherName.typeId === pp)
|
|
14477
|
-
this.type = ia, this.value = z.parse(e.otherName.value,
|
|
14480
|
+
this.type = ia, this.value = z.parse(e.otherName.value, Re).toString();
|
|
14478
14481
|
else
|
|
14479
14482
|
throw new Error(lp);
|
|
14480
14483
|
else
|
|
@@ -14511,7 +14514,7 @@ class Kt extends cn {
|
|
|
14511
14514
|
class Zr extends cn {
|
|
14512
14515
|
constructor(e) {
|
|
14513
14516
|
let n;
|
|
14514
|
-
if (e instanceof
|
|
14517
|
+
if (e instanceof qe)
|
|
14515
14518
|
n = e;
|
|
14516
14519
|
else if (Array.isArray(e)) {
|
|
14517
14520
|
const r = [];
|
|
@@ -14522,9 +14525,9 @@ class Zr extends cn {
|
|
|
14522
14525
|
const s = z.parse(new Kt(i.type, i.value).rawData, ie);
|
|
14523
14526
|
r.push(s);
|
|
14524
14527
|
}
|
|
14525
|
-
n = new
|
|
14528
|
+
n = new qe(r);
|
|
14526
14529
|
} else if (D.isBufferSource(e))
|
|
14527
|
-
n = z.parse(e,
|
|
14530
|
+
n = z.parse(e, qe);
|
|
14528
14531
|
else
|
|
14529
14532
|
throw new Error("Cannot initialize GeneralNames. Incorrect incoming arguments");
|
|
14530
14533
|
super(n);
|
|
@@ -14679,7 +14682,7 @@ class Mt extends cn {
|
|
|
14679
14682
|
}
|
|
14680
14683
|
}
|
|
14681
14684
|
class ht extends Mt {
|
|
14682
|
-
static async create(e, n =
|
|
14685
|
+
static async create(e, n = Be.get()) {
|
|
14683
14686
|
if (e instanceof ht)
|
|
14684
14687
|
return e;
|
|
14685
14688
|
if (Ht.isCryptoKey(e)) {
|
|
@@ -14700,13 +14703,13 @@ class ht extends Mt {
|
|
|
14700
14703
|
}
|
|
14701
14704
|
async export(...e) {
|
|
14702
14705
|
let n, r = ["verify"], i = { hash: "SHA-256", ...this.algorithm };
|
|
14703
|
-
e.length > 1 ? (i = e[0] || i, r = e[1] || r, n = e[2] ||
|
|
14706
|
+
e.length > 1 ? (i = e[0] || i, r = e[1] || r, n = e[2] || Be.get()) : n = e[0] || Be.get();
|
|
14704
14707
|
let s = this.rawData;
|
|
14705
14708
|
const o = z.parse(this.rawData, ft);
|
|
14706
14709
|
return o.algorithm.algorithm === Rr && (s = Jv(o, s)), n.subtle.importKey("spki", s, i, !0, r);
|
|
14707
14710
|
}
|
|
14708
14711
|
onInit(e) {
|
|
14709
|
-
const n =
|
|
14712
|
+
const n = Le.resolve(Nn), r = this.algorithm = n.toWebAlgorithm(e.algorithm);
|
|
14710
14713
|
switch (e.algorithm.algorithm) {
|
|
14711
14714
|
case En: {
|
|
14712
14715
|
const i = z.parse(e.subjectPublicKey, ql), s = D.toUint8Array(i.modulus);
|
|
@@ -14718,11 +14721,11 @@ class ht extends Mt {
|
|
|
14718
14721
|
async getThumbprint(...e) {
|
|
14719
14722
|
var n;
|
|
14720
14723
|
let r, i = "SHA-1";
|
|
14721
|
-
return e.length >= 1 && !(!((n = e[0]) === null || n === void 0) && n.subtle) ? (i = e[0] || i, r = e[1] ||
|
|
14724
|
+
return e.length >= 1 && !(!((n = e[0]) === null || n === void 0) && n.subtle) ? (i = e[0] || i, r = e[1] || Be.get()) : r = e[0] || Be.get(), await r.subtle.digest(i, this.rawData);
|
|
14722
14725
|
}
|
|
14723
14726
|
async getKeyIdentifier(...e) {
|
|
14724
14727
|
let n, r = "SHA-1";
|
|
14725
|
-
e.length === 1 ? typeof e[0] == "string" ? (r = e[0], n =
|
|
14728
|
+
e.length === 1 ? typeof e[0] == "string" ? (r = e[0], n = Be.get()) : n = e[0] : e.length === 2 ? (r = e[0], n = e[1]) : n = Be.get();
|
|
14726
14729
|
const i = z.parse(this.rawData, ft);
|
|
14727
14730
|
return await n.subtle.digest(r, i.subjectPublicKey);
|
|
14728
14731
|
}
|
|
@@ -14746,7 +14749,7 @@ function Jv(t, e) {
|
|
|
14746
14749
|
}), e = z.serialize(t), e;
|
|
14747
14750
|
}
|
|
14748
14751
|
class Xr extends ct {
|
|
14749
|
-
static async create(e, n = !1, r =
|
|
14752
|
+
static async create(e, n = !1, r = Be.get()) {
|
|
14750
14753
|
if ("name" in e && "serialNumber" in e)
|
|
14751
14754
|
return new Xr(e, n);
|
|
14752
14755
|
const s = await (await ht.create(e, r)).getKeyIdentifier(r);
|
|
@@ -14759,7 +14762,7 @@ class Xr extends ct {
|
|
|
14759
14762
|
const n = new hn({ keyIdentifier: new bl(Z.FromHex(e[0])) });
|
|
14760
14763
|
super(La, e[1], z.serialize(n));
|
|
14761
14764
|
} else {
|
|
14762
|
-
const n = e[0], r = n.name instanceof Zr ? z.parse(n.name.rawData,
|
|
14765
|
+
const n = e[0], r = n.name instanceof Zr ? z.parse(n.name.rawData, qe) : n.name, i = new hn({
|
|
14763
14766
|
authorityCertIssuer: r,
|
|
14764
14767
|
authorityCertSerialNumber: Z.FromHex(n.serialNumber)
|
|
14765
14768
|
});
|
|
@@ -14843,7 +14846,7 @@ class Kl extends ct {
|
|
|
14843
14846
|
}
|
|
14844
14847
|
Kl.NAME = "Key Usages";
|
|
14845
14848
|
class xi extends ct {
|
|
14846
|
-
static async create(e, n = !1, r =
|
|
14849
|
+
static async create(e, n = !1, r = Be.get()) {
|
|
14847
14850
|
const s = await (await ht.create(e, r)).getKeyIdentifier(r);
|
|
14848
14851
|
return new xi(Z.ToHex(s), n);
|
|
14849
14852
|
}
|
|
@@ -15112,7 +15115,7 @@ let zc = zi = class {
|
|
|
15112
15115
|
}) : null;
|
|
15113
15116
|
}
|
|
15114
15117
|
static getHashAlgorithm(e) {
|
|
15115
|
-
const n =
|
|
15118
|
+
const n = Le.resolve(Nn);
|
|
15116
15119
|
return typeof e == "string" ? n.toAsnAlgorithm({ name: e }) : typeof e == "object" && e && "name" in e ? n.toAsnAlgorithm(e) : null;
|
|
15117
15120
|
}
|
|
15118
15121
|
toAsnAlgorithm(e) {
|
|
@@ -15169,7 +15172,7 @@ let zc = zi = class {
|
|
|
15169
15172
|
const n = z.parse(e.parameters, Cn);
|
|
15170
15173
|
return {
|
|
15171
15174
|
name: "RSA-PSS",
|
|
15172
|
-
hash:
|
|
15175
|
+
hash: Le.resolve(Nn).toWebAlgorithm(n.hashAlgorithm),
|
|
15173
15176
|
saltLength: n.saltLength
|
|
15174
15177
|
};
|
|
15175
15178
|
} else
|
|
@@ -15181,7 +15184,7 @@ let zc = zi = class {
|
|
|
15181
15184
|
zc = zi = d([
|
|
15182
15185
|
Bo()
|
|
15183
15186
|
], zc);
|
|
15184
|
-
|
|
15187
|
+
Le.registerSingleton(ki, zc);
|
|
15185
15188
|
let Dc = class {
|
|
15186
15189
|
toAsnAlgorithm(e) {
|
|
15187
15190
|
switch (e.name.toLowerCase()) {
|
|
@@ -15213,7 +15216,7 @@ let Dc = class {
|
|
|
15213
15216
|
Dc = d([
|
|
15214
15217
|
Bo()
|
|
15215
15218
|
], Dc);
|
|
15216
|
-
|
|
15219
|
+
Le.registerSingleton(ki, Dc);
|
|
15217
15220
|
class st {
|
|
15218
15221
|
addPadding(e, n) {
|
|
15219
15222
|
const r = D.toUint8Array(n), i = new Uint8Array(e);
|
|
@@ -15301,14 +15304,14 @@ let Fc = class {
|
|
|
15301
15304
|
Fc = d([
|
|
15302
15305
|
Bo()
|
|
15303
15306
|
], Fc);
|
|
15304
|
-
|
|
15307
|
+
Le.registerSingleton(ki, Fc);
|
|
15305
15308
|
class Yv extends Mt {
|
|
15306
15309
|
constructor(e) {
|
|
15307
15310
|
Mt.isAsnEncoded(e) ? super(e, Gr) : super(e), this.tag = Qe.CertificateRequestTag;
|
|
15308
15311
|
}
|
|
15309
15312
|
onInit(e) {
|
|
15310
15313
|
this.tbs = z.serialize(e.certificationRequestInfo), this.publicKey = new ht(e.certificationRequestInfo.subjectPKInfo);
|
|
15311
|
-
const n =
|
|
15314
|
+
const n = Le.resolve(Nn);
|
|
15312
15315
|
this.signatureAlgorithm = n.toWebAlgorithm(e.signatureAlgorithm), this.signature = e.signature, this.attributes = e.certificationRequestInfo.attributes.map((i) => Uo.create(z.serialize(i)));
|
|
15313
15316
|
const r = this.getAttribute(Dl);
|
|
15314
15317
|
this.extensions = [], r instanceof Wl && (this.extensions = r.items), this.subjectName = new it(e.certificationRequestInfo.subject), this.subject = this.subjectName.toString();
|
|
@@ -15331,8 +15334,8 @@ class Yv extends Mt {
|
|
|
15331
15334
|
getExtensions(e) {
|
|
15332
15335
|
return this.extensions.filter((n) => n.type === e);
|
|
15333
15336
|
}
|
|
15334
|
-
async verify(e =
|
|
15335
|
-
const n = { ...this.publicKey.algorithm, ...this.signatureAlgorithm }, r = await this.publicKey.export(n, ["verify"], e), i =
|
|
15337
|
+
async verify(e = Be.get()) {
|
|
15338
|
+
const n = { ...this.publicKey.algorithm, ...this.signatureAlgorithm }, r = await this.publicKey.export(n, ["verify"], e), i = Le.resolveAll(Si).reverse();
|
|
15336
15339
|
let s = null;
|
|
15337
15340
|
for (const c of i)
|
|
15338
15341
|
if (s = c.toWebSignature(n, this.signature), s)
|
|
@@ -15369,7 +15372,7 @@ class Gl extends Mt {
|
|
|
15369
15372
|
onInit(e) {
|
|
15370
15373
|
const n = e.tbsCertificate;
|
|
15371
15374
|
this.tbs = z.serialize(n), this.serialNumber = Z.ToHex(n.serialNumber), this.subjectName = new it(n.subject), this.subject = new it(n.subject).toString(), this.issuerName = new it(n.issuer), this.issuer = this.issuerName.toString();
|
|
15372
|
-
const r =
|
|
15375
|
+
const r = Le.resolve(Nn);
|
|
15373
15376
|
this.signatureAlgorithm = r.toWebAlgorithm(e.signatureAlgorithm), this.signature = e.signatureValue;
|
|
15374
15377
|
const i = n.validity.notBefore.utcTime || n.validity.notBefore.generalTime;
|
|
15375
15378
|
if (!i)
|
|
@@ -15392,7 +15395,7 @@ class Gl extends Mt {
|
|
|
15392
15395
|
getExtensions(e) {
|
|
15393
15396
|
return this.extensions.filter((n) => typeof e == "string" ? n.type === e : n instanceof e);
|
|
15394
15397
|
}
|
|
15395
|
-
async verify(e = {}, n =
|
|
15398
|
+
async verify(e = {}, n = Be.get()) {
|
|
15396
15399
|
let r, i;
|
|
15397
15400
|
const s = e.publicKey;
|
|
15398
15401
|
try {
|
|
@@ -15410,7 +15413,7 @@ class Gl extends Mt {
|
|
|
15410
15413
|
} catch {
|
|
15411
15414
|
return !1;
|
|
15412
15415
|
}
|
|
15413
|
-
const o =
|
|
15416
|
+
const o = Le.resolveAll(Si).reverse();
|
|
15414
15417
|
let c = null;
|
|
15415
15418
|
for (const u of o)
|
|
15416
15419
|
if (c = u.toWebSignature(r, this.signature), c)
|
|
@@ -15427,9 +15430,9 @@ class Gl extends Mt {
|
|
|
15427
15430
|
}
|
|
15428
15431
|
async getThumbprint(...e) {
|
|
15429
15432
|
let n, r = "SHA-1";
|
|
15430
|
-
return e[0] && (e[0].subtle ? n = e[0] : (r = e[0] || r, n = e[1])), n ?? (n =
|
|
15433
|
+
return e[0] && (e[0].subtle ? n = e[0] : (r = e[0] || r, n = e[1])), n ?? (n = Be.get()), await n.subtle.digest(r, this.rawData);
|
|
15431
15434
|
}
|
|
15432
|
-
async isSelfSigned(e =
|
|
15435
|
+
async isSelfSigned(e = Be.get()) {
|
|
15433
15436
|
return this.subject === this.issuer && await this.verify({ signatureOnly: !0 }, e);
|
|
15434
15437
|
}
|
|
15435
15438
|
toTextObject() {
|
|
@@ -15461,7 +15464,7 @@ class Gl extends Mt {
|
|
|
15461
15464
|
}
|
|
15462
15465
|
Gl.NAME = "Certificate";
|
|
15463
15466
|
class Xv {
|
|
15464
|
-
static async createSelfSigned(e, n =
|
|
15467
|
+
static async createSelfSigned(e, n = Be.get()) {
|
|
15465
15468
|
if (!e.keys.privateKey)
|
|
15466
15469
|
throw new Error("Bad field 'keys' in 'params' argument. 'privateKey' is empty");
|
|
15467
15470
|
if (!e.keys.publicKey)
|
|
@@ -15478,7 +15481,7 @@ class Xv {
|
|
|
15478
15481
|
extensions: e.extensions
|
|
15479
15482
|
}, n);
|
|
15480
15483
|
}
|
|
15481
|
-
static async create(e, n =
|
|
15484
|
+
static async create(e, n = Be.get()) {
|
|
15482
15485
|
var r;
|
|
15483
15486
|
let i;
|
|
15484
15487
|
e.publicKey instanceof ht ? i = e.publicKey.rawData : "publicKey" in e.publicKey ? i = e.publicKey.publicKey.rawData : D.isBufferSource(e.publicKey) ? i = e.publicKey : i = await n.subtle.exportKey("spki", e.publicKey);
|
|
@@ -15506,9 +15509,9 @@ class Xv {
|
|
|
15506
15509
|
}
|
|
15507
15510
|
const u = {
|
|
15508
15511
|
hash: "SHA-256"
|
|
15509
|
-
}, p = "signingKey" in e ? { ...u, ...e.signingAlgorithm, ...e.signingKey.algorithm } : { ...u, ...e.signingAlgorithm }, h =
|
|
15512
|
+
}, p = "signingKey" in e ? { ...u, ...e.signingAlgorithm, ...e.signingKey.algorithm } : { ...u, ...e.signingAlgorithm }, h = Le.resolve(Nn);
|
|
15510
15513
|
l.tbsCertificate.signature = l.signatureAlgorithm = h.toAsnAlgorithm(p);
|
|
15511
|
-
const m = z.serialize(l.tbsCertificate), v = "signingKey" in e ? await n.subtle.sign(p, e.signingKey, m) : e.signature, f =
|
|
15514
|
+
const m = z.serialize(l.tbsCertificate), v = "signingKey" in e ? await n.subtle.sign(p, e.signingKey, m) : e.signature, f = Le.resolveAll(Si).reverse();
|
|
15512
15515
|
let _ = null;
|
|
15513
15516
|
for (const w of f)
|
|
15514
15517
|
if (_ = w.toAsnSignature(p, v), _)
|
|
@@ -15532,8 +15535,8 @@ lt.register(za, pg);
|
|
|
15532
15535
|
lt.register(Ra, fg);
|
|
15533
15536
|
Uo.register(ig, hg);
|
|
15534
15537
|
Uo.register(Dl, Wl);
|
|
15535
|
-
|
|
15536
|
-
|
|
15538
|
+
Le.registerSingleton(Si, Zv);
|
|
15539
|
+
Le.registerSingleton(Si, st);
|
|
15537
15540
|
st.namedCurveSize.set("P-256", 32);
|
|
15538
15541
|
st.namedCurveSize.set("K-256", 32);
|
|
15539
15542
|
st.namedCurveSize.set("P-384", 48);
|
|
@@ -15544,7 +15547,7 @@ async function Hc(t) {
|
|
|
15544
15547
|
hash: "SHA-256",
|
|
15545
15548
|
publicExponent: new Uint8Array([1, 0, 1]),
|
|
15546
15549
|
modulusLength: 2048
|
|
15547
|
-
}, n = await crypto.subtle.generateKey(e, !0, ["sign", "verify"]), r =
|
|
15550
|
+
}, n = await crypto.subtle.generateKey(e, !0, ["sign", "verify"]), r = Ae(), i = Sa(new TextEncoder().encode(r)), s = await Xv.createSelfSigned({
|
|
15548
15551
|
serialNumber: i,
|
|
15549
15552
|
name: t.name,
|
|
15550
15553
|
notBefore: /* @__PURE__ */ new Date(),
|
|
@@ -15947,8 +15950,8 @@ const tw = 1e3 * 60 * 60 * 24, nw = new de().openapi(
|
|
|
15947
15950
|
async (t) => {
|
|
15948
15951
|
const { "tenant-id": e } = t.req.valid("header"), n = t.req.valid("json"), r = {
|
|
15949
15952
|
...n,
|
|
15950
|
-
id: n.id ||
|
|
15951
|
-
client_secret: n.client_secret ||
|
|
15953
|
+
id: n.id || Ae(),
|
|
15954
|
+
client_secret: n.client_secret || Ae()
|
|
15952
15955
|
}, i = await t.env.data.applications.create(
|
|
15953
15956
|
e,
|
|
15954
15957
|
r
|
|
@@ -17970,7 +17973,7 @@ function Kw(t) {
|
|
|
17970
17973
|
function Et(t) {
|
|
17971
17974
|
return t.UNIVERSAL_LOGIN_URL || `${t.ISSUER}u/`;
|
|
17972
17975
|
}
|
|
17973
|
-
function
|
|
17976
|
+
function Oe(t) {
|
|
17974
17977
|
return t.OAUTH_API_URL || t.ISSUER;
|
|
17975
17978
|
}
|
|
17976
17979
|
function Sg(t) {
|
|
@@ -17987,8 +17990,8 @@ async function Ww(t, e) {
|
|
|
17987
17990
|
n.team_id,
|
|
17988
17991
|
n.kid,
|
|
17989
17992
|
r,
|
|
17990
|
-
`${
|
|
17991
|
-
), s =
|
|
17993
|
+
`${Oe(t.env)}callback`
|
|
17994
|
+
), s = Ae(), o = await i.createAuthorizationURL(
|
|
17992
17995
|
s,
|
|
17993
17996
|
((l = n.scope) == null ? void 0 : l.split(" ")) || ["name", "email"]
|
|
17994
17997
|
);
|
|
@@ -18003,7 +18006,7 @@ async function Gw(t, e, n) {
|
|
|
18003
18006
|
r.team_id,
|
|
18004
18007
|
r.kid,
|
|
18005
18008
|
i,
|
|
18006
|
-
`${
|
|
18009
|
+
`${Oe(t.env)}callback`
|
|
18007
18010
|
).validateAuthorizationCode(n), c = el(o.idToken());
|
|
18008
18011
|
if (!c)
|
|
18009
18012
|
throw new Error("Invalid ID token");
|
|
@@ -18031,8 +18034,8 @@ async function Zw(t, e) {
|
|
|
18031
18034
|
const r = new kg(
|
|
18032
18035
|
n.client_id,
|
|
18033
18036
|
n.client_secret,
|
|
18034
|
-
`${
|
|
18035
|
-
), i =
|
|
18037
|
+
`${Oe(t.env)}callback`
|
|
18038
|
+
), i = Ae();
|
|
18036
18039
|
return {
|
|
18037
18040
|
redirectUrl: r.createAuthorizationURL(
|
|
18038
18041
|
i,
|
|
@@ -18048,7 +18051,7 @@ async function Yw(t, e, n) {
|
|
|
18048
18051
|
const s = await new kg(
|
|
18049
18052
|
r.client_id,
|
|
18050
18053
|
r.client_secret,
|
|
18051
|
-
`${
|
|
18054
|
+
`${Oe(t.env)}callback`
|
|
18052
18055
|
).validateAuthorizationCode(n), o = await fetch(
|
|
18053
18056
|
"https://graph.facebook.com/v16.0/me?fields=id,email,name",
|
|
18054
18057
|
{
|
|
@@ -18079,8 +18082,8 @@ async function Qw(t, e) {
|
|
|
18079
18082
|
const r = new xg(
|
|
18080
18083
|
n.client_id,
|
|
18081
18084
|
n.client_secret,
|
|
18082
|
-
`${
|
|
18083
|
-
), i =
|
|
18085
|
+
`${Oe(t.env)}callback`
|
|
18086
|
+
), i = Ae(), s = Bw();
|
|
18084
18087
|
return {
|
|
18085
18088
|
redirectUrl: r.createAuthorizationURL(
|
|
18086
18089
|
i,
|
|
@@ -18098,7 +18101,7 @@ async function eb(t, e, n, r) {
|
|
|
18098
18101
|
const o = await new xg(
|
|
18099
18102
|
i.client_id,
|
|
18100
18103
|
i.client_secret,
|
|
18101
|
-
`${
|
|
18104
|
+
`${Oe(t.env)}callback`
|
|
18102
18105
|
).validateAuthorizationCode(n, r), c = el(o.idToken());
|
|
18103
18106
|
if (!c)
|
|
18104
18107
|
throw new Error("Invalid ID token");
|
|
@@ -18126,8 +18129,8 @@ async function nb(t, e) {
|
|
|
18126
18129
|
const r = new Jl(
|
|
18127
18130
|
n.client_id,
|
|
18128
18131
|
n.client_secret,
|
|
18129
|
-
`${
|
|
18130
|
-
), i =
|
|
18132
|
+
`${Oe(t.env)}callback`
|
|
18133
|
+
), i = Ae(), s = r.createAuthorizationURL(
|
|
18131
18134
|
"https://api.vipps.no/access-management-1.0/access/oauth2/auth",
|
|
18132
18135
|
i,
|
|
18133
18136
|
((o = n.scope) == null ? void 0 : o.split(" ")) || [
|
|
@@ -18151,7 +18154,7 @@ async function rb(t, e, n) {
|
|
|
18151
18154
|
const s = await new Jl(
|
|
18152
18155
|
r.client_id,
|
|
18153
18156
|
r.client_secret,
|
|
18154
|
-
`${
|
|
18157
|
+
`${Oe(t.env)}callback`
|
|
18155
18158
|
).validateAuthorizationCode(
|
|
18156
18159
|
"https://api.vipps.no/access-management-1.0/access/oauth2/token",
|
|
18157
18160
|
n,
|
|
@@ -18288,11 +18291,12 @@ async function ob(t, e, n, r) {
|
|
|
18288
18291
|
Date.now() + Gn * 1e3
|
|
18289
18292
|
).toISOString(),
|
|
18290
18293
|
authParams: r,
|
|
18294
|
+
csrf_token: Ae(),
|
|
18291
18295
|
...rn(t.req)
|
|
18292
18296
|
}));
|
|
18293
18297
|
const c = await Ag(t, i.strategy).getRedirect(t, i);
|
|
18294
18298
|
return await t.env.data.codes.create(e.tenant.id, {
|
|
18295
|
-
login_id: s.
|
|
18299
|
+
login_id: s.id,
|
|
18296
18300
|
code_id: c.code,
|
|
18297
18301
|
code_type: "oauth2_state",
|
|
18298
18302
|
connection_id: i.id,
|
|
@@ -18408,7 +18412,7 @@ async function Cp(t, e, n, r, i, s) {
|
|
|
18408
18412
|
error_code: i,
|
|
18409
18413
|
state: c.authParams.state
|
|
18410
18414
|
}), t.redirect(
|
|
18411
|
-
`${Et(t.env)}enter-email?state=${c.
|
|
18415
|
+
`${Et(t.env)}enter-email?state=${c.id}&error=${n}`
|
|
18412
18416
|
);
|
|
18413
18417
|
}
|
|
18414
18418
|
const ab = new de().openapi(
|
|
@@ -18685,14 +18689,14 @@ const ab = new de().openapi(
|
|
|
18685
18689
|
async (t) => {
|
|
18686
18690
|
const e = $u.parse({
|
|
18687
18691
|
issuer: Kw(t.env),
|
|
18688
|
-
authorization_endpoint: `${
|
|
18689
|
-
token_endpoint: `${
|
|
18690
|
-
device_authorization_endpoint: `${
|
|
18691
|
-
userinfo_endpoint: `${
|
|
18692
|
-
mfa_challenge_endpoint: `${
|
|
18693
|
-
jwks_uri: `${
|
|
18694
|
-
registration_endpoint: `${
|
|
18695
|
-
revocation_endpoint: `${
|
|
18692
|
+
authorization_endpoint: `${Oe(t.env)}authorize`,
|
|
18693
|
+
token_endpoint: `${Oe(t.env)}oauth/token`,
|
|
18694
|
+
device_authorization_endpoint: `${Oe(t.env)}oauth/device/code`,
|
|
18695
|
+
userinfo_endpoint: `${Oe(t.env)}userinfo`,
|
|
18696
|
+
mfa_challenge_endpoint: `${Oe(t.env)}mfa/challenge`,
|
|
18697
|
+
jwks_uri: `${Oe(t.env)}.well-known/jwks.json`,
|
|
18698
|
+
registration_endpoint: `${Oe(t.env)}oidc/register`,
|
|
18699
|
+
revocation_endpoint: `${Oe(t.env)}oauth/revoke`,
|
|
18696
18700
|
scopes_supported: [
|
|
18697
18701
|
"openid",
|
|
18698
18702
|
"profile",
|
|
@@ -19152,7 +19156,7 @@ async function Ql(t, e, n, r) {
|
|
|
19152
19156
|
throw new j(500, { message: "Tenant not found" });
|
|
19153
19157
|
if (!r.redirect_uri)
|
|
19154
19158
|
throw new j(400, { message: "redirect_uri is required" });
|
|
19155
|
-
const s = new URL(
|
|
19159
|
+
const s = new URL(Oe(t.env));
|
|
19156
19160
|
s.pathname = "passwordless/verify_redirect", s.searchParams.set("verification_code", n), s.searchParams.set("connection", "email"), s.searchParams.set("client_id", r.client_id), s.searchParams.set("redirect_uri", r.redirect_uri), s.searchParams.set("email", e), r.response_type && s.searchParams.set("response_type", r.response_type), r.scope && s.searchParams.set("scope", r.scope), r.state && s.searchParams.set("state", r.state), r.nonce && s.searchParams.set("nonce", r.nonce), r.code_challenge && s.searchParams.set("code_challenge", r.code_challenge), r.code_challenge_method && s.searchParams.set(
|
|
19157
19161
|
"code_challenge_method",
|
|
19158
19162
|
r.code_challenge_method
|
|
@@ -19346,13 +19350,14 @@ const wb = new de().openapi(
|
|
|
19346
19350
|
Date.now() + Gn * 1e3
|
|
19347
19351
|
).toISOString(),
|
|
19348
19352
|
authParams: s,
|
|
19353
|
+
csrf_token: Ae(),
|
|
19349
19354
|
...rn(t.req)
|
|
19350
19355
|
}
|
|
19351
19356
|
);
|
|
19352
19357
|
return await Cg(
|
|
19353
19358
|
t,
|
|
19354
19359
|
e,
|
|
19355
|
-
o.
|
|
19360
|
+
o.id,
|
|
19356
19361
|
o.authParams.state
|
|
19357
19362
|
), t.html(
|
|
19358
19363
|
"If an account with that email exists, we've sent instructions to reset your password."
|
|
@@ -19395,7 +19400,7 @@ async function tu(t, e, n, r, i, s, o) {
|
|
|
19395
19400
|
const p = rn(t.req);
|
|
19396
19401
|
if (o && u.ip !== p.ip)
|
|
19397
19402
|
return t.redirect(
|
|
19398
|
-
`${Et(t.env)}invalid-session?state=${u.
|
|
19403
|
+
`${Et(t.env)}invalid-session?state=${u.id}`
|
|
19399
19404
|
);
|
|
19400
19405
|
if (n.redirect_uri && !Mo(n.redirect_uri, e.callbacks, {
|
|
19401
19406
|
allowPathWildcards: !0
|
|
@@ -19457,12 +19462,13 @@ const bb = new de().openapi(
|
|
|
19457
19462
|
{
|
|
19458
19463
|
authParams: { ...o, client_id: r, username: i },
|
|
19459
19464
|
expires_at: new Date(Date.now() + Aa).toISOString(),
|
|
19465
|
+
csrf_token: Ae(),
|
|
19460
19466
|
...rn(t.req)
|
|
19461
19467
|
}
|
|
19462
19468
|
), u = await n.data.codes.create(c.tenant.id, {
|
|
19463
19469
|
code_id: or(),
|
|
19464
19470
|
code_type: "otp",
|
|
19465
|
-
login_id: l.
|
|
19471
|
+
login_id: l.id,
|
|
19466
19472
|
expires_at: new Date(Date.now() + Aa).toISOString()
|
|
19467
19473
|
});
|
|
19468
19474
|
return s === "link" ? await Ql(t, i, u.code_id, { ...o, client_id: r }) : await Ng(t, i, u.code_id), t.html("OK");
|
|
@@ -19644,12 +19650,13 @@ async function kb(t, e, n, r) {
|
|
|
19644
19650
|
client_id: e.id,
|
|
19645
19651
|
username: n
|
|
19646
19652
|
},
|
|
19653
|
+
csrf_token: Ae(),
|
|
19647
19654
|
...rn(t.req)
|
|
19648
19655
|
}
|
|
19649
19656
|
), c = await t.env.data.codes.create(e.tenant.id, {
|
|
19650
19657
|
code_id: i,
|
|
19651
19658
|
code_type: "password_reset",
|
|
19652
|
-
login_id: o.
|
|
19659
|
+
login_id: o.id,
|
|
19653
19660
|
expires_at: new Date(
|
|
19654
19661
|
Date.now() + k_
|
|
19655
19662
|
).toISOString()
|
|
@@ -19727,6 +19734,7 @@ const xb = new de().openapi(
|
|
|
19727
19734
|
client_id: n,
|
|
19728
19735
|
username: s
|
|
19729
19736
|
},
|
|
19737
|
+
csrf_token: Ae(),
|
|
19730
19738
|
...rn(t.req)
|
|
19731
19739
|
}
|
|
19732
19740
|
);
|
|
@@ -19781,6 +19789,7 @@ async function Ab({
|
|
|
19781
19789
|
Date.now() + Gn * 1e3
|
|
19782
19790
|
).toISOString(),
|
|
19783
19791
|
authParams: r,
|
|
19792
|
+
csrf_token: Ae(),
|
|
19784
19793
|
authorization_url: t.req.url,
|
|
19785
19794
|
...rn(t.req)
|
|
19786
19795
|
}
|
|
@@ -19804,13 +19813,13 @@ async function Ab({
|
|
|
19804
19813
|
return await t.env.data.codes.create(n.tenant.id, {
|
|
19805
19814
|
code_id: c,
|
|
19806
19815
|
code_type: "otp",
|
|
19807
|
-
login_id: o.
|
|
19816
|
+
login_id: o.id,
|
|
19808
19817
|
expires_at: new Date(
|
|
19809
19818
|
Date.now() + Gn * 1e3
|
|
19810
19819
|
).toISOString()
|
|
19811
|
-
}), await Ql(t, s, c, r), t.redirect(`/u/enter-code?state=${o.
|
|
19820
|
+
}), await Ql(t, s, c, r), t.redirect(`/u/enter-code?state=${o.id}`);
|
|
19812
19821
|
}
|
|
19813
|
-
return e ? t.redirect(`/u/check-account?state=${o.
|
|
19822
|
+
return e ? t.redirect(`/u/check-account?state=${o.id}`) : t.redirect(`/u/enter-email?state=${o.id}`);
|
|
19814
19823
|
}
|
|
19815
19824
|
function Eb(t) {
|
|
19816
19825
|
if (t === "Username-Password-Authentication")
|
|
@@ -20076,10 +20085,10 @@ const Nb = new de().openapi(
|
|
|
20076
20085
|
throw new j(400, {
|
|
20077
20086
|
message: `Invalid redirect URI - ${ce.redirect_uri}`
|
|
20078
20087
|
});
|
|
20079
|
-
const
|
|
20088
|
+
const ze = ts(
|
|
20080
20089
|
ee.tenant.id,
|
|
20081
20090
|
t.req.header("cookie")
|
|
20082
|
-
),
|
|
20091
|
+
), De = ze ? await e.data.sessions.get(ee.tenant.id, ze) : void 0;
|
|
20083
20092
|
if (f == "none") {
|
|
20084
20093
|
if (!p)
|
|
20085
20094
|
throw new j(400, {
|
|
@@ -20087,7 +20096,7 @@ const Nb = new de().openapi(
|
|
|
20087
20096
|
});
|
|
20088
20097
|
return Cb({
|
|
20089
20098
|
ctx: t,
|
|
20090
|
-
session:
|
|
20099
|
+
session: De || void 0,
|
|
20091
20100
|
redirect_uri: i,
|
|
20092
20101
|
state: o,
|
|
20093
20102
|
response_type: p,
|
|
@@ -20110,7 +20119,7 @@ const Nb = new de().openapi(
|
|
|
20110
20119
|
client: ee,
|
|
20111
20120
|
auth0Client: S,
|
|
20112
20121
|
authParams: ce,
|
|
20113
|
-
session:
|
|
20122
|
+
session: De || void 0,
|
|
20114
20123
|
connection: u,
|
|
20115
20124
|
login_hint: N
|
|
20116
20125
|
});
|
|
@@ -20218,7 +20227,7 @@ var $b = {
|
|
|
20218
20227
|
}
|
|
20219
20228
|
}
|
|
20220
20229
|
return n[0] += t[t.length - 1], n.length === 1 ? "callbacks" in n ? gt($g(gt(n[0], n.callbacks))) : gt(n[0]) : jg(n, n.callbacks);
|
|
20221
|
-
}, ru = Symbol("RENDERER"), Kc = Symbol("ERROR_HANDLER"),
|
|
20230
|
+
}, ru = Symbol("RENDERER"), Kc = Symbol("ERROR_HANDLER"), Ie = Symbol("STASH"), Og = Symbol("INTERNAL"), Tb = Symbol("MEMO"), Vs = Symbol("PERMALINK"), Op = (t) => (t[Og] = !0, t), Bg = (t) => ({ value: e, children: n }) => {
|
|
20222
20231
|
if (!n)
|
|
20223
20232
|
return;
|
|
20224
20233
|
const r = {
|
|
@@ -20620,7 +20629,7 @@ async function Ge(t, e) {
|
|
|
20620
20629
|
},
|
|
20621
20630
|
client: i,
|
|
20622
20631
|
tenant: s,
|
|
20623
|
-
|
|
20632
|
+
loginSession: r
|
|
20624
20633
|
};
|
|
20625
20634
|
}
|
|
20626
20635
|
async function Zb(t, e, n, r) {
|
|
@@ -21170,7 +21179,7 @@ const d1 = new de().openapi(
|
|
|
21170
21179
|
}
|
|
21171
21180
|
}),
|
|
21172
21181
|
async (t) => {
|
|
21173
|
-
const { state: e, impersonation: n } = t.req.valid("query"), { vendorSettings: r,
|
|
21182
|
+
const { state: e, impersonation: n } = t.req.valid("query"), { vendorSettings: r, loginSession: i, client: s } = await Ge(
|
|
21174
21183
|
t,
|
|
21175
21184
|
e
|
|
21176
21185
|
);
|
|
@@ -21219,7 +21228,7 @@ const d1 = new de().openapi(
|
|
|
21219
21228
|
async (t) => {
|
|
21220
21229
|
const { env: e } = t, { state: n } = t.req.valid("query"), r = t.req.valid("form");
|
|
21221
21230
|
t.set("body", r), t.set("username", r.username);
|
|
21222
|
-
const { client: i,
|
|
21231
|
+
const { client: i, loginSession: s, vendorSettings: o } = await Ge(
|
|
21223
21232
|
t,
|
|
21224
21233
|
n
|
|
21225
21234
|
);
|
|
@@ -21253,7 +21262,7 @@ const d1 = new de().openapi(
|
|
|
21253
21262
|
}
|
|
21254
21263
|
if (s.authParams.username = r.username, s.authParams.act_as = r.act_as, await e.data.loginSessions.update(
|
|
21255
21264
|
i.tenant.id,
|
|
21256
|
-
s.
|
|
21265
|
+
s.id,
|
|
21257
21266
|
s
|
|
21258
21267
|
), await Zb(
|
|
21259
21268
|
t,
|
|
@@ -21276,10 +21285,12 @@ const d1 = new de().openapi(
|
|
|
21276
21285
|
const h = await t.env.data.codes.create(i.tenant.id, {
|
|
21277
21286
|
code_id: u,
|
|
21278
21287
|
code_type: "otp",
|
|
21279
|
-
login_id: s.
|
|
21288
|
+
login_id: s.id,
|
|
21280
21289
|
expires_at: new Date(Date.now() + Aa).toISOString()
|
|
21281
21290
|
});
|
|
21282
|
-
return u1(
|
|
21291
|
+
return u1(
|
|
21292
|
+
s.auth0Client
|
|
21293
|
+
) === "link" && !r.username.includes("online.no") ? nt(
|
|
21283
21294
|
t,
|
|
21284
21295
|
Ql(
|
|
21285
21296
|
t,
|
|
@@ -21365,7 +21376,7 @@ var ri = "_hp", p1 = {
|
|
|
21365
21376
|
}
|
|
21366
21377
|
}
|
|
21367
21378
|
}, m1 = (t, e) => {
|
|
21368
|
-
e[
|
|
21379
|
+
e[Ie][0] = 0, ii.push([t, e]);
|
|
21369
21380
|
const n = e.tag[ru] || e.tag, r = n.defaultProps ? {
|
|
21370
21381
|
...n.defaultProps,
|
|
21371
21382
|
...e.props
|
|
@@ -21377,7 +21388,7 @@ var ri = "_hp", p1 = {
|
|
|
21377
21388
|
}
|
|
21378
21389
|
}, Mg = (t, e, n, r, i) => {
|
|
21379
21390
|
var s, o;
|
|
21380
|
-
(s = t.vR) != null && s.length && (r.push(...t.vR), delete t.vR), typeof t.tag == "function" && ((o = t[
|
|
21391
|
+
(s = t.vR) != null && s.length && (r.push(...t.vR), delete t.vR), typeof t.tag == "function" && ((o = t[Ie][1][Hg]) == null || o.forEach((c) => i.push(c))), t.vC.forEach((c) => {
|
|
21381
21392
|
var l;
|
|
21382
21393
|
if (Bt(c))
|
|
21383
21394
|
n.push(c);
|
|
@@ -21401,10 +21412,10 @@ var ri = "_hp", p1 = {
|
|
|
21401
21412
|
}
|
|
21402
21413
|
}, zg = (t) => {
|
|
21403
21414
|
var e, n, r, i, s, o;
|
|
21404
|
-
Bt(t) || ((n = (e = t[
|
|
21415
|
+
Bt(t) || ((n = (e = t[Ie]) == null ? void 0 : e[1][Hg]) == null || n.forEach((c) => {
|
|
21405
21416
|
var l;
|
|
21406
21417
|
return (l = c[2]) == null ? void 0 : l.call(c);
|
|
21407
|
-
}), (r = Gc.get(t.e)) == null || r(), t.p === 2 && ((i = t.vC) == null || i.forEach((c) => c.p = 2)), (s = t.vC) == null || s.forEach(zg)), t.p || ((o = t.e) == null || o.remove(), delete t.e), typeof t.tag == "function" && ($r.delete(t), Gi.delete(t), delete t[
|
|
21418
|
+
}), (r = Gc.get(t.e)) == null || r(), t.p === 2 && ((i = t.vC) == null || i.forEach((c) => c.p = 2)), (s = t.vC) == null || s.forEach(zg)), t.p || ((o = t.e) == null || o.remove(), delete t.e), typeof t.tag == "function" && ($r.delete(t), Gi.delete(t), delete t[Ie][3], t.a = !0);
|
|
21408
21419
|
}, Dg = (t, e, n) => {
|
|
21409
21420
|
t.c = e, Fg(t, e, n);
|
|
21410
21421
|
}, zp = (t, e) => {
|
|
@@ -21459,7 +21470,7 @@ var ri = "_hp", p1 = {
|
|
|
21459
21470
|
Array.isArray(n[f]) && n.splice(f, 1, ...n[f].flat());
|
|
21460
21471
|
let _ = y1(n[f]);
|
|
21461
21472
|
if (_) {
|
|
21462
|
-
typeof _.tag == "function" && !_.tag[Og] && (ar.length > 0 && (_[
|
|
21473
|
+
typeof _.tag == "function" && !_.tag[Og] && (ar.length > 0 && (_[Ie][2] = ar.map((S) => [S, S.values.at(-1)])), (o = t[5]) != null && o.length && (_[Ie][3] = t[5].at(-1)));
|
|
21463
21474
|
let w;
|
|
21464
21475
|
if (h && h.length) {
|
|
21465
21476
|
const S = h.findIndex(
|
|
@@ -21472,7 +21483,7 @@ var ri = "_hp", p1 = {
|
|
|
21472
21483
|
w.t !== _.t && (w.t = _.t, w.d = !0), _ = w;
|
|
21473
21484
|
else {
|
|
21474
21485
|
const S = w.pP = w.props;
|
|
21475
|
-
w.props = _.props, w.f || (w.f = _.f || e.f), typeof _.tag == "function" && (w[
|
|
21486
|
+
w.props = _.props, w.f || (w.f = _.f || e.f), typeof _.tag == "function" && (w[Ie][2] = _[Ie][2] || [], w[Ie][3] = _[Ie][3], !w.f && ((w.o || w) === _.o || (l = (c = w.tag)[Tb]) != null && l.call(c, S, w.props)) && (w.s = !0)), _ = w;
|
|
21476
21487
|
}
|
|
21477
21488
|
else if (!Bt(_) && cr) {
|
|
21478
21489
|
const S = wr(cr);
|
|
@@ -21491,7 +21502,7 @@ var ri = "_hp", p1 = {
|
|
|
21491
21502
|
return;
|
|
21492
21503
|
throw h;
|
|
21493
21504
|
}
|
|
21494
|
-
const [m, v, f] = ((p = e[
|
|
21505
|
+
const [m, v, f] = ((p = e[Ie]) == null ? void 0 : p[3]) || [];
|
|
21495
21506
|
if (v) {
|
|
21496
21507
|
const _ = () => Ji([0, !1, t[2]], f), w = Gi.get(f) || [];
|
|
21497
21508
|
w.push(_), Gi.set(f, w);
|
|
@@ -21530,7 +21541,7 @@ var ri = "_hp", p1 = {
|
|
|
21530
21541
|
ref: t.props.ref,
|
|
21531
21542
|
o: t.o || t
|
|
21532
21543
|
}), typeof t.tag == "function")
|
|
21533
|
-
t[
|
|
21544
|
+
t[Ie] = [0, []];
|
|
21534
21545
|
else {
|
|
21535
21546
|
const e = f1[t.tag];
|
|
21536
21547
|
e && (cr || (cr = Tg("")), t.props.children = [
|
|
@@ -21547,7 +21558,7 @@ var ri = "_hp", p1 = {
|
|
|
21547
21558
|
}
|
|
21548
21559
|
}, Fp = (t, e) => {
|
|
21549
21560
|
var n, r;
|
|
21550
|
-
(n = e[
|
|
21561
|
+
(n = e[Ie][2]) == null || n.forEach(([i, s]) => {
|
|
21551
21562
|
i.values.push(s);
|
|
21552
21563
|
});
|
|
21553
21564
|
try {
|
|
@@ -21559,7 +21570,7 @@ var ri = "_hp", p1 = {
|
|
|
21559
21570
|
delete e.a;
|
|
21560
21571
|
return;
|
|
21561
21572
|
}
|
|
21562
|
-
(r = e[
|
|
21573
|
+
(r = e[Ie][2]) == null || r.forEach(([i]) => {
|
|
21563
21574
|
i.values.pop();
|
|
21564
21575
|
}), (t[0] !== 1 || !t[1]) && Dg(e, e.c, !1);
|
|
21565
21576
|
}, $r = /* @__PURE__ */ new WeakMap(), Hp = [], Ji = async (t, e) => {
|
|
@@ -21597,7 +21608,7 @@ var ri = "_hp", p1 = {
|
|
|
21597
21608
|
if (!n)
|
|
21598
21609
|
return [e(), () => {
|
|
21599
21610
|
}];
|
|
21600
|
-
const [, r] = n, i = (o = r[
|
|
21611
|
+
const [, r] = n, i = (o = r[Ie][1])[pa] || (o[pa] = []), s = r[Ie][0]++;
|
|
21601
21612
|
return i[s] || (i[s] = [
|
|
21602
21613
|
e(),
|
|
21603
21614
|
(c) => {
|
|
@@ -21627,7 +21638,7 @@ var ri = "_hp", p1 = {
|
|
|
21627
21638
|
const n = ii.at(-1);
|
|
21628
21639
|
if (!n)
|
|
21629
21640
|
return t;
|
|
21630
|
-
const [, r] = n, i = (c = r[
|
|
21641
|
+
const [, r] = n, i = (c = r[Ie][1])[fa] || (c[fa] = []), s = r[Ie][0]++, o = i[s];
|
|
21631
21642
|
return Kg(o == null ? void 0 : o[1], e) ? i[s] = [t, e] : t = i[s][0], t;
|
|
21632
21643
|
}, k1 = (t) => {
|
|
21633
21644
|
const e = ga.get(t);
|
|
@@ -21645,7 +21656,7 @@ var ri = "_hp", p1 = {
|
|
|
21645
21656
|
const n = ii.at(-1);
|
|
21646
21657
|
if (!n)
|
|
21647
21658
|
return t();
|
|
21648
|
-
const [, r] = n, i = (c = r[
|
|
21659
|
+
const [, r] = n, i = (c = r[Ie][1])[ha] || (c[ha] = []), s = r[Ie][0]++, o = i[s];
|
|
21649
21660
|
return Kg(o == null ? void 0 : o[1], e) && (i[s] = [t(), e]), i[s][0];
|
|
21650
21661
|
}, S1 = Tg({
|
|
21651
21662
|
pending: !1,
|
|
@@ -21971,7 +21982,7 @@ const Jg = (t) => {
|
|
|
21971
21982
|
}
|
|
21972
21983
|
}),
|
|
21973
21984
|
async (t) => {
|
|
21974
|
-
const { state: e } = t.req.valid("query"), { vendorSettings: n,
|
|
21985
|
+
const { state: e } = t.req.valid("query"), { vendorSettings: n, loginSession: r, client: i } = await Ge(
|
|
21975
21986
|
t,
|
|
21976
21987
|
e
|
|
21977
21988
|
);
|
|
@@ -22026,7 +22037,7 @@ const Jg = (t) => {
|
|
|
22026
22037
|
}
|
|
22027
22038
|
}),
|
|
22028
22039
|
async (t) => {
|
|
22029
|
-
const { state: e } = t.req.valid("query"), { code: n } = t.req.valid("form"), {
|
|
22040
|
+
const { state: e } = t.req.valid("query"), { code: n } = t.req.valid("form"), { loginSession: r, client: i, vendorSettings: s } = await Ge(
|
|
22030
22041
|
t,
|
|
22031
22042
|
e
|
|
22032
22043
|
);
|
|
@@ -22168,7 +22179,7 @@ const Jg = (t) => {
|
|
|
22168
22179
|
}
|
|
22169
22180
|
}),
|
|
22170
22181
|
async (t) => {
|
|
22171
|
-
const { state: e } = t.req.valid("query"), { vendorSettings: n, client: r,
|
|
22182
|
+
const { state: e } = t.req.valid("query"), { vendorSettings: n, client: r, loginSession: i } = await Ge(
|
|
22172
22183
|
t,
|
|
22173
22184
|
e
|
|
22174
22185
|
);
|
|
@@ -22214,7 +22225,7 @@ const Jg = (t) => {
|
|
|
22214
22225
|
}
|
|
22215
22226
|
}),
|
|
22216
22227
|
async (t) => {
|
|
22217
|
-
const { state: e } = t.req.valid("query"), n = t.req.valid("form"), { password: r } = n, { vendorSettings: i, client: s,
|
|
22228
|
+
const { state: e } = t.req.valid("query"), n = t.req.valid("form"), { password: r } = n, { vendorSettings: i, client: s, loginSession: o } = await Ge(
|
|
22218
22229
|
t,
|
|
22219
22230
|
e
|
|
22220
22231
|
), { username: c } = o.authParams;
|
|
@@ -22348,7 +22359,7 @@ const Jg = (t) => {
|
|
|
22348
22359
|
}
|
|
22349
22360
|
}),
|
|
22350
22361
|
async (t) => {
|
|
22351
|
-
const { state: e, code: n } = t.req.valid("query"), { vendorSettings: r,
|
|
22362
|
+
const { state: e, code: n } = t.req.valid("query"), { vendorSettings: r, loginSession: i } = await Ge(t, e), { username: s } = i.authParams;
|
|
22352
22363
|
if (!s)
|
|
22353
22364
|
throw new j(400, { message: "Username required" });
|
|
22354
22365
|
return n ? t.html(
|
|
@@ -22403,7 +22414,7 @@ const Jg = (t) => {
|
|
|
22403
22414
|
}),
|
|
22404
22415
|
//TODO: merge logic with dbconnections/signup
|
|
22405
22416
|
async (t) => {
|
|
22406
|
-
const { state: e } = t.req.valid("query"), n = t.req.valid("form"), { env: r } = t, { vendorSettings: i, client: s,
|
|
22417
|
+
const { state: e } = t.req.valid("query"), n = t.req.valid("form"), { env: r } = t, { vendorSettings: i, client: s, loginSession: o } = await Ge(
|
|
22407
22418
|
t,
|
|
22408
22419
|
e
|
|
22409
22420
|
), c = "Username-Password-Authentication";
|
|
@@ -22566,7 +22577,7 @@ const Jg = (t) => {
|
|
|
22566
22577
|
}
|
|
22567
22578
|
}),
|
|
22568
22579
|
async (t) => {
|
|
22569
|
-
const { state: e } = t.req.valid("query"), { vendorSettings: n,
|
|
22580
|
+
const { state: e } = t.req.valid("query"), { vendorSettings: n, loginSession: r } = await Ge(t, e);
|
|
22570
22581
|
if (!r.authParams.username)
|
|
22571
22582
|
throw new j(400, { message: "Username required" });
|
|
22572
22583
|
return t.html(
|
|
@@ -22611,7 +22622,7 @@ const Jg = (t) => {
|
|
|
22611
22622
|
}
|
|
22612
22623
|
}),
|
|
22613
22624
|
async (t) => {
|
|
22614
|
-
const { state: e, code: n } = t.req.valid("query"), { password: r, "re-enter-password": i } = t.req.valid("form"), { env: s } = t, { vendorSettings: o, client: c,
|
|
22625
|
+
const { state: e, code: n } = t.req.valid("query"), { password: r, "re-enter-password": i } = t.req.valid("form"), { env: s } = t, { vendorSettings: o, client: c, loginSession: l } = await Ge(
|
|
22615
22626
|
t,
|
|
22616
22627
|
e
|
|
22617
22628
|
);
|
|
@@ -22763,7 +22774,7 @@ const Jg = (t) => {
|
|
|
22763
22774
|
}
|
|
22764
22775
|
}),
|
|
22765
22776
|
async (t) => {
|
|
22766
|
-
const { state: e } = t.req.valid("query"), { vendorSettings: n,
|
|
22777
|
+
const { state: e } = t.req.valid("query"), { vendorSettings: n, loginSession: r } = await Ge(t, e);
|
|
22767
22778
|
return t.html(
|
|
22768
22779
|
/* @__PURE__ */ y(
|
|
22769
22780
|
V1,
|
|
@@ -22794,7 +22805,7 @@ const Jg = (t) => {
|
|
|
22794
22805
|
}
|
|
22795
22806
|
}),
|
|
22796
22807
|
async (t) => {
|
|
22797
|
-
const { state: e } = t.req.valid("query"), { vendorSettings: n, client: r,
|
|
22808
|
+
const { state: e } = t.req.valid("query"), { vendorSettings: n, client: r, loginSession: i } = await Ge(
|
|
22798
22809
|
t,
|
|
22799
22810
|
e
|
|
22800
22811
|
);
|
|
@@ -22802,7 +22813,7 @@ const Jg = (t) => {
|
|
|
22802
22813
|
t,
|
|
22803
22814
|
r,
|
|
22804
22815
|
i.authParams.username,
|
|
22805
|
-
i.
|
|
22816
|
+
i.id
|
|
22806
22817
|
), t.html(
|
|
22807
22818
|
/* @__PURE__ */ y(
|
|
22808
22819
|
q1,
|
|
@@ -22904,7 +22915,7 @@ const Jg = (t) => {
|
|
|
22904
22915
|
}
|
|
22905
22916
|
}),
|
|
22906
22917
|
async (t) => {
|
|
22907
|
-
const { env: e } = t, { state: n } = t.req.valid("query"), {
|
|
22918
|
+
const { env: e } = t, { state: n } = t.req.valid("query"), { loginSession: r, client: i } = await Ge(t, n), s = ts(
|
|
22908
22919
|
i.tenant.id,
|
|
22909
22920
|
t.req.header("cookie")
|
|
22910
22921
|
), o = s ? await e.data.sessions.get(i.tenant.id, s) : null;
|