@opensecret/react 1.0.0 → 1.0.1
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/README.md +31 -1
- package/dist/index.d.ts +120 -10
- package/dist/opensecret-react.es.js +645 -619
- package/dist/opensecret-react.umd.js +19 -19
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Cy = Object.defineProperty;
|
|
2
2
|
var _f = (r) => {
|
|
3
3
|
throw TypeError(r);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var Ve = (r, e, t) =>
|
|
5
|
+
var By = (r, e, t) => e in r ? Cy(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
6
|
+
var Ve = (r, e, t) => By(r, typeof e != "symbol" ? e + "" : e, t), Mc = (r, e, t) => e.has(r) || _f("Cannot " + t);
|
|
7
7
|
var $ = (r, e, t) => (Mc(r, e, "read from private field"), t ? t.call(r) : e.get(r)), rr = (r, e, t) => e.has(r) ? _f("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), Et = (r, e, t, n) => (Mc(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), Re = (r, e, t) => (Mc(r, e, "access private method"), t);
|
|
8
8
|
var Ef = (r, e, t, n) => ({
|
|
9
9
|
set _(i) {
|
|
@@ -15,7 +15,7 @@ var Ef = (r, e, t, n) => ({
|
|
|
15
15
|
});
|
|
16
16
|
import { jsx as vd } from "react/jsx-runtime";
|
|
17
17
|
import { createContext as md, useState as nl, useEffect as Os, useContext as wd } from "react";
|
|
18
|
-
class
|
|
18
|
+
class Oy {
|
|
19
19
|
constructor() {
|
|
20
20
|
Ve(this, "_appApiUrl", "");
|
|
21
21
|
Ve(this, "_platformApiUrl", "");
|
|
@@ -70,11 +70,11 @@ class Cy {
|
|
|
70
70
|
return this.isPlatformPath(e) ? "platformRefreshToken" : "refreshToken";
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
const Ho = new
|
|
73
|
+
const Ho = new Oy(), bd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
74
74
|
__proto__: null,
|
|
75
75
|
apiConfig: Ho
|
|
76
76
|
}, Symbol.toStringTag, { value: "Module" })), hr = 256;
|
|
77
|
-
class
|
|
77
|
+
class Ty {
|
|
78
78
|
// TODO(dchest): methods to encode chunk-by-chunk.
|
|
79
79
|
constructor(e = "=") {
|
|
80
80
|
Ve(this, "_paddingCharacter");
|
|
@@ -142,7 +142,7 @@ class By {
|
|
|
142
142
|
return t;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
const xd = new
|
|
145
|
+
const xd = new Ty();
|
|
146
146
|
function $r(r) {
|
|
147
147
|
return xd.encode(r);
|
|
148
148
|
}
|
|
@@ -160,12 +160,12 @@ function Cr(r) {
|
|
|
160
160
|
r[e] = 0;
|
|
161
161
|
return r;
|
|
162
162
|
}
|
|
163
|
-
const
|
|
164
|
-
function
|
|
165
|
-
let n = 1634760805, i = 857760878, s = 2036477234, o = 1797285236, c = t[3] << 24 | t[2] << 16 | t[1] << 8 | t[0], u = t[7] << 24 | t[6] << 16 | t[5] << 8 | t[4], h = t[11] << 24 | t[10] << 16 | t[9] << 8 | t[8], m = t[15] << 24 | t[14] << 16 | t[13] << 8 | t[12], x = t[19] << 24 | t[18] << 16 | t[17] << 8 | t[16], G = t[23] << 24 | t[22] << 16 | t[21] << 8 | t[20], N = t[27] << 24 | t[26] << 16 | t[25] << 8 | t[24], v = t[31] << 24 | t[30] << 16 | t[29] << 8 | t[28], A = e[3] << 24 | e[2] << 16 | e[1] << 8 | e[0], O = e[7] << 24 | e[6] << 16 | e[5] << 8 | e[4], k = e[11] << 24 | e[10] << 16 | e[9] << 8 | e[8], j = e[15] << 24 | e[14] << 16 | e[13] << 8 | e[12], R = n, le = i, X = s, re = o, Y = c, ye = u,
|
|
166
|
-
for (let pt = 0; pt <
|
|
167
|
-
R = R + Y | 0,
|
|
168
|
-
Gt(R + n | 0, r, 0), Gt(le + i | 0, r, 4), Gt(X + s | 0, r, 8), Gt(re + o | 0, r, 12), Gt(Y + c | 0, r, 16), Gt(ye + u | 0, r, 20), Gt(
|
|
163
|
+
const Ny = 20;
|
|
164
|
+
function jy(r, e, t) {
|
|
165
|
+
let n = 1634760805, i = 857760878, s = 2036477234, o = 1797285236, c = t[3] << 24 | t[2] << 16 | t[1] << 8 | t[0], u = t[7] << 24 | t[6] << 16 | t[5] << 8 | t[4], h = t[11] << 24 | t[10] << 16 | t[9] << 8 | t[8], m = t[15] << 24 | t[14] << 16 | t[13] << 8 | t[12], x = t[19] << 24 | t[18] << 16 | t[17] << 8 | t[16], G = t[23] << 24 | t[22] << 16 | t[21] << 8 | t[20], N = t[27] << 24 | t[26] << 16 | t[25] << 8 | t[24], v = t[31] << 24 | t[30] << 16 | t[29] << 8 | t[28], A = e[3] << 24 | e[2] << 16 | e[1] << 8 | e[0], O = e[7] << 24 | e[6] << 16 | e[5] << 8 | e[4], k = e[11] << 24 | e[10] << 16 | e[9] << 8 | e[8], j = e[15] << 24 | e[14] << 16 | e[13] << 8 | e[12], R = n, le = i, X = s, re = o, Y = c, ye = u, ze = h, ut = m, St = x, Bt = G, Ot = N, _t = v, ft = A, Ye = O, ae = k, Ee = j;
|
|
166
|
+
for (let pt = 0; pt < Ny; pt += 2)
|
|
167
|
+
R = R + Y | 0, ft ^= R, ft = ft >>> 16 | ft << 16, St = St + ft | 0, Y ^= St, Y = Y >>> 20 | Y << 12, le = le + ye | 0, Ye ^= le, Ye = Ye >>> 16 | Ye << 16, Bt = Bt + Ye | 0, ye ^= Bt, ye = ye >>> 20 | ye << 12, X = X + ze | 0, ae ^= X, ae = ae >>> 16 | ae << 16, Ot = Ot + ae | 0, ze ^= Ot, ze = ze >>> 20 | ze << 12, re = re + ut | 0, Ee ^= re, Ee = Ee >>> 16 | Ee << 16, _t = _t + Ee | 0, ut ^= _t, ut = ut >>> 20 | ut << 12, X = X + ze | 0, ae ^= X, ae = ae >>> 24 | ae << 8, Ot = Ot + ae | 0, ze ^= Ot, ze = ze >>> 25 | ze << 7, re = re + ut | 0, Ee ^= re, Ee = Ee >>> 24 | Ee << 8, _t = _t + Ee | 0, ut ^= _t, ut = ut >>> 25 | ut << 7, le = le + ye | 0, Ye ^= le, Ye = Ye >>> 24 | Ye << 8, Bt = Bt + Ye | 0, ye ^= Bt, ye = ye >>> 25 | ye << 7, R = R + Y | 0, ft ^= R, ft = ft >>> 24 | ft << 8, St = St + ft | 0, Y ^= St, Y = Y >>> 25 | Y << 7, R = R + ye | 0, Ee ^= R, Ee = Ee >>> 16 | Ee << 16, Ot = Ot + Ee | 0, ye ^= Ot, ye = ye >>> 20 | ye << 12, le = le + ze | 0, ft ^= le, ft = ft >>> 16 | ft << 16, _t = _t + ft | 0, ze ^= _t, ze = ze >>> 20 | ze << 12, X = X + ut | 0, Ye ^= X, Ye = Ye >>> 16 | Ye << 16, St = St + Ye | 0, ut ^= St, ut = ut >>> 20 | ut << 12, re = re + Y | 0, ae ^= re, ae = ae >>> 16 | ae << 16, Bt = Bt + ae | 0, Y ^= Bt, Y = Y >>> 20 | Y << 12, X = X + ut | 0, Ye ^= X, Ye = Ye >>> 24 | Ye << 8, St = St + Ye | 0, ut ^= St, ut = ut >>> 25 | ut << 7, re = re + Y | 0, ae ^= re, ae = ae >>> 24 | ae << 8, Bt = Bt + ae | 0, Y ^= Bt, Y = Y >>> 25 | Y << 7, le = le + ze | 0, ft ^= le, ft = ft >>> 24 | ft << 8, _t = _t + ft | 0, ze ^= _t, ze = ze >>> 25 | ze << 7, R = R + ye | 0, Ee ^= R, Ee = Ee >>> 24 | Ee << 8, Ot = Ot + Ee | 0, ye ^= Ot, ye = ye >>> 25 | ye << 7;
|
|
168
|
+
Gt(R + n | 0, r, 0), Gt(le + i | 0, r, 4), Gt(X + s | 0, r, 8), Gt(re + o | 0, r, 12), Gt(Y + c | 0, r, 16), Gt(ye + u | 0, r, 20), Gt(ze + h | 0, r, 24), Gt(ut + m | 0, r, 28), Gt(St + x | 0, r, 32), Gt(Bt + G | 0, r, 36), Gt(Ot + N | 0, r, 40), Gt(_t + v | 0, r, 44), Gt(ft + A | 0, r, 48), Gt(Ye + O | 0, r, 52), Gt(ae + k | 0, r, 56), Gt(Ee + j | 0, r, 60);
|
|
169
169
|
}
|
|
170
170
|
function il(r, e, t, n, i = 0) {
|
|
171
171
|
if (r.length !== 32)
|
|
@@ -184,24 +184,24 @@ function il(r, e, t, n, i = 0) {
|
|
|
184
184
|
}
|
|
185
185
|
const c = new Uint8Array(64);
|
|
186
186
|
for (let u = 0; u < t.length; u += 64) {
|
|
187
|
-
|
|
187
|
+
jy(c, s, r);
|
|
188
188
|
for (let h = u; h < u + 64 && h < t.length; h++)
|
|
189
189
|
n[h] = t[h] ^ c[h - u];
|
|
190
|
-
|
|
190
|
+
Py(s, 0, o);
|
|
191
191
|
}
|
|
192
192
|
return Cr(c), i === 0 && Cr(s), n;
|
|
193
193
|
}
|
|
194
194
|
function If(r, e, t, n = 0) {
|
|
195
195
|
return Cr(t), il(r, e, t, t, n);
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function Py(r, e, t) {
|
|
198
198
|
let n = 1;
|
|
199
199
|
for (; t--; )
|
|
200
200
|
n = n + (r[e] & 255) | 0, r[e] = n & 255, n >>>= 8, e++;
|
|
201
201
|
if (n > 0)
|
|
202
202
|
throw new Error("ChaCha: counter overflow");
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function Ry(r, e) {
|
|
205
205
|
if (r.length !== e.length)
|
|
206
206
|
return 0;
|
|
207
207
|
let t = 0;
|
|
@@ -209,13 +209,13 @@ function jy(r, e) {
|
|
|
209
209
|
t |= r[n] ^ e[n];
|
|
210
210
|
return 1 & t - 1 >>> 8;
|
|
211
211
|
}
|
|
212
|
-
function
|
|
213
|
-
return r.length === 0 || e.length === 0 ? !1 :
|
|
212
|
+
function Uy(r, e) {
|
|
213
|
+
return r.length === 0 || e.length === 0 ? !1 : Ry(r, e) !== 0;
|
|
214
214
|
}
|
|
215
|
-
const
|
|
216
|
-
class
|
|
215
|
+
const Dy = 16;
|
|
216
|
+
class $y {
|
|
217
217
|
constructor(e) {
|
|
218
|
-
Ve(this, "digestLength",
|
|
218
|
+
Ve(this, "digestLength", Dy);
|
|
219
219
|
Ve(this, "_buffer", new Uint8Array(16));
|
|
220
220
|
Ve(this, "_r", new Uint16Array(10));
|
|
221
221
|
Ve(this, "_h", new Uint16Array(10));
|
|
@@ -243,22 +243,22 @@ class Uy {
|
|
|
243
243
|
_blocks(e, t, n) {
|
|
244
244
|
let i = this._fin ? 0 : 2048, s = this._h[0], o = this._h[1], c = this._h[2], u = this._h[3], h = this._h[4], m = this._h[5], x = this._h[6], G = this._h[7], N = this._h[8], v = this._h[9], A = this._r[0], O = this._r[1], k = this._r[2], j = this._r[3], R = this._r[4], le = this._r[5], X = this._r[6], re = this._r[7], Y = this._r[8], ye = this._r[9];
|
|
245
245
|
for (; n >= 16; ) {
|
|
246
|
-
let
|
|
247
|
-
s +=
|
|
248
|
-
let
|
|
249
|
-
o += (
|
|
246
|
+
let ze = e[t + 0] | e[t + 1] << 8;
|
|
247
|
+
s += ze & 8191;
|
|
248
|
+
let ut = e[t + 2] | e[t + 3] << 8;
|
|
249
|
+
o += (ze >>> 13 | ut << 3) & 8191;
|
|
250
250
|
let St = e[t + 4] | e[t + 5] << 8;
|
|
251
|
-
c += (
|
|
251
|
+
c += (ut >>> 10 | St << 6) & 8191;
|
|
252
252
|
let Bt = e[t + 6] | e[t + 7] << 8;
|
|
253
253
|
u += (St >>> 7 | Bt << 9) & 8191;
|
|
254
254
|
let Ot = e[t + 8] | e[t + 9] << 8;
|
|
255
255
|
h += (Bt >>> 4 | Ot << 12) & 8191, m += Ot >>> 1 & 8191;
|
|
256
256
|
let _t = e[t + 10] | e[t + 11] << 8;
|
|
257
257
|
x += (Ot >>> 14 | _t << 2) & 8191;
|
|
258
|
-
let
|
|
259
|
-
G += (_t >>> 11 |
|
|
258
|
+
let ft = e[t + 12] | e[t + 13] << 8;
|
|
259
|
+
G += (_t >>> 11 | ft << 5) & 8191;
|
|
260
260
|
let Ye = e[t + 14] | e[t + 15] << 8;
|
|
261
|
-
N += (
|
|
261
|
+
N += (ft >>> 8 | Ye << 8) & 8191, v += Ye >>> 5 | i;
|
|
262
262
|
let ae = 0, Ee = ae;
|
|
263
263
|
Ee += s * A, Ee += o * (5 * ye), Ee += c * (5 * Y), Ee += u * (5 * re), Ee += h * (5 * X), ae = Ee >>> 13, Ee &= 8191, Ee += m * (5 * le), Ee += x * (5 * R), Ee += G * (5 * j), Ee += N * (5 * k), Ee += v * (5 * O), ae += Ee >>> 13, Ee &= 8191;
|
|
264
264
|
let pt = ae;
|
|
@@ -329,16 +329,16 @@ class Uy {
|
|
|
329
329
|
return Cr(this._buffer), Cr(this._r), Cr(this._h), Cr(this._pad), this._leftover = 0, this._fin = 0, this._finished = !0, this;
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
const
|
|
332
|
+
const My = 32, Vy = 12, Ly = 16, Cf = new Uint8Array(16);
|
|
333
333
|
class Tu {
|
|
334
334
|
/**
|
|
335
335
|
* Creates a new instance with the given 32-byte key.
|
|
336
336
|
*/
|
|
337
337
|
constructor(e) {
|
|
338
|
-
Ve(this, "nonceLength",
|
|
339
|
-
Ve(this, "tagLength",
|
|
338
|
+
Ve(this, "nonceLength", Vy);
|
|
339
|
+
Ve(this, "tagLength", Ly);
|
|
340
340
|
Ve(this, "_key");
|
|
341
|
-
if (e.length !==
|
|
341
|
+
if (e.length !== My)
|
|
342
342
|
throw new Error("ChaCha20Poly1305 needs 32-byte key");
|
|
343
343
|
this._key = new Uint8Array(e);
|
|
344
344
|
}
|
|
@@ -394,7 +394,7 @@ class Tu {
|
|
|
394
394
|
const o = new Uint8Array(32);
|
|
395
395
|
If(this._key, s, o, 4);
|
|
396
396
|
const c = new Uint8Array(this.tagLength);
|
|
397
|
-
if (this._authenticate(c, o, t.subarray(0, t.length - this.tagLength), n), !
|
|
397
|
+
if (this._authenticate(c, o, t.subarray(0, t.length - this.tagLength), n), !Uy(c, t.subarray(t.length - this.tagLength, t.length)))
|
|
398
398
|
return null;
|
|
399
399
|
const u = t.length - this.tagLength;
|
|
400
400
|
let h;
|
|
@@ -410,7 +410,7 @@ class Tu {
|
|
|
410
410
|
return Cr(this._key), this;
|
|
411
411
|
}
|
|
412
412
|
_authenticate(e, t, n, i) {
|
|
413
|
-
const s = new
|
|
413
|
+
const s = new $y(t);
|
|
414
414
|
i && (s.update(i), i.length % 16 > 0 && s.update(Cf.subarray(i.length % 16))), s.update(n), n.length % 16 > 0 && s.update(Cf.subarray(n.length % 16));
|
|
415
415
|
const o = new Uint8Array(8);
|
|
416
416
|
i && kf(i.length, o), s.update(o), kf(n.length, o), s.update(o);
|
|
@@ -421,7 +421,7 @@ class Tu {
|
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
const Bf = 65536;
|
|
424
|
-
class
|
|
424
|
+
class Hy {
|
|
425
425
|
constructor() {
|
|
426
426
|
Ve(this, "isAvailable", !1);
|
|
427
427
|
Ve(this, "isInstantiated", !1);
|
|
@@ -436,12 +436,12 @@ class Vy {
|
|
|
436
436
|
return t;
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
|
-
const
|
|
440
|
-
function
|
|
439
|
+
const Fy = new Hy();
|
|
440
|
+
function zy(r, e = Fy) {
|
|
441
441
|
return e.randomBytes(r);
|
|
442
442
|
}
|
|
443
443
|
function Ad(r, e) {
|
|
444
|
-
const t = new Tu(r), n =
|
|
444
|
+
const t = new Tu(r), n = zy(12), s = new TextEncoder().encode(e), o = t.seal(n, s), c = new Uint8Array(n.length + o.length);
|
|
445
445
|
return c.set(n), c.set(o, n.length), $r(c);
|
|
446
446
|
}
|
|
447
447
|
function Sd(r, e) {
|
|
@@ -451,10 +451,10 @@ function Sd(r, e) {
|
|
|
451
451
|
return new TextDecoder().decode(c);
|
|
452
452
|
}
|
|
453
453
|
var sl = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
454
|
-
function
|
|
454
|
+
function Gy(r) {
|
|
455
455
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function Ky(r) {
|
|
458
458
|
if (r.__esModule) return r;
|
|
459
459
|
var e = r.default;
|
|
460
460
|
if (typeof e == "function") {
|
|
@@ -577,7 +577,7 @@ var Of;
|
|
|
577
577
|
function re(_, I, T) {
|
|
578
578
|
if (!te(I))
|
|
579
579
|
throw new TypeError();
|
|
580
|
-
return fe(T) || (T = or(T)),
|
|
580
|
+
return fe(T) || (T = or(T)), ft(_, I, T);
|
|
581
581
|
}
|
|
582
582
|
e("hasOwnMetadata", re);
|
|
583
583
|
function Y(_, I, T) {
|
|
@@ -592,18 +592,18 @@ var Of;
|
|
|
592
592
|
return fe(T) || (T = or(T)), ae(_, I, T);
|
|
593
593
|
}
|
|
594
594
|
e("getOwnMetadata", ye);
|
|
595
|
-
function
|
|
595
|
+
function ze(_, I) {
|
|
596
596
|
if (!te(_))
|
|
597
597
|
throw new TypeError();
|
|
598
598
|
return fe(I) || (I = or(I)), pt(_, I);
|
|
599
599
|
}
|
|
600
|
-
e("getMetadataKeys",
|
|
601
|
-
function
|
|
600
|
+
e("getMetadataKeys", ze);
|
|
601
|
+
function ut(_, I) {
|
|
602
602
|
if (!te(_))
|
|
603
603
|
throw new TypeError();
|
|
604
604
|
return fe(I) || (I = or(I)), Rt(_, I);
|
|
605
605
|
}
|
|
606
|
-
e("getOwnMetadataKeys",
|
|
606
|
+
e("getOwnMetadataKeys", ut);
|
|
607
607
|
function St(_, I, T) {
|
|
608
608
|
if (!te(I))
|
|
609
609
|
throw new TypeError();
|
|
@@ -642,13 +642,13 @@ var Of;
|
|
|
642
642
|
return K;
|
|
643
643
|
}
|
|
644
644
|
function _t(_, I, T) {
|
|
645
|
-
var K =
|
|
645
|
+
var K = ft(_, I, T);
|
|
646
646
|
if (K)
|
|
647
647
|
return !0;
|
|
648
648
|
var xe = Bi(I);
|
|
649
649
|
return tt(xe) ? !1 : _t(_, xe, T);
|
|
650
650
|
}
|
|
651
|
-
function
|
|
651
|
+
function ft(_, I, T) {
|
|
652
652
|
var K = Wr(
|
|
653
653
|
I,
|
|
654
654
|
T,
|
|
@@ -658,7 +658,7 @@ var Of;
|
|
|
658
658
|
return fe(K) ? !1 : fs(K.OrdinaryHasOwnMetadata(_, I, T));
|
|
659
659
|
}
|
|
660
660
|
function Ye(_, I, T) {
|
|
661
|
-
var K =
|
|
661
|
+
var K = ft(_, I, T);
|
|
662
662
|
if (K)
|
|
663
663
|
return ae(_, I, T);
|
|
664
664
|
var xe = Bi(I);
|
|
@@ -1308,10 +1308,10 @@ var Of;
|
|
|
1308
1308
|
* SOFTWARE.
|
|
1309
1309
|
*
|
|
1310
1310
|
*/
|
|
1311
|
-
const
|
|
1311
|
+
const qy = "[object ArrayBuffer]";
|
|
1312
1312
|
class W {
|
|
1313
1313
|
static isArrayBuffer(e) {
|
|
1314
|
-
return Object.prototype.toString.call(e) ===
|
|
1314
|
+
return Object.prototype.toString.call(e) === qy;
|
|
1315
1315
|
}
|
|
1316
1316
|
static toArrayBuffer(e) {
|
|
1317
1317
|
return this.isArrayBuffer(e) ? e : e.byteLength === e.buffer.byteLength || e.byteOffset === 0 && e.byteLength === e.buffer.byteLength ? e.buffer : this.toUint8Array(e.buffer).slice(e.byteOffset, e.byteOffset + e.byteLength).buffer;
|
|
@@ -1358,7 +1358,7 @@ class W {
|
|
|
1358
1358
|
return e[e.length - 1] instanceof Function ? this.toView(i, e[e.length - 1]) : i.buffer;
|
|
1359
1359
|
}
|
|
1360
1360
|
}
|
|
1361
|
-
const Vc = "string",
|
|
1361
|
+
const Vc = "string", Zy = /^[0-9a-f]+$/i, Wy = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/, Yy = /^[a-zA-Z0-9-_]+$/;
|
|
1362
1362
|
class Tf {
|
|
1363
1363
|
static fromString(e) {
|
|
1364
1364
|
const t = unescape(encodeURIComponent(e)), n = new Uint8Array(t.length);
|
|
@@ -1393,13 +1393,13 @@ class Yr {
|
|
|
1393
1393
|
}
|
|
1394
1394
|
class de {
|
|
1395
1395
|
static isHex(e) {
|
|
1396
|
-
return typeof e === Vc &&
|
|
1396
|
+
return typeof e === Vc && Zy.test(e);
|
|
1397
1397
|
}
|
|
1398
1398
|
static isBase64(e) {
|
|
1399
|
-
return typeof e === Vc &&
|
|
1399
|
+
return typeof e === Vc && Wy.test(e);
|
|
1400
1400
|
}
|
|
1401
1401
|
static isBase64Url(e) {
|
|
1402
|
-
return typeof e === Vc &&
|
|
1402
|
+
return typeof e === Vc && Yy.test(e);
|
|
1403
1403
|
}
|
|
1404
1404
|
static ToString(e, t = "utf8") {
|
|
1405
1405
|
const n = W.toUint8Array(e);
|
|
@@ -1560,7 +1560,7 @@ class de {
|
|
|
1560
1560
|
}
|
|
1561
1561
|
}
|
|
1562
1562
|
de.DEFAULT_UTF8_ENCODING = "utf8";
|
|
1563
|
-
function
|
|
1563
|
+
function Jy(...r) {
|
|
1564
1564
|
const e = r.map((i) => i.byteLength).reduce((i, s) => i + s), t = new Uint8Array(e);
|
|
1565
1565
|
let n = 0;
|
|
1566
1566
|
return r.map((i) => new Uint8Array(i)).forEach((i) => {
|
|
@@ -1636,7 +1636,7 @@ function _d() {
|
|
|
1636
1636
|
s[c] = r[c];
|
|
1637
1637
|
return s[0] &= 127, Mi(s, 8) - n;
|
|
1638
1638
|
}
|
|
1639
|
-
function
|
|
1639
|
+
function Xy(r) {
|
|
1640
1640
|
const e = r < 0 ? r * -1 : r;
|
|
1641
1641
|
let t = 128;
|
|
1642
1642
|
for (let n = 1; n < 8; n++) {
|
|
@@ -1659,7 +1659,7 @@ function Yy(r) {
|
|
|
1659
1659
|
}
|
|
1660
1660
|
return new ArrayBuffer(0);
|
|
1661
1661
|
}
|
|
1662
|
-
function
|
|
1662
|
+
function Qy(r, e) {
|
|
1663
1663
|
if (r.byteLength !== e.byteLength)
|
|
1664
1664
|
return !1;
|
|
1665
1665
|
const t = new Uint8Array(r), n = new Uint8Array(e);
|
|
@@ -1741,7 +1741,7 @@ class Ha {
|
|
|
1741
1741
|
return Nu(this.items);
|
|
1742
1742
|
}
|
|
1743
1743
|
}
|
|
1744
|
-
const _s = [new Uint8Array([1])], Nf = "0123456789", Lc = "name", jf = "valueHexView",
|
|
1744
|
+
const _s = [new Uint8Array([1])], Nf = "0123456789", Lc = "name", jf = "valueHexView", eg = "isHexOnly", tg = "idBlock", rg = "tagClass", ng = "tagNumber", ig = "isConstructed", sg = "fromBER", og = "toBER", ag = "local", yr = "", Kr = new ArrayBuffer(0), Fa = new Uint8Array(0), Us = "EndOfContent", Ed = "OCTET STRING", kd = "BIT STRING";
|
|
1745
1745
|
function fn(r) {
|
|
1746
1746
|
var e;
|
|
1747
1747
|
return e = class extends r {
|
|
@@ -2033,7 +2033,7 @@ class Jt extends Ei {
|
|
|
2033
2033
|
if (!(e instanceof this.constructor))
|
|
2034
2034
|
return !1;
|
|
2035
2035
|
const t = this.toBER(), n = e.toBER();
|
|
2036
|
-
return
|
|
2036
|
+
return Qy(t, n);
|
|
2037
2037
|
}
|
|
2038
2038
|
}
|
|
2039
2039
|
Jt.NAME = "BaseBlock";
|
|
@@ -2077,7 +2077,7 @@ class fo extends Jt {
|
|
|
2077
2077
|
Td = fo;
|
|
2078
2078
|
ce.Primitive = Td;
|
|
2079
2079
|
fo.NAME = "PRIMITIVE";
|
|
2080
|
-
function
|
|
2080
|
+
function cg(r, e) {
|
|
2081
2081
|
if (r instanceof e)
|
|
2082
2082
|
return r;
|
|
2083
2083
|
const t = new e();
|
|
@@ -2234,7 +2234,7 @@ function ns(r, e = 0, t = r.length) {
|
|
|
2234
2234
|
default:
|
|
2235
2235
|
u = i.idBlock.isConstructed ? ce.Constructed : ce.Primitive;
|
|
2236
2236
|
}
|
|
2237
|
-
return i =
|
|
2237
|
+
return i = cg(i, u), c = i.fromBER(r, e, i.lenBlock.isIndefiniteForm ? t : i.lenBlock.length), i.valueBeforeDecodeView = r.subarray(n, n + i.blockLength), {
|
|
2238
2238
|
offset: c,
|
|
2239
2239
|
result: i
|
|
2240
2240
|
};
|
|
@@ -2249,7 +2249,7 @@ function Ui(r) {
|
|
|
2249
2249
|
}
|
|
2250
2250
|
return ns(W.toUint8Array(r).slice(), 0, r.byteLength);
|
|
2251
2251
|
}
|
|
2252
|
-
function
|
|
2252
|
+
function lg(r, e) {
|
|
2253
2253
|
return r ? 1 : e;
|
|
2254
2254
|
}
|
|
2255
2255
|
class Vn extends fr {
|
|
@@ -2263,7 +2263,7 @@ class Vn extends fr {
|
|
|
2263
2263
|
if (this.valueBeforeDecodeView = i.subarray(t, t + n), this.valueBeforeDecodeView.length === 0)
|
|
2264
2264
|
return this.warnings.push("Zero buffer length"), t;
|
|
2265
2265
|
let s = t;
|
|
2266
|
-
for (;
|
|
2266
|
+
for (; lg(this.isIndefiniteForm, n) > 0; ) {
|
|
2267
2267
|
const o = ns(i, s, n);
|
|
2268
2268
|
if (o.offset === -1)
|
|
2269
2269
|
return this.error = o.result.error, this.warnings.concat(o.result.warnings), -1;
|
|
@@ -2581,7 +2581,7 @@ Hd = oi;
|
|
|
2581
2581
|
ce.BitString = Hd;
|
|
2582
2582
|
oi.NAME = kd;
|
|
2583
2583
|
var Fd;
|
|
2584
|
-
function
|
|
2584
|
+
function ug(r, e) {
|
|
2585
2585
|
const t = new Uint8Array([0]), n = new Uint8Array(r), i = new Uint8Array(e);
|
|
2586
2586
|
let s = n.slice(0);
|
|
2587
2587
|
const o = s.length - 1, c = i.slice(0), u = c.length - 1;
|
|
@@ -2619,7 +2619,7 @@ function Pf(r) {
|
|
|
2619
2619
|
}
|
|
2620
2620
|
return _s[r];
|
|
2621
2621
|
}
|
|
2622
|
-
function
|
|
2622
|
+
function fg(r, e) {
|
|
2623
2623
|
let t = 0;
|
|
2624
2624
|
const n = new Uint8Array(r), i = new Uint8Array(e), s = n.slice(0), o = s.length - 1, c = i.slice(0), u = c.length - 1;
|
|
2625
2625
|
let h, m = 0;
|
|
@@ -2649,7 +2649,7 @@ class Ru extends fn(fr) {
|
|
|
2649
2649
|
this.valueHexView.length >= 4 ? (this.warnings.push("Too big Integer for decoding, hex only"), this.isHexOnly = !0, this._valueDec = 0) : (this.isHexOnly = !1, this.valueHexView.length > 0 && (this._valueDec = _d.call(this)));
|
|
2650
2650
|
}
|
|
2651
2651
|
set valueDec(e) {
|
|
2652
|
-
this._valueDec = e, this.isHexOnly = !1, this.valueHexView = new Uint8Array(
|
|
2652
|
+
this._valueDec = e, this.isHexOnly = !1, this.valueHexView = new Uint8Array(Xy(e));
|
|
2653
2653
|
}
|
|
2654
2654
|
get valueDec() {
|
|
2655
2655
|
return this._valueDec;
|
|
@@ -2700,10 +2700,10 @@ class Ru extends fn(fr) {
|
|
|
2700
2700
|
if ((i & 1) === 1)
|
|
2701
2701
|
switch (n) {
|
|
2702
2702
|
case e:
|
|
2703
|
-
t =
|
|
2703
|
+
t = fg(Pf(n), t), o = "-";
|
|
2704
2704
|
break;
|
|
2705
2705
|
default:
|
|
2706
|
-
t =
|
|
2706
|
+
t = ug(t, Pf(n));
|
|
2707
2707
|
}
|
|
2708
2708
|
n++, i >>= 1;
|
|
2709
2709
|
}
|
|
@@ -3521,7 +3521,7 @@ class Go extends ui {
|
|
|
3521
3521
|
super(n), this.value = e, this.local = t;
|
|
3522
3522
|
}
|
|
3523
3523
|
}
|
|
3524
|
-
class
|
|
3524
|
+
class hg {
|
|
3525
3525
|
constructor({ data: e = Fa } = {}) {
|
|
3526
3526
|
this.dataView = W.toUint8Array(e);
|
|
3527
3527
|
}
|
|
@@ -3577,17 +3577,17 @@ function ri(r, e, t) {
|
|
|
3577
3577
|
verified: !1,
|
|
3578
3578
|
result: { error: "Wrong ASN.1 schema" }
|
|
3579
3579
|
};
|
|
3580
|
-
if (!(
|
|
3580
|
+
if (!(tg in t))
|
|
3581
3581
|
return {
|
|
3582
3582
|
verified: !1,
|
|
3583
3583
|
result: { error: "Wrong ASN.1 schema" }
|
|
3584
3584
|
};
|
|
3585
|
-
if (!(
|
|
3585
|
+
if (!(sg in t.idBlock))
|
|
3586
3586
|
return {
|
|
3587
3587
|
verified: !1,
|
|
3588
3588
|
result: { error: "Wrong ASN.1 schema" }
|
|
3589
3589
|
};
|
|
3590
|
-
if (!(
|
|
3590
|
+
if (!(og in t.idBlock))
|
|
3591
3591
|
return {
|
|
3592
3592
|
verified: !1,
|
|
3593
3593
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -3603,7 +3603,7 @@ function ri(r, e, t) {
|
|
|
3603
3603
|
verified: !1,
|
|
3604
3604
|
result: { error: "Error decoding idBlock for ASN.1 schema" }
|
|
3605
3605
|
};
|
|
3606
|
-
if (t.idBlock.hasOwnProperty(
|
|
3606
|
+
if (t.idBlock.hasOwnProperty(rg) === !1)
|
|
3607
3607
|
return {
|
|
3608
3608
|
verified: !1,
|
|
3609
3609
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -3613,7 +3613,7 @@ function ri(r, e, t) {
|
|
|
3613
3613
|
verified: !1,
|
|
3614
3614
|
result: r
|
|
3615
3615
|
};
|
|
3616
|
-
if (t.idBlock.hasOwnProperty(
|
|
3616
|
+
if (t.idBlock.hasOwnProperty(ng) === !1)
|
|
3617
3617
|
return {
|
|
3618
3618
|
verified: !1,
|
|
3619
3619
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -3623,7 +3623,7 @@ function ri(r, e, t) {
|
|
|
3623
3623
|
verified: !1,
|
|
3624
3624
|
result: r
|
|
3625
3625
|
};
|
|
3626
|
-
if (t.idBlock.hasOwnProperty(
|
|
3626
|
+
if (t.idBlock.hasOwnProperty(ig) === !1)
|
|
3627
3627
|
return {
|
|
3628
3628
|
verified: !1,
|
|
3629
3629
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -3633,7 +3633,7 @@ function ri(r, e, t) {
|
|
|
3633
3633
|
verified: !1,
|
|
3634
3634
|
result: r
|
|
3635
3635
|
};
|
|
3636
|
-
if (!(
|
|
3636
|
+
if (!(eg in t.idBlock))
|
|
3637
3637
|
return {
|
|
3638
3638
|
verified: !1,
|
|
3639
3639
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -3703,7 +3703,7 @@ function ri(r, e, t) {
|
|
|
3703
3703
|
return t.name && (t.name = t.name.replace(/^\s+|\s+$/g, yr), t.name && delete r[t.name]), o;
|
|
3704
3704
|
if (Lc in t.valueBlock.value[0] && t.valueBlock.value[0].name.length > 0) {
|
|
3705
3705
|
let h = {};
|
|
3706
|
-
|
|
3706
|
+
ag in t.valueBlock.value[0] && t.valueBlock.value[0].local ? h = e : h = r, typeof h[t.valueBlock.value[0].name] > "u" && (h[t.valueBlock.value[0].name] = []), h[t.valueBlock.value[0].name].push(e.valueBlock.value[u]);
|
|
3707
3707
|
}
|
|
3708
3708
|
} else if (o = ri(r, e.valueBlock.value[u - s], t.valueBlock.value[u]), o.verified === !1)
|
|
3709
3709
|
if (t.valueBlock.value[u].optional)
|
|
@@ -3738,7 +3738,7 @@ function ri(r, e, t) {
|
|
|
3738
3738
|
result: r
|
|
3739
3739
|
};
|
|
3740
3740
|
}
|
|
3741
|
-
function
|
|
3741
|
+
function dg(r, e) {
|
|
3742
3742
|
if (!(e instanceof Object))
|
|
3743
3743
|
return {
|
|
3744
3744
|
verified: !1,
|
|
@@ -3778,7 +3778,7 @@ const Ap = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3778
3778
|
OctetString: si,
|
|
3779
3779
|
Primitive: fo,
|
|
3780
3780
|
PrintableString: Ya,
|
|
3781
|
-
RawData:
|
|
3781
|
+
RawData: hg,
|
|
3782
3782
|
RelativeObjectIdentifier: Uu,
|
|
3783
3783
|
Repeated: Go,
|
|
3784
3784
|
Sequence: mn,
|
|
@@ -3795,7 +3795,7 @@ const Ap = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3795
3795
|
VisibleString: ho,
|
|
3796
3796
|
compareSchema: ri,
|
|
3797
3797
|
fromBER: Ui,
|
|
3798
|
-
verifySchema:
|
|
3798
|
+
verifySchema: dg
|
|
3799
3799
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3800
3800
|
var M;
|
|
3801
3801
|
(function(r) {
|
|
@@ -3867,7 +3867,7 @@ class et {
|
|
|
3867
3867
|
return new si({ name: e });
|
|
3868
3868
|
}
|
|
3869
3869
|
}
|
|
3870
|
-
const
|
|
3870
|
+
const pg = {
|
|
3871
3871
|
fromASN: (r) => r instanceof li ? null : r.valueBeforeDecodeView,
|
|
3872
3872
|
toASN: (r) => {
|
|
3873
3873
|
if (r === null)
|
|
@@ -3877,28 +3877,28 @@ const hg = {
|
|
|
3877
3877
|
throw new Error(e.result.error);
|
|
3878
3878
|
return e.result;
|
|
3879
3879
|
}
|
|
3880
|
-
},
|
|
3880
|
+
}, yg = {
|
|
3881
3881
|
fromASN: (r) => r.valueBlock.valueHexView.byteLength >= 4 ? r.valueBlock.toString() : r.valueBlock.valueDec,
|
|
3882
3882
|
toASN: (r) => new nn({ value: +r })
|
|
3883
|
-
},
|
|
3883
|
+
}, gg = {
|
|
3884
3884
|
fromASN: (r) => r.valueBlock.valueDec,
|
|
3885
3885
|
toASN: (r) => new Ga({ value: r })
|
|
3886
3886
|
}, wt = {
|
|
3887
3887
|
fromASN: (r) => r.valueBlock.valueHexView,
|
|
3888
3888
|
toASN: (r) => new nn({ valueHex: r })
|
|
3889
|
-
},
|
|
3889
|
+
}, vg = {
|
|
3890
3890
|
fromASN: (r) => r.valueBlock.valueHexView,
|
|
3891
3891
|
toASN: (r) => new oi({ valueHex: r })
|
|
3892
|
-
},
|
|
3892
|
+
}, mg = {
|
|
3893
3893
|
fromASN: (r) => r.valueBlock.toString(),
|
|
3894
3894
|
toASN: (r) => new Ka({ value: r })
|
|
3895
|
-
},
|
|
3895
|
+
}, wg = {
|
|
3896
3896
|
fromASN: (r) => r.valueBlock.value,
|
|
3897
3897
|
toASN: (r) => new za({ value: r })
|
|
3898
3898
|
}, Ko = {
|
|
3899
3899
|
fromASN: (r) => r.valueBlock.valueHexView,
|
|
3900
3900
|
toASN: (r) => new si({ valueHex: r })
|
|
3901
|
-
},
|
|
3901
|
+
}, bg = {
|
|
3902
3902
|
fromASN: (r) => new et(r.getValue()),
|
|
3903
3903
|
toASN: (r) => r.toASN()
|
|
3904
3904
|
};
|
|
@@ -3908,62 +3908,62 @@ function Tr(r) {
|
|
|
3908
3908
|
toASN: (e) => new r({ value: e })
|
|
3909
3909
|
};
|
|
3910
3910
|
}
|
|
3911
|
-
const Sp = Tr(In),
|
|
3911
|
+
const Sp = Tr(In), xg = Tr(qa), Ag = Tr(Za), Sg = Tr(Wa), _g = Tr(Ya), Eg = Tr(Ja), kg = Tr(Xa), Ig = Tr(Qa), Cg = Tr(ec), Bg = Tr(ho), Og = Tr(tc), Tg = Tr(rc), Ng = {
|
|
3912
3912
|
fromASN: (r) => r.toDate(),
|
|
3913
3913
|
toASN: (r) => new po({ valueDate: r })
|
|
3914
|
-
},
|
|
3914
|
+
}, jg = {
|
|
3915
3915
|
fromASN: (r) => r.toDate(),
|
|
3916
3916
|
toASN: (r) => new nc({ valueDate: r })
|
|
3917
|
-
},
|
|
3917
|
+
}, Pg = {
|
|
3918
3918
|
fromASN: () => null,
|
|
3919
3919
|
toASN: () => new li()
|
|
3920
3920
|
};
|
|
3921
3921
|
function Fu(r) {
|
|
3922
3922
|
switch (r) {
|
|
3923
3923
|
case b.Any:
|
|
3924
|
-
return
|
|
3924
|
+
return pg;
|
|
3925
3925
|
case b.BitString:
|
|
3926
|
-
return
|
|
3926
|
+
return vg;
|
|
3927
3927
|
case b.BmpString:
|
|
3928
|
-
return
|
|
3928
|
+
return xg;
|
|
3929
3929
|
case b.Boolean:
|
|
3930
|
-
return
|
|
3930
|
+
return wg;
|
|
3931
3931
|
case b.CharacterString:
|
|
3932
|
-
return
|
|
3932
|
+
return Tg;
|
|
3933
3933
|
case b.Enumerated:
|
|
3934
|
-
return
|
|
3934
|
+
return gg;
|
|
3935
3935
|
case b.GeneralString:
|
|
3936
|
-
return
|
|
3936
|
+
return Og;
|
|
3937
3937
|
case b.GeneralizedTime:
|
|
3938
|
-
return
|
|
3938
|
+
return jg;
|
|
3939
3939
|
case b.GraphicString:
|
|
3940
|
-
return
|
|
3940
|
+
return Cg;
|
|
3941
3941
|
case b.IA5String:
|
|
3942
|
-
return
|
|
3942
|
+
return Ig;
|
|
3943
3943
|
case b.Integer:
|
|
3944
|
-
return
|
|
3944
|
+
return yg;
|
|
3945
3945
|
case b.Null:
|
|
3946
|
-
return
|
|
3946
|
+
return Pg;
|
|
3947
3947
|
case b.NumericString:
|
|
3948
|
-
return
|
|
3948
|
+
return Sg;
|
|
3949
3949
|
case b.ObjectIdentifier:
|
|
3950
|
-
return
|
|
3950
|
+
return mg;
|
|
3951
3951
|
case b.OctetString:
|
|
3952
3952
|
return Ko;
|
|
3953
3953
|
case b.PrintableString:
|
|
3954
|
-
return
|
|
3954
|
+
return _g;
|
|
3955
3955
|
case b.TeletexString:
|
|
3956
|
-
return
|
|
3956
|
+
return Eg;
|
|
3957
3957
|
case b.UTCTime:
|
|
3958
|
-
return
|
|
3958
|
+
return Ng;
|
|
3959
3959
|
case b.UniversalString:
|
|
3960
|
-
return
|
|
3960
|
+
return Ag;
|
|
3961
3961
|
case b.Utf8String:
|
|
3962
3962
|
return Sp;
|
|
3963
3963
|
case b.VideotexString:
|
|
3964
|
-
return
|
|
3964
|
+
return kg;
|
|
3965
3965
|
case b.VisibleString:
|
|
3966
|
-
return
|
|
3966
|
+
return Bg;
|
|
3967
3967
|
default:
|
|
3968
3968
|
return null;
|
|
3969
3969
|
}
|
|
@@ -3979,7 +3979,7 @@ function _p(r) {
|
|
|
3979
3979
|
}
|
|
3980
3980
|
return !1;
|
|
3981
3981
|
}
|
|
3982
|
-
function
|
|
3982
|
+
function Rg(r, e) {
|
|
3983
3983
|
if (!(r && e) || r.byteLength !== e.byteLength)
|
|
3984
3984
|
return !1;
|
|
3985
3985
|
const t = new Uint8Array(r), n = new Uint8Array(e);
|
|
@@ -3988,7 +3988,7 @@ function jg(r, e) {
|
|
|
3988
3988
|
return !1;
|
|
3989
3989
|
return !0;
|
|
3990
3990
|
}
|
|
3991
|
-
class
|
|
3991
|
+
class Ug {
|
|
3992
3992
|
constructor() {
|
|
3993
3993
|
this.items = /* @__PURE__ */ new WeakMap();
|
|
3994
3994
|
}
|
|
@@ -4096,7 +4096,7 @@ class Pg {
|
|
|
4096
4096
|
return t ? this.items.get(t) || this.findParentSchema(t) : null;
|
|
4097
4097
|
}
|
|
4098
4098
|
}
|
|
4099
|
-
const Br = new
|
|
4099
|
+
const Br = new Ug(), H = (r) => (e) => {
|
|
4100
4100
|
let t;
|
|
4101
4101
|
Br.has(e) ? t = Br.get(e) : (t = Br.createDefault(e), Br.set(e, t)), Object.assign(t, r);
|
|
4102
4102
|
}, y = (r) => (e, t) => {
|
|
@@ -4116,7 +4116,7 @@ class Rf extends Error {
|
|
|
4116
4116
|
super(...arguments), this.schemas = [];
|
|
4117
4117
|
}
|
|
4118
4118
|
}
|
|
4119
|
-
class
|
|
4119
|
+
class Dg {
|
|
4120
4120
|
static parse(e, t) {
|
|
4121
4121
|
const n = Ui(e);
|
|
4122
4122
|
if (n.result.error)
|
|
@@ -4234,7 +4234,7 @@ class zu {
|
|
|
4234
4234
|
} else
|
|
4235
4235
|
for (const o in n.items) {
|
|
4236
4236
|
const c = n.items[o], u = e[o];
|
|
4237
|
-
if (u === void 0 || c.defaultValue === u || typeof c.defaultValue == "object" && typeof u == "object" &&
|
|
4237
|
+
if (u === void 0 || c.defaultValue === u || typeof c.defaultValue == "object" && typeof u == "object" && Rg(this.serialize(c.defaultValue), this.serialize(u)))
|
|
4238
4238
|
continue;
|
|
4239
4239
|
const h = zu.toAsnItem(c, o, t, u);
|
|
4240
4240
|
if (typeof c.context == "number")
|
|
@@ -4328,7 +4328,7 @@ class q {
|
|
|
4328
4328
|
return zu.serialize(e);
|
|
4329
4329
|
}
|
|
4330
4330
|
static parse(e, t) {
|
|
4331
|
-
return
|
|
4331
|
+
return Dg.parse(e, t);
|
|
4332
4332
|
}
|
|
4333
4333
|
static toString(e) {
|
|
4334
4334
|
const t = W.isBufferSource(e) ? W.toArrayBuffer(e) : q.serialize(e), n = Ui(t);
|
|
@@ -4939,7 +4939,7 @@ let Ht = fl = class extends hl {
|
|
|
4939
4939
|
Ht = fl = f([
|
|
4940
4940
|
H({ type: M.Sequence })
|
|
4941
4941
|
], Ht);
|
|
4942
|
-
const
|
|
4942
|
+
const $g = {
|
|
4943
4943
|
fromASN: (r) => Df.toString(Ko.fromASN(r)),
|
|
4944
4944
|
toASN: (r) => Ko.toASN(Df.fromString(r))
|
|
4945
4945
|
};
|
|
@@ -4992,7 +4992,7 @@ f([
|
|
|
4992
4992
|
y({ type: b.IA5String, context: 6, implicit: !0 })
|
|
4993
4993
|
], Ue.prototype, "uniformResourceIdentifier", void 0);
|
|
4994
4994
|
f([
|
|
4995
|
-
y({ type: b.OctetString, context: 7, implicit: !0, converter:
|
|
4995
|
+
y({ type: b.OctetString, context: 7, implicit: !0, converter: $g })
|
|
4996
4996
|
], Ue.prototype, "iPAddress", void 0);
|
|
4997
4997
|
f([
|
|
4998
4998
|
y({ type: b.ObjectIdentifier, context: 8, implicit: !0 })
|
|
@@ -5000,9 +5000,9 @@ f([
|
|
|
5000
5000
|
Ue = f([
|
|
5001
5001
|
H({ type: M.Choice })
|
|
5002
5002
|
], Ue);
|
|
5003
|
-
const Ku = "1.3.6.1.5.5.7",
|
|
5003
|
+
const Ku = "1.3.6.1.5.5.7", Mg = `${Ku}.1`, is = `${Ku}.3`, oc = `${Ku}.48`, $f = `${oc}.1`, Mf = `${oc}.2`, Vf = `${oc}.3`, Lf = `${oc}.5`, Yn = "2.5.29";
|
|
5004
5004
|
var dl;
|
|
5005
|
-
const pl = `${
|
|
5005
|
+
const pl = `${Mg}.1`;
|
|
5006
5006
|
class yo {
|
|
5007
5007
|
constructor(e = {}) {
|
|
5008
5008
|
this.accessMethod = "", this.accessLocation = new Ue(), Object.assign(this, e);
|
|
@@ -5297,7 +5297,7 @@ let Xo = Al = class extends dt {
|
|
|
5297
5297
|
Xo = Al = f([
|
|
5298
5298
|
H({ type: M.Sequence, itemType: b.ObjectIdentifier })
|
|
5299
5299
|
], Xo);
|
|
5300
|
-
const
|
|
5300
|
+
const Vg = `${is}.1`, Lg = `${is}.2`, Hg = `${is}.3`, Fg = `${is}.4`, zg = `${is}.8`, Gg = `${is}.9`;
|
|
5301
5301
|
let Sl = class {
|
|
5302
5302
|
constructor(e = new ArrayBuffer(0)) {
|
|
5303
5303
|
this.value = e;
|
|
@@ -6218,7 +6218,7 @@ f([
|
|
|
6218
6218
|
y({ type: et, context: 0, implicit: !0, optional: !0 })
|
|
6219
6219
|
], Vs.prototype, "value", void 0);
|
|
6220
6220
|
f([
|
|
6221
|
-
y({ type: et, converter:
|
|
6221
|
+
y({ type: et, converter: bg, context: 0, implicit: !0, optional: !0, repeated: "sequence" })
|
|
6222
6222
|
], Vs.prototype, "constructedValue", void 0);
|
|
6223
6223
|
Vs = f([
|
|
6224
6224
|
H({ type: M.Choice })
|
|
@@ -6537,7 +6537,7 @@ f([
|
|
|
6537
6537
|
f([
|
|
6538
6538
|
y({ type: ql, context: 1, implicit: !0, optional: !0 })
|
|
6539
6539
|
], Ao.prototype, "unprotectedAttrs", void 0);
|
|
6540
|
-
const
|
|
6540
|
+
const Kg = "1.2.840.113549.1.7.1", Zl = "1.2.840.113549.1.7.2";
|
|
6541
6541
|
var Wl;
|
|
6542
6542
|
let la = Wl = class extends dt {
|
|
6543
6543
|
constructor(e) {
|
|
@@ -6574,9 +6574,9 @@ const Ls = "1.2.840.10045.2.1", ff = "1.2.840.10045.4.1", Mp = "1.2.840.10045.4.
|
|
|
6574
6574
|
function So(r) {
|
|
6575
6575
|
return new oe({ algorithm: r });
|
|
6576
6576
|
}
|
|
6577
|
-
const
|
|
6577
|
+
const qg = So(ff);
|
|
6578
6578
|
So(Mp);
|
|
6579
|
-
const
|
|
6579
|
+
const Zg = So(hf), Wg = So(df), Yg = So(pf);
|
|
6580
6580
|
let Hs = class {
|
|
6581
6581
|
constructor(e = {}) {
|
|
6582
6582
|
Object.assign(this, e);
|
|
@@ -6591,7 +6591,7 @@ f([
|
|
|
6591
6591
|
Hs = f([
|
|
6592
6592
|
H({ type: M.Sequence })
|
|
6593
6593
|
], Hs);
|
|
6594
|
-
class
|
|
6594
|
+
class Jg extends et {
|
|
6595
6595
|
}
|
|
6596
6596
|
let Wi = class {
|
|
6597
6597
|
constructor(e = {}) {
|
|
@@ -6629,7 +6629,7 @@ f([
|
|
|
6629
6629
|
y({ type: Wi })
|
|
6630
6630
|
], _n.prototype, "curve", void 0);
|
|
6631
6631
|
f([
|
|
6632
|
-
y({ type:
|
|
6632
|
+
y({ type: Jg })
|
|
6633
6633
|
], _n.prototype, "base", void 0);
|
|
6634
6634
|
f([
|
|
6635
6635
|
y({ type: b.Integer, converter: wt })
|
|
@@ -6685,29 +6685,29 @@ f([
|
|
|
6685
6685
|
f([
|
|
6686
6686
|
y({ type: b.Integer, converter: wt })
|
|
6687
6687
|
], ua.prototype, "s", void 0);
|
|
6688
|
-
const wr = "1.2.840.113549.1.1", gi = `${wr}.1`,
|
|
6688
|
+
const wr = "1.2.840.113549.1.1", gi = `${wr}.1`, Xg = `${wr}.7`, Qg = `${wr}.9`, js = `${wr}.10`, ev = `${wr}.2`, tv = `${wr}.4`, fa = `${wr}.5`, rv = `${wr}.14`, Jl = `${wr}.11`, ha = `${wr}.12`, da = `${wr}.13`, Vp = `${wr}.15`, Lp = `${wr}.16`, pa = "1.3.14.3.2.26", Hp = "2.16.840.1.101.3.4.2.4", ya = "2.16.840.1.101.3.4.2.1", ga = "2.16.840.1.101.3.4.2.2", va = "2.16.840.1.101.3.4.2.3", nv = "2.16.840.1.101.3.4.2.5", iv = "2.16.840.1.101.3.4.2.6", sv = "1.2.840.113549.2.2", ov = "1.2.840.113549.2.5", Ac = `${wr}.8`;
|
|
6689
6689
|
function Ft(r) {
|
|
6690
6690
|
return new oe({ algorithm: r, parameters: null });
|
|
6691
6691
|
}
|
|
6692
|
-
Ft(
|
|
6693
|
-
Ft(
|
|
6692
|
+
Ft(sv);
|
|
6693
|
+
Ft(ov);
|
|
6694
6694
|
const vi = Ft(pa);
|
|
6695
6695
|
Ft(Hp);
|
|
6696
6696
|
Ft(ya);
|
|
6697
6697
|
Ft(ga);
|
|
6698
6698
|
Ft(va);
|
|
6699
|
-
Ft(
|
|
6700
|
-
Ft(
|
|
6699
|
+
Ft(nv);
|
|
6700
|
+
Ft(iv);
|
|
6701
6701
|
const Fp = new oe({
|
|
6702
6702
|
algorithm: Ac,
|
|
6703
6703
|
parameters: q.serialize(vi)
|
|
6704
6704
|
}), zp = new oe({
|
|
6705
|
-
algorithm:
|
|
6705
|
+
algorithm: Qg,
|
|
6706
6706
|
parameters: q.serialize(Ko.toASN(new Uint8Array([218, 57, 163, 238, 94, 107, 75, 13, 50, 85, 191, 239, 149, 96, 24, 144, 175, 216, 7, 9]).buffer))
|
|
6707
6707
|
});
|
|
6708
6708
|
Ft(gi);
|
|
6709
|
-
Ft(
|
|
6710
|
-
Ft(
|
|
6709
|
+
Ft(ev);
|
|
6710
|
+
Ft(tv);
|
|
6711
6711
|
Ft(fa);
|
|
6712
6712
|
Ft(Vp);
|
|
6713
6713
|
Ft(Lp);
|
|
@@ -6733,7 +6733,7 @@ f([
|
|
|
6733
6733
|
y({ type: oe, context: 2, defaultValue: zp })
|
|
6734
6734
|
], Sc.prototype, "pSourceAlgorithm", void 0);
|
|
6735
6735
|
new oe({
|
|
6736
|
-
algorithm:
|
|
6736
|
+
algorithm: Xg,
|
|
6737
6737
|
parameters: q.serialize(new Sc())
|
|
6738
6738
|
});
|
|
6739
6739
|
class mi {
|
|
@@ -6873,7 +6873,7 @@ function gf(r, e) {
|
|
|
6873
6873
|
}
|
|
6874
6874
|
r.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
|
|
6875
6875
|
}
|
|
6876
|
-
function
|
|
6876
|
+
function av(r, e, t, n) {
|
|
6877
6877
|
function i(s) {
|
|
6878
6878
|
return s instanceof t ? s : new t(function(o) {
|
|
6879
6879
|
o(s);
|
|
@@ -6900,7 +6900,7 @@ function sv(r, e, t, n) {
|
|
|
6900
6900
|
h((n = n.apply(r, [])).next());
|
|
6901
6901
|
});
|
|
6902
6902
|
}
|
|
6903
|
-
function
|
|
6903
|
+
function cv(r, e) {
|
|
6904
6904
|
var t = { label: 0, sent: function() {
|
|
6905
6905
|
if (s[0] & 1) throw s[1];
|
|
6906
6906
|
return s[1];
|
|
@@ -6992,9 +6992,9 @@ function ti() {
|
|
|
6992
6992
|
r = r.concat(ma(arguments[e]));
|
|
6993
6993
|
return r;
|
|
6994
6994
|
}
|
|
6995
|
-
var
|
|
6996
|
-
function
|
|
6997
|
-
var e = Reflect.getMetadata("design:paramtypes", r) || [], t = Reflect.getOwnMetadata(
|
|
6995
|
+
var lv = "injectionTokens";
|
|
6996
|
+
function uv(r) {
|
|
6997
|
+
var e = Reflect.getMetadata("design:paramtypes", r) || [], t = Reflect.getOwnMetadata(lv, r) || {};
|
|
6998
6998
|
return Object.keys(t).forEach(function(n) {
|
|
6999
6999
|
e[+n] = t[n];
|
|
7000
7000
|
}), e;
|
|
@@ -7042,13 +7042,13 @@ var Kp = function() {
|
|
|
7042
7042
|
function Ni(r) {
|
|
7043
7043
|
return typeof r == "string" || typeof r == "symbol";
|
|
7044
7044
|
}
|
|
7045
|
-
function
|
|
7045
|
+
function fv(r) {
|
|
7046
7046
|
return typeof r == "object" && "token" in r && "multiple" in r;
|
|
7047
7047
|
}
|
|
7048
7048
|
function rh(r) {
|
|
7049
7049
|
return typeof r == "object" && "token" in r && "transform" in r;
|
|
7050
7050
|
}
|
|
7051
|
-
function
|
|
7051
|
+
function hv(r) {
|
|
7052
7052
|
return typeof r == "function" || r instanceof Kp;
|
|
7053
7053
|
}
|
|
7054
7054
|
function Do(r) {
|
|
@@ -7057,7 +7057,7 @@ function Do(r) {
|
|
|
7057
7057
|
function $o(r) {
|
|
7058
7058
|
return r.useValue != null;
|
|
7059
7059
|
}
|
|
7060
|
-
function
|
|
7060
|
+
function dv(r) {
|
|
7061
7061
|
return Gp(r) || $o(r) || Do(r) || ru(r);
|
|
7062
7062
|
}
|
|
7063
7063
|
var vf = function() {
|
|
@@ -7083,7 +7083,7 @@ var vf = function() {
|
|
|
7083
7083
|
}, r.prototype.ensure = function(e) {
|
|
7084
7084
|
this._registryMap.has(e) || this._registryMap.set(e, []);
|
|
7085
7085
|
}, r;
|
|
7086
|
-
}(),
|
|
7086
|
+
}(), pv = function(r) {
|
|
7087
7087
|
gf(e, r);
|
|
7088
7088
|
function e() {
|
|
7089
7089
|
return r !== null && r.apply(this, arguments) || this;
|
|
@@ -7095,54 +7095,54 @@ var vf = function() {
|
|
|
7095
7095
|
}
|
|
7096
7096
|
return r;
|
|
7097
7097
|
}();
|
|
7098
|
-
function
|
|
7098
|
+
function yv(r, e) {
|
|
7099
7099
|
if (r === null)
|
|
7100
7100
|
return "at position #" + e;
|
|
7101
7101
|
var t = r.split(",")[e].trim();
|
|
7102
7102
|
return '"' + t + '" at position #' + e;
|
|
7103
7103
|
}
|
|
7104
|
-
function
|
|
7104
|
+
function gv(r, e, t) {
|
|
7105
7105
|
return t === void 0 && (t = " "), ti([r], e.message.split(`
|
|
7106
7106
|
`).map(function(n) {
|
|
7107
7107
|
return t + n;
|
|
7108
7108
|
})).join(`
|
|
7109
7109
|
`);
|
|
7110
7110
|
}
|
|
7111
|
-
function
|
|
7112
|
-
var n = ma(r.toString().match(/constructor\(([\w, ]+)\)/) || [], 2), i = n[1], s = i === void 0 ? null : i, o =
|
|
7113
|
-
return
|
|
7111
|
+
function vv(r, e, t) {
|
|
7112
|
+
var n = ma(r.toString().match(/constructor\(([\w, ]+)\)/) || [], 2), i = n[1], s = i === void 0 ? null : i, o = yv(s, e);
|
|
7113
|
+
return gv("Cannot inject the dependency " + o + ' of "' + r.name + '" constructor. Reason:', t);
|
|
7114
7114
|
}
|
|
7115
|
-
function
|
|
7115
|
+
function mv(r) {
|
|
7116
7116
|
if (typeof r.dispose != "function")
|
|
7117
7117
|
return !1;
|
|
7118
7118
|
var e = r.dispose;
|
|
7119
7119
|
return !(e.length > 0);
|
|
7120
7120
|
}
|
|
7121
|
-
var
|
|
7121
|
+
var wv = function(r) {
|
|
7122
7122
|
gf(e, r);
|
|
7123
7123
|
function e() {
|
|
7124
7124
|
return r !== null && r.apply(this, arguments) || this;
|
|
7125
7125
|
}
|
|
7126
7126
|
return e;
|
|
7127
|
-
}(vf),
|
|
7127
|
+
}(vf), bv = function(r) {
|
|
7128
7128
|
gf(e, r);
|
|
7129
7129
|
function e() {
|
|
7130
7130
|
return r !== null && r.apply(this, arguments) || this;
|
|
7131
7131
|
}
|
|
7132
7132
|
return e;
|
|
7133
|
-
}(vf),
|
|
7133
|
+
}(vf), xv = /* @__PURE__ */ function() {
|
|
7134
7134
|
function r() {
|
|
7135
|
-
this.preResolution = new
|
|
7135
|
+
this.preResolution = new wv(), this.postResolution = new bv();
|
|
7136
7136
|
}
|
|
7137
7137
|
return r;
|
|
7138
|
-
}(), qp = /* @__PURE__ */ new Map(),
|
|
7138
|
+
}(), qp = /* @__PURE__ */ new Map(), Av = function() {
|
|
7139
7139
|
function r(e) {
|
|
7140
|
-
this.parent = e, this._registry = new
|
|
7140
|
+
this.parent = e, this._registry = new pv(), this.interceptors = new xv(), this.disposed = !1, this.disposables = /* @__PURE__ */ new Set();
|
|
7141
7141
|
}
|
|
7142
7142
|
return r.prototype.register = function(e, t, n) {
|
|
7143
7143
|
n === void 0 && (n = { lifecycle: dr.Transient }), this.ensureNotDisposed();
|
|
7144
7144
|
var i;
|
|
7145
|
-
if (
|
|
7145
|
+
if (dv(t) ? i = t : i = { useClass: t }, Do(i))
|
|
7146
7146
|
for (var s = [e], o = i; o != null; ) {
|
|
7147
7147
|
var c = o.useToken;
|
|
7148
7148
|
if (s.includes(c))
|
|
@@ -7189,7 +7189,7 @@ var vv = function(r) {
|
|
|
7189
7189
|
var i = this.resolveRegistration(n, t);
|
|
7190
7190
|
return this.executePostResolutionInterceptor(e, i, "Single"), i;
|
|
7191
7191
|
}
|
|
7192
|
-
if (
|
|
7192
|
+
if (hv(e)) {
|
|
7193
7193
|
var i = this.construct(e, t);
|
|
7194
7194
|
return this.executePostResolutionInterceptor(e, i, "Single"), i;
|
|
7195
7195
|
}
|
|
@@ -7316,9 +7316,9 @@ var vv = function(r) {
|
|
|
7316
7316
|
options: n
|
|
7317
7317
|
});
|
|
7318
7318
|
}, r.prototype.dispose = function() {
|
|
7319
|
-
return
|
|
7319
|
+
return av(this, void 0, void 0, function() {
|
|
7320
7320
|
var e;
|
|
7321
|
-
return
|
|
7321
|
+
return cv(this, function(t) {
|
|
7322
7322
|
switch (t.label) {
|
|
7323
7323
|
case 0:
|
|
7324
7324
|
return this.disposed = !0, e = [], this.disposables.forEach(function(n) {
|
|
@@ -7350,25 +7350,25 @@ var vv = function(r) {
|
|
|
7350
7350
|
var o = s.map(n.resolveParams(t, e));
|
|
7351
7351
|
return new (e.bind.apply(e, ti([void 0], o)))();
|
|
7352
7352
|
}();
|
|
7353
|
-
return
|
|
7353
|
+
return mv(i) && this.disposables.add(i), i;
|
|
7354
7354
|
}, r.prototype.resolveParams = function(e, t) {
|
|
7355
7355
|
var n = this;
|
|
7356
7356
|
return function(i, s) {
|
|
7357
7357
|
var o, c, u;
|
|
7358
7358
|
try {
|
|
7359
|
-
return
|
|
7359
|
+
return fv(i) ? rh(i) ? i.multiple ? (o = n.resolve(i.transform)).transform.apply(o, ti([n.resolveAll(i.token)], i.transformArgs)) : (c = n.resolve(i.transform)).transform.apply(c, ti([n.resolve(i.token, e)], i.transformArgs)) : i.multiple ? n.resolveAll(i.token) : n.resolve(i.token, e) : rh(i) ? (u = n.resolve(i.transform, e)).transform.apply(u, ti([n.resolve(i.token, e)], i.transformArgs)) : n.resolve(i, e);
|
|
7360
7360
|
} catch (h) {
|
|
7361
|
-
throw new Error(
|
|
7361
|
+
throw new Error(vv(t, s, h));
|
|
7362
7362
|
}
|
|
7363
7363
|
};
|
|
7364
7364
|
}, r.prototype.ensureNotDisposed = function() {
|
|
7365
7365
|
if (this.disposed)
|
|
7366
7366
|
throw new Error("This container has been disposed, you cannot interact with a disposed container");
|
|
7367
7367
|
}, r;
|
|
7368
|
-
}(), lr = new
|
|
7368
|
+
}(), lr = new Av();
|
|
7369
7369
|
function kc() {
|
|
7370
7370
|
return function(r) {
|
|
7371
|
-
qp.set(r,
|
|
7371
|
+
qp.set(r, uv(r));
|
|
7372
7372
|
};
|
|
7373
7373
|
}
|
|
7374
7374
|
if (typeof Reflect > "u" || !Reflect.getMetadata)
|
|
@@ -7800,7 +7800,7 @@ f([
|
|
|
7800
7800
|
*
|
|
7801
7801
|
*/
|
|
7802
7802
|
const ko = "crypto.algorithm";
|
|
7803
|
-
class
|
|
7803
|
+
class Sv {
|
|
7804
7804
|
getAlgorithms() {
|
|
7805
7805
|
return lr.resolveAll(ko);
|
|
7806
7806
|
}
|
|
@@ -7836,7 +7836,7 @@ class xv {
|
|
|
7836
7836
|
}
|
|
7837
7837
|
}
|
|
7838
7838
|
const Yi = "crypto.algorithmProvider";
|
|
7839
|
-
lr.registerSingleton(Yi,
|
|
7839
|
+
lr.registerSingleton(Yi, Sv);
|
|
7840
7840
|
var Mo;
|
|
7841
7841
|
const br = "1.3.36.3.3.2.8.1.1", Ah = `${br}.1`, Sh = `${br}.2`, _h = `${br}.3`, Eh = `${br}.4`, kh = `${br}.5`, Ih = `${br}.6`, Ch = `${br}.7`, Bh = `${br}.8`, Oh = `${br}.9`, Th = `${br}.10`, Nh = `${br}.11`, jh = `${br}.12`, Ph = `${br}.13`, Rh = `${br}.14`, Uh = "brainpoolP160r1", Dh = "brainpoolP160t1", $h = "brainpoolP192r1", Mh = "brainpoolP192t1", Vh = "brainpoolP224r1", Lh = "brainpoolP224t1", Hh = "brainpoolP256r1", Fh = "brainpoolP256t1", zh = "brainpoolP320r1", Gh = "brainpoolP320t1", Kh = "brainpoolP384r1", qh = "brainpoolP384t1", Zh = "brainpoolP512r1", Wh = "brainpoolP512t1", kt = "ECDSA";
|
|
7842
7842
|
let zs = Mo = class {
|
|
@@ -7846,13 +7846,13 @@ let zs = Mo = class {
|
|
|
7846
7846
|
if ("hash" in e)
|
|
7847
7847
|
switch ((typeof e.hash == "string" ? e.hash : e.hash.name).toLowerCase()) {
|
|
7848
7848
|
case "sha-1":
|
|
7849
|
-
return
|
|
7849
|
+
return qg;
|
|
7850
7850
|
case "sha-256":
|
|
7851
|
-
return
|
|
7851
|
+
return Zg;
|
|
7852
7852
|
case "sha-384":
|
|
7853
|
-
return
|
|
7853
|
+
return Wg;
|
|
7854
7854
|
case "sha-512":
|
|
7855
|
-
return
|
|
7855
|
+
return Yg;
|
|
7856
7856
|
}
|
|
7857
7857
|
else if ("namedCurve" in e) {
|
|
7858
7858
|
let t = "";
|
|
@@ -7992,7 +7992,7 @@ class Qe {
|
|
|
7992
7992
|
}
|
|
7993
7993
|
Qe.NAME = t0;
|
|
7994
7994
|
Qe.VALUE = r0;
|
|
7995
|
-
class
|
|
7995
|
+
class _v {
|
|
7996
7996
|
static toTextObject(e) {
|
|
7997
7997
|
const t = new Qe("Algorithm Identifier", {}, Bn.toString(e.algorithm));
|
|
7998
7998
|
if (e.parameters)
|
|
@@ -8022,7 +8022,7 @@ Bn.items = {
|
|
|
8022
8022
|
[va]: "sha512",
|
|
8023
8023
|
[gi]: "rsaEncryption",
|
|
8024
8024
|
[fa]: "sha1WithRSAEncryption",
|
|
8025
|
-
[
|
|
8025
|
+
[rv]: "sha224WithRSAEncryption",
|
|
8026
8026
|
[Jl]: "sha256WithRSAEncryption",
|
|
8027
8027
|
[ha]: "sha384WithRSAEncryption",
|
|
8028
8028
|
[da]: "sha512WithRSAEncryption",
|
|
@@ -8032,12 +8032,12 @@ Bn.items = {
|
|
|
8032
8032
|
[hf]: "ecdsaWithSHA256",
|
|
8033
8033
|
[df]: "ecdsaWithSHA384",
|
|
8034
8034
|
[pf]: "ecdsaWithSHA512",
|
|
8035
|
-
[
|
|
8036
|
-
[
|
|
8037
|
-
[
|
|
8038
|
-
[
|
|
8039
|
-
[
|
|
8040
|
-
[
|
|
8035
|
+
[Vg]: "TLS WWW server authentication",
|
|
8036
|
+
[Lg]: "TLS WWW client authentication",
|
|
8037
|
+
[Hg]: "Code Signing",
|
|
8038
|
+
[Fg]: "E-mail Protection",
|
|
8039
|
+
[zg]: "Time Stamping",
|
|
8040
|
+
[Gg]: "OCSP Signing",
|
|
8041
8041
|
[Zl]: "Signed Data"
|
|
8042
8042
|
};
|
|
8043
8043
|
class Gn {
|
|
@@ -8094,7 +8094,7 @@ class Gn {
|
|
|
8094
8094
|
}
|
|
8095
8095
|
}
|
|
8096
8096
|
Gn.oidSerializer = Bn;
|
|
8097
|
-
Gn.algorithmSerializer =
|
|
8097
|
+
Gn.algorithmSerializer = _v;
|
|
8098
8098
|
class Jn {
|
|
8099
8099
|
constructor(...e) {
|
|
8100
8100
|
if (e.length === 1) {
|
|
@@ -8213,9 +8213,9 @@ class Dn {
|
|
|
8213
8213
|
}
|
|
8214
8214
|
n0 = Symbol.toStringTag;
|
|
8215
8215
|
Dn.DEFAULT = "default";
|
|
8216
|
-
const Zt = new Dn(),
|
|
8217
|
-
function
|
|
8218
|
-
return new RegExp(
|
|
8216
|
+
const Zt = new Dn(), Ev = /^[0-2](?:\.[1-9][0-9]*)+$/;
|
|
8217
|
+
function kv(r) {
|
|
8218
|
+
return new RegExp(Ev).test(r);
|
|
8219
8219
|
}
|
|
8220
8220
|
class i0 {
|
|
8221
8221
|
constructor(e = {}) {
|
|
@@ -8227,7 +8227,7 @@ class i0 {
|
|
|
8227
8227
|
return this.items[e] || null;
|
|
8228
8228
|
}
|
|
8229
8229
|
findId(e) {
|
|
8230
|
-
return
|
|
8230
|
+
return kv(e) ? e : this.get(e);
|
|
8231
8231
|
}
|
|
8232
8232
|
register(e, t) {
|
|
8233
8233
|
this.items[e] = t, this.items[t] = e;
|
|
@@ -8246,11 +8246,11 @@ mr.register("G", "2.5.4.42");
|
|
|
8246
8246
|
mr.register("I", "2.5.4.43");
|
|
8247
8247
|
mr.register("SN", "2.5.4.4");
|
|
8248
8248
|
mr.register("T", "2.5.4.12");
|
|
8249
|
-
function
|
|
8249
|
+
function Iv(r, e) {
|
|
8250
8250
|
return `\\${de.ToHex(de.FromUtf8String(e)).toUpperCase()}`;
|
|
8251
8251
|
}
|
|
8252
|
-
function
|
|
8253
|
-
return r.replace(/([,+"\\<>;])/g, "\\$1").replace(/^([ #])/, "\\$1").replace(/([ ]$)/, "\\$1").replace(/([\r\n\t])/,
|
|
8252
|
+
function Cv(r) {
|
|
8253
|
+
return r.replace(/([,+"\\<>;])/g, "\\$1").replace(/^([ #])/, "\\$1").replace(/([ ]$)/, "\\$1").replace(/([\r\n\t])/, Iv);
|
|
8254
8254
|
}
|
|
8255
8255
|
class Hn {
|
|
8256
8256
|
static isASCII(e) {
|
|
@@ -8283,7 +8283,7 @@ class Hn {
|
|
|
8283
8283
|
}
|
|
8284
8284
|
toString() {
|
|
8285
8285
|
return this.asn.map((e) => e.map((t) => {
|
|
8286
|
-
const n = this.getName(t.type) || t.type, i = t.value.anyValue ? `#${de.ToHex(t.value.anyValue)}` :
|
|
8286
|
+
const n = this.getName(t.type) || t.type, i = t.value.anyValue ? `#${de.ToHex(t.value.anyValue)}` : Cv(t.value.toString());
|
|
8287
8287
|
return `${n}=${i}`;
|
|
8288
8288
|
}).join("+")).join(", ");
|
|
8289
8289
|
}
|
|
@@ -8377,7 +8377,7 @@ class Hn {
|
|
|
8377
8377
|
return e.length >= 1 && !(!((t = e[0]) === null || t === void 0) && t.subtle) ? (i = e[0] || i, n = e[1] || Zt.get()) : n = e[0] || Zt.get(), await n.subtle.digest(i, this.toArrayBuffer());
|
|
8378
8378
|
}
|
|
8379
8379
|
}
|
|
8380
|
-
const s0 = "Cannot initialize GeneralName from ASN.1 data.", Yh = `${s0} Unsupported string format in use.`,
|
|
8380
|
+
const s0 = "Cannot initialize GeneralName from ASN.1 data.", Yh = `${s0} Unsupported string format in use.`, Bv = `${s0} Value doesn't match to GUID regular expression.`, Jh = /^([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})$/i, Xh = "1.3.6.1.4.1.311.25.1", Qh = "1.3.6.1.4.1.311.20.2.3", Fc = "dns", zc = "dn", Gc = "email", Kc = "ip", qc = "url", Zc = "guid", Wc = "upn", No = "id";
|
|
8381
8381
|
class $n extends Jn {
|
|
8382
8382
|
constructor(...e) {
|
|
8383
8383
|
let t;
|
|
@@ -8449,7 +8449,7 @@ class $n extends Jn {
|
|
|
8449
8449
|
this.type = Zc;
|
|
8450
8450
|
const t = q.parse(e.otherName.value, et), n = new RegExp(Jh, "i").exec(de.ToHex(t));
|
|
8451
8451
|
if (!n)
|
|
8452
|
-
throw new Error(
|
|
8452
|
+
throw new Error(Bv);
|
|
8453
8453
|
this.value = n.slice(1).map((i, s) => s < 3 ? de.ToHex(new Uint8Array(de.FromHex(i)).reverse()) : i).join("-");
|
|
8454
8454
|
} else if (e.otherName.typeId === Qh)
|
|
8455
8455
|
this.type = Wc, this.value = q.parse(e.otherName.value, Xt).toString();
|
|
@@ -8534,7 +8534,7 @@ class Gs extends Jn {
|
|
|
8534
8534
|
}
|
|
8535
8535
|
}
|
|
8536
8536
|
Gs.NAME = "GeneralNames";
|
|
8537
|
-
const Ps = "-{5}", Ks = "\\n",
|
|
8537
|
+
const Ps = "-{5}", Ks = "\\n", Ov = `[^${Ks}]+`, Tv = `${Ps}BEGIN (${Ov}(?=${Ps}))${Ps}`, Nv = `${Ps}END \\1${Ps}`, Ji = "\\n", jv = `[^:${Ks}]+`, Pv = `(?:[^${Ks}]+${Ji}(?: +[^${Ks}]+${Ji})*)`, Rv = "[a-zA-Z0-9=+/]+", Uv = `(?:${Rv}${Ji})+`, ed = `${Tv}${Ji}(?:((?:${jv}: ${Pv})+))?${Ji}?(${Uv})${Nv}`;
|
|
8538
8538
|
class gr {
|
|
8539
8539
|
static isPem(e) {
|
|
8540
8540
|
return typeof e == "string" && new RegExp(ed, "g").test(e);
|
|
@@ -8681,7 +8681,7 @@ class sn extends Fr {
|
|
|
8681
8681
|
e.length > 1 ? (i = e[0] || i, n = e[1] || n, t = e[2] || Zt.get()) : t = e[0] || Zt.get();
|
|
8682
8682
|
let s = this.rawData;
|
|
8683
8683
|
const o = q.parse(this.rawData, rn);
|
|
8684
|
-
return o.algorithm.algorithm === js && (s =
|
|
8684
|
+
return o.algorithm.algorithm === js && (s = Dv(o, s)), t.subtle.importKey("spki", s, i, !0, n);
|
|
8685
8685
|
}
|
|
8686
8686
|
onInit(e) {
|
|
8687
8687
|
const t = lr.resolve(Yi), n = this.algorithm = t.toWebAlgorithm(e.algorithm);
|
|
@@ -8717,7 +8717,7 @@ class sn extends Fr {
|
|
|
8717
8717
|
return e;
|
|
8718
8718
|
}
|
|
8719
8719
|
}
|
|
8720
|
-
function
|
|
8720
|
+
function Dv(r, e) {
|
|
8721
8721
|
return r.algorithm = new oe({
|
|
8722
8722
|
algorithm: gi,
|
|
8723
8723
|
parameters: null
|
|
@@ -9068,7 +9068,7 @@ class Nc {
|
|
|
9068
9068
|
}
|
|
9069
9069
|
Nc.items = /* @__PURE__ */ new Map();
|
|
9070
9070
|
const jc = "crypto.signatureFormatter";
|
|
9071
|
-
class
|
|
9071
|
+
class $v {
|
|
9072
9072
|
toAsnSignature(e, t) {
|
|
9073
9073
|
return W.toArrayBuffer(t);
|
|
9074
9074
|
}
|
|
@@ -9220,7 +9220,7 @@ class Or {
|
|
|
9220
9220
|
toWebSignature(e, t) {
|
|
9221
9221
|
if (e.name === "ECDSA") {
|
|
9222
9222
|
const n = q.parse(t, ua), i = e.namedCurve, s = Or.namedCurveSize.get(i) || Or.defaultNamedCurveSize, o = this.addPadding(s, this.removePadding(n.r)), c = this.addPadding(s, this.removePadding(n.s));
|
|
9223
|
-
return
|
|
9223
|
+
return Jy(o, c);
|
|
9224
9224
|
}
|
|
9225
9225
|
return null;
|
|
9226
9226
|
}
|
|
@@ -9280,7 +9280,7 @@ Au = f([
|
|
|
9280
9280
|
kc()
|
|
9281
9281
|
], Au);
|
|
9282
9282
|
lr.registerSingleton(ko, Au);
|
|
9283
|
-
class
|
|
9283
|
+
class Mv extends Fr {
|
|
9284
9284
|
constructor(e) {
|
|
9285
9285
|
Fr.isAsnEncoded(e) ? super(e, Fs) : super(e), this.tag = gr.CertificateRequestTag;
|
|
9286
9286
|
}
|
|
@@ -9339,7 +9339,7 @@ class Dv extends Fr {
|
|
|
9339
9339
|
}), e;
|
|
9340
9340
|
}
|
|
9341
9341
|
}
|
|
9342
|
-
|
|
9342
|
+
Mv.NAME = "PKCS#10 Certificate Request";
|
|
9343
9343
|
class wi extends Fr {
|
|
9344
9344
|
constructor(e) {
|
|
9345
9345
|
Fr.isAsnEncoded(e) ? super(e, di) : super(e), this.tag = gr.CertificateTag;
|
|
@@ -9438,7 +9438,7 @@ class wi extends Fr {
|
|
|
9438
9438
|
}
|
|
9439
9439
|
}
|
|
9440
9440
|
wi.NAME = "Certificate";
|
|
9441
|
-
class
|
|
9441
|
+
class Vv extends Array {
|
|
9442
9442
|
constructor(e) {
|
|
9443
9443
|
if (super(), Fr.isAsnEncoded(e))
|
|
9444
9444
|
this.import(e);
|
|
@@ -9450,7 +9450,7 @@ class $v extends Array {
|
|
|
9450
9450
|
}
|
|
9451
9451
|
export(e) {
|
|
9452
9452
|
const t = new xn();
|
|
9453
|
-
t.version = 1, t.encapContentInfo.eContentType =
|
|
9453
|
+
t.version = 1, t.encapContentInfo.eContentType = Kg, t.encapContentInfo.eContent = new Ki({
|
|
9454
9454
|
single: new et()
|
|
9455
9455
|
}), t.certificates = new Ms(this.map((s) => new pi({
|
|
9456
9456
|
certificate: q.parse(s.rawData, di)
|
|
@@ -9507,12 +9507,12 @@ class $v extends Array {
|
|
|
9507
9507
|
});
|
|
9508
9508
|
}
|
|
9509
9509
|
}
|
|
9510
|
-
class
|
|
9510
|
+
class Lv {
|
|
9511
9511
|
constructor(e = {}) {
|
|
9512
9512
|
this.certificates = [], e.certificates && (this.certificates = e.certificates);
|
|
9513
9513
|
}
|
|
9514
9514
|
async build(e, t = Zt.get()) {
|
|
9515
|
-
const n = new
|
|
9515
|
+
const n = new Vv(e);
|
|
9516
9516
|
let i = e;
|
|
9517
9517
|
for (; i = await this.findIssuer(i, t); ) {
|
|
9518
9518
|
const s = await i.getThumbprint(t);
|
|
@@ -9568,7 +9568,7 @@ Pr.register(wl, f0);
|
|
|
9568
9568
|
Pr.register(pl, h0);
|
|
9569
9569
|
Nc.register(e0, d0);
|
|
9570
9570
|
Nc.register(mf, wf);
|
|
9571
|
-
lr.registerSingleton(jc,
|
|
9571
|
+
lr.registerSingleton(jc, $v);
|
|
9572
9572
|
lr.registerSingleton(jc, Or);
|
|
9573
9573
|
Or.namedCurveSize.set("P-256", 32);
|
|
9574
9574
|
Or.namedCurveSize.set("K-256", 32);
|
|
@@ -9580,7 +9580,7 @@ let Er = (Es = class {
|
|
|
9580
9580
|
}, Ve(Es, "BREAK", Symbol.for("github.com/hildjj/cbor2/break")), Ve(Es, "ENCODED", Symbol.for("github.com/hildjj/cbor2/cbor-encoded")), Ve(Es, "LENGTH", Symbol.for("github.com/hildjj/cbor2/length")), Es);
|
|
9581
9581
|
const Sa = { MIN: -(2n ** 63n), MAX: 2n ** 64n - 1n };
|
|
9582
9582
|
var vn, Qr;
|
|
9583
|
-
let
|
|
9583
|
+
let Ze = (vn = class {
|
|
9584
9584
|
constructor(e, t = void 0) {
|
|
9585
9585
|
Ve(this, "tag");
|
|
9586
9586
|
Ve(this, "contents");
|
|
@@ -9622,7 +9622,7 @@ let qe = (vn = class {
|
|
|
9622
9622
|
function _a(r) {
|
|
9623
9623
|
if (r != null && typeof r == "object") return r[Er.ENCODED];
|
|
9624
9624
|
}
|
|
9625
|
-
function
|
|
9625
|
+
function Hv(r) {
|
|
9626
9626
|
if (r != null && typeof r == "object") return r[Er.LENGTH];
|
|
9627
9627
|
}
|
|
9628
9628
|
function Zs(r, e) {
|
|
@@ -9642,7 +9642,7 @@ function p0(r) {
|
|
|
9642
9642
|
function Vr(r) {
|
|
9643
9643
|
return r.reduce((e, t) => e + t.toString(16).padStart(2, "0"), "");
|
|
9644
9644
|
}
|
|
9645
|
-
function
|
|
9645
|
+
function Fv(r) {
|
|
9646
9646
|
const e = r.reduce((i, s) => i + s.length, 0), t = new Uint8Array(e);
|
|
9647
9647
|
let n = 0;
|
|
9648
9648
|
for (const i of r) t.set(i, n), n += i.length;
|
|
@@ -9652,12 +9652,12 @@ function bf(r) {
|
|
|
9652
9652
|
const e = atob(r);
|
|
9653
9653
|
return Uint8Array.from(e, (t) => t.codePointAt(0));
|
|
9654
9654
|
}
|
|
9655
|
-
const
|
|
9656
|
-
function
|
|
9657
|
-
const e = r.replace(/[_-]/g, (t) =>
|
|
9655
|
+
const zv = { "-": "+", _: "/" };
|
|
9656
|
+
function Gv(r) {
|
|
9657
|
+
const e = r.replace(/[_-]/g, (t) => zv[t]);
|
|
9658
9658
|
return bf(e.padEnd(Math.ceil(e.length / 4) * 4, "="));
|
|
9659
9659
|
}
|
|
9660
|
-
function
|
|
9660
|
+
function Kv() {
|
|
9661
9661
|
const r = new Uint8Array(4), e = new Uint32Array(r.buffer);
|
|
9662
9662
|
return !((e[0] = 1) & r[0]);
|
|
9663
9663
|
}
|
|
@@ -9762,7 +9762,7 @@ function g0(r, e = 0, t = !1) {
|
|
|
9762
9762
|
} else if (i === 31) return s ? NaN : n * (1 / 0);
|
|
9763
9763
|
return n * 2 ** (i - 25) * (1024 + s);
|
|
9764
9764
|
}
|
|
9765
|
-
function
|
|
9765
|
+
function qv(r) {
|
|
9766
9766
|
const e = new DataView(new ArrayBuffer(4));
|
|
9767
9767
|
e.setFloat32(0, r, !1);
|
|
9768
9768
|
const t = e.getUint32(0, !1);
|
|
@@ -9777,7 +9777,7 @@ function Gv(r) {
|
|
|
9777
9777
|
else return null;
|
|
9778
9778
|
return n;
|
|
9779
9779
|
}
|
|
9780
|
-
function
|
|
9780
|
+
function Zv(r) {
|
|
9781
9781
|
if (r !== 0) {
|
|
9782
9782
|
const e = new ArrayBuffer(8), t = new DataView(e);
|
|
9783
9783
|
t.setFloat64(0, r, !1);
|
|
@@ -9786,7 +9786,7 @@ function Kv(r) {
|
|
|
9786
9786
|
}
|
|
9787
9787
|
return r;
|
|
9788
9788
|
}
|
|
9789
|
-
function
|
|
9789
|
+
function Wv(r) {
|
|
9790
9790
|
switch (r.length) {
|
|
9791
9791
|
case 2:
|
|
9792
9792
|
g0(r, 0, !0);
|
|
@@ -9805,7 +9805,7 @@ function qv(r) {
|
|
|
9805
9805
|
throw new TypeError(`Bad input to isSubnormal: ${r}`);
|
|
9806
9806
|
}
|
|
9807
9807
|
}
|
|
9808
|
-
const ad = we.SIMPLE_FLOAT << 5 | mt.TWO,
|
|
9808
|
+
const ad = we.SIMPLE_FLOAT << 5 | mt.TWO, Yv = we.SIMPLE_FLOAT << 5 | mt.FOUR, Jv = we.SIMPLE_FLOAT << 5 | mt.EIGHT, Xv = we.SIMPLE_FLOAT << 5 | Mn.TRUE, Qv = we.SIMPLE_FLOAT << 5 | Mn.FALSE, e1 = we.SIMPLE_FLOAT << 5 | Mn.UNDEFINED, t1 = we.SIMPLE_FLOAT << 5 | Mn.NULL, r1 = new TextEncoder(), n1 = { ...Ea.defaultOptions, avoidInts: !1, cde: !1, collapseBigInts: !0, dcbor: !1, float64: !1, flushToZero: !1, forceEndian: null, ignoreOriginalEncoding: !1, largeNegativeAsBigInt: !1, reduceUnsafeNumbers: !1, rejectBigInts: !1, rejectCustomSimples: !1, rejectDuplicateKeys: !1, rejectFloats: !1, rejectUndefined: !1, simplifyNegativeZero: !1, sortKeys: null, stringNormalization: null }, v0 = { cde: !0, ignoreOriginalEncoding: !0, sortKeys: y0 }, i1 = { ...v0, dcbor: !0, largeNegativeAsBigInt: !0, reduceUnsafeNumbers: !0, rejectCustomSimples: !0, rejectDuplicateKeys: !0, rejectUndefined: !0, simplifyNegativeZero: !0, stringNormalization: "NFC" };
|
|
9809
9809
|
function m0(r) {
|
|
9810
9810
|
const e = r < 0;
|
|
9811
9811
|
return typeof r == "bigint" ? [e ? -r - 1n : r, e] : [e ? -r - 1 : r, e];
|
|
@@ -9814,9 +9814,9 @@ function Xc(r, e, t) {
|
|
|
9814
9814
|
if (t.rejectFloats) throw new Error(`Attempt to encode an unwanted floating point number: ${r}`);
|
|
9815
9815
|
if (isNaN(r)) e.writeUint8(ad), e.writeUint16(32256);
|
|
9816
9816
|
else if (!t.float64 && Math.fround(r) === r) {
|
|
9817
|
-
const n =
|
|
9818
|
-
n === null ? (e.writeUint8(
|
|
9819
|
-
} else e.writeUint8(
|
|
9817
|
+
const n = qv(r);
|
|
9818
|
+
n === null ? (e.writeUint8(Yv), e.writeFloat32(r)) : (e.writeUint8(ad), e.writeUint16(n));
|
|
9819
|
+
} else e.writeUint8(Jv), e.writeFloat64(r);
|
|
9820
9820
|
}
|
|
9821
9821
|
function zr(r, e, t) {
|
|
9822
9822
|
const [n, i] = m0(r);
|
|
@@ -9845,34 +9845,34 @@ function w0(r, e, t) {
|
|
|
9845
9845
|
const u = p0(c + o);
|
|
9846
9846
|
zr(u.length, e, we.BYTE_STRING), e.write(u);
|
|
9847
9847
|
}
|
|
9848
|
-
function
|
|
9849
|
-
t.flushToZero && (r =
|
|
9848
|
+
function s1(r, e, t) {
|
|
9849
|
+
t.flushToZero && (r = Zv(r)), Object.is(r, -0) ? t.simplifyNegativeZero ? t.avoidInts ? Xc(0, e, t) : zr(0, e) : Xc(r, e, t) : !t.avoidInts && Number.isSafeInteger(r) ? zr(r, e) : t.reduceUnsafeNumbers && Math.floor(r) === r && r >= Sa.MIN && r <= Sa.MAX ? w0(BigInt(r), e, t) : Xc(r, e, t);
|
|
9850
9850
|
}
|
|
9851
|
-
function
|
|
9852
|
-
const n = t.stringNormalization ? r.normalize(t.stringNormalization) : r, i =
|
|
9851
|
+
function o1(r, e, t) {
|
|
9852
|
+
const n = t.stringNormalization ? r.normalize(t.stringNormalization) : r, i = r1.encode(n);
|
|
9853
9853
|
zr(i.length, e, we.UTF8_STRING), e.write(i);
|
|
9854
9854
|
}
|
|
9855
|
-
function
|
|
9855
|
+
function a1(r, e, t) {
|
|
9856
9856
|
const n = r;
|
|
9857
9857
|
xf(n, n.length, we.ARRAY, e, t);
|
|
9858
9858
|
for (const i of n) ii(i, e, t);
|
|
9859
9859
|
}
|
|
9860
|
-
function
|
|
9860
|
+
function c1(r, e) {
|
|
9861
9861
|
const t = r;
|
|
9862
9862
|
zr(t.length, e, we.BYTE_STRING), e.write(t);
|
|
9863
9863
|
}
|
|
9864
|
-
const _u = /* @__PURE__ */ new Map([[Array,
|
|
9864
|
+
const _u = /* @__PURE__ */ new Map([[Array, a1], [Uint8Array, c1]]);
|
|
9865
9865
|
function Pt(r, e) {
|
|
9866
9866
|
const t = _u.get(r);
|
|
9867
9867
|
return _u.set(r, e), t;
|
|
9868
9868
|
}
|
|
9869
9869
|
function xf(r, e, t, n, i) {
|
|
9870
|
-
const s =
|
|
9870
|
+
const s = Hv(r);
|
|
9871
9871
|
s && !i.ignoreOriginalEncoding ? n.write(s) : zr(e, n, t);
|
|
9872
9872
|
}
|
|
9873
|
-
function
|
|
9873
|
+
function l1(r, e, t) {
|
|
9874
9874
|
if (r === null) {
|
|
9875
|
-
e.writeUint8(
|
|
9875
|
+
e.writeUint8(t1);
|
|
9876
9876
|
return;
|
|
9877
9877
|
}
|
|
9878
9878
|
if (!t.ignoreOriginalEncoding && Er.ENCODED in r) {
|
|
@@ -9901,23 +9901,23 @@ function a1(r, e, t) {
|
|
|
9901
9901
|
function ii(r, e, t) {
|
|
9902
9902
|
switch (typeof r) {
|
|
9903
9903
|
case "number":
|
|
9904
|
-
|
|
9904
|
+
s1(r, e, t);
|
|
9905
9905
|
break;
|
|
9906
9906
|
case "bigint":
|
|
9907
9907
|
w0(r, e, t);
|
|
9908
9908
|
break;
|
|
9909
9909
|
case "string":
|
|
9910
|
-
|
|
9910
|
+
o1(r, e, t);
|
|
9911
9911
|
break;
|
|
9912
9912
|
case "boolean":
|
|
9913
|
-
e.writeUint8(r ?
|
|
9913
|
+
e.writeUint8(r ? Xv : Qv);
|
|
9914
9914
|
break;
|
|
9915
9915
|
case "undefined":
|
|
9916
9916
|
if (t.rejectUndefined) throw new Error("Attempt to encode unwanted undefined.");
|
|
9917
|
-
e.writeUint8(
|
|
9917
|
+
e.writeUint8(e1);
|
|
9918
9918
|
break;
|
|
9919
9919
|
case "object":
|
|
9920
|
-
|
|
9920
|
+
l1(r, e, t);
|
|
9921
9921
|
break;
|
|
9922
9922
|
case "symbol":
|
|
9923
9923
|
throw new TypeError(`Unknown symbol: ${r.toString()}`);
|
|
@@ -9926,8 +9926,8 @@ function ii(r, e, t) {
|
|
|
9926
9926
|
}
|
|
9927
9927
|
}
|
|
9928
9928
|
function Pc(r, e = {}) {
|
|
9929
|
-
const t = { ...
|
|
9930
|
-
e.dcbor ? Object.assign(t,
|
|
9929
|
+
const t = { ...n1 };
|
|
9930
|
+
e.dcbor ? Object.assign(t, i1) : e.cde && Object.assign(t, v0), Object.assign(t, e);
|
|
9931
9931
|
const n = new Ea(t);
|
|
9932
9932
|
return ii(r, n, t), n.read();
|
|
9933
9933
|
}
|
|
@@ -9956,7 +9956,7 @@ const Tn = class Tn {
|
|
|
9956
9956
|
};
|
|
9957
9957
|
Ve(Tn, "KnownSimple", /* @__PURE__ */ new Map([[Mn.FALSE, !1], [Mn.TRUE, !0], [Mn.NULL, null], [Mn.UNDEFINED, void 0]]));
|
|
9958
9958
|
let Ws = Tn;
|
|
9959
|
-
const
|
|
9959
|
+
const u1 = new TextDecoder("utf8", { fatal: !0, ignoreBOM: !0 });
|
|
9960
9960
|
var Ar, Dr, qt, Ir, Wt, ei, Eu, Is;
|
|
9961
9961
|
const Va = class Va {
|
|
9962
9962
|
constructor(e, t) {
|
|
@@ -10039,7 +10039,7 @@ Ar = new WeakMap(), Dr = new WeakMap(), qt = new WeakMap(), Ir = new WeakMap(),
|
|
|
10039
10039
|
o === 1 / 0 ? yield* Re(this, Wt, Is).call(this, i, e, t) : yield [i, s, Re(this, Wt, Eu).call(this, o), t, o];
|
|
10040
10040
|
break;
|
|
10041
10041
|
case we.UTF8_STRING:
|
|
10042
|
-
o === 1 / 0 ? yield* Re(this, Wt, Is).call(this, i, e, t) : yield [i, s,
|
|
10042
|
+
o === 1 / 0 ? yield* Re(this, Wt, Is).call(this, i, e, t) : yield [i, s, u1.decode(Re(this, Wt, Eu).call(this, o)), t, o];
|
|
10043
10043
|
break;
|
|
10044
10044
|
case we.ARRAY:
|
|
10045
10045
|
if (o === 1 / 0) yield* Re(this, Wt, Is).call(this, i, e, t, !1);
|
|
@@ -10085,7 +10085,7 @@ Ar = new WeakMap(), Dr = new WeakMap(), qt = new WeakMap(), Ir = new WeakMap(),
|
|
|
10085
10085
|
}
|
|
10086
10086
|
}, Ve(Va, "defaultOptions", { maxDepth: 1024, encoding: "hex", requirePreferred: !1 });
|
|
10087
10087
|
let Ys = Va;
|
|
10088
|
-
const
|
|
10088
|
+
const f1 = /* @__PURE__ */ new Map([[mt.ZERO, 1], [mt.ONE, 2], [mt.TWO, 3], [mt.FOUR, 5], [mt.EIGHT, 9]]), h1 = new Uint8Array(0);
|
|
10089
10089
|
var tn, ar, en, La, x0;
|
|
10090
10090
|
let Nn = (tn = class {
|
|
10091
10091
|
constructor(e, t, n, i) {
|
|
@@ -10126,10 +10126,10 @@ let Nn = (tn = class {
|
|
|
10126
10126
|
const h = i.toHere(u);
|
|
10127
10127
|
if (h.length !== 3 || h[1] !== 126 || h[2] !== 0) throw new Error(`Invalid NaN encoding: "${Vr(h)}"`);
|
|
10128
10128
|
}
|
|
10129
|
-
if (n.rejectSubnormals &&
|
|
10129
|
+
if (n.rejectSubnormals && Wv(i.toHere(u + 1)), n.rejectLongFloats) {
|
|
10130
10130
|
const h = Pc(c, { chunkSize: 9, reduceUnsafeNumbers: n.rejectUnsafeFloatInts });
|
|
10131
10131
|
if (h[0] >> 5 !== s) throw new Error(`Should have been encoded as int, not float: ${c}`);
|
|
10132
|
-
if (h.length <
|
|
10132
|
+
if (h.length < f1.get(o)) throw new Error(`Number should have been encoded shorter: ${c}`);
|
|
10133
10133
|
}
|
|
10134
10134
|
if (typeof c == "number" && n.boxed) return ks(c, i.toHere(u));
|
|
10135
10135
|
} else {
|
|
@@ -10151,7 +10151,7 @@ let Nn = (tn = class {
|
|
|
10151
10151
|
return new n.ParentType(e, c * 2, t, n);
|
|
10152
10152
|
case we.TAG: {
|
|
10153
10153
|
const h = new n.ParentType(e, 1, t, n);
|
|
10154
|
-
return h.children = new
|
|
10154
|
+
return h.children = new Ze(c), h;
|
|
10155
10155
|
}
|
|
10156
10156
|
}
|
|
10157
10157
|
throw new TypeError(`Invalid major type: ${s}`);
|
|
@@ -10165,7 +10165,7 @@ let Nn = (tn = class {
|
|
|
10165
10165
|
}
|
|
10166
10166
|
replaceLast(e, t, n) {
|
|
10167
10167
|
let i, s = -1 / 0;
|
|
10168
|
-
if (this.children instanceof
|
|
10168
|
+
if (this.children instanceof Ze ? (s = 0, i = this.children.contents, this.children.contents = e) : (s = this.children.length - 1, i = this.children[s], this.children[s] = e), $(this, en)) {
|
|
10169
10169
|
const o = _a(e) || n.toHere(t.offset);
|
|
10170
10170
|
$(this, en)[s] = o;
|
|
10171
10171
|
}
|
|
@@ -10197,7 +10197,7 @@ let Nn = (tn = class {
|
|
|
10197
10197
|
break;
|
|
10198
10198
|
}
|
|
10199
10199
|
case we.BYTE_STRING:
|
|
10200
|
-
return
|
|
10200
|
+
return Fv(this.children);
|
|
10201
10201
|
case we.UTF8_STRING: {
|
|
10202
10202
|
const n = this.children.join("");
|
|
10203
10203
|
t = $(this, ar).boxed ? ks(n, e.toHere(this.offset)) : n;
|
|
@@ -10216,7 +10216,7 @@ let Nn = (tn = class {
|
|
|
10216
10216
|
if (t % 2) throw new Error("Missing map value");
|
|
10217
10217
|
const n = new Array(t / 2);
|
|
10218
10218
|
if ($(this, en)) for (let i = 0; i < t; i += 2) n[i >> 1] = [e[i], e[i + 1], $(this, en)[i]];
|
|
10219
|
-
else for (let i = 0; i < t; i += 2) n[i >> 1] = [e[i], e[i + 1],
|
|
10219
|
+
else for (let i = 0; i < t; i += 2) n[i >> 1] = [e[i], e[i + 1], h1];
|
|
10220
10220
|
return n;
|
|
10221
10221
|
}, Ve(tn, "defaultDecodeOptions", { ...Ys.defaultOptions, ParentType: tn, boxed: !1, cde: !1, dcbor: !1, diagnosticSizes: b0.PREFERRED, convertUnsafeIntsToFloat: !1, pretty: !1, preferMap: !1, rejectLargeNegatives: !1, rejectBigInts: !1, rejectDuplicateKeys: !1, rejectFloats: !1, rejectInts: !1, rejectLongLoundNaN: !1, rejectLongFloats: !1, rejectNegativeZero: !1, rejectSimple: !1, rejectStreaming: !1, rejectStringsNotNormalizedAs: null, rejectSubnormals: !1, rejectUndefined: !1, rejectUnsafeFloatInts: !1, saveOriginal: !1, sortKeys: null }), Ve(tn, "cdeDecodeOptions", { cde: !0, rejectStreaming: !0, requirePreferred: !0, sortKeys: y0 }), Ve(tn, "dcborDecodeOptions", { ...tn.cdeDecodeOptions, dcbor: !0, convertUnsafeIntsToFloat: !0, rejectDuplicateKeys: !0, rejectLargeNegatives: !0, rejectLongLoundNaN: !0, rejectLongFloats: !0, rejectNegativeZero: !0, rejectSimple: !0, rejectUndefined: !0, rejectUnsafeFloatInts: !0, rejectStringsNotNormalizedAs: "NFC" }), tn);
|
|
10222
10222
|
var yd, gd;
|
|
@@ -10283,7 +10283,7 @@ function S0(r, e, t) {
|
|
|
10283
10283
|
break;
|
|
10284
10284
|
case we.TAG: {
|
|
10285
10285
|
n += `Tag #${r.value}`;
|
|
10286
|
-
const u = r.children, [h] = u.contents.children, m = new
|
|
10286
|
+
const u = r.children, [h] = u.contents.children, m = new Ze(u.tag, h);
|
|
10287
10287
|
Zs(m, i);
|
|
10288
10288
|
const x = m.comment(e, r.depth);
|
|
10289
10289
|
x && (n += ": ", n += x), o || (o = m.noChildren);
|
|
@@ -10314,9 +10314,9 @@ function S0(r, e, t) {
|
|
|
10314
10314
|
}
|
|
10315
10315
|
return n;
|
|
10316
10316
|
}
|
|
10317
|
-
const
|
|
10318
|
-
function
|
|
10319
|
-
const t = { ...
|
|
10317
|
+
const d1 = { ...Nn.defaultDecodeOptions, initialDepth: 0, noPrefixHex: !1, minCol: 0 };
|
|
10318
|
+
function p1(r, e) {
|
|
10319
|
+
const t = { ...d1, ...e, ParentType: ku, saveOriginal: !0 }, n = new Ys(r, t);
|
|
10320
10320
|
let i, s;
|
|
10321
10321
|
for (const c of n) {
|
|
10322
10322
|
if (s = Nn.create(c, i, t, n), c[2] === Er.BREAK) if (i != null && i.isStreaming) i.left = 1;
|
|
@@ -10334,7 +10334,7 @@ function h1(r, e) {
|
|
|
10334
10334
|
`;
|
|
10335
10335
|
return o += S0(s, t), o;
|
|
10336
10336
|
}
|
|
10337
|
-
const cd = !
|
|
10337
|
+
const cd = !Kv();
|
|
10338
10338
|
function _0(r) {
|
|
10339
10339
|
if (typeof r == "object" && r) {
|
|
10340
10340
|
if (r.constructor !== Number) throw new Error(`Expected number: ${r}`);
|
|
@@ -10367,11 +10367,11 @@ Pt(Map, (r, e, t) => {
|
|
|
10367
10367
|
function ld(r) {
|
|
10368
10368
|
return jn(r.contents), new Date(r.contents);
|
|
10369
10369
|
}
|
|
10370
|
-
ld.comment = (r) => (jn(r.contents), `(String Date) ${new Date(r.contents).toISOString()}`),
|
|
10370
|
+
ld.comment = (r) => (jn(r.contents), `(String Date) ${new Date(r.contents).toISOString()}`), Ze.registerDecoder(At.DATE_STRING, ld);
|
|
10371
10371
|
function ud(r) {
|
|
10372
10372
|
return _0(r.contents), new Date(r.contents * 1e3);
|
|
10373
10373
|
}
|
|
10374
|
-
ud.comment = (r) => (_0(r.contents), `(Epoch Date) ${new Date(r.contents * 1e3).toISOString()}`),
|
|
10374
|
+
ud.comment = (r) => (_0(r.contents), `(Epoch Date) ${new Date(r.contents * 1e3).toISOString()}`), Ze.registerDecoder(At.DATE_EPOCH, ud), Pt(Date, (r) => [At.DATE_EPOCH, r.valueOf() / 1e3]);
|
|
10375
10375
|
function Ia(r, e, t) {
|
|
10376
10376
|
if (bi(e.contents), t.rejectBigInts) throw new Error(`Decoding unwanted big integer: ${e}(h'${Vr(e.contents)}')`);
|
|
10377
10377
|
if (t.requirePreferred && e.contents[0] === 0) throw new Error(`Decoding overly-large bigint: ${e.tag}(h'${Vr(e.contents)})`);
|
|
@@ -10380,7 +10380,7 @@ function Ia(r, e, t) {
|
|
|
10380
10380
|
return t.boxed ? ks(n, e.contents) : n;
|
|
10381
10381
|
}
|
|
10382
10382
|
const fd = Ia.bind(null, !1), hd = Ia.bind(null, !0);
|
|
10383
|
-
fd.comment = (r, e) => `(Positive BigInt) ${Ia(!1, r, e)}n`, hd.comment = (r, e) => `(Negative BigInt) ${Ia(!0, r, e)}n`,
|
|
10383
|
+
fd.comment = (r, e) => `(Positive BigInt) ${Ia(!1, r, e)}n`, hd.comment = (r, e) => `(Negative BigInt) ${Ia(!0, r, e)}n`, Ze.registerDecoder(At.POS_BIGINT, fd), Ze.registerDecoder(At.NEG_BIGINT, hd);
|
|
10384
10384
|
function el(r, e) {
|
|
10385
10385
|
return bi(r.contents), r;
|
|
10386
10386
|
}
|
|
@@ -10391,20 +10391,20 @@ el.comment = (r, e, t) => {
|
|
|
10391
10391
|
const o = i[s] & 31;
|
|
10392
10392
|
let c = Vr(i.subarray(s, ++s));
|
|
10393
10393
|
o >= 24 && (c += " ", c += Vr(i.subarray(s, s + 2 ** (o - 24)))), n.minCol = Math.max(n.minCol, (t + 1) * 2 + c.length);
|
|
10394
|
-
const u =
|
|
10394
|
+
const u = p1(r.contents, n);
|
|
10395
10395
|
let h = `Embedded CBOR
|
|
10396
10396
|
`;
|
|
10397
10397
|
return h += `${"".padStart((t + 1) * 2, " ")}${c}`.padEnd(n.minCol + 1, " "), h += `-- Bytes (Length: ${r.contents.length})
|
|
10398
10398
|
`, h += u, h;
|
|
10399
|
-
}, el.noChildren = !0,
|
|
10399
|
+
}, el.noChildren = !0, Ze.registerDecoder(At.CBOR, el), Ze.registerDecoder(At.URI, (r) => (jn(r.contents), new URL(r.contents)), "URI"), Pt(URL, (r) => [At.URI, r.toString()]), Ze.registerDecoder(At.BASE64URL, (r) => (jn(r.contents), Gv(r.contents)), "Base64url-encoded"), Ze.registerDecoder(At.BASE64, (r) => (jn(r.contents), bf(r.contents)), "Base64-encoded"), Ze.registerDecoder(35, (r) => (jn(r.contents), new RegExp(r.contents)), "RegExp"), Ze.registerDecoder(21065, (r) => {
|
|
10400
10400
|
jn(r.contents);
|
|
10401
10401
|
let e = r.contents.replace(new RegExp("(?<!\\\\)(?<!\\[(?:[^\\]]|\\\\\\])*)\\.", "g"), `[^
|
|
10402
10402
|
\r]`);
|
|
10403
10403
|
return e = `^(?:${e})$`, new RegExp(e, "u");
|
|
10404
|
-
}, "I-RegExp"),
|
|
10404
|
+
}, "I-RegExp"), Ze.registerDecoder(At.REGEXP, (r) => {
|
|
10405
10405
|
if (E0(r.contents), r.contents.length < 1 || r.contents.length > 2) throw new Error(`Invalid RegExp Array: ${r.contents}`);
|
|
10406
10406
|
return new RegExp(r.contents[0], r.contents[1]);
|
|
10407
|
-
}, "RegExp"), Pt(RegExp, (r) => [At.REGEXP, [r.source, r.flags]]),
|
|
10407
|
+
}, "RegExp"), Pt(RegExp, (r) => [At.REGEXP, [r.source, r.flags]]), Ze.registerDecoder(64, (r) => (bi(r.contents), r.contents), "uint8 Typed Array");
|
|
10408
10408
|
function nr(r, e, t) {
|
|
10409
10409
|
bi(r.contents);
|
|
10410
10410
|
let n = r.contents.length;
|
|
@@ -10422,11 +10422,11 @@ function On(r, e, t, n, i) {
|
|
|
10422
10422
|
for (const u of n) c(u, s);
|
|
10423
10423
|
}
|
|
10424
10424
|
}
|
|
10425
|
-
|
|
10425
|
+
Ze.registerDecoder(65, (r) => nr(r, Uint16Array, !1), "uint16, big endian, Typed Array"), Ze.registerDecoder(66, (r) => nr(r, Uint32Array, !1), "uint32, big endian, Typed Array"), Ze.registerDecoder(67, (r) => nr(r, BigUint64Array, !1), "uint64, big endian, Typed Array"), Ze.registerDecoder(68, (r) => (bi(r.contents), new Uint8ClampedArray(r.contents)), "uint8 Typed Array, clamped arithmetic"), Pt(Uint8ClampedArray, (r) => [68, new Uint8Array(r.buffer, r.byteOffset, r.byteLength)]), Ze.registerDecoder(69, (r) => nr(r, Uint16Array, !0), "uint16, little endian, Typed Array"), Pt(Uint16Array, (r, e, t) => On(e, 69, 65, r, t)), Ze.registerDecoder(70, (r) => nr(r, Uint32Array, !0), "uint32, little endian, Typed Array"), Pt(Uint32Array, (r, e, t) => On(e, 70, 66, r, t)), Ze.registerDecoder(71, (r) => nr(r, BigUint64Array, !0), "uint64, little endian, Typed Array"), Pt(BigUint64Array, (r, e, t) => On(e, 71, 67, r, t)), Ze.registerDecoder(72, (r) => (bi(r.contents), new Int8Array(r.contents)), "sint8 Typed Array"), Pt(Int8Array, (r) => [72, new Uint8Array(r.buffer, r.byteOffset, r.byteLength)]), Ze.registerDecoder(73, (r) => nr(r, Int16Array, !1), "sint16, big endian, Typed Array"), Ze.registerDecoder(74, (r) => nr(r, Int32Array, !1), "sint32, big endian, Typed Array"), Ze.registerDecoder(75, (r) => nr(r, BigInt64Array, !1), "sint64, big endian, Typed Array"), Ze.registerDecoder(77, (r) => nr(r, Int16Array, !0), "sint16, little endian, Typed Array"), Pt(Int16Array, (r, e, t) => On(e, 77, 73, r, t)), Ze.registerDecoder(78, (r) => nr(r, Int32Array, !0), "sint32, little endian, Typed Array"), Pt(Int32Array, (r, e, t) => On(e, 78, 74, r, t)), Ze.registerDecoder(79, (r) => nr(r, BigInt64Array, !0), "sint64, little endian, Typed Array"), Pt(BigInt64Array, (r, e, t) => On(e, 79, 75, r, t)), Ze.registerDecoder(81, (r) => nr(r, Float32Array, !1), "IEEE 754 binary32, big endian, Typed Array"), Ze.registerDecoder(82, (r) => nr(r, Float64Array, !1), "IEEE 754 binary64, big endian, Typed Array"), Ze.registerDecoder(85, (r) => nr(r, Float32Array, !0), "IEEE 754 binary32, little endian, Typed Array"), Pt(Float32Array, (r, e, t) => On(e, 85, 81, r, t)), Ze.registerDecoder(86, (r) => nr(r, Float64Array, !0), "IEEE 754 binary64, big endian, Typed Array"), Pt(Float64Array, (r, e, t) => On(e, 86, 82, r, t)), Ze.registerDecoder(At.SET, (r) => (E0(r.contents), new Set(r.contents)), "Set"), Pt(Set, (r) => [At.SET, [...r]]), Ze.registerDecoder(At.JSON, (r) => (jn(r.contents), JSON.parse(r.contents)), "JSON-encoded"), Ze.registerDecoder(At.SELF_DESCRIBED, (r) => r.contents, "Self-Described"), Ze.registerDecoder(At.INVALID_16, () => {
|
|
10426
10426
|
throw new Error(`Tag always invalid: ${At.INVALID_16}`);
|
|
10427
|
-
}, "Invalid"),
|
|
10427
|
+
}, "Invalid"), Ze.registerDecoder(At.INVALID_32, () => {
|
|
10428
10428
|
throw new Error(`Tag always invalid: ${At.INVALID_32}`);
|
|
10429
|
-
}, "Invalid"),
|
|
10429
|
+
}, "Invalid"), Ze.registerDecoder(At.INVALID_64, () => {
|
|
10430
10430
|
throw new Error(`Tag always invalid: ${At.INVALID_64}`);
|
|
10431
10431
|
}, "Invalid");
|
|
10432
10432
|
function tl(r) {
|
|
@@ -10559,7 +10559,7 @@ const se = it.arrayToEnum([
|
|
|
10559
10559
|
"invalid_intersection_types",
|
|
10560
10560
|
"not_multiple_of",
|
|
10561
10561
|
"not_finite"
|
|
10562
|
-
]),
|
|
10562
|
+
]), y1 = (r) => JSON.stringify(r, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
10563
10563
|
class _r extends Error {
|
|
10564
10564
|
constructor(e) {
|
|
10565
10565
|
super(), this.issues = [], this.addIssue = (n) => {
|
|
@@ -10677,7 +10677,7 @@ const Xi = (r, e) => {
|
|
|
10677
10677
|
return { message: t };
|
|
10678
10678
|
};
|
|
10679
10679
|
let k0 = Xi;
|
|
10680
|
-
function
|
|
10680
|
+
function g1(r) {
|
|
10681
10681
|
k0 = r;
|
|
10682
10682
|
}
|
|
10683
10683
|
function Ba() {
|
|
@@ -10703,7 +10703,7 @@ const Oa = (r) => {
|
|
|
10703
10703
|
path: s,
|
|
10704
10704
|
message: c
|
|
10705
10705
|
};
|
|
10706
|
-
},
|
|
10706
|
+
}, v1 = [];
|
|
10707
10707
|
function ee(r, e) {
|
|
10708
10708
|
const t = Ba(), n = Oa({
|
|
10709
10709
|
issueData: e,
|
|
@@ -10811,7 +10811,7 @@ function Le(r) {
|
|
|
10811
10811
|
return o.code === "invalid_enum_value" ? { message: m ?? c.defaultError } : typeof c.data > "u" ? { message: (u = m ?? n) !== null && u !== void 0 ? u : c.defaultError } : o.code !== "invalid_type" ? { message: c.defaultError } : { message: (h = m ?? t) !== null && h !== void 0 ? h : c.defaultError };
|
|
10812
10812
|
}, description: i };
|
|
10813
10813
|
}
|
|
10814
|
-
class
|
|
10814
|
+
class Ke {
|
|
10815
10815
|
constructor(e) {
|
|
10816
10816
|
this.spa = this.safeParseAsync, this._def = e, this.parse = this.parse.bind(this), this.safeParse = this.safeParse.bind(this), this.parseAsync = this.parseAsync.bind(this), this.safeParseAsync = this.safeParseAsync.bind(this), this.spa = this.spa.bind(this), this.refine = this.refine.bind(this), this.refinement = this.refinement.bind(this), this.superRefine = this.superRefine.bind(this), this.optional = this.optional.bind(this), this.nullable = this.nullable.bind(this), this.nullish = this.nullish.bind(this), this.array = this.array.bind(this), this.promise = this.promise.bind(this), this.or = this.or.bind(this), this.and = this.and.bind(this), this.transform = this.transform.bind(this), this.brand = this.brand.bind(this), this.default = this.default.bind(this), this.catch = this.catch.bind(this), this.describe = this.describe.bind(this), this.pipe = this.pipe.bind(this), this.readonly = this.readonly.bind(this), this.isNullable = this.isNullable.bind(this), this.isOptional = this.isOptional.bind(this);
|
|
10817
10817
|
}
|
|
@@ -10994,14 +10994,14 @@ class Ge {
|
|
|
10994
10994
|
return this.safeParse(null).success;
|
|
10995
10995
|
}
|
|
10996
10996
|
}
|
|
10997
|
-
const
|
|
10997
|
+
const m1 = /^c[^\s-]{8,}$/i, w1 = /^[0-9a-z]+$/, b1 = /^[0-9A-HJKMNP-TV-Z]{26}$/, x1 = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, A1 = /^[a-z0-9_-]{21}$/i, S1 = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, _1 = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, E1 = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
10998
10998
|
let rl;
|
|
10999
|
-
const
|
|
10999
|
+
const k1 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, I1 = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, C1 = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, C0 = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", B1 = new RegExp(`^${C0}$`);
|
|
11000
11000
|
function B0(r) {
|
|
11001
11001
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
11002
11002
|
return r.precision ? e = `${e}\\.\\d{${r.precision}}` : r.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
11003
11003
|
}
|
|
11004
|
-
function
|
|
11004
|
+
function O1(r) {
|
|
11005
11005
|
return new RegExp(`^${B0(r)}$`);
|
|
11006
11006
|
}
|
|
11007
11007
|
function O0(r) {
|
|
@@ -11009,10 +11009,10 @@ function O0(r) {
|
|
|
11009
11009
|
const t = [];
|
|
11010
11010
|
return t.push(r.local ? "Z?" : "Z"), r.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
|
|
11011
11011
|
}
|
|
11012
|
-
function
|
|
11013
|
-
return !!((e === "v4" || !e) &&
|
|
11012
|
+
function T1(r, e) {
|
|
11013
|
+
return !!((e === "v4" || !e) && k1.test(r) || (e === "v6" || !e) && I1.test(r));
|
|
11014
11014
|
}
|
|
11015
|
-
class Mr extends
|
|
11015
|
+
class Mr extends Ke {
|
|
11016
11016
|
_parse(e) {
|
|
11017
11017
|
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== se.string) {
|
|
11018
11018
|
const s = this._getOrReturnCtx(e);
|
|
@@ -11061,43 +11061,43 @@ class Mr extends Ge {
|
|
|
11061
11061
|
message: s.message
|
|
11062
11062
|
}), n.dirty());
|
|
11063
11063
|
} else if (s.kind === "email")
|
|
11064
|
-
|
|
11064
|
+
_1.test(e.data) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11065
11065
|
validation: "email",
|
|
11066
11066
|
code: F.invalid_string,
|
|
11067
11067
|
message: s.message
|
|
11068
11068
|
}), n.dirty());
|
|
11069
11069
|
else if (s.kind === "emoji")
|
|
11070
|
-
rl || (rl = new RegExp(
|
|
11070
|
+
rl || (rl = new RegExp(E1, "u")), rl.test(e.data) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11071
11071
|
validation: "emoji",
|
|
11072
11072
|
code: F.invalid_string,
|
|
11073
11073
|
message: s.message
|
|
11074
11074
|
}), n.dirty());
|
|
11075
11075
|
else if (s.kind === "uuid")
|
|
11076
|
-
|
|
11076
|
+
x1.test(e.data) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11077
11077
|
validation: "uuid",
|
|
11078
11078
|
code: F.invalid_string,
|
|
11079
11079
|
message: s.message
|
|
11080
11080
|
}), n.dirty());
|
|
11081
11081
|
else if (s.kind === "nanoid")
|
|
11082
|
-
|
|
11082
|
+
A1.test(e.data) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11083
11083
|
validation: "nanoid",
|
|
11084
11084
|
code: F.invalid_string,
|
|
11085
11085
|
message: s.message
|
|
11086
11086
|
}), n.dirty());
|
|
11087
11087
|
else if (s.kind === "cuid")
|
|
11088
|
-
|
|
11088
|
+
m1.test(e.data) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11089
11089
|
validation: "cuid",
|
|
11090
11090
|
code: F.invalid_string,
|
|
11091
11091
|
message: s.message
|
|
11092
11092
|
}), n.dirty());
|
|
11093
11093
|
else if (s.kind === "cuid2")
|
|
11094
|
-
|
|
11094
|
+
w1.test(e.data) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11095
11095
|
validation: "cuid2",
|
|
11096
11096
|
code: F.invalid_string,
|
|
11097
11097
|
message: s.message
|
|
11098
11098
|
}), n.dirty());
|
|
11099
11099
|
else if (s.kind === "ulid")
|
|
11100
|
-
|
|
11100
|
+
b1.test(e.data) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11101
11101
|
validation: "ulid",
|
|
11102
11102
|
code: F.invalid_string,
|
|
11103
11103
|
message: s.message
|
|
@@ -11132,23 +11132,23 @@ class Mr extends Ge {
|
|
|
11132
11132
|
code: F.invalid_string,
|
|
11133
11133
|
validation: "datetime",
|
|
11134
11134
|
message: s.message
|
|
11135
|
-
}), n.dirty()) : s.kind === "date" ?
|
|
11135
|
+
}), n.dirty()) : s.kind === "date" ? B1.test(e.data) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11136
11136
|
code: F.invalid_string,
|
|
11137
11137
|
validation: "date",
|
|
11138
11138
|
message: s.message
|
|
11139
|
-
}), n.dirty()) : s.kind === "time" ?
|
|
11139
|
+
}), n.dirty()) : s.kind === "time" ? O1(s).test(e.data) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11140
11140
|
code: F.invalid_string,
|
|
11141
11141
|
validation: "time",
|
|
11142
11142
|
message: s.message
|
|
11143
|
-
}), n.dirty()) : s.kind === "duration" ?
|
|
11143
|
+
}), n.dirty()) : s.kind === "duration" ? S1.test(e.data) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11144
11144
|
validation: "duration",
|
|
11145
11145
|
code: F.invalid_string,
|
|
11146
11146
|
message: s.message
|
|
11147
|
-
}), n.dirty()) : s.kind === "ip" ?
|
|
11147
|
+
}), n.dirty()) : s.kind === "ip" ? T1(e.data, s.version) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11148
11148
|
validation: "ip",
|
|
11149
11149
|
code: F.invalid_string,
|
|
11150
11150
|
message: s.message
|
|
11151
|
-
}), n.dirty()) : s.kind === "base64" ?
|
|
11151
|
+
}), n.dirty()) : s.kind === "base64" ? C1.test(e.data) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11152
11152
|
validation: "base64",
|
|
11153
11153
|
code: F.invalid_string,
|
|
11154
11154
|
message: s.message
|
|
@@ -11370,11 +11370,11 @@ Mr.create = (r) => {
|
|
|
11370
11370
|
...Le(r)
|
|
11371
11371
|
});
|
|
11372
11372
|
};
|
|
11373
|
-
function
|
|
11373
|
+
function N1(r, e) {
|
|
11374
11374
|
const t = (r.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, i = t > n ? t : n, s = parseInt(r.toFixed(i).replace(".", "")), o = parseInt(e.toFixed(i).replace(".", ""));
|
|
11375
11375
|
return s % o / Math.pow(10, i);
|
|
11376
11376
|
}
|
|
11377
|
-
class Kn extends
|
|
11377
|
+
class Kn extends Ke {
|
|
11378
11378
|
constructor() {
|
|
11379
11379
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
11380
11380
|
}
|
|
@@ -11409,7 +11409,7 @@ class Kn extends Ge {
|
|
|
11409
11409
|
inclusive: s.inclusive,
|
|
11410
11410
|
exact: !1,
|
|
11411
11411
|
message: s.message
|
|
11412
|
-
}), i.dirty()) : s.kind === "multipleOf" ?
|
|
11412
|
+
}), i.dirty()) : s.kind === "multipleOf" ? N1(e.data, s.value) !== 0 && (n = this._getOrReturnCtx(e, n), ee(n, {
|
|
11413
11413
|
code: F.not_multiple_of,
|
|
11414
11414
|
multipleOf: s.value,
|
|
11415
11415
|
message: s.message
|
|
@@ -11546,7 +11546,7 @@ Kn.create = (r) => new Kn({
|
|
|
11546
11546
|
coerce: (r == null ? void 0 : r.coerce) || !1,
|
|
11547
11547
|
...Le(r)
|
|
11548
11548
|
});
|
|
11549
|
-
class qn extends
|
|
11549
|
+
class qn extends Ke {
|
|
11550
11550
|
constructor() {
|
|
11551
11551
|
super(...arguments), this.min = this.gte, this.max = this.lte;
|
|
11552
11552
|
}
|
|
@@ -11674,7 +11674,7 @@ qn.create = (r) => {
|
|
|
11674
11674
|
...Le(r)
|
|
11675
11675
|
});
|
|
11676
11676
|
};
|
|
11677
|
-
class Qs extends
|
|
11677
|
+
class Qs extends Ke {
|
|
11678
11678
|
_parse(e) {
|
|
11679
11679
|
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== se.boolean) {
|
|
11680
11680
|
const n = this._getOrReturnCtx(e);
|
|
@@ -11692,7 +11692,7 @@ Qs.create = (r) => new Qs({
|
|
|
11692
11692
|
coerce: (r == null ? void 0 : r.coerce) || !1,
|
|
11693
11693
|
...Le(r)
|
|
11694
11694
|
});
|
|
11695
|
-
class xi extends
|
|
11695
|
+
class xi extends Ke {
|
|
11696
11696
|
_parse(e) {
|
|
11697
11697
|
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== se.date) {
|
|
11698
11698
|
const s = this._getOrReturnCtx(e);
|
|
@@ -11770,7 +11770,7 @@ xi.create = (r) => new xi({
|
|
|
11770
11770
|
typeName: ke.ZodDate,
|
|
11771
11771
|
...Le(r)
|
|
11772
11772
|
});
|
|
11773
|
-
class Na extends
|
|
11773
|
+
class Na extends Ke {
|
|
11774
11774
|
_parse(e) {
|
|
11775
11775
|
if (this._getType(e) !== se.symbol) {
|
|
11776
11776
|
const n = this._getOrReturnCtx(e);
|
|
@@ -11787,7 +11787,7 @@ Na.create = (r) => new Na({
|
|
|
11787
11787
|
typeName: ke.ZodSymbol,
|
|
11788
11788
|
...Le(r)
|
|
11789
11789
|
});
|
|
11790
|
-
class eo extends
|
|
11790
|
+
class eo extends Ke {
|
|
11791
11791
|
_parse(e) {
|
|
11792
11792
|
if (this._getType(e) !== se.undefined) {
|
|
11793
11793
|
const n = this._getOrReturnCtx(e);
|
|
@@ -11804,7 +11804,7 @@ eo.create = (r) => new eo({
|
|
|
11804
11804
|
typeName: ke.ZodUndefined,
|
|
11805
11805
|
...Le(r)
|
|
11806
11806
|
});
|
|
11807
|
-
class to extends
|
|
11807
|
+
class to extends Ke {
|
|
11808
11808
|
_parse(e) {
|
|
11809
11809
|
if (this._getType(e) !== se.null) {
|
|
11810
11810
|
const n = this._getOrReturnCtx(e);
|
|
@@ -11821,7 +11821,7 @@ to.create = (r) => new to({
|
|
|
11821
11821
|
typeName: ke.ZodNull,
|
|
11822
11822
|
...Le(r)
|
|
11823
11823
|
});
|
|
11824
|
-
class Qi extends
|
|
11824
|
+
class Qi extends Ke {
|
|
11825
11825
|
constructor() {
|
|
11826
11826
|
super(...arguments), this._any = !0;
|
|
11827
11827
|
}
|
|
@@ -11833,7 +11833,7 @@ Qi.create = (r) => new Qi({
|
|
|
11833
11833
|
typeName: ke.ZodAny,
|
|
11834
11834
|
...Le(r)
|
|
11835
11835
|
});
|
|
11836
|
-
class ai extends
|
|
11836
|
+
class ai extends Ke {
|
|
11837
11837
|
constructor() {
|
|
11838
11838
|
super(...arguments), this._unknown = !0;
|
|
11839
11839
|
}
|
|
@@ -11845,7 +11845,7 @@ ai.create = (r) => new ai({
|
|
|
11845
11845
|
typeName: ke.ZodUnknown,
|
|
11846
11846
|
...Le(r)
|
|
11847
11847
|
});
|
|
11848
|
-
class En extends
|
|
11848
|
+
class En extends Ke {
|
|
11849
11849
|
_parse(e) {
|
|
11850
11850
|
const t = this._getOrReturnCtx(e);
|
|
11851
11851
|
return ee(t, {
|
|
@@ -11859,7 +11859,7 @@ En.create = (r) => new En({
|
|
|
11859
11859
|
typeName: ke.ZodNever,
|
|
11860
11860
|
...Le(r)
|
|
11861
11861
|
});
|
|
11862
|
-
class ja extends
|
|
11862
|
+
class ja extends Ke {
|
|
11863
11863
|
_parse(e) {
|
|
11864
11864
|
if (this._getType(e) !== se.undefined) {
|
|
11865
11865
|
const n = this._getOrReturnCtx(e);
|
|
@@ -11876,7 +11876,7 @@ ja.create = (r) => new ja({
|
|
|
11876
11876
|
typeName: ke.ZodVoid,
|
|
11877
11877
|
...Le(r)
|
|
11878
11878
|
});
|
|
11879
|
-
class Lr extends
|
|
11879
|
+
class Lr extends Ke {
|
|
11880
11880
|
_parse(e) {
|
|
11881
11881
|
const { ctx: t, status: n } = this._processInputParams(e), i = this._def;
|
|
11882
11882
|
if (t.parsedType !== se.array)
|
|
@@ -11965,7 +11965,7 @@ function ji(r) {
|
|
|
11965
11965
|
type: ji(r.element)
|
|
11966
11966
|
}) : r instanceof on ? on.create(ji(r.unwrap())) : r instanceof Wn ? Wn.create(ji(r.unwrap())) : r instanceof un ? un.create(r.items.map((e) => ji(e))) : r;
|
|
11967
11967
|
}
|
|
11968
|
-
class Ct extends
|
|
11968
|
+
class Ct extends Ke {
|
|
11969
11969
|
constructor() {
|
|
11970
11970
|
super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
|
|
11971
11971
|
}
|
|
@@ -12252,7 +12252,7 @@ Ct.lazycreate = (r, e) => new Ct({
|
|
|
12252
12252
|
typeName: ke.ZodObject,
|
|
12253
12253
|
...Le(e)
|
|
12254
12254
|
});
|
|
12255
|
-
class ro extends
|
|
12255
|
+
class ro extends Ke {
|
|
12256
12256
|
_parse(e) {
|
|
12257
12257
|
const { ctx: t } = this._processInputParams(e), n = this._def.options;
|
|
12258
12258
|
function i(s) {
|
|
@@ -12326,7 +12326,7 @@ ro.create = (r, e) => new ro({
|
|
|
12326
12326
|
...Le(e)
|
|
12327
12327
|
});
|
|
12328
12328
|
const yn = (r) => r instanceof so ? yn(r.schema) : r instanceof Gr ? yn(r.innerType()) : r instanceof oo ? [r.value] : r instanceof Zn ? r.options : r instanceof ao ? it.objectValues(r.enum) : r instanceof co ? yn(r._def.innerType) : r instanceof eo ? [void 0] : r instanceof to ? [null] : r instanceof on ? [void 0, ...yn(r.unwrap())] : r instanceof Wn ? [null, ...yn(r.unwrap())] : r instanceof Af || r instanceof uo ? yn(r.unwrap()) : r instanceof lo ? yn(r._def.innerType) : [];
|
|
12329
|
-
class Rc extends
|
|
12329
|
+
class Rc extends Ke {
|
|
12330
12330
|
_parse(e) {
|
|
12331
12331
|
const { ctx: t } = this._processInputParams(e);
|
|
12332
12332
|
if (t.parsedType !== se.object)
|
|
@@ -12414,7 +12414,7 @@ function Ou(r, e) {
|
|
|
12414
12414
|
return { valid: !0, data: i };
|
|
12415
12415
|
} else return t === se.date && n === se.date && +r == +e ? { valid: !0, data: r } : { valid: !1 };
|
|
12416
12416
|
}
|
|
12417
|
-
class no extends
|
|
12417
|
+
class no extends Ke {
|
|
12418
12418
|
_parse(e) {
|
|
12419
12419
|
const { status: t, ctx: n } = this._processInputParams(e), i = (s, o) => {
|
|
12420
12420
|
if (Cu(s) || Cu(o))
|
|
@@ -12452,7 +12452,7 @@ no.create = (r, e, t) => new no({
|
|
|
12452
12452
|
typeName: ke.ZodIntersection,
|
|
12453
12453
|
...Le(t)
|
|
12454
12454
|
});
|
|
12455
|
-
class un extends
|
|
12455
|
+
class un extends Ke {
|
|
12456
12456
|
_parse(e) {
|
|
12457
12457
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
12458
12458
|
if (n.parsedType !== se.array)
|
|
@@ -12502,7 +12502,7 @@ un.create = (r, e) => {
|
|
|
12502
12502
|
...Le(e)
|
|
12503
12503
|
});
|
|
12504
12504
|
};
|
|
12505
|
-
class io extends
|
|
12505
|
+
class io extends Ke {
|
|
12506
12506
|
get keySchema() {
|
|
12507
12507
|
return this._def.keyType;
|
|
12508
12508
|
}
|
|
@@ -12530,7 +12530,7 @@ class io extends Ge {
|
|
|
12530
12530
|
return this._def.valueType;
|
|
12531
12531
|
}
|
|
12532
12532
|
static create(e, t, n) {
|
|
12533
|
-
return t instanceof
|
|
12533
|
+
return t instanceof Ke ? new io({
|
|
12534
12534
|
keyType: e,
|
|
12535
12535
|
valueType: t,
|
|
12536
12536
|
typeName: ke.ZodRecord,
|
|
@@ -12543,7 +12543,7 @@ class io extends Ge {
|
|
|
12543
12543
|
});
|
|
12544
12544
|
}
|
|
12545
12545
|
}
|
|
12546
|
-
class Pa extends
|
|
12546
|
+
class Pa extends Ke {
|
|
12547
12547
|
get keySchema() {
|
|
12548
12548
|
return this._def.keyType;
|
|
12549
12549
|
}
|
|
@@ -12591,7 +12591,7 @@ Pa.create = (r, e, t) => new Pa({
|
|
|
12591
12591
|
typeName: ke.ZodMap,
|
|
12592
12592
|
...Le(t)
|
|
12593
12593
|
});
|
|
12594
|
-
class Ai extends
|
|
12594
|
+
class Ai extends Ke {
|
|
12595
12595
|
_parse(e) {
|
|
12596
12596
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
12597
12597
|
if (n.parsedType !== se.set)
|
|
@@ -12655,7 +12655,7 @@ Ai.create = (r, e) => new Ai({
|
|
|
12655
12655
|
typeName: ke.ZodSet,
|
|
12656
12656
|
...Le(e)
|
|
12657
12657
|
});
|
|
12658
|
-
class $i extends
|
|
12658
|
+
class $i extends Ke {
|
|
12659
12659
|
constructor() {
|
|
12660
12660
|
super(...arguments), this.validate = this.implement;
|
|
12661
12661
|
}
|
|
@@ -12756,7 +12756,7 @@ class $i extends Ge {
|
|
|
12756
12756
|
});
|
|
12757
12757
|
}
|
|
12758
12758
|
}
|
|
12759
|
-
class so extends
|
|
12759
|
+
class so extends Ke {
|
|
12760
12760
|
get schema() {
|
|
12761
12761
|
return this._def.getter();
|
|
12762
12762
|
}
|
|
@@ -12770,7 +12770,7 @@ so.create = (r, e) => new so({
|
|
|
12770
12770
|
typeName: ke.ZodLazy,
|
|
12771
12771
|
...Le(e)
|
|
12772
12772
|
});
|
|
12773
|
-
class oo extends
|
|
12773
|
+
class oo extends Ke {
|
|
12774
12774
|
_parse(e) {
|
|
12775
12775
|
if (e.data !== this._def.value) {
|
|
12776
12776
|
const t = this._getOrReturnCtx(e);
|
|
@@ -12798,7 +12798,7 @@ function T0(r, e) {
|
|
|
12798
12798
|
...Le(e)
|
|
12799
12799
|
});
|
|
12800
12800
|
}
|
|
12801
|
-
class Zn extends
|
|
12801
|
+
class Zn extends Ke {
|
|
12802
12802
|
constructor() {
|
|
12803
12803
|
super(...arguments), Cs.set(this, void 0);
|
|
12804
12804
|
}
|
|
@@ -12857,7 +12857,7 @@ class Zn extends Ge {
|
|
|
12857
12857
|
}
|
|
12858
12858
|
Cs = /* @__PURE__ */ new WeakMap();
|
|
12859
12859
|
Zn.create = T0;
|
|
12860
|
-
class ao extends
|
|
12860
|
+
class ao extends Ke {
|
|
12861
12861
|
constructor() {
|
|
12862
12862
|
super(...arguments), Bs.set(this, void 0);
|
|
12863
12863
|
}
|
|
@@ -12891,7 +12891,7 @@ ao.create = (r, e) => new ao({
|
|
|
12891
12891
|
typeName: ke.ZodNativeEnum,
|
|
12892
12892
|
...Le(e)
|
|
12893
12893
|
});
|
|
12894
|
-
class es extends
|
|
12894
|
+
class es extends Ke {
|
|
12895
12895
|
unwrap() {
|
|
12896
12896
|
return this._def.type;
|
|
12897
12897
|
}
|
|
@@ -12915,7 +12915,7 @@ es.create = (r, e) => new es({
|
|
|
12915
12915
|
typeName: ke.ZodPromise,
|
|
12916
12916
|
...Le(e)
|
|
12917
12917
|
});
|
|
12918
|
-
class Gr extends
|
|
12918
|
+
class Gr extends Ke {
|
|
12919
12919
|
innerType() {
|
|
12920
12920
|
return this._def.schema;
|
|
12921
12921
|
}
|
|
@@ -13004,7 +13004,7 @@ Gr.createWithPreprocess = (r, e, t) => new Gr({
|
|
|
13004
13004
|
typeName: ke.ZodEffects,
|
|
13005
13005
|
...Le(t)
|
|
13006
13006
|
});
|
|
13007
|
-
class on extends
|
|
13007
|
+
class on extends Ke {
|
|
13008
13008
|
_parse(e) {
|
|
13009
13009
|
return this._getType(e) === se.undefined ? ur(void 0) : this._def.innerType._parse(e);
|
|
13010
13010
|
}
|
|
@@ -13017,7 +13017,7 @@ on.create = (r, e) => new on({
|
|
|
13017
13017
|
typeName: ke.ZodOptional,
|
|
13018
13018
|
...Le(e)
|
|
13019
13019
|
});
|
|
13020
|
-
class Wn extends
|
|
13020
|
+
class Wn extends Ke {
|
|
13021
13021
|
_parse(e) {
|
|
13022
13022
|
return this._getType(e) === se.null ? ur(null) : this._def.innerType._parse(e);
|
|
13023
13023
|
}
|
|
@@ -13030,7 +13030,7 @@ Wn.create = (r, e) => new Wn({
|
|
|
13030
13030
|
typeName: ke.ZodNullable,
|
|
13031
13031
|
...Le(e)
|
|
13032
13032
|
});
|
|
13033
|
-
class co extends
|
|
13033
|
+
class co extends Ke {
|
|
13034
13034
|
_parse(e) {
|
|
13035
13035
|
const { ctx: t } = this._processInputParams(e);
|
|
13036
13036
|
let n = t.data;
|
|
@@ -13050,7 +13050,7 @@ co.create = (r, e) => new co({
|
|
|
13050
13050
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
13051
13051
|
...Le(e)
|
|
13052
13052
|
});
|
|
13053
|
-
class lo extends
|
|
13053
|
+
class lo extends Ke {
|
|
13054
13054
|
_parse(e) {
|
|
13055
13055
|
const { ctx: t } = this._processInputParams(e), n = {
|
|
13056
13056
|
...t,
|
|
@@ -13093,7 +13093,7 @@ lo.create = (r, e) => new lo({
|
|
|
13093
13093
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
13094
13094
|
...Le(e)
|
|
13095
13095
|
});
|
|
13096
|
-
class Ra extends
|
|
13096
|
+
class Ra extends Ke {
|
|
13097
13097
|
_parse(e) {
|
|
13098
13098
|
if (this._getType(e) !== se.nan) {
|
|
13099
13099
|
const n = this._getOrReturnCtx(e);
|
|
@@ -13110,8 +13110,8 @@ Ra.create = (r) => new Ra({
|
|
|
13110
13110
|
typeName: ke.ZodNaN,
|
|
13111
13111
|
...Le(r)
|
|
13112
13112
|
});
|
|
13113
|
-
const
|
|
13114
|
-
class Af extends
|
|
13113
|
+
const j1 = Symbol("zod_brand");
|
|
13114
|
+
class Af extends Ke {
|
|
13115
13115
|
_parse(e) {
|
|
13116
13116
|
const { ctx: t } = this._processInputParams(e), n = t.data;
|
|
13117
13117
|
return this._def.type._parse({
|
|
@@ -13124,7 +13124,7 @@ class Af extends Ge {
|
|
|
13124
13124
|
return this._def.type;
|
|
13125
13125
|
}
|
|
13126
13126
|
}
|
|
13127
|
-
class Io extends
|
|
13127
|
+
class Io extends Ke {
|
|
13128
13128
|
_parse(e) {
|
|
13129
13129
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
13130
13130
|
if (n.common.async)
|
|
@@ -13164,7 +13164,7 @@ class Io extends Ge {
|
|
|
13164
13164
|
});
|
|
13165
13165
|
}
|
|
13166
13166
|
}
|
|
13167
|
-
class uo extends
|
|
13167
|
+
class uo extends Ke {
|
|
13168
13168
|
_parse(e) {
|
|
13169
13169
|
const t = this._def.innerType._parse(e), n = (i) => (Js(i) && (i.value = Object.freeze(i.value)), i);
|
|
13170
13170
|
return Xs(t) ? t.then((i) => n(i)) : n(t);
|
|
@@ -13187,16 +13187,16 @@ function N0(r, e = {}, t) {
|
|
|
13187
13187
|
}
|
|
13188
13188
|
}) : Qi.create();
|
|
13189
13189
|
}
|
|
13190
|
-
const
|
|
13190
|
+
const P1 = {
|
|
13191
13191
|
object: Ct.lazycreate
|
|
13192
13192
|
};
|
|
13193
13193
|
var ke;
|
|
13194
13194
|
(function(r) {
|
|
13195
13195
|
r.ZodString = "ZodString", r.ZodNumber = "ZodNumber", r.ZodNaN = "ZodNaN", r.ZodBigInt = "ZodBigInt", r.ZodBoolean = "ZodBoolean", r.ZodDate = "ZodDate", r.ZodSymbol = "ZodSymbol", r.ZodUndefined = "ZodUndefined", r.ZodNull = "ZodNull", r.ZodAny = "ZodAny", r.ZodUnknown = "ZodUnknown", r.ZodNever = "ZodNever", r.ZodVoid = "ZodVoid", r.ZodArray = "ZodArray", r.ZodObject = "ZodObject", r.ZodUnion = "ZodUnion", r.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", r.ZodIntersection = "ZodIntersection", r.ZodTuple = "ZodTuple", r.ZodRecord = "ZodRecord", r.ZodMap = "ZodMap", r.ZodSet = "ZodSet", r.ZodFunction = "ZodFunction", r.ZodLazy = "ZodLazy", r.ZodLiteral = "ZodLiteral", r.ZodEnum = "ZodEnum", r.ZodEffects = "ZodEffects", r.ZodNativeEnum = "ZodNativeEnum", r.ZodOptional = "ZodOptional", r.ZodNullable = "ZodNullable", r.ZodDefault = "ZodDefault", r.ZodCatch = "ZodCatch", r.ZodPromise = "ZodPromise", r.ZodBranded = "ZodBranded", r.ZodPipeline = "ZodPipeline", r.ZodReadonly = "ZodReadonly";
|
|
13196
13196
|
})(ke || (ke = {}));
|
|
13197
|
-
const
|
|
13197
|
+
const R1 = (r, e = {
|
|
13198
13198
|
message: `Input not instance of ${r.name}`
|
|
13199
|
-
}) => N0((t) => t instanceof r, e), j0 = Mr.create, P0 = Kn.create,
|
|
13199
|
+
}) => N0((t) => t instanceof r, e), j0 = Mr.create, P0 = Kn.create, U1 = Ra.create, D1 = qn.create, R0 = Qs.create, $1 = xi.create, M1 = Na.create, V1 = eo.create, L1 = to.create, H1 = Qi.create, F1 = ai.create, z1 = En.create, G1 = ja.create, K1 = Lr.create, q1 = Ct.create, Z1 = Ct.strictCreate, W1 = ro.create, Y1 = Rc.create, J1 = no.create, X1 = un.create, Q1 = io.create, em = Pa.create, tm = Ai.create, rm = $i.create, nm = so.create, im = oo.create, sm = Zn.create, om = ao.create, am = es.create, pd = Gr.create, cm = on.create, lm = Wn.create, um = Gr.createWithPreprocess, fm = Io.create, hm = () => j0().optional(), dm = () => P0().optional(), pm = () => R0().optional(), ym = {
|
|
13200
13200
|
string: (r) => Mr.create({ ...r, coerce: !0 }),
|
|
13201
13201
|
number: (r) => Kn.create({ ...r, coerce: !0 }),
|
|
13202
13202
|
boolean: (r) => Qs.create({
|
|
@@ -13205,14 +13205,14 @@ const j1 = (r, e = {
|
|
|
13205
13205
|
}),
|
|
13206
13206
|
bigint: (r) => qn.create({ ...r, coerce: !0 }),
|
|
13207
13207
|
date: (r) => xi.create({ ...r, coerce: !0 })
|
|
13208
|
-
},
|
|
13208
|
+
}, gm = Ie;
|
|
13209
13209
|
var It = /* @__PURE__ */ Object.freeze({
|
|
13210
13210
|
__proto__: null,
|
|
13211
13211
|
defaultErrorMap: Xi,
|
|
13212
|
-
setErrorMap:
|
|
13212
|
+
setErrorMap: g1,
|
|
13213
13213
|
getErrorMap: Ba,
|
|
13214
13214
|
makeIssue: Oa,
|
|
13215
|
-
EMPTY_PATH:
|
|
13215
|
+
EMPTY_PATH: v1,
|
|
13216
13216
|
addIssueToContext: ee,
|
|
13217
13217
|
ParseStatus: sr,
|
|
13218
13218
|
INVALID: Ie,
|
|
@@ -13230,7 +13230,7 @@ var It = /* @__PURE__ */ Object.freeze({
|
|
|
13230
13230
|
},
|
|
13231
13231
|
ZodParsedType: se,
|
|
13232
13232
|
getParsedType: Pn,
|
|
13233
|
-
ZodType:
|
|
13233
|
+
ZodType: Ke,
|
|
13234
13234
|
datetimeRegex: O0,
|
|
13235
13235
|
ZodString: Mr,
|
|
13236
13236
|
ZodNumber: Kn,
|
|
@@ -13266,66 +13266,66 @@ var It = /* @__PURE__ */ Object.freeze({
|
|
|
13266
13266
|
ZodDefault: co,
|
|
13267
13267
|
ZodCatch: lo,
|
|
13268
13268
|
ZodNaN: Ra,
|
|
13269
|
-
BRAND:
|
|
13269
|
+
BRAND: j1,
|
|
13270
13270
|
ZodBranded: Af,
|
|
13271
13271
|
ZodPipeline: Io,
|
|
13272
13272
|
ZodReadonly: uo,
|
|
13273
13273
|
custom: N0,
|
|
13274
|
-
Schema:
|
|
13275
|
-
ZodSchema:
|
|
13276
|
-
late:
|
|
13274
|
+
Schema: Ke,
|
|
13275
|
+
ZodSchema: Ke,
|
|
13276
|
+
late: P1,
|
|
13277
13277
|
get ZodFirstPartyTypeKind() {
|
|
13278
13278
|
return ke;
|
|
13279
13279
|
},
|
|
13280
|
-
coerce:
|
|
13281
|
-
any:
|
|
13282
|
-
array:
|
|
13283
|
-
bigint:
|
|
13280
|
+
coerce: ym,
|
|
13281
|
+
any: H1,
|
|
13282
|
+
array: K1,
|
|
13283
|
+
bigint: D1,
|
|
13284
13284
|
boolean: R0,
|
|
13285
|
-
date:
|
|
13286
|
-
discriminatedUnion:
|
|
13285
|
+
date: $1,
|
|
13286
|
+
discriminatedUnion: Y1,
|
|
13287
13287
|
effect: pd,
|
|
13288
|
-
enum:
|
|
13289
|
-
function:
|
|
13290
|
-
instanceof:
|
|
13291
|
-
intersection:
|
|
13292
|
-
lazy:
|
|
13293
|
-
literal:
|
|
13294
|
-
map:
|
|
13295
|
-
nan:
|
|
13296
|
-
nativeEnum:
|
|
13297
|
-
never:
|
|
13298
|
-
null:
|
|
13299
|
-
nullable:
|
|
13288
|
+
enum: sm,
|
|
13289
|
+
function: rm,
|
|
13290
|
+
instanceof: R1,
|
|
13291
|
+
intersection: J1,
|
|
13292
|
+
lazy: nm,
|
|
13293
|
+
literal: im,
|
|
13294
|
+
map: em,
|
|
13295
|
+
nan: U1,
|
|
13296
|
+
nativeEnum: om,
|
|
13297
|
+
never: z1,
|
|
13298
|
+
null: L1,
|
|
13299
|
+
nullable: lm,
|
|
13300
13300
|
number: P0,
|
|
13301
|
-
object:
|
|
13302
|
-
oboolean:
|
|
13303
|
-
onumber:
|
|
13304
|
-
optional:
|
|
13305
|
-
ostring:
|
|
13306
|
-
pipeline:
|
|
13307
|
-
preprocess:
|
|
13308
|
-
promise:
|
|
13309
|
-
record:
|
|
13310
|
-
set:
|
|
13311
|
-
strictObject:
|
|
13301
|
+
object: q1,
|
|
13302
|
+
oboolean: pm,
|
|
13303
|
+
onumber: dm,
|
|
13304
|
+
optional: cm,
|
|
13305
|
+
ostring: hm,
|
|
13306
|
+
pipeline: fm,
|
|
13307
|
+
preprocess: um,
|
|
13308
|
+
promise: am,
|
|
13309
|
+
record: Q1,
|
|
13310
|
+
set: tm,
|
|
13311
|
+
strictObject: Z1,
|
|
13312
13312
|
string: j0,
|
|
13313
|
-
symbol:
|
|
13313
|
+
symbol: M1,
|
|
13314
13314
|
transformer: pd,
|
|
13315
|
-
tuple:
|
|
13316
|
-
undefined:
|
|
13317
|
-
union:
|
|
13318
|
-
unknown:
|
|
13319
|
-
void:
|
|
13320
|
-
NEVER:
|
|
13315
|
+
tuple: X1,
|
|
13316
|
+
undefined: V1,
|
|
13317
|
+
union: W1,
|
|
13318
|
+
unknown: F1,
|
|
13319
|
+
void: G1,
|
|
13320
|
+
NEVER: gm,
|
|
13321
13321
|
ZodIssueCode: F,
|
|
13322
|
-
quotelessJson:
|
|
13322
|
+
quotelessJson: y1,
|
|
13323
13323
|
ZodError: _r
|
|
13324
13324
|
});
|
|
13325
13325
|
const Ua = new Uint8Array([48, 130, 2, 17, 48, 130, 1, 150, 160, 3, 2, 1, 2, 2, 17, 0, 249, 49, 117, 104, 27, 144, 175, 225, 29, 70, 204, 180, 228, 231, 248, 86, 48, 10, 6, 8, 42, 134, 72, 206, 61, 4, 3, 3, 48, 73, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 85, 83, 49, 15, 48, 13, 6, 3, 85, 4, 10, 12, 6, 65, 109, 97, 122, 111, 110, 49, 12, 48, 10, 6, 3, 85, 4, 11, 12, 3, 65, 87, 83, 49, 27, 48, 25, 6, 3, 85, 4, 3, 12, 18, 97, 119, 115, 46, 110, 105, 116, 114, 111, 45, 101, 110, 99, 108, 97, 118, 101, 115, 48, 30, 23, 13, 49, 57, 49, 48, 50, 56, 49, 51, 50, 56, 48, 53, 90, 23, 13, 52, 57, 49, 48, 50, 56, 49, 52, 50, 56, 48, 53, 90, 48, 73, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 85, 83, 49, 15, 48, 13, 6, 3, 85, 4, 10, 12, 6, 65, 109, 97, 122, 111, 110, 49, 12, 48, 10, 6, 3, 85, 4, 11, 12, 3, 65, 87, 83, 49, 27, 48, 25, 6, 3, 85, 4, 3, 12, 18, 97, 119, 115, 46, 110, 105, 116, 114, 111, 45, 101, 110, 99, 108, 97, 118, 101, 115, 48, 118, 48, 16, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 5, 43, 129, 4, 0, 34, 3, 98, 0, 4, 252, 2, 84, 235, 166, 8, 193, 243, 104, 112, 226, 154, 218, 144, 190, 70, 56, 50, 146, 115, 110, 137, 75, 255, 246, 114, 217, 137, 68, 75, 80, 81, 229, 52, 164, 177, 246, 219, 227, 192, 188, 88, 26, 50, 183, 177, 118, 7, 14, 222, 18, 214, 154, 63, 234, 33, 27, 102, 231, 82, 207, 125, 209, 221, 9, 95, 111, 19, 112, 244, 23, 8, 67, 217, 220, 16, 1, 33, 228, 207, 99, 1, 40, 9, 102, 68, 135, 201, 121, 98, 132, 48, 77, 197, 63, 244, 163, 66, 48, 64, 48, 15, 6, 3, 85, 29, 19, 1, 1, 255, 4, 5, 48, 3, 1, 1, 255, 48, 29, 6, 3, 85, 29, 14, 4, 22, 4, 20, 144, 37, 181, 13, 217, 5, 71, 231, 150, 195, 150, 250, 114, 157, 207, 153, 169, 223, 75, 150, 48, 14, 6, 3, 85, 29, 15, 1, 1, 255, 4, 4, 3, 2, 1, 134, 48, 10, 6, 8, 42, 134, 72, 206, 61, 4, 3, 3, 3, 105, 0, 48, 102, 2, 49, 0, 163, 127, 47, 145, 161, 201, 189, 94, 231, 184, 98, 124, 22, 152, 210, 85, 3, 142, 31, 3, 67, 249, 91, 99, 169, 98, 140, 61, 57, 128, 149, 69, 161, 30, 188, 191, 46, 59, 85, 216, 174, 238, 113, 180, 195, 214, 173, 243, 2, 49, 0, 162, 243, 155, 22, 5, 178, 112, 40, 165, 221, 75, 160, 105, 181, 1, 110, 101, 180, 251, 222, 143, 224, 6, 29, 106, 83, 25, 127, 156, 218, 245, 217, 67, 188, 97, 252, 43, 235, 3, 203, 111, 238, 141, 35, 2, 243, 223, 246]);
|
|
13326
13326
|
if (!Ua || Ua.length === 0)
|
|
13327
13327
|
throw new Error("AWS root certificate is empty or not loaded correctly");
|
|
13328
|
-
const
|
|
13328
|
+
const vm = It.object({
|
|
13329
13329
|
module_id: It.string().min(1),
|
|
13330
13330
|
digest: It.literal("SHA384"),
|
|
13331
13331
|
timestamp: It.number().min(1677721600),
|
|
@@ -13335,18 +13335,18 @@ const ym = It.object({
|
|
|
13335
13335
|
public_key: It.nullable(It.instanceof(Uint8Array)),
|
|
13336
13336
|
user_data: It.nullable(It.instanceof(Uint8Array)),
|
|
13337
13337
|
nonce: It.nullable(It.instanceof(Uint8Array))
|
|
13338
|
-
}),
|
|
13338
|
+
}), mm = It.object({
|
|
13339
13339
|
protected: It.instanceof(Uint8Array),
|
|
13340
13340
|
// There's an "unprotected" header in the CBOR, but we never use it
|
|
13341
13341
|
payload: It.instanceof(Uint8Array),
|
|
13342
13342
|
signature: It.instanceof(Uint8Array)
|
|
13343
13343
|
});
|
|
13344
|
-
async function
|
|
13344
|
+
async function wm(r) {
|
|
13345
13345
|
try {
|
|
13346
13346
|
if (!r)
|
|
13347
13347
|
throw new Error("Attestation document is empty.");
|
|
13348
13348
|
const e = Rs(r), t = Ca(e), n = t[0], i = t[2], s = t[3];
|
|
13349
|
-
return
|
|
13349
|
+
return mm.parse({
|
|
13350
13350
|
protected: n,
|
|
13351
13351
|
payload: i,
|
|
13352
13352
|
signature: s
|
|
@@ -13355,15 +13355,15 @@ async function vm(r) {
|
|
|
13355
13355
|
throw console.error("Error parsing document data:", e), new Error("Failed to parse document data.");
|
|
13356
13356
|
}
|
|
13357
13357
|
}
|
|
13358
|
-
async function
|
|
13358
|
+
async function bm(r) {
|
|
13359
13359
|
try {
|
|
13360
13360
|
const e = Ca(r);
|
|
13361
|
-
return
|
|
13361
|
+
return vm.parse(e);
|
|
13362
13362
|
} catch (e) {
|
|
13363
13363
|
throw console.error("Error parsing document payload:", e), new Error("Failed to parse document payload.");
|
|
13364
13364
|
}
|
|
13365
13365
|
}
|
|
13366
|
-
function
|
|
13366
|
+
function xm(r, e) {
|
|
13367
13367
|
const t = [
|
|
13368
13368
|
"Signature1",
|
|
13369
13369
|
// Context string
|
|
@@ -13376,10 +13376,10 @@ function wm(r, e) {
|
|
|
13376
13376
|
];
|
|
13377
13377
|
return Pc(t);
|
|
13378
13378
|
}
|
|
13379
|
-
async function
|
|
13379
|
+
async function Am(r, e) {
|
|
13380
13380
|
try {
|
|
13381
13381
|
console.log("SIGNATURE:"), console.log($r(r.signature));
|
|
13382
|
-
const t =
|
|
13382
|
+
const t = xm(r.protected, r.payload), n = await crypto.subtle.digest("SHA-384", t);
|
|
13383
13383
|
return console.log("SIGNATURE STRUCTURE DIGEST:"), console.log($r(new Uint8Array(n))), await crypto.subtle.verify(
|
|
13384
13384
|
// TODO: these could be derived from the document, but we're hardcoding them for now
|
|
13385
13385
|
{
|
|
@@ -13396,7 +13396,7 @@ async function bm(r, e) {
|
|
|
13396
13396
|
}
|
|
13397
13397
|
async function Si(r, e, t) {
|
|
13398
13398
|
try {
|
|
13399
|
-
const n = await
|
|
13399
|
+
const n = await wm(r), i = await bm(n.payload);
|
|
13400
13400
|
if (!i.nonce)
|
|
13401
13401
|
throw new Error("Attestation document does not have a nonce.");
|
|
13402
13402
|
const o = new TextDecoder("utf-8").decode(i.nonce);
|
|
@@ -13409,7 +13409,7 @@ async function Si(r, e, t) {
|
|
|
13409
13409
|
const j = new wi(i.cabundle[k]);
|
|
13410
13410
|
c.push(j);
|
|
13411
13411
|
}
|
|
13412
|
-
const h = new wi(i.certificate), x = await new
|
|
13412
|
+
const h = new wi(i.certificate), x = await new Lv({
|
|
13413
13413
|
certificates: c
|
|
13414
13414
|
}).build(h);
|
|
13415
13415
|
console.log("Chain items:", x);
|
|
@@ -13424,7 +13424,7 @@ async function Si(r, e, t) {
|
|
|
13424
13424
|
throw new Error("Certificate chain length does not match length of cabundle.");
|
|
13425
13425
|
const v = h.publicKey;
|
|
13426
13426
|
console.log("PUBLIC KEY:"), console.log($r(new Uint8Array(v.rawData)));
|
|
13427
|
-
const A = await v.export(), O = await
|
|
13427
|
+
const A = await v.export(), O = await Am(n, A);
|
|
13428
13428
|
if (console.log("Signature verified:", O), !O)
|
|
13429
13429
|
throw new Error("Signature verification failed.");
|
|
13430
13430
|
return i;
|
|
@@ -13432,29 +13432,29 @@ async function Si(r, e, t) {
|
|
|
13432
13432
|
throw console.error("Error verifying attestation document:", n), n;
|
|
13433
13433
|
}
|
|
13434
13434
|
}
|
|
13435
|
-
const
|
|
13435
|
+
const Sm = It.object({
|
|
13436
13436
|
public_key: It.nullable(It.instanceof(Uint8Array))
|
|
13437
13437
|
});
|
|
13438
|
-
async function
|
|
13438
|
+
async function _m(r) {
|
|
13439
13439
|
const e = Rs(r), n = Ca(e)[2], i = Ca(n);
|
|
13440
|
-
return await
|
|
13440
|
+
return await Sm.parse(i);
|
|
13441
13441
|
}
|
|
13442
|
-
async function
|
|
13442
|
+
async function Em(r, e) {
|
|
13443
13443
|
try {
|
|
13444
|
-
const t = await
|
|
13445
|
-
return n && (n === "http://127.0.0.1:3000" || n === "http://localhost:3000" || n === "http://0.0.0.0:3000") ? (console.log("DEV MODE: Using fake attestation document"), await
|
|
13444
|
+
const t = await qm(r, e), n = e || Vm();
|
|
13445
|
+
return n && (n === "http://127.0.0.1:3000" || n === "http://localhost:3000" || n === "http://0.0.0.0:3000") ? (console.log("DEV MODE: Using fake attestation document"), await _m(t)) : await Si(t, Ua, r);
|
|
13446
13446
|
} catch (t) {
|
|
13447
13447
|
throw t instanceof Error ? (console.error("Error verifying attestation document:", t), new Error(`Couldn't process attestation document: ${t.message}`)) : (console.error("Error verifying attestation document:", t), new Error("Couldn't process attestation document."));
|
|
13448
13448
|
}
|
|
13449
13449
|
}
|
|
13450
|
-
function
|
|
13450
|
+
function km(r) {
|
|
13451
13451
|
throw new Error('Could not dynamically require "' + r + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
13452
13452
|
}
|
|
13453
13453
|
var U0 = { exports: {} };
|
|
13454
|
-
const
|
|
13454
|
+
const Im = {}, Cm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
13455
13455
|
__proto__: null,
|
|
13456
|
-
default:
|
|
13457
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
13456
|
+
default: Im
|
|
13457
|
+
}, Symbol.toStringTag, { value: "Module" })), Bm = /* @__PURE__ */ Ky(Cm);
|
|
13458
13458
|
(function(r) {
|
|
13459
13459
|
(function(e) {
|
|
13460
13460
|
var t = function(l) {
|
|
@@ -13481,12 +13481,12 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13481
13481
|
return A(l, p, d, a, 32);
|
|
13482
13482
|
}
|
|
13483
13483
|
function j(l, p, d, a) {
|
|
13484
|
-
for (var g = a[0] & 255 | (a[1] & 255) << 8 | (a[2] & 255) << 16 | (a[3] & 255) << 24, S = d[0] & 255 | (d[1] & 255) << 8 | (d[2] & 255) << 16 | (d[3] & 255) << 24, E = d[4] & 255 | (d[5] & 255) << 8 | (d[6] & 255) << 16 | (d[7] & 255) << 24, U = d[8] & 255 | (d[9] & 255) << 8 | (d[10] & 255) << 16 | (d[11] & 255) << 24, z = d[12] & 255 | (d[13] & 255) << 8 | (d[14] & 255) << 16 | (d[15] & 255) << 24, be = a[4] & 255 | (a[5] & 255) << 8 | (a[6] & 255) << 16 | (a[7] & 255) << 24, Q = p[0] & 255 | (p[1] & 255) << 8 | (p[2] & 255) << 16 | (p[3] & 255) << 24,
|
|
13484
|
+
for (var g = a[0] & 255 | (a[1] & 255) << 8 | (a[2] & 255) << 16 | (a[3] & 255) << 24, S = d[0] & 255 | (d[1] & 255) << 8 | (d[2] & 255) << 16 | (d[3] & 255) << 24, E = d[4] & 255 | (d[5] & 255) << 8 | (d[6] & 255) << 16 | (d[7] & 255) << 24, U = d[8] & 255 | (d[9] & 255) << 8 | (d[10] & 255) << 16 | (d[11] & 255) << 24, z = d[12] & 255 | (d[13] & 255) << 8 | (d[14] & 255) << 16 | (d[15] & 255) << 24, be = a[4] & 255 | (a[5] & 255) << 8 | (a[6] & 255) << 16 | (a[7] & 255) << 24, Q = p[0] & 255 | (p[1] & 255) << 8 | (p[2] & 255) << 16 | (p[3] & 255) << 24, at = p[4] & 255 | (p[5] & 255) << 8 | (p[6] & 255) << 16 | (p[7] & 255) << 24, ue = p[8] & 255 | (p[9] & 255) << 8 | (p[10] & 255) << 16 | (p[11] & 255) << 24, Ce = p[12] & 255 | (p[13] & 255) << 8 | (p[14] & 255) << 16 | (p[15] & 255) << 24, Be = a[8] & 255 | (a[9] & 255) << 8 | (a[10] & 255) << 16 | (a[11] & 255) << 24, De = d[16] & 255 | (d[17] & 255) << 8 | (d[18] & 255) << 16 | (d[19] & 255) << 24, Pe = d[20] & 255 | (d[21] & 255) << 8 | (d[22] & 255) << 16 | (d[23] & 255) << 24, Oe = d[24] & 255 | (d[25] & 255) << 8 | (d[26] & 255) << 16 | (d[27] & 255) << 24, Ne = d[28] & 255 | (d[29] & 255) << 8 | (d[30] & 255) << 16 | (d[31] & 255) << 24, Te = a[12] & 255 | (a[13] & 255) << 8 | (a[14] & 255) << 16 | (a[15] & 255) << 24, pe = g, Ae = S, ie = E, ge = U, me = z, J = be, C = Q, B = at, V = ue, P = Ce, D = Be, L = De, _e = Pe, $e = Oe, He = Ne, Me = Te, w, qe = 0; qe < 20; qe += 2)
|
|
13485
13485
|
w = pe + _e | 0, me ^= w << 7 | w >>> 25, w = me + pe | 0, V ^= w << 9 | w >>> 23, w = V + me | 0, _e ^= w << 13 | w >>> 19, w = _e + V | 0, pe ^= w << 18 | w >>> 14, w = J + Ae | 0, P ^= w << 7 | w >>> 25, w = P + J | 0, $e ^= w << 9 | w >>> 23, w = $e + P | 0, Ae ^= w << 13 | w >>> 19, w = Ae + $e | 0, J ^= w << 18 | w >>> 14, w = D + C | 0, He ^= w << 7 | w >>> 25, w = He + D | 0, ie ^= w << 9 | w >>> 23, w = ie + He | 0, C ^= w << 13 | w >>> 19, w = C + ie | 0, D ^= w << 18 | w >>> 14, w = Me + L | 0, ge ^= w << 7 | w >>> 25, w = ge + Me | 0, B ^= w << 9 | w >>> 23, w = B + ge | 0, L ^= w << 13 | w >>> 19, w = L + B | 0, Me ^= w << 18 | w >>> 14, w = pe + ge | 0, Ae ^= w << 7 | w >>> 25, w = Ae + pe | 0, ie ^= w << 9 | w >>> 23, w = ie + Ae | 0, ge ^= w << 13 | w >>> 19, w = ge + ie | 0, pe ^= w << 18 | w >>> 14, w = J + me | 0, C ^= w << 7 | w >>> 25, w = C + J | 0, B ^= w << 9 | w >>> 23, w = B + C | 0, me ^= w << 13 | w >>> 19, w = me + B | 0, J ^= w << 18 | w >>> 14, w = D + P | 0, L ^= w << 7 | w >>> 25, w = L + D | 0, V ^= w << 9 | w >>> 23, w = V + L | 0, P ^= w << 13 | w >>> 19, w = P + V | 0, D ^= w << 18 | w >>> 14, w = Me + He | 0, _e ^= w << 7 | w >>> 25, w = _e + Me | 0, $e ^= w << 9 | w >>> 23, w = $e + _e | 0, He ^= w << 13 | w >>> 19, w = He + $e | 0, Me ^= w << 18 | w >>> 14;
|
|
13486
|
-
pe = pe + g | 0, Ae = Ae + S | 0, ie = ie + E | 0, ge = ge + U | 0, me = me + z | 0, J = J + be | 0, C = C + Q | 0, B = B +
|
|
13486
|
+
pe = pe + g | 0, Ae = Ae + S | 0, ie = ie + E | 0, ge = ge + U | 0, me = me + z | 0, J = J + be | 0, C = C + Q | 0, B = B + at | 0, V = V + ue | 0, P = P + Ce | 0, D = D + Be | 0, L = L + De | 0, _e = _e + Pe | 0, $e = $e + Oe | 0, He = He + Ne | 0, Me = Me + Te | 0, l[0] = pe >>> 0 & 255, l[1] = pe >>> 8 & 255, l[2] = pe >>> 16 & 255, l[3] = pe >>> 24 & 255, l[4] = Ae >>> 0 & 255, l[5] = Ae >>> 8 & 255, l[6] = Ae >>> 16 & 255, l[7] = Ae >>> 24 & 255, l[8] = ie >>> 0 & 255, l[9] = ie >>> 8 & 255, l[10] = ie >>> 16 & 255, l[11] = ie >>> 24 & 255, l[12] = ge >>> 0 & 255, l[13] = ge >>> 8 & 255, l[14] = ge >>> 16 & 255, l[15] = ge >>> 24 & 255, l[16] = me >>> 0 & 255, l[17] = me >>> 8 & 255, l[18] = me >>> 16 & 255, l[19] = me >>> 24 & 255, l[20] = J >>> 0 & 255, l[21] = J >>> 8 & 255, l[22] = J >>> 16 & 255, l[23] = J >>> 24 & 255, l[24] = C >>> 0 & 255, l[25] = C >>> 8 & 255, l[26] = C >>> 16 & 255, l[27] = C >>> 24 & 255, l[28] = B >>> 0 & 255, l[29] = B >>> 8 & 255, l[30] = B >>> 16 & 255, l[31] = B >>> 24 & 255, l[32] = V >>> 0 & 255, l[33] = V >>> 8 & 255, l[34] = V >>> 16 & 255, l[35] = V >>> 24 & 255, l[36] = P >>> 0 & 255, l[37] = P >>> 8 & 255, l[38] = P >>> 16 & 255, l[39] = P >>> 24 & 255, l[40] = D >>> 0 & 255, l[41] = D >>> 8 & 255, l[42] = D >>> 16 & 255, l[43] = D >>> 24 & 255, l[44] = L >>> 0 & 255, l[45] = L >>> 8 & 255, l[46] = L >>> 16 & 255, l[47] = L >>> 24 & 255, l[48] = _e >>> 0 & 255, l[49] = _e >>> 8 & 255, l[50] = _e >>> 16 & 255, l[51] = _e >>> 24 & 255, l[52] = $e >>> 0 & 255, l[53] = $e >>> 8 & 255, l[54] = $e >>> 16 & 255, l[55] = $e >>> 24 & 255, l[56] = He >>> 0 & 255, l[57] = He >>> 8 & 255, l[58] = He >>> 16 & 255, l[59] = He >>> 24 & 255, l[60] = Me >>> 0 & 255, l[61] = Me >>> 8 & 255, l[62] = Me >>> 16 & 255, l[63] = Me >>> 24 & 255;
|
|
13487
13487
|
}
|
|
13488
13488
|
function R(l, p, d, a) {
|
|
13489
|
-
for (var g = a[0] & 255 | (a[1] & 255) << 8 | (a[2] & 255) << 16 | (a[3] & 255) << 24, S = d[0] & 255 | (d[1] & 255) << 8 | (d[2] & 255) << 16 | (d[3] & 255) << 24, E = d[4] & 255 | (d[5] & 255) << 8 | (d[6] & 255) << 16 | (d[7] & 255) << 24, U = d[8] & 255 | (d[9] & 255) << 8 | (d[10] & 255) << 16 | (d[11] & 255) << 24, z = d[12] & 255 | (d[13] & 255) << 8 | (d[14] & 255) << 16 | (d[15] & 255) << 24, be = a[4] & 255 | (a[5] & 255) << 8 | (a[6] & 255) << 16 | (a[7] & 255) << 24, Q = p[0] & 255 | (p[1] & 255) << 8 | (p[2] & 255) << 16 | (p[3] & 255) << 24,
|
|
13489
|
+
for (var g = a[0] & 255 | (a[1] & 255) << 8 | (a[2] & 255) << 16 | (a[3] & 255) << 24, S = d[0] & 255 | (d[1] & 255) << 8 | (d[2] & 255) << 16 | (d[3] & 255) << 24, E = d[4] & 255 | (d[5] & 255) << 8 | (d[6] & 255) << 16 | (d[7] & 255) << 24, U = d[8] & 255 | (d[9] & 255) << 8 | (d[10] & 255) << 16 | (d[11] & 255) << 24, z = d[12] & 255 | (d[13] & 255) << 8 | (d[14] & 255) << 16 | (d[15] & 255) << 24, be = a[4] & 255 | (a[5] & 255) << 8 | (a[6] & 255) << 16 | (a[7] & 255) << 24, Q = p[0] & 255 | (p[1] & 255) << 8 | (p[2] & 255) << 16 | (p[3] & 255) << 24, at = p[4] & 255 | (p[5] & 255) << 8 | (p[6] & 255) << 16 | (p[7] & 255) << 24, ue = p[8] & 255 | (p[9] & 255) << 8 | (p[10] & 255) << 16 | (p[11] & 255) << 24, Ce = p[12] & 255 | (p[13] & 255) << 8 | (p[14] & 255) << 16 | (p[15] & 255) << 24, Be = a[8] & 255 | (a[9] & 255) << 8 | (a[10] & 255) << 16 | (a[11] & 255) << 24, De = d[16] & 255 | (d[17] & 255) << 8 | (d[18] & 255) << 16 | (d[19] & 255) << 24, Pe = d[20] & 255 | (d[21] & 255) << 8 | (d[22] & 255) << 16 | (d[23] & 255) << 24, Oe = d[24] & 255 | (d[25] & 255) << 8 | (d[26] & 255) << 16 | (d[27] & 255) << 24, Ne = d[28] & 255 | (d[29] & 255) << 8 | (d[30] & 255) << 16 | (d[31] & 255) << 24, Te = a[12] & 255 | (a[13] & 255) << 8 | (a[14] & 255) << 16 | (a[15] & 255) << 24, pe = g, Ae = S, ie = E, ge = U, me = z, J = be, C = Q, B = at, V = ue, P = Ce, D = Be, L = De, _e = Pe, $e = Oe, He = Ne, Me = Te, w, qe = 0; qe < 20; qe += 2)
|
|
13490
13490
|
w = pe + _e | 0, me ^= w << 7 | w >>> 25, w = me + pe | 0, V ^= w << 9 | w >>> 23, w = V + me | 0, _e ^= w << 13 | w >>> 19, w = _e + V | 0, pe ^= w << 18 | w >>> 14, w = J + Ae | 0, P ^= w << 7 | w >>> 25, w = P + J | 0, $e ^= w << 9 | w >>> 23, w = $e + P | 0, Ae ^= w << 13 | w >>> 19, w = Ae + $e | 0, J ^= w << 18 | w >>> 14, w = D + C | 0, He ^= w << 7 | w >>> 25, w = He + D | 0, ie ^= w << 9 | w >>> 23, w = ie + He | 0, C ^= w << 13 | w >>> 19, w = C + ie | 0, D ^= w << 18 | w >>> 14, w = Me + L | 0, ge ^= w << 7 | w >>> 25, w = ge + Me | 0, B ^= w << 9 | w >>> 23, w = B + ge | 0, L ^= w << 13 | w >>> 19, w = L + B | 0, Me ^= w << 18 | w >>> 14, w = pe + ge | 0, Ae ^= w << 7 | w >>> 25, w = Ae + pe | 0, ie ^= w << 9 | w >>> 23, w = ie + Ae | 0, ge ^= w << 13 | w >>> 19, w = ge + ie | 0, pe ^= w << 18 | w >>> 14, w = J + me | 0, C ^= w << 7 | w >>> 25, w = C + J | 0, B ^= w << 9 | w >>> 23, w = B + C | 0, me ^= w << 13 | w >>> 19, w = me + B | 0, J ^= w << 18 | w >>> 14, w = D + P | 0, L ^= w << 7 | w >>> 25, w = L + D | 0, V ^= w << 9 | w >>> 23, w = V + L | 0, P ^= w << 13 | w >>> 19, w = P + V | 0, D ^= w << 18 | w >>> 14, w = Me + He | 0, _e ^= w << 7 | w >>> 25, w = _e + Me | 0, $e ^= w << 9 | w >>> 23, w = $e + _e | 0, He ^= w << 13 | w >>> 19, w = He + $e | 0, Me ^= w << 18 | w >>> 14;
|
|
13491
13491
|
l[0] = pe >>> 0 & 255, l[1] = pe >>> 8 & 255, l[2] = pe >>> 16 & 255, l[3] = pe >>> 24 & 255, l[4] = J >>> 0 & 255, l[5] = J >>> 8 & 255, l[6] = J >>> 16 & 255, l[7] = J >>> 24 & 255, l[8] = D >>> 0 & 255, l[9] = D >>> 8 & 255, l[10] = D >>> 16 & 255, l[11] = D >>> 24 & 255, l[12] = Me >>> 0 & 255, l[13] = Me >>> 8 & 255, l[14] = Me >>> 16 & 255, l[15] = Me >>> 24 & 255, l[16] = C >>> 0 & 255, l[17] = C >>> 8 & 255, l[18] = C >>> 16 & 255, l[19] = C >>> 24 & 255, l[20] = B >>> 0 & 255, l[21] = B >>> 8 & 255, l[22] = B >>> 16 & 255, l[23] = B >>> 24 & 255, l[24] = V >>> 0 & 255, l[25] = V >>> 8 & 255, l[26] = V >>> 16 & 255, l[27] = V >>> 24 & 255, l[28] = P >>> 0 & 255, l[29] = P >>> 8 & 255, l[30] = P >>> 16 & 255, l[31] = P >>> 24 & 255;
|
|
13492
13492
|
}
|
|
@@ -13525,13 +13525,13 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13525
13525
|
for (le(E, S, g, re), z = 0; z < d; z++) l[p + z] = E[z];
|
|
13526
13526
|
return 0;
|
|
13527
13527
|
}
|
|
13528
|
-
function
|
|
13528
|
+
function ze(l, p, d, a, g) {
|
|
13529
13529
|
var S = new Uint8Array(32);
|
|
13530
13530
|
X(S, a, g, re);
|
|
13531
13531
|
for (var E = new Uint8Array(8), U = 0; U < 8; U++) E[U] = a[U + 16];
|
|
13532
13532
|
return ye(l, p, d, E, S);
|
|
13533
13533
|
}
|
|
13534
|
-
function
|
|
13534
|
+
function ut(l, p, d, a, g, S, E) {
|
|
13535
13535
|
var U = new Uint8Array(32);
|
|
13536
13536
|
X(U, S, E, re);
|
|
13537
13537
|
for (var z = new Uint8Array(8), be = 0; be < 8; be++) z[be] = S[be + 16];
|
|
@@ -13543,8 +13543,8 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13543
13543
|
p = l[0] & 255 | (l[1] & 255) << 8, this.r[0] = p & 8191, d = l[2] & 255 | (l[3] & 255) << 8, this.r[1] = (p >>> 13 | d << 3) & 8191, a = l[4] & 255 | (l[5] & 255) << 8, this.r[2] = (d >>> 10 | a << 6) & 7939, g = l[6] & 255 | (l[7] & 255) << 8, this.r[3] = (a >>> 7 | g << 9) & 8191, S = l[8] & 255 | (l[9] & 255) << 8, this.r[4] = (g >>> 4 | S << 12) & 255, this.r[5] = S >>> 1 & 8190, E = l[10] & 255 | (l[11] & 255) << 8, this.r[6] = (S >>> 14 | E << 2) & 8191, U = l[12] & 255 | (l[13] & 255) << 8, this.r[7] = (E >>> 11 | U << 5) & 8065, z = l[14] & 255 | (l[15] & 255) << 8, this.r[8] = (U >>> 8 | z << 8) & 8191, this.r[9] = z >>> 5 & 127, this.pad[0] = l[16] & 255 | (l[17] & 255) << 8, this.pad[1] = l[18] & 255 | (l[19] & 255) << 8, this.pad[2] = l[20] & 255 | (l[21] & 255) << 8, this.pad[3] = l[22] & 255 | (l[23] & 255) << 8, this.pad[4] = l[24] & 255 | (l[25] & 255) << 8, this.pad[5] = l[26] & 255 | (l[27] & 255) << 8, this.pad[6] = l[28] & 255 | (l[29] & 255) << 8, this.pad[7] = l[30] & 255 | (l[31] & 255) << 8;
|
|
13544
13544
|
};
|
|
13545
13545
|
St.prototype.blocks = function(l, p, d) {
|
|
13546
|
-
for (var a = this.fin ? 0 : 2048, g, S, E, U, z, be, Q,
|
|
13547
|
-
g = l[p + 0] & 255 | (l[p + 1] & 255) << 8, ge += g & 8191, S = l[p + 2] & 255 | (l[p + 3] & 255) << 8, me += (g >>> 13 | S << 3) & 8191, E = l[p + 4] & 255 | (l[p + 5] & 255) << 8, J += (S >>> 10 | E << 6) & 8191, U = l[p + 6] & 255 | (l[p + 7] & 255) << 8, C += (E >>> 7 | U << 9) & 8191, z = l[p + 8] & 255 | (l[p + 9] & 255) << 8, B += (U >>> 4 | z << 12) & 8191, V += z >>> 1 & 8191, be = l[p + 10] & 255 | (l[p + 11] & 255) << 8, P += (z >>> 14 | be << 2) & 8191, Q = l[p + 12] & 255 | (l[p + 13] & 255) << 8, D += (be >>> 11 | Q << 5) & 8191,
|
|
13546
|
+
for (var a = this.fin ? 0 : 2048, g, S, E, U, z, be, Q, at, ue, Ce, Be, De, Pe, Oe, Ne, Te, pe, Ae, ie, ge = this.h[0], me = this.h[1], J = this.h[2], C = this.h[3], B = this.h[4], V = this.h[5], P = this.h[6], D = this.h[7], L = this.h[8], _e = this.h[9], $e = this.r[0], He = this.r[1], Me = this.r[2], w = this.r[3], qe = this.r[4], ct = this.r[5], lt = this.r[6], Ge = this.r[7], rt = this.r[8], nt = this.r[9]; d >= 16; )
|
|
13547
|
+
g = l[p + 0] & 255 | (l[p + 1] & 255) << 8, ge += g & 8191, S = l[p + 2] & 255 | (l[p + 3] & 255) << 8, me += (g >>> 13 | S << 3) & 8191, E = l[p + 4] & 255 | (l[p + 5] & 255) << 8, J += (S >>> 10 | E << 6) & 8191, U = l[p + 6] & 255 | (l[p + 7] & 255) << 8, C += (E >>> 7 | U << 9) & 8191, z = l[p + 8] & 255 | (l[p + 9] & 255) << 8, B += (U >>> 4 | z << 12) & 8191, V += z >>> 1 & 8191, be = l[p + 10] & 255 | (l[p + 11] & 255) << 8, P += (z >>> 14 | be << 2) & 8191, Q = l[p + 12] & 255 | (l[p + 13] & 255) << 8, D += (be >>> 11 | Q << 5) & 8191, at = l[p + 14] & 255 | (l[p + 15] & 255) << 8, L += (Q >>> 8 | at << 8) & 8191, _e += at >>> 5 | a, ue = 0, Ce = ue, Ce += ge * $e, Ce += me * (5 * nt), Ce += J * (5 * rt), Ce += C * (5 * Ge), Ce += B * (5 * lt), ue = Ce >>> 13, Ce &= 8191, Ce += V * (5 * ct), Ce += P * (5 * qe), Ce += D * (5 * w), Ce += L * (5 * Me), Ce += _e * (5 * He), ue += Ce >>> 13, Ce &= 8191, Be = ue, Be += ge * He, Be += me * $e, Be += J * (5 * nt), Be += C * (5 * rt), Be += B * (5 * Ge), ue = Be >>> 13, Be &= 8191, Be += V * (5 * lt), Be += P * (5 * ct), Be += D * (5 * qe), Be += L * (5 * w), Be += _e * (5 * Me), ue += Be >>> 13, Be &= 8191, De = ue, De += ge * Me, De += me * He, De += J * $e, De += C * (5 * nt), De += B * (5 * rt), ue = De >>> 13, De &= 8191, De += V * (5 * Ge), De += P * (5 * lt), De += D * (5 * ct), De += L * (5 * qe), De += _e * (5 * w), ue += De >>> 13, De &= 8191, Pe = ue, Pe += ge * w, Pe += me * Me, Pe += J * He, Pe += C * $e, Pe += B * (5 * nt), ue = Pe >>> 13, Pe &= 8191, Pe += V * (5 * rt), Pe += P * (5 * Ge), Pe += D * (5 * lt), Pe += L * (5 * ct), Pe += _e * (5 * qe), ue += Pe >>> 13, Pe &= 8191, Oe = ue, Oe += ge * qe, Oe += me * w, Oe += J * Me, Oe += C * He, Oe += B * $e, ue = Oe >>> 13, Oe &= 8191, Oe += V * (5 * nt), Oe += P * (5 * rt), Oe += D * (5 * Ge), Oe += L * (5 * lt), Oe += _e * (5 * ct), ue += Oe >>> 13, Oe &= 8191, Ne = ue, Ne += ge * ct, Ne += me * qe, Ne += J * w, Ne += C * Me, Ne += B * He, ue = Ne >>> 13, Ne &= 8191, Ne += V * $e, Ne += P * (5 * nt), Ne += D * (5 * rt), Ne += L * (5 * Ge), Ne += _e * (5 * lt), ue += Ne >>> 13, Ne &= 8191, Te = ue, Te += ge * lt, Te += me * ct, Te += J * qe, Te += C * w, Te += B * Me, ue = Te >>> 13, Te &= 8191, Te += V * He, Te += P * $e, Te += D * (5 * nt), Te += L * (5 * rt), Te += _e * (5 * Ge), ue += Te >>> 13, Te &= 8191, pe = ue, pe += ge * Ge, pe += me * lt, pe += J * ct, pe += C * qe, pe += B * w, ue = pe >>> 13, pe &= 8191, pe += V * Me, pe += P * He, pe += D * $e, pe += L * (5 * nt), pe += _e * (5 * rt), ue += pe >>> 13, pe &= 8191, Ae = ue, Ae += ge * rt, Ae += me * Ge, Ae += J * lt, Ae += C * ct, Ae += B * qe, ue = Ae >>> 13, Ae &= 8191, Ae += V * w, Ae += P * Me, Ae += D * He, Ae += L * $e, Ae += _e * (5 * nt), ue += Ae >>> 13, Ae &= 8191, ie = ue, ie += ge * nt, ie += me * rt, ie += J * Ge, ie += C * lt, ie += B * ct, ue = ie >>> 13, ie &= 8191, ie += V * qe, ie += P * w, ie += D * Me, ie += L * He, ie += _e * $e, ue += ie >>> 13, ie &= 8191, ue = (ue << 2) + ue | 0, ue = ue + Ce | 0, Ce = ue & 8191, ue = ue >>> 13, Be += ue, ge = Ce, me = Be, J = De, C = Pe, B = Oe, V = Ne, P = Te, D = pe, L = Ae, _e = ie, p += 16, d -= 16;
|
|
13548
13548
|
this.h[0] = ge, this.h[1] = me, this.h[2] = J, this.h[3] = C, this.h[4] = B, this.h[5] = V, this.h[6] = P, this.h[7] = D, this.h[8] = L, this.h[9] = _e;
|
|
13549
13549
|
}, St.prototype.finish = function(l, p) {
|
|
13550
13550
|
var d = new Uint16Array(10), a, g, S, E;
|
|
@@ -13587,13 +13587,13 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13587
13587
|
function _t(l, p, d, a, g) {
|
|
13588
13588
|
var S;
|
|
13589
13589
|
if (d < 32) return -1;
|
|
13590
|
-
for (
|
|
13590
|
+
for (ut(l, 0, p, 0, d, a, g), Bt(l, 16, l, 32, d - 32, l), S = 0; S < 16; S++) l[S] = 0;
|
|
13591
13591
|
return 0;
|
|
13592
13592
|
}
|
|
13593
|
-
function
|
|
13593
|
+
function ft(l, p, d, a, g) {
|
|
13594
13594
|
var S, E = new Uint8Array(32);
|
|
13595
|
-
if (d < 32 || (
|
|
13596
|
-
for (
|
|
13595
|
+
if (d < 32 || (ze(E, 0, 32, a, g), Ot(p, 16, p, 32, d - 32, E) !== 0)) return -1;
|
|
13596
|
+
for (ut(l, 0, p, 0, d, a, g), S = 0; S < 32; S++) l[S] = 0;
|
|
13597
13597
|
return 0;
|
|
13598
13598
|
}
|
|
13599
13599
|
function Ye(l, p) {
|
|
@@ -13641,8 +13641,8 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13641
13641
|
for (var a = 0; a < 16; a++) l[a] = p[a] - d[a];
|
|
13642
13642
|
}
|
|
13643
13643
|
function te(l, p, d) {
|
|
13644
|
-
var a, g, S = 0, E = 0, U = 0, z = 0, be = 0, Q = 0,
|
|
13645
|
-
a = p[0], S += a * w, E += a *
|
|
13644
|
+
var a, g, S = 0, E = 0, U = 0, z = 0, be = 0, Q = 0, at = 0, ue = 0, Ce = 0, Be = 0, De = 0, Pe = 0, Oe = 0, Ne = 0, Te = 0, pe = 0, Ae = 0, ie = 0, ge = 0, me = 0, J = 0, C = 0, B = 0, V = 0, P = 0, D = 0, L = 0, _e = 0, $e = 0, He = 0, Me = 0, w = d[0], qe = d[1], ct = d[2], lt = d[3], Ge = d[4], rt = d[5], nt = d[6], Dt = d[7], vt = d[8], Tt = d[9], Nt = d[10], jt = d[11], Lt = d[12], Qt = d[13], er = d[14], tr = d[15];
|
|
13645
|
+
a = p[0], S += a * w, E += a * qe, U += a * ct, z += a * lt, be += a * Ge, Q += a * rt, at += a * nt, ue += a * Dt, Ce += a * vt, Be += a * Tt, De += a * Nt, Pe += a * jt, Oe += a * Lt, Ne += a * Qt, Te += a * er, pe += a * tr, a = p[1], E += a * w, U += a * qe, z += a * ct, be += a * lt, Q += a * Ge, at += a * rt, ue += a * nt, Ce += a * Dt, Be += a * vt, De += a * Tt, Pe += a * Nt, Oe += a * jt, Ne += a * Lt, Te += a * Qt, pe += a * er, Ae += a * tr, a = p[2], U += a * w, z += a * qe, be += a * ct, Q += a * lt, at += a * Ge, ue += a * rt, Ce += a * nt, Be += a * Dt, De += a * vt, Pe += a * Tt, Oe += a * Nt, Ne += a * jt, Te += a * Lt, pe += a * Qt, Ae += a * er, ie += a * tr, a = p[3], z += a * w, be += a * qe, Q += a * ct, at += a * lt, ue += a * Ge, Ce += a * rt, Be += a * nt, De += a * Dt, Pe += a * vt, Oe += a * Tt, Ne += a * Nt, Te += a * jt, pe += a * Lt, Ae += a * Qt, ie += a * er, ge += a * tr, a = p[4], be += a * w, Q += a * qe, at += a * ct, ue += a * lt, Ce += a * Ge, Be += a * rt, De += a * nt, Pe += a * Dt, Oe += a * vt, Ne += a * Tt, Te += a * Nt, pe += a * jt, Ae += a * Lt, ie += a * Qt, ge += a * er, me += a * tr, a = p[5], Q += a * w, at += a * qe, ue += a * ct, Ce += a * lt, Be += a * Ge, De += a * rt, Pe += a * nt, Oe += a * Dt, Ne += a * vt, Te += a * Tt, pe += a * Nt, Ae += a * jt, ie += a * Lt, ge += a * Qt, me += a * er, J += a * tr, a = p[6], at += a * w, ue += a * qe, Ce += a * ct, Be += a * lt, De += a * Ge, Pe += a * rt, Oe += a * nt, Ne += a * Dt, Te += a * vt, pe += a * Tt, Ae += a * Nt, ie += a * jt, ge += a * Lt, me += a * Qt, J += a * er, C += a * tr, a = p[7], ue += a * w, Ce += a * qe, Be += a * ct, De += a * lt, Pe += a * Ge, Oe += a * rt, Ne += a * nt, Te += a * Dt, pe += a * vt, Ae += a * Tt, ie += a * Nt, ge += a * jt, me += a * Lt, J += a * Qt, C += a * er, B += a * tr, a = p[8], Ce += a * w, Be += a * qe, De += a * ct, Pe += a * lt, Oe += a * Ge, Ne += a * rt, Te += a * nt, pe += a * Dt, Ae += a * vt, ie += a * Tt, ge += a * Nt, me += a * jt, J += a * Lt, C += a * Qt, B += a * er, V += a * tr, a = p[9], Be += a * w, De += a * qe, Pe += a * ct, Oe += a * lt, Ne += a * Ge, Te += a * rt, pe += a * nt, Ae += a * Dt, ie += a * vt, ge += a * Tt, me += a * Nt, J += a * jt, C += a * Lt, B += a * Qt, V += a * er, P += a * tr, a = p[10], De += a * w, Pe += a * qe, Oe += a * ct, Ne += a * lt, Te += a * Ge, pe += a * rt, Ae += a * nt, ie += a * Dt, ge += a * vt, me += a * Tt, J += a * Nt, C += a * jt, B += a * Lt, V += a * Qt, P += a * er, D += a * tr, a = p[11], Pe += a * w, Oe += a * qe, Ne += a * ct, Te += a * lt, pe += a * Ge, Ae += a * rt, ie += a * nt, ge += a * Dt, me += a * vt, J += a * Tt, C += a * Nt, B += a * jt, V += a * Lt, P += a * Qt, D += a * er, L += a * tr, a = p[12], Oe += a * w, Ne += a * qe, Te += a * ct, pe += a * lt, Ae += a * Ge, ie += a * rt, ge += a * nt, me += a * Dt, J += a * vt, C += a * Tt, B += a * Nt, V += a * jt, P += a * Lt, D += a * Qt, L += a * er, _e += a * tr, a = p[13], Ne += a * w, Te += a * qe, pe += a * ct, Ae += a * lt, ie += a * Ge, ge += a * rt, me += a * nt, J += a * Dt, C += a * vt, B += a * Tt, V += a * Nt, P += a * jt, D += a * Lt, L += a * Qt, _e += a * er, $e += a * tr, a = p[14], Te += a * w, pe += a * qe, Ae += a * ct, ie += a * lt, ge += a * Ge, me += a * rt, J += a * nt, C += a * Dt, B += a * vt, V += a * Tt, P += a * Nt, D += a * jt, L += a * Lt, _e += a * Qt, $e += a * er, He += a * tr, a = p[15], pe += a * w, Ae += a * qe, ie += a * ct, ge += a * lt, me += a * Ge, J += a * rt, C += a * nt, B += a * Dt, V += a * vt, P += a * Tt, D += a * Nt, L += a * jt, _e += a * Lt, $e += a * Qt, He += a * er, Me += a * tr, S += 38 * Ae, E += 38 * ie, U += 38 * ge, z += 38 * me, be += 38 * J, Q += 38 * C, at += 38 * B, ue += 38 * V, Ce += 38 * P, Be += 38 * D, De += 38 * L, Pe += 38 * _e, Oe += 38 * $e, Ne += 38 * He, Te += 38 * Me, g = 1, a = S + g + 65535, g = Math.floor(a / 65536), S = a - g * 65536, a = E + g + 65535, g = Math.floor(a / 65536), E = a - g * 65536, a = U + g + 65535, g = Math.floor(a / 65536), U = a - g * 65536, a = z + g + 65535, g = Math.floor(a / 65536), z = a - g * 65536, a = be + g + 65535, g = Math.floor(a / 65536), be = a - g * 65536, a = Q + g + 65535, g = Math.floor(a / 65536), Q = a - g * 65536, a = at + g + 65535, g = Math.floor(a / 65536), at = a - g * 65536, a = ue + g + 65535, g = Math.floor(a / 65536), ue = a - g * 65536, a = Ce + g + 65535, g = Math.floor(a / 65536), Ce = a - g * 65536, a = Be + g + 65535, g = Math.floor(a / 65536), Be = a - g * 65536, a = De + g + 65535, g = Math.floor(a / 65536), De = a - g * 65536, a = Pe + g + 65535, g = Math.floor(a / 65536), Pe = a - g * 65536, a = Oe + g + 65535, g = Math.floor(a / 65536), Oe = a - g * 65536, a = Ne + g + 65535, g = Math.floor(a / 65536), Ne = a - g * 65536, a = Te + g + 65535, g = Math.floor(a / 65536), Te = a - g * 65536, a = pe + g + 65535, g = Math.floor(a / 65536), pe = a - g * 65536, S += g - 1 + 37 * (g - 1), g = 1, a = S + g + 65535, g = Math.floor(a / 65536), S = a - g * 65536, a = E + g + 65535, g = Math.floor(a / 65536), E = a - g * 65536, a = U + g + 65535, g = Math.floor(a / 65536), U = a - g * 65536, a = z + g + 65535, g = Math.floor(a / 65536), z = a - g * 65536, a = be + g + 65535, g = Math.floor(a / 65536), be = a - g * 65536, a = Q + g + 65535, g = Math.floor(a / 65536), Q = a - g * 65536, a = at + g + 65535, g = Math.floor(a / 65536), at = a - g * 65536, a = ue + g + 65535, g = Math.floor(a / 65536), ue = a - g * 65536, a = Ce + g + 65535, g = Math.floor(a / 65536), Ce = a - g * 65536, a = Be + g + 65535, g = Math.floor(a / 65536), Be = a - g * 65536, a = De + g + 65535, g = Math.floor(a / 65536), De = a - g * 65536, a = Pe + g + 65535, g = Math.floor(a / 65536), Pe = a - g * 65536, a = Oe + g + 65535, g = Math.floor(a / 65536), Oe = a - g * 65536, a = Ne + g + 65535, g = Math.floor(a / 65536), Ne = a - g * 65536, a = Te + g + 65535, g = Math.floor(a / 65536), Te = a - g * 65536, a = pe + g + 65535, g = Math.floor(a / 65536), pe = a - g * 65536, S += g - 1 + 37 * (g - 1), l[0] = S, l[1] = E, l[2] = U, l[3] = z, l[4] = be, l[5] = Q, l[6] = at, l[7] = ue, l[8] = Ce, l[9] = Be, l[10] = De, l[11] = Pe, l[12] = Oe, l[13] = Ne, l[14] = Te, l[15] = pe;
|
|
13646
13646
|
}
|
|
13647
13647
|
function ht(l, p) {
|
|
13648
13648
|
te(l, p, p);
|
|
@@ -13662,12 +13662,12 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13662
13662
|
for (a = 0; a < 16; a++) l[a] = d[a];
|
|
13663
13663
|
}
|
|
13664
13664
|
function Ci(l, p, d) {
|
|
13665
|
-
var a = new Uint8Array(32), g = new Float64Array(80), S, E, U = t(), z = t(), be = t(), Q = t(),
|
|
13665
|
+
var a = new Uint8Array(32), g = new Float64Array(80), S, E, U = t(), z = t(), be = t(), Q = t(), at = t(), ue = t();
|
|
13666
13666
|
for (E = 0; E < 31; E++) a[E] = p[E];
|
|
13667
13667
|
for (a[31] = p[31] & 127 | 64, a[0] &= 248, fe(g, d), E = 0; E < 16; E++)
|
|
13668
13668
|
z[E] = g[E], Q[E] = U[E] = be[E] = 0;
|
|
13669
13669
|
for (U[0] = Q[0] = 1, E = 254; E >= 0; --E)
|
|
13670
|
-
S = a[E >>> 3] >>> (E & 7) & 1, Ee(U, z, S), Ee(be, Q, S), tt(
|
|
13670
|
+
S = a[E >>> 3] >>> (E & 7) & 1, Ee(U, z, S), Ee(be, Q, S), tt(at, U, be), yt(U, U, be), tt(be, z, Q), yt(z, z, Q), ht(Q, at), ht(ue, U), te(U, be, U), te(be, z, at), tt(at, U, be), yt(U, U, be), ht(z, U), yt(be, Q, ue), te(U, be, u), tt(U, U, Q), te(be, be, U), te(U, Q, ue), te(Q, z, g), ht(z, at), Ee(U, z, S), Ee(be, Q, S);
|
|
13671
13671
|
for (E = 0; E < 16; E++)
|
|
13672
13672
|
g[E + 16] = U[E], g[E + 32] = be[E], g[E + 48] = z[E], g[E + 64] = Q[E];
|
|
13673
13673
|
var Ce = g.subarray(32), Be = g.subarray(16);
|
|
@@ -13683,7 +13683,7 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13683
13683
|
var a = new Uint8Array(32);
|
|
13684
13684
|
return Ci(a, d, p), X(l, i, a, re);
|
|
13685
13685
|
}
|
|
13686
|
-
var ds = _t, $c =
|
|
13686
|
+
var ds = _t, $c = ft;
|
|
13687
13687
|
function ps(l, p, d, a, g, S) {
|
|
13688
13688
|
var E = new Uint8Array(32);
|
|
13689
13689
|
return pn(E, g, S), ds(l, p, d, a, E);
|
|
@@ -13855,14 +13855,14 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13855
13855
|
1246189591
|
|
13856
13856
|
];
|
|
13857
13857
|
function gs(l, p, d, a) {
|
|
13858
|
-
for (var g = new Int32Array(16), S = new Int32Array(16), E, U, z, be, Q,
|
|
13858
|
+
for (var g = new Int32Array(16), S = new Int32Array(16), E, U, z, be, Q, at, ue, Ce, Be, De, Pe, Oe, Ne, Te, pe, Ae, ie, ge, me, J, C, B, V, P, D, L, _e = l[0], $e = l[1], He = l[2], Me = l[3], w = l[4], qe = l[5], ct = l[6], lt = l[7], Ge = p[0], rt = p[1], nt = p[2], Dt = p[3], vt = p[4], Tt = p[5], Nt = p[6], jt = p[7], Lt = 0; a >= 128; ) {
|
|
13859
13859
|
for (me = 0; me < 16; me++)
|
|
13860
13860
|
J = 8 * me + Lt, g[me] = d[J + 0] << 24 | d[J + 1] << 16 | d[J + 2] << 8 | d[J + 3], S[me] = d[J + 4] << 24 | d[J + 5] << 16 | d[J + 6] << 8 | d[J + 7];
|
|
13861
13861
|
for (me = 0; me < 80; me++)
|
|
13862
|
-
if (E = _e, U = $e, z = He, be = Me, Q = w,
|
|
13862
|
+
if (E = _e, U = $e, z = He, be = Me, Q = w, at = qe, ue = ct, Ce = lt, Be = Ge, De = rt, Pe = nt, Oe = Dt, Ne = vt, Te = Tt, pe = Nt, Ae = jt, C = lt, B = jt, V = B & 65535, P = B >>> 16, D = C & 65535, L = C >>> 16, C = (w >>> 14 | vt << 18) ^ (w >>> 18 | vt << 14) ^ (vt >>> 9 | w << 23), B = (vt >>> 14 | w << 18) ^ (vt >>> 18 | w << 14) ^ (w >>> 9 | vt << 23), V += B & 65535, P += B >>> 16, D += C & 65535, L += C >>> 16, C = w & qe ^ ~w & ct, B = vt & Tt ^ ~vt & Nt, V += B & 65535, P += B >>> 16, D += C & 65535, L += C >>> 16, C = ys[me * 2], B = ys[me * 2 + 1], V += B & 65535, P += B >>> 16, D += C & 65535, L += C >>> 16, C = g[me % 16], B = S[me % 16], V += B & 65535, P += B >>> 16, D += C & 65535, L += C >>> 16, P += V >>> 16, D += P >>> 16, L += D >>> 16, ie = D & 65535 | L << 16, ge = V & 65535 | P << 16, C = ie, B = ge, V = B & 65535, P = B >>> 16, D = C & 65535, L = C >>> 16, C = (_e >>> 28 | Ge << 4) ^ (Ge >>> 2 | _e << 30) ^ (Ge >>> 7 | _e << 25), B = (Ge >>> 28 | _e << 4) ^ (_e >>> 2 | Ge << 30) ^ (_e >>> 7 | Ge << 25), V += B & 65535, P += B >>> 16, D += C & 65535, L += C >>> 16, C = _e & $e ^ _e & He ^ $e & He, B = Ge & rt ^ Ge & nt ^ rt & nt, V += B & 65535, P += B >>> 16, D += C & 65535, L += C >>> 16, P += V >>> 16, D += P >>> 16, L += D >>> 16, Ce = D & 65535 | L << 16, Ae = V & 65535 | P << 16, C = be, B = Oe, V = B & 65535, P = B >>> 16, D = C & 65535, L = C >>> 16, C = ie, B = ge, V += B & 65535, P += B >>> 16, D += C & 65535, L += C >>> 16, P += V >>> 16, D += P >>> 16, L += D >>> 16, be = D & 65535 | L << 16, Oe = V & 65535 | P << 16, $e = E, He = U, Me = z, w = be, qe = Q, ct = at, lt = ue, _e = Ce, rt = Be, nt = De, Dt = Pe, vt = Oe, Tt = Ne, Nt = Te, jt = pe, Ge = Ae, me % 16 === 15)
|
|
13863
13863
|
for (J = 0; J < 16; J++)
|
|
13864
13864
|
C = g[J], B = S[J], V = B & 65535, P = B >>> 16, D = C & 65535, L = C >>> 16, C = g[(J + 9) % 16], B = S[(J + 9) % 16], V += B & 65535, P += B >>> 16, D += C & 65535, L += C >>> 16, ie = g[(J + 1) % 16], ge = S[(J + 1) % 16], C = (ie >>> 1 | ge << 31) ^ (ie >>> 8 | ge << 24) ^ ie >>> 7, B = (ge >>> 1 | ie << 31) ^ (ge >>> 8 | ie << 24) ^ (ge >>> 7 | ie << 25), V += B & 65535, P += B >>> 16, D += C & 65535, L += C >>> 16, ie = g[(J + 14) % 16], ge = S[(J + 14) % 16], C = (ie >>> 19 | ge << 13) ^ (ge >>> 29 | ie << 3) ^ ie >>> 6, B = (ge >>> 19 | ie << 13) ^ (ie >>> 29 | ge << 3) ^ (ge >>> 6 | ie << 26), V += B & 65535, P += B >>> 16, D += C & 65535, L += C >>> 16, P += V >>> 16, D += P >>> 16, L += D >>> 16, g[J] = D & 65535 | L << 16, S[J] = V & 65535 | P << 16;
|
|
13865
|
-
C = _e, B =
|
|
13865
|
+
C = _e, B = Ge, V = B & 65535, P = B >>> 16, D = C & 65535, L = C >>> 16, C = l[0], B = p[0], V += B & 65535, P += B >>> 16, D += C & 65535, L += C >>> 16, P += V >>> 16, D += P >>> 16, L += D >>> 16, l[0] = _e = D & 65535 | L << 16, p[0] = Ge = V & 65535 | P << 16, C = $e, B = rt, V = B & 65535, P = B >>> 16, D = C & 65535, L = C >>> 16, C = l[1], B = p[1], V += B & 65535, P += B >>> 16, D += C & 65535, L += C >>> 16, P += V >>> 16, D += P >>> 16, L += D >>> 16, l[1] = $e = D & 65535 | L << 16, p[1] = rt = V & 65535 | P << 16, C = He, B = nt, V = B & 65535, P = B >>> 16, D = C & 65535, L = C >>> 16, C = l[2], B = p[2], V += B & 65535, P += B >>> 16, D += C & 65535, L += C >>> 16, P += V >>> 16, D += P >>> 16, L += D >>> 16, l[2] = He = D & 65535 | L << 16, p[2] = nt = V & 65535 | P << 16, C = Me, B = Dt, V = B & 65535, P = B >>> 16, D = C & 65535, L = C >>> 16, C = l[3], B = p[3], V += B & 65535, P += B >>> 16, D += C & 65535, L += C >>> 16, P += V >>> 16, D += P >>> 16, L += D >>> 16, l[3] = Me = D & 65535 | L << 16, p[3] = Dt = V & 65535 | P << 16, C = w, B = vt, V = B & 65535, P = B >>> 16, D = C & 65535, L = C >>> 16, C = l[4], B = p[4], V += B & 65535, P += B >>> 16, D += C & 65535, L += C >>> 16, P += V >>> 16, D += P >>> 16, L += D >>> 16, l[4] = w = D & 65535 | L << 16, p[4] = vt = V & 65535 | P << 16, C = qe, B = Tt, V = B & 65535, P = B >>> 16, D = C & 65535, L = C >>> 16, C = l[5], B = p[5], V += B & 65535, P += B >>> 16, D += C & 65535, L += C >>> 16, P += V >>> 16, D += P >>> 16, L += D >>> 16, l[5] = qe = D & 65535 | L << 16, p[5] = Tt = V & 65535 | P << 16, C = ct, B = Nt, V = B & 65535, P = B >>> 16, D = C & 65535, L = C >>> 16, C = l[6], B = p[6], V += B & 65535, P += B >>> 16, D += C & 65535, L += C >>> 16, P += V >>> 16, D += P >>> 16, L += D >>> 16, l[6] = ct = D & 65535 | L << 16, p[6] = Nt = V & 65535 | P << 16, C = lt, B = jt, V = B & 65535, P = B >>> 16, D = C & 65535, L = C >>> 16, C = l[7], B = p[7], V += B & 65535, P += B >>> 16, D += C & 65535, L += C >>> 16, P += V >>> 16, D += P >>> 16, L += D >>> 16, l[7] = lt = D & 65535 | L << 16, p[7] = jt = V & 65535 | P << 16, Lt += 128, a -= 128;
|
|
13866
13866
|
}
|
|
13867
13867
|
return a;
|
|
13868
13868
|
}
|
|
@@ -13922,7 +13922,7 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13922
13922
|
function Bo(l, p, d, a) {
|
|
13923
13923
|
var g = new Uint8Array(64), S = new Uint8Array(64), E = new Uint8Array(64), U, z, be = new Float64Array(64), Q = [t(), t(), t(), t()];
|
|
13924
13924
|
Zr(g, a, 32), g[0] &= 248, g[31] &= 127, g[31] |= 64;
|
|
13925
|
-
var
|
|
13925
|
+
var at = d + 64;
|
|
13926
13926
|
for (U = 0; U < d; U++) l[64 + U] = p[U];
|
|
13927
13927
|
for (U = 0; U < 32; U++) l[32 + U] = g[32 + U];
|
|
13928
13928
|
for (Zr(E, l.subarray(32), d + 32), xs(E), Oi(Q, E), vs(l, Q), U = 32; U < 64; U++) l[U] = a[U];
|
|
@@ -13931,7 +13931,7 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13931
13931
|
for (U = 0; U < 32; U++)
|
|
13932
13932
|
for (z = 0; z < 32; z++)
|
|
13933
13933
|
be[U + z] += S[U] * g[z];
|
|
13934
|
-
return bs(l.subarray(32), be),
|
|
13934
|
+
return bs(l.subarray(32), be), at;
|
|
13935
13935
|
}
|
|
13936
13936
|
function As(l, p) {
|
|
13937
13937
|
var d = t(), a = t(), g = t(), S = t(), E = t(), U = t(), z = t();
|
|
@@ -13952,8 +13952,8 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13952
13952
|
var I = 32, T = 24, K = 32, xe = 16, bt = 32, xt = 32, je = 32, Z = 32, ne = 32, he = T, ve = K, We = xe, Xe = 64, gt = 32, zt = 64, Ti = 32, Ss = 64;
|
|
13953
13953
|
e.lowlevel = {
|
|
13954
13954
|
crypto_core_hsalsa20: X,
|
|
13955
|
-
crypto_stream_xor:
|
|
13956
|
-
crypto_stream:
|
|
13955
|
+
crypto_stream_xor: ut,
|
|
13956
|
+
crypto_stream: ze,
|
|
13957
13957
|
crypto_stream_salsa20_xor: Y,
|
|
13958
13958
|
crypto_stream_salsa20: ye,
|
|
13959
13959
|
crypto_onetimeauth: Bt,
|
|
@@ -13961,7 +13961,7 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13961
13961
|
crypto_verify_16: O,
|
|
13962
13962
|
crypto_verify_32: k,
|
|
13963
13963
|
crypto_secretbox: _t,
|
|
13964
|
-
crypto_secretbox_open:
|
|
13964
|
+
crypto_secretbox_open: ft,
|
|
13965
13965
|
crypto_scalarmult: Ci,
|
|
13966
13966
|
crypto_scalarmult_base: or,
|
|
13967
13967
|
crypto_box_beforenm: pn,
|
|
@@ -14010,7 +14010,7 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
14010
14010
|
if (l.length !== I) throw new Error("bad key size");
|
|
14011
14011
|
if (p.length !== T) throw new Error("bad nonce size");
|
|
14012
14012
|
}
|
|
14013
|
-
function
|
|
14013
|
+
function Iy(l, p) {
|
|
14014
14014
|
if (l.length !== je) throw new Error("bad public key size");
|
|
14015
14015
|
if (p.length !== Z) throw new Error("bad secret key size");
|
|
14016
14016
|
}
|
|
@@ -14032,7 +14032,7 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
14032
14032
|
}, e.secretbox.open = function(l, p, d) {
|
|
14033
14033
|
xr(l, p, d), Oo(d, p);
|
|
14034
14034
|
for (var a = new Uint8Array(xe + l.length), g = new Uint8Array(a.length), S = 0; S < l.length; S++) a[S + xe] = l[S];
|
|
14035
|
-
return a.length < 32 ||
|
|
14035
|
+
return a.length < 32 || ft(g, a, a.length, p, d) !== 0 ? null : g.subarray(K);
|
|
14036
14036
|
}, e.secretbox.keyLength = I, e.secretbox.nonceLength = T, e.secretbox.overheadLength = xe, e.scalarMult = function(l, p) {
|
|
14037
14037
|
if (xr(l, p), l.length !== xt) throw new Error("bad n size");
|
|
14038
14038
|
if (p.length !== bt) throw new Error("bad p size");
|
|
@@ -14046,7 +14046,7 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
14046
14046
|
var g = e.box.before(d, a);
|
|
14047
14047
|
return e.secretbox(l, p, g);
|
|
14048
14048
|
}, e.box.before = function(l, p) {
|
|
14049
|
-
xr(l, p),
|
|
14049
|
+
xr(l, p), Iy(l, p);
|
|
14050
14050
|
var d = new Uint8Array(ne);
|
|
14051
14051
|
return pn(d, l, p), d;
|
|
14052
14052
|
}, e.box.after = e.secretbox, e.box.open = function(l, p, d, a) {
|
|
@@ -14116,7 +14116,7 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
14116
14116
|
for (g = 0; g < a; g++) d[g] = S[g];
|
|
14117
14117
|
Sf(S);
|
|
14118
14118
|
});
|
|
14119
|
-
} else typeof
|
|
14119
|
+
} else typeof km < "u" && (l = Bm, l && l.randomBytes && e.setPRNG(function(d, a) {
|
|
14120
14120
|
var g, S = l.randomBytes(a);
|
|
14121
14121
|
for (g = 0; g < a; g++) d[g] = S[g];
|
|
14122
14122
|
Sf(S);
|
|
@@ -14124,9 +14124,9 @@ const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
14124
14124
|
}();
|
|
14125
14125
|
})(r.exports ? r.exports : self.nacl = self.nacl || {});
|
|
14126
14126
|
})(U0);
|
|
14127
|
-
var
|
|
14128
|
-
const D0 = /* @__PURE__ */
|
|
14129
|
-
function
|
|
14127
|
+
var Om = U0.exports;
|
|
14128
|
+
const D0 = /* @__PURE__ */ Gy(Om);
|
|
14129
|
+
function Tm() {
|
|
14130
14130
|
return D0.box.keyPair();
|
|
14131
14131
|
}
|
|
14132
14132
|
async function _i(r, e) {
|
|
@@ -14139,12 +14139,12 @@ async function _i(r, e) {
|
|
|
14139
14139
|
}
|
|
14140
14140
|
const i = window.crypto.randomUUID();
|
|
14141
14141
|
console.log("Generated attestation nonce:", i);
|
|
14142
|
-
const s = await
|
|
14142
|
+
const s = await Em(i, e);
|
|
14143
14143
|
if (s && s.public_key) {
|
|
14144
14144
|
console.log("Attestation document verification succeeded");
|
|
14145
|
-
const o =
|
|
14145
|
+
const o = Tm();
|
|
14146
14146
|
console.log("Generated client key pair");
|
|
14147
|
-
const c = new Uint8Array(s.public_key), { encrypted_session_key: u, session_id: h } = await
|
|
14147
|
+
const c = new Uint8Array(s.public_key), { encrypted_session_key: u, session_id: h } = await Zm(
|
|
14148
14148
|
$r(o.publicKey),
|
|
14149
14149
|
i,
|
|
14150
14150
|
e
|
|
@@ -14162,44 +14162,44 @@ async function _i(r, e) {
|
|
|
14162
14162
|
console.groupEnd();
|
|
14163
14163
|
}
|
|
14164
14164
|
}
|
|
14165
|
-
let
|
|
14166
|
-
function
|
|
14167
|
-
|
|
14165
|
+
let ot = "";
|
|
14166
|
+
function Nm(r) {
|
|
14167
|
+
ot = r;
|
|
14168
14168
|
}
|
|
14169
|
-
async function
|
|
14169
|
+
async function jm(r, e) {
|
|
14170
14170
|
return Vt(
|
|
14171
|
-
`${
|
|
14171
|
+
`${ot}/platform/login`,
|
|
14172
14172
|
"POST",
|
|
14173
14173
|
{ email: r, password: e },
|
|
14174
14174
|
void 0,
|
|
14175
14175
|
"Failed to login"
|
|
14176
14176
|
);
|
|
14177
14177
|
}
|
|
14178
|
-
async function
|
|
14178
|
+
async function Pm(r, e, t, n) {
|
|
14179
14179
|
return Vt(
|
|
14180
|
-
`${
|
|
14180
|
+
`${ot}/platform/register`,
|
|
14181
14181
|
"POST",
|
|
14182
14182
|
{ email: r, password: e, invite_code: t, name: n },
|
|
14183
14183
|
void 0,
|
|
14184
14184
|
"Failed to register"
|
|
14185
14185
|
);
|
|
14186
14186
|
}
|
|
14187
|
-
async function
|
|
14187
|
+
async function Rm(r) {
|
|
14188
14188
|
return Vt(
|
|
14189
|
-
`${
|
|
14189
|
+
`${ot}/platform/logout`,
|
|
14190
14190
|
"POST",
|
|
14191
14191
|
{ refresh_token: r },
|
|
14192
14192
|
void 0,
|
|
14193
14193
|
"Failed to logout"
|
|
14194
14194
|
);
|
|
14195
14195
|
}
|
|
14196
|
-
async function
|
|
14196
|
+
async function Um() {
|
|
14197
14197
|
const r = window.localStorage.getItem("refresh_token");
|
|
14198
14198
|
if (!r) throw new Error("No refresh token available");
|
|
14199
14199
|
const e = { refresh_token: r };
|
|
14200
14200
|
try {
|
|
14201
14201
|
const t = await Vt(
|
|
14202
|
-
`${
|
|
14202
|
+
`${ot}/platform/refresh`,
|
|
14203
14203
|
"POST",
|
|
14204
14204
|
e,
|
|
14205
14205
|
void 0,
|
|
@@ -14211,114 +14211,114 @@ async function Pm() {
|
|
|
14211
14211
|
}
|
|
14212
14212
|
}
|
|
14213
14213
|
async function $0(r) {
|
|
14214
|
-
return
|
|
14215
|
-
`${
|
|
14214
|
+
return Fe(
|
|
14215
|
+
`${ot}/platform/orgs`,
|
|
14216
14216
|
"POST",
|
|
14217
14217
|
{ name: r }
|
|
14218
14218
|
);
|
|
14219
14219
|
}
|
|
14220
14220
|
async function M0() {
|
|
14221
|
-
return
|
|
14222
|
-
`${
|
|
14221
|
+
return Fe(
|
|
14222
|
+
`${ot}/platform/orgs`,
|
|
14223
14223
|
"GET",
|
|
14224
14224
|
void 0
|
|
14225
14225
|
);
|
|
14226
14226
|
}
|
|
14227
14227
|
async function V0(r) {
|
|
14228
|
-
return
|
|
14229
|
-
`${
|
|
14228
|
+
return Fe(
|
|
14229
|
+
`${ot}/platform/orgs/${r}`,
|
|
14230
14230
|
"DELETE",
|
|
14231
14231
|
void 0
|
|
14232
14232
|
);
|
|
14233
14233
|
}
|
|
14234
14234
|
async function L0(r, e, t) {
|
|
14235
|
-
return
|
|
14236
|
-
`${
|
|
14235
|
+
return Fe(
|
|
14236
|
+
`${ot}/platform/orgs/${r}/projects`,
|
|
14237
14237
|
"POST",
|
|
14238
14238
|
{ name: e, description: t }
|
|
14239
14239
|
);
|
|
14240
14240
|
}
|
|
14241
14241
|
async function H0(r) {
|
|
14242
|
-
return
|
|
14243
|
-
`${
|
|
14242
|
+
return Fe(
|
|
14243
|
+
`${ot}/platform/orgs/${r}/projects`,
|
|
14244
14244
|
"GET",
|
|
14245
14245
|
void 0
|
|
14246
14246
|
);
|
|
14247
14247
|
}
|
|
14248
14248
|
async function F0(r, e) {
|
|
14249
|
-
return
|
|
14250
|
-
`${
|
|
14249
|
+
return Fe(
|
|
14250
|
+
`${ot}/platform/orgs/${r}/projects/${e}`,
|
|
14251
14251
|
"GET",
|
|
14252
14252
|
void 0
|
|
14253
14253
|
);
|
|
14254
14254
|
}
|
|
14255
14255
|
async function z0(r, e, t) {
|
|
14256
|
-
return
|
|
14257
|
-
`${
|
|
14256
|
+
return Fe(
|
|
14257
|
+
`${ot}/platform/orgs/${r}/projects/${e}`,
|
|
14258
14258
|
"PATCH",
|
|
14259
14259
|
t
|
|
14260
14260
|
);
|
|
14261
14261
|
}
|
|
14262
14262
|
async function G0(r, e) {
|
|
14263
|
-
return
|
|
14264
|
-
`${
|
|
14263
|
+
return Fe(
|
|
14264
|
+
`${ot}/platform/orgs/${r}/projects/${e}`,
|
|
14265
14265
|
"DELETE",
|
|
14266
14266
|
void 0
|
|
14267
14267
|
);
|
|
14268
14268
|
}
|
|
14269
|
-
function
|
|
14269
|
+
function Dm(r) {
|
|
14270
14270
|
const e = /^[A-Za-z0-9+/]*[=]{0,2}$/, t = r.length % 4 === 0, n = e.test(r);
|
|
14271
14271
|
return t && n;
|
|
14272
14272
|
}
|
|
14273
14273
|
async function K0(r, e, t, n) {
|
|
14274
|
-
if (!
|
|
14274
|
+
if (!Dm(n))
|
|
14275
14275
|
throw new Error(
|
|
14276
14276
|
"Secret must be base64 encoded. Use @stablelib/base64's encode function to encode your data."
|
|
14277
14277
|
);
|
|
14278
|
-
return
|
|
14279
|
-
`${
|
|
14278
|
+
return Fe(
|
|
14279
|
+
`${ot}/platform/orgs/${r}/projects/${e}/secrets`,
|
|
14280
14280
|
"POST",
|
|
14281
14281
|
{ key_name: t, secret: n }
|
|
14282
14282
|
);
|
|
14283
14283
|
}
|
|
14284
14284
|
async function q0(r, e) {
|
|
14285
|
-
return
|
|
14286
|
-
`${
|
|
14285
|
+
return Fe(
|
|
14286
|
+
`${ot}/platform/orgs/${r}/projects/${e}/secrets`,
|
|
14287
14287
|
"GET",
|
|
14288
14288
|
void 0
|
|
14289
14289
|
);
|
|
14290
14290
|
}
|
|
14291
14291
|
async function Z0(r, e, t) {
|
|
14292
|
-
return
|
|
14293
|
-
`${
|
|
14292
|
+
return Fe(
|
|
14293
|
+
`${ot}/platform/orgs/${r}/projects/${e}/secrets/${t}`,
|
|
14294
14294
|
"DELETE",
|
|
14295
14295
|
void 0
|
|
14296
14296
|
);
|
|
14297
14297
|
}
|
|
14298
14298
|
async function W0(r, e) {
|
|
14299
|
-
return
|
|
14300
|
-
`${
|
|
14299
|
+
return Fe(
|
|
14300
|
+
`${ot}/platform/orgs/${r}/projects/${e}/settings/email`,
|
|
14301
14301
|
"GET",
|
|
14302
14302
|
void 0
|
|
14303
14303
|
);
|
|
14304
14304
|
}
|
|
14305
14305
|
async function Y0(r, e, t) {
|
|
14306
|
-
return
|
|
14307
|
-
`${
|
|
14306
|
+
return Fe(
|
|
14307
|
+
`${ot}/platform/orgs/${r}/projects/${e}/settings/email`,
|
|
14308
14308
|
"PUT",
|
|
14309
14309
|
t
|
|
14310
14310
|
);
|
|
14311
14311
|
}
|
|
14312
14312
|
async function J0(r, e) {
|
|
14313
|
-
return
|
|
14314
|
-
`${
|
|
14313
|
+
return Fe(
|
|
14314
|
+
`${ot}/platform/orgs/${r}/projects/${e}/settings/oauth`,
|
|
14315
14315
|
"GET",
|
|
14316
14316
|
void 0
|
|
14317
14317
|
);
|
|
14318
14318
|
}
|
|
14319
14319
|
async function X0(r, e, t) {
|
|
14320
|
-
return
|
|
14321
|
-
`${
|
|
14320
|
+
return Fe(
|
|
14321
|
+
`${ot}/platform/orgs/${r}/projects/${e}/settings/oauth`,
|
|
14322
14322
|
"PUT",
|
|
14323
14323
|
t
|
|
14324
14324
|
);
|
|
@@ -14326,67 +14326,67 @@ async function X0(r, e, t) {
|
|
|
14326
14326
|
async function Q0(r, e, t) {
|
|
14327
14327
|
if (!e || e.trim() === "")
|
|
14328
14328
|
throw new Error("Email is required");
|
|
14329
|
-
return
|
|
14330
|
-
`${
|
|
14329
|
+
return Fe(
|
|
14330
|
+
`${ot}/platform/orgs/${r}/invites`,
|
|
14331
14331
|
"POST",
|
|
14332
14332
|
{ email: e, role: t }
|
|
14333
14333
|
);
|
|
14334
14334
|
}
|
|
14335
14335
|
async function ey(r) {
|
|
14336
|
-
return
|
|
14337
|
-
`${
|
|
14336
|
+
return Fe(
|
|
14337
|
+
`${ot}/platform/orgs/${r}/invites`,
|
|
14338
14338
|
"GET",
|
|
14339
14339
|
void 0
|
|
14340
14340
|
);
|
|
14341
14341
|
}
|
|
14342
14342
|
async function ty(r, e) {
|
|
14343
|
-
return
|
|
14344
|
-
`${
|
|
14343
|
+
return Fe(
|
|
14344
|
+
`${ot}/platform/orgs/${r}/invites/${e}`,
|
|
14345
14345
|
"GET",
|
|
14346
14346
|
void 0
|
|
14347
14347
|
);
|
|
14348
14348
|
}
|
|
14349
14349
|
async function ry(r, e) {
|
|
14350
|
-
return
|
|
14351
|
-
`${
|
|
14350
|
+
return Fe(
|
|
14351
|
+
`${ot}/platform/orgs/${r}/invites/${e}`,
|
|
14352
14352
|
"DELETE",
|
|
14353
14353
|
void 0
|
|
14354
14354
|
);
|
|
14355
14355
|
}
|
|
14356
14356
|
async function ny(r) {
|
|
14357
|
-
return
|
|
14358
|
-
`${
|
|
14357
|
+
return Fe(
|
|
14358
|
+
`${ot}/platform/orgs/${r}/memberships`,
|
|
14359
14359
|
"GET",
|
|
14360
14360
|
void 0
|
|
14361
14361
|
);
|
|
14362
14362
|
}
|
|
14363
14363
|
async function iy(r, e, t) {
|
|
14364
|
-
return
|
|
14365
|
-
`${
|
|
14364
|
+
return Fe(
|
|
14365
|
+
`${ot}/platform/orgs/${r}/memberships/${e}`,
|
|
14366
14366
|
"PATCH",
|
|
14367
14367
|
{ role: t }
|
|
14368
14368
|
);
|
|
14369
14369
|
}
|
|
14370
14370
|
async function sy(r, e) {
|
|
14371
|
-
return
|
|
14372
|
-
`${
|
|
14371
|
+
return Fe(
|
|
14372
|
+
`${ot}/platform/orgs/${r}/memberships/${e}`,
|
|
14373
14373
|
"DELETE",
|
|
14374
14374
|
void 0
|
|
14375
14375
|
);
|
|
14376
14376
|
}
|
|
14377
14377
|
async function oy(r) {
|
|
14378
|
-
return
|
|
14379
|
-
`${
|
|
14378
|
+
return Fe(
|
|
14379
|
+
`${ot}/platform/accept_invite/${r}`,
|
|
14380
14380
|
"POST",
|
|
14381
14381
|
void 0
|
|
14382
14382
|
);
|
|
14383
14383
|
}
|
|
14384
|
-
async function
|
|
14385
|
-
return
|
|
14384
|
+
async function $m() {
|
|
14385
|
+
return Fe(`${ot}/platform/me`, "GET", void 0);
|
|
14386
14386
|
}
|
|
14387
14387
|
async function ay(r) {
|
|
14388
14388
|
return Vt(
|
|
14389
|
-
`${
|
|
14389
|
+
`${ot}/platform/verify-email/${r}`,
|
|
14390
14390
|
"GET",
|
|
14391
14391
|
void 0,
|
|
14392
14392
|
void 0,
|
|
@@ -14394,8 +14394,8 @@ async function ay(r) {
|
|
|
14394
14394
|
);
|
|
14395
14395
|
}
|
|
14396
14396
|
async function Da() {
|
|
14397
|
-
return
|
|
14398
|
-
`${
|
|
14397
|
+
return Fe(
|
|
14398
|
+
`${ot}/platform/request_verification`,
|
|
14399
14399
|
"POST",
|
|
14400
14400
|
void 0,
|
|
14401
14401
|
"Failed to request new verification code"
|
|
@@ -14407,7 +14407,7 @@ async function cy(r, e) {
|
|
|
14407
14407
|
hashed_secret: e
|
|
14408
14408
|
};
|
|
14409
14409
|
return Vt(
|
|
14410
|
-
`${
|
|
14410
|
+
`${ot}/platform/password-reset/request`,
|
|
14411
14411
|
"POST",
|
|
14412
14412
|
t,
|
|
14413
14413
|
void 0,
|
|
@@ -14422,7 +14422,7 @@ async function ly(r, e, t, n) {
|
|
|
14422
14422
|
new_password: n
|
|
14423
14423
|
};
|
|
14424
14424
|
return Vt(
|
|
14425
|
-
`${
|
|
14425
|
+
`${ot}/platform/password-reset/confirm`,
|
|
14426
14426
|
"POST",
|
|
14427
14427
|
i,
|
|
14428
14428
|
void 0,
|
|
@@ -14434,20 +14434,20 @@ async function uy(r, e) {
|
|
|
14434
14434
|
current_password: r,
|
|
14435
14435
|
new_password: e
|
|
14436
14436
|
};
|
|
14437
|
-
return
|
|
14438
|
-
`${
|
|
14437
|
+
return Fe(
|
|
14438
|
+
`${ot}/platform/change-password`,
|
|
14439
14439
|
"POST",
|
|
14440
14440
|
t,
|
|
14441
14441
|
"Failed to change platform password"
|
|
14442
14442
|
);
|
|
14443
14443
|
}
|
|
14444
|
-
async function
|
|
14444
|
+
async function Fe(r, e, t, n) {
|
|
14445
14445
|
const i = async (s = !1) => {
|
|
14446
14446
|
try {
|
|
14447
14447
|
if (s) {
|
|
14448
14448
|
console.log("Refreshing access token");
|
|
14449
14449
|
const u = Ho.getRefreshFunction(r);
|
|
14450
|
-
console.log(`Using ${u}`), u === "platformRefreshToken" ? await
|
|
14450
|
+
console.log(`Using ${u}`), u === "platformRefreshToken" ? await Um() : await Uc();
|
|
14451
14451
|
}
|
|
14452
14452
|
const o = window.localStorage.getItem("access_token");
|
|
14453
14453
|
if (!o)
|
|
@@ -14537,29 +14537,29 @@ async function Vt(r, e, t, n, i) {
|
|
|
14537
14537
|
throw new Error("No data received from the server");
|
|
14538
14538
|
return s.data;
|
|
14539
14539
|
}
|
|
14540
|
-
let
|
|
14541
|
-
function
|
|
14542
|
-
|
|
14540
|
+
let st = "";
|
|
14541
|
+
function Mm(r) {
|
|
14542
|
+
st = r;
|
|
14543
14543
|
}
|
|
14544
|
-
function
|
|
14545
|
-
return
|
|
14544
|
+
function Vm() {
|
|
14545
|
+
return st;
|
|
14546
14546
|
}
|
|
14547
|
-
async function
|
|
14547
|
+
async function Lm(r, e, t) {
|
|
14548
14548
|
return Vt(
|
|
14549
|
-
`${
|
|
14549
|
+
`${st}/login`,
|
|
14550
14550
|
"POST",
|
|
14551
14551
|
{ email: r, password: e, client_id: t }
|
|
14552
14552
|
);
|
|
14553
14553
|
}
|
|
14554
|
-
async function
|
|
14554
|
+
async function Hm(r, e, t) {
|
|
14555
14555
|
return Vt(
|
|
14556
|
-
`${
|
|
14556
|
+
`${st}/login`,
|
|
14557
14557
|
"POST",
|
|
14558
14558
|
{ id: r, password: e, client_id: t }
|
|
14559
14559
|
);
|
|
14560
14560
|
}
|
|
14561
|
-
async function
|
|
14562
|
-
return Vt(`${
|
|
14561
|
+
async function Fm(r, e, t, n, i) {
|
|
14562
|
+
return Vt(`${st}/register`, "POST", {
|
|
14563
14563
|
email: r,
|
|
14564
14564
|
password: e,
|
|
14565
14565
|
inviteCode: t.toLowerCase(),
|
|
@@ -14567,8 +14567,8 @@ async function Lm(r, e, t, n, i) {
|
|
|
14567
14567
|
name: i
|
|
14568
14568
|
});
|
|
14569
14569
|
}
|
|
14570
|
-
async function
|
|
14571
|
-
return Vt(`${
|
|
14570
|
+
async function zm(r, e, t) {
|
|
14571
|
+
return Vt(`${st}/register`, "POST", {
|
|
14572
14572
|
password: r,
|
|
14573
14573
|
inviteCode: e.toLowerCase(),
|
|
14574
14574
|
client_id: t
|
|
@@ -14580,7 +14580,7 @@ async function Uc() {
|
|
|
14580
14580
|
const e = { refresh_token: r };
|
|
14581
14581
|
try {
|
|
14582
14582
|
const t = await Vt(
|
|
14583
|
-
`${
|
|
14583
|
+
`${st}/refresh`,
|
|
14584
14584
|
"POST",
|
|
14585
14585
|
e,
|
|
14586
14586
|
void 0,
|
|
@@ -14591,25 +14591,25 @@ async function Uc() {
|
|
|
14591
14591
|
throw console.error("Error refreshing token:", t), t;
|
|
14592
14592
|
}
|
|
14593
14593
|
}
|
|
14594
|
-
async function
|
|
14595
|
-
return
|
|
14596
|
-
`${
|
|
14594
|
+
async function Gm() {
|
|
14595
|
+
return Fe(
|
|
14596
|
+
`${st}/protected/user`,
|
|
14597
14597
|
"GET",
|
|
14598
14598
|
void 0,
|
|
14599
14599
|
"Failed to fetch user"
|
|
14600
14600
|
);
|
|
14601
14601
|
}
|
|
14602
14602
|
async function hy(r, e) {
|
|
14603
|
-
return
|
|
14604
|
-
`${
|
|
14603
|
+
return Fe(
|
|
14604
|
+
`${st}/protected/kv/${r}`,
|
|
14605
14605
|
"PUT",
|
|
14606
14606
|
e,
|
|
14607
14607
|
"Failed to put key-value pair"
|
|
14608
14608
|
);
|
|
14609
14609
|
}
|
|
14610
14610
|
async function dy(r) {
|
|
14611
|
-
return
|
|
14612
|
-
`${
|
|
14611
|
+
return Fe(
|
|
14612
|
+
`${st}/protected/kv/${r}`,
|
|
14613
14613
|
"DELETE",
|
|
14614
14614
|
void 0,
|
|
14615
14615
|
"Failed to delete key-value pair"
|
|
@@ -14617,8 +14617,8 @@ async function dy(r) {
|
|
|
14617
14617
|
}
|
|
14618
14618
|
async function py(r) {
|
|
14619
14619
|
try {
|
|
14620
|
-
return await
|
|
14621
|
-
`${
|
|
14620
|
+
return await Fe(
|
|
14621
|
+
`${st}/protected/kv/${r}`,
|
|
14622
14622
|
"GET",
|
|
14623
14623
|
void 0,
|
|
14624
14624
|
"Failed to get key-value pair"
|
|
@@ -14629,20 +14629,20 @@ async function py(r) {
|
|
|
14629
14629
|
}
|
|
14630
14630
|
}
|
|
14631
14631
|
async function yy() {
|
|
14632
|
-
return
|
|
14633
|
-
`${
|
|
14632
|
+
return Fe(
|
|
14633
|
+
`${st}/protected/kv`,
|
|
14634
14634
|
"GET",
|
|
14635
14635
|
void 0,
|
|
14636
14636
|
"Failed to list key-value pairs"
|
|
14637
14637
|
);
|
|
14638
14638
|
}
|
|
14639
|
-
async function
|
|
14639
|
+
async function Km(r) {
|
|
14640
14640
|
const e = { refresh_token: r };
|
|
14641
|
-
return Vt(`${
|
|
14641
|
+
return Vt(`${st}/logout`, "POST", e);
|
|
14642
14642
|
}
|
|
14643
14643
|
async function gy(r) {
|
|
14644
14644
|
return Vt(
|
|
14645
|
-
`${
|
|
14645
|
+
`${st}/verify-email/${r}`,
|
|
14646
14646
|
"GET",
|
|
14647
14647
|
void 0,
|
|
14648
14648
|
void 0,
|
|
@@ -14650,21 +14650,21 @@ async function gy(r) {
|
|
|
14650
14650
|
);
|
|
14651
14651
|
}
|
|
14652
14652
|
async function $a() {
|
|
14653
|
-
return
|
|
14654
|
-
`${
|
|
14653
|
+
return Fe(
|
|
14654
|
+
`${st}/protected/request_verification`,
|
|
14655
14655
|
"POST",
|
|
14656
14656
|
void 0,
|
|
14657
14657
|
"Failed to request new verification code"
|
|
14658
14658
|
);
|
|
14659
14659
|
}
|
|
14660
|
-
async function
|
|
14661
|
-
const n = await fetch(`${e ||
|
|
14660
|
+
async function qm(r, e) {
|
|
14661
|
+
const n = await fetch(`${e || st}/attestation/${r}`);
|
|
14662
14662
|
if (!n.ok)
|
|
14663
14663
|
throw new Error(`Request failed with status ${n.status}`);
|
|
14664
14664
|
return (await n.json()).attestation_document;
|
|
14665
14665
|
}
|
|
14666
|
-
async function
|
|
14667
|
-
const i = await fetch(`${t ||
|
|
14666
|
+
async function Zm(r, e, t) {
|
|
14667
|
+
const i = await fetch(`${t || st}/key_exchange`, {
|
|
14668
14668
|
method: "POST",
|
|
14669
14669
|
headers: {
|
|
14670
14670
|
"Content-Type": "application/json"
|
|
@@ -14675,21 +14675,21 @@ async function Km(r, e, t) {
|
|
|
14675
14675
|
throw new Error("Key exchange failed");
|
|
14676
14676
|
return i.json();
|
|
14677
14677
|
}
|
|
14678
|
-
async function
|
|
14678
|
+
async function Wm(r, e, t) {
|
|
14679
14679
|
const n = {
|
|
14680
14680
|
email: r,
|
|
14681
14681
|
hashed_secret: e,
|
|
14682
14682
|
client_id: t
|
|
14683
14683
|
};
|
|
14684
14684
|
return Vt(
|
|
14685
|
-
`${
|
|
14685
|
+
`${st}/password-reset/request`,
|
|
14686
14686
|
"POST",
|
|
14687
14687
|
n,
|
|
14688
14688
|
void 0,
|
|
14689
14689
|
"Failed to request password reset"
|
|
14690
14690
|
);
|
|
14691
14691
|
}
|
|
14692
|
-
async function
|
|
14692
|
+
async function Ym(r, e, t, n, i) {
|
|
14693
14693
|
const s = {
|
|
14694
14694
|
email: r,
|
|
14695
14695
|
alphanumeric_code: e,
|
|
@@ -14698,7 +14698,7 @@ async function Zm(r, e, t, n, i) {
|
|
|
14698
14698
|
client_id: i
|
|
14699
14699
|
};
|
|
14700
14700
|
return Vt(
|
|
14701
|
-
`${
|
|
14701
|
+
`${st}/password-reset/confirm`,
|
|
14702
14702
|
"POST",
|
|
14703
14703
|
s,
|
|
14704
14704
|
void 0,
|
|
@@ -14710,17 +14710,17 @@ async function vy(r, e) {
|
|
|
14710
14710
|
current_password: r,
|
|
14711
14711
|
new_password: e
|
|
14712
14712
|
};
|
|
14713
|
-
return
|
|
14714
|
-
`${
|
|
14713
|
+
return Fe(
|
|
14714
|
+
`${st}/protected/change_password`,
|
|
14715
14715
|
"POST",
|
|
14716
14716
|
t,
|
|
14717
14717
|
"Failed to change password"
|
|
14718
14718
|
);
|
|
14719
14719
|
}
|
|
14720
|
-
async function
|
|
14720
|
+
async function Jm(r, e) {
|
|
14721
14721
|
try {
|
|
14722
14722
|
return await Vt(
|
|
14723
|
-
`${
|
|
14723
|
+
`${st}/auth/github`,
|
|
14724
14724
|
"POST",
|
|
14725
14725
|
e ? { invite_code: e, client_id: r } : { client_id: r },
|
|
14726
14726
|
void 0,
|
|
@@ -14730,11 +14730,11 @@ async function Wm(r, e) {
|
|
|
14730
14730
|
throw t instanceof Error && t.message.includes("Invalid invite code") ? new Error("Invalid invite code. Please check and try again.") : t;
|
|
14731
14731
|
}
|
|
14732
14732
|
}
|
|
14733
|
-
async function
|
|
14733
|
+
async function Xm(r, e, t) {
|
|
14734
14734
|
const n = { code: r, state: e, invite_code: t };
|
|
14735
14735
|
try {
|
|
14736
14736
|
return await Vt(
|
|
14737
|
-
`${
|
|
14737
|
+
`${st}/auth/github/callback`,
|
|
14738
14738
|
"POST",
|
|
14739
14739
|
n,
|
|
14740
14740
|
void 0,
|
|
@@ -14748,10 +14748,10 @@ async function Ym(r, e, t) {
|
|
|
14748
14748
|
) : new Error("Failed to authenticate with GitHub. Please try again.") : i;
|
|
14749
14749
|
}
|
|
14750
14750
|
}
|
|
14751
|
-
async function
|
|
14751
|
+
async function Qm(r, e) {
|
|
14752
14752
|
try {
|
|
14753
14753
|
return await Vt(
|
|
14754
|
-
`${
|
|
14754
|
+
`${st}/auth/google`,
|
|
14755
14755
|
"POST",
|
|
14756
14756
|
e ? { invite_code: e, client_id: r } : { client_id: r },
|
|
14757
14757
|
void 0,
|
|
@@ -14761,11 +14761,11 @@ async function Jm(r, e) {
|
|
|
14761
14761
|
throw t instanceof Error && t.message.includes("Invalid invite code") ? new Error("Invalid invite code. Please check and try again.") : t;
|
|
14762
14762
|
}
|
|
14763
14763
|
}
|
|
14764
|
-
async function
|
|
14764
|
+
async function ew(r, e, t) {
|
|
14765
14765
|
const n = { code: r, state: e, invite_code: t };
|
|
14766
14766
|
try {
|
|
14767
14767
|
return await Vt(
|
|
14768
|
-
`${
|
|
14768
|
+
`${st}/auth/google/callback`,
|
|
14769
14769
|
"POST",
|
|
14770
14770
|
n,
|
|
14771
14771
|
void 0,
|
|
@@ -14780,16 +14780,16 @@ async function Xm(r, e, t) {
|
|
|
14780
14780
|
}
|
|
14781
14781
|
}
|
|
14782
14782
|
async function my() {
|
|
14783
|
-
return
|
|
14784
|
-
`${
|
|
14783
|
+
return Fe(
|
|
14784
|
+
`${st}/protected/private_key`,
|
|
14785
14785
|
"GET",
|
|
14786
14786
|
void 0,
|
|
14787
14787
|
"Failed to fetch private key"
|
|
14788
14788
|
);
|
|
14789
14789
|
}
|
|
14790
14790
|
async function wy(r) {
|
|
14791
|
-
const e = r ? `${
|
|
14792
|
-
return
|
|
14791
|
+
const e = r ? `${st}/protected/private_key_bytes?derivation_path=${encodeURIComponent(r)}` : `${st}/protected/private_key_bytes`;
|
|
14792
|
+
return Fe(
|
|
14793
14793
|
e,
|
|
14794
14794
|
"GET",
|
|
14795
14795
|
void 0,
|
|
@@ -14798,8 +14798,8 @@ async function wy(r) {
|
|
|
14798
14798
|
}
|
|
14799
14799
|
async function by(r, e, t) {
|
|
14800
14800
|
const n = $r(r);
|
|
14801
|
-
return
|
|
14802
|
-
`${
|
|
14801
|
+
return Fe(
|
|
14802
|
+
`${st}/protected/sign_message`,
|
|
14803
14803
|
"POST",
|
|
14804
14804
|
{
|
|
14805
14805
|
message_base64: n,
|
|
@@ -14810,36 +14810,58 @@ async function by(r, e, t) {
|
|
|
14810
14810
|
);
|
|
14811
14811
|
}
|
|
14812
14812
|
async function xy(r, e) {
|
|
14813
|
-
const t = e ? `${
|
|
14814
|
-
return
|
|
14813
|
+
const t = e ? `${st}/protected/public_key?algorithm=${r}&derivation_path=${encodeURIComponent(e)}` : `${st}/protected/public_key?algorithm=${r}`;
|
|
14814
|
+
return Fe(
|
|
14815
14815
|
t,
|
|
14816
14816
|
"GET",
|
|
14817
14817
|
void 0,
|
|
14818
14818
|
"Failed to fetch public key"
|
|
14819
14819
|
);
|
|
14820
14820
|
}
|
|
14821
|
-
async function
|
|
14821
|
+
async function tw(r, e, t) {
|
|
14822
14822
|
const n = {
|
|
14823
14823
|
email: r,
|
|
14824
14824
|
password: e,
|
|
14825
14825
|
...t !== void 0 && { name: t }
|
|
14826
14826
|
};
|
|
14827
|
-
return
|
|
14828
|
-
`${
|
|
14827
|
+
return Fe(
|
|
14828
|
+
`${st}/protected/convert_guest`,
|
|
14829
14829
|
"POST",
|
|
14830
14830
|
n,
|
|
14831
14831
|
"Failed to convert guest account"
|
|
14832
14832
|
);
|
|
14833
14833
|
}
|
|
14834
|
-
async function
|
|
14835
|
-
return
|
|
14836
|
-
`${
|
|
14834
|
+
async function rw(r) {
|
|
14835
|
+
return Fe(
|
|
14836
|
+
`${st}/protected/third_party_token`,
|
|
14837
14837
|
"POST",
|
|
14838
|
-
{ audience: r },
|
|
14838
|
+
r ? { audience: r } : {},
|
|
14839
14839
|
"Failed to generate third party token"
|
|
14840
14840
|
);
|
|
14841
14841
|
}
|
|
14842
|
-
function
|
|
14842
|
+
async function Ay(r, e) {
|
|
14843
|
+
return Fe(
|
|
14844
|
+
`${st}/protected/encrypt`,
|
|
14845
|
+
"POST",
|
|
14846
|
+
{
|
|
14847
|
+
data: r,
|
|
14848
|
+
derivation_path: e
|
|
14849
|
+
},
|
|
14850
|
+
"Failed to encrypt data"
|
|
14851
|
+
);
|
|
14852
|
+
}
|
|
14853
|
+
async function Sy(r, e) {
|
|
14854
|
+
return Fe(
|
|
14855
|
+
`${st}/protected/decrypt`,
|
|
14856
|
+
"POST",
|
|
14857
|
+
{
|
|
14858
|
+
encrypted_data: r,
|
|
14859
|
+
derivation_path: e
|
|
14860
|
+
},
|
|
14861
|
+
"Failed to decrypt data"
|
|
14862
|
+
);
|
|
14863
|
+
}
|
|
14864
|
+
function nw() {
|
|
14843
14865
|
return async (r, e) => {
|
|
14844
14866
|
var n, i;
|
|
14845
14867
|
const t = () => {
|
|
@@ -14881,7 +14903,7 @@ function tw() {
|
|
|
14881
14903
|
const k = x.decode(O);
|
|
14882
14904
|
G += k;
|
|
14883
14905
|
let j;
|
|
14884
|
-
for (; j =
|
|
14906
|
+
for (; j = iw(G); )
|
|
14885
14907
|
if (G = G.slice(j.length), j.trim().startsWith("data: ")) {
|
|
14886
14908
|
const R = j.slice(6).trim();
|
|
14887
14909
|
if (R === "[DONE]")
|
|
@@ -14925,13 +14947,13 @@ function tw() {
|
|
|
14925
14947
|
}
|
|
14926
14948
|
};
|
|
14927
14949
|
}
|
|
14928
|
-
function
|
|
14950
|
+
function iw(r) {
|
|
14929
14951
|
const e = r.indexOf(`
|
|
14930
14952
|
|
|
14931
14953
|
`);
|
|
14932
14954
|
return e === -1 ? null : r.slice(0, e + 2);
|
|
14933
14955
|
}
|
|
14934
|
-
const
|
|
14956
|
+
const sw = [
|
|
14935
14957
|
"eeddbb58f57c38894d6d5af5e575fbe791c5bf3bbcfb5df8da8cfcf0c2e1da1913108e6a762112444740b88c163d7f4b",
|
|
14936
14958
|
"74ed417f88cb0ca76c4a3d10f278bd010f1d3f95eafb254d4732511bb50e404507a4049b779c5230137e4091a5582271",
|
|
14937
14959
|
"9043fcab93b972d3c14ad2dc8fa78ca7ad374fc937c02435681772a003f7a72876bc4d578089b5c4cf3fe9b480f1aabb",
|
|
@@ -14939,7 +14961,7 @@ const nw = [
|
|
|
14939
14961
|
"91cb67311e910cce68cd5b7d0de77aa40610d87c6681439b44c46c3ff786ae643956ab2c812478a1da8745b259f07a45",
|
|
14940
14962
|
"859065ac81b81d3735130ba08b8af72a7256b603fefb74faabae25ed28cca6edcaa7c10ea32b5948d675c18a9b0f2b1d",
|
|
14941
14963
|
"acd82a7d3943e23e95a9dc3ce0b0107ea358d6287f9e3afa245622f7c7e3e0a66142a928b6efcc02f594a95366d3a99d"
|
|
14942
|
-
],
|
|
14964
|
+
], ow = [
|
|
14943
14965
|
"62c0407056217a4c10764ed9045694c29fa93255d3cc04c2f989cdd9a1f8050c8b169714c71f1118ebce2fcc9951d1a9",
|
|
14944
14966
|
"cb95519905443f9f66f05f63c548b61ad1561a27fd5717b69285861aaea3c3063fe12a2571773b67fea3c6c11b4d8ec6",
|
|
14945
14967
|
"deb5895831b5e4286f5a2dcf5e9c27383821446f8df2b465f141d10743599be20ba3bb381ce063bf7139cc89f7f61d4c",
|
|
@@ -14948,8 +14970,8 @@ const nw = [
|
|
|
14948
14970
|
"a791bf92c25ffdfd372660e460a0e238c6778c090672df6509ae4bc065cf8668b6baac6b6a11d554af53ee0ff0172ad5",
|
|
14949
14971
|
"c4285443b87b9b12a6cea3bef1064ec060f652b235a297095975af8f134e5ed65f92d70d4616fdec80af9dff48bb9f35"
|
|
14950
14972
|
];
|
|
14951
|
-
function
|
|
14952
|
-
const t = [...(e == null ? void 0 : e.pcr0Values) || [], ...
|
|
14973
|
+
function aw(r, e) {
|
|
14974
|
+
const t = [...(e == null ? void 0 : e.pcr0Values) || [], ...sw], n = [...(e == null ? void 0 : e.pcr0DevValues) || [], ...ow];
|
|
14953
14975
|
return t.includes(r) ? {
|
|
14954
14976
|
isMatch: !0,
|
|
14955
14977
|
text: "PCR0 matches a known good value"
|
|
@@ -14962,19 +14984,19 @@ function sw(r, e) {
|
|
|
14962
14984
|
};
|
|
14963
14985
|
}
|
|
14964
14986
|
const ts = Ua, Dc = "641a0321a3e244efe456463195d606317ed7cdcc3c1756e09893f3c68f79bb5b";
|
|
14965
|
-
function
|
|
14987
|
+
function _y(r) {
|
|
14966
14988
|
return Array.from(r).map((e) => e.toString(16).padStart(2, "0")).join("");
|
|
14967
14989
|
}
|
|
14968
|
-
async function
|
|
14990
|
+
async function cw(r) {
|
|
14969
14991
|
const e = await crypto.subtle.digest("SHA-256", r);
|
|
14970
|
-
return
|
|
14992
|
+
return _y(new Uint8Array(e));
|
|
14971
14993
|
}
|
|
14972
14994
|
async function rs(r, e, t) {
|
|
14973
14995
|
console.log("Raw timestamp:", r.timestamp), console.log("Date object:", new Date(r.timestamp));
|
|
14974
14996
|
const n = Array.from(r.pcrs.entries()).map(([m, x]) => ({
|
|
14975
14997
|
id: m,
|
|
14976
|
-
value:
|
|
14977
|
-
})).filter((m) => !m.value.match(/^0+$/)), i = n.find((m) => m.id === 0), s = i ?
|
|
14998
|
+
value: _y(x)
|
|
14999
|
+
})).filter((m) => !m.value.match(/^0+$/)), i = n.find((m) => m.id === 0), s = i ? aw(i.value, t) : null, o = [...e, r.certificate].map((m) => {
|
|
14978
15000
|
const x = new wi(m);
|
|
14979
15001
|
return {
|
|
14980
15002
|
subject: x.subject,
|
|
@@ -14983,7 +15005,7 @@ async function rs(r, e, t) {
|
|
|
14983
15005
|
pem: x.toString("pem"),
|
|
14984
15006
|
isRoot: x.subject === "C=US, O=Amazon, OU=AWS, CN=aws.nitro-enclaves"
|
|
14985
15007
|
};
|
|
14986
|
-
}), c = new TextDecoder(), u = new wi(e[0]), h = await
|
|
15008
|
+
}), c = new TextDecoder(), u = new wi(e[0]), h = await cw(u.rawData);
|
|
14987
15009
|
return {
|
|
14988
15010
|
moduleId: r.module_id,
|
|
14989
15011
|
publicKey: r.public_key ? $r(r.public_key) : null,
|
|
@@ -15005,7 +15027,7 @@ async function rs(r, e, t) {
|
|
|
15005
15027
|
validatedPcr0Hash: s
|
|
15006
15028
|
};
|
|
15007
15029
|
}
|
|
15008
|
-
const
|
|
15030
|
+
const Ey = md({
|
|
15009
15031
|
auth: {
|
|
15010
15032
|
loading: !0,
|
|
15011
15033
|
user: void 0
|
|
@@ -15063,9 +15085,11 @@ const Sy = md({
|
|
|
15063
15085
|
getAttestationDocument: async () => {
|
|
15064
15086
|
throw new Error("getAttestationDocument called outside of OpenSecretProvider");
|
|
15065
15087
|
},
|
|
15066
|
-
generateThirdPartyToken: async () => ({ token: "" })
|
|
15088
|
+
generateThirdPartyToken: async () => ({ token: "" }),
|
|
15089
|
+
encryptData: Ay,
|
|
15090
|
+
decryptData: Sy
|
|
15067
15091
|
});
|
|
15068
|
-
function
|
|
15092
|
+
function lx({
|
|
15069
15093
|
children: r,
|
|
15070
15094
|
apiUrl: e,
|
|
15071
15095
|
clientId: t,
|
|
@@ -15084,12 +15108,12 @@ function ax({
|
|
|
15084
15108
|
throw new Error(
|
|
15085
15109
|
"OpenSecretProvider requires a non-empty clientId. Please provide a valid project UUID."
|
|
15086
15110
|
);
|
|
15087
|
-
|
|
15111
|
+
Mm(e), Promise.resolve().then(() => bd).then(({ apiConfig: X }) => {
|
|
15088
15112
|
const re = X.platformApiUrl || "";
|
|
15089
15113
|
X.configure(e, re);
|
|
15090
15114
|
});
|
|
15091
15115
|
}, [e, t]), Os(() => {
|
|
15092
|
-
i.user ? c(() =>
|
|
15116
|
+
i.user ? c(() => nw()) : c(void 0);
|
|
15093
15117
|
}, [i.user]);
|
|
15094
15118
|
async function u() {
|
|
15095
15119
|
const X = window.localStorage.getItem("access_token"), re = window.localStorage.getItem("refresh_token");
|
|
@@ -15101,7 +15125,7 @@ function ax({
|
|
|
15101
15125
|
return;
|
|
15102
15126
|
}
|
|
15103
15127
|
try {
|
|
15104
|
-
const Y = await
|
|
15128
|
+
const Y = await Gm();
|
|
15105
15129
|
s({
|
|
15106
15130
|
loading: !1,
|
|
15107
15131
|
user: Y
|
|
@@ -15119,7 +15143,7 @@ function ax({
|
|
|
15119
15143
|
async function h(X, re) {
|
|
15120
15144
|
console.log("Signing in");
|
|
15121
15145
|
try {
|
|
15122
|
-
const { access_token: Y, refresh_token: ye } = await
|
|
15146
|
+
const { access_token: Y, refresh_token: ye } = await Lm(X, re, t);
|
|
15123
15147
|
window.localStorage.setItem("access_token", Y), window.localStorage.setItem("refresh_token", ye), await u();
|
|
15124
15148
|
} catch (Y) {
|
|
15125
15149
|
throw console.error(Y), Y;
|
|
@@ -15127,22 +15151,22 @@ function ax({
|
|
|
15127
15151
|
}
|
|
15128
15152
|
async function m(X, re, Y, ye) {
|
|
15129
15153
|
try {
|
|
15130
|
-
const { access_token:
|
|
15154
|
+
const { access_token: ze, refresh_token: ut } = await Fm(
|
|
15131
15155
|
X,
|
|
15132
15156
|
re,
|
|
15133
15157
|
Y,
|
|
15134
15158
|
t,
|
|
15135
15159
|
ye || null
|
|
15136
15160
|
);
|
|
15137
|
-
window.localStorage.setItem("access_token",
|
|
15138
|
-
} catch (
|
|
15139
|
-
throw console.error(
|
|
15161
|
+
window.localStorage.setItem("access_token", ze), window.localStorage.setItem("refresh_token", ut), await u();
|
|
15162
|
+
} catch (ze) {
|
|
15163
|
+
throw console.error(ze), ze;
|
|
15140
15164
|
}
|
|
15141
15165
|
}
|
|
15142
15166
|
async function x(X, re) {
|
|
15143
15167
|
console.log("Signing in Guest");
|
|
15144
15168
|
try {
|
|
15145
|
-
const { access_token: Y, refresh_token: ye } = await
|
|
15169
|
+
const { access_token: Y, refresh_token: ye } = await Hm(X, re, t);
|
|
15146
15170
|
window.localStorage.setItem("access_token", Y), window.localStorage.setItem("refresh_token", ye), await u();
|
|
15147
15171
|
} catch (Y) {
|
|
15148
15172
|
throw console.error(Y), Y;
|
|
@@ -15150,19 +15174,19 @@ function ax({
|
|
|
15150
15174
|
}
|
|
15151
15175
|
async function G(X, re) {
|
|
15152
15176
|
try {
|
|
15153
|
-
const { access_token: Y, refresh_token: ye, id:
|
|
15177
|
+
const { access_token: Y, refresh_token: ye, id: ze } = await zm(
|
|
15154
15178
|
X,
|
|
15155
15179
|
re,
|
|
15156
15180
|
t
|
|
15157
15181
|
);
|
|
15158
|
-
return window.localStorage.setItem("access_token", Y), window.localStorage.setItem("refresh_token", ye), await u(), { access_token: Y, refresh_token: ye, id:
|
|
15182
|
+
return window.localStorage.setItem("access_token", Y), window.localStorage.setItem("refresh_token", ye), await u(), { access_token: Y, refresh_token: ye, id: ze };
|
|
15159
15183
|
} catch (Y) {
|
|
15160
15184
|
throw console.error(Y), Y;
|
|
15161
15185
|
}
|
|
15162
15186
|
}
|
|
15163
15187
|
async function N(X, re, Y) {
|
|
15164
15188
|
try {
|
|
15165
|
-
await
|
|
15189
|
+
await tw(X, re, Y), await u();
|
|
15166
15190
|
} catch (ye) {
|
|
15167
15191
|
throw console.error(ye), ye;
|
|
15168
15192
|
}
|
|
@@ -15171,7 +15195,7 @@ function ax({
|
|
|
15171
15195
|
const X = window.localStorage.getItem("refresh_token");
|
|
15172
15196
|
if (X)
|
|
15173
15197
|
try {
|
|
15174
|
-
await
|
|
15198
|
+
await Km(X);
|
|
15175
15199
|
} catch (re) {
|
|
15176
15200
|
console.error("Error during logout:", re);
|
|
15177
15201
|
}
|
|
@@ -15199,42 +15223,42 @@ function ax({
|
|
|
15199
15223
|
requestNewVerificationEmail: $a,
|
|
15200
15224
|
changePassword: vy,
|
|
15201
15225
|
refreshAccessToken: Uc,
|
|
15202
|
-
requestPasswordReset: (X, re) =>
|
|
15203
|
-
confirmPasswordReset: (X, re, Y, ye) =>
|
|
15226
|
+
requestPasswordReset: (X, re) => Wm(X, re, t),
|
|
15227
|
+
confirmPasswordReset: (X, re, Y, ye) => Ym(X, re, Y, ye, t),
|
|
15204
15228
|
initiateGitHubAuth: async (X) => {
|
|
15205
15229
|
try {
|
|
15206
|
-
return await
|
|
15230
|
+
return await Jm(t, X);
|
|
15207
15231
|
} catch (re) {
|
|
15208
15232
|
throw console.error("Failed to initiate GitHub auth:", re), re;
|
|
15209
15233
|
}
|
|
15210
15234
|
},
|
|
15211
15235
|
handleGitHubCallback: async (X, re, Y) => {
|
|
15212
15236
|
try {
|
|
15213
|
-
const { access_token: ye, refresh_token:
|
|
15237
|
+
const { access_token: ye, refresh_token: ze } = await Xm(
|
|
15214
15238
|
X,
|
|
15215
15239
|
re,
|
|
15216
15240
|
Y
|
|
15217
15241
|
);
|
|
15218
|
-
window.localStorage.setItem("access_token", ye), window.localStorage.setItem("refresh_token",
|
|
15242
|
+
window.localStorage.setItem("access_token", ye), window.localStorage.setItem("refresh_token", ze), await u();
|
|
15219
15243
|
} catch (ye) {
|
|
15220
15244
|
throw console.error("GitHub callback error:", ye), ye;
|
|
15221
15245
|
}
|
|
15222
15246
|
},
|
|
15223
15247
|
initiateGoogleAuth: async (X) => {
|
|
15224
15248
|
try {
|
|
15225
|
-
return await
|
|
15249
|
+
return await Qm(t, X);
|
|
15226
15250
|
} catch (re) {
|
|
15227
15251
|
throw console.error("Failed to initiate Google auth:", re), re;
|
|
15228
15252
|
}
|
|
15229
15253
|
},
|
|
15230
15254
|
handleGoogleCallback: async (X, re, Y) => {
|
|
15231
15255
|
try {
|
|
15232
|
-
const { access_token: ye, refresh_token:
|
|
15256
|
+
const { access_token: ye, refresh_token: ze } = await ew(
|
|
15233
15257
|
X,
|
|
15234
15258
|
re,
|
|
15235
15259
|
Y
|
|
15236
15260
|
);
|
|
15237
|
-
window.localStorage.setItem("access_token", ye), window.localStorage.setItem("refresh_token",
|
|
15261
|
+
window.localStorage.setItem("access_token", ye), window.localStorage.setItem("refresh_token", ze), await u();
|
|
15238
15262
|
} catch (ye) {
|
|
15239
15263
|
throw console.error("Google callback error:", ye), ye;
|
|
15240
15264
|
}
|
|
@@ -15262,11 +15286,13 @@ function ax({
|
|
|
15262
15286
|
);
|
|
15263
15287
|
return rs(ye, ye.cabundle, n);
|
|
15264
15288
|
},
|
|
15265
|
-
generateThirdPartyToken:
|
|
15289
|
+
generateThirdPartyToken: rw,
|
|
15290
|
+
encryptData: Ay,
|
|
15291
|
+
decryptData: Sy
|
|
15266
15292
|
};
|
|
15267
|
-
return /* @__PURE__ */ vd(
|
|
15293
|
+
return /* @__PURE__ */ vd(Ey.Provider, { value: le, children: r });
|
|
15268
15294
|
}
|
|
15269
|
-
const
|
|
15295
|
+
const ky = md({
|
|
15270
15296
|
auth: {
|
|
15271
15297
|
loading: !0,
|
|
15272
15298
|
developer: void 0
|
|
@@ -15323,7 +15349,7 @@ const _y = md({
|
|
|
15323
15349
|
acceptInvite: oy,
|
|
15324
15350
|
apiUrl: ""
|
|
15325
15351
|
});
|
|
15326
|
-
function
|
|
15352
|
+
function ux({
|
|
15327
15353
|
children: r,
|
|
15328
15354
|
apiUrl: e,
|
|
15329
15355
|
pcrConfig: t = {}
|
|
@@ -15337,7 +15363,7 @@ function cx({
|
|
|
15337
15363
|
throw new Error(
|
|
15338
15364
|
"OpenSecretDeveloper requires a non-empty apiUrl. Please provide a valid API endpoint URL."
|
|
15339
15365
|
);
|
|
15340
|
-
|
|
15366
|
+
Nm(e), Promise.resolve().then(() => bd).then(({ apiConfig: m }) => {
|
|
15341
15367
|
const x = m.appApiUrl || "";
|
|
15342
15368
|
m.configure(x, e);
|
|
15343
15369
|
}).catch((m) => {
|
|
@@ -15356,7 +15382,7 @@ function cx({
|
|
|
15356
15382
|
return;
|
|
15357
15383
|
}
|
|
15358
15384
|
try {
|
|
15359
|
-
const G = await
|
|
15385
|
+
const G = await $m();
|
|
15360
15386
|
i({
|
|
15361
15387
|
loading: !1,
|
|
15362
15388
|
developer: {
|
|
@@ -15387,7 +15413,7 @@ function cx({
|
|
|
15387
15413
|
}, []);
|
|
15388
15414
|
async function c(m, x) {
|
|
15389
15415
|
try {
|
|
15390
|
-
const { access_token: G, refresh_token: N } = await
|
|
15416
|
+
const { access_token: G, refresh_token: N } = await jm(m, x);
|
|
15391
15417
|
return window.localStorage.setItem("access_token", G), window.localStorage.setItem("refresh_token", N), await s(), { access_token: G, refresh_token: N, id: "", email: m };
|
|
15392
15418
|
} catch (G) {
|
|
15393
15419
|
throw console.error("Login error:", G), G;
|
|
@@ -15395,7 +15421,7 @@ function cx({
|
|
|
15395
15421
|
}
|
|
15396
15422
|
async function u(m, x, G, N) {
|
|
15397
15423
|
try {
|
|
15398
|
-
const { access_token: v, refresh_token: A } = await
|
|
15424
|
+
const { access_token: v, refresh_token: A } = await Pm(
|
|
15399
15425
|
m,
|
|
15400
15426
|
x,
|
|
15401
15427
|
G,
|
|
@@ -15415,7 +15441,7 @@ function cx({
|
|
|
15415
15441
|
const m = window.localStorage.getItem("refresh_token");
|
|
15416
15442
|
if (m)
|
|
15417
15443
|
try {
|
|
15418
|
-
await
|
|
15444
|
+
await Rm(m);
|
|
15419
15445
|
} catch (x) {
|
|
15420
15446
|
console.error("Error during logout:", x);
|
|
15421
15447
|
}
|
|
@@ -15462,30 +15488,30 @@ function cx({
|
|
|
15462
15488
|
acceptInvite: oy,
|
|
15463
15489
|
apiUrl: e
|
|
15464
15490
|
};
|
|
15465
|
-
return /* @__PURE__ */ vd(
|
|
15491
|
+
return /* @__PURE__ */ vd(ky.Provider, { value: h, children: r });
|
|
15466
15492
|
}
|
|
15467
|
-
function
|
|
15468
|
-
return wd(
|
|
15493
|
+
function fx() {
|
|
15494
|
+
return wd(Ey);
|
|
15469
15495
|
}
|
|
15470
|
-
function
|
|
15471
|
-
return wd(
|
|
15496
|
+
function hx() {
|
|
15497
|
+
return wd(ky);
|
|
15472
15498
|
}
|
|
15473
|
-
function
|
|
15499
|
+
function dx() {
|
|
15474
15500
|
const r = new Uint8Array(32);
|
|
15475
15501
|
return crypto.getRandomValues(r), Array.from(r, (e) => e.toString(16).padStart(2, "0")).join("");
|
|
15476
15502
|
}
|
|
15477
|
-
async function
|
|
15503
|
+
async function px(r) {
|
|
15478
15504
|
const t = new TextEncoder().encode(r), n = await crypto.subtle.digest("SHA-256", t);
|
|
15479
15505
|
return Array.from(new Uint8Array(n)).map((s) => s.toString(16).padStart(2, "0")).join("");
|
|
15480
15506
|
}
|
|
15481
15507
|
export {
|
|
15482
|
-
|
|
15483
|
-
|
|
15484
|
-
|
|
15485
|
-
|
|
15508
|
+
Ey as OpenSecretContext,
|
|
15509
|
+
ux as OpenSecretDeveloper,
|
|
15510
|
+
ky as OpenSecretDeveloperContext,
|
|
15511
|
+
lx as OpenSecretProvider,
|
|
15486
15512
|
Ho as apiConfig,
|
|
15487
|
-
|
|
15488
|
-
|
|
15489
|
-
|
|
15490
|
-
|
|
15513
|
+
dx as generateSecureSecret,
|
|
15514
|
+
px as hashSecret,
|
|
15515
|
+
fx as useOpenSecret,
|
|
15516
|
+
hx as useOpenSecretDeveloper
|
|
15491
15517
|
};
|