@btc-vision/transaction 1.7.25 → 1.7.27

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.
@@ -1,93 +1,93 @@
1
- const ct = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
2
- function le(t) {
1
+ const ft = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
2
+ function Ae(t) {
3
3
  return t instanceof Uint8Array || ArrayBuffer.isView(t) && t.constructor.name === "Uint8Array";
4
4
  }
5
- function Bt(t) {
5
+ function Ht(t) {
6
6
  if (!Number.isSafeInteger(t) || t < 0)
7
7
  throw new Error("positive integer expected, got " + t);
8
8
  }
9
9
  function ht(t, ...e) {
10
- if (!le(t))
10
+ if (!Ae(t))
11
11
  throw new Error("Uint8Array expected");
12
12
  if (e.length > 0 && !e.includes(t.length))
13
13
  throw new Error("Uint8Array expected of length " + e + ", got length=" + t.length);
14
14
  }
15
- function be(t) {
15
+ function $t(t) {
16
16
  if (typeof t != "function" || typeof t.create != "function")
17
17
  throw new Error("Hash should be wrapped by utils.createHasher");
18
- Bt(t.outputLen), Bt(t.blockLen);
18
+ Ht(t.outputLen), Ht(t.blockLen);
19
19
  }
20
- function pt(t, e = !0) {
20
+ function St(t, e = !0) {
21
21
  if (t.destroyed)
22
22
  throw new Error("Hash instance has been destroyed");
23
23
  if (e && t.finished)
24
24
  throw new Error("Hash#digest() has already been called");
25
25
  }
26
- function xe(t, e) {
26
+ function ye(t, e) {
27
27
  ht(t);
28
28
  const s = e.outputLen;
29
29
  if (t.length < s)
30
30
  throw new Error("digestInto() expects output buffer of length at least " + s);
31
31
  }
32
- function nt(...t) {
32
+ function ct(...t) {
33
33
  for (let e = 0; e < t.length; e++)
34
34
  t[e].fill(0);
35
35
  }
36
- function yt(t) {
36
+ function wt(t) {
37
37
  return new DataView(t.buffer, t.byteOffset, t.byteLength);
38
38
  }
39
- function Y(t, e) {
39
+ function Z(t, e) {
40
40
  return t << 32 - e | t >>> e;
41
41
  }
42
- function it(t, e) {
43
- return t << e | t >>> 32 - e >>> 0;
44
- }
45
- const Xt = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", pe = /* @__PURE__ */ Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, "0"));
46
- function rs(t) {
47
- if (ht(t), Xt)
42
+ const te = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", ge = /* @__PURE__ */ Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, "0"));
43
+ function ls(t) {
44
+ if (ht(t), te)
48
45
  return t.toHex();
49
46
  let e = "";
50
47
  for (let s = 0; s < t.length; s++)
51
- e += pe[t[s]];
48
+ e += ge[t[s]];
52
49
  return e;
53
50
  }
54
- const Z = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
55
- function Ut(t) {
56
- if (t >= Z._0 && t <= Z._9)
57
- return t - Z._0;
58
- if (t >= Z.A && t <= Z.F)
59
- return t - (Z.A - 10);
60
- if (t >= Z.a && t <= Z.f)
61
- return t - (Z.a - 10);
51
+ const z = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
52
+ function Vt(t) {
53
+ if (t >= z._0 && t <= z._9)
54
+ return t - z._0;
55
+ if (t >= z.A && t <= z.F)
56
+ return t - (z.A - 10);
57
+ if (t >= z.a && t <= z.f)
58
+ return t - (z.a - 10);
62
59
  }
63
- function is(t) {
60
+ function bs(t) {
64
61
  if (typeof t != "string")
65
62
  throw new Error("hex string expected, got " + typeof t);
66
- if (Xt)
63
+ if (te)
67
64
  return Uint8Array.fromHex(t);
68
65
  const e = t.length, s = e / 2;
69
66
  if (e % 2)
70
67
  throw new Error("hex string expected, got unpadded hex of length " + e);
71
68
  const i = new Uint8Array(s);
72
- for (let o = 0, n = 0; o < s; o++, n += 2) {
73
- const r = Ut(t.charCodeAt(n)), h = Ut(t.charCodeAt(n + 1));
74
- if (r === void 0 || h === void 0) {
75
- const d = t[n] + t[n + 1];
76
- throw new Error('hex string expected, got non-hex character "' + d + '" at index ' + n);
69
+ for (let o = 0, r = 0; o < s; o++, r += 2) {
70
+ const n = Vt(t.charCodeAt(r)), h = Vt(t.charCodeAt(r + 1));
71
+ if (n === void 0 || h === void 0) {
72
+ const b = t[r] + t[r + 1];
73
+ throw new Error('hex string expected, got non-hex character "' + b + '" at index ' + r);
77
74
  }
78
- i[o] = r * 16 + h;
75
+ i[o] = n * 16 + h;
79
76
  }
80
77
  return i;
81
78
  }
82
- function He(t) {
79
+ function ee(t) {
83
80
  if (typeof t != "string")
84
81
  throw new Error("string expected");
85
82
  return new Uint8Array(new TextEncoder().encode(t));
86
83
  }
87
- function wt(t) {
88
- return typeof t == "string" && (t = He(t)), ht(t), t;
84
+ function Ut(t) {
85
+ return typeof t == "string" && (t = ee(t)), ht(t), t;
89
86
  }
90
- function os(...t) {
87
+ function Ct(t) {
88
+ return typeof t == "string" && (t = ee(t)), ht(t), t;
89
+ }
90
+ function xs(...t) {
91
91
  let e = 0;
92
92
  for (let i = 0; i < t.length; i++) {
93
93
  const o = t[i];
@@ -95,71 +95,76 @@ function os(...t) {
95
95
  }
96
96
  const s = new Uint8Array(e);
97
97
  for (let i = 0, o = 0; i < t.length; i++) {
98
- const n = t[i];
99
- s.set(n, o), o += n.length;
98
+ const r = t[i];
99
+ s.set(r, o), o += r.length;
100
100
  }
101
101
  return s;
102
102
  }
103
- class Jt {
103
+ function _e(t, e) {
104
+ if (e !== void 0 && {}.toString.call(e) !== "[object Object]")
105
+ throw new Error("options should be object or undefined");
106
+ return Object.assign(t, e);
107
+ }
108
+ class se {
104
109
  }
105
- function St(t) {
106
- const e = (i) => t().update(wt(i)).digest(), s = t();
110
+ function ne(t) {
111
+ const e = (i) => t().update(Ut(i)).digest(), s = t();
107
112
  return e.outputLen = s.outputLen, e.blockLen = s.blockLen, e.create = () => t(), e;
108
113
  }
109
- function cs(t = 32) {
110
- if (ct && typeof ct.getRandomValues == "function")
111
- return ct.getRandomValues(new Uint8Array(t));
112
- if (ct && typeof ct.randomBytes == "function")
113
- return Uint8Array.from(ct.randomBytes(t));
114
+ function Hs(t = 32) {
115
+ if (ft && typeof ft.getRandomValues == "function")
116
+ return ft.getRandomValues(new Uint8Array(t));
117
+ if (ft && typeof ft.randomBytes == "function")
118
+ return Uint8Array.from(ft.randomBytes(t));
114
119
  throw new Error("crypto.getRandomValues must be defined");
115
120
  }
116
- function Ae(t, e, s, i) {
121
+ function we(t, e, s, i) {
117
122
  if (typeof t.setBigUint64 == "function")
118
123
  return t.setBigUint64(e, s, i);
119
- const o = BigInt(32), n = BigInt(4294967295), r = Number(s >> o & n), h = Number(s & n), d = i ? 4 : 0, x = i ? 0 : 4;
120
- t.setUint32(e + d, r, i), t.setUint32(e + x, h, i);
124
+ const o = BigInt(32), r = BigInt(4294967295), n = Number(s >> o & r), h = Number(s & r), b = i ? 4 : 0, x = i ? 0 : 4;
125
+ t.setUint32(e + b, n, i), t.setUint32(e + x, h, i);
121
126
  }
122
- function Qt(t, e, s) {
127
+ function Se(t, e, s) {
123
128
  return t & e ^ ~t & s;
124
129
  }
125
- function Yt(t, e, s) {
130
+ function Ie(t, e, s) {
126
131
  return t & e ^ t & s ^ e & s;
127
132
  }
128
- class It extends Jt {
133
+ class re extends se {
129
134
  constructor(e, s, i, o) {
130
- super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = e, this.outputLen = s, this.padOffset = i, this.isLE = o, this.buffer = new Uint8Array(e), this.view = yt(this.buffer);
135
+ super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = e, this.outputLen = s, this.padOffset = i, this.isLE = o, this.buffer = new Uint8Array(e), this.view = wt(this.buffer);
131
136
  }
132
137
  update(e) {
133
- pt(this), e = wt(e), ht(e);
134
- const { view: s, buffer: i, blockLen: o } = this, n = e.length;
135
- for (let r = 0; r < n; ) {
136
- const h = Math.min(o - this.pos, n - r);
138
+ St(this), e = Ut(e), ht(e);
139
+ const { view: s, buffer: i, blockLen: o } = this, r = e.length;
140
+ for (let n = 0; n < r; ) {
141
+ const h = Math.min(o - this.pos, r - n);
137
142
  if (h === o) {
138
- const d = yt(e);
139
- for (; o <= n - r; r += o)
140
- this.process(d, r);
143
+ const b = wt(e);
144
+ for (; o <= r - n; n += o)
145
+ this.process(b, n);
141
146
  continue;
142
147
  }
143
- i.set(e.subarray(r, r + h), this.pos), this.pos += h, r += h, this.pos === o && (this.process(s, 0), this.pos = 0);
148
+ i.set(e.subarray(n, n + h), this.pos), this.pos += h, n += h, this.pos === o && (this.process(s, 0), this.pos = 0);
144
149
  }
145
150
  return this.length += e.length, this.roundClean(), this;
146
151
  }
147
152
  digestInto(e) {
148
- pt(this), xe(e, this), this.finished = !0;
149
- const { buffer: s, view: i, blockLen: o, isLE: n } = this;
150
- let { pos: r } = this;
151
- s[r++] = 128, nt(this.buffer.subarray(r)), this.padOffset > o - r && (this.process(i, 0), r = 0);
152
- for (let b = r; b < o; b++)
153
- s[b] = 0;
154
- Ae(i, o - 8, BigInt(this.length * 8), n), this.process(i, 0);
155
- const h = yt(e), d = this.outputLen;
156
- if (d % 4)
153
+ St(this), ye(e, this), this.finished = !0;
154
+ const { buffer: s, view: i, blockLen: o, isLE: r } = this;
155
+ let { pos: n } = this;
156
+ s[n++] = 128, ct(this.buffer.subarray(n)), this.padOffset > o - n && (this.process(i, 0), n = 0);
157
+ for (let u = n; u < o; u++)
158
+ s[u] = 0;
159
+ we(i, o - 8, BigInt(this.length * 8), r), this.process(i, 0);
160
+ const h = wt(e), b = this.outputLen;
161
+ if (b % 4)
157
162
  throw new Error("_sha2: outputLen should be aligned to 32bit");
158
- const x = d / 4, p = this.get();
159
- if (x > p.length)
163
+ const x = b / 4, H = this.get();
164
+ if (x > H.length)
160
165
  throw new Error("_sha2: outputLen bigger than state");
161
- for (let b = 0; b < x; b++)
162
- h.setUint32(4 * b, p[b], n);
166
+ for (let u = 0; u < x; u++)
167
+ h.setUint32(4 * u, H[u], r);
163
168
  }
164
169
  digest() {
165
170
  const { buffer: e, outputLen: s } = this;
@@ -169,14 +174,14 @@ class It extends Jt {
169
174
  }
170
175
  _cloneInto(e) {
171
176
  e || (e = new this.constructor()), e.set(...this.get());
172
- const { blockLen: s, buffer: i, length: o, finished: n, destroyed: r, pos: h } = this;
173
- return e.destroyed = r, e.finished = n, e.length = o, e.pos = h, o % s && e.buffer.set(i), e;
177
+ const { blockLen: s, buffer: i, length: o, finished: r, destroyed: n, pos: h } = this;
178
+ return e.destroyed = n, e.finished = r, e.length = o, e.pos = h, o % s && e.buffer.set(i), e;
174
179
  }
175
180
  clone() {
176
181
  return this._cloneInto();
177
182
  }
178
183
  }
179
- const tt = /* @__PURE__ */ Uint32Array.from([
184
+ const st = /* @__PURE__ */ Uint32Array.from([
180
185
  1779033703,
181
186
  3144134277,
182
187
  1013904242,
@@ -185,7 +190,42 @@ const tt = /* @__PURE__ */ Uint32Array.from([
185
190
  2600822924,
186
191
  528734635,
187
192
  1541459225
188
- ]), ye = /* @__PURE__ */ Uint32Array.from([
193
+ ]), q = /* @__PURE__ */ Uint32Array.from([
194
+ 1779033703,
195
+ 4089235720,
196
+ 3144134277,
197
+ 2227873595,
198
+ 1013904242,
199
+ 4271175723,
200
+ 2773480762,
201
+ 1595750129,
202
+ 1359893119,
203
+ 2917565137,
204
+ 2600822924,
205
+ 725511199,
206
+ 528734635,
207
+ 4215389547,
208
+ 1541459225,
209
+ 327033209
210
+ ]), At = /* @__PURE__ */ BigInt(2 ** 32 - 1), Dt = /* @__PURE__ */ BigInt(32);
211
+ function Le(t, e = !1) {
212
+ return e ? { h: Number(t & At), l: Number(t >> Dt & At) } : { h: Number(t >> Dt & At) | 0, l: Number(t & At) | 0 };
213
+ }
214
+ function Be(t, e = !1) {
215
+ const s = t.length;
216
+ let i = new Uint32Array(s), o = new Uint32Array(s);
217
+ for (let r = 0; r < s; r++) {
218
+ const { h: n, l: h } = Le(t[r], e);
219
+ [i[r], o[r]] = [n, h];
220
+ }
221
+ return [i, o];
222
+ }
223
+ const Ot = (t, e, s) => t >>> s, Ft = (t, e, s) => t << 32 - s | e >>> s, dt = (t, e, s) => t >>> s | e << 32 - s, ut = (t, e, s) => t << 32 - s | e >>> s, yt = (t, e, s) => t << 64 - s | e >>> s - 32, gt = (t, e, s) => t >>> s - 32 | e << 64 - s;
224
+ function $(t, e, s, i) {
225
+ const o = (e >>> 0) + (i >>> 0);
226
+ return { h: t + s + (o / 2 ** 32 | 0) | 0, l: o | 0 };
227
+ }
228
+ const me = (t, e, s) => (t >>> 0) + (e >>> 0) + (s >>> 0), Ue = (t, e, s, i) => e + s + i + (t / 2 ** 32 | 0) | 0, Ee = (t, e, s, i) => (t >>> 0) + (e >>> 0) + (s >>> 0) + (i >>> 0), ke = (t, e, s, i, o) => e + s + i + o + (t / 2 ** 32 | 0) | 0, Ve = (t, e, s, i, o) => (t >>> 0) + (e >>> 0) + (s >>> 0) + (i >>> 0) + (o >>> 0), Ce = (t, e, s, i, o, r) => e + s + i + o + r + (t / 2 ** 32 | 0) | 0, De = /* @__PURE__ */ Uint32Array.from([
189
229
  1116352408,
190
230
  1899447441,
191
231
  3049323471,
@@ -250,170 +290,168 @@ const tt = /* @__PURE__ */ Uint32Array.from([
250
290
  2756734187,
251
291
  3204031479,
252
292
  3329325298
253
- ]), et = /* @__PURE__ */ new Uint32Array(64);
254
- class ge extends It {
293
+ ]), nt = /* @__PURE__ */ new Uint32Array(64);
294
+ class Oe extends re {
255
295
  constructor(e = 32) {
256
- super(64, e, 8, !1), this.A = tt[0] | 0, this.B = tt[1] | 0, this.C = tt[2] | 0, this.D = tt[3] | 0, this.E = tt[4] | 0, this.F = tt[5] | 0, this.G = tt[6] | 0, this.H = tt[7] | 0;
296
+ super(64, e, 8, !1), this.A = st[0] | 0, this.B = st[1] | 0, this.C = st[2] | 0, this.D = st[3] | 0, this.E = st[4] | 0, this.F = st[5] | 0, this.G = st[6] | 0, this.H = st[7] | 0;
257
297
  }
258
298
  get() {
259
- const { A: e, B: s, C: i, D: o, E: n, F: r, G: h, H: d } = this;
260
- return [e, s, i, o, n, r, h, d];
299
+ const { A: e, B: s, C: i, D: o, E: r, F: n, G: h, H: b } = this;
300
+ return [e, s, i, o, r, n, h, b];
261
301
  }
262
302
  // prettier-ignore
263
- set(e, s, i, o, n, r, h, d) {
264
- this.A = e | 0, this.B = s | 0, this.C = i | 0, this.D = o | 0, this.E = n | 0, this.F = r | 0, this.G = h | 0, this.H = d | 0;
303
+ set(e, s, i, o, r, n, h, b) {
304
+ this.A = e | 0, this.B = s | 0, this.C = i | 0, this.D = o | 0, this.E = r | 0, this.F = n | 0, this.G = h | 0, this.H = b | 0;
265
305
  }
266
306
  process(e, s) {
267
- for (let b = 0; b < 16; b++, s += 4)
268
- et[b] = e.getUint32(s, !1);
269
- for (let b = 16; b < 64; b++) {
270
- const U = et[b - 15], w = et[b - 2], m = Y(U, 7) ^ Y(U, 18) ^ U >>> 3, k = Y(w, 17) ^ Y(w, 19) ^ w >>> 10;
271
- et[b] = k + et[b - 7] + m + et[b - 16] | 0;
307
+ for (let u = 0; u < 16; u++, s += 4)
308
+ nt[u] = e.getUint32(s, !1);
309
+ for (let u = 16; u < 64; u++) {
310
+ const A = nt[u - 15], m = nt[u - 2], w = Z(A, 7) ^ Z(A, 18) ^ A >>> 3, I = Z(m, 17) ^ Z(m, 19) ^ m >>> 10;
311
+ nt[u] = I + nt[u - 7] + w + nt[u - 16] | 0;
272
312
  }
273
- let { A: i, B: o, C: n, D: r, E: h, F: d, G: x, H: p } = this;
274
- for (let b = 0; b < 64; b++) {
275
- const U = Y(h, 6) ^ Y(h, 11) ^ Y(h, 25), w = p + U + Qt(h, d, x) + ye[b] + et[b] | 0, k = (Y(i, 2) ^ Y(i, 13) ^ Y(i, 22)) + Yt(i, o, n) | 0;
276
- p = x, x = d, d = h, h = r + w | 0, r = n, n = o, o = i, i = w + k | 0;
313
+ let { A: i, B: o, C: r, D: n, E: h, F: b, G: x, H } = this;
314
+ for (let u = 0; u < 64; u++) {
315
+ const A = Z(h, 6) ^ Z(h, 11) ^ Z(h, 25), m = H + A + Se(h, b, x) + De[u] + nt[u] | 0, I = (Z(i, 2) ^ Z(i, 13) ^ Z(i, 22)) + Ie(i, o, r) | 0;
316
+ H = x, x = b, b = h, h = n + m | 0, n = r, r = o, o = i, i = m + I | 0;
277
317
  }
278
- i = i + this.A | 0, o = o + this.B | 0, n = n + this.C | 0, r = r + this.D | 0, h = h + this.E | 0, d = d + this.F | 0, x = x + this.G | 0, p = p + this.H | 0, this.set(i, o, n, r, h, d, x, p);
318
+ i = i + this.A | 0, o = o + this.B | 0, r = r + this.C | 0, n = n + this.D | 0, h = h + this.E | 0, b = b + this.F | 0, x = x + this.G | 0, H = H + this.H | 0, this.set(i, o, r, n, h, b, x, H);
279
319
  }
280
320
  roundClean() {
281
- nt(et);
321
+ ct(nt);
282
322
  }
283
323
  destroy() {
284
- this.set(0, 0, 0, 0, 0, 0, 0, 0), nt(this.buffer);
324
+ this.set(0, 0, 0, 0, 0, 0, 0, 0), ct(this.buffer);
285
325
  }
286
326
  }
287
- const _e = /* @__PURE__ */ St(() => new ge()), hs = _e, at = /* @__PURE__ */ Uint32Array.from([
288
- 1732584193,
289
- 4023233417,
290
- 2562383102,
291
- 271733878,
292
- 3285377520
293
- ]), st = /* @__PURE__ */ new Uint32Array(80);
294
- class we extends It {
295
- constructor() {
296
- super(64, 20, 8, !1), this.A = at[0] | 0, this.B = at[1] | 0, this.C = at[2] | 0, this.D = at[3] | 0, this.E = at[4] | 0;
297
- }
298
- get() {
299
- const { A: e, B: s, C: i, D: o, E: n } = this;
300
- return [e, s, i, o, n];
301
- }
302
- set(e, s, i, o, n) {
303
- this.A = e | 0, this.B = s | 0, this.C = i | 0, this.D = o | 0, this.E = n | 0;
304
- }
305
- process(e, s) {
306
- for (let d = 0; d < 16; d++, s += 4)
307
- st[d] = e.getUint32(s, !1);
308
- for (let d = 16; d < 80; d++)
309
- st[d] = it(st[d - 3] ^ st[d - 8] ^ st[d - 14] ^ st[d - 16], 1);
310
- let { A: i, B: o, C: n, D: r, E: h } = this;
311
- for (let d = 0; d < 80; d++) {
312
- let x, p;
313
- d < 20 ? (x = Qt(o, n, r), p = 1518500249) : d < 40 ? (x = o ^ n ^ r, p = 1859775393) : d < 60 ? (x = Yt(o, n, r), p = 2400959708) : (x = o ^ n ^ r, p = 3395469782);
314
- const b = it(i, 5) + x + h + p + st[d] | 0;
315
- h = r, r = n, n = it(o, 30), o = i, i = b;
316
- }
317
- i = i + this.A | 0, o = o + this.B | 0, n = n + this.C | 0, r = r + this.D | 0, h = h + this.E | 0, this.set(i, o, n, r, h);
318
- }
319
- roundClean() {
320
- nt(st);
321
- }
322
- destroy() {
323
- this.set(0, 0, 0, 0, 0), nt(this.buffer);
324
- }
325
- }
326
- const Se = /* @__PURE__ */ St(() => new we()), Ie = /* @__PURE__ */ Uint8Array.from([
327
- 7,
328
- 4,
329
- 13,
330
- 1,
331
- 10,
332
- 6,
333
- 15,
334
- 3,
335
- 12,
336
- 0,
337
- 9,
338
- 5,
339
- 2,
340
- 14,
341
- 11,
342
- 8
343
- ]), Zt = Uint8Array.from(new Array(16).fill(0).map((t, e) => e)), Le = Zt.map((t) => (9 * t + 5) % 16), zt = /* @__PURE__ */ (() => {
344
- const s = [[Zt], [Le]];
345
- for (let i = 0; i < 4; i++)
346
- for (let o of s)
347
- o.push(o[i].map((n) => Ie[n]));
348
- return s;
349
- })(), $t = zt[0], te = zt[1], ee = /* @__PURE__ */ [
350
- [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],
351
- [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7],
352
- [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],
353
- [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],
354
- [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5]
355
- ].map((t) => Uint8Array.from(t)), me = /* @__PURE__ */ $t.map((t, e) => t.map((s) => ee[e][s])), Be = /* @__PURE__ */ te.map((t, e) => t.map((s) => ee[e][s])), Ue = /* @__PURE__ */ Uint32Array.from([
356
- 0,
357
- 1518500249,
358
- 1859775393,
359
- 2400959708,
360
- 2840853838
361
- ]), Ee = /* @__PURE__ */ Uint32Array.from([
362
- 1352829926,
363
- 1548603684,
364
- 1836072691,
365
- 2053994217,
366
- 0
367
- ]);
368
- function Et(t, e, s, i) {
369
- return t === 0 ? e ^ s ^ i : t === 1 ? e & s | ~e & i : t === 2 ? (e | ~s) ^ i : t === 3 ? e & i | s & ~i : e ^ (s | ~i);
370
- }
371
- const bt = /* @__PURE__ */ new Uint32Array(16);
372
- class ke extends It {
373
- constructor() {
374
- super(64, 20, 8, !0), this.h0 = 1732584193, this.h1 = -271733879, this.h2 = -1732584194, this.h3 = 271733878, this.h4 = -1009589776;
327
+ const ie = Be([
328
+ "0x428a2f98d728ae22",
329
+ "0x7137449123ef65cd",
330
+ "0xb5c0fbcfec4d3b2f",
331
+ "0xe9b5dba58189dbbc",
332
+ "0x3956c25bf348b538",
333
+ "0x59f111f1b605d019",
334
+ "0x923f82a4af194f9b",
335
+ "0xab1c5ed5da6d8118",
336
+ "0xd807aa98a3030242",
337
+ "0x12835b0145706fbe",
338
+ "0x243185be4ee4b28c",
339
+ "0x550c7dc3d5ffb4e2",
340
+ "0x72be5d74f27b896f",
341
+ "0x80deb1fe3b1696b1",
342
+ "0x9bdc06a725c71235",
343
+ "0xc19bf174cf692694",
344
+ "0xe49b69c19ef14ad2",
345
+ "0xefbe4786384f25e3",
346
+ "0x0fc19dc68b8cd5b5",
347
+ "0x240ca1cc77ac9c65",
348
+ "0x2de92c6f592b0275",
349
+ "0x4a7484aa6ea6e483",
350
+ "0x5cb0a9dcbd41fbd4",
351
+ "0x76f988da831153b5",
352
+ "0x983e5152ee66dfab",
353
+ "0xa831c66d2db43210",
354
+ "0xb00327c898fb213f",
355
+ "0xbf597fc7beef0ee4",
356
+ "0xc6e00bf33da88fc2",
357
+ "0xd5a79147930aa725",
358
+ "0x06ca6351e003826f",
359
+ "0x142929670a0e6e70",
360
+ "0x27b70a8546d22ffc",
361
+ "0x2e1b21385c26c926",
362
+ "0x4d2c6dfc5ac42aed",
363
+ "0x53380d139d95b3df",
364
+ "0x650a73548baf63de",
365
+ "0x766a0abb3c77b2a8",
366
+ "0x81c2c92e47edaee6",
367
+ "0x92722c851482353b",
368
+ "0xa2bfe8a14cf10364",
369
+ "0xa81a664bbc423001",
370
+ "0xc24b8b70d0f89791",
371
+ "0xc76c51a30654be30",
372
+ "0xd192e819d6ef5218",
373
+ "0xd69906245565a910",
374
+ "0xf40e35855771202a",
375
+ "0x106aa07032bbd1b8",
376
+ "0x19a4c116b8d2d0c8",
377
+ "0x1e376c085141ab53",
378
+ "0x2748774cdf8eeb99",
379
+ "0x34b0bcb5e19b48a8",
380
+ "0x391c0cb3c5c95a63",
381
+ "0x4ed8aa4ae3418acb",
382
+ "0x5b9cca4f7763e373",
383
+ "0x682e6ff3d6b2b8a3",
384
+ "0x748f82ee5defb2fc",
385
+ "0x78a5636f43172f60",
386
+ "0x84c87814a1f0ab72",
387
+ "0x8cc702081a6439ec",
388
+ "0x90befffa23631e28",
389
+ "0xa4506cebde82bde9",
390
+ "0xbef9a3f7b2c67915",
391
+ "0xc67178f2e372532b",
392
+ "0xca273eceea26619c",
393
+ "0xd186b8c721c0c207",
394
+ "0xeada7dd6cde0eb1e",
395
+ "0xf57d4f7fee6ed178",
396
+ "0x06f067aa72176fba",
397
+ "0x0a637dc5a2c898a6",
398
+ "0x113f9804bef90dae",
399
+ "0x1b710b35131c471b",
400
+ "0x28db77f523047d84",
401
+ "0x32caab7b40c72493",
402
+ "0x3c9ebe0a15c9bebc",
403
+ "0x431d67c49c100d4c",
404
+ "0x4cc5d4becb3e42b6",
405
+ "0x597f299cfc657e2a",
406
+ "0x5fcb6fab3ad6faec",
407
+ "0x6c44198c4a475817"
408
+ ].map((t) => BigInt(t))), Fe = ie[0], Te = ie[1], rt = /* @__PURE__ */ new Uint32Array(80), it = /* @__PURE__ */ new Uint32Array(80);
409
+ class Me extends re {
410
+ constructor(e = 64) {
411
+ super(128, e, 16, !1), this.Ah = q[0] | 0, this.Al = q[1] | 0, this.Bh = q[2] | 0, this.Bl = q[3] | 0, this.Ch = q[4] | 0, this.Cl = q[5] | 0, this.Dh = q[6] | 0, this.Dl = q[7] | 0, this.Eh = q[8] | 0, this.El = q[9] | 0, this.Fh = q[10] | 0, this.Fl = q[11] | 0, this.Gh = q[12] | 0, this.Gl = q[13] | 0, this.Hh = q[14] | 0, this.Hl = q[15] | 0;
375
412
  }
413
+ // prettier-ignore
376
414
  get() {
377
- const { h0: e, h1: s, h2: i, h3: o, h4: n } = this;
378
- return [e, s, i, o, n];
415
+ const { Ah: e, Al: s, Bh: i, Bl: o, Ch: r, Cl: n, Dh: h, Dl: b, Eh: x, El: H, Fh: u, Fl: A, Gh: m, Gl: w, Hh: I, Hl: C } = this;
416
+ return [e, s, i, o, r, n, h, b, x, H, u, A, m, w, I, C];
379
417
  }
380
- set(e, s, i, o, n) {
381
- this.h0 = e | 0, this.h1 = s | 0, this.h2 = i | 0, this.h3 = o | 0, this.h4 = n | 0;
418
+ // prettier-ignore
419
+ set(e, s, i, o, r, n, h, b, x, H, u, A, m, w, I, C) {
420
+ this.Ah = e | 0, this.Al = s | 0, this.Bh = i | 0, this.Bl = o | 0, this.Ch = r | 0, this.Cl = n | 0, this.Dh = h | 0, this.Dl = b | 0, this.Eh = x | 0, this.El = H | 0, this.Fh = u | 0, this.Fl = A | 0, this.Gh = m | 0, this.Gl = w | 0, this.Hh = I | 0, this.Hl = C | 0;
382
421
  }
383
422
  process(e, s) {
384
- for (let w = 0; w < 16; w++, s += 4)
385
- bt[w] = e.getUint32(s, !0);
386
- let i = this.h0 | 0, o = i, n = this.h1 | 0, r = n, h = this.h2 | 0, d = h, x = this.h3 | 0, p = x, b = this.h4 | 0, U = b;
387
- for (let w = 0; w < 5; w++) {
388
- const m = 4 - w, k = Ue[w], M = Ee[w], P = $t[w], R = te[w], V = me[w], T = Be[w];
389
- for (let g = 0; g < 16; g++) {
390
- const S = it(i + Et(w, n, h, x) + bt[P[g]] + k, V[g]) + b | 0;
391
- i = b, b = x, x = it(h, 10) | 0, h = n, n = S;
392
- }
393
- for (let g = 0; g < 16; g++) {
394
- const S = it(o + Et(m, r, d, p) + bt[R[g]] + M, T[g]) + U | 0;
395
- o = U, U = p, p = it(d, 10) | 0, d = r, r = S;
396
- }
423
+ for (let y = 0; y < 16; y++, s += 4)
424
+ rt[y] = e.getUint32(s), it[y] = e.getUint32(s += 4);
425
+ for (let y = 16; y < 80; y++) {
426
+ const O = rt[y - 15] | 0, L = it[y - 15] | 0, E = dt(O, L, 1) ^ dt(O, L, 8) ^ Ot(O, L, 7), D = ut(O, L, 1) ^ ut(O, L, 8) ^ Ft(O, L, 7), B = rt[y - 2] | 0, a = it[y - 2] | 0, d = dt(B, a, 19) ^ yt(B, a, 61) ^ Ot(B, a, 6), f = ut(B, a, 19) ^ gt(B, a, 61) ^ Ft(B, a, 6), p = Ee(D, f, it[y - 7], it[y - 16]), l = ke(p, E, d, rt[y - 7], rt[y - 16]);
427
+ rt[y] = l | 0, it[y] = p | 0;
428
+ }
429
+ let { Ah: i, Al: o, Bh: r, Bl: n, Ch: h, Cl: b, Dh: x, Dl: H, Eh: u, El: A, Fh: m, Fl: w, Gh: I, Gl: C, Hh: R, Hl: M } = this;
430
+ for (let y = 0; y < 80; y++) {
431
+ const O = dt(u, A, 14) ^ dt(u, A, 18) ^ yt(u, A, 41), L = ut(u, A, 14) ^ ut(u, A, 18) ^ gt(u, A, 41), E = u & m ^ ~u & I, D = A & w ^ ~A & C, B = Ve(M, L, D, Te[y], it[y]), a = Ce(B, R, O, E, Fe[y], rt[y]), d = B | 0, f = dt(i, o, 28) ^ yt(i, o, 34) ^ yt(i, o, 39), p = ut(i, o, 28) ^ gt(i, o, 34) ^ gt(i, o, 39), l = i & r ^ i & h ^ r & h, S = o & n ^ o & b ^ n & b;
432
+ R = I | 0, M = C | 0, I = m | 0, C = w | 0, m = u | 0, w = A | 0, { h: u, l: A } = $(x | 0, H | 0, a | 0, d | 0), x = h | 0, H = b | 0, h = r | 0, b = n | 0, r = i | 0, n = o | 0;
433
+ const U = me(d, p, S);
434
+ i = Ue(U, a, f, l), o = U | 0;
397
435
  }
398
- this.set(this.h1 + h + p | 0, this.h2 + x + U | 0, this.h3 + b + o | 0, this.h4 + i + r | 0, this.h0 + n + d | 0);
436
+ ({ h: i, l: o } = $(this.Ah | 0, this.Al | 0, i | 0, o | 0)), { h: r, l: n } = $(this.Bh | 0, this.Bl | 0, r | 0, n | 0), { h, l: b } = $(this.Ch | 0, this.Cl | 0, h | 0, b | 0), { h: x, l: H } = $(this.Dh | 0, this.Dl | 0, x | 0, H | 0), { h: u, l: A } = $(this.Eh | 0, this.El | 0, u | 0, A | 0), { h: m, l: w } = $(this.Fh | 0, this.Fl | 0, m | 0, w | 0), { h: I, l: C } = $(this.Gh | 0, this.Gl | 0, I | 0, C | 0), { h: R, l: M } = $(this.Hh | 0, this.Hl | 0, R | 0, M | 0), this.set(i, o, r, n, h, b, x, H, u, A, m, w, I, C, R, M);
399
437
  }
400
438
  roundClean() {
401
- nt(bt);
439
+ ct(rt, it);
402
440
  }
403
441
  destroy() {
404
- this.destroyed = !0, nt(this.buffer), this.set(0, 0, 0, 0, 0);
442
+ ct(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
405
443
  }
406
444
  }
407
- const Ve = /* @__PURE__ */ St(() => new ke()), as = Ve, fs = Se;
408
- var j = {}, W = {}, gt = {}, ft = {}, kt;
409
- function Ce() {
410
- return kt || (kt = 1, Object.defineProperty(ft, "__esModule", { value: !0 }), ft.crypto = void 0, ft.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0), ft;
445
+ const ve = /* @__PURE__ */ ne(() => new Oe()), Re = /* @__PURE__ */ ne(() => new Me()), ps = ve;
446
+ var j = {}, K = {}, Bt = {}, lt = {}, Tt;
447
+ function Ge() {
448
+ return Tt || (Tt = 1, Object.defineProperty(lt, "__esModule", { value: !0 }), lt.crypto = void 0, lt.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0), lt;
411
449
  }
412
- var Vt;
413
- function lt() {
414
- return Vt || (Vt = 1, (function(t) {
415
- Object.defineProperty(t, "__esModule", { value: !0 }), t.wrapXOFConstructorWithOpts = t.wrapConstructorWithOpts = t.wrapConstructor = t.Hash = t.nextTick = t.swap32IfBE = t.byteSwapIfBE = t.swap8IfBE = t.isLE = void 0, t.isBytes = s, t.anumber = i, t.abytes = o, t.ahash = n, t.aexists = r, t.aoutput = h, t.u8 = d, t.u32 = x, t.clean = p, t.createView = b, t.rotr = U, t.rotl = w, t.byteSwap = m, t.byteSwap32 = k, t.bytesToHex = R, t.hexToBytes = g, t.asyncLoop = C, t.utf8ToBytes = B, t.bytesToUtf8 = a, t.toBytes = u, t.kdfInputToBytes = f, t.concatBytes = H, t.checkOpts = l, t.createHasher = I, t.createOptHasher = L, t.createXOFer = D, t.randomBytes = v;
416
- const e = /* @__PURE__ */ Ce();
450
+ var Mt;
451
+ function pt() {
452
+ return Mt || (Mt = 1, (function(t) {
453
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.wrapXOFConstructorWithOpts = t.wrapConstructorWithOpts = t.wrapConstructor = t.Hash = t.nextTick = t.swap32IfBE = t.byteSwapIfBE = t.swap8IfBE = t.isLE = void 0, t.isBytes = s, t.anumber = i, t.abytes = o, t.ahash = r, t.aexists = n, t.aoutput = h, t.u8 = b, t.u32 = x, t.clean = H, t.createView = u, t.rotr = A, t.rotl = m, t.byteSwap = w, t.byteSwap32 = I, t.bytesToHex = M, t.hexToBytes = L, t.asyncLoop = D, t.utf8ToBytes = B, t.bytesToUtf8 = a, t.toBytes = d, t.kdfInputToBytes = f, t.concatBytes = p, t.checkOpts = l, t.createHasher = U, t.createOptHasher = k, t.createXOFer = F, t.randomBytes = v;
454
+ const e = /* @__PURE__ */ Ge();
417
455
  function s(c) {
418
456
  return c instanceof Uint8Array || ArrayBuffer.isView(c) && c.constructor.name === "Uint8Array";
419
457
  }
@@ -421,105 +459,105 @@ function lt() {
421
459
  if (!Number.isSafeInteger(c) || c < 0)
422
460
  throw new Error("positive integer expected, got " + c);
423
461
  }
424
- function o(c, ...A) {
462
+ function o(c, ...g) {
425
463
  if (!s(c))
426
464
  throw new Error("Uint8Array expected");
427
- if (A.length > 0 && !A.includes(c.length))
428
- throw new Error("Uint8Array expected of length " + A + ", got length=" + c.length);
465
+ if (g.length > 0 && !g.includes(c.length))
466
+ throw new Error("Uint8Array expected of length " + g + ", got length=" + c.length);
429
467
  }
430
- function n(c) {
468
+ function r(c) {
431
469
  if (typeof c != "function" || typeof c.create != "function")
432
470
  throw new Error("Hash should be wrapped by utils.createHasher");
433
471
  i(c.outputLen), i(c.blockLen);
434
472
  }
435
- function r(c, A = !0) {
473
+ function n(c, g = !0) {
436
474
  if (c.destroyed)
437
475
  throw new Error("Hash instance has been destroyed");
438
- if (A && c.finished)
476
+ if (g && c.finished)
439
477
  throw new Error("Hash#digest() has already been called");
440
478
  }
441
- function h(c, A) {
479
+ function h(c, g) {
442
480
  o(c);
443
- const y = A.outputLen;
444
- if (c.length < y)
445
- throw new Error("digestInto() expects output buffer of length at least " + y);
481
+ const _ = g.outputLen;
482
+ if (c.length < _)
483
+ throw new Error("digestInto() expects output buffer of length at least " + _);
446
484
  }
447
- function d(c) {
485
+ function b(c) {
448
486
  return new Uint8Array(c.buffer, c.byteOffset, c.byteLength);
449
487
  }
450
488
  function x(c) {
451
489
  return new Uint32Array(c.buffer, c.byteOffset, Math.floor(c.byteLength / 4));
452
490
  }
453
- function p(...c) {
454
- for (let A = 0; A < c.length; A++)
455
- c[A].fill(0);
491
+ function H(...c) {
492
+ for (let g = 0; g < c.length; g++)
493
+ c[g].fill(0);
456
494
  }
457
- function b(c) {
495
+ function u(c) {
458
496
  return new DataView(c.buffer, c.byteOffset, c.byteLength);
459
497
  }
460
- function U(c, A) {
461
- return c << 32 - A | c >>> A;
498
+ function A(c, g) {
499
+ return c << 32 - g | c >>> g;
462
500
  }
463
- function w(c, A) {
464
- return c << A | c >>> 32 - A >>> 0;
501
+ function m(c, g) {
502
+ return c << g | c >>> 32 - g >>> 0;
465
503
  }
466
504
  t.isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
467
- function m(c) {
505
+ function w(c) {
468
506
  return c << 24 & 4278190080 | c << 8 & 16711680 | c >>> 8 & 65280 | c >>> 24 & 255;
469
507
  }
470
- t.swap8IfBE = t.isLE ? (c) => c : (c) => m(c), t.byteSwapIfBE = t.swap8IfBE;
471
- function k(c) {
472
- for (let A = 0; A < c.length; A++)
473
- c[A] = m(c[A]);
508
+ t.swap8IfBE = t.isLE ? (c) => c : (c) => w(c), t.byteSwapIfBE = t.swap8IfBE;
509
+ function I(c) {
510
+ for (let g = 0; g < c.length; g++)
511
+ c[g] = w(c[g]);
474
512
  return c;
475
513
  }
476
- t.swap32IfBE = t.isLE ? (c) => c : k;
477
- const M = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", P = /* @__PURE__ */ Array.from({ length: 256 }, (c, A) => A.toString(16).padStart(2, "0"));
478
- function R(c) {
479
- if (o(c), M)
514
+ t.swap32IfBE = t.isLE ? (c) => c : I;
515
+ const C = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", R = /* @__PURE__ */ Array.from({ length: 256 }, (c, g) => g.toString(16).padStart(2, "0"));
516
+ function M(c) {
517
+ if (o(c), C)
480
518
  return c.toHex();
481
- let A = "";
482
- for (let y = 0; y < c.length; y++)
483
- A += P[c[y]];
484
- return A;
485
- }
486
- const V = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
487
- function T(c) {
488
- if (c >= V._0 && c <= V._9)
489
- return c - V._0;
490
- if (c >= V.A && c <= V.F)
491
- return c - (V.A - 10);
492
- if (c >= V.a && c <= V.f)
493
- return c - (V.a - 10);
494
- }
495
- function g(c) {
519
+ let g = "";
520
+ for (let _ = 0; _ < c.length; _++)
521
+ g += R[c[_]];
522
+ return g;
523
+ }
524
+ const y = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
525
+ function O(c) {
526
+ if (c >= y._0 && c <= y._9)
527
+ return c - y._0;
528
+ if (c >= y.A && c <= y.F)
529
+ return c - (y.A - 10);
530
+ if (c >= y.a && c <= y.f)
531
+ return c - (y.a - 10);
532
+ }
533
+ function L(c) {
496
534
  if (typeof c != "string")
497
535
  throw new Error("hex string expected, got " + typeof c);
498
- if (M)
536
+ if (C)
499
537
  return Uint8Array.fromHex(c);
500
- const A = c.length, y = A / 2;
501
- if (A % 2)
502
- throw new Error("hex string expected, got unpadded hex of length " + A);
503
- const O = new Uint8Array(y);
504
- for (let F = 0, G = 0; F < y; F++, G += 2) {
505
- const z = T(c.charCodeAt(G)), N = T(c.charCodeAt(G + 1));
506
- if (z === void 0 || N === void 0) {
507
- const X = c[G] + c[G + 1];
508
- throw new Error('hex string expected, got non-hex character "' + X + '" at index ' + G);
538
+ const g = c.length, _ = g / 2;
539
+ if (g % 2)
540
+ throw new Error("hex string expected, got unpadded hex of length " + g);
541
+ const T = new Uint8Array(_);
542
+ for (let G = 0, P = 0; G < _; G++, P += 2) {
543
+ const tt = O(c.charCodeAt(P)), X = O(c.charCodeAt(P + 1));
544
+ if (tt === void 0 || X === void 0) {
545
+ const J = c[P] + c[P + 1];
546
+ throw new Error('hex string expected, got non-hex character "' + J + '" at index ' + P);
509
547
  }
510
- O[F] = z * 16 + N;
548
+ T[G] = tt * 16 + X;
511
549
  }
512
- return O;
550
+ return T;
513
551
  }
514
- const S = async () => {
552
+ const E = async () => {
515
553
  };
516
- t.nextTick = S;
517
- async function C(c, A, y) {
518
- let O = Date.now();
519
- for (let F = 0; F < c; F++) {
520
- y(F);
521
- const G = Date.now() - O;
522
- G >= 0 && G < A || (await (0, t.nextTick)(), O += G);
554
+ t.nextTick = E;
555
+ async function D(c, g, _) {
556
+ let T = Date.now();
557
+ for (let G = 0; G < c; G++) {
558
+ _(G);
559
+ const P = Date.now() - T;
560
+ P >= 0 && P < g || (await (0, t.nextTick)(), T += P);
523
561
  }
524
562
  }
525
563
  function B(c) {
@@ -530,46 +568,46 @@ function lt() {
530
568
  function a(c) {
531
569
  return new TextDecoder().decode(c);
532
570
  }
533
- function u(c) {
571
+ function d(c) {
534
572
  return typeof c == "string" && (c = B(c)), o(c), c;
535
573
  }
536
574
  function f(c) {
537
575
  return typeof c == "string" && (c = B(c)), o(c), c;
538
576
  }
539
- function H(...c) {
540
- let A = 0;
541
- for (let O = 0; O < c.length; O++) {
542
- const F = c[O];
543
- o(F), A += F.length;
577
+ function p(...c) {
578
+ let g = 0;
579
+ for (let T = 0; T < c.length; T++) {
580
+ const G = c[T];
581
+ o(G), g += G.length;
544
582
  }
545
- const y = new Uint8Array(A);
546
- for (let O = 0, F = 0; O < c.length; O++) {
547
- const G = c[O];
548
- y.set(G, F), F += G.length;
583
+ const _ = new Uint8Array(g);
584
+ for (let T = 0, G = 0; T < c.length; T++) {
585
+ const P = c[T];
586
+ _.set(P, G), G += P.length;
549
587
  }
550
- return y;
588
+ return _;
551
589
  }
552
- function l(c, A) {
553
- if (A !== void 0 && {}.toString.call(A) !== "[object Object]")
590
+ function l(c, g) {
591
+ if (g !== void 0 && {}.toString.call(g) !== "[object Object]")
554
592
  throw new Error("options should be object or undefined");
555
- return Object.assign(c, A);
593
+ return Object.assign(c, g);
556
594
  }
557
- class _ {
595
+ class S {
558
596
  }
559
- t.Hash = _;
560
- function I(c) {
561
- const A = (O) => c().update(u(O)).digest(), y = c();
562
- return A.outputLen = y.outputLen, A.blockLen = y.blockLen, A.create = () => c(), A;
597
+ t.Hash = S;
598
+ function U(c) {
599
+ const g = (T) => c().update(d(T)).digest(), _ = c();
600
+ return g.outputLen = _.outputLen, g.blockLen = _.blockLen, g.create = () => c(), g;
563
601
  }
564
- function L(c) {
565
- const A = (O, F) => c(F).update(u(O)).digest(), y = c({});
566
- return A.outputLen = y.outputLen, A.blockLen = y.blockLen, A.create = (O) => c(O), A;
602
+ function k(c) {
603
+ const g = (T, G) => c(G).update(d(T)).digest(), _ = c({});
604
+ return g.outputLen = _.outputLen, g.blockLen = _.blockLen, g.create = (T) => c(T), g;
567
605
  }
568
- function D(c) {
569
- const A = (O, F) => c(F).update(u(O)).digest(), y = c({});
570
- return A.outputLen = y.outputLen, A.blockLen = y.blockLen, A.create = (O) => c(O), A;
606
+ function F(c) {
607
+ const g = (T, G) => c(G).update(d(T)).digest(), _ = c({});
608
+ return g.outputLen = _.outputLen, g.blockLen = _.blockLen, g.create = (T) => c(T), g;
571
609
  }
572
- t.wrapConstructor = I, t.wrapConstructorWithOpts = L, t.wrapXOFConstructorWithOpts = D;
610
+ t.wrapConstructor = U, t.wrapConstructorWithOpts = k, t.wrapXOFConstructorWithOpts = F;
573
611
  function v(c = 32) {
574
612
  if (e.crypto && typeof e.crypto.getRandomValues == "function")
575
613
  return e.crypto.getRandomValues(new Uint8Array(c));
@@ -577,77 +615,77 @@ function lt() {
577
615
  return Uint8Array.from(e.crypto.randomBytes(c));
578
616
  throw new Error("crypto.getRandomValues must be defined");
579
617
  }
580
- })(gt)), gt;
618
+ })(Bt)), Bt;
581
619
  }
582
- var Ct;
583
- function se() {
584
- if (Ct) return W;
585
- Ct = 1, Object.defineProperty(W, "__esModule", { value: !0 }), W.SHA512_IV = W.SHA384_IV = W.SHA224_IV = W.SHA256_IV = W.HashMD = void 0, W.setBigUint64 = e, W.Chi = s, W.Maj = i;
586
- const t = /* @__PURE__ */ lt();
587
- function e(n, r, h, d) {
588
- if (typeof n.setBigUint64 == "function")
589
- return n.setBigUint64(r, h, d);
590
- const x = BigInt(32), p = BigInt(4294967295), b = Number(h >> x & p), U = Number(h & p), w = d ? 4 : 0, m = d ? 0 : 4;
591
- n.setUint32(r + w, b, d), n.setUint32(r + m, U, d);
592
- }
593
- function s(n, r, h) {
594
- return n & r ^ ~n & h;
595
- }
596
- function i(n, r, h) {
597
- return n & r ^ n & h ^ r & h;
620
+ var vt;
621
+ function oe() {
622
+ if (vt) return K;
623
+ vt = 1, Object.defineProperty(K, "__esModule", { value: !0 }), K.SHA512_IV = K.SHA384_IV = K.SHA224_IV = K.SHA256_IV = K.HashMD = void 0, K.setBigUint64 = e, K.Chi = s, K.Maj = i;
624
+ const t = /* @__PURE__ */ pt();
625
+ function e(r, n, h, b) {
626
+ if (typeof r.setBigUint64 == "function")
627
+ return r.setBigUint64(n, h, b);
628
+ const x = BigInt(32), H = BigInt(4294967295), u = Number(h >> x & H), A = Number(h & H), m = b ? 4 : 0, w = b ? 0 : 4;
629
+ r.setUint32(n + m, u, b), r.setUint32(n + w, A, b);
630
+ }
631
+ function s(r, n, h) {
632
+ return r & n ^ ~r & h;
633
+ }
634
+ function i(r, n, h) {
635
+ return r & n ^ r & h ^ n & h;
598
636
  }
599
637
  class o extends t.Hash {
600
- constructor(r, h, d, x) {
601
- super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = r, this.outputLen = h, this.padOffset = d, this.isLE = x, this.buffer = new Uint8Array(r), this.view = (0, t.createView)(this.buffer);
602
- }
603
- update(r) {
604
- (0, t.aexists)(this), r = (0, t.toBytes)(r), (0, t.abytes)(r);
605
- const { view: h, buffer: d, blockLen: x } = this, p = r.length;
606
- for (let b = 0; b < p; ) {
607
- const U = Math.min(x - this.pos, p - b);
608
- if (U === x) {
609
- const w = (0, t.createView)(r);
610
- for (; x <= p - b; b += x)
611
- this.process(w, b);
638
+ constructor(n, h, b, x) {
639
+ super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = n, this.outputLen = h, this.padOffset = b, this.isLE = x, this.buffer = new Uint8Array(n), this.view = (0, t.createView)(this.buffer);
640
+ }
641
+ update(n) {
642
+ (0, t.aexists)(this), n = (0, t.toBytes)(n), (0, t.abytes)(n);
643
+ const { view: h, buffer: b, blockLen: x } = this, H = n.length;
644
+ for (let u = 0; u < H; ) {
645
+ const A = Math.min(x - this.pos, H - u);
646
+ if (A === x) {
647
+ const m = (0, t.createView)(n);
648
+ for (; x <= H - u; u += x)
649
+ this.process(m, u);
612
650
  continue;
613
651
  }
614
- d.set(r.subarray(b, b + U), this.pos), this.pos += U, b += U, this.pos === x && (this.process(h, 0), this.pos = 0);
652
+ b.set(n.subarray(u, u + A), this.pos), this.pos += A, u += A, this.pos === x && (this.process(h, 0), this.pos = 0);
615
653
  }
616
- return this.length += r.length, this.roundClean(), this;
617
- }
618
- digestInto(r) {
619
- (0, t.aexists)(this), (0, t.aoutput)(r, this), this.finished = !0;
620
- const { buffer: h, view: d, blockLen: x, isLE: p } = this;
621
- let { pos: b } = this;
622
- h[b++] = 128, (0, t.clean)(this.buffer.subarray(b)), this.padOffset > x - b && (this.process(d, 0), b = 0);
623
- for (let M = b; M < x; M++)
624
- h[M] = 0;
625
- e(d, x - 8, BigInt(this.length * 8), p), this.process(d, 0);
626
- const U = (0, t.createView)(r), w = this.outputLen;
627
- if (w % 4)
654
+ return this.length += n.length, this.roundClean(), this;
655
+ }
656
+ digestInto(n) {
657
+ (0, t.aexists)(this), (0, t.aoutput)(n, this), this.finished = !0;
658
+ const { buffer: h, view: b, blockLen: x, isLE: H } = this;
659
+ let { pos: u } = this;
660
+ h[u++] = 128, (0, t.clean)(this.buffer.subarray(u)), this.padOffset > x - u && (this.process(b, 0), u = 0);
661
+ for (let C = u; C < x; C++)
662
+ h[C] = 0;
663
+ e(b, x - 8, BigInt(this.length * 8), H), this.process(b, 0);
664
+ const A = (0, t.createView)(n), m = this.outputLen;
665
+ if (m % 4)
628
666
  throw new Error("_sha2: outputLen should be aligned to 32bit");
629
- const m = w / 4, k = this.get();
630
- if (m > k.length)
667
+ const w = m / 4, I = this.get();
668
+ if (w > I.length)
631
669
  throw new Error("_sha2: outputLen bigger than state");
632
- for (let M = 0; M < m; M++)
633
- U.setUint32(4 * M, k[M], p);
670
+ for (let C = 0; C < w; C++)
671
+ A.setUint32(4 * C, I[C], H);
634
672
  }
635
673
  digest() {
636
- const { buffer: r, outputLen: h } = this;
637
- this.digestInto(r);
638
- const d = r.slice(0, h);
639
- return this.destroy(), d;
674
+ const { buffer: n, outputLen: h } = this;
675
+ this.digestInto(n);
676
+ const b = n.slice(0, h);
677
+ return this.destroy(), b;
640
678
  }
641
- _cloneInto(r) {
642
- r || (r = new this.constructor()), r.set(...this.get());
643
- const { blockLen: h, buffer: d, length: x, finished: p, destroyed: b, pos: U } = this;
644
- return r.destroyed = b, r.finished = p, r.length = x, r.pos = U, x % h && r.buffer.set(d), r;
679
+ _cloneInto(n) {
680
+ n || (n = new this.constructor()), n.set(...this.get());
681
+ const { blockLen: h, buffer: b, length: x, finished: H, destroyed: u, pos: A } = this;
682
+ return n.destroyed = u, n.finished = H, n.length = x, n.pos = A, x % h && n.buffer.set(b), n;
645
683
  }
646
684
  clone() {
647
685
  return this._cloneInto();
648
686
  }
649
687
  }
650
- return W.HashMD = o, W.SHA256_IV = Uint32Array.from([
688
+ return K.HashMD = o, K.SHA256_IV = Uint32Array.from([
651
689
  1779033703,
652
690
  3144134277,
653
691
  1013904242,
@@ -656,7 +694,7 @@ function se() {
656
694
  2600822924,
657
695
  528734635,
658
696
  1541459225
659
- ]), W.SHA224_IV = Uint32Array.from([
697
+ ]), K.SHA224_IV = Uint32Array.from([
660
698
  3238371032,
661
699
  914150663,
662
700
  812702999,
@@ -665,7 +703,7 @@ function se() {
665
703
  1750603025,
666
704
  1694076839,
667
705
  3204075428
668
- ]), W.SHA384_IV = Uint32Array.from([
706
+ ]), K.SHA384_IV = Uint32Array.from([
669
707
  3418070365,
670
708
  3238371032,
671
709
  1654270250,
@@ -682,7 +720,7 @@ function se() {
682
720
  1694076839,
683
721
  1203062813,
684
722
  3204075428
685
- ]), W.SHA512_IV = Uint32Array.from([
723
+ ]), K.SHA512_IV = Uint32Array.from([
686
724
  1779033703,
687
725
  4089235720,
688
726
  3144134277,
@@ -699,98 +737,98 @@ function se() {
699
737
  4215389547,
700
738
  1541459225,
701
739
  327033209
702
- ]), W;
740
+ ]), K;
703
741
  }
704
- var E = {}, Dt;
705
- function De() {
706
- if (Dt) return E;
707
- Dt = 1, Object.defineProperty(E, "__esModule", { value: !0 }), E.toBig = E.shrSL = E.shrSH = E.rotrSL = E.rotrSH = E.rotrBL = E.rotrBH = E.rotr32L = E.rotr32H = E.rotlSL = E.rotlSH = E.rotlBL = E.rotlBH = E.add5L = E.add5H = E.add4L = E.add4H = E.add3L = E.add3H = void 0, E.add = P, E.fromBig = s, E.split = i;
742
+ var V = {}, Rt;
743
+ function je() {
744
+ if (Rt) return V;
745
+ Rt = 1, Object.defineProperty(V, "__esModule", { value: !0 }), V.toBig = V.shrSL = V.shrSH = V.rotrSL = V.rotrSH = V.rotrBL = V.rotrBH = V.rotr32L = V.rotr32H = V.rotlSL = V.rotlSH = V.rotlBL = V.rotlBH = V.add5L = V.add5H = V.add4L = V.add4H = V.add3L = V.add3H = void 0, V.add = R, V.fromBig = s, V.split = i;
708
746
  const t = /* @__PURE__ */ BigInt(2 ** 32 - 1), e = /* @__PURE__ */ BigInt(32);
709
- function s(a, u = !1) {
710
- return u ? { h: Number(a & t), l: Number(a >> e & t) } : { h: Number(a >> e & t) | 0, l: Number(a & t) | 0 };
747
+ function s(a, d = !1) {
748
+ return d ? { h: Number(a & t), l: Number(a >> e & t) } : { h: Number(a >> e & t) | 0, l: Number(a & t) | 0 };
711
749
  }
712
- function i(a, u = !1) {
750
+ function i(a, d = !1) {
713
751
  const f = a.length;
714
- let H = new Uint32Array(f), l = new Uint32Array(f);
715
- for (let _ = 0; _ < f; _++) {
716
- const { h: I, l: L } = s(a[_], u);
717
- [H[_], l[_]] = [I, L];
718
- }
719
- return [H, l];
720
- }
721
- const o = (a, u) => BigInt(a >>> 0) << e | BigInt(u >>> 0);
722
- E.toBig = o;
723
- const n = (a, u, f) => a >>> f;
724
- E.shrSH = n;
725
- const r = (a, u, f) => a << 32 - f | u >>> f;
726
- E.shrSL = r;
727
- const h = (a, u, f) => a >>> f | u << 32 - f;
728
- E.rotrSH = h;
729
- const d = (a, u, f) => a << 32 - f | u >>> f;
730
- E.rotrSL = d;
731
- const x = (a, u, f) => a << 64 - f | u >>> f - 32;
732
- E.rotrBH = x;
733
- const p = (a, u, f) => a >>> f - 32 | u << 64 - f;
734
- E.rotrBL = p;
735
- const b = (a, u) => u;
736
- E.rotr32H = b;
737
- const U = (a, u) => a;
738
- E.rotr32L = U;
739
- const w = (a, u, f) => a << f | u >>> 32 - f;
740
- E.rotlSH = w;
741
- const m = (a, u, f) => u << f | a >>> 32 - f;
742
- E.rotlSL = m;
743
- const k = (a, u, f) => u << f - 32 | a >>> 64 - f;
744
- E.rotlBH = k;
745
- const M = (a, u, f) => a << f - 32 | u >>> 64 - f;
746
- E.rotlBL = M;
747
- function P(a, u, f, H) {
748
- const l = (u >>> 0) + (H >>> 0);
752
+ let p = new Uint32Array(f), l = new Uint32Array(f);
753
+ for (let S = 0; S < f; S++) {
754
+ const { h: U, l: k } = s(a[S], d);
755
+ [p[S], l[S]] = [U, k];
756
+ }
757
+ return [p, l];
758
+ }
759
+ const o = (a, d) => BigInt(a >>> 0) << e | BigInt(d >>> 0);
760
+ V.toBig = o;
761
+ const r = (a, d, f) => a >>> f;
762
+ V.shrSH = r;
763
+ const n = (a, d, f) => a << 32 - f | d >>> f;
764
+ V.shrSL = n;
765
+ const h = (a, d, f) => a >>> f | d << 32 - f;
766
+ V.rotrSH = h;
767
+ const b = (a, d, f) => a << 32 - f | d >>> f;
768
+ V.rotrSL = b;
769
+ const x = (a, d, f) => a << 64 - f | d >>> f - 32;
770
+ V.rotrBH = x;
771
+ const H = (a, d, f) => a >>> f - 32 | d << 64 - f;
772
+ V.rotrBL = H;
773
+ const u = (a, d) => d;
774
+ V.rotr32H = u;
775
+ const A = (a, d) => a;
776
+ V.rotr32L = A;
777
+ const m = (a, d, f) => a << f | d >>> 32 - f;
778
+ V.rotlSH = m;
779
+ const w = (a, d, f) => d << f | a >>> 32 - f;
780
+ V.rotlSL = w;
781
+ const I = (a, d, f) => d << f - 32 | a >>> 64 - f;
782
+ V.rotlBH = I;
783
+ const C = (a, d, f) => a << f - 32 | d >>> 64 - f;
784
+ V.rotlBL = C;
785
+ function R(a, d, f, p) {
786
+ const l = (d >>> 0) + (p >>> 0);
749
787
  return { h: a + f + (l / 2 ** 32 | 0) | 0, l: l | 0 };
750
788
  }
751
- const R = (a, u, f) => (a >>> 0) + (u >>> 0) + (f >>> 0);
752
- E.add3L = R;
753
- const V = (a, u, f, H) => u + f + H + (a / 2 ** 32 | 0) | 0;
754
- E.add3H = V;
755
- const T = (a, u, f, H) => (a >>> 0) + (u >>> 0) + (f >>> 0) + (H >>> 0);
756
- E.add4L = T;
757
- const g = (a, u, f, H, l) => u + f + H + l + (a / 2 ** 32 | 0) | 0;
758
- E.add4H = g;
759
- const S = (a, u, f, H, l) => (a >>> 0) + (u >>> 0) + (f >>> 0) + (H >>> 0) + (l >>> 0);
760
- E.add5L = S;
761
- const C = (a, u, f, H, l, _) => u + f + H + l + _ + (a / 2 ** 32 | 0) | 0;
762
- E.add5H = C;
789
+ const M = (a, d, f) => (a >>> 0) + (d >>> 0) + (f >>> 0);
790
+ V.add3L = M;
791
+ const y = (a, d, f, p) => d + f + p + (a / 2 ** 32 | 0) | 0;
792
+ V.add3H = y;
793
+ const O = (a, d, f, p) => (a >>> 0) + (d >>> 0) + (f >>> 0) + (p >>> 0);
794
+ V.add4L = O;
795
+ const L = (a, d, f, p, l) => d + f + p + l + (a / 2 ** 32 | 0) | 0;
796
+ V.add4H = L;
797
+ const E = (a, d, f, p, l) => (a >>> 0) + (d >>> 0) + (f >>> 0) + (p >>> 0) + (l >>> 0);
798
+ V.add5L = E;
799
+ const D = (a, d, f, p, l, S) => d + f + p + l + S + (a / 2 ** 32 | 0) | 0;
800
+ V.add5H = D;
763
801
  const B = {
764
802
  fromBig: s,
765
803
  split: i,
766
804
  toBig: o,
767
- shrSH: n,
768
- shrSL: r,
805
+ shrSH: r,
806
+ shrSL: n,
769
807
  rotrSH: h,
770
- rotrSL: d,
808
+ rotrSL: b,
771
809
  rotrBH: x,
772
- rotrBL: p,
773
- rotr32H: b,
774
- rotr32L: U,
775
- rotlSH: w,
776
- rotlSL: m,
777
- rotlBH: k,
778
- rotlBL: M,
779
- add: P,
780
- add3L: R,
781
- add3H: V,
782
- add4L: T,
783
- add4H: g,
784
- add5H: C,
785
- add5L: S
810
+ rotrBL: H,
811
+ rotr32H: u,
812
+ rotr32L: A,
813
+ rotlSH: m,
814
+ rotlSL: w,
815
+ rotlBH: I,
816
+ rotlBL: C,
817
+ add: R,
818
+ add3L: M,
819
+ add3H: y,
820
+ add4L: O,
821
+ add4H: L,
822
+ add5H: D,
823
+ add5L: E
786
824
  };
787
- return E.default = B, E;
825
+ return V.default = B, V;
788
826
  }
789
- var Ot;
790
- function ne() {
791
- if (Ot) return j;
792
- Ot = 1, Object.defineProperty(j, "__esModule", { value: !0 }), j.sha512_224 = j.sha512_256 = j.sha384 = j.sha512 = j.sha224 = j.sha256 = j.SHA512_256 = j.SHA512_224 = j.SHA384 = j.SHA512 = j.SHA224 = j.SHA256 = void 0;
793
- const t = /* @__PURE__ */ se(), e = /* @__PURE__ */ De(), s = /* @__PURE__ */ lt(), i = /* @__PURE__ */ Uint32Array.from([
827
+ var Gt;
828
+ function ce() {
829
+ if (Gt) return j;
830
+ Gt = 1, Object.defineProperty(j, "__esModule", { value: !0 }), j.sha512_224 = j.sha512_256 = j.sha384 = j.sha512 = j.sha224 = j.sha256 = j.SHA512_256 = j.SHA512_224 = j.SHA384 = j.SHA512 = j.SHA224 = j.SHA256 = void 0;
831
+ const t = /* @__PURE__ */ oe(), e = /* @__PURE__ */ je(), s = /* @__PURE__ */ pt(), i = /* @__PURE__ */ Uint32Array.from([
794
832
  1116352408,
795
833
  1899447441,
796
834
  3049323471,
@@ -856,31 +894,31 @@ function ne() {
856
894
  3204031479,
857
895
  3329325298
858
896
  ]), o = /* @__PURE__ */ new Uint32Array(64);
859
- class n extends t.HashMD {
860
- constructor(V = 32) {
861
- super(64, V, 8, !1), this.A = t.SHA256_IV[0] | 0, this.B = t.SHA256_IV[1] | 0, this.C = t.SHA256_IV[2] | 0, this.D = t.SHA256_IV[3] | 0, this.E = t.SHA256_IV[4] | 0, this.F = t.SHA256_IV[5] | 0, this.G = t.SHA256_IV[6] | 0, this.H = t.SHA256_IV[7] | 0;
897
+ class r extends t.HashMD {
898
+ constructor(y = 32) {
899
+ super(64, y, 8, !1), this.A = t.SHA256_IV[0] | 0, this.B = t.SHA256_IV[1] | 0, this.C = t.SHA256_IV[2] | 0, this.D = t.SHA256_IV[3] | 0, this.E = t.SHA256_IV[4] | 0, this.F = t.SHA256_IV[5] | 0, this.G = t.SHA256_IV[6] | 0, this.H = t.SHA256_IV[7] | 0;
862
900
  }
863
901
  get() {
864
- const { A: V, B: T, C: g, D: S, E: C, F: B, G: a, H: u } = this;
865
- return [V, T, g, S, C, B, a, u];
902
+ const { A: y, B: O, C: L, D: E, E: D, F: B, G: a, H: d } = this;
903
+ return [y, O, L, E, D, B, a, d];
866
904
  }
867
905
  // prettier-ignore
868
- set(V, T, g, S, C, B, a, u) {
869
- this.A = V | 0, this.B = T | 0, this.C = g | 0, this.D = S | 0, this.E = C | 0, this.F = B | 0, this.G = a | 0, this.H = u | 0;
906
+ set(y, O, L, E, D, B, a, d) {
907
+ this.A = y | 0, this.B = O | 0, this.C = L | 0, this.D = E | 0, this.E = D | 0, this.F = B | 0, this.G = a | 0, this.H = d | 0;
870
908
  }
871
- process(V, T) {
872
- for (let l = 0; l < 16; l++, T += 4)
873
- o[l] = V.getUint32(T, !1);
909
+ process(y, O) {
910
+ for (let l = 0; l < 16; l++, O += 4)
911
+ o[l] = y.getUint32(O, !1);
874
912
  for (let l = 16; l < 64; l++) {
875
- const _ = o[l - 15], I = o[l - 2], L = (0, s.rotr)(_, 7) ^ (0, s.rotr)(_, 18) ^ _ >>> 3, D = (0, s.rotr)(I, 17) ^ (0, s.rotr)(I, 19) ^ I >>> 10;
876
- o[l] = D + o[l - 7] + L + o[l - 16] | 0;
913
+ const S = o[l - 15], U = o[l - 2], k = (0, s.rotr)(S, 7) ^ (0, s.rotr)(S, 18) ^ S >>> 3, F = (0, s.rotr)(U, 17) ^ (0, s.rotr)(U, 19) ^ U >>> 10;
914
+ o[l] = F + o[l - 7] + k + o[l - 16] | 0;
877
915
  }
878
- let { A: g, B: S, C, D: B, E: a, F: u, G: f, H } = this;
916
+ let { A: L, B: E, C: D, D: B, E: a, F: d, G: f, H: p } = this;
879
917
  for (let l = 0; l < 64; l++) {
880
- const _ = (0, s.rotr)(a, 6) ^ (0, s.rotr)(a, 11) ^ (0, s.rotr)(a, 25), I = H + _ + (0, t.Chi)(a, u, f) + i[l] + o[l] | 0, D = ((0, s.rotr)(g, 2) ^ (0, s.rotr)(g, 13) ^ (0, s.rotr)(g, 22)) + (0, t.Maj)(g, S, C) | 0;
881
- H = f, f = u, u = a, a = B + I | 0, B = C, C = S, S = g, g = I + D | 0;
918
+ const S = (0, s.rotr)(a, 6) ^ (0, s.rotr)(a, 11) ^ (0, s.rotr)(a, 25), U = p + S + (0, t.Chi)(a, d, f) + i[l] + o[l] | 0, F = ((0, s.rotr)(L, 2) ^ (0, s.rotr)(L, 13) ^ (0, s.rotr)(L, 22)) + (0, t.Maj)(L, E, D) | 0;
919
+ p = f, f = d, d = a, a = B + U | 0, B = D, D = E, E = L, L = U + F | 0;
882
920
  }
883
- g = g + this.A | 0, S = S + this.B | 0, C = C + this.C | 0, B = B + this.D | 0, a = a + this.E | 0, u = u + this.F | 0, f = f + this.G | 0, H = H + this.H | 0, this.set(g, S, C, B, a, u, f, H);
921
+ L = L + this.A | 0, E = E + this.B | 0, D = D + this.C | 0, B = B + this.D | 0, a = a + this.E | 0, d = d + this.F | 0, f = f + this.G | 0, p = p + this.H | 0, this.set(L, E, D, B, a, d, f, p);
884
922
  }
885
923
  roundClean() {
886
924
  (0, s.clean)(o);
@@ -889,13 +927,13 @@ function ne() {
889
927
  this.set(0, 0, 0, 0, 0, 0, 0, 0), (0, s.clean)(this.buffer);
890
928
  }
891
929
  }
892
- j.SHA256 = n;
893
- class r extends n {
930
+ j.SHA256 = r;
931
+ class n extends r {
894
932
  constructor() {
895
933
  super(28), this.A = t.SHA224_IV[0] | 0, this.B = t.SHA224_IV[1] | 0, this.C = t.SHA224_IV[2] | 0, this.D = t.SHA224_IV[3] | 0, this.E = t.SHA224_IV[4] | 0, this.F = t.SHA224_IV[5] | 0, this.G = t.SHA224_IV[6] | 0, this.H = t.SHA224_IV[7] | 0;
896
934
  }
897
935
  }
898
- j.SHA224 = r;
936
+ j.SHA224 = n;
899
937
  const h = e.split([
900
938
  "0x428a2f98d728ae22",
901
939
  "0x7137449123ef65cd",
@@ -977,51 +1015,51 @@ function ne() {
977
1015
  "0x597f299cfc657e2a",
978
1016
  "0x5fcb6fab3ad6faec",
979
1017
  "0x6c44198c4a475817"
980
- ].map((R) => BigInt(R))), d = h[0], x = h[1], p = /* @__PURE__ */ new Uint32Array(80), b = /* @__PURE__ */ new Uint32Array(80);
981
- class U extends t.HashMD {
982
- constructor(V = 64) {
983
- super(128, V, 16, !1), this.Ah = t.SHA512_IV[0] | 0, this.Al = t.SHA512_IV[1] | 0, this.Bh = t.SHA512_IV[2] | 0, this.Bl = t.SHA512_IV[3] | 0, this.Ch = t.SHA512_IV[4] | 0, this.Cl = t.SHA512_IV[5] | 0, this.Dh = t.SHA512_IV[6] | 0, this.Dl = t.SHA512_IV[7] | 0, this.Eh = t.SHA512_IV[8] | 0, this.El = t.SHA512_IV[9] | 0, this.Fh = t.SHA512_IV[10] | 0, this.Fl = t.SHA512_IV[11] | 0, this.Gh = t.SHA512_IV[12] | 0, this.Gl = t.SHA512_IV[13] | 0, this.Hh = t.SHA512_IV[14] | 0, this.Hl = t.SHA512_IV[15] | 0;
1018
+ ].map((M) => BigInt(M))), b = h[0], x = h[1], H = /* @__PURE__ */ new Uint32Array(80), u = /* @__PURE__ */ new Uint32Array(80);
1019
+ class A extends t.HashMD {
1020
+ constructor(y = 64) {
1021
+ super(128, y, 16, !1), this.Ah = t.SHA512_IV[0] | 0, this.Al = t.SHA512_IV[1] | 0, this.Bh = t.SHA512_IV[2] | 0, this.Bl = t.SHA512_IV[3] | 0, this.Ch = t.SHA512_IV[4] | 0, this.Cl = t.SHA512_IV[5] | 0, this.Dh = t.SHA512_IV[6] | 0, this.Dl = t.SHA512_IV[7] | 0, this.Eh = t.SHA512_IV[8] | 0, this.El = t.SHA512_IV[9] | 0, this.Fh = t.SHA512_IV[10] | 0, this.Fl = t.SHA512_IV[11] | 0, this.Gh = t.SHA512_IV[12] | 0, this.Gl = t.SHA512_IV[13] | 0, this.Hh = t.SHA512_IV[14] | 0, this.Hl = t.SHA512_IV[15] | 0;
984
1022
  }
985
1023
  // prettier-ignore
986
1024
  get() {
987
- const { Ah: V, Al: T, Bh: g, Bl: S, Ch: C, Cl: B, Dh: a, Dl: u, Eh: f, El: H, Fh: l, Fl: _, Gh: I, Gl: L, Hh: D, Hl: v } = this;
988
- return [V, T, g, S, C, B, a, u, f, H, l, _, I, L, D, v];
1025
+ const { Ah: y, Al: O, Bh: L, Bl: E, Ch: D, Cl: B, Dh: a, Dl: d, Eh: f, El: p, Fh: l, Fl: S, Gh: U, Gl: k, Hh: F, Hl: v } = this;
1026
+ return [y, O, L, E, D, B, a, d, f, p, l, S, U, k, F, v];
989
1027
  }
990
1028
  // prettier-ignore
991
- set(V, T, g, S, C, B, a, u, f, H, l, _, I, L, D, v) {
992
- this.Ah = V | 0, this.Al = T | 0, this.Bh = g | 0, this.Bl = S | 0, this.Ch = C | 0, this.Cl = B | 0, this.Dh = a | 0, this.Dl = u | 0, this.Eh = f | 0, this.El = H | 0, this.Fh = l | 0, this.Fl = _ | 0, this.Gh = I | 0, this.Gl = L | 0, this.Hh = D | 0, this.Hl = v | 0;
993
- }
994
- process(V, T) {
995
- for (let y = 0; y < 16; y++, T += 4)
996
- p[y] = V.getUint32(T), b[y] = V.getUint32(T += 4);
997
- for (let y = 16; y < 80; y++) {
998
- const O = p[y - 15] | 0, F = b[y - 15] | 0, G = e.rotrSH(O, F, 1) ^ e.rotrSH(O, F, 8) ^ e.shrSH(O, F, 7), z = e.rotrSL(O, F, 1) ^ e.rotrSL(O, F, 8) ^ e.shrSL(O, F, 7), N = p[y - 2] | 0, X = b[y - 2] | 0, ot = e.rotrSH(N, X, 19) ^ e.rotrBH(N, X, 61) ^ e.shrSH(N, X, 6), J = e.rotrSL(N, X, 19) ^ e.rotrBL(N, X, 61) ^ e.shrSL(N, X, 6), $ = e.add4L(z, J, b[y - 7], b[y - 16]), At = e.add4H($, G, ot, p[y - 7], p[y - 16]);
999
- p[y] = At | 0, b[y] = $ | 0;
1029
+ set(y, O, L, E, D, B, a, d, f, p, l, S, U, k, F, v) {
1030
+ this.Ah = y | 0, this.Al = O | 0, this.Bh = L | 0, this.Bl = E | 0, this.Ch = D | 0, this.Cl = B | 0, this.Dh = a | 0, this.Dl = d | 0, this.Eh = f | 0, this.El = p | 0, this.Fh = l | 0, this.Fl = S | 0, this.Gh = U | 0, this.Gl = k | 0, this.Hh = F | 0, this.Hl = v | 0;
1031
+ }
1032
+ process(y, O) {
1033
+ for (let _ = 0; _ < 16; _++, O += 4)
1034
+ H[_] = y.getUint32(O), u[_] = y.getUint32(O += 4);
1035
+ for (let _ = 16; _ < 80; _++) {
1036
+ const T = H[_ - 15] | 0, G = u[_ - 15] | 0, P = e.rotrSH(T, G, 1) ^ e.rotrSH(T, G, 8) ^ e.shrSH(T, G, 7), tt = e.rotrSL(T, G, 1) ^ e.rotrSL(T, G, 8) ^ e.shrSL(T, G, 7), X = H[_ - 2] | 0, J = u[_ - 2] | 0, at = e.rotrSH(X, J, 19) ^ e.rotrBH(X, J, 61) ^ e.shrSH(X, J, 6), Q = e.rotrSL(X, J, 19) ^ e.rotrBL(X, J, 61) ^ e.shrSL(X, J, 6), et = e.add4L(tt, Q, u[_ - 7], u[_ - 16]), Lt = e.add4H(et, P, at, H[_ - 7], H[_ - 16]);
1037
+ H[_] = Lt | 0, u[_] = et | 0;
1000
1038
  }
1001
- let { Ah: g, Al: S, Bh: C, Bl: B, Ch: a, Cl: u, Dh: f, Dl: H, Eh: l, El: _, Fh: I, Fl: L, Gh: D, Gl: v, Hh: c, Hl: A } = this;
1002
- for (let y = 0; y < 80; y++) {
1003
- const O = e.rotrSH(l, _, 14) ^ e.rotrSH(l, _, 18) ^ e.rotrBH(l, _, 41), F = e.rotrSL(l, _, 14) ^ e.rotrSL(l, _, 18) ^ e.rotrBL(l, _, 41), G = l & I ^ ~l & D, z = _ & L ^ ~_ & v, N = e.add5L(A, F, z, x[y], b[y]), X = e.add5H(N, c, O, G, d[y], p[y]), ot = N | 0, J = e.rotrSH(g, S, 28) ^ e.rotrBH(g, S, 34) ^ e.rotrBH(g, S, 39), $ = e.rotrSL(g, S, 28) ^ e.rotrBL(g, S, 34) ^ e.rotrBL(g, S, 39), At = g & C ^ g & a ^ C & a, de = S & B ^ S & u ^ B & u;
1004
- c = D | 0, A = v | 0, D = I | 0, v = L | 0, I = l | 0, L = _ | 0, { h: l, l: _ } = e.add(f | 0, H | 0, X | 0, ot | 0), f = a | 0, H = u | 0, a = C | 0, u = B | 0, C = g | 0, B = S | 0;
1005
- const mt = e.add3L(ot, $, de);
1006
- g = e.add3H(mt, X, J, At), S = mt | 0;
1039
+ let { Ah: L, Al: E, Bh: D, Bl: B, Ch: a, Cl: d, Dh: f, Dl: p, Eh: l, El: S, Fh: U, Fl: k, Gh: F, Gl: v, Hh: c, Hl: g } = this;
1040
+ for (let _ = 0; _ < 80; _++) {
1041
+ const T = e.rotrSH(l, S, 14) ^ e.rotrSH(l, S, 18) ^ e.rotrBH(l, S, 41), G = e.rotrSL(l, S, 14) ^ e.rotrSL(l, S, 18) ^ e.rotrBL(l, S, 41), P = l & U ^ ~l & F, tt = S & k ^ ~S & v, X = e.add5L(g, G, tt, x[_], u[_]), J = e.add5H(X, c, T, P, b[_], H[_]), at = X | 0, Q = e.rotrSH(L, E, 28) ^ e.rotrBH(L, E, 34) ^ e.rotrBH(L, E, 39), et = e.rotrSL(L, E, 28) ^ e.rotrBL(L, E, 34) ^ e.rotrBL(L, E, 39), Lt = L & D ^ L & a ^ D & a, pe = E & B ^ E & d ^ B & d;
1042
+ c = F | 0, g = v | 0, F = U | 0, v = k | 0, U = l | 0, k = S | 0, { h: l, l: S } = e.add(f | 0, p | 0, J | 0, at | 0), f = a | 0, p = d | 0, a = D | 0, d = B | 0, D = L | 0, B = E | 0;
1043
+ const kt = e.add3L(at, et, pe);
1044
+ L = e.add3H(kt, J, Q, Lt), E = kt | 0;
1007
1045
  }
1008
- ({ h: g, l: S } = e.add(this.Ah | 0, this.Al | 0, g | 0, S | 0)), { h: C, l: B } = e.add(this.Bh | 0, this.Bl | 0, C | 0, B | 0), { h: a, l: u } = e.add(this.Ch | 0, this.Cl | 0, a | 0, u | 0), { h: f, l: H } = e.add(this.Dh | 0, this.Dl | 0, f | 0, H | 0), { h: l, l: _ } = e.add(this.Eh | 0, this.El | 0, l | 0, _ | 0), { h: I, l: L } = e.add(this.Fh | 0, this.Fl | 0, I | 0, L | 0), { h: D, l: v } = e.add(this.Gh | 0, this.Gl | 0, D | 0, v | 0), { h: c, l: A } = e.add(this.Hh | 0, this.Hl | 0, c | 0, A | 0), this.set(g, S, C, B, a, u, f, H, l, _, I, L, D, v, c, A);
1046
+ ({ h: L, l: E } = e.add(this.Ah | 0, this.Al | 0, L | 0, E | 0)), { h: D, l: B } = e.add(this.Bh | 0, this.Bl | 0, D | 0, B | 0), { h: a, l: d } = e.add(this.Ch | 0, this.Cl | 0, a | 0, d | 0), { h: f, l: p } = e.add(this.Dh | 0, this.Dl | 0, f | 0, p | 0), { h: l, l: S } = e.add(this.Eh | 0, this.El | 0, l | 0, S | 0), { h: U, l: k } = e.add(this.Fh | 0, this.Fl | 0, U | 0, k | 0), { h: F, l: v } = e.add(this.Gh | 0, this.Gl | 0, F | 0, v | 0), { h: c, l: g } = e.add(this.Hh | 0, this.Hl | 0, c | 0, g | 0), this.set(L, E, D, B, a, d, f, p, l, S, U, k, F, v, c, g);
1009
1047
  }
1010
1048
  roundClean() {
1011
- (0, s.clean)(p, b);
1049
+ (0, s.clean)(H, u);
1012
1050
  }
1013
1051
  destroy() {
1014
1052
  (0, s.clean)(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
1015
1053
  }
1016
1054
  }
1017
- j.SHA512 = U;
1018
- class w extends U {
1055
+ j.SHA512 = A;
1056
+ class m extends A {
1019
1057
  constructor() {
1020
1058
  super(48), this.Ah = t.SHA384_IV[0] | 0, this.Al = t.SHA384_IV[1] | 0, this.Bh = t.SHA384_IV[2] | 0, this.Bl = t.SHA384_IV[3] | 0, this.Ch = t.SHA384_IV[4] | 0, this.Cl = t.SHA384_IV[5] | 0, this.Dh = t.SHA384_IV[6] | 0, this.Dl = t.SHA384_IV[7] | 0, this.Eh = t.SHA384_IV[8] | 0, this.El = t.SHA384_IV[9] | 0, this.Fh = t.SHA384_IV[10] | 0, this.Fl = t.SHA384_IV[11] | 0, this.Gh = t.SHA384_IV[12] | 0, this.Gl = t.SHA384_IV[13] | 0, this.Hh = t.SHA384_IV[14] | 0, this.Hl = t.SHA384_IV[15] | 0;
1021
1059
  }
1022
1060
  }
1023
- j.SHA384 = w;
1024
- const m = /* @__PURE__ */ Uint32Array.from([
1061
+ j.SHA384 = m;
1062
+ const w = /* @__PURE__ */ Uint32Array.from([
1025
1063
  2352822216,
1026
1064
  424955298,
1027
1065
  1944164710,
@@ -1038,7 +1076,7 @@ function ne() {
1038
1076
  1780299464,
1039
1077
  286451373,
1040
1078
  2446758561
1041
- ]), k = /* @__PURE__ */ Uint32Array.from([
1079
+ ]), I = /* @__PURE__ */ Uint32Array.from([
1042
1080
  573645204,
1043
1081
  4230739756,
1044
1082
  2673172387,
@@ -1056,54 +1094,54 @@ function ne() {
1056
1094
  246885852,
1057
1095
  2177182882
1058
1096
  ]);
1059
- class M extends U {
1097
+ class C extends A {
1060
1098
  constructor() {
1061
- super(28), this.Ah = m[0] | 0, this.Al = m[1] | 0, this.Bh = m[2] | 0, this.Bl = m[3] | 0, this.Ch = m[4] | 0, this.Cl = m[5] | 0, this.Dh = m[6] | 0, this.Dl = m[7] | 0, this.Eh = m[8] | 0, this.El = m[9] | 0, this.Fh = m[10] | 0, this.Fl = m[11] | 0, this.Gh = m[12] | 0, this.Gl = m[13] | 0, this.Hh = m[14] | 0, this.Hl = m[15] | 0;
1099
+ super(28), this.Ah = w[0] | 0, this.Al = w[1] | 0, this.Bh = w[2] | 0, this.Bl = w[3] | 0, this.Ch = w[4] | 0, this.Cl = w[5] | 0, this.Dh = w[6] | 0, this.Dl = w[7] | 0, this.Eh = w[8] | 0, this.El = w[9] | 0, this.Fh = w[10] | 0, this.Fl = w[11] | 0, this.Gh = w[12] | 0, this.Gl = w[13] | 0, this.Hh = w[14] | 0, this.Hl = w[15] | 0;
1062
1100
  }
1063
1101
  }
1064
- j.SHA512_224 = M;
1065
- class P extends U {
1102
+ j.SHA512_224 = C;
1103
+ class R extends A {
1066
1104
  constructor() {
1067
- super(32), this.Ah = k[0] | 0, this.Al = k[1] | 0, this.Bh = k[2] | 0, this.Bl = k[3] | 0, this.Ch = k[4] | 0, this.Cl = k[5] | 0, this.Dh = k[6] | 0, this.Dl = k[7] | 0, this.Eh = k[8] | 0, this.El = k[9] | 0, this.Fh = k[10] | 0, this.Fl = k[11] | 0, this.Gh = k[12] | 0, this.Gl = k[13] | 0, this.Hh = k[14] | 0, this.Hl = k[15] | 0;
1105
+ super(32), this.Ah = I[0] | 0, this.Al = I[1] | 0, this.Bh = I[2] | 0, this.Bl = I[3] | 0, this.Ch = I[4] | 0, this.Cl = I[5] | 0, this.Dh = I[6] | 0, this.Dl = I[7] | 0, this.Eh = I[8] | 0, this.El = I[9] | 0, this.Fh = I[10] | 0, this.Fl = I[11] | 0, this.Gh = I[12] | 0, this.Gl = I[13] | 0, this.Hh = I[14] | 0, this.Hl = I[15] | 0;
1068
1106
  }
1069
1107
  }
1070
- return j.SHA512_256 = P, j.sha256 = (0, s.createHasher)(() => new n()), j.sha224 = (0, s.createHasher)(() => new r()), j.sha512 = (0, s.createHasher)(() => new U()), j.sha384 = (0, s.createHasher)(() => new w()), j.sha512_256 = (0, s.createHasher)(() => new P()), j.sha512_224 = (0, s.createHasher)(() => new M()), j;
1108
+ return j.SHA512_256 = R, j.sha256 = (0, s.createHasher)(() => new r()), j.sha224 = (0, s.createHasher)(() => new n()), j.sha512 = (0, s.createHasher)(() => new A()), j.sha384 = (0, s.createHasher)(() => new m()), j.sha512_256 = (0, s.createHasher)(() => new R()), j.sha512_224 = (0, s.createHasher)(() => new C()), j;
1071
1109
  }
1072
- var _t = {}, Mt;
1073
- function Oe() {
1074
- return Mt || (Mt = 1, (function(t) {
1110
+ var mt = {}, jt;
1111
+ function Pe() {
1112
+ return jt || (jt = 1, (function(t) {
1075
1113
  Object.defineProperty(t, "__esModule", { value: !0 }), t.hmac = t.HMAC = void 0;
1076
- const e = /* @__PURE__ */ lt();
1114
+ const e = /* @__PURE__ */ pt();
1077
1115
  class s extends e.Hash {
1078
- constructor(n, r) {
1079
- super(), this.finished = !1, this.destroyed = !1, (0, e.ahash)(n);
1080
- const h = (0, e.toBytes)(r);
1081
- if (this.iHash = n.create(), typeof this.iHash.update != "function")
1116
+ constructor(r, n) {
1117
+ super(), this.finished = !1, this.destroyed = !1, (0, e.ahash)(r);
1118
+ const h = (0, e.toBytes)(n);
1119
+ if (this.iHash = r.create(), typeof this.iHash.update != "function")
1082
1120
  throw new Error("Expected instance of class which extends utils.Hash");
1083
1121
  this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
1084
- const d = this.blockLen, x = new Uint8Array(d);
1085
- x.set(h.length > d ? n.create().update(h).digest() : h);
1086
- for (let p = 0; p < x.length; p++)
1087
- x[p] ^= 54;
1088
- this.iHash.update(x), this.oHash = n.create();
1089
- for (let p = 0; p < x.length; p++)
1090
- x[p] ^= 106;
1122
+ const b = this.blockLen, x = new Uint8Array(b);
1123
+ x.set(h.length > b ? r.create().update(h).digest() : h);
1124
+ for (let H = 0; H < x.length; H++)
1125
+ x[H] ^= 54;
1126
+ this.iHash.update(x), this.oHash = r.create();
1127
+ for (let H = 0; H < x.length; H++)
1128
+ x[H] ^= 106;
1091
1129
  this.oHash.update(x), (0, e.clean)(x);
1092
1130
  }
1093
- update(n) {
1094
- return (0, e.aexists)(this), this.iHash.update(n), this;
1131
+ update(r) {
1132
+ return (0, e.aexists)(this), this.iHash.update(r), this;
1095
1133
  }
1096
- digestInto(n) {
1097
- (0, e.aexists)(this), (0, e.abytes)(n, this.outputLen), this.finished = !0, this.iHash.digestInto(n), this.oHash.update(n), this.oHash.digestInto(n), this.destroy();
1134
+ digestInto(r) {
1135
+ (0, e.aexists)(this), (0, e.abytes)(r, this.outputLen), this.finished = !0, this.iHash.digestInto(r), this.oHash.update(r), this.oHash.digestInto(r), this.destroy();
1098
1136
  }
1099
1137
  digest() {
1100
- const n = new Uint8Array(this.oHash.outputLen);
1101
- return this.digestInto(n), n;
1138
+ const r = new Uint8Array(this.oHash.outputLen);
1139
+ return this.digestInto(r), r;
1102
1140
  }
1103
- _cloneInto(n) {
1104
- n || (n = Object.create(Object.getPrototypeOf(this), {}));
1105
- const { oHash: r, iHash: h, finished: d, destroyed: x, blockLen: p, outputLen: b } = this;
1106
- return n = n, n.finished = d, n.destroyed = x, n.blockLen = p, n.outputLen = b, n.oHash = r._cloneInto(n.oHash), n.iHash = h._cloneInto(n.iHash), n;
1141
+ _cloneInto(r) {
1142
+ r || (r = Object.create(Object.getPrototypeOf(this), {}));
1143
+ const { oHash: n, iHash: h, finished: b, destroyed: x, blockLen: H, outputLen: u } = this;
1144
+ return r = r, r.finished = b, r.destroyed = x, r.blockLen = H, r.outputLen = u, r.oHash = n._cloneInto(r.oHash), r.iHash = h._cloneInto(r.iHash), r;
1107
1145
  }
1108
1146
  clone() {
1109
1147
  return this._cloneInto();
@@ -1113,15 +1151,15 @@ function Oe() {
1113
1151
  }
1114
1152
  }
1115
1153
  t.HMAC = s;
1116
- const i = (o, n, r) => new s(o, n).update(r).digest();
1117
- t.hmac = i, t.hmac.create = (o, n) => new s(o, n);
1118
- })(_t)), _t;
1154
+ const i = (o, r, n) => new s(o, r).update(n).digest();
1155
+ t.hmac = i, t.hmac.create = (o, r) => new s(o, r);
1156
+ })(mt)), mt;
1119
1157
  }
1120
- var rt = {}, K = {}, Tt;
1121
- function Me() {
1122
- if (Tt) return K;
1123
- Tt = 1, Object.defineProperty(K, "__esModule", { value: !0 }), K.ripemd160 = K.RIPEMD160 = K.md5 = K.MD5 = K.sha1 = K.SHA1 = void 0;
1124
- const t = /* @__PURE__ */ se(), e = /* @__PURE__ */ lt(), s = /* @__PURE__ */ Uint32Array.from([
1158
+ var ot = {}, N = {}, Pt;
1159
+ function We() {
1160
+ if (Pt) return N;
1161
+ Pt = 1, Object.defineProperty(N, "__esModule", { value: !0 }), N.ripemd160 = N.RIPEMD160 = N.md5 = N.MD5 = N.sha1 = N.SHA1 = void 0;
1162
+ const t = /* @__PURE__ */ oe(), e = /* @__PURE__ */ pt(), s = /* @__PURE__ */ Uint32Array.from([
1125
1163
  1732584193,
1126
1164
  4023233417,
1127
1165
  2562383102,
@@ -1133,25 +1171,25 @@ function Me() {
1133
1171
  super(64, 20, 8, !1), this.A = s[0] | 0, this.B = s[1] | 0, this.C = s[2] | 0, this.D = s[3] | 0, this.E = s[4] | 0;
1134
1172
  }
1135
1173
  get() {
1136
- const { A: a, B: u, C: f, D: H, E: l } = this;
1137
- return [a, u, f, H, l];
1138
- }
1139
- set(a, u, f, H, l) {
1140
- this.A = a | 0, this.B = u | 0, this.C = f | 0, this.D = H | 0, this.E = l | 0;
1141
- }
1142
- process(a, u) {
1143
- for (let L = 0; L < 16; L++, u += 4)
1144
- i[L] = a.getUint32(u, !1);
1145
- for (let L = 16; L < 80; L++)
1146
- i[L] = (0, e.rotl)(i[L - 3] ^ i[L - 8] ^ i[L - 14] ^ i[L - 16], 1);
1147
- let { A: f, B: H, C: l, D: _, E: I } = this;
1148
- for (let L = 0; L < 80; L++) {
1149
- let D, v;
1150
- L < 20 ? (D = (0, t.Chi)(H, l, _), v = 1518500249) : L < 40 ? (D = H ^ l ^ _, v = 1859775393) : L < 60 ? (D = (0, t.Maj)(H, l, _), v = 2400959708) : (D = H ^ l ^ _, v = 3395469782);
1151
- const c = (0, e.rotl)(f, 5) + D + I + v + i[L] | 0;
1152
- I = _, _ = l, l = (0, e.rotl)(H, 30), H = f, f = c;
1174
+ const { A: a, B: d, C: f, D: p, E: l } = this;
1175
+ return [a, d, f, p, l];
1176
+ }
1177
+ set(a, d, f, p, l) {
1178
+ this.A = a | 0, this.B = d | 0, this.C = f | 0, this.D = p | 0, this.E = l | 0;
1179
+ }
1180
+ process(a, d) {
1181
+ for (let k = 0; k < 16; k++, d += 4)
1182
+ i[k] = a.getUint32(d, !1);
1183
+ for (let k = 16; k < 80; k++)
1184
+ i[k] = (0, e.rotl)(i[k - 3] ^ i[k - 8] ^ i[k - 14] ^ i[k - 16], 1);
1185
+ let { A: f, B: p, C: l, D: S, E: U } = this;
1186
+ for (let k = 0; k < 80; k++) {
1187
+ let F, v;
1188
+ k < 20 ? (F = (0, t.Chi)(p, l, S), v = 1518500249) : k < 40 ? (F = p ^ l ^ S, v = 1859775393) : k < 60 ? (F = (0, t.Maj)(p, l, S), v = 2400959708) : (F = p ^ l ^ S, v = 3395469782);
1189
+ const c = (0, e.rotl)(f, 5) + F + U + v + i[k] | 0;
1190
+ U = S, S = l, l = (0, e.rotl)(p, 30), p = f, f = c;
1153
1191
  }
1154
- f = f + this.A | 0, H = H + this.B | 0, l = l + this.C | 0, _ = _ + this.D | 0, I = I + this.E | 0, this.set(f, H, l, _, I);
1192
+ f = f + this.A | 0, p = p + this.B | 0, l = l + this.C | 0, S = S + this.D | 0, U = U + this.E | 0, this.set(f, p, l, S, U);
1155
1193
  }
1156
1194
  roundClean() {
1157
1195
  (0, e.clean)(i);
@@ -1160,38 +1198,38 @@ function Me() {
1160
1198
  this.set(0, 0, 0, 0, 0), (0, e.clean)(this.buffer);
1161
1199
  }
1162
1200
  }
1163
- K.SHA1 = o, K.sha1 = (0, e.createHasher)(() => new o());
1164
- const n = /* @__PURE__ */ Math.pow(2, 32), r = /* @__PURE__ */ Array.from({ length: 64 }, (B, a) => Math.floor(n * Math.abs(Math.sin(a + 1)))), h = /* @__PURE__ */ s.slice(0, 4), d = /* @__PURE__ */ new Uint32Array(16);
1201
+ N.SHA1 = o, N.sha1 = (0, e.createHasher)(() => new o());
1202
+ const r = /* @__PURE__ */ Math.pow(2, 32), n = /* @__PURE__ */ Array.from({ length: 64 }, (B, a) => Math.floor(r * Math.abs(Math.sin(a + 1)))), h = /* @__PURE__ */ s.slice(0, 4), b = /* @__PURE__ */ new Uint32Array(16);
1165
1203
  class x extends t.HashMD {
1166
1204
  constructor() {
1167
1205
  super(64, 16, 8, !0), this.A = h[0] | 0, this.B = h[1] | 0, this.C = h[2] | 0, this.D = h[3] | 0;
1168
1206
  }
1169
1207
  get() {
1170
- const { A: a, B: u, C: f, D: H } = this;
1171
- return [a, u, f, H];
1172
- }
1173
- set(a, u, f, H) {
1174
- this.A = a | 0, this.B = u | 0, this.C = f | 0, this.D = H | 0;
1175
- }
1176
- process(a, u) {
1177
- for (let I = 0; I < 16; I++, u += 4)
1178
- d[I] = a.getUint32(u, !0);
1179
- let { A: f, B: H, C: l, D: _ } = this;
1180
- for (let I = 0; I < 64; I++) {
1181
- let L, D, v;
1182
- I < 16 ? (L = (0, t.Chi)(H, l, _), D = I, v = [7, 12, 17, 22]) : I < 32 ? (L = (0, t.Chi)(_, H, l), D = (5 * I + 1) % 16, v = [5, 9, 14, 20]) : I < 48 ? (L = H ^ l ^ _, D = (3 * I + 5) % 16, v = [4, 11, 16, 23]) : (L = l ^ (H | ~_), D = 7 * I % 16, v = [6, 10, 15, 21]), L = L + f + r[I] + d[D], f = _, _ = l, l = H, H = H + (0, e.rotl)(L, v[I % 4]);
1208
+ const { A: a, B: d, C: f, D: p } = this;
1209
+ return [a, d, f, p];
1210
+ }
1211
+ set(a, d, f, p) {
1212
+ this.A = a | 0, this.B = d | 0, this.C = f | 0, this.D = p | 0;
1213
+ }
1214
+ process(a, d) {
1215
+ for (let U = 0; U < 16; U++, d += 4)
1216
+ b[U] = a.getUint32(d, !0);
1217
+ let { A: f, B: p, C: l, D: S } = this;
1218
+ for (let U = 0; U < 64; U++) {
1219
+ let k, F, v;
1220
+ U < 16 ? (k = (0, t.Chi)(p, l, S), F = U, v = [7, 12, 17, 22]) : U < 32 ? (k = (0, t.Chi)(S, p, l), F = (5 * U + 1) % 16, v = [5, 9, 14, 20]) : U < 48 ? (k = p ^ l ^ S, F = (3 * U + 5) % 16, v = [4, 11, 16, 23]) : (k = l ^ (p | ~S), F = 7 * U % 16, v = [6, 10, 15, 21]), k = k + f + n[U] + b[F], f = S, S = l, l = p, p = p + (0, e.rotl)(k, v[U % 4]);
1183
1221
  }
1184
- f = f + this.A | 0, H = H + this.B | 0, l = l + this.C | 0, _ = _ + this.D | 0, this.set(f, H, l, _);
1222
+ f = f + this.A | 0, p = p + this.B | 0, l = l + this.C | 0, S = S + this.D | 0, this.set(f, p, l, S);
1185
1223
  }
1186
1224
  roundClean() {
1187
- (0, e.clean)(d);
1225
+ (0, e.clean)(b);
1188
1226
  }
1189
1227
  destroy() {
1190
1228
  this.set(0, 0, 0, 0), (0, e.clean)(this.buffer);
1191
1229
  }
1192
1230
  }
1193
- K.MD5 = x, K.md5 = (0, e.createHasher)(() => new x());
1194
- const p = /* @__PURE__ */ Uint8Array.from([
1231
+ N.MD5 = x, N.md5 = (0, e.createHasher)(() => new x());
1232
+ const H = /* @__PURE__ */ Uint8Array.from([
1195
1233
  7,
1196
1234
  4,
1197
1235
  13,
@@ -1208,212 +1246,212 @@ function Me() {
1208
1246
  14,
1209
1247
  11,
1210
1248
  8
1211
- ]), b = Uint8Array.from(new Array(16).fill(0).map((B, a) => a)), U = b.map((B) => (9 * B + 5) % 16), w = /* @__PURE__ */ (() => {
1212
- const u = [[b], [U]];
1249
+ ]), u = Uint8Array.from(new Array(16).fill(0).map((B, a) => a)), A = u.map((B) => (9 * B + 5) % 16), m = /* @__PURE__ */ (() => {
1250
+ const d = [[u], [A]];
1213
1251
  for (let f = 0; f < 4; f++)
1214
- for (let H of u)
1215
- H.push(H[f].map((l) => p[l]));
1216
- return u;
1217
- })(), m = w[0], k = w[1], M = /* @__PURE__ */ [
1252
+ for (let p of d)
1253
+ p.push(p[f].map((l) => H[l]));
1254
+ return d;
1255
+ })(), w = m[0], I = m[1], C = /* @__PURE__ */ [
1218
1256
  [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],
1219
1257
  [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7],
1220
1258
  [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],
1221
1259
  [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],
1222
1260
  [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5]
1223
- ].map((B) => Uint8Array.from(B)), P = /* @__PURE__ */ m.map((B, a) => B.map((u) => M[a][u])), R = /* @__PURE__ */ k.map((B, a) => B.map((u) => M[a][u])), V = /* @__PURE__ */ Uint32Array.from([
1261
+ ].map((B) => Uint8Array.from(B)), R = /* @__PURE__ */ w.map((B, a) => B.map((d) => C[a][d])), M = /* @__PURE__ */ I.map((B, a) => B.map((d) => C[a][d])), y = /* @__PURE__ */ Uint32Array.from([
1224
1262
  0,
1225
1263
  1518500249,
1226
1264
  1859775393,
1227
1265
  2400959708,
1228
1266
  2840853838
1229
- ]), T = /* @__PURE__ */ Uint32Array.from([
1267
+ ]), O = /* @__PURE__ */ Uint32Array.from([
1230
1268
  1352829926,
1231
1269
  1548603684,
1232
1270
  1836072691,
1233
1271
  2053994217,
1234
1272
  0
1235
1273
  ]);
1236
- function g(B, a, u, f) {
1237
- return B === 0 ? a ^ u ^ f : B === 1 ? a & u | ~a & f : B === 2 ? (a | ~u) ^ f : B === 3 ? a & f | u & ~f : a ^ (u | ~f);
1274
+ function L(B, a, d, f) {
1275
+ return B === 0 ? a ^ d ^ f : B === 1 ? a & d | ~a & f : B === 2 ? (a | ~d) ^ f : B === 3 ? a & f | d & ~f : a ^ (d | ~f);
1238
1276
  }
1239
- const S = /* @__PURE__ */ new Uint32Array(16);
1240
- class C extends t.HashMD {
1277
+ const E = /* @__PURE__ */ new Uint32Array(16);
1278
+ class D extends t.HashMD {
1241
1279
  constructor() {
1242
1280
  super(64, 20, 8, !0), this.h0 = 1732584193, this.h1 = -271733879, this.h2 = -1732584194, this.h3 = 271733878, this.h4 = -1009589776;
1243
1281
  }
1244
1282
  get() {
1245
- const { h0: a, h1: u, h2: f, h3: H, h4: l } = this;
1246
- return [a, u, f, H, l];
1247
- }
1248
- set(a, u, f, H, l) {
1249
- this.h0 = a | 0, this.h1 = u | 0, this.h2 = f | 0, this.h3 = H | 0, this.h4 = l | 0;
1250
- }
1251
- process(a, u) {
1252
- for (let y = 0; y < 16; y++, u += 4)
1253
- S[y] = a.getUint32(u, !0);
1254
- let f = this.h0 | 0, H = f, l = this.h1 | 0, _ = l, I = this.h2 | 0, L = I, D = this.h3 | 0, v = D, c = this.h4 | 0, A = c;
1255
- for (let y = 0; y < 5; y++) {
1256
- const O = 4 - y, F = V[y], G = T[y], z = m[y], N = k[y], X = P[y], ot = R[y];
1257
- for (let J = 0; J < 16; J++) {
1258
- const $ = (0, e.rotl)(f + g(y, l, I, D) + S[z[J]] + F, X[J]) + c | 0;
1259
- f = c, c = D, D = (0, e.rotl)(I, 10) | 0, I = l, l = $;
1283
+ const { h0: a, h1: d, h2: f, h3: p, h4: l } = this;
1284
+ return [a, d, f, p, l];
1285
+ }
1286
+ set(a, d, f, p, l) {
1287
+ this.h0 = a | 0, this.h1 = d | 0, this.h2 = f | 0, this.h3 = p | 0, this.h4 = l | 0;
1288
+ }
1289
+ process(a, d) {
1290
+ for (let _ = 0; _ < 16; _++, d += 4)
1291
+ E[_] = a.getUint32(d, !0);
1292
+ let f = this.h0 | 0, p = f, l = this.h1 | 0, S = l, U = this.h2 | 0, k = U, F = this.h3 | 0, v = F, c = this.h4 | 0, g = c;
1293
+ for (let _ = 0; _ < 5; _++) {
1294
+ const T = 4 - _, G = y[_], P = O[_], tt = w[_], X = I[_], J = R[_], at = M[_];
1295
+ for (let Q = 0; Q < 16; Q++) {
1296
+ const et = (0, e.rotl)(f + L(_, l, U, F) + E[tt[Q]] + G, J[Q]) + c | 0;
1297
+ f = c, c = F, F = (0, e.rotl)(U, 10) | 0, U = l, l = et;
1260
1298
  }
1261
- for (let J = 0; J < 16; J++) {
1262
- const $ = (0, e.rotl)(H + g(O, _, L, v) + S[N[J]] + G, ot[J]) + A | 0;
1263
- H = A, A = v, v = (0, e.rotl)(L, 10) | 0, L = _, _ = $;
1299
+ for (let Q = 0; Q < 16; Q++) {
1300
+ const et = (0, e.rotl)(p + L(T, S, k, v) + E[X[Q]] + P, at[Q]) + g | 0;
1301
+ p = g, g = v, v = (0, e.rotl)(k, 10) | 0, k = S, S = et;
1264
1302
  }
1265
1303
  }
1266
- this.set(this.h1 + I + v | 0, this.h2 + D + A | 0, this.h3 + c + H | 0, this.h4 + f + _ | 0, this.h0 + l + L | 0);
1304
+ this.set(this.h1 + U + v | 0, this.h2 + F + g | 0, this.h3 + c + p | 0, this.h4 + f + S | 0, this.h0 + l + k | 0);
1267
1305
  }
1268
1306
  roundClean() {
1269
- (0, e.clean)(S);
1307
+ (0, e.clean)(E);
1270
1308
  }
1271
1309
  destroy() {
1272
1310
  this.destroyed = !0, (0, e.clean)(this.buffer), this.set(0, 0, 0, 0, 0);
1273
1311
  }
1274
1312
  }
1275
- return K.RIPEMD160 = C, K.ripemd160 = (0, e.createHasher)(() => new C()), K;
1313
+ return N.RIPEMD160 = D, N.ripemd160 = (0, e.createHasher)(() => new D()), N;
1276
1314
  }
1277
- var vt;
1278
- function us() {
1279
- if (vt) return rt;
1280
- vt = 1, Object.defineProperty(rt, "__esModule", { value: !0 }), rt.ripemd160 = rt.RIPEMD160 = void 0;
1281
- const t = /* @__PURE__ */ Me();
1282
- return rt.RIPEMD160 = t.RIPEMD160, rt.ripemd160 = t.ripemd160, rt;
1315
+ var Wt;
1316
+ function As() {
1317
+ if (Wt) return ot;
1318
+ Wt = 1, Object.defineProperty(ot, "__esModule", { value: !0 }), ot.ripemd160 = ot.RIPEMD160 = void 0;
1319
+ const t = /* @__PURE__ */ We();
1320
+ return ot.RIPEMD160 = t.RIPEMD160, ot.ripemd160 = t.ripemd160, ot;
1283
1321
  }
1284
- var Q = {}, Ft;
1285
- function ds() {
1286
- if (Ft) return Q;
1287
- Ft = 1, Object.defineProperty(Q, "__esModule", { value: !0 }), Q.sha224 = Q.SHA224 = Q.sha256 = Q.SHA256 = void 0;
1288
- const t = /* @__PURE__ */ ne();
1289
- return Q.SHA256 = t.SHA256, Q.sha256 = t.sha256, Q.SHA224 = t.SHA224, Q.sha224 = t.sha224, Q;
1322
+ var Y = {}, qt;
1323
+ function ys() {
1324
+ if (qt) return Y;
1325
+ qt = 1, Object.defineProperty(Y, "__esModule", { value: !0 }), Y.sha224 = Y.SHA224 = Y.sha256 = Y.SHA256 = void 0;
1326
+ const t = /* @__PURE__ */ ce();
1327
+ return Y.SHA256 = t.SHA256, Y.sha256 = t.sha256, Y.SHA224 = t.SHA224, Y.sha224 = t.sha224, Y;
1290
1328
  }
1291
- var q = {}, Rt;
1292
- function ls() {
1293
- if (Rt) return q;
1294
- Rt = 1, Object.defineProperty(q, "__esModule", { value: !0 }), q.sha512_256 = q.SHA512_256 = q.sha512_224 = q.SHA512_224 = q.sha384 = q.SHA384 = q.sha512 = q.SHA512 = void 0;
1295
- const t = /* @__PURE__ */ ne();
1296
- return q.SHA512 = t.SHA512, q.sha512 = t.sha512, q.SHA384 = t.SHA384, q.sha384 = t.sha384, q.SHA512_224 = t.SHA512_224, q.sha512_224 = t.sha512_224, q.SHA512_256 = t.SHA512_256, q.sha512_256 = t.sha512_256, q;
1329
+ var W = {}, Kt;
1330
+ function gs() {
1331
+ if (Kt) return W;
1332
+ Kt = 1, Object.defineProperty(W, "__esModule", { value: !0 }), W.sha512_256 = W.SHA512_256 = W.sha512_224 = W.SHA512_224 = W.sha384 = W.SHA384 = W.sha512 = W.SHA512 = void 0;
1333
+ const t = /* @__PURE__ */ ce();
1334
+ return W.SHA512 = t.SHA512, W.sha512 = t.sha512, W.SHA384 = t.SHA384, W.sha384 = t.sha384, W.SHA512_224 = t.SHA512_224, W.sha512_224 = t.sha512_224, W.SHA512_256 = t.SHA512_256, W.sha512_256 = t.sha512_256, W;
1297
1335
  }
1298
- function Te(t) {
1336
+ function qe(t) {
1299
1337
  return t instanceof Uint8Array || ArrayBuffer.isView(t) && t.constructor.name === "Uint8Array";
1300
1338
  }
1301
- function jt(t, e = "") {
1339
+ function Nt(t, e = "") {
1302
1340
  if (!Number.isSafeInteger(t) || t < 0) {
1303
1341
  const s = e && `"${e}" `;
1304
1342
  throw new Error(`${s}expected integer >= 0, got ${t}`);
1305
1343
  }
1306
1344
  }
1307
- function Ht(t, e, s = "") {
1308
- const i = Te(t), o = t?.length, n = e !== void 0;
1309
- if (!i || n && o !== e) {
1310
- const r = s && `"${s}" `, h = n ? ` of length ${e}` : "", d = i ? `length=${o}` : `type=${typeof t}`;
1311
- throw new Error(r + "expected Uint8Array" + h + ", got " + d);
1345
+ function It(t, e, s = "") {
1346
+ const i = qe(t), o = t?.length, r = e !== void 0;
1347
+ if (!i || r && o !== e) {
1348
+ const n = s && `"${s}" `, h = r ? ` of length ${e}` : "", b = i ? `length=${o}` : `type=${typeof t}`;
1349
+ throw new Error(n + "expected Uint8Array" + h + ", got " + b);
1312
1350
  }
1313
1351
  return t;
1314
1352
  }
1315
- function Pt(t, e = !0) {
1353
+ function Xt(t, e = !0) {
1316
1354
  if (t.destroyed)
1317
1355
  throw new Error("Hash instance has been destroyed");
1318
1356
  if (e && t.finished)
1319
1357
  throw new Error("Hash#digest() has already been called");
1320
1358
  }
1321
- function ve(t, e) {
1322
- Ht(t, void 0, "digestInto() output");
1359
+ function Ke(t, e) {
1360
+ It(t, void 0, "digestInto() output");
1323
1361
  const s = e.outputLen;
1324
1362
  if (t.length < s)
1325
1363
  throw new Error('"digestInto() output" expected to be of length >=' + s);
1326
1364
  }
1327
- function Fe(t) {
1365
+ function Ne(t) {
1328
1366
  return new Uint32Array(t.buffer, t.byteOffset, Math.floor(t.byteLength / 4));
1329
1367
  }
1330
- function re(...t) {
1368
+ function he(...t) {
1331
1369
  for (let e = 0; e < t.length; e++)
1332
1370
  t[e].fill(0);
1333
1371
  }
1334
- const Re = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
1335
- function je(t) {
1372
+ const Xe = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
1373
+ function Je(t) {
1336
1374
  return t << 24 & 4278190080 | t << 8 & 16711680 | t >>> 8 & 65280 | t >>> 24 & 255;
1337
1375
  }
1338
- function Pe(t) {
1376
+ function Qe(t) {
1339
1377
  for (let e = 0; e < t.length; e++)
1340
- t[e] = je(t[e]);
1378
+ t[e] = Je(t[e]);
1341
1379
  return t;
1342
1380
  }
1343
- const Gt = Re ? (t) => t : Pe;
1344
- function bs(...t) {
1381
+ const Jt = Xe ? (t) => t : Qe;
1382
+ function _s(...t) {
1345
1383
  let e = 0;
1346
1384
  for (let i = 0; i < t.length; i++) {
1347
1385
  const o = t[i];
1348
- Ht(o), e += o.length;
1386
+ It(o), e += o.length;
1349
1387
  }
1350
1388
  const s = new Uint8Array(e);
1351
1389
  for (let i = 0, o = 0; i < t.length; i++) {
1352
- const n = t[i];
1353
- s.set(n, o), o += n.length;
1390
+ const r = t[i];
1391
+ s.set(r, o), o += r.length;
1354
1392
  }
1355
1393
  return s;
1356
1394
  }
1357
- function Ge(t, e = {}) {
1358
- const s = (o, n) => t(n).update(o).digest(), i = t(void 0);
1395
+ function Ye(t, e = {}) {
1396
+ const s = (o, r) => t(r).update(o).digest(), i = t(void 0);
1359
1397
  return s.outputLen = i.outputLen, s.blockLen = i.blockLen, s.create = (o) => t(o), Object.assign(s, e), Object.freeze(s);
1360
1398
  }
1361
- function xs(t = 32) {
1399
+ function ws(t = 32) {
1362
1400
  const e = typeof globalThis == "object" ? globalThis.crypto : null;
1363
1401
  if (typeof e?.getRandomValues != "function")
1364
1402
  throw new Error("crypto.getRandomValues must be defined");
1365
1403
  return e.getRandomValues(new Uint8Array(t));
1366
1404
  }
1367
- const ie = (t) => ({
1405
+ const ae = (t) => ({
1368
1406
  oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, t])
1369
- }), xt = /* @__PURE__ */ BigInt(2 ** 32 - 1), qt = /* @__PURE__ */ BigInt(32);
1370
- function qe(t, e = !1) {
1371
- return e ? { h: Number(t & xt), l: Number(t >> qt & xt) } : { h: Number(t >> qt & xt) | 0, l: Number(t & xt) | 0 };
1407
+ }), _t = /* @__PURE__ */ BigInt(2 ** 32 - 1), Qt = /* @__PURE__ */ BigInt(32);
1408
+ function Ze(t, e = !1) {
1409
+ return e ? { h: Number(t & _t), l: Number(t >> Qt & _t) } : { h: Number(t >> Qt & _t) | 0, l: Number(t & _t) | 0 };
1372
1410
  }
1373
- function We(t, e = !1) {
1411
+ function ze(t, e = !1) {
1374
1412
  const s = t.length;
1375
1413
  let i = new Uint32Array(s), o = new Uint32Array(s);
1376
- for (let n = 0; n < s; n++) {
1377
- const { h: r, l: h } = qe(t[n], e);
1378
- [i[n], o[n]] = [r, h];
1414
+ for (let r = 0; r < s; r++) {
1415
+ const { h: n, l: h } = Ze(t[r], e);
1416
+ [i[r], o[r]] = [n, h];
1379
1417
  }
1380
1418
  return [i, o];
1381
1419
  }
1382
- const Ke = (t, e, s) => t << s | e >>> 32 - s, Ne = (t, e, s) => e << s | t >>> 32 - s, Xe = (t, e, s) => e << s - 32 | t >>> 64 - s, Je = (t, e, s) => t << s - 32 | e >>> 64 - s, Qe = BigInt(0), ut = BigInt(1), Ye = BigInt(2), Ze = BigInt(7), ze = BigInt(256), $e = BigInt(113), oe = [], ce = [], he = [];
1383
- for (let t = 0, e = ut, s = 1, i = 0; t < 24; t++) {
1384
- [s, i] = [i, (2 * s + 3 * i) % 5], oe.push(2 * (5 * i + s)), ce.push((t + 1) * (t + 2) / 2 % 64);
1385
- let o = Qe;
1386
- for (let n = 0; n < 7; n++)
1387
- e = (e << ut ^ (e >> Ze) * $e) % ze, e & Ye && (o ^= ut << (ut << BigInt(n)) - ut);
1388
- he.push(o);
1420
+ const $e = (t, e, s) => t << s | e >>> 32 - s, ts = (t, e, s) => e << s | t >>> 32 - s, es = (t, e, s) => e << s - 32 | t >>> 64 - s, ss = (t, e, s) => t << s - 32 | e >>> 64 - s, ns = BigInt(0), bt = BigInt(1), rs = BigInt(2), is = BigInt(7), os = BigInt(256), cs = BigInt(113), fe = [], de = [], ue = [];
1421
+ for (let t = 0, e = bt, s = 1, i = 0; t < 24; t++) {
1422
+ [s, i] = [i, (2 * s + 3 * i) % 5], fe.push(2 * (5 * i + s)), de.push((t + 1) * (t + 2) / 2 % 64);
1423
+ let o = ns;
1424
+ for (let r = 0; r < 7; r++)
1425
+ e = (e << bt ^ (e >> is) * cs) % os, e & rs && (o ^= bt << (bt << BigInt(r)) - bt);
1426
+ ue.push(o);
1389
1427
  }
1390
- const ae = We(he, !0), ts = ae[0], es = ae[1], Wt = (t, e, s) => s > 32 ? Xe(t, e, s) : Ke(t, e, s), Kt = (t, e, s) => s > 32 ? Je(t, e, s) : Ne(t, e, s);
1391
- function ss(t, e = 24) {
1428
+ const le = ze(ue, !0), hs = le[0], as = le[1], Yt = (t, e, s) => s > 32 ? es(t, e, s) : $e(t, e, s), Zt = (t, e, s) => s > 32 ? ss(t, e, s) : ts(t, e, s);
1429
+ function fs(t, e = 24) {
1392
1430
  const s = new Uint32Array(10);
1393
1431
  for (let i = 24 - e; i < 24; i++) {
1394
- for (let r = 0; r < 10; r++)
1395
- s[r] = t[r] ^ t[r + 10] ^ t[r + 20] ^ t[r + 30] ^ t[r + 40];
1396
- for (let r = 0; r < 10; r += 2) {
1397
- const h = (r + 8) % 10, d = (r + 2) % 10, x = s[d], p = s[d + 1], b = Wt(x, p, 1) ^ s[h], U = Kt(x, p, 1) ^ s[h + 1];
1398
- for (let w = 0; w < 50; w += 10)
1399
- t[r + w] ^= b, t[r + w + 1] ^= U;
1400
- }
1401
- let o = t[2], n = t[3];
1402
- for (let r = 0; r < 24; r++) {
1403
- const h = ce[r], d = Wt(o, n, h), x = Kt(o, n, h), p = oe[r];
1404
- o = t[p], n = t[p + 1], t[p] = d, t[p + 1] = x;
1405
- }
1406
- for (let r = 0; r < 50; r += 10) {
1432
+ for (let n = 0; n < 10; n++)
1433
+ s[n] = t[n] ^ t[n + 10] ^ t[n + 20] ^ t[n + 30] ^ t[n + 40];
1434
+ for (let n = 0; n < 10; n += 2) {
1435
+ const h = (n + 8) % 10, b = (n + 2) % 10, x = s[b], H = s[b + 1], u = Yt(x, H, 1) ^ s[h], A = Zt(x, H, 1) ^ s[h + 1];
1436
+ for (let m = 0; m < 50; m += 10)
1437
+ t[n + m] ^= u, t[n + m + 1] ^= A;
1438
+ }
1439
+ let o = t[2], r = t[3];
1440
+ for (let n = 0; n < 24; n++) {
1441
+ const h = de[n], b = Yt(o, r, h), x = Zt(o, r, h), H = fe[n];
1442
+ o = t[H], r = t[H + 1], t[H] = b, t[H + 1] = x;
1443
+ }
1444
+ for (let n = 0; n < 50; n += 10) {
1407
1445
  for (let h = 0; h < 10; h++)
1408
- s[h] = t[r + h];
1446
+ s[h] = t[n + h];
1409
1447
  for (let h = 0; h < 10; h++)
1410
- t[r + h] ^= ~s[(h + 2) % 10] & s[(h + 4) % 10];
1448
+ t[n + h] ^= ~s[(h + 2) % 10] & s[(h + 4) % 10];
1411
1449
  }
1412
- t[0] ^= ts[i], t[1] ^= es[i];
1450
+ t[0] ^= hs[i], t[1] ^= as[i];
1413
1451
  }
1414
- re(s);
1452
+ he(s);
1415
1453
  }
1416
- class Lt {
1454
+ class Et {
1417
1455
  state;
1418
1456
  pos = 0;
1419
1457
  posOut = 0;
@@ -1426,24 +1464,24 @@ class Lt {
1426
1464
  enableXOF = !1;
1427
1465
  rounds;
1428
1466
  // NOTE: we accept arguments in bytes instead of bits here.
1429
- constructor(e, s, i, o = !1, n = 24) {
1430
- if (this.blockLen = e, this.suffix = s, this.outputLen = i, this.enableXOF = o, this.rounds = n, jt(i, "outputLen"), !(0 < e && e < 200))
1467
+ constructor(e, s, i, o = !1, r = 24) {
1468
+ if (this.blockLen = e, this.suffix = s, this.outputLen = i, this.enableXOF = o, this.rounds = r, Nt(i, "outputLen"), !(0 < e && e < 200))
1431
1469
  throw new Error("only keccak-f1600 function is supported");
1432
- this.state = new Uint8Array(200), this.state32 = Fe(this.state);
1470
+ this.state = new Uint8Array(200), this.state32 = Ne(this.state);
1433
1471
  }
1434
1472
  clone() {
1435
1473
  return this._cloneInto();
1436
1474
  }
1437
1475
  keccak() {
1438
- Gt(this.state32), ss(this.state32, this.rounds), Gt(this.state32), this.posOut = 0, this.pos = 0;
1476
+ Jt(this.state32), fs(this.state32, this.rounds), Jt(this.state32), this.posOut = 0, this.pos = 0;
1439
1477
  }
1440
1478
  update(e) {
1441
- Pt(this), Ht(e);
1479
+ Xt(this), It(e);
1442
1480
  const { blockLen: s, state: i } = this, o = e.length;
1443
- for (let n = 0; n < o; ) {
1444
- const r = Math.min(s - this.pos, o - n);
1445
- for (let h = 0; h < r; h++)
1446
- i[this.pos++] ^= e[n++];
1481
+ for (let r = 0; r < o; ) {
1482
+ const n = Math.min(s - this.pos, o - r);
1483
+ for (let h = 0; h < n; h++)
1484
+ i[this.pos++] ^= e[r++];
1447
1485
  this.pos === s && this.keccak();
1448
1486
  }
1449
1487
  return this;
@@ -1456,12 +1494,12 @@ class Lt {
1456
1494
  e[i] ^= s, (s & 128) !== 0 && i === o - 1 && this.keccak(), e[o - 1] ^= 128, this.keccak();
1457
1495
  }
1458
1496
  writeInto(e) {
1459
- Pt(this, !1), Ht(e), this.finish();
1497
+ Xt(this, !1), It(e), this.finish();
1460
1498
  const s = this.state, { blockLen: i } = this;
1461
- for (let o = 0, n = e.length; o < n; ) {
1499
+ for (let o = 0, r = e.length; o < r; ) {
1462
1500
  this.posOut >= i && this.keccak();
1463
- const r = Math.min(i - this.posOut, n - o);
1464
- e.set(s.subarray(this.posOut, this.posOut + r), o), this.posOut += r, o += r;
1501
+ const n = Math.min(i - this.posOut, r - o);
1502
+ e.set(s.subarray(this.posOut, this.posOut + n), o), this.posOut += n, o += n;
1465
1503
  }
1466
1504
  return e;
1467
1505
  }
@@ -1471,10 +1509,10 @@ class Lt {
1471
1509
  return this.writeInto(e);
1472
1510
  }
1473
1511
  xof(e) {
1474
- return jt(e), this.xofInto(new Uint8Array(e));
1512
+ return Nt(e), this.xofInto(new Uint8Array(e));
1475
1513
  }
1476
1514
  digestInto(e) {
1477
- if (ve(e, this), this.finished)
1515
+ if (Ke(e, this), this.finished)
1478
1516
  throw new Error("digest() was already called");
1479
1517
  return this.writeInto(e), this.destroy(), e;
1480
1518
  }
@@ -1482,35 +1520,35 @@ class Lt {
1482
1520
  return this.digestInto(new Uint8Array(this.outputLen));
1483
1521
  }
1484
1522
  destroy() {
1485
- this.destroyed = !0, re(this.state);
1523
+ this.destroyed = !0, he(this.state);
1486
1524
  }
1487
1525
  _cloneInto(e) {
1488
- const { blockLen: s, suffix: i, outputLen: o, rounds: n, enableXOF: r } = this;
1489
- return e ||= new Lt(s, i, o, r, n), e.state32.set(this.state32), e.pos = this.pos, e.posOut = this.posOut, e.finished = this.finished, e.rounds = n, e.suffix = i, e.outputLen = o, e.enableXOF = r, e.destroyed = this.destroyed, e;
1526
+ const { blockLen: s, suffix: i, outputLen: o, rounds: r, enableXOF: n } = this;
1527
+ return e ||= new Et(s, i, o, n, r), e.state32.set(this.state32), e.pos = this.pos, e.posOut = this.posOut, e.finished = this.finished, e.rounds = r, e.suffix = i, e.outputLen = o, e.enableXOF = n, e.destroyed = this.destroyed, e;
1490
1528
  }
1491
1529
  }
1492
- const fe = (t, e, s, i = {}) => Ge((o = {}) => new Lt(e, t, o.dkLen === void 0 ? s : o.dkLen, !0), i), ps = /* @__PURE__ */ fe(31, 168, 16, /* @__PURE__ */ ie(11)), Hs = /* @__PURE__ */ fe(31, 136, 32, /* @__PURE__ */ ie(12));
1493
- class ue extends Jt {
1530
+ const be = (t, e, s, i = {}) => Ye((o = {}) => new Et(e, t, o.dkLen === void 0 ? s : o.dkLen, !0), i), Ss = /* @__PURE__ */ be(31, 168, 16, /* @__PURE__ */ ae(11)), Is = /* @__PURE__ */ be(31, 136, 32, /* @__PURE__ */ ae(12));
1531
+ class xe extends se {
1494
1532
  constructor(e, s) {
1495
- super(), this.finished = !1, this.destroyed = !1, be(e);
1496
- const i = wt(s);
1533
+ super(), this.finished = !1, this.destroyed = !1, $t(e);
1534
+ const i = Ut(s);
1497
1535
  if (this.iHash = e.create(), typeof this.iHash.update != "function")
1498
1536
  throw new Error("Expected instance of class which extends utils.Hash");
1499
1537
  this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
1500
- const o = this.blockLen, n = new Uint8Array(o);
1501
- n.set(i.length > o ? e.create().update(i).digest() : i);
1502
- for (let r = 0; r < n.length; r++)
1503
- n[r] ^= 54;
1504
- this.iHash.update(n), this.oHash = e.create();
1505
- for (let r = 0; r < n.length; r++)
1506
- n[r] ^= 106;
1507
- this.oHash.update(n), nt(n);
1538
+ const o = this.blockLen, r = new Uint8Array(o);
1539
+ r.set(i.length > o ? e.create().update(i).digest() : i);
1540
+ for (let n = 0; n < r.length; n++)
1541
+ r[n] ^= 54;
1542
+ this.iHash.update(r), this.oHash = e.create();
1543
+ for (let n = 0; n < r.length; n++)
1544
+ r[n] ^= 106;
1545
+ this.oHash.update(r), ct(r);
1508
1546
  }
1509
1547
  update(e) {
1510
- return pt(this), this.iHash.update(e), this;
1548
+ return St(this), this.iHash.update(e), this;
1511
1549
  }
1512
1550
  digestInto(e) {
1513
- pt(this), ht(e, this.outputLen), this.finished = !0, this.iHash.digestInto(e), this.oHash.update(e), this.oHash.digestInto(e), this.destroy();
1551
+ St(this), ht(e, this.outputLen), this.finished = !0, this.iHash.digestInto(e), this.oHash.update(e), this.oHash.digestInto(e), this.destroy();
1514
1552
  }
1515
1553
  digest() {
1516
1554
  const e = new Uint8Array(this.oHash.outputLen);
@@ -1518,8 +1556,8 @@ class ue extends Jt {
1518
1556
  }
1519
1557
  _cloneInto(e) {
1520
1558
  e || (e = Object.create(Object.getPrototypeOf(this), {}));
1521
- const { oHash: s, iHash: i, finished: o, destroyed: n, blockLen: r, outputLen: h } = this;
1522
- return e = e, e.finished = o, e.destroyed = n, e.blockLen = r, e.outputLen = h, e.oHash = s._cloneInto(e.oHash), e.iHash = i._cloneInto(e.iHash), e;
1559
+ const { oHash: s, iHash: i, finished: o, destroyed: r, blockLen: n, outputLen: h } = this;
1560
+ return e = e, e.finished = o, e.destroyed = r, e.blockLen = n, e.outputLen = h, e.oHash = s._cloneInto(e.oHash), e.iHash = i._cloneInto(e.iHash), e;
1523
1561
  }
1524
1562
  clone() {
1525
1563
  return this._cloneInto();
@@ -1528,81 +1566,108 @@ class ue extends Jt {
1528
1566
  this.destroyed = !0, this.oHash.destroy(), this.iHash.destroy();
1529
1567
  }
1530
1568
  }
1531
- const ns = (t, e, s) => new ue(t, e).update(s).digest();
1532
- ns.create = (t, e) => new ue(t, e);
1533
- var dt = {}, Nt;
1534
- function As() {
1535
- if (Nt) return dt;
1536
- Nt = 1, Object.defineProperty(dt, "__esModule", { value: !0 }), dt.pbkdf2 = o, dt.pbkdf2Async = n;
1537
- const t = /* @__PURE__ */ Oe(), e = /* @__PURE__ */ lt();
1538
- function s(r, h, d, x) {
1539
- (0, e.ahash)(r);
1540
- const p = (0, e.checkOpts)({ dkLen: 32, asyncTick: 10 }, x), { c: b, dkLen: U, asyncTick: w } = p;
1541
- if ((0, e.anumber)(b), (0, e.anumber)(U), (0, e.anumber)(w), b < 1)
1569
+ const He = (t, e, s) => new xe(t, e).update(s).digest();
1570
+ He.create = (t, e) => new xe(t, e);
1571
+ function ds(t, e, s, i) {
1572
+ $t(t);
1573
+ const o = _e({ dkLen: 32, asyncTick: 10 }, i), { c: r, dkLen: n, asyncTick: h } = o;
1574
+ if (Ht(r), Ht(n), Ht(h), r < 1)
1575
+ throw new Error("iterations (c) should be >= 1");
1576
+ const b = Ct(e), x = Ct(s), H = new Uint8Array(n), u = He.create(t, b), A = u._cloneInto().update(x);
1577
+ return { c: r, dkLen: n, asyncTick: h, DK: H, PRF: u, PRFSalt: A };
1578
+ }
1579
+ function us(t, e, s, i, o) {
1580
+ return t.destroy(), e.destroy(), i && i.destroy(), ct(o), s;
1581
+ }
1582
+ function Ls(t, e, s, i) {
1583
+ const { c: o, dkLen: r, DK: n, PRF: h, PRFSalt: b } = ds(t, e, s, i);
1584
+ let x;
1585
+ const H = new Uint8Array(4), u = wt(H), A = new Uint8Array(h.outputLen);
1586
+ for (let m = 1, w = 0; w < r; m++, w += h.outputLen) {
1587
+ const I = n.subarray(w, w + h.outputLen);
1588
+ u.setInt32(0, m, !1), (x = b._cloneInto(x)).update(H).digestInto(A), I.set(A.subarray(0, I.length));
1589
+ for (let C = 1; C < o; C++) {
1590
+ h._cloneInto(x).update(A).digestInto(A);
1591
+ for (let R = 0; R < I.length; R++)
1592
+ I[R] ^= A[R];
1593
+ }
1594
+ }
1595
+ return us(h, b, n, x, A);
1596
+ }
1597
+ const Bs = Re;
1598
+ var xt = {}, zt;
1599
+ function ms() {
1600
+ if (zt) return xt;
1601
+ zt = 1, Object.defineProperty(xt, "__esModule", { value: !0 }), xt.pbkdf2 = o, xt.pbkdf2Async = r;
1602
+ const t = /* @__PURE__ */ Pe(), e = /* @__PURE__ */ pt();
1603
+ function s(n, h, b, x) {
1604
+ (0, e.ahash)(n);
1605
+ const H = (0, e.checkOpts)({ dkLen: 32, asyncTick: 10 }, x), { c: u, dkLen: A, asyncTick: m } = H;
1606
+ if ((0, e.anumber)(u), (0, e.anumber)(A), (0, e.anumber)(m), u < 1)
1542
1607
  throw new Error("iterations (c) should be >= 1");
1543
- const m = (0, e.kdfInputToBytes)(h), k = (0, e.kdfInputToBytes)(d), M = new Uint8Array(U), P = t.hmac.create(r, m), R = P._cloneInto().update(k);
1544
- return { c: b, dkLen: U, asyncTick: w, DK: M, PRF: P, PRFSalt: R };
1545
- }
1546
- function i(r, h, d, x, p) {
1547
- return r.destroy(), h.destroy(), x && x.destroy(), (0, e.clean)(p), d;
1548
- }
1549
- function o(r, h, d, x) {
1550
- const { c: p, dkLen: b, DK: U, PRF: w, PRFSalt: m } = s(r, h, d, x);
1551
- let k;
1552
- const M = new Uint8Array(4), P = (0, e.createView)(M), R = new Uint8Array(w.outputLen);
1553
- for (let V = 1, T = 0; T < b; V++, T += w.outputLen) {
1554
- const g = U.subarray(T, T + w.outputLen);
1555
- P.setInt32(0, V, !1), (k = m._cloneInto(k)).update(M).digestInto(R), g.set(R.subarray(0, g.length));
1556
- for (let S = 1; S < p; S++) {
1557
- w._cloneInto(k).update(R).digestInto(R);
1558
- for (let C = 0; C < g.length; C++)
1559
- g[C] ^= R[C];
1608
+ const w = (0, e.kdfInputToBytes)(h), I = (0, e.kdfInputToBytes)(b), C = new Uint8Array(A), R = t.hmac.create(n, w), M = R._cloneInto().update(I);
1609
+ return { c: u, dkLen: A, asyncTick: m, DK: C, PRF: R, PRFSalt: M };
1610
+ }
1611
+ function i(n, h, b, x, H) {
1612
+ return n.destroy(), h.destroy(), x && x.destroy(), (0, e.clean)(H), b;
1613
+ }
1614
+ function o(n, h, b, x) {
1615
+ const { c: H, dkLen: u, DK: A, PRF: m, PRFSalt: w } = s(n, h, b, x);
1616
+ let I;
1617
+ const C = new Uint8Array(4), R = (0, e.createView)(C), M = new Uint8Array(m.outputLen);
1618
+ for (let y = 1, O = 0; O < u; y++, O += m.outputLen) {
1619
+ const L = A.subarray(O, O + m.outputLen);
1620
+ R.setInt32(0, y, !1), (I = w._cloneInto(I)).update(C).digestInto(M), L.set(M.subarray(0, L.length));
1621
+ for (let E = 1; E < H; E++) {
1622
+ m._cloneInto(I).update(M).digestInto(M);
1623
+ for (let D = 0; D < L.length; D++)
1624
+ L[D] ^= M[D];
1560
1625
  }
1561
1626
  }
1562
- return i(w, m, U, k, R);
1563
- }
1564
- async function n(r, h, d, x) {
1565
- const { c: p, dkLen: b, asyncTick: U, DK: w, PRF: m, PRFSalt: k } = s(r, h, d, x);
1566
- let M;
1567
- const P = new Uint8Array(4), R = (0, e.createView)(P), V = new Uint8Array(m.outputLen);
1568
- for (let T = 1, g = 0; g < b; T++, g += m.outputLen) {
1569
- const S = w.subarray(g, g + m.outputLen);
1570
- R.setInt32(0, T, !1), (M = k._cloneInto(M)).update(P).digestInto(V), S.set(V.subarray(0, S.length)), await (0, e.asyncLoop)(p - 1, U, () => {
1571
- m._cloneInto(M).update(V).digestInto(V);
1572
- for (let C = 0; C < S.length; C++)
1573
- S[C] ^= V[C];
1627
+ return i(m, w, A, I, M);
1628
+ }
1629
+ async function r(n, h, b, x) {
1630
+ const { c: H, dkLen: u, asyncTick: A, DK: m, PRF: w, PRFSalt: I } = s(n, h, b, x);
1631
+ let C;
1632
+ const R = new Uint8Array(4), M = (0, e.createView)(R), y = new Uint8Array(w.outputLen);
1633
+ for (let O = 1, L = 0; L < u; O++, L += w.outputLen) {
1634
+ const E = m.subarray(L, L + w.outputLen);
1635
+ M.setInt32(0, O, !1), (C = I._cloneInto(C)).update(R).digestInto(y), E.set(y.subarray(0, E.length)), await (0, e.asyncLoop)(H - 1, A, () => {
1636
+ w._cloneInto(C).update(y).digestInto(y);
1637
+ for (let D = 0; D < E.length; D++)
1638
+ E[D] ^= y[D];
1574
1639
  });
1575
1640
  }
1576
- return i(m, k, w, M, V);
1641
+ return i(w, I, m, C, y);
1577
1642
  }
1578
- return dt;
1643
+ return xt;
1579
1644
  }
1580
1645
  export {
1581
- He as A,
1582
- ls as a,
1583
- ds as b,
1584
- lt as c,
1585
- us as d,
1586
- Oe as e,
1587
- as as f,
1588
- fs as g,
1589
- Ht as h,
1590
- xs as i,
1591
- bs as j,
1592
- Te as k,
1646
+ ee as A,
1647
+ Pe as a,
1648
+ ce as b,
1649
+ ls as c,
1650
+ ht as d,
1651
+ xs as e,
1652
+ Ht as f,
1653
+ $t as g,
1654
+ bs as h,
1655
+ Ae as i,
1656
+ Hs as j,
1657
+ He as k,
1593
1658
  ps as l,
1594
- Hs as m,
1595
- ne as n,
1596
- rs as o,
1597
- le as p,
1598
- is as q,
1599
- As as r,
1600
- hs as s,
1601
- ht as t,
1602
- os as u,
1603
- Bt as v,
1604
- be as w,
1605
- cs as x,
1606
- ns as y,
1607
- _e as z
1659
+ As as m,
1660
+ ys as n,
1661
+ gs as o,
1662
+ It as p,
1663
+ ws as q,
1664
+ pt as r,
1665
+ ve as s,
1666
+ _s as t,
1667
+ qe as u,
1668
+ Ss as v,
1669
+ Is as w,
1670
+ Bs as x,
1671
+ Ls as y,
1672
+ ms as z
1608
1673
  };