@cedros/login-react 0.0.23 → 0.0.25
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 +12 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +488 -485
- package/dist/index.js.map +1 -1
- package/dist/login-react.css +1 -1
- package/dist/mobileWalletAdapter-CgBgAysP.cjs +1 -0
- package/dist/mobileWalletAdapter-CgBgAysP.cjs.map +1 -0
- package/dist/mobileWalletAdapter-orQcBp-b.js +191 -0
- package/dist/mobileWalletAdapter-orQcBp-b.js.map +1 -0
- package/dist/solana-only.cjs +1 -1
- package/dist/solana-only.d.ts +2 -0
- package/dist/solana-only.js +1 -1
- package/package.json +1 -1
- package/dist/mobileWalletAdapter-BgWsM7tl.cjs +0 -1
- package/dist/mobileWalletAdapter-BgWsM7tl.cjs.map +0 -1
- package/dist/mobileWalletAdapter-CDpfbU1R.js +0 -188
- package/dist/mobileWalletAdapter-CDpfbU1R.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -12,8 +12,8 @@ import { b as $s, v as Wt } from "./validation-B8kMV3BL.js";
|
|
|
12
12
|
import { E as ee } from "./ErrorMessage-CcEK0pYO.js";
|
|
13
13
|
import { G as Js } from "./GoogleLoginButton-B6qnNMZp.js";
|
|
14
14
|
import { u as Qc } from "./GoogleLoginButton-B6qnNMZp.js";
|
|
15
|
-
import { S as Xs } from "./mobileWalletAdapter-
|
|
16
|
-
import { r as Kc, u as Gc } from "./mobileWalletAdapter-
|
|
15
|
+
import { S as Xs } from "./mobileWalletAdapter-orQcBp-b.js";
|
|
16
|
+
import { r as Kc, u as Gc } from "./mobileWalletAdapter-orQcBp-b.js";
|
|
17
17
|
import { c as Zs, d as eo, u as to, a as ro, M as so, I as oo, b as no, P as ao } from "./PermissionsSection-CighC1p6.js";
|
|
18
18
|
import { u as io } from "./useSystemSettings-DBlAMjFi.js";
|
|
19
19
|
import { C as co, S as Kr, a as lo, u as uo, A as ho } from "./AutosaveStatus-vkJxtuEw.js";
|
|
@@ -2410,13 +2410,13 @@ function oc({
|
|
|
2410
2410
|
);
|
|
2411
2411
|
_(() => {
|
|
2412
2412
|
if (!m) return;
|
|
2413
|
-
const A = (
|
|
2414
|
-
u.current && !u.current.contains(
|
|
2415
|
-
},
|
|
2416
|
-
|
|
2413
|
+
const A = (x) => {
|
|
2414
|
+
u.current && !u.current.contains(x.target) && (f(!1), g(-1));
|
|
2415
|
+
}, C = (x) => {
|
|
2416
|
+
x.key === "Escape" && (f(!1), g(-1), y.current?.focus());
|
|
2417
2417
|
};
|
|
2418
|
-
return document.addEventListener("mousedown", A), document.addEventListener("keydown",
|
|
2419
|
-
document.removeEventListener("mousedown", A), document.removeEventListener("keydown",
|
|
2418
|
+
return document.addEventListener("mousedown", A), document.addEventListener("keydown", C), () => {
|
|
2419
|
+
document.removeEventListener("mousedown", A), document.removeEventListener("keydown", C);
|
|
2420
2420
|
};
|
|
2421
2421
|
}, [m]);
|
|
2422
2422
|
const b = P(
|
|
@@ -2424,10 +2424,10 @@ function oc({
|
|
|
2424
2424
|
if (!(!m || v.length === 0))
|
|
2425
2425
|
switch (A.key) {
|
|
2426
2426
|
case "ArrowDown":
|
|
2427
|
-
A.preventDefault(), g((
|
|
2427
|
+
A.preventDefault(), g((C) => (C + 1) % v.length);
|
|
2428
2428
|
break;
|
|
2429
2429
|
case "ArrowUp":
|
|
2430
|
-
A.preventDefault(), g((
|
|
2430
|
+
A.preventDefault(), g((C) => (C - 1 + v.length) % v.length);
|
|
2431
2431
|
break;
|
|
2432
2432
|
case "Home":
|
|
2433
2433
|
A.preventDefault(), g(0);
|
|
@@ -2442,13 +2442,13 @@ function oc({
|
|
|
2442
2442
|
}
|
|
2443
2443
|
},
|
|
2444
2444
|
[m, w, v]
|
|
2445
|
-
),
|
|
2445
|
+
), N = P(() => {
|
|
2446
2446
|
v.length !== 0 && (f((A) => !A), g(-1));
|
|
2447
|
-
}, [v.length]),
|
|
2447
|
+
}, [v.length]), E = {
|
|
2448
2448
|
sm: "cedros-button-sm",
|
|
2449
2449
|
md: "cedros-button-md",
|
|
2450
2450
|
lg: "cedros-button-lg"
|
|
2451
|
-
},
|
|
2451
|
+
}, L = {
|
|
2452
2452
|
default: "cedros-button-primary",
|
|
2453
2453
|
outline: "cedros-button-outline",
|
|
2454
2454
|
ghost: "cedros-button-ghost"
|
|
@@ -2458,13 +2458,13 @@ function oc({
|
|
|
2458
2458
|
"button",
|
|
2459
2459
|
{
|
|
2460
2460
|
type: "button",
|
|
2461
|
-
className: `cedros-button ${
|
|
2461
|
+
className: `cedros-button ${L[r]} ${E[o]} ${t}`,
|
|
2462
2462
|
disabled: !0,
|
|
2463
2463
|
children: /* @__PURE__ */ e(K, { size: "sm" })
|
|
2464
2464
|
}
|
|
2465
2465
|
);
|
|
2466
2466
|
if (c && l) {
|
|
2467
|
-
const A = l.name || l.email || "User",
|
|
2467
|
+
const A = l.name || l.email || "User", C = Qr(l.picture);
|
|
2468
2468
|
return (
|
|
2469
2469
|
// L-08: Added keyboard handler and ref for accessibility
|
|
2470
2470
|
/* @__PURE__ */ i("div", { className: "cedros-user-menu", ref: u, onKeyDown: b, children: [
|
|
@@ -2473,16 +2473,16 @@ function oc({
|
|
|
2473
2473
|
{
|
|
2474
2474
|
ref: y,
|
|
2475
2475
|
type: "button",
|
|
2476
|
-
className: `cedros-button cedros-user-button ${
|
|
2476
|
+
className: `cedros-button cedros-user-button ${E[o]} ${t}`,
|
|
2477
2477
|
"aria-haspopup": "menu",
|
|
2478
2478
|
"aria-expanded": m,
|
|
2479
2479
|
"aria-label": `User menu for ${A}`,
|
|
2480
|
-
onClick:
|
|
2480
|
+
onClick: N,
|
|
2481
2481
|
children: [
|
|
2482
|
-
|
|
2482
|
+
C ? /* @__PURE__ */ e(
|
|
2483
2483
|
"img",
|
|
2484
2484
|
{
|
|
2485
|
-
src:
|
|
2485
|
+
src: C,
|
|
2486
2486
|
alt: A,
|
|
2487
2487
|
className: "cedros-user-avatar",
|
|
2488
2488
|
referrerPolicy: "no-referrer",
|
|
@@ -2494,7 +2494,7 @@ function oc({
|
|
|
2494
2494
|
}
|
|
2495
2495
|
),
|
|
2496
2496
|
m && /* @__PURE__ */ i("div", { className: "cedros-dropdown cedros-dropdown-open", role: "menu", children: [
|
|
2497
|
-
s.map((
|
|
2497
|
+
s.map((x, S) => /* @__PURE__ */ i(
|
|
2498
2498
|
"button",
|
|
2499
2499
|
{
|
|
2500
2500
|
type: "button",
|
|
@@ -2502,11 +2502,11 @@ function oc({
|
|
|
2502
2502
|
role: "menuitem",
|
|
2503
2503
|
tabIndex: w === S ? 0 : -1,
|
|
2504
2504
|
onClick: () => {
|
|
2505
|
-
|
|
2505
|
+
x.onClick(), f(!1);
|
|
2506
2506
|
},
|
|
2507
2507
|
children: [
|
|
2508
|
-
|
|
2509
|
-
|
|
2508
|
+
x.icon && /* @__PURE__ */ e("span", { className: "cedros-dropdown-icon", children: x.icon }),
|
|
2509
|
+
x.label
|
|
2510
2510
|
]
|
|
2511
2511
|
},
|
|
2512
2512
|
S
|
|
@@ -2533,7 +2533,7 @@ function oc({
|
|
|
2533
2533
|
"button",
|
|
2534
2534
|
{
|
|
2535
2535
|
type: "button",
|
|
2536
|
-
className: `cedros-button ${
|
|
2536
|
+
className: `cedros-button ${L[r]} ${E[o]} ${t}`,
|
|
2537
2537
|
onClick: h,
|
|
2538
2538
|
children: a || "Sign in"
|
|
2539
2539
|
}
|
|
@@ -2812,11 +2812,11 @@ function on() {
|
|
|
2812
2812
|
return p.current.callbacks?.onLoginSuccess?.(b.user, "apple"), r?.handleLoginSuccess(b.user, b.tokens), a(!1), b;
|
|
2813
2813
|
} catch (y) {
|
|
2814
2814
|
if (y.error === "popup_closed_by_user") {
|
|
2815
|
-
const
|
|
2815
|
+
const N = {
|
|
2816
2816
|
code: "SERVER_ERROR",
|
|
2817
2817
|
message: "Apple Sign In was cancelled"
|
|
2818
2818
|
};
|
|
2819
|
-
throw c(
|
|
2819
|
+
throw c(N), a(!1), N;
|
|
2820
2820
|
}
|
|
2821
2821
|
const b = O(y, "Apple sign-in failed");
|
|
2822
2822
|
throw b.code === "ACCOUNT_LINK_REQUIRED" && u && h(u), c(b), a(!1), b;
|
|
@@ -3219,56 +3219,59 @@ function tr() {
|
|
|
3219
3219
|
}
|
|
3220
3220
|
const Te = ["login", "register"];
|
|
3221
3221
|
function jt({ onSuccess: t, className: r = "", defaultTab: o = "login" }) {
|
|
3222
|
-
const { config: a } = ne(), [s, n] = k(o), [l, c] = k("form"), [d, h] = k(() => tr()), [p] = k(() => cs());
|
|
3222
|
+
const { config: a } = ne(), [s, n] = k(o), [l, c] = k("form"), [d, h] = k(() => tr()), [p] = k(() => cs()), [m, f] = k(!1);
|
|
3223
3223
|
_(() => {
|
|
3224
|
-
const
|
|
3225
|
-
return
|
|
3226
|
-
window.removeEventListener("load",
|
|
3224
|
+
const A = () => h(tr());
|
|
3225
|
+
return A(), window.addEventListener("load", A), window.addEventListener("focus", A), () => {
|
|
3226
|
+
window.removeEventListener("load", A), window.removeEventListener("focus", A);
|
|
3227
3227
|
};
|
|
3228
3228
|
}, []);
|
|
3229
|
-
const
|
|
3230
|
-
(
|
|
3231
|
-
const
|
|
3232
|
-
let
|
|
3233
|
-
switch (
|
|
3229
|
+
const w = a.forms?.forgotPassword?.mode ?? (a.features?.instantLink ? "instantLink" : "reset"), g = P(
|
|
3230
|
+
(A) => {
|
|
3231
|
+
const C = Te.indexOf(s);
|
|
3232
|
+
let x = C;
|
|
3233
|
+
switch (A.key) {
|
|
3234
3234
|
case "ArrowLeft":
|
|
3235
3235
|
case "ArrowUp":
|
|
3236
|
-
|
|
3236
|
+
x = C === 0 ? Te.length - 1 : C - 1;
|
|
3237
3237
|
break;
|
|
3238
3238
|
case "ArrowRight":
|
|
3239
3239
|
case "ArrowDown":
|
|
3240
|
-
|
|
3240
|
+
x = C === Te.length - 1 ? 0 : C + 1;
|
|
3241
3241
|
break;
|
|
3242
3242
|
case "Home":
|
|
3243
|
-
|
|
3243
|
+
x = 0;
|
|
3244
3244
|
break;
|
|
3245
3245
|
case "End":
|
|
3246
|
-
|
|
3246
|
+
x = Te.length - 1;
|
|
3247
3247
|
break;
|
|
3248
3248
|
default:
|
|
3249
3249
|
return;
|
|
3250
3250
|
}
|
|
3251
|
-
|
|
3252
|
-
const
|
|
3253
|
-
n(
|
|
3251
|
+
A.preventDefault();
|
|
3252
|
+
const S = Te[x];
|
|
3253
|
+
n(S), document.getElementById(`cedros-tab-${S}`)?.focus();
|
|
3254
3254
|
},
|
|
3255
3255
|
[s]
|
|
3256
|
-
),
|
|
3256
|
+
), u = a.features ?? {
|
|
3257
3257
|
email: !0,
|
|
3258
3258
|
google: !0,
|
|
3259
3259
|
apple: !0,
|
|
3260
3260
|
solana: !0,
|
|
3261
3261
|
webauthn: !0
|
|
3262
|
-
},
|
|
3263
|
-
return l === "forgotPassword" ? /* @__PURE__ */ e("div", { className: `cedros-login-form ${r}`, children: /* @__PURE__ */ e(rn, { onCancel: () => c("form") }) }) : /* @__PURE__ */ i("div", { className: `cedros-login-form ${r}`, children: [
|
|
3264
|
-
(
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3262
|
+
}, y = u.email !== !1, v = u.google !== !1 && a.googleClientId, b = u.apple !== !1 && a.appleClientId && p, N = u.solana !== !1 && d, E = u.webauthn !== !1, L = y && (v || b || N || E);
|
|
3263
|
+
return l === "forgotPassword" ? /* @__PURE__ */ e("div", { className: `cedros-login-form ${r}`, children: /* @__PURE__ */ e(rn, { onCancel: () => c("form") }) }) : /* @__PURE__ */ i("div", { className: `cedros-login-form ${m ? "cedros-login-form--connecting" : ""} ${r}`, children: [
|
|
3264
|
+
(E || v || b || N) && /* @__PURE__ */ i("div", { className: "cedros-social-buttons", children: [
|
|
3265
|
+
E && /* @__PURE__ */ e(un, { onSuccess: t, mode: s === "register" ? "register" : "login" }),
|
|
3266
|
+
v && /* @__PURE__ */ e(Js, { onSuccess: t }),
|
|
3267
|
+
b && /* @__PURE__ */ e(nn, { onSuccess: t }),
|
|
3268
|
+
N && /* @__PURE__ */ i(X, { children: [
|
|
3269
|
+
/* @__PURE__ */ e(Xs, { onSuccess: t, onLoadingChange: f }),
|
|
3270
|
+
m && /* @__PURE__ */ e("p", { className: "cedros-solana-status", children: "Connecting to Solana wallet…" })
|
|
3271
|
+
] })
|
|
3269
3272
|
] }),
|
|
3270
|
-
|
|
3271
|
-
|
|
3273
|
+
L && /* @__PURE__ */ e("div", { className: "cedros-divider", children: /* @__PURE__ */ e("span", { children: "Or continue with" }) }),
|
|
3274
|
+
y && /* @__PURE__ */ i(X, { children: [
|
|
3272
3275
|
/* @__PURE__ */ i("div", { className: "cedros-tabs", role: "tablist", "aria-label": "Authentication method", children: [
|
|
3273
3276
|
/* @__PURE__ */ e(
|
|
3274
3277
|
"button",
|
|
@@ -3278,7 +3281,7 @@ function jt({ onSuccess: t, className: r = "", defaultTab: o = "login" }) {
|
|
|
3278
3281
|
id: "cedros-tab-login",
|
|
3279
3282
|
className: `cedros-tab ${s === "login" ? "cedros-tab-active" : ""}`,
|
|
3280
3283
|
onClick: () => n("login"),
|
|
3281
|
-
onKeyDown:
|
|
3284
|
+
onKeyDown: g,
|
|
3282
3285
|
"aria-selected": s === "login",
|
|
3283
3286
|
"aria-controls": "cedros-tabpanel-login",
|
|
3284
3287
|
tabIndex: s === "login" ? 0 : -1,
|
|
@@ -3293,7 +3296,7 @@ function jt({ onSuccess: t, className: r = "", defaultTab: o = "login" }) {
|
|
|
3293
3296
|
id: "cedros-tab-register",
|
|
3294
3297
|
className: `cedros-tab ${s === "register" ? "cedros-tab-active" : ""}`,
|
|
3295
3298
|
onClick: () => n("register"),
|
|
3296
|
-
onKeyDown:
|
|
3299
|
+
onKeyDown: g,
|
|
3297
3300
|
"aria-selected": s === "register",
|
|
3298
3301
|
"aria-controls": "cedros-tabpanel-register",
|
|
3299
3302
|
tabIndex: s === "register" ? 0 : -1,
|
|
@@ -3312,7 +3315,7 @@ function jt({ onSuccess: t, className: r = "", defaultTab: o = "login" }) {
|
|
|
3312
3315
|
{
|
|
3313
3316
|
onSuccess: t,
|
|
3314
3317
|
onSwitchToRegister: () => n("register"),
|
|
3315
|
-
onForgotPassword:
|
|
3318
|
+
onForgotPassword: w === "reset" ? () => c("forgotPassword") : void 0
|
|
3316
3319
|
}
|
|
3317
3320
|
) : /* @__PURE__ */ e(
|
|
3318
3321
|
Gs,
|
|
@@ -3967,8 +3970,8 @@ function Cn({
|
|
|
3967
3970
|
if (y.key === "Tab" && p.current) {
|
|
3968
3971
|
const v = p.current.querySelectorAll(
|
|
3969
3972
|
'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
3970
|
-
), b = v[0],
|
|
3971
|
-
y.shiftKey ? document.activeElement === b && (y.preventDefault(),
|
|
3973
|
+
), b = v[0], N = v[v.length - 1];
|
|
3974
|
+
y.shiftKey ? document.activeElement === b && (y.preventDefault(), N?.focus()) : document.activeElement === N && (y.preventDefault(), b?.focus());
|
|
3972
3975
|
}
|
|
3973
3976
|
};
|
|
3974
3977
|
return document.addEventListener("keydown", u), () => document.removeEventListener("keydown", u);
|
|
@@ -4283,10 +4286,10 @@ function Bn({
|
|
|
4283
4286
|
className: s = ""
|
|
4284
4287
|
}) {
|
|
4285
4288
|
const [n, l] = k(Array(ce).fill("")), [c, d] = k(null), [h, p] = k([]), [m, f] = k(null), w = Vr(), g = $(null), u = P(
|
|
4286
|
-
(A,
|
|
4287
|
-
const
|
|
4288
|
-
if (
|
|
4289
|
-
const S = Zo(
|
|
4289
|
+
(A, C) => {
|
|
4290
|
+
const x = [...n];
|
|
4291
|
+
if (x[A] = C.toLowerCase().trim(), l(x), C.length > 0) {
|
|
4292
|
+
const S = Zo(C, 5);
|
|
4290
4293
|
p(S);
|
|
4291
4294
|
} else
|
|
4292
4295
|
p([]);
|
|
@@ -4297,8 +4300,8 @@ function Bn({
|
|
|
4297
4300
|
d(A), p([]);
|
|
4298
4301
|
}, []), v = P(
|
|
4299
4302
|
(A) => {
|
|
4300
|
-
const
|
|
4301
|
-
|
|
4303
|
+
const C = n[A];
|
|
4304
|
+
C && !We(C) && f(`Word ${A + 1} is not in the wordlist`), g.current !== null && window.clearTimeout(g.current), g.current = window.setTimeout(() => {
|
|
4302
4305
|
c === A && p([]);
|
|
4303
4306
|
}, 200);
|
|
4304
4307
|
},
|
|
@@ -4310,25 +4313,25 @@ function Bn({
|
|
|
4310
4313
|
const b = P(
|
|
4311
4314
|
(A) => {
|
|
4312
4315
|
if (c !== null) {
|
|
4313
|
-
const
|
|
4314
|
-
|
|
4316
|
+
const C = [...n];
|
|
4317
|
+
C[c] = A, l(C), p([]), document.querySelector(
|
|
4315
4318
|
`[data-word-index="${c + 1}"]`
|
|
4316
4319
|
)?.focus();
|
|
4317
4320
|
}
|
|
4318
4321
|
},
|
|
4319
4322
|
[c, n]
|
|
4320
|
-
),
|
|
4321
|
-
const
|
|
4322
|
-
|
|
4323
|
-
}, []),
|
|
4323
|
+
), N = P((A) => {
|
|
4324
|
+
const C = A.clipboardData.getData("text"), x = tn(C);
|
|
4325
|
+
x.length === ce && (A.preventDefault(), l(x), f(null));
|
|
4326
|
+
}, []), E = P(
|
|
4324
4327
|
(A) => {
|
|
4325
4328
|
if (A.preventDefault(), n.filter((S) => !S).length > 0) {
|
|
4326
4329
|
f(`Please enter all ${ce} words`);
|
|
4327
4330
|
return;
|
|
4328
4331
|
}
|
|
4329
|
-
const
|
|
4330
|
-
if (
|
|
4331
|
-
f(`Invalid words: ${
|
|
4332
|
+
const x = n.map((S, B) => ({ word: S, index: B + 1 })).filter(({ word: S }) => !We(S));
|
|
4333
|
+
if (x.length > 0) {
|
|
4334
|
+
f(`Invalid words: ${x.map((S) => `#${S.index}`).join(", ")}`);
|
|
4332
4335
|
return;
|
|
4333
4336
|
}
|
|
4334
4337
|
if (!as(n)) {
|
|
@@ -4338,41 +4341,41 @@ function Bn({
|
|
|
4338
4341
|
t(n);
|
|
4339
4342
|
},
|
|
4340
4343
|
[n, t]
|
|
4341
|
-
),
|
|
4344
|
+
), L = a || m;
|
|
4342
4345
|
return /* @__PURE__ */ i(
|
|
4343
4346
|
"form",
|
|
4344
4347
|
{
|
|
4345
4348
|
className: `cedros-recovery-phrase-input ${s}`,
|
|
4346
|
-
onSubmit:
|
|
4347
|
-
onPaste:
|
|
4349
|
+
onSubmit: E,
|
|
4350
|
+
onPaste: N,
|
|
4348
4351
|
children: [
|
|
4349
4352
|
/* @__PURE__ */ i("div", { className: "cedros-recovery-input-header", children: [
|
|
4350
4353
|
/* @__PURE__ */ e("h3", { className: "cedros-recovery-input-title", children: "Enter Recovery Phrase" }),
|
|
4351
4354
|
/* @__PURE__ */ e("p", { className: "cedros-recovery-input-description", children: "Enter your 12-word recovery phrase. You can paste the entire phrase at once." })
|
|
4352
4355
|
] }),
|
|
4353
|
-
/* @__PURE__ */ e("div", { className: "cedros-word-inputs", children: Array.from({ length: ce }, (A,
|
|
4356
|
+
/* @__PURE__ */ e("div", { className: "cedros-word-inputs", children: Array.from({ length: ce }, (A, C) => /* @__PURE__ */ i("div", { className: "cedros-word-input-wrapper", children: [
|
|
4354
4357
|
/* @__PURE__ */ i("label", { className: "cedros-word-label", children: [
|
|
4355
|
-
|
|
4358
|
+
C + 1,
|
|
4356
4359
|
"."
|
|
4357
4360
|
] }),
|
|
4358
4361
|
/* @__PURE__ */ e(
|
|
4359
4362
|
"input",
|
|
4360
4363
|
{
|
|
4361
4364
|
type: "text",
|
|
4362
|
-
className: `cedros-word-input ${n[
|
|
4363
|
-
value: n[
|
|
4364
|
-
onChange: (
|
|
4365
|
-
onFocus: () => y(
|
|
4366
|
-
onBlur: () => v(
|
|
4367
|
-
"data-word-index":
|
|
4365
|
+
className: `cedros-word-input ${n[C] && !We(n[C]) ? "cedros-word-invalid" : n[C] && We(n[C]) ? "cedros-word-valid" : ""}`,
|
|
4366
|
+
value: n[C],
|
|
4367
|
+
onChange: (x) => u(C, x.target.value),
|
|
4368
|
+
onFocus: () => y(C),
|
|
4369
|
+
onBlur: () => v(C),
|
|
4370
|
+
"data-word-index": C,
|
|
4368
4371
|
autoComplete: "off",
|
|
4369
4372
|
autoCapitalize: "none",
|
|
4370
4373
|
spellCheck: !1,
|
|
4371
4374
|
disabled: o,
|
|
4372
|
-
"aria-label": `Word ${
|
|
4375
|
+
"aria-label": `Word ${C + 1}`
|
|
4373
4376
|
}
|
|
4374
4377
|
)
|
|
4375
|
-
] },
|
|
4378
|
+
] }, C)) }),
|
|
4376
4379
|
c !== null && h.length > 0 && /* @__PURE__ */ e("div", { className: "cedros-suggestions", role: "listbox", id: `${w}-suggestions`, children: h.map((A) => /* @__PURE__ */ e(
|
|
4377
4380
|
"button",
|
|
4378
4381
|
{
|
|
@@ -4384,7 +4387,7 @@ function Bn({
|
|
|
4384
4387
|
},
|
|
4385
4388
|
A
|
|
4386
4389
|
)) }),
|
|
4387
|
-
|
|
4390
|
+
L && /* @__PURE__ */ e("p", { className: "cedros-input-error", role: "alert", children: L }),
|
|
4388
4391
|
/* @__PURE__ */ i("div", { className: "cedros-recovery-input-actions", children: [
|
|
4389
4392
|
r && /* @__PURE__ */ e(
|
|
4390
4393
|
"button",
|
|
@@ -4554,17 +4557,17 @@ function Fn() {
|
|
|
4554
4557
|
s({ step: "generating_seed" });
|
|
4555
4558
|
const b = qs();
|
|
4556
4559
|
c.current.push(b), s({ step: "splitting_shares" });
|
|
4557
|
-
const { shareA:
|
|
4558
|
-
c.current.push(
|
|
4559
|
-
const A = await _r(
|
|
4560
|
+
const { shareA: N, shareB: E, shareC: L } = $r(b);
|
|
4561
|
+
c.current.push(N, E, L), s({ step: "encrypting_shares" });
|
|
4562
|
+
const A = await _r(N, Wr(u)), C = Jr(b), x = Xr(C);
|
|
4560
4563
|
s({ step: "uploading" });
|
|
4561
4564
|
const S = {
|
|
4562
|
-
solanaPubkey:
|
|
4565
|
+
solanaPubkey: x,
|
|
4563
4566
|
shareAAuthMethod: g,
|
|
4564
4567
|
shareACiphertext: A.ciphertext,
|
|
4565
4568
|
shareANonce: A.nonce,
|
|
4566
4569
|
// Share B is now plaintext (SSS math protects it)
|
|
4567
|
-
shareB: ge(
|
|
4570
|
+
shareB: ge(E)
|
|
4568
4571
|
};
|
|
4569
4572
|
if (g === "password") {
|
|
4570
4573
|
if (!y) throw new Error("KDF salt required for password method");
|
|
@@ -4573,14 +4576,14 @@ function Fn() {
|
|
|
4573
4576
|
if (g === "passkey" && v && (S.prfSalt = v), await r(S), o === "none")
|
|
4574
4577
|
d(), s({
|
|
4575
4578
|
step: "complete",
|
|
4576
|
-
solanaPubkey:
|
|
4579
|
+
solanaPubkey: x
|
|
4577
4580
|
});
|
|
4578
4581
|
else {
|
|
4579
|
-
const B = o === "full_seed" ? Jo(b) : Go(ze(
|
|
4582
|
+
const B = o === "full_seed" ? Jo(b) : Go(ze(L));
|
|
4580
4583
|
s({
|
|
4581
4584
|
step: "showing_recovery",
|
|
4582
4585
|
recoveryPhrase: B,
|
|
4583
|
-
solanaPubkey:
|
|
4586
|
+
solanaPubkey: x
|
|
4584
4587
|
});
|
|
4585
4588
|
}
|
|
4586
4589
|
},
|
|
@@ -4616,11 +4619,11 @@ function Fn() {
|
|
|
4616
4619
|
s({ step: "registering_passkey" });
|
|
4617
4620
|
let y;
|
|
4618
4621
|
try {
|
|
4619
|
-
const b = new TextEncoder().encode(t.id),
|
|
4622
|
+
const b = new TextEncoder().encode(t.id), N = t.name ?? t.email ?? "User", E = t.email ?? t.id;
|
|
4620
4623
|
y = (await js(
|
|
4621
4624
|
b,
|
|
4625
|
+
E,
|
|
4622
4626
|
N,
|
|
4623
|
-
C,
|
|
4624
4627
|
g
|
|
4625
4628
|
)).prfOutput;
|
|
4626
4629
|
} catch (b) {
|
|
@@ -4670,30 +4673,30 @@ function Un({
|
|
|
4670
4673
|
confirmRecoveryPhrase: d,
|
|
4671
4674
|
cancel: h,
|
|
4672
4675
|
isEnrolling: p
|
|
4673
|
-
} = Fn(), m = () => a || "password", [f, w] = k(m), [g, u] = k(""), [y, v] = k(""), [b,
|
|
4676
|
+
} = Fn(), m = () => a || "password", [f, w] = k(m), [g, u] = k(""), [y, v] = k(""), [b, N] = k(null);
|
|
4674
4677
|
_(() => {
|
|
4675
4678
|
w(m());
|
|
4676
4679
|
}, [s?.id, a]);
|
|
4677
|
-
const
|
|
4678
|
-
async (
|
|
4679
|
-
if (
|
|
4680
|
-
|
|
4680
|
+
const E = P(
|
|
4681
|
+
async (x) => {
|
|
4682
|
+
if (x.preventDefault(), g !== y) {
|
|
4683
|
+
N("Passwords do not match");
|
|
4681
4684
|
return;
|
|
4682
4685
|
}
|
|
4683
4686
|
const S = Wt(g);
|
|
4684
4687
|
if (!S.isValid) {
|
|
4685
4688
|
const B = Object.values(S.errors)[0];
|
|
4686
|
-
|
|
4689
|
+
N(B ?? "Password does not meet requirements");
|
|
4687
4690
|
return;
|
|
4688
4691
|
}
|
|
4689
|
-
|
|
4692
|
+
N(null), await l(g);
|
|
4690
4693
|
},
|
|
4691
4694
|
[g, y, l]
|
|
4692
|
-
),
|
|
4695
|
+
), L = P(async () => {
|
|
4693
4696
|
await c();
|
|
4694
4697
|
}, [c]), A = P(() => {
|
|
4695
4698
|
d(), n.solanaPubkey && t?.(n.solanaPubkey);
|
|
4696
|
-
}, [d, n.solanaPubkey, t]),
|
|
4699
|
+
}, [d, n.solanaPubkey, t]), C = P(() => {
|
|
4697
4700
|
h(), r?.();
|
|
4698
4701
|
}, [h, r]);
|
|
4699
4702
|
return n.step === "generating_seed" || n.step === "splitting_shares" ? /* @__PURE__ */ e("div", { className: `cedros-wallet-enrollment ${o}`, "aria-busy": "true", children: /* @__PURE__ */ i("div", { className: "cedros-enrollment-progress", role: "status", "aria-live": "polite", children: [
|
|
@@ -4799,7 +4802,7 @@ function Un({
|
|
|
4799
4802
|
{
|
|
4800
4803
|
type: "button",
|
|
4801
4804
|
className: "cedros-button cedros-button-secondary",
|
|
4802
|
-
onClick:
|
|
4805
|
+
onClick: C,
|
|
4803
4806
|
children: "Cancel"
|
|
4804
4807
|
}
|
|
4805
4808
|
),
|
|
@@ -4852,13 +4855,13 @@ function Un({
|
|
|
4852
4855
|
/* @__PURE__ */ e("span", { children: "Passkey" })
|
|
4853
4856
|
] })
|
|
4854
4857
|
] }),
|
|
4855
|
-
f === "password" && /* @__PURE__ */ i("form", { onSubmit:
|
|
4858
|
+
f === "password" && /* @__PURE__ */ i("form", { onSubmit: E, className: "cedros-enrollment-form", children: [
|
|
4856
4859
|
/* @__PURE__ */ e(
|
|
4857
4860
|
we,
|
|
4858
4861
|
{
|
|
4859
4862
|
label: "Password",
|
|
4860
4863
|
value: g,
|
|
4861
|
-
onChange: (
|
|
4864
|
+
onChange: (x) => u(x.target.value),
|
|
4862
4865
|
showStrengthMeter: !0,
|
|
4863
4866
|
disabled: p,
|
|
4864
4867
|
required: !0,
|
|
@@ -4871,7 +4874,7 @@ function Un({
|
|
|
4871
4874
|
{
|
|
4872
4875
|
label: "Confirm Password",
|
|
4873
4876
|
value: y,
|
|
4874
|
-
onChange: (
|
|
4877
|
+
onChange: (x) => v(x.target.value),
|
|
4875
4878
|
error: b ?? void 0,
|
|
4876
4879
|
disabled: p,
|
|
4877
4880
|
required: !0,
|
|
@@ -4886,7 +4889,7 @@ function Un({
|
|
|
4886
4889
|
{
|
|
4887
4890
|
type: "button",
|
|
4888
4891
|
className: "cedros-button cedros-button-secondary",
|
|
4889
|
-
onClick:
|
|
4892
|
+
onClick: C,
|
|
4890
4893
|
disabled: p,
|
|
4891
4894
|
children: "Cancel"
|
|
4892
4895
|
}
|
|
@@ -4940,7 +4943,7 @@ function Un({
|
|
|
4940
4943
|
{
|
|
4941
4944
|
type: "button",
|
|
4942
4945
|
className: "cedros-button cedros-button-secondary",
|
|
4943
|
-
onClick:
|
|
4946
|
+
onClick: C,
|
|
4944
4947
|
disabled: p,
|
|
4945
4948
|
children: "Cancel"
|
|
4946
4949
|
}
|
|
@@ -4950,7 +4953,7 @@ function Un({
|
|
|
4950
4953
|
{
|
|
4951
4954
|
type: "button",
|
|
4952
4955
|
className: "cedros-button cedros-button-primary",
|
|
4953
|
-
onClick:
|
|
4956
|
+
onClick: L,
|
|
4954
4957
|
disabled: p,
|
|
4955
4958
|
children: p ? "Creating..." : "Use Passkey"
|
|
4956
4959
|
}
|
|
@@ -5155,7 +5158,7 @@ function Vn({
|
|
|
5155
5158
|
_(() => {
|
|
5156
5159
|
a !== void 0 && w(a);
|
|
5157
5160
|
}, [a]);
|
|
5158
|
-
const b = f === "password",
|
|
5161
|
+
const b = f === "password", N = f === "passkey", E = P(async () => {
|
|
5159
5162
|
if (m("credential"), v(null), !f)
|
|
5160
5163
|
try {
|
|
5161
5164
|
const T = await l();
|
|
@@ -5163,7 +5166,7 @@ function Vn({
|
|
|
5163
5166
|
} catch (T) {
|
|
5164
5167
|
v(T instanceof Error ? T.message : "Failed to get wallet info"), m("error");
|
|
5165
5168
|
}
|
|
5166
|
-
}, [f, l]),
|
|
5169
|
+
}, [f, l]), L = P(
|
|
5167
5170
|
async (T) => {
|
|
5168
5171
|
T.preventDefault(), v(null), m("unlocking");
|
|
5169
5172
|
try {
|
|
@@ -5190,9 +5193,9 @@ function Vn({
|
|
|
5190
5193
|
} catch (T) {
|
|
5191
5194
|
v(T instanceof Error ? T.message : "Failed to unlock wallet"), m("error");
|
|
5192
5195
|
}
|
|
5193
|
-
}, [d, n, t]),
|
|
5196
|
+
}, [d, n, t]), C = P(() => {
|
|
5194
5197
|
u(""), m("idle"), v(null), r?.();
|
|
5195
|
-
}, [r]),
|
|
5198
|
+
}, [r]), x = P(() => {
|
|
5196
5199
|
u(""), m("credential"), v(null);
|
|
5197
5200
|
}, []), S = c || h, B = () => {
|
|
5198
5201
|
switch (p) {
|
|
@@ -5206,13 +5209,13 @@ function Vn({
|
|
|
5206
5209
|
{
|
|
5207
5210
|
type: "button",
|
|
5208
5211
|
className: "cedros-button cedros-button-primary",
|
|
5209
|
-
onClick:
|
|
5212
|
+
onClick: E,
|
|
5210
5213
|
children: "Unlock Wallet"
|
|
5211
5214
|
}
|
|
5212
5215
|
)
|
|
5213
5216
|
] });
|
|
5214
5217
|
case "credential":
|
|
5215
|
-
return b ? /* @__PURE__ */ i("form", { className: "cedros-wallet-unlock-form", onSubmit:
|
|
5218
|
+
return b ? /* @__PURE__ */ i("form", { className: "cedros-wallet-unlock-form", onSubmit: L, children: [
|
|
5216
5219
|
/* @__PURE__ */ e("h3", { className: "cedros-wallet-unlock-title", children: "Enter Password" }),
|
|
5217
5220
|
/* @__PURE__ */ e("p", { className: "cedros-wallet-unlock-description", children: "Enter your wallet password to unlock." }),
|
|
5218
5221
|
/* @__PURE__ */ e(
|
|
@@ -5241,13 +5244,13 @@ function Vn({
|
|
|
5241
5244
|
{
|
|
5242
5245
|
type: "button",
|
|
5243
5246
|
className: "cedros-button cedros-button-secondary",
|
|
5244
|
-
onClick:
|
|
5247
|
+
onClick: C,
|
|
5245
5248
|
disabled: S,
|
|
5246
5249
|
children: "Cancel"
|
|
5247
5250
|
}
|
|
5248
5251
|
)
|
|
5249
5252
|
] })
|
|
5250
|
-
] }) :
|
|
5253
|
+
] }) : N ? /* @__PURE__ */ i("div", { className: "cedros-wallet-unlock-passkey", children: [
|
|
5251
5254
|
/* @__PURE__ */ e("h3", { className: "cedros-wallet-unlock-title", children: "Verify with Passkey" }),
|
|
5252
5255
|
/* @__PURE__ */ e("p", { className: "cedros-wallet-unlock-description", children: "Use your passkey to unlock your wallet." }),
|
|
5253
5256
|
/* @__PURE__ */ e(
|
|
@@ -5258,7 +5261,7 @@ function Vn({
|
|
|
5258
5261
|
error: y ?? void 0,
|
|
5259
5262
|
onPrompt: A,
|
|
5260
5263
|
onRetry: A,
|
|
5261
|
-
onCancel: o ?
|
|
5264
|
+
onCancel: o ? C : void 0
|
|
5262
5265
|
}
|
|
5263
5266
|
)
|
|
5264
5267
|
] }) : /* @__PURE__ */ i("div", { className: "cedros-wallet-unlock-loading", children: [
|
|
@@ -5288,7 +5291,7 @@ function Vn({
|
|
|
5288
5291
|
{
|
|
5289
5292
|
type: "button",
|
|
5290
5293
|
className: "cedros-button cedros-button-primary",
|
|
5291
|
-
onClick:
|
|
5294
|
+
onClick: x,
|
|
5292
5295
|
children: "Try Again"
|
|
5293
5296
|
}
|
|
5294
5297
|
),
|
|
@@ -5297,7 +5300,7 @@ function Vn({
|
|
|
5297
5300
|
{
|
|
5298
5301
|
type: "button",
|
|
5299
5302
|
className: "cedros-button cedros-button-secondary",
|
|
5300
|
-
onClick:
|
|
5303
|
+
onClick: C,
|
|
5301
5304
|
children: "Cancel"
|
|
5302
5305
|
}
|
|
5303
5306
|
)
|
|
@@ -5391,32 +5394,32 @@ function Kn() {
|
|
|
5391
5394
|
throw new Error("Invalid recovery phrase. Please check your words.");
|
|
5392
5395
|
let g;
|
|
5393
5396
|
if (o === "share_c_only") {
|
|
5394
|
-
const
|
|
5395
|
-
c.current.push(
|
|
5396
|
-
const S = ge(
|
|
5397
|
-
c.current.push(T), g = Do(ze(T), ze(
|
|
5397
|
+
const x = $o(m);
|
|
5398
|
+
c.current.push(x);
|
|
5399
|
+
const S = ge(x), B = await r({ shareC: S }), T = zr(B.shareB);
|
|
5400
|
+
c.current.push(T), g = Do(ze(T), ze(x)), c.current.push(g);
|
|
5398
5401
|
} else
|
|
5399
5402
|
g = Xo(m), c.current.push(g);
|
|
5400
5403
|
const u = Jr(g), y = Xr(u), { shareA: v, shareB: b } = $r(g);
|
|
5401
5404
|
c.current.push(v, b), s({ step: "encrypting" });
|
|
5402
|
-
let
|
|
5405
|
+
let N, E, L;
|
|
5403
5406
|
if (f === "passkey") {
|
|
5404
|
-
const
|
|
5405
|
-
|
|
5406
|
-
const S = await _t(
|
|
5407
|
-
c.current.push(S.prfOutput),
|
|
5407
|
+
const x = qr();
|
|
5408
|
+
L = ge(x);
|
|
5409
|
+
const S = await _t(L);
|
|
5410
|
+
c.current.push(S.prfOutput), N = await jr(S.prfOutput, x), c.current.push(N);
|
|
5408
5411
|
} else
|
|
5409
|
-
|
|
5410
|
-
const A = await _r(v, Wr(
|
|
5412
|
+
E = Or(), N = await Zr(w, E, Ve), c.current.push(N);
|
|
5413
|
+
const A = await _r(v, Wr(N));
|
|
5411
5414
|
s({ step: "uploading" });
|
|
5412
|
-
const
|
|
5415
|
+
const C = {
|
|
5413
5416
|
solanaPubkey: y,
|
|
5414
5417
|
shareAAuthMethod: f,
|
|
5415
5418
|
shareACiphertext: A.ciphertext,
|
|
5416
5419
|
shareANonce: A.nonce,
|
|
5417
5420
|
shareB: ge(b)
|
|
5418
5421
|
};
|
|
5419
|
-
f === "password" && (
|
|
5422
|
+
f === "password" && (C.shareAKdfSalt = ge(E), C.shareAKdfParams = Ve), f === "passkey" && (C.prfSalt = L), await t(C), d(), s({ step: "complete" });
|
|
5420
5423
|
} catch (g) {
|
|
5421
5424
|
d(), s({
|
|
5422
5425
|
step: "error",
|
|
@@ -5443,17 +5446,17 @@ function Gn({
|
|
|
5443
5446
|
className: o = "",
|
|
5444
5447
|
defaultAuthMethod: a = "password"
|
|
5445
5448
|
}) {
|
|
5446
|
-
const { state: s, startRecovery: n, cancel: l, isRecovering: c } = Kn(), [d, h] = k([]), [p, m] = k(!1), [f, w] = k(a), [g, u] = k(""), [y, v] = k(""), [b,
|
|
5449
|
+
const { state: s, startRecovery: n, cancel: l, isRecovering: c } = Kn(), [d, h] = k([]), [p, m] = k(!1), [f, w] = k(a), [g, u] = k(""), [y, v] = k(""), [b, N] = k(null), E = P((S) => {
|
|
5447
5450
|
h(S), m(!0);
|
|
5448
|
-
}, []),
|
|
5451
|
+
}, []), L = P(
|
|
5449
5452
|
async (S) => {
|
|
5450
|
-
if (S.preventDefault(),
|
|
5453
|
+
if (S.preventDefault(), N(null), f !== "passkey") {
|
|
5451
5454
|
if (g !== y) {
|
|
5452
|
-
|
|
5455
|
+
N("Passwords do not match");
|
|
5453
5456
|
return;
|
|
5454
5457
|
}
|
|
5455
5458
|
if (f === "password" && g.length < 8) {
|
|
5456
|
-
|
|
5459
|
+
N("Password must be at least 8 characters");
|
|
5457
5460
|
return;
|
|
5458
5461
|
}
|
|
5459
5462
|
}
|
|
@@ -5462,9 +5465,9 @@ function Gn({
|
|
|
5462
5465
|
[d, f, g, y, n]
|
|
5463
5466
|
), A = P(() => {
|
|
5464
5467
|
l(), h([]), m(!1), u(""), v(""), r?.();
|
|
5465
|
-
}, [l, r]),
|
|
5468
|
+
}, [l, r]), C = P(() => {
|
|
5466
5469
|
m(!1), u(""), v("");
|
|
5467
|
-
}, []),
|
|
5470
|
+
}, []), x = P(() => {
|
|
5468
5471
|
t?.();
|
|
5469
5472
|
}, [t]);
|
|
5470
5473
|
return s.step === "validating" || s.step === "encrypting" || s.step === "uploading" ? /* @__PURE__ */ e("div", { className: `cedros-wallet-recovery ${o}`, children: /* @__PURE__ */ i("div", { className: "cedros-wallet-recovery-progress", children: [
|
|
@@ -5493,7 +5496,7 @@ function Gn({
|
|
|
5493
5496
|
{
|
|
5494
5497
|
type: "button",
|
|
5495
5498
|
className: "cedros-button cedros-button-primary",
|
|
5496
|
-
onClick:
|
|
5499
|
+
onClick: x,
|
|
5497
5500
|
children: "Done"
|
|
5498
5501
|
}
|
|
5499
5502
|
) })
|
|
@@ -5510,7 +5513,7 @@ function Gn({
|
|
|
5510
5513
|
children: "Start Over"
|
|
5511
5514
|
}
|
|
5512
5515
|
) })
|
|
5513
|
-
] }) }) : p ? /* @__PURE__ */ e("div", { className: `cedros-wallet-recovery ${o}`, children: /* @__PURE__ */ i("form", { className: "cedros-wallet-recovery-credential", onSubmit:
|
|
5516
|
+
] }) }) : p ? /* @__PURE__ */ e("div", { className: `cedros-wallet-recovery ${o}`, children: /* @__PURE__ */ i("form", { className: "cedros-wallet-recovery-credential", onSubmit: L, children: [
|
|
5514
5517
|
/* @__PURE__ */ i("div", { className: "cedros-wallet-recovery-header", children: [
|
|
5515
5518
|
/* @__PURE__ */ e("h3", { className: "cedros-wallet-recovery-title", children: "Set New Security" }),
|
|
5516
5519
|
/* @__PURE__ */ e("p", { className: "cedros-wallet-recovery-description", children: "Choose how to secure your recovered wallet." })
|
|
@@ -5590,7 +5593,7 @@ function Gn({
|
|
|
5590
5593
|
{
|
|
5591
5594
|
type: "button",
|
|
5592
5595
|
className: "cedros-button cedros-button-secondary",
|
|
5593
|
-
onClick:
|
|
5596
|
+
onClick: C,
|
|
5594
5597
|
disabled: c,
|
|
5595
5598
|
children: "Back"
|
|
5596
5599
|
}
|
|
@@ -5613,7 +5616,7 @@ function Gn({
|
|
|
5613
5616
|
/* @__PURE__ */ e(
|
|
5614
5617
|
Bn,
|
|
5615
5618
|
{
|
|
5616
|
-
onSubmit:
|
|
5619
|
+
onSubmit: E,
|
|
5617
5620
|
onCancel: A,
|
|
5618
5621
|
isSubmitting: !1
|
|
5619
5622
|
}
|
|
@@ -5733,15 +5736,15 @@ function ea({
|
|
|
5733
5736
|
className: n = ""
|
|
5734
5737
|
}) {
|
|
5735
5738
|
const l = ve(), [c, d] = k(!1), [h, p] = k(null), [m, f] = k(!1), w = $(null), g = l?.config.solana?.network ?? "mainnet-beta", u = q(() => {
|
|
5736
|
-
const
|
|
5737
|
-
return g === "mainnet-beta" ?
|
|
5739
|
+
const N = `https://explorer.solana.com/address/${t}`;
|
|
5740
|
+
return g === "mainnet-beta" ? N : `${N}?cluster=${encodeURIComponent(g)}`;
|
|
5738
5741
|
}, [t, g]), y = s && t.length > 18, v = q(() => !y || m ? t : `${t.slice(0, 8)}...${t.slice(-8)}`, [t, y, m]), b = P(async () => {
|
|
5739
5742
|
try {
|
|
5740
5743
|
p(null), await navigator.clipboard.writeText(t), d(!0), w.current !== null && window.clearTimeout(w.current), w.current = window.setTimeout(() => {
|
|
5741
5744
|
d(!1), w.current = null;
|
|
5742
5745
|
}, 2e3);
|
|
5743
|
-
} catch (
|
|
5744
|
-
d(!1), p(
|
|
5746
|
+
} catch (N) {
|
|
5747
|
+
d(!1), p(N instanceof Error ? N.message : "Copy failed");
|
|
5745
5748
|
}
|
|
5746
5749
|
}, [t]);
|
|
5747
5750
|
return _(() => () => {
|
|
@@ -5755,7 +5758,7 @@ function ea({
|
|
|
5755
5758
|
{
|
|
5756
5759
|
type: "button",
|
|
5757
5760
|
className: "cedros-button cedros-button-sm cedros-button-ghost",
|
|
5758
|
-
onClick: () => f((
|
|
5761
|
+
onClick: () => f((N) => !N),
|
|
5759
5762
|
"aria-label": m ? "Hide full wallet address" : "Show full wallet address",
|
|
5760
5763
|
children: m ? /* @__PURE__ */ i("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
5761
5764
|
/* @__PURE__ */ e(
|
|
@@ -6184,26 +6187,26 @@ function hc({
|
|
|
6184
6187
|
c();
|
|
6185
6188
|
}, [c]), _(() => {
|
|
6186
6189
|
if (w) {
|
|
6187
|
-
const
|
|
6188
|
-
return () => clearTimeout(
|
|
6190
|
+
const L = setTimeout(() => g(!1), 3e3);
|
|
6191
|
+
return () => clearTimeout(L);
|
|
6189
6192
|
}
|
|
6190
6193
|
}, [w]);
|
|
6191
|
-
const u = P((
|
|
6192
|
-
p((
|
|
6194
|
+
const u = P((L, A) => {
|
|
6195
|
+
p((C) => ({ ...C, [L]: A })), f(null), g(!1);
|
|
6193
6196
|
}, []), y = P(async () => {
|
|
6194
|
-
const
|
|
6197
|
+
const L = Object.entries(h).map(([A, C]) => ({
|
|
6195
6198
|
key: A,
|
|
6196
|
-
value:
|
|
6199
|
+
value: C
|
|
6197
6200
|
}));
|
|
6198
|
-
if (
|
|
6201
|
+
if (L.length !== 0)
|
|
6199
6202
|
try {
|
|
6200
|
-
await d(
|
|
6203
|
+
await d(L), p({}), f(null), g(!0), o?.();
|
|
6201
6204
|
} catch (A) {
|
|
6202
6205
|
f(A instanceof Error ? A.message : "Failed to save settings");
|
|
6203
6206
|
}
|
|
6204
6207
|
}, [h, d, o]), v = P(() => {
|
|
6205
6208
|
p({}), f(null), g(!1);
|
|
6206
|
-
}, []), b = Object.keys(h).length > 0,
|
|
6209
|
+
}, []), b = Object.keys(h).length > 0, N = Object.keys(h).length;
|
|
6207
6210
|
if (s && Object.keys(a).length === 0)
|
|
6208
6211
|
return /* @__PURE__ */ i("div", { className: `cedros-system-settings cedros-system-settings-loading ${r}`, children: [
|
|
6209
6212
|
/* @__PURE__ */ e(K, {}),
|
|
@@ -6211,26 +6214,26 @@ function hc({
|
|
|
6211
6214
|
] });
|
|
6212
6215
|
if (l)
|
|
6213
6216
|
return /* @__PURE__ */ e("div", { className: `cedros-system-settings ${r}`, children: /* @__PURE__ */ e(ee, { error: l.message }) });
|
|
6214
|
-
const
|
|
6215
|
-
return
|
|
6217
|
+
const E = Object.keys(a).sort();
|
|
6218
|
+
return E.length === 0 ? /* @__PURE__ */ e("div", { className: `cedros-system-settings cedros-system-settings-empty ${r}`, children: /* @__PURE__ */ e("p", { children: "No system settings found." }) }) : /* @__PURE__ */ i("div", { className: `cedros-system-settings ${r}`, children: [
|
|
6216
6219
|
m && /* @__PURE__ */ e(ee, { error: m }),
|
|
6217
6220
|
w && /* @__PURE__ */ e("div", { className: "cedros-settings-success", children: "Settings saved successfully." }),
|
|
6218
|
-
|
|
6221
|
+
E.map((L) => /* @__PURE__ */ e(
|
|
6219
6222
|
na,
|
|
6220
6223
|
{
|
|
6221
|
-
category:
|
|
6222
|
-
settings: a[
|
|
6224
|
+
category: L,
|
|
6225
|
+
settings: a[L],
|
|
6223
6226
|
edits: h,
|
|
6224
6227
|
showDescription: t,
|
|
6225
6228
|
onChange: u
|
|
6226
6229
|
},
|
|
6227
|
-
|
|
6230
|
+
L
|
|
6228
6231
|
)),
|
|
6229
6232
|
/* @__PURE__ */ i("div", { className: "cedros-system-settings-actions", children: [
|
|
6230
6233
|
b && /* @__PURE__ */ i("span", { className: "cedros-settings-change-count", children: [
|
|
6231
|
-
|
|
6234
|
+
N,
|
|
6232
6235
|
" unsaved change",
|
|
6233
|
-
|
|
6236
|
+
N !== 1 ? "s" : ""
|
|
6234
6237
|
] }),
|
|
6235
6238
|
/* @__PURE__ */ e(
|
|
6236
6239
|
"button",
|
|
@@ -6598,14 +6601,14 @@ function ua({ className: t }) {
|
|
|
6598
6601
|
_(() => {
|
|
6599
6602
|
c();
|
|
6600
6603
|
}, [c]);
|
|
6601
|
-
const f = nr.find((
|
|
6602
|
-
const
|
|
6603
|
-
if (p !== "email") return
|
|
6604
|
-
const
|
|
6605
|
-
return
|
|
6606
|
-
}, [r, w, p, u]),
|
|
6607
|
-
if (d(
|
|
6608
|
-
const A = Lo[
|
|
6604
|
+
const f = nr.find((E) => E.id === p), w = f?.category ?? "", u = (h("email_provider") || "custom") === "custom", y = h("email_smtp_host"), v = !u || y != null && y !== "", b = q(() => {
|
|
6605
|
+
const E = r[w] ?? [];
|
|
6606
|
+
if (p !== "email") return E;
|
|
6607
|
+
const L = u ? xo : Po;
|
|
6608
|
+
return E.filter((A) => L.includes(A.key)).sort((A, C) => L.indexOf(A.key) - L.indexOf(C.key));
|
|
6609
|
+
}, [r, w, p, u]), N = (E, L) => {
|
|
6610
|
+
if (d(E, L), E === "email_provider" && L !== "custom") {
|
|
6611
|
+
const A = Lo[L];
|
|
6609
6612
|
A && (d("email_smtp_host", A), d("email_smtp_port", "587"), d("email_smtp_tls", "true"));
|
|
6610
6613
|
}
|
|
6611
6614
|
};
|
|
@@ -6621,17 +6624,17 @@ function ua({ className: t }) {
|
|
|
6621
6624
|
/* @__PURE__ */ e(ho, { status: s, error: n })
|
|
6622
6625
|
] }),
|
|
6623
6626
|
p === "email" && !v && /* @__PURE__ */ e("div", { className: "cedros-settings-warning-banner", children: "Email features (verification, password reset, instant link) are disabled until SMTP is configured. Select a provider or enter custom SMTP settings below." }),
|
|
6624
|
-
/* @__PURE__ */ e("div", { className: "cedros-admin-tabs cedros-admin-tabs--line", children: nr.map((
|
|
6627
|
+
/* @__PURE__ */ e("div", { className: "cedros-admin-tabs cedros-admin-tabs--line", children: nr.map((E) => /* @__PURE__ */ e(
|
|
6625
6628
|
"button",
|
|
6626
6629
|
{
|
|
6627
6630
|
type: "button",
|
|
6628
|
-
className: `cedros-admin-tab ${p ===
|
|
6629
|
-
onClick: () => m(
|
|
6630
|
-
"aria-selected": p ===
|
|
6631
|
+
className: `cedros-admin-tab ${p === E.id ? "cedros-admin-tab-active" : ""}`,
|
|
6632
|
+
onClick: () => m(E.id),
|
|
6633
|
+
"aria-selected": p === E.id,
|
|
6631
6634
|
role: "tab",
|
|
6632
|
-
children:
|
|
6635
|
+
children: E.label
|
|
6633
6636
|
},
|
|
6634
|
-
|
|
6637
|
+
E.id
|
|
6635
6638
|
)) }),
|
|
6636
6639
|
/* @__PURE__ */ e("div", { className: "cedros-admin-tab-content", role: "tabpanel", children: b.length === 0 ? /* @__PURE__ */ e("div", { className: "cedros-system-settings-empty", children: /* @__PURE__ */ i("p", { children: [
|
|
6637
6640
|
"No settings found for ",
|
|
@@ -6642,7 +6645,7 @@ function ua({ className: t }) {
|
|
|
6642
6645
|
{
|
|
6643
6646
|
settings: b,
|
|
6644
6647
|
edits: o,
|
|
6645
|
-
onChange: p === "email" ?
|
|
6648
|
+
onChange: p === "email" ? N : d
|
|
6646
6649
|
}
|
|
6647
6650
|
) })
|
|
6648
6651
|
] });
|
|
@@ -6871,17 +6874,17 @@ function mc({
|
|
|
6871
6874
|
onLogoutClick: c,
|
|
6872
6875
|
className: d = ""
|
|
6873
6876
|
}) {
|
|
6874
|
-
const [h, p] = k(o), [m, f] = k(!0), { user: w, logout: g } = ne(), { activeOrg: u, role: y, isLoading: v, fetchOrgs: b, hasPermission:
|
|
6877
|
+
const [h, p] = k(o), [m, f] = k(!0), { user: w, logout: g } = ne(), { activeOrg: u, role: y, isLoading: v, fetchOrgs: b, hasPermission: N } = po(), { status: E, isLoading: L, checkStatus: A } = us(), { features: C, isLoading: x } = Zs(), { canAccess: S } = eo(), B = P(
|
|
6875
6878
|
(F) => {
|
|
6876
6879
|
p(F), n?.(F);
|
|
6877
6880
|
},
|
|
6878
6881
|
[n]
|
|
6879
|
-
), T = ha.filter((F) => !(!r.includes(F.id) || F.requiredFeature && !
|
|
6882
|
+
), T = ha.filter((F) => !(!r.includes(F.id) || F.requiredFeature && !C[F.requiredFeature] || !S(F.id))), M = T.find((F) => F.id === h), R = !M && !x;
|
|
6880
6883
|
return _(() => {
|
|
6881
6884
|
b(), A();
|
|
6882
6885
|
}, [b, A]), _(() => {
|
|
6883
6886
|
R && T.length > 0 && p("users");
|
|
6884
|
-
}, [R, T.length]), !
|
|
6887
|
+
}, [R, T.length]), !L && E?.needsSetup ? /* @__PURE__ */ e("div", { className: `cedros-admin cedros-dashboard cedros-dashboard--setup ${d}`, children: /* @__PURE__ */ e(la, { onComplete: () => A() }) }) : (v || L || x) && !u ? /* @__PURE__ */ i("div", { className: `cedros-admin cedros-dashboard cedros-dashboard--loading ${d}`, children: [
|
|
6885
6888
|
/* @__PURE__ */ e(K, {}),
|
|
6886
6889
|
/* @__PURE__ */ e("span", { className: "cedros-dashboard__loading-text", children: "Loading..." })
|
|
6887
6890
|
] }) : h === "team" && !u ? /* @__PURE__ */ e("div", { className: `cedros-admin cedros-dashboard ${d}`, children: /* @__PURE__ */ e(ee, { error: "No organization selected. Please select an organization first." }) }) : /* @__PURE__ */ i("div", { className: `cedros-admin cedros-dashboard ${d}`, children: [
|
|
@@ -6968,7 +6971,7 @@ function mc({
|
|
|
6968
6971
|
{
|
|
6969
6972
|
orgId: u.id,
|
|
6970
6973
|
currentUserId: w?.id,
|
|
6971
|
-
hasPermission:
|
|
6974
|
+
hasPermission: N,
|
|
6972
6975
|
role: y
|
|
6973
6976
|
}
|
|
6974
6977
|
),
|
|
@@ -7025,19 +7028,19 @@ function ma({ orgId: t, currentUserId: r, hasPermission: o, role: a }) {
|
|
|
7025
7028
|
_(() => {
|
|
7026
7029
|
h(), u();
|
|
7027
7030
|
}, [h, u]);
|
|
7028
|
-
const
|
|
7031
|
+
const N = o("invite:create"), E = o("invite:cancel"), L = f.length, A = l.reduce(
|
|
7029
7032
|
(B, T) => (B[T.role] = (B[T.role] ?? 0) + 1, B),
|
|
7030
7033
|
{}
|
|
7031
|
-
),
|
|
7034
|
+
), C = A.owner ?? 0, x = A.admin ?? 0, S = A.member ?? 0;
|
|
7032
7035
|
return /* @__PURE__ */ i("div", { className: "cedros-dashboard__team", children: [
|
|
7033
7036
|
/* @__PURE__ */ e(
|
|
7034
7037
|
Gr,
|
|
7035
7038
|
{
|
|
7036
7039
|
stats: [
|
|
7037
|
-
{ label: "Owners", value:
|
|
7038
|
-
{ label: "Admins", value:
|
|
7040
|
+
{ label: "Owners", value: C },
|
|
7041
|
+
{ label: "Admins", value: x },
|
|
7039
7042
|
{ label: "Members", value: S },
|
|
7040
|
-
{ label: "Pending Invites", value:
|
|
7043
|
+
{ label: "Pending Invites", value: L }
|
|
7041
7044
|
]
|
|
7042
7045
|
}
|
|
7043
7046
|
),
|
|
@@ -7063,7 +7066,7 @@ function ma({ orgId: t, currentUserId: r, hasPermission: o, role: a }) {
|
|
|
7063
7066
|
role: "tab",
|
|
7064
7067
|
children: [
|
|
7065
7068
|
"Pending Invites",
|
|
7066
|
-
|
|
7069
|
+
L > 0 && ` (${L})`
|
|
7067
7070
|
]
|
|
7068
7071
|
}
|
|
7069
7072
|
),
|
|
@@ -7094,7 +7097,7 @@ function ma({ orgId: t, currentUserId: r, hasPermission: o, role: a }) {
|
|
|
7094
7097
|
}
|
|
7095
7098
|
),
|
|
7096
7099
|
s === "invites" && /* @__PURE__ */ i("div", { className: "cedros-dashboard__invites", children: [
|
|
7097
|
-
|
|
7100
|
+
N && /* @__PURE__ */ i("div", { className: "cedros-dashboard__section", children: [
|
|
7098
7101
|
/* @__PURE__ */ e("div", { className: "cedros-dashboard__section-header", children: /* @__PURE__ */ e("h3", { className: "cedros-dashboard__section-title", children: "Send Invitation" }) }),
|
|
7099
7102
|
/* @__PURE__ */ e(
|
|
7100
7103
|
oo,
|
|
@@ -7111,9 +7114,9 @@ function ma({ orgId: t, currentUserId: r, hasPermission: o, role: a }) {
|
|
|
7111
7114
|
invites: f,
|
|
7112
7115
|
isLoading: w,
|
|
7113
7116
|
error: g?.message,
|
|
7114
|
-
canManage:
|
|
7115
|
-
onCancel:
|
|
7116
|
-
onResend:
|
|
7117
|
+
canManage: E || N,
|
|
7118
|
+
onCancel: E ? v : void 0,
|
|
7119
|
+
onResend: N ? b : void 0
|
|
7117
7120
|
}
|
|
7118
7121
|
) })
|
|
7119
7122
|
] }),
|
|
@@ -8012,17 +8015,17 @@ function Sa() {
|
|
|
8012
8015
|
typeof u > "u" && (u = s.BYTE);
|
|
8013
8016
|
const y = r.getSymbolTotalCodewords(w), v = o.getTotalCodewordsCount(w, g), b = (y - v) * 8;
|
|
8014
8017
|
if (u === s.MIXED) return b;
|
|
8015
|
-
const
|
|
8018
|
+
const N = b - h(u, w);
|
|
8016
8019
|
switch (u) {
|
|
8017
8020
|
case s.NUMERIC:
|
|
8018
|
-
return Math.floor(
|
|
8021
|
+
return Math.floor(N / 10 * 3);
|
|
8019
8022
|
case s.ALPHANUMERIC:
|
|
8020
|
-
return Math.floor(
|
|
8023
|
+
return Math.floor(N / 11 * 2);
|
|
8021
8024
|
case s.KANJI:
|
|
8022
|
-
return Math.floor(
|
|
8025
|
+
return Math.floor(N / 13);
|
|
8023
8026
|
case s.BYTE:
|
|
8024
8027
|
default:
|
|
8025
|
-
return Math.floor(
|
|
8028
|
+
return Math.floor(N / 8);
|
|
8026
8029
|
}
|
|
8027
8030
|
}, t.getBestVersionForData = function(w, g) {
|
|
8028
8031
|
let u;
|
|
@@ -8275,28 +8278,28 @@ function Ra() {
|
|
|
8275
8278
|
function h(v) {
|
|
8276
8279
|
return unescape(encodeURIComponent(v)).length;
|
|
8277
8280
|
}
|
|
8278
|
-
function p(v, b,
|
|
8279
|
-
const
|
|
8280
|
-
let
|
|
8281
|
-
for (; (
|
|
8282
|
-
|
|
8283
|
-
data:
|
|
8284
|
-
index:
|
|
8281
|
+
function p(v, b, N) {
|
|
8282
|
+
const E = [];
|
|
8283
|
+
let L;
|
|
8284
|
+
for (; (L = v.exec(N)) !== null; )
|
|
8285
|
+
E.push({
|
|
8286
|
+
data: L[0],
|
|
8287
|
+
index: L.index,
|
|
8285
8288
|
mode: b,
|
|
8286
|
-
length:
|
|
8289
|
+
length: L[0].length
|
|
8287
8290
|
});
|
|
8288
|
-
return
|
|
8291
|
+
return E;
|
|
8289
8292
|
}
|
|
8290
8293
|
function m(v) {
|
|
8291
|
-
const b = p(l.NUMERIC, r.NUMERIC, v),
|
|
8292
|
-
let
|
|
8293
|
-
return c.isKanjiModeEnabled() ? (
|
|
8294
|
-
return
|
|
8295
|
-
}).map(function(
|
|
8294
|
+
const b = p(l.NUMERIC, r.NUMERIC, v), N = p(l.ALPHANUMERIC, r.ALPHANUMERIC, v);
|
|
8295
|
+
let E, L;
|
|
8296
|
+
return c.isKanjiModeEnabled() ? (E = p(l.BYTE, r.BYTE, v), L = p(l.KANJI, r.KANJI, v)) : (E = p(l.BYTE_KANJI, r.BYTE, v), L = []), b.concat(N, E, L).sort(function(C, x) {
|
|
8297
|
+
return C.index - x.index;
|
|
8298
|
+
}).map(function(C) {
|
|
8296
8299
|
return {
|
|
8297
|
-
data:
|
|
8298
|
-
mode:
|
|
8299
|
-
length:
|
|
8300
|
+
data: C.data,
|
|
8301
|
+
mode: C.mode,
|
|
8302
|
+
length: C.length
|
|
8300
8303
|
};
|
|
8301
8304
|
});
|
|
8302
8305
|
}
|
|
@@ -8313,69 +8316,69 @@ function Ra() {
|
|
|
8313
8316
|
}
|
|
8314
8317
|
}
|
|
8315
8318
|
function w(v) {
|
|
8316
|
-
return v.reduce(function(b,
|
|
8317
|
-
const
|
|
8318
|
-
return
|
|
8319
|
+
return v.reduce(function(b, N) {
|
|
8320
|
+
const E = b.length - 1 >= 0 ? b[b.length - 1] : null;
|
|
8321
|
+
return E && E.mode === N.mode ? (b[b.length - 1].data += N.data, b) : (b.push(N), b);
|
|
8319
8322
|
}, []);
|
|
8320
8323
|
}
|
|
8321
8324
|
function g(v) {
|
|
8322
8325
|
const b = [];
|
|
8323
|
-
for (let
|
|
8324
|
-
const
|
|
8325
|
-
switch (
|
|
8326
|
+
for (let N = 0; N < v.length; N++) {
|
|
8327
|
+
const E = v[N];
|
|
8328
|
+
switch (E.mode) {
|
|
8326
8329
|
case r.NUMERIC:
|
|
8327
8330
|
b.push([
|
|
8328
|
-
|
|
8329
|
-
{ data:
|
|
8330
|
-
{ data:
|
|
8331
|
+
E,
|
|
8332
|
+
{ data: E.data, mode: r.ALPHANUMERIC, length: E.length },
|
|
8333
|
+
{ data: E.data, mode: r.BYTE, length: E.length }
|
|
8331
8334
|
]);
|
|
8332
8335
|
break;
|
|
8333
8336
|
case r.ALPHANUMERIC:
|
|
8334
8337
|
b.push([
|
|
8335
|
-
|
|
8336
|
-
{ data:
|
|
8338
|
+
E,
|
|
8339
|
+
{ data: E.data, mode: r.BYTE, length: E.length }
|
|
8337
8340
|
]);
|
|
8338
8341
|
break;
|
|
8339
8342
|
case r.KANJI:
|
|
8340
8343
|
b.push([
|
|
8341
|
-
|
|
8342
|
-
{ data:
|
|
8344
|
+
E,
|
|
8345
|
+
{ data: E.data, mode: r.BYTE, length: h(E.data) }
|
|
8343
8346
|
]);
|
|
8344
8347
|
break;
|
|
8345
8348
|
case r.BYTE:
|
|
8346
8349
|
b.push([
|
|
8347
|
-
{ data:
|
|
8350
|
+
{ data: E.data, mode: r.BYTE, length: h(E.data) }
|
|
8348
8351
|
]);
|
|
8349
8352
|
}
|
|
8350
8353
|
}
|
|
8351
8354
|
return b;
|
|
8352
8355
|
}
|
|
8353
8356
|
function u(v, b) {
|
|
8354
|
-
const
|
|
8355
|
-
let
|
|
8357
|
+
const N = {}, E = { start: {} };
|
|
8358
|
+
let L = ["start"];
|
|
8356
8359
|
for (let A = 0; A < v.length; A++) {
|
|
8357
|
-
const
|
|
8358
|
-
for (let S = 0; S <
|
|
8359
|
-
const B =
|
|
8360
|
-
|
|
8361
|
-
for (let M = 0; M <
|
|
8362
|
-
const R =
|
|
8363
|
-
|
|
8360
|
+
const C = v[A], x = [];
|
|
8361
|
+
for (let S = 0; S < C.length; S++) {
|
|
8362
|
+
const B = C[S], T = "" + A + S;
|
|
8363
|
+
x.push(T), N[T] = { node: B, lastCount: 0 }, E[T] = {};
|
|
8364
|
+
for (let M = 0; M < L.length; M++) {
|
|
8365
|
+
const R = L[M];
|
|
8366
|
+
N[R] && N[R].node.mode === B.mode ? (E[R][T] = f(N[R].lastCount + B.length, B.mode) - f(N[R].lastCount, B.mode), N[R].lastCount += B.length) : (N[R] && (N[R].lastCount = B.length), E[R][T] = f(B.length, B.mode) + 4 + r.getCharCountIndicator(B.mode, b));
|
|
8364
8367
|
}
|
|
8365
8368
|
}
|
|
8366
|
-
|
|
8369
|
+
L = x;
|
|
8367
8370
|
}
|
|
8368
|
-
for (let A = 0; A <
|
|
8369
|
-
|
|
8370
|
-
return { map:
|
|
8371
|
+
for (let A = 0; A < L.length; A++)
|
|
8372
|
+
E[L[A]].end = 0;
|
|
8373
|
+
return { map: E, table: N };
|
|
8371
8374
|
}
|
|
8372
8375
|
function y(v, b) {
|
|
8373
|
-
let
|
|
8374
|
-
const
|
|
8375
|
-
if (
|
|
8376
|
-
throw new Error('"' + v + '" cannot be encoded with mode ' + r.toString(
|
|
8377
|
-
Suggested mode is: ` + r.toString(
|
|
8378
|
-
switch (
|
|
8376
|
+
let N;
|
|
8377
|
+
const E = r.getBestModeForData(v);
|
|
8378
|
+
if (N = r.from(b, E), N !== r.BYTE && N.bit < E.bit)
|
|
8379
|
+
throw new Error('"' + v + '" cannot be encoded with mode ' + r.toString(N) + `.
|
|
8380
|
+
Suggested mode is: ` + r.toString(E));
|
|
8381
|
+
switch (N === r.KANJI && !c.isKanjiModeEnabled() && (N = r.BYTE), N) {
|
|
8379
8382
|
case r.NUMERIC:
|
|
8380
8383
|
return new o(v);
|
|
8381
8384
|
case r.ALPHANUMERIC:
|
|
@@ -8387,14 +8390,14 @@ function Ra() {
|
|
|
8387
8390
|
}
|
|
8388
8391
|
}
|
|
8389
8392
|
t.fromArray = function(b) {
|
|
8390
|
-
return b.reduce(function(
|
|
8391
|
-
return typeof
|
|
8393
|
+
return b.reduce(function(N, E) {
|
|
8394
|
+
return typeof E == "string" ? N.push(y(E, null)) : E.data && N.push(y(E.data, E.mode)), N;
|
|
8392
8395
|
}, []);
|
|
8393
|
-
}, t.fromString = function(b,
|
|
8394
|
-
const
|
|
8395
|
-
for (let S = 1; S <
|
|
8396
|
-
|
|
8397
|
-
return t.fromArray(w(
|
|
8396
|
+
}, t.fromString = function(b, N) {
|
|
8397
|
+
const E = m(b, c.isKanjiModeEnabled()), L = g(E), A = u(L, N), C = d.find_path(A.map, "start", "end"), x = [];
|
|
8398
|
+
for (let S = 1; S < C.length - 1; S++)
|
|
8399
|
+
x.push(A.table[C[S]].node);
|
|
8400
|
+
return t.fromArray(w(x));
|
|
8398
8401
|
}, t.rawSplit = function(b) {
|
|
8399
8402
|
return t.fromArray(
|
|
8400
8403
|
m(b, c.isKanjiModeEnabled())
|
|
@@ -8407,76 +8410,76 @@ function Da() {
|
|
|
8407
8410
|
if (Lr) return lt;
|
|
8408
8411
|
Lr = 1;
|
|
8409
8412
|
const t = ke(), r = zt(), o = ya(), a = ba(), s = Aa(), n = va(), l = ka(), c = hs(), d = Ea(), h = Sa(), p = xa(), m = Ne(), f = Ra();
|
|
8410
|
-
function w(A,
|
|
8411
|
-
const
|
|
8413
|
+
function w(A, C) {
|
|
8414
|
+
const x = A.size, S = n.getPositions(C);
|
|
8412
8415
|
for (let B = 0; B < S.length; B++) {
|
|
8413
8416
|
const T = S[B][0], M = S[B][1];
|
|
8414
8417
|
for (let R = -1; R <= 7; R++)
|
|
8415
|
-
if (!(T + R <= -1 ||
|
|
8418
|
+
if (!(T + R <= -1 || x <= T + R))
|
|
8416
8419
|
for (let D = -1; D <= 7; D++)
|
|
8417
|
-
M + D <= -1 ||
|
|
8420
|
+
M + D <= -1 || x <= M + D || (R >= 0 && R <= 6 && (D === 0 || D === 6) || D >= 0 && D <= 6 && (R === 0 || R === 6) || R >= 2 && R <= 4 && D >= 2 && D <= 4 ? A.set(T + R, M + D, !0, !0) : A.set(T + R, M + D, !1, !0));
|
|
8418
8421
|
}
|
|
8419
8422
|
}
|
|
8420
8423
|
function g(A) {
|
|
8421
|
-
const
|
|
8422
|
-
for (let
|
|
8423
|
-
const S =
|
|
8424
|
-
A.set(
|
|
8424
|
+
const C = A.size;
|
|
8425
|
+
for (let x = 8; x < C - 8; x++) {
|
|
8426
|
+
const S = x % 2 === 0;
|
|
8427
|
+
A.set(x, 6, S, !0), A.set(6, x, S, !0);
|
|
8425
8428
|
}
|
|
8426
8429
|
}
|
|
8427
|
-
function u(A,
|
|
8428
|
-
const
|
|
8429
|
-
for (let S = 0; S <
|
|
8430
|
-
const B =
|
|
8430
|
+
function u(A, C) {
|
|
8431
|
+
const x = s.getPositions(C);
|
|
8432
|
+
for (let S = 0; S < x.length; S++) {
|
|
8433
|
+
const B = x[S][0], T = x[S][1];
|
|
8431
8434
|
for (let M = -2; M <= 2; M++)
|
|
8432
8435
|
for (let R = -2; R <= 2; R++)
|
|
8433
8436
|
M === -2 || M === 2 || R === -2 || R === 2 || M === 0 && R === 0 ? A.set(B + M, T + R, !0, !0) : A.set(B + M, T + R, !1, !0);
|
|
8434
8437
|
}
|
|
8435
8438
|
}
|
|
8436
|
-
function y(A,
|
|
8437
|
-
const
|
|
8439
|
+
function y(A, C) {
|
|
8440
|
+
const x = A.size, S = h.getEncodedBits(C);
|
|
8438
8441
|
let B, T, M;
|
|
8439
8442
|
for (let R = 0; R < 18; R++)
|
|
8440
|
-
B = Math.floor(R / 3), T = R % 3 +
|
|
8443
|
+
B = Math.floor(R / 3), T = R % 3 + x - 8 - 3, M = (S >> R & 1) === 1, A.set(B, T, M, !0), A.set(T, B, M, !0);
|
|
8441
8444
|
}
|
|
8442
|
-
function v(A,
|
|
8443
|
-
const S = A.size, B = p.getEncodedBits(
|
|
8445
|
+
function v(A, C, x) {
|
|
8446
|
+
const S = A.size, B = p.getEncodedBits(C, x);
|
|
8444
8447
|
let T, M;
|
|
8445
8448
|
for (T = 0; T < 15; T++)
|
|
8446
8449
|
M = (B >> T & 1) === 1, T < 6 ? A.set(T, 8, M, !0) : T < 8 ? A.set(T + 1, 8, M, !0) : A.set(S - 15 + T, 8, M, !0), T < 8 ? A.set(8, S - T - 1, M, !0) : T < 9 ? A.set(8, 15 - T - 1 + 1, M, !0) : A.set(8, 15 - T - 1, M, !0);
|
|
8447
8450
|
A.set(S - 8, 8, 1, !0);
|
|
8448
8451
|
}
|
|
8449
|
-
function b(A,
|
|
8450
|
-
const
|
|
8451
|
-
let S = -1, B =
|
|
8452
|
-
for (let R =
|
|
8452
|
+
function b(A, C) {
|
|
8453
|
+
const x = A.size;
|
|
8454
|
+
let S = -1, B = x - 1, T = 7, M = 0;
|
|
8455
|
+
for (let R = x - 1; R > 0; R -= 2)
|
|
8453
8456
|
for (R === 6 && R--; ; ) {
|
|
8454
8457
|
for (let D = 0; D < 2; D++)
|
|
8455
8458
|
if (!A.isReserved(B, R - D)) {
|
|
8456
8459
|
let F = !1;
|
|
8457
|
-
M <
|
|
8460
|
+
M < C.length && (F = (C[M] >>> T & 1) === 1), A.set(B, R - D, F), T--, T === -1 && (M++, T = 7);
|
|
8458
8461
|
}
|
|
8459
|
-
if (B += S, B < 0 ||
|
|
8462
|
+
if (B += S, B < 0 || x <= B) {
|
|
8460
8463
|
B -= S, S = -S;
|
|
8461
8464
|
break;
|
|
8462
8465
|
}
|
|
8463
8466
|
}
|
|
8464
8467
|
}
|
|
8465
|
-
function
|
|
8468
|
+
function N(A, C, x) {
|
|
8466
8469
|
const S = new o();
|
|
8467
|
-
|
|
8470
|
+
x.forEach(function(D) {
|
|
8468
8471
|
S.put(D.mode.bit, 4), S.put(D.getLength(), m.getCharCountIndicator(D.mode, A)), D.write(S);
|
|
8469
8472
|
});
|
|
8470
|
-
const B = t.getSymbolTotalCodewords(A), T = c.getTotalCodewordsCount(A,
|
|
8473
|
+
const B = t.getSymbolTotalCodewords(A), T = c.getTotalCodewordsCount(A, C), M = (B - T) * 8;
|
|
8471
8474
|
for (S.getLengthInBits() + 4 <= M && S.put(0, 4); S.getLengthInBits() % 8 !== 0; )
|
|
8472
8475
|
S.putBit(0);
|
|
8473
8476
|
const R = (M - S.getLengthInBits()) / 8;
|
|
8474
8477
|
for (let D = 0; D < R; D++)
|
|
8475
8478
|
S.put(D % 2 ? 17 : 236, 8);
|
|
8476
|
-
return
|
|
8479
|
+
return E(S, A, C);
|
|
8477
8480
|
}
|
|
8478
|
-
function
|
|
8479
|
-
const S = t.getSymbolTotalCodewords(
|
|
8481
|
+
function E(A, C, x) {
|
|
8482
|
+
const S = t.getSymbolTotalCodewords(C), B = c.getTotalCodewordsCount(C, x), T = S - B, M = c.getBlocksCount(C, x), R = S % M, D = M - R, F = Math.floor(S / M), Z = Math.floor(T / M), he = Z + 1, te = F - Z, H = new d(te);
|
|
8480
8483
|
let I = 0;
|
|
8481
8484
|
const U = new Array(M), Q = new Array(M);
|
|
8482
8485
|
let re = 0;
|
|
@@ -8495,48 +8498,48 @@ function Da() {
|
|
|
8495
8498
|
fe[pe++] = Q[j][z];
|
|
8496
8499
|
return fe;
|
|
8497
8500
|
}
|
|
8498
|
-
function
|
|
8501
|
+
function L(A, C, x, S) {
|
|
8499
8502
|
let B;
|
|
8500
8503
|
if (Array.isArray(A))
|
|
8501
8504
|
B = f.fromArray(A);
|
|
8502
8505
|
else if (typeof A == "string") {
|
|
8503
|
-
let F =
|
|
8506
|
+
let F = C;
|
|
8504
8507
|
if (!F) {
|
|
8505
8508
|
const Z = f.rawSplit(A);
|
|
8506
|
-
F = h.getBestVersionForData(Z,
|
|
8509
|
+
F = h.getBestVersionForData(Z, x);
|
|
8507
8510
|
}
|
|
8508
8511
|
B = f.fromString(A, F || 40);
|
|
8509
8512
|
} else
|
|
8510
8513
|
throw new Error("Invalid data");
|
|
8511
|
-
const T = h.getBestVersionForData(B,
|
|
8514
|
+
const T = h.getBestVersionForData(B, x);
|
|
8512
8515
|
if (!T)
|
|
8513
8516
|
throw new Error("The amount of data is too big to be stored in a QR Code");
|
|
8514
|
-
if (!
|
|
8515
|
-
|
|
8516
|
-
else if (
|
|
8517
|
+
if (!C)
|
|
8518
|
+
C = T;
|
|
8519
|
+
else if (C < T)
|
|
8517
8520
|
throw new Error(
|
|
8518
8521
|
`
|
|
8519
8522
|
The chosen QR Code version cannot contain this amount of data.
|
|
8520
8523
|
Minimum version required to store current data is: ` + T + `.
|
|
8521
8524
|
`
|
|
8522
8525
|
);
|
|
8523
|
-
const M = C
|
|
8524
|
-
return w(D,
|
|
8526
|
+
const M = N(C, x, B), R = t.getSymbolSize(C), D = new a(R);
|
|
8527
|
+
return w(D, C), g(D), u(D, C), v(D, x, 0), C >= 7 && y(D, C), b(D, M), isNaN(S) && (S = l.getBestMask(
|
|
8525
8528
|
D,
|
|
8526
|
-
v.bind(null, D,
|
|
8527
|
-
)), l.applyMask(S, D), v(D,
|
|
8529
|
+
v.bind(null, D, x)
|
|
8530
|
+
)), l.applyMask(S, D), v(D, x, S), {
|
|
8528
8531
|
modules: D,
|
|
8529
|
-
version:
|
|
8530
|
-
errorCorrectionLevel:
|
|
8532
|
+
version: C,
|
|
8533
|
+
errorCorrectionLevel: x,
|
|
8531
8534
|
maskPattern: S,
|
|
8532
8535
|
segments: B
|
|
8533
8536
|
};
|
|
8534
8537
|
}
|
|
8535
|
-
return lt.create = function(
|
|
8536
|
-
if (typeof
|
|
8538
|
+
return lt.create = function(C, x) {
|
|
8539
|
+
if (typeof C > "u" || C === "")
|
|
8537
8540
|
throw new Error("No input text");
|
|
8538
8541
|
let S = r.M, B, T;
|
|
8539
|
-
return typeof
|
|
8542
|
+
return typeof x < "u" && (S = r.from(x.errorCorrectionLevel, r.M), B = h.from(x.version), T = l.from(x.maskPattern), x.toSJISFunc && t.setToSJISFunction(x.toSJISFunc)), L(C, B, S, T);
|
|
8540
8543
|
}, lt;
|
|
8541
8544
|
}
|
|
8542
8545
|
var Pt = {}, Lt = {}, Mr;
|
|
@@ -8733,45 +8736,45 @@ function gs() {
|
|
|
8733
8736
|
), w = P(async () => {
|
|
8734
8737
|
h(!0), m(null);
|
|
8735
8738
|
try {
|
|
8736
|
-
const
|
|
8737
|
-
return a(
|
|
8738
|
-
} catch (
|
|
8739
|
-
const
|
|
8740
|
-
throw m(
|
|
8739
|
+
const E = await f.get("/mfa/status");
|
|
8740
|
+
return a(E), E;
|
|
8741
|
+
} catch (E) {
|
|
8742
|
+
const L = O(E, "Failed to get TOTP status");
|
|
8743
|
+
throw m(L), L;
|
|
8741
8744
|
} finally {
|
|
8742
8745
|
h(!1);
|
|
8743
8746
|
}
|
|
8744
8747
|
}, [f]), g = P(async () => {
|
|
8745
8748
|
h(!0), m(null), n("loading");
|
|
8746
8749
|
try {
|
|
8747
|
-
const
|
|
8748
|
-
return c(
|
|
8749
|
-
} catch (
|
|
8750
|
-
const
|
|
8751
|
-
throw m(
|
|
8750
|
+
const E = await f.post("/mfa/setup", {});
|
|
8751
|
+
return c(E), n("setup"), E;
|
|
8752
|
+
} catch (E) {
|
|
8753
|
+
const L = O(E, "Failed to start TOTP setup");
|
|
8754
|
+
throw m(L), n("error"), L;
|
|
8752
8755
|
} finally {
|
|
8753
8756
|
h(!1);
|
|
8754
8757
|
}
|
|
8755
8758
|
}, [f]), u = P(
|
|
8756
|
-
async (
|
|
8757
|
-
if (!/^\d{6}$/.test(
|
|
8758
|
-
const
|
|
8759
|
+
async (E) => {
|
|
8760
|
+
if (!/^\d{6}$/.test(E)) {
|
|
8761
|
+
const L = {
|
|
8759
8762
|
code: "VALIDATION_ERROR",
|
|
8760
8763
|
message: "Please enter a 6-digit code"
|
|
8761
8764
|
};
|
|
8762
|
-
throw m(
|
|
8765
|
+
throw m(L), L;
|
|
8763
8766
|
}
|
|
8764
8767
|
h(!0), m(null), n("verifying");
|
|
8765
8768
|
try {
|
|
8766
|
-
await f.post("/mfa/enable", { code:
|
|
8769
|
+
await f.post("/mfa/enable", { code: E }), n("success");
|
|
8767
8770
|
try {
|
|
8768
|
-
const
|
|
8769
|
-
a(
|
|
8771
|
+
const L = await f.get("/mfa/status");
|
|
8772
|
+
a(L);
|
|
8770
8773
|
} catch {
|
|
8771
8774
|
a({ enabled: !0, recoveryCodesRemaining: 0 });
|
|
8772
8775
|
}
|
|
8773
|
-
} catch (
|
|
8774
|
-
const A = O(
|
|
8776
|
+
} catch (L) {
|
|
8777
|
+
const A = O(L, "Invalid verification code");
|
|
8775
8778
|
throw m(A), n("error"), A;
|
|
8776
8779
|
} finally {
|
|
8777
8780
|
h(!1);
|
|
@@ -8779,19 +8782,19 @@ function gs() {
|
|
|
8779
8782
|
},
|
|
8780
8783
|
[f]
|
|
8781
8784
|
), y = P(
|
|
8782
|
-
async (
|
|
8783
|
-
if (!
|
|
8784
|
-
const
|
|
8785
|
+
async (E) => {
|
|
8786
|
+
if (!E) {
|
|
8787
|
+
const L = {
|
|
8785
8788
|
code: "VALIDATION_ERROR",
|
|
8786
8789
|
message: "Please enter your password"
|
|
8787
8790
|
};
|
|
8788
|
-
throw m(
|
|
8791
|
+
throw m(L), L;
|
|
8789
8792
|
}
|
|
8790
8793
|
h(!0), m(null);
|
|
8791
8794
|
try {
|
|
8792
|
-
await f.post("/mfa/disable", { password:
|
|
8793
|
-
} catch (
|
|
8794
|
-
const A = O(
|
|
8795
|
+
await f.post("/mfa/disable", { password: E }), a({ enabled: !1, recoveryCodesRemaining: 0 }), c(null), n("idle");
|
|
8796
|
+
} catch (L) {
|
|
8797
|
+
const A = O(L, "Failed to disable TOTP");
|
|
8795
8798
|
throw m(A), A;
|
|
8796
8799
|
} finally {
|
|
8797
8800
|
h(!1);
|
|
@@ -8799,29 +8802,29 @@ function gs() {
|
|
|
8799
8802
|
},
|
|
8800
8803
|
[f]
|
|
8801
8804
|
), v = P(
|
|
8802
|
-
async (
|
|
8803
|
-
if (!/^\d{6}$/.test(
|
|
8804
|
-
const
|
|
8805
|
+
async (E) => {
|
|
8806
|
+
if (!/^\d{6}$/.test(E)) {
|
|
8807
|
+
const L = {
|
|
8805
8808
|
code: "VALIDATION_ERROR",
|
|
8806
8809
|
message: "Please enter a 6-digit code"
|
|
8807
8810
|
};
|
|
8808
|
-
throw m(
|
|
8811
|
+
throw m(L), L;
|
|
8809
8812
|
}
|
|
8810
8813
|
h(!0), m(null);
|
|
8811
8814
|
try {
|
|
8812
8815
|
return await f.post(
|
|
8813
8816
|
"/mfa/recovery-codes/regenerate",
|
|
8814
|
-
{ code:
|
|
8817
|
+
{ code: E }
|
|
8815
8818
|
);
|
|
8816
|
-
} catch (
|
|
8817
|
-
const A = O(
|
|
8819
|
+
} catch (L) {
|
|
8820
|
+
const A = O(L, "Failed to regenerate recovery codes");
|
|
8818
8821
|
throw m(A), A;
|
|
8819
8822
|
} finally {
|
|
8820
8823
|
h(!1);
|
|
8821
8824
|
}
|
|
8822
8825
|
},
|
|
8823
8826
|
[f]
|
|
8824
|
-
), b = P(() => m(null), []),
|
|
8827
|
+
), b = P(() => m(null), []), N = P(() => {
|
|
8825
8828
|
m(null), c(null), n("idle"), h(!1);
|
|
8826
8829
|
}, []);
|
|
8827
8830
|
return {
|
|
@@ -8836,24 +8839,24 @@ function gs() {
|
|
|
8836
8839
|
disableTotp: y,
|
|
8837
8840
|
regenerateBackupCodes: v,
|
|
8838
8841
|
clearError: b,
|
|
8839
|
-
reset:
|
|
8842
|
+
reset: N
|
|
8840
8843
|
};
|
|
8841
8844
|
}
|
|
8842
8845
|
function qa({ onSuccess: t, onCancel: r, className: o = "" }) {
|
|
8843
|
-
const { setupState: a, setupData: s, isLoading: n, error: l, beginSetup: c, enableTotp: d, clearError: h, reset: p } = gs(), [m, f] = k("qr"), [w, g] = k(""), [u, y] = k(!1), [v, b] = k(!1),
|
|
8846
|
+
const { setupState: a, setupData: s, isLoading: n, error: l, beginSetup: c, enableTotp: d, clearError: h, reset: p } = gs(), [m, f] = k("qr"), [w, g] = k(""), [u, y] = k(!1), [v, b] = k(!1), N = $(null);
|
|
8844
8847
|
_(() => {
|
|
8845
8848
|
a === "idle" && c().catch(() => {
|
|
8846
8849
|
});
|
|
8847
8850
|
}, [a, c]), _(() => {
|
|
8848
8851
|
a === "success" && t?.();
|
|
8849
8852
|
}, [a, t]);
|
|
8850
|
-
const
|
|
8851
|
-
s?.secret && (await navigator.clipboard.writeText(s.secret), y(!0),
|
|
8852
|
-
},
|
|
8853
|
+
const E = async () => {
|
|
8854
|
+
s?.secret && (await navigator.clipboard.writeText(s.secret), y(!0), N.current !== null && window.clearTimeout(N.current), N.current = window.setTimeout(() => y(!1), 2e3));
|
|
8855
|
+
}, L = async () => {
|
|
8853
8856
|
if (s?.recoveryCodes) {
|
|
8854
|
-
const
|
|
8857
|
+
const x = s.recoveryCodes.join(`
|
|
8855
8858
|
`);
|
|
8856
|
-
await navigator.clipboard.writeText(
|
|
8859
|
+
await navigator.clipboard.writeText(x);
|
|
8857
8860
|
}
|
|
8858
8861
|
}, A = async () => {
|
|
8859
8862
|
try {
|
|
@@ -8861,11 +8864,11 @@ function qa({ onSuccess: t, onCancel: r, className: o = "" }) {
|
|
|
8861
8864
|
} catch {
|
|
8862
8865
|
g("");
|
|
8863
8866
|
}
|
|
8864
|
-
},
|
|
8867
|
+
}, C = () => {
|
|
8865
8868
|
p(), r?.();
|
|
8866
8869
|
};
|
|
8867
8870
|
return _(() => () => {
|
|
8868
|
-
|
|
8871
|
+
N.current !== null && (window.clearTimeout(N.current), N.current = null);
|
|
8869
8872
|
}, []), a === "loading" || a === "idle" && n ? /* @__PURE__ */ e("div", { className: `cedros-totp-setup ${o}`, children: /* @__PURE__ */ e("div", { className: "cedros-totp-loading", children: /* @__PURE__ */ e(K, { size: "lg", label: "Setting up two-factor authentication" }) }) }) : a === "error" && !s ? /* @__PURE__ */ i("div", { className: `cedros-totp-setup ${o}`, children: [
|
|
8870
8873
|
/* @__PURE__ */ e(ee, { error: l, onDismiss: h }),
|
|
8871
8874
|
/* @__PURE__ */ i("div", { className: "cedros-totp-actions", children: [
|
|
@@ -8874,7 +8877,7 @@ function qa({ onSuccess: t, onCancel: r, className: o = "" }) {
|
|
|
8874
8877
|
{
|
|
8875
8878
|
type: "button",
|
|
8876
8879
|
className: "cedros-button cedros-button-outline cedros-button-md",
|
|
8877
|
-
onClick:
|
|
8880
|
+
onClick: C,
|
|
8878
8881
|
children: "Cancel"
|
|
8879
8882
|
}
|
|
8880
8883
|
),
|
|
@@ -8929,7 +8932,7 @@ function qa({ onSuccess: t, onCancel: r, className: o = "" }) {
|
|
|
8929
8932
|
{
|
|
8930
8933
|
type: "button",
|
|
8931
8934
|
className: "cedros-button cedros-button-ghost cedros-button-sm",
|
|
8932
|
-
onClick:
|
|
8935
|
+
onClick: E,
|
|
8933
8936
|
"aria-label": "Copy secret",
|
|
8934
8937
|
children: u ? "Copied!" : "Copy"
|
|
8935
8938
|
}
|
|
@@ -8942,7 +8945,7 @@ function qa({ onSuccess: t, onCancel: r, className: o = "" }) {
|
|
|
8942
8945
|
{
|
|
8943
8946
|
type: "button",
|
|
8944
8947
|
className: "cedros-button cedros-button-outline cedros-button-md",
|
|
8945
|
-
onClick:
|
|
8948
|
+
onClick: C,
|
|
8946
8949
|
children: "Cancel"
|
|
8947
8950
|
}
|
|
8948
8951
|
),
|
|
@@ -8960,13 +8963,13 @@ function qa({ onSuccess: t, onCancel: r, className: o = "" }) {
|
|
|
8960
8963
|
m === "backup" && /* @__PURE__ */ i("div", { className: "cedros-totp-step", children: [
|
|
8961
8964
|
/* @__PURE__ */ e("h3", { className: "cedros-totp-title", children: "Save recovery codes" }),
|
|
8962
8965
|
/* @__PURE__ */ e("p", { className: "cedros-totp-description", children: "Save these codes in a secure place. You can use them to access your account if you lose your authenticator device." }),
|
|
8963
|
-
/* @__PURE__ */ e("div", { className: "cedros-totp-backup-codes", children: s.recoveryCodes.map((
|
|
8966
|
+
/* @__PURE__ */ e("div", { className: "cedros-totp-backup-codes", children: s.recoveryCodes.map((x, S) => /* @__PURE__ */ e("code", { className: "cedros-totp-backup-code", children: x }, S)) }),
|
|
8964
8967
|
/* @__PURE__ */ e(
|
|
8965
8968
|
"button",
|
|
8966
8969
|
{
|
|
8967
8970
|
type: "button",
|
|
8968
8971
|
className: "cedros-button cedros-button-outline cedros-button-md cedros-button-full",
|
|
8969
|
-
onClick:
|
|
8972
|
+
onClick: L,
|
|
8970
8973
|
children: "Copy all codes"
|
|
8971
8974
|
}
|
|
8972
8975
|
),
|
|
@@ -8977,7 +8980,7 @@ function qa({ onSuccess: t, onCancel: r, className: o = "" }) {
|
|
|
8977
8980
|
type: "checkbox",
|
|
8978
8981
|
className: "cedros-checkbox",
|
|
8979
8982
|
checked: v,
|
|
8980
|
-
onChange: (
|
|
8983
|
+
onChange: (x) => b(x.target.checked)
|
|
8981
8984
|
}
|
|
8982
8985
|
),
|
|
8983
8986
|
/* @__PURE__ */ e("span", { className: "cedros-checkbox-text", children: "I have saved these recovery codes" })
|
|
@@ -9047,33 +9050,33 @@ function qa({ onSuccess: t, onCancel: r, className: o = "" }) {
|
|
|
9047
9050
|
] }) : null;
|
|
9048
9051
|
}
|
|
9049
9052
|
function fc({ onStatusChange: t, className: r = "" }) {
|
|
9050
|
-
const { status: o, isLoading: a, error: s, getStatus: n, disableTotp: l, regenerateBackupCodes: c, clearError: d } = gs(), [h, p] = k("status"), [m, f] = k(""), [w, g] = k(""), [u, y] = k(null), [v, b] = k(!1), [
|
|
9053
|
+
const { status: o, isLoading: a, error: s, getStatus: n, disableTotp: l, regenerateBackupCodes: c, clearError: d } = gs(), [h, p] = k("status"), [m, f] = k(""), [w, g] = k(""), [u, y] = k(null), [v, b] = k(!1), [N, E] = k(null);
|
|
9051
9054
|
_(() => {
|
|
9052
9055
|
n().catch(() => {
|
|
9053
9056
|
});
|
|
9054
9057
|
}, [n]);
|
|
9055
|
-
const
|
|
9058
|
+
const L = P(() => {
|
|
9056
9059
|
p("status"), t?.(!0);
|
|
9057
9060
|
}, [t]), A = async () => {
|
|
9058
|
-
b(!0),
|
|
9061
|
+
b(!0), E(null);
|
|
9059
9062
|
try {
|
|
9060
9063
|
await l(m), p("status"), f(""), t?.(!1);
|
|
9061
9064
|
} catch (S) {
|
|
9062
|
-
|
|
9065
|
+
E(S instanceof Error ? S.message : "Failed to disable 2FA"), f("");
|
|
9063
9066
|
} finally {
|
|
9064
9067
|
b(!1);
|
|
9065
9068
|
}
|
|
9066
|
-
},
|
|
9067
|
-
b(!0),
|
|
9069
|
+
}, C = async () => {
|
|
9070
|
+
b(!0), E(null);
|
|
9068
9071
|
try {
|
|
9069
9072
|
const S = await c(w);
|
|
9070
9073
|
y(S.recoveryCodes), g("");
|
|
9071
9074
|
} catch (S) {
|
|
9072
|
-
|
|
9075
|
+
E(S instanceof Error ? S.message : "Failed to regenerate codes"), g("");
|
|
9073
9076
|
} finally {
|
|
9074
9077
|
b(!1);
|
|
9075
9078
|
}
|
|
9076
|
-
},
|
|
9079
|
+
}, x = async () => {
|
|
9077
9080
|
u && await navigator.clipboard.writeText(u.join(`
|
|
9078
9081
|
`));
|
|
9079
9082
|
};
|
|
@@ -9088,14 +9091,14 @@ function fc({ onStatusChange: t, className: r = "" }) {
|
|
|
9088
9091
|
children: "Retry"
|
|
9089
9092
|
}
|
|
9090
9093
|
)
|
|
9091
|
-
] }) : h === "setup" ? /* @__PURE__ */ e("div", { className: `cedros-totp-settings ${r}`, children: /* @__PURE__ */ e(qa, { onSuccess:
|
|
9094
|
+
] }) : h === "setup" ? /* @__PURE__ */ e("div", { className: `cedros-totp-settings ${r}`, children: /* @__PURE__ */ e(qa, { onSuccess: L, onCancel: () => p("status") }) }) : h === "disable" ? /* @__PURE__ */ e("div", { className: `cedros-totp-settings ${r}`, children: /* @__PURE__ */ i("div", { className: "cedros-totp-panel", children: [
|
|
9092
9095
|
/* @__PURE__ */ e("h3", { className: "cedros-totp-title", children: "Disable two-factor authentication" }),
|
|
9093
9096
|
/* @__PURE__ */ e("p", { className: "cedros-totp-description cedros-totp-warning", children: "This will make your account less secure. Enter your password to confirm." }),
|
|
9094
|
-
|
|
9097
|
+
N && /* @__PURE__ */ e("div", { className: "cedros-totp-error", children: /* @__PURE__ */ e(
|
|
9095
9098
|
ee,
|
|
9096
9099
|
{
|
|
9097
|
-
error: { code: "UNKNOWN_ERROR", message:
|
|
9098
|
-
onDismiss: () =>
|
|
9100
|
+
error: { code: "UNKNOWN_ERROR", message: N },
|
|
9101
|
+
onDismiss: () => E(null)
|
|
9099
9102
|
}
|
|
9100
9103
|
) }),
|
|
9101
9104
|
/* @__PURE__ */ e("div", { className: "cedros-totp-verify-input", children: /* @__PURE__ */ e(
|
|
@@ -9116,7 +9119,7 @@ function fc({ onStatusChange: t, className: r = "" }) {
|
|
|
9116
9119
|
type: "button",
|
|
9117
9120
|
className: "cedros-button cedros-button-outline cedros-button-md",
|
|
9118
9121
|
onClick: () => {
|
|
9119
|
-
p("status"), f(""),
|
|
9122
|
+
p("status"), f(""), E(null);
|
|
9120
9123
|
},
|
|
9121
9124
|
disabled: v,
|
|
9122
9125
|
children: "Cancel"
|
|
@@ -9145,7 +9148,7 @@ function fc({ onStatusChange: t, className: r = "" }) {
|
|
|
9145
9148
|
{
|
|
9146
9149
|
type: "button",
|
|
9147
9150
|
className: "cedros-button cedros-button-outline cedros-button-md cedros-button-full",
|
|
9148
|
-
onClick:
|
|
9151
|
+
onClick: x,
|
|
9149
9152
|
children: "Copy all codes"
|
|
9150
9153
|
}
|
|
9151
9154
|
),
|
|
@@ -9163,11 +9166,11 @@ function fc({ onStatusChange: t, className: r = "" }) {
|
|
|
9163
9166
|
] }) }) : /* @__PURE__ */ e("div", { className: `cedros-totp-settings ${r}`, children: /* @__PURE__ */ i("div", { className: "cedros-totp-panel", children: [
|
|
9164
9167
|
/* @__PURE__ */ e("h3", { className: "cedros-totp-title", children: "Regenerate recovery codes" }),
|
|
9165
9168
|
/* @__PURE__ */ e("p", { className: "cedros-totp-description", children: "This will invalidate all existing recovery codes. Enter your authenticator code to confirm." }),
|
|
9166
|
-
|
|
9169
|
+
N && /* @__PURE__ */ e("div", { className: "cedros-totp-error", children: /* @__PURE__ */ e(
|
|
9167
9170
|
ee,
|
|
9168
9171
|
{
|
|
9169
|
-
error: { code: "UNKNOWN_ERROR", message:
|
|
9170
|
-
onDismiss: () =>
|
|
9172
|
+
error: { code: "UNKNOWN_ERROR", message: N },
|
|
9173
|
+
onDismiss: () => E(null)
|
|
9171
9174
|
}
|
|
9172
9175
|
) }),
|
|
9173
9176
|
/* @__PURE__ */ e("div", { className: "cedros-totp-verify-input", children: /* @__PURE__ */ e(
|
|
@@ -9175,7 +9178,7 @@ function fc({ onStatusChange: t, className: r = "" }) {
|
|
|
9175
9178
|
{
|
|
9176
9179
|
value: w,
|
|
9177
9180
|
onChange: g,
|
|
9178
|
-
onComplete:
|
|
9181
|
+
onComplete: C,
|
|
9179
9182
|
disabled: v,
|
|
9180
9183
|
autoFocus: !0
|
|
9181
9184
|
}
|
|
@@ -9187,7 +9190,7 @@ function fc({ onStatusChange: t, className: r = "" }) {
|
|
|
9187
9190
|
type: "button",
|
|
9188
9191
|
className: "cedros-button cedros-button-outline cedros-button-md",
|
|
9189
9192
|
onClick: () => {
|
|
9190
|
-
p("status"), g(""),
|
|
9193
|
+
p("status"), g(""), E(null);
|
|
9191
9194
|
},
|
|
9192
9195
|
disabled: v,
|
|
9193
9196
|
children: "Cancel"
|
|
@@ -9198,7 +9201,7 @@ function fc({ onStatusChange: t, className: r = "" }) {
|
|
|
9198
9201
|
{
|
|
9199
9202
|
type: "button",
|
|
9200
9203
|
className: "cedros-button cedros-button-primary cedros-button-md",
|
|
9201
|
-
onClick:
|
|
9204
|
+
onClick: C,
|
|
9202
9205
|
disabled: v || w.length !== 6,
|
|
9203
9206
|
children: v ? /* @__PURE__ */ i(X, { children: [
|
|
9204
9207
|
/* @__PURE__ */ e(K, { size: "sm" }),
|
|
@@ -9342,21 +9345,21 @@ function gc({
|
|
|
9342
9345
|
onClose: r,
|
|
9343
9346
|
className: o = ""
|
|
9344
9347
|
}) {
|
|
9345
|
-
const { user: a } = Fr(), { isLoading: s, error: n, changePassword: l, clearError: c } = za(), [d, h] = k("main"), [p, m] = k(""), [f, w] = k(""), [g, u] = k(""), [y, v] = k(null), [b,
|
|
9348
|
+
const { user: a } = Fr(), { isLoading: s, error: n, changePassword: l, clearError: c } = za(), [d, h] = k("main"), [p, m] = k(""), [f, w] = k(""), [g, u] = k(""), [y, v] = k(null), [b, N] = k(null), E = Wt(f), L = f === g, A = p.length > 0 && f.length > 0 && g.length > 0 && E.isValid && L, C = P(async () => {
|
|
9346
9349
|
if (A) {
|
|
9347
|
-
v(null),
|
|
9350
|
+
v(null), N(null);
|
|
9348
9351
|
try {
|
|
9349
9352
|
await l({
|
|
9350
9353
|
currentPassword: p,
|
|
9351
9354
|
newPassword: f
|
|
9352
|
-
}), m(""), w(""), u(""),
|
|
9353
|
-
h("main"),
|
|
9355
|
+
}), m(""), w(""), u(""), N("Password changed successfully. Other sessions have been logged out."), t?.(), setTimeout(() => {
|
|
9356
|
+
h("main"), N(null);
|
|
9354
9357
|
}, 2e3);
|
|
9355
9358
|
} catch (B) {
|
|
9356
9359
|
v(B instanceof Error ? B.message : "Failed to change password");
|
|
9357
9360
|
}
|
|
9358
9361
|
}
|
|
9359
|
-
}, [A, p, f, l, t]),
|
|
9362
|
+
}, [A, p, f, l, t]), x = P(() => {
|
|
9360
9363
|
h("main"), m(""), w(""), u(""), v(null), c();
|
|
9361
9364
|
}, [c]), S = () => a?.name ? a.name.split(" ").map((B) => B[0]).join("").toUpperCase().slice(0, 2) : a?.email ? a.email[0].toUpperCase() : "?";
|
|
9362
9365
|
return d === "change-password" ? /* @__PURE__ */ e("div", { className: `cedros-profile-settings ${o}`, children: /* @__PURE__ */ i("div", { className: "cedros-profile-panel", children: [
|
|
@@ -9406,7 +9409,7 @@ function gc({
|
|
|
9406
9409
|
value: g,
|
|
9407
9410
|
onChange: (B) => u(B.target.value),
|
|
9408
9411
|
disabled: s,
|
|
9409
|
-
error: g.length > 0 && !
|
|
9412
|
+
error: g.length > 0 && !L ? "Passwords do not match" : void 0
|
|
9410
9413
|
}
|
|
9411
9414
|
) })
|
|
9412
9415
|
] }),
|
|
@@ -9416,7 +9419,7 @@ function gc({
|
|
|
9416
9419
|
{
|
|
9417
9420
|
type: "button",
|
|
9418
9421
|
className: "cedros-button cedros-button-outline cedros-button-md",
|
|
9419
|
-
onClick:
|
|
9422
|
+
onClick: x,
|
|
9420
9423
|
disabled: s,
|
|
9421
9424
|
children: "Cancel"
|
|
9422
9425
|
}
|
|
@@ -9426,7 +9429,7 @@ function gc({
|
|
|
9426
9429
|
{
|
|
9427
9430
|
type: "button",
|
|
9428
9431
|
className: "cedros-button cedros-button-primary cedros-button-md",
|
|
9429
|
-
onClick:
|
|
9432
|
+
onClick: C,
|
|
9430
9433
|
disabled: s || !A,
|
|
9431
9434
|
children: s ? /* @__PURE__ */ i(X, { children: [
|
|
9432
9435
|
/* @__PURE__ */ e(K, { size: "sm" }),
|
|
@@ -9637,12 +9640,12 @@ function ws({
|
|
|
9637
9640
|
if (!p.trim()) return t;
|
|
9638
9641
|
const b = p.toLowerCase();
|
|
9639
9642
|
return t.filter(
|
|
9640
|
-
(
|
|
9643
|
+
(N) => N.symbol.toLowerCase().includes(b) || N.name.toLowerCase().includes(b) || N.mint.toLowerCase().includes(b)
|
|
9641
9644
|
);
|
|
9642
9645
|
}, [t, p]);
|
|
9643
9646
|
_(() => {
|
|
9644
|
-
const b = (
|
|
9645
|
-
f.current && !f.current.contains(
|
|
9647
|
+
const b = (N) => {
|
|
9648
|
+
f.current && !f.current.contains(N.target) && (h(!1), m(""));
|
|
9646
9649
|
};
|
|
9647
9650
|
if (d)
|
|
9648
9651
|
return document.addEventListener("mousedown", b), () => document.removeEventListener("mousedown", b);
|
|
@@ -9726,8 +9729,8 @@ function ws({
|
|
|
9726
9729
|
src: b.logoUrl,
|
|
9727
9730
|
alt: b.symbol,
|
|
9728
9731
|
className: "cedros-token-icon",
|
|
9729
|
-
onError: (
|
|
9730
|
-
|
|
9732
|
+
onError: (N) => {
|
|
9733
|
+
N.target.style.display = "none";
|
|
9731
9734
|
}
|
|
9732
9735
|
}
|
|
9733
9736
|
),
|
|
@@ -9950,10 +9953,10 @@ function wc({
|
|
|
9950
9953
|
demoAutoConfirmMs: y,
|
|
9951
9954
|
tokenPriceUsd: v,
|
|
9952
9955
|
showExplainer: b = !1,
|
|
9953
|
-
siteName:
|
|
9954
|
-
explainerConfig:
|
|
9956
|
+
siteName: N,
|
|
9957
|
+
explainerConfig: E
|
|
9955
9958
|
}) {
|
|
9956
|
-
const { deposit:
|
|
9959
|
+
const { deposit: L, getStatus: A, error: C, clearError: x } = Va(), S = Xe(), B = Ir(t.quickActionTokens), T = Ir(t.customTokenSymbols), M = q(() => {
|
|
9957
9960
|
const W = t.customTokens ?? [];
|
|
9958
9961
|
if (W.length === 0) return a;
|
|
9959
9962
|
const V = new Set(a.map((J) => J.symbol)), Y = [...a];
|
|
@@ -9973,8 +9976,8 @@ function wc({
|
|
|
9973
9976
|
return W.length > 0 ? W : M;
|
|
9974
9977
|
}, [M, T]), D = t.privateDepositsEnabled, F = o ? o === "sign" && !D ? "receive" : o : D && S.hasExternalWallet ? "sign" : "receive", Z = B[0] ? M.find((W) => W.symbol === B[0]) : void 0, he = r === "sol" ? Se : r === "single-token" ? Z ?? M.find((W) => W.symbol === "USDC") ?? M[0] ?? Se : s ?? Z ?? M.find((W) => W.symbol === "USDC") ?? M.find((W) => W.symbol !== "SOL") ?? M[0] ?? Se, te = P(() => b ? "explainer" : "unlock", [b]), [H, I] = k(te), [U, Q] = k(he), [re, oe] = k(""), [fe, pe] = k(null), [z, j] = k(null), [G, le] = k(null), [be, Kt] = k(null), [et, Me] = k(!1), [Ms, tt] = k(!1), [Re, Gt] = k(null);
|
|
9975
9978
|
_(() => {
|
|
9976
|
-
I(te()), Q(he), oe(""), pe(null), j(null), le(null), Kt(null), Me(!1), tt(!1), Gt(null),
|
|
9977
|
-
}, [r, F, he,
|
|
9979
|
+
I(te()), Q(he), oe(""), pe(null), j(null), le(null), Kt(null), Me(!1), tt(!1), Gt(null), x();
|
|
9980
|
+
}, [r, F, he, x, te]);
|
|
9978
9981
|
const Ts = n ?? t.privateMinSol, Bs = l, De = parseFloat(re), $t = S.status === "enrolled_locked" || S.status === "enrolled_unlocked" || S.status === "unlocked", rt = $t && S.isUnlocked, st = $t && !S.isUnlocked, Jt = P(() => {
|
|
9979
9982
|
let Y = F === "sign" ? [
|
|
9980
9983
|
{ key: "unlock", label: "Authorize" },
|
|
@@ -10010,7 +10013,7 @@ function wc({
|
|
|
10010
10013
|
[m, F, De, U]
|
|
10011
10014
|
), Is = P(
|
|
10012
10015
|
async (W, V) => {
|
|
10013
|
-
|
|
10016
|
+
x(), j(null), I("signing");
|
|
10014
10017
|
const Y = W ?? De, J = V ?? U;
|
|
10015
10018
|
if (!u) {
|
|
10016
10019
|
if (st && p) {
|
|
@@ -10044,7 +10047,7 @@ function wc({
|
|
|
10044
10047
|
pe(Fe), I("success"), c?.(Fe);
|
|
10045
10048
|
return;
|
|
10046
10049
|
}
|
|
10047
|
-
const ae = await
|
|
10050
|
+
const ae = await L(ie), Ie = {
|
|
10048
10051
|
token: r === "sol" ? null : J,
|
|
10049
10052
|
amount: Y,
|
|
10050
10053
|
amountSmallestUnit: ie,
|
|
@@ -10060,7 +10063,7 @@ function wc({
|
|
|
10060
10063
|
}
|
|
10061
10064
|
},
|
|
10062
10065
|
[
|
|
10063
|
-
|
|
10066
|
+
L,
|
|
10064
10067
|
De,
|
|
10065
10068
|
U,
|
|
10066
10069
|
r,
|
|
@@ -10071,7 +10074,7 @@ function wc({
|
|
|
10071
10074
|
p,
|
|
10072
10075
|
c,
|
|
10073
10076
|
d,
|
|
10074
|
-
|
|
10077
|
+
x
|
|
10075
10078
|
]
|
|
10076
10079
|
), Fs = P(() => {
|
|
10077
10080
|
I("waiting");
|
|
@@ -10161,8 +10164,8 @@ function wc({
|
|
|
10161
10164
|
c
|
|
10162
10165
|
]);
|
|
10163
10166
|
const Us = P(() => {
|
|
10164
|
-
I(te()), oe(""), pe(null), j(null),
|
|
10165
|
-
}, [te,
|
|
10167
|
+
I(te()), oe(""), pe(null), j(null), x();
|
|
10168
|
+
}, [te, x]);
|
|
10166
10169
|
return t.enabled ? /* @__PURE__ */ i("div", { className: `cedros-deposit-flow ${f}`, children: [
|
|
10167
10170
|
w && H !== "error" && /* @__PURE__ */ e("div", { className: "cedros-deposit-flow-steps", children: Jt.map((W, V) => {
|
|
10168
10171
|
const Y = Rs >= V, J = W.key === H;
|
|
@@ -10188,8 +10191,8 @@ function wc({
|
|
|
10188
10191
|
H === "explainer" && /* @__PURE__ */ e(
|
|
10189
10192
|
ti,
|
|
10190
10193
|
{
|
|
10191
|
-
siteName:
|
|
10192
|
-
config:
|
|
10194
|
+
siteName: N,
|
|
10195
|
+
config: E,
|
|
10193
10196
|
depositConfig: t,
|
|
10194
10197
|
currencyMode: r,
|
|
10195
10198
|
token: U,
|
|
@@ -10272,7 +10275,7 @@ function wc({
|
|
|
10272
10275
|
H === "error" && /* @__PURE__ */ e(
|
|
10273
10276
|
ci,
|
|
10274
10277
|
{
|
|
10275
|
-
error: z ||
|
|
10278
|
+
error: z || C || "An error occurred",
|
|
10276
10279
|
onRetry: () => I("confirm"),
|
|
10277
10280
|
onCancel: h
|
|
10278
10281
|
}
|
|
@@ -10426,7 +10429,7 @@ function si({
|
|
|
10426
10429
|
onConfirm: y,
|
|
10427
10430
|
onBack: v
|
|
10428
10431
|
}) {
|
|
10429
|
-
const [b,
|
|
10432
|
+
const [b, N] = k(f.privateMinUsd), [E, L] = k(!1), [A, C] = k(!1), [x, S] = k(0), [B, T] = k(null), R = Vt(b, f) === "sol_micro", D = t.symbol === xe.symbol, F = q(() => {
|
|
10430
10433
|
const z = a.length === 0 ? r : r.filter((le) => a.includes(le.symbol)), j = z.length > 0 ? z : r;
|
|
10431
10434
|
return j.some((le) => le.symbol === xe.symbol) ? j : [...j, xe];
|
|
10432
10435
|
}, [r, a]), Z = Ze(f, b), he = Z < 0.01 ? 0.01 : Z, te = D ? "Fees: calculated after deposit" : `Fees: $${he.toFixed(2)} total`, H = D ? "" : ks(f, b, Z), I = Es(R ? Se : t, f), U = I ? b / I : t.symbol === "SOL" && f.solPriceUsd > 0 ? b / f.solPriceUsd : b, Q = U ? Ss(U, R ? "SOL" : t.symbol) : null, oe = b - Z <= 0 && b > 0, fe = !D && b > 0 && !oe && U >= n && U <= l;
|
|
@@ -10455,7 +10458,7 @@ function si({
|
|
|
10455
10458
|
type: "button",
|
|
10456
10459
|
className: `cedros-deposit-flow-token-quick-btn ${G ? "is-active" : ""}`,
|
|
10457
10460
|
onClick: () => {
|
|
10458
|
-
j && (
|
|
10461
|
+
j && (L(!1), g(j));
|
|
10459
10462
|
},
|
|
10460
10463
|
disabled: !j,
|
|
10461
10464
|
children: [
|
|
@@ -10477,21 +10480,21 @@ function si({
|
|
|
10477
10480
|
"button",
|
|
10478
10481
|
{
|
|
10479
10482
|
type: "button",
|
|
10480
|
-
className: `cedros-deposit-flow-token-quick-btn ${
|
|
10483
|
+
className: `cedros-deposit-flow-token-quick-btn ${E ? "is-active" : ""}`,
|
|
10481
10484
|
onClick: () => {
|
|
10482
|
-
|
|
10485
|
+
L(!0), S((z) => z + 1);
|
|
10483
10486
|
},
|
|
10484
10487
|
children: "Custom"
|
|
10485
10488
|
}
|
|
10486
10489
|
)
|
|
10487
10490
|
] }),
|
|
10488
|
-
|
|
10491
|
+
E && /* @__PURE__ */ e("div", { className: "cedros-deposit-flow-token-custom", children: /* @__PURE__ */ e(
|
|
10489
10492
|
ws,
|
|
10490
10493
|
{
|
|
10491
10494
|
tokens: F,
|
|
10492
10495
|
selectedToken: t,
|
|
10493
10496
|
onSelect: g,
|
|
10494
|
-
openSignal:
|
|
10497
|
+
openSignal: x
|
|
10495
10498
|
}
|
|
10496
10499
|
) })
|
|
10497
10500
|
] }),
|
|
@@ -10500,7 +10503,7 @@ function si({
|
|
|
10500
10503
|
{
|
|
10501
10504
|
config: f,
|
|
10502
10505
|
valueUsd: b,
|
|
10503
|
-
onChange:
|
|
10506
|
+
onChange: N,
|
|
10504
10507
|
maxUsd: vs
|
|
10505
10508
|
}
|
|
10506
10509
|
) }),
|
|
@@ -10555,11 +10558,11 @@ function si({
|
|
|
10555
10558
|
`, ", ")}`,
|
|
10556
10559
|
"aria-expanded": A,
|
|
10557
10560
|
onClick: (z) => {
|
|
10558
|
-
z.stopPropagation(),
|
|
10561
|
+
z.stopPropagation(), C((j) => !j);
|
|
10559
10562
|
},
|
|
10560
|
-
onBlur: () =>
|
|
10563
|
+
onBlur: () => C(!1),
|
|
10561
10564
|
onKeyDown: (z) => {
|
|
10562
|
-
z.key === "Escape" &&
|
|
10565
|
+
z.key === "Escape" && C(!1);
|
|
10563
10566
|
},
|
|
10564
10567
|
children: "i"
|
|
10565
10568
|
}
|
|
@@ -10640,18 +10643,18 @@ function ni({
|
|
|
10640
10643
|
onSent: w,
|
|
10641
10644
|
onBack: g
|
|
10642
10645
|
}) {
|
|
10643
|
-
const [u, y] = k(h.privateMinUsd), [v, b] = k(!1), [
|
|
10646
|
+
const [u, y] = k(h.privateMinUsd), [v, b] = k(!1), [N, E] = k(!1), [L, A] = k(0), [C, x] = k(null), B = Vt(u, h) === "sol_micro", T = t.symbol === xe.symbol, M = q(() => {
|
|
10644
10647
|
const U = a.length === 0 ? r : r.filter((oe) => a.includes(oe.symbol)), Q = U.length > 0 ? U : r;
|
|
10645
10648
|
return Q.some((oe) => oe.symbol === xe.symbol) ? Q : [...Q, xe];
|
|
10646
10649
|
}, [r, a]), R = Ze(h, u), D = R < 0.01 ? 0.01 : R, F = T ? "Fees: calculated after deposit" : `Fees: $${D.toFixed(2)} total`, Z = T ? "" : ks(h, u, R), he = T || u > 0, te = Es(B ? Se : t, h, s), H = te ? u / te : null, I = H ? Ss(H, t.symbol) : null;
|
|
10647
10650
|
return _(() => {
|
|
10648
10651
|
if (n === "multi-token")
|
|
10649
10652
|
if (B && t.symbol !== "SOL") {
|
|
10650
|
-
|
|
10653
|
+
x(t);
|
|
10651
10654
|
const U = r.find((Q) => Q.symbol === "SOL");
|
|
10652
10655
|
U && m(U);
|
|
10653
|
-
} else !B &&
|
|
10654
|
-
}, [B, t.symbol, n, r, m,
|
|
10656
|
+
} else !B && C && t.symbol === "SOL" && (m(C), x(null));
|
|
10657
|
+
}, [B, t.symbol, n, r, m, C, t]), _(() => {
|
|
10655
10658
|
f(u);
|
|
10656
10659
|
}, [u, f]), l ? /* @__PURE__ */ i("div", { className: "cedros-deposit-flow-step", children: [
|
|
10657
10660
|
/* @__PURE__ */ e("h4", { className: "cedros-deposit-flow-step-title", children: "Send Deposit" }),
|
|
@@ -10703,7 +10706,7 @@ function ni({
|
|
|
10703
10706
|
tokens: M,
|
|
10704
10707
|
selectedToken: t,
|
|
10705
10708
|
onSelect: m,
|
|
10706
|
-
openSignal:
|
|
10709
|
+
openSignal: L
|
|
10707
10710
|
}
|
|
10708
10711
|
) })
|
|
10709
10712
|
] }),
|
|
@@ -10750,17 +10753,17 @@ function ni({
|
|
|
10750
10753
|
"button",
|
|
10751
10754
|
{
|
|
10752
10755
|
type: "button",
|
|
10753
|
-
className: `cedros-deposit-flow-fee-info ${
|
|
10756
|
+
className: `cedros-deposit-flow-fee-info ${N ? "is-open" : ""}`,
|
|
10754
10757
|
"data-tooltip": Z,
|
|
10755
10758
|
"aria-label": `Fee breakdown: ${Z.replaceAll(`
|
|
10756
10759
|
`, ", ")}`,
|
|
10757
|
-
"aria-expanded":
|
|
10760
|
+
"aria-expanded": N,
|
|
10758
10761
|
onClick: (U) => {
|
|
10759
|
-
U.stopPropagation(),
|
|
10762
|
+
U.stopPropagation(), E((Q) => !Q);
|
|
10760
10763
|
},
|
|
10761
|
-
onBlur: () =>
|
|
10764
|
+
onBlur: () => E(!1),
|
|
10762
10765
|
onKeyDown: (U) => {
|
|
10763
|
-
U.key === "Escape" &&
|
|
10766
|
+
U.key === "Escape" && E(!1);
|
|
10764
10767
|
},
|
|
10765
10768
|
children: "i"
|
|
10766
10769
|
}
|
|
@@ -11235,15 +11238,15 @@ function bc({
|
|
|
11235
11238
|
onLoad: s,
|
|
11236
11239
|
onTransactionClick: n
|
|
11237
11240
|
}) {
|
|
11238
|
-
const { getHistory: l, isLoading: c, error: d, clearError: h } = xs(), [p, m] = k(t), [f, w] = k([]), [g, u] = k(0), [y, v] = k(0), [b,
|
|
11241
|
+
const { getHistory: l, isLoading: c, error: d, clearError: h } = xs(), [p, m] = k(t), [f, w] = k([]), [g, u] = k(0), [y, v] = k(0), [b, N] = k(null), E = Tt.find((M) => M.key === p) || Tt[0], L = q(() => E.txTypes === null ? f : f.filter((M) => {
|
|
11239
11242
|
const R = M.txType || "";
|
|
11240
|
-
return
|
|
11241
|
-
}), [f,
|
|
11243
|
+
return E.txTypes.some((D) => R.toLowerCase().includes(D.toLowerCase()));
|
|
11244
|
+
}), [f, E.txTypes]), A = P(async () => {
|
|
11242
11245
|
try {
|
|
11243
11246
|
const M = await l({ limit: r * 3, offset: y });
|
|
11244
|
-
w(M.transactions), u(M.total), s?.(M),
|
|
11247
|
+
w(M.transactions), u(M.total), s?.(M), N(null);
|
|
11245
11248
|
} catch (M) {
|
|
11246
|
-
|
|
11249
|
+
N(M instanceof Error ? M.message : "Failed to load history");
|
|
11247
11250
|
}
|
|
11248
11251
|
}, [r, y, l, s]);
|
|
11249
11252
|
_(() => {
|
|
@@ -11255,7 +11258,7 @@ function bc({
|
|
|
11255
11258
|
const M = setInterval(A, o);
|
|
11256
11259
|
return () => clearInterval(M);
|
|
11257
11260
|
}, [o, A]);
|
|
11258
|
-
const
|
|
11261
|
+
const C = Math.ceil(g / r), x = Math.floor(y / r) + 1, S = (M) => {
|
|
11259
11262
|
const R = (M - 1) * r;
|
|
11260
11263
|
v(Math.max(0, Math.min(R, Math.max(0, g - 1))));
|
|
11261
11264
|
}, B = (M) => {
|
|
@@ -11270,7 +11273,7 @@ function bc({
|
|
|
11270
11273
|
type: "button",
|
|
11271
11274
|
className: "cedros-tx-retry",
|
|
11272
11275
|
onClick: () => {
|
|
11273
|
-
h(),
|
|
11276
|
+
h(), N(null), A();
|
|
11274
11277
|
},
|
|
11275
11278
|
children: "Retry"
|
|
11276
11279
|
}
|
|
@@ -11316,11 +11319,11 @@ function bc({
|
|
|
11316
11319
|
M.key
|
|
11317
11320
|
);
|
|
11318
11321
|
}) }),
|
|
11319
|
-
|
|
11320
|
-
/* @__PURE__ */ e("p", { className: "cedros-tx-empty-message", children: p === "all" ? "No transactions yet." : `No ${
|
|
11322
|
+
L.length === 0 ? /* @__PURE__ */ i("div", { className: "cedros-tx-empty", children: [
|
|
11323
|
+
/* @__PURE__ */ e("p", { className: "cedros-tx-empty-message", children: p === "all" ? "No transactions yet." : `No ${E.label.toLowerCase()} found.` }),
|
|
11321
11324
|
p === "all" && /* @__PURE__ */ e("p", { className: "cedros-tx-empty-hint", children: "Make a deposit to get started." })
|
|
11322
11325
|
] }) : /* @__PURE__ */ i(X, { children: [
|
|
11323
|
-
/* @__PURE__ */ e("div", { className: "cedros-tx-list", children:
|
|
11326
|
+
/* @__PURE__ */ e("div", { className: "cedros-tx-list", children: L.slice(0, r).map((M) => {
|
|
11324
11327
|
const R = M.amountLamports >= 0;
|
|
11325
11328
|
return /* @__PURE__ */ i(
|
|
11326
11329
|
"div",
|
|
@@ -11361,30 +11364,30 @@ function bc({
|
|
|
11361
11364
|
M.id
|
|
11362
11365
|
);
|
|
11363
11366
|
}) }),
|
|
11364
|
-
|
|
11367
|
+
C > 1 && /* @__PURE__ */ i("div", { className: "cedros-tx-pagination", children: [
|
|
11365
11368
|
/* @__PURE__ */ e(
|
|
11366
11369
|
"button",
|
|
11367
11370
|
{
|
|
11368
11371
|
type: "button",
|
|
11369
11372
|
className: "cedros-tx-page-btn",
|
|
11370
|
-
onClick: () => S(
|
|
11371
|
-
disabled:
|
|
11373
|
+
onClick: () => S(x - 1),
|
|
11374
|
+
disabled: x <= 1,
|
|
11372
11375
|
children: "Previous"
|
|
11373
11376
|
}
|
|
11374
11377
|
),
|
|
11375
11378
|
/* @__PURE__ */ i("span", { className: "cedros-tx-page-info", children: [
|
|
11376
11379
|
"Page ",
|
|
11377
|
-
|
|
11380
|
+
x,
|
|
11378
11381
|
" of ",
|
|
11379
|
-
|
|
11382
|
+
C
|
|
11380
11383
|
] }),
|
|
11381
11384
|
/* @__PURE__ */ e(
|
|
11382
11385
|
"button",
|
|
11383
11386
|
{
|
|
11384
11387
|
type: "button",
|
|
11385
11388
|
className: "cedros-tx-page-btn",
|
|
11386
|
-
onClick: () => S(
|
|
11387
|
-
disabled:
|
|
11389
|
+
onClick: () => S(x + 1),
|
|
11390
|
+
disabled: x >= C,
|
|
11388
11391
|
children: "Next"
|
|
11389
11392
|
}
|
|
11390
11393
|
)
|
|
@@ -11507,15 +11510,15 @@ function Ac({
|
|
|
11507
11510
|
onCancel: o,
|
|
11508
11511
|
className: a = ""
|
|
11509
11512
|
}) {
|
|
11510
|
-
const s = ve(), { withdrawSol: n, withdrawSpl: l, getBalances: c, isSubmitting: d, error: h, clearError: p } = Ps(), [m, f] = k("loading"), [w, g] = k([]), [u, y] = k(null), [v, b] = k(""), [
|
|
11511
|
-
if (!
|
|
11512
|
-
const I = `https://explorer.solana.com/tx/${
|
|
11513
|
+
const s = ve(), { withdrawSol: n, withdrawSpl: l, getBalances: c, isSubmitting: d, error: h, clearError: p } = Ps(), [m, f] = k("loading"), [w, g] = k([]), [u, y] = k(null), [v, b] = k(""), [N, E] = k(""), [L, A] = k(null), [C, x] = k(null), [S, B] = k(null), T = s?.config.solana?.network ?? "mainnet-beta", M = q(() => {
|
|
11514
|
+
if (!L?.txSignature) return "";
|
|
11515
|
+
const I = `https://explorer.solana.com/tx/${L.txSignature}`;
|
|
11513
11516
|
return T === "mainnet-beta" ? I : `${I}?cluster=${encodeURIComponent(T)}`;
|
|
11514
|
-
}, [
|
|
11515
|
-
if (!u || !
|
|
11516
|
-
const I = parseFloat(
|
|
11517
|
+
}, [L, T]), R = q(() => {
|
|
11518
|
+
if (!u || !N) return "0";
|
|
11519
|
+
const I = parseFloat(N);
|
|
11517
11520
|
return isNaN(I) || I <= 0 ? "0" : Math.floor(I * Math.pow(10, u.decimals)).toString();
|
|
11518
|
-
}, [
|
|
11521
|
+
}, [N, u]);
|
|
11519
11522
|
_(() => {
|
|
11520
11523
|
if (!s) return;
|
|
11521
11524
|
let I = !1;
|
|
@@ -11551,32 +11554,32 @@ function Ac({
|
|
|
11551
11554
|
}, [s, c]);
|
|
11552
11555
|
const D = P(
|
|
11553
11556
|
(I) => {
|
|
11554
|
-
y(I), f("form"), p(),
|
|
11557
|
+
y(I), f("form"), p(), x(null), E("");
|
|
11555
11558
|
},
|
|
11556
11559
|
[p]
|
|
11557
11560
|
), F = P(() => {
|
|
11558
11561
|
if (!u) return;
|
|
11559
11562
|
const I = Number(u.rawBalance) / Math.pow(10, u.decimals);
|
|
11560
|
-
u.mint === Bt ?
|
|
11563
|
+
u.mint === Bt ? E(String(Math.max(0, I - 0.01))) : E(String(I));
|
|
11561
11564
|
}, [u]), Z = P(() => {
|
|
11562
|
-
if (
|
|
11563
|
-
|
|
11565
|
+
if (x(null), !v.trim()) {
|
|
11566
|
+
x("Destination address is required");
|
|
11564
11567
|
return;
|
|
11565
11568
|
}
|
|
11566
11569
|
if (!Ci(v.trim())) {
|
|
11567
|
-
|
|
11570
|
+
x("Invalid Solana address");
|
|
11568
11571
|
return;
|
|
11569
11572
|
}
|
|
11570
|
-
if (!
|
|
11571
|
-
|
|
11573
|
+
if (!N || parseFloat(N) <= 0 || isNaN(parseFloat(N))) {
|
|
11574
|
+
x("Please enter a valid amount");
|
|
11572
11575
|
return;
|
|
11573
11576
|
}
|
|
11574
11577
|
if (R === "0") {
|
|
11575
|
-
|
|
11578
|
+
x("Amount is too small");
|
|
11576
11579
|
return;
|
|
11577
11580
|
}
|
|
11578
11581
|
f("confirm");
|
|
11579
|
-
}, [v,
|
|
11582
|
+
}, [v, N, R]), he = P(async () => {
|
|
11580
11583
|
if (u) {
|
|
11581
11584
|
f("processing"), p();
|
|
11582
11585
|
try {
|
|
@@ -11596,9 +11599,9 @@ function Ac({
|
|
|
11596
11599
|
t,
|
|
11597
11600
|
r
|
|
11598
11601
|
]), te = P(() => {
|
|
11599
|
-
p(),
|
|
11602
|
+
p(), x(null), m === "form" ? (f("select"), y(null), E(""), b("")) : m === "confirm" && f("form");
|
|
11600
11603
|
}, [m, p]), H = P(() => {
|
|
11601
|
-
f("select"), y(null), b(""),
|
|
11604
|
+
f("select"), y(null), b(""), E(""), A(null), p(), x(null);
|
|
11602
11605
|
}, [p]);
|
|
11603
11606
|
return s ? /* @__PURE__ */ i("div", { className: `cedros-withdrawal ${a}`, children: [
|
|
11604
11607
|
m === "loading" && /* @__PURE__ */ i("div", { className: "cedros-withdrawal-processing", children: [
|
|
@@ -11687,8 +11690,8 @@ function Ac({
|
|
|
11687
11690
|
type: "number",
|
|
11688
11691
|
className: "cedros-input",
|
|
11689
11692
|
placeholder: "0.00",
|
|
11690
|
-
value:
|
|
11691
|
-
onChange: (I) =>
|
|
11693
|
+
value: N,
|
|
11694
|
+
onChange: (I) => E(I.target.value),
|
|
11692
11695
|
min: "0",
|
|
11693
11696
|
step: "any"
|
|
11694
11697
|
}
|
|
@@ -11704,7 +11707,7 @@ function Ac({
|
|
|
11704
11707
|
)
|
|
11705
11708
|
] })
|
|
11706
11709
|
] }),
|
|
11707
|
-
(
|
|
11710
|
+
(C || h) && /* @__PURE__ */ e(ee, { error: C || h || "" }),
|
|
11708
11711
|
/* @__PURE__ */ e(
|
|
11709
11712
|
"button",
|
|
11710
11713
|
{
|
|
@@ -11783,7 +11786,7 @@ function Ac({
|
|
|
11783
11786
|
"..."
|
|
11784
11787
|
] })
|
|
11785
11788
|
] }),
|
|
11786
|
-
m === "success" &&
|
|
11789
|
+
m === "success" && L && /* @__PURE__ */ i("div", { className: "cedros-withdrawal-success", children: [
|
|
11787
11790
|
/* @__PURE__ */ e("div", { className: "cedros-withdrawal-success-icon", children: "✓" }),
|
|
11788
11791
|
/* @__PURE__ */ e("h3", { className: "cedros-withdrawal-title", children: "Withdrawal Complete" }),
|
|
11789
11792
|
/* @__PURE__ */ i("p", { className: "cedros-withdrawal-subtitle", children: [
|
|
@@ -11802,7 +11805,7 @@ function Ac({
|
|
|
11802
11805
|
href: M,
|
|
11803
11806
|
target: "_blank",
|
|
11804
11807
|
rel: "noreferrer",
|
|
11805
|
-
children: Rt(
|
|
11808
|
+
children: Rt(L.txSignature)
|
|
11806
11809
|
}
|
|
11807
11810
|
)
|
|
11808
11811
|
] }),
|
|
@@ -11852,10 +11855,10 @@ function vc({
|
|
|
11852
11855
|
const { getHistory: s, error: n, clearError: l } = Ps(), [c, d] = k([]), [h, p] = k(0), [m, f] = k(0), [w, g] = k(!1), [u, y] = k(null), v = P(async () => {
|
|
11853
11856
|
g(!0);
|
|
11854
11857
|
try {
|
|
11855
|
-
const
|
|
11856
|
-
d(
|
|
11857
|
-
} catch (
|
|
11858
|
-
y(
|
|
11858
|
+
const L = await s(t, m);
|
|
11859
|
+
d(L.items), p(L.total), y(null);
|
|
11860
|
+
} catch (L) {
|
|
11861
|
+
y(L instanceof Error ? L.message : "Failed to load withdrawal history");
|
|
11859
11862
|
} finally {
|
|
11860
11863
|
g(!1);
|
|
11861
11864
|
}
|
|
@@ -11863,8 +11866,8 @@ function vc({
|
|
|
11863
11866
|
_(() => {
|
|
11864
11867
|
v();
|
|
11865
11868
|
}, [v]);
|
|
11866
|
-
const b = Math.ceil(h / t),
|
|
11867
|
-
const A = (
|
|
11869
|
+
const b = Math.ceil(h / t), N = Math.floor(m / t) + 1, E = (L) => {
|
|
11870
|
+
const A = (L - 1) * t;
|
|
11868
11871
|
f(Math.max(0, Math.min(A, Math.max(0, h - 1))));
|
|
11869
11872
|
};
|
|
11870
11873
|
return u || n ? /* @__PURE__ */ i("div", { className: `cedros-withdrawal-history cedros-withdrawal-history-error ${r}`, children: [
|
|
@@ -11899,15 +11902,15 @@ function vc({
|
|
|
11899
11902
|
)
|
|
11900
11903
|
] }),
|
|
11901
11904
|
c.length === 0 ? /* @__PURE__ */ e("div", { className: "cedros-tx-empty", children: /* @__PURE__ */ e("p", { className: "cedros-tx-empty-message", children: "No withdrawal history yet." }) }) : /* @__PURE__ */ i(X, { children: [
|
|
11902
|
-
/* @__PURE__ */ e("div", { className: "cedros-tx-list", children: c.map((
|
|
11903
|
-
const A = Ei(
|
|
11905
|
+
/* @__PURE__ */ e("div", { className: "cedros-tx-list", children: c.map((L) => {
|
|
11906
|
+
const A = Ei(L.tokenType, L.tokenMint);
|
|
11904
11907
|
return /* @__PURE__ */ i(
|
|
11905
11908
|
"div",
|
|
11906
11909
|
{
|
|
11907
11910
|
className: "cedros-tx-item cedros-tx-item-negative",
|
|
11908
|
-
onClick: () => o?.(
|
|
11909
|
-
onKeyDown: (
|
|
11910
|
-
(
|
|
11911
|
+
onClick: () => o?.(L),
|
|
11912
|
+
onKeyDown: (C) => {
|
|
11913
|
+
(C.key === "Enter" || C.key === " ") && (C.preventDefault(), o?.(L));
|
|
11911
11914
|
},
|
|
11912
11915
|
role: o ? "button" : void 0,
|
|
11913
11916
|
tabIndex: o ? 0 : void 0,
|
|
@@ -11920,7 +11923,7 @@ function vc({
|
|
|
11920
11923
|
" Withdrawal"
|
|
11921
11924
|
] }),
|
|
11922
11925
|
/* @__PURE__ */ i("span", { className: "cedros-tx-amount cedros-tx-amount-negative", children: [
|
|
11923
|
-
|
|
11926
|
+
L.amount,
|
|
11924
11927
|
" ",
|
|
11925
11928
|
A === "SOL" ? "lamports" : ""
|
|
11926
11929
|
] })
|
|
@@ -11932,31 +11935,31 @@ function vc({
|
|
|
11932
11935
|
/* @__PURE__ */ e(
|
|
11933
11936
|
"a",
|
|
11934
11937
|
{
|
|
11935
|
-
href: `${a}/account/${
|
|
11938
|
+
href: `${a}/account/${L.destination}`,
|
|
11936
11939
|
target: "_blank",
|
|
11937
11940
|
rel: "noopener noreferrer",
|
|
11938
|
-
onClick: (
|
|
11939
|
-
children: Si(
|
|
11941
|
+
onClick: (C) => C.stopPropagation(),
|
|
11942
|
+
children: Si(L.destination)
|
|
11940
11943
|
}
|
|
11941
11944
|
),
|
|
11942
11945
|
" · ",
|
|
11943
11946
|
/* @__PURE__ */ e(
|
|
11944
11947
|
"a",
|
|
11945
11948
|
{
|
|
11946
|
-
href: `${a}/tx/${
|
|
11949
|
+
href: `${a}/tx/${L.txSignature}`,
|
|
11947
11950
|
target: "_blank",
|
|
11948
11951
|
rel: "noopener noreferrer",
|
|
11949
|
-
onClick: (
|
|
11952
|
+
onClick: (C) => C.stopPropagation(),
|
|
11950
11953
|
children: "tx"
|
|
11951
11954
|
}
|
|
11952
11955
|
)
|
|
11953
11956
|
] }),
|
|
11954
|
-
/* @__PURE__ */ e("span", { className: "cedros-tx-date", children: xi(
|
|
11957
|
+
/* @__PURE__ */ e("span", { className: "cedros-tx-date", children: xi(L.createdAt) })
|
|
11955
11958
|
] })
|
|
11956
11959
|
] })
|
|
11957
11960
|
]
|
|
11958
11961
|
},
|
|
11959
|
-
|
|
11962
|
+
L.id
|
|
11960
11963
|
);
|
|
11961
11964
|
}) }),
|
|
11962
11965
|
b > 1 && /* @__PURE__ */ i("div", { className: "cedros-tx-pagination", children: [
|
|
@@ -11965,14 +11968,14 @@ function vc({
|
|
|
11965
11968
|
{
|
|
11966
11969
|
type: "button",
|
|
11967
11970
|
className: "cedros-tx-page-btn",
|
|
11968
|
-
onClick: () => N
|
|
11969
|
-
disabled:
|
|
11971
|
+
onClick: () => E(N - 1),
|
|
11972
|
+
disabled: N <= 1,
|
|
11970
11973
|
children: "Previous"
|
|
11971
11974
|
}
|
|
11972
11975
|
),
|
|
11973
11976
|
/* @__PURE__ */ i("span", { className: "cedros-tx-page-info", children: [
|
|
11974
11977
|
"Page ",
|
|
11975
|
-
|
|
11978
|
+
N,
|
|
11976
11979
|
" of ",
|
|
11977
11980
|
b
|
|
11978
11981
|
] }),
|
|
@@ -11981,8 +11984,8 @@ function vc({
|
|
|
11981
11984
|
{
|
|
11982
11985
|
type: "button",
|
|
11983
11986
|
className: "cedros-tx-page-btn",
|
|
11984
|
-
onClick: () => N
|
|
11985
|
-
disabled:
|
|
11987
|
+
onClick: () => E(N + 1),
|
|
11988
|
+
disabled: N >= b,
|
|
11986
11989
|
children: "Next"
|
|
11987
11990
|
}
|
|
11988
11991
|
)
|