@use-glyph/sdk-react 1.2.6 → 1.2.8

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,14 +1,14 @@
1
1
  import { jsxs as E, jsx as l, Fragment as Ue } from "react/jsx-runtime";
2
2
  import * as N from "react";
3
- import W, { createContext as mi, useContext as tr, useState as re, useEffect as pe, memo as xt, forwardRef as wt, createElement as Go, useLayoutEffect as za, useMemo as nt, useCallback as Pe, useRef as Tn, lazy as Ja, Suspense as R0 } from "react";
4
- import { parseUnits as M0, isAddress as ds, checksumAddress as lo, createPublicClient as yn, http as Mr, zeroAddress as y1, erc20Abi as co, encodeFunctionData as W0, parseEther as B0, formatUnits as uo, ProviderRpcError as fo, getAddress as fs, SwitchChainError as U0, fromHex as T0, isHex as L0, hexToNumber as F0, webSocket as K0, fallback as q0 } from "viem";
5
- import { injected as Z0, useChainId as Et, useSwitchChain as Q0, useChains as O0, useAccount as Ya, deepEqual as G0, useConnect as z0, useDisconnect as J0, createConfig as Y0, WagmiProvider as D0, useConfig as X0, useReconnect as H0 } from "wagmi";
3
+ import W, { createContext as wi, useContext as tr, useState as re, useEffect as pe, memo as xt, forwardRef as wt, createElement as zo, useLayoutEffect as za, useMemo as nt, useCallback as Pe, useRef as Tn, lazy as Ja } from "react";
4
+ import { parseUnits as R0, isAddress as ds, checksumAddress as co, createPublicClient as yn, http as Mr, zeroAddress as y1, erc20Abi as uo, encodeFunctionData as M0, parseEther as W0, formatUnits as fo, ProviderRpcError as ho, getAddress as fs, SwitchChainError as B0, fromHex as U0, isHex as T0, hexToNumber as L0, webSocket as F0, fallback as K0 } from "viem";
5
+ import { injected as q0, useChainId as Et, useSwitchChain as Z0, useChains as Q0, useAccount as Ya, deepEqual as O0, useConnect as G0, useDisconnect as z0, createConfig as J0, WagmiProvider as Y0, useConfig as D0, useReconnect as X0 } from "wagmi";
6
6
  import * as Da from "react-dom";
7
7
  import Xa from "react-dom";
8
- import { useQuery as P0, QueryClientProvider as Ha, QueryClient as Pa } from "@tanstack/react-query";
9
- import { useCrossAppAccounts as j0, usePrivy as _0, PrivyProvider as $0 } from "@privy-io/react-auth";
10
- import { createConfig as e5, WagmiProvider as t5 } from "@privy-io/wagmi";
11
- const Ln = mi(void 0), wi = mi(null);
8
+ import { useQuery as H0, QueryClientProvider as Ha, QueryClient as Pa } from "@tanstack/react-query";
9
+ import { useCrossAppAccounts as P0, usePrivy as j0, PrivyProvider as _0 } from "@privy-io/react-auth";
10
+ import { createConfig as $0, WagmiProvider as e5 } from "@privy-io/wagmi";
11
+ const Ln = wi(void 0), Ci = wi(null);
12
12
  function Kg(e, t, r) {
13
13
  return async (n, o) => {
14
14
  const i = {
@@ -22,7 +22,7 @@ function Kg(e, t, r) {
22
22
  });
23
23
  };
24
24
  }
