@btc-vision/transaction 1.7.24 → 1.7.26

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