@nowramp/form 0.2.0-beta.20 → 0.2.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +954 -925
- package/dist/index.js.map +1 -1
- package/dist/nowramp-form.iife.js +10 -10
- package/dist/nowramp-form.iife.js.map +1 -1
- package/dist/provider-icons/banxa.svg +12 -0
- package/dist/provider-icons/wert.svg +5 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
}`;
|
|
9
9
|
document.head.appendChild(s);
|
|
10
10
|
})();
|
|
11
|
-
import { jsx as e, jsxs as i, Fragment as
|
|
12
|
-
import ke, { useState as
|
|
11
|
+
import { jsx as e, jsxs as i, Fragment as Z } from "react/jsx-runtime";
|
|
12
|
+
import ke, { useState as k, useRef as I, useCallback as O, useEffect as B, useMemo as W, useReducer as tn, useContext as ya, createContext as ga } from "react";
|
|
13
13
|
import { RampApi as gt } from "@nowramp/sdk";
|
|
14
|
-
import { createPortal as
|
|
15
|
-
function
|
|
16
|
-
const [r, o] =
|
|
14
|
+
import { createPortal as oa } from "react-dom";
|
|
15
|
+
function an(t, a, n) {
|
|
16
|
+
const [r, o] = k(null), [s, m] = k(!0), [l, d] = k(null), c = I(null);
|
|
17
17
|
(!c.current || c.current !== t) && (c.current = new gt({ apiKey: "", ...t }));
|
|
18
18
|
const h = O(async () => {
|
|
19
19
|
if (!t.projectId) {
|
|
@@ -22,12 +22,12 @@ function tn(t, a, n) {
|
|
|
22
22
|
}
|
|
23
23
|
m(!0), d(null);
|
|
24
24
|
try {
|
|
25
|
-
const
|
|
26
|
-
a && (
|
|
27
|
-
const f = await c.current.getSupported(
|
|
25
|
+
const p = {};
|
|
26
|
+
a && (p.orderType = a), n && (p.country = n);
|
|
27
|
+
const f = await c.current.getSupported(p);
|
|
28
28
|
o(f);
|
|
29
|
-
} catch (
|
|
30
|
-
d(
|
|
29
|
+
} catch (p) {
|
|
30
|
+
d(p instanceof Error ? p : new Error("Failed to fetch config"));
|
|
31
31
|
} finally {
|
|
32
32
|
m(!1);
|
|
33
33
|
}
|
|
@@ -36,22 +36,22 @@ function tn(t, a, n) {
|
|
|
36
36
|
h();
|
|
37
37
|
}, [h]), { config: r, loading: s, error: l, refetch: h };
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
const [n, r] =
|
|
39
|
+
function nn(t, a) {
|
|
40
|
+
const [n, r] = k(null), [o, s] = k(!1), [m, l] = k(null), d = I(null), c = I(""), h = `${t.apiUrl}|${t.projectId}`;
|
|
41
41
|
(!d.current || c.current !== h) && (d.current = new gt({ apiKey: "", ...t }), c.current = h);
|
|
42
|
-
const
|
|
42
|
+
const p = I(0);
|
|
43
43
|
B(() => {
|
|
44
|
-
const
|
|
44
|
+
const x = ++p.current;
|
|
45
45
|
if (!a || !t.projectId) {
|
|
46
46
|
r(null), s(!1);
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
49
|
s(!0), l(null), d.current.getQuotes(a).then(
|
|
50
|
-
(
|
|
51
|
-
|
|
50
|
+
(S) => {
|
|
51
|
+
p.current === x && (r(S), s(!1));
|
|
52
52
|
},
|
|
53
|
-
(
|
|
54
|
-
|
|
53
|
+
(S) => {
|
|
54
|
+
p.current === x && (l(S instanceof Error ? S : new Error("Failed to fetch quotes")), r(null), s(!1));
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
57
|
}, [t.projectId, a == null ? void 0 : a.fiatCurrency, a == null ? void 0 : a.fiatAmount, a == null ? void 0 : a.cryptoAmount, a == null ? void 0 : a.cryptoCurrency, a == null ? void 0 : a.network, a == null ? void 0 : a.paymentMethodId, a == null ? void 0 : a.country, a == null ? void 0 : a.orderType]);
|
|
@@ -59,10 +59,10 @@ function an(t, a) {
|
|
|
59
59
|
if (!(!a || !t.projectId)) {
|
|
60
60
|
s(!0), l(null);
|
|
61
61
|
try {
|
|
62
|
-
const
|
|
63
|
-
r(
|
|
64
|
-
} catch (
|
|
65
|
-
l(
|
|
62
|
+
const x = await d.current.getQuotes(a);
|
|
63
|
+
r(x);
|
|
64
|
+
} catch (x) {
|
|
65
|
+
l(x instanceof Error ? x : new Error("Failed to fetch quotes"));
|
|
66
66
|
} finally {
|
|
67
67
|
s(!1);
|
|
68
68
|
}
|
|
@@ -70,36 +70,36 @@ function an(t, a) {
|
|
|
70
70
|
}, [t.projectId, a]);
|
|
71
71
|
return { quotes: n, loading: o, error: m, refetch: f };
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
const [a, n] =
|
|
73
|
+
function rn(t) {
|
|
74
|
+
const [a, n] = k(null), [r, o] = k(!1), [s, m] = k(null), l = I(null), d = I(""), c = `${t.apiUrl}|${t.projectId}`;
|
|
75
75
|
(!l.current || d.current !== c) && (l.current = new gt({ apiKey: "", ...t }), d.current = c);
|
|
76
76
|
const h = O(async (f) => {
|
|
77
77
|
o(!0), m(null);
|
|
78
78
|
try {
|
|
79
|
-
const
|
|
80
|
-
return n(
|
|
81
|
-
} catch (
|
|
82
|
-
const
|
|
83
|
-
throw m(
|
|
79
|
+
const x = await l.current.createCheckoutIntent(f);
|
|
80
|
+
return n(x), x;
|
|
81
|
+
} catch (x) {
|
|
82
|
+
const S = x instanceof Error ? x : new Error("Failed to create checkout intent");
|
|
83
|
+
throw m(S), S;
|
|
84
84
|
} finally {
|
|
85
85
|
o(!1);
|
|
86
86
|
}
|
|
87
|
-
}, []),
|
|
87
|
+
}, []), p = O(() => {
|
|
88
88
|
n(null), m(null);
|
|
89
89
|
}, []);
|
|
90
|
-
return { order: a, loading: r, error: s, createOrder: h, reset:
|
|
90
|
+
return { order: a, loading: r, error: s, createOrder: h, reset: p };
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
const [r, o] =
|
|
92
|
+
function on(t, a, n) {
|
|
93
|
+
const [r, o] = k(null), [s, m] = k(!1), [l, d] = k(null), c = I(null);
|
|
94
94
|
c.current || (c.current = new gt({ apiKey: "", projectId: "", ...t }));
|
|
95
95
|
const h = O(async () => {
|
|
96
96
|
if (a) {
|
|
97
97
|
m(!0), d(null);
|
|
98
98
|
try {
|
|
99
|
-
const
|
|
100
|
-
o(
|
|
101
|
-
} catch (
|
|
102
|
-
d(
|
|
99
|
+
const p = await c.current.getTransaction(a);
|
|
100
|
+
o(p);
|
|
101
|
+
} catch (p) {
|
|
102
|
+
d(p instanceof Error ? p : new Error("Failed to fetch status"));
|
|
103
103
|
} finally {
|
|
104
104
|
m(!1);
|
|
105
105
|
}
|
|
@@ -107,9 +107,9 @@ function rn(t, a, n) {
|
|
|
107
107
|
}, [a]);
|
|
108
108
|
return B(() => {
|
|
109
109
|
if (!a) return;
|
|
110
|
-
const
|
|
111
|
-
if (
|
|
112
|
-
const f = setTimeout(h,
|
|
110
|
+
const p = (n == null ? void 0 : n.initialDelay) ?? 0;
|
|
111
|
+
if (p > 0) {
|
|
112
|
+
const f = setTimeout(h, p);
|
|
113
113
|
return () => clearTimeout(f);
|
|
114
114
|
}
|
|
115
115
|
h();
|
|
@@ -312,26 +312,26 @@ const ft = [
|
|
|
312
312
|
{ code: "za", name: "South Africa", defaultFiat: "ZAR" },
|
|
313
313
|
{ code: "zm", name: "Zambia", defaultFiat: "USD" },
|
|
314
314
|
{ code: "zw", name: "Zimbabwe", defaultFiat: "USD" }
|
|
315
|
-
],
|
|
315
|
+
], Ot = Object.fromEntries(
|
|
316
316
|
ft.map((t) => [t.code, t])
|
|
317
317
|
);
|
|
318
|
-
function
|
|
318
|
+
function Dt(t, a) {
|
|
319
319
|
if (!t) return "USD";
|
|
320
|
-
const n =
|
|
320
|
+
const n = Ot[t.toLowerCase()], r = (n == null ? void 0 : n.defaultFiat) || "USD";
|
|
321
321
|
return !a || a.length === 0 || a.includes(r) ? r : a.includes("USD") ? "USD" : a[0] || "USD";
|
|
322
322
|
}
|
|
323
323
|
const xt = !0;
|
|
324
|
-
function
|
|
324
|
+
function Kt(t, a, n = xt) {
|
|
325
325
|
return t === void 0 || a === void 0 ? n : t.length === 0 || a.length === 0 ? !1 : t.some((r) => a.includes(r));
|
|
326
326
|
}
|
|
327
|
-
function on(t, a, n = xt) {
|
|
328
|
-
return t.filter((r) => _t(r.providers, a, n));
|
|
329
|
-
}
|
|
330
327
|
function ln(t, a, n = xt) {
|
|
328
|
+
return t.filter((r) => Kt(r.providers, a, n));
|
|
329
|
+
}
|
|
330
|
+
function cn(t, a, n = xt) {
|
|
331
331
|
const r = [];
|
|
332
332
|
for (const o of t) {
|
|
333
333
|
const s = o.networks.filter(
|
|
334
|
-
(m) =>
|
|
334
|
+
(m) => Kt(m.providers, a, n)
|
|
335
335
|
);
|
|
336
336
|
s.length > 0 && r.push(
|
|
337
337
|
s.length === o.networks.length ? o : { ...o, networks: s }
|
|
@@ -339,12 +339,12 @@ function ln(t, a, n = xt) {
|
|
|
339
339
|
}
|
|
340
340
|
return r;
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function sn(t, a, n, r = xt) {
|
|
343
343
|
return n ? t.filter(
|
|
344
|
-
(o) => o.supportedFiats.includes(n) &&
|
|
344
|
+
(o) => o.supportedFiats.includes(n) && Kt(o.providers, a, r)
|
|
345
345
|
) : [];
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function dn(t, a, n) {
|
|
348
348
|
const r = {};
|
|
349
349
|
let o = !1;
|
|
350
350
|
if (!n.cryptoLocked && !n.networkLocked) {
|
|
@@ -388,7 +388,7 @@ function sn(t, a, n) {
|
|
|
388
388
|
}
|
|
389
389
|
return o ? r : null;
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function un(t, a, n, r) {
|
|
392
392
|
var o, s, m;
|
|
393
393
|
if (n.cryptoLocked) {
|
|
394
394
|
const l = (o = t.cryptos) == null ? void 0 : o.find(
|
|
@@ -410,30 +410,30 @@ function dn(t, a, n, r) {
|
|
|
410
410
|
}
|
|
411
411
|
return !1;
|
|
412
412
|
}
|
|
413
|
-
function
|
|
413
|
+
function ia(t, a) {
|
|
414
414
|
if (!t) return t;
|
|
415
415
|
const n = t.indexOf(".");
|
|
416
416
|
if (n === -1) return t;
|
|
417
417
|
let r = t;
|
|
418
418
|
return r.length - n - 1 > a && (r = r.slice(0, n + a + 1)), r = r.replace(/0+$/, "").replace(/\.$/, ""), r;
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function mn(t, a, n) {
|
|
421
421
|
return !t && !!a && !a.bestQuote && !!n;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function pn(t, a) {
|
|
424
424
|
if (!t.length) return null;
|
|
425
425
|
if (a) {
|
|
426
426
|
const r = t.find((o) => o.gatewayId === a);
|
|
427
427
|
if (r != null && r.reason) return r.reason;
|
|
428
428
|
}
|
|
429
|
-
const n = t.map((r, o) => ({ reason: r.reason, score: r.reason ?
|
|
429
|
+
const n = t.map((r, o) => ({ reason: r.reason, score: r.reason ? hn(r.reason) : 99, idx: o })).filter((r) => r.reason);
|
|
430
430
|
return n.length ? (n.sort((r, o) => r.score - o.score || r.idx - o.idx), n[0].reason) : null;
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function hn(t) {
|
|
433
433
|
const a = t.toLowerCase();
|
|
434
434
|
return /amount|out of range for|minimum|maximum/.test(a) ? 1 : /currency|pair|network|chain/.test(a) ? 2 : /country|region|location/.test(a) ? 3 : /does not support|unsupported/.test(a) ? 4 : 5;
|
|
435
435
|
}
|
|
436
|
-
const
|
|
436
|
+
const fn = ["completed", "failed", "cancelled", "expired", "refunded"], xa = {
|
|
437
437
|
step: "amount",
|
|
438
438
|
flowType: "buy",
|
|
439
439
|
fiatCurrency: "USD",
|
|
@@ -452,7 +452,7 @@ const hn = ["completed", "failed", "cancelled", "expired", "refunded"], va = {
|
|
|
452
452
|
countrySource: "",
|
|
453
453
|
errorMessage: null
|
|
454
454
|
};
|
|
455
|
-
function
|
|
455
|
+
function yn(t, a) {
|
|
456
456
|
var n, r, o, s, m, l, d, c;
|
|
457
457
|
switch (a.type) {
|
|
458
458
|
case "SET_STEP":
|
|
@@ -508,14 +508,14 @@ function fn(t, a) {
|
|
|
508
508
|
case "CLEAR_ERROR":
|
|
509
509
|
return { ...t, errorMessage: null };
|
|
510
510
|
case "RESET":
|
|
511
|
-
return
|
|
511
|
+
return xa;
|
|
512
512
|
default:
|
|
513
513
|
return t;
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
|
-
const
|
|
517
|
-
function
|
|
518
|
-
const a =
|
|
516
|
+
const va = ga(null);
|
|
517
|
+
function gn(t) {
|
|
518
|
+
const a = I(t.defaultFiatCurrency !== void 0), {
|
|
519
519
|
projectId: n,
|
|
520
520
|
apiUrl: r = "https://api.nowramp.com",
|
|
521
521
|
assetBaseUrl: o = "",
|
|
@@ -525,288 +525,288 @@ function yn(t) {
|
|
|
525
525
|
defaultFiatCurrency: d = "USD",
|
|
526
526
|
defaultCryptoCurrency: c = "BTC",
|
|
527
527
|
defaultNetwork: h = "",
|
|
528
|
-
defaultFiatAmount:
|
|
528
|
+
defaultFiatAmount: p = "",
|
|
529
529
|
defaultCryptoAmount: f = "",
|
|
530
|
-
defaultWalletAddress:
|
|
531
|
-
defaultGateway:
|
|
532
|
-
defaultCountry:
|
|
530
|
+
defaultWalletAddress: x = "",
|
|
531
|
+
defaultGateway: S,
|
|
532
|
+
defaultCountry: R,
|
|
533
533
|
fieldLocks: y,
|
|
534
|
-
partnerMetadata:
|
|
535
|
-
statusPollInterval:
|
|
534
|
+
partnerMetadata: E,
|
|
535
|
+
statusPollInterval: K = 5e3,
|
|
536
536
|
onComplete: ee,
|
|
537
|
-
onError:
|
|
537
|
+
onError: z,
|
|
538
538
|
children: ie
|
|
539
|
-
} = t,
|
|
540
|
-
...
|
|
539
|
+
} = t, J = W(() => ({ apiUrl: r, projectId: n }), [r, n]), q = h || (c === "BTC" ? "bitcoin" : c ? c.toLowerCase() : ""), Ce = s === "sell", te = Ce ? !!f : !!p, C = (Ce ? !!(te && c && q) : !!(te && c && q && x)) && S ? "confirm" : "amount", F = p || (s === "buy" ? "250" : ""), [u, D] = tn(yn, {
|
|
540
|
+
...xa,
|
|
541
541
|
step: C,
|
|
542
542
|
flowType: s,
|
|
543
543
|
fiatCurrency: d,
|
|
544
544
|
cryptoCurrency: c,
|
|
545
545
|
network: q,
|
|
546
|
-
fiatAmount:
|
|
547
|
-
cryptoAmount:
|
|
548
|
-
walletAddress:
|
|
546
|
+
fiatAmount: ia(F, 2),
|
|
547
|
+
cryptoAmount: ia(f, 6),
|
|
548
|
+
walletAddress: x,
|
|
549
549
|
customerId: m,
|
|
550
550
|
// If defaultCountry is provided, set it immediately with 'manual' source to skip auto-detection
|
|
551
|
-
...
|
|
552
|
-
}),
|
|
553
|
-
config:
|
|
551
|
+
...R ? { country: R.toLowerCase(), countrySource: "manual" } : {}
|
|
552
|
+
}), N = u.flowType === "sell", {
|
|
553
|
+
config: w,
|
|
554
554
|
loading: ae,
|
|
555
555
|
error: pe
|
|
556
|
-
} =
|
|
556
|
+
} = an(J, u.flowType, u.country || void 0), be = I(!1);
|
|
557
557
|
ke.useEffect(() => {
|
|
558
558
|
var M, U;
|
|
559
|
-
if (be.current || !(
|
|
559
|
+
if (be.current || !(w != null && w.detectedCountry) || u.country) return;
|
|
560
560
|
be.current = !0;
|
|
561
|
-
const v =
|
|
562
|
-
|
|
563
|
-
const A = (M =
|
|
564
|
-
L !==
|
|
565
|
-
}, [
|
|
566
|
-
const Te =
|
|
561
|
+
const v = w.detectedCountry.toLowerCase();
|
|
562
|
+
D({ type: "SET_COUNTRY_AUTO", country: v });
|
|
563
|
+
const A = (M = w.fiats) == null ? void 0 : M.map((_) => _.code), L = Dt(v, A);
|
|
564
|
+
L !== u.fiatCurrency && !((U = y == null ? void 0 : y.sourceCurrency) != null && U.locked) && !a.current && D({ type: "SET_FIAT_CURRENCY", currency: L });
|
|
565
|
+
}, [w, u.country, u.fiatCurrency, y]);
|
|
566
|
+
const Te = I(!1);
|
|
567
567
|
ke.useEffect(() => {
|
|
568
568
|
var L, M;
|
|
569
|
-
if (Te.current || !
|
|
569
|
+
if (Te.current || !R || !((L = w == null ? void 0 : w.fiats) != null && L.length)) return;
|
|
570
570
|
Te.current = !0;
|
|
571
|
-
const v =
|
|
572
|
-
A !==
|
|
573
|
-
}, [
|
|
574
|
-
const he =
|
|
571
|
+
const v = w.fiats.map((U) => U.code), A = Dt(R, v);
|
|
572
|
+
A !== u.fiatCurrency && !((M = y == null ? void 0 : y.sourceCurrency) != null && M.locked) && !a.current && D({ type: "SET_FIAT_CURRENCY", currency: A });
|
|
573
|
+
}, [R, w, u.fiatCurrency, y]);
|
|
574
|
+
const he = I(u.country);
|
|
575
575
|
ke.useEffect(() => {
|
|
576
576
|
var L, M;
|
|
577
|
-
if (
|
|
578
|
-
const v =
|
|
579
|
-
A !==
|
|
580
|
-
}, [
|
|
581
|
-
const le =
|
|
577
|
+
if (u.country === he.current || (he.current = u.country, u.countrySource === "manual" && (_e.current = !1), u.countrySource !== "manual") || !((L = w == null ? void 0 : w.fiats) != null && L.length)) return;
|
|
578
|
+
const v = w.fiats.map((U) => U.code), A = Dt(u.country, v);
|
|
579
|
+
A !== u.fiatCurrency && !((M = y == null ? void 0 : y.sourceCurrency) != null && M.locked) && D({ type: "SET_FIAT_CURRENCY", currency: A });
|
|
580
|
+
}, [u.country, u.countrySource, w, u.fiatCurrency, y]);
|
|
581
|
+
const le = I(u.fiatCurrency);
|
|
582
582
|
ke.useEffect(() => {
|
|
583
583
|
var M;
|
|
584
|
-
if (
|
|
585
|
-
const v =
|
|
584
|
+
if (u.fiatCurrency === le.current || (le.current = u.fiatCurrency, N || !((M = w == null ? void 0 : w.fiats) != null && M.length) || !u.fiatAmount)) return;
|
|
585
|
+
const v = w.fiats.find((U) => U.code === u.fiatCurrency);
|
|
586
586
|
if (!(v != null && v.minAmount)) return;
|
|
587
|
-
const A = parseFloat(
|
|
588
|
-
!isNaN(A) && !isNaN(L) && A < L &&
|
|
589
|
-
}, [
|
|
590
|
-
const { availableFiats: ce, availableCryptos:
|
|
587
|
+
const A = parseFloat(u.fiatAmount), L = parseFloat(v.minAmount);
|
|
588
|
+
!isNaN(A) && !isNaN(L) && A < L && D({ type: "SET_FIAT_AMOUNT", amount: String(Math.ceil(L)) });
|
|
589
|
+
}, [u.fiatCurrency, u.fiatAmount, w, N]);
|
|
590
|
+
const { availableFiats: ce, availableCryptos: X, availablePaymentMethods: fe } = W(() => {
|
|
591
591
|
var L, M, U;
|
|
592
|
-
if (!
|
|
592
|
+
if (!w)
|
|
593
593
|
return { availableFiats: [], availableCryptos: [], availablePaymentMethods: [] };
|
|
594
594
|
let v;
|
|
595
|
-
if (
|
|
596
|
-
const
|
|
597
|
-
!
|
|
595
|
+
if (u.cryptoCurrency && u.network) {
|
|
596
|
+
const _ = (L = w.cryptos) == null ? void 0 : L.find((Se) => Se.code === u.cryptoCurrency), ue = (M = _ == null ? void 0 : _.networks) == null ? void 0 : M.find((Se) => Se.id === u.network);
|
|
597
|
+
!_ || !ue ? v = [] : v = ue.providers;
|
|
598
598
|
}
|
|
599
599
|
let A;
|
|
600
|
-
if (
|
|
601
|
-
const
|
|
602
|
-
|
|
600
|
+
if (u.fiatCurrency) {
|
|
601
|
+
const _ = (U = w.fiats) == null ? void 0 : U.find((ue) => ue.code === u.fiatCurrency);
|
|
602
|
+
_ ? A = _.providers : A = [];
|
|
603
603
|
}
|
|
604
604
|
return {
|
|
605
|
-
availableFiats:
|
|
606
|
-
availableCryptos:
|
|
607
|
-
availablePaymentMethods:
|
|
608
|
-
|
|
605
|
+
availableFiats: ln(w.fiats ?? [], v),
|
|
606
|
+
availableCryptos: cn(w.cryptos ?? [], A),
|
|
607
|
+
availablePaymentMethods: sn(
|
|
608
|
+
w.paymentMethods ?? [],
|
|
609
609
|
v,
|
|
610
|
-
|
|
610
|
+
u.fiatCurrency
|
|
611
611
|
)
|
|
612
612
|
};
|
|
613
|
-
}, [
|
|
613
|
+
}, [w, u.cryptoCurrency, u.network, u.fiatCurrency]), Qe = W(() => {
|
|
614
614
|
var v, A, L;
|
|
615
|
-
return ae || !
|
|
616
|
-
|
|
617
|
-
{ cryptoCurrency:
|
|
615
|
+
return ae || !w ? !1 : un(
|
|
616
|
+
w,
|
|
617
|
+
{ cryptoCurrency: u.cryptoCurrency, network: u.network, fiatCurrency: u.fiatCurrency },
|
|
618
618
|
{
|
|
619
619
|
cryptoLocked: !!((v = y == null ? void 0 : y.destinationCurrency) != null && v.locked),
|
|
620
620
|
networkLocked: !!((A = y == null ? void 0 : y.network) != null && A.locked),
|
|
621
621
|
fiatLocked: !!((L = y == null ? void 0 : y.sourceCurrency) != null && L.locked)
|
|
622
622
|
},
|
|
623
|
-
{ availableFiats: ce, availableCryptos:
|
|
623
|
+
{ availableFiats: ce, availableCryptos: X, availablePaymentMethods: fe }
|
|
624
624
|
);
|
|
625
625
|
}, [
|
|
626
626
|
ae,
|
|
627
|
-
|
|
627
|
+
w,
|
|
628
628
|
y,
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
629
|
+
u.cryptoCurrency,
|
|
630
|
+
u.network,
|
|
631
|
+
u.fiatCurrency,
|
|
632
632
|
ce,
|
|
633
|
-
|
|
633
|
+
X,
|
|
634
634
|
fe
|
|
635
635
|
]);
|
|
636
636
|
ke.useEffect(() => {
|
|
637
637
|
var A, L, M;
|
|
638
|
-
if (ae || ce.length === 0 &&
|
|
639
|
-
const v =
|
|
638
|
+
if (ae || ce.length === 0 && X.length === 0) return;
|
|
639
|
+
const v = dn(
|
|
640
640
|
{
|
|
641
|
-
cryptoCurrency:
|
|
642
|
-
network:
|
|
643
|
-
fiatCurrency:
|
|
644
|
-
paymentMethodId:
|
|
641
|
+
cryptoCurrency: u.cryptoCurrency,
|
|
642
|
+
network: u.network,
|
|
643
|
+
fiatCurrency: u.fiatCurrency,
|
|
644
|
+
paymentMethodId: u.paymentMethodId
|
|
645
645
|
},
|
|
646
|
-
{ availableFiats: ce, availableCryptos:
|
|
646
|
+
{ availableFiats: ce, availableCryptos: X, availablePaymentMethods: fe },
|
|
647
647
|
{
|
|
648
648
|
cryptoLocked: !!((A = y == null ? void 0 : y.destinationCurrency) != null && A.locked),
|
|
649
649
|
networkLocked: !!((L = y == null ? void 0 : y.network) != null && L.locked),
|
|
650
650
|
fiatLocked: !!((M = y == null ? void 0 : y.sourceCurrency) != null && M.locked)
|
|
651
651
|
}
|
|
652
652
|
);
|
|
653
|
-
v && (v.cryptoCurrency !== void 0 &&
|
|
653
|
+
v && (v.cryptoCurrency !== void 0 && D({ type: "SET_CRYPTO_CURRENCY", currency: v.cryptoCurrency }), v.network !== void 0 && D({ type: "SET_NETWORK", network: v.network }), v.fiatCurrency !== void 0 && D({ type: "SET_FIAT_CURRENCY", currency: v.fiatCurrency }), v.paymentMethodId !== void 0 && D({ type: "SET_PAYMENT_METHOD", methodId: v.paymentMethodId }));
|
|
654
654
|
}, [
|
|
655
655
|
ae,
|
|
656
656
|
ce,
|
|
657
|
-
|
|
657
|
+
X,
|
|
658
658
|
fe,
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
659
|
+
u.cryptoCurrency,
|
|
660
|
+
u.network,
|
|
661
|
+
u.fiatCurrency,
|
|
662
|
+
u.paymentMethodId,
|
|
663
663
|
y,
|
|
664
|
-
|
|
664
|
+
D
|
|
665
665
|
]);
|
|
666
666
|
const re = W(() => {
|
|
667
|
-
if (
|
|
668
|
-
if (!
|
|
669
|
-
const U = parseFloat(
|
|
667
|
+
if (N) {
|
|
668
|
+
if (!u.cryptoAmount) return null;
|
|
669
|
+
const U = parseFloat(u.cryptoAmount);
|
|
670
670
|
return isNaN(U) || U <= 0 ? "Enter a valid amount" : null;
|
|
671
671
|
}
|
|
672
|
-
if (!
|
|
673
|
-
const v = parseFloat(
|
|
672
|
+
if (!w || !u.fiatAmount) return null;
|
|
673
|
+
const v = parseFloat(u.fiatAmount);
|
|
674
674
|
if (isNaN(v)) return null;
|
|
675
|
-
const A =
|
|
675
|
+
const A = w.fiats.find((U) => U.code === u.fiatCurrency);
|
|
676
676
|
if (!A) return null;
|
|
677
677
|
const L = parseFloat(A.minAmount), M = parseFloat(A.maxAmount);
|
|
678
|
-
return !isNaN(L) && v < L ? `Minimum amount is ${A.minAmount} ${
|
|
679
|
-
}, [
|
|
680
|
-
const v =
|
|
681
|
-
return !
|
|
682
|
-
fiatCurrency:
|
|
683
|
-
...
|
|
684
|
-
cryptoCurrency:
|
|
685
|
-
network:
|
|
686
|
-
paymentMethodId:
|
|
687
|
-
country:
|
|
688
|
-
orderType:
|
|
678
|
+
return !isNaN(L) && v < L ? `Minimum amount is ${A.minAmount} ${u.fiatCurrency}` : !isNaN(M) && v > M ? `Maximum amount is ${A.maxAmount} ${u.fiatCurrency}` : null;
|
|
679
|
+
}, [w, u.fiatAmount, u.fiatCurrency, u.cryptoAmount, N]), ye = W(() => {
|
|
680
|
+
const v = N ? !!u.cryptoAmount : !!u.fiatAmount;
|
|
681
|
+
return !w || !v || !u.fiatCurrency || !u.cryptoCurrency || !u.network || re || w.detectedCountry && u.countrySource === "" && !R ? null : {
|
|
682
|
+
fiatCurrency: u.fiatCurrency,
|
|
683
|
+
...N ? { cryptoAmount: u.cryptoAmount } : { fiatAmount: u.fiatAmount },
|
|
684
|
+
cryptoCurrency: u.cryptoCurrency,
|
|
685
|
+
network: u.network,
|
|
686
|
+
paymentMethodId: u.paymentMethodId || void 0,
|
|
687
|
+
country: u.country || void 0,
|
|
688
|
+
orderType: u.flowType
|
|
689
689
|
};
|
|
690
|
-
}, [
|
|
690
|
+
}, [w, u.fiatCurrency, u.fiatAmount, u.cryptoAmount, u.cryptoCurrency, u.network, u.paymentMethodId, u.country, u.countrySource, re, N, u.flowType, R]), {
|
|
691
691
|
quotes: G,
|
|
692
692
|
loading: Ke,
|
|
693
693
|
error: ze,
|
|
694
|
-
refetch:
|
|
695
|
-
} =
|
|
694
|
+
refetch: vt
|
|
695
|
+
} = nn(J, ye), se = mn(Ke, G, ye), _e = I(!1);
|
|
696
696
|
ke.useEffect(() => {
|
|
697
697
|
var v;
|
|
698
|
-
_e.current ||
|
|
699
|
-
}, [G, Ke, ze, ye,
|
|
698
|
+
_e.current || u.countrySource === "auto" && ((v = y == null ? void 0 : y.sourceCurrency) != null && v.locked || a.current || Ke || !ye || ze || !G || G.bestQuote || u.fiatCurrency !== "USD" && (_e.current = !0, D({ type: "SET_FIAT_CURRENCY", currency: "USD" }), D({ type: "SET_FIAT_AMOUNT", amount: "250" })));
|
|
699
|
+
}, [G, Ke, ze, ye, u.countrySource, u.fiatCurrency]);
|
|
700
700
|
const {
|
|
701
701
|
order: Le,
|
|
702
|
-
loading:
|
|
702
|
+
loading: Ct,
|
|
703
703
|
error: de,
|
|
704
704
|
createOrder: j
|
|
705
|
-
} =
|
|
706
|
-
status:
|
|
707
|
-
loading:
|
|
708
|
-
} =
|
|
705
|
+
} = rn(J), lt = 15e3, {
|
|
706
|
+
status: $,
|
|
707
|
+
loading: bt
|
|
708
|
+
} = on(
|
|
709
709
|
{ apiUrl: r },
|
|
710
710
|
(Le == null ? void 0 : Le.orderId) ?? null,
|
|
711
|
-
{ pollInterval:
|
|
712
|
-
), Je =
|
|
711
|
+
{ pollInterval: K, initialDelay: lt }
|
|
712
|
+
), Je = I(null);
|
|
713
713
|
ke.useEffect(() => {
|
|
714
|
-
!(
|
|
715
|
-
}, [
|
|
714
|
+
!($ != null && $.status) || !ee || fn.includes($.status) && Je.current !== $.orderId && (Je.current = $.orderId, ee($));
|
|
715
|
+
}, [$ == null ? void 0 : $.status, $ == null ? void 0 : $.orderId, ee]), ke.useEffect(() => {
|
|
716
716
|
const v = pe || de;
|
|
717
|
-
v &&
|
|
718
|
-
}, [pe, de,
|
|
719
|
-
const Fe =
|
|
717
|
+
v && z && z(v);
|
|
718
|
+
}, [pe, de, z]);
|
|
719
|
+
const Fe = S || (w == null ? void 0 : w.defaultGateway) || null, ct = W(() => {
|
|
720
720
|
if (!se || !(G != null && G.unavailableGateways)) return null;
|
|
721
721
|
const v = G.preferredGatewayId || Fe;
|
|
722
|
-
return
|
|
723
|
-
}, [se, G, Fe]), je =
|
|
722
|
+
return pn(G.unavailableGateways, v);
|
|
723
|
+
}, [se, G, Fe]), je = I(Fe);
|
|
724
724
|
je.current = Fe;
|
|
725
|
-
const qe =
|
|
725
|
+
const qe = I(G);
|
|
726
726
|
qe.current = G;
|
|
727
|
-
const et =
|
|
727
|
+
const et = I(l);
|
|
728
728
|
et.current = l;
|
|
729
729
|
const Ue = O(async () => {
|
|
730
730
|
var A, L, M;
|
|
731
|
-
const v = ((A =
|
|
732
|
-
if (!v || !
|
|
733
|
-
const U = [!v && "gateway", !
|
|
734
|
-
|
|
731
|
+
const v = ((A = u.selectedQuote) == null ? void 0 : A.gatewayId) || ((M = (L = qe.current) == null ? void 0 : L.bestQuote) == null ? void 0 : M.gatewayId) || je.current;
|
|
732
|
+
if (!v || !u.walletAddress) {
|
|
733
|
+
const U = [!v && "gateway", !u.walletAddress && "walletAddress"].filter(Boolean).join(", ");
|
|
734
|
+
D({ type: "SET_ERROR", message: `Missing required fields: ${U}` });
|
|
735
735
|
return;
|
|
736
736
|
}
|
|
737
737
|
try {
|
|
738
738
|
await j({
|
|
739
739
|
gateway: v,
|
|
740
|
-
customerId:
|
|
741
|
-
fiatCurrency:
|
|
742
|
-
...
|
|
743
|
-
cryptoCurrency:
|
|
744
|
-
network:
|
|
745
|
-
walletAddress:
|
|
746
|
-
paymentMethodId:
|
|
747
|
-
email:
|
|
748
|
-
orderType:
|
|
740
|
+
customerId: u.customerId || void 0,
|
|
741
|
+
fiatCurrency: u.fiatCurrency,
|
|
742
|
+
...N ? { cryptoAmount: u.cryptoAmount } : { fiatAmount: u.fiatAmount },
|
|
743
|
+
cryptoCurrency: u.cryptoCurrency,
|
|
744
|
+
network: u.network,
|
|
745
|
+
walletAddress: u.walletAddress,
|
|
746
|
+
paymentMethodId: u.paymentMethodId || void 0,
|
|
747
|
+
email: u.email || void 0,
|
|
748
|
+
orderType: u.flowType,
|
|
749
749
|
...et.current ? { metadata: { brand: et.current } } : {},
|
|
750
|
-
...
|
|
751
|
-
}),
|
|
750
|
+
...E && Object.keys(E).length > 0 ? { partnerMetadata: E } : {}
|
|
751
|
+
}), D({ type: "SET_STEP", step: "checkout" });
|
|
752
752
|
} catch (U) {
|
|
753
|
-
const
|
|
754
|
-
/wallet|address/i.test(
|
|
753
|
+
const _ = U instanceof Error ? U.message : "Failed to create order";
|
|
754
|
+
/wallet|address/i.test(_) ? D({ type: "SET_WALLET_ERROR", message: _.replace(/^Failed to create checkout intent:\s*/i, "") }) : D({ type: "SET_ERROR", message: _ });
|
|
755
755
|
}
|
|
756
|
-
}, [
|
|
757
|
-
|
|
758
|
-
}, []),
|
|
759
|
-
const v = ["confirm", "amount", "quotes", "wallet", "checkout", "processing", "complete"], A = v.indexOf(
|
|
760
|
-
A > 0 &&
|
|
761
|
-
}, [
|
|
762
|
-
const v =
|
|
763
|
-
switch (
|
|
756
|
+
}, [u, j, N, E]), tt = O((v) => {
|
|
757
|
+
D({ type: "SET_STEP", step: v });
|
|
758
|
+
}, []), St = O(() => {
|
|
759
|
+
const v = ["confirm", "amount", "quotes", "wallet", "checkout", "processing", "complete"], A = v.indexOf(u.step);
|
|
760
|
+
A > 0 && D({ type: "SET_STEP", step: v[A - 1] });
|
|
761
|
+
}, [u.step, N]), wt = W(() => {
|
|
762
|
+
const v = N ? !!u.cryptoAmount : !!u.fiatAmount;
|
|
763
|
+
switch (u.step) {
|
|
764
764
|
case "confirm":
|
|
765
|
-
return !!(v &&
|
|
765
|
+
return !!(v && u.cryptoCurrency && u.network && u.walletAddress && !re);
|
|
766
766
|
case "amount":
|
|
767
|
-
return !!(v &&
|
|
767
|
+
return !!(v && u.cryptoCurrency && u.network && !re);
|
|
768
768
|
case "quotes":
|
|
769
|
-
return !!
|
|
769
|
+
return !!u.selectedQuote;
|
|
770
770
|
case "wallet":
|
|
771
|
-
return !!
|
|
771
|
+
return !!u.walletAddress;
|
|
772
772
|
default:
|
|
773
773
|
return !1;
|
|
774
774
|
}
|
|
775
|
-
}, [
|
|
776
|
-
apiConfig:
|
|
775
|
+
}, [u, re, N]), st = {
|
|
776
|
+
apiConfig: J,
|
|
777
777
|
assetBaseUrl: o,
|
|
778
|
-
config:
|
|
778
|
+
config: w,
|
|
779
779
|
configLoading: ae,
|
|
780
780
|
configError: pe,
|
|
781
|
-
state:
|
|
782
|
-
dispatch:
|
|
781
|
+
state: u,
|
|
782
|
+
dispatch: D,
|
|
783
783
|
quotes: G,
|
|
784
784
|
quotesLoading: Ke,
|
|
785
785
|
quotesError: ze,
|
|
786
|
-
fetchQuotes:
|
|
786
|
+
fetchQuotes: vt,
|
|
787
787
|
order: Le,
|
|
788
|
-
orderLoading:
|
|
788
|
+
orderLoading: Ct,
|
|
789
789
|
orderError: de,
|
|
790
790
|
createOrder: Ue,
|
|
791
|
-
orderStatus:
|
|
792
|
-
orderStatusLoading:
|
|
791
|
+
orderStatus: $,
|
|
792
|
+
orderStatusLoading: bt,
|
|
793
793
|
fieldLocks: y || null,
|
|
794
794
|
defaultGateway: Fe,
|
|
795
795
|
availableFiats: ce,
|
|
796
|
-
availableCryptos:
|
|
796
|
+
availableCryptos: X,
|
|
797
797
|
availablePaymentMethods: fe,
|
|
798
798
|
selectionUnsupported: Qe,
|
|
799
799
|
quotesEmpty: se,
|
|
800
800
|
bestUnavailableReason: ct,
|
|
801
801
|
amountError: re,
|
|
802
802
|
goToStep: tt,
|
|
803
|
-
goBack:
|
|
804
|
-
canProceed:
|
|
803
|
+
goBack: St,
|
|
804
|
+
canProceed: wt
|
|
805
805
|
};
|
|
806
|
-
return /* @__PURE__ */ e(
|
|
806
|
+
return /* @__PURE__ */ e(va.Provider, { value: st, children: ie });
|
|
807
807
|
}
|
|
808
808
|
function Xe() {
|
|
809
|
-
const t =
|
|
809
|
+
const t = ya(va);
|
|
810
810
|
if (!t)
|
|
811
811
|
throw new Error("useRamp must be used within a RampProvider");
|
|
812
812
|
return t;
|
|
@@ -998,7 +998,7 @@ const it = {
|
|
|
998
998
|
"settings.privacy": "Privacy policy",
|
|
999
999
|
"settings.terms": "Terms of use",
|
|
1000
1000
|
"settings.language": "Language"
|
|
1001
|
-
},
|
|
1001
|
+
}, Ze = [
|
|
1002
1002
|
{ code: "en", name: "English", english: "English" },
|
|
1003
1003
|
{ code: "es", name: "Español", english: "Spanish" },
|
|
1004
1004
|
{ code: "fr", name: "Français", english: "French" },
|
|
@@ -1043,7 +1043,7 @@ const it = {
|
|
|
1043
1043
|
{ code: "gu", name: "ગુજરાતી", english: "Gujarati" },
|
|
1044
1044
|
{ code: "kn", name: "ಕನ್ನಡ", english: "Kannada" },
|
|
1045
1045
|
{ code: "ml", name: "മലയാളം", english: "Malayalam" }
|
|
1046
|
-
],
|
|
1046
|
+
], Ca = ga(null), la = {
|
|
1047
1047
|
en: () => Promise.resolve({ default: it }),
|
|
1048
1048
|
es: () => import("./es-uGwx2mgw.mjs"),
|
|
1049
1049
|
fr: () => import("./fr-DKm8E6xt.mjs"),
|
|
@@ -1089,22 +1089,22 @@ const it = {
|
|
|
1089
1089
|
kn: () => import("./kn-DeVe7dkr.mjs"),
|
|
1090
1090
|
ml: () => import("./ml-DtMzRgQI.mjs")
|
|
1091
1091
|
}, Be = { en: it };
|
|
1092
|
-
function
|
|
1092
|
+
function ba(t, a) {
|
|
1093
1093
|
return a ? t.replace(/\{(\w+)\}/g, (n, r) => {
|
|
1094
1094
|
const o = a[r];
|
|
1095
1095
|
return o !== void 0 ? String(o) : `{${r}}`;
|
|
1096
1096
|
}) : t;
|
|
1097
1097
|
}
|
|
1098
|
-
function
|
|
1098
|
+
function xn({
|
|
1099
1099
|
defaultLocale: t = "en",
|
|
1100
1100
|
children: a
|
|
1101
1101
|
}) {
|
|
1102
|
-
const [n, r] =
|
|
1102
|
+
const [n, r] = k(t), [o, s] = k(Be[t] || it);
|
|
1103
1103
|
B(() => {
|
|
1104
1104
|
if (r(t), Be[t])
|
|
1105
1105
|
s(Be[t]);
|
|
1106
1106
|
else {
|
|
1107
|
-
const c =
|
|
1107
|
+
const c = la[t];
|
|
1108
1108
|
c && c().then((h) => {
|
|
1109
1109
|
Be[t] = h.default, s(h.default);
|
|
1110
1110
|
});
|
|
@@ -1115,36 +1115,36 @@ function gn({
|
|
|
1115
1115
|
s(Be[c]);
|
|
1116
1116
|
return;
|
|
1117
1117
|
}
|
|
1118
|
-
const h =
|
|
1119
|
-
h && h().then((
|
|
1120
|
-
Be[c] =
|
|
1118
|
+
const h = la[c];
|
|
1119
|
+
h && h().then((p) => {
|
|
1120
|
+
Be[c] = p.default, s(p.default);
|
|
1121
1121
|
});
|
|
1122
1122
|
}, []), l = O(
|
|
1123
1123
|
(c, h) => {
|
|
1124
|
-
const
|
|
1125
|
-
return
|
|
1124
|
+
const p = o[c] || it[c] || c;
|
|
1125
|
+
return ba(p, h);
|
|
1126
1126
|
},
|
|
1127
1127
|
[o]
|
|
1128
1128
|
), d = W(
|
|
1129
|
-
() => ({ locale: n, setLocale: m, t: l, languages:
|
|
1129
|
+
() => ({ locale: n, setLocale: m, t: l, languages: Ze }),
|
|
1130
1130
|
[n, m, l]
|
|
1131
1131
|
);
|
|
1132
|
-
return /* @__PURE__ */ e(
|
|
1132
|
+
return /* @__PURE__ */ e(Ca.Provider, { value: d, children: a });
|
|
1133
1133
|
}
|
|
1134
|
-
function
|
|
1135
|
-
const t =
|
|
1134
|
+
function _t() {
|
|
1135
|
+
const t = ya(Ca);
|
|
1136
1136
|
return t || {
|
|
1137
1137
|
locale: "en",
|
|
1138
1138
|
setLocale: () => {
|
|
1139
1139
|
},
|
|
1140
|
-
t: (a, n) =>
|
|
1141
|
-
languages:
|
|
1140
|
+
t: (a, n) => ba(it[a] || a, n),
|
|
1141
|
+
languages: Ze
|
|
1142
1142
|
};
|
|
1143
1143
|
}
|
|
1144
1144
|
function P() {
|
|
1145
|
-
return
|
|
1145
|
+
return _t().t;
|
|
1146
1146
|
}
|
|
1147
|
-
function
|
|
1147
|
+
function vn({
|
|
1148
1148
|
gatewayName: t,
|
|
1149
1149
|
checkoutUrl: a,
|
|
1150
1150
|
onCancel: n,
|
|
@@ -1232,23 +1232,23 @@ function Ee({ size: t = 48 }) {
|
|
|
1232
1232
|
}
|
|
1233
1233
|
);
|
|
1234
1234
|
}
|
|
1235
|
-
function
|
|
1235
|
+
function Cn({
|
|
1236
1236
|
className: t = "",
|
|
1237
1237
|
autoRedirect: a = !1,
|
|
1238
1238
|
redirectDelay: n = 3e3
|
|
1239
1239
|
}) {
|
|
1240
|
-
var
|
|
1241
|
-
const { order: r, orderStatus: o, goToStep: s, goBack: m } = Xe(), l = P(), [d, c] =
|
|
1240
|
+
var x;
|
|
1241
|
+
const { order: r, orderStatus: o, goToStep: s, goBack: m } = Xe(), l = P(), [d, c] = k(!1), [h, p] = k(null), f = r != null && r.checkout.expiresAt ? Date.now() > r.checkout.expiresAt : !1;
|
|
1242
1242
|
if (B(() => {
|
|
1243
1243
|
if ((r == null ? void 0 : r.checkout.method) === "redirect" && a && !f) {
|
|
1244
|
-
|
|
1245
|
-
const
|
|
1244
|
+
p(Math.ceil(n / 1e3));
|
|
1245
|
+
const S = setTimeout(() => {
|
|
1246
1246
|
window.location.href = r.checkout.url;
|
|
1247
|
-
}, n),
|
|
1248
|
-
|
|
1247
|
+
}, n), R = setInterval(() => {
|
|
1248
|
+
p((y) => y && y > 1 ? y - 1 : null);
|
|
1249
1249
|
}, 1e3);
|
|
1250
1250
|
return () => {
|
|
1251
|
-
clearTimeout(
|
|
1251
|
+
clearTimeout(S), clearInterval(R);
|
|
1252
1252
|
};
|
|
1253
1253
|
}
|
|
1254
1254
|
}, [r, a, n, f]), B(() => {
|
|
@@ -1307,8 +1307,8 @@ function vn({
|
|
|
1307
1307
|
}
|
|
1308
1308
|
);
|
|
1309
1309
|
if (r.checkout.method === "iframe") {
|
|
1310
|
-
const
|
|
1311
|
-
return
|
|
1310
|
+
const S = r.checkout.url, R = ((x = r.checkout.allowedFeatures) == null ? void 0 : x.join("; ")) || "payment; camera; microphone; geolocation; clipboard-read; clipboard-write; accelerometer; gyroscope; magnetometer; fullscreen; autoplay; encrypted-media; web-share";
|
|
1311
|
+
return oa(
|
|
1312
1312
|
/* @__PURE__ */ i(
|
|
1313
1313
|
"div",
|
|
1314
1314
|
{
|
|
@@ -1379,14 +1379,14 @@ function vn({
|
|
|
1379
1379
|
/* @__PURE__ */ e(
|
|
1380
1380
|
"iframe",
|
|
1381
1381
|
{
|
|
1382
|
-
src:
|
|
1382
|
+
src: S,
|
|
1383
1383
|
style: {
|
|
1384
1384
|
display: d ? "block" : "none",
|
|
1385
1385
|
width: "100%",
|
|
1386
1386
|
height: "100%",
|
|
1387
1387
|
border: "none"
|
|
1388
1388
|
},
|
|
1389
|
-
allow:
|
|
1389
|
+
allow: R,
|
|
1390
1390
|
onLoad: () => c(!0),
|
|
1391
1391
|
title: l("checkout.iframeTitle")
|
|
1392
1392
|
}
|
|
@@ -1400,7 +1400,7 @@ function vn({
|
|
|
1400
1400
|
}
|
|
1401
1401
|
if (r.checkout.method === "redirect")
|
|
1402
1402
|
return /* @__PURE__ */ e(
|
|
1403
|
-
|
|
1403
|
+
vn,
|
|
1404
1404
|
{
|
|
1405
1405
|
gatewayName: r.gateway,
|
|
1406
1406
|
checkoutUrl: r.checkout.url,
|
|
@@ -1409,8 +1409,8 @@ function vn({
|
|
|
1409
1409
|
}
|
|
1410
1410
|
);
|
|
1411
1411
|
if (r.checkout.method === "widget" && r.widgetConfig) {
|
|
1412
|
-
const
|
|
1413
|
-
return
|
|
1412
|
+
const S = bn(r.checkout.url, r.widgetConfig);
|
|
1413
|
+
return oa(
|
|
1414
1414
|
/* @__PURE__ */ i(
|
|
1415
1415
|
"div",
|
|
1416
1416
|
{
|
|
@@ -1481,7 +1481,7 @@ function vn({
|
|
|
1481
1481
|
/* @__PURE__ */ e(
|
|
1482
1482
|
"iframe",
|
|
1483
1483
|
{
|
|
1484
|
-
src:
|
|
1484
|
+
src: S,
|
|
1485
1485
|
style: {
|
|
1486
1486
|
display: d ? "block" : "none",
|
|
1487
1487
|
width: "100%",
|
|
@@ -1527,13 +1527,13 @@ function vn({
|
|
|
1527
1527
|
}
|
|
1528
1528
|
);
|
|
1529
1529
|
}
|
|
1530
|
-
function
|
|
1530
|
+
function bn(t, a) {
|
|
1531
1531
|
const n = new URL("/en/partner/widget", t);
|
|
1532
1532
|
for (const [r, o] of Object.entries(a))
|
|
1533
1533
|
o != null && o !== "" && n.searchParams.set(r, String(o));
|
|
1534
1534
|
return n.toString();
|
|
1535
1535
|
}
|
|
1536
|
-
function
|
|
1536
|
+
function Sn({ className: t = "" }) {
|
|
1537
1537
|
const { orderStatus: a, orderStatusLoading: n, goToStep: r } = Xe(), o = P();
|
|
1538
1538
|
B(() => {
|
|
1539
1539
|
a && (a.status === "completed" ? r("complete") : ["failed", "cancelled", "expired", "refunded"].includes(a.status) && r("error"));
|
|
@@ -1554,25 +1554,25 @@ function bn({ className: t = "" }) {
|
|
|
1554
1554
|
/* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-3", style: { color: "var(--t-text)" }, children: s() }),
|
|
1555
1555
|
n && /* @__PURE__ */ e("p", { className: "text-[13px] mb-4", style: { color: "var(--t-text-muted)" }, children: o("processing.checkingStatus") }),
|
|
1556
1556
|
a && /* @__PURE__ */ i("div", { className: "w-full mt-6 text-left", style: { background: "var(--t-surface)", borderRadius: "var(--t-card-radius, 20px)", padding: 16 }, children: [
|
|
1557
|
-
/* @__PURE__ */ e(
|
|
1558
|
-
/* @__PURE__ */ e(
|
|
1557
|
+
/* @__PURE__ */ e($e, { label: o("processing.orderId"), value: a.orderId, mono: !0 }),
|
|
1558
|
+
/* @__PURE__ */ e($e, { label: o("processing.provider"), value: a.gateway }),
|
|
1559
1559
|
/* @__PURE__ */ e(
|
|
1560
|
-
|
|
1560
|
+
$e,
|
|
1561
1561
|
{
|
|
1562
1562
|
label: o("processing.amount"),
|
|
1563
1563
|
value: `${a.fiatAmount} ${a.fiatCurrency}`
|
|
1564
1564
|
}
|
|
1565
1565
|
),
|
|
1566
1566
|
/* @__PURE__ */ e(
|
|
1567
|
-
|
|
1567
|
+
$e,
|
|
1568
1568
|
{
|
|
1569
1569
|
label: o("processing.receiving"),
|
|
1570
1570
|
value: `${a.cryptoAmount || "..."} ${a.cryptoCurrency}`
|
|
1571
1571
|
}
|
|
1572
1572
|
),
|
|
1573
|
-
/* @__PURE__ */ e(
|
|
1573
|
+
/* @__PURE__ */ e($e, { label: o("processing.network"), value: a.network }),
|
|
1574
1574
|
/* @__PURE__ */ e(
|
|
1575
|
-
|
|
1575
|
+
$e,
|
|
1576
1576
|
{
|
|
1577
1577
|
label: o("processing.toAddress"),
|
|
1578
1578
|
value: `${a.walletAddress.slice(0, 10)}...${a.walletAddress.slice(-8)}`,
|
|
@@ -1586,7 +1586,7 @@ function bn({ className: t = "" }) {
|
|
|
1586
1586
|
] })
|
|
1587
1587
|
] });
|
|
1588
1588
|
}
|
|
1589
|
-
function
|
|
1589
|
+
function $e({ label: t, value: a, mono: n }) {
|
|
1590
1590
|
return /* @__PURE__ */ i(
|
|
1591
1591
|
"div",
|
|
1592
1592
|
{
|
|
@@ -1606,7 +1606,7 @@ function Ze({ label: t, value: a, mono: n }) {
|
|
|
1606
1606
|
}
|
|
1607
1607
|
);
|
|
1608
1608
|
}
|
|
1609
|
-
function
|
|
1609
|
+
function wn({
|
|
1610
1610
|
className: t = "",
|
|
1611
1611
|
explorerUrl: a,
|
|
1612
1612
|
onDone: n,
|
|
@@ -1631,7 +1631,7 @@ function Sn({
|
|
|
1631
1631
|
return a.replace("{txHash}", o.transactionHash);
|
|
1632
1632
|
}, h = () => {
|
|
1633
1633
|
n ? n() : m({ type: "RESET" });
|
|
1634
|
-
},
|
|
1634
|
+
}, p = c();
|
|
1635
1635
|
return /* @__PURE__ */ i("div", { className: `flex flex-col items-center px-8 py-12 text-center ${t}`, children: [
|
|
1636
1636
|
/* @__PURE__ */ e(
|
|
1637
1637
|
"div",
|
|
@@ -1695,10 +1695,10 @@ function Sn({
|
|
|
1695
1695
|
)
|
|
1696
1696
|
] }),
|
|
1697
1697
|
/* @__PURE__ */ i("div", { className: "w-full flex flex-col gap-2", children: [
|
|
1698
|
-
|
|
1698
|
+
p && /* @__PURE__ */ e(
|
|
1699
1699
|
"a",
|
|
1700
1700
|
{
|
|
1701
|
-
href:
|
|
1701
|
+
href: p,
|
|
1702
1702
|
target: "_blank",
|
|
1703
1703
|
rel: "noopener noreferrer",
|
|
1704
1704
|
className: "w-full font-semibold text-[14px] flex items-center justify-center transition-all",
|
|
@@ -1738,14 +1738,14 @@ function Ne({ label: t, value: a, mono: n, highlight: r }) {
|
|
|
1738
1738
|
}
|
|
1739
1739
|
);
|
|
1740
1740
|
}
|
|
1741
|
-
function
|
|
1741
|
+
function kn({
|
|
1742
1742
|
className: t = "",
|
|
1743
1743
|
onRetry: a,
|
|
1744
1744
|
onDone: n,
|
|
1745
1745
|
doneButtonText: r,
|
|
1746
1746
|
supportEmail: o = "support@nowramp.com"
|
|
1747
1747
|
}) {
|
|
1748
|
-
const { state: s, orderStatus: m, dispatch: l, goToStep: d } = Xe(), c = P(), h = s.flowType === "sell",
|
|
1748
|
+
const { state: s, orderStatus: m, dispatch: l, goToStep: d } = Xe(), c = P(), h = s.flowType === "sell", p = () => {
|
|
1749
1749
|
if (m)
|
|
1750
1750
|
switch (m.status) {
|
|
1751
1751
|
case "failed":
|
|
@@ -1776,9 +1776,9 @@ function wn({
|
|
|
1776
1776
|
return c("errorStep.genericDesc");
|
|
1777
1777
|
}
|
|
1778
1778
|
return c("errorStep.genericDesc");
|
|
1779
|
-
},
|
|
1779
|
+
}, x = () => {
|
|
1780
1780
|
l({ type: "CLEAR_ERROR" }), a ? a() : (l({ type: "RESET" }), d("amount"));
|
|
1781
|
-
},
|
|
1781
|
+
}, S = () => {
|
|
1782
1782
|
l({ type: "RESET" }), d("amount");
|
|
1783
1783
|
};
|
|
1784
1784
|
return /* @__PURE__ */ i("div", { className: `flex flex-col items-center px-8 py-12 text-center ${t}`, children: [
|
|
@@ -1790,7 +1790,7 @@ function wn({
|
|
|
1790
1790
|
children: /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", width: "32", height: "32", fill: "white", children: /* @__PURE__ */ e("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" }) })
|
|
1791
1791
|
}
|
|
1792
1792
|
),
|
|
1793
|
-
/* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children:
|
|
1793
|
+
/* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children: p() }),
|
|
1794
1794
|
/* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: f() }),
|
|
1795
1795
|
m && /* @__PURE__ */ e("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: "var(--t-card-radius, 20px)", padding: 16 }, children: /* @__PURE__ */ i("div", { className: "flex justify-between items-center py-2", children: [
|
|
1796
1796
|
/* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: c("errorStep.orderId") }),
|
|
@@ -1802,7 +1802,7 @@ function wn({
|
|
|
1802
1802
|
{
|
|
1803
1803
|
className: "w-full font-semibold text-[16px] transition-all",
|
|
1804
1804
|
style: { height: 60, borderRadius: "var(--t-cta-radius, 100px)", background: "var(--t-cta-bg)", color: "var(--t-cta-text)" },
|
|
1805
|
-
onClick:
|
|
1805
|
+
onClick: x,
|
|
1806
1806
|
children: c("errorStep.tryAgain")
|
|
1807
1807
|
}
|
|
1808
1808
|
),
|
|
@@ -1811,7 +1811,7 @@ function wn({
|
|
|
1811
1811
|
{
|
|
1812
1812
|
className: "w-full font-semibold text-[14px] transition-all",
|
|
1813
1813
|
style: { height: 48, borderRadius: "var(--t-cta-radius, 100px)", background: "var(--t-surface)", color: "var(--t-text)" },
|
|
1814
|
-
onClick:
|
|
1814
|
+
onClick: S,
|
|
1815
1815
|
children: c("errorStep.startOver")
|
|
1816
1816
|
}
|
|
1817
1817
|
),
|
|
@@ -2012,7 +2012,7 @@ const ot = {
|
|
|
2012
2012
|
OKC: { name: "OKX Chain", icon: "eth" },
|
|
2013
2013
|
UNI_CHAIN: { name: "UNI", icon: "uni" },
|
|
2014
2014
|
ZEC: { name: "ZCash", icon: "zec" }
|
|
2015
|
-
},
|
|
2015
|
+
}, Sa = [
|
|
2016
2016
|
// --- Popular / Top coins ---
|
|
2017
2017
|
{ code: "BTC", name: "Bitcoin", chains: ["BTC", "LN"], popular: !0 },
|
|
2018
2018
|
{ code: "ETH", name: "Ethereum", chains: ["ETH", "ARB", "BASE", "BSC", "OPTIMISM", "LINEA", "ZKSYNC", "LRC", "STARK", "APE", "ECLIPSE", "FUEL", "INK", "SOPHON", "UNICHAIN", "WLD"], popular: !0 },
|
|
@@ -2205,9 +2205,9 @@ const ot = {
|
|
|
2205
2205
|
{ code: "ZCHF", name: "Frankencoin", chains: ["ETH"], popular: !1 },
|
|
2206
2206
|
{ code: "ZETA", name: "Zeta", chains: ["ETH", "ZETACHAIN"], popular: !1 },
|
|
2207
2207
|
{ code: "ZTG", name: "Zeitgeist", chains: ["ZTG"], popular: !1 }
|
|
2208
|
-
],
|
|
2209
|
-
|
|
2210
|
-
),
|
|
2208
|
+
], Nn = Object.fromEntries(
|
|
2209
|
+
Sa.map((t) => [t.code, t.name])
|
|
2210
|
+
), En = {
|
|
2211
2211
|
AED: "ae",
|
|
2212
2212
|
ALL: "al",
|
|
2213
2213
|
ARS: "ar",
|
|
@@ -2242,21 +2242,24 @@ const ot = {
|
|
|
2242
2242
|
VND: "vn",
|
|
2243
2243
|
ZAR: "za"
|
|
2244
2244
|
};
|
|
2245
|
-
function
|
|
2245
|
+
function wa(t, a = "") {
|
|
2246
2246
|
return `${a}/crypto-icons/${t.toLowerCase()}.svg`;
|
|
2247
2247
|
}
|
|
2248
|
-
function
|
|
2249
|
-
const n =
|
|
2248
|
+
function Rn(t, a = "") {
|
|
2249
|
+
const n = En[t] || "us";
|
|
2250
2250
|
return `${a}/flags/${n}.svg`;
|
|
2251
2251
|
}
|
|
2252
2252
|
function yt(t) {
|
|
2253
2253
|
return ot[t] || ot[t.toLowerCase()] || ot[t.toUpperCase()] || ot[t.toUpperCase().replace(/-/g, "_")] || ot[t.toLowerCase().replace(/-/g, "_")];
|
|
2254
2254
|
}
|
|
2255
|
-
function
|
|
2255
|
+
function ka(t, a = "") {
|
|
2256
|
+
return `${a}/provider-icons/${t.toLowerCase()}.svg`;
|
|
2257
|
+
}
|
|
2258
|
+
function Mt(t, a = "") {
|
|
2256
2259
|
const n = yt(t);
|
|
2257
2260
|
return n ? `${a}/crypto-icons/${n.icon}.svg` : `${a}/crypto-icons/${t.toLowerCase()}.svg`;
|
|
2258
2261
|
}
|
|
2259
|
-
const
|
|
2262
|
+
const ca = [
|
|
2260
2263
|
{ code: "ALL", name: "Albania Lek" },
|
|
2261
2264
|
{ code: "ARS", name: "Argentina Peso" },
|
|
2262
2265
|
{ code: "AUD", name: "Australian Dollar" },
|
|
@@ -2269,14 +2272,14 @@ const sa = [
|
|
|
2269
2272
|
{ code: "CHF", name: "Swiss Franc" },
|
|
2270
2273
|
{ code: "MXN", name: "Mexican Peso" },
|
|
2271
2274
|
{ code: "INR", name: "Indian Rupee" }
|
|
2272
|
-
],
|
|
2275
|
+
], sa = [
|
|
2273
2276
|
{ id: "blue", name: "Blue", accent: "#0077FF" },
|
|
2274
2277
|
{ id: "violet", name: "Violet", accent: "#7C3AED" },
|
|
2275
2278
|
{ id: "green", name: "Green", accent: "#10B981" },
|
|
2276
2279
|
{ id: "orange", name: "Orange", accent: "#F59E0B" },
|
|
2277
2280
|
{ id: "rose", name: "Rose", accent: "#F43F5E" },
|
|
2278
2281
|
{ id: "mono", name: "Mono", accent: null }
|
|
2279
|
-
],
|
|
2282
|
+
], da = {
|
|
2280
2283
|
USDC: { USD: 0.9962, EUR: 1.0814, GBP: 1.2573, JPY: 667e-5, CAD: 0.7198, AUD: 0.6384, BRL: 0.1726, CHF: 1.1306, MXN: 0.0487, INR: 0.01187, ARS: 855e-6, ALL: 0.01058 },
|
|
2281
2284
|
USDT: { USD: 0.9958, EUR: 1.081, GBP: 1.2568, JPY: 666e-5, CAD: 0.7194, AUD: 0.638, BRL: 0.1724, CHF: 1.1301, MXN: 0.0486, INR: 0.01186, ARS: 854e-6, ALL: 0.01057 },
|
|
2282
2285
|
BTC: { USD: 104e-7, EUR: 1129e-8, GBP: 1313e-8, JPY: 696e-10, CAD: 751e-8, AUD: 666e-8, BRL: 18e-7, CHF: 118e-7, MXN: 508e-9, INR: 124e-9, ARS: 892e-11, ALL: 11e-8 },
|
|
@@ -2285,7 +2288,7 @@ const sa = [
|
|
|
2285
2288
|
XRP: { USD: 0.4081, EUR: 0.4432, GBP: 0.5153, JPY: 273e-5, CAD: 0.2948, AUD: 0.2614, BRL: 0.0707, CHF: 0.463, MXN: 0.01992, INR: 486e-5, ARS: 35e-5, ALL: 433e-5 },
|
|
2286
2289
|
DOGE: { USD: 3.896, EUR: 4.232, GBP: 4.92, JPY: 0.02607, CAD: 2.815, AUD: 2.496, BRL: 0.675, CHF: 4.421, MXN: 0.1902, INR: 0.04641, ARS: 3345e-6, ALL: 0.04134 },
|
|
2287
2290
|
ADA: { USD: 1.333, EUR: 1.448, GBP: 1.683, JPY: 892e-5, CAD: 0.963, AUD: 0.854, BRL: 0.2309, CHF: 1.512, MXN: 0.0651, INR: 0.01588, ARS: 1145e-6, ALL: 0.01414 }
|
|
2288
|
-
},
|
|
2291
|
+
}, An = /* @__PURE__ */ new Set([
|
|
2289
2292
|
"USDC",
|
|
2290
2293
|
"USDT",
|
|
2291
2294
|
"DAI",
|
|
@@ -2313,16 +2316,16 @@ const sa = [
|
|
|
2313
2316
|
"ZCHF"
|
|
2314
2317
|
]);
|
|
2315
2318
|
function Na(t) {
|
|
2316
|
-
return
|
|
2319
|
+
return An.has(t.toUpperCase());
|
|
2317
2320
|
}
|
|
2318
|
-
function
|
|
2321
|
+
function Ir(t, a) {
|
|
2319
2322
|
var n, r;
|
|
2320
|
-
return ((n =
|
|
2323
|
+
return ((n = da[t]) == null ? void 0 : n[a]) ?? ((r = da.USDC) == null ? void 0 : r[a]) ?? 1;
|
|
2321
2324
|
}
|
|
2322
|
-
function
|
|
2325
|
+
function Tn(t) {
|
|
2323
2326
|
return parseFloat(t.replace(/,/g, "")) || 0;
|
|
2324
2327
|
}
|
|
2325
|
-
function
|
|
2328
|
+
function Bt(t) {
|
|
2326
2329
|
if (t === 0) return "0";
|
|
2327
2330
|
if (t >= 1e3) return t.toLocaleString("en-US", { maximumFractionDigits: 2 });
|
|
2328
2331
|
if (t >= 1) return t.toFixed(2);
|
|
@@ -2330,18 +2333,18 @@ function Ht(t) {
|
|
|
2330
2333
|
const a = t.toPrecision(4);
|
|
2331
2334
|
return parseFloat(a).toString();
|
|
2332
2335
|
}
|
|
2333
|
-
const ve = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t),
|
|
2336
|
+
const ve = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t), ua = 10, ma = 1e-4, Ln = (() => {
|
|
2334
2337
|
const t = [];
|
|
2335
|
-
for (const a of
|
|
2338
|
+
for (const a of Sa)
|
|
2336
2339
|
for (const n of a.chains)
|
|
2337
2340
|
t.push({ code: a.code, name: a.name, chain: n, popular: a.popular });
|
|
2338
2341
|
return t;
|
|
2339
2342
|
})();
|
|
2340
|
-
function
|
|
2343
|
+
function pa(t) {
|
|
2341
2344
|
return t.length <= 12 ? t : `${t.slice(0, 6)}...${t.slice(-6)}`;
|
|
2342
2345
|
}
|
|
2343
|
-
function
|
|
2344
|
-
var
|
|
2346
|
+
function Fn({ className: t = "", stablecoinParity: a, partnerName: n }) {
|
|
2347
|
+
var J;
|
|
2345
2348
|
const {
|
|
2346
2349
|
config: r,
|
|
2347
2350
|
configLoading: o,
|
|
@@ -2351,47 +2354,47 @@ function Ln({ className: t = "", stablecoinParity: a, partnerName: n }) {
|
|
|
2351
2354
|
fetchQuotes: d,
|
|
2352
2355
|
createOrder: c,
|
|
2353
2356
|
orderLoading: h
|
|
2354
|
-
} = Xe(),
|
|
2355
|
-
|
|
2357
|
+
} = Xe(), p = P(), f = s.flowType === "sell", [x, S] = k(null), R = r == null ? void 0 : r.gateways.find((q) => q.id === m), y = (J = l == null ? void 0 : l.bestQuote) != null && J.exchangeRate ? parseFloat(l.bestQuote.exchangeRate) : null, E = parseFloat(s.fiatAmount) || 0, K = !!(a && n && !f && Na(s.cryptoCurrency) && y), ee = K && s.cryptoCurrency.toUpperCase().includes(s.fiatCurrency.toUpperCase()), z = K && E > 0 ? Bt(ee ? E : E / y) : null, ie = async () => {
|
|
2358
|
+
S(null);
|
|
2356
2359
|
try {
|
|
2357
2360
|
d(), await c();
|
|
2358
2361
|
} catch (q) {
|
|
2359
|
-
const Ce = q instanceof Error ? q.message :
|
|
2360
|
-
|
|
2362
|
+
const Ce = q instanceof Error ? q.message : p("error.createOrderFailed");
|
|
2363
|
+
S(Ce);
|
|
2361
2364
|
}
|
|
2362
2365
|
};
|
|
2363
2366
|
return o ? /* @__PURE__ */ i("div", { className: `flex flex-col items-center justify-center p-12 ${t}`, children: [
|
|
2364
2367
|
/* @__PURE__ */ e(Ee, { size: 32 }),
|
|
2365
|
-
/* @__PURE__ */ e("p", { className: "text-[14px] mt-4", style: { color: "var(--t-text-secondary)" }, children:
|
|
2368
|
+
/* @__PURE__ */ e("p", { className: "text-[14px] mt-4", style: { color: "var(--t-text-secondary)" }, children: p("confirm.loading") })
|
|
2366
2369
|
] }) : /* @__PURE__ */ i("div", { className: `flex flex-col items-center px-8 py-12 ${t}`, children: [
|
|
2367
|
-
/* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-6", style: { color: "var(--t-text)" }, children:
|
|
2370
|
+
/* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-6", style: { color: "var(--t-text)" }, children: p(f ? "confirm.sellTitle" : "confirm.buyTitle") }),
|
|
2368
2371
|
/* @__PURE__ */ i("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: "var(--t-card-radius, 20px)", padding: 16 }, children: [
|
|
2369
|
-
|
|
2370
|
-
/* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children:
|
|
2372
|
+
R && /* @__PURE__ */ i("div", { className: "flex justify-between items-center py-2", style: { borderBottom: "1px solid var(--t-divider)" }, children: [
|
|
2373
|
+
/* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: p("confirm.provider") }),
|
|
2371
2374
|
/* @__PURE__ */ i("span", { className: "flex items-center gap-2", children: [
|
|
2372
|
-
|
|
2373
|
-
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children:
|
|
2375
|
+
R.logo && /* @__PURE__ */ e("img", { src: R.logo, alt: R.name, width: 20, height: 20, style: { borderRadius: 4 } }),
|
|
2376
|
+
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: R.name })
|
|
2374
2377
|
] })
|
|
2375
2378
|
] }),
|
|
2376
|
-
f ? /* @__PURE__ */ i(
|
|
2377
|
-
/* @__PURE__ */ e(He, { label:
|
|
2378
|
-
/* @__PURE__ */ e(He, { label:
|
|
2379
|
-
] }) : /* @__PURE__ */ i(
|
|
2380
|
-
/* @__PURE__ */ e(He, { label:
|
|
2379
|
+
f ? /* @__PURE__ */ i(Z, { children: [
|
|
2380
|
+
/* @__PURE__ */ e(He, { label: p("confirm.youSell"), value: `${s.cryptoAmount} ${s.cryptoCurrency}`, highlight: !0 }),
|
|
2381
|
+
/* @__PURE__ */ e(He, { label: p("confirm.youReceive"), value: p("confirm.payout", { currency: s.fiatCurrency }) })
|
|
2382
|
+
] }) : /* @__PURE__ */ i(Z, { children: [
|
|
2383
|
+
/* @__PURE__ */ e(He, { label: p("confirm.youPay"), value: `${s.fiatAmount} ${s.fiatCurrency}`, highlight: !0 }),
|
|
2381
2384
|
/* @__PURE__ */ e(
|
|
2382
2385
|
He,
|
|
2383
2386
|
{
|
|
2384
|
-
label:
|
|
2385
|
-
value:
|
|
2387
|
+
label: p("confirm.youReceive"),
|
|
2388
|
+
value: z ? `${z} ${s.cryptoCurrency}` : p("confirm.cryptoOnNetwork", { crypto: s.cryptoCurrency, network: s.network })
|
|
2386
2389
|
}
|
|
2387
2390
|
),
|
|
2388
|
-
/* @__PURE__ */ e(He, { label:
|
|
2389
|
-
|
|
2391
|
+
/* @__PURE__ */ e(He, { label: p("confirm.wallet"), value: pa(s.walletAddress), mono: !0 }),
|
|
2392
|
+
K && z && /* @__PURE__ */ e("div", { className: "py-2 text-[11px]", style: { color: "var(--t-text-muted)", lineHeight: "15px" }, children: p("confirm.parityNote", { amount: z, crypto: s.cryptoCurrency, partner: n }) })
|
|
2390
2393
|
] }),
|
|
2391
|
-
/* @__PURE__ */ e(He, { label:
|
|
2392
|
-
f && s.walletAddress && /* @__PURE__ */ e(He, { label:
|
|
2394
|
+
/* @__PURE__ */ e(He, { label: p("confirm.network"), value: s.network }),
|
|
2395
|
+
f && s.walletAddress && /* @__PURE__ */ e(He, { label: p("confirm.refundAddress"), value: pa(s.walletAddress), mono: !0 })
|
|
2393
2396
|
] }),
|
|
2394
|
-
|
|
2397
|
+
x && /* @__PURE__ */ e("p", { className: "text-[12px] mb-4", style: { color: "#EF4444" }, children: x }),
|
|
2395
2398
|
/* @__PURE__ */ e(
|
|
2396
2399
|
"button",
|
|
2397
2400
|
{
|
|
@@ -2399,10 +2402,10 @@ function Ln({ className: t = "", stablecoinParity: a, partnerName: n }) {
|
|
|
2399
2402
|
style: { height: 60, borderRadius: "var(--t-cta-radius, 100px)", background: "var(--t-cta-bg)", color: "var(--t-cta-text)", opacity: h ? 0.7 : 1 },
|
|
2400
2403
|
disabled: h,
|
|
2401
2404
|
onClick: ie,
|
|
2402
|
-
children: h ? /* @__PURE__ */ i(
|
|
2405
|
+
children: h ? /* @__PURE__ */ i(Z, { children: [
|
|
2403
2406
|
/* @__PURE__ */ e(Ee, { size: 18 }),
|
|
2404
|
-
|
|
2405
|
-
] }) :
|
|
2407
|
+
p("confirm.processing")
|
|
2408
|
+
] }) : p(f ? "confirm.confirmSell" : "confirm.confirmPay")
|
|
2406
2409
|
}
|
|
2407
2410
|
)
|
|
2408
2411
|
] });
|
|
@@ -2426,14 +2429,14 @@ function Pe({
|
|
|
2426
2429
|
children: n,
|
|
2427
2430
|
variant: r = "bottom"
|
|
2428
2431
|
}) {
|
|
2429
|
-
const [o, s] =
|
|
2432
|
+
const [o, s] = k(!1), [m, l] = k(!1);
|
|
2430
2433
|
B(() => {
|
|
2431
2434
|
if (t)
|
|
2432
2435
|
s(!0), requestAnimationFrame(() => requestAnimationFrame(() => l(!0)));
|
|
2433
2436
|
else if (o) {
|
|
2434
2437
|
l(!1);
|
|
2435
|
-
const
|
|
2436
|
-
return () => clearTimeout(
|
|
2438
|
+
const p = setTimeout(() => s(!1), 250);
|
|
2439
|
+
return () => clearTimeout(p);
|
|
2437
2440
|
}
|
|
2438
2441
|
}, [t]);
|
|
2439
2442
|
const d = O(() => {
|
|
@@ -2441,10 +2444,10 @@ function Pe({
|
|
|
2441
2444
|
}, [a]);
|
|
2442
2445
|
return B(() => {
|
|
2443
2446
|
if (!t) return;
|
|
2444
|
-
const
|
|
2447
|
+
const p = (f) => {
|
|
2445
2448
|
f.key === "Escape" && d();
|
|
2446
2449
|
};
|
|
2447
|
-
return window.addEventListener("keydown",
|
|
2450
|
+
return window.addEventListener("keydown", p), () => window.removeEventListener("keydown", p);
|
|
2448
2451
|
}, [t, d]), o ? /* @__PURE__ */ e(
|
|
2449
2452
|
"div",
|
|
2450
2453
|
{
|
|
@@ -2461,40 +2464,40 @@ function Pe({
|
|
|
2461
2464
|
}
|
|
2462
2465
|
) : null;
|
|
2463
2466
|
}
|
|
2464
|
-
function
|
|
2467
|
+
function Q({
|
|
2465
2468
|
w: t,
|
|
2466
2469
|
h: a,
|
|
2467
2470
|
className: n = ""
|
|
2468
2471
|
}) {
|
|
2469
2472
|
return /* @__PURE__ */ e("div", { className: `skeleton ${n}`, style: { width: t, height: a } });
|
|
2470
2473
|
}
|
|
2471
|
-
function
|
|
2474
|
+
function Un() {
|
|
2472
2475
|
const t = P();
|
|
2473
2476
|
return /* @__PURE__ */ i("div", { className: "flex-1 px-5 flex flex-col", children: [
|
|
2474
2477
|
/* @__PURE__ */ i("div", { className: "px-[18px] pt-[14px] pb-[18px]", style: { background: "var(--t-surface)", borderRadius: 5 }, children: [
|
|
2475
|
-
/* @__PURE__ */ e(
|
|
2478
|
+
/* @__PURE__ */ e(Q, { w: 70, h: 14, className: "mb-3" }),
|
|
2476
2479
|
/* @__PURE__ */ i("div", { className: "flex justify-between items-center", children: [
|
|
2477
|
-
/* @__PURE__ */ e(
|
|
2478
|
-
/* @__PURE__ */ e(
|
|
2480
|
+
/* @__PURE__ */ e(Q, { w: 120, h: 32 }),
|
|
2481
|
+
/* @__PURE__ */ e(Q, { w: 75, h: 32 })
|
|
2479
2482
|
] })
|
|
2480
2483
|
] }),
|
|
2481
2484
|
/* @__PURE__ */ i("div", { className: "px-[18px] pt-[12px] pb-[18px]", style: { background: "var(--t-surface)", borderRadius: 5, marginTop: 4 }, children: [
|
|
2482
|
-
/* @__PURE__ */ e(
|
|
2485
|
+
/* @__PURE__ */ e(Q, { w: 50, h: 14, className: "mb-3" }),
|
|
2483
2486
|
/* @__PURE__ */ i("div", { className: "flex justify-between items-center", children: [
|
|
2484
|
-
/* @__PURE__ */ e(
|
|
2485
|
-
/* @__PURE__ */ e(
|
|
2487
|
+
/* @__PURE__ */ e(Q, { w: 180, h: 32 }),
|
|
2488
|
+
/* @__PURE__ */ e(Q, { w: 85, h: 32 })
|
|
2486
2489
|
] })
|
|
2487
2490
|
] }),
|
|
2488
2491
|
/* @__PURE__ */ i("div", { className: "flex justify-between mt-3 px-[2px]", children: [
|
|
2489
|
-
/* @__PURE__ */ e(
|
|
2490
|
-
/* @__PURE__ */ e(
|
|
2492
|
+
/* @__PURE__ */ e(Q, { w: 140, h: 12 }),
|
|
2493
|
+
/* @__PURE__ */ e(Q, { w: 90, h: 12 })
|
|
2491
2494
|
] }),
|
|
2492
2495
|
/* @__PURE__ */ i("div", { className: "mt-8", children: [
|
|
2493
|
-
/* @__PURE__ */ e(
|
|
2494
|
-
/* @__PURE__ */ e(
|
|
2496
|
+
/* @__PURE__ */ e(Q, { w: 65, h: 14, className: "mb-2.5" }),
|
|
2497
|
+
/* @__PURE__ */ e(Q, { w: "100%", h: 47 })
|
|
2495
2498
|
] }),
|
|
2496
2499
|
/* @__PURE__ */ e("div", { className: "flex-1" }),
|
|
2497
|
-
/* @__PURE__ */ e(
|
|
2500
|
+
/* @__PURE__ */ e(Q, { w: "100%", h: 60, className: "mb-2" }),
|
|
2498
2501
|
/* @__PURE__ */ e("div", { className: "text-center py-3", children: /* @__PURE__ */ e("span", { className: "text-[11px]", style: { color: "var(--t-text-tertiary)" }, children: t("skeleton.poweredBy") }) })
|
|
2499
2502
|
] });
|
|
2500
2503
|
}
|
|
@@ -2505,9 +2508,9 @@ function Ea({
|
|
|
2505
2508
|
className: r = "",
|
|
2506
2509
|
background: o
|
|
2507
2510
|
}) {
|
|
2508
|
-
const [s, m] =
|
|
2511
|
+
const [s, m] = k(!1), [l, d] = k(!1), c = I(t);
|
|
2509
2512
|
c.current !== t && (c.current = t, m(!1), d(!1));
|
|
2510
|
-
const h = O(() => m(!0), []),
|
|
2513
|
+
const h = O(() => m(!0), []), p = O(() => d(!0), []);
|
|
2511
2514
|
return /* @__PURE__ */ i(
|
|
2512
2515
|
"div",
|
|
2513
2516
|
{
|
|
@@ -2540,7 +2543,7 @@ function Ea({
|
|
|
2540
2543
|
width: n,
|
|
2541
2544
|
height: n,
|
|
2542
2545
|
onLoad: h,
|
|
2543
|
-
onError:
|
|
2546
|
+
onError: p,
|
|
2544
2547
|
className: `rounded-full ${s ? "opacity-100" : "opacity-0"}`,
|
|
2545
2548
|
style: { width: n, height: n, transition: "opacity 0.15s ease-in" }
|
|
2546
2549
|
}
|
|
@@ -2553,30 +2556,30 @@ function Ra({ ticker: t, size: a = 32, baseUrl: n = "" }) {
|
|
|
2553
2556
|
return /* @__PURE__ */ e(
|
|
2554
2557
|
Ea,
|
|
2555
2558
|
{
|
|
2556
|
-
src:
|
|
2559
|
+
src: wa(t, n),
|
|
2557
2560
|
alt: t,
|
|
2558
2561
|
size: a,
|
|
2559
2562
|
background: "#ffffff"
|
|
2560
2563
|
}
|
|
2561
2564
|
);
|
|
2562
2565
|
}
|
|
2563
|
-
function
|
|
2566
|
+
function jt({ currencyCode: t, size: a = 16, baseUrl: n = "" }) {
|
|
2564
2567
|
return /* @__PURE__ */ e(
|
|
2565
2568
|
Ea,
|
|
2566
2569
|
{
|
|
2567
|
-
src:
|
|
2570
|
+
src: Rn(t, n),
|
|
2568
2571
|
alt: t,
|
|
2569
2572
|
size: a
|
|
2570
2573
|
}
|
|
2571
2574
|
);
|
|
2572
2575
|
}
|
|
2573
|
-
function
|
|
2576
|
+
function Aa({ size: t = 32, color: a = "#888" }) {
|
|
2574
2577
|
return /* @__PURE__ */ i("svg", { width: t, height: t, viewBox: "0 0 32 32", fill: "none", children: [
|
|
2575
2578
|
/* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "16", fill: a }),
|
|
2576
2579
|
/* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "8", stroke: "white", strokeWidth: "1.5", fill: "none" })
|
|
2577
2580
|
] });
|
|
2578
2581
|
}
|
|
2579
|
-
function
|
|
2582
|
+
function Dr({ size: t = 24 }) {
|
|
2580
2583
|
return /* @__PURE__ */ e(
|
|
2581
2584
|
"div",
|
|
2582
2585
|
{
|
|
@@ -2593,7 +2596,7 @@ function Fr({ size: t = 24 }) {
|
|
|
2593
2596
|
}
|
|
2594
2597
|
);
|
|
2595
2598
|
}
|
|
2596
|
-
function
|
|
2599
|
+
function In({ size: t = 32 }) {
|
|
2597
2600
|
return /* @__PURE__ */ e(
|
|
2598
2601
|
"div",
|
|
2599
2602
|
{
|
|
@@ -2603,7 +2606,7 @@ function Un({ size: t = 32 }) {
|
|
|
2603
2606
|
}
|
|
2604
2607
|
);
|
|
2605
2608
|
}
|
|
2606
|
-
function
|
|
2609
|
+
function Mr({ size: t = 32 }) {
|
|
2607
2610
|
return /* @__PURE__ */ e(
|
|
2608
2611
|
"div",
|
|
2609
2612
|
{
|
|
@@ -2619,7 +2622,7 @@ function Ur({ size: t = 32 }) {
|
|
|
2619
2622
|
}
|
|
2620
2623
|
);
|
|
2621
2624
|
}
|
|
2622
|
-
function
|
|
2625
|
+
function Br({ size: t = 32 }) {
|
|
2623
2626
|
return /* @__PURE__ */ e(
|
|
2624
2627
|
"div",
|
|
2625
2628
|
{
|
|
@@ -2644,7 +2647,7 @@ function Dn({ size: t = 32 }) {
|
|
|
2644
2647
|
}
|
|
2645
2648
|
);
|
|
2646
2649
|
}
|
|
2647
|
-
function
|
|
2650
|
+
function Mn({ size: t = 32 }) {
|
|
2648
2651
|
return /* @__PURE__ */ e(
|
|
2649
2652
|
"div",
|
|
2650
2653
|
{
|
|
@@ -2660,7 +2663,7 @@ function In({ size: t = 32 }) {
|
|
|
2660
2663
|
}
|
|
2661
2664
|
);
|
|
2662
2665
|
}
|
|
2663
|
-
function
|
|
2666
|
+
function Bn({ size: t = 32 }) {
|
|
2664
2667
|
const a = t * 0.8;
|
|
2665
2668
|
return /* @__PURE__ */ e(
|
|
2666
2669
|
"div",
|
|
@@ -2675,7 +2678,7 @@ function Mn({ size: t = 32 }) {
|
|
|
2675
2678
|
}
|
|
2676
2679
|
);
|
|
2677
2680
|
}
|
|
2678
|
-
function
|
|
2681
|
+
function Hr({ size: t = 32 }) {
|
|
2679
2682
|
const a = t * 0.56, n = a * 0.65, r = Math.max(2, a * 0.1), o = a * 0.2;
|
|
2680
2683
|
return /* @__PURE__ */ i("div", { className: "flex items-center justify-center shrink-0", style: { width: t, height: t }, children: [
|
|
2681
2684
|
/* @__PURE__ */ e(
|
|
@@ -2726,7 +2729,7 @@ function Ir({ size: t = 32 }) {
|
|
|
2726
2729
|
)
|
|
2727
2730
|
] });
|
|
2728
2731
|
}
|
|
2729
|
-
function
|
|
2732
|
+
function Pr({ size: t = 18 }) {
|
|
2730
2733
|
return /* @__PURE__ */ e(
|
|
2731
2734
|
"div",
|
|
2732
2735
|
{
|
|
@@ -2739,10 +2742,10 @@ function Mr({ size: t = 18 }) {
|
|
|
2739
2742
|
function Re() {
|
|
2740
2743
|
return /* @__PURE__ */ e("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ e("path", { d: "M3 4.5L6 7.5L9 4.5", stroke: "var(--t-text-secondary)", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
2741
2744
|
}
|
|
2742
|
-
function
|
|
2745
|
+
function Hn() {
|
|
2743
2746
|
return /* @__PURE__ */ e("svg", { width: "8", height: "14", viewBox: "0 0 8 14", fill: "none", children: /* @__PURE__ */ e("path", { d: "M1 1L7 7L1 13", stroke: "var(--t-icon-stroke)", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
2744
2747
|
}
|
|
2745
|
-
function
|
|
2748
|
+
function Or({ onClick: t }) {
|
|
2746
2749
|
return /* @__PURE__ */ e("button", { onClick: t, className: "hover:opacity-70 transition-opacity", children: /* @__PURE__ */ e("svg", { width: "24", height: "16", viewBox: "0 0 24 16", fill: "none", children: /* @__PURE__ */ e(
|
|
2747
2750
|
"path",
|
|
2748
2751
|
{
|
|
@@ -2751,7 +2754,7 @@ function Br({ onClick: t }) {
|
|
|
2751
2754
|
}
|
|
2752
2755
|
) }) });
|
|
2753
2756
|
}
|
|
2754
|
-
function
|
|
2757
|
+
function Kr({ size: t = 40 }) {
|
|
2755
2758
|
return /* @__PURE__ */ e(
|
|
2756
2759
|
"div",
|
|
2757
2760
|
{
|
|
@@ -2764,7 +2767,7 @@ function Hr({ size: t = 40 }) {
|
|
|
2764
2767
|
}
|
|
2765
2768
|
);
|
|
2766
2769
|
}
|
|
2767
|
-
function
|
|
2770
|
+
function Pn({ size: t = 20 }) {
|
|
2768
2771
|
const a = t * 0.6;
|
|
2769
2772
|
return /* @__PURE__ */ e(
|
|
2770
2773
|
"div",
|
|
@@ -2782,7 +2785,7 @@ function Hn({ size: t = 20 }) {
|
|
|
2782
2785
|
}
|
|
2783
2786
|
);
|
|
2784
2787
|
}
|
|
2785
|
-
function
|
|
2788
|
+
function On({ size: t = 20 }) {
|
|
2786
2789
|
const a = t * 0.6;
|
|
2787
2790
|
return /* @__PURE__ */ e(
|
|
2788
2791
|
"div",
|
|
@@ -2797,7 +2800,7 @@ function Pn({ size: t = 20 }) {
|
|
|
2797
2800
|
}
|
|
2798
2801
|
);
|
|
2799
2802
|
}
|
|
2800
|
-
function
|
|
2803
|
+
function Kn({ size: t = 20 }) {
|
|
2801
2804
|
return /* @__PURE__ */ e(
|
|
2802
2805
|
"div",
|
|
2803
2806
|
{
|
|
@@ -2810,7 +2813,7 @@ function On({ size: t = 20 }) {
|
|
|
2810
2813
|
}
|
|
2811
2814
|
);
|
|
2812
2815
|
}
|
|
2813
|
-
function
|
|
2816
|
+
function _n({ size: t = 20 }) {
|
|
2814
2817
|
return /* @__PURE__ */ e(
|
|
2815
2818
|
"div",
|
|
2816
2819
|
{
|
|
@@ -2825,7 +2828,7 @@ function Kn({ size: t = 20 }) {
|
|
|
2825
2828
|
}
|
|
2826
2829
|
);
|
|
2827
2830
|
}
|
|
2828
|
-
function
|
|
2831
|
+
function _r({ size: t = 24 }) {
|
|
2829
2832
|
const a = t * 1.15;
|
|
2830
2833
|
return /* @__PURE__ */ i("svg", { width: a, height: t, viewBox: "0 0 48 32", fill: "none", preserveAspectRatio: "xMidYMid meet", children: [
|
|
2831
2834
|
/* @__PURE__ */ e("path", { d: "M0 0H5.76C11.0619 0 15.36 4.47715 15.36 10V32H0V0Z", fill: "var(--t-text)" }),
|
|
@@ -2833,7 +2836,7 @@ function Pr({ size: t = 24 }) {
|
|
|
2833
2836
|
/* @__PURE__ */ e("path", { d: "M32.64 8C32.64 3.58172 36.0785 0 40.32 0C44.5615 0 48 3.58172 48 8C48 12.4183 44.5615 16 40.32 16C36.0785 16 32.64 12.4183 32.64 8Z", fill: "var(--t-text)" })
|
|
2834
2837
|
] });
|
|
2835
2838
|
}
|
|
2836
|
-
function
|
|
2839
|
+
function Ht({ size: t = 12 }) {
|
|
2837
2840
|
return /* @__PURE__ */ e(
|
|
2838
2841
|
"div",
|
|
2839
2842
|
{
|
|
@@ -2859,7 +2862,7 @@ function Pt({ size: t = 12 }) {
|
|
|
2859
2862
|
}
|
|
2860
2863
|
);
|
|
2861
2864
|
}
|
|
2862
|
-
function
|
|
2865
|
+
function jn({ onClick: t }) {
|
|
2863
2866
|
return /* @__PURE__ */ e(
|
|
2864
2867
|
"button",
|
|
2865
2868
|
{
|
|
@@ -2874,45 +2877,45 @@ function _n({ onClick: t }) {
|
|
|
2874
2877
|
}
|
|
2875
2878
|
);
|
|
2876
2879
|
}
|
|
2877
|
-
function
|
|
2880
|
+
function jr({ size: t = 16 }) {
|
|
2878
2881
|
return /* @__PURE__ */ i("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: "none", children: [
|
|
2879
2882
|
/* @__PURE__ */ e("circle", { cx: "7", cy: "7", r: "5.25", stroke: "var(--t-text-secondary)", strokeWidth: "1.2" }),
|
|
2880
2883
|
/* @__PURE__ */ e("path", { d: "M11 11l3.5 3.5", stroke: "var(--t-text-secondary)", strokeWidth: "1.2", strokeLinecap: "round" })
|
|
2881
2884
|
] });
|
|
2882
2885
|
}
|
|
2883
|
-
function
|
|
2886
|
+
function Vr({ size: t = 12 }) {
|
|
2884
2887
|
return /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ e("path", { d: "M6 10V2M6 2L2.5 5.5M6 2l3.5 3.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
2885
2888
|
}
|
|
2886
|
-
function
|
|
2889
|
+
function Vn({ size: t = 14 }) {
|
|
2887
2890
|
return /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ e("path", { d: "M11.5 3.5L5.5 10.5L2.5 7.5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
2888
2891
|
}
|
|
2889
|
-
function
|
|
2892
|
+
function Pt({ size: t = 12 }) {
|
|
2890
2893
|
return /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ e("path", { d: "M2 2l8 8M10 2l-8 8", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round" }) });
|
|
2891
2894
|
}
|
|
2892
|
-
function
|
|
2895
|
+
function Wn(t, a = 32, n) {
|
|
2893
2896
|
switch (t) {
|
|
2894
2897
|
case "bank":
|
|
2895
|
-
return /* @__PURE__ */ e(Hn, { size: a });
|
|
2896
|
-
case "card":
|
|
2897
2898
|
return /* @__PURE__ */ e(Pn, { size: a });
|
|
2898
|
-
case "
|
|
2899
|
+
case "card":
|
|
2899
2900
|
return /* @__PURE__ */ e(On, { size: a });
|
|
2900
|
-
case "
|
|
2901
|
+
case "applepay":
|
|
2901
2902
|
return /* @__PURE__ */ e(Kn, { size: a });
|
|
2903
|
+
case "googlepay":
|
|
2904
|
+
return /* @__PURE__ */ e(_n, { size: a });
|
|
2902
2905
|
case "revolut":
|
|
2903
|
-
return /* @__PURE__ */ e(
|
|
2906
|
+
return /* @__PURE__ */ e(In, { size: a });
|
|
2904
2907
|
case "paypal":
|
|
2905
2908
|
return /* @__PURE__ */ e(Dn, { size: a });
|
|
2906
2909
|
case "visa":
|
|
2907
|
-
return /* @__PURE__ */ e(In, { size: a });
|
|
2908
|
-
case "mastercard":
|
|
2909
2910
|
return /* @__PURE__ */ e(Mn, { size: a });
|
|
2911
|
+
case "mastercard":
|
|
2912
|
+
return /* @__PURE__ */ e(Bn, { size: a });
|
|
2910
2913
|
default:
|
|
2911
|
-
return /* @__PURE__ */ e(
|
|
2914
|
+
return /* @__PURE__ */ e(Aa, { size: a });
|
|
2912
2915
|
}
|
|
2913
2916
|
}
|
|
2914
|
-
function
|
|
2915
|
-
const [s, m] =
|
|
2917
|
+
function Gn({ type: t, title: a, description: n, visible: r, onDismiss: o }) {
|
|
2918
|
+
const [s, m] = k(!1), [l, d] = k(!1), c = O(() => {
|
|
2916
2919
|
d(!0), setTimeout(() => {
|
|
2917
2920
|
m(!1), d(!1), o();
|
|
2918
2921
|
}, 200);
|
|
@@ -2921,8 +2924,8 @@ function Wn({ type: t, title: a, description: n, visible: r, onDismiss: o }) {
|
|
|
2921
2924
|
r && (m(!0), d(!1));
|
|
2922
2925
|
}, [r]), B(() => {
|
|
2923
2926
|
if (!r || !s) return;
|
|
2924
|
-
const
|
|
2925
|
-
return () => clearTimeout(
|
|
2927
|
+
const p = setTimeout(c, 5e3);
|
|
2928
|
+
return () => clearTimeout(p);
|
|
2926
2929
|
}, [r, s, c]), s ? /* @__PURE__ */ e(
|
|
2927
2930
|
"div",
|
|
2928
2931
|
{
|
|
@@ -2934,7 +2937,7 @@ function Wn({ type: t, title: a, description: n, visible: r, onDismiss: o }) {
|
|
|
2934
2937
|
className: "flex items-start gap-2.5 rounded-2xl px-4 py-3",
|
|
2935
2938
|
style: { background: t === "success" ? "var(--t-toast-success-bg)" : "var(--t-toast-error-bg)", color: "#ffffff" },
|
|
2936
2939
|
children: [
|
|
2937
|
-
/* @__PURE__ */ e("span", { className: "mt-0.5 shrink-0", children: t === "success" ? /* @__PURE__ */ e(
|
|
2940
|
+
/* @__PURE__ */ e("span", { className: "mt-0.5 shrink-0", children: t === "success" ? /* @__PURE__ */ e(Vn, { size: 14 }) : /* @__PURE__ */ e(Pt, { size: 12 }) }),
|
|
2938
2941
|
/* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: [
|
|
2939
2942
|
/* @__PURE__ */ e("div", { className: "text-[13px] font-medium leading-tight", children: a }),
|
|
2940
2943
|
n && /* @__PURE__ */ e("div", { className: "text-[12px] leading-snug mt-0.5 opacity-90", children: n })
|
|
@@ -2944,7 +2947,7 @@ function Wn({ type: t, title: a, description: n, visible: r, onDismiss: o }) {
|
|
|
2944
2947
|
{
|
|
2945
2948
|
onClick: c,
|
|
2946
2949
|
className: "shrink-0 opacity-80 hover:opacity-100 transition-opacity mt-0.5",
|
|
2947
|
-
children: /* @__PURE__ */ e(
|
|
2950
|
+
children: /* @__PURE__ */ e(Pt, { size: 10 })
|
|
2948
2951
|
}
|
|
2949
2952
|
)
|
|
2950
2953
|
]
|
|
@@ -2961,7 +2964,7 @@ function Ae({ width: t = 46 }) {
|
|
|
2961
2964
|
/* @__PURE__ */ e("path", { d: "M32.64 8C32.64 3.58172 36.0785 0 40.32 0C44.5615 0 48 3.58172 48 8C48 12.4183 44.5615 16 40.32 16C36.0785 16 32.64 12.4183 32.64 8Z", fill: "var(--t-text)" })
|
|
2962
2965
|
] });
|
|
2963
2966
|
}
|
|
2964
|
-
function
|
|
2967
|
+
function $n() {
|
|
2965
2968
|
return /* @__PURE__ */ e(
|
|
2966
2969
|
"div",
|
|
2967
2970
|
{
|
|
@@ -2972,7 +2975,7 @@ function Gn() {
|
|
|
2972
2975
|
);
|
|
2973
2976
|
}
|
|
2974
2977
|
function Zn({ isOpen: t, onClose: a, children: n }) {
|
|
2975
|
-
return /* @__PURE__ */ i(
|
|
2978
|
+
return /* @__PURE__ */ i(Z, { children: [
|
|
2976
2979
|
/* @__PURE__ */ e(
|
|
2977
2980
|
"div",
|
|
2978
2981
|
{
|
|
@@ -3072,38 +3075,38 @@ function Ye({
|
|
|
3072
3075
|
}
|
|
3073
3076
|
);
|
|
3074
3077
|
}
|
|
3075
|
-
const
|
|
3076
|
-
function
|
|
3078
|
+
const Xn = ["USD", "EUR", "GBP"];
|
|
3079
|
+
function Yn({
|
|
3077
3080
|
onClose: t,
|
|
3078
3081
|
onSelect: a,
|
|
3079
3082
|
currencies: n,
|
|
3080
3083
|
assetBaseUrl: r = "",
|
|
3081
3084
|
selectedCode: o
|
|
3082
3085
|
}) {
|
|
3083
|
-
const s = P(), [m, l] =
|
|
3084
|
-
if (!n || n.length === 0) return
|
|
3085
|
-
const h = new Map(
|
|
3086
|
-
return n.map((
|
|
3087
|
-
code:
|
|
3088
|
-
name:
|
|
3086
|
+
const s = P(), [m, l] = k(""), d = W(() => {
|
|
3087
|
+
if (!n || n.length === 0) return ca;
|
|
3088
|
+
const h = new Map(ca.map((p) => [p.code, p.name]));
|
|
3089
|
+
return n.map((p) => ({
|
|
3090
|
+
code: p.code,
|
|
3091
|
+
name: p.name || h.get(p.code) || p.code
|
|
3089
3092
|
}));
|
|
3090
3093
|
}, [n]), c = W(() => {
|
|
3091
3094
|
const h = m.trim().toLowerCase();
|
|
3092
3095
|
if (!h) {
|
|
3093
3096
|
if (o) {
|
|
3094
|
-
const
|
|
3095
|
-
if (
|
|
3096
|
-
const f = d.filter((
|
|
3097
|
-
return [
|
|
3097
|
+
const p = d.find((f) => f.code === o);
|
|
3098
|
+
if (p) {
|
|
3099
|
+
const f = d.filter((x) => x.code !== o);
|
|
3100
|
+
return [p, ...f];
|
|
3098
3101
|
}
|
|
3099
3102
|
}
|
|
3100
3103
|
return d;
|
|
3101
3104
|
}
|
|
3102
3105
|
return d.filter(
|
|
3103
|
-
(
|
|
3106
|
+
(p) => p.code.toLowerCase().includes(h) || p.name.toLowerCase().includes(h)
|
|
3104
3107
|
);
|
|
3105
3108
|
}, [d, m, o]);
|
|
3106
|
-
return /* @__PURE__ */ i(
|
|
3109
|
+
return /* @__PURE__ */ i(Z, { children: [
|
|
3107
3110
|
/* @__PURE__ */ i("div", { className: "relative shrink-0", style: { height: 128, background: "var(--t-header-bg)", backdropFilter: "blur(var(--t-header-blur))", WebkitBackdropFilter: "blur(var(--t-header-blur))" }, children: [
|
|
3108
3111
|
/* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(Ae, { width: 46 }) }),
|
|
3109
3112
|
/* @__PURE__ */ e("p", { className: "absolute text-[16px] text-center truncate", style: { top: 28, left: 64, right: 64, color: "var(--t-text)", lineHeight: "24px" }, children: s("modal.selectFiat") }),
|
|
@@ -3111,19 +3114,19 @@ function Xn({
|
|
|
3111
3114
|
/* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Ye, { value: m, onChange: l, inline: !0 }) })
|
|
3112
3115
|
] }),
|
|
3113
3116
|
/* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto custom-scroll px-3", children: [
|
|
3114
|
-
c.map((h,
|
|
3117
|
+
c.map((h, p) => {
|
|
3115
3118
|
const f = o === h.code;
|
|
3116
3119
|
return /* @__PURE__ */ i(
|
|
3117
3120
|
"button",
|
|
3118
3121
|
{
|
|
3119
3122
|
onClick: () => a(h.code),
|
|
3120
3123
|
className: "flex items-center w-full card-press hover-item modal-item-in",
|
|
3121
|
-
style: { gap: 16, animationDelay: `${Math.min(
|
|
3124
|
+
style: { gap: 16, animationDelay: `${Math.min(p * 45, 350)}ms` },
|
|
3122
3125
|
children: [
|
|
3123
|
-
/* @__PURE__ */ e(
|
|
3126
|
+
/* @__PURE__ */ e(jt, { currencyCode: h.code, size: 32, baseUrl: r }),
|
|
3124
3127
|
/* @__PURE__ */ i("div", { className: "flex-1 flex items-center", style: { borderBottom: "1px solid var(--t-card-border)", paddingTop: 20, paddingBottom: 20, gap: 10 }, children: [
|
|
3125
3128
|
/* @__PURE__ */ e("span", { className: "flex-1 text-[18px] text-left", style: { color: "var(--t-text)", lineHeight: "20px" }, children: h.code }),
|
|
3126
|
-
|
|
3129
|
+
Xn.includes(h.code) && /* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { border: "1.5px solid var(--t-card-border)", borderRadius: 100, paddingLeft: 8, paddingRight: 8, color: "var(--t-text-secondary)", lineHeight: "20px", letterSpacing: "0.22px" }, children: s("modal.popular") }),
|
|
3127
3130
|
f && /* @__PURE__ */ e("div", { style: { width: 40, height: 20, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
|
|
3128
3131
|
"path",
|
|
3129
3132
|
{
|
|
@@ -3144,11 +3147,11 @@ function Xn({
|
|
|
3144
3147
|
] })
|
|
3145
3148
|
] });
|
|
3146
3149
|
}
|
|
3147
|
-
const
|
|
3148
|
-
function
|
|
3149
|
-
const [s, m] =
|
|
3150
|
+
const ha = ["BTC", "ETH", "SOL"];
|
|
3151
|
+
function fa({ src: t, alt: a, size: n, className: r, style: o }) {
|
|
3152
|
+
const [s, m] = k(!1), [l, d] = k(!1), c = I(t);
|
|
3150
3153
|
c.current !== t && (c.current = t, m(!1), d(!1));
|
|
3151
|
-
const h = O(() => m(!0), []),
|
|
3154
|
+
const h = O(() => m(!0), []), p = O(() => d(!0), []);
|
|
3152
3155
|
return /* @__PURE__ */ i("div", { className: r, style: { ...o, width: n, height: n, position: "relative" }, children: [
|
|
3153
3156
|
!s && !l && /* @__PURE__ */ e(
|
|
3154
3157
|
"div",
|
|
@@ -3172,57 +3175,57 @@ function ya({ src: t, alt: a, size: n, className: r, style: o }) {
|
|
|
3172
3175
|
width: n,
|
|
3173
3176
|
height: n,
|
|
3174
3177
|
onLoad: h,
|
|
3175
|
-
onError:
|
|
3178
|
+
onError: p,
|
|
3176
3179
|
className: `rounded-full ${s ? "opacity-100" : "opacity-0"}`,
|
|
3177
3180
|
style: { width: n, height: n, transition: "opacity 0.15s ease-in" }
|
|
3178
3181
|
}
|
|
3179
3182
|
)
|
|
3180
3183
|
] });
|
|
3181
3184
|
}
|
|
3182
|
-
function
|
|
3183
|
-
const m = P(), [l, d] =
|
|
3184
|
-
if (!n || n.length === 0) return
|
|
3185
|
+
function Qn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selectedCode: o, selectedChain: s }) {
|
|
3186
|
+
const m = P(), [l, d] = k(""), c = W(() => {
|
|
3187
|
+
if (!n || n.length === 0) return Ln;
|
|
3185
3188
|
const f = [];
|
|
3186
|
-
for (const
|
|
3187
|
-
const
|
|
3188
|
-
if (
|
|
3189
|
-
f.push({ code:
|
|
3189
|
+
for (const x of n) {
|
|
3190
|
+
const S = x.networks || [], R = x.name || Nn[x.code] || x.code;
|
|
3191
|
+
if (S.length === 0)
|
|
3192
|
+
f.push({ code: x.code, name: R, chain: x.code, popular: ha.includes(x.code) });
|
|
3190
3193
|
else
|
|
3191
|
-
for (const y of
|
|
3192
|
-
const
|
|
3194
|
+
for (const y of S) {
|
|
3195
|
+
const E = y.code || y.id || y.name || x.code;
|
|
3193
3196
|
f.push({
|
|
3194
|
-
code:
|
|
3195
|
-
name:
|
|
3196
|
-
chain:
|
|
3197
|
+
code: x.code,
|
|
3198
|
+
name: R,
|
|
3199
|
+
chain: E,
|
|
3197
3200
|
chainName: y.name,
|
|
3198
|
-
popular:
|
|
3201
|
+
popular: ha.includes(x.code)
|
|
3199
3202
|
});
|
|
3200
3203
|
}
|
|
3201
3204
|
}
|
|
3202
3205
|
return f;
|
|
3203
|
-
}, [n]), h = O((f,
|
|
3204
|
-
var
|
|
3206
|
+
}, [n]), h = O((f, x) => o === f && s === x, [o, s]), p = W(() => {
|
|
3207
|
+
var R;
|
|
3205
3208
|
const f = l.trim().toLowerCase();
|
|
3206
3209
|
if (!f) {
|
|
3207
3210
|
if (o && s) {
|
|
3208
|
-
const y = c.find((
|
|
3211
|
+
const y = c.find((E) => E.code === o && E.chain === s);
|
|
3209
3212
|
if (y) {
|
|
3210
|
-
const
|
|
3211
|
-
return [y, ...
|
|
3213
|
+
const E = c.filter((K) => !(K.code === o && K.chain === s));
|
|
3214
|
+
return [y, ...E];
|
|
3212
3215
|
}
|
|
3213
3216
|
}
|
|
3214
3217
|
return c;
|
|
3215
3218
|
}
|
|
3216
|
-
const
|
|
3219
|
+
const x = f.split(/\s+/), S = [];
|
|
3217
3220
|
for (const y of c) {
|
|
3218
|
-
const
|
|
3219
|
-
if (!
|
|
3221
|
+
const E = yt(y.chain), K = E ? E.name.toLowerCase() : "", ee = ((R = E == null ? void 0 : E.shortName) == null ? void 0 : R.toLowerCase()) || "", z = y.chain.toLowerCase(), ie = y.code.toLowerCase(), J = y.name.toLowerCase(), q = [ie, J, K, ee, z];
|
|
3222
|
+
if (!x.every((T) => q.some((C) => C.includes(T)))) continue;
|
|
3220
3223
|
let te = 0;
|
|
3221
|
-
ie === f ? te += 100 : ie.startsWith(
|
|
3224
|
+
ie === f ? te += 100 : ie.startsWith(x[0]) && (te += 50), y.popular && (te += 10), x.length > 1 && (K.includes(x[1]) || ee.includes(x[1]) || z.includes(x[1])) && (te += 25), S.push({ item: y, score: te });
|
|
3222
3225
|
}
|
|
3223
|
-
return
|
|
3226
|
+
return S.sort((y, E) => E.score - y.score), S.map((y) => y.item);
|
|
3224
3227
|
}, [c, l, o, s]);
|
|
3225
|
-
return /* @__PURE__ */ i(
|
|
3228
|
+
return /* @__PURE__ */ i(Z, { children: [
|
|
3226
3229
|
/* @__PURE__ */ i("div", { className: "relative shrink-0", style: { height: 128, background: "var(--t-header-bg)", backdropFilter: "blur(var(--t-header-blur))", WebkitBackdropFilter: "blur(var(--t-header-blur))" }, children: [
|
|
3227
3230
|
/* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(Ae, { width: 46 }) }),
|
|
3228
3231
|
/* @__PURE__ */ e("p", { className: "absolute text-[16px] text-center truncate", style: { top: 28, left: 64, right: 64, color: "var(--t-text)", lineHeight: "24px" }, children: m("modal.selectCrypto") }),
|
|
@@ -3230,14 +3233,14 @@ function Yn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
|
|
|
3230
3233
|
/* @__PURE__ */ e("div", { className: "absolute", style: { bottom: 8, left: 12, right: 12 }, children: /* @__PURE__ */ e(Ye, { value: l, onChange: d, inline: !0 }) })
|
|
3231
3234
|
] }),
|
|
3232
3235
|
/* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto custom-scroll px-3", children: [
|
|
3233
|
-
|
|
3234
|
-
const
|
|
3236
|
+
p.map((f, x) => {
|
|
3237
|
+
const S = yt(f.chain), R = (S == null ? void 0 : S.name) || f.chainName || f.chain, y = h(f.code, f.chain);
|
|
3235
3238
|
return /* @__PURE__ */ i(
|
|
3236
3239
|
"button",
|
|
3237
3240
|
{
|
|
3238
3241
|
onClick: () => a(f.code, f.chain),
|
|
3239
3242
|
className: "flex items-center w-full card-press hover-item modal-item-in",
|
|
3240
|
-
style: { gap: 16, animationDelay: `${Math.min(
|
|
3243
|
+
style: { gap: 16, animationDelay: `${Math.min(x * 45, 350)}ms` },
|
|
3241
3244
|
children: [
|
|
3242
3245
|
/* @__PURE__ */ i("div", { className: "relative shrink-0", style: { width: 40, height: 40 }, children: [
|
|
3243
3246
|
/* @__PURE__ */ e(
|
|
@@ -3246,9 +3249,9 @@ function Yn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
|
|
|
3246
3249
|
className: "absolute top-0 left-0",
|
|
3247
3250
|
style: { background: "#ffffff", borderRadius: "50%" },
|
|
3248
3251
|
children: /* @__PURE__ */ e(
|
|
3249
|
-
|
|
3252
|
+
fa,
|
|
3250
3253
|
{
|
|
3251
|
-
src:
|
|
3254
|
+
src: wa(f.code, r),
|
|
3252
3255
|
alt: f.code,
|
|
3253
3256
|
size: 32
|
|
3254
3257
|
}
|
|
@@ -3267,9 +3270,9 @@ function Yn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
|
|
|
3267
3270
|
background: "#ffffff"
|
|
3268
3271
|
},
|
|
3269
3272
|
children: /* @__PURE__ */ e(
|
|
3270
|
-
|
|
3273
|
+
fa,
|
|
3271
3274
|
{
|
|
3272
|
-
src:
|
|
3275
|
+
src: Mt(f.chain, r),
|
|
3273
3276
|
alt: f.chain,
|
|
3274
3277
|
size: 16
|
|
3275
3278
|
}
|
|
@@ -3279,7 +3282,7 @@ function Yn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
|
|
|
3279
3282
|
] }),
|
|
3280
3283
|
/* @__PURE__ */ i("div", { className: "flex-1 flex items-center", style: { borderBottom: "1px solid var(--t-card-border)", paddingTop: 20, paddingBottom: 20, gap: 10 }, children: [
|
|
3281
3284
|
/* @__PURE__ */ e("span", { className: "flex-1 text-[18px] text-left", style: { color: "var(--t-text)", lineHeight: "20px" }, children: f.code }),
|
|
3282
|
-
/* @__PURE__ */ e("span", { className: "text-[15px]", style: { color: "var(--t-text-secondary)" }, children:
|
|
3285
|
+
/* @__PURE__ */ e("span", { className: "text-[15px]", style: { color: "var(--t-text-secondary)" }, children: R }),
|
|
3283
3286
|
f.popular && /* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { border: "1.5px solid var(--t-card-border)", borderRadius: 100, paddingLeft: 8, paddingRight: 8, color: "var(--t-text-secondary)", lineHeight: "20px", letterSpacing: "0.22px" }, children: m("modal.popular") }),
|
|
3284
3287
|
y && /* @__PURE__ */ e("div", { style: { width: 40, height: 20, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
|
|
3285
3288
|
"path",
|
|
@@ -3297,11 +3300,11 @@ function Yn({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
|
|
|
3297
3300
|
`${f.code}-${f.chain}`
|
|
3298
3301
|
);
|
|
3299
3302
|
}),
|
|
3300
|
-
|
|
3303
|
+
p.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: m("modal.noCurrencies") })
|
|
3301
3304
|
] })
|
|
3302
3305
|
] });
|
|
3303
3306
|
}
|
|
3304
|
-
const
|
|
3307
|
+
const zn = {
|
|
3305
3308
|
"debit-credit-card": "card",
|
|
3306
3309
|
"bank-transfer": "bank",
|
|
3307
3310
|
"ach-bank-transfer": "bank",
|
|
@@ -3312,32 +3315,32 @@ const Qn = {
|
|
|
3312
3315
|
"google-pay": "googlepay",
|
|
3313
3316
|
paypal: "paypal",
|
|
3314
3317
|
revolut: "revolut"
|
|
3315
|
-
},
|
|
3318
|
+
}, Jn = {
|
|
3316
3319
|
"debit-credit-card": "payment.name.card",
|
|
3317
3320
|
"bank-transfer": "payment.name.bankTransfer",
|
|
3318
3321
|
"ach-bank-transfer": "payment.name.ach"
|
|
3319
|
-
},
|
|
3322
|
+
}, qn = {
|
|
3320
3323
|
"apple-pay": "Apple Pay",
|
|
3321
3324
|
"google-pay": "Google Pay",
|
|
3322
3325
|
"payid-bank-transfer": "PayID",
|
|
3323
3326
|
paypal: "PayPal",
|
|
3324
3327
|
revolut: "Revolut"
|
|
3325
3328
|
};
|
|
3326
|
-
function
|
|
3327
|
-
const r =
|
|
3329
|
+
function Vt(t, a, n) {
|
|
3330
|
+
const r = qn[t];
|
|
3328
3331
|
if (r) return r;
|
|
3329
|
-
const o =
|
|
3332
|
+
const o = Jn[t];
|
|
3330
3333
|
return o && n ? n(o) : o && {
|
|
3331
3334
|
"debit-credit-card": "Card",
|
|
3332
3335
|
"bank-transfer": "Bank Transfer",
|
|
3333
3336
|
"ach-bank-transfer": "ACH"
|
|
3334
3337
|
}[t] || a;
|
|
3335
3338
|
}
|
|
3336
|
-
function
|
|
3337
|
-
const r =
|
|
3338
|
-
return r ?
|
|
3339
|
+
function Wt(t, a, n = 24) {
|
|
3340
|
+
const r = zn[t];
|
|
3341
|
+
return r ? Wn(r, n) : a ? /* @__PURE__ */ e("img", { src: a, alt: "", width: n, height: n, style: { borderRadius: "50%" } }) : /* @__PURE__ */ e(Aa, { size: n });
|
|
3339
3342
|
}
|
|
3340
|
-
function
|
|
3343
|
+
function Wr({
|
|
3341
3344
|
methods: t,
|
|
3342
3345
|
selectedId: a,
|
|
3343
3346
|
onOpenModal: n,
|
|
@@ -3358,7 +3361,7 @@ function _r({
|
|
|
3358
3361
|
},
|
|
3359
3362
|
children: /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: o("payment.unavailableFor", { currency: r }) })
|
|
3360
3363
|
}
|
|
3361
|
-
) : /* @__PURE__ */ e(
|
|
3364
|
+
) : /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ i(
|
|
3362
3365
|
"div",
|
|
3363
3366
|
{
|
|
3364
3367
|
role: "button",
|
|
@@ -3378,28 +3381,28 @@ function _r({
|
|
|
3378
3381
|
children: [
|
|
3379
3382
|
/* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: o("payment.label") }),
|
|
3380
3383
|
/* @__PURE__ */ i("span", { className: "flex items-center gap-2", children: [
|
|
3381
|
-
/* @__PURE__ */ e("span", { className: "flex items-center justify-center", style: { width: 20, height: 20 }, children: m &&
|
|
3382
|
-
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: m ?
|
|
3384
|
+
/* @__PURE__ */ e("span", { className: "flex items-center justify-center", style: { width: 20, height: 20 }, children: m && Wt(m.id, m.icon, 20) }),
|
|
3385
|
+
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: m ? Vt(m.id, m.name, o) : o("payment.select") }),
|
|
3383
3386
|
/* @__PURE__ */ e(Re, {})
|
|
3384
3387
|
] })
|
|
3385
3388
|
]
|
|
3386
3389
|
}
|
|
3387
3390
|
) });
|
|
3388
3391
|
}
|
|
3389
|
-
function
|
|
3392
|
+
function er({
|
|
3390
3393
|
methods: t,
|
|
3391
3394
|
selectedId: a,
|
|
3392
3395
|
onSelect: n,
|
|
3393
3396
|
onClose: r
|
|
3394
3397
|
}) {
|
|
3395
|
-
const o = P(), [s, m] =
|
|
3398
|
+
const o = P(), [s, m] = k(""), l = t.length > 0 ? t[0].id : "", d = W(() => {
|
|
3396
3399
|
const c = s.trim().toLowerCase();
|
|
3397
3400
|
if (!c) {
|
|
3398
3401
|
if (a) {
|
|
3399
|
-
const h = t.find((
|
|
3402
|
+
const h = t.find((p) => p.id === a);
|
|
3400
3403
|
if (h) {
|
|
3401
|
-
const
|
|
3402
|
-
return [h, ...
|
|
3404
|
+
const p = t.filter((f) => f.id !== a);
|
|
3405
|
+
return [h, ...p];
|
|
3403
3406
|
}
|
|
3404
3407
|
}
|
|
3405
3408
|
return t;
|
|
@@ -3408,7 +3411,7 @@ function qn({
|
|
|
3408
3411
|
(h) => h.id.toLowerCase().includes(c) || h.name.toLowerCase().includes(c) || h.description && h.description.toLowerCase().includes(c)
|
|
3409
3412
|
);
|
|
3410
3413
|
}, [t, s, a]);
|
|
3411
|
-
return /* @__PURE__ */ i(
|
|
3414
|
+
return /* @__PURE__ */ i(Z, { children: [
|
|
3412
3415
|
/* @__PURE__ */ i("div", { className: "relative shrink-0", style: { height: 128, background: "var(--t-header-bg)", backdropFilter: "blur(var(--t-header-blur))", WebkitBackdropFilter: "blur(var(--t-header-blur))" }, children: [
|
|
3413
3416
|
/* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(Ae, { width: 46 }) }),
|
|
3414
3417
|
/* @__PURE__ */ e("p", { className: "absolute text-[16px] text-center truncate", style: { top: 28, left: 64, right: 64, color: "var(--t-text)", lineHeight: "24px" }, children: o("modal.choosePayment") }),
|
|
@@ -3417,7 +3420,7 @@ function qn({
|
|
|
3417
3420
|
] }),
|
|
3418
3421
|
/* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto custom-scroll px-3", children: [
|
|
3419
3422
|
d.map((c, h) => {
|
|
3420
|
-
const
|
|
3423
|
+
const p = c.id === a, f = Vt(c.id, c.name, o);
|
|
3421
3424
|
return /* @__PURE__ */ i(
|
|
3422
3425
|
"button",
|
|
3423
3426
|
{
|
|
@@ -3430,13 +3433,13 @@ function qn({
|
|
|
3430
3433
|
{
|
|
3431
3434
|
className: "flex items-center justify-center shrink-0",
|
|
3432
3435
|
style: { width: 32, height: 32 },
|
|
3433
|
-
children:
|
|
3436
|
+
children: Wt(c.id, c.icon, 32)
|
|
3434
3437
|
}
|
|
3435
3438
|
),
|
|
3436
3439
|
/* @__PURE__ */ i("div", { className: "flex-1 flex items-center", style: { borderBottom: "1px solid var(--t-card-border)", paddingTop: 20, paddingBottom: 20, gap: 10 }, children: [
|
|
3437
3440
|
/* @__PURE__ */ e("span", { className: "flex-1 text-[18px] text-left", style: { color: "var(--t-text)", lineHeight: "20px" }, children: f }),
|
|
3438
3441
|
c.id === l && /* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { border: "1.5px solid var(--t-card-border)", borderRadius: 100, paddingLeft: 8, paddingRight: 8, color: "var(--t-text-secondary)", lineHeight: "20px", letterSpacing: "0.22px" }, children: o("modal.recommended") }),
|
|
3439
|
-
|
|
3442
|
+
p && /* @__PURE__ */ e("div", { style: { width: 40, height: 20, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
|
|
3440
3443
|
"path",
|
|
3441
3444
|
{
|
|
3442
3445
|
d: "M13.5 4.5L6 12L2.5 8.5",
|
|
@@ -3456,7 +3459,7 @@ function qn({
|
|
|
3456
3459
|
] })
|
|
3457
3460
|
] });
|
|
3458
3461
|
}
|
|
3459
|
-
function
|
|
3462
|
+
function tr({
|
|
3460
3463
|
checked: t,
|
|
3461
3464
|
onChange: a,
|
|
3462
3465
|
accentColor: n
|
|
@@ -3488,14 +3491,14 @@ function er({
|
|
|
3488
3491
|
}
|
|
3489
3492
|
);
|
|
3490
3493
|
}
|
|
3491
|
-
const
|
|
3494
|
+
const ar = [
|
|
3492
3495
|
{ key: "settings.privacy", href: "https://nowramp.com/privacy-policy" },
|
|
3493
3496
|
{ key: "settings.terms", href: "https://nowramp.com/terms-and-conditions" }
|
|
3494
3497
|
], ht = {
|
|
3495
3498
|
background: "var(--t-surface)",
|
|
3496
3499
|
borderRadius: "var(--t-card-radius)"
|
|
3497
3500
|
};
|
|
3498
|
-
function
|
|
3501
|
+
function nr({
|
|
3499
3502
|
onClose: t,
|
|
3500
3503
|
darkMode: a,
|
|
3501
3504
|
onToggleDarkMode: n,
|
|
@@ -3509,8 +3512,8 @@ function ar({
|
|
|
3509
3512
|
assetBaseUrl: h = ""
|
|
3510
3513
|
}) {
|
|
3511
3514
|
var y;
|
|
3512
|
-
const { t:
|
|
3513
|
-
return /* @__PURE__ */ i(
|
|
3515
|
+
const { t: p, locale: f, languages: x } = _t(), [S, R] = k(!1);
|
|
3516
|
+
return /* @__PURE__ */ i(Z, { children: [
|
|
3514
3517
|
/* @__PURE__ */ i("div", { className: "relative shrink-0", style: { height: 80, background: "var(--t-header-bg)", backdropFilter: "blur(var(--t-header-blur))", WebkitBackdropFilter: "blur(var(--t-header-blur))" }, children: [
|
|
3515
3518
|
/* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(Ae, { width: 46 }) }),
|
|
3516
3519
|
/* @__PURE__ */ e("div", { className: "absolute", style: { right: 12, top: 20 }, children: /* @__PURE__ */ e(Oe, { onClick: t }) })
|
|
@@ -3523,10 +3526,10 @@ function ar({
|
|
|
3523
3526
|
className: "w-full text-left transition-colors card-press modal-item-in",
|
|
3524
3527
|
style: { ...ht, backgroundColor: "var(--t-surface)", color: "inherit", border: "none", cursor: "pointer", padding: "12px 16px" },
|
|
3525
3528
|
children: [
|
|
3526
|
-
/* @__PURE__ */ e("span", { className: "text-[13px] block mb-1.5", style: { color: "var(--t-text-secondary)" }, children:
|
|
3529
|
+
/* @__PURE__ */ e("span", { className: "text-[13px] block mb-1.5", style: { color: "var(--t-text-secondary)" }, children: p("settings.location") }),
|
|
3527
3530
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
|
|
3528
3531
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-3", children: [
|
|
3529
|
-
m && !
|
|
3532
|
+
m && !S ? /* @__PURE__ */ e(
|
|
3530
3533
|
"img",
|
|
3531
3534
|
{
|
|
3532
3535
|
src: `${h}/flags/${m.toLowerCase()}.svg`,
|
|
@@ -3534,9 +3537,9 @@ function ar({
|
|
|
3534
3537
|
width: 28,
|
|
3535
3538
|
height: 28,
|
|
3536
3539
|
style: { width: 28, height: 28, borderRadius: "50%", objectFit: "cover" },
|
|
3537
|
-
onError: () =>
|
|
3540
|
+
onError: () => R(!0)
|
|
3538
3541
|
}
|
|
3539
|
-
) : /* @__PURE__ */ e(
|
|
3542
|
+
) : /* @__PURE__ */ e(rr, { size: 28 }),
|
|
3540
3543
|
/* @__PURE__ */ e("span", { className: "text-[15px] font-medium", style: { color: "var(--t-text)" }, children: l || m })
|
|
3541
3544
|
] }),
|
|
3542
3545
|
/* @__PURE__ */ e(Re, {})
|
|
@@ -3550,8 +3553,8 @@ function ar({
|
|
|
3550
3553
|
className: "flex items-center justify-between w-full px-4 modal-item-in",
|
|
3551
3554
|
style: { ...ht, paddingTop: 14, paddingBottom: 14, animationDelay: "60ms" },
|
|
3552
3555
|
children: [
|
|
3553
|
-
/* @__PURE__ */ e("span", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children:
|
|
3554
|
-
/* @__PURE__ */ e(
|
|
3556
|
+
/* @__PURE__ */ e("span", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: p("settings.darkMode") }),
|
|
3557
|
+
/* @__PURE__ */ e(tr, { checked: a, onChange: n })
|
|
3555
3558
|
]
|
|
3556
3559
|
}
|
|
3557
3560
|
),
|
|
@@ -3562,30 +3565,30 @@ function ar({
|
|
|
3562
3565
|
className: "flex items-center justify-between w-full transition-colors card-press modal-item-in",
|
|
3563
3566
|
style: { ...ht, backgroundColor: "var(--t-surface)", color: "inherit", border: "none", cursor: "pointer", padding: "14px 16px", margin: 0, textAlign: "left", animationDelay: "120ms" },
|
|
3564
3567
|
children: [
|
|
3565
|
-
/* @__PURE__ */ e("span", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children:
|
|
3566
|
-
/* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: ((y =
|
|
3568
|
+
/* @__PURE__ */ e("span", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: p("settings.language") }),
|
|
3569
|
+
/* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: ((y = x.find((E) => E.code === f)) == null ? void 0 : y.name) || f })
|
|
3567
3570
|
]
|
|
3568
3571
|
}
|
|
3569
3572
|
),
|
|
3570
|
-
|
|
3573
|
+
ar.map((E, K) => /* @__PURE__ */ i(
|
|
3571
3574
|
"a",
|
|
3572
3575
|
{
|
|
3573
|
-
href:
|
|
3576
|
+
href: E.href,
|
|
3574
3577
|
target: "_blank",
|
|
3575
3578
|
rel: "noopener noreferrer",
|
|
3576
3579
|
className: "flex items-center justify-between w-full px-4 transition-colors card-press modal-item-in",
|
|
3577
|
-
style: { ...ht, textDecoration: "none", color: "inherit", paddingTop: 14, paddingBottom: 14, animationDelay: `${180 +
|
|
3580
|
+
style: { ...ht, textDecoration: "none", color: "inherit", paddingTop: 14, paddingBottom: 14, animationDelay: `${180 + K * 60}ms` },
|
|
3578
3581
|
children: [
|
|
3579
|
-
/* @__PURE__ */ e("span", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children:
|
|
3580
|
-
/* @__PURE__ */ e(
|
|
3582
|
+
/* @__PURE__ */ e("span", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: p(E.key) }),
|
|
3583
|
+
/* @__PURE__ */ e(Hn, {})
|
|
3581
3584
|
]
|
|
3582
3585
|
},
|
|
3583
|
-
|
|
3586
|
+
E.key
|
|
3584
3587
|
))
|
|
3585
3588
|
] })
|
|
3586
3589
|
] });
|
|
3587
3590
|
}
|
|
3588
|
-
function
|
|
3591
|
+
function rr({ size: t = 28 }) {
|
|
3589
3592
|
return /* @__PURE__ */ i("svg", { width: t, height: t, viewBox: "0 0 40 40", fill: "none", children: [
|
|
3590
3593
|
/* @__PURE__ */ e("circle", { cx: "20", cy: "20", r: "18", stroke: "var(--t-text-secondary)", strokeWidth: "1.5", fill: "none" }),
|
|
3591
3594
|
/* @__PURE__ */ e("ellipse", { cx: "20", cy: "20", rx: "9", ry: "18", stroke: "var(--t-text-secondary)", strokeWidth: "1.5", fill: "none" }),
|
|
@@ -3593,20 +3596,20 @@ function nr({ size: t = 28 }) {
|
|
|
3593
3596
|
/* @__PURE__ */ e("path", { d: "M5 12h30M5 28h30", stroke: "var(--t-text-secondary)", strokeWidth: "1.2" })
|
|
3594
3597
|
] });
|
|
3595
3598
|
}
|
|
3596
|
-
function
|
|
3599
|
+
function or({
|
|
3597
3600
|
onClose: t,
|
|
3598
3601
|
onSelect: a,
|
|
3599
3602
|
assetBaseUrl: n = "",
|
|
3600
3603
|
selectedCode: r
|
|
3601
3604
|
}) {
|
|
3602
|
-
const o = P(), [s, m] =
|
|
3605
|
+
const o = P(), [s, m] = k(""), l = W(() => {
|
|
3603
3606
|
const d = s.trim().toLowerCase();
|
|
3604
3607
|
if (!d) {
|
|
3605
3608
|
if (r) {
|
|
3606
|
-
const c = r.toLowerCase(), h =
|
|
3609
|
+
const c = r.toLowerCase(), h = Ot[c];
|
|
3607
3610
|
if (h) {
|
|
3608
|
-
const
|
|
3609
|
-
return [h, ...
|
|
3611
|
+
const p = ft.filter((f) => f.code !== c);
|
|
3612
|
+
return [h, ...p];
|
|
3610
3613
|
}
|
|
3611
3614
|
}
|
|
3612
3615
|
return ft;
|
|
@@ -3615,7 +3618,7 @@ function rr({
|
|
|
3615
3618
|
(c) => c.name.toLowerCase().includes(d) || c.code.includes(d) || c.defaultFiat.toLowerCase().includes(d)
|
|
3616
3619
|
);
|
|
3617
3620
|
}, [s, r]);
|
|
3618
|
-
return /* @__PURE__ */ i(
|
|
3621
|
+
return /* @__PURE__ */ i(Z, { children: [
|
|
3619
3622
|
/* @__PURE__ */ i("div", { className: "relative shrink-0", style: { height: 128, background: "var(--t-header-bg)", backdropFilter: "blur(var(--t-header-blur))", WebkitBackdropFilter: "blur(var(--t-header-blur))" }, children: [
|
|
3620
3623
|
/* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(Ae, { width: 46 }) }),
|
|
3621
3624
|
/* @__PURE__ */ e("p", { className: "absolute text-[16px] text-center truncate", style: { top: 28, left: 64, right: 64, color: "var(--t-text)", lineHeight: "24px" }, children: o("modal.selectCountry") }),
|
|
@@ -3632,7 +3635,7 @@ function rr({
|
|
|
3632
3635
|
className: "flex items-center w-full card-press hover-item modal-item-in",
|
|
3633
3636
|
style: { gap: 16, animationDelay: `${Math.min(c * 45, 350)}ms` },
|
|
3634
3637
|
children: [
|
|
3635
|
-
/* @__PURE__ */ e(
|
|
3638
|
+
/* @__PURE__ */ e(ir, { code: d.code, size: 32, baseUrl: n }),
|
|
3636
3639
|
/* @__PURE__ */ i("div", { className: "flex-1 flex items-center", style: { borderBottom: "1px solid var(--t-card-border)", paddingTop: 20, paddingBottom: 20, gap: 10 }, children: [
|
|
3637
3640
|
/* @__PURE__ */ e("span", { className: "flex-1 text-[18px] text-left", style: { color: "var(--t-text)", lineHeight: "20px" }, children: d.name }),
|
|
3638
3641
|
h && /* @__PURE__ */ e("div", { style: { width: 40, height: 20, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
|
|
@@ -3655,8 +3658,8 @@ function rr({
|
|
|
3655
3658
|
] })
|
|
3656
3659
|
] });
|
|
3657
3660
|
}
|
|
3658
|
-
function
|
|
3659
|
-
const [r, o] =
|
|
3661
|
+
function ir({ code: t, size: a = 32, baseUrl: n = "" }) {
|
|
3662
|
+
const [r, o] = k(!1);
|
|
3660
3663
|
return r ? /* @__PURE__ */ e(
|
|
3661
3664
|
"div",
|
|
3662
3665
|
{
|
|
@@ -3685,28 +3688,28 @@ function or({ code: t, size: a = 32, baseUrl: n = "" }) {
|
|
|
3685
3688
|
}
|
|
3686
3689
|
);
|
|
3687
3690
|
}
|
|
3688
|
-
function
|
|
3691
|
+
function lr({
|
|
3689
3692
|
onClose: t,
|
|
3690
3693
|
onSelect: a,
|
|
3691
3694
|
selectedCode: n
|
|
3692
3695
|
}) {
|
|
3693
|
-
const r = P(), [o, s] =
|
|
3696
|
+
const r = P(), [o, s] = k(""), m = W(() => {
|
|
3694
3697
|
const l = o.trim().toLowerCase();
|
|
3695
3698
|
if (!l) {
|
|
3696
3699
|
if (n) {
|
|
3697
|
-
const d =
|
|
3700
|
+
const d = Ze.find((c) => c.code === n);
|
|
3698
3701
|
if (d) {
|
|
3699
|
-
const c =
|
|
3702
|
+
const c = Ze.filter((h) => h.code !== n);
|
|
3700
3703
|
return [d, ...c];
|
|
3701
3704
|
}
|
|
3702
3705
|
}
|
|
3703
|
-
return
|
|
3706
|
+
return Ze;
|
|
3704
3707
|
}
|
|
3705
|
-
return
|
|
3708
|
+
return Ze.filter(
|
|
3706
3709
|
(d) => d.name.toLowerCase().includes(l) || d.english.toLowerCase().includes(l) || d.code.includes(l)
|
|
3707
3710
|
);
|
|
3708
3711
|
}, [o, n]);
|
|
3709
|
-
return /* @__PURE__ */ i(
|
|
3712
|
+
return /* @__PURE__ */ i(Z, { children: [
|
|
3710
3713
|
/* @__PURE__ */ i("div", { className: "relative shrink-0", style: { height: 128, background: "var(--t-header-bg)", backdropFilter: "blur(var(--t-header-blur))", WebkitBackdropFilter: "blur(var(--t-header-blur))" }, children: [
|
|
3711
3714
|
/* @__PURE__ */ e("div", { className: "absolute", style: { left: 12, top: 20 }, children: /* @__PURE__ */ e(Ae, { width: 46 }) }),
|
|
3712
3715
|
/* @__PURE__ */ e("p", { className: "absolute text-[16px] text-center truncate", style: { top: 28, left: 64, right: 64, color: "var(--t-text)", lineHeight: "24px" }, children: r("modal.selectLanguage") }),
|
|
@@ -3744,7 +3747,7 @@ function ir({
|
|
|
3744
3747
|
] })
|
|
3745
3748
|
] });
|
|
3746
3749
|
}
|
|
3747
|
-
function
|
|
3750
|
+
function cr({
|
|
3748
3751
|
tab: t,
|
|
3749
3752
|
onTabSwitch: a,
|
|
3750
3753
|
showFlowToggle: n,
|
|
@@ -3827,12 +3830,12 @@ function lr({
|
|
|
3827
3830
|
]
|
|
3828
3831
|
}
|
|
3829
3832
|
) : /* @__PURE__ */ e("div", {}),
|
|
3830
|
-
/* @__PURE__ */ e("div", { style: { width: 40, display: "flex", alignItems: "center", justifyContent: "flex-end" }, children: r ? /* @__PURE__ */ e(
|
|
3833
|
+
/* @__PURE__ */ e("div", { style: { width: 40, display: "flex", alignItems: "center", justifyContent: "flex-end" }, children: r ? /* @__PURE__ */ e(jn, { onClick: o }) : /* @__PURE__ */ e("div", { style: { width: 40 } }) })
|
|
3831
3834
|
]
|
|
3832
3835
|
}
|
|
3833
3836
|
);
|
|
3834
3837
|
}
|
|
3835
|
-
function
|
|
3838
|
+
function sr({
|
|
3836
3839
|
amount: t,
|
|
3837
3840
|
onAmountChange: a,
|
|
3838
3841
|
currencyCode: n,
|
|
@@ -3844,25 +3847,25 @@ function cr({
|
|
|
3844
3847
|
onBlur: d,
|
|
3845
3848
|
inputRef: c,
|
|
3846
3849
|
chainCode: h,
|
|
3847
|
-
chainDisplay:
|
|
3850
|
+
chainDisplay: p,
|
|
3848
3851
|
getChainIconUrl: f,
|
|
3849
|
-
shaking:
|
|
3850
|
-
onFocus:
|
|
3852
|
+
shaking: x,
|
|
3853
|
+
onFocus: S
|
|
3851
3854
|
}) {
|
|
3852
|
-
var y,
|
|
3853
|
-
const
|
|
3854
|
-
return /* @__PURE__ */ i(
|
|
3855
|
+
var y, E, K;
|
|
3856
|
+
const R = P();
|
|
3857
|
+
return /* @__PURE__ */ i(Z, { children: [
|
|
3855
3858
|
/* @__PURE__ */ i(
|
|
3856
3859
|
"div",
|
|
3857
3860
|
{
|
|
3858
|
-
className: `flex flex-col gap-[20px] p-4 card-hover${
|
|
3861
|
+
className: `flex flex-col gap-[20px] p-4 card-hover${x ? " error-shake" : ""}`,
|
|
3859
3862
|
style: {
|
|
3860
3863
|
background: "var(--t-surface)",
|
|
3861
3864
|
borderRadius: "var(--t-card-radius)",
|
|
3862
3865
|
...m ? { border: "1px solid var(--t-error)" } : {}
|
|
3863
3866
|
},
|
|
3864
3867
|
children: [
|
|
3865
|
-
/* @__PURE__ */ e("div", { className: "text-[16px]", style: { color: "var(--t-text-secondary)", lineHeight: "16px" }, children:
|
|
3868
|
+
/* @__PURE__ */ e("div", { className: "text-[16px]", style: { color: "var(--t-text-secondary)", lineHeight: "16px" }, children: R("spend.label") }),
|
|
3866
3869
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
|
|
3867
3870
|
/* @__PURE__ */ e(
|
|
3868
3871
|
"input",
|
|
@@ -3871,9 +3874,9 @@ function cr({
|
|
|
3871
3874
|
type: "text",
|
|
3872
3875
|
value: t,
|
|
3873
3876
|
onChange: a,
|
|
3874
|
-
onFocus:
|
|
3877
|
+
onFocus: S,
|
|
3875
3878
|
onBlur: d,
|
|
3876
|
-
placeholder:
|
|
3879
|
+
placeholder: R(r ? "spend.placeholderFiat" : "spend.placeholderCrypto"),
|
|
3877
3880
|
className: "bg-transparent outline-none w-0 flex-1 mr-3",
|
|
3878
3881
|
style: {
|
|
3879
3882
|
color: "var(--t-text)",
|
|
@@ -3907,9 +3910,9 @@ function cr({
|
|
|
3907
3910
|
backdropFilter: "blur(4px)",
|
|
3908
3911
|
WebkitBackdropFilter: "blur(4px)"
|
|
3909
3912
|
},
|
|
3910
|
-
disabled: !!((
|
|
3913
|
+
disabled: !!((E = l == null ? void 0 : l.sourceCurrency) != null && E.locked),
|
|
3911
3914
|
children: [
|
|
3912
|
-
/* @__PURE__ */ e(
|
|
3915
|
+
/* @__PURE__ */ e(jt, { currencyCode: n, size: 24, baseUrl: s }),
|
|
3913
3916
|
/* @__PURE__ */ e("span", { className: "text-[14px] font-semibold", style: { color: "var(--t-text)", letterSpacing: "0.14px", lineHeight: "24px" }, children: n }),
|
|
3914
3917
|
/* @__PURE__ */ e(Re, {})
|
|
3915
3918
|
]
|
|
@@ -3931,7 +3934,7 @@ function cr({
|
|
|
3931
3934
|
backdropFilter: "blur(4px)",
|
|
3932
3935
|
WebkitBackdropFilter: "blur(4px)"
|
|
3933
3936
|
},
|
|
3934
|
-
disabled: !!((
|
|
3937
|
+
disabled: !!((K = l == null ? void 0 : l.destinationCurrency) != null && K.locked),
|
|
3935
3938
|
children: [
|
|
3936
3939
|
/* @__PURE__ */ e(Ra, { ticker: n, size: 24, baseUrl: s }),
|
|
3937
3940
|
/* @__PURE__ */ e("span", { className: "text-[14px] font-semibold", style: { color: "var(--t-text)", letterSpacing: "0.14px", lineHeight: "24px" }, children: n }),
|
|
@@ -3951,7 +3954,7 @@ function cr({
|
|
|
3951
3954
|
style: { width: 14, height: 14 }
|
|
3952
3955
|
}
|
|
3953
3956
|
) }),
|
|
3954
|
-
/* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children:
|
|
3957
|
+
/* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: p })
|
|
3955
3958
|
] })
|
|
3956
3959
|
] })
|
|
3957
3960
|
] })
|
|
@@ -3961,19 +3964,19 @@ function cr({
|
|
|
3961
3964
|
m && /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5 text-center", style: { color: "var(--t-error)" }, children: m })
|
|
3962
3965
|
] });
|
|
3963
3966
|
}
|
|
3964
|
-
function
|
|
3967
|
+
function dr({ char: t, height: a = 38 }) {
|
|
3965
3968
|
const n = "0123456789", r = n.indexOf(t);
|
|
3966
3969
|
return r === -1 ? /* @__PURE__ */ e("span", { style: { display: "inline-block", textAlign: "center" }, children: t }) : /* @__PURE__ */ e("span", { className: "digit-slot", style: { height: a, lineHeight: `${a}px`, textAlign: "center" }, children: /* @__PURE__ */ e("span", { className: "digit-slot-inner block", style: { transform: `translateY(-${r * a}px)` }, children: n.split("").map((o) => /* @__PURE__ */ e("span", { className: "block", style: { height: a, lineHeight: `${a}px` }, children: o }, o)) }) });
|
|
3967
3970
|
}
|
|
3968
|
-
function
|
|
3971
|
+
function ur({
|
|
3969
3972
|
value: t,
|
|
3970
3973
|
height: a = 38,
|
|
3971
3974
|
className: n = "",
|
|
3972
3975
|
style: r = {}
|
|
3973
3976
|
}) {
|
|
3974
|
-
return /* @__PURE__ */ e("span", { className: n, style: { display: "inline-flex", fontVariantNumeric: "tabular-nums", ...r }, children: t.split("").map((o, s) => /* @__PURE__ */ e(
|
|
3977
|
+
return /* @__PURE__ */ e("span", { className: n, style: { display: "inline-flex", fontVariantNumeric: "tabular-nums", ...r }, children: t.split("").map((o, s) => /* @__PURE__ */ e(dr, { char: o, height: a }, s)) });
|
|
3975
3978
|
}
|
|
3976
|
-
function
|
|
3979
|
+
function mr({
|
|
3977
3980
|
amount: t,
|
|
3978
3981
|
currencyCode: a,
|
|
3979
3982
|
chainCode: n,
|
|
@@ -3985,13 +3988,13 @@ function ur({
|
|
|
3985
3988
|
quotesLoading: d,
|
|
3986
3989
|
onOpenRateBreakdown: c,
|
|
3987
3990
|
fieldLocks: h,
|
|
3988
|
-
spendNumeric:
|
|
3991
|
+
spendNumeric: p,
|
|
3989
3992
|
getChainIconUrl: f,
|
|
3990
|
-
autoSelectPending:
|
|
3991
|
-
rateFlash:
|
|
3993
|
+
autoSelectPending: x,
|
|
3994
|
+
rateFlash: S
|
|
3992
3995
|
}) {
|
|
3993
|
-
var y,
|
|
3994
|
-
const
|
|
3996
|
+
var y, E;
|
|
3997
|
+
const R = P();
|
|
3995
3998
|
return /* @__PURE__ */ e(
|
|
3996
3999
|
"div",
|
|
3997
4000
|
{
|
|
@@ -4002,17 +4005,17 @@ function ur({
|
|
|
4002
4005
|
background: "transparent"
|
|
4003
4006
|
},
|
|
4004
4007
|
children: /* @__PURE__ */ i("div", { className: "flex flex-col gap-[20px]", children: [
|
|
4005
|
-
/* @__PURE__ */ e("div", { className: "text-[16px]", style: { color: "var(--t-text-secondary)", lineHeight: "16px" }, children:
|
|
4008
|
+
/* @__PURE__ */ e("div", { className: "text-[16px]", style: { color: "var(--t-text-secondary)", lineHeight: "16px" }, children: R("receive.label") }),
|
|
4006
4009
|
/* @__PURE__ */ i("div", { className: "flex flex-col gap-[8px]", children: [
|
|
4007
4010
|
/* @__PURE__ */ i("div", { className: "flex items-start justify-between", children: [
|
|
4008
|
-
/* @__PURE__ */ e("div", { className:
|
|
4009
|
-
|
|
4011
|
+
/* @__PURE__ */ e("div", { className: S ? "rate-flash" : "", children: /* @__PURE__ */ e(
|
|
4012
|
+
ur,
|
|
4010
4013
|
{
|
|
4011
|
-
value:
|
|
4014
|
+
value: p > 0 ? t : "0",
|
|
4012
4015
|
height: 32,
|
|
4013
4016
|
className: "font-medium",
|
|
4014
4017
|
style: {
|
|
4015
|
-
color:
|
|
4018
|
+
color: p > 0 ? "var(--t-text)" : "var(--t-text-muted)",
|
|
4016
4019
|
fontSize: 24
|
|
4017
4020
|
}
|
|
4018
4021
|
}
|
|
@@ -4056,9 +4059,9 @@ function ur({
|
|
|
4056
4059
|
backdropFilter: "blur(4px)",
|
|
4057
4060
|
WebkitBackdropFilter: "blur(4px)"
|
|
4058
4061
|
},
|
|
4059
|
-
disabled: !!((
|
|
4062
|
+
disabled: !!((E = h == null ? void 0 : h.sourceCurrency) != null && E.locked),
|
|
4060
4063
|
children: [
|
|
4061
|
-
/* @__PURE__ */ e(
|
|
4064
|
+
/* @__PURE__ */ e(jt, { currencyCode: a, size: 24, baseUrl: l }),
|
|
4062
4065
|
/* @__PURE__ */ e("span", { className: "text-[14px] font-semibold", style: { color: "var(--t-text)", letterSpacing: "0.14px", lineHeight: "24px" }, children: a }),
|
|
4063
4066
|
/* @__PURE__ */ e(Re, {})
|
|
4064
4067
|
]
|
|
@@ -4066,17 +4069,17 @@ function ur({
|
|
|
4066
4069
|
)
|
|
4067
4070
|
] }),
|
|
4068
4071
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
|
|
4069
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-[4px]", children: d && !
|
|
4072
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-[4px]", children: d && !x ? /* @__PURE__ */ i(Z, { children: [
|
|
4070
4073
|
/* @__PURE__ */ e(Ee, { size: 12 }),
|
|
4071
|
-
/* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { color: "var(--t-text-muted)", letterSpacing: "0.22px", lineHeight: "12px" }, children:
|
|
4072
|
-
] }) : /* @__PURE__ */ i(
|
|
4074
|
+
/* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { color: "var(--t-text-muted)", letterSpacing: "0.22px", lineHeight: "12px" }, children: R("receive.fetchingRate") })
|
|
4075
|
+
] }) : /* @__PURE__ */ i(Z, { children: [
|
|
4073
4076
|
/* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { color: "var(--t-text-muted)", letterSpacing: "0.22px", lineHeight: "12px" }, children: m || " " }),
|
|
4074
4077
|
m && /* @__PURE__ */ e(
|
|
4075
4078
|
"button",
|
|
4076
4079
|
{
|
|
4077
4080
|
onClick: c,
|
|
4078
4081
|
className: "flex items-center justify-center opacity-60 hover:opacity-100 transition-opacity",
|
|
4079
|
-
children: /* @__PURE__ */ e(
|
|
4082
|
+
children: /* @__PURE__ */ e(Ht, { size: 12 })
|
|
4080
4083
|
}
|
|
4081
4084
|
)
|
|
4082
4085
|
] }) }),
|
|
@@ -4100,7 +4103,7 @@ function ur({
|
|
|
4100
4103
|
}
|
|
4101
4104
|
);
|
|
4102
4105
|
}
|
|
4103
|
-
function
|
|
4106
|
+
function pr({
|
|
4104
4107
|
selectedMethod: t,
|
|
4105
4108
|
onOpenModal: a,
|
|
4106
4109
|
getMethodIcon: n,
|
|
@@ -4124,7 +4127,7 @@ function mr({
|
|
|
4124
4127
|
children: [
|
|
4125
4128
|
/* @__PURE__ */ e("span", { className: "text-[13px] flex-1", style: { color: "var(--t-text-secondary)", letterSpacing: "0.13px", lineHeight: "20px" }, children: o("payment.label") }),
|
|
4126
4129
|
/* @__PURE__ */ i("span", { className: "flex items-center gap-[6px]", children: [
|
|
4127
|
-
t && /* @__PURE__ */ i(
|
|
4130
|
+
t && /* @__PURE__ */ i(Z, { children: [
|
|
4128
4131
|
/* @__PURE__ */ e("span", { className: "flex items-center justify-center", style: { width: 20, height: 20 }, children: n(t.id, t.icon, 20) }),
|
|
4129
4132
|
/* @__PURE__ */ e("span", { className: "text-[14px] font-semibold", style: { color: "var(--t-text)", letterSpacing: "0.14px", lineHeight: "16px" }, children: r(t.id, t.name) })
|
|
4130
4133
|
] }),
|
|
@@ -4135,20 +4138,21 @@ function mr({
|
|
|
4135
4138
|
}
|
|
4136
4139
|
);
|
|
4137
4140
|
}
|
|
4138
|
-
function
|
|
4141
|
+
function hr({
|
|
4139
4142
|
selectedQuote: t,
|
|
4140
4143
|
quotesLoading: a,
|
|
4141
|
-
onOpenModal: n
|
|
4144
|
+
onOpenModal: n,
|
|
4145
|
+
assetBaseUrl: r = ""
|
|
4142
4146
|
}) {
|
|
4143
|
-
const
|
|
4147
|
+
const o = P();
|
|
4144
4148
|
return /* @__PURE__ */ i(
|
|
4145
4149
|
"div",
|
|
4146
4150
|
{
|
|
4147
4151
|
role: "button",
|
|
4148
4152
|
tabIndex: 0,
|
|
4149
4153
|
onClick: n,
|
|
4150
|
-
onKeyDown: (
|
|
4151
|
-
(
|
|
4154
|
+
onKeyDown: (s) => {
|
|
4155
|
+
(s.key === "Enter" || s.key === " ") && n();
|
|
4152
4156
|
},
|
|
4153
4157
|
className: "flex items-center gap-[4px] p-4 transition-colors cursor-pointer card-press card-hover",
|
|
4154
4158
|
style: {
|
|
@@ -4156,22 +4160,25 @@ function pr({
|
|
|
4156
4160
|
borderRadius: "var(--t-card-radius)"
|
|
4157
4161
|
},
|
|
4158
4162
|
children: [
|
|
4159
|
-
/* @__PURE__ */ e("span", { className: "text-[13px] flex-1", style: { color: "var(--t-text-secondary)", letterSpacing: "0.13px", lineHeight: "20px" }, children:
|
|
4163
|
+
/* @__PURE__ */ e("span", { className: "text-[13px] flex-1", style: { color: "var(--t-text-secondary)", letterSpacing: "0.13px", lineHeight: "20px" }, children: o("provider.label") }),
|
|
4160
4164
|
/* @__PURE__ */ i("span", { className: "flex items-center gap-[6px]", children: [
|
|
4161
4165
|
a && !t && /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-muted)" }, children: "..." }),
|
|
4162
|
-
!a && !t && /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-muted)" }, children:
|
|
4163
|
-
t && /* @__PURE__ */ i(
|
|
4164
|
-
/* @__PURE__ */ e("span", { className: "flex items-center justify-center", style: { width: 20, height: 20 }, children:
|
|
4166
|
+
!a && !t && /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-muted)" }, children: o("provider.select") }),
|
|
4167
|
+
t && /* @__PURE__ */ i(Z, { children: [
|
|
4168
|
+
/* @__PURE__ */ e("span", { className: "flex items-center justify-center overflow-hidden rounded-full", style: { width: 20, height: 20 }, children: /* @__PURE__ */ e(
|
|
4165
4169
|
"img",
|
|
4166
4170
|
{
|
|
4167
|
-
src: t.
|
|
4168
|
-
alt:
|
|
4171
|
+
src: ka(t.gatewayId, r),
|
|
4172
|
+
alt: "",
|
|
4169
4173
|
width: 20,
|
|
4170
4174
|
height: 20,
|
|
4171
4175
|
className: "rounded-full",
|
|
4172
|
-
style: { width: 20, height: 20 }
|
|
4176
|
+
style: { width: 20, height: 20, objectFit: "cover" },
|
|
4177
|
+
onError: (s) => {
|
|
4178
|
+
t.gatewayLogo && s.target.src !== t.gatewayLogo && (s.target.src = t.gatewayLogo);
|
|
4179
|
+
}
|
|
4173
4180
|
}
|
|
4174
|
-
)
|
|
4181
|
+
) }),
|
|
4175
4182
|
/* @__PURE__ */ e("span", { className: "text-[14px] font-semibold", style: { color: "var(--t-text)", letterSpacing: "0.14px", lineHeight: "16px" }, children: t.gatewayName })
|
|
4176
4183
|
] }),
|
|
4177
4184
|
/* @__PURE__ */ e(Re, {})
|
|
@@ -4180,27 +4187,46 @@ function pr({
|
|
|
4180
4187
|
}
|
|
4181
4188
|
);
|
|
4182
4189
|
}
|
|
4183
|
-
function
|
|
4190
|
+
function fr() {
|
|
4191
|
+
return /* @__PURE__ */ e("svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "none", style: { flexShrink: 0 }, children: /* @__PURE__ */ e("path", { d: "M8 1l2.12 4.3 4.74.69-3.43 3.34.81 4.72L8 11.77l-4.24 2.28.81-4.72L1.14 5.99l4.74-.69L8 1z", fill: "var(--t-success)" }) });
|
|
4192
|
+
}
|
|
4193
|
+
function yr() {
|
|
4194
|
+
return /* @__PURE__ */ i("svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "none", style: { flexShrink: 0 }, children: [
|
|
4195
|
+
/* @__PURE__ */ e("path", { d: "M14 7.5a6 6 0 11-12 0 6 6 0 0112 0z", stroke: "var(--t-accent)", strokeWidth: "1.5" }),
|
|
4196
|
+
/* @__PURE__ */ e("path", { d: "M5.5 8l2 2 3.5-4", stroke: "var(--t-accent)", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
4197
|
+
] });
|
|
4198
|
+
}
|
|
4199
|
+
function gr({ quote: t }) {
|
|
4184
4200
|
const a = P();
|
|
4185
|
-
return t.isBestRate ? /* @__PURE__ */
|
|
4201
|
+
return t.isBestRate ? /* @__PURE__ */ i("div", { className: "flex items-center gap-1 mt-0.5", children: [
|
|
4202
|
+
/* @__PURE__ */ e(fr, {}),
|
|
4203
|
+
/* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { color: "var(--t-success)" }, children: a("modal.bestPrice") })
|
|
4204
|
+
] }) : t.isRecommended ? /* @__PURE__ */ i("div", { className: "flex items-center gap-1 mt-0.5", children: [
|
|
4205
|
+
/* @__PURE__ */ e(yr, {}),
|
|
4206
|
+
/* @__PURE__ */ e("span", { className: "text-[11px] font-medium", style: { color: "var(--t-accent)" }, children: a("modal.recommended") })
|
|
4207
|
+
] }) : t.rank && t.rank <= 3 ? /* @__PURE__ */ i("div", { className: "text-[11px] mt-0.5", style: { color: "var(--t-text-muted)" }, children: [
|
|
4186
4208
|
"#",
|
|
4187
4209
|
t.rank
|
|
4188
4210
|
] }) : null;
|
|
4189
4211
|
}
|
|
4190
|
-
function
|
|
4191
|
-
|
|
4212
|
+
function xr({ quote: t, assetBaseUrl: a = "" }) {
|
|
4213
|
+
const n = ka(t.gatewayId, a);
|
|
4214
|
+
return /* @__PURE__ */ e("span", { className: "rounded-full shrink-0 overflow-hidden inline-flex items-center justify-center", style: { width: 36, height: 36 }, children: /* @__PURE__ */ e(
|
|
4192
4215
|
"img",
|
|
4193
4216
|
{
|
|
4194
|
-
src:
|
|
4195
|
-
alt:
|
|
4217
|
+
src: n,
|
|
4218
|
+
alt: "",
|
|
4196
4219
|
width: 36,
|
|
4197
4220
|
height: 36,
|
|
4198
|
-
className: "rounded-full
|
|
4199
|
-
style: { width: 36, height: 36 }
|
|
4221
|
+
className: "rounded-full",
|
|
4222
|
+
style: { width: 36, height: 36, objectFit: "cover" },
|
|
4223
|
+
onError: (r) => {
|
|
4224
|
+
t.gatewayLogo && r.target.src !== t.gatewayLogo && (r.target.src = t.gatewayLogo);
|
|
4225
|
+
}
|
|
4200
4226
|
}
|
|
4201
|
-
)
|
|
4227
|
+
) });
|
|
4202
4228
|
}
|
|
4203
|
-
function
|
|
4229
|
+
function vr({ pct: t }) {
|
|
4204
4230
|
if (t === 0) return null;
|
|
4205
4231
|
const a = t > 0 ? "var(--t-success)" : "var(--t-error)", n = t > 0 ? "+" : "";
|
|
4206
4232
|
return /* @__PURE__ */ i("span", { className: "text-[11px] font-medium", style: { color: a }, children: [
|
|
@@ -4209,10 +4235,10 @@ function yr({ pct: t }) {
|
|
|
4209
4235
|
"%"
|
|
4210
4236
|
] });
|
|
4211
4237
|
}
|
|
4212
|
-
function
|
|
4238
|
+
function Cr() {
|
|
4213
4239
|
return /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", style: { flexShrink: 0 }, children: /* @__PURE__ */ e("path", { d: "M3.5 8.5L6.5 11.5L12.5 4.5", stroke: "var(--t-accent)", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "checkmark-draw" }) });
|
|
4214
4240
|
}
|
|
4215
|
-
function
|
|
4241
|
+
function br() {
|
|
4216
4242
|
return /* @__PURE__ */ e("div", { className: "space-y-2", children: [0, 1, 2].map((t) => /* @__PURE__ */ i(
|
|
4217
4243
|
"div",
|
|
4218
4244
|
{
|
|
@@ -4226,99 +4252,100 @@ function xr() {
|
|
|
4226
4252
|
animationDelay: `${t * 45}ms`
|
|
4227
4253
|
},
|
|
4228
4254
|
children: [
|
|
4229
|
-
/* @__PURE__ */ e(
|
|
4255
|
+
/* @__PURE__ */ e(Q, { w: 36, h: 36, className: "rounded-full shrink-0" }),
|
|
4230
4256
|
/* @__PURE__ */ i("div", { className: "flex-1", children: [
|
|
4231
|
-
/* @__PURE__ */ e(
|
|
4232
|
-
/* @__PURE__ */ e(
|
|
4257
|
+
/* @__PURE__ */ e(Q, { w: 90, h: 14, className: "mb-1.5" }),
|
|
4258
|
+
/* @__PURE__ */ e(Q, { w: 60, h: 12 })
|
|
4233
4259
|
] }),
|
|
4234
4260
|
/* @__PURE__ */ i("div", { className: "text-right", children: [
|
|
4235
|
-
/* @__PURE__ */ e(
|
|
4236
|
-
/* @__PURE__ */ e(
|
|
4261
|
+
/* @__PURE__ */ e(Q, { w: 40, h: 10, className: "mb-1.5" }),
|
|
4262
|
+
/* @__PURE__ */ e(Q, { w: 80, h: 14 })
|
|
4237
4263
|
] })
|
|
4238
4264
|
]
|
|
4239
4265
|
},
|
|
4240
4266
|
t
|
|
4241
4267
|
)) });
|
|
4242
4268
|
}
|
|
4243
|
-
function
|
|
4269
|
+
function Sr({
|
|
4244
4270
|
onClose: t,
|
|
4245
4271
|
onSelect: a,
|
|
4246
4272
|
quotes: n,
|
|
4247
4273
|
quotesLoading: r,
|
|
4248
4274
|
cryptoCurrency: o,
|
|
4249
|
-
selectedGatewayId: s
|
|
4275
|
+
selectedGatewayId: s,
|
|
4276
|
+
assetBaseUrl: m = ""
|
|
4250
4277
|
}) {
|
|
4251
|
-
const
|
|
4278
|
+
const l = P(), [d, c] = k(""), h = W(() => {
|
|
4252
4279
|
if (!(n != null && n.quotes)) return [];
|
|
4253
|
-
const
|
|
4254
|
-
return
|
|
4255
|
-
}, [n,
|
|
4256
|
-
return /* @__PURE__ */ i(
|
|
4280
|
+
const f = d.trim().toLowerCase();
|
|
4281
|
+
return f ? n.quotes.filter((x) => x.gatewayName.toLowerCase().includes(f)) : n.quotes;
|
|
4282
|
+
}, [n, d]), p = h.length > 0 ? parseFloat(h[0].cryptoAmount) : 0;
|
|
4283
|
+
return /* @__PURE__ */ i(Z, { children: [
|
|
4257
4284
|
/* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(Oe, { onClick: t }) }),
|
|
4258
4285
|
/* @__PURE__ */ e(
|
|
4259
4286
|
"h2",
|
|
4260
4287
|
{
|
|
4261
4288
|
className: "text-center text-[17px] font-medium mt-2 mb-6",
|
|
4262
4289
|
style: { color: "var(--t-text)", fontSize: 17, fontWeight: 500, marginTop: 8, marginBottom: 24 },
|
|
4263
|
-
children:
|
|
4290
|
+
children: l("modal.chooseRamp")
|
|
4264
4291
|
}
|
|
4265
4292
|
),
|
|
4266
|
-
/* @__PURE__ */ e(Ye, { value:
|
|
4293
|
+
/* @__PURE__ */ e(Ye, { value: d, onChange: c }),
|
|
4267
4294
|
/* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto custom-scroll px-5 space-y-2", children: [
|
|
4268
|
-
r ? /* @__PURE__ */ e(
|
|
4269
|
-
const
|
|
4295
|
+
r ? /* @__PURE__ */ e(br, {}) : h.length === 0 ? /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: n && n.quotes.length === 0 ? l("modal.noQuotes") : l("modal.noProvidersFound") }) : h.map((f, x) => {
|
|
4296
|
+
const S = x === 0, R = s === f.gatewayId, y = parseFloat(f.cryptoAmount), E = y >= 1 ? y.toFixed(4) : y.toPrecision(6), K = !S && p > 0 ? (y - p) / p * 100 : 0;
|
|
4270
4297
|
return /* @__PURE__ */ i(
|
|
4271
4298
|
"button",
|
|
4272
4299
|
{
|
|
4273
|
-
onClick: () => a(
|
|
4300
|
+
onClick: () => a(f),
|
|
4274
4301
|
className: "w-full flex items-center gap-3.5 transition-colors card-press hover-item modal-item-in",
|
|
4275
4302
|
style: {
|
|
4276
|
-
borderRadius:
|
|
4277
|
-
height:
|
|
4303
|
+
borderRadius: S ? 4.5 : 5,
|
|
4304
|
+
height: S ? 63 : 64,
|
|
4278
4305
|
paddingLeft: 16,
|
|
4279
4306
|
paddingRight: 16,
|
|
4280
|
-
border:
|
|
4281
|
-
background:
|
|
4282
|
-
animationDelay: `${Math.min(
|
|
4307
|
+
border: S ? "1px solid var(--t-border)" : "1px solid transparent",
|
|
4308
|
+
background: S ? "transparent" : "var(--t-surface)",
|
|
4309
|
+
animationDelay: `${Math.min(x * 45, 350)}ms`
|
|
4283
4310
|
},
|
|
4284
4311
|
children: [
|
|
4285
|
-
/* @__PURE__ */ e(
|
|
4312
|
+
/* @__PURE__ */ e(xr, { quote: f, assetBaseUrl: m }),
|
|
4286
4313
|
/* @__PURE__ */ i("div", { className: "text-left flex-1 min-w-0", children: [
|
|
4287
|
-
/* @__PURE__ */ e("div", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children:
|
|
4288
|
-
/* @__PURE__ */ e(
|
|
4314
|
+
/* @__PURE__ */ e("div", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: f.gatewayName }),
|
|
4315
|
+
/* @__PURE__ */ e(gr, { quote: f })
|
|
4289
4316
|
] }),
|
|
4290
4317
|
/* @__PURE__ */ i("div", { className: "text-right shrink-0 flex items-center gap-2", children: [
|
|
4291
4318
|
/* @__PURE__ */ i("div", { children: [
|
|
4292
|
-
/* @__PURE__ */ e("div", { className: "text-[11px]", style: { color: "var(--t-text-secondary)" }, children:
|
|
4319
|
+
/* @__PURE__ */ e("div", { className: "text-[11px]", style: { color: "var(--t-text-secondary)" }, children: S ? l("receive.label") : /* @__PURE__ */ e(vr, { pct: K }) }),
|
|
4293
4320
|
/* @__PURE__ */ i("div", { className: "font-medium text-[14px]", style: { color: "var(--t-text)" }, children: [
|
|
4294
|
-
o,
|
|
4321
|
+
/* @__PURE__ */ e("span", { className: "text-[11px] font-normal", style: { color: "var(--t-text-secondary)" }, children: o }),
|
|
4295
4322
|
" ",
|
|
4296
|
-
|
|
4323
|
+
E
|
|
4297
4324
|
] })
|
|
4298
4325
|
] }),
|
|
4299
|
-
|
|
4326
|
+
R && /* @__PURE__ */ e(Cr, {})
|
|
4300
4327
|
] })
|
|
4301
4328
|
]
|
|
4302
4329
|
},
|
|
4303
|
-
|
|
4330
|
+
f.gatewayId
|
|
4304
4331
|
);
|
|
4305
4332
|
}),
|
|
4306
|
-
!r && (n == null ? void 0 : n.unavailableGateways) && n.unavailableGateways.length > 0 && /* @__PURE__ */ e("div", { className: "pt-3", children: n.unavailableGateways.map((
|
|
4333
|
+
!r && (n == null ? void 0 : n.unavailableGateways) && n.unavailableGateways.length > 0 && /* @__PURE__ */ e("div", { className: "pt-3", children: n.unavailableGateways.map((f) => /* @__PURE__ */ i(
|
|
4307
4334
|
"div",
|
|
4308
4335
|
{
|
|
4309
4336
|
className: "flex items-center justify-between py-2 text-[12px]",
|
|
4310
4337
|
style: { color: "var(--t-text-muted)" },
|
|
4311
4338
|
children: [
|
|
4312
|
-
/* @__PURE__ */ e("span", { children:
|
|
4313
|
-
/* @__PURE__ */ e("span", { children:
|
|
4339
|
+
/* @__PURE__ */ e("span", { children: f.gatewayName }),
|
|
4340
|
+
/* @__PURE__ */ e("span", { children: f.reason })
|
|
4314
4341
|
]
|
|
4315
4342
|
},
|
|
4316
|
-
|
|
4343
|
+
f.gatewayId
|
|
4317
4344
|
)) })
|
|
4318
4345
|
] })
|
|
4319
4346
|
] });
|
|
4320
4347
|
}
|
|
4321
|
-
function
|
|
4348
|
+
function wr({
|
|
4322
4349
|
address: t,
|
|
4323
4350
|
onChange: a,
|
|
4324
4351
|
placeholder: n,
|
|
@@ -4329,19 +4356,19 @@ function Cr({
|
|
|
4329
4356
|
onBlur: l,
|
|
4330
4357
|
focused: d
|
|
4331
4358
|
}) {
|
|
4332
|
-
const c = P(), h = o && t.trim().length >= 10, [
|
|
4359
|
+
const c = P(), h = o && t.trim().length >= 10, [p, f] = k(!1), x = I(r);
|
|
4333
4360
|
return B(() => {
|
|
4334
|
-
if (r && !
|
|
4361
|
+
if (r && !x.current) {
|
|
4335
4362
|
f(!0);
|
|
4336
|
-
const
|
|
4337
|
-
return () => clearTimeout(
|
|
4363
|
+
const S = setTimeout(() => f(!1), 400);
|
|
4364
|
+
return () => clearTimeout(S);
|
|
4338
4365
|
}
|
|
4339
|
-
|
|
4366
|
+
x.current = r;
|
|
4340
4367
|
}, [r]), /* @__PURE__ */ i("div", { children: [
|
|
4341
4368
|
/* @__PURE__ */ i(
|
|
4342
4369
|
"div",
|
|
4343
4370
|
{
|
|
4344
|
-
className: `flex flex-col gap-[4px] p-4 card-hover${
|
|
4371
|
+
className: `flex flex-col gap-[4px] p-4 card-hover${p ? " error-shake" : ""}`,
|
|
4345
4372
|
style: {
|
|
4346
4373
|
background: "var(--t-surface)",
|
|
4347
4374
|
borderRadius: "var(--t-card-radius)"
|
|
@@ -4354,7 +4381,7 @@ function Cr({
|
|
|
4354
4381
|
{
|
|
4355
4382
|
type: "text",
|
|
4356
4383
|
value: t,
|
|
4357
|
-
onChange: (
|
|
4384
|
+
onChange: (S) => a(S.target.value),
|
|
4358
4385
|
onFocus: m,
|
|
4359
4386
|
onBlur: l,
|
|
4360
4387
|
placeholder: n,
|
|
@@ -4400,7 +4427,7 @@ function Cr({
|
|
|
4400
4427
|
r && /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5 text-center", style: { color: "var(--t-error)" }, children: r })
|
|
4401
4428
|
] });
|
|
4402
4429
|
}
|
|
4403
|
-
function
|
|
4430
|
+
function kr({ label: t, disabled: a, loading: n, onClick: r }) {
|
|
4404
4431
|
return /* @__PURE__ */ e(
|
|
4405
4432
|
"button",
|
|
4406
4433
|
{
|
|
@@ -4431,14 +4458,14 @@ function br({ label: t, disabled: a, loading: n, onClick: r }) {
|
|
|
4431
4458
|
}
|
|
4432
4459
|
);
|
|
4433
4460
|
}
|
|
4434
|
-
function
|
|
4461
|
+
function Nr() {
|
|
4435
4462
|
const t = P();
|
|
4436
4463
|
return /* @__PURE__ */ i("div", { className: "text-center py-3", style: { height: 16, lineHeight: "16px" }, children: [
|
|
4437
4464
|
/* @__PURE__ */ e("span", { style: { fontSize: 9, opacity: 0.5, color: "var(--t-text)", letterSpacing: "0.27px" }, children: t("footer.poweredBy") }),
|
|
4438
4465
|
/* @__PURE__ */ e("span", { style: { fontSize: 9, opacity: 0.65, color: "var(--t-text)", letterSpacing: "0.27px" }, children: t("footer.brand") })
|
|
4439
4466
|
] });
|
|
4440
4467
|
}
|
|
4441
|
-
function
|
|
4468
|
+
function Er({
|
|
4442
4469
|
quote: t,
|
|
4443
4470
|
isOpen: a,
|
|
4444
4471
|
onClose: n,
|
|
@@ -4448,13 +4475,13 @@ function wr({
|
|
|
4448
4475
|
var c, h;
|
|
4449
4476
|
const s = P();
|
|
4450
4477
|
if (!a) return null;
|
|
4451
|
-
const m = (
|
|
4452
|
-
const f = typeof
|
|
4478
|
+
const m = (p) => String(p).padStart(2, "0"), l = (t == null ? void 0 : t.fiatCurrency) === "USD" ? "$" : (t == null ? void 0 : t.fiatCurrency) === "EUR" ? "€" : (t == null ? void 0 : t.fiatCurrency) === "GBP" ? "£" : t != null && t.fiatCurrency ? `${t.fiatCurrency} ` : "$", d = (p) => {
|
|
4479
|
+
const f = typeof p == "string" ? parseFloat(p) : p;
|
|
4453
4480
|
return isNaN(f) ? `${l}0.00` : `${l}${f.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
|
|
4454
4481
|
};
|
|
4455
4482
|
return /* @__PURE__ */ i("div", { className: "px-5 py-5", children: [
|
|
4456
4483
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-3", children: [
|
|
4457
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: o ? /* @__PURE__ */ e(Ee, { size: 16 }) : /* @__PURE__ */ i(
|
|
4484
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: o ? /* @__PURE__ */ e(Ee, { size: 16 }) : /* @__PURE__ */ i(Z, { children: [
|
|
4458
4485
|
/* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: s("rate.updatesInLabel") }),
|
|
4459
4486
|
/* @__PURE__ */ i(
|
|
4460
4487
|
"span",
|
|
@@ -4473,7 +4500,7 @@ function wr({
|
|
|
4473
4500
|
{
|
|
4474
4501
|
className: "flex items-center justify-center opacity-60 hover:opacity-100 transition-opacity cursor-help",
|
|
4475
4502
|
"aria-label": s("rate.rateTooltip"),
|
|
4476
|
-
children: /* @__PURE__ */ e(
|
|
4503
|
+
children: /* @__PURE__ */ e(Ht, { size: 12 })
|
|
4477
4504
|
}
|
|
4478
4505
|
),
|
|
4479
4506
|
/* @__PURE__ */ e(
|
|
@@ -4492,7 +4519,7 @@ function wr({
|
|
|
4492
4519
|
onClick: n,
|
|
4493
4520
|
className: "flex items-center justify-center rounded-full transition-opacity hover:opacity-70",
|
|
4494
4521
|
style: { width: 28, height: 28, background: "var(--t-surface)", color: "var(--t-text)" },
|
|
4495
|
-
children: /* @__PURE__ */ e(
|
|
4522
|
+
children: /* @__PURE__ */ e(Pt, { size: 10 })
|
|
4496
4523
|
}
|
|
4497
4524
|
)
|
|
4498
4525
|
] }),
|
|
@@ -4514,7 +4541,7 @@ function wr({
|
|
|
4514
4541
|
{
|
|
4515
4542
|
className: "flex items-center justify-center opacity-60 hover:opacity-100 transition-opacity cursor-help",
|
|
4516
4543
|
"aria-label": s("rate.networkFeeTooltip"),
|
|
4517
|
-
children: /* @__PURE__ */ e(
|
|
4544
|
+
children: /* @__PURE__ */ e(Ht, { size: 12 })
|
|
4518
4545
|
}
|
|
4519
4546
|
),
|
|
4520
4547
|
/* @__PURE__ */ e(
|
|
@@ -4541,7 +4568,7 @@ function wr({
|
|
|
4541
4568
|
] }) : /* @__PURE__ */ e("div", { className: "text-[13px] py-4 text-center", style: { color: "var(--t-text-muted)" }, children: s("rate.noQuote") })
|
|
4542
4569
|
] });
|
|
4543
4570
|
}
|
|
4544
|
-
function
|
|
4571
|
+
function Rr({
|
|
4545
4572
|
className: t = "",
|
|
4546
4573
|
theme: a = "dark",
|
|
4547
4574
|
skinId: n = "mono",
|
|
@@ -4553,30 +4580,30 @@ function kr({
|
|
|
4553
4580
|
surfaceColor: d,
|
|
4554
4581
|
inputBgColor: c,
|
|
4555
4582
|
textColor: h,
|
|
4556
|
-
textSecondaryColor:
|
|
4583
|
+
textSecondaryColor: p,
|
|
4557
4584
|
textMutedColor: f,
|
|
4558
|
-
successColor:
|
|
4559
|
-
showFlowToggle:
|
|
4560
|
-
showSettings:
|
|
4585
|
+
successColor: x,
|
|
4586
|
+
showFlowToggle: S = !0,
|
|
4587
|
+
showSettings: R = !0,
|
|
4561
4588
|
showThemeToggle: y = !0,
|
|
4562
|
-
autoRedirect:
|
|
4563
|
-
explorerUrl:
|
|
4589
|
+
autoRedirect: E = !1,
|
|
4590
|
+
explorerUrl: K,
|
|
4564
4591
|
doneButtonText: ee,
|
|
4565
|
-
supportEmail:
|
|
4592
|
+
supportEmail: z,
|
|
4566
4593
|
stablecoinParity: ie,
|
|
4567
|
-
partnerName:
|
|
4594
|
+
partnerName: J,
|
|
4568
4595
|
containerHeight: q,
|
|
4569
4596
|
locale: Ce,
|
|
4570
4597
|
onDone: te
|
|
4571
4598
|
}) {
|
|
4572
|
-
var
|
|
4599
|
+
var na, ra;
|
|
4573
4600
|
const T = P(), {
|
|
4574
4601
|
state: C,
|
|
4575
4602
|
dispatch: F,
|
|
4576
|
-
config:
|
|
4577
|
-
configLoading:
|
|
4578
|
-
quotes:
|
|
4579
|
-
quotesLoading:
|
|
4603
|
+
config: u,
|
|
4604
|
+
configLoading: D,
|
|
4605
|
+
quotes: N,
|
|
4606
|
+
quotesLoading: w,
|
|
4580
4607
|
quotesError: ae,
|
|
4581
4608
|
fetchQuotes: pe,
|
|
4582
4609
|
createOrder: be,
|
|
@@ -4584,264 +4611,264 @@ function kr({
|
|
|
4584
4611
|
amountError: he,
|
|
4585
4612
|
fieldLocks: le,
|
|
4586
4613
|
apiConfig: ce,
|
|
4587
|
-
assetBaseUrl:
|
|
4614
|
+
assetBaseUrl: X,
|
|
4588
4615
|
availableFiats: fe,
|
|
4589
4616
|
availableCryptos: Qe,
|
|
4590
4617
|
availablePaymentMethods: re,
|
|
4591
4618
|
selectionUnsupported: ye,
|
|
4592
4619
|
quotesEmpty: G,
|
|
4593
4620
|
bestUnavailableReason: Ke
|
|
4594
|
-
} = Xe(), { locale: ze, setLocale:
|
|
4621
|
+
} = Xe(), { locale: ze, setLocale: vt } = _t(), [se, _e] = k(a === "dark"), [Le, Ct] = k(n), [de, j] = k(null), [lt, $] = k(!1), [bt, Je] = k(!1), [Fe, ct] = k(!1), [je, qe] = k(!1), [et, Ue] = k(null), [tt, St] = k(!0), [wt, st] = k(!1), [v, A] = k(!1), [L, M] = k(!1), [U, _] = k(null), [ue, Se] = k(!1), [Ta, kt] = k(30), [La, Gt] = k(!1), [Fa, $t] = k(!1), Ua = I(null), Nt = I(), Et = I(C.flowType), Ia = q ?? 640, Zt = I(N);
|
|
4595
4622
|
B(() => {
|
|
4596
|
-
|
|
4597
|
-
}, [
|
|
4598
|
-
L || v ||
|
|
4599
|
-
}, [
|
|
4623
|
+
N && N !== Zt.current && M(!1), Zt.current = N;
|
|
4624
|
+
}, [N]), B(() => {
|
|
4625
|
+
L || v || N != null && N.bestQuote && F({ type: "SELECT_QUOTE", quote: N.bestQuote });
|
|
4626
|
+
}, [N == null ? void 0 : N.bestQuote, L, v, F]), B(() => {
|
|
4600
4627
|
_e(a === "dark");
|
|
4601
4628
|
}, [a]), B(() => {
|
|
4602
|
-
const
|
|
4603
|
-
return () => clearTimeout(
|
|
4604
|
-
}, [
|
|
4605
|
-
if (
|
|
4606
|
-
|
|
4607
|
-
const
|
|
4608
|
-
return () => clearTimeout(
|
|
4629
|
+
const g = setTimeout(() => St(!1), D ? 0 : 800);
|
|
4630
|
+
return () => clearTimeout(g);
|
|
4631
|
+
}, [D]), B(() => {
|
|
4632
|
+
if (Et.current !== C.flowType && !tt) {
|
|
4633
|
+
Et.current = C.flowType, st(!0), $(!1), Je(!1);
|
|
4634
|
+
const g = setTimeout(() => st(!1), 350);
|
|
4635
|
+
return () => clearTimeout(g);
|
|
4609
4636
|
}
|
|
4610
|
-
|
|
4637
|
+
Et.current = C.flowType;
|
|
4611
4638
|
}, [C.flowType, tt]);
|
|
4612
|
-
const dt = C.flowType, H = dt === "buy", ne = C.cryptoCurrency || "BTC", ge = C.fiatCurrency || "USD",
|
|
4639
|
+
const dt = C.flowType, H = dt === "buy", ne = C.cryptoCurrency || "BTC", ge = C.fiatCurrency || "USD", Rt = H ? C.fiatAmount : C.cryptoAmount, oe = Tn(Rt), xe = C.selectedQuote || (N == null ? void 0 : N.bestQuote) || null, we = xe != null && xe.exchangeRate ? parseFloat(xe.exchangeRate) : null, at = I(null);
|
|
4613
4640
|
we && ne && ge && (at.current = { rate: we, crypto: ne, fiat: ge }), B(() => {
|
|
4614
4641
|
(G || ae) && (at.current = null);
|
|
4615
4642
|
}, [G, ae]);
|
|
4616
|
-
const
|
|
4643
|
+
const Ie = W(() => {
|
|
4617
4644
|
if (xe) {
|
|
4618
|
-
const
|
|
4619
|
-
if (
|
|
4645
|
+
const g = H ? xe.cryptoAmount : xe.fiatAmount;
|
|
4646
|
+
if (g) return g;
|
|
4620
4647
|
}
|
|
4621
4648
|
return "0";
|
|
4622
|
-
}, [xe, H]),
|
|
4649
|
+
}, [xe, H]), At = I(Ie);
|
|
4623
4650
|
B(() => {
|
|
4624
|
-
if (
|
|
4625
|
-
|
|
4626
|
-
const
|
|
4627
|
-
return () => clearTimeout(
|
|
4651
|
+
if (Ie !== At.current && Ie !== "0" && At.current !== "0") {
|
|
4652
|
+
Gt(!0);
|
|
4653
|
+
const g = setTimeout(() => Gt(!1), 500);
|
|
4654
|
+
return () => clearTimeout(g);
|
|
4628
4655
|
}
|
|
4629
|
-
|
|
4630
|
-
}, [
|
|
4631
|
-
const nt = !!(ie &&
|
|
4632
|
-
var
|
|
4633
|
-
const
|
|
4634
|
-
return !
|
|
4656
|
+
At.current = Ie;
|
|
4657
|
+
}, [Ie]);
|
|
4658
|
+
const nt = !!(ie && J && H && Na(ne) && we), Da = nt && ne.toUpperCase().includes(ge.toUpperCase()), Xt = nt && oe > 0 ? Bt(Da ? oe : oe / we) : null, Ma = nt && Xt ? Xt : Ie, Ba = W(() => {
|
|
4659
|
+
var Y, Me, Ge;
|
|
4660
|
+
const g = we || ((Y = at.current) == null ? void 0 : Y.rate), b = we ? ne : (Me = at.current) == null ? void 0 : Me.crypto, V = we ? ge : (Ge = at.current) == null ? void 0 : Ge.fiat;
|
|
4661
|
+
return !g || !b || !V ? "" : `1 ${b} ≈ ${g.toFixed(2)} ${V}`;
|
|
4635
4662
|
}, [ne, ge, we]);
|
|
4636
4663
|
B(() => {
|
|
4637
|
-
const
|
|
4638
|
-
if (!
|
|
4664
|
+
const g = C.walletAddress.trim(), b = C.network;
|
|
4665
|
+
if (!g || g.length < 10) {
|
|
4639
4666
|
Ue(null), F({ type: "SET_WALLET_ERROR", message: "" });
|
|
4640
4667
|
return;
|
|
4641
4668
|
}
|
|
4642
4669
|
qe(!0), Ue(null);
|
|
4643
4670
|
const V = new AbortController();
|
|
4644
|
-
return clearTimeout(
|
|
4645
|
-
var
|
|
4671
|
+
return clearTimeout(Nt.current), Nt.current = setTimeout(async () => {
|
|
4672
|
+
var Y, Me, Ge;
|
|
4646
4673
|
try {
|
|
4647
|
-
const
|
|
4674
|
+
const Ut = await (await fetch(`${ce.apiUrl}/public/validate/address`, {
|
|
4648
4675
|
method: "POST",
|
|
4649
4676
|
headers: { "Content-Type": "application/json" },
|
|
4650
|
-
body: JSON.stringify({ address:
|
|
4677
|
+
body: JSON.stringify({ address: g, ...b ? { network: b } : {} }),
|
|
4651
4678
|
signal: V.signal
|
|
4652
|
-
})).json(), It = ((
|
|
4679
|
+
})).json(), It = ((Y = Ut.data) == null ? void 0 : Y.attributes) || Ut.data || Ut;
|
|
4653
4680
|
if (It.isValid)
|
|
4654
4681
|
Ue(!0), F({ type: "SET_WALLET_ERROR", message: "" });
|
|
4655
4682
|
else {
|
|
4656
4683
|
Ue(!1);
|
|
4657
|
-
const
|
|
4658
|
-
F({ type: "SET_WALLET_ERROR", message:
|
|
4684
|
+
const en = ((Me = It.errors) == null ? void 0 : Me[0]) || ((Ge = It.details) == null ? void 0 : Ge.formatMessage) || T("wallet.invalidServer");
|
|
4685
|
+
F({ type: "SET_WALLET_ERROR", message: en });
|
|
4659
4686
|
}
|
|
4660
|
-
} catch (
|
|
4661
|
-
if (
|
|
4687
|
+
} catch (Ft) {
|
|
4688
|
+
if (Ft instanceof DOMException && Ft.name === "AbortError") return;
|
|
4662
4689
|
Ue(null);
|
|
4663
4690
|
} finally {
|
|
4664
4691
|
V.signal.aborted || qe(!1);
|
|
4665
4692
|
}
|
|
4666
4693
|
}, 500), () => {
|
|
4667
|
-
clearTimeout(
|
|
4694
|
+
clearTimeout(Nt.current), V.abort();
|
|
4668
4695
|
};
|
|
4669
4696
|
}, [C.walletAddress, C.network, ce.apiUrl]);
|
|
4670
|
-
const ut = !
|
|
4671
|
-
let b =
|
|
4672
|
-
const V = H ? 2 : 6,
|
|
4673
|
-
|
|
4674
|
-
},
|
|
4675
|
-
|
|
4676
|
-
},
|
|
4677
|
-
(
|
|
4678
|
-
F({ type: "SET_FIAT_CURRENCY", currency:
|
|
4679
|
-
},
|
|
4680
|
-
[F]
|
|
4681
|
-
), _a = O(
|
|
4682
|
-
(x, b) => {
|
|
4683
|
-
F({ type: "SET_CRYPTO_CURRENCY", currency: x }), F({ type: "SET_CRYPTO_CHAIN", chain: b });
|
|
4697
|
+
const ut = !Rt || oe === 0, Tt = oe > 0 && (H ? oe < ua : oe < ma), Ha = !!he || Tt || lt && ut, Pa = oe > 0 && !he && !Tt, Yt = C.walletAddress.trim().length >= 10 && et !== !1 && !je, Qt = Pa && (H ? Yt : !0) && !!C.cryptoCurrency && !!C.network, Oa = (g) => {
|
|
4698
|
+
let b = g.target.value.replace(/[^0-9.,]/g, "");
|
|
4699
|
+
const V = H ? 2 : 6, Y = b.indexOf(".");
|
|
4700
|
+
Y !== -1 && b.length - Y - 1 > V && (b = b.slice(0, Y + V + 1)), F(H ? { type: "SET_FIAT_AMOUNT", amount: b } : { type: "SET_CRYPTO_AMOUNT", amount: b });
|
|
4701
|
+
}, Ka = (g) => {
|
|
4702
|
+
g !== dt && F({ type: "SET_FLOW_TYPE", flowType: g, fieldLocks: le });
|
|
4703
|
+
}, _a = O(
|
|
4704
|
+
(g) => {
|
|
4705
|
+
F({ type: "SET_FIAT_CURRENCY", currency: g });
|
|
4684
4706
|
},
|
|
4685
4707
|
[F]
|
|
4686
4708
|
), ja = O(
|
|
4687
|
-
(
|
|
4688
|
-
F({ type: "
|
|
4709
|
+
(g, b) => {
|
|
4710
|
+
F({ type: "SET_CRYPTO_CURRENCY", currency: g }), F({ type: "SET_CRYPTO_CHAIN", chain: b });
|
|
4689
4711
|
},
|
|
4690
4712
|
[F]
|
|
4691
4713
|
), Va = O(
|
|
4692
|
-
(
|
|
4693
|
-
F({ type: "
|
|
4714
|
+
(g) => {
|
|
4715
|
+
F({ type: "SET_PAYMENT_METHOD", methodId: g });
|
|
4694
4716
|
},
|
|
4695
4717
|
[F]
|
|
4696
|
-
), Wa = O(
|
|
4718
|
+
), Wa = O(
|
|
4719
|
+
(g) => {
|
|
4720
|
+
F({ type: "SET_COUNTRY", country: g }), j(null);
|
|
4721
|
+
},
|
|
4722
|
+
[F]
|
|
4723
|
+
), Ga = O(() => {
|
|
4697
4724
|
j(null), setTimeout(() => j("country"), 280);
|
|
4698
|
-
}, []),
|
|
4725
|
+
}, []), $a = O(() => {
|
|
4699
4726
|
j(null), setTimeout(() => j("language"), 280);
|
|
4700
|
-
}, []), Za = C.country ? (
|
|
4701
|
-
if (!
|
|
4702
|
-
(
|
|
4727
|
+
}, []), Za = C.country ? (na = Ot[C.country.toLowerCase()]) == null ? void 0 : na.name : void 0, Xa = () => {
|
|
4728
|
+
if (!Qt) {
|
|
4729
|
+
(Ha || ut) && ($(!0), $t(!0), setTimeout(() => $t(!1), 400));
|
|
4703
4730
|
return;
|
|
4704
4731
|
}
|
|
4705
4732
|
if (C.selectedQuote) {
|
|
4706
|
-
be().catch((
|
|
4707
|
-
|
|
4733
|
+
be().catch((g) => {
|
|
4734
|
+
_({ type: "error", title: T("toast.orderFailed"), desc: g instanceof Error ? g.message : T("toast.couldNotCreate") });
|
|
4708
4735
|
});
|
|
4709
4736
|
return;
|
|
4710
4737
|
}
|
|
4711
4738
|
A(!0), pe();
|
|
4712
4739
|
};
|
|
4713
4740
|
B(() => {
|
|
4714
|
-
var
|
|
4715
|
-
if (!(!v ||
|
|
4716
|
-
if (
|
|
4717
|
-
A(!1), F({ type: "SELECT_QUOTE", quote:
|
|
4718
|
-
|
|
4741
|
+
var g;
|
|
4742
|
+
if (!(!v || w)) {
|
|
4743
|
+
if (N != null && N.bestQuote)
|
|
4744
|
+
A(!1), F({ type: "SELECT_QUOTE", quote: N.bestQuote }), be().catch((b) => {
|
|
4745
|
+
_({ type: "error", title: T("toast.orderFailed"), desc: b instanceof Error ? b.message : T("toast.couldNotCreate") });
|
|
4719
4746
|
});
|
|
4720
4747
|
else if (ae) {
|
|
4721
4748
|
A(!1);
|
|
4722
4749
|
const b = ae.message || T("error.noProviders");
|
|
4723
|
-
F({ type: "SET_ERROR", message: b }),
|
|
4724
|
-
} else if (
|
|
4750
|
+
F({ type: "SET_ERROR", message: b }), _({ type: "error", title: T("toast.quoteError"), desc: b });
|
|
4751
|
+
} else if (N && !N.bestQuote) {
|
|
4725
4752
|
A(!1);
|
|
4726
|
-
const b = (
|
|
4727
|
-
F({ type: "SET_ERROR", message: V }),
|
|
4753
|
+
const b = (g = N.unavailableGateways) == null ? void 0 : g.map((Y) => Y.reason).filter(Boolean), V = b != null && b.length ? `${T("error.noProviders")}: ${b.join("; ")}` : T("error.noProviders");
|
|
4754
|
+
F({ type: "SET_ERROR", message: V }), _({ type: "error", title: T("toast.noProviders"), desc: V });
|
|
4728
4755
|
}
|
|
4729
4756
|
}
|
|
4730
|
-
}, [v,
|
|
4731
|
-
const
|
|
4757
|
+
}, [v, N, w, ae, F, be]);
|
|
4758
|
+
const zt = I(C.step);
|
|
4732
4759
|
B(() => {
|
|
4733
|
-
const
|
|
4734
|
-
|
|
4760
|
+
const g = zt.current;
|
|
4761
|
+
zt.current = C.step, g !== C.step && (C.step === "checkout" ? _({ type: "success", title: T("toast.orderCreated"), desc: T("toast.redirecting") }) : C.step === "error" && C.errorMessage && _({ type: "error", title: T("toast.somethingWrong"), desc: C.errorMessage }));
|
|
4735
4762
|
}, [C.step, C.errorMessage]);
|
|
4736
4763
|
const Ve = C.step === "amount";
|
|
4737
4764
|
B(() => {
|
|
4738
4765
|
Ve || Se(!1);
|
|
4739
4766
|
}, [Ve]), B(() => {
|
|
4740
4767
|
if (!ue || !Ve) return;
|
|
4741
|
-
|
|
4742
|
-
const
|
|
4743
|
-
|
|
4768
|
+
kt(30);
|
|
4769
|
+
const g = setInterval(() => {
|
|
4770
|
+
kt((b) => b <= 1 ? (pe(), 30) : b - 1);
|
|
4744
4771
|
}, 1e3);
|
|
4745
|
-
return () => clearInterval(
|
|
4772
|
+
return () => clearInterval(g);
|
|
4746
4773
|
}, [ue, Ve, pe]), B(() => {
|
|
4747
|
-
ue && Ve && !
|
|
4748
|
-
}, [
|
|
4749
|
-
const
|
|
4750
|
-
const b =
|
|
4751
|
-
return (0.299 * V + 0.587 *
|
|
4752
|
-
},
|
|
4774
|
+
ue && Ve && !w && kt(30);
|
|
4775
|
+
}, [w, ue, Ve]);
|
|
4776
|
+
const Jt = se ? "theme-dark" : "theme-light", mt = sa.find((g) => g.id === Le) || sa[0], Ya = mt.accent === null, Qa = r ? ve(r) : !1, qt = (g) => {
|
|
4777
|
+
const b = g.replace("#", ""), V = parseInt(b.substring(0, 2), 16), Y = parseInt(b.substring(2, 4), 16), Me = parseInt(b.substring(4, 6), 16);
|
|
4778
|
+
return (0.299 * V + 0.587 * Y + 0.114 * Me) / 255 > 0.5 ? "#000000" : "#ffffff";
|
|
4779
|
+
}, ea = Qa ? { "--t-accent": r, "--t-cta-bg": r, "--t-cta-text": qt(r) } : Ya ? {
|
|
4753
4780
|
"--t-accent": se ? "#ffffff" : "#111111",
|
|
4754
4781
|
"--t-cta-bg": se ? "#ffffff" : "#111111",
|
|
4755
4782
|
"--t-cta-text": se ? "#000000" : "#ffffff"
|
|
4756
4783
|
} : {
|
|
4757
4784
|
"--t-accent": mt.accent,
|
|
4758
4785
|
"--t-cta-bg": mt.accent,
|
|
4759
|
-
"--t-cta-text":
|
|
4786
|
+
"--t-cta-text": qt(mt.accent)
|
|
4760
4787
|
}, me = {};
|
|
4761
|
-
d && ve(d) && (me["--t-surface"] = d, me["--t-modal-bg"] = d), c && ve(c) && (me["--t-pill-bg"] = c, me["--t-close-bg"] = c), h && ve(h) && (me["--t-text"] = h),
|
|
4762
|
-
const
|
|
4763
|
-
o && ve(o) ?
|
|
4788
|
+
d && ve(d) && (me["--t-surface"] = d, me["--t-modal-bg"] = d), c && ve(c) && (me["--t-pill-bg"] = c, me["--t-close-bg"] = c), h && ve(h) && (me["--t-text"] = h), p && ve(p) && (me["--t-text-secondary"] = p), f && ve(f) && (me["--t-text-muted"] = f, me["--t-text-tertiary"] = f), x && ve(x) && (me["--t-success"] = x);
|
|
4789
|
+
const De = {};
|
|
4790
|
+
o && ve(o) ? De.backgroundColor = o : De.backgroundColor = "var(--t-bg)", s && (s.startsWith("https://") || s.startsWith("data:image/")) && (De.backgroundImage = `url(${s})`, De.backgroundSize = "cover", De.backgroundPosition = "center");
|
|
4764
4791
|
const pt = {};
|
|
4765
4792
|
m && ve(m) && (pt.border = `1px solid ${m}`), l && (pt.borderRadius = l);
|
|
4766
|
-
const rt = C.network, We = rt ? yt(rt) : null,
|
|
4767
|
-
return
|
|
4793
|
+
const rt = C.network, We = rt ? yt(rt) : null, ta = (We == null ? void 0 : We.shortName) || (We == null ? void 0 : We.name) || rt, za = he || (lt && (Tt || ut) ? ut ? T("error.amountZero") : H ? T("error.minAmountFiat", { min: String(ua), currency: ge }) : T("error.minAmountCrypto", { min: String(ma), currency: ne }) : void 0), Ja = C.walletError ? C.walletError : bt && !Yt && !je ? T("wallet.invalid") : void 0, Lt = re.filter((g) => g.supportedFiats.includes(C.fiatCurrency)), qa = Lt.find((g) => g.id === C.paymentMethodId) || Lt[0], aa = C.step === "checkout" ? /* @__PURE__ */ e(Cn, { autoRedirect: E }) : C.step === "processing" ? /* @__PURE__ */ e(Sn, {}) : C.step === "complete" ? /* @__PURE__ */ e(wn, { explorerUrl: K, doneButtonText: ee, onDone: te }) : C.step === "error" ? /* @__PURE__ */ e(kn, { supportEmail: z, onDone: te, doneButtonText: ee }) : C.step === "confirm" ? /* @__PURE__ */ e(Fn, { stablecoinParity: nt, partnerName: J }) : null;
|
|
4794
|
+
return aa ? /* @__PURE__ */ e(
|
|
4768
4795
|
"div",
|
|
4769
4796
|
{
|
|
4770
|
-
className: `${
|
|
4797
|
+
className: `${Jt} relative w-full max-w-[390px] overflow-hidden flex flex-col select-none transition-colors duration-[400ms] ${t}`,
|
|
4771
4798
|
style: {
|
|
4772
4799
|
fontFamily: "'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
|
|
4773
|
-
height:
|
|
4800
|
+
height: Ia,
|
|
4774
4801
|
borderRadius: "var(--t-container-radius)",
|
|
4775
|
-
...
|
|
4776
|
-
...
|
|
4802
|
+
...De,
|
|
4803
|
+
...ea,
|
|
4777
4804
|
...me,
|
|
4778
4805
|
...pt
|
|
4779
4806
|
},
|
|
4780
|
-
children:
|
|
4807
|
+
children: aa
|
|
4781
4808
|
}
|
|
4782
4809
|
) : /* @__PURE__ */ i(
|
|
4783
4810
|
"div",
|
|
4784
4811
|
{
|
|
4785
|
-
className: `${
|
|
4812
|
+
className: `${Jt} relative w-full max-w-[390px] overflow-hidden flex flex-col select-none transition-colors duration-[400ms] ${t}`,
|
|
4786
4813
|
style: {
|
|
4787
4814
|
fontFamily: "'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
|
|
4788
4815
|
minHeight: 640,
|
|
4789
4816
|
borderRadius: "var(--t-container-radius)",
|
|
4790
|
-
...
|
|
4791
|
-
...
|
|
4817
|
+
...De,
|
|
4818
|
+
...ea,
|
|
4792
4819
|
...me,
|
|
4793
4820
|
...pt
|
|
4794
4821
|
},
|
|
4795
4822
|
children: [
|
|
4796
4823
|
/* @__PURE__ */ e(
|
|
4797
|
-
|
|
4824
|
+
cr,
|
|
4798
4825
|
{
|
|
4799
4826
|
tab: dt,
|
|
4800
|
-
onTabSwitch:
|
|
4801
|
-
showFlowToggle:
|
|
4802
|
-
showSettings:
|
|
4827
|
+
onTabSwitch: Ka,
|
|
4828
|
+
showFlowToggle: S,
|
|
4829
|
+
showSettings: R,
|
|
4803
4830
|
onOpenSettings: () => j("settings"),
|
|
4804
4831
|
darkMode: se
|
|
4805
4832
|
}
|
|
4806
4833
|
),
|
|
4807
|
-
tt ||
|
|
4834
|
+
tt || wt || D ? /* @__PURE__ */ e("div", { className: "pt-[88px] px-3 flex-1 flex flex-col", children: D ? /* @__PURE__ */ e(Un, {}) : /* @__PURE__ */ e($n, {}) }) : /* @__PURE__ */ i("div", { className: "flex-1 overflow-hidden pt-[88px] px-3 flex flex-col gap-1 tab-fade-in", children: [
|
|
4808
4835
|
/* @__PURE__ */ e(
|
|
4809
|
-
|
|
4836
|
+
sr,
|
|
4810
4837
|
{
|
|
4811
|
-
amount:
|
|
4812
|
-
onAmountChange:
|
|
4838
|
+
amount: Rt,
|
|
4839
|
+
onAmountChange: Oa,
|
|
4813
4840
|
currencyCode: H ? ge : ne,
|
|
4814
4841
|
isBuy: H,
|
|
4815
4842
|
onOpenModal: () => j(H ? "fiat" : "crypto"),
|
|
4816
|
-
assetBaseUrl:
|
|
4817
|
-
error:
|
|
4843
|
+
assetBaseUrl: X,
|
|
4844
|
+
error: za,
|
|
4818
4845
|
fieldLocks: le,
|
|
4819
|
-
onBlur: () =>
|
|
4820
|
-
inputRef:
|
|
4846
|
+
onBlur: () => $(!0),
|
|
4847
|
+
inputRef: Ua,
|
|
4821
4848
|
chainCode: H ? void 0 : rt,
|
|
4822
|
-
chainDisplay: H ? void 0 :
|
|
4823
|
-
getChainIconUrl: H ? void 0 :
|
|
4824
|
-
shaking:
|
|
4849
|
+
chainDisplay: H ? void 0 : ta,
|
|
4850
|
+
getChainIconUrl: H ? void 0 : Mt,
|
|
4851
|
+
shaking: Fa
|
|
4825
4852
|
}
|
|
4826
4853
|
),
|
|
4827
4854
|
/* @__PURE__ */ e(
|
|
4828
|
-
|
|
4855
|
+
mr,
|
|
4829
4856
|
{
|
|
4830
|
-
amount:
|
|
4857
|
+
amount: Ma,
|
|
4831
4858
|
currencyCode: H ? ne : ge,
|
|
4832
4859
|
chainCode: H ? rt : void 0,
|
|
4833
|
-
chainDisplay: H ?
|
|
4860
|
+
chainDisplay: H ? ta : void 0,
|
|
4834
4861
|
isBuy: H,
|
|
4835
4862
|
onOpenModal: () => j(H ? "crypto" : "fiat"),
|
|
4836
|
-
displayRate:
|
|
4837
|
-
assetBaseUrl:
|
|
4838
|
-
quotesLoading:
|
|
4863
|
+
displayRate: Ba,
|
|
4864
|
+
assetBaseUrl: X,
|
|
4865
|
+
quotesLoading: w,
|
|
4839
4866
|
onOpenRateBreakdown: () => Se(!0),
|
|
4840
4867
|
fieldLocks: le,
|
|
4841
4868
|
spendNumeric: oe,
|
|
4842
|
-
getChainIconUrl: H ?
|
|
4869
|
+
getChainIconUrl: H ? Mt : void 0,
|
|
4843
4870
|
autoSelectPending: v,
|
|
4844
|
-
rateFlash:
|
|
4871
|
+
rateFlash: La
|
|
4845
4872
|
}
|
|
4846
4873
|
),
|
|
4847
4874
|
G && oe > 0 && /* @__PURE__ */ e(
|
|
@@ -4852,7 +4879,7 @@ function kr({
|
|
|
4852
4879
|
children: Ke || T("error.noProviders")
|
|
4853
4880
|
}
|
|
4854
4881
|
),
|
|
4855
|
-
nt && oe > 0 && (
|
|
4882
|
+
nt && oe > 0 && (N == null ? void 0 : N.bestQuote) && /* @__PURE__ */ i(
|
|
4856
4883
|
"div",
|
|
4857
4884
|
{
|
|
4858
4885
|
className: "flex items-start gap-2 mt-1 px-4 py-2.5",
|
|
@@ -4862,26 +4889,27 @@ function kr({
|
|
|
4862
4889
|
/* @__PURE__ */ e("circle", { cx: "8", cy: "8", r: "7", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
4863
4890
|
/* @__PURE__ */ e("path", { d: "M8 7v4M8 5.5v-.01", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
4864
4891
|
] }),
|
|
4865
|
-
/* @__PURE__ */ e("span", { children: T("parity.info", { receiveAmount:
|
|
4892
|
+
/* @__PURE__ */ e("span", { children: T("parity.info", { receiveAmount: Ie, crypto: ne, spendAmount: Bt(oe), fiat: ge, partner: J || "" }) })
|
|
4866
4893
|
]
|
|
4867
4894
|
}
|
|
4868
4895
|
),
|
|
4869
|
-
(
|
|
4870
|
-
|
|
4896
|
+
(N || w) && /* @__PURE__ */ e(
|
|
4897
|
+
hr,
|
|
4871
4898
|
{
|
|
4872
4899
|
selectedQuote: C.selectedQuote,
|
|
4873
|
-
quotesLoading:
|
|
4874
|
-
onOpenModal: () => j("provider")
|
|
4900
|
+
quotesLoading: w,
|
|
4901
|
+
onOpenModal: () => j("provider"),
|
|
4902
|
+
assetBaseUrl: X
|
|
4875
4903
|
}
|
|
4876
4904
|
),
|
|
4877
|
-
(re.length > 0 || (
|
|
4878
|
-
|
|
4905
|
+
(re.length > 0 || (u == null ? void 0 : u.paymentMethods) && u.paymentMethods.length > 0) && (Lt.length > 0 ? /* @__PURE__ */ e(
|
|
4906
|
+
pr,
|
|
4879
4907
|
{
|
|
4880
|
-
selectedMethod:
|
|
4908
|
+
selectedMethod: qa,
|
|
4881
4909
|
onOpenModal: () => j("payment"),
|
|
4882
4910
|
darkMode: se,
|
|
4883
|
-
getMethodIcon:
|
|
4884
|
-
getMethodDisplayName: (
|
|
4911
|
+
getMethodIcon: Wt,
|
|
4912
|
+
getMethodDisplayName: (g, b) => Vt(g, b, T)
|
|
4885
4913
|
}
|
|
4886
4914
|
) : /* @__PURE__ */ e(
|
|
4887
4915
|
"div",
|
|
@@ -4895,16 +4923,16 @@ function kr({
|
|
|
4895
4923
|
children: /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: T("payment.noneAvailable") })
|
|
4896
4924
|
}
|
|
4897
4925
|
)),
|
|
4898
|
-
/* @__PURE__ */ e(
|
|
4899
|
-
|
|
4926
|
+
H && /* @__PURE__ */ e(
|
|
4927
|
+
wr,
|
|
4900
4928
|
{
|
|
4901
4929
|
address: C.walletAddress,
|
|
4902
|
-
onChange: (
|
|
4903
|
-
placeholder: T(
|
|
4930
|
+
onChange: (g) => F({ type: "SET_WALLET_ADDRESS", address: g }),
|
|
4931
|
+
placeholder: T("wallet.placeholderBuy"),
|
|
4904
4932
|
isBuy: H,
|
|
4905
|
-
error:
|
|
4933
|
+
error: Ja,
|
|
4906
4934
|
validating: je,
|
|
4907
|
-
disabled: !!((
|
|
4935
|
+
disabled: !!((ra = le == null ? void 0 : le.destinationAddress) != null && ra.locked),
|
|
4908
4936
|
onFocus: () => ct(!0),
|
|
4909
4937
|
onBlur: () => {
|
|
4910
4938
|
ct(!1), Je(!0);
|
|
@@ -4916,128 +4944,129 @@ function kr({
|
|
|
4916
4944
|
ye && /* @__PURE__ */ e("div", { className: "text-[12px] text-center mb-2", style: { color: "var(--t-error)" }, children: T(H ? "error.currencyUnavailableBuy" : "error.currencyUnavailableSell") }),
|
|
4917
4945
|
/* @__PURE__ */ i("div", { className: "flex flex-col gap-3 pb-3", children: [
|
|
4918
4946
|
/* @__PURE__ */ e(
|
|
4919
|
-
|
|
4947
|
+
kr,
|
|
4920
4948
|
{
|
|
4921
4949
|
label: H ? T("cta.buy", { crypto: ne }) : T("cta.sell", { crypto: ne }),
|
|
4922
|
-
disabled: !
|
|
4950
|
+
disabled: !Qt || Te || v || ye || G,
|
|
4923
4951
|
loading: Te || v,
|
|
4924
|
-
onClick:
|
|
4952
|
+
onClick: Xa
|
|
4925
4953
|
}
|
|
4926
4954
|
),
|
|
4927
|
-
/* @__PURE__ */ e(
|
|
4955
|
+
/* @__PURE__ */ e(Nr, {})
|
|
4928
4956
|
] })
|
|
4929
4957
|
] }, dt),
|
|
4930
4958
|
U && /* @__PURE__ */ e(
|
|
4931
|
-
|
|
4959
|
+
Gn,
|
|
4932
4960
|
{
|
|
4933
4961
|
type: U.type,
|
|
4934
4962
|
title: U.title,
|
|
4935
4963
|
description: U.desc,
|
|
4936
4964
|
visible: !!U,
|
|
4937
|
-
onDismiss: () =>
|
|
4965
|
+
onDismiss: () => _(null)
|
|
4938
4966
|
}
|
|
4939
4967
|
),
|
|
4940
4968
|
/* @__PURE__ */ e(Zn, { isOpen: ue, onClose: () => Se(!1), children: /* @__PURE__ */ e(
|
|
4941
|
-
|
|
4969
|
+
Er,
|
|
4942
4970
|
{
|
|
4943
4971
|
quote: xe,
|
|
4944
4972
|
isOpen: ue,
|
|
4945
4973
|
onClose: () => Se(!1),
|
|
4946
|
-
countdown:
|
|
4947
|
-
quotesLoading:
|
|
4974
|
+
countdown: Ta,
|
|
4975
|
+
quotesLoading: w
|
|
4948
4976
|
}
|
|
4949
4977
|
) }),
|
|
4950
|
-
/* @__PURE__ */ e(Pe, { isOpen: de === "fiat", onClose: () => j(null), children: (
|
|
4951
|
-
|
|
4978
|
+
/* @__PURE__ */ e(Pe, { isOpen: de === "fiat", onClose: () => j(null), children: (g) => /* @__PURE__ */ e(
|
|
4979
|
+
Yn,
|
|
4952
4980
|
{
|
|
4953
|
-
onClose:
|
|
4981
|
+
onClose: g,
|
|
4954
4982
|
onSelect: (b) => {
|
|
4955
|
-
|
|
4983
|
+
_a(b), g();
|
|
4956
4984
|
},
|
|
4957
4985
|
currencies: fe.map((b) => ({ code: b.code, name: b.code })),
|
|
4958
|
-
assetBaseUrl:
|
|
4986
|
+
assetBaseUrl: X,
|
|
4959
4987
|
selectedCode: C.fiatCurrency
|
|
4960
4988
|
}
|
|
4961
4989
|
) }),
|
|
4962
|
-
/* @__PURE__ */ e(Pe, { isOpen: de === "crypto", onClose: () => j(null), children: (
|
|
4963
|
-
|
|
4990
|
+
/* @__PURE__ */ e(Pe, { isOpen: de === "crypto", onClose: () => j(null), children: (g) => /* @__PURE__ */ e(
|
|
4991
|
+
Qn,
|
|
4964
4992
|
{
|
|
4965
|
-
onClose:
|
|
4993
|
+
onClose: g,
|
|
4966
4994
|
onSelect: (b, V) => {
|
|
4967
|
-
|
|
4995
|
+
ja(b, V), g();
|
|
4968
4996
|
},
|
|
4969
4997
|
cryptos: Qe.map((b) => {
|
|
4970
4998
|
var V;
|
|
4971
4999
|
return {
|
|
4972
5000
|
code: b.code,
|
|
4973
5001
|
name: b.code,
|
|
4974
|
-
networks: (V = b.networks) == null ? void 0 : V.map((
|
|
5002
|
+
networks: (V = b.networks) == null ? void 0 : V.map((Y) => ({ code: Y.id, name: Y.name }))
|
|
4975
5003
|
};
|
|
4976
5004
|
}),
|
|
4977
|
-
assetBaseUrl:
|
|
5005
|
+
assetBaseUrl: X,
|
|
4978
5006
|
selectedCode: C.cryptoCurrency,
|
|
4979
5007
|
selectedChain: C.network
|
|
4980
5008
|
}
|
|
4981
5009
|
) }),
|
|
4982
|
-
/* @__PURE__ */ e(Pe, { isOpen: de === "payment", onClose: () => j(null), children: (
|
|
4983
|
-
|
|
5010
|
+
/* @__PURE__ */ e(Pe, { isOpen: de === "payment", onClose: () => j(null), children: (g) => /* @__PURE__ */ e(
|
|
5011
|
+
er,
|
|
4984
5012
|
{
|
|
4985
5013
|
methods: re,
|
|
4986
5014
|
selectedId: C.paymentMethodId,
|
|
4987
5015
|
onSelect: (b) => {
|
|
4988
|
-
|
|
5016
|
+
Va(b), g();
|
|
4989
5017
|
},
|
|
4990
|
-
onClose:
|
|
5018
|
+
onClose: g
|
|
4991
5019
|
}
|
|
4992
5020
|
) }),
|
|
4993
|
-
/* @__PURE__ */ e(Pe, { isOpen: de === "provider", onClose: () => j(null), children: (
|
|
4994
|
-
|
|
5021
|
+
/* @__PURE__ */ e(Pe, { isOpen: de === "provider", onClose: () => j(null), children: (g) => /* @__PURE__ */ e(
|
|
5022
|
+
Sr,
|
|
4995
5023
|
{
|
|
4996
|
-
quotes:
|
|
4997
|
-
quotesLoading:
|
|
5024
|
+
quotes: N,
|
|
5025
|
+
quotesLoading: w,
|
|
4998
5026
|
cryptoCurrency: ne,
|
|
4999
5027
|
selectedGatewayId: C.selectedProvider,
|
|
5028
|
+
assetBaseUrl: X,
|
|
5000
5029
|
onSelect: (b) => {
|
|
5001
|
-
M(!0), F({ type: "SELECT_QUOTE", quote: b }),
|
|
5030
|
+
M(!0), F({ type: "SELECT_QUOTE", quote: b }), g();
|
|
5002
5031
|
},
|
|
5003
|
-
onClose:
|
|
5032
|
+
onClose: g
|
|
5004
5033
|
}
|
|
5005
5034
|
) }),
|
|
5006
|
-
/* @__PURE__ */ e(Pe, { isOpen: de === "settings", onClose: () => j(null), variant: "right", children: (
|
|
5007
|
-
|
|
5035
|
+
/* @__PURE__ */ e(Pe, { isOpen: de === "settings", onClose: () => j(null), variant: "right", children: (g) => /* @__PURE__ */ e(
|
|
5036
|
+
nr,
|
|
5008
5037
|
{
|
|
5009
|
-
onClose:
|
|
5038
|
+
onClose: g,
|
|
5010
5039
|
darkMode: se,
|
|
5011
5040
|
onToggleDarkMode: _e,
|
|
5012
5041
|
skinId: Le,
|
|
5013
5042
|
onSelectSkin: (b) => {
|
|
5014
|
-
|
|
5043
|
+
Ct(b);
|
|
5015
5044
|
},
|
|
5016
5045
|
showThemeToggle: y,
|
|
5017
5046
|
country: C.country,
|
|
5018
5047
|
countryName: Za,
|
|
5019
|
-
onLocationPress:
|
|
5020
|
-
onLanguagePress:
|
|
5021
|
-
assetBaseUrl:
|
|
5048
|
+
onLocationPress: Ga,
|
|
5049
|
+
onLanguagePress: $a,
|
|
5050
|
+
assetBaseUrl: X
|
|
5022
5051
|
}
|
|
5023
5052
|
) }),
|
|
5024
|
-
/* @__PURE__ */ e(Pe, { isOpen: de === "country", onClose: () => j(null), children: (
|
|
5025
|
-
|
|
5053
|
+
/* @__PURE__ */ e(Pe, { isOpen: de === "country", onClose: () => j(null), children: (g) => /* @__PURE__ */ e(
|
|
5054
|
+
or,
|
|
5026
5055
|
{
|
|
5027
|
-
onClose:
|
|
5056
|
+
onClose: g,
|
|
5028
5057
|
onSelect: (b) => {
|
|
5029
|
-
|
|
5058
|
+
Wa(b), g();
|
|
5030
5059
|
},
|
|
5031
|
-
assetBaseUrl:
|
|
5060
|
+
assetBaseUrl: X,
|
|
5032
5061
|
selectedCode: C.country
|
|
5033
5062
|
}
|
|
5034
5063
|
) }),
|
|
5035
|
-
/* @__PURE__ */ e(Pe, { isOpen: de === "language", onClose: () => j(null), children: (
|
|
5036
|
-
|
|
5064
|
+
/* @__PURE__ */ e(Pe, { isOpen: de === "language", onClose: () => j(null), children: (g) => /* @__PURE__ */ e(
|
|
5065
|
+
lr,
|
|
5037
5066
|
{
|
|
5038
|
-
onClose:
|
|
5067
|
+
onClose: g,
|
|
5039
5068
|
onSelect: (b) => {
|
|
5040
|
-
|
|
5069
|
+
vt(b), g();
|
|
5041
5070
|
},
|
|
5042
5071
|
selectedCode: ze
|
|
5043
5072
|
}
|
|
@@ -5046,7 +5075,7 @@ function kr({
|
|
|
5046
5075
|
}
|
|
5047
5076
|
);
|
|
5048
5077
|
}
|
|
5049
|
-
function
|
|
5078
|
+
function Ar({
|
|
5050
5079
|
projectId: t,
|
|
5051
5080
|
apiUrl: a,
|
|
5052
5081
|
assetBaseUrl: n,
|
|
@@ -5058,28 +5087,28 @@ function Nr({
|
|
|
5058
5087
|
defaultNetwork: d,
|
|
5059
5088
|
defaultFiatAmount: c,
|
|
5060
5089
|
defaultCryptoAmount: h,
|
|
5061
|
-
defaultWalletAddress:
|
|
5090
|
+
defaultWalletAddress: p,
|
|
5062
5091
|
defaultGateway: f,
|
|
5063
|
-
defaultCountry:
|
|
5064
|
-
fieldLocks:
|
|
5065
|
-
partnerMetadata:
|
|
5092
|
+
defaultCountry: x,
|
|
5093
|
+
fieldLocks: S,
|
|
5094
|
+
partnerMetadata: R,
|
|
5066
5095
|
statusPollInterval: y,
|
|
5067
|
-
onComplete:
|
|
5068
|
-
onError:
|
|
5096
|
+
onComplete: E,
|
|
5097
|
+
onError: K,
|
|
5069
5098
|
className: ee,
|
|
5070
|
-
theme:
|
|
5099
|
+
theme: z,
|
|
5071
5100
|
skinId: ie,
|
|
5072
|
-
accentColor:
|
|
5101
|
+
accentColor: J,
|
|
5073
5102
|
bgColor: q,
|
|
5074
5103
|
bgImage: Ce,
|
|
5075
5104
|
borderColor: te,
|
|
5076
5105
|
borderRadius: T,
|
|
5077
5106
|
surfaceColor: C,
|
|
5078
5107
|
inputBgColor: F,
|
|
5079
|
-
textColor:
|
|
5080
|
-
textSecondaryColor:
|
|
5081
|
-
textMutedColor:
|
|
5082
|
-
successColor:
|
|
5108
|
+
textColor: u,
|
|
5109
|
+
textSecondaryColor: D,
|
|
5110
|
+
textMutedColor: N,
|
|
5111
|
+
successColor: w,
|
|
5083
5112
|
showFlowToggle: ae,
|
|
5084
5113
|
showSettings: pe,
|
|
5085
5114
|
showThemeToggle: be,
|
|
@@ -5087,14 +5116,14 @@ function Nr({
|
|
|
5087
5116
|
explorerUrl: he,
|
|
5088
5117
|
doneButtonText: le,
|
|
5089
5118
|
supportEmail: ce,
|
|
5090
|
-
stablecoinParity:
|
|
5119
|
+
stablecoinParity: X,
|
|
5091
5120
|
partnerName: fe,
|
|
5092
5121
|
containerHeight: Qe,
|
|
5093
5122
|
locale: re,
|
|
5094
5123
|
onDone: ye
|
|
5095
5124
|
}) {
|
|
5096
5125
|
return /* @__PURE__ */ e(
|
|
5097
|
-
|
|
5126
|
+
gn,
|
|
5098
5127
|
{
|
|
5099
5128
|
projectId: t,
|
|
5100
5129
|
apiUrl: a,
|
|
@@ -5107,31 +5136,31 @@ function Nr({
|
|
|
5107
5136
|
defaultNetwork: d,
|
|
5108
5137
|
defaultFiatAmount: c,
|
|
5109
5138
|
defaultCryptoAmount: h,
|
|
5110
|
-
defaultWalletAddress:
|
|
5139
|
+
defaultWalletAddress: p,
|
|
5111
5140
|
defaultGateway: f,
|
|
5112
|
-
defaultCountry:
|
|
5113
|
-
fieldLocks:
|
|
5114
|
-
partnerMetadata:
|
|
5141
|
+
defaultCountry: x,
|
|
5142
|
+
fieldLocks: S,
|
|
5143
|
+
partnerMetadata: R,
|
|
5115
5144
|
statusPollInterval: y,
|
|
5116
|
-
onComplete:
|
|
5117
|
-
onError:
|
|
5118
|
-
children: /* @__PURE__ */ e(
|
|
5119
|
-
|
|
5145
|
+
onComplete: E,
|
|
5146
|
+
onError: K,
|
|
5147
|
+
children: /* @__PURE__ */ e(xn, { defaultLocale: re || "en", children: /* @__PURE__ */ e(
|
|
5148
|
+
Rr,
|
|
5120
5149
|
{
|
|
5121
5150
|
className: ee,
|
|
5122
|
-
theme:
|
|
5151
|
+
theme: z,
|
|
5123
5152
|
skinId: ie,
|
|
5124
|
-
accentColor:
|
|
5153
|
+
accentColor: J,
|
|
5125
5154
|
bgColor: q,
|
|
5126
5155
|
bgImage: Ce,
|
|
5127
5156
|
borderColor: te,
|
|
5128
5157
|
borderRadius: T,
|
|
5129
5158
|
surfaceColor: C,
|
|
5130
5159
|
inputBgColor: F,
|
|
5131
|
-
textColor:
|
|
5132
|
-
textSecondaryColor:
|
|
5133
|
-
textMutedColor:
|
|
5134
|
-
successColor:
|
|
5160
|
+
textColor: u,
|
|
5161
|
+
textSecondaryColor: D,
|
|
5162
|
+
textMutedColor: N,
|
|
5163
|
+
successColor: w,
|
|
5135
5164
|
showFlowToggle: ae,
|
|
5136
5165
|
showSettings: pe,
|
|
5137
5166
|
showThemeToggle: be,
|
|
@@ -5139,7 +5168,7 @@ function Nr({
|
|
|
5139
5168
|
explorerUrl: he,
|
|
5140
5169
|
doneButtonText: le,
|
|
5141
5170
|
supportEmail: ce,
|
|
5142
|
-
stablecoinParity:
|
|
5171
|
+
stablecoinParity: X,
|
|
5143
5172
|
partnerName: fe,
|
|
5144
5173
|
containerHeight: Qe,
|
|
5145
5174
|
onDone: ye
|
|
@@ -5148,14 +5177,14 @@ function Nr({
|
|
|
5148
5177
|
}
|
|
5149
5178
|
);
|
|
5150
5179
|
}
|
|
5151
|
-
function
|
|
5180
|
+
function Gr({
|
|
5152
5181
|
submitButtonText: t,
|
|
5153
5182
|
rateRefreshInterval: a,
|
|
5154
5183
|
...n
|
|
5155
5184
|
}) {
|
|
5156
|
-
return /* @__PURE__ */ e(
|
|
5185
|
+
return /* @__PURE__ */ e(Ar, { ...n });
|
|
5157
5186
|
}
|
|
5158
|
-
function
|
|
5187
|
+
function $r({
|
|
5159
5188
|
skin: t,
|
|
5160
5189
|
active: a,
|
|
5161
5190
|
onClick: n,
|
|
@@ -5189,94 +5218,94 @@ function Vr({
|
|
|
5189
5218
|
);
|
|
5190
5219
|
}
|
|
5191
5220
|
export {
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5221
|
+
dr as AnimatedDigit,
|
|
5222
|
+
ur as AnimatedNumber,
|
|
5223
|
+
Mr as ApplePayIcon,
|
|
5224
|
+
Vr as ArrowUpIcon,
|
|
5196
5225
|
ot as BLOCKCHAINS,
|
|
5197
|
-
|
|
5226
|
+
Dr as BankIcon,
|
|
5198
5227
|
Zn as BottomSheet,
|
|
5199
5228
|
ft as COUNTRIES,
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5229
|
+
Ot as COUNTRY_MAP,
|
|
5230
|
+
Ln as CRYPTO_CHAIN_COMBOS,
|
|
5231
|
+
Sa as CRYPTO_CURRENCIES,
|
|
5232
|
+
Hr as CardIcon,
|
|
5233
|
+
Vn as CheckmarkIcon,
|
|
5234
|
+
Gr as CheckoutForm,
|
|
5235
|
+
Cn as CheckoutStep,
|
|
5207
5236
|
Re as ChevronDown,
|
|
5208
|
-
|
|
5209
|
-
|
|
5237
|
+
Hn as ChevronRight,
|
|
5238
|
+
Sr as ChooseRampModal,
|
|
5210
5239
|
Oe as CloseButton,
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5240
|
+
Pr as CoinifyIcon,
|
|
5241
|
+
wn as CompleteStep,
|
|
5242
|
+
Fn as ConfirmStep,
|
|
5243
|
+
or as CountryPickerModal,
|
|
5244
|
+
Qn as CryptoCurrencyModal,
|
|
5216
5245
|
Ra as CryptoIcon,
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5246
|
+
kr as CtaButton,
|
|
5247
|
+
Kr as DarkModeIcon,
|
|
5248
|
+
kn as ErrorStep,
|
|
5249
|
+
ca as FIAT_CURRENCIES,
|
|
5250
|
+
En as FIAT_TO_COUNTRY,
|
|
5251
|
+
Yn as FiatCurrencyModal,
|
|
5252
|
+
jt as FiatFlag,
|
|
5253
|
+
Nr as Footer,
|
|
5254
|
+
Un as FormSkeleton,
|
|
5255
|
+
Aa as GenericCoinIcon,
|
|
5256
|
+
Br as GooglePayIcon,
|
|
5257
|
+
cr as HeaderBar,
|
|
5258
|
+
xn as I18nProvider,
|
|
5259
|
+
Ht as InfoIcon,
|
|
5260
|
+
Ze as LANGUAGES,
|
|
5261
|
+
$n as LoadingScreen,
|
|
5262
|
+
da as MOCK_RATES,
|
|
5263
|
+
Or as MenuIcon,
|
|
5235
5264
|
Pe as Modal,
|
|
5236
|
-
|
|
5265
|
+
jn as MoreDotsIcon,
|
|
5237
5266
|
Ae as NRLogo,
|
|
5238
|
-
|
|
5267
|
+
_r as NRLogoIcon,
|
|
5239
5268
|
Dn as PayPalIcon,
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5269
|
+
Kn as PaymentAppleIcon,
|
|
5270
|
+
Pn as PaymentBankIcon,
|
|
5271
|
+
pr as PaymentCard,
|
|
5272
|
+
On as PaymentCardsIcon,
|
|
5273
|
+
_n as PaymentGoogleIcon,
|
|
5274
|
+
Wr as PaymentMethodSelector,
|
|
5275
|
+
Sn as ProcessingStep,
|
|
5276
|
+
Ar as RampForm,
|
|
5277
|
+
gn as RampProvider,
|
|
5278
|
+
Er as RateBreakdown,
|
|
5279
|
+
mr as ReceiveCard,
|
|
5280
|
+
vn as RedirectScreen,
|
|
5281
|
+
In as RevolutIcon,
|
|
5282
|
+
sa as SKINS,
|
|
5283
|
+
jr as SearchIcon,
|
|
5255
5284
|
Ye as SearchInput,
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5285
|
+
nr as SettingsScreen,
|
|
5286
|
+
Q as Skeleton,
|
|
5287
|
+
$r as SkinSwatch,
|
|
5288
|
+
sr as SpendCard,
|
|
5260
5289
|
Ee as Spinner,
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5290
|
+
Gn as Toast,
|
|
5291
|
+
tr as ToggleSwitch,
|
|
5292
|
+
wr as WalletCard,
|
|
5293
|
+
Pt as XIcon,
|
|
5294
|
+
Bt as formatOutput,
|
|
5295
|
+
Mt as getChainIconUrl,
|
|
5296
|
+
wa as getCryptoIconUrl,
|
|
5297
|
+
Dt as getDefaultFiatForCountry,
|
|
5298
|
+
Rn as getFiatFlagUrl,
|
|
5299
|
+
Ir as getMockRate,
|
|
5300
|
+
Wn as getPaymentIcon,
|
|
5272
5301
|
Na as isStablecoin,
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5302
|
+
Tn as parseAmount,
|
|
5303
|
+
rn as useCheckoutIntent,
|
|
5304
|
+
_t as useI18n,
|
|
5305
|
+
nn as useQuotes,
|
|
5277
5306
|
Xe as useRamp,
|
|
5278
|
-
|
|
5307
|
+
an as useRampConfig,
|
|
5279
5308
|
P as useT,
|
|
5280
|
-
|
|
5309
|
+
on as useTransaction
|
|
5281
5310
|
};
|
|
5282
5311
|
//# sourceMappingURL=index.js.map
|