@opensecret/react 1.0.0-beta.2 → 1.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +110 -2
- package/dist/opensecret-react.es.js +908 -861
- package/dist/opensecret-react.umd.js +19 -19
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
1
|
+
var ky = Object.defineProperty;
|
|
2
2
|
var _f = (r) => {
|
|
3
3
|
throw TypeError(r);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var Ve = (r, e, t) =>
|
|
5
|
+
var Iy = (r, e, t) => e in r ? ky(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
6
|
+
var Ve = (r, e, t) => Iy(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 Cy {
|
|
19
19
|
constructor() {
|
|
20
20
|
Ve(this, "_appApiUrl", "");
|
|
21
21
|
Ve(this, "_platformApiUrl", "");
|
|
@@ -67,11 +67,11 @@ class Ey {
|
|
|
67
67
|
return this.isPlatformPath(e) ? "platformRefreshToken" : "refreshToken";
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
const Ho = new
|
|
70
|
+
const Ho = new Cy(), bd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
71
71
|
__proto__: null,
|
|
72
72
|
apiConfig: Ho
|
|
73
73
|
}, Symbol.toStringTag, { value: "Module" })), hr = 256;
|
|
74
|
-
class
|
|
74
|
+
class By {
|
|
75
75
|
// TODO(dchest): methods to encode chunk-by-chunk.
|
|
76
76
|
constructor(e = "=") {
|
|
77
77
|
Ve(this, "_paddingCharacter");
|
|
@@ -139,30 +139,30 @@ class ky {
|
|
|
139
139
|
return t;
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
const xd = new
|
|
142
|
+
const xd = new By();
|
|
143
143
|
function $r(r) {
|
|
144
144
|
return xd.encode(r);
|
|
145
145
|
}
|
|
146
146
|
function Rs(r) {
|
|
147
147
|
return xd.decode(r);
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function Gt(r, e = new Uint8Array(4), t = 0) {
|
|
150
150
|
return e[t + 0] = r >>> 0, e[t + 1] = r >>> 8, e[t + 2] = r >>> 16, e[t + 3] = r >>> 24, e;
|
|
151
151
|
}
|
|
152
152
|
function kf(r, e = new Uint8Array(8), t = 0) {
|
|
153
|
-
return
|
|
153
|
+
return Gt(r >>> 0, e, t), Gt(r / 4294967296 >>> 0, e, t + 4), e;
|
|
154
154
|
}
|
|
155
155
|
function Cr(r) {
|
|
156
156
|
for (let e = 0; e < r.length; e++)
|
|
157
157
|
r[e] = 0;
|
|
158
158
|
return r;
|
|
159
159
|
}
|
|
160
|
-
const
|
|
161
|
-
function
|
|
162
|
-
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],
|
|
163
|
-
for (let pt = 0; pt <
|
|
164
|
-
R = R + Y | 0,
|
|
165
|
-
|
|
160
|
+
const Oy = 20;
|
|
161
|
+
function Ty(r, e, t) {
|
|
162
|
+
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, Fe = h, lt = m, St = x, Bt = G, Ot = N, _t = v, ut = A, Ye = O, ae = k, Ee = j;
|
|
163
|
+
for (let pt = 0; pt < Oy; pt += 2)
|
|
164
|
+
R = R + Y | 0, ut ^= R, ut = ut >>> 16 | ut << 16, St = St + ut | 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 + Fe | 0, ae ^= X, ae = ae >>> 16 | ae << 16, Ot = Ot + ae | 0, Fe ^= Ot, Fe = Fe >>> 20 | Fe << 12, re = re + lt | 0, Ee ^= re, Ee = Ee >>> 16 | Ee << 16, _t = _t + Ee | 0, lt ^= _t, lt = lt >>> 20 | lt << 12, X = X + Fe | 0, ae ^= X, ae = ae >>> 24 | ae << 8, Ot = Ot + ae | 0, Fe ^= Ot, Fe = Fe >>> 25 | Fe << 7, re = re + lt | 0, Ee ^= re, Ee = Ee >>> 24 | Ee << 8, _t = _t + Ee | 0, lt ^= _t, lt = lt >>> 25 | lt << 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, ut ^= R, ut = ut >>> 24 | ut << 8, St = St + ut | 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 + Fe | 0, ut ^= le, ut = ut >>> 16 | ut << 16, _t = _t + ut | 0, Fe ^= _t, Fe = Fe >>> 20 | Fe << 12, X = X + lt | 0, Ye ^= X, Ye = Ye >>> 16 | Ye << 16, St = St + Ye | 0, lt ^= St, lt = lt >>> 20 | lt << 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 + lt | 0, Ye ^= X, Ye = Ye >>> 24 | Ye << 8, St = St + Ye | 0, lt ^= St, lt = lt >>> 25 | lt << 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 + Fe | 0, ut ^= le, ut = ut >>> 24 | ut << 8, _t = _t + ut | 0, Fe ^= _t, Fe = Fe >>> 25 | Fe << 7, R = R + ye | 0, Ee ^= R, Ee = Ee >>> 24 | Ee << 8, Ot = Ot + Ee | 0, ye ^= Ot, ye = ye >>> 25 | ye << 7;
|
|
165
|
+
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(Fe + h | 0, r, 24), Gt(lt + 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(ut + A | 0, r, 48), Gt(Ye + O | 0, r, 52), Gt(ae + k | 0, r, 56), Gt(Ee + j | 0, r, 60);
|
|
166
166
|
}
|
|
167
167
|
function il(r, e, t, n, i = 0) {
|
|
168
168
|
if (r.length !== 32)
|
|
@@ -181,24 +181,24 @@ function il(r, e, t, n, i = 0) {
|
|
|
181
181
|
}
|
|
182
182
|
const c = new Uint8Array(64);
|
|
183
183
|
for (let u = 0; u < t.length; u += 64) {
|
|
184
|
-
|
|
184
|
+
Ty(c, s, r);
|
|
185
185
|
for (let h = u; h < u + 64 && h < t.length; h++)
|
|
186
186
|
n[h] = t[h] ^ c[h - u];
|
|
187
|
-
|
|
187
|
+
Ny(s, 0, o);
|
|
188
188
|
}
|
|
189
189
|
return Cr(c), i === 0 && Cr(s), n;
|
|
190
190
|
}
|
|
191
191
|
function If(r, e, t, n = 0) {
|
|
192
192
|
return Cr(t), il(r, e, t, t, n);
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function Ny(r, e, t) {
|
|
195
195
|
let n = 1;
|
|
196
196
|
for (; t--; )
|
|
197
197
|
n = n + (r[e] & 255) | 0, r[e] = n & 255, n >>>= 8, e++;
|
|
198
198
|
if (n > 0)
|
|
199
199
|
throw new Error("ChaCha: counter overflow");
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function jy(r, e) {
|
|
202
202
|
if (r.length !== e.length)
|
|
203
203
|
return 0;
|
|
204
204
|
let t = 0;
|
|
@@ -206,13 +206,13 @@ function Oy(r, e) {
|
|
|
206
206
|
t |= r[n] ^ e[n];
|
|
207
207
|
return 1 & t - 1 >>> 8;
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
return r.length === 0 || e.length === 0 ? !1 :
|
|
209
|
+
function Py(r, e) {
|
|
210
|
+
return r.length === 0 || e.length === 0 ? !1 : jy(r, e) !== 0;
|
|
211
211
|
}
|
|
212
|
-
const
|
|
213
|
-
class
|
|
212
|
+
const Ry = 16;
|
|
213
|
+
class Uy {
|
|
214
214
|
constructor(e) {
|
|
215
|
-
Ve(this, "digestLength",
|
|
215
|
+
Ve(this, "digestLength", Ry);
|
|
216
216
|
Ve(this, "_buffer", new Uint8Array(16));
|
|
217
217
|
Ve(this, "_r", new Uint16Array(10));
|
|
218
218
|
Ve(this, "_h", new Uint16Array(10));
|
|
@@ -238,46 +238,46 @@ class jy {
|
|
|
238
238
|
this._r[8] = (u >>> 8 | h << 8) & 8191, this._r[9] = h >>> 5 & 127, this._pad[0] = e[16] | e[17] << 8, this._pad[1] = e[18] | e[19] << 8, this._pad[2] = e[20] | e[21] << 8, this._pad[3] = e[22] | e[23] << 8, this._pad[4] = e[24] | e[25] << 8, this._pad[5] = e[26] | e[27] << 8, this._pad[6] = e[28] | e[29] << 8, this._pad[7] = e[30] | e[31] << 8;
|
|
239
239
|
}
|
|
240
240
|
_blocks(e, t, n) {
|
|
241
|
-
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],
|
|
241
|
+
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];
|
|
242
242
|
for (; n >= 16; ) {
|
|
243
243
|
let Fe = e[t + 0] | e[t + 1] << 8;
|
|
244
244
|
s += Fe & 8191;
|
|
245
|
-
let
|
|
246
|
-
o += (Fe >>> 13 |
|
|
245
|
+
let lt = e[t + 2] | e[t + 3] << 8;
|
|
246
|
+
o += (Fe >>> 13 | lt << 3) & 8191;
|
|
247
247
|
let St = e[t + 4] | e[t + 5] << 8;
|
|
248
|
-
c += (
|
|
248
|
+
c += (lt >>> 10 | St << 6) & 8191;
|
|
249
249
|
let Bt = e[t + 6] | e[t + 7] << 8;
|
|
250
250
|
u += (St >>> 7 | Bt << 9) & 8191;
|
|
251
251
|
let Ot = e[t + 8] | e[t + 9] << 8;
|
|
252
252
|
h += (Bt >>> 4 | Ot << 12) & 8191, m += Ot >>> 1 & 8191;
|
|
253
253
|
let _t = e[t + 10] | e[t + 11] << 8;
|
|
254
254
|
x += (Ot >>> 14 | _t << 2) & 8191;
|
|
255
|
-
let
|
|
256
|
-
G += (_t >>> 11 |
|
|
255
|
+
let ut = e[t + 12] | e[t + 13] << 8;
|
|
256
|
+
G += (_t >>> 11 | ut << 5) & 8191;
|
|
257
257
|
let Ye = e[t + 14] | e[t + 15] << 8;
|
|
258
|
-
|
|
258
|
+
N += (ut >>> 8 | Ye << 8) & 8191, v += Ye >>> 5 | i;
|
|
259
259
|
let ae = 0, Ee = ae;
|
|
260
|
-
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 +=
|
|
260
|
+
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;
|
|
261
261
|
let pt = ae;
|
|
262
|
-
pt += s * O, pt += o * A, pt += c * (5 * ye), pt += u * (5 * Y), pt += h * (5 * re), ae = pt >>> 13, pt &= 8191, pt += m * (5 * X), pt += x * (5 * le), pt += G * (5 * R), pt +=
|
|
262
|
+
pt += s * O, pt += o * A, pt += c * (5 * ye), pt += u * (5 * Y), pt += h * (5 * re), ae = pt >>> 13, pt &= 8191, pt += m * (5 * X), pt += x * (5 * le), pt += G * (5 * R), pt += N * (5 * j), pt += v * (5 * k), ae += pt >>> 13, pt &= 8191;
|
|
263
263
|
let Rt = ae;
|
|
264
|
-
Rt += s * k, Rt += o * O, Rt += c * A, Rt += u * (5 * ye), Rt += h * (5 * Y), ae = Rt >>> 13, Rt &= 8191, Rt += m * (5 * re), Rt += x * (5 * X), Rt += G * (5 * le), Rt +=
|
|
264
|
+
Rt += s * k, Rt += o * O, Rt += c * A, Rt += u * (5 * ye), Rt += h * (5 * Y), ae = Rt >>> 13, Rt &= 8191, Rt += m * (5 * re), Rt += x * (5 * X), Rt += G * (5 * le), Rt += N * (5 * R), Rt += v * (5 * j), ae += Rt >>> 13, Rt &= 8191;
|
|
265
265
|
let Ut = ae;
|
|
266
|
-
Ut += s * j, Ut += o * k, Ut += c * O, Ut += u * A, Ut += h * (5 * ye), ae = Ut >>> 13, Ut &= 8191, Ut += m * (5 * Y), Ut += x * (5 * re), Ut += G * (5 * X), Ut +=
|
|
266
|
+
Ut += s * j, Ut += o * k, Ut += c * O, Ut += u * A, Ut += h * (5 * ye), ae = Ut >>> 13, Ut &= 8191, Ut += m * (5 * Y), Ut += x * (5 * re), Ut += G * (5 * X), Ut += N * (5 * le), Ut += v * (5 * R), ae += Ut >>> 13, Ut &= 8191;
|
|
267
267
|
let fe = ae;
|
|
268
|
-
fe += s * R, fe += o * j, fe += c * k, fe += u * O, fe += h * A, ae = fe >>> 13, fe &= 8191, fe += m * (5 * ye), fe += x * (5 * Y), fe += G * (5 * re), fe +=
|
|
268
|
+
fe += s * R, fe += o * j, fe += c * k, fe += u * O, fe += h * A, ae = fe >>> 13, fe &= 8191, fe += m * (5 * ye), fe += x * (5 * Y), fe += G * (5 * re), fe += N * (5 * X), fe += v * (5 * le), ae += fe >>> 13, fe &= 8191;
|
|
269
269
|
let tt = ae;
|
|
270
|
-
tt += s * le, tt += o * R, tt += c * j, tt += u * k, tt += h * O, ae = tt >>> 13, tt &= 8191, tt += m * A, tt += x * (5 * ye), tt += G * (5 * Y), tt +=
|
|
270
|
+
tt += s * le, tt += o * R, tt += c * j, tt += u * k, tt += h * O, ae = tt >>> 13, tt &= 8191, tt += m * A, tt += x * (5 * ye), tt += G * (5 * Y), tt += N * (5 * re), tt += v * (5 * X), ae += tt >>> 13, tt &= 8191;
|
|
271
271
|
let yt = ae;
|
|
272
|
-
yt += s * X, yt += o * le, yt += c * R, yt += u * j, yt += h * k, ae = yt >>> 13, yt &= 8191, yt += m * O, yt += x * A, yt += G * (5 * ye), yt +=
|
|
272
|
+
yt += s * X, yt += o * le, yt += c * R, yt += u * j, yt += h * k, ae = yt >>> 13, yt &= 8191, yt += m * O, yt += x * A, yt += G * (5 * ye), yt += N * (5 * Y), yt += v * (5 * re), ae += yt >>> 13, yt &= 8191;
|
|
273
273
|
let te = ae;
|
|
274
|
-
te += s * re, te += o * X, te += c * le, te += u * R, te += h * j, ae = te >>> 13, te &= 8191, te += m * k, te += x * O, te += G * A, te +=
|
|
274
|
+
te += s * re, te += o * X, te += c * le, te += u * R, te += h * j, ae = te >>> 13, te &= 8191, te += m * k, te += x * O, te += G * A, te += N * (5 * ye), te += v * (5 * Y), ae += te >>> 13, te &= 8191;
|
|
275
275
|
let ht = ae;
|
|
276
|
-
ht += s * Y, ht += o * re, ht += c * X, ht += u * le, ht += h * R, ae = ht >>> 13, ht &= 8191, ht += m * j, ht += x * k, ht += G * O, ht +=
|
|
276
|
+
ht += s * Y, ht += o * re, ht += c * X, ht += u * le, ht += h * R, ae = ht >>> 13, ht &= 8191, ht += m * j, ht += x * k, ht += G * O, ht += N * A, ht += v * (5 * ye), ae += ht >>> 13, ht &= 8191;
|
|
277
277
|
let Mt = ae;
|
|
278
|
-
Mt += s * ye, Mt += o * Y, Mt += c * re, Mt += u * X, Mt += h * le, ae = Mt >>> 13, Mt &= 8191, Mt += m * R, Mt += x * j, Mt += G * k, Mt +=
|
|
278
|
+
Mt += s * ye, Mt += o * Y, Mt += c * re, Mt += u * X, Mt += h * le, ae = Mt >>> 13, Mt &= 8191, Mt += m * R, Mt += x * j, Mt += G * k, Mt += N * O, Mt += v * A, ae += Mt >>> 13, Mt &= 8191, ae = (ae << 2) + ae | 0, ae = ae + Ee | 0, Ee = ae & 8191, ae = ae >>> 13, pt += ae, s = Ee, o = pt, c = Rt, u = Ut, h = fe, m = tt, x = yt, G = te, N = ht, v = Mt, t += 16, n -= 16;
|
|
279
279
|
}
|
|
280
|
-
this._h[0] = s, this._h[1] = o, this._h[2] = c, this._h[3] = u, this._h[4] = h, this._h[5] = m, this._h[6] = x, this._h[7] = G, this._h[8] =
|
|
280
|
+
this._h[0] = s, this._h[1] = o, this._h[2] = c, this._h[3] = u, this._h[4] = h, this._h[5] = m, this._h[6] = x, this._h[7] = G, this._h[8] = N, this._h[9] = v;
|
|
281
281
|
}
|
|
282
282
|
finish(e, t = 0) {
|
|
283
283
|
const n = new Uint16Array(10);
|
|
@@ -326,16 +326,16 @@ class jy {
|
|
|
326
326
|
return Cr(this._buffer), Cr(this._r), Cr(this._h), Cr(this._pad), this._leftover = 0, this._fin = 0, this._finished = !0, this;
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
|
-
const
|
|
329
|
+
const Dy = 32, $y = 12, My = 16, Cf = new Uint8Array(16);
|
|
330
330
|
class Tu {
|
|
331
331
|
/**
|
|
332
332
|
* Creates a new instance with the given 32-byte key.
|
|
333
333
|
*/
|
|
334
334
|
constructor(e) {
|
|
335
|
-
Ve(this, "nonceLength",
|
|
336
|
-
Ve(this, "tagLength",
|
|
335
|
+
Ve(this, "nonceLength", $y);
|
|
336
|
+
Ve(this, "tagLength", My);
|
|
337
337
|
Ve(this, "_key");
|
|
338
|
-
if (e.length !==
|
|
338
|
+
if (e.length !== Dy)
|
|
339
339
|
throw new Error("ChaCha20Poly1305 needs 32-byte key");
|
|
340
340
|
this._key = new Uint8Array(e);
|
|
341
341
|
}
|
|
@@ -391,7 +391,7 @@ class Tu {
|
|
|
391
391
|
const o = new Uint8Array(32);
|
|
392
392
|
If(this._key, s, o, 4);
|
|
393
393
|
const c = new Uint8Array(this.tagLength);
|
|
394
|
-
if (this._authenticate(c, o, t.subarray(0, t.length - this.tagLength), n), !
|
|
394
|
+
if (this._authenticate(c, o, t.subarray(0, t.length - this.tagLength), n), !Py(c, t.subarray(t.length - this.tagLength, t.length)))
|
|
395
395
|
return null;
|
|
396
396
|
const u = t.length - this.tagLength;
|
|
397
397
|
let h;
|
|
@@ -407,7 +407,7 @@ class Tu {
|
|
|
407
407
|
return Cr(this._key), this;
|
|
408
408
|
}
|
|
409
409
|
_authenticate(e, t, n, i) {
|
|
410
|
-
const s = new
|
|
410
|
+
const s = new Uy(t);
|
|
411
411
|
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));
|
|
412
412
|
const o = new Uint8Array(8);
|
|
413
413
|
i && kf(i.length, o), s.update(o), kf(n.length, o), s.update(o);
|
|
@@ -418,7 +418,7 @@ class Tu {
|
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
420
|
const Bf = 65536;
|
|
421
|
-
class
|
|
421
|
+
class Vy {
|
|
422
422
|
constructor() {
|
|
423
423
|
Ve(this, "isAvailable", !1);
|
|
424
424
|
Ve(this, "isInstantiated", !1);
|
|
@@ -433,12 +433,12 @@ class Dy {
|
|
|
433
433
|
return t;
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
const
|
|
437
|
-
function
|
|
436
|
+
const Ly = new Vy();
|
|
437
|
+
function Hy(r, e = Ly) {
|
|
438
438
|
return e.randomBytes(r);
|
|
439
439
|
}
|
|
440
440
|
function Ad(r, e) {
|
|
441
|
-
const t = new Tu(r), n =
|
|
441
|
+
const t = new Tu(r), n = Hy(12), s = new TextEncoder().encode(e), o = t.seal(n, s), c = new Uint8Array(n.length + o.length);
|
|
442
442
|
return c.set(n), c.set(o, n.length), $r(c);
|
|
443
443
|
}
|
|
444
444
|
function Sd(r, e) {
|
|
@@ -448,10 +448,10 @@ function Sd(r, e) {
|
|
|
448
448
|
return new TextDecoder().decode(c);
|
|
449
449
|
}
|
|
450
450
|
var sl = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
451
|
-
function
|
|
451
|
+
function Fy(r) {
|
|
452
452
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function zy(r) {
|
|
455
455
|
if (r.__esModule) return r;
|
|
456
456
|
var e = r.default;
|
|
457
457
|
if (typeof e == "function") {
|
|
@@ -529,9 +529,9 @@ var Of;
|
|
|
529
529
|
} : function(_, I) {
|
|
530
530
|
return _[I];
|
|
531
531
|
}
|
|
532
|
-
}, x = Object.getPrototypeOf(Function), G = typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map : bs(),
|
|
533
|
-
function j(_, I,
|
|
534
|
-
if (fe(
|
|
532
|
+
}, x = Object.getPrototypeOf(Function), G = typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map : bs(), N = typeof Set == "function" && typeof Set.prototype.entries == "function" ? Set : xs(), v = typeof WeakMap == "function" ? WeakMap : Bo(), A = i ? Symbol.for("@reflect-metadata:registry") : void 0, O = ms(), k = Oi(O);
|
|
533
|
+
function j(_, I, T, K) {
|
|
534
|
+
if (fe(T)) {
|
|
535
535
|
if (!hs(_))
|
|
536
536
|
throw new TypeError();
|
|
537
537
|
if (!ds(I))
|
|
@@ -544,49 +544,49 @@ var Of;
|
|
|
544
544
|
throw new TypeError();
|
|
545
545
|
if (!te(K) && !fe(K) && !tt(K))
|
|
546
546
|
throw new TypeError();
|
|
547
|
-
return tt(K) && (K = void 0),
|
|
547
|
+
return tt(K) && (K = void 0), T = or(T), Ot(_, I, T, K);
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
550
|
e("decorate", j);
|
|
551
551
|
function R(_, I) {
|
|
552
|
-
function
|
|
552
|
+
function T(K, xe) {
|
|
553
553
|
if (!te(K))
|
|
554
554
|
throw new TypeError();
|
|
555
555
|
if (!fe(xe) && !$c(xe))
|
|
556
556
|
throw new TypeError();
|
|
557
557
|
Ee(_, I, K, xe);
|
|
558
558
|
}
|
|
559
|
-
return
|
|
559
|
+
return T;
|
|
560
560
|
}
|
|
561
561
|
e("metadata", R);
|
|
562
|
-
function le(_, I,
|
|
563
|
-
if (!te(
|
|
562
|
+
function le(_, I, T, K) {
|
|
563
|
+
if (!te(T))
|
|
564
564
|
throw new TypeError();
|
|
565
|
-
return fe(K) || (K = or(K)), Ee(_, I,
|
|
565
|
+
return fe(K) || (K = or(K)), Ee(_, I, T, K);
|
|
566
566
|
}
|
|
567
567
|
e("defineMetadata", le);
|
|
568
|
-
function X(_, I,
|
|
568
|
+
function X(_, I, T) {
|
|
569
569
|
if (!te(I))
|
|
570
570
|
throw new TypeError();
|
|
571
|
-
return fe(
|
|
571
|
+
return fe(T) || (T = or(T)), _t(_, I, T);
|
|
572
572
|
}
|
|
573
573
|
e("hasMetadata", X);
|
|
574
|
-
function re(_, I,
|
|
574
|
+
function re(_, I, T) {
|
|
575
575
|
if (!te(I))
|
|
576
576
|
throw new TypeError();
|
|
577
|
-
return fe(
|
|
577
|
+
return fe(T) || (T = or(T)), ut(_, I, T);
|
|
578
578
|
}
|
|
579
579
|
e("hasOwnMetadata", re);
|
|
580
|
-
function Y(_, I,
|
|
580
|
+
function Y(_, I, T) {
|
|
581
581
|
if (!te(I))
|
|
582
582
|
throw new TypeError();
|
|
583
|
-
return fe(
|
|
583
|
+
return fe(T) || (T = or(T)), Ye(_, I, T);
|
|
584
584
|
}
|
|
585
585
|
e("getMetadata", Y);
|
|
586
|
-
function ye(_, I,
|
|
586
|
+
function ye(_, I, T) {
|
|
587
587
|
if (!te(I))
|
|
588
588
|
throw new TypeError();
|
|
589
|
-
return fe(
|
|
589
|
+
return fe(T) || (T = or(T)), ae(_, I, T);
|
|
590
590
|
}
|
|
591
591
|
e("getOwnMetadata", ye);
|
|
592
592
|
function Fe(_, I) {
|
|
@@ -595,30 +595,30 @@ var Of;
|
|
|
595
595
|
return fe(I) || (I = or(I)), pt(_, I);
|
|
596
596
|
}
|
|
597
597
|
e("getMetadataKeys", Fe);
|
|
598
|
-
function
|
|
598
|
+
function lt(_, I) {
|
|
599
599
|
if (!te(_))
|
|
600
600
|
throw new TypeError();
|
|
601
601
|
return fe(I) || (I = or(I)), Rt(_, I);
|
|
602
602
|
}
|
|
603
|
-
e("getOwnMetadataKeys",
|
|
604
|
-
function St(_, I,
|
|
603
|
+
e("getOwnMetadataKeys", lt);
|
|
604
|
+
function St(_, I, T) {
|
|
605
605
|
if (!te(I))
|
|
606
606
|
throw new TypeError();
|
|
607
|
-
if (fe(
|
|
607
|
+
if (fe(T) || (T = or(T)), !te(I))
|
|
608
608
|
throw new TypeError();
|
|
609
|
-
fe(
|
|
609
|
+
fe(T) || (T = or(T));
|
|
610
610
|
var K = Wr(
|
|
611
611
|
I,
|
|
612
|
-
|
|
612
|
+
T,
|
|
613
613
|
/*Create*/
|
|
614
614
|
!1
|
|
615
615
|
);
|
|
616
|
-
return fe(K) ? !1 : K.OrdinaryDeleteMetadata(_, I,
|
|
616
|
+
return fe(K) ? !1 : K.OrdinaryDeleteMetadata(_, I, T);
|
|
617
617
|
}
|
|
618
618
|
e("deleteMetadata", St);
|
|
619
619
|
function Bt(_, I) {
|
|
620
|
-
for (var
|
|
621
|
-
var K = _[
|
|
620
|
+
for (var T = _.length - 1; T >= 0; --T) {
|
|
621
|
+
var K = _[T], xe = K(I);
|
|
622
622
|
if (!fe(xe) && !tt(xe)) {
|
|
623
623
|
if (!ds(xe))
|
|
624
624
|
throw new TypeError();
|
|
@@ -627,9 +627,9 @@ var Of;
|
|
|
627
627
|
}
|
|
628
628
|
return I;
|
|
629
629
|
}
|
|
630
|
-
function Ot(_, I,
|
|
630
|
+
function Ot(_, I, T, K) {
|
|
631
631
|
for (var xe = _.length - 1; xe >= 0; --xe) {
|
|
632
|
-
var bt = _[xe], xt = bt(I,
|
|
632
|
+
var bt = _[xe], xt = bt(I, T, K);
|
|
633
633
|
if (!fe(xt) && !tt(xt)) {
|
|
634
634
|
if (!te(xt))
|
|
635
635
|
throw new TypeError();
|
|
@@ -638,76 +638,76 @@ var Of;
|
|
|
638
638
|
}
|
|
639
639
|
return K;
|
|
640
640
|
}
|
|
641
|
-
function _t(_, I,
|
|
642
|
-
var K =
|
|
641
|
+
function _t(_, I, T) {
|
|
642
|
+
var K = ut(_, I, T);
|
|
643
643
|
if (K)
|
|
644
644
|
return !0;
|
|
645
645
|
var xe = Bi(I);
|
|
646
|
-
return tt(xe) ? !1 : _t(_, xe,
|
|
646
|
+
return tt(xe) ? !1 : _t(_, xe, T);
|
|
647
647
|
}
|
|
648
|
-
function
|
|
648
|
+
function ut(_, I, T) {
|
|
649
649
|
var K = Wr(
|
|
650
650
|
I,
|
|
651
|
-
|
|
651
|
+
T,
|
|
652
652
|
/*Create*/
|
|
653
653
|
!1
|
|
654
654
|
);
|
|
655
|
-
return fe(K) ? !1 : fs(K.OrdinaryHasOwnMetadata(_, I,
|
|
655
|
+
return fe(K) ? !1 : fs(K.OrdinaryHasOwnMetadata(_, I, T));
|
|
656
656
|
}
|
|
657
|
-
function Ye(_, I,
|
|
658
|
-
var K =
|
|
657
|
+
function Ye(_, I, T) {
|
|
658
|
+
var K = ut(_, I, T);
|
|
659
659
|
if (K)
|
|
660
|
-
return ae(_, I,
|
|
660
|
+
return ae(_, I, T);
|
|
661
661
|
var xe = Bi(I);
|
|
662
662
|
if (!tt(xe))
|
|
663
|
-
return Ye(_, xe,
|
|
663
|
+
return Ye(_, xe, T);
|
|
664
664
|
}
|
|
665
|
-
function ae(_, I,
|
|
665
|
+
function ae(_, I, T) {
|
|
666
666
|
var K = Wr(
|
|
667
667
|
I,
|
|
668
|
-
|
|
668
|
+
T,
|
|
669
669
|
/*Create*/
|
|
670
670
|
!1
|
|
671
671
|
);
|
|
672
672
|
if (!fe(K))
|
|
673
|
-
return K.OrdinaryGetOwnMetadata(_, I,
|
|
673
|
+
return K.OrdinaryGetOwnMetadata(_, I, T);
|
|
674
674
|
}
|
|
675
|
-
function Ee(_, I,
|
|
675
|
+
function Ee(_, I, T, K) {
|
|
676
676
|
var xe = Wr(
|
|
677
|
-
|
|
677
|
+
T,
|
|
678
678
|
K,
|
|
679
679
|
/*Create*/
|
|
680
680
|
!0
|
|
681
681
|
);
|
|
682
|
-
xe.OrdinaryDefineOwnMetadata(_, I,
|
|
682
|
+
xe.OrdinaryDefineOwnMetadata(_, I, T, K);
|
|
683
683
|
}
|
|
684
684
|
function pt(_, I) {
|
|
685
|
-
var
|
|
685
|
+
var T = Rt(_, I), K = Bi(_);
|
|
686
686
|
if (K === null)
|
|
687
|
-
return
|
|
687
|
+
return T;
|
|
688
688
|
var xe = pt(K, I);
|
|
689
689
|
if (xe.length <= 0)
|
|
690
|
-
return
|
|
691
|
-
if (
|
|
690
|
+
return T;
|
|
691
|
+
if (T.length <= 0)
|
|
692
692
|
return xe;
|
|
693
|
-
for (var bt = new
|
|
693
|
+
for (var bt = new N(), xt = [], je = 0, q = T; je < q.length; je++) {
|
|
694
694
|
var ne = q[je], he = bt.has(ne);
|
|
695
695
|
he || (bt.add(ne), xt.push(ne));
|
|
696
696
|
}
|
|
697
|
-
for (var ve = 0,
|
|
698
|
-
var ne =
|
|
697
|
+
for (var ve = 0, We = xe; ve < We.length; ve++) {
|
|
698
|
+
var ne = We[ve], he = bt.has(ne);
|
|
699
699
|
he || (bt.add(ne), xt.push(ne));
|
|
700
700
|
}
|
|
701
701
|
return xt;
|
|
702
702
|
}
|
|
703
703
|
function Rt(_, I) {
|
|
704
|
-
var
|
|
704
|
+
var T = Wr(
|
|
705
705
|
_,
|
|
706
706
|
I,
|
|
707
707
|
/*create*/
|
|
708
708
|
!1
|
|
709
709
|
);
|
|
710
|
-
return
|
|
710
|
+
return T ? T.OrdinaryOwnMetadataKeys(_, I) : [];
|
|
711
711
|
}
|
|
712
712
|
function Ut(_) {
|
|
713
713
|
if (_ === null)
|
|
@@ -756,9 +756,9 @@ var Of;
|
|
|
756
756
|
case 5:
|
|
757
757
|
return _;
|
|
758
758
|
}
|
|
759
|
-
var
|
|
759
|
+
var T = "string", K = Co(_, s);
|
|
760
760
|
if (K !== void 0) {
|
|
761
|
-
var xe = K.call(_,
|
|
761
|
+
var xe = K.call(_, T);
|
|
762
762
|
if (te(xe))
|
|
763
763
|
throw new TypeError();
|
|
764
764
|
return xe;
|
|
@@ -766,7 +766,7 @@ var Of;
|
|
|
766
766
|
return Mt(_);
|
|
767
767
|
}
|
|
768
768
|
function Mt(_, I) {
|
|
769
|
-
var
|
|
769
|
+
var T, K;
|
|
770
770
|
{
|
|
771
771
|
var xe = _.toString;
|
|
772
772
|
if (pn(xe)) {
|
|
@@ -774,9 +774,9 @@ var Of;
|
|
|
774
774
|
if (!te(K))
|
|
775
775
|
return K;
|
|
776
776
|
}
|
|
777
|
-
var
|
|
778
|
-
if (pn(
|
|
779
|
-
var K =
|
|
777
|
+
var T = _.valueOf;
|
|
778
|
+
if (pn(T)) {
|
|
779
|
+
var K = T.call(_);
|
|
780
780
|
if (!te(K))
|
|
781
781
|
return K;
|
|
782
782
|
}
|
|
@@ -816,21 +816,21 @@ var Of;
|
|
|
816
816
|
return _ === I || _ !== _ && I !== I;
|
|
817
817
|
}
|
|
818
818
|
function Co(_, I) {
|
|
819
|
-
var
|
|
820
|
-
if (
|
|
821
|
-
if (!pn(
|
|
819
|
+
var T = _[I];
|
|
820
|
+
if (T != null) {
|
|
821
|
+
if (!pn(T))
|
|
822
822
|
throw new TypeError();
|
|
823
|
-
return
|
|
823
|
+
return T;
|
|
824
824
|
}
|
|
825
825
|
}
|
|
826
826
|
function ys(_) {
|
|
827
827
|
var I = Co(_, o);
|
|
828
828
|
if (!pn(I))
|
|
829
829
|
throw new TypeError();
|
|
830
|
-
var
|
|
831
|
-
if (!te(
|
|
830
|
+
var T = I.call(_);
|
|
831
|
+
if (!te(T))
|
|
832
832
|
throw new TypeError();
|
|
833
|
-
return
|
|
833
|
+
return T;
|
|
834
834
|
}
|
|
835
835
|
function gs(_) {
|
|
836
836
|
return _.value;
|
|
@@ -847,7 +847,7 @@ var Of;
|
|
|
847
847
|
var I = Object.getPrototypeOf(_);
|
|
848
848
|
if (typeof _ != "function" || _ === x || I !== x)
|
|
849
849
|
return I;
|
|
850
|
-
var
|
|
850
|
+
var T = _.prototype, K = T && Object.getPrototypeOf(T);
|
|
851
851
|
if (K == null || K === Object.prototype)
|
|
852
852
|
return I;
|
|
853
853
|
var xe = K.constructor;
|
|
@@ -856,7 +856,7 @@ var Of;
|
|
|
856
856
|
function vs() {
|
|
857
857
|
var _;
|
|
858
858
|
!fe(A) && typeof t.Reflect < "u" && !(A in t.Reflect) && typeof t.Reflect.defineMetadata == "function" && (_ = ws(t.Reflect));
|
|
859
|
-
var I,
|
|
859
|
+
var I, T, K, xe = new v(), bt = {
|
|
860
860
|
registerProvider: xt,
|
|
861
861
|
getProvider: q,
|
|
862
862
|
setProvider: he
|
|
@@ -873,55 +873,55 @@ var Of;
|
|
|
873
873
|
break;
|
|
874
874
|
case I === ve:
|
|
875
875
|
break;
|
|
876
|
-
case fe(
|
|
877
|
-
|
|
876
|
+
case fe(T):
|
|
877
|
+
T = ve;
|
|
878
878
|
break;
|
|
879
|
-
case
|
|
879
|
+
case T === ve:
|
|
880
880
|
break;
|
|
881
881
|
default:
|
|
882
|
-
K === void 0 && (K = new
|
|
882
|
+
K === void 0 && (K = new N()), K.add(ve);
|
|
883
883
|
break;
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
|
-
function je(ve,
|
|
886
|
+
function je(ve, We) {
|
|
887
887
|
if (!fe(I)) {
|
|
888
|
-
if (I.isProviderFor(ve,
|
|
888
|
+
if (I.isProviderFor(ve, We))
|
|
889
889
|
return I;
|
|
890
|
-
if (!fe(
|
|
891
|
-
if (
|
|
890
|
+
if (!fe(T)) {
|
|
891
|
+
if (T.isProviderFor(ve, We))
|
|
892
892
|
return I;
|
|
893
893
|
if (!fe(K))
|
|
894
894
|
for (var Xe = ys(K); ; ) {
|
|
895
895
|
var gt = qr(Xe);
|
|
896
896
|
if (!gt)
|
|
897
897
|
return;
|
|
898
|
-
var
|
|
899
|
-
if (
|
|
900
|
-
return Xn(Xe),
|
|
898
|
+
var zt = gs(gt);
|
|
899
|
+
if (zt.isProviderFor(ve, We))
|
|
900
|
+
return Xn(Xe), zt;
|
|
901
901
|
}
|
|
902
902
|
}
|
|
903
903
|
}
|
|
904
|
-
if (!fe(_) && _.isProviderFor(ve,
|
|
904
|
+
if (!fe(_) && _.isProviderFor(ve, We))
|
|
905
905
|
return _;
|
|
906
906
|
}
|
|
907
|
-
function q(ve,
|
|
907
|
+
function q(ve, We) {
|
|
908
908
|
var Xe = xe.get(ve), gt;
|
|
909
|
-
return fe(Xe) || (gt = Xe.get(
|
|
909
|
+
return fe(Xe) || (gt = Xe.get(We)), fe(gt) && (gt = je(ve, We), fe(gt) || (fe(Xe) && (Xe = new G(), xe.set(ve, Xe)), Xe.set(We, gt))), gt;
|
|
910
910
|
}
|
|
911
911
|
function ne(ve) {
|
|
912
912
|
if (fe(ve))
|
|
913
913
|
throw new TypeError();
|
|
914
|
-
return I === ve ||
|
|
914
|
+
return I === ve || T === ve || !fe(K) && K.has(ve);
|
|
915
915
|
}
|
|
916
|
-
function he(ve,
|
|
916
|
+
function he(ve, We, Xe) {
|
|
917
917
|
if (!ne(Xe))
|
|
918
918
|
throw new Error("Metadata provider not registered.");
|
|
919
|
-
var gt = q(ve,
|
|
919
|
+
var gt = q(ve, We);
|
|
920
920
|
if (gt !== Xe) {
|
|
921
921
|
if (!fe(gt))
|
|
922
922
|
return !1;
|
|
923
|
-
var
|
|
924
|
-
fe(
|
|
923
|
+
var zt = xe.get(ve);
|
|
924
|
+
fe(zt) && (zt = new G(), xe.set(ve, zt)), zt.set(We, Xe);
|
|
925
925
|
}
|
|
926
926
|
return !0;
|
|
927
927
|
}
|
|
@@ -936,7 +936,7 @@ var Of;
|
|
|
936
936
|
}), _;
|
|
937
937
|
}
|
|
938
938
|
function Oi(_) {
|
|
939
|
-
var I = new v(),
|
|
939
|
+
var I = new v(), T = {
|
|
940
940
|
isProviderFor: function(ne, he) {
|
|
941
941
|
var ve = I.get(ne);
|
|
942
942
|
return fe(ve) ? !1 : ve.has(he);
|
|
@@ -947,67 +947,67 @@ var Of;
|
|
|
947
947
|
OrdinaryOwnMetadataKeys: je,
|
|
948
948
|
OrdinaryDeleteMetadata: q
|
|
949
949
|
};
|
|
950
|
-
return O.registerProvider(
|
|
950
|
+
return O.registerProvider(T), T;
|
|
951
951
|
function K(ne, he, ve) {
|
|
952
|
-
var
|
|
953
|
-
if (fe(
|
|
952
|
+
var We = I.get(ne), Xe = !1;
|
|
953
|
+
if (fe(We)) {
|
|
954
954
|
if (!ve)
|
|
955
955
|
return;
|
|
956
|
-
|
|
956
|
+
We = new G(), I.set(ne, We), Xe = !0;
|
|
957
957
|
}
|
|
958
|
-
var gt =
|
|
958
|
+
var gt = We.get(he);
|
|
959
959
|
if (fe(gt)) {
|
|
960
960
|
if (!ve)
|
|
961
961
|
return;
|
|
962
|
-
if (gt = new G(),
|
|
963
|
-
throw
|
|
962
|
+
if (gt = new G(), We.set(he, gt), !_.setProvider(ne, he, T))
|
|
963
|
+
throw We.delete(he), Xe && I.delete(ne), new Error("Wrong provider for target.");
|
|
964
964
|
}
|
|
965
965
|
return gt;
|
|
966
966
|
}
|
|
967
967
|
function xe(ne, he, ve) {
|
|
968
|
-
var
|
|
968
|
+
var We = K(
|
|
969
969
|
he,
|
|
970
970
|
ve,
|
|
971
971
|
/*Create*/
|
|
972
972
|
!1
|
|
973
973
|
);
|
|
974
|
-
return fe(
|
|
974
|
+
return fe(We) ? !1 : fs(We.has(ne));
|
|
975
975
|
}
|
|
976
976
|
function bt(ne, he, ve) {
|
|
977
|
-
var
|
|
977
|
+
var We = K(
|
|
978
978
|
he,
|
|
979
979
|
ve,
|
|
980
980
|
/*Create*/
|
|
981
981
|
!1
|
|
982
982
|
);
|
|
983
|
-
if (!fe(
|
|
984
|
-
return
|
|
983
|
+
if (!fe(We))
|
|
984
|
+
return We.get(ne);
|
|
985
985
|
}
|
|
986
|
-
function xt(ne, he, ve,
|
|
986
|
+
function xt(ne, he, ve, We) {
|
|
987
987
|
var Xe = K(
|
|
988
988
|
ve,
|
|
989
|
-
|
|
989
|
+
We,
|
|
990
990
|
/*Create*/
|
|
991
991
|
!0
|
|
992
992
|
);
|
|
993
993
|
Xe.set(ne, he);
|
|
994
994
|
}
|
|
995
995
|
function je(ne, he) {
|
|
996
|
-
var ve = [],
|
|
996
|
+
var ve = [], We = K(
|
|
997
997
|
ne,
|
|
998
998
|
he,
|
|
999
999
|
/*Create*/
|
|
1000
1000
|
!1
|
|
1001
1001
|
);
|
|
1002
|
-
if (fe(
|
|
1002
|
+
if (fe(We))
|
|
1003
1003
|
return ve;
|
|
1004
|
-
for (var Xe =
|
|
1004
|
+
for (var Xe = We.keys(), gt = ys(Xe), zt = 0; ; ) {
|
|
1005
1005
|
var Ti = qr(gt);
|
|
1006
1006
|
if (!Ti)
|
|
1007
|
-
return ve.length =
|
|
1007
|
+
return ve.length = zt, ve;
|
|
1008
1008
|
var Ss = gs(Ti);
|
|
1009
1009
|
try {
|
|
1010
|
-
ve[
|
|
1010
|
+
ve[zt] = Ss;
|
|
1011
1011
|
} catch (Oo) {
|
|
1012
1012
|
try {
|
|
1013
1013
|
Xn(gt);
|
|
@@ -1015,19 +1015,19 @@ var Of;
|
|
|
1015
1015
|
throw Oo;
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
|
-
|
|
1018
|
+
zt++;
|
|
1019
1019
|
}
|
|
1020
1020
|
}
|
|
1021
1021
|
function q(ne, he, ve) {
|
|
1022
|
-
var
|
|
1022
|
+
var We = K(
|
|
1023
1023
|
he,
|
|
1024
1024
|
ve,
|
|
1025
1025
|
/*Create*/
|
|
1026
1026
|
!1
|
|
1027
1027
|
);
|
|
1028
|
-
if (fe(
|
|
1028
|
+
if (fe(We) || !We.delete(ne))
|
|
1029
1029
|
return !1;
|
|
1030
|
-
if (
|
|
1030
|
+
if (We.size === 0) {
|
|
1031
1031
|
var Xe = I.get(he);
|
|
1032
1032
|
fe(Xe) || (Xe.delete(ve), Xe.size === 0 && I.delete(Xe));
|
|
1033
1033
|
}
|
|
@@ -1035,31 +1035,31 @@ var Of;
|
|
|
1035
1035
|
}
|
|
1036
1036
|
}
|
|
1037
1037
|
function ws(_) {
|
|
1038
|
-
var I = _.defineMetadata,
|
|
1038
|
+
var I = _.defineMetadata, T = _.hasOwnMetadata, K = _.getOwnMetadata, xe = _.getOwnMetadataKeys, bt = _.deleteMetadata, xt = new v(), je = {
|
|
1039
1039
|
isProviderFor: function(q, ne) {
|
|
1040
1040
|
var he = xt.get(q);
|
|
1041
|
-
return !fe(he) && he.has(ne) ? !0 : xe(q, ne).length ? (fe(he) && (he = new
|
|
1041
|
+
return !fe(he) && he.has(ne) ? !0 : xe(q, ne).length ? (fe(he) && (he = new N(), xt.set(q, he)), he.add(ne), !0) : !1;
|
|
1042
1042
|
},
|
|
1043
1043
|
OrdinaryDefineOwnMetadata: I,
|
|
1044
|
-
OrdinaryHasOwnMetadata:
|
|
1044
|
+
OrdinaryHasOwnMetadata: T,
|
|
1045
1045
|
OrdinaryGetOwnMetadata: K,
|
|
1046
1046
|
OrdinaryOwnMetadataKeys: xe,
|
|
1047
1047
|
OrdinaryDeleteMetadata: bt
|
|
1048
1048
|
};
|
|
1049
1049
|
return je;
|
|
1050
1050
|
}
|
|
1051
|
-
function Wr(_, I,
|
|
1051
|
+
function Wr(_, I, T) {
|
|
1052
1052
|
var K = O.getProvider(_, I);
|
|
1053
1053
|
if (!fe(K))
|
|
1054
1054
|
return K;
|
|
1055
|
-
if (
|
|
1055
|
+
if (T) {
|
|
1056
1056
|
if (O.setProvider(_, I, k))
|
|
1057
1057
|
return k;
|
|
1058
1058
|
throw new Error("Illegal state.");
|
|
1059
1059
|
}
|
|
1060
1060
|
}
|
|
1061
1061
|
function bs() {
|
|
1062
|
-
var _ = {}, I = [],
|
|
1062
|
+
var _ = {}, I = [], T = (
|
|
1063
1063
|
/** @class */
|
|
1064
1064
|
function() {
|
|
1065
1065
|
function je(q, ne, he) {
|
|
@@ -1129,11 +1129,11 @@ var Of;
|
|
|
1129
1129
|
}, je.prototype.clear = function() {
|
|
1130
1130
|
this._keys.length = 0, this._values.length = 0, this._cacheKey = _, this._cacheIndex = -2;
|
|
1131
1131
|
}, je.prototype.keys = function() {
|
|
1132
|
-
return new
|
|
1132
|
+
return new T(this._keys, this._values, xe);
|
|
1133
1133
|
}, je.prototype.values = function() {
|
|
1134
|
-
return new
|
|
1134
|
+
return new T(this._keys, this._values, bt);
|
|
1135
1135
|
}, je.prototype.entries = function() {
|
|
1136
|
-
return new
|
|
1136
|
+
return new T(this._keys, this._values, xt);
|
|
1137
1137
|
}, je.prototype["@@iterator"] = function() {
|
|
1138
1138
|
return this.entries();
|
|
1139
1139
|
}, je.prototype[o] = function() {
|
|
@@ -1175,12 +1175,12 @@ var Of;
|
|
|
1175
1175
|
},
|
|
1176
1176
|
enumerable: !0,
|
|
1177
1177
|
configurable: !0
|
|
1178
|
-
}), I.prototype.has = function(
|
|
1179
|
-
return this._map.has(
|
|
1180
|
-
}, I.prototype.add = function(
|
|
1181
|
-
return this._map.set(
|
|
1182
|
-
}, I.prototype.delete = function(
|
|
1183
|
-
return this._map.delete(
|
|
1178
|
+
}), I.prototype.has = function(T) {
|
|
1179
|
+
return this._map.has(T);
|
|
1180
|
+
}, I.prototype.add = function(T) {
|
|
1181
|
+
return this._map.set(T, T), this;
|
|
1182
|
+
}, I.prototype.delete = function(T) {
|
|
1183
|
+
return this._map.delete(T);
|
|
1184
1184
|
}, I.prototype.clear = function() {
|
|
1185
1185
|
this._map.clear();
|
|
1186
1186
|
}, I.prototype.keys = function() {
|
|
@@ -1199,7 +1199,7 @@ var Of;
|
|
|
1199
1199
|
return _;
|
|
1200
1200
|
}
|
|
1201
1201
|
function Bo() {
|
|
1202
|
-
var _ = 16, I = m.create(),
|
|
1202
|
+
var _ = 16, I = m.create(), T = K();
|
|
1203
1203
|
return (
|
|
1204
1204
|
/** @class */
|
|
1205
1205
|
function() {
|
|
@@ -1247,12 +1247,12 @@ var Of;
|
|
|
1247
1247
|
return I[q] = !0, q;
|
|
1248
1248
|
}
|
|
1249
1249
|
function xe(q, ne) {
|
|
1250
|
-
if (!n.call(q,
|
|
1250
|
+
if (!n.call(q, T)) {
|
|
1251
1251
|
if (!ne)
|
|
1252
1252
|
return;
|
|
1253
|
-
Object.defineProperty(q,
|
|
1253
|
+
Object.defineProperty(q, T, { value: m.create() });
|
|
1254
1254
|
}
|
|
1255
|
-
return q[
|
|
1255
|
+
return q[T];
|
|
1256
1256
|
}
|
|
1257
1257
|
function bt(q, ne) {
|
|
1258
1258
|
for (var he = 0; he < ne; ++he)
|
|
@@ -1305,10 +1305,10 @@ var Of;
|
|
|
1305
1305
|
* SOFTWARE.
|
|
1306
1306
|
*
|
|
1307
1307
|
*/
|
|
1308
|
-
const
|
|
1308
|
+
const Gy = "[object ArrayBuffer]";
|
|
1309
1309
|
class W {
|
|
1310
1310
|
static isArrayBuffer(e) {
|
|
1311
|
-
return Object.prototype.toString.call(e) ===
|
|
1311
|
+
return Object.prototype.toString.call(e) === Gy;
|
|
1312
1312
|
}
|
|
1313
1313
|
static toArrayBuffer(e) {
|
|
1314
1314
|
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;
|
|
@@ -1355,7 +1355,7 @@ class W {
|
|
|
1355
1355
|
return e[e.length - 1] instanceof Function ? this.toView(i, e[e.length - 1]) : i.buffer;
|
|
1356
1356
|
}
|
|
1357
1357
|
}
|
|
1358
|
-
const Vc = "string",
|
|
1358
|
+
const Vc = "string", Ky = /^[0-9a-f]+$/i, Zy = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/, qy = /^[a-zA-Z0-9-_]+$/;
|
|
1359
1359
|
class Tf {
|
|
1360
1360
|
static fromString(e) {
|
|
1361
1361
|
const t = unescape(encodeURIComponent(e)), n = new Uint8Array(t.length);
|
|
@@ -1390,13 +1390,13 @@ class Yr {
|
|
|
1390
1390
|
}
|
|
1391
1391
|
class de {
|
|
1392
1392
|
static isHex(e) {
|
|
1393
|
-
return typeof e === Vc &&
|
|
1393
|
+
return typeof e === Vc && Ky.test(e);
|
|
1394
1394
|
}
|
|
1395
1395
|
static isBase64(e) {
|
|
1396
|
-
return typeof e === Vc &&
|
|
1396
|
+
return typeof e === Vc && Zy.test(e);
|
|
1397
1397
|
}
|
|
1398
1398
|
static isBase64Url(e) {
|
|
1399
|
-
return typeof e === Vc &&
|
|
1399
|
+
return typeof e === Vc && qy.test(e);
|
|
1400
1400
|
}
|
|
1401
1401
|
static ToString(e, t = "utf8") {
|
|
1402
1402
|
const n = W.toUint8Array(e);
|
|
@@ -1557,7 +1557,7 @@ class de {
|
|
|
1557
1557
|
}
|
|
1558
1558
|
}
|
|
1559
1559
|
de.DEFAULT_UTF8_ENCODING = "utf8";
|
|
1560
|
-
function
|
|
1560
|
+
function Wy(...r) {
|
|
1561
1561
|
const e = r.map((i) => i.byteLength).reduce((i, s) => i + s), t = new Uint8Array(e);
|
|
1562
1562
|
let n = 0;
|
|
1563
1563
|
return r.map((i) => new Uint8Array(i)).forEach((i) => {
|
|
@@ -1633,7 +1633,7 @@ function _d() {
|
|
|
1633
1633
|
s[c] = r[c];
|
|
1634
1634
|
return s[0] &= 127, Mi(s, 8) - n;
|
|
1635
1635
|
}
|
|
1636
|
-
function
|
|
1636
|
+
function Yy(r) {
|
|
1637
1637
|
const e = r < 0 ? r * -1 : r;
|
|
1638
1638
|
let t = 128;
|
|
1639
1639
|
for (let n = 1; n < 8; n++) {
|
|
@@ -1656,7 +1656,7 @@ function Zy(r) {
|
|
|
1656
1656
|
}
|
|
1657
1657
|
return new ArrayBuffer(0);
|
|
1658
1658
|
}
|
|
1659
|
-
function
|
|
1659
|
+
function Jy(r, e) {
|
|
1660
1660
|
if (r.byteLength !== e.byteLength)
|
|
1661
1661
|
return !1;
|
|
1662
1662
|
const t = new Uint8Array(r), n = new Uint8Array(e);
|
|
@@ -1738,7 +1738,7 @@ class Ha {
|
|
|
1738
1738
|
return Nu(this.items);
|
|
1739
1739
|
}
|
|
1740
1740
|
}
|
|
1741
|
-
const _s = [new Uint8Array([1])], Nf = "0123456789", Lc = "name", jf = "valueHexView",
|
|
1741
|
+
const _s = [new Uint8Array([1])], Nf = "0123456789", Lc = "name", jf = "valueHexView", Xy = "isHexOnly", Qy = "idBlock", eg = "tagClass", tg = "tagNumber", rg = "isConstructed", ng = "fromBER", ig = "toBER", sg = "local", yr = "", Kr = new ArrayBuffer(0), Fa = new Uint8Array(0), Us = "EndOfContent", Ed = "OCTET STRING", kd = "BIT STRING";
|
|
1742
1742
|
function fn(r) {
|
|
1743
1743
|
var e;
|
|
1744
1744
|
return e = class extends r {
|
|
@@ -1890,8 +1890,8 @@ class Id extends fn(Ei) {
|
|
|
1890
1890
|
if (u === m) {
|
|
1891
1891
|
m += 255;
|
|
1892
1892
|
const G = new Uint8Array(m);
|
|
1893
|
-
for (let
|
|
1894
|
-
G[
|
|
1893
|
+
for (let N = 0; N < h.length; N++)
|
|
1894
|
+
G[N] = h[N];
|
|
1895
1895
|
h = this.valueHexView = new Uint8Array(m);
|
|
1896
1896
|
}
|
|
1897
1897
|
}
|
|
@@ -2030,7 +2030,7 @@ class Jt extends Ei {
|
|
|
2030
2030
|
if (!(e instanceof this.constructor))
|
|
2031
2031
|
return !1;
|
|
2032
2032
|
const t = this.toBER(), n = e.toBER();
|
|
2033
|
-
return
|
|
2033
|
+
return Jy(t, n);
|
|
2034
2034
|
}
|
|
2035
2035
|
}
|
|
2036
2036
|
Jt.NAME = "BaseBlock";
|
|
@@ -2074,7 +2074,7 @@ class fo extends Jt {
|
|
|
2074
2074
|
Td = fo;
|
|
2075
2075
|
ce.Primitive = Td;
|
|
2076
2076
|
fo.NAME = "PRIMITIVE";
|
|
2077
|
-
function
|
|
2077
|
+
function og(r, e) {
|
|
2078
2078
|
if (r instanceof e)
|
|
2079
2079
|
return r;
|
|
2080
2080
|
const t = new e();
|
|
@@ -2231,7 +2231,7 @@ function ns(r, e = 0, t = r.length) {
|
|
|
2231
2231
|
default:
|
|
2232
2232
|
u = i.idBlock.isConstructed ? ce.Constructed : ce.Primitive;
|
|
2233
2233
|
}
|
|
2234
|
-
return i =
|
|
2234
|
+
return i = og(i, u), c = i.fromBER(r, e, i.lenBlock.isIndefiniteForm ? t : i.lenBlock.length), i.valueBeforeDecodeView = r.subarray(n, n + i.blockLength), {
|
|
2235
2235
|
offset: c,
|
|
2236
2236
|
result: i
|
|
2237
2237
|
};
|
|
@@ -2246,7 +2246,7 @@ function Ui(r) {
|
|
|
2246
2246
|
}
|
|
2247
2247
|
return ns(W.toUint8Array(r).slice(), 0, r.byteLength);
|
|
2248
2248
|
}
|
|
2249
|
-
function
|
|
2249
|
+
function ag(r, e) {
|
|
2250
2250
|
return r ? 1 : e;
|
|
2251
2251
|
}
|
|
2252
2252
|
class Vn extends fr {
|
|
@@ -2260,7 +2260,7 @@ class Vn extends fr {
|
|
|
2260
2260
|
if (this.valueBeforeDecodeView = i.subarray(t, t + n), this.valueBeforeDecodeView.length === 0)
|
|
2261
2261
|
return this.warnings.push("Zero buffer length"), t;
|
|
2262
2262
|
let s = t;
|
|
2263
|
-
for (;
|
|
2263
|
+
for (; ag(this.isIndefiniteForm, n) > 0; ) {
|
|
2264
2264
|
const o = ns(i, s, n);
|
|
2265
2265
|
if (o.offset === -1)
|
|
2266
2266
|
return this.error = o.result.error, this.warnings.concat(o.result.warnings), -1;
|
|
@@ -2578,7 +2578,7 @@ Hd = oi;
|
|
|
2578
2578
|
ce.BitString = Hd;
|
|
2579
2579
|
oi.NAME = kd;
|
|
2580
2580
|
var Fd;
|
|
2581
|
-
function
|
|
2581
|
+
function cg(r, e) {
|
|
2582
2582
|
const t = new Uint8Array([0]), n = new Uint8Array(r), i = new Uint8Array(e);
|
|
2583
2583
|
let s = n.slice(0);
|
|
2584
2584
|
const o = s.length - 1, c = i.slice(0), u = c.length - 1;
|
|
@@ -2616,7 +2616,7 @@ function Pf(r) {
|
|
|
2616
2616
|
}
|
|
2617
2617
|
return _s[r];
|
|
2618
2618
|
}
|
|
2619
|
-
function
|
|
2619
|
+
function lg(r, e) {
|
|
2620
2620
|
let t = 0;
|
|
2621
2621
|
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;
|
|
2622
2622
|
let h, m = 0;
|
|
@@ -2646,7 +2646,7 @@ class Ru extends fn(fr) {
|
|
|
2646
2646
|
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)));
|
|
2647
2647
|
}
|
|
2648
2648
|
set valueDec(e) {
|
|
2649
|
-
this._valueDec = e, this.isHexOnly = !1, this.valueHexView = new Uint8Array(
|
|
2649
|
+
this._valueDec = e, this.isHexOnly = !1, this.valueHexView = new Uint8Array(Yy(e));
|
|
2650
2650
|
}
|
|
2651
2651
|
get valueDec() {
|
|
2652
2652
|
return this._valueDec;
|
|
@@ -2697,10 +2697,10 @@ class Ru extends fn(fr) {
|
|
|
2697
2697
|
if ((i & 1) === 1)
|
|
2698
2698
|
switch (n) {
|
|
2699
2699
|
case e:
|
|
2700
|
-
t =
|
|
2700
|
+
t = lg(Pf(n), t), o = "-";
|
|
2701
2701
|
break;
|
|
2702
2702
|
default:
|
|
2703
|
-
t =
|
|
2703
|
+
t = cg(t, Pf(n));
|
|
2704
2704
|
}
|
|
2705
2705
|
n++, i >>= 1;
|
|
2706
2706
|
}
|
|
@@ -3362,15 +3362,15 @@ class nc extends po {
|
|
|
3362
3362
|
if (n.indexOf("-") !== -1)
|
|
3363
3363
|
throw new Error("Wrong input string for conversion");
|
|
3364
3364
|
} else {
|
|
3365
|
-
let x = 1, G = n.indexOf("+"),
|
|
3365
|
+
let x = 1, G = n.indexOf("+"), N = "";
|
|
3366
3366
|
if (G === -1 && (G = n.indexOf("-"), x = -1), G !== -1) {
|
|
3367
|
-
if (
|
|
3367
|
+
if (N = n.substring(G + 1), n = n.substring(0, G), N.length !== 2 && N.length !== 4)
|
|
3368
3368
|
throw new Error("Wrong input string for conversion");
|
|
3369
|
-
let v = parseInt(
|
|
3369
|
+
let v = parseInt(N.substring(0, 2), 10);
|
|
3370
3370
|
if (isNaN(v.valueOf()))
|
|
3371
3371
|
throw new Error("Wrong input string for conversion");
|
|
3372
|
-
if (c = x * v,
|
|
3373
|
-
if (v = parseInt(
|
|
3372
|
+
if (c = x * v, N.length === 4) {
|
|
3373
|
+
if (v = parseInt(N.substring(2, 4), 10), isNaN(v.valueOf()))
|
|
3374
3374
|
throw new Error("Wrong input string for conversion");
|
|
3375
3375
|
u = x * v;
|
|
3376
3376
|
}
|
|
@@ -3518,7 +3518,7 @@ class Go extends ui {
|
|
|
3518
3518
|
super(n), this.value = e, this.local = t;
|
|
3519
3519
|
}
|
|
3520
3520
|
}
|
|
3521
|
-
class
|
|
3521
|
+
class ug {
|
|
3522
3522
|
constructor({ data: e = Fa } = {}) {
|
|
3523
3523
|
this.dataView = W.toUint8Array(e);
|
|
3524
3524
|
}
|
|
@@ -3574,17 +3574,17 @@ function ri(r, e, t) {
|
|
|
3574
3574
|
verified: !1,
|
|
3575
3575
|
result: { error: "Wrong ASN.1 schema" }
|
|
3576
3576
|
};
|
|
3577
|
-
if (!(
|
|
3577
|
+
if (!(Qy in t))
|
|
3578
3578
|
return {
|
|
3579
3579
|
verified: !1,
|
|
3580
3580
|
result: { error: "Wrong ASN.1 schema" }
|
|
3581
3581
|
};
|
|
3582
|
-
if (!(
|
|
3582
|
+
if (!(ng in t.idBlock))
|
|
3583
3583
|
return {
|
|
3584
3584
|
verified: !1,
|
|
3585
3585
|
result: { error: "Wrong ASN.1 schema" }
|
|
3586
3586
|
};
|
|
3587
|
-
if (!(
|
|
3587
|
+
if (!(ig in t.idBlock))
|
|
3588
3588
|
return {
|
|
3589
3589
|
verified: !1,
|
|
3590
3590
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -3600,7 +3600,7 @@ function ri(r, e, t) {
|
|
|
3600
3600
|
verified: !1,
|
|
3601
3601
|
result: { error: "Error decoding idBlock for ASN.1 schema" }
|
|
3602
3602
|
};
|
|
3603
|
-
if (t.idBlock.hasOwnProperty(
|
|
3603
|
+
if (t.idBlock.hasOwnProperty(eg) === !1)
|
|
3604
3604
|
return {
|
|
3605
3605
|
verified: !1,
|
|
3606
3606
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -3610,7 +3610,7 @@ function ri(r, e, t) {
|
|
|
3610
3610
|
verified: !1,
|
|
3611
3611
|
result: r
|
|
3612
3612
|
};
|
|
3613
|
-
if (t.idBlock.hasOwnProperty(
|
|
3613
|
+
if (t.idBlock.hasOwnProperty(tg) === !1)
|
|
3614
3614
|
return {
|
|
3615
3615
|
verified: !1,
|
|
3616
3616
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -3620,7 +3620,7 @@ function ri(r, e, t) {
|
|
|
3620
3620
|
verified: !1,
|
|
3621
3621
|
result: r
|
|
3622
3622
|
};
|
|
3623
|
-
if (t.idBlock.hasOwnProperty(
|
|
3623
|
+
if (t.idBlock.hasOwnProperty(rg) === !1)
|
|
3624
3624
|
return {
|
|
3625
3625
|
verified: !1,
|
|
3626
3626
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -3630,7 +3630,7 @@ function ri(r, e, t) {
|
|
|
3630
3630
|
verified: !1,
|
|
3631
3631
|
result: r
|
|
3632
3632
|
};
|
|
3633
|
-
if (!(
|
|
3633
|
+
if (!(Xy in t.idBlock))
|
|
3634
3634
|
return {
|
|
3635
3635
|
verified: !1,
|
|
3636
3636
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -3700,7 +3700,7 @@ function ri(r, e, t) {
|
|
|
3700
3700
|
return t.name && (t.name = t.name.replace(/^\s+|\s+$/g, yr), t.name && delete r[t.name]), o;
|
|
3701
3701
|
if (Lc in t.valueBlock.value[0] && t.valueBlock.value[0].name.length > 0) {
|
|
3702
3702
|
let h = {};
|
|
3703
|
-
|
|
3703
|
+
sg 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]);
|
|
3704
3704
|
}
|
|
3705
3705
|
} else if (o = ri(r, e.valueBlock.value[u - s], t.valueBlock.value[u]), o.verified === !1)
|
|
3706
3706
|
if (t.valueBlock.value[u].optional)
|
|
@@ -3735,7 +3735,7 @@ function ri(r, e, t) {
|
|
|
3735
3735
|
result: r
|
|
3736
3736
|
};
|
|
3737
3737
|
}
|
|
3738
|
-
function
|
|
3738
|
+
function fg(r, e) {
|
|
3739
3739
|
if (!(e instanceof Object))
|
|
3740
3740
|
return {
|
|
3741
3741
|
verified: !1,
|
|
@@ -3775,7 +3775,7 @@ const Ap = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3775
3775
|
OctetString: si,
|
|
3776
3776
|
Primitive: fo,
|
|
3777
3777
|
PrintableString: Ya,
|
|
3778
|
-
RawData:
|
|
3778
|
+
RawData: ug,
|
|
3779
3779
|
RelativeObjectIdentifier: Uu,
|
|
3780
3780
|
Repeated: Go,
|
|
3781
3781
|
Sequence: mn,
|
|
@@ -3792,7 +3792,7 @@ const Ap = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3792
3792
|
VisibleString: ho,
|
|
3793
3793
|
compareSchema: ri,
|
|
3794
3794
|
fromBER: Ui,
|
|
3795
|
-
verifySchema:
|
|
3795
|
+
verifySchema: fg
|
|
3796
3796
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3797
3797
|
var M;
|
|
3798
3798
|
(function(r) {
|
|
@@ -3864,7 +3864,7 @@ class et {
|
|
|
3864
3864
|
return new si({ name: e });
|
|
3865
3865
|
}
|
|
3866
3866
|
}
|
|
3867
|
-
const
|
|
3867
|
+
const hg = {
|
|
3868
3868
|
fromASN: (r) => r instanceof li ? null : r.valueBeforeDecodeView,
|
|
3869
3869
|
toASN: (r) => {
|
|
3870
3870
|
if (r === null)
|
|
@@ -3874,28 +3874,28 @@ const lg = {
|
|
|
3874
3874
|
throw new Error(e.result.error);
|
|
3875
3875
|
return e.result;
|
|
3876
3876
|
}
|
|
3877
|
-
},
|
|
3877
|
+
}, dg = {
|
|
3878
3878
|
fromASN: (r) => r.valueBlock.valueHexView.byteLength >= 4 ? r.valueBlock.toString() : r.valueBlock.valueDec,
|
|
3879
3879
|
toASN: (r) => new nn({ value: +r })
|
|
3880
|
-
},
|
|
3880
|
+
}, pg = {
|
|
3881
3881
|
fromASN: (r) => r.valueBlock.valueDec,
|
|
3882
3882
|
toASN: (r) => new Ga({ value: r })
|
|
3883
3883
|
}, wt = {
|
|
3884
3884
|
fromASN: (r) => r.valueBlock.valueHexView,
|
|
3885
3885
|
toASN: (r) => new nn({ valueHex: r })
|
|
3886
|
-
},
|
|
3886
|
+
}, yg = {
|
|
3887
3887
|
fromASN: (r) => r.valueBlock.valueHexView,
|
|
3888
3888
|
toASN: (r) => new oi({ valueHex: r })
|
|
3889
|
-
},
|
|
3889
|
+
}, gg = {
|
|
3890
3890
|
fromASN: (r) => r.valueBlock.toString(),
|
|
3891
3891
|
toASN: (r) => new Ka({ value: r })
|
|
3892
|
-
},
|
|
3892
|
+
}, vg = {
|
|
3893
3893
|
fromASN: (r) => r.valueBlock.value,
|
|
3894
3894
|
toASN: (r) => new za({ value: r })
|
|
3895
3895
|
}, Ko = {
|
|
3896
3896
|
fromASN: (r) => r.valueBlock.valueHexView,
|
|
3897
3897
|
toASN: (r) => new si({ valueHex: r })
|
|
3898
|
-
},
|
|
3898
|
+
}, mg = {
|
|
3899
3899
|
fromASN: (r) => new et(r.getValue()),
|
|
3900
3900
|
toASN: (r) => r.toASN()
|
|
3901
3901
|
};
|
|
@@ -3905,62 +3905,62 @@ function Tr(r) {
|
|
|
3905
3905
|
toASN: (e) => new r({ value: e })
|
|
3906
3906
|
};
|
|
3907
3907
|
}
|
|
3908
|
-
const Sp = Tr(In),
|
|
3908
|
+
const Sp = Tr(In), wg = Tr(Za), bg = Tr(qa), xg = Tr(Wa), Ag = Tr(Ya), Sg = Tr(Ja), _g = Tr(Xa), Eg = Tr(Qa), kg = Tr(ec), Ig = Tr(ho), Cg = Tr(tc), Bg = Tr(rc), Og = {
|
|
3909
3909
|
fromASN: (r) => r.toDate(),
|
|
3910
3910
|
toASN: (r) => new po({ valueDate: r })
|
|
3911
|
-
},
|
|
3911
|
+
}, Tg = {
|
|
3912
3912
|
fromASN: (r) => r.toDate(),
|
|
3913
3913
|
toASN: (r) => new nc({ valueDate: r })
|
|
3914
|
-
},
|
|
3914
|
+
}, Ng = {
|
|
3915
3915
|
fromASN: () => null,
|
|
3916
3916
|
toASN: () => new li()
|
|
3917
3917
|
};
|
|
3918
3918
|
function Fu(r) {
|
|
3919
3919
|
switch (r) {
|
|
3920
3920
|
case b.Any:
|
|
3921
|
-
return lg;
|
|
3922
|
-
case b.BitString:
|
|
3923
3921
|
return hg;
|
|
3922
|
+
case b.BitString:
|
|
3923
|
+
return yg;
|
|
3924
3924
|
case b.BmpString:
|
|
3925
|
-
return
|
|
3925
|
+
return wg;
|
|
3926
3926
|
case b.Boolean:
|
|
3927
|
-
return
|
|
3927
|
+
return vg;
|
|
3928
3928
|
case b.CharacterString:
|
|
3929
|
-
return
|
|
3929
|
+
return Bg;
|
|
3930
3930
|
case b.Enumerated:
|
|
3931
|
-
return
|
|
3931
|
+
return pg;
|
|
3932
3932
|
case b.GeneralString:
|
|
3933
|
-
return Eg;
|
|
3934
|
-
case b.GeneralizedTime:
|
|
3935
3933
|
return Cg;
|
|
3934
|
+
case b.GeneralizedTime:
|
|
3935
|
+
return Tg;
|
|
3936
3936
|
case b.GraphicString:
|
|
3937
|
-
return
|
|
3937
|
+
return kg;
|
|
3938
3938
|
case b.IA5String:
|
|
3939
|
-
return
|
|
3939
|
+
return Eg;
|
|
3940
3940
|
case b.Integer:
|
|
3941
|
-
return
|
|
3941
|
+
return dg;
|
|
3942
3942
|
case b.Null:
|
|
3943
|
-
return
|
|
3943
|
+
return Ng;
|
|
3944
3944
|
case b.NumericString:
|
|
3945
|
-
return
|
|
3945
|
+
return xg;
|
|
3946
3946
|
case b.ObjectIdentifier:
|
|
3947
|
-
return
|
|
3947
|
+
return gg;
|
|
3948
3948
|
case b.OctetString:
|
|
3949
3949
|
return Ko;
|
|
3950
3950
|
case b.PrintableString:
|
|
3951
|
-
return
|
|
3951
|
+
return Ag;
|
|
3952
3952
|
case b.TeletexString:
|
|
3953
|
-
return
|
|
3953
|
+
return Sg;
|
|
3954
3954
|
case b.UTCTime:
|
|
3955
|
-
return
|
|
3955
|
+
return Og;
|
|
3956
3956
|
case b.UniversalString:
|
|
3957
|
-
return
|
|
3957
|
+
return bg;
|
|
3958
3958
|
case b.Utf8String:
|
|
3959
3959
|
return Sp;
|
|
3960
3960
|
case b.VideotexString:
|
|
3961
|
-
return xg;
|
|
3962
|
-
case b.VisibleString:
|
|
3963
3961
|
return _g;
|
|
3962
|
+
case b.VisibleString:
|
|
3963
|
+
return Ig;
|
|
3964
3964
|
default:
|
|
3965
3965
|
return null;
|
|
3966
3966
|
}
|
|
@@ -3976,7 +3976,7 @@ function _p(r) {
|
|
|
3976
3976
|
}
|
|
3977
3977
|
return !1;
|
|
3978
3978
|
}
|
|
3979
|
-
function
|
|
3979
|
+
function jg(r, e) {
|
|
3980
3980
|
if (!(r && e) || r.byteLength !== e.byteLength)
|
|
3981
3981
|
return !1;
|
|
3982
3982
|
const t = new Uint8Array(r), n = new Uint8Array(e);
|
|
@@ -3985,7 +3985,7 @@ function Og(r, e) {
|
|
|
3985
3985
|
return !1;
|
|
3986
3986
|
return !0;
|
|
3987
3987
|
}
|
|
3988
|
-
class
|
|
3988
|
+
class Pg {
|
|
3989
3989
|
constructor() {
|
|
3990
3990
|
this.items = /* @__PURE__ */ new WeakMap();
|
|
3991
3991
|
}
|
|
@@ -4093,7 +4093,7 @@ class Tg {
|
|
|
4093
4093
|
return t ? this.items.get(t) || this.findParentSchema(t) : null;
|
|
4094
4094
|
}
|
|
4095
4095
|
}
|
|
4096
|
-
const Br = new
|
|
4096
|
+
const Br = new Pg(), H = (r) => (e) => {
|
|
4097
4097
|
let t;
|
|
4098
4098
|
Br.has(e) ? t = Br.get(e) : (t = Br.createDefault(e), Br.set(e, t)), Object.assign(t, r);
|
|
4099
4099
|
}, y = (r) => (e, t) => {
|
|
@@ -4113,7 +4113,7 @@ class Rf extends Error {
|
|
|
4113
4113
|
super(...arguments), this.schemas = [];
|
|
4114
4114
|
}
|
|
4115
4115
|
}
|
|
4116
|
-
class
|
|
4116
|
+
class Rg {
|
|
4117
4117
|
static parse(e, t) {
|
|
4118
4118
|
const n = Ui(e);
|
|
4119
4119
|
if (n.result.error)
|
|
@@ -4166,7 +4166,7 @@ class Ng {
|
|
|
4166
4166
|
throw new Error("Converter is empty");
|
|
4167
4167
|
if (m.repeated)
|
|
4168
4168
|
if (m.implicit) {
|
|
4169
|
-
const
|
|
4169
|
+
const N = m.repeated === "sequence" ? mn : wn, v = new N();
|
|
4170
4170
|
v.valueBlock = h.valueBlock;
|
|
4171
4171
|
const A = Ui(v.toBER(!1));
|
|
4172
4172
|
if (A.offset === -1)
|
|
@@ -4176,9 +4176,9 @@ class Ng {
|
|
|
4176
4176
|
const O = A.result.valueBlock.value;
|
|
4177
4177
|
c[u] = Array.from(O, (k) => G.fromASN(k));
|
|
4178
4178
|
} else
|
|
4179
|
-
c[u] = Array.from(h, (
|
|
4179
|
+
c[u] = Array.from(h, (N) => G.fromASN(N));
|
|
4180
4180
|
else {
|
|
4181
|
-
let
|
|
4181
|
+
let N = h;
|
|
4182
4182
|
if (m.implicit) {
|
|
4183
4183
|
let v;
|
|
4184
4184
|
if (gn(x))
|
|
@@ -4189,9 +4189,9 @@ class Ng {
|
|
|
4189
4189
|
throw new Error(`Cannot get '${A}' class from asn1js module`);
|
|
4190
4190
|
v = new O();
|
|
4191
4191
|
}
|
|
4192
|
-
v.valueBlock =
|
|
4192
|
+
v.valueBlock = N.valueBlock, N = Ui(v.toBER(!1)).result;
|
|
4193
4193
|
}
|
|
4194
|
-
c[u] = G.fromASN(
|
|
4194
|
+
c[u] = G.fromASN(N);
|
|
4195
4195
|
}
|
|
4196
4196
|
} else if (m.repeated) {
|
|
4197
4197
|
if (!Array.isArray(h))
|
|
@@ -4231,7 +4231,7 @@ class zu {
|
|
|
4231
4231
|
} else
|
|
4232
4232
|
for (const o in n.items) {
|
|
4233
4233
|
const c = n.items[o], u = e[o];
|
|
4234
|
-
if (u === void 0 || c.defaultValue === u || typeof c.defaultValue == "object" && typeof u == "object" &&
|
|
4234
|
+
if (u === void 0 || c.defaultValue === u || typeof c.defaultValue == "object" && typeof u == "object" && jg(this.serialize(c.defaultValue), this.serialize(u)))
|
|
4235
4235
|
continue;
|
|
4236
4236
|
const h = zu.toAsnItem(c, o, t, u);
|
|
4237
4237
|
if (typeof c.context == "number")
|
|
@@ -4325,7 +4325,7 @@ class Z {
|
|
|
4325
4325
|
return zu.serialize(e);
|
|
4326
4326
|
}
|
|
4327
4327
|
static parse(e, t) {
|
|
4328
|
-
return
|
|
4328
|
+
return Rg.parse(e, t);
|
|
4329
4329
|
}
|
|
4330
4330
|
static toString(e) {
|
|
4331
4331
|
const t = W.isBufferSource(e) ? W.toArrayBuffer(e) : Z.serialize(e), n = Ui(t);
|
|
@@ -4400,8 +4400,8 @@ var Ep = { exports: {} };
|
|
|
4400
4400
|
v = `0${v}`;
|
|
4401
4401
|
return v;
|
|
4402
4402
|
}
|
|
4403
|
-
const
|
|
4404
|
-
|
|
4403
|
+
const N = {};
|
|
4404
|
+
N.IPv4 = function() {
|
|
4405
4405
|
function v(A) {
|
|
4406
4406
|
if (A.length !== 4)
|
|
4407
4407
|
throw new Error("ipaddr: ipv4 octet count should be 4");
|
|
@@ -4477,17 +4477,17 @@ var Ep = { exports: {} };
|
|
|
4477
4477
|
return null;
|
|
4478
4478
|
return 32 - A;
|
|
4479
4479
|
}, v.prototype.range = function() {
|
|
4480
|
-
return
|
|
4480
|
+
return N.subnetMatch(this, this.SpecialRanges);
|
|
4481
4481
|
}, v.prototype.toByteArray = function() {
|
|
4482
4482
|
return this.octets.slice(0);
|
|
4483
4483
|
}, v.prototype.toIPv4MappedAddress = function() {
|
|
4484
|
-
return
|
|
4484
|
+
return N.IPv6.parse(`::ffff:${this.toString()}`);
|
|
4485
4485
|
}, v.prototype.toNormalizedString = function() {
|
|
4486
4486
|
return this.toString();
|
|
4487
4487
|
}, v.prototype.toString = function() {
|
|
4488
4488
|
return this.octets.join(".");
|
|
4489
4489
|
}, v;
|
|
4490
|
-
}(),
|
|
4490
|
+
}(), N.IPv4.broadcastAddressFromCIDR = function(v) {
|
|
4491
4491
|
try {
|
|
4492
4492
|
const A = this.parseCIDR(v), O = A[0].toByteArray(), k = this.subnetMaskFromPrefixLength(A[1]).toByteArray(), j = [];
|
|
4493
4493
|
let R = 0;
|
|
@@ -4497,23 +4497,23 @@ var Ep = { exports: {} };
|
|
|
4497
4497
|
} catch {
|
|
4498
4498
|
throw new Error("ipaddr: the address does not have IPv4 CIDR format");
|
|
4499
4499
|
}
|
|
4500
|
-
},
|
|
4500
|
+
}, N.IPv4.isIPv4 = function(v) {
|
|
4501
4501
|
return this.parser(v) !== null;
|
|
4502
|
-
},
|
|
4502
|
+
}, N.IPv4.isValid = function(v) {
|
|
4503
4503
|
try {
|
|
4504
4504
|
return new this(this.parser(v)), !0;
|
|
4505
4505
|
} catch {
|
|
4506
4506
|
return !1;
|
|
4507
4507
|
}
|
|
4508
|
-
},
|
|
4508
|
+
}, N.IPv4.isValidCIDR = function(v) {
|
|
4509
4509
|
try {
|
|
4510
4510
|
return this.parseCIDR(v), !0;
|
|
4511
4511
|
} catch {
|
|
4512
4512
|
return !1;
|
|
4513
4513
|
}
|
|
4514
|
-
},
|
|
4515
|
-
return !!(
|
|
4516
|
-
},
|
|
4514
|
+
}, N.IPv4.isValidFourPartDecimal = function(v) {
|
|
4515
|
+
return !!(N.IPv4.isValid(v) && v.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/));
|
|
4516
|
+
}, N.IPv4.networkAddressFromCIDR = function(v) {
|
|
4517
4517
|
let A, O, k, j, R;
|
|
4518
4518
|
try {
|
|
4519
4519
|
for (A = this.parseCIDR(v), k = A[0].toByteArray(), R = this.subnetMaskFromPrefixLength(A[1]).toByteArray(), j = [], O = 0; O < 4; )
|
|
@@ -4522,12 +4522,12 @@ var Ep = { exports: {} };
|
|
|
4522
4522
|
} catch {
|
|
4523
4523
|
throw new Error("ipaddr: the address does not have IPv4 CIDR format");
|
|
4524
4524
|
}
|
|
4525
|
-
},
|
|
4525
|
+
}, N.IPv4.parse = function(v) {
|
|
4526
4526
|
const A = this.parser(v);
|
|
4527
4527
|
if (A === null)
|
|
4528
4528
|
throw new Error("ipaddr: string is not formatted like an IPv4 Address");
|
|
4529
4529
|
return new this(A);
|
|
4530
|
-
},
|
|
4530
|
+
}, N.IPv4.parseCIDR = function(v) {
|
|
4531
4531
|
let A;
|
|
4532
4532
|
if (A = v.match(/^(.+)\/(\d+)$/)) {
|
|
4533
4533
|
const O = parseInt(A[2]);
|
|
@@ -4541,7 +4541,7 @@ var Ep = { exports: {} };
|
|
|
4541
4541
|
}
|
|
4542
4542
|
}
|
|
4543
4543
|
throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range");
|
|
4544
|
-
},
|
|
4544
|
+
}, N.IPv4.parser = function(v) {
|
|
4545
4545
|
let A, O, k;
|
|
4546
4546
|
if (A = v.match(n.fourOctet))
|
|
4547
4547
|
return function() {
|
|
@@ -4571,7 +4571,7 @@ var Ep = { exports: {} };
|
|
|
4571
4571
|
throw new Error("ipaddr: address outside defined range");
|
|
4572
4572
|
return R.push(x(j[0])), R.push(x(j[1])), R.push(k >> 8 & 255), R.push(k & 255), R;
|
|
4573
4573
|
}() : null;
|
|
4574
|
-
},
|
|
4574
|
+
}, N.IPv4.subnetMaskFromPrefixLength = function(v) {
|
|
4575
4575
|
if (v = parseInt(v), v < 0 || v > 32)
|
|
4576
4576
|
throw new Error("ipaddr: invalid IPv4 prefix length");
|
|
4577
4577
|
const A = [0, 0, 0, 0];
|
|
@@ -4580,7 +4580,7 @@ var Ep = { exports: {} };
|
|
|
4580
4580
|
for (; O < k; )
|
|
4581
4581
|
A[O] = 255, O++;
|
|
4582
4582
|
return k < 4 && (A[k] = Math.pow(2, v % 8) - 1 << 8 - v % 8), new this(A);
|
|
4583
|
-
},
|
|
4583
|
+
}, N.IPv6 = function() {
|
|
4584
4584
|
function v(A, O) {
|
|
4585
4585
|
let k, j;
|
|
4586
4586
|
if (A.length === 16)
|
|
@@ -4670,7 +4670,7 @@ var Ep = { exports: {} };
|
|
|
4670
4670
|
return null;
|
|
4671
4671
|
return 128 - A;
|
|
4672
4672
|
}, v.prototype.range = function() {
|
|
4673
|
-
return
|
|
4673
|
+
return N.subnetMatch(this, this.SpecialRanges);
|
|
4674
4674
|
}, v.prototype.toByteArray = function() {
|
|
4675
4675
|
let A;
|
|
4676
4676
|
const O = [], k = this.parts;
|
|
@@ -4690,7 +4690,7 @@ var Ep = { exports: {} };
|
|
|
4690
4690
|
if (!this.isIPv4MappedAddress())
|
|
4691
4691
|
throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");
|
|
4692
4692
|
const A = this.parts.slice(-2), O = A[0], k = A[1];
|
|
4693
|
-
return new
|
|
4693
|
+
return new N.IPv4([O >> 8, O & 255, k >> 8, k & 255]);
|
|
4694
4694
|
}, v.prototype.toNormalizedString = function() {
|
|
4695
4695
|
const A = (function() {
|
|
4696
4696
|
const k = [];
|
|
@@ -4709,7 +4709,7 @@ var Ep = { exports: {} };
|
|
|
4709
4709
|
}, v.prototype.toString = function() {
|
|
4710
4710
|
return this.toRFC5952String();
|
|
4711
4711
|
}, v;
|
|
4712
|
-
}(),
|
|
4712
|
+
}(), N.IPv6.broadcastAddressFromCIDR = function(v) {
|
|
4713
4713
|
try {
|
|
4714
4714
|
const A = this.parseCIDR(v), O = A[0].toByteArray(), k = this.subnetMaskFromPrefixLength(A[1]).toByteArray(), j = [];
|
|
4715
4715
|
let R = 0;
|
|
@@ -4719,9 +4719,9 @@ var Ep = { exports: {} };
|
|
|
4719
4719
|
} catch (A) {
|
|
4720
4720
|
throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${A})`);
|
|
4721
4721
|
}
|
|
4722
|
-
},
|
|
4722
|
+
}, N.IPv6.isIPv6 = function(v) {
|
|
4723
4723
|
return this.parser(v) !== null;
|
|
4724
|
-
},
|
|
4724
|
+
}, N.IPv6.isValid = function(v) {
|
|
4725
4725
|
if (typeof v == "string" && v.indexOf(":") === -1)
|
|
4726
4726
|
return !1;
|
|
4727
4727
|
try {
|
|
@@ -4730,7 +4730,7 @@ var Ep = { exports: {} };
|
|
|
4730
4730
|
} catch {
|
|
4731
4731
|
return !1;
|
|
4732
4732
|
}
|
|
4733
|
-
},
|
|
4733
|
+
}, N.IPv6.isValidCIDR = function(v) {
|
|
4734
4734
|
if (typeof v == "string" && v.indexOf(":") === -1)
|
|
4735
4735
|
return !1;
|
|
4736
4736
|
try {
|
|
@@ -4738,7 +4738,7 @@ var Ep = { exports: {} };
|
|
|
4738
4738
|
} catch {
|
|
4739
4739
|
return !1;
|
|
4740
4740
|
}
|
|
4741
|
-
},
|
|
4741
|
+
}, N.IPv6.networkAddressFromCIDR = function(v) {
|
|
4742
4742
|
let A, O, k, j, R;
|
|
4743
4743
|
try {
|
|
4744
4744
|
for (A = this.parseCIDR(v), k = A[0].toByteArray(), R = this.subnetMaskFromPrefixLength(A[1]).toByteArray(), j = [], O = 0; O < 16; )
|
|
@@ -4747,12 +4747,12 @@ var Ep = { exports: {} };
|
|
|
4747
4747
|
} catch (le) {
|
|
4748
4748
|
throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${le})`);
|
|
4749
4749
|
}
|
|
4750
|
-
},
|
|
4750
|
+
}, N.IPv6.parse = function(v) {
|
|
4751
4751
|
const A = this.parser(v);
|
|
4752
4752
|
if (A.parts === null)
|
|
4753
4753
|
throw new Error("ipaddr: string is not formatted like an IPv6 Address");
|
|
4754
4754
|
return new this(A.parts, A.zoneId);
|
|
4755
|
-
},
|
|
4755
|
+
}, N.IPv6.parseCIDR = function(v) {
|
|
4756
4756
|
let A, O, k;
|
|
4757
4757
|
if ((O = v.match(/^(.+)\/(\d+)$/)) && (A = parseInt(O[2]), A >= 0 && A <= 128))
|
|
4758
4758
|
return k = [this.parse(O[1]), A], Object.defineProperty(k, "toString", {
|
|
@@ -4761,7 +4761,7 @@ var Ep = { exports: {} };
|
|
|
4761
4761
|
}
|
|
4762
4762
|
}), k;
|
|
4763
4763
|
throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range");
|
|
4764
|
-
},
|
|
4764
|
+
}, N.IPv6.parser = function(v) {
|
|
4765
4765
|
let A, O, k, j, R, le;
|
|
4766
4766
|
if (k = v.match(u.deprecatedTransitional))
|
|
4767
4767
|
return this.parser(`::ffff:${k[1]}`);
|
|
@@ -4782,7 +4782,7 @@ var Ep = { exports: {} };
|
|
|
4782
4782
|
};
|
|
4783
4783
|
}
|
|
4784
4784
|
return null;
|
|
4785
|
-
},
|
|
4785
|
+
}, N.IPv6.subnetMaskFromPrefixLength = function(v) {
|
|
4786
4786
|
if (v = parseInt(v), v < 0 || v > 128)
|
|
4787
4787
|
throw new Error("ipaddr: invalid IPv6 prefix length");
|
|
4788
4788
|
const A = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
|
@@ -4791,37 +4791,37 @@ var Ep = { exports: {} };
|
|
|
4791
4791
|
for (; O < k; )
|
|
4792
4792
|
A[O] = 255, O++;
|
|
4793
4793
|
return k < 16 && (A[k] = Math.pow(2, v % 8) - 1 << 8 - v % 8), new this(A);
|
|
4794
|
-
},
|
|
4794
|
+
}, N.fromByteArray = function(v) {
|
|
4795
4795
|
const A = v.length;
|
|
4796
4796
|
if (A === 4)
|
|
4797
|
-
return new
|
|
4797
|
+
return new N.IPv4(v);
|
|
4798
4798
|
if (A === 16)
|
|
4799
|
-
return new
|
|
4799
|
+
return new N.IPv6(v);
|
|
4800
4800
|
throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address");
|
|
4801
|
-
},
|
|
4802
|
-
return
|
|
4803
|
-
},
|
|
4804
|
-
return
|
|
4805
|
-
},
|
|
4806
|
-
if (
|
|
4807
|
-
return
|
|
4808
|
-
if (
|
|
4809
|
-
return
|
|
4801
|
+
}, N.isValid = function(v) {
|
|
4802
|
+
return N.IPv6.isValid(v) || N.IPv4.isValid(v);
|
|
4803
|
+
}, N.isValidCIDR = function(v) {
|
|
4804
|
+
return N.IPv6.isValidCIDR(v) || N.IPv4.isValidCIDR(v);
|
|
4805
|
+
}, N.parse = function(v) {
|
|
4806
|
+
if (N.IPv6.isValid(v))
|
|
4807
|
+
return N.IPv6.parse(v);
|
|
4808
|
+
if (N.IPv4.isValid(v))
|
|
4809
|
+
return N.IPv4.parse(v);
|
|
4810
4810
|
throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format");
|
|
4811
|
-
},
|
|
4811
|
+
}, N.parseCIDR = function(v) {
|
|
4812
4812
|
try {
|
|
4813
|
-
return
|
|
4813
|
+
return N.IPv6.parseCIDR(v);
|
|
4814
4814
|
} catch {
|
|
4815
4815
|
try {
|
|
4816
|
-
return
|
|
4816
|
+
return N.IPv4.parseCIDR(v);
|
|
4817
4817
|
} catch {
|
|
4818
4818
|
throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format");
|
|
4819
4819
|
}
|
|
4820
4820
|
}
|
|
4821
|
-
},
|
|
4821
|
+
}, N.process = function(v) {
|
|
4822
4822
|
const A = this.parse(v);
|
|
4823
4823
|
return A.kind() === "ipv6" && A.isIPv4MappedAddress() ? A.toIPv4Address() : A;
|
|
4824
|
-
},
|
|
4824
|
+
}, N.subnetMatch = function(v, A, O) {
|
|
4825
4825
|
let k, j, R, le;
|
|
4826
4826
|
O == null && (O = "unicast");
|
|
4827
4827
|
for (j in A)
|
|
@@ -4831,7 +4831,7 @@ var Ep = { exports: {} };
|
|
|
4831
4831
|
return j;
|
|
4832
4832
|
}
|
|
4833
4833
|
return O;
|
|
4834
|
-
}, r.exports ? r.exports =
|
|
4834
|
+
}, r.exports ? r.exports = N : e.ipaddr = N;
|
|
4835
4835
|
})(sl);
|
|
4836
4836
|
})(Ep);
|
|
4837
4837
|
var Uf = Ep.exports;
|
|
@@ -4928,15 +4928,15 @@ let hl = ul = class extends dt {
|
|
|
4928
4928
|
hl = ul = f([
|
|
4929
4929
|
H({ type: M.Sequence, itemType: Li })
|
|
4930
4930
|
], hl);
|
|
4931
|
-
let
|
|
4931
|
+
let Ht = fl = class extends hl {
|
|
4932
4932
|
constructor(e) {
|
|
4933
4933
|
super(e), Object.setPrototypeOf(this, fl.prototype);
|
|
4934
4934
|
}
|
|
4935
4935
|
};
|
|
4936
|
-
|
|
4936
|
+
Ht = fl = f([
|
|
4937
4937
|
H({ type: M.Sequence })
|
|
4938
|
-
],
|
|
4939
|
-
const
|
|
4938
|
+
], Ht);
|
|
4939
|
+
const Ug = {
|
|
4940
4940
|
fromASN: (r) => Df.toString(Ko.fromASN(r)),
|
|
4941
4941
|
toASN: (r) => Ko.toASN(Df.fromString(r))
|
|
4942
4942
|
};
|
|
@@ -4980,7 +4980,7 @@ f([
|
|
|
4980
4980
|
y({ type: b.Any, context: 3, implicit: !0 })
|
|
4981
4981
|
], Ue.prototype, "x400Address", void 0);
|
|
4982
4982
|
f([
|
|
4983
|
-
y({ type:
|
|
4983
|
+
y({ type: Ht, context: 4, implicit: !1 })
|
|
4984
4984
|
], Ue.prototype, "directoryName", void 0);
|
|
4985
4985
|
f([
|
|
4986
4986
|
y({ type: Gu, context: 5 })
|
|
@@ -4989,7 +4989,7 @@ f([
|
|
|
4989
4989
|
y({ type: b.IA5String, context: 6, implicit: !0 })
|
|
4990
4990
|
], Ue.prototype, "uniformResourceIdentifier", void 0);
|
|
4991
4991
|
f([
|
|
4992
|
-
y({ type: b.OctetString, context: 7, implicit: !0, converter:
|
|
4992
|
+
y({ type: b.OctetString, context: 7, implicit: !0, converter: Ug })
|
|
4993
4993
|
], Ue.prototype, "iPAddress", void 0);
|
|
4994
4994
|
f([
|
|
4995
4995
|
y({ type: b.ObjectIdentifier, context: 8, implicit: !0 })
|
|
@@ -4997,9 +4997,9 @@ f([
|
|
|
4997
4997
|
Ue = f([
|
|
4998
4998
|
H({ type: M.Choice })
|
|
4999
4999
|
], Ue);
|
|
5000
|
-
const Ku = "1.3.6.1.5.5.7",
|
|
5000
|
+
const Ku = "1.3.6.1.5.5.7", Dg = `${Ku}.1`, is = `${Ku}.3`, oc = `${Ku}.48`, $f = `${oc}.1`, Mf = `${oc}.2`, Vf = `${oc}.3`, Lf = `${oc}.5`, Yn = "2.5.29";
|
|
5001
5001
|
var dl;
|
|
5002
|
-
const pl = `${
|
|
5002
|
+
const pl = `${Dg}.1`;
|
|
5003
5003
|
class yo {
|
|
5004
5004
|
constructor(e = {}) {
|
|
5005
5005
|
this.accessMethod = "", this.accessLocation = new Ue(), Object.assign(this, e);
|
|
@@ -5294,7 +5294,7 @@ let Xo = Al = class extends dt {
|
|
|
5294
5294
|
Xo = Al = f([
|
|
5295
5295
|
H({ type: M.Sequence, itemType: b.ObjectIdentifier })
|
|
5296
5296
|
], Xo);
|
|
5297
|
-
const
|
|
5297
|
+
const $g = `${is}.1`, Mg = `${is}.2`, Vg = `${is}.3`, Lg = `${is}.4`, Hg = `${is}.8`, Fg = `${is}.9`;
|
|
5298
5298
|
let Sl = class {
|
|
5299
5299
|
constructor(e = new ArrayBuffer(0)) {
|
|
5300
5300
|
this.value = e;
|
|
@@ -5597,7 +5597,7 @@ var Hi;
|
|
|
5597
5597
|
})(Hi || (Hi = {}));
|
|
5598
5598
|
class Nr {
|
|
5599
5599
|
constructor(e = {}) {
|
|
5600
|
-
this.version = Hi.v1, this.serialNumber = new ArrayBuffer(0), this.signature = new oe(), this.issuer = new
|
|
5600
|
+
this.version = Hi.v1, this.serialNumber = new ArrayBuffer(0), this.signature = new oe(), this.issuer = new Ht(), this.validity = new lc(), this.subject = new Ht(), this.subjectPublicKeyInfo = new rn(), Object.assign(this, e);
|
|
5601
5601
|
}
|
|
5602
5602
|
}
|
|
5603
5603
|
f([
|
|
@@ -5617,13 +5617,13 @@ f([
|
|
|
5617
5617
|
y({ type: oe })
|
|
5618
5618
|
], Nr.prototype, "signature", void 0);
|
|
5619
5619
|
f([
|
|
5620
|
-
y({ type:
|
|
5620
|
+
y({ type: Ht })
|
|
5621
5621
|
], Nr.prototype, "issuer", void 0);
|
|
5622
5622
|
f([
|
|
5623
5623
|
y({ type: lc })
|
|
5624
5624
|
], Nr.prototype, "validity", void 0);
|
|
5625
5625
|
f([
|
|
5626
|
-
y({ type:
|
|
5626
|
+
y({ type: Ht })
|
|
5627
5627
|
], Nr.prototype, "subject", void 0);
|
|
5628
5628
|
f([
|
|
5629
5629
|
y({ type: rn })
|
|
@@ -5672,7 +5672,7 @@ f([
|
|
|
5672
5672
|
], uc.prototype, "crlEntryExtensions", void 0);
|
|
5673
5673
|
class Cn {
|
|
5674
5674
|
constructor(e = {}) {
|
|
5675
|
-
this.signature = new oe(), this.issuer = new
|
|
5675
|
+
this.signature = new oe(), this.issuer = new Ht(), this.thisUpdate = new Yt(), Object.assign(this, e);
|
|
5676
5676
|
}
|
|
5677
5677
|
}
|
|
5678
5678
|
f([
|
|
@@ -5682,7 +5682,7 @@ f([
|
|
|
5682
5682
|
y({ type: oe })
|
|
5683
5683
|
], Cn.prototype, "signature", void 0);
|
|
5684
5684
|
f([
|
|
5685
|
-
y({ type:
|
|
5685
|
+
y({ type: Ht })
|
|
5686
5686
|
], Cn.prototype, "issuer", void 0);
|
|
5687
5687
|
f([
|
|
5688
5688
|
y({ type: Yt })
|
|
@@ -5712,11 +5712,11 @@ f([
|
|
|
5712
5712
|
], ef.prototype, "signature", void 0);
|
|
5713
5713
|
class os {
|
|
5714
5714
|
constructor(e = {}) {
|
|
5715
|
-
this.issuer = new
|
|
5715
|
+
this.issuer = new Ht(), this.serialNumber = new ArrayBuffer(0), Object.assign(this, e);
|
|
5716
5716
|
}
|
|
5717
5717
|
}
|
|
5718
5718
|
f([
|
|
5719
|
-
y({ type:
|
|
5719
|
+
y({ type: Ht })
|
|
5720
5720
|
], os.prototype, "issuer", void 0);
|
|
5721
5721
|
f([
|
|
5722
5722
|
y({ type: b.Integer, converter: wt })
|
|
@@ -6215,7 +6215,7 @@ f([
|
|
|
6215
6215
|
y({ type: et, context: 0, implicit: !0, optional: !0 })
|
|
6216
6216
|
], Vs.prototype, "value", void 0);
|
|
6217
6217
|
f([
|
|
6218
|
-
y({ type: et, converter:
|
|
6218
|
+
y({ type: et, converter: mg, context: 0, implicit: !0, optional: !0, repeated: "sequence" })
|
|
6219
6219
|
], Vs.prototype, "constructedValue", void 0);
|
|
6220
6220
|
Vs = f([
|
|
6221
6221
|
H({ type: M.Choice })
|
|
@@ -6534,7 +6534,7 @@ f([
|
|
|
6534
6534
|
f([
|
|
6535
6535
|
y({ type: Zl, context: 1, implicit: !0, optional: !0 })
|
|
6536
6536
|
], Ao.prototype, "unprotectedAttrs", void 0);
|
|
6537
|
-
const
|
|
6537
|
+
const zg = "1.2.840.113549.1.7.1", ql = "1.2.840.113549.1.7.2";
|
|
6538
6538
|
var Wl;
|
|
6539
6539
|
let la = Wl = class extends dt {
|
|
6540
6540
|
constructor(e) {
|
|
@@ -6571,9 +6571,9 @@ const Ls = "1.2.840.10045.2.1", ff = "1.2.840.10045.4.1", Mp = "1.2.840.10045.4.
|
|
|
6571
6571
|
function So(r) {
|
|
6572
6572
|
return new oe({ algorithm: r });
|
|
6573
6573
|
}
|
|
6574
|
-
const
|
|
6574
|
+
const Gg = So(ff);
|
|
6575
6575
|
So(Mp);
|
|
6576
|
-
const
|
|
6576
|
+
const Kg = So(hf), Zg = So(df), qg = So(pf);
|
|
6577
6577
|
let Hs = class {
|
|
6578
6578
|
constructor(e = {}) {
|
|
6579
6579
|
Object.assign(this, e);
|
|
@@ -6588,7 +6588,7 @@ f([
|
|
|
6588
6588
|
Hs = f([
|
|
6589
6589
|
H({ type: M.Sequence })
|
|
6590
6590
|
], Hs);
|
|
6591
|
-
class
|
|
6591
|
+
class Wg extends et {
|
|
6592
6592
|
}
|
|
6593
6593
|
let Wi = class {
|
|
6594
6594
|
constructor(e = {}) {
|
|
@@ -6626,7 +6626,7 @@ f([
|
|
|
6626
6626
|
y({ type: Wi })
|
|
6627
6627
|
], _n.prototype, "curve", void 0);
|
|
6628
6628
|
f([
|
|
6629
|
-
y({ type:
|
|
6629
|
+
y({ type: Wg })
|
|
6630
6630
|
], _n.prototype, "base", void 0);
|
|
6631
6631
|
f([
|
|
6632
6632
|
y({ type: b.Integer, converter: wt })
|
|
@@ -6682,36 +6682,36 @@ f([
|
|
|
6682
6682
|
f([
|
|
6683
6683
|
y({ type: b.Integer, converter: wt })
|
|
6684
6684
|
], ua.prototype, "s", void 0);
|
|
6685
|
-
const wr = "1.2.840.113549.1.1", gi = `${wr}.1`,
|
|
6686
|
-
function
|
|
6685
|
+
const wr = "1.2.840.113549.1.1", gi = `${wr}.1`, Yg = `${wr}.7`, Jg = `${wr}.9`, js = `${wr}.10`, Xg = `${wr}.2`, Qg = `${wr}.4`, fa = `${wr}.5`, ev = `${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", tv = "2.16.840.1.101.3.4.2.5", rv = "2.16.840.1.101.3.4.2.6", nv = "1.2.840.113549.2.2", iv = "1.2.840.113549.2.5", Ac = `${wr}.8`;
|
|
6686
|
+
function Ft(r) {
|
|
6687
6687
|
return new oe({ algorithm: r, parameters: null });
|
|
6688
6688
|
}
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
const vi =
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6689
|
+
Ft(nv);
|
|
6690
|
+
Ft(iv);
|
|
6691
|
+
const vi = Ft(pa);
|
|
6692
|
+
Ft(Hp);
|
|
6693
|
+
Ft(ya);
|
|
6694
|
+
Ft(ga);
|
|
6695
|
+
Ft(va);
|
|
6696
|
+
Ft(tv);
|
|
6697
|
+
Ft(rv);
|
|
6698
6698
|
const Fp = new oe({
|
|
6699
6699
|
algorithm: Ac,
|
|
6700
6700
|
parameters: Z.serialize(vi)
|
|
6701
6701
|
}), zp = new oe({
|
|
6702
|
-
algorithm:
|
|
6702
|
+
algorithm: Jg,
|
|
6703
6703
|
parameters: Z.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))
|
|
6704
6704
|
});
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6705
|
+
Ft(gi);
|
|
6706
|
+
Ft(Xg);
|
|
6707
|
+
Ft(Qg);
|
|
6708
|
+
Ft(fa);
|
|
6709
|
+
Ft(Vp);
|
|
6710
|
+
Ft(Lp);
|
|
6711
|
+
Ft(ha);
|
|
6712
|
+
Ft(da);
|
|
6713
|
+
Ft(Vp);
|
|
6714
|
+
Ft(Lp);
|
|
6715
6715
|
class Sc {
|
|
6716
6716
|
constructor(e = {}) {
|
|
6717
6717
|
this.hashAlgorithm = new oe(vi), this.maskGenAlgorithm = new oe({
|
|
@@ -6730,7 +6730,7 @@ f([
|
|
|
6730
6730
|
y({ type: oe, context: 2, defaultValue: zp })
|
|
6731
6731
|
], Sc.prototype, "pSourceAlgorithm", void 0);
|
|
6732
6732
|
new oe({
|
|
6733
|
-
algorithm:
|
|
6733
|
+
algorithm: Yg,
|
|
6734
6734
|
parameters: Z.serialize(new Sc())
|
|
6735
6735
|
});
|
|
6736
6736
|
class mi {
|
|
@@ -6870,7 +6870,7 @@ function gf(r, e) {
|
|
|
6870
6870
|
}
|
|
6871
6871
|
r.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
|
|
6872
6872
|
}
|
|
6873
|
-
function
|
|
6873
|
+
function sv(r, e, t, n) {
|
|
6874
6874
|
function i(s) {
|
|
6875
6875
|
return s instanceof t ? s : new t(function(o) {
|
|
6876
6876
|
o(s);
|
|
@@ -6897,7 +6897,7 @@ function rv(r, e, t, n) {
|
|
|
6897
6897
|
h((n = n.apply(r, [])).next());
|
|
6898
6898
|
});
|
|
6899
6899
|
}
|
|
6900
|
-
function
|
|
6900
|
+
function ov(r, e) {
|
|
6901
6901
|
var t = { label: 0, sent: function() {
|
|
6902
6902
|
if (s[0] & 1) throw s[1];
|
|
6903
6903
|
return s[1];
|
|
@@ -6989,9 +6989,9 @@ function ti() {
|
|
|
6989
6989
|
r = r.concat(ma(arguments[e]));
|
|
6990
6990
|
return r;
|
|
6991
6991
|
}
|
|
6992
|
-
var
|
|
6993
|
-
function
|
|
6994
|
-
var e = Reflect.getMetadata("design:paramtypes", r) || [], t = Reflect.getOwnMetadata(
|
|
6992
|
+
var av = "injectionTokens";
|
|
6993
|
+
function cv(r) {
|
|
6994
|
+
var e = Reflect.getMetadata("design:paramtypes", r) || [], t = Reflect.getOwnMetadata(av, r) || {};
|
|
6995
6995
|
return Object.keys(t).forEach(function(n) {
|
|
6996
6996
|
e[+n] = t[n];
|
|
6997
6997
|
}), e;
|
|
@@ -7039,13 +7039,13 @@ var Kp = function() {
|
|
|
7039
7039
|
function Ni(r) {
|
|
7040
7040
|
return typeof r == "string" || typeof r == "symbol";
|
|
7041
7041
|
}
|
|
7042
|
-
function
|
|
7042
|
+
function lv(r) {
|
|
7043
7043
|
return typeof r == "object" && "token" in r && "multiple" in r;
|
|
7044
7044
|
}
|
|
7045
7045
|
function rh(r) {
|
|
7046
7046
|
return typeof r == "object" && "token" in r && "transform" in r;
|
|
7047
7047
|
}
|
|
7048
|
-
function
|
|
7048
|
+
function uv(r) {
|
|
7049
7049
|
return typeof r == "function" || r instanceof Kp;
|
|
7050
7050
|
}
|
|
7051
7051
|
function Do(r) {
|
|
@@ -7054,7 +7054,7 @@ function Do(r) {
|
|
|
7054
7054
|
function $o(r) {
|
|
7055
7055
|
return r.useValue != null;
|
|
7056
7056
|
}
|
|
7057
|
-
function
|
|
7057
|
+
function fv(r) {
|
|
7058
7058
|
return Gp(r) || $o(r) || Do(r) || ru(r);
|
|
7059
7059
|
}
|
|
7060
7060
|
var vf = function() {
|
|
@@ -7080,7 +7080,7 @@ var vf = function() {
|
|
|
7080
7080
|
}, r.prototype.ensure = function(e) {
|
|
7081
7081
|
this._registryMap.has(e) || this._registryMap.set(e, []);
|
|
7082
7082
|
}, r;
|
|
7083
|
-
}(),
|
|
7083
|
+
}(), hv = function(r) {
|
|
7084
7084
|
gf(e, r);
|
|
7085
7085
|
function e() {
|
|
7086
7086
|
return r !== null && r.apply(this, arguments) || this;
|
|
@@ -7092,54 +7092,54 @@ var vf = function() {
|
|
|
7092
7092
|
}
|
|
7093
7093
|
return r;
|
|
7094
7094
|
}();
|
|
7095
|
-
function
|
|
7095
|
+
function dv(r, e) {
|
|
7096
7096
|
if (r === null)
|
|
7097
7097
|
return "at position #" + e;
|
|
7098
7098
|
var t = r.split(",")[e].trim();
|
|
7099
7099
|
return '"' + t + '" at position #' + e;
|
|
7100
7100
|
}
|
|
7101
|
-
function
|
|
7101
|
+
function pv(r, e, t) {
|
|
7102
7102
|
return t === void 0 && (t = " "), ti([r], e.message.split(`
|
|
7103
7103
|
`).map(function(n) {
|
|
7104
7104
|
return t + n;
|
|
7105
7105
|
})).join(`
|
|
7106
7106
|
`);
|
|
7107
7107
|
}
|
|
7108
|
-
function
|
|
7109
|
-
var n = ma(r.toString().match(/constructor\(([\w, ]+)\)/) || [], 2), i = n[1], s = i === void 0 ? null : i, o =
|
|
7110
|
-
return
|
|
7108
|
+
function yv(r, e, t) {
|
|
7109
|
+
var n = ma(r.toString().match(/constructor\(([\w, ]+)\)/) || [], 2), i = n[1], s = i === void 0 ? null : i, o = dv(s, e);
|
|
7110
|
+
return pv("Cannot inject the dependency " + o + ' of "' + r.name + '" constructor. Reason:', t);
|
|
7111
7111
|
}
|
|
7112
|
-
function
|
|
7112
|
+
function gv(r) {
|
|
7113
7113
|
if (typeof r.dispose != "function")
|
|
7114
7114
|
return !1;
|
|
7115
7115
|
var e = r.dispose;
|
|
7116
7116
|
return !(e.length > 0);
|
|
7117
7117
|
}
|
|
7118
|
-
var
|
|
7118
|
+
var vv = function(r) {
|
|
7119
7119
|
gf(e, r);
|
|
7120
7120
|
function e() {
|
|
7121
7121
|
return r !== null && r.apply(this, arguments) || this;
|
|
7122
7122
|
}
|
|
7123
7123
|
return e;
|
|
7124
|
-
}(vf),
|
|
7124
|
+
}(vf), mv = function(r) {
|
|
7125
7125
|
gf(e, r);
|
|
7126
7126
|
function e() {
|
|
7127
7127
|
return r !== null && r.apply(this, arguments) || this;
|
|
7128
7128
|
}
|
|
7129
7129
|
return e;
|
|
7130
|
-
}(vf),
|
|
7130
|
+
}(vf), wv = /* @__PURE__ */ function() {
|
|
7131
7131
|
function r() {
|
|
7132
|
-
this.preResolution = new
|
|
7132
|
+
this.preResolution = new vv(), this.postResolution = new mv();
|
|
7133
7133
|
}
|
|
7134
7134
|
return r;
|
|
7135
|
-
}(), Zp = /* @__PURE__ */ new Map(),
|
|
7135
|
+
}(), Zp = /* @__PURE__ */ new Map(), bv = function() {
|
|
7136
7136
|
function r(e) {
|
|
7137
|
-
this.parent = e, this._registry = new
|
|
7137
|
+
this.parent = e, this._registry = new hv(), this.interceptors = new wv(), this.disposed = !1, this.disposables = /* @__PURE__ */ new Set();
|
|
7138
7138
|
}
|
|
7139
7139
|
return r.prototype.register = function(e, t, n) {
|
|
7140
7140
|
n === void 0 && (n = { lifecycle: dr.Transient }), this.ensureNotDisposed();
|
|
7141
7141
|
var i;
|
|
7142
|
-
if (
|
|
7142
|
+
if (fv(t) ? i = t : i = { useClass: t }, Do(i))
|
|
7143
7143
|
for (var s = [e], o = i; o != null; ) {
|
|
7144
7144
|
var c = o.useToken;
|
|
7145
7145
|
if (s.includes(c))
|
|
@@ -7186,7 +7186,7 @@ var pv = function(r) {
|
|
|
7186
7186
|
var i = this.resolveRegistration(n, t);
|
|
7187
7187
|
return this.executePostResolutionInterceptor(e, i, "Single"), i;
|
|
7188
7188
|
}
|
|
7189
|
-
if (
|
|
7189
|
+
if (uv(e)) {
|
|
7190
7190
|
var i = this.construct(e, t);
|
|
7191
7191
|
return this.executePostResolutionInterceptor(e, i, "Single"), i;
|
|
7192
7192
|
}
|
|
@@ -7313,9 +7313,9 @@ var pv = function(r) {
|
|
|
7313
7313
|
options: n
|
|
7314
7314
|
});
|
|
7315
7315
|
}, r.prototype.dispose = function() {
|
|
7316
|
-
return
|
|
7316
|
+
return sv(this, void 0, void 0, function() {
|
|
7317
7317
|
var e;
|
|
7318
|
-
return
|
|
7318
|
+
return ov(this, function(t) {
|
|
7319
7319
|
switch (t.label) {
|
|
7320
7320
|
case 0:
|
|
7321
7321
|
return this.disposed = !0, e = [], this.disposables.forEach(function(n) {
|
|
@@ -7347,25 +7347,25 @@ var pv = function(r) {
|
|
|
7347
7347
|
var o = s.map(n.resolveParams(t, e));
|
|
7348
7348
|
return new (e.bind.apply(e, ti([void 0], o)))();
|
|
7349
7349
|
}();
|
|
7350
|
-
return
|
|
7350
|
+
return gv(i) && this.disposables.add(i), i;
|
|
7351
7351
|
}, r.prototype.resolveParams = function(e, t) {
|
|
7352
7352
|
var n = this;
|
|
7353
7353
|
return function(i, s) {
|
|
7354
7354
|
var o, c, u;
|
|
7355
7355
|
try {
|
|
7356
|
-
return
|
|
7356
|
+
return lv(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);
|
|
7357
7357
|
} catch (h) {
|
|
7358
|
-
throw new Error(
|
|
7358
|
+
throw new Error(yv(t, s, h));
|
|
7359
7359
|
}
|
|
7360
7360
|
};
|
|
7361
7361
|
}, r.prototype.ensureNotDisposed = function() {
|
|
7362
7362
|
if (this.disposed)
|
|
7363
7363
|
throw new Error("This container has been disposed, you cannot interact with a disposed container");
|
|
7364
7364
|
}, r;
|
|
7365
|
-
}(), lr = new
|
|
7365
|
+
}(), lr = new bv();
|
|
7366
7366
|
function kc() {
|
|
7367
7367
|
return function(r) {
|
|
7368
|
-
Zp.set(r,
|
|
7368
|
+
Zp.set(r, cv(r));
|
|
7369
7369
|
};
|
|
7370
7370
|
}
|
|
7371
7371
|
if (typeof Reflect > "u" || !Reflect.getMetadata)
|
|
@@ -7743,14 +7743,14 @@ Aa = wu = f([
|
|
|
7743
7743
|
], Aa);
|
|
7744
7744
|
class ls {
|
|
7745
7745
|
constructor(e = {}) {
|
|
7746
|
-
this.version = 0, this.subject = new
|
|
7746
|
+
this.version = 0, this.subject = new Ht(), this.subjectPKInfo = new rn(), this.attributes = new Aa(), Object.assign(this, e);
|
|
7747
7747
|
}
|
|
7748
7748
|
}
|
|
7749
7749
|
f([
|
|
7750
7750
|
y({ type: b.Integer })
|
|
7751
7751
|
], ls.prototype, "version", void 0);
|
|
7752
7752
|
f([
|
|
7753
|
-
y({ type:
|
|
7753
|
+
y({ type: Ht })
|
|
7754
7754
|
], ls.prototype, "subject", void 0);
|
|
7755
7755
|
f([
|
|
7756
7756
|
y({ type: rn })
|
|
@@ -7797,7 +7797,7 @@ f([
|
|
|
7797
7797
|
*
|
|
7798
7798
|
*/
|
|
7799
7799
|
const ko = "crypto.algorithm";
|
|
7800
|
-
class
|
|
7800
|
+
class xv {
|
|
7801
7801
|
getAlgorithms() {
|
|
7802
7802
|
return lr.resolveAll(ko);
|
|
7803
7803
|
}
|
|
@@ -7833,7 +7833,7 @@ class mv {
|
|
|
7833
7833
|
}
|
|
7834
7834
|
}
|
|
7835
7835
|
const Yi = "crypto.algorithmProvider";
|
|
7836
|
-
lr.registerSingleton(Yi,
|
|
7836
|
+
lr.registerSingleton(Yi, xv);
|
|
7837
7837
|
var Mo;
|
|
7838
7838
|
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", Zh = "brainpoolP384t1", qh = "brainpoolP512r1", Wh = "brainpoolP512t1", kt = "ECDSA";
|
|
7839
7839
|
let zs = Mo = class {
|
|
@@ -7843,13 +7843,13 @@ let zs = Mo = class {
|
|
|
7843
7843
|
if ("hash" in e)
|
|
7844
7844
|
switch ((typeof e.hash == "string" ? e.hash : e.hash.name).toLowerCase()) {
|
|
7845
7845
|
case "sha-1":
|
|
7846
|
-
return
|
|
7846
|
+
return Gg;
|
|
7847
7847
|
case "sha-256":
|
|
7848
|
-
return
|
|
7848
|
+
return Kg;
|
|
7849
7849
|
case "sha-384":
|
|
7850
|
-
return
|
|
7850
|
+
return Zg;
|
|
7851
7851
|
case "sha-512":
|
|
7852
|
-
return
|
|
7852
|
+
return qg;
|
|
7853
7853
|
}
|
|
7854
7854
|
else if ("namedCurve" in e) {
|
|
7855
7855
|
let t = "";
|
|
@@ -7989,7 +7989,7 @@ class Qe {
|
|
|
7989
7989
|
}
|
|
7990
7990
|
Qe.NAME = t0;
|
|
7991
7991
|
Qe.VALUE = r0;
|
|
7992
|
-
class
|
|
7992
|
+
class Av {
|
|
7993
7993
|
static toTextObject(e) {
|
|
7994
7994
|
const t = new Qe("Algorithm Identifier", {}, Bn.toString(e.algorithm));
|
|
7995
7995
|
if (e.parameters)
|
|
@@ -8019,7 +8019,7 @@ Bn.items = {
|
|
|
8019
8019
|
[va]: "sha512",
|
|
8020
8020
|
[gi]: "rsaEncryption",
|
|
8021
8021
|
[fa]: "sha1WithRSAEncryption",
|
|
8022
|
-
[
|
|
8022
|
+
[ev]: "sha224WithRSAEncryption",
|
|
8023
8023
|
[Jl]: "sha256WithRSAEncryption",
|
|
8024
8024
|
[ha]: "sha384WithRSAEncryption",
|
|
8025
8025
|
[da]: "sha512WithRSAEncryption",
|
|
@@ -8029,12 +8029,12 @@ Bn.items = {
|
|
|
8029
8029
|
[hf]: "ecdsaWithSHA256",
|
|
8030
8030
|
[df]: "ecdsaWithSHA384",
|
|
8031
8031
|
[pf]: "ecdsaWithSHA512",
|
|
8032
|
-
[
|
|
8033
|
-
[
|
|
8034
|
-
[
|
|
8035
|
-
[
|
|
8036
|
-
[
|
|
8037
|
-
[
|
|
8032
|
+
[$g]: "TLS WWW server authentication",
|
|
8033
|
+
[Mg]: "TLS WWW client authentication",
|
|
8034
|
+
[Vg]: "Code Signing",
|
|
8035
|
+
[Lg]: "E-mail Protection",
|
|
8036
|
+
[Hg]: "Time Stamping",
|
|
8037
|
+
[Fg]: "OCSP Signing",
|
|
8038
8038
|
[ql]: "Signed Data"
|
|
8039
8039
|
};
|
|
8040
8040
|
class Gn {
|
|
@@ -8091,7 +8091,7 @@ class Gn {
|
|
|
8091
8091
|
}
|
|
8092
8092
|
}
|
|
8093
8093
|
Gn.oidSerializer = Bn;
|
|
8094
|
-
Gn.algorithmSerializer =
|
|
8094
|
+
Gn.algorithmSerializer = Av;
|
|
8095
8095
|
class Jn {
|
|
8096
8096
|
constructor(...e) {
|
|
8097
8097
|
if (e.length === 1) {
|
|
@@ -8210,9 +8210,9 @@ class Dn {
|
|
|
8210
8210
|
}
|
|
8211
8211
|
n0 = Symbol.toStringTag;
|
|
8212
8212
|
Dn.DEFAULT = "default";
|
|
8213
|
-
const qt = new Dn(),
|
|
8214
|
-
function
|
|
8215
|
-
return new RegExp(
|
|
8213
|
+
const qt = new Dn(), Sv = /^[0-2](?:\.[1-9][0-9]*)+$/;
|
|
8214
|
+
function _v(r) {
|
|
8215
|
+
return new RegExp(Sv).test(r);
|
|
8216
8216
|
}
|
|
8217
8217
|
class i0 {
|
|
8218
8218
|
constructor(e = {}) {
|
|
@@ -8224,7 +8224,7 @@ class i0 {
|
|
|
8224
8224
|
return this.items[e] || null;
|
|
8225
8225
|
}
|
|
8226
8226
|
findId(e) {
|
|
8227
|
-
return
|
|
8227
|
+
return _v(e) ? e : this.get(e);
|
|
8228
8228
|
}
|
|
8229
8229
|
register(e, t) {
|
|
8230
8230
|
this.items[e] = t, this.items[t] = e;
|
|
@@ -8243,11 +8243,11 @@ mr.register("G", "2.5.4.42");
|
|
|
8243
8243
|
mr.register("I", "2.5.4.43");
|
|
8244
8244
|
mr.register("SN", "2.5.4.4");
|
|
8245
8245
|
mr.register("T", "2.5.4.12");
|
|
8246
|
-
function
|
|
8246
|
+
function Ev(r, e) {
|
|
8247
8247
|
return `\\${de.ToHex(de.FromUtf8String(e)).toUpperCase()}`;
|
|
8248
8248
|
}
|
|
8249
|
-
function
|
|
8250
|
-
return r.replace(/([,+"\\<>;])/g, "\\$1").replace(/^([ #])/, "\\$1").replace(/([ ]$)/, "\\$1").replace(/([\r\n\t])/,
|
|
8249
|
+
function kv(r) {
|
|
8250
|
+
return r.replace(/([,+"\\<>;])/g, "\\$1").replace(/^([ #])/, "\\$1").replace(/([ ]$)/, "\\$1").replace(/([\r\n\t])/, Ev);
|
|
8251
8251
|
}
|
|
8252
8252
|
class Hn {
|
|
8253
8253
|
static isASCII(e) {
|
|
@@ -8260,13 +8260,13 @@ class Hn {
|
|
|
8260
8260
|
return /^[A-Za-z0-9 '()+,-./:=?]*$/g.test(e);
|
|
8261
8261
|
}
|
|
8262
8262
|
constructor(e, t = {}) {
|
|
8263
|
-
this.extraNames = new i0(), this.asn = new
|
|
8263
|
+
this.extraNames = new i0(), this.asn = new Ht();
|
|
8264
8264
|
for (const n in t)
|
|
8265
8265
|
if (Object.prototype.hasOwnProperty.call(t, n)) {
|
|
8266
8266
|
const i = t[n];
|
|
8267
8267
|
this.extraNames.register(n, i);
|
|
8268
8268
|
}
|
|
8269
|
-
typeof e == "string" ? this.asn = this.fromString(e) : e instanceof
|
|
8269
|
+
typeof e == "string" ? this.asn = this.fromString(e) : e instanceof Ht ? this.asn = e : W.isBufferSource(e) ? this.asn = Z.parse(e, Ht) : this.asn = this.fromJSON(e);
|
|
8270
8270
|
}
|
|
8271
8271
|
getField(e) {
|
|
8272
8272
|
const t = this.extraNames.findId(e) || mr.findId(e), n = [];
|
|
@@ -8280,7 +8280,7 @@ class Hn {
|
|
|
8280
8280
|
}
|
|
8281
8281
|
toString() {
|
|
8282
8282
|
return this.asn.map((e) => e.map((t) => {
|
|
8283
|
-
const n = this.getName(t.type) || t.type, i = t.value.anyValue ? `#${de.ToHex(t.value.anyValue)}` :
|
|
8283
|
+
const n = this.getName(t.type) || t.type, i = t.value.anyValue ? `#${de.ToHex(t.value.anyValue)}` : kv(t.value.toString());
|
|
8284
8284
|
return `${n}=${i}`;
|
|
8285
8285
|
}).join("+")).join(", ");
|
|
8286
8286
|
}
|
|
@@ -8298,7 +8298,7 @@ class Hn {
|
|
|
8298
8298
|
return t;
|
|
8299
8299
|
}
|
|
8300
8300
|
fromString(e) {
|
|
8301
|
-
const t = new
|
|
8301
|
+
const t = new Ht(), n = /(\d\.[\d.]*\d|[A-Za-z]+)=((?:"")|(?:".*?[^\\]")|(?:[^,+].*?(?:[^\\][,+]))|(?:))([,+])?/g;
|
|
8302
8302
|
let i = null, s = ",";
|
|
8303
8303
|
for (; i = n.exec(`${e},`); ) {
|
|
8304
8304
|
let [, o, c] = i;
|
|
@@ -8312,7 +8312,7 @@ class Hn {
|
|
|
8312
8312
|
return t;
|
|
8313
8313
|
}
|
|
8314
8314
|
fromJSON(e) {
|
|
8315
|
-
const t = new
|
|
8315
|
+
const t = new Ht();
|
|
8316
8316
|
for (const n of e) {
|
|
8317
8317
|
const i = new Li();
|
|
8318
8318
|
for (const s in n) {
|
|
@@ -8374,14 +8374,14 @@ class Hn {
|
|
|
8374
8374
|
return e.length >= 1 && !(!((t = e[0]) === null || t === void 0) && t.subtle) ? (i = e[0] || i, n = e[1] || qt.get()) : n = e[0] || qt.get(), await n.subtle.digest(i, this.toArrayBuffer());
|
|
8375
8375
|
}
|
|
8376
8376
|
}
|
|
8377
|
-
const s0 = "Cannot initialize GeneralName from ASN.1 data.", Yh = `${s0} Unsupported string format in use.`,
|
|
8377
|
+
const s0 = "Cannot initialize GeneralName from ASN.1 data.", Yh = `${s0} Unsupported string format in use.`, Iv = `${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", Zc = "url", qc = "guid", Wc = "upn", No = "id";
|
|
8378
8378
|
class $n extends Jn {
|
|
8379
8379
|
constructor(...e) {
|
|
8380
8380
|
let t;
|
|
8381
8381
|
if (e.length === 2)
|
|
8382
8382
|
switch (e[0]) {
|
|
8383
8383
|
case zc: {
|
|
8384
|
-
const n = new Hn(e[1]).toArrayBuffer(), i = Z.parse(n,
|
|
8384
|
+
const n = new Hn(e[1]).toArrayBuffer(), i = Z.parse(n, Ht);
|
|
8385
8385
|
t = new Ue({ directoryName: i });
|
|
8386
8386
|
break;
|
|
8387
8387
|
}
|
|
@@ -8446,7 +8446,7 @@ class $n extends Jn {
|
|
|
8446
8446
|
this.type = qc;
|
|
8447
8447
|
const t = Z.parse(e.otherName.value, et), n = new RegExp(Jh, "i").exec(de.ToHex(t));
|
|
8448
8448
|
if (!n)
|
|
8449
|
-
throw new Error(
|
|
8449
|
+
throw new Error(Iv);
|
|
8450
8450
|
this.value = n.slice(1).map((i, s) => s < 3 ? de.ToHex(new Uint8Array(de.FromHex(i)).reverse()) : i).join("-");
|
|
8451
8451
|
} else if (e.otherName.typeId === Qh)
|
|
8452
8452
|
this.type = Wc, this.value = Z.parse(e.otherName.value, Xt).toString();
|
|
@@ -8531,7 +8531,7 @@ class Gs extends Jn {
|
|
|
8531
8531
|
}
|
|
8532
8532
|
}
|
|
8533
8533
|
Gs.NAME = "GeneralNames";
|
|
8534
|
-
const Ps = "-{5}", Ks = "\\n",
|
|
8534
|
+
const Ps = "-{5}", Ks = "\\n", Cv = `[^${Ks}]+`, Bv = `${Ps}BEGIN (${Cv}(?=${Ps}))${Ps}`, Ov = `${Ps}END \\1${Ps}`, Ji = "\\n", Tv = `[^:${Ks}]+`, Nv = `(?:[^${Ks}]+${Ji}(?: +[^${Ks}]+${Ji})*)`, jv = "[a-zA-Z0-9=+/]+", Pv = `(?:${jv}${Ji})+`, ed = `${Bv}${Ji}(?:((?:${Tv}: ${Nv})+))?${Ji}?(${Pv})${Ov}`;
|
|
8535
8535
|
class gr {
|
|
8536
8536
|
static isPem(e) {
|
|
8537
8537
|
return typeof e == "string" && new RegExp(ed, "g").test(e);
|
|
@@ -8678,7 +8678,7 @@ class sn extends Fr {
|
|
|
8678
8678
|
e.length > 1 ? (i = e[0] || i, n = e[1] || n, t = e[2] || qt.get()) : t = e[0] || qt.get();
|
|
8679
8679
|
let s = this.rawData;
|
|
8680
8680
|
const o = Z.parse(this.rawData, rn);
|
|
8681
|
-
return o.algorithm.algorithm === js && (s =
|
|
8681
|
+
return o.algorithm.algorithm === js && (s = Rv(o, s)), t.subtle.importKey("spki", s, i, !0, n);
|
|
8682
8682
|
}
|
|
8683
8683
|
onInit(e) {
|
|
8684
8684
|
const t = lr.resolve(Yi), n = this.algorithm = t.toWebAlgorithm(e.algorithm);
|
|
@@ -8714,7 +8714,7 @@ class sn extends Fr {
|
|
|
8714
8714
|
return e;
|
|
8715
8715
|
}
|
|
8716
8716
|
}
|
|
8717
|
-
function
|
|
8717
|
+
function Rv(r, e) {
|
|
8718
8718
|
return r.algorithm = new oe({
|
|
8719
8719
|
algorithm: gi,
|
|
8720
8720
|
parameters: null
|
|
@@ -9065,7 +9065,7 @@ class Nc {
|
|
|
9065
9065
|
}
|
|
9066
9066
|
Nc.items = /* @__PURE__ */ new Map();
|
|
9067
9067
|
const jc = "crypto.signatureFormatter";
|
|
9068
|
-
class
|
|
9068
|
+
class Uv {
|
|
9069
9069
|
toAsnSignature(e, t) {
|
|
9070
9070
|
return W.toArrayBuffer(t);
|
|
9071
9071
|
}
|
|
@@ -9217,7 +9217,7 @@ class Or {
|
|
|
9217
9217
|
toWebSignature(e, t) {
|
|
9218
9218
|
if (e.name === "ECDSA") {
|
|
9219
9219
|
const n = Z.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));
|
|
9220
|
-
return
|
|
9220
|
+
return Wy(o, c);
|
|
9221
9221
|
}
|
|
9222
9222
|
return null;
|
|
9223
9223
|
}
|
|
@@ -9277,7 +9277,7 @@ Au = f([
|
|
|
9277
9277
|
kc()
|
|
9278
9278
|
], Au);
|
|
9279
9279
|
lr.registerSingleton(ko, Au);
|
|
9280
|
-
class
|
|
9280
|
+
class Dv extends Fr {
|
|
9281
9281
|
constructor(e) {
|
|
9282
9282
|
Fr.isAsnEncoded(e) ? super(e, Fs) : super(e), this.tag = gr.CertificateRequestTag;
|
|
9283
9283
|
}
|
|
@@ -9336,7 +9336,7 @@ class Pv extends Fr {
|
|
|
9336
9336
|
}), e;
|
|
9337
9337
|
}
|
|
9338
9338
|
}
|
|
9339
|
-
|
|
9339
|
+
Dv.NAME = "PKCS#10 Certificate Request";
|
|
9340
9340
|
class wi extends Fr {
|
|
9341
9341
|
constructor(e) {
|
|
9342
9342
|
Fr.isAsnEncoded(e) ? super(e, di) : super(e), this.tag = gr.CertificateTag;
|
|
@@ -9435,7 +9435,7 @@ class wi extends Fr {
|
|
|
9435
9435
|
}
|
|
9436
9436
|
}
|
|
9437
9437
|
wi.NAME = "Certificate";
|
|
9438
|
-
class
|
|
9438
|
+
class $v extends Array {
|
|
9439
9439
|
constructor(e) {
|
|
9440
9440
|
if (super(), Fr.isAsnEncoded(e))
|
|
9441
9441
|
this.import(e);
|
|
@@ -9447,7 +9447,7 @@ class Rv extends Array {
|
|
|
9447
9447
|
}
|
|
9448
9448
|
export(e) {
|
|
9449
9449
|
const t = new xn();
|
|
9450
|
-
t.version = 1, t.encapContentInfo.eContentType =
|
|
9450
|
+
t.version = 1, t.encapContentInfo.eContentType = zg, t.encapContentInfo.eContent = new Ki({
|
|
9451
9451
|
single: new et()
|
|
9452
9452
|
}), t.certificates = new Ms(this.map((s) => new pi({
|
|
9453
9453
|
certificate: Z.parse(s.rawData, di)
|
|
@@ -9504,12 +9504,12 @@ class Rv extends Array {
|
|
|
9504
9504
|
});
|
|
9505
9505
|
}
|
|
9506
9506
|
}
|
|
9507
|
-
class
|
|
9507
|
+
class Mv {
|
|
9508
9508
|
constructor(e = {}) {
|
|
9509
9509
|
this.certificates = [], e.certificates && (this.certificates = e.certificates);
|
|
9510
9510
|
}
|
|
9511
9511
|
async build(e, t = qt.get()) {
|
|
9512
|
-
const n = new
|
|
9512
|
+
const n = new $v(e);
|
|
9513
9513
|
let i = e;
|
|
9514
9514
|
for (; i = await this.findIssuer(i, t); ) {
|
|
9515
9515
|
const s = await i.getThumbprint(t);
|
|
@@ -9565,7 +9565,7 @@ Pr.register(wl, f0);
|
|
|
9565
9565
|
Pr.register(pl, h0);
|
|
9566
9566
|
Nc.register(e0, d0);
|
|
9567
9567
|
Nc.register(mf, wf);
|
|
9568
|
-
lr.registerSingleton(jc,
|
|
9568
|
+
lr.registerSingleton(jc, Uv);
|
|
9569
9569
|
lr.registerSingleton(jc, Or);
|
|
9570
9570
|
Or.namedCurveSize.set("P-256", 32);
|
|
9571
9571
|
Or.namedCurveSize.set("K-256", 32);
|
|
@@ -9619,7 +9619,7 @@ let Ze = (vn = class {
|
|
|
9619
9619
|
function _a(r) {
|
|
9620
9620
|
if (r != null && typeof r == "object") return r[Er.ENCODED];
|
|
9621
9621
|
}
|
|
9622
|
-
function
|
|
9622
|
+
function Vv(r) {
|
|
9623
9623
|
if (r != null && typeof r == "object") return r[Er.LENGTH];
|
|
9624
9624
|
}
|
|
9625
9625
|
function qs(r, e) {
|
|
@@ -9639,7 +9639,7 @@ function p0(r) {
|
|
|
9639
9639
|
function Vr(r) {
|
|
9640
9640
|
return r.reduce((e, t) => e + t.toString(16).padStart(2, "0"), "");
|
|
9641
9641
|
}
|
|
9642
|
-
function
|
|
9642
|
+
function Lv(r) {
|
|
9643
9643
|
const e = r.reduce((i, s) => i + s.length, 0), t = new Uint8Array(e);
|
|
9644
9644
|
let n = 0;
|
|
9645
9645
|
for (const i of r) t.set(i, n), n += i.length;
|
|
@@ -9649,12 +9649,12 @@ function bf(r) {
|
|
|
9649
9649
|
const e = atob(r);
|
|
9650
9650
|
return Uint8Array.from(e, (t) => t.codePointAt(0));
|
|
9651
9651
|
}
|
|
9652
|
-
const
|
|
9653
|
-
function
|
|
9654
|
-
const e = r.replace(/[_-]/g, (t) =>
|
|
9652
|
+
const Hv = { "-": "+", _: "/" };
|
|
9653
|
+
function Fv(r) {
|
|
9654
|
+
const e = r.replace(/[_-]/g, (t) => Hv[t]);
|
|
9655
9655
|
return bf(e.padEnd(Math.ceil(e.length / 4) * 4, "="));
|
|
9656
9656
|
}
|
|
9657
|
-
function
|
|
9657
|
+
function zv() {
|
|
9658
9658
|
const r = new Uint8Array(4), e = new Uint32Array(r.buffer);
|
|
9659
9659
|
return !((e[0] = 1) & r[0]);
|
|
9660
9660
|
}
|
|
@@ -9759,7 +9759,7 @@ function g0(r, e = 0, t = !1) {
|
|
|
9759
9759
|
} else if (i === 31) return s ? NaN : n * (1 / 0);
|
|
9760
9760
|
return n * 2 ** (i - 25) * (1024 + s);
|
|
9761
9761
|
}
|
|
9762
|
-
function
|
|
9762
|
+
function Gv(r) {
|
|
9763
9763
|
const e = new DataView(new ArrayBuffer(4));
|
|
9764
9764
|
e.setFloat32(0, r, !1);
|
|
9765
9765
|
const t = e.getUint32(0, !1);
|
|
@@ -9774,7 +9774,7 @@ function Hv(r) {
|
|
|
9774
9774
|
else return null;
|
|
9775
9775
|
return n;
|
|
9776
9776
|
}
|
|
9777
|
-
function
|
|
9777
|
+
function Kv(r) {
|
|
9778
9778
|
if (r !== 0) {
|
|
9779
9779
|
const e = new ArrayBuffer(8), t = new DataView(e);
|
|
9780
9780
|
t.setFloat64(0, r, !1);
|
|
@@ -9783,7 +9783,7 @@ function Fv(r) {
|
|
|
9783
9783
|
}
|
|
9784
9784
|
return r;
|
|
9785
9785
|
}
|
|
9786
|
-
function
|
|
9786
|
+
function Zv(r) {
|
|
9787
9787
|
switch (r.length) {
|
|
9788
9788
|
case 2:
|
|
9789
9789
|
g0(r, 0, !0);
|
|
@@ -9802,7 +9802,7 @@ function zv(r) {
|
|
|
9802
9802
|
throw new TypeError(`Bad input to isSubnormal: ${r}`);
|
|
9803
9803
|
}
|
|
9804
9804
|
}
|
|
9805
|
-
const ad = we.SIMPLE_FLOAT << 5 | mt.TWO,
|
|
9805
|
+
const ad = we.SIMPLE_FLOAT << 5 | mt.TWO, qv = we.SIMPLE_FLOAT << 5 | mt.FOUR, Wv = we.SIMPLE_FLOAT << 5 | mt.EIGHT, Yv = we.SIMPLE_FLOAT << 5 | Mn.TRUE, Jv = we.SIMPLE_FLOAT << 5 | Mn.FALSE, Xv = we.SIMPLE_FLOAT << 5 | Mn.UNDEFINED, Qv = we.SIMPLE_FLOAT << 5 | Mn.NULL, e1 = new TextEncoder(), t1 = { ...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 }, r1 = { ...v0, dcbor: !0, largeNegativeAsBigInt: !0, reduceUnsafeNumbers: !0, rejectCustomSimples: !0, rejectDuplicateKeys: !0, rejectUndefined: !0, simplifyNegativeZero: !0, stringNormalization: "NFC" };
|
|
9806
9806
|
function m0(r) {
|
|
9807
9807
|
const e = r < 0;
|
|
9808
9808
|
return typeof r == "bigint" ? [e ? -r - 1n : r, e] : [e ? -r - 1 : r, e];
|
|
@@ -9811,9 +9811,9 @@ function Xc(r, e, t) {
|
|
|
9811
9811
|
if (t.rejectFloats) throw new Error(`Attempt to encode an unwanted floating point number: ${r}`);
|
|
9812
9812
|
if (isNaN(r)) e.writeUint8(ad), e.writeUint16(32256);
|
|
9813
9813
|
else if (!t.float64 && Math.fround(r) === r) {
|
|
9814
|
-
const n =
|
|
9815
|
-
n === null ? (e.writeUint8(
|
|
9816
|
-
} else e.writeUint8(
|
|
9814
|
+
const n = Gv(r);
|
|
9815
|
+
n === null ? (e.writeUint8(qv), e.writeFloat32(r)) : (e.writeUint8(ad), e.writeUint16(n));
|
|
9816
|
+
} else e.writeUint8(Wv), e.writeFloat64(r);
|
|
9817
9817
|
}
|
|
9818
9818
|
function zr(r, e, t) {
|
|
9819
9819
|
const [n, i] = m0(r);
|
|
@@ -9842,34 +9842,34 @@ function w0(r, e, t) {
|
|
|
9842
9842
|
const u = p0(c + o);
|
|
9843
9843
|
zr(u.length, e, we.BYTE_STRING), e.write(u);
|
|
9844
9844
|
}
|
|
9845
|
-
function
|
|
9846
|
-
t.flushToZero && (r =
|
|
9845
|
+
function n1(r, e, t) {
|
|
9846
|
+
t.flushToZero && (r = Kv(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);
|
|
9847
9847
|
}
|
|
9848
|
-
function
|
|
9849
|
-
const n = t.stringNormalization ? r.normalize(t.stringNormalization) : r, i =
|
|
9848
|
+
function i1(r, e, t) {
|
|
9849
|
+
const n = t.stringNormalization ? r.normalize(t.stringNormalization) : r, i = e1.encode(n);
|
|
9850
9850
|
zr(i.length, e, we.UTF8_STRING), e.write(i);
|
|
9851
9851
|
}
|
|
9852
|
-
function
|
|
9852
|
+
function s1(r, e, t) {
|
|
9853
9853
|
const n = r;
|
|
9854
9854
|
xf(n, n.length, we.ARRAY, e, t);
|
|
9855
9855
|
for (const i of n) ii(i, e, t);
|
|
9856
9856
|
}
|
|
9857
|
-
function
|
|
9857
|
+
function o1(r, e) {
|
|
9858
9858
|
const t = r;
|
|
9859
9859
|
zr(t.length, e, we.BYTE_STRING), e.write(t);
|
|
9860
9860
|
}
|
|
9861
|
-
const _u = /* @__PURE__ */ new Map([[Array,
|
|
9861
|
+
const _u = /* @__PURE__ */ new Map([[Array, s1], [Uint8Array, o1]]);
|
|
9862
9862
|
function Pt(r, e) {
|
|
9863
9863
|
const t = _u.get(r);
|
|
9864
9864
|
return _u.set(r, e), t;
|
|
9865
9865
|
}
|
|
9866
9866
|
function xf(r, e, t, n, i) {
|
|
9867
|
-
const s =
|
|
9867
|
+
const s = Vv(r);
|
|
9868
9868
|
s && !i.ignoreOriginalEncoding ? n.write(s) : zr(e, n, t);
|
|
9869
9869
|
}
|
|
9870
|
-
function
|
|
9870
|
+
function a1(r, e, t) {
|
|
9871
9871
|
if (r === null) {
|
|
9872
|
-
e.writeUint8(
|
|
9872
|
+
e.writeUint8(Qv);
|
|
9873
9873
|
return;
|
|
9874
9874
|
}
|
|
9875
9875
|
if (!t.ignoreOriginalEncoding && Er.ENCODED in r) {
|
|
@@ -9898,23 +9898,23 @@ function i1(r, e, t) {
|
|
|
9898
9898
|
function ii(r, e, t) {
|
|
9899
9899
|
switch (typeof r) {
|
|
9900
9900
|
case "number":
|
|
9901
|
-
|
|
9901
|
+
n1(r, e, t);
|
|
9902
9902
|
break;
|
|
9903
9903
|
case "bigint":
|
|
9904
9904
|
w0(r, e, t);
|
|
9905
9905
|
break;
|
|
9906
9906
|
case "string":
|
|
9907
|
-
|
|
9907
|
+
i1(r, e, t);
|
|
9908
9908
|
break;
|
|
9909
9909
|
case "boolean":
|
|
9910
|
-
e.writeUint8(r ?
|
|
9910
|
+
e.writeUint8(r ? Yv : Jv);
|
|
9911
9911
|
break;
|
|
9912
9912
|
case "undefined":
|
|
9913
9913
|
if (t.rejectUndefined) throw new Error("Attempt to encode unwanted undefined.");
|
|
9914
|
-
e.writeUint8(
|
|
9914
|
+
e.writeUint8(Xv);
|
|
9915
9915
|
break;
|
|
9916
9916
|
case "object":
|
|
9917
|
-
|
|
9917
|
+
a1(r, e, t);
|
|
9918
9918
|
break;
|
|
9919
9919
|
case "symbol":
|
|
9920
9920
|
throw new TypeError(`Unknown symbol: ${r.toString()}`);
|
|
@@ -9923,8 +9923,8 @@ function ii(r, e, t) {
|
|
|
9923
9923
|
}
|
|
9924
9924
|
}
|
|
9925
9925
|
function Pc(r, e = {}) {
|
|
9926
|
-
const t = { ...
|
|
9927
|
-
e.dcbor ? Object.assign(t,
|
|
9926
|
+
const t = { ...t1 };
|
|
9927
|
+
e.dcbor ? Object.assign(t, r1) : e.cde && Object.assign(t, v0), Object.assign(t, e);
|
|
9928
9928
|
const n = new Ea(t);
|
|
9929
9929
|
return ii(r, n, t), n.read();
|
|
9930
9930
|
}
|
|
@@ -9953,7 +9953,7 @@ const Tn = class Tn {
|
|
|
9953
9953
|
};
|
|
9954
9954
|
Ve(Tn, "KnownSimple", /* @__PURE__ */ new Map([[Mn.FALSE, !1], [Mn.TRUE, !0], [Mn.NULL, null], [Mn.UNDEFINED, void 0]]));
|
|
9955
9955
|
let Ws = Tn;
|
|
9956
|
-
const
|
|
9956
|
+
const c1 = new TextDecoder("utf8", { fatal: !0, ignoreBOM: !0 });
|
|
9957
9957
|
var Ar, Dr, Zt, Ir, Wt, ei, Eu, Is;
|
|
9958
9958
|
const Va = class Va {
|
|
9959
9959
|
constructor(e, t) {
|
|
@@ -10036,7 +10036,7 @@ Ar = new WeakMap(), Dr = new WeakMap(), Zt = new WeakMap(), Ir = new WeakMap(),
|
|
|
10036
10036
|
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];
|
|
10037
10037
|
break;
|
|
10038
10038
|
case we.UTF8_STRING:
|
|
10039
|
-
o === 1 / 0 ? yield* Re(this, Wt, Is).call(this, i, e, t) : yield [i, s,
|
|
10039
|
+
o === 1 / 0 ? yield* Re(this, Wt, Is).call(this, i, e, t) : yield [i, s, c1.decode(Re(this, Wt, Eu).call(this, o)), t, o];
|
|
10040
10040
|
break;
|
|
10041
10041
|
case we.ARRAY:
|
|
10042
10042
|
if (o === 1 / 0) yield* Re(this, Wt, Is).call(this, i, e, t, !1);
|
|
@@ -10082,7 +10082,7 @@ Ar = new WeakMap(), Dr = new WeakMap(), Zt = new WeakMap(), Ir = new WeakMap(),
|
|
|
10082
10082
|
}
|
|
10083
10083
|
}, Ve(Va, "defaultOptions", { maxDepth: 1024, encoding: "hex", requirePreferred: !1 });
|
|
10084
10084
|
let Ys = Va;
|
|
10085
|
-
const
|
|
10085
|
+
const l1 = /* @__PURE__ */ new Map([[mt.ZERO, 1], [mt.ONE, 2], [mt.TWO, 3], [mt.FOUR, 5], [mt.EIGHT, 9]]), u1 = new Uint8Array(0);
|
|
10086
10086
|
var tn, ar, en, La, x0;
|
|
10087
10087
|
let Nn = (tn = class {
|
|
10088
10088
|
constructor(e, t, n, i) {
|
|
@@ -10123,10 +10123,10 @@ let Nn = (tn = class {
|
|
|
10123
10123
|
const h = i.toHere(u);
|
|
10124
10124
|
if (h.length !== 3 || h[1] !== 126 || h[2] !== 0) throw new Error(`Invalid NaN encoding: "${Vr(h)}"`);
|
|
10125
10125
|
}
|
|
10126
|
-
if (n.rejectSubnormals &&
|
|
10126
|
+
if (n.rejectSubnormals && Zv(i.toHere(u + 1)), n.rejectLongFloats) {
|
|
10127
10127
|
const h = Pc(c, { chunkSize: 9, reduceUnsafeNumbers: n.rejectUnsafeFloatInts });
|
|
10128
10128
|
if (h[0] >> 5 !== s) throw new Error(`Should have been encoded as int, not float: ${c}`);
|
|
10129
|
-
if (h.length <
|
|
10129
|
+
if (h.length < l1.get(o)) throw new Error(`Number should have been encoded shorter: ${c}`);
|
|
10130
10130
|
}
|
|
10131
10131
|
if (typeof c == "number" && n.boxed) return ks(c, i.toHere(u));
|
|
10132
10132
|
} else {
|
|
@@ -10194,7 +10194,7 @@ let Nn = (tn = class {
|
|
|
10194
10194
|
break;
|
|
10195
10195
|
}
|
|
10196
10196
|
case we.BYTE_STRING:
|
|
10197
|
-
return
|
|
10197
|
+
return Lv(this.children);
|
|
10198
10198
|
case we.UTF8_STRING: {
|
|
10199
10199
|
const n = this.children.join("");
|
|
10200
10200
|
t = $(this, ar).boxed ? ks(n, e.toHere(this.offset)) : n;
|
|
@@ -10213,7 +10213,7 @@ let Nn = (tn = class {
|
|
|
10213
10213
|
if (t % 2) throw new Error("Missing map value");
|
|
10214
10214
|
const n = new Array(t / 2);
|
|
10215
10215
|
if ($(this, en)) for (let i = 0; i < t; i += 2) n[i >> 1] = [e[i], e[i + 1], $(this, en)[i]];
|
|
10216
|
-
else for (let i = 0; i < t; i += 2) n[i >> 1] = [e[i], e[i + 1],
|
|
10216
|
+
else for (let i = 0; i < t; i += 2) n[i >> 1] = [e[i], e[i + 1], u1];
|
|
10217
10217
|
return n;
|
|
10218
10218
|
}, 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);
|
|
10219
10219
|
var yd, gd;
|
|
@@ -10311,9 +10311,9 @@ function S0(r, e, t) {
|
|
|
10311
10311
|
}
|
|
10312
10312
|
return n;
|
|
10313
10313
|
}
|
|
10314
|
-
const
|
|
10315
|
-
function
|
|
10316
|
-
const t = { ...
|
|
10314
|
+
const f1 = { ...Nn.defaultDecodeOptions, initialDepth: 0, noPrefixHex: !1, minCol: 0 };
|
|
10315
|
+
function h1(r, e) {
|
|
10316
|
+
const t = { ...f1, ...e, ParentType: ku, saveOriginal: !0 }, n = new Ys(r, t);
|
|
10317
10317
|
let i, s;
|
|
10318
10318
|
for (const c of n) {
|
|
10319
10319
|
if (s = Nn.create(c, i, t, n), c[2] === Er.BREAK) if (i != null && i.isStreaming) i.left = 1;
|
|
@@ -10331,7 +10331,7 @@ function l1(r, e) {
|
|
|
10331
10331
|
`;
|
|
10332
10332
|
return o += S0(s, t), o;
|
|
10333
10333
|
}
|
|
10334
|
-
const cd = !
|
|
10334
|
+
const cd = !zv();
|
|
10335
10335
|
function _0(r) {
|
|
10336
10336
|
if (typeof r == "object" && r) {
|
|
10337
10337
|
if (r.constructor !== Number) throw new Error(`Expected number: ${r}`);
|
|
@@ -10388,12 +10388,12 @@ el.comment = (r, e, t) => {
|
|
|
10388
10388
|
const o = i[s] & 31;
|
|
10389
10389
|
let c = Vr(i.subarray(s, ++s));
|
|
10390
10390
|
o >= 24 && (c += " ", c += Vr(i.subarray(s, s + 2 ** (o - 24)))), n.minCol = Math.max(n.minCol, (t + 1) * 2 + c.length);
|
|
10391
|
-
const u =
|
|
10391
|
+
const u = h1(r.contents, n);
|
|
10392
10392
|
let h = `Embedded CBOR
|
|
10393
10393
|
`;
|
|
10394
10394
|
return h += `${"".padStart((t + 1) * 2, " ")}${c}`.padEnd(n.minCol + 1, " "), h += `-- Bytes (Length: ${r.contents.length})
|
|
10395
10395
|
`, h += u, h;
|
|
10396
|
-
}, 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),
|
|
10396
|
+
}, 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), Fv(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) => {
|
|
10397
10397
|
jn(r.contents);
|
|
10398
10398
|
let e = r.contents.replace(new RegExp("(?<!\\\\)(?<!\\[(?:[^\\]]|\\\\\\])*)\\.", "g"), `[^
|
|
10399
10399
|
\r]`);
|
|
@@ -10556,7 +10556,7 @@ const se = it.arrayToEnum([
|
|
|
10556
10556
|
"invalid_intersection_types",
|
|
10557
10557
|
"not_multiple_of",
|
|
10558
10558
|
"not_finite"
|
|
10559
|
-
]),
|
|
10559
|
+
]), d1 = (r) => JSON.stringify(r, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
10560
10560
|
class _r extends Error {
|
|
10561
10561
|
constructor(e) {
|
|
10562
10562
|
super(), this.issues = [], this.addIssue = (n) => {
|
|
@@ -10674,7 +10674,7 @@ const Xi = (r, e) => {
|
|
|
10674
10674
|
return { message: t };
|
|
10675
10675
|
};
|
|
10676
10676
|
let k0 = Xi;
|
|
10677
|
-
function
|
|
10677
|
+
function p1(r) {
|
|
10678
10678
|
k0 = r;
|
|
10679
10679
|
}
|
|
10680
10680
|
function Ba() {
|
|
@@ -10700,7 +10700,7 @@ const Oa = (r) => {
|
|
|
10700
10700
|
path: s,
|
|
10701
10701
|
message: c
|
|
10702
10702
|
};
|
|
10703
|
-
},
|
|
10703
|
+
}, y1 = [];
|
|
10704
10704
|
function ee(r, e) {
|
|
10705
10705
|
const t = Ba(), n = Oa({
|
|
10706
10706
|
issueData: e,
|
|
@@ -10991,14 +10991,14 @@ class Ge {
|
|
|
10991
10991
|
return this.safeParse(null).success;
|
|
10992
10992
|
}
|
|
10993
10993
|
}
|
|
10994
|
-
const
|
|
10994
|
+
const g1 = /^c[^\s-]{8,}$/i, v1 = /^[0-9a-z]+$/, m1 = /^[0-9A-HJKMNP-TV-Z]{26}$/, w1 = /^[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, b1 = /^[a-z0-9_-]{21}$/i, x1 = /^[-+]?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)?)??$/, A1 = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, S1 = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
10995
10995
|
let rl;
|
|
10996
|
-
const
|
|
10996
|
+
const _1 = /^(?:(?: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])$/, E1 = /^(([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})))$/, k1 = /^([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])))", I1 = new RegExp(`^${C0}$`);
|
|
10997
10997
|
function B0(r) {
|
|
10998
10998
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
10999
10999
|
return r.precision ? e = `${e}\\.\\d{${r.precision}}` : r.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
11000
11000
|
}
|
|
11001
|
-
function
|
|
11001
|
+
function C1(r) {
|
|
11002
11002
|
return new RegExp(`^${B0(r)}$`);
|
|
11003
11003
|
}
|
|
11004
11004
|
function O0(r) {
|
|
@@ -11006,8 +11006,8 @@ function O0(r) {
|
|
|
11006
11006
|
const t = [];
|
|
11007
11007
|
return t.push(r.local ? "Z?" : "Z"), r.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
|
|
11008
11008
|
}
|
|
11009
|
-
function
|
|
11010
|
-
return !!((e === "v4" || !e) &&
|
|
11009
|
+
function B1(r, e) {
|
|
11010
|
+
return !!((e === "v4" || !e) && _1.test(r) || (e === "v6" || !e) && E1.test(r));
|
|
11011
11011
|
}
|
|
11012
11012
|
class Mr extends Ge {
|
|
11013
11013
|
_parse(e) {
|
|
@@ -11058,43 +11058,43 @@ class Mr extends Ge {
|
|
|
11058
11058
|
message: s.message
|
|
11059
11059
|
}), n.dirty());
|
|
11060
11060
|
} else if (s.kind === "email")
|
|
11061
|
-
|
|
11061
|
+
A1.test(e.data) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11062
11062
|
validation: "email",
|
|
11063
11063
|
code: F.invalid_string,
|
|
11064
11064
|
message: s.message
|
|
11065
11065
|
}), n.dirty());
|
|
11066
11066
|
else if (s.kind === "emoji")
|
|
11067
|
-
rl || (rl = new RegExp(
|
|
11067
|
+
rl || (rl = new RegExp(S1, "u")), rl.test(e.data) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11068
11068
|
validation: "emoji",
|
|
11069
11069
|
code: F.invalid_string,
|
|
11070
11070
|
message: s.message
|
|
11071
11071
|
}), n.dirty());
|
|
11072
11072
|
else if (s.kind === "uuid")
|
|
11073
|
-
|
|
11073
|
+
w1.test(e.data) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11074
11074
|
validation: "uuid",
|
|
11075
11075
|
code: F.invalid_string,
|
|
11076
11076
|
message: s.message
|
|
11077
11077
|
}), n.dirty());
|
|
11078
11078
|
else if (s.kind === "nanoid")
|
|
11079
|
-
|
|
11079
|
+
b1.test(e.data) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11080
11080
|
validation: "nanoid",
|
|
11081
11081
|
code: F.invalid_string,
|
|
11082
11082
|
message: s.message
|
|
11083
11083
|
}), n.dirty());
|
|
11084
11084
|
else if (s.kind === "cuid")
|
|
11085
|
-
|
|
11085
|
+
g1.test(e.data) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11086
11086
|
validation: "cuid",
|
|
11087
11087
|
code: F.invalid_string,
|
|
11088
11088
|
message: s.message
|
|
11089
11089
|
}), n.dirty());
|
|
11090
11090
|
else if (s.kind === "cuid2")
|
|
11091
|
-
|
|
11091
|
+
v1.test(e.data) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11092
11092
|
validation: "cuid2",
|
|
11093
11093
|
code: F.invalid_string,
|
|
11094
11094
|
message: s.message
|
|
11095
11095
|
}), n.dirty());
|
|
11096
11096
|
else if (s.kind === "ulid")
|
|
11097
|
-
|
|
11097
|
+
m1.test(e.data) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11098
11098
|
validation: "ulid",
|
|
11099
11099
|
code: F.invalid_string,
|
|
11100
11100
|
message: s.message
|
|
@@ -11129,23 +11129,23 @@ class Mr extends Ge {
|
|
|
11129
11129
|
code: F.invalid_string,
|
|
11130
11130
|
validation: "datetime",
|
|
11131
11131
|
message: s.message
|
|
11132
|
-
}), n.dirty()) : s.kind === "date" ?
|
|
11132
|
+
}), n.dirty()) : s.kind === "date" ? I1.test(e.data) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11133
11133
|
code: F.invalid_string,
|
|
11134
11134
|
validation: "date",
|
|
11135
11135
|
message: s.message
|
|
11136
|
-
}), n.dirty()) : s.kind === "time" ?
|
|
11136
|
+
}), n.dirty()) : s.kind === "time" ? C1(s).test(e.data) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11137
11137
|
code: F.invalid_string,
|
|
11138
11138
|
validation: "time",
|
|
11139
11139
|
message: s.message
|
|
11140
|
-
}), n.dirty()) : s.kind === "duration" ?
|
|
11140
|
+
}), n.dirty()) : s.kind === "duration" ? x1.test(e.data) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11141
11141
|
validation: "duration",
|
|
11142
11142
|
code: F.invalid_string,
|
|
11143
11143
|
message: s.message
|
|
11144
|
-
}), n.dirty()) : s.kind === "ip" ?
|
|
11144
|
+
}), n.dirty()) : s.kind === "ip" ? B1(e.data, s.version) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11145
11145
|
validation: "ip",
|
|
11146
11146
|
code: F.invalid_string,
|
|
11147
11147
|
message: s.message
|
|
11148
|
-
}), n.dirty()) : s.kind === "base64" ?
|
|
11148
|
+
}), n.dirty()) : s.kind === "base64" ? k1.test(e.data) || (i = this._getOrReturnCtx(e, i), ee(i, {
|
|
11149
11149
|
validation: "base64",
|
|
11150
11150
|
code: F.invalid_string,
|
|
11151
11151
|
message: s.message
|
|
@@ -11367,7 +11367,7 @@ Mr.create = (r) => {
|
|
|
11367
11367
|
...Le(r)
|
|
11368
11368
|
});
|
|
11369
11369
|
};
|
|
11370
|
-
function
|
|
11370
|
+
function O1(r, e) {
|
|
11371
11371
|
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(".", ""));
|
|
11372
11372
|
return s % o / Math.pow(10, i);
|
|
11373
11373
|
}
|
|
@@ -11406,7 +11406,7 @@ class Kn extends Ge {
|
|
|
11406
11406
|
inclusive: s.inclusive,
|
|
11407
11407
|
exact: !1,
|
|
11408
11408
|
message: s.message
|
|
11409
|
-
}), i.dirty()) : s.kind === "multipleOf" ?
|
|
11409
|
+
}), i.dirty()) : s.kind === "multipleOf" ? O1(e.data, s.value) !== 0 && (n = this._getOrReturnCtx(e, n), ee(n, {
|
|
11410
11410
|
code: F.not_multiple_of,
|
|
11411
11411
|
multipleOf: s.value,
|
|
11412
11412
|
message: s.message
|
|
@@ -12700,11 +12700,11 @@ class $i extends Ge {
|
|
|
12700
12700
|
if (this._def.returns instanceof es) {
|
|
12701
12701
|
const c = this;
|
|
12702
12702
|
return ur(async function(...u) {
|
|
12703
|
-
const h = new _r([]), m = await c._def.args.parseAsync(u, s).catch((
|
|
12704
|
-
throw h.addIssue(n(u,
|
|
12703
|
+
const h = new _r([]), m = await c._def.args.parseAsync(u, s).catch((N) => {
|
|
12704
|
+
throw h.addIssue(n(u, N)), h;
|
|
12705
12705
|
}), x = await Reflect.apply(o, this, m);
|
|
12706
|
-
return await c._def.returns._def.type.parseAsync(x, s).catch((
|
|
12707
|
-
throw h.addIssue(i(x,
|
|
12706
|
+
return await c._def.returns._def.type.parseAsync(x, s).catch((N) => {
|
|
12707
|
+
throw h.addIssue(i(x, N)), h;
|
|
12708
12708
|
});
|
|
12709
12709
|
});
|
|
12710
12710
|
} else {
|
|
@@ -13107,7 +13107,7 @@ Ra.create = (r) => new Ra({
|
|
|
13107
13107
|
typeName: ke.ZodNaN,
|
|
13108
13108
|
...Le(r)
|
|
13109
13109
|
});
|
|
13110
|
-
const
|
|
13110
|
+
const T1 = Symbol("zod_brand");
|
|
13111
13111
|
class Af extends Ge {
|
|
13112
13112
|
_parse(e) {
|
|
13113
13113
|
const { ctx: t } = this._processInputParams(e), n = t.data;
|
|
@@ -13184,16 +13184,16 @@ function N0(r, e = {}, t) {
|
|
|
13184
13184
|
}
|
|
13185
13185
|
}) : Qi.create();
|
|
13186
13186
|
}
|
|
13187
|
-
const
|
|
13187
|
+
const N1 = {
|
|
13188
13188
|
object: Ct.lazycreate
|
|
13189
13189
|
};
|
|
13190
13190
|
var ke;
|
|
13191
13191
|
(function(r) {
|
|
13192
13192
|
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";
|
|
13193
13193
|
})(ke || (ke = {}));
|
|
13194
|
-
const
|
|
13194
|
+
const j1 = (r, e = {
|
|
13195
13195
|
message: `Input not instance of ${r.name}`
|
|
13196
|
-
}) => N0((t) => t instanceof r, e), j0 = Mr.create, P0 = Kn.create,
|
|
13196
|
+
}) => N0((t) => t instanceof r, e), j0 = Mr.create, P0 = Kn.create, P1 = Ra.create, R1 = Zn.create, R0 = Qs.create, U1 = xi.create, D1 = Na.create, $1 = eo.create, M1 = to.create, V1 = Qi.create, L1 = ai.create, H1 = En.create, F1 = ja.create, z1 = Lr.create, G1 = Ct.create, K1 = Ct.strictCreate, Z1 = ro.create, q1 = Rc.create, W1 = no.create, Y1 = un.create, J1 = io.create, X1 = Pa.create, Q1 = Ai.create, em = $i.create, tm = so.create, rm = oo.create, nm = qn.create, im = ao.create, sm = es.create, pd = Gr.create, om = on.create, am = Wn.create, cm = Gr.createWithPreprocess, lm = Io.create, um = () => j0().optional(), fm = () => P0().optional(), hm = () => R0().optional(), dm = {
|
|
13197
13197
|
string: (r) => Mr.create({ ...r, coerce: !0 }),
|
|
13198
13198
|
number: (r) => Kn.create({ ...r, coerce: !0 }),
|
|
13199
13199
|
boolean: (r) => Qs.create({
|
|
@@ -13202,14 +13202,14 @@ const O1 = (r, e = {
|
|
|
13202
13202
|
}),
|
|
13203
13203
|
bigint: (r) => Zn.create({ ...r, coerce: !0 }),
|
|
13204
13204
|
date: (r) => xi.create({ ...r, coerce: !0 })
|
|
13205
|
-
},
|
|
13205
|
+
}, pm = Ie;
|
|
13206
13206
|
var It = /* @__PURE__ */ Object.freeze({
|
|
13207
13207
|
__proto__: null,
|
|
13208
13208
|
defaultErrorMap: Xi,
|
|
13209
|
-
setErrorMap:
|
|
13209
|
+
setErrorMap: p1,
|
|
13210
13210
|
getErrorMap: Ba,
|
|
13211
13211
|
makeIssue: Oa,
|
|
13212
|
-
EMPTY_PATH:
|
|
13212
|
+
EMPTY_PATH: y1,
|
|
13213
13213
|
addIssueToContext: ee,
|
|
13214
13214
|
ParseStatus: sr,
|
|
13215
13215
|
INVALID: Ie,
|
|
@@ -13263,66 +13263,66 @@ var It = /* @__PURE__ */ Object.freeze({
|
|
|
13263
13263
|
ZodDefault: co,
|
|
13264
13264
|
ZodCatch: lo,
|
|
13265
13265
|
ZodNaN: Ra,
|
|
13266
|
-
BRAND:
|
|
13266
|
+
BRAND: T1,
|
|
13267
13267
|
ZodBranded: Af,
|
|
13268
13268
|
ZodPipeline: Io,
|
|
13269
13269
|
ZodReadonly: uo,
|
|
13270
13270
|
custom: N0,
|
|
13271
13271
|
Schema: Ge,
|
|
13272
13272
|
ZodSchema: Ge,
|
|
13273
|
-
late:
|
|
13273
|
+
late: N1,
|
|
13274
13274
|
get ZodFirstPartyTypeKind() {
|
|
13275
13275
|
return ke;
|
|
13276
13276
|
},
|
|
13277
|
-
coerce:
|
|
13278
|
-
any:
|
|
13279
|
-
array:
|
|
13280
|
-
bigint:
|
|
13277
|
+
coerce: dm,
|
|
13278
|
+
any: V1,
|
|
13279
|
+
array: z1,
|
|
13280
|
+
bigint: R1,
|
|
13281
13281
|
boolean: R0,
|
|
13282
|
-
date:
|
|
13283
|
-
discriminatedUnion:
|
|
13282
|
+
date: U1,
|
|
13283
|
+
discriminatedUnion: q1,
|
|
13284
13284
|
effect: pd,
|
|
13285
|
-
enum:
|
|
13286
|
-
function:
|
|
13287
|
-
instanceof:
|
|
13288
|
-
intersection:
|
|
13289
|
-
lazy:
|
|
13290
|
-
literal:
|
|
13291
|
-
map:
|
|
13292
|
-
nan:
|
|
13293
|
-
nativeEnum:
|
|
13294
|
-
never:
|
|
13295
|
-
null:
|
|
13296
|
-
nullable:
|
|
13285
|
+
enum: nm,
|
|
13286
|
+
function: em,
|
|
13287
|
+
instanceof: j1,
|
|
13288
|
+
intersection: W1,
|
|
13289
|
+
lazy: tm,
|
|
13290
|
+
literal: rm,
|
|
13291
|
+
map: X1,
|
|
13292
|
+
nan: P1,
|
|
13293
|
+
nativeEnum: im,
|
|
13294
|
+
never: H1,
|
|
13295
|
+
null: M1,
|
|
13296
|
+
nullable: am,
|
|
13297
13297
|
number: P0,
|
|
13298
|
-
object:
|
|
13299
|
-
oboolean:
|
|
13300
|
-
onumber:
|
|
13301
|
-
optional:
|
|
13302
|
-
ostring:
|
|
13303
|
-
pipeline:
|
|
13304
|
-
preprocess:
|
|
13305
|
-
promise:
|
|
13306
|
-
record:
|
|
13307
|
-
set:
|
|
13308
|
-
strictObject:
|
|
13298
|
+
object: G1,
|
|
13299
|
+
oboolean: hm,
|
|
13300
|
+
onumber: fm,
|
|
13301
|
+
optional: om,
|
|
13302
|
+
ostring: um,
|
|
13303
|
+
pipeline: lm,
|
|
13304
|
+
preprocess: cm,
|
|
13305
|
+
promise: sm,
|
|
13306
|
+
record: J1,
|
|
13307
|
+
set: Q1,
|
|
13308
|
+
strictObject: K1,
|
|
13309
13309
|
string: j0,
|
|
13310
|
-
symbol:
|
|
13310
|
+
symbol: D1,
|
|
13311
13311
|
transformer: pd,
|
|
13312
|
-
tuple:
|
|
13313
|
-
undefined:
|
|
13314
|
-
union:
|
|
13315
|
-
unknown:
|
|
13316
|
-
void:
|
|
13317
|
-
NEVER:
|
|
13312
|
+
tuple: Y1,
|
|
13313
|
+
undefined: $1,
|
|
13314
|
+
union: Z1,
|
|
13315
|
+
unknown: L1,
|
|
13316
|
+
void: F1,
|
|
13317
|
+
NEVER: pm,
|
|
13318
13318
|
ZodIssueCode: F,
|
|
13319
|
-
quotelessJson:
|
|
13319
|
+
quotelessJson: d1,
|
|
13320
13320
|
ZodError: _r
|
|
13321
13321
|
});
|
|
13322
13322
|
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]);
|
|
13323
13323
|
if (!Ua || Ua.length === 0)
|
|
13324
13324
|
throw new Error("AWS root certificate is empty or not loaded correctly");
|
|
13325
|
-
const
|
|
13325
|
+
const ym = It.object({
|
|
13326
13326
|
module_id: It.string().min(1),
|
|
13327
13327
|
digest: It.literal("SHA384"),
|
|
13328
13328
|
timestamp: It.number().min(1677721600),
|
|
@@ -13332,18 +13332,18 @@ const hm = It.object({
|
|
|
13332
13332
|
public_key: It.nullable(It.instanceof(Uint8Array)),
|
|
13333
13333
|
user_data: It.nullable(It.instanceof(Uint8Array)),
|
|
13334
13334
|
nonce: It.nullable(It.instanceof(Uint8Array))
|
|
13335
|
-
}),
|
|
13335
|
+
}), gm = It.object({
|
|
13336
13336
|
protected: It.instanceof(Uint8Array),
|
|
13337
13337
|
// There's an "unprotected" header in the CBOR, but we never use it
|
|
13338
13338
|
payload: It.instanceof(Uint8Array),
|
|
13339
13339
|
signature: It.instanceof(Uint8Array)
|
|
13340
13340
|
});
|
|
13341
|
-
async function
|
|
13341
|
+
async function vm(r) {
|
|
13342
13342
|
try {
|
|
13343
13343
|
if (!r)
|
|
13344
13344
|
throw new Error("Attestation document is empty.");
|
|
13345
13345
|
const e = Rs(r), t = Ca(e), n = t[0], i = t[2], s = t[3];
|
|
13346
|
-
return
|
|
13346
|
+
return gm.parse({
|
|
13347
13347
|
protected: n,
|
|
13348
13348
|
payload: i,
|
|
13349
13349
|
signature: s
|
|
@@ -13352,15 +13352,15 @@ async function pm(r) {
|
|
|
13352
13352
|
throw console.error("Error parsing document data:", e), new Error("Failed to parse document data.");
|
|
13353
13353
|
}
|
|
13354
13354
|
}
|
|
13355
|
-
async function
|
|
13355
|
+
async function mm(r) {
|
|
13356
13356
|
try {
|
|
13357
13357
|
const e = Ca(r);
|
|
13358
|
-
return
|
|
13358
|
+
return ym.parse(e);
|
|
13359
13359
|
} catch (e) {
|
|
13360
13360
|
throw console.error("Error parsing document payload:", e), new Error("Failed to parse document payload.");
|
|
13361
13361
|
}
|
|
13362
13362
|
}
|
|
13363
|
-
function
|
|
13363
|
+
function wm(r, e) {
|
|
13364
13364
|
const t = [
|
|
13365
13365
|
"Signature1",
|
|
13366
13366
|
// Context string
|
|
@@ -13373,10 +13373,10 @@ function gm(r, e) {
|
|
|
13373
13373
|
];
|
|
13374
13374
|
return Pc(t);
|
|
13375
13375
|
}
|
|
13376
|
-
async function
|
|
13376
|
+
async function bm(r, e) {
|
|
13377
13377
|
try {
|
|
13378
13378
|
console.log("SIGNATURE:"), console.log($r(r.signature));
|
|
13379
|
-
const t =
|
|
13379
|
+
const t = wm(r.protected, r.payload), n = await crypto.subtle.digest("SHA-384", t);
|
|
13380
13380
|
return console.log("SIGNATURE STRUCTURE DIGEST:"), console.log($r(new Uint8Array(n))), await crypto.subtle.verify(
|
|
13381
13381
|
// TODO: these could be derived from the document, but we're hardcoding them for now
|
|
13382
13382
|
{
|
|
@@ -13393,7 +13393,7 @@ async function vm(r, e) {
|
|
|
13393
13393
|
}
|
|
13394
13394
|
async function Si(r, e, t) {
|
|
13395
13395
|
try {
|
|
13396
|
-
const n = await
|
|
13396
|
+
const n = await vm(r), i = await mm(n.payload);
|
|
13397
13397
|
if (!i.nonce)
|
|
13398
13398
|
throw new Error("Attestation document does not have a nonce.");
|
|
13399
13399
|
const o = new TextDecoder("utf-8").decode(i.nonce);
|
|
@@ -13406,14 +13406,14 @@ async function Si(r, e, t) {
|
|
|
13406
13406
|
const j = new wi(i.cabundle[k]);
|
|
13407
13407
|
c.push(j);
|
|
13408
13408
|
}
|
|
13409
|
-
const h = new wi(i.certificate), x = await new
|
|
13409
|
+
const h = new wi(i.certificate), x = await new Mv({
|
|
13410
13410
|
certificates: c
|
|
13411
13411
|
}).build(h);
|
|
13412
13412
|
console.log("Chain items:", x);
|
|
13413
|
-
const
|
|
13413
|
+
const N = (/* @__PURE__ */ new Date()).getTime();
|
|
13414
13414
|
for (let k = 0; k < x.length; k++) {
|
|
13415
13415
|
const j = x[k];
|
|
13416
|
-
if (console.log("CERT: ", k), console.log(j.subject), console.log("Not before:", j.notBefore), console.log("Not after:", j.notAfter), console.log(j.toString("pem")), j.notBefore.getTime() >
|
|
13416
|
+
if (console.log("CERT: ", k), console.log(j.subject), console.log("Not before:", j.notBefore), console.log("Not after:", j.notAfter), console.log(j.toString("pem")), j.notBefore.getTime() > N || j.notAfter.getTime() < N)
|
|
13417
13417
|
throw new Error("Certificate is expired.");
|
|
13418
13418
|
console.log(`Certificate ${k} is not expired.`);
|
|
13419
13419
|
}
|
|
@@ -13421,7 +13421,7 @@ async function Si(r, e, t) {
|
|
|
13421
13421
|
throw new Error("Certificate chain length does not match length of cabundle.");
|
|
13422
13422
|
const v = h.publicKey;
|
|
13423
13423
|
console.log("PUBLIC KEY:"), console.log($r(new Uint8Array(v.rawData)));
|
|
13424
|
-
const A = await v.export(), O = await
|
|
13424
|
+
const A = await v.export(), O = await bm(n, A);
|
|
13425
13425
|
if (console.log("Signature verified:", O), !O)
|
|
13426
13426
|
throw new Error("Signature verification failed.");
|
|
13427
13427
|
return i;
|
|
@@ -13429,29 +13429,29 @@ async function Si(r, e, t) {
|
|
|
13429
13429
|
throw console.error("Error verifying attestation document:", n), n;
|
|
13430
13430
|
}
|
|
13431
13431
|
}
|
|
13432
|
-
const
|
|
13432
|
+
const xm = It.object({
|
|
13433
13433
|
public_key: It.nullable(It.instanceof(Uint8Array))
|
|
13434
13434
|
});
|
|
13435
|
-
async function
|
|
13435
|
+
async function Am(r) {
|
|
13436
13436
|
const e = Rs(r), n = Ca(e)[2], i = Ca(n);
|
|
13437
|
-
return await
|
|
13437
|
+
return await xm.parse(i);
|
|
13438
13438
|
}
|
|
13439
|
-
async function
|
|
13439
|
+
async function Sm(r, e) {
|
|
13440
13440
|
try {
|
|
13441
|
-
const t = await
|
|
13442
|
-
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
|
|
13441
|
+
const t = await Gm(r, e), n = e || $m();
|
|
13442
|
+
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 Am(t)) : await Si(t, Ua, r);
|
|
13443
13443
|
} catch (t) {
|
|
13444
13444
|
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."));
|
|
13445
13445
|
}
|
|
13446
13446
|
}
|
|
13447
|
-
function
|
|
13447
|
+
function _m(r) {
|
|
13448
13448
|
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.');
|
|
13449
13449
|
}
|
|
13450
13450
|
var U0 = { exports: {} };
|
|
13451
|
-
const
|
|
13451
|
+
const Em = {}, km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
13452
13452
|
__proto__: null,
|
|
13453
|
-
default:
|
|
13454
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
13453
|
+
default: Em
|
|
13454
|
+
}, Symbol.toStringTag, { value: "Module" })), Im = /* @__PURE__ */ zy(km);
|
|
13455
13455
|
(function(r) {
|
|
13456
13456
|
(function(e) {
|
|
13457
13457
|
var t = function(l) {
|
|
@@ -13462,7 +13462,7 @@ const Am = {}, Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13462
13462
|
throw new Error("no PRNG");
|
|
13463
13463
|
}, i = new Uint8Array(16), s = new Uint8Array(32);
|
|
13464
13464
|
s[0] = 9;
|
|
13465
|
-
var o = t(), c = t([1]), u = t([56129, 1]), h = t([30883, 4953, 19914, 30187, 55467, 16705, 2637, 112, 59544, 30585, 16505, 36039, 65139, 11119, 27886, 20995]), m = t([61785, 9906, 39828, 60374, 45398, 33411, 5274, 224, 53552, 61171, 33010, 6542, 64743, 22239, 55772, 9222]), x = t([54554, 36645, 11616, 51542, 42930, 38181, 51040, 26924, 56412, 64982, 57905, 49316, 21502, 52590, 14035, 8553]), G = t([26200, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214]),
|
|
13465
|
+
var o = t(), c = t([1]), u = t([56129, 1]), h = t([30883, 4953, 19914, 30187, 55467, 16705, 2637, 112, 59544, 30585, 16505, 36039, 65139, 11119, 27886, 20995]), m = t([61785, 9906, 39828, 60374, 45398, 33411, 5274, 224, 53552, 61171, 33010, 6542, 64743, 22239, 55772, 9222]), x = t([54554, 36645, 11616, 51542, 42930, 38181, 51040, 26924, 56412, 64982, 57905, 49316, 21502, 52590, 14035, 8553]), G = t([26200, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214]), N = t([41136, 18958, 6951, 50414, 58488, 44335, 6150, 12099, 55207, 15867, 153, 11085, 57099, 20417, 9344, 11139]);
|
|
13466
13466
|
function v(l, p, d, a) {
|
|
13467
13467
|
l[p] = d >> 24 & 255, l[p + 1] = d >> 16 & 255, l[p + 2] = d >> 8 & 255, l[p + 3] = d & 255, l[p + 4] = a >> 24 & 255, l[p + 5] = a >> 16 & 255, l[p + 6] = a >> 8 & 255, l[p + 7] = a & 255;
|
|
13468
13468
|
}
|
|
@@ -13478,12 +13478,12 @@ const Am = {}, Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13478
13478
|
return A(l, p, d, a, 32);
|
|
13479
13479
|
}
|
|
13480
13480
|
function j(l, p, d, a) {
|
|
13481
|
-
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,
|
|
13481
|
+
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, ot = 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 = ot, V = ue, P = Ce, D = Be, L = De, _e = Pe, $e = Oe, He = Ne, Me = Te, w, Ke = 0; Ke < 20; Ke += 2)
|
|
13482
13482
|
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;
|
|
13483
|
-
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 +
|
|
13483
|
+
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 + ot | 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;
|
|
13484
13484
|
}
|
|
13485
13485
|
function R(l, p, d, a) {
|
|
13486
|
-
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,
|
|
13486
|
+
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, ot = 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 = ot, V = ue, P = Ce, D = Be, L = De, _e = Pe, $e = Oe, He = Ne, Me = Te, w, Ke = 0; Ke < 20; Ke += 2)
|
|
13487
13487
|
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;
|
|
13488
13488
|
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;
|
|
13489
13489
|
}
|
|
@@ -13528,7 +13528,7 @@ const Am = {}, Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13528
13528
|
for (var E = new Uint8Array(8), U = 0; U < 8; U++) E[U] = a[U + 16];
|
|
13529
13529
|
return ye(l, p, d, E, S);
|
|
13530
13530
|
}
|
|
13531
|
-
function
|
|
13531
|
+
function lt(l, p, d, a, g, S, E) {
|
|
13532
13532
|
var U = new Uint8Array(32);
|
|
13533
13533
|
X(U, S, E, re);
|
|
13534
13534
|
for (var z = new Uint8Array(8), be = 0; be < 8; be++) z[be] = S[be + 16];
|
|
@@ -13540,8 +13540,8 @@ const Am = {}, Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13540
13540
|
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;
|
|
13541
13541
|
};
|
|
13542
13542
|
St.prototype.blocks = function(l, p, d) {
|
|
13543
|
-
for (var a = this.fin ? 0 : 2048, g, S, E, U, z, be, Q,
|
|
13544
|
-
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,
|
|
13543
|
+
for (var a = this.fin ? 0 : 2048, g, S, E, U, z, be, Q, ot, 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], Ke = this.r[4], at = this.r[5], ct = this.r[6], ze = this.r[7], rt = this.r[8], nt = this.r[9]; d >= 16; )
|
|
13544
|
+
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, ot = l[p + 14] & 255 | (l[p + 15] & 255) << 8, L += (Q >>> 8 | ot << 8) & 8191, _e += ot >>> 5 | a, ue = 0, Ce = ue, Ce += ge * $e, Ce += me * (5 * nt), Ce += J * (5 * rt), Ce += C * (5 * ze), Ce += B * (5 * ct), ue = Ce >>> 13, Ce &= 8191, Ce += V * (5 * at), Ce += P * (5 * Ke), 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 * ze), ue = Be >>> 13, Be &= 8191, Be += V * (5 * ct), Be += P * (5 * at), Be += D * (5 * Ke), 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 * ze), De += P * (5 * ct), De += D * (5 * at), De += L * (5 * Ke), 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 * ze), Pe += D * (5 * ct), Pe += L * (5 * at), Pe += _e * (5 * Ke), ue += Pe >>> 13, Pe &= 8191, Oe = ue, Oe += ge * Ke, 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 * ze), Oe += L * (5 * ct), Oe += _e * (5 * at), ue += Oe >>> 13, Oe &= 8191, Ne = ue, Ne += ge * at, Ne += me * Ke, 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 * ze), Ne += _e * (5 * ct), ue += Ne >>> 13, Ne &= 8191, Te = ue, Te += ge * ct, Te += me * at, Te += J * Ke, 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 * ze), ue += Te >>> 13, Te &= 8191, pe = ue, pe += ge * ze, pe += me * ct, pe += J * at, pe += C * Ke, 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 * ze, Ae += J * ct, Ae += C * at, Ae += B * Ke, 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 * ze, ie += C * ct, ie += B * at, ue = ie >>> 13, ie &= 8191, ie += V * Ke, 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;
|
|
13545
13545
|
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;
|
|
13546
13546
|
}, St.prototype.finish = function(l, p) {
|
|
13547
13547
|
var d = new Uint16Array(10), a, g, S, E;
|
|
@@ -13584,13 +13584,13 @@ const Am = {}, Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13584
13584
|
function _t(l, p, d, a, g) {
|
|
13585
13585
|
var S;
|
|
13586
13586
|
if (d < 32) return -1;
|
|
13587
|
-
for (
|
|
13587
|
+
for (lt(l, 0, p, 0, d, a, g), Bt(l, 16, l, 32, d - 32, l), S = 0; S < 16; S++) l[S] = 0;
|
|
13588
13588
|
return 0;
|
|
13589
13589
|
}
|
|
13590
|
-
function
|
|
13590
|
+
function ut(l, p, d, a, g) {
|
|
13591
13591
|
var S, E = new Uint8Array(32);
|
|
13592
13592
|
if (d < 32 || (Fe(E, 0, 32, a, g), Ot(p, 16, p, 32, d - 32, E) !== 0)) return -1;
|
|
13593
|
-
for (
|
|
13593
|
+
for (lt(l, 0, p, 0, d, a, g), S = 0; S < 32; S++) l[S] = 0;
|
|
13594
13594
|
return 0;
|
|
13595
13595
|
}
|
|
13596
13596
|
function Ye(l, p) {
|
|
@@ -13638,8 +13638,8 @@ const Am = {}, Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13638
13638
|
for (var a = 0; a < 16; a++) l[a] = p[a] - d[a];
|
|
13639
13639
|
}
|
|
13640
13640
|
function te(l, p, d) {
|
|
13641
|
-
var a, g, S = 0, E = 0, U = 0, z = 0, be = 0, Q = 0,
|
|
13642
|
-
a = p[0], S += a * w, E += a * Ke, U += a *
|
|
13641
|
+
var a, g, S = 0, E = 0, U = 0, z = 0, be = 0, Q = 0, ot = 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], Ke = d[1], at = d[2], ct = d[3], ze = 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];
|
|
13642
|
+
a = p[0], S += a * w, E += a * Ke, U += a * at, z += a * ct, be += a * ze, Q += a * rt, ot += 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 * Ke, z += a * at, be += a * ct, Q += a * ze, ot += 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 * Ke, be += a * at, Q += a * ct, ot += a * ze, 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 * Ke, Q += a * at, ot += a * ct, ue += a * ze, 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 * Ke, ot += a * at, ue += a * ct, Ce += a * ze, 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, ot += a * Ke, ue += a * at, Ce += a * ct, Be += a * ze, 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], ot += a * w, ue += a * Ke, Ce += a * at, Be += a * ct, De += a * ze, 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 * Ke, Be += a * at, De += a * ct, Pe += a * ze, 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 * Ke, De += a * at, Pe += a * ct, Oe += a * ze, 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 * Ke, Pe += a * at, Oe += a * ct, Ne += a * ze, 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 * Ke, Oe += a * at, Ne += a * ct, Te += a * ze, 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 * Ke, Ne += a * at, Te += a * ct, pe += a * ze, 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 * Ke, Te += a * at, pe += a * ct, Ae += a * ze, 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 * Ke, pe += a * at, Ae += a * ct, ie += a * ze, 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 * Ke, Ae += a * at, ie += a * ct, ge += a * ze, 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 * Ke, ie += a * at, ge += a * ct, me += a * ze, 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, ot += 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 = ot + g + 65535, g = Math.floor(a / 65536), ot = 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 = ot + g + 65535, g = Math.floor(a / 65536), ot = 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] = ot, 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;
|
|
13643
13643
|
}
|
|
13644
13644
|
function ht(l, p) {
|
|
13645
13645
|
te(l, p, p);
|
|
@@ -13659,12 +13659,12 @@ const Am = {}, Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13659
13659
|
for (a = 0; a < 16; a++) l[a] = d[a];
|
|
13660
13660
|
}
|
|
13661
13661
|
function Ci(l, p, d) {
|
|
13662
|
-
var a = new Uint8Array(32), g = new Float64Array(80), S, E, U = t(), z = t(), be = t(), Q = t(),
|
|
13662
|
+
var a = new Uint8Array(32), g = new Float64Array(80), S, E, U = t(), z = t(), be = t(), Q = t(), ot = t(), ue = t();
|
|
13663
13663
|
for (E = 0; E < 31; E++) a[E] = p[E];
|
|
13664
13664
|
for (a[31] = p[31] & 127 | 64, a[0] &= 248, fe(g, d), E = 0; E < 16; E++)
|
|
13665
13665
|
z[E] = g[E], Q[E] = U[E] = be[E] = 0;
|
|
13666
13666
|
for (U[0] = Q[0] = 1, E = 254; E >= 0; --E)
|
|
13667
|
-
S = a[E >>> 3] >>> (E & 7) & 1, Ee(U, z, S), Ee(be, Q, S), tt(
|
|
13667
|
+
S = a[E >>> 3] >>> (E & 7) & 1, Ee(U, z, S), Ee(be, Q, S), tt(ot, U, be), yt(U, U, be), tt(be, z, Q), yt(z, z, Q), ht(Q, ot), ht(ue, U), te(U, be, U), te(be, z, ot), tt(ot, 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, ot), Ee(U, z, S), Ee(be, Q, S);
|
|
13668
13668
|
for (E = 0; E < 16; E++)
|
|
13669
13669
|
g[E + 16] = U[E], g[E + 32] = be[E], g[E + 48] = z[E], g[E + 64] = Q[E];
|
|
13670
13670
|
var Ce = g.subarray(32), Be = g.subarray(16);
|
|
@@ -13680,7 +13680,7 @@ const Am = {}, Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13680
13680
|
var a = new Uint8Array(32);
|
|
13681
13681
|
return Ci(a, d, p), X(l, i, a, re);
|
|
13682
13682
|
}
|
|
13683
|
-
var ds = _t, $c =
|
|
13683
|
+
var ds = _t, $c = ut;
|
|
13684
13684
|
function ps(l, p, d, a, g, S) {
|
|
13685
13685
|
var E = new Uint8Array(32);
|
|
13686
13686
|
return pn(E, g, S), ds(l, p, d, a, E);
|
|
@@ -13852,14 +13852,14 @@ const Am = {}, Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13852
13852
|
1246189591
|
|
13853
13853
|
];
|
|
13854
13854
|
function gs(l, p, d, a) {
|
|
13855
|
-
for (var g = new Int32Array(16), S = new Int32Array(16), E, U, z, be, Q,
|
|
13855
|
+
for (var g = new Int32Array(16), S = new Int32Array(16), E, U, z, be, Q, ot, 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], Ke = l[5], at = l[6], ct = l[7], ze = 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; ) {
|
|
13856
13856
|
for (me = 0; me < 16; me++)
|
|
13857
|
-
J = 8 * me +
|
|
13857
|
+
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];
|
|
13858
13858
|
for (me = 0; me < 80; me++)
|
|
13859
|
-
if (E = _e, U = $e, z = He, be = Me, Q = w,
|
|
13859
|
+
if (E = _e, U = $e, z = He, be = Me, Q = w, ot = Ke, ue = at, Ce = ct, Be = ze, De = rt, Pe = nt, Oe = Dt, Ne = vt, Te = Tt, pe = Nt, Ae = jt, C = ct, 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 & Ke ^ ~w & at, 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 | ze << 4) ^ (ze >>> 2 | _e << 30) ^ (ze >>> 7 | _e << 25), B = (ze >>> 28 | _e << 4) ^ (_e >>> 2 | ze << 30) ^ (_e >>> 7 | ze << 25), V += B & 65535, P += B >>> 16, D += C & 65535, L += C >>> 16, C = _e & $e ^ _e & He ^ $e & He, B = ze & rt ^ ze & 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, Ke = Q, at = ot, ct = ue, _e = Ce, rt = Be, nt = De, Dt = Pe, vt = Oe, Tt = Ne, Nt = Te, jt = pe, ze = Ae, me % 16 === 15)
|
|
13860
13860
|
for (J = 0; J < 16; J++)
|
|
13861
13861
|
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;
|
|
13862
|
-
C = _e, B = ze, 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] = ze = 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 = Ke, 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] = Ke = D & 65535 | L << 16, p[5] = Tt = V & 65535 | P << 16, C =
|
|
13862
|
+
C = _e, B = ze, 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] = ze = 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 = Ke, 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] = Ke = D & 65535 | L << 16, p[5] = Tt = V & 65535 | P << 16, C = at, 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] = at = D & 65535 | L << 16, p[6] = Nt = V & 65535 | P << 16, C = ct, 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] = ct = D & 65535 | L << 16, p[7] = jt = V & 65535 | P << 16, Lt += 128, a -= 128;
|
|
13863
13863
|
}
|
|
13864
13864
|
return a;
|
|
13865
13865
|
}
|
|
@@ -13919,7 +13919,7 @@ const Am = {}, Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13919
13919
|
function Bo(l, p, d, a) {
|
|
13920
13920
|
var g = new Uint8Array(64), S = new Uint8Array(64), E = new Uint8Array(64), U, z, be = new Float64Array(64), Q = [t(), t(), t(), t()];
|
|
13921
13921
|
qr(g, a, 32), g[0] &= 248, g[31] &= 127, g[31] |= 64;
|
|
13922
|
-
var
|
|
13922
|
+
var ot = d + 64;
|
|
13923
13923
|
for (U = 0; U < d; U++) l[64 + U] = p[U];
|
|
13924
13924
|
for (U = 0; U < 32; U++) l[32 + U] = g[32 + U];
|
|
13925
13925
|
for (qr(E, l.subarray(32), d + 32), xs(E), Oi(Q, E), vs(l, Q), U = 32; U < 64; U++) l[U] = a[U];
|
|
@@ -13928,11 +13928,11 @@ const Am = {}, Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13928
13928
|
for (U = 0; U < 32; U++)
|
|
13929
13929
|
for (z = 0; z < 32; z++)
|
|
13930
13930
|
be[U + z] += S[U] * g[z];
|
|
13931
|
-
return bs(l.subarray(32), be),
|
|
13931
|
+
return bs(l.subarray(32), be), ot;
|
|
13932
13932
|
}
|
|
13933
13933
|
function As(l, p) {
|
|
13934
13934
|
var d = t(), a = t(), g = t(), S = t(), E = t(), U = t(), z = t();
|
|
13935
|
-
return Ye(l[2], c), fe(l[1], p), ht(g, l[1]), te(S, g, h), yt(g, g, l[2]), tt(S, l[2], S), ht(E, S), ht(U, E), te(z, U, E), te(d, z, g), te(d, d, S), fs(d, d), te(d, d, g), te(d, d, S), te(d, d, S), te(l[0], d, S), ht(a, l[0]), te(a, a, S), Rt(a, g) && te(l[0], l[0],
|
|
13935
|
+
return Ye(l[2], c), fe(l[1], p), ht(g, l[1]), te(S, g, h), yt(g, g, l[2]), tt(S, l[2], S), ht(E, S), ht(U, E), te(z, U, E), te(d, z, g), te(d, d, S), fs(d, d), te(d, d, g), te(d, d, S), te(d, d, S), te(l[0], d, S), ht(a, l[0]), te(a, a, S), Rt(a, g) && te(l[0], l[0], N), ht(a, l[0]), te(a, a, S), Rt(a, g) ? -1 : (Ut(l[0]) === p[31] >> 7 && yt(l[0], o, l[0]), te(l[3], l[0], l[1]), 0);
|
|
13936
13936
|
}
|
|
13937
13937
|
function _(l, p, d, a) {
|
|
13938
13938
|
var g, S = new Uint8Array(32), E = new Uint8Array(64), U = [t(), t(), t(), t()], z = [t(), t(), t(), t()];
|
|
@@ -13946,10 +13946,10 @@ const Am = {}, Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13946
13946
|
for (g = 0; g < d; g++) l[g] = p[g + 64];
|
|
13947
13947
|
return d;
|
|
13948
13948
|
}
|
|
13949
|
-
var I = 32,
|
|
13949
|
+
var I = 32, T = 24, K = 32, xe = 16, bt = 32, xt = 32, je = 32, q = 32, ne = 32, he = T, ve = K, We = xe, Xe = 64, gt = 32, zt = 64, Ti = 32, Ss = 64;
|
|
13950
13950
|
e.lowlevel = {
|
|
13951
13951
|
crypto_core_hsalsa20: X,
|
|
13952
|
-
crypto_stream_xor:
|
|
13952
|
+
crypto_stream_xor: lt,
|
|
13953
13953
|
crypto_stream: Fe,
|
|
13954
13954
|
crypto_stream_salsa20_xor: Y,
|
|
13955
13955
|
crypto_stream_salsa20: ye,
|
|
@@ -13958,7 +13958,7 @@ const Am = {}, Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13958
13958
|
crypto_verify_16: O,
|
|
13959
13959
|
crypto_verify_32: k,
|
|
13960
13960
|
crypto_secretbox: _t,
|
|
13961
|
-
crypto_secretbox_open:
|
|
13961
|
+
crypto_secretbox_open: ut,
|
|
13962
13962
|
crypto_scalarmult: Ci,
|
|
13963
13963
|
crypto_scalarmult_base: or,
|
|
13964
13964
|
crypto_box_beforenm: pn,
|
|
@@ -13971,7 +13971,7 @@ const Am = {}, Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13971
13971
|
crypto_sign_keypair: ws,
|
|
13972
13972
|
crypto_sign_open: _,
|
|
13973
13973
|
crypto_secretbox_KEYBYTES: I,
|
|
13974
|
-
crypto_secretbox_NONCEBYTES:
|
|
13974
|
+
crypto_secretbox_NONCEBYTES: T,
|
|
13975
13975
|
crypto_secretbox_ZEROBYTES: K,
|
|
13976
13976
|
crypto_secretbox_BOXZEROBYTES: xe,
|
|
13977
13977
|
crypto_scalarmult_BYTES: bt,
|
|
@@ -13981,10 +13981,10 @@ const Am = {}, Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
13981
13981
|
crypto_box_BEFORENMBYTES: ne,
|
|
13982
13982
|
crypto_box_NONCEBYTES: he,
|
|
13983
13983
|
crypto_box_ZEROBYTES: ve,
|
|
13984
|
-
crypto_box_BOXZEROBYTES:
|
|
13984
|
+
crypto_box_BOXZEROBYTES: We,
|
|
13985
13985
|
crypto_sign_BYTES: Xe,
|
|
13986
13986
|
crypto_sign_PUBLICKEYBYTES: gt,
|
|
13987
|
-
crypto_sign_SECRETKEYBYTES:
|
|
13987
|
+
crypto_sign_SECRETKEYBYTES: zt,
|
|
13988
13988
|
crypto_sign_SEEDBYTES: Ti,
|
|
13989
13989
|
crypto_hash_BYTES: Ss,
|
|
13990
13990
|
gf: t,
|
|
@@ -14005,9 +14005,9 @@ const Am = {}, Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
14005
14005
|
};
|
|
14006
14006
|
function Oo(l, p) {
|
|
14007
14007
|
if (l.length !== I) throw new Error("bad key size");
|
|
14008
|
-
if (p.length !==
|
|
14008
|
+
if (p.length !== T) throw new Error("bad nonce size");
|
|
14009
14009
|
}
|
|
14010
|
-
function
|
|
14010
|
+
function Ey(l, p) {
|
|
14011
14011
|
if (l.length !== je) throw new Error("bad public key size");
|
|
14012
14012
|
if (p.length !== q) throw new Error("bad secret key size");
|
|
14013
14013
|
}
|
|
@@ -14029,8 +14029,8 @@ const Am = {}, Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
14029
14029
|
}, e.secretbox.open = function(l, p, d) {
|
|
14030
14030
|
xr(l, p, d), Oo(d, p);
|
|
14031
14031
|
for (var a = new Uint8Array(xe + l.length), g = new Uint8Array(a.length), S = 0; S < l.length; S++) a[S + xe] = l[S];
|
|
14032
|
-
return a.length < 32 ||
|
|
14033
|
-
}, e.secretbox.keyLength = I, e.secretbox.nonceLength =
|
|
14032
|
+
return a.length < 32 || ut(g, a, a.length, p, d) !== 0 ? null : g.subarray(K);
|
|
14033
|
+
}, e.secretbox.keyLength = I, e.secretbox.nonceLength = T, e.secretbox.overheadLength = xe, e.scalarMult = function(l, p) {
|
|
14034
14034
|
if (xr(l, p), l.length !== xt) throw new Error("bad n size");
|
|
14035
14035
|
if (p.length !== bt) throw new Error("bad p size");
|
|
14036
14036
|
var d = new Uint8Array(bt);
|
|
@@ -14043,7 +14043,7 @@ const Am = {}, Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
14043
14043
|
var g = e.box.before(d, a);
|
|
14044
14044
|
return e.secretbox(l, p, g);
|
|
14045
14045
|
}, e.box.before = function(l, p) {
|
|
14046
|
-
xr(l, p),
|
|
14046
|
+
xr(l, p), Ey(l, p);
|
|
14047
14047
|
var d = new Uint8Array(ne);
|
|
14048
14048
|
return pn(d, l, p), d;
|
|
14049
14049
|
}, e.box.after = e.secretbox, e.box.open = function(l, p, d, a) {
|
|
@@ -14058,7 +14058,7 @@ const Am = {}, Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
14058
14058
|
var p = new Uint8Array(je);
|
|
14059
14059
|
return or(p, l), { publicKey: p, secretKey: new Uint8Array(l) };
|
|
14060
14060
|
}, e.box.publicKeyLength = je, e.box.secretKeyLength = q, e.box.sharedKeyLength = ne, e.box.nonceLength = he, e.box.overheadLength = e.secretbox.overheadLength, e.sign = function(l, p) {
|
|
14061
|
-
if (xr(l, p), p.length !==
|
|
14061
|
+
if (xr(l, p), p.length !== zt)
|
|
14062
14062
|
throw new Error("bad secret key size");
|
|
14063
14063
|
var d = new Uint8Array(Xe + l.length);
|
|
14064
14064
|
return Bo(d, l, l.length, p), d;
|
|
@@ -14082,19 +14082,19 @@ const Am = {}, Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
14082
14082
|
for (S = 0; S < l.length; S++) a[S + Xe] = l[S];
|
|
14083
14083
|
return _(g, a, a.length, d) >= 0;
|
|
14084
14084
|
}, e.sign.keyPair = function() {
|
|
14085
|
-
var l = new Uint8Array(gt), p = new Uint8Array(
|
|
14085
|
+
var l = new Uint8Array(gt), p = new Uint8Array(zt);
|
|
14086
14086
|
return ws(l, p), { publicKey: l, secretKey: p };
|
|
14087
14087
|
}, e.sign.keyPair.fromSecretKey = function(l) {
|
|
14088
|
-
if (xr(l), l.length !==
|
|
14088
|
+
if (xr(l), l.length !== zt)
|
|
14089
14089
|
throw new Error("bad secret key size");
|
|
14090
14090
|
for (var p = new Uint8Array(gt), d = 0; d < p.length; d++) p[d] = l[32 + d];
|
|
14091
14091
|
return { publicKey: p, secretKey: new Uint8Array(l) };
|
|
14092
14092
|
}, e.sign.keyPair.fromSeed = function(l) {
|
|
14093
14093
|
if (xr(l), l.length !== Ti)
|
|
14094
14094
|
throw new Error("bad seed size");
|
|
14095
|
-
for (var p = new Uint8Array(gt), d = new Uint8Array(
|
|
14095
|
+
for (var p = new Uint8Array(gt), d = new Uint8Array(zt), a = 0; a < 32; a++) d[a] = l[a];
|
|
14096
14096
|
return ws(p, d, !0), { publicKey: p, secretKey: d };
|
|
14097
|
-
}, e.sign.publicKeyLength = gt, e.sign.secretKeyLength =
|
|
14097
|
+
}, e.sign.publicKeyLength = gt, e.sign.secretKeyLength = zt, e.sign.seedLength = Ti, e.sign.signatureLength = Xe, e.hash = function(l) {
|
|
14098
14098
|
xr(l);
|
|
14099
14099
|
var p = new Uint8Array(Ss);
|
|
14100
14100
|
return qr(p, l, l.length), p;
|
|
@@ -14113,7 +14113,7 @@ const Am = {}, Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
14113
14113
|
for (g = 0; g < a; g++) d[g] = S[g];
|
|
14114
14114
|
Sf(S);
|
|
14115
14115
|
});
|
|
14116
|
-
} else typeof
|
|
14116
|
+
} else typeof _m < "u" && (l = Im, l && l.randomBytes && e.setPRNG(function(d, a) {
|
|
14117
14117
|
var g, S = l.randomBytes(a);
|
|
14118
14118
|
for (g = 0; g < a; g++) d[g] = S[g];
|
|
14119
14119
|
Sf(S);
|
|
@@ -14121,9 +14121,9 @@ const Am = {}, Sm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
14121
14121
|
}();
|
|
14122
14122
|
})(r.exports ? r.exports : self.nacl = self.nacl || {});
|
|
14123
14123
|
})(U0);
|
|
14124
|
-
var
|
|
14125
|
-
const D0 = /* @__PURE__ */
|
|
14126
|
-
function
|
|
14124
|
+
var Cm = U0.exports;
|
|
14125
|
+
const D0 = /* @__PURE__ */ Fy(Cm);
|
|
14126
|
+
function Bm() {
|
|
14127
14127
|
return D0.box.keyPair();
|
|
14128
14128
|
}
|
|
14129
14129
|
async function _i(r, e) {
|
|
@@ -14136,18 +14136,18 @@ async function _i(r, e) {
|
|
|
14136
14136
|
}
|
|
14137
14137
|
const i = window.crypto.randomUUID();
|
|
14138
14138
|
console.log("Generated attestation nonce:", i);
|
|
14139
|
-
const s = await
|
|
14139
|
+
const s = await Sm(i, e);
|
|
14140
14140
|
if (s && s.public_key) {
|
|
14141
14141
|
console.log("Attestation document verification succeeded");
|
|
14142
|
-
const o =
|
|
14142
|
+
const o = Bm();
|
|
14143
14143
|
console.log("Generated client key pair");
|
|
14144
|
-
const c = new Uint8Array(s.public_key), { encrypted_session_key: u, session_id: h } = await
|
|
14144
|
+
const c = new Uint8Array(s.public_key), { encrypted_session_key: u, session_id: h } = await Km(
|
|
14145
14145
|
$r(o.publicKey),
|
|
14146
14146
|
i,
|
|
14147
14147
|
e
|
|
14148
14148
|
);
|
|
14149
14149
|
console.log("Key exchange completed.");
|
|
14150
|
-
const m = D0.scalarMult(o.secretKey, c), x = Rs(u), G = 12,
|
|
14150
|
+
const m = D0.scalarMult(o.secretKey, c), x = Rs(u), G = 12, N = x.slice(0, G), v = x.slice(G), O = new Tu(m).open(N, v);
|
|
14151
14151
|
if (O)
|
|
14152
14152
|
return console.log("Session key decrypted successfully"), window.sessionStorage.setItem("sessionKey", $r(O)), window.sessionStorage.setItem("sessionId", h), { sessionKey: O, sessionId: h };
|
|
14153
14153
|
throw new Error("Failed to decrypt session key");
|
|
@@ -14159,44 +14159,44 @@ async function _i(r, e) {
|
|
|
14159
14159
|
console.groupEnd();
|
|
14160
14160
|
}
|
|
14161
14161
|
}
|
|
14162
|
-
let
|
|
14163
|
-
function
|
|
14164
|
-
|
|
14162
|
+
let st = "";
|
|
14163
|
+
function Om(r) {
|
|
14164
|
+
st = r;
|
|
14165
14165
|
}
|
|
14166
|
-
async function
|
|
14167
|
-
return
|
|
14168
|
-
`${
|
|
14166
|
+
async function Tm(r, e) {
|
|
14167
|
+
return Vt(
|
|
14168
|
+
`${st}/platform/login`,
|
|
14169
14169
|
"POST",
|
|
14170
14170
|
{ email: r, password: e },
|
|
14171
14171
|
void 0,
|
|
14172
14172
|
"Failed to login"
|
|
14173
14173
|
);
|
|
14174
14174
|
}
|
|
14175
|
-
async function
|
|
14176
|
-
return
|
|
14177
|
-
`${
|
|
14175
|
+
async function Nm(r, e, t, n) {
|
|
14176
|
+
return Vt(
|
|
14177
|
+
`${st}/platform/register`,
|
|
14178
14178
|
"POST",
|
|
14179
|
-
{ email: r, password: e,
|
|
14179
|
+
{ email: r, password: e, invite_code: t, name: n },
|
|
14180
14180
|
void 0,
|
|
14181
14181
|
"Failed to register"
|
|
14182
14182
|
);
|
|
14183
14183
|
}
|
|
14184
|
-
async function
|
|
14185
|
-
return
|
|
14186
|
-
`${
|
|
14184
|
+
async function jm(r) {
|
|
14185
|
+
return Vt(
|
|
14186
|
+
`${st}/platform/logout`,
|
|
14187
14187
|
"POST",
|
|
14188
14188
|
{ refresh_token: r },
|
|
14189
14189
|
void 0,
|
|
14190
14190
|
"Failed to logout"
|
|
14191
14191
|
);
|
|
14192
14192
|
}
|
|
14193
|
-
async function
|
|
14193
|
+
async function Pm() {
|
|
14194
14194
|
const r = window.localStorage.getItem("refresh_token");
|
|
14195
14195
|
if (!r) throw new Error("No refresh token available");
|
|
14196
14196
|
const e = { refresh_token: r };
|
|
14197
14197
|
try {
|
|
14198
|
-
const t = await
|
|
14199
|
-
`${
|
|
14198
|
+
const t = await Vt(
|
|
14199
|
+
`${st}/platform/refresh`,
|
|
14200
14200
|
"POST",
|
|
14201
14201
|
e,
|
|
14202
14202
|
void 0,
|
|
@@ -14208,114 +14208,114 @@ async function Tm() {
|
|
|
14208
14208
|
}
|
|
14209
14209
|
}
|
|
14210
14210
|
async function $0(r) {
|
|
14211
|
-
return
|
|
14212
|
-
`${
|
|
14211
|
+
return qe(
|
|
14212
|
+
`${st}/platform/orgs`,
|
|
14213
14213
|
"POST",
|
|
14214
14214
|
{ name: r }
|
|
14215
14215
|
);
|
|
14216
14216
|
}
|
|
14217
14217
|
async function M0() {
|
|
14218
|
-
return
|
|
14219
|
-
`${
|
|
14218
|
+
return qe(
|
|
14219
|
+
`${st}/platform/orgs`,
|
|
14220
14220
|
"GET",
|
|
14221
14221
|
void 0
|
|
14222
14222
|
);
|
|
14223
14223
|
}
|
|
14224
14224
|
async function V0(r) {
|
|
14225
|
-
return
|
|
14226
|
-
`${
|
|
14225
|
+
return qe(
|
|
14226
|
+
`${st}/platform/orgs/${r}`,
|
|
14227
14227
|
"DELETE",
|
|
14228
14228
|
void 0
|
|
14229
14229
|
);
|
|
14230
14230
|
}
|
|
14231
14231
|
async function L0(r, e, t) {
|
|
14232
|
-
return
|
|
14233
|
-
`${
|
|
14232
|
+
return qe(
|
|
14233
|
+
`${st}/platform/orgs/${r}/projects`,
|
|
14234
14234
|
"POST",
|
|
14235
14235
|
{ name: e, description: t }
|
|
14236
14236
|
);
|
|
14237
14237
|
}
|
|
14238
14238
|
async function H0(r) {
|
|
14239
|
-
return
|
|
14240
|
-
`${
|
|
14239
|
+
return qe(
|
|
14240
|
+
`${st}/platform/orgs/${r}/projects`,
|
|
14241
14241
|
"GET",
|
|
14242
14242
|
void 0
|
|
14243
14243
|
);
|
|
14244
14244
|
}
|
|
14245
14245
|
async function F0(r, e) {
|
|
14246
|
-
return
|
|
14247
|
-
`${
|
|
14246
|
+
return qe(
|
|
14247
|
+
`${st}/platform/orgs/${r}/projects/${e}`,
|
|
14248
14248
|
"GET",
|
|
14249
14249
|
void 0
|
|
14250
14250
|
);
|
|
14251
14251
|
}
|
|
14252
14252
|
async function z0(r, e, t) {
|
|
14253
|
-
return
|
|
14254
|
-
`${
|
|
14253
|
+
return qe(
|
|
14254
|
+
`${st}/platform/orgs/${r}/projects/${e}`,
|
|
14255
14255
|
"PATCH",
|
|
14256
14256
|
t
|
|
14257
14257
|
);
|
|
14258
14258
|
}
|
|
14259
14259
|
async function G0(r, e) {
|
|
14260
|
-
return
|
|
14261
|
-
`${
|
|
14260
|
+
return qe(
|
|
14261
|
+
`${st}/platform/orgs/${r}/projects/${e}`,
|
|
14262
14262
|
"DELETE",
|
|
14263
14263
|
void 0
|
|
14264
14264
|
);
|
|
14265
14265
|
}
|
|
14266
|
-
function
|
|
14266
|
+
function Rm(r) {
|
|
14267
14267
|
const e = /^[A-Za-z0-9+/]*[=]{0,2}$/, t = r.length % 4 === 0, n = e.test(r);
|
|
14268
14268
|
return t && n;
|
|
14269
14269
|
}
|
|
14270
14270
|
async function K0(r, e, t, n) {
|
|
14271
|
-
if (!
|
|
14271
|
+
if (!Rm(n))
|
|
14272
14272
|
throw new Error(
|
|
14273
14273
|
"Secret must be base64 encoded. Use @stablelib/base64's encode function to encode your data."
|
|
14274
14274
|
);
|
|
14275
|
-
return
|
|
14276
|
-
`${
|
|
14275
|
+
return qe(
|
|
14276
|
+
`${st}/platform/orgs/${r}/projects/${e}/secrets`,
|
|
14277
14277
|
"POST",
|
|
14278
14278
|
{ key_name: t, secret: n }
|
|
14279
14279
|
);
|
|
14280
14280
|
}
|
|
14281
14281
|
async function Z0(r, e) {
|
|
14282
|
-
return
|
|
14283
|
-
`${
|
|
14282
|
+
return qe(
|
|
14283
|
+
`${st}/platform/orgs/${r}/projects/${e}/secrets`,
|
|
14284
14284
|
"GET",
|
|
14285
14285
|
void 0
|
|
14286
14286
|
);
|
|
14287
14287
|
}
|
|
14288
14288
|
async function q0(r, e, t) {
|
|
14289
|
-
return
|
|
14290
|
-
`${
|
|
14289
|
+
return qe(
|
|
14290
|
+
`${st}/platform/orgs/${r}/projects/${e}/secrets/${t}`,
|
|
14291
14291
|
"DELETE",
|
|
14292
14292
|
void 0
|
|
14293
14293
|
);
|
|
14294
14294
|
}
|
|
14295
14295
|
async function W0(r, e) {
|
|
14296
|
-
return
|
|
14297
|
-
`${
|
|
14296
|
+
return qe(
|
|
14297
|
+
`${st}/platform/orgs/${r}/projects/${e}/settings/email`,
|
|
14298
14298
|
"GET",
|
|
14299
14299
|
void 0
|
|
14300
14300
|
);
|
|
14301
14301
|
}
|
|
14302
14302
|
async function Y0(r, e, t) {
|
|
14303
|
-
return
|
|
14304
|
-
`${
|
|
14303
|
+
return qe(
|
|
14304
|
+
`${st}/platform/orgs/${r}/projects/${e}/settings/email`,
|
|
14305
14305
|
"PUT",
|
|
14306
14306
|
t
|
|
14307
14307
|
);
|
|
14308
14308
|
}
|
|
14309
14309
|
async function J0(r, e) {
|
|
14310
|
-
return
|
|
14311
|
-
`${
|
|
14310
|
+
return qe(
|
|
14311
|
+
`${st}/platform/orgs/${r}/projects/${e}/settings/oauth`,
|
|
14312
14312
|
"GET",
|
|
14313
14313
|
void 0
|
|
14314
14314
|
);
|
|
14315
14315
|
}
|
|
14316
14316
|
async function X0(r, e, t) {
|
|
14317
|
-
return
|
|
14318
|
-
`${
|
|
14317
|
+
return qe(
|
|
14318
|
+
`${st}/platform/orgs/${r}/projects/${e}/settings/oauth`,
|
|
14319
14319
|
"PUT",
|
|
14320
14320
|
t
|
|
14321
14321
|
);
|
|
@@ -14323,67 +14323,67 @@ async function X0(r, e, t) {
|
|
|
14323
14323
|
async function Q0(r, e, t) {
|
|
14324
14324
|
if (!e || e.trim() === "")
|
|
14325
14325
|
throw new Error("Email is required");
|
|
14326
|
-
return
|
|
14327
|
-
`${
|
|
14326
|
+
return qe(
|
|
14327
|
+
`${st}/platform/orgs/${r}/invites`,
|
|
14328
14328
|
"POST",
|
|
14329
14329
|
{ email: e, role: t }
|
|
14330
14330
|
);
|
|
14331
14331
|
}
|
|
14332
14332
|
async function ey(r) {
|
|
14333
|
-
return
|
|
14334
|
-
`${
|
|
14333
|
+
return qe(
|
|
14334
|
+
`${st}/platform/orgs/${r}/invites`,
|
|
14335
14335
|
"GET",
|
|
14336
14336
|
void 0
|
|
14337
14337
|
);
|
|
14338
14338
|
}
|
|
14339
14339
|
async function ty(r, e) {
|
|
14340
|
-
return
|
|
14341
|
-
`${
|
|
14340
|
+
return qe(
|
|
14341
|
+
`${st}/platform/orgs/${r}/invites/${e}`,
|
|
14342
14342
|
"GET",
|
|
14343
14343
|
void 0
|
|
14344
14344
|
);
|
|
14345
14345
|
}
|
|
14346
14346
|
async function ry(r, e) {
|
|
14347
|
-
return
|
|
14348
|
-
`${
|
|
14347
|
+
return qe(
|
|
14348
|
+
`${st}/platform/orgs/${r}/invites/${e}`,
|
|
14349
14349
|
"DELETE",
|
|
14350
14350
|
void 0
|
|
14351
14351
|
);
|
|
14352
14352
|
}
|
|
14353
14353
|
async function ny(r) {
|
|
14354
|
-
return
|
|
14355
|
-
`${
|
|
14354
|
+
return qe(
|
|
14355
|
+
`${st}/platform/orgs/${r}/memberships`,
|
|
14356
14356
|
"GET",
|
|
14357
14357
|
void 0
|
|
14358
14358
|
);
|
|
14359
14359
|
}
|
|
14360
14360
|
async function iy(r, e, t) {
|
|
14361
|
-
return
|
|
14362
|
-
`${
|
|
14361
|
+
return qe(
|
|
14362
|
+
`${st}/platform/orgs/${r}/memberships/${e}`,
|
|
14363
14363
|
"PATCH",
|
|
14364
14364
|
{ role: t }
|
|
14365
14365
|
);
|
|
14366
14366
|
}
|
|
14367
14367
|
async function sy(r, e) {
|
|
14368
|
-
return
|
|
14369
|
-
`${
|
|
14368
|
+
return qe(
|
|
14369
|
+
`${st}/platform/orgs/${r}/memberships/${e}`,
|
|
14370
14370
|
"DELETE",
|
|
14371
14371
|
void 0
|
|
14372
14372
|
);
|
|
14373
14373
|
}
|
|
14374
14374
|
async function oy(r) {
|
|
14375
|
-
return
|
|
14376
|
-
`${
|
|
14375
|
+
return qe(
|
|
14376
|
+
`${st}/platform/accept_invite/${r}`,
|
|
14377
14377
|
"POST",
|
|
14378
14378
|
void 0
|
|
14379
14379
|
);
|
|
14380
14380
|
}
|
|
14381
|
-
async function
|
|
14382
|
-
return
|
|
14381
|
+
async function Um() {
|
|
14382
|
+
return qe(`${st}/platform/me`, "GET", void 0);
|
|
14383
14383
|
}
|
|
14384
14384
|
async function ay(r) {
|
|
14385
|
-
return
|
|
14386
|
-
`${
|
|
14385
|
+
return Vt(
|
|
14386
|
+
`${st}/platform/verify-email/${r}`,
|
|
14387
14387
|
"GET",
|
|
14388
14388
|
void 0,
|
|
14389
14389
|
void 0,
|
|
@@ -14391,25 +14391,65 @@ async function ay(r) {
|
|
|
14391
14391
|
);
|
|
14392
14392
|
}
|
|
14393
14393
|
async function Da() {
|
|
14394
|
-
return
|
|
14395
|
-
`${
|
|
14394
|
+
return qe(
|
|
14395
|
+
`${st}/platform/request_verification`,
|
|
14396
14396
|
"POST",
|
|
14397
14397
|
void 0,
|
|
14398
14398
|
"Failed to request new verification code"
|
|
14399
14399
|
);
|
|
14400
14400
|
}
|
|
14401
|
-
async function
|
|
14401
|
+
async function cy(r, e) {
|
|
14402
|
+
const t = {
|
|
14403
|
+
email: r,
|
|
14404
|
+
hashed_secret: e
|
|
14405
|
+
};
|
|
14406
|
+
return Vt(
|
|
14407
|
+
`${st}/platform/password-reset/request`,
|
|
14408
|
+
"POST",
|
|
14409
|
+
t,
|
|
14410
|
+
void 0,
|
|
14411
|
+
"Failed to request platform password reset"
|
|
14412
|
+
);
|
|
14413
|
+
}
|
|
14414
|
+
async function ly(r, e, t, n) {
|
|
14415
|
+
const i = {
|
|
14416
|
+
email: r,
|
|
14417
|
+
alphanumeric_code: e,
|
|
14418
|
+
plaintext_secret: t,
|
|
14419
|
+
new_password: n
|
|
14420
|
+
};
|
|
14421
|
+
return Vt(
|
|
14422
|
+
`${st}/platform/password-reset/confirm`,
|
|
14423
|
+
"POST",
|
|
14424
|
+
i,
|
|
14425
|
+
void 0,
|
|
14426
|
+
"Failed to confirm platform password reset"
|
|
14427
|
+
);
|
|
14428
|
+
}
|
|
14429
|
+
async function uy(r, e) {
|
|
14430
|
+
const t = {
|
|
14431
|
+
current_password: r,
|
|
14432
|
+
new_password: e
|
|
14433
|
+
};
|
|
14434
|
+
return qe(
|
|
14435
|
+
`${st}/platform/change-password`,
|
|
14436
|
+
"POST",
|
|
14437
|
+
t,
|
|
14438
|
+
"Failed to change platform password"
|
|
14439
|
+
);
|
|
14440
|
+
}
|
|
14441
|
+
async function qe(r, e, t, n) {
|
|
14402
14442
|
const i = async (s = !1) => {
|
|
14403
14443
|
try {
|
|
14404
14444
|
if (s) {
|
|
14405
14445
|
console.log("Refreshing access token");
|
|
14406
14446
|
const u = Ho.getRefreshFunction(r);
|
|
14407
|
-
console.log(`Using ${u}`), u === "platformRefreshToken" ? await
|
|
14447
|
+
console.log(`Using ${u}`), u === "platformRefreshToken" ? await Pm() : await Uc();
|
|
14408
14448
|
}
|
|
14409
14449
|
const o = window.localStorage.getItem("access_token");
|
|
14410
14450
|
if (!o)
|
|
14411
14451
|
throw new Error("No access token available");
|
|
14412
|
-
const c = await
|
|
14452
|
+
const c = await fy(
|
|
14413
14453
|
r,
|
|
14414
14454
|
e,
|
|
14415
14455
|
t,
|
|
@@ -14429,7 +14469,7 @@ async function We(r, e, t, n) {
|
|
|
14429
14469
|
};
|
|
14430
14470
|
return i();
|
|
14431
14471
|
}
|
|
14432
|
-
async function
|
|
14472
|
+
async function fy(r, e, t, n, i) {
|
|
14433
14473
|
const o = Ho.resolveEndpoint(r).context === "platform" ? Ho.platformApiUrl : void 0;
|
|
14434
14474
|
let { sessionKey: c, sessionId: u } = await _i(!1, o);
|
|
14435
14475
|
const h = async (x, G = !1) => {
|
|
@@ -14439,7 +14479,7 @@ async function cy(r, e, t, n, i) {
|
|
|
14439
14479
|
}
|
|
14440
14480
|
if (!c || !u)
|
|
14441
14481
|
throw new Error("Failed to make encrypted API call, no attestation available.");
|
|
14442
|
-
const
|
|
14482
|
+
const N = t ? JSON.stringify(t) : void 0, v = N ? Ad(c, N) : void 0, A = {
|
|
14443
14483
|
"Content-Type": "application/json",
|
|
14444
14484
|
"x-session-id": u
|
|
14445
14485
|
};
|
|
@@ -14467,10 +14507,10 @@ async function cy(r, e, t, n, i) {
|
|
|
14467
14507
|
}
|
|
14468
14508
|
return k;
|
|
14469
14509
|
}, m = async (x, G = !1) => {
|
|
14470
|
-
var
|
|
14510
|
+
var N;
|
|
14471
14511
|
try {
|
|
14472
14512
|
const v = await h(x, G);
|
|
14473
|
-
return (v.status === 400 || (
|
|
14513
|
+
return (v.status === 400 || (N = v.error) != null && N.includes("Encryption error")) && !G ? (console.log("Encryption error or Bad Request, attempting to renew attestation"), m(x, !0)) : v;
|
|
14474
14514
|
} catch (v) {
|
|
14475
14515
|
return {
|
|
14476
14516
|
status: 500,
|
|
@@ -14480,8 +14520,8 @@ async function cy(r, e, t, n, i) {
|
|
|
14480
14520
|
};
|
|
14481
14521
|
return m(n);
|
|
14482
14522
|
}
|
|
14483
|
-
async function
|
|
14484
|
-
const s = await
|
|
14523
|
+
async function Vt(r, e, t, n, i) {
|
|
14524
|
+
const s = await fy(
|
|
14485
14525
|
r,
|
|
14486
14526
|
e,
|
|
14487
14527
|
t,
|
|
@@ -14494,29 +14534,29 @@ async function Gt(r, e, t, n, i) {
|
|
|
14494
14534
|
throw new Error("No data received from the server");
|
|
14495
14535
|
return s.data;
|
|
14496
14536
|
}
|
|
14497
|
-
let
|
|
14498
|
-
function
|
|
14499
|
-
|
|
14537
|
+
let ft = "";
|
|
14538
|
+
function Dm(r) {
|
|
14539
|
+
ft = r;
|
|
14500
14540
|
}
|
|
14501
|
-
function
|
|
14502
|
-
return
|
|
14541
|
+
function $m() {
|
|
14542
|
+
return ft;
|
|
14503
14543
|
}
|
|
14504
|
-
async function
|
|
14505
|
-
return
|
|
14506
|
-
`${
|
|
14544
|
+
async function Mm(r, e, t) {
|
|
14545
|
+
return Vt(
|
|
14546
|
+
`${ft}/login`,
|
|
14507
14547
|
"POST",
|
|
14508
14548
|
{ email: r, password: e, client_id: t }
|
|
14509
14549
|
);
|
|
14510
14550
|
}
|
|
14511
|
-
async function
|
|
14512
|
-
return
|
|
14513
|
-
`${
|
|
14551
|
+
async function Vm(r, e, t) {
|
|
14552
|
+
return Vt(
|
|
14553
|
+
`${ft}/login`,
|
|
14514
14554
|
"POST",
|
|
14515
14555
|
{ id: r, password: e, client_id: t }
|
|
14516
14556
|
);
|
|
14517
14557
|
}
|
|
14518
|
-
async function
|
|
14519
|
-
return
|
|
14558
|
+
async function Lm(r, e, t, n, i) {
|
|
14559
|
+
return Vt(`${ft}/register`, "POST", {
|
|
14520
14560
|
email: r,
|
|
14521
14561
|
password: e,
|
|
14522
14562
|
inviteCode: t.toLowerCase(),
|
|
@@ -14524,8 +14564,8 @@ async function $m(r, e, t, n, i) {
|
|
|
14524
14564
|
name: i
|
|
14525
14565
|
});
|
|
14526
14566
|
}
|
|
14527
|
-
async function
|
|
14528
|
-
return
|
|
14567
|
+
async function Hm(r, e, t) {
|
|
14568
|
+
return Vt(`${ft}/register`, "POST", {
|
|
14529
14569
|
password: r,
|
|
14530
14570
|
inviteCode: e.toLowerCase(),
|
|
14531
14571
|
client_id: t
|
|
@@ -14536,8 +14576,8 @@ async function Uc() {
|
|
|
14536
14576
|
if (!r) throw new Error("No refresh token available");
|
|
14537
14577
|
const e = { refresh_token: r };
|
|
14538
14578
|
try {
|
|
14539
|
-
const t = await
|
|
14540
|
-
`${
|
|
14579
|
+
const t = await Vt(
|
|
14580
|
+
`${ft}/refresh`,
|
|
14541
14581
|
"POST",
|
|
14542
14582
|
e,
|
|
14543
14583
|
void 0,
|
|
@@ -14548,34 +14588,34 @@ async function Uc() {
|
|
|
14548
14588
|
throw console.error("Error refreshing token:", t), t;
|
|
14549
14589
|
}
|
|
14550
14590
|
}
|
|
14551
|
-
async function
|
|
14552
|
-
return
|
|
14553
|
-
`${
|
|
14591
|
+
async function Fm() {
|
|
14592
|
+
return qe(
|
|
14593
|
+
`${ft}/protected/user`,
|
|
14554
14594
|
"GET",
|
|
14555
14595
|
void 0,
|
|
14556
14596
|
"Failed to fetch user"
|
|
14557
14597
|
);
|
|
14558
14598
|
}
|
|
14559
|
-
async function
|
|
14560
|
-
return
|
|
14561
|
-
`${
|
|
14599
|
+
async function hy(r, e) {
|
|
14600
|
+
return qe(
|
|
14601
|
+
`${ft}/protected/kv/${r}`,
|
|
14562
14602
|
"PUT",
|
|
14563
14603
|
e,
|
|
14564
14604
|
"Failed to put key-value pair"
|
|
14565
14605
|
);
|
|
14566
14606
|
}
|
|
14567
|
-
async function
|
|
14568
|
-
return
|
|
14569
|
-
`${
|
|
14607
|
+
async function dy(r) {
|
|
14608
|
+
return qe(
|
|
14609
|
+
`${ft}/protected/kv/${r}`,
|
|
14570
14610
|
"DELETE",
|
|
14571
14611
|
void 0,
|
|
14572
14612
|
"Failed to delete key-value pair"
|
|
14573
14613
|
);
|
|
14574
14614
|
}
|
|
14575
|
-
async function
|
|
14615
|
+
async function py(r) {
|
|
14576
14616
|
try {
|
|
14577
|
-
return await
|
|
14578
|
-
`${
|
|
14617
|
+
return await qe(
|
|
14618
|
+
`${ft}/protected/kv/${r}`,
|
|
14579
14619
|
"GET",
|
|
14580
14620
|
void 0,
|
|
14581
14621
|
"Failed to get key-value pair"
|
|
@@ -14585,21 +14625,21 @@ async function fy(r) {
|
|
|
14585
14625
|
return;
|
|
14586
14626
|
}
|
|
14587
14627
|
}
|
|
14588
|
-
async function
|
|
14589
|
-
return
|
|
14590
|
-
`${
|
|
14628
|
+
async function yy() {
|
|
14629
|
+
return qe(
|
|
14630
|
+
`${ft}/protected/kv`,
|
|
14591
14631
|
"GET",
|
|
14592
14632
|
void 0,
|
|
14593
14633
|
"Failed to list key-value pairs"
|
|
14594
14634
|
);
|
|
14595
14635
|
}
|
|
14596
|
-
async function
|
|
14636
|
+
async function zm(r) {
|
|
14597
14637
|
const e = { refresh_token: r };
|
|
14598
|
-
return
|
|
14638
|
+
return Vt(`${ft}/logout`, "POST", e);
|
|
14599
14639
|
}
|
|
14600
|
-
async function
|
|
14601
|
-
return
|
|
14602
|
-
`${
|
|
14640
|
+
async function gy(r) {
|
|
14641
|
+
return Vt(
|
|
14642
|
+
`${ft}/verify-email/${r}`,
|
|
14603
14643
|
"GET",
|
|
14604
14644
|
void 0,
|
|
14605
14645
|
void 0,
|
|
@@ -14607,21 +14647,21 @@ async function dy(r) {
|
|
|
14607
14647
|
);
|
|
14608
14648
|
}
|
|
14609
14649
|
async function $a() {
|
|
14610
|
-
return
|
|
14611
|
-
`${
|
|
14650
|
+
return qe(
|
|
14651
|
+
`${ft}/protected/request_verification`,
|
|
14612
14652
|
"POST",
|
|
14613
14653
|
void 0,
|
|
14614
14654
|
"Failed to request new verification code"
|
|
14615
14655
|
);
|
|
14616
14656
|
}
|
|
14617
|
-
async function
|
|
14618
|
-
const n = await fetch(`${e ||
|
|
14657
|
+
async function Gm(r, e) {
|
|
14658
|
+
const n = await fetch(`${e || ft}/attestation/${r}`);
|
|
14619
14659
|
if (!n.ok)
|
|
14620
14660
|
throw new Error(`Request failed with status ${n.status}`);
|
|
14621
14661
|
return (await n.json()).attestation_document;
|
|
14622
14662
|
}
|
|
14623
|
-
async function
|
|
14624
|
-
const i = await fetch(`${t ||
|
|
14663
|
+
async function Km(r, e, t) {
|
|
14664
|
+
const i = await fetch(`${t || ft}/key_exchange`, {
|
|
14625
14665
|
method: "POST",
|
|
14626
14666
|
headers: {
|
|
14627
14667
|
"Content-Type": "application/json"
|
|
@@ -14632,21 +14672,21 @@ async function Fm(r, e, t) {
|
|
|
14632
14672
|
throw new Error("Key exchange failed");
|
|
14633
14673
|
return i.json();
|
|
14634
14674
|
}
|
|
14635
|
-
async function
|
|
14675
|
+
async function Zm(r, e, t) {
|
|
14636
14676
|
const n = {
|
|
14637
14677
|
email: r,
|
|
14638
14678
|
hashed_secret: e,
|
|
14639
14679
|
client_id: t
|
|
14640
14680
|
};
|
|
14641
|
-
return
|
|
14642
|
-
`${
|
|
14681
|
+
return Vt(
|
|
14682
|
+
`${ft}/password-reset/request`,
|
|
14643
14683
|
"POST",
|
|
14644
14684
|
n,
|
|
14645
14685
|
void 0,
|
|
14646
14686
|
"Failed to request password reset"
|
|
14647
14687
|
);
|
|
14648
14688
|
}
|
|
14649
|
-
async function
|
|
14689
|
+
async function qm(r, e, t, n, i) {
|
|
14650
14690
|
const s = {
|
|
14651
14691
|
email: r,
|
|
14652
14692
|
alphanumeric_code: e,
|
|
@@ -14654,30 +14694,30 @@ async function Gm(r, e, t, n, i) {
|
|
|
14654
14694
|
new_password: n,
|
|
14655
14695
|
client_id: i
|
|
14656
14696
|
};
|
|
14657
|
-
return
|
|
14658
|
-
`${
|
|
14697
|
+
return Vt(
|
|
14698
|
+
`${ft}/password-reset/confirm`,
|
|
14659
14699
|
"POST",
|
|
14660
14700
|
s,
|
|
14661
14701
|
void 0,
|
|
14662
14702
|
"Failed to confirm password reset"
|
|
14663
14703
|
);
|
|
14664
14704
|
}
|
|
14665
|
-
async function
|
|
14705
|
+
async function vy(r, e) {
|
|
14666
14706
|
const t = {
|
|
14667
14707
|
current_password: r,
|
|
14668
14708
|
new_password: e
|
|
14669
14709
|
};
|
|
14670
|
-
return
|
|
14671
|
-
`${
|
|
14710
|
+
return qe(
|
|
14711
|
+
`${ft}/protected/change_password`,
|
|
14672
14712
|
"POST",
|
|
14673
14713
|
t,
|
|
14674
14714
|
"Failed to change password"
|
|
14675
14715
|
);
|
|
14676
14716
|
}
|
|
14677
|
-
async function
|
|
14717
|
+
async function Wm(r, e) {
|
|
14678
14718
|
try {
|
|
14679
|
-
return await
|
|
14680
|
-
`${
|
|
14719
|
+
return await Vt(
|
|
14720
|
+
`${ft}/auth/github`,
|
|
14681
14721
|
"POST",
|
|
14682
14722
|
e ? { invite_code: e, client_id: r } : { client_id: r },
|
|
14683
14723
|
void 0,
|
|
@@ -14687,11 +14727,11 @@ async function Km(r, e) {
|
|
|
14687
14727
|
throw t instanceof Error && t.message.includes("Invalid invite code") ? new Error("Invalid invite code. Please check and try again.") : t;
|
|
14688
14728
|
}
|
|
14689
14729
|
}
|
|
14690
|
-
async function
|
|
14730
|
+
async function Ym(r, e, t) {
|
|
14691
14731
|
const n = { code: r, state: e, invite_code: t };
|
|
14692
14732
|
try {
|
|
14693
|
-
return await
|
|
14694
|
-
`${
|
|
14733
|
+
return await Vt(
|
|
14734
|
+
`${ft}/auth/github/callback`,
|
|
14695
14735
|
"POST",
|
|
14696
14736
|
n,
|
|
14697
14737
|
void 0,
|
|
@@ -14705,10 +14745,10 @@ async function Zm(r, e, t) {
|
|
|
14705
14745
|
) : new Error("Failed to authenticate with GitHub. Please try again.") : i;
|
|
14706
14746
|
}
|
|
14707
14747
|
}
|
|
14708
|
-
async function
|
|
14748
|
+
async function Jm(r, e) {
|
|
14709
14749
|
try {
|
|
14710
|
-
return await
|
|
14711
|
-
`${
|
|
14750
|
+
return await Vt(
|
|
14751
|
+
`${ft}/auth/google`,
|
|
14712
14752
|
"POST",
|
|
14713
14753
|
e ? { invite_code: e, client_id: r } : { client_id: r },
|
|
14714
14754
|
void 0,
|
|
@@ -14718,11 +14758,11 @@ async function qm(r, e) {
|
|
|
14718
14758
|
throw t instanceof Error && t.message.includes("Invalid invite code") ? new Error("Invalid invite code. Please check and try again.") : t;
|
|
14719
14759
|
}
|
|
14720
14760
|
}
|
|
14721
|
-
async function
|
|
14761
|
+
async function Xm(r, e, t) {
|
|
14722
14762
|
const n = { code: r, state: e, invite_code: t };
|
|
14723
14763
|
try {
|
|
14724
|
-
return await
|
|
14725
|
-
`${
|
|
14764
|
+
return await Vt(
|
|
14765
|
+
`${ft}/auth/google/callback`,
|
|
14726
14766
|
"POST",
|
|
14727
14767
|
n,
|
|
14728
14768
|
void 0,
|
|
@@ -14736,27 +14776,27 @@ async function Wm(r, e, t) {
|
|
|
14736
14776
|
) : new Error("Failed to authenticate with Google. Please try again.") : i;
|
|
14737
14777
|
}
|
|
14738
14778
|
}
|
|
14739
|
-
async function
|
|
14740
|
-
return
|
|
14741
|
-
`${
|
|
14779
|
+
async function my() {
|
|
14780
|
+
return qe(
|
|
14781
|
+
`${ft}/protected/private_key`,
|
|
14742
14782
|
"GET",
|
|
14743
14783
|
void 0,
|
|
14744
14784
|
"Failed to fetch private key"
|
|
14745
14785
|
);
|
|
14746
14786
|
}
|
|
14747
|
-
async function
|
|
14748
|
-
const e = r ? `${
|
|
14749
|
-
return
|
|
14787
|
+
async function wy(r) {
|
|
14788
|
+
const e = r ? `${ft}/protected/private_key_bytes?derivation_path=${encodeURIComponent(r)}` : `${ft}/protected/private_key_bytes`;
|
|
14789
|
+
return qe(
|
|
14750
14790
|
e,
|
|
14751
14791
|
"GET",
|
|
14752
14792
|
void 0,
|
|
14753
14793
|
"Failed to fetch private key bytes"
|
|
14754
14794
|
);
|
|
14755
14795
|
}
|
|
14756
|
-
async function
|
|
14796
|
+
async function by(r, e, t) {
|
|
14757
14797
|
const n = $r(r);
|
|
14758
|
-
return
|
|
14759
|
-
`${
|
|
14798
|
+
return qe(
|
|
14799
|
+
`${ft}/protected/sign_message`,
|
|
14760
14800
|
"POST",
|
|
14761
14801
|
{
|
|
14762
14802
|
message_base64: n,
|
|
@@ -14766,37 +14806,37 @@ async function vy(r, e, t) {
|
|
|
14766
14806
|
"Failed to sign message"
|
|
14767
14807
|
);
|
|
14768
14808
|
}
|
|
14769
|
-
async function
|
|
14770
|
-
const t = e ? `${
|
|
14771
|
-
return
|
|
14809
|
+
async function xy(r, e) {
|
|
14810
|
+
const t = e ? `${ft}/protected/public_key?algorithm=${r}&derivation_path=${encodeURIComponent(e)}` : `${ft}/protected/public_key?algorithm=${r}`;
|
|
14811
|
+
return qe(
|
|
14772
14812
|
t,
|
|
14773
14813
|
"GET",
|
|
14774
14814
|
void 0,
|
|
14775
14815
|
"Failed to fetch public key"
|
|
14776
14816
|
);
|
|
14777
14817
|
}
|
|
14778
|
-
async function
|
|
14818
|
+
async function Qm(r, e, t) {
|
|
14779
14819
|
const n = {
|
|
14780
14820
|
email: r,
|
|
14781
14821
|
password: e,
|
|
14782
14822
|
...t !== void 0 && { name: t }
|
|
14783
14823
|
};
|
|
14784
|
-
return
|
|
14785
|
-
`${
|
|
14824
|
+
return qe(
|
|
14825
|
+
`${ft}/protected/convert_guest`,
|
|
14786
14826
|
"POST",
|
|
14787
14827
|
n,
|
|
14788
14828
|
"Failed to convert guest account"
|
|
14789
14829
|
);
|
|
14790
14830
|
}
|
|
14791
|
-
async function
|
|
14792
|
-
return
|
|
14793
|
-
`${
|
|
14831
|
+
async function ew(r) {
|
|
14832
|
+
return qe(
|
|
14833
|
+
`${ft}/protected/third_party_token`,
|
|
14794
14834
|
"POST",
|
|
14795
14835
|
{ audience: r },
|
|
14796
14836
|
"Failed to generate third party token"
|
|
14797
14837
|
);
|
|
14798
14838
|
}
|
|
14799
|
-
function
|
|
14839
|
+
function tw() {
|
|
14800
14840
|
return async (r, e) => {
|
|
14801
14841
|
var n, i;
|
|
14802
14842
|
const t = () => {
|
|
@@ -14830,7 +14870,7 @@ function Xm() {
|
|
|
14830
14870
|
if ((n = h.headers.get("content-type")) != null && n.includes("text/event-stream")) {
|
|
14831
14871
|
const m = (i = h.body) == null ? void 0 : i.getReader(), x = new TextDecoder();
|
|
14832
14872
|
let G = "";
|
|
14833
|
-
const
|
|
14873
|
+
const N = new ReadableStream({
|
|
14834
14874
|
async start(v) {
|
|
14835
14875
|
for (; ; ) {
|
|
14836
14876
|
const { done: A, value: O } = await m.read();
|
|
@@ -14838,7 +14878,7 @@ function Xm() {
|
|
|
14838
14878
|
const k = x.decode(O);
|
|
14839
14879
|
G += k;
|
|
14840
14880
|
let j;
|
|
14841
|
-
for (; j =
|
|
14881
|
+
for (; j = rw(G); )
|
|
14842
14882
|
if (G = G.slice(j.length), j.trim().startsWith("data: ")) {
|
|
14843
14883
|
const R = j.slice(6).trim();
|
|
14844
14884
|
if (R === "[DONE]")
|
|
@@ -14870,7 +14910,7 @@ function Xm() {
|
|
|
14870
14910
|
v.close();
|
|
14871
14911
|
}
|
|
14872
14912
|
});
|
|
14873
|
-
return new Response(
|
|
14913
|
+
return new Response(N, {
|
|
14874
14914
|
headers: h.headers,
|
|
14875
14915
|
status: h.status,
|
|
14876
14916
|
statusText: h.statusText
|
|
@@ -14882,13 +14922,13 @@ function Xm() {
|
|
|
14882
14922
|
}
|
|
14883
14923
|
};
|
|
14884
14924
|
}
|
|
14885
|
-
function
|
|
14925
|
+
function rw(r) {
|
|
14886
14926
|
const e = r.indexOf(`
|
|
14887
14927
|
|
|
14888
14928
|
`);
|
|
14889
14929
|
return e === -1 ? null : r.slice(0, e + 2);
|
|
14890
14930
|
}
|
|
14891
|
-
const
|
|
14931
|
+
const nw = [
|
|
14892
14932
|
"eeddbb58f57c38894d6d5af5e575fbe791c5bf3bbcfb5df8da8cfcf0c2e1da1913108e6a762112444740b88c163d7f4b",
|
|
14893
14933
|
"74ed417f88cb0ca76c4a3d10f278bd010f1d3f95eafb254d4732511bb50e404507a4049b779c5230137e4091a5582271",
|
|
14894
14934
|
"9043fcab93b972d3c14ad2dc8fa78ca7ad374fc937c02435681772a003f7a72876bc4d578089b5c4cf3fe9b480f1aabb",
|
|
@@ -14896,7 +14936,7 @@ const ew = [
|
|
|
14896
14936
|
"91cb67311e910cce68cd5b7d0de77aa40610d87c6681439b44c46c3ff786ae643956ab2c812478a1da8745b259f07a45",
|
|
14897
14937
|
"859065ac81b81d3735130ba08b8af72a7256b603fefb74faabae25ed28cca6edcaa7c10ea32b5948d675c18a9b0f2b1d",
|
|
14898
14938
|
"acd82a7d3943e23e95a9dc3ce0b0107ea358d6287f9e3afa245622f7c7e3e0a66142a928b6efcc02f594a95366d3a99d"
|
|
14899
|
-
],
|
|
14939
|
+
], iw = [
|
|
14900
14940
|
"62c0407056217a4c10764ed9045694c29fa93255d3cc04c2f989cdd9a1f8050c8b169714c71f1118ebce2fcc9951d1a9",
|
|
14901
14941
|
"cb95519905443f9f66f05f63c548b61ad1561a27fd5717b69285861aaea3c3063fe12a2571773b67fea3c6c11b4d8ec6",
|
|
14902
14942
|
"deb5895831b5e4286f5a2dcf5e9c27383821446f8df2b465f141d10743599be20ba3bb381ce063bf7139cc89f7f61d4c",
|
|
@@ -14905,8 +14945,8 @@ const ew = [
|
|
|
14905
14945
|
"a791bf92c25ffdfd372660e460a0e238c6778c090672df6509ae4bc065cf8668b6baac6b6a11d554af53ee0ff0172ad5",
|
|
14906
14946
|
"c4285443b87b9b12a6cea3bef1064ec060f652b235a297095975af8f134e5ed65f92d70d4616fdec80af9dff48bb9f35"
|
|
14907
14947
|
];
|
|
14908
|
-
function
|
|
14909
|
-
const t = [...(e == null ? void 0 : e.pcr0Values) || [], ...
|
|
14948
|
+
function sw(r, e) {
|
|
14949
|
+
const t = [...(e == null ? void 0 : e.pcr0Values) || [], ...nw], n = [...(e == null ? void 0 : e.pcr0DevValues) || [], ...iw];
|
|
14910
14950
|
return t.includes(r) ? {
|
|
14911
14951
|
isMatch: !0,
|
|
14912
14952
|
text: "PCR0 matches a known good value"
|
|
@@ -14919,19 +14959,19 @@ function rw(r, e) {
|
|
|
14919
14959
|
};
|
|
14920
14960
|
}
|
|
14921
14961
|
const ts = Ua, Dc = "641a0321a3e244efe456463195d606317ed7cdcc3c1756e09893f3c68f79bb5b";
|
|
14922
|
-
function
|
|
14962
|
+
function Ay(r) {
|
|
14923
14963
|
return Array.from(r).map((e) => e.toString(16).padStart(2, "0")).join("");
|
|
14924
14964
|
}
|
|
14925
|
-
async function
|
|
14965
|
+
async function ow(r) {
|
|
14926
14966
|
const e = await crypto.subtle.digest("SHA-256", r);
|
|
14927
|
-
return
|
|
14967
|
+
return Ay(new Uint8Array(e));
|
|
14928
14968
|
}
|
|
14929
14969
|
async function rs(r, e, t) {
|
|
14930
14970
|
console.log("Raw timestamp:", r.timestamp), console.log("Date object:", new Date(r.timestamp));
|
|
14931
14971
|
const n = Array.from(r.pcrs.entries()).map(([m, x]) => ({
|
|
14932
14972
|
id: m,
|
|
14933
|
-
value:
|
|
14934
|
-
})).filter((m) => !m.value.match(/^0+$/)), i = n.find((m) => m.id === 0), s = i ?
|
|
14973
|
+
value: Ay(x)
|
|
14974
|
+
})).filter((m) => !m.value.match(/^0+$/)), i = n.find((m) => m.id === 0), s = i ? sw(i.value, t) : null, o = [...e, r.certificate].map((m) => {
|
|
14935
14975
|
const x = new wi(m);
|
|
14936
14976
|
return {
|
|
14937
14977
|
subject: x.subject,
|
|
@@ -14940,7 +14980,7 @@ async function rs(r, e, t) {
|
|
|
14940
14980
|
pem: x.toString("pem"),
|
|
14941
14981
|
isRoot: x.subject === "C=US, O=Amazon, OU=AWS, CN=aws.nitro-enclaves"
|
|
14942
14982
|
};
|
|
14943
|
-
}), c = new TextDecoder(), u = new wi(e[0]), h = await
|
|
14983
|
+
}), c = new TextDecoder(), u = new wi(e[0]), h = await ow(u.rawData);
|
|
14944
14984
|
return {
|
|
14945
14985
|
moduleId: r.module_id,
|
|
14946
14986
|
publicKey: r.public_key ? $r(r.public_key) : null,
|
|
@@ -14962,7 +15002,7 @@ async function rs(r, e, t) {
|
|
|
14962
15002
|
validatedPcr0Hash: s
|
|
14963
15003
|
};
|
|
14964
15004
|
}
|
|
14965
|
-
const
|
|
15005
|
+
const Sy = md({
|
|
14966
15006
|
auth: {
|
|
14967
15007
|
loading: !0,
|
|
14968
15008
|
user: void 0
|
|
@@ -14984,16 +15024,16 @@ const by = md({
|
|
|
14984
15024
|
},
|
|
14985
15025
|
signOut: async () => {
|
|
14986
15026
|
},
|
|
14987
|
-
get:
|
|
14988
|
-
put:
|
|
14989
|
-
list:
|
|
14990
|
-
del:
|
|
14991
|
-
verifyEmail:
|
|
15027
|
+
get: py,
|
|
15028
|
+
put: hy,
|
|
15029
|
+
list: yy,
|
|
15030
|
+
del: dy,
|
|
15031
|
+
verifyEmail: gy,
|
|
14992
15032
|
requestNewVerificationCode: $a,
|
|
14993
15033
|
requestNewVerificationEmail: $a,
|
|
14994
15034
|
refetchUser: async () => {
|
|
14995
15035
|
},
|
|
14996
|
-
changePassword:
|
|
15036
|
+
changePassword: vy,
|
|
14997
15037
|
refreshAccessToken: Uc,
|
|
14998
15038
|
requestPasswordReset: async () => {
|
|
14999
15039
|
},
|
|
@@ -15005,10 +15045,10 @@ const by = md({
|
|
|
15005
15045
|
initiateGoogleAuth: async () => ({ auth_url: "", csrf_token: "" }),
|
|
15006
15046
|
handleGoogleCallback: async () => {
|
|
15007
15047
|
},
|
|
15008
|
-
getPrivateKey:
|
|
15009
|
-
getPrivateKeyBytes:
|
|
15010
|
-
getPublicKey:
|
|
15011
|
-
signMessage:
|
|
15048
|
+
getPrivateKey: my,
|
|
15049
|
+
getPrivateKeyBytes: wy,
|
|
15050
|
+
getPublicKey: xy,
|
|
15051
|
+
signMessage: by,
|
|
15012
15052
|
aiCustomFetch: async () => new Response(),
|
|
15013
15053
|
apiUrl: "",
|
|
15014
15054
|
pcrConfig: {},
|
|
@@ -15022,7 +15062,7 @@ const by = md({
|
|
|
15022
15062
|
},
|
|
15023
15063
|
generateThirdPartyToken: async () => ({ token: "" })
|
|
15024
15064
|
});
|
|
15025
|
-
function
|
|
15065
|
+
function ax({
|
|
15026
15066
|
children: r,
|
|
15027
15067
|
apiUrl: e,
|
|
15028
15068
|
clientId: t,
|
|
@@ -15041,12 +15081,12 @@ function ix({
|
|
|
15041
15081
|
throw new Error(
|
|
15042
15082
|
"OpenSecretProvider requires a non-empty clientId. Please provide a valid project UUID."
|
|
15043
15083
|
);
|
|
15044
|
-
|
|
15084
|
+
Dm(e), Promise.resolve().then(() => bd).then(({ apiConfig: X }) => {
|
|
15045
15085
|
const re = X.platformApiUrl || "";
|
|
15046
15086
|
X.configure(e, re);
|
|
15047
15087
|
});
|
|
15048
15088
|
}, [e, t]), Os(() => {
|
|
15049
|
-
i.user ? c(() =>
|
|
15089
|
+
i.user ? c(() => tw()) : c(void 0);
|
|
15050
15090
|
}, [i.user]);
|
|
15051
15091
|
async function u() {
|
|
15052
15092
|
const X = window.localStorage.getItem("access_token"), re = window.localStorage.getItem("refresh_token");
|
|
@@ -15058,7 +15098,7 @@ function ix({
|
|
|
15058
15098
|
return;
|
|
15059
15099
|
}
|
|
15060
15100
|
try {
|
|
15061
|
-
const Y = await
|
|
15101
|
+
const Y = await Fm();
|
|
15062
15102
|
s({
|
|
15063
15103
|
loading: !1,
|
|
15064
15104
|
user: Y
|
|
@@ -15076,7 +15116,7 @@ function ix({
|
|
|
15076
15116
|
async function h(X, re) {
|
|
15077
15117
|
console.log("Signing in");
|
|
15078
15118
|
try {
|
|
15079
|
-
const { access_token: Y, refresh_token: ye } = await
|
|
15119
|
+
const { access_token: Y, refresh_token: ye } = await Mm(X, re, t);
|
|
15080
15120
|
window.localStorage.setItem("access_token", Y), window.localStorage.setItem("refresh_token", ye), await u();
|
|
15081
15121
|
} catch (Y) {
|
|
15082
15122
|
throw console.error(Y), Y;
|
|
@@ -15084,14 +15124,14 @@ function ix({
|
|
|
15084
15124
|
}
|
|
15085
15125
|
async function m(X, re, Y, ye) {
|
|
15086
15126
|
try {
|
|
15087
|
-
const { access_token: Fe, refresh_token:
|
|
15127
|
+
const { access_token: Fe, refresh_token: lt } = await Lm(
|
|
15088
15128
|
X,
|
|
15089
15129
|
re,
|
|
15090
15130
|
Y,
|
|
15091
15131
|
t,
|
|
15092
15132
|
ye || null
|
|
15093
15133
|
);
|
|
15094
|
-
window.localStorage.setItem("access_token", Fe), window.localStorage.setItem("refresh_token",
|
|
15134
|
+
window.localStorage.setItem("access_token", Fe), window.localStorage.setItem("refresh_token", lt), await u();
|
|
15095
15135
|
} catch (Fe) {
|
|
15096
15136
|
throw console.error(Fe), Fe;
|
|
15097
15137
|
}
|
|
@@ -15099,7 +15139,7 @@ function ix({
|
|
|
15099
15139
|
async function x(X, re) {
|
|
15100
15140
|
console.log("Signing in Guest");
|
|
15101
15141
|
try {
|
|
15102
|
-
const { access_token: Y, refresh_token: ye } = await
|
|
15142
|
+
const { access_token: Y, refresh_token: ye } = await Vm(X, re, t);
|
|
15103
15143
|
window.localStorage.setItem("access_token", Y), window.localStorage.setItem("refresh_token", ye), await u();
|
|
15104
15144
|
} catch (Y) {
|
|
15105
15145
|
throw console.error(Y), Y;
|
|
@@ -15107,7 +15147,7 @@ function ix({
|
|
|
15107
15147
|
}
|
|
15108
15148
|
async function G(X, re) {
|
|
15109
15149
|
try {
|
|
15110
|
-
const { access_token: Y, refresh_token: ye, id: Fe } = await
|
|
15150
|
+
const { access_token: Y, refresh_token: ye, id: Fe } = await Hm(
|
|
15111
15151
|
X,
|
|
15112
15152
|
re,
|
|
15113
15153
|
t
|
|
@@ -15117,9 +15157,9 @@ function ix({
|
|
|
15117
15157
|
throw console.error(Y), Y;
|
|
15118
15158
|
}
|
|
15119
15159
|
}
|
|
15120
|
-
async function
|
|
15160
|
+
async function N(X, re, Y) {
|
|
15121
15161
|
try {
|
|
15122
|
-
await
|
|
15162
|
+
await Qm(X, re, Y), await u();
|
|
15123
15163
|
} catch (ye) {
|
|
15124
15164
|
throw console.error(ye), ye;
|
|
15125
15165
|
}
|
|
@@ -15128,7 +15168,7 @@ function ix({
|
|
|
15128
15168
|
const X = window.localStorage.getItem("refresh_token");
|
|
15129
15169
|
if (X)
|
|
15130
15170
|
try {
|
|
15131
|
-
await
|
|
15171
|
+
await zm(X);
|
|
15132
15172
|
} catch (re) {
|
|
15133
15173
|
console.error("Error during logout:", re);
|
|
15134
15174
|
}
|
|
@@ -15145,29 +15185,29 @@ function ix({
|
|
|
15145
15185
|
signOut: v,
|
|
15146
15186
|
signUp: m,
|
|
15147
15187
|
signUpGuest: G,
|
|
15148
|
-
convertGuestToUserAccount:
|
|
15149
|
-
get:
|
|
15150
|
-
put:
|
|
15151
|
-
list:
|
|
15152
|
-
del:
|
|
15188
|
+
convertGuestToUserAccount: N,
|
|
15189
|
+
get: py,
|
|
15190
|
+
put: hy,
|
|
15191
|
+
list: yy,
|
|
15192
|
+
del: dy,
|
|
15153
15193
|
refetchUser: u,
|
|
15154
|
-
verifyEmail:
|
|
15194
|
+
verifyEmail: gy,
|
|
15155
15195
|
requestNewVerificationCode: $a,
|
|
15156
15196
|
requestNewVerificationEmail: $a,
|
|
15157
|
-
changePassword:
|
|
15197
|
+
changePassword: vy,
|
|
15158
15198
|
refreshAccessToken: Uc,
|
|
15159
|
-
requestPasswordReset: (X, re) =>
|
|
15160
|
-
confirmPasswordReset: (X, re, Y, ye) =>
|
|
15199
|
+
requestPasswordReset: (X, re) => Zm(X, re, t),
|
|
15200
|
+
confirmPasswordReset: (X, re, Y, ye) => qm(X, re, Y, ye, t),
|
|
15161
15201
|
initiateGitHubAuth: async (X) => {
|
|
15162
15202
|
try {
|
|
15163
|
-
return await
|
|
15203
|
+
return await Wm(t, X);
|
|
15164
15204
|
} catch (re) {
|
|
15165
15205
|
throw console.error("Failed to initiate GitHub auth:", re), re;
|
|
15166
15206
|
}
|
|
15167
15207
|
},
|
|
15168
15208
|
handleGitHubCallback: async (X, re, Y) => {
|
|
15169
15209
|
try {
|
|
15170
|
-
const { access_token: ye, refresh_token: Fe } = await
|
|
15210
|
+
const { access_token: ye, refresh_token: Fe } = await Ym(
|
|
15171
15211
|
X,
|
|
15172
15212
|
re,
|
|
15173
15213
|
Y
|
|
@@ -15179,14 +15219,14 @@ function ix({
|
|
|
15179
15219
|
},
|
|
15180
15220
|
initiateGoogleAuth: async (X) => {
|
|
15181
15221
|
try {
|
|
15182
|
-
return await
|
|
15222
|
+
return await Jm(t, X);
|
|
15183
15223
|
} catch (re) {
|
|
15184
15224
|
throw console.error("Failed to initiate Google auth:", re), re;
|
|
15185
15225
|
}
|
|
15186
15226
|
},
|
|
15187
15227
|
handleGoogleCallback: async (X, re, Y) => {
|
|
15188
15228
|
try {
|
|
15189
|
-
const { access_token: ye, refresh_token: Fe } = await
|
|
15229
|
+
const { access_token: ye, refresh_token: Fe } = await Xm(
|
|
15190
15230
|
X,
|
|
15191
15231
|
re,
|
|
15192
15232
|
Y
|
|
@@ -15196,10 +15236,10 @@ function ix({
|
|
|
15196
15236
|
throw console.error("Google callback error:", ye), ye;
|
|
15197
15237
|
}
|
|
15198
15238
|
},
|
|
15199
|
-
getPrivateKey:
|
|
15200
|
-
getPrivateKeyBytes:
|
|
15201
|
-
getPublicKey:
|
|
15202
|
-
signMessage:
|
|
15239
|
+
getPrivateKey: my,
|
|
15240
|
+
getPrivateKeyBytes: wy,
|
|
15241
|
+
getPublicKey: xy,
|
|
15242
|
+
signMessage: by,
|
|
15203
15243
|
aiCustomFetch: o || (async () => new Response()),
|
|
15204
15244
|
apiUrl: e,
|
|
15205
15245
|
pcrConfig: n,
|
|
@@ -15219,11 +15259,11 @@ function ix({
|
|
|
15219
15259
|
);
|
|
15220
15260
|
return rs(ye, ye.cabundle, n);
|
|
15221
15261
|
},
|
|
15222
|
-
generateThirdPartyToken:
|
|
15262
|
+
generateThirdPartyToken: ew
|
|
15223
15263
|
};
|
|
15224
|
-
return /* @__PURE__ */ vd(
|
|
15264
|
+
return /* @__PURE__ */ vd(Sy.Provider, { value: le, children: r });
|
|
15225
15265
|
}
|
|
15226
|
-
const
|
|
15266
|
+
const _y = md({
|
|
15227
15267
|
auth: {
|
|
15228
15268
|
loading: !0,
|
|
15229
15269
|
developer: void 0
|
|
@@ -15243,6 +15283,9 @@ const xy = md({
|
|
|
15243
15283
|
verifyEmail: ay,
|
|
15244
15284
|
requestNewVerificationCode: Da,
|
|
15245
15285
|
requestNewVerificationEmail: Da,
|
|
15286
|
+
requestPasswordReset: cy,
|
|
15287
|
+
confirmPasswordReset: ly,
|
|
15288
|
+
changePassword: uy,
|
|
15246
15289
|
pcrConfig: {},
|
|
15247
15290
|
getAttestation: _i,
|
|
15248
15291
|
authenticate: Si,
|
|
@@ -15277,7 +15320,7 @@ const xy = md({
|
|
|
15277
15320
|
acceptInvite: oy,
|
|
15278
15321
|
apiUrl: ""
|
|
15279
15322
|
});
|
|
15280
|
-
function
|
|
15323
|
+
function cx({
|
|
15281
15324
|
children: r,
|
|
15282
15325
|
apiUrl: e,
|
|
15283
15326
|
pcrConfig: t = {}
|
|
@@ -15291,7 +15334,7 @@ function sx({
|
|
|
15291
15334
|
throw new Error(
|
|
15292
15335
|
"OpenSecretDeveloper requires a non-empty apiUrl. Please provide a valid API endpoint URL."
|
|
15293
15336
|
);
|
|
15294
|
-
|
|
15337
|
+
Om(e), Promise.resolve().then(() => bd).then(({ apiConfig: m }) => {
|
|
15295
15338
|
const x = m.appApiUrl || "";
|
|
15296
15339
|
m.configure(x, e);
|
|
15297
15340
|
});
|
|
@@ -15306,7 +15349,7 @@ function sx({
|
|
|
15306
15349
|
return;
|
|
15307
15350
|
}
|
|
15308
15351
|
try {
|
|
15309
|
-
const G = await
|
|
15352
|
+
const G = await Um();
|
|
15310
15353
|
i({
|
|
15311
15354
|
loading: !1,
|
|
15312
15355
|
developer: {
|
|
@@ -15325,34 +15368,35 @@ function sx({
|
|
|
15325
15368
|
const m = window.crypto.randomUUID(), x = await fetch(`${e}/attestation/${m}`);
|
|
15326
15369
|
if (!x.ok)
|
|
15327
15370
|
throw new Error("Failed to fetch attestation document");
|
|
15328
|
-
const G = await x.json(),
|
|
15371
|
+
const G = await x.json(), N = await Si(
|
|
15329
15372
|
G.attestation_document,
|
|
15330
15373
|
ts,
|
|
15331
15374
|
m
|
|
15332
15375
|
);
|
|
15333
|
-
return rs(
|
|
15376
|
+
return rs(N, N.cabundle, t);
|
|
15334
15377
|
};
|
|
15335
15378
|
Os(() => {
|
|
15336
15379
|
s();
|
|
15337
15380
|
}, []);
|
|
15338
15381
|
async function c(m, x) {
|
|
15339
15382
|
try {
|
|
15340
|
-
const { access_token: G, refresh_token:
|
|
15341
|
-
return window.localStorage.setItem("access_token", G), window.localStorage.setItem("refresh_token",
|
|
15383
|
+
const { access_token: G, refresh_token: N } = await Tm(m, x);
|
|
15384
|
+
return window.localStorage.setItem("access_token", G), window.localStorage.setItem("refresh_token", N), await s(), { access_token: G, refresh_token: N, id: "", email: m };
|
|
15342
15385
|
} catch (G) {
|
|
15343
15386
|
throw console.error("Login error:", G), G;
|
|
15344
15387
|
}
|
|
15345
15388
|
}
|
|
15346
|
-
async function u(m, x, G) {
|
|
15389
|
+
async function u(m, x, G, N) {
|
|
15347
15390
|
try {
|
|
15348
|
-
const { access_token:
|
|
15391
|
+
const { access_token: v, refresh_token: A } = await Nm(
|
|
15349
15392
|
m,
|
|
15350
15393
|
x,
|
|
15351
|
-
G
|
|
15394
|
+
G,
|
|
15395
|
+
N
|
|
15352
15396
|
);
|
|
15353
|
-
return window.localStorage.setItem("access_token",
|
|
15354
|
-
} catch (
|
|
15355
|
-
throw console.error("Registration error:",
|
|
15397
|
+
return window.localStorage.setItem("access_token", v), window.localStorage.setItem("refresh_token", A), await s(), { access_token: v, refresh_token: A, id: "", email: m, name: N };
|
|
15398
|
+
} catch (v) {
|
|
15399
|
+
throw console.error("Registration error:", v), v;
|
|
15356
15400
|
}
|
|
15357
15401
|
}
|
|
15358
15402
|
const h = {
|
|
@@ -15364,7 +15408,7 @@ function sx({
|
|
|
15364
15408
|
const m = window.localStorage.getItem("refresh_token");
|
|
15365
15409
|
if (m)
|
|
15366
15410
|
try {
|
|
15367
|
-
await
|
|
15411
|
+
await jm(m);
|
|
15368
15412
|
} catch (x) {
|
|
15369
15413
|
console.error("Error during logout:", x);
|
|
15370
15414
|
}
|
|
@@ -15376,6 +15420,9 @@ function sx({
|
|
|
15376
15420
|
verifyEmail: ay,
|
|
15377
15421
|
requestNewVerificationCode: Da,
|
|
15378
15422
|
requestNewVerificationEmail: Da,
|
|
15423
|
+
requestPasswordReset: cy,
|
|
15424
|
+
confirmPasswordReset: ly,
|
|
15425
|
+
changePassword: uy,
|
|
15379
15426
|
pcrConfig: t,
|
|
15380
15427
|
getAttestation: _i,
|
|
15381
15428
|
authenticate: Si,
|
|
@@ -15408,30 +15455,30 @@ function sx({
|
|
|
15408
15455
|
acceptInvite: oy,
|
|
15409
15456
|
apiUrl: e
|
|
15410
15457
|
};
|
|
15411
|
-
return /* @__PURE__ */ vd(
|
|
15458
|
+
return /* @__PURE__ */ vd(_y.Provider, { value: h, children: r });
|
|
15412
15459
|
}
|
|
15413
|
-
function
|
|
15414
|
-
return wd(
|
|
15460
|
+
function lx() {
|
|
15461
|
+
return wd(Sy);
|
|
15415
15462
|
}
|
|
15416
|
-
function
|
|
15417
|
-
return wd(
|
|
15463
|
+
function ux() {
|
|
15464
|
+
return wd(_y);
|
|
15418
15465
|
}
|
|
15419
|
-
function
|
|
15466
|
+
function fx() {
|
|
15420
15467
|
const r = new Uint8Array(32);
|
|
15421
15468
|
return crypto.getRandomValues(r), Array.from(r, (e) => e.toString(16).padStart(2, "0")).join("");
|
|
15422
15469
|
}
|
|
15423
|
-
async function
|
|
15470
|
+
async function hx(r) {
|
|
15424
15471
|
const t = new TextEncoder().encode(r), n = await crypto.subtle.digest("SHA-256", t);
|
|
15425
15472
|
return Array.from(new Uint8Array(n)).map((s) => s.toString(16).padStart(2, "0")).join("");
|
|
15426
15473
|
}
|
|
15427
15474
|
export {
|
|
15428
|
-
|
|
15429
|
-
|
|
15430
|
-
|
|
15431
|
-
|
|
15475
|
+
Sy as OpenSecretContext,
|
|
15476
|
+
cx as OpenSecretDeveloper,
|
|
15477
|
+
_y as OpenSecretDeveloperContext,
|
|
15478
|
+
ax as OpenSecretProvider,
|
|
15432
15479
|
Ho as apiConfig,
|
|
15433
|
-
|
|
15434
|
-
|
|
15435
|
-
|
|
15436
|
-
|
|
15480
|
+
fx as generateSecureSecret,
|
|
15481
|
+
hx as hashSecret,
|
|
15482
|
+
lx as useOpenSecret,
|
|
15483
|
+
ux as useOpenSecretDeveloper
|
|
15437
15484
|
};
|