@gardenfi/core 0.2.0-beta.7 → 0.2.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,19 +1,19 @@
1
- var Di = Object.defineProperty;
2
- var $i = (e, t, r) => t in e ? Di(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var at = (e, t, r) => $i(e, typeof t != "symbol" ? t + "" : t, r);
1
+ var Hi = Object.defineProperty;
2
+ var ji = (e, t, r) => t in e ? Hi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var at = (e, t, r) => ji(e, typeof t != "symbol" ? t + "" : t, r);
4
4
  import { Err as U, Ok as ne, Fetcher as zt, trim0x as Xe } from "@catalogfi/utils";
5
- import { EthereumLocalnet as Hi, ArbitrumLocalnet as ji, Orderbook as qi, isMainnet as Ft, isBitcoin as Ot, getBlockchainType as Mt, BlockchainType as qe } from "@gardenfi/orderbook";
6
- import { getContract as $n, erc20Abi as Wi, maxUint256 as Gi, createPublicClient as zi, http as Ki, sha256 as Ut } from "viem";
5
+ import { EthereumLocalnet as qi, ArbitrumLocalnet as Wi, Orderbook as Gi, isMainnet as Lt, isBitcoin as Ot, getBlockchainType as Mt, BlockchainType as qe } from "@gardenfi/orderbook";
6
+ import { getContract as Hn, erc20Abi as zi, maxUint256 as Ki, createPublicClient as Vi, http as Ji, sha256 as Ut } from "viem";
7
7
  import * as en from "varuint-bitcoin";
8
8
  import * as lt from "tiny-secp256k1";
9
9
  import { Urgency as tn } from "@catalogfi/wallets";
10
- import * as de from "bitcoinjs-lib";
11
- import { crypto as Vi } from "bitcoinjs-lib";
10
+ import * as he from "bitcoinjs-lib";
11
+ import { crypto as Yi } from "bitcoinjs-lib";
12
12
  var Ar = /* @__PURE__ */ ((e) => (e[e.evm = 14400] = "evm", e[e.btc = 288] = "btc", e))(Ar || {}), Re = /* @__PURE__ */ ((e) => (e.Idle = "Idle", e.Initiate = "Initiate", e.Redeem = "Redeem", e.Refund = "Refund", e))(Re || {});
13
- const We = (e) => e.startsWith("0x") ? e : `0x${e}`, rn = (e) => `Bearer ${e}`, Ji = (e) => new Promise((t) => setTimeout(t, e)), Hn = "2.21.30";
13
+ const We = (e) => e.startsWith("0x") ? e : `0x${e}`, rn = (e) => `Bearer ${e}`, Xi = (e) => new Promise((t) => setTimeout(t, e)), jn = "2.21.30";
14
14
  let Dt = {
15
15
  getDocsUrl: ({ docsBaseUrl: e, docsPath: t = "", docsSlug: r }) => t ? `${e ?? "https://viem.sh"}${t}${r ? `#${r}` : ""}` : void 0,
16
- version: `viem@${Hn}`
16
+ version: `viem@${jn}`
17
17
  }, et = class Tr extends Error {
18
18
  constructor(t, r = {}) {
19
19
  var i;
@@ -59,21 +59,21 @@ let Dt = {
59
59
  configurable: !0,
60
60
  writable: !0,
61
61
  value: "BaseError"
62
- }), this.details = o, this.docsPath = s, this.metaMessages = r.metaMessages, this.name = r.name ?? this.name, this.shortMessage = t, this.version = Hn;
62
+ }), this.details = o, this.docsPath = s, this.metaMessages = r.metaMessages, this.name = r.name ?? this.name, this.shortMessage = t, this.version = jn;
63
63
  }
64
64
  walk(t) {
65
- return jn(this, t);
65
+ return qn(this, t);
66
66
  }
67
67
  };
