@zama-fhe/relayer-sdk 0.2.0-4 → 0.2.0-6
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/bundle/kms_lib_bg.wasm +0 -0
- package/bundle/relayer-sdk-js.js +921 -902
- package/bundle/relayer-sdk-js.umd.cjs +7 -7
- package/lib/kms_lib_bg.wasm +0 -0
- package/lib/node.cjs +2 -1
- package/lib/node.js +2 -1
- package/lib/web.js +27 -4
- package/package.json +3 -3
package/bundle/relayer-sdk-js.js
CHANGED
|
@@ -50,8 +50,8 @@ function Wg(n) {
|
|
|
50
50
|
var Nu = {};
|
|
51
51
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
52
52
|
Nu.read = function(n, t, e, r, i) {
|
|
53
|
-
var o, a, u = i * 8 - r - 1, _ = (1 << u) - 1, l = _ >> 1, f = -7, w = e ? i - 1 : 0, y = e ? -1 : 1,
|
|
54
|
-
for (w += y, o =
|
|
53
|
+
var o, a, u = i * 8 - r - 1, _ = (1 << u) - 1, l = _ >> 1, f = -7, w = e ? i - 1 : 0, y = e ? -1 : 1, B = n[t + w];
|
|
54
|
+
for (w += y, o = B & (1 << -f) - 1, B >>= -f, f += u; f > 0; o = o * 256 + n[t + w], w += y, f -= 8)
|
|
55
55
|
;
|
|
56
56
|
for (a = o & (1 << -f) - 1, o >>= -f, f += r; f > 0; a = a * 256 + n[t + w], w += y, f -= 8)
|
|
57
57
|
;
|
|
@@ -59,18 +59,18 @@ Nu.read = function(n, t, e, r, i) {
|
|
|
59
59
|
o = 1 - l;
|
|
60
60
|
else {
|
|
61
61
|
if (o === _)
|
|
62
|
-
return a ? NaN : (
|
|
62
|
+
return a ? NaN : (B ? -1 : 1) * (1 / 0);
|
|
63
63
|
a = a + Math.pow(2, r), o = o - l;
|
|
64
64
|
}
|
|
65
|
-
return (
|
|
65
|
+
return (B ? -1 : 1) * a * Math.pow(2, o - r);
|
|
66
66
|
};
|
|
67
67
|
Nu.write = function(n, t, e, r, i, o) {
|
|
68
|
-
var a, u, _, l = o * 8 - i - 1, f = (1 << l) - 1, w = f >> 1, y = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0,
|
|
69
|
-
for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (u = isNaN(t) ? 1 : 0, a = f) : (a = Math.floor(Math.log(t) / Math.LN2), t * (_ = Math.pow(2, -a)) < 1 && (a--, _ *= 2), a + w >= 1 ? t += y / _ : t += y * Math.pow(2, 1 - w), t * _ >= 2 && (a++, _ /= 2), a + w >= f ? (u = 0, a = f) : a + w >= 1 ? (u = (t * _ - 1) * Math.pow(2, i), a = a + w) : (u = t * Math.pow(2, w - 1) * Math.pow(2, i), a = 0)); i >= 8; n[e +
|
|
68
|
+
var a, u, _, l = o * 8 - i - 1, f = (1 << l) - 1, w = f >> 1, y = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, B = r ? 0 : o - 1, F = r ? 1 : -1, k = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
|
|
69
|
+
for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (u = isNaN(t) ? 1 : 0, a = f) : (a = Math.floor(Math.log(t) / Math.LN2), t * (_ = Math.pow(2, -a)) < 1 && (a--, _ *= 2), a + w >= 1 ? t += y / _ : t += y * Math.pow(2, 1 - w), t * _ >= 2 && (a++, _ /= 2), a + w >= f ? (u = 0, a = f) : a + w >= 1 ? (u = (t * _ - 1) * Math.pow(2, i), a = a + w) : (u = t * Math.pow(2, w - 1) * Math.pow(2, i), a = 0)); i >= 8; n[e + B] = u & 255, B += F, u /= 256, i -= 8)
|
|
70
70
|
;
|
|
71
|
-
for (a = a << i | u, l += i; l > 0; n[e +
|
|
71
|
+
for (a = a << i | u, l += i; l > 0; n[e + B] = a & 255, B += F, a /= 256, l -= 8)
|
|
72
72
|
;
|
|
73
|
-
n[e +
|
|
73
|
+
n[e + B - F] |= k * 128;
|
|
74
74
|
};
|
|
75
75
|
/*!
|
|
76
76
|
* The buffer module from node.js, for the browser.
|
|
@@ -162,14 +162,14 @@ Nu.write = function(n, t, e, r, i, o) {
|
|
|
162
162
|
if (b < 0)
|
|
163
163
|
throw new RangeError('The value "' + b + '" is invalid for option "size"');
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function B(b, h, d) {
|
|
166
166
|
return y(b), b <= 0 ? l(b) : h !== void 0 ? typeof d == "string" ? l(b).fill(h, d) : l(b).fill(h) : l(b);
|
|
167
167
|
}
|
|
168
168
|
f.alloc = function(b, h, d) {
|
|
169
|
-
return
|
|
169
|
+
return B(b, h, d);
|
|
170
170
|
};
|
|
171
171
|
function F(b) {
|
|
172
|
-
return y(b), l(b < 0 ? 0 :
|
|
172
|
+
return y(b), l(b < 0 ? 0 : z(b) | 0);
|
|
173
173
|
}
|
|
174
174
|
f.allocUnsafe = function(b) {
|
|
175
175
|
return F(b);
|
|
@@ -185,7 +185,7 @@ Nu.write = function(n, t, e, r, i, o) {
|
|
|
185
185
|
return U !== d && (P = P.slice(0, U)), P;
|
|
186
186
|
}
|
|
187
187
|
function T(b) {
|
|
188
|
-
const h = b.length < 0 ? 0 :
|
|
188
|
+
const h = b.length < 0 ? 0 : z(b.length) | 0, d = l(h);
|
|
189
189
|
for (let P = 0; P < h; P += 1)
|
|
190
190
|
d[P] = b[P] & 255;
|
|
191
191
|
return d;
|
|
@@ -207,7 +207,7 @@ Nu.write = function(n, t, e, r, i, o) {
|
|
|
207
207
|
}
|
|
208
208
|
function S(b) {
|
|
209
209
|
if (f.isBuffer(b)) {
|
|
210
|
-
const h =
|
|
210
|
+
const h = z(b.length) | 0, d = l(h);
|
|
211
211
|
return d.length === 0 || b.copy(d, 0, 0, h), d;
|
|
212
212
|
}
|
|
213
213
|
if (b.length !== void 0)
|
|
@@ -215,7 +215,7 @@ Nu.write = function(n, t, e, r, i, o) {
|
|
|
215
215
|
if (b.type === "Buffer" && Array.isArray(b.data))
|
|
216
216
|
return T(b.data);
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function z(b) {
|
|
219
219
|
if (b >= i)
|
|
220
220
|
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + i.toString(16) + " bytes");
|
|
221
221
|
return b | 0;
|
|
@@ -406,7 +406,7 @@ Nu.write = function(n, t, e, r, i, o) {
|
|
|
406
406
|
}
|
|
407
407
|
return st < kt ? -1 : kt < st ? 1 : 0;
|
|
408
408
|
};
|
|
409
|
-
function
|
|
409
|
+
function $(b, h, d, P, U) {
|
|
410
410
|
if (b.length === 0) return -1;
|
|
411
411
|
if (typeof d == "string" ? (P = d, d = 0) : d > 2147483647 ? d = 2147483647 : d < -2147483648 && (d = -2147483648), d = +d, Ee(d) && (d = U ? 0 : b.length - 1), d < 0 && (d = b.length + d), d >= b.length) {
|
|
412
412
|
if (U) return -1;
|
|
@@ -453,9 +453,9 @@ Nu.write = function(n, t, e, r, i, o) {
|
|
|
453
453
|
f.prototype.includes = function(h, d, P) {
|
|
454
454
|
return this.indexOf(h, d, P) !== -1;
|
|
455
455
|
}, f.prototype.indexOf = function(h, d, P) {
|
|
456
|
-
return
|
|
456
|
+
return $(this, h, d, P, !0);
|
|
457
457
|
}, f.prototype.lastIndexOf = function(h, d, P) {
|
|
458
|
-
return
|
|
458
|
+
return $(this, h, d, P, !1);
|
|
459
459
|
};
|
|
460
460
|
function ut(b, h, d, P) {
|
|
461
461
|
d = Number(d) || 0;
|
|
@@ -880,11 +880,11 @@ Nu.write = function(n, t, e, r, i, o) {
|
|
|
880
880
|
"ERR_OUT_OF_RANGE",
|
|
881
881
|
function(b, h, d) {
|
|
882
882
|
let P = `The value of "${b}" is out of range.`, U = d;
|
|
883
|
-
return Number.isInteger(d) && Math.abs(d) > 2 ** 32 ? U =
|
|
883
|
+
return Number.isInteger(d) && Math.abs(d) > 2 ** 32 ? U = et(String(d)) : typeof d == "bigint" && (U = String(d), (d > BigInt(2) ** BigInt(32) || d < -(BigInt(2) ** BigInt(32))) && (U = et(U)), U += "n"), P += ` It must be ${h}. Received ${U}`, P;
|
|
884
884
|
},
|
|
885
885
|
RangeError
|
|
886
886
|
);
|
|
887
|
-
function
|
|
887
|
+
function et(b) {
|
|
888
888
|
let h = "", d = b.length;
|
|
889
889
|
const P = b[0] === "-" ? 1 : 0;
|
|
890
890
|
for (; d >= P + 4; d -= 3)
|
|
@@ -1018,7 +1018,7 @@ Nu.write = function(n, t, e, r, i, o) {
|
|
|
1018
1018
|
throw new Error("BigInt not supported");
|
|
1019
1019
|
}
|
|
1020
1020
|
})(sw);
|
|
1021
|
-
const
|
|
1021
|
+
const Xe = sw.Buffer, Jg = "6.15.0";
|
|
1022
1022
|
function $g(n, t, e) {
|
|
1023
1023
|
const r = t.split("|").map((o) => o.trim());
|
|
1024
1024
|
for (let o = 0; o < r.length; o++)
|
|
@@ -1087,7 +1087,7 @@ function Ae(n, t) {
|
|
|
1087
1087
|
function Lu(n) {
|
|
1088
1088
|
return Ae(n, "CALL_EXCEPTION");
|
|
1089
1089
|
}
|
|
1090
|
-
function
|
|
1090
|
+
function ee(n, t, e) {
|
|
1091
1091
|
let r = n;
|
|
1092
1092
|
{
|
|
1093
1093
|
const o = [];
|
|
@@ -1119,7 +1119,7 @@ function te(n, t, e) {
|
|
|
1119
1119
|
}
|
|
1120
1120
|
function ft(n, t, e, r) {
|
|
1121
1121
|
if (!n)
|
|
1122
|
-
throw
|
|
1122
|
+
throw ee(t, e, r);
|
|
1123
1123
|
}
|
|
1124
1124
|
function V(n, t, e, r) {
|
|
1125
1125
|
ft(n, t, "INVALID_ARGUMENT", { argument: e, value: r });
|
|
@@ -1216,30 +1216,30 @@ function Yn(n, t) {
|
|
|
1216
1216
|
function Yg(n, t) {
|
|
1217
1217
|
return uw(n, t, !1);
|
|
1218
1218
|
}
|
|
1219
|
-
const Uo = BigInt(0),
|
|
1219
|
+
const Uo = BigInt(0), Ye = BigInt(1), Ki = 9007199254740991;
|
|
1220
1220
|
function Zg(n, t) {
|
|
1221
1221
|
const e = Mo(n, "value"), r = BigInt(Tt(t, "width"));
|
|
1222
1222
|
if (ft(e >> r === Uo, "overflow", "NUMERIC_FAULT", {
|
|
1223
1223
|
operation: "fromTwos",
|
|
1224
1224
|
fault: "overflow",
|
|
1225
1225
|
value: n
|
|
1226
|
-
}), e >> r -
|
|
1227
|
-
const i = (
|
|
1228
|
-
return -((~e & i) +
|
|
1226
|
+
}), e >> r - Ye) {
|
|
1227
|
+
const i = (Ye << r) - Ye;
|
|
1228
|
+
return -((~e & i) + Ye);
|
|
1229
1229
|
}
|
|
1230
1230
|
return e;
|
|
1231
1231
|
}
|
|
1232
1232
|
function _w(n, t) {
|
|
1233
1233
|
let e = At(n, "value");
|
|
1234
|
-
const r = BigInt(Tt(t, "width")), i =
|
|
1234
|
+
const r = BigInt(Tt(t, "width")), i = Ye << r - Ye;
|
|
1235
1235
|
if (e < Uo) {
|
|
1236
1236
|
e = -e, ft(e <= i, "too low", "NUMERIC_FAULT", {
|
|
1237
1237
|
operation: "toTwos",
|
|
1238
1238
|
fault: "overflow",
|
|
1239
1239
|
value: n
|
|
1240
1240
|
});
|
|
1241
|
-
const o = (
|
|
1242
|
-
return (~e & o) +
|
|
1241
|
+
const o = (Ye << r) - Ye;
|
|
1242
|
+
return (~e & o) + Ye;
|
|
1243
1243
|
} else
|
|
1244
1244
|
ft(e < i, "too high", "NUMERIC_FAULT", {
|
|
1245
1245
|
operation: "toTwos",
|
|
@@ -1250,7 +1250,7 @@ function _w(n, t) {
|
|
|
1250
1250
|
}
|
|
1251
1251
|
function zs(n, t) {
|
|
1252
1252
|
const e = Mo(n, "value"), r = BigInt(Tt(t, "bits"));
|
|
1253
|
-
return e & (
|
|
1253
|
+
return e & (Ye << r) - Ye;
|
|
1254
1254
|
}
|
|
1255
1255
|
function At(n, t) {
|
|
1256
1256
|
switch (typeof n) {
|
|
@@ -1335,7 +1335,7 @@ function ge(n) {
|
|
|
1335
1335
|
}
|
|
1336
1336
|
return r;
|
|
1337
1337
|
}
|
|
1338
|
-
function
|
|
1338
|
+
function Je(n) {
|
|
1339
1339
|
let t = yt(Du(n) ? n : ge(n)).substring(2);
|
|
1340
1340
|
for (; t.startsWith("0"); )
|
|
1341
1341
|
t = t.substring(1);
|
|
@@ -1501,10 +1501,10 @@ function hw(n) {
|
|
|
1501
1501
|
});
|
|
1502
1502
|
let o = null;
|
|
1503
1503
|
const a = new AbortController(), u = setTimeout(() => {
|
|
1504
|
-
o =
|
|
1504
|
+
o = ee("request timeout", "TIMEOUT"), a.abort();
|
|
1505
1505
|
}, e.timeout);
|
|
1506
1506
|
r && r.addListener(() => {
|
|
1507
|
-
o =
|
|
1507
|
+
o = ee("request cancelled", "CANCELLED"), a.abort();
|
|
1508
1508
|
});
|
|
1509
1509
|
const _ = Object.assign({}, n, {
|
|
1510
1510
|
method: e.method,
|
|
@@ -1515,13 +1515,13 @@ function hw(n) {
|
|
|
1515
1515
|
let l;
|
|
1516
1516
|
try {
|
|
1517
1517
|
l = await fetch(e.url, _);
|
|
1518
|
-
} catch (
|
|
1519
|
-
throw clearTimeout(u), o ||
|
|
1518
|
+
} catch (B) {
|
|
1519
|
+
throw clearTimeout(u), o || B;
|
|
1520
1520
|
}
|
|
1521
1521
|
clearTimeout(u);
|
|
1522
1522
|
const f = {};
|
|
1523
|
-
l.headers.forEach((
|
|
1524
|
-
f[F.toLowerCase()] =
|
|
1523
|
+
l.headers.forEach((B, F) => {
|
|
1524
|
+
f[F.toLowerCase()] = B;
|
|
1525
1525
|
});
|
|
1526
1526
|
const w = await l.arrayBuffer(), y = w == null ? null : new Uint8Array(w);
|
|
1527
1527
|
return {
|
|
@@ -2321,8 +2321,8 @@ class Qn extends Array {
|
|
|
2321
2321
|
const y = Tt(l, "%index");
|
|
2322
2322
|
if (y < 0 || y >= this.length)
|
|
2323
2323
|
throw new RangeError("out of result range");
|
|
2324
|
-
const
|
|
2325
|
-
return
|
|
2324
|
+
const B = _[y];
|
|
2325
|
+
return B instanceof Error && Es(`index ${y}`, B), B;
|
|
2326
2326
|
}
|
|
2327
2327
|
if (d0.indexOf(l) >= 0)
|
|
2328
2328
|
return Reflect.get(_, l, f);
|
|
@@ -2804,13 +2804,13 @@ class B0 extends xw {
|
|
|
2804
2804
|
for (let w = 0; w < 16; w++, e += 4)
|
|
2805
2805
|
ni[w] = t.getUint32(e, !1);
|
|
2806
2806
|
for (let w = 16; w < 64; w++) {
|
|
2807
|
-
const y = ni[w - 15],
|
|
2807
|
+
const y = ni[w - 15], B = ni[w - 2], F = rr(y, 7) ^ rr(y, 18) ^ y >>> 3, k = rr(B, 17) ^ rr(B, 19) ^ B >>> 10;
|
|
2808
2808
|
ni[w] = k + ni[w - 7] + F + ni[w - 16] | 0;
|
|
2809
2809
|
}
|
|
2810
2810
|
let { A: r, B: i, C: o, D: a, E: u, F: _, G: l, H: f } = this;
|
|
2811
2811
|
for (let w = 0; w < 64; w++) {
|
|
2812
|
-
const y = rr(u, 6) ^ rr(u, 11) ^ rr(u, 25),
|
|
2813
|
-
f = l, l = _, _ = u, u = a +
|
|
2812
|
+
const y = rr(u, 6) ^ rr(u, 11) ^ rr(u, 25), B = f + y + x0(u, _, l) + z0[w] + ni[w] | 0, k = (rr(r, 2) ^ rr(r, 13) ^ rr(r, 22)) + R0(r, i, o) | 0;
|
|
2813
|
+
f = l, l = _, _ = u, u = a + B | 0, a = o, o = i, i = r, r = B + k | 0;
|
|
2814
2814
|
}
|
|
2815
2815
|
r = r + this.A | 0, i = i + this.B | 0, o = o + this.C | 0, a = a + this.D | 0, u = u + this.E | 0, _ = _ + this.F | 0, l = l + this.G | 0, f = f + this.H | 0, this.set(r, i, o, a, u, _, l, f);
|
|
2816
2816
|
}
|
|
@@ -2949,28 +2949,28 @@ class Q0 extends xw {
|
|
|
2949
2949
|
}
|
|
2950
2950
|
// prettier-ignore
|
|
2951
2951
|
get() {
|
|
2952
|
-
const { Ah: t, Al: e, Bh: r, Bl: i, Ch: o, Cl: a, Dh: u, Dl: _, Eh: l, El: f, Fh: w, Fl: y, Gh:
|
|
2953
|
-
return [t, e, r, i, o, a, u, _, l, f, w, y,
|
|
2952
|
+
const { Ah: t, Al: e, Bh: r, Bl: i, Ch: o, Cl: a, Dh: u, Dl: _, Eh: l, El: f, Fh: w, Fl: y, Gh: B, Gl: F, Hh: k, Hl: T } = this;
|
|
2953
|
+
return [t, e, r, i, o, a, u, _, l, f, w, y, B, F, k, T];
|
|
2954
2954
|
}
|
|
2955
2955
|
// prettier-ignore
|
|
2956
|
-
set(t, e, r, i, o, a, u, _, l, f, w, y,
|
|
2957
|
-
this.Ah = t | 0, this.Al = e | 0, this.Bh = r | 0, this.Bl = i | 0, this.Ch = o | 0, this.Cl = a | 0, this.Dh = u | 0, this.Dl = _ | 0, this.Eh = l | 0, this.El = f | 0, this.Fh = w | 0, this.Fl = y | 0, this.Gh =
|
|
2956
|
+
set(t, e, r, i, o, a, u, _, l, f, w, y, B, F, k, T) {
|
|
2957
|
+
this.Ah = t | 0, this.Al = e | 0, this.Bh = r | 0, this.Bl = i | 0, this.Ch = o | 0, this.Cl = a | 0, this.Dh = u | 0, this.Dl = _ | 0, this.Eh = l | 0, this.El = f | 0, this.Fh = w | 0, this.Fl = y | 0, this.Gh = B | 0, this.Gl = F | 0, this.Hh = k | 0, this.Hl = T | 0;
|
|
2958
2958
|
}
|
|
2959
2959
|
process(t, e) {
|
|
2960
2960
|
for (let S = 0; S < 16; S++, e += 4)
|
|
2961
2961
|
ii[S] = t.getUint32(e), si[S] = t.getUint32(e += 4);
|
|
2962
2962
|
for (let S = 16; S < 80; S++) {
|
|
2963
|
-
const
|
|
2963
|
+
const z = ii[S - 15] | 0, O = si[S - 15] | 0, C = It.rotrSH(z, O, 1) ^ It.rotrSH(z, O, 8) ^ It.shrSH(z, O, 7), N = It.rotrSL(z, O, 1) ^ It.rotrSL(z, O, 8) ^ It.shrSL(z, O, 7), L = ii[S - 2] | 0, $ = si[S - 2] | 0, nt = It.rotrSH(L, $, 19) ^ It.rotrBH(L, $, 61) ^ It.shrSH(L, $, 6), ut = It.rotrSL(L, $, 19) ^ It.rotrBL(L, $, 61) ^ It.shrSL(L, $, 6), D = It.add4L(N, ut, si[S - 7], si[S - 16]), dt = It.add4H(D, C, nt, ii[S - 7], ii[S - 16]);
|
|
2964
2964
|
ii[S] = dt | 0, si[S] = D | 0;
|
|
2965
2965
|
}
|
|
2966
|
-
let { Ah: r, Al: i, Bh: o, Bl: a, Ch: u, Cl: _, Dh: l, Dl: f, Eh: w, El: y, Fh:
|
|
2966
|
+
let { Ah: r, Al: i, Bh: o, Bl: a, Ch: u, Cl: _, Dh: l, Dl: f, Eh: w, El: y, Fh: B, Fl: F, Gh: k, Gl: T, Hh: A, Hl: x } = this;
|
|
2967
2967
|
for (let S = 0; S < 80; S++) {
|
|
2968
|
-
const
|
|
2969
|
-
A = k | 0, x = T | 0, k =
|
|
2968
|
+
const z = It.rotrSH(w, y, 14) ^ It.rotrSH(w, y, 18) ^ It.rotrBH(w, y, 41), O = It.rotrSL(w, y, 14) ^ It.rotrSL(w, y, 18) ^ It.rotrBL(w, y, 41), C = w & B ^ ~w & k, N = y & F ^ ~y & T, L = It.add5L(x, O, N, q0[S], si[S]), $ = It.add5H(L, A, z, C, V0[S], ii[S]), nt = L | 0, ut = It.rotrSH(r, i, 28) ^ It.rotrBH(r, i, 34) ^ It.rotrBH(r, i, 39), D = It.rotrSL(r, i, 28) ^ It.rotrBL(r, i, 34) ^ It.rotrBL(r, i, 39), dt = r & o ^ r & u ^ o & u, xt = i & a ^ i & _ ^ a & _;
|
|
2969
|
+
A = k | 0, x = T | 0, k = B | 0, T = F | 0, B = w | 0, F = y | 0, { h: w, l: y } = It.add(l | 0, f | 0, $ | 0, nt | 0), l = u | 0, f = _ | 0, u = o | 0, _ = a | 0, o = r | 0, a = i | 0;
|
|
2970
2970
|
const at = It.add3L(nt, D, xt);
|
|
2971
|
-
r = It.add3H(at,
|
|
2971
|
+
r = It.add3H(at, $, ut, dt), i = at | 0;
|
|
2972
2972
|
}
|
|
2973
|
-
({ h: r, l: i } = It.add(this.Ah | 0, this.Al | 0, r | 0, i | 0)), { h: o, l: a } = It.add(this.Bh | 0, this.Bl | 0, o | 0, a | 0), { h: u, l: _ } = It.add(this.Ch | 0, this.Cl | 0, u | 0, _ | 0), { h: l, l: f } = It.add(this.Dh | 0, this.Dl | 0, l | 0, f | 0), { h: w, l: y } = It.add(this.Eh | 0, this.El | 0, w | 0, y | 0), { h:
|
|
2973
|
+
({ h: r, l: i } = It.add(this.Ah | 0, this.Al | 0, r | 0, i | 0)), { h: o, l: a } = It.add(this.Bh | 0, this.Bl | 0, o | 0, a | 0), { h: u, l: _ } = It.add(this.Ch | 0, this.Cl | 0, u | 0, _ | 0), { h: l, l: f } = It.add(this.Dh | 0, this.Dl | 0, l | 0, f | 0), { h: w, l: y } = It.add(this.Eh | 0, this.El | 0, w | 0, y | 0), { h: B, l: F } = It.add(this.Fh | 0, this.Fl | 0, B | 0, F | 0), { h: k, l: T } = It.add(this.Gh | 0, this.Gl | 0, k | 0, T | 0), { h: A, l: x } = It.add(this.Hh | 0, this.Hl | 0, A | 0, x | 0), this.set(r, i, o, a, u, _, l, f, w, y, B, F, k, T, A, x);
|
|
2974
2974
|
}
|
|
2975
2975
|
roundClean() {
|
|
2976
2976
|
ii.fill(0), si.fill(0);
|
|
@@ -3016,8 +3016,8 @@ function ny(n, t = 24) {
|
|
|
3016
3016
|
e[a] = n[a] ^ n[a + 10] ^ n[a + 20] ^ n[a + 30] ^ n[a + 40];
|
|
3017
3017
|
for (let a = 0; a < 10; a += 2) {
|
|
3018
3018
|
const u = (a + 8) % 10, _ = (a + 2) % 10, l = e[_], f = e[_ + 1], w = P_(l, f, 1) ^ e[u], y = F_(l, f, 1) ^ e[u + 1];
|
|
3019
|
-
for (let
|
|
3020
|
-
n[a +
|
|
3019
|
+
for (let B = 0; B < 50; B += 10)
|
|
3020
|
+
n[a + B] ^= w, n[a + B + 1] ^= y;
|
|
3021
3021
|
}
|
|
3022
3022
|
let i = n[2], o = n[3];
|
|
3023
3023
|
for (let a = 0; a < 24; a++) {
|
|
@@ -3188,7 +3188,7 @@ function Ku(n, t) {
|
|
|
3188
3188
|
function cy(n) {
|
|
3189
3189
|
return os(Gw(n));
|
|
3190
3190
|
}
|
|
3191
|
-
function
|
|
3191
|
+
function Ke(n, t, e) {
|
|
3192
3192
|
let r;
|
|
3193
3193
|
if (typeof t == "string")
|
|
3194
3194
|
try {
|
|
@@ -3256,17 +3256,17 @@ function Hw(n, t, e) {
|
|
|
3256
3256
|
const y = [];
|
|
3257
3257
|
for (; w < t; ) {
|
|
3258
3258
|
r = u();
|
|
3259
|
-
const
|
|
3260
|
-
y.push(
|
|
3259
|
+
const B = r.slice();
|
|
3260
|
+
y.push(B), w += r.length;
|
|
3261
3261
|
}
|
|
3262
3262
|
return Ns(...y);
|
|
3263
3263
|
};
|
|
3264
3264
|
return (w, y) => {
|
|
3265
3265
|
a(), _(w);
|
|
3266
|
-
let
|
|
3267
|
-
for (; !(
|
|
3266
|
+
let B;
|
|
3267
|
+
for (; !(B = y(l())); )
|
|
3268
3268
|
_();
|
|
3269
|
-
return a(),
|
|
3269
|
+
return a(), B;
|
|
3270
3270
|
};
|
|
3271
3271
|
}
|
|
3272
3272
|
const py = {
|
|
@@ -3306,7 +3306,7 @@ const wy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3306
3306
|
bytesToNumberLE: Qu,
|
|
3307
3307
|
concatBytes: Ns,
|
|
3308
3308
|
createHmacDrbg: Hw,
|
|
3309
|
-
ensureBytes:
|
|
3309
|
+
ensureBytes: Ke,
|
|
3310
3310
|
equalBytes: uy,
|
|
3311
3311
|
hexToBytes: os,
|
|
3312
3312
|
hexToNumber: qu,
|
|
@@ -3377,11 +3377,11 @@ function yy(n) {
|
|
|
3377
3377
|
for (; !u.eql(y, u.ONE); ) {
|
|
3378
3378
|
if (u.eql(y, u.ZERO))
|
|
3379
3379
|
return u.ZERO;
|
|
3380
|
-
let
|
|
3381
|
-
for (let k = u.sqr(y);
|
|
3380
|
+
let B = 1;
|
|
3381
|
+
for (let k = u.sqr(y); B < l && !u.eql(k, u.ONE); B++)
|
|
3382
3382
|
k = u.sqr(k);
|
|
3383
|
-
const F = u.pow(f, ue << BigInt(l -
|
|
3384
|
-
f = u.sqr(F), w = u.mul(w, F), y = u.mul(y, f), l =
|
|
3383
|
+
const F = u.pow(f, ue << BigInt(l - B - 1));
|
|
3384
|
+
f = u.sqr(F), w = u.mul(w, F), y = u.mul(y, f), l = B;
|
|
3385
3385
|
}
|
|
3386
3386
|
return w;
|
|
3387
3387
|
};
|
|
@@ -3571,13 +3571,13 @@ function By(n, t) {
|
|
|
3571
3571
|
wNAF(i, o, a) {
|
|
3572
3572
|
const { windows: u, windowSize: _ } = r(i);
|
|
3573
3573
|
let l = n.ZERO, f = n.BASE;
|
|
3574
|
-
const w = BigInt(2 ** i - 1), y = 2 ** i,
|
|
3574
|
+
const w = BigInt(2 ** i - 1), y = 2 ** i, B = BigInt(i);
|
|
3575
3575
|
for (let F = 0; F < u; F++) {
|
|
3576
3576
|
const k = F * _;
|
|
3577
3577
|
let T = Number(a & w);
|
|
3578
|
-
a >>=
|
|
3579
|
-
const A = k, x = k + Math.abs(T) - 1, S = F % 2 !== 0,
|
|
3580
|
-
T === 0 ? f = f.add(e(S, o[A])) : l = l.add(e(
|
|
3578
|
+
a >>= B, T > _ && (T -= y, a += ka);
|
|
3579
|
+
const A = k, x = k + Math.abs(T) - 1, S = F % 2 !== 0, z = T < 0;
|
|
3580
|
+
T === 0 ? f = f.add(e(S, o[A])) : l = l.add(e(z, o[x]));
|
|
3581
3581
|
}
|
|
3582
3582
|
return { p: l, f };
|
|
3583
3583
|
},
|
|
@@ -3702,7 +3702,7 @@ function Fy(n) {
|
|
|
3702
3702
|
}
|
|
3703
3703
|
let S;
|
|
3704
3704
|
try {
|
|
3705
|
-
S = typeof F == "bigint" ? F : ki(
|
|
3705
|
+
S = typeof F == "bigint" ? F : ki(Ke("private key", F, T));
|
|
3706
3706
|
} catch {
|
|
3707
3707
|
throw new Error(`private key must be ${T} bytes, hex or bigint, not ${typeof F}`);
|
|
3708
3708
|
}
|
|
@@ -3754,7 +3754,7 @@ function Fy(n) {
|
|
|
3754
3754
|
* @param hex short/long ECDSA hex
|
|
3755
3755
|
*/
|
|
3756
3756
|
static fromHex(k) {
|
|
3757
|
-
const T = w.fromAffine(i(
|
|
3757
|
+
const T = w.fromAffine(i(Ke("pointHex", k)));
|
|
3758
3758
|
return T.assertValidity(), T;
|
|
3759
3759
|
}
|
|
3760
3760
|
// Multiplies generator point by privateKey.
|
|
@@ -3792,7 +3792,7 @@ function Fy(n) {
|
|
|
3792
3792
|
*/
|
|
3793
3793
|
equals(k) {
|
|
3794
3794
|
f(k);
|
|
3795
|
-
const { px: T, py: A, pz: x } = this, { px: S, py:
|
|
3795
|
+
const { px: T, py: A, pz: x } = this, { px: S, py: z, pz: O } = k, C = e.eql(e.mul(T, O), e.mul(S, x)), N = e.eql(e.mul(A, O), e.mul(z, x));
|
|
3796
3796
|
return C && N;
|
|
3797
3797
|
}
|
|
3798
3798
|
/**
|
|
@@ -3806,9 +3806,9 @@ function Fy(n) {
|
|
|
3806
3806
|
// https://eprint.iacr.org/2015/1060, algorithm 3
|
|
3807
3807
|
// Cost: 8M + 3S + 3*a + 2*b3 + 15add.
|
|
3808
3808
|
double() {
|
|
3809
|
-
const { a: k, b: T } = t, A = e.mul(T, C_), { px: x, py: S, pz:
|
|
3810
|
-
let O = e.ZERO, C = e.ZERO, N = e.ZERO, L = e.mul(x, x),
|
|
3811
|
-
return ut = e.add(ut, ut), N = e.mul(x,
|
|
3809
|
+
const { a: k, b: T } = t, A = e.mul(T, C_), { px: x, py: S, pz: z } = this;
|
|
3810
|
+
let O = e.ZERO, C = e.ZERO, N = e.ZERO, L = e.mul(x, x), $ = e.mul(S, S), nt = e.mul(z, z), ut = e.mul(x, S);
|
|
3811
|
+
return ut = e.add(ut, ut), N = e.mul(x, z), N = e.add(N, N), O = e.mul(k, N), C = e.mul(A, nt), C = e.add(O, C), O = e.sub($, C), C = e.add($, C), C = e.mul(O, C), O = e.mul(ut, O), N = e.mul(A, N), nt = e.mul(k, nt), ut = e.sub(L, nt), ut = e.mul(k, ut), ut = e.add(ut, N), N = e.add(L, L), L = e.add(N, L), L = e.add(L, nt), L = e.mul(L, ut), C = e.add(C, L), nt = e.mul(S, z), nt = e.add(nt, nt), L = e.mul(nt, ut), O = e.sub(O, L), N = e.mul(nt, $), N = e.add(N, N), N = e.add(N, N), new w(O, C, N);
|
|
3812
3812
|
}
|
|
3813
3813
|
// Renes-Costello-Batina exception-free addition formula.
|
|
3814
3814
|
// There is 30% faster Jacobian formula, but it is not complete.
|
|
@@ -3816,13 +3816,13 @@ function Fy(n) {
|
|
|
3816
3816
|
// Cost: 12M + 0S + 3*a + 3*b3 + 23add.
|
|
3817
3817
|
add(k) {
|
|
3818
3818
|
f(k);
|
|
3819
|
-
const { px: T, py: A, pz: x } = this, { px: S, py:
|
|
3819
|
+
const { px: T, py: A, pz: x } = this, { px: S, py: z, pz: O } = k;
|
|
3820
3820
|
let C = e.ZERO, N = e.ZERO, L = e.ZERO;
|
|
3821
|
-
const
|
|
3822
|
-
let ut = e.mul(T, S), D = e.mul(A,
|
|
3821
|
+
const $ = t.a, nt = e.mul(t.b, C_);
|
|
3822
|
+
let ut = e.mul(T, S), D = e.mul(A, z), dt = e.mul(x, O), xt = e.add(T, A), at = e.add(S, z);
|
|
3823
3823
|
xt = e.mul(xt, at), at = e.add(ut, D), xt = e.sub(xt, at), at = e.add(T, x);
|
|
3824
3824
|
let ht = e.add(S, O);
|
|
3825
|
-
return at = e.mul(at, ht), ht = e.add(ut, dt), at = e.sub(at, ht), ht = e.add(A, x), C = e.add(
|
|
3825
|
+
return at = e.mul(at, ht), ht = e.add(ut, dt), at = e.sub(at, ht), ht = e.add(A, x), C = e.add(z, O), ht = e.mul(ht, C), C = e.add(D, dt), ht = e.sub(ht, C), L = e.mul($, at), C = e.mul(nt, dt), L = e.add(C, L), C = e.sub(D, L), L = e.add(D, L), N = e.mul(C, L), D = e.add(ut, ut), D = e.add(D, ut), dt = e.mul($, dt), at = e.mul(nt, at), D = e.add(D, dt), dt = e.sub(ut, dt), dt = e.mul($, dt), at = e.add(at, dt), ut = e.mul(D, at), N = e.add(N, ut), ut = e.mul(ht, at), C = e.mul(xt, C), C = e.sub(C, ut), ut = e.mul(xt, D), L = e.mul(ht, L), L = e.add(L, ut), new w(C, N, L);
|
|
3826
3826
|
}
|
|
3827
3827
|
subtract(k) {
|
|
3828
3828
|
return this.add(k.negate());
|
|
@@ -3831,7 +3831,7 @@ function Fy(n) {
|
|
|
3831
3831
|
return this.equals(w.ZERO);
|
|
3832
3832
|
}
|
|
3833
3833
|
wNAF(k) {
|
|
3834
|
-
return
|
|
3834
|
+
return B.wNAFCached(this, l, k, (T) => {
|
|
3835
3835
|
const A = e.invertBatch(T.map((x) => x.pz));
|
|
3836
3836
|
return T.map((x, S) => x.toAffine(A[S])).map(w.fromAffine);
|
|
3837
3837
|
});
|
|
@@ -3849,11 +3849,11 @@ function Fy(n) {
|
|
|
3849
3849
|
return this;
|
|
3850
3850
|
const { endo: A } = t;
|
|
3851
3851
|
if (!A)
|
|
3852
|
-
return
|
|
3853
|
-
let { k1neg: x, k1: S, k2neg:
|
|
3852
|
+
return B.unsafeLadder(this, k);
|
|
3853
|
+
let { k1neg: x, k1: S, k2neg: z, k2: O } = A.splitScalar(k), C = T, N = T, L = this;
|
|
3854
3854
|
for (; S > Vn || O > Vn; )
|
|
3855
3855
|
S & je && (C = C.add(L)), O & je && (N = N.add(L)), L = L.double(), S >>= je, O >>= je;
|
|
3856
|
-
return x && (C = C.negate()),
|
|
3856
|
+
return x && (C = C.negate()), z && (N = N.negate()), N = new w(e.mul(N.px, A.beta), N.py, N.pz), C.add(N);
|
|
3857
3857
|
}
|
|
3858
3858
|
/**
|
|
3859
3859
|
* Constant time multiplication.
|
|
@@ -3869,12 +3869,12 @@ function Fy(n) {
|
|
|
3869
3869
|
let T = k, A, x;
|
|
3870
3870
|
const { endo: S } = t;
|
|
3871
3871
|
if (S) {
|
|
3872
|
-
const { k1neg:
|
|
3873
|
-
let { p: L, f:
|
|
3874
|
-
L =
|
|
3872
|
+
const { k1neg: z, k1: O, k2neg: C, k2: N } = S.splitScalar(T);
|
|
3873
|
+
let { p: L, f: $ } = this.wNAF(O), { p: nt, f: ut } = this.wNAF(N);
|
|
3874
|
+
L = B.constTimeNegate(z, L), nt = B.constTimeNegate(C, nt), nt = new w(e.mul(nt.px, S.beta), nt.py, nt.pz), A = L.add(nt), x = $.add(ut);
|
|
3875
3875
|
} else {
|
|
3876
|
-
const { p:
|
|
3877
|
-
A =
|
|
3876
|
+
const { p: z, f: O } = this.wNAF(T);
|
|
3877
|
+
A = z, x = O;
|
|
3878
3878
|
}
|
|
3879
3879
|
return w.normalizeZ([A, x])[0];
|
|
3880
3880
|
}
|
|
@@ -3885,8 +3885,8 @@ function Fy(n) {
|
|
|
3885
3885
|
* @returns non-zero affine point
|
|
3886
3886
|
*/
|
|
3887
3887
|
multiplyAndAddUnsafe(k, T, A) {
|
|
3888
|
-
const x = w.BASE, S = (O, C) => C === Vn || C === je || !O.equals(x) ? O.multiplyUnsafe(C) : O.multiply(C),
|
|
3889
|
-
return
|
|
3888
|
+
const x = w.BASE, S = (O, C) => C === Vn || C === je || !O.equals(x) ? O.multiplyUnsafe(C) : O.multiply(C), z = S(this, T).add(S(k, A));
|
|
3889
|
+
return z.is0() ? void 0 : z;
|
|
3890
3890
|
}
|
|
3891
3891
|
// Converts Projective point to affine (x, y) coordinates.
|
|
3892
3892
|
// Can accept precomputed Z^-1 - for example, from invertBatch.
|
|
@@ -3894,12 +3894,12 @@ function Fy(n) {
|
|
|
3894
3894
|
toAffine(k) {
|
|
3895
3895
|
const { px: T, py: A, pz: x } = this, S = this.is0();
|
|
3896
3896
|
k == null && (k = S ? e.ONE : e.inv(x));
|
|
3897
|
-
const
|
|
3897
|
+
const z = e.mul(T, k), O = e.mul(A, k), C = e.mul(x, k);
|
|
3898
3898
|
if (S)
|
|
3899
3899
|
return { x: e.ZERO, y: e.ZERO };
|
|
3900
3900
|
if (!e.eql(C, e.ONE))
|
|
3901
3901
|
throw new Error("invZ was invalid");
|
|
3902
|
-
return { x:
|
|
3902
|
+
return { x: z, y: O };
|
|
3903
3903
|
}
|
|
3904
3904
|
isTorsionFree() {
|
|
3905
3905
|
const { h: k, isTorsionFree: T } = t;
|
|
@@ -3921,7 +3921,7 @@ function Fy(n) {
|
|
|
3921
3921
|
}
|
|
3922
3922
|
}
|
|
3923
3923
|
w.BASE = new w(t.Gx, t.Gy, e.ONE), w.ZERO = new w(e.ZERO, e.ONE, e.ZERO);
|
|
3924
|
-
const y = t.nBitLength,
|
|
3924
|
+
const y = t.nBitLength, B = By(w, t.endo ? Math.ceil(y / 2) : y);
|
|
3925
3925
|
return {
|
|
3926
3926
|
CURVE: t,
|
|
3927
3927
|
ProjectivePoint: w,
|
|
@@ -3975,7 +3975,7 @@ function Oy(n) {
|
|
|
3975
3975
|
} else
|
|
3976
3976
|
throw new Error(`Point of length ${ht} was invalid. Expected ${i} compressed bytes or ${o} uncompressed bytes`);
|
|
3977
3977
|
}
|
|
3978
|
-
}),
|
|
3978
|
+
}), B = (at) => ss(as(at, t.nByteLength));
|
|
3979
3979
|
function F(at) {
|
|
3980
3980
|
const ht = r >> je;
|
|
3981
3981
|
return at > ht;
|
|
@@ -3991,12 +3991,12 @@ function Oy(n) {
|
|
|
3991
3991
|
// pair (bytes of r, bytes of s)
|
|
3992
3992
|
static fromCompact(ht) {
|
|
3993
3993
|
const Et = t.nByteLength;
|
|
3994
|
-
return ht =
|
|
3994
|
+
return ht = Ke("compactSignature", ht, Et * 2), new A(T(ht, 0, Et), T(ht, Et, 2 * Et));
|
|
3995
3995
|
}
|
|
3996
3996
|
// DER encoded ECDSA signature
|
|
3997
3997
|
// https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script
|
|
3998
3998
|
static fromDER(ht) {
|
|
3999
|
-
const { r: Et, s: Rt } = xi.toSig(
|
|
3999
|
+
const { r: Et, s: Rt } = xi.toSig(Ke("DER", ht));
|
|
4000
4000
|
return new A(Et, Rt);
|
|
4001
4001
|
}
|
|
4002
4002
|
assertValidity() {
|
|
@@ -4009,13 +4009,13 @@ function Oy(n) {
|
|
|
4009
4009
|
return new A(this.r, this.s, ht);
|
|
4010
4010
|
}
|
|
4011
4011
|
recoverPublicKey(ht) {
|
|
4012
|
-
const { r: Et, s: Rt, recovery: vt } = this, Pt = N(
|
|
4012
|
+
const { r: Et, s: Rt, recovery: vt } = this, Pt = N(Ke("msgHash", ht));
|
|
4013
4013
|
if (vt == null || ![0, 1, 2, 3].includes(vt))
|
|
4014
4014
|
throw new Error("recovery id invalid");
|
|
4015
4015
|
const Ct = vt === 2 || vt === 3 ? Et + t.n : Et;
|
|
4016
4016
|
if (Ct >= e.ORDER)
|
|
4017
4017
|
throw new Error("recovery id 2 or 3 invalid");
|
|
4018
|
-
const W = (vt & 1) === 0 ? "02" : "03", Z = l.fromHex(W +
|
|
4018
|
+
const W = (vt & 1) === 0 ? "02" : "03", Z = l.fromHex(W + B(Ct)), rt = _(Ct), gt = u(-Pt * rt), G = u(Rt * rt), M = l.BASE.multiplyAndAddUnsafe(Z, gt, G);
|
|
4019
4019
|
if (!M)
|
|
4020
4020
|
throw new Error("point at infinify");
|
|
4021
4021
|
return M.assertValidity(), M;
|
|
@@ -4039,7 +4039,7 @@ function Oy(n) {
|
|
|
4039
4039
|
return os(this.toCompactHex());
|
|
4040
4040
|
}
|
|
4041
4041
|
toCompactHex() {
|
|
4042
|
-
return
|
|
4042
|
+
return B(this.r) + B(this.s);
|
|
4043
4043
|
}
|
|
4044
4044
|
}
|
|
4045
4045
|
const x = {
|
|
@@ -4074,14 +4074,14 @@ function Oy(n) {
|
|
|
4074
4074
|
function S(at, ht = !0) {
|
|
4075
4075
|
return l.fromPrivateKey(at).toRawBytes(ht);
|
|
4076
4076
|
}
|
|
4077
|
-
function
|
|
4077
|
+
function z(at) {
|
|
4078
4078
|
const ht = at instanceof Uint8Array, Et = typeof at == "string", Rt = (ht || Et) && at.length;
|
|
4079
4079
|
return ht ? Rt === i || Rt === o : Et ? Rt === 2 * i || Rt === 2 * o : at instanceof l;
|
|
4080
4080
|
}
|
|
4081
4081
|
function O(at, ht, Et = !0) {
|
|
4082
|
-
if (
|
|
4082
|
+
if (z(at))
|
|
4083
4083
|
throw new Error("first arg must be private key");
|
|
4084
|
-
if (!
|
|
4084
|
+
if (!z(ht))
|
|
4085
4085
|
throw new Error("second arg must be public key");
|
|
4086
4086
|
return l.fromHex(ht).multiply(f(at)).toRawBytes(Et);
|
|
4087
4087
|
}
|
|
@@ -4091,7 +4091,7 @@ function Oy(n) {
|
|
|
4091
4091
|
}, N = t.bits2int_modN || function(at) {
|
|
4092
4092
|
return u(C(at));
|
|
4093
4093
|
}, L = Wu(t.nBitLength);
|
|
4094
|
-
function
|
|
4094
|
+
function $(at) {
|
|
4095
4095
|
if (typeof at != "bigint")
|
|
4096
4096
|
throw new Error("bigint expected");
|
|
4097
4097
|
if (!(Vn <= at && at < L))
|
|
@@ -4103,25 +4103,25 @@ function Oy(n) {
|
|
|
4103
4103
|
throw new Error("sign() legacy options not supported");
|
|
4104
4104
|
const { hash: Rt, randomBytes: vt } = t;
|
|
4105
4105
|
let { lowS: Pt, prehash: Ct, extraEntropy: W } = Et;
|
|
4106
|
-
Pt == null && (Pt = !0), at =
|
|
4107
|
-
const Z = N(at), rt = f(ht), gt = [
|
|
4106
|
+
Pt == null && (Pt = !0), at = Ke("msgHash", at), Ct && (at = Ke("prehashed msgHash", Rt(at)));
|
|
4107
|
+
const Z = N(at), rt = f(ht), gt = [$(rt), $(Z)];
|
|
4108
4108
|
if (W != null) {
|
|
4109
4109
|
const ct = W === !0 ? vt(e.BYTES) : W;
|
|
4110
|
-
gt.push(
|
|
4110
|
+
gt.push(Ke("extraEntropy", ct));
|
|
4111
4111
|
}
|
|
4112
4112
|
const G = Ns(...gt), M = Z;
|
|
4113
4113
|
function X(ct) {
|
|
4114
4114
|
const _t = C(ct);
|
|
4115
4115
|
if (!y(_t))
|
|
4116
4116
|
return;
|
|
4117
|
-
const v = _(_t), R = l.BASE.multiply(_t).toAffine(),
|
|
4118
|
-
if (
|
|
4117
|
+
const v = _(_t), R = l.BASE.multiply(_t).toAffine(), et = u(R.x);
|
|
4118
|
+
if (et === Vn)
|
|
4119
4119
|
return;
|
|
4120
|
-
const lt = u(v * u(M +
|
|
4120
|
+
const lt = u(v * u(M + et * rt));
|
|
4121
4121
|
if (lt === Vn)
|
|
4122
4122
|
return;
|
|
4123
|
-
let Bt = (R.x ===
|
|
4124
|
-
return Pt && F(lt) && (bt = k(lt), Bt ^= 1), new A(
|
|
4123
|
+
let Bt = (R.x === et ? 0 : 2) | Number(R.y & je), bt = lt;
|
|
4124
|
+
return Pt && F(lt) && (bt = k(lt), Bt ^= 1), new A(et, bt, Bt);
|
|
4125
4125
|
}
|
|
4126
4126
|
return { seed: G, k2sig: X };
|
|
4127
4127
|
}
|
|
@@ -4133,7 +4133,7 @@ function Oy(n) {
|
|
|
4133
4133
|
l.BASE._setWindowSize(8);
|
|
4134
4134
|
function xt(at, ht, Et, Rt = D) {
|
|
4135
4135
|
const vt = at;
|
|
4136
|
-
if (ht =
|
|
4136
|
+
if (ht = Ke("msgHash", ht), Et = Ke("publicKey", Et), "strict" in Rt)
|
|
4137
4137
|
throw new Error("options.strict was renamed to lowS");
|
|
4138
4138
|
const { lowS: Pt, prehash: Ct } = Rt;
|
|
4139
4139
|
let W, Z;
|
|
@@ -4147,8 +4147,8 @@ function Oy(n) {
|
|
|
4147
4147
|
W = A.fromCompact(vt);
|
|
4148
4148
|
}
|
|
4149
4149
|
else if (typeof vt == "object" && typeof vt.r == "bigint" && typeof vt.s == "bigint") {
|
|
4150
|
-
const { r: R, s:
|
|
4151
|
-
W = new A(R,
|
|
4150
|
+
const { r: R, s: et } = vt;
|
|
4151
|
+
W = new A(R, et);
|
|
4152
4152
|
} else
|
|
4153
4153
|
throw new Error("PARSE");
|
|
4154
4154
|
Z = l.fromHex(Et);
|
|
@@ -4189,7 +4189,7 @@ function Cy(n, t) {
|
|
|
4189
4189
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
4190
4190
|
const Ww = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"), N_ = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"), Ny = BigInt(1), gu = BigInt(2), L_ = (n, t) => (n + t / gu) / t;
|
|
4191
4191
|
function Ly(n) {
|
|
4192
|
-
const t = Ww, e = BigInt(3), r = BigInt(6), i = BigInt(11), o = BigInt(22), a = BigInt(23), u = BigInt(44), _ = BigInt(88), l = n * n * n % t, f = l * l * n % t, w = De(f, e, t) * f % t, y = De(w, e, t) * f % t,
|
|
4192
|
+
const t = Ww, e = BigInt(3), r = BigInt(6), i = BigInt(11), o = BigInt(22), a = BigInt(23), u = BigInt(44), _ = BigInt(88), l = n * n * n % t, f = l * l * n % t, w = De(f, e, t) * f % t, y = De(w, e, t) * f % t, B = De(y, gu, t) * l % t, F = De(B, i, t) * B % t, k = De(F, o, t) * F % t, T = De(k, u, t) * k % t, A = De(T, _, t) * T % t, x = De(A, u, t) * k % t, S = De(x, e, t) * f % t, z = De(S, a, t) * F % t, O = De(z, r, t) * l % t, C = De(O, gu, t);
|
|
4193
4193
|
if (!yu.eql(yu.sqr(C), n))
|
|
4194
4194
|
throw new Error("Cannot find square root");
|
|
4195
4195
|
return C;
|
|
@@ -5528,8 +5528,8 @@ function $w(n, t, e) {
|
|
|
5528
5528
|
let w = o.length;
|
|
5529
5529
|
_.encode(o, f);
|
|
5530
5530
|
let y = i.writeUpdatableValue();
|
|
5531
|
-
a.push((
|
|
5532
|
-
y(
|
|
5531
|
+
a.push((B) => {
|
|
5532
|
+
y(B + w);
|
|
5533
5533
|
});
|
|
5534
5534
|
} else
|
|
5535
5535
|
_.encode(i, f);
|
|
@@ -6082,7 +6082,7 @@ function Eb(n, t) {
|
|
|
6082
6082
|
];
|
|
6083
6083
|
return t && (e.push(Dt(t.yParity, "yParity")), e.push(ge(t.r)), e.push(ge(t.s))), oe(["0x04", fi(e)]);
|
|
6084
6084
|
}
|
|
6085
|
-
class
|
|
6085
|
+
class We {
|
|
6086
6086
|
#t;
|
|
6087
6087
|
#e;
|
|
6088
6088
|
#r;
|
|
@@ -6516,7 +6516,7 @@ class Qe {
|
|
|
6516
6516
|
* Create a copy of this transaciton.
|
|
6517
6517
|
*/
|
|
6518
6518
|
clone() {
|
|
6519
|
-
return
|
|
6519
|
+
return We.from(this);
|
|
6520
6520
|
}
|
|
6521
6521
|
/**
|
|
6522
6522
|
* Return a JSON-friendly object.
|
|
@@ -6545,24 +6545,24 @@ class Qe {
|
|
|
6545
6545
|
*/
|
|
6546
6546
|
static from(t) {
|
|
6547
6547
|
if (t == null)
|
|
6548
|
-
return new
|
|
6548
|
+
return new We();
|
|
6549
6549
|
if (typeof t == "string") {
|
|
6550
6550
|
const r = Ot(t);
|
|
6551
6551
|
if (r[0] >= 127)
|
|
6552
|
-
return
|
|
6552
|
+
return We.from(hb(r));
|
|
6553
6553
|
switch (r[0]) {
|
|
6554
6554
|
case 1:
|
|
6555
|
-
return
|
|
6555
|
+
return We.from(gb(r));
|
|
6556
6556
|
case 2:
|
|
6557
|
-
return
|
|
6557
|
+
return We.from(wb(r));
|
|
6558
6558
|
case 3:
|
|
6559
|
-
return
|
|
6559
|
+
return We.from(bb(r));
|
|
6560
6560
|
case 4:
|
|
6561
|
-
return
|
|
6561
|
+
return We.from(Ab(r));
|
|
6562
6562
|
}
|
|
6563
6563
|
ft(!1, "unsupported transaction type", "UNSUPPORTED_OPERATION", { operation: "from" });
|
|
6564
6564
|
}
|
|
6565
|
-
const e = new
|
|
6565
|
+
const e = new We();
|
|
6566
6566
|
return t.type != null && (e.type = t.type), t.to != null && (e.to = t.to), t.nonce != null && (e.nonce = t.nonce), t.gasLimit != null && (e.gasLimit = t.gasLimit), t.gasPrice != null && (e.gasPrice = t.gasPrice), t.maxPriorityFeePerGas != null && (e.maxPriorityFeePerGas = t.maxPriorityFeePerGas), t.maxFeePerGas != null && (e.maxFeePerGas = t.maxFeePerGas), t.maxFeePerBlobGas != null && (e.maxFeePerBlobGas = t.maxFeePerBlobGas), t.data != null && (e.data = t.data), t.value != null && (e.value = t.value), t.chainId != null && (e.chainId = t.chainId), t.signature != null && (e.signature = ie.from(t.signature)), t.accessList != null && (e.accessList = t.accessList), t.authorizationList != null && (e.authorizationList = t.authorizationList), t.blobVersionedHashes != null && (e.blobVersionedHashes = t.blobVersionedHashes), t.kzg != null && (e.kzg = t.kzg), t.blobs != null && (e.blobs = t.blobs), t.hash != null && (V(e.isSigned(), "unsigned transaction cannot define '.hash'", "tx", t), V(e.hash === t.hash, "hash mismatch", "tx", t)), t.from != null && (V(e.isSigned(), "unsigned transaction cannot define '.from'", "tx", t), V(e.from.toLowerCase() === (t.from || "").toLowerCase(), "from mismatch", "tx", t)), e;
|
|
6567
6567
|
}
|
|
6568
6568
|
}
|
|
@@ -6585,7 +6585,7 @@ function xb(n) {
|
|
|
6585
6585
|
function f() {
|
|
6586
6586
|
return _ == 0 && (l = l << 8 | n[t++], _ = 8), l >> --_ & 1;
|
|
6587
6587
|
}
|
|
6588
|
-
const w = 31, y = 2 ** w,
|
|
6588
|
+
const w = 31, y = 2 ** w, B = y >>> 1, F = B >> 1, k = y - 1;
|
|
6589
6589
|
let T = 0;
|
|
6590
6590
|
for (let O = 0; O < w; O++) T = T << 1 | f();
|
|
6591
6591
|
let A = [], x = 0, S = y;
|
|
@@ -6597,22 +6597,22 @@ function xb(n) {
|
|
|
6597
6597
|
}
|
|
6598
6598
|
if (C == 0) break;
|
|
6599
6599
|
A.push(C);
|
|
6600
|
-
let L = x + Math.floor(S * o[C] / i),
|
|
6601
|
-
for (; ((L ^
|
|
6602
|
-
T = T << 1 & k | f(), L = L << 1 & k,
|
|
6603
|
-
for (; L &
|
|
6604
|
-
T = T &
|
|
6605
|
-
x = L, S = 1 +
|
|
6606
|
-
}
|
|
6607
|
-
let
|
|
6600
|
+
let L = x + Math.floor(S * o[C] / i), $ = x + Math.floor(S * o[C + 1] / i) - 1;
|
|
6601
|
+
for (; ((L ^ $) & B) == 0; )
|
|
6602
|
+
T = T << 1 & k | f(), L = L << 1 & k, $ = $ << 1 & k | 1;
|
|
6603
|
+
for (; L & ~$ & F; )
|
|
6604
|
+
T = T & B | T << 1 & k >>> 1 | f(), L = L << 1 ^ B, $ = ($ ^ B) << 1 | B | 1;
|
|
6605
|
+
x = L, S = 1 + $ - L;
|
|
6606
|
+
}
|
|
6607
|
+
let z = r - 4;
|
|
6608
6608
|
return A.map((O) => {
|
|
6609
|
-
switch (O -
|
|
6609
|
+
switch (O - z) {
|
|
6610
6610
|
case 3:
|
|
6611
|
-
return
|
|
6611
|
+
return z + 65792 + (n[u++] << 16 | n[u++] << 8 | n[u++]);
|
|
6612
6612
|
case 2:
|
|
6613
|
-
return
|
|
6613
|
+
return z + 256 + (n[u++] << 8 | n[u++]);
|
|
6614
6614
|
case 1:
|
|
6615
|
-
return
|
|
6615
|
+
return z + n[u++];
|
|
6616
6616
|
default:
|
|
6617
6617
|
return O - 1;
|
|
6618
6618
|
}
|
|
@@ -6694,7 +6694,7 @@ function kb(n, t) {
|
|
|
6694
6694
|
let [_, ...l] = a;
|
|
6695
6695
|
return Array(i[u]).fill().map((f, w) => {
|
|
6696
6696
|
let y = w * r;
|
|
6697
|
-
return [_ + w * e, l.map((
|
|
6697
|
+
return [_ + w * e, l.map((B) => B + y)];
|
|
6698
6698
|
});
|
|
6699
6699
|
});
|
|
6700
6700
|
}
|
|
@@ -6867,14 +6867,14 @@ function $u() {
|
|
|
6867
6867
|
if (w.length) {
|
|
6868
6868
|
let y = f >= o;
|
|
6869
6869
|
w[0] -= 32, w = cs(w), y && (w = `Restricted[${w}]`);
|
|
6870
|
-
let
|
|
6871
|
-
return { N: w, P:
|
|
6870
|
+
let B = a(), F = a(), k = !n();
|
|
6871
|
+
return { N: w, P: B, Q: F, M: k, R: y };
|
|
6872
6872
|
}
|
|
6873
6873
|
}), Oa = e(), qi = /* @__PURE__ */ new Map();
|
|
6874
6874
|
let u = t().concat(Io(Oa)).sort((f, w) => f - w);
|
|
6875
6875
|
u.forEach((f, w) => {
|
|
6876
|
-
let y = n(),
|
|
6877
|
-
|
|
6876
|
+
let y = n(), B = u[w] = y ? u[w - y] : { V: [], M: /* @__PURE__ */ new Map() };
|
|
6877
|
+
B.V.push(f), Oa.has(f) || qi.set(f, B);
|
|
6878
6878
|
});
|
|
6879
6879
|
for (let { V: f, M: w } of new Set(qi.values())) {
|
|
6880
6880
|
let y = [];
|
|
@@ -6882,9 +6882,9 @@ function $u() {
|
|
|
6882
6882
|
let k = $i.filter((A) => js(A, F)), T = y.find(({ G: A }) => k.some((x) => A.has(x)));
|
|
6883
6883
|
T || (T = { G: /* @__PURE__ */ new Set(), V: [] }, y.push(T)), T.V.push(F), r(T.G, k);
|
|
6884
6884
|
}
|
|
6885
|
-
let
|
|
6885
|
+
let B = y.flatMap((F) => Io(F.G));
|
|
6886
6886
|
for (let { G: F, V: k } of y) {
|
|
6887
|
-
let T = new Set(
|
|
6887
|
+
let T = new Set(B.filter((A) => !F.has(A)));
|
|
6888
6888
|
for (let A of k)
|
|
6889
6889
|
w.set(A, T);
|
|
6890
6890
|
}
|
|
@@ -6902,11 +6902,11 @@ function $u() {
|
|
|
6902
6902
|
for (let f of X_) {
|
|
6903
6903
|
let w = [vu];
|
|
6904
6904
|
for (let y of f) {
|
|
6905
|
-
let
|
|
6905
|
+
let B = w.map((F) => {
|
|
6906
6906
|
let k = F.get(y);
|
|
6907
6907
|
return k || (k = /* @__PURE__ */ new Map(), F.set(y, k)), k;
|
|
6908
6908
|
});
|
|
6909
|
-
y === hd ? w.push(...
|
|
6909
|
+
y === hd ? w.push(...B) : w = B;
|
|
6910
6910
|
}
|
|
6911
6911
|
for (let y of w)
|
|
6912
6912
|
y.V = f;
|
|
@@ -6979,7 +6979,7 @@ function Yb(n, t, e) {
|
|
|
6979
6979
|
if (Kb(f), !(a.emoji = _ > 1 || u[0].is_emoji) && f.every((y) => y < 128))
|
|
6980
6980
|
Qb(f), l = "ASCII";
|
|
6981
6981
|
else {
|
|
6982
|
-
let y = u.flatMap((
|
|
6982
|
+
let y = u.flatMap((B) => B.is_emoji ? [] : B);
|
|
6983
6983
|
if (!y.length)
|
|
6984
6984
|
l = "Emoji";
|
|
6985
6985
|
else {
|
|
@@ -6990,8 +6990,8 @@ function Yb(n, t, e) {
|
|
|
6990
6990
|
throw Os(`emoji + combining mark: "${cs(u[k - 1])} + ${Ko([T[0]])}"`);
|
|
6991
6991
|
}
|
|
6992
6992
|
Wb(f);
|
|
6993
|
-
let
|
|
6994
|
-
e1(F, y), Zb(F,
|
|
6993
|
+
let B = Io(new Set(y)), [F] = Xb(B);
|
|
6994
|
+
e1(F, y), Zb(F, B), l = F.N;
|
|
6995
6995
|
}
|
|
6996
6996
|
}
|
|
6997
6997
|
a.type = l;
|
|
@@ -7167,7 +7167,7 @@ const l1 = {
|
|
|
7167
7167
|
version: rf("version"),
|
|
7168
7168
|
chainId: function(n) {
|
|
7169
7169
|
const t = At(n, "domain.chainId");
|
|
7170
|
-
return V(t >= 0, "invalid chain ID", "domain.chainId", n), Number.isSafeInteger(t) ? Number(t) :
|
|
7170
|
+
return V(t >= 0, "invalid chain ID", "domain.chainId", n), Number.isSafeInteger(t) ? Number(t) : Je(t);
|
|
7171
7171
|
},
|
|
7172
7172
|
verifyingContract: function(n) {
|
|
7173
7173
|
try {
|
|
@@ -7505,7 +7505,7 @@ const h1 = "external public payable override", p1 = Be(h1.split(" ")), zd = "con
|
|
|
7505
7505
|
",": "COMMA",
|
|
7506
7506
|
"@": "AT"
|
|
7507
7507
|
}, A1 = new RegExp("^(\\s*)"), E1 = new RegExp("^([0-9]+)"), v1 = new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"), Pd = new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"), Fd = new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");
|
|
7508
|
-
class
|
|
7508
|
+
class Qe {
|
|
7509
7509
|
#t;
|
|
7510
7510
|
#e;
|
|
7511
7511
|
get offset() {
|
|
@@ -7518,13 +7518,13 @@ class Ve {
|
|
|
7518
7518
|
this.#t = 0, this.#e = t.slice();
|
|
7519
7519
|
}
|
|
7520
7520
|
clone() {
|
|
7521
|
-
return new
|
|
7521
|
+
return new Qe(this.#e);
|
|
7522
7522
|
}
|
|
7523
7523
|
reset() {
|
|
7524
7524
|
this.#t = 0;
|
|
7525
7525
|
}
|
|
7526
7526
|
#r(t = 0, e = 0) {
|
|
7527
|
-
return new
|
|
7527
|
+
return new Qe(this.#e.slice(t, e).map((r) => Object.freeze(Object.assign({}, r, {
|
|
7528
7528
|
match: r.match - t,
|
|
7529
7529
|
linkBack: r.linkBack - t,
|
|
7530
7530
|
linkNext: r.linkNext - t
|
|
@@ -7648,7 +7648,7 @@ function hi(n) {
|
|
|
7648
7648
|
}
|
|
7649
7649
|
throw new Error(`unexpected token ${JSON.stringify(a[0])} at position ${o}`);
|
|
7650
7650
|
}
|
|
7651
|
-
return new
|
|
7651
|
+
return new Qe(t.map((a) => Object.freeze(a)));
|
|
7652
7652
|
}
|
|
7653
7653
|
function sf(n, t) {
|
|
7654
7654
|
let e = [];
|
|
@@ -7924,7 +7924,7 @@ class Zt {
|
|
|
7924
7924
|
} catch {
|
|
7925
7925
|
V(!1, "invalid param type", "obj", t);
|
|
7926
7926
|
}
|
|
7927
|
-
else if (t instanceof
|
|
7927
|
+
else if (t instanceof Qe) {
|
|
7928
7928
|
let u = "", _ = "", l = null;
|
|
7929
7929
|
Zn(t, Be(["tuple"])).has("tuple") || t.peekType("OPEN_PAREN") ? (_ = "tuple", l = t.popParams().map((k) => Zt.from(k)), u = `tuple(${l.map((k) => k.format()).join(",")})`) : (u = of(t.popType("TYPE")), _ = u);
|
|
7930
7930
|
let f = null, w = null;
|
|
@@ -8001,7 +8001,7 @@ class Ti {
|
|
|
8001
8001
|
}
|
|
8002
8002
|
return Ti.from(hi(t));
|
|
8003
8003
|
}
|
|
8004
|
-
if (t instanceof
|
|
8004
|
+
if (t instanceof Qe)
|
|
8005
8005
|
switch (t.peekKeyword(Sd)) {
|
|
8006
8006
|
case "constructor":
|
|
8007
8007
|
return Kn.from(t);
|
|
@@ -8119,7 +8119,7 @@ class Ie extends Jo {
|
|
|
8119
8119
|
return t;
|
|
8120
8120
|
if (typeof t == "string")
|
|
8121
8121
|
return Ie.from(hi(t));
|
|
8122
|
-
if (t instanceof
|
|
8122
|
+
if (t instanceof Qe) {
|
|
8123
8123
|
const e = Wo("error", t), r = $n(t);
|
|
8124
8124
|
return Oi(t), new Ie(re, e, r);
|
|
8125
8125
|
}
|
|
@@ -8182,7 +8182,7 @@ class cr extends Jo {
|
|
|
8182
8182
|
} catch {
|
|
8183
8183
|
V(!1, "invalid event fragment", "obj", t);
|
|
8184
8184
|
}
|
|
8185
|
-
else if (t instanceof
|
|
8185
|
+
else if (t instanceof Qe) {
|
|
8186
8186
|
const e = Wo("event", t), r = $n(t, !0), i = !!Zn(t, Be(["anonymous"])).has("anonymous");
|
|
8187
8187
|
return Oi(t), new cr(re, e, r, i);
|
|
8188
8188
|
}
|
|
@@ -8238,7 +8238,7 @@ class Kn extends Ti {
|
|
|
8238
8238
|
} catch {
|
|
8239
8239
|
V(!1, "invalid constuctor fragment", "obj", t);
|
|
8240
8240
|
}
|
|
8241
|
-
else if (t instanceof
|
|
8241
|
+
else if (t instanceof Qe) {
|
|
8242
8242
|
Zn(t, Be(["constructor"]));
|
|
8243
8243
|
const e = $n(t), r = !!Zn(t, p1).has("payable"), i = Od(t);
|
|
8244
8244
|
return Oi(t), new Kn(re, "constructor", e, r, i);
|
|
@@ -8284,7 +8284,7 @@ class hr extends Ti {
|
|
|
8284
8284
|
} catch {
|
|
8285
8285
|
V(!1, "invalid fallback fragment", "obj", t);
|
|
8286
8286
|
}
|
|
8287
|
-
else if (t instanceof
|
|
8287
|
+
else if (t instanceof Qe) {
|
|
8288
8288
|
const e = t.toString(), r = t.peekKeyword(Be(["fallback", "receive"]));
|
|
8289
8289
|
if (V(r, "type must be fallback or receive", "obj", e), t.popKeyword(Be(["fallback", "receive"])) === "receive") {
|
|
8290
8290
|
const u = $n(t);
|
|
@@ -8385,7 +8385,7 @@ class ur extends Jo {
|
|
|
8385
8385
|
} catch {
|
|
8386
8386
|
V(!1, "invalid function fragment", "obj", t);
|
|
8387
8387
|
}
|
|
8388
|
-
else if (t instanceof
|
|
8388
|
+
else if (t instanceof Qe) {
|
|
8389
8389
|
const r = Wo("function", t), i = $n(t), o = Id(t);
|
|
8390
8390
|
let a = [];
|
|
8391
8391
|
Zn(t, Be(["returns"])).has("returns") && (a = $n(t));
|
|
@@ -8426,7 +8426,7 @@ class Pi extends Jo {
|
|
|
8426
8426
|
} catch {
|
|
8427
8427
|
V(!1, "invalid struct fragment", "obj", t);
|
|
8428
8428
|
}
|
|
8429
|
-
else if (t instanceof
|
|
8429
|
+
else if (t instanceof Qe) {
|
|
8430
8430
|
const e = Wo("struct", t), r = $n(t);
|
|
8431
8431
|
return Oi(t), new Pi(re, e, r);
|
|
8432
8432
|
}
|
|
@@ -8493,7 +8493,7 @@ function B1(n, t, e, r) {
|
|
|
8493
8493
|
to: t.to ? Mt(t.to) : null,
|
|
8494
8494
|
data: t.data || "0x"
|
|
8495
8495
|
};
|
|
8496
|
-
return t.from && (_.from = Mt(t.from)),
|
|
8496
|
+
return t.from && (_.from = Mt(t.from)), ee(i, "CALL_EXCEPTION", {
|
|
8497
8497
|
action: n,
|
|
8498
8498
|
data: e,
|
|
8499
8499
|
reason: o,
|
|
@@ -9319,22 +9319,22 @@ class Ei {
|
|
|
9319
9319
|
// Decode a filter for the event and the search criteria
|
|
9320
9320
|
decodeEventLog(t, e, r) {
|
|
9321
9321
|
if (typeof t == "string") {
|
|
9322
|
-
const
|
|
9323
|
-
V(
|
|
9322
|
+
const B = this.getEvent(t);
|
|
9323
|
+
V(B, "unknown event", "eventFragment", t), t = B;
|
|
9324
9324
|
}
|
|
9325
9325
|
if (r != null && !t.anonymous) {
|
|
9326
|
-
const
|
|
9327
|
-
V(Xt(r[0], 32) && r[0].toLowerCase() ===
|
|
9326
|
+
const B = t.topicHash;
|
|
9327
|
+
V(Xt(r[0], 32) && r[0].toLowerCase() === B, "fragment/topic mismatch", "topics[0]", r[0]), r = r.slice(1);
|
|
9328
9328
|
}
|
|
9329
9329
|
const i = [], o = [], a = [];
|
|
9330
|
-
t.inputs.forEach((
|
|
9331
|
-
|
|
9330
|
+
t.inputs.forEach((B, F) => {
|
|
9331
|
+
B.indexed ? B.type === "string" || B.type === "bytes" || B.baseType === "tuple" || B.baseType === "array" ? (i.push(Zt.from({ type: "bytes32", name: B.name })), a.push(!0)) : (i.push(B), a.push(!1)) : (o.push(B), a.push(!1));
|
|
9332
9332
|
});
|
|
9333
9333
|
const u = r != null ? this.#n.decode(i, oe(r)) : null, _ = this.#n.decode(o, e, !0), l = [], f = [];
|
|
9334
9334
|
let w = 0, y = 0;
|
|
9335
|
-
return t.inputs.forEach((
|
|
9335
|
+
return t.inputs.forEach((B, F) => {
|
|
9336
9336
|
let k = null;
|
|
9337
|
-
if (
|
|
9337
|
+
if (B.indexed)
|
|
9338
9338
|
if (u == null)
|
|
9339
9339
|
k = new wf(null);
|
|
9340
9340
|
else if (a[F])
|
|
@@ -9351,7 +9351,7 @@ class Ei {
|
|
|
9351
9351
|
} catch (T) {
|
|
9352
9352
|
k = T;
|
|
9353
9353
|
}
|
|
9354
|
-
l.push(k), f.push(
|
|
9354
|
+
l.push(k), f.push(B.name || null);
|
|
9355
9355
|
}), Qn.fromItems(l, f);
|
|
9356
9356
|
}
|
|
9357
9357
|
/**
|
|
@@ -9625,7 +9625,7 @@ class F1 {
|
|
|
9625
9625
|
* Returns a JSON-friendly value.
|
|
9626
9626
|
*/
|
|
9627
9627
|
toJSON() {
|
|
9628
|
-
const { baseFeePerGas: t, difficulty: e, extraData: r, gasLimit: i, gasUsed: o, hash: a, miner: u, prevRandao: _, nonce: l, number: f, parentHash: w, parentBeaconBlockRoot: y, stateRoot:
|
|
9628
|
+
const { baseFeePerGas: t, difficulty: e, extraData: r, gasLimit: i, gasUsed: o, hash: a, miner: u, prevRandao: _, nonce: l, number: f, parentHash: w, parentBeaconBlockRoot: y, stateRoot: B, receiptsRoot: F, timestamp: k, transactions: T } = this;
|
|
9629
9629
|
return {
|
|
9630
9630
|
_type: "Block",
|
|
9631
9631
|
baseFeePerGas: ce(t),
|
|
@@ -9643,7 +9643,7 @@ class F1 {
|
|
|
9643
9643
|
parentHash: w,
|
|
9644
9644
|
timestamp: k,
|
|
9645
9645
|
parentBeaconBlockRoot: y,
|
|
9646
|
-
stateRoot:
|
|
9646
|
+
stateRoot: B,
|
|
9647
9647
|
receiptsRoot: F,
|
|
9648
9648
|
transactions: T
|
|
9649
9649
|
};
|
|
@@ -10295,11 +10295,11 @@ class $s {
|
|
|
10295
10295
|
const _ = async () => {
|
|
10296
10296
|
if (u)
|
|
10297
10297
|
return null;
|
|
10298
|
-
const { blockNumber: y, nonce:
|
|
10298
|
+
const { blockNumber: y, nonce: B } = await ve({
|
|
10299
10299
|
blockNumber: this.provider.getBlockNumber(),
|
|
10300
10300
|
nonce: this.provider.getTransactionCount(this.from)
|
|
10301
10301
|
});
|
|
10302
|
-
if (
|
|
10302
|
+
if (B < this.nonce) {
|
|
10303
10303
|
o = y;
|
|
10304
10304
|
return;
|
|
10305
10305
|
}
|
|
@@ -10361,7 +10361,7 @@ class $s {
|
|
|
10361
10361
|
return l(f);
|
|
10362
10362
|
} else if (await _(), r === 0)
|
|
10363
10363
|
return null;
|
|
10364
|
-
return await new Promise((y,
|
|
10364
|
+
return await new Promise((y, B) => {
|
|
10365
10365
|
const F = [], k = () => {
|
|
10366
10366
|
F.forEach((A) => A());
|
|
10367
10367
|
};
|
|
@@ -10369,7 +10369,7 @@ class $s {
|
|
|
10369
10369
|
u = !0;
|
|
10370
10370
|
}), i > 0) {
|
|
10371
10371
|
const A = setTimeout(() => {
|
|
10372
|
-
k(),
|
|
10372
|
+
k(), B(ee("wait for transaction timeout", "TIMEOUT"));
|
|
10373
10373
|
}, i);
|
|
10374
10374
|
F.push(() => {
|
|
10375
10375
|
clearTimeout(A);
|
|
@@ -10381,7 +10381,7 @@ class $s {
|
|
|
10381
10381
|
try {
|
|
10382
10382
|
y(l(A));
|
|
10383
10383
|
} catch (x) {
|
|
10384
|
-
|
|
10384
|
+
B(x);
|
|
10385
10385
|
}
|
|
10386
10386
|
}
|
|
10387
10387
|
};
|
|
@@ -10393,7 +10393,7 @@ class $s {
|
|
|
10393
10393
|
await _();
|
|
10394
10394
|
} catch (x) {
|
|
10395
10395
|
if (Ae(x, "TRANSACTION_REPLACED")) {
|
|
10396
|
-
k(),
|
|
10396
|
+
k(), B(x);
|
|
10397
10397
|
return;
|
|
10398
10398
|
}
|
|
10399
10399
|
}
|
|
@@ -10775,8 +10775,8 @@ function U1(n, t) {
|
|
|
10775
10775
|
} catch (F) {
|
|
10776
10776
|
throw Lu(F) && F.data ? n.interface.makeError(F.data, w) : F;
|
|
10777
10777
|
}
|
|
10778
|
-
const
|
|
10779
|
-
return n.interface.decodeFunctionResult(
|
|
10778
|
+
const B = e(...l);
|
|
10779
|
+
return n.interface.decodeFunctionResult(B, y);
|
|
10780
10780
|
}, _ = async (...l) => e(...l).constant ? await i(...l) : await o(...l);
|
|
10781
10781
|
return zt(_, {
|
|
10782
10782
|
name: n.interface.getFunctionName(t),
|
|
@@ -10879,18 +10879,18 @@ async function mf(n, t, e) {
|
|
|
10879
10879
|
}
|
|
10880
10880
|
if (A) {
|
|
10881
10881
|
const x = A, S = i ? n.interface.decodeEventLog(i, T.data, T.topics) : [];
|
|
10882
|
-
zu(n, e, S, (
|
|
10882
|
+
zu(n, e, S, (z) => new C1(n, z, e, x, T));
|
|
10883
10883
|
} else
|
|
10884
10884
|
zu(n, e, [], (x) => new Ud(n, x, e, T));
|
|
10885
10885
|
};
|
|
10886
|
-
let
|
|
10886
|
+
let B = [];
|
|
10887
10887
|
l = { tag: o, listeners: [], start: () => {
|
|
10888
|
-
|
|
10888
|
+
B.length || B.push(r.on(w, y));
|
|
10889
10889
|
}, stop: async () => {
|
|
10890
|
-
if (
|
|
10890
|
+
if (B.length == 0)
|
|
10891
10891
|
return;
|
|
10892
|
-
let T =
|
|
10893
|
-
|
|
10892
|
+
let T = B;
|
|
10893
|
+
B = [], await Promise.all(T), r.off(w, y);
|
|
10894
10894
|
} }, _.set(o, l);
|
|
10895
10895
|
}
|
|
10896
10896
|
return l;
|
|
@@ -10975,12 +10975,12 @@ class Ts {
|
|
|
10975
10975
|
else {
|
|
10976
10976
|
const w = Ni(r, "resolveName");
|
|
10977
10977
|
if (!$o(w))
|
|
10978
|
-
throw
|
|
10978
|
+
throw ee("contract runner does not support name resolution", "UNSUPPORTED_OPERATION", {
|
|
10979
10979
|
operation: "resolveName"
|
|
10980
10980
|
});
|
|
10981
10981
|
a = w.resolveName(t).then((y) => {
|
|
10982
10982
|
if (y == null)
|
|
10983
|
-
throw
|
|
10983
|
+
throw ee("an ENS name used for a contract target must be correctly configured", "UNCONFIGURED_NAME", {
|
|
10984
10984
|
value: t
|
|
10985
10985
|
});
|
|
10986
10986
|
return Te(this).addr = y, y;
|
|
@@ -10994,9 +10994,9 @@ class Ts {
|
|
|
10994
10994
|
});
|
|
10995
10995
|
j1(this, { addrPromise: a, addr: u, deployTx: _, subs: l });
|
|
10996
10996
|
const f = new Proxy({}, {
|
|
10997
|
-
get: (w, y,
|
|
10997
|
+
get: (w, y, B) => {
|
|
10998
10998
|
if (typeof y == "symbol" || _o.indexOf(y) >= 0)
|
|
10999
|
-
return Reflect.get(w, y,
|
|
10999
|
+
return Reflect.get(w, y, B);
|
|
11000
11000
|
try {
|
|
11001
11001
|
return this.getEvent(y);
|
|
11002
11002
|
} catch (F) {
|
|
@@ -11009,9 +11009,9 @@ class Ts {
|
|
|
11009
11009
|
return zt(this, { filters: f }), zt(this, {
|
|
11010
11010
|
fallback: o.receive || o.fallback ? D1(this) : null
|
|
11011
11011
|
}), new Proxy(this, {
|
|
11012
|
-
get: (w, y,
|
|
11012
|
+
get: (w, y, B) => {
|
|
11013
11013
|
if (typeof y == "symbol" || y in w || _o.indexOf(y) >= 0)
|
|
11014
|
-
return Reflect.get(w, y,
|
|
11014
|
+
return Reflect.get(w, y, B);
|
|
11015
11015
|
try {
|
|
11016
11016
|
return w.getFunction(y);
|
|
11017
11017
|
} catch (F) {
|
|
@@ -11139,8 +11139,8 @@ class Ts {
|
|
|
11139
11139
|
if (y)
|
|
11140
11140
|
try {
|
|
11141
11141
|
return new Xu(w, this.interface, y);
|
|
11142
|
-
} catch (
|
|
11143
|
-
return new Dd(w,
|
|
11142
|
+
} catch (B) {
|
|
11143
|
+
return new Dd(w, B);
|
|
11144
11144
|
}
|
|
11145
11145
|
return new Js(w, f);
|
|
11146
11146
|
});
|
|
@@ -11262,7 +11262,7 @@ class Ts {
|
|
|
11262
11262
|
function V1() {
|
|
11263
11263
|
return Ts;
|
|
11264
11264
|
}
|
|
11265
|
-
class
|
|
11265
|
+
class tr extends V1() {
|
|
11266
11266
|
}
|
|
11267
11267
|
function La(n) {
|
|
11268
11268
|
return n.match(/^ipfs:\/\/ipfs\//i) ? n = n.substring(12) : n.match(/^ipfs:\/\//i) ? n = n.substring(7) : V(!1, "unsupported IPFS format", "link", n), `https://gateway.ipfs.io/ipfs/${n}`;
|
|
@@ -11323,7 +11323,7 @@ class Zi {
|
|
|
11323
11323
|
#t;
|
|
11324
11324
|
#e;
|
|
11325
11325
|
constructor(t, e, r) {
|
|
11326
|
-
zt(this, { provider: t, address: e, name: r }), this.#t = null, this.#e = new
|
|
11326
|
+
zt(this, { provider: t, address: e, name: r }), this.#t = null, this.#e = new tr(e, [
|
|
11327
11327
|
"function supportsInterface(bytes4) view returns (bool)",
|
|
11328
11328
|
"function resolve(bytes, bytes) view returns (bytes)",
|
|
11329
11329
|
"function addr(bytes32) view returns (address)",
|
|
@@ -11485,7 +11485,7 @@ class Zi {
|
|
|
11485
11485
|
const _ = (i[2] || "").split("/");
|
|
11486
11486
|
if (_.length !== 2)
|
|
11487
11487
|
return t.push({ type: `!${o}caip`, value: i[2] || "" }), { url: null, linkage: t };
|
|
11488
|
-
const l = _[1], f = new
|
|
11488
|
+
const l = _[1], f = new tr(_[0], [
|
|
11489
11489
|
// ERC-721
|
|
11490
11490
|
"function tokenURI(uint) view returns (string)",
|
|
11491
11491
|
"function ownerOf(uint) view returns (address)",
|
|
@@ -11509,15 +11509,15 @@ class Zi {
|
|
|
11509
11509
|
return t.push({ type: "!metadata-url", value: "" }), { url: null, linkage: t };
|
|
11510
11510
|
t.push({ type: "metadata-url-base", value: w }), o === "erc1155" && (w = w.replace("{id}", _i(l, 32).substring(2)), t.push({ type: "metadata-url-expanded", value: w })), w.match(/^ipfs:/i) && (w = La(w)), t.push({ type: "metadata-url", value: w });
|
|
11511
11511
|
let y = {};
|
|
11512
|
-
const
|
|
11513
|
-
|
|
11512
|
+
const B = await new fr(w).send();
|
|
11513
|
+
B.assertOk();
|
|
11514
11514
|
try {
|
|
11515
|
-
y =
|
|
11515
|
+
y = B.bodyJson;
|
|
11516
11516
|
} catch {
|
|
11517
11517
|
try {
|
|
11518
|
-
t.push({ type: "!metadata", value:
|
|
11518
|
+
t.push({ type: "!metadata", value: B.bodyText });
|
|
11519
11519
|
} catch {
|
|
11520
|
-
const A =
|
|
11520
|
+
const A = B.body;
|
|
11521
11521
|
return A && t.push({ type: "!metadata", value: yt(A) }), { url: null, linkage: t };
|
|
11522
11522
|
}
|
|
11523
11523
|
return { url: null, linkage: t };
|
|
@@ -11551,7 +11551,7 @@ class Zi {
|
|
|
11551
11551
|
static async #n(t, e) {
|
|
11552
11552
|
const r = await Zi.getEnsAddress(t);
|
|
11553
11553
|
try {
|
|
11554
|
-
const o = await new
|
|
11554
|
+
const o = await new tr(r, [
|
|
11555
11555
|
"function resolver(bytes32) view returns (address)"
|
|
11556
11556
|
], t).resolver(xu(e), {
|
|
11557
11557
|
enableCcipRead: !0
|
|
@@ -12481,15 +12481,15 @@ class lm {
|
|
|
12481
12481
|
let w = "unknown error", y;
|
|
12482
12482
|
try {
|
|
12483
12483
|
y = await f.send();
|
|
12484
|
-
} catch (
|
|
12485
|
-
a.push(
|
|
12484
|
+
} catch (B) {
|
|
12485
|
+
a.push(B.message), this.emit("debug", { action: "receiveCcipReadFetchError", request: f, result: { error: B } });
|
|
12486
12486
|
continue;
|
|
12487
12487
|
}
|
|
12488
12488
|
try {
|
|
12489
|
-
const
|
|
12490
|
-
if (
|
|
12491
|
-
return this.emit("debug", { action: "receiveCcipReadFetchResult", request: f, result:
|
|
12492
|
-
|
|
12489
|
+
const B = y.bodyJson;
|
|
12490
|
+
if (B.data)
|
|
12491
|
+
return this.emit("debug", { action: "receiveCcipReadFetchResult", request: f, result: B }), B.data;
|
|
12492
|
+
B.message && (w = B.message), this.emit("debug", { action: "receiveCcipReadFetchError", request: f, result: B });
|
|
12493
12493
|
} catch {
|
|
12494
12494
|
}
|
|
12495
12495
|
ft(y.statusCode < 400 || y.statusCode >= 500, `response not found during CCIP fetch: ${w}`, "OFFCHAIN_FAULT", { reason: "404_MISSING_RESOURCE", transaction: t, info: { url: _, errorMessage: w } }), a.push(w);
|
|
@@ -12585,9 +12585,9 @@ class lm {
|
|
|
12585
12585
|
return t;
|
|
12586
12586
|
}
|
|
12587
12587
|
if (Xt(t))
|
|
12588
|
-
return Xt(t, 32) ? t :
|
|
12588
|
+
return Xt(t, 32) ? t : Je(t);
|
|
12589
12589
|
if (typeof t == "bigint" && (t = Tt(t, "blockTag")), typeof t == "number")
|
|
12590
|
-
return t >= 0 ?
|
|
12590
|
+
return t >= 0 ? Je(t) : this.#a >= 0 ? Je(this.#a + t) : this.getBlockNumber().then((e) => Je(e + t));
|
|
12591
12591
|
V(!1, "invalid blockTag", "blockTag", t);
|
|
12592
12592
|
}
|
|
12593
12593
|
/**
|
|
@@ -12802,7 +12802,7 @@ class lm {
|
|
|
12802
12802
|
signedTransaction: t
|
|
12803
12803
|
}),
|
|
12804
12804
|
network: this.getNetwork()
|
|
12805
|
-
}), o =
|
|
12805
|
+
}), o = We.from(t);
|
|
12806
12806
|
if (o.hash !== r)
|
|
12807
12807
|
throw new Error("@TODO: the returned hash did not match");
|
|
12808
12808
|
return this._wrapTransactionResponse(o, i).replaceableTransaction(e);
|
|
@@ -12889,12 +12889,12 @@ class lm {
|
|
|
12889
12889
|
t = Mt(t);
|
|
12890
12890
|
const e = xu(t.substring(2).toLowerCase() + ".addr.reverse");
|
|
12891
12891
|
try {
|
|
12892
|
-
const r = await Zi.getEnsAddress(this), o = await new
|
|
12892
|
+
const r = await Zi.getEnsAddress(this), o = await new tr(r, [
|
|
12893
12893
|
"function resolver(bytes32) view returns (address)"
|
|
12894
12894
|
], this).resolver(e);
|
|
12895
12895
|
if (o == null || o === Ls)
|
|
12896
12896
|
return null;
|
|
12897
|
-
const u = await new
|
|
12897
|
+
const u = await new tr(o, [
|
|
12898
12898
|
"function name(bytes32) view returns (string)"
|
|
12899
12899
|
], this).name(e);
|
|
12900
12900
|
return await this.resolveName(u) !== t ? null : u;
|
|
@@ -12922,7 +12922,7 @@ class lm {
|
|
|
12922
12922
|
this.once("block", _);
|
|
12923
12923
|
};
|
|
12924
12924
|
r != null && (u = setTimeout(() => {
|
|
12925
|
-
u != null && (u = null, this.off("block", _), a(
|
|
12925
|
+
u != null && (u = null, this.off("block", _), a(ee("timeout", "TIMEOUT", { reason: "timeout" })));
|
|
12926
12926
|
}, r)), _(await this.getBlockNumber());
|
|
12927
12927
|
});
|
|
12928
12928
|
}
|
|
@@ -13340,7 +13340,7 @@ class ym {
|
|
|
13340
13340
|
async sendTransaction(t) {
|
|
13341
13341
|
const e = wi(this, "sendTransaction"), r = await this.populateTransaction(t);
|
|
13342
13342
|
delete r.from;
|
|
13343
|
-
const i =
|
|
13343
|
+
const i = We.from(r);
|
|
13344
13344
|
return await e.broadcastTransaction(await this.signTransaction(i));
|
|
13345
13345
|
}
|
|
13346
13346
|
// @TODO: in v7 move this to be abstract
|
|
@@ -13550,7 +13550,7 @@ class ja extends ym {
|
|
|
13550
13550
|
o(l);
|
|
13551
13551
|
return;
|
|
13552
13552
|
}
|
|
13553
|
-
this.provider.emit("error",
|
|
13553
|
+
this.provider.emit("error", ee("failed to fetch transation after sending (will try again)", "UNKNOWN_ERROR", { error: l }));
|
|
13554
13554
|
}
|
|
13555
13555
|
this.provider._setTimeout(() => {
|
|
13556
13556
|
_();
|
|
@@ -13634,12 +13634,12 @@ class xm extends lm {
|
|
|
13634
13634
|
this.emit("debug", { action: "receiveRpcResult", result: o });
|
|
13635
13635
|
for (const { resolve: a, reject: u, payload: _ } of r) {
|
|
13636
13636
|
if (this.destroyed) {
|
|
13637
|
-
u(
|
|
13637
|
+
u(ee("provider destroyed; cancelled request", "UNSUPPORTED_OPERATION", { operation: _.method }));
|
|
13638
13638
|
continue;
|
|
13639
13639
|
}
|
|
13640
13640
|
const l = o.filter((f) => f.id === _.id)[0];
|
|
13641
13641
|
if (l == null) {
|
|
13642
|
-
const f =
|
|
13642
|
+
const f = ee("missing response for request", "BAD_DATA", {
|
|
13643
13643
|
value: o,
|
|
13644
13644
|
info: { payload: _ }
|
|
13645
13645
|
});
|
|
@@ -13763,7 +13763,7 @@ class xm extends lm {
|
|
|
13763
13763
|
} catch (t) {
|
|
13764
13764
|
if (this.destroyed)
|
|
13765
13765
|
break;
|
|
13766
|
-
console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"), this.emit("error",
|
|
13766
|
+
console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"), this.emit("error", ee("failed to bootstrap network detection", "NETWORK_ERROR", { event: "initial-network-discovery", info: { error: t } })), await vm(1e3);
|
|
13767
13767
|
}
|
|
13768
13768
|
this.#a();
|
|
13769
13769
|
})());
|
|
@@ -13803,18 +13803,18 @@ class xm extends lm {
|
|
|
13803
13803
|
if (t[r] == null)
|
|
13804
13804
|
return;
|
|
13805
13805
|
let i = r;
|
|
13806
|
-
r === "gasLimit" && (i = "gas"), e[i] =
|
|
13806
|
+
r === "gasLimit" && (i = "gas"), e[i] = Je(At(t[r], `tx.${r}`));
|
|
13807
13807
|
}), ["from", "to", "data"].forEach((r) => {
|
|
13808
13808
|
t[r] != null && (e[r] = yt(t[r]));
|
|
13809
13809
|
}), t.accessList && (e.accessList = Li(t.accessList)), t.blobVersionedHashes && (e.blobVersionedHashes = t.blobVersionedHashes.map((r) => r.toLowerCase())), t.authorizationList && (e.authorizationList = t.authorizationList.map((r) => {
|
|
13810
13810
|
const i = Xw(r);
|
|
13811
13811
|
return {
|
|
13812
13812
|
address: i.address,
|
|
13813
|
-
nonce:
|
|
13814
|
-
chainId:
|
|
13815
|
-
yParity:
|
|
13816
|
-
r:
|
|
13817
|
-
s:
|
|
13813
|
+
nonce: Je(i.nonce),
|
|
13814
|
+
chainId: Je(i.chainId),
|
|
13815
|
+
yParity: Je(i.signature.yParity),
|
|
13816
|
+
r: Je(i.signature.r),
|
|
13817
|
+
s: Je(i.signature.s)
|
|
13818
13818
|
};
|
|
13819
13819
|
})), e;
|
|
13820
13820
|
}
|
|
@@ -13909,12 +13909,12 @@ class xm extends lm {
|
|
|
13909
13909
|
if (r === "eth_estimateGas" && i.message) {
|
|
13910
13910
|
const u = i.message;
|
|
13911
13911
|
if (!u.match(/revert/i) && u.match(/insufficient funds/i))
|
|
13912
|
-
return
|
|
13912
|
+
return ee("insufficient funds", "INSUFFICIENT_FUNDS", {
|
|
13913
13913
|
transaction: t.params[0],
|
|
13914
13914
|
info: { payload: t, error: i }
|
|
13915
13915
|
});
|
|
13916
13916
|
if (u.match(/nonce/i) && u.match(/too low/i))
|
|
13917
|
-
return
|
|
13917
|
+
return ee("nonce has already been used", "NONCE_EXPIRED", {
|
|
13918
13918
|
transaction: t.params[0],
|
|
13919
13919
|
info: { payload: t, error: i }
|
|
13920
13920
|
});
|
|
@@ -13925,7 +13925,7 @@ class xm extends lm {
|
|
|
13925
13925
|
}
|
|
13926
13926
|
const o = JSON.stringify(zm(i));
|
|
13927
13927
|
if (typeof i.message == "string" && i.message.match(/user denied|ethers-user-denied/i))
|
|
13928
|
-
return
|
|
13928
|
+
return ee("user rejected action", "ACTION_REJECTED", {
|
|
13929
13929
|
action: {
|
|
13930
13930
|
eth_sign: "signMessage",
|
|
13931
13931
|
personal_sign: "signMessage",
|
|
@@ -13941,25 +13941,25 @@ class xm extends lm {
|
|
|
13941
13941
|
if (r === "eth_sendRawTransaction" || r === "eth_sendTransaction") {
|
|
13942
13942
|
const u = t.params[0];
|
|
13943
13943
|
if (o.match(/insufficient funds|base fee exceeds gas limit/i))
|
|
13944
|
-
return
|
|
13944
|
+
return ee("insufficient funds for intrinsic transaction cost", "INSUFFICIENT_FUNDS", {
|
|
13945
13945
|
transaction: u,
|
|
13946
13946
|
info: { error: i }
|
|
13947
13947
|
});
|
|
13948
13948
|
if (o.match(/nonce/i) && o.match(/too low/i))
|
|
13949
|
-
return
|
|
13949
|
+
return ee("nonce has already been used", "NONCE_EXPIRED", { transaction: u, info: { error: i } });
|
|
13950
13950
|
if (o.match(/replacement transaction/i) && o.match(/underpriced/i))
|
|
13951
|
-
return
|
|
13951
|
+
return ee("replacement fee too low", "REPLACEMENT_UNDERPRICED", { transaction: u, info: { error: i } });
|
|
13952
13952
|
if (o.match(/only replay-protected/i))
|
|
13953
|
-
return
|
|
13953
|
+
return ee("legacy pre-eip-155 transactions not supported", "UNSUPPORTED_OPERATION", {
|
|
13954
13954
|
operation: r,
|
|
13955
13955
|
info: { transaction: u, info: { error: i } }
|
|
13956
13956
|
});
|
|
13957
13957
|
}
|
|
13958
13958
|
let a = !!o.match(/the method .* does not exist/i);
|
|
13959
|
-
return a || i && i.details && i.details.startsWith("Unauthorized method:") && (a = !0), a ?
|
|
13959
|
+
return a || i && i.details && i.details.startsWith("Unauthorized method:") && (a = !0), a ? ee("unsupported operation", "UNSUPPORTED_OPERATION", {
|
|
13960
13960
|
operation: t.method,
|
|
13961
13961
|
info: { error: i, payload: t }
|
|
13962
|
-
}) :
|
|
13962
|
+
}) : ee("could not coalesce error", "UNKNOWN_ERROR", { error: i, payload: t });
|
|
13963
13963
|
}
|
|
13964
13964
|
/**
|
|
13965
13965
|
* Requests the %%method%% with %%params%% via the JSON-RPC protocol
|
|
@@ -13976,7 +13976,7 @@ class xm extends lm {
|
|
|
13976
13976
|
*/
|
|
13977
13977
|
send(t, e) {
|
|
13978
13978
|
if (this.destroyed)
|
|
13979
|
-
return Promise.reject(
|
|
13979
|
+
return Promise.reject(ee("provider destroyed; cancelled request", "UNSUPPORTED_OPERATION", { operation: t }));
|
|
13980
13980
|
const r = this.#e++, i = new Promise((o, a) => {
|
|
13981
13981
|
this.#r.push({
|
|
13982
13982
|
resolve: o,
|
|
@@ -14023,7 +14023,7 @@ class xm extends lm {
|
|
|
14023
14023
|
destroy() {
|
|
14024
14024
|
this.#n && (clearTimeout(this.#n), this.#n = null);
|
|
14025
14025
|
for (const { payload: t, reject: e } of this.#r)
|
|
14026
|
-
e(
|
|
14026
|
+
e(ee("provider destroyed; cancelled request", "UNSUPPORTED_OPERATION", { operation: t.method }));
|
|
14027
14027
|
this.#r = [], super.destroy();
|
|
14028
14028
|
}
|
|
14029
14029
|
}
|
|
@@ -14208,12 +14208,12 @@ class vi extends Yd {
|
|
|
14208
14208
|
else {
|
|
14209
14209
|
let y = null;
|
|
14210
14210
|
if (w.uuid && (y = u.filter((F) => w.uuid === F.info.uuid)[0]), y) {
|
|
14211
|
-
const { provider:
|
|
14212
|
-
o(new vi(
|
|
14211
|
+
const { provider: B, info: F } = y;
|
|
14212
|
+
o(new vi(B, void 0, {
|
|
14213
14213
|
providerInfo: F
|
|
14214
14214
|
}));
|
|
14215
14215
|
} else
|
|
14216
|
-
a(
|
|
14216
|
+
a(ee("filter returned unknown info", "UNSUPPORTED_OPERATION", {
|
|
14217
14217
|
value: w
|
|
14218
14218
|
}));
|
|
14219
14219
|
}
|
|
@@ -14365,8 +14365,8 @@ function ng() {
|
|
|
14365
14365
|
} : e = function(O) {
|
|
14366
14366
|
return Object.getOwnPropertyNames(O);
|
|
14367
14367
|
};
|
|
14368
|
-
function r(
|
|
14369
|
-
console && console.warn && console.warn(
|
|
14368
|
+
function r(z) {
|
|
14369
|
+
console && console.warn && console.warn(z);
|
|
14370
14370
|
}
|
|
14371
14371
|
var i = Number.isNaN || function(O) {
|
|
14372
14372
|
return O !== O;
|
|
@@ -14376,19 +14376,19 @@ function ng() {
|
|
|
14376
14376
|
}
|
|
14377
14377
|
ho.exports = o, ho.exports.once = A, o.EventEmitter = o, o.prototype._events = void 0, o.prototype._eventsCount = 0, o.prototype._maxListeners = void 0;
|
|
14378
14378
|
var a = 10;
|
|
14379
|
-
function u(
|
|
14380
|
-
if (typeof
|
|
14381
|
-
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof
|
|
14379
|
+
function u(z) {
|
|
14380
|
+
if (typeof z != "function")
|
|
14381
|
+
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof z);
|
|
14382
14382
|
}
|
|
14383
14383
|
Object.defineProperty(o, "defaultMaxListeners", {
|
|
14384
14384
|
enumerable: !0,
|
|
14385
14385
|
get: function() {
|
|
14386
14386
|
return a;
|
|
14387
14387
|
},
|
|
14388
|
-
set: function(
|
|
14389
|
-
if (typeof
|
|
14390
|
-
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' +
|
|
14391
|
-
a =
|
|
14388
|
+
set: function(z) {
|
|
14389
|
+
if (typeof z != "number" || z < 0 || i(z))
|
|
14390
|
+
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + z + ".");
|
|
14391
|
+
a = z;
|
|
14392
14392
|
}
|
|
14393
14393
|
}), o.init = function() {
|
|
14394
14394
|
(this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
|
|
@@ -14397,16 +14397,16 @@ function ng() {
|
|
|
14397
14397
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + O + ".");
|
|
14398
14398
|
return this._maxListeners = O, this;
|
|
14399
14399
|
};
|
|
14400
|
-
function _(
|
|
14401
|
-
return
|
|
14400
|
+
function _(z) {
|
|
14401
|
+
return z._maxListeners === void 0 ? o.defaultMaxListeners : z._maxListeners;
|
|
14402
14402
|
}
|
|
14403
14403
|
o.prototype.getMaxListeners = function() {
|
|
14404
14404
|
return _(this);
|
|
14405
14405
|
}, o.prototype.emit = function(O) {
|
|
14406
14406
|
for (var C = [], N = 1; N < arguments.length; N++) C.push(arguments[N]);
|
|
14407
|
-
var L = O === "error",
|
|
14408
|
-
if (
|
|
14409
|
-
L = L &&
|
|
14407
|
+
var L = O === "error", $ = this._events;
|
|
14408
|
+
if ($ !== void 0)
|
|
14409
|
+
L = L && $.error === void 0;
|
|
14410
14410
|
else if (!L)
|
|
14411
14411
|
return !1;
|
|
14412
14412
|
if (L) {
|
|
@@ -14416,7 +14416,7 @@ function ng() {
|
|
|
14416
14416
|
var ut = new Error("Unhandled error." + (nt ? " (" + nt.message + ")" : ""));
|
|
14417
14417
|
throw ut.context = nt, ut;
|
|
14418
14418
|
}
|
|
14419
|
-
var D =
|
|
14419
|
+
var D = $[O];
|
|
14420
14420
|
if (D === void 0)
|
|
14421
14421
|
return !1;
|
|
14422
14422
|
if (typeof D == "function")
|
|
@@ -14426,20 +14426,20 @@ function ng() {
|
|
|
14426
14426
|
t(xt[N], this, C);
|
|
14427
14427
|
return !0;
|
|
14428
14428
|
};
|
|
14429
|
-
function l(
|
|
14430
|
-
var L,
|
|
14431
|
-
if (u(C),
|
|
14429
|
+
function l(z, O, C, N) {
|
|
14430
|
+
var L, $, nt;
|
|
14431
|
+
if (u(C), $ = z._events, $ === void 0 ? ($ = z._events = /* @__PURE__ */ Object.create(null), z._eventsCount = 0) : ($.newListener !== void 0 && (z.emit(
|
|
14432
14432
|
"newListener",
|
|
14433
14433
|
O,
|
|
14434
14434
|
C.listener ? C.listener : C
|
|
14435
|
-
),
|
|
14436
|
-
nt =
|
|
14437
|
-
else if (typeof nt == "function" ? nt =
|
|
14435
|
+
), $ = z._events), nt = $[O]), nt === void 0)
|
|
14436
|
+
nt = $[O] = C, ++z._eventsCount;
|
|
14437
|
+
else if (typeof nt == "function" ? nt = $[O] = N ? [C, nt] : [nt, C] : N ? nt.unshift(C) : nt.push(C), L = _(z), L > 0 && nt.length > L && !nt.warned) {
|
|
14438
14438
|
nt.warned = !0;
|
|
14439
14439
|
var ut = new Error("Possible EventEmitter memory leak detected. " + nt.length + " " + String(O) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
14440
|
-
ut.name = "MaxListenersExceededWarning", ut.emitter =
|
|
14440
|
+
ut.name = "MaxListenersExceededWarning", ut.emitter = z, ut.type = O, ut.count = nt.length, r(ut);
|
|
14441
14441
|
}
|
|
14442
|
-
return
|
|
14442
|
+
return z;
|
|
14443
14443
|
}
|
|
14444
14444
|
o.prototype.addListener = function(O, C) {
|
|
14445
14445
|
return l(this, O, C, !1);
|
|
@@ -14450,8 +14450,8 @@ function ng() {
|
|
|
14450
14450
|
if (!this.fired)
|
|
14451
14451
|
return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
|
|
14452
14452
|
}
|
|
14453
|
-
function w(
|
|
14454
|
-
var N = { fired: !1, wrapFn: void 0, target:
|
|
14453
|
+
function w(z, O, C) {
|
|
14454
|
+
var N = { fired: !1, wrapFn: void 0, target: z, type: O, listener: C }, L = f.bind(N);
|
|
14455
14455
|
return L.listener = C, N.wrapFn = L, L;
|
|
14456
14456
|
}
|
|
14457
14457
|
o.prototype.once = function(O, C) {
|
|
@@ -14459,7 +14459,7 @@ function ng() {
|
|
|
14459
14459
|
}, o.prototype.prependOnceListener = function(O, C) {
|
|
14460
14460
|
return u(C), this.prependListener(O, w(this, O, C)), this;
|
|
14461
14461
|
}, o.prototype.removeListener = function(O, C) {
|
|
14462
|
-
var N, L,
|
|
14462
|
+
var N, L, $, nt, ut;
|
|
14463
14463
|
if (u(C), L = this._events, L === void 0)
|
|
14464
14464
|
return this;
|
|
14465
14465
|
if (N = L[O], N === void 0)
|
|
@@ -14467,14 +14467,14 @@ function ng() {
|
|
|
14467
14467
|
if (N === C || N.listener === C)
|
|
14468
14468
|
--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete L[O], L.removeListener && this.emit("removeListener", O, N.listener || C));
|
|
14469
14469
|
else if (typeof N != "function") {
|
|
14470
|
-
for (
|
|
14470
|
+
for ($ = -1, nt = N.length - 1; nt >= 0; nt--)
|
|
14471
14471
|
if (N[nt] === C || N[nt].listener === C) {
|
|
14472
|
-
ut = N[nt].listener,
|
|
14472
|
+
ut = N[nt].listener, $ = nt;
|
|
14473
14473
|
break;
|
|
14474
14474
|
}
|
|
14475
|
-
if (
|
|
14475
|
+
if ($ < 0)
|
|
14476
14476
|
return this;
|
|
14477
|
-
|
|
14477
|
+
$ === 0 ? N.shift() : k(N, $), N.length === 1 && (L[O] = N[0]), L.removeListener !== void 0 && this.emit("removeListener", O, ut || C);
|
|
14478
14478
|
}
|
|
14479
14479
|
return this;
|
|
14480
14480
|
}, o.prototype.off = o.prototype.removeListener, o.prototype.removeAllListeners = function(O) {
|
|
@@ -14484,9 +14484,9 @@ function ng() {
|
|
|
14484
14484
|
if (N.removeListener === void 0)
|
|
14485
14485
|
return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : N[O] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete N[O]), this;
|
|
14486
14486
|
if (arguments.length === 0) {
|
|
14487
|
-
var
|
|
14488
|
-
for (L = 0; L <
|
|
14489
|
-
nt =
|
|
14487
|
+
var $ = Object.keys(N), nt;
|
|
14488
|
+
for (L = 0; L < $.length; ++L)
|
|
14489
|
+
nt = $[L], nt !== "removeListener" && this.removeAllListeners(nt);
|
|
14490
14490
|
return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
|
|
14491
14491
|
}
|
|
14492
14492
|
if (C = N[O], typeof C == "function")
|
|
@@ -14496,8 +14496,8 @@ function ng() {
|
|
|
14496
14496
|
this.removeListener(O, C[L]);
|
|
14497
14497
|
return this;
|
|
14498
14498
|
};
|
|
14499
|
-
function y(
|
|
14500
|
-
var N =
|
|
14499
|
+
function y(z, O, C) {
|
|
14500
|
+
var N = z._events;
|
|
14501
14501
|
if (N === void 0)
|
|
14502
14502
|
return [];
|
|
14503
14503
|
var L = N[O];
|
|
@@ -14507,13 +14507,13 @@ function ng() {
|
|
|
14507
14507
|
return y(this, O, !0);
|
|
14508
14508
|
}, o.prototype.rawListeners = function(O) {
|
|
14509
14509
|
return y(this, O, !1);
|
|
14510
|
-
}, o.listenerCount = function(
|
|
14511
|
-
return typeof
|
|
14512
|
-
}, o.prototype.listenerCount =
|
|
14513
|
-
function z
|
|
14510
|
+
}, o.listenerCount = function(z, O) {
|
|
14511
|
+
return typeof z.listenerCount == "function" ? z.listenerCount(O) : B.call(z, O);
|
|
14512
|
+
}, o.prototype.listenerCount = B;
|
|
14513
|
+
function B(z) {
|
|
14514
14514
|
var O = this._events;
|
|
14515
14515
|
if (O !== void 0) {
|
|
14516
|
-
var C = O[
|
|
14516
|
+
var C = O[z];
|
|
14517
14517
|
if (typeof C == "function")
|
|
14518
14518
|
return 1;
|
|
14519
14519
|
if (C !== void 0)
|
|
@@ -14524,44 +14524,44 @@ function ng() {
|
|
|
14524
14524
|
o.prototype.eventNames = function() {
|
|
14525
14525
|
return this._eventsCount > 0 ? e(this._events) : [];
|
|
14526
14526
|
};
|
|
14527
|
-
function F(
|
|
14527
|
+
function F(z, O) {
|
|
14528
14528
|
for (var C = new Array(O), N = 0; N < O; ++N)
|
|
14529
|
-
C[N] =
|
|
14529
|
+
C[N] = z[N];
|
|
14530
14530
|
return C;
|
|
14531
14531
|
}
|
|
14532
|
-
function k(
|
|
14533
|
-
for (; O + 1 <
|
|
14534
|
-
|
|
14535
|
-
|
|
14532
|
+
function k(z, O) {
|
|
14533
|
+
for (; O + 1 < z.length; O++)
|
|
14534
|
+
z[O] = z[O + 1];
|
|
14535
|
+
z.pop();
|
|
14536
14536
|
}
|
|
14537
|
-
function T(
|
|
14538
|
-
for (var O = new Array(
|
|
14539
|
-
O[C] =
|
|
14537
|
+
function T(z) {
|
|
14538
|
+
for (var O = new Array(z.length), C = 0; C < O.length; ++C)
|
|
14539
|
+
O[C] = z[C].listener || z[C];
|
|
14540
14540
|
return O;
|
|
14541
14541
|
}
|
|
14542
|
-
function A(
|
|
14542
|
+
function A(z, O) {
|
|
14543
14543
|
return new Promise(function(C, N) {
|
|
14544
14544
|
function L(nt) {
|
|
14545
|
-
|
|
14545
|
+
z.removeListener(O, $), N(nt);
|
|
14546
14546
|
}
|
|
14547
|
-
function
|
|
14548
|
-
typeof
|
|
14547
|
+
function $() {
|
|
14548
|
+
typeof z.removeListener == "function" && z.removeListener("error", L), C([].slice.call(arguments));
|
|
14549
14549
|
}
|
|
14550
|
-
S(
|
|
14550
|
+
S(z, O, $, { once: !0 }), O !== "error" && x(z, L, { once: !0 });
|
|
14551
14551
|
});
|
|
14552
14552
|
}
|
|
14553
|
-
function x(
|
|
14554
|
-
typeof
|
|
14553
|
+
function x(z, O, C) {
|
|
14554
|
+
typeof z.on == "function" && S(z, "error", O, C);
|
|
14555
14555
|
}
|
|
14556
|
-
function S(
|
|
14557
|
-
if (typeof
|
|
14558
|
-
N.once ?
|
|
14559
|
-
else if (typeof
|
|
14560
|
-
|
|
14561
|
-
N.once &&
|
|
14556
|
+
function S(z, O, C, N) {
|
|
14557
|
+
if (typeof z.on == "function")
|
|
14558
|
+
N.once ? z.once(O, C) : z.on(O, C);
|
|
14559
|
+
else if (typeof z.addEventListener == "function")
|
|
14560
|
+
z.addEventListener(O, function L($) {
|
|
14561
|
+
N.once && z.removeEventListener(O, L), C($);
|
|
14562
14562
|
});
|
|
14563
14563
|
else
|
|
14564
|
-
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof
|
|
14564
|
+
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof z);
|
|
14565
14565
|
}
|
|
14566
14566
|
return ho.exports;
|
|
14567
14567
|
}
|
|
@@ -14582,46 +14582,46 @@ function Xo() {
|
|
|
14582
14582
|
var S = x.length;
|
|
14583
14583
|
if (S % 4 > 0)
|
|
14584
14584
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
14585
|
-
var
|
|
14586
|
-
|
|
14587
|
-
var O =
|
|
14588
|
-
return [
|
|
14585
|
+
var z = x.indexOf("=");
|
|
14586
|
+
z === -1 && (z = S);
|
|
14587
|
+
var O = z === S ? 0 : 4 - z % 4;
|
|
14588
|
+
return [z, O];
|
|
14589
14589
|
}
|
|
14590
14590
|
function f(x) {
|
|
14591
|
-
var S = l(x),
|
|
14592
|
-
return (
|
|
14591
|
+
var S = l(x), z = S[0], O = S[1];
|
|
14592
|
+
return (z + O) * 3 / 4 - O;
|
|
14593
14593
|
}
|
|
14594
|
-
function w(x, S,
|
|
14595
|
-
return (S +
|
|
14594
|
+
function w(x, S, z) {
|
|
14595
|
+
return (S + z) * 3 / 4 - z;
|
|
14596
14596
|
}
|
|
14597
14597
|
function y(x) {
|
|
14598
|
-
var S,
|
|
14599
|
-
for (nt = 0; nt <
|
|
14598
|
+
var S, z = l(x), O = z[0], C = z[1], N = new o(w(x, O, C)), L = 0, $ = C > 0 ? O - 4 : O, nt;
|
|
14599
|
+
for (nt = 0; nt < $; nt += 4)
|
|
14600
14600
|
S = i[x.charCodeAt(nt)] << 18 | i[x.charCodeAt(nt + 1)] << 12 | i[x.charCodeAt(nt + 2)] << 6 | i[x.charCodeAt(nt + 3)], N[L++] = S >> 16 & 255, N[L++] = S >> 8 & 255, N[L++] = S & 255;
|
|
14601
14601
|
return C === 2 && (S = i[x.charCodeAt(nt)] << 2 | i[x.charCodeAt(nt + 1)] >> 4, N[L++] = S & 255), C === 1 && (S = i[x.charCodeAt(nt)] << 10 | i[x.charCodeAt(nt + 1)] << 4 | i[x.charCodeAt(nt + 2)] >> 2, N[L++] = S >> 8 & 255, N[L++] = S & 255), N;
|
|
14602
14602
|
}
|
|
14603
|
-
function
|
|
14603
|
+
function B(x) {
|
|
14604
14604
|
return r[x >> 18 & 63] + r[x >> 12 & 63] + r[x >> 6 & 63] + r[x & 63];
|
|
14605
14605
|
}
|
|
14606
|
-
function F(x, S,
|
|
14607
|
-
for (var O, C = [], N = S; N <
|
|
14608
|
-
O = (x[N] << 16 & 16711680) + (x[N + 1] << 8 & 65280) + (x[N + 2] & 255), C.push(
|
|
14606
|
+
function F(x, S, z) {
|
|
14607
|
+
for (var O, C = [], N = S; N < z; N += 3)
|
|
14608
|
+
O = (x[N] << 16 & 16711680) + (x[N + 1] << 8 & 65280) + (x[N + 2] & 255), C.push(B(O));
|
|
14609
14609
|
return C.join("");
|
|
14610
14610
|
}
|
|
14611
14611
|
function k(x) {
|
|
14612
|
-
for (var S,
|
|
14613
|
-
C.push(F(x, L, L + N >
|
|
14614
|
-
return O === 1 ? (S = x[
|
|
14612
|
+
for (var S, z = x.length, O = z % 3, C = [], N = 16383, L = 0, $ = z - O; L < $; L += N)
|
|
14613
|
+
C.push(F(x, L, L + N > $ ? $ : L + N));
|
|
14614
|
+
return O === 1 ? (S = x[z - 1], C.push(
|
|
14615
14615
|
r[S >> 2] + r[S << 4 & 63] + "=="
|
|
14616
|
-
)) : O === 2 && (S = (x[
|
|
14616
|
+
)) : O === 2 && (S = (x[z - 2] << 8) + x[z - 1], C.push(
|
|
14617
14617
|
r[S >> 10] + r[S >> 4 & 63] + r[S << 2 & 63] + "="
|
|
14618
14618
|
)), C.join("");
|
|
14619
14619
|
}
|
|
14620
14620
|
var T = {};
|
|
14621
14621
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
14622
|
-
T.read = function(x, S,
|
|
14623
|
-
var N, L,
|
|
14624
|
-
for (dt += xt, N = at & (1 << -D) - 1, at >>= -D, D +=
|
|
14622
|
+
T.read = function(x, S, z, O, C) {
|
|
14623
|
+
var N, L, $ = C * 8 - O - 1, nt = (1 << $) - 1, ut = nt >> 1, D = -7, dt = z ? C - 1 : 0, xt = z ? -1 : 1, at = x[S + dt];
|
|
14624
|
+
for (dt += xt, N = at & (1 << -D) - 1, at >>= -D, D += $; D > 0; N = N * 256 + x[S + dt], dt += xt, D -= 8)
|
|
14625
14625
|
;
|
|
14626
14626
|
for (L = N & (1 << -D) - 1, N >>= -D, D += O; D > 0; L = L * 256 + x[S + dt], dt += xt, D -= 8)
|
|
14627
14627
|
;
|
|
@@ -14633,13 +14633,13 @@ function Xo() {
|
|
|
14633
14633
|
L = L + Math.pow(2, O), N = N - ut;
|
|
14634
14634
|
}
|
|
14635
14635
|
return (at ? -1 : 1) * L * Math.pow(2, N - O);
|
|
14636
|
-
}, T.write = function(x, S,
|
|
14637
|
-
var L,
|
|
14638
|
-
for (S = Math.abs(S), isNaN(S) || S === 1 / 0 ? (
|
|
14636
|
+
}, T.write = function(x, S, z, O, C, N) {
|
|
14637
|
+
var L, $, nt, ut = N * 8 - C - 1, D = (1 << ut) - 1, dt = D >> 1, xt = C === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, at = O ? 0 : N - 1, ht = O ? 1 : -1, Et = S < 0 || S === 0 && 1 / S < 0 ? 1 : 0;
|
|
14638
|
+
for (S = Math.abs(S), isNaN(S) || S === 1 / 0 ? ($ = isNaN(S) ? 1 : 0, L = D) : (L = Math.floor(Math.log(S) / Math.LN2), S * (nt = Math.pow(2, -L)) < 1 && (L--, nt *= 2), L + dt >= 1 ? S += xt / nt : S += xt * Math.pow(2, 1 - dt), S * nt >= 2 && (L++, nt /= 2), L + dt >= D ? ($ = 0, L = D) : L + dt >= 1 ? ($ = (S * nt - 1) * Math.pow(2, C), L = L + dt) : ($ = S * Math.pow(2, dt - 1) * Math.pow(2, C), L = 0)); C >= 8; x[z + at] = $ & 255, at += ht, $ /= 256, C -= 8)
|
|
14639
14639
|
;
|
|
14640
|
-
for (L = L << C |
|
|
14640
|
+
for (L = L << C | $, ut += C; ut > 0; x[z + at] = L & 255, at += ht, L /= 256, ut -= 8)
|
|
14641
14641
|
;
|
|
14642
|
-
x[
|
|
14642
|
+
x[z + at - ht] |= Et * 128;
|
|
14643
14643
|
};
|
|
14644
14644
|
/*!
|
|
14645
14645
|
* The buffer module from node.js, for the browser.
|
|
@@ -14648,11 +14648,11 @@ function Xo() {
|
|
|
14648
14648
|
* @license MIT
|
|
14649
14649
|
*/
|
|
14650
14650
|
(function(x) {
|
|
14651
|
-
const S = e,
|
|
14651
|
+
const S = e, z = T, O = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
14652
14652
|
x.Buffer = D, x.SlowBuffer = Z, x.INSPECT_MAX_BYTES = 50;
|
|
14653
14653
|
const C = 2147483647;
|
|
14654
14654
|
x.kMaxLength = C;
|
|
14655
|
-
const { Uint8Array: N, ArrayBuffer: L, SharedArrayBuffer:
|
|
14655
|
+
const { Uint8Array: N, ArrayBuffer: L, SharedArrayBuffer: $ } = globalThis;
|
|
14656
14656
|
D.TYPED_ARRAY_SUPPORT = nt(), !D.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
|
|
14657
14657
|
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
|
|
14658
14658
|
);
|
|
@@ -14705,7 +14705,7 @@ function Xo() {
|
|
|
14705
14705
|
throw new TypeError(
|
|
14706
14706
|
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof m
|
|
14707
14707
|
);
|
|
14708
|
-
if (ke(m, L) || m && ke(m.buffer, L) || typeof
|
|
14708
|
+
if (ke(m, L) || m && ke(m.buffer, L) || typeof $ < "u" && (ke(m, $) || m && ke(m.buffer, $)))
|
|
14709
14709
|
return Pt(m, p, g);
|
|
14710
14710
|
if (typeof m == "number")
|
|
14711
14711
|
throw new TypeError(
|
|
@@ -14801,9 +14801,9 @@ function Xo() {
|
|
|
14801
14801
|
);
|
|
14802
14802
|
if (p === g) return 0;
|
|
14803
14803
|
let I = p.length, H = g.length;
|
|
14804
|
-
for (let
|
|
14805
|
-
if (p[
|
|
14806
|
-
I = p[
|
|
14804
|
+
for (let Y = 0, ot = Math.min(I, H); Y < ot; ++Y)
|
|
14805
|
+
if (p[Y] !== g[Y]) {
|
|
14806
|
+
I = p[Y], H = g[Y];
|
|
14807
14807
|
break;
|
|
14808
14808
|
}
|
|
14809
14809
|
return I < H ? -1 : H < I ? 1 : 0;
|
|
@@ -14834,20 +14834,20 @@ function Xo() {
|
|
|
14834
14834
|
for (g = 0, I = 0; I < p.length; ++I)
|
|
14835
14835
|
g += p[I].length;
|
|
14836
14836
|
const H = D.allocUnsafe(g);
|
|
14837
|
-
let
|
|
14837
|
+
let Y = 0;
|
|
14838
14838
|
for (I = 0; I < p.length; ++I) {
|
|
14839
14839
|
let ot = p[I];
|
|
14840
14840
|
if (ke(ot, N))
|
|
14841
|
-
|
|
14841
|
+
Y + ot.length > H.length ? (D.isBuffer(ot) || (ot = D.from(ot)), ot.copy(H, Y)) : N.prototype.set.call(
|
|
14842
14842
|
H,
|
|
14843
14843
|
ot,
|
|
14844
|
-
|
|
14844
|
+
Y
|
|
14845
14845
|
);
|
|
14846
14846
|
else if (D.isBuffer(ot))
|
|
14847
|
-
ot.copy(H,
|
|
14847
|
+
ot.copy(H, Y);
|
|
14848
14848
|
else
|
|
14849
14849
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
14850
|
-
|
|
14850
|
+
Y += ot.length;
|
|
14851
14851
|
}
|
|
14852
14852
|
return H;
|
|
14853
14853
|
};
|
|
@@ -14952,22 +14952,22 @@ function Xo() {
|
|
|
14952
14952
|
let p = "";
|
|
14953
14953
|
const g = x.INSPECT_MAX_BYTES;
|
|
14954
14954
|
return p = this.toString("hex", 0, g).replace(/(.{2})/g, "$1 ").trim(), this.length > g && (p += " ... "), "<Buffer " + p + ">";
|
|
14955
|
-
}, O && (D.prototype[O] = D.prototype.inspect), D.prototype.compare = function(p, g, I, H,
|
|
14955
|
+
}, O && (D.prototype[O] = D.prototype.inspect), D.prototype.compare = function(p, g, I, H, Y) {
|
|
14956
14956
|
if (ke(p, N) && (p = D.from(p, p.offset, p.byteLength)), !D.isBuffer(p))
|
|
14957
14957
|
throw new TypeError(
|
|
14958
14958
|
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof p
|
|
14959
14959
|
);
|
|
14960
|
-
if (g === void 0 && (g = 0), I === void 0 && (I = p ? p.length : 0), H === void 0 && (H = 0),
|
|
14960
|
+
if (g === void 0 && (g = 0), I === void 0 && (I = p ? p.length : 0), H === void 0 && (H = 0), Y === void 0 && (Y = this.length), g < 0 || I > p.length || H < 0 || Y > this.length)
|
|
14961
14961
|
throw new RangeError("out of range index");
|
|
14962
|
-
if (H >=
|
|
14962
|
+
if (H >= Y && g >= I)
|
|
14963
14963
|
return 0;
|
|
14964
|
-
if (H >=
|
|
14964
|
+
if (H >= Y)
|
|
14965
14965
|
return -1;
|
|
14966
14966
|
if (g >= I)
|
|
14967
14967
|
return 1;
|
|
14968
|
-
if (g >>>= 0, I >>>= 0, H >>>= 0,
|
|
14969
|
-
let ot =
|
|
14970
|
-
const $t = Math.min(ot, Ft), Wt = this.slice(H,
|
|
14968
|
+
if (g >>>= 0, I >>>= 0, H >>>= 0, Y >>>= 0, this === p) return 0;
|
|
14969
|
+
let ot = Y - H, Ft = I - g;
|
|
14970
|
+
const $t = Math.min(ot, Ft), Wt = this.slice(H, Y), Yt = p.slice(g, I);
|
|
14971
14971
|
for (let Ht = 0; Ht < $t; ++Ht)
|
|
14972
14972
|
if (Wt[Ht] !== Yt[Ht]) {
|
|
14973
14973
|
ot = Wt[Ht], Ft = Yt[Ht];
|
|
@@ -14990,21 +14990,21 @@ function Xo() {
|
|
|
14990
14990
|
throw new TypeError("val must be string, number or Buffer");
|
|
14991
14991
|
}
|
|
14992
14992
|
function X(m, p, g, I, H) {
|
|
14993
|
-
let
|
|
14993
|
+
let Y = 1, ot = m.length, Ft = p.length;
|
|
14994
14994
|
if (I !== void 0 && (I = String(I).toLowerCase(), I === "ucs2" || I === "ucs-2" || I === "utf16le" || I === "utf-16le")) {
|
|
14995
14995
|
if (m.length < 2 || p.length < 2)
|
|
14996
14996
|
return -1;
|
|
14997
|
-
|
|
14997
|
+
Y = 2, ot /= 2, Ft /= 2, g /= 2;
|
|
14998
14998
|
}
|
|
14999
14999
|
function $t(Yt, Ht) {
|
|
15000
|
-
return
|
|
15000
|
+
return Y === 1 ? Yt[Ht] : Yt.readUInt16BE(Ht * Y);
|
|
15001
15001
|
}
|
|
15002
15002
|
let Wt;
|
|
15003
15003
|
if (H) {
|
|
15004
15004
|
let Yt = -1;
|
|
15005
15005
|
for (Wt = g; Wt < ot; Wt++)
|
|
15006
15006
|
if ($t(m, Wt) === $t(p, Yt === -1 ? 0 : Wt - Yt)) {
|
|
15007
|
-
if (Yt === -1 && (Yt = Wt), Wt - Yt + 1 === Ft) return Yt *
|
|
15007
|
+
if (Yt === -1 && (Yt = Wt), Wt - Yt + 1 === Ft) return Yt * Y;
|
|
15008
15008
|
} else
|
|
15009
15009
|
Yt !== -1 && (Wt -= Wt - Yt), Yt = -1;
|
|
15010
15010
|
} else
|
|
@@ -15030,8 +15030,8 @@ function Xo() {
|
|
|
15030
15030
|
g = Number(g) || 0;
|
|
15031
15031
|
const H = m.length - g;
|
|
15032
15032
|
I ? (I = Number(I), I > H && (I = H)) : I = H;
|
|
15033
|
-
const
|
|
15034
|
-
I >
|
|
15033
|
+
const Y = p.length;
|
|
15034
|
+
I > Y / 2 && (I = Y / 2);
|
|
15035
15035
|
let ot;
|
|
15036
15036
|
for (ot = 0; ot < I; ++ot) {
|
|
15037
15037
|
const Ft = parseInt(p.substr(ot * 2, 2), 16);
|
|
@@ -15049,7 +15049,7 @@ function Xo() {
|
|
|
15049
15049
|
function R(m, p, g, I) {
|
|
15050
15050
|
return ei(Ut(p), m, g, I);
|
|
15051
15051
|
}
|
|
15052
|
-
function
|
|
15052
|
+
function et(m, p, g, I) {
|
|
15053
15053
|
return ei(Kt(p, m.length - g), m, g, I);
|
|
15054
15054
|
}
|
|
15055
15055
|
D.prototype.write = function(p, g, I, H) {
|
|
@@ -15063,8 +15063,8 @@ function Xo() {
|
|
|
15063
15063
|
throw new Error(
|
|
15064
15064
|
"Buffer.write(string, encoding, offset[, length]) is no longer supported"
|
|
15065
15065
|
);
|
|
15066
|
-
const
|
|
15067
|
-
if ((I === void 0 || I >
|
|
15066
|
+
const Y = this.length - g;
|
|
15067
|
+
if ((I === void 0 || I > Y) && (I = Y), p.length > 0 && (I < 0 || g < 0) || g > this.length)
|
|
15068
15068
|
throw new RangeError("Attempt to write outside buffer bounds");
|
|
15069
15069
|
H || (H = "utf8");
|
|
15070
15070
|
let ot = !1;
|
|
@@ -15085,7 +15085,7 @@ function Xo() {
|
|
|
15085
15085
|
case "ucs-2":
|
|
15086
15086
|
case "utf16le":
|
|
15087
15087
|
case "utf-16le":
|
|
15088
|
-
return
|
|
15088
|
+
return et(this, p, g, I);
|
|
15089
15089
|
default:
|
|
15090
15090
|
if (ot) throw new TypeError("Unknown encoding: " + H);
|
|
15091
15091
|
H = ("" + H).toLowerCase(), ot = !0;
|
|
@@ -15104,22 +15104,22 @@ function Xo() {
|
|
|
15104
15104
|
const I = [];
|
|
15105
15105
|
let H = p;
|
|
15106
15106
|
for (; H < g; ) {
|
|
15107
|
-
const
|
|
15108
|
-
let ot = null, Ft =
|
|
15107
|
+
const Y = m[H];
|
|
15108
|
+
let ot = null, Ft = Y > 239 ? 4 : Y > 223 ? 3 : Y > 191 ? 2 : 1;
|
|
15109
15109
|
if (H + Ft <= g) {
|
|
15110
15110
|
let $t, Wt, Yt, Ht;
|
|
15111
15111
|
switch (Ft) {
|
|
15112
15112
|
case 1:
|
|
15113
|
-
|
|
15113
|
+
Y < 128 && (ot = Y);
|
|
15114
15114
|
break;
|
|
15115
15115
|
case 2:
|
|
15116
|
-
$t = m[H + 1], ($t & 192) === 128 && (Ht = (
|
|
15116
|
+
$t = m[H + 1], ($t & 192) === 128 && (Ht = (Y & 31) << 6 | $t & 63, Ht > 127 && (ot = Ht));
|
|
15117
15117
|
break;
|
|
15118
15118
|
case 3:
|
|
15119
|
-
$t = m[H + 1], Wt = m[H + 2], ($t & 192) === 128 && (Wt & 192) === 128 && (Ht = (
|
|
15119
|
+
$t = m[H + 1], Wt = m[H + 2], ($t & 192) === 128 && (Wt & 192) === 128 && (Ht = (Y & 15) << 12 | ($t & 63) << 6 | Wt & 63, Ht > 2047 && (Ht < 55296 || Ht > 57343) && (ot = Ht));
|
|
15120
15120
|
break;
|
|
15121
15121
|
case 4:
|
|
15122
|
-
$t = m[H + 1], Wt = m[H + 2], Yt = m[H + 3], ($t & 192) === 128 && (Wt & 192) === 128 && (Yt & 192) === 128 && (Ht = (
|
|
15122
|
+
$t = m[H + 1], Wt = m[H + 2], Yt = m[H + 3], ($t & 192) === 128 && (Wt & 192) === 128 && (Yt & 192) === 128 && (Ht = (Y & 15) << 18 | ($t & 63) << 12 | (Wt & 63) << 6 | Yt & 63, Ht > 65535 && Ht < 1114112 && (ot = Ht));
|
|
15123
15123
|
}
|
|
15124
15124
|
}
|
|
15125
15125
|
ot === null ? (ot = 65533, Ft = 1) : ot > 65535 && (ot -= 65536, I.push(ot >>> 10 & 1023 | 55296), ot = 56320 | ot & 1023), I.push(ot), H += Ft;
|
|
@@ -15157,15 +15157,15 @@ function Xo() {
|
|
|
15157
15157
|
const I = m.length;
|
|
15158
15158
|
(!p || p < 0) && (p = 0), (!g || g < 0 || g > I) && (g = I);
|
|
15159
15159
|
let H = "";
|
|
15160
|
-
for (let
|
|
15161
|
-
H += ms[m[
|
|
15160
|
+
for (let Y = p; Y < g; ++Y)
|
|
15161
|
+
H += ms[m[Y]];
|
|
15162
15162
|
return H;
|
|
15163
15163
|
}
|
|
15164
15164
|
function we(m, p, g) {
|
|
15165
15165
|
const I = m.slice(p, g);
|
|
15166
15166
|
let H = "";
|
|
15167
|
-
for (let
|
|
15168
|
-
H += String.fromCharCode(I[
|
|
15167
|
+
for (let Y = 0; Y < I.length - 1; Y += 2)
|
|
15168
|
+
H += String.fromCharCode(I[Y] + I[Y + 1] * 256);
|
|
15169
15169
|
return H;
|
|
15170
15170
|
}
|
|
15171
15171
|
D.prototype.slice = function(p, g) {
|
|
@@ -15180,15 +15180,15 @@ function Xo() {
|
|
|
15180
15180
|
}
|
|
15181
15181
|
D.prototype.readUintLE = D.prototype.readUIntLE = function(p, g, I) {
|
|
15182
15182
|
p = p >>> 0, g = g >>> 0, I || Gt(p, g, this.length);
|
|
15183
|
-
let H = this[p],
|
|
15184
|
-
for (; ++ot < g && (
|
|
15185
|
-
H += this[p + ot] *
|
|
15183
|
+
let H = this[p], Y = 1, ot = 0;
|
|
15184
|
+
for (; ++ot < g && (Y *= 256); )
|
|
15185
|
+
H += this[p + ot] * Y;
|
|
15186
15186
|
return H;
|
|
15187
15187
|
}, D.prototype.readUintBE = D.prototype.readUIntBE = function(p, g, I) {
|
|
15188
15188
|
p = p >>> 0, g = g >>> 0, I || Gt(p, g, this.length);
|
|
15189
|
-
let H = this[p + --g],
|
|
15190
|
-
for (; g > 0 && (
|
|
15191
|
-
H += this[p + --g] *
|
|
15189
|
+
let H = this[p + --g], Y = 1;
|
|
15190
|
+
for (; g > 0 && (Y *= 256); )
|
|
15191
|
+
H += this[p + --g] * Y;
|
|
15192
15192
|
return H;
|
|
15193
15193
|
}, D.prototype.readUint8 = D.prototype.readUInt8 = function(p, g) {
|
|
15194
15194
|
return p = p >>> 0, g || Gt(p, 1, this.length), this[p];
|
|
@@ -15204,26 +15204,26 @@ function Xo() {
|
|
|
15204
15204
|
p = p >>> 0, U(p, "offset");
|
|
15205
15205
|
const g = this[p], I = this[p + 7];
|
|
15206
15206
|
(g === void 0 || I === void 0) && J(p, this.length - 8);
|
|
15207
|
-
const H = g + this[++p] * 2 ** 8 + this[++p] * 2 ** 16 + this[++p] * 2 ** 24,
|
|
15208
|
-
return BigInt(H) + (BigInt(
|
|
15207
|
+
const H = g + this[++p] * 2 ** 8 + this[++p] * 2 ** 16 + this[++p] * 2 ** 24, Y = this[++p] + this[++p] * 2 ** 8 + this[++p] * 2 ** 16 + I * 2 ** 24;
|
|
15208
|
+
return BigInt(H) + (BigInt(Y) << BigInt(32));
|
|
15209
15209
|
}), D.prototype.readBigUInt64BE = Le(function(p) {
|
|
15210
15210
|
p = p >>> 0, U(p, "offset");
|
|
15211
15211
|
const g = this[p], I = this[p + 7];
|
|
15212
15212
|
(g === void 0 || I === void 0) && J(p, this.length - 8);
|
|
15213
|
-
const H = g * 2 ** 24 + this[++p] * 2 ** 16 + this[++p] * 2 ** 8 + this[++p],
|
|
15214
|
-
return (BigInt(H) << BigInt(32)) + BigInt(
|
|
15213
|
+
const H = g * 2 ** 24 + this[++p] * 2 ** 16 + this[++p] * 2 ** 8 + this[++p], Y = this[++p] * 2 ** 24 + this[++p] * 2 ** 16 + this[++p] * 2 ** 8 + I;
|
|
15214
|
+
return (BigInt(H) << BigInt(32)) + BigInt(Y);
|
|
15215
15215
|
}), D.prototype.readIntLE = function(p, g, I) {
|
|
15216
15216
|
p = p >>> 0, g = g >>> 0, I || Gt(p, g, this.length);
|
|
15217
|
-
let H = this[p],
|
|
15218
|
-
for (; ++ot < g && (
|
|
15219
|
-
H += this[p + ot] *
|
|
15220
|
-
return
|
|
15217
|
+
let H = this[p], Y = 1, ot = 0;
|
|
15218
|
+
for (; ++ot < g && (Y *= 256); )
|
|
15219
|
+
H += this[p + ot] * Y;
|
|
15220
|
+
return Y *= 128, H >= Y && (H -= Math.pow(2, 8 * g)), H;
|
|
15221
15221
|
}, D.prototype.readIntBE = function(p, g, I) {
|
|
15222
15222
|
p = p >>> 0, g = g >>> 0, I || Gt(p, g, this.length);
|
|
15223
|
-
let H = g,
|
|
15224
|
-
for (; H > 0 && (
|
|
15225
|
-
ot += this[p + --H] *
|
|
15226
|
-
return
|
|
15223
|
+
let H = g, Y = 1, ot = this[p + --H];
|
|
15224
|
+
for (; H > 0 && (Y *= 256); )
|
|
15225
|
+
ot += this[p + --H] * Y;
|
|
15226
|
+
return Y *= 128, ot >= Y && (ot -= Math.pow(2, 8 * g)), ot;
|
|
15227
15227
|
}, D.prototype.readInt8 = function(p, g) {
|
|
15228
15228
|
return p = p >>> 0, g || Gt(p, 1, this.length), this[p] & 128 ? (255 - this[p] + 1) * -1 : this[p];
|
|
15229
15229
|
}, D.prototype.readInt16LE = function(p, g) {
|
|
@@ -15252,17 +15252,17 @@ function Xo() {
|
|
|
15252
15252
|
this[++p] * 2 ** 16 + this[++p] * 2 ** 8 + this[++p];
|
|
15253
15253
|
return (BigInt(H) << BigInt(32)) + BigInt(this[++p] * 2 ** 24 + this[++p] * 2 ** 16 + this[++p] * 2 ** 8 + I);
|
|
15254
15254
|
}), D.prototype.readFloatLE = function(p, g) {
|
|
15255
|
-
return p = p >>> 0, g || Gt(p, 4, this.length),
|
|
15255
|
+
return p = p >>> 0, g || Gt(p, 4, this.length), z.read(this, p, !0, 23, 4);
|
|
15256
15256
|
}, D.prototype.readFloatBE = function(p, g) {
|
|
15257
|
-
return p = p >>> 0, g || Gt(p, 4, this.length),
|
|
15257
|
+
return p = p >>> 0, g || Gt(p, 4, this.length), z.read(this, p, !1, 23, 4);
|
|
15258
15258
|
}, D.prototype.readDoubleLE = function(p, g) {
|
|
15259
|
-
return p = p >>> 0, g || Gt(p, 8, this.length),
|
|
15259
|
+
return p = p >>> 0, g || Gt(p, 8, this.length), z.read(this, p, !0, 52, 8);
|
|
15260
15260
|
}, D.prototype.readDoubleBE = function(p, g) {
|
|
15261
|
-
return p = p >>> 0, g || Gt(p, 8, this.length),
|
|
15261
|
+
return p = p >>> 0, g || Gt(p, 8, this.length), z.read(this, p, !1, 52, 8);
|
|
15262
15262
|
};
|
|
15263
|
-
function Qt(m, p, g, I, H,
|
|
15263
|
+
function Qt(m, p, g, I, H, Y) {
|
|
15264
15264
|
if (!D.isBuffer(m)) throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
15265
|
-
if (p > H || p <
|
|
15265
|
+
if (p > H || p < Y) throw new RangeError('"value" argument is out of bounds');
|
|
15266
15266
|
if (g + I > m.length) throw new RangeError("Index out of range");
|
|
15267
15267
|
}
|
|
15268
15268
|
D.prototype.writeUintLE = D.prototype.writeUIntLE = function(p, g, I, H) {
|
|
@@ -15270,18 +15270,18 @@ function Xo() {
|
|
|
15270
15270
|
const Ft = Math.pow(2, 8 * I) - 1;
|
|
15271
15271
|
Qt(this, p, g, I, Ft, 0);
|
|
15272
15272
|
}
|
|
15273
|
-
let
|
|
15274
|
-
for (this[g] = p & 255; ++ot < I && (
|
|
15275
|
-
this[g + ot] = p /
|
|
15273
|
+
let Y = 1, ot = 0;
|
|
15274
|
+
for (this[g] = p & 255; ++ot < I && (Y *= 256); )
|
|
15275
|
+
this[g + ot] = p / Y & 255;
|
|
15276
15276
|
return g + I;
|
|
15277
15277
|
}, D.prototype.writeUintBE = D.prototype.writeUIntBE = function(p, g, I, H) {
|
|
15278
15278
|
if (p = +p, g = g >>> 0, I = I >>> 0, !H) {
|
|
15279
15279
|
const Ft = Math.pow(2, 8 * I) - 1;
|
|
15280
15280
|
Qt(this, p, g, I, Ft, 0);
|
|
15281
15281
|
}
|
|
15282
|
-
let
|
|
15283
|
-
for (this[g +
|
|
15284
|
-
this[g +
|
|
15282
|
+
let Y = I - 1, ot = 1;
|
|
15283
|
+
for (this[g + Y] = p & 255; --Y >= 0 && (ot *= 256); )
|
|
15284
|
+
this[g + Y] = p / ot & 255;
|
|
15285
15285
|
return g + I;
|
|
15286
15286
|
}, D.prototype.writeUint8 = D.prototype.writeUInt8 = function(p, g, I) {
|
|
15287
15287
|
return p = +p, g = g >>> 0, I || Qt(this, p, g, 1, 255, 0), this[g] = p & 255, g + 1;
|
|
@@ -15296,15 +15296,15 @@ function Xo() {
|
|
|
15296
15296
|
};
|
|
15297
15297
|
function de(m, p, g, I, H) {
|
|
15298
15298
|
P(p, I, H, m, g, 7);
|
|
15299
|
-
let
|
|
15300
|
-
m[g++] =
|
|
15299
|
+
let Y = Number(p & BigInt(4294967295));
|
|
15300
|
+
m[g++] = Y, Y = Y >> 8, m[g++] = Y, Y = Y >> 8, m[g++] = Y, Y = Y >> 8, m[g++] = Y;
|
|
15301
15301
|
let ot = Number(p >> BigInt(32) & BigInt(4294967295));
|
|
15302
15302
|
return m[g++] = ot, ot = ot >> 8, m[g++] = ot, ot = ot >> 8, m[g++] = ot, ot = ot >> 8, m[g++] = ot, g;
|
|
15303
15303
|
}
|
|
15304
15304
|
function fe(m, p, g, I, H) {
|
|
15305
15305
|
P(p, I, H, m, g, 7);
|
|
15306
|
-
let
|
|
15307
|
-
m[g + 7] =
|
|
15306
|
+
let Y = Number(p & BigInt(4294967295));
|
|
15307
|
+
m[g + 7] = Y, Y = Y >> 8, m[g + 6] = Y, Y = Y >> 8, m[g + 5] = Y, Y = Y >> 8, m[g + 4] = Y;
|
|
15308
15308
|
let ot = Number(p >> BigInt(32) & BigInt(4294967295));
|
|
15309
15309
|
return m[g + 3] = ot, ot = ot >> 8, m[g + 2] = ot, ot = ot >> 8, m[g + 1] = ot, ot = ot >> 8, m[g] = ot, g + 8;
|
|
15310
15310
|
}
|
|
@@ -15317,18 +15317,18 @@ function Xo() {
|
|
|
15317
15317
|
const $t = Math.pow(2, 8 * I - 1);
|
|
15318
15318
|
Qt(this, p, g, I, $t - 1, -$t);
|
|
15319
15319
|
}
|
|
15320
|
-
let
|
|
15321
|
-
for (this[g] = p & 255;
|
|
15322
|
-
p < 0 && Ft === 0 && this[g +
|
|
15320
|
+
let Y = 0, ot = 1, Ft = 0;
|
|
15321
|
+
for (this[g] = p & 255; ++Y < I && (ot *= 256); )
|
|
15322
|
+
p < 0 && Ft === 0 && this[g + Y - 1] !== 0 && (Ft = 1), this[g + Y] = (p / ot >> 0) - Ft & 255;
|
|
15323
15323
|
return g + I;
|
|
15324
15324
|
}, D.prototype.writeIntBE = function(p, g, I, H) {
|
|
15325
15325
|
if (p = +p, g = g >>> 0, !H) {
|
|
15326
15326
|
const $t = Math.pow(2, 8 * I - 1);
|
|
15327
15327
|
Qt(this, p, g, I, $t - 1, -$t);
|
|
15328
15328
|
}
|
|
15329
|
-
let
|
|
15330
|
-
for (this[g +
|
|
15331
|
-
p < 0 && Ft === 0 && this[g +
|
|
15329
|
+
let Y = I - 1, ot = 1, Ft = 0;
|
|
15330
|
+
for (this[g + Y] = p & 255; --Y >= 0 && (ot *= 256); )
|
|
15331
|
+
p < 0 && Ft === 0 && this[g + Y + 1] !== 0 && (Ft = 1), this[g + Y] = (p / ot >> 0) - Ft & 255;
|
|
15332
15332
|
return g + I;
|
|
15333
15333
|
}, D.prototype.writeInt8 = function(p, g, I) {
|
|
15334
15334
|
return p = +p, g = g >>> 0, I || Qt(this, p, g, 1, 127, -128), p < 0 && (p = 255 + p + 1), this[g] = p & 255, g + 1;
|
|
@@ -15345,12 +15345,12 @@ function Xo() {
|
|
|
15345
15345
|
}), D.prototype.writeBigInt64BE = Le(function(p, g = 0) {
|
|
15346
15346
|
return fe(this, p, g, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
15347
15347
|
});
|
|
15348
|
-
function Ee(m, p, g, I, H,
|
|
15348
|
+
function Ee(m, p, g, I, H, Y) {
|
|
15349
15349
|
if (g + I > m.length) throw new RangeError("Index out of range");
|
|
15350
15350
|
if (g < 0) throw new RangeError("Index out of range");
|
|
15351
15351
|
}
|
|
15352
15352
|
function Se(m, p, g, I, H) {
|
|
15353
|
-
return p = +p, g = g >>> 0, H || Ee(m, p, g, 4),
|
|
15353
|
+
return p = +p, g = g >>> 0, H || Ee(m, p, g, 4), z.write(m, p, g, I, 23, 4), g + 4;
|
|
15354
15354
|
}
|
|
15355
15355
|
D.prototype.writeFloatLE = function(p, g, I) {
|
|
15356
15356
|
return Se(this, p, g, !0, I);
|
|
@@ -15358,7 +15358,7 @@ function Xo() {
|
|
|
15358
15358
|
return Se(this, p, g, !1, I);
|
|
15359
15359
|
};
|
|
15360
15360
|
function ae(m, p, g, I, H) {
|
|
15361
|
-
return p = +p, g = g >>> 0, H || Ee(m, p, g, 8),
|
|
15361
|
+
return p = +p, g = g >>> 0, H || Ee(m, p, g, 8), z.write(m, p, g, I, 52, 8), g + 8;
|
|
15362
15362
|
}
|
|
15363
15363
|
D.prototype.writeDoubleLE = function(p, g, I) {
|
|
15364
15364
|
return ae(this, p, g, !0, I);
|
|
@@ -15372,12 +15372,12 @@ function Xo() {
|
|
|
15372
15372
|
if (I < 0 || I >= this.length) throw new RangeError("Index out of range");
|
|
15373
15373
|
if (H < 0) throw new RangeError("sourceEnd out of bounds");
|
|
15374
15374
|
H > this.length && (H = this.length), p.length - g < H - I && (H = p.length - g + I);
|
|
15375
|
-
const
|
|
15375
|
+
const Y = H - I;
|
|
15376
15376
|
return this === p && typeof N.prototype.copyWithin == "function" ? this.copyWithin(g, I, H) : N.prototype.set.call(
|
|
15377
15377
|
p,
|
|
15378
15378
|
this.subarray(I, H),
|
|
15379
15379
|
g
|
|
15380
|
-
),
|
|
15380
|
+
), Y;
|
|
15381
15381
|
}, D.prototype.fill = function(p, g, I, H) {
|
|
15382
15382
|
if (typeof p == "string") {
|
|
15383
15383
|
if (typeof g == "string" ? (H = g, g = 0, I = this.length) : typeof I == "string" && (H = I, I = this.length), H !== void 0 && typeof H != "string")
|
|
@@ -15394,16 +15394,16 @@ function Xo() {
|
|
|
15394
15394
|
if (I <= g)
|
|
15395
15395
|
return this;
|
|
15396
15396
|
g = g >>> 0, I = I === void 0 ? this.length : I >>> 0, p || (p = 0);
|
|
15397
|
-
let
|
|
15397
|
+
let Y;
|
|
15398
15398
|
if (typeof p == "number")
|
|
15399
|
-
for (
|
|
15400
|
-
this[
|
|
15399
|
+
for (Y = g; Y < I; ++Y)
|
|
15400
|
+
this[Y] = p;
|
|
15401
15401
|
else {
|
|
15402
15402
|
const ot = D.isBuffer(p) ? p : D.from(p, H), Ft = ot.length;
|
|
15403
15403
|
if (Ft === 0)
|
|
15404
15404
|
throw new TypeError('The value "' + p + '" is invalid for argument "value"');
|
|
15405
|
-
for (
|
|
15406
|
-
this[
|
|
15405
|
+
for (Y = 0; Y < I - g; ++Y)
|
|
15406
|
+
this[Y + g] = ot[Y % Ft];
|
|
15407
15407
|
}
|
|
15408
15408
|
return this;
|
|
15409
15409
|
};
|
|
@@ -15463,13 +15463,13 @@ function Xo() {
|
|
|
15463
15463
|
function d(m, p, g) {
|
|
15464
15464
|
U(p, "offset"), (m[p] === void 0 || m[p + g] === void 0) && J(p, m.length - (g + 1));
|
|
15465
15465
|
}
|
|
15466
|
-
function P(m, p, g, I, H,
|
|
15466
|
+
function P(m, p, g, I, H, Y) {
|
|
15467
15467
|
if (m > g || m < p) {
|
|
15468
15468
|
const ot = typeof p == "bigint" ? "n" : "";
|
|
15469
15469
|
let Ft;
|
|
15470
|
-
throw p === 0 || p === BigInt(0) ? Ft = `>= 0${ot} and < 2${ot} ** ${(
|
|
15470
|
+
throw p === 0 || p === BigInt(0) ? Ft = `>= 0${ot} and < 2${ot} ** ${(Y + 1) * 8}${ot}` : Ft = `>= -(2${ot} ** ${(Y + 1) * 8 - 1}${ot}) and < 2 ** ${(Y + 1) * 8 - 1}${ot}`, new Ne.ERR_OUT_OF_RANGE("value", Ft, m);
|
|
15471
15471
|
}
|
|
15472
|
-
d(I, H,
|
|
15472
|
+
d(I, H, Y);
|
|
15473
15473
|
}
|
|
15474
15474
|
function U(m, p) {
|
|
15475
15475
|
if (typeof m != "number")
|
|
@@ -15494,45 +15494,45 @@ function Xo() {
|
|
|
15494
15494
|
let g;
|
|
15495
15495
|
const I = m.length;
|
|
15496
15496
|
let H = null;
|
|
15497
|
-
const
|
|
15497
|
+
const Y = [];
|
|
15498
15498
|
for (let ot = 0; ot < I; ++ot) {
|
|
15499
15499
|
if (g = m.charCodeAt(ot), g > 55295 && g < 57344) {
|
|
15500
15500
|
if (!H) {
|
|
15501
15501
|
if (g > 56319) {
|
|
15502
|
-
(p -= 3) > -1 &&
|
|
15502
|
+
(p -= 3) > -1 && Y.push(239, 191, 189);
|
|
15503
15503
|
continue;
|
|
15504
15504
|
} else if (ot + 1 === I) {
|
|
15505
|
-
(p -= 3) > -1 &&
|
|
15505
|
+
(p -= 3) > -1 && Y.push(239, 191, 189);
|
|
15506
15506
|
continue;
|
|
15507
15507
|
}
|
|
15508
15508
|
H = g;
|
|
15509
15509
|
continue;
|
|
15510
15510
|
}
|
|
15511
15511
|
if (g < 56320) {
|
|
15512
|
-
(p -= 3) > -1 &&
|
|
15512
|
+
(p -= 3) > -1 && Y.push(239, 191, 189), H = g;
|
|
15513
15513
|
continue;
|
|
15514
15514
|
}
|
|
15515
15515
|
g = (H - 55296 << 10 | g - 56320) + 65536;
|
|
15516
|
-
} else H && (p -= 3) > -1 &&
|
|
15516
|
+
} else H && (p -= 3) > -1 && Y.push(239, 191, 189);
|
|
15517
15517
|
if (H = null, g < 128) {
|
|
15518
15518
|
if ((p -= 1) < 0) break;
|
|
15519
|
-
|
|
15519
|
+
Y.push(g);
|
|
15520
15520
|
} else if (g < 2048) {
|
|
15521
15521
|
if ((p -= 2) < 0) break;
|
|
15522
|
-
|
|
15522
|
+
Y.push(
|
|
15523
15523
|
g >> 6 | 192,
|
|
15524
15524
|
g & 63 | 128
|
|
15525
15525
|
);
|
|
15526
15526
|
} else if (g < 65536) {
|
|
15527
15527
|
if ((p -= 3) < 0) break;
|
|
15528
|
-
|
|
15528
|
+
Y.push(
|
|
15529
15529
|
g >> 12 | 224,
|
|
15530
15530
|
g >> 6 & 63 | 128,
|
|
15531
15531
|
g & 63 | 128
|
|
15532
15532
|
);
|
|
15533
15533
|
} else if (g < 1114112) {
|
|
15534
15534
|
if ((p -= 4) < 0) break;
|
|
15535
|
-
|
|
15535
|
+
Y.push(
|
|
15536
15536
|
g >> 18 | 240,
|
|
15537
15537
|
g >> 12 & 63 | 128,
|
|
15538
15538
|
g >> 6 & 63 | 128,
|
|
@@ -15541,7 +15541,7 @@ function Xo() {
|
|
|
15541
15541
|
} else
|
|
15542
15542
|
throw new Error("Invalid code point");
|
|
15543
15543
|
}
|
|
15544
|
-
return
|
|
15544
|
+
return Y;
|
|
15545
15545
|
}
|
|
15546
15546
|
function qt(m) {
|
|
15547
15547
|
const p = [];
|
|
@@ -15551,10 +15551,10 @@ function Xo() {
|
|
|
15551
15551
|
}
|
|
15552
15552
|
function Kt(m, p) {
|
|
15553
15553
|
let g, I, H;
|
|
15554
|
-
const
|
|
15554
|
+
const Y = [];
|
|
15555
15555
|
for (let ot = 0; ot < m.length && !((p -= 2) < 0); ++ot)
|
|
15556
|
-
g = m.charCodeAt(ot), I = g >> 8, H = g % 256,
|
|
15557
|
-
return
|
|
15556
|
+
g = m.charCodeAt(ot), I = g >> 8, H = g % 256, Y.push(H), Y.push(I);
|
|
15557
|
+
return Y;
|
|
15558
15558
|
}
|
|
15559
15559
|
function Ut(m) {
|
|
15560
15560
|
return S.toByteArray(kt(m));
|
|
@@ -15786,7 +15786,7 @@ function Qm() {
|
|
|
15786
15786
|
_,
|
|
15787
15787
|
i(f, arguments)
|
|
15788
15788
|
);
|
|
15789
|
-
},
|
|
15789
|
+
}, B = e(0, l.length - f.length), F = [], k = 0; k < B; k++)
|
|
15790
15790
|
F[k] = "$" + k;
|
|
15791
15791
|
if (w = Function("binder", "return function (" + a(F, ",") + "){ return binder.apply(this,arguments); }")(y), l.prototype) {
|
|
15792
15792
|
var T = function() {
|
|
@@ -15883,24 +15883,24 @@ var zc, hl;
|
|
|
15883
15883
|
function lg() {
|
|
15884
15884
|
if (hl) return zc;
|
|
15885
15885
|
hl = 1;
|
|
15886
|
-
var n, t = /* @__PURE__ */ og(), e = /* @__PURE__ */ Fm(), r = /* @__PURE__ */ Im(), i = /* @__PURE__ */ Om(), o = /* @__PURE__ */ Tm(), a = /* @__PURE__ */ ag(), u = /* @__PURE__ */ ta(), _ = /* @__PURE__ */ Cm(), l = /* @__PURE__ */ Nm(), f = /* @__PURE__ */ Lm(), w = /* @__PURE__ */ Dm(), y = /* @__PURE__ */ Um(),
|
|
15886
|
+
var n, t = /* @__PURE__ */ og(), e = /* @__PURE__ */ Fm(), r = /* @__PURE__ */ Im(), i = /* @__PURE__ */ Om(), o = /* @__PURE__ */ Tm(), a = /* @__PURE__ */ ag(), u = /* @__PURE__ */ ta(), _ = /* @__PURE__ */ Cm(), l = /* @__PURE__ */ Nm(), f = /* @__PURE__ */ Lm(), w = /* @__PURE__ */ Dm(), y = /* @__PURE__ */ Um(), B = /* @__PURE__ */ Mm(), F = /* @__PURE__ */ jm(), k = /* @__PURE__ */ Hm(), T = Function, A = function(ct) {
|
|
15887
15887
|
try {
|
|
15888
15888
|
return T('"use strict"; return (' + ct + ").constructor;")();
|
|
15889
15889
|
} catch {
|
|
15890
15890
|
}
|
|
15891
|
-
}, x = /* @__PURE__ */ Xs(), S = /* @__PURE__ */ ea(),
|
|
15891
|
+
}, x = /* @__PURE__ */ Xs(), S = /* @__PURE__ */ ea(), z = function() {
|
|
15892
15892
|
throw new u();
|
|
15893
15893
|
}, O = x ? function() {
|
|
15894
15894
|
try {
|
|
15895
|
-
return arguments.callee,
|
|
15895
|
+
return arguments.callee, z;
|
|
15896
15896
|
} catch {
|
|
15897
15897
|
try {
|
|
15898
15898
|
return x(arguments, "callee").get;
|
|
15899
15899
|
} catch {
|
|
15900
|
-
return
|
|
15900
|
+
return z;
|
|
15901
15901
|
}
|
|
15902
15902
|
}
|
|
15903
|
-
}() :
|
|
15903
|
+
}() : z, C = qm()(), N = fg(), L = ug(), $ = cg(), nt = o_(), ut = s_(), D = {}, dt = typeof Uint8Array > "u" || !N ? n : N(Uint8Array), xt = {
|
|
15904
15904
|
__proto__: null,
|
|
15905
15905
|
"%AggregateError%": typeof AggregateError > "u" ? n : AggregateError,
|
|
15906
15906
|
"%Array%": Array,
|
|
@@ -15979,10 +15979,10 @@ function lg() {
|
|
|
15979
15979
|
"%Math.floor%": f,
|
|
15980
15980
|
"%Math.max%": w,
|
|
15981
15981
|
"%Math.min%": y,
|
|
15982
|
-
"%Math.pow%":
|
|
15982
|
+
"%Math.pow%": B,
|
|
15983
15983
|
"%Math.round%": F,
|
|
15984
15984
|
"%Math.sign%": k,
|
|
15985
|
-
"%Reflect.getPrototypeOf%":
|
|
15985
|
+
"%Reflect.getPrototypeOf%": $
|
|
15986
15986
|
};
|
|
15987
15987
|
if (N)
|
|
15988
15988
|
try {
|
|
@@ -16003,8 +16003,8 @@ function lg() {
|
|
|
16003
16003
|
var R = ct("%AsyncGeneratorFunction%");
|
|
16004
16004
|
R && (v = R.prototype);
|
|
16005
16005
|
} else if (_t === "%AsyncIteratorPrototype%") {
|
|
16006
|
-
var
|
|
16007
|
-
|
|
16006
|
+
var et = ct("%AsyncGenerator%");
|
|
16007
|
+
et && N && (v = N(et.prototype));
|
|
16008
16008
|
}
|
|
16009
16009
|
return xt[_t] = v, v;
|
|
16010
16010
|
}, Et = {
|
|
@@ -16066,18 +16066,18 @@ function lg() {
|
|
|
16066
16066
|
throw new a("invalid intrinsic syntax, expected closing `%`");
|
|
16067
16067
|
if (R === "%" && v !== "%")
|
|
16068
16068
|
throw new a("invalid intrinsic syntax, expected opening `%`");
|
|
16069
|
-
var
|
|
16069
|
+
var et = [];
|
|
16070
16070
|
return W(_t, gt, function(lt, Bt, bt, St) {
|
|
16071
|
-
|
|
16072
|
-
}),
|
|
16071
|
+
et[et.length] = bt ? W(St, G, "$1") : Bt || lt;
|
|
16072
|
+
}), et;
|
|
16073
16073
|
}, X = function(_t, v) {
|
|
16074
|
-
var R = _t,
|
|
16075
|
-
if (vt(Et, R) && (
|
|
16074
|
+
var R = _t, et;
|
|
16075
|
+
if (vt(Et, R) && (et = Et[R], R = "%" + et[0] + "%"), vt(xt, R)) {
|
|
16076
16076
|
var lt = xt[R];
|
|
16077
16077
|
if (lt === D && (lt = ht(R)), typeof lt > "u" && !v)
|
|
16078
16078
|
throw new u("intrinsic " + _t + " exists, but is not available. Please file an issue!");
|
|
16079
16079
|
return {
|
|
16080
|
-
alias:
|
|
16080
|
+
alias: et,
|
|
16081
16081
|
name: R,
|
|
16082
16082
|
value: lt
|
|
16083
16083
|
};
|
|
@@ -16091,13 +16091,13 @@ function lg() {
|
|
|
16091
16091
|
throw new u('"allowMissing" argument must be a boolean');
|
|
16092
16092
|
if (rt(/^%?[^%]*%?$/, _t) === null)
|
|
16093
16093
|
throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
16094
|
-
var R = M(_t),
|
|
16095
|
-
he && (
|
|
16094
|
+
var R = M(_t), et = R.length > 0 ? R[0] : "", lt = X("%" + et + "%", v), Bt = lt.name, bt = lt.value, St = !1, he = lt.alias;
|
|
16095
|
+
he && (et = he[0], Ct(R, Pt([0, 1], he)));
|
|
16096
16096
|
for (var it = 1, pe = !0; it < R.length; it += 1) {
|
|
16097
16097
|
var we = R[it], Gt = Z(we, 0, 1), Qt = Z(we, -1);
|
|
16098
16098
|
if ((Gt === '"' || Gt === "'" || Gt === "`" || Qt === '"' || Qt === "'" || Qt === "`") && Gt !== Qt)
|
|
16099
16099
|
throw new a("property names with quotes must have matching quotes");
|
|
16100
|
-
if ((we === "constructor" || !pe) && (St = !0),
|
|
16100
|
+
if ((we === "constructor" || !pe) && (St = !0), et += "." + we, Bt = "%" + et + "%", vt(xt, Bt))
|
|
16101
16101
|
bt = xt[Bt];
|
|
16102
16102
|
else if (bt != null) {
|
|
16103
16103
|
if (!(we in bt)) {
|
|
@@ -16196,8 +16196,8 @@ function Zm() {
|
|
|
16196
16196
|
t = null;
|
|
16197
16197
|
var i = /^\s*class\b/, o = function(S) {
|
|
16198
16198
|
try {
|
|
16199
|
-
var
|
|
16200
|
-
return i.test(
|
|
16199
|
+
var z = n.call(S);
|
|
16200
|
+
return i.test(z);
|
|
16201
16201
|
} catch {
|
|
16202
16202
|
return !1;
|
|
16203
16203
|
}
|
|
@@ -16207,7 +16207,7 @@ function Zm() {
|
|
|
16207
16207
|
} catch {
|
|
16208
16208
|
return !1;
|
|
16209
16209
|
}
|
|
16210
|
-
}, u = Object.prototype.toString, _ = "[object Object]", l = "[object Function]", f = "[object GeneratorFunction]", w = "[object HTMLAllCollection]", y = "[object HTML document.all class]",
|
|
16210
|
+
}, u = Object.prototype.toString, _ = "[object Object]", l = "[object Function]", f = "[object GeneratorFunction]", w = "[object HTMLAllCollection]", y = "[object HTML document.all class]", B = "[object HTMLCollection]", F = typeof Symbol == "function" && !!Symbol.toStringTag, k = !(0 in [,]), T = function() {
|
|
16211
16211
|
return !1;
|
|
16212
16212
|
};
|
|
16213
16213
|
if (typeof document == "object") {
|
|
@@ -16215,8 +16215,8 @@ function Zm() {
|
|
|
16215
16215
|
u.call(A) === u.call(document.all) && (T = function(S) {
|
|
16216
16216
|
if ((k || !S) && (typeof S > "u" || typeof S == "object"))
|
|
16217
16217
|
try {
|
|
16218
|
-
var
|
|
16219
|
-
return (
|
|
16218
|
+
var z = u.call(S);
|
|
16219
|
+
return (z === w || z === y || z === B || z === _) && S("") == null;
|
|
16220
16220
|
} catch {
|
|
16221
16221
|
}
|
|
16222
16222
|
return !1;
|
|
@@ -16229,8 +16229,8 @@ function Zm() {
|
|
|
16229
16229
|
return !1;
|
|
16230
16230
|
try {
|
|
16231
16231
|
t(S, null, e);
|
|
16232
|
-
} catch (
|
|
16233
|
-
if (
|
|
16232
|
+
} catch (z) {
|
|
16233
|
+
if (z !== r)
|
|
16234
16234
|
return !1;
|
|
16235
16235
|
}
|
|
16236
16236
|
return !o(S) && a(S);
|
|
@@ -16243,8 +16243,8 @@ function Zm() {
|
|
|
16243
16243
|
return a(S);
|
|
16244
16244
|
if (o(S))
|
|
16245
16245
|
return !1;
|
|
16246
|
-
var
|
|
16247
|
-
return
|
|
16246
|
+
var z = u.call(S);
|
|
16247
|
+
return z !== l && z !== f && !/^\[object HTML/.test(z) ? !1 : a(S);
|
|
16248
16248
|
}, Pc;
|
|
16249
16249
|
}
|
|
16250
16250
|
var Fc, yl;
|
|
@@ -16429,7 +16429,7 @@ function pg() {
|
|
|
16429
16429
|
// @ts-expect-error TODO FIXME
|
|
16430
16430
|
e(A));
|
|
16431
16431
|
});
|
|
16432
|
-
var
|
|
16432
|
+
var B = function(T) {
|
|
16433
16433
|
var A = !1;
|
|
16434
16434
|
return n(
|
|
16435
16435
|
/** @type {Record<`\$${import('.').TypedArrayName}`, Getter>} */
|
|
@@ -16467,7 +16467,7 @@ function pg() {
|
|
|
16467
16467
|
var A = f(a(T), 8, -1);
|
|
16468
16468
|
return w(l, A) > -1 ? A : A !== "Object" ? !1 : F(T);
|
|
16469
16469
|
}
|
|
16470
|
-
return i ?
|
|
16470
|
+
return i ? B(T) : null;
|
|
16471
16471
|
}, Uc;
|
|
16472
16472
|
}
|
|
16473
16473
|
var Mc, Bl;
|
|
@@ -16490,7 +16490,7 @@ function c2() {
|
|
|
16490
16490
|
if (a)
|
|
16491
16491
|
var y = o(BigInt.prototype.valueOf);
|
|
16492
16492
|
if (u)
|
|
16493
|
-
var
|
|
16493
|
+
var B = o(Symbol.prototype.valueOf);
|
|
16494
16494
|
function F(it, pe) {
|
|
16495
16495
|
if (typeof it != "object")
|
|
16496
16496
|
return !1;
|
|
@@ -16521,10 +16521,10 @@ function c2() {
|
|
|
16521
16521
|
return r(it) === "Uint16Array";
|
|
16522
16522
|
}
|
|
16523
16523
|
n.isUint16Array = S;
|
|
16524
|
-
function
|
|
16524
|
+
function z(it) {
|
|
16525
16525
|
return r(it) === "Uint32Array";
|
|
16526
16526
|
}
|
|
16527
|
-
n.isUint32Array =
|
|
16527
|
+
n.isUint32Array = z;
|
|
16528
16528
|
function O(it) {
|
|
16529
16529
|
return r(it) === "Int8Array";
|
|
16530
16530
|
}
|
|
@@ -16541,10 +16541,10 @@ function c2() {
|
|
|
16541
16541
|
return r(it) === "Float32Array";
|
|
16542
16542
|
}
|
|
16543
16543
|
n.isFloat32Array = L;
|
|
16544
|
-
function
|
|
16544
|
+
function $(it) {
|
|
16545
16545
|
return r(it) === "Float64Array";
|
|
16546
16546
|
}
|
|
16547
|
-
n.isFloat64Array =
|
|
16547
|
+
n.isFloat64Array = $;
|
|
16548
16548
|
function nt(it) {
|
|
16549
16549
|
return r(it) === "BigInt64Array";
|
|
16550
16550
|
}
|
|
@@ -16633,10 +16633,10 @@ function c2() {
|
|
|
16633
16633
|
return F(it, l);
|
|
16634
16634
|
}
|
|
16635
16635
|
n.isNumberObject = R;
|
|
16636
|
-
function
|
|
16636
|
+
function et(it) {
|
|
16637
16637
|
return F(it, f);
|
|
16638
16638
|
}
|
|
16639
|
-
n.isStringObject =
|
|
16639
|
+
n.isStringObject = et;
|
|
16640
16640
|
function lt(it) {
|
|
16641
16641
|
return F(it, w);
|
|
16642
16642
|
}
|
|
@@ -16646,11 +16646,11 @@ function c2() {
|
|
|
16646
16646
|
}
|
|
16647
16647
|
n.isBigIntObject = Bt;
|
|
16648
16648
|
function bt(it) {
|
|
16649
|
-
return u && F(it,
|
|
16649
|
+
return u && F(it, B);
|
|
16650
16650
|
}
|
|
16651
16651
|
n.isSymbolObject = bt;
|
|
16652
16652
|
function St(it) {
|
|
16653
|
-
return R(it) ||
|
|
16653
|
+
return R(it) || et(it) || lt(it) || Bt(it) || bt(it);
|
|
16654
16654
|
}
|
|
16655
16655
|
n.isBoxedPrimitive = St;
|
|
16656
16656
|
function he(it) {
|
|
@@ -16724,7 +16724,7 @@ function wg() {
|
|
|
16724
16724
|
return ct;
|
|
16725
16725
|
}
|
|
16726
16726
|
}), X = gt[rt]; rt < G; X = gt[++rt])
|
|
16727
|
-
x(X) ||
|
|
16727
|
+
x(X) || !$(X) ? M += " " + X : M += " " + a(X);
|
|
16728
16728
|
return M;
|
|
16729
16729
|
}, n.deprecate = function(W, Z) {
|
|
16730
16730
|
if (typeof Nt < "u" && Nt.noDeprecation === !0)
|
|
@@ -16834,8 +16834,8 @@ function wg() {
|
|
|
16834
16834
|
}
|
|
16835
16835
|
var _t = "", v = !1, R = ["{", "}"];
|
|
16836
16836
|
if (T(Z) && (v = !0, R = ["[", "]"]), D(Z)) {
|
|
16837
|
-
var
|
|
16838
|
-
_t = " [Function" +
|
|
16837
|
+
var et = Z.name ? ": " + Z.name : "";
|
|
16838
|
+
_t = " [Function" + et + "]";
|
|
16839
16839
|
}
|
|
16840
16840
|
if (L(Z) && (_t = " " + RegExp.prototype.toString.call(Z)), nt(Z) && (_t = " " + Date.prototype.toUTCString.call(Z)), ut(Z) && (_t = " " + y(Z)), M.length === 0 && (!v || Z.length == 0))
|
|
16841
16841
|
return R[0] + _t + R[1];
|
|
@@ -16843,7 +16843,7 @@ function wg() {
|
|
|
16843
16843
|
return L(Z) ? W.stylize(RegExp.prototype.toString.call(Z), "regexp") : W.stylize("[Object]", "special");
|
|
16844
16844
|
W.seen.push(Z);
|
|
16845
16845
|
var lt;
|
|
16846
|
-
return v ? lt =
|
|
16846
|
+
return v ? lt = B(W, Z, rt, X, M) : lt = M.map(function(Bt) {
|
|
16847
16847
|
return F(W, Z, rt, X, Bt, v);
|
|
16848
16848
|
}), W.seen.pop(), k(lt, _t, R);
|
|
16849
16849
|
}
|
|
@@ -16854,7 +16854,7 @@ function wg() {
|
|
|
16854
16854
|
var rt = "'" + JSON.stringify(Z).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
16855
16855
|
return W.stylize(rt, "string");
|
|
16856
16856
|
}
|
|
16857
|
-
if (
|
|
16857
|
+
if (z(Z))
|
|
16858
16858
|
return W.stylize("" + Z, "number");
|
|
16859
16859
|
if (A(Z))
|
|
16860
16860
|
return W.stylize("" + Z, "boolean");
|
|
@@ -16864,7 +16864,7 @@ function wg() {
|
|
|
16864
16864
|
function y(W) {
|
|
16865
16865
|
return "[" + Error.prototype.toString.call(W) + "]";
|
|
16866
16866
|
}
|
|
16867
|
-
function
|
|
16867
|
+
function B(W, Z, rt, gt, G) {
|
|
16868
16868
|
for (var M = [], X = 0, ct = Z.length; X < ct; ++X)
|
|
16869
16869
|
Rt(Z, String(X)) ? M.push(F(
|
|
16870
16870
|
W,
|
|
@@ -16930,10 +16930,10 @@ function wg() {
|
|
|
16930
16930
|
return W == null;
|
|
16931
16931
|
}
|
|
16932
16932
|
n.isNullOrUndefined = S;
|
|
16933
|
-
function
|
|
16933
|
+
function z(W) {
|
|
16934
16934
|
return typeof W == "number";
|
|
16935
16935
|
}
|
|
16936
|
-
n.isNumber =
|
|
16936
|
+
n.isNumber = z;
|
|
16937
16937
|
function O(W) {
|
|
16938
16938
|
return typeof W == "string";
|
|
16939
16939
|
}
|
|
@@ -16947,19 +16947,19 @@ function wg() {
|
|
|
16947
16947
|
}
|
|
16948
16948
|
n.isUndefined = N;
|
|
16949
16949
|
function L(W) {
|
|
16950
|
-
return
|
|
16950
|
+
return $(W) && xt(W) === "[object RegExp]";
|
|
16951
16951
|
}
|
|
16952
16952
|
n.isRegExp = L, n.types.isRegExp = L;
|
|
16953
|
-
function
|
|
16953
|
+
function $(W) {
|
|
16954
16954
|
return typeof W == "object" && W !== null;
|
|
16955
16955
|
}
|
|
16956
|
-
n.isObject =
|
|
16956
|
+
n.isObject = $;
|
|
16957
16957
|
function nt(W) {
|
|
16958
|
-
return
|
|
16958
|
+
return $(W) && xt(W) === "[object Date]";
|
|
16959
16959
|
}
|
|
16960
16960
|
n.isDate = nt, n.types.isDate = nt;
|
|
16961
16961
|
function ut(W) {
|
|
16962
|
-
return
|
|
16962
|
+
return $(W) && (xt(W) === "[object Error]" || W instanceof Error);
|
|
16963
16963
|
}
|
|
16964
16964
|
n.isError = ut, n.types.isNativeError = ut;
|
|
16965
16965
|
function D(W) {
|
|
@@ -17002,7 +17002,7 @@ function wg() {
|
|
|
17002
17002
|
n.log = function() {
|
|
17003
17003
|
console.log("%s - %s", Et(), n.format.apply(n, arguments));
|
|
17004
17004
|
}, n.inherits = gs(), n._extend = function(W, Z) {
|
|
17005
|
-
if (!Z ||
|
|
17005
|
+
if (!Z || !$(Z)) return W;
|
|
17006
17006
|
for (var rt = Object.keys(Z), gt = rt.length; gt--; )
|
|
17007
17007
|
W[rt[gt]] = Z[rt[gt]];
|
|
17008
17008
|
return W;
|
|
@@ -17142,7 +17142,7 @@ function _2() {
|
|
|
17142
17142
|
return String(F);
|
|
17143
17143
|
}
|
|
17144
17144
|
var _ = Xo(), l = _.Buffer, f = wg(), w = f.inspect, y = w && w.custom || "inspect";
|
|
17145
|
-
function
|
|
17145
|
+
function B(F, k, T) {
|
|
17146
17146
|
l.prototype.copy.call(F, k, T);
|
|
17147
17147
|
}
|
|
17148
17148
|
return Gc = /* @__PURE__ */ function() {
|
|
@@ -17192,7 +17192,7 @@ function _2() {
|
|
|
17192
17192
|
value: function(T) {
|
|
17193
17193
|
if (this.length === 0) return l.alloc(0);
|
|
17194
17194
|
for (var A = l.allocUnsafe(T >>> 0), x = this.head, S = 0; x; )
|
|
17195
|
-
|
|
17195
|
+
B(x.data, A, S), S += x.data.length, x = x.next;
|
|
17196
17196
|
return A;
|
|
17197
17197
|
}
|
|
17198
17198
|
// Consumes a specified amount of bytes or characters from the buffered data.
|
|
@@ -17213,9 +17213,9 @@ function _2() {
|
|
|
17213
17213
|
value: function(T) {
|
|
17214
17214
|
var A = this.head, x = 1, S = A.data;
|
|
17215
17215
|
for (T -= S.length; A = A.next; ) {
|
|
17216
|
-
var
|
|
17217
|
-
if (O ===
|
|
17218
|
-
O ===
|
|
17216
|
+
var z = A.data, O = T > z.length ? z.length : T;
|
|
17217
|
+
if (O === z.length ? S += z : S += z.slice(0, T), T -= O, T === 0) {
|
|
17218
|
+
O === z.length ? (++x, A.next ? this.head = A.next : this.head = this.tail = null) : (this.head = A, A.data = z.slice(O));
|
|
17219
17219
|
break;
|
|
17220
17220
|
}
|
|
17221
17221
|
++x;
|
|
@@ -17228,9 +17228,9 @@ function _2() {
|
|
|
17228
17228
|
value: function(T) {
|
|
17229
17229
|
var A = l.allocUnsafe(T), x = this.head, S = 1;
|
|
17230
17230
|
for (x.data.copy(A), T -= x.data.length; x = x.next; ) {
|
|
17231
|
-
var
|
|
17232
|
-
if (
|
|
17233
|
-
O ===
|
|
17231
|
+
var z = x.data, O = T > z.length ? z.length : T;
|
|
17232
|
+
if (z.copy(A, A.length - T, 0, O), T -= O, T === 0) {
|
|
17233
|
+
O === z.length ? (++S, x.next ? this.head = x.next : this.head = this.tail = null) : (this.head = x, x.data = z.slice(O));
|
|
17234
17234
|
break;
|
|
17235
17235
|
}
|
|
17236
17236
|
++S;
|
|
@@ -17293,15 +17293,15 @@ function ys() {
|
|
|
17293
17293
|
var t = {};
|
|
17294
17294
|
function e(u, _, l) {
|
|
17295
17295
|
l || (l = Error);
|
|
17296
|
-
function f(y,
|
|
17297
|
-
return typeof _ == "string" ? _ : _(y,
|
|
17296
|
+
function f(y, B, F) {
|
|
17297
|
+
return typeof _ == "string" ? _ : _(y, B, F);
|
|
17298
17298
|
}
|
|
17299
17299
|
var w = /* @__PURE__ */ function(y) {
|
|
17300
|
-
n(
|
|
17301
|
-
function
|
|
17300
|
+
n(B, y);
|
|
17301
|
+
function B(F, k, T) {
|
|
17302
17302
|
return y.call(this, f(F, k, T)) || this;
|
|
17303
17303
|
}
|
|
17304
|
-
return
|
|
17304
|
+
return B;
|
|
17305
17305
|
}(l);
|
|
17306
17306
|
w.prototype.name = l.name, w.prototype.code = u, t[u] = w;
|
|
17307
17307
|
}
|
|
@@ -17418,7 +17418,7 @@ function yg() {
|
|
|
17418
17418
|
function u(G) {
|
|
17419
17419
|
return i.isBuffer(G) || G instanceof o;
|
|
17420
17420
|
}
|
|
17421
|
-
var _ = dg(), l = gg(), f = l.getHighWaterMark, w = ys().codes, y = w.ERR_INVALID_ARG_TYPE,
|
|
17421
|
+
var _ = dg(), l = gg(), f = l.getHighWaterMark, w = ys().codes, y = w.ERR_INVALID_ARG_TYPE, B = w.ERR_METHOD_NOT_IMPLEMENTED, F = w.ERR_MULTIPLE_CALLBACK, k = w.ERR_STREAM_CANNOT_PIPE, T = w.ERR_STREAM_DESTROYED, A = w.ERR_STREAM_NULL_VALUES, x = w.ERR_STREAM_WRITE_AFTER_END, S = w.ERR_UNKNOWN_ENCODING, z = _.errorOrDestroy;
|
|
17422
17422
|
gs()(L, r);
|
|
17423
17423
|
function O() {
|
|
17424
17424
|
}
|
|
@@ -17458,19 +17458,19 @@ function yg() {
|
|
|
17458
17458
|
this._writableState = new C(G, this, M), this.writable = !0, G && (typeof G.write == "function" && (this._write = G.write), typeof G.writev == "function" && (this._writev = G.writev), typeof G.destroy == "function" && (this._destroy = G.destroy), typeof G.final == "function" && (this._final = G.final)), r.call(this);
|
|
17459
17459
|
}
|
|
17460
17460
|
L.prototype.pipe = function() {
|
|
17461
|
-
|
|
17461
|
+
z(this, new k());
|
|
17462
17462
|
};
|
|
17463
|
-
function
|
|
17463
|
+
function $(G, M) {
|
|
17464
17464
|
var X = new x();
|
|
17465
|
-
|
|
17465
|
+
z(G, X), Nt.nextTick(M, X);
|
|
17466
17466
|
}
|
|
17467
17467
|
function nt(G, M, X, ct) {
|
|
17468
17468
|
var _t;
|
|
17469
|
-
return X === null ? _t = new A() : typeof X != "string" && !M.objectMode && (_t = new y("chunk", ["string", "Buffer"], X)), _t ? (
|
|
17469
|
+
return X === null ? _t = new A() : typeof X != "string" && !M.objectMode && (_t = new y("chunk", ["string", "Buffer"], X)), _t ? (z(G, _t), Nt.nextTick(ct, _t), !1) : !0;
|
|
17470
17470
|
}
|
|
17471
17471
|
L.prototype.write = function(G, M, X) {
|
|
17472
17472
|
var ct = this._writableState, _t = !1, v = !ct.objectMode && u(G);
|
|
17473
|
-
return v && !i.isBuffer(G) && (G = a(G)), typeof M == "function" && (X = M, M = null), v ? M = "buffer" : M || (M = ct.defaultEncoding), typeof X != "function" && (X = O), ct.ending ?
|
|
17473
|
+
return v && !i.isBuffer(G) && (G = a(G)), typeof M == "function" && (X = M, M = null), v ? M = "buffer" : M || (M = ct.defaultEncoding), typeof X != "function" && (X = O), ct.ending ? $(this, X) : (v || nt(this, ct, G, X)) && (ct.pendingcb++, _t = D(this, ct, v, G, M, X)), _t;
|
|
17474
17474
|
}, L.prototype.cork = function() {
|
|
17475
17475
|
this._writableState.corked++;
|
|
17476
17476
|
}, L.prototype.uncork = function() {
|
|
@@ -17505,8 +17505,8 @@ function yg() {
|
|
|
17505
17505
|
var R = ut(M, ct, _t);
|
|
17506
17506
|
ct !== R && (X = !0, _t = "buffer", ct = R);
|
|
17507
17507
|
}
|
|
17508
|
-
var
|
|
17509
|
-
M.length +=
|
|
17508
|
+
var et = M.objectMode ? 1 : ct.length;
|
|
17509
|
+
M.length += et;
|
|
17510
17510
|
var lt = M.length < M.highWaterMark;
|
|
17511
17511
|
if (lt || (M.needDrain = !0), M.writing || M.corked) {
|
|
17512
17512
|
var Bt = M.lastBufferedRequest;
|
|
@@ -17518,14 +17518,14 @@ function yg() {
|
|
|
17518
17518
|
next: null
|
|
17519
17519
|
}, Bt ? Bt.next = M.lastBufferedRequest : M.bufferedRequest = M.lastBufferedRequest, M.bufferedRequestCount += 1;
|
|
17520
17520
|
} else
|
|
17521
|
-
dt(G, M, !1,
|
|
17521
|
+
dt(G, M, !1, et, ct, _t, v);
|
|
17522
17522
|
return lt;
|
|
17523
17523
|
}
|
|
17524
17524
|
function dt(G, M, X, ct, _t, v, R) {
|
|
17525
17525
|
M.writelen = ct, M.writecb = R, M.writing = !0, M.sync = !0, M.destroyed ? M.onwrite(new T("write")) : X ? G._writev(_t, M.onwrite) : G._write(_t, v, M.onwrite), M.sync = !1;
|
|
17526
17526
|
}
|
|
17527
17527
|
function xt(G, M, X, ct, _t) {
|
|
17528
|
-
--M.pendingcb, X ? (Nt.nextTick(_t, ct), Nt.nextTick(Z, G, M), G._writableState.errorEmitted = !0,
|
|
17528
|
+
--M.pendingcb, X ? (Nt.nextTick(_t, ct), Nt.nextTick(Z, G, M), G._writableState.errorEmitted = !0, z(G, ct)) : (_t(ct), G._writableState.errorEmitted = !0, z(G, ct), Z(G, M));
|
|
17529
17529
|
}
|
|
17530
17530
|
function at(G) {
|
|
17531
17531
|
G.writing = !1, G.writecb = null, G.length -= G.writelen, G.writelen = 0;
|
|
@@ -17551,9 +17551,9 @@ function yg() {
|
|
|
17551
17551
|
if (G._writev && X && X.next) {
|
|
17552
17552
|
var ct = M.bufferedRequestCount, _t = new Array(ct), v = M.corkedRequestsFree;
|
|
17553
17553
|
v.entry = X;
|
|
17554
|
-
for (var R = 0,
|
|
17555
|
-
_t[R] = X, X.isBuf || (
|
|
17556
|
-
_t.allBuffers =
|
|
17554
|
+
for (var R = 0, et = !0; X; )
|
|
17555
|
+
_t[R] = X, X.isBuf || (et = !1), X = X.next, R += 1;
|
|
17556
|
+
_t.allBuffers = et, dt(G, M, !0, M.length, _t, "", v.finish), M.pendingcb++, M.lastBufferedRequest = null, v.next ? (M.corkedRequestsFree = v.next, v.next = null) : M.corkedRequestsFree = new n(M), M.bufferedRequestCount = 0;
|
|
17557
17557
|
} else {
|
|
17558
17558
|
for (; X; ) {
|
|
17559
17559
|
var lt = X.chunk, Bt = X.encoding, bt = X.callback, St = M.objectMode ? 1 : lt.length;
|
|
@@ -17565,7 +17565,7 @@ function yg() {
|
|
|
17565
17565
|
M.bufferedRequest = X, M.bufferProcessing = !1;
|
|
17566
17566
|
}
|
|
17567
17567
|
L.prototype._write = function(G, M, X) {
|
|
17568
|
-
X(new
|
|
17568
|
+
X(new B("_write()"));
|
|
17569
17569
|
}, L.prototype._writev = null, L.prototype.end = function(G, M, X) {
|
|
17570
17570
|
var ct = this._writableState;
|
|
17571
17571
|
return typeof G == "function" ? (X = G, G = null, M = null) : typeof M == "function" && (X = M, M = null), G != null && this.write(G, M), ct.corked && (ct.corked = 1, this.uncork()), ct.ending || rt(this, ct, X), this;
|
|
@@ -17583,7 +17583,7 @@ function yg() {
|
|
|
17583
17583
|
}
|
|
17584
17584
|
function Ct(G, M) {
|
|
17585
17585
|
G._final(function(X) {
|
|
17586
|
-
M.pendingcb--, X &&
|
|
17586
|
+
M.pendingcb--, X && z(G, X), M.prefinished = !0, G.emit("prefinish"), Z(G, M);
|
|
17587
17587
|
});
|
|
17588
17588
|
}
|
|
17589
17589
|
function W(G, M) {
|
|
@@ -17784,7 +17784,7 @@ function jl() {
|
|
|
17784
17784
|
this.fillLast = _, x = 4;
|
|
17785
17785
|
break;
|
|
17786
17786
|
case "base64":
|
|
17787
|
-
this.text =
|
|
17787
|
+
this.text = B, this.end = F, x = 3;
|
|
17788
17788
|
break;
|
|
17789
17789
|
default:
|
|
17790
17790
|
this.write = k, this.end = T;
|
|
@@ -17810,10 +17810,10 @@ function jl() {
|
|
|
17810
17810
|
return A <= 127 ? 0 : A >> 5 === 6 ? 2 : A >> 4 === 14 ? 3 : A >> 3 === 30 ? 4 : A >> 6 === 2 ? -1 : -2;
|
|
17811
17811
|
}
|
|
17812
17812
|
function a(A, x, S) {
|
|
17813
|
-
var
|
|
17814
|
-
if (
|
|
17815
|
-
var O = o(x[
|
|
17816
|
-
return O >= 0 ? (O > 0 && (A.lastNeed = O - 1), O) : --
|
|
17813
|
+
var z = x.length - 1;
|
|
17814
|
+
if (z < S) return 0;
|
|
17815
|
+
var O = o(x[z]);
|
|
17816
|
+
return O >= 0 ? (O > 0 && (A.lastNeed = O - 1), O) : --z < S || O === -2 ? 0 : (O = o(x[z]), O >= 0 ? (O > 0 && (A.lastNeed = O - 2), O) : --z < S || O === -2 ? 0 : (O = o(x[z]), O >= 0 ? (O > 0 && (O === 2 ? O = 0 : A.lastNeed = O - 3), O) : 0));
|
|
17817
17817
|
}
|
|
17818
17818
|
function u(A, x, S) {
|
|
17819
17819
|
if ((x[0] & 192) !== 128)
|
|
@@ -17836,8 +17836,8 @@ function jl() {
|
|
|
17836
17836
|
var S = a(this, A, x);
|
|
17837
17837
|
if (!this.lastNeed) return A.toString("utf8", x);
|
|
17838
17838
|
this.lastTotal = S;
|
|
17839
|
-
var
|
|
17840
|
-
return A.copy(this.lastChar, 0,
|
|
17839
|
+
var z = A.length - (S - this.lastNeed);
|
|
17840
|
+
return A.copy(this.lastChar, 0, z), A.toString("utf8", x, z);
|
|
17841
17841
|
}
|
|
17842
17842
|
function f(A) {
|
|
17843
17843
|
var x = A && A.length ? this.write(A) : "";
|
|
@@ -17847,8 +17847,8 @@ function jl() {
|
|
|
17847
17847
|
if ((A.length - x) % 2 === 0) {
|
|
17848
17848
|
var S = A.toString("utf16le", x);
|
|
17849
17849
|
if (S) {
|
|
17850
|
-
var
|
|
17851
|
-
if (
|
|
17850
|
+
var z = S.charCodeAt(S.length - 1);
|
|
17851
|
+
if (z >= 55296 && z <= 56319)
|
|
17852
17852
|
return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = A[A.length - 2], this.lastChar[1] = A[A.length - 1], S.slice(0, -1);
|
|
17853
17853
|
}
|
|
17854
17854
|
return S;
|
|
@@ -17863,7 +17863,7 @@ function jl() {
|
|
|
17863
17863
|
}
|
|
17864
17864
|
return x;
|
|
17865
17865
|
}
|
|
17866
|
-
function
|
|
17866
|
+
function B(A, x) {
|
|
17867
17867
|
var S = (A.length - x) % 3;
|
|
17868
17868
|
return S === 0 ? A.toString("base64", x) : (this.lastNeed = 3 - S, this.lastTotal = 3, S === 1 ? this.lastChar[0] = A[A.length - 1] : (this.lastChar[0] = A[A.length - 2], this.lastChar[1] = A[A.length - 1]), A.toString("base64", x, A.length - S));
|
|
17869
17869
|
}
|
|
@@ -17907,13 +17907,13 @@ function c_() {
|
|
|
17907
17907
|
o.writable || y();
|
|
17908
17908
|
}, w = o._writableState && o._writableState.finished, y = function() {
|
|
17909
17909
|
l = !1, w = !0, _ || u.call(o);
|
|
17910
|
-
},
|
|
17911
|
-
_ = !1,
|
|
17910
|
+
}, B = o._readableState && o._readableState.endEmitted, F = function() {
|
|
17911
|
+
_ = !1, B = !0, l || u.call(o);
|
|
17912
17912
|
}, k = function(S) {
|
|
17913
17913
|
u.call(o, S);
|
|
17914
17914
|
}, T = function() {
|
|
17915
17915
|
var S;
|
|
17916
|
-
if (_ && !
|
|
17916
|
+
if (_ && !B)
|
|
17917
17917
|
return (!o._readableState || !o._readableState.ended) && (S = new n()), u.call(o, S);
|
|
17918
17918
|
if (l && !w)
|
|
17919
17919
|
return (!o._writableState || !o._writableState.ended) && (S = new n()), u.call(o, S);
|
|
@@ -17931,48 +17931,48 @@ function h2() {
|
|
|
17931
17931
|
if (Hl) return Yc;
|
|
17932
17932
|
Hl = 1;
|
|
17933
17933
|
var n;
|
|
17934
|
-
function t(S,
|
|
17935
|
-
return
|
|
17934
|
+
function t(S, z, O) {
|
|
17935
|
+
return z = e(z), z in S ? Object.defineProperty(S, z, { value: O, enumerable: !0, configurable: !0, writable: !0 }) : S[z] = O, S;
|
|
17936
17936
|
}
|
|
17937
17937
|
function e(S) {
|
|
17938
|
-
var
|
|
17939
|
-
return typeof
|
|
17938
|
+
var z = r(S, "string");
|
|
17939
|
+
return typeof z == "symbol" ? z : String(z);
|
|
17940
17940
|
}
|
|
17941
|
-
function r(S,
|
|
17941
|
+
function r(S, z) {
|
|
17942
17942
|
if (typeof S != "object" || S === null) return S;
|
|
17943
17943
|
var O = S[Symbol.toPrimitive];
|
|
17944
17944
|
if (O !== void 0) {
|
|
17945
|
-
var C = O.call(S,
|
|
17945
|
+
var C = O.call(S, z);
|
|
17946
17946
|
if (typeof C != "object") return C;
|
|
17947
17947
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
17948
17948
|
}
|
|
17949
|
-
return (
|
|
17949
|
+
return (z === "string" ? String : Number)(S);
|
|
17950
17950
|
}
|
|
17951
17951
|
var i = c_(), o = Symbol("lastResolve"), a = Symbol("lastReject"), u = Symbol("error"), _ = Symbol("ended"), l = Symbol("lastPromise"), f = Symbol("handlePromise"), w = Symbol("stream");
|
|
17952
|
-
function y(S,
|
|
17952
|
+
function y(S, z) {
|
|
17953
17953
|
return {
|
|
17954
17954
|
value: S,
|
|
17955
|
-
done:
|
|
17955
|
+
done: z
|
|
17956
17956
|
};
|
|
17957
17957
|
}
|
|
17958
|
-
function
|
|
17959
|
-
var
|
|
17960
|
-
if (
|
|
17958
|
+
function B(S) {
|
|
17959
|
+
var z = S[o];
|
|
17960
|
+
if (z !== null) {
|
|
17961
17961
|
var O = S[w].read();
|
|
17962
|
-
O !== null && (S[l] = null, S[o] = null, S[a] = null,
|
|
17962
|
+
O !== null && (S[l] = null, S[o] = null, S[a] = null, z(y(O, !1)));
|
|
17963
17963
|
}
|
|
17964
17964
|
}
|
|
17965
17965
|
function F(S) {
|
|
17966
|
-
Nt.nextTick(
|
|
17966
|
+
Nt.nextTick(B, S);
|
|
17967
17967
|
}
|
|
17968
|
-
function k(S,
|
|
17968
|
+
function k(S, z) {
|
|
17969
17969
|
return function(O, C) {
|
|
17970
17970
|
S.then(function() {
|
|
17971
|
-
if (
|
|
17971
|
+
if (z[_]) {
|
|
17972
17972
|
O(y(void 0, !0));
|
|
17973
17973
|
return;
|
|
17974
17974
|
}
|
|
17975
|
-
|
|
17975
|
+
z[f](O, C);
|
|
17976
17976
|
}, C);
|
|
17977
17977
|
};
|
|
17978
17978
|
}
|
|
@@ -17982,15 +17982,15 @@ function h2() {
|
|
|
17982
17982
|
return this[w];
|
|
17983
17983
|
},
|
|
17984
17984
|
next: function() {
|
|
17985
|
-
var
|
|
17985
|
+
var z = this, O = this[u];
|
|
17986
17986
|
if (O !== null)
|
|
17987
17987
|
return Promise.reject(O);
|
|
17988
17988
|
if (this[_])
|
|
17989
17989
|
return Promise.resolve(y(void 0, !0));
|
|
17990
17990
|
if (this[w].destroyed)
|
|
17991
|
-
return new Promise(function(
|
|
17991
|
+
return new Promise(function($, nt) {
|
|
17992
17992
|
Nt.nextTick(function() {
|
|
17993
|
-
|
|
17993
|
+
z[u] ? nt(z[u]) : $(y(void 0, !0));
|
|
17994
17994
|
});
|
|
17995
17995
|
});
|
|
17996
17996
|
var C = this[l], N;
|
|
@@ -18007,9 +18007,9 @@ function h2() {
|
|
|
18007
18007
|
}, t(n, Symbol.asyncIterator, function() {
|
|
18008
18008
|
return this;
|
|
18009
18009
|
}), t(n, "return", function() {
|
|
18010
|
-
var
|
|
18010
|
+
var z = this;
|
|
18011
18011
|
return new Promise(function(O, C) {
|
|
18012
|
-
|
|
18012
|
+
z[w].destroy(null, function(N) {
|
|
18013
18013
|
if (N) {
|
|
18014
18014
|
C(N);
|
|
18015
18015
|
return;
|
|
@@ -18017,9 +18017,9 @@ function h2() {
|
|
|
18017
18017
|
O(y(void 0, !0));
|
|
18018
18018
|
});
|
|
18019
18019
|
});
|
|
18020
|
-
}), n), T), x = function(
|
|
18020
|
+
}), n), T), x = function(z) {
|
|
18021
18021
|
var O, C = Object.create(A, (O = {}, t(O, w, {
|
|
18022
|
-
value:
|
|
18022
|
+
value: z,
|
|
18023
18023
|
writable: !0
|
|
18024
18024
|
}), t(O, o, {
|
|
18025
18025
|
value: null,
|
|
@@ -18031,24 +18031,24 @@ function h2() {
|
|
|
18031
18031
|
value: null,
|
|
18032
18032
|
writable: !0
|
|
18033
18033
|
}), t(O, _, {
|
|
18034
|
-
value:
|
|
18034
|
+
value: z._readableState.endEmitted,
|
|
18035
18035
|
writable: !0
|
|
18036
18036
|
}), t(O, f, {
|
|
18037
|
-
value: function(L,
|
|
18037
|
+
value: function(L, $) {
|
|
18038
18038
|
var nt = C[w].read();
|
|
18039
|
-
nt ? (C[l] = null, C[o] = null, C[a] = null, L(y(nt, !1))) : (C[o] = L, C[a] =
|
|
18039
|
+
nt ? (C[l] = null, C[o] = null, C[a] = null, L(y(nt, !1))) : (C[o] = L, C[a] = $);
|
|
18040
18040
|
},
|
|
18041
18041
|
writable: !0
|
|
18042
18042
|
}), O));
|
|
18043
|
-
return C[l] = null, i(
|
|
18043
|
+
return C[l] = null, i(z, function(N) {
|
|
18044
18044
|
if (N && N.code !== "ERR_STREAM_PREMATURE_CLOSE") {
|
|
18045
18045
|
var L = C[a];
|
|
18046
18046
|
L !== null && (C[l] = null, C[o] = null, C[a] = null, L(N)), C[u] = N;
|
|
18047
18047
|
return;
|
|
18048
18048
|
}
|
|
18049
|
-
var
|
|
18050
|
-
|
|
18051
|
-
}),
|
|
18049
|
+
var $ = C[o];
|
|
18050
|
+
$ !== null && (C[l] = null, C[o] = null, C[a] = null, $(y(void 0, !0))), C[_] = !0;
|
|
18051
|
+
}), z.on("readable", F.bind(null, C)), C;
|
|
18052
18052
|
};
|
|
18053
18053
|
return Yc = x, Yc;
|
|
18054
18054
|
}
|
|
@@ -18061,11 +18061,11 @@ function p2() {
|
|
|
18061
18061
|
var Xc, ql;
|
|
18062
18062
|
function bg() {
|
|
18063
18063
|
if (ql) return Xc;
|
|
18064
|
-
ql = 1, Xc =
|
|
18064
|
+
ql = 1, Xc = $;
|
|
18065
18065
|
var n;
|
|
18066
|
-
|
|
18067
|
-
var t = function(R,
|
|
18068
|
-
return R.listeners(
|
|
18066
|
+
$.ReadableState = L, ng().EventEmitter;
|
|
18067
|
+
var t = function(R, et) {
|
|
18068
|
+
return R.listeners(et).length;
|
|
18069
18069
|
}, e = ig(), r = Xo().Buffer, i = (typeof li < "u" ? li : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
|
|
18070
18070
|
};
|
|
18071
18071
|
function o(v) {
|
|
@@ -18077,22 +18077,22 @@ function bg() {
|
|
|
18077
18077
|
var u = wg(), _;
|
|
18078
18078
|
u && u.debuglog ? _ = u.debuglog("stream") : _ = function() {
|
|
18079
18079
|
};
|
|
18080
|
-
var l = _2(), f = dg(), w = gg(), y = w.getHighWaterMark,
|
|
18081
|
-
gs()(
|
|
18080
|
+
var l = _2(), f = dg(), w = gg(), y = w.getHighWaterMark, B = ys().codes, F = B.ERR_INVALID_ARG_TYPE, k = B.ERR_STREAM_PUSH_AFTER_EOF, T = B.ERR_METHOD_NOT_IMPLEMENTED, A = B.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, x, S, z;
|
|
18081
|
+
gs()($, e);
|
|
18082
18082
|
var O = f.errorOrDestroy, C = ["error", "close", "destroy", "pause", "resume"];
|
|
18083
|
-
function N(v, R,
|
|
18084
|
-
if (typeof v.prependListener == "function") return v.prependListener(R,
|
|
18085
|
-
!v._events || !v._events[R] ? v.on(R,
|
|
18083
|
+
function N(v, R, et) {
|
|
18084
|
+
if (typeof v.prependListener == "function") return v.prependListener(R, et);
|
|
18085
|
+
!v._events || !v._events[R] ? v.on(R, et) : Array.isArray(v._events[R]) ? v._events[R].unshift(et) : v._events[R] = [et, v._events[R]];
|
|
18086
18086
|
}
|
|
18087
|
-
function L(v, R,
|
|
18088
|
-
n = n || fs(), v = v || {}, typeof
|
|
18087
|
+
function L(v, R, et) {
|
|
18088
|
+
n = n || fs(), v = v || {}, typeof et != "boolean" && (et = R instanceof n), this.objectMode = !!v.objectMode, et && (this.objectMode = this.objectMode || !!v.readableObjectMode), this.highWaterMark = y(this, v, "readableHighWaterMark", et), this.buffer = new l(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = v.emitClose !== !1, this.autoDestroy = !!v.autoDestroy, this.destroyed = !1, this.defaultEncoding = v.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, v.encoding && (x || (x = jl().StringDecoder), this.decoder = new x(v.encoding), this.encoding = v.encoding);
|
|
18089
18089
|
}
|
|
18090
|
-
function
|
|
18091
|
-
if (n = n || fs(), !(this instanceof
|
|
18090
|
+
function $(v) {
|
|
18091
|
+
if (n = n || fs(), !(this instanceof $)) return new $(v);
|
|
18092
18092
|
var R = this instanceof n;
|
|
18093
18093
|
this._readableState = new L(v, this, R), this.readable = !0, v && (typeof v.read == "function" && (this._read = v.read), typeof v.destroy == "function" && (this._destroy = v.destroy)), e.call(this);
|
|
18094
18094
|
}
|
|
18095
|
-
Object.defineProperty(
|
|
18095
|
+
Object.defineProperty($.prototype, "destroyed", {
|
|
18096
18096
|
// making it explicit this property is not enumerable
|
|
18097
18097
|
// because otherwise some prototype manipulation in
|
|
18098
18098
|
// userland will fail
|
|
@@ -18103,15 +18103,15 @@ function bg() {
|
|
|
18103
18103
|
set: function(R) {
|
|
18104
18104
|
this._readableState && (this._readableState.destroyed = R);
|
|
18105
18105
|
}
|
|
18106
|
-
}),
|
|
18106
|
+
}), $.prototype.destroy = f.destroy, $.prototype._undestroy = f.undestroy, $.prototype._destroy = function(v, R) {
|
|
18107
18107
|
R(v);
|
|
18108
|
-
},
|
|
18109
|
-
var
|
|
18110
|
-
return
|
|
18111
|
-
},
|
|
18108
|
+
}, $.prototype.push = function(v, R) {
|
|
18109
|
+
var et = this._readableState, lt;
|
|
18110
|
+
return et.objectMode ? lt = !0 : typeof v == "string" && (R = R || et.defaultEncoding, R !== et.encoding && (v = r.from(v, R), R = ""), lt = !0), nt(this, v, R, !1, lt);
|
|
18111
|
+
}, $.prototype.unshift = function(v) {
|
|
18112
18112
|
return nt(this, v, null, !0, !1);
|
|
18113
18113
|
};
|
|
18114
|
-
function nt(v, R,
|
|
18114
|
+
function nt(v, R, et, lt, Bt) {
|
|
18115
18115
|
_("readableAddChunk", R);
|
|
18116
18116
|
var bt = v._readableState;
|
|
18117
18117
|
if (R === null)
|
|
@@ -18128,27 +18128,27 @@ function bg() {
|
|
|
18128
18128
|
else {
|
|
18129
18129
|
if (bt.destroyed)
|
|
18130
18130
|
return !1;
|
|
18131
|
-
bt.reading = !1, bt.decoder && !
|
|
18131
|
+
bt.reading = !1, bt.decoder && !et ? (R = bt.decoder.write(R), bt.objectMode || R.length !== 0 ? ut(v, bt, R, !1) : vt(v, bt)) : ut(v, bt, R, !1);
|
|
18132
18132
|
}
|
|
18133
18133
|
else lt || (bt.reading = !1, vt(v, bt));
|
|
18134
18134
|
}
|
|
18135
18135
|
return !bt.ended && (bt.length < bt.highWaterMark || bt.length === 0);
|
|
18136
18136
|
}
|
|
18137
|
-
function ut(v, R,
|
|
18138
|
-
R.flowing && R.length === 0 && !R.sync ? (R.awaitDrain = 0, v.emit("data",
|
|
18137
|
+
function ut(v, R, et, lt) {
|
|
18138
|
+
R.flowing && R.length === 0 && !R.sync ? (R.awaitDrain = 0, v.emit("data", et)) : (R.length += R.objectMode ? 1 : et.length, lt ? R.buffer.unshift(et) : R.buffer.push(et), R.needReadable && Et(v)), vt(v, R);
|
|
18139
18139
|
}
|
|
18140
18140
|
function D(v, R) {
|
|
18141
|
-
var
|
|
18142
|
-
return !a(R) && typeof R != "string" && R !== void 0 && !v.objectMode && (
|
|
18141
|
+
var et;
|
|
18142
|
+
return !a(R) && typeof R != "string" && R !== void 0 && !v.objectMode && (et = new F("chunk", ["string", "Buffer", "Uint8Array"], R)), et;
|
|
18143
18143
|
}
|
|
18144
|
-
|
|
18144
|
+
$.prototype.isPaused = function() {
|
|
18145
18145
|
return this._readableState.flowing === !1;
|
|
18146
|
-
},
|
|
18146
|
+
}, $.prototype.setEncoding = function(v) {
|
|
18147
18147
|
x || (x = jl().StringDecoder);
|
|
18148
18148
|
var R = new x(v);
|
|
18149
18149
|
this._readableState.decoder = R, this._readableState.encoding = this._readableState.decoder.encoding;
|
|
18150
|
-
for (var
|
|
18151
|
-
lt += R.write(
|
|
18150
|
+
for (var et = this._readableState.buffer.head, lt = ""; et !== null; )
|
|
18151
|
+
lt += R.write(et.data), et = et.next;
|
|
18152
18152
|
return this._readableState.buffer.clear(), lt !== "" && this._readableState.buffer.push(lt), this._readableState.length = lt.length, this;
|
|
18153
18153
|
};
|
|
18154
18154
|
var dt = 1073741824;
|
|
@@ -18158,23 +18158,23 @@ function bg() {
|
|
|
18158
18158
|
function at(v, R) {
|
|
18159
18159
|
return v <= 0 || R.length === 0 && R.ended ? 0 : R.objectMode ? 1 : v !== v ? R.flowing && R.length ? R.buffer.head.data.length : R.length : (v > R.highWaterMark && (R.highWaterMark = xt(v)), v <= R.length ? v : R.ended ? R.length : (R.needReadable = !0, 0));
|
|
18160
18160
|
}
|
|
18161
|
-
|
|
18161
|
+
$.prototype.read = function(v) {
|
|
18162
18162
|
_("read", v), v = parseInt(v, 10);
|
|
18163
|
-
var R = this._readableState,
|
|
18163
|
+
var R = this._readableState, et = v;
|
|
18164
18164
|
if (v !== 0 && (R.emittedReadable = !1), v === 0 && R.needReadable && ((R.highWaterMark !== 0 ? R.length >= R.highWaterMark : R.length > 0) || R.ended))
|
|
18165
18165
|
return _("read: emitReadable", R.length, R.ended), R.length === 0 && R.ended ? X(this) : Et(this), null;
|
|
18166
18166
|
if (v = at(v, R), v === 0 && R.ended)
|
|
18167
18167
|
return R.length === 0 && X(this), null;
|
|
18168
18168
|
var lt = R.needReadable;
|
|
18169
|
-
_("need readable", lt), (R.length === 0 || R.length - v < R.highWaterMark) && (lt = !0, _("length less than watermark", lt)), R.ended || R.reading ? (lt = !1, _("reading or ended", lt)) : lt && (_("do read"), R.reading = !0, R.sync = !0, R.length === 0 && (R.needReadable = !0), this._read(R.highWaterMark), R.sync = !1, R.reading || (v = at(
|
|
18169
|
+
_("need readable", lt), (R.length === 0 || R.length - v < R.highWaterMark) && (lt = !0, _("length less than watermark", lt)), R.ended || R.reading ? (lt = !1, _("reading or ended", lt)) : lt && (_("do read"), R.reading = !0, R.sync = !0, R.length === 0 && (R.needReadable = !0), this._read(R.highWaterMark), R.sync = !1, R.reading || (v = at(et, R)));
|
|
18170
18170
|
var Bt;
|
|
18171
|
-
return v > 0 ? Bt = M(v, R) : Bt = null, Bt === null ? (R.needReadable = R.length <= R.highWaterMark, v = 0) : (R.length -= v, R.awaitDrain = 0), R.length === 0 && (R.ended || (R.needReadable = !0),
|
|
18171
|
+
return v > 0 ? Bt = M(v, R) : Bt = null, Bt === null ? (R.needReadable = R.length <= R.highWaterMark, v = 0) : (R.length -= v, R.awaitDrain = 0), R.length === 0 && (R.ended || (R.needReadable = !0), et !== v && R.ended && X(this)), Bt !== null && this.emit("data", Bt), Bt;
|
|
18172
18172
|
};
|
|
18173
18173
|
function ht(v, R) {
|
|
18174
18174
|
if (_("onEofChunk"), !R.ended) {
|
|
18175
18175
|
if (R.decoder) {
|
|
18176
|
-
var
|
|
18177
|
-
|
|
18176
|
+
var et = R.decoder.end();
|
|
18177
|
+
et && et.length && (R.buffer.push(et), R.length += R.objectMode ? 1 : et.length);
|
|
18178
18178
|
}
|
|
18179
18179
|
R.ended = !0, R.sync ? Et(v) : (R.needReadable = !1, R.emittedReadable || (R.emittedReadable = !0, Rt(v)));
|
|
18180
18180
|
}
|
|
@@ -18192,16 +18192,16 @@ function bg() {
|
|
|
18192
18192
|
}
|
|
18193
18193
|
function Pt(v, R) {
|
|
18194
18194
|
for (; !R.reading && !R.ended && (R.length < R.highWaterMark || R.flowing && R.length === 0); ) {
|
|
18195
|
-
var
|
|
18196
|
-
if (_("maybeReadMore read 0"), v.read(0),
|
|
18195
|
+
var et = R.length;
|
|
18196
|
+
if (_("maybeReadMore read 0"), v.read(0), et === R.length)
|
|
18197
18197
|
break;
|
|
18198
18198
|
}
|
|
18199
18199
|
R.readingMore = !1;
|
|
18200
18200
|
}
|
|
18201
|
-
|
|
18201
|
+
$.prototype._read = function(v) {
|
|
18202
18202
|
O(this, new T("_read()"));
|
|
18203
|
-
},
|
|
18204
|
-
var
|
|
18203
|
+
}, $.prototype.pipe = function(v, R) {
|
|
18204
|
+
var et = this, lt = this._readableState;
|
|
18205
18205
|
switch (lt.pipesCount) {
|
|
18206
18206
|
case 0:
|
|
18207
18207
|
lt.pipes = v;
|
|
@@ -18215,24 +18215,24 @@ function bg() {
|
|
|
18215
18215
|
}
|
|
18216
18216
|
lt.pipesCount += 1, _("pipe count=%d opts=%j", lt.pipesCount, R);
|
|
18217
18217
|
var Bt = (!R || R.end !== !1) && v !== Nt.stdout && v !== Nt.stderr, bt = Bt ? he : Ee;
|
|
18218
|
-
lt.endEmitted ? Nt.nextTick(bt) :
|
|
18218
|
+
lt.endEmitted ? Nt.nextTick(bt) : et.once("end", bt), v.on("unpipe", St);
|
|
18219
18219
|
function St(Se, ae) {
|
|
18220
|
-
_("onunpipe"), Se ===
|
|
18220
|
+
_("onunpipe"), Se === et && ae && ae.hasUnpiped === !1 && (ae.hasUnpiped = !0, we());
|
|
18221
18221
|
}
|
|
18222
18222
|
function he() {
|
|
18223
18223
|
_("onend"), v.end();
|
|
18224
18224
|
}
|
|
18225
|
-
var it = Ct(
|
|
18225
|
+
var it = Ct(et);
|
|
18226
18226
|
v.on("drain", it);
|
|
18227
18227
|
var pe = !1;
|
|
18228
18228
|
function we() {
|
|
18229
|
-
_("cleanup"), v.removeListener("close", de), v.removeListener("finish", fe), v.removeListener("drain", it), v.removeListener("error", Qt), v.removeListener("unpipe", St),
|
|
18229
|
+
_("cleanup"), v.removeListener("close", de), v.removeListener("finish", fe), v.removeListener("drain", it), v.removeListener("error", Qt), v.removeListener("unpipe", St), et.removeListener("end", he), et.removeListener("end", Ee), et.removeListener("data", Gt), pe = !0, lt.awaitDrain && (!v._writableState || v._writableState.needDrain) && it();
|
|
18230
18230
|
}
|
|
18231
|
-
|
|
18231
|
+
et.on("data", Gt);
|
|
18232
18232
|
function Gt(Se) {
|
|
18233
18233
|
_("ondata");
|
|
18234
18234
|
var ae = v.write(Se);
|
|
18235
|
-
_("dest.write", ae), ae === !1 && ((lt.pipesCount === 1 && lt.pipes === v || lt.pipesCount > 1 && _t(lt.pipes, v) !== -1) && !pe && (_("false write response, pause", lt.awaitDrain), lt.awaitDrain++),
|
|
18235
|
+
_("dest.write", ae), ae === !1 && ((lt.pipesCount === 1 && lt.pipes === v || lt.pipesCount > 1 && _t(lt.pipes, v) !== -1) && !pe && (_("false write response, pause", lt.awaitDrain), lt.awaitDrain++), et.pause());
|
|
18236
18236
|
}
|
|
18237
18237
|
function Qt(Se) {
|
|
18238
18238
|
_("onerror", Se), Ee(), v.removeListener("error", Qt), t(v, "error") === 0 && O(v, Se);
|
|
@@ -18247,23 +18247,23 @@ function bg() {
|
|
|
18247
18247
|
}
|
|
18248
18248
|
v.once("finish", fe);
|
|
18249
18249
|
function Ee() {
|
|
18250
|
-
_("unpipe"),
|
|
18250
|
+
_("unpipe"), et.unpipe(v);
|
|
18251
18251
|
}
|
|
18252
|
-
return v.emit("pipe",
|
|
18252
|
+
return v.emit("pipe", et), lt.flowing || (_("pipe resume"), et.resume()), v;
|
|
18253
18253
|
};
|
|
18254
18254
|
function Ct(v) {
|
|
18255
18255
|
return function() {
|
|
18256
|
-
var
|
|
18257
|
-
_("pipeOnDrain",
|
|
18256
|
+
var et = v._readableState;
|
|
18257
|
+
_("pipeOnDrain", et.awaitDrain), et.awaitDrain && et.awaitDrain--, et.awaitDrain === 0 && t(v, "data") && (et.flowing = !0, G(v));
|
|
18258
18258
|
};
|
|
18259
18259
|
}
|
|
18260
|
-
|
|
18261
|
-
var R = this._readableState,
|
|
18260
|
+
$.prototype.unpipe = function(v) {
|
|
18261
|
+
var R = this._readableState, et = {
|
|
18262
18262
|
hasUnpiped: !1
|
|
18263
18263
|
};
|
|
18264
18264
|
if (R.pipesCount === 0) return this;
|
|
18265
18265
|
if (R.pipesCount === 1)
|
|
18266
|
-
return v && v !== R.pipes ? this : (v || (v = R.pipes), R.pipes = null, R.pipesCount = 0, R.flowing = !1, v && v.emit("unpipe", this,
|
|
18266
|
+
return v && v !== R.pipes ? this : (v || (v = R.pipes), R.pipes = null, R.pipesCount = 0, R.flowing = !1, v && v.emit("unpipe", this, et), this);
|
|
18267
18267
|
if (!v) {
|
|
18268
18268
|
var lt = R.pipes, Bt = R.pipesCount;
|
|
18269
18269
|
R.pipes = null, R.pipesCount = 0, R.flowing = !1;
|
|
@@ -18273,14 +18273,14 @@ function bg() {
|
|
|
18273
18273
|
return this;
|
|
18274
18274
|
}
|
|
18275
18275
|
var St = _t(R.pipes, v);
|
|
18276
|
-
return St === -1 ? this : (R.pipes.splice(St, 1), R.pipesCount -= 1, R.pipesCount === 1 && (R.pipes = R.pipes[0]), v.emit("unpipe", this,
|
|
18277
|
-
},
|
|
18278
|
-
var
|
|
18279
|
-
return v === "data" ? (lt.readableListening = this.listenerCount("readable") > 0, lt.flowing !== !1 && this.resume()) : v === "readable" && !lt.endEmitted && !lt.readableListening && (lt.readableListening = lt.needReadable = !0, lt.flowing = !1, lt.emittedReadable = !1, _("on readable", lt.length, lt.reading), lt.length ? Et(this) : lt.reading || Nt.nextTick(Z, this)),
|
|
18280
|
-
},
|
|
18281
|
-
var
|
|
18282
|
-
return v === "readable" && Nt.nextTick(W, this),
|
|
18283
|
-
},
|
|
18276
|
+
return St === -1 ? this : (R.pipes.splice(St, 1), R.pipesCount -= 1, R.pipesCount === 1 && (R.pipes = R.pipes[0]), v.emit("unpipe", this, et), this);
|
|
18277
|
+
}, $.prototype.on = function(v, R) {
|
|
18278
|
+
var et = e.prototype.on.call(this, v, R), lt = this._readableState;
|
|
18279
|
+
return v === "data" ? (lt.readableListening = this.listenerCount("readable") > 0, lt.flowing !== !1 && this.resume()) : v === "readable" && !lt.endEmitted && !lt.readableListening && (lt.readableListening = lt.needReadable = !0, lt.flowing = !1, lt.emittedReadable = !1, _("on readable", lt.length, lt.reading), lt.length ? Et(this) : lt.reading || Nt.nextTick(Z, this)), et;
|
|
18280
|
+
}, $.prototype.addListener = $.prototype.on, $.prototype.removeListener = function(v, R) {
|
|
18281
|
+
var et = e.prototype.removeListener.call(this, v, R);
|
|
18282
|
+
return v === "readable" && Nt.nextTick(W, this), et;
|
|
18283
|
+
}, $.prototype.removeAllListeners = function(v) {
|
|
18284
18284
|
var R = e.prototype.removeAllListeners.apply(this, arguments);
|
|
18285
18285
|
return (v === "readable" || v === void 0) && Nt.nextTick(W, this), R;
|
|
18286
18286
|
};
|
|
@@ -18291,7 +18291,7 @@ function bg() {
|
|
|
18291
18291
|
function Z(v) {
|
|
18292
18292
|
_("readable nexttick read 0"), v.read(0);
|
|
18293
18293
|
}
|
|
18294
|
-
|
|
18294
|
+
$.prototype.resume = function() {
|
|
18295
18295
|
var v = this._readableState;
|
|
18296
18296
|
return v.flowing || (_("resume"), v.flowing = !v.readableListening, rt(this, v)), v.paused = !1, this;
|
|
18297
18297
|
};
|
|
@@ -18301,23 +18301,23 @@ function bg() {
|
|
|
18301
18301
|
function gt(v, R) {
|
|
18302
18302
|
_("resume", R.reading), R.reading || v.read(0), R.resumeScheduled = !1, v.emit("resume"), G(v), R.flowing && !R.reading && v.read(0);
|
|
18303
18303
|
}
|
|
18304
|
-
|
|
18304
|
+
$.prototype.pause = function() {
|
|
18305
18305
|
return _("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (_("pause"), this._readableState.flowing = !1, this.emit("pause")), this._readableState.paused = !0, this;
|
|
18306
18306
|
};
|
|
18307
18307
|
function G(v) {
|
|
18308
18308
|
var R = v._readableState;
|
|
18309
18309
|
for (_("flow", R.flowing); R.flowing && v.read() !== null; ) ;
|
|
18310
18310
|
}
|
|
18311
|
-
|
|
18312
|
-
var R = this,
|
|
18311
|
+
$.prototype.wrap = function(v) {
|
|
18312
|
+
var R = this, et = this._readableState, lt = !1;
|
|
18313
18313
|
v.on("end", function() {
|
|
18314
|
-
if (_("wrapped end"),
|
|
18315
|
-
var St =
|
|
18314
|
+
if (_("wrapped end"), et.decoder && !et.ended) {
|
|
18315
|
+
var St = et.decoder.end();
|
|
18316
18316
|
St && St.length && R.push(St);
|
|
18317
18317
|
}
|
|
18318
18318
|
R.push(null);
|
|
18319
18319
|
}), v.on("data", function(St) {
|
|
18320
|
-
if (_("wrapped data"),
|
|
18320
|
+
if (_("wrapped data"), et.decoder && (St = et.decoder.write(St)), !(et.objectMode && St == null) && !(!et.objectMode && (!St || !St.length))) {
|
|
18321
18321
|
var he = R.push(St);
|
|
18322
18322
|
he || (lt = !0, v.pause());
|
|
18323
18323
|
}
|
|
@@ -18333,9 +18333,9 @@ function bg() {
|
|
|
18333
18333
|
return this._read = function(St) {
|
|
18334
18334
|
_("wrapped _read", St), lt && (lt = !1, v.resume());
|
|
18335
18335
|
}, this;
|
|
18336
|
-
}, typeof Symbol == "function" && (
|
|
18336
|
+
}, typeof Symbol == "function" && ($.prototype[Symbol.asyncIterator] = function() {
|
|
18337
18337
|
return S === void 0 && (S = h2()), S(this);
|
|
18338
|
-
}), Object.defineProperty(
|
|
18338
|
+
}), Object.defineProperty($.prototype, "readableHighWaterMark", {
|
|
18339
18339
|
// making it explicit this property is not enumerable
|
|
18340
18340
|
// because otherwise some prototype manipulation in
|
|
18341
18341
|
// userland will fail
|
|
@@ -18343,7 +18343,7 @@ function bg() {
|
|
|
18343
18343
|
get: function() {
|
|
18344
18344
|
return this._readableState.highWaterMark;
|
|
18345
18345
|
}
|
|
18346
|
-
}), Object.defineProperty(
|
|
18346
|
+
}), Object.defineProperty($.prototype, "readableBuffer", {
|
|
18347
18347
|
// making it explicit this property is not enumerable
|
|
18348
18348
|
// because otherwise some prototype manipulation in
|
|
18349
18349
|
// userland will fail
|
|
@@ -18351,7 +18351,7 @@ function bg() {
|
|
|
18351
18351
|
get: function() {
|
|
18352
18352
|
return this._readableState && this._readableState.buffer;
|
|
18353
18353
|
}
|
|
18354
|
-
}), Object.defineProperty(
|
|
18354
|
+
}), Object.defineProperty($.prototype, "readableFlowing", {
|
|
18355
18355
|
// making it explicit this property is not enumerable
|
|
18356
18356
|
// because otherwise some prototype manipulation in
|
|
18357
18357
|
// userland will fail
|
|
@@ -18362,7 +18362,7 @@ function bg() {
|
|
|
18362
18362
|
set: function(R) {
|
|
18363
18363
|
this._readableState && (this._readableState.flowing = R);
|
|
18364
18364
|
}
|
|
18365
|
-
}),
|
|
18365
|
+
}), $._fromList = M, Object.defineProperty($.prototype, "readableLength", {
|
|
18366
18366
|
// making it explicit this property is not enumerable
|
|
18367
18367
|
// because otherwise some prototype manipulation in
|
|
18368
18368
|
// userland will fail
|
|
@@ -18373,8 +18373,8 @@ function bg() {
|
|
|
18373
18373
|
});
|
|
18374
18374
|
function M(v, R) {
|
|
18375
18375
|
if (R.length === 0) return null;
|
|
18376
|
-
var
|
|
18377
|
-
return R.objectMode ?
|
|
18376
|
+
var et;
|
|
18377
|
+
return R.objectMode ? et = R.buffer.shift() : !v || v >= R.length ? (R.decoder ? et = R.buffer.join("") : R.buffer.length === 1 ? et = R.buffer.first() : et = R.buffer.concat(R.length), R.buffer.clear()) : et = R.buffer.consume(v, R.decoder), et;
|
|
18378
18378
|
}
|
|
18379
18379
|
function X(v) {
|
|
18380
18380
|
var R = v._readableState;
|
|
@@ -18382,16 +18382,16 @@ function bg() {
|
|
|
18382
18382
|
}
|
|
18383
18383
|
function ct(v, R) {
|
|
18384
18384
|
if (_("endReadableNT", v.endEmitted, v.length), !v.endEmitted && v.length === 0 && (v.endEmitted = !0, R.readable = !1, R.emit("end"), v.autoDestroy)) {
|
|
18385
|
-
var
|
|
18386
|
-
(!
|
|
18385
|
+
var et = R._writableState;
|
|
18386
|
+
(!et || et.autoDestroy && et.finished) && R.destroy();
|
|
18387
18387
|
}
|
|
18388
18388
|
}
|
|
18389
|
-
typeof Symbol == "function" && (
|
|
18390
|
-
return
|
|
18389
|
+
typeof Symbol == "function" && ($.from = function(v, R) {
|
|
18390
|
+
return z === void 0 && (z = p2()), z($, v, R);
|
|
18391
18391
|
});
|
|
18392
18392
|
function _t(v, R) {
|
|
18393
|
-
for (var
|
|
18394
|
-
if (v[
|
|
18393
|
+
for (var et = 0, lt = v.length; et < lt; et++)
|
|
18394
|
+
if (v[et] === R) return et;
|
|
18395
18395
|
return -1;
|
|
18396
18396
|
}
|
|
18397
18397
|
return Xc;
|
|
@@ -18405,10 +18405,10 @@ function mg() {
|
|
|
18405
18405
|
function a(f, w) {
|
|
18406
18406
|
var y = this._transformState;
|
|
18407
18407
|
y.transforming = !1;
|
|
18408
|
-
var
|
|
18409
|
-
if (
|
|
18408
|
+
var B = y.writecb;
|
|
18409
|
+
if (B === null)
|
|
18410
18410
|
return this.emit("error", new e());
|
|
18411
|
-
y.writechunk = null, y.writecb = null, w != null && this.push(w),
|
|
18411
|
+
y.writechunk = null, y.writecb = null, w != null && this.push(w), B(f);
|
|
18412
18412
|
var F = this._readableState;
|
|
18413
18413
|
F.reading = !1, (F.needReadable || F.length < F.highWaterMark) && this._read(F.highWaterMark);
|
|
18414
18414
|
}
|
|
@@ -18434,10 +18434,10 @@ function mg() {
|
|
|
18434
18434
|
}, u.prototype._transform = function(f, w, y) {
|
|
18435
18435
|
y(new t("_transform()"));
|
|
18436
18436
|
}, u.prototype._write = function(f, w, y) {
|
|
18437
|
-
var
|
|
18438
|
-
if (
|
|
18437
|
+
var B = this._transformState;
|
|
18438
|
+
if (B.writecb = y, B.writechunk = f, B.writeencoding = w, !B.transforming) {
|
|
18439
18439
|
var F = this._readableState;
|
|
18440
|
-
(
|
|
18440
|
+
(B.needTransform || F.needReadable || F.length < F.highWaterMark) && this._read(F.highWaterMark);
|
|
18441
18441
|
}
|
|
18442
18442
|
}, u.prototype._read = function(f) {
|
|
18443
18443
|
var w = this._transformState;
|
|
@@ -18475,9 +18475,9 @@ function d2() {
|
|
|
18475
18475
|
Wl = 1;
|
|
18476
18476
|
var n;
|
|
18477
18477
|
function t(y) {
|
|
18478
|
-
var
|
|
18478
|
+
var B = !1;
|
|
18479
18479
|
return function() {
|
|
18480
|
-
|
|
18480
|
+
B || (B = !0, y.apply(void 0, arguments));
|
|
18481
18481
|
};
|
|
18482
18482
|
}
|
|
18483
18483
|
var e = ys().codes, r = e.ERR_MISSING_ARGS, i = e.ERR_STREAM_DESTROYED;
|
|
@@ -18487,13 +18487,13 @@ function d2() {
|
|
|
18487
18487
|
function a(y) {
|
|
18488
18488
|
return y.setHeader && typeof y.abort == "function";
|
|
18489
18489
|
}
|
|
18490
|
-
function u(y,
|
|
18490
|
+
function u(y, B, F, k) {
|
|
18491
18491
|
k = t(k);
|
|
18492
18492
|
var T = !1;
|
|
18493
18493
|
y.on("close", function() {
|
|
18494
18494
|
T = !0;
|
|
18495
18495
|
}), n === void 0 && (n = c_()), n(y, {
|
|
18496
|
-
readable:
|
|
18496
|
+
readable: B,
|
|
18497
18497
|
writable: F
|
|
18498
18498
|
}, function(x) {
|
|
18499
18499
|
if (x) return k(x);
|
|
@@ -18511,25 +18511,25 @@ function d2() {
|
|
|
18511
18511
|
function _(y) {
|
|
18512
18512
|
y();
|
|
18513
18513
|
}
|
|
18514
|
-
function l(y,
|
|
18515
|
-
return y.pipe(
|
|
18514
|
+
function l(y, B) {
|
|
18515
|
+
return y.pipe(B);
|
|
18516
18516
|
}
|
|
18517
18517
|
function f(y) {
|
|
18518
18518
|
return !y.length || typeof y[y.length - 1] != "function" ? o : y.pop();
|
|
18519
18519
|
}
|
|
18520
18520
|
function w() {
|
|
18521
|
-
for (var y = arguments.length,
|
|
18522
|
-
|
|
18523
|
-
var k = f(
|
|
18524
|
-
if (Array.isArray(
|
|
18521
|
+
for (var y = arguments.length, B = new Array(y), F = 0; F < y; F++)
|
|
18522
|
+
B[F] = arguments[F];
|
|
18523
|
+
var k = f(B);
|
|
18524
|
+
if (Array.isArray(B[0]) && (B = B[0]), B.length < 2)
|
|
18525
18525
|
throw new r("streams");
|
|
18526
|
-
var T, A =
|
|
18527
|
-
var
|
|
18528
|
-
return u(x,
|
|
18529
|
-
T || (T = C), C && A.forEach(_), !
|
|
18526
|
+
var T, A = B.map(function(x, S) {
|
|
18527
|
+
var z = S < B.length - 1, O = S > 0;
|
|
18528
|
+
return u(x, z, O, function(C) {
|
|
18529
|
+
T || (T = C), C && A.forEach(_), !z && (A.forEach(_), k(T));
|
|
18530
18530
|
});
|
|
18531
18531
|
});
|
|
18532
|
-
return
|
|
18532
|
+
return B.reduce(l);
|
|
18533
18533
|
}
|
|
18534
18534
|
return ru = w, ru;
|
|
18535
18535
|
}
|
|
@@ -18567,9 +18567,9 @@ function g2() {
|
|
|
18567
18567
|
r(i);
|
|
18568
18568
|
}
|
|
18569
18569
|
update(r, i) {
|
|
18570
|
-
if (!
|
|
18570
|
+
if (!Xe.isBuffer(r) && typeof r != "string") throw new TypeError("Data must be a string or a buffer");
|
|
18571
18571
|
if (this._finalized) throw new Error("Digest already called");
|
|
18572
|
-
return
|
|
18572
|
+
return Xe.isBuffer(r) || (r = Xe.from(r, i)), this._state.absorb(r), this;
|
|
18573
18573
|
}
|
|
18574
18574
|
digest(r) {
|
|
18575
18575
|
if (this._finalized) throw new Error("Digest already called");
|
|
@@ -18612,9 +18612,9 @@ function y2() {
|
|
|
18612
18612
|
this.push(this.squeeze(r));
|
|
18613
18613
|
}
|
|
18614
18614
|
update(r, i) {
|
|
18615
|
-
if (!
|
|
18615
|
+
if (!Xe.isBuffer(r) && typeof r != "string") throw new TypeError("Data must be a string or a buffer");
|
|
18616
18616
|
if (this._finalized) throw new Error("Squeeze already called");
|
|
18617
|
-
return
|
|
18617
|
+
return Xe.isBuffer(r) || (r = Xe.from(r, i)), this._state.absorb(r), this;
|
|
18618
18618
|
}
|
|
18619
18619
|
squeeze(r, i) {
|
|
18620
18620
|
this._finalized || (this._finalized = !0, this._state.absorbLastFewBits(this._delimitedSuffix));
|
|
@@ -18673,17 +18673,17 @@ function m2() {
|
|
|
18673
18673
|
return ou.p1600 = function(t) {
|
|
18674
18674
|
for (let e = 0; e < 24; ++e) {
|
|
18675
18675
|
const r = t[0] ^ t[10] ^ t[20] ^ t[30] ^ t[40], i = t[1] ^ t[11] ^ t[21] ^ t[31] ^ t[41], o = t[2] ^ t[12] ^ t[22] ^ t[32] ^ t[42], a = t[3] ^ t[13] ^ t[23] ^ t[33] ^ t[43], u = t[4] ^ t[14] ^ t[24] ^ t[34] ^ t[44], _ = t[5] ^ t[15] ^ t[25] ^ t[35] ^ t[45], l = t[6] ^ t[16] ^ t[26] ^ t[36] ^ t[46], f = t[7] ^ t[17] ^ t[27] ^ t[37] ^ t[47], w = t[8] ^ t[18] ^ t[28] ^ t[38] ^ t[48], y = t[9] ^ t[19] ^ t[29] ^ t[39] ^ t[49];
|
|
18676
|
-
let
|
|
18677
|
-
const k = t[0] ^
|
|
18678
|
-
|
|
18679
|
-
const
|
|
18680
|
-
|
|
18681
|
-
const vt = t[4] ^
|
|
18682
|
-
|
|
18683
|
-
const ct = t[6] ^
|
|
18684
|
-
|
|
18685
|
-
const it = t[8] ^
|
|
18686
|
-
t[0] = Ne ^ ~Ut &
|
|
18676
|
+
let B = w ^ (o << 1 | a >>> 31), F = y ^ (a << 1 | o >>> 31);
|
|
18677
|
+
const k = t[0] ^ B, T = t[1] ^ F, A = t[10] ^ B, x = t[11] ^ F, S = t[20] ^ B, z = t[21] ^ F, O = t[30] ^ B, C = t[31] ^ F, N = t[40] ^ B, L = t[41] ^ F;
|
|
18678
|
+
B = r ^ (u << 1 | _ >>> 31), F = i ^ (_ << 1 | u >>> 31);
|
|
18679
|
+
const $ = t[2] ^ B, nt = t[3] ^ F, ut = t[12] ^ B, D = t[13] ^ F, dt = t[22] ^ B, xt = t[23] ^ F, at = t[32] ^ B, ht = t[33] ^ F, Et = t[42] ^ B, Rt = t[43] ^ F;
|
|
18680
|
+
B = o ^ (l << 1 | f >>> 31), F = a ^ (f << 1 | l >>> 31);
|
|
18681
|
+
const vt = t[4] ^ B, Pt = t[5] ^ F, Ct = t[14] ^ B, W = t[15] ^ F, Z = t[24] ^ B, rt = t[25] ^ F, gt = t[34] ^ B, G = t[35] ^ F, M = t[44] ^ B, X = t[45] ^ F;
|
|
18682
|
+
B = u ^ (w << 1 | y >>> 31), F = _ ^ (y << 1 | w >>> 31);
|
|
18683
|
+
const ct = t[6] ^ B, _t = t[7] ^ F, v = t[16] ^ B, R = t[17] ^ F, et = t[26] ^ B, lt = t[27] ^ F, Bt = t[36] ^ B, bt = t[37] ^ F, St = t[46] ^ B, he = t[47] ^ F;
|
|
18684
|
+
B = l ^ (r << 1 | i >>> 31), F = f ^ (i << 1 | r >>> 31);
|
|
18685
|
+
const it = t[8] ^ B, pe = t[9] ^ F, we = t[18] ^ B, Gt = t[19] ^ F, Qt = t[28] ^ B, de = t[29] ^ F, fe = t[38] ^ B, Ee = t[39] ^ F, Se = t[48] ^ B, ae = t[49] ^ F, Ne = k, b = T, h = x << 4 | A >>> 28, d = A << 4 | x >>> 28, P = S << 3 | z >>> 29, U = z << 3 | S >>> 29, J = C << 9 | O >>> 23, st = O << 9 | C >>> 23, kt = N << 18 | L >>> 14, Vt = L << 18 | N >>> 14, qt = $ << 1 | nt >>> 31, Kt = nt << 1 | $ >>> 31, Ut = D << 12 | ut >>> 20, ei = ut << 12 | D >>> 20, ke = dt << 10 | xt >>> 22, pi = xt << 10 | dt >>> 22, ms = ht << 13 | at >>> 19, Le = at << 13 | ht >>> 19, As = Et << 2 | Rt >>> 30, m = Rt << 2 | Et >>> 30, p = Pt << 30 | vt >>> 2, g = vt << 30 | Pt >>> 2, I = Ct << 6 | W >>> 26, H = W << 6 | Ct >>> 26, Y = rt << 11 | Z >>> 21, ot = Z << 11 | rt >>> 21, Ft = gt << 15 | G >>> 17, $t = G << 15 | gt >>> 17, Wt = X << 29 | M >>> 3, Yt = M << 29 | X >>> 3, Ht = ct << 28 | _t >>> 4, sa = _t << 28 | ct >>> 4, oa = R << 23 | v >>> 9, aa = v << 23 | R >>> 9, ca = et << 25 | lt >>> 7, ua = lt << 25 | et >>> 7, _a = Bt << 21 | bt >>> 11, fa = bt << 21 | Bt >>> 11, la = he << 24 | St >>> 8, ha = St << 24 | he >>> 8, pa = it << 27 | pe >>> 5, wa = pe << 27 | it >>> 5, da = we << 20 | Gt >>> 12, ga = Gt << 20 | we >>> 12, ya = de << 7 | Qt >>> 25, ba = Qt << 7 | de >>> 25, ma = fe << 8 | Ee >>> 24, Aa = Ee << 8 | fe >>> 24, Ea = Se << 14 | ae >>> 18, va = ae << 14 | Se >>> 18;
|
|
18686
|
+
t[0] = Ne ^ ~Ut & Y, t[1] = b ^ ~ei & ot, t[10] = Ht ^ ~da & P, t[11] = sa ^ ~ga & U, t[20] = qt ^ ~I & ca, t[21] = Kt ^ ~H & ua, t[30] = pa ^ ~h & ke, t[31] = wa ^ ~d & pi, t[40] = p ^ ~oa & ya, t[41] = g ^ ~aa & ba, t[2] = Ut ^ ~Y & _a, t[3] = ei ^ ~ot & fa, t[12] = da ^ ~P & ms, t[13] = ga ^ ~U & Le, t[22] = I ^ ~ca & ma, t[23] = H ^ ~ua & Aa, t[32] = h ^ ~ke & Ft, t[33] = d ^ ~pi & $t, t[42] = oa ^ ~ya & J, t[43] = aa ^ ~ba & st, t[4] = Y ^ ~_a & Ea, t[5] = ot ^ ~fa & va, t[14] = P ^ ~ms & Wt, t[15] = U ^ ~Le & Yt, t[24] = ca ^ ~ma & kt, t[25] = ua ^ ~Aa & Vt, t[34] = ke ^ ~Ft & la, t[35] = pi ^ ~$t & ha, t[44] = ya ^ ~J & As, t[45] = ba ^ ~st & m, t[6] = _a ^ ~Ea & Ne, t[7] = fa ^ ~va & b, t[16] = ms ^ ~Wt & Ht, t[17] = Le ^ ~Yt & sa, t[26] = ma ^ ~kt & qt, t[27] = Aa ^ ~Vt & Kt, t[36] = Ft ^ ~la & pa, t[37] = $t ^ ~ha & wa, t[46] = J ^ ~As & p, t[47] = st ^ ~m & g, t[8] = Ea ^ ~Ne & Ut, t[9] = va ^ ~b & ei, t[18] = Wt ^ ~Ht & da, t[19] = Yt ^ ~sa & ga, t[28] = kt ^ ~qt & I, t[29] = Vt ^ ~Kt & H, t[38] = la ^ ~pa & h, t[39] = ha ^ ~wa & d, t[48] = As ^ ~p & oa, t[49] = m ^ ~g & aa, t[0] ^= n[e * 2], t[1] ^= n[e * 2 + 1];
|
|
18687
18687
|
}
|
|
18688
18688
|
}, ou;
|
|
18689
18689
|
}
|
|
@@ -18731,7 +18731,7 @@ function A2() {
|
|
|
18731
18731
|
this.state[~~(this.count / 4)] ^= e << 8 * (this.count % 4), (e & 128) !== 0 && this.count === this.blockSize - 1 && n.p1600(this.state), this.state[~~((this.blockSize - 1) / 4)] ^= 128 << 8 * ((this.blockSize - 1) % 4), n.p1600(this.state), this.count = 0, this.squeezing = !0;
|
|
18732
18732
|
}, t.prototype.squeeze = function(e) {
|
|
18733
18733
|
this.squeezing || this.absorbLastFewBits(1);
|
|
18734
|
-
const r =
|
|
18734
|
+
const r = Xe.alloc(e);
|
|
18735
18735
|
for (let i = 0; i < e; ++i)
|
|
18736
18736
|
r[i] = this.state[~~(this.count / 4)] >>> 8 * (this.count % 4) & 255, this.count += 1, this.count === this.blockSize && (n.p1600(this.state), this.count = 0);
|
|
18737
18737
|
return r;
|
|
@@ -18769,7 +18769,7 @@ function R2() {
|
|
|
18769
18769
|
retryOn: []
|
|
18770
18770
|
};
|
|
18771
18771
|
return a = Object.assign(u, a), function(l, f) {
|
|
18772
|
-
var w = a.retries, y = a.retryDelay,
|
|
18772
|
+
var w = a.retries, y = a.retryDelay, B = a.retryOn;
|
|
18773
18773
|
if (f && f.retries !== void 0)
|
|
18774
18774
|
if (r(f.retries))
|
|
18775
18775
|
w = f.retries;
|
|
@@ -18782,41 +18782,41 @@ function R2() {
|
|
|
18782
18782
|
throw new i("retryDelay must be a positive integer or a function returning a positive integer");
|
|
18783
18783
|
if (f && f.retryOn)
|
|
18784
18784
|
if (Array.isArray(f.retryOn) || typeof f.retryOn == "function")
|
|
18785
|
-
|
|
18785
|
+
B = f.retryOn;
|
|
18786
18786
|
else
|
|
18787
18787
|
throw new i("retryOn property expects an array or function");
|
|
18788
18788
|
return new Promise(function(F, k) {
|
|
18789
18789
|
var T = function(x) {
|
|
18790
18790
|
var S = typeof Request < "u" && l instanceof Request ? l.clone() : l;
|
|
18791
|
-
o(S, f).then(function(
|
|
18792
|
-
if (Array.isArray(
|
|
18793
|
-
F(
|
|
18794
|
-
else if (typeof
|
|
18791
|
+
o(S, f).then(function(z) {
|
|
18792
|
+
if (Array.isArray(B) && B.indexOf(z.status) === -1)
|
|
18793
|
+
F(z);
|
|
18794
|
+
else if (typeof B == "function")
|
|
18795
18795
|
try {
|
|
18796
|
-
return Promise.resolve(
|
|
18797
|
-
O ? A(x, null,
|
|
18796
|
+
return Promise.resolve(B(x, null, z)).then(function(O) {
|
|
18797
|
+
O ? A(x, null, z) : F(z);
|
|
18798
18798
|
}).catch(k);
|
|
18799
18799
|
} catch (O) {
|
|
18800
18800
|
k(O);
|
|
18801
18801
|
}
|
|
18802
18802
|
else
|
|
18803
|
-
x < w ? A(x, null,
|
|
18804
|
-
}).catch(function(
|
|
18805
|
-
if (typeof
|
|
18803
|
+
x < w ? A(x, null, z) : F(z);
|
|
18804
|
+
}).catch(function(z) {
|
|
18805
|
+
if (typeof B == "function")
|
|
18806
18806
|
try {
|
|
18807
|
-
Promise.resolve(
|
|
18808
|
-
O ? A(x,
|
|
18807
|
+
Promise.resolve(B(x, z, null)).then(function(O) {
|
|
18808
|
+
O ? A(x, z, null) : k(z);
|
|
18809
18809
|
}).catch(function(O) {
|
|
18810
18810
|
k(O);
|
|
18811
18811
|
});
|
|
18812
18812
|
} catch (O) {
|
|
18813
18813
|
k(O);
|
|
18814
18814
|
}
|
|
18815
|
-
else x < w ? A(x,
|
|
18815
|
+
else x < w ? A(x, z, null) : k(z);
|
|
18816
18816
|
});
|
|
18817
18817
|
};
|
|
18818
|
-
function A(x, S,
|
|
18819
|
-
var O = typeof y == "function" ? y(x, S,
|
|
18818
|
+
function A(x, S, z) {
|
|
18819
|
+
var O = typeof y == "function" ? y(x, S, z) : y;
|
|
18820
18820
|
setTimeout(function() {
|
|
18821
18821
|
T(++x);
|
|
18822
18822
|
}, O);
|
|
@@ -19045,7 +19045,7 @@ class ui {
|
|
|
19045
19045
|
* @returns {CompactCiphertextListBuilder}
|
|
19046
19046
|
*/
|
|
19047
19047
|
static builder(t) {
|
|
19048
|
-
E(t,
|
|
19048
|
+
E(t, Ze);
|
|
19049
19049
|
const e = s.compactciphertextlist_builder(t.__wbg_ptr);
|
|
19050
19050
|
if (e[2])
|
|
19051
19051
|
throw c(e[1]);
|
|
@@ -19493,7 +19493,7 @@ class eo {
|
|
|
19493
19493
|
* @returns {ProvenCompactCiphertextList}
|
|
19494
19494
|
*/
|
|
19495
19495
|
build_with_proof_packed(t, e, r) {
|
|
19496
|
-
E(t,
|
|
19496
|
+
E(t, $e);
|
|
19497
19497
|
const i = q(e, s.__wbindgen_malloc), o = j, a = s.compactciphertextlistbuilder_build_with_proof_packed(this.__wbg_ptr, t.__wbg_ptr, i, o, r);
|
|
19498
19498
|
if (a[2])
|
|
19499
19499
|
throw c(a[1]);
|
|
@@ -20707,10 +20707,10 @@ class ls {
|
|
|
20707
20707
|
const ah = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
20708
20708
|
}, unregister: () => {
|
|
20709
20709
|
} } : new FinalizationRegistry((n) => s.__wbg_compactpkecrs_free(n >>> 0, 1));
|
|
20710
|
-
class
|
|
20710
|
+
class $e {
|
|
20711
20711
|
static __wrap(t) {
|
|
20712
20712
|
t = t >>> 0;
|
|
20713
|
-
const e = Object.create(
|
|
20713
|
+
const e = Object.create($e.prototype);
|
|
20714
20714
|
return e.__wbg_ptr = t, ah.register(e, e.__wbg_ptr, e), e;
|
|
20715
20715
|
}
|
|
20716
20716
|
__destroy_into_raw() {
|
|
@@ -20740,7 +20740,7 @@ class We {
|
|
|
20740
20740
|
const e = q(t, s.__wbindgen_malloc), r = j, i = s.compactpkecrs_deserialize(e, r);
|
|
20741
20741
|
if (i[2])
|
|
20742
20742
|
throw c(i[1]);
|
|
20743
|
-
return
|
|
20743
|
+
return $e.__wrap(i[0]);
|
|
20744
20744
|
}
|
|
20745
20745
|
/**
|
|
20746
20746
|
* @param {bigint} serialized_size_limit
|
|
@@ -20762,7 +20762,7 @@ class We {
|
|
|
20762
20762
|
const r = q(t, s.__wbindgen_malloc), i = j, o = s.compactpkecrs_safe_deserialize(r, i, e);
|
|
20763
20763
|
if (o[2])
|
|
20764
20764
|
throw c(o[1]);
|
|
20765
|
-
return
|
|
20765
|
+
return $e.__wrap(o[0]);
|
|
20766
20766
|
}
|
|
20767
20767
|
/**
|
|
20768
20768
|
* @param {TfheConfig} config
|
|
@@ -20774,7 +20774,7 @@ class We {
|
|
|
20774
20774
|
const r = s.compactpkecrs_from_config(t.__wbg_ptr, e);
|
|
20775
20775
|
if (r[2])
|
|
20776
20776
|
throw c(r[1]);
|
|
20777
|
-
return
|
|
20777
|
+
return $e.__wrap(r[0]);
|
|
20778
20778
|
}
|
|
20779
20779
|
/**
|
|
20780
20780
|
* @param {Uint8Array} buffer
|
|
@@ -20784,7 +20784,7 @@ class We {
|
|
|
20784
20784
|
const e = q(t, s.__wbindgen_malloc), r = j, i = s.compactpkecrs_deserialize_from_public_params(e, r);
|
|
20785
20785
|
if (i[2])
|
|
20786
20786
|
throw c(i[1]);
|
|
20787
|
-
return
|
|
20787
|
+
return $e.__wrap(i[0]);
|
|
20788
20788
|
}
|
|
20789
20789
|
/**
|
|
20790
20790
|
* @param {Uint8Array} buffer
|
|
@@ -20795,7 +20795,7 @@ class We {
|
|
|
20795
20795
|
const r = q(t, s.__wbindgen_malloc), i = j, o = s.compactpkecrs_safe_deserialize_from_public_params(r, i, e);
|
|
20796
20796
|
if (o[2])
|
|
20797
20797
|
throw c(o[1]);
|
|
20798
|
-
return
|
|
20798
|
+
return $e.__wrap(o[0]);
|
|
20799
20799
|
}
|
|
20800
20800
|
}
|
|
20801
20801
|
typeof FinalizationRegistry > "u" || new FinalizationRegistry((n) => s.__wbg_compressedfhebool_free(n >>> 0, 1));
|
|
@@ -29784,7 +29784,7 @@ class es {
|
|
|
29784
29784
|
* @returns {CompactCiphertextListBuilder}
|
|
29785
29785
|
*/
|
|
29786
29786
|
static builder(t) {
|
|
29787
|
-
E(t,
|
|
29787
|
+
E(t, Ze);
|
|
29788
29788
|
const e = s.provencompactciphertextlist_builder(t.__wbg_ptr);
|
|
29789
29789
|
if (e[2])
|
|
29790
29790
|
throw c(e[1]);
|
|
@@ -29817,7 +29817,7 @@ class es {
|
|
|
29817
29817
|
* @returns {CompactCiphertextListExpander}
|
|
29818
29818
|
*/
|
|
29819
29819
|
verify_and_expand(t, e, r) {
|
|
29820
|
-
E(t,
|
|
29820
|
+
E(t, $e), E(e, Ze);
|
|
29821
29821
|
const i = q(r, s.__wbindgen_malloc), o = j, a = s.provencompactciphertextlist_verify_and_expand(this.__wbg_ptr, t.__wbg_ptr, e.__wbg_ptr, i, o);
|
|
29822
29822
|
if (a[2])
|
|
29823
29823
|
throw c(a[1]);
|
|
@@ -30030,10 +30030,10 @@ class K {
|
|
|
30030
30030
|
const Mp = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
30031
30031
|
}, unregister: () => {
|
|
30032
30032
|
} } : new FinalizationRegistry((n) => s.__wbg_tfhecompactpublickey_free(n >>> 0, 1));
|
|
30033
|
-
class
|
|
30033
|
+
class Ze {
|
|
30034
30034
|
static __wrap(t) {
|
|
30035
30035
|
t = t >>> 0;
|
|
30036
|
-
const e = Object.create(
|
|
30036
|
+
const e = Object.create(Ze.prototype);
|
|
30037
30037
|
return e.__wbg_ptr = t, Mp.register(e, e.__wbg_ptr, e), e;
|
|
30038
30038
|
}
|
|
30039
30039
|
__destroy_into_raw() {
|
|
@@ -30053,7 +30053,7 @@ class $e {
|
|
|
30053
30053
|
const e = s.tfhecompactpublickey_new(t.__wbg_ptr);
|
|
30054
30054
|
if (e[2])
|
|
30055
30055
|
throw c(e[1]);
|
|
30056
|
-
return
|
|
30056
|
+
return Ze.__wrap(e[0]);
|
|
30057
30057
|
}
|
|
30058
30058
|
/**
|
|
30059
30059
|
* @returns {Uint8Array}
|
|
@@ -30073,7 +30073,7 @@ class $e {
|
|
|
30073
30073
|
const e = q(t, s.__wbindgen_malloc), r = j, i = s.tfhecompactpublickey_deserialize(e, r);
|
|
30074
30074
|
if (i[2])
|
|
30075
30075
|
throw c(i[1]);
|
|
30076
|
-
return
|
|
30076
|
+
return Ze.__wrap(i[0]);
|
|
30077
30077
|
}
|
|
30078
30078
|
/**
|
|
30079
30079
|
* @param {bigint} serialized_size_limit
|
|
@@ -30095,7 +30095,7 @@ class $e {
|
|
|
30095
30095
|
const r = q(t, s.__wbindgen_malloc), i = j, o = s.tfhecompactpublickey_safe_deserialize(r, i, e);
|
|
30096
30096
|
if (o[2])
|
|
30097
30097
|
throw c(o[1]);
|
|
30098
|
-
return
|
|
30098
|
+
return Ze.__wrap(o[0]);
|
|
30099
30099
|
}
|
|
30100
30100
|
/**
|
|
30101
30101
|
* @param {Uint8Array} buffer
|
|
@@ -30109,7 +30109,7 @@ class $e {
|
|
|
30109
30109
|
const a = s.tfhecompactpublickey_safe_deserialize_conformant(i, o, e, r.__wbg_ptr);
|
|
30110
30110
|
if (a[2])
|
|
30111
30111
|
throw c(a[1]);
|
|
30112
|
-
return
|
|
30112
|
+
return Ze.__wrap(a[0]);
|
|
30113
30113
|
}
|
|
30114
30114
|
}
|
|
30115
30115
|
typeof FinalizationRegistry > "u" || new FinalizationRegistry((n) => s.__wbg_tfhecompressedcompactpublickey_free(n >>> 0, 1));
|
|
@@ -30516,7 +30516,7 @@ var N2 = /* @__PURE__ */ Object.freeze({
|
|
|
30516
30516
|
CompactCiphertextList: ui,
|
|
30517
30517
|
CompactCiphertextListBuilder: eo,
|
|
30518
30518
|
CompactCiphertextListExpander: ls,
|
|
30519
|
-
CompactPkeCrs:
|
|
30519
|
+
CompactPkeCrs: $e,
|
|
30520
30520
|
FheBool: pr,
|
|
30521
30521
|
FheInt10: wr,
|
|
30522
30522
|
FheInt1024: dr,
|
|
@@ -30604,7 +30604,7 @@ var N2 = /* @__PURE__ */ Object.freeze({
|
|
|
30604
30604
|
ShortintCompactPublicKeyEncryptionParameters: Vs,
|
|
30605
30605
|
ShortintNoiseDistribution: ra,
|
|
30606
30606
|
TfheClientKey: K,
|
|
30607
|
-
TfheCompactPublicKey:
|
|
30607
|
+
TfheCompactPublicKey: Ze,
|
|
30608
30608
|
TfheCompressedPublicKey: wt,
|
|
30609
30609
|
TfheConfig: hs,
|
|
30610
30610
|
TfhePublicKey: pt,
|
|
@@ -30615,9 +30615,9 @@ var N2 = /* @__PURE__ */ Object.freeze({
|
|
|
30615
30615
|
wbg_rayon_PoolBuilder: na,
|
|
30616
30616
|
wbg_rayon_start_worker: F2
|
|
30617
30617
|
});
|
|
30618
|
-
let
|
|
30618
|
+
let tt, te = 0, Is = null;
|
|
30619
30619
|
function rs() {
|
|
30620
|
-
return (Is === null || Is.byteLength === 0) && (Is = new Uint8Array(
|
|
30620
|
+
return (Is === null || Is.byteLength === 0) && (Is = new Uint8Array(tt.memory.buffer)), Is;
|
|
30621
30621
|
}
|
|
30622
30622
|
const vo = typeof TextEncoder < "u" ? new TextEncoder("utf-8") : { encode: () => {
|
|
30623
30623
|
throw Error("TextEncoder not available");
|
|
@@ -30633,7 +30633,7 @@ const vo = typeof TextEncoder < "u" ? new TextEncoder("utf-8") : { encode: () =>
|
|
|
30633
30633
|
function Si(n, t, e) {
|
|
30634
30634
|
if (e === void 0) {
|
|
30635
30635
|
const u = vo.encode(n), _ = t(u.length, 1) >>> 0;
|
|
30636
|
-
return rs().subarray(_, _ + u.length).set(u),
|
|
30636
|
+
return rs().subarray(_, _ + u.length).set(u), te = u.length, _;
|
|
30637
30637
|
}
|
|
30638
30638
|
let r = n.length, i = t(r, 1) >>> 0;
|
|
30639
30639
|
const o = rs();
|
|
@@ -30648,22 +30648,22 @@ function Si(n, t, e) {
|
|
|
30648
30648
|
const u = rs().subarray(i + a, i + r), _ = L2(n, u);
|
|
30649
30649
|
a += _.written, i = e(i, r, a, 1) >>> 0;
|
|
30650
30650
|
}
|
|
30651
|
-
return
|
|
30651
|
+
return te = a, i;
|
|
30652
30652
|
}
|
|
30653
30653
|
let bi = null;
|
|
30654
30654
|
function Ue() {
|
|
30655
|
-
return (bi === null || bi.buffer.detached === !0 || bi.buffer.detached === void 0 && bi.buffer !==
|
|
30655
|
+
return (bi === null || bi.buffer.detached === !0 || bi.buffer.detached === void 0 && bi.buffer !== tt.memory.buffer) && (bi = new DataView(tt.memory.buffer)), bi;
|
|
30656
30656
|
}
|
|
30657
30657
|
function Wi(n) {
|
|
30658
|
-
const t =
|
|
30659
|
-
return
|
|
30658
|
+
const t = tt.__externref_table_alloc();
|
|
30659
|
+
return tt.__wbindgen_export_4.set(t, n), t;
|
|
30660
30660
|
}
|
|
30661
30661
|
function gi(n, t) {
|
|
30662
30662
|
try {
|
|
30663
30663
|
return n.apply(this, t);
|
|
30664
30664
|
} catch (e) {
|
|
30665
30665
|
const r = Wi(e);
|
|
30666
|
-
|
|
30666
|
+
tt.__wbindgen_exn_store(r);
|
|
30667
30667
|
}
|
|
30668
30668
|
}
|
|
30669
30669
|
const Sg = typeof TextDecoder < "u" ? new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }) : { decode: () => {
|
|
@@ -30717,19 +30717,19 @@ function Fi(n, t) {
|
|
|
30717
30717
|
if (!(n instanceof t))
|
|
30718
30718
|
throw new Error(`expected instance of ${t.name}`);
|
|
30719
30719
|
}
|
|
30720
|
-
function
|
|
30720
|
+
function Ve(n, t) {
|
|
30721
30721
|
return n = n >>> 0, rs().subarray(n / 1, n / 1 + t);
|
|
30722
30722
|
}
|
|
30723
|
-
function
|
|
30723
|
+
function qe(n, t) {
|
|
30724
30724
|
const e = t(n.length * 1, 1) >>> 0;
|
|
30725
|
-
return rs().set(n, e / 1),
|
|
30725
|
+
return rs().set(n, e / 1), te = n.length, e;
|
|
30726
30726
|
}
|
|
30727
30727
|
function Ui(n) {
|
|
30728
|
-
const t =
|
|
30729
|
-
return
|
|
30728
|
+
const t = tt.__wbindgen_export_4.get(n);
|
|
30729
|
+
return tt.__externref_table_dealloc(n), t;
|
|
30730
30730
|
}
|
|
30731
30731
|
function D2(n, t) {
|
|
30732
|
-
const e = Si(t,
|
|
30732
|
+
const e = Si(t, tt.__wbindgen_malloc, tt.__wbindgen_realloc), r = te, i = tt.new_server_id_addr(n, e, r);
|
|
30733
30733
|
if (i[2])
|
|
30734
30734
|
throw Ui(i[1]);
|
|
30735
30735
|
return ps.__wrap(i[0]);
|
|
@@ -30740,10 +30740,10 @@ function kg(n, t) {
|
|
|
30740
30740
|
const i = Wi(n[r]);
|
|
30741
30741
|
Ue().setUint32(e + 4 * r, i, !0);
|
|
30742
30742
|
}
|
|
30743
|
-
return
|
|
30743
|
+
return te = n.length, e;
|
|
30744
30744
|
}
|
|
30745
30745
|
function U2(n, t, e) {
|
|
30746
|
-
const r = kg(n,
|
|
30746
|
+
const r = kg(n, tt.__wbindgen_malloc), i = te, o = Si(t, tt.__wbindgen_malloc, tt.__wbindgen_realloc), a = te, u = Si(e, tt.__wbindgen_malloc, tt.__wbindgen_realloc), _ = te, l = tt.new_client(r, i, o, a, u, _);
|
|
30747
30747
|
if (l[2])
|
|
30748
30748
|
throw Ui(l[1]);
|
|
30749
30749
|
return ia.__wrap(l[0]);
|
|
@@ -30752,58 +30752,58 @@ function Pg(n, t) {
|
|
|
30752
30752
|
n = n >>> 0;
|
|
30753
30753
|
const e = Ue(), r = [];
|
|
30754
30754
|
for (let i = n; i < n + 4 * t; i += 4)
|
|
30755
|
-
r.push(
|
|
30756
|
-
return
|
|
30755
|
+
r.push(tt.__wbindgen_export_4.get(e.getUint32(i, !0)));
|
|
30756
|
+
return tt.__externref_drop_slice(n, t), r;
|
|
30757
30757
|
}
|
|
30758
30758
|
function M2() {
|
|
30759
|
-
const n =
|
|
30759
|
+
const n = tt.ml_kem_pke_keygen();
|
|
30760
30760
|
return Mi.__wrap(n);
|
|
30761
30761
|
}
|
|
30762
30762
|
function j2(n) {
|
|
30763
30763
|
Fi(n, Mi);
|
|
30764
|
-
const t =
|
|
30764
|
+
const t = tt.ml_kem_pke_get_pk(n.__wbg_ptr);
|
|
30765
30765
|
return bs.__wrap(t);
|
|
30766
30766
|
}
|
|
30767
30767
|
function G2(n) {
|
|
30768
30768
|
Fi(n, bs);
|
|
30769
|
-
const t =
|
|
30769
|
+
const t = tt.ml_kem_pke_pk_to_u8vec(n.__wbg_ptr);
|
|
30770
30770
|
if (t[3])
|
|
30771
30771
|
throw Ui(t[2]);
|
|
30772
|
-
var e =
|
|
30773
|
-
return
|
|
30772
|
+
var e = Ve(t[0], t[1]).slice();
|
|
30773
|
+
return tt.__wbindgen_free(t[0], t[1] * 1, 1), e;
|
|
30774
30774
|
}
|
|
30775
30775
|
function H2(n) {
|
|
30776
30776
|
Fi(n, Mi);
|
|
30777
|
-
const t =
|
|
30777
|
+
const t = tt.ml_kem_pke_sk_to_u8vec(n.__wbg_ptr);
|
|
30778
30778
|
if (t[3])
|
|
30779
30779
|
throw Ui(t[2]);
|
|
30780
|
-
var e =
|
|
30781
|
-
return
|
|
30780
|
+
var e = Ve(t[0], t[1]).slice();
|
|
30781
|
+
return tt.__wbindgen_free(t[0], t[1] * 1, 1), e;
|
|
30782
30782
|
}
|
|
30783
30783
|
function V2(n) {
|
|
30784
|
-
const t =
|
|
30784
|
+
const t = qe(n, tt.__wbindgen_malloc), e = te, r = tt.u8vec_to_ml_kem_pke_pk(t, e);
|
|
30785
30785
|
if (r[2])
|
|
30786
30786
|
throw Ui(r[1]);
|
|
30787
30787
|
return bs.__wrap(r[0]);
|
|
30788
30788
|
}
|
|
30789
30789
|
function q2(n) {
|
|
30790
|
-
const t =
|
|
30790
|
+
const t = qe(n, tt.__wbindgen_malloc), e = te, r = tt.u8vec_to_ml_kem_pke_sk(t, e);
|
|
30791
30791
|
if (r[2])
|
|
30792
30792
|
throw Ui(r[1]);
|
|
30793
30793
|
return Mi.__wrap(r[0]);
|
|
30794
30794
|
}
|
|
30795
30795
|
function Q2(n, t, e, r, i, o, a) {
|
|
30796
30796
|
Fi(n, ia), Fi(i, bs), Fi(o, Mi);
|
|
30797
|
-
const u =
|
|
30797
|
+
const u = tt.process_user_decryption_resp_from_js(n.__wbg_ptr, t, e, r, i.__wbg_ptr, o.__wbg_ptr, a);
|
|
30798
30798
|
if (u[3])
|
|
30799
30799
|
throw Ui(u[2]);
|
|
30800
30800
|
var _ = Pg(u[0], u[1]).slice();
|
|
30801
|
-
return
|
|
30801
|
+
return tt.__wbindgen_free(u[0], u[1] * 4, 4), _;
|
|
30802
30802
|
}
|
|
30803
|
-
typeof FinalizationRegistry > "u" || new FinalizationRegistry((n) =>
|
|
30803
|
+
typeof FinalizationRegistry > "u" || new FinalizationRegistry((n) => tt.__wbg_ciphertexthandle_free(n >>> 0, 1));
|
|
30804
30804
|
const qp = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
30805
30805
|
}, unregister: () => {
|
|
30806
|
-
} } : new FinalizationRegistry((n) =>
|
|
30806
|
+
} } : new FinalizationRegistry((n) => tt.__wbg_client_free(n >>> 0, 1));
|
|
30807
30807
|
class ia {
|
|
30808
30808
|
static __wrap(t) {
|
|
30809
30809
|
t = t >>> 0;
|
|
@@ -30816,14 +30816,14 @@ class ia {
|
|
|
30816
30816
|
}
|
|
30817
30817
|
free() {
|
|
30818
30818
|
const t = this.__destroy_into_raw();
|
|
30819
|
-
|
|
30819
|
+
tt.__wbg_client_free(t, 0);
|
|
30820
30820
|
}
|
|
30821
30821
|
}
|
|
30822
|
-
typeof FinalizationRegistry > "u" || new FinalizationRegistry((n) =>
|
|
30823
|
-
typeof FinalizationRegistry > "u" || new FinalizationRegistry((n) =>
|
|
30822
|
+
typeof FinalizationRegistry > "u" || new FinalizationRegistry((n) => tt.__wbg_eip712domainmsg_free(n >>> 0, 1));
|
|
30823
|
+
typeof FinalizationRegistry > "u" || new FinalizationRegistry((n) => tt.__wbg_parseduserdecryptionrequest_free(n >>> 0, 1));
|
|
30824
30824
|
const Qp = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
30825
30825
|
}, unregister: () => {
|
|
30826
|
-
} } : new FinalizationRegistry((n) =>
|
|
30826
|
+
} } : new FinalizationRegistry((n) => tt.__wbg_privateenckeymlkem512_free(n >>> 0, 1));
|
|
30827
30827
|
class Mi {
|
|
30828
30828
|
static __wrap(t) {
|
|
30829
30829
|
t = t >>> 0;
|
|
@@ -30836,13 +30836,13 @@ class Mi {
|
|
|
30836
30836
|
}
|
|
30837
30837
|
free() {
|
|
30838
30838
|
const t = this.__destroy_into_raw();
|
|
30839
|
-
|
|
30839
|
+
tt.__wbg_privateenckeymlkem512_free(t, 0);
|
|
30840
30840
|
}
|
|
30841
30841
|
}
|
|
30842
|
-
typeof FinalizationRegistry > "u" || new FinalizationRegistry((n) =>
|
|
30842
|
+
typeof FinalizationRegistry > "u" || new FinalizationRegistry((n) => tt.__wbg_privatesigkey_free(n >>> 0, 1));
|
|
30843
30843
|
const Kp = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
30844
30844
|
}, unregister: () => {
|
|
30845
|
-
} } : new FinalizationRegistry((n) =>
|
|
30845
|
+
} } : new FinalizationRegistry((n) => tt.__wbg_publicenckeymlkem512_free(n >>> 0, 1));
|
|
30846
30846
|
class bs {
|
|
30847
30847
|
static __wrap(t) {
|
|
30848
30848
|
t = t >>> 0;
|
|
@@ -30855,14 +30855,14 @@ class bs {
|
|
|
30855
30855
|
}
|
|
30856
30856
|
free() {
|
|
30857
30857
|
const t = this.__destroy_into_raw();
|
|
30858
|
-
|
|
30858
|
+
tt.__wbg_publicenckeymlkem512_free(t, 0);
|
|
30859
30859
|
}
|
|
30860
30860
|
}
|
|
30861
|
-
typeof FinalizationRegistry > "u" || new FinalizationRegistry((n) =>
|
|
30862
|
-
typeof FinalizationRegistry > "u" || new FinalizationRegistry((n) =>
|
|
30861
|
+
typeof FinalizationRegistry > "u" || new FinalizationRegistry((n) => tt.__wbg_publicsigkey_free(n >>> 0, 1));
|
|
30862
|
+
typeof FinalizationRegistry > "u" || new FinalizationRegistry((n) => tt.__wbg_requestid_free(n >>> 0, 1));
|
|
30863
30863
|
const Wp = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
30864
30864
|
}, unregister: () => {
|
|
30865
|
-
} } : new FinalizationRegistry((n) =>
|
|
30865
|
+
} } : new FinalizationRegistry((n) => tt.__wbg_serveridaddr_free(n >>> 0, 1));
|
|
30866
30866
|
class ps {
|
|
30867
30867
|
static __wrap(t) {
|
|
30868
30868
|
t = t >>> 0;
|
|
@@ -30878,12 +30878,12 @@ class ps {
|
|
|
30878
30878
|
}
|
|
30879
30879
|
free() {
|
|
30880
30880
|
const t = this.__destroy_into_raw();
|
|
30881
|
-
|
|
30881
|
+
tt.__wbg_serveridaddr_free(t, 0);
|
|
30882
30882
|
}
|
|
30883
30883
|
}
|
|
30884
30884
|
const Jp = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
30885
30885
|
}, unregister: () => {
|
|
30886
|
-
} } : new FinalizationRegistry((n) =>
|
|
30886
|
+
} } : new FinalizationRegistry((n) => tt.__wbg_typedciphertext_free(n >>> 0, 1));
|
|
30887
30887
|
class qs {
|
|
30888
30888
|
static __wrap(t) {
|
|
30889
30889
|
t = t >>> 0;
|
|
@@ -30899,24 +30899,24 @@ class qs {
|
|
|
30899
30899
|
}
|
|
30900
30900
|
free() {
|
|
30901
30901
|
const t = this.__destroy_into_raw();
|
|
30902
|
-
|
|
30902
|
+
tt.__wbg_typedciphertext_free(t, 0);
|
|
30903
30903
|
}
|
|
30904
30904
|
/**
|
|
30905
30905
|
* The actual ciphertext to decrypt, taken directly from fhevm.
|
|
30906
30906
|
* @returns {Uint8Array}
|
|
30907
30907
|
*/
|
|
30908
30908
|
get ciphertext() {
|
|
30909
|
-
const t =
|
|
30910
|
-
var e =
|
|
30911
|
-
return
|
|
30909
|
+
const t = tt.__wbg_get_typedciphertext_ciphertext(this.__wbg_ptr);
|
|
30910
|
+
var e = Ve(t[0], t[1]).slice();
|
|
30911
|
+
return tt.__wbindgen_free(t[0], t[1] * 1, 1), e;
|
|
30912
30912
|
}
|
|
30913
30913
|
/**
|
|
30914
30914
|
* The actual ciphertext to decrypt, taken directly from fhevm.
|
|
30915
30915
|
* @param {Uint8Array} arg0
|
|
30916
30916
|
*/
|
|
30917
30917
|
set ciphertext(t) {
|
|
30918
|
-
const e =
|
|
30919
|
-
|
|
30918
|
+
const e = qe(t, tt.__wbindgen_malloc), r = te;
|
|
30919
|
+
tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr, e, r);
|
|
30920
30920
|
}
|
|
30921
30921
|
/**
|
|
30922
30922
|
* The type of plaintext encrypted. The type should match FheType from tfhe-rs:
|
|
@@ -30924,7 +30924,7 @@ class qs {
|
|
|
30924
30924
|
* @returns {number}
|
|
30925
30925
|
*/
|
|
30926
30926
|
get fhe_type() {
|
|
30927
|
-
return
|
|
30927
|
+
return tt.__wbg_get_typedciphertext_fhe_type(this.__wbg_ptr);
|
|
30928
30928
|
}
|
|
30929
30929
|
/**
|
|
30930
30930
|
* The type of plaintext encrypted. The type should match FheType from tfhe-rs:
|
|
@@ -30932,24 +30932,24 @@ class qs {
|
|
|
30932
30932
|
* @param {number} arg0
|
|
30933
30933
|
*/
|
|
30934
30934
|
set fhe_type(t) {
|
|
30935
|
-
|
|
30935
|
+
tt.__wbg_set_typedciphertext_fhe_type(this.__wbg_ptr, t);
|
|
30936
30936
|
}
|
|
30937
30937
|
/**
|
|
30938
30938
|
* The external handle of the ciphertext (the handle used in the copro).
|
|
30939
30939
|
* @returns {Uint8Array}
|
|
30940
30940
|
*/
|
|
30941
30941
|
get external_handle() {
|
|
30942
|
-
const t =
|
|
30943
|
-
var e =
|
|
30944
|
-
return
|
|
30942
|
+
const t = tt.__wbg_get_typedciphertext_external_handle(this.__wbg_ptr);
|
|
30943
|
+
var e = Ve(t[0], t[1]).slice();
|
|
30944
|
+
return tt.__wbindgen_free(t[0], t[1] * 1, 1), e;
|
|
30945
30945
|
}
|
|
30946
30946
|
/**
|
|
30947
30947
|
* The external handle of the ciphertext (the handle used in the copro).
|
|
30948
30948
|
* @param {Uint8Array} arg0
|
|
30949
30949
|
*/
|
|
30950
30950
|
set external_handle(t) {
|
|
30951
|
-
const e =
|
|
30952
|
-
|
|
30951
|
+
const e = qe(t, tt.__wbindgen_malloc), r = te;
|
|
30952
|
+
tt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr, e, r);
|
|
30953
30953
|
}
|
|
30954
30954
|
/**
|
|
30955
30955
|
* The ciphertext format, see CiphertextFormat documentation for details.
|
|
@@ -30957,7 +30957,7 @@ class qs {
|
|
|
30957
30957
|
* @returns {number}
|
|
30958
30958
|
*/
|
|
30959
30959
|
get ciphertext_format() {
|
|
30960
|
-
return
|
|
30960
|
+
return tt.__wbg_get_typedciphertext_ciphertext_format(this.__wbg_ptr);
|
|
30961
30961
|
}
|
|
30962
30962
|
/**
|
|
30963
30963
|
* The ciphertext format, see CiphertextFormat documentation for details.
|
|
@@ -30965,12 +30965,12 @@ class qs {
|
|
|
30965
30965
|
* @param {number} arg0
|
|
30966
30966
|
*/
|
|
30967
30967
|
set ciphertext_format(t) {
|
|
30968
|
-
|
|
30968
|
+
tt.__wbg_set_typedciphertext_ciphertext_format(this.__wbg_ptr, t);
|
|
30969
30969
|
}
|
|
30970
30970
|
}
|
|
30971
30971
|
const $p = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
30972
30972
|
}, unregister: () => {
|
|
30973
|
-
} } : new FinalizationRegistry((n) =>
|
|
30973
|
+
} } : new FinalizationRegistry((n) => tt.__wbg_typedplaintext_free(n >>> 0, 1));
|
|
30974
30974
|
class f_ {
|
|
30975
30975
|
static __wrap(t) {
|
|
30976
30976
|
t = t >>> 0;
|
|
@@ -30983,24 +30983,24 @@ class f_ {
|
|
|
30983
30983
|
}
|
|
30984
30984
|
free() {
|
|
30985
30985
|
const t = this.__destroy_into_raw();
|
|
30986
|
-
|
|
30986
|
+
tt.__wbg_typedplaintext_free(t, 0);
|
|
30987
30987
|
}
|
|
30988
30988
|
/**
|
|
30989
30989
|
* The actual plaintext in bytes.
|
|
30990
30990
|
* @returns {Uint8Array}
|
|
30991
30991
|
*/
|
|
30992
30992
|
get bytes() {
|
|
30993
|
-
const t =
|
|
30994
|
-
var e =
|
|
30995
|
-
return
|
|
30993
|
+
const t = tt.__wbg_get_typedplaintext_bytes(this.__wbg_ptr);
|
|
30994
|
+
var e = Ve(t[0], t[1]).slice();
|
|
30995
|
+
return tt.__wbindgen_free(t[0], t[1] * 1, 1), e;
|
|
30996
30996
|
}
|
|
30997
30997
|
/**
|
|
30998
30998
|
* The actual plaintext in bytes.
|
|
30999
30999
|
* @param {Uint8Array} arg0
|
|
31000
31000
|
*/
|
|
31001
31001
|
set bytes(t) {
|
|
31002
|
-
const e =
|
|
31003
|
-
|
|
31002
|
+
const e = qe(t, tt.__wbindgen_malloc), r = te;
|
|
31003
|
+
tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr, e, r);
|
|
31004
31004
|
}
|
|
31005
31005
|
/**
|
|
31006
31006
|
* The type of plaintext encrypted. The type should match FheType from tfhe-rs:
|
|
@@ -31008,7 +31008,7 @@ class f_ {
|
|
|
31008
31008
|
* @returns {number}
|
|
31009
31009
|
*/
|
|
31010
31010
|
get fhe_type() {
|
|
31011
|
-
return
|
|
31011
|
+
return tt.__wbg_get_typedplaintext_fhe_type(this.__wbg_ptr);
|
|
31012
31012
|
}
|
|
31013
31013
|
/**
|
|
31014
31014
|
* The type of plaintext encrypted. The type should match FheType from tfhe-rs:
|
|
@@ -31016,12 +31016,12 @@ class f_ {
|
|
|
31016
31016
|
* @param {number} arg0
|
|
31017
31017
|
*/
|
|
31018
31018
|
set fhe_type(t) {
|
|
31019
|
-
|
|
31019
|
+
tt.__wbg_set_typedplaintext_fhe_type(this.__wbg_ptr, t);
|
|
31020
31020
|
}
|
|
31021
31021
|
}
|
|
31022
31022
|
const Yp = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
31023
31023
|
}, unregister: () => {
|
|
31024
|
-
} } : new FinalizationRegistry((n) =>
|
|
31024
|
+
} } : new FinalizationRegistry((n) => tt.__wbg_typedsigncryptedciphertext_free(n >>> 0, 1));
|
|
31025
31025
|
class Qs {
|
|
31026
31026
|
static __wrap(t) {
|
|
31027
31027
|
t = t >>> 0;
|
|
@@ -31037,7 +31037,7 @@ class Qs {
|
|
|
31037
31037
|
}
|
|
31038
31038
|
free() {
|
|
31039
31039
|
const t = this.__destroy_into_raw();
|
|
31040
|
-
|
|
31040
|
+
tt.__wbg_typedsigncryptedciphertext_free(t, 0);
|
|
31041
31041
|
}
|
|
31042
31042
|
/**
|
|
31043
31043
|
* The type of plaintext encrypted. The type should match FheType from tfhe-rs:
|
|
@@ -31045,7 +31045,7 @@ class Qs {
|
|
|
31045
31045
|
* @returns {number}
|
|
31046
31046
|
*/
|
|
31047
31047
|
get fhe_type() {
|
|
31048
|
-
return
|
|
31048
|
+
return tt.__wbg_get_typedciphertext_fhe_type(this.__wbg_ptr);
|
|
31049
31049
|
}
|
|
31050
31050
|
/**
|
|
31051
31051
|
* The type of plaintext encrypted. The type should match FheType from tfhe-rs:
|
|
@@ -31053,7 +31053,7 @@ class Qs {
|
|
|
31053
31053
|
* @param {number} arg0
|
|
31054
31054
|
*/
|
|
31055
31055
|
set fhe_type(t) {
|
|
31056
|
-
|
|
31056
|
+
tt.__wbg_set_typedciphertext_fhe_type(this.__wbg_ptr, t);
|
|
31057
31057
|
}
|
|
31058
31058
|
/**
|
|
31059
31059
|
* The signcrypted payload, using a hybrid encryption approach in
|
|
@@ -31061,9 +31061,9 @@ class Qs {
|
|
|
31061
31061
|
* @returns {Uint8Array}
|
|
31062
31062
|
*/
|
|
31063
31063
|
get signcrypted_ciphertext() {
|
|
31064
|
-
const t =
|
|
31065
|
-
var e =
|
|
31066
|
-
return
|
|
31064
|
+
const t = tt.__wbg_get_typedsigncryptedciphertext_signcrypted_ciphertext(this.__wbg_ptr);
|
|
31065
|
+
var e = Ve(t[0], t[1]).slice();
|
|
31066
|
+
return tt.__wbindgen_free(t[0], t[1] * 1, 1), e;
|
|
31067
31067
|
}
|
|
31068
31068
|
/**
|
|
31069
31069
|
* The signcrypted payload, using a hybrid encryption approach in
|
|
@@ -31071,25 +31071,25 @@ class Qs {
|
|
|
31071
31071
|
* @param {Uint8Array} arg0
|
|
31072
31072
|
*/
|
|
31073
31073
|
set signcrypted_ciphertext(t) {
|
|
31074
|
-
const e =
|
|
31075
|
-
|
|
31074
|
+
const e = qe(t, tt.__wbindgen_malloc), r = te;
|
|
31075
|
+
tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr, e, r);
|
|
31076
31076
|
}
|
|
31077
31077
|
/**
|
|
31078
31078
|
* The external handles that were originally in the request.
|
|
31079
31079
|
* @returns {Uint8Array}
|
|
31080
31080
|
*/
|
|
31081
31081
|
get external_handle() {
|
|
31082
|
-
const t =
|
|
31083
|
-
var e =
|
|
31084
|
-
return
|
|
31082
|
+
const t = tt.__wbg_get_typedsigncryptedciphertext_external_handle(this.__wbg_ptr);
|
|
31083
|
+
var e = Ve(t[0], t[1]).slice();
|
|
31084
|
+
return tt.__wbindgen_free(t[0], t[1] * 1, 1), e;
|
|
31085
31085
|
}
|
|
31086
31086
|
/**
|
|
31087
31087
|
* The external handles that were originally in the request.
|
|
31088
31088
|
* @param {Uint8Array} arg0
|
|
31089
31089
|
*/
|
|
31090
31090
|
set external_handle(t) {
|
|
31091
|
-
const e =
|
|
31092
|
-
|
|
31091
|
+
const e = qe(t, tt.__wbindgen_malloc), r = te;
|
|
31092
|
+
tt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr, e, r);
|
|
31093
31093
|
}
|
|
31094
31094
|
/**
|
|
31095
31095
|
* The packing factor determines whether the decrypted plaintext
|
|
@@ -31097,7 +31097,7 @@ class Qs {
|
|
|
31097
31097
|
* @returns {number}
|
|
31098
31098
|
*/
|
|
31099
31099
|
get packing_factor() {
|
|
31100
|
-
return
|
|
31100
|
+
return tt.__wbg_get_typedciphertext_ciphertext_format(this.__wbg_ptr) >>> 0;
|
|
31101
31101
|
}
|
|
31102
31102
|
/**
|
|
31103
31103
|
* The packing factor determines whether the decrypted plaintext
|
|
@@ -31105,13 +31105,13 @@ class Qs {
|
|
|
31105
31105
|
* @param {number} arg0
|
|
31106
31106
|
*/
|
|
31107
31107
|
set packing_factor(t) {
|
|
31108
|
-
|
|
31108
|
+
tt.__wbg_set_typedciphertext_ciphertext_format(this.__wbg_ptr, t);
|
|
31109
31109
|
}
|
|
31110
31110
|
}
|
|
31111
|
-
typeof FinalizationRegistry > "u" || new FinalizationRegistry((n) =>
|
|
31111
|
+
typeof FinalizationRegistry > "u" || new FinalizationRegistry((n) => tt.__wbg_userdecryptionrequest_free(n >>> 0, 1));
|
|
31112
31112
|
const K2 = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
31113
31113
|
}, unregister: () => {
|
|
31114
|
-
} } : new FinalizationRegistry((n) =>
|
|
31114
|
+
} } : new FinalizationRegistry((n) => tt.__wbg_userdecryptionresponse_free(n >>> 0, 1));
|
|
31115
31115
|
class l_ {
|
|
31116
31116
|
static __unwrap(t) {
|
|
31117
31117
|
return t instanceof l_ ? t.__destroy_into_raw() : 0;
|
|
@@ -31122,22 +31122,22 @@ class l_ {
|
|
|
31122
31122
|
}
|
|
31123
31123
|
free() {
|
|
31124
31124
|
const t = this.__destroy_into_raw();
|
|
31125
|
-
|
|
31125
|
+
tt.__wbg_userdecryptionresponse_free(t, 0);
|
|
31126
31126
|
}
|
|
31127
31127
|
/**
|
|
31128
31128
|
* @returns {Uint8Array}
|
|
31129
31129
|
*/
|
|
31130
31130
|
get signature() {
|
|
31131
|
-
const t =
|
|
31132
|
-
var e =
|
|
31133
|
-
return
|
|
31131
|
+
const t = tt.__wbg_get_userdecryptionresponse_signature(this.__wbg_ptr);
|
|
31132
|
+
var e = Ve(t[0], t[1]).slice();
|
|
31133
|
+
return tt.__wbindgen_free(t[0], t[1] * 1, 1), e;
|
|
31134
31134
|
}
|
|
31135
31135
|
/**
|
|
31136
31136
|
* @param {Uint8Array} arg0
|
|
31137
31137
|
*/
|
|
31138
31138
|
set signature(t) {
|
|
31139
|
-
const e =
|
|
31140
|
-
|
|
31139
|
+
const e = qe(t, tt.__wbindgen_malloc), r = te;
|
|
31140
|
+
tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr, e, r);
|
|
31141
31141
|
}
|
|
31142
31142
|
/**
|
|
31143
31143
|
* This is the external signature created from the Eip712 domain
|
|
@@ -31145,14 +31145,15 @@ class l_ {
|
|
|
31145
31145
|
* struct UserDecryptResponseVerification {
|
|
31146
31146
|
* bytes publicKey;
|
|
31147
31147
|
* uint256\[\] ctHandles;
|
|
31148
|
-
* bytes userDecryptedShare;
|
|
31148
|
+
* bytes userDecryptedShare; // serialization of payload
|
|
31149
|
+
* bytes extraData;
|
|
31149
31150
|
* }
|
|
31150
31151
|
* @returns {Uint8Array}
|
|
31151
31152
|
*/
|
|
31152
31153
|
get external_signature() {
|
|
31153
|
-
const t =
|
|
31154
|
-
var e =
|
|
31155
|
-
return
|
|
31154
|
+
const t = tt.__wbg_get_userdecryptionresponse_external_signature(this.__wbg_ptr);
|
|
31155
|
+
var e = Ve(t[0], t[1]).slice();
|
|
31156
|
+
return tt.__wbindgen_free(t[0], t[1] * 1, 1), e;
|
|
31156
31157
|
}
|
|
31157
31158
|
/**
|
|
31158
31159
|
* This is the external signature created from the Eip712 domain
|
|
@@ -31160,20 +31161,21 @@ class l_ {
|
|
|
31160
31161
|
* struct UserDecryptResponseVerification {
|
|
31161
31162
|
* bytes publicKey;
|
|
31162
31163
|
* uint256\[\] ctHandles;
|
|
31163
|
-
* bytes userDecryptedShare;
|
|
31164
|
+
* bytes userDecryptedShare; // serialization of payload
|
|
31165
|
+
* bytes extraData;
|
|
31164
31166
|
* }
|
|
31165
31167
|
* @param {Uint8Array} arg0
|
|
31166
31168
|
*/
|
|
31167
31169
|
set external_signature(t) {
|
|
31168
|
-
const e =
|
|
31169
|
-
|
|
31170
|
+
const e = qe(t, tt.__wbindgen_malloc), r = te;
|
|
31171
|
+
tt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr, e, r);
|
|
31170
31172
|
}
|
|
31171
31173
|
/**
|
|
31172
31174
|
* The actual \[UserDecryptionResponsePayload\].
|
|
31173
31175
|
* @returns {UserDecryptionResponsePayload | undefined}
|
|
31174
31176
|
*/
|
|
31175
31177
|
get payload() {
|
|
31176
|
-
const t =
|
|
31178
|
+
const t = tt.__wbg_get_userdecryptionresponse_payload(this.__wbg_ptr);
|
|
31177
31179
|
return t === 0 ? void 0 : No.__wrap(t);
|
|
31178
31180
|
}
|
|
31179
31181
|
/**
|
|
@@ -31182,12 +31184,29 @@ class l_ {
|
|
|
31182
31184
|
*/
|
|
31183
31185
|
set payload(t) {
|
|
31184
31186
|
let e = 0;
|
|
31185
|
-
ai(t) || (Fi(t, No), e = t.__destroy_into_raw()),
|
|
31187
|
+
ai(t) || (Fi(t, No), e = t.__destroy_into_raw()), tt.__wbg_set_userdecryptionresponse_payload(this.__wbg_ptr, e);
|
|
31188
|
+
}
|
|
31189
|
+
/**
|
|
31190
|
+
* Extra data used in the EIP712 signature - external_signature.
|
|
31191
|
+
* @returns {Uint8Array}
|
|
31192
|
+
*/
|
|
31193
|
+
get extra_data() {
|
|
31194
|
+
const t = tt.__wbg_get_userdecryptionresponse_extra_data(this.__wbg_ptr);
|
|
31195
|
+
var e = Ve(t[0], t[1]).slice();
|
|
31196
|
+
return tt.__wbindgen_free(t[0], t[1] * 1, 1), e;
|
|
31197
|
+
}
|
|
31198
|
+
/**
|
|
31199
|
+
* Extra data used in the EIP712 signature - external_signature.
|
|
31200
|
+
* @param {Uint8Array} arg0
|
|
31201
|
+
*/
|
|
31202
|
+
set extra_data(t) {
|
|
31203
|
+
const e = qe(t, tt.__wbindgen_malloc), r = te;
|
|
31204
|
+
tt.__wbg_set_eip712domainmsg_chain_id(this.__wbg_ptr, e, r);
|
|
31186
31205
|
}
|
|
31187
31206
|
}
|
|
31188
31207
|
const Zp = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
31189
31208
|
}, unregister: () => {
|
|
31190
|
-
} } : new FinalizationRegistry((n) =>
|
|
31209
|
+
} } : new FinalizationRegistry((n) => tt.__wbg_userdecryptionresponsepayload_free(n >>> 0, 1));
|
|
31191
31210
|
class No {
|
|
31192
31211
|
static __wrap(t) {
|
|
31193
31212
|
t = t >>> 0;
|
|
@@ -31200,7 +31219,7 @@ class No {
|
|
|
31200
31219
|
}
|
|
31201
31220
|
free() {
|
|
31202
31221
|
const t = this.__destroy_into_raw();
|
|
31203
|
-
|
|
31222
|
+
tt.__wbg_userdecryptionresponsepayload_free(t, 0);
|
|
31204
31223
|
}
|
|
31205
31224
|
/**
|
|
31206
31225
|
* The server's signature verification key, Encoded using SEC1.
|
|
@@ -31209,9 +31228,9 @@ class No {
|
|
|
31209
31228
|
* @returns {Uint8Array}
|
|
31210
31229
|
*/
|
|
31211
31230
|
get verification_key() {
|
|
31212
|
-
const t =
|
|
31213
|
-
var e =
|
|
31214
|
-
return
|
|
31231
|
+
const t = tt.__wbg_get_userdecryptionresponsepayload_verification_key(this.__wbg_ptr);
|
|
31232
|
+
var e = Ve(t[0], t[1]).slice();
|
|
31233
|
+
return tt.__wbindgen_free(t[0], t[1] * 1, 1), e;
|
|
31215
31234
|
}
|
|
31216
31235
|
/**
|
|
31217
31236
|
* The server's signature verification key, Encoded using SEC1.
|
|
@@ -31220,8 +31239,8 @@ class No {
|
|
|
31220
31239
|
* @param {Uint8Array} arg0
|
|
31221
31240
|
*/
|
|
31222
31241
|
set verification_key(t) {
|
|
31223
|
-
const e =
|
|
31224
|
-
|
|
31242
|
+
const e = qe(t, tt.__wbindgen_malloc), r = te;
|
|
31243
|
+
tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr, e, r);
|
|
31225
31244
|
}
|
|
31226
31245
|
/**
|
|
31227
31246
|
* This is needed to ensure the response corresponds to the request.
|
|
@@ -31230,9 +31249,9 @@ class No {
|
|
|
31230
31249
|
* @returns {Uint8Array}
|
|
31231
31250
|
*/
|
|
31232
31251
|
get digest() {
|
|
31233
|
-
const t =
|
|
31234
|
-
var e =
|
|
31235
|
-
return
|
|
31252
|
+
const t = tt.__wbg_get_userdecryptionresponsepayload_digest(this.__wbg_ptr);
|
|
31253
|
+
var e = Ve(t[0], t[1]).slice();
|
|
31254
|
+
return tt.__wbindgen_free(t[0], t[1] * 1, 1), e;
|
|
31236
31255
|
}
|
|
31237
31256
|
/**
|
|
31238
31257
|
* This is needed to ensure the response corresponds to the request.
|
|
@@ -31241,8 +31260,8 @@ class No {
|
|
|
31241
31260
|
* @param {Uint8Array} arg0
|
|
31242
31261
|
*/
|
|
31243
31262
|
set digest(t) {
|
|
31244
|
-
const e =
|
|
31245
|
-
|
|
31263
|
+
const e = qe(t, tt.__wbindgen_malloc), r = te;
|
|
31264
|
+
tt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr, e, r);
|
|
31246
31265
|
}
|
|
31247
31266
|
/**
|
|
31248
31267
|
* The resulting signcrypted ciphertexts, each ciphertext
|
|
@@ -31251,9 +31270,9 @@ class No {
|
|
|
31251
31270
|
* @returns {TypedSigncryptedCiphertext[]}
|
|
31252
31271
|
*/
|
|
31253
31272
|
get signcrypted_ciphertexts() {
|
|
31254
|
-
const t =
|
|
31273
|
+
const t = tt.__wbg_get_userdecryptionresponsepayload_signcrypted_ciphertexts(this.__wbg_ptr);
|
|
31255
31274
|
var e = Pg(t[0], t[1]).slice();
|
|
31256
|
-
return
|
|
31275
|
+
return tt.__wbindgen_free(t[0], t[1] * 4, 4), e;
|
|
31257
31276
|
}
|
|
31258
31277
|
/**
|
|
31259
31278
|
* The resulting signcrypted ciphertexts, each ciphertext
|
|
@@ -31262,8 +31281,8 @@ class No {
|
|
|
31262
31281
|
* @param {TypedSigncryptedCiphertext[]} arg0
|
|
31263
31282
|
*/
|
|
31264
31283
|
set signcrypted_ciphertexts(t) {
|
|
31265
|
-
const e = kg(t,
|
|
31266
|
-
|
|
31284
|
+
const e = kg(t, tt.__wbindgen_malloc), r = te;
|
|
31285
|
+
tt.__wbg_set_userdecryptionresponsepayload_signcrypted_ciphertexts(this.__wbg_ptr, e, r);
|
|
31267
31286
|
}
|
|
31268
31287
|
/**
|
|
31269
31288
|
* The ID of the MPC party doing the user decryption. Used for polynomial
|
|
@@ -31271,7 +31290,7 @@ class No {
|
|
|
31271
31290
|
* @returns {number}
|
|
31272
31291
|
*/
|
|
31273
31292
|
get party_id() {
|
|
31274
|
-
return
|
|
31293
|
+
return tt.__wbg_get_userdecryptionresponsepayload_party_id(this.__wbg_ptr) >>> 0;
|
|
31275
31294
|
}
|
|
31276
31295
|
/**
|
|
31277
31296
|
* The ID of the MPC party doing the user decryption. Used for polynomial
|
|
@@ -31279,21 +31298,21 @@ class No {
|
|
|
31279
31298
|
* @param {number} arg0
|
|
31280
31299
|
*/
|
|
31281
31300
|
set party_id(t) {
|
|
31282
|
-
|
|
31301
|
+
tt.__wbg_set_userdecryptionresponsepayload_party_id(this.__wbg_ptr, t);
|
|
31283
31302
|
}
|
|
31284
31303
|
/**
|
|
31285
31304
|
* The degree of the sharing scheme used.
|
|
31286
31305
|
* @returns {number}
|
|
31287
31306
|
*/
|
|
31288
31307
|
get degree() {
|
|
31289
|
-
return
|
|
31308
|
+
return tt.__wbg_get_userdecryptionresponsepayload_degree(this.__wbg_ptr) >>> 0;
|
|
31290
31309
|
}
|
|
31291
31310
|
/**
|
|
31292
31311
|
* The degree of the sharing scheme used.
|
|
31293
31312
|
* @param {number} arg0
|
|
31294
31313
|
*/
|
|
31295
31314
|
set degree(t) {
|
|
31296
|
-
|
|
31315
|
+
tt.__wbg_set_userdecryptionresponsepayload_degree(this.__wbg_ptr, t);
|
|
31297
31316
|
}
|
|
31298
31317
|
}
|
|
31299
31318
|
async function W2(n, t) {
|
|
@@ -31317,7 +31336,7 @@ async function W2(n, t) {
|
|
|
31317
31336
|
function J2() {
|
|
31318
31337
|
const n = {};
|
|
31319
31338
|
return n.wbg = {}, n.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(t, e) {
|
|
31320
|
-
const r = String(e), i = Si(r,
|
|
31339
|
+
const r = String(e), i = Si(r, tt.__wbindgen_malloc, tt.__wbindgen_realloc), o = te;
|
|
31321
31340
|
Ue().setInt32(t + 4 * 1, o, !0), Ue().setInt32(t + 4 * 0, i, !0);
|
|
31322
31341
|
}, n.wbg.__wbg_buffer_609cc3eee51ed158 = function(t) {
|
|
31323
31342
|
return t.buffer;
|
|
@@ -31338,7 +31357,7 @@ function J2() {
|
|
|
31338
31357
|
try {
|
|
31339
31358
|
r = t, i = e, console.error(Rs(t, e));
|
|
31340
31359
|
} finally {
|
|
31341
|
-
|
|
31360
|
+
tt.__wbindgen_free(r, i, 1);
|
|
31342
31361
|
}
|
|
31343
31362
|
}, n.wbg.__wbg_getRandomValues_bcb4912f16000dc4 = function() {
|
|
31344
31363
|
return gi(function(t, e) {
|
|
@@ -31415,7 +31434,7 @@ function J2() {
|
|
|
31415
31434
|
}, n.wbg.__wbg_set_65595bdd868b3009 = function(t, e, r) {
|
|
31416
31435
|
t.set(e, r >>> 0);
|
|
31417
31436
|
}, n.wbg.__wbg_stack_0ed75d68575b0f3c = function(t, e) {
|
|
31418
|
-
const r = e.stack, i = Si(r,
|
|
31437
|
+
const r = e.stack, i = Si(r, tt.__wbindgen_malloc, tt.__wbindgen_realloc), o = te;
|
|
31419
31438
|
Ue().setInt32(t + 4 * 1, o, !0), Ue().setInt32(t + 4 * 0, i, !0);
|
|
31420
31439
|
}, n.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
|
|
31421
31440
|
const t = typeof Co > "u" ? null : Co;
|
|
@@ -31453,14 +31472,14 @@ function J2() {
|
|
|
31453
31472
|
const e = t;
|
|
31454
31473
|
return typeof e == "boolean" ? e ? 1 : 0 : 2;
|
|
31455
31474
|
}, n.wbg.__wbindgen_debug_string = function(t, e) {
|
|
31456
|
-
const r = Cu(e), i = Si(r,
|
|
31475
|
+
const r = Cu(e), i = Si(r, tt.__wbindgen_malloc, tt.__wbindgen_realloc), o = te;
|
|
31457
31476
|
Ue().setInt32(t + 4 * 1, o, !0), Ue().setInt32(t + 4 * 0, i, !0);
|
|
31458
31477
|
}, n.wbg.__wbindgen_error_new = function(t, e) {
|
|
31459
31478
|
return new Error(Rs(t, e));
|
|
31460
31479
|
}, n.wbg.__wbindgen_in = function(t, e) {
|
|
31461
31480
|
return t in e;
|
|
31462
31481
|
}, n.wbg.__wbindgen_init_externref_table = function() {
|
|
31463
|
-
const t =
|
|
31482
|
+
const t = tt.__wbindgen_export_4, e = t.grow(4);
|
|
31464
31483
|
t.set(0, void 0), t.set(e + 0, void 0), t.set(e + 1, null), t.set(e + 2, !0), t.set(e + 3, !1);
|
|
31465
31484
|
}, n.wbg.__wbindgen_is_function = function(t) {
|
|
31466
31485
|
return typeof t == "function";
|
|
@@ -31476,13 +31495,13 @@ function J2() {
|
|
|
31476
31495
|
}, n.wbg.__wbindgen_jsval_loose_eq = function(t, e) {
|
|
31477
31496
|
return t == e;
|
|
31478
31497
|
}, n.wbg.__wbindgen_memory = function() {
|
|
31479
|
-
return
|
|
31498
|
+
return tt.memory;
|
|
31480
31499
|
}, n.wbg.__wbindgen_number_get = function(t, e) {
|
|
31481
31500
|
const r = e, i = typeof r == "number" ? r : void 0;
|
|
31482
31501
|
Ue().setFloat64(t + 8 * 1, ai(i) ? 0 : i, !0), Ue().setInt32(t + 4 * 0, !ai(i), !0);
|
|
31483
31502
|
}, n.wbg.__wbindgen_string_get = function(t, e) {
|
|
31484
31503
|
const r = e, i = typeof r == "string" ? r : void 0;
|
|
31485
|
-
var o = ai(i) ? 0 : Si(i,
|
|
31504
|
+
var o = ai(i) ? 0 : Si(i, tt.__wbindgen_malloc, tt.__wbindgen_realloc), a = te;
|
|
31486
31505
|
Ue().setInt32(t + 4 * 1, a, !0), Ue().setInt32(t + 4 * 0, o, !0);
|
|
31487
31506
|
}, n.wbg.__wbindgen_string_new = function(t, e) {
|
|
31488
31507
|
return Rs(t, e);
|
|
@@ -31491,10 +31510,10 @@ function J2() {
|
|
|
31491
31510
|
}, n;
|
|
31492
31511
|
}
|
|
31493
31512
|
function $2(n, t) {
|
|
31494
|
-
return
|
|
31513
|
+
return tt = n.exports, h_.__wbindgen_wasm_module = t, bi = null, Is = null, tt.__wbindgen_start(), tt;
|
|
31495
31514
|
}
|
|
31496
31515
|
async function h_(n) {
|
|
31497
|
-
if (
|
|
31516
|
+
if (tt !== void 0) return tt;
|
|
31498
31517
|
typeof n < "u" && (Object.getPrototypeOf(n) === Object.prototype ? { module_or_path: n } = n : console.warn("using deprecated parameters for the initialization function; pass a single object instead")), typeof n > "u" && (n = new URL(
|
|
31499
31518
|
/* @vite-ignore */
|
|
31500
31519
|
"/kms_lib_bg.wasm",
|
|
@@ -31735,10 +31754,10 @@ const _u = {}, Lg = async (n, t) => {
|
|
|
31735
31754
|
if (!t)
|
|
31736
31755
|
r = e.response.fhe_key_info[0].fhe_public_key.urls[0], t = e.response.fhe_key_info[0].fhe_public_key.data_id;
|
|
31737
31756
|
else {
|
|
31738
|
-
const
|
|
31739
|
-
if (!
|
|
31757
|
+
const B = e.response.fhe_key_info.find((F) => F.fhe_public_key.data_id === t);
|
|
31758
|
+
if (!B)
|
|
31740
31759
|
throw new Error(`Could not find FHE key info with data_id ${t}`);
|
|
31741
|
-
r =
|
|
31760
|
+
r = B.fhe_public_key.urls[0];
|
|
31742
31761
|
}
|
|
31743
31762
|
const i = await fetch(r);
|
|
31744
31763
|
if (!i.ok)
|
|
@@ -31753,17 +31772,17 @@ const _u = {}, Lg = async (n, t) => {
|
|
|
31753
31772
|
let f;
|
|
31754
31773
|
try {
|
|
31755
31774
|
f = TFHE.TfheCompactPublicKey.safe_deserialize(o, p_);
|
|
31756
|
-
} catch (
|
|
31775
|
+
} catch (B) {
|
|
31757
31776
|
throw new Error("Invalid public key (deserialization failed)", {
|
|
31758
|
-
cause:
|
|
31777
|
+
cause: B
|
|
31759
31778
|
});
|
|
31760
31779
|
}
|
|
31761
31780
|
let w;
|
|
31762
31781
|
try {
|
|
31763
31782
|
w = TFHE.CompactPkeCrs.safe_deserialize(new Uint8Array(l), w_);
|
|
31764
|
-
} catch (
|
|
31783
|
+
} catch (B) {
|
|
31765
31784
|
throw new Error("Invalid crs (deserialization failed)", {
|
|
31766
|
-
cause:
|
|
31785
|
+
cause: B
|
|
31767
31786
|
});
|
|
31768
31787
|
}
|
|
31769
31788
|
const y = {
|
|
@@ -31840,11 +31859,11 @@ const _u = {}, Lg = async (n, t) => {
|
|
|
31840
31859
|
}
|
|
31841
31860
|
} else
|
|
31842
31861
|
throw new Error("You must provide a valid CRS with its CRS ID.");
|
|
31843
|
-
}, iA = async (n, t) => await new
|
|
31844
|
-
const r = await new
|
|
31862
|
+
}, iA = async (n, t) => await new tr(t.kmsContractAddress, Dg, n).getKmsSigners(), sA = async (n, t) => {
|
|
31863
|
+
const r = await new tr(t.kmsContractAddress, Dg, n).getThreshold();
|
|
31845
31864
|
return Number(r);
|
|
31846
|
-
}, oA = async (n, t) => await new
|
|
31847
|
-
const r = await new
|
|
31865
|
+
}, oA = async (n, t) => await new tr(t.inputVerifierContractAddress, Ug, n).getCoprocessorSigners(), aA = async (n, t) => {
|
|
31866
|
+
const r = await new tr(t.inputVerifierContractAddress, Ug, n).getThreshold();
|
|
31848
31867
|
return Number(r);
|
|
31849
31868
|
}, tw = {
|
|
31850
31869
|
0: 2,
|
|
@@ -31904,7 +31923,7 @@ function fA(n, t) {
|
|
|
31904
31923
|
if (n + r < e)
|
|
31905
31924
|
throw Error("User decrypt request has expired");
|
|
31906
31925
|
}
|
|
31907
|
-
const lA = (n, t, e, r, i, o, a, u) => async (_, l, f, w, y,
|
|
31926
|
+
const lA = (n, t, e, r, i, o, a, u) => async (_, l, f, w, y, B, F, k) => {
|
|
31908
31927
|
const T = "0x00";
|
|
31909
31928
|
let A, x;
|
|
31910
31929
|
try {
|
|
@@ -31912,19 +31931,19 @@ const lA = (n, t, e, r, i, o, a, u) => async (_, l, f, w, y, z, F, k) => {
|
|
|
31912
31931
|
} catch (dt) {
|
|
31913
31932
|
throw new Error("Invalid public or private key", { cause: dt });
|
|
31914
31933
|
}
|
|
31915
|
-
const S = w.replace(/^(0x)/, ""),
|
|
31934
|
+
const S = w.replace(/^(0x)/, ""), z = f.replace(/^(0x)/, ""), O = _.map((dt) => ({
|
|
31916
31935
|
handle: typeof dt.handle == "string" ? _r(He(dt.handle), !0) : _r(dt.handle, !0),
|
|
31917
31936
|
contractAddress: Ro(dt.contractAddress)
|
|
31918
31937
|
}));
|
|
31919
31938
|
Mg(O.map((dt) => dt.handle)), fA(BigInt(F), BigInt(k));
|
|
31920
|
-
const C = new
|
|
31921
|
-
const at = await C.persistAllowed(dt,
|
|
31939
|
+
const C = new tr(i, cA, a), N = O.map(async ({ handle: dt, contractAddress: xt }) => {
|
|
31940
|
+
const at = await C.persistAllowed(dt, B), ht = await C.persistAllowed(dt, xt);
|
|
31922
31941
|
if (!at)
|
|
31923
|
-
throw new Error(`User ${
|
|
31942
|
+
throw new Error(`User ${B} is not authorized to user decrypt handle ${dt}!`);
|
|
31924
31943
|
if (!ht)
|
|
31925
31944
|
throw new Error(`dapp contract ${xt} is not authorized to user decrypt handle ${dt}!`);
|
|
31926
|
-
if (
|
|
31927
|
-
throw new Error(`userAddress ${
|
|
31945
|
+
if (B === xt)
|
|
31946
|
+
throw new Error(`userAddress ${B} should not be equal to contractAddress when requesting user decryption!`);
|
|
31928
31947
|
}), L = y.length;
|
|
31929
31948
|
if (L === 0)
|
|
31930
31949
|
throw Error("contractAddresses is empty");
|
|
@@ -31933,7 +31952,7 @@ const lA = (n, t, e, r, i, o, a, u) => async (_, l, f, w, y, z, F, k) => {
|
|
|
31933
31952
|
await Promise.all(N).catch((dt) => {
|
|
31934
31953
|
throw dt;
|
|
31935
31954
|
});
|
|
31936
|
-
const
|
|
31955
|
+
const $ = {
|
|
31937
31956
|
handleContractPairs: O,
|
|
31938
31957
|
requestValidity: {
|
|
31939
31958
|
startTimestamp: F.toString(),
|
|
@@ -31944,13 +31963,13 @@ const lA = (n, t, e, r, i, o, a, u) => async (_, l, f, w, y, z, F, k) => {
|
|
|
31944
31963
|
contractsChainId: e.toString(),
|
|
31945
31964
|
// Convert to string
|
|
31946
31965
|
contractAddresses: y.map((dt) => Ro(dt)),
|
|
31947
|
-
userAddress: Ro(
|
|
31966
|
+
userAddress: Ro(B),
|
|
31948
31967
|
signature: S,
|
|
31949
|
-
publicKey:
|
|
31968
|
+
publicKey: z,
|
|
31950
31969
|
extraData: T
|
|
31951
|
-
}, nt = await d_("USER_DECRYPT", `${o}/v1/user-decrypt`,
|
|
31970
|
+
}, nt = await d_("USER_DECRYPT", `${o}/v1/user-decrypt`, $, u);
|
|
31952
31971
|
let ut = n.map((dt, xt) => TKMS.new_server_id_addr(xt + 1, dt));
|
|
31953
|
-
const D = TKMS.new_client(ut,
|
|
31972
|
+
const D = TKMS.new_client(ut, B, "default");
|
|
31954
31973
|
try {
|
|
31955
31974
|
const dt = new ArrayBuffer(32);
|
|
31956
31975
|
new DataView(dt).setUint32(28, t, !1);
|
|
@@ -31962,8 +31981,8 @@ const lA = (n, t, e, r, i, o, a, u) => async (_, l, f, w, y, z, F, k) => {
|
|
|
31962
31981
|
salt: null
|
|
31963
31982
|
}, Et = {
|
|
31964
31983
|
signature: S,
|
|
31965
|
-
client_address:
|
|
31966
|
-
enc_key:
|
|
31984
|
+
client_address: B,
|
|
31985
|
+
enc_key: z,
|
|
31967
31986
|
ciphertext_handles: O.map((Ct) => Ct.handle.replace(/^0x/, "")),
|
|
31968
31987
|
eip712_verifying_contract: r
|
|
31969
31988
|
}, vt = TKMS.process_user_decryption_resp_from_js(D, Et, ht, nt.response, A, x, !0).map((Ct) => xo(Ct.bytes));
|
|
@@ -31987,7 +32006,7 @@ const lA = (n, t, e, r, i, o, a, u) => async (_, l, f, w, y, z, F, k) => {
|
|
|
31987
32006
|
const a = e, u = [], _ = TFHE.CompactCiphertextList.builder(a);
|
|
31988
32007
|
let l = new Uint8Array();
|
|
31989
32008
|
const f = (w) => {
|
|
31990
|
-
if (u.reduce((y,
|
|
32009
|
+
if (u.reduce((y, B) => y + Math.max(2, B), 0) + w > 2048)
|
|
31991
32010
|
throw Error("Packing more than 2048 bits in a single input ciphertext is unsupported");
|
|
31992
32011
|
if (u.length + 1 > 256)
|
|
31993
32012
|
throw Error("Packing more than 256 variables in a single input ciphertext is unsupported");
|
|
@@ -32048,12 +32067,12 @@ const lA = (n, t, e, r, i, o, a, u) => async (_, l, f, w, y, z, F, k) => {
|
|
|
32048
32067
|
},
|
|
32049
32068
|
encrypt() {
|
|
32050
32069
|
const y = (() => {
|
|
32051
|
-
const
|
|
32070
|
+
const z = (L) => Object.keys(L), O = u.reduce((L, $) => L + $, 0), C = z(r), N = C.find((L) => Number(L) >= O);
|
|
32052
32071
|
if (!N)
|
|
32053
32072
|
throw new Error(`Too many bits in provided values. Maximum is ${C[C.length - 1]}.`);
|
|
32054
32073
|
return N;
|
|
32055
|
-
})(),
|
|
32056
|
-
return x.set(F, 0), x.set(k, 20), x.set(T, 40), x.set(A, x.length - A.length), l = _.build_with_proof_packed(
|
|
32074
|
+
})(), B = r[y].publicParams, F = He(i), k = He(o), T = He(n), A = He(t.toString(16).padStart(64, "0")), x = new Uint8Array(F.length + k.length + T.length + 32);
|
|
32075
|
+
return x.set(F, 0), x.set(k, 20), x.set(T, 40), x.set(A, x.length - A.length), l = _.build_with_proof_packed(B, x, TFHE.ZkComputeLoad.Verify).safe_serialize(Y2), l;
|
|
32057
32076
|
}
|
|
32058
32077
|
};
|
|
32059
32078
|
}, pA = {
|
|
@@ -32070,9 +32089,9 @@ const lA = (n, t, e, r, i, o, a, u) => async (_, l, f, w, y, z, F, k) => {
|
|
|
32070
32089
|
1024: 10,
|
|
32071
32090
|
2048: 11
|
|
32072
32091
|
}, wA = BigInt("18446744073709551615"), dA = (n, t, e, r, i) => {
|
|
32073
|
-
const o = rh("keccak256").update(
|
|
32092
|
+
const o = rh("keccak256").update(Xe.from(n)).digest(), a = Xe.from(He(e)), u = r.toString(16).padStart(64, "0"), _ = Xe.from(u, "hex");
|
|
32074
32093
|
return t.map((f, w) => {
|
|
32075
|
-
const y = pA[f],
|
|
32094
|
+
const y = pA[f], B = Xe.from([w]), F = rh("keccak256").update(o).update(B).update(a).update(_).digest(), k = new Uint8Array(32);
|
|
32076
32095
|
if (k.set(F, 0), BigInt(r) > wA)
|
|
32077
32096
|
throw new Error("ChainId exceeds maximum allowed value (8 bytes)");
|
|
32078
32097
|
const T = He(u).slice(24, 32);
|
|
@@ -32140,12 +32159,12 @@ const mA = (n, t, e, r, i, o, a, u, _) => (l, f) => {
|
|
|
32140
32159
|
return w.getBits();
|
|
32141
32160
|
},
|
|
32142
32161
|
encrypt: async (y) => {
|
|
32143
|
-
const
|
|
32162
|
+
const B = "0x00", F = w.getBits(), k = w.encrypt(), T = {
|
|
32144
32163
|
contractAddress: nw(l),
|
|
32145
32164
|
userAddress: nw(f),
|
|
32146
32165
|
ciphertextWithInputVerification: _r(k),
|
|
32147
32166
|
contractChainId: "0x" + e.toString(16),
|
|
32148
|
-
extraData:
|
|
32167
|
+
extraData: B
|
|
32149
32168
|
}, A = await d_("INPUT_PROOF", `${i}/v1/input-proof`, T, y);
|
|
32150
32169
|
bA(A) || Z2("INPUT_PROOF", A);
|
|
32151
32170
|
const x = dA(k, F, n, e, gA());
|
|
@@ -32159,7 +32178,7 @@ const mA = (n, t, e, r, i, o, a, u, _) => (l, f) => {
|
|
|
32159
32178
|
throw new Error(`Incorrect Handle ${D}: (expected) ${at} != ${ht} (received)`);
|
|
32160
32179
|
}
|
|
32161
32180
|
}
|
|
32162
|
-
const S = A.response.signatures,
|
|
32181
|
+
const S = A.response.signatures, z = {
|
|
32163
32182
|
name: "InputVerification",
|
|
32164
32183
|
version: "1",
|
|
32165
32184
|
chainId: r,
|
|
@@ -32174,19 +32193,19 @@ const mA = (n, t, e, r, i, o, a, u, _) => (l, f) => {
|
|
|
32174
32193
|
]
|
|
32175
32194
|
}, C = S.map((ut) => {
|
|
32176
32195
|
const D = ut.startsWith("0x") ? ut : `0x${ut}`;
|
|
32177
|
-
return Rd(
|
|
32196
|
+
return Rd(z, O, {
|
|
32178
32197
|
ctHandles: x,
|
|
32179
32198
|
userAddress: f,
|
|
32180
32199
|
contractAddress: l,
|
|
32181
32200
|
contractChainId: e,
|
|
32182
|
-
extraData:
|
|
32201
|
+
extraData: B
|
|
32183
32202
|
}, D);
|
|
32184
32203
|
});
|
|
32185
32204
|
if (!yA(u, C, _))
|
|
32186
32205
|
throw Error("Coprocessor signers threshold is not reached");
|
|
32187
32206
|
let L = Xp(x.length);
|
|
32188
|
-
const
|
|
32189
|
-
return L += Xp(
|
|
32207
|
+
const $ = S.length;
|
|
32208
|
+
return L += Xp($), x.map((ut) => _r(ut)).map((ut) => L += ut), S.map((ut) => L += ut.slice(2)), L += B.slice(2), {
|
|
32190
32209
|
handles: x,
|
|
32191
32210
|
inputProof: He(L)
|
|
32192
32211
|
};
|
|
@@ -32231,23 +32250,23 @@ function xA(n, t) {
|
|
|
32231
32250
|
return n.forEach((l, f) => _[l] = u[f]), _;
|
|
32232
32251
|
}
|
|
32233
32252
|
const RA = (n, t, e, r, i, o, a, u) => async (_) => {
|
|
32234
|
-
const l = "0x00", f = new
|
|
32253
|
+
const l = "0x00", f = new tr(i, AA, a);
|
|
32235
32254
|
let w;
|
|
32236
32255
|
try {
|
|
32237
|
-
w = await Promise.all(_.map(async (
|
|
32238
|
-
const
|
|
32239
|
-
if (!await f.isAllowedForDecryption(
|
|
32240
|
-
throw new Error(`Handle ${
|
|
32241
|
-
return
|
|
32256
|
+
w = await Promise.all(_.map(async (N) => {
|
|
32257
|
+
const L = _r(typeof N == "string" ? He(N) : N, !0);
|
|
32258
|
+
if (!await f.isAllowedForDecryption(L))
|
|
32259
|
+
throw new Error(`Handle ${L} is not allowed for public decryption!`);
|
|
32260
|
+
return L;
|
|
32242
32261
|
}));
|
|
32243
|
-
} catch (
|
|
32244
|
-
throw
|
|
32262
|
+
} catch (N) {
|
|
32263
|
+
throw N;
|
|
32245
32264
|
}
|
|
32246
32265
|
Mg(w);
|
|
32247
32266
|
const y = {
|
|
32248
32267
|
ciphertextHandles: w,
|
|
32249
32268
|
extraData: l
|
|
32250
|
-
},
|
|
32269
|
+
}, B = await d_("PUBLIC_DECRYPT", `${o}/v1/public-decrypt`, y, u), F = {
|
|
32251
32270
|
name: "Decryption",
|
|
32252
32271
|
version: "1",
|
|
32253
32272
|
chainId: e,
|
|
@@ -32258,11 +32277,11 @@ const RA = (n, t, e, r, i, o, a, u) => async (_) => {
|
|
|
32258
32277
|
{ name: "decryptedResult", type: "bytes" },
|
|
32259
32278
|
{ name: "extraData", type: "bytes" }
|
|
32260
32279
|
]
|
|
32261
|
-
}, T =
|
|
32262
|
-
const
|
|
32263
|
-
return Rd(F, k, { ctHandles: w, decryptedResult: A, extraData:
|
|
32280
|
+
}, T = B.response[0], A = T.decrypted_value.startsWith("0x") ? T.decrypted_value : `0x${T.decrypted_value}`, x = T.signatures, S = "0x", z = x.map((N) => {
|
|
32281
|
+
const L = N.startsWith("0x") ? N : `0x${N}`;
|
|
32282
|
+
return Rd(F, k, { ctHandles: w, decryptedResult: A, extraData: S }, L);
|
|
32264
32283
|
});
|
|
32265
|
-
if (!EA(n,
|
|
32284
|
+
if (!EA(n, z, t))
|
|
32266
32285
|
throw Error("KMS signers threshold is not reached");
|
|
32267
32286
|
return xA(w, A);
|
|
32268
32287
|
}, zA = (n, t) => (e, r, i, o, a) => {
|
|
@@ -32271,7 +32290,7 @@ const RA = (n, t, e, r, i, o, a, u) => async (_) => {
|
|
|
32271
32290
|
throw new Error("Invalid delegated account.");
|
|
32272
32291
|
if (!Ge(n))
|
|
32273
32292
|
throw new Error("Invalid verifying contract address.");
|
|
32274
|
-
if (!r.every((
|
|
32293
|
+
if (!r.every((B) => Ge(B)))
|
|
32275
32294
|
throw new Error("Invalid contract address.");
|
|
32276
32295
|
const _ = typeof e == "string" ? e.startsWith("0x") ? e : `0x${e}` : e, l = typeof i == "number" ? i.toString() : i, f = typeof o == "number" ? o.toString() : o, w = [
|
|
32277
32296
|
{ name: "name", type: "string" },
|
|
@@ -32376,9 +32395,9 @@ const OA = {
|
|
|
32376
32395
|
const u = tA(n);
|
|
32377
32396
|
if (!u)
|
|
32378
32397
|
throw new Error("No network has been provided!");
|
|
32379
|
-
const _ = await eA(u, n), l = await rA(n), f = await nA(n), w = await iA(u, n), y = await sA(u, n),
|
|
32398
|
+
const _ = await eA(u, n), l = await rA(n), f = await nA(n), w = await iA(u, n), y = await sA(u, n), B = await oA(u, n), F = await aA(u, n);
|
|
32380
32399
|
return {
|
|
32381
|
-
createEncryptedInput: mA(o, e, _, a, Cs(n.relayerUrl), l.publicKey, f,
|
|
32400
|
+
createEncryptedInput: mA(o, e, _, a, Cs(n.relayerUrl), l.publicKey, f, B, F),
|
|
32382
32401
|
generateKeypair: BA,
|
|
32383
32402
|
createEIP712: zA(t, _),
|
|
32384
32403
|
publicDecrypt: RA(w, y, a, t, o, Cs(n.relayerUrl), u),
|
|
@@ -32403,8 +32422,8 @@ window.TFHE = {
|
|
|
32403
32422
|
default: ro,
|
|
32404
32423
|
initThreadPool: __,
|
|
32405
32424
|
init_panic_hook: u_,
|
|
32406
|
-
TfheCompactPublicKey:
|
|
32407
|
-
CompactPkeCrs:
|
|
32425
|
+
TfheCompactPublicKey: Ze,
|
|
32426
|
+
CompactPkeCrs: $e,
|
|
32408
32427
|
CompactCiphertextList: ui,
|
|
32409
32428
|
ZkComputeLoad: Bg
|
|
32410
32429
|
};
|