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