@cedros/login-react 0.0.9 → 0.0.11

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.
Files changed (52) hide show
  1. package/dist/{AuthenticationSettings-BxpBLsUX.cjs → AuthenticationSettings-D8oXHkM6.cjs} +1 -1
  2. package/dist/{AuthenticationSettings-BxpBLsUX.cjs.map → AuthenticationSettings-D8oXHkM6.cjs.map} +1 -1
  3. package/dist/{AuthenticationSettings-eTN4qtHV.js → AuthenticationSettings-DlVILxY4.js} +1 -1
  4. package/dist/{AuthenticationSettings-eTN4qtHV.js.map → AuthenticationSettings-DlVILxY4.js.map} +1 -1
  5. package/dist/{CreditSystemSettings-D7avf3PS.js → CreditSystemSettings-Bv6u9lTs.js} +1 -1
  6. package/dist/{CreditSystemSettings-D7avf3PS.js.map → CreditSystemSettings-Bv6u9lTs.js.map} +1 -1
  7. package/dist/{CreditSystemSettings-BuBKDfKL.cjs → CreditSystemSettings-D45pwDZM.cjs} +1 -1
  8. package/dist/{CreditSystemSettings-BuBKDfKL.cjs.map → CreditSystemSettings-D45pwDZM.cjs.map} +1 -1
  9. package/dist/{DepositsSection-Db4irTZb.js → DepositsSection-BH5K162Q.js} +1 -1
  10. package/dist/{DepositsSection-Db4irTZb.js.map → DepositsSection-BH5K162Q.js.map} +1 -1
  11. package/dist/{DepositsSection-DEh9Oy0V.cjs → DepositsSection-DpRn0koq.cjs} +1 -1
  12. package/dist/{DepositsSection-DEh9Oy0V.cjs.map → DepositsSection-DpRn0koq.cjs.map} +1 -1
  13. package/dist/{EmailSettings-CGocWYc0.cjs → EmailSettings-DdjoMO_c.cjs} +1 -1
  14. package/dist/{EmailSettings-CGocWYc0.cjs.map → EmailSettings-DdjoMO_c.cjs.map} +1 -1
  15. package/dist/{EmailSettings-sN1OCw50.js → EmailSettings-khmiWqhx.js} +1 -1
  16. package/dist/{EmailSettings-sN1OCw50.js.map → EmailSettings-khmiWqhx.js.map} +1 -1
  17. package/dist/{EmbeddedWalletSettings-qpRuCk4R.js → EmbeddedWalletSettings-Bff6raAT.js} +1 -1
  18. package/dist/{EmbeddedWalletSettings-qpRuCk4R.js.map → EmbeddedWalletSettings-Bff6raAT.js.map} +1 -1
  19. package/dist/{EmbeddedWalletSettings-NZfbc5K8.cjs → EmbeddedWalletSettings-C5qkJtAr.cjs} +1 -1
  20. package/dist/{EmbeddedWalletSettings-NZfbc5K8.cjs.map → EmbeddedWalletSettings-C5qkJtAr.cjs.map} +1 -1
  21. package/dist/{ServerSettings-Bkr_xuDx.cjs → ServerSettings-BpZhkxh6.cjs} +1 -1
  22. package/dist/{ServerSettings-Bkr_xuDx.cjs.map → ServerSettings-BpZhkxh6.cjs.map} +1 -1
  23. package/dist/{ServerSettings-CQn3-uuP.js → ServerSettings-UIVR0R4l.js} +1 -1
  24. package/dist/{ServerSettings-CQn3-uuP.js.map → ServerSettings-UIVR0R4l.js.map} +1 -1
  25. package/dist/TeamSection-BoGqQhD5.cjs +1 -0
  26. package/dist/TeamSection-BoGqQhD5.cjs.map +1 -0
  27. package/dist/{TeamSection-DNozLdU4.js → TeamSection-DnJudC38.js} +58 -62
  28. package/dist/TeamSection-DnJudC38.js.map +1 -0
  29. package/dist/{UsersSection-DDfHW_ao.cjs → UsersSection-Ce7xVKfp.cjs} +1 -1
  30. package/dist/{UsersSection-DDfHW_ao.cjs.map → UsersSection-Ce7xVKfp.cjs.map} +1 -1
  31. package/dist/{UsersSection-DlfHGrJK.js → UsersSection-mOOjcUEv.js} +1 -1
  32. package/dist/{UsersSection-DlfHGrJK.js.map → UsersSection-mOOjcUEv.js.map} +1 -1
  33. package/dist/{WebhookSettings-9dcnVNH_.cjs → WebhookSettings-Cx-BxzNQ.cjs} +1 -1
  34. package/dist/{WebhookSettings-9dcnVNH_.cjs.map → WebhookSettings-Cx-BxzNQ.cjs.map} +1 -1
  35. package/dist/{WebhookSettings-Cx30aHt_.js → WebhookSettings-D0i0JhQD.js} +1 -1
  36. package/dist/{WebhookSettings-Cx30aHt_.js.map → WebhookSettings-D0i0JhQD.js.map} +1 -1
  37. package/dist/{WithdrawalsSection-ouu6VoQA.js → WithdrawalsSection-Grebjjks.js} +1 -1
  38. package/dist/{WithdrawalsSection-ouu6VoQA.js.map → WithdrawalsSection-Grebjjks.js.map} +1 -1
  39. package/dist/{WithdrawalsSection-MFj2muP6.cjs → WithdrawalsSection-igRQJfjj.cjs} +1 -1
  40. package/dist/{WithdrawalsSection-MFj2muP6.cjs.map → WithdrawalsSection-igRQJfjj.cjs.map} +1 -1
  41. package/dist/{index-Djb8LQZ6.js → index-BI9Bj9DF.js} +1018 -1009
  42. package/dist/index-BI9Bj9DF.js.map +1 -0
  43. package/dist/{index-CCOKNxfU.cjs → index-CDRTfEJz.cjs} +12 -12
  44. package/dist/index-CDRTfEJz.cjs.map +1 -0
  45. package/dist/index.cjs +1 -1
  46. package/dist/index.js +1 -1
  47. package/package.json +1 -1
  48. package/dist/TeamSection-DNozLdU4.js.map +0 -1
  49. package/dist/TeamSection-W9SC2Keh.cjs +0 -1
  50. package/dist/TeamSection-W9SC2Keh.cjs.map +0 -1
  51. package/dist/index-CCOKNxfU.cjs.map +0 -1
  52. package/dist/index-Djb8LQZ6.js.map +0 -1