25
- const Fn = mi(void 0);
25
+ const Fn = wi(void 0);
26
26
  function Q1(e) {
27
27
  return {
28
28
  formatters: void 0,
@@ -32,18 +32,18 @@ function Q1(e) {
32
32
  };
33
33
  }
34
34
  const ja = "2.37.8";
35
- let ho = {
35
+ let go = {
36
36
  getDocsUrl: ({ docsBaseUrl: e, docsPath: t = "", docsSlug: r }) => t ? `${e ?? "https://viem.sh"}${t}${r ? `#${r}` : ""}` : void 0,
37
37
  version: `viem@${ja}`
38
- }, Ge = class zo extends Error {
38
+ }, Ge = class Jo extends Error {
39
39
  constructor(t, r = {}) {
40
- const n = r.cause instanceof zo ? r.cause.details : r.cause?.message ? r.cause.message : r.details, o = r.cause instanceof zo && r.cause.docsPath || r.docsPath, i = ho.getDocsUrl?.({ ...r, docsPath: o }), a = [
40
+ const n = r.cause instanceof Jo ? r.cause.details : r.cause?.message ? r.cause.message : r.details, o = r.cause instanceof Jo && r.cause.docsPath || r.docsPath, i = go.getDocsUrl?.({ ...r, docsPath: o }), a = [
41
41
  t || "An error occurred.",
42
42
  "",
43
43
  ...r.metaMessages ? [...r.metaMessages, ""] : [],
44
44
  ...i ? [`Docs: ${i}`] : [],
45
45
  ...n ? [`Details: ${n}`] : [],
46
- ...ho.version ? [`Version: ${ho.version}`] : []
46
+ ...go.version ? [`Version: ${go.version}`] : []
47
47
  ].join(`
48
48
  `);
49
49
  super(a, r.cause ? { cause: r.cause } : void 0), Object.defineProperty(this, "details", {
@@ -85,12 +85,12 @@ let ho = {
85
85
  function _a(e, t) {
86
86
  return t?.(e) ? e : e && typeof e == "object" && "cause" in e && e.cause !== void 0 ? _a(e.cause, t) : t ? null : e;
87
87
  }
88
- class r5 extends Ge {
88
+ class t5 extends Ge {
89
89
  constructor({ max: t, min: r, signed: n, size: o, value: i }) {
90
90
  super(`Number "${i}" is not in safe ${o ? `${o * 8}-bit ${n ? "signed" : "unsigned"} ` : ""}integer range ${t ? `(${r} to ${t})` : `(above ${r})`}`, { name: "IntegerOutOfRangeError" });
91
91
  }
92
92
  }
93
- class n5 extends Ge {
93
+ class r5 extends Ge {
94
94
  constructor({ givenSize: t, maxSize: r }) {
95
95
  super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`, { name: "SizeOverflowError" });
96
96
  }
@@ -107,7 +107,7 @@ function vn(e, { dir: t = "left" } = {}) {
107
107
  n++;
108
108
  return r = t === "left" ? r.slice(n) : r.slice(0, r.length - n), typeof e == "string" ? (r.length === 1 && t === "right" && (r = `${r}0`), `0x${r.length % 2 === 1 ? `0${r}` : r}`) : r;
109
109
  }
110
- class o5 extends Ge {
110
+ class n5 extends Ge {
111
111
  constructor({ offset: t, position: r, size: n }) {
112
112
  super(`Slice ${r === "start" ? "starting" : "ending"} at offset "${t}" is out-of-bounds (size: ${n}).`, { name: "SliceOffsetOutOfBoundsError" });
113
113
  }
@@ -118,9 +118,9 @@ class $a extends Ge {
118
118
  }
119
119
  }
120
120
  function f1(e, { dir: t, size: r = 32 } = {}) {
121
- return typeof e == "string" ? i5(e, { dir: t, size: r }) : s5(e, { dir: t, size: r });
121
+ return typeof e == "string" ? o5(e, { dir: t, size: r }) : i5(e, { dir: t, size: r });
122
122
  }
123
- function i5(e, { dir: t, size: r = 32 } = {}) {
123
+ function o5(e, { dir: t, size: r = 32 } = {}) {
124
124
  if (r === null)
125
125
  return e;
126
126
  const n = e.replace("0x", "");
@@ -132,7 +132,7 @@ function i5(e, { dir: t, size: r = 32 } = {}) {
132
132
  });
133
133
  return `0x${n[t === "right" ? "padEnd" : "padStart"](r * 2, "0")}`;
134
134
  }
135
- function s5(e, { dir: t, size: r = 32 } = {}) {
135
+ function i5(e, { dir: t, size: r = 32 } = {}) {
136
136
  if (r === null)
137
137
  return e;
138
138
  if (e.length > r)
@@ -148,18 +148,18 @@ function s5(e, { dir: t, size: r = 32 } = {}) {
148
148
  }
149
149
  return n;
150
150
  }
151
- const a5 = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
151
+ const s5 = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
152
152
  function R1(e, t = {}) {
153
- return typeof e == "number" || typeof e == "bigint" ? me(e, t) : typeof e == "string" ? u5(e, t) : typeof e == "boolean" ? l5(e, t) : yr(e, t);
153
+ return typeof e == "number" || typeof e == "bigint" ? me(e, t) : typeof e == "string" ? c5(e, t) : typeof e == "boolean" ? a5(e, t) : yr(e, t);
154
154
  }
155
- function l5(e, t = {}) {
155
+ function a5(e, t = {}) {
156
156
  const r = `0x${Number(e)}`;
157
157
  return typeof t.size == "number" ? (h1(r, { size: t.size }), f1(r, { size: t.size })) : r;
158
158
  }
159
159
  function yr(e, t = {}) {
160
160
  let r = "";
161
161
  for (let o = 0; o < e.length; o++)
162
- r += a5[e[o]];
162
+ r += s5[e[o]];
163
163
  const n = `0x${r}`;
164
164
  return typeof t.size == "number" ? (h1(n, { size: t.size }), f1(n, { dir: "right", size: t.size })) : n;
165
165
  }
@@ -170,7 +170,7 @@ function me(e, t = {}) {
170
170
  const a = typeof i == "bigint" && r ? -i - 1n : 0;
171
171
  if (i && o > i || o < a) {
172
172
  const c = typeof e == "bigint" ? "n" : "";
173
- throw new r5({
173
+ throw new t5({
174
174
  max: i ? `${i}${c}` : void 0,
175
175
  min: `${a}${c}`,
176
176
  signed: r,
@@ -181,16 +181,16 @@ function me(e, t = {}) {
181
181
  const s = `0x${(r && o < 0 ? (1n << BigInt(n * 8)) + BigInt(o) : o).toString(16)}`;
182
182
  return n ? f1(s, { size: n }) : s;
183
183
  }
184
- const c5 = /* @__PURE__ */ new TextEncoder();
185
- function u5(e, t = {}) {
186
- const r = c5.encode(e);
184
+ const l5 = /* @__PURE__ */ new TextEncoder();
185
+ function c5(e, t = {}) {
186
+ const r = l5.encode(e);
187
187
  return yr(r, t);
188
188
  }
189
- const d5 = /* @__PURE__ */ new TextEncoder();
189
+ const u5 = /* @__PURE__ */ new TextEncoder();
190
190
  function e2(e, t = {}) {
191
- return typeof e == "number" || typeof e == "bigint" ? h5(e, t) : typeof e == "boolean" ? f5(e, t) : O1(e) ? Wr(e, t) : t2(e, t);
191
+ return typeof e == "number" || typeof e == "bigint" ? f5(e, t) : typeof e == "boolean" ? d5(e, t) : O1(e) ? Wr(e, t) : t2(e, t);
192
192
  }
193
- function f5(e, t = {}) {
193
+ function d5(e, t = {}) {
194
194
  const r = new Uint8Array(1);
195
195
  return r[0] = Number(e), typeof t.size == "number" ? (h1(r, { size: t.size }), f1(r, { size: t.size })) : r;
196
196
  }
@@ -224,17 +224,17 @@ function Wr(e, t = {}) {
224
224
  }
225
225
  return i;
226
226
  }
227
- function h5(e, t) {
227
+ function f5(e, t) {
228
228
  const r = me(e, t);
229
229
  return Wr(r);
230
230
  }
231
231
  function t2(e, t = {}) {
232
- const r = d5.encode(e);
232
+ const r = u5.encode(e);
233
233
  return typeof t.size == "number" ? (h1(r, { size: t.size }), f1(r, { dir: "right", size: t.size })) : r;
234
234
  }
235
235
  function h1(e, { size: t }) {
236
236
  if (r1(e) > t)
237
- throw new n5({
237
+ throw new r5({
238
238
  givenSize: r1(e),
239
239
  maxSize: t
240
240
  });
@@ -251,7 +251,7 @@ function Dr(e, t = {}) {
251
251
  function bn(e, t = {}) {
252
252
  return Number(Dr(e, t));
253
253
  }
254
- function Ci(e, t) {
254
+ function yi(e, t) {
255
255
  return ({ exclude: r, format: n }) => ({
256
256
  exclude: r,
257
257
  format: (o) => {
@@ -274,7 +274,7 @@ const r2 = {
274
274
  "0x3": "eip4844",
275
275
  "0x4": "eip7702"
276
276
  };
277
- function yi(e) {
277
+ function vi(e) {
278
278
  const t = {
279
279
  ...e,
280
280
  blockHash: e.blockHash ? e.blockHash : null,
@@ -293,7 +293,7 @@ function yi(e) {
293
293
  value: e.value ? BigInt(e.value) : void 0,
294
294
  v: e.v ? BigInt(e.v) : void 0
295
295
  };
296
- return e.authorizationList && (t.authorizationList = p5(e.authorizationList)), t.yParity = (() => {
296
+ return e.authorizationList && (t.authorizationList = g5(e.authorizationList)), t.yParity = (() => {
297
297
  if (e.yParity)
298
298
  return Number(e.yParity);
299
299
  if (typeof t.v == "bigint") {
@@ -306,8 +306,8 @@ function yi(e) {
306
306
  }
307
307
  })(), 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;
308
308
  }
309
- const g5 = /* @__PURE__ */ Ci("transaction", yi);
310
- function p5(e) {
309
+ const h5 = /* @__PURE__ */ yi("transaction", vi);
310
+ function g5(e) {
311
311
  return e.map((t) => ({
312
312
  address: t.address,
313
313
  chainId: Number(t.chainId),
@@ -317,8 +317,8 @@ function p5(e) {
317
317
  yParity: Number(t.yParity)
318
318
  }));
319
319
  }
320
- function m5(e) {
321
- const t = (e.transactions ?? []).map((r) => typeof r == "string" ? r : yi(r));
320
+ function p5(e) {
321
+ const t = (e.transactions ?? []).map((r) => typeof r == "string" ? r : vi(r));
322
322
  return {
323
323
  ...e,
324
324
  baseFeePerGas: e.baseFeePerGas ? BigInt(e.baseFeePerGas) : null,
@@ -337,8 +337,8 @@ function m5(e) {
337
337
  totalDifficulty: e.totalDifficulty ? BigInt(e.totalDifficulty) : null
338
338
  };
339
339
  }
340
- const w5 = /* @__PURE__ */ Ci("block", m5);
341
- function C5(e, { args: t, eventName: r } = {}) {
340
+ const m5 = /* @__PURE__ */ yi("block", p5);
341
+ function w5(e, { args: t, eventName: r } = {}) {
342
342
  return {
343
343
  ...e,
344
344
  blockHash: e.blockHash ? e.blockHash : null,
@@ -349,11 +349,11 @@ function C5(e, { args: t, eventName: r } = {}) {
349
349
  ...r ? { args: t, eventName: r } : {}
350
350
  };
351
351
  }
352
- const y5 = {
352
+ const C5 = {
353
353
  "0x0": "reverted",
354
354
  "0x1": "success"
355
355
  };
356
- function v5(e) {
356
+ function y5(e) {
357
357
  const t = {
358
358
  ...e,
359
359
  blockNumber: e.blockNumber ? BigInt(e.blockNumber) : null,
@@ -361,15 +361,15 @@ function v5(e) {
361
361
  cumulativeGasUsed: e.cumulativeGasUsed ? BigInt(e.cumulativeGasUsed) : null,
362
362
  effectiveGasPrice: e.effectiveGasPrice ? BigInt(e.effectiveGasPrice) : null,
363
363
  gasUsed: e.gasUsed ? BigInt(e.gasUsed) : null,
364
- logs: e.logs ? e.logs.map((r) => C5(r)) : null,
364
+ logs: e.logs ? e.logs.map((r) => w5(r)) : null,
365
365
  to: e.to ? e.to : null,
366
366
  transactionIndex: e.transactionIndex ? bn(e.transactionIndex) : null,
367
- status: e.status ? y5[e.status] : null,
367
+ status: e.status ? C5[e.status] : null,
368
368
  type: e.type ? r2[e.type] || e.type : null
369
369
  };
370
370
  return e.blobGasPrice && (t.blobGasPrice = BigInt(e.blobGasPrice)), e.blobGasUsed && (t.blobGasUsed = BigInt(e.blobGasUsed)), t;
371
371
  }
372
- const b5 = /* @__PURE__ */ Ci("transactionReceipt", v5), vi = 2n ** 256n - 1n;
372
+ const v5 = /* @__PURE__ */ yi("transactionReceipt", y5), bi = 2n ** 256n - 1n;
373
373
  function G1(e) {
374
374
  return `0x${e.reduce((t, r) => t + r.replace("0x", ""), "")}`;
375
375
  }
@@ -380,17 +380,17 @@ class gs extends Ge {
380
380
  });
381
381
  }
382
382
  }
383
- class A5 extends Ge {
383
+ class b5 extends Ge {
384
384
  constructor({ length: t, position: r }) {
385
385
  super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`, { name: "PositionOutOfBoundsError" });
386
386
  }
387
387
  }
388
- class x5 extends Ge {
388
+ class A5 extends Ge {
389
389
  constructor({ count: t, limit: r }) {
390
390
  super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`, { name: "RecursiveReadLimitExceededError" });
391
391
  }
392
392
  }
393
- const E5 = {
393
+ const x5 = {
394
394
  bytes: new Uint8Array(),
395
395
  dataView: new DataView(new ArrayBuffer(0)),
396
396
  position: 0,
@@ -399,14 +399,14 @@ const E5 = {
399
399
  recursiveReadLimit: Number.POSITIVE_INFINITY,
400
400
  assertReadLimit() {
401
401
  if (this.recursiveReadCount >= this.recursiveReadLimit)
402
- throw new x5({
402
+ throw new A5({
403
403
  count: this.recursiveReadCount + 1,
404
404
  limit: this.recursiveReadLimit
405
405
  });
406
406
  },
407
407
  assertPosition(e) {
408
408
  if (e < 0 || e > this.bytes.length - 1)
409
- throw new A5({
409
+ throw new b5({
410
410
  length: this.bytes.length,
411
411
  position: e
412
412
  });
@@ -513,7 +513,7 @@ const E5 = {
513
513
  }
514
514
  };
515
515
  function n2(e, { recursiveReadLimit: t = 8192 } = {}) {
516
- const r = Object.create(E5);
516
+ const r = Object.create(x5);
517
517
  return r.bytes = e, r.dataView = new DataView(e.buffer, e.byteOffset, e.byteLength), r.positionReadCount = /* @__PURE__ */ new Map(), r.recursiveReadLimit = t, r;
518
518
  }
519
519
  function Br(e, t = "hex") {
@@ -521,9 +521,9 @@ function Br(e, t = "hex") {
521
521
  return r.encode(n), t === "hex" ? yr(n.bytes) : n.bytes;
522
522
  }
523
523
  function o2(e) {
524
- return Array.isArray(e) ? I5(e.map((t) => o2(t))) : S5(e);
524
+ return Array.isArray(e) ? E5(e.map((t) => o2(t))) : I5(e);
525
525
  }
526
- function I5(e) {
526
+ function E5(e) {
527
527
  const t = e.reduce((o, i) => o + i.length, 0), r = i2(t);
528
528
  return {
529
529
  length: t <= 55 ? 1 + t : 1 + r + t,
@@ -534,7 +534,7 @@ function I5(e) {
534
534
  }
535
535
  };
536
536
  }
537
- function S5(e) {
537
+ function I5(e) {
538
538
  const t = typeof e == "string" ? Wr(e) : e, r = i2(t.length);
539
539
  return {
540
540
  length: t.length === 1 && t[0] < 128 ? 1 : t.length <= 55 ? 1 + t.length : 1 + r + t.length,
@@ -554,11 +554,11 @@ function i2(e) {
554
554
  return 4;
555
555
  throw new Ge("Length is too large.");
556
556
  }
557
- const N5 = {
557
+ const S5 = {
558
558
  ether: -9,
559
559
  wei: 9
560
560
  };
561
- function V5(e, t) {
561
+ function N5(e, t) {
562
562
  let r = e.toString();
563
563
  const n = r.startsWith("-");
564
564
  n && (r = r.slice(1)), r = r.padStart(t, "0");
@@ -568,28 +568,28 @@ function V5(e, t) {
568
568
  ];
569
569
  return i = i.replace(/(0+)$/, ""), `${n ? "-" : ""}${o || "0"}${i ? `.${i}` : ""}`;
570
570
  }
571
- function Jo(e, t = "wei") {
572
- return V5(e, N5[t]);
571
+ function Yo(e, t = "wei") {
572
+ return N5(e, S5[t]);
573
573
  }
574
- function k5(e) {
574
+ function V5(e) {
575
575
  const t = Object.entries(e).map(([n, o]) => o === void 0 || o === !1 ? null : [n, o]).filter(Boolean), r = t.reduce((n, [o]) => Math.max(n, o.length), 0);
576
576
  return t.map(([n, o]) => ` ${`${n}:`.padEnd(r + 1)} ${o}`).join(`
577
577
  `);
578
578
  }
579
- class R5 extends Ge {
579
+ class k5 extends Ge {
580
580
  constructor({ v: t }) {
581
581
  super(`Invalid \`v\` value "${t}". Expected 27 or 28.`, {
582
582
  name: "InvalidLegacyVError"
583
583
  });
584
584
  }
585
585
  }
586
- class M5 extends Ge {
586
+ class R5 extends Ge {
587
587
  constructor({ transaction: t }) {
588
588
  super("Cannot infer a transaction type from provided transaction.", {
589
589
  metaMessages: [
590
590
  "Provided Transaction:",
591
591
  "{",
592
- k5(t),
592
+ V5(t),
593
593
  "}",
594
594
  "",
595
595
  "To infer the type, either provide:",
@@ -604,12 +604,12 @@ class M5 extends Ge {
604
604
  });
605
605
  }
606
606
  }
607
- class W5 extends Ge {
607
+ class M5 extends Ge {
608
608
  constructor({ storageKey: t }) {
609
609
  super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length - 2) / 2)} bytes.`, { name: "InvalidStorageKeySizeError" });
610
610
  }
611
611
  }
612
- function B5(e) {
612
+ function W5(e) {
613
613
  if (!e || e.length === 0)
614
614
  return [];
615
615
  const t = [];
@@ -670,35 +670,35 @@ function c2(e, t) {
670
670
  if (e.length < r)
671
671
  throw new Error("digestInto() expects output buffer of length at least " + r);
672
672
  }
673
- function U5(e) {
673
+ function B5(e) {
674
674
  return new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4));
675
675
  }
676
676
  function o1(...e) {
677
677
  for (let t = 0; t < e.length; t++)
678
678
  e[t].fill(0);
679
679
  }
680
- function go(e) {
680
+ function po(e) {
681
681
  return new DataView(e.buffer, e.byteOffset, e.byteLength);
682
682
  }
683
683
  function Lt(e, t) {
684
684
  return e << 32 - t | e >>> t;
685
685
  }
686
- const T5 = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
687
- function L5(e) {
686
+ const U5 = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
687
+ function T5(e) {
688
688
  return e << 24 & 4278190080 | e << 8 & 16711680 | e >>> 8 & 65280 | e >>> 24 & 255;
689
689
  }
690
- function F5(e) {
690
+ function L5(e) {
691
691
  for (let t = 0; t < e.length; t++)
692
- e[t] = L5(e[t]);
692
+ e[t] = T5(e[t]);
693
693
  return e;
694
694
  }
695
- const ps = T5 ? (e) => e : F5, u2 = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", K5 = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
695
+ const ps = U5 ? (e) => e : L5, u2 = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", F5 = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
696
696
  function Pr(e) {
697
697
  if (rr(e), u2)
698
698
  return e.toHex();
699
699
  let t = "";
700
700
  for (let r = 0; r < e.length; r++)
701
- t += K5[e[r]];
701
+ t += F5[e[r]];
702
702
  return t;
703
703
  }
704
704
  const Yt = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
@@ -729,13 +729,13 @@ function An(e) {
729
729
  }
730
730
  return n;
731
731
  }
732
- function q5(e) {
732
+ function K5(e) {
733
733
  if (typeof e != "string")
734
734
  throw new Error("string expected");
735
735
  return new Uint8Array(new TextEncoder().encode(e));
736
736
  }
737
737
  function qn(e) {
738
- return typeof e == "string" && (e = q5(e)), rr(e), e;
738
+ return typeof e == "string" && (e = K5(e)), rr(e), e;
739
739
  }
740
740
  function hr(...e) {
741
741
  let t = 0;
@@ -750,7 +750,7 @@ function hr(...e) {
750
750
  }
751
751
  return r;
752
752
  }
753
- class bi {
753
+ class Ai {
754
754
  }
755
755
  function d2(e) {
756
756
  const t = (n) => e().update(qn(n)).digest(), r = e();
@@ -763,21 +763,21 @@ function f2(e = 32) {
763
763
  return Uint8Array.from(Or.randomBytes(e));
764
764
  throw new Error("crypto.getRandomValues must be defined");
765
765
  }
766
- function Z5(e, t, r, n) {
766
+ function q5(e, t, r, n) {
767
767
  if (typeof e.setBigUint64 == "function")
768
768
  return e.setBigUint64(t, r, n);
769
769
  const o = BigInt(32), i = BigInt(4294967295), a = Number(r >> o & i), s = Number(r & i), c = n ? 4 : 0, u = n ? 0 : 4;
770
770
  e.setUint32(t + c, a, n), e.setUint32(t + u, s, n);
771
771
  }
772
- function Q5(e, t, r) {
772
+ function Z5(e, t, r) {
773
773
  return e & t ^ ~e & r;
774
774
  }
775
- function O5(e, t, r) {
775
+ function Q5(e, t, r) {
776
776
  return e & t ^ e & r ^ t & r;
777
777
  }
778
- class G5 extends bi {
778
+ class O5 extends Ai {
779
779
  constructor(t, r, n, o) {
780
- super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = t, this.outputLen = r, this.padOffset = n, this.isLE = o, this.buffer = new Uint8Array(t), this.view = go(this.buffer);
780
+ super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = t, this.outputLen = r, this.padOffset = n, this.isLE = o, this.buffer = new Uint8Array(t), this.view = po(this.buffer);
781
781
  }
782
782
  update(t) {
783
783
  n1(this), t = qn(t), rr(t);
@@ -785,7 +785,7 @@ class G5 extends bi {
785
785
  for (let a = 0; a < i; ) {
786
786
  const s = Math.min(o - this.pos, i - a);
787
787
  if (s === o) {
788
- const c = go(t);
788
+ const c = po(t);
789
789
  for (; o <= i - a; a += o)
790
790
  this.process(c, a);
791
791
  continue;
@@ -801,8 +801,8 @@ class G5 extends bi {
801
801
  r[a++] = 128, o1(this.buffer.subarray(a)), this.padOffset > o - a && (this.process(n, 0), a = 0);
802
802
  for (let d = a; d < o; d++)
803
803
  r[d] = 0;
804
- Z5(n, o - 8, BigInt(this.length * 8), i), this.process(n, 0);
805
- const s = go(t), c = this.outputLen;
804
+ q5(n, o - 8, BigInt(this.length * 8), i), this.process(n, 0);
805
+ const s = po(t), c = this.outputLen;
806
806
  if (c % 4)
807
807
  throw new Error("_sha2: outputLen should be aligned to 32bit");
808
808
  const u = c / 4, f = this.get();
@@ -836,19 +836,19 @@ const ar = /* @__PURE__ */ Uint32Array.from([
836
836
  528734635,
837
837
  1541459225
838
838
  ]), en = /* @__PURE__ */ BigInt(2 ** 32 - 1), ws = /* @__PURE__ */ BigInt(32);
839
- function z5(e, t = !1) {
839
+ function G5(e, t = !1) {
840
840
  return t ? { h: Number(e & en), l: Number(e >> ws & en) } : { h: Number(e >> ws & en) | 0, l: Number(e & en) | 0 };
841
841
  }
842
- function J5(e, t = !1) {
842
+ function z5(e, t = !1) {
843
843
  const r = e.length;
844
844
  let n = new Uint32Array(r), o = new Uint32Array(r);
845
845
  for (let i = 0; i < r; i++) {
846
- const { h: a, l: s } = z5(e[i], t);
846
+ const { h: a, l: s } = G5(e[i], t);
847
847
  [n[i], o[i]] = [a, s];
848
848
  }
849
849
  return [n, o];
850
850
  }
851
- const Y5 = (e, t, r) => e << r | t >>> 32 - r, D5 = (e, t, r) => t << r | e >>> 32 - r, X5 = (e, t, r) => t << r - 32 | e >>> 64 - r, H5 = (e, t, r) => e << r - 32 | t >>> 64 - r, P5 = /* @__PURE__ */ Uint32Array.from([
851
+ const J5 = (e, t, r) => e << r | t >>> 32 - r, Y5 = (e, t, r) => t << r | e >>> 32 - r, D5 = (e, t, r) => t << r - 32 | e >>> 64 - r, X5 = (e, t, r) => e << r - 32 | t >>> 64 - r, H5 = /* @__PURE__ */ Uint32Array.from([
852
852
  1116352408,
853
853
  1899447441,
854
854
  3049323471,
@@ -914,7 +914,7 @@ const Y5 = (e, t, r) => e << r | t >>> 32 - r, D5 = (e, t, r) => t << r | e >>>
914
914
  3204031479,
915
915
  3329325298
916
916
  ]), lr = /* @__PURE__ */ new Uint32Array(64);
917
- class j5 extends G5 {
917
+ class P5 extends O5 {
918
918
  constructor(t = 32) {
919
919
  super(64, t, 8, !1), this.A = ar[0] | 0, this.B = ar[1] | 0, this.C = ar[2] | 0, this.D = ar[3] | 0, this.E = ar[4] | 0, this.F = ar[5] | 0, this.G = ar[6] | 0, this.H = ar[7] | 0;
920
920
  }
@@ -935,7 +935,7 @@ class j5 extends G5 {
935
935
  }
936
936
  let { A: n, B: o, C: i, D: a, E: s, F: c, G: u, H: f } = this;
937
937
  for (let d = 0; d < 64; d++) {
938
- const p = Lt(s, 6) ^ Lt(s, 11) ^ Lt(s, 25), m = f + p + Q5(s, c, u) + P5[d] + lr[d] | 0, w = (Lt(n, 2) ^ Lt(n, 13) ^ Lt(n, 22)) + O5(n, o, i) | 0;
938
+ const p = Lt(s, 6) ^ Lt(s, 11) ^ Lt(s, 25), m = f + p + Z5(s, c, u) + H5[d] + lr[d] | 0, w = (Lt(n, 2) ^ Lt(n, 13) ^ Lt(n, 22)) + Q5(n, o, i) | 0;
939
939
  f = u, u = c, c = s, s = a + m | 0, a = i, i = o, o = n, n = m + w | 0;
940
940
  }
941
941
  n = n + this.A | 0, o = o + this.B | 0, i = i + this.C | 0, a = a + this.D | 0, s = s + this.E | 0, c = c + this.F | 0, u = u + this.G | 0, f = f + this.H | 0, this.set(n, o, i, a, s, c, u, f);
@@ -947,28 +947,28 @@ class j5 extends G5 {
947
947
  this.set(0, 0, 0, 0, 0, 0, 0, 0), o1(this.buffer);
948
948
  }
949
949
  }
950
- const h2 = /* @__PURE__ */ d2(() => new j5()), _5 = h2;
951
- function $5(e, t) {
952
- return _5(O1(e, { strict: !1 }) ? e2(e) : e);
950
+ const h2 = /* @__PURE__ */ d2(() => new P5()), j5 = h2;
951
+ function _5(e, t) {
952
+ return j5(O1(e, { strict: !1 }) ? e2(e) : e);
953
953
  }
954
- function ec(e) {
955
- const { commitment: t, version: r = 1 } = e, n = e.to ?? (typeof t == "string" ? "hex" : "bytes"), o = $5(t);
954
+ function $5(e) {
955
+ const { commitment: t, version: r = 1 } = e, n = e.to ?? (typeof t == "string" ? "hex" : "bytes"), o = _5(t);
956
956
  return o.set([r], 0), n === "bytes" ? o : yr(o);
957
957
  }
958
- function tc(e) {
958
+ function ec(e) {
959
959
  const { commitments: t, version: r } = e, n = e.to ?? (typeof t[0] == "string" ? "hex" : "bytes"), o = [];
960
960
  for (const i of t)
961
- o.push(ec({
961
+ o.push($5({
962
962
  commitment: i,
963
963
  to: n,
964
964
  version: r
965
965
  }));
966
966
  return o;
967
967
  }
968
- const Cs = 6, g2 = 32, Ai = 4096, p2 = g2 * Ai, ys = p2 * Cs - // terminator byte (0x80).
968
+ const Cs = 6, g2 = 32, xi = 4096, p2 = g2 * xi, ys = p2 * Cs - // terminator byte (0x80).
969
969
  1 - // zero byte (0x00) appended to each field element.
970
- 1 * Ai * Cs, m2 = 1;
971
- class rc extends Ge {
970
+ 1 * xi * Cs, m2 = 1;
971
+ class tc extends Ge {
972
972
  constructor({ maxSize: t, size: r }) {
973
973
  super("Blob size is too large.", {
974
974
  metaMessages: [`Max: ${t} bytes`, `Given: ${r} bytes`],
@@ -981,7 +981,7 @@ class w2 extends Ge {
981
981
  super("Blob data must not be empty.", { name: "EmptyBlobError" });
982
982
  }
983
983
  }
984
- class nc extends Ge {
984
+ class rc extends Ge {
985
985
  constructor({ hash: t, size: r }) {
986
986
  super(`Versioned hash "${t}" size is invalid.`, {
987
987
  metaMessages: ["Expected: 32", `Received: ${r}`],
@@ -989,7 +989,7 @@ class nc extends Ge {
989
989
  });
990
990
  }
991
991
  }
992
- class oc extends Ge {
992
+ class nc extends Ge {
993
993
  constructor({ hash: t, version: r }) {
994
994
  super(`Versioned hash "${t}" version is invalid.`, {
995
995
  metaMessages: [
@@ -1000,12 +1000,12 @@ class oc extends Ge {
1000
1000
  });
1001
1001
  }
1002
1002
  }
1003
- function ic(e) {
1003
+ function oc(e) {
1004
1004
  const t = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"), r = typeof e.data == "string" ? Wr(e.data) : e.data, n = r1(r);
1005
1005
  if (!n)
1006
1006
  throw new w2();
1007
1007
  if (n > ys)
1008
- throw new rc({
1008
+ throw new tc({
1009
1009
  maxSize: ys,
1010
1010
  size: n
1011
1011
  });
@@ -1014,7 +1014,7 @@ function ic(e) {
1014
1014
  for (; i; ) {
1015
1015
  const s = n2(new Uint8Array(p2));
1016
1016
  let c = 0;
1017
- for (; c < Ai; ) {
1017
+ for (; c < xi; ) {
1018
1018
  const u = r.slice(a, a + (g2 - 1));
1019
1019
  if (s.pushByte(0), s.pushBytes(u), u.length < 31) {
1020
1020
  s.pushByte(128), i = !1;
@@ -1026,8 +1026,8 @@ function ic(e) {
1026
1026
  }
1027
1027
  return t === "bytes" ? o.map((s) => s.bytes) : o.map((s) => yr(s.bytes));
1028
1028
  }
1029
- function sc(e) {
1030
- const { data: t, kzg: r, to: n } = e, o = e.blobs ?? ic({ data: t, to: n }), i = e.commitments ?? s2({ blobs: o, kzg: r, to: n }), a = e.proofs ?? a2({ blobs: o, commitments: i, kzg: r, to: n }), s = [];
1029
+ function ic(e) {
1030
+ const { data: t, kzg: r, to: n } = e, o = e.blobs ?? oc({ data: t, to: n }), i = e.commitments ?? s2({ blobs: o, kzg: r, to: n }), a = e.proofs ?? a2({ blobs: o, commitments: i, kzg: r, to: n }), s = [];
1031
1031
  for (let c = 0; c < o.length; c++)
1032
1032
  s.push({
1033
1033
  blob: o[c],
@@ -1054,7 +1054,7 @@ class Zn extends Ge {
1054
1054
  }
1055
1055
  class Qn extends Ge {
1056
1056
  constructor({ cause: t, maxFeePerGas: r } = {}) {
1057
- super(`The fee cap (\`maxFeePerGas\`${r ? ` = ${Jo(r)} gwei` : ""}) cannot be higher than the maximum allowed value (2^256-1).`, {
1057
+ super(`The fee cap (\`maxFeePerGas\`${r ? ` = ${Yo(r)} gwei` : ""}) cannot be higher than the maximum allowed value (2^256-1).`, {
1058
1058
  cause: t,
1059
1059
  name: "FeeCapTooHighError"
1060
1060
  });
@@ -1069,7 +1069,7 @@ Object.defineProperty(Qn, "nodeMessage", {
1069
1069
  class C2 extends Ge {
1070
1070
  constructor({ cause: t, maxPriorityFeePerGas: r, maxFeePerGas: n } = {}) {
1071
1071
  super([
1072
- `The provided tip (\`maxPriorityFeePerGas\`${r ? ` = ${Jo(r)} gwei` : ""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n ? ` = ${Jo(n)} gwei` : ""}).`
1072
+ `The provided tip (\`maxPriorityFeePerGas\`${r ? ` = ${Yo(r)} gwei` : ""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n ? ` = ${Yo(n)} gwei` : ""}).`
1073
1073
  ].join(`
1074
1074
  `), {
1075
1075
  cause: t,
@@ -1104,16 +1104,16 @@ class y2 extends Map {
1104
1104
  return this;
1105
1105
  }
1106
1106
  }
1107
- const ac = BigInt(0), v1 = BigInt(1), lc = BigInt(2), cc = BigInt(7), uc = BigInt(256), dc = BigInt(113), v2 = [], b2 = [], A2 = [];
1107
+ const sc = BigInt(0), v1 = BigInt(1), ac = BigInt(2), lc = BigInt(7), cc = BigInt(256), uc = BigInt(113), v2 = [], b2 = [], A2 = [];
1108
1108
  for (let e = 0, t = v1, r = 1, n = 0; e < 24; e++) {
1109
1109
  [r, n] = [n, (2 * r + 3 * n) % 5], v2.push(2 * (5 * n + r)), b2.push((e + 1) * (e + 2) / 2 % 64);
1110
- let o = ac;
1110
+ let o = sc;
1111
1111
  for (let i = 0; i < 7; i++)
1112
- t = (t << v1 ^ (t >> cc) * dc) % uc, t & lc && (o ^= v1 << (v1 << /* @__PURE__ */ BigInt(i)) - v1);
1112
+ t = (t << v1 ^ (t >> lc) * uc) % cc, t & ac && (o ^= v1 << (v1 << /* @__PURE__ */ BigInt(i)) - v1);
1113
1113
  A2.push(o);
1114
1114
  }
1115
- const x2 = J5(A2, !0), fc = x2[0], hc = x2[1], vs = (e, t, r) => r > 32 ? X5(e, t, r) : Y5(e, t, r), bs = (e, t, r) => r > 32 ? H5(e, t, r) : D5(e, t, r);
1116
- function gc(e, t = 24) {
1115
+ const x2 = z5(A2, !0), dc = x2[0], fc = x2[1], vs = (e, t, r) => r > 32 ? D5(e, t, r) : J5(e, t, r), bs = (e, t, r) => r > 32 ? X5(e, t, r) : Y5(e, t, r);
1116
+ function hc(e, t = 24) {
1117
1117
  const r = new Uint32Array(10);
1118
1118
  for (let n = 24 - t; n < 24; n++) {
1119
1119
  for (let a = 0; a < 10; a++)
@@ -1134,22 +1134,22 @@ function gc(e, t = 24) {
1134
1134
  for (let s = 0; s < 10; s++)
1135
1135
  e[a + s] ^= ~r[(s + 2) % 10] & r[(s + 4) % 10];
1136
1136
  }
1137
- e[0] ^= fc[n], e[1] ^= hc[n];
1137
+ e[0] ^= dc[n], e[1] ^= fc[n];
1138
1138
  }
1139
1139
  o1(r);
1140
1140
  }
1141
- class xi extends bi {
1141
+ class Ei extends Ai {
1142
1142
  // NOTE: we accept arguments in bytes instead of bits here.
1143
1143
  constructor(t, r, n, o = !1, i = 24) {
1144
1144
  if (super(), this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, this.enableXOF = !1, this.blockLen = t, this.suffix = r, this.outputLen = n, this.enableXOF = o, this.rounds = i, B1(n), !(0 < t && t < 200))
1145
1145
  throw new Error("only keccak-f1600 function is supported");
1146
- this.state = new Uint8Array(200), this.state32 = U5(this.state);
1146
+ this.state = new Uint8Array(200), this.state32 = B5(this.state);
1147
1147
  }
1148
1148
  clone() {
1149
1149
  return this._cloneInto();
1150
1150
  }
1151
1151
  keccak() {
1152
- ps(this.state32), gc(this.state32, this.rounds), ps(this.state32), this.posOut = 0, this.pos = 0;
1152
+ ps(this.state32), hc(this.state32, this.rounds), ps(this.state32), this.posOut = 0, this.pos = 0;
1153
1153
  }
1154
1154
  update(t) {
1155
1155
  n1(this), t = qn(t), rr(t);
@@ -1200,55 +1200,55 @@ class xi extends bi {
1200
1200
  }
1201
1201
  _cloneInto(t) {
1202
1202
  const { blockLen: r, suffix: n, outputLen: o, rounds: i, enableXOF: a } = this;
1203
- return t || (t = new xi(r, n, o, a, i)), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = i, t.suffix = n, t.outputLen = o, t.enableXOF = a, t.destroyed = this.destroyed, t;
1203
+ return t || (t = new Ei(r, n, o, a, i)), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = i, t.suffix = n, t.outputLen = o, t.enableXOF = a, t.destroyed = this.destroyed, t;
1204
1204
  }
1205
1205
  }
1206
- const pc = (e, t, r) => d2(() => new xi(t, e, r)), mc = pc(1, 136, 256 / 8);
1207
- function wc(e, t) {
1208
- return mc(O1(e, { strict: !1 }) ? e2(e) : e);
1206
+ const gc = (e, t, r) => d2(() => new Ei(t, e, r)), pc = gc(1, 136, 256 / 8);
1207
+ function mc(e, t) {
1208
+ return pc(O1(e, { strict: !1 }) ? e2(e) : e);
1209
1209
  }
1210
- const po = /* @__PURE__ */ new y2(8192);
1211
- function Cc(e, t) {
1212
- if (po.has(`${e}.${t}`))
1213
- return po.get(`${e}.${t}`);
1214
- const r = e.substring(2).toLowerCase(), n = wc(t2(r)), o = r.split("");
1210
+ const mo = /* @__PURE__ */ new y2(8192);
1211
+ function wc(e, t) {
1212
+ if (mo.has(`${e}.${t}`))
1213
+ return mo.get(`${e}.${t}`);
1214
+ const r = e.substring(2).toLowerCase(), n = mc(t2(r)), o = r.split("");
1215
1215
  for (let a = 0; a < 40; a += 2)
1216
1216
  n[a >> 1] >> 4 >= 8 && o[a] && (o[a] = o[a].toUpperCase()), (n[a >> 1] & 15) >= 8 && o[a + 1] && (o[a + 1] = o[a + 1].toUpperCase());
1217
1217
  const i = `0x${o.join("")}`;
1218
- return po.set(`${e}.${t}`, i), i;
1218
+ return mo.set(`${e}.${t}`, i), i;
1219
1219
  }
1220
- const yc = /^0x[a-fA-F0-9]{40}$/, mo = /* @__PURE__ */ new y2(8192);
1220
+ const Cc = /^0x[a-fA-F0-9]{40}$/, wo = /* @__PURE__ */ new y2(8192);
1221
1221
  function Tr(e, t) {
1222
1222
  const { strict: r = !0 } = t ?? {}, n = `${e}.${r}`;
1223
- if (mo.has(n))
1224
- return mo.get(n);
1225
- const o = yc.test(e) ? e.toLowerCase() === e ? !0 : r ? Cc(e) === e : !0 : !1;
1226
- return mo.set(n, o), o;
1223
+ if (wo.has(n))
1224
+ return wo.get(n);
1225
+ const o = Cc.test(e) ? e.toLowerCase() === e ? !0 : r ? wc(e) === e : !0 : !1;
1226
+ return wo.set(n, o), o;
1227
1227
  }
1228
- function vc(e, t, r, { strict: n } = {}) {
1229
- return O1(e, { strict: !1 }) ? Ac(e, t, r, {
1228
+ function yc(e, t, r, { strict: n } = {}) {
1229
+ return O1(e, { strict: !1 }) ? bc(e, t, r, {
1230
1230
  strict: n
1231
- }) : bc(e, t, r, {
1231
+ }) : vc(e, t, r, {
1232
1232
  strict: n
1233
1233
  });
1234
1234
  }
1235
1235
  function E2(e, t, r) {
1236
1236
  if (r1(e) !== r - t)
1237
- throw new o5({
1237
+ throw new n5({
1238
1238
  offset: r,
1239
1239
  position: "end",
1240
1240
  size: r1(e)
1241
1241
  });
1242
1242
  }
1243
- function bc(e, t, r, { strict: n } = {}) {
1243
+ function vc(e, t, r, { strict: n } = {}) {
1244
1244
  const o = e.slice(t, r);
1245
1245
  return n && E2(o, t, r), o;
1246
1246
  }
1247
- function Ac(e, t, r, { strict: n } = {}) {
1247
+ function bc(e, t, r, { strict: n } = {}) {
1248
1248
  const o = `0x${e.replace("0x", "").slice(t * 2, r * 2)}`;
1249
1249
  return n && E2(o, t, r), o;
1250
1250
  }
1251
- function xc(e) {
1251
+ function Ac(e) {
1252
1252
  const { authorizationList: t } = e;
1253
1253
  if (t)
1254
1254
  for (const r of t) {
@@ -1258,38 +1258,38 @@ function xc(e) {
1258
1258
  if (n < 0)
1259
1259
  throw new Zn({ chainId: n });
1260
1260
  }
1261
- Ei(e);
1261
+ Ii(e);
1262
1262
  }
1263
- function Ec(e) {
1263
+ function xc(e) {
1264
1264
  const { blobVersionedHashes: t } = e;
1265
1265
  if (t) {
1266
1266
  if (t.length === 0)
1267
1267
  throw new w2();
1268
1268
  for (const r of t) {
1269
- const n = r1(r), o = bn(vc(r, 0, 1));
1269
+ const n = r1(r), o = bn(yc(r, 0, 1));
1270
1270
  if (n !== 32)
1271
- throw new nc({ hash: r, size: n });
1271
+ throw new rc({ hash: r, size: n });
1272
1272
  if (o !== m2)
1273
- throw new oc({
1273
+ throw new nc({
1274
1274
  hash: r,
1275
1275
  version: o
1276
1276
  });
1277
1277
  }
1278
1278
  }
1279
- Ei(e);
1279
+ Ii(e);
1280
1280
  }
1281
- function Ei(e) {
1281
+ function Ii(e) {
1282
1282
  const { chainId: t, maxPriorityFeePerGas: r, maxFeePerGas: n, to: o } = e;
1283
1283
  if (t <= 0)
1284
1284
  throw new Zn({ chainId: t });
1285
1285
  if (o && !Tr(o))
1286
1286
  throw new Ur({ address: o });
1287
- if (n && n > vi)
1287
+ if (n && n > bi)
1288
1288
  throw new Qn({ maxFeePerGas: n });
1289
1289
  if (r && n && r > n)
1290
1290
  throw new C2({ maxFeePerGas: n, maxPriorityFeePerGas: r });
1291
1291
  }
1292
- function Ic(e) {
1292
+ function Ec(e) {
1293
1293
  const { chainId: t, maxPriorityFeePerGas: r, gasPrice: n, maxFeePerGas: o, to: i } = e;
1294
1294
  if (t <= 0)
1295
1295
  throw new Zn({ chainId: t });
@@ -1297,10 +1297,10 @@ function Ic(e) {
1297
1297
  throw new Ur({ address: i });
1298
1298
  if (r || o)
1299
1299
  throw new Ge("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");
1300
- if (n && n > vi)
1300
+ if (n && n > bi)
1301
1301
  throw new Qn({ maxFeePerGas: n });
1302
1302
  }
1303
- function Sc(e) {
1303
+ function Ic(e) {
1304
1304
  const { chainId: t, maxPriorityFeePerGas: r, gasPrice: n, maxFeePerGas: o, to: i } = e;
1305
1305
  if (i && !Tr(i))
1306
1306
  throw new Ur({ address: i });
@@ -1308,10 +1308,10 @@ function Sc(e) {
1308
1308
  throw new Zn({ chainId: t });
1309
1309
  if (r || o)
1310
1310
  throw new Ge("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");
1311
- if (n && n > vi)
1311
+ if (n && n > bi)
1312
1312
  throw new Qn({ maxFeePerGas: n });
1313
1313
  }
1314
- function Nc(e) {
1314
+ function Sc(e) {
1315
1315
  if (e.type)
1316
1316
  return e.type;
1317
1317
  if (typeof e.authorizationList < "u")
@@ -1322,7 +1322,7 @@ function Nc(e) {
1322
1322
  return "eip1559";
1323
1323
  if (typeof e.gasPrice < "u")
1324
1324
  return typeof e.accessList < "u" ? "eip2930" : "legacy";
1325
- throw new M5({ transaction: e });
1325
+ throw new R5({ transaction: e });
1326
1326
  }
1327
1327
  function On(e) {
1328
1328
  if (!e || e.length === 0)
@@ -1332,21 +1332,21 @@ function On(e) {
1332
1332
  const { address: n, storageKeys: o } = e[r];
1333
1333
  for (let i = 0; i < o.length; i++)
1334
1334
  if (o[i].length - 2 !== 64)
1335
- throw new W5({ storageKey: o[i] });
1335
+ throw new M5({ storageKey: o[i] });
1336
1336
  if (!Tr(n, { strict: !1 }))
1337
1337
  throw new Ur({ address: n });
1338
1338
  t.push([n, o]);
1339
1339
  }
1340
1340
  return t;
1341
1341
  }
1342
- function Vc(e, t) {
1343
- const r = Nc(e);
1344
- return r === "eip1559" ? Mc(e, t) : r === "eip2930" ? Wc(e, t) : r === "eip4844" ? Rc(e, t) : r === "eip7702" ? kc(e, t) : Bc(e, t);
1342
+ function Nc(e, t) {
1343
+ const r = Sc(e);
1344
+ return r === "eip1559" ? Rc(e, t) : r === "eip2930" ? Mc(e, t) : r === "eip4844" ? kc(e, t) : r === "eip7702" ? Vc(e, t) : Wc(e, t);
1345
1345
  }
1346
- function kc(e, t) {
1346
+ function Vc(e, t) {
1347
1347
  const { authorizationList: r, chainId: n, gas: o, nonce: i, to: a, value: s, maxFeePerGas: c, maxPriorityFeePerGas: u, accessList: f, data: d } = e;
1348
- xc(e);
1349
- const p = On(f), m = B5(r);
1348
+ Ac(e);
1349
+ const p = On(f), m = W5(r);
1350
1350
  return G1([
1351
1351
  "0x04",
1352
1352
  Br([
@@ -1364,20 +1364,20 @@ function kc(e, t) {
1364
1364
  ])
1365
1365
  ]);
1366
1366
  }
1367
- function Rc(e, t) {
1367
+ function kc(e, t) {
1368
1368
  const { chainId: r, gas: n, nonce: o, to: i, value: a, maxFeePerBlobGas: s, maxFeePerGas: c, maxPriorityFeePerGas: u, accessList: f, data: d } = e;
1369
- Ec(e);
1369
+ xc(e);
1370
1370
  let p = e.blobVersionedHashes, m = e.sidecars;
1371
1371
  if (e.blobs && (typeof p > "u" || typeof m > "u")) {
1372
1372
  const x = typeof e.blobs[0] == "string" ? e.blobs : e.blobs.map((R) => yr(R)), S = e.kzg, k = s2({
1373
1373
  blobs: x,
1374
1374
  kzg: S
1375
1375
  });
1376
- if (typeof p > "u" && (p = tc({
1376
+ if (typeof p > "u" && (p = ec({
1377
1377
  commitments: k
1378
1378
  })), typeof m > "u") {
1379
1379
  const R = a2({ blobs: x, commitments: k, kzg: S });
1380
- m = sc({ blobs: x, commitments: k, proofs: R });
1380
+ m = ic({ blobs: x, commitments: k, proofs: R });
1381
1381
  }
1382
1382
  }
1383
1383
  const C = On(f), w = [
@@ -1405,9 +1405,9 @@ function Rc(e, t) {
1405
1405
  Br(m ? [w, v, b, I] : w)
1406
1406
  ]);
1407
1407
  }
1408
- function Mc(e, t) {
1408
+ function Rc(e, t) {
1409
1409
  const { chainId: r, gas: n, nonce: o, to: i, value: a, maxFeePerGas: s, maxPriorityFeePerGas: c, accessList: u, data: f } = e;
1410
- Ei(e);
1410
+ Ii(e);
1411
1411
  const d = On(u), p = [
1412
1412
  me(r),
1413
1413
  o ? me(o) : "0x",
@@ -1425,9 +1425,9 @@ function Mc(e, t) {
1425
1425
  Br(p)
1426
1426
  ]);
1427
1427
  }
1428
- function Wc(e, t) {
1428
+ function Mc(e, t) {
1429
1429
  const { chainId: r, gas: n, data: o, nonce: i, to: a, value: s, accessList: c, gasPrice: u } = e;
1430
- Ic(e);
1430
+ Ec(e);
1431
1431
  const f = On(c), d = [
1432
1432
  me(r),
1433
1433
  i ? me(i) : "0x",
@@ -1444,9 +1444,9 @@ function Wc(e, t) {
1444
1444
  Br(d)
1445
1445
  ]);
1446
1446
  }
1447
- function Bc(e, t) {
1447
+ function Wc(e, t) {
1448
1448
  const { chainId: r = 0, gas: n, data: o, nonce: i, to: a, value: s, gasPrice: c } = e;
1449
- Sc(e);
1449
+ Ic(e);
1450
1450
  let u = [
1451
1451
  i ? me(i) : "0x",
1452
1452
  c ? me(c) : "0x",
@@ -1463,7 +1463,7 @@ function Bc(e, t) {
1463
1463
  return BigInt(r * 2) + BigInt(35n + t.v - 27n);
1464
1464
  const m = 27n + (t.v === 27n ? 0n : 1n);
1465
1465
  if (t.v !== m)
1466
- throw new R5({ v: t.v });
1466
+ throw new k5({ v: t.v });
1467
1467
  return m;
1468
1468
  })(), d = vn(t.r), p = vn(t.s);
1469
1469
  u = [
@@ -1491,7 +1491,7 @@ function z1(e, t) {
1491
1491
  const i = vn(r.r), a = vn(r.s);
1492
1492
  return [typeof o == "number" ? o ? me(1) : "0x" : n === 0n ? "0x" : n === 1n ? me(1) : n === 27n ? "0x" : me(1), i === "0x00" ? "0x" : i, a === "0x00" ? "0x" : a];
1493
1493
  }
1494
- const Uc = {
1494
+ const Bc = {
1495
1495
  gasPriceOracle: { address: "0x420000000000000000000000000000000000000F" },
1496
1496
  l1Block: { address: "0x4200000000000000000000000000000000000015" },
1497
1497
  l2CrossDomainMessenger: {
@@ -1502,27 +1502,27 @@ const Uc = {
1502
1502
  l2ToL1MessagePasser: {
1503
1503
  address: "0x4200000000000000000000000000000000000016"
1504
1504
  }
1505
- }, Tc = {
1506
- block: /* @__PURE__ */ w5({
1505
+ }, Uc = {
1506
+ block: /* @__PURE__ */ m5({
1507
1507
  format(e) {
1508
1508
  return {
1509
1509
  transactions: e.transactions?.map((r) => {
1510
1510
  if (typeof r == "string")
1511
1511
  return r;
1512
- const n = yi(r);
1512
+ const n = vi(r);
1513
1513
  return n.typeHex === "0x7e" && (n.isSystemTx = r.isSystemTx, n.mint = r.mint ? Dr(r.mint) : void 0, n.sourceHash = r.sourceHash, n.type = "deposit"), n;
1514
1514
  }),
1515
1515
  stateRoot: e.stateRoot
1516
1516
  };
1517
1517
  }
1518
1518
  }),
1519
- transaction: /* @__PURE__ */ g5({
1519
+ transaction: /* @__PURE__ */ h5({
1520
1520
  format(e) {
1521
1521
  const t = {};
1522
1522
  return e.type === "0x7e" && (t.isSystemTx = e.isSystemTx, t.mint = e.mint ? Dr(e.mint) : void 0, t.sourceHash = e.sourceHash, t.type = "deposit"), t;
1523
1523
  }
1524
1524
  }),
1525
- transactionReceipt: /* @__PURE__ */ b5({
1525
+ transactionReceipt: /* @__PURE__ */ v5({
1526
1526
  format(e) {
1527
1527
  return {
1528
1528
  l1GasPrice: e.l1GasPrice ? Dr(e.l1GasPrice) : null,
@@ -1533,14 +1533,14 @@ const Uc = {
1533
1533
  }
1534
1534
  })
1535
1535
  };
1536
- function Lc(e, t) {
1537
- return qc(e) ? Kc(e) : Vc(e, t);
1536
+ function Tc(e, t) {
1537
+ return Kc(e) ? Fc(e) : Nc(e, t);
1538
1538
  }
1539
- const Fc = {
1540
- transaction: Lc
1539
+ const Lc = {
1540
+ transaction: Tc
1541
1541
  };
1542
- function Kc(e) {
1543
- Zc(e);
1542
+ function Fc(e) {
1543
+ qc(e);
1544
1544
  const { sourceHash: t, data: r, from: n, gas: o, isSystemTx: i, mint: a, to: s, value: c } = e, u = [
1545
1545
  t,
1546
1546
  n,
@@ -1556,10 +1556,10 @@ function Kc(e) {
1556
1556
  Br(u)
1557
1557
  ]);
1558
1558
  }
1559
- function qc(e) {
1559
+ function Kc(e) {
1560
1560
  return e.type === "deposit" || typeof e.sourceHash < "u";
1561
1561
  }
1562
- function Zc(e) {
1562
+ function qc(e) {
1563
1563
  const { from: t, to: r } = e;
1564
1564
  if (t && !Tr(t))
1565
1565
  throw new Ur({ address: t });
@@ -1568,10 +1568,10 @@ function Zc(e) {
1568
1568
  }
1569
1569
  const As = {
1570
1570
  blockTime: 2e3,
1571
- contracts: Uc,
1572
- formatters: Tc,
1573
- serializers: Fc
1574
- }, Qc = 42161, Ii = /* @__PURE__ */ Q1({
1571
+ contracts: Bc,
1572
+ formatters: Uc,
1573
+ serializers: Lc
1574
+ }, Zc = 42161, Gn = /* @__PURE__ */ Q1({
1575
1575
  id: 33139,
1576
1576
  name: "Ape Chain",
1577
1577
  nativeCurrency: {
@@ -1598,8 +1598,8 @@ const As = {
1598
1598
  blockCreated: 20889
1599
1599
  }
1600
1600
  },
1601
- sourceId: Qc
1602
- }), b1 = 1, Oc = /* @__PURE__ */ Q1({
1601
+ sourceId: Zc
1602
+ }), b1 = 1, Qc = /* @__PURE__ */ Q1({
1603
1603
  ...As,
1604
1604
  id: 8453,
1605
1605
  name: "Base",
@@ -1662,7 +1662,7 @@ const As = {
1662
1662
  }
1663
1663
  },
1664
1664
  testnet: !0
1665
- }), Gc = /* @__PURE__ */ Q1({
1665
+ }), Oc = /* @__PURE__ */ Q1({
1666
1666
  id: 1,
1667
1667
  name: "Ethereum",
1668
1668
  nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
@@ -1689,7 +1689,7 @@ const As = {
1689
1689
  blockCreated: 14353601
1690
1690
  }
1691
1691
  }
1692
- }), zc = /* @__PURE__ */ Q1({
1692
+ }), Gc = /* @__PURE__ */ Q1({
1693
1693
  id: 137,
1694
1694
  name: "Polygon",
1695
1695
  nativeCurrency: { name: "POL", symbol: "POL", decimals: 18 },
@@ -1712,7 +1712,7 @@ const As = {
1712
1712
  }
1713
1713
  }
1714
1714
  });
1715
- function Jc(e) {
1715
+ function zc(e) {
1716
1716
  return /* @__PURE__ */ E("svg", { viewBox: "0 0 2107 2101", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e, children: [
1717
1717
  /* @__PURE__ */ E("g", { clipPath: "url(#clip0_110_902)", children: [
1718
1718
  /* @__PURE__ */ l("rect", { width: "2107", height: "2101", rx: "1050.5", fill: "#0054F9" }),
@@ -1862,7 +1862,7 @@ function Jc(e) {
1862
1862
  ] })
1863
1863
  ] });
1864
1864
  }
1865
- function Yc(e) {
1865
+ function Jc(e) {
1866
1866
  return /* @__PURE__ */ E("svg", { viewBox: "0 0 2107 2101", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e, children: [
1867
1867
  /* @__PURE__ */ E("g", { clipPath: "url(#clip0_110_965)", children: [
1868
1868
  /* @__PURE__ */ l("rect", { width: "2107", height: "2101", rx: "1050.5", fill: "#0054F9" }),
@@ -2409,14 +2409,14 @@ function Es(e) {
2409
2409
  )
2410
2410
  ] });
2411
2411
  }
2412
- function Dc(e) {
2412
+ function Yc(e) {
2413
2413
  return /* @__PURE__ */ E("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 2000 2000", ...e, children: [
2414
2414
  /* @__PURE__ */ l("path", { d: "M1000 2000c554.17 0 1000-445.83 1000-1000S1554.17 0 1000 0 0 445.83 0 1000s445.83 1000 1000 1000z", fill: "#2775ca" }),
2415
2415
  /* @__PURE__ */ l("path", { d: "M1275 1158.33c0-145.83-87.5-195.83-262.5-216.66-125-16.67-150-50-150-108.34s41.67-95.83 125-95.83c75 0 116.67 25 137.5 87.5 4.17 12.5 16.67 20.83 29.17 20.83h66.66c16.67 0 29.17-12.5 29.17-29.16v-4.17c-16.67-91.67-91.67-162.5-187.5-170.83v-100c0-16.67-12.5-29.17-33.33-33.34h-62.5c-16.67 0-29.17 12.5-33.34 33.34v95.83c-125 16.67-204.16 100-204.16 204.17 0 137.5 83.33 191.66 258.33 212.5 116.67 20.83 154.17 45.83 154.17 112.5s-58.34 112.5-137.5 112.5c-108.34 0-145.84-45.84-158.34-108.34-4.16-16.66-16.66-25-29.16-25h-70.84c-16.66 0-29.16 12.5-29.16 29.17v4.17c16.66 104.16 83.33 179.16 220.83 200v100c0 16.66 12.5 29.16 33.33 33.33h62.5c16.67 0 29.17-12.5 33.34-33.33v-100c125-20.84 208.33-108.34 208.33-220.84z", fill: "#fff" }),
2416
2416
  /* @__PURE__ */ l("path", { d: "M787.5 1595.83c-325-116.66-491.67-479.16-370.83-800 62.5-175 200-308.33 370.83-370.83 16.67-8.33 25-20.83 25-41.67V325c0-16.67-8.33-29.17-25-33.33-4.17 0-12.5 0-16.67 4.16-395.83 125-612.5 545.84-487.5 941.67 75 233.33 254.17 412.5 487.5 487.5 16.67 8.33 33.34 0 37.5-16.67 4.17-4.16 4.17-8.33 4.17-16.66v-58.34c0-12.5-12.5-29.16-25-37.5zM1229.17 295.83c-16.67-8.33-33.34 0-37.5 16.67-4.17 4.17-4.17 8.33-4.17 16.67v58.33c0 16.67 12.5 33.33 25 41.67 325 116.66 491.67 479.16 370.83 800-62.5 175-200 308.33-370.83 370.83-16.67 8.33-25 20.83-25 41.67V1700c0 16.67 8.33 29.17 25 33.33 4.17 0 12.5 0 16.67-4.16 395.83-125 612.5-545.84 487.5-941.67-75-237.5-258.34-416.67-487.5-491.67z", fill: "#fff" })
2417
2417
  ] });
2418
2418
  }
2419
- function Xc(e) {
2419
+ function Dc(e) {
2420
2420
  return /* @__PURE__ */ l("svg", { width: "256", height: "256", viewBox: "0 0 256 256", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e, children: /* @__PURE__ */ l("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M256 128C256 198.692 198.592 256 127.777 256C60.5909 256 5.47394 204.417 0 138.759H169.482V117.24H0C5.47394 51.583 60.5909 0 127.777 0C198.592 0 256 57.3074 256 128Z", fill: "#0052FF" }) });
2421
2421
  }
2422
2422
  function N2(e) {
@@ -2430,22 +2430,25 @@ function N2(e) {
2430
2430
  ] }) })
2431
2431
  ] });
2432
2432
  }
2433
- const Hc = "https://useglyph.io", jt = "cly38x0w10ac945q9yg9sm71i", _t = "clxt9p8e601al6tgmsyhu7j3t", qg = "https://useglyph.io", Pc = "https://i.ibb.co/TxcwPQyr/Group-12489-1.png", jc = 60 * 1e3, Is = 60 * 1e3;
2433
+ const Xc = "https://useglyph.io", jt = "cly38x0w10ac945q9yg9sm71i", _t = "clxt9p8e601al6tgmsyhu7j3t", qg = "https://useglyph.io", Hc = "https://i.ibb.co/TxcwPQyr/Group-12489-1.png", Pc = 60 * 1e3, Is = 60 * 1e3;
2434
2434
  var er = /* @__PURE__ */ ((e) => (e.PRIMARY = "primary", e.SUCCESS = "success", e.ERROR = "error", e))(er || {}), Ie = /* @__PURE__ */ ((e) => (e.MAIN = "main", e.FUND = "fund", e.SEND = "send", e.RECEIVE = "receive", e.PROFILE = "profile", e))(Ie || {}), Oe = /* @__PURE__ */ ((e) => (e.HOME = "home", e.ACTIVITY = "activity", e.TOKENS = "tokens", e.NFTS = "nfts", e.LINKED_ACCOUNTS = "linked-accounts", e))(Oe || {}), Ht = /* @__PURE__ */ ((e) => (e.BUY = "fund-buy", e.WAIT = "fund-wait", e.END = "fund-end", e))(Ht || {}), at = /* @__PURE__ */ ((e) => (e.ENTER_ADDRESS = "send-enter-address", e.ENTER_AMOUNT = "send-enter-amount", e.WAIT = "send-wait", e.END = "send-end", e))(at || {});
2435
2435
  const Ss = {
2436
- [Ii.id]: Es,
2436
+ [Gn.id]: Es,
2437
2437
  [I2.id]: Es,
2438
- [Gc.id]: Si,
2439
- [Oc.id]: Xc,
2440
- [zc.id]: N2
2441
- }, Yo = {
2438
+ [Oc.id]: Si,
2439
+ [Qc.id]: Dc,
2440
+ [Gc.id]: N2
2441
+ }, jc = {
2442
+ [Gn.id]: "ApeChain"
2443
+ // Remove after https://github.com/wevm/viem/pull/4080 is merged
2444
+ }, Do = {
2442
2445
  APE: S2,
2443
- ApeETH: Jc,
2444
- ApeUSD: Yc,
2446
+ ApeETH: zc,
2447
+ ApeUSD: Jc,
2445
2448
  WAPE: xs,
2446
2449
  wAPE: xs,
2447
2450
  ETH: Si,
2448
- USDC: Dc
2451
+ USDC: Yc
2449
2452
  }, _c = {
2450
2453
  APE: S2,
2451
2454
  ETH: Si,
@@ -2453,12 +2456,12 @@ const Ss = {
2453
2456
  }, pr = "gw-grayscale", i1 = /* @__PURE__ */ new Map([[I2.id, !0]]), gt = {
2454
2457
  id: "io.useglyph.privy",
2455
2458
  name: "Glyph",
2456
- iconUrl: Pc,
2459
+ iconUrl: Hc,
2457
2460
  iconBackground: "#ffffff",
2458
2461
  shortName: "Glyph",
2459
2462
  type: "injected"
2460
2463
  }, Fe = () => {
2461
- const e = tr(wi);
2464
+ const e = tr(Ci);
2462
2465
  if (!e) throw new Error("useGlyph must be used within GlyphProvider");
2463
2466
  const t = tr(Fn);
2464
2467
  if (!t) throw new Error("useGlyph must be used within GlyphUserDataProvider");
@@ -2478,7 +2481,7 @@ const Ss = {
2478
2481
  signMessage: a,
2479
2482
  nativeSymbol: w,
2480
2483
  sendTransaction: s,
2481
- glyphUrl: c || Hc,
2484
+ glyphUrl: c || Xc,
2482
2485
  // Return the glyphUrl if it is overridden, otherwise return the default dashboard URL from envs
2483
2486
  hideWidget: u
2484
2487
  };
@@ -2595,9 +2598,9 @@ const Ni = "-", t6 = (e) => {
2595
2598
  validators: []
2596
2599
  };
2597
2600
  return i6(Object.entries(e.classGroups), r).forEach(([i, a]) => {
2598
- Do(a, n, i, t);
2601
+ Xo(a, n, i, t);
2599
2602
  }), n;
2600
- }, Do = (e, t, r, n) => {
2603
+ }, Xo = (e, t, r, n) => {
2601
2604
  e.forEach((o) => {
2602
2605
  if (typeof o == "string") {
2603
2606
  const i = o === "" ? t : ks(t, o);
@@ -2606,7 +2609,7 @@ const Ni = "-", t6 = (e) => {
2606
2609
  }
2607
2610
  if (typeof o == "function") {
2608
2611
  if (o6(o)) {
2609
- Do(o(n), t, r, n);
2612
+ Xo(o(n), t, r, n);
2610
2613
  return;
2611
2614
  }
2612
2615
  t.validators.push({
@@ -2616,7 +2619,7 @@ const Ni = "-", t6 = (e) => {
2616
2619
  return;
2617
2620
  }
2618
2621
  Object.entries(o).forEach(([i, a]) => {
2619
- Do(a, ks(t, i), r, n);
2622
+ Xo(a, ks(t, i), r, n);
2620
2623
  });
2621
2624
  });
2622
2625
  }, ks = (e, t) => {
@@ -2772,7 +2775,7 @@ function Rs(e, ...t) {
2772
2775
  const We = (e) => {
2773
2776
  const t = (r) => r[e] || [];
2774
2777
  return t.isThemeGetter = !0, t;
2775
- }, U2 = /^\[(?:([a-z-]+):)?(.+)\]$/i, h6 = /^\d+\/\d+$/, g6 = /* @__PURE__ */ new Set(["px", "full", "screen"]), p6 = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, m6 = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, w6 = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, C6 = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, y6 = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Dt = (e) => _r(e) || g6.has(e) || h6.test(e), cr = (e) => g1(e, "length", N6), _r = (e) => !!e && !Number.isNaN(Number(e)), wo = (e) => g1(e, "number", _r), A1 = (e) => !!e && Number.isInteger(Number(e)), v6 = (e) => e.endsWith("%") && _r(e.slice(0, -1)), de = (e) => U2.test(e), ur = (e) => p6.test(e), b6 = /* @__PURE__ */ new Set(["length", "size", "percentage"]), A6 = (e) => g1(e, b6, T2), x6 = (e) => g1(e, "position", T2), E6 = /* @__PURE__ */ new Set(["image", "url"]), I6 = (e) => g1(e, E6, k6), S6 = (e) => g1(e, "", V6), x1 = () => !0, g1 = (e, t, r) => {
2778
+ }, U2 = /^\[(?:([a-z-]+):)?(.+)\]$/i, h6 = /^\d+\/\d+$/, g6 = /* @__PURE__ */ new Set(["px", "full", "screen"]), p6 = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, m6 = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, w6 = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, C6 = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, y6 = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Dt = (e) => _r(e) || g6.has(e) || h6.test(e), cr = (e) => g1(e, "length", N6), _r = (e) => !!e && !Number.isNaN(Number(e)), Co = (e) => g1(e, "number", _r), A1 = (e) => !!e && Number.isInteger(Number(e)), v6 = (e) => e.endsWith("%") && _r(e.slice(0, -1)), de = (e) => U2.test(e), ur = (e) => p6.test(e), b6 = /* @__PURE__ */ new Set(["length", "size", "percentage"]), A6 = (e) => g1(e, b6, T2), x6 = (e) => g1(e, "position", T2), E6 = /* @__PURE__ */ new Set(["image", "url"]), I6 = (e) => g1(e, E6, k6), S6 = (e) => g1(e, "", V6), x1 = () => !0, g1 = (e, t, r) => {
2776
2779
  const n = U2.exec(e);
2777
2780
  return n ? n[1] ? typeof t == "string" ? n[1] === t : t.has(n[1]) : r(n[2]) : !1;
2778
2781
  }, N6 = (e) => (
@@ -3469,7 +3472,7 @@ const We = (e) => {
3469
3472
  * @see https://tailwindcss.com/docs/font-weight
3470
3473
  */
3471
3474
  "font-weight": [{
3472
- font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", wo]
3475
+ font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", Co]
3473
3476
  }],
3474
3477
  /**
3475
3478
  * Font Family
@@ -3520,7 +3523,7 @@ const We = (e) => {
3520
3523
  * @see https://tailwindcss.com/docs/line-clamp
3521
3524
  */
3522
3525
  "line-clamp": [{
3523
- "line-clamp": ["none", _r, wo]
3526
+ "line-clamp": ["none", _r, Co]
3524
3527
  }],
3525
3528
  /**
3526
3529
  * Line Height
@@ -4734,7 +4737,7 @@ const We = (e) => {
4734
4737
  * @see https://tailwindcss.com/docs/stroke-width
4735
4738
  */
4736
4739
  "stroke-w": [{
4737
- stroke: [Dt, cr, wo]
4740
+ stroke: [Dt, cr, Co]
4738
4741
  }],
4739
4742
  /**
4740
4743
  * Stroke
@@ -4866,14 +4869,14 @@ const K6 = "GlyphWidget", J1 = (e) => {
4866
4869
  };
4867
4870
  };
4868
4871
  function q6(e, t) {
4869
- return BigInt(M0(e.toString(), t));
4872
+ return BigInt(R0(e.toString(), t));
4870
4873
  }
4871
4874
  const tn = (e, t = 2) => Number(
4872
4875
  e?.toLocaleString?.("en-US", {
4873
4876
  minimumFractionDigits: 0,
4874
4877
  maximumFractionDigits: t
4875
4878
  })?.replace(/,/g, "") || "0"
4876
- ), Z6 = (e, t) => Z0({
4879
+ ), Z6 = (e, t) => q0({
4877
4880
  target: {
4878
4881
  id: t ? _t : jt,
4879
4882
  name: gt.name,
@@ -4985,7 +4988,7 @@ const Y6 = wt(
4985
4988
  children: i,
4986
4989
  iconNode: a,
4987
4990
  ...s
4988
- }, c) => Go(
4991
+ }, c) => zo(
4989
4992
  "svg",
4990
4993
  {
4991
4994
  ref: c,
@@ -4999,7 +5002,7 @@ const Y6 = wt(
4999
5002
  ...s
5000
5003
  },
5001
5004
  [
5002
- ...a.map(([u, f]) => Go(u, f)),
5005
+ ...a.map(([u, f]) => zo(u, f)),
5003
5006
  ...Array.isArray(i) ? i : [i]
5004
5007
  ]
5005
5008
  )
@@ -5012,7 +5015,7 @@ const Y6 = wt(
5012
5015
  */
5013
5016
  const Y1 = (e, t) => {
5014
5017
  const r = wt(
5015
- ({ className: n, ...o }, i) => Go(Y6, {
5018
+ ({ className: n, ...o }, i) => zo(Y6, {
5016
5019
  ref: i,
5017
5020
  iconNode: t,
5018
5021
  className: L2(
@@ -5177,7 +5180,7 @@ const Ts = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ls = R2, s
5177
5180
  ] : u;
5178
5181
  }, []);
5179
5182
  return Ls(e, a, c, r?.class, r?.className);
5180
- }, Gn = s7(
5183
+ }, zn = s7(
5181
5184
  "gw-inline-flex gw-font-display gw-items-center gw-justify-center gw-ease-in-out gw-gap-2 gw-whitespace-nowrap gw-rounded-full gw-font-medium gw-ring-offset-background gw-transition focus-visible:gw-outline-none focus-visible:gw-ring-2 focus-visible:gw-ring-ring focus-visible:gw-ring-offset-2 disabled:gw-pointer-events-none disabled:gw-opacity-50 [&_svg]:gw-pointer-events-none [&_svg]:gw-size-4 [&_svg]:gw-shrink-0",
5182
5185
  {
5183
5186
  variants: {
@@ -5220,7 +5223,7 @@ const Ts = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ls = R2, s
5220
5223
  ({ className: e, variant: t, size: r, shadow: n, scale: o, asChild: i = !1, ...a }, s) => /* @__PURE__ */ l(
5221
5224
  i ? e7 : "button",
5222
5225
  {
5223
- className: ae(Gn({ variant: t, size: r, className: e, shadow: n, scale: o })),
5226
+ className: ae(zn({ variant: t, size: r, className: e, shadow: n, scale: o })),
5224
5227
  ref: s,
5225
5228
  ...a
5226
5229
  }
@@ -5402,11 +5405,11 @@ function m7(e, t = globalThis?.document) {
5402
5405
  return t.addEventListener("keydown", n, { capture: !0 }), () => t.removeEventListener("keydown", n, { capture: !0 });
5403
5406
  }, [r, t]);
5404
5407
  }
5405
- var w7 = "DismissableLayer", Xo = "dismissableLayer.update", C7 = "dismissableLayer.pointerDownOutside", y7 = "dismissableLayer.focusOutside", Fs, Q2 = N.createContext({
5408
+ var w7 = "DismissableLayer", Ho = "dismissableLayer.update", C7 = "dismissableLayer.pointerDownOutside", y7 = "dismissableLayer.focusOutside", Fs, Q2 = N.createContext({
5406
5409
  layers: /* @__PURE__ */ new Set(),
5407
5410
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
5408
5411
  branches: /* @__PURE__ */ new Set()
5409
- }), zn = N.forwardRef(
5412
+ }), Jn = N.forwardRef(
5410
5413
  (e, t) => {
5411
5414
  const {
5412
5415
  disableOutsidePointerEvents: r = !1,
@@ -5434,7 +5437,7 @@ var w7 = "DismissableLayer", Xo = "dismissableLayer.update", C7 = "dismissableLa
5434
5437
  f && (u.layers.delete(f), u.layersWithOutsidePointerEventsDisabled.delete(f), Ks());
5435
5438
  }, [f, u]), N.useEffect(() => {
5436
5439
  const B = () => m({});
5437
- return document.addEventListener(Xo, B), () => document.removeEventListener(Xo, B);
5440
+ return document.addEventListener(Ho, B), () => document.removeEventListener(Ho, B);
5438
5441
  }, []), /* @__PURE__ */ l(
5439
5442
  Je.div,
5440
5443
  {
@@ -5454,7 +5457,7 @@ var w7 = "DismissableLayer", Xo = "dismissableLayer.update", C7 = "dismissableLa
5454
5457
  );
5455
5458
  }
5456
5459
  );
5457
- zn.displayName = w7;
5460
+ Jn.displayName = w7;
5458
5461
  var v7 = "DismissableLayerBranch", b7 = N.forwardRef((e, t) => {
5459
5462
  const r = N.useContext(Q2), n = N.useRef(null), o = je(t, n);
5460
5463
  return N.useEffect(() => {
@@ -5511,14 +5514,14 @@ function x7(e, t = globalThis?.document) {
5511
5514
  };
5512
5515
  }
5513
5516
  function Ks() {
5514
- const e = new CustomEvent(Xo);
5517
+ const e = new CustomEvent(Ho);
5515
5518
  document.dispatchEvent(e);
5516
5519
  }
5517
5520
  function O2(e, t, r, { discrete: n }) {
5518
5521
  const o = r.originalEvent.target, i = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: r });
5519
5522
  t && o.addEventListener(e, t, { once: !0 }), n ? p7(o, i) : o.dispatchEvent(i);
5520
5523
  }
5521
- var Co = "focusScope.autoFocusOnMount", yo = "focusScope.autoFocusOnUnmount", qs = { bubbles: !1, cancelable: !0 }, E7 = "FocusScope", Vi = N.forwardRef((e, t) => {
5524
+ var yo = "focusScope.autoFocusOnMount", vo = "focusScope.autoFocusOnUnmount", qs = { bubbles: !1, cancelable: !0 }, E7 = "FocusScope", Vi = N.forwardRef((e, t) => {
5522
5525
  const {
5523
5526
  loop: r = !1,
5524
5527
  trapped: n = !1,
@@ -5560,13 +5563,13 @@ var Co = "focusScope.autoFocusOnMount", yo = "focusScope.autoFocusOnUnmount", qs
5560
5563
  Qs.add(m);
5561
5564
  const w = document.activeElement;
5562
5565
  if (!s.contains(w)) {
5563
- const b = new CustomEvent(Co, qs);
5564
- s.addEventListener(Co, u), s.dispatchEvent(b), b.defaultPrevented || (I7(R7(G2(s)), { select: !0 }), document.activeElement === w && fr(s));
5566
+ const b = new CustomEvent(yo, qs);
5567
+ s.addEventListener(yo, u), s.dispatchEvent(b), b.defaultPrevented || (I7(R7(G2(s)), { select: !0 }), document.activeElement === w && fr(s));
5565
5568
  }
5566
5569
  return () => {
5567
- s.removeEventListener(Co, u), setTimeout(() => {
5568
- const b = new CustomEvent(yo, qs);
5569
- s.addEventListener(yo, f), s.dispatchEvent(b), b.defaultPrevented || fr(w ?? document.body, { select: !0 }), s.removeEventListener(yo, f), Qs.remove(m);
5570
+ s.removeEventListener(yo, u), setTimeout(() => {
5571
+ const b = new CustomEvent(vo, qs);
5572
+ s.addEventListener(vo, f), s.dispatchEvent(b), b.defaultPrevented || fr(w ?? document.body, { select: !0 }), s.removeEventListener(vo, f), Qs.remove(m);
5570
5573
  }, 0);
5571
5574
  };
5572
5575
  }
@@ -5717,12 +5720,12 @@ function U7(e) {
5717
5720
  let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning;
5718
5721
  return r ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
5719
5722
  }
5720
- var vo = 0;
5723
+ var bo = 0;
5721
5724
  function z2() {
5722
5725
  N.useEffect(() => {
5723
5726
  const e = document.querySelectorAll("[data-radix-focus-guard]");
5724
- return document.body.insertAdjacentElement("afterbegin", e[0] ?? Gs()), document.body.insertAdjacentElement("beforeend", e[1] ?? Gs()), vo++, () => {
5725
- vo === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), vo--;
5727
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? Gs()), document.body.insertAdjacentElement("beforeend", e[1] ?? Gs()), bo++, () => {
5728
+ bo === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), bo--;
5726
5729
  };
5727
5730
  }, []);
5728
5731
  }
@@ -5753,7 +5756,7 @@ function T7(e, t, r) {
5753
5756
  return e.concat(i || Array.prototype.slice.call(t));
5754
5757
  }
5755
5758
  var mn = "right-scroll-bar-position", wn = "width-before-scroll-bar", L7 = "with-scroll-bars-hidden", F7 = "--removed-body-scroll-bar-size";
5756
- function bo(e, t) {
5759
+ function Ao(e, t) {
5757
5760
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
5758
5761
  }
5759
5762
  function K7(e, t) {
@@ -5781,7 +5784,7 @@ var q7 = typeof window < "u" ? N.useLayoutEffect : N.useEffect, zs = /* @__PURE_
5781
5784
  function Z7(e, t) {
5782
5785
  var r = K7(null, function(n) {
5783
5786
  return e.forEach(function(o) {
5784
- return bo(o, n);
5787
+ return Ao(o, n);
5785
5788
  });
5786
5789
  });
5787
5790
  return q7(function() {
@@ -5789,9 +5792,9 @@ function Z7(e, t) {
5789
5792
  if (n) {
5790
5793
  var o = new Set(n), i = new Set(e), a = r.current;
5791
5794
  o.forEach(function(s) {
5792
- i.has(s) || bo(s, null);
5795
+ i.has(s) || Ao(s, null);
5793
5796
  }), i.forEach(function(s) {
5794
- o.has(s) || bo(s, a);
5797
+ o.has(s) || Ao(s, a);
5795
5798
  });
5796
5799
  }
5797
5800
  zs.set(r, e);
@@ -5873,12 +5876,12 @@ Y2.isSideCarExport = !0;
5873
5876
  function z7(e, t) {
5874
5877
  return e.useMedium(t), Y2;
5875
5878
  }
5876
- var D2 = G7(), Ao = function() {
5877
- }, Jn = N.forwardRef(function(e, t) {
5879
+ var D2 = G7(), xo = function() {
5880
+ }, Yn = N.forwardRef(function(e, t) {
5878
5881
  var r = N.useRef(null), n = N.useState({
5879
- onScrollCapture: Ao,
5880
- onWheelCapture: Ao,
5881
- onTouchMoveCapture: Ao
5882
+ onScrollCapture: xo,
5883
+ onWheelCapture: xo,
5884
+ onTouchMoveCapture: xo
5882
5885
  }), o = n[0], i = n[1], a = e.forwardProps, s = e.children, c = e.className, u = e.removeScrollBar, f = e.enabled, d = e.shards, p = e.sideCar, m = e.noRelative, C = e.noIsolation, w = e.inert, v = e.allowPinchZoom, b = e.as, I = b === void 0 ? "div" : b, x = e.gapMode, S = J2(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), k = p, R = Z7([r, t]), B = Kt(Kt({}, S), o);
5883
5886
  return N.createElement(
5884
5887
  N.Fragment,
@@ -5887,12 +5890,12 @@ var D2 = G7(), Ao = function() {
5887
5890
  a ? N.cloneElement(N.Children.only(s), Kt(Kt({}, B), { ref: R })) : N.createElement(I, Kt({}, B, { className: c, ref: R }), s)
5888
5891
  );
5889
5892
  });
5890
- Jn.defaultProps = {
5893
+ Yn.defaultProps = {
5891
5894
  enabled: !0,
5892
5895
  removeScrollBar: !0,
5893
5896
  inert: !1
5894
5897
  };
5895
- Jn.classNames = {
5898
+ Yn.classNames = {
5896
5899
  fullWidth: wn,
5897
5900
  zeroRight: mn
5898
5901
  };
@@ -5945,11 +5948,11 @@ var H7 = function() {
5945
5948
  top: 0,
5946
5949
  right: 0,
5947
5950
  gap: 0
5948
- }, xo = function(e) {
5951
+ }, Eo = function(e) {
5949
5952
  return parseInt(e || "", 10) || 0;
5950
5953
  }, _7 = function(e) {
5951
5954
  var t = window.getComputedStyle(document.body), r = t[e === "padding" ? "paddingLeft" : "marginLeft"], n = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
5952
- return [xo(r), xo(n), xo(o)];
5955
+ return [Eo(r), Eo(n), Eo(o)];
5953
5956
  }, $7 = function(e) {
5954
5957
  if (e === void 0 && (e = "margin"), typeof window > "u")
5955
5958
  return j7;
@@ -6021,19 +6024,19 @@ var H7 = function() {
6021
6024
  return $7(o);
6022
6025
  }, [o]);
6023
6026
  return N.createElement(e4, { styles: t4(i, !t, o, r ? "" : "!important") });
6024
- }, Ho = !1;
6027
+ }, Po = !1;
6025
6028
  if (typeof window < "u")
6026
6029
  try {
6027
6030
  var nn = Object.defineProperty({}, "passive", {
6028
6031
  get: function() {
6029
- return Ho = !0, !0;
6032
+ return Po = !0, !0;
6030
6033
  }
6031
6034
  });
6032
6035
  window.addEventListener("test", nn, nn), window.removeEventListener("test", nn, nn);
6033
6036
  } catch {
6034
- Ho = !1;
6037
+ Po = !1;
6035
6038
  }
6036
- var Gr = Ho ? { passive: !1 } : !1, o4 = function(e) {
6039
+ var Gr = Po ? { passive: !1 } : !1, o4 = function(e) {
6037
6040
  return e.tagName === "TEXTAREA";
6038
6041
  }, H2 = function(e, t) {
6039
6042
  if (!(e instanceof Element))
@@ -6199,15 +6202,15 @@ function p4(e) {
6199
6202
  }
6200
6203
  const m4 = z7(D2, g4);
6201
6204
  var Ri = N.forwardRef(function(e, t) {
6202
- return N.createElement(Jn, Kt({}, e, { ref: t, sideCar: m4 }));
6205
+ return N.createElement(Yn, Kt({}, e, { ref: t, sideCar: m4 }));
6203
6206
  });
6204
- Ri.classNames = Jn.classNames;
6207
+ Ri.classNames = Yn.classNames;
6205
6208
  var w4 = function(e) {
6206
6209
  if (typeof document > "u")
6207
6210
  return null;
6208
6211
  var t = Array.isArray(e) ? e[0] : e;
6209
6212
  return t.ownerDocument.body;
6210
- }, Jr = /* @__PURE__ */ new WeakMap(), sn = /* @__PURE__ */ new WeakMap(), an = {}, Eo = 0, _2 = function(e) {
6213
+ }, Jr = /* @__PURE__ */ new WeakMap(), sn = /* @__PURE__ */ new WeakMap(), an = {}, Io = 0, _2 = function(e) {
6211
6214
  return e && (e.host || _2(e.parentNode));
6212
6215
  }, C4 = function(e, t) {
6213
6216
  return t.map(function(r) {
@@ -6238,11 +6241,11 @@ var w4 = function(e) {
6238
6241
  }
6239
6242
  });
6240
6243
  };
6241
- return f(t), s.clear(), Eo++, function() {
6244
+ return f(t), s.clear(), Io++, function() {
6242
6245
  a.forEach(function(d) {
6243
6246
  var p = Jr.get(d) - 1, m = i.get(d) - 1;
6244
6247
  Jr.set(d, p), i.set(d, m), p || (sn.has(d) || d.removeAttribute(n), sn.delete(d)), m || d.removeAttribute(r);
6245
- }), Eo--, Eo || (Jr = /* @__PURE__ */ new WeakMap(), Jr = /* @__PURE__ */ new WeakMap(), sn = /* @__PURE__ */ new WeakMap(), an = {});
6248
+ }), Io--, Io || (Jr = /* @__PURE__ */ new WeakMap(), Jr = /* @__PURE__ */ new WeakMap(), sn = /* @__PURE__ */ new WeakMap(), an = {});
6246
6249
  };
6247
6250
  }, $2 = function(e, t, r) {
6248
6251
  r === void 0 && (r = "data-aria-hidden");
@@ -6250,7 +6253,7 @@ var w4 = function(e) {
6250
6253
  return o ? (n.push.apply(n, Array.from(o.querySelectorAll("[aria-live], script"))), y4(n, o, r, "aria-hidden")) : function() {
6251
6254
  return null;
6252
6255
  };
6253
- }, Yn = "Dialog", [el] = Qr(Yn), [v4, Bt] = el(Yn), tl = (e) => {
6256
+ }, Dn = "Dialog", [el] = Qr(Dn), [v4, Bt] = el(Dn), tl = (e) => {
6254
6257
  const {
6255
6258
  __scopeDialog: t,
6256
6259
  children: r,
@@ -6262,7 +6265,7 @@ var w4 = function(e) {
6262
6265
  prop: n,
6263
6266
  defaultProp: o ?? !1,
6264
6267
  onChange: i,
6265
- caller: Yn
6268
+ caller: Dn
6266
6269
  });
6267
6270
  return /* @__PURE__ */ l(
6268
6271
  v4,
@@ -6281,7 +6284,7 @@ var w4 = function(e) {
6281
6284
  }
6282
6285
  );
6283
6286
  };
6284
- tl.displayName = Yn;
6287
+ tl.displayName = Dn;
6285
6288
  var rl = "DialogTrigger", nl = N.forwardRef(
6286
6289
  (e, t) => {
6287
6290
  const { __scopeDialog: r, ...n } = e, o = Bt(rl, r), i = je(t, o.triggerRef);
@@ -6400,7 +6403,7 @@ var E4 = N.forwardRef(
6400
6403
  onMountAutoFocus: o,
6401
6404
  onUnmountAutoFocus: i,
6402
6405
  children: /* @__PURE__ */ l(
6403
- zn,
6406
+ Jn,
6404
6407
  {
6405
6408
  role: "dialog",
6406
6409
  id: s.contentId,
@@ -6564,7 +6567,7 @@ function Ps(...e) {
6564
6567
  typeof r == "function" && r(...t);
6565
6568
  };
6566
6569
  }
6567
- const Io = typeof document < "u" && window.visualViewport;
6570
+ const So = typeof document < "u" && window.visualViewport;
6568
6571
  function js(e) {
6569
6572
  let t = window.getComputedStyle(e);
6570
6573
  return /(auto|scroll)/.test(t.overflow + t.overflowX + t.overflowY);
@@ -6585,13 +6588,13 @@ const z4 = /* @__PURE__ */ new Set([
6585
6588
  "submit",
6586
6589
  "reset"
6587
6590
  ]);
6588
- let ln = 0, So;
6591
+ let ln = 0, No;
6589
6592
  function J4(e = {}) {
6590
6593
  let { isDisabled: t } = e;
6591
6594
  G4(() => {
6592
6595
  if (!t)
6593
- return ln++, ln === 1 && ml() && (So = Y4()), () => {
6594
- ln--, ln === 0 && So?.();
6596
+ return ln++, ln === 1 && ml() && (No = Y4()), () => {
6597
+ ln--, ln === 0 && No?.();
6595
6598
  };
6596
6599
  }, [
6597
6600
  t
@@ -6609,15 +6612,15 @@ function Y4() {
6609
6612
  C !== 0 && ((m <= 0 && p > t || m >= C && p < t) && d.preventDefault(), t = p);
6610
6613
  }, o = (d) => {
6611
6614
  let p = d.target;
6612
- Po(p) && p !== document.activeElement && (d.preventDefault(), p.style.transform = "translateY(-2000px)", p.focus(), requestAnimationFrame(() => {
6615
+ jo(p) && p !== document.activeElement && (d.preventDefault(), p.style.transform = "translateY(-2000px)", p.focus(), requestAnimationFrame(() => {
6613
6616
  p.style.transform = "";
6614
6617
  }));
6615
6618
  }, i = (d) => {
6616
6619
  let p = d.target;
6617
- Po(p) && (p.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
6618
- p.style.transform = "", Io && (Io.height < window.innerHeight ? requestAnimationFrame(() => {
6620
+ jo(p) && (p.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
6621
+ p.style.transform = "", So && (So.height < window.innerHeight ? requestAnimationFrame(() => {
6619
6622
  _s(p);
6620
- }) : Io.addEventListener("resize", () => _s(p), {
6623
+ }) : So.addEventListener("resize", () => _s(p), {
6621
6624
  once: !0
6622
6625
  }));
6623
6626
  }));
@@ -6662,7 +6665,7 @@ function _s(e) {
6662
6665
  e = r.parentElement;
6663
6666
  }
6664
6667
  }
6665
- function Po(e) {
6668
+ function jo(e) {
6666
6669
  return e instanceof HTMLInputElement && !z4.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
6667
6670
  }
6668
6671
  function X4(e, t) {
@@ -6716,7 +6719,7 @@ function cn(e, t) {
6716
6719
  function j4(e) {
6717
6720
  return 8 * (Math.log(e + 1) - 2);
6718
6721
  }
6719
- function No(e, t) {
6722
+ function Vo(e, t) {
6720
6723
  if (!e) return () => {
6721
6724
  };
6722
6725
  const r = e.style.cssText;
@@ -6738,7 +6741,7 @@ const Ze = {
6738
6741
  0,
6739
6742
  1
6740
6743
  ]
6741
- }, vl = 0.4, $4 = 0.25, e9 = 100, bl = 8, Ir = 16, jo = 26, Vo = "vaul-dragging";
6744
+ }, vl = 0.4, $4 = 0.25, e9 = 100, bl = 8, Ir = 16, _o = 26, ko = "vaul-dragging";
6742
6745
  function Al(e) {
6743
6746
  const t = W.useRef(e);
6744
6747
  return W.useEffect(() => {
@@ -6927,22 +6930,22 @@ const n9 = () => () => {
6927
6930
  function o9() {
6928
6931
  const { direction: e, isOpen: t, shouldScaleBackground: r, setBackgroundColorOnScale: n, noBodyStyles: o } = H1(), i = W.useRef(null), a = nt(() => document.body.style.backgroundColor, []);
6929
6932
  function s() {
6930
- return (window.innerWidth - jo) / window.innerWidth;
6933
+ return (window.innerWidth - _o) / window.innerWidth;
6931
6934
  }
6932
6935
  W.useEffect(() => {
6933
6936
  if (t && r) {
6934
6937
  i.current && clearTimeout(i.current);
6935
6938
  const c = document.querySelector("[data-vaul-drawer-wrapper]") || document.querySelector("[vaul-drawer-wrapper]");
6936
6939
  if (!c) return;
6937
- _4(n && !o ? No(document.body, {
6940
+ _4(n && !o ? Vo(document.body, {
6938
6941
  background: "black"
6939
- }) : n9, No(c, {
6942
+ }) : n9, Vo(c, {
6940
6943
  transformOrigin: De(e) ? "top" : "left",
6941
6944
  transitionProperty: "transform, border-radius",
6942
6945
  transitionDuration: `${Ze.DURATION}s`,
6943
6946
  transitionTimingFunction: `cubic-bezier(${Ze.EASE.join(",")})`
6944
6947
  }));
6945
- const u = No(c, {
6948
+ const u = Vo(c, {
6946
6949
  borderRadius: `${bl}px`,
6947
6950
  overflow: "hidden",
6948
6951
  ...De(e) ? {
@@ -7070,7 +7073,7 @@ function s9({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: o, sn
7070
7073
  noBodyStyles: x
7071
7074
  });
7072
7075
  function h() {
7073
- return (window.innerWidth - jo) / window.innerWidth;
7076
+ return (window.innerWidth - _o) / window.innerWidth;
7074
7077
  }
7075
7078
  function g(ie) {
7076
7079
  var ye, Ee;
@@ -7113,7 +7116,7 @@ function s9({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: o, sn
7113
7116
  let Me = se / Re;
7114
7117
  const vt = Ye(se, ge);
7115
7118
  if (vt !== null && (Me = vt), Te && Me >= 1 || !te.current && !A(ie.target, ge)) return;
7116
- if (oe.current.classList.add(Vo), te.current = !0, He(oe.current, {
7119
+ if (oe.current.classList.add(ko), te.current = !0, He(oe.current, {
7117
7120
  transition: "none"
7118
7121
  }), He(j.current, {
7119
7122
  transition: "none"
@@ -7155,7 +7158,7 @@ function s9({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: o, sn
7155
7158
  function ye() {
7156
7159
  if (!oe.current || !L) return;
7157
7160
  const Ee = document.activeElement;
7158
- if (Po(Ee) || ve.current) {
7161
+ if (jo(Ee) || ve.current) {
7159
7162
  var ge;
7160
7163
  const Te = ((ge = window.visualViewport) == null ? void 0 : ge.height) || 0, se = window.innerHeight;
7161
7164
  let we = se - Te;
@@ -7169,7 +7172,7 @@ function s9({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: o, sn
7169
7172
  if (xe.current = we, Re > Te || ve.current) {
7170
7173
  const ke = oe.current.getBoundingClientRect().height;
7171
7174
  let Ke = ke;
7172
- ke > Te && (Ke = Te - (Me ? vt : jo)), w ? oe.current.style.height = `${ke - Math.max(we, 0)}px` : oe.current.style.height = `${Math.max(Ke, Te - vt)}px`;
7175
+ ke > Te && (Ke = Te - (Me ? vt : _o)), w ? oe.current.style.height = `${ke - Math.max(we, 0)}px` : oe.current.style.height = `${Math.max(Ke, Te - vt)}px`;
7173
7176
  } else K4() || (oe.current.style.height = `${rt.current}px`);
7174
7177
  i && i.length > 0 && !ve.current ? oe.current.style.bottom = "0px" : oe.current.style.bottom = `${Math.max(we, 0)}px`;
7175
7178
  }
@@ -7213,11 +7216,11 @@ function s9({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: o, sn
7213
7216
  }, !0);
7214
7217
  }
7215
7218
  function ue() {
7216
- !J || !oe.current || (oe.current.classList.remove(Vo), te.current = !1, P(!1), $.current = /* @__PURE__ */ new Date());
7219
+ !J || !oe.current || (oe.current.classList.remove(ko), te.current = !1, P(!1), $.current = /* @__PURE__ */ new Date());
7217
7220
  }
7218
7221
  function Se(ie) {
7219
7222
  if (!J || !oe.current) return;
7220
- oe.current.classList.remove(Vo), te.current = !1, P(!1), $.current = /* @__PURE__ */ new Date();
7223
+ oe.current.classList.remove(ko), te.current = !1, P(!1), $.current = /* @__PURE__ */ new Date();
7221
7224
  const ye = cn(oe.current, S);
7222
7225
  if (!ie || !A(ie.target, !1) || !ye || Number.isNaN(ye) || G.current === null) return;
7223
7226
  const Ee = $.current.getTime() - G.current.getTime(), ge = fe.current - (De(S) ? ie.pageY : ie.pageX), Te = Math.abs(ge) / Ee;
@@ -7569,7 +7572,7 @@ const br = {
7569
7572
  start: "end",
7570
7573
  end: "start"
7571
7574
  };
7572
- function _o(e, t, r) {
7575
+ function $o(e, t, r) {
7573
7576
  return ht(e, mr(t, r));
7574
7577
  }
7575
7578
  function or(e, t) {
@@ -7602,9 +7605,9 @@ function A9(e, t, r) {
7602
7605
  }
7603
7606
  function x9(e) {
7604
7607
  const t = In(e);
7605
- return [$o(e), t, $o(t)];
7608
+ return [ei(e), t, ei(t)];
7606
7609
  }
7607
- function $o(e) {
7610
+ function ei(e) {
7608
7611
  return e.replace(/start|end/g, (t) => v9[t]);
7609
7612
  }
7610
7613
  const $s = ["left", "right"], ea = ["right", "left"], E9 = ["top", "bottom"], I9 = ["bottom", "top"];
@@ -7623,7 +7626,7 @@ function S9(e, t, r) {
7623
7626
  function N9(e, t, r, n) {
7624
7627
  const o = m1(e);
7625
7628
  let i = S9(ir(e), r === "start", n);
7626
- return o && (i = i.map((a) => a + "-" + o), t && (i = i.concat(i.map($o)))), i;
7629
+ return o && (i = i.map((a) => a + "-" + o), t && (i = i.concat(i.map(ei)))), i;
7627
7630
  }
7628
7631
  function In(e) {
7629
7632
  return e.replace(/left|right|bottom|top/g, (t) => y9[t]);
@@ -7841,7 +7844,7 @@ const R9 = (e) => ({
7841
7844
  }, m = Fi(o), C = Li(m), w = await a.getDimensions(u), v = m === "y", b = v ? "top" : "left", I = v ? "bottom" : "right", x = v ? "clientHeight" : "clientWidth", S = i.reference[C] + i.reference[m] - p[m] - i.floating[C], k = p[m] - i.reference[m], R = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(u));
7842
7845
  let B = R ? R[x] : 0;
7843
7846
  (!B || !await (a.isElement == null ? void 0 : a.isElement(R))) && (B = s.floating[x] || i.floating[C]);
7844
- const q = S / 2 - k / 2, L = B / 2 - w[C] / 2 - 1, X = mr(d[b], L), z = mr(d[I], L), O = X, V = B - w[C] - z, T = B / 2 - w[C] / 2 + q, U = _o(O, T, V), F = !c.arrow && m1(o) != null && T !== U && i.reference[C] / 2 - (T < O ? X : z) - w[C] / 2 < 0, Z = F ? T < O ? T - O : T - V : 0;
7847
+ const q = S / 2 - k / 2, L = B / 2 - w[C] / 2 - 1, X = mr(d[b], L), z = mr(d[I], L), O = X, V = B - w[C] - z, T = B / 2 - w[C] / 2 + q, U = $o(O, T, V), F = !c.arrow && m1(o) != null && T !== U && i.reference[C] / 2 - (T < O ? X : z) - w[C] / 2 < 0, Z = F ? T < O ? T - O : T - V : 0;
7845
7848
  return {
7846
7849
  [m]: p[m] + Z,
7847
7850
  data: {
@@ -8070,11 +8073,11 @@ const U9 = function(e) {
8070
8073
  let m = u[p], C = u[d];
8071
8074
  if (i) {
8072
8075
  const v = p === "y" ? "top" : "left", b = p === "y" ? "bottom" : "right", I = m + f[v], x = m - f[b];
8073
- m = _o(I, m, x);
8076
+ m = $o(I, m, x);
8074
8077
  }
8075
8078
  if (a) {
8076
8079
  const v = d === "y" ? "top" : "left", b = d === "y" ? "bottom" : "right", I = C + f[v], x = C - f[b];
8077
- C = _o(I, C, x);
8080
+ C = $o(I, C, x);
8078
8081
  }
8079
8082
  const w = s.fn({
8080
8083
  ...t,
@@ -8177,7 +8180,7 @@ const U9 = function(e) {
8177
8180
  }
8178
8181
  };
8179
8182
  };
8180
- function Dn() {
8183
+ function Xn() {
8181
8184
  return typeof window < "u";
8182
8185
  }
8183
8186
  function w1(e) {
@@ -8192,16 +8195,16 @@ function Gt(e) {
8192
8195
  return (t = (kl(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
8193
8196
  }
8194
8197
  function kl(e) {
8195
- return Dn() ? e instanceof Node || e instanceof mt(e).Node : !1;
8198
+ return Xn() ? e instanceof Node || e instanceof mt(e).Node : !1;
8196
8199
  }
8197
8200
  function Mt(e) {
8198
- return Dn() ? e instanceof Element || e instanceof mt(e).Element : !1;
8201
+ return Xn() ? e instanceof Element || e instanceof mt(e).Element : !1;
8199
8202
  }
8200
8203
  function Ot(e) {
8201
- return Dn() ? e instanceof HTMLElement || e instanceof mt(e).HTMLElement : !1;
8204
+ return Xn() ? e instanceof HTMLElement || e instanceof mt(e).HTMLElement : !1;
8202
8205
  }
8203
8206
  function oa(e) {
8204
- return !Dn() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof mt(e).ShadowRoot;
8207
+ return !Xn() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof mt(e).ShadowRoot;
8205
8208
  }
8206
8209
  const K9 = /* @__PURE__ */ new Set(["inline", "contents"]);
8207
8210
  function P1(e) {
@@ -8218,7 +8221,7 @@ function Z9(e) {
8218
8221
  return q9.has(w1(e));
8219
8222
  }
8220
8223
  const Q9 = [":popover-open", ":modal"];
8221
- function Xn(e) {
8224
+ function Hn(e) {
8222
8225
  return Q9.some((t) => {
8223
8226
  try {
8224
8227
  return e.matches(t);
@@ -8237,7 +8240,7 @@ function J9(e) {
8237
8240
  for (; Ot(t) && !l1(t); ) {
8238
8241
  if (Ki(t))
8239
8242
  return t;
8240
- if (Xn(t))
8243
+ if (Hn(t))
8241
8244
  return null;
8242
8245
  t = wr(t);
8243
8246
  }
@@ -8253,7 +8256,7 @@ function l1(e) {
8253
8256
  function Wt(e) {
8254
8257
  return mt(e).getComputedStyle(e);
8255
8258
  }
8256
- function Hn(e) {
8259
+ function Pn(e) {
8257
8260
  return Mt(e) ? {
8258
8261
  scrollLeft: e.scrollLeft,
8259
8262
  scrollTop: e.scrollTop
@@ -8283,12 +8286,12 @@ function L1(e, t, r) {
8283
8286
  t === void 0 && (t = []), r === void 0 && (r = !0);
8284
8287
  const o = Rl(e), i = o === ((n = e.ownerDocument) == null ? void 0 : n.body), a = mt(o);
8285
8288
  if (i) {
8286
- const s = ei(a);
8289
+ const s = ti(a);
8287
8290
  return t.concat(a, a.visualViewport || [], P1(o) ? o : [], s && r ? L1(s) : []);
8288
8291
  }
8289
8292
  return t.concat(o, L1(o, [], r));
8290
8293
  }
8291
- function ei(e) {
8294
+ function ti(e) {
8292
8295
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
8293
8296
  }
8294
8297
  function Ml(e) {
@@ -8339,10 +8342,10 @@ function Kr(e, t, r, n) {
8339
8342
  let c = (o.left + s.x) / a.x, u = (o.top + s.y) / a.y, f = o.width / a.x, d = o.height / a.y;
8340
8343
  if (i) {
8341
8344
  const p = mt(i), m = n && Mt(n) ? mt(n) : n;
8342
- let C = p, w = ei(C);
8345
+ let C = p, w = ti(C);
8343
8346
  for (; w && n && m !== C; ) {
8344
8347
  const v = e1(w), b = w.getBoundingClientRect(), I = Wt(w), x = b.left + (w.clientLeft + parseFloat(I.paddingLeft)) * v.x, S = b.top + (w.clientTop + parseFloat(I.paddingTop)) * v.y;
8345
- c *= v.x, u *= v.y, f *= v.x, d *= v.y, c += x, u += S, C = mt(w), w = ei(C);
8348
+ c *= v.x, u *= v.y, f *= v.x, d *= v.y, c += x, u += S, C = mt(w), w = ti(C);
8346
8349
  }
8347
8350
  }
8348
8351
  return Sn({
@@ -8352,12 +8355,12 @@ function Kr(e, t, r, n) {
8352
8355
  y: u
8353
8356
  });
8354
8357
  }
8355
- function Pn(e, t) {
8356
- const r = Hn(e).scrollLeft;
8358
+ function jn(e, t) {
8359
+ const r = Pn(e).scrollLeft;
8357
8360
  return t ? t.left + r : Kr(Gt(e)).left + r;
8358
8361
  }
8359
8362
  function Bl(e, t) {
8360
- const r = e.getBoundingClientRect(), n = r.left + t.scrollLeft - Pn(e, r), o = r.top + t.scrollTop;
8363
+ const r = e.getBoundingClientRect(), n = r.left + t.scrollLeft - jn(e, r), o = r.top + t.scrollTop;
8361
8364
  return {
8362
8365
  x: n,
8363
8366
  y: o
@@ -8370,7 +8373,7 @@ function H9(e) {
8370
8373
  offsetParent: n,
8371
8374
  strategy: o
8372
8375
  } = e;
8373
- const i = o === "fixed", a = Gt(n), s = t ? Xn(t.floating) : !1;
8376
+ const i = o === "fixed", a = Gt(n), s = t ? Hn(t.floating) : !1;
8374
8377
  if (n === a || s && i)
8375
8378
  return r;
8376
8379
  let c = {
@@ -8378,7 +8381,7 @@ function H9(e) {
8378
8381
  scrollTop: 0
8379
8382
  }, u = Zt(1);
8380
8383
  const f = Zt(0), d = Ot(n);
8381
- if ((d || !d && !i) && ((w1(n) !== "body" || P1(a)) && (c = Hn(n)), Ot(n))) {
8384
+ if ((d || !d && !i) && ((w1(n) !== "body" || P1(a)) && (c = Pn(n)), Ot(n))) {
8382
8385
  const m = Kr(n);
8383
8386
  u = e1(n), f.x = m.x + n.clientLeft, f.y = m.y + n.clientTop;
8384
8387
  }
@@ -8394,8 +8397,8 @@ function P9(e) {
8394
8397
  return Array.from(e.getClientRects());
8395
8398
  }
8396
8399
  function j9(e) {
8397
- const t = Gt(e), r = Hn(e), n = e.ownerDocument.body, o = ht(t.scrollWidth, t.clientWidth, n.scrollWidth, n.clientWidth), i = ht(t.scrollHeight, t.clientHeight, n.scrollHeight, n.clientHeight);
8398
- let a = -r.scrollLeft + Pn(e);
8400
+ const t = Gt(e), r = Pn(e), n = e.ownerDocument.body, o = ht(t.scrollWidth, t.clientWidth, n.scrollWidth, n.clientWidth), i = ht(t.scrollHeight, t.clientHeight, n.scrollHeight, n.clientHeight);
8401
+ let a = -r.scrollLeft + jn(e);
8399
8402
  const s = -r.scrollTop;
8400
8403
  return Wt(n).direction === "rtl" && (a += ht(t.clientWidth, n.clientWidth) - o), {
8401
8404
  width: o,
@@ -8413,7 +8416,7 @@ function _9(e, t) {
8413
8416
  const f = qi();
8414
8417
  (!f || f && t === "fixed") && (s = o.offsetLeft, c = o.offsetTop);
8415
8418
  }
8416
- const u = Pn(n);
8419
+ const u = jn(n);
8417
8420
  if (u <= 0) {
8418
8421
  const f = n.ownerDocument, d = f.body, p = getComputedStyle(d), m = f.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, C = Math.abs(n.clientWidth - d.clientWidth - m);
8419
8422
  C <= ia && (i -= C);
@@ -8478,7 +8481,7 @@ function r8(e) {
8478
8481
  rootBoundary: n,
8479
8482
  strategy: o
8480
8483
  } = e;
8481
- const a = [...r === "clippingAncestors" ? Xn(t) ? [] : t8(t, this._c) : [].concat(r), n], s = a[0], c = a.reduce((u, f) => {
8484
+ const a = [...r === "clippingAncestors" ? Hn(t) ? [] : t8(t, this._c) : [].concat(r), n], s = a[0], c = a.reduce((u, f) => {
8482
8485
  const d = sa(t, f, o);
8483
8486
  return u.top = ht(d.top, u.top), u.right = mr(d.right, u.right), u.bottom = mr(d.bottom, u.bottom), u.left = ht(d.left, u.left), u;
8484
8487
  }, sa(t, s, o));
@@ -8507,10 +8510,10 @@ function o8(e, t, r) {
8507
8510
  };
8508
8511
  const c = Zt(0);
8509
8512
  function u() {
8510
- c.x = Pn(o);
8513
+ c.x = jn(o);
8511
8514
  }
8512
8515
  if (n || !n && !i)
8513
- if ((w1(t) !== "body" || P1(o)) && (s = Hn(t)), n) {
8516
+ if ((w1(t) !== "body" || P1(o)) && (s = Pn(t)), n) {
8514
8517
  const m = Kr(t, !0, i, t);
8515
8518
  c.x = m.x + t.clientLeft, c.y = m.y + t.clientTop;
8516
8519
  } else o && u();
@@ -8523,7 +8526,7 @@ function o8(e, t, r) {
8523
8526
  height: a.height
8524
8527
  };
8525
8528
  }
8526
- function ko(e) {
8529
+ function Ro(e) {
8527
8530
  return Wt(e).position === "static";
8528
8531
  }
8529
8532
  function aa(e, t) {
@@ -8536,21 +8539,21 @@ function aa(e, t) {
8536
8539
  }
8537
8540
  function Tl(e, t) {
8538
8541
  const r = mt(e);
8539
- if (Xn(e))
8542
+ if (Hn(e))
8540
8543
  return r;
8541
8544
  if (!Ot(e)) {
8542
8545
  let o = wr(e);
8543
8546
  for (; o && !l1(o); ) {
8544
- if (Mt(o) && !ko(o))
8547
+ if (Mt(o) && !Ro(o))
8545
8548
  return o;
8546
8549
  o = wr(o);
8547
8550
  }
8548
8551
  return r;
8549
8552
  }
8550
8553
  let n = aa(e, t);
8551
- for (; n && Z9(n) && ko(n); )
8554
+ for (; n && Z9(n) && Ro(n); )
8552
8555
  n = aa(n, t);
8553
- return n && l1(n) && ko(n) && !Ki(n) ? r : n || J9(e) || r;
8556
+ return n && l1(n) && Ro(n) && !Ki(n) ? r : n || J9(e) || r;
8554
8557
  }
8555
8558
  const i8 = async function(e) {
8556
8559
  const t = this.getOffsetParent || Tl, r = this.getDimensions, n = await r(e.floating);
@@ -8716,7 +8719,7 @@ function ca(e, t) {
8716
8719
  const r = Fl(e);
8717
8720
  return Math.round(t * r) / r;
8718
8721
  }
8719
- function Ro(e) {
8722
+ function Mo(e) {
8720
8723
  const t = N.useRef(e);
8721
8724
  return Cn(() => {
8722
8725
  t.current = e;
@@ -8749,7 +8752,7 @@ function y8(e) {
8749
8752
  Q !== R.current && (R.current = Q, w(Q));
8750
8753
  }, []), x = N.useCallback((Q) => {
8751
8754
  Q !== B.current && (B.current = Q, b(Q));
8752
- }, []), S = i || C, k = a || v, R = N.useRef(null), B = N.useRef(null), q = N.useRef(f), L = c != null, X = Ro(c), z = Ro(o), O = Ro(u), V = N.useCallback(() => {
8755
+ }, []), S = i || C, k = a || v, R = N.useRef(null), B = N.useRef(null), q = N.useRef(f), L = c != null, X = Mo(c), z = Mo(o), O = Mo(u), V = N.useCallback(() => {
8753
8756
  if (!R.current || !B.current)
8754
8757
  return;
8755
8758
  const Q = {
@@ -8906,7 +8909,7 @@ function R8(e) {
8906
8909
  r(void 0);
8907
8910
  }, [e]), t;
8908
8911
  }
8909
- var Qi = "Popper", [ql, jn] = Qr(Qi), [M8, Zl] = ql(Qi), Ql = (e) => {
8912
+ var Qi = "Popper", [ql, _n] = Qr(Qi), [M8, Zl] = ql(Qi), Ql = (e) => {
8910
8913
  const { __scopePopper: t, children: r } = e, [n, o] = N.useState(null);
8911
8914
  return /* @__PURE__ */ l(M8, { scope: t, anchor: n, onAnchorChange: o, children: r });
8912
8915
  };
@@ -9102,9 +9105,9 @@ function Dl(e) {
9102
9105
  const [t, r = "center"] = e.split("-");
9103
9106
  return [t, r];
9104
9107
  }
9105
- var Xl = Ql, Gi = Gl, Hl = zl, Pl = Yl, _n = "Popover", [jl] = Qr(_n, [
9106
- jn
9107
- ]), j1 = jn(), [F8, Ar] = jl(_n), _l = (e) => {
9108
+ var Xl = Ql, Gi = Gl, Hl = zl, Pl = Yl, $n = "Popover", [jl] = Qr($n, [
9109
+ _n
9110
+ ]), j1 = _n(), [F8, Ar] = jl($n), _l = (e) => {
9108
9111
  const {
9109
9112
  __scopePopover: t,
9110
9113
  children: r,
@@ -9116,7 +9119,7 @@ var Xl = Ql, Gi = Gl, Hl = zl, Pl = Yl, _n = "Popover", [jl] = Qr(_n, [
9116
9119
  prop: n,
9117
9120
  defaultProp: o ?? !1,
9118
9121
  onChange: i,
9119
- caller: _n
9122
+ caller: $n
9120
9123
  });
9121
9124
  return /* @__PURE__ */ l(Xl, { ...s, children: /* @__PURE__ */ l(
9122
9125
  F8,
@@ -9135,7 +9138,7 @@ var Xl = Ql, Gi = Gl, Hl = zl, Pl = Yl, _n = "Popover", [jl] = Qr(_n, [
9135
9138
  }
9136
9139
  ) });
9137
9140
  };
9138
- _l.displayName = _n;
9141
+ _l.displayName = $n;
9139
9142
  var $l = "PopoverAnchor", K8 = N.forwardRef(
9140
9143
  (e, t) => {
9141
9144
  const { __scopePopover: r, ...n } = e, o = Ar($l, r), i = j1(r), { onCustomAnchorAdd: a, onCustomAnchorRemove: s } = o;
@@ -9252,7 +9255,7 @@ var Q8 = /* @__PURE__ */ s1("PopoverContent.RemoveScroll"), O8 = N.forwardRef(
9252
9255
  onMountAutoFocus: o,
9253
9256
  onUnmountAutoFocus: i,
9254
9257
  children: /* @__PURE__ */ l(
9255
- zn,
9258
+ Jn,
9256
9259
  {
9257
9260
  asChild: !0,
9258
9261
  disableOutsidePointerEvents: a,
@@ -9422,7 +9425,7 @@ const tu = (e) => {
9422
9425
  return document.addEventListener("visibilitychange", r), () => window.removeEventListener("visibilitychange", r);
9423
9426
  }, []), e;
9424
9427
  };
9425
- let ti = 1;
9428
+ let ri = 1;
9426
9429
  class uu {
9427
9430
  constructor() {
9428
9431
  this.subscribe = (t) => (this.subscribers.push(t), () => {
@@ -9437,7 +9440,7 @@ class uu {
9437
9440
  ];
9438
9441
  }, this.create = (t) => {
9439
9442
  var r;
9440
- const { message: n, ...o } = t, i = typeof t?.id == "number" || ((r = t.id) == null ? void 0 : r.length) > 0 ? t.id : ti++, a = this.toasts.find((c) => c.id === i), s = t.dismissible === void 0 ? !0 : t.dismissible;
9443
+ const { message: n, ...o } = t, i = typeof t?.id == "number" || ((r = t.id) == null ? void 0 : r.length) > 0 ? t.id : ri++, a = this.toasts.find((c) => c.id === i), s = t.dismissible === void 0 ? !0 : t.dismissible;
9441
9444
  return this.dismissedToasts.has(i) && this.dismissedToasts.delete(i), a ? this.toasts = this.toasts.map((c) => c.id === i ? (this.publish({
9442
9445
  ...c,
9443
9446
  ...t,
@@ -9568,7 +9571,7 @@ class uu {
9568
9571
  unwrap: c
9569
9572
  });
9570
9573
  }, this.custom = (t, r) => {
9571
- const n = r?.id || ti++;
9574
+ const n = r?.id || ri++;
9572
9575
  return this.create({
9573
9576
  jsx: t(n),
9574
9577
  id: n,
@@ -9578,7 +9581,7 @@ class uu {
9578
9581
  }
9579
9582
  }
9580
9583
  const ct = new uu(), du = (e, t) => {
9581
- const r = t?.id || ti++;
9584
+ const r = t?.id || ri++;
9582
9585
  return ct.addToast({
9583
9586
  title: e,
9584
9587
  ...t,
@@ -10148,11 +10151,11 @@ function Ru({ url: e, target: t, height: r, width: n }) {
10148
10151
  return window.open(e, t, a);
10149
10152
  }
10150
10153
  function C1() {
10151
- const e = tr(wi);
10154
+ const e = tr(Ci);
10152
10155
  if (!e) throw new Error("glyph hooks must be used within GlyphProvider");
10153
10156
  return { glyphApiFetch: e.apiFetch };
10154
10157
  }
10155
- let Mo = null;
10158
+ let Wo = null;
10156
10159
  function Mu() {
10157
10160
  const { glyphApiFetch: e } = C1(), t = Et(), r = Pe(
10158
10161
  async (a) => {
@@ -10168,9 +10171,9 @@ function Mu() {
10168
10171
  [e]
10169
10172
  ), n = Pe(
10170
10173
  async (a, s, c, u, f) => {
10171
- if (f && Mo?.abort?.(), !e) return { quote: null, ok: !1, error: "Glyph API not ready" };
10172
- Mo = new AbortController();
10173
- const d = Mo.signal, p = await e("/api/widget/onramp/quote", {
10174
+ if (f && Wo?.abort?.(), !e) return { quote: null, ok: !1, error: "Glyph API not ready" };
10175
+ Wo = new AbortController();
10176
+ const d = Wo.signal, p = await e("/api/widget/onramp/quote", {
10174
10177
  method: "POST",
10175
10178
  body: JSON.stringify({ chainId: t, amount: a, currency: s, country: c, subdivision: u }),
10176
10179
  headers: { "Content-Type": "application/json" },
@@ -10310,7 +10313,7 @@ function Lu() {
10310
10313
  );
10311
10314
  return () => clearInterval(H);
10312
10315
  }, [R, q, P]);
10313
- const D = !e?.isOnrampEnabled, _ = n !== Ii.id, j = D ? Tu : null;
10316
+ const D = !e?.isOnrampEnabled, _ = n !== Gn.id, j = D ? Tu : null;
10314
10317
  return {
10315
10318
  userCurrency: f,
10316
10319
  fundMinAmount: p,
@@ -10413,7 +10416,7 @@ const Ou = ({ text: e, textToCopy: t, className: r, textClassName: n, iconClassN
10413
10416
  }
10414
10417
  );
10415
10418
  }, qr = xt(Ou), Gu = ({ fullScreenHeader: e, onProfileClick: t }) => {
10416
- const { user: r, hasBalances: n } = Fe(), o = Et(), { switchChain: i } = Q0(), a = O0(), [s, c] = re([]), [u, f] = re(!1), d = Tn(null), p = i1.get(o) || !1, m = Ss[o] || ma;
10419
+ const { user: r, hasBalances: n } = Fe(), o = Et(), { switchChain: i } = Z0(), a = Q0(), [s, c] = re([]), [u, f] = re(!1), d = Tn(null), p = i1.get(o) || !1, m = Ss[o] || ma;
10417
10420
  return pe(() => {
10418
10421
  c(a.slice().sort((C, w) => (C.id === o ? -1 : 1) - (w.id === o ? -1 : 1)));
10419
10422
  }, [a, o]), pe(() => {
@@ -10468,7 +10471,7 @@ const Ou = ({ text: e, textToCopy: t, className: r, textClassName: n, iconClassN
10468
10471
  }
10469
10472
  ),
10470
10473
  u && /* @__PURE__ */ l("div", { className: "gw-absolute gw-top-full gw-right-0 gw-mt-1 gw-bg-white gw-rounded-xl gw-shadow-md gw-z-50 gw-min-w-[8rem] gw-overflow-hidden", children: s.map((C) => {
10471
- const w = C.id === o, v = Ss[C.id] || ma, b = i1.get(C.id) || !1;
10474
+ const w = C.id === o, v = jc[C.id] || C.name, b = Ss[C.id] || ma, I = i1.get(C.id) || !1;
10472
10475
  return /* @__PURE__ */ E(
10473
10476
  "button",
10474
10477
  {
@@ -10482,15 +10485,15 @@ const Ou = ({ text: e, textToCopy: t, className: r, textClassName: n, iconClassN
10482
10485
  ),
10483
10486
  children: [
10484
10487
  /* @__PURE__ */ l("div", { className: "gw-w-9 gw-h-9 gw-rounded-full gw-p-1", children: /* @__PURE__ */ l(
10485
- v,
10488
+ b,
10486
10489
  {
10487
10490
  className: ae(
10488
10491
  "gw-size-6 gw-text-white",
10489
- b && pr
10492
+ I && pr
10490
10493
  )
10491
10494
  }
10492
10495
  ) }),
10493
- /* @__PURE__ */ l("span", { className: ae("gw-text-sm", w && "!gw-font-bold"), children: C.name })
10496
+ /* @__PURE__ */ l("span", { className: ae("gw-text-sm", w && "!gw-font-bold"), children: v })
10494
10497
  ]
10495
10498
  },
10496
10499
  C.id
@@ -10549,9 +10552,9 @@ var Ju = Object.freeze({
10549
10552
  )
10550
10553
  );
10551
10554
  c3.displayName = Yu;
10552
- var Du = c3, [$n] = Qr("Tooltip", [
10553
- jn
10554
- ]), eo = jn(), u3 = "TooltipProvider", Xu = 700, ri = "tooltip.open", [Hu, Ji] = $n(u3), d3 = (e) => {
10555
+ var Du = c3, [eo] = Qr("Tooltip", [
10556
+ _n
10557
+ ]), to = _n(), u3 = "TooltipProvider", Xu = 700, ni = "tooltip.open", [Hu, Ji] = eo(u3), d3 = (e) => {
10555
10558
  const {
10556
10559
  __scopeTooltip: t,
10557
10560
  delayDuration: r = Xu,
@@ -10587,7 +10590,7 @@ var Du = c3, [$n] = Qr("Tooltip", [
10587
10590
  );
10588
10591
  };
10589
10592
  d3.displayName = u3;
10590
- var F1 = "Tooltip", [Pu, to] = $n(F1), f3 = (e) => {
10593
+ var F1 = "Tooltip", [Pu, ro] = eo(F1), f3 = (e) => {
10591
10594
  const {
10592
10595
  __scopeTooltip: t,
10593
10596
  children: r,
@@ -10596,11 +10599,11 @@ var F1 = "Tooltip", [Pu, to] = $n(F1), f3 = (e) => {
10596
10599
  onOpenChange: i,
10597
10600
  disableHoverableContent: a,
10598
10601
  delayDuration: s
10599
- } = e, c = Ji(F1, e.__scopeTooltip), u = eo(t), [f, d] = N.useState(null), p = Rr(), m = N.useRef(0), C = a ?? c.disableHoverableContent, w = s ?? c.delayDuration, v = N.useRef(!1), [b, I] = p1({
10602
+ } = e, c = Ji(F1, e.__scopeTooltip), u = to(t), [f, d] = N.useState(null), p = Rr(), m = N.useRef(0), C = a ?? c.disableHoverableContent, w = s ?? c.delayDuration, v = N.useRef(!1), [b, I] = p1({
10600
10603
  prop: n,
10601
10604
  defaultProp: o ?? !1,
10602
10605
  onChange: (B) => {
10603
- B ? (c.onOpen(), document.dispatchEvent(new CustomEvent(ri))) : c.onClose(), i?.(B);
10606
+ B ? (c.onOpen(), document.dispatchEvent(new CustomEvent(ni))) : c.onClose(), i?.(B);
10604
10607
  },
10605
10608
  caller: F1
10606
10609
  }), x = N.useMemo(() => b ? v.current ? "delayed-open" : "instant-open" : "closed", [b]), S = N.useCallback(() => {
@@ -10637,9 +10640,9 @@ var F1 = "Tooltip", [Pu, to] = $n(F1), f3 = (e) => {
10637
10640
  ) });
10638
10641
  };
10639
10642
  f3.displayName = F1;
10640
- var ni = "TooltipTrigger", h3 = N.forwardRef(
10643
+ var oi = "TooltipTrigger", h3 = N.forwardRef(
10641
10644
  (e, t) => {
10642
- const { __scopeTooltip: r, ...n } = e, o = to(ni, r), i = Ji(ni, r), a = eo(r), s = N.useRef(null), c = je(t, s, o.onTriggerChange), u = N.useRef(!1), f = N.useRef(!1), d = N.useCallback(() => u.current = !1, []);
10645
+ const { __scopeTooltip: r, ...n } = e, o = ro(oi, r), i = Ji(oi, r), a = to(r), s = N.useRef(null), c = je(t, s, o.onTriggerChange), u = N.useRef(!1), f = N.useRef(!1), d = N.useCallback(() => u.current = !1, []);
10643
10646
  return N.useEffect(() => () => document.removeEventListener("pointerup", d), [d]), /* @__PURE__ */ l(Gi, { asChild: !0, ...a, children: /* @__PURE__ */ l(
10644
10647
  Je.button,
10645
10648
  {
@@ -10665,16 +10668,16 @@ var ni = "TooltipTrigger", h3 = N.forwardRef(
10665
10668
  ) });
10666
10669
  }
10667
10670
  );
10668
- h3.displayName = ni;
10669
- var ju = "TooltipPortal", [Og, _u] = $n(ju, {
10671
+ h3.displayName = oi;
10672
+ var ju = "TooltipPortal", [Og, _u] = eo(ju, {
10670
10673
  forceMount: void 0
10671
10674
  }), u1 = "TooltipContent", g3 = N.forwardRef(
10672
10675
  (e, t) => {
10673
- const r = _u(u1, e.__scopeTooltip), { forceMount: n = r.forceMount, side: o = "top", ...i } = e, a = to(u1, e.__scopeTooltip);
10676
+ const r = _u(u1, e.__scopeTooltip), { forceMount: n = r.forceMount, side: o = "top", ...i } = e, a = ro(u1, e.__scopeTooltip);
10674
10677
  return /* @__PURE__ */ l(vr, { present: n || a.open, children: a.disableHoverableContent ? /* @__PURE__ */ l(p3, { side: o, ...i, ref: t }) : /* @__PURE__ */ l($u, { side: o, ...i, ref: t }) });
10675
10678
  }
10676
10679
  ), $u = N.forwardRef((e, t) => {
10677
- const r = to(u1, e.__scopeTooltip), n = Ji(u1, e.__scopeTooltip), o = N.useRef(null), i = je(t, o), [a, s] = N.useState(null), { trigger: c, onClose: u } = r, f = o.current, { onPointerInTransitChange: d } = n, p = N.useCallback(() => {
10680
+ const r = ro(u1, e.__scopeTooltip), n = Ji(u1, e.__scopeTooltip), o = N.useRef(null), i = je(t, o), [a, s] = N.useState(null), { trigger: c, onClose: u } = r, f = o.current, { onPointerInTransitChange: d } = n, p = N.useCallback(() => {
10678
10681
  s(null), d(!1);
10679
10682
  }, [d]), m = N.useCallback(
10680
10683
  (C, w) => {
@@ -10699,7 +10702,7 @@ var ju = "TooltipPortal", [Og, _u] = $n(ju, {
10699
10702
  return document.addEventListener("pointermove", C), () => document.removeEventListener("pointermove", C);
10700
10703
  }
10701
10704
  }, [c, f, a, u, p]), /* @__PURE__ */ l(p3, { ...e, ref: i });
10702
- }), [ed, td] = $n(F1, { isInside: !1 }), rd = /* @__PURE__ */ r7("TooltipContent"), p3 = N.forwardRef(
10705
+ }), [ed, td] = eo(F1, { isInside: !1 }), rd = /* @__PURE__ */ r7("TooltipContent"), p3 = N.forwardRef(
10703
10706
  (e, t) => {
10704
10707
  const {
10705
10708
  __scopeTooltip: r,
@@ -10708,8 +10711,8 @@ var ju = "TooltipPortal", [Og, _u] = $n(ju, {
10708
10711
  onEscapeKeyDown: i,
10709
10712
  onPointerDownOutside: a,
10710
10713
  ...s
10711
- } = e, c = to(u1, r), u = eo(r), { onClose: f } = c;
10712
- return N.useEffect(() => (document.addEventListener(ri, f), () => document.removeEventListener(ri, f)), [f]), N.useEffect(() => {
10714
+ } = e, c = ro(u1, r), u = to(r), { onClose: f } = c;
10715
+ return N.useEffect(() => (document.addEventListener(ni, f), () => document.removeEventListener(ni, f)), [f]), N.useEffect(() => {
10713
10716
  if (c.trigger) {
10714
10717
  const d = (p) => {
10715
10718
  p.target?.contains(c.trigger) && f();
@@ -10717,7 +10720,7 @@ var ju = "TooltipPortal", [Og, _u] = $n(ju, {
10717
10720
  return window.addEventListener("scroll", d, { capture: !0 }), () => window.removeEventListener("scroll", d, { capture: !0 });
10718
10721
  }
10719
10722
  }, [c.trigger, f]), /* @__PURE__ */ l(
10720
- zn,
10723
+ Jn,
10721
10724
  {
10722
10725
  asChild: !0,
10723
10726
  disableOutsidePointerEvents: !1,
@@ -10753,7 +10756,7 @@ var ju = "TooltipPortal", [Og, _u] = $n(ju, {
10753
10756
  g3.displayName = u1;
10754
10757
  var m3 = "TooltipArrow", nd = N.forwardRef(
10755
10758
  (e, t) => {
10756
- const { __scopeTooltip: r, ...n } = e, o = eo(r);
10759
+ const { __scopeTooltip: r, ...n } = e, o = to(r);
10757
10760
  return td(
10758
10761
  m3,
10759
10762
  r
@@ -11909,7 +11912,7 @@ function Ld(e = 10) {
11909
11912
  isLoading: s
11910
11913
  };
11911
11914
  }
11912
- function oi(e) {
11915
+ function ii(e) {
11913
11916
  return /* @__PURE__ */ l("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e, children: /* @__PURE__ */ l(
11914
11917
  "path",
11915
11918
  {
@@ -11929,7 +11932,7 @@ function Fd({ data: e }) {
11929
11932
  "gw-rounded-full gw-size-10 gw-flex-shrink-0 gw-flex gw-justify-center gw-items-center",
11930
11933
  e.status === "Confirmed" ? "gw-bg-brand-success" : e.status === "Failed" ? "gw-bg-destructive" : "gw-bg-brand-warning"
11931
11934
  ),
11932
- children: e.type === "receive" ? /* @__PURE__ */ l(oi, { className: "gw-size-3 gw-rotate-180" }) : /* @__PURE__ */ l(oi, {})
11935
+ children: e.type === "receive" ? /* @__PURE__ */ l(ii, { className: "gw-size-3 gw-rotate-180" }) : /* @__PURE__ */ l(ii, {})
11933
11936
  }
11934
11937
  ),
11935
11938
  /* @__PURE__ */ E("div", { className: "gw-w-full gw-flex gw-justify-between gw-items-center gw-flex-1", children: [
@@ -11960,7 +11963,7 @@ function Yi({ text: e, url: t }) {
11960
11963
  href: t,
11961
11964
  target: "_blank",
11962
11965
  rel: "noopener noreferrer",
11963
- className: Gn({
11966
+ className: zn({
11964
11967
  variant: "link",
11965
11968
  size: "sm",
11966
11969
  className: "gw-py-0 gw-h-auto",
@@ -11971,7 +11974,7 @@ function Yi({ text: e, url: t }) {
11971
11974
  e,
11972
11975
  " "
11973
11976
  ] }),
11974
- /* @__PURE__ */ l(oi, { className: "!gw-size-2.5 gw-text-primary" })
11977
+ /* @__PURE__ */ l(ii, { className: "!gw-size-2.5 gw-text-primary" })
11975
11978
  ] })
11976
11979
  }
11977
11980
  );
@@ -12039,7 +12042,7 @@ function qd(e) {
12039
12042
  n
12040
12043
  ];
12041
12044
  }
12042
- var ro = "Collapsible", [Zd, v3] = Qr(ro), [Qd, Di] = Zd(ro), b3 = N.forwardRef(
12045
+ var no = "Collapsible", [Zd, v3] = Qr(no), [Qd, Di] = Zd(no), b3 = N.forwardRef(
12043
12046
  (e, t) => {
12044
12047
  const {
12045
12048
  __scopeCollapsible: r,
@@ -12052,7 +12055,7 @@ var ro = "Collapsible", [Zd, v3] = Qr(ro), [Qd, Di] = Zd(ro), b3 = N.forwardRef(
12052
12055
  prop: n,
12053
12056
  defaultProp: o ?? !1,
12054
12057
  onChange: a,
12055
- caller: ro
12058
+ caller: no
12056
12059
  });
12057
12060
  return /* @__PURE__ */ l(
12058
12061
  Qd,
@@ -12075,7 +12078,7 @@ var ro = "Collapsible", [Zd, v3] = Qr(ro), [Qd, Di] = Zd(ro), b3 = N.forwardRef(
12075
12078
  );
12076
12079
  }
12077
12080
  );
12078
- b3.displayName = ro;
12081
+ b3.displayName = no;
12079
12082
  var A3 = "CollapsibleTrigger", x3 = N.forwardRef(
12080
12083
  (e, t) => {
12081
12084
  const { __scopeCollapsible: r, ...n } = e, o = Di(A3, r);
@@ -12144,7 +12147,7 @@ function Dd(e) {
12144
12147
  const t = N.useContext(Yd);
12145
12148
  return e || t || "ltr";
12146
12149
  }
12147
- var Ut = "Accordion", Xd = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [Pi, Hd, Pd] = qd(Ut), [no] = Qr(Ut, [
12150
+ var Ut = "Accordion", Xd = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [Pi, Hd, Pd] = qd(Ut), [oo] = Qr(Ut, [
12148
12151
  Pd,
12149
12152
  v3
12150
12153
  ]), ji = v3(), _i = W.forwardRef(
@@ -12154,7 +12157,7 @@ var Ut = "Accordion", Xd = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft",
12154
12157
  }
12155
12158
  );
12156
12159
  _i.displayName = Ut;
12157
- var [I3, jd] = no(Ut), [S3, _d] = no(
12160
+ var [I3, jd] = oo(Ut), [S3, _d] = oo(
12158
12161
  Ut,
12159
12162
  { collapsible: !1 }
12160
12163
  ), $d = W.forwardRef(
@@ -12212,7 +12215,7 @@ var [I3, jd] = no(Ut), [S3, _d] = no(
12212
12215
  children: /* @__PURE__ */ l(S3, { scope: e.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ l(N3, { ...i, ref: t }) })
12213
12216
  }
12214
12217
  );
12215
- }), [tf, oo] = no(Ut), N3 = W.forwardRef(
12218
+ }), [tf, io] = oo(Ut), N3 = W.forwardRef(
12216
12219
  (e, t) => {
12217
12220
  const { __scopeAccordion: r, disabled: n, dir: o, orientation: i = "vertical", ...a } = e, s = W.useRef(null), c = je(s, t), u = Hd(r), d = Dd(o) === "ltr", p = ze(e.onKeyDown, (m) => {
12218
12221
  if (!Xd.includes(m.key)) return;
@@ -12267,9 +12270,9 @@ var [I3, jd] = no(Ut), [S3, _d] = no(
12267
12270
  }
12268
12271
  );
12269
12272
  }
12270
- ), kn = "AccordionItem", [rf, $i] = no(kn), es = W.forwardRef(
12273
+ ), kn = "AccordionItem", [rf, $i] = oo(kn), es = W.forwardRef(
12271
12274
  (e, t) => {
12272
- const { __scopeAccordion: r, value: n, ...o } = e, i = oo(kn, r), a = jd(kn, r), s = ji(r), c = Rr(), u = n && a.value.includes(n) || !1, f = i.disabled || e.disabled;
12275
+ const { __scopeAccordion: r, value: n, ...o } = e, i = io(kn, r), a = jd(kn, r), s = ji(r), c = Rr(), u = n && a.value.includes(n) || !1, f = i.disabled || e.disabled;
12273
12276
  return /* @__PURE__ */ l(
12274
12277
  rf,
12275
12278
  {
@@ -12299,7 +12302,7 @@ var [I3, jd] = no(Ut), [S3, _d] = no(
12299
12302
  es.displayName = kn;
12300
12303
  var V3 = "AccordionHeader", k3 = W.forwardRef(
12301
12304
  (e, t) => {
12302
- const { __scopeAccordion: r, ...n } = e, o = oo(Ut, r), i = $i(V3, r);
12305
+ const { __scopeAccordion: r, ...n } = e, o = io(Ut, r), i = $i(V3, r);
12303
12306
  return /* @__PURE__ */ l(
12304
12307
  Je.h3,
12305
12308
  {
@@ -12313,9 +12316,9 @@ var V3 = "AccordionHeader", k3 = W.forwardRef(
12313
12316
  }
12314
12317
  );
12315
12318
  k3.displayName = V3;
12316
- var ii = "AccordionTrigger", ts = W.forwardRef(
12319
+ var si = "AccordionTrigger", ts = W.forwardRef(
12317
12320
  (e, t) => {
12318
- const { __scopeAccordion: r, ...n } = e, o = oo(Ut, r), i = $i(ii, r), a = _d(ii, r), s = ji(r);
12321
+ const { __scopeAccordion: r, ...n } = e, o = io(Ut, r), i = $i(si, r), a = _d(si, r), s = ji(r);
12319
12322
  return /* @__PURE__ */ l(Pi.ItemSlot, { scope: r, children: /* @__PURE__ */ l(
12320
12323
  zd,
12321
12324
  {
@@ -12329,10 +12332,10 @@ var ii = "AccordionTrigger", ts = W.forwardRef(
12329
12332
  ) });
12330
12333
  }
12331
12334
  );
12332
- ts.displayName = ii;
12335
+ ts.displayName = si;
12333
12336
  var R3 = "AccordionContent", rs = W.forwardRef(
12334
12337
  (e, t) => {
12335
- const { __scopeAccordion: r, ...n } = e, o = oo(Ut, r), i = $i(R3, r), a = ji(r);
12338
+ const { __scopeAccordion: r, ...n } = e, o = io(Ut, r), i = $i(R3, r), a = ji(r);
12336
12339
  return /* @__PURE__ */ l(
12337
12340
  Jd,
12338
12341
  {
@@ -12649,7 +12652,7 @@ function wf() {
12649
12652
  ] }),
12650
12653
  t && o?.length ? /* @__PURE__ */ l("div", { className: "gw-grid gw-grid-cols-1 gw-mt-2 gw-max-h-100 gw-min-h-0 gw-overflow-auto gw-pr-4 gw-min-h-0", children: o.map((a, s) => {
12651
12654
  if (a?.hide) return null;
12652
- const c = Yo[a.symbol] || M1;
12655
+ const c = Do[a.symbol] || M1;
12653
12656
  return /* @__PURE__ */ E("div", { className: "gw-w-full", children: [
12654
12657
  /* @__PURE__ */ E("div", { className: "gw-flex gw-justify-between gw-items-center gw-w-full gw-py-2", children: [
12655
12658
  /* @__PURE__ */ E("div", { className: "gw-flex gw-items-center gw-space-x-3", children: [
@@ -12830,7 +12833,7 @@ function bf() {
12830
12833
  href: a,
12831
12834
  target: "_blank",
12832
12835
  rel: "noopener noreferrer",
12833
- className: Gn({
12836
+ className: zn({
12834
12837
  variant: "link-inline",
12835
12838
  size: "xs-inline",
12836
12839
  scale: !1
@@ -12967,14 +12970,14 @@ function If({ onBack: e }) {
12967
12970
  }
12968
12971
  );
12969
12972
  }
12970
- var Sf = Object.defineProperty, Rn = Object.getOwnPropertySymbols, U3 = Object.prototype.hasOwnProperty, T3 = Object.prototype.propertyIsEnumerable, Ca = (e, t, r) => t in e ? Sf(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, si = (e, t) => {
12973
+ var Sf = Object.defineProperty, Rn = Object.getOwnPropertySymbols, U3 = Object.prototype.hasOwnProperty, T3 = Object.prototype.propertyIsEnumerable, Ca = (e, t, r) => t in e ? Sf(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ai = (e, t) => {
12971
12974
  for (var r in t || (t = {}))
12972
12975
  U3.call(t, r) && Ca(e, r, t[r]);
12973
12976
  if (Rn)
12974
12977
  for (var r of Rn(t))
12975
12978
  T3.call(t, r) && Ca(e, r, t[r]);
12976
12979
  return e;
12977
- }, ai = (e, t) => {
12980
+ }, li = (e, t) => {
12978
12981
  var r = {};
12979
12982
  for (var n in e)
12980
12983
  U3.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
@@ -13640,7 +13643,7 @@ var Bf = (function() {
13640
13643
  boostLevel: d,
13641
13644
  marginSize: p,
13642
13645
  imageSettings: m
13643
- } = n, w = ai(n, [
13646
+ } = n, w = li(n, [
13644
13647
  "value",
13645
13648
  "size",
13646
13649
  "level",
@@ -13651,7 +13654,7 @@ var Bf = (function() {
13651
13654
  "boostLevel",
13652
13655
  "marginSize",
13653
13656
  "imageSettings"
13654
- ]), { style: v } = w, b = ai(w, ["style"]), I = m?.src, x = W.useRef(null), S = W.useRef(null), k = W.useCallback(
13657
+ ]), { style: v } = w, b = li(w, ["style"]), I = m?.src, x = W.useRef(null), S = W.useRef(null), k = W.useCallback(
13655
13658
  (T) => {
13656
13659
  x.current = T, typeof r == "function" ? r(T) : r && (r.current = T);
13657
13660
  },
@@ -13695,7 +13698,7 @@ var Bf = (function() {
13695
13698
  }), W.useEffect(() => {
13696
13699
  B(!1);
13697
13700
  }, [I]);
13698
- const O = si({ height: i, width: i }, v);
13701
+ const O = ai({ height: i, width: i }, v);
13699
13702
  let V = null;
13700
13703
  return I != null && (V = /* @__PURE__ */ W.createElement(
13701
13704
  "img",
@@ -13711,7 +13714,7 @@ var Bf = (function() {
13711
13714
  }
13712
13715
  )), /* @__PURE__ */ W.createElement(W.Fragment, null, /* @__PURE__ */ W.createElement(
13713
13716
  "canvas",
13714
- si({
13717
+ ai({
13715
13718
  style: O,
13716
13719
  height: i,
13717
13720
  width: i,
@@ -13736,7 +13739,7 @@ var J3 = W.forwardRef(
13736
13739
  title: p,
13737
13740
  marginSize: m,
13738
13741
  imageSettings: C
13739
- } = n, w = ai(n, [
13742
+ } = n, w = li(n, [
13740
13743
  "value",
13741
13744
  "size",
13742
13745
  "level",
@@ -13778,7 +13781,7 @@ var J3 = W.forwardRef(
13778
13781
  const R = O3(S, v);
13779
13782
  return /* @__PURE__ */ W.createElement(
13780
13783
  "svg",
13781
- si({
13784
+ ai({
13782
13785
  height: i,
13783
13786
  width: i,
13784
13787
  viewBox: `0 0 ${I} ${I}`,
@@ -13861,7 +13864,7 @@ function Ff({ onBack: e }) {
13861
13864
  {
13862
13865
  text: "Copy Wallet Address",
13863
13866
  textToCopy: r?.evmWallet,
13864
- className: Gn({
13867
+ className: zn({
13865
13868
  variant: "default",
13866
13869
  size: "default",
13867
13870
  className: "gw-w-full"
@@ -14046,7 +14049,7 @@ const Kf = ({ text: e, type: t, className: r }) => /* @__PURE__ */ l("div", { cl
14046
14049
  if (r(s.target.value), !s.target.value) return n("");
14047
14050
  if (!ds(s.target.value, { strict: !1 }))
14048
14051
  return n("Please enter a valid wallet address");
14049
- if (a?.evmWallet && lo(s.target.value) === lo(a?.evmWallet))
14052
+ if (a?.evmWallet && co(s.target.value) === co(a?.evmWallet))
14050
14053
  return n("You cannot send funds to your own wallet");
14051
14054
  n("");
14052
14055
  },
@@ -14065,7 +14068,7 @@ const Kf = ({ text: e, type: t, className: r }) => /* @__PURE__ */ l("div", { cl
14065
14068
  className: "gw-w-full gw-mt-4",
14066
14069
  disabled: !o || !!i,
14067
14070
  onClick: () => {
14068
- r(lo(o)), t(at.ENTER_AMOUNT);
14071
+ r(co(o)), t(at.ENTER_AMOUNT);
14069
14072
  },
14070
14073
  children: "Continue"
14071
14074
  }
@@ -14278,13 +14281,13 @@ function jf({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14278
14281
  const { maxFeePerGas: Ye } = await v.estimateFeesPerGas();
14279
14282
  let y;
14280
14283
  try {
14281
- const K = (z || L === Number(R.value || 0)) && R.valueInWei ? BigInt(R.valueInWei || 0) : B0(`${L}`);
14284
+ const K = (z || L === Number(R.value || 0)) && R.valueInWei ? BigInt(R.valueInWei || 0) : W0(`${L}`);
14282
14285
  x === y1 ? y = await v.estimateGas({
14283
14286
  account: o?.evmWallet,
14284
14287
  to: p,
14285
14288
  value: K
14286
14289
  }) : y = await v.estimateContractGas({
14287
- abi: co,
14290
+ abi: uo,
14288
14291
  functionName: "transfer",
14289
14292
  args: [p, K],
14290
14293
  account: o?.evmWallet,
@@ -14308,7 +14311,7 @@ function jf({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14308
14311
  g = z ? BigInt(R.valueInWei || 0) : q6(L, R.decimals || 18);
14309
14312
  }
14310
14313
  const A = Ye / 2n, M = tn(
14311
- +uo(g, R.decimals || 18),
14314
+ +fo(g, R.decimals || 18),
14312
14315
  R.displayDecimals
14313
14316
  );
14314
14317
  T({
@@ -14321,9 +14324,9 @@ function jf({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14321
14324
  receivable_amount_in_currency: tn(
14322
14325
  M * +(R.rateInCurrency || 0)
14323
14326
  ),
14324
- estimated_fees_amount: uo(h, k?.decimals || 18),
14327
+ estimated_fees_amount: fo(h, k?.decimals || 18),
14325
14328
  estimated_fees_amount_in_currency: tn(
14326
- +uo(h, k?.decimals || 18) * +(k?.rateInCurrency || 0)
14329
+ +fo(h, k?.decimals || 18) * +(k?.rateInCurrency || 0)
14327
14330
  ),
14328
14331
  currency: k?.currency || "",
14329
14332
  in_amount: L.toString(),
@@ -14380,7 +14383,7 @@ function jf({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14380
14383
  pe(() => (b === at.END && Ct === "SUCCESS" && n(er.SUCCESS), b === at.END && Ct === "FAILED" && n(er.ERROR), () => {
14381
14384
  n(void 0);
14382
14385
  }), [n, Ct, b]);
14383
- const be = L > 0 && L <= Number(R?.value || "0"), Xe = R?.symbol && Yo[R.symbol] || M1;
14386
+ const be = L > 0 && L <= Number(R?.value || "0"), Xe = R?.symbol && Do[R.symbol] || M1;
14384
14387
  return /* @__PURE__ */ E(Ue, { children: [
14385
14388
  b === at.ENTER_ADDRESS && /* @__PURE__ */ l(
14386
14389
  Qf,
@@ -14432,7 +14435,7 @@ function jf({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14432
14435
  ),
14433
14436
  le && /* @__PURE__ */ l("div", { className: "gw-absolute gw-top-full gw-right-0 gw-mt-1 gw-bg-white gw-rounded-xl gw-shadow-md gw-z-50 gw-min-w-[16rem] gw-max-h-[320px] gw-overflow-y-auto", children: c?.tokens?.map?.((ee, ce) => {
14434
14437
  if (ee?.hide) return null;
14435
- const Ye = Yo[ee.symbol] || M1;
14438
+ const Ye = Do[ee.symbol] || M1;
14436
14439
  return /* @__PURE__ */ E("div", { children: [
14437
14440
  /* @__PURE__ */ E(
14438
14441
  "button",
@@ -14620,7 +14623,7 @@ function jf({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14620
14623
  }), ce = typeof ee == "object" ? ee.hash : ee;
14621
14624
  else {
14622
14625
  const y = await v.simulateContract({
14623
- abi: co,
14626
+ abi: uo,
14624
14627
  functionName: "transfer",
14625
14628
  account: o?.evmWallet,
14626
14629
  address: x,
@@ -14631,8 +14634,8 @@ function jf({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14631
14634
  maxPriorityFeePerGas: V?.maxPriorityFeePerGas
14632
14635
  });
14633
14636
  try {
14634
- const h = W0({
14635
- abi: co,
14637
+ const h = M0({
14638
+ abi: uo,
14636
14639
  functionName: "transfer",
14637
14640
  args: [p, V?.receivable_amount]
14638
14641
  });
@@ -14839,13 +14842,13 @@ const ya = xt(
14839
14842
  /* @__PURE__ */ l(D1, { className: "gw-size-4 gw-animate-spin" })
14840
14843
  ] }) });
14841
14844
  }, Sr = J1("GlyphData"), $f = ({ children: e }) => {
14842
- const t = tr(wi);
14845
+ const t = tr(Ci);
14843
14846
  if (!t) throw new Error("GlyphUserDataProvider must be used within GlyphProvider");
14844
14847
  const { ready: r, authenticated: n } = t, { glyphApiFetch: o } = C1(), i = Et(), a = Tn(i), [s, c] = re(null), [u, f] = re(!1), [d, p] = re(0), [m, C] = re(!1), {
14845
14848
  data: w,
14846
14849
  refetch: v,
14847
14850
  error: b
14848
- } = P0({
14851
+ } = H0({
14849
14852
  queryKey: ["glyphWidgetUser", n],
14850
14853
  // Query key depends on authentication status
14851
14854
  queryFn: async () => {
@@ -14868,7 +14871,7 @@ const ya = xt(
14868
14871
  }
14869
14872
  },
14870
14873
  enabled: r && n && !!o,
14871
- refetchInterval: jc,
14874
+ refetchInterval: Pc,
14872
14875
  retry: (S) => {
14873
14876
  const k = S < 5;
14874
14877
  return k && Sr.debug(`Retrying user fetch (attempt ${S + 1})...`), k;
@@ -14885,7 +14888,7 @@ const ya = xt(
14885
14888
  const B = await o(`/api/widget/balances?chainId=${i}`);
14886
14889
  if (B.ok) {
14887
14890
  const q = await B.json();
14888
- if (G0(s, q)) return C(!0);
14891
+ if (O0(s, q)) return C(!0);
14889
14892
  Object.entries(k || {}).forEach(([L, X]) => {
14890
14893
  const z = q?.tokens?.find?.((V) => V.symbol === L)?.value || "0", O = s?.tokens?.find?.((V) => V.symbol === L)?.value || "0";
14891
14894
  z && z !== O && X(Number(z) - Number(O));
@@ -15005,7 +15008,7 @@ const ya = xt(
15005
15008
  t && Object.values(jr).includes(t) ? s(t) : s(Ns);
15006
15009
  }, [t]);
15007
15010
  const c = nt(() => i[a], [a, i]);
15008
- return /* @__PURE__ */ l(R0, { fallback: /* @__PURE__ */ l("div", { children: "Loading..." }), children: /* @__PURE__ */ l(c, { glyphUrl: r?.trim?.(), ...o, children: /* @__PURE__ */ l($f, { children: /* @__PURE__ */ l(eh, { children: /* @__PURE__ */ l(gd, { children: e }) }) }) }) });
15011
+ return /* @__PURE__ */ l(c, { glyphUrl: r?.trim?.(), ...o, children: /* @__PURE__ */ l($f, { children: /* @__PURE__ */ l(eh, { children: /* @__PURE__ */ l(gd, { children: e }) }) }) });
15009
15012
  };
15010
15013
  function Xg() {
15011
15014
  const { user: e } = Fe(), t = Et(), { glyphApiFetch: r } = C1(), [n, o] = re(!1);
@@ -15049,7 +15052,7 @@ const Pg = () => {
15049
15052
  setGlyphView: t
15050
15053
  };
15051
15054
  }, nh = () => {
15052
- const { connectAsync: e, connectors: t } = z0(), { disconnect: r } = J0();
15055
+ const { connectAsync: e, connectors: t } = G0(), { disconnect: r } = z0();
15053
15056
  return {
15054
15057
  connect: Pe(async () => {
15055
15058
  const o = t.find((i) => i.id === gt.id);
@@ -15069,7 +15072,7 @@ const Pg = () => {
15069
15072
  /* @__PURE__ */ l("span", { className: "gw-flex-1 gw-text-center", children: "Connect to Glyph" })
15070
15073
  ] }) });
15071
15074
  };
15072
- class D3 extends bi {
15075
+ class D3 extends Ai {
15073
15076
  constructor(t, r) {
15074
15077
  super(), this.finished = !1, this.destroyed = !1, l2(t);
15075
15078
  const n = qn(r);
@@ -15179,7 +15182,7 @@ class sh extends q1 {
15179
15182
  });
15180
15183
  }
15181
15184
  }
15182
- class Wo extends q1 {
15185
+ class Bo extends q1 {
15183
15186
  constructor() {
15184
15187
  super("Provider not found."), Object.defineProperty(this, "name", {
15185
15188
  enumerable: !0,
@@ -15194,7 +15197,7 @@ async function ah({ providerAppId: e, apiUrl: t }) {
15194
15197
  return { url: i, customConnectUrl: n, customTransactUrl: o, name: s, iconUrl: a };
15195
15198
  }
15196
15199
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
15197
- const ns = /* @__PURE__ */ BigInt(0), li = /* @__PURE__ */ BigInt(1);
15200
+ const ns = /* @__PURE__ */ BigInt(0), ci = /* @__PURE__ */ BigInt(1);
15198
15201
  function Wn(e, t = "") {
15199
15202
  if (typeof e != "boolean") {
15200
15203
  const r = t && `"${t}"`;
@@ -15219,7 +15222,7 @@ function j3(e) {
15219
15222
  throw new Error("hex string expected, got " + typeof e);
15220
15223
  return e === "" ? ns : BigInt("0x" + e);
15221
15224
  }
15222
- function io(e) {
15225
+ function so(e) {
15223
15226
  return j3(Pr(e));
15224
15227
  }
15225
15228
  function _3(e) {
@@ -15245,9 +15248,9 @@ function lt(e, t, r) {
15245
15248
  throw new Error(e + " must be hex string or Uint8Array");
15246
15249
  return n.length, n;
15247
15250
  }
15248
- const Bo = (e) => typeof e == "bigint" && ns <= e;
15251
+ const Uo = (e) => typeof e == "bigint" && ns <= e;
15249
15252
  function lh(e, t, r) {
15250
- return Bo(e) && Bo(t) && Bo(r) && t <= e && e < r;
15253
+ return Uo(e) && Uo(t) && Uo(r) && t <= e && e < r;
15251
15254
  }
15252
15255
  function ch(e, t, r, n) {
15253
15256
  if (!lh(t, r, n))
@@ -15255,11 +15258,11 @@ function ch(e, t, r, n) {
15255
15258
  }
15256
15259
  function e0(e) {
15257
15260
  let t;
15258
- for (t = 0; e > ns; e >>= li, t += 1)
15261
+ for (t = 0; e > ns; e >>= ci, t += 1)
15259
15262
  ;
15260
15263
  return t;
15261
15264
  }
15262
- const _1 = (e) => (li << BigInt(e)) - li;
15265
+ const _1 = (e) => (ci << BigInt(e)) - ci;
15263
15266
  function uh(e, t, r) {
15264
15267
  if (typeof e != "number" || e < 2)
15265
15268
  throw new Error("hashLen must be a number");
@@ -15515,7 +15518,7 @@ function $1(e, t, r = !1, n = {}) {
15515
15518
  }
15516
15519
  if (p.length !== u)
15517
15520
  throw new Error("Field.fromBytes: expected " + u + " bytes, got " + p.length);
15518
- let C = r ? _3(p) : io(p);
15521
+ let C = r ? _3(p) : so(p);
15519
15522
  if (a && (C = Vt(C, e)), !m && !d.isValid(C))
15520
15523
  throw new Error("invalid field element: outside of range 0..ORDER");
15521
15524
  return C;
@@ -15542,7 +15545,7 @@ function yh(e, t, r = !1) {
15542
15545
  const n = e.length, o = u0(t), i = d0(t);
15543
15546
  if (n < 16 || n < i || n > 1024)
15544
15547
  throw new Error("expected " + i + "-1024 bytes of input, got " + n);
15545
- const a = r ? _3(e) : io(e), s = Vt(a, t - ot) + ot;
15548
+ const a = r ? _3(e) : so(e), s = Vt(a, t - ot) + ot;
15546
15549
  return r ? $3(s, o) : os(s, o);
15547
15550
  }
15548
15551
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
@@ -15551,7 +15554,7 @@ function Bn(e, t) {
15551
15554
  const r = t.negate();
15552
15555
  return e ? r : t;
15553
15556
  }
15554
- function Uo(e, t) {
15557
+ function To(e, t) {
15555
15558
  const r = l0(e.Fp, t.map((n) => n.Z));
15556
15559
  return t.map((n, o) => e.fromAffine(n.toAffine(r[o])));
15557
15560
  }
@@ -15559,7 +15562,7 @@ function f0(e, t) {
15559
15562
  if (!Number.isSafeInteger(e) || e <= 0 || e > t)
15560
15563
  throw new Error("invalid window size, expected [1.." + t + "], got W=" + e);
15561
15564
  }
15562
- function To(e, t) {
15565
+ function Lo(e, t) {
15563
15566
  f0(e, t);
15564
15567
  const r = Math.ceil(t / e) + 1, n = 2 ** (e - 1), o = 2 ** e, i = _1(e), a = BigInt(e);
15565
15568
  return { windows: r, windowSize: n, mask: i, maxNumber: o, shiftBy: a };
@@ -15587,8 +15590,8 @@ function bh(e, t) {
15587
15590
  throw new Error("invalid scalar at index " + n);
15588
15591
  });
15589
15592
  }
15590
- const Lo = /* @__PURE__ */ new WeakMap(), h0 = /* @__PURE__ */ new WeakMap();
15591
- function Fo(e) {
15593
+ const Fo = /* @__PURE__ */ new WeakMap(), h0 = /* @__PURE__ */ new WeakMap();
15594
+ function Ko(e) {
15592
15595
  return h0.get(e) || 1;
15593
15596
  }
15594
15597
  function ka(e) {
@@ -15620,7 +15623,7 @@ class Ah {
15620
15623
  * @returns precomputed point tables flattened to a single array
15621
15624
  */
15622
15625
  precomputeWindow(t, r) {
15623
- const { windows: n, windowSize: o } = To(r, this.bits), i = [];
15626
+ const { windows: n, windowSize: o } = Lo(r, this.bits), i = [];
15624
15627
  let a = t, s = a;
15625
15628
  for (let c = 0; c < n; c++) {
15626
15629
  s = a, i.push(s);
@@ -15640,7 +15643,7 @@ class Ah {
15640
15643
  if (!this.Fn.isValid(n))
15641
15644
  throw new Error("invalid scalar");
15642
15645
  let o = this.ZERO, i = this.BASE;
15643
- const a = To(t, this.bits);
15646
+ const a = Lo(t, this.bits);
15644
15647
  for (let s = 0; s < a.windows; s++) {
15645
15648
  const { nextN: c, offset: u, isZero: f, isNeg: d, isNegF: p, offsetF: m } = Va(n, s, a);
15646
15649
  n = c, f ? i = i.add(Bn(p, r[m])) : o = o.add(Bn(d, r[u]));
@@ -15653,7 +15656,7 @@ class Ah {
15653
15656
  * @returns point
15654
15657
  */
15655
15658
  wNAFUnsafe(t, r, n, o = this.ZERO) {
15656
- const i = To(t, this.bits);
15659
+ const i = Lo(t, this.bits);
15657
15660
  for (let a = 0; a < i.windows && n !== d1; a++) {
15658
15661
  const { nextN: s, offset: c, isZero: u, isNeg: f } = Va(n, a, i);
15659
15662
  if (n = s, !u) {
@@ -15664,25 +15667,25 @@ class Ah {
15664
15667
  return ka(n), o;
15665
15668
  }
15666
15669
  getPrecomputes(t, r, n) {
15667
- let o = Lo.get(r);
15668
- return o || (o = this.precomputeWindow(r, t), t !== 1 && (typeof n == "function" && (o = n(o)), Lo.set(r, o))), o;
15670
+ let o = Fo.get(r);
15671
+ return o || (o = this.precomputeWindow(r, t), t !== 1 && (typeof n == "function" && (o = n(o)), Fo.set(r, o))), o;
15669
15672
  }
15670
15673
  cached(t, r, n) {
15671
- const o = Fo(t);
15674
+ const o = Ko(t);
15672
15675
  return this.wNAF(o, this.getPrecomputes(o, t, n), r);
15673
15676
  }
15674
15677
  unsafe(t, r, n, o) {
15675
- const i = Fo(t);
15678
+ const i = Ko(t);
15676
15679
  return i === 1 ? this._unsafeLadder(t, r, o) : this.wNAFUnsafe(i, this.getPrecomputes(i, t, n), r, o);
15677
15680
  }
15678
15681
  // We calculate precomputes for elliptic curve point multiplication
15679
15682
  // using windowed method. This specifies window size and
15680
15683
  // stores precomputed values. Usually only base point would be precomputed.
15681
15684
  createCache(t, r) {
15682
- f0(r, this.bits), h0.set(t, r), Lo.delete(t);
15685
+ f0(r, this.bits), h0.set(t, r), Fo.delete(t);
15683
15686
  }
15684
15687
  hasCache(t) {
15685
- return Fo(t) !== 1;
15688
+ return Ko(t) !== 1;
15686
15689
  }
15687
15690
  }
15688
15691
  function xh(e, t, r, n) {
@@ -15750,16 +15753,16 @@ function Sh(e, t, r) {
15750
15753
  throw new Error("splitScalar (endomorphism): failed, k=" + e);
15751
15754
  return { k1neg: d, k1: u, k2neg: p, k2: f };
15752
15755
  }
15753
- function ci(e) {
15756
+ function ui(e) {
15754
15757
  if (!["compact", "recovered", "der"].includes(e))
15755
15758
  throw new Error('Signature format must be "compact", "recovered", or "der"');
15756
15759
  return e;
15757
15760
  }
15758
- function Ko(e, t) {
15761
+ function qo(e, t) {
15759
15762
  const r = {};
15760
15763
  for (let n of Object.keys(t))
15761
15764
  r[n] = e[n] === void 0 ? t[n] : e[n];
15762
- return Wn(r.lowS, "lowS"), Wn(r.prehash, "prehash"), r.format !== void 0 && ci(r.format), r;
15765
+ return Wn(r.lowS, "lowS"), Wn(r.prehash, "prehash"), r.format !== void 0 && ui(r.format), r;
15763
15766
  }
15764
15767
  class Nh extends Error {
15765
15768
  constructor(t = "") {
@@ -15837,7 +15840,7 @@ const Pt = {
15837
15840
  throw new t("invalid signature integer: negative");
15838
15841
  if (e[0] === 0 && !(e[1] & 128))
15839
15842
  throw new t("invalid signature integer: unnecessary leading zero");
15840
- return io(e);
15843
+ return so(e);
15841
15844
  }
15842
15845
  },
15843
15846
  toSig(e) {
@@ -16088,7 +16091,7 @@ function kh(e, t = {}) {
16088
16091
  if (!o.isValidNot0(V))
16089
16092
  throw new Error("invalid scalar: out of range");
16090
16093
  let U, F;
16091
- const Z = (Q) => z.cached(this, Q, (J) => Uo(L, J));
16094
+ const Z = (Q) => z.cached(this, Q, (J) => To(L, J));
16092
16095
  if (T) {
16093
16096
  const { k1neg: Q, k1: J, k2neg: P, k2: D } = k(V), { p: _, f: j } = Z(J), { p: H, f: G } = Z(D);
16094
16097
  F = j.add(G), U = q(T.beta, _, H, Q, P);
@@ -16096,7 +16099,7 @@ function kh(e, t = {}) {
16096
16099
  const { p: Q, f: J } = Z(V);
16097
16100
  U = Q, F = J;
16098
16101
  }
16099
- return Uo(L, [U, F])[0];
16102
+ return To(L, [U, F])[0];
16100
16103
  }
16101
16104
  /**
16102
16105
  * Non-constant-time multiplication. Uses double-and-add algorithm.
@@ -16171,7 +16174,7 @@ function kh(e, t = {}) {
16171
16174
  this.precompute(V);
16172
16175
  }
16173
16176
  static normalizeZ(V) {
16174
- return Uo(L, V);
16177
+ return To(L, V);
16175
16178
  }
16176
16179
  static msm(V, T) {
16177
16180
  return Eh(L, o, V, T);
@@ -16281,7 +16284,7 @@ function Mh(e, t, r = {}) {
16281
16284
  return U;
16282
16285
  }
16283
16286
  function I(T, U) {
16284
- ci(U);
16287
+ ui(U);
16285
16288
  const F = m.signature, Z = U === "compact" ? F : U === "recovered" ? F + 1 : void 0;
16286
16289
  return Nr(T, Z, `${U} signature`);
16287
16290
  }
@@ -16325,7 +16328,7 @@ function Mh(e, t, r = {}) {
16325
16328
  return v(this.s);
16326
16329
  }
16327
16330
  toBytes(U = w) {
16328
- if (ci(U), U === "der")
16331
+ if (ui(U), U === "der")
16329
16332
  return An(Pt.hexFromSig(this));
16330
16333
  const F = a.toBytes(this.r), Z = a.toBytes(this.s);
16331
16334
  if (U === "recovered") {
@@ -16366,7 +16369,7 @@ function Mh(e, t, r = {}) {
16366
16369
  const S = r.bits2int || function(U) {
16367
16370
  if (U.length > 8192)
16368
16371
  throw new Error("input is too large");
16369
- const F = io(U), Z = U.length * 8 - c;
16372
+ const F = so(U), Z = U.length * 8 - c;
16370
16373
  return Z > 0 ? F >> BigInt(Z) : F;
16371
16374
  }, k = r.bits2int_modN || function(U) {
16372
16375
  return a.create(S(U));
@@ -16380,7 +16383,7 @@ function Mh(e, t, r = {}) {
16380
16383
  function L(T, U, F) {
16381
16384
  if (["recovered", "canonical"].some(($) => $ in F))
16382
16385
  throw new Error("sign() legacy options not supported");
16383
- const { lowS: Z, prehash: Q, extraEntropy: J } = Ko(F, C);
16386
+ const { lowS: Z, prehash: Q, extraEntropy: J } = qo(F, C);
16384
16387
  T = q(T, Q);
16385
16388
  const P = k(T), D = Hr(a, U), _ = [B(D), B(P)];
16386
16389
  if (J != null && J !== !1) {
@@ -16432,7 +16435,7 @@ function Mh(e, t, r = {}) {
16432
16435
  return U || !1;
16433
16436
  }
16434
16437
  function O(T, U, F, Z = {}) {
16435
- const { lowS: Q, prehash: J, format: P } = Ko(Z, C);
16438
+ const { lowS: Q, prehash: J, format: P } = qo(Z, C);
16436
16439
  if (F = lt("publicKey", F), U = q(lt("message", U), J), "strict" in Z)
16437
16440
  throw new Error("options.strict was renamed to lowS");
16438
16441
  const D = P === void 0 ? z(T) : x.fromBytes(lt("sig", T), P);
@@ -16449,7 +16452,7 @@ function Mh(e, t, r = {}) {
16449
16452
  }
16450
16453
  }
16451
16454
  function V(T, U, F = {}) {
16452
- const { prehash: Z } = Ko(F, C);
16455
+ const { prehash: Z } = qo(F, C);
16453
16456
  return U = q(U, Z), x.fromBytes(T, "recovered").recoverPublicKey(U).toBytes();
16454
16457
  }
16455
16458
  return Object.freeze({
@@ -16537,11 +16540,11 @@ const as = {
16537
16540
  }, Wa = /* @__PURE__ */ BigInt(2);
16538
16541
  function Kh(e) {
16539
16542
  const t = as.p, r = BigInt(3), n = BigInt(6), o = BigInt(11), i = BigInt(22), a = BigInt(23), s = BigInt(44), c = BigInt(88), u = e * e * e % t, f = u * u * e % t, d = bt(f, r, t) * f % t, p = bt(d, r, t) * f % t, m = bt(p, Wa, t) * u % t, C = bt(m, o, t) * m % t, w = bt(C, i, t) * C % t, v = bt(w, s, t) * w % t, b = bt(v, c, t) * v % t, I = bt(b, s, t) * w % t, x = bt(I, r, t) * f % t, S = bt(x, a, t) * C % t, k = bt(S, n, t) * u % t, R = bt(k, Wa, t);
16540
- if (!ui.eql(ui.sqr(R), e))
16543
+ if (!di.eql(di.sqr(R), e))
16541
16544
  throw new Error("Cannot find square root");
16542
16545
  return R;
16543
16546
  }
16544
- const ui = $1(as.p, { sqrt: Kh }), di = Lh({ ...as, Fp: ui, lowS: !0, endo: Fh }, h2);
16547
+ const di = $1(as.p, { sqrt: Kh }), fi = Lh({ ...as, Fp: di, lowS: !0, endo: Fh }, h2);
16545
16548
  /*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */
16546
16549
  function qh(e) {
16547
16550
  return e instanceof Uint8Array || e != null && typeof e == "object" && e.constructor.name === "Uint8Array";
@@ -16676,7 +16679,7 @@ function zh(e, t = !1) {
16676
16679
  };
16677
16680
  }
16678
16681
  const Rt = /* @__PURE__ */ Zh(/* @__PURE__ */ zh(6), /* @__PURE__ */ Qh("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"), /* @__PURE__ */ Gh(6), /* @__PURE__ */ Oh(""));
16679
- var qo = {}, S1 = {}, Ua;
16682
+ var Zo = {}, S1 = {}, Ua;
16680
16683
  function Jh() {
16681
16684
  if (Ua) return S1;
16682
16685
  Ua = 1, S1.byteLength = s, S1.toByteArray = u, S1.fromByteArray = p;
@@ -17696,9 +17699,9 @@ function Dh() {
17696
17699
  function Ye() {
17697
17700
  throw new Error("BigInt not supported");
17698
17701
  }
17699
- })(qo)), qo;
17702
+ })(Zo)), Zo;
17700
17703
  }
17701
- var Xh = Dh(), tt = Uint8Array, pt = Uint16Array, ls = Int32Array, so = new tt([
17704
+ var Xh = Dh(), tt = Uint8Array, pt = Uint16Array, ls = Int32Array, ao = new tt([
17702
17705
  0,
17703
17706
  0,
17704
17707
  0,
@@ -17733,7 +17736,7 @@ var Xh = Dh(), tt = Uint8Array, pt = Uint16Array, ls = Int32Array, so = new tt([
17733
17736
  0,
17734
17737
  /* impossible */
17735
17738
  0
17736
- ]), ao = new tt([
17739
+ ]), lo = new tt([
17737
17740
  0,
17738
17741
  0,
17739
17742
  0,
@@ -17767,19 +17770,19 @@ var Xh = Dh(), tt = Uint8Array, pt = Uint16Array, ls = Int32Array, so = new tt([
17767
17770
  /* unused */
17768
17771
  0,
17769
17772
  0
17770
- ]), fi = new tt([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), C0 = function(e, t) {
17773
+ ]), hi = new tt([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), C0 = function(e, t) {
17771
17774
  for (var r = new pt(31), n = 0; n < 31; ++n)
17772
17775
  r[n] = t += 1 << e[n - 1];
17773
17776
  for (var o = new ls(r[30]), n = 1; n < 30; ++n)
17774
17777
  for (var i = r[n]; i < r[n + 1]; ++i)
17775
17778
  o[i] = i - r[n] << 5 | n;
17776
17779
  return { b: r, r: o };
17777
- }, y0 = C0(so, 2), v0 = y0.b, hi = y0.r;
17778
- v0[28] = 258, hi[258] = 28;
17779
- var b0 = C0(ao, 0), Hh = b0.b, Fa = b0.r, gi = new pt(32768);
17780
+ }, y0 = C0(ao, 2), v0 = y0.b, gi = y0.r;
17781
+ v0[28] = 258, gi[258] = 28;
17782
+ var b0 = C0(lo, 0), Hh = b0.b, Fa = b0.r, pi = new pt(32768);
17780
17783
  for (var Be = 0; Be < 32768; ++Be) {
17781
17784
  var dr = (Be & 43690) >> 1 | (Be & 21845) << 1;
17782
- dr = (dr & 52428) >> 2 | (dr & 13107) << 2, dr = (dr & 61680) >> 4 | (dr & 3855) << 4, gi[Be] = ((dr & 65280) >> 8 | (dr & 255) << 8) >> 1;
17785
+ dr = (dr & 52428) >> 2 | (dr & 13107) << 2, dr = (dr & 61680) >> 4 | (dr & 3855) << 4, pi[Be] = ((dr & 65280) >> 8 | (dr & 255) << 8) >> 1;
17783
17786
  }
17784
17787
  var Qt = (function(e, t, r) {
17785
17788
  for (var n = e.length, o = 0, i = new pt(t); o < n; ++o)
@@ -17794,10 +17797,10 @@ var Qt = (function(e, t, r) {
17794
17797
  for (o = 0; o < n; ++o)
17795
17798
  if (e[o])
17796
17799
  for (var u = o << 4 | e[o], f = t - e[o], d = a[e[o] - 1]++ << f, p = d | (1 << f) - 1; d <= p; ++d)
17797
- s[gi[d] >> c] = u;
17800
+ s[pi[d] >> c] = u;
17798
17801
  } else
17799
17802
  for (s = new pt(n), o = 0; o < n; ++o)
17800
- e[o] && (s[o] = gi[a[e[o] - 1]++] >> 15 - e[o]);
17803
+ e[o] && (s[o] = pi[a[e[o] - 1]++] >> 15 - e[o]);
17801
17804
  return s;
17802
17805
  }), Cr = new tt(288);
17803
17806
  for (var Be = 0; Be < 144; ++Be)
@@ -17811,14 +17814,14 @@ for (var Be = 280; Be < 288; ++Be)
17811
17814
  var Z1 = new tt(32);
17812
17815
  for (var Be = 0; Be < 32; ++Be)
17813
17816
  Z1[Be] = 5;
17814
- var Ph = /* @__PURE__ */ Qt(Cr, 9, 0), jh = /* @__PURE__ */ Qt(Cr, 9, 1), _h = /* @__PURE__ */ Qt(Z1, 5, 0), $h = /* @__PURE__ */ Qt(Z1, 5, 1), Zo = function(e) {
17817
+ var Ph = /* @__PURE__ */ Qt(Cr, 9, 0), jh = /* @__PURE__ */ Qt(Cr, 9, 1), _h = /* @__PURE__ */ Qt(Z1, 5, 0), $h = /* @__PURE__ */ Qt(Z1, 5, 1), Qo = function(e) {
17815
17818
  for (var t = e[0], r = 1; r < e.length; ++r)
17816
17819
  e[r] > t && (t = e[r]);
17817
17820
  return t;
17818
17821
  }, Nt = function(e, t, r) {
17819
17822
  var n = t / 8 | 0;
17820
17823
  return (e[n] | e[n + 1] << 8) >> (t & 7) & r;
17821
- }, Qo = function(e, t) {
17824
+ }, Oo = function(e, t) {
17822
17825
  var r = t / 8 | 0;
17823
17826
  return (e[r] | e[r + 1] << 8 | e[r + 2] << 16) >> (t & 7);
17824
17827
  }, cs = function(e) {
@@ -17870,9 +17873,9 @@ var Ph = /* @__PURE__ */ Qt(Cr, 9, 0), jh = /* @__PURE__ */ Qt(Cr, 9, 1), _h = /
17870
17873
  var R = Nt(e, d, 31) + 257, B = Nt(e, d + 10, 15) + 4, q = R + Nt(e, d + 5, 31) + 1;
17871
17874
  d += 14;
17872
17875
  for (var L = new tt(q), X = new tt(19), z = 0; z < B; ++z)
17873
- X[fi[z]] = Nt(e, d + z * 3, 7);
17876
+ X[hi[z]] = Nt(e, d + z * 3, 7);
17874
17877
  d += B * 3;
17875
- for (var O = Zo(X), V = (1 << O) - 1, T = Qt(X, O, 1), z = 0; z < q; ) {
17878
+ for (var O = Qo(X), V = (1 << O) - 1, T = Qt(X, O, 1), z = 0; z < q; ) {
17876
17879
  var U = T[Nt(e, d, V)];
17877
17880
  d += U & 15;
17878
17881
  var x = U >> 4;
@@ -17885,7 +17888,7 @@ var Ph = /* @__PURE__ */ Qt(Cr, 9, 0), jh = /* @__PURE__ */ Qt(Cr, 9, 1), _h = /
17885
17888
  }
17886
17889
  }
17887
17890
  var Q = L.subarray(0, R), J = L.subarray(R);
17888
- w = Zo(Q), v = Zo(J), m = Qt(Q, w, 1), C = Qt(J, v, 1);
17891
+ w = Qo(Q), v = Qo(J), m = Qt(Q, w, 1), C = Qt(J, v, 1);
17889
17892
  } else
17890
17893
  kt(1);
17891
17894
  else {
@@ -17904,7 +17907,7 @@ var Ph = /* @__PURE__ */ Qt(Cr, 9, 0), jh = /* @__PURE__ */ Qt(Cr, 9, 1), _h = /
17904
17907
  }
17905
17908
  s && u(p + 131072);
17906
17909
  for (var P = (1 << w) - 1, D = (1 << v) - 1, _ = d; ; _ = d) {
17907
- var F = m[Qo(e, d) & P], j = F >> 4;
17910
+ var F = m[Oo(e, d) & P], j = F >> 4;
17908
17911
  if (d += F & 15, d > b) {
17909
17912
  c && kt(0);
17910
17913
  break;
@@ -17917,15 +17920,15 @@ var Ph = /* @__PURE__ */ Qt(Cr, 9, 0), jh = /* @__PURE__ */ Qt(Cr, 9, 1), _h = /
17917
17920
  } else {
17918
17921
  var H = j - 254;
17919
17922
  if (j > 264) {
17920
- var z = j - 257, G = so[z];
17923
+ var z = j - 257, G = ao[z];
17921
17924
  H = Nt(e, d, (1 << G) - 1) + v0[z], d += G;
17922
17925
  }
17923
- var $ = C[Qo(e, d) & D], ne = $ >> 4;
17926
+ var $ = C[Oo(e, d) & D], ne = $ >> 4;
17924
17927
  $ || kt(3), d += $ & 15;
17925
17928
  var J = Hh[ne];
17926
17929
  if (ne > 3) {
17927
- var G = ao[ne];
17928
- J += Qo(e, d) & (1 << G) - 1, d += G;
17930
+ var G = lo[ne];
17931
+ J += Oo(e, d) & (1 << G) - 1, d += G;
17929
17932
  }
17930
17933
  if (d > b) {
17931
17934
  c && kt(0);
@@ -17953,7 +17956,7 @@ var Ph = /* @__PURE__ */ Qt(Cr, 9, 0), jh = /* @__PURE__ */ Qt(Cr, 9, 1), _h = /
17953
17956
  r <<= t & 7;
17954
17957
  var n = t / 8 | 0;
17955
17958
  e[n] |= r, e[n + 1] |= r >> 8, e[n + 2] |= r >> 16;
17956
- }, Oo = function(e, t) {
17959
+ }, Go = function(e, t) {
17957
17960
  for (var r = [], n = 0; n < e.length; ++n)
17958
17961
  e[n] && r.push({ s: n, f: e[n] });
17959
17962
  var o = r.length, i = r.slice();
@@ -17971,7 +17974,7 @@ var Ph = /* @__PURE__ */ Qt(Cr, 9, 0), jh = /* @__PURE__ */ Qt(Cr, 9, 1), _h = /
17971
17974
  s = r[r[u].f < r[d].f ? u++ : d++], c = r[u != f && r[u].f < r[d].f ? u++ : d++], r[f++] = { s: -1, f: s.f + c.f, l: s, r: c };
17972
17975
  for (var p = i[0].s, n = 1; n < o; ++n)
17973
17976
  i[n].s > p && (p = i[n].s);
17974
- var m = new pt(p + 1), C = pi(r[f - 1], m, 0);
17977
+ var m = new pt(p + 1), C = mi(r[f - 1], m, 0);
17975
17978
  if (C > t) {
17976
17979
  var n = 0, w = 0, v = C - t, b = 1 << v;
17977
17980
  for (i.sort(function(R, B) {
@@ -17994,8 +17997,8 @@ var Ph = /* @__PURE__ */ Qt(Cr, 9, 0), jh = /* @__PURE__ */ Qt(Cr, 9, 1), _h = /
17994
17997
  C = t;
17995
17998
  }
17996
17999
  return { t: new tt(m), l: C };
17997
- }, pi = function(e, t, r) {
17998
- return e.s == -1 ? Math.max(pi(e.l, t, r + 1), pi(e.r, t, r + 1)) : t[e.s] = r;
18000
+ }, mi = function(e, t, r) {
18001
+ return e.s == -1 ? Math.max(mi(e.l, t, r + 1), mi(e.r, t, r + 1)) : t[e.s] = r;
17999
18002
  }, Ka = function(e) {
18000
18003
  for (var t = e.length; t && !e[--t]; )
18001
18004
  ;
@@ -18031,11 +18034,11 @@ var Ph = /* @__PURE__ */ Qt(Cr, 9, 0), jh = /* @__PURE__ */ Qt(Cr, 9, 1), _h = /
18031
18034
  return (o + 4 + n) * 8;
18032
18035
  }, qa = function(e, t, r, n, o, i, a, s, c, u, f) {
18033
18036
  Xt(t, f++, r), ++o[256];
18034
- for (var d = Oo(o, 15), p = d.t, m = d.l, C = Oo(i, 15), w = C.t, v = C.l, b = Ka(p), I = b.c, x = b.n, S = Ka(w), k = S.c, R = S.n, B = new pt(19), q = 0; q < I.length; ++q)
18037
+ for (var d = Go(o, 15), p = d.t, m = d.l, C = Go(i, 15), w = C.t, v = C.l, b = Ka(p), I = b.c, x = b.n, S = Ka(w), k = S.c, R = S.n, B = new pt(19), q = 0; q < I.length; ++q)
18035
18038
  ++B[I[q] & 31];
18036
18039
  for (var q = 0; q < k.length; ++q)
18037
18040
  ++B[k[q] & 31];
18038
- for (var L = Oo(B, 7), X = L.t, z = L.l, O = 19; O > 4 && !X[fi[O - 1]]; --O)
18041
+ for (var L = Go(B, 7), X = L.t, z = L.l, O = 19; O > 4 && !X[hi[O - 1]]; --O)
18039
18042
  ;
18040
18043
  var V = u + 5 << 3, T = V1(o, Cr) + V1(i, Z1) + a, U = V1(o, p) + V1(i, w) + a + 14 + 3 * O + V1(B, X) + 2 * B[16] + 3 * B[17] + 7 * B[18];
18041
18044
  if (c >= 0 && V <= T && V <= U)
@@ -18046,7 +18049,7 @@ var Ph = /* @__PURE__ */ Qt(Cr, 9, 0), jh = /* @__PURE__ */ Qt(Cr, 9, 1), _h = /
18046
18049
  var P = Qt(X, z, 0);
18047
18050
  Xt(t, f, x - 257), Xt(t, f + 5, R - 1), Xt(t, f + 10, O - 4), f += 14;
18048
18051
  for (var q = 0; q < O; ++q)
18049
- Xt(t, f + 3 * q, X[fi[q]]);
18052
+ Xt(t, f + 3 * q, X[hi[q]]);
18050
18053
  f += 3 * O;
18051
18054
  for (var D = [I, k], _ = 0; _ < 2; ++_)
18052
18055
  for (var j = D[_], q = 0; q < j.length; ++q) {
@@ -18059,9 +18062,9 @@ var Ph = /* @__PURE__ */ Qt(Cr, 9, 0), jh = /* @__PURE__ */ Qt(Cr, 9, 1), _h = /
18059
18062
  var G = n[q];
18060
18063
  if (G > 255) {
18061
18064
  var H = G >> 18 & 31;
18062
- N1(t, f, F[H + 257]), f += Z[H + 257], H > 7 && (Xt(t, f, G >> 23 & 31), f += so[H]);
18065
+ N1(t, f, F[H + 257]), f += Z[H + 257], H > 7 && (Xt(t, f, G >> 23 & 31), f += ao[H]);
18063
18066
  var $ = G & 31;
18064
- N1(t, f, Q[$]), f += J[$], $ > 3 && (N1(t, f, G >> 5 & 8191), f += ao[$]);
18067
+ N1(t, f, Q[$]), f += J[$], $ > 3 && (N1(t, f, G >> 5 & 8191), f += lo[$]);
18065
18068
  } else
18066
18069
  N1(t, f, F[G]), f += Z[G];
18067
18070
  }
@@ -18101,9 +18104,9 @@ var Ph = /* @__PURE__ */ Qt(Cr, 9, 0), jh = /* @__PURE__ */ Qt(Cr, 9, 1), _h = /
18101
18104
  T = U, U = w[T], D += T - U & 32767;
18102
18105
  }
18103
18106
  if (J) {
18104
- S[X++] = 268435456 | hi[Q] << 18 | Fa[J];
18105
- var ve = hi[Q] & 31, Ne = Fa[J] & 31;
18106
- q += so[ve] + ao[Ne], ++k[257 + ve], ++R[Ne], z = L + Q, ++B;
18107
+ S[X++] = 268435456 | gi[Q] << 18 | Fa[J];
18108
+ var ve = gi[Q] & 31, Ne = Fa[J] & 31;
18109
+ q += ao[ve] + lo[Ne], ++k[257 + ve], ++R[Ne], z = L + Q, ++B;
18107
18110
  } else
18108
18111
  S[X++] = e[L], ++k[e[L]];
18109
18112
  }
@@ -18168,11 +18171,11 @@ try {
18168
18171
  } catch {
18169
18172
  }
18170
18173
  function dg() {
18171
- let e = di.utils.randomPrivateKey(), t = di.getPublicKey(e);
18174
+ let e = fi.utils.randomPrivateKey(), t = fi.getPublicKey(e);
18172
18175
  return { privateKey: Rt.encode(e), publicKey: Rt.encode(t) };
18173
18176
  }
18174
18177
  function fg({ privateKey: e, publicKey: t }) {
18175
- let r = di.getSharedSecret(Rt.decode(e), Rt.decode(t)).slice(1);
18178
+ let r = fi.getSharedSecret(Rt.decode(e), Rt.decode(t)).slice(1);
18176
18179
  return Rt.encode(r);
18177
18180
  }
18178
18181
  async function hg(e, t) {
@@ -18356,10 +18359,10 @@ const Ag = (e) => {
18356
18359
  try {
18357
18360
  return await t.sendRequest(a, s);
18358
18361
  } catch (c) {
18359
- throw c instanceof W1 && (c.action === "clear" && o(), c.code === void 0 && c.message === "User rejected request") ? new fo(Error("User rejected request"), { code: 4001, shortMessage: "User rejected request" }) : new fo(c, { code: c.code ?? -1, shortMessage: c.message });
18362
+ throw c instanceof W1 && (c.action === "clear" && o(), c.code === void 0 && c.message === "User rejected request") ? new ho(Error("User rejected request"), { code: 4001, shortMessage: "User rejected request" }) : new ho(c, { code: c.code ?? -1, shortMessage: c.message });
18360
18363
  }
18361
18364
  default:
18362
- throw new fo(Error("Unsupported method"), { code: 4200, shortMessage: `Unsupported method: ${a}` });
18365
+ throw new ho(Error("Unsupported method"), { code: 4200, shortMessage: `Unsupported method: ${a}` });
18363
18366
  }
18364
18367
  } };
18365
18368
  };
@@ -18384,11 +18387,11 @@ function V0(e, t) {
18384
18387
  n && (c.removeListener("chainChanged", n), n = void 0), i && (c.removeListener("disconnect", i), i = void 0), o || (o = this.onConnect.bind(this), c.on("connect", o)), await c.request({ method: "wallet_revokePermissions", params: [{ eth_accounts: {} }] }), this.onDisconnect();
18385
18388
  }, async getAccounts() {
18386
18389
  let c = await this.getProvider();
18387
- if (!c) throw new Wo();
18390
+ if (!c) throw new Bo();
18388
18391
  return (await c.request({ method: "eth_accounts" })).map(((u) => fs(u)));
18389
18392
  }, async getChainId() {
18390
18393
  let c = await this.getProvider();
18391
- if (!c) throw new Wo();
18394
+ if (!c) throw new Bo();
18392
18395
  return Number(await c.request({ method: "eth_chainId" }));
18393
18396
  }, getProvider: async () => (a || (a = Ag({ chains: s.chains, transports: s.transports, providerAppId: e.id, apiUrl: e.apiUrl, smartWalletMode: e.smartWalletMode })), a), async isAuthorized() {
18394
18397
  try {
@@ -18398,9 +18401,9 @@ function V0(e, t) {
18398
18401
  }
18399
18402
  }, async switchChain({ chainId: c }) {
18400
18403
  let u = await this.getProvider();
18401
- if (!u) throw new Wo();
18404
+ if (!u) throw new Bo();
18402
18405
  let f = s.chains.find(((d) => d.id === c));
18403
- if (!f) throw new U0(new sh());
18406
+ if (!f) throw new B0(new sh());
18404
18407
  return c === Number(await u.request({ method: "eth_chainId" })) || (await u.request({ method: "wallet_switchEthereumChain", params: [{ chainId: `0x${c.toString(16)}` }] }), s.emitter.emit("change", { chainId: c })), f;
18405
18408
  }, async onAccountsChanged(c) {
18406
18409
  if (c.length !== 0) if (s.emitter.listenerCount("connect")) {
@@ -18435,7 +18438,7 @@ function Ig(e = {}) {
18435
18438
  ...o,
18436
18439
  ...t,
18437
18440
  getProvider: async (s) => {
18438
- const c = s?.chainId ?? n.chains?.[0]?.id ?? Ii.id;
18441
+ const c = s?.chainId ?? n.chains?.[0]?.id ?? Gn.id;
18439
18442
  return await o.getProvider({
18440
18443
  chainId: c
18441
18444
  });
@@ -18460,7 +18463,7 @@ const Sg = new Pa(), tp = ({
18460
18463
  ),
18461
18464
  [e]
18462
18465
  ), s = nt(
18463
- () => Y0({
18466
+ () => J0({
18464
18467
  chains: e,
18465
18468
  ssr: o,
18466
18469
  connectors: [Ig({ useStagingTenant: i.useStagingTenant })],
@@ -18469,7 +18472,7 @@ const Sg = new Pa(), tp = ({
18469
18472
  }),
18470
18473
  [e, t, a, i.useStagingTenant, o]
18471
18474
  );
18472
- return /* @__PURE__ */ l(D0, { config: s, children: /* @__PURE__ */ l(Ha, { client: r, children: /* @__PURE__ */ l(
18475
+ return /* @__PURE__ */ l(Y0, { config: s, children: /* @__PURE__ */ l(Ha, { client: r, children: /* @__PURE__ */ l(
18473
18476
  Y3,
18474
18477
  {
18475
18478
  strategy: jr.EIP1193,
@@ -18487,7 +18490,7 @@ const Sg = new Pa(), tp = ({
18487
18490
  name: gt.name,
18488
18491
  iconUrl: gt.iconUrl
18489
18492
  }), Qa = J1("usePrivyCrossAppProvider"), Ng = ({ chains: e, useStagingTenant: t }) => {
18490
- const { loginWithCrossAppAccount: r, linkCrossAppAccount: n, sendTransaction: o, signMessage: i, signTypedData: a } = j0(), { user: s, authenticated: c, ready: u } = _0(), [f, d] = re(null);
18493
+ const { loginWithCrossAppAccount: r, linkCrossAppAccount: n, sendTransaction: o, signMessage: i, signTypedData: a } = P0(), { user: s, authenticated: c, ready: u } = j0(), [f, d] = re(null);
18491
18494
  pe(() => {
18492
18495
  e.length > 0 && !f && d(e[0].id.toString());
18493
18496
  }, [e, f]);
@@ -18594,7 +18597,7 @@ const Sg = new Pa(), tp = ({
18594
18597
  const O = q[0].chainId;
18595
18598
  if (!O)
18596
18599
  throw new Error("Chain ID is required");
18597
- const V = L0(O) ? F0(O) : O;
18600
+ const V = T0(O) ? L0(O) : O;
18598
18601
  if (!Object.values(e).find((U) => U.id === V))
18599
18602
  throw new Error(`Chain ${V} not supported`);
18600
18603
  return I(V.toString()), null;
@@ -18623,7 +18626,7 @@ const Sg = new Pa(), tp = ({
18623
18626
  case "eth_sign":
18624
18627
  throw new Error("eth_sign is unsafe and not supported");
18625
18628
  case "personal_sign":
18626
- return I(L.toString()), await i(T0(q[0], "string"), {
18629
+ return I(L.toString()), await i(U0(q[0], "string"), {
18627
18630
  address: q[1],
18628
18631
  //address: "0x46E59553CC3be71d9Aa37E36C351DF12ED458ff5",
18629
18632
  chainId: L
@@ -18656,7 +18659,7 @@ const Sg = new Pa(), tp = ({
18656
18659
  children: e,
18657
18660
  useStagingTenant: t
18658
18661
  }) => {
18659
- const r = X0(), { reconnect: n } = H0(), { ready: o, provider: i } = Ng({
18662
+ const r = D0(), { reconnect: n } = X0(), { ready: o, provider: i } = Ng({
18660
18663
  chains: r.chains,
18661
18664
  useStagingTenant: t
18662
18665
  }), [a, s] = re(!1), [c, u] = re(null), f = J1("InjectWagmiConnector"), d = Pe(
@@ -18698,14 +18701,14 @@ const Sg = new Pa(), tp = ({
18698
18701
  ...c
18699
18702
  }) => {
18700
18703
  const u = nt(
18701
- () => e5({
18704
+ () => $0({
18702
18705
  chains: e,
18703
18706
  ssr: i,
18704
18707
  connectors: [],
18705
18708
  transports: t ?? e.reduce(
18706
18709
  (f, d) => {
18707
- const p = d.rpcUrls?.default?.webSocket?.[0], m = d.rpcUrls?.default?.http?.[0], C = [p && K0(p), m && Mr(m)].filter((w) => !!w);
18708
- return f[d.id] = C.length ? q0(C) : Mr(), f;
18710
+ const p = d.rpcUrls?.default?.webSocket?.[0], m = d.rpcUrls?.default?.http?.[0], C = [p && F0(p), m && Mr(m)].filter((w) => !!w);
18711
+ return f[d.id] = C.length ? K0(C) : Mr(), f;
18709
18712
  },
18710
18713
  {}
18711
18714
  ),
@@ -18719,7 +18722,7 @@ const Sg = new Pa(), tp = ({
18719
18722
  loginMethodsAndOrder: {
18720
18723
  primary: [o ? Ga : Oa]
18721
18724
  }
18722
- }, /* @__PURE__ */ l($0, { ...c, children: /* @__PURE__ */ l(Ha, { client: r, children: /* @__PURE__ */ l(t5, { config: u, children: /* @__PURE__ */ l(Vg, { useStagingTenant: o, children: /* @__PURE__ */ l(
18725
+ }, /* @__PURE__ */ l(_0, { ...c, children: /* @__PURE__ */ l(Ha, { client: r, children: /* @__PURE__ */ l(e5, { config: u, children: /* @__PURE__ */ l(Vg, { useStagingTenant: o, children: /* @__PURE__ */ l(
18723
18726
  Y3,
18724
18727
  {
18725
18728
  strategy: jr.PRIVY,
@@ -18741,10 +18744,10 @@ export {
18741
18744
  jg as N,
18742
18745
  _t as S,
18743
18746
  qg as W,
18744
- wi as a,
18747
+ Ci as a,
18745
18748
  Kg as b,
18746
18749
  J1 as c,
18747
- Ii as d,
18750
+ Gn as d,
18748
18751
  Y3 as e,
18749
18752
  Jg as f,
18750
18753
  Yg as g,
@@ -18765,7 +18768,7 @@ export {
18765
18768
  tp as v,
18766
18769
  rp as w,
18767
18770
  np as x,
18768
- Pc as y,
18771
+ Hc as y,
18769
18772
  Oa as z
18770
18773
  };
18771
18774
  //# sourceMappingURL=index.js.map