@dhedge/trading-widget 6.3.3 → 6.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
- import { hyperEvm as W, mainnet as I, polygon as st, optimism as at, base as rt, arbitrum as ot } from "wagmi/chains";
2
- import { aq as it, ao as ct, ap as ut, a as R, q as N, ar as dt, as as pt, a5 as lt, ak as mt, a3 as yt, b as gt, ae as At, Z as k, aj as Et, at as q, e as ht, d as ft, M as St, R as Tt, P as wt, au as _t, av as bt, Q as Dt, N as It, ah as _, _ as Rt, W as Nt, X as Ot, U as Ct, aw as V, ax as xt, ay as Bt, az as Lt, aA as Mt, aB as Pt, ad as Ut } from "./gmx-Cyz_GmV5.js";
1
+ import { hyperEvm as H, mainnet as I, polygon as at, optimism as rt, base as ot, arbitrum as it } from "wagmi/chains";
2
+ import { aq as ct, ao as ut, ap as dt, a as R, q as N, ar as pt, as as lt, a5 as mt, ak as yt, a3 as At, b as gt, ae as Et, Z as k, aj as ht, at as V, e as ft, d as St, M as Tt, R as wt, P as _t, au as bt, av as Dt, Q as It, N as Rt, ah as _, _ as Nt, W as Ot, X as Ct, U as xt, aw as q, ax as Bt, ay as Lt, az as Mt, aA as Pt, aB as Ut, ad as $t } from "./gmx-Cyz_GmV5.js";
3
3
  import d from "bignumber.js";
