@use-glyph/sdk-react 2.0.0-rc.4 → 2.0.0-rc.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -23098,10 +23098,14 @@ async function Rk(e) {
23098
23098
  throw console.error(d), d;
23099
23099
  }
23100
23100
  }
23101
- const xl = 792703809, ft = xk({
23101
+ const xl = 792703809, ht = xk({
23102
23102
  baseApiUrl: qo,
23103
23103
  source: "useglyph.io"
23104
- }), Fk = /^0x[a-fA-F0-9]{40}$/, Mk = /https?:\/\/(?:[a-zA-Z0-9-]+\.)*twimg\.com/, Vk = hE({
23104
+ }), UM = (e) => {
23105
+ ht.configure({
23106
+ chains: e
23107
+ });
23108
+ }, Fk = /^0x[a-fA-F0-9]{40}$/, Mk = /https?:\/\/(?:[a-zA-Z0-9-]+\.)*twimg\.com/, Vk = hE({
23105
23109
  prefix: "gw-"
23106
23110
  });
23107
23111
  function ae(...e) {
@@ -23111,7 +23115,7 @@ function Wk(e) {
23111
23115
  return !window.isSecureContext || !e ? !1 : (navigator.clipboard.writeText(e), !0);
23112
23116
  }
23113
23117
  const Ga = (e) => `https://effigy.im/a/${e || "0x0000000000000000000000000000000000000000"}.svg`;
23114
- function UM(e) {
23118
+ function IM(e) {
23115
23119
  return e ? Fk.test(e) : !1;
23116
23120
  }
23117
23121
  const Lk = "GlyphWidget", rs = (e) => {
@@ -23181,14 +23185,14 @@ function eu(e, t) {
23181
23185
  return r.blockExplorers.default.name;
23182
23186
  }
23183
23187
  function zk() {
23184
- const e = ft?.chains, t = /* @__PURE__ */ new Map();
23188
+ const e = ht?.chains, t = /* @__PURE__ */ new Map();
23185
23189
  return e.forEach((r) => {
23186
23190
  r.id && r.iconUrl && t.set(r.id, r.iconUrl);
23187
23191
  }), { chains: e, iconMap: t };
23188
23192
  }
23189
- const Dk = (e) => ft?.chains?.find((t) => t.id === e) || null, tu = (e, t) => {
23193
+ const Dk = (e) => ht?.chains?.find((t) => t.id === e) || null, tu = (e, t) => {
23190
23194
  if (!e || !t || e?.chainId !== t?.chainId || ![e?.address?.toLowerCase?.(), t?.address?.toLowerCase?.()].includes(Bt)) return !1;
23191
- const n = (ft?.chains || []).find((a) => a.id === e.chainId)?.wrappedTokenAddress;
23195
+ const n = (ht?.chains || []).find((a) => a.id === e.chainId)?.wrappedTokenAddress;
23192
23196
  return !![e?.address?.toLowerCase?.(), t?.address?.toLowerCase?.()].includes(
23193
23197
  n?.toLowerCase?.()
23194
23198
  );
@@ -24857,7 +24861,7 @@ Gm.displayName = Dm;
24857
24861
  function xc(e) {
24858
24862
  return e ? "open" : "closed";
24859
24863
  }
24860
- var Zm = "DialogTitleWarning", [IM, Qm] = bA(Zm, {
24864
+ var Zm = "DialogTitleWarning", [NM, Qm] = bA(Zm, {
24861
24865
  contentName: yn,
24862
24866
  titleName: Cc,
24863
24867
  docsSlug: "dialog"
@@ -25449,7 +25453,7 @@ function dT({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: a, sn
25449
25453
  document.body.style.pointerEvents = "auto";
25450
25454
  }), ue || (document.body.style.pointerEvents = "auto");
25451
25455
  }
25452
- }), [K, G] = O.useState(!1), [Y, j] = O.useState(!1), [H, te] = O.useState(!1), _ = O.useRef(null), $ = O.useRef(null), Q = O.useRef(null), se = O.useRef(null), ce = O.useRef(null), ne = O.useRef(!1), he = O.useRef(null), Ce = O.useRef(0), Fe = O.useRef(!1), Te = O.useRef(!U), Be = O.useRef(0), ie = O.useRef(null), Qt = O.useRef(((T = ie.current) == null ? void 0 : T.getBoundingClientRect().height) || 0), ht = O.useRef(((M = ie.current) == null ? void 0 : M.getBoundingClientRect().width) || 0), lt = O.useRef(0), le = O.useCallback((ue) => {
25456
+ }), [K, G] = O.useState(!1), [Y, j] = O.useState(!1), [H, te] = O.useState(!1), _ = O.useRef(null), $ = O.useRef(null), Q = O.useRef(null), se = O.useRef(null), ce = O.useRef(null), ne = O.useRef(!1), he = O.useRef(null), Ce = O.useRef(0), Fe = O.useRef(!1), Te = O.useRef(!U), Be = O.useRef(0), ie = O.useRef(null), Qt = O.useRef(((T = ie.current) == null ? void 0 : T.getBoundingClientRect().height) || 0), ft = O.useRef(((M = ie.current) == null ? void 0 : M.getBoundingClientRect().width) || 0), lt = O.useRef(0), le = O.useCallback((ue) => {
25453
25457
  s && ue === ze.length - 1 && ($.current = /* @__PURE__ */ new Date());
25454
25458
  }, []), { activeSnapPoint: ve, activeSnapPointIndex: pt, setActiveSnapPoint: de, onRelease: me, snapPointsOffset: ze, onDrag: Vt, shouldFade: _e, getPercentageDragged: kt } = oT({
25455
25459
  snapPoints: s,
@@ -25479,7 +25483,7 @@ function dT({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: a, sn
25479
25483
  }
25480
25484
  function w(ue) {
25481
25485
  var Re, Ve;
25482
- !p && !s || ie.current && !ie.current.contains(ue.target) || (Qt.current = ((Re = ie.current) == null ? void 0 : Re.getBoundingClientRect().height) || 0, ht.current = ((Ve = ie.current) == null ? void 0 : Ve.getBoundingClientRect().width) || 0, j(!0), Q.current = /* @__PURE__ */ new Date(), Hm() && window.addEventListener("touchend", () => ne.current = !1, {
25486
+ !p && !s || ie.current && !ie.current.contains(ue.target) || (Qt.current = ((Re = ie.current) == null ? void 0 : Re.getBoundingClientRect().height) || 0, ft.current = ((Ve = ie.current) == null ? void 0 : Ve.getBoundingClientRect().width) || 0, j(!0), Q.current = /* @__PURE__ */ new Date(), Hm() && window.addEventListener("touchend", () => ne.current = !1, {
25483
25487
  once: !0
25484
25488
  }), ue.target.setPointerCapture(ue.pointerId), Ce.current = ct(S) ? ue.pageY : ue.pageX);
25485
25489
  }
@@ -25514,7 +25518,7 @@ function dT({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: a, sn
25514
25518
  if (ie.current && Y) {
25515
25519
  const Re = S === "bottom" || S === "right" ? 1 : -1, Ve = (Ce.current - (ct(S) ? ue.pageY : ue.pageX)) * Re, Se = Ve > 0, $e = s && !p && !Se;
25516
25520
  if ($e && pt === 0) return;
25517
- const pe = Math.abs(Ve), Ue = document.querySelector("[data-vaul-drawer-wrapper]"), Pe = S === "bottom" || S === "top" ? Qt.current : ht.current;
25521
+ const pe = Math.abs(Ve), Ue = document.querySelector("[data-vaul-drawer-wrapper]"), Pe = S === "bottom" || S === "top" ? Qt.current : ft.current;
25518
25522
  let Ye = pe / Pe;
25519
25523
  const Jt = kt(pe, Se);
25520
25524
  if (Jt !== null && (Ye = Jt), $e && Ye >= 1 || !ne.current && !I(ue.target, Se)) return;
@@ -28017,7 +28021,7 @@ function TI(e) {
28017
28021
  }
28018
28022
  const UI = (e) => {
28019
28023
  var t, r, n, a, s, o, i, l, u;
28020
- const { invert: p, toast: d, unstyled: m, interacting: f, setHeights: y, visibleToasts: C, heights: b, index: E, toasts: k, expanded: x, removeToast: S, defaultRichColors: U, closeButton: B, style: N, cancelButtonStyle: V, actionButtonStyle: W, className: P = "", descriptionClassName: J = "", duration: D, position: T, gap: M, expandByDefault: F, classNames: q, icons: K, closeButtonAriaLabel: G = "Close toast" } = e, [Y, j] = O.useState(null), [H, te] = O.useState(null), [_, $] = O.useState(!1), [Q, se] = O.useState(!1), [ce, ne] = O.useState(!1), [he, Ce] = O.useState(!1), [Fe, Te] = O.useState(!1), [Be, ie] = O.useState(0), [Qt, ht] = O.useState(0), lt = O.useRef(d.duration || D || Vu), le = O.useRef(null), ve = O.useRef(null), pt = E === 0, de = E + 1 <= C, me = d.type, ze = d.dismissible !== !1, Vt = d.className || "", _e = d.descriptionClassName || "", kt = O.useMemo(() => b.findIndex((pe) => pe.toastId === d.id) || 0, [
28024
+ const { invert: p, toast: d, unstyled: m, interacting: f, setHeights: y, visibleToasts: C, heights: b, index: E, toasts: k, expanded: x, removeToast: S, defaultRichColors: U, closeButton: B, style: N, cancelButtonStyle: V, actionButtonStyle: W, className: P = "", descriptionClassName: J = "", duration: D, position: T, gap: M, expandByDefault: F, classNames: q, icons: K, closeButtonAriaLabel: G = "Close toast" } = e, [Y, j] = O.useState(null), [H, te] = O.useState(null), [_, $] = O.useState(!1), [Q, se] = O.useState(!1), [ce, ne] = O.useState(!1), [he, Ce] = O.useState(!1), [Fe, Te] = O.useState(!1), [Be, ie] = O.useState(0), [Qt, ft] = O.useState(0), lt = O.useRef(d.duration || D || Vu), le = O.useRef(null), ve = O.useRef(null), pt = E === 0, de = E + 1 <= C, me = d.type, ze = d.dismissible !== !1, Vt = d.className || "", _e = d.descriptionClassName || "", kt = O.useMemo(() => b.findIndex((pe) => pe.toastId === d.id) || 0, [
28021
28025
  b,
28022
28026
  d.id
28023
28027
  ]), v = O.useMemo(() => {
@@ -28046,7 +28050,7 @@ const UI = (e) => {
28046
28050
  const pe = ve.current;
28047
28051
  if (pe) {
28048
28052
  const Ue = pe.getBoundingClientRect().height;
28049
- return ht(Ue), y((Pe) => [
28053
+ return ft(Ue), y((Pe) => [
28050
28054
  {
28051
28055
  toastId: d.id,
28052
28056
  height: Ue,
@@ -28063,7 +28067,7 @@ const UI = (e) => {
28063
28067
  const pe = ve.current, Ue = pe.style.height;
28064
28068
  pe.style.height = "auto";
28065
28069
  const Pe = pe.getBoundingClientRect().height;
28066
- pe.style.height = Ue, ht(Pe), y((Ye) => Ye.find((Ge) => Ge.toastId === d.id) ? Ye.map((Ge) => Ge.toastId === d.id ? {
28070
+ pe.style.height = Ue, ft(Pe), y((Ye) => Ye.find((Ge) => Ge.toastId === d.id) ? Ye.map((Ge) => Ge.toastId === d.id ? {
28067
28071
  ...Ge,
28068
28072
  height: Pe
28069
28073
  } : Ge) : [
@@ -29181,7 +29185,7 @@ var Bl = "TooltipTrigger", Qh = R.forwardRef(
29181
29185
  }
29182
29186
  );
29183
29187
  Qh.displayName = Bl;
29184
- var tN = "TooltipPortal", [NM, rN] = ei(tN, {
29188
+ var tN = "TooltipPortal", [BM, rN] = ei(tN, {
29185
29189
  forceMount: void 0
29186
29190
  }), ea = "TooltipContent", Jh = R.forwardRef(
29187
29191
  (e, t) => {
@@ -30115,7 +30119,7 @@ const FN = (e) => /* @__PURE__ */ c("svg", { width: "23", height: "19", viewBox:
30115
30119
  }, WN = wt(VN);
30116
30120
  var LN = /* @__PURE__ */ ((e) => (e.FUND = "FUND", e.SWAP = "SWAP", e.WITHDRAW = "WITHDRAW", e))(LN || {}), ON = /* @__PURE__ */ ((e) => (e.SEND = "SEND", e.RECEIVE = "RECEIVE", e.TRANSFER = "TRANSFER", e.PAY = "PAY", e))(ON || {});
30117
30121
  function qN(e = 10, t) {
30118
- const r = ft?.chains || [], { fetchForAllNetworks: n } = qe(), { glyphApiFetch: a } = sn(), s = Gt(), [o, i] = re(0), [l, u] = re(!0), [p, d] = re(!1), [m, f] = re([]), y = nt(
30122
+ const r = ht?.chains || [], { fetchForAllNetworks: n } = qe(), { glyphApiFetch: a } = sn(), s = Gt(), [o, i] = re(0), [l, u] = re(!0), [p, d] = re(!1), [m, f] = re([]), y = nt(
30119
30123
  async (k = !1) => {
30120
30124
  try {
30121
30125
  d(!0);
@@ -30196,7 +30200,7 @@ function KN(e) {
30196
30200
  ] });
30197
30201
  }
30198
30202
  function zN({ data: e }) {
30199
- const t = e?.chain_id ? ft.chains.find((r) => r.id === e.chain_id) : void 0;
30203
+ const t = e?.chain_id ? ht.chains.find((r) => r.id === e.chain_id) : void 0;
30200
30204
  return /* @__PURE__ */ A("div", { className: "gw-flex gw-items-center gw-typography-body1 gw-flex-1 gw-space-x-3", children: [
30201
30205
  /* @__PURE__ */ A("span", { className: "gw-relative gw-flex-shrink-0", children: [
30202
30206
  /* @__PURE__ */ c(
@@ -31181,7 +31185,7 @@ const br = ({
31181
31185
  )
31182
31186
  ] });
31183
31187
  function kB() {
31184
- const e = ft.chains, { balances: t, hasBalances: r, fetchForAllNetworks: n } = oi(), a = t?.tokens || [], s = t?.wallet_value?.tokens;
31188
+ const e = ht.chains, { balances: t, hasBalances: r, fetchForAllNetworks: n } = oi(), a = t?.tokens || [], s = t?.wallet_value?.tokens;
31185
31189
  return /* @__PURE__ */ A("div", { className: "gw-pl-4 gw-pt-4 gw-flex gw-flex-col gw-h-full gw-min-h-0", children: [
31186
31190
  /* @__PURE__ */ A("div", { className: "gw-flex gw-justify-between gw-items-center gw-w-full gw-pr-4", children: [
31187
31191
  /* @__PURE__ */ c("h6", { children: "Tokens" }),
@@ -32385,7 +32389,7 @@ const GB = ({
32385
32389
  onTokenSelect: e,
32386
32390
  selectedToken: t
32387
32391
  }) => {
32388
- const r = ft.chains || [], [n, a] = re(!1), s = Gt(), { switchChainAsync: o } = Ql(), { balances: i, hasBalances: l, fetchForAllNetworks: u, setFetchForAllNetworks: p } = oi(), d = u ? "all" : s, m = Oe(() => t?.chainId ? r.find((b) => b.id === t.chainId) : null, [t?.chainId]), [f] = Oe(() => d === "all" ? [null] : [r.find((E) => E.id === d)], [d]), y = vo(null);
32392
+ const r = ht.chains || [], [n, a] = re(!1), s = Gt(), { switchChainAsync: o } = Ql(), { balances: i, hasBalances: l, fetchForAllNetworks: u, setFetchForAllNetworks: p } = oi(), d = u ? "all" : s, m = Oe(() => t?.chainId ? r.find((b) => b.id === t.chainId) : null, [t?.chainId]), [f] = Oe(() => d === "all" ? [null] : [r.find((E) => E.id === d)], [d]), y = vo(null);
32389
32393
  xe(() => {
32390
32394
  y.current = document.querySelector(".gw-wallet-container");
32391
32395
  }, []);
@@ -33062,7 +33066,7 @@ function rR({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
33062
33066
  const de = setInterval(() => Qt(), j ? eR : 0);
33063
33067
  return () => clearInterval(de);
33064
33068
  }, [G, j, Qt]);
33065
- const ht = Oe(
33069
+ const ft = Oe(
33066
33070
  () => _o(500, (de) => {
33067
33071
  T(null), W(Number(de));
33068
33072
  }),
@@ -33183,7 +33187,7 @@ function rR({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
33183
33187
  Q(!0);
33184
33188
  } else
33185
33189
  _(null), Q(!1);
33186
- ht(me), N(me), J(!1);
33190
+ ft(me), N(me), J(!1);
33187
33191
  },
33188
33192
  placeholder: "0",
33189
33193
  className: ae(
@@ -33210,7 +33214,7 @@ function rR({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
33210
33214
  className: "gw-rounded-lg gw-py-1 gw-px-2 gw-h-auto gw-w-16",
33211
33215
  onClick: () => {
33212
33216
  const de = P ? "" : `${+(x?.value || 0) || ""}`;
33213
- N(de), ht(de), J((me) => !me);
33217
+ N(de), ft(de), J((me) => !me);
33214
33218
  },
33215
33219
  children: /* @__PURE__ */ c("span", { className: "gw-typography-overline", children: P ? "Clear" : "Max" })
33216
33220
  }
@@ -33442,11 +33446,11 @@ const oR = () => {
33442
33446
  handleSignMessageStep: async (o) => {
33443
33447
  const i = o.data?.sign;
33444
33448
  let l;
33445
- return i && (i.signatureKind === "eip191" ? (ft.log(["Execute Steps: Signing with eip191"], oe.Verbose), i.message.match(/0x[0-9a-fA-F]{64}/) ? l = await t({
33449
+ return i && (i.signatureKind === "eip191" ? (ht.log(["Execute Steps: Signing with eip191"], oe.Verbose), i.message.match(/0x[0-9a-fA-F]{64}/) ? l = await t({
33446
33450
  message: i.message
33447
33451
  }) : l = await t({
33448
33452
  message: i.message
33449
- })) : i.signatureKind === "eip712" && (ft.log(["Execute Steps: Signing with eip712"], oe.Verbose), l = await r({
33453
+ })) : i.signatureKind === "eip712" && (ht.log(["Execute Steps: Signing with eip712"], oe.Verbose), l = await r({
33450
33454
  data: {
33451
33455
  domain: i.domain,
33452
33456
  types: i.types,
@@ -33498,7 +33502,7 @@ const oR = () => {
33498
33502
  if (!o.ok) throw new Error("Failed to fetch transactions");
33499
33503
  const i = await a.getChainId();
33500
33504
  s && s !== i && (console.log("Switching chain from", i, "to", s), await a.switchChain(s));
33501
- const { id: l, quote: u } = await o.json(), p = await ft.actions.execute({
33505
+ const { id: l, quote: u } = await o.json(), p = await ht.actions.execute({
33502
33506
  quote: u,
33503
33507
  wallet: a
33504
33508
  }).catch(async (m) => {
@@ -33578,7 +33582,7 @@ const oR = () => {
33578
33582
  queryFn: async () => {
33579
33583
  cn(u), cn(p), cn(r), cn(n), cn(s);
33580
33584
  const b = r.chainId === xl ? p : u, E = n.chainId === xl ? p : u;
33581
- return ft.actions.getQuote({
33585
+ return ht.actions.getQuote({
33582
33586
  tradeType: a,
33583
33587
  chainId: r.chainId,
33584
33588
  currency: r.address,
@@ -33665,7 +33669,7 @@ const mR = ({
33665
33669
  selectedToken: t,
33666
33670
  defaultChainId: r
33667
33671
  }) => {
33668
- const n = ft.chains || [], a = Oe(() => n.map((N) => N.id), []), [s, o] = re(!1), [i, l] = re(r), u = Oe(() => t?.chainId ? n.find((N) => N.id === t.chainId) : null, [t?.chainId]), [p, d] = re(""), [m, f] = re(""), y = Oe(
33672
+ const n = ht.chains || [], a = Oe(() => n.map((N) => N.id), []), [s, o] = re(!1), [i, l] = re(r), u = Oe(() => t?.chainId ? n.find((N) => N.id === t.chainId) : null, [t?.chainId]), [p, d] = re(""), [m, f] = re(""), y = Oe(
33669
33673
  () => _o(500, (N) => {
33670
33674
  f(N);
33671
33675
  }),
@@ -34028,7 +34032,7 @@ Please try again.` }),
34028
34032
  sellAmount: r,
34029
34033
  buyAmount: n
34030
34034
  }) => {
34031
- const a = ft.chains || [], { fromCurrency: s, toCurrency: o } = is(), i = Oe(
34035
+ const a = ht.chains || [], { fromCurrency: s, toCurrency: o } = is(), i = Oe(
34032
34036
  () => a.find((u) => u.id === s?.chainId),
34033
34037
  [s?.chainId]
34034
34038
  ), l = Oe(() => a.find((u) => u.id === o?.chainId), [o?.chainId]);
@@ -34125,7 +34129,7 @@ Please try again.` }),
34125
34129
  buyAmount: n,
34126
34130
  txDetails: a
34127
34131
  }) => {
34128
- const s = ft.chains || [], { fromCurrency: o, toCurrency: i } = is(), l = Oe(
34132
+ const s = ht.chains || [], { fromCurrency: o, toCurrency: i } = is(), l = Oe(
34129
34133
  () => s.find((p) => p.id === o?.chainId),
34130
34134
  [o?.chainId]
34131
34135
  ), u = Oe(() => s.find((p) => p.id === i?.chainId), [i?.chainId]);
@@ -34272,7 +34276,7 @@ function xR({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
34272
34276
  error: Ce
34273
34277
  } = Wl(f?.evmWallet, E?.address, E?.chainId), Fe = b?.decimals && H && Q !== void 0 && Number(Hr(Q, b?.decimals)) < Number(H) ? "Insufficient balance" : null, Te = M || // Error from swap intent status
34274
34278
  K || // Error during execution
34275
- (a === Wt.START ? V?.message || ce || Ce || Fe : void 0), Be = Number(B?.fees?.app?.amountUsd || "0"), ie = Math.abs(Number(B?.details?.totalImpact?.usd || "0")), Qt = Math.abs(ie - Be), ht = B?.details?.currencyIn?.amountUsd ? Number(B?.details?.currencyIn?.amountUsd) : void 0, lt = B?.details?.currencyOut?.amountUsd ? Number(B?.details?.currencyOut?.amountUsd) : void 0;
34279
+ (a === Wt.START ? V?.message || ce || Ce || Fe : void 0), Be = Number(B?.fees?.app?.amountUsd || "0"), ie = Math.abs(Number(B?.details?.totalImpact?.usd || "0")), Qt = Math.abs(ie - Be), ft = B?.details?.currencyIn?.amountUsd ? Number(B?.details?.currencyIn?.amountUsd) : void 0, lt = B?.details?.currencyOut?.amountUsd ? Number(B?.details?.currencyOut?.amountUsd) : void 0;
34276
34280
  return /* @__PURE__ */ A(ke, { children: [
34277
34281
  a === Wt.START && /* @__PURE__ */ c(
34278
34282
  xt,
@@ -34350,7 +34354,7 @@ function xR({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
34350
34354
  }
34351
34355
  ) }),
34352
34356
  /* @__PURE__ */ A("div", { className: "gw-flex gw-justify-between gw-items-center gw-w-full gw-text-brand-gray-500", children: [
34353
- ht === void 0 ? /* @__PURE__ */ c("div", { className: "gw-h-4 gw-w-1" }) : /* @__PURE__ */ c("div", { className: "gw-typography-caption", children: ht < 0.01 ? "<$0.01" : `${Qe(ht || "0", "USD")}` }),
34357
+ ft === void 0 ? /* @__PURE__ */ c("div", { className: "gw-h-4 gw-w-1" }) : /* @__PURE__ */ c("div", { className: "gw-typography-caption", children: ft < 0.01 ? "<$0.01" : `${Qe(ft || "0", "USD")}` }),
34354
34358
  /* @__PURE__ */ c(ke, { children: se ? /* @__PURE__ */ c("div", { className: "gw-typography-caption gw-flex gw-items-center gw-mr-4", children: /* @__PURE__ */ c(Je, { className: "gw-h-4 gw-w-10 gw-inline-block gw-ml-0.5" }) }) : Q !== void 0 && b?.decimals ? /* @__PURE__ */ A("div", { className: "gw-typography-caption gw-flex gw-items-center gw-mr-4", children: [
34355
34359
  Za(
34356
34360
  parseFloat(Hr(Q, b?.decimals)),
@@ -34496,7 +34500,7 @@ function xR({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
34496
34500
  ] }),
34497
34501
  /* @__PURE__ */ A("div", { className: "gw-flex gw-justify-between gw-items-center gw-mt-1", children: [
34498
34502
  /* @__PURE__ */ c("span", { children: "Total" }),
34499
- /* @__PURE__ */ c("div", { className: "gw-text-foreground gw-font-medium", children: B && ht ? ht < 0.01 ? "<$0.01" : `${Qe(ht || "0", "USD")}` : N ? /* @__PURE__ */ c(Je, { className: "gw-w-6 gw-h-3.5" }) : "-" })
34503
+ /* @__PURE__ */ c("div", { className: "gw-text-foreground gw-font-medium", children: B && ft ? ft < 0.01 ? "<$0.01" : `${Qe(ft || "0", "USD")}` : N ? /* @__PURE__ */ c(Je, { className: "gw-w-6 gw-h-3.5" }) : "-" })
34500
34504
  ] })
34501
34505
  ] })
34502
34506
  ] }),
@@ -34642,7 +34646,7 @@ const Zu = wt(
34642
34646
  alt: "failed-gradient",
34643
34647
  className: "gw-absolute gw-top-0 gw-left-0 gw-w-full gw-h-full gw-object-cover gw-object-left-bottom gw-z-0 gw-pointer-events-none gw-rounded-t-3xl md:gw-rounded-3xl"
34644
34648
  }
34645
- ) : null, FM = ({ buttonProps: e }) => {
34649
+ ) : null, MM = ({ buttonProps: e }) => {
34646
34650
  const t = "light", r = Mx("(min-width: 768px)"), n = Cr(Ao);
34647
34651
  if (!n) throw new Error("GlyphWidget must be used within a GlyphViewProvider");
34648
34652
  const { glyphView: a, setGlyphView: s } = n, { ready: o, authenticated: i, user: l, hideWidget: u } = qe();
@@ -34685,10 +34689,10 @@ const Zu = wt(
34685
34689
  }
34686
34690
  )
34687
34691
  ) }) : /* @__PURE__ */ c(gm, {}) });
34688
- }, MM = () => {
34692
+ }, VM = () => {
34689
34693
  const { logout: e } = qe();
34690
34694
  return /* @__PURE__ */ c(Ae, { className: "gw-w-full", variant: "outline", onClick: e, children: "Logout" });
34691
- }, VM = () => {
34695
+ }, WM = () => {
34692
34696
  const { glyphUrl: e } = qe(), t = new URL("/", e).toString();
34693
34697
  return e ? /* @__PURE__ */ c(
34694
34698
  Ae,
@@ -34913,13 +34917,13 @@ const kR = ({ children: e }) => {
34913
34917
  const s = ko();
34914
34918
  xe(() => {
34915
34919
  if (s.chains) {
34916
- const p = new Set(ft.chains.map((f) => f.id)), d = new Set(s.chains.map((f) => f.id));
34920
+ const p = new Set(ht.chains.map((f) => f.id)), d = new Set(s.chains.map((f) => f.id));
34917
34921
  if (!((f, y) => f.size === y.size && [...f].every((C) => y.has(C)))(p, d))
34918
34922
  throw new Error(
34919
34923
  "Chain mismatch detected. Please use `useGlyphConfigureDynamicChains` from `@use-glyph/sdk-react` to configure chains dynamically."
34920
34924
  );
34921
34925
  }
34922
- }, [s.chains, ft.chains]);
34926
+ }, [s.chains, ht.chains]);
34923
34927
  const o = Oe(
34924
34928
  () => ({
34925
34929
  [On.EIP1193]: TR,
@@ -34946,7 +34950,7 @@ const kR = ({ children: e }) => {
34946
34950
  if (Array.isArray(l.supportedChains) && Array.isArray(l.chains) && l.supportedChains.length > 0 && l.chains.length > 0)
34947
34951
  r(l.supportedChains), a(
34948
34952
  l.chains.map((u) => uc(u).viemChain)
34949
- ), ft.configure({
34953
+ ), ht.configure({
34950
34954
  chains: l.chains
34951
34955
  });
34952
34956
  else
@@ -34954,7 +34958,7 @@ const kR = ({ children: e }) => {
34954
34958
  })();
34955
34959
  }, [e, t]), { chainIds: t, chains: n };
34956
34960
  };
34957
- function WM() {
34961
+ function LM() {
34958
34962
  const { user: e } = qe(), t = Gt(), { glyphApiFetch: r } = sn(), [n, a] = re(!1);
34959
34963
  return { checkTokenGate: nt(async (o) => {
34960
34964
  try {
@@ -34971,7 +34975,7 @@ function WM() {
34971
34975
  }
34972
34976
  }, [t, e, r, a]), isTokenGateLoading: n };
34973
34977
  }
34974
- function LM() {
34978
+ function OM() {
34975
34979
  const { user: e } = qe(), t = Gt(), { glyphApiFetch: r } = sn(), [n, a] = re(!1);
34976
34980
  return { checkOwnership: nt(async (o) => {
34977
34981
  try {
@@ -34988,7 +34992,7 @@ function LM() {
34988
34992
  }
34989
34993
  }, [r, t]), isOwnershipCheckLoading: n };
34990
34994
  }
34991
- const OM = () => {
34995
+ const qM = () => {
34992
34996
  const e = Cr(Ao);
34993
34997
  if (e === void 0) throw new Error("useGlyphView must be used within a GlyphViewProvider");
34994
34998
  const { setGlyphView: t } = e;
@@ -35006,7 +35010,7 @@ const OM = () => {
35006
35010
  }, [e, t]),
35007
35011
  disconnect: r
35008
35012
  };
35009
- }, qM = () => {
35013
+ }, KM = () => {
35010
35014
  const { connect: e } = UR(), { isConnected: t, isConnecting: r } = wp();
35011
35015
  return t ? /* @__PURE__ */ c(gm, {}) : r ? /* @__PURE__ */ c(Ae, { variant: "default", size: "login", disabled: !0, children: /* @__PURE__ */ A("span", { className: "gw-inline-flex gw-items-center gw-w-full gw-gap-1", children: [
35012
35016
  /* @__PURE__ */ c("span", { className: "gw-p-2 gw-rounded-full", children: /* @__PURE__ */ c(wn, { className: "!gw-size-5" }) }),
@@ -37499,7 +37503,7 @@ function bF() {
37499
37503
  );
37500
37504
  }
37501
37505
  const Qt = /[^+/0-9A-Za-z-_]/g;
37502
- function ht(v) {
37506
+ function ft(v) {
37503
37507
  if (v = v.split("=")[0], v = v.trim().replace(Qt, ""), v.length < 2) return "";
37504
37508
  for (; v.length % 4 !== 0; )
37505
37509
  v = v + "=";
@@ -37573,7 +37577,7 @@ function bF() {
37573
37577
  return z;
37574
37578
  }
37575
37579
  function pt(v) {
37576
- return t.toByteArray(ht(v));
37580
+ return t.toByteArray(ft(v));
37577
37581
  }
37578
37582
  function de(v, g, w, I) {
37579
37583
  let L;
@@ -38351,7 +38355,7 @@ function HF(e = {}) {
38351
38355
  };
38352
38356
  };
38353
38357
  }
38354
- const jF = new vp(), GM = ({
38358
+ const jF = new vp(), ZM = ({
38355
38359
  queryClient: e = jF,
38356
38360
  children: t,
38357
38361
  ssr: r,
@@ -38379,11 +38383,11 @@ const jF = new vp(), GM = ({
38379
38383
  children: t
38380
38384
  }
38381
38385
  ) }) }) : null;
38382
- }, ZM = d0({
38386
+ }, QM = d0({
38383
38387
  id: Rr,
38384
38388
  name: Ot.name,
38385
38389
  iconUrl: Ot.iconUrl
38386
- }), QM = d0({
38390
+ }), JM = d0({
38387
38391
  id: Fr,
38388
38392
  name: Ot.name,
38389
38393
  iconUrl: Ot.iconUrl
@@ -38586,7 +38590,7 @@ const jF = new vp(), GM = ({
38586
38590
  }, [a, s, o, d, n, r, p]), xe(() => {
38587
38591
  l && p.error("Connector error:", l);
38588
38592
  }, [l, p]), /* @__PURE__ */ c(ke, { children: e });
38589
- }, mp = `privy:${Rr}`, hp = `privy:${Fr}`, JM = ({
38593
+ }, mp = `privy:${Rr}`, hp = `privy:${Fr}`, PM = ({
38590
38594
  queryClient: e = new vp(),
38591
38595
  glyphUrl: t,
38592
38596
  useStagingTenant: r,
@@ -38637,42 +38641,43 @@ const jF = new vp(), GM = ({
38637
38641
  ) }) }) }) });
38638
38642
  };
38639
38643
  export {
38640
- Nx as A,
38641
- mp as B,
38642
- JM as C,
38644
+ JM as A,
38645
+ Nx as B,
38646
+ mp as C,
38643
38647
  LN as D,
38644
- hp as E,
38645
- _F as F,
38648
+ PM as E,
38649
+ hp as F,
38646
38650
  Rr as G,
38651
+ _F as H,
38647
38652
  $F as I,
38648
38653
  gm as L,
38649
- qM as N,
38654
+ KM as N,
38650
38655
  Fr as S,
38651
38656
  Ix as W,
38652
38657
  Jl as a,
38653
38658
  cM as b,
38654
38659
  rs as c,
38655
38660
  Uf as d,
38656
- FM as e,
38657
- MM as f,
38658
- VM as g,
38659
- qe as h,
38660
- UM as i,
38661
- KI as j,
38662
- If as k,
38663
- qN as l,
38664
- ON as m,
38665
- WM as n,
38661
+ MM as e,
38662
+ VM as f,
38663
+ WM as g,
38664
+ UM as h,
38665
+ IM as i,
38666
+ oi as j,
38667
+ qe as k,
38668
+ KI as l,
38669
+ qN as m,
38670
+ ON as n,
38666
38671
  LM as o,
38667
38672
  OM as p,
38668
- Ot as q,
38669
- He as r,
38670
- On as s,
38671
- x1 as t,
38672
- oi as u,
38673
- UR as v,
38674
- HF as w,
38675
- GM as x,
38673
+ qM as q,
38674
+ Ot as r,
38675
+ He as s,
38676
+ On as t,
38677
+ If as u,
38678
+ x1 as v,
38679
+ UR as w,
38680
+ HF as x,
38676
38681
  ZM as y,
38677
38682
  QM as z
38678
38683
  };