@jaw.id/ui 0.4.12 → 0.4.14
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/components/ConnectDialog/index.d.ts.map +1 -1
- package/dist/components/SiweDialog/index.d.ts.map +1 -1
- package/dist/index.js +246 -240
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/sanitize.d.ts +8 -0
- package/dist/utils/sanitize.d.ts.map +1 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -57438,8 +57438,14 @@ function FU(e, t) {
|
|
|
57438
57438
|
if (!(!n || !r || n === r)) return `This sign-in request is for "${r}" but the requesting site is "${n}". This may be a phishing attempt.`;
|
|
57439
57439
|
}
|
|
57440
57440
|
//#endregion
|
|
57441
|
+
//#region src/utils/sanitize.ts
|
|
57442
|
+
function IU(e, t = 64) {
|
|
57443
|
+
let n = e.replace(/[\u0000-\u001F\u007F-\u009F\u200B-\u200F\u202A-\u202E\u2060-\u206F\uFEFF]/g, "").replace(/\s+/g, " ").trim();
|
|
57444
|
+
return n.length > t ? `${n.slice(0, t)}…` : n;
|
|
57445
|
+
}
|
|
57446
|
+
//#endregion
|
|
57441
57447
|
//#region src/utils/safeUrl.ts
|
|
57442
|
-
function
|
|
57448
|
+
function LU(e) {
|
|
57443
57449
|
if (!e) return !1;
|
|
57444
57450
|
let t = e.trim();
|
|
57445
57451
|
if (/^data:image\//i.test(t)) return !0;
|
|
@@ -57451,10 +57457,10 @@ function IU(e) {
|
|
|
57451
57457
|
}
|
|
57452
57458
|
//#endregion
|
|
57453
57459
|
//#region src/components/IdentityAvatar.tsx
|
|
57454
|
-
var
|
|
57460
|
+
var RU = /* @__PURE__ */ B(us, {
|
|
57455
57461
|
className: "h-3 w-3 flex-shrink-0",
|
|
57456
57462
|
stroke: "currentColor"
|
|
57457
|
-
}),
|
|
57463
|
+
}), zU = ({ src: e, fallback: t = RU }) => {
|
|
57458
57464
|
let [n, r] = z();
|
|
57459
57465
|
return !e || n === e ? /* @__PURE__ */ B(ut, { children: t }) : /* @__PURE__ */ B("img", {
|
|
57460
57466
|
src: e,
|
|
@@ -57466,27 +57472,27 @@ var LU = /* @__PURE__ */ B(us, {
|
|
|
57466
57472
|
};
|
|
57467
57473
|
//#endregion
|
|
57468
57474
|
//#region src/components/TransactionDialog/ClearSignedView.tsx
|
|
57469
|
-
function
|
|
57475
|
+
function BU(e) {
|
|
57470
57476
|
let [t, n] = e.split("."), r = t.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
57471
57477
|
return n ? `${r}.${n}` : r;
|
|
57472
57478
|
}
|
|
57473
|
-
function
|
|
57479
|
+
function VU({ row: e }) {
|
|
57474
57480
|
return /* @__PURE__ */ V("p", {
|
|
57475
57481
|
className: "text-foreground break-all font-mono text-xs leading-[150%]",
|
|
57476
57482
|
children: [/* @__PURE__ */ B("span", {
|
|
57477
57483
|
className: "font-semibold",
|
|
57478
|
-
children:
|
|
57484
|
+
children: BU(e.value)
|
|
57479
57485
|
}), e.symbol && /* @__PURE__ */ V("span", {
|
|
57480
57486
|
className: "text-muted-foreground",
|
|
57481
57487
|
children: [" ", e.symbol]
|
|
57482
57488
|
})]
|
|
57483
57489
|
});
|
|
57484
57490
|
}
|
|
57485
|
-
function
|
|
57491
|
+
function HU({ row: e, resolvedName: t, avatarSrc: n }) {
|
|
57486
57492
|
let r = e.rawValue ?? e.value;
|
|
57487
57493
|
return /* @__PURE__ */ V("div", {
|
|
57488
57494
|
className: "flex flex-row items-center gap-1",
|
|
57489
|
-
children: [/* @__PURE__ */ B(
|
|
57495
|
+
children: [/* @__PURE__ */ B(zU, {
|
|
57490
57496
|
src: n,
|
|
57491
57497
|
fallback: null
|
|
57492
57498
|
}), /* @__PURE__ */ B("p", {
|
|
@@ -57495,7 +57501,7 @@ function VU({ row: e, resolvedName: t, avatarSrc: n }) {
|
|
|
57495
57501
|
})]
|
|
57496
57502
|
});
|
|
57497
57503
|
}
|
|
57498
|
-
var
|
|
57504
|
+
var UU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
|
|
57499
57505
|
let [r, i] = z({}), [a, o] = z({}), s = lt(/* @__PURE__ */ new Set());
|
|
57500
57506
|
at(() => {
|
|
57501
57507
|
if (!n) return;
|
|
@@ -57549,7 +57555,7 @@ var HU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
|
|
|
57549
57555
|
children: [/* @__PURE__ */ B("span", {
|
|
57550
57556
|
className: "text-muted-foreground text-xs font-semibold",
|
|
57551
57557
|
children: e.label
|
|
57552
|
-
}), e.kind === "tokenAmount" || e.kind === "amount" ? /* @__PURE__ */ B(
|
|
57558
|
+
}), e.kind === "tokenAmount" || e.kind === "amount" ? /* @__PURE__ */ B(VU, { row: e }) : e.kind === "address" ? /* @__PURE__ */ B(HU, {
|
|
57553
57559
|
row: e,
|
|
57554
57560
|
resolvedName: i,
|
|
57555
57561
|
avatarSrc: o
|
|
@@ -57561,24 +57567,24 @@ var HU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
|
|
|
57561
57567
|
})
|
|
57562
57568
|
})]
|
|
57563
57569
|
});
|
|
57564
|
-
},
|
|
57565
|
-
function
|
|
57570
|
+
}, WU = "0x0000000000000000000000000000000000000000";
|
|
57571
|
+
function GU(e, t) {
|
|
57566
57572
|
let n = {};
|
|
57567
57573
|
for (let [t, r] of Object.entries(e ?? {})) n[t.toLowerCase()] = r;
|
|
57568
57574
|
for (let [e, r] of Object.entries(t)) n[e.toLowerCase()] = r;
|
|
57569
57575
|
return n;
|
|
57570
57576
|
}
|
|
57571
|
-
var
|
|
57577
|
+
var KU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolvedAvatars: a, mainnetRpcUrl: o }) => {
|
|
57572
57578
|
let { clearSigned: s, decoded: c, isLoading: l } = aU(e, t, n, r), [u, d] = z({}), [f, p] = z({}), m = lt(/* @__PURE__ */ new Set()), h = lt(c);
|
|
57573
57579
|
at(() => {
|
|
57574
57580
|
h.current !== c && (h.current = c, d({}), p({}), m.current = /* @__PURE__ */ new Set());
|
|
57575
57581
|
}, [c]);
|
|
57576
|
-
let g = ct(() =>
|
|
57582
|
+
let g = ct(() => GU(i, u), [i, u]), _ = ct(() => GU(a, f), [a, f]), v = lt(g);
|
|
57577
57583
|
return v.current = g, at(() => {
|
|
57578
57584
|
if (!c || !o) return;
|
|
57579
57585
|
let e = v.current, t = c.params.filter((e) => e.type === "address" && e.rawValue).map((e) => e.rawValue).filter((t) => {
|
|
57580
57586
|
let n = t.toLowerCase();
|
|
57581
|
-
return n !==
|
|
57587
|
+
return n !== WU && !e[n] && !m.current.has(n);
|
|
57582
57588
|
}), r = [...new Set(t)];
|
|
57583
57589
|
if (r.length === 0) return;
|
|
57584
57590
|
r.forEach((e) => m.current.add(e.toLowerCase()));
|
|
@@ -57611,7 +57617,7 @@ var GU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
57611
57617
|
n
|
|
57612
57618
|
]), s && s.rows.length > 0 ? /* @__PURE__ */ V("div", {
|
|
57613
57619
|
className: "flex flex-col gap-2",
|
|
57614
|
-
children: [/* @__PURE__ */ B(
|
|
57620
|
+
children: [/* @__PURE__ */ B(UU, {
|
|
57615
57621
|
display: s,
|
|
57616
57622
|
chainId: n,
|
|
57617
57623
|
mainnetRpcUrl: o
|
|
@@ -57703,7 +57709,7 @@ var GU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
57703
57709
|
})]
|
|
57704
57710
|
}), /* @__PURE__ */ V("div", {
|
|
57705
57711
|
className: "flex flex-row items-center gap-1",
|
|
57706
|
-
children: [/* @__PURE__ */ B(
|
|
57712
|
+
children: [/* @__PURE__ */ B(zU, {
|
|
57707
57713
|
src: r,
|
|
57708
57714
|
fallback: null
|
|
57709
57715
|
}), /* @__PURE__ */ B("p", {
|
|
@@ -57735,7 +57741,7 @@ var GU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
57735
57741
|
children: t
|
|
57736
57742
|
})
|
|
57737
57743
|
});
|
|
57738
|
-
},
|
|
57744
|
+
}, qU = ({ transactions: e, walletAddress: t, gasFee: n, gasFeeLoading: r, gasEstimationError: i, sponsored: a, onConfirm: o, onCancel: s, isProcessing: c, transactionStatus: l, networkName: u, apiKey: d, feeTokens: f, feeTokensLoading: p, selectedFeeToken: m, onFeeTokenSelect: h, showFeeTokenSelector: g, isPayingWithErc20: _, mainnetRpcUrl: v, nativeCurrencySymbol: y }) => {
|
|
57739
57745
|
let b = YL(), [x, S] = z({}), [C, w] = z({}), [T, E] = z({}), [D, O] = z({}), k = e.length, A = k === 1, j = e[0], M = pz(j?.chainId || 1, d, 24), N = f?.find((e) => e.isNative)?.symbol || y || "ETH", P = vz(N), ee = !f || f.length === 0 ? !0 : f.some((e) => e.isSelectable);
|
|
57740
57746
|
at(() => {
|
|
57741
57747
|
let n = [];
|
|
@@ -57885,7 +57891,7 @@ var GU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
57885
57891
|
children: "From"
|
|
57886
57892
|
}), /* @__PURE__ */ V("div", {
|
|
57887
57893
|
className: "flex min-w-0 flex-row items-center gap-1",
|
|
57888
|
-
children: [/* @__PURE__ */ B(
|
|
57894
|
+
children: [/* @__PURE__ */ B(zU, { src: D[t] }), /* @__PURE__ */ B("p", {
|
|
57889
57895
|
className: "break-all text-base font-normal leading-[150%]",
|
|
57890
57896
|
children: ne
|
|
57891
57897
|
})]
|
|
@@ -57900,7 +57906,7 @@ var GU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
57900
57906
|
}), /* @__PURE__ */ V("div", {
|
|
57901
57907
|
className: "flex min-w-0 flex-row items-center gap-1",
|
|
57902
57908
|
children: [
|
|
57903
|
-
/* @__PURE__ */ B(
|
|
57909
|
+
/* @__PURE__ */ B(zU, { src: j?.to ? D[j.to] : void 0 }),
|
|
57904
57910
|
/* @__PURE__ */ B("p", {
|
|
57905
57911
|
className: "break-all text-base font-normal leading-[150%]",
|
|
57906
57912
|
children: re
|
|
@@ -58103,7 +58109,7 @@ var GU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58103
58109
|
},
|
|
58104
58110
|
className: "cursor-pointer"
|
|
58105
58111
|
})]
|
|
58106
|
-
}), /* @__PURE__ */ B(
|
|
58112
|
+
}), /* @__PURE__ */ B(KU, {
|
|
58107
58113
|
to: j.to,
|
|
58108
58114
|
data: j.data,
|
|
58109
58115
|
chainId: j.chainId,
|
|
@@ -58142,7 +58148,7 @@ var GU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58142
58148
|
children: "From"
|
|
58143
58149
|
}), /* @__PURE__ */ V("div", {
|
|
58144
58150
|
className: "flex flex-row items-center gap-1",
|
|
58145
|
-
children: [/* @__PURE__ */ B(
|
|
58151
|
+
children: [/* @__PURE__ */ B(zU, { src: D[t] }), /* @__PURE__ */ B("p", {
|
|
58146
58152
|
className: "break-all text-base font-normal leading-[150%]",
|
|
58147
58153
|
children: ne
|
|
58148
58154
|
})]
|
|
@@ -58194,7 +58200,7 @@ var GU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58194
58200
|
})]
|
|
58195
58201
|
}), /* @__PURE__ */ V("div", {
|
|
58196
58202
|
className: "flex flex-row items-center gap-1",
|
|
58197
|
-
children: [/* @__PURE__ */ B(
|
|
58203
|
+
children: [/* @__PURE__ */ B(zU, { src: e.to ? D[e.to] : void 0 }), /* @__PURE__ */ B("p", {
|
|
58198
58204
|
className: "text-sm font-normal leading-[150%]",
|
|
58199
58205
|
children: L(e.to)
|
|
58200
58206
|
})]
|
|
@@ -58260,7 +58266,7 @@ var GU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58260
58266
|
},
|
|
58261
58267
|
className: "cursor-pointer"
|
|
58262
58268
|
})]
|
|
58263
|
-
}), /* @__PURE__ */ B(
|
|
58269
|
+
}), /* @__PURE__ */ B(KU, {
|
|
58264
58270
|
to: e.to,
|
|
58265
58271
|
data: e.data,
|
|
58266
58272
|
chainId: e.chainId,
|
|
@@ -58434,7 +58440,7 @@ var GU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58434
58440
|
})] })
|
|
58435
58441
|
})
|
|
58436
58442
|
});
|
|
58437
|
-
},
|
|
58443
|
+
}, JU = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, accountAddress: a, chainName: o, chainId: s, chainIcon: c, mainnetRpcUrl: l, onSign: u, onCancel: d, isProcessing: f, signatureStatus: p, canSign: m }) => {
|
|
58438
58444
|
let h = YL(), [g, _] = z(null);
|
|
58439
58445
|
at(() => {
|
|
58440
58446
|
a && s && pU([{
|
|
@@ -58572,7 +58578,7 @@ var GU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58572
58578
|
};
|
|
58573
58579
|
//#endregion
|
|
58574
58580
|
//#region ../../node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
58575
|
-
function
|
|
58581
|
+
function YU(e) {
|
|
58576
58582
|
let t = R.useRef({
|
|
58577
58583
|
value: e,
|
|
58578
58584
|
previous: e
|
|
@@ -58581,13 +58587,13 @@ function JU(e) {
|
|
|
58581
58587
|
}
|
|
58582
58588
|
//#endregion
|
|
58583
58589
|
//#region ../../node_modules/@radix-ui/react-checkbox/dist/index.mjs
|
|
58584
|
-
var
|
|
58585
|
-
function
|
|
58590
|
+
var XU = "Checkbox", [ZU, QU] = yt(XU), [$U, eW] = ZU(XU);
|
|
58591
|
+
function tW(e) {
|
|
58586
58592
|
let { __scopeCheckbox: t, checked: n, children: r, defaultChecked: i, disabled: a, form: o, name: s, onCheckedChange: c, required: l, value: u = "on", internal_do_not_use_render: d } = e, [f, p] = Et({
|
|
58587
58593
|
prop: n,
|
|
58588
58594
|
defaultProp: i ?? !1,
|
|
58589
58595
|
onChange: c,
|
|
58590
|
-
caller:
|
|
58596
|
+
caller: XU
|
|
58591
58597
|
}), [m, h] = R.useState(null), [g, _] = R.useState(null), v = R.useRef(!1), y = m ? !!o || !!m.closest("form") : !0, b = {
|
|
58592
58598
|
checked: f,
|
|
58593
58599
|
disabled: a,
|
|
@@ -58599,19 +58605,19 @@ function eW(e) {
|
|
|
58599
58605
|
value: u,
|
|
58600
58606
|
hasConsumerStoppedPropagationRef: v,
|
|
58601
58607
|
required: l,
|
|
58602
|
-
defaultChecked:
|
|
58608
|
+
defaultChecked: uW(i) ? !1 : i,
|
|
58603
58609
|
isFormControl: y,
|
|
58604
58610
|
bubbleInput: g,
|
|
58605
58611
|
setBubbleInput: _
|
|
58606
58612
|
};
|
|
58607
|
-
return /* @__PURE__ */ B(
|
|
58613
|
+
return /* @__PURE__ */ B($U, {
|
|
58608
58614
|
scope: t,
|
|
58609
58615
|
...b,
|
|
58610
|
-
children:
|
|
58616
|
+
children: lW(d) ? d(b) : r
|
|
58611
58617
|
});
|
|
58612
58618
|
}
|
|
58613
|
-
var
|
|
58614
|
-
let { control: a, value: o, disabled: s, checked: c, required: l, setControl: u, setChecked: d, hasConsumerStoppedPropagationRef: f, isFormControl: p, bubbleInput: m } =
|
|
58619
|
+
var nW = "CheckboxTrigger", rW = R.forwardRef(({ __scopeCheckbox: e, onKeyDown: t, onClick: n, ...r }, i) => {
|
|
58620
|
+
let { control: a, value: o, disabled: s, checked: c, required: l, setControl: u, setChecked: d, hasConsumerStoppedPropagationRef: f, isFormControl: p, bubbleInput: m } = eW(nW, e), h = _t(i, u), g = R.useRef(c);
|
|
58615
58621
|
return R.useEffect(() => {
|
|
58616
58622
|
let e = a?.form;
|
|
58617
58623
|
if (e) {
|
|
@@ -58621,9 +58627,9 @@ var tW = "CheckboxTrigger", nW = R.forwardRef(({ __scopeCheckbox: e, onKeyDown:
|
|
|
58621
58627
|
}, [a, d]), /* @__PURE__ */ B(Ft.button, {
|
|
58622
58628
|
type: "button",
|
|
58623
58629
|
role: "checkbox",
|
|
58624
|
-
"aria-checked":
|
|
58630
|
+
"aria-checked": uW(c) ? "mixed" : c,
|
|
58625
58631
|
"aria-required": l,
|
|
58626
|
-
"data-state":
|
|
58632
|
+
"data-state": dW(c),
|
|
58627
58633
|
"data-disabled": s ? "" : void 0,
|
|
58628
58634
|
disabled: s,
|
|
58629
58635
|
value: o,
|
|
@@ -58633,14 +58639,14 @@ var tW = "CheckboxTrigger", nW = R.forwardRef(({ __scopeCheckbox: e, onKeyDown:
|
|
|
58633
58639
|
e.key === "Enter" && e.preventDefault();
|
|
58634
58640
|
}),
|
|
58635
58641
|
onClick: mt(n, (e) => {
|
|
58636
|
-
d((e) =>
|
|
58642
|
+
d((e) => uW(e) ? !0 : !e), m && p && (f.current = e.isPropagationStopped(), f.current || e.stopPropagation());
|
|
58637
58643
|
})
|
|
58638
58644
|
});
|
|
58639
58645
|
});
|
|
58640
|
-
|
|
58641
|
-
var
|
|
58646
|
+
rW.displayName = nW;
|
|
58647
|
+
var iW = R.forwardRef((e, t) => {
|
|
58642
58648
|
let { __scopeCheckbox: n, name: r, checked: i, defaultChecked: a, required: o, disabled: s, value: c, onCheckedChange: l, form: u, ...d } = e;
|
|
58643
|
-
return /* @__PURE__ */ B(
|
|
58649
|
+
return /* @__PURE__ */ B(tW, {
|
|
58644
58650
|
__scopeCheckbox: n,
|
|
58645
58651
|
checked: i,
|
|
58646
58652
|
defaultChecked: a,
|
|
@@ -58650,20 +58656,20 @@ var rW = R.forwardRef((e, t) => {
|
|
|
58650
58656
|
name: r,
|
|
58651
58657
|
form: u,
|
|
58652
58658
|
value: c,
|
|
58653
|
-
internal_do_not_use_render: ({ isFormControl: e }) => /* @__PURE__ */ V(ut, { children: [/* @__PURE__ */ B(
|
|
58659
|
+
internal_do_not_use_render: ({ isFormControl: e }) => /* @__PURE__ */ V(ut, { children: [/* @__PURE__ */ B(rW, {
|
|
58654
58660
|
...d,
|
|
58655
58661
|
ref: t,
|
|
58656
58662
|
__scopeCheckbox: n
|
|
58657
|
-
}), e && /* @__PURE__ */ B(
|
|
58663
|
+
}), e && /* @__PURE__ */ B(cW, { __scopeCheckbox: n })] })
|
|
58658
58664
|
});
|
|
58659
58665
|
});
|
|
58660
|
-
|
|
58661
|
-
var
|
|
58662
|
-
let { __scopeCheckbox: n, forceMount: r, ...i } = e, a =
|
|
58666
|
+
iW.displayName = XU;
|
|
58667
|
+
var aW = "CheckboxIndicator", oW = R.forwardRef((e, t) => {
|
|
58668
|
+
let { __scopeCheckbox: n, forceMount: r, ...i } = e, a = eW(aW, n);
|
|
58663
58669
|
return /* @__PURE__ */ B(vn, {
|
|
58664
|
-
present: r ||
|
|
58670
|
+
present: r || uW(a.checked) || a.checked === !0,
|
|
58665
58671
|
children: /* @__PURE__ */ B(Ft.span, {
|
|
58666
|
-
"data-state":
|
|
58672
|
+
"data-state": dW(a.checked),
|
|
58667
58673
|
"data-disabled": a.disabled ? "" : void 0,
|
|
58668
58674
|
...i,
|
|
58669
58675
|
ref: t,
|
|
@@ -58674,16 +58680,16 @@ var iW = "CheckboxIndicator", aW = R.forwardRef((e, t) => {
|
|
|
58674
58680
|
})
|
|
58675
58681
|
});
|
|
58676
58682
|
});
|
|
58677
|
-
|
|
58678
|
-
var
|
|
58679
|
-
let { control: r, hasConsumerStoppedPropagationRef: i, checked: a, defaultChecked: o, required: s, disabled: c, name: l, value: u, form: d, bubbleInput: f, setBubbleInput: p } =
|
|
58683
|
+
oW.displayName = aW;
|
|
58684
|
+
var sW = "CheckboxBubbleInput", cW = R.forwardRef(({ __scopeCheckbox: e, ...t }, n) => {
|
|
58685
|
+
let { control: r, hasConsumerStoppedPropagationRef: i, checked: a, defaultChecked: o, required: s, disabled: c, name: l, value: u, form: d, bubbleInput: f, setBubbleInput: p } = eW(sW, e), m = _t(n, p), h = YU(a), g = VF(r);
|
|
58680
58686
|
R.useEffect(() => {
|
|
58681
58687
|
let e = f;
|
|
58682
58688
|
if (!e) return;
|
|
58683
58689
|
let t = window.HTMLInputElement.prototype, n = Object.getOwnPropertyDescriptor(t, "checked").set, r = !i.current;
|
|
58684
58690
|
if (h !== a && n) {
|
|
58685
58691
|
let t = new Event("click", { bubbles: r });
|
|
58686
|
-
e.indeterminate =
|
|
58692
|
+
e.indeterminate = uW(a), n.call(e, uW(a) ? !1 : a), e.dispatchEvent(t);
|
|
58687
58693
|
}
|
|
58688
58694
|
}, [
|
|
58689
58695
|
f,
|
|
@@ -58691,7 +58697,7 @@ var oW = "CheckboxBubbleInput", sW = R.forwardRef(({ __scopeCheckbox: e, ...t },
|
|
|
58691
58697
|
a,
|
|
58692
58698
|
i
|
|
58693
58699
|
]);
|
|
58694
|
-
let _ = R.useRef(
|
|
58700
|
+
let _ = R.useRef(uW(a) ? !1 : a);
|
|
58695
58701
|
return /* @__PURE__ */ B(Ft.input, {
|
|
58696
58702
|
type: "checkbox",
|
|
58697
58703
|
"aria-hidden": !0,
|
|
@@ -58715,24 +58721,24 @@ var oW = "CheckboxBubbleInput", sW = R.forwardRef(({ __scopeCheckbox: e, ...t },
|
|
|
58715
58721
|
}
|
|
58716
58722
|
});
|
|
58717
58723
|
});
|
|
58718
|
-
|
|
58719
|
-
function
|
|
58724
|
+
cW.displayName = sW;
|
|
58725
|
+
function lW(e) {
|
|
58720
58726
|
return typeof e == "function";
|
|
58721
58727
|
}
|
|
58722
|
-
function
|
|
58728
|
+
function uW(e) {
|
|
58723
58729
|
return e === "indeterminate";
|
|
58724
58730
|
}
|
|
58725
|
-
function
|
|
58726
|
-
return
|
|
58731
|
+
function dW(e) {
|
|
58732
|
+
return uW(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
58727
58733
|
}
|
|
58728
58734
|
//#endregion
|
|
58729
58735
|
//#region src/components/ui/checkbox.tsx
|
|
58730
|
-
function
|
|
58731
|
-
return /* @__PURE__ */ B(
|
|
58736
|
+
function fW({ className: e, ...t }) {
|
|
58737
|
+
return /* @__PURE__ */ B(iW, {
|
|
58732
58738
|
"data-slot": "checkbox",
|
|
58733
58739
|
className: Co("border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive shadow-xs peer size-4 shrink-0 rounded-[4px] border outline-none transition-shadow focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", e),
|
|
58734
58740
|
...t,
|
|
58735
|
-
children: /* @__PURE__ */ B(
|
|
58741
|
+
children: /* @__PURE__ */ B(oW, {
|
|
58736
58742
|
"data-slot": "checkbox-indicator",
|
|
58737
58743
|
className: "flex items-center justify-center text-current transition-none",
|
|
58738
58744
|
children: /* @__PURE__ */ B(Wi, { className: "size-3.5" })
|
|
@@ -58741,10 +58747,10 @@ function dW({ className: e, ...t }) {
|
|
|
58741
58747
|
}
|
|
58742
58748
|
//#endregion
|
|
58743
58749
|
//#region src/components/SiweDialog/index.tsx
|
|
58744
|
-
var
|
|
58745
|
-
let v = YL(), [y, b] = z(null), x = ot(), [
|
|
58750
|
+
var pW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appName: a, appLogoUrl: o, accountAddress: s, chainName: c, chainId: l, chainIcon: u, mainnetRpcUrl: d, onSign: f, onCancel: p, isProcessing: m, siweStatus: h, canSign: g, warningMessage: _ }) => {
|
|
58751
|
+
let v = YL(), [y, b] = z(null), x = IU(a) || "dApp", S = ot(), [C, w] = z(!1);
|
|
58746
58752
|
at(() => {
|
|
58747
|
-
|
|
58753
|
+
w(!1);
|
|
58748
58754
|
}, [n, _]), at(() => {
|
|
58749
58755
|
s && l && pU([{
|
|
58750
58756
|
address: s,
|
|
@@ -58757,7 +58763,7 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
58757
58763
|
}
|
|
58758
58764
|
}).catch(() => {});
|
|
58759
58765
|
}, [s, l]);
|
|
58760
|
-
let
|
|
58766
|
+
let T = gU(y, s || "");
|
|
58761
58767
|
return /* @__PURE__ */ B(jo, {
|
|
58762
58768
|
open: e,
|
|
58763
58769
|
onOpenChange: m ? void 0 : t,
|
|
@@ -58786,7 +58792,7 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
58786
58792
|
})
|
|
58787
58793
|
}), /* @__PURE__ */ B("p", {
|
|
58788
58794
|
className: "text-muted-foreground text-sm",
|
|
58789
|
-
children:
|
|
58795
|
+
children: T
|
|
58790
58796
|
})]
|
|
58791
58797
|
}),
|
|
58792
58798
|
contentStyle: v ? {
|
|
@@ -58803,9 +58809,9 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
58803
58809
|
children: [
|
|
58804
58810
|
/* @__PURE__ */ V("div", {
|
|
58805
58811
|
className: "flex flex-1 flex-col items-center justify-center p-3.5",
|
|
58806
|
-
children: [
|
|
58812
|
+
children: [LU(o) && /* @__PURE__ */ B("img", {
|
|
58807
58813
|
src: o,
|
|
58808
|
-
alt: `${
|
|
58814
|
+
alt: `${x} logo`,
|
|
58809
58815
|
className: "mb-3 h-[72px] w-[72px] rounded-full"
|
|
58810
58816
|
}), /* @__PURE__ */ V("div", {
|
|
58811
58817
|
className: "text-foreground flex flex-col items-center gap-1",
|
|
@@ -58814,7 +58820,7 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
58814
58820
|
children: "Sign in Request"
|
|
58815
58821
|
}), /* @__PURE__ */ B("p", {
|
|
58816
58822
|
className: "text-base font-bold leading-[150%]",
|
|
58817
|
-
children:
|
|
58823
|
+
children: x
|
|
58818
58824
|
})]
|
|
58819
58825
|
})]
|
|
58820
58826
|
}),
|
|
@@ -58918,12 +58924,12 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
58918
58924
|
})]
|
|
58919
58925
|
})]
|
|
58920
58926
|
}), /* @__PURE__ */ V("label", {
|
|
58921
|
-
htmlFor:
|
|
58927
|
+
htmlFor: S,
|
|
58922
58928
|
className: "flex cursor-pointer items-center gap-2",
|
|
58923
|
-
children: [/* @__PURE__ */ B(
|
|
58924
|
-
id:
|
|
58925
|
-
checked:
|
|
58926
|
-
onCheckedChange: (e) =>
|
|
58929
|
+
children: [/* @__PURE__ */ B(fW, {
|
|
58930
|
+
id: S,
|
|
58931
|
+
checked: C,
|
|
58932
|
+
onCheckedChange: (e) => w(e === !0)
|
|
58927
58933
|
}), /* @__PURE__ */ B("span", {
|
|
58928
58934
|
className: "text-foreground text-xs font-medium leading-[150%]",
|
|
58929
58935
|
children: "I understand the risk and want to continue"
|
|
@@ -58944,7 +58950,7 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
58944
58950
|
children: "Cancel"
|
|
58945
58951
|
}), /* @__PURE__ */ B(ts, {
|
|
58946
58952
|
onClick: f,
|
|
58947
|
-
disabled: !g || !!_ && !
|
|
58953
|
+
disabled: !g || !!_ && !C,
|
|
58948
58954
|
className: "flex-1",
|
|
58949
58955
|
children: m ? "Signing..." : "Sign"
|
|
58950
58956
|
})]
|
|
@@ -58952,7 +58958,7 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
58952
58958
|
]
|
|
58953
58959
|
})
|
|
58954
58960
|
});
|
|
58955
|
-
},
|
|
58961
|
+
}, mW = ({ open: e, onOpenChange: t, appName: n, appLogoUrl: r, origin: i, timestamp: a, accountName: o, walletAddress: s, chainName: c, chainId: l, chainIcon: u, mainnetRpcUrl: d, onConnect: f, onCancel: p, showPermissions: m = !0, isProcessing: h }) => {
|
|
58956
58962
|
let g = YL(), [_, v] = z(null), [y, b] = z(!1);
|
|
58957
58963
|
at(() => {
|
|
58958
58964
|
s && l && pU([{
|
|
@@ -58966,15 +58972,15 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
58966
58972
|
}
|
|
58967
58973
|
}).catch(() => {});
|
|
58968
58974
|
}, [s, l]);
|
|
58969
|
-
let x = _ || o, S = (e) => {
|
|
58975
|
+
let x = _ || o, S = IU(n) || "dApp", C = (e) => {
|
|
58970
58976
|
try {
|
|
58971
58977
|
return new URL(e.startsWith("http") ? e : `https://${e}`).hostname.replace("www.", "");
|
|
58972
58978
|
} catch {
|
|
58973
58979
|
return i;
|
|
58974
58980
|
}
|
|
58975
|
-
},
|
|
58981
|
+
}, w = (e) => {
|
|
58976
58982
|
typeof window < "u" && navigator?.clipboard && (navigator.clipboard.writeText(e), b(!0), setTimeout(() => b(!1), 3e3));
|
|
58977
|
-
},
|
|
58983
|
+
}, T = (e) => !e || e.length < 10 ? e : `${e.slice(0, 6)}...${e.slice(-4)}`;
|
|
58978
58984
|
return /* @__PURE__ */ B(jo, {
|
|
58979
58985
|
open: e,
|
|
58980
58986
|
onOpenChange: h ? void 0 : t,
|
|
@@ -59004,7 +59010,7 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59004
59010
|
className: "flex flex-row items-center gap-1",
|
|
59005
59011
|
children: [/* @__PURE__ */ V("p", {
|
|
59006
59012
|
className: "text-muted-foreground text-sm leading-none",
|
|
59007
|
-
children: ["Sign in as ", x ||
|
|
59013
|
+
children: ["Sign in as ", x || T(s)]
|
|
59008
59014
|
}), !x && (y ? /* @__PURE__ */ B(fs, {
|
|
59009
59015
|
width: 10,
|
|
59010
59016
|
height: 10,
|
|
@@ -59012,14 +59018,14 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59012
59018
|
}) : /* @__PURE__ */ B(ds, {
|
|
59013
59019
|
width: 10,
|
|
59014
59020
|
height: 10,
|
|
59015
|
-
onClick: () =>
|
|
59021
|
+
onClick: () => w(s),
|
|
59016
59022
|
className: "flex-shrink-0 cursor-pointer"
|
|
59017
59023
|
}))]
|
|
59018
59024
|
}), x && /* @__PURE__ */ V("div", {
|
|
59019
59025
|
className: "flex flex-row items-center gap-1",
|
|
59020
59026
|
children: [/* @__PURE__ */ B("p", {
|
|
59021
59027
|
className: "text-muted-foreground text-sm leading-none",
|
|
59022
|
-
children:
|
|
59028
|
+
children: T(s)
|
|
59023
59029
|
}), y ? /* @__PURE__ */ B(fs, {
|
|
59024
59030
|
width: 10,
|
|
59025
59031
|
height: 10,
|
|
@@ -59027,7 +59033,7 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59027
59033
|
}) : /* @__PURE__ */ B(ds, {
|
|
59028
59034
|
width: 10,
|
|
59029
59035
|
height: 10,
|
|
59030
|
-
onClick: () =>
|
|
59036
|
+
onClick: () => w(s),
|
|
59031
59037
|
className: "flex-shrink-0 cursor-pointer"
|
|
59032
59038
|
})]
|
|
59033
59039
|
})]
|
|
@@ -59047,15 +59053,15 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59047
59053
|
children: [
|
|
59048
59054
|
/* @__PURE__ */ V("div", {
|
|
59049
59055
|
className: "flex flex-1 flex-col items-center justify-center p-3.5",
|
|
59050
|
-
children: [
|
|
59056
|
+
children: [LU(r) && /* @__PURE__ */ B("img", {
|
|
59051
59057
|
src: r,
|
|
59052
|
-
alt: `${
|
|
59058
|
+
alt: `${S} logo`,
|
|
59053
59059
|
className: "mb-3 h-[72px] w-[72px] rounded-full"
|
|
59054
59060
|
}), /* @__PURE__ */ V("div", {
|
|
59055
59061
|
className: "text-foreground flex flex-col items-center gap-1",
|
|
59056
59062
|
children: [/* @__PURE__ */ V("p", {
|
|
59057
59063
|
className: "text-2xl font-normal leading-[133%]",
|
|
59058
|
-
children: ["Connect to ",
|
|
59064
|
+
children: ["Connect to ", S]
|
|
59059
59065
|
}), /* @__PURE__ */ B("p", {
|
|
59060
59066
|
className: "text-muted-foreground text-base leading-[150%]",
|
|
59061
59067
|
children: "This app wants to connect to your wallet"
|
|
@@ -59112,7 +59118,7 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59112
59118
|
children: "URL"
|
|
59113
59119
|
}), /* @__PURE__ */ B("p", {
|
|
59114
59120
|
className: "text-foreground text-sm font-normal",
|
|
59115
|
-
children:
|
|
59121
|
+
children: C(i)
|
|
59116
59122
|
})]
|
|
59117
59123
|
})]
|
|
59118
59124
|
}),
|
|
@@ -59137,23 +59143,23 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59137
59143
|
]
|
|
59138
59144
|
})
|
|
59139
59145
|
});
|
|
59140
|
-
},
|
|
59146
|
+
}, hW = (e) => typeof e == "object" && !!e && !Array.isArray(e), gW = (e) => Array.isArray(e), _W = (e) => typeof e == "string" ? "text-foreground" : typeof e == "number" ? "text-info dark:text-info" : typeof e == "boolean" ? "text-info" : e == null ? "text-muted-foreground" : "text-foreground", vW = (e) => e === null ? {
|
|
59141
59147
|
text: "null",
|
|
59142
|
-
color:
|
|
59148
|
+
color: _W(null)
|
|
59143
59149
|
} : e === void 0 ? {
|
|
59144
59150
|
text: "undefined",
|
|
59145
|
-
color:
|
|
59151
|
+
color: _W(void 0)
|
|
59146
59152
|
} : typeof e == "boolean" || typeof e == "number" ? {
|
|
59147
59153
|
text: String(e),
|
|
59148
|
-
color:
|
|
59154
|
+
color: _W(e)
|
|
59149
59155
|
} : typeof e == "string" ? {
|
|
59150
59156
|
text: `"${e}"`,
|
|
59151
|
-
color:
|
|
59157
|
+
color: _W(e)
|
|
59152
59158
|
} : {
|
|
59153
59159
|
text: JSON.stringify(e),
|
|
59154
59160
|
color: "text-foreground"
|
|
59155
|
-
},
|
|
59156
|
-
let i =
|
|
59161
|
+
}, yW = ({ propertyKey: e, value: t, isLast: n, depth: r }) => {
|
|
59162
|
+
let i = vW(t);
|
|
59157
59163
|
return /* @__PURE__ */ V("div", {
|
|
59158
59164
|
className: "flex items-start gap-1 py-0.5 font-mono text-sm",
|
|
59159
59165
|
style: { paddingLeft: `${r * 16}px` },
|
|
@@ -59176,9 +59182,9 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59176
59182
|
})
|
|
59177
59183
|
]
|
|
59178
59184
|
});
|
|
59179
|
-
},
|
|
59185
|
+
}, bW = ({ data: e, depth: t = 0, parentKey: n, isLast: r = !0 }) => {
|
|
59180
59186
|
let i = t * 16;
|
|
59181
|
-
if (
|
|
59187
|
+
if (hW(e)) {
|
|
59182
59188
|
let a = Object.entries(e), o = `${n || "root"}-${t}`;
|
|
59183
59189
|
return t === 0 ? /* @__PURE__ */ B("div", {
|
|
59184
59190
|
className: "w-full font-mono text-sm",
|
|
@@ -59186,12 +59192,12 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59186
59192
|
className: "flex flex-col",
|
|
59187
59193
|
children: a.map(([e, n], r) => {
|
|
59188
59194
|
let i = r === a.length - 1;
|
|
59189
|
-
return
|
|
59195
|
+
return hW(n) || gW(n) ? /* @__PURE__ */ B(bW, {
|
|
59190
59196
|
data: n,
|
|
59191
59197
|
depth: t + 1,
|
|
59192
59198
|
parentKey: e,
|
|
59193
59199
|
isLast: i
|
|
59194
|
-
}, e) : /* @__PURE__ */ B(
|
|
59200
|
+
}, e) : /* @__PURE__ */ B(yW, {
|
|
59195
59201
|
propertyKey: e,
|
|
59196
59202
|
value: n,
|
|
59197
59203
|
isLast: i,
|
|
@@ -59244,12 +59250,12 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59244
59250
|
className: "flex flex-col",
|
|
59245
59251
|
children: [a.map(([e, n], r) => {
|
|
59246
59252
|
let i = r === a.length - 1;
|
|
59247
|
-
return
|
|
59253
|
+
return hW(n) || gW(n) ? /* @__PURE__ */ B(bW, {
|
|
59248
59254
|
data: n,
|
|
59249
59255
|
depth: t + 1,
|
|
59250
59256
|
parentKey: e,
|
|
59251
59257
|
isLast: i
|
|
59252
|
-
}, e) : /* @__PURE__ */ B(
|
|
59258
|
+
}, e) : /* @__PURE__ */ B(yW, {
|
|
59253
59259
|
propertyKey: e,
|
|
59254
59260
|
value: n,
|
|
59255
59261
|
isLast: i,
|
|
@@ -59266,7 +59272,7 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59266
59272
|
})
|
|
59267
59273
|
});
|
|
59268
59274
|
}
|
|
59269
|
-
if (
|
|
59275
|
+
if (gW(e)) {
|
|
59270
59276
|
let a = `${n || "array"}-${t}`;
|
|
59271
59277
|
return t === 0 ? /* @__PURE__ */ B("div", {
|
|
59272
59278
|
className: "w-full font-mono text-sm",
|
|
@@ -59274,16 +59280,16 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59274
59280
|
className: "flex flex-col",
|
|
59275
59281
|
children: e.map((n, r) => {
|
|
59276
59282
|
let i = r === e.length - 1, a = `[${r}]`;
|
|
59277
|
-
if (
|
|
59283
|
+
if (hW(n) || gW(n)) return /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ V("div", {
|
|
59278
59284
|
className: "text-muted-foreground py-0.5 font-mono text-sm",
|
|
59279
59285
|
style: { paddingLeft: `${t * 16}px` },
|
|
59280
59286
|
children: [a, ":"]
|
|
59281
|
-
}), /* @__PURE__ */ B(
|
|
59287
|
+
}), /* @__PURE__ */ B(bW, {
|
|
59282
59288
|
data: n,
|
|
59283
59289
|
depth: t + 1,
|
|
59284
59290
|
isLast: i
|
|
59285
59291
|
})] }, r);
|
|
59286
|
-
let o =
|
|
59292
|
+
let o = vW(n);
|
|
59287
59293
|
return /* @__PURE__ */ V("div", {
|
|
59288
59294
|
className: "flex items-start gap-1 py-0.5 font-mono text-sm",
|
|
59289
59295
|
style: { paddingLeft: `${t * 16}px` },
|
|
@@ -59349,16 +59355,16 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59349
59355
|
className: "flex flex-col",
|
|
59350
59356
|
children: [e.map((n, r) => {
|
|
59351
59357
|
let i = r === e.length - 1, a = `[${r}]`;
|
|
59352
|
-
if (
|
|
59358
|
+
if (hW(n) || gW(n)) return /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ V("div", {
|
|
59353
59359
|
className: "text-muted-foreground py-0.5 font-mono text-sm",
|
|
59354
59360
|
style: { paddingLeft: `${(t + 1) * 16}px` },
|
|
59355
59361
|
children: [a, ":"]
|
|
59356
|
-
}), /* @__PURE__ */ B(
|
|
59362
|
+
}), /* @__PURE__ */ B(bW, {
|
|
59357
59363
|
data: n,
|
|
59358
59364
|
depth: t + 2,
|
|
59359
59365
|
isLast: i
|
|
59360
59366
|
})] }, r);
|
|
59361
|
-
let o =
|
|
59367
|
+
let o = vW(n);
|
|
59362
59368
|
return /* @__PURE__ */ V("div", {
|
|
59363
59369
|
className: "flex items-start gap-1 py-0.5 font-mono text-sm",
|
|
59364
59370
|
style: { paddingLeft: `${(t + 1) * 16}px` },
|
|
@@ -59388,7 +59394,7 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59388
59394
|
})
|
|
59389
59395
|
});
|
|
59390
59396
|
}
|
|
59391
|
-
let a =
|
|
59397
|
+
let a = vW(e);
|
|
59392
59398
|
return /* @__PURE__ */ B("div", {
|
|
59393
59399
|
className: "py-0.5 font-mono text-sm",
|
|
59394
59400
|
style: { paddingLeft: `${i}px` },
|
|
@@ -59397,7 +59403,7 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59397
59403
|
children: a.text
|
|
59398
59404
|
})
|
|
59399
59405
|
});
|
|
59400
|
-
},
|
|
59406
|
+
}, xW = ({ open: e, onOpenChange: t, typedDataJson: n, origin: r, timestamp: i, accountAddress: a, chainName: o, chainId: s, chainIcon: c, mainnetRpcUrl: l, onSign: u, onCancel: d, isProcessing: f, signatureStatus: p, canSign: m }) => {
|
|
59401
59407
|
let h = lt(null), g = YL(), [_, v] = z(null), y = ct(() => {
|
|
59402
59408
|
try {
|
|
59403
59409
|
return JSON.parse(n);
|
|
@@ -59506,7 +59512,7 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59506
59512
|
let e = /* @__PURE__ */ B("div", {
|
|
59507
59513
|
ref: h,
|
|
59508
59514
|
className: "bg-muted/30 dark:bg-muted/10 border-border flex overflow-y-auto rounded-[6px] border p-3",
|
|
59509
|
-
children: /* @__PURE__ */ B(
|
|
59515
|
+
children: /* @__PURE__ */ B(bW, {
|
|
59510
59516
|
data: y,
|
|
59511
59517
|
depth: 0
|
|
59512
59518
|
})
|
|
@@ -59518,7 +59524,7 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59518
59524
|
className: "flex flex-col gap-2",
|
|
59519
59525
|
children: [/* @__PURE__ */ B("div", {
|
|
59520
59526
|
className: "bg-muted/30 dark:bg-muted/10 border-border rounded-[6px] border p-3",
|
|
59521
|
-
children: /* @__PURE__ */ B(
|
|
59527
|
+
children: /* @__PURE__ */ B(UU, {
|
|
59522
59528
|
display: x,
|
|
59523
59529
|
chainId: s ?? 1,
|
|
59524
59530
|
mainnetRpcUrl: l
|
|
@@ -59611,7 +59617,7 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59611
59617
|
})]
|
|
59612
59618
|
})
|
|
59613
59619
|
});
|
|
59614
|
-
},
|
|
59620
|
+
}, SW = ({ open: e, onOpenChange: t, mode: n, permissionId: r, spenderAddress: i, origin: a, spends: o = [], calls: s = [], expiryDate: c, networkName: l, chainId: u, chainIcon: d, apiKey: f, onConfirm: p, onCancel: m, isProcessing: h, status: g, isLoadingTokenInfo: _ = !1, timestamp: v = /* @__PURE__ */ new Date(), warningMessage: y, gasFee: b, gasFeeLoading: x = !1, gasEstimationError: S, sponsored: C = !1, feeTokens: w, feeTokensLoading: T, selectedFeeToken: E, onFeeTokenSelect: D, showFeeTokenSelector: O, isPayingWithErc20: k, mainnetRpcUrl: A, nativeCurrencySymbol: j }) => {
|
|
59615
59621
|
let M = lt(null), N = YL(), P = w?.find((e) => e.isNative)?.symbol || j || "ETH", ee = vz(P), [F, te] = z(!1), [I, L] = z({}), [ne, re] = z({}), [ie, ae] = z(!0);
|
|
59616
59622
|
at(() => {
|
|
59617
59623
|
if (!u) {
|
|
@@ -59754,7 +59760,7 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59754
59760
|
children: "Spender Address"
|
|
59755
59761
|
}), /* @__PURE__ */ V("div", {
|
|
59756
59762
|
className: "flex flex-row items-center gap-1",
|
|
59757
|
-
children: [/* @__PURE__ */ B(
|
|
59763
|
+
children: [/* @__PURE__ */ B(zU, { src: ne[i] }), /* @__PURE__ */ B("p", {
|
|
59758
59764
|
className: "break-all text-base font-normal leading-[150%]",
|
|
59759
59765
|
children: I[i] || ue(i)
|
|
59760
59766
|
})]
|
|
@@ -59877,7 +59883,7 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59877
59883
|
children: "Contract"
|
|
59878
59884
|
}), /* @__PURE__ */ V("div", {
|
|
59879
59885
|
className: "flex flex-row items-center gap-1",
|
|
59880
|
-
children: [/* @__PURE__ */ B(
|
|
59886
|
+
children: [/* @__PURE__ */ B(zU, {
|
|
59881
59887
|
src: ne[e.target],
|
|
59882
59888
|
fallback: null
|
|
59883
59889
|
}), /* @__PURE__ */ B("p", {
|
|
@@ -60129,7 +60135,7 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
60129
60135
|
})]
|
|
60130
60136
|
})
|
|
60131
60137
|
});
|
|
60132
|
-
},
|
|
60138
|
+
}, CW = class extends Le {
|
|
60133
60139
|
constructor(e) {
|
|
60134
60140
|
let { docsPath: t, field: n, metaMessages: r } = e;
|
|
60135
60141
|
super(`Invalid Sign-In with Ethereum message field "${n}".`, {
|
|
@@ -60141,9 +60147,9 @@ var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
60141
60147
|
};
|
|
60142
60148
|
//#endregion
|
|
60143
60149
|
//#region ../../node_modules/viem/_esm/utils/siwe/utils.js
|
|
60144
|
-
function
|
|
60150
|
+
function wW(e) {
|
|
60145
60151
|
if (/[^a-z0-9:/?#[\]@!$&'()*+,;=.\-_~%]/i.test(e) || /%[^0-9a-f]/i.test(e) || /%[0-9a-f](:?[^0-9a-f]|$)/i.test(e)) return !1;
|
|
60146
|
-
let t =
|
|
60152
|
+
let t = TW(e), n = t[1], r = t[2], i = t[3], a = t[4], o = t[5];
|
|
60147
60153
|
if (!(n?.length && i.length >= 0)) return !1;
|
|
60148
60154
|
if (r?.length) {
|
|
60149
60155
|
if (!(i.length === 0 || /^\//.test(i))) return !1;
|
|
@@ -60152,15 +60158,15 @@ function CW(e) {
|
|
|
60152
60158
|
let s = "";
|
|
60153
60159
|
return s += `${n}:`, r?.length && (s += `//${r}`), s += i, a?.length && (s += `?${a}`), o?.length && (s += `#${o}`), s;
|
|
60154
60160
|
}
|
|
60155
|
-
function
|
|
60161
|
+
function TW(e) {
|
|
60156
60162
|
return e.match(/(?:([^:/?#]+):)?(?:\/\/([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/);
|
|
60157
60163
|
}
|
|
60158
60164
|
//#endregion
|
|
60159
60165
|
//#region ../../node_modules/viem/_esm/utils/siwe/createSiweMessage.js
|
|
60160
|
-
function
|
|
60166
|
+
function EW(e) {
|
|
60161
60167
|
let { chainId: t, domain: n, expirationTime: r, issuedAt: i = /* @__PURE__ */ new Date(), nonce: a, notBefore: o, requestId: s, resources: c, scheme: l, uri: u, version: d } = e;
|
|
60162
60168
|
{
|
|
60163
|
-
if (t !== Math.floor(t)) throw new
|
|
60169
|
+
if (t !== Math.floor(t)) throw new CW({
|
|
60164
60170
|
field: "chainId",
|
|
60165
60171
|
metaMessages: [
|
|
60166
60172
|
"- Chain ID must be a EIP-155 chain ID.",
|
|
@@ -60169,7 +60175,7 @@ function TW(e) {
|
|
|
60169
60175
|
`Provided value: ${t}`
|
|
60170
60176
|
]
|
|
60171
60177
|
});
|
|
60172
|
-
if (!(
|
|
60178
|
+
if (!(DW.test(n) || OW.test(n) || kW.test(n))) throw new CW({
|
|
60173
60179
|
field: "domain",
|
|
60174
60180
|
metaMessages: [
|
|
60175
60181
|
"- Domain must be an RFC 3986 authority.",
|
|
@@ -60178,7 +60184,7 @@ function TW(e) {
|
|
|
60178
60184
|
`Provided value: ${n}`
|
|
60179
60185
|
]
|
|
60180
60186
|
});
|
|
60181
|
-
if (!
|
|
60187
|
+
if (!AW.test(a)) throw new CW({
|
|
60182
60188
|
field: "nonce",
|
|
60183
60189
|
metaMessages: [
|
|
60184
60190
|
"- Nonce must be at least 8 characters.",
|
|
@@ -60187,7 +60193,7 @@ function TW(e) {
|
|
|
60187
60193
|
`Provided value: ${a}`
|
|
60188
60194
|
]
|
|
60189
60195
|
});
|
|
60190
|
-
if (!
|
|
60196
|
+
if (!wW(u)) throw new CW({
|
|
60191
60197
|
field: "uri",
|
|
60192
60198
|
metaMessages: [
|
|
60193
60199
|
"- URI must be a RFC 3986 URI referring to the resource that is the subject of the signing.",
|
|
@@ -60196,7 +60202,7 @@ function TW(e) {
|
|
|
60196
60202
|
`Provided value: ${u}`
|
|
60197
60203
|
]
|
|
60198
60204
|
});
|
|
60199
|
-
if (d !== "1") throw new
|
|
60205
|
+
if (d !== "1") throw new CW({
|
|
60200
60206
|
field: "version",
|
|
60201
60207
|
metaMessages: [
|
|
60202
60208
|
"- Version must be '1'.",
|
|
@@ -60204,7 +60210,7 @@ function TW(e) {
|
|
|
60204
60210
|
`Provided value: ${d}`
|
|
60205
60211
|
]
|
|
60206
60212
|
});
|
|
60207
|
-
if (l && !
|
|
60213
|
+
if (l && !jW.test(l)) throw new CW({
|
|
60208
60214
|
field: "scheme",
|
|
60209
60215
|
metaMessages: [
|
|
60210
60216
|
"- Scheme must be an RFC 3986 URI scheme.",
|
|
@@ -60214,7 +60220,7 @@ function TW(e) {
|
|
|
60214
60220
|
]
|
|
60215
60221
|
});
|
|
60216
60222
|
let r = e.statement;
|
|
60217
|
-
if (r?.includes("\n")) throw new
|
|
60223
|
+
if (r?.includes("\n")) throw new CW({
|
|
60218
60224
|
field: "statement",
|
|
60219
60225
|
metaMessages: [
|
|
60220
60226
|
"- Statement must not include '\\n'.",
|
|
@@ -60227,7 +60233,7 @@ function TW(e) {
|
|
|
60227
60233
|
if (r && (m += `\nExpiration Time: ${r.toISOString()}`), o && (m += `\nNot Before: ${o.toISOString()}`), s && (m += `\nRequest ID: ${s}`), c) {
|
|
60228
60234
|
let e = "\nResources:";
|
|
60229
60235
|
for (let t of c) {
|
|
60230
|
-
if (!
|
|
60236
|
+
if (!wW(t)) throw new CW({
|
|
60231
60237
|
field: "resources",
|
|
60232
60238
|
metaMessages: [
|
|
60233
60239
|
"- Every resource must be a RFC 3986 URI.",
|
|
@@ -60242,7 +60248,7 @@ function TW(e) {
|
|
|
60242
60248
|
}
|
|
60243
60249
|
return `${p}\n${m}`;
|
|
60244
60250
|
}
|
|
60245
|
-
var
|
|
60251
|
+
var DW = /^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(:[0-9]{1,5})?$/, OW = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(:[0-9]{1,5})?$/, kW = /^localhost(:[0-9]{1,5})?$/, AW = /^[a-zA-Z0-9]{8,}$/, jW = /^([a-zA-Z][a-zA-Z0-9+-.]*)$/, MW = Object.freeze({
|
|
60246
60252
|
"--jaw-color-background": "oklch(1 0 0)",
|
|
60247
60253
|
"--jaw-color-foreground": "oklch(0.145 0 0)",
|
|
60248
60254
|
"--jaw-color-card": "oklch(1 0 0)",
|
|
@@ -60268,7 +60274,7 @@ var EW = /^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(:[0-9]{1
|
|
|
60268
60274
|
"--jaw-color-warning-foreground": "oklch(0.205 0 0)",
|
|
60269
60275
|
"--jaw-color-info": "oklch(0.623 0.214 259.815)",
|
|
60270
60276
|
"--jaw-color-info-foreground": "oklch(0.985 0 0)"
|
|
60271
|
-
}),
|
|
60277
|
+
}), NW = Object.freeze({
|
|
60272
60278
|
"--jaw-color-background": "oklch(0.178 0 0)",
|
|
60273
60279
|
"--jaw-color-foreground": "oklch(0.985 0 0)",
|
|
60274
60280
|
"--jaw-color-card": "oklch(0.215 0 0)",
|
|
@@ -60294,21 +60300,21 @@ var EW = /^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(:[0-9]{1
|
|
|
60294
60300
|
"--jaw-color-warning-foreground": "oklch(0.920 0.150 80)",
|
|
60295
60301
|
"--jaw-color-info": "oklch(0.623 0.214 259.815)",
|
|
60296
60302
|
"--jaw-color-info-foreground": "oklch(0.985 0 0)"
|
|
60297
|
-
}),
|
|
60303
|
+
}), PW = Object.freeze({
|
|
60298
60304
|
sm: "0.375rem",
|
|
60299
60305
|
md: "0.625rem",
|
|
60300
60306
|
lg: "1rem"
|
|
60301
|
-
}),
|
|
60307
|
+
}), FW = Object.freeze({
|
|
60302
60308
|
system: "ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
|
|
60303
60309
|
rounded: "\"Nunito\", \"SF Pro Rounded\", ui-rounded, \"Hiragino Maru Gothic ProN\", sans-serif",
|
|
60304
60310
|
mono: "ui-monospace, \"SF Mono\", \"Cascadia Code\", \"Segoe UI Mono\", Menlo, Consolas, monospace"
|
|
60305
60311
|
});
|
|
60306
60312
|
//#endregion
|
|
60307
60313
|
//#region src/theme/palette.ts
|
|
60308
|
-
function
|
|
60314
|
+
function IW(e) {
|
|
60309
60315
|
return e <= .04045 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;
|
|
60310
60316
|
}
|
|
60311
|
-
function
|
|
60317
|
+
function LW(e) {
|
|
60312
60318
|
let t = e.replace(/^#/, "");
|
|
60313
60319
|
if (t.length !== 6 && t.length !== 3) throw Error(`Invalid hex color: ${e}`);
|
|
60314
60320
|
let n = t.length === 3 ? t[0] + t[0] + t[1] + t[1] + t[2] + t[2] : t;
|
|
@@ -60318,14 +60324,14 @@ function IW(e) {
|
|
|
60318
60324
|
parseInt(n.slice(4, 6), 16) / 255
|
|
60319
60325
|
];
|
|
60320
60326
|
}
|
|
60321
|
-
function
|
|
60327
|
+
function RW(e, t, n) {
|
|
60322
60328
|
return [
|
|
60323
60329
|
.4124564 * e + .3575761 * t + .1804375 * n,
|
|
60324
60330
|
.2126729 * e + .7151522 * t + .072175 * n,
|
|
60325
60331
|
.0193339 * e + .119192 * t + .9503041 * n
|
|
60326
60332
|
];
|
|
60327
60333
|
}
|
|
60328
|
-
function
|
|
60334
|
+
function zW(e, t, n) {
|
|
60329
60335
|
let r = .8189330101 * e + .3618667424 * t - .1288597137 * n, i = .0329845436 * e + .9293118715 * t + .0361456387 * n, a = .0482003018 * e + .2643662691 * t + .633851707 * n, o = Math.cbrt(r), s = Math.cbrt(i), c = Math.cbrt(a);
|
|
60330
60336
|
return [
|
|
60331
60337
|
.2104542553 * o + .793617785 * s - .0040720468 * c,
|
|
@@ -60333,7 +60339,7 @@ function RW(e, t, n) {
|
|
|
60333
60339
|
.0259040371 * o + .7827717662 * s - .808675766 * c
|
|
60334
60340
|
];
|
|
60335
60341
|
}
|
|
60336
|
-
function
|
|
60342
|
+
function BW(e, t, n) {
|
|
60337
60343
|
let r = Math.sqrt(t * t + n * n), i = Math.atan2(n, t) * 180 / Math.PI;
|
|
60338
60344
|
return i < 0 && (i += 360), {
|
|
60339
60345
|
l: e,
|
|
@@ -60341,25 +60347,25 @@ function zW(e, t, n) {
|
|
|
60341
60347
|
h: i
|
|
60342
60348
|
};
|
|
60343
60349
|
}
|
|
60344
|
-
function BW(e) {
|
|
60345
|
-
let [t, n, r] = IW(e), [i, a, o] = LW(FW(t), FW(n), FW(r)), [s, c, l] = RW(i, a, o);
|
|
60346
|
-
return zW(s, c, l);
|
|
60347
|
-
}
|
|
60348
60350
|
function VW(e) {
|
|
60351
|
+
let [t, n, r] = LW(e), [i, a, o] = RW(IW(t), IW(n), IW(r)), [s, c, l] = zW(i, a, o);
|
|
60352
|
+
return BW(s, c, l);
|
|
60353
|
+
}
|
|
60354
|
+
function HW(e) {
|
|
60349
60355
|
return `oklch(${e.l.toFixed(3)} ${e.c.toFixed(3)} ${e.h.toFixed(1)})`;
|
|
60350
60356
|
}
|
|
60351
|
-
function
|
|
60352
|
-
let r =
|
|
60357
|
+
function UW(e, t, n) {
|
|
60358
|
+
let r = VW(e), i = t === "dark" && r.l < .5 ? {
|
|
60353
60359
|
l: Math.min(r.l + .15, .75),
|
|
60354
60360
|
c: r.c,
|
|
60355
60361
|
h: r.h
|
|
60356
|
-
} : r, a =
|
|
60357
|
-
o = n ? VW(
|
|
60358
|
-
let s =
|
|
60362
|
+
} : r, a = HW(i), o;
|
|
60363
|
+
o = n ? HW(VW(n)) : i.l > .6 ? "oklch(0.205 0 0)" : "oklch(0.985 0 0)";
|
|
60364
|
+
let s = HW({
|
|
60359
60365
|
l: i.l,
|
|
60360
60366
|
c: i.c * .5,
|
|
60361
60367
|
h: i.h
|
|
60362
|
-
}), c =
|
|
60368
|
+
}), c = HW({
|
|
60363
60369
|
l: t === "dark" ? .25 : .95,
|
|
60364
60370
|
c: r.c * .15,
|
|
60365
60371
|
h: r.h
|
|
@@ -60374,23 +60380,23 @@ function HW(e, t, n) {
|
|
|
60374
60380
|
}
|
|
60375
60381
|
//#endregion
|
|
60376
60382
|
//#region src/theme/resolve-theme.ts
|
|
60377
|
-
function
|
|
60378
|
-
let n = e.mode === "light" || e.mode === "dark" ? e.mode : t, r = { ...n === "dark" ?
|
|
60383
|
+
function WW(e, t) {
|
|
60384
|
+
let n = e.mode === "light" || e.mode === "dark" ? e.mode : t, r = { ...n === "dark" ? NW : MW };
|
|
60379
60385
|
if (e.accentColor) try {
|
|
60380
|
-
let t =
|
|
60386
|
+
let t = UW(e.accentColor, n, e.accentColorForeground);
|
|
60381
60387
|
Object.assign(r, t);
|
|
60382
60388
|
} catch {}
|
|
60383
60389
|
if (e.accentColorForeground && !e.accentColor) try {
|
|
60384
|
-
r["--jaw-color-primary-foreground"] = VW(
|
|
60390
|
+
r["--jaw-color-primary-foreground"] = HW(VW(e.accentColorForeground));
|
|
60385
60391
|
} catch {}
|
|
60386
|
-
return e.borderRadius && (r["--jaw-radius"] =
|
|
60392
|
+
return e.borderRadius && (r["--jaw-radius"] = PW[e.borderRadius]), e.fontStack && (r["--jaw-font-family"] = FW[e.fontStack]), e.cssVariables && Object.assign(r, e.cssVariables), Object.freeze({
|
|
60387
60393
|
variables: Object.freeze(r),
|
|
60388
60394
|
colorScheme: n
|
|
60389
60395
|
});
|
|
60390
60396
|
}
|
|
60391
60397
|
//#endregion
|
|
60392
60398
|
//#region src/theme/apply-theme.ts
|
|
60393
|
-
var
|
|
60399
|
+
var GW = {
|
|
60394
60400
|
"--jaw-color-background": "--background",
|
|
60395
60401
|
"--jaw-color-foreground": "--foreground",
|
|
60396
60402
|
"--jaw-color-card": "--card",
|
|
@@ -60417,12 +60423,12 @@ var WW = {
|
|
|
60417
60423
|
"--jaw-color-info": "--info",
|
|
60418
60424
|
"--jaw-color-info-foreground": "--info-foreground"
|
|
60419
60425
|
};
|
|
60420
|
-
function
|
|
60426
|
+
function KW(e, t) {
|
|
60421
60427
|
let n = Object.entries(t.variables);
|
|
60422
60428
|
for (let t = 0; t < n.length; t++) {
|
|
60423
60429
|
let [r, i] = n[t];
|
|
60424
60430
|
e.style.setProperty(r, i);
|
|
60425
|
-
let a =
|
|
60431
|
+
let a = GW[r];
|
|
60426
60432
|
a && e.style.setProperty(a, i);
|
|
60427
60433
|
}
|
|
60428
60434
|
let r = t.variables["--jaw-radius"];
|
|
@@ -60432,19 +60438,19 @@ function GW(e, t) {
|
|
|
60432
60438
|
}
|
|
60433
60439
|
//#endregion
|
|
60434
60440
|
//#region src/theme/use-color-scheme.ts
|
|
60435
|
-
var
|
|
60436
|
-
function
|
|
60441
|
+
var qW = "(prefers-color-scheme: dark)";
|
|
60442
|
+
function JW() {
|
|
60437
60443
|
if (typeof window > "u") return "light";
|
|
60438
60444
|
let e = document.documentElement;
|
|
60439
|
-
return e.classList.contains("dark") ? "dark" : e.classList.contains("light") ? "light" : window.matchMedia(
|
|
60445
|
+
return e.classList.contains("dark") ? "dark" : e.classList.contains("light") ? "light" : window.matchMedia(qW).matches ? "dark" : "light";
|
|
60440
60446
|
}
|
|
60441
|
-
function
|
|
60442
|
-
let [e, t] = z(
|
|
60447
|
+
function YW() {
|
|
60448
|
+
let [e, t] = z(JW);
|
|
60443
60449
|
return at(() => {
|
|
60444
60450
|
if (typeof window > "u") return;
|
|
60445
60451
|
let e = () => {
|
|
60446
|
-
t(
|
|
60447
|
-
}, n = window.matchMedia(
|
|
60452
|
+
t(JW());
|
|
60453
|
+
}, n = window.matchMedia(qW);
|
|
60448
60454
|
n.addEventListener("change", e);
|
|
60449
60455
|
let r = new MutationObserver(e);
|
|
60450
60456
|
return r.observe(document.documentElement, {
|
|
@@ -60457,10 +60463,10 @@ function JW() {
|
|
|
60457
60463
|
}
|
|
60458
60464
|
//#endregion
|
|
60459
60465
|
//#region src/react/ReactUIHandler.tsx
|
|
60460
|
-
function
|
|
60466
|
+
function XW(e) {
|
|
60461
60467
|
return ue.find((t) => t.id === e)?.name || "Unknown Network";
|
|
60462
60468
|
}
|
|
60463
|
-
var
|
|
60469
|
+
var ZW = (e) => (/* @__PURE__ */ new Date(e * 1e3)).toLocaleString("en-US", {
|
|
60464
60470
|
day: "2-digit",
|
|
60465
60471
|
month: "2-digit",
|
|
60466
60472
|
year: "numeric",
|
|
@@ -60468,18 +60474,18 @@ var XW = (e) => (/* @__PURE__ */ new Date(e * 1e3)).toLocaleString("en-US", {
|
|
|
60468
60474
|
minute: "2-digit",
|
|
60469
60475
|
second: "2-digit",
|
|
60470
60476
|
hour12: !1
|
|
60471
|
-
}),
|
|
60472
|
-
function
|
|
60473
|
-
let n =
|
|
60477
|
+
}), QW = jo;
|
|
60478
|
+
function $W({ theme: e, container: t }) {
|
|
60479
|
+
let n = YW();
|
|
60474
60480
|
return at(() => {
|
|
60475
|
-
(!e.mode || e.mode === "auto") &&
|
|
60481
|
+
(!e.mode || e.mode === "auto") && KW(t, WW(e, n));
|
|
60476
60482
|
}, [
|
|
60477
60483
|
n,
|
|
60478
60484
|
e,
|
|
60479
60485
|
t
|
|
60480
60486
|
]), null;
|
|
60481
60487
|
}
|
|
60482
|
-
var
|
|
60488
|
+
var eG = class {
|
|
60483
60489
|
config = {};
|
|
60484
60490
|
localTheme;
|
|
60485
60491
|
constructor(e) {
|
|
@@ -60522,7 +60528,7 @@ var $W = class {
|
|
|
60522
60528
|
WebkitFontSmoothing: "antialiased",
|
|
60523
60529
|
MozOsxFontSmoothing: "grayscale",
|
|
60524
60530
|
WebkitTapHighlightColor: "transparent"
|
|
60525
|
-
}),
|
|
60531
|
+
}), KW(n, WW(this.effectiveTheme, JW())), document.body.appendChild(n);
|
|
60526
60532
|
let r = pt(n), i = () => {
|
|
60527
60533
|
try {
|
|
60528
60534
|
document.body.style.removeProperty("pointer-events"), r.unmount(), n.parentNode && n.parentNode.removeChild(n);
|
|
@@ -60542,7 +60548,7 @@ var $W = class {
|
|
|
60542
60548
|
error: n || jR.userRejected()
|
|
60543
60549
|
});
|
|
60544
60550
|
}), o = this.effectiveTheme;
|
|
60545
|
-
r.render(et.createElement(wo.Provider, { value: n }, et.createElement(
|
|
60551
|
+
r.render(et.createElement(wo.Provider, { value: n }, et.createElement($W, {
|
|
60546
60552
|
theme: o,
|
|
60547
60553
|
container: n
|
|
60548
60554
|
}), a));
|
|
@@ -60570,7 +60576,7 @@ var $W = class {
|
|
|
60570
60576
|
}
|
|
60571
60577
|
renderDialog(e, t, n) {
|
|
60572
60578
|
switch (e.type) {
|
|
60573
|
-
case "wallet_connect": return /* @__PURE__ */ B(
|
|
60579
|
+
case "wallet_connect": return /* @__PURE__ */ B(iG, {
|
|
60574
60580
|
request: e,
|
|
60575
60581
|
onApprove: t,
|
|
60576
60582
|
onReject: n,
|
|
@@ -60581,14 +60587,14 @@ var $W = class {
|
|
|
60581
60587
|
});
|
|
60582
60588
|
case "personal_sign": {
|
|
60583
60589
|
let r = e;
|
|
60584
|
-
return MU(r.data.message) ? /* @__PURE__ */ B(
|
|
60590
|
+
return MU(r.data.message) ? /* @__PURE__ */ B(fG, {
|
|
60585
60591
|
request: r,
|
|
60586
60592
|
onApprove: t,
|
|
60587
60593
|
onReject: n,
|
|
60588
60594
|
apiKey: this.config.apiKey,
|
|
60589
60595
|
defaultChainId: this.config.defaultChainId,
|
|
60590
60596
|
paymasters: this.config.paymasters
|
|
60591
|
-
}) : /* @__PURE__ */ B(
|
|
60597
|
+
}) : /* @__PURE__ */ B(aG, {
|
|
60592
60598
|
request: r,
|
|
60593
60599
|
onApprove: t,
|
|
60594
60600
|
onReject: n,
|
|
@@ -60601,7 +60607,7 @@ var $W = class {
|
|
|
60601
60607
|
let r = e, i = r.data.request.type;
|
|
60602
60608
|
if (i === "0x45") {
|
|
60603
60609
|
let e = r.data.request.data.message;
|
|
60604
|
-
return MU(e) ? /* @__PURE__ */ B(
|
|
60610
|
+
return MU(e) ? /* @__PURE__ */ B(fG, {
|
|
60605
60611
|
request: {
|
|
60606
60612
|
...r,
|
|
60607
60613
|
type: "personal_sign",
|
|
@@ -60616,7 +60622,7 @@ var $W = class {
|
|
|
60616
60622
|
apiKey: this.config.apiKey,
|
|
60617
60623
|
defaultChainId: this.config.defaultChainId,
|
|
60618
60624
|
paymasters: this.config.paymasters
|
|
60619
|
-
}) : /* @__PURE__ */ B(
|
|
60625
|
+
}) : /* @__PURE__ */ B(aG, {
|
|
60620
60626
|
request: {
|
|
60621
60627
|
...r,
|
|
60622
60628
|
type: "personal_sign",
|
|
@@ -60634,7 +60640,7 @@ var $W = class {
|
|
|
60634
60640
|
});
|
|
60635
60641
|
} else if (i === "0x01") {
|
|
60636
60642
|
let e = r.data.request.data, i = typeof e == "string" ? e : JSON.stringify(e);
|
|
60637
|
-
return /* @__PURE__ */ B(
|
|
60643
|
+
return /* @__PURE__ */ B(oG, {
|
|
60638
60644
|
request: {
|
|
60639
60645
|
...r,
|
|
60640
60646
|
type: "eth_signTypedData_v4",
|
|
@@ -60650,12 +60656,12 @@ var $W = class {
|
|
|
60650
60656
|
defaultChainId: this.config.defaultChainId,
|
|
60651
60657
|
paymasters: this.config.paymasters
|
|
60652
60658
|
});
|
|
60653
|
-
} else return /* @__PURE__ */ B(
|
|
60659
|
+
} else return /* @__PURE__ */ B(mG, {
|
|
60654
60660
|
method: `wallet_sign (type: ${i})`,
|
|
60655
60661
|
onReject: n
|
|
60656
60662
|
});
|
|
60657
60663
|
}
|
|
60658
|
-
case "eth_signTypedData_v4": return /* @__PURE__ */ B(
|
|
60664
|
+
case "eth_signTypedData_v4": return /* @__PURE__ */ B(oG, {
|
|
60659
60665
|
request: e,
|
|
60660
60666
|
onApprove: t,
|
|
60661
60667
|
onReject: n,
|
|
@@ -60663,7 +60669,7 @@ var $W = class {
|
|
|
60663
60669
|
defaultChainId: this.config.defaultChainId,
|
|
60664
60670
|
paymasters: this.config.paymasters
|
|
60665
60671
|
});
|
|
60666
|
-
case "wallet_sendCalls": return /* @__PURE__ */ B(
|
|
60672
|
+
case "wallet_sendCalls": return /* @__PURE__ */ B(sG, {
|
|
60667
60673
|
request: e,
|
|
60668
60674
|
onApprove: t,
|
|
60669
60675
|
onReject: n,
|
|
@@ -60671,7 +60677,7 @@ var $W = class {
|
|
|
60671
60677
|
defaultChainId: this.config.defaultChainId,
|
|
60672
60678
|
paymasters: this.config.paymasters
|
|
60673
60679
|
});
|
|
60674
|
-
case "eth_sendTransaction": return /* @__PURE__ */ B(
|
|
60680
|
+
case "eth_sendTransaction": return /* @__PURE__ */ B(cG, {
|
|
60675
60681
|
request: e,
|
|
60676
60682
|
onApprove: t,
|
|
60677
60683
|
onReject: n,
|
|
@@ -60679,7 +60685,7 @@ var $W = class {
|
|
|
60679
60685
|
defaultChainId: this.config.defaultChainId,
|
|
60680
60686
|
paymasters: this.config.paymasters
|
|
60681
60687
|
});
|
|
60682
|
-
case "wallet_grantPermissions": return /* @__PURE__ */ B(
|
|
60688
|
+
case "wallet_grantPermissions": return /* @__PURE__ */ B(dG, {
|
|
60683
60689
|
request: e,
|
|
60684
60690
|
onApprove: t,
|
|
60685
60691
|
onReject: n,
|
|
@@ -60687,7 +60693,7 @@ var $W = class {
|
|
|
60687
60693
|
defaultChainId: this.config.defaultChainId,
|
|
60688
60694
|
paymasters: this.config.paymasters
|
|
60689
60695
|
});
|
|
60690
|
-
case "wallet_revokePermissions": return /* @__PURE__ */ B(
|
|
60696
|
+
case "wallet_revokePermissions": return /* @__PURE__ */ B(pG, {
|
|
60691
60697
|
request: e,
|
|
60692
60698
|
onApprove: t,
|
|
60693
60699
|
onReject: n,
|
|
@@ -60695,24 +60701,24 @@ var $W = class {
|
|
|
60695
60701
|
defaultChainId: this.config.defaultChainId,
|
|
60696
60702
|
paymasters: this.config.paymasters
|
|
60697
60703
|
});
|
|
60698
|
-
default: return /* @__PURE__ */ B(
|
|
60704
|
+
default: return /* @__PURE__ */ B(mG, {
|
|
60699
60705
|
method: e.type,
|
|
60700
60706
|
onReject: n
|
|
60701
60707
|
});
|
|
60702
60708
|
}
|
|
60703
60709
|
}
|
|
60704
60710
|
};
|
|
60705
|
-
function
|
|
60711
|
+
function tG(e, t, n) {
|
|
60706
60712
|
return {
|
|
60707
60713
|
id: e,
|
|
60708
60714
|
rpcUrl: t ? `${S}?chainId=${e}&api-key=${t}` : `${S}?chainId=${e}`,
|
|
60709
60715
|
...n && { paymaster: { url: n } }
|
|
60710
60716
|
};
|
|
60711
60717
|
}
|
|
60712
|
-
function
|
|
60718
|
+
function nG(e) {
|
|
60713
60719
|
return e ? `${S}?chainId=1&api-key=${e}` : `${S}?chainId=1`;
|
|
60714
60720
|
}
|
|
60715
|
-
async function
|
|
60721
|
+
async function rG(e, t, n) {
|
|
60716
60722
|
if (!e) throw Error("API key is required for signing operations");
|
|
60717
60723
|
let r = t || 1;
|
|
60718
60724
|
return await az.get({
|
|
@@ -60721,8 +60727,8 @@ async function nG(e, t, n) {
|
|
|
60721
60727
|
paymasterUrl: n
|
|
60722
60728
|
});
|
|
60723
60729
|
}
|
|
60724
|
-
function
|
|
60725
|
-
let [c, l] = z(!0), [u, d] = z([]), [f, p] = z(null), [m, h] = z(!1), [g, _] = z(!1), [v, y] = z(!1), [b, x] = z(null), [S, C] = z(null), [w, T] = z(!1), [E, D] = z(!1), [O, k] = z(""), A = typeof window < "u" ? window.location.hostname : "localhost", j = typeof window < "u" ? window.location.origin : "unknown", M = e.data.chainId || a || 1, N =
|
|
60730
|
+
function iG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId: a, paymasters: o, ens: s }) {
|
|
60731
|
+
let [c, l] = z(!0), [u, d] = z([]), [f, p] = z(null), [m, h] = z(!1), [g, _] = z(!1), [v, y] = z(!1), [b, x] = z(null), [S, C] = z(null), [w, T] = z(!1), [E, D] = z(!1), [O, k] = z(""), A = typeof window < "u" ? window.location.hostname : "localhost", j = typeof window < "u" ? window.location.origin : "unknown", M = e.data.chainId || a || 1, N = XW(M), P = pz(M, i, 24);
|
|
60726
60732
|
at(() => {
|
|
60727
60733
|
d(az.getStoredAccounts(i).map((e) => ({
|
|
60728
60734
|
username: e.username,
|
|
@@ -60833,7 +60839,7 @@ function rG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
|
|
|
60833
60839
|
} catch {
|
|
60834
60840
|
e = j, t = j;
|
|
60835
60841
|
}
|
|
60836
|
-
return
|
|
60842
|
+
return EW({
|
|
60837
60843
|
address: S,
|
|
60838
60844
|
chainId: n(se.chainId),
|
|
60839
60845
|
domain: se.domain || e,
|
|
@@ -60861,7 +60867,7 @@ function rG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
|
|
|
60861
60867
|
if (!(!S || !ce)) {
|
|
60862
60868
|
D(!0), k("Signing message...");
|
|
60863
60869
|
try {
|
|
60864
|
-
let e = await (await
|
|
60870
|
+
let e = await (await rG(i, M, o?.[M]?.url)).signMessage(ce);
|
|
60865
60871
|
k("Sign-in successful!"), t({ accounts: [{
|
|
60866
60872
|
address: S,
|
|
60867
60873
|
capabilities: { signInWithEthereum: {
|
|
@@ -60877,7 +60883,7 @@ function rG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
|
|
|
60877
60883
|
E || (y(!1), x(null), C(null), p(null), k(""));
|
|
60878
60884
|
};
|
|
60879
60885
|
if (v && S && se) if (!ce) console.error("SIWE capability present but message could not be built");
|
|
60880
|
-
else return /* @__PURE__ */ B(
|
|
60886
|
+
else return /* @__PURE__ */ B(pW, {
|
|
60881
60887
|
open: !0,
|
|
60882
60888
|
onOpenChange: (e) => {
|
|
60883
60889
|
e || fe();
|
|
@@ -60891,7 +60897,7 @@ function rG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
|
|
|
60891
60897
|
chainName: N,
|
|
60892
60898
|
chainId: M,
|
|
60893
60899
|
chainIcon: P,
|
|
60894
|
-
mainnetRpcUrl:
|
|
60900
|
+
mainnetRpcUrl: nG(i),
|
|
60895
60901
|
onSign: de,
|
|
60896
60902
|
onCancel: fe,
|
|
60897
60903
|
isProcessing: E,
|
|
@@ -60899,7 +60905,7 @@ function rG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
|
|
|
60899
60905
|
canSign: !E,
|
|
60900
60906
|
warningMessage: le
|
|
60901
60907
|
});
|
|
60902
|
-
return v && S ? /* @__PURE__ */ B(
|
|
60908
|
+
return v && S ? /* @__PURE__ */ B(mW, {
|
|
60903
60909
|
open: !0,
|
|
60904
60910
|
onOpenChange: (e) => {
|
|
60905
60911
|
e || te();
|
|
@@ -60913,12 +60919,12 @@ function rG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
|
|
|
60913
60919
|
chainName: N,
|
|
60914
60920
|
chainId: M,
|
|
60915
60921
|
chainIcon: P,
|
|
60916
|
-
mainnetRpcUrl:
|
|
60922
|
+
mainnetRpcUrl: nG(i),
|
|
60917
60923
|
onConnect: async () => F(),
|
|
60918
60924
|
onCancel: te,
|
|
60919
60925
|
showPermissions: !1,
|
|
60920
60926
|
isProcessing: w
|
|
60921
|
-
}) : /* @__PURE__ */ B(
|
|
60927
|
+
}) : /* @__PURE__ */ B(QW, {
|
|
60922
60928
|
open: c,
|
|
60923
60929
|
onOpenChange: (e) => {
|
|
60924
60930
|
e ? l(e) : ee();
|
|
@@ -60938,18 +60944,18 @@ function rG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
|
|
|
60938
60944
|
isCreating: g,
|
|
60939
60945
|
ensDomain: ie,
|
|
60940
60946
|
chainId: ae,
|
|
60941
|
-
mainnetRpcUrl:
|
|
60947
|
+
mainnetRpcUrl: nG(i),
|
|
60942
60948
|
apiKey: i,
|
|
60943
60949
|
supportedChains: ue.map((e) => ({ id: e.id })),
|
|
60944
60950
|
subnameTextRecords: oe
|
|
60945
60951
|
})
|
|
60946
60952
|
});
|
|
60947
60953
|
}
|
|
60948
|
-
function
|
|
60949
|
-
let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(""), f = e.data.chainId || i || 1, p =
|
|
60954
|
+
function aG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
|
|
60955
|
+
let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(""), f = e.data.chainId || i || 1, p = XW(f), m = pz(f, r, 24), h = async () => {
|
|
60950
60956
|
l(!0), d("Signing message...");
|
|
60951
60957
|
try {
|
|
60952
|
-
let n = await (await
|
|
60958
|
+
let n = await (await rG(r, f, a?.[f]?.url)).signMessage(e.data.message, { address: e.data.address });
|
|
60953
60959
|
d("Signature successful!"), t(n);
|
|
60954
60960
|
} catch (e) {
|
|
60955
60961
|
console.error("Signature failed:", e);
|
|
@@ -60961,7 +60967,7 @@ function iG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
60961
60967
|
}, g = () => {
|
|
60962
60968
|
s(!1), n(jR.userRejected());
|
|
60963
60969
|
};
|
|
60964
|
-
return /* @__PURE__ */ B(
|
|
60970
|
+
return /* @__PURE__ */ B(JU, {
|
|
60965
60971
|
open: o,
|
|
60966
60972
|
onOpenChange: (e) => {
|
|
60967
60973
|
e ? s(e) : g();
|
|
@@ -60973,7 +60979,7 @@ function iG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
60973
60979
|
chainName: p,
|
|
60974
60980
|
chainId: f,
|
|
60975
60981
|
chainIcon: m,
|
|
60976
|
-
mainnetRpcUrl:
|
|
60982
|
+
mainnetRpcUrl: nG(r),
|
|
60977
60983
|
onSign: h,
|
|
60978
60984
|
onCancel: g,
|
|
60979
60985
|
isProcessing: c,
|
|
@@ -60981,11 +60987,11 @@ function iG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
60981
60987
|
canSign: !c && !!e.data.message
|
|
60982
60988
|
});
|
|
60983
60989
|
}
|
|
60984
|
-
function
|
|
60990
|
+
function oG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
|
|
60985
60991
|
let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(""), f = e.data.chainId || i || 1, p = async () => {
|
|
60986
60992
|
l(!0), d("Signing typed data...");
|
|
60987
60993
|
try {
|
|
60988
|
-
let n = await
|
|
60994
|
+
let n = await rG(r, f, a?.[f]?.url), i = typeof e.data.typedData == "string" ? JSON.parse(e.data.typedData) : e.data.typedData, o = await n.signTypedData({
|
|
60989
60995
|
domain: i.domain,
|
|
60990
60996
|
types: i.types,
|
|
60991
60997
|
primaryType: i.primaryType,
|
|
@@ -61002,7 +61008,7 @@ function aG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61002
61008
|
}, m = () => {
|
|
61003
61009
|
s(!1), n(jR.userRejected());
|
|
61004
61010
|
};
|
|
61005
|
-
return /* @__PURE__ */ B(
|
|
61011
|
+
return /* @__PURE__ */ B(xW, {
|
|
61006
61012
|
open: o,
|
|
61007
61013
|
onOpenChange: (e) => {
|
|
61008
61014
|
e ? s(e) : m();
|
|
@@ -61011,7 +61017,7 @@ function aG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61011
61017
|
origin: typeof window < "u" ? window.location.origin : "unknown",
|
|
61012
61018
|
timestamp: new Date(e.timestamp),
|
|
61013
61019
|
accountAddress: e.data.address,
|
|
61014
|
-
mainnetRpcUrl:
|
|
61020
|
+
mainnetRpcUrl: nG(r),
|
|
61015
61021
|
onSign: p,
|
|
61016
61022
|
onCancel: m,
|
|
61017
61023
|
isProcessing: c,
|
|
@@ -61019,7 +61025,7 @@ function aG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61019
61025
|
canSign: !0
|
|
61020
61026
|
});
|
|
61021
61027
|
}
|
|
61022
|
-
function
|
|
61028
|
+
function sG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
|
|
61023
61029
|
let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(null), [f, p] = z(""), [m, h] = z([]), [g, _] = z(!1), v = e.data.chainId || i || 1, y = ue.find((e) => e.id === v), b = y?.name || "Unknown Network", S = vz(m?.find((e) => e.isNative)?.symbol || y?.nativeCurrency?.symbol || "ETH"), w = ct(() => e.data.capabilities?.paymasterService?.url || a?.[v]?.url, [
|
|
61024
61030
|
e.data.capabilities?.paymasterService?.url,
|
|
61025
61031
|
a,
|
|
@@ -61090,7 +61096,7 @@ function oG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61090
61096
|
t && _(!1);
|
|
61091
61097
|
return;
|
|
61092
61098
|
}
|
|
61093
|
-
let o =
|
|
61099
|
+
let o = tG(v, r).rpcUrl || y?.rpcUrls?.default?.http?.[0] || "https://eth.llamarpc.com", s = await Promise.all(a.tokens.map(async (t) => {
|
|
61094
61100
|
try {
|
|
61095
61101
|
let n = await yU(t.address, e.data.from, o), r = Ge(n, t.decimals), i = vU(t.address), a = i ? n > 0n : parseFloat(r) >= .5;
|
|
61096
61102
|
return {
|
|
@@ -61137,7 +61143,7 @@ function oG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61137
61143
|
let e = !0;
|
|
61138
61144
|
return (async () => {
|
|
61139
61145
|
try {
|
|
61140
|
-
let t = await
|
|
61146
|
+
let t = await rG(r, v, w);
|
|
61141
61147
|
e && d(t);
|
|
61142
61148
|
} catch (e) {
|
|
61143
61149
|
console.error("Error initializing account:", e);
|
|
@@ -61172,7 +61178,7 @@ function oG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61172
61178
|
}, ne = () => {
|
|
61173
61179
|
s(!1), n(jR.userRejected());
|
|
61174
61180
|
}, re = !E && m.some((e) => !e.isNative);
|
|
61175
|
-
return /* @__PURE__ */ B(
|
|
61181
|
+
return /* @__PURE__ */ B(qU, {
|
|
61176
61182
|
open: o,
|
|
61177
61183
|
onOpenChange: (e) => {
|
|
61178
61184
|
e ? s(e) : ne();
|
|
@@ -61188,7 +61194,7 @@ function oG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61188
61194
|
isProcessing: c,
|
|
61189
61195
|
transactionStatus: f,
|
|
61190
61196
|
networkName: b,
|
|
61191
|
-
mainnetRpcUrl:
|
|
61197
|
+
mainnetRpcUrl: nG(r),
|
|
61192
61198
|
apiKey: r,
|
|
61193
61199
|
feeTokens: m,
|
|
61194
61200
|
feeTokensLoading: g,
|
|
@@ -61199,7 +61205,7 @@ function oG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61199
61205
|
nativeCurrencySymbol: y?.nativeCurrency?.symbol
|
|
61200
61206
|
});
|
|
61201
61207
|
}
|
|
61202
|
-
function
|
|
61208
|
+
function cG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
|
|
61203
61209
|
let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(null), [f, p] = z(""), [m, h] = z([]), [g, _] = z(!1), v = e.data.chainId || i || 1, y = ue.find((e) => e.id === v), b = y?.name || "Unknown Network", S = vz(m?.find((e) => e.isNative)?.symbol || y?.nativeCurrency?.symbol || "ETH"), w = ct(() => e.data.capabilities?.paymasterService?.url || a?.[v]?.url, [
|
|
61204
61210
|
e.data.capabilities?.paymasterService?.url,
|
|
61205
61211
|
a,
|
|
@@ -61269,7 +61275,7 @@ function sG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61269
61275
|
t && _(!1);
|
|
61270
61276
|
return;
|
|
61271
61277
|
}
|
|
61272
|
-
let o =
|
|
61278
|
+
let o = tG(v, r).rpcUrl || y?.rpcUrls?.default?.http?.[0] || "https://eth.llamarpc.com", s = await Promise.all(a.tokens.map(async (t) => {
|
|
61273
61279
|
try {
|
|
61274
61280
|
let n = await yU(t.address, e.data.from, o), r = Ge(n, t.decimals), i = vU(t.address), a = i ? n > 0n : parseFloat(r) >= .5;
|
|
61275
61281
|
return {
|
|
@@ -61316,7 +61322,7 @@ function sG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61316
61322
|
let e = !0;
|
|
61317
61323
|
return (async () => {
|
|
61318
61324
|
try {
|
|
61319
|
-
let t = await
|
|
61325
|
+
let t = await rG(r, v, w);
|
|
61320
61326
|
e && d(t);
|
|
61321
61327
|
} catch (e) {
|
|
61322
61328
|
console.error("Error initializing account:", e);
|
|
@@ -61345,7 +61351,7 @@ function sG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61345
61351
|
}, L = () => {
|
|
61346
61352
|
s(!1), n(jR.userRejected());
|
|
61347
61353
|
}, ne = !E && m.some((e) => !e.isNative);
|
|
61348
|
-
return /* @__PURE__ */ B(
|
|
61354
|
+
return /* @__PURE__ */ B(qU, {
|
|
61349
61355
|
open: o,
|
|
61350
61356
|
onOpenChange: (e) => {
|
|
61351
61357
|
e ? s(e) : L();
|
|
@@ -61361,7 +61367,7 @@ function sG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61361
61367
|
isProcessing: c,
|
|
61362
61368
|
transactionStatus: f,
|
|
61363
61369
|
networkName: b,
|
|
61364
|
-
mainnetRpcUrl:
|
|
61370
|
+
mainnetRpcUrl: nG(r),
|
|
61365
61371
|
apiKey: r,
|
|
61366
61372
|
feeTokens: m,
|
|
61367
61373
|
feeTokensLoading: g,
|
|
@@ -61372,7 +61378,7 @@ function sG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61372
61378
|
nativeCurrencySymbol: y?.nativeCurrency?.symbol
|
|
61373
61379
|
});
|
|
61374
61380
|
}
|
|
61375
|
-
var
|
|
61381
|
+
var lG = {
|
|
61376
61382
|
"0x32323232": "Any Function",
|
|
61377
61383
|
"0xe0e0e0e0": "Empty Calldata",
|
|
61378
61384
|
"0xcc53287f": "lockdown((address,address)[])",
|
|
@@ -61380,8 +61386,8 @@ var cG = {
|
|
|
61380
61386
|
"0x095ea7b3": "approve(address,uint256)",
|
|
61381
61387
|
"0x23b872dd": "transferFrom(address,address,uint256)",
|
|
61382
61388
|
"0xa9059cbb": "transfer(address,uint256)"
|
|
61383
|
-
},
|
|
61384
|
-
function
|
|
61389
|
+
}, uG = (e) => lG[e.toLowerCase()] || e;
|
|
61390
|
+
function dG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
|
|
61385
61391
|
let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(""), [f, p] = z({}), [m, h] = z(!0), [g, _] = z(null), [v, y] = z([]), [b, S] = z(!0), w = e.data.chainId, T = typeof w == "string" ? parseInt(w, w.startsWith("0x") ? 16 : 10) : w || i || 1, E = ue.find((e) => e.id === T), D = E?.name || "Unknown Network", O = v?.find((e) => e.isNative)?.symbol || E?.nativeCurrency?.symbol || "ETH", k = vz(O), A = ct(() => e.data.capabilities?.paymasterService?.url || a?.[T]?.url, [
|
|
61386
61392
|
e.data.capabilities?.paymasterService?.url,
|
|
61387
61393
|
a,
|
|
@@ -61439,7 +61445,7 @@ function uG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61439
61445
|
te,
|
|
61440
61446
|
N,
|
|
61441
61447
|
k
|
|
61442
|
-
]), ae = ct(() =>
|
|
61448
|
+
]), ae = ct(() => tG(T, r, re), [
|
|
61443
61449
|
T,
|
|
61444
61450
|
r,
|
|
61445
61451
|
re
|
|
@@ -61534,7 +61540,7 @@ function uG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61534
61540
|
t && S(!1);
|
|
61535
61541
|
return;
|
|
61536
61542
|
}
|
|
61537
|
-
let o =
|
|
61543
|
+
let o = tG(T, r).rpcUrl || E?.rpcUrls?.default?.http?.[0] || "https://eth.llamarpc.com", s = await Promise.all(a.tokens.map(async (t) => {
|
|
61538
61544
|
try {
|
|
61539
61545
|
let n = await yU(t.address, e.data.address, o), r = Ge(n, t.decimals), i = vU(t.address), a = i ? n > 0n : parseFloat(r) >= .5;
|
|
61540
61546
|
return {
|
|
@@ -61581,7 +61587,7 @@ function uG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61581
61587
|
let e = !0;
|
|
61582
61588
|
return (async () => {
|
|
61583
61589
|
try {
|
|
61584
|
-
let t = await
|
|
61590
|
+
let t = await rG(r, T, A);
|
|
61585
61591
|
e && _(t);
|
|
61586
61592
|
} catch (e) {
|
|
61587
61593
|
console.error("[PermissionDialogWrapper] Error initializing account:", e);
|
|
@@ -61617,8 +61623,8 @@ function uG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61617
61623
|
]), le = ct(() => se.map((e) => ({
|
|
61618
61624
|
target: e.target,
|
|
61619
61625
|
selector: e.selector,
|
|
61620
|
-
functionSignature: e.functionSignature || (e.selector ?
|
|
61621
|
-
})), [se]), de = ct(() =>
|
|
61626
|
+
functionSignature: e.functionSignature || (e.selector ? uG(e.selector) : "Unknown Function")
|
|
61627
|
+
})), [se]), de = ct(() => ZW(e.data.expiry), [e.data.expiry]), fe = ct(() => {
|
|
61622
61628
|
let e = [];
|
|
61623
61629
|
if (ce.length > 0) {
|
|
61624
61630
|
let t = ce.map((e) => {
|
|
@@ -61661,7 +61667,7 @@ function uG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61661
61667
|
}, me = () => {
|
|
61662
61668
|
s(!1), n(jR.userRejected());
|
|
61663
61669
|
};
|
|
61664
|
-
return /* @__PURE__ */ B(
|
|
61670
|
+
return /* @__PURE__ */ B(SW, {
|
|
61665
61671
|
open: o,
|
|
61666
61672
|
onOpenChange: (e) => {
|
|
61667
61673
|
e ? s(e) : me();
|
|
@@ -61686,7 +61692,7 @@ function uG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61686
61692
|
gasFeeLoading: ee,
|
|
61687
61693
|
gasEstimationError: F,
|
|
61688
61694
|
sponsored: M,
|
|
61689
|
-
mainnetRpcUrl:
|
|
61695
|
+
mainnetRpcUrl: nG(r),
|
|
61690
61696
|
feeTokens: v,
|
|
61691
61697
|
feeTokensLoading: b,
|
|
61692
61698
|
selectedFeeToken: I,
|
|
@@ -61696,8 +61702,8 @@ function uG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61696
61702
|
nativeCurrencySymbol: E?.nativeCurrency?.symbol
|
|
61697
61703
|
});
|
|
61698
61704
|
}
|
|
61699
|
-
function
|
|
61700
|
-
let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(""), f = e.data.chainId || i || 1, p =
|
|
61705
|
+
function fG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
|
|
61706
|
+
let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(""), f = e.data.chainId || i || 1, p = XW(f), m = pz(f, r, 24), h = typeof window < "u" ? window.location.origin : "unknown", g = ct(() => {
|
|
61701
61707
|
let t = e.data.message;
|
|
61702
61708
|
if (t.startsWith("0x")) try {
|
|
61703
61709
|
return jU(t);
|
|
@@ -61717,7 +61723,7 @@ function dG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61717
61723
|
}, [g, h]), y = async () => {
|
|
61718
61724
|
l(!0), d("Signing message...");
|
|
61719
61725
|
try {
|
|
61720
|
-
let n = await (await
|
|
61726
|
+
let n = await (await rG(r, f, a?.[f]?.url)).signMessage(e.data.message);
|
|
61721
61727
|
d("Sign-in successful!"), t(n);
|
|
61722
61728
|
} catch (e) {
|
|
61723
61729
|
console.error("SIWE signature failed:", e);
|
|
@@ -61729,7 +61735,7 @@ function dG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61729
61735
|
}, b = () => {
|
|
61730
61736
|
s(!1), n(jR.userRejected());
|
|
61731
61737
|
};
|
|
61732
|
-
return /* @__PURE__ */ B(
|
|
61738
|
+
return /* @__PURE__ */ B(pW, {
|
|
61733
61739
|
open: o,
|
|
61734
61740
|
onOpenChange: (e) => {
|
|
61735
61741
|
e ? s(e) : b();
|
|
@@ -61742,7 +61748,7 @@ function dG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61742
61748
|
chainName: p,
|
|
61743
61749
|
chainId: f,
|
|
61744
61750
|
chainIcon: m,
|
|
61745
|
-
mainnetRpcUrl:
|
|
61751
|
+
mainnetRpcUrl: nG(r),
|
|
61746
61752
|
onSign: y,
|
|
61747
61753
|
onCancel: b,
|
|
61748
61754
|
isProcessing: c,
|
|
@@ -61751,7 +61757,7 @@ function dG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61751
61757
|
warningMessage: v
|
|
61752
61758
|
});
|
|
61753
61759
|
}
|
|
61754
|
-
function
|
|
61760
|
+
function pG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
|
|
61755
61761
|
let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(""), [f, p] = z(!0), [m, h] = z(null), [g, _] = z({}), [v, y] = z(null), [b, S] = z([]), [w, T] = z(!0), E = e.data.chainId || i || 1, D = ue.find((e) => e.id === E), O = D?.name || "Unknown Network", k = b?.find((e) => e.isNative)?.symbol || D?.nativeCurrency?.symbol || "ETH", A = vz(k), j = ct(() => e.data.capabilities?.paymasterService?.url || a?.[E]?.url, [
|
|
61756
61762
|
e.data.capabilities?.paymasterService?.url,
|
|
61757
61763
|
a,
|
|
@@ -61804,7 +61810,7 @@ function fG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61804
61810
|
I,
|
|
61805
61811
|
ee,
|
|
61806
61812
|
A
|
|
61807
|
-
]), oe = ct(() =>
|
|
61813
|
+
]), oe = ct(() => tG(E, r, ie), [
|
|
61808
61814
|
E,
|
|
61809
61815
|
r,
|
|
61810
61816
|
ie
|
|
@@ -61891,7 +61897,7 @@ function fG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61891
61897
|
t && T(!1);
|
|
61892
61898
|
return;
|
|
61893
61899
|
}
|
|
61894
|
-
let o =
|
|
61900
|
+
let o = tG(E, r).rpcUrl || D?.rpcUrls?.default?.http?.[0] || "https://eth.llamarpc.com", s = await Promise.all(a.tokens.map(async (t) => {
|
|
61895
61901
|
try {
|
|
61896
61902
|
let n = await yU(t.address, e.data.address, o), r = Ge(n, t.decimals), i = vU(t.address), a = i ? n > 0n : parseFloat(r) >= .5;
|
|
61897
61903
|
return {
|
|
@@ -61938,7 +61944,7 @@ function fG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61938
61944
|
let e = !0;
|
|
61939
61945
|
return (async () => {
|
|
61940
61946
|
try {
|
|
61941
|
-
let t = await
|
|
61947
|
+
let t = await rG(r, E, j);
|
|
61942
61948
|
e && y(t);
|
|
61943
61949
|
} catch (e) {
|
|
61944
61950
|
console.error("[RevokePermissionDialogWrapper] Error initializing account:", e);
|
|
@@ -61971,8 +61977,8 @@ function fG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61971
61977
|
]), ce = ct(() => m?.calls ? m.calls.map((e) => ({
|
|
61972
61978
|
target: e.target,
|
|
61973
61979
|
selector: e.selector,
|
|
61974
|
-
functionSignature: e.functionSignature || (e.selector ?
|
|
61975
|
-
})) : [], [m]), le = ct(() => m ?
|
|
61980
|
+
functionSignature: e.functionSignature || (e.selector ? uG(e.selector) : "Unknown Function")
|
|
61981
|
+
})) : [], [m]), le = ct(() => m ? ZW(parseInt(m.end, 10)) : "", [m]), de = m?.spender || "0x...", fe = async () => {
|
|
61976
61982
|
if (!v) {
|
|
61977
61983
|
console.error("[RevokePermissionDialogWrapper] Account not initialized");
|
|
61978
61984
|
return;
|
|
@@ -61990,7 +61996,7 @@ function fG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61990
61996
|
}, pe = () => {
|
|
61991
61997
|
s(!1), n(jR.userRejected());
|
|
61992
61998
|
};
|
|
61993
|
-
return /* @__PURE__ */ B(
|
|
61999
|
+
return /* @__PURE__ */ B(SW, {
|
|
61994
62000
|
open: o,
|
|
61995
62001
|
onOpenChange: (e) => {
|
|
61996
62002
|
e ? s(e) : pe();
|
|
@@ -62011,7 +62017,7 @@ function fG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
62011
62017
|
status: u,
|
|
62012
62018
|
isLoadingTokenInfo: f,
|
|
62013
62019
|
timestamp: new Date(e.timestamp),
|
|
62014
|
-
mainnetRpcUrl:
|
|
62020
|
+
mainnetRpcUrl: nG(r),
|
|
62015
62021
|
gasFee: ee,
|
|
62016
62022
|
gasFeeLoading: F,
|
|
62017
62023
|
gasEstimationError: te,
|
|
@@ -62025,11 +62031,11 @@ function fG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
62025
62031
|
nativeCurrencySymbol: D?.nativeCurrency?.symbol
|
|
62026
62032
|
});
|
|
62027
62033
|
}
|
|
62028
|
-
function
|
|
62034
|
+
function mG({ method: e, onReject: t }) {
|
|
62029
62035
|
let [n, r] = z(!0), [i, a] = z(!1), o = typeof window < "u" ? window.location.origin : "unknown", s = () => {
|
|
62030
62036
|
i || (a(!0), r(!1), t(jR.unsupportedRequest(e)));
|
|
62031
62037
|
};
|
|
62032
|
-
return /* @__PURE__ */ B(
|
|
62038
|
+
return /* @__PURE__ */ B(QW, {
|
|
62033
62039
|
open: n,
|
|
62034
62040
|
onOpenChange: (e) => {
|
|
62035
62041
|
e ? r(e) : s();
|
|
@@ -62094,4 +62100,4 @@ function pG({ method: e, onReject: t }) {
|
|
|
62094
62100
|
});
|
|
62095
62101
|
}
|
|
62096
62102
|
//#endregion
|
|
62097
|
-
export {
|
|
62103
|
+
export { PW as BORDER_RADIUS_MAP, ms as BadgeDollarIcon, ls as CloseIcon, mW as ConnectDialog, fs as CopiedIcon, ds as CopyIcon, NW as DEFAULT_DARK_PALETTE, MW as DEFAULT_LIGHT_PALETTE, jo as DefaultDialog, xW as Eip712Dialog, gs as EthIcon, ps as EyeIcon, FW as FONT_STACK_MAP, JL as FeeTokenSelector, ys as GenericTokenIcon, hs as LockIcon, fM as OnboardingDialog, Zo as OrSeparator, SW as PermissionDialog, wo as PortalContainerContext, eG as ReactUIHandler, JU as SignatureDialog, pW as SiweDialog, qU as TransactionDialog, _s as UsdcIcon, vs as UsdtIcon, us as WalletIcon, VH as applyFormat, KW as applyThemeToContainer, vH as caip10, _z as clearTokenPriceCache, Co as cn, JH as createTokenResolver, HH as decodeCalldataWithSignature, UW as deriveAccentPalette, CH as eip712TypeHash, yU as fetchTokenBalance, gz as fetchTokenPrice, hU as formatAddress, kU as getChainLabel, _H as getDefaultDescriptorSource, gU as getDisplayAddress, dM as getJustaNameInstance, XH as getNativeDecimals, YH as getNativeSymbol, FU as getSiweOriginWarning, JW as getSystemColorScheme, VW as hexToOklch, jU as hexToUtf8, vU as isNativeToken, LU as isSafeImageUrl, MU as isSiweMessage, HW as oklchToString, NU as parseSiweMessage, xH as resolveCalldataDescriptor, OH as resolveEip712Descriptor, fH as resolvePath, WW as resolveTheme, pU as reverseResolveAddresses, mU as reverseResolveWithAvatars, IU as sanitizeDisplayName, pz as useChainIconURI, oU as useClearSigningTypedData, YW as useColorScheme, aU as useDecodedCalldata, vz as useFeeTokenPrice, Cz as useGasEstimation, YL as useIsMobile };
|