4
- import { zeroHash as $t, bytesToHex as vt, pad as Ft, stringToHex as O, encodeAbiParameters as T, encodeFunctionData as A, maxUint256 as w, erc20Abi as K } from "viem";
5
- const x = "application/json";
4
+ import { zeroHash as vt, bytesToHex as Ft, pad as Yt, stringToHex as O, encodeAbiParameters as T, encodeFunctionData as g, maxUint256 as w, erc20Abi as K } from "viem";
5
+ const B = "application/json";
6
6
  class j extends Error {
7
- constructor(e, n, s) {
8
- super(`HTTP ${e}${s ? `: ${s}` : ""}`), this.name = "FetchRequestError", this.status = e, this.statusText = n, this.body = s;
7
+ constructor(e, s, n) {
8
+ super(`HTTP ${e}${n ? `: ${n}` : ""}`), this.name = "FetchRequestError", this.status = e, this.statusText = s, this.body = n;
9
9
  }
10
10
  }
11
- const Ke = (t) => {
11
+ const Xe = (t) => {
12
12
  if (!(t instanceof j) || !t.body)
13
13
  return null;
14
14
  try {
@@ -16,43 +16,43 @@ const Ke = (t) => {
16
16
  } catch {
17
17
  return null;
18
18
  }
19
- }, Yt = (t) => typeof t == "string" || t instanceof FormData || t instanceof URLSearchParams || t instanceof Blob || t instanceof ArrayBuffer || ArrayBuffer.isView(t), Gt = (t, e) => {
20
- const n = String(t), s = e ? new URLSearchParams(e).toString() : "";
21
- if (!s)
22
- return n;
23
- const a = n.indexOf("#"), r = a === -1 ? n : n.slice(0, a), o = a === -1 ? "" : n.slice(a);
24
- return `${r}${r.includes("?") ? "&" : "?"}${s}${o}`;
19
+ }, Gt = (t) => typeof t == "string" || t instanceof FormData || t instanceof URLSearchParams || t instanceof Blob || t instanceof ArrayBuffer || ArrayBuffer.isView(t), Wt = (t, e) => {
20
+ const s = String(t), n = e ? new URLSearchParams(e).toString() : "";
21
+ if (!n)
22
+ return s;
23
+ const a = s.indexOf("#"), r = a === -1 ? s : s.slice(0, a), o = a === -1 ? "" : s.slice(a);
24
+ return `${r}${r.includes("?") ? "&" : "?"}${n}${o}`;
25
25
  }, Ht = (t, e) => {
26
- const n = new AbortController(), s = () => n.abort();
27
- e?.aborted && s();
28
- const a = setTimeout(s, t);
29
- return e?.addEventListener("abort", s), {
30
- signal: n.signal,
26
+ const s = new AbortController(), n = () => s.abort();
27
+ e?.aborted && n();
28
+ const a = setTimeout(n, t);
29
+ return e?.addEventListener("abort", n), {
30
+ signal: s.signal,
31
31
  cleanup: () => {
32
- clearTimeout(a), e?.removeEventListener("abort", s);
32
+ clearTimeout(a), e?.removeEventListener("abort", n);
33
33
  }
34
34
  };
35
- }, Wt = async (t, e, n) => {
36
- if (n === void 0)
35
+ }, kt = async (t, e, s) => {
36
+ if (s === void 0)
37
37
  return await t[e]();
38
- const s = Number(t.headers.get("content-length"));
39
- if (s > n)
40
- throw new Error(`Response too large: ${s} bytes`);
38
+ const n = Number(t.headers.get("content-length"));
39
+ if (n > s)
40
+ throw new Error(`Response too large: ${n} bytes`);
41
41
  if (e === "blob" || e === "arrayBuffer") {
42
42
  const r = await t[e](), o = r instanceof Blob ? r.size : r.byteLength;
43
- if (o > n)
43
+ if (o > s)
44
44
  throw new Error(`Response too large: ${o} bytes`);
45
45
  return r;
46
46
  }
47
47
  const a = await t.text();
48
- if (a.length > n)
48
+ if (a.length > s)
49
49
  throw new Error(`Response too large: ${a.length} chars`);
50
50
  return e === "json" ? JSON.parse(a) : a;
51
- }, kt = async ({
51
+ }, Vt = async ({
52
52
  url: t,
53
53
  headers: e,
54
- method: n,
55
- body: s,
54
+ method: s,
55
+ body: n,
56
56
  params: a,
57
57
  signal: r,
58
58
  readMethod: o = "json",
@@ -60,24 +60,24 @@ const Ke = (t) => {
60
60
  timeoutMs: i,
61
61
  maxResponseBytes: u
62
62
  }) => {
63
- const l = s !== void 0 && n !== "GET", g = l && !Yt(s), m = new Headers(e);
64
- o === "json" && !m.has("Accept") && m.set("Accept", x), g && !m.has("Content-Type") && m.set("Content-Type", x);
63
+ const l = n !== void 0 && s !== "GET", A = l && !Gt(n), m = new Headers(e);
64
+ o === "json" && !m.has("Accept") && m.set("Accept", B), A && !m.has("Content-Type") && m.set("Content-Type", B);
65
65
  const f = i ? Ht(i, r) : void 0, nt = {
66
- method: n,
66
+ method: s,
67
67
  headers: m,
68
68
  signal: f?.signal ?? r,
69
69
  ...c && { cache: c },
70
- ...l && { body: g ? JSON.stringify(s) : s }
70
+ ...l && { body: A ? JSON.stringify(n) : n }
71
71
  };
72
72
  try {
73
- const E = await fetch(Gt(t, a), nt);
73
+ const E = await fetch(Wt(t, a), nt);
74
74
  if (!E.ok)
75
75
  throw new j(E.status, E.statusText, await E.text().catch(() => ""));
76
- return await Wt(E, o, u);
76
+ return await kt(E, o, u);
77
77
  } finally {
78
78
  f?.cleanup();
79
79
  }
80
- }, je = typeof window < "u", Xe = [
80
+ }, ze = typeof window < "u", Qe = [
81
81
  {
82
82
  inputs: [
83
83
  { internalType: "address", name: "_pool", type: "address" },
@@ -128,7 +128,7 @@ const Ke = (t) => {
128
128
  { name: "amountOutMinimum", type: "uint256" }
129
129
  ]
130
130
  }
131
- ], Vt = [
131
+ ], Kt = [
132
132
  { name: "asset", type: "address" },
133
133
  { name: "amount", type: "uint256" },
134
134
  { name: "assetType", type: "uint16" },
@@ -139,7 +139,7 @@ const Ke = (t) => {
139
139
  { name: "tokenId", type: "uint256" },
140
140
  { name: "debtKey", type: "uint248" },
141
141
  { name: "shares", type: "uint256" }
142
- ], ze = [
142
+ ], Ze = [
143
143
  {
144
144
  inputs: [
145
145
  { internalType: "address", name: "_pool", type: "address" },
@@ -150,7 +150,7 @@ const Ke = (t) => {
150
150
  {
151
151
  name: "assetData",
152
152
  type: "tuple[]",
153
- components: Vt
153
+ components: Kt
154
154
  }
155
155
  ],
156
156
  stateMutability: "nonpayable",
@@ -205,7 +205,7 @@ const Ke = (t) => {
205
205
  stateMutability: "nonpayable",
206
206
  type: "function"
207
207
  }
208
- ], Kt = [
208
+ ], jt = [
209
209
  {
210
210
  inputs: [
211
211
  { name: "tokenIn", type: "address" },
@@ -234,7 +234,7 @@ const Ke = (t) => {
234
234
  stateMutability: "nonpayable",
235
235
  type: "function"
236
236
  }
237
- ], jt = [
237
+ ], Xt = [
238
238
  {
239
239
  type: "tuple",
240
240
  components: [
@@ -288,62 +288,62 @@ const Ke = (t) => {
288
288
  ...t.selectorErrors,
289
289
  ...D.selectorErrors
290
290
  }
291
- }), Xt = [
291
+ }), zt = [
292
292
  "https://cdn.jsdelivr.net/gh/dhedge/V2-Public@master/readmes/errorCodes/registry.json",
293
293
  "https://raw.githubusercontent.com/dhedge/V2-Public/master/readmes/errorCodes/registry.json"
294
- ], zt = 1, Qt = 1e4, Zt = 2e6, Jt = 2e3, te = 500, ee = 120, ne = 300, se = 4, ae = /^dh\d{1,3}$/i, z = /[\u0000-\u001f\u007f]/, re = /https?:\/\/|[<>`]/i, oe = (t) => t.length <= ee && !z.test(t) && (ae.test(t) || t.length >= se), h = (t) => typeof t == "string" && t.length > 0 && t.length <= ne && !z.test(t) && !re.test(t);
294
+ ], Qt = 1, Zt = 1e4, Jt = 2e6, te = 2e3, ee = 500, se = 120, ne = 300, ae = 4, re = /^dh\d{1,3}$/i, z = /[\u0000-\u001f\u007f]/, oe = /https?:\/\/|[<>`]/i, ie = (t) => t.length <= se && !z.test(t) && (re.test(t) || t.length >= ae), h = (t) => typeof t == "string" && t.length > 0 && t.length <= ne && !z.test(t) && !oe.test(t);
295
295
  let Q = D, b = null;
296
- const Z = () => Q, ie = (t) => {
296
+ const Z = () => Q, ce = (t) => {
297
297
  Q = X(t);
298
- }, ce = (t) => {
298
+ }, ue = (t) => {
299
299
  const e = t;
300
- if (e?.schemaVersion !== zt)
300
+ if (e?.schemaVersion !== Qt)
301
301
  throw new Error(
302
302
  `Unsupported error registry schemaVersion: ${String(e?.schemaVersion)}`
303
303
  );
304
- const n = {};
305
- for (const [a, r] of Object.entries(e.stringErrors ?? {}))
306
- r?.curated === !0 && oe(a) && h(r.description) && h(r.action) && (n[a] = { title: r.description, hint: r.action });
307
304
  const s = {};
305
+ for (const [a, r] of Object.entries(e.stringErrors ?? {}))
306
+ r?.curated === !0 && ie(a) && h(r.description) && h(r.action) && (s[a] = { title: r.description, hint: r.action });
307
+ const n = {};
308
308
  for (const [a, r] of Object.entries(e.selectorErrors ?? {}))
309
- r?.curated === !0 && /^0x[0-9a-f]{8}$/.test(a) && h(r.signature) && h(r.description) && h(r.action) && (s[a] = {
309
+ r?.curated === !0 && /^0x[0-9a-f]{8}$/.test(a) && h(r.signature) && h(r.description) && h(r.action) && (n[a] = {
310
310
  signature: r.signature,
311
311
  title: r.description,
312
312
  hint: r.action
313
313
  });
314
- if (!Object.keys(n).length)
314
+ if (!Object.keys(s).length)
315
315
  throw new Error("Error registry contained no curated string errors");
316
- if (Object.keys(n).length > Jt || Object.keys(s).length > te)
316
+ if (Object.keys(s).length > te || Object.keys(n).length > ee)
317
317
  throw new Error("Error registry exceeded expected entry counts");
318
- return { stringErrors: n, selectorErrors: s };
319
- }, ue = async ({
320
- timeoutMs: t = Qt
318
+ return { stringErrors: s, selectorErrors: n };
319
+ }, de = async ({
320
+ timeoutMs: t = Zt
321
321
  } = {}) => {
322
322
  const e = [];
323
- for (const n of Xt)
323
+ for (const s of zt)
324
324
  try {
325
- const s = await kt({
326
- url: n,
325
+ const n = await Vt({
326
+ url: s,
327
327
  method: "GET",
328
328
  timeoutMs: t,
329
- maxResponseBytes: Zt
329
+ maxResponseBytes: Jt
330
330
  });
331
- return X(ce(s));
332
- } catch (s) {
331
+ return X(ue(n));
332
+ } catch (n) {
333
333
  e.push(
334
- `${n}: ${s instanceof Error ? s.message : String(s)}`
334
+ `${s}: ${n instanceof Error ? n.message : String(n)}`
335
335
  );
336
336
  }
337
337
  throw new Error(`All error registry sources failed: ${e.join("; ")}`);
338
- }, Qe = () => (b ?? (b = ue().then(ie).catch(() => {
338
+ }, Je = () => (b ?? (b = de().then(ce).catch(() => {
339
339
  b = null;
340
- })), b), de = () => typeof window < "u";
341
- function pe() {
342
- return de() && typeof window.ethereum < "u";
340
+ })), b), pe = () => typeof window < "u";
341
+ function le() {
342
+ return pe() && typeof window.ethereum < "u";
343
343
  }
344
- async function Ze(t) {
344
+ async function ts(t) {
345
345
  try {
346
- if (pe())
346
+ if (le())
347
347
  return window.ethereum.request({
348
348
  method: "wallet_watchAsset",
349
349
  params: {
@@ -356,7 +356,7 @@ async function Ze(t) {
356
356
  }
357
357
  return !1;
358
358
  }
359
- const p = (t, e) => t?.toLowerCase() === e?.toLowerCase(), Je = (t) => p(t, it), S = (t) => {
359
+ const p = (t, e) => t?.toLowerCase() === e?.toLowerCase(), es = (t) => p(t, ct), S = (t) => {
360
360
  if (!t) throw new Error("Cannot prefix an empty hex value");
361
361
  return t.startsWith("0x") ? t : `0x${t}`;
362
362
  }, y = (t, e) => {
@@ -365,40 +365,40 @@ const p = (t, e) => t?.toLowerCase() === e?.toLowerCase(), Je = (t) => p(t, it),
365
365
  } catch {
366
366
  throw new Error(`Cannot convert "${e}" value "${t}" to bigint`);
367
367
  }
368
- }, B = (t) => t ? Ft(S(t), { size: 32 }) : $t, le = (t) => {
368
+ }, L = (t) => t ? Yt(S(t), { size: 32 }) : vt, me = (t) => {
369
369
  if (!t) throw new Error("Cannot decode an empty base64 string");
370
- return vt(Uint8Array.from(atob(t), (e) => e.charCodeAt(0)));
371
- }, me = (t, e) => ut[e]?.[t] ?? R, tn = (t) => ct[t], en = (t) => t && `${t.substring(0, 6)}...${t.substring(
370
+ return Ft(Uint8Array.from(atob(t), (e) => e.charCodeAt(0)));
371
+ }, ye = (t, e) => dt[e]?.[t] ?? R, ss = (t) => ut[t], ns = (t) => t && `${t.substring(0, 6)}...${t.substring(
372
372
  t.length - 4,
373
373
  t.length
374
- )}`, nn = ({
374
+ )}`, as = ({
375
375
  address: t,
376
376
  chainId: e
377
377
  }) => {
378
- const n = me(
378
+ const s = ye(
379
379
  "aaveLendingPoolV3",
380
380
  e
381
381
  );
382
- return p(t, n);
383
- }, ye = ({
382
+ return p(t, s);
383
+ }, Ae = ({
384
384
  sourceAddress: t,
385
385
  amount: e
386
- }) => `${t}_${e}`, sn = (t, e) => {
387
- const n = t.slice(0, e), s = t.slice(e);
388
- return { firstPart: n, secondPart: s };
389
- }, ge = (t, e) => t / e * 100, an = (t) => t < 1 ? 4 : t < 10 ? 3 : 2, rn = (t, e = N) => new d(t.toString()).shiftedBy(e).toFixed(0), on = (t, e, n, s) => new d(e).dividedBy(n).multipliedBy(t).shiftedBy(-(s || N)).toNumber(), cn = (t) => BigInt(
386
+ }) => `${t}_${e}`, rs = (t, e) => {
387
+ const s = t.slice(0, e), n = t.slice(e);
388
+ return { firstPart: s, secondPart: n };
389
+ }, ge = (t, e) => t / e * 100, os = (t) => t < 1 ? 4 : t < 10 ? 3 : 2, is = (t, e = N) => new d(t.toString()).shiftedBy(e).toFixed(0), cs = (t, e, s, n) => new d(e).dividedBy(s).multipliedBy(t).shiftedBy(-(n || N)).toNumber(), us = (t) => BigInt(
390
390
  new d(t || "0").shiftedBy(N).toFixed(0, d.ROUND_DOWN)
391
391
  ), J = (t) => {
392
- const e = new d(0.01), n = new d(t), s = !n.isZero() && n.lt(e) ? e : n;
393
- return BigInt(s.multipliedBy(100).toFixed(0));
394
- }, un = ({
392
+ const e = new d(0.01), s = new d(t), n = !s.isZero() && s.lt(e) ? e : s;
393
+ return BigInt(n.multipliedBy(100).toFixed(0));
394
+ }, ds = ({
395
395
  chainId: t,
396
396
  slippage: e
397
- }) => t === W.id ? BigInt(0) : J(e), dn = ({
397
+ }) => t === H.id ? BigInt(0) : J(e), ps = ({
398
398
  vaultAddress: t,
399
399
  swapData: e,
400
- sendTokenAddress: n,
401
- sendTokenAmount: s,
400
+ sendTokenAddress: s,
401
+ sendTokenAmount: n,
402
402
  vaultDepositTokenAddress: a,
403
403
  minVaultTokensReceivedAmount: r,
404
404
  routerKey: o = "ONE_INCH",
@@ -406,26 +406,26 @@ const p = (t, e) => t?.toLowerCase() === e?.toLowerCase(), Je = (t) => p(t, it),
406
406
  swapSlippage: i
407
407
  }) => {
408
408
  const u = new d(c).multipliedBy(1 - i / 100).toFixed(0), l = [O(o, { size: 32 }), e];
409
- return [t, [[n, s, l], [a, u]], r];
410
- }, pn = ({
409
+ return [t, [[s, n, l], [a, u]], r];
410
+ }, ls = ({
411
411
  receiveAssetAddress: t,
412
412
  assets: e,
413
- swapData: n,
414
- slippage: s
413
+ swapData: s,
414
+ slippage: n
415
415
  }) => {
416
416
  const a = {
417
417
  srcData: [],
418
418
  destAmount: new d("0")
419
419
  }, { srcData: r, destAmount: o } = e?.reduce((c, i) => {
420
- const u = n?.[i.address];
420
+ const u = s?.[i.address];
421
421
  if (!u)
422
422
  return c;
423
423
  const l = [
424
424
  O(u.routerKey, { size: 32 }),
425
425
  u.rawTransaction.data
426
- ], g = [i.address, i.rawBalance, l];
426
+ ], A = [i.address, i.rawBalance, l];
427
427
  return {
428
- srcData: [...c.srcData, g],
428
+ srcData: [...c.srcData, A],
429
429
  destAmount: c.destAmount.plus(u.destinationAmount)
430
430
  };
431
431
  }, a) ?? a;
@@ -433,78 +433,78 @@ const p = (t, e) => t?.toLowerCase() === e?.toLowerCase(), Je = (t) => p(t, it),
433
433
  r,
434
434
  [
435
435
  t,
436
- o.times(1 - s / 100).toFixed(0, d.ROUND_DOWN)
436
+ o.times(1 - n / 100).toFixed(0, d.ROUND_DOWN)
437
437
  ]
438
438
  ];
439
- }, Ae = ({
439
+ }, Ee = ({
440
440
  assetAddress: t,
441
441
  swapQuotes: e,
442
- swapParams: n,
443
- slippageToleranceForContractTransaction: s,
442
+ swapParams: s,
443
+ slippageToleranceForContractTransaction: n,
444
444
  routerKey: a
445
445
  }) => {
446
- if (!n)
446
+ if (!s)
447
447
  return {
448
448
  supportedAsset: t,
449
449
  withdrawData: "",
450
450
  slippageTolerance: BigInt(0)
451
451
  };
452
- const { srcData: r, dstData: o } = n, c = r.map(({ asset: l, amount: g }) => {
453
- const m = e?.[ye({
452
+ const { srcData: r, dstData: o } = s, c = r.map(({ asset: l, amount: A }) => {
453
+ const m = e?.[Ae({
454
454
  sourceAddress: l,
455
- amount: g.toString()
455
+ amount: A.toString()
456
456
  })]?.find((f) => f.routerKey === a);
457
457
  return {
458
458
  asset: l,
459
- amount: g,
459
+ amount: A,
460
460
  swapData: {
461
461
  routerKey: O(m?.routerKey ?? "", { size: 32 }),
462
462
  txData: m?.rawTransaction.data ?? "0x"
463
463
  }
464
464
  };
465
465
  }), i = T(
466
- dt,
466
+ pt,
467
467
  [c]
468
- ), u = T(pt, [
468
+ ), u = T(lt, [
469
469
  {
470
470
  encodedSrcData: i,
471
471
  dstData: {
472
472
  dstAddress: o.asset,
473
473
  dstAmount: o.amount
474
474
  },
475
- slippage: s
475
+ slippage: n
476
476
  }
477
477
  ]);
478
478
  return {
479
479
  supportedAsset: t,
480
480
  withdrawData: u,
481
- slippageTolerance: s
481
+ slippageTolerance: n
482
482
  };
483
- }, ln = ({
483
+ }, ms = ({
484
484
  chainId: t,
485
485
  txHash: e,
486
- error: n
486
+ error: s
487
487
  }) => {
488
- if (t !== I.id || !e || !n)
488
+ if (t !== I.id || !e || !s)
489
489
  return !1;
490
- const s = n instanceof Error ? n.message : String(n);
491
- return /\bNo Result\b/i.test(s);
492
- }, mn = ({
490
+ const n = s instanceof Error ? s.message : String(s);
491
+ return /\bNo Result\b/i.test(n);
492
+ }, ys = ({
493
493
  chainId: t,
494
494
  action: e,
495
- isRabbyWallet: n
496
- }) => e === "update_ondo_prices" && t === I.id && n ? lt : t ? mt[t] ?? 0 : 0, yn = (t, e) => gt[e]?.nativeTokenSymbol === t, gn = ({
495
+ isRabbyWallet: s
496
+ }) => e === "update_ondo_prices" && t === I.id && s ? mt : t ? yt[t] ?? 0 : 0, As = (t, e) => gt[e]?.nativeTokenSymbol === t, gs = ({
497
497
  nativeTokenBalance: t,
498
498
  tokenDecimals: e,
499
- gasPrice: n
499
+ gasPrice: s
500
500
  }) => {
501
- const s = new d(n).multipliedBy(yt).shiftedBy(-e), a = new d(t).minus(
502
- s
501
+ const n = new d(s).multipliedBy(At).shiftedBy(-e), a = new d(t).minus(
502
+ n
503
503
  );
504
504
  return a.gt("0") ? a : new d("0");
505
- }, An = (t) => At.includes(t), En = (t) => {
505
+ }, Es = (t) => Et.includes(t), hs = (t) => {
506
506
  const e = Object.values(t).reduce(
507
- (n, { type: s }) => (n[s] = n[s] + 1, n),
507
+ (s, { type: n }) => (s[n] = s[n] + 1, s),
508
508
  { string: 0, number: 0 }
509
509
  );
510
510
  if (e.string > 10)
@@ -512,198 +512,198 @@ const p = (t, e) => t?.toLowerCase() === e?.toLowerCase(), Je = (t) => p(t, it),
512
512
  if (e.number > 40)
513
513
  throw new Error("logger params must contain up to 40 numeric values");
514
514
  return !0;
515
- }, Ee = (t, e = 150) => t.length > e ? t.substring(0, e) : t, tt = () => ({
515
+ }, he = (t, e = 150) => t.length > e ? t.substring(0, e) : t, tt = () => ({
516
516
  ...Z().stringErrors,
517
- ...Et
518
- }), he = () => [
517
+ ...ht
518
+ }), fe = () => [
519
519
  ...Object.keys(tt()),
520
520
  ...Object.keys(k)
521
- ], fe = /^dh\d+$/i, Se = (t, e) => fe.test(e) ? new RegExp(`\\b${e}\\b`, "i").test(t) : t.includes(e.toLowerCase()), L = (t, e) => {
522
- const n = t.toLowerCase();
523
- return [...e ?? he()].sort((s, a) => a.length - s.length).find((s) => Se(n, s));
524
- }, M = (t) => tt()[t] ?? k[t], Te = /\b0x[0-9a-f]{8}\b/i, we = (t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), _e = (t) => {
525
- const { selectorErrors: e } = Z(), n = t.match(Te)?.[0]?.toLowerCase(), s = n ? e[n] : void 0;
526
- if (s)
527
- return { title: s.title, hint: s.hint };
521
+ ], Se = /^dh\d+$/i, Te = (t, e) => Se.test(e) ? new RegExp(`\\b${e}\\b`, "i").test(t) : t.includes(e.toLowerCase()), M = (t, e) => {
522
+ const s = t.toLowerCase();
523
+ return [...e ?? fe()].sort((n, a) => a.length - n.length).find((n) => Te(s, n));
524
+ }, P = (t) => tt()[t] ?? k[t], we = /\b0x[0-9a-f]{8}\b/i, _e = (t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), be = (t) => {
525
+ const { selectorErrors: e } = Z(), s = t.match(we)?.[0]?.toLowerCase(), n = s ? e[s] : void 0;
526
+ if (n)
527
+ return { title: n.title, hint: n.hint };
528
528
  const a = Object.values(e).find(
529
529
  (r) => new RegExp(
530
- `\\b${we(r.signature.split("(")[0] ?? "")}\\b`
530
+ `\\b${_e(r.signature.split("(")[0] ?? "")}\\b`
531
531
  ).test(t)
532
532
  );
533
533
  return a ? { title: a.title, hint: a.hint } : void 0;
534
- }, hn = ({
534
+ }, fs = ({
535
535
  errorMessage: t,
536
536
  abiErrors: e
537
537
  }) => {
538
538
  if (!t || t.includes("User rejected"))
539
539
  return null;
540
- const n = e.find((o) => t.includes(o));
541
- if (n) {
542
- const o = L(n);
540
+ const s = e.find((o) => t.includes(o));
541
+ if (s) {
542
+ const o = M(s);
543
543
  if (o)
544
- return M(o);
544
+ return P(o);
545
545
  }
546
- const s = L(t);
547
- if (s)
548
- return M(s);
549
- const a = _e(t);
546
+ const n = M(t);
547
+ if (n)
548
+ return P(n);
549
+ const a = be(t);
550
550
  if (a)
551
551
  return a;
552
- const [r] = t.split(n ? "." : "Contract").map((o) => o.trim());
552
+ const [r] = t.split(s ? "." : "Contract").map((o) => o.trim());
553
553
  return {
554
554
  title: "Transaction failed",
555
- hint: `${Ee(r ?? "")} ${n ? `: ${n}` : ""}`
555
+ hint: `${he(r ?? "")} ${s ? `: ${s}` : ""}`
556
556
  };
557
- }, fn = (t) => typeof t == "number" && Number.isFinite(t), Sn = (t) => typeof t == "bigint" && t !== BigInt(0), be = (t, e = q) => new d(t).shiftedBy(-e).toNumber(), De = (t) => !isNaN(parseFloat(t)) && !isNaN(t), Ie = ({
557
+ }, Ss = (t) => typeof t == "number" && Number.isFinite(t), Ts = (t) => typeof t == "bigint" && t !== BigInt(0), De = (t, e = V) => new d(t).shiftedBy(-e).toNumber(), Ie = (t) => !isNaN(parseFloat(t)) && !isNaN(t), Re = ({
558
558
  value: t,
559
559
  minimumFractionDigits: e = 2,
560
- maximumFractionDigits: n = 2,
561
- compact: s = !1,
560
+ maximumFractionDigits: s = 2,
561
+ compact: n = !1,
562
562
  normalize: a = !1
563
563
  }) => new Intl.NumberFormat("en-US", {
564
564
  style: "currency",
565
565
  currency: "USD",
566
- notation: s ? "compact" : void 0,
566
+ notation: n ? "compact" : void 0,
567
567
  minimumFractionDigits: e,
568
- maximumFractionDigits: n
569
- }).format(a ? be(t) : Number(t)), P = (t) => De(t) ? new d(t).toFixed() : "", U = ["₀", "₁", "₂", "₃", "₄", "₅", "₆", "₇", "₈", "₉"], Re = ({
568
+ maximumFractionDigits: s
569
+ }).format(a ? De(t) : Number(t)), U = (t) => Ie(t) ? new d(t).toFixed() : "", $ = ["₀", "₁", "₂", "₃", "₄", "₅", "₆", "₇", "₈", "₉"], Ne = ({
570
570
  value: t,
571
571
  decimals: e = 4
572
572
  }) => {
573
- const n = new d(t);
574
- if (n.isGreaterThan(1) || n.isZero())
575
- return P(n.toFixed(e));
576
- const a = (/e/i.test(t.toString()) ? parseFloat(t.toString()).toFixed(q) : t.toString()).match(/^0\.(0+)(\d+)$/);
573
+ const s = new d(t);
574
+ if (s.isGreaterThan(1) || s.isZero())
575
+ return U(s.toFixed(e));
576
+ const a = (/e/i.test(t.toString()) ? parseFloat(t.toString()).toFixed(V) : t.toString()).match(/^0\.(0+)(\d+)$/);
577
577
  if (a) {
578
578
  const [, r, o] = a;
579
- if (r.length >= e && r.length < U.length)
580
- return `0.0${U[r.length]}${o.slice(0, 3)}`;
579
+ if (r.length >= e && r.length < $.length)
580
+ return `0.0${$[r.length]}${o.slice(0, 3)}`;
581
581
  }
582
- return P(n.toFixed(e));
583
- }, Ne = (t, e = 0) => `${t.toLocaleString("en-US", { maximumFractionDigits: e })}%`, Tn = (t) => t.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","), wn = (t, e, n = 0) => {
584
- const s = ge(+t, e);
585
- return Ne(s, n);
586
- }, _n = ({
582
+ return U(s.toFixed(e));
583
+ }, Oe = (t, e = 0) => `${t.toLocaleString("en-US", { maximumFractionDigits: e })}%`, ws = (t) => t.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","), _s = (t, e, s = 0) => {
584
+ const n = ge(+t, e);
585
+ return Oe(n, s);
586
+ }, bs = ({
587
587
  currency: t,
588
588
  value: e
589
- }) => t === "USD" ? Ie({ value: e }) : `${ht[t]} ${Re({
589
+ }) => t === "USD" ? Re({ value: e }) : `${ft[t]} ${Ne({
590
590
  value: e,
591
- decimals: ft[t]
592
- })}`, Oe = (t, e) => new d(
591
+ decimals: St[t]
592
+ })}`, Ce = (t, e) => new d(
593
593
  new d(t).toFixed(e, d.ROUND_DOWN)
594
- ).toString(), Ce = (t, e = 3, n = 2) => {
594
+ ).toString(), xe = (t, e = 3, s = 2) => {
595
595
  if (t.length <= 5)
596
596
  return t;
597
- const s = "...";
598
- return t.length <= e + n + s.length ? t : `${t.slice(0, e)}${s}${t.slice(-n)}`;
599
- }, bn = ({
597
+ const n = "...";
598
+ return t.length <= e + s + n.length ? t : `${t.slice(0, e)}${n}${t.slice(-s)}`;
599
+ }, Ds = ({
600
600
  balance: t,
601
601
  symbol: e,
602
- precision: n,
603
- truncateSymbol: s
604
- }) => `${Oe(t, n)} ${s ? Ce(e) : e}`, Dn = (t) => {
602
+ precision: s,
603
+ truncateSymbol: n
604
+ }) => `${Ce(t, s)} ${n ? xe(e) : e}`, Is = (t) => {
605
605
  if (!t)
606
606
  return;
607
607
  const e = t.match(/0x[a-fA-F0-9]{64}/);
608
608
  if (!e)
609
609
  return;
610
- const n = e[0];
611
- return `${n.slice(0, 4)}...${n.slice(-3)}`;
612
- }, In = (t) => p(_t, t) || p(bt, t), Rn = (t) => It.some(
610
+ const s = e[0];
611
+ return `${s.slice(0, 4)}...${s.slice(-3)}`;
612
+ }, Rs = (t) => p(bt, t) || p(Dt, t), Ns = (t) => Rt.some(
613
613
  (e) => p(e, t)
614
- ), Nn = (t) => St[t.toLowerCase()] ?? {
614
+ ), Os = (t) => Tt[t.toLowerCase()] ?? {
615
615
  symbol: "",
616
616
  decimals: 18,
617
617
  address: R
618
- }, On = (t) => p(t, Dt) ? Tt : wt, xe = (t) => `eth_${t}`, Cn = ({
618
+ }, Cs = (t) => p(t, It) ? wt : _t, Be = (t) => `eth_${t}`, xs = ({
619
619
  action: t,
620
620
  log: e,
621
- symbol: n,
622
- vaultAddress: s,
621
+ symbol: s,
622
+ vaultAddress: n,
623
623
  chainId: a
624
624
  }) => {
625
625
  const r = {
626
- [_.SYMBOL.NAME]: n,
626
+ [_.SYMBOL.NAME]: s,
627
627
  [_.CHAIN_ID.NAME]: a,
628
- [_.ADDRESS.NAME]: xe(s)
628
+ [_.ADDRESS.NAME]: Be(n)
629
629
  };
630
- Rt[t].forEach((o) => {
630
+ Nt[t].forEach((o) => {
631
631
  e?.(o, r);
632
632
  });
633
- }, xn = (t) => Ct.some((e) => p(e, t)), Bn = (t) => Nt[t.toLowerCase()] ?? {
633
+ }, Bs = (t) => xt.some((e) => p(e, t)), Ls = (t) => Ot[t.toLowerCase()] ?? {
634
634
  symbol: "",
635
635
  decimals: 18,
636
636
  address: R
637
- }, Ln = (t) => Ot[t.toLowerCase()], Be = "0x3333333333333333333333333333333333333333";
638
- ot.id + "", Pt.address, rt.id + "", Mt.address, at.id + "", Lt.address, st.id + "", Bt.address, I.id + "", xt.address, W.id + "", V.address;
639
- const Le = "0x2222222222222222222222222222222222222222", $ = BigInt("0x2000000000000000000000000000000000000000"), Me = 10000n, Pe = (t) => p(t, Be), Ue = (t) => {
640
- if (p(t, Le))
637
+ }, Ms = (t) => Ct[t.toLowerCase()], Le = "0x3333333333333333333333333333333333333333";
638
+ it.id + "", Ut.address, ot.id + "", Pt.address, rt.id + "", Mt.address, at.id + "", Lt.address, I.id + "", Bt.address, H.id + "", q.address;
639
+ const Me = "0x2222222222222222222222222222222222222222", v = BigInt("0x2000000000000000000000000000000000000000"), Pe = 10000n, Ue = (t) => p(t, Le), $e = (t) => {
640
+ if (p(t, Me))
641
641
  return !0;
642
642
  try {
643
643
  const e = BigInt(t);
644
- return e >= $ && e < $ + Me;
644
+ return e >= v && e < v + Pe;
645
645
  } catch {
646
646
  return !1;
647
647
  }
648
- }, Mn = (t) => Pe(t) || Ue(t), Pn = () => V, Un = /* @__PURE__ */ new Map(), et = (t, e) => !e || e.size === 0 ? t : t.map((n) => {
649
- const s = e.get(
650
- n.supportedAsset.toLowerCase()
648
+ }, Ps = (t) => Ue(t) || $e(t), Us = () => q, $s = /* @__PURE__ */ new Map(), et = (t, e) => !e || e.size === 0 ? t : t.map((s) => {
649
+ const n = e.get(
650
+ s.supportedAsset.toLowerCase()
651
651
  );
652
- return s ? {
653
- ...n,
654
- withdrawData: s.withdrawData,
655
- slippageTolerance: s.slippageTolerance
656
- } : n;
657
- }), $e = (t) => {
652
+ return n ? {
653
+ ...s,
654
+ withdrawData: n.withdrawData,
655
+ slippageTolerance: n.slippageTolerance
656
+ } : s;
657
+ }), ve = (t) => {
658
658
  const e = t.find(
659
- ({ swapQuotes: n }) => n
659
+ ({ swapQuotes: s }) => s
660
660
  );
661
661
  return e?.swapQuotes ? Object.values(e.swapQuotes)[0]?.map(
662
- ({ routerKey: n }) => n
662
+ ({ routerKey: s }) => s
663
663
  ) ?? [] : [];
664
- }, ve = (t, e, n) => t.map(({ asset: s, swapParams: a, swapQuotes: r }) => !a || !r ? {
665
- supportedAsset: s,
664
+ }, Fe = (t, e, s) => t.map(({ asset: n, swapParams: a, swapQuotes: r }) => !a || !r ? {
665
+ supportedAsset: n,
666
666
  withdrawData: "",
667
- slippageTolerance: n
668
- } : Ae({
669
- assetAddress: s,
667
+ slippageTolerance: s
668
+ } : Ee({
669
+ assetAddress: n,
670
670
  swapQuotes: r,
671
671
  swapParams: a,
672
- slippageToleranceForContractTransaction: n,
672
+ slippageToleranceForContractTransaction: s,
673
673
  routerKey: e
674
- })), Fe = async (t, e, n, s, a, r) => {
674
+ })), Ye = async (t, e, s, n, a, r) => {
675
675
  for (const o of t) {
676
676
  const c = et(
677
- ve(
677
+ Fe(
678
678
  e,
679
679
  o,
680
- n
680
+ s
681
681
  ),
682
682
  r
683
- ), { error: i } = await s(...a, c);
683
+ ), { error: i } = await n(...a, c);
684
684
  if (!i)
685
685
  return c;
686
686
  }
687
687
  return null;
688
- }, $n = (t, e, n) => {
689
- const s = (t ?? []).map((a) => ({
688
+ }, vs = (t, e, s) => {
689
+ const n = (t ?? []).map((a) => ({
690
690
  supportedAsset: a,
691
691
  withdrawData: "",
692
692
  slippageTolerance: e
693
693
  }));
694
- return et(s, n);
695
- }, vn = async (t, e, n, s, a) => {
694
+ return et(n, s);
695
+ }, Fs = async (t, e, s, n, a) => {
696
696
  for (const r of t) {
697
697
  const o = J(r);
698
698
  try {
699
- const c = await e(r), i = $e(
699
+ const c = await e(r), i = ve(
700
700
  c
701
- ), u = await Fe(
701
+ ), u = await Ye(
702
702
  i,
703
703
  c,
704
704
  o,
705
- n,
706
705
  s,
706
+ n,
707
707
  a
708
708
  );
709
709
  if (u)
@@ -718,9 +718,9 @@ const Le = "0x2222222222222222222222222222222222222222", $ = BigInt("0x200000000
718
718
  }
719
719
  }
720
720
  return null;
721
- }, Fn = async (t, e, {
722
- fetchAaveSwapParams: n,
723
- fetchAaveSwapQuotes: s,
721
+ }, Ys = async (t, e, {
722
+ fetchAaveSwapParams: s,
723
+ fetchAaveSwapQuotes: n,
724
724
  withdrawAmountD18: a,
725
725
  slippage: r
726
726
  }) => Promise.all(
@@ -728,12 +728,12 @@ const Le = "0x2222222222222222222222222222222222222222", $ = BigInt("0x200000000
728
728
  if (!p(o, e))
729
729
  return { asset: o };
730
730
  try {
731
- const i = await n({
731
+ const i = await s({
732
732
  withdrawAmountD18: a,
733
733
  slippage: r
734
734
  });
735
735
  if (i?.srcData.length) {
736
- const u = await s({
736
+ const u = await n({
737
737
  swapParams: i,
738
738
  slippage: r
739
739
  });
@@ -744,15 +744,15 @@ const Le = "0x2222222222222222222222222222222222222222", $ = BigInt("0x200000000
744
744
  return console.error(i), { asset: o };
745
745
  }
746
746
  })
747
- ), v = (t) => Math.round(t * 100) / 100, Yn = ({
747
+ ), F = (t) => Math.round(t * 100) / 100, Gs = ({
748
748
  maxSlippage: t,
749
- candidates: e = Ut
749
+ candidates: e = $t
750
750
  }) => {
751
751
  if (!Number.isFinite(t) || t <= 0)
752
752
  return [];
753
- const n = v(Math.min(t, 100)), s = e.filter((r) => r > 0 && r <= n).map(v), a = new Set(s);
754
- return a.add(n), a.add(t), Array.from(a).sort((r, o) => r - o);
755
- }, F = 1000000000000000000n, Ye = 1000000n, Y = 10000n, G = 100n, Gn = (t) => ({
753
+ const s = F(Math.min(t, 100)), n = e.filter((r) => r > 0 && r <= s).map(F), a = new Set(n);
754
+ return a.add(s), a.add(t), Array.from(a).sort((r, o) => r - o);
755
+ }, x = 1000000000000000000n, Ge = 1000000n, Y = 10000n, G = 100n, Ws = (t) => ({
756
756
  quotes: t.quotes.map(
757
757
  (e) => ({
758
758
  chainId: y(e.chainId, "chainId"),
@@ -767,53 +767,53 @@ const Le = "0x2222222222222222222222222222222222222222", $ = BigInt("0x200000000
767
767
  })
768
768
  ),
769
769
  signatures: t.signatures.map(S)
770
- }), Ge = (t, e, n) => {
771
- const s = BigInt(Math.max(0, Math.round(n * 100))), a = s > G ? G : s, r = Y - a, c = t * e / F * r * Ye, i = Y * F;
770
+ }), st = (t, e) => t * e / x, We = x, Hs = (t, e) => !!e && st(t, e) < We, He = (t, e, s) => {
771
+ const n = BigInt(Math.max(0, Math.round(s * 100))), a = n > G ? G : n, r = Y - a, c = st(t, e) * r * Ge, i = Y * x;
772
772
  return (c + i - 1n) / i;
773
- }, He = (t, e) => ({
773
+ }, ke = (t, e) => ({
774
774
  chainId: e,
775
775
  attestationId: y(t.attestationId, "attestationId"),
776
- userId: B(t.userId),
776
+ userId: L(t.userId),
777
777
  asset: t.assetAddress,
778
778
  price: y(t.price, "price"),
779
779
  quantity: y(t.tokenAmount, "tokenAmount"),
780
780
  expiration: y(t.expiration, "expiration"),
781
781
  side: Number(t.side),
782
- additionalData: B(t.additionalData)
783
- }), Hn = ({
782
+ additionalData: L(t.additionalData)
783
+ }), ks = ({
784
784
  attestation: t,
785
785
  chainId: e,
786
- slippagePercent: n
786
+ slippagePercent: s
787
787
  }) => {
788
- const s = He(t, e);
788
+ const n = ke(t, e);
789
789
  return T(qt, [
790
790
  {
791
- attestationSignature: le(t.signature),
792
- quote: s,
793
- amountOutMinimum: Ge(
794
- s.quantity,
795
- s.price,
796
- n
791
+ attestationSignature: me(t.signature),
792
+ quote: n,
793
+ amountOutMinimum: He(
794
+ n.quantity,
795
+ n.price,
796
+ s
797
797
  )
798
798
  }
799
799
  ]);
800
- }, Wn = (t) => [...t.reduce(
801
- (n, s) => n.has(s.accountId) ? n : n.set(s.accountId, s),
800
+ }, Vs = (t) => [...t.reduce(
801
+ (s, n) => s.has(n.accountId) ? s : s.set(n.accountId, n),
802
802
  /* @__PURE__ */ new Map()
803
- ).values()].map(({ accountId: n, marketId: s }) => ({
804
- accountId: n,
805
- marketId: s,
803
+ ).values()].map(({ accountId: s, marketId: n }) => ({
804
+ accountId: s,
805
+ marketId: n,
806
806
  collaterals: t.filter(
807
- (a) => a.accountId === n && !a.isDebt
807
+ (a) => a.accountId === s && !a.isDebt
808
808
  ),
809
809
  debt: t.find(
810
- (a) => a.accountId === n && a.isDebt
810
+ (a) => a.accountId === s && a.isDebt
811
811
  )
812
- })), kn = ({
812
+ })), qs = ({
813
813
  collateral: t,
814
814
  dytmOffice: e,
815
- processor: n,
816
- gmToken: s,
815
+ processor: s,
816
+ gmToken: n,
817
817
  ondoGMSwap: a,
818
818
  usdc: r,
819
819
  gmAmount: o,
@@ -825,14 +825,14 @@ const Le = "0x2222222222222222222222222222222222222222", $ = BigInt("0x200000000
825
825
  // 1 · drain GM collateral out of the split account -> processor with the
826
826
  // max-shares sentinel.
827
827
  to: e,
828
- data: A({
828
+ data: g({
829
829
  abi: C,
830
830
  functionName: "withdraw",
831
831
  args: [
832
832
  {
833
833
  account: t.accountId,
834
834
  tokenId: t.tokenId,
835
- receiver: n,
835
+ receiver: s,
836
836
  assets: 0n,
837
837
  shares: w,
838
838
  extraData: "0x"
@@ -842,8 +842,8 @@ const Le = "0x2222222222222222222222222222222222222222", $ = BigInt("0x200000000
842
842
  },
843
843
  {
844
844
  // 2 · approve the GM token to Ondo's swap contract
845
- to: s,
846
- data: A({
845
+ to: n,
846
+ data: g({
847
847
  abi: K,
848
848
  functionName: "approve",
849
849
  args: [a, o]
@@ -852,51 +852,51 @@ const Le = "0x2222222222222222222222222222222222222222", $ = BigInt("0x200000000
852
852
  {
853
853
  // 3 · redeem GM -> USDC with the signed attestation
854
854
  to: a,
855
- data: A({
856
- abi: Kt,
855
+ data: g({
856
+ abi: jt,
857
857
  functionName: "swapExactInWithAttestation",
858
- args: [s, o, r, c, i, u]
858
+ args: [n, o, r, c, i, u]
859
859
  })
860
860
  }
861
- ], qn = ({
861
+ ], Ks = ({
862
862
  collateral: t,
863
863
  dytmOffice: e,
864
- processor: n
864
+ processor: s
865
865
  }) => ({
866
866
  to: e,
867
- data: A({
867
+ data: g({
868
868
  abi: C,
869
869
  functionName: "withdraw",
870
870
  args: [
871
871
  {
872
872
  account: t.accountId,
873
873
  tokenId: t.tokenId,
874
- receiver: n,
874
+ receiver: s,
875
875
  assets: 0n,
876
876
  shares: w,
877
877
  extraData: "0x"
878
878
  }
879
879
  ]
880
880
  })
881
- }), Vn = ({
881
+ }), js = ({
882
882
  accountId: t,
883
883
  debtKey: e,
884
- dytmOffice: n,
885
- usdc: s
884
+ dytmOffice: s,
885
+ usdc: n
886
886
  }) => [
887
887
  {
888
888
  // approve USDC to the DYTM Office for the repay
889
- to: s,
890
- data: A({
889
+ to: n,
890
+ data: g({
891
891
  abi: K,
892
892
  functionName: "approve",
893
- args: [n, w]
893
+ args: [s, w]
894
894
  })
895
895
  },
896
896
  {
897
897
  // repay the slice's whole USDC debt
898
- to: n,
899
- data: A({
898
+ to: s,
899
+ data: g({
900
900
  abi: C,
901
901
  functionName: "repay",
902
902
  args: [
@@ -913,104 +913,106 @@ const Le = "0x2222222222222222222222222222222222222222", $ = BigInt("0x200000000
913
913
  ]
914
914
  })
915
915
  }
916
- ], Kn = ({
916
+ ], Xs = ({
917
917
  actions: t,
918
918
  outputAsset: e,
919
- minOutputAmount: n
920
- }) => T(jt, [
921
- { actions: t, outputAsset: e, minOutputAmount: n }
922
- ]), H = /* @__PURE__ */ new Set(), jn = (t) => {
919
+ minOutputAmount: s
920
+ }) => T(Xt, [
921
+ { actions: t, outputAsset: e, minOutputAmount: s }
922
+ ]), W = /* @__PURE__ */ new Set(), zs = (t) => {
923
923
  const e = t?.message;
924
- !e || H.has(e) || (H.add(e), console.warn(e));
924
+ !e || W.has(e) || (W.add(e), console.warn(e));
925
925
  };
926
926
  export {
927
- An as $,
928
- tn as A,
929
- me as B,
927
+ As as $,
928
+ ss as A,
929
+ ye as B,
930
930
  Z as C,
931
- an as D,
932
- Un as E,
933
- L as F,
934
- Nn as G,
935
- On as H,
936
- Bn as I,
937
- Ln as J,
938
- Pn as K,
939
- gn as L,
940
- ge as M,
941
- on as N,
942
- mn as O,
943
- J as P,
944
- Dn as Q,
945
- Wn as R,
946
- nn as S,
931
+ os as D,
932
+ $s as E,
933
+ M as F,
934
+ Os as G,
935
+ Cs as H,
936
+ Ls as I,
937
+ Ms as J,
938
+ Us as K,
939
+ gs as L,
940
+ We as M,
941
+ ge as N,
942
+ cs as O,
943
+ ys as P,
944
+ J as Q,
945
+ Is as R,
946
+ Vs as S,
947
947
  D as T,
948
- Rn as U,
949
- In as V,
950
- xn as W,
951
- Mn as X,
952
- Pe as Y,
948
+ as as U,
949
+ Ns as V,
950
+ Rs as W,
951
+ Bs as X,
952
+ Ps as Y,
953
953
  Ue as Z,
954
- yn as _,
955
- ie as a,
956
- jn as a0,
957
- Cn as a1,
958
- He as a2,
959
- Gn as a3,
960
- et as a4,
961
- cn as a5,
962
- hn as a6,
963
- rn as a7,
964
- en as a8,
965
- ln as a9,
966
- sn as aa,
967
- y as ab,
968
- B as ac,
969
- xe as ad,
970
- Ce as ae,
971
- Fe as af,
972
- vn as ag,
973
- En as ah,
974
- kt as ai,
975
- Ke as aj,
976
- Je as ak,
977
- fn as al,
978
- p as am,
979
- Ie as an,
980
- Sn as ao,
981
- be as ap,
982
- ze as aq,
983
- Xe as ar,
984
- Be as as,
985
- Re as at,
986
- Ze as au,
954
+ $e as _,
955
+ ce as a,
956
+ Es as a0,
957
+ Hs as a1,
958
+ zs as a2,
959
+ xs as a3,
960
+ ke as a4,
961
+ Ws as a5,
962
+ et as a6,
963
+ us as a7,
964
+ fs as a8,
965
+ is as a9,
966
+ U as aA,
967
+ ns as aa,
968
+ ms as ab,
969
+ rs as ac,
970
+ y as ad,
971
+ L as ae,
972
+ Be as af,
973
+ xe as ag,
974
+ Ye as ah,
975
+ Fs as ai,
976
+ hs as aj,
977
+ Vt as ak,
978
+ Xe as al,
979
+ es as am,
980
+ Ss as an,
981
+ p as ao,
982
+ Re as ap,
983
+ Ts as aq,
984
+ De as ar,
985
+ Ze as as,
986
+ Qe as at,
987
+ Le as au,
987
988
  Ne as av,
988
- De as aw,
989
- Tn as ax,
990
- P as ay,
991
- le as b,
992
- Ae as c,
993
- ve as d,
994
- kn as e,
995
- qn as f,
996
- Vn as g,
997
- ye as h,
998
- pn as i,
999
- dn as j,
1000
- je as k,
1001
- Ge as l,
1002
- $n as m,
1003
- Hn as n,
1004
- Kn as o,
1005
- Fn as p,
1006
- Qe as q,
989
+ ts as aw,
990
+ Oe as ax,
991
+ Ie as ay,
992
+ ws as az,
993
+ me as b,
994
+ Ee as c,
995
+ Fe as d,
996
+ qs as e,
997
+ Ks as f,
998
+ js as g,
999
+ Ae as h,
1000
+ ls as i,
1001
+ ps as j,
1002
+ ze as k,
1003
+ He as l,
1004
+ vs as m,
1005
+ ks as n,
1006
+ Xs as o,
1007
+ Ys as p,
1008
+ Je as q,
1007
1009
  S as r,
1008
- $e as s,
1009
- ue as t,
1010
- Oe as u,
1011
- _n as v,
1012
- wn as w,
1013
- bn as x,
1014
- Yn as y,
1015
- un as z
1010
+ ve as s,
1011
+ de as t,
1012
+ Ce as u,
1013
+ bs as v,
1014
+ _s as w,
1015
+ Ds as x,
1016
+ Gs as y,
1017
+ ds as z
1016
1018
  };