68
- function jn(e, t) {
69
- return t != null && t(e) ? e : e && typeof e == "object" && "cause" in e ? jn(e.cause, t) : t ? null : e;
68
+ function qn(e, t) {
69
+ return t != null && t(e) ? e : e && typeof e == "object" && "cause" in e ? qn(e.cause, t) : t ? null : e;
70
70
  }
71
- let qn = class extends et {
71
+ let Wn = class extends et {
72
72
  constructor({ blockHash: t, blockNumber: r }) {
73
73
  let i = "Block";
74
74
  t && (i = `Block at hash "${t}"`), r && (i = `Block at number "${r}"`), super(`${i} could not be found.`, { name: "BlockNotFoundError" });
75
75
  }
76
- }, Wn = class extends et {
76
+ }, Gn = class extends et {
77
77
  constructor({ blockHash: t, blockNumber: r, blockTag: i, hash: o, index: s }) {
78
78
  let c = "Transaction";
79
79
  i && s !== void 0 && (c = `Transaction at block time "${i}" at index "${s}"`), t && s !== void 0 && (c = `Transaction at block hash "${t}" at index "${s}"`), r && s !== void 0 && (c = `Transaction at block number "${r}" at index "${s}"`), o && (c = `Transaction with hash "${o}"`), super(`${c} could not be found.`, {
@@ -81,14 +81,14 @@ let qn = class extends et {
81
81
  });
82
82
  }
83
83
  };
84
- class Gn extends et {
84
+ class zn extends et {
85
85
  constructor({ hash: t }) {
86
86
  super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`, {
87
87
  name: "TransactionReceiptNotFoundError"
88
88
  });
89
89
  }
90
90
  }
91
- let Yi = class extends et {
91
+ let Qi = class extends et {
92
92
  constructor({ hash: t }) {
93
93
  super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`, { name: "WaitForTransactionReceiptTimeoutError" });
94
94
  }
@@ -101,9 +101,9 @@ function ft(e, t, r) {
101
101
  return typeof o == "function" ? o : (s) => t(e, s);
102
102
  }
103
103
  const lr = /* @__PURE__ */ new Map(), nn = /* @__PURE__ */ new Map();
104
- let Xi = 0;
104
+ let Zi = 0;
105
105
  function kr(e, t, r) {
106
- const i = ++Xi, o = () => lr.get(e) || [], s = () => {
106
+ const i = ++Zi, o = () => lr.get(e) || [], s = () => {
107
107
  const g = o();
108
108
  lr.set(e, g.filter((w) => w.id !== i));
109
109
  }, c = () => {
@@ -150,41 +150,41 @@ function an(e, { delay: t = 100, retryCount: r = 2, shouldRetry: i = () => !0 }
150
150
  });
151
151
  }
152
152
  const Pr = (e, t, r) => JSON.stringify(e, (i, o) => typeof o == "bigint" ? o.toString() : o, r);
153
- class Qi extends et {
153
+ class ea extends et {
154
154
  constructor({ max: t, min: r, signed: i, size: o, value: s }) {
155
155
  super(`Number "${s}" is not in safe ${o ? `${o * 8}-bit ${i ? "signed" : "unsigned"} ` : ""}integer range ${t ? `(${r} to ${t})` : `(above ${r})`}`, { name: "IntegerOutOfRangeError" });
156
156
  }
157
157
  }
158
- let Zi = class extends et {
158
+ let ta = class extends et {
159
159
  constructor({ givenSize: t, maxSize: r }) {
160
160
  super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`, { name: "SizeOverflowError" });
161
161
  }
162
162
  };
163
- class zn extends et {
163
+ class Kn extends et {
164
164
  constructor({ size: t, targetSize: r, type: i }) {
165
165
  super(`${i.charAt(0).toUpperCase()}${i.slice(1).toLowerCase()} size (${t}) exceeds padding size (${r}).`, { name: "SizeExceedsPaddingSizeError" });
166
166
  }
167
167
  }
168
- function ea(e, { dir: t, size: r = 32 } = {}) {
169
- return typeof e == "string" ? ta(e, { dir: t, size: r }) : ra(e, { dir: t, size: r });
168
+ function ra(e, { dir: t, size: r = 32 } = {}) {
169
+ return typeof e == "string" ? na(e, { dir: t, size: r }) : ia(e, { dir: t, size: r });
170
170
  }
171
- function ta(e, { dir: t, size: r = 32 } = {}) {
171
+ function na(e, { dir: t, size: r = 32 } = {}) {
172
172
  if (r === null)
173
173
  return e;
174
174
  const i = e.replace("0x", "");
175
175
  if (i.length > r * 2)
176
- throw new zn({
176
+ throw new Kn({
177
177
  size: Math.ceil(i.length / 2),
178
178
  targetSize: r,
179
179
  type: "hex"
180
180
  });
181
181
  return `0x${i[t === "right" ? "padEnd" : "padStart"](r * 2, "0")}`;
182
182
  }
183
- function ra(e, { dir: t, size: r = 32 } = {}) {
183
+ function ia(e, { dir: t, size: r = 32 } = {}) {
184
184
  if (r === null)
185
185
  return e;
186
186
  if (e.length > r)
187
- throw new zn({
187
+ throw new Kn({
188
188
  size: e.length,
189
189
  targetSize: r,
190
190
  type: "bytes"
@@ -203,7 +203,7 @@ function qt(e, t = {}) {
203
203
  const c = typeof s == "bigint" && r ? -s - 1n : 0;
204
204
  if (s && o > s || o < c) {
205
205
  const p = typeof e == "bigint" ? "n" : "";
206
- throw new Qi({
206
+ throw new ea({
207
207
  max: s ? `${s}${p}` : void 0,
208
208
  min: `${c}${p}`,
209
209
  signed: r,
@@ -212,24 +212,24 @@ function qt(e, t = {}) {
212
212
  });
213
213
  }
214
214
  const u = `0x${(r && o < 0 ? (1n << BigInt(i * 8)) + BigInt(o) : o).toString(16)}`;
215
- return i ? ea(u, { size: i }) : u;
215
+ return i ? ra(u, { size: i }) : u;
216
216
  }
217
- function na(e, { strict: t = !0 } = {}) {
217
+ function aa(e, { strict: t = !0 } = {}) {
218
218
  return !e || typeof e != "string" ? !1 : t ? /^0x[0-9a-fA-F]*$/.test(e) : e.startsWith("0x");
219
219
  }
220
220
  function on(e) {
221
- return na(e, { strict: !1 }) ? Math.ceil((e.length - 2) / 2) : e.length;
221
+ return aa(e, { strict: !1 }) ? Math.ceil((e.length - 2) / 2) : e.length;
222
222
  }
223
- function ia(e, { size: t }) {
223
+ function oa(e, { size: t }) {
224
224
  if (on(e) > t)
225
- throw new Zi({
225
+ throw new ta({
226
226
  givenSize: on(e),
227
227
  maxSize: t
228
228
  });
229
229
  }
230
- function Kn(e, t = {}) {
230
+ function Vn(e, t = {}) {
231
231
  const { signed: r } = t;
232
- t.size && ia(e, { size: t.size });
232
+ t.size && oa(e, { size: t.size });
233
233
  const i = BigInt(e);
234
234
  if (!r)
235
235
  return i;
@@ -237,16 +237,16 @@ function Kn(e, t = {}) {
237
237
  return i <= s ? i : i - BigInt(`0x${"f".padStart(o * 2, "f")}`) - 1n;
238
238
  }
239
239
  function Nr(e, t = {}) {
240
- return Number(Kn(e, t));
240
+ return Number(Vn(e, t));
241
241
  }
242
- const Vn = {
242
+ const Jn = {
243
243
  "0x0": "legacy",
244
244
  "0x1": "eip2930",
245
245
  "0x2": "eip1559",
246
246
  "0x3": "eip4844",
247
247
  "0x4": "eip7702"
248
248
  };
249
- function Jn(e) {
249
+ function Yn(e) {
250
250
  const t = {
251
251
  ...e,
252
252
  blockHash: e.blockHash ? e.blockHash : null,
@@ -260,12 +260,12 @@ function Jn(e) {
260
260
  nonce: e.nonce ? Nr(e.nonce) : void 0,
261
261
  to: e.to ? e.to : null,
262
262
  transactionIndex: e.transactionIndex ? Number(e.transactionIndex) : null,
263
- type: e.type ? Vn[e.type] : void 0,
263
+ type: e.type ? Jn[e.type] : void 0,
264
264
  typeHex: e.type ? e.type : void 0,
265
265
  value: e.value ? BigInt(e.value) : void 0,
266
266
  v: e.v ? BigInt(e.v) : void 0
267
267
  };
268
- return e.authorizationList && (t.authorizationList = aa(e.authorizationList)), t.yParity = (() => {
268
+ return e.authorizationList && (t.authorizationList = sa(e.authorizationList)), t.yParity = (() => {
269
269
  if (e.yParity)
270
270
  return Number(e.yParity);
271
271
  if (typeof t.v == "bigint") {
@@ -278,7 +278,7 @@ function Jn(e) {
278
278
  }
279
279
  })(), t.type === "legacy" && (delete t.accessList, delete t.maxFeePerBlobGas, delete t.maxFeePerGas, delete t.maxPriorityFeePerGas, delete t.yParity), t.type === "eip2930" && (delete t.maxFeePerBlobGas, delete t.maxFeePerGas, delete t.maxPriorityFeePerGas), t.type === "eip1559" && delete t.maxFeePerBlobGas, t;
280
280
  }
281
- function aa(e) {
281
+ function sa(e) {
282
282
  return e.map((t) => ({
283
283
  contractAddress: t.address,
284
284
  chainId: Number(t.chainId),
@@ -288,9 +288,9 @@ function aa(e) {
288
288
  yParity: Number(t.yParity)
289
289
  }));
290
290
  }
291
- function oa(e) {
291
+ function fa(e) {
292
292
  var t;
293
- const r = (t = e.transactions) == null ? void 0 : t.map((i) => typeof i == "string" ? i : Jn(i));
293
+ const r = (t = e.transactions) == null ? void 0 : t.map((i) => typeof i == "string" ? i : Yn(i));
294
294
  return {
295
295
  ...e,
296
296
  baseFeePerGas: e.baseFeePerGas ? BigInt(e.baseFeePerGas) : null,
@@ -309,7 +309,7 @@ function oa(e) {
309
309
  totalDifficulty: e.totalDifficulty ? BigInt(e.totalDifficulty) : null
310
310
  };
311
311
  }
312
- async function sa(e, { blockHash: t, blockNumber: r, blockTag: i, includeTransactions: o } = {}) {
312
+ async function ua(e, { blockHash: t, blockNumber: r, blockTag: i, includeTransactions: o } = {}) {
313
313
  var s, c, u;
314
314
  const p = i ?? "latest", y = o ?? !1, g = r !== void 0 ? qt(r) : void 0;
315
315
  let w = null;
@@ -320,10 +320,10 @@ async function sa(e, { blockHash: t, blockNumber: r, blockTag: i, includeTransac
320
320
  method: "eth_getBlockByNumber",
321
321
  params: [g || p, y]
322
322
  }, { dedupe: !!g }), !w)
323
- throw new qn({ blockHash: t, blockNumber: r });
324
- return (((u = (c = (s = e.chain) == null ? void 0 : s.formatters) == null ? void 0 : c.block) == null ? void 0 : u.format) || oa)(w);
323
+ throw new Wn({ blockHash: t, blockNumber: r });
324
+ return (((u = (c = (s = e.chain) == null ? void 0 : s.formatters) == null ? void 0 : c.block) == null ? void 0 : u.format) || fa)(w);
325
325
  }
326
- async function fa(e, { blockHash: t, blockNumber: r, blockTag: i, hash: o, index: s }) {
326
+ async function ca(e, { blockHash: t, blockNumber: r, blockTag: i, hash: o, index: s }) {
327
327
  var c, u, p;
328
328
  const y = i || "latest", g = r !== void 0 ? qt(r) : void 0;
329
329
  let w = null;
@@ -337,16 +337,16 @@ async function fa(e, { blockHash: t, blockNumber: r, blockTag: i, hash: o, index
337
337
  method: "eth_getTransactionByBlockNumberAndIndex",
338
338
  params: [g || y, qt(s)]
339
339
  }, { dedupe: !!g })), !w)
340
- throw new Wn({
340
+ throw new Gn({
341
341
  blockHash: t,
342
342
  blockNumber: r,
343
343
  blockTag: y,
344
344
  hash: o,
345
345
  index: s
346
346
  });
347
- return (((p = (u = (c = e.chain) == null ? void 0 : c.formatters) == null ? void 0 : u.transaction) == null ? void 0 : p.format) || Jn)(w);
347
+ return (((p = (u = (c = e.chain) == null ? void 0 : c.formatters) == null ? void 0 : u.transaction) == null ? void 0 : p.format) || Yn)(w);
348
348
  }
349
- function ua(e, { args: t, eventName: r } = {}) {
349
+ function la(e, { args: t, eventName: r } = {}) {
350
350
  return {
351
351
  ...e,
352
352
  blockHash: e.blockHash ? e.blockHash : null,
@@ -357,11 +357,11 @@ function ua(e, { args: t, eventName: r } = {}) {
357
357
  ...r ? { args: t, eventName: r } : {}
358
358
  };
359
359
  }
360
- const ca = {
360
+ const da = {
361
361
  "0x0": "reverted",
362
362
  "0x1": "success"
363
363
  };
364
- function la(e) {
364
+ function ha(e) {
365
365
  const t = {
366
366
  ...e,
367
367
  blockNumber: e.blockNumber ? BigInt(e.blockNumber) : null,
@@ -369,11 +369,11 @@ function la(e) {
369
369
  cumulativeGasUsed: e.cumulativeGasUsed ? BigInt(e.cumulativeGasUsed) : null,
370
370
  effectiveGasPrice: e.effectiveGasPrice ? BigInt(e.effectiveGasPrice) : null,
371
371
  gasUsed: e.gasUsed ? BigInt(e.gasUsed) : null,
372
- logs: e.logs ? e.logs.map((r) => ua(r)) : null,
372
+ logs: e.logs ? e.logs.map((r) => la(r)) : null,
373
373
  to: e.to ? e.to : null,
374
374
  transactionIndex: e.transactionIndex ? Nr(e.transactionIndex) : null,
375
- status: e.status ? ca[e.status] : null,
376
- type: e.type ? Vn[e.type] || e.type : null
375
+ status: e.status ? da[e.status] : null,
376
+ type: e.type ? Jn[e.type] || e.type : null
377
377
  };
378
378
  return e.blobGasPrice && (t.blobGasPrice = BigInt(e.blobGasPrice)), e.blobGasUsed && (t.blobGasUsed = BigInt(e.blobGasUsed)), t;
379
379
  }
@@ -384,10 +384,10 @@ async function sn(e, { hash: t }) {
384
384
  params: [t]
385
385
  }, { dedupe: !0 });
386
386
  if (!s)
387
- throw new Gn({ hash: t });
388
- return (((o = (i = (r = e.chain) == null ? void 0 : r.formatters) == null ? void 0 : i.transactionReceipt) == null ? void 0 : o.format) || la)(s);
387
+ throw new zn({ hash: t });
388
+ return (((o = (i = (r = e.chain) == null ? void 0 : r.formatters) == null ? void 0 : i.transactionReceipt) == null ? void 0 : o.format) || ha)(s);
389
389
  }
390
- function ha(e, { emitOnBegin: t, initialWaitTime: r, interval: i }) {
390
+ function pa(e, { emitOnBegin: t, initialWaitTime: r, interval: i }) {
391
391
  let o = !0;
392
392
  const s = () => o = !1;
393
393
  return (async () => {
@@ -401,13 +401,13 @@ function ha(e, { emitOnBegin: t, initialWaitTime: r, interval: i }) {
401
401
  p();
402
402
  })(), s;
403
403
  }
404
- const da = /* @__PURE__ */ new Map(), pa = /* @__PURE__ */ new Map();
405
- function ba(e) {
404
+ const ba = /* @__PURE__ */ new Map(), ya = /* @__PURE__ */ new Map();
405
+ function ga(e) {
406
406
  const t = (o, s) => ({
407
407
  clear: () => s.delete(o),
408
408
  get: () => s.get(o),
409
409
  set: (c) => s.set(o, c)
410
- }), r = t(e, da), i = t(e, pa);
410
+ }), r = t(e, ba), i = t(e, ya);
411
411
  return {
412
412
  clear: () => {
413
413
  r.clear(), i.clear();
@@ -416,8 +416,8 @@ function ba(e) {
416
416
  response: i
417
417
  };
418
418
  }
419
- async function ya(e, { cacheKey: t, cacheTime: r = Number.POSITIVE_INFINITY }) {
420
- const i = ba(t), o = i.response.get();
419
+ async function ma(e, { cacheKey: t, cacheTime: r = Number.POSITIVE_INFINITY }) {
420
+ const i = ga(t), o = i.response.get();
421
421
  if (o && r > 0 && (/* @__PURE__ */ new Date()).getTime() - o.created.getTime() < r)
422
422
  return o.data;
423
423
  let s = i.promise.get();
@@ -429,14 +429,14 @@ async function ya(e, { cacheKey: t, cacheTime: r = Number.POSITIVE_INFINITY }) {
429
429
  i.promise.clear();
430
430
  }
431
431
  }
432
- const ga = (e) => `blockNumber.${e}`;
433
- async function _a(e, { cacheTime: t = e.cacheTime } = {}) {
434
- const r = await ya(() => e.request({
432
+ const _a = (e) => `blockNumber.${e}`;
433
+ async function wa(e, { cacheTime: t = e.cacheTime } = {}) {
434
+ const r = await ma(() => e.request({
435
435
  method: "eth_blockNumber"
436
- }), { cacheKey: ga(e.uid), cacheTime: t });
436
+ }), { cacheKey: _a(e.uid), cacheTime: t });
437
437
  return BigInt(r);
438
438
  }
439
- function ma(e, { emitOnBegin: t = !1, emitMissed: r = !1, onBlockNumber: i, onError: o, poll: s, pollingInterval: c = e.pollingInterval }) {
439
+ function va(e, { emitOnBegin: t = !1, emitMissed: r = !1, onBlockNumber: i, onError: o, poll: s, pollingInterval: c = e.pollingInterval }) {
440
440
  const u = typeof s < "u" ? s : !(e.transport.type === "webSocket" || e.transport.type === "fallback" && e.transport.transports[0].config.type === "webSocket");
441
441
  let p;
442
442
  return u ? (() => {
@@ -447,10 +447,10 @@ function ma(e, { emitOnBegin: t = !1, emitMissed: r = !1, onBlockNumber: i, onEr
447
447
  r,
448
448
  c
449
449
  ]);
450
- return kr(y, { onBlockNumber: i, onError: o }, (g) => ha(async () => {
450
+ return kr(y, { onBlockNumber: i, onError: o }, (g) => pa(async () => {
451
451
  var w;
452
452
  try {
453
- const x = await ft(e, _a, "getBlockNumber")({ cacheTime: 0 });
453
+ const x = await ft(e, wa, "getBlockNumber")({ cacheTime: 0 });
454
454
  if (p) {
455
455
  if (x === p)
456
456
  return;
@@ -489,7 +489,7 @@ function ma(e, { emitOnBegin: t = !1, emitMissed: r = !1, onBlockNumber: i, onEr
489
489
  var E;
490
490
  if (!w)
491
491
  return;
492
- const T = Kn((E = C.result) == null ? void 0 : E.number);
492
+ const T = Vn((E = C.result) == null ? void 0 : E.number);
493
493
  g.onBlockNumber(T, p), p = T;
494
494
  },
495
495
  onError(C) {
@@ -505,7 +505,7 @@ function ma(e, { emitOnBegin: t = !1, emitMissed: r = !1, onBlockNumber: i, onEr
505
505
  });
506
506
  })();
507
507
  }
508
- async function wa(e, {
508
+ async function xa(e, {
509
509
  confirmations: t = 1,
510
510
  hash: r,
511
511
  onReplaced: i,
@@ -518,16 +518,16 @@ async function wa(e, {
518
518
  const p = Pr(["waitForTransactionReceipt", e.uid, r]);
519
519
  let y, g, w, x = !1;
520
520
  return new Promise((A, R) => {
521
- u && setTimeout(() => R(new Yi({ hash: r })), u);
521
+ u && setTimeout(() => R(new Qi({ hash: r })), u);
522
522
  const C = kr(p, { onReplaced: i, resolve: A, reject: R }, (E) => {
523
- const T = ft(e, ma, "watchBlockNumber")({
523
+ const T = ft(e, va, "watchBlockNumber")({
524
524
  emitMissed: !0,
525
525
  emitOnBegin: !0,
526
526
  poll: !0,
527
527
  pollingInterval: o,
528
528
  async onBlockNumber(P) {
529
- const L = (F) => {
530
- T(), F(), C();
529
+ const F = (L) => {
530
+ T(), L(), C();
531
531
  };
532
532
  let N = P;
533
533
  if (!x)
@@ -535,32 +535,32 @@ async function wa(e, {
535
535
  if (w) {
536
536
  if (t > 1 && (!w.blockNumber || N - w.blockNumber + 1n < t))
537
537
  return;
538
- L(() => E.resolve(w));
538
+ F(() => E.resolve(w));
539
539
  return;
540
540
  }
541
541
  if (y || (x = !0, await an(async () => {
542
- y = await ft(e, fa, "getTransaction")({ hash: r }), y.blockNumber && (N = y.blockNumber);
542
+ y = await ft(e, ca, "getTransaction")({ hash: r }), y.blockNumber && (N = y.blockNumber);
543
543
  }, {
544
544
  delay: c,
545
545
  retryCount: s
546
546
  }), x = !1), w = await ft(e, sn, "getTransactionReceipt")({ hash: r }), t > 1 && (!w.blockNumber || N - w.blockNumber + 1n < t))
547
547
  return;
548
- L(() => E.resolve(w));
549
- } catch (F) {
550
- if (F instanceof Wn || F instanceof Gn) {
548
+ F(() => E.resolve(w));
549
+ } catch (L) {
550
+ if (L instanceof Gn || L instanceof zn) {
551
551
  if (!y) {
552
552
  x = !1;
553
553
  return;
554
554
  }
555
555
  try {
556
556
  g = y, x = !0;
557
- const S = await an(() => ft(e, sa, "getBlock")({
557
+ const S = await an(() => ft(e, ua, "getBlock")({
558
558
  blockNumber: N,
559
559
  includeTransactions: !0
560
560
  }), {
561
561
  delay: c,
562
562
  retryCount: s,
563
- shouldRetry: ({ error: M }) => M instanceof qn
563
+ shouldRetry: ({ error: M }) => M instanceof Wn
564
564
  });
565
565
  x = !1;
566
566
  const j = S.transactions.find(({ from: M, nonce: ee }) => M === g.from && ee === g.nonce);
@@ -569,7 +569,7 @@ async function wa(e, {
569
569
  }), t > 1 && (!w.blockNumber || N - w.blockNumber + 1n < t)))
570
570
  return;
571
571
  let D = "replaced";
572
- j.to === g.to && j.value === g.value ? D = "repriced" : j.from === j.to && j.value === 0n && (D = "cancelled"), L(() => {
572
+ j.to === g.to && j.value === g.value ? D = "repriced" : j.from === j.to && j.value === 0n && (D = "cancelled"), F(() => {
573
573
  var M;
574
574
  (M = E.onReplaced) == null || M.call(E, {
575
575
  reason: D,
@@ -579,21 +579,22 @@ async function wa(e, {
579
579
  }), E.resolve(w);
580
580
  });
581
581
  } catch (S) {
582
- L(() => E.reject(S));
582
+ F(() => E.reject(S));
583
583
  }
584
584
  } else
585
- L(() => E.reject(F));
585
+ F(() => E.reject(L));
586
586
  }
587
587
  }
588
588
  });
589
589
  });
590
590
  });
591
591
  }
592
- const va = async (e, t, r, i) => {
592
+ const Ea = async (e, t, r, i) => {
593
593
  if (!i.account) return U("No account found");
594
- const o = $n({
594
+ console.log("walletClient.chain", i.chain);
595
+ const o = Hn({
595
596
  address: We(t),
596
- abi: Wi,
597
+ abi: zi,
597
598
  client: i
598
599
  }), s = await i.getAddresses();
599
600
  if (!s[0]) return U("No account found");
@@ -604,13 +605,13 @@ const va = async (e, t, r, i) => {
604
605
  ]);
605
606
  if (BigInt(c) < BigInt(e)) {
606
607
  const u = await o.write.approve(
607
- [We(r), Gi],
608
+ [We(r), Ki],
608
609
  {
609
610
  account: i.account,
610
611
  chain: i.chain
611
612
  }
612
613
  );
613
- return (await wa(i, {
614
+ return (await xa(i, {
614
615
  hash: u
615
616
  })).status !== "success" ? U("Failed to approve") : ne(u);
616
617
  }
@@ -642,7 +643,7 @@ class St extends URL {
642
643
  return new St(`${this.pathname}?${r.toString()}`, this);
643
644
  }
644
645
  }
645
- let xa = class {
646
+ class Ba {
646
647
  constructor() {
647
648
  this.memory = /* @__PURE__ */ new Map();
648
649
  }
@@ -655,8 +656,8 @@ let xa = class {
655
656
  removeItem(t) {
656
657
  this.memory.has(t) && this.memory.delete(t);
657
658
  }
658
- };
659
- function Ea(e) {
659
+ }
660
+ function Xn(e) {
660
661
  return {
661
662
  formatters: void 0,
662
663
  fees: void 0,
@@ -664,7 +665,7 @@ function Ea(e) {
664
665
  ...e
665
666
  };
666
667
  }
667
- const Ba = /* @__PURE__ */ Ea({
668
+ const Ra = /* @__PURE__ */ Xn({
668
669
  id: 1,
669
670
  name: "Ethereum",
670
671
  nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
@@ -693,14 +694,47 @@ const Ba = /* @__PURE__ */ Ea({
693
694
  blockCreated: 14353601
694
695
  }
695
696
  }
696
- }), Ra = [42161, 421614], Lr = async (e) => {
697
+ }), Sa = /* @__PURE__ */ Xn({
698
+ id: 11155111,
699
+ name: "Sepolia",
700
+ nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
701
+ rpcUrls: {
702
+ default: {
703
+ http: ["https://rpc2.sepolia.org"]
704
+ }
705
+ },
706
+ blockExplorers: {
707
+ default: {
708
+ name: "Etherscan",
709
+ url: "https://sepolia.etherscan.io",
710
+ apiUrl: "https://api-sepolia.etherscan.io/api"
711
+ }
712
+ },
713
+ contracts: {
714
+ multicall3: {
715
+ address: "0xca11bde05977b3631167028862be2a173976ca11",
716
+ blockCreated: 751532
717
+ },
718
+ ensRegistry: { address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" },
719
+ ensUniversalResolver: {
720
+ address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",
721
+ blockCreated: 5317080
722
+ }
723
+ },
724
+ testnet: !0
725
+ }), fn = {
726
+ 42161: Ra,
727
+ 421614: Sa
728
+ }, Fr = async (e) => {
697
729
  if (!e.chain) return U("No chain found");
698
- const t = Ra.includes(e.chain.id) ? Ba : e.chain;
699
- return await Sa(t);
700
- }, Sa = async (e) => {
701
- const t = zi({
730
+ const t = Object.keys(fn).includes(
731
+ e.chain.id.toString()
732
+ ) ? fn[e.chain.id] : e.chain;
733
+ return await Ia(t);
734
+ }, Ia = async (e) => {
735
+ const t = Vi({
702
736
  chain: e,
703
- transport: Ki()
737
+ transport: Ji()
704
738
  });
705
739
  try {
706
740
  const r = await t.getBlockNumber();
@@ -708,7 +742,7 @@ const Ba = /* @__PURE__ */ Ea({
708
742
  } catch (r) {
709
743
  return U("Failed to fetch evm block number", r);
710
744
  }
711
- }, fn = async (e) => {
745
+ }, un = async (e) => {
712
746
  try {
713
747
  const t = await e.getLatestTip();
714
748
  return ne(t);
@@ -724,7 +758,7 @@ function Qt(e) {
724
758
  ...e
725
759
  };
726
760
  }
727
- const Ia = /* @__PURE__ */ Qt({
761
+ const Aa = /* @__PURE__ */ Qt({
728
762
  id: 42161,
729
763
  name: "Arbitrum One",
730
764
  nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
@@ -746,7 +780,7 @@ const Ia = /* @__PURE__ */ Qt({
746
780
  blockCreated: 7654707
747
781
  }
748
782
  }
749
- }), Aa = /* @__PURE__ */ Qt({
783
+ }), Ta = /* @__PURE__ */ Qt({
750
784
  id: 421614,
751
785
  name: "Arbitrum Sepolia",
752
786
  nativeCurrency: {
@@ -773,7 +807,7 @@ const Ia = /* @__PURE__ */ Qt({
773
807
  }
774
808
  },
775
809
  testnet: !0
776
- }), Ta = /* @__PURE__ */ Qt({
810
+ }), ka = /* @__PURE__ */ Qt({
777
811
  id: 1,
778
812
  name: "Ethereum",
779
813
  nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
@@ -802,7 +836,7 @@ const Ia = /* @__PURE__ */ Qt({
802
836
  blockCreated: 14353601
803
837
  }
804
838
  }
805
- }), ka = /* @__PURE__ */ Qt({
839
+ }), Ca = /* @__PURE__ */ Qt({
806
840
  id: 11155111,
807
841
  name: "Sepolia",
808
842
  nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
@@ -831,23 +865,23 @@ const Ia = /* @__PURE__ */ Qt({
831
865
  },
832
866
  testnet: !0
833
867
  });
834
- function Fr(e) {
868
+ function Lr(e) {
835
869
  return typeof e == "string" && (e = Buffer.from(e, "hex")), e.length === 32 ? e : e.subarray(1, 33);
836
870
  }
837
871
  function ot(e, t) {
838
872
  if (!e) throw new Error(t);
839
873
  }
840
- function Ca(e) {
874
+ function Pa(e) {
841
875
  return Buffer.concat([
842
876
  Uint8Array.from([192]),
843
- Pa(e)
877
+ Na(e)
844
878
  ]);
845
879
  }
846
- function Pa(e) {
880
+ function Na(e) {
847
881
  const t = en.encodingLength(e.length), r = Buffer.allocUnsafe(t);
848
882
  return en.encode(e.length, r), Buffer.concat([r, e]);
849
883
  }
850
- function Na(e, t) {
884
+ function Fa(e, t) {
851
885
  if (e.compare(t) > 0) {
852
886
  const r = e;
853
887
  e = t, t = r;
@@ -862,21 +896,21 @@ const $t = (e) => e.length === 64 ? e : e.slice(2), La = (e) => {
862
896
  } catch {
863
897
  return !1;
864
898
  }
865
- }, Fa = {
866
- ethereum: Ta,
867
- ethereum_arbitrum: Ia,
868
- ethereum_sepolia: ka,
869
- arbitrum_sepolia: Aa,
870
- ethereum_localnet: Hi,
871
- arbitrum_localnet: ji
899
+ }, Oa = {
900
+ ethereum: ka,
901
+ ethereum_arbitrum: Aa,
902
+ ethereum_sepolia: Ca,
903
+ arbitrum_sepolia: Ta,
904
+ ethereum_localnet: qi,
905
+ arbitrum_localnet: Wi
872
906
  }, nu = async (e, t) => {
873
907
  var i;
874
- const r = Fa[e];
908
+ const r = Oa[e];
875
909
  if (r)
876
910
  try {
877
911
  return r.id === ((i = t.chain) == null ? void 0 : i.id) ? ne("Already on chain") : (await t.switchChain({ id: r.id }), ne("Switched chain"));
878
912
  } catch (o) {
879
- if (Oa(o))
913
+ if (Ma(o))
880
914
  try {
881
915
  return await t.addChain({ chain: r }), ne("Added and switched chain");
882
916
  } catch {
@@ -887,9 +921,9 @@ const $t = (e) => e.length === 64 ? e : e.slice(2), La = (e) => {
887
921
  }
888
922
  else
889
923
  return U("Chain not supported");
890
- }, Oa = (e) => typeof e == "object" && e !== null && "code" in e && e.code === 4902;
924
+ }, Ma = (e) => typeof e == "object" && e !== null && "code" in e && e.code === 4902;
891
925
  var oe = /* @__PURE__ */ ((e) => (e.Created = "Created", e.Matched = "Matched", e.InitiateDetected = "InitiateDetected", e.Initiated = "Initiated", e.CounterPartyInitiateDetected = "CounterPartyInitiateDetected", e.CounterPartyInitiated = "CounterPartyInitiated", e.RedeemDetected = "RedeemDetected", e.Redeemed = "Redeemed", e.CounterPartyRedeemDetected = "CounterPartyRedeemDetected", e.CounterPartyRedeemed = "CounterPartyRedeemed", e.Completed = "Completed", e.CounterPartySwapExpired = "CounterPartySwapExpired", e.Expired = "Expired", e.RefundDetected = "RefundDetected", e.Refunded = "Refunded", e.CounterPartyRefundDetected = "CounterPartyRefundDetected", e.CounterPartyRefunded = "CounterPartyRefunded", e.Cancelled = "Cancelled", e))(oe || {}), Z = /* @__PURE__ */ ((e) => (e.Idle = "Idle", e.InitiateDetected = "InitiateDetected", e.Initiated = "Initiated", e.RedeemDetected = "RedeemDetected", e.Redeemed = "Redeemed", e.RefundDetected = "RefundDetected", e.Refunded = "Refunded", e.Expired = "Expired", e))(Z || {});
892
- const Ma = (e, t, r) => {
926
+ const Ua = (e, t, r) => {
893
927
  const i = Or(
894
928
  e.source_swap,
895
929
  t
@@ -908,8 +942,8 @@ const Ma = (e, t, r) => {
908
942
  if (t > r) return Z.Expired;
909
943
  }
910
944
  return e.initiate_tx_hash ? e.initiate_block_number ? Z.Initiated : Z.InitiateDetected : Z.Idle;
911
- }, Ua = (e, t, r) => {
912
- switch (Ma(
945
+ }, Da = (e, t, r) => {
946
+ switch (Ua(
913
947
  e,
914
948
  t,
915
949
  r
@@ -923,7 +957,7 @@ const Ma = (e, t, r) => {
923
957
  default:
924
958
  return Re.Idle;
925
959
  }
926
- }, Da = [
960
+ }, $a = [
927
961
  {
928
962
  inputs: [
929
963
  {
@@ -1316,7 +1350,7 @@ const Ma = (e, t, r) => {
1316
1350
  type: "function"
1317
1351
  }
1318
1352
  ];
1319
- class $a {
1353
+ class Ha {
1320
1354
  constructor(t, r, i) {
1321
1355
  this.url = new St("/relayer", r), this.auth = i, this.order = t;
1322
1356
  }
@@ -1325,7 +1359,7 @@ class $a {
1325
1359
  if (t.account.address.toLowerCase() !== this.order.source_swap.initiator.toLowerCase())
1326
1360
  return U("Account and order initiator mismatch");
1327
1361
  if (!r) {
1328
- const g = await Lr(t);
1362
+ const g = await Fr(t);
1329
1363
  if (g.error) return U(g.error);
1330
1364
  r = g.val;
1331
1365
  }
@@ -1340,11 +1374,11 @@ class $a {
1340
1374
  try {
1341
1375
  const g = await this.auth.getToken();
1342
1376
  if (g.error) return U(g.error);
1343
- const w = $n({
1377
+ const w = Hn({
1344
1378
  address: We(this.order.source_swap.asset),
1345
- abi: Da,
1379
+ abi: $a,
1346
1380
  client: t
1347
- }), x = await w.read.token(), A = await va(
1381
+ }), x = await w.read.token(), A = await Ea(
1348
1382
  Number(y),
1349
1383
  x,
1350
1384
  this.order.source_swap.asset,
@@ -1417,29 +1451,29 @@ class $a {
1417
1451
  }
1418
1452
  }
1419
1453
  }
1420
- const Ha = Buffer.from(
1454
+ const ja = Buffer.from(
1421
1455
  "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
1422
1456
  "hex"
1423
- ), ja = Buffer.from(
1457
+ ), qa = Buffer.from(
1424
1458
  "483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
1425
1459
  "hex"
1426
- ), qa = Buffer.concat([Ha, ja]), Wa = Buffer.from(
1460
+ ), Wa = Buffer.concat([ja, qa]), Ga = Buffer.from(
1427
1461
  "0250929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0",
1428
1462
  "hex"
1429
- ), un = {
1463
+ ), cn = {
1430
1464
  failedToCreateInternalPubkey: "failed to create internal pubkey",
1431
1465
  failedToTweakPubkey: "failed to tweak pubkey"
1432
1466
  };
1433
- function Ga() {
1434
- const e = Vi.sha256(Buffer.from("GardenHTLC", "utf-8")), t = lt.pointMultiply(
1435
- Buffer.concat([Buffer.from("04", "hex"), qa]),
1467
+ function za() {
1468
+ const e = Yi.sha256(Buffer.from("GardenHTLC", "utf-8")), t = lt.pointMultiply(
1469
+ Buffer.concat([Buffer.from("04", "hex"), Wa]),
1436
1470
  e
1437
1471
  );
1438
1472
  if (!t)
1439
- throw new Error(un.failedToCreateInternalPubkey);
1440
- const r = lt.pointAdd(Wa, t);
1441
- if (!r) throw new Error(un.failedToCreateInternalPubkey);
1442
- return Fr(Buffer.from(r));
1473
+ throw new Error(cn.failedToCreateInternalPubkey);
1474
+ const r = lt.pointAdd(Ga, t);
1475
+ if (!r) throw new Error(cn.failedToCreateInternalPubkey);
1476
+ return Lr(Buffer.from(r));
1443
1477
  }
1444
1478
  const be = {
1445
1479
  secretMismatch: "invalid secret",
@@ -1455,13 +1489,13 @@ const be = {
1455
1489
  controlBlockGenerationFailed: "failed to generate control block",
1456
1490
  invalidLeaf: "invalid leaf"
1457
1491
  }, Ht = 192;
1458
- de.initEccLib(lt);
1492
+ he.initEccLib(lt);
1459
1493
  class Kt {
1460
1494
  /**
1461
1495
  * Note: redeemerAddress and initiatorAddress should be x-only public key without 02 or 03 prefix
1462
1496
  */
1463
1497
  constructor(t, r, i, o, s, c, u) {
1464
- this.secretHash = i, this.redeemerPubkey = o, this.initiatorPubkey = s, this.expiry = c, this.signer = t, this.network = u, this.internalPubkey = Ga(), this.initiateAmount = r;
1498
+ this.secretHash = i, this.redeemerPubkey = o, this.initiatorPubkey = s, this.expiry = c, this.signer = t, this.network = u, this.internalPubkey = za(), this.initiateAmount = r;
1465
1499
  }
1466
1500
  /**
1467
1501
  * Creates a GardenHTLC instance
@@ -1489,8 +1523,8 @@ class Kt {
1489
1523
  t,
1490
1524
  r,
1491
1525
  i,
1492
- Fr(s).toString("hex"),
1493
- Fr(o).toString("hex"),
1526
+ Lr(s).toString("hex"),
1527
+ Lr(o).toString("hex"),
1494
1528
  c,
1495
1529
  u
1496
1530
  );
@@ -1499,7 +1533,7 @@ class Kt {
1499
1533
  * Generates a taproot address for receiving the funds
1500
1534
  */
1501
1535
  address() {
1502
- const { address: t } = de.payments.p2tr({
1536
+ const { address: t } = he.payments.p2tr({
1503
1537
  internalPubkey: this.internalPubkey,
1504
1538
  network: this.network,
1505
1539
  scriptTree: this.leaves()
@@ -1514,14 +1548,14 @@ class Kt {
1514
1548
  return this.address();
1515
1549
  }
1516
1550
  async _buildRawTx(t, r) {
1517
- const i = new de.Transaction();
1551
+ const i = new he.Transaction();
1518
1552
  i.version = 2;
1519
1553
  const o = this.address(), s = await this.signer.getProvider(), c = await s.getUTXOs(o), u = c.reduce((p, y) => p + y.value, 0);
1520
1554
  if (u === 0) throw new Error(`${o} ${be.notFunded}`);
1521
1555
  for (let p = 0; p < c.length; p++)
1522
1556
  i.addInput(Buffer.from(c[p].txid, "hex").reverse(), c[p].vout);
1523
1557
  return r ?? (r = await s.suggestFee(o, u, tn.MEDIUM)), i.addOutput(
1524
- de.address.toOutputScript(t, this.network),
1558
+ he.address.toOutputScript(t, this.network),
1525
1559
  u - r
1526
1560
  ), { tx: i, usedUtxos: c };
1527
1561
  }
@@ -1536,7 +1570,7 @@ class Kt {
1536
1570
  * prevout script for the gardenHTLC address
1537
1571
  */
1538
1572
  getOutputScript() {
1539
- return de.address.toOutputScript(this.address(), this.network);
1573
+ return he.address.toOutputScript(this.address(), this.network);
1540
1574
  }
1541
1575
  async init(t) {
1542
1576
  return t ?? (t = await (await this.signer.getProvider()).suggestFee(
@@ -1556,10 +1590,10 @@ class Kt {
1556
1590
  for (const w of o)
1557
1591
  if (!t.find((x) => x.utxo === w.txid))
1558
1592
  throw new Error(be.counterPartySigNotFound(w.txid));
1559
- const s = this.getOutputScript(), c = de.Transaction.SIGHASH_DEFAULT, u = this.leafHash(
1593
+ const s = this.getOutputScript(), c = he.Transaction.SIGHASH_DEFAULT, u = this.leafHash(
1560
1594
  2
1561
1595
  /* INSTANT_REFUND */
1562
- ), p = o.map((w) => w.value), y = hr(s, o.length);
1596
+ ), p = o.map((w) => w.value), y = dr(s, o.length);
1563
1597
  for (let w = 0; w < i.ins.length; w++) {
1564
1598
  const x = i.hashForWitnessV1(
1565
1599
  w,
@@ -1596,7 +1630,7 @@ class Kt {
1596
1630
  */
1597
1631
  async redeem(t, r, i) {
1598
1632
  ot(
1599
- de.crypto.sha256(Buffer.from(t, "hex")).toString("hex") === this.secretHash,
1633
+ he.crypto.sha256(Buffer.from(t, "hex")).toString("hex") === this.secretHash,
1600
1634
  be.secretMismatch
1601
1635
  );
1602
1636
  const { tx: o, usedUtxos: s } = await this._buildRawTx(
@@ -1605,7 +1639,7 @@ class Kt {
1605
1639
  ), c = this.leafHash(
1606
1640
  1
1607
1641
  /* REDEEM */
1608
- ), u = s.map((w) => w.value), p = hr(this.getOutputScript(), s.length), y = de.Transaction.SIGHASH_DEFAULT;
1642
+ ), u = s.map((w) => w.value), p = dr(this.getOutputScript(), s.length), y = he.Transaction.SIGHASH_DEFAULT;
1609
1643
  for (let w = 0; w < o.ins.length; w++) {
1610
1644
  const x = o.hashForWitnessV1(
1611
1645
  w,
@@ -1639,7 +1673,7 @@ class Kt {
1639
1673
  const u = this.leafHash(
1640
1674
  0
1641
1675
  /* REFUND */
1642
- ), p = o.map((x) => x.value), y = hr(this.getOutputScript(), o.length), g = de.Transaction.SIGHASH_DEFAULT;
1676
+ ), p = o.map((x) => x.value), y = dr(this.getOutputScript(), o.length), g = he.Transaction.SIGHASH_DEFAULT;
1643
1677
  for (let x = 0; x < i.ins.length; x++) {
1644
1678
  i.ins[x].sequence = this.expiry;
1645
1679
  const A = i.hashForWitnessV1(
@@ -1690,7 +1724,7 @@ class Kt {
1690
1724
  default:
1691
1725
  throw new Error(be.invalidLeaf);
1692
1726
  }
1693
- const i = de.payments.p2tr({
1727
+ const i = he.payments.p2tr({
1694
1728
  internalPubkey: this.internalPubkey,
1695
1729
  network: this.network,
1696
1730
  scriptTree: this.leaves(),
@@ -1710,12 +1744,12 @@ class Kt {
1710
1744
  */
1711
1745
  leafHash(t) {
1712
1746
  let r = this.redeemLeaf();
1713
- return t === 0 && (r = this.refundLeaf()), t === 2 && (r = this.instantRefundLeaf()), de.crypto.taggedHash("TapLeaf", Ca(r));
1747
+ return t === 0 && (r = this.refundLeaf()), t === 2 && (r = this.instantRefundLeaf()), he.crypto.taggedHash("TapLeaf", Pa(r));
1714
1748
  }
1715
1749
  refundLeaf() {
1716
- return de.script.fromASM(
1750
+ return he.script.fromASM(
1717
1751
  `
1718
- ${de.script.number.encode(this.expiry).toString("hex")}
1752
+ ${he.script.number.encode(this.expiry).toString("hex")}
1719
1753
  OP_CHECKSEQUENCEVERIFY
1720
1754
  OP_DROP
1721
1755
  ${this.initiatorPubkey}
@@ -1724,7 +1758,7 @@ class Kt {
1724
1758
  );
1725
1759
  }
1726
1760
  redeemLeaf() {
1727
- return de.script.fromASM(
1761
+ return he.script.fromASM(
1728
1762
  `
1729
1763
  OP_SHA256
1730
1764
  ${this.secretHash}
@@ -1735,7 +1769,7 @@ class Kt {
1735
1769
  );
1736
1770
  }
1737
1771
  instantRefundLeaf() {
1738
- return de.script.fromASM(
1772
+ return he.script.fromASM(
1739
1773
  `
1740
1774
  ${this.initiatorPubkey}
1741
1775
  OP_CHECKSIG
@@ -1781,12 +1815,12 @@ class Kt {
1781
1815
  );
1782
1816
  switch (t) {
1783
1817
  case 1: {
1784
- const s = Na(
1818
+ const s = Fa(
1785
1819
  o,
1786
1820
  i
1787
1821
  );
1788
1822
  return [
1789
- de.crypto.taggedHash(
1823
+ he.crypto.taggedHash(
1790
1824
  "TapBranch",
1791
1825
  Buffer.concat(s)
1792
1826
  )
@@ -1801,13 +1835,13 @@ class Kt {
1801
1835
  }
1802
1836
  }
1803
1837
  }
1804
- function hr(e, t) {
1838
+ function dr(e, t) {
1805
1839
  const r = [];
1806
1840
  for (let i = 0; i < t; i++)
1807
1841
  r.push(e);
1808
1842
  return r;
1809
1843
  }
1810
- class za {
1844
+ class Ka {
1811
1845
  constructor(t, r) {
1812
1846
  this.order = t, this.store = r;
1813
1847
  }
@@ -1838,11 +1872,11 @@ class za {
1838
1872
  }
1839
1873
  class iu {
1840
1874
  constructor(t) {
1841
- if (this.eventListeners = /* @__PURE__ */ new Map(), this.getOrderThreshold = 20, this.pendingOrdersCount = 0, this.useRelay = !0, this.orderBook = new qi({
1875
+ if (this.eventListeners = /* @__PURE__ */ new Map(), this.getOrderThreshold = 20, this.pendingOrdersCount = 0, this.useRelay = !0, this.orderBook = new Gi({
1842
1876
  url: t.orderbookURl,
1843
1877
  walletClient: t.wallets.evmWallet,
1844
1878
  auth: t.auth
1845
- }), this.quote = t.quote, this.secretManager = t.secretManager, this.wallets = t.wallets, this.orderbookUrl = t.orderbookURl, this.auth = t.auth, this.store = new xa(), !t.wallets.evmWallet.account)
1879
+ }), this.quote = t.quote, this.secretManager = t.secretManager, this.wallets = t.wallets, this.orderbookUrl = t.orderbookURl, this.auth = t.auth, this.store = new Ba(), !t.wallets.evmWallet.account)
1846
1880
  throw new Error("Account not found in evmWallet");
1847
1881
  this.evmAddress = t.wallets.evmWallet.account.address;
1848
1882
  }
@@ -1887,7 +1921,7 @@ class iu {
1887
1921
  async validateAndFillParams(t) {
1888
1922
  if (t.fromAsset.chain === t.toAsset.chain && t.fromAsset.atomicSwapAddress === t.toAsset.atomicSwapAddress)
1889
1923
  return U("Source and destination assets cannot be the same");
1890
- if (Ft(t.fromAsset.chain) && !Ft(t.toAsset.chain) || !Ft(t.fromAsset.chain) && Ft(t.toAsset.chain))
1924
+ if (Lt(t.fromAsset.chain) && !Lt(t.toAsset.chain) || !Lt(t.fromAsset.chain) && Lt(t.toAsset.chain))
1891
1925
  return U(
1892
1926
  "Both assets should be on the same network (either mainnet or testnet)"
1893
1927
  );
@@ -1948,7 +1982,7 @@ class iu {
1948
1982
  async pollOrder(t) {
1949
1983
  let r = await this.orderBook.getOrder(t, !0), i = 0;
1950
1984
  for (; i < this.getOrderThreshold; ) {
1951
- if (await Ji(1e3), i++, r.error) {
1985
+ if (await Xi(1e3), i++, r.error) {
1952
1986
  if (!r.error.includes("result is undefined"))
1953
1987
  return U(r.error);
1954
1988
  } else if (r.val && r.val.create_order.create_id.toLowerCase() === t.toLowerCase())
@@ -1991,18 +2025,18 @@ class iu {
1991
2025
  );
1992
2026
  return;
1993
2027
  }
1994
- const x = Ua(
2028
+ const x = Da(
1995
2029
  c,
1996
2030
  w.val.source,
1997
2031
  w.val.destination
1998
- ), A = new za(c, this.store), R = A.get(x);
1999
- if (console.log("prevResult :", R), R) continue;
2032
+ ), A = new Ka(c, this.store);
2033
+ if (A.get(x)) continue;
2000
2034
  switch (Mt(c.destination_swap.chain)) {
2001
2035
  case qe.EVM:
2002
2036
  switch (x) {
2003
2037
  case Re.Redeem: {
2004
2038
  console.log("executing evm redeem...");
2005
- const E = new $a(
2039
+ const E = new Ha(
2006
2040
  c,
2007
2041
  this.orderbookUrl,
2008
2042
  this.auth
@@ -2116,13 +2150,13 @@ class iu {
2116
2150
  async fetchCurrentBlockNumbers(t, r) {
2117
2151
  if (!r || !r.source || !r.destination)
2118
2152
  return U("Provide wallets to fetch the current block number");
2119
- const i = Ot(t.source_swap.chain) ? await fn(
2153
+ const i = Ot(t.source_swap.chain) ? await un(
2120
2154
  await r.source.getProvider()
2121
- ) : await Lr(r.source);
2155
+ ) : await Fr(r.source);
2122
2156
  if (i.error) return U(i.error);
2123
- const o = Ot(t.destination_swap.chain) ? await fn(
2157
+ const o = Ot(t.destination_swap.chain) ? await un(
2124
2158
  await r.destination.getProvider()
2125
- ) : await Lr(r.destination);
2159
+ ) : await Fr(r.destination);
2126
2160
  return o.error ? U(o.error) : ne({
2127
2161
  source: i.val,
2128
2162
  destination: o.val
@@ -2130,7 +2164,7 @@ class iu {
2130
2164
  }
2131
2165
  }
2132
2166
  var ze = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2133
- function Ka(e) {
2167
+ function Va(e) {
2134
2168
  if (e.__esModule) return e;
2135
2169
  var t = e.default;
2136
2170
  if (typeof t == "function") {
@@ -2149,10 +2183,10 @@ function Ka(e) {
2149
2183
  });
2150
2184
  }), r;
2151
2185
  }
2152
- var Yn = {}, ht = {}, dt = {};
2153
- Object.defineProperty(dt, "__esModule", { value: !0 });
2154
- dt.testnet = dt.bitcoin = void 0;
2155
- dt.bitcoin = {
2186
+ var Qn = {}, dt = {}, ht = {};
2187
+ Object.defineProperty(ht, "__esModule", { value: !0 });
2188
+ ht.testnet = ht.bitcoin = void 0;
2189
+ ht.bitcoin = {
2156
2190
  messagePrefix: `Bitcoin Signed Message:
2157
2191
  `,
2158
2192
  bech32: "bc",
@@ -2164,7 +2198,7 @@ dt.bitcoin = {
2164
2198
  scriptHash: 5,
2165
2199
  wif: 128
2166
2200
  };
2167
- dt.testnet = {
2201
+ ht.testnet = {
2168
2202
  messagePrefix: `Bitcoin Signed Message:
2169
2203
  `,
2170
2204
  bech32: "tb",
@@ -2176,7 +2210,7 @@ dt.testnet = {
2176
2210
  scriptHash: 196,
2177
2211
  wif: 239
2178
2212
  };
2179
- var Xn = {}, It = {
2213
+ var Zn = {}, It = {
2180
2214
  Array: function(e) {
2181
2215
  return e != null && e.constructor === Array;
2182
2216
  },
@@ -2203,48 +2237,48 @@ var Xn = {}, It = {
2203
2237
  }
2204
2238
  };
2205
2239
  It.Null = It.Nil;
2206
- for (var cn in It)
2207
- It[cn].toJSON = (function(e) {
2240
+ for (var ln in It)
2241
+ It[ln].toJSON = (function(e) {
2208
2242
  return e;
2209
- }).bind(null, cn);
2243
+ }).bind(null, ln);
2210
2244
  var zr = It, Qe = zr;
2211
- function Qn(e) {
2245
+ function ei(e) {
2212
2246
  return e.name || e.toString().match(/function (.*?)\s*\(/)[1];
2213
2247
  }
2214
2248
  function Kr(e) {
2215
- return Qe.Nil(e) ? "" : Qn(e.constructor);
2249
+ return Qe.Nil(e) ? "" : ei(e.constructor);
2216
2250
  }
2217
- function Va(e) {
2251
+ function Ja(e) {
2218
2252
  return Qe.Function(e) ? "" : Qe.String(e) ? JSON.stringify(e) : e && Qe.Object(e) ? "" : e;
2219
2253
  }
2220
2254
  function Vr(e, t) {
2221
2255
  Error.captureStackTrace && Error.captureStackTrace(e, t);
2222
2256
  }
2223
2257
  function Vt(e) {
2224
- return Qe.Function(e) ? e.toJSON ? e.toJSON() : Qn(e) : Qe.Array(e) ? "Array" : e && Qe.Object(e) ? "Object" : e !== void 0 ? e : "";
2258
+ return Qe.Function(e) ? e.toJSON ? e.toJSON() : ei(e) : Qe.Array(e) ? "Array" : e && Qe.Object(e) ? "Object" : e !== void 0 ? e : "";
2225
2259
  }
2226
- function Zn(e, t, r) {
2227
- var i = Va(t);
2260
+ function ti(e, t, r) {
2261
+ var i = Ja(t);
2228
2262
  return "Expected " + Vt(e) + ", got" + (r !== "" ? " " + r : "") + (i !== "" ? " " + i : "");
2229
2263
  }
2230
2264
  function Oe(e, t, r) {
2231
- r = r || Kr(t), this.message = Zn(e, t, r), Vr(this, Oe), this.__type = e, this.__value = t, this.__valueTypeName = r;
2265
+ r = r || Kr(t), this.message = ti(e, t, r), Vr(this, Oe), this.__type = e, this.__value = t, this.__valueTypeName = r;
2232
2266
  }
2233
2267
  Oe.prototype = Object.create(Error.prototype);
2234
2268
  Oe.prototype.constructor = Oe;
2235
- function Ja(e, t, r, i, o) {
2269
+ function Ya(e, t, r, i, o) {
2236
2270
  var s = '" of type ';
2237
- return t === "key" && (s = '" with key type '), Zn('property "' + Vt(r) + s + Vt(e), i, o);
2271
+ return t === "key" && (s = '" with key type '), ti('property "' + Vt(r) + s + Vt(e), i, o);
2238
2272
  }
2239
2273
  function ut(e, t, r, i, o) {
2240
- e ? (o = o || Kr(i), this.message = Ja(e, r, t, i, o)) : this.message = 'Unexpected property "' + t + '"', Vr(this, Oe), this.__label = r, this.__property = t, this.__type = e, this.__value = i, this.__valueTypeName = o;
2274
+ e ? (o = o || Kr(i), this.message = Ya(e, r, t, i, o)) : this.message = 'Unexpected property "' + t + '"', Vr(this, Oe), this.__label = r, this.__property = t, this.__type = e, this.__value = i, this.__valueTypeName = o;
2241
2275
  }
2242
2276
  ut.prototype = Object.create(Error.prototype);
2243
2277
  ut.prototype.constructor = Oe;
2244
- function Ya(e, t) {
2278
+ function Xa(e, t) {
2245
2279
  return new Oe(e, {}, t);
2246
2280
  }
2247
- function Xa(e, t, r) {
2281
+ function Qa(e, t, r) {
2248
2282
  return e instanceof ut ? (t = t + "." + e.__property, e = new ut(
2249
2283
  e.__type,
2250
2284
  t,
@@ -2259,18 +2293,18 @@ function Xa(e, t, r) {
2259
2293
  e.__valueTypeName
2260
2294
  )), Vr(e), e;
2261
2295
  }
2262
- var ei = {
2296
+ var ri = {
2263
2297
  TfTypeError: Oe,
2264
2298
  TfPropertyTypeError: ut,
2265
- tfCustomError: Ya,
2266
- tfSubError: Xa,
2299
+ tfCustomError: Xa,
2300
+ tfSubError: Qa,
2267
2301
  tfJSON: Vt,
2268
2302
  getValueTypeName: Kr
2269
- }, dr, ln;
2270
- function Qa() {
2271
- if (ln) return dr;
2272
- ln = 1;
2273
- var e = zr, t = ei;
2303
+ }, hr, dn;
2304
+ function Za() {
2305
+ if (dn) return hr;
2306
+ dn = 1;
2307
+ var e = zr, t = ri;
2274
2308
  function r(S) {
2275
2309
  return Buffer.isBuffer(S);
2276
2310
  }
@@ -2323,7 +2357,7 @@ function Qa() {
2323
2357
  function P(S) {
2324
2358
  return S >>> 0 === S;
2325
2359
  }
2326
- function L(S) {
2360
+ function F(S) {
2327
2361
  return typeof S == "number" && S >= 0 && S <= g && Math.floor(S) === S;
2328
2362
  }
2329
2363
  var N = {
@@ -2342,15 +2376,15 @@ function Qa() {
2342
2376
  UInt8: E,
2343
2377
  UInt16: T,
2344
2378
  UInt32: P,
2345
- UInt53: L
2379
+ UInt53: F
2346
2380
  };
2347
- for (var F in N)
2348
- N[F].toJSON = (function(S) {
2381
+ for (var L in N)
2382
+ N[L].toJSON = (function(S) {
2349
2383
  return S;
2350
- }).bind(null, F);
2351
- return dr = N, dr;
2384
+ }).bind(null, L);
2385
+ return hr = N, hr;
2352
2386
  }
2353
- var Tt = ei, fe = zr, Le = Tt.tfJSON, ti = Tt.TfTypeError, ri = Tt.TfPropertyTypeError, mt = Tt.tfSubError, Za = Tt.getValueTypeName, Fe = {
2387
+ var Tt = ri, fe = zr, Fe = Tt.tfJSON, ni = Tt.TfTypeError, ii = Tt.TfPropertyTypeError, _t = Tt.tfSubError, eo = Tt.getValueTypeName, Le = {
2354
2388
  arrayOf: function(t, r) {
2355
2389
  t = Ce(t), r = r || {};
2356
2390
  function i(o, s) {
@@ -2358,12 +2392,12 @@ var Tt = ei, fe = zr, Le = Tt.tfJSON, ti = Tt.TfTypeError, ri = Tt.TfPropertyTyp
2358
2392
  try {
2359
2393
  return ge(t, c, s);
2360
2394
  } catch (p) {
2361
- throw mt(p, u);
2395
+ throw _t(p, u);
2362
2396
  }
2363
2397
  });
2364
2398
  }
2365
2399
  return i.toJSON = function() {
2366
- var o = "[" + Le(t) + "]";
2400
+ var o = "[" + Fe(t) + "]";
2367
2401
  return r.length !== void 0 ? o += "{" + r.length + "}" : (r.minLength !== void 0 || r.maxLength !== void 0) && (o += "{" + (r.minLength === void 0 ? 0 : r.minLength) + "," + (r.maxLength === void 0 ? 1 / 0 : r.maxLength) + "}"), o;
2368
2402
  }, i;
2369
2403
  },
@@ -2373,7 +2407,7 @@ var Tt = ei, fe = zr, Le = Tt.tfJSON, ti = Tt.TfTypeError, ri = Tt.TfPropertyTyp
2373
2407
  return fe.Nil(i) || t(i, o, e);
2374
2408
  }
2375
2409
  return r.toJSON = function() {
2376
- return "?" + Le(t);
2410
+ return "?" + Fe(t);
2377
2411
  }, r;
2378
2412
  },
2379
2413
  map: function(t, r) {
@@ -2384,21 +2418,21 @@ var Tt = ei, fe = zr, Le = Tt.tfJSON, ti = Tt.TfTypeError, ri = Tt.TfPropertyTyp
2384
2418
  try {
2385
2419
  r && ge(r, c, s);
2386
2420
  } catch (p) {
2387
- throw mt(p, c, "key");
2421
+ throw _t(p, c, "key");
2388
2422
  }
2389
2423
  try {
2390
2424
  var u = o[c];
2391
2425
  ge(t, u, s);
2392
2426
  } catch (p) {
2393
- throw mt(p, c);
2427
+ throw _t(p, c);
2394
2428
  }
2395
2429
  }
2396
2430
  return !0;
2397
2431
  }
2398
2432
  return r ? i.toJSON = function() {
2399
- return "{" + Le(r) + ": " + Le(t) + "}";
2433
+ return "{" + Fe(r) + ": " + Fe(t) + "}";
2400
2434
  } : i.toJSON = function() {
2401
- return "{" + Le(t) + "}";
2435
+ return "{" + Fe(t) + "}";
2402
2436
  }, i;
2403
2437
  },
2404
2438
  object: function(t) {
@@ -2414,17 +2448,17 @@ var Tt = ei, fe = zr, Le = Tt.tfJSON, ti = Tt.TfTypeError, ri = Tt.TfPropertyTyp
2414
2448
  ge(p, y, c);
2415
2449
  }
2416
2450
  } catch (g) {
2417
- throw mt(g, u);
2451
+ throw _t(g, u);
2418
2452
  }
2419
2453
  if (c) {
2420
2454
  for (u in s)
2421
2455
  if (!r[u])
2422
- throw new ri(void 0, u);
2456
+ throw new ii(void 0, u);
2423
2457
  }
2424
2458
  return !0;
2425
2459
  }
2426
2460
  return o.toJSON = function() {
2427
- return Le(r);
2461
+ return Fe(r);
2428
2462
  }, o;
2429
2463
  },
2430
2464
  anyOf: function() {
@@ -2439,7 +2473,7 @@ var Tt = ei, fe = zr, Le = Tt.tfJSON, ti = Tt.TfTypeError, ri = Tt.TfPropertyTyp
2439
2473
  });
2440
2474
  }
2441
2475
  return r.toJSON = function() {
2442
- return t.map(Le).join("|");
2476
+ return t.map(Fe).join("|");
2443
2477
  }, r;
2444
2478
  },
2445
2479
  allOf: function() {
@@ -2454,12 +2488,12 @@ var Tt = ei, fe = zr, Le = Tt.tfJSON, ti = Tt.TfTypeError, ri = Tt.TfPropertyTyp
2454
2488
  });
2455
2489
  }
2456
2490
  return r.toJSON = function() {
2457
- return t.map(Le).join(" & ");
2491
+ return t.map(Fe).join(" & ");
2458
2492
  }, r;
2459
2493
  },
2460
2494
  quacksLike: function(t) {
2461
2495
  function r(i) {
2462
- return t === Za(i);
2496
+ return t === eo(i);
2463
2497
  }
2464
2498
  return r.toJSON = function() {
2465
2499
  return t;
@@ -2472,12 +2506,12 @@ var Tt = ei, fe = zr, Le = Tt.tfJSON, ti = Tt.TfTypeError, ri = Tt.TfPropertyTyp
2472
2506
  try {
2473
2507
  return ge(s, i[c], o);
2474
2508
  } catch (u) {
2475
- throw mt(u, c);
2509
+ throw _t(u, c);
2476
2510
  }
2477
2511
  });
2478
2512
  }
2479
2513
  return r.toJSON = function() {
2480
- return "(" + t.map(Le).join(", ") + ")";
2514
+ return "(" + t.map(Fe).join(", ") + ")";
2481
2515
  }, r;
2482
2516
  },
2483
2517
  value: function(t) {
@@ -2489,40 +2523,40 @@ var Tt = ei, fe = zr, Le = Tt.tfJSON, ti = Tt.TfTypeError, ri = Tt.TfPropertyTyp
2489
2523
  }, r;
2490
2524
  }
2491
2525
  };
2492
- Fe.oneOf = Fe.anyOf;
2526
+ Le.oneOf = Le.anyOf;
2493
2527
  function Ce(e) {
2494
2528
  if (fe.String(e))
2495
- return e[0] === "?" ? Fe.maybe(e.slice(1)) : fe[e] || Fe.quacksLike(e);
2529
+ return e[0] === "?" ? Le.maybe(e.slice(1)) : fe[e] || Le.quacksLike(e);
2496
2530
  if (e && fe.Object(e)) {
2497
2531
  if (fe.Array(e)) {
2498
2532
  if (e.length !== 1) throw new TypeError("Expected compile() parameter of type Array of length 1");
2499
- return Fe.arrayOf(e[0]);
2533
+ return Le.arrayOf(e[0]);
2500
2534
  }
2501
- return Fe.object(e);
2535
+ return Le.object(e);
2502
2536
  } else if (fe.Function(e))
2503
2537
  return e;
2504
- return Fe.value(e);
2538
+ return Le.value(e);
2505
2539
  }
2506
2540
  function ge(e, t, r, i) {
2507
2541
  if (fe.Function(e)) {
2508
2542
  if (e(t, r)) return !0;
2509
- throw new ti(i || e, t);
2543
+ throw new ni(i || e, t);
2510
2544
  }
2511
2545
  return ge(Ce(e), t, r);
2512
2546
  }
2513
2547
  for (var Ge in fe)
2514
2548
  ge[Ge] = fe[Ge];
2515
- for (Ge in Fe)
2516
- ge[Ge] = Fe[Ge];
2517
- var hn = Qa();
2549
+ for (Ge in Le)
2550
+ ge[Ge] = Le[Ge];
2551
+ var hn = Za();
2518
2552
  for (Ge in hn)
2519
2553
  ge[Ge] = hn[Ge];
2520
2554
  ge.compile = Ce;
2521
- ge.TfTypeError = ti;
2522
- ge.TfPropertyTypeError = ri;
2523
- var eo = ge;
2555
+ ge.TfTypeError = ni;
2556
+ ge.TfPropertyTypeError = ii;
2557
+ var to = ge;
2524
2558
  (function(e) {
2525
- Object.defineProperty(e, "__esModule", { value: !0 }), e.maybe = e.Boolean = e.Array = e.Buffer256bit = e.Network = e.typeforce = void 0, e.typeforce = eo, e.Network = e.typeforce.compile({
2559
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.maybe = e.Boolean = e.Array = e.Buffer256bit = e.Network = e.typeforce = void 0, e.typeforce = to, e.Network = e.typeforce.compile({
2526
2560
  messagePrefix: e.typeforce.oneOf(
2527
2561
  e.typeforce.Buffer,
2528
2562
  e.typeforce.String
@@ -2535,17 +2569,17 @@ var eo = ge;
2535
2569
  scriptHash: e.typeforce.UInt8,
2536
2570
  wif: e.typeforce.UInt8
2537
2571
  }), e.Buffer256bit = e.typeforce.BufferN(32), e.Array = e.typeforce.Array, e.Boolean = e.typeforce.Boolean, e.maybe = e.typeforce.maybe;
2538
- })(Xn);
2572
+ })(Zn);
2539
2573
  var Mr = { exports: {} }, Ur = { exports: {} }, bt = {}, Zt = {};
2540
- Zt.byteLength = no;
2541
- Zt.toByteArray = ao;
2542
- Zt.fromByteArray = fo;
2543
- var Pe = [], Be = [], to = typeof Uint8Array < "u" ? Uint8Array : Array, pr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
2544
- for (var st = 0, ro = pr.length; st < ro; ++st)
2574
+ Zt.byteLength = io;
2575
+ Zt.toByteArray = oo;
2576
+ Zt.fromByteArray = uo;
2577
+ var Pe = [], Be = [], ro = typeof Uint8Array < "u" ? Uint8Array : Array, pr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
2578
+ for (var st = 0, no = pr.length; st < no; ++st)
2545
2579
  Pe[st] = pr[st], Be[pr.charCodeAt(st)] = st;
2546
2580
  Be[45] = 62;
2547
2581
  Be[95] = 63;
2548
- function ni(e) {
2582
+ function ai(e) {
2549
2583
  var t = e.length;
2550
2584
  if (t % 4 > 0)
2551
2585
  throw new Error("Invalid string. Length must be a multiple of 4");
@@ -2554,30 +2588,30 @@ function ni(e) {
2554
2588
  var i = r === t ? 0 : 4 - r % 4;
2555
2589
  return [r, i];
2556
2590
  }
2557
- function no(e) {
2558
- var t = ni(e), r = t[0], i = t[1];
2591
+ function io(e) {
2592
+ var t = ai(e), r = t[0], i = t[1];
2559
2593
  return (r + i) * 3 / 4 - i;
2560
2594
  }
2561
- function io(e, t, r) {
2595
+ function ao(e, t, r) {
2562
2596
  return (t + r) * 3 / 4 - r;
2563
2597
  }
2564
- function ao(e) {
2565
- var t, r = ni(e), i = r[0], o = r[1], s = new to(io(e, i, o)), c = 0, u = o > 0 ? i - 4 : i, p;
2598
+ function oo(e) {
2599
+ var t, r = ai(e), i = r[0], o = r[1], s = new ro(ao(e, i, o)), c = 0, u = o > 0 ? i - 4 : i, p;
2566
2600
  for (p = 0; p < u; p += 4)
2567
2601
  t = Be[e.charCodeAt(p)] << 18 | Be[e.charCodeAt(p + 1)] << 12 | Be[e.charCodeAt(p + 2)] << 6 | Be[e.charCodeAt(p + 3)], s[c++] = t >> 16 & 255, s[c++] = t >> 8 & 255, s[c++] = t & 255;
2568
2602
  return o === 2 && (t = Be[e.charCodeAt(p)] << 2 | Be[e.charCodeAt(p + 1)] >> 4, s[c++] = t & 255), o === 1 && (t = Be[e.charCodeAt(p)] << 10 | Be[e.charCodeAt(p + 1)] << 4 | Be[e.charCodeAt(p + 2)] >> 2, s[c++] = t >> 8 & 255, s[c++] = t & 255), s;
2569
2603
  }
2570
- function oo(e) {
2604
+ function so(e) {
2571
2605
  return Pe[e >> 18 & 63] + Pe[e >> 12 & 63] + Pe[e >> 6 & 63] + Pe[e & 63];
2572
2606
  }
2573
- function so(e, t, r) {
2607
+ function fo(e, t, r) {
2574
2608
  for (var i, o = [], s = t; s < r; s += 3)
2575
- i = (e[s] << 16 & 16711680) + (e[s + 1] << 8 & 65280) + (e[s + 2] & 255), o.push(oo(i));
2609
+ i = (e[s] << 16 & 16711680) + (e[s + 1] << 8 & 65280) + (e[s + 2] & 255), o.push(so(i));
2576
2610
  return o.join("");
2577
2611
  }
2578
- function fo(e) {
2612
+ function uo(e) {
2579
2613
  for (var t, r = e.length, i = r % 3, o = [], s = 16383, c = 0, u = r - i; c < u; c += s)
2580
- o.push(so(e, c, c + s > u ? u : c + s));
2614
+ o.push(fo(e, c, c + s > u ? u : c + s));
2581
2615
  return i === 1 ? (t = e[r - 1], o.push(
2582
2616
  Pe[t >> 2] + Pe[t << 4 & 63] + "=="
2583
2617
  )) : i === 2 && (t = (e[r - 2] << 8) + e[r - 1], o.push(
@@ -2714,7 +2748,7 @@ Jr.write = function(e, t, r, i, o, s) {
2714
2748
  function x(f, n) {
2715
2749
  if ((typeof n != "string" || n === "") && (n = "utf8"), !u.isEncoding(n))
2716
2750
  throw new TypeError("Unknown encoding: " + n);
2717
- const a = L(f, n) | 0;
2751
+ const a = F(f, n) | 0;
2718
2752
  let l = c(a);
2719
2753
  const b = l.write(f, n);
2720
2754
  return b !== a && (l = l.slice(0, b)), l;
@@ -2817,7 +2851,7 @@ Jr.write = function(e, t, r, i, o, s) {
2817
2851
  }
2818
2852
  return b;
2819
2853
  };
2820
- function L(f, n) {
2854
+ function F(f, n) {
2821
2855
  if (u.isBuffer(f))
2822
2856
  return f.length;
2823
2857
  if (ArrayBuffer.isView(f) || xe(f, ArrayBuffer))
@@ -2853,7 +2887,7 @@ Jr.write = function(e, t, r, i, o, s) {
2853
2887
  n = ("" + n).toLowerCase(), b = !0;
2854
2888
  }
2855
2889
  }
2856
- u.byteLength = L;
2890
+ u.byteLength = F;
2857
2891
  function N(f, n, a) {
2858
2892
  let l = !1;
2859
2893
  if ((n === void 0 || n < 0) && (n = 0), n > this.length || ((a === void 0 || a > this.length) && (a = this.length), a <= 0) || (a >>>= 0, n >>>= 0, a <= n))
@@ -2864,7 +2898,7 @@ Jr.write = function(e, t, r, i, o, s) {
2864
2898
  return Te(this, n, a);
2865
2899
  case "utf8":
2866
2900
  case "utf-8":
2867
- return _e(this, n, a);
2901
+ return me(this, n, a);
2868
2902
  case "ascii":
2869
2903
  return Ae(this, n, a);
2870
2904
  case "latin1":
@@ -2883,7 +2917,7 @@ Jr.write = function(e, t, r, i, o, s) {
2883
2917
  }
2884
2918
  }
2885
2919
  u.prototype._isBuffer = !0;
2886
- function F(f, n, a) {
2920
+ function L(f, n, a) {
2887
2921
  const l = f[n];
2888
2922
  f[n] = f[a], f[a] = l;
2889
2923
  }
@@ -2892,25 +2926,25 @@ Jr.write = function(e, t, r, i, o, s) {
2892
2926
  if (n % 2 !== 0)
2893
2927
  throw new RangeError("Buffer size must be a multiple of 16-bits");
2894
2928
  for (let a = 0; a < n; a += 2)
2895
- F(this, a, a + 1);
2929
+ L(this, a, a + 1);
2896
2930
  return this;
2897
2931
  }, u.prototype.swap32 = function() {
2898
2932
  const n = this.length;
2899
2933
  if (n % 4 !== 0)
2900
2934
  throw new RangeError("Buffer size must be a multiple of 32-bits");
2901
2935
  for (let a = 0; a < n; a += 4)
2902
- F(this, a, a + 3), F(this, a + 1, a + 2);
2936
+ L(this, a, a + 3), L(this, a + 1, a + 2);
2903
2937
  return this;
2904
2938
  }, u.prototype.swap64 = function() {
2905
2939
  const n = this.length;
2906
2940
  if (n % 8 !== 0)
2907
2941
  throw new RangeError("Buffer size must be a multiple of 64-bits");
2908
2942
  for (let a = 0; a < n; a += 8)
2909
- F(this, a, a + 7), F(this, a + 1, a + 6), F(this, a + 2, a + 5), F(this, a + 3, a + 4);
2943
+ L(this, a, a + 7), L(this, a + 1, a + 6), L(this, a + 2, a + 5), L(this, a + 3, a + 4);
2910
2944
  return this;
2911
2945
  }, u.prototype.toString = function() {
2912
2946
  const n = this.length;
2913
- return n === 0 ? "" : arguments.length === 0 ? _e(this, 0, n) : N.apply(this, arguments);
2947
+ return n === 0 ? "" : arguments.length === 0 ? me(this, 0, n) : N.apply(this, arguments);
2914
2948
  }, u.prototype.toLocaleString = u.prototype.toString, u.prototype.equals = function(n) {
2915
2949
  if (!u.isBuffer(n)) throw new TypeError("Argument must be a Buffer");
2916
2950
  return this === n ? !0 : u.compare(this, n) === 0;
@@ -3065,7 +3099,7 @@ Jr.write = function(e, t, r, i, o, s) {
3065
3099
  function ae(f, n, a) {
3066
3100
  return n === 0 && a === f.length ? t.fromByteArray(f) : t.fromByteArray(f.slice(n, a));
3067
3101
  }
3068
- function _e(f, n, a) {
3102
+ function me(f, n, a) {
3069
3103
  a = Math.min(f.length, a);
3070
3104
  const l = [];
3071
3105
  let b = n;
@@ -3092,16 +3126,16 @@ Jr.write = function(e, t, r, i, o, s) {
3092
3126
  }
3093
3127
  return Ve(l);
3094
3128
  }
3095
- const me = 4096;
3129
+ const _e = 4096;
3096
3130
  function Ve(f) {
3097
3131
  const n = f.length;
3098
- if (n <= me)
3132
+ if (n <= _e)
3099
3133
  return String.fromCharCode.apply(String, f);
3100
3134
  let a = "", l = 0;
3101
3135
  for (; l < n; )
3102
3136
  a += String.fromCharCode.apply(
3103
3137
  String,
3104
- f.slice(l, l += me)
3138
+ f.slice(l, l += _e)
3105
3139
  );
3106
3140
  return a;
3107
3141
  }
@@ -3124,7 +3158,7 @@ Jr.write = function(e, t, r, i, o, s) {
3124
3158
  (!n || n < 0) && (n = 0), (!a || a < 0 || a > l) && (a = l);
3125
3159
  let b = "";
3126
3160
  for (let v = n; v < a; ++v)
3127
- b += _t[f[v]];
3161
+ b += mt[f[v]];
3128
3162
  return b;
3129
3163
  }
3130
3164
  function $e(f, n, a) {
@@ -3261,14 +3295,14 @@ Jr.write = function(e, t, r, i, o, s) {
3261
3295
  return n = +n, a = a >>> 0, l || ie(this, n, a, 4, 4294967295, 0), this[a] = n >>> 24, this[a + 1] = n >>> 16, this[a + 2] = n >>> 8, this[a + 3] = n & 255, a + 4;
3262
3296
  };
3263
3297
  function ve(f, n, a, l, b) {
3264
- d(n, l, b, f, a, 7);
3298
+ h(n, l, b, f, a, 7);
3265
3299
  let v = Number(n & BigInt(4294967295));
3266
3300
  f[a++] = v, v = v >> 8, f[a++] = v, v = v >> 8, f[a++] = v, v = v >> 8, f[a++] = v;
3267
3301
  let B = Number(n >> BigInt(32) & BigInt(4294967295));
3268
3302
  return f[a++] = B, B = B >> 8, f[a++] = B, B = B >> 8, f[a++] = B, B = B >> 8, f[a++] = B, a;
3269
3303
  }
3270
3304
  function He(f, n, a, l, b) {
3271
- d(n, l, b, f, a, 7);
3305
+ h(n, l, b, f, a, 7);
3272
3306
  let v = Number(n & BigInt(4294967295));
3273
3307
  f[a + 7] = v, v = v >> 8, f[a + 6] = v, v = v >> 8, f[a + 5] = v, v = v >> 8, f[a + 4] = v;
3274
3308
  let B = Number(n >> BigInt(32) & BigInt(4294967295));
@@ -3315,21 +3349,21 @@ Jr.write = function(e, t, r, i, o, s) {
3315
3349
  if (a + l > f.length) throw new RangeError("Index out of range");
3316
3350
  if (a < 0) throw new RangeError("Index out of range");
3317
3351
  }
3318
- function m(f, n, a, l, b) {
3352
+ function _(f, n, a, l, b) {
3319
3353
  return n = +n, a = a >>> 0, b || Ne(f, n, a, 4), r.write(f, n, a, l, 23, 4), a + 4;
3320
3354
  }
3321
3355
  u.prototype.writeFloatLE = function(n, a, l) {
3322
- return m(this, n, a, !0, l);
3356
+ return _(this, n, a, !0, l);
3323
3357
  }, u.prototype.writeFloatBE = function(n, a, l) {
3324
- return m(this, n, a, !1, l);
3358
+ return _(this, n, a, !1, l);
3325
3359
  };
3326
- function _(f, n, a, l, b) {
3360
+ function m(f, n, a, l, b) {
3327
3361
  return n = +n, a = a >>> 0, b || Ne(f, n, a, 8), r.write(f, n, a, l, 52, 8), a + 8;
3328
3362
  }
3329
3363
  u.prototype.writeDoubleLE = function(n, a, l) {
3330
- return _(this, n, a, !0, l);
3364
+ return m(this, n, a, !0, l);
3331
3365
  }, u.prototype.writeDoubleBE = function(n, a, l) {
3332
- return _(this, n, a, !1, l);
3366
+ return m(this, n, a, !1, l);
3333
3367
  }, u.prototype.copy = function(n, a, l, b) {
3334
3368
  if (!u.isBuffer(n)) throw new TypeError("argument should be a Buffer");
3335
3369
  if (l || (l = 0), !b && b !== 0 && (b = this.length), a >= n.length && (a = n.length), a || (a = 0), b > 0 && b < l && (b = l), b === l || n.length === 0 || this.length === 0) return 0;
@@ -3426,16 +3460,16 @@ Jr.write = function(e, t, r, i, o, s) {
3426
3460
  n = `_${f.slice(a - 3, a)}${n}`;
3427
3461
  return `${f.slice(0, a)}${n}`;
3428
3462
  }
3429
- function h(f, n, a) {
3463
+ function d(f, n, a) {
3430
3464
  I(n, "offset"), (f[n] === void 0 || f[n + a] === void 0) && O(n, f.length - (a + 1));
3431
3465
  }
3432
- function d(f, n, a, l, b, v) {
3466
+ function h(f, n, a, l, b, v) {
3433
3467
  if (f > a || f < n) {
3434
3468
  const B = typeof n == "bigint" ? "n" : "";
3435
3469
  let G;
3436
3470
  throw n === 0 || n === BigInt(0) ? G = `>= 0${B} and < 2${B} ** ${(v + 1) * 8}${B}` : G = `>= -(2${B} ** ${(v + 1) * 8 - 1}${B}) and < 2 ** ${(v + 1) * 8 - 1}${B}`, new k.ERR_OUT_OF_RANGE("value", G, f);
3437
3471
  }
3438
- h(l, b, v);
3472
+ d(l, b, v);
3439
3473
  }
3440
3474
  function I(f, n) {
3441
3475
  if (typeof f != "number")
@@ -3537,7 +3571,7 @@ Jr.write = function(e, t, r, i, o, s) {
3537
3571
  function Je(f) {
3538
3572
  return f !== f;
3539
3573
  }
3540
- const _t = function() {
3574
+ const mt = function() {
3541
3575
  const f = "0123456789abcdef", n = new Array(256);
3542
3576
  for (let a = 0; a < 16; ++a) {
3543
3577
  const l = a * 16;
@@ -3583,16 +3617,16 @@ Jr.write = function(e, t, r, i, o, s) {
3583
3617
  return r.SlowBuffer(c);
3584
3618
  };
3585
3619
  })(Ur, Ur.exports);
3586
- var we = Ur.exports, br = 65536, uo = 4294967295;
3587
- function co() {
3620
+ var we = Ur.exports, br = 65536, co = 4294967295;
3621
+ function lo() {
3588
3622
  throw new Error(`Secure random number generation is not supported by this browser.
3589
3623
  Use Chrome, Firefox or Internet Explorer 11`);
3590
3624
  }
3591
- var lo = we.Buffer, Jt = ze.crypto || ze.msCrypto;
3592
- Jt && Jt.getRandomValues ? Mr.exports = ho : Mr.exports = co;
3593
- function ho(e, t) {
3594
- if (e > uo) throw new RangeError("requested too many random bytes");
3595
- var r = lo.allocUnsafe(e);
3625
+ var ho = we.Buffer, Jt = ze.crypto || ze.msCrypto;
3626
+ Jt && Jt.getRandomValues ? Mr.exports = po : Mr.exports = lo;
3627
+ function po(e, t) {
3628
+ if (e > co) throw new RangeError("requested too many random bytes");
3629
+ var r = ho.allocUnsafe(e);
3596
3630
  if (e > 0)
3597
3631
  if (e > br)
3598
3632
  for (var i = 0; i < e; i += br)
@@ -3603,7 +3637,7 @@ function ho(e, t) {
3603
3637
  t(null, r);
3604
3638
  }) : r;
3605
3639
  }
3606
- var po = Mr.exports, Dr = { exports: {} };
3640
+ var bo = Mr.exports, Dr = { exports: {} };
3607
3641
  typeof Object.create == "function" ? Dr.exports = function(t, r) {
3608
3642
  r && (t.super_ = r, t.prototype = Object.create(r.prototype, {
3609
3643
  constructor: {
@@ -3621,7 +3655,7 @@ typeof Object.create == "function" ? Dr.exports = function(t, r) {
3621
3655
  i.prototype = r.prototype, t.prototype = new i(), t.prototype.constructor = t;
3622
3656
  }
3623
3657
  };
3624
- var pe = Dr.exports, $r = { exports: {} }, Yr = { exports: {} }, ct = typeof Reflect == "object" ? Reflect : null, dn = ct && typeof ct.apply == "function" ? ct.apply : function(t, r, i) {
3658
+ var pe = Dr.exports, $r = { exports: {} }, Yr = { exports: {} }, ct = typeof Reflect == "object" ? Reflect : null, pn = ct && typeof ct.apply == "function" ? ct.apply : function(t, r, i) {
3625
3659
  return Function.prototype.apply.call(t, r, i);
3626
3660
  }, Wt;
3627
3661
  ct && typeof ct.ownKeys == "function" ? Wt = ct.ownKeys : Object.getOwnPropertySymbols ? Wt = function(t) {
@@ -3629,22 +3663,22 @@ ct && typeof ct.ownKeys == "function" ? Wt = ct.ownKeys : Object.getOwnPropertyS
3629
3663
  } : Wt = function(t) {
3630
3664
  return Object.getOwnPropertyNames(t);
3631
3665
  };
3632
- function bo(e) {
3666
+ function yo(e) {
3633
3667
  console && console.warn && console.warn(e);
3634
3668
  }
3635
- var ii = Number.isNaN || function(t) {
3669
+ var oi = Number.isNaN || function(t) {
3636
3670
  return t !== t;
3637
3671
  };
3638
3672
  function K() {
3639
3673
  K.init.call(this);
3640
3674
  }
3641
3675
  Yr.exports = K;
3642
- Yr.exports.once = mo;
3676
+ Yr.exports.once = wo;
3643
3677
  K.EventEmitter = K;
3644
3678
  K.prototype._events = void 0;
3645
3679
  K.prototype._eventsCount = 0;
3646
3680
  K.prototype._maxListeners = void 0;
3647
- var pn = 10;
3681
+ var bn = 10;
3648
3682
  function er(e) {
3649
3683
  if (typeof e != "function")
3650
3684
  throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof e);
@@ -3652,27 +3686,27 @@ function er(e) {
3652
3686
  Object.defineProperty(K, "defaultMaxListeners", {
3653
3687
  enumerable: !0,
3654
3688
  get: function() {
3655
- return pn;
3689
+ return bn;
3656
3690
  },
3657
3691
  set: function(e) {
3658
- if (typeof e != "number" || e < 0 || ii(e))
3692
+ if (typeof e != "number" || e < 0 || oi(e))
3659
3693
  throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + e + ".");
3660
- pn = e;
3694
+ bn = e;
3661
3695
  }
3662
3696
  });
3663
3697
  K.init = function() {
3664
3698
  (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
3665
3699
  };
3666
3700
  K.prototype.setMaxListeners = function(t) {
3667
- if (typeof t != "number" || t < 0 || ii(t))
3701
+ if (typeof t != "number" || t < 0 || oi(t))
3668
3702
  throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + t + ".");
3669
3703
  return this._maxListeners = t, this;
3670
3704
  };
3671
- function ai(e) {
3705
+ function si(e) {
3672
3706
  return e._maxListeners === void 0 ? K.defaultMaxListeners : e._maxListeners;
3673
3707
  }
3674
3708
  K.prototype.getMaxListeners = function() {
3675
- return ai(this);
3709
+ return si(this);
3676
3710
  };
3677
3711
  K.prototype.emit = function(t) {
3678
3712
  for (var r = [], i = 1; i < arguments.length; i++) r.push(arguments[i]);
@@ -3692,13 +3726,13 @@ K.prototype.emit = function(t) {
3692
3726
  if (p === void 0)
3693
3727
  return !1;
3694
3728
  if (typeof p == "function")
3695
- dn(p, this, r);
3729
+ pn(p, this, r);
3696
3730
  else
3697
- for (var y = p.length, g = ci(p, y), i = 0; i < y; ++i)
3698
- dn(g[i], this, r);
3731
+ for (var y = p.length, g = di(p, y), i = 0; i < y; ++i)
3732
+ pn(g[i], this, r);
3699
3733
  return !0;
3700
3734
  };
3701
- function oi(e, t, r, i) {
3735
+ function fi(e, t, r, i) {
3702
3736
  var o, s, c;
3703
3737
  if (er(r), s = e._events, s === void 0 ? (s = e._events = /* @__PURE__ */ Object.create(null), e._eventsCount = 0) : (s.newListener !== void 0 && (e.emit(
3704
3738
  "newListener",
@@ -3706,33 +3740,33 @@ function oi(e, t, r, i) {
3706
3740
  r.listener ? r.listener : r
3707
3741
  ), s = e._events), c = s[t]), c === void 0)
3708
3742
  c = s[t] = r, ++e._eventsCount;
3709
- else if (typeof c == "function" ? c = s[t] = i ? [r, c] : [c, r] : i ? c.unshift(r) : c.push(r), o = ai(e), o > 0 && c.length > o && !c.warned) {
3743
+ else if (typeof c == "function" ? c = s[t] = i ? [r, c] : [c, r] : i ? c.unshift(r) : c.push(r), o = si(e), o > 0 && c.length > o && !c.warned) {
3710
3744
  c.warned = !0;
3711
3745
  var u = new Error("Possible EventEmitter memory leak detected. " + c.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit");
3712
- u.name = "MaxListenersExceededWarning", u.emitter = e, u.type = t, u.count = c.length, bo(u);
3746
+ u.name = "MaxListenersExceededWarning", u.emitter = e, u.type = t, u.count = c.length, yo(u);
3713
3747
  }
3714
3748
  return e;
3715
3749
  }
3716
3750
  K.prototype.addListener = function(t, r) {
3717
- return oi(this, t, r, !1);
3751
+ return fi(this, t, r, !1);
3718
3752
  };
3719
3753
  K.prototype.on = K.prototype.addListener;
3720
3754
  K.prototype.prependListener = function(t, r) {
3721
- return oi(this, t, r, !0);
3755
+ return fi(this, t, r, !0);
3722
3756
  };
3723
- function yo() {
3757
+ function go() {
3724
3758
  if (!this.fired)
3725
3759
  return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
3726
3760
  }
3727
- function si(e, t, r) {
3728
- var i = { fired: !1, wrapFn: void 0, target: e, type: t, listener: r }, o = yo.bind(i);
3761
+ function ui(e, t, r) {
3762
+ var i = { fired: !1, wrapFn: void 0, target: e, type: t, listener: r }, o = go.bind(i);
3729
3763
  return o.listener = r, i.wrapFn = o, o;
3730
3764
  }
3731
3765
  K.prototype.once = function(t, r) {
3732
- return er(r), this.on(t, si(this, t, r)), this;
3766
+ return er(r), this.on(t, ui(this, t, r)), this;
3733
3767
  };
3734
3768
  K.prototype.prependOnceListener = function(t, r) {
3735
- return er(r), this.prependListener(t, si(this, t, r)), this;
3769
+ return er(r), this.prependListener(t, ui(this, t, r)), this;
3736
3770
  };
3737
3771
  K.prototype.removeListener = function(t, r) {
3738
3772
  var i, o, s, c, u;
@@ -3750,7 +3784,7 @@ K.prototype.removeListener = function(t, r) {
3750
3784
  }
3751
3785
  if (s < 0)
3752
3786
  return this;
3753
- s === 0 ? i.shift() : go(i, s), i.length === 1 && (o[t] = i[0]), o.removeListener !== void 0 && this.emit("removeListener", t, u || r);
3787
+ s === 0 ? i.shift() : mo(i, s), i.length === 1 && (o[t] = i[0]), o.removeListener !== void 0 && this.emit("removeListener", t, u || r);
3754
3788
  }
3755
3789
  return this;
3756
3790
  };
@@ -3774,24 +3808,24 @@ K.prototype.removeAllListeners = function(t) {
3774
3808
  this.removeListener(t, r[o]);
3775
3809
  return this;
3776
3810
  };
3777
- function fi(e, t, r) {
3811
+ function ci(e, t, r) {
3778
3812
  var i = e._events;
3779
3813
  if (i === void 0)
3780
3814
  return [];
3781
3815
  var o = i[t];
3782
- return o === void 0 ? [] : typeof o == "function" ? r ? [o.listener || o] : [o] : r ? _o(o) : ci(o, o.length);
3816
+ return o === void 0 ? [] : typeof o == "function" ? r ? [o.listener || o] : [o] : r ? _o(o) : di(o, o.length);
3783
3817
  }
3784
3818
  K.prototype.listeners = function(t) {
3785
- return fi(this, t, !0);
3819
+ return ci(this, t, !0);
3786
3820
  };
3787
3821
  K.prototype.rawListeners = function(t) {
3788
- return fi(this, t, !1);
3822
+ return ci(this, t, !1);
3789
3823
  };
3790
3824
  K.listenerCount = function(e, t) {
3791
- return typeof e.listenerCount == "function" ? e.listenerCount(t) : ui.call(e, t);
3825
+ return typeof e.listenerCount == "function" ? e.listenerCount(t) : li.call(e, t);
3792
3826
  };
3793
- K.prototype.listenerCount = ui;
3794
- function ui(e) {
3827
+ K.prototype.listenerCount = li;
3828
+ function li(e) {
3795
3829
  var t = this._events;
3796
3830
  if (t !== void 0) {
3797
3831
  var r = t[e];
@@ -3805,12 +3839,12 @@ function ui(e) {
3805
3839
  K.prototype.eventNames = function() {
3806
3840
  return this._eventsCount > 0 ? Wt(this._events) : [];
3807
3841
  };
3808
- function ci(e, t) {
3842
+ function di(e, t) {
3809
3843
  for (var r = new Array(t), i = 0; i < t; ++i)
3810
3844
  r[i] = e[i];
3811
3845
  return r;
3812
3846
  }
3813
- function go(e, t) {
3847
+ function mo(e, t) {
3814
3848
  for (; t + 1 < e.length; t++)
3815
3849
  e[t] = e[t + 1];
3816
3850
  e.pop();
@@ -3820,7 +3854,7 @@ function _o(e) {
3820
3854
  t[r] = e[r].listener || e[r];
3821
3855
  return t;
3822
3856
  }
3823
- function mo(e, t) {
3857
+ function wo(e, t) {
3824
3858
  return new Promise(function(r, i) {
3825
3859
  function o(c) {
3826
3860
  e.removeListener(t, s), i(c);
@@ -3828,13 +3862,13 @@ function mo(e, t) {
3828
3862
  function s() {
3829
3863
  typeof e.removeListener == "function" && e.removeListener("error", o), r([].slice.call(arguments));
3830
3864
  }
3831
- li(e, t, s, { once: !0 }), t !== "error" && wo(e, o, { once: !0 });
3865
+ hi(e, t, s, { once: !0 }), t !== "error" && vo(e, o, { once: !0 });
3832
3866
  });
3833
3867
  }
3834
- function wo(e, t, r) {
3835
- typeof e.on == "function" && li(e, "error", t, r);
3868
+ function vo(e, t, r) {
3869
+ typeof e.on == "function" && hi(e, "error", t, r);
3836
3870
  }
3837
- function li(e, t, r, i) {
3871
+ function hi(e, t, r, i) {
3838
3872
  if (typeof e.on == "function")
3839
3873
  i.once ? e.once(t, r) : e.on(t, r);
3840
3874
  else if (typeof e.addEventListener == "function")
@@ -3844,15 +3878,15 @@ function li(e, t, r, i) {
3844
3878
  else
3845
3879
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof e);
3846
3880
  }
3847
- var hi = Yr.exports, di = hi.EventEmitter;
3848
- const vo = {}, xo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3881
+ var pi = Yr.exports, bi = pi.EventEmitter;
3882
+ const xo = {}, Eo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3849
3883
  __proto__: null,
3850
- default: vo
3851
- }, Symbol.toStringTag, { value: "Module" })), Xr = /* @__PURE__ */ Ka(xo);
3852
- var yr, bn;
3853
- function Eo() {
3854
- if (bn) return yr;
3855
- bn = 1;
3884
+ default: xo
3885
+ }, Symbol.toStringTag, { value: "Module" })), Xr = /* @__PURE__ */ Va(Eo);
3886
+ var yr, yn;
3887
+ function Bo() {
3888
+ if (yn) return yr;
3889
+ yn = 1;
3856
3890
  function e(R, C) {
3857
3891
  var E = Object.keys(R);
3858
3892
  if (Object.getOwnPropertySymbols) {
@@ -3954,8 +3988,8 @@ function Eo() {
3954
3988
  key: "concat",
3955
3989
  value: function(E) {
3956
3990
  if (this.length === 0) return y.alloc(0);
3957
- for (var T = y.allocUnsafe(E >>> 0), P = this.head, L = 0; P; )
3958
- A(P.data, T, L), L += P.data.length, P = P.next;
3991
+ for (var T = y.allocUnsafe(E >>> 0), P = this.head, F = 0; P; )
3992
+ A(P.data, T, F), F += P.data.length, P = P.next;
3959
3993
  return T;
3960
3994
  }
3961
3995
  // Consumes a specified amount of bytes or characters from the buffered data.
@@ -3974,31 +4008,31 @@ function Eo() {
3974
4008
  }, {
3975
4009
  key: "_getString",
3976
4010
  value: function(E) {
3977
- var T = this.head, P = 1, L = T.data;
3978
- for (E -= L.length; T = T.next; ) {
3979
- var N = T.data, F = E > N.length ? N.length : E;
3980
- if (F === N.length ? L += N : L += N.slice(0, E), E -= F, E === 0) {
3981
- F === N.length ? (++P, T.next ? this.head = T.next : this.head = this.tail = null) : (this.head = T, T.data = N.slice(F));
4011
+ var T = this.head, P = 1, F = T.data;
4012
+ for (E -= F.length; T = T.next; ) {
4013
+ var N = T.data, L = E > N.length ? N.length : E;
4014
+ if (L === N.length ? F += N : F += N.slice(0, E), E -= L, E === 0) {
4015
+ L === N.length ? (++P, T.next ? this.head = T.next : this.head = this.tail = null) : (this.head = T, T.data = N.slice(L));
3982
4016
  break;
3983
4017
  }
3984
4018
  ++P;
3985
4019
  }
3986
- return this.length -= P, L;
4020
+ return this.length -= P, F;
3987
4021
  }
3988
4022
  // Consumes a specified amount of bytes from the buffered data.
3989
4023
  }, {
3990
4024
  key: "_getBuffer",
3991
4025
  value: function(E) {
3992
- var T = y.allocUnsafe(E), P = this.head, L = 1;
4026
+ var T = y.allocUnsafe(E), P = this.head, F = 1;
3993
4027
  for (P.data.copy(T), E -= P.data.length; P = P.next; ) {
3994
- var N = P.data, F = E > N.length ? N.length : E;
3995
- if (N.copy(T, T.length - E, 0, F), E -= F, E === 0) {
3996
- F === N.length ? (++L, P.next ? this.head = P.next : this.head = this.tail = null) : (this.head = P, P.data = N.slice(F));
4028
+ var N = P.data, L = E > N.length ? N.length : E;
4029
+ if (N.copy(T, T.length - E, 0, L), E -= L, E === 0) {
4030
+ L === N.length ? (++F, P.next ? this.head = P.next : this.head = this.tail = null) : (this.head = P, P.data = N.slice(L));
3997
4031
  break;
3998
4032
  }
3999
- ++L;
4033
+ ++F;
4000
4034
  }
4001
- return this.length -= L, T;
4035
+ return this.length -= F, T;
4002
4036
  }
4003
4037
  // Make sure the linked list only shows the minimal necessary information.
4004
4038
  }, {
@@ -4014,52 +4048,52 @@ function Eo() {
4014
4048
  }]), R;
4015
4049
  }(), yr;
4016
4050
  }
4017
- function Bo(e, t) {
4051
+ function Ro(e, t) {
4018
4052
  var r = this, i = this._readableState && this._readableState.destroyed, o = this._writableState && this._writableState.destroyed;
4019
4053
  return i || o ? (t ? t(e) : e && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, process.nextTick(Hr, this, e)) : process.nextTick(Hr, this, e)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(e || null, function(s) {
4020
- !t && s ? r._writableState ? r._writableState.errorEmitted ? process.nextTick(Gt, r) : (r._writableState.errorEmitted = !0, process.nextTick(yn, r, s)) : process.nextTick(yn, r, s) : t ? (process.nextTick(Gt, r), t(s)) : process.nextTick(Gt, r);
4054
+ !t && s ? r._writableState ? r._writableState.errorEmitted ? process.nextTick(Gt, r) : (r._writableState.errorEmitted = !0, process.nextTick(gn, r, s)) : process.nextTick(gn, r, s) : t ? (process.nextTick(Gt, r), t(s)) : process.nextTick(Gt, r);
4021
4055
  }), this);
4022
4056
  }
4023
- function yn(e, t) {
4057
+ function gn(e, t) {
4024
4058
  Hr(e, t), Gt(e);
4025
4059
  }
4026
4060
  function Gt(e) {
4027
4061
  e._writableState && !e._writableState.emitClose || e._readableState && !e._readableState.emitClose || e.emit("close");
4028
4062
  }
4029
- function Ro() {
4063
+ function So() {
4030
4064
  this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending = !1, this._writableState.finalCalled = !1, this._writableState.prefinished = !1, this._writableState.finished = !1, this._writableState.errorEmitted = !1);
4031
4065
  }
4032
4066
  function Hr(e, t) {
4033
4067
  e.emit("error", t);
4034
4068
  }
4035
- function So(e, t) {
4069
+ function Io(e, t) {
4036
4070
  var r = e._readableState, i = e._writableState;
4037
4071
  r && r.autoDestroy || i && i.autoDestroy ? e.destroy(t) : e.emit("error", t);
4038
4072
  }
4039
- var pi = {
4040
- destroy: Bo,
4041
- undestroy: Ro,
4042
- errorOrDestroy: So
4073
+ var yi = {
4074
+ destroy: Ro,
4075
+ undestroy: So,
4076
+ errorOrDestroy: Io
4043
4077
  }, tt = {};
4044
- function Io(e, t) {
4078
+ function Ao(e, t) {
4045
4079
  e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e.__proto__ = t;
4046
4080
  }
4047
- var bi = {};
4081
+ var gi = {};
4048
4082
  function Se(e, t, r) {
4049
4083
  r || (r = Error);
4050
4084
  function i(s, c, u) {
4051
4085
  return typeof t == "string" ? t : t(s, c, u);
4052
4086
  }
4053
4087
  var o = /* @__PURE__ */ function(s) {
4054
- Io(c, s);
4088
+ Ao(c, s);
4055
4089
  function c(u, p, y) {
4056
4090
  return s.call(this, i(u, p, y)) || this;
4057
4091
  }
4058
4092
  return c;
4059
4093
  }(r);
4060
- o.prototype.name = r.name, o.prototype.code = e, bi[e] = o;
4094
+ o.prototype.name = r.name, o.prototype.code = e, gi[e] = o;
4061
4095
  }
4062
- function gn(e, t) {
4096
+ function mn(e, t) {
4063
4097
  if (Array.isArray(e)) {
4064
4098
  var r = e.length;
4065
4099
  return e = e.map(function(i) {
@@ -4068,13 +4102,13 @@ function gn(e, t) {
4068
4102
  } else
4069
4103
  return "of ".concat(t, " ").concat(String(e));
4070
4104
  }
4071
- function Ao(e, t, r) {
4105
+ function To(e, t, r) {
4072
4106
  return e.substr(0, t.length) === t;
4073
4107
  }
4074
- function To(e, t, r) {
4108
+ function ko(e, t, r) {
4075
4109
  return (r === void 0 || r > e.length) && (r = e.length), e.substring(r - t.length, r) === t;
4076
4110
  }
4077
- function ko(e, t, r) {
4111
+ function Co(e, t, r) {
4078
4112
  return typeof r != "number" && (r = 0), r + t.length > e.length ? !1 : e.indexOf(t, r) !== -1;
4079
4113
  }
4080
4114
  Se("ERR_INVALID_OPT_VALUE", function(e, t) {
@@ -4082,13 +4116,13 @@ Se("ERR_INVALID_OPT_VALUE", function(e, t) {
4082
4116
  }, TypeError);
4083
4117
  Se("ERR_INVALID_ARG_TYPE", function(e, t, r) {
4084
4118
  var i;
4085
- typeof t == "string" && Ao(t, "not ") ? (i = "must not be", t = t.replace(/^not /, "")) : i = "must be";
4119
+ typeof t == "string" && To(t, "not ") ? (i = "must not be", t = t.replace(/^not /, "")) : i = "must be";
4086
4120
  var o;
4087
- if (To(e, " argument"))
4088
- o = "The ".concat(e, " ").concat(i, " ").concat(gn(t, "type"));
4121
+ if (ko(e, " argument"))
4122
+ o = "The ".concat(e, " ").concat(i, " ").concat(mn(t, "type"));
4089
4123
  else {
4090
- var s = ko(e, ".") ? "property" : "argument";
4091
- o = 'The "'.concat(e, '" ').concat(s, " ").concat(i, " ").concat(gn(t, "type"));
4124
+ var s = Co(e, ".") ? "property" : "argument";
4125
+ o = 'The "'.concat(e, '" ').concat(s, " ").concat(i, " ").concat(mn(t, "type"));
4092
4126
  }
4093
4127
  return o += ". Received type ".concat(typeof r), o;
4094
4128
  }, TypeError);
@@ -4108,26 +4142,26 @@ Se("ERR_UNKNOWN_ENCODING", function(e) {
4108
4142
  return "Unknown encoding: " + e;
4109
4143
  }, TypeError);
4110
4144
  Se("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event");
4111
- tt.codes = bi;
4112
- var Co = tt.codes.ERR_INVALID_OPT_VALUE;
4113
- function Po(e, t, r) {
4145
+ tt.codes = gi;
4146
+ var Po = tt.codes.ERR_INVALID_OPT_VALUE;
4147
+ function No(e, t, r) {
4114
4148
  return e.highWaterMark != null ? e.highWaterMark : t ? e[r] : null;
4115
4149
  }
4116
- function No(e, t, r, i) {
4117
- var o = Po(t, i, r);
4150
+ function Fo(e, t, r, i) {
4151
+ var o = No(t, i, r);
4118
4152
  if (o != null) {
4119
4153
  if (!(isFinite(o) && Math.floor(o) === o) || o < 0) {
4120
4154
  var s = i ? r : "highWaterMark";
4121
- throw new Co(s, o);
4155
+ throw new Po(s, o);
4122
4156
  }
4123
4157
  return Math.floor(o);
4124
4158
  }
4125
4159
  return e.objectMode ? 16 : 16 * 1024;
4126
4160
  }
4127
- var yi = {
4128
- getHighWaterMark: No
4129
- }, Lo = Fo;
4130
- function Fo(e, t) {
4161
+ var mi = {
4162
+ getHighWaterMark: Fo
4163
+ }, Lo = Oo;
4164
+ function Oo(e, t) {
4131
4165
  if (gr("noDeprecation"))
4132
4166
  return e;
4133
4167
  var r = !1;
@@ -4150,42 +4184,42 @@ function gr(e) {
4150
4184
  var t = ze.localStorage[e];
4151
4185
  return t == null ? !1 : String(t).toLowerCase() === "true";
4152
4186
  }
4153
- var _r, _n;
4154
- function gi() {
4155
- if (_n) return _r;
4156
- _n = 1, _r = D;
4157
- function e(m) {
4158
- var _ = this;
4187
+ var mr, _n;
4188
+ function _i() {
4189
+ if (_n) return mr;
4190
+ _n = 1, mr = D;
4191
+ function e(_) {
4192
+ var m = this;
4159
4193
  this.next = null, this.entry = null, this.finish = function() {
4160
- Ne(_, m);
4194
+ Ne(m, _);
4161
4195
  };
4162
4196
  }
4163
4197
  var t;
4164
4198
  D.WritableState = S;
4165
4199
  var r = {
4166
4200
  deprecate: Lo
4167
- }, i = di, o = bt.Buffer, s = (typeof ze < "u" ? ze : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
4201
+ }, i = bi, o = bt.Buffer, s = (typeof ze < "u" ? ze : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
4168
4202
  };
4169
- function c(m) {
4170
- return o.from(m);
4203
+ function c(_) {
4204
+ return o.from(_);
4171
4205
  }
4172
- function u(m) {
4173
- return o.isBuffer(m) || m instanceof s;
4206
+ function u(_) {
4207
+ return o.isBuffer(_) || _ instanceof s;
4174
4208
  }
4175
- var p = pi, y = yi, g = y.getHighWaterMark, w = tt.codes, x = w.ERR_INVALID_ARG_TYPE, A = w.ERR_METHOD_NOT_IMPLEMENTED, R = w.ERR_MULTIPLE_CALLBACK, C = w.ERR_STREAM_CANNOT_PIPE, E = w.ERR_STREAM_DESTROYED, T = w.ERR_STREAM_NULL_VALUES, P = w.ERR_STREAM_WRITE_AFTER_END, L = w.ERR_UNKNOWN_ENCODING, N = p.errorOrDestroy;
4209
+ var p = yi, y = mi, g = y.getHighWaterMark, w = tt.codes, x = w.ERR_INVALID_ARG_TYPE, A = w.ERR_METHOD_NOT_IMPLEMENTED, R = w.ERR_MULTIPLE_CALLBACK, C = w.ERR_STREAM_CANNOT_PIPE, E = w.ERR_STREAM_DESTROYED, T = w.ERR_STREAM_NULL_VALUES, P = w.ERR_STREAM_WRITE_AFTER_END, F = w.ERR_UNKNOWN_ENCODING, N = p.errorOrDestroy;
4176
4210
  pe(D, i);
4177
- function F() {
4211
+ function L() {
4178
4212
  }
4179
- function S(m, _, k) {
4180
- t = t || pt(), m = m || {}, typeof k != "boolean" && (k = _ instanceof t), this.objectMode = !!m.objectMode, k && (this.objectMode = this.objectMode || !!m.writableObjectMode), this.highWaterMark = g(this, m, "writableHighWaterMark", k), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
4181
- var $ = m.decodeStrings === !1;
4182
- this.decodeStrings = !$, this.defaultEncoding = m.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(q) {
4183
- Ve(_, q);
4184
- }, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose = m.emitClose !== !1, this.autoDestroy = !!m.autoDestroy, this.bufferedRequestCount = 0, this.corkedRequestsFree = new e(this);
4213
+ function S(_, m, k) {
4214
+ t = t || pt(), _ = _ || {}, typeof k != "boolean" && (k = m instanceof t), this.objectMode = !!_.objectMode, k && (this.objectMode = this.objectMode || !!_.writableObjectMode), this.highWaterMark = g(this, _, "writableHighWaterMark", k), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
4215
+ var $ = _.decodeStrings === !1;
4216
+ this.decodeStrings = !$, this.defaultEncoding = _.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(q) {
4217
+ Ve(m, q);
4218
+ }, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose = _.emitClose !== !1, this.autoDestroy = !!_.autoDestroy, this.bufferedRequestCount = 0, this.corkedRequestsFree = new e(this);
4185
4219
  }
4186
4220
  S.prototype.getBuffer = function() {
4187
- for (var _ = this.bufferedRequest, k = []; _; )
4188
- k.push(_), _ = _.next;
4221
+ for (var m = this.bufferedRequest, k = []; m; )
4222
+ k.push(m), m = m.next;
4189
4223
  return k;
4190
4224
  }, function() {
4191
4225
  try {
@@ -4199,40 +4233,40 @@ function gi() {
4199
4233
  }();
4200
4234
  var j;
4201
4235
  typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? (j = Function.prototype[Symbol.hasInstance], Object.defineProperty(D, Symbol.hasInstance, {
4202
- value: function(_) {
4203
- return j.call(this, _) ? !0 : this !== D ? !1 : _ && _._writableState instanceof S;
4236
+ value: function(m) {
4237
+ return j.call(this, m) ? !0 : this !== D ? !1 : m && m._writableState instanceof S;
4204
4238
  }
4205
- })) : j = function(_) {
4206
- return _ instanceof this;
4239
+ })) : j = function(m) {
4240
+ return m instanceof this;
4207
4241
  };
4208
- function D(m) {
4242
+ function D(_) {
4209
4243
  t = t || pt();
4210
- var _ = this instanceof t;
4211
- if (!_ && !j.call(D, this)) return new D(m);
4212
- this._writableState = new S(m, this, _), this.writable = !0, m && (typeof m.write == "function" && (this._write = m.write), typeof m.writev == "function" && (this._writev = m.writev), typeof m.destroy == "function" && (this._destroy = m.destroy), typeof m.final == "function" && (this._final = m.final)), i.call(this);
4244
+ var m = this instanceof t;
4245
+ if (!m && !j.call(D, this)) return new D(_);
4246
+ this._writableState = new S(_, this, m), this.writable = !0, _ && (typeof _.write == "function" && (this._write = _.write), typeof _.writev == "function" && (this._writev = _.writev), typeof _.destroy == "function" && (this._destroy = _.destroy), typeof _.final == "function" && (this._final = _.final)), i.call(this);
4213
4247
  }
4214
4248
  D.prototype.pipe = function() {
4215
4249
  N(this, new C());
4216
4250
  };
4217
- function M(m, _) {
4251
+ function M(_, m) {
4218
4252
  var k = new P();
4219
- N(m, k), process.nextTick(_, k);
4253
+ N(_, k), process.nextTick(m, k);
4220
4254
  }
4221
- function ee(m, _, k, $) {
4255
+ function ee(_, m, k, $) {
4222
4256
  var q;
4223
- return k === null ? q = new T() : typeof k != "string" && !_.objectMode && (q = new x("chunk", ["string", "Buffer"], k)), q ? (N(m, q), process.nextTick($, q), !1) : !0;
4257
+ return k === null ? q = new T() : typeof k != "string" && !m.objectMode && (q = new x("chunk", ["string", "Buffer"], k)), q ? (N(_, q), process.nextTick($, q), !1) : !0;
4224
4258
  }
4225
- D.prototype.write = function(m, _, k) {
4226
- var $ = this._writableState, q = !1, h = !$.objectMode && u(m);
4227
- return h && !o.isBuffer(m) && (m = c(m)), typeof _ == "function" && (k = _, _ = null), h ? _ = "buffer" : _ || (_ = $.defaultEncoding), typeof k != "function" && (k = F), $.ending ? M(this, k) : (h || ee(this, $, m, k)) && ($.pendingcb++, q = Ue(this, $, h, m, _, k)), q;
4259
+ D.prototype.write = function(_, m, k) {
4260
+ var $ = this._writableState, q = !1, d = !$.objectMode && u(_);
4261
+ return d && !o.isBuffer(_) && (_ = c(_)), typeof m == "function" && (k = m, m = null), d ? m = "buffer" : m || (m = $.defaultEncoding), typeof k != "function" && (k = L), $.ending ? M(this, k) : (d || ee(this, $, _, k)) && ($.pendingcb++, q = Ue(this, $, d, _, m, k)), q;
4228
4262
  }, D.prototype.cork = function() {
4229
4263
  this._writableState.corked++;
4230
4264
  }, D.prototype.uncork = function() {
4231
- var m = this._writableState;
4232
- m.corked && (m.corked--, !m.writing && !m.corked && !m.bufferProcessing && m.bufferedRequest && Te(this, m));
4233
- }, D.prototype.setDefaultEncoding = function(_) {
4234
- if (typeof _ == "string" && (_ = _.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((_ + "").toLowerCase()) > -1)) throw new L(_);
4235
- return this._writableState.defaultEncoding = _, this;
4265
+ var _ = this._writableState;
4266
+ _.corked && (_.corked--, !_.writing && !_.corked && !_.bufferProcessing && _.bufferedRequest && Te(this, _));
4267
+ }, D.prototype.setDefaultEncoding = function(m) {
4268
+ if (typeof m == "string" && (m = m.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((m + "").toLowerCase()) > -1)) throw new F(m);
4269
+ return this._writableState.defaultEncoding = m, this;
4236
4270
  }, Object.defineProperty(D.prototype, "writableBuffer", {
4237
4271
  // making it explicit this property is not enumerable
4238
4272
  // because otherwise some prototype manipulation in
@@ -4242,8 +4276,8 @@ function gi() {
4242
4276
  return this._writableState && this._writableState.getBuffer();
4243
4277
  }
4244
4278
  });
4245
- function Ie(m, _, k) {
4246
- return !m.objectMode && m.decodeStrings !== !1 && typeof _ == "string" && (_ = o.from(_, k)), _;
4279
+ function Ie(_, m, k) {
4280
+ return !_.objectMode && _.decodeStrings !== !1 && typeof m == "string" && (m = o.from(m, k)), m;
4247
4281
  }
4248
4282
  Object.defineProperty(D.prototype, "writableHighWaterMark", {
4249
4283
  // making it explicit this property is not enumerable
@@ -4254,75 +4288,75 @@ function gi() {
4254
4288
  return this._writableState.highWaterMark;
4255
4289
  }
4256
4290
  });
4257
- function Ue(m, _, k, $, q, h) {
4291
+ function Ue(_, m, k, $, q, d) {
4258
4292
  if (!k) {
4259
- var d = Ie(_, $, q);
4260
- $ !== d && (k = !0, q = "buffer", $ = d);
4261
- }
4262
- var I = _.objectMode ? 1 : $.length;
4263
- _.length += I;
4264
- var O = _.length < _.highWaterMark;
4265
- if (O || (_.needDrain = !0), _.writing || _.corked) {
4266
- var X = _.lastBufferedRequest;
4267
- _.lastBufferedRequest = {
4293
+ var h = Ie(m, $, q);
4294
+ $ !== h && (k = !0, q = "buffer", $ = h);
4295
+ }
4296
+ var I = m.objectMode ? 1 : $.length;
4297
+ m.length += I;
4298
+ var O = m.length < m.highWaterMark;
4299
+ if (O || (m.needDrain = !0), m.writing || m.corked) {
4300
+ var X = m.lastBufferedRequest;
4301
+ m.lastBufferedRequest = {
4268
4302
  chunk: $,
4269
4303
  encoding: q,
4270
4304
  isBuf: k,
4271
- callback: h,
4305
+ callback: d,
4272
4306
  next: null
4273
- }, X ? X.next = _.lastBufferedRequest : _.bufferedRequest = _.lastBufferedRequest, _.bufferedRequestCount += 1;
4307
+ }, X ? X.next = m.lastBufferedRequest : m.bufferedRequest = m.lastBufferedRequest, m.bufferedRequestCount += 1;
4274
4308
  } else
4275
- ae(m, _, !1, I, $, q, h);
4309
+ ae(_, m, !1, I, $, q, d);
4276
4310
  return O;
4277
4311
  }
4278
- function ae(m, _, k, $, q, h, d) {
4279
- _.writelen = $, _.writecb = d, _.writing = !0, _.sync = !0, _.destroyed ? _.onwrite(new E("write")) : k ? m._writev(q, _.onwrite) : m._write(q, h, _.onwrite), _.sync = !1;
4312
+ function ae(_, m, k, $, q, d, h) {
4313
+ m.writelen = $, m.writecb = h, m.writing = !0, m.sync = !0, m.destroyed ? m.onwrite(new E("write")) : k ? _._writev(q, m.onwrite) : _._write(q, d, m.onwrite), m.sync = !1;
4280
4314
  }
4281
- function _e(m, _, k, $, q) {
4282
- --_.pendingcb, k ? (process.nextTick(q, $), process.nextTick(ve, m, _), m._writableState.errorEmitted = !0, N(m, $)) : (q($), m._writableState.errorEmitted = !0, N(m, $), ve(m, _));
4315
+ function me(_, m, k, $, q) {
4316
+ --m.pendingcb, k ? (process.nextTick(q, $), process.nextTick(ve, _, m), _._writableState.errorEmitted = !0, N(_, $)) : (q($), _._writableState.errorEmitted = !0, N(_, $), ve(_, m));
4283
4317
  }
4284
- function me(m) {
4285
- m.writing = !1, m.writecb = null, m.length -= m.writelen, m.writelen = 0;
4318
+ function _e(_) {
4319
+ _.writing = !1, _.writecb = null, _.length -= _.writelen, _.writelen = 0;
4286
4320
  }
4287
- function Ve(m, _) {
4288
- var k = m._writableState, $ = k.sync, q = k.writecb;
4321
+ function Ve(_, m) {
4322
+ var k = _._writableState, $ = k.sync, q = k.writecb;
4289
4323
  if (typeof q != "function") throw new R();
4290
- if (me(k), _) _e(m, k, $, _, q);
4324
+ if (_e(k), m) me(_, k, $, m, q);
4291
4325
  else {
4292
- var h = $e(k) || m.destroyed;
4293
- !h && !k.corked && !k.bufferProcessing && k.bufferedRequest && Te(m, k), $ ? process.nextTick(Ae, m, k, h, q) : Ae(m, k, h, q);
4326
+ var d = $e(k) || _.destroyed;
4327
+ !d && !k.corked && !k.bufferProcessing && k.bufferedRequest && Te(_, k), $ ? process.nextTick(Ae, _, k, d, q) : Ae(_, k, d, q);
4294
4328
  }
4295
4329
  }
4296
- function Ae(m, _, k, $) {
4297
- k || De(m, _), _.pendingcb--, $(), ve(m, _);
4330
+ function Ae(_, m, k, $) {
4331
+ k || De(_, m), m.pendingcb--, $(), ve(_, m);
4298
4332
  }
4299
- function De(m, _) {
4300
- _.length === 0 && _.needDrain && (_.needDrain = !1, m.emit("drain"));
4333
+ function De(_, m) {
4334
+ m.length === 0 && m.needDrain && (m.needDrain = !1, _.emit("drain"));
4301
4335
  }
4302
- function Te(m, _) {
4303
- _.bufferProcessing = !0;
4304
- var k = _.bufferedRequest;
4305
- if (m._writev && k && k.next) {
4306
- var $ = _.bufferedRequestCount, q = new Array($), h = _.corkedRequestsFree;
4307
- h.entry = k;
4308
- for (var d = 0, I = !0; k; )
4309
- q[d] = k, k.isBuf || (I = !1), k = k.next, d += 1;
4310
- q.allBuffers = I, ae(m, _, !0, _.length, q, "", h.finish), _.pendingcb++, _.lastBufferedRequest = null, h.next ? (_.corkedRequestsFree = h.next, h.next = null) : _.corkedRequestsFree = new e(_), _.bufferedRequestCount = 0;
4336
+ function Te(_, m) {
4337
+ m.bufferProcessing = !0;
4338
+ var k = m.bufferedRequest;
4339
+ if (_._writev && k && k.next) {
4340
+ var $ = m.bufferedRequestCount, q = new Array($), d = m.corkedRequestsFree;
4341
+ d.entry = k;
4342
+ for (var h = 0, I = !0; k; )
4343
+ q[h] = k, k.isBuf || (I = !1), k = k.next, h += 1;
4344
+ q.allBuffers = I, ae(_, m, !0, m.length, q, "", d.finish), m.pendingcb++, m.lastBufferedRequest = null, d.next ? (m.corkedRequestsFree = d.next, d.next = null) : m.corkedRequestsFree = new e(m), m.bufferedRequestCount = 0;
4311
4345
  } else {
4312
4346
  for (; k; ) {
4313
- var O = k.chunk, X = k.encoding, W = k.callback, z = _.objectMode ? 1 : O.length;
4314
- if (ae(m, _, !1, z, O, X, W), k = k.next, _.bufferedRequestCount--, _.writing)
4347
+ var O = k.chunk, X = k.encoding, W = k.callback, z = m.objectMode ? 1 : O.length;
4348
+ if (ae(_, m, !1, z, O, X, W), k = k.next, m.bufferedRequestCount--, m.writing)
4315
4349
  break;
4316
4350
  }
4317
- k === null && (_.lastBufferedRequest = null);
4351
+ k === null && (m.lastBufferedRequest = null);
4318
4352
  }
4319
- _.bufferedRequest = k, _.bufferProcessing = !1;
4353
+ m.bufferedRequest = k, m.bufferProcessing = !1;
4320
4354
  }
4321
- D.prototype._write = function(m, _, k) {
4355
+ D.prototype._write = function(_, m, k) {
4322
4356
  k(new A("_write()"));
4323
- }, D.prototype._writev = null, D.prototype.end = function(m, _, k) {
4357
+ }, D.prototype._writev = null, D.prototype.end = function(_, m, k) {
4324
4358
  var $ = this._writableState;
4325
- return typeof m == "function" ? (k = m, m = null, _ = null) : typeof _ == "function" && (k = _, _ = null), m != null && this.write(m, _), $.corked && ($.corked = 1, this.uncork()), $.ending || He(this, $, k), this;
4359
+ return typeof _ == "function" ? (k = _, _ = null, m = null) : typeof m == "function" && (k = m, m = null), _ != null && this.write(_, m), $.corked && ($.corked = 1, this.uncork()), $.ending || He(this, $, k), this;
4326
4360
  }, Object.defineProperty(D.prototype, "writableLength", {
4327
4361
  // making it explicit this property is not enumerable
4328
4362
  // because otherwise some prototype manipulation in
@@ -4332,35 +4366,35 @@ function gi() {
4332
4366
  return this._writableState.length;
4333
4367
  }
4334
4368
  });
4335
- function $e(m) {
4336
- return m.ending && m.length === 0 && m.bufferedRequest === null && !m.finished && !m.writing;
4369
+ function $e(_) {
4370
+ return _.ending && _.length === 0 && _.bufferedRequest === null && !_.finished && !_.writing;
4337
4371
  }
4338
- function Y(m, _) {
4339
- m._final(function(k) {
4340
- _.pendingcb--, k && N(m, k), _.prefinished = !0, m.emit("prefinish"), ve(m, _);
4372
+ function Y(_, m) {
4373
+ _._final(function(k) {
4374
+ m.pendingcb--, k && N(_, k), m.prefinished = !0, _.emit("prefinish"), ve(_, m);
4341
4375
  });
4342
4376
  }
4343
- function ie(m, _) {
4344
- !_.prefinished && !_.finalCalled && (typeof m._final == "function" && !_.destroyed ? (_.pendingcb++, _.finalCalled = !0, process.nextTick(Y, m, _)) : (_.prefinished = !0, m.emit("prefinish")));
4377
+ function ie(_, m) {
4378
+ !m.prefinished && !m.finalCalled && (typeof _._final == "function" && !m.destroyed ? (m.pendingcb++, m.finalCalled = !0, process.nextTick(Y, _, m)) : (m.prefinished = !0, _.emit("prefinish")));
4345
4379
  }
4346
- function ve(m, _) {
4347
- var k = $e(_);
4348
- if (k && (ie(m, _), _.pendingcb === 0 && (_.finished = !0, m.emit("finish"), _.autoDestroy))) {
4349
- var $ = m._readableState;
4350
- (!$ || $.autoDestroy && $.endEmitted) && m.destroy();
4380
+ function ve(_, m) {
4381
+ var k = $e(m);
4382
+ if (k && (ie(_, m), m.pendingcb === 0 && (m.finished = !0, _.emit("finish"), m.autoDestroy))) {
4383
+ var $ = _._readableState;
4384
+ (!$ || $.autoDestroy && $.endEmitted) && _.destroy();
4351
4385
  }
4352
4386
  return k;
4353
4387
  }
4354
- function He(m, _, k) {
4355
- _.ending = !0, ve(m, _), k && (_.finished ? process.nextTick(k) : m.once("finish", k)), _.ended = !0, m.writable = !1;
4388
+ function He(_, m, k) {
4389
+ m.ending = !0, ve(_, m), k && (m.finished ? process.nextTick(k) : _.once("finish", k)), m.ended = !0, _.writable = !1;
4356
4390
  }
4357
- function Ne(m, _, k) {
4358
- var $ = m.entry;
4359
- for (m.entry = null; $; ) {
4391
+ function Ne(_, m, k) {
4392
+ var $ = _.entry;
4393
+ for (_.entry = null; $; ) {
4360
4394
  var q = $.callback;
4361
- _.pendingcb--, q(k), $ = $.next;
4395
+ m.pendingcb--, q(k), $ = $.next;
4362
4396
  }
4363
- _.corkedRequestsFree.next = m;
4397
+ m.corkedRequestsFree.next = _;
4364
4398
  }
4365
4399
  return Object.defineProperty(D.prototype, "destroyed", {
4366
4400
  // making it explicit this property is not enumerable
@@ -4370,24 +4404,24 @@ function gi() {
4370
4404
  get: function() {
4371
4405
  return this._writableState === void 0 ? !1 : this._writableState.destroyed;
4372
4406
  },
4373
- set: function(_) {
4374
- this._writableState && (this._writableState.destroyed = _);
4407
+ set: function(m) {
4408
+ this._writableState && (this._writableState.destroyed = m);
4375
4409
  }
4376
- }), D.prototype.destroy = p.destroy, D.prototype._undestroy = p.undestroy, D.prototype._destroy = function(m, _) {
4377
- _(m);
4378
- }, _r;
4410
+ }), D.prototype.destroy = p.destroy, D.prototype._undestroy = p.undestroy, D.prototype._destroy = function(_, m) {
4411
+ m(_);
4412
+ }, mr;
4379
4413
  }
4380
- var mr, mn;
4414
+ var _r, wn;
4381
4415
  function pt() {
4382
- if (mn) return mr;
4383
- mn = 1;
4416
+ if (wn) return _r;
4417
+ wn = 1;
4384
4418
  var e = Object.keys || function(y) {
4385
4419
  var g = [];
4386
4420
  for (var w in y) g.push(w);
4387
4421
  return g;
4388
4422
  };
4389
- mr = c;
4390
- var t = mi(), r = gi();
4423
+ _r = c;
4424
+ var t = vi(), r = _i();
4391
4425
  pe(c, t);
4392
4426
  for (var i = e(r.prototype), o = 0; o < i.length; o++) {
4393
4427
  var s = i[o];
@@ -4439,9 +4473,9 @@ function pt() {
4439
4473
  set: function(g) {
4440
4474
  this._readableState === void 0 || this._writableState === void 0 || (this._readableState.destroyed = g, this._writableState.destroyed = g);
4441
4475
  }
4442
- }), mr;
4476
+ }), _r;
4443
4477
  }
4444
- var Yt = {}, Qr = we.Buffer, wn = Qr.isEncoding || function(e) {
4478
+ var Yt = {}, Qr = we.Buffer, vn = Qr.isEncoding || function(e) {
4445
4479
  switch (e = "" + e, e && e.toLowerCase()) {
4446
4480
  case "hex":
4447
4481
  case "utf8":
@@ -4459,7 +4493,7 @@ var Yt = {}, Qr = we.Buffer, wn = Qr.isEncoding || function(e) {
4459
4493
  return !1;
4460
4494
  }
4461
4495
  };
4462
- function Oo(e) {
4496
+ function Mo(e) {
4463
4497
  if (!e) return "utf8";
4464
4498
  for (var t; ; )
4465
4499
  switch (e) {
@@ -4483,27 +4517,27 @@ function Oo(e) {
4483
4517
  e = ("" + e).toLowerCase(), t = !0;
4484
4518
  }
4485
4519
  }
4486
- function Mo(e) {
4487
- var t = Oo(e);
4488
- if (typeof t != "string" && (Qr.isEncoding === wn || !wn(e))) throw new Error("Unknown encoding: " + e);
4520
+ function Uo(e) {
4521
+ var t = Mo(e);
4522
+ if (typeof t != "string" && (Qr.isEncoding === vn || !vn(e))) throw new Error("Unknown encoding: " + e);
4489
4523
  return t || e;
4490
4524
  }
4491
4525
  Yt.StringDecoder = kt;
4492
4526
  function kt(e) {
4493
- this.encoding = Mo(e);
4527
+ this.encoding = Uo(e);
4494
4528
  var t;
4495
4529
  switch (this.encoding) {
4496
4530
  case "utf16le":
4497
- this.text = qo, this.end = Wo, t = 4;
4531
+ this.text = Wo, this.end = Go, t = 4;
4498
4532
  break;
4499
4533
  case "utf8":
4500
- this.fillLast = $o, t = 4;
4534
+ this.fillLast = Ho, t = 4;
4501
4535
  break;
4502
4536
  case "base64":
4503
- this.text = Go, this.end = zo, t = 3;
4537
+ this.text = zo, this.end = Ko, t = 3;
4504
4538
  break;
4505
4539
  default:
4506
- this.write = Ko, this.end = Vo;
4540
+ this.write = Vo, this.end = Jo;
4507
4541
  return;
4508
4542
  }
4509
4543
  this.lastNeed = 0, this.lastTotal = 0, this.lastChar = Qr.allocUnsafe(t);
@@ -4518,8 +4552,8 @@ kt.prototype.write = function(e) {
4518
4552
  r = 0;
4519
4553
  return r < e.length ? t ? t + this.text(e, r) : this.text(e, r) : t || "";
4520
4554
  };
4521
- kt.prototype.end = jo;
4522
- kt.prototype.text = Ho;
4555
+ kt.prototype.end = qo;
4556
+ kt.prototype.text = jo;
4523
4557
  kt.prototype.fillLast = function(e) {
4524
4558
  if (this.lastNeed <= e.length)
4525
4559
  return e.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
@@ -4528,13 +4562,13 @@ kt.prototype.fillLast = function(e) {
4528
4562
  function wr(e) {
4529
4563
  return e <= 127 ? 0 : e >> 5 === 6 ? 2 : e >> 4 === 14 ? 3 : e >> 3 === 30 ? 4 : e >> 6 === 2 ? -1 : -2;
4530
4564
  }
4531
- function Uo(e, t, r) {
4565
+ function Do(e, t, r) {
4532
4566
  var i = t.length - 1;
4533
4567
  if (i < r) return 0;
4534
4568
  var o = wr(t[i]);
4535
4569
  return o >= 0 ? (o > 0 && (e.lastNeed = o - 1), o) : --i < r || o === -2 ? 0 : (o = wr(t[i]), o >= 0 ? (o > 0 && (e.lastNeed = o - 2), o) : --i < r || o === -2 ? 0 : (o = wr(t[i]), o >= 0 ? (o > 0 && (o === 2 ? o = 0 : e.lastNeed = o - 3), o) : 0));
4536
4570
  }
4537
- function Do(e, t, r) {
4571
+ function $o(e, t, r) {
4538
4572
  if ((t[0] & 192) !== 128)
4539
4573
  return e.lastNeed = 0, "�";
4540
4574
  if (e.lastNeed > 1 && t.length > 1) {
@@ -4544,25 +4578,25 @@ function Do(e, t, r) {
4544
4578
  return e.lastNeed = 2, "�";
4545
4579
  }
4546
4580
  }
4547
- function $o(e) {
4548
- var t = this.lastTotal - this.lastNeed, r = Do(this, e);
4581
+ function Ho(e) {
4582
+ var t = this.lastTotal - this.lastNeed, r = $o(this, e);
4549
4583
  if (r !== void 0) return r;
4550
4584
  if (this.lastNeed <= e.length)
4551
4585
  return e.copy(this.lastChar, t, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
4552
4586
  e.copy(this.lastChar, t, 0, e.length), this.lastNeed -= e.length;
4553
4587
  }
4554
- function Ho(e, t) {
4555
- var r = Uo(this, e, t);
4588
+ function jo(e, t) {
4589
+ var r = Do(this, e, t);
4556
4590
  if (!this.lastNeed) return e.toString("utf8", t);
4557
4591
  this.lastTotal = r;
4558
4592
  var i = e.length - (r - this.lastNeed);
4559
4593
  return e.copy(this.lastChar, 0, i), e.toString("utf8", t, i);
4560
4594
  }
4561
- function jo(e) {
4595
+ function qo(e) {
4562
4596
  var t = e && e.length ? this.write(e) : "";
4563
4597
  return this.lastNeed ? t + "�" : t;
4564
4598
  }
4565
- function qo(e, t) {
4599
+ function Wo(e, t) {
4566
4600
  if ((e.length - t) % 2 === 0) {
4567
4601
  var r = e.toString("utf16le", t);
4568
4602
  if (r) {
@@ -4574,7 +4608,7 @@ function qo(e, t) {
4574
4608
  }
4575
4609
  return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = e[e.length - 1], e.toString("utf16le", t, e.length - 1);
4576
4610
  }
4577
- function Wo(e) {
4611
+ function Go(e) {
4578
4612
  var t = e && e.length ? this.write(e) : "";
4579
4613
  if (this.lastNeed) {
4580
4614
  var r = this.lastTotal - this.lastNeed;
@@ -4582,22 +4616,22 @@ function Wo(e) {
4582
4616
  }
4583
4617
  return t;
4584
4618
  }
4585
- function Go(e, t) {
4619
+ function zo(e, t) {
4586
4620
  var r = (e.length - t) % 3;
4587
4621
  return r === 0 ? e.toString("base64", t) : (this.lastNeed = 3 - r, this.lastTotal = 3, r === 1 ? this.lastChar[0] = e[e.length - 1] : (this.lastChar[0] = e[e.length - 2], this.lastChar[1] = e[e.length - 1]), e.toString("base64", t, e.length - r));
4588
4622
  }
4589
- function zo(e) {
4623
+ function Ko(e) {
4590
4624
  var t = e && e.length ? this.write(e) : "";
4591
4625
  return this.lastNeed ? t + this.lastChar.toString("base64", 0, 3 - this.lastNeed) : t;
4592
4626
  }
4593
- function Ko(e) {
4627
+ function Vo(e) {
4594
4628
  return e.toString(this.encoding);
4595
4629
  }
4596
- function Vo(e) {
4630
+ function Jo(e) {
4597
4631
  return e && e.length ? this.write(e) : "";
4598
4632
  }
4599
- var vn = tt.codes.ERR_STREAM_PREMATURE_CLOSE;
4600
- function Jo(e) {
4633
+ var xn = tt.codes.ERR_STREAM_PREMATURE_CLOSE;
4634
+ function Yo(e) {
4601
4635
  var t = !1;
4602
4636
  return function() {
4603
4637
  if (!t) {
@@ -4608,14 +4642,14 @@ function Jo(e) {
4608
4642
  }
4609
4643
  };
4610
4644
  }
4611
- function Yo() {
4645
+ function Xo() {
4612
4646
  }
4613
- function Xo(e) {
4647
+ function Qo(e) {
4614
4648
  return e.setHeader && typeof e.abort == "function";
4615
4649
  }
4616
- function _i(e, t, r) {
4617
- if (typeof t == "function") return _i(e, null, t);
4618
- t || (t = {}), r = Jo(r || Yo);
4650
+ function wi(e, t, r) {
4651
+ if (typeof t == "function") return wi(e, null, t);
4652
+ t || (t = {}), r = Yo(r || Xo);
4619
4653
  var i = t.readable || t.readable !== !1 && e.readable, o = t.writable || t.writable !== !1 && e.writable, s = function() {
4620
4654
  e.writable || u();
4621
4655
  }, c = e._writableState && e._writableState.finished, u = function() {
@@ -4627,63 +4661,63 @@ function _i(e, t, r) {
4627
4661
  }, w = function() {
4628
4662
  var R;
4629
4663
  if (i && !p)
4630
- return (!e._readableState || !e._readableState.ended) && (R = new vn()), r.call(e, R);
4664
+ return (!e._readableState || !e._readableState.ended) && (R = new xn()), r.call(e, R);
4631
4665
  if (o && !c)
4632
- return (!e._writableState || !e._writableState.ended) && (R = new vn()), r.call(e, R);
4666
+ return (!e._writableState || !e._writableState.ended) && (R = new xn()), r.call(e, R);
4633
4667
  }, x = function() {
4634
4668
  e.req.on("finish", u);
4635
4669
  };
4636
- return Xo(e) ? (e.on("complete", u), e.on("abort", w), e.req ? x() : e.on("request", x)) : o && !e._writableState && (e.on("end", s), e.on("close", s)), e.on("end", y), e.on("finish", u), t.error !== !1 && e.on("error", g), e.on("close", w), function() {
4670
+ return Qo(e) ? (e.on("complete", u), e.on("abort", w), e.req ? x() : e.on("request", x)) : o && !e._writableState && (e.on("end", s), e.on("close", s)), e.on("end", y), e.on("finish", u), t.error !== !1 && e.on("error", g), e.on("close", w), function() {
4637
4671
  e.removeListener("complete", u), e.removeListener("abort", w), e.removeListener("request", x), e.req && e.req.removeListener("finish", u), e.removeListener("end", s), e.removeListener("close", s), e.removeListener("finish", u), e.removeListener("end", y), e.removeListener("error", g), e.removeListener("close", w);
4638
4672
  };
4639
4673
  }
4640
- var Zr = _i, vr, xn;
4641
- function Qo() {
4642
- if (xn) return vr;
4643
- xn = 1;
4674
+ var Zr = wi, vr, En;
4675
+ function Zo() {
4676
+ if (En) return vr;
4677
+ En = 1;
4644
4678
  var e;
4645
- function t(L, N, F) {
4646
- return N = r(N), N in L ? Object.defineProperty(L, N, { value: F, enumerable: !0, configurable: !0, writable: !0 }) : L[N] = F, L;
4679
+ function t(F, N, L) {
4680
+ return N = r(N), N in F ? Object.defineProperty(F, N, { value: L, enumerable: !0, configurable: !0, writable: !0 }) : F[N] = L, F;
4647
4681
  }
4648
- function r(L) {
4649
- var N = i(L, "string");
4682
+ function r(F) {
4683
+ var N = i(F, "string");
4650
4684
  return typeof N == "symbol" ? N : String(N);
4651
4685
  }
4652
- function i(L, N) {
4653
- if (typeof L != "object" || L === null) return L;
4654
- var F = L[Symbol.toPrimitive];
4655
- if (F !== void 0) {
4656
- var S = F.call(L, N || "default");
4686
+ function i(F, N) {
4687
+ if (typeof F != "object" || F === null) return F;
4688
+ var L = F[Symbol.toPrimitive];
4689
+ if (L !== void 0) {
4690
+ var S = L.call(F, N || "default");
4657
4691
  if (typeof S != "object") return S;
4658
4692
  throw new TypeError("@@toPrimitive must return a primitive value.");
4659
4693
  }
4660
- return (N === "string" ? String : Number)(L);
4694
+ return (N === "string" ? String : Number)(F);
4661
4695
  }
4662
4696
  var o = Zr, s = Symbol("lastResolve"), c = Symbol("lastReject"), u = Symbol("error"), p = Symbol("ended"), y = Symbol("lastPromise"), g = Symbol("handlePromise"), w = Symbol("stream");
4663
- function x(L, N) {
4697
+ function x(F, N) {
4664
4698
  return {
4665
- value: L,
4699
+ value: F,
4666
4700
  done: N
4667
4701
  };
4668
4702
  }
4669
- function A(L) {
4670
- var N = L[s];
4703
+ function A(F) {
4704
+ var N = F[s];
4671
4705
  if (N !== null) {
4672
- var F = L[w].read();
4673
- F !== null && (L[y] = null, L[s] = null, L[c] = null, N(x(F, !1)));
4706
+ var L = F[w].read();
4707
+ L !== null && (F[y] = null, F[s] = null, F[c] = null, N(x(L, !1)));
4674
4708
  }
4675
4709
  }
4676
- function R(L) {
4677
- process.nextTick(A, L);
4710
+ function R(F) {
4711
+ process.nextTick(A, F);
4678
4712
  }
4679
- function C(L, N) {
4680
- return function(F, S) {
4681
- L.then(function() {
4713
+ function C(F, N) {
4714
+ return function(L, S) {
4715
+ F.then(function() {
4682
4716
  if (N[p]) {
4683
- F(x(void 0, !0));
4717
+ L(x(void 0, !0));
4684
4718
  return;
4685
4719
  }
4686
- N[g](F, S);
4720
+ N[g](L, S);
4687
4721
  }, S);
4688
4722
  };
4689
4723
  }
@@ -4693,9 +4727,9 @@ function Qo() {
4693
4727
  return this[w];
4694
4728
  },
4695
4729
  next: function() {
4696
- var N = this, F = this[u];
4697
- if (F !== null)
4698
- return Promise.reject(F);
4730
+ var N = this, L = this[u];
4731
+ if (L !== null)
4732
+ return Promise.reject(L);
4699
4733
  if (this[p])
4700
4734
  return Promise.resolve(x(void 0, !0));
4701
4735
  if (this[w].destroyed)
@@ -4719,38 +4753,38 @@ function Qo() {
4719
4753
  return this;
4720
4754
  }), t(e, "return", function() {
4721
4755
  var N = this;
4722
- return new Promise(function(F, S) {
4756
+ return new Promise(function(L, S) {
4723
4757
  N[w].destroy(null, function(j) {
4724
4758
  if (j) {
4725
4759
  S(j);
4726
4760
  return;
4727
4761
  }
4728
- F(x(void 0, !0));
4762
+ L(x(void 0, !0));
4729
4763
  });
4730
4764
  });
4731
4765
  }), e), E), P = function(N) {
4732
- var F, S = Object.create(T, (F = {}, t(F, w, {
4766
+ var L, S = Object.create(T, (L = {}, t(L, w, {
4733
4767
  value: N,
4734
4768
  writable: !0
4735
- }), t(F, s, {
4769
+ }), t(L, s, {
4736
4770
  value: null,
4737
4771
  writable: !0
4738
- }), t(F, c, {
4772
+ }), t(L, c, {
4739
4773
  value: null,
4740
4774
  writable: !0
4741
- }), t(F, u, {
4775
+ }), t(L, u, {
4742
4776
  value: null,
4743
4777
  writable: !0
4744
- }), t(F, p, {
4778
+ }), t(L, p, {
4745
4779
  value: N._readableState.endEmitted,
4746
4780
  writable: !0
4747
- }), t(F, g, {
4781
+ }), t(L, g, {
4748
4782
  value: function(D, M) {
4749
4783
  var ee = S[w].read();
4750
4784
  ee ? (S[y] = null, S[s] = null, S[c] = null, D(x(ee, !1))) : (S[s] = D, S[c] = M);
4751
4785
  },
4752
4786
  writable: !0
4753
- }), F));
4787
+ }), L));
4754
4788
  return S[y] = null, o(N, function(j) {
4755
4789
  if (j && j.code !== "ERR_STREAM_PREMATURE_CLOSE") {
4756
4790
  var D = S[c];
@@ -4763,45 +4797,45 @@ function Qo() {
4763
4797
  };
4764
4798
  return vr = P, vr;
4765
4799
  }
4766
- var xr, En;
4767
- function Zo() {
4768
- return En || (En = 1, xr = function() {
4800
+ var xr, Bn;
4801
+ function es() {
4802
+ return Bn || (Bn = 1, xr = function() {
4769
4803
  throw new Error("Readable.from is not available in the browser");
4770
4804
  }), xr;
4771
4805
  }
4772
- var Er, Bn;
4773
- function mi() {
4774
- if (Bn) return Er;
4775
- Bn = 1, Er = M;
4806
+ var Er, Rn;
4807
+ function vi() {
4808
+ if (Rn) return Er;
4809
+ Rn = 1, Er = M;
4776
4810
  var e;
4777
- M.ReadableState = D, hi.EventEmitter;
4778
- var t = function(d, I) {
4779
- return d.listeners(I).length;
4780
- }, r = di, i = bt.Buffer, o = (typeof ze < "u" ? ze : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
4811
+ M.ReadableState = D, pi.EventEmitter;
4812
+ var t = function(h, I) {
4813
+ return h.listeners(I).length;
4814
+ }, r = bi, i = bt.Buffer, o = (typeof ze < "u" ? ze : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
4781
4815
  };
4782
- function s(h) {
4783
- return i.from(h);
4816
+ function s(d) {
4817
+ return i.from(d);
4784
4818
  }
4785
- function c(h) {
4786
- return i.isBuffer(h) || h instanceof o;
4819
+ function c(d) {
4820
+ return i.isBuffer(d) || d instanceof o;
4787
4821
  }
4788
4822
  var u = Xr, p;
4789
4823
  u && u.debuglog ? p = u.debuglog("stream") : p = function() {
4790
4824
  };
4791
- var y = Eo(), g = pi, w = yi, x = w.getHighWaterMark, A = tt.codes, R = A.ERR_INVALID_ARG_TYPE, C = A.ERR_STREAM_PUSH_AFTER_EOF, E = A.ERR_METHOD_NOT_IMPLEMENTED, T = A.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, P, L, N;
4825
+ var y = Bo(), g = yi, w = mi, x = w.getHighWaterMark, A = tt.codes, R = A.ERR_INVALID_ARG_TYPE, C = A.ERR_STREAM_PUSH_AFTER_EOF, E = A.ERR_METHOD_NOT_IMPLEMENTED, T = A.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, P, F, N;
4792
4826
  pe(M, r);
4793
- var F = g.errorOrDestroy, S = ["error", "close", "destroy", "pause", "resume"];
4794
- function j(h, d, I) {
4795
- if (typeof h.prependListener == "function") return h.prependListener(d, I);
4796
- !h._events || !h._events[d] ? h.on(d, I) : Array.isArray(h._events[d]) ? h._events[d].unshift(I) : h._events[d] = [I, h._events[d]];
4827
+ var L = g.errorOrDestroy, S = ["error", "close", "destroy", "pause", "resume"];
4828
+ function j(d, h, I) {
4829
+ if (typeof d.prependListener == "function") return d.prependListener(h, I);
4830
+ !d._events || !d._events[h] ? d.on(h, I) : Array.isArray(d._events[h]) ? d._events[h].unshift(I) : d._events[h] = [I, d._events[h]];
4797
4831
  }
4798
- function D(h, d, I) {
4799
- e = e || pt(), h = h || {}, typeof I != "boolean" && (I = d instanceof e), this.objectMode = !!h.objectMode, I && (this.objectMode = this.objectMode || !!h.readableObjectMode), this.highWaterMark = x(this, h, "readableHighWaterMark", I), this.buffer = new y(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = h.emitClose !== !1, this.autoDestroy = !!h.autoDestroy, this.destroyed = !1, this.defaultEncoding = h.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, h.encoding && (P || (P = Yt.StringDecoder), this.decoder = new P(h.encoding), this.encoding = h.encoding);
4832
+ function D(d, h, I) {
4833
+ e = e || pt(), d = d || {}, typeof I != "boolean" && (I = h instanceof e), this.objectMode = !!d.objectMode, I && (this.objectMode = this.objectMode || !!d.readableObjectMode), this.highWaterMark = x(this, d, "readableHighWaterMark", I), this.buffer = new y(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = d.emitClose !== !1, this.autoDestroy = !!d.autoDestroy, this.destroyed = !1, this.defaultEncoding = d.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, d.encoding && (P || (P = Yt.StringDecoder), this.decoder = new P(d.encoding), this.encoding = d.encoding);
4800
4834
  }
4801
- function M(h) {
4802
- if (e = e || pt(), !(this instanceof M)) return new M(h);
4803
- var d = this instanceof e;
4804
- this._readableState = new D(h, this, d), this.readable = !0, h && (typeof h.read == "function" && (this._read = h.read), typeof h.destroy == "function" && (this._destroy = h.destroy)), r.call(this);
4835
+ function M(d) {
4836
+ if (e = e || pt(), !(this instanceof M)) return new M(d);
4837
+ var h = this instanceof e;
4838
+ this._readableState = new D(d, this, h), this.readable = !0, d && (typeof d.read == "function" && (this._read = d.read), typeof d.destroy == "function" && (this._destroy = d.destroy)), r.call(this);
4805
4839
  }
4806
4840
  Object.defineProperty(M.prototype, "destroyed", {
4807
4841
  // making it explicit this property is not enumerable
@@ -4811,241 +4845,241 @@ function mi() {
4811
4845
  get: function() {
4812
4846
  return this._readableState === void 0 ? !1 : this._readableState.destroyed;
4813
4847
  },
4814
- set: function(d) {
4815
- this._readableState && (this._readableState.destroyed = d);
4848
+ set: function(h) {
4849
+ this._readableState && (this._readableState.destroyed = h);
4816
4850
  }
4817
- }), M.prototype.destroy = g.destroy, M.prototype._undestroy = g.undestroy, M.prototype._destroy = function(h, d) {
4818
- d(h);
4819
- }, M.prototype.push = function(h, d) {
4851
+ }), M.prototype.destroy = g.destroy, M.prototype._undestroy = g.undestroy, M.prototype._destroy = function(d, h) {
4852
+ h(d);
4853
+ }, M.prototype.push = function(d, h) {
4820
4854
  var I = this._readableState, O;
4821
- return I.objectMode ? O = !0 : typeof h == "string" && (d = d || I.defaultEncoding, d !== I.encoding && (h = i.from(h, d), d = ""), O = !0), ee(this, h, d, !1, O);
4822
- }, M.prototype.unshift = function(h) {
4823
- return ee(this, h, null, !0, !1);
4855
+ return I.objectMode ? O = !0 : typeof d == "string" && (h = h || I.defaultEncoding, h !== I.encoding && (d = i.from(d, h), h = ""), O = !0), ee(this, d, h, !1, O);
4856
+ }, M.prototype.unshift = function(d) {
4857
+ return ee(this, d, null, !0, !1);
4824
4858
  };
4825
- function ee(h, d, I, O, X) {
4826
- p("readableAddChunk", d);
4827
- var W = h._readableState;
4828
- if (d === null)
4829
- W.reading = !1, Ve(h, W);
4859
+ function ee(d, h, I, O, X) {
4860
+ p("readableAddChunk", h);
4861
+ var W = d._readableState;
4862
+ if (h === null)
4863
+ W.reading = !1, Ve(d, W);
4830
4864
  else {
4831
4865
  var z;
4832
- if (X || (z = Ue(W, d)), z)
4833
- F(h, z);
4834
- else if (W.objectMode || d && d.length > 0)
4835
- if (typeof d != "string" && !W.objectMode && Object.getPrototypeOf(d) !== i.prototype && (d = s(d)), O)
4836
- W.endEmitted ? F(h, new T()) : Ie(h, W, d, !0);
4866
+ if (X || (z = Ue(W, h)), z)
4867
+ L(d, z);
4868
+ else if (W.objectMode || h && h.length > 0)
4869
+ if (typeof h != "string" && !W.objectMode && Object.getPrototypeOf(h) !== i.prototype && (h = s(h)), O)
4870
+ W.endEmitted ? L(d, new T()) : Ie(d, W, h, !0);
4837
4871
  else if (W.ended)
4838
- F(h, new C());
4872
+ L(d, new C());
4839
4873
  else {
4840
4874
  if (W.destroyed)
4841
4875
  return !1;
4842
- W.reading = !1, W.decoder && !I ? (d = W.decoder.write(d), W.objectMode || d.length !== 0 ? Ie(h, W, d, !1) : Te(h, W)) : Ie(h, W, d, !1);
4876
+ W.reading = !1, W.decoder && !I ? (h = W.decoder.write(h), W.objectMode || h.length !== 0 ? Ie(d, W, h, !1) : Te(d, W)) : Ie(d, W, h, !1);
4843
4877
  }
4844
- else O || (W.reading = !1, Te(h, W));
4878
+ else O || (W.reading = !1, Te(d, W));
4845
4879
  }
4846
4880
  return !W.ended && (W.length < W.highWaterMark || W.length === 0);
4847
4881
  }
4848
- function Ie(h, d, I, O) {
4849
- d.flowing && d.length === 0 && !d.sync ? (d.awaitDrain = 0, h.emit("data", I)) : (d.length += d.objectMode ? 1 : I.length, O ? d.buffer.unshift(I) : d.buffer.push(I), d.needReadable && Ae(h)), Te(h, d);
4882
+ function Ie(d, h, I, O) {
4883
+ h.flowing && h.length === 0 && !h.sync ? (h.awaitDrain = 0, d.emit("data", I)) : (h.length += h.objectMode ? 1 : I.length, O ? h.buffer.unshift(I) : h.buffer.push(I), h.needReadable && Ae(d)), Te(d, h);
4850
4884
  }
4851
- function Ue(h, d) {
4885
+ function Ue(d, h) {
4852
4886
  var I;
4853
- return !c(d) && typeof d != "string" && d !== void 0 && !h.objectMode && (I = new R("chunk", ["string", "Buffer", "Uint8Array"], d)), I;
4887
+ return !c(h) && typeof h != "string" && h !== void 0 && !d.objectMode && (I = new R("chunk", ["string", "Buffer", "Uint8Array"], h)), I;
4854
4888
  }
4855
4889
  M.prototype.isPaused = function() {
4856
4890
  return this._readableState.flowing === !1;
4857
- }, M.prototype.setEncoding = function(h) {
4891
+ }, M.prototype.setEncoding = function(d) {
4858
4892
  P || (P = Yt.StringDecoder);
4859
- var d = new P(h);
4860
- this._readableState.decoder = d, this._readableState.encoding = this._readableState.decoder.encoding;
4893
+ var h = new P(d);
4894
+ this._readableState.decoder = h, this._readableState.encoding = this._readableState.decoder.encoding;
4861
4895
  for (var I = this._readableState.buffer.head, O = ""; I !== null; )
4862
- O += d.write(I.data), I = I.next;
4896
+ O += h.write(I.data), I = I.next;
4863
4897
  return this._readableState.buffer.clear(), O !== "" && this._readableState.buffer.push(O), this._readableState.length = O.length, this;
4864
4898
  };
4865
4899
  var ae = 1073741824;
4866
- function _e(h) {
4867
- return h >= ae ? h = ae : (h--, h |= h >>> 1, h |= h >>> 2, h |= h >>> 4, h |= h >>> 8, h |= h >>> 16, h++), h;
4868
- }
4869
- function me(h, d) {
4870
- return h <= 0 || d.length === 0 && d.ended ? 0 : d.objectMode ? 1 : h !== h ? d.flowing && d.length ? d.buffer.head.data.length : d.length : (h > d.highWaterMark && (d.highWaterMark = _e(h)), h <= d.length ? h : d.ended ? d.length : (d.needReadable = !0, 0));
4871
- }
4872
- M.prototype.read = function(h) {
4873
- p("read", h), h = parseInt(h, 10);
4874
- var d = this._readableState, I = h;
4875
- if (h !== 0 && (d.emittedReadable = !1), h === 0 && d.needReadable && ((d.highWaterMark !== 0 ? d.length >= d.highWaterMark : d.length > 0) || d.ended))
4876
- return p("read: emitReadable", d.length, d.ended), d.length === 0 && d.ended ? k(this) : Ae(this), null;
4877
- if (h = me(h, d), h === 0 && d.ended)
4878
- return d.length === 0 && k(this), null;
4879
- var O = d.needReadable;
4880
- p("need readable", O), (d.length === 0 || d.length - h < d.highWaterMark) && (O = !0, p("length less than watermark", O)), d.ended || d.reading ? (O = !1, p("reading or ended", O)) : O && (p("do read"), d.reading = !0, d.sync = !0, d.length === 0 && (d.needReadable = !0), this._read(d.highWaterMark), d.sync = !1, d.reading || (h = me(I, d)));
4900
+ function me(d) {
4901
+ return d >= ae ? d = ae : (d--, d |= d >>> 1, d |= d >>> 2, d |= d >>> 4, d |= d >>> 8, d |= d >>> 16, d++), d;
4902
+ }
4903
+ function _e(d, h) {
4904
+ return d <= 0 || h.length === 0 && h.ended ? 0 : h.objectMode ? 1 : d !== d ? h.flowing && h.length ? h.buffer.head.data.length : h.length : (d > h.highWaterMark && (h.highWaterMark = me(d)), d <= h.length ? d : h.ended ? h.length : (h.needReadable = !0, 0));
4905
+ }
4906
+ M.prototype.read = function(d) {
4907
+ p("read", d), d = parseInt(d, 10);
4908
+ var h = this._readableState, I = d;
4909
+ if (d !== 0 && (h.emittedReadable = !1), d === 0 && h.needReadable && ((h.highWaterMark !== 0 ? h.length >= h.highWaterMark : h.length > 0) || h.ended))
4910
+ return p("read: emitReadable", h.length, h.ended), h.length === 0 && h.ended ? k(this) : Ae(this), null;
4911
+ if (d = _e(d, h), d === 0 && h.ended)
4912
+ return h.length === 0 && k(this), null;
4913
+ var O = h.needReadable;
4914
+ p("need readable", O), (h.length === 0 || h.length - d < h.highWaterMark) && (O = !0, p("length less than watermark", O)), h.ended || h.reading ? (O = !1, p("reading or ended", O)) : O && (p("do read"), h.reading = !0, h.sync = !0, h.length === 0 && (h.needReadable = !0), this._read(h.highWaterMark), h.sync = !1, h.reading || (d = _e(I, h)));
4881
4915
  var X;
4882
- return h > 0 ? X = _(h, d) : X = null, X === null ? (d.needReadable = d.length <= d.highWaterMark, h = 0) : (d.length -= h, d.awaitDrain = 0), d.length === 0 && (d.ended || (d.needReadable = !0), I !== h && d.ended && k(this)), X !== null && this.emit("data", X), X;
4916
+ return d > 0 ? X = m(d, h) : X = null, X === null ? (h.needReadable = h.length <= h.highWaterMark, d = 0) : (h.length -= d, h.awaitDrain = 0), h.length === 0 && (h.ended || (h.needReadable = !0), I !== d && h.ended && k(this)), X !== null && this.emit("data", X), X;
4883
4917
  };
4884
- function Ve(h, d) {
4885
- if (p("onEofChunk"), !d.ended) {
4886
- if (d.decoder) {
4887
- var I = d.decoder.end();
4888
- I && I.length && (d.buffer.push(I), d.length += d.objectMode ? 1 : I.length);
4918
+ function Ve(d, h) {
4919
+ if (p("onEofChunk"), !h.ended) {
4920
+ if (h.decoder) {
4921
+ var I = h.decoder.end();
4922
+ I && I.length && (h.buffer.push(I), h.length += h.objectMode ? 1 : I.length);
4889
4923
  }
4890
- d.ended = !0, d.sync ? Ae(h) : (d.needReadable = !1, d.emittedReadable || (d.emittedReadable = !0, De(h)));
4924
+ h.ended = !0, h.sync ? Ae(d) : (h.needReadable = !1, h.emittedReadable || (h.emittedReadable = !0, De(d)));
4891
4925
  }
4892
4926
  }
4893
- function Ae(h) {
4894
- var d = h._readableState;
4895
- p("emitReadable", d.needReadable, d.emittedReadable), d.needReadable = !1, d.emittedReadable || (p("emitReadable", d.flowing), d.emittedReadable = !0, process.nextTick(De, h));
4927
+ function Ae(d) {
4928
+ var h = d._readableState;
4929
+ p("emitReadable", h.needReadable, h.emittedReadable), h.needReadable = !1, h.emittedReadable || (p("emitReadable", h.flowing), h.emittedReadable = !0, process.nextTick(De, d));
4896
4930
  }
4897
- function De(h) {
4898
- var d = h._readableState;
4899
- p("emitReadable_", d.destroyed, d.length, d.ended), !d.destroyed && (d.length || d.ended) && (h.emit("readable"), d.emittedReadable = !1), d.needReadable = !d.flowing && !d.ended && d.length <= d.highWaterMark, m(h);
4931
+ function De(d) {
4932
+ var h = d._readableState;
4933
+ p("emitReadable_", h.destroyed, h.length, h.ended), !h.destroyed && (h.length || h.ended) && (d.emit("readable"), h.emittedReadable = !1), h.needReadable = !h.flowing && !h.ended && h.length <= h.highWaterMark, _(d);
4900
4934
  }
4901
- function Te(h, d) {
4902
- d.readingMore || (d.readingMore = !0, process.nextTick($e, h, d));
4935
+ function Te(d, h) {
4936
+ h.readingMore || (h.readingMore = !0, process.nextTick($e, d, h));
4903
4937
  }
4904
- function $e(h, d) {
4905
- for (; !d.reading && !d.ended && (d.length < d.highWaterMark || d.flowing && d.length === 0); ) {
4906
- var I = d.length;
4907
- if (p("maybeReadMore read 0"), h.read(0), I === d.length)
4938
+ function $e(d, h) {
4939
+ for (; !h.reading && !h.ended && (h.length < h.highWaterMark || h.flowing && h.length === 0); ) {
4940
+ var I = h.length;
4941
+ if (p("maybeReadMore read 0"), d.read(0), I === h.length)
4908
4942
  break;
4909
4943
  }
4910
- d.readingMore = !1;
4944
+ h.readingMore = !1;
4911
4945
  }
4912
- M.prototype._read = function(h) {
4913
- F(this, new E("_read()"));
4914
- }, M.prototype.pipe = function(h, d) {
4946
+ M.prototype._read = function(d) {
4947
+ L(this, new E("_read()"));
4948
+ }, M.prototype.pipe = function(d, h) {
4915
4949
  var I = this, O = this._readableState;
4916
4950
  switch (O.pipesCount) {
4917
4951
  case 0:
4918
- O.pipes = h;
4952
+ O.pipes = d;
4919
4953
  break;
4920
4954
  case 1:
4921
- O.pipes = [O.pipes, h];
4955
+ O.pipes = [O.pipes, d];
4922
4956
  break;
4923
4957
  default:
4924
- O.pipes.push(h);
4958
+ O.pipes.push(d);
4925
4959
  break;
4926
4960
  }
4927
- O.pipesCount += 1, p("pipe count=%d opts=%j", O.pipesCount, d);
4928
- var X = (!d || d.end !== !1) && h !== process.stdout && h !== process.stderr, W = X ? je : Ye;
4929
- O.endEmitted ? process.nextTick(W) : I.once("end", W), h.on("unpipe", z);
4961
+ O.pipesCount += 1, p("pipe count=%d opts=%j", O.pipesCount, h);
4962
+ var X = (!h || h.end !== !1) && d !== process.stdout && d !== process.stderr, W = X ? je : Ye;
4963
+ O.endEmitted ? process.nextTick(W) : I.once("end", W), d.on("unpipe", z);
4930
4964
  function z(f, n) {
4931
4965
  p("onunpipe"), f === I && n && n.hasUnpiped === !1 && (n.hasUnpiped = !0, it());
4932
4966
  }
4933
4967
  function je() {
4934
- p("onend"), h.end();
4968
+ p("onend"), d.end();
4935
4969
  }
4936
4970
  var nt = Y(I);
4937
- h.on("drain", nt);
4971
+ d.on("drain", nt);
4938
4972
  var gt = !1;
4939
4973
  function it() {
4940
- p("cleanup"), h.removeListener("close", _t), h.removeListener("finish", Ee), h.removeListener("drain", nt), h.removeListener("error", Je), h.removeListener("unpipe", z), I.removeListener("end", je), I.removeListener("end", Ye), I.removeListener("data", xe), gt = !0, O.awaitDrain && (!h._writableState || h._writableState.needDrain) && nt();
4974
+ p("cleanup"), d.removeListener("close", mt), d.removeListener("finish", Ee), d.removeListener("drain", nt), d.removeListener("error", Je), d.removeListener("unpipe", z), I.removeListener("end", je), I.removeListener("end", Ye), I.removeListener("data", xe), gt = !0, O.awaitDrain && (!d._writableState || d._writableState.needDrain) && nt();
4941
4975
  }
4942
4976
  I.on("data", xe);
4943
4977
  function xe(f) {
4944
4978
  p("ondata");
4945
- var n = h.write(f);
4946
- p("dest.write", n), n === !1 && ((O.pipesCount === 1 && O.pipes === h || O.pipesCount > 1 && q(O.pipes, h) !== -1) && !gt && (p("false write response, pause", O.awaitDrain), O.awaitDrain++), I.pause());
4979
+ var n = d.write(f);
4980
+ p("dest.write", n), n === !1 && ((O.pipesCount === 1 && O.pipes === d || O.pipesCount > 1 && q(O.pipes, d) !== -1) && !gt && (p("false write response, pause", O.awaitDrain), O.awaitDrain++), I.pause());
4947
4981
  }
4948
4982
  function Je(f) {
4949
- p("onerror", f), Ye(), h.removeListener("error", Je), t(h, "error") === 0 && F(h, f);
4983
+ p("onerror", f), Ye(), d.removeListener("error", Je), t(d, "error") === 0 && L(d, f);
4950
4984
  }
4951
- j(h, "error", Je);
4952
- function _t() {
4953
- h.removeListener("finish", Ee), Ye();
4985
+ j(d, "error", Je);
4986
+ function mt() {
4987
+ d.removeListener("finish", Ee), Ye();
4954
4988
  }
4955
- h.once("close", _t);
4989
+ d.once("close", mt);
4956
4990
  function Ee() {
4957
- p("onfinish"), h.removeListener("close", _t), Ye();
4991
+ p("onfinish"), d.removeListener("close", mt), Ye();
4958
4992
  }
4959
- h.once("finish", Ee);
4993
+ d.once("finish", Ee);
4960
4994
  function Ye() {
4961
- p("unpipe"), I.unpipe(h);
4995
+ p("unpipe"), I.unpipe(d);
4962
4996
  }
4963
- return h.emit("pipe", I), O.flowing || (p("pipe resume"), I.resume()), h;
4997
+ return d.emit("pipe", I), O.flowing || (p("pipe resume"), I.resume()), d;
4964
4998
  };
4965
- function Y(h) {
4999
+ function Y(d) {
4966
5000
  return function() {
4967
- var I = h._readableState;
4968
- p("pipeOnDrain", I.awaitDrain), I.awaitDrain && I.awaitDrain--, I.awaitDrain === 0 && t(h, "data") && (I.flowing = !0, m(h));
5001
+ var I = d._readableState;
5002
+ p("pipeOnDrain", I.awaitDrain), I.awaitDrain && I.awaitDrain--, I.awaitDrain === 0 && t(d, "data") && (I.flowing = !0, _(d));
4969
5003
  };
4970
5004
  }
4971
- M.prototype.unpipe = function(h) {
4972
- var d = this._readableState, I = {
5005
+ M.prototype.unpipe = function(d) {
5006
+ var h = this._readableState, I = {
4973
5007
  hasUnpiped: !1
4974
5008
  };
4975
- if (d.pipesCount === 0) return this;
4976
- if (d.pipesCount === 1)
4977
- return h && h !== d.pipes ? this : (h || (h = d.pipes), d.pipes = null, d.pipesCount = 0, d.flowing = !1, h && h.emit("unpipe", this, I), this);
4978
- if (!h) {
4979
- var O = d.pipes, X = d.pipesCount;
4980
- d.pipes = null, d.pipesCount = 0, d.flowing = !1;
5009
+ if (h.pipesCount === 0) return this;
5010
+ if (h.pipesCount === 1)
5011
+ return d && d !== h.pipes ? this : (d || (d = h.pipes), h.pipes = null, h.pipesCount = 0, h.flowing = !1, d && d.emit("unpipe", this, I), this);
5012
+ if (!d) {
5013
+ var O = h.pipes, X = h.pipesCount;
5014
+ h.pipes = null, h.pipesCount = 0, h.flowing = !1;
4981
5015
  for (var W = 0; W < X; W++) O[W].emit("unpipe", this, {
4982
5016
  hasUnpiped: !1
4983
5017
  });
4984
5018
  return this;
4985
5019
  }
4986
- var z = q(d.pipes, h);
4987
- return z === -1 ? this : (d.pipes.splice(z, 1), d.pipesCount -= 1, d.pipesCount === 1 && (d.pipes = d.pipes[0]), h.emit("unpipe", this, I), this);
4988
- }, M.prototype.on = function(h, d) {
4989
- var I = r.prototype.on.call(this, h, d), O = this._readableState;
4990
- return h === "data" ? (O.readableListening = this.listenerCount("readable") > 0, O.flowing !== !1 && this.resume()) : h === "readable" && !O.endEmitted && !O.readableListening && (O.readableListening = O.needReadable = !0, O.flowing = !1, O.emittedReadable = !1, p("on readable", O.length, O.reading), O.length ? Ae(this) : O.reading || process.nextTick(ve, this)), I;
4991
- }, M.prototype.addListener = M.prototype.on, M.prototype.removeListener = function(h, d) {
4992
- var I = r.prototype.removeListener.call(this, h, d);
4993
- return h === "readable" && process.nextTick(ie, this), I;
4994
- }, M.prototype.removeAllListeners = function(h) {
4995
- var d = r.prototype.removeAllListeners.apply(this, arguments);
4996
- return (h === "readable" || h === void 0) && process.nextTick(ie, this), d;
5020
+ var z = q(h.pipes, d);
5021
+ return z === -1 ? this : (h.pipes.splice(z, 1), h.pipesCount -= 1, h.pipesCount === 1 && (h.pipes = h.pipes[0]), d.emit("unpipe", this, I), this);
5022
+ }, M.prototype.on = function(d, h) {
5023
+ var I = r.prototype.on.call(this, d, h), O = this._readableState;
5024
+ return d === "data" ? (O.readableListening = this.listenerCount("readable") > 0, O.flowing !== !1 && this.resume()) : d === "readable" && !O.endEmitted && !O.readableListening && (O.readableListening = O.needReadable = !0, O.flowing = !1, O.emittedReadable = !1, p("on readable", O.length, O.reading), O.length ? Ae(this) : O.reading || process.nextTick(ve, this)), I;
5025
+ }, M.prototype.addListener = M.prototype.on, M.prototype.removeListener = function(d, h) {
5026
+ var I = r.prototype.removeListener.call(this, d, h);
5027
+ return d === "readable" && process.nextTick(ie, this), I;
5028
+ }, M.prototype.removeAllListeners = function(d) {
5029
+ var h = r.prototype.removeAllListeners.apply(this, arguments);
5030
+ return (d === "readable" || d === void 0) && process.nextTick(ie, this), h;
4997
5031
  };
4998
- function ie(h) {
4999
- var d = h._readableState;
5000
- d.readableListening = h.listenerCount("readable") > 0, d.resumeScheduled && !d.paused ? d.flowing = !0 : h.listenerCount("data") > 0 && h.resume();
5032
+ function ie(d) {
5033
+ var h = d._readableState;
5034
+ h.readableListening = d.listenerCount("readable") > 0, h.resumeScheduled && !h.paused ? h.flowing = !0 : d.listenerCount("data") > 0 && d.resume();
5001
5035
  }
5002
- function ve(h) {
5003
- p("readable nexttick read 0"), h.read(0);
5036
+ function ve(d) {
5037
+ p("readable nexttick read 0"), d.read(0);
5004
5038
  }
5005
5039
  M.prototype.resume = function() {
5006
- var h = this._readableState;
5007
- return h.flowing || (p("resume"), h.flowing = !h.readableListening, He(this, h)), h.paused = !1, this;
5040
+ var d = this._readableState;
5041
+ return d.flowing || (p("resume"), d.flowing = !d.readableListening, He(this, d)), d.paused = !1, this;
5008
5042
  };
5009
- function He(h, d) {
5010
- d.resumeScheduled || (d.resumeScheduled = !0, process.nextTick(Ne, h, d));
5043
+ function He(d, h) {
5044
+ h.resumeScheduled || (h.resumeScheduled = !0, process.nextTick(Ne, d, h));
5011
5045
  }
5012
- function Ne(h, d) {
5013
- p("resume", d.reading), d.reading || h.read(0), d.resumeScheduled = !1, h.emit("resume"), m(h), d.flowing && !d.reading && h.read(0);
5046
+ function Ne(d, h) {
5047
+ p("resume", h.reading), h.reading || d.read(0), h.resumeScheduled = !1, d.emit("resume"), _(d), h.flowing && !h.reading && d.read(0);
5014
5048
  }
5015
5049
  M.prototype.pause = function() {
5016
5050
  return p("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (p("pause"), this._readableState.flowing = !1, this.emit("pause")), this._readableState.paused = !0, this;
5017
5051
  };
5018
- function m(h) {
5019
- var d = h._readableState;
5020
- for (p("flow", d.flowing); d.flowing && h.read() !== null; ) ;
5052
+ function _(d) {
5053
+ var h = d._readableState;
5054
+ for (p("flow", h.flowing); h.flowing && d.read() !== null; ) ;
5021
5055
  }
5022
- M.prototype.wrap = function(h) {
5023
- var d = this, I = this._readableState, O = !1;
5024
- h.on("end", function() {
5056
+ M.prototype.wrap = function(d) {
5057
+ var h = this, I = this._readableState, O = !1;
5058
+ d.on("end", function() {
5025
5059
  if (p("wrapped end"), I.decoder && !I.ended) {
5026
5060
  var z = I.decoder.end();
5027
- z && z.length && d.push(z);
5061
+ z && z.length && h.push(z);
5028
5062
  }
5029
- d.push(null);
5030
- }), h.on("data", function(z) {
5063
+ h.push(null);
5064
+ }), d.on("data", function(z) {
5031
5065
  if (p("wrapped data"), I.decoder && (z = I.decoder.write(z)), !(I.objectMode && z == null) && !(!I.objectMode && (!z || !z.length))) {
5032
- var je = d.push(z);
5033
- je || (O = !0, h.pause());
5066
+ var je = h.push(z);
5067
+ je || (O = !0, d.pause());
5034
5068
  }
5035
5069
  });
5036
- for (var X in h)
5037
- this[X] === void 0 && typeof h[X] == "function" && (this[X] = /* @__PURE__ */ function(je) {
5070
+ for (var X in d)
5071
+ this[X] === void 0 && typeof d[X] == "function" && (this[X] = /* @__PURE__ */ function(je) {
5038
5072
  return function() {
5039
- return h[je].apply(h, arguments);
5073
+ return d[je].apply(d, arguments);
5040
5074
  };
5041
5075
  }(X));
5042
5076
  for (var W = 0; W < S.length; W++)
5043
- h.on(S[W], this.emit.bind(this, S[W]));
5077
+ d.on(S[W], this.emit.bind(this, S[W]));
5044
5078
  return this._read = function(z) {
5045
- p("wrapped _read", z), O && (O = !1, h.resume());
5079
+ p("wrapped _read", z), O && (O = !1, d.resume());
5046
5080
  }, this;
5047
5081
  }, typeof Symbol == "function" && (M.prototype[Symbol.asyncIterator] = function() {
5048
- return L === void 0 && (L = Qo()), L(this);
5082
+ return F === void 0 && (F = Zo()), F(this);
5049
5083
  }), Object.defineProperty(M.prototype, "readableHighWaterMark", {
5050
5084
  // making it explicit this property is not enumerable
5051
5085
  // because otherwise some prototype manipulation in
@@ -5070,10 +5104,10 @@ function mi() {
5070
5104
  get: function() {
5071
5105
  return this._readableState.flowing;
5072
5106
  },
5073
- set: function(d) {
5074
- this._readableState && (this._readableState.flowing = d);
5107
+ set: function(h) {
5108
+ this._readableState && (this._readableState.flowing = h);
5075
5109
  }
5076
- }), M._fromList = _, Object.defineProperty(M.prototype, "readableLength", {
5110
+ }), M._fromList = m, Object.defineProperty(M.prototype, "readableLength", {
5077
5111
  // making it explicit this property is not enumerable
5078
5112
  // because otherwise some prototype manipulation in
5079
5113
  // userland will fail
@@ -5082,39 +5116,39 @@ function mi() {
5082
5116
  return this._readableState.length;
5083
5117
  }
5084
5118
  });
5085
- function _(h, d) {
5086
- if (d.length === 0) return null;
5119
+ function m(d, h) {
5120
+ if (h.length === 0) return null;
5087
5121
  var I;
5088
- return d.objectMode ? I = d.buffer.shift() : !h || h >= d.length ? (d.decoder ? I = d.buffer.join("") : d.buffer.length === 1 ? I = d.buffer.first() : I = d.buffer.concat(d.length), d.buffer.clear()) : I = d.buffer.consume(h, d.decoder), I;
5122
+ return h.objectMode ? I = h.buffer.shift() : !d || d >= h.length ? (h.decoder ? I = h.buffer.join("") : h.buffer.length === 1 ? I = h.buffer.first() : I = h.buffer.concat(h.length), h.buffer.clear()) : I = h.buffer.consume(d, h.decoder), I;
5089
5123
  }
5090
- function k(h) {
5091
- var d = h._readableState;
5092
- p("endReadable", d.endEmitted), d.endEmitted || (d.ended = !0, process.nextTick($, d, h));
5124
+ function k(d) {
5125
+ var h = d._readableState;
5126
+ p("endReadable", h.endEmitted), h.endEmitted || (h.ended = !0, process.nextTick($, h, d));
5093
5127
  }
5094
- function $(h, d) {
5095
- if (p("endReadableNT", h.endEmitted, h.length), !h.endEmitted && h.length === 0 && (h.endEmitted = !0, d.readable = !1, d.emit("end"), h.autoDestroy)) {
5096
- var I = d._writableState;
5097
- (!I || I.autoDestroy && I.finished) && d.destroy();
5128
+ function $(d, h) {
5129
+ if (p("endReadableNT", d.endEmitted, d.length), !d.endEmitted && d.length === 0 && (d.endEmitted = !0, h.readable = !1, h.emit("end"), d.autoDestroy)) {
5130
+ var I = h._writableState;
5131
+ (!I || I.autoDestroy && I.finished) && h.destroy();
5098
5132
  }
5099
5133
  }
5100
- typeof Symbol == "function" && (M.from = function(h, d) {
5101
- return N === void 0 && (N = Zo()), N(M, h, d);
5134
+ typeof Symbol == "function" && (M.from = function(d, h) {
5135
+ return N === void 0 && (N = es()), N(M, d, h);
5102
5136
  });
5103
- function q(h, d) {
5104
- for (var I = 0, O = h.length; I < O; I++)
5105
- if (h[I] === d) return I;
5137
+ function q(d, h) {
5138
+ for (var I = 0, O = d.length; I < O; I++)
5139
+ if (d[I] === h) return I;
5106
5140
  return -1;
5107
5141
  }
5108
5142
  return Er;
5109
5143
  }
5110
- var wi = Me, tr = tt.codes, es = tr.ERR_METHOD_NOT_IMPLEMENTED, ts = tr.ERR_MULTIPLE_CALLBACK, rs = tr.ERR_TRANSFORM_ALREADY_TRANSFORMING, ns = tr.ERR_TRANSFORM_WITH_LENGTH_0, rr = pt();
5144
+ var xi = Me, tr = tt.codes, ts = tr.ERR_METHOD_NOT_IMPLEMENTED, rs = tr.ERR_MULTIPLE_CALLBACK, ns = tr.ERR_TRANSFORM_ALREADY_TRANSFORMING, is = tr.ERR_TRANSFORM_WITH_LENGTH_0, rr = pt();
5111
5145
  pe(Me, rr);
5112
- function is(e, t) {
5146
+ function as(e, t) {
5113
5147
  var r = this._transformState;
5114
5148
  r.transforming = !1;
5115
5149
  var i = r.writecb;
5116
5150
  if (i === null)
5117
- return this.emit("error", new ts());
5151
+ return this.emit("error", new rs());
5118
5152
  r.writechunk = null, r.writecb = null, t != null && this.push(t), i(e);
5119
5153
  var o = this._readableState;
5120
5154
  o.reading = !1, (o.needReadable || o.length < o.highWaterMark) && this._read(o.highWaterMark);
@@ -5122,25 +5156,25 @@ function is(e, t) {
5122
5156
  function Me(e) {
5123
5157
  if (!(this instanceof Me)) return new Me(e);
5124
5158
  rr.call(this, e), this._transformState = {
5125
- afterTransform: is.bind(this),
5159
+ afterTransform: as.bind(this),
5126
5160
  needTransform: !1,
5127
5161
  transforming: !1,
5128
5162
  writecb: null,
5129
5163
  writechunk: null,
5130
5164
  writeencoding: null
5131
- }, this._readableState.needReadable = !0, this._readableState.sync = !1, e && (typeof e.transform == "function" && (this._transform = e.transform), typeof e.flush == "function" && (this._flush = e.flush)), this.on("prefinish", as);
5165
+ }, this._readableState.needReadable = !0, this._readableState.sync = !1, e && (typeof e.transform == "function" && (this._transform = e.transform), typeof e.flush == "function" && (this._flush = e.flush)), this.on("prefinish", os);
5132
5166
  }
5133
- function as() {
5167
+ function os() {
5134
5168
  var e = this;
5135
5169
  typeof this._flush == "function" && !this._readableState.destroyed ? this._flush(function(t, r) {
5136
- Rn(e, t, r);
5137
- }) : Rn(this, null, null);
5170
+ Sn(e, t, r);
5171
+ }) : Sn(this, null, null);
5138
5172
  }
5139
5173
  Me.prototype.push = function(e, t) {
5140
5174
  return this._transformState.needTransform = !1, rr.prototype.push.call(this, e, t);
5141
5175
  };
5142
5176
  Me.prototype._transform = function(e, t, r) {
5143
- r(new es("_transform()"));
5177
+ r(new ts("_transform()"));
5144
5178
  };
5145
5179
  Me.prototype._write = function(e, t, r) {
5146
5180
  var i = this._transformState;
@@ -5158,37 +5192,37 @@ Me.prototype._destroy = function(e, t) {
5158
5192
  t(r);
5159
5193
  });
5160
5194
  };
5161
- function Rn(e, t, r) {
5195
+ function Sn(e, t, r) {
5162
5196
  if (t) return e.emit("error", t);
5163
- if (r != null && e.push(r), e._writableState.length) throw new ns();
5164
- if (e._transformState.transforming) throw new rs();
5197
+ if (r != null && e.push(r), e._writableState.length) throw new is();
5198
+ if (e._transformState.transforming) throw new ns();
5165
5199
  return e.push(null);
5166
5200
  }
5167
- var os = At, vi = wi;
5168
- pe(At, vi);
5201
+ var ss = At, Ei = xi;
5202
+ pe(At, Ei);
5169
5203
  function At(e) {
5170
5204
  if (!(this instanceof At)) return new At(e);
5171
- vi.call(this, e);
5205
+ Ei.call(this, e);
5172
5206
  }
5173
5207
  At.prototype._transform = function(e, t, r) {
5174
5208
  r(null, e);
5175
5209
  };
5176
5210
  var Br;
5177
- function ss(e) {
5211
+ function fs(e) {
5178
5212
  var t = !1;
5179
5213
  return function() {
5180
5214
  t || (t = !0, e.apply(void 0, arguments));
5181
5215
  };
5182
5216
  }
5183
- var xi = tt.codes, fs = xi.ERR_MISSING_ARGS, us = xi.ERR_STREAM_DESTROYED;
5184
- function Sn(e) {
5217
+ var Bi = tt.codes, us = Bi.ERR_MISSING_ARGS, cs = Bi.ERR_STREAM_DESTROYED;
5218
+ function In(e) {
5185
5219
  if (e) throw e;
5186
5220
  }
5187
- function cs(e) {
5221
+ function ls(e) {
5188
5222
  return e.setHeader && typeof e.abort == "function";
5189
5223
  }
5190
- function ls(e, t, r, i) {
5191
- i = ss(i);
5224
+ function ds(e, t, r, i) {
5225
+ i = fs(i);
5192
5226
  var o = !1;
5193
5227
  e.on("close", function() {
5194
5228
  o = !0;
@@ -5202,48 +5236,48 @@ function ls(e, t, r, i) {
5202
5236
  var s = !1;
5203
5237
  return function(c) {
5204
5238
  if (!o && !s) {
5205
- if (s = !0, cs(e)) return e.abort();
5239
+ if (s = !0, ls(e)) return e.abort();
5206
5240
  if (typeof e.destroy == "function") return e.destroy();
5207
- i(c || new us("pipe"));
5241
+ i(c || new cs("pipe"));
5208
5242
  }
5209
5243
  };
5210
5244
  }
5211
- function In(e) {
5245
+ function An(e) {
5212
5246
  e();
5213
5247
  }
5214
5248
  function hs(e, t) {
5215
5249
  return e.pipe(t);
5216
5250
  }
5217
- function ds(e) {
5218
- return !e.length || typeof e[e.length - 1] != "function" ? Sn : e.pop();
5251
+ function ps(e) {
5252
+ return !e.length || typeof e[e.length - 1] != "function" ? In : e.pop();
5219
5253
  }
5220
- function ps() {
5254
+ function bs() {
5221
5255
  for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
5222
5256
  t[r] = arguments[r];
5223
- var i = ds(t);
5257
+ var i = ps(t);
5224
5258
  if (Array.isArray(t[0]) && (t = t[0]), t.length < 2)
5225
- throw new fs("streams");
5259
+ throw new us("streams");
5226
5260
  var o, s = t.map(function(c, u) {
5227
5261
  var p = u < t.length - 1, y = u > 0;
5228
- return ls(c, p, y, function(g) {
5229
- o || (o = g), g && s.forEach(In), !p && (s.forEach(In), i(o));
5262
+ return ds(c, p, y, function(g) {
5263
+ o || (o = g), g && s.forEach(An), !p && (s.forEach(An), i(o));
5230
5264
  });
5231
5265
  });
5232
5266
  return t.reduce(hs);
5233
5267
  }
5234
- var bs = ps;
5268
+ var ys = bs;
5235
5269
  (function(e, t) {
5236
- t = e.exports = mi(), t.Stream = t, t.Readable = t, t.Writable = gi(), t.Duplex = pt(), t.Transform = wi, t.PassThrough = os, t.finished = Zr, t.pipeline = bs;
5270
+ t = e.exports = vi(), t.Stream = t, t.Readable = t, t.Writable = _i(), t.Duplex = pt(), t.Transform = xi, t.PassThrough = ss, t.finished = Zr, t.pipeline = ys;
5237
5271
  })($r, $r.exports);
5238
- var ys = $r.exports, Xt = we.Buffer, Ei = ys.Transform, gs = pe;
5272
+ var gs = $r.exports, Xt = we.Buffer, Ri = gs.Transform, ms = pe;
5239
5273
  function _s(e, t) {
5240
5274
  if (!Xt.isBuffer(e) && typeof e != "string")
5241
5275
  throw new TypeError(t + " must be a string or a buffer");
5242
5276
  }
5243
5277
  function Ke(e) {
5244
- Ei.call(this), this._block = Xt.allocUnsafe(e), this._blockSize = e, this._blockOffset = 0, this._length = [0, 0, 0, 0], this._finalized = !1;
5278
+ Ri.call(this), this._block = Xt.allocUnsafe(e), this._blockSize = e, this._blockOffset = 0, this._length = [0, 0, 0, 0], this._finalized = !1;
5245
5279
  }
5246
- gs(Ke, Ei);
5280
+ ms(Ke, Ri);
5247
5281
  Ke.prototype._transform = function(e, t, r) {
5248
5282
  var i = null;
5249
5283
  try {
@@ -5288,19 +5322,19 @@ Ke.prototype.digest = function(e) {
5288
5322
  Ke.prototype._digest = function() {
5289
5323
  throw new Error("_digest is not implemented");
5290
5324
  };
5291
- var Bi = Ke, ms = pe, Ri = Bi, ws = we.Buffer, vs = new Array(16);
5325
+ var Si = Ke, ws = pe, Ii = Si, vs = we.Buffer, xs = new Array(16);
5292
5326
  function nr() {
5293
- Ri.call(this, 64), this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878;
5327
+ Ii.call(this, 64), this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878;
5294
5328
  }
5295
- ms(nr, Ri);
5329
+ ws(nr, Ii);
5296
5330
  nr.prototype._update = function() {
5297
- for (var e = vs, t = 0; t < 16; ++t) e[t] = this._block.readInt32LE(t * 4);
5331
+ for (var e = xs, t = 0; t < 16; ++t) e[t] = this._block.readInt32LE(t * 4);
5298
5332
  var r = this._a, i = this._b, o = this._c, s = this._d;
5299
- r = ue(r, i, o, s, e[0], 3614090360, 7), s = ue(s, r, i, o, e[1], 3905402710, 12), o = ue(o, s, r, i, e[2], 606105819, 17), i = ue(i, o, s, r, e[3], 3250441966, 22), r = ue(r, i, o, s, e[4], 4118548399, 7), s = ue(s, r, i, o, e[5], 1200080426, 12), o = ue(o, s, r, i, e[6], 2821735955, 17), i = ue(i, o, s, r, e[7], 4249261313, 22), r = ue(r, i, o, s, e[8], 1770035416, 7), s = ue(s, r, i, o, e[9], 2336552879, 12), o = ue(o, s, r, i, e[10], 4294925233, 17), i = ue(i, o, s, r, e[11], 2304563134, 22), r = ue(r, i, o, s, e[12], 1804603682, 7), s = ue(s, r, i, o, e[13], 4254626195, 12), o = ue(o, s, r, i, e[14], 2792965006, 17), i = ue(i, o, s, r, e[15], 1236535329, 22), r = ce(r, i, o, s, e[1], 4129170786, 5), s = ce(s, r, i, o, e[6], 3225465664, 9), o = ce(o, s, r, i, e[11], 643717713, 14), i = ce(i, o, s, r, e[0], 3921069994, 20), r = ce(r, i, o, s, e[5], 3593408605, 5), s = ce(s, r, i, o, e[10], 38016083, 9), o = ce(o, s, r, i, e[15], 3634488961, 14), i = ce(i, o, s, r, e[4], 3889429448, 20), r = ce(r, i, o, s, e[9], 568446438, 5), s = ce(s, r, i, o, e[14], 3275163606, 9), o = ce(o, s, r, i, e[3], 4107603335, 14), i = ce(i, o, s, r, e[8], 1163531501, 20), r = ce(r, i, o, s, e[13], 2850285829, 5), s = ce(s, r, i, o, e[2], 4243563512, 9), o = ce(o, s, r, i, e[7], 1735328473, 14), i = ce(i, o, s, r, e[12], 2368359562, 20), r = le(r, i, o, s, e[5], 4294588738, 4), s = le(s, r, i, o, e[8], 2272392833, 11), o = le(o, s, r, i, e[11], 1839030562, 16), i = le(i, o, s, r, e[14], 4259657740, 23), r = le(r, i, o, s, e[1], 2763975236, 4), s = le(s, r, i, o, e[4], 1272893353, 11), o = le(o, s, r, i, e[7], 4139469664, 16), i = le(i, o, s, r, e[10], 3200236656, 23), r = le(r, i, o, s, e[13], 681279174, 4), s = le(s, r, i, o, e[0], 3936430074, 11), o = le(o, s, r, i, e[3], 3572445317, 16), i = le(i, o, s, r, e[6], 76029189, 23), r = le(r, i, o, s, e[9], 3654602809, 4), s = le(s, r, i, o, e[12], 3873151461, 11), o = le(o, s, r, i, e[15], 530742520, 16), i = le(i, o, s, r, e[2], 3299628645, 23), r = he(r, i, o, s, e[0], 4096336452, 6), s = he(s, r, i, o, e[7], 1126891415, 10), o = he(o, s, r, i, e[14], 2878612391, 15), i = he(i, o, s, r, e[5], 4237533241, 21), r = he(r, i, o, s, e[12], 1700485571, 6), s = he(s, r, i, o, e[3], 2399980690, 10), o = he(o, s, r, i, e[10], 4293915773, 15), i = he(i, o, s, r, e[1], 2240044497, 21), r = he(r, i, o, s, e[8], 1873313359, 6), s = he(s, r, i, o, e[15], 4264355552, 10), o = he(o, s, r, i, e[6], 2734768916, 15), i = he(i, o, s, r, e[13], 1309151649, 21), r = he(r, i, o, s, e[4], 4149444226, 6), s = he(s, r, i, o, e[11], 3174756917, 10), o = he(o, s, r, i, e[2], 718787259, 15), i = he(i, o, s, r, e[9], 3951481745, 21), this._a = this._a + r | 0, this._b = this._b + i | 0, this._c = this._c + o | 0, this._d = this._d + s | 0;
5333
+ r = ue(r, i, o, s, e[0], 3614090360, 7), s = ue(s, r, i, o, e[1], 3905402710, 12), o = ue(o, s, r, i, e[2], 606105819, 17), i = ue(i, o, s, r, e[3], 3250441966, 22), r = ue(r, i, o, s, e[4], 4118548399, 7), s = ue(s, r, i, o, e[5], 1200080426, 12), o = ue(o, s, r, i, e[6], 2821735955, 17), i = ue(i, o, s, r, e[7], 4249261313, 22), r = ue(r, i, o, s, e[8], 1770035416, 7), s = ue(s, r, i, o, e[9], 2336552879, 12), o = ue(o, s, r, i, e[10], 4294925233, 17), i = ue(i, o, s, r, e[11], 2304563134, 22), r = ue(r, i, o, s, e[12], 1804603682, 7), s = ue(s, r, i, o, e[13], 4254626195, 12), o = ue(o, s, r, i, e[14], 2792965006, 17), i = ue(i, o, s, r, e[15], 1236535329, 22), r = ce(r, i, o, s, e[1], 4129170786, 5), s = ce(s, r, i, o, e[6], 3225465664, 9), o = ce(o, s, r, i, e[11], 643717713, 14), i = ce(i, o, s, r, e[0], 3921069994, 20), r = ce(r, i, o, s, e[5], 3593408605, 5), s = ce(s, r, i, o, e[10], 38016083, 9), o = ce(o, s, r, i, e[15], 3634488961, 14), i = ce(i, o, s, r, e[4], 3889429448, 20), r = ce(r, i, o, s, e[9], 568446438, 5), s = ce(s, r, i, o, e[14], 3275163606, 9), o = ce(o, s, r, i, e[3], 4107603335, 14), i = ce(i, o, s, r, e[8], 1163531501, 20), r = ce(r, i, o, s, e[13], 2850285829, 5), s = ce(s, r, i, o, e[2], 4243563512, 9), o = ce(o, s, r, i, e[7], 1735328473, 14), i = ce(i, o, s, r, e[12], 2368359562, 20), r = le(r, i, o, s, e[5], 4294588738, 4), s = le(s, r, i, o, e[8], 2272392833, 11), o = le(o, s, r, i, e[11], 1839030562, 16), i = le(i, o, s, r, e[14], 4259657740, 23), r = le(r, i, o, s, e[1], 2763975236, 4), s = le(s, r, i, o, e[4], 1272893353, 11), o = le(o, s, r, i, e[7], 4139469664, 16), i = le(i, o, s, r, e[10], 3200236656, 23), r = le(r, i, o, s, e[13], 681279174, 4), s = le(s, r, i, o, e[0], 3936430074, 11), o = le(o, s, r, i, e[3], 3572445317, 16), i = le(i, o, s, r, e[6], 76029189, 23), r = le(r, i, o, s, e[9], 3654602809, 4), s = le(s, r, i, o, e[12], 3873151461, 11), o = le(o, s, r, i, e[15], 530742520, 16), i = le(i, o, s, r, e[2], 3299628645, 23), r = de(r, i, o, s, e[0], 4096336452, 6), s = de(s, r, i, o, e[7], 1126891415, 10), o = de(o, s, r, i, e[14], 2878612391, 15), i = de(i, o, s, r, e[5], 4237533241, 21), r = de(r, i, o, s, e[12], 1700485571, 6), s = de(s, r, i, o, e[3], 2399980690, 10), o = de(o, s, r, i, e[10], 4293915773, 15), i = de(i, o, s, r, e[1], 2240044497, 21), r = de(r, i, o, s, e[8], 1873313359, 6), s = de(s, r, i, o, e[15], 4264355552, 10), o = de(o, s, r, i, e[6], 2734768916, 15), i = de(i, o, s, r, e[13], 1309151649, 21), r = de(r, i, o, s, e[4], 4149444226, 6), s = de(s, r, i, o, e[11], 3174756917, 10), o = de(o, s, r, i, e[2], 718787259, 15), i = de(i, o, s, r, e[9], 3951481745, 21), this._a = this._a + r | 0, this._b = this._b + i | 0, this._c = this._c + o | 0, this._d = this._d + s | 0;
5300
5334
  };
5301
5335
  nr.prototype._digest = function() {
5302
5336
  this._block[this._blockOffset++] = 128, this._blockOffset > 56 && (this._block.fill(0, this._blockOffset, 64), this._update(), this._blockOffset = 0), this._block.fill(0, this._blockOffset, 56), this._block.writeUInt32LE(this._length[0], 56), this._block.writeUInt32LE(this._length[1], 60), this._update();
5303
- var e = ws.allocUnsafe(16);
5337
+ var e = vs.allocUnsafe(16);
5304
5338
  return e.writeInt32LE(this._a, 0), e.writeInt32LE(this._b, 4), e.writeInt32LE(this._c, 8), e.writeInt32LE(this._d, 12), e;
5305
5339
  };
5306
5340
  function ir(e, t) {
@@ -5315,10 +5349,10 @@ function ce(e, t, r, i, o, s, c) {
5315
5349
  function le(e, t, r, i, o, s, c) {
5316
5350
  return ir(e + (t ^ r ^ i) + o + s | 0, c) + t | 0;
5317
5351
  }
5318
- function he(e, t, r, i, o, s, c) {
5352
+ function de(e, t, r, i, o, s, c) {
5319
5353
  return ir(e + (r ^ (t | ~i)) + o + s | 0, c) + t | 0;
5320
5354
  }
5321
- var xs = nr, Rr = bt.Buffer, Es = pe, Si = Bi, Bs = new Array(16), wt = [
5355
+ var Es = nr, Rr = bt.Buffer, Bs = pe, Ai = Si, Rs = new Array(16), wt = [
5322
5356
  0,
5323
5357
  1,
5324
5358
  2,
@@ -5644,14 +5678,14 @@ var xs = nr, Rr = bt.Buffer, Es = pe, Si = Bi, Bs = new Array(16), wt = [
5644
5678
  11
5645
5679
  ], Bt = [0, 1518500249, 1859775393, 2400959708, 2840853838], Rt = [1352829926, 1548603684, 1836072691, 2053994217, 0];
5646
5680
  function ar() {
5647
- Si.call(this, 64), this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520;
5681
+ Ai.call(this, 64), this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520;
5648
5682
  }
5649
- Es(ar, Si);
5683
+ Bs(ar, Ai);
5650
5684
  ar.prototype._update = function() {
5651
- for (var e = Bs, t = 0; t < 16; ++t) e[t] = this._block.readInt32LE(t * 4);
5685
+ for (var e = Rs, t = 0; t < 16; ++t) e[t] = this._block.readInt32LE(t * 4);
5652
5686
  for (var r = this._a | 0, i = this._b | 0, o = this._c | 0, s = this._d | 0, c = this._e | 0, u = this._a | 0, p = this._b | 0, y = this._c | 0, g = this._d | 0, w = this._e | 0, x = 0; x < 80; x += 1) {
5653
5687
  var A, R;
5654
- x < 16 ? (A = An(r, i, o, s, c, e[wt[x]], Bt[0], xt[x]), R = Pn(u, p, y, g, w, e[vt[x]], Rt[0], Et[x])) : x < 32 ? (A = Tn(r, i, o, s, c, e[wt[x]], Bt[1], xt[x]), R = Cn(u, p, y, g, w, e[vt[x]], Rt[1], Et[x])) : x < 48 ? (A = kn(r, i, o, s, c, e[wt[x]], Bt[2], xt[x]), R = kn(u, p, y, g, w, e[vt[x]], Rt[2], Et[x])) : x < 64 ? (A = Cn(r, i, o, s, c, e[wt[x]], Bt[3], xt[x]), R = Tn(u, p, y, g, w, e[vt[x]], Rt[3], Et[x])) : (A = Pn(r, i, o, s, c, e[wt[x]], Bt[4], xt[x]), R = An(u, p, y, g, w, e[vt[x]], Rt[4], Et[x])), r = c, c = s, s = Ze(o, 10), o = i, i = A, u = w, w = g, g = Ze(y, 10), y = p, p = R;
5688
+ x < 16 ? (A = Tn(r, i, o, s, c, e[wt[x]], Bt[0], xt[x]), R = Nn(u, p, y, g, w, e[vt[x]], Rt[0], Et[x])) : x < 32 ? (A = kn(r, i, o, s, c, e[wt[x]], Bt[1], xt[x]), R = Pn(u, p, y, g, w, e[vt[x]], Rt[1], Et[x])) : x < 48 ? (A = Cn(r, i, o, s, c, e[wt[x]], Bt[2], xt[x]), R = Cn(u, p, y, g, w, e[vt[x]], Rt[2], Et[x])) : x < 64 ? (A = Pn(r, i, o, s, c, e[wt[x]], Bt[3], xt[x]), R = kn(u, p, y, g, w, e[vt[x]], Rt[3], Et[x])) : (A = Nn(r, i, o, s, c, e[wt[x]], Bt[4], xt[x]), R = Tn(u, p, y, g, w, e[vt[x]], Rt[4], Et[x])), r = c, c = s, s = Ze(o, 10), o = i, i = A, u = w, w = g, g = Ze(y, 10), y = p, p = R;
5655
5689
  }
5656
5690
  var C = this._b + o + g | 0;
5657
5691
  this._b = this._c + s + w | 0, this._c = this._d + c + u | 0, this._d = this._e + r + p | 0, this._e = this._a + i + y | 0, this._a = C;
@@ -5664,27 +5698,27 @@ ar.prototype._digest = function() {
5664
5698
  function Ze(e, t) {
5665
5699
  return e << t | e >>> 32 - t;
5666
5700
  }
5667
- function An(e, t, r, i, o, s, c, u) {
5701
+ function Tn(e, t, r, i, o, s, c, u) {
5668
5702
  return Ze(e + (t ^ r ^ i) + s + c | 0, u) + o | 0;
5669
5703
  }
5670
- function Tn(e, t, r, i, o, s, c, u) {
5704
+ function kn(e, t, r, i, o, s, c, u) {
5671
5705
  return Ze(e + (t & r | ~t & i) + s + c | 0, u) + o | 0;
5672
5706
  }
5673
- function kn(e, t, r, i, o, s, c, u) {
5707
+ function Cn(e, t, r, i, o, s, c, u) {
5674
5708
  return Ze(e + ((t | ~r) ^ i) + s + c | 0, u) + o | 0;
5675
5709
  }
5676
- function Cn(e, t, r, i, o, s, c, u) {
5710
+ function Pn(e, t, r, i, o, s, c, u) {
5677
5711
  return Ze(e + (t & i | r & ~i) + s + c | 0, u) + o | 0;
5678
5712
  }
5679
- function Pn(e, t, r, i, o, s, c, u) {
5713
+ function Nn(e, t, r, i, o, s, c, u) {
5680
5714
  return Ze(e + (t ^ (r | ~i)) + s + c | 0, u) + o | 0;
5681
5715
  }
5682
- var Rs = ar, Ii = { exports: {} }, Ai = we.Buffer;
5716
+ var Ss = ar, Ti = { exports: {} }, ki = we.Buffer;
5683
5717
  function or(e, t) {
5684
- this._block = Ai.alloc(e), this._finalSize = t, this._blockSize = e, this._len = 0;
5718
+ this._block = ki.alloc(e), this._finalSize = t, this._blockSize = e, this._len = 0;
5685
5719
  }
5686
5720
  or.prototype.update = function(e, t) {
5687
- typeof e == "string" && (t = t || "utf8", e = Ai.from(e, t));
5721
+ typeof e == "string" && (t = t || "utf8", e = ki.from(e, t));
5688
5722
  for (var r = this._block, i = this._blockSize, o = e.length, s = this._len, c = 0; c < o; ) {
5689
5723
  for (var u = s % i, p = Math.min(o - c, i - u), y = 0; y < p; y++)
5690
5724
  r[u + y] = e[c + y];
@@ -5709,80 +5743,80 @@ or.prototype.digest = function(e) {
5709
5743
  or.prototype._update = function() {
5710
5744
  throw new Error("_update must be implemented by subclass");
5711
5745
  };
5712
- var yt = or, Ss = pe, Ti = yt, Is = we.Buffer, As = [
5746
+ var yt = or, Is = pe, Ci = yt, As = we.Buffer, Ts = [
5713
5747
  1518500249,
5714
5748
  1859775393,
5715
5749
  -1894007588,
5716
5750
  -899497514
5717
- ], Ts = new Array(80);
5751
+ ], ks = new Array(80);
5718
5752
  function Ct() {
5719
- this.init(), this._w = Ts, Ti.call(this, 64, 56);
5753
+ this.init(), this._w = ks, Ci.call(this, 64, 56);
5720
5754
  }
5721
- Ss(Ct, Ti);
5755
+ Is(Ct, Ci);
5722
5756
  Ct.prototype.init = function() {
5723
5757
  return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;
5724
5758
  };
5725
- function ks(e) {
5759
+ function Cs(e) {
5726
5760
  return e << 5 | e >>> 27;
5727
5761
  }
5728
- function Cs(e) {
5762
+ function Ps(e) {
5729
5763
  return e << 30 | e >>> 2;
5730
5764
  }
5731
- function Ps(e, t, r, i) {
5765
+ function Ns(e, t, r, i) {
5732
5766
  return e === 0 ? t & r | ~t & i : e === 2 ? t & r | t & i | r & i : t ^ r ^ i;
5733
5767
  }
5734
5768
  Ct.prototype._update = function(e) {
5735
5769
  for (var t = this._w, r = this._a | 0, i = this._b | 0, o = this._c | 0, s = this._d | 0, c = this._e | 0, u = 0; u < 16; ++u) t[u] = e.readInt32BE(u * 4);
5736
5770
  for (; u < 80; ++u) t[u] = t[u - 3] ^ t[u - 8] ^ t[u - 14] ^ t[u - 16];
5737
5771
  for (var p = 0; p < 80; ++p) {
5738
- var y = ~~(p / 20), g = ks(r) + Ps(y, i, o, s) + c + t[p] + As[y] | 0;
5739
- c = s, s = o, o = Cs(i), i = r, r = g;
5772
+ var y = ~~(p / 20), g = Cs(r) + Ns(y, i, o, s) + c + t[p] + Ts[y] | 0;
5773
+ c = s, s = o, o = Ps(i), i = r, r = g;
5740
5774
  }
5741
5775
  this._a = r + this._a | 0, this._b = i + this._b | 0, this._c = o + this._c | 0, this._d = s + this._d | 0, this._e = c + this._e | 0;
5742
5776
  };
5743
5777
  Ct.prototype._hash = function() {
5744
- var e = Is.allocUnsafe(20);
5778
+ var e = As.allocUnsafe(20);
5745
5779
  return e.writeInt32BE(this._a | 0, 0), e.writeInt32BE(this._b | 0, 4), e.writeInt32BE(this._c | 0, 8), e.writeInt32BE(this._d | 0, 12), e.writeInt32BE(this._e | 0, 16), e;
5746
5780
  };
5747
- var Ns = Ct, Ls = pe, ki = yt, Fs = we.Buffer, Os = [
5781
+ var Fs = Ct, Ls = pe, Pi = yt, Os = we.Buffer, Ms = [
5748
5782
  1518500249,
5749
5783
  1859775393,
5750
5784
  -1894007588,
5751
5785
  -899497514
5752
- ], Ms = new Array(80);
5786
+ ], Us = new Array(80);
5753
5787
  function Pt() {
5754
- this.init(), this._w = Ms, ki.call(this, 64, 56);
5788
+ this.init(), this._w = Us, Pi.call(this, 64, 56);
5755
5789
  }
5756
- Ls(Pt, ki);
5790
+ Ls(Pt, Pi);
5757
5791
  Pt.prototype.init = function() {
5758
5792
  return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;
5759
5793
  };
5760
- function Us(e) {
5794
+ function Ds(e) {
5761
5795
  return e << 1 | e >>> 31;
5762
5796
  }
5763
- function Ds(e) {
5797
+ function $s(e) {
5764
5798
  return e << 5 | e >>> 27;
5765
5799
  }
5766
- function $s(e) {
5800
+ function Hs(e) {
5767
5801
  return e << 30 | e >>> 2;
5768
5802
  }
5769
- function Hs(e, t, r, i) {
5803
+ function js(e, t, r, i) {
5770
5804
  return e === 0 ? t & r | ~t & i : e === 2 ? t & r | t & i | r & i : t ^ r ^ i;
5771
5805
  }
5772
5806
  Pt.prototype._update = function(e) {
5773
5807
  for (var t = this._w, r = this._a | 0, i = this._b | 0, o = this._c | 0, s = this._d | 0, c = this._e | 0, u = 0; u < 16; ++u) t[u] = e.readInt32BE(u * 4);
5774
- for (; u < 80; ++u) t[u] = Us(t[u - 3] ^ t[u - 8] ^ t[u - 14] ^ t[u - 16]);
5808
+ for (; u < 80; ++u) t[u] = Ds(t[u - 3] ^ t[u - 8] ^ t[u - 14] ^ t[u - 16]);
5775
5809
  for (var p = 0; p < 80; ++p) {
5776
- var y = ~~(p / 20), g = Ds(r) + Hs(y, i, o, s) + c + t[p] + Os[y] | 0;
5777
- c = s, s = o, o = $s(i), i = r, r = g;
5810
+ var y = ~~(p / 20), g = $s(r) + js(y, i, o, s) + c + t[p] + Ms[y] | 0;
5811
+ c = s, s = o, o = Hs(i), i = r, r = g;
5778
5812
  }
5779
5813
  this._a = r + this._a | 0, this._b = i + this._b | 0, this._c = o + this._c | 0, this._d = s + this._d | 0, this._e = c + this._e | 0;
5780
5814
  };
5781
5815
  Pt.prototype._hash = function() {
5782
- var e = Fs.allocUnsafe(20);
5816
+ var e = Os.allocUnsafe(20);
5783
5817
  return e.writeInt32BE(this._a | 0, 0), e.writeInt32BE(this._b | 0, 4), e.writeInt32BE(this._c | 0, 8), e.writeInt32BE(this._d | 0, 12), e.writeInt32BE(this._e | 0, 16), e;
5784
5818
  };
5785
- var js = Pt, qs = pe, Ci = yt, Ws = we.Buffer, Gs = [
5819
+ var qs = Pt, Ws = pe, Ni = yt, Gs = we.Buffer, zs = [
5786
5820
  1116352408,
5787
5821
  1899447441,
5788
5822
  3049323471,
@@ -5847,58 +5881,58 @@ var js = Pt, qs = pe, Ci = yt, Ws = we.Buffer, Gs = [
5847
5881
  2756734187,
5848
5882
  3204031479,
5849
5883
  3329325298
5850
- ], zs = new Array(64);
5884
+ ], Ks = new Array(64);
5851
5885
  function Nt() {
5852
- this.init(), this._w = zs, Ci.call(this, 64, 56);
5886
+ this.init(), this._w = Ks, Ni.call(this, 64, 56);
5853
5887
  }
5854
- qs(Nt, Ci);
5888
+ Ws(Nt, Ni);
5855
5889
  Nt.prototype.init = function() {
5856
5890
  return this._a = 1779033703, this._b = 3144134277, this._c = 1013904242, this._d = 2773480762, this._e = 1359893119, this._f = 2600822924, this._g = 528734635, this._h = 1541459225, this;
5857
5891
  };
5858
- function Ks(e, t, r) {
5892
+ function Vs(e, t, r) {
5859
5893
  return r ^ e & (t ^ r);
5860
5894
  }
5861
- function Vs(e, t, r) {
5895
+ function Js(e, t, r) {
5862
5896
  return e & t | r & (e | t);
5863
5897
  }
5864
- function Js(e) {
5898
+ function Ys(e) {
5865
5899
  return (e >>> 2 | e << 30) ^ (e >>> 13 | e << 19) ^ (e >>> 22 | e << 10);
5866
5900
  }
5867
- function Ys(e) {
5901
+ function Xs(e) {
5868
5902
  return (e >>> 6 | e << 26) ^ (e >>> 11 | e << 21) ^ (e >>> 25 | e << 7);
5869
5903
  }
5870
- function Xs(e) {
5904
+ function Qs(e) {
5871
5905
  return (e >>> 7 | e << 25) ^ (e >>> 18 | e << 14) ^ e >>> 3;
5872
5906
  }
5873
- function Qs(e) {
5907
+ function Zs(e) {
5874
5908
  return (e >>> 17 | e << 15) ^ (e >>> 19 | e << 13) ^ e >>> 10;
5875
5909
  }
5876
5910
  Nt.prototype._update = function(e) {
5877
5911
  for (var t = this._w, r = this._a | 0, i = this._b | 0, o = this._c | 0, s = this._d | 0, c = this._e | 0, u = this._f | 0, p = this._g | 0, y = this._h | 0, g = 0; g < 16; ++g) t[g] = e.readInt32BE(g * 4);
5878
- for (; g < 64; ++g) t[g] = Qs(t[g - 2]) + t[g - 7] + Xs(t[g - 15]) + t[g - 16] | 0;
5912
+ for (; g < 64; ++g) t[g] = Zs(t[g - 2]) + t[g - 7] + Qs(t[g - 15]) + t[g - 16] | 0;
5879
5913
  for (var w = 0; w < 64; ++w) {
5880
- var x = y + Ys(c) + Ks(c, u, p) + Gs[w] + t[w] | 0, A = Js(r) + Vs(r, i, o) | 0;
5914
+ var x = y + Xs(c) + Vs(c, u, p) + zs[w] + t[w] | 0, A = Ys(r) + Js(r, i, o) | 0;
5881
5915
  y = p, p = u, u = c, c = s + x | 0, s = o, o = i, i = r, r = x + A | 0;
5882
5916
  }
5883
5917
  this._a = r + this._a | 0, this._b = i + this._b | 0, this._c = o + this._c | 0, this._d = s + this._d | 0, this._e = c + this._e | 0, this._f = u + this._f | 0, this._g = p + this._g | 0, this._h = y + this._h | 0;
5884
5918
  };
5885
5919
  Nt.prototype._hash = function() {
5886
- var e = Ws.allocUnsafe(32);
5920
+ var e = Gs.allocUnsafe(32);
5887
5921
  return e.writeInt32BE(this._a, 0), e.writeInt32BE(this._b, 4), e.writeInt32BE(this._c, 8), e.writeInt32BE(this._d, 12), e.writeInt32BE(this._e, 16), e.writeInt32BE(this._f, 20), e.writeInt32BE(this._g, 24), e.writeInt32BE(this._h, 28), e;
5888
5922
  };
5889
- var Pi = Nt, Zs = pe, ef = Pi, tf = yt, rf = we.Buffer, nf = new Array(64);
5923
+ var Fi = Nt, ef = pe, tf = Fi, rf = yt, nf = we.Buffer, af = new Array(64);
5890
5924
  function sr() {
5891
- this.init(), this._w = nf, tf.call(this, 64, 56);
5925
+ this.init(), this._w = af, rf.call(this, 64, 56);
5892
5926
  }
5893
- Zs(sr, ef);
5927
+ ef(sr, tf);
5894
5928
  sr.prototype.init = function() {
5895
5929
  return this._a = 3238371032, this._b = 914150663, this._c = 812702999, this._d = 4144912697, this._e = 4290775857, this._f = 1750603025, this._g = 1694076839, this._h = 3204075428, this;
5896
5930
  };
5897
5931
  sr.prototype._hash = function() {
5898
- var e = rf.allocUnsafe(28);
5932
+ var e = nf.allocUnsafe(28);
5899
5933
  return e.writeInt32BE(this._a, 0), e.writeInt32BE(this._b, 4), e.writeInt32BE(this._c, 8), e.writeInt32BE(this._d, 12), e.writeInt32BE(this._e, 16), e.writeInt32BE(this._f, 20), e.writeInt32BE(this._g, 24), e;
5900
5934
  };
5901
- var af = sr, of = pe, Ni = yt, sf = we.Buffer, Nn = [
5935
+ var of = sr, sf = pe, Li = yt, ff = we.Buffer, Fn = [
5902
5936
  1116352408,
5903
5937
  3609767458,
5904
5938
  1899447441,
@@ -6059,33 +6093,33 @@ var af = sr, of = pe, Ni = yt, sf = we.Buffer, Nn = [
6059
6093
  987167468,
6060
6094
  1816402316,
6061
6095
  1246189591
6062
- ], ff = new Array(160);
6063
- function Lt() {
6064
- this.init(), this._w = ff, Ni.call(this, 128, 112);
6096
+ ], uf = new Array(160);
6097
+ function Ft() {
6098
+ this.init(), this._w = uf, Li.call(this, 128, 112);
6065
6099
  }
6066
- of(Lt, Ni);
6067
- Lt.prototype.init = function() {
6100
+ sf(Ft, Li);
6101
+ Ft.prototype.init = function() {
6068
6102
  return this._ah = 1779033703, this._bh = 3144134277, this._ch = 1013904242, this._dh = 2773480762, this._eh = 1359893119, this._fh = 2600822924, this._gh = 528734635, this._hh = 1541459225, this._al = 4089235720, this._bl = 2227873595, this._cl = 4271175723, this._dl = 1595750129, this._el = 2917565137, this._fl = 725511199, this._gl = 4215389547, this._hl = 327033209, this;
6069
6103
  };
6070
6104
  function Ln(e, t, r) {
6071
6105
  return r ^ e & (t ^ r);
6072
6106
  }
6073
- function Fn(e, t, r) {
6107
+ function On(e, t, r) {
6074
6108
  return e & t | r & (e | t);
6075
6109
  }
6076
- function On(e, t) {
6110
+ function Mn(e, t) {
6077
6111
  return (e >>> 28 | t << 4) ^ (t >>> 2 | e << 30) ^ (t >>> 7 | e << 25);
6078
6112
  }
6079
- function Mn(e, t) {
6113
+ function Un(e, t) {
6080
6114
  return (e >>> 14 | t << 18) ^ (e >>> 18 | t << 14) ^ (t >>> 9 | e << 23);
6081
6115
  }
6082
- function uf(e, t) {
6116
+ function cf(e, t) {
6083
6117
  return (e >>> 1 | t << 31) ^ (e >>> 8 | t << 24) ^ e >>> 7;
6084
6118
  }
6085
- function cf(e, t) {
6119
+ function lf(e, t) {
6086
6120
  return (e >>> 1 | t << 31) ^ (e >>> 8 | t << 24) ^ (e >>> 7 | t << 25);
6087
6121
  }
6088
- function lf(e, t) {
6122
+ function df(e, t) {
6089
6123
  return (e >>> 19 | t << 13) ^ (t >>> 29 | e << 3) ^ e >>> 6;
6090
6124
  }
6091
6125
  function hf(e, t) {
@@ -6094,65 +6128,65 @@ function hf(e, t) {
6094
6128
  function se(e, t) {
6095
6129
  return e >>> 0 < t >>> 0 ? 1 : 0;
6096
6130
  }
6097
- Lt.prototype._update = function(e) {
6131
+ Ft.prototype._update = function(e) {
6098
6132
  for (var t = this._w, r = this._ah | 0, i = this._bh | 0, o = this._ch | 0, s = this._dh | 0, c = this._eh | 0, u = this._fh | 0, p = this._gh | 0, y = this._hh | 0, g = this._al | 0, w = this._bl | 0, x = this._cl | 0, A = this._dl | 0, R = this._el | 0, C = this._fl | 0, E = this._gl | 0, T = this._hl | 0, P = 0; P < 32; P += 2)
6099
6133
  t[P] = e.readInt32BE(P * 4), t[P + 1] = e.readInt32BE(P * 4 + 4);
6100
6134
  for (; P < 160; P += 2) {
6101
- var L = t[P - 30], N = t[P - 15 * 2 + 1], F = uf(L, N), S = cf(N, L);
6102
- L = t[P - 2 * 2], N = t[P - 2 * 2 + 1];
6103
- var j = lf(L, N), D = hf(N, L), M = t[P - 7 * 2], ee = t[P - 7 * 2 + 1], Ie = t[P - 16 * 2], Ue = t[P - 16 * 2 + 1], ae = S + ee | 0, _e = F + M + se(ae, S) | 0;
6104
- ae = ae + D | 0, _e = _e + j + se(ae, D) | 0, ae = ae + Ue | 0, _e = _e + Ie + se(ae, Ue) | 0, t[P] = _e, t[P + 1] = ae;
6105
- }
6106
- for (var me = 0; me < 160; me += 2) {
6107
- _e = t[me], ae = t[me + 1];
6108
- var Ve = Fn(r, i, o), Ae = Fn(g, w, x), De = On(r, g), Te = On(g, r), $e = Mn(c, R), Y = Mn(R, c), ie = Nn[me], ve = Nn[me + 1], He = Ln(c, u, p), Ne = Ln(R, C, E), m = T + Y | 0, _ = y + $e + se(m, T) | 0;
6109
- m = m + Ne | 0, _ = _ + He + se(m, Ne) | 0, m = m + ve | 0, _ = _ + ie + se(m, ve) | 0, m = m + ae | 0, _ = _ + _e + se(m, ae) | 0;
6135
+ var F = t[P - 30], N = t[P - 15 * 2 + 1], L = cf(F, N), S = lf(N, F);
6136
+ F = t[P - 2 * 2], N = t[P - 2 * 2 + 1];
6137
+ var j = df(F, N), D = hf(N, F), M = t[P - 7 * 2], ee = t[P - 7 * 2 + 1], Ie = t[P - 16 * 2], Ue = t[P - 16 * 2 + 1], ae = S + ee | 0, me = L + M + se(ae, S) | 0;
6138
+ ae = ae + D | 0, me = me + j + se(ae, D) | 0, ae = ae + Ue | 0, me = me + Ie + se(ae, Ue) | 0, t[P] = me, t[P + 1] = ae;
6139
+ }
6140
+ for (var _e = 0; _e < 160; _e += 2) {
6141
+ me = t[_e], ae = t[_e + 1];
6142
+ var Ve = On(r, i, o), Ae = On(g, w, x), De = Mn(r, g), Te = Mn(g, r), $e = Un(c, R), Y = Un(R, c), ie = Fn[_e], ve = Fn[_e + 1], He = Ln(c, u, p), Ne = Ln(R, C, E), _ = T + Y | 0, m = y + $e + se(_, T) | 0;
6143
+ _ = _ + Ne | 0, m = m + He + se(_, Ne) | 0, _ = _ + ve | 0, m = m + ie + se(_, ve) | 0, _ = _ + ae | 0, m = m + me + se(_, ae) | 0;
6110
6144
  var k = Te + Ae | 0, $ = De + Ve + se(k, Te) | 0;
6111
- y = p, T = E, p = u, E = C, u = c, C = R, R = A + m | 0, c = s + _ + se(R, A) | 0, s = o, A = x, o = i, x = w, i = r, w = g, g = m + k | 0, r = _ + $ + se(g, m) | 0;
6145
+ y = p, T = E, p = u, E = C, u = c, C = R, R = A + _ | 0, c = s + m + se(R, A) | 0, s = o, A = x, o = i, x = w, i = r, w = g, g = _ + k | 0, r = m + $ + se(g, _) | 0;
6112
6146
  }
6113
6147
  this._al = this._al + g | 0, this._bl = this._bl + w | 0, this._cl = this._cl + x | 0, this._dl = this._dl + A | 0, this._el = this._el + R | 0, this._fl = this._fl + C | 0, this._gl = this._gl + E | 0, this._hl = this._hl + T | 0, this._ah = this._ah + r + se(this._al, g) | 0, this._bh = this._bh + i + se(this._bl, w) | 0, this._ch = this._ch + o + se(this._cl, x) | 0, this._dh = this._dh + s + se(this._dl, A) | 0, this._eh = this._eh + c + se(this._el, R) | 0, this._fh = this._fh + u + se(this._fl, C) | 0, this._gh = this._gh + p + se(this._gl, E) | 0, this._hh = this._hh + y + se(this._hl, T) | 0;
6114
6148
  };
6115
- Lt.prototype._hash = function() {
6116
- var e = sf.allocUnsafe(64);
6149
+ Ft.prototype._hash = function() {
6150
+ var e = ff.allocUnsafe(64);
6117
6151
  function t(r, i, o) {
6118
6152
  e.writeInt32BE(r, o), e.writeInt32BE(i, o + 4);
6119
6153
  }
6120
6154
  return t(this._ah, this._al, 0), t(this._bh, this._bl, 8), t(this._ch, this._cl, 16), t(this._dh, this._dl, 24), t(this._eh, this._el, 32), t(this._fh, this._fl, 40), t(this._gh, this._gl, 48), t(this._hh, this._hl, 56), e;
6121
6155
  };
6122
- var Li = Lt, df = pe, pf = Li, bf = yt, yf = we.Buffer, gf = new Array(160);
6156
+ var Oi = Ft, pf = pe, bf = Oi, yf = yt, gf = we.Buffer, mf = new Array(160);
6123
6157
  function fr() {
6124
- this.init(), this._w = gf, bf.call(this, 128, 112);
6158
+ this.init(), this._w = mf, yf.call(this, 128, 112);
6125
6159
  }
6126
- df(fr, pf);
6160
+ pf(fr, bf);
6127
6161
  fr.prototype.init = function() {
6128
6162
  return this._ah = 3418070365, this._bh = 1654270250, this._ch = 2438529370, this._dh = 355462360, this._eh = 1731405415, this._fh = 2394180231, this._gh = 3675008525, this._hh = 1203062813, this._al = 3238371032, this._bl = 914150663, this._cl = 812702999, this._dl = 4144912697, this._el = 4290775857, this._fl = 1750603025, this._gl = 1694076839, this._hl = 3204075428, this;
6129
6163
  };
6130
6164
  fr.prototype._hash = function() {
6131
- var e = yf.allocUnsafe(48);
6165
+ var e = gf.allocUnsafe(48);
6132
6166
  function t(r, i, o) {
6133
6167
  e.writeInt32BE(r, o), e.writeInt32BE(i, o + 4);
6134
6168
  }
6135
6169
  return t(this._ah, this._al, 0), t(this._bh, this._bl, 8), t(this._ch, this._cl, 16), t(this._dh, this._dl, 24), t(this._eh, this._el, 32), t(this._fh, this._fl, 40), e;
6136
6170
  };
6137
- var _f = fr, rt = Ii.exports = function(t) {
6171
+ var _f = fr, rt = Ti.exports = function(t) {
6138
6172
  t = t.toLowerCase();
6139
6173
  var r = rt[t];
6140
6174
  if (!r) throw new Error(t + " is not supported (we accept pull requests)");
6141
6175
  return new r();
6142
6176
  };
6143
- rt.sha = Ns;
6144
- rt.sha1 = js;
6145
- rt.sha224 = af;
6146
- rt.sha256 = Pi;
6177
+ rt.sha = Fs;
6178
+ rt.sha1 = qs;
6179
+ rt.sha224 = of;
6180
+ rt.sha256 = Fi;
6147
6181
  rt.sha384 = _f;
6148
- rt.sha512 = Li;
6149
- var mf = Ii.exports, Fi = we.Buffer, Oi = Xr.Transform, wf = Yt.StringDecoder, vf = pe;
6182
+ rt.sha512 = Oi;
6183
+ var wf = Ti.exports, Mi = we.Buffer, Ui = Xr.Transform, vf = Yt.StringDecoder, xf = pe;
6150
6184
  function ke(e) {
6151
- Oi.call(this), this.hashMode = typeof e == "string", this.hashMode ? this[e] = this._finalOrDigest : this.final = this._finalOrDigest, this._final && (this.__final = this._final, this._final = null), this._decoder = null, this._encoding = null;
6185
+ Ui.call(this), this.hashMode = typeof e == "string", this.hashMode ? this[e] = this._finalOrDigest : this.final = this._finalOrDigest, this._final && (this.__final = this._final, this._final = null), this._decoder = null, this._encoding = null;
6152
6186
  }
6153
- vf(ke, Oi);
6187
+ xf(ke, Ui);
6154
6188
  ke.prototype.update = function(e, t, r) {
6155
- typeof e == "string" && (e = Fi.from(e, t));
6189
+ typeof e == "string" && (e = Mi.from(e, t));
6156
6190
  var i = this._update(e);
6157
6191
  return this.hashMode ? this : (r && (i = this._toString(i, r)), i);
6158
6192
  };
@@ -6187,29 +6221,29 @@ ke.prototype._flush = function(e) {
6187
6221
  e(t);
6188
6222
  };
6189
6223
  ke.prototype._finalOrDigest = function(e) {
6190
- var t = this.__final() || Fi.alloc(0);
6224
+ var t = this.__final() || Mi.alloc(0);
6191
6225
  return e && (t = this._toString(t, e, !0)), t;
6192
6226
  };
6193
6227
  ke.prototype._toString = function(e, t, r) {
6194
- if (this._decoder || (this._decoder = new wf(t), this._encoding = t), this._encoding !== t) throw new Error("can't switch encodings");
6228
+ if (this._decoder || (this._decoder = new vf(t), this._encoding = t), this._encoding !== t) throw new Error("can't switch encodings");
6195
6229
  var i = this._decoder.write(e);
6196
6230
  return r && (i += this._decoder.end()), i;
6197
6231
  };
6198
- var xf = ke, Ef = pe, Bf = xs, Rf = Rs, Sf = mf, Mi = xf;
6232
+ var Ef = ke, Bf = pe, Rf = Es, Sf = Ss, If = wf, Di = Ef;
6199
6233
  function ur(e) {
6200
- Mi.call(this, "digest"), this._hash = e;
6234
+ Di.call(this, "digest"), this._hash = e;
6201
6235
  }
6202
- Ef(ur, Mi);
6236
+ Bf(ur, Di);
6203
6237
  ur.prototype._update = function(e) {
6204
6238
  this._hash.update(e);
6205
6239
  };
6206
6240
  ur.prototype._final = function() {
6207
6241
  return this._hash.digest();
6208
6242
  };
6209
- var If = function(t) {
6210
- return t = t.toLowerCase(), t === "md5" ? new Bf() : t === "rmd160" || t === "ripemd160" ? new Rf() : new ur(Sf(t));
6243
+ var Af = function(t) {
6244
+ return t = t.toLowerCase(), t === "md5" ? new Rf() : t === "rmd160" || t === "ripemd160" ? new Sf() : new ur(If(t));
6211
6245
  }, jt = we.Buffer;
6212
- function Af(e) {
6246
+ function Tf(e) {
6213
6247
  if (e.length >= 255)
6214
6248
  throw new TypeError("Alphabet too long");
6215
6249
  for (var t = new Uint8Array(256), r = 0; r < t.length; r++)
@@ -6228,17 +6262,17 @@ function Af(e) {
6228
6262
  return "";
6229
6263
  for (var R = 0, C = 0, E = 0, T = A.length; E !== T && A[E] === 0; )
6230
6264
  E++, R++;
6231
- for (var P = (T - E) * y + 1 >>> 0, L = new Uint8Array(P); E !== T; ) {
6232
- for (var N = A[E], F = 0, S = P - 1; (N !== 0 || F < C) && S !== -1; S--, F++)
6233
- N += 256 * L[S] >>> 0, L[S] = N % c >>> 0, N = N / c >>> 0;
6265
+ for (var P = (T - E) * y + 1 >>> 0, F = new Uint8Array(P); E !== T; ) {
6266
+ for (var N = A[E], L = 0, S = P - 1; (N !== 0 || L < C) && S !== -1; S--, L++)
6267
+ N += 256 * F[S] >>> 0, F[S] = N % c >>> 0, N = N / c >>> 0;
6234
6268
  if (N !== 0)
6235
6269
  throw new Error("Non-zero carry");
6236
- C = F, E++;
6270
+ C = L, E++;
6237
6271
  }
6238
- for (var j = P - C; j !== P && L[j] === 0; )
6272
+ for (var j = P - C; j !== P && F[j] === 0; )
6239
6273
  j++;
6240
6274
  for (var D = u.repeat(R); j < P; ++j)
6241
- D += e.charAt(L[j]);
6275
+ D += e.charAt(F[j]);
6242
6276
  return D;
6243
6277
  }
6244
6278
  function w(A) {
@@ -6249,12 +6283,12 @@ function Af(e) {
6249
6283
  for (var R = 0, C = 0, E = 0; A[R] === u; )
6250
6284
  C++, R++;
6251
6285
  for (var T = (A.length - R) * p + 1 >>> 0, P = new Uint8Array(T); R < A.length; ) {
6252
- var L = t[A.charCodeAt(R)];
6253
- if (L === 255)
6286
+ var F = t[A.charCodeAt(R)];
6287
+ if (F === 255)
6254
6288
  return;
6255
- for (var N = 0, F = T - 1; (L !== 0 || N < E) && F !== -1; F--, N++)
6256
- L += c * P[F] >>> 0, P[F] = L % 256 >>> 0, L = L / 256 >>> 0;
6257
- if (L !== 0)
6289
+ for (var N = 0, L = T - 1; (F !== 0 || N < E) && L !== -1; L--, N++)
6290
+ F += c * P[L] >>> 0, P[L] = F % 256 >>> 0, F = F / 256 >>> 0;
6291
+ if (F !== 0)
6258
6292
  throw new Error("Non-zero carry");
6259
6293
  E = N, R++;
6260
6294
  }
@@ -6278,10 +6312,10 @@ function Af(e) {
6278
6312
  decode: x
6279
6313
  };
6280
6314
  }
6281
- var Tf = Af, kf = Tf, Cf = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", Pf = kf(Cf), Sr = Pf, Nf = we.Buffer, Lf = function(e) {
6315
+ var kf = Tf, Cf = kf, Pf = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", Nf = Cf(Pf), Sr = Nf, Ff = we.Buffer, Lf = function(e) {
6282
6316
  function t(s) {
6283
6317
  var c = e(s);
6284
- return Sr.encode(Nf.concat([
6318
+ return Sr.encode(Ff.concat([
6285
6319
  s,
6286
6320
  c
6287
6321
  ], s.length + 4));
@@ -6306,13 +6340,13 @@ var Tf = Af, kf = Tf, Cf = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrst
6306
6340
  decode: o,
6307
6341
  decodeUnsafe: i
6308
6342
  };
6309
- }, Un = If, Ff = Lf;
6310
- function Of(e) {
6311
- var t = Un("sha256").update(e).digest();
6312
- return Un("sha256").update(t).digest();
6343
+ }, Dn = Af, Of = Lf;
6344
+ function Mf(e) {
6345
+ var t = Dn("sha256").update(e).digest();
6346
+ return Dn("sha256").update(t).digest();
6313
6347
  }
6314
- var Mf = Ff(Of), jr = Mf;
6315
- function Ui(e, t) {
6348
+ var Uf = Of(Mf), jr = Uf;
6349
+ function $i(e, t) {
6316
6350
  if (t !== void 0 && e[0] !== t) throw new Error("Invalid network version");
6317
6351
  if (e.length === 33)
6318
6352
  return {
@@ -6332,10 +6366,10 @@ function qr(e, t, r) {
6332
6366
  var i = new Buffer(r ? 34 : 33);
6333
6367
  return i.writeUInt8(e, 0), t.copy(i, 1), r && (i[33] = 1), i;
6334
6368
  }
6335
- function Uf(e, t) {
6336
- return Ui(jr.decode(e), t);
6369
+ function Df(e, t) {
6370
+ return $i(jr.decode(e), t);
6337
6371
  }
6338
- function Df(e, t, r) {
6372
+ function $f(e, t, r) {
6339
6373
  return typeof e == "number" ? jr.encode(qr(e, t, r)) : jr.encode(
6340
6374
  qr(
6341
6375
  e.version,
@@ -6344,16 +6378,16 @@ function Df(e, t, r) {
6344
6378
  )
6345
6379
  );
6346
6380
  }
6347
- var $f = {
6348
- decode: Uf,
6349
- decodeRaw: Ui,
6350
- encode: Df,
6381
+ var Hf = {
6382
+ decode: Df,
6383
+ decodeRaw: $i,
6384
+ encode: $f,
6351
6385
  encodeRaw: qr
6352
6386
  }, cr = {};
6353
6387
  Object.defineProperty(cr, "__esModule", { value: !0 });
6354
6388
  cr.testEcc = void 0;
6355
6389
  const H = (e) => Buffer.from(e, "hex");
6356
- function Hf(e) {
6390
+ function jf(e) {
6357
6391
  J(
6358
6392
  e.isPoint(
6359
6393
  H("0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798")
@@ -6543,22 +6577,22 @@ function Hf(e) {
6543
6577
  )
6544
6578
  );
6545
6579
  }
6546
- cr.testEcc = Hf;
6580
+ cr.testEcc = jf;
6547
6581
  function J(e) {
6548
6582
  if (!e) throw new Error("ecc library invalid");
6549
6583
  }
6550
- Object.defineProperty(ht, "__esModule", { value: !0 });
6551
- ht.ECPairFactory = ht.networks = void 0;
6552
- const Wr = dt;
6553
- ht.networks = Wr;
6554
- const ye = Xn, jf = po, Dn = $f, qf = cr, Ir = ye.typeforce.maybe(
6584
+ Object.defineProperty(dt, "__esModule", { value: !0 });
6585
+ dt.ECPairFactory = dt.networks = void 0;
6586
+ const Wr = ht;
6587
+ dt.networks = Wr;
6588
+ const ye = Zn, qf = bo, $n = Hf, Wf = cr, Ir = ye.typeforce.maybe(
6555
6589
  ye.typeforce.compile({
6556
6590
  compressed: ye.maybe(ye.Boolean),
6557
6591
  network: ye.maybe(ye.Network)
6558
6592
  })
6559
- ), Wf = (e) => e.length === 32 ? e : e.slice(1, 33);
6560
- function Gf(e) {
6561
- (0, qf.testEcc)(e);
6593
+ ), Gf = (e) => e.length === 32 ? e : e.slice(1, 33);
6594
+ function zf(e) {
6595
+ (0, Wf.testEcc)(e);
6562
6596
  function t(u) {
6563
6597
  return e.isPoint(u);
6564
6598
  }
@@ -6571,7 +6605,7 @@ function Gf(e) {
6571
6605
  return ye.typeforce(e.isPoint, u), ye.typeforce(Ir, p), new c(void 0, u, p);
6572
6606
  }
6573
6607
  function o(u, p) {
6574
- const y = Dn.decode(u), g = y.version;
6608
+ const y = $n.decode(u), g = y.version;
6575
6609
  if (ye.Array(p)) {
6576
6610
  if (p = p.filter((w) => g === w.wif).pop(), !p) throw new Error("Unknown network version");
6577
6611
  } else if (p = p || Wr.bitcoin, g !== p.wif) throw new Error("Invalid network version");
@@ -6582,7 +6616,7 @@ function Gf(e) {
6582
6616
  }
6583
6617
  function s(u) {
6584
6618
  ye.typeforce(Ir, u), u === void 0 && (u = {});
6585
- const p = u.rng || jf;
6619
+ const p = u.rng || qf;
6586
6620
  let y;
6587
6621
  do
6588
6622
  y = p(32), ye.typeforce(ye.Buffer256bit, y);
@@ -6610,7 +6644,7 @@ function Gf(e) {
6610
6644
  }
6611
6645
  toWIF() {
6612
6646
  if (!this.__D) throw new Error("Missing private key");
6613
- return Dn.encode(this.network.wif, this.__D, this.compressed);
6647
+ return $n.encode(this.network.wif, this.__D, this.compressed);
6614
6648
  }
6615
6649
  tweak(p) {
6616
6650
  return this.privateKey ? this.tweakFromPrivateKey(p) : this.tweakFromPublicKey(p);
@@ -6643,7 +6677,7 @@ function Gf(e) {
6643
6677
  return e.verifySchnorr(p, this.publicKey.subarray(1, 33), y);
6644
6678
  }
6645
6679
  tweakFromPublicKey(p) {
6646
- const y = Wf(this.publicKey), g = e.xOnlyPointAddTweak(y, p);
6680
+ const y = Gf(this.publicKey), g = e.xOnlyPointAddTweak(y, p);
6647
6681
  if (!g || g.xOnlyPubkey === null)
6648
6682
  throw new Error("Cannot tweak public key!");
6649
6683
  const w = Buffer.from([
@@ -6671,10 +6705,10 @@ function Gf(e) {
6671
6705
  makeRandom: s
6672
6706
  };
6673
6707
  }
6674
- ht.ECPairFactory = Gf;
6708
+ dt.ECPairFactory = zf;
6675
6709
  (function(e) {
6676
6710
  Object.defineProperty(e, "__esModule", { value: !0 }), e.networks = e.ECPairFactory = e.default = void 0;
6677
- var t = ht;
6711
+ var t = dt;
6678
6712
  Object.defineProperty(e, "default", {
6679
6713
  enumerable: !0,
6680
6714
  get: function() {
@@ -6691,7 +6725,7 @@ ht.ECPairFactory = Gf;
6691
6725
  return t.networks;
6692
6726
  }
6693
6727
  });
6694
- })(Yn);
6728
+ })(Qn);
6695
6729
  class Gr {
6696
6730
  constructor(t) {
6697
6731
  this.privKey = t;
@@ -6739,7 +6773,7 @@ class Gr {
6739
6773
  return ne({ secret: i, secretHash: o });
6740
6774
  }
6741
6775
  signMessage(t) {
6742
- const r = Yn.ECPairFactory(lt), i = "Garden.fi" + t.toString(), o = Buffer.from(i, "utf8"), s = Ut(o), c = Buffer.from(Xe(this.privKey), "hex");
6776
+ const r = Qn.ECPairFactory(lt), i = "Garden.fi" + t.toString(), o = Buffer.from(i, "utf8"), s = Ut(o), c = Buffer.from(Xe(this.privKey), "hex");
6743
6777
  if (c.length !== 32)
6744
6778
  throw new Error("Invalid private key length. Expected 32 bytes.");
6745
6779
  return r.fromPrivateKey(c).sign(Buffer.from(Xe(s), "hex")).toString("hex");
@@ -6776,12 +6810,12 @@ class ou {
6776
6810
  }
6777
6811
  }
6778
6812
  export {
6779
- $a as EvmRelay,
6813
+ Ha as EvmRelay,
6780
6814
  iu as Garden,
6781
- Ma as ParseOrderStatus,
6815
+ Ua as ParseOrderStatus,
6782
6816
  Or as ParseSwapStatus,
6783
6817
  ou as Quote,
6784
6818
  Gr as SecretManager,
6785
- Ua as parseAction,
6819
+ Da as parseAction,
6786
6820
  nu as switchOrAddNetwork
6787
6821
  };