@jaw.id/ui 0.4.11 → 0.4.13
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 +258 -240
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/safeUrl.d.ts +9 -0
- package/dist/utils/safeUrl.d.ts.map +1 -0
- package/dist/utils/sanitize.d.ts +8 -0
- package/dist/utils/sanitize.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -53127,7 +53127,7 @@ function YL(e = 768) {
|
|
|
53127
53127
|
}
|
|
53128
53128
|
//#endregion
|
|
53129
53129
|
//#region ../core/dist/sdk-info.js
|
|
53130
|
-
var XL = "0.4.
|
|
53130
|
+
var XL = "0.4.4";
|
|
53131
53131
|
(/* @__PURE__ */ L(((e, t) => {
|
|
53132
53132
|
var n = Object.prototype.hasOwnProperty, r = "~";
|
|
53133
53133
|
function i() {}
|
|
@@ -57438,11 +57438,29 @@ 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
|
|
57447
|
+
//#region src/utils/safeUrl.ts
|
|
57448
|
+
function LU(e) {
|
|
57449
|
+
if (!e) return !1;
|
|
57450
|
+
let t = e.trim();
|
|
57451
|
+
if (/^data:image\//i.test(t)) return !0;
|
|
57452
|
+
try {
|
|
57453
|
+
return new URL(t).protocol === "https:";
|
|
57454
|
+
} catch {
|
|
57455
|
+
return !1;
|
|
57456
|
+
}
|
|
57457
|
+
}
|
|
57458
|
+
//#endregion
|
|
57441
57459
|
//#region src/components/IdentityAvatar.tsx
|
|
57442
|
-
var
|
|
57460
|
+
var RU = /* @__PURE__ */ B(us, {
|
|
57443
57461
|
className: "h-3 w-3 flex-shrink-0",
|
|
57444
57462
|
stroke: "currentColor"
|
|
57445
|
-
}),
|
|
57463
|
+
}), zU = ({ src: e, fallback: t = RU }) => {
|
|
57446
57464
|
let [n, r] = z();
|
|
57447
57465
|
return !e || n === e ? /* @__PURE__ */ B(ut, { children: t }) : /* @__PURE__ */ B("img", {
|
|
57448
57466
|
src: e,
|
|
@@ -57454,27 +57472,27 @@ var IU = /* @__PURE__ */ B(us, {
|
|
|
57454
57472
|
};
|
|
57455
57473
|
//#endregion
|
|
57456
57474
|
//#region src/components/TransactionDialog/ClearSignedView.tsx
|
|
57457
|
-
function
|
|
57475
|
+
function BU(e) {
|
|
57458
57476
|
let [t, n] = e.split("."), r = t.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
57459
57477
|
return n ? `${r}.${n}` : r;
|
|
57460
57478
|
}
|
|
57461
|
-
function
|
|
57479
|
+
function VU({ row: e }) {
|
|
57462
57480
|
return /* @__PURE__ */ V("p", {
|
|
57463
57481
|
className: "text-foreground break-all font-mono text-xs leading-[150%]",
|
|
57464
57482
|
children: [/* @__PURE__ */ B("span", {
|
|
57465
57483
|
className: "font-semibold",
|
|
57466
|
-
children:
|
|
57484
|
+
children: BU(e.value)
|
|
57467
57485
|
}), e.symbol && /* @__PURE__ */ V("span", {
|
|
57468
57486
|
className: "text-muted-foreground",
|
|
57469
57487
|
children: [" ", e.symbol]
|
|
57470
57488
|
})]
|
|
57471
57489
|
});
|
|
57472
57490
|
}
|
|
57473
|
-
function
|
|
57491
|
+
function HU({ row: e, resolvedName: t, avatarSrc: n }) {
|
|
57474
57492
|
let r = e.rawValue ?? e.value;
|
|
57475
57493
|
return /* @__PURE__ */ V("div", {
|
|
57476
57494
|
className: "flex flex-row items-center gap-1",
|
|
57477
|
-
children: [/* @__PURE__ */ B(
|
|
57495
|
+
children: [/* @__PURE__ */ B(zU, {
|
|
57478
57496
|
src: n,
|
|
57479
57497
|
fallback: null
|
|
57480
57498
|
}), /* @__PURE__ */ B("p", {
|
|
@@ -57483,7 +57501,7 @@ function BU({ row: e, resolvedName: t, avatarSrc: n }) {
|
|
|
57483
57501
|
})]
|
|
57484
57502
|
});
|
|
57485
57503
|
}
|
|
57486
|
-
var
|
|
57504
|
+
var UU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
|
|
57487
57505
|
let [r, i] = z({}), [a, o] = z({}), s = lt(/* @__PURE__ */ new Set());
|
|
57488
57506
|
at(() => {
|
|
57489
57507
|
if (!n) return;
|
|
@@ -57537,7 +57555,7 @@ var VU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
|
|
|
57537
57555
|
children: [/* @__PURE__ */ B("span", {
|
|
57538
57556
|
className: "text-muted-foreground text-xs font-semibold",
|
|
57539
57557
|
children: e.label
|
|
57540
|
-
}), 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, {
|
|
57541
57559
|
row: e,
|
|
57542
57560
|
resolvedName: i,
|
|
57543
57561
|
avatarSrc: o
|
|
@@ -57549,24 +57567,24 @@ var VU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
|
|
|
57549
57567
|
})
|
|
57550
57568
|
})]
|
|
57551
57569
|
});
|
|
57552
|
-
},
|
|
57553
|
-
function
|
|
57570
|
+
}, WU = "0x0000000000000000000000000000000000000000";
|
|
57571
|
+
function GU(e, t) {
|
|
57554
57572
|
let n = {};
|
|
57555
57573
|
for (let [t, r] of Object.entries(e ?? {})) n[t.toLowerCase()] = r;
|
|
57556
57574
|
for (let [e, r] of Object.entries(t)) n[e.toLowerCase()] = r;
|
|
57557
57575
|
return n;
|
|
57558
57576
|
}
|
|
57559
|
-
var
|
|
57577
|
+
var KU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolvedAvatars: a, mainnetRpcUrl: o }) => {
|
|
57560
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);
|
|
57561
57579
|
at(() => {
|
|
57562
57580
|
h.current !== c && (h.current = c, d({}), p({}), m.current = /* @__PURE__ */ new Set());
|
|
57563
57581
|
}, [c]);
|
|
57564
|
-
let g = ct(() =>
|
|
57582
|
+
let g = ct(() => GU(i, u), [i, u]), _ = ct(() => GU(a, f), [a, f]), v = lt(g);
|
|
57565
57583
|
return v.current = g, at(() => {
|
|
57566
57584
|
if (!c || !o) return;
|
|
57567
57585
|
let e = v.current, t = c.params.filter((e) => e.type === "address" && e.rawValue).map((e) => e.rawValue).filter((t) => {
|
|
57568
57586
|
let n = t.toLowerCase();
|
|
57569
|
-
return n !==
|
|
57587
|
+
return n !== WU && !e[n] && !m.current.has(n);
|
|
57570
57588
|
}), r = [...new Set(t)];
|
|
57571
57589
|
if (r.length === 0) return;
|
|
57572
57590
|
r.forEach((e) => m.current.add(e.toLowerCase()));
|
|
@@ -57599,7 +57617,7 @@ var WU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
57599
57617
|
n
|
|
57600
57618
|
]), s && s.rows.length > 0 ? /* @__PURE__ */ V("div", {
|
|
57601
57619
|
className: "flex flex-col gap-2",
|
|
57602
|
-
children: [/* @__PURE__ */ B(
|
|
57620
|
+
children: [/* @__PURE__ */ B(UU, {
|
|
57603
57621
|
display: s,
|
|
57604
57622
|
chainId: n,
|
|
57605
57623
|
mainnetRpcUrl: o
|
|
@@ -57691,7 +57709,7 @@ var WU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
57691
57709
|
})]
|
|
57692
57710
|
}), /* @__PURE__ */ V("div", {
|
|
57693
57711
|
className: "flex flex-row items-center gap-1",
|
|
57694
|
-
children: [/* @__PURE__ */ B(
|
|
57712
|
+
children: [/* @__PURE__ */ B(zU, {
|
|
57695
57713
|
src: r,
|
|
57696
57714
|
fallback: null
|
|
57697
57715
|
}), /* @__PURE__ */ B("p", {
|
|
@@ -57723,7 +57741,7 @@ var WU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
57723
57741
|
children: t
|
|
57724
57742
|
})
|
|
57725
57743
|
});
|
|
57726
|
-
},
|
|
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 }) => {
|
|
57727
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);
|
|
57728
57746
|
at(() => {
|
|
57729
57747
|
let n = [];
|
|
@@ -57873,7 +57891,7 @@ var WU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
57873
57891
|
children: "From"
|
|
57874
57892
|
}), /* @__PURE__ */ V("div", {
|
|
57875
57893
|
className: "flex min-w-0 flex-row items-center gap-1",
|
|
57876
|
-
children: [/* @__PURE__ */ B(
|
|
57894
|
+
children: [/* @__PURE__ */ B(zU, { src: D[t] }), /* @__PURE__ */ B("p", {
|
|
57877
57895
|
className: "break-all text-base font-normal leading-[150%]",
|
|
57878
57896
|
children: ne
|
|
57879
57897
|
})]
|
|
@@ -57888,7 +57906,7 @@ var WU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
57888
57906
|
}), /* @__PURE__ */ V("div", {
|
|
57889
57907
|
className: "flex min-w-0 flex-row items-center gap-1",
|
|
57890
57908
|
children: [
|
|
57891
|
-
/* @__PURE__ */ B(
|
|
57909
|
+
/* @__PURE__ */ B(zU, { src: j?.to ? D[j.to] : void 0 }),
|
|
57892
57910
|
/* @__PURE__ */ B("p", {
|
|
57893
57911
|
className: "break-all text-base font-normal leading-[150%]",
|
|
57894
57912
|
children: re
|
|
@@ -58091,7 +58109,7 @@ var WU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58091
58109
|
},
|
|
58092
58110
|
className: "cursor-pointer"
|
|
58093
58111
|
})]
|
|
58094
|
-
}), /* @__PURE__ */ B(
|
|
58112
|
+
}), /* @__PURE__ */ B(KU, {
|
|
58095
58113
|
to: j.to,
|
|
58096
58114
|
data: j.data,
|
|
58097
58115
|
chainId: j.chainId,
|
|
@@ -58130,7 +58148,7 @@ var WU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58130
58148
|
children: "From"
|
|
58131
58149
|
}), /* @__PURE__ */ V("div", {
|
|
58132
58150
|
className: "flex flex-row items-center gap-1",
|
|
58133
|
-
children: [/* @__PURE__ */ B(
|
|
58151
|
+
children: [/* @__PURE__ */ B(zU, { src: D[t] }), /* @__PURE__ */ B("p", {
|
|
58134
58152
|
className: "break-all text-base font-normal leading-[150%]",
|
|
58135
58153
|
children: ne
|
|
58136
58154
|
})]
|
|
@@ -58182,7 +58200,7 @@ var WU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58182
58200
|
})]
|
|
58183
58201
|
}), /* @__PURE__ */ V("div", {
|
|
58184
58202
|
className: "flex flex-row items-center gap-1",
|
|
58185
|
-
children: [/* @__PURE__ */ B(
|
|
58203
|
+
children: [/* @__PURE__ */ B(zU, { src: e.to ? D[e.to] : void 0 }), /* @__PURE__ */ B("p", {
|
|
58186
58204
|
className: "text-sm font-normal leading-[150%]",
|
|
58187
58205
|
children: L(e.to)
|
|
58188
58206
|
})]
|
|
@@ -58248,7 +58266,7 @@ var WU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58248
58266
|
},
|
|
58249
58267
|
className: "cursor-pointer"
|
|
58250
58268
|
})]
|
|
58251
|
-
}), /* @__PURE__ */ B(
|
|
58269
|
+
}), /* @__PURE__ */ B(KU, {
|
|
58252
58270
|
to: e.to,
|
|
58253
58271
|
data: e.data,
|
|
58254
58272
|
chainId: e.chainId,
|
|
@@ -58422,7 +58440,7 @@ var WU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58422
58440
|
})] })
|
|
58423
58441
|
})
|
|
58424
58442
|
});
|
|
58425
|
-
},
|
|
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 }) => {
|
|
58426
58444
|
let h = YL(), [g, _] = z(null);
|
|
58427
58445
|
at(() => {
|
|
58428
58446
|
a && s && pU([{
|
|
@@ -58560,7 +58578,7 @@ var WU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58560
58578
|
};
|
|
58561
58579
|
//#endregion
|
|
58562
58580
|
//#region ../../node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
58563
|
-
function
|
|
58581
|
+
function YU(e) {
|
|
58564
58582
|
let t = R.useRef({
|
|
58565
58583
|
value: e,
|
|
58566
58584
|
previous: e
|
|
@@ -58569,13 +58587,13 @@ function qU(e) {
|
|
|
58569
58587
|
}
|
|
58570
58588
|
//#endregion
|
|
58571
58589
|
//#region ../../node_modules/@radix-ui/react-checkbox/dist/index.mjs
|
|
58572
|
-
var
|
|
58573
|
-
function
|
|
58590
|
+
var XU = "Checkbox", [ZU, QU] = yt(XU), [$U, eW] = ZU(XU);
|
|
58591
|
+
function tW(e) {
|
|
58574
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({
|
|
58575
58593
|
prop: n,
|
|
58576
58594
|
defaultProp: i ?? !1,
|
|
58577
58595
|
onChange: c,
|
|
58578
|
-
caller:
|
|
58596
|
+
caller: XU
|
|
58579
58597
|
}), [m, h] = R.useState(null), [g, _] = R.useState(null), v = R.useRef(!1), y = m ? !!o || !!m.closest("form") : !0, b = {
|
|
58580
58598
|
checked: f,
|
|
58581
58599
|
disabled: a,
|
|
@@ -58587,19 +58605,19 @@ function $U(e) {
|
|
|
58587
58605
|
value: u,
|
|
58588
58606
|
hasConsumerStoppedPropagationRef: v,
|
|
58589
58607
|
required: l,
|
|
58590
|
-
defaultChecked:
|
|
58608
|
+
defaultChecked: uW(i) ? !1 : i,
|
|
58591
58609
|
isFormControl: y,
|
|
58592
58610
|
bubbleInput: g,
|
|
58593
58611
|
setBubbleInput: _
|
|
58594
58612
|
};
|
|
58595
|
-
return /* @__PURE__ */ B(
|
|
58613
|
+
return /* @__PURE__ */ B($U, {
|
|
58596
58614
|
scope: t,
|
|
58597
58615
|
...b,
|
|
58598
|
-
children:
|
|
58616
|
+
children: lW(d) ? d(b) : r
|
|
58599
58617
|
});
|
|
58600
58618
|
}
|
|
58601
|
-
var
|
|
58602
|
-
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);
|
|
58603
58621
|
return R.useEffect(() => {
|
|
58604
58622
|
let e = a?.form;
|
|
58605
58623
|
if (e) {
|
|
@@ -58609,9 +58627,9 @@ var eW = "CheckboxTrigger", tW = R.forwardRef(({ __scopeCheckbox: e, onKeyDown:
|
|
|
58609
58627
|
}, [a, d]), /* @__PURE__ */ B(Ft.button, {
|
|
58610
58628
|
type: "button",
|
|
58611
58629
|
role: "checkbox",
|
|
58612
|
-
"aria-checked":
|
|
58630
|
+
"aria-checked": uW(c) ? "mixed" : c,
|
|
58613
58631
|
"aria-required": l,
|
|
58614
|
-
"data-state":
|
|
58632
|
+
"data-state": dW(c),
|
|
58615
58633
|
"data-disabled": s ? "" : void 0,
|
|
58616
58634
|
disabled: s,
|
|
58617
58635
|
value: o,
|
|
@@ -58621,14 +58639,14 @@ var eW = "CheckboxTrigger", tW = R.forwardRef(({ __scopeCheckbox: e, onKeyDown:
|
|
|
58621
58639
|
e.key === "Enter" && e.preventDefault();
|
|
58622
58640
|
}),
|
|
58623
58641
|
onClick: mt(n, (e) => {
|
|
58624
|
-
d((e) =>
|
|
58642
|
+
d((e) => uW(e) ? !0 : !e), m && p && (f.current = e.isPropagationStopped(), f.current || e.stopPropagation());
|
|
58625
58643
|
})
|
|
58626
58644
|
});
|
|
58627
58645
|
});
|
|
58628
|
-
|
|
58629
|
-
var
|
|
58646
|
+
rW.displayName = nW;
|
|
58647
|
+
var iW = R.forwardRef((e, t) => {
|
|
58630
58648
|
let { __scopeCheckbox: n, name: r, checked: i, defaultChecked: a, required: o, disabled: s, value: c, onCheckedChange: l, form: u, ...d } = e;
|
|
58631
|
-
return /* @__PURE__ */ B(
|
|
58649
|
+
return /* @__PURE__ */ B(tW, {
|
|
58632
58650
|
__scopeCheckbox: n,
|
|
58633
58651
|
checked: i,
|
|
58634
58652
|
defaultChecked: a,
|
|
@@ -58638,20 +58656,20 @@ var nW = R.forwardRef((e, t) => {
|
|
|
58638
58656
|
name: r,
|
|
58639
58657
|
form: u,
|
|
58640
58658
|
value: c,
|
|
58641
|
-
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, {
|
|
58642
58660
|
...d,
|
|
58643
58661
|
ref: t,
|
|
58644
58662
|
__scopeCheckbox: n
|
|
58645
|
-
}), e && /* @__PURE__ */ B(
|
|
58663
|
+
}), e && /* @__PURE__ */ B(cW, { __scopeCheckbox: n })] })
|
|
58646
58664
|
});
|
|
58647
58665
|
});
|
|
58648
|
-
|
|
58649
|
-
var
|
|
58650
|
-
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);
|
|
58651
58669
|
return /* @__PURE__ */ B(vn, {
|
|
58652
|
-
present: r ||
|
|
58670
|
+
present: r || uW(a.checked) || a.checked === !0,
|
|
58653
58671
|
children: /* @__PURE__ */ B(Ft.span, {
|
|
58654
|
-
"data-state":
|
|
58672
|
+
"data-state": dW(a.checked),
|
|
58655
58673
|
"data-disabled": a.disabled ? "" : void 0,
|
|
58656
58674
|
...i,
|
|
58657
58675
|
ref: t,
|
|
@@ -58662,16 +58680,16 @@ var rW = "CheckboxIndicator", iW = R.forwardRef((e, t) => {
|
|
|
58662
58680
|
})
|
|
58663
58681
|
});
|
|
58664
58682
|
});
|
|
58665
|
-
|
|
58666
|
-
var
|
|
58667
|
-
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);
|
|
58668
58686
|
R.useEffect(() => {
|
|
58669
58687
|
let e = f;
|
|
58670
58688
|
if (!e) return;
|
|
58671
58689
|
let t = window.HTMLInputElement.prototype, n = Object.getOwnPropertyDescriptor(t, "checked").set, r = !i.current;
|
|
58672
58690
|
if (h !== a && n) {
|
|
58673
58691
|
let t = new Event("click", { bubbles: r });
|
|
58674
|
-
e.indeterminate =
|
|
58692
|
+
e.indeterminate = uW(a), n.call(e, uW(a) ? !1 : a), e.dispatchEvent(t);
|
|
58675
58693
|
}
|
|
58676
58694
|
}, [
|
|
58677
58695
|
f,
|
|
@@ -58679,7 +58697,7 @@ var aW = "CheckboxBubbleInput", oW = R.forwardRef(({ __scopeCheckbox: e, ...t },
|
|
|
58679
58697
|
a,
|
|
58680
58698
|
i
|
|
58681
58699
|
]);
|
|
58682
|
-
let _ = R.useRef(
|
|
58700
|
+
let _ = R.useRef(uW(a) ? !1 : a);
|
|
58683
58701
|
return /* @__PURE__ */ B(Ft.input, {
|
|
58684
58702
|
type: "checkbox",
|
|
58685
58703
|
"aria-hidden": !0,
|
|
@@ -58703,24 +58721,24 @@ var aW = "CheckboxBubbleInput", oW = R.forwardRef(({ __scopeCheckbox: e, ...t },
|
|
|
58703
58721
|
}
|
|
58704
58722
|
});
|
|
58705
58723
|
});
|
|
58706
|
-
|
|
58707
|
-
function
|
|
58724
|
+
cW.displayName = sW;
|
|
58725
|
+
function lW(e) {
|
|
58708
58726
|
return typeof e == "function";
|
|
58709
58727
|
}
|
|
58710
|
-
function
|
|
58728
|
+
function uW(e) {
|
|
58711
58729
|
return e === "indeterminate";
|
|
58712
58730
|
}
|
|
58713
|
-
function
|
|
58714
|
-
return
|
|
58731
|
+
function dW(e) {
|
|
58732
|
+
return uW(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
58715
58733
|
}
|
|
58716
58734
|
//#endregion
|
|
58717
58735
|
//#region src/components/ui/checkbox.tsx
|
|
58718
|
-
function
|
|
58719
|
-
return /* @__PURE__ */ B(
|
|
58736
|
+
function fW({ className: e, ...t }) {
|
|
58737
|
+
return /* @__PURE__ */ B(iW, {
|
|
58720
58738
|
"data-slot": "checkbox",
|
|
58721
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),
|
|
58722
58740
|
...t,
|
|
58723
|
-
children: /* @__PURE__ */ B(
|
|
58741
|
+
children: /* @__PURE__ */ B(oW, {
|
|
58724
58742
|
"data-slot": "checkbox-indicator",
|
|
58725
58743
|
className: "flex items-center justify-center text-current transition-none",
|
|
58726
58744
|
children: /* @__PURE__ */ B(Wi, { className: "size-3.5" })
|
|
@@ -58729,10 +58747,10 @@ function uW({ className: e, ...t }) {
|
|
|
58729
58747
|
}
|
|
58730
58748
|
//#endregion
|
|
58731
58749
|
//#region src/components/SiweDialog/index.tsx
|
|
58732
|
-
var
|
|
58733
|
-
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);
|
|
58734
58752
|
at(() => {
|
|
58735
|
-
|
|
58753
|
+
w(!1);
|
|
58736
58754
|
}, [n, _]), at(() => {
|
|
58737
58755
|
s && l && pU([{
|
|
58738
58756
|
address: s,
|
|
@@ -58745,7 +58763,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
58745
58763
|
}
|
|
58746
58764
|
}).catch(() => {});
|
|
58747
58765
|
}, [s, l]);
|
|
58748
|
-
let
|
|
58766
|
+
let T = gU(y, s || "");
|
|
58749
58767
|
return /* @__PURE__ */ B(jo, {
|
|
58750
58768
|
open: e,
|
|
58751
58769
|
onOpenChange: m ? void 0 : t,
|
|
@@ -58774,7 +58792,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
58774
58792
|
})
|
|
58775
58793
|
}), /* @__PURE__ */ B("p", {
|
|
58776
58794
|
className: "text-muted-foreground text-sm",
|
|
58777
|
-
children:
|
|
58795
|
+
children: T
|
|
58778
58796
|
})]
|
|
58779
58797
|
}),
|
|
58780
58798
|
contentStyle: v ? {
|
|
@@ -58791,9 +58809,9 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
58791
58809
|
children: [
|
|
58792
58810
|
/* @__PURE__ */ V("div", {
|
|
58793
58811
|
className: "flex flex-1 flex-col items-center justify-center p-3.5",
|
|
58794
|
-
children: [o && /* @__PURE__ */ B("img", {
|
|
58812
|
+
children: [LU(o) && /* @__PURE__ */ B("img", {
|
|
58795
58813
|
src: o,
|
|
58796
|
-
alt: `${
|
|
58814
|
+
alt: `${x} logo`,
|
|
58797
58815
|
className: "mb-3 h-[72px] w-[72px] rounded-full"
|
|
58798
58816
|
}), /* @__PURE__ */ V("div", {
|
|
58799
58817
|
className: "text-foreground flex flex-col items-center gap-1",
|
|
@@ -58802,7 +58820,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
58802
58820
|
children: "Sign in Request"
|
|
58803
58821
|
}), /* @__PURE__ */ B("p", {
|
|
58804
58822
|
className: "text-base font-bold leading-[150%]",
|
|
58805
|
-
children:
|
|
58823
|
+
children: x
|
|
58806
58824
|
})]
|
|
58807
58825
|
})]
|
|
58808
58826
|
}),
|
|
@@ -58906,12 +58924,12 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
58906
58924
|
})]
|
|
58907
58925
|
})]
|
|
58908
58926
|
}), /* @__PURE__ */ V("label", {
|
|
58909
|
-
htmlFor:
|
|
58927
|
+
htmlFor: S,
|
|
58910
58928
|
className: "flex cursor-pointer items-center gap-2",
|
|
58911
|
-
children: [/* @__PURE__ */ B(
|
|
58912
|
-
id:
|
|
58913
|
-
checked:
|
|
58914
|
-
onCheckedChange: (e) =>
|
|
58929
|
+
children: [/* @__PURE__ */ B(fW, {
|
|
58930
|
+
id: S,
|
|
58931
|
+
checked: C,
|
|
58932
|
+
onCheckedChange: (e) => w(e === !0)
|
|
58915
58933
|
}), /* @__PURE__ */ B("span", {
|
|
58916
58934
|
className: "text-foreground text-xs font-medium leading-[150%]",
|
|
58917
58935
|
children: "I understand the risk and want to continue"
|
|
@@ -58932,7 +58950,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
58932
58950
|
children: "Cancel"
|
|
58933
58951
|
}), /* @__PURE__ */ B(ts, {
|
|
58934
58952
|
onClick: f,
|
|
58935
|
-
disabled: !g || !!_ && !
|
|
58953
|
+
disabled: !g || !!_ && !C,
|
|
58936
58954
|
className: "flex-1",
|
|
58937
58955
|
children: m ? "Signing..." : "Sign"
|
|
58938
58956
|
})]
|
|
@@ -58940,7 +58958,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
58940
58958
|
]
|
|
58941
58959
|
})
|
|
58942
58960
|
});
|
|
58943
|
-
},
|
|
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 }) => {
|
|
58944
58962
|
let g = YL(), [_, v] = z(null), [y, b] = z(!1);
|
|
58945
58963
|
at(() => {
|
|
58946
58964
|
s && l && pU([{
|
|
@@ -58954,15 +58972,15 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
58954
58972
|
}
|
|
58955
58973
|
}).catch(() => {});
|
|
58956
58974
|
}, [s, l]);
|
|
58957
|
-
let x = _ || o, S = (e) => {
|
|
58975
|
+
let x = _ || o, S = IU(n) || "dApp", C = (e) => {
|
|
58958
58976
|
try {
|
|
58959
58977
|
return new URL(e.startsWith("http") ? e : `https://${e}`).hostname.replace("www.", "");
|
|
58960
58978
|
} catch {
|
|
58961
58979
|
return i;
|
|
58962
58980
|
}
|
|
58963
|
-
},
|
|
58981
|
+
}, w = (e) => {
|
|
58964
58982
|
typeof window < "u" && navigator?.clipboard && (navigator.clipboard.writeText(e), b(!0), setTimeout(() => b(!1), 3e3));
|
|
58965
|
-
},
|
|
58983
|
+
}, T = (e) => !e || e.length < 10 ? e : `${e.slice(0, 6)}...${e.slice(-4)}`;
|
|
58966
58984
|
return /* @__PURE__ */ B(jo, {
|
|
58967
58985
|
open: e,
|
|
58968
58986
|
onOpenChange: h ? void 0 : t,
|
|
@@ -58992,7 +59010,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
58992
59010
|
className: "flex flex-row items-center gap-1",
|
|
58993
59011
|
children: [/* @__PURE__ */ V("p", {
|
|
58994
59012
|
className: "text-muted-foreground text-sm leading-none",
|
|
58995
|
-
children: ["Sign in as ", x ||
|
|
59013
|
+
children: ["Sign in as ", x || T(s)]
|
|
58996
59014
|
}), !x && (y ? /* @__PURE__ */ B(fs, {
|
|
58997
59015
|
width: 10,
|
|
58998
59016
|
height: 10,
|
|
@@ -59000,14 +59018,14 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59000
59018
|
}) : /* @__PURE__ */ B(ds, {
|
|
59001
59019
|
width: 10,
|
|
59002
59020
|
height: 10,
|
|
59003
|
-
onClick: () =>
|
|
59021
|
+
onClick: () => w(s),
|
|
59004
59022
|
className: "flex-shrink-0 cursor-pointer"
|
|
59005
59023
|
}))]
|
|
59006
59024
|
}), x && /* @__PURE__ */ V("div", {
|
|
59007
59025
|
className: "flex flex-row items-center gap-1",
|
|
59008
59026
|
children: [/* @__PURE__ */ B("p", {
|
|
59009
59027
|
className: "text-muted-foreground text-sm leading-none",
|
|
59010
|
-
children:
|
|
59028
|
+
children: T(s)
|
|
59011
59029
|
}), y ? /* @__PURE__ */ B(fs, {
|
|
59012
59030
|
width: 10,
|
|
59013
59031
|
height: 10,
|
|
@@ -59015,7 +59033,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59015
59033
|
}) : /* @__PURE__ */ B(ds, {
|
|
59016
59034
|
width: 10,
|
|
59017
59035
|
height: 10,
|
|
59018
|
-
onClick: () =>
|
|
59036
|
+
onClick: () => w(s),
|
|
59019
59037
|
className: "flex-shrink-0 cursor-pointer"
|
|
59020
59038
|
})]
|
|
59021
59039
|
})]
|
|
@@ -59035,15 +59053,15 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59035
59053
|
children: [
|
|
59036
59054
|
/* @__PURE__ */ V("div", {
|
|
59037
59055
|
className: "flex flex-1 flex-col items-center justify-center p-3.5",
|
|
59038
|
-
children: [r && /* @__PURE__ */ B("img", {
|
|
59056
|
+
children: [LU(r) && /* @__PURE__ */ B("img", {
|
|
59039
59057
|
src: r,
|
|
59040
|
-
alt: `${
|
|
59058
|
+
alt: `${S} logo`,
|
|
59041
59059
|
className: "mb-3 h-[72px] w-[72px] rounded-full"
|
|
59042
59060
|
}), /* @__PURE__ */ V("div", {
|
|
59043
59061
|
className: "text-foreground flex flex-col items-center gap-1",
|
|
59044
59062
|
children: [/* @__PURE__ */ V("p", {
|
|
59045
59063
|
className: "text-2xl font-normal leading-[133%]",
|
|
59046
|
-
children: ["Connect to ",
|
|
59064
|
+
children: ["Connect to ", S]
|
|
59047
59065
|
}), /* @__PURE__ */ B("p", {
|
|
59048
59066
|
className: "text-muted-foreground text-base leading-[150%]",
|
|
59049
59067
|
children: "This app wants to connect to your wallet"
|
|
@@ -59100,7 +59118,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59100
59118
|
children: "URL"
|
|
59101
59119
|
}), /* @__PURE__ */ B("p", {
|
|
59102
59120
|
className: "text-foreground text-sm font-normal",
|
|
59103
|
-
children:
|
|
59121
|
+
children: C(i)
|
|
59104
59122
|
})]
|
|
59105
59123
|
})]
|
|
59106
59124
|
}),
|
|
@@ -59125,23 +59143,23 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59125
59143
|
]
|
|
59126
59144
|
})
|
|
59127
59145
|
});
|
|
59128
|
-
},
|
|
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 ? {
|
|
59129
59147
|
text: "null",
|
|
59130
|
-
color:
|
|
59148
|
+
color: _W(null)
|
|
59131
59149
|
} : e === void 0 ? {
|
|
59132
59150
|
text: "undefined",
|
|
59133
|
-
color:
|
|
59151
|
+
color: _W(void 0)
|
|
59134
59152
|
} : typeof e == "boolean" || typeof e == "number" ? {
|
|
59135
59153
|
text: String(e),
|
|
59136
|
-
color:
|
|
59154
|
+
color: _W(e)
|
|
59137
59155
|
} : typeof e == "string" ? {
|
|
59138
59156
|
text: `"${e}"`,
|
|
59139
|
-
color:
|
|
59157
|
+
color: _W(e)
|
|
59140
59158
|
} : {
|
|
59141
59159
|
text: JSON.stringify(e),
|
|
59142
59160
|
color: "text-foreground"
|
|
59143
|
-
},
|
|
59144
|
-
let i =
|
|
59161
|
+
}, yW = ({ propertyKey: e, value: t, isLast: n, depth: r }) => {
|
|
59162
|
+
let i = vW(t);
|
|
59145
59163
|
return /* @__PURE__ */ V("div", {
|
|
59146
59164
|
className: "flex items-start gap-1 py-0.5 font-mono text-sm",
|
|
59147
59165
|
style: { paddingLeft: `${r * 16}px` },
|
|
@@ -59164,9 +59182,9 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59164
59182
|
})
|
|
59165
59183
|
]
|
|
59166
59184
|
});
|
|
59167
|
-
},
|
|
59185
|
+
}, bW = ({ data: e, depth: t = 0, parentKey: n, isLast: r = !0 }) => {
|
|
59168
59186
|
let i = t * 16;
|
|
59169
|
-
if (
|
|
59187
|
+
if (hW(e)) {
|
|
59170
59188
|
let a = Object.entries(e), o = `${n || "root"}-${t}`;
|
|
59171
59189
|
return t === 0 ? /* @__PURE__ */ B("div", {
|
|
59172
59190
|
className: "w-full font-mono text-sm",
|
|
@@ -59174,12 +59192,12 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59174
59192
|
className: "flex flex-col",
|
|
59175
59193
|
children: a.map(([e, n], r) => {
|
|
59176
59194
|
let i = r === a.length - 1;
|
|
59177
|
-
return
|
|
59195
|
+
return hW(n) || gW(n) ? /* @__PURE__ */ B(bW, {
|
|
59178
59196
|
data: n,
|
|
59179
59197
|
depth: t + 1,
|
|
59180
59198
|
parentKey: e,
|
|
59181
59199
|
isLast: i
|
|
59182
|
-
}, e) : /* @__PURE__ */ B(
|
|
59200
|
+
}, e) : /* @__PURE__ */ B(yW, {
|
|
59183
59201
|
propertyKey: e,
|
|
59184
59202
|
value: n,
|
|
59185
59203
|
isLast: i,
|
|
@@ -59232,12 +59250,12 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59232
59250
|
className: "flex flex-col",
|
|
59233
59251
|
children: [a.map(([e, n], r) => {
|
|
59234
59252
|
let i = r === a.length - 1;
|
|
59235
|
-
return
|
|
59253
|
+
return hW(n) || gW(n) ? /* @__PURE__ */ B(bW, {
|
|
59236
59254
|
data: n,
|
|
59237
59255
|
depth: t + 1,
|
|
59238
59256
|
parentKey: e,
|
|
59239
59257
|
isLast: i
|
|
59240
|
-
}, e) : /* @__PURE__ */ B(
|
|
59258
|
+
}, e) : /* @__PURE__ */ B(yW, {
|
|
59241
59259
|
propertyKey: e,
|
|
59242
59260
|
value: n,
|
|
59243
59261
|
isLast: i,
|
|
@@ -59254,7 +59272,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59254
59272
|
})
|
|
59255
59273
|
});
|
|
59256
59274
|
}
|
|
59257
|
-
if (
|
|
59275
|
+
if (gW(e)) {
|
|
59258
59276
|
let a = `${n || "array"}-${t}`;
|
|
59259
59277
|
return t === 0 ? /* @__PURE__ */ B("div", {
|
|
59260
59278
|
className: "w-full font-mono text-sm",
|
|
@@ -59262,16 +59280,16 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59262
59280
|
className: "flex flex-col",
|
|
59263
59281
|
children: e.map((n, r) => {
|
|
59264
59282
|
let i = r === e.length - 1, a = `[${r}]`;
|
|
59265
|
-
if (
|
|
59283
|
+
if (hW(n) || gW(n)) return /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ V("div", {
|
|
59266
59284
|
className: "text-muted-foreground py-0.5 font-mono text-sm",
|
|
59267
59285
|
style: { paddingLeft: `${t * 16}px` },
|
|
59268
59286
|
children: [a, ":"]
|
|
59269
|
-
}), /* @__PURE__ */ B(
|
|
59287
|
+
}), /* @__PURE__ */ B(bW, {
|
|
59270
59288
|
data: n,
|
|
59271
59289
|
depth: t + 1,
|
|
59272
59290
|
isLast: i
|
|
59273
59291
|
})] }, r);
|
|
59274
|
-
let o =
|
|
59292
|
+
let o = vW(n);
|
|
59275
59293
|
return /* @__PURE__ */ V("div", {
|
|
59276
59294
|
className: "flex items-start gap-1 py-0.5 font-mono text-sm",
|
|
59277
59295
|
style: { paddingLeft: `${t * 16}px` },
|
|
@@ -59337,16 +59355,16 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59337
59355
|
className: "flex flex-col",
|
|
59338
59356
|
children: [e.map((n, r) => {
|
|
59339
59357
|
let i = r === e.length - 1, a = `[${r}]`;
|
|
59340
|
-
if (
|
|
59358
|
+
if (hW(n) || gW(n)) return /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ V("div", {
|
|
59341
59359
|
className: "text-muted-foreground py-0.5 font-mono text-sm",
|
|
59342
59360
|
style: { paddingLeft: `${(t + 1) * 16}px` },
|
|
59343
59361
|
children: [a, ":"]
|
|
59344
|
-
}), /* @__PURE__ */ B(
|
|
59362
|
+
}), /* @__PURE__ */ B(bW, {
|
|
59345
59363
|
data: n,
|
|
59346
59364
|
depth: t + 2,
|
|
59347
59365
|
isLast: i
|
|
59348
59366
|
})] }, r);
|
|
59349
|
-
let o =
|
|
59367
|
+
let o = vW(n);
|
|
59350
59368
|
return /* @__PURE__ */ V("div", {
|
|
59351
59369
|
className: "flex items-start gap-1 py-0.5 font-mono text-sm",
|
|
59352
59370
|
style: { paddingLeft: `${(t + 1) * 16}px` },
|
|
@@ -59376,7 +59394,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59376
59394
|
})
|
|
59377
59395
|
});
|
|
59378
59396
|
}
|
|
59379
|
-
let a =
|
|
59397
|
+
let a = vW(e);
|
|
59380
59398
|
return /* @__PURE__ */ B("div", {
|
|
59381
59399
|
className: "py-0.5 font-mono text-sm",
|
|
59382
59400
|
style: { paddingLeft: `${i}px` },
|
|
@@ -59385,7 +59403,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59385
59403
|
children: a.text
|
|
59386
59404
|
})
|
|
59387
59405
|
});
|
|
59388
|
-
},
|
|
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 }) => {
|
|
59389
59407
|
let h = lt(null), g = YL(), [_, v] = z(null), y = ct(() => {
|
|
59390
59408
|
try {
|
|
59391
59409
|
return JSON.parse(n);
|
|
@@ -59494,7 +59512,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59494
59512
|
let e = /* @__PURE__ */ B("div", {
|
|
59495
59513
|
ref: h,
|
|
59496
59514
|
className: "bg-muted/30 dark:bg-muted/10 border-border flex overflow-y-auto rounded-[6px] border p-3",
|
|
59497
|
-
children: /* @__PURE__ */ B(
|
|
59515
|
+
children: /* @__PURE__ */ B(bW, {
|
|
59498
59516
|
data: y,
|
|
59499
59517
|
depth: 0
|
|
59500
59518
|
})
|
|
@@ -59506,7 +59524,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59506
59524
|
className: "flex flex-col gap-2",
|
|
59507
59525
|
children: [/* @__PURE__ */ B("div", {
|
|
59508
59526
|
className: "bg-muted/30 dark:bg-muted/10 border-border rounded-[6px] border p-3",
|
|
59509
|
-
children: /* @__PURE__ */ B(
|
|
59527
|
+
children: /* @__PURE__ */ B(UU, {
|
|
59510
59528
|
display: x,
|
|
59511
59529
|
chainId: s ?? 1,
|
|
59512
59530
|
mainnetRpcUrl: l
|
|
@@ -59599,7 +59617,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59599
59617
|
})]
|
|
59600
59618
|
})
|
|
59601
59619
|
});
|
|
59602
|
-
},
|
|
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 }) => {
|
|
59603
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);
|
|
59604
59622
|
at(() => {
|
|
59605
59623
|
if (!u) {
|
|
@@ -59742,7 +59760,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59742
59760
|
children: "Spender Address"
|
|
59743
59761
|
}), /* @__PURE__ */ V("div", {
|
|
59744
59762
|
className: "flex flex-row items-center gap-1",
|
|
59745
|
-
children: [/* @__PURE__ */ B(
|
|
59763
|
+
children: [/* @__PURE__ */ B(zU, { src: ne[i] }), /* @__PURE__ */ B("p", {
|
|
59746
59764
|
className: "break-all text-base font-normal leading-[150%]",
|
|
59747
59765
|
children: I[i] || ue(i)
|
|
59748
59766
|
})]
|
|
@@ -59865,7 +59883,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59865
59883
|
children: "Contract"
|
|
59866
59884
|
}), /* @__PURE__ */ V("div", {
|
|
59867
59885
|
className: "flex flex-row items-center gap-1",
|
|
59868
|
-
children: [/* @__PURE__ */ B(
|
|
59886
|
+
children: [/* @__PURE__ */ B(zU, {
|
|
59869
59887
|
src: ne[e.target],
|
|
59870
59888
|
fallback: null
|
|
59871
59889
|
}), /* @__PURE__ */ B("p", {
|
|
@@ -60117,7 +60135,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
60117
60135
|
})]
|
|
60118
60136
|
})
|
|
60119
60137
|
});
|
|
60120
|
-
},
|
|
60138
|
+
}, CW = class extends Le {
|
|
60121
60139
|
constructor(e) {
|
|
60122
60140
|
let { docsPath: t, field: n, metaMessages: r } = e;
|
|
60123
60141
|
super(`Invalid Sign-In with Ethereum message field "${n}".`, {
|
|
@@ -60129,9 +60147,9 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
60129
60147
|
};
|
|
60130
60148
|
//#endregion
|
|
60131
60149
|
//#region ../../node_modules/viem/_esm/utils/siwe/utils.js
|
|
60132
|
-
function
|
|
60150
|
+
function wW(e) {
|
|
60133
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;
|
|
60134
|
-
let t =
|
|
60152
|
+
let t = TW(e), n = t[1], r = t[2], i = t[3], a = t[4], o = t[5];
|
|
60135
60153
|
if (!(n?.length && i.length >= 0)) return !1;
|
|
60136
60154
|
if (r?.length) {
|
|
60137
60155
|
if (!(i.length === 0 || /^\//.test(i))) return !1;
|
|
@@ -60140,15 +60158,15 @@ function SW(e) {
|
|
|
60140
60158
|
let s = "";
|
|
60141
60159
|
return s += `${n}:`, r?.length && (s += `//${r}`), s += i, a?.length && (s += `?${a}`), o?.length && (s += `#${o}`), s;
|
|
60142
60160
|
}
|
|
60143
|
-
function
|
|
60161
|
+
function TW(e) {
|
|
60144
60162
|
return e.match(/(?:([^:/?#]+):)?(?:\/\/([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/);
|
|
60145
60163
|
}
|
|
60146
60164
|
//#endregion
|
|
60147
60165
|
//#region ../../node_modules/viem/_esm/utils/siwe/createSiweMessage.js
|
|
60148
|
-
function
|
|
60166
|
+
function EW(e) {
|
|
60149
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;
|
|
60150
60168
|
{
|
|
60151
|
-
if (t !== Math.floor(t)) throw new
|
|
60169
|
+
if (t !== Math.floor(t)) throw new CW({
|
|
60152
60170
|
field: "chainId",
|
|
60153
60171
|
metaMessages: [
|
|
60154
60172
|
"- Chain ID must be a EIP-155 chain ID.",
|
|
@@ -60157,7 +60175,7 @@ function wW(e) {
|
|
|
60157
60175
|
`Provided value: ${t}`
|
|
60158
60176
|
]
|
|
60159
60177
|
});
|
|
60160
|
-
if (!(
|
|
60178
|
+
if (!(DW.test(n) || OW.test(n) || kW.test(n))) throw new CW({
|
|
60161
60179
|
field: "domain",
|
|
60162
60180
|
metaMessages: [
|
|
60163
60181
|
"- Domain must be an RFC 3986 authority.",
|
|
@@ -60166,7 +60184,7 @@ function wW(e) {
|
|
|
60166
60184
|
`Provided value: ${n}`
|
|
60167
60185
|
]
|
|
60168
60186
|
});
|
|
60169
|
-
if (!
|
|
60187
|
+
if (!AW.test(a)) throw new CW({
|
|
60170
60188
|
field: "nonce",
|
|
60171
60189
|
metaMessages: [
|
|
60172
60190
|
"- Nonce must be at least 8 characters.",
|
|
@@ -60175,7 +60193,7 @@ function wW(e) {
|
|
|
60175
60193
|
`Provided value: ${a}`
|
|
60176
60194
|
]
|
|
60177
60195
|
});
|
|
60178
|
-
if (!
|
|
60196
|
+
if (!wW(u)) throw new CW({
|
|
60179
60197
|
field: "uri",
|
|
60180
60198
|
metaMessages: [
|
|
60181
60199
|
"- URI must be a RFC 3986 URI referring to the resource that is the subject of the signing.",
|
|
@@ -60184,7 +60202,7 @@ function wW(e) {
|
|
|
60184
60202
|
`Provided value: ${u}`
|
|
60185
60203
|
]
|
|
60186
60204
|
});
|
|
60187
|
-
if (d !== "1") throw new
|
|
60205
|
+
if (d !== "1") throw new CW({
|
|
60188
60206
|
field: "version",
|
|
60189
60207
|
metaMessages: [
|
|
60190
60208
|
"- Version must be '1'.",
|
|
@@ -60192,7 +60210,7 @@ function wW(e) {
|
|
|
60192
60210
|
`Provided value: ${d}`
|
|
60193
60211
|
]
|
|
60194
60212
|
});
|
|
60195
|
-
if (l && !
|
|
60213
|
+
if (l && !jW.test(l)) throw new CW({
|
|
60196
60214
|
field: "scheme",
|
|
60197
60215
|
metaMessages: [
|
|
60198
60216
|
"- Scheme must be an RFC 3986 URI scheme.",
|
|
@@ -60202,7 +60220,7 @@ function wW(e) {
|
|
|
60202
60220
|
]
|
|
60203
60221
|
});
|
|
60204
60222
|
let r = e.statement;
|
|
60205
|
-
if (r?.includes("\n")) throw new
|
|
60223
|
+
if (r?.includes("\n")) throw new CW({
|
|
60206
60224
|
field: "statement",
|
|
60207
60225
|
metaMessages: [
|
|
60208
60226
|
"- Statement must not include '\\n'.",
|
|
@@ -60215,7 +60233,7 @@ function wW(e) {
|
|
|
60215
60233
|
if (r && (m += `\nExpiration Time: ${r.toISOString()}`), o && (m += `\nNot Before: ${o.toISOString()}`), s && (m += `\nRequest ID: ${s}`), c) {
|
|
60216
60234
|
let e = "\nResources:";
|
|
60217
60235
|
for (let t of c) {
|
|
60218
|
-
if (!
|
|
60236
|
+
if (!wW(t)) throw new CW({
|
|
60219
60237
|
field: "resources",
|
|
60220
60238
|
metaMessages: [
|
|
60221
60239
|
"- Every resource must be a RFC 3986 URI.",
|
|
@@ -60230,7 +60248,7 @@ function wW(e) {
|
|
|
60230
60248
|
}
|
|
60231
60249
|
return `${p}\n${m}`;
|
|
60232
60250
|
}
|
|
60233
|
-
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({
|
|
60234
60252
|
"--jaw-color-background": "oklch(1 0 0)",
|
|
60235
60253
|
"--jaw-color-foreground": "oklch(0.145 0 0)",
|
|
60236
60254
|
"--jaw-color-card": "oklch(1 0 0)",
|
|
@@ -60256,7 +60274,7 @@ var TW = /^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(:[0-9]{1
|
|
|
60256
60274
|
"--jaw-color-warning-foreground": "oklch(0.205 0 0)",
|
|
60257
60275
|
"--jaw-color-info": "oklch(0.623 0.214 259.815)",
|
|
60258
60276
|
"--jaw-color-info-foreground": "oklch(0.985 0 0)"
|
|
60259
|
-
}),
|
|
60277
|
+
}), NW = Object.freeze({
|
|
60260
60278
|
"--jaw-color-background": "oklch(0.178 0 0)",
|
|
60261
60279
|
"--jaw-color-foreground": "oklch(0.985 0 0)",
|
|
60262
60280
|
"--jaw-color-card": "oklch(0.215 0 0)",
|
|
@@ -60282,21 +60300,21 @@ var TW = /^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(:[0-9]{1
|
|
|
60282
60300
|
"--jaw-color-warning-foreground": "oklch(0.920 0.150 80)",
|
|
60283
60301
|
"--jaw-color-info": "oklch(0.623 0.214 259.815)",
|
|
60284
60302
|
"--jaw-color-info-foreground": "oklch(0.985 0 0)"
|
|
60285
|
-
}),
|
|
60303
|
+
}), PW = Object.freeze({
|
|
60286
60304
|
sm: "0.375rem",
|
|
60287
60305
|
md: "0.625rem",
|
|
60288
60306
|
lg: "1rem"
|
|
60289
|
-
}),
|
|
60307
|
+
}), FW = Object.freeze({
|
|
60290
60308
|
system: "ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
|
|
60291
60309
|
rounded: "\"Nunito\", \"SF Pro Rounded\", ui-rounded, \"Hiragino Maru Gothic ProN\", sans-serif",
|
|
60292
60310
|
mono: "ui-monospace, \"SF Mono\", \"Cascadia Code\", \"Segoe UI Mono\", Menlo, Consolas, monospace"
|
|
60293
60311
|
});
|
|
60294
60312
|
//#endregion
|
|
60295
60313
|
//#region src/theme/palette.ts
|
|
60296
|
-
function
|
|
60314
|
+
function IW(e) {
|
|
60297
60315
|
return e <= .04045 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;
|
|
60298
60316
|
}
|
|
60299
|
-
function
|
|
60317
|
+
function LW(e) {
|
|
60300
60318
|
let t = e.replace(/^#/, "");
|
|
60301
60319
|
if (t.length !== 6 && t.length !== 3) throw Error(`Invalid hex color: ${e}`);
|
|
60302
60320
|
let n = t.length === 3 ? t[0] + t[0] + t[1] + t[1] + t[2] + t[2] : t;
|
|
@@ -60306,14 +60324,14 @@ function FW(e) {
|
|
|
60306
60324
|
parseInt(n.slice(4, 6), 16) / 255
|
|
60307
60325
|
];
|
|
60308
60326
|
}
|
|
60309
|
-
function
|
|
60327
|
+
function RW(e, t, n) {
|
|
60310
60328
|
return [
|
|
60311
60329
|
.4124564 * e + .3575761 * t + .1804375 * n,
|
|
60312
60330
|
.2126729 * e + .7151522 * t + .072175 * n,
|
|
60313
60331
|
.0193339 * e + .119192 * t + .9503041 * n
|
|
60314
60332
|
];
|
|
60315
60333
|
}
|
|
60316
|
-
function
|
|
60334
|
+
function zW(e, t, n) {
|
|
60317
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);
|
|
60318
60336
|
return [
|
|
60319
60337
|
.2104542553 * o + .793617785 * s - .0040720468 * c,
|
|
@@ -60321,7 +60339,7 @@ function LW(e, t, n) {
|
|
|
60321
60339
|
.0259040371 * o + .7827717662 * s - .808675766 * c
|
|
60322
60340
|
];
|
|
60323
60341
|
}
|
|
60324
|
-
function
|
|
60342
|
+
function BW(e, t, n) {
|
|
60325
60343
|
let r = Math.sqrt(t * t + n * n), i = Math.atan2(n, t) * 180 / Math.PI;
|
|
60326
60344
|
return i < 0 && (i += 360), {
|
|
60327
60345
|
l: e,
|
|
@@ -60329,25 +60347,25 @@ function RW(e, t, n) {
|
|
|
60329
60347
|
h: i
|
|
60330
60348
|
};
|
|
60331
60349
|
}
|
|
60332
|
-
function
|
|
60333
|
-
let [t, n, r] =
|
|
60334
|
-
return
|
|
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);
|
|
60335
60353
|
}
|
|
60336
|
-
function
|
|
60354
|
+
function HW(e) {
|
|
60337
60355
|
return `oklch(${e.l.toFixed(3)} ${e.c.toFixed(3)} ${e.h.toFixed(1)})`;
|
|
60338
60356
|
}
|
|
60339
|
-
function
|
|
60340
|
-
let r =
|
|
60357
|
+
function UW(e, t, n) {
|
|
60358
|
+
let r = VW(e), i = t === "dark" && r.l < .5 ? {
|
|
60341
60359
|
l: Math.min(r.l + .15, .75),
|
|
60342
60360
|
c: r.c,
|
|
60343
60361
|
h: r.h
|
|
60344
|
-
} : r, a =
|
|
60345
|
-
o = n ?
|
|
60346
|
-
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({
|
|
60347
60365
|
l: i.l,
|
|
60348
60366
|
c: i.c * .5,
|
|
60349
60367
|
h: i.h
|
|
60350
|
-
}), c =
|
|
60368
|
+
}), c = HW({
|
|
60351
60369
|
l: t === "dark" ? .25 : .95,
|
|
60352
60370
|
c: r.c * .15,
|
|
60353
60371
|
h: r.h
|
|
@@ -60362,23 +60380,23 @@ function VW(e, t, n) {
|
|
|
60362
60380
|
}
|
|
60363
60381
|
//#endregion
|
|
60364
60382
|
//#region src/theme/resolve-theme.ts
|
|
60365
|
-
function
|
|
60366
|
-
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 };
|
|
60367
60385
|
if (e.accentColor) try {
|
|
60368
|
-
let t =
|
|
60386
|
+
let t = UW(e.accentColor, n, e.accentColorForeground);
|
|
60369
60387
|
Object.assign(r, t);
|
|
60370
60388
|
} catch {}
|
|
60371
60389
|
if (e.accentColorForeground && !e.accentColor) try {
|
|
60372
|
-
r["--jaw-color-primary-foreground"] =
|
|
60390
|
+
r["--jaw-color-primary-foreground"] = HW(VW(e.accentColorForeground));
|
|
60373
60391
|
} catch {}
|
|
60374
|
-
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({
|
|
60375
60393
|
variables: Object.freeze(r),
|
|
60376
60394
|
colorScheme: n
|
|
60377
60395
|
});
|
|
60378
60396
|
}
|
|
60379
60397
|
//#endregion
|
|
60380
60398
|
//#region src/theme/apply-theme.ts
|
|
60381
|
-
var
|
|
60399
|
+
var GW = {
|
|
60382
60400
|
"--jaw-color-background": "--background",
|
|
60383
60401
|
"--jaw-color-foreground": "--foreground",
|
|
60384
60402
|
"--jaw-color-card": "--card",
|
|
@@ -60405,12 +60423,12 @@ var UW = {
|
|
|
60405
60423
|
"--jaw-color-info": "--info",
|
|
60406
60424
|
"--jaw-color-info-foreground": "--info-foreground"
|
|
60407
60425
|
};
|
|
60408
|
-
function
|
|
60426
|
+
function KW(e, t) {
|
|
60409
60427
|
let n = Object.entries(t.variables);
|
|
60410
60428
|
for (let t = 0; t < n.length; t++) {
|
|
60411
60429
|
let [r, i] = n[t];
|
|
60412
60430
|
e.style.setProperty(r, i);
|
|
60413
|
-
let a =
|
|
60431
|
+
let a = GW[r];
|
|
60414
60432
|
a && e.style.setProperty(a, i);
|
|
60415
60433
|
}
|
|
60416
60434
|
let r = t.variables["--jaw-radius"];
|
|
@@ -60420,19 +60438,19 @@ function WW(e, t) {
|
|
|
60420
60438
|
}
|
|
60421
60439
|
//#endregion
|
|
60422
60440
|
//#region src/theme/use-color-scheme.ts
|
|
60423
|
-
var
|
|
60424
|
-
function
|
|
60441
|
+
var qW = "(prefers-color-scheme: dark)";
|
|
60442
|
+
function JW() {
|
|
60425
60443
|
if (typeof window > "u") return "light";
|
|
60426
60444
|
let e = document.documentElement;
|
|
60427
|
-
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";
|
|
60428
60446
|
}
|
|
60429
|
-
function
|
|
60430
|
-
let [e, t] = z(
|
|
60447
|
+
function YW() {
|
|
60448
|
+
let [e, t] = z(JW);
|
|
60431
60449
|
return at(() => {
|
|
60432
60450
|
if (typeof window > "u") return;
|
|
60433
60451
|
let e = () => {
|
|
60434
|
-
t(
|
|
60435
|
-
}, n = window.matchMedia(
|
|
60452
|
+
t(JW());
|
|
60453
|
+
}, n = window.matchMedia(qW);
|
|
60436
60454
|
n.addEventListener("change", e);
|
|
60437
60455
|
let r = new MutationObserver(e);
|
|
60438
60456
|
return r.observe(document.documentElement, {
|
|
@@ -60445,10 +60463,10 @@ function qW() {
|
|
|
60445
60463
|
}
|
|
60446
60464
|
//#endregion
|
|
60447
60465
|
//#region src/react/ReactUIHandler.tsx
|
|
60448
|
-
function
|
|
60466
|
+
function XW(e) {
|
|
60449
60467
|
return ue.find((t) => t.id === e)?.name || "Unknown Network";
|
|
60450
60468
|
}
|
|
60451
|
-
var
|
|
60469
|
+
var ZW = (e) => (/* @__PURE__ */ new Date(e * 1e3)).toLocaleString("en-US", {
|
|
60452
60470
|
day: "2-digit",
|
|
60453
60471
|
month: "2-digit",
|
|
60454
60472
|
year: "numeric",
|
|
@@ -60456,18 +60474,18 @@ var YW = (e) => (/* @__PURE__ */ new Date(e * 1e3)).toLocaleString("en-US", {
|
|
|
60456
60474
|
minute: "2-digit",
|
|
60457
60475
|
second: "2-digit",
|
|
60458
60476
|
hour12: !1
|
|
60459
|
-
}),
|
|
60460
|
-
function
|
|
60461
|
-
let n =
|
|
60477
|
+
}), QW = jo;
|
|
60478
|
+
function $W({ theme: e, container: t }) {
|
|
60479
|
+
let n = YW();
|
|
60462
60480
|
return at(() => {
|
|
60463
|
-
(!e.mode || e.mode === "auto") &&
|
|
60481
|
+
(!e.mode || e.mode === "auto") && KW(t, WW(e, n));
|
|
60464
60482
|
}, [
|
|
60465
60483
|
n,
|
|
60466
60484
|
e,
|
|
60467
60485
|
t
|
|
60468
60486
|
]), null;
|
|
60469
60487
|
}
|
|
60470
|
-
var
|
|
60488
|
+
var eG = class {
|
|
60471
60489
|
config = {};
|
|
60472
60490
|
localTheme;
|
|
60473
60491
|
constructor(e) {
|
|
@@ -60510,7 +60528,7 @@ var QW = class {
|
|
|
60510
60528
|
WebkitFontSmoothing: "antialiased",
|
|
60511
60529
|
MozOsxFontSmoothing: "grayscale",
|
|
60512
60530
|
WebkitTapHighlightColor: "transparent"
|
|
60513
|
-
}),
|
|
60531
|
+
}), KW(n, WW(this.effectiveTheme, JW())), document.body.appendChild(n);
|
|
60514
60532
|
let r = pt(n), i = () => {
|
|
60515
60533
|
try {
|
|
60516
60534
|
document.body.style.removeProperty("pointer-events"), r.unmount(), n.parentNode && n.parentNode.removeChild(n);
|
|
@@ -60530,7 +60548,7 @@ var QW = class {
|
|
|
60530
60548
|
error: n || jR.userRejected()
|
|
60531
60549
|
});
|
|
60532
60550
|
}), o = this.effectiveTheme;
|
|
60533
|
-
r.render(et.createElement(wo.Provider, { value: n }, et.createElement(
|
|
60551
|
+
r.render(et.createElement(wo.Provider, { value: n }, et.createElement($W, {
|
|
60534
60552
|
theme: o,
|
|
60535
60553
|
container: n
|
|
60536
60554
|
}), a));
|
|
@@ -60558,7 +60576,7 @@ var QW = class {
|
|
|
60558
60576
|
}
|
|
60559
60577
|
renderDialog(e, t, n) {
|
|
60560
60578
|
switch (e.type) {
|
|
60561
|
-
case "wallet_connect": return /* @__PURE__ */ B(
|
|
60579
|
+
case "wallet_connect": return /* @__PURE__ */ B(iG, {
|
|
60562
60580
|
request: e,
|
|
60563
60581
|
onApprove: t,
|
|
60564
60582
|
onReject: n,
|
|
@@ -60569,14 +60587,14 @@ var QW = class {
|
|
|
60569
60587
|
});
|
|
60570
60588
|
case "personal_sign": {
|
|
60571
60589
|
let r = e;
|
|
60572
|
-
return MU(r.data.message) ? /* @__PURE__ */ B(
|
|
60590
|
+
return MU(r.data.message) ? /* @__PURE__ */ B(fG, {
|
|
60573
60591
|
request: r,
|
|
60574
60592
|
onApprove: t,
|
|
60575
60593
|
onReject: n,
|
|
60576
60594
|
apiKey: this.config.apiKey,
|
|
60577
60595
|
defaultChainId: this.config.defaultChainId,
|
|
60578
60596
|
paymasters: this.config.paymasters
|
|
60579
|
-
}) : /* @__PURE__ */ B(
|
|
60597
|
+
}) : /* @__PURE__ */ B(aG, {
|
|
60580
60598
|
request: r,
|
|
60581
60599
|
onApprove: t,
|
|
60582
60600
|
onReject: n,
|
|
@@ -60589,7 +60607,7 @@ var QW = class {
|
|
|
60589
60607
|
let r = e, i = r.data.request.type;
|
|
60590
60608
|
if (i === "0x45") {
|
|
60591
60609
|
let e = r.data.request.data.message;
|
|
60592
|
-
return MU(e) ? /* @__PURE__ */ B(
|
|
60610
|
+
return MU(e) ? /* @__PURE__ */ B(fG, {
|
|
60593
60611
|
request: {
|
|
60594
60612
|
...r,
|
|
60595
60613
|
type: "personal_sign",
|
|
@@ -60604,7 +60622,7 @@ var QW = class {
|
|
|
60604
60622
|
apiKey: this.config.apiKey,
|
|
60605
60623
|
defaultChainId: this.config.defaultChainId,
|
|
60606
60624
|
paymasters: this.config.paymasters
|
|
60607
|
-
}) : /* @__PURE__ */ B(
|
|
60625
|
+
}) : /* @__PURE__ */ B(aG, {
|
|
60608
60626
|
request: {
|
|
60609
60627
|
...r,
|
|
60610
60628
|
type: "personal_sign",
|
|
@@ -60622,7 +60640,7 @@ var QW = class {
|
|
|
60622
60640
|
});
|
|
60623
60641
|
} else if (i === "0x01") {
|
|
60624
60642
|
let e = r.data.request.data, i = typeof e == "string" ? e : JSON.stringify(e);
|
|
60625
|
-
return /* @__PURE__ */ B(
|
|
60643
|
+
return /* @__PURE__ */ B(oG, {
|
|
60626
60644
|
request: {
|
|
60627
60645
|
...r,
|
|
60628
60646
|
type: "eth_signTypedData_v4",
|
|
@@ -60638,12 +60656,12 @@ var QW = class {
|
|
|
60638
60656
|
defaultChainId: this.config.defaultChainId,
|
|
60639
60657
|
paymasters: this.config.paymasters
|
|
60640
60658
|
});
|
|
60641
|
-
} else return /* @__PURE__ */ B(
|
|
60659
|
+
} else return /* @__PURE__ */ B(mG, {
|
|
60642
60660
|
method: `wallet_sign (type: ${i})`,
|
|
60643
60661
|
onReject: n
|
|
60644
60662
|
});
|
|
60645
60663
|
}
|
|
60646
|
-
case "eth_signTypedData_v4": return /* @__PURE__ */ B(
|
|
60664
|
+
case "eth_signTypedData_v4": return /* @__PURE__ */ B(oG, {
|
|
60647
60665
|
request: e,
|
|
60648
60666
|
onApprove: t,
|
|
60649
60667
|
onReject: n,
|
|
@@ -60651,7 +60669,7 @@ var QW = class {
|
|
|
60651
60669
|
defaultChainId: this.config.defaultChainId,
|
|
60652
60670
|
paymasters: this.config.paymasters
|
|
60653
60671
|
});
|
|
60654
|
-
case "wallet_sendCalls": return /* @__PURE__ */ B(
|
|
60672
|
+
case "wallet_sendCalls": return /* @__PURE__ */ B(sG, {
|
|
60655
60673
|
request: e,
|
|
60656
60674
|
onApprove: t,
|
|
60657
60675
|
onReject: n,
|
|
@@ -60659,7 +60677,7 @@ var QW = class {
|
|
|
60659
60677
|
defaultChainId: this.config.defaultChainId,
|
|
60660
60678
|
paymasters: this.config.paymasters
|
|
60661
60679
|
});
|
|
60662
|
-
case "eth_sendTransaction": return /* @__PURE__ */ B(
|
|
60680
|
+
case "eth_sendTransaction": return /* @__PURE__ */ B(cG, {
|
|
60663
60681
|
request: e,
|
|
60664
60682
|
onApprove: t,
|
|
60665
60683
|
onReject: n,
|
|
@@ -60667,7 +60685,7 @@ var QW = class {
|
|
|
60667
60685
|
defaultChainId: this.config.defaultChainId,
|
|
60668
60686
|
paymasters: this.config.paymasters
|
|
60669
60687
|
});
|
|
60670
|
-
case "wallet_grantPermissions": return /* @__PURE__ */ B(
|
|
60688
|
+
case "wallet_grantPermissions": return /* @__PURE__ */ B(dG, {
|
|
60671
60689
|
request: e,
|
|
60672
60690
|
onApprove: t,
|
|
60673
60691
|
onReject: n,
|
|
@@ -60675,7 +60693,7 @@ var QW = class {
|
|
|
60675
60693
|
defaultChainId: this.config.defaultChainId,
|
|
60676
60694
|
paymasters: this.config.paymasters
|
|
60677
60695
|
});
|
|
60678
|
-
case "wallet_revokePermissions": return /* @__PURE__ */ B(
|
|
60696
|
+
case "wallet_revokePermissions": return /* @__PURE__ */ B(pG, {
|
|
60679
60697
|
request: e,
|
|
60680
60698
|
onApprove: t,
|
|
60681
60699
|
onReject: n,
|
|
@@ -60683,24 +60701,24 @@ var QW = class {
|
|
|
60683
60701
|
defaultChainId: this.config.defaultChainId,
|
|
60684
60702
|
paymasters: this.config.paymasters
|
|
60685
60703
|
});
|
|
60686
|
-
default: return /* @__PURE__ */ B(
|
|
60704
|
+
default: return /* @__PURE__ */ B(mG, {
|
|
60687
60705
|
method: e.type,
|
|
60688
60706
|
onReject: n
|
|
60689
60707
|
});
|
|
60690
60708
|
}
|
|
60691
60709
|
}
|
|
60692
60710
|
};
|
|
60693
|
-
function
|
|
60711
|
+
function tG(e, t, n) {
|
|
60694
60712
|
return {
|
|
60695
60713
|
id: e,
|
|
60696
60714
|
rpcUrl: t ? `${S}?chainId=${e}&api-key=${t}` : `${S}?chainId=${e}`,
|
|
60697
60715
|
...n && { paymaster: { url: n } }
|
|
60698
60716
|
};
|
|
60699
60717
|
}
|
|
60700
|
-
function
|
|
60718
|
+
function nG(e) {
|
|
60701
60719
|
return e ? `${S}?chainId=1&api-key=${e}` : `${S}?chainId=1`;
|
|
60702
60720
|
}
|
|
60703
|
-
async function
|
|
60721
|
+
async function rG(e, t, n) {
|
|
60704
60722
|
if (!e) throw Error("API key is required for signing operations");
|
|
60705
60723
|
let r = t || 1;
|
|
60706
60724
|
return await az.get({
|
|
@@ -60709,8 +60727,8 @@ async function tG(e, t, n) {
|
|
|
60709
60727
|
paymasterUrl: n
|
|
60710
60728
|
});
|
|
60711
60729
|
}
|
|
60712
|
-
function
|
|
60713
|
-
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);
|
|
60714
60732
|
at(() => {
|
|
60715
60733
|
d(az.getStoredAccounts(i).map((e) => ({
|
|
60716
60734
|
username: e.username,
|
|
@@ -60821,7 +60839,7 @@ function nG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
|
|
|
60821
60839
|
} catch {
|
|
60822
60840
|
e = j, t = j;
|
|
60823
60841
|
}
|
|
60824
|
-
return
|
|
60842
|
+
return EW({
|
|
60825
60843
|
address: S,
|
|
60826
60844
|
chainId: n(se.chainId),
|
|
60827
60845
|
domain: se.domain || e,
|
|
@@ -60849,7 +60867,7 @@ function nG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
|
|
|
60849
60867
|
if (!(!S || !ce)) {
|
|
60850
60868
|
D(!0), k("Signing message...");
|
|
60851
60869
|
try {
|
|
60852
|
-
let e = await (await
|
|
60870
|
+
let e = await (await rG(i, M, o?.[M]?.url)).signMessage(ce);
|
|
60853
60871
|
k("Sign-in successful!"), t({ accounts: [{
|
|
60854
60872
|
address: S,
|
|
60855
60873
|
capabilities: { signInWithEthereum: {
|
|
@@ -60865,7 +60883,7 @@ function nG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
|
|
|
60865
60883
|
E || (y(!1), x(null), C(null), p(null), k(""));
|
|
60866
60884
|
};
|
|
60867
60885
|
if (v && S && se) if (!ce) console.error("SIWE capability present but message could not be built");
|
|
60868
|
-
else return /* @__PURE__ */ B(
|
|
60886
|
+
else return /* @__PURE__ */ B(pW, {
|
|
60869
60887
|
open: !0,
|
|
60870
60888
|
onOpenChange: (e) => {
|
|
60871
60889
|
e || fe();
|
|
@@ -60879,7 +60897,7 @@ function nG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
|
|
|
60879
60897
|
chainName: N,
|
|
60880
60898
|
chainId: M,
|
|
60881
60899
|
chainIcon: P,
|
|
60882
|
-
mainnetRpcUrl:
|
|
60900
|
+
mainnetRpcUrl: nG(i),
|
|
60883
60901
|
onSign: de,
|
|
60884
60902
|
onCancel: fe,
|
|
60885
60903
|
isProcessing: E,
|
|
@@ -60887,7 +60905,7 @@ function nG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
|
|
|
60887
60905
|
canSign: !E,
|
|
60888
60906
|
warningMessage: le
|
|
60889
60907
|
});
|
|
60890
|
-
return v && S ? /* @__PURE__ */ B(
|
|
60908
|
+
return v && S ? /* @__PURE__ */ B(mW, {
|
|
60891
60909
|
open: !0,
|
|
60892
60910
|
onOpenChange: (e) => {
|
|
60893
60911
|
e || te();
|
|
@@ -60901,12 +60919,12 @@ function nG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
|
|
|
60901
60919
|
chainName: N,
|
|
60902
60920
|
chainId: M,
|
|
60903
60921
|
chainIcon: P,
|
|
60904
|
-
mainnetRpcUrl:
|
|
60922
|
+
mainnetRpcUrl: nG(i),
|
|
60905
60923
|
onConnect: async () => F(),
|
|
60906
60924
|
onCancel: te,
|
|
60907
60925
|
showPermissions: !1,
|
|
60908
60926
|
isProcessing: w
|
|
60909
|
-
}) : /* @__PURE__ */ B(
|
|
60927
|
+
}) : /* @__PURE__ */ B(QW, {
|
|
60910
60928
|
open: c,
|
|
60911
60929
|
onOpenChange: (e) => {
|
|
60912
60930
|
e ? l(e) : ee();
|
|
@@ -60926,18 +60944,18 @@ function nG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
|
|
|
60926
60944
|
isCreating: g,
|
|
60927
60945
|
ensDomain: ie,
|
|
60928
60946
|
chainId: ae,
|
|
60929
|
-
mainnetRpcUrl:
|
|
60947
|
+
mainnetRpcUrl: nG(i),
|
|
60930
60948
|
apiKey: i,
|
|
60931
60949
|
supportedChains: ue.map((e) => ({ id: e.id })),
|
|
60932
60950
|
subnameTextRecords: oe
|
|
60933
60951
|
})
|
|
60934
60952
|
});
|
|
60935
60953
|
}
|
|
60936
|
-
function
|
|
60937
|
-
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 () => {
|
|
60938
60956
|
l(!0), d("Signing message...");
|
|
60939
60957
|
try {
|
|
60940
|
-
let n = await (await
|
|
60958
|
+
let n = await (await rG(r, f, a?.[f]?.url)).signMessage(e.data.message, { address: e.data.address });
|
|
60941
60959
|
d("Signature successful!"), t(n);
|
|
60942
60960
|
} catch (e) {
|
|
60943
60961
|
console.error("Signature failed:", e);
|
|
@@ -60949,7 +60967,7 @@ function rG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
60949
60967
|
}, g = () => {
|
|
60950
60968
|
s(!1), n(jR.userRejected());
|
|
60951
60969
|
};
|
|
60952
|
-
return /* @__PURE__ */ B(
|
|
60970
|
+
return /* @__PURE__ */ B(JU, {
|
|
60953
60971
|
open: o,
|
|
60954
60972
|
onOpenChange: (e) => {
|
|
60955
60973
|
e ? s(e) : g();
|
|
@@ -60961,7 +60979,7 @@ function rG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
60961
60979
|
chainName: p,
|
|
60962
60980
|
chainId: f,
|
|
60963
60981
|
chainIcon: m,
|
|
60964
|
-
mainnetRpcUrl:
|
|
60982
|
+
mainnetRpcUrl: nG(r),
|
|
60965
60983
|
onSign: h,
|
|
60966
60984
|
onCancel: g,
|
|
60967
60985
|
isProcessing: c,
|
|
@@ -60969,11 +60987,11 @@ function rG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
60969
60987
|
canSign: !c && !!e.data.message
|
|
60970
60988
|
});
|
|
60971
60989
|
}
|
|
60972
|
-
function
|
|
60990
|
+
function oG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
|
|
60973
60991
|
let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(""), f = e.data.chainId || i || 1, p = async () => {
|
|
60974
60992
|
l(!0), d("Signing typed data...");
|
|
60975
60993
|
try {
|
|
60976
|
-
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({
|
|
60977
60995
|
domain: i.domain,
|
|
60978
60996
|
types: i.types,
|
|
60979
60997
|
primaryType: i.primaryType,
|
|
@@ -60990,7 +61008,7 @@ function iG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
60990
61008
|
}, m = () => {
|
|
60991
61009
|
s(!1), n(jR.userRejected());
|
|
60992
61010
|
};
|
|
60993
|
-
return /* @__PURE__ */ B(
|
|
61011
|
+
return /* @__PURE__ */ B(xW, {
|
|
60994
61012
|
open: o,
|
|
60995
61013
|
onOpenChange: (e) => {
|
|
60996
61014
|
e ? s(e) : m();
|
|
@@ -60999,7 +61017,7 @@ function iG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
60999
61017
|
origin: typeof window < "u" ? window.location.origin : "unknown",
|
|
61000
61018
|
timestamp: new Date(e.timestamp),
|
|
61001
61019
|
accountAddress: e.data.address,
|
|
61002
|
-
mainnetRpcUrl:
|
|
61020
|
+
mainnetRpcUrl: nG(r),
|
|
61003
61021
|
onSign: p,
|
|
61004
61022
|
onCancel: m,
|
|
61005
61023
|
isProcessing: c,
|
|
@@ -61007,7 +61025,7 @@ function iG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61007
61025
|
canSign: !0
|
|
61008
61026
|
});
|
|
61009
61027
|
}
|
|
61010
|
-
function
|
|
61028
|
+
function sG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
|
|
61011
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, [
|
|
61012
61030
|
e.data.capabilities?.paymasterService?.url,
|
|
61013
61031
|
a,
|
|
@@ -61078,7 +61096,7 @@ function aG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61078
61096
|
t && _(!1);
|
|
61079
61097
|
return;
|
|
61080
61098
|
}
|
|
61081
|
-
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) => {
|
|
61082
61100
|
try {
|
|
61083
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;
|
|
61084
61102
|
return {
|
|
@@ -61125,7 +61143,7 @@ function aG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61125
61143
|
let e = !0;
|
|
61126
61144
|
return (async () => {
|
|
61127
61145
|
try {
|
|
61128
|
-
let t = await
|
|
61146
|
+
let t = await rG(r, v, w);
|
|
61129
61147
|
e && d(t);
|
|
61130
61148
|
} catch (e) {
|
|
61131
61149
|
console.error("Error initializing account:", e);
|
|
@@ -61160,7 +61178,7 @@ function aG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61160
61178
|
}, ne = () => {
|
|
61161
61179
|
s(!1), n(jR.userRejected());
|
|
61162
61180
|
}, re = !E && m.some((e) => !e.isNative);
|
|
61163
|
-
return /* @__PURE__ */ B(
|
|
61181
|
+
return /* @__PURE__ */ B(qU, {
|
|
61164
61182
|
open: o,
|
|
61165
61183
|
onOpenChange: (e) => {
|
|
61166
61184
|
e ? s(e) : ne();
|
|
@@ -61176,7 +61194,7 @@ function aG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61176
61194
|
isProcessing: c,
|
|
61177
61195
|
transactionStatus: f,
|
|
61178
61196
|
networkName: b,
|
|
61179
|
-
mainnetRpcUrl:
|
|
61197
|
+
mainnetRpcUrl: nG(r),
|
|
61180
61198
|
apiKey: r,
|
|
61181
61199
|
feeTokens: m,
|
|
61182
61200
|
feeTokensLoading: g,
|
|
@@ -61187,7 +61205,7 @@ function aG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61187
61205
|
nativeCurrencySymbol: y?.nativeCurrency?.symbol
|
|
61188
61206
|
});
|
|
61189
61207
|
}
|
|
61190
|
-
function
|
|
61208
|
+
function cG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
|
|
61191
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, [
|
|
61192
61210
|
e.data.capabilities?.paymasterService?.url,
|
|
61193
61211
|
a,
|
|
@@ -61257,7 +61275,7 @@ function oG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61257
61275
|
t && _(!1);
|
|
61258
61276
|
return;
|
|
61259
61277
|
}
|
|
61260
|
-
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) => {
|
|
61261
61279
|
try {
|
|
61262
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;
|
|
61263
61281
|
return {
|
|
@@ -61304,7 +61322,7 @@ function oG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61304
61322
|
let e = !0;
|
|
61305
61323
|
return (async () => {
|
|
61306
61324
|
try {
|
|
61307
|
-
let t = await
|
|
61325
|
+
let t = await rG(r, v, w);
|
|
61308
61326
|
e && d(t);
|
|
61309
61327
|
} catch (e) {
|
|
61310
61328
|
console.error("Error initializing account:", e);
|
|
@@ -61333,7 +61351,7 @@ function oG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61333
61351
|
}, L = () => {
|
|
61334
61352
|
s(!1), n(jR.userRejected());
|
|
61335
61353
|
}, ne = !E && m.some((e) => !e.isNative);
|
|
61336
|
-
return /* @__PURE__ */ B(
|
|
61354
|
+
return /* @__PURE__ */ B(qU, {
|
|
61337
61355
|
open: o,
|
|
61338
61356
|
onOpenChange: (e) => {
|
|
61339
61357
|
e ? s(e) : L();
|
|
@@ -61349,7 +61367,7 @@ function oG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61349
61367
|
isProcessing: c,
|
|
61350
61368
|
transactionStatus: f,
|
|
61351
61369
|
networkName: b,
|
|
61352
|
-
mainnetRpcUrl:
|
|
61370
|
+
mainnetRpcUrl: nG(r),
|
|
61353
61371
|
apiKey: r,
|
|
61354
61372
|
feeTokens: m,
|
|
61355
61373
|
feeTokensLoading: g,
|
|
@@ -61360,7 +61378,7 @@ function oG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61360
61378
|
nativeCurrencySymbol: y?.nativeCurrency?.symbol
|
|
61361
61379
|
});
|
|
61362
61380
|
}
|
|
61363
|
-
var
|
|
61381
|
+
var lG = {
|
|
61364
61382
|
"0x32323232": "Any Function",
|
|
61365
61383
|
"0xe0e0e0e0": "Empty Calldata",
|
|
61366
61384
|
"0xcc53287f": "lockdown((address,address)[])",
|
|
@@ -61368,8 +61386,8 @@ var sG = {
|
|
|
61368
61386
|
"0x095ea7b3": "approve(address,uint256)",
|
|
61369
61387
|
"0x23b872dd": "transferFrom(address,address,uint256)",
|
|
61370
61388
|
"0xa9059cbb": "transfer(address,uint256)"
|
|
61371
|
-
},
|
|
61372
|
-
function
|
|
61389
|
+
}, uG = (e) => lG[e.toLowerCase()] || e;
|
|
61390
|
+
function dG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
|
|
61373
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, [
|
|
61374
61392
|
e.data.capabilities?.paymasterService?.url,
|
|
61375
61393
|
a,
|
|
@@ -61427,7 +61445,7 @@ function lG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61427
61445
|
te,
|
|
61428
61446
|
N,
|
|
61429
61447
|
k
|
|
61430
|
-
]), ae = ct(() =>
|
|
61448
|
+
]), ae = ct(() => tG(T, r, re), [
|
|
61431
61449
|
T,
|
|
61432
61450
|
r,
|
|
61433
61451
|
re
|
|
@@ -61522,7 +61540,7 @@ function lG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61522
61540
|
t && S(!1);
|
|
61523
61541
|
return;
|
|
61524
61542
|
}
|
|
61525
|
-
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) => {
|
|
61526
61544
|
try {
|
|
61527
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;
|
|
61528
61546
|
return {
|
|
@@ -61569,7 +61587,7 @@ function lG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61569
61587
|
let e = !0;
|
|
61570
61588
|
return (async () => {
|
|
61571
61589
|
try {
|
|
61572
|
-
let t = await
|
|
61590
|
+
let t = await rG(r, T, A);
|
|
61573
61591
|
e && _(t);
|
|
61574
61592
|
} catch (e) {
|
|
61575
61593
|
console.error("[PermissionDialogWrapper] Error initializing account:", e);
|
|
@@ -61605,8 +61623,8 @@ function lG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61605
61623
|
]), le = ct(() => se.map((e) => ({
|
|
61606
61624
|
target: e.target,
|
|
61607
61625
|
selector: e.selector,
|
|
61608
|
-
functionSignature: e.functionSignature || (e.selector ?
|
|
61609
|
-
})), [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(() => {
|
|
61610
61628
|
let e = [];
|
|
61611
61629
|
if (ce.length > 0) {
|
|
61612
61630
|
let t = ce.map((e) => {
|
|
@@ -61649,7 +61667,7 @@ function lG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61649
61667
|
}, me = () => {
|
|
61650
61668
|
s(!1), n(jR.userRejected());
|
|
61651
61669
|
};
|
|
61652
|
-
return /* @__PURE__ */ B(
|
|
61670
|
+
return /* @__PURE__ */ B(SW, {
|
|
61653
61671
|
open: o,
|
|
61654
61672
|
onOpenChange: (e) => {
|
|
61655
61673
|
e ? s(e) : me();
|
|
@@ -61674,7 +61692,7 @@ function lG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61674
61692
|
gasFeeLoading: ee,
|
|
61675
61693
|
gasEstimationError: F,
|
|
61676
61694
|
sponsored: M,
|
|
61677
|
-
mainnetRpcUrl:
|
|
61695
|
+
mainnetRpcUrl: nG(r),
|
|
61678
61696
|
feeTokens: v,
|
|
61679
61697
|
feeTokensLoading: b,
|
|
61680
61698
|
selectedFeeToken: I,
|
|
@@ -61684,8 +61702,8 @@ function lG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61684
61702
|
nativeCurrencySymbol: E?.nativeCurrency?.symbol
|
|
61685
61703
|
});
|
|
61686
61704
|
}
|
|
61687
|
-
function
|
|
61688
|
-
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(() => {
|
|
61689
61707
|
let t = e.data.message;
|
|
61690
61708
|
if (t.startsWith("0x")) try {
|
|
61691
61709
|
return jU(t);
|
|
@@ -61705,7 +61723,7 @@ function uG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61705
61723
|
}, [g, h]), y = async () => {
|
|
61706
61724
|
l(!0), d("Signing message...");
|
|
61707
61725
|
try {
|
|
61708
|
-
let n = await (await
|
|
61726
|
+
let n = await (await rG(r, f, a?.[f]?.url)).signMessage(e.data.message);
|
|
61709
61727
|
d("Sign-in successful!"), t(n);
|
|
61710
61728
|
} catch (e) {
|
|
61711
61729
|
console.error("SIWE signature failed:", e);
|
|
@@ -61717,7 +61735,7 @@ function uG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61717
61735
|
}, b = () => {
|
|
61718
61736
|
s(!1), n(jR.userRejected());
|
|
61719
61737
|
};
|
|
61720
|
-
return /* @__PURE__ */ B(
|
|
61738
|
+
return /* @__PURE__ */ B(pW, {
|
|
61721
61739
|
open: o,
|
|
61722
61740
|
onOpenChange: (e) => {
|
|
61723
61741
|
e ? s(e) : b();
|
|
@@ -61730,7 +61748,7 @@ function uG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61730
61748
|
chainName: p,
|
|
61731
61749
|
chainId: f,
|
|
61732
61750
|
chainIcon: m,
|
|
61733
|
-
mainnetRpcUrl:
|
|
61751
|
+
mainnetRpcUrl: nG(r),
|
|
61734
61752
|
onSign: y,
|
|
61735
61753
|
onCancel: b,
|
|
61736
61754
|
isProcessing: c,
|
|
@@ -61739,7 +61757,7 @@ function uG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61739
61757
|
warningMessage: v
|
|
61740
61758
|
});
|
|
61741
61759
|
}
|
|
61742
|
-
function
|
|
61760
|
+
function pG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
|
|
61743
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, [
|
|
61744
61762
|
e.data.capabilities?.paymasterService?.url,
|
|
61745
61763
|
a,
|
|
@@ -61792,7 +61810,7 @@ function dG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61792
61810
|
I,
|
|
61793
61811
|
ee,
|
|
61794
61812
|
A
|
|
61795
|
-
]), oe = ct(() =>
|
|
61813
|
+
]), oe = ct(() => tG(E, r, ie), [
|
|
61796
61814
|
E,
|
|
61797
61815
|
r,
|
|
61798
61816
|
ie
|
|
@@ -61879,7 +61897,7 @@ function dG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61879
61897
|
t && T(!1);
|
|
61880
61898
|
return;
|
|
61881
61899
|
}
|
|
61882
|
-
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) => {
|
|
61883
61901
|
try {
|
|
61884
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;
|
|
61885
61903
|
return {
|
|
@@ -61926,7 +61944,7 @@ function dG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61926
61944
|
let e = !0;
|
|
61927
61945
|
return (async () => {
|
|
61928
61946
|
try {
|
|
61929
|
-
let t = await
|
|
61947
|
+
let t = await rG(r, E, j);
|
|
61930
61948
|
e && y(t);
|
|
61931
61949
|
} catch (e) {
|
|
61932
61950
|
console.error("[RevokePermissionDialogWrapper] Error initializing account:", e);
|
|
@@ -61959,8 +61977,8 @@ function dG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61959
61977
|
]), ce = ct(() => m?.calls ? m.calls.map((e) => ({
|
|
61960
61978
|
target: e.target,
|
|
61961
61979
|
selector: e.selector,
|
|
61962
|
-
functionSignature: e.functionSignature || (e.selector ?
|
|
61963
|
-
})) : [], [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 () => {
|
|
61964
61982
|
if (!v) {
|
|
61965
61983
|
console.error("[RevokePermissionDialogWrapper] Account not initialized");
|
|
61966
61984
|
return;
|
|
@@ -61978,7 +61996,7 @@ function dG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61978
61996
|
}, pe = () => {
|
|
61979
61997
|
s(!1), n(jR.userRejected());
|
|
61980
61998
|
};
|
|
61981
|
-
return /* @__PURE__ */ B(
|
|
61999
|
+
return /* @__PURE__ */ B(SW, {
|
|
61982
62000
|
open: o,
|
|
61983
62001
|
onOpenChange: (e) => {
|
|
61984
62002
|
e ? s(e) : pe();
|
|
@@ -61999,7 +62017,7 @@ function dG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61999
62017
|
status: u,
|
|
62000
62018
|
isLoadingTokenInfo: f,
|
|
62001
62019
|
timestamp: new Date(e.timestamp),
|
|
62002
|
-
mainnetRpcUrl:
|
|
62020
|
+
mainnetRpcUrl: nG(r),
|
|
62003
62021
|
gasFee: ee,
|
|
62004
62022
|
gasFeeLoading: F,
|
|
62005
62023
|
gasEstimationError: te,
|
|
@@ -62013,11 +62031,11 @@ function dG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
62013
62031
|
nativeCurrencySymbol: D?.nativeCurrency?.symbol
|
|
62014
62032
|
});
|
|
62015
62033
|
}
|
|
62016
|
-
function
|
|
62034
|
+
function mG({ method: e, onReject: t }) {
|
|
62017
62035
|
let [n, r] = z(!0), [i, a] = z(!1), o = typeof window < "u" ? window.location.origin : "unknown", s = () => {
|
|
62018
62036
|
i || (a(!0), r(!1), t(jR.unsupportedRequest(e)));
|
|
62019
62037
|
};
|
|
62020
|
-
return /* @__PURE__ */ B(
|
|
62038
|
+
return /* @__PURE__ */ B(QW, {
|
|
62021
62039
|
open: n,
|
|
62022
62040
|
onOpenChange: (e) => {
|
|
62023
62041
|
e ? r(e) : s();
|
|
@@ -62082,4 +62100,4 @@ function fG({ method: e, onReject: t }) {
|
|
|
62082
62100
|
});
|
|
62083
62101
|
}
|
|
62084
62102
|
//#endregion
|
|
62085
|
-
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 };
|