@@ -2375,47 +2375,47 @@ function xc({
2375
2375
  menuItems: n = [],
2376
2376
  hideSignOut: o = !1
2377
2377
  }) {
2378
- const { user: c, isAuthenticated: l, isLoading: d, openLoginModal: u, logout: g } = mr(), [m, h] = N(!1), [y, f] = N(-1), p = z(null), v = z(null), k = O(
2378
+ const { user: c, isAuthenticated: l, isLoading: d, openLoginModal: u, logout: g } = mr(), [m, h] = N(!1), [y, f] = N(-1), p = z(null), v = z(null), A = O(
2379
2379
  () => [...n, ...o ? [] : [{ label: "Sign out", onClick: g }]],
2380
2380
  [n, o, g]
2381
2381
  );
2382
2382
  U(() => {
2383
2383
  if (!m) return;
2384
- const w = (M) => {
2385
- p.current && !p.current.contains(M.target) && (h(!1), f(-1));
2386
- }, L = (M) => {
2387
- M.key === "Escape" && (h(!1), f(-1), v.current?.focus());
2384
+ const w = (x) => {
2385
+ p.current && !p.current.contains(x.target) && (h(!1), f(-1));
2386
+ }, P = (x) => {
2387
+ x.key === "Escape" && (h(!1), f(-1), v.current?.focus());
2388
2388
  };
2389
- return document.addEventListener("mousedown", w), document.addEventListener("keydown", L), () => {
2390
- document.removeEventListener("mousedown", w), document.removeEventListener("keydown", L);
2389
+ return document.addEventListener("mousedown", w), document.addEventListener("keydown", P), () => {
2390
+ document.removeEventListener("mousedown", w), document.removeEventListener("keydown", P);
2391
2391
  };
2392
2392
  }, [m]);
2393
2393
  const b = C(
2394
2394
  (w) => {
2395
- if (!(!m || k.length === 0))
2395
+ if (!(!m || A.length === 0))
2396
2396
  switch (w.key) {
2397
2397
  case "ArrowDown":
2398
- w.preventDefault(), f((L) => (L + 1) % k.length);
2398
+ w.preventDefault(), f((P) => (P + 1) % A.length);
2399
2399
  break;
2400
2400
  case "ArrowUp":
2401
- w.preventDefault(), f((L) => (L - 1 + k.length) % k.length);
2401
+ w.preventDefault(), f((P) => (P - 1 + A.length) % A.length);
2402
2402
  break;
2403
2403
  case "Home":
2404
2404
  w.preventDefault(), f(0);
2405
2405
  break;
2406
2406
  case "End":
2407
- w.preventDefault(), f(k.length - 1);
2407
+ w.preventDefault(), f(A.length - 1);
2408
2408
  break;
2409
2409
  case "Enter":
2410
2410
  case " ":
2411
- y >= 0 && (w.preventDefault(), k[y].onClick(), h(!1), f(-1));
2411
+ y >= 0 && (w.preventDefault(), A[y].onClick(), h(!1), f(-1));
2412
2412
  break;
2413
2413
  }
2414
2414
  },
2415
- [m, y, k]
2415
+ [m, y, A]
2416
2416
  ), _ = C(() => {
2417
- k.length !== 0 && (h((w) => !w), f(-1));
2418
- }, [k.length]), A = {
2417
+ A.length !== 0 && (h((w) => !w), f(-1));
2418
+ }, [A.length]), k = {
2419
2419
  sm: "cedros-button-sm",
2420
2420
  md: "cedros-button-md",
2421
2421
  lg: "cedros-button-lg"
@@ -2429,13 +2429,13 @@ function xc({
2429
2429
  "button",
2430
2430
  {
2431
2431
  type: "button",
2432
- className: `cedros-button ${E[s]} ${A[r]} ${t}`,
2432
+ className: `cedros-button ${E[s]} ${k[r]} ${t}`,
2433
2433
  disabled: !0,
2434
2434
  children: /* @__PURE__ */ e(G, { size: "sm" })
2435
2435
  }
2436
2436
  );
2437
2437
  if (l && c) {
2438
- const w = c.name || c.email || "User", L = ss(c.picture);
2438
+ const w = c.name || c.email || "User", P = ss(c.picture);
2439
2439
  return (
2440
2440
  // L-08: Added keyboard handler and ref for accessibility
2441
2441
  /* @__PURE__ */ i("div", { className: "cedros-user-menu", ref: p, onKeyDown: b, children: [
@@ -2444,16 +2444,16 @@ function xc({
2444
2444
  {
2445
2445
  ref: v,
2446
2446
  type: "button",
2447
- className: `cedros-button cedros-user-button ${A[r]} ${t}`,
2447
+ className: `cedros-button cedros-user-button ${k[r]} ${t}`,
2448
2448
  "aria-haspopup": "menu",
2449
2449
  "aria-expanded": m,
2450
2450
  "aria-label": `User menu for ${w}`,
2451
2451
  onClick: _,
2452
2452
  children: [
2453
- L ? /* @__PURE__ */ e(
2453
+ P ? /* @__PURE__ */ e(
2454
2454
  "img",
2455
2455
  {
2456
- src: L,
2456
+ src: P,
2457
2457
  alt: w,
2458
2458
  className: "cedros-user-avatar",
2459
2459
  referrerPolicy: "no-referrer",
@@ -2465,22 +2465,22 @@ function xc({
2465
2465
  }
2466
2466
  ),
2467
2467
  m && /* @__PURE__ */ i("div", { className: "cedros-dropdown cedros-dropdown-open", role: "menu", children: [
2468
- n.map((M, D) => /* @__PURE__ */ i(
2468
+ n.map((x, M) => /* @__PURE__ */ i(
2469
2469
  "button",
2470
2470
  {
2471
2471
  type: "button",
2472
- className: `cedros-dropdown-item ${y === D ? "cedros-dropdown-item-focused" : ""}`,
2472
+ className: `cedros-dropdown-item ${y === M ? "cedros-dropdown-item-focused" : ""}`,
2473
2473
  role: "menuitem",
2474
- tabIndex: y === D ? 0 : -1,
2474
+ tabIndex: y === M ? 0 : -1,
2475
2475
  onClick: () => {
2476
- M.onClick(), h(!1);
2476
+ x.onClick(), h(!1);
2477
2477
  },
2478
2478
  children: [
2479
- M.icon && /* @__PURE__ */ e("span", { className: "cedros-dropdown-icon", children: M.icon }),
2480
- M.label
2479
+ x.icon && /* @__PURE__ */ e("span", { className: "cedros-dropdown-icon", children: x.icon }),
2480
+ x.label
2481
2481
  ]
2482
2482
  },
2483
- D
2483
+ M
2484
2484
  )),
2485
2485
  n.length > 0 && !o && /* @__PURE__ */ e("div", { className: "cedros-dropdown-divider", role: "separator" }),
2486
2486
  !o && /* @__PURE__ */ e(
@@ -2504,7 +2504,7 @@ function xc({
2504
2504
  "button",
2505
2505
  {
2506
2506
  type: "button",
2507
- className: `cedros-button ${E[s]} ${A[r]} ${t}`,
2507
+ className: `cedros-button ${E[s]} ${k[r]} ${t}`,
2508
2508
  onClick: u,
2509
2509
  children: a || "Sign in"
2510
2510
  }
@@ -2556,8 +2556,8 @@ function Fr() {
2556
2556
  try {
2557
2557
  await l.post("/reset-password", { token: f, newPassword: p }), n(!0);
2558
2558
  } catch (v) {
2559
- const k = B(v, "Failed to reset password");
2560
- throw c(k), k;
2559
+ const A = B(v, "Failed to reset password");
2560
+ throw c(A), A;
2561
2561
  } finally {
2562
2562
  r(!1);
2563
2563
  }
@@ -3107,16 +3107,16 @@ const ze = ["login", "register"];
3107
3107
  function as({ onSuccess: t, className: s = "", defaultTab: r = "login" }) {
3108
3108
  const { config: a } = ae(), [n, o] = N(r), [c, l] = N("form"), [d, u] = N(() => bs()), [g] = N(() => Br());
3109
3109
  U(() => {
3110
- const A = () => u(bs());
3111
- return A(), window.addEventListener("load", A), window.addEventListener("focus", A), () => {
3112
- window.removeEventListener("load", A), window.removeEventListener("focus", A);
3110
+ const k = () => u(bs());
3111
+ return k(), window.addEventListener("load", k), window.addEventListener("focus", k), () => {
3112
+ window.removeEventListener("load", k), window.removeEventListener("focus", k);
3113
3113
  };
3114
3114
  }, []);
3115
3115
  const m = a.forms?.forgotPassword?.mode ?? "reset", h = C(
3116
- (A) => {
3116
+ (k) => {
3117
3117
  const E = ze.indexOf(n);
3118
3118
  let w = E;
3119
- switch (A.key) {
3119
+ switch (k.key) {
3120
3120
  case "ArrowLeft":
3121
3121
  case "ArrowUp":
3122
3122
  w = E === 0 ? ze.length - 1 : E - 1;
@@ -3134,9 +3134,9 @@ function as({ onSuccess: t, className: s = "", defaultTab: r = "login" }) {
3134
3134
  default:
3135
3135
  return;
3136
3136
  }
3137
- A.preventDefault();
3138
- const L = ze[w];
3139
- o(L), document.getElementById(`cedros-tab-${L}`)?.focus();
3137
+ k.preventDefault();
3138
+ const P = ze[w];
3139
+ o(P), document.getElementById(`cedros-tab-${P}`)?.focus();
3140
3140
  },
3141
3141
  [n]
3142
3142
  ), y = a.features ?? {
@@ -3145,13 +3145,13 @@ function as({ onSuccess: t, className: s = "", defaultTab: r = "login" }) {
3145
3145
  apple: !0,
3146
3146
  solana: !0,
3147
3147
  webauthn: !0
3148
- }, f = y.email !== !1, p = y.google !== !1 && a.googleClientId, v = y.apple !== !1 && a.appleClientId && g, k = y.solana !== !1 && d, b = y.webauthn !== !1, _ = f && (p || v || k || b);
3148
+ }, f = y.email !== !1, p = y.google !== !1 && a.googleClientId, v = y.apple !== !1 && a.appleClientId && g, A = y.solana !== !1 && d, b = y.webauthn !== !1, _ = f && (p || v || A || b);
3149
3149
  return c === "forgotPassword" ? /* @__PURE__ */ e("div", { className: `cedros-login-form ${s}`, children: /* @__PURE__ */ e(ra, { onCancel: () => l("form") }) }) : /* @__PURE__ */ i("div", { className: `cedros-login-form ${s}`, children: [
3150
- (b || p || v || k) && /* @__PURE__ */ i("div", { className: "cedros-social-buttons", children: [
3150
+ (b || p || v || A) && /* @__PURE__ */ i("div", { className: "cedros-social-buttons", children: [
3151
3151
  b && /* @__PURE__ */ e(ha, { onSuccess: t }),
3152
3152
  p && /* @__PURE__ */ e(Mn, { onSuccess: t }),
3153
3153
  v && /* @__PURE__ */ e(oa, { onSuccess: t }),
3154
- k && /* @__PURE__ */ e(Dn, { onSuccess: t })
3154
+ A && /* @__PURE__ */ e(Dn, { onSuccess: t })
3155
3155
  ] }),
3156
3156
  _ && /* @__PURE__ */ e("div", { className: "cedros-divider", children: /* @__PURE__ */ e("span", { children: "Or continue with" }) }),
3157
3157
  f && /* @__PURE__ */ i(K, { children: [
@@ -3351,7 +3351,7 @@ function Dc({
3351
3351
  onLoginClick: r,
3352
3352
  className: a = ""
3353
3353
  }) {
3354
- const [n, o] = N(""), [c, l] = N(""), [d, u] = N(null), { resetPassword: g, isLoading: m, isSuccess: h, error: y, clearError: f } = Fr(), p = n === c, v = d?.isValid && p && n.length > 0, k = async (b) => {
3354
+ const [n, o] = N(""), [c, l] = N(""), [d, u] = N(null), { resetPassword: g, isLoading: m, isSuccess: h, error: y, clearError: f } = Fr(), p = n === c, v = d?.isValid && p && n.length > 0, A = async (b) => {
3355
3355
  if (b.preventDefault(), !!v)
3356
3356
  try {
3357
3357
  await g(t, n), s?.();
@@ -3394,7 +3394,7 @@ function Dc({
3394
3394
  children: "Go to login"
3395
3395
  }
3396
3396
  )
3397
- ] }) : /* @__PURE__ */ i("form", { className: `cedros-reset-password-form ${a}`, onSubmit: k, children: [
3397
+ ] }) : /* @__PURE__ */ i("form", { className: `cedros-reset-password-form ${a}`, onSubmit: A, children: [
3398
3398
  /* @__PURE__ */ i("div", { className: "cedros-form-header", children: [
3399
3399
  /* @__PURE__ */ e("h3", { className: "cedros-form-title", children: "Reset your password" }),
3400
3400
  /* @__PURE__ */ e("p", { className: "cedros-form-subtitle", children: "Enter your new password below." })
@@ -3851,9 +3851,9 @@ function Na({
3851
3851
  return;
3852
3852
  }
3853
3853
  if (v.key === "Tab" && g.current) {
3854
- const k = g.current.querySelectorAll(
3854
+ const A = g.current.querySelectorAll(
3855
3855
  'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'
3856
- ), b = k[0], _ = k[k.length - 1];
3856
+ ), b = A[0], _ = A[A.length - 1];
3857
3857
  v.shiftKey ? document.activeElement === b && (v.preventDefault(), _?.focus()) : document.activeElement === _ && (v.preventDefault(), b?.focus());
3858
3858
  }
3859
3859
  };
@@ -3928,17 +3928,17 @@ function Sa({
3928
3928
  u === p ? h(m === "asc" ? "desc" : "asc") : (g(p), h("asc"));
3929
3929
  }, f = O(() => {
3930
3930
  const p = { owner: 0, admin: 1, member: 2 };
3931
- return [...t].sort((v, k) => {
3931
+ return [...t].sort((v, A) => {
3932
3932
  let b, _;
3933
3933
  switch (u) {
3934
3934
  case "name":
3935
- b = (v.user.name || v.user.email || "").toLowerCase(), _ = (k.user.name || k.user.email || "").toLowerCase();
3935
+ b = (v.user.name || v.user.email || "").toLowerCase(), _ = (A.user.name || A.user.email || "").toLowerCase();
3936
3936
  break;
3937
3937
  case "role":
3938
- b = p[v.role] ?? 99, _ = p[k.role] ?? 99;
3938
+ b = p[v.role] ?? 99, _ = p[A.role] ?? 99;
3939
3939
  break;
3940
3940
  case "joinedAt":
3941
- b = new Date(v.joinedAt).getTime(), _ = new Date(k.joinedAt).getTime();
3941
+ b = new Date(v.joinedAt).getTime(), _ = new Date(A.joinedAt).getTime();
3942
3942
  break;
3943
3943
  default:
3944
3944
  return 0;
@@ -4111,8 +4111,8 @@ function La({
4111
4111
  p.current = !1, f.current !== null && (window.clearTimeout(f.current), f.current = null);
4112
4112
  }), []);
4113
4113
  const v = C(
4114
- async (k) => {
4115
- k.preventDefault(), m(null), y(!1);
4114
+ async (A) => {
4115
+ A.preventDefault(), m(null), y(!1);
4116
4116
  const b = c.trim();
4117
4117
  if (!b) {
4118
4118
  m("Email is required");
@@ -4147,7 +4147,7 @@ function La({
4147
4147
  type: "email",
4148
4148
  className: "cedros-form-input",
4149
4149
  value: c,
4150
- onChange: (k) => l(k.target.value),
4150
+ onChange: (A) => l(A.target.value),
4151
4151
  placeholder: "colleague@example.com",
4152
4152
  disabled: s,
4153
4153
  autoComplete: "email"
@@ -4162,9 +4162,9 @@ function La({
4162
4162
  id: "invite-role",
4163
4163
  className: "cedros-form-select",
4164
4164
  value: d,
4165
- onChange: (k) => u(k.target.value),
4165
+ onChange: (A) => u(A.target.value),
4166
4166
  disabled: s,
4167
- children: a.map((k) => /* @__PURE__ */ e("option", { value: k, children: k.charAt(0).toUpperCase() + k.slice(1) }, k))
4167
+ children: a.map((A) => /* @__PURE__ */ e("option", { value: A, children: A.charAt(0).toUpperCase() + A.slice(1) }, A))
4168
4168
  }
4169
4169
  )
4170
4170
  ] }),
@@ -4566,11 +4566,11 @@ function Wa({
4566
4566
  className: n = ""
4567
4567
  }) {
4568
4568
  const [o, c] = N(Array(fe).fill("")), [l, d] = N(null), [u, g] = N([]), [m, h] = N(null), y = Ar(), f = z(null), p = C(
4569
- (w, L) => {
4570
- const M = [...o];
4571
- if (M[w] = L.toLowerCase().trim(), c(M), L.length > 0) {
4572
- const D = ea(L, 5);
4573
- g(D);
4569
+ (w, P) => {
4570
+ const x = [...o];
4571
+ if (x[w] = P.toLowerCase().trim(), c(x), P.length > 0) {
4572
+ const M = ea(P, 5);
4573
+ g(M);
4574
4574
  } else
4575
4575
  g([]);
4576
4576
  h(null);
@@ -4578,10 +4578,10 @@ function Wa({
4578
4578
  [o]
4579
4579
  ), v = C((w) => {
4580
4580
  d(w), g([]);
4581
- }, []), k = C(
4581
+ }, []), A = C(
4582
4582
  (w) => {
4583
- const L = o[w];
4584
- L && !et(L) && h(`Word ${w + 1} is not in the wordlist`), f.current !== null && window.clearTimeout(f.current), f.current = window.setTimeout(() => {
4583
+ const P = o[w];
4584
+ P && !et(P) && h(`Word ${w + 1} is not in the wordlist`), f.current !== null && window.clearTimeout(f.current), f.current = window.setTimeout(() => {
4585
4585
  l === w && g([]);
4586
4586
  }, 200);
4587
4587
  },
@@ -4593,25 +4593,25 @@ function Wa({
4593
4593
  const b = C(
4594
4594
  (w) => {
4595
4595
  if (l !== null) {
4596
- const L = [...o];
4597
- L[l] = w, c(L), g([]), document.querySelector(
4596
+ const P = [...o];
4597
+ P[l] = w, c(P), g([]), document.querySelector(
4598
4598
  `[data-word-index="${l + 1}"]`
4599
4599
  )?.focus();
4600
4600
  }
4601
4601
  },
4602
4602
  [l, o]
4603
4603
  ), _ = C((w) => {
4604
- const L = w.clipboardData.getData("text"), M = sa(L);
4605
- M.length === fe && (w.preventDefault(), c(M), h(null));
4606
- }, []), A = C(
4604
+ const P = w.clipboardData.getData("text"), x = sa(P);
4605
+ x.length === fe && (w.preventDefault(), c(x), h(null));
4606
+ }, []), k = C(
4607
4607
  (w) => {
4608
- if (w.preventDefault(), o.filter((D) => !D).length > 0) {
4608
+ if (w.preventDefault(), o.filter((M) => !M).length > 0) {
4609
4609
  h(`Please enter all ${fe} words`);
4610
4610
  return;
4611
4611
  }
4612
- const M = o.map((D, x) => ({ word: D, index: x + 1 })).filter(({ word: D }) => !et(D));
4613
- if (M.length > 0) {
4614
- h(`Invalid words: ${M.map((D) => `#${D.index}`).join(", ")}`);
4612
+ const x = o.map((M, D) => ({ word: M, index: D + 1 })).filter(({ word: M }) => !et(M));
4613
+ if (x.length > 0) {
4614
+ h(`Invalid words: ${x.map((M) => `#${M.index}`).join(", ")}`);
4615
4615
  return;
4616
4616
  }
4617
4617
  if (!Ur(o)) {
@@ -4626,36 +4626,36 @@ function Wa({
4626
4626
  "form",
4627
4627
  {
4628
4628
  className: `cedros-recovery-phrase-input ${n}`,
4629
- onSubmit: A,
4629
+ onSubmit: k,
4630
4630
  onPaste: _,
4631
4631
  children: [
4632
4632
  /* @__PURE__ */ i("div", { className: "cedros-recovery-input-header", children: [
4633
4633
  /* @__PURE__ */ e("h3", { className: "cedros-recovery-input-title", children: "Enter Recovery Phrase" }),
4634
4634
  /* @__PURE__ */ e("p", { className: "cedros-recovery-input-description", children: "Enter your 12-word recovery phrase. You can paste the entire phrase at once." })
4635
4635
  ] }),
4636
- /* @__PURE__ */ e("div", { className: "cedros-word-inputs", children: Array.from({ length: fe }, (w, L) => /* @__PURE__ */ i("div", { className: "cedros-word-input-wrapper", children: [
4636
+ /* @__PURE__ */ e("div", { className: "cedros-word-inputs", children: Array.from({ length: fe }, (w, P) => /* @__PURE__ */ i("div", { className: "cedros-word-input-wrapper", children: [
4637
4637
  /* @__PURE__ */ i("label", { className: "cedros-word-label", children: [
4638
- L + 1,
4638
+ P + 1,
4639
4639
  "."
4640
4640
  ] }),
4641
4641
  /* @__PURE__ */ e(
4642
4642
  "input",
4643
4643
  {
4644
4644
  type: "text",
4645
- className: `cedros-word-input ${o[L] && !et(o[L]) ? "cedros-word-invalid" : o[L] && et(o[L]) ? "cedros-word-valid" : ""}`,
4646
- value: o[L],
4647
- onChange: (M) => p(L, M.target.value),
4648
- onFocus: () => v(L),
4649
- onBlur: () => k(L),
4650
- "data-word-index": L,
4645
+ className: `cedros-word-input ${o[P] && !et(o[P]) ? "cedros-word-invalid" : o[P] && et(o[P]) ? "cedros-word-valid" : ""}`,
4646
+ value: o[P],
4647
+ onChange: (x) => p(P, x.target.value),
4648
+ onFocus: () => v(P),
4649
+ onBlur: () => A(P),
4650
+ "data-word-index": P,
4651
4651
  autoComplete: "off",
4652
4652
  autoCapitalize: "none",
4653
4653
  spellCheck: !1,
4654
4654
  disabled: r,
4655
- "aria-label": `Word ${L + 1}`
4655
+ "aria-label": `Word ${P + 1}`
4656
4656
  }
4657
4657
  )
4658
- ] }, L)) }),
4658
+ ] }, P)) }),
4659
4659
  l !== null && u.length > 0 && /* @__PURE__ */ e("div", { className: "cedros-suggestions", role: "listbox", id: `${y}-suggestions`, children: u.map((w) => /* @__PURE__ */ e(
4660
4660
  "button",
4661
4661
  {
@@ -4833,37 +4833,37 @@ function Ha() {
4833
4833
  d();
4834
4834
  }, [d]);
4835
4835
  const u = C(
4836
- async (f, p, v, k) => {
4836
+ async (f, p, v, A) => {
4837
4837
  n({ step: "generating_seed" });
4838
4838
  const b = kn();
4839
4839
  l.current.push(b), n({ step: "splitting_shares" });
4840
- const { shareA: _, shareB: A, shareC: E } = Cr(b);
4841
- l.current.push(_, A, E), n({ step: "encrypting_shares" });
4842
- const w = await fr(_, gr(p)), L = Er(b), M = Tr(L);
4840
+ const { shareA: _, shareB: k, shareC: E } = Cr(b);
4841
+ l.current.push(_, k, E), n({ step: "encrypting_shares" });
4842
+ const w = await fr(_, gr(p)), P = Er(b), x = Tr(P);
4843
4843
  n({ step: "uploading" });
4844
- const D = {
4845
- solanaPubkey: M,
4844
+ const M = {
4845
+ solanaPubkey: x,
4846
4846
  shareAAuthMethod: f,
4847
4847
  shareACiphertext: w.ciphertext,
4848
4848
  shareANonce: w.nonce,
4849
4849
  // Share B is now plaintext (SSS math protects it)
4850
- shareB: ke(A)
4850
+ shareB: ke(k)
4851
4851
  };
4852
4852
  if (f === "password") {
4853
4853
  if (!v) throw new Error("KDF salt required for password method");
4854
- D.shareAKdfSalt = ke(v), D.shareAKdfParams = it;
4854
+ M.shareAKdfSalt = ke(v), M.shareAKdfParams = it;
4855
4855
  }
4856
- if (f === "passkey" && k && (D.prfSalt = k), await s(D), r === "none")
4856
+ if (f === "passkey" && A && (M.prfSalt = A), await s(M), r === "none")
4857
4857
  d(), n({
4858
4858
  step: "complete",
4859
- solanaPubkey: M
4859
+ solanaPubkey: x
4860
4860
  });
4861
4861
  else {
4862
- const x = r === "full_seed" ? Xn(b) : Yn(ot(E));
4862
+ const D = r === "full_seed" ? Xn(b) : Yn(ot(E));
4863
4863
  n({
4864
4864
  step: "showing_recovery",
4865
- recoveryPhrase: x,
4866
- solanaPubkey: M
4865
+ recoveryPhrase: D,
4866
+ solanaPubkey: x
4867
4867
  });
4868
4868
  }
4869
4869
  },
@@ -4899,10 +4899,10 @@ function Ha() {
4899
4899
  n({ step: "registering_passkey" });
4900
4900
  let v;
4901
4901
  try {
4902
- const b = new TextEncoder().encode(t.id), _ = t.name ?? t.email ?? "User", A = t.email ?? t.id;
4902
+ const b = new TextEncoder().encode(t.id), _ = t.name ?? t.email ?? "User", k = t.email ?? t.id;
4903
4903
  v = (await Nn(
4904
4904
  b,
4905
- A,
4905
+ k,
4906
4906
  _,
4907
4907
  f
4908
4908
  )).prfOutput;
@@ -4912,8 +4912,8 @@ function Ha() {
4912
4912
  v = (await es(p)).prfOutput;
4913
4913
  }
4914
4914
  l.current.push(v);
4915
- const k = await wr(v, f);
4916
- l.current.push(k), await u("passkey", k, void 0, p);
4915
+ const A = await wr(v, f);
4916
+ l.current.push(A), await u("passkey", A, void 0, p);
4917
4917
  } catch (f) {
4918
4918
  n({
4919
4919
  step: "error",
@@ -4953,13 +4953,13 @@ function Qa({
4953
4953
  confirmRecoveryPhrase: d,
4954
4954
  cancel: u,
4955
4955
  isEnrolling: g
4956
- } = Ha(), m = () => a || "password", [h, y] = N(m), [f, p] = N(""), [v, k] = N(""), [b, _] = N(null);
4956
+ } = Ha(), m = () => a || "password", [h, y] = N(m), [f, p] = N(""), [v, A] = N(""), [b, _] = N(null);
4957
4957
  U(() => {
4958
4958
  y(m());
4959
4959
  }, [n?.id, a]);
4960
- const A = C(
4961
- async (M) => {
4962
- if (M.preventDefault(), f !== v) {
4960
+ const k = C(
4961
+ async (x) => {
4962
+ if (x.preventDefault(), f !== v) {
4963
4963
  _("Passwords do not match");
4964
4964
  return;
4965
4965
  }
@@ -4974,7 +4974,7 @@ function Qa({
4974
4974
  await l();
4975
4975
  }, [l]), w = C(() => {
4976
4976
  d(), o.solanaPubkey && t?.(o.solanaPubkey);
4977
- }, [d, o.solanaPubkey, t]), L = C(() => {
4977
+ }, [d, o.solanaPubkey, t]), P = C(() => {
4978
4978
  u(), s?.();
4979
4979
  }, [u, s]);
4980
4980
  return o.step === "generating_seed" || o.step === "splitting_shares" ? /* @__PURE__ */ e("div", { className: `cedros-wallet-enrollment ${r}`, "aria-busy": "true", children: /* @__PURE__ */ i("div", { className: "cedros-enrollment-progress", role: "status", "aria-live": "polite", children: [
@@ -5080,7 +5080,7 @@ function Qa({
5080
5080
  {
5081
5081
  type: "button",
5082
5082
  className: "cedros-button cedros-button-secondary",
5083
- onClick: L,
5083
+ onClick: P,
5084
5084
  children: "Cancel"
5085
5085
  }
5086
5086
  ),
@@ -5133,13 +5133,13 @@ function Qa({
5133
5133
  /* @__PURE__ */ e("span", { children: "Passkey" })
5134
5134
  ] })
5135
5135
  ] }),
5136
- h === "password" && /* @__PURE__ */ i("form", { onSubmit: A, className: "cedros-enrollment-form", children: [
5136
+ h === "password" && /* @__PURE__ */ i("form", { onSubmit: k, className: "cedros-enrollment-form", children: [
5137
5137
  /* @__PURE__ */ e(
5138
5138
  Ne,
5139
5139
  {
5140
5140
  label: "Password",
5141
5141
  value: f,
5142
- onChange: (M) => p(M.target.value),
5142
+ onChange: (x) => p(x.target.value),
5143
5143
  showStrengthMeter: !0,
5144
5144
  disabled: g,
5145
5145
  required: !0,
@@ -5152,7 +5152,7 @@ function Qa({
5152
5152
  {
5153
5153
  label: "Confirm Password",
5154
5154
  value: v,
5155
- onChange: (M) => k(M.target.value),
5155
+ onChange: (x) => A(x.target.value),
5156
5156
  error: b ?? void 0,
5157
5157
  disabled: g,
5158
5158
  required: !0,
@@ -5167,7 +5167,7 @@ function Qa({
5167
5167
  {
5168
5168
  type: "button",
5169
5169
  className: "cedros-button cedros-button-secondary",
5170
- onClick: L,
5170
+ onClick: P,
5171
5171
  disabled: g,
5172
5172
  children: "Cancel"
5173
5173
  }
@@ -5221,7 +5221,7 @@ function Qa({
5221
5221
  {
5222
5222
  type: "button",
5223
5223
  className: "cedros-button cedros-button-secondary",
5224
- onClick: L,
5224
+ onClick: P,
5225
5225
  disabled: g,
5226
5226
  children: "Cancel"
5227
5227
  }
@@ -5428,21 +5428,21 @@ function eo({
5428
5428
  className: n = ""
5429
5429
  }) {
5430
5430
  ae();
5431
- const { unlock: o, getMaterial: c, isLoading: l } = Qe(), { getPasskeyCredential: d, isAuthenticating: u } = Ga(), [g, m] = N("idle"), [h, y] = N(a ?? null), [f, p] = N(""), [v, k] = N(null);
5431
+ const { unlock: o, getMaterial: c, isLoading: l } = Qe(), { getPasskeyCredential: d, isAuthenticating: u } = Ga(), [g, m] = N("idle"), [h, y] = N(a ?? null), [f, p] = N(""), [v, A] = N(null);
5432
5432
  U(() => {
5433
5433
  a !== void 0 && y(a);
5434
5434
  }, [a]);
5435
- const b = h === "password", _ = h === "passkey", A = C(async () => {
5436
- if (m("credential"), k(null), !h)
5435
+ const b = h === "password", _ = h === "passkey", k = C(async () => {
5436
+ if (m("credential"), A(null), !h)
5437
5437
  try {
5438
- const T = await c();
5439
- T ? y(T.shareAAuthMethod) : (k("No wallet enrolled"), m("error"));
5440
- } catch (T) {
5441
- k(T instanceof Error ? T.message : "Failed to get wallet info"), m("error");
5438
+ const L = await c();
5439
+ L ? y(L.shareAAuthMethod) : (A("No wallet enrolled"), m("error"));
5440
+ } catch (L) {
5441
+ A(L instanceof Error ? L.message : "Failed to get wallet info"), m("error");
5442
5442
  }
5443
5443
  }, [h, c]), E = C(
5444
- async (T) => {
5445
- T.preventDefault(), k(null), m("unlocking");
5444
+ async (L) => {
5445
+ L.preventDefault(), A(null), m("unlocking");
5446
5446
  try {
5447
5447
  let S;
5448
5448
  if (b)
@@ -5451,27 +5451,27 @@ function eo({
5451
5451
  throw new Error("Invalid auth method");
5452
5452
  await o(S), m("unlocked"), t?.();
5453
5453
  } catch (S) {
5454
- k(S instanceof Error ? S.message : "Failed to unlock wallet"), m("error");
5454
+ A(S instanceof Error ? S.message : "Failed to unlock wallet"), m("error");
5455
5455
  }
5456
5456
  },
5457
5457
  [b, f, o, t]
5458
5458
  ), w = C(async () => {
5459
- k(null), m("unlocking");
5459
+ A(null), m("unlocking");
5460
5460
  try {
5461
- const T = await d();
5462
- if (!T) {
5461
+ const L = await d();
5462
+ if (!L) {
5463
5463
  m("credential");
5464
5464
  return;
5465
5465
  }
5466
- await o(T), m("unlocked"), t?.();
5467
- } catch (T) {
5468
- k(T instanceof Error ? T.message : "Failed to unlock wallet"), m("error");
5466
+ await o(L), m("unlocked"), t?.();
5467
+ } catch (L) {
5468
+ A(L instanceof Error ? L.message : "Failed to unlock wallet"), m("error");
5469
5469
  }
5470
- }, [d, o, t]), L = C(() => {
5471
- p(""), m("idle"), k(null), s?.();
5472
- }, [s]), M = C(() => {
5473
- p(""), m("credential"), k(null);
5474
- }, []), D = l || u, x = () => {
5470
+ }, [d, o, t]), P = C(() => {
5471
+ p(""), m("idle"), A(null), s?.();
5472
+ }, [s]), x = C(() => {
5473
+ p(""), m("credential"), A(null);
5474
+ }, []), M = l || u, D = () => {
5475
5475
  switch (g) {
5476
5476
  case "idle":
5477
5477
  return /* @__PURE__ */ i("div", { className: "cedros-wallet-unlock-idle", children: [
@@ -5483,7 +5483,7 @@ function eo({
5483
5483
  {
5484
5484
  type: "button",
5485
5485
  className: "cedros-button cedros-button-primary",
5486
- onClick: A,
5486
+ onClick: k,
5487
5487
  children: "Unlock Wallet"
5488
5488
  }
5489
5489
  )
@@ -5497,8 +5497,8 @@ function eo({
5497
5497
  {
5498
5498
  label: "Password",
5499
5499
  value: f,
5500
- onChange: (T) => p(T.target.value),
5501
- disabled: D,
5500
+ onChange: (L) => p(L.target.value),
5501
+ disabled: M,
5502
5502
  autoComplete: "current-password",
5503
5503
  error: v ?? void 0
5504
5504
  }
@@ -5509,8 +5509,8 @@ function eo({
5509
5509
  {
5510
5510
  type: "submit",
5511
5511
  className: "cedros-button cedros-button-primary",
5512
- disabled: D || f.length === 0,
5513
- children: D ? "Unlocking..." : "Unlock"
5512
+ disabled: M || f.length === 0,
5513
+ children: M ? "Unlocking..." : "Unlock"
5514
5514
  }
5515
5515
  ),
5516
5516
  r && /* @__PURE__ */ e(
@@ -5518,8 +5518,8 @@ function eo({
5518
5518
  {
5519
5519
  type: "button",
5520
5520
  className: "cedros-button cedros-button-secondary",
5521
- onClick: L,
5522
- disabled: D,
5521
+ onClick: P,
5522
+ disabled: M,
5523
5523
  children: "Cancel"
5524
5524
  }
5525
5525
  )
@@ -5531,11 +5531,11 @@ function eo({
5531
5531
  Ya,
5532
5532
  {
5533
5533
  mode: "authenticate",
5534
- isLoading: D,
5534
+ isLoading: M,
5535
5535
  error: v ?? void 0,
5536
5536
  onPrompt: w,
5537
5537
  onRetry: w,
5538
- onCancel: r ? L : void 0
5538
+ onCancel: r ? P : void 0
5539
5539
  }
5540
5540
  )
5541
5541
  ] }) : /* @__PURE__ */ i("div", { className: "cedros-wallet-unlock-loading", children: [
@@ -5565,7 +5565,7 @@ function eo({
5565
5565
  {
5566
5566
  type: "button",
5567
5567
  className: "cedros-button cedros-button-primary",
5568
- onClick: M,
5568
+ onClick: x,
5569
5569
  children: "Try Again"
5570
5570
  }
5571
5571
  ),
@@ -5574,7 +5574,7 @@ function eo({
5574
5574
  {
5575
5575
  type: "button",
5576
5576
  className: "cedros-button cedros-button-secondary",
5577
- onClick: L,
5577
+ onClick: P,
5578
5578
  children: "Cancel"
5579
5579
  }
5580
5580
  )
@@ -5582,7 +5582,7 @@ function eo({
5582
5582
  ] });
5583
5583
  }
5584
5584
  };
5585
- return /* @__PURE__ */ e("div", { className: `cedros-wallet-unlock ${n}`, children: x() });
5585
+ return /* @__PURE__ */ e("div", { className: `cedros-wallet-unlock ${n}`, children: D() });
5586
5586
  }
5587
5587
  function to() {
5588
5588
  return /* @__PURE__ */ i("svg", { width: "48", height: "48", viewBox: "0 0 48 48", fill: "none", "aria-hidden": "true", children: [
@@ -5668,32 +5668,32 @@ function no() {
5668
5668
  throw new Error("Invalid recovery phrase. Please check your words.");
5669
5669
  let f;
5670
5670
  if (r === "share_c_only") {
5671
- const M = Jn(m);
5672
- l.current.push(M);
5673
- const D = ke(M), x = await s({ shareC: D }), T = vr(x.shareB);
5674
- l.current.push(T), f = Un(ot(T), ot(M)), l.current.push(f);
5671
+ const x = Jn(m);
5672
+ l.current.push(x);
5673
+ const M = ke(x), D = await s({ shareC: M }), L = vr(D.shareB);
5674
+ l.current.push(L), f = Un(ot(L), ot(x)), l.current.push(f);
5675
5675
  } else
5676
5676
  f = Zn(m), l.current.push(f);
5677
- const p = Er(f), v = Tr(p), { shareA: k, shareB: b } = Cr(f);
5678
- l.current.push(k, b), n({ step: "encrypting" });
5679
- let _, A, E;
5677
+ const p = Er(f), v = Tr(p), { shareA: A, shareB: b } = Cr(f);
5678
+ l.current.push(A, b), n({ step: "encrypting" });
5679
+ let _, k, E;
5680
5680
  if (h === "passkey") {
5681
- const M = br();
5682
- E = ke(M);
5683
- const D = await es(E);
5684
- l.current.push(D.prfOutput), _ = await wr(D.prfOutput, M), l.current.push(_);
5681
+ const x = br();
5682
+ E = ke(x);
5683
+ const M = await es(E);
5684
+ l.current.push(M.prfOutput), _ = await wr(M.prfOutput, x), l.current.push(_);
5685
5685
  } else
5686
- A = yr(), _ = await Pr(y, A, it), l.current.push(_);
5687
- const w = await fr(k, gr(_));
5686
+ k = yr(), _ = await Pr(y, k, it), l.current.push(_);
5687
+ const w = await fr(A, gr(_));
5688
5688
  n({ step: "uploading" });
5689
- const L = {
5689
+ const P = {
5690
5690
  solanaPubkey: v,
5691
5691
  shareAAuthMethod: h,
5692
5692
  shareACiphertext: w.ciphertext,
5693
5693
  shareANonce: w.nonce,
5694
5694
  shareB: ke(b)
5695
5695
  };
5696
- h === "password" && (L.shareAKdfSalt = ke(A), L.shareAKdfParams = it), h === "passkey" && (L.prfSalt = E), await t(L), d(), n({ step: "complete" });
5696
+ h === "password" && (P.shareAKdfSalt = ke(k), P.shareAKdfParams = it), h === "passkey" && (P.prfSalt = E), await t(P), d(), n({ step: "complete" });
5697
5697
  } catch (f) {
5698
5698
  d(), n({
5699
5699
  step: "error",
@@ -5720,11 +5720,11 @@ function ao({
5720
5720
  className: r = "",
5721
5721
  defaultAuthMethod: a = "password"
5722
5722
  }) {
5723
- const { state: n, startRecovery: o, cancel: c, isRecovering: l } = no(), [d, u] = N([]), [g, m] = N(!1), [h, y] = N(a), [f, p] = N(""), [v, k] = N(""), [b, _] = N(null), A = C((D) => {
5724
- u(D), m(!0);
5723
+ const { state: n, startRecovery: o, cancel: c, isRecovering: l } = no(), [d, u] = N([]), [g, m] = N(!1), [h, y] = N(a), [f, p] = N(""), [v, A] = N(""), [b, _] = N(null), k = C((M) => {
5724
+ u(M), m(!0);
5725
5725
  }, []), E = C(
5726
- async (D) => {
5727
- if (D.preventDefault(), _(null), h !== "passkey") {
5726
+ async (M) => {
5727
+ if (M.preventDefault(), _(null), h !== "passkey") {
5728
5728
  if (f !== v) {
5729
5729
  _("Passwords do not match");
5730
5730
  return;
@@ -5738,10 +5738,10 @@ function ao({
5738
5738
  },
5739
5739
  [d, h, f, v, o]
5740
5740
  ), w = C(() => {
5741
- c(), u([]), m(!1), p(""), k(""), s?.();
5742
- }, [c, s]), L = C(() => {
5743
- m(!1), p(""), k("");
5744
- }, []), M = C(() => {
5741
+ c(), u([]), m(!1), p(""), A(""), s?.();
5742
+ }, [c, s]), P = C(() => {
5743
+ m(!1), p(""), A("");
5744
+ }, []), x = C(() => {
5745
5745
  t?.();
5746
5746
  }, [t]);
5747
5747
  return n.step === "validating" || n.step === "encrypting" || n.step === "uploading" ? /* @__PURE__ */ e("div", { className: `cedros-wallet-recovery ${r}`, children: /* @__PURE__ */ i("div", { className: "cedros-wallet-recovery-progress", children: [
@@ -5770,7 +5770,7 @@ function ao({
5770
5770
  {
5771
5771
  type: "button",
5772
5772
  className: "cedros-button cedros-button-primary",
5773
- onClick: M,
5773
+ onClick: x,
5774
5774
  children: "Done"
5775
5775
  }
5776
5776
  ) })
@@ -5832,7 +5832,7 @@ function ao({
5832
5832
  type: "password",
5833
5833
  className: "cedros-input",
5834
5834
  value: f,
5835
- onChange: (D) => p(D.target.value),
5835
+ onChange: (M) => p(M.target.value),
5836
5836
  disabled: l,
5837
5837
  minLength: 8,
5838
5838
  placeholder: "Enter a strong password"
@@ -5848,7 +5848,7 @@ function ao({
5848
5848
  type: "password",
5849
5849
  className: "cedros-input",
5850
5850
  value: v,
5851
- onChange: (D) => k(D.target.value),
5851
+ onChange: (M) => A(M.target.value),
5852
5852
  disabled: l,
5853
5853
  "aria-invalid": b ? "true" : void 0,
5854
5854
  placeholder: "Confirm your password"
@@ -5867,7 +5867,7 @@ function ao({
5867
5867
  {
5868
5868
  type: "button",
5869
5869
  className: "cedros-button cedros-button-secondary",
5870
- onClick: L,
5870
+ onClick: P,
5871
5871
  disabled: l,
5872
5872
  children: "Back"
5873
5873
  }
@@ -5890,7 +5890,7 @@ function ao({
5890
5890
  /* @__PURE__ */ e(
5891
5891
  Wa,
5892
5892
  {
5893
- onSubmit: A,
5893
+ onSubmit: k,
5894
5894
  onCancel: w,
5895
5895
  isSubmitting: !1
5896
5896
  }
@@ -6012,7 +6012,7 @@ function uo({
6012
6012
  const c = Fe(), [l, d] = N(!1), [u, g] = N(null), [m, h] = N(!1), y = z(null), f = c?.config.solana?.network ?? "mainnet-beta", p = O(() => {
6013
6013
  const _ = `https://explorer.solana.com/address/${t}`;
6014
6014
  return f === "mainnet-beta" ? _ : `${_}?cluster=${encodeURIComponent(f)}`;
6015
- }, [t, f]), v = n && t.length > 18, k = O(() => !v || m ? t : `${t.slice(0, 8)}...${t.slice(-8)}`, [t, v, m]), b = C(async () => {
6015
+ }, [t, f]), v = n && t.length > 18, A = O(() => !v || m ? t : `${t.slice(0, 8)}...${t.slice(-8)}`, [t, v, m]), b = C(async () => {
6016
6016
  try {
6017
6017
  g(null), await navigator.clipboard.writeText(t), d(!0), y.current !== null && window.clearTimeout(y.current), y.current = window.setTimeout(() => {
6018
6018
  d(!1), y.current = null;
@@ -6121,7 +6121,7 @@ function uo({
6121
6121
  )
6122
6122
  ] })
6123
6123
  ] }),
6124
- /* @__PURE__ */ e("code", { className: "cedros-wallet-status-pubkey-value", title: t, children: k }),
6124
+ /* @__PURE__ */ e("code", { className: "cedros-wallet-status-pubkey-value", title: t, children: A }),
6125
6125
  u && /* @__PURE__ */ e("p", { className: "cedros-input-hint", role: "status", children: u })
6126
6126
  ] });
6127
6127
  }
@@ -6498,24 +6498,24 @@ function gt() {
6498
6498
  return;
6499
6499
  }
6500
6500
  c(!0), g(null);
6501
- const k = ++m.current;
6501
+ const A = ++m.current;
6502
6502
  try {
6503
6503
  const b = await y.current.getSettings();
6504
- if (k !== m.current) return;
6504
+ if (A !== m.current) return;
6505
6505
  n(b.settings);
6506
6506
  } catch (b) {
6507
- if (k !== m.current) return;
6507
+ if (A !== m.current) return;
6508
6508
  g(b instanceof Error ? b : new Error("Failed to fetch settings"));
6509
6509
  } finally {
6510
- k === m.current && c(!1);
6510
+ A === m.current && c(!1);
6511
6511
  }
6512
6512
  }, [s]), p = C(
6513
- async (k) => {
6513
+ async (A) => {
6514
6514
  if (s !== "authenticated")
6515
6515
  throw new Error("Not authenticated");
6516
6516
  d(!0), g(null);
6517
6517
  try {
6518
- await y.current.updateSettings(k), await f();
6518
+ await y.current.updateSettings(A), await f();
6519
6519
  } catch (b) {
6520
6520
  const _ = b instanceof Error ? b : new Error("Failed to update settings");
6521
6521
  throw g(_), _;
@@ -6525,9 +6525,9 @@ function gt() {
6525
6525
  },
6526
6526
  [s, f]
6527
6527
  ), v = C(
6528
- (k) => {
6528
+ (A) => {
6529
6529
  for (const b of Object.values(a)) {
6530
- const _ = b.find((A) => A.key === k);
6530
+ const _ = b.find((k) => k.key === A);
6531
6531
  if (_) return _.value;
6532
6532
  }
6533
6533
  },
@@ -7170,11 +7170,11 @@ function Oc({
7170
7170
  }
7171
7171
  }, [y]);
7172
7172
  const p = C((E, w) => {
7173
- g((L) => ({ ...L, [E]: w })), h(null), f(!1);
7173
+ g((P) => ({ ...P, [E]: w })), h(null), f(!1);
7174
7174
  }, []), v = C(async () => {
7175
- const E = Object.entries(u).map(([w, L]) => ({
7175
+ const E = Object.entries(u).map(([w, P]) => ({
7176
7176
  key: w,
7177
- value: L
7177
+ value: P
7178
7178
  }));
7179
7179
  if (E.length !== 0)
7180
7180
  try {
@@ -7182,7 +7182,7 @@ function Oc({
7182
7182
  } catch (w) {
7183
7183
  h(w instanceof Error ? w.message : "Failed to save settings");
7184
7184
  }
7185
- }, [u, d, r]), k = C(() => {
7185
+ }, [u, d, r]), A = C(() => {
7186
7186
  g({}), h(null), f(!1);
7187
7187
  }, []), b = Object.keys(u).length > 0, _ = Object.keys(u).length;
7188
7188
  if (n && Object.keys(a).length === 0)
@@ -7192,11 +7192,11 @@ function Oc({
7192
7192
  ] });
7193
7193
  if (c)
7194
7194
  return /* @__PURE__ */ e("div", { className: `cedros-system-settings ${s}`, children: /* @__PURE__ */ e(re, { error: c.message }) });
7195
- const A = Object.keys(a).sort();
7196
- return A.length === 0 ? /* @__PURE__ */ e("div", { className: `cedros-system-settings cedros-system-settings-empty ${s}`, children: /* @__PURE__ */ e("p", { children: "No system settings found." }) }) : /* @__PURE__ */ i("div", { className: `cedros-system-settings ${s}`, children: [
7195
+ const k = Object.keys(a).sort();
7196
+ return k.length === 0 ? /* @__PURE__ */ e("div", { className: `cedros-system-settings cedros-system-settings-empty ${s}`, children: /* @__PURE__ */ e("p", { children: "No system settings found." }) }) : /* @__PURE__ */ i("div", { className: `cedros-system-settings ${s}`, children: [
7197
7197
  m && /* @__PURE__ */ e(re, { error: m }),
7198
7198
  y && /* @__PURE__ */ e("div", { className: "cedros-settings-success", children: "Settings saved successfully." }),
7199
- A.map((E) => /* @__PURE__ */ e(
7199
+ k.map((E) => /* @__PURE__ */ e(
7200
7200
  Ao,
7201
7201
  {
7202
7202
  category: E,
@@ -7218,7 +7218,7 @@ function Oc({
7218
7218
  {
7219
7219
  type: "button",
7220
7220
  className: "cedros-button cedros-button-secondary",
7221
- onClick: k,
7221
+ onClick: A,
7222
7222
  disabled: !b || o,
7223
7223
  children: "Reset"
7224
7224
  }
@@ -7840,16 +7840,16 @@ function Ro({ onComplete: t, className: s = "" }) {
7840
7840
  c();
7841
7841
  }, [c]);
7842
7842
  const f = C(
7843
- (v) => (k) => {
7844
- u((b) => ({ ...b, [v]: k.target.value })), m((b) => ({ ...b, [v]: void 0 }));
7843
+ (v) => (A) => {
7844
+ u((b) => ({ ...b, [v]: A.target.value })), m((b) => ({ ...b, [v]: void 0 }));
7845
7845
  },
7846
7846
  []
7847
7847
  ), p = C(
7848
7848
  async (v) => {
7849
7849
  v.preventDefault();
7850
- const k = Do(d);
7851
- if (Object.keys(k).length > 0) {
7852
- m(k);
7850
+ const A = Do(d);
7851
+ if (Object.keys(A).length > 0) {
7852
+ m(A);
7853
7853
  return;
7854
7854
  }
7855
7855
  try {
@@ -8052,24 +8052,24 @@ function Oe() {
8052
8052
  m.current && clearTimeout(m.current), h.current && clearTimeout(h.current);
8053
8053
  }, []);
8054
8054
  const f = C(async () => {
8055
- const k = { ...y.current };
8056
- if (Object.keys(k).length === 0) {
8055
+ const A = { ...y.current };
8056
+ if (Object.keys(A).length === 0) {
8057
8057
  d("idle");
8058
8058
  return;
8059
8059
  }
8060
8060
  d("saving"), g(null);
8061
- const b = Object.entries(k).map(([_, A]) => ({
8061
+ const b = Object.entries(A).map(([_, k]) => ({
8062
8062
  key: _,
8063
- value: A
8063
+ value: k
8064
8064
  }));
8065
8065
  try {
8066
8066
  await n(b), c((_) => {
8067
- const A = { ..._ };
8068
- for (const E of Object.keys(k))
8069
- delete A[E];
8070
- return A;
8067
+ const k = { ..._ };
8068
+ for (const E of Object.keys(A))
8069
+ delete k[E];
8070
+ return k;
8071
8071
  });
8072
- for (const _ of Object.keys(k))
8072
+ for (const _ of Object.keys(A))
8073
8073
  delete y.current[_];
8074
8074
  d("saved"), h.current && clearTimeout(h.current), h.current = setTimeout(() => {
8075
8075
  d("idle");
@@ -8078,17 +8078,17 @@ function Oe() {
8078
8078
  d("error"), g(_ instanceof Error ? _.message : "Failed to save");
8079
8079
  }
8080
8080
  }, [n]), p = C(
8081
- (k, b) => {
8082
- c((_) => ({ ..._, [k]: b })), y.current[k] = b, g(null), d("pending"), m.current && clearTimeout(m.current), m.current = setTimeout(() => {
8081
+ (A, b) => {
8082
+ c((_) => ({ ..._, [A]: b })), y.current[A] = b, g(null), d("pending"), m.current && clearTimeout(m.current), m.current = setTimeout(() => {
8083
8083
  f();
8084
8084
  }, Io);
8085
8085
  },
8086
8086
  [f]
8087
8087
  ), v = C(
8088
- (k) => {
8089
- if (o[k] !== void 0) return o[k];
8088
+ (A) => {
8089
+ if (o[A] !== void 0) return o[A];
8090
8090
  for (const b of Object.values(t)) {
8091
- const _ = b.find((A) => A.key === k);
8091
+ const _ = b.find((k) => k.key === A);
8092
8092
  if (_) return _.value;
8093
8093
  }
8094
8094
  return "";
@@ -9586,20 +9586,20 @@ function Go() {
9586
9586
  ...b ? { Authorization: `Bearer ${b}` } : {}
9587
9587
  };
9588
9588
  }, []), y = C(
9589
- async (b, _ = 50, A = 0) => {
9589
+ async (b, _ = 50, k = 0) => {
9590
9590
  u(!0), m(null);
9591
9591
  try {
9592
9592
  const E = new URLSearchParams();
9593
- b && E.set("org_id", b), E.set("limit", String(_)), E.set("offset", String(A));
9593
+ b && E.set("org_id", b), E.set("limit", String(_)), E.set("offset", String(k));
9594
9594
  const w = await fetch(`${r}/admin/sso-providers?${E}`, {
9595
9595
  headers: h()
9596
9596
  });
9597
9597
  if (!w.ok) {
9598
- const M = await w.json().catch(() => ({}));
9599
- throw new Error(M.error || `Failed to fetch SSO providers: ${w.status}`);
9598
+ const x = await w.json().catch(() => ({}));
9599
+ throw new Error(x.error || `Failed to fetch SSO providers: ${w.status}`);
9600
9600
  }
9601
- const L = await w.json();
9602
- return o(L.providers), l(L.total), L;
9601
+ const P = await w.json();
9602
+ return o(P.providers), l(P.total), P;
9603
9603
  } catch (E) {
9604
9604
  const w = E instanceof Error ? E : new Error(String(E));
9605
9605
  throw m(w), w;
@@ -9621,11 +9621,11 @@ function Go() {
9621
9621
  const E = await _.json().catch(() => ({}));
9622
9622
  throw new Error(E.error || `Failed to create SSO provider: ${_.status}`);
9623
9623
  }
9624
- const A = await _.json();
9625
- return o((E) => [...E, A]), l((E) => E + 1), A;
9624
+ const k = await _.json();
9625
+ return o((E) => [...E, k]), l((E) => E + 1), k;
9626
9626
  } catch (_) {
9627
- const A = _ instanceof Error ? _ : new Error(String(_));
9628
- throw m(A), A;
9627
+ const k = _ instanceof Error ? _ : new Error(String(_));
9628
+ throw m(k), k;
9629
9629
  } finally {
9630
9630
  u(!1);
9631
9631
  }
@@ -9635,19 +9635,19 @@ function Go() {
9635
9635
  async (b, _) => {
9636
9636
  u(!0), m(null);
9637
9637
  try {
9638
- const A = await fetch(`${r}/admin/sso-providers/${b}`, {
9638
+ const k = await fetch(`${r}/admin/sso-providers/${b}`, {
9639
9639
  method: "PUT",
9640
9640
  headers: h(),
9641
9641
  body: JSON.stringify(_)
9642
9642
  });
9643
- if (!A.ok) {
9644
- const w = await A.json().catch(() => ({}));
9645
- throw new Error(w.error || `Failed to update SSO provider: ${A.status}`);
9643
+ if (!k.ok) {
9644
+ const w = await k.json().catch(() => ({}));
9645
+ throw new Error(w.error || `Failed to update SSO provider: ${k.status}`);
9646
9646
  }
9647
- const E = await A.json();
9648
- return o((w) => w.map((L) => L.id === b ? E : L)), E;
9649
- } catch (A) {
9650
- const E = A instanceof Error ? A : new Error(String(A));
9647
+ const E = await k.json();
9648
+ return o((w) => w.map((P) => P.id === b ? E : P)), E;
9649
+ } catch (k) {
9650
+ const E = k instanceof Error ? k : new Error(String(k));
9651
9651
  throw m(E), E;
9652
9652
  } finally {
9653
9653
  u(!1);
@@ -9663,19 +9663,19 @@ function Go() {
9663
9663
  headers: h()
9664
9664
  });
9665
9665
  if (!_.ok) {
9666
- const A = await _.json().catch(() => ({}));
9667
- throw new Error(A.error || `Failed to delete SSO provider: ${_.status}`);
9666
+ const k = await _.json().catch(() => ({}));
9667
+ throw new Error(k.error || `Failed to delete SSO provider: ${_.status}`);
9668
9668
  }
9669
- o((A) => A.filter((E) => E.id !== b)), l((A) => A - 1);
9669
+ o((k) => k.filter((E) => E.id !== b)), l((k) => k - 1);
9670
9670
  } catch (_) {
9671
- const A = _ instanceof Error ? _ : new Error(String(_));
9672
- throw m(A), A;
9671
+ const k = _ instanceof Error ? _ : new Error(String(_));
9672
+ throw m(k), k;
9673
9673
  } finally {
9674
9674
  u(!1);
9675
9675
  }
9676
9676
  },
9677
9677
  [r, h]
9678
- ), k = C(
9678
+ ), A = C(
9679
9679
  async (b, _) => p(b, { enabled: _ }),
9680
9680
  [p]
9681
9681
  );
@@ -9688,7 +9688,7 @@ function Go() {
9688
9688
  createProvider: f,
9689
9689
  updateProvider: p,
9690
9690
  deleteProvider: v,
9691
- toggleProvider: k
9691
+ toggleProvider: A
9692
9692
  };
9693
9693
  }
9694
9694
  class Vr {
@@ -9788,7 +9788,7 @@ function _s(t, s) {
9788
9788
  }
9789
9789
  }
9790
9790
  function is() {
9791
- const { config: t, user: s, authState: r, _internal: a } = ae(), n = typeof window < "u" && !!window.localStorage, [o, c] = N([]), [l, d] = N(null), [u, g] = N([]), [m, h] = N(null), [y, f] = N(!1), [p, v] = N(null), k = O(
9791
+ const { config: t, user: s, authState: r, _internal: a } = ae(), n = typeof window < "u" && !!window.localStorage, [o, c] = N([]), [l, d] = N(null), [u, g] = N([]), [m, h] = N(null), [y, f] = N(r === "authenticated"), [p, v] = N(null), A = O(
9792
9792
  () => new Vr(
9793
9793
  t.serverUrl,
9794
9794
  t.requestTimeout,
@@ -9796,84 +9796,93 @@ function is() {
9796
9796
  a?.getAccessToken
9797
9797
  ),
9798
9798
  [t.serverUrl, t.requestTimeout, t.retryAttempts, a]
9799
- ), b = z(k);
9799
+ ), b = z(A);
9800
9800
  U(() => {
9801
- b.current = k;
9802
- }, [k]);
9803
- const _ = C(async (x) => {
9801
+ b.current = A;
9802
+ }, [A]);
9803
+ const _ = C(async (S) => {
9804
9804
  try {
9805
- const T = await b.current.getPermissions(x);
9805
+ const T = await b.current.getPermissions(S);
9806
9806
  g(T.permissions), h(T.role);
9807
9807
  } catch {
9808
9808
  g([]), h(null);
9809
9809
  }
9810
- }, []), A = C(async () => {
9810
+ }, []), k = z(async () => {
9811
+ }), E = C(async () => {
9811
9812
  if (r !== "authenticated" || !s) {
9812
9813
  c([]), d(null), g([]), h(null);
9813
9814
  return;
9814
9815
  }
9815
9816
  f(!0), v(null);
9816
9817
  try {
9817
- const x = await b.current.listOrgs();
9818
- c(x);
9818
+ const S = await b.current.listOrgs();
9819
+ c(S);
9819
9820
  const T = n ? Yo(_t) : null;
9820
- let S = x.find((P) => P.id === T);
9821
- !S && x.length > 0 && (S = x.find((P) => P.isPersonal) || x[0]), S ? (d(S), n && _s(_t, S.id), await _(S.id)) : (d(null), g([]), h(null));
9822
- } catch (x) {
9823
- v(x);
9821
+ let R = S.find((I) => I.id === T);
9822
+ !R && S.length > 0 && (R = S.find((I) => I.isPersonal) || S[0]), R ? (d(R), n && _s(_t, R.id), await _(R.id)) : (d(null), g([]), h(null));
9823
+ } catch (S) {
9824
+ v(S);
9824
9825
  } finally {
9825
9826
  f(!1);
9826
9827
  }
9827
- }, [r, s, _, n]), E = C(
9828
- async (x) => {
9829
- const T = o.find((S) => S.id === x);
9828
+ }, [r, s, _, n]);
9829
+ U(() => {
9830
+ k.current = E;
9831
+ }, [E]);
9832
+ const w = z(!1);
9833
+ U(() => {
9834
+ r === "authenticated" && !w.current ? (w.current = !0, k.current()) : r !== "authenticated" && (w.current = !1);
9835
+ }, [r]);
9836
+ const P = C(
9837
+ async (S) => {
9838
+ const T = o.find((R) => R.id === S);
9830
9839
  if (!T) {
9831
9840
  v({ code: "UNKNOWN_ERROR", message: "Organization not found" });
9832
9841
  return;
9833
9842
  }
9834
- d(T), n && _s(_t, x), await _(x);
9843
+ d(T), n && _s(_t, S), await _(S);
9835
9844
  },
9836
9845
  [o, _, n]
9837
- ), w = C(
9838
- async (x) => {
9846
+ ), x = C(
9847
+ async (S) => {
9839
9848
  f(!0), v(null);
9840
9849
  try {
9841
- const T = await b.current.createOrg(x);
9842
- return await A(), T;
9850
+ const T = await b.current.createOrg(S);
9851
+ return await E(), T;
9843
9852
  } catch (T) {
9844
9853
  throw v(T), T;
9845
9854
  } finally {
9846
9855
  f(!1);
9847
9856
  }
9848
9857
  },
9849
- [A]
9850
- ), L = C(
9851
- async (x, T) => {
9858
+ [E]
9859
+ ), M = C(
9860
+ async (S, T) => {
9852
9861
  f(!0), v(null);
9853
9862
  try {
9854
- const S = await b.current.updateOrg(x, T);
9855
- return await A(), S;
9856
- } catch (S) {
9857
- throw v(S), S;
9863
+ const R = await b.current.updateOrg(S, T);
9864
+ return await E(), R;
9865
+ } catch (R) {
9866
+ throw v(R), R;
9858
9867
  } finally {
9859
9868
  f(!1);
9860
9869
  }
9861
9870
  },
9862
- [A]
9863
- ), M = C(
9864
- async (x) => {
9871
+ [E]
9872
+ ), D = C(
9873
+ async (S) => {
9865
9874
  f(!0), v(null);
9866
9875
  try {
9867
- await b.current.deleteOrg(x), await A();
9876
+ await b.current.deleteOrg(S), await E();
9868
9877
  } catch (T) {
9869
9878
  throw v(T), T;
9870
9879
  } finally {
9871
9880
  f(!1);
9872
9881
  }
9873
9882
  },
9874
- [A]
9875
- ), D = C(
9876
- (x) => u.includes(x),
9883
+ [E]
9884
+ ), L = C(
9885
+ (S) => u.includes(S),
9877
9886
  [u]
9878
9887
  );
9879
9888
  return {
@@ -9883,12 +9892,12 @@ function is() {
9883
9892
  role: m,
9884
9893
  isLoading: y,
9885
9894
  error: p,
9886
- fetchOrgs: A,
9887
- switchOrg: E,
9888
- createOrg: w,
9889
- updateOrg: L,
9890
- deleteOrg: M,
9891
- hasPermission: D
9895
+ fetchOrgs: E,
9896
+ switchOrg: P,
9897
+ createOrg: x,
9898
+ updateOrg: M,
9899
+ deleteOrg: D,
9900
+ hasPermission: L
9892
9901
  };
9893
9902
  }
9894
9903
  function Jo({ className: t }) {
@@ -9907,7 +9916,7 @@ function Jo({ className: t }) {
9907
9916
  }, [n, u?.id]);
9908
9917
  const v = () => {
9909
9918
  y(null), p(null), m("add");
9910
- }, k = (w) => {
9919
+ }, A = (w) => {
9911
9920
  y(w), p(null), m("edit");
9912
9921
  }, b = () => {
9913
9922
  m("list"), y(null), p(null);
@@ -9917,7 +9926,7 @@ function Jo({ className: t }) {
9917
9926
  await l(w.id);
9918
9927
  } catch {
9919
9928
  }
9920
- }, A = async (w) => {
9929
+ }, k = async (w) => {
9921
9930
  try {
9922
9931
  await d(w.id, !w.enabled);
9923
9932
  } catch {
@@ -9926,8 +9935,8 @@ function Jo({ className: t }) {
9926
9935
  p(null);
9927
9936
  try {
9928
9937
  g === "add" ? await o(w) : h && await c(h.id, w), m("list"), y(null);
9929
- } catch (L) {
9930
- p(L instanceof Error ? L.message : "Failed to save provider");
9938
+ } catch (P) {
9939
+ p(P instanceof Error ? P.message : "Failed to save provider");
9931
9940
  }
9932
9941
  };
9933
9942
  return r && s.length === 0 ? /* @__PURE__ */ i("div", { className: `cedros-system-settings cedros-system-settings-loading ${t ?? ""}`, children: [
@@ -9959,9 +9968,9 @@ function Jo({ className: t }) {
9959
9968
  Xo,
9960
9969
  {
9961
9970
  provider: w,
9962
- onEdit: () => k(w),
9971
+ onEdit: () => A(w),
9963
9972
  onDelete: () => _(w),
9964
- onToggle: () => A(w)
9973
+ onToggle: () => k(w)
9965
9974
  },
9966
9975
  w.id
9967
9976
  )) })
@@ -10013,18 +10022,18 @@ function Xo({ provider: t, onEdit: s, onDelete: r, onToggle: a }) {
10013
10022
  ] });
10014
10023
  }
10015
10024
  function Zo({ provider: t, orgId: s, error: r, isLoading: a, onSave: n, onCancel: o }) {
10016
- const c = !!t, [l, d] = N(t?.name ?? ""), [u, g] = N(t?.issuerUrl ?? ""), [m, h] = N(t?.clientId ?? ""), [y, f] = N(""), [p, v] = N(t?.emailDomain ?? ""), [k, b] = N(t?.allowRegistration ?? !0), [_, A] = N(t?.enabled ?? !0), E = C(
10025
+ const c = !!t, [l, d] = N(t?.name ?? ""), [u, g] = N(t?.issuerUrl ?? ""), [m, h] = N(t?.clientId ?? ""), [y, f] = N(""), [p, v] = N(t?.emailDomain ?? ""), [A, b] = N(t?.allowRegistration ?? !0), [_, k] = N(t?.enabled ?? !0), E = C(
10017
10026
  (w) => {
10018
10027
  if (w.preventDefault(), c) {
10019
- const L = {
10028
+ const P = {
10020
10029
  name: l,
10021
10030
  issuerUrl: u,
10022
10031
  clientId: m,
10023
10032
  emailDomain: p || null,
10024
- allowRegistration: k,
10033
+ allowRegistration: A,
10025
10034
  enabled: _
10026
10035
  };
10027
- y && (L.clientSecret = y), n(L);
10036
+ y && (P.clientSecret = y), n(P);
10028
10037
  } else {
10029
10038
  if (!s)
10030
10039
  return;
@@ -10035,12 +10044,12 @@ function Zo({ provider: t, orgId: s, error: r, isLoading: a, onSave: n, onCancel
10035
10044
  clientId: m,
10036
10045
  clientSecret: y,
10037
10046
  emailDomain: p || null,
10038
- allowRegistration: k,
10047
+ allowRegistration: A,
10039
10048
  enabled: _
10040
10049
  });
10041
10050
  }
10042
10051
  },
10043
- [c, s, l, u, m, y, p, k, _, n]
10052
+ [c, s, l, u, m, y, p, A, _, n]
10044
10053
  );
10045
10054
  return /* @__PURE__ */ i("form", { className: "cedros-sso-provider-form", onSubmit: E, children: [
10046
10055
  /* @__PURE__ */ e("div", { className: "cedros-settings-page-header", children: /* @__PURE__ */ i("div", { className: "cedros-settings-page-header-content", children: [
@@ -10133,7 +10142,7 @@ function Zo({ provider: t, orgId: s, error: r, isLoading: a, onSave: n, onCancel
10133
10142
  "input",
10134
10143
  {
10135
10144
  type: "checkbox",
10136
- checked: k,
10145
+ checked: A,
10137
10146
  onChange: (w) => b(w.target.checked)
10138
10147
  }
10139
10148
  ),
@@ -10145,7 +10154,7 @@ function Zo({ provider: t, orgId: s, error: r, isLoading: a, onSave: n, onCancel
10145
10154
  {
10146
10155
  type: "checkbox",
10147
10156
  checked: _,
10148
- onChange: (w) => A(w.target.checked)
10157
+ onChange: (w) => k(w.target.checked)
10149
10158
  }
10150
10159
  ),
10151
10160
  /* @__PURE__ */ e("span", { children: "Enable this provider" })
@@ -10362,11 +10371,11 @@ function li({ className: t }) {
10362
10371
  const b = s[y] ?? [];
10363
10372
  if (g !== "email") return b;
10364
10373
  const _ = p ? ii : oi;
10365
- return b.filter((A) => _.includes(A.key)).sort((A, E) => _.indexOf(A.key) - _.indexOf(E.key));
10366
- }, [s, y, g, p]), k = (b, _) => {
10374
+ return b.filter((k) => _.includes(k.key)).sort((k, E) => _.indexOf(k.key) - _.indexOf(E.key));
10375
+ }, [s, y, g, p]), A = (b, _) => {
10367
10376
  if (d(b, _), b === "email_provider" && _ !== "custom") {
10368
- const A = ai[_];
10369
- A && (d("email_smtp_host", A), d("email_smtp_port", "587"), d("email_smtp_tls", "true"));
10377
+ const k = ai[_];
10378
+ k && (d("email_smtp_host", k), d("email_smtp_port", "587"), d("email_smtp_tls", "true"));
10370
10379
  }
10371
10380
  };
10372
10381
  return a && Object.keys(s).length === 0 ? /* @__PURE__ */ i("div", { className: `cedros-system-settings cedros-system-settings-loading ${t ?? ""}`, children: [
@@ -10401,7 +10410,7 @@ function li({ className: t }) {
10401
10410
  {
10402
10411
  settings: v,
10403
10412
  edits: r,
10404
- onChange: g === "email" ? k : d
10413
+ onChange: g === "email" ? A : d
10405
10414
  }
10406
10415
  ) })
10407
10416
  ] });
@@ -10509,31 +10518,31 @@ function ci({ className: t }) {
10509
10518
  U(() => {
10510
10519
  l();
10511
10520
  }, [l]);
10512
- const h = Es.find((A) => A.id === g), y = O(() => {
10521
+ const h = Es.find((k) => k.id === g), y = O(() => {
10513
10522
  if (!h) return [];
10514
- const A = [];
10523
+ const k = [];
10515
10524
  for (const E of h.categories) {
10516
10525
  const w = s[E] ?? [];
10517
- A.push(...w);
10526
+ k.push(...w);
10518
10527
  }
10519
- return A;
10528
+ return k;
10520
10529
  }, [s, h]), f = u("deposit_fee_policy") || "company_pays_all", p = O(() => {
10521
10530
  if (!h) return [];
10522
- let A = y;
10523
- if (h.includeKeys && h.includeKeys.length > 0 ? (A = A.filter((E) => h.includeKeys.includes(E.key)), A.sort(
10531
+ let k = y;
10532
+ if (h.includeKeys && h.includeKeys.length > 0 ? (k = k.filter((E) => h.includeKeys.includes(E.key)), k.sort(
10524
10533
  (E, w) => h.includeKeys.indexOf(E.key) - h.includeKeys.indexOf(w.key)
10525
- )) : h.excludeKeys && h.excludeKeys.length > 0 && (A = A.filter((E) => !h.excludeKeys.includes(E.key))), h.id === "deposits" && (parseFloat(u("deposit_min_usd")) || 0) > 10 && (A = A.filter((w) => w.key !== "deposit_micro_enabled")), h.id === "fees") {
10526
- const E = ["privacy_fee_fixed_lamports", "privacy_fee_percent_bps", "private_deposit_min_lamports"], w = ["swap_fee_fixed_lamports", "swap_fee_percent_bps"], L = ["company_fee_fixed_lamports", "company_fee_percent_bps"];
10527
- A = A.filter((M) => M.key === "deposit_fee_policy" ? !0 : f === "company_pays_all" ? !1 : E.includes(M.key) ? f === "user_pays_privacy" || f === "user_pays_all" : w.includes(M.key) ? f === "user_pays_swap" || f === "user_pays_all" : L.includes(M.key) ? f === "user_pays_all" : !0);
10534
+ )) : h.excludeKeys && h.excludeKeys.length > 0 && (k = k.filter((E) => !h.excludeKeys.includes(E.key))), h.id === "deposits" && (parseFloat(u("deposit_min_usd")) || 0) > 10 && (k = k.filter((w) => w.key !== "deposit_micro_enabled")), h.id === "fees") {
10535
+ const E = ["privacy_fee_fixed_lamports", "privacy_fee_percent_bps", "private_deposit_min_lamports"], w = ["swap_fee_fixed_lamports", "swap_fee_percent_bps"], P = ["company_fee_fixed_lamports", "company_fee_percent_bps"];
10536
+ k = k.filter((x) => x.key === "deposit_fee_policy" ? !0 : f === "company_pays_all" ? !1 : E.includes(x.key) ? f === "user_pays_privacy" || f === "user_pays_all" : w.includes(x.key) ? f === "user_pays_swap" || f === "user_pays_all" : P.includes(x.key) ? f === "user_pays_all" : !0);
10528
10537
  }
10529
- return A;
10538
+ return k;
10530
10539
  }, [y, h, u, f]), v = C(
10531
- (A) => y.filter((E) => A.includes(E.key)).sort((E, w) => A.indexOf(E.key) - A.indexOf(w.key)),
10540
+ (k) => y.filter((E) => k.includes(E.key)).sort((E, w) => k.indexOf(E.key) - k.indexOf(w.key)),
10532
10541
  [y]
10533
- ), k = O(() => {
10542
+ ), A = O(() => {
10534
10543
  if (h?.id !== "deposits") return;
10535
- const A = {}, E = parseFloat(u("deposit_min_usd")) || 0, w = u("deposit_micro_enabled");
10536
- return (w === "false" || w === "0" || w === "") && E < 10 && (A.deposit_min_usd = "SOL micro payments must be enabled for minimum deposits under $10."), Object.keys(A).length > 0 ? A : void 0;
10544
+ const k = {}, E = parseFloat(u("deposit_min_usd")) || 0, w = u("deposit_micro_enabled");
10545
+ return (w === "false" || w === "0" || w === "") && E < 10 && (k.deposit_min_usd = "SOL micro payments must be enabled for minimum deposits under $10."), Object.keys(k).length > 0 ? k : void 0;
10537
10546
  }, [h?.id, u]), b = u("feature_credits") === "true", _ = () => {
10538
10547
  d("feature_credits", b ? "false" : "true");
10539
10548
  };
@@ -10564,17 +10573,17 @@ function ci({ className: t }) {
10564
10573
  /* @__PURE__ */ e(qe, { status: n, error: o })
10565
10574
  ] })
10566
10575
  ] }),
10567
- /* @__PURE__ */ e("div", { className: "cedros-admin-tabs cedros-admin-tabs--line", children: Es.map((A) => /* @__PURE__ */ e(
10576
+ /* @__PURE__ */ e("div", { className: "cedros-admin-tabs cedros-admin-tabs--line", children: Es.map((k) => /* @__PURE__ */ e(
10568
10577
  "button",
10569
10578
  {
10570
10579
  type: "button",
10571
- className: `cedros-admin-tab ${g === A.id ? "cedros-admin-tab-active" : ""}`,
10572
- onClick: () => m(A.id),
10573
- "aria-selected": g === A.id,
10580
+ className: `cedros-admin-tab ${g === k.id ? "cedros-admin-tab-active" : ""}`,
10581
+ onClick: () => m(k.id),
10582
+ "aria-selected": g === k.id,
10574
10583
  role: "tab",
10575
- children: A.label
10584
+ children: k.label
10576
10585
  },
10577
- A.id
10586
+ k.id
10578
10587
  )) }),
10579
10588
  /* @__PURE__ */ e("div", { className: "cedros-admin-tab-content", role: "tabpanel", children: p.length === 0 && !h?.sections?.length ? /* @__PURE__ */ e("div", { className: "cedros-system-settings-empty", children: /* @__PURE__ */ i("p", { children: [
10580
10589
  "No settings found for ",
@@ -10587,15 +10596,15 @@ function ci({ className: t }) {
10587
10596
  settings: p,
10588
10597
  edits: r,
10589
10598
  onChange: d,
10590
- externalWarnings: k
10599
+ externalWarnings: A
10591
10600
  }
10592
10601
  ),
10593
- h?.sections?.map((A) => {
10594
- const E = v(A.keys);
10602
+ h?.sections?.map((k) => {
10603
+ const E = v(k.keys);
10595
10604
  return E.length === 0 ? null : /* @__PURE__ */ i("div", { className: "cedros-settings-subsection", children: [
10596
10605
  /* @__PURE__ */ i("div", { className: "cedros-settings-subsection-header", children: [
10597
- /* @__PURE__ */ e("h4", { className: "cedros-settings-subsection-title", children: A.title }),
10598
- A.description && /* @__PURE__ */ e("p", { className: "cedros-settings-subsection-description", children: A.description })
10606
+ /* @__PURE__ */ e("h4", { className: "cedros-settings-subsection-title", children: k.title }),
10607
+ k.description && /* @__PURE__ */ e("p", { className: "cedros-settings-subsection-description", children: k.description })
10599
10608
  ] }),
10600
10609
  /* @__PURE__ */ e(
10601
10610
  Te,
@@ -10605,7 +10614,7 @@ function ci({ className: t }) {
10605
10614
  onChange: d
10606
10615
  }
10607
10616
  )
10608
- ] }, A.title);
10617
+ ] }, k.title);
10609
10618
  })
10610
10619
  ] }) })
10611
10620
  ] });
@@ -10770,16 +10779,16 @@ function hi(t) {
10770
10779
  return;
10771
10780
  }
10772
10781
  u(!0), m(null);
10773
- const A = ++y.current;
10782
+ const k = ++y.current;
10774
10783
  try {
10775
- const { limit: E = 50, offset: w = 0 } = _ ?? {}, L = await p.current.listMembers(t, E, w);
10776
- if (A !== y.current) return;
10777
- o(L.members), l(L.total);
10784
+ const { limit: E = 50, offset: w = 0 } = _ ?? {}, P = await p.current.listMembers(t, E, w);
10785
+ if (k !== y.current) return;
10786
+ o(P.members), l(P.total);
10778
10787
  } catch (E) {
10779
- if (A !== y.current) return;
10788
+ if (k !== y.current) return;
10780
10789
  m(E);
10781
10790
  } finally {
10782
- A === y.current && u(!1);
10791
+ k === y.current && u(!1);
10783
10792
  }
10784
10793
  },
10785
10794
  [t, r]
@@ -10791,13 +10800,13 @@ function hi(t) {
10791
10800
  }
10792
10801
  t !== h.current && (h.current = t, v());
10793
10802
  }, [t, r, v]);
10794
- const k = C(
10795
- async (_, A) => {
10803
+ const A = C(
10804
+ async (_, k) => {
10796
10805
  if (!t)
10797
10806
  throw new Error("No organization selected");
10798
10807
  u(!0), m(null);
10799
10808
  try {
10800
- await p.current.updateMemberRole(t, _, { role: A }), await v();
10809
+ await p.current.updateMemberRole(t, _, { role: k }), await v();
10801
10810
  } catch (E) {
10802
10811
  throw m(E), E;
10803
10812
  } finally {
@@ -10812,8 +10821,8 @@ function hi(t) {
10812
10821
  u(!0), m(null);
10813
10822
  try {
10814
10823
  await p.current.removeMember(t, _), await v();
10815
- } catch (A) {
10816
- throw m(A), A;
10824
+ } catch (k) {
10825
+ throw m(k), k;
10817
10826
  } finally {
10818
10827
  u(!1);
10819
10828
  }
@@ -10826,7 +10835,7 @@ function hi(t) {
10826
10835
  isLoading: d,
10827
10836
  error: g,
10828
10837
  fetchMembers: v,
10829
- updateMemberRole: k,
10838
+ updateMemberRole: A,
10830
10839
  removeMember: b
10831
10840
  };
10832
10841
  }
@@ -10920,12 +10929,12 @@ function pi(t) {
10920
10929
  u(!0), m(null);
10921
10930
  const w = ++y.current;
10922
10931
  try {
10923
- const { limit: L = 50, offset: M = 0 } = E ?? {}, D = await p.current.listInvites(t, L, M);
10932
+ const { limit: P = 50, offset: x = 0 } = E ?? {}, M = await p.current.listInvites(t, P, x);
10924
10933
  if (w !== y.current) return;
10925
- o(D.invites), l(D.total);
10926
- } catch (L) {
10934
+ o(M.invites), l(M.total);
10935
+ } catch (P) {
10927
10936
  if (w !== y.current) return;
10928
- m(L);
10937
+ m(P);
10929
10938
  } finally {
10930
10939
  w === y.current && u(!1);
10931
10940
  }
@@ -10939,15 +10948,15 @@ function pi(t) {
10939
10948
  }
10940
10949
  t !== h.current && (h.current = t, v());
10941
10950
  }, [t, r, v]);
10942
- const k = C(
10951
+ const A = C(
10943
10952
  async (E, w = "member") => {
10944
10953
  if (!t)
10945
10954
  throw new Error("No organization selected");
10946
10955
  u(!0), m(null);
10947
10956
  try {
10948
10957
  await p.current.createInvite(t, { email: E, role: w }), await v();
10949
- } catch (L) {
10950
- throw m(L), L;
10958
+ } catch (P) {
10959
+ throw m(P), P;
10951
10960
  } finally {
10952
10961
  u(!1);
10953
10962
  }
@@ -10981,7 +10990,7 @@ function pi(t) {
10981
10990
  }
10982
10991
  },
10983
10992
  [t]
10984
- ), A = C(async (E) => {
10993
+ ), k = C(async (E) => {
10985
10994
  u(!0), m(null);
10986
10995
  try {
10987
10996
  return await p.current.acceptInvite({ token: E });
@@ -10997,10 +11006,10 @@ function pi(t) {
10997
11006
  isLoading: d,
10998
11007
  error: g,
10999
11008
  fetchInvites: v,
11000
- createInvite: k,
11009
+ createInvite: A,
11001
11010
  cancelInvite: b,
11002
11011
  resendInvite: _,
11003
- acceptInvite: A
11012
+ acceptInvite: k
11004
11013
  };
11005
11014
  }
11006
11015
  const fi = {
@@ -11189,41 +11198,41 @@ function ls() {
11189
11198
  ),
11190
11199
  [t.serverUrl, t.requestTimeout, t.retryAttempts, s]
11191
11200
  ), y = C(
11192
- async (T) => {
11193
- l(!0), u(null), m(T || {});
11201
+ async (L) => {
11202
+ l(!0), u(null), m(L || {});
11194
11203
  try {
11195
- const S = await h.listUsers(T);
11204
+ const S = await h.listUsers(L);
11196
11205
  return a(S.users), o(S.total), S;
11197
11206
  } catch (S) {
11198
- const P = S instanceof Error ? S : new Error("Failed to list users");
11199
- throw u(P), P;
11207
+ const T = S instanceof Error ? S : new Error("Failed to list users");
11208
+ throw u(T), T;
11200
11209
  } finally {
11201
11210
  l(!1);
11202
11211
  }
11203
11212
  },
11204
11213
  [h]
11205
11214
  ), f = C(
11206
- async (T) => {
11215
+ async (L) => {
11207
11216
  l(!0), u(null);
11208
11217
  try {
11209
- return await h.getUser(T);
11218
+ return await h.getUser(L);
11210
11219
  } catch (S) {
11211
- const P = S instanceof Error ? S : new Error("Failed to get user");
11212
- throw u(P), P;
11220
+ const T = S instanceof Error ? S : new Error("Failed to get user");
11221
+ throw u(T), T;
11213
11222
  } finally {
11214
11223
  l(!1);
11215
11224
  }
11216
11225
  },
11217
11226
  [h]
11218
11227
  ), p = C(
11219
- async (T, S) => {
11228
+ async (L, S) => {
11220
11229
  l(!0), u(null);
11221
11230
  try {
11222
- await h.setSystemAdmin(T, S), a(
11223
- (P) => P.map((R) => R.id === T ? { ...R, isSystemAdmin: S } : R)
11231
+ await h.setSystemAdmin(L, S), a(
11232
+ (T) => T.map((R) => R.id === L ? { ...R, isSystemAdmin: S } : R)
11224
11233
  );
11225
- } catch (P) {
11226
- const R = P instanceof Error ? P : new Error("Failed to update admin status");
11234
+ } catch (T) {
11235
+ const R = T instanceof Error ? T : new Error("Failed to update admin status");
11227
11236
  throw u(R), R;
11228
11237
  } finally {
11229
11238
  l(!1);
@@ -11231,50 +11240,50 @@ function ls() {
11231
11240
  },
11232
11241
  [h]
11233
11242
  ), v = C(
11234
- async (T, S) => {
11243
+ async (L, S) => {
11235
11244
  l(!0), u(null);
11236
11245
  try {
11237
- const P = await h.updateUser(T, S);
11238
- return a((R) => R.map((I) => I.id === T ? P : I)), P;
11239
- } catch (P) {
11240
- const R = P instanceof Error ? P : new Error("Failed to update user");
11246
+ const T = await h.updateUser(L, S);
11247
+ return a((R) => R.map((I) => I.id === L ? T : I)), T;
11248
+ } catch (T) {
11249
+ const R = T instanceof Error ? T : new Error("Failed to update user");
11241
11250
  throw u(R), R;
11242
11251
  } finally {
11243
11252
  l(!1);
11244
11253
  }
11245
11254
  },
11246
11255
  [h]
11247
- ), k = C(
11248
- async (T) => {
11256
+ ), A = C(
11257
+ async (L) => {
11249
11258
  l(!0), u(null);
11250
11259
  try {
11251
- await h.deleteUser(T), a((S) => S.filter((P) => P.id !== T)), o((S) => S - 1);
11260
+ await h.deleteUser(L), a((S) => S.filter((T) => T.id !== L)), o((S) => S - 1);
11252
11261
  } catch (S) {
11253
- const P = S instanceof Error ? S : new Error("Failed to delete user");
11254
- throw u(P), P;
11262
+ const T = S instanceof Error ? S : new Error("Failed to delete user");
11263
+ throw u(T), T;
11255
11264
  } finally {
11256
11265
  l(!1);
11257
11266
  }
11258
11267
  },
11259
11268
  [h]
11260
11269
  ), b = C(
11261
- async (T) => {
11270
+ async (L) => {
11262
11271
  l(!0), u(null);
11263
11272
  try {
11264
- await h.forcePasswordReset(T);
11273
+ await h.forcePasswordReset(L);
11265
11274
  } catch (S) {
11266
- const P = S instanceof Error ? S : new Error("Failed to send password reset");
11267
- throw u(P), P;
11275
+ const T = S instanceof Error ? S : new Error("Failed to send password reset");
11276
+ throw u(T), T;
11268
11277
  } finally {
11269
11278
  l(!1);
11270
11279
  }
11271
11280
  },
11272
11281
  [h]
11273
11282
  ), _ = C(
11274
- async (T, S, P) => {
11283
+ async (L, S, T) => {
11275
11284
  l(!0), u(null);
11276
11285
  try {
11277
- await h.adjustCredits(T, { amount: S, reason: P });
11286
+ await h.adjustCredits(L, { amount: S, reason: T });
11278
11287
  } catch (R) {
11279
11288
  const I = R instanceof Error ? R : new Error("Failed to adjust credits");
11280
11289
  throw u(I), I;
@@ -11283,13 +11292,13 @@ function ls() {
11283
11292
  }
11284
11293
  },
11285
11294
  [h]
11286
- ), A = C(
11287
- async (T, S) => {
11295
+ ), k = C(
11296
+ async (L, S) => {
11288
11297
  l(!0), u(null);
11289
11298
  try {
11290
- return await h.getUserDeposits(T, S);
11291
- } catch (P) {
11292
- const R = P instanceof Error ? P : new Error("Failed to get user deposits");
11299
+ return await h.getUserDeposits(L, S);
11300
+ } catch (T) {
11301
+ const R = T instanceof Error ? T : new Error("Failed to get user deposits");
11293
11302
  throw u(R), R;
11294
11303
  } finally {
11295
11304
  l(!1);
@@ -11297,12 +11306,12 @@ function ls() {
11297
11306
  },
11298
11307
  [h]
11299
11308
  ), E = C(
11300
- async (T, S) => {
11309
+ async (L, S) => {
11301
11310
  l(!0), u(null);
11302
11311
  try {
11303
- return await h.getUserCredits(T, S);
11304
- } catch (P) {
11305
- const R = P instanceof Error ? P : new Error("Failed to get user credits");
11312
+ return await h.getUserCredits(L, S);
11313
+ } catch (T) {
11314
+ const R = T instanceof Error ? T : new Error("Failed to get user credits");
11306
11315
  throw u(R), R;
11307
11316
  } finally {
11308
11317
  l(!1);
@@ -11310,44 +11319,44 @@ function ls() {
11310
11319
  },
11311
11320
  [h]
11312
11321
  ), w = C(
11313
- async (T, S) => {
11322
+ async (L, S) => {
11314
11323
  l(!0), u(null);
11315
11324
  try {
11316
- return await h.getUserWithdrawalHistory(T, S);
11317
- } catch (P) {
11318
- const R = P instanceof Error ? P : new Error("Failed to get user withdrawal history");
11325
+ return await h.getUserWithdrawalHistory(L, S);
11326
+ } catch (T) {
11327
+ const R = T instanceof Error ? T : new Error("Failed to get user withdrawal history");
11319
11328
  throw u(R), R;
11320
11329
  } finally {
11321
11330
  l(!1);
11322
11331
  }
11323
11332
  },
11324
11333
  [h]
11325
- ), L = C(
11326
- async (T, S) => {
11334
+ ), P = C(
11335
+ async (L, S) => {
11327
11336
  l(!0), u(null);
11328
11337
  try {
11329
- return await h.getUserChats(T, S);
11330
- } catch (P) {
11331
- const R = P instanceof Error ? P : new Error("Failed to get user chat history");
11338
+ return await h.getUserChats(L, S);
11339
+ } catch (T) {
11340
+ const R = T instanceof Error ? T : new Error("Failed to get user chat history");
11332
11341
  throw u(R), R;
11333
11342
  } finally {
11334
11343
  l(!1);
11335
11344
  }
11336
11345
  },
11337
11346
  [h]
11338
- ), M = C(async () => {
11347
+ ), x = C(async () => {
11339
11348
  l(!0), u(null);
11340
11349
  try {
11341
11350
  return await h.getStats();
11342
- } catch (T) {
11343
- const S = T instanceof Error ? T : new Error("Failed to get user stats");
11351
+ } catch (L) {
11352
+ const S = L instanceof Error ? L : new Error("Failed to get user stats");
11344
11353
  throw u(S), S;
11345
11354
  } finally {
11346
11355
  l(!1);
11347
11356
  }
11348
- }, [h]), D = C(async () => {
11357
+ }, [h]), M = C(async () => {
11349
11358
  await y(g);
11350
- }, [y, g]), x = C(() => {
11359
+ }, [y, g]), D = C(() => {
11351
11360
  u(null);
11352
11361
  }, []);
11353
11362
  return {
@@ -11359,16 +11368,16 @@ function ls() {
11359
11368
  getUser: f,
11360
11369
  setSystemAdmin: p,
11361
11370
  updateUser: v,
11362
- deleteUser: k,
11371
+ deleteUser: A,
11363
11372
  forcePasswordReset: b,
11364
11373
  adjustCredits: _,
11365
- getUserDeposits: A,
11374
+ getUserDeposits: k,
11366
11375
  getUserCredits: E,
11367
11376
  getUserWithdrawalHistory: w,
11368
- getUserChats: L,
11369
- getStats: M,
11370
- refresh: D,
11371
- clearError: x
11377
+ getUserChats: P,
11378
+ getStats: x,
11379
+ refresh: M,
11380
+ clearError: D
11372
11381
  };
11373
11382
  }
11374
11383
  const yi = [
@@ -11481,23 +11490,23 @@ function Qr() {
11481
11490
  d(!0), h(null);
11482
11491
  const _ = ++y.current;
11483
11492
  try {
11484
- const A = await p.current.get(
11493
+ const k = await p.current.get(
11485
11494
  "/admin/dashboard-permissions"
11486
11495
  );
11487
11496
  if (_ !== y.current) return;
11488
- c(A.permissions);
11489
- } catch (A) {
11497
+ c(k.permissions);
11498
+ } catch (k) {
11490
11499
  if (_ !== y.current) return;
11491
- if (A instanceof Error && A.message.includes("404"))
11500
+ if (k instanceof Error && k.message.includes("404"))
11492
11501
  c(tt);
11493
11502
  else {
11494
- const E = A instanceof Error ? A.message : "Failed to fetch permissions";
11503
+ const E = k instanceof Error ? k.message : "Failed to fetch permissions";
11495
11504
  h({ code: "NETWORK_ERROR", message: E }), c(tt);
11496
11505
  }
11497
11506
  } finally {
11498
11507
  _ === y.current && d(!1);
11499
11508
  }
11500
- }, [s, a]), k = C(
11509
+ }, [s, a]), A = C(
11501
11510
  async (_) => {
11502
11511
  if (s !== "authenticated" || !a)
11503
11512
  throw new Error("Not authenticated");
@@ -11510,8 +11519,8 @@ function Qr() {
11510
11519
  path: "/admin/dashboard-permissions",
11511
11520
  body: _
11512
11521
  }), c(_);
11513
- } catch (A) {
11514
- const E = A instanceof Error ? A.message : "Failed to update permissions";
11522
+ } catch (k) {
11523
+ const E = k instanceof Error ? k.message : "Failed to update permissions";
11515
11524
  throw h({ code: "NETWORK_ERROR", message: E }), new Error(E);
11516
11525
  } finally {
11517
11526
  g(!1);
@@ -11527,7 +11536,7 @@ function Qr() {
11527
11536
  }, [a?.id, v]), {
11528
11537
  permissions: o,
11529
11538
  canAccess: b,
11530
- updatePermissions: k,
11539
+ updatePermissions: A,
11531
11540
  isLoading: l,
11532
11541
  isUpdating: u,
11533
11542
  error: m,
@@ -11550,11 +11559,11 @@ function $e() {
11550
11559
  try {
11551
11560
  const v = new URLSearchParams();
11552
11561
  p?.status && v.set("status", p.status), p?.limit !== void 0 && v.set("limit", String(p.limit)), p?.offset !== void 0 && v.set("offset", String(p.offset));
11553
- const k = v.toString(), b = k ? `/admin/deposits?${k}` : "/admin/deposits";
11562
+ const A = v.toString(), b = A ? `/admin/deposits?${A}` : "/admin/deposits";
11554
11563
  return await o.get(b);
11555
11564
  } catch (v) {
11556
- const k = B(v, "Failed to list deposits");
11557
- throw n(k.message), k;
11565
+ const A = B(v, "Failed to list deposits");
11566
+ throw n(A.message), A;
11558
11567
  } finally {
11559
11568
  r(!1);
11560
11569
  }
@@ -11580,11 +11589,11 @@ function $e() {
11580
11589
  try {
11581
11590
  const v = new URLSearchParams();
11582
11591
  p?.limit !== void 0 && v.set("limit", String(p.limit)), p?.offset !== void 0 && v.set("offset", String(p.offset));
11583
- const k = v.toString(), b = k ? `/admin/deposits/in-privacy-period?${k}` : "/admin/deposits/in-privacy-period";
11592
+ const A = v.toString(), b = A ? `/admin/deposits/in-privacy-period?${A}` : "/admin/deposits/in-privacy-period";
11584
11593
  return await o.get(b);
11585
11594
  } catch (v) {
11586
- const k = B(v, "Failed to list deposits in privacy period");
11587
- throw n(k.message), k;
11595
+ const A = B(v, "Failed to list deposits in privacy period");
11596
+ throw n(A.message), A;
11588
11597
  } finally {
11589
11598
  r(!1);
11590
11599
  }
@@ -11598,11 +11607,11 @@ function $e() {
11598
11607
  try {
11599
11608
  const v = new URLSearchParams();
11600
11609
  p?.limit !== void 0 && v.set("limit", String(p.limit)), p?.offset !== void 0 && v.set("offset", String(p.offset));
11601
- const k = v.toString(), b = k ? `/admin/withdrawals/pending?${k}` : "/admin/withdrawals/pending";
11610
+ const A = v.toString(), b = A ? `/admin/withdrawals/pending?${A}` : "/admin/withdrawals/pending";
11602
11611
  return await o.get(b);
11603
11612
  } catch (v) {
11604
- const k = B(v, "Failed to list pending withdrawals");
11605
- throw n(k.message), k;
11613
+ const A = B(v, "Failed to list pending withdrawals");
11614
+ throw n(A.message), A;
11606
11615
  } finally {
11607
11616
  r(!1);
11608
11617
  }
@@ -11618,8 +11627,8 @@ function $e() {
11618
11627
  `/admin/withdrawals/${p}/process`,
11619
11628
  v ?? {}
11620
11629
  );
11621
- } catch (k) {
11622
- const b = B(k, "Failed to process withdrawal");
11630
+ } catch (A) {
11631
+ const b = B(A, "Failed to process withdrawal");
11623
11632
  throw n(b.message), b;
11624
11633
  } finally {
11625
11634
  r(!1);
@@ -11892,50 +11901,50 @@ function Si({
11892
11901
  onLoad: n,
11893
11902
  onDepositClick: o
11894
11903
  }) {
11895
- const { listDeposits: c, isLoading: l, error: d, clearError: u } = $e(), [g, m] = N([]), [h, y] = N(0), [f, p] = N(0), [v, k] = N(null), [b, _] = N("createdAt"), [A, E] = N("desc"), w = (P) => {
11896
- b === P ? E(A === "asc" ? "desc" : "asc") : (_(P), E("desc"));
11897
- }, L = O(() => [...g].sort((P, R) => {
11904
+ const { listDeposits: c, isLoading: l, error: d, clearError: u } = $e(), [g, m] = N([]), [h, y] = N(0), [f, p] = N(0), [v, A] = N(null), [b, _] = N("createdAt"), [k, E] = N("desc"), w = (T) => {
11905
+ b === T ? E(k === "asc" ? "desc" : "asc") : (_(T), E("desc"));
11906
+ }, P = O(() => [...g].sort((T, R) => {
11898
11907
  let I, j;
11899
11908
  switch (b) {
11900
11909
  case "userId":
11901
- I = P.userId.toLowerCase(), j = R.userId.toLowerCase();
11910
+ I = T.userId.toLowerCase(), j = R.userId.toLowerCase();
11902
11911
  break;
11903
11912
  case "amountLamports":
11904
- I = P.amountLamports ?? 0, j = R.amountLamports ?? 0;
11913
+ I = T.amountLamports ?? 0, j = R.amountLamports ?? 0;
11905
11914
  break;
11906
11915
  case "status":
11907
- I = P.status, j = R.status;
11916
+ I = T.status, j = R.status;
11908
11917
  break;
11909
11918
  case "createdAt":
11910
- I = new Date(P.createdAt).getTime(), j = new Date(R.createdAt).getTime();
11919
+ I = new Date(T.createdAt).getTime(), j = new Date(R.createdAt).getTime();
11911
11920
  break;
11912
11921
  case "txSignature":
11913
- I = P.txSignature || "", j = R.txSignature || "";
11922
+ I = T.txSignature || "", j = R.txSignature || "";
11914
11923
  break;
11915
11924
  default:
11916
11925
  return 0;
11917
11926
  }
11918
- return I < j ? A === "asc" ? -1 : 1 : I > j ? A === "asc" ? 1 : -1 : 0;
11919
- }), [g, b, A]), M = C(async () => {
11927
+ return I < j ? k === "asc" ? -1 : 1 : I > j ? k === "asc" ? 1 : -1 : 0;
11928
+ }), [g, b, k]), x = C(async () => {
11920
11929
  try {
11921
- const P = await c({ status: t, limit: s, offset: f });
11922
- m(P.deposits), y(P.total), n?.(P), k(null);
11923
- } catch (P) {
11924
- const R = P && typeof P == "object" && "message" in P ? String(P.message) : "Failed to load deposits";
11925
- k(R);
11930
+ const T = await c({ status: t, limit: s, offset: f });
11931
+ m(T.deposits), y(T.total), n?.(T), A(null);
11932
+ } catch (T) {
11933
+ const R = T && typeof T == "object" && "message" in T ? String(T.message) : "Failed to load deposits";
11934
+ A(R);
11926
11935
  }
11927
11936
  }, [t, s, f, c, n]);
11928
11937
  U(() => {
11929
11938
  p(0);
11930
11939
  }, [t, s]), U(() => {
11931
- M();
11932
- }, [M]), U(() => {
11940
+ x();
11941
+ }, [x]), U(() => {
11933
11942
  if (r <= 0) return;
11934
- const P = setInterval(M, r);
11935
- return () => clearInterval(P);
11936
- }, [r, M]);
11937
- const D = Math.ceil(h / s), x = Math.floor(f / s) + 1, T = (P) => {
11938
- const R = (P - 1) * s;
11943
+ const T = setInterval(x, r);
11944
+ return () => clearInterval(T);
11945
+ }, [r, x]);
11946
+ const M = Math.ceil(h / s), D = Math.floor(f / s) + 1, L = (T) => {
11947
+ const R = (T - 1) * s;
11939
11948
  p(Math.max(0, Math.min(R, Math.max(0, h - 1))));
11940
11949
  }, S = v || d;
11941
11950
  return S ? /* @__PURE__ */ i("div", { className: `cedros-admin-deposit-list cedros-admin-deposit-list-error ${a}`, children: [
@@ -11946,7 +11955,7 @@ function Si({
11946
11955
  type: "button",
11947
11956
  className: "cedros-button cedros-button-outline",
11948
11957
  onClick: () => {
11949
- u(), k(null), M();
11958
+ u(), A(null), x();
11950
11959
  },
11951
11960
  children: "Retry"
11952
11961
  }
@@ -11962,7 +11971,7 @@ function Si({
11962
11971
  {
11963
11972
  type: "button",
11964
11973
  className: "cedros-button cedros-button-outline cedros-button-sm cedros-admin-icon-button",
11965
- onClick: M,
11974
+ onClick: x,
11966
11975
  disabled: l,
11967
11976
  title: "Refresh deposits",
11968
11977
  "aria-label": "Refresh deposits",
@@ -11983,7 +11992,7 @@ function Si({
11983
11992
  children: [
11984
11993
  "User",
11985
11994
  " ",
11986
- /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: b === "userId" ? A === "asc" ? "↑" : "↓" : "↕" })
11995
+ /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: b === "userId" ? k === "asc" ? "↑" : "↓" : "↕" })
11987
11996
  ]
11988
11997
  }
11989
11998
  ) }),
@@ -11997,7 +12006,7 @@ function Si({
11997
12006
  children: [
11998
12007
  "Amount",
11999
12008
  " ",
12000
- /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: b === "amountLamports" ? A === "asc" ? "↑" : "↓" : "↕" })
12009
+ /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: b === "amountLamports" ? k === "asc" ? "↑" : "↓" : "↕" })
12001
12010
  ]
12002
12011
  }
12003
12012
  ) }),
@@ -12011,7 +12020,7 @@ function Si({
12011
12020
  children: [
12012
12021
  "Status",
12013
12022
  " ",
12014
- /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: b === "status" ? A === "asc" ? "↑" : "↓" : "↕" })
12023
+ /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: b === "status" ? k === "asc" ? "↑" : "↓" : "↕" })
12015
12024
  ]
12016
12025
  }
12017
12026
  ) }),
@@ -12025,7 +12034,7 @@ function Si({
12025
12034
  children: [
12026
12035
  "Created",
12027
12036
  " ",
12028
- /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: b === "createdAt" ? A === "asc" ? "↑" : "↓" : "↕" })
12037
+ /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: b === "createdAt" ? k === "asc" ? "↑" : "↓" : "↕" })
12029
12038
  ]
12030
12039
  }
12031
12040
  ) }),
@@ -12039,48 +12048,48 @@ function Si({
12039
12048
  children: [
12040
12049
  "Tx",
12041
12050
  " ",
12042
- /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: b === "txSignature" ? A === "asc" ? "↑" : "↓" : "↕" })
12051
+ /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: b === "txSignature" ? k === "asc" ? "↑" : "↓" : "↕" })
12043
12052
  ]
12044
12053
  }
12045
12054
  ) })
12046
12055
  ] }),
12047
- L.map((P) => /* @__PURE__ */ i(
12056
+ P.map((T) => /* @__PURE__ */ i(
12048
12057
  "div",
12049
12058
  {
12050
- className: `cedros-admin-deposit-row ${ki(P.status)}`,
12051
- onClick: () => o?.(P),
12059
+ className: `cedros-admin-deposit-row ${ki(T.status)}`,
12060
+ onClick: () => o?.(T),
12052
12061
  onKeyDown: (R) => {
12053
- (R.key === "Enter" || R.key === " ") && (R.preventDefault(), o?.(P));
12062
+ (R.key === "Enter" || R.key === " ") && (R.preventDefault(), o?.(T));
12054
12063
  },
12055
12064
  role: o ? "button" : void 0,
12056
12065
  tabIndex: o ? 0 : void 0,
12057
12066
  children: [
12058
- /* @__PURE__ */ e("div", { className: "cedros-admin-deposit-td", title: P.userId, children: Ls(P.userId) }),
12059
- /* @__PURE__ */ e("div", { className: "cedros-admin-deposit-td", children: Ni(P.amountLamports) }),
12060
- /* @__PURE__ */ e("div", { className: "cedros-admin-deposit-td", children: /* @__PURE__ */ e("span", { className: "cedros-admin-status-badge", children: Ai(P.status) }) }),
12061
- /* @__PURE__ */ e("div", { className: "cedros-admin-deposit-td", children: _i(P.createdAt) }),
12062
- /* @__PURE__ */ e("div", { className: "cedros-admin-deposit-td", title: P.txSignature || void 0, children: P.txSignature ? Ls(P.txSignature) : "—" })
12067
+ /* @__PURE__ */ e("div", { className: "cedros-admin-deposit-td", title: T.userId, children: Ls(T.userId) }),
12068
+ /* @__PURE__ */ e("div", { className: "cedros-admin-deposit-td", children: Ni(T.amountLamports) }),
12069
+ /* @__PURE__ */ e("div", { className: "cedros-admin-deposit-td", children: /* @__PURE__ */ e("span", { className: "cedros-admin-status-badge", children: Ai(T.status) }) }),
12070
+ /* @__PURE__ */ e("div", { className: "cedros-admin-deposit-td", children: _i(T.createdAt) }),
12071
+ /* @__PURE__ */ e("div", { className: "cedros-admin-deposit-td", title: T.txSignature || void 0, children: T.txSignature ? Ls(T.txSignature) : "—" })
12063
12072
  ]
12064
12073
  },
12065
- P.id
12074
+ T.id
12066
12075
  ))
12067
12076
  ] }),
12068
- D > 1 && /* @__PURE__ */ i("div", { className: "cedros-admin-pagination", children: [
12077
+ M > 1 && /* @__PURE__ */ i("div", { className: "cedros-admin-pagination", children: [
12069
12078
  /* @__PURE__ */ e(
12070
12079
  "button",
12071
12080
  {
12072
12081
  type: "button",
12073
12082
  className: "cedros-button cedros-button-outline cedros-button-sm",
12074
- onClick: () => T(x - 1),
12075
- disabled: x <= 1,
12083
+ onClick: () => L(D - 1),
12084
+ disabled: D <= 1,
12076
12085
  children: "Previous"
12077
12086
  }
12078
12087
  ),
12079
12088
  /* @__PURE__ */ i("span", { className: "cedros-admin-page-info", children: [
12080
12089
  "Page ",
12081
- x,
12082
- " of ",
12083
12090
  D,
12091
+ " of ",
12092
+ M,
12084
12093
  " (",
12085
12094
  h,
12086
12095
  " total)"
@@ -12090,8 +12099,8 @@ function Si({
12090
12099
  {
12091
12100
  type: "button",
12092
12101
  className: "cedros-button cedros-button-outline cedros-button-sm",
12093
- onClick: () => T(x + 1),
12094
- disabled: x >= D,
12102
+ onClick: () => L(D + 1),
12103
+ disabled: D >= M,
12095
12104
  children: "Next"
12096
12105
  }
12097
12106
  )
@@ -12137,9 +12146,9 @@ function Ei({
12137
12146
  isLoading: g,
12138
12147
  error: m,
12139
12148
  clearError: h
12140
- } = $e(), [y, f] = N([]), [p, v] = N(0), [k, b] = N(0), [_, A] = N(null), [E, w] = N("withdrawalAvailableAt"), [L, M] = N("asc"), D = (F) => {
12141
- E === F ? M(L === "asc" ? "desc" : "asc") : (w(F), M(F === "withdrawalAvailableAt" ? "asc" : "desc"));
12142
- }, x = O(() => [...y].sort((F, W) => {
12149
+ } = $e(), [y, f] = N([]), [p, v] = N(0), [A, b] = N(0), [_, k] = N(null), [E, w] = N("withdrawalAvailableAt"), [P, x] = N("asc"), M = (F) => {
12150
+ E === F ? x(P === "asc" ? "desc" : "asc") : (w(F), x(F === "withdrawalAvailableAt" ? "asc" : "desc"));
12151
+ }, D = O(() => [...y].sort((F, W) => {
12143
12152
  let $, H;
12144
12153
  switch (E) {
12145
12154
  case "userId":
@@ -12154,16 +12163,16 @@ function Ei({
12154
12163
  default:
12155
12164
  return 0;
12156
12165
  }
12157
- return $ < H ? L === "asc" ? -1 : 1 : $ > H ? L === "asc" ? 1 : -1 : 0;
12158
- }), [y, E, L]), [T, S] = N(null), [P, R] = N(!1), [I, j] = N(null), [ee, ne] = N(null), V = C(async () => {
12166
+ return $ < H ? P === "asc" ? -1 : 1 : $ > H ? P === "asc" ? 1 : -1 : 0;
12167
+ }), [y, E, P]), [L, S] = N(null), [T, R] = N(!1), [I, j] = N(null), [ee, ne] = N(null), V = C(async () => {
12159
12168
  try {
12160
- const F = await l({ limit: t, offset: k });
12161
- f(F.deposits), v(F.total), a?.(F), A(null);
12169
+ const F = await l({ limit: t, offset: A });
12170
+ f(F.deposits), v(F.total), a?.(F), k(null);
12162
12171
  } catch (F) {
12163
12172
  const W = F && typeof F == "object" && "message" in F ? String(F.message) : "Failed to load pending withdrawals";
12164
- A(W);
12173
+ k(W);
12165
12174
  }
12166
- }, [t, k, l, a]);
12175
+ }, [t, A, l, a]);
12167
12176
  U(() => {
12168
12177
  b(0);
12169
12178
  }, [t]), U(() => {
@@ -12177,7 +12186,7 @@ function Ei({
12177
12186
  const F = setTimeout(() => j(null), 5e3);
12178
12187
  return () => clearTimeout(F);
12179
12188
  }, [I]);
12180
- const Y = Math.ceil(p / t), q = Math.floor(k / t) + 1, Z = (F) => {
12189
+ const Y = Math.ceil(p / t), q = Math.floor(A / t) + 1, Z = (F) => {
12181
12190
  const W = (F - 1) * t;
12182
12191
  b(Math.max(0, Math.min(W, Math.max(0, p - 1))));
12183
12192
  }, ce = async (F, W = !1) => {
@@ -12237,14 +12246,14 @@ function Ei({
12237
12246
  type: "button",
12238
12247
  className: "cedros-button cedros-button-outline",
12239
12248
  onClick: () => {
12240
- h(), A(null), V();
12249
+ h(), k(null), V();
12241
12250
  },
12242
12251
  children: "Retry"
12243
12252
  }
12244
12253
  )
12245
12254
  ]
12246
12255
  }
12247
- ) : g && y.length === 0 && !T && !P ? /* @__PURE__ */ i(
12256
+ ) : g && y.length === 0 && !L && !T ? /* @__PURE__ */ i(
12248
12257
  "div",
12249
12258
  {
12250
12259
  className: `cedros-admin-withdrawal-queue cedros-admin-withdrawal-queue-loading ${r}`,
@@ -12305,8 +12314,8 @@ function Ei({
12305
12314
  type: "button",
12306
12315
  className: "cedros-button cedros-button-danger",
12307
12316
  onClick: () => ce(ee, !0),
12308
- disabled: T === ee.id,
12309
- children: T === ee.id ? "Processing..." : "Process Early"
12317
+ disabled: L === ee.id,
12318
+ children: L === ee.id ? "Processing..." : "Process Early"
12310
12319
  }
12311
12320
  )
12312
12321
  ] })
@@ -12337,10 +12346,10 @@ function Ei({
12337
12346
  type: "button",
12338
12347
  className: "cedros-button cedros-button-outline cedros-button-sm cedros-admin-icon-button",
12339
12348
  onClick: V,
12340
- disabled: g || P,
12349
+ disabled: g || T,
12341
12350
  title: "Refresh queue",
12342
12351
  "aria-label": "Refresh queue",
12343
- children: g && !P ? "..." : "↻"
12352
+ children: g && !T ? "..." : "↻"
12344
12353
  }
12345
12354
  ),
12346
12355
  /* @__PURE__ */ e(
@@ -12349,9 +12358,9 @@ function Ei({
12349
12358
  type: "button",
12350
12359
  className: "cedros-button cedros-button-primary cedros-button-sm",
12351
12360
  onClick: le,
12352
- disabled: g || P || y.length === 0,
12361
+ disabled: g || T || y.length === 0,
12353
12362
  title: "Process all ready withdrawals",
12354
- children: P ? "Processing..." : "Process All"
12363
+ children: T ? "Processing..." : "Process All"
12355
12364
  }
12356
12365
  )
12357
12366
  ] })
@@ -12364,12 +12373,12 @@ function Ei({
12364
12373
  {
12365
12374
  type: "button",
12366
12375
  className: `cedros-admin-sort-button ${E === "userId" ? "cedros-admin-sort-active" : ""}`,
12367
- onClick: () => D("userId"),
12376
+ onClick: () => M("userId"),
12368
12377
  "aria-label": "Sort by user",
12369
12378
  children: [
12370
12379
  "User",
12371
12380
  " ",
12372
- /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: E === "userId" ? L === "asc" ? "↑" : "↓" : "↕" })
12381
+ /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: E === "userId" ? P === "asc" ? "↑" : "↓" : "↕" })
12373
12382
  ]
12374
12383
  }
12375
12384
  ) }),
@@ -12378,12 +12387,12 @@ function Ei({
12378
12387
  {
12379
12388
  type: "button",
12380
12389
  className: `cedros-admin-sort-button ${E === "amountLamports" ? "cedros-admin-sort-active" : ""}`,
12381
- onClick: () => D("amountLamports"),
12390
+ onClick: () => M("amountLamports"),
12382
12391
  "aria-label": "Sort by amount",
12383
12392
  children: [
12384
12393
  "Amount",
12385
12394
  " ",
12386
- /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: E === "amountLamports" ? L === "asc" ? "↑" : "↓" : "↕" })
12395
+ /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: E === "amountLamports" ? P === "asc" ? "↑" : "↓" : "↕" })
12387
12396
  ]
12388
12397
  }
12389
12398
  ) }),
@@ -12392,20 +12401,20 @@ function Ei({
12392
12401
  {
12393
12402
  type: "button",
12394
12403
  className: `cedros-admin-sort-button ${E === "withdrawalAvailableAt" ? "cedros-admin-sort-active" : ""}`,
12395
- onClick: () => D("withdrawalAvailableAt"),
12404
+ onClick: () => M("withdrawalAvailableAt"),
12396
12405
  "aria-label": "Sort by ready since",
12397
12406
  children: [
12398
12407
  "Ready Since",
12399
12408
  " ",
12400
- /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: E === "withdrawalAvailableAt" ? L === "asc" ? "↑" : "↓" : "↕" })
12409
+ /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: E === "withdrawalAvailableAt" ? P === "asc" ? "↑" : "↓" : "↕" })
12401
12410
  ]
12402
12411
  }
12403
12412
  ) }),
12404
12413
  /* @__PURE__ */ e("div", { className: "cedros-admin-withdrawal-th", children: "Waiting" }),
12405
12414
  /* @__PURE__ */ e("div", { className: "cedros-admin-withdrawal-th cedros-admin-withdrawal-th-action", children: "Action" })
12406
12415
  ] }),
12407
- x.map((F) => {
12408
- const W = Rs(F.withdrawalAvailableAt), $ = T === F.id;
12416
+ D.map((F) => {
12417
+ const W = Rs(F.withdrawalAvailableAt), $ = L === F.id;
12409
12418
  return /* @__PURE__ */ i(
12410
12419
  "div",
12411
12420
  {
@@ -12429,7 +12438,7 @@ function Ei({
12429
12438
  onClick: (H) => {
12430
12439
  H.stopPropagation(), ce(F);
12431
12440
  },
12432
- disabled: $ || P,
12441
+ disabled: $ || T,
12433
12442
  title: W ? "Early withdrawal (requires confirmation)" : "Process this withdrawal",
12434
12443
  children: $ ? "..." : W ? "Early" : "Process"
12435
12444
  }
@@ -12510,27 +12519,27 @@ function Mi({
12510
12519
  onLoad: a,
12511
12520
  onItemClick: n
12512
12521
  }) {
12513
- const { listInPrivacyPeriod: o, isLoading: c, error: l, clearError: d } = $e(), [u, g] = N([]), [m, h] = N(0), [y, f] = N(0), [p, v] = N(null), k = C(async () => {
12522
+ const { listInPrivacyPeriod: o, isLoading: c, error: l, clearError: d } = $e(), [u, g] = N([]), [m, h] = N(0), [y, f] = N(0), [p, v] = N(null), A = C(async () => {
12514
12523
  try {
12515
12524
  const w = await o({ limit: t, offset: y });
12516
12525
  g(w.deposits), h(w.total), a?.(w), v(null);
12517
12526
  } catch (w) {
12518
- const L = w && typeof w == "object" && "message" in w ? String(w.message) : "Failed to load deposits";
12519
- v(L);
12527
+ const P = w && typeof w == "object" && "message" in w ? String(w.message) : "Failed to load deposits";
12528
+ v(P);
12520
12529
  }
12521
12530
  }, [t, y, o, a]);
12522
12531
  U(() => {
12523
12532
  f(0);
12524
12533
  }, [t]), U(() => {
12525
- k();
12526
- }, [k]), U(() => {
12534
+ A();
12535
+ }, [A]), U(() => {
12527
12536
  if (s <= 0) return;
12528
- const w = setInterval(k, s);
12537
+ const w = setInterval(A, s);
12529
12538
  return () => clearInterval(w);
12530
- }, [s, k]);
12531
- const b = Math.ceil(m / t), _ = Math.floor(y / t) + 1, A = (w) => {
12532
- const L = (w - 1) * t;
12533
- f(Math.max(0, Math.min(L, Math.max(0, m - 1))));
12539
+ }, [s, A]);
12540
+ const b = Math.ceil(m / t), _ = Math.floor(y / t) + 1, k = (w) => {
12541
+ const P = (w - 1) * t;
12542
+ f(Math.max(0, Math.min(P, Math.max(0, m - 1))));
12534
12543
  }, E = p || l;
12535
12544
  return E ? /* @__PURE__ */ i(
12536
12545
  "div",
@@ -12544,7 +12553,7 @@ function Mi({
12544
12553
  type: "button",
12545
12554
  className: "cedros-button cedros-button-outline",
12546
12555
  onClick: () => {
12547
- d(), v(null), k();
12556
+ d(), v(null), A();
12548
12557
  },
12549
12558
  children: "Retry"
12550
12559
  }
@@ -12574,7 +12583,7 @@ function Mi({
12574
12583
  {
12575
12584
  type: "button",
12576
12585
  className: "cedros-button cedros-button-outline cedros-button-sm cedros-admin-icon-button",
12577
- onClick: k,
12586
+ onClick: A,
12578
12587
  disabled: c,
12579
12588
  title: "Refresh list",
12580
12589
  "aria-label": "Refresh list",
@@ -12640,8 +12649,8 @@ function Mi({
12640
12649
  {
12641
12650
  className: "cedros-admin-privacy-row",
12642
12651
  onClick: () => n?.(w),
12643
- onKeyDown: (L) => {
12644
- (L.key === "Enter" || L.key === " ") && (L.preventDefault(), n?.(w));
12652
+ onKeyDown: (P) => {
12653
+ (P.key === "Enter" || P.key === " ") && (P.preventDefault(), n?.(w));
12645
12654
  },
12646
12655
  role: n ? "button" : void 0,
12647
12656
  tabIndex: n ? 0 : void 0,
@@ -12661,7 +12670,7 @@ function Mi({
12661
12670
  {
12662
12671
  type: "button",
12663
12672
  className: "cedros-button cedros-button-outline cedros-button-sm",
12664
- onClick: () => A(_ - 1),
12673
+ onClick: () => k(_ - 1),
12665
12674
  disabled: _ <= 1,
12666
12675
  children: "Previous"
12667
12676
  }
@@ -12680,7 +12689,7 @@ function Mi({
12680
12689
  {
12681
12690
  type: "button",
12682
12691
  className: "cedros-button cedros-button-outline cedros-button-sm",
12683
- onClick: () => A(_ + 1),
12692
+ onClick: () => k(_ + 1),
12684
12693
  disabled: _ >= b,
12685
12694
  children: "Next"
12686
12695
  }
@@ -12714,62 +12723,62 @@ function Fi({
12714
12723
  onLoad: a,
12715
12724
  onItemClick: n
12716
12725
  }) {
12717
- const { listDeposits: o, isLoading: c, error: l, clearError: d } = $e(), [u, g] = N([]), [m, h] = N(0), [y, f] = N(0), [p, v] = N(null), [k, b] = N("completedAt"), [_, A] = N("desc"), E = (S) => {
12718
- k === S ? A(_ === "asc" ? "desc" : "asc") : (b(S), A("desc"));
12719
- }, w = O(() => [...u].sort((S, P) => {
12726
+ const { listDeposits: o, isLoading: c, error: l, clearError: d } = $e(), [u, g] = N([]), [m, h] = N(0), [y, f] = N(0), [p, v] = N(null), [A, b] = N("completedAt"), [_, k] = N("desc"), E = (S) => {
12727
+ A === S ? k(_ === "asc" ? "desc" : "asc") : (b(S), k("desc"));
12728
+ }, w = O(() => [...u].sort((S, T) => {
12720
12729
  let R, I;
12721
- switch (k) {
12730
+ switch (A) {
12722
12731
  case "userId":
12723
- R = S.userId.toLowerCase(), I = P.userId.toLowerCase();
12732
+ R = S.userId.toLowerCase(), I = T.userId.toLowerCase();
12724
12733
  break;
12725
12734
  case "amountLamports":
12726
- R = S.amountLamports ?? 0, I = P.amountLamports ?? 0;
12735
+ R = S.amountLamports ?? 0, I = T.amountLamports ?? 0;
12727
12736
  break;
12728
12737
  case "completedAt":
12729
- R = S.completedAt ? new Date(S.completedAt).getTime() : 0, I = P.completedAt ? new Date(P.completedAt).getTime() : 0;
12738
+ R = S.completedAt ? new Date(S.completedAt).getTime() : 0, I = T.completedAt ? new Date(T.completedAt).getTime() : 0;
12730
12739
  break;
12731
12740
  case "withdrawalTxSignature":
12732
- R = S.withdrawalTxSignature || "", I = P.withdrawalTxSignature || "";
12741
+ R = S.withdrawalTxSignature || "", I = T.withdrawalTxSignature || "";
12733
12742
  break;
12734
12743
  default:
12735
12744
  return 0;
12736
12745
  }
12737
12746
  return R < I ? _ === "asc" ? -1 : 1 : R > I ? _ === "asc" ? 1 : -1 : 0;
12738
- }), [u, k, _]), L = C(async () => {
12747
+ }), [u, A, _]), P = C(async () => {
12739
12748
  try {
12740
12749
  const S = await o({ status: "withdrawn", limit: t, offset: y });
12741
12750
  g(S.deposits), h(S.total), a?.(S), v(null);
12742
12751
  } catch (S) {
12743
- const P = S && typeof S == "object" && "message" in S ? String(S.message) : "Failed to load withdrawal history";
12744
- v(P);
12752
+ const T = S && typeof S == "object" && "message" in S ? String(S.message) : "Failed to load withdrawal history";
12753
+ v(T);
12745
12754
  }
12746
12755
  }, [t, y, o, a]);
12747
12756
  U(() => {
12748
12757
  f(0);
12749
12758
  }, [t]), U(() => {
12750
- L();
12751
- }, [L]), U(() => {
12759
+ P();
12760
+ }, [P]), U(() => {
12752
12761
  if (s <= 0) return;
12753
- const S = setInterval(L, s);
12762
+ const S = setInterval(P, s);
12754
12763
  return () => clearInterval(S);
12755
- }, [s, L]);
12756
- const M = Math.ceil(m / t), D = Math.floor(y / t) + 1, x = (S) => {
12757
- const P = (S - 1) * t;
12758
- f(Math.max(0, Math.min(P, Math.max(0, m - 1))));
12759
- }, T = p || l;
12760
- return T ? /* @__PURE__ */ i(
12764
+ }, [s, P]);
12765
+ const x = Math.ceil(m / t), M = Math.floor(y / t) + 1, D = (S) => {
12766
+ const T = (S - 1) * t;
12767
+ f(Math.max(0, Math.min(T, Math.max(0, m - 1))));
12768
+ }, L = p || l;
12769
+ return L ? /* @__PURE__ */ i(
12761
12770
  "div",
12762
12771
  {
12763
12772
  className: `cedros-admin-withdrawal-history cedros-admin-withdrawal-history-error ${r}`,
12764
12773
  children: [
12765
- /* @__PURE__ */ e("p", { className: "cedros-admin-error", children: T }),
12774
+ /* @__PURE__ */ e("p", { className: "cedros-admin-error", children: L }),
12766
12775
  /* @__PURE__ */ e(
12767
12776
  "button",
12768
12777
  {
12769
12778
  type: "button",
12770
12779
  className: "cedros-button cedros-button-outline",
12771
12780
  onClick: () => {
12772
- d(), v(null), L();
12781
+ d(), v(null), P();
12773
12782
  },
12774
12783
  children: "Retry"
12775
12784
  }
@@ -12799,7 +12808,7 @@ function Fi({
12799
12808
  {
12800
12809
  type: "button",
12801
12810
  className: "cedros-button cedros-button-outline cedros-button-sm cedros-admin-icon-button",
12802
- onClick: L,
12811
+ onClick: P,
12803
12812
  disabled: c,
12804
12813
  title: "Refresh list",
12805
12814
  "aria-label": "Refresh list",
@@ -12815,13 +12824,13 @@ function Fi({
12815
12824
  "button",
12816
12825
  {
12817
12826
  type: "button",
12818
- className: `cedros-admin-sort-button ${k === "userId" ? "cedros-admin-sort-active" : ""}`,
12827
+ className: `cedros-admin-sort-button ${A === "userId" ? "cedros-admin-sort-active" : ""}`,
12819
12828
  onClick: () => E("userId"),
12820
12829
  "aria-label": "Sort by user",
12821
12830
  children: [
12822
12831
  "User",
12823
12832
  " ",
12824
- /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: k === "userId" ? _ === "asc" ? "↑" : "↓" : "↕" })
12833
+ /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: A === "userId" ? _ === "asc" ? "↑" : "↓" : "↕" })
12825
12834
  ]
12826
12835
  }
12827
12836
  ) }),
@@ -12829,13 +12838,13 @@ function Fi({
12829
12838
  "button",
12830
12839
  {
12831
12840
  type: "button",
12832
- className: `cedros-admin-sort-button ${k === "amountLamports" ? "cedros-admin-sort-active" : ""}`,
12841
+ className: `cedros-admin-sort-button ${A === "amountLamports" ? "cedros-admin-sort-active" : ""}`,
12833
12842
  onClick: () => E("amountLamports"),
12834
12843
  "aria-label": "Sort by amount",
12835
12844
  children: [
12836
12845
  "Amount",
12837
12846
  " ",
12838
- /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: k === "amountLamports" ? _ === "asc" ? "↑" : "↓" : "↕" })
12847
+ /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: A === "amountLamports" ? _ === "asc" ? "↑" : "↓" : "↕" })
12839
12848
  ]
12840
12849
  }
12841
12850
  ) }),
@@ -12843,13 +12852,13 @@ function Fi({
12843
12852
  "button",
12844
12853
  {
12845
12854
  type: "button",
12846
- className: `cedros-admin-sort-button ${k === "completedAt" ? "cedros-admin-sort-active" : ""}`,
12855
+ className: `cedros-admin-sort-button ${A === "completedAt" ? "cedros-admin-sort-active" : ""}`,
12847
12856
  onClick: () => E("completedAt"),
12848
12857
  "aria-label": "Sort by processed",
12849
12858
  children: [
12850
12859
  "Processed",
12851
12860
  " ",
12852
- /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: k === "completedAt" ? _ === "asc" ? "↑" : "↓" : "↕" })
12861
+ /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: A === "completedAt" ? _ === "asc" ? "↑" : "↓" : "↕" })
12853
12862
  ]
12854
12863
  }
12855
12864
  ) }),
@@ -12857,13 +12866,13 @@ function Fi({
12857
12866
  "button",
12858
12867
  {
12859
12868
  type: "button",
12860
- className: `cedros-admin-sort-button ${k === "withdrawalTxSignature" ? "cedros-admin-sort-active" : ""}`,
12869
+ className: `cedros-admin-sort-button ${A === "withdrawalTxSignature" ? "cedros-admin-sort-active" : ""}`,
12861
12870
  onClick: () => E("withdrawalTxSignature"),
12862
12871
  "aria-label": "Sort by transaction",
12863
12872
  children: [
12864
12873
  "Transaction",
12865
12874
  " ",
12866
- /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: k === "withdrawalTxSignature" ? _ === "asc" ? "↑" : "↓" : "↕" })
12875
+ /* @__PURE__ */ e("span", { className: "cedros-admin-sort-icon", children: A === "withdrawalTxSignature" ? _ === "asc" ? "↑" : "↓" : "↕" })
12867
12876
  ]
12868
12877
  }
12869
12878
  ) })
@@ -12873,8 +12882,8 @@ function Fi({
12873
12882
  {
12874
12883
  className: "cedros-admin-history-row",
12875
12884
  onClick: () => n?.(S),
12876
- onKeyDown: (P) => {
12877
- (P.key === "Enter" || P.key === " ") && (P.preventDefault(), n?.(S));
12885
+ onKeyDown: (T) => {
12886
+ (T.key === "Enter" || T.key === " ") && (T.preventDefault(), n?.(S));
12878
12887
  },
12879
12888
  role: n ? "button" : void 0,
12880
12889
  tabIndex: n ? 0 : void 0,
@@ -12889,7 +12898,7 @@ function Fi({
12889
12898
  target: "_blank",
12890
12899
  rel: "noopener noreferrer",
12891
12900
  className: "cedros-admin-tx-link",
12892
- onClick: (P) => P.stopPropagation(),
12901
+ onClick: (T) => T.stopPropagation(),
12893
12902
  title: S.withdrawalTxSignature,
12894
12903
  children: Ii(S.withdrawalTxSignature)
12895
12904
  }
@@ -12899,22 +12908,22 @@ function Fi({
12899
12908
  S.id
12900
12909
  ))
12901
12910
  ] }),
12902
- M > 1 && /* @__PURE__ */ i("div", { className: "cedros-admin-pagination", children: [
12911
+ x > 1 && /* @__PURE__ */ i("div", { className: "cedros-admin-pagination", children: [
12903
12912
  /* @__PURE__ */ e(
12904
12913
  "button",
12905
12914
  {
12906
12915
  type: "button",
12907
12916
  className: "cedros-button cedros-button-outline cedros-button-sm",
12908
- onClick: () => x(D - 1),
12909
- disabled: D <= 1,
12917
+ onClick: () => D(M - 1),
12918
+ disabled: M <= 1,
12910
12919
  children: "Previous"
12911
12920
  }
12912
12921
  ),
12913
12922
  /* @__PURE__ */ i("span", { className: "cedros-admin-page-info", children: [
12914
12923
  "Page ",
12915
- D,
12916
- " of ",
12917
12924
  M,
12925
+ " of ",
12926
+ x,
12918
12927
  " (",
12919
12928
  m,
12920
12929
  " total)"
@@ -12924,8 +12933,8 @@ function Fi({
12924
12933
  {
12925
12934
  type: "button",
12926
12935
  className: "cedros-button cedros-button-outline cedros-button-sm",
12927
- onClick: () => x(D + 1),
12928
- disabled: D >= M,
12936
+ onClick: () => D(M + 1),
12937
+ disabled: M >= x,
12929
12938
  children: "Next"
12930
12939
  }
12931
12940
  )
@@ -12954,33 +12963,33 @@ function qi({
12954
12963
  onLoad: n,
12955
12964
  onUserClick: o
12956
12965
  }) {
12957
- const { users: c, total: l, isLoading: d, error: u, listUsers: g, clearError: m } = ls(), [h, y] = N(0), [f, p] = N(null), [v, k] = N("createdAt"), [b, _] = N("desc"), A = (x) => {
12958
- v === x ? _(b === "asc" ? "desc" : "asc") : (k(x), _("desc"));
12959
- }, E = O(() => [...c].sort((x, T) => {
12960
- let S, P;
12966
+ const { users: c, total: l, isLoading: d, error: u, listUsers: g, clearError: m } = ls(), [h, y] = N(0), [f, p] = N(null), [v, A] = N("createdAt"), [b, _] = N("desc"), k = (D) => {
12967
+ v === D ? _(b === "asc" ? "desc" : "asc") : (A(D), _("desc"));
12968
+ }, E = O(() => [...c].sort((D, L) => {
12969
+ let S, T;
12961
12970
  switch (v) {
12962
12971
  case "name":
12963
- S = (x.name || x.email || "").toLowerCase(), P = (T.name || T.email || "").toLowerCase();
12972
+ S = (D.name || D.email || "").toLowerCase(), T = (L.name || L.email || "").toLowerCase();
12964
12973
  break;
12965
12974
  case "createdAt":
12966
- S = new Date(x.createdAt).getTime(), P = new Date(T.createdAt).getTime();
12975
+ S = new Date(D.createdAt).getTime(), T = new Date(L.createdAt).getTime();
12967
12976
  break;
12968
12977
  case "lastLoginAt":
12969
- S = x.lastLoginAt ? new Date(x.lastLoginAt).getTime() : 0, P = T.lastLoginAt ? new Date(T.lastLoginAt).getTime() : 0;
12978
+ S = D.lastLoginAt ? new Date(D.lastLoginAt).getTime() : 0, T = L.lastLoginAt ? new Date(L.lastLoginAt).getTime() : 0;
12970
12979
  break;
12971
12980
  case "balanceLamports":
12972
- S = x.balanceLamports ?? 0, P = T.balanceLamports ?? 0;
12981
+ S = D.balanceLamports ?? 0, T = L.balanceLamports ?? 0;
12973
12982
  break;
12974
12983
  default:
12975
12984
  return 0;
12976
12985
  }
12977
- return S < P ? b === "asc" ? -1 : 1 : S > P ? b === "asc" ? 1 : -1 : 0;
12986
+ return S < T ? b === "asc" ? -1 : 1 : S > T ? b === "asc" ? 1 : -1 : 0;
12978
12987
  }), [c, v, b]), w = C(async () => {
12979
12988
  try {
12980
- const x = await g({ limit: t, offset: h });
12981
- n?.(x), p(null);
12982
- } catch (x) {
12983
- p(x instanceof Error ? x.message : "Failed to load users");
12989
+ const D = await g({ limit: t, offset: h });
12990
+ n?.(D), p(null);
12991
+ } catch (D) {
12992
+ p(D instanceof Error ? D.message : "Failed to load users");
12984
12993
  }
12985
12994
  }, [t, h, g, n]);
12986
12995
  U(() => {
@@ -12989,12 +12998,12 @@ function qi({
12989
12998
  w();
12990
12999
  }, [w]), U(() => {
12991
13000
  if (s <= 0) return;
12992
- const x = setInterval(w, s);
12993
- return () => clearInterval(x);
13001
+ const D = setInterval(w, s);
13002
+ return () => clearInterval(D);
12994
13003
  }, [s, w]);
12995
- const L = Math.ceil(l / t), M = Math.floor(h / t) + 1, D = (x) => {
12996
- const T = (x - 1) * t;
12997
- y(Math.max(0, Math.min(T, Math.max(0, l - 1))));
13004
+ const P = Math.ceil(l / t), x = Math.floor(h / t) + 1, M = (D) => {
13005
+ const L = (D - 1) * t;
13006
+ y(Math.max(0, Math.min(L, Math.max(0, l - 1))));
12998
13007
  };
12999
13008
  return f || u ? /* @__PURE__ */ i("div", { className: `cedros-admin-user-list cedros-admin-user-list-error ${a}`, children: [
13000
13009
  /* @__PURE__ */ e("p", { className: "cedros-admin-error", children: f || u?.message }),
@@ -13043,7 +13052,7 @@ function qi({
13043
13052
  {
13044
13053
  type: "button",
13045
13054
  className: `cedros-admin-sort-button ${v === "name" ? "cedros-admin-sort-active" : ""}`,
13046
- onClick: () => A("name"),
13055
+ onClick: () => k("name"),
13047
13056
  "aria-label": "Sort by user",
13048
13057
  children: [
13049
13058
  "User",
@@ -13057,7 +13066,7 @@ function qi({
13057
13066
  {
13058
13067
  type: "button",
13059
13068
  className: `cedros-admin-sort-button ${v === "createdAt" ? "cedros-admin-sort-active" : ""}`,
13060
- onClick: () => A("createdAt"),
13069
+ onClick: () => k("createdAt"),
13061
13070
  "aria-label": "Sort by registered date",
13062
13071
  children: [
13063
13072
  "Registered",
@@ -13071,7 +13080,7 @@ function qi({
13071
13080
  {
13072
13081
  type: "button",
13073
13082
  className: `cedros-admin-sort-button ${v === "lastLoginAt" ? "cedros-admin-sort-active" : ""}`,
13074
- onClick: () => A("lastLoginAt"),
13083
+ onClick: () => k("lastLoginAt"),
13075
13084
  "aria-label": "Sort by last login",
13076
13085
  children: [
13077
13086
  "Last Login",
@@ -13085,7 +13094,7 @@ function qi({
13085
13094
  {
13086
13095
  type: "button",
13087
13096
  className: `cedros-admin-sort-button ${v === "balanceLamports" ? "cedros-admin-sort-active" : ""}`,
13088
- onClick: () => A("balanceLamports"),
13097
+ onClick: () => k("balanceLamports"),
13089
13098
  "aria-label": "Sort by balance",
13090
13099
  children: [
13091
13100
  "Balance",
@@ -13095,62 +13104,62 @@ function qi({
13095
13104
  }
13096
13105
  ) })
13097
13106
  ] }),
13098
- E.map((x) => {
13099
- const T = x.id === r;
13107
+ E.map((D) => {
13108
+ const L = D.id === r;
13100
13109
  return /* @__PURE__ */ i(
13101
13110
  "div",
13102
13111
  {
13103
- className: `cedros-admin-user-row ${T ? "cedros-admin-user-row-current" : ""}`,
13104
- onClick: () => o?.(x),
13112
+ className: `cedros-admin-user-row ${L ? "cedros-admin-user-row-current" : ""}`,
13113
+ onClick: () => o?.(D),
13105
13114
  onKeyDown: (S) => {
13106
- (S.key === "Enter" || S.key === " ") && (S.preventDefault(), o?.(x));
13115
+ (S.key === "Enter" || S.key === " ") && (S.preventDefault(), o?.(D));
13107
13116
  },
13108
13117
  role: o ? "button" : void 0,
13109
13118
  tabIndex: o ? 0 : void 0,
13110
13119
  children: [
13111
13120
  /* @__PURE__ */ i("div", { className: "cedros-admin-user-td cedros-admin-user-info", children: [
13112
- /* @__PURE__ */ e("div", { className: "cedros-admin-user-avatar", children: x.picture ? /* @__PURE__ */ e(
13121
+ /* @__PURE__ */ e("div", { className: "cedros-admin-user-avatar", children: D.picture ? /* @__PURE__ */ e(
13113
13122
  "img",
13114
13123
  {
13115
- src: x.picture,
13116
- alt: x.name || x.email || "User",
13124
+ src: D.picture,
13125
+ alt: D.name || D.email || "User",
13117
13126
  className: "cedros-admin-user-avatar-img",
13118
13127
  referrerPolicy: "no-referrer"
13119
13128
  }
13120
- ) : /* @__PURE__ */ e("span", { className: "cedros-admin-user-avatar-placeholder", children: (x.name?.[0] || x.email?.[0] || "?").toUpperCase() }) }),
13129
+ ) : /* @__PURE__ */ e("span", { className: "cedros-admin-user-avatar-placeholder", children: (D.name?.[0] || D.email?.[0] || "?").toUpperCase() }) }),
13121
13130
  /* @__PURE__ */ i("div", { className: "cedros-admin-user-details", children: [
13122
13131
  /* @__PURE__ */ i("span", { className: "cedros-admin-user-name", children: [
13123
- x.name || "Unknown",
13124
- T && /* @__PURE__ */ e("span", { className: "cedros-admin-user-you", children: "(you)" })
13132
+ D.name || "Unknown",
13133
+ L && /* @__PURE__ */ e("span", { className: "cedros-admin-user-you", children: "(you)" })
13125
13134
  ] }),
13126
- /* @__PURE__ */ e("span", { className: "cedros-admin-user-email", title: x.email, children: x.email || Bi(x.id) })
13135
+ /* @__PURE__ */ e("span", { className: "cedros-admin-user-email", title: D.email, children: D.email || Bi(D.id) })
13127
13136
  ] })
13128
13137
  ] }),
13129
- /* @__PURE__ */ e("div", { className: "cedros-admin-user-td", children: Is(x.createdAt) }),
13130
- /* @__PURE__ */ e("div", { className: "cedros-admin-user-td", children: x.lastLoginAt ? Is(x.lastLoginAt) : "-" }),
13131
- /* @__PURE__ */ e("div", { className: "cedros-admin-user-td", children: Oi(x.balanceLamports) })
13138
+ /* @__PURE__ */ e("div", { className: "cedros-admin-user-td", children: Is(D.createdAt) }),
13139
+ /* @__PURE__ */ e("div", { className: "cedros-admin-user-td", children: D.lastLoginAt ? Is(D.lastLoginAt) : "-" }),
13140
+ /* @__PURE__ */ e("div", { className: "cedros-admin-user-td", children: Oi(D.balanceLamports) })
13132
13141
  ]
13133
13142
  },
13134
- x.id
13143
+ D.id
13135
13144
  );
13136
13145
  })
13137
13146
  ] }),
13138
- L > 1 && /* @__PURE__ */ i("div", { className: "cedros-admin-pagination", children: [
13147
+ P > 1 && /* @__PURE__ */ i("div", { className: "cedros-admin-pagination", children: [
13139
13148
  /* @__PURE__ */ e(
13140
13149
  "button",
13141
13150
  {
13142
13151
  type: "button",
13143
13152
  className: "cedros-button cedros-button-outline cedros-button-sm",
13144
- onClick: () => D(M - 1),
13145
- disabled: M <= 1,
13153
+ onClick: () => M(x - 1),
13154
+ disabled: x <= 1,
13146
13155
  children: "Previous"
13147
13156
  }
13148
13157
  ),
13149
13158
  /* @__PURE__ */ i("span", { className: "cedros-admin-page-info", children: [
13150
13159
  "Page ",
13151
- M,
13160
+ x,
13152
13161
  " of ",
13153
- L,
13162
+ P,
13154
13163
  " (",
13155
13164
  l,
13156
13165
  " total)"
@@ -13160,8 +13169,8 @@ function qi({
13160
13169
  {
13161
13170
  type: "button",
13162
13171
  className: "cedros-button cedros-button-outline cedros-button-sm",
13163
- onClick: () => D(M + 1),
13164
- disabled: M >= L,
13172
+ onClick: () => M(x + 1),
13173
+ disabled: x >= P,
13165
13174
  children: "Next"
13166
13175
  }
13167
13176
  )
@@ -13234,17 +13243,17 @@ function zi({
13234
13243
  deleteUser: h,
13235
13244
  forcePasswordReset: y,
13236
13245
  clearError: f
13237
- } = ls(), [p, v] = N(null), [k, b] = N(null), [_, A] = N(null), [E, w] = N(null), [L, M] = N("deposits"), [D, x] = N(null), [T, S] = N(null), [P, R] = N(null), [I, j] = N(null), [ee, ne] = N(!1), [V, Y] = N(0), [q, Z] = N(0), [ce, le] = N(0), te = 10, F = C(async () => {
13246
+ } = ls(), [p, v] = N(null), [A, b] = N(null), [_, k] = N(null), [E, w] = N(null), [P, x] = N("deposits"), [M, D] = N(null), [L, S] = N(null), [T, R] = N(null), [I, j] = N(null), [ee, ne] = N(!1), [V, Y] = N(0), [q, Z] = N(0), [ce, le] = N(0), te = 10, F = C(async () => {
13238
13247
  try {
13239
13248
  const J = await d(t);
13240
- v(J), x(null);
13249
+ v(J), D(null);
13241
13250
  } catch (J) {
13242
- x(J instanceof Error ? J.message : "Failed to load user");
13251
+ D(J instanceof Error ? J.message : "Failed to load user");
13243
13252
  }
13244
13253
  }, [t, d]), W = C(async () => {
13245
13254
  try {
13246
13255
  const Ae = await u(t, { limit: te, offset: V });
13247
- A(Ae), R(null);
13256
+ k(Ae), R(null);
13248
13257
  } catch (J) {
13249
13258
  R(J instanceof Error ? J.message : "Failed to load deposits");
13250
13259
  }
@@ -13302,14 +13311,14 @@ function zi({
13302
13311
  ne(!1);
13303
13312
  }
13304
13313
  }
13305
- }, Ke = _ ? Math.ceil(_.total / te) : 0, We = Math.floor(V / te) + 1, Ce = k ? Math.ceil(k.totalTransactions / te) : 0, bt = Math.floor(q / te) + 1, je = (J) => {
13314
+ }, Ke = _ ? Math.ceil(_.total / te) : 0, We = Math.floor(V / te) + 1, Ce = A ? Math.ceil(A.totalTransactions / te) : 0, bt = Math.floor(q / te) + 1, je = (J) => {
13306
13315
  Y((J - 1) * te);
13307
13316
  }, xe = (J) => {
13308
13317
  Z((J - 1) * te);
13309
13318
  }, Ge = E ? Math.ceil(E.total / te) : 0, wt = Math.floor(ce / te) + 1, vt = (J) => {
13310
13319
  le((J - 1) * te);
13311
13320
  };
13312
- if (D)
13321
+ if (M)
13313
13322
  return /* @__PURE__ */ i("div", { className: `cedros-admin-user-detail cedros-admin-user-detail-error ${c}`, children: [
13314
13323
  /* @__PURE__ */ e(
13315
13324
  "button",
@@ -13320,14 +13329,14 @@ function zi({
13320
13329
  children: "Back"
13321
13330
  }
13322
13331
  ),
13323
- /* @__PURE__ */ e("p", { className: "cedros-admin-error", children: D }),
13332
+ /* @__PURE__ */ e("p", { className: "cedros-admin-error", children: M }),
13324
13333
  /* @__PURE__ */ e(
13325
13334
  "button",
13326
13335
  {
13327
13336
  type: "button",
13328
13337
  className: "cedros-button cedros-button-outline",
13329
13338
  onClick: () => {
13330
- f(), x(null), F();
13339
+ f(), D(null), F();
13331
13340
  },
13332
13341
  children: "Retry"
13333
13342
  }
@@ -13445,8 +13454,8 @@ function zi({
13445
13454
  ] })
13446
13455
  ] })
13447
13456
  ] }),
13448
- T ? /* @__PURE__ */ i("div", { className: "cedros-admin-stats-error", children: [
13449
- /* @__PURE__ */ e("p", { className: "cedros-admin-error-inline", children: T }),
13457
+ L ? /* @__PURE__ */ i("div", { className: "cedros-admin-stats-error", children: [
13458
+ /* @__PURE__ */ e("p", { className: "cedros-admin-error-inline", children: L }),
13450
13459
  /* @__PURE__ */ e(
13451
13460
  "button",
13452
13461
  {
@@ -13458,26 +13467,26 @@ function zi({
13458
13467
  children: "Retry"
13459
13468
  }
13460
13469
  )
13461
- ] }) : k ? /* @__PURE__ */ i("div", { className: "cedros-admin-user-detail-stats", children: [
13470
+ ] }) : A ? /* @__PURE__ */ i("div", { className: "cedros-admin-user-detail-stats", children: [
13462
13471
  /* @__PURE__ */ i("div", { className: "cedros-admin-stat-card", children: [
13463
13472
  /* @__PURE__ */ e("span", { className: "cedros-admin-stat-label", children: "Credit Balance" }),
13464
- /* @__PURE__ */ e("span", { className: "cedros-admin-stat-value", children: nt(k.stats.currentBalanceLamports) })
13473
+ /* @__PURE__ */ e("span", { className: "cedros-admin-stat-value", children: nt(A.stats.currentBalanceLamports) })
13465
13474
  ] }),
13466
13475
  /* @__PURE__ */ i("div", { className: "cedros-admin-stat-card", children: [
13467
13476
  /* @__PURE__ */ e("span", { className: "cedros-admin-stat-label", children: "Total Credited" }),
13468
- /* @__PURE__ */ e("span", { className: "cedros-admin-stat-value", children: nt(k.stats.totalDepositedLamports) })
13477
+ /* @__PURE__ */ e("span", { className: "cedros-admin-stat-value", children: nt(A.stats.totalDepositedLamports) })
13469
13478
  ] }),
13470
13479
  /* @__PURE__ */ i("div", { className: "cedros-admin-stat-card", children: [
13471
13480
  /* @__PURE__ */ e("span", { className: "cedros-admin-stat-label", children: "Total Spent" }),
13472
- /* @__PURE__ */ e("span", { className: "cedros-admin-stat-value", children: nt(k.stats.totalSpentLamports) })
13481
+ /* @__PURE__ */ e("span", { className: "cedros-admin-stat-value", children: nt(A.stats.totalSpentLamports) })
13473
13482
  ] }),
13474
13483
  /* @__PURE__ */ i("div", { className: "cedros-admin-stat-card", children: [
13475
13484
  /* @__PURE__ */ e("span", { className: "cedros-admin-stat-label", children: "Deposits" }),
13476
- /* @__PURE__ */ e("span", { className: "cedros-admin-stat-value", children: k.stats.depositCount })
13485
+ /* @__PURE__ */ e("span", { className: "cedros-admin-stat-value", children: A.stats.depositCount })
13477
13486
  ] }),
13478
13487
  /* @__PURE__ */ i("div", { className: "cedros-admin-stat-card", children: [
13479
13488
  /* @__PURE__ */ e("span", { className: "cedros-admin-stat-label", children: "Transactions" }),
13480
- /* @__PURE__ */ e("span", { className: "cedros-admin-stat-value", children: k.stats.spendCount })
13489
+ /* @__PURE__ */ e("span", { className: "cedros-admin-stat-value", children: A.stats.spendCount })
13481
13490
  ] })
13482
13491
  ] }) : /* @__PURE__ */ i("div", { className: "cedros-admin-stats-loading", children: [
13483
13492
  /* @__PURE__ */ e("span", { className: "cedros-admin-loading-indicator" }),
@@ -13488,8 +13497,8 @@ function zi({
13488
13497
  "button",
13489
13498
  {
13490
13499
  type: "button",
13491
- className: `cedros-admin-tab ${L === "deposits" ? "cedros-admin-tab-active" : ""}`,
13492
- onClick: () => M("deposits"),
13500
+ className: `cedros-admin-tab ${P === "deposits" ? "cedros-admin-tab-active" : ""}`,
13501
+ onClick: () => x("deposits"),
13493
13502
  children: [
13494
13503
  "Deposits (",
13495
13504
  _?.total ?? 0,
@@ -13501,11 +13510,11 @@ function zi({
13501
13510
  "button",
13502
13511
  {
13503
13512
  type: "button",
13504
- className: `cedros-admin-tab ${L === "transactions" ? "cedros-admin-tab-active" : ""}`,
13505
- onClick: () => M("transactions"),
13513
+ className: `cedros-admin-tab ${P === "transactions" ? "cedros-admin-tab-active" : ""}`,
13514
+ onClick: () => x("transactions"),
13506
13515
  children: [
13507
13516
  "Credits (",
13508
- k?.totalTransactions ?? 0,
13517
+ A?.totalTransactions ?? 0,
13509
13518
  ")"
13510
13519
  ]
13511
13520
  }
@@ -13514,8 +13523,8 @@ function zi({
13514
13523
  "button",
13515
13524
  {
13516
13525
  type: "button",
13517
- className: `cedros-admin-tab ${L === "chats" ? "cedros-admin-tab-active" : ""}`,
13518
- onClick: () => M("chats"),
13526
+ className: `cedros-admin-tab ${P === "chats" ? "cedros-admin-tab-active" : ""}`,
13527
+ onClick: () => x("chats"),
13519
13528
  children: [
13520
13529
  "Chats (",
13521
13530
  E?.total ?? 0,
@@ -13525,7 +13534,7 @@ function zi({
13525
13534
  )
13526
13535
  ] }),
13527
13536
  /* @__PURE__ */ i("div", { className: "cedros-admin-user-detail-content", children: [
13528
- L === "deposits" && /* @__PURE__ */ e(
13537
+ P === "deposits" && /* @__PURE__ */ e(
13529
13538
  Vi,
13530
13539
  {
13531
13540
  deposits: _?.deposits ?? [],
@@ -13534,28 +13543,28 @@ function zi({
13534
13543
  totalPages: Ke,
13535
13544
  onPageChange: je,
13536
13545
  isLoading: l,
13537
- error: P,
13546
+ error: T,
13538
13547
  onRetry: () => {
13539
13548
  R(null), W();
13540
13549
  }
13541
13550
  }
13542
13551
  ),
13543
- L === "transactions" && /* @__PURE__ */ e(
13552
+ P === "transactions" && /* @__PURE__ */ e(
13544
13553
  Hi,
13545
13554
  {
13546
- transactions: k?.transactions ?? [],
13547
- total: k?.totalTransactions ?? 0,
13555
+ transactions: A?.transactions ?? [],
13556
+ total: A?.totalTransactions ?? 0,
13548
13557
  currentPage: bt,
13549
13558
  totalPages: Ce,
13550
13559
  onPageChange: xe,
13551
- error: T,
13560
+ error: L,
13552
13561
  onRetry: () => {
13553
13562
  S(null), $();
13554
13563
  },
13555
13564
  isLoading: l
13556
13565
  }
13557
13566
  ),
13558
- L === "chats" && o && /* @__PURE__ */ e(
13567
+ P === "chats" && o && /* @__PURE__ */ e(
13559
13568
  Qi,
13560
13569
  {
13561
13570
  sessions: E?.sessions ?? [],
@@ -13823,14 +13832,14 @@ function Ki({ userRole: t }) {
13823
13832
  }, []);
13824
13833
  const y = C(
13825
13834
  (f, p, v) => {
13826
- const k = {
13835
+ const A = {
13827
13836
  ...s,
13828
13837
  [f]: {
13829
13838
  ...s[f],
13830
13839
  [p]: v
13831
13840
  }
13832
13841
  };
13833
- h(k);
13842
+ h(A);
13834
13843
  },
13835
13844
  [s, h]
13836
13845
  );
@@ -14253,17 +14262,17 @@ function jc({
14253
14262
  onLogoutClick: l,
14254
14263
  className: d = ""
14255
14264
  }) {
14256
- const [u, g] = N(r), [m, h] = N(!0), { user: y, logout: f } = ae(), { activeOrg: p, role: v, isLoading: k, fetchOrgs: b, hasPermission: _ } = is(), { status: A, isLoading: E, checkStatus: w } = jr(), { features: L, isLoading: M } = Hr(), { canAccess: D } = Qr(), x = C(
14265
+ const [u, g] = N(r), [m, h] = N(!0), { user: y, logout: f } = ae(), { activeOrg: p, role: v, isLoading: A, fetchOrgs: b, hasPermission: _ } = is(), { status: k, isLoading: E, checkStatus: w } = jr(), { features: P, isLoading: x } = Hr(), { canAccess: M } = Qr(), D = C(
14257
14266
  (I) => {
14258
14267
  g(I), o?.(I);
14259
14268
  },
14260
14269
  [o]
14261
- ), T = Gi.filter((I) => !(!s.includes(I.id) || I.requiredFeature && !L[I.requiredFeature] || !D(I.id))), S = T.find((I) => I.id === u), P = !S && !M;
14270
+ ), L = Gi.filter((I) => !(!s.includes(I.id) || I.requiredFeature && !P[I.requiredFeature] || !M(I.id))), S = L.find((I) => I.id === u), T = !S && !x;
14262
14271
  return U(() => {
14263
14272
  b(), w();
14264
14273
  }, [b, w]), U(() => {
14265
- P && T.length > 0 && g("users");
14266
- }, [P, T.length]), !E && A?.needsSetup ? /* @__PURE__ */ e("div", { className: `cedros-admin cedros-dashboard cedros-dashboard--setup ${d}`, children: /* @__PURE__ */ e(Ro, { onComplete: () => w() }) }) : (k || E || M) && !p ? /* @__PURE__ */ i("div", { className: `cedros-admin cedros-dashboard cedros-dashboard--loading ${d}`, children: [
14274
+ T && L.length > 0 && g("users");
14275
+ }, [T, L.length]), !E && k?.needsSetup ? /* @__PURE__ */ e("div", { className: `cedros-admin cedros-dashboard cedros-dashboard--setup ${d}`, children: /* @__PURE__ */ e(Ro, { onComplete: () => w() }) }) : (A || E || x) && !p ? /* @__PURE__ */ i("div", { className: `cedros-admin cedros-dashboard cedros-dashboard--loading ${d}`, children: [
14267
14276
  /* @__PURE__ */ e(G, {}),
14268
14277
  /* @__PURE__ */ e("span", { className: "cedros-dashboard__loading-text", children: "Loading..." })
14269
14278
  ] }) : u === "team" && !p ? /* @__PURE__ */ e("div", { className: `cedros-admin cedros-dashboard ${d}`, children: /* @__PURE__ */ e(re, { error: "No organization selected. Please select an organization first." }) }) : /* @__PURE__ */ i("div", { className: `cedros-admin cedros-dashboard ${d}`, children: [
@@ -14275,12 +14284,12 @@ function jc({
14275
14284
  /* @__PURE__ */ i("nav", { className: "cedros-dashboard__nav", children: [
14276
14285
  /* @__PURE__ */ i("div", { className: "cedros-dashboard__nav-group", children: [
14277
14286
  /* @__PURE__ */ e("span", { className: "cedros-dashboard__nav-label", children: "Menu" }),
14278
- T.filter((I) => !I.group).map((I) => /* @__PURE__ */ i(
14287
+ L.filter((I) => !I.group).map((I) => /* @__PURE__ */ i(
14279
14288
  "button",
14280
14289
  {
14281
14290
  type: "button",
14282
14291
  className: `cedros-dashboard__nav-item ${u === I.id ? "cedros-dashboard__nav-item--active" : ""}`,
14283
- onClick: () => x(I.id),
14292
+ onClick: () => D(I.id),
14284
14293
  "aria-current": u === I.id ? "page" : void 0,
14285
14294
  children: [
14286
14295
  /* @__PURE__ */ e("span", { className: "cedros-dashboard__nav-icon", children: I.icon }),
@@ -14290,7 +14299,7 @@ function jc({
14290
14299
  I.id
14291
14300
  ))
14292
14301
  ] }),
14293
- T.some((I) => I.group === "Configuration") && /* @__PURE__ */ i("div", { className: "cedros-dashboard__nav-group", children: [
14302
+ L.some((I) => I.group === "Configuration") && /* @__PURE__ */ i("div", { className: "cedros-dashboard__nav-group", children: [
14294
14303
  /* @__PURE__ */ i(
14295
14304
  "button",
14296
14305
  {
@@ -14304,12 +14313,12 @@ function jc({
14304
14313
  ]
14305
14314
  }
14306
14315
  ),
14307
- m && T.filter((I) => I.group === "Configuration").map((I) => /* @__PURE__ */ i(
14316
+ m && L.filter((I) => I.group === "Configuration").map((I) => /* @__PURE__ */ i(
14308
14317
  "button",
14309
14318
  {
14310
14319
  type: "button",
14311
14320
  className: `cedros-dashboard__nav-item ${u === I.id ? "cedros-dashboard__nav-item--active" : ""}`,
14312
- onClick: () => x(I.id),
14321
+ onClick: () => D(I.id),
14313
14322
  "aria-current": u === I.id ? "page" : void 0,
14314
14323
  children: [
14315
14324
  /* @__PURE__ */ e("span", { className: "cedros-dashboard__nav-icon", children: I.icon }),
@@ -14384,11 +14393,11 @@ function Yi({ pageSize: t, currentUserId: s }) {
14384
14393
  U(() => {
14385
14394
  v();
14386
14395
  }, [v]);
14387
- const k = O(() => {
14396
+ const A = O(() => {
14388
14397
  const b = [
14389
14398
  { label: "Total Users", value: n?.total ?? "—" }
14390
- ], _ = p("auth_email_enabled"), A = p("auth_google_enabled"), E = p("auth_apple_enabled"), w = p("auth_solana_enabled"), L = p("auth_webauthn_enabled"), M = p("feature_sso");
14391
- return _ && b.push({ label: "Email Users", value: n?.authMethodCounts.email ?? 0 }), A && b.push({ label: "Google Users", value: n?.authMethodCounts.google ?? 0 }), E && b.push({ label: "Apple Users", value: n?.authMethodCounts.apple ?? 0 }), w && b.push({ label: "Solana Users", value: n?.authMethodCounts.solana ?? 0 }), L && b.push({ label: "Passkey Users", value: n?.authMethodCounts.webauthn ?? 0 }), M && b.push({ label: "SSO Provider Users", value: n?.authMethodCounts.sso ?? 0 }), b;
14399
+ ], _ = p("auth_email_enabled"), k = p("auth_google_enabled"), E = p("auth_apple_enabled"), w = p("auth_solana_enabled"), P = p("auth_webauthn_enabled"), x = p("feature_sso");
14400
+ return _ && b.push({ label: "Email Users", value: n?.authMethodCounts.email ?? 0 }), k && b.push({ label: "Google Users", value: n?.authMethodCounts.google ?? 0 }), E && b.push({ label: "Apple Users", value: n?.authMethodCounts.apple ?? 0 }), w && b.push({ label: "Solana Users", value: n?.authMethodCounts.solana ?? 0 }), P && b.push({ label: "Passkey Users", value: n?.authMethodCounts.webauthn ?? 0 }), x && b.push({ label: "SSO Provider Users", value: n?.authMethodCounts.sso ?? 0 }), b;
14392
14401
  }, [n, p]);
14393
14402
  return r ? /* @__PURE__ */ e("div", { className: "cedros-dashboard__section", children: /* @__PURE__ */ e(
14394
14403
  zi,
@@ -14398,7 +14407,7 @@ function Yi({ pageSize: t, currentUserId: s }) {
14398
14407
  onBack: () => a(null)
14399
14408
  }
14400
14409
  ) }) : /* @__PURE__ */ i("div", { className: "cedros-dashboard__section", children: [
14401
- /* @__PURE__ */ e(He, { stats: k, isLoading: c, onRefresh: v }),
14410
+ /* @__PURE__ */ e(He, { stats: A, isLoading: c, onRefresh: v }),
14402
14411
  d && /* @__PURE__ */ e("p", { className: "cedros-admin-error-inline", children: d }),
14403
14412
  /* @__PURE__ */ e(
14404
14413
  qi,
@@ -14411,22 +14420,22 @@ function Yi({ pageSize: t, currentUserId: s }) {
14411
14420
  ] });
14412
14421
  }
14413
14422
  function Ji({ orgId: t, currentUserId: s, hasPermission: r, role: a }) {
14414
- const [n, o] = N("members"), { members: c, isLoading: l, error: d, fetchMembers: u, updateMemberRole: g, removeMember: m } = hi(t), { invites: h, isLoading: y, error: f, fetchInvites: p, createInvite: v, cancelInvite: k, resendInvite: b } = pi(t);
14423
+ const [n, o] = N("members"), { members: c, isLoading: l, error: d, fetchMembers: u, updateMemberRole: g, removeMember: m } = hi(t), { invites: h, isLoading: y, error: f, fetchInvites: p, createInvite: v, cancelInvite: A, resendInvite: b } = pi(t);
14415
14424
  U(() => {
14416
14425
  u(), p();
14417
14426
  }, [u, p]);
14418
- const _ = r("invite:create"), A = r("invite:cancel"), E = h.length, w = c.reduce(
14419
- (x, T) => (x[T.role] = (x[T.role] ?? 0) + 1, x),
14427
+ const _ = r("invite:create"), k = r("invite:cancel"), E = h.length, w = c.reduce(
14428
+ (D, L) => (D[L.role] = (D[L.role] ?? 0) + 1, D),
14420
14429
  {}
14421
- ), L = w.owner ?? 0, M = w.admin ?? 0, D = w.member ?? 0;
14430
+ ), P = w.owner ?? 0, x = w.admin ?? 0, M = w.member ?? 0;
14422
14431
  return /* @__PURE__ */ i("div", { className: "cedros-dashboard__team", children: [
14423
14432
  /* @__PURE__ */ e(
14424
14433
  He,
14425
14434
  {
14426
14435
  stats: [
14427
- { label: "Owners", value: L },
14428
- { label: "Admins", value: M },
14429
- { label: "Members", value: D },
14436
+ { label: "Owners", value: P },
14437
+ { label: "Admins", value: x },
14438
+ { label: "Members", value: M },
14430
14439
  { label: "Pending Invites", value: E }
14431
14440
  ]
14432
14441
  }
@@ -14494,8 +14503,8 @@ function Ji({ orgId: t, currentUserId: s, hasPermission: r, role: a }) {
14494
14503
  invites: h,
14495
14504
  isLoading: y,
14496
14505
  error: f?.message,
14497
- canManage: A || _,
14498
- onCancel: A ? k : void 0,
14506
+ canManage: k || _,
14507
+ onCancel: k ? A : void 0,
14499
14508
  onResend: _ ? b : void 0
14500
14509
  }
14501
14510
  ) })
@@ -14605,61 +14614,61 @@ function Vc({
14605
14614
  className: m = ""
14606
14615
  }) {
14607
14616
  const [h] = N(() => {
14608
- const T = new el();
14609
- return s.forEach((S) => T.register(S)), T;
14617
+ const L = new el();
14618
+ return s.forEach((S) => L.register(S)), L;
14610
14619
  }), [y, f] = N(
14611
14620
  () => h.getAll()
14612
14621
  );
14613
14622
  U(() => h.subscribe(f), [h]);
14614
14623
  const p = O(() => y.flatMap(
14615
- (T) => T.sections.filter((S) => !(S.requiredPermission && !T.checkPermission(S.requiredPermission, r) || r.dashboardPermissions && !r.dashboardPermissions.canAccess(S.id))).map(
14624
+ (L) => L.sections.filter((S) => !(S.requiredPermission && !L.checkPermission(S.requiredPermission, r) || r.dashboardPermissions && !r.dashboardPermissions.canAccess(S.id))).map(
14616
14625
  (S) => ({
14617
14626
  ...S,
14618
- qualifiedId: `${T.id}:${S.id}`,
14619
- pluginId: T.id,
14620
- cssNamespace: T.cssNamespace
14627
+ qualifiedId: `${L.id}:${S.id}`,
14628
+ pluginId: L.id,
14629
+ cssNamespace: L.cssNamespace
14621
14630
  })
14622
14631
  )
14623
- ), [y, r]), [v, k] = N(
14632
+ ), [y, r]), [v, A] = N(
14624
14633
  () => a ?? p[0]?.qualifiedId ?? null
14625
- ), [b, _] = N(/* @__PURE__ */ new Set()), A = C((T) => {
14634
+ ), [b, _] = N(/* @__PURE__ */ new Set()), k = C((L) => {
14626
14635
  _((S) => {
14627
- const P = new Set(S);
14628
- return P.has(T) ? P.delete(T) : P.add(T), P;
14636
+ const T = new Set(S);
14637
+ return T.has(L) ? T.delete(L) : T.add(L), T;
14629
14638
  });
14630
14639
  }, []);
14631
14640
  U(() => {
14632
- v && !p.find((T) => T.qualifiedId === v) && k(p[0]?.qualifiedId ?? null);
14641
+ v && !p.find((L) => L.qualifiedId === v) && A(p[0]?.qualifiedId ?? null);
14633
14642
  }, [p, v]);
14634
14643
  const E = C(
14635
- (T) => {
14636
- k(T), c?.(T);
14644
+ (L) => {
14645
+ A(L), c?.(L);
14637
14646
  },
14638
14647
  [c]
14639
14648
  ), w = C(
14640
- (T) => {
14641
- const S = h.get(T);
14649
+ (L) => {
14650
+ const S = h.get(L);
14642
14651
  return S ? S.createPluginContext(r) : null;
14643
14652
  },
14644
14653
  [h, r]
14645
- ), L = O(() => {
14646
- const T = tl(y), S = /* @__PURE__ */ new Map();
14654
+ ), P = O(() => {
14655
+ const L = tl(y), S = /* @__PURE__ */ new Map();
14647
14656
  return p.forEach((R) => {
14648
14657
  const I = R.group ?? "Menu", j = S.get(I) ?? [];
14649
14658
  S.set(I, [...j, R]);
14650
14659
  }), Array.from(S.entries()).sort(([R], [I]) => {
14651
- const j = T.get(R) ?? 99, ee = T.get(I) ?? 99;
14660
+ const j = L.get(R) ?? 99, ee = L.get(I) ?? 99;
14652
14661
  return j - ee;
14653
14662
  });
14654
- }, [p, y]), M = O(() => {
14663
+ }, [p, y]), x = O(() => {
14655
14664
  if (!v) return null;
14656
- const [T, S] = v.split(":"), P = h.get(T);
14657
- if (!P) return null;
14658
- const R = P.components[S];
14665
+ const [L, S] = v.split(":"), T = h.get(L);
14666
+ if (!T) return null;
14667
+ const R = T.components[S];
14659
14668
  if (!R) return null;
14660
- const I = P.createPluginContext(r);
14661
- return { Component: R, pluginContext: I, plugin: P };
14662
- }, [v, h, r]), D = O(
14669
+ const I = T.createPluginContext(r);
14670
+ return { Component: R, pluginContext: I, plugin: T };
14671
+ }, [v, h, r]), M = O(
14663
14672
  () => ({
14664
14673
  registry: h,
14665
14674
  hostContext: r,
@@ -14668,14 +14677,14 @@ function Vc({
14668
14677
  getPluginContext: w
14669
14678
  }),
14670
14679
  [h, r, v, E, w]
14671
- ), x = O(() => {
14672
- const T = r.cedrosLogin;
14673
- if (!T) return null;
14674
- const S = T.user ? { authMethods: [], emailVerified: !1, createdAt: "", updatedAt: "", ...T.user } : null;
14680
+ ), D = O(() => {
14681
+ const L = r.cedrosLogin;
14682
+ if (!L) return null;
14683
+ const S = L.user ? { authMethods: [], emailVerified: !1, createdAt: "", updatedAt: "", ...L.user } : null;
14675
14684
  return {
14676
- config: { serverUrl: T.serverUrl },
14685
+ config: { serverUrl: L.serverUrl },
14677
14686
  user: S,
14678
- authState: T.user ? "authenticated" : "unauthenticated",
14687
+ authState: L.user ? "authenticated" : "unauthenticated",
14679
14688
  error: null,
14680
14689
  logout: async () => {
14681
14690
  },
@@ -14689,30 +14698,30 @@ function Vc({
14689
14698
  _internal: {
14690
14699
  handleLoginSuccess: () => {
14691
14700
  },
14692
- getAccessToken: T.getAccessToken
14701
+ getAccessToken: L.getAccessToken
14693
14702
  }
14694
14703
  };
14695
14704
  }, [r.cedrosLogin]);
14696
- return /* @__PURE__ */ e(Gr.Provider, { value: D, children: /* @__PURE__ */ e(Sn.Provider, { value: x, children: /* @__PURE__ */ i("div", { className: `cedros-admin cedros-admin-shell ${m || ""}`, children: [
14705
+ return /* @__PURE__ */ e(Gr.Provider, { value: M, children: /* @__PURE__ */ e(Sn.Provider, { value: D, children: /* @__PURE__ */ i("div", { className: `cedros-admin cedros-admin-shell ${m || ""}`, children: [
14697
14706
  /* @__PURE__ */ i("aside", { className: "cedros-admin-shell__sidebar", children: [
14698
14707
  /* @__PURE__ */ e("div", { className: "cedros-admin-shell__sidebar-header", children: l ?? /* @__PURE__ */ e("div", { className: "cedros-admin-shell__logo", children: /* @__PURE__ */ e("span", { className: "cedros-admin-shell__logo-text", children: t }) }) }),
14699
- /* @__PURE__ */ e("nav", { className: "cedros-admin-shell__nav", children: L.map(([T, S]) => {
14700
- const P = T === "Configuration", R = b.has(T);
14708
+ /* @__PURE__ */ e("nav", { className: "cedros-admin-shell__nav", children: P.map(([L, S]) => {
14709
+ const T = L === "Configuration", R = b.has(L);
14701
14710
  return /* @__PURE__ */ i("div", { className: "cedros-admin-shell__nav-group", children: [
14702
- P ? /* @__PURE__ */ i(
14711
+ T ? /* @__PURE__ */ i(
14703
14712
  "button",
14704
14713
  {
14705
14714
  type: "button",
14706
14715
  className: "cedros-admin-shell__nav-label cedros-admin-shell__nav-label--collapsible",
14707
- onClick: () => A(T),
14716
+ onClick: () => k(L),
14708
14717
  "aria-expanded": !R,
14709
14718
  children: [
14710
- /* @__PURE__ */ e("span", { children: T }),
14719
+ /* @__PURE__ */ e("span", { children: L }),
14711
14720
  /* @__PURE__ */ e("span", { className: `cedros-admin-shell__nav-chevron ${R ? "" : "cedros-admin-shell__nav-chevron--expanded"}`, children: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "m9 18 6-6-6-6" }) }) })
14712
14721
  ]
14713
14722
  }
14714
- ) : /* @__PURE__ */ e("span", { className: "cedros-admin-shell__nav-label", children: T }),
14715
- (!P || !R) && S.sort((I, j) => (I.order ?? 0) - (j.order ?? 0)).map((I) => /* @__PURE__ */ i(
14723
+ ) : /* @__PURE__ */ e("span", { className: "cedros-admin-shell__nav-label", children: L }),
14724
+ (!T || !R) && S.sort((I, j) => (I.order ?? 0) - (j.order ?? 0)).map((I) => /* @__PURE__ */ i(
14716
14725
  "button",
14717
14726
  {
14718
14727
  type: "button",
@@ -14727,7 +14736,7 @@ function Vc({
14727
14736
  },
14728
14737
  I.qualifiedId
14729
14738
  ))
14730
- ] }, T);
14739
+ ] }, L);
14731
14740
  }) }),
14732
14741
  (r.cedrosLogin?.user || d) && /* @__PURE__ */ i("div", { className: "cedros-admin-shell__sidebar-footer", children: [
14733
14742
  r.cedrosLogin?.user && /* @__PURE__ */ e(
@@ -14743,15 +14752,15 @@ function Vc({
14743
14752
  d
14744
14753
  ] })
14745
14754
  ] }),
14746
- /* @__PURE__ */ e("main", { className: "cedros-admin-shell__main", children: M ? /* @__PURE__ */ e(En, { fallback: /* @__PURE__ */ e(sl, {}), children: /* @__PURE__ */ e(
14755
+ /* @__PURE__ */ e("main", { className: "cedros-admin-shell__main", children: x ? /* @__PURE__ */ e(En, { fallback: /* @__PURE__ */ e(sl, {}), children: /* @__PURE__ */ e(
14747
14756
  "div",
14748
14757
  {
14749
14758
  className: "cedros-admin-shell__section",
14750
- "data-plugin-namespace": M.plugin.cssNamespace,
14759
+ "data-plugin-namespace": x.plugin.cssNamespace,
14751
14760
  children: /* @__PURE__ */ e(
14752
- M.Component,
14761
+ x.Component,
14753
14762
  {
14754
- pluginContext: M.pluginContext,
14763
+ pluginContext: x.pluginContext,
14755
14764
  pageSize: n,
14756
14765
  refreshInterval: o
14757
14766
  }
@@ -14847,7 +14856,7 @@ const ue = {
14847
14856
  /* @__PURE__ */ e("line", { x1: "6", x2: "6.01", y1: "6", y2: "6" }),
14848
14857
  /* @__PURE__ */ e("line", { x1: "6", x2: "6.01", y1: "18", y2: "18" })
14849
14858
  ] })
14850
- }, rl = ve(() => import("./UsersSection-DlfHGrJK.js")), nl = ve(() => import("./TeamSection-DNozLdU4.js")), al = ve(() => import("./DepositsSection-Db4irTZb.js")), ol = ve(() => import("./WithdrawalsSection-ouu6VoQA.js")), il = ve(() => import("./AuthenticationSettings-eTN4qtHV.js")), ll = ve(() => import("./EmbeddedWalletSettings-qpRuCk4R.js")), cl = ve(() => import("./EmailSettings-sN1OCw50.js")), dl = ve(() => import("./WebhookSettings-Cx30aHt_.js")), ul = ve(() => import("./CreditSystemSettings-D7avf3PS.js")), hl = ve(() => import("./ServerSettings-CQn3-uuP.js")), ml = {
14859
+ }, rl = ve(() => import("./UsersSection-mOOjcUEv.js")), nl = ve(() => import("./TeamSection-DnJudC38.js")), al = ve(() => import("./DepositsSection-BH5K162Q.js")), ol = ve(() => import("./WithdrawalsSection-Grebjjks.js")), il = ve(() => import("./AuthenticationSettings-DlVILxY4.js")), ll = ve(() => import("./EmbeddedWalletSettings-Bff6raAT.js")), cl = ve(() => import("./EmailSettings-khmiWqhx.js")), dl = ve(() => import("./WebhookSettings-D0i0JhQD.js")), ul = ve(() => import("./CreditSystemSettings-Bv6u9lTs.js")), hl = ve(() => import("./ServerSettings-UIVR0R4l.js")), ml = {
14851
14860
  "login:users:read": ["admin", "owner"],
14852
14861
  "login:users:write": ["admin", "owner"],
14853
14862
  "login:members:read": ["member:read", "admin", "owner"],
@@ -15829,7 +15838,7 @@ function _l() {
15829
15838
  if (!o.isValid(y))
15830
15839
  throw new Error("Invalid QR Code version");
15831
15840
  typeof p > "u" && (p = n.BYTE);
15832
- const v = s.getSymbolTotalCodewords(y), k = r.getTotalCodewordsCount(y, f), b = (v - k) * 8;
15841
+ const v = s.getSymbolTotalCodewords(y), A = r.getTotalCodewordsCount(y, f), b = (v - A) * 8;
15833
15842
  if (p === n.MIXED) return b;
15834
15843
  const _ = b - u(p, y);
15835
15844
  switch (p) {
@@ -16034,8 +16043,8 @@ function Ll() {
16034
16043
  h.hasOwnProperty(g) && (y = h[g], f = m + y, p = c[g], v = typeof c[g] > "u", (v || p > f) && (c[g] = f, l.push(g, f), o[g] = u));
16035
16044
  }
16036
16045
  if (typeof n < "u" && typeof c[n] > "u") {
16037
- var k = ["Could not find a path from ", a, " to ", n, "."].join("");
16038
- throw new Error(k);
16046
+ var A = ["Could not find a path from ", a, " to ", n, "."].join("");
16047
+ throw new Error(A);
16039
16048
  }
16040
16049
  return o;
16041
16050
  },
@@ -16091,129 +16100,129 @@ var ar;
16091
16100
  function xl() {
16092
16101
  return ar || (ar = 1, (function(t) {
16093
16102
  const s = Le(), r = Cl(), a = El(), n = Tl(), o = Pl(), c = Xr(), l = Pe(), d = Ll();
16094
- function u(k) {
16095
- return unescape(encodeURIComponent(k)).length;
16103
+ function u(A) {
16104
+ return unescape(encodeURIComponent(A)).length;
16096
16105
  }
16097
- function g(k, b, _) {
16098
- const A = [];
16106
+ function g(A, b, _) {
16107
+ const k = [];
16099
16108
  let E;
16100
- for (; (E = k.exec(_)) !== null; )
16101
- A.push({
16109
+ for (; (E = A.exec(_)) !== null; )
16110
+ k.push({
16102
16111
  data: E[0],
16103
16112
  index: E.index,
16104
16113
  mode: b,
16105
16114
  length: E[0].length
16106
16115
  });
16107
- return A;
16116
+ return k;
16108
16117
  }
16109
- function m(k) {
16110
- const b = g(c.NUMERIC, s.NUMERIC, k), _ = g(c.ALPHANUMERIC, s.ALPHANUMERIC, k);
16111
- let A, E;
16112
- return l.isKanjiModeEnabled() ? (A = g(c.BYTE, s.BYTE, k), E = g(c.KANJI, s.KANJI, k)) : (A = g(c.BYTE_KANJI, s.BYTE, k), E = []), b.concat(_, A, E).sort(function(L, M) {
16113
- return L.index - M.index;
16114
- }).map(function(L) {
16118
+ function m(A) {
16119
+ const b = g(c.NUMERIC, s.NUMERIC, A), _ = g(c.ALPHANUMERIC, s.ALPHANUMERIC, A);
16120
+ let k, E;
16121
+ return l.isKanjiModeEnabled() ? (k = g(c.BYTE, s.BYTE, A), E = g(c.KANJI, s.KANJI, A)) : (k = g(c.BYTE_KANJI, s.BYTE, A), E = []), b.concat(_, k, E).sort(function(P, x) {
16122
+ return P.index - x.index;
16123
+ }).map(function(P) {
16115
16124
  return {
16116
- data: L.data,
16117
- mode: L.mode,
16118
- length: L.length
16125
+ data: P.data,
16126
+ mode: P.mode,
16127
+ length: P.length
16119
16128
  };
16120
16129
  });
16121
16130
  }
16122
- function h(k, b) {
16131
+ function h(A, b) {
16123
16132
  switch (b) {
16124
16133
  case s.NUMERIC:
16125
- return r.getBitsLength(k);
16134
+ return r.getBitsLength(A);
16126
16135
  case s.ALPHANUMERIC:
16127
- return a.getBitsLength(k);
16136
+ return a.getBitsLength(A);
16128
16137
  case s.KANJI:
16129
- return o.getBitsLength(k);
16138
+ return o.getBitsLength(A);
16130
16139
  case s.BYTE:
16131
- return n.getBitsLength(k);
16140
+ return n.getBitsLength(A);
16132
16141
  }
16133
16142
  }
16134
- function y(k) {
16135
- return k.reduce(function(b, _) {
16136
- const A = b.length - 1 >= 0 ? b[b.length - 1] : null;
16137
- return A && A.mode === _.mode ? (b[b.length - 1].data += _.data, b) : (b.push(_), b);
16143
+ function y(A) {
16144
+ return A.reduce(function(b, _) {
16145
+ const k = b.length - 1 >= 0 ? b[b.length - 1] : null;
16146
+ return k && k.mode === _.mode ? (b[b.length - 1].data += _.data, b) : (b.push(_), b);
16138
16147
  }, []);
16139
16148
  }
16140
- function f(k) {
16149
+ function f(A) {
16141
16150
  const b = [];
16142
- for (let _ = 0; _ < k.length; _++) {
16143
- const A = k[_];
16144
- switch (A.mode) {
16151
+ for (let _ = 0; _ < A.length; _++) {
16152
+ const k = A[_];
16153
+ switch (k.mode) {
16145
16154
  case s.NUMERIC:
16146
16155
  b.push([
16147
- A,
16148
- { data: A.data, mode: s.ALPHANUMERIC, length: A.length },
16149
- { data: A.data, mode: s.BYTE, length: A.length }
16156
+ k,
16157
+ { data: k.data, mode: s.ALPHANUMERIC, length: k.length },
16158
+ { data: k.data, mode: s.BYTE, length: k.length }
16150
16159
  ]);
16151
16160
  break;
16152
16161
  case s.ALPHANUMERIC:
16153
16162
  b.push([
16154
- A,
16155
- { data: A.data, mode: s.BYTE, length: A.length }
16163
+ k,
16164
+ { data: k.data, mode: s.BYTE, length: k.length }
16156
16165
  ]);
16157
16166
  break;
16158
16167
  case s.KANJI:
16159
16168
  b.push([
16160
- A,
16161
- { data: A.data, mode: s.BYTE, length: u(A.data) }
16169
+ k,
16170
+ { data: k.data, mode: s.BYTE, length: u(k.data) }
16162
16171
  ]);
16163
16172
  break;
16164
16173
  case s.BYTE:
16165
16174
  b.push([
16166
- { data: A.data, mode: s.BYTE, length: u(A.data) }
16175
+ { data: k.data, mode: s.BYTE, length: u(k.data) }
16167
16176
  ]);
16168
16177
  }
16169
16178
  }
16170
16179
  return b;
16171
16180
  }
16172
- function p(k, b) {
16173
- const _ = {}, A = { start: {} };
16181
+ function p(A, b) {
16182
+ const _ = {}, k = { start: {} };
16174
16183
  let E = ["start"];
16175
- for (let w = 0; w < k.length; w++) {
16176
- const L = k[w], M = [];
16177
- for (let D = 0; D < L.length; D++) {
16178
- const x = L[D], T = "" + w + D;
16179
- M.push(T), _[T] = { node: x, lastCount: 0 }, A[T] = {};
16184
+ for (let w = 0; w < A.length; w++) {
16185
+ const P = A[w], x = [];
16186
+ for (let M = 0; M < P.length; M++) {
16187
+ const D = P[M], L = "" + w + M;
16188
+ x.push(L), _[L] = { node: D, lastCount: 0 }, k[L] = {};
16180
16189
  for (let S = 0; S < E.length; S++) {
16181
- const P = E[S];
16182
- _[P] && _[P].node.mode === x.mode ? (A[P][T] = h(_[P].lastCount + x.length, x.mode) - h(_[P].lastCount, x.mode), _[P].lastCount += x.length) : (_[P] && (_[P].lastCount = x.length), A[P][T] = h(x.length, x.mode) + 4 + s.getCharCountIndicator(x.mode, b));
16190
+ const T = E[S];
16191
+ _[T] && _[T].node.mode === D.mode ? (k[T][L] = h(_[T].lastCount + D.length, D.mode) - h(_[T].lastCount, D.mode), _[T].lastCount += D.length) : (_[T] && (_[T].lastCount = D.length), k[T][L] = h(D.length, D.mode) + 4 + s.getCharCountIndicator(D.mode, b));
16183
16192
  }
16184
16193
  }
16185
- E = M;
16194
+ E = x;
16186
16195
  }
16187
16196
  for (let w = 0; w < E.length; w++)
16188
- A[E[w]].end = 0;
16189
- return { map: A, table: _ };
16197
+ k[E[w]].end = 0;
16198
+ return { map: k, table: _ };
16190
16199
  }
16191
- function v(k, b) {
16200
+ function v(A, b) {
16192
16201
  let _;
16193
- const A = s.getBestModeForData(k);
16194
- if (_ = s.from(b, A), _ !== s.BYTE && _.bit < A.bit)
16195
- throw new Error('"' + k + '" cannot be encoded with mode ' + s.toString(_) + `.
16196
- Suggested mode is: ` + s.toString(A));
16202
+ const k = s.getBestModeForData(A);
16203
+ if (_ = s.from(b, k), _ !== s.BYTE && _.bit < k.bit)
16204
+ throw new Error('"' + A + '" cannot be encoded with mode ' + s.toString(_) + `.
16205
+ Suggested mode is: ` + s.toString(k));
16197
16206
  switch (_ === s.KANJI && !l.isKanjiModeEnabled() && (_ = s.BYTE), _) {
16198
16207
  case s.NUMERIC:
16199
- return new r(k);
16208
+ return new r(A);
16200
16209
  case s.ALPHANUMERIC:
16201
- return new a(k);
16210
+ return new a(A);
16202
16211
  case s.KANJI:
16203
- return new o(k);
16212
+ return new o(A);
16204
16213
  case s.BYTE:
16205
- return new n(k);
16214
+ return new n(A);
16206
16215
  }
16207
16216
  }
16208
16217
  t.fromArray = function(b) {
16209
- return b.reduce(function(_, A) {
16210
- return typeof A == "string" ? _.push(v(A, null)) : A.data && _.push(v(A.data, A.mode)), _;
16218
+ return b.reduce(function(_, k) {
16219
+ return typeof k == "string" ? _.push(v(k, null)) : k.data && _.push(v(k.data, k.mode)), _;
16211
16220
  }, []);
16212
16221
  }, t.fromString = function(b, _) {
16213
- const A = m(b, l.isKanjiModeEnabled()), E = f(A), w = p(E, _), L = d.find_path(w.map, "start", "end"), M = [];
16214
- for (let D = 1; D < L.length - 1; D++)
16215
- M.push(w.table[L[D]].node);
16216
- return t.fromArray(y(M));
16222
+ const k = m(b, l.isKanjiModeEnabled()), E = f(k), w = p(E, _), P = d.find_path(w.map, "start", "end"), x = [];
16223
+ for (let M = 1; M < P.length - 1; M++)
16224
+ x.push(w.table[P[M]].node);
16225
+ return t.fromArray(y(x));
16217
16226
  }, t.rawSplit = function(b) {
16218
16227
  return t.fromArray(
16219
16228
  m(b, l.isKanjiModeEnabled())
@@ -16226,76 +16235,76 @@ function Ml() {
16226
16235
  if (or) return Et;
16227
16236
  or = 1;
16228
16237
  const t = Pe(), s = us(), r = gl(), a = yl(), n = bl(), o = wl(), c = vl(), l = Yr(), d = Nl(), u = _l(), g = Sl(), m = Le(), h = xl();
16229
- function y(w, L) {
16230
- const M = w.size, D = o.getPositions(L);
16231
- for (let x = 0; x < D.length; x++) {
16232
- const T = D[x][0], S = D[x][1];
16233
- for (let P = -1; P <= 7; P++)
16234
- if (!(T + P <= -1 || M <= T + P))
16238
+ function y(w, P) {
16239
+ const x = w.size, M = o.getPositions(P);
16240
+ for (let D = 0; D < M.length; D++) {
16241
+ const L = M[D][0], S = M[D][1];
16242
+ for (let T = -1; T <= 7; T++)
16243
+ if (!(L + T <= -1 || x <= L + T))
16235
16244
  for (let R = -1; R <= 7; R++)
16236
- S + R <= -1 || M <= S + R || (P >= 0 && P <= 6 && (R === 0 || R === 6) || R >= 0 && R <= 6 && (P === 0 || P === 6) || P >= 2 && P <= 4 && R >= 2 && R <= 4 ? w.set(T + P, S + R, !0, !0) : w.set(T + P, S + R, !1, !0));
16245
+ S + R <= -1 || x <= S + R || (T >= 0 && T <= 6 && (R === 0 || R === 6) || R >= 0 && R <= 6 && (T === 0 || T === 6) || T >= 2 && T <= 4 && R >= 2 && R <= 4 ? w.set(L + T, S + R, !0, !0) : w.set(L + T, S + R, !1, !0));
16237
16246
  }
16238
16247
  }
16239
16248
  function f(w) {
16240
- const L = w.size;
16241
- for (let M = 8; M < L - 8; M++) {
16242
- const D = M % 2 === 0;
16243
- w.set(M, 6, D, !0), w.set(6, M, D, !0);
16249
+ const P = w.size;
16250
+ for (let x = 8; x < P - 8; x++) {
16251
+ const M = x % 2 === 0;
16252
+ w.set(x, 6, M, !0), w.set(6, x, M, !0);
16244
16253
  }
16245
16254
  }
16246
- function p(w, L) {
16247
- const M = n.getPositions(L);
16248
- for (let D = 0; D < M.length; D++) {
16249
- const x = M[D][0], T = M[D][1];
16255
+ function p(w, P) {
16256
+ const x = n.getPositions(P);
16257
+ for (let M = 0; M < x.length; M++) {
16258
+ const D = x[M][0], L = x[M][1];
16250
16259
  for (let S = -2; S <= 2; S++)
16251
- for (let P = -2; P <= 2; P++)
16252
- S === -2 || S === 2 || P === -2 || P === 2 || S === 0 && P === 0 ? w.set(x + S, T + P, !0, !0) : w.set(x + S, T + P, !1, !0);
16260
+ for (let T = -2; T <= 2; T++)
16261
+ S === -2 || S === 2 || T === -2 || T === 2 || S === 0 && T === 0 ? w.set(D + S, L + T, !0, !0) : w.set(D + S, L + T, !1, !0);
16253
16262
  }
16254
16263
  }
16255
- function v(w, L) {
16256
- const M = w.size, D = u.getEncodedBits(L);
16257
- let x, T, S;
16258
- for (let P = 0; P < 18; P++)
16259
- x = Math.floor(P / 3), T = P % 3 + M - 8 - 3, S = (D >> P & 1) === 1, w.set(x, T, S, !0), w.set(T, x, S, !0);
16264
+ function v(w, P) {
16265
+ const x = w.size, M = u.getEncodedBits(P);
16266
+ let D, L, S;
16267
+ for (let T = 0; T < 18; T++)
16268
+ D = Math.floor(T / 3), L = T % 3 + x - 8 - 3, S = (M >> T & 1) === 1, w.set(D, L, S, !0), w.set(L, D, S, !0);
16260
16269
  }
16261
- function k(w, L, M) {
16262
- const D = w.size, x = g.getEncodedBits(L, M);
16263
- let T, S;
16264
- for (T = 0; T < 15; T++)
16265
- S = (x >> T & 1) === 1, T < 6 ? w.set(T, 8, S, !0) : T < 8 ? w.set(T + 1, 8, S, !0) : w.set(D - 15 + T, 8, S, !0), T < 8 ? w.set(8, D - T - 1, S, !0) : T < 9 ? w.set(8, 15 - T - 1 + 1, S, !0) : w.set(8, 15 - T - 1, S, !0);
16266
- w.set(D - 8, 8, 1, !0);
16270
+ function A(w, P, x) {
16271
+ const M = w.size, D = g.getEncodedBits(P, x);
16272
+ let L, S;
16273
+ for (L = 0; L < 15; L++)
16274
+ S = (D >> L & 1) === 1, L < 6 ? w.set(L, 8, S, !0) : L < 8 ? w.set(L + 1, 8, S, !0) : w.set(M - 15 + L, 8, S, !0), L < 8 ? w.set(8, M - L - 1, S, !0) : L < 9 ? w.set(8, 15 - L - 1 + 1, S, !0) : w.set(8, 15 - L - 1, S, !0);
16275
+ w.set(M - 8, 8, 1, !0);
16267
16276
  }
16268
- function b(w, L) {
16269
- const M = w.size;
16270
- let D = -1, x = M - 1, T = 7, S = 0;
16271
- for (let P = M - 1; P > 0; P -= 2)
16272
- for (P === 6 && P--; ; ) {
16277
+ function b(w, P) {
16278
+ const x = w.size;
16279
+ let M = -1, D = x - 1, L = 7, S = 0;
16280
+ for (let T = x - 1; T > 0; T -= 2)
16281
+ for (T === 6 && T--; ; ) {
16273
16282
  for (let R = 0; R < 2; R++)
16274
- if (!w.isReserved(x, P - R)) {
16283
+ if (!w.isReserved(D, T - R)) {
16275
16284
  let I = !1;
16276
- S < L.length && (I = (L[S] >>> T & 1) === 1), w.set(x, P - R, I), T--, T === -1 && (S++, T = 7);
16285
+ S < P.length && (I = (P[S] >>> L & 1) === 1), w.set(D, T - R, I), L--, L === -1 && (S++, L = 7);
16277
16286
  }
16278
- if (x += D, x < 0 || M <= x) {
16279
- x -= D, D = -D;
16287
+ if (D += M, D < 0 || x <= D) {
16288
+ D -= M, M = -M;
16280
16289
  break;
16281
16290
  }
16282
16291
  }
16283
16292
  }
16284
- function _(w, L, M) {
16285
- const D = new r();
16286
- M.forEach(function(R) {
16287
- D.put(R.mode.bit, 4), D.put(R.getLength(), m.getCharCountIndicator(R.mode, w)), R.write(D);
16293
+ function _(w, P, x) {
16294
+ const M = new r();
16295
+ x.forEach(function(R) {
16296
+ M.put(R.mode.bit, 4), M.put(R.getLength(), m.getCharCountIndicator(R.mode, w)), R.write(M);
16288
16297
  });
16289
- const x = t.getSymbolTotalCodewords(w), T = l.getTotalCodewordsCount(w, L), S = (x - T) * 8;
16290
- for (D.getLengthInBits() + 4 <= S && D.put(0, 4); D.getLengthInBits() % 8 !== 0; )
16291
- D.putBit(0);
16292
- const P = (S - D.getLengthInBits()) / 8;
16293
- for (let R = 0; R < P; R++)
16294
- D.put(R % 2 ? 17 : 236, 8);
16295
- return A(D, w, L);
16298
+ const D = t.getSymbolTotalCodewords(w), L = l.getTotalCodewordsCount(w, P), S = (D - L) * 8;
16299
+ for (M.getLengthInBits() + 4 <= S && M.put(0, 4); M.getLengthInBits() % 8 !== 0; )
16300
+ M.putBit(0);
16301
+ const T = (S - M.getLengthInBits()) / 8;
16302
+ for (let R = 0; R < T; R++)
16303
+ M.put(R % 2 ? 17 : 236, 8);
16304
+ return k(M, w, P);
16296
16305
  }
16297
- function A(w, L, M) {
16298
- const D = t.getSymbolTotalCodewords(L), x = l.getTotalCodewordsCount(L, M), T = D - x, S = l.getBlocksCount(L, M), P = D % S, R = S - P, I = Math.floor(D / S), j = Math.floor(T / S), ee = j + 1, ne = I - j, V = new d(ne);
16306
+ function k(w, P, x) {
16307
+ const M = t.getSymbolTotalCodewords(P), D = l.getTotalCodewordsCount(P, x), L = M - D, S = l.getBlocksCount(P, x), T = M % S, R = S - T, I = Math.floor(M / S), j = Math.floor(L / S), ee = j + 1, ne = I - j, V = new d(ne);
16299
16308
  let Y = 0;
16300
16309
  const q = new Array(S), Z = new Array(S);
16301
16310
  let ce = 0;
@@ -16304,7 +16313,7 @@ function Ml() {
16304
16313
  const he = H < R ? j : ee;
16305
16314
  q[H] = le.slice(Y, Y + he), Z[H] = V.encode(q[H]), Y += he, ce = Math.max(ce, he);
16306
16315
  }
16307
- const te = new Uint8Array(D);
16316
+ const te = new Uint8Array(M);
16308
16317
  let F = 0, W, $;
16309
16318
  for (W = 0; W < ce; W++)
16310
16319
  for ($ = 0; $ < S; $++)
@@ -16314,48 +16323,48 @@ function Ml() {
16314
16323
  te[F++] = Z[$][W];
16315
16324
  return te;
16316
16325
  }
16317
- function E(w, L, M, D) {
16318
- let x;
16326
+ function E(w, P, x, M) {
16327
+ let D;
16319
16328
  if (Array.isArray(w))
16320
- x = h.fromArray(w);
16329
+ D = h.fromArray(w);
16321
16330
  else if (typeof w == "string") {
16322
- let I = L;
16331
+ let I = P;
16323
16332
  if (!I) {
16324
16333
  const j = h.rawSplit(w);
16325
- I = u.getBestVersionForData(j, M);
16334
+ I = u.getBestVersionForData(j, x);
16326
16335
  }
16327
- x = h.fromString(w, I || 40);
16336
+ D = h.fromString(w, I || 40);
16328
16337
  } else
16329
16338
  throw new Error("Invalid data");
16330
- const T = u.getBestVersionForData(x, M);
16331
- if (!T)
16332
- throw new Error("The amount of data is too big to be stored in a QR Code");
16339
+ const L = u.getBestVersionForData(D, x);
16333
16340
  if (!L)
16334
- L = T;
16335
- else if (L < T)
16341
+ throw new Error("The amount of data is too big to be stored in a QR Code");
16342
+ if (!P)
16343
+ P = L;
16344
+ else if (P < L)
16336
16345
  throw new Error(
16337
16346
  `
16338
16347
  The chosen QR Code version cannot contain this amount of data.
16339
- Minimum version required to store current data is: ` + T + `.
16348
+ Minimum version required to store current data is: ` + L + `.
16340
16349
  `
16341
16350
  );
16342
- const S = _(L, M, x), P = t.getSymbolSize(L), R = new a(P);
16343
- return y(R, L), f(R), p(R, L), k(R, M, 0), L >= 7 && v(R, L), b(R, S), isNaN(D) && (D = c.getBestMask(
16351
+ const S = _(P, x, D), T = t.getSymbolSize(P), R = new a(T);
16352
+ return y(R, P), f(R), p(R, P), A(R, x, 0), P >= 7 && v(R, P), b(R, S), isNaN(M) && (M = c.getBestMask(
16344
16353
  R,
16345
- k.bind(null, R, M)
16346
- )), c.applyMask(D, R), k(R, M, D), {
16354
+ A.bind(null, R, x)
16355
+ )), c.applyMask(M, R), A(R, x, M), {
16347
16356
  modules: R,
16348
- version: L,
16349
- errorCorrectionLevel: M,
16350
- maskPattern: D,
16351
- segments: x
16357
+ version: P,
16358
+ errorCorrectionLevel: x,
16359
+ maskPattern: M,
16360
+ segments: D
16352
16361
  };
16353
16362
  }
16354
- return Et.create = function(L, M) {
16355
- if (typeof L > "u" || L === "")
16363
+ return Et.create = function(P, x) {
16364
+ if (typeof P > "u" || P === "")
16356
16365
  throw new Error("No input text");
16357
- let D = s.M, x, T;
16358
- return typeof M < "u" && (D = s.from(M.errorCorrectionLevel, s.M), x = u.from(M.version), T = c.from(M.maskPattern), M.toSJISFunc && t.setToSJISFunction(M.toSJISFunc)), E(L, x, D, T);
16366
+ let M = s.M, D, L;
16367
+ return typeof x < "u" && (M = s.from(x.errorCorrectionLevel, s.M), D = u.from(x.version), L = c.from(x.maskPattern), x.toSJISFunc && t.setToSJISFunction(x.toSJISFunc)), E(P, D, M, L);
16359
16368
  }, Et;
16360
16369
  }
16361
16370
  var Ht = {}, Qt = {}, ir;
@@ -16404,8 +16413,8 @@ function Zr() {
16404
16413
  for (let y = 0; y < u; y++) {
16405
16414
  let f = (h * u + y) * 4, p = o.color.light;
16406
16415
  if (h >= g && y >= g && h < u - g && y < u - g) {
16407
- const v = Math.floor((h - g) / d), k = Math.floor((y - g) / d);
16408
- p = m[l[v * c + k] ? 1 : 0];
16416
+ const v = Math.floor((h - g) / d), A = Math.floor((y - g) / d);
16417
+ p = m[l[v * c + A] ? 1 : 0];
16409
16418
  }
16410
16419
  a[f++] = p.r, a[f++] = p.g, a[f++] = p.b, a[f] = p.a;
16411
16420
  }
@@ -16552,10 +16561,10 @@ function en() {
16552
16561
  ), y = C(async () => {
16553
16562
  u(!0), m(null);
16554
16563
  try {
16555
- const A = await h.get("/mfa/status");
16556
- return a(A), A;
16557
- } catch (A) {
16558
- const E = B(A, "Failed to get TOTP status");
16564
+ const k = await h.get("/mfa/status");
16565
+ return a(k), k;
16566
+ } catch (k) {
16567
+ const E = B(k, "Failed to get TOTP status");
16559
16568
  throw m(E), E;
16560
16569
  } finally {
16561
16570
  u(!1);
@@ -16563,17 +16572,17 @@ function en() {
16563
16572
  }, [h]), f = C(async () => {
16564
16573
  u(!0), m(null), o("loading");
16565
16574
  try {
16566
- const A = await h.post("/mfa/setup", {});
16567
- return l(A), o("setup"), A;
16568
- } catch (A) {
16569
- const E = B(A, "Failed to start TOTP setup");
16575
+ const k = await h.post("/mfa/setup", {});
16576
+ return l(k), o("setup"), k;
16577
+ } catch (k) {
16578
+ const E = B(k, "Failed to start TOTP setup");
16570
16579
  throw m(E), o("error"), E;
16571
16580
  } finally {
16572
16581
  u(!1);
16573
16582
  }
16574
16583
  }, [h]), p = C(
16575
- async (A) => {
16576
- if (!/^\d{6}$/.test(A)) {
16584
+ async (k) => {
16585
+ if (!/^\d{6}$/.test(k)) {
16577
16586
  const E = {
16578
16587
  code: "VALIDATION_ERROR",
16579
16588
  message: "Please enter a 6-digit code"
@@ -16582,7 +16591,7 @@ function en() {
16582
16591
  }
16583
16592
  u(!0), m(null), o("verifying");
16584
16593
  try {
16585
- await h.post("/mfa/enable", { code: A }), o("success"), a({ enabled: !0, recoveryCodesRemaining: c?.recoveryCodes.length ?? 0 });
16594
+ await h.post("/mfa/enable", { code: k }), o("success"), a({ enabled: !0, recoveryCodesRemaining: c?.recoveryCodes.length ?? 0 });
16586
16595
  } catch (E) {
16587
16596
  const w = B(E, "Invalid verification code");
16588
16597
  throw m(w), o("error"), w;
@@ -16592,8 +16601,8 @@ function en() {
16592
16601
  },
16593
16602
  [h, c]
16594
16603
  ), v = C(
16595
- async (A) => {
16596
- if (!A) {
16604
+ async (k) => {
16605
+ if (!k) {
16597
16606
  const E = {
16598
16607
  code: "VALIDATION_ERROR",
16599
16608
  message: "Please enter your password"
@@ -16602,7 +16611,7 @@ function en() {
16602
16611
  }
16603
16612
  u(!0), m(null);
16604
16613
  try {
16605
- await h.post("/mfa/disable", { password: A }), a({ enabled: !1, recoveryCodesRemaining: 0 }), l(null), o("idle");
16614
+ await h.post("/mfa/disable", { password: k }), a({ enabled: !1, recoveryCodesRemaining: 0 }), l(null), o("idle");
16606
16615
  } catch (E) {
16607
16616
  const w = B(E, "Failed to disable TOTP");
16608
16617
  throw m(w), w;
@@ -16611,9 +16620,9 @@ function en() {
16611
16620
  }
16612
16621
  },
16613
16622
  [h]
16614
- ), k = C(
16615
- async (A) => {
16616
- if (!/^\d{6}$/.test(A)) {
16623
+ ), A = C(
16624
+ async (k) => {
16625
+ if (!/^\d{6}$/.test(k)) {
16617
16626
  const E = {
16618
16627
  code: "VALIDATION_ERROR",
16619
16628
  message: "Please enter a 6-digit code"
@@ -16624,7 +16633,7 @@ function en() {
16624
16633
  try {
16625
16634
  return await h.post(
16626
16635
  "/mfa/recovery-codes/regenerate",
16627
- { code: A }
16636
+ { code: k }
16628
16637
  );
16629
16638
  } catch (E) {
16630
16639
  const w = B(E, "Failed to regenerate recovery codes");
@@ -16647,26 +16656,26 @@ function en() {
16647
16656
  beginSetup: f,
16648
16657
  enableTotp: p,
16649
16658
  disableTotp: v,
16650
- regenerateBackupCodes: k,
16659
+ regenerateBackupCodes: A,
16651
16660
  clearError: b,
16652
16661
  reset: _
16653
16662
  };
16654
16663
  }
16655
16664
  function Ol({ onSuccess: t, onCancel: s, className: r = "" }) {
16656
- const { setupState: a, setupData: n, isLoading: o, error: c, beginSetup: l, enableTotp: d, clearError: u, reset: g } = en(), [m, h] = N("qr"), [y, f] = N(""), [p, v] = N(!1), [k, b] = N(!1), _ = z(null);
16665
+ const { setupState: a, setupData: n, isLoading: o, error: c, beginSetup: l, enableTotp: d, clearError: u, reset: g } = en(), [m, h] = N("qr"), [y, f] = N(""), [p, v] = N(!1), [A, b] = N(!1), _ = z(null);
16657
16666
  U(() => {
16658
16667
  a === "idle" && l().catch(() => {
16659
16668
  });
16660
16669
  }, [a, l]), U(() => {
16661
16670
  a === "success" && t?.();
16662
16671
  }, [a, t]);
16663
- const A = async () => {
16672
+ const k = async () => {
16664
16673
  n?.secret && (await navigator.clipboard.writeText(n.secret), v(!0), _.current !== null && window.clearTimeout(_.current), _.current = window.setTimeout(() => v(!1), 2e3));
16665
16674
  }, E = async () => {
16666
16675
  if (n?.recoveryCodes) {
16667
- const M = n.recoveryCodes.join(`
16676
+ const x = n.recoveryCodes.join(`
16668
16677
  `);
16669
- await navigator.clipboard.writeText(M);
16678
+ await navigator.clipboard.writeText(x);
16670
16679
  }
16671
16680
  }, w = async () => {
16672
16681
  try {
@@ -16674,7 +16683,7 @@ function Ol({ onSuccess: t, onCancel: s, className: r = "" }) {
16674
16683
  } catch {
16675
16684
  f("");
16676
16685
  }
16677
- }, L = () => {
16686
+ }, P = () => {
16678
16687
  g(), s?.();
16679
16688
  };
16680
16689
  return U(() => () => {
@@ -16687,7 +16696,7 @@ function Ol({ onSuccess: t, onCancel: s, className: r = "" }) {
16687
16696
  {
16688
16697
  type: "button",
16689
16698
  className: "cedros-button cedros-button-outline cedros-button-md",
16690
- onClick: L,
16699
+ onClick: P,
16691
16700
  children: "Cancel"
16692
16701
  }
16693
16702
  ),
@@ -16742,7 +16751,7 @@ function Ol({ onSuccess: t, onCancel: s, className: r = "" }) {
16742
16751
  {
16743
16752
  type: "button",
16744
16753
  className: "cedros-button cedros-button-ghost cedros-button-sm",
16745
- onClick: A,
16754
+ onClick: k,
16746
16755
  "aria-label": "Copy secret",
16747
16756
  children: p ? "Copied!" : "Copy"
16748
16757
  }
@@ -16755,7 +16764,7 @@ function Ol({ onSuccess: t, onCancel: s, className: r = "" }) {
16755
16764
  {
16756
16765
  type: "button",
16757
16766
  className: "cedros-button cedros-button-outline cedros-button-md",
16758
- onClick: L,
16767
+ onClick: P,
16759
16768
  children: "Cancel"
16760
16769
  }
16761
16770
  ),
@@ -16773,7 +16782,7 @@ function Ol({ onSuccess: t, onCancel: s, className: r = "" }) {
16773
16782
  m === "backup" && /* @__PURE__ */ i("div", { className: "cedros-totp-step", children: [
16774
16783
  /* @__PURE__ */ e("h3", { className: "cedros-totp-title", children: "Save recovery codes" }),
16775
16784
  /* @__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." }),
16776
- /* @__PURE__ */ e("div", { className: "cedros-totp-backup-codes", children: n.recoveryCodes.map((M, D) => /* @__PURE__ */ e("code", { className: "cedros-totp-backup-code", children: M }, D)) }),
16785
+ /* @__PURE__ */ e("div", { className: "cedros-totp-backup-codes", children: n.recoveryCodes.map((x, M) => /* @__PURE__ */ e("code", { className: "cedros-totp-backup-code", children: x }, M)) }),
16777
16786
  /* @__PURE__ */ e(
16778
16787
  "button",
16779
16788
  {
@@ -16789,8 +16798,8 @@ function Ol({ onSuccess: t, onCancel: s, className: r = "" }) {
16789
16798
  {
16790
16799
  type: "checkbox",
16791
16800
  className: "cedros-checkbox",
16792
- checked: k,
16793
- onChange: (M) => b(M.target.checked)
16801
+ checked: A,
16802
+ onChange: (x) => b(x.target.checked)
16794
16803
  }
16795
16804
  ),
16796
16805
  /* @__PURE__ */ e("span", { className: "cedros-checkbox-text", children: "I have saved these recovery codes" })
@@ -16811,7 +16820,7 @@ function Ol({ onSuccess: t, onCancel: s, className: r = "" }) {
16811
16820
  type: "button",
16812
16821
  className: "cedros-button cedros-button-primary cedros-button-md",
16813
16822
  onClick: () => h("verify"),
16814
- disabled: !k,
16823
+ disabled: !A,
16815
16824
  children: "Continue"
16816
16825
  }
16817
16826
  )
@@ -16860,7 +16869,7 @@ function Ol({ onSuccess: t, onCancel: s, className: r = "" }) {
16860
16869
  ] }) : null;
16861
16870
  }
16862
16871
  function Qc({ onStatusChange: t, className: s = "" }) {
16863
- const { status: r, isLoading: a, error: n, getStatus: o, disableTotp: c, regenerateBackupCodes: l, clearError: d } = en(), [u, g] = N("status"), [m, h] = N(""), [y, f] = N(""), [p, v] = N(null), [k, b] = N(!1), [_, A] = N(null);
16872
+ const { status: r, isLoading: a, error: n, getStatus: o, disableTotp: c, regenerateBackupCodes: l, clearError: d } = en(), [u, g] = N("status"), [m, h] = N(""), [y, f] = N(""), [p, v] = N(null), [A, b] = N(!1), [_, k] = N(null);
16864
16873
  U(() => {
16865
16874
  o().catch(() => {
16866
16875
  });
@@ -16868,25 +16877,25 @@ function Qc({ onStatusChange: t, className: s = "" }) {
16868
16877
  const E = C(() => {
16869
16878
  g("status"), t?.(!0);
16870
16879
  }, [t]), w = async () => {
16871
- b(!0), A(null);
16880
+ b(!0), k(null);
16872
16881
  try {
16873
16882
  await c(m), g("status"), h(""), t?.(!1);
16874
- } catch (D) {
16875
- A(D instanceof Error ? D.message : "Failed to disable 2FA"), h("");
16883
+ } catch (M) {
16884
+ k(M instanceof Error ? M.message : "Failed to disable 2FA"), h("");
16876
16885
  } finally {
16877
16886
  b(!1);
16878
16887
  }
16879
- }, L = async () => {
16880
- b(!0), A(null);
16888
+ }, P = async () => {
16889
+ b(!0), k(null);
16881
16890
  try {
16882
- const D = await l(y);
16883
- v(D.recoveryCodes), f("");
16884
- } catch (D) {
16885
- A(D instanceof Error ? D.message : "Failed to regenerate codes"), f("");
16891
+ const M = await l(y);
16892
+ v(M.recoveryCodes), f("");
16893
+ } catch (M) {
16894
+ k(M instanceof Error ? M.message : "Failed to regenerate codes"), f("");
16886
16895
  } finally {
16887
16896
  b(!1);
16888
16897
  }
16889
- }, M = async () => {
16898
+ }, x = async () => {
16890
16899
  p && await navigator.clipboard.writeText(p.join(`
16891
16900
  `));
16892
16901
  };
@@ -16908,7 +16917,7 @@ function Qc({ onStatusChange: t, className: s = "" }) {
16908
16917
  re,
16909
16918
  {
16910
16919
  error: { code: "UNKNOWN_ERROR", message: _ },
16911
- onDismiss: () => A(null)
16920
+ onDismiss: () => k(null)
16912
16921
  }
16913
16922
  ) }),
16914
16923
  /* @__PURE__ */ e("div", { className: "cedros-totp-verify-input", children: /* @__PURE__ */ e(
@@ -16917,8 +16926,8 @@ function Qc({ onStatusChange: t, className: s = "" }) {
16917
16926
  label: "Password",
16918
16927
  placeholder: "Enter your password",
16919
16928
  value: m,
16920
- onChange: (D) => h(D.target.value),
16921
- disabled: k,
16929
+ onChange: (M) => h(M.target.value),
16930
+ disabled: A,
16922
16931
  autoFocus: !0
16923
16932
  }
16924
16933
  ) }),
@@ -16929,9 +16938,9 @@ function Qc({ onStatusChange: t, className: s = "" }) {
16929
16938
  type: "button",
16930
16939
  className: "cedros-button cedros-button-outline cedros-button-md",
16931
16940
  onClick: () => {
16932
- g("status"), h(""), A(null);
16941
+ g("status"), h(""), k(null);
16933
16942
  },
16934
- disabled: k,
16943
+ disabled: A,
16935
16944
  children: "Cancel"
16936
16945
  }
16937
16946
  ),
@@ -16941,8 +16950,8 @@ function Qc({ onStatusChange: t, className: s = "" }) {
16941
16950
  type: "button",
16942
16951
  className: "cedros-button cedros-button-destructive cedros-button-md",
16943
16952
  onClick: w,
16944
- disabled: k || m.length === 0,
16945
- children: k ? /* @__PURE__ */ i(K, { children: [
16953
+ disabled: A || m.length === 0,
16954
+ children: A ? /* @__PURE__ */ i(K, { children: [
16946
16955
  /* @__PURE__ */ e(G, { size: "sm" }),
16947
16956
  /* @__PURE__ */ e("span", { children: "Disabling..." })
16948
16957
  ] }) : "Disable 2FA"
@@ -16952,13 +16961,13 @@ function Qc({ onStatusChange: t, className: s = "" }) {
16952
16961
  ] }) }) : u === "regenerate" ? p ? /* @__PURE__ */ e("div", { className: `cedros-totp-settings ${s}`, children: /* @__PURE__ */ i("div", { className: "cedros-totp-panel", children: [
16953
16962
  /* @__PURE__ */ e("h3", { className: "cedros-totp-title", children: "New recovery codes" }),
16954
16963
  /* @__PURE__ */ e("p", { className: "cedros-totp-description", children: "Save these codes in a secure place. Your old codes are no longer valid." }),
16955
- /* @__PURE__ */ e("div", { className: "cedros-totp-backup-codes", children: p.map((D, x) => /* @__PURE__ */ e("code", { className: "cedros-totp-backup-code", children: D }, x)) }),
16964
+ /* @__PURE__ */ e("div", { className: "cedros-totp-backup-codes", children: p.map((M, D) => /* @__PURE__ */ e("code", { className: "cedros-totp-backup-code", children: M }, D)) }),
16956
16965
  /* @__PURE__ */ e(
16957
16966
  "button",
16958
16967
  {
16959
16968
  type: "button",
16960
16969
  className: "cedros-button cedros-button-outline cedros-button-md cedros-button-full",
16961
- onClick: M,
16970
+ onClick: x,
16962
16971
  children: "Copy all codes"
16963
16972
  }
16964
16973
  ),
@@ -16980,7 +16989,7 @@ function Qc({ onStatusChange: t, className: s = "" }) {
16980
16989
  re,
16981
16990
  {
16982
16991
  error: { code: "UNKNOWN_ERROR", message: _ },
16983
- onDismiss: () => A(null)
16992
+ onDismiss: () => k(null)
16984
16993
  }
16985
16994
  ) }),
16986
16995
  /* @__PURE__ */ e("div", { className: "cedros-totp-verify-input", children: /* @__PURE__ */ e(
@@ -16988,8 +16997,8 @@ function Qc({ onStatusChange: t, className: s = "" }) {
16988
16997
  {
16989
16998
  value: y,
16990
16999
  onChange: f,
16991
- onComplete: L,
16992
- disabled: k,
17000
+ onComplete: P,
17001
+ disabled: A,
16993
17002
  autoFocus: !0
16994
17003
  }
16995
17004
  ) }),
@@ -17000,9 +17009,9 @@ function Qc({ onStatusChange: t, className: s = "" }) {
17000
17009
  type: "button",
17001
17010
  className: "cedros-button cedros-button-outline cedros-button-md",
17002
17011
  onClick: () => {
17003
- g("status"), f(""), A(null);
17012
+ g("status"), f(""), k(null);
17004
17013
  },
17005
- disabled: k,
17014
+ disabled: A,
17006
17015
  children: "Cancel"
17007
17016
  }
17008
17017
  ),
@@ -17011,9 +17020,9 @@ function Qc({ onStatusChange: t, className: s = "" }) {
17011
17020
  {
17012
17021
  type: "button",
17013
17022
  className: "cedros-button cedros-button-primary cedros-button-md",
17014
- onClick: L,
17015
- disabled: k || y.length !== 6,
17016
- children: k ? /* @__PURE__ */ i(K, { children: [
17023
+ onClick: P,
17024
+ disabled: A || y.length !== 6,
17025
+ children: A ? /* @__PURE__ */ i(K, { children: [
17017
17026
  /* @__PURE__ */ e(G, { size: "sm" }),
17018
17027
  /* @__PURE__ */ e("span", { children: "Regenerating..." })
17019
17028
  ] }) : "Regenerate codes"
@@ -17155,9 +17164,9 @@ function Kc({
17155
17164
  onClose: s,
17156
17165
  className: r = ""
17157
17166
  }) {
17158
- const { user: a } = mr(), { isLoading: n, error: o, changePassword: c, clearError: l } = $l(), [d, u] = N("main"), [g, m] = N(""), [h, y] = N(""), [f, p] = N(""), [v, k] = N(null), [b, _] = N(null), A = Sr(h), E = h === f, w = g.length > 0 && h.length > 0 && f.length > 0 && A.isValid && E, L = C(async () => {
17167
+ const { user: a } = mr(), { isLoading: n, error: o, changePassword: c, clearError: l } = $l(), [d, u] = N("main"), [g, m] = N(""), [h, y] = N(""), [f, p] = N(""), [v, A] = N(null), [b, _] = N(null), k = Sr(h), E = h === f, w = g.length > 0 && h.length > 0 && f.length > 0 && k.isValid && E, P = C(async () => {
17159
17168
  if (w) {
17160
- k(null), _(null);
17169
+ A(null), _(null);
17161
17170
  try {
17162
17171
  await c({
17163
17172
  currentPassword: g,
@@ -17165,13 +17174,13 @@ function Kc({
17165
17174
  }), m(""), y(""), p(""), _("Password changed successfully. Other sessions have been logged out."), t?.(), setTimeout(() => {
17166
17175
  u("main"), _(null);
17167
17176
  }, 2e3);
17168
- } catch (x) {
17169
- k(x instanceof Error ? x.message : "Failed to change password");
17177
+ } catch (D) {
17178
+ A(D instanceof Error ? D.message : "Failed to change password");
17170
17179
  }
17171
17180
  }
17172
- }, [w, g, h, c, t]), M = C(() => {
17173
- u("main"), m(""), y(""), p(""), k(null), l();
17174
- }, [l]), D = () => a?.name ? a.name.split(" ").map((x) => x[0]).join("").toUpperCase().slice(0, 2) : a?.email ? a.email[0].toUpperCase() : "?";
17181
+ }, [w, g, h, c, t]), x = C(() => {
17182
+ u("main"), m(""), y(""), p(""), A(null), l();
17183
+ }, [l]), M = () => a?.name ? a.name.split(" ").map((D) => D[0]).join("").toUpperCase().slice(0, 2) : a?.email ? a.email[0].toUpperCase() : "?";
17175
17184
  return d === "change-password" ? /* @__PURE__ */ e("div", { className: `cedros-profile-settings ${r}`, children: /* @__PURE__ */ i("div", { className: "cedros-profile-panel", children: [
17176
17185
  /* @__PURE__ */ e("h3", { className: "cedros-profile-title", children: "Change password" }),
17177
17186
  /* @__PURE__ */ e("p", { className: "cedros-profile-description", children: "Enter your current password and choose a new one. This will log you out of other devices." }),
@@ -17180,7 +17189,7 @@ function Kc({
17180
17189
  {
17181
17190
  error: { code: "UNKNOWN_ERROR", message: v || o?.message || "" },
17182
17191
  onDismiss: () => {
17183
- k(null), l();
17192
+ A(null), l();
17184
17193
  }
17185
17194
  }
17186
17195
  ) }),
@@ -17195,7 +17204,7 @@ function Kc({
17195
17204
  label: "Current password",
17196
17205
  placeholder: "Enter your current password",
17197
17206
  value: g,
17198
- onChange: (x) => m(x.target.value),
17207
+ onChange: (D) => m(D.target.value),
17199
17208
  disabled: n,
17200
17209
  autoFocus: !0
17201
17210
  }
@@ -17206,7 +17215,7 @@ function Kc({
17206
17215
  label: "New password",
17207
17216
  placeholder: "Enter new password",
17208
17217
  value: h,
17209
- onChange: (x) => y(x.target.value),
17218
+ onChange: (D) => y(D.target.value),
17210
17219
  disabled: n,
17211
17220
  showStrengthMeter: !0
17212
17221
  }
@@ -17217,7 +17226,7 @@ function Kc({
17217
17226
  label: "Confirm new password",
17218
17227
  placeholder: "Confirm new password",
17219
17228
  value: f,
17220
- onChange: (x) => p(x.target.value),
17229
+ onChange: (D) => p(D.target.value),
17221
17230
  disabled: n,
17222
17231
  error: f.length > 0 && !E ? "Passwords do not match" : void 0
17223
17232
  }
@@ -17229,7 +17238,7 @@ function Kc({
17229
17238
  {
17230
17239
  type: "button",
17231
17240
  className: "cedros-button cedros-button-outline cedros-button-md",
17232
- onClick: M,
17241
+ onClick: x,
17233
17242
  disabled: n,
17234
17243
  children: "Cancel"
17235
17244
  }
@@ -17239,7 +17248,7 @@ function Kc({
17239
17248
  {
17240
17249
  type: "button",
17241
17250
  className: "cedros-button cedros-button-primary cedros-button-md",
17242
- onClick: L,
17251
+ onClick: P,
17243
17252
  disabled: n || !w,
17244
17253
  children: n ? /* @__PURE__ */ i(K, { children: [
17245
17254
  /* @__PURE__ */ e(G, { size: "sm" }),
@@ -17257,7 +17266,7 @@ function Kc({
17257
17266
  alt: a.name || "Profile",
17258
17267
  className: "cedros-profile-avatar"
17259
17268
  }
17260
- ) : /* @__PURE__ */ e("div", { className: "cedros-profile-avatar cedros-profile-avatar-fallback", children: D() }) }),
17269
+ ) : /* @__PURE__ */ e("div", { className: "cedros-profile-avatar cedros-profile-avatar-fallback", children: M() }) }),
17261
17270
  /* @__PURE__ */ i("div", { className: "cedros-profile-info", children: [
17262
17271
  /* @__PURE__ */ e("h3", { className: "cedros-profile-name", children: a?.name || "User" }),
17263
17272
  /* @__PURE__ */ e("p", { className: "cedros-profile-email", children: a?.email })
@@ -17356,8 +17365,8 @@ function Wl() {
17356
17365
  try {
17357
17366
  const p = new URLSearchParams();
17358
17367
  f?.limit !== void 0 && p.set("limit", String(f.limit)), f?.offset !== void 0 && p.set("offset", String(f.offset));
17359
- const v = p.toString(), k = v ? `/deposits?${v}` : "/deposits";
17360
- return await o.get(k);
17368
+ const v = p.toString(), A = v ? `/deposits?${v}` : "/deposits";
17369
+ return await o.get(A);
17361
17370
  } catch (p) {
17362
17371
  const v = B(p, "Failed to list deposits");
17363
17372
  throw n(v.message), v;
@@ -17465,7 +17474,7 @@ function tn({
17465
17474
  r(b), u(!1), m("");
17466
17475
  },
17467
17476
  [r]
17468
- ), k = C(
17477
+ ), A = C(
17469
17478
  (b) => {
17470
17479
  b.key === "Escape" ? (u(!1), m("")) : b.key === "Enter" && f.length === 1 && v(f[0]);
17471
17480
  },
@@ -17476,7 +17485,7 @@ function tn({
17476
17485
  {
17477
17486
  ref: h,
17478
17487
  className: `cedros-token-selector ${d ? "cedros-token-selector-open" : ""} ${o ? "cedros-token-selector-disabled" : ""} ${c}`,
17479
- onKeyDown: k,
17488
+ onKeyDown: A,
17480
17489
  children: [
17481
17490
  /* @__PURE__ */ i(
17482
17491
  "button",
@@ -17700,8 +17709,8 @@ function on(t, s, r) {
17700
17709
  if (a.length === 0)
17701
17710
  return `Total: $${n.toFixed(2)}`;
17702
17711
  const o = a.reduce((f, p) => f + p.solAmount, 0), c = a.reduce((f, p) => f + p.percent, 0), l = { fee: 7, sol: 8, rate: 7, usd: 8 }, d = (f) => {
17703
- const p = f.label.padEnd(l.fee), v = f.solAmount.toFixed(4).padStart(6).padEnd(l.sol), k = (f.percent.toFixed(2) + "%").padStart(5).padEnd(l.rate), b = ("$" + Math.max(f.usdAmount, 0.01).toFixed(2)).padEnd(l.usd);
17704
- return `${p} │ ${v} │ ${k} │ ${b}`;
17712
+ const p = f.label.padEnd(l.fee), v = f.solAmount.toFixed(4).padStart(6).padEnd(l.sol), A = (f.percent.toFixed(2) + "%").padStart(5).padEnd(l.rate), b = ("$" + Math.max(f.usdAmount, 0.01).toFixed(2)).padEnd(l.usd);
17713
+ return `${p} │ ${v} │ ${A} │ ${b}`;
17705
17714
  }, u = `${"Fee".padEnd(l.fee)} │ ${"SOL".padEnd(l.sol)} │ ${"+ Rate".padEnd(l.rate)} │ ${"= Total".padEnd(l.usd)}`, g = `${"─".repeat(l.fee)}─┼─${"─".repeat(l.sol)}─┼─${"─".repeat(l.rate)}─┼─${"─".repeat(l.usd)}`, m = ("$" + n.toFixed(2)).padEnd(l.usd), h = `${"TOTAL".padEnd(l.fee)} │ ${o.toFixed(4).padStart(6).padEnd(l.sol)} │ ${(c.toFixed(2) + "%").padStart(5).padEnd(l.rate)} │ ${m}`;
17706
17715
  return [u, g, ...a.map(d), g, h].join(`
17707
17716
  `);
@@ -17755,12 +17764,12 @@ function Gc({
17755
17764
  pollInterval: f = 5e3,
17756
17765
  demoMode: p = !1,
17757
17766
  demoAutoConfirmMs: v,
17758
- tokenPriceUsd: k,
17767
+ tokenPriceUsd: A,
17759
17768
  showExplainer: b = !1,
17760
17769
  siteName: _,
17761
- explainerConfig: A
17770
+ explainerConfig: k
17762
17771
  }) {
17763
- const { deposit: E, getStatus: w, error: L, clearError: M } = Wl(), D = ft(), x = hr(t.quickActionTokens), T = hr(t.customTokenSymbols), S = O(() => {
17772
+ const { deposit: E, getStatus: w, error: P, clearError: x } = Wl(), M = ft(), D = hr(t.quickActionTokens), L = hr(t.customTokenSymbols), S = O(() => {
17764
17773
  const Q = t.customTokens ?? [];
17765
17774
  if (Q.length === 0) return a;
17766
17775
  const X = new Set(a.map((oe) => oe.symbol)), se = [...a];
@@ -17774,15 +17783,15 @@ function Gc({
17774
17783
  logoUrl: oe.logoUrl
17775
17784
  }), X.add(oe.symbol));
17776
17785
  return se;
17777
- }, [a, t.customTokens]), P = O(() => {
17778
- if (T.length === 0) return S;
17779
- const Q = S.filter((X) => T.includes(X.symbol));
17786
+ }, [a, t.customTokens]), T = O(() => {
17787
+ if (L.length === 0) return S;
17788
+ const Q = S.filter((X) => L.includes(X.symbol));
17780
17789
  return Q.length > 0 ? Q : S;
17781
- }, [S, T]), R = t.privateDepositsEnabled, I = r ? r === "sign" && !R ? "receive" : r : R && D.hasExternalWallet ? "sign" : "receive", j = x[0] ? S.find((Q) => Q.symbol === x[0]) : void 0, ee = s === "sol" ? Ie : s === "single-token" ? j ?? S.find((Q) => Q.symbol === "USDC") ?? S[0] ?? Ie : n ?? j ?? S.find((Q) => Q.symbol === "USDC") ?? S.find((Q) => Q.symbol !== "SOL") ?? S[0] ?? Ie, ne = C(() => b ? "explainer" : "unlock", [b]), [V, Y] = N(ne), [q, Z] = N(ee), [ce, le] = N(""), [te, F] = N(null), [W, $] = N(null), [H, he] = N(null), [ye, Ke] = N(null), [We, Ce] = N(!1), [bt, je] = N(!1), [xe, Ge] = N(null);
17790
+ }, [S, L]), R = t.privateDepositsEnabled, I = r ? r === "sign" && !R ? "receive" : r : R && M.hasExternalWallet ? "sign" : "receive", j = D[0] ? S.find((Q) => Q.symbol === D[0]) : void 0, ee = s === "sol" ? Ie : s === "single-token" ? j ?? S.find((Q) => Q.symbol === "USDC") ?? S[0] ?? Ie : n ?? j ?? S.find((Q) => Q.symbol === "USDC") ?? S.find((Q) => Q.symbol !== "SOL") ?? S[0] ?? Ie, ne = C(() => b ? "explainer" : "unlock", [b]), [V, Y] = N(ne), [q, Z] = N(ee), [ce, le] = N(""), [te, F] = N(null), [W, $] = N(null), [H, he] = N(null), [ye, Ke] = N(null), [We, Ce] = N(!1), [bt, je] = N(!1), [xe, Ge] = N(null);
17782
17791
  U(() => {
17783
- Y(ne()), Z(ee), le(""), F(null), $(null), he(null), Ke(null), Ce(!1), je(!1), Ge(null), M();
17784
- }, [s, I, ee, M, ne]);
17785
- const wt = o ?? t.privateMinSol, vt = c, Ee = parseFloat(ce), J = D.status === "enrolled_locked" || D.status === "enrolled_unlocked" || D.status === "unlocked", Ae = J && D.isUnlocked, At = J && !D.isUnlocked, gs = C(() => {
17792
+ Y(ne()), Z(ee), le(""), F(null), $(null), he(null), Ke(null), Ce(!1), je(!1), Ge(null), x();
17793
+ }, [s, I, ee, x, ne]);
17794
+ const wt = o ?? t.privateMinSol, vt = c, Ee = parseFloat(ce), J = M.status === "enrolled_locked" || M.status === "enrolled_unlocked" || M.status === "unlocked", Ae = J && M.isUnlocked, At = J && !M.isUnlocked, gs = C(() => {
17786
17795
  let se = I === "sign" ? [
17787
17796
  { key: "unlock", label: "Authorize" },
17788
17797
  { key: "confirm", label: "Send" },
@@ -17817,7 +17826,7 @@ function Gc({
17817
17826
  [m, I, Ee, q]
17818
17827
  ), gn = C(
17819
17828
  async (Q, X) => {
17820
- M(), $(null), Y("signing");
17829
+ x(), $(null), Y("signing");
17821
17830
  const se = Q ?? Ee, oe = X ?? q;
17822
17831
  if (!p) {
17823
17832
  if (At && g) {
@@ -17878,12 +17887,12 @@ function Gc({
17878
17887
  g,
17879
17888
  l,
17880
17889
  d,
17881
- M
17890
+ x
17882
17891
  ]
17883
17892
  ), yn = C(() => {
17884
17893
  Y("waiting");
17885
17894
  }, []), kt = C(async () => {
17886
- const Q = ye || D.solanaPubkey;
17895
+ const Q = ye || M.solanaPubkey;
17887
17896
  if (Q)
17888
17897
  try {
17889
17898
  await navigator.clipboard.writeText(Q), Ce(!0), setTimeout(() => Ce(!1), 2e3);
@@ -17891,7 +17900,7 @@ function Gc({
17891
17900
  const X = document.createElement("textarea");
17892
17901
  X.value = Q, document.body.appendChild(X), X.select(), document.execCommand("copy"), document.body.removeChild(X), Ce(!0), setTimeout(() => Ce(!1), 2e3);
17893
17902
  }
17894
- }, [ye, D.solanaPubkey]);
17903
+ }, [ye, M.solanaPubkey]);
17895
17904
  U(() => {
17896
17905
  if (!(V === "confirm" || V === "show-address" || V === "waiting") || !H || p) return;
17897
17906
  let X = !1, se = 0;
@@ -17909,7 +17918,7 @@ function Gc({
17909
17918
  sessionId: H,
17910
17919
  response: me,
17911
17920
  method: "receive",
17912
- depositAddress: D.solanaPubkey ?? void 0
17921
+ depositAddress: M.solanaPubkey ?? void 0
17913
17922
  };
17914
17923
  F(Xe), Y("success"), l?.(Xe);
17915
17924
  return;
@@ -17929,7 +17938,7 @@ function Gc({
17929
17938
  w,
17930
17939
  q,
17931
17940
  s,
17932
- D.solanaPubkey,
17941
+ M.solanaPubkey,
17933
17942
  l,
17934
17943
  f
17935
17944
  ]), U(() => {
@@ -17968,8 +17977,8 @@ function Gc({
17968
17977
  l
17969
17978
  ]);
17970
17979
  const bn = C(() => {
17971
- Y(ne()), le(""), F(null), $(null), M();
17972
- }, [ne, M]);
17980
+ Y(ne()), le(""), F(null), $(null), x();
17981
+ }, [ne, x]);
17973
17982
  return t.enabled ? /* @__PURE__ */ i("div", { className: `cedros-deposit-flow ${h}`, children: [
17974
17983
  y && V !== "error" && /* @__PURE__ */ e("div", { className: "cedros-deposit-flow-steps", children: gs.map((Q, X) => {
17975
17984
  const se = pn >= X, oe = Q.key === V;
@@ -17996,11 +18005,11 @@ function Gc({
17996
18005
  Zl,
17997
18006
  {
17998
18007
  siteName: _,
17999
- config: A,
18008
+ config: k,
18000
18009
  depositConfig: t,
18001
18010
  currencyMode: s,
18002
18011
  token: q,
18003
- tokens: P,
18012
+ tokens: T,
18004
18013
  onContinue: () => Y("unlock"),
18005
18014
  onCancel: u
18006
18015
  }
@@ -18009,7 +18018,7 @@ function Gc({
18009
18018
  ec,
18010
18019
  {
18011
18020
  token: q,
18012
- tokens: P,
18021
+ tokens: T,
18013
18022
  currencyMode: s,
18014
18023
  depositMethod: I,
18015
18024
  isAuthorizing: bt,
@@ -18024,12 +18033,12 @@ function Gc({
18024
18033
  {
18025
18034
  token: q,
18026
18035
  tokens: S,
18027
- quickActionSymbols: x,
18028
- customTokenSymbols: T,
18036
+ quickActionSymbols: D,
18037
+ customTokenSymbols: L,
18029
18038
  currencyMode: s,
18030
18039
  minAmount: wt,
18031
18040
  maxAmount: vt,
18032
- depositAddress: ye || D.solanaPubkey,
18041
+ depositAddress: ye || M.solanaPubkey,
18033
18042
  walletReady: Ae || p,
18034
18043
  needsUnlock: At && !p,
18035
18044
  copied: We,
@@ -18043,17 +18052,17 @@ function Gc({
18043
18052
  onCancel: u
18044
18053
  }
18045
18054
  ),
18046
- V === "signing" && /* @__PURE__ */ e(sc, { depositAddress: D.solanaPubkey }),
18055
+ V === "signing" && /* @__PURE__ */ e(sc, { depositAddress: M.solanaPubkey }),
18047
18056
  V === "show-address" && /* @__PURE__ */ e(
18048
18057
  rc,
18049
18058
  {
18050
18059
  token: q,
18051
18060
  tokens: S,
18052
- quickActionSymbols: x,
18053
- customTokenSymbols: T,
18054
- tokenPriceUsd: k,
18061
+ quickActionSymbols: D,
18062
+ customTokenSymbols: L,
18063
+ tokenPriceUsd: A,
18055
18064
  currencyMode: s,
18056
- depositAddress: ye || D.solanaPubkey,
18065
+ depositAddress: ye || M.solanaPubkey,
18057
18066
  copied: We,
18058
18067
  isListening: !!H && !p,
18059
18068
  config: t,
@@ -18069,7 +18078,7 @@ function Gc({
18069
18078
  nc,
18070
18079
  {
18071
18080
  token: q,
18072
- depositAddress: ye || D.solanaPubkey,
18081
+ depositAddress: ye || M.solanaPubkey,
18073
18082
  copied: We,
18074
18083
  feeLine: xe ? `Fees: $${Math.max(yt(t, xe), 0.01).toFixed(2)} total` : "Fees: calculated after deposit",
18075
18084
  onCopy: kt
@@ -18079,7 +18088,7 @@ function Gc({
18079
18088
  V === "error" && /* @__PURE__ */ e(
18080
18089
  oc,
18081
18090
  {
18082
- error: W || L || "An error occurred",
18091
+ error: W || P || "An error occurred",
18083
18092
  onRetry: () => Y("confirm"),
18084
18093
  onCancel: u
18085
18094
  }
@@ -18231,27 +18240,27 @@ function tc({
18231
18240
  onTokenSelect: f,
18232
18241
  onUnlockRequired: p,
18233
18242
  onConfirm: v,
18234
- onBack: k
18243
+ onBack: A
18235
18244
  }) {
18236
- const [b, _] = N(h.privateMinUsd), [A, E] = N(!1), [w, L] = N(!1), [M, D] = N(0), [x, T] = N(null), P = hs(b, h) === "sol_micro", R = t.symbol === Ue.symbol, I = O(() => {
18245
+ const [b, _] = N(h.privateMinUsd), [k, E] = N(!1), [w, P] = N(!1), [x, M] = N(0), [D, L] = N(null), T = hs(b, h) === "sol_micro", R = t.symbol === Ue.symbol, I = O(() => {
18237
18246
  const W = a.length === 0 ? s : s.filter((he) => a.includes(he.symbol)), $ = W.length > 0 ? W : s;
18238
18247
  return $.some((he) => he.symbol === Ue.symbol) ? $ : [...$, Ue];
18239
- }, [s, a]), j = yt(h, b), ee = j < 0.01 ? 0.01 : j, ne = R ? "Fees: calculated after deposit" : `Fees: $${ee.toFixed(2)} total`, V = R ? "" : on(h, b, j), Y = dn(P ? Ie : t, h), q = Y ? b / Y : t.symbol === "SOL" && h.solPriceUsd > 0 ? b / h.solPriceUsd : b, Z = q ? un(q, P ? "SOL" : t.symbol) : null, le = b - j <= 0 && b > 0, te = !R && b > 0 && !le && q >= o && q <= c;
18248
+ }, [s, a]), j = yt(h, b), ee = j < 0.01 ? 0.01 : j, ne = R ? "Fees: calculated after deposit" : `Fees: $${ee.toFixed(2)} total`, V = R ? "" : on(h, b, j), Y = dn(T ? Ie : t, h), q = Y ? b / Y : t.symbol === "SOL" && h.solPriceUsd > 0 ? b / h.solPriceUsd : b, Z = q ? un(q, T ? "SOL" : t.symbol) : null, le = b - j <= 0 && b > 0, te = !R && b > 0 && !le && q >= o && q <= c;
18240
18249
  U(() => {
18241
18250
  if (n === "multi-token")
18242
- if (P && t.symbol !== "SOL") {
18243
- T(t);
18251
+ if (T && t.symbol !== "SOL") {
18252
+ L(t);
18244
18253
  const W = s.find(($) => $.symbol === "SOL");
18245
18254
  W && f(W);
18246
- } else !P && x && t.symbol === "SOL" && (f(x), T(null));
18247
- }, [P, t.symbol, n, s, f, x, t]);
18255
+ } else !T && D && t.symbol === "SOL" && (f(D), L(null));
18256
+ }, [T, t.symbol, n, s, f, D, t]);
18248
18257
  const F = () => {
18249
18258
  te && v(q, t);
18250
18259
  };
18251
18260
  return /* @__PURE__ */ i("div", { className: "cedros-deposit-flow-step", children: [
18252
18261
  /* @__PURE__ */ e("h4", { className: "cedros-deposit-flow-step-title", children: "Choose Amount" }),
18253
18262
  /* @__PURE__ */ e("p", { className: "cedros-deposit-flow-step-desc", children: "Set how much you want to deposit. Higher tiers unlock privacy." }),
18254
- n === "multi-token" && !P && /* @__PURE__ */ i("div", { className: "cedros-deposit-flow-field", children: [
18263
+ n === "multi-token" && !T && /* @__PURE__ */ i("div", { className: "cedros-deposit-flow-field", children: [
18255
18264
  /* @__PURE__ */ e("label", { className: "cedros-deposit-flow-label", children: "Token" }),
18256
18265
  /* @__PURE__ */ i("div", { className: "cedros-deposit-flow-token-quick", children: [
18257
18266
  r.map((W) => {
@@ -18284,21 +18293,21 @@ function tc({
18284
18293
  "button",
18285
18294
  {
18286
18295
  type: "button",
18287
- className: `cedros-deposit-flow-token-quick-btn ${A ? "is-active" : ""}`,
18296
+ className: `cedros-deposit-flow-token-quick-btn ${k ? "is-active" : ""}`,
18288
18297
  onClick: () => {
18289
- E(!0), D((W) => W + 1);
18298
+ E(!0), M((W) => W + 1);
18290
18299
  },
18291
18300
  children: "Custom"
18292
18301
  }
18293
18302
  )
18294
18303
  ] }),
18295
- A && /* @__PURE__ */ e("div", { className: "cedros-deposit-flow-token-custom", children: /* @__PURE__ */ e(
18304
+ k && /* @__PURE__ */ e("div", { className: "cedros-deposit-flow-token-custom", children: /* @__PURE__ */ e(
18296
18305
  tn,
18297
18306
  {
18298
18307
  tokens: I,
18299
18308
  selectedToken: t,
18300
18309
  onSelect: f,
18301
- openSignal: M
18310
+ openSignal: x
18302
18311
  }
18303
18312
  ) })
18304
18313
  ] }),
@@ -18312,7 +18321,7 @@ function tc({
18312
18321
  }
18313
18322
  ) }),
18314
18323
  /* @__PURE__ */ i("div", { className: "cedros-deposit-flow-field", children: [
18315
- /* @__PURE__ */ e("label", { className: "cedros-deposit-flow-label", children: R ? "Sign to send tokens to this address" : `Sign to send ${Z ?? "--"} ${P ? "SOL" : t.symbol} to this address` }),
18324
+ /* @__PURE__ */ e("label", { className: "cedros-deposit-flow-label", children: R ? "Sign to send tokens to this address" : `Sign to send ${Z ?? "--"} ${T ? "SOL" : t.symbol} to this address` }),
18316
18325
  /* @__PURE__ */ i("div", { className: "cedros-deposit-flow-address-box", children: [
18317
18326
  /* @__PURE__ */ e("code", { className: "cedros-deposit-flow-address", children: l || "Loading..." }),
18318
18327
  /* @__PURE__ */ i("div", { className: "cedros-deposit-flow-address-actions", children: [
@@ -18362,11 +18371,11 @@ function tc({
18362
18371
  `, ", ")}`,
18363
18372
  "aria-expanded": w,
18364
18373
  onClick: (W) => {
18365
- W.stopPropagation(), L(($) => !$);
18374
+ W.stopPropagation(), P(($) => !$);
18366
18375
  },
18367
- onBlur: () => L(!1),
18376
+ onBlur: () => P(!1),
18368
18377
  onKeyDown: (W) => {
18369
- W.key === "Escape" && L(!1);
18378
+ W.key === "Escape" && P(!1);
18370
18379
  },
18371
18380
  children: "i"
18372
18381
  }
@@ -18397,7 +18406,7 @@ function tc({
18397
18406
  {
18398
18407
  type: "button",
18399
18408
  className: "cedros-deposit-flow-button cedros-deposit-flow-button-secondary",
18400
- onClick: k,
18409
+ onClick: A,
18401
18410
  children: "Back"
18402
18411
  }
18403
18412
  ),
@@ -18447,23 +18456,23 @@ function rc({
18447
18456
  onSent: y,
18448
18457
  onBack: f
18449
18458
  }) {
18450
- const [p, v] = N(u.privateMinUsd), [k, b] = N(!1), [_, A] = N(!1), [E, w] = N(0), [L, M] = N(null), x = hs(p, u) === "sol_micro", T = t.symbol === Ue.symbol, S = O(() => {
18459
+ const [p, v] = N(u.privateMinUsd), [A, b] = N(!1), [_, k] = N(!1), [E, w] = N(0), [P, x] = N(null), D = hs(p, u) === "sol_micro", L = t.symbol === Ue.symbol, S = O(() => {
18451
18460
  const q = a.length === 0 ? s : s.filter((le) => a.includes(le.symbol)), Z = q.length > 0 ? q : s;
18452
18461
  return Z.some((le) => le.symbol === Ue.symbol) ? Z : [...Z, Ue];
18453
- }, [s, a]), P = yt(u, p), R = P < 0.01 ? 0.01 : P, I = T ? "Fees: calculated after deposit" : `Fees: $${R.toFixed(2)} total`, j = T ? "" : on(u, p, P), ee = T || p > 0, ne = dn(x ? Ie : t, u, n), V = ne ? p / ne : null, Y = V ? un(V, t.symbol) : null;
18462
+ }, [s, a]), T = yt(u, p), R = T < 0.01 ? 0.01 : T, I = L ? "Fees: calculated after deposit" : `Fees: $${R.toFixed(2)} total`, j = L ? "" : on(u, p, T), ee = L || p > 0, ne = dn(D ? Ie : t, u, n), V = ne ? p / ne : null, Y = V ? un(V, t.symbol) : null;
18454
18463
  return U(() => {
18455
18464
  if (o === "multi-token")
18456
- if (x && t.symbol !== "SOL") {
18457
- M(t);
18465
+ if (D && t.symbol !== "SOL") {
18466
+ x(t);
18458
18467
  const q = s.find((Z) => Z.symbol === "SOL");
18459
18468
  q && m(q);
18460
- } else !x && L && t.symbol === "SOL" && (m(L), M(null));
18461
- }, [x, t.symbol, o, s, m, L, t]), U(() => {
18469
+ } else !D && P && t.symbol === "SOL" && (m(P), x(null));
18470
+ }, [D, t.symbol, o, s, m, P, t]), U(() => {
18462
18471
  h(p);
18463
18472
  }, [p, h]), c ? /* @__PURE__ */ i("div", { className: "cedros-deposit-flow-step", children: [
18464
18473
  /* @__PURE__ */ e("h4", { className: "cedros-deposit-flow-step-title", children: "Send Deposit" }),
18465
18474
  /* @__PURE__ */ e("p", { className: "cedros-deposit-flow-step-desc", children: "Send funds to your deposit address. We'll confirm automatically." }),
18466
- o === "multi-token" && !x && /* @__PURE__ */ i("div", { className: "cedros-deposit-flow-field", children: [
18475
+ o === "multi-token" && !D && /* @__PURE__ */ i("div", { className: "cedros-deposit-flow-field", children: [
18467
18476
  /* @__PURE__ */ e("label", { className: "cedros-deposit-flow-label", children: "Token" }),
18468
18477
  /* @__PURE__ */ i("div", { className: "cedros-deposit-flow-token-quick", children: [
18469
18478
  r.map((q) => {
@@ -18496,7 +18505,7 @@ function rc({
18496
18505
  "button",
18497
18506
  {
18498
18507
  type: "button",
18499
- className: `cedros-deposit-flow-token-quick-btn ${k ? "is-active" : ""}`,
18508
+ className: `cedros-deposit-flow-token-quick-btn ${A ? "is-active" : ""}`,
18500
18509
  onClick: () => {
18501
18510
  b(!0), w((q) => q + 1);
18502
18511
  },
@@ -18504,7 +18513,7 @@ function rc({
18504
18513
  }
18505
18514
  )
18506
18515
  ] }),
18507
- k && /* @__PURE__ */ e("div", { className: "cedros-deposit-flow-token-custom", children: /* @__PURE__ */ e(
18516
+ A && /* @__PURE__ */ e("div", { className: "cedros-deposit-flow-token-custom", children: /* @__PURE__ */ e(
18508
18517
  tn,
18509
18518
  {
18510
18519
  tokens: S,
@@ -18514,7 +18523,7 @@ function rc({
18514
18523
  }
18515
18524
  ) })
18516
18525
  ] }),
18517
- !T && /* @__PURE__ */ i("div", { className: "cedros-deposit-flow-field", children: [
18526
+ !L && /* @__PURE__ */ i("div", { className: "cedros-deposit-flow-field", children: [
18518
18527
  /* @__PURE__ */ e("label", { className: "cedros-deposit-flow-label", children: "Deposit Amount" }),
18519
18528
  /* @__PURE__ */ e(
18520
18529
  nn,
@@ -18526,9 +18535,9 @@ function rc({
18526
18535
  }
18527
18536
  )
18528
18537
  ] }),
18529
- T && /* @__PURE__ */ e("div", { className: "cedros-deposit-flow-note", children: "Send any token you want. We'll detect the deposit, swap it, and credit your balance automatically." }),
18538
+ L && /* @__PURE__ */ e("div", { className: "cedros-deposit-flow-note", children: "Send any token you want. We'll detect the deposit, swap it, and credit your balance automatically." }),
18530
18539
  /* @__PURE__ */ i("div", { className: "cedros-deposit-flow-field", children: [
18531
- /* @__PURE__ */ e("label", { className: "cedros-deposit-flow-label", children: T ? "Send any token to this address" : `Send ${Y ?? "--"} ${x ? "SOL" : t.symbol} to this address` }),
18540
+ /* @__PURE__ */ e("label", { className: "cedros-deposit-flow-label", children: L ? "Send any token to this address" : `Send ${Y ?? "--"} ${D ? "SOL" : t.symbol} to this address` }),
18532
18541
  /* @__PURE__ */ i("div", { className: "cedros-deposit-flow-address-box", children: [
18533
18542
  /* @__PURE__ */ e("code", { className: "cedros-deposit-flow-address", children: c }),
18534
18543
  /* @__PURE__ */ e(
@@ -18553,7 +18562,7 @@ function rc({
18553
18562
  /* @__PURE__ */ e("span", { className: "cedros-deposit-flow-info-dot" }),
18554
18563
  /* @__PURE__ */ i("span", { children: [
18555
18564
  I,
18556
- !T && /* @__PURE__ */ e(
18565
+ !L && /* @__PURE__ */ e(
18557
18566
  "button",
18558
18567
  {
18559
18568
  type: "button",
@@ -18563,11 +18572,11 @@ function rc({
18563
18572
  `, ", ")}`,
18564
18573
  "aria-expanded": _,
18565
18574
  onClick: (q) => {
18566
- q.stopPropagation(), A((Z) => !Z);
18575
+ q.stopPropagation(), k((Z) => !Z);
18567
18576
  },
18568
- onBlur: () => A(!1),
18577
+ onBlur: () => k(!1),
18569
18578
  onKeyDown: (q) => {
18570
- q.key === "Escape" && A(!1);
18579
+ q.key === "Escape" && k(!1);
18571
18580
  },
18572
18581
  children: "i"
18573
18582
  }
@@ -19042,10 +19051,10 @@ function Xc({
19042
19051
  onLoad: n,
19043
19052
  onTransactionClick: o
19044
19053
  }) {
19045
- const { getHistory: c, isLoading: l, error: d, clearError: u } = hn(), [g, m] = N(t), [h, y] = N([]), [f, p] = N(0), [v, k] = N(0), [b, _] = N(null), A = Gt.find((S) => S.key === g) || Gt[0], E = O(() => A.txTypes === null ? h : h.filter((S) => {
19046
- const P = S.txType || "";
19047
- return A.txTypes.some((R) => P.toLowerCase().includes(R.toLowerCase()));
19048
- }), [h, A.txTypes]), w = C(async () => {
19054
+ const { getHistory: c, isLoading: l, error: d, clearError: u } = hn(), [g, m] = N(t), [h, y] = N([]), [f, p] = N(0), [v, A] = N(0), [b, _] = N(null), k = Gt.find((S) => S.key === g) || Gt[0], E = O(() => k.txTypes === null ? h : h.filter((S) => {
19055
+ const T = S.txType || "";
19056
+ return k.txTypes.some((R) => T.toLowerCase().includes(R.toLowerCase()));
19057
+ }), [h, k.txTypes]), w = C(async () => {
19049
19058
  try {
19050
19059
  const S = await c({ limit: s * 3, offset: v });
19051
19060
  y(S.transactions), p(S.total), n?.(S), _(null);
@@ -19054,7 +19063,7 @@ function Xc({
19054
19063
  }
19055
19064
  }, [s, v, c, n]);
19056
19065
  U(() => {
19057
- k(0);
19066
+ A(0);
19058
19067
  }, [g]), U(() => {
19059
19068
  w();
19060
19069
  }, [w]), U(() => {
@@ -19062,10 +19071,10 @@ function Xc({
19062
19071
  const S = setInterval(w, r);
19063
19072
  return () => clearInterval(S);
19064
19073
  }, [r, w]);
19065
- const L = Math.ceil(f / s), M = Math.floor(v / s) + 1, D = (S) => {
19066
- const P = (S - 1) * s;
19067
- k(Math.max(0, Math.min(P, Math.max(0, f - 1))));
19068
- }, x = (S) => {
19074
+ const P = Math.ceil(f / s), x = Math.floor(v / s) + 1, M = (S) => {
19075
+ const T = (S - 1) * s;
19076
+ A(Math.max(0, Math.min(T, Math.max(0, f - 1))));
19077
+ }, D = (S) => {
19069
19078
  m(S);
19070
19079
  };
19071
19080
  if (b || d)
@@ -19088,8 +19097,8 @@ function Xc({
19088
19097
  /* @__PURE__ */ e("span", { className: "cedros-tx-loading-indicator" }),
19089
19098
  /* @__PURE__ */ e("span", { className: "cedros-tx-loading-text", children: "Loading transactions..." })
19090
19099
  ] });
19091
- const T = (S) => S.txTypes === null ? h.length : h.filter((P) => {
19092
- const R = P.txType || "";
19100
+ const L = (S) => S.txTypes === null ? h.length : h.filter((T) => {
19101
+ const R = T.txType || "";
19093
19102
  return S.txTypes.some((I) => R.toLowerCase().includes(I.toLowerCase()));
19094
19103
  }).length;
19095
19104
  return /* @__PURE__ */ i("div", { className: `cedros-tx-history ${a}`, children: [
@@ -19108,31 +19117,31 @@ function Xc({
19108
19117
  )
19109
19118
  ] }),
19110
19119
  /* @__PURE__ */ e("div", { className: "cedros-tx-tabs", children: Gt.map((S) => {
19111
- const P = T(S), R = g === S.key;
19120
+ const T = L(S), R = g === S.key;
19112
19121
  return /* @__PURE__ */ i(
19113
19122
  "button",
19114
19123
  {
19115
19124
  type: "button",
19116
19125
  className: `cedros-tx-tab ${R ? "cedros-tx-tab-active" : ""}`,
19117
- onClick: () => x(S.key),
19126
+ onClick: () => D(S.key),
19118
19127
  children: [
19119
19128
  S.label,
19120
- P > 0 && /* @__PURE__ */ e("span", { className: "cedros-tx-tab-count", children: P })
19129
+ T > 0 && /* @__PURE__ */ e("span", { className: "cedros-tx-tab-count", children: T })
19121
19130
  ]
19122
19131
  },
19123
19132
  S.key
19124
19133
  );
19125
19134
  }) }),
19126
19135
  E.length === 0 ? /* @__PURE__ */ i("div", { className: "cedros-tx-empty", children: [
19127
- /* @__PURE__ */ e("p", { className: "cedros-tx-empty-message", children: g === "all" ? "No transactions yet." : `No ${A.label.toLowerCase()} found.` }),
19136
+ /* @__PURE__ */ e("p", { className: "cedros-tx-empty-message", children: g === "all" ? "No transactions yet." : `No ${k.label.toLowerCase()} found.` }),
19128
19137
  g === "all" && /* @__PURE__ */ e("p", { className: "cedros-tx-empty-hint", children: "Make a deposit to get started." })
19129
19138
  ] }) : /* @__PURE__ */ i(K, { children: [
19130
19139
  /* @__PURE__ */ e("div", { className: "cedros-tx-list", children: E.slice(0, s).map((S) => {
19131
- const P = S.amountLamports >= 0;
19140
+ const T = S.amountLamports >= 0;
19132
19141
  return /* @__PURE__ */ i(
19133
19142
  "div",
19134
19143
  {
19135
- className: `cedros-tx-item ${P ? "cedros-tx-item-positive" : "cedros-tx-item-negative"}`,
19144
+ className: `cedros-tx-item ${T ? "cedros-tx-item-positive" : "cedros-tx-item-negative"}`,
19136
19145
  onClick: () => o?.(S),
19137
19146
  onKeyDown: (R) => {
19138
19147
  (R.key === "Enter" || R.key === " ") && (R.preventDefault(), o?.(S));
@@ -19143,8 +19152,8 @@ function Xc({
19143
19152
  /* @__PURE__ */ e(
19144
19153
  "div",
19145
19154
  {
19146
- className: `cedros-tx-icon ${P ? "cedros-tx-icon-positive" : "cedros-tx-icon-negative"}`,
19147
- children: wc(S.txType, P)
19155
+ className: `cedros-tx-icon ${T ? "cedros-tx-icon-positive" : "cedros-tx-icon-negative"}`,
19156
+ children: wc(S.txType, T)
19148
19157
  }
19149
19158
  ),
19150
19159
  /* @__PURE__ */ i("div", { className: "cedros-tx-content", children: [
@@ -19153,7 +19162,7 @@ function Xc({
19153
19162
  /* @__PURE__ */ e(
19154
19163
  "span",
19155
19164
  {
19156
- className: `cedros-tx-amount ${P ? "cedros-tx-amount-positive" : "cedros-tx-amount-negative"}`,
19165
+ className: `cedros-tx-amount ${T ? "cedros-tx-amount-positive" : "cedros-tx-amount-negative"}`,
19157
19166
  children: gc(S.amountLamports, S.currency)
19158
19167
  }
19159
19168
  )
@@ -19168,30 +19177,30 @@ function Xc({
19168
19177
  S.id
19169
19178
  );
19170
19179
  }) }),
19171
- L > 1 && /* @__PURE__ */ i("div", { className: "cedros-tx-pagination", children: [
19180
+ P > 1 && /* @__PURE__ */ i("div", { className: "cedros-tx-pagination", children: [
19172
19181
  /* @__PURE__ */ e(
19173
19182
  "button",
19174
19183
  {
19175
19184
  type: "button",
19176
19185
  className: "cedros-tx-page-btn",
19177
- onClick: () => D(M - 1),
19178
- disabled: M <= 1,
19186
+ onClick: () => M(x - 1),
19187
+ disabled: x <= 1,
19179
19188
  children: "Previous"
19180
19189
  }
19181
19190
  ),
19182
19191
  /* @__PURE__ */ i("span", { className: "cedros-tx-page-info", children: [
19183
19192
  "Page ",
19184
- M,
19193
+ x,
19185
19194
  " of ",
19186
- L
19195
+ P
19187
19196
  ] }),
19188
19197
  /* @__PURE__ */ e(
19189
19198
  "button",
19190
19199
  {
19191
19200
  type: "button",
19192
19201
  className: "cedros-tx-page-btn",
19193
- onClick: () => D(M + 1),
19194
- disabled: M >= L,
19202
+ onClick: () => M(x + 1),
19203
+ disabled: x >= P,
19195
19204
  children: "Next"
19196
19205
  }
19197
19206
  )