@burdenoff/microfe-auth 2026.512.1 → 2026.514.2

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 (72) hide show
  1. package/dist/auth/AuthRoutes.d.ts.map +1 -1
  2. package/dist/auth/AuthRoutes.js +94 -58
  3. package/dist/auth/AuthRoutes.js.map +1 -1
  4. package/dist/auth/components/AuthLayout.js +1 -1
  5. package/dist/auth/components/AuthLayout.js.map +1 -1
  6. package/dist/auth/components/profile/UserProfileMenu.d.ts.map +1 -1
  7. package/dist/auth/components/profile/UserProfileMenu.js +63 -52
  8. package/dist/auth/components/profile/UserProfileMenu.js.map +1 -1
  9. package/dist/auth/hooks/useApiKeyOperations.d.ts +5 -1
  10. package/dist/auth/hooks/useApiKeyOperations.d.ts.map +1 -1
  11. package/dist/auth/hooks/useAppOperations.d.ts +5 -1
  12. package/dist/auth/hooks/useAppOperations.d.ts.map +1 -1
  13. package/dist/auth/hooks/useAuthOperations.d.ts.map +1 -1
  14. package/dist/auth/hooks/useAuthOperations.js +78 -70
  15. package/dist/auth/hooks/useAuthOperations.js.map +1 -1
  16. package/dist/auth/hooks/useDelegationOperations.d.ts +10 -2
  17. package/dist/auth/hooks/useDelegationOperations.d.ts.map +1 -1
  18. package/dist/auth/hooks/useSessionOperations.d.ts.map +1 -1
  19. package/dist/auth/hooks/useSessionOperations.js +3 -2
  20. package/dist/auth/hooks/useSessionOperations.js.map +1 -1
  21. package/dist/auth/pages/AuditLogPage.d.ts +8 -1
  22. package/dist/auth/pages/AuditLogPage.d.ts.map +1 -1
  23. package/dist/auth/pages/AuditLogPage.js +189 -104
  24. package/dist/auth/pages/AuditLogPage.js.map +1 -1
  25. package/dist/auth/pages/LoginPage.d.ts.map +1 -1
  26. package/dist/auth/pages/LoginPage.js +2 -2
  27. package/dist/auth/pages/LoginPage.js.map +1 -1
  28. package/dist/auth/pages/MfaSetupPage.d.ts.map +1 -1
  29. package/dist/auth/pages/MfaSetupPage.js +5 -5
  30. package/dist/auth/pages/MfaSetupPage.js.map +1 -1
  31. package/dist/auth/pages/PasswordResetPage.d.ts.map +1 -1
  32. package/dist/auth/pages/PasswordResetPage.js +54 -53
  33. package/dist/auth/pages/PasswordResetPage.js.map +1 -1
  34. package/dist/auth/pages/RegisterPage.d.ts.map +1 -1
  35. package/dist/auth/pages/RegisterPage.js +206 -189
  36. package/dist/auth/pages/RegisterPage.js.map +1 -1
  37. package/dist/auth/pages/SecurityPage.d.ts.map +1 -1
  38. package/dist/auth/pages/SecurityPage.js +329 -280
  39. package/dist/auth/pages/SecurityPage.js.map +1 -1
  40. package/dist/auth/pages/SessionsPage.d.ts +6 -0
  41. package/dist/auth/pages/SessionsPage.d.ts.map +1 -1
  42. package/dist/auth/pages/SessionsPage.js +255 -143
  43. package/dist/auth/pages/SessionsPage.js.map +1 -1
  44. package/dist/auth/pages/UserDetailsPage.d.ts.map +1 -1
  45. package/dist/auth/pages/UserDetailsPage.js +1 -1
  46. package/dist/auth/pages/UserDetailsPage.js.map +1 -1
  47. package/dist/auth/pages/UsersPage.d.ts.map +1 -1
  48. package/dist/auth/pages/UsersPage.js +501 -378
  49. package/dist/auth/pages/UsersPage.js.map +1 -1
  50. package/dist/auth/utils/validation.js +1 -1
  51. package/dist/auth/utils/validation.js.map +1 -1
  52. package/dist/dev/main.d.ts.map +1 -1
  53. package/dist/generated/global-operations.d.ts +219 -103
  54. package/dist/generated/global-operations.d.ts.map +1 -1
  55. package/dist/generated/global-operations.js +237 -166
  56. package/dist/generated/global-operations.js.map +1 -1
  57. package/dist/generated/global-types.d.ts +2544 -270
  58. package/dist/generated/global-types.d.ts.map +1 -1
  59. package/dist/generated/wspace-operations.d.ts +41 -1
  60. package/dist/generated/wspace-operations.d.ts.map +1 -1
  61. package/dist/generated/wspace-operations.js +26 -0
  62. package/dist/generated/wspace-operations.js.map +1 -0
  63. package/dist/generated/wspace-types.d.ts +2974 -337
  64. package/dist/generated/wspace-types.d.ts.map +1 -1
  65. package/dist/microfe-auth.css +1 -1
  66. package/dist/translations/en.d.ts +249 -0
  67. package/dist/translations/en.d.ts.map +1 -0
  68. package/package.json +1 -1
  69. package/dist/auth/pages/ApiKeysPage.d.ts +0 -5
  70. package/dist/auth/pages/ApiKeysPage.d.ts.map +0 -1
  71. package/dist/auth/pages/DelegationsPage.d.ts +0 -5
  72. package/dist/auth/pages/DelegationsPage.d.ts.map +0 -1
@@ -2,576 +2,625 @@ import { useAuthStore as e } from "../store/authStore.js";
2
2
  import { useAuthOperations as t } from "../hooks/useAuthOperations.js";
3
3
  import { useAccountOperations as n } from "../hooks/useAccountOperations.js";
4
4
  import "../hooks/index.js";
5
- import { formatDate as r } from "../utils/formatters.js";
6
- import { ConfirmActionDialog as i } from "../components/ConfirmActionDialog.js";
7
- import { nativeImpact as a, nativeNotify as o } from "../../utils/nativeBridge.js";
8
- import { useState as s } from "react";
9
- import { useNavigate as c } from "react-router-dom";
10
- import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell";
11
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
5
+ import { formatDate as ee } from "../utils/formatters.js";
6
+ import { ConfirmActionDialog as te } from "../components/ConfirmActionDialog.js";
7
+ import { nativeImpact as r, nativeNotify as i } from "../../utils/nativeBridge.js";
8
+ import { useEffect as a, useId as o, useRef as s, useState as c } from "react";
9
+ import { useNavigate as l } from "react-router-dom";
10
+ import { useI18n as u } from "@burdenoff/fe-libs/shared/providers/shell";
11
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
12
12
  //#region src/auth/pages/SecurityPage.tsx
13
- var f = ({ className: e }) => /* @__PURE__ */ u("svg", {
13
+ var p = ({ className: e }) => /* @__PURE__ */ d("svg", {
14
14
  className: e,
15
15
  fill: "none",
16
16
  viewBox: "0 0 24 24",
17
17
  stroke: "currentColor",
18
- children: /* @__PURE__ */ u("path", {
18
+ "aria-hidden": "true",
19
+ children: /* @__PURE__ */ d("path", {
19
20
  strokeLinecap: "round",
20
21
  strokeLinejoin: "round",
21
22
  strokeWidth: 1.5,
22
23
  d: "M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"
23
24
  })
24
- }), p = ({ className: e }) => /* @__PURE__ */ u("svg", {
25
+ }), ne = ({ className: e }) => /* @__PURE__ */ d("svg", {
25
26
  className: e,
26
27
  fill: "none",
27
28
  viewBox: "0 0 24 24",
28
29
  stroke: "currentColor",
29
- children: /* @__PURE__ */ u("path", {
30
+ "aria-hidden": "true",
31
+ children: /* @__PURE__ */ d("path", {
30
32
  strokeLinecap: "round",
31
33
  strokeLinejoin: "round",
32
34
  strokeWidth: 1.5,
33
35
  d: "M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"
34
36
  })
35
- }), m = ({ className: e }) => /* @__PURE__ */ u("svg", {
37
+ }), re = ({ className: e }) => /* @__PURE__ */ d("svg", {
36
38
  className: e,
37
39
  fill: "none",
38
40
  viewBox: "0 0 24 24",
39
41
  stroke: "currentColor",
40
- children: /* @__PURE__ */ u("path", {
42
+ "aria-hidden": "true",
43
+ children: /* @__PURE__ */ d("path", {
41
44
  strokeLinecap: "round",
42
45
  strokeLinejoin: "round",
43
46
  strokeWidth: 1.5,
44
47
  d: "M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"
45
48
  })
46
- }), h = ({ className: e }) => /* @__PURE__ */ u("svg", {
49
+ }), ie = ({ className: e }) => /* @__PURE__ */ d("svg", {
47
50
  className: e,
48
51
  fill: "none",
49
52
  viewBox: "0 0 24 24",
50
53
  stroke: "currentColor",
51
- children: /* @__PURE__ */ u("path", {
54
+ "aria-hidden": "true",
55
+ children: /* @__PURE__ */ d("path", {
52
56
  strokeLinecap: "round",
53
57
  strokeLinejoin: "round",
54
58
  strokeWidth: 1.5,
55
59
  d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
56
60
  })
57
- }), g = ({ className: e }) => /* @__PURE__ */ u("svg", {
61
+ }), ae = ({ className: e }) => /* @__PURE__ */ d("svg", {
58
62
  className: e,
59
63
  fill: "none",
60
64
  viewBox: "0 0 24 24",
61
65
  stroke: "currentColor",
62
- children: /* @__PURE__ */ u("path", {
66
+ "aria-hidden": "true",
67
+ children: /* @__PURE__ */ d("path", {
63
68
  strokeLinecap: "round",
64
69
  strokeLinejoin: "round",
65
70
  strokeWidth: 1.5,
66
71
  d: "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"
67
72
  })
68
- }), ee = ({ className: e }) => /* @__PURE__ */ u("svg", {
73
+ }), m = ({ className: e }) => /* @__PURE__ */ d("svg", {
69
74
  className: e,
70
75
  fill: "none",
71
76
  viewBox: "0 0 24 24",
72
77
  stroke: "currentColor",
73
- children: /* @__PURE__ */ u("path", {
74
- strokeLinecap: "round",
75
- strokeLinejoin: "round",
76
- strokeWidth: 1.5,
77
- d: "M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"
78
- })
79
- }), _ = ({ className: e }) => /* @__PURE__ */ u("svg", {
80
- className: e,
81
- fill: "none",
82
- viewBox: "0 0 24 24",
83
- stroke: "currentColor",
84
- children: /* @__PURE__ */ u("path", {
78
+ "aria-hidden": "true",
79
+ children: /* @__PURE__ */ d("path", {
85
80
  strokeLinecap: "round",
86
81
  strokeLinejoin: "round",
87
82
  strokeWidth: 2,
88
83
  d: "M9 5l7 7-7 7"
89
84
  })
90
- }), v = ({ className: e }) => /* @__PURE__ */ u("svg", {
85
+ }), h = ({ className: e }) => /* @__PURE__ */ d("svg", {
91
86
  className: e,
92
87
  fill: "currentColor",
93
88
  viewBox: "0 0 20 20",
94
- children: /* @__PURE__ */ u("path", {
89
+ "aria-hidden": "true",
90
+ children: /* @__PURE__ */ d("path", {
95
91
  fillRule: "evenodd",
96
92
  d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
97
93
  clipRule: "evenodd"
98
94
  })
99
- }), y = ({ className: e }) => /* @__PURE__ */ u("svg", {
95
+ }), g = ({ className: e }) => /* @__PURE__ */ d("svg", {
100
96
  className: e,
101
97
  fill: "currentColor",
102
98
  viewBox: "0 0 20 20",
103
- children: /* @__PURE__ */ u("path", {
99
+ "aria-hidden": "true",
100
+ children: /* @__PURE__ */ d("path", {
104
101
  fillRule: "evenodd",
105
102
  d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",
106
103
  clipRule: "evenodd"
107
104
  })
108
- }), b = ({ className: e }) => /* @__PURE__ */ d("svg", {
105
+ }), _ = ({ className: e }) => /* @__PURE__ */ f("svg", {
109
106
  className: e,
110
107
  fill: "none",
111
108
  viewBox: "0 0 24 24",
112
- children: [/* @__PURE__ */ u("circle", {
109
+ "aria-hidden": "true",
110
+ children: [/* @__PURE__ */ d("circle", {
113
111
  className: "opacity-25",
114
112
  cx: "12",
115
113
  cy: "12",
116
114
  r: "10",
117
115
  stroke: "currentColor",
118
116
  strokeWidth: "4"
119
- }), /* @__PURE__ */ u("path", {
117
+ }), /* @__PURE__ */ d("path", {
120
118
  className: "opacity-75",
121
119
  fill: "currentColor",
122
120
  d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
123
121
  })]
124
- }), x = "DELETE MY ACCOUNT";
125
- function S() {
126
- let { t: S } = l(), C = (e, t) => {
127
- let n = S(e);
122
+ }), v = "DELETE MY ACCOUNT";
123
+ function y() {
124
+ let { t: y } = u(), b = (e, t) => {
125
+ let n = y(e);
128
126
  return n === e ? t : n;
129
- }, w = c(), T = e((e) => e.user), { signOut: E } = t({ disableCurrentUserQuery: !0 }), { deactivateAccount: D, deleteAccount: O, isDeactivating: k, isDeleting: A } = n(), [j, M] = s(!1), [N, P] = s(!1), F = [
127
+ }, x = l(), S = e((e) => e.user), { signOut: oe } = t({ disableCurrentUserQuery: !0 }), { deactivateAccount: se, deleteAccount: ce, isDeactivating: C, isDeleting: w } = n(), [T, E] = c(!1), [D, O] = c(!1), le = [
130
128
  {
131
- name: C("auth.security.navProfile", "User Profile"),
132
- description: C("auth.security.navProfileDesc", "View and edit your profile information"),
129
+ name: b("auth.security.navProfile", "User Profile"),
130
+ description: b("auth.security.navProfileDesc", "View and edit your profile information"),
133
131
  path: "/auth/profile",
134
- icon: h,
132
+ icon: ie,
135
133
  color: "text-accent-teal",
136
134
  bgColor: "bg-accent-teal-subtle"
137
135
  },
138
136
  {
139
- name: C("auth.security.navMfa", "Two-Factor Authentication"),
140
- description: C("auth.security.navMfaDesc", "Secure your account with TOTP"),
137
+ name: b("auth.security.navMfa", "Two-Factor Authentication"),
138
+ description: b("auth.security.navMfaDesc", "Secure your account with TOTP"),
141
139
  path: "/auth/mfa",
142
- icon: p,
140
+ icon: ne,
143
141
  color: "text-accent-purple",
144
142
  bgColor: "bg-accent-purple-subtle"
145
143
  },
146
144
  {
147
- name: C("auth.security.navUsers", "Users"),
148
- description: C("auth.security.navUsersDesc", "Manage system users"),
145
+ name: b("auth.security.navUsers", "Users"),
146
+ description: b("auth.security.navUsersDesc", "Manage system users"),
149
147
  path: "/auth/users",
150
- icon: m,
148
+ icon: re,
151
149
  color: "text-accent-indigo",
152
150
  bgColor: "bg-accent-indigo-subtle",
153
151
  adminOnly: !0
154
152
  }
155
- ], I = [{
156
- name: C("auth.security.navMagicLink", "Magic Link Login"),
157
- description: C("auth.security.navMagicLinkDesc", "Passwordless authentication"),
158
- path: "/auth/magic-link",
159
- icon: ee,
160
- color: "text-accent-pink",
161
- bgColor: "bg-accent-pink-subtle"
162
- }, {
163
- name: C("auth.security.navSso", "SSO Configuration"),
164
- description: C("auth.security.navSsoDesc", "Enterprise single sign-on"),
153
+ ], ue = [{
154
+ name: b("auth.security.navSso", "SSO Configuration"),
155
+ description: b("auth.security.navSsoDesc", "Enterprise single sign-on"),
165
156
  path: "/auth/sso",
166
- icon: g,
157
+ icon: ae,
167
158
  color: "text-accent-cyan",
168
159
  bgColor: "bg-accent-cyan-subtle",
169
160
  adminOnly: !0
170
- }], [L, R] = s(!1), [z, B] = s(!1), [V, H] = s(""), [U, W] = s(""), [G, K] = s(null), [q, J] = s(null), Y = async () => {
171
- M(!0);
161
+ }], [k, A] = c(!1), [j, M] = c(!1), [N, P] = c(""), [F, I] = c(""), [L, R] = c(null), [z, B] = c(null), V = o(), H = o(), U = o(), W = o(), G = o(), K = o(), q = o(), J = s(null), Y = s(null), X = s(null), Z = s(null);
162
+ a(() => {
163
+ k ? X.current?.focus() : J.current?.focus();
164
+ }, [k]), a(() => {
165
+ j ? Z.current?.focus() : Y.current?.focus();
166
+ }, [j]);
167
+ let de = async () => {
168
+ E(!0);
172
169
  try {
173
- await E(), w("/auth/login"), P(!1);
170
+ await oe(), x("/auth/login"), O(!1);
174
171
  } catch (e) {
175
- console.error("Logout failed:", e), M(!1);
172
+ console.error("Logout failed:", e), E(!1);
176
173
  }
177
- }, X = async () => {
178
- K(null);
174
+ }, fe = async () => {
175
+ R(null);
179
176
  try {
180
- let e = await D(V);
181
- e.success ? w("/auth/login", { replace: !0 }) : K(e.message || C("auth.security.deactivateFailed", "Failed to deactivate account"));
177
+ let e = await se(N);
178
+ e.success ? x("/auth/login", { replace: !0 }) : R(e.message || b("auth.security.deactivateFailed", "Failed to deactivate account"));
182
179
  } catch (e) {
183
- K(e instanceof Error ? e.message : C("auth.security.deactivateFailed", "Failed to deactivate account"));
180
+ R(e instanceof Error ? e.message : b("auth.security.deactivateFailed", "Failed to deactivate account"));
184
181
  }
185
- }, Z = async () => {
186
- if (K(null), U !== x) {
187
- K(C("auth.security.deleteConfirmMismatch", "Please type \"DELETE MY ACCOUNT\" to confirm"));
182
+ }, pe = async () => {
183
+ if (R(null), F !== v) {
184
+ R(b("auth.security.deleteConfirmMismatch", "Please type \"DELETE MY ACCOUNT\" to confirm"));
188
185
  return;
189
186
  }
190
- a("medium");
187
+ r("medium");
191
188
  try {
192
- let e = await O(V, U);
193
- e.success ? (o("success"), w("/auth/login", { replace: !0 })) : (o("error"), K(e.message || C("auth.security.deleteFailed", "Failed to delete account")));
189
+ let e = await ce(N, F);
190
+ e.success ? (i("success"), x("/auth/login", { replace: !0 })) : (i("error"), R(e.message || b("auth.security.deleteFailed", "Failed to delete account")));
194
191
  } catch (e) {
195
- o("error"), K(e instanceof Error ? e.message : C("auth.security.deleteFailed", "Failed to delete account"));
192
+ i("error"), R(e instanceof Error ? e.message : b("auth.security.deleteFailed", "Failed to delete account"));
196
193
  }
197
194
  }, Q = () => {
198
- R(!1), B(!1), H(""), W(""), K(null), J(null);
199
- }, $ = T?.role === "SUPER_ADMIN" || T?.role === "TENANT_ADMIN" || T?.role === "ORG_ADMIN", te = F.filter((e) => !e.adminOnly || $), ne = I.filter((e) => !e.adminOnly || $);
200
- return /* @__PURE__ */ d("div", {
201
- className: "bg-[var(--color-bg-canvas)] p-6",
202
- children: [/* @__PURE__ */ u(i, {
203
- open: N,
204
- onOpenChange: P,
205
- title: C("auth.security.signOutDialogTitle", "Sign out now?"),
206
- description: C("auth.security.signOutDialogDescription", "You will be signed out of this device and returned to the login screen."),
207
- confirmText: C("auth.security.signOutDialogConfirm", "Sign out"),
195
+ A(!1), M(!1), P(""), I(""), R(null), B(null);
196
+ }, $ = S?.role === "SUPER_ADMIN" || S?.role === "TENANT_ADMIN" || S?.role === "ORG_ADMIN", me = le.filter((e) => !e.adminOnly || $), he = ue.filter((e) => !e.adminOnly || $);
197
+ return /* @__PURE__ */ f("div", {
198
+ className: "bg-bg-canvas p-6",
199
+ children: [/* @__PURE__ */ d(te, {
200
+ open: D,
201
+ onOpenChange: O,
202
+ title: b("auth.security.signOutDialogTitle", "Sign out now?"),
203
+ description: b("auth.security.signOutDialogDescription", "You will be signed out of this device and returned to the login screen."),
204
+ confirmText: b("auth.security.signOutDialogConfirm", "Sign out"),
208
205
  variant: "warning",
209
- isPending: j,
210
- onConfirm: Y
211
- }), /* @__PURE__ */ d("main", {
206
+ isPending: T,
207
+ onConfirm: de
208
+ }), /* @__PURE__ */ f("main", {
212
209
  className: "max-w-7xl mx-auto space-y-8",
213
210
  children: [
214
- /* @__PURE__ */ d("div", {
211
+ /* @__PURE__ */ f("div", {
215
212
  className: "flex items-center gap-3",
216
- children: [/* @__PURE__ */ u("div", {
213
+ children: [/* @__PURE__ */ d("div", {
217
214
  className: "auth-brand-badge flex h-10 w-10 items-center justify-center rounded-xl",
218
- children: /* @__PURE__ */ u(f, { className: "w-6 h-6 text-white" })
219
- }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h1", {
215
+ children: /* @__PURE__ */ d(p, { className: "w-6 h-6 text-white" })
216
+ }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h1", {
220
217
  className: "text-lg font-bold text-text-primary",
221
- children: C("auth.security.title", "Security Center")
222
- }), /* @__PURE__ */ u("p", {
218
+ children: b("auth.security.title", "Security Center")
219
+ }), /* @__PURE__ */ d("p", {
223
220
  className: "text-xs text-text-secondary ",
224
- children: C("auth.security.subtitle", "Account & Authentication")
221
+ children: b("auth.security.subtitle", "Account & Authentication")
225
222
  })] })]
226
223
  }),
227
- /* @__PURE__ */ u("div", {
224
+ /* @__PURE__ */ d("div", {
228
225
  className: "auth-hero-card rounded-2xl p-6",
229
- children: /* @__PURE__ */ d("div", {
226
+ children: /* @__PURE__ */ f("div", {
230
227
  className: "flex flex-col md:flex-row md:items-center md:justify-between gap-4",
231
- children: [/* @__PURE__ */ d("div", {
228
+ children: [/* @__PURE__ */ f("div", {
232
229
  className: "flex items-center gap-4",
233
- children: [/* @__PURE__ */ u("div", {
230
+ children: [/* @__PURE__ */ d("div", {
234
231
  className: "w-14 h-14 rounded-2xl bg-bg-surface/20 backdrop-blur flex items-center justify-center",
235
- children: /* @__PURE__ */ u(f, { className: "w-8 h-8 text-white" })
236
- }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h2", {
232
+ children: /* @__PURE__ */ d(p, { className: "w-8 h-8 text-white" })
233
+ }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h2", {
237
234
  className: "text-xl font-bold",
238
- children: C("auth.security.securityStatus", "Security Status")
239
- }), /* @__PURE__ */ u("p", {
235
+ children: b("auth.security.securityStatus", "Security Status")
236
+ }), /* @__PURE__ */ d("p", {
240
237
  className: "opacity-80",
241
- children: T?.mfaEnabled ? C("auth.security.wellProtected", "Your account is well protected") : C("auth.security.enableMfaSuggestion", "Enable MFA for better security")
238
+ children: S?.mfaEnabled ? b("auth.security.wellProtected", "Your account is well protected") : b("auth.security.enableMfaSuggestion", "Enable MFA for better security")
242
239
  })] })]
243
- }), /* @__PURE__ */ u("div", {
240
+ }), /* @__PURE__ */ d("div", {
244
241
  className: "flex items-center gap-3",
245
- children: T?.mfaEnabled ? /* @__PURE__ */ d("span", {
242
+ children: S?.mfaEnabled ? /* @__PURE__ */ f("span", {
246
243
  className: "inline-flex items-center gap-2 px-4 py-2 rounded-xl bg-bg-surface/20 backdrop-blur text-white font-medium",
247
- children: [/* @__PURE__ */ u(v, { className: "w-5 h-5 text-status-success-text" }), C("auth.security.mfaEnabled", "MFA Enabled")]
248
- }) : /* @__PURE__ */ d("button", {
249
- onClick: () => w("/auth/mfa"),
244
+ children: [/* @__PURE__ */ d(h, { className: "w-5 h-5 text-status-success-text" }), b("auth.security.mfaEnabled", "MFA Enabled")]
245
+ }) : /* @__PURE__ */ f("button", {
246
+ type: "button",
247
+ onClick: () => x("/auth/mfa"),
250
248
  className: "inline-flex items-center gap-2 px-4 py-2 rounded-xl bg-bg-surface text-text-link font-semibold hover:bg-status-info-bg-subtle transition-colors shadow-lg",
251
- children: [/* @__PURE__ */ u(y, { className: "w-5 h-5 text-status-warning-text" }), C("auth.security.enableMfaNow", "Enable MFA Now")]
249
+ children: [/* @__PURE__ */ d(g, { className: "w-5 h-5 text-status-warning-text" }), b("auth.security.enableMfaNow", "Enable MFA Now")]
252
250
  })
253
251
  })]
254
252
  })
255
253
  }),
256
- /* @__PURE__ */ d("div", {
254
+ /* @__PURE__ */ f("div", {
257
255
  className: "mb-8 p-6 rounded-2xl bg-bg-surface border border-border-subtle shadow-sm",
258
- children: [/* @__PURE__ */ u("h3", {
256
+ children: [/* @__PURE__ */ d("h3", {
259
257
  className: "text-lg font-semibold text-text-primary mb-4",
260
- children: C("auth.security.accountInfo", "Account Information")
261
- }), /* @__PURE__ */ d("div", {
258
+ children: b("auth.security.accountInfo", "Account Information")
259
+ }), /* @__PURE__ */ f("dl", {
262
260
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",
263
261
  children: [
264
- /* @__PURE__ */ d("div", {
262
+ /* @__PURE__ */ f("div", {
265
263
  className: "sm:col-span-2 lg:col-span-1",
266
- children: [/* @__PURE__ */ u("dt", {
264
+ children: [/* @__PURE__ */ d("dt", {
267
265
  className: "text-sm font-medium text-text-secondary",
268
- children: C("auth.security.email", "Email")
269
- }), /* @__PURE__ */ d("dd", {
266
+ children: b("auth.security.email", "Email")
267
+ }), /* @__PURE__ */ f("dd", {
270
268
  className: "mt-1 text-text-primary",
271
- children: [/* @__PURE__ */ u("span", {
269
+ children: [/* @__PURE__ */ d("span", {
272
270
  className: "block truncate",
273
- title: T?.email,
274
- children: T?.email
275
- }), T?.emailVerified && /* @__PURE__ */ d("span", {
271
+ title: S?.email,
272
+ children: S?.email
273
+ }), S?.emailVerified && /* @__PURE__ */ f("span", {
276
274
  className: "mt-1 inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-status-success-bg-subtle text-status-success-text text-xs font-medium",
277
- children: [/* @__PURE__ */ u(v, { className: "w-3 h-3" }), C("auth.security.verified", "Verified")]
275
+ children: [/* @__PURE__ */ d(h, { className: "w-3 h-3" }), b("auth.security.verified", "Verified")]
278
276
  })]
279
277
  })]
280
278
  }),
281
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("dt", {
279
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("dt", {
282
280
  className: "text-sm font-medium text-text-secondary",
283
- children: C("auth.security.username", "Username")
284
- }), /* @__PURE__ */ u("dd", {
281
+ children: b("auth.security.username", "Username")
282
+ }), /* @__PURE__ */ d("dd", {
285
283
  className: "mt-1 text-text-primary truncate",
286
- title: T?.username ?? void 0,
287
- children: T?.username || "-"
284
+ title: S?.username ?? void 0,
285
+ children: S?.username || "-"
288
286
  })] }),
289
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("dt", {
287
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("dt", {
290
288
  className: "text-sm font-medium text-text-secondary",
291
- children: C("auth.security.role", "Role")
292
- }), /* @__PURE__ */ u("dd", {
289
+ children: b("auth.security.role", "Role")
290
+ }), /* @__PURE__ */ d("dd", {
293
291
  className: "mt-1",
294
- children: /* @__PURE__ */ u("span", {
292
+ children: /* @__PURE__ */ d("span", {
295
293
  className: "inline-flex px-2.5 py-0.5 rounded-full bg-accent-indigo-subtle text-accent-indigo text-xs font-medium",
296
- children: T?.role || "USER"
294
+ children: S?.role || "USER"
297
295
  })
298
296
  })] }),
299
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("dt", {
297
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("dt", {
300
298
  className: "text-sm font-medium text-text-secondary",
301
- children: C("auth.security.memberSince", "Member Since")
302
- }), /* @__PURE__ */ u("dd", {
299
+ children: b("auth.security.memberSince", "Member Since")
300
+ }), /* @__PURE__ */ d("dd", {
303
301
  className: "mt-1 text-text-primary",
304
- children: T?.createdAt ? r(T.createdAt) : "-"
302
+ children: S?.createdAt ? ee(S.createdAt) : "-"
305
303
  })] })
306
304
  ]
307
305
  })]
308
306
  }),
309
- /* @__PURE__ */ d("div", {
307
+ /* @__PURE__ */ f("div", {
310
308
  className: "mb-8",
311
- children: [/* @__PURE__ */ u("h3", {
309
+ children: [/* @__PURE__ */ d("h3", {
312
310
  className: "text-lg font-semibold text-text-primary mb-4",
313
- children: C("auth.security.securityAuth", "Security & Authentication")
314
- }), /* @__PURE__ */ u("div", {
311
+ children: b("auth.security.securityAuth", "Security & Authentication")
312
+ }), /* @__PURE__ */ d("div", {
315
313
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
316
- children: te.map((e) => /* @__PURE__ */ u("button", {
317
- onClick: () => w(e.path),
314
+ children: me.map((e) => /* @__PURE__ */ d("button", {
315
+ type: "button",
316
+ onClick: () => x(e.path),
317
+ "aria-label": e.name,
318
318
  className: "group relative p-5 rounded-2xl bg-bg-surface border border-border-subtle hover:border-border-default hover:shadow-lg transition-all duration-200 text-left",
319
- children: /* @__PURE__ */ d("div", {
319
+ children: /* @__PURE__ */ f("div", {
320
320
  className: "flex items-start gap-4",
321
321
  children: [
322
- /* @__PURE__ */ u("div", {
322
+ /* @__PURE__ */ d("div", {
323
323
  className: `w-12 h-12 rounded-xl ${e.bgColor} flex items-center justify-center flex-shrink-0 transition-transform group-hover:scale-110`,
324
- children: /* @__PURE__ */ u(e.icon, { className: `w-6 h-6 ${e.color}` })
324
+ children: /* @__PURE__ */ d(e.icon, { className: `w-6 h-6 ${e.color}` })
325
325
  }),
326
- /* @__PURE__ */ d("div", {
326
+ /* @__PURE__ */ f("div", {
327
327
  className: "flex-1 min-w-0",
328
- children: [/* @__PURE__ */ u("h4", {
328
+ children: [/* @__PURE__ */ d("h4", {
329
329
  className: "text-base font-semibold text-text-primary group-hover:text-accent-indigo transition-colors",
330
330
  children: e.name
331
- }), /* @__PURE__ */ u("p", {
331
+ }), /* @__PURE__ */ d("p", {
332
332
  className: "mt-1 text-sm text-text-secondary ",
333
333
  children: e.description
334
334
  })]
335
335
  }),
336
- /* @__PURE__ */ u(_, { className: "w-5 h-5 text-text-tertiary group-hover:text-indigo-500 transition-colors flex-shrink-0" })
336
+ /* @__PURE__ */ d(m, { className: "w-5 h-5 text-text-tertiary group-hover:text-indigo-500 transition-colors flex-shrink-0" })
337
337
  ]
338
338
  })
339
339
  }, e.path))
340
340
  })]
341
341
  }),
342
- /* @__PURE__ */ d("div", {
342
+ /* @__PURE__ */ f("div", {
343
343
  className: "mb-8",
344
- children: [/* @__PURE__ */ u("h3", {
344
+ children: [/* @__PURE__ */ d("h3", {
345
345
  className: "text-lg font-semibold text-text-primary mb-4",
346
- children: C("auth.security.quickActions", "Quick Actions")
347
- }), /* @__PURE__ */ u("div", {
346
+ children: b("auth.security.quickActions", "Quick Actions")
347
+ }), /* @__PURE__ */ d("div", {
348
348
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
349
- children: ne.map((e) => /* @__PURE__ */ u("button", {
350
- onClick: () => w(e.path),
349
+ children: he.map((e) => /* @__PURE__ */ d("button", {
350
+ type: "button",
351
+ onClick: () => x(e.path),
352
+ "aria-label": e.name,
351
353
  className: "group relative p-5 rounded-2xl bg-bg-surface border border-border-subtle hover:border-border-default hover:shadow-lg transition-all duration-200 text-left",
352
- children: /* @__PURE__ */ d("div", {
354
+ children: /* @__PURE__ */ f("div", {
353
355
  className: "flex items-start gap-4",
354
356
  children: [
355
- /* @__PURE__ */ u("div", {
357
+ /* @__PURE__ */ d("div", {
356
358
  className: `w-12 h-12 rounded-xl ${e.bgColor} flex items-center justify-center flex-shrink-0 transition-transform group-hover:scale-110`,
357
- children: /* @__PURE__ */ u(e.icon, { className: `w-6 h-6 ${e.color}` })
359
+ children: /* @__PURE__ */ d(e.icon, { className: `w-6 h-6 ${e.color}` })
358
360
  }),
359
- /* @__PURE__ */ d("div", {
361
+ /* @__PURE__ */ f("div", {
360
362
  className: "flex-1 min-w-0",
361
- children: [/* @__PURE__ */ u("h4", {
363
+ children: [/* @__PURE__ */ d("h4", {
362
364
  className: "text-base font-semibold text-text-primary group-hover:text-accent-indigo transition-colors",
363
365
  children: e.name
364
- }), /* @__PURE__ */ u("p", {
366
+ }), /* @__PURE__ */ d("p", {
365
367
  className: "mt-1 text-sm text-text-secondary ",
366
368
  children: e.description
367
369
  })]
368
370
  }),
369
- /* @__PURE__ */ u(_, { className: "w-5 h-5 text-text-tertiary group-hover:text-indigo-500 transition-colors flex-shrink-0" })
371
+ /* @__PURE__ */ d(m, { className: "w-5 h-5 text-text-tertiary group-hover:text-indigo-500 transition-colors flex-shrink-0" })
370
372
  ]
371
373
  })
372
374
  }, e.path))
373
375
  })]
374
376
  }),
375
- /* @__PURE__ */ d("div", {
377
+ /* @__PURE__ */ f("div", {
376
378
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
377
- children: [/* @__PURE__ */ d("div", {
379
+ children: [/* @__PURE__ */ f("div", {
378
380
  className: "p-6 rounded-2xl bg-bg-surface border border-border-subtle ",
379
- children: [/* @__PURE__ */ u("div", {
381
+ children: [/* @__PURE__ */ d("div", {
380
382
  className: "flex items-start justify-between",
381
- children: /* @__PURE__ */ d("div", { children: [
382
- /* @__PURE__ */ u("h3", {
383
+ children: /* @__PURE__ */ f("div", { children: [
384
+ /* @__PURE__ */ d("h3", {
383
385
  className: "text-lg font-semibold text-text-primary",
384
- children: C("auth.security.password", "Password")
386
+ children: b("auth.security.password", "Password")
385
387
  }),
386
- /* @__PURE__ */ u("p", {
388
+ /* @__PURE__ */ d("p", {
387
389
  className: "mt-1 text-sm text-text-secondary ",
388
- children: C("auth.security.updatePassword", "Update your password to keep your account secure")
390
+ children: b("auth.security.updatePassword", "Update your password to keep your account secure")
389
391
  }),
390
- /* @__PURE__ */ u("p", {
392
+ /* @__PURE__ */ d("p", {
391
393
  className: "mt-2 text-xs text-text-tertiary ",
392
- children: C("auth.security.lastChanged", "Last changed: Never")
394
+ children: b("auth.security.lastChanged", "Last changed: Never")
393
395
  })
394
396
  ] })
395
- }), /* @__PURE__ */ u("button", {
396
- onClick: () => w("/auth/reset-password"),
397
+ }), /* @__PURE__ */ d("button", {
398
+ type: "button",
399
+ onClick: () => x("/auth/reset-password"),
397
400
  className: "auth-primary-button mt-4 w-full px-5 py-2.5 font-semibold sm:w-auto",
398
- children: C("auth.security.changePassword", "Change Password")
401
+ children: b("auth.security.changePassword", "Change Password")
399
402
  })]
400
- }), /* @__PURE__ */ d("div", {
403
+ }), /* @__PURE__ */ f("div", {
401
404
  className: "p-6 rounded-2xl bg-status-error-bg-subtle border border-status-error-border",
402
405
  children: [
403
- /* @__PURE__ */ u("h3", {
406
+ /* @__PURE__ */ d("h3", {
404
407
  className: "text-lg font-semibold text-status-error-text",
405
- children: C("auth.security.dangerZone", "Danger Zone")
408
+ children: b("auth.security.dangerZone", "Danger Zone")
406
409
  }),
407
- /* @__PURE__ */ u("p", {
410
+ /* @__PURE__ */ d("p", {
408
411
  className: "mt-1 text-sm text-status-error-text/80",
409
- children: C("auth.security.dangerWarning", "These actions affect your account. Proceed with caution.")
412
+ children: b("auth.security.dangerWarning", "These actions affect your account. Proceed with caution.")
410
413
  }),
411
- /* @__PURE__ */ d("div", {
414
+ /* @__PURE__ */ f("div", {
412
415
  className: "mt-4 flex flex-wrap gap-3",
413
- children: [/* @__PURE__ */ u("button", {
414
- onClick: () => R(!0),
416
+ children: [/* @__PURE__ */ d("button", {
417
+ ref: J,
418
+ type: "button",
419
+ onClick: () => A(!0),
415
420
  className: "px-5 py-2.5 rounded-xl border-2 border-status-warning-border text-status-warning-text font-semibold hover:bg-status-warning-bg-subtle transition-all duration-200",
416
- children: C("auth.security.deactivateAccount", "Deactivate Account")
417
- }), /* @__PURE__ */ u("button", {
418
- onClick: () => B(!0),
421
+ children: b("auth.security.deactivateAccount", "Deactivate Account")
422
+ }), /* @__PURE__ */ d("button", {
423
+ ref: Y,
424
+ type: "button",
425
+ onClick: () => M(!0),
419
426
  className: "px-5 py-2.5 rounded-xl border-2 border-status-error-border text-status-error-text font-semibold hover:bg-status-error-bg-subtle transition-all duration-200",
420
- children: C("auth.security.deleteAccount", "Delete Account")
427
+ children: b("auth.security.deleteAccount", "Delete Account")
421
428
  })]
422
429
  })
423
430
  ]
424
431
  })]
425
432
  }),
426
- L && /* @__PURE__ */ u("div", {
433
+ k && /* @__PURE__ */ d("div", {
427
434
  className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4",
428
- children: /* @__PURE__ */ d("div", {
429
- className: "w-full max-w-md bg-bg-surface rounded-2xl shadow-2xl p-6",
435
+ role: "presentation",
436
+ onClick: (e) => {
437
+ e.target === e.currentTarget && Q();
438
+ },
439
+ children: /* @__PURE__ */ f("div", {
440
+ ref: X,
441
+ role: "dialog",
442
+ "aria-modal": "true",
443
+ "aria-labelledby": V,
444
+ tabIndex: -1,
445
+ className: "w-full max-w-md bg-bg-surface rounded-2xl shadow-2xl p-6 outline-none",
430
446
  children: [
431
- /* @__PURE__ */ u("h3", {
447
+ /* @__PURE__ */ d("h3", {
448
+ id: V,
432
449
  className: "text-xl font-bold text-text-primary mb-2",
433
- children: C("auth.security.deactivateTitle", "Deactivate Account")
450
+ children: b("auth.security.deactivateTitle", "Deactivate Account")
434
451
  }),
435
- /* @__PURE__ */ u("p", {
436
- className: "text-sm text-text-secondary mb-4",
437
- children: C("auth.security.deactivateDesc", "Your account will be temporarily disabled. You can reactivate it by signing in again with your credentials.")
452
+ /* @__PURE__ */ d("p", {
453
+ className: "text-sm text-text-secondary mb-4",
454
+ children: b("auth.security.deactivateDesc", "Your account will be temporarily disabled. You can reactivate it by signing in again with your credentials.")
438
455
  }),
439
- G && /* @__PURE__ */ u("div", {
456
+ L && /* @__PURE__ */ d("div", {
457
+ id: U,
458
+ role: "alert",
440
459
  className: "mb-4 p-3 rounded-lg bg-status-error-bg-subtle text-status-error-text text-sm",
441
- children: G
460
+ children: L
442
461
  }),
443
- q && /* @__PURE__ */ u("div", {
462
+ z && /* @__PURE__ */ d("div", {
463
+ role: "status",
444
464
  className: "mb-4 p-3 rounded-lg bg-status-success-bg-subtle text-status-success-text text-sm",
445
- children: q
465
+ children: z
446
466
  }),
447
- /* @__PURE__ */ d("div", {
467
+ /* @__PURE__ */ f("div", {
448
468
  className: "mb-4",
449
- children: [/* @__PURE__ */ u("label", {
450
- className: "block text-sm font-medium text-text-primary mb-1",
451
- children: C("auth.security.enterPasswordConfirm", "Enter your password to confirm")
452
- }), /* @__PURE__ */ u("input", {
469
+ children: [/* @__PURE__ */ d("label", {
470
+ htmlFor: H,
471
+ className: "block text-sm font-medium text-text-primary mb-1",
472
+ children: b("auth.security.enterPasswordConfirm", "Enter your password to confirm")
473
+ }), /* @__PURE__ */ d("input", {
474
+ id: H,
453
475
  type: "password",
454
- value: V,
455
- onChange: (e) => H(e.target.value),
456
- className: "w-full px-4 py-2 rounded-lg border border-border-default bg-bg-surface text-text-primary focus:ring-2 focus:ring-status-warning-bg focus:border-transparent",
457
- placeholder: C("auth.security.yourPassword", "Your password")
476
+ value: N,
477
+ onChange: (e) => P(e.target.value),
478
+ "aria-describedby": L ? U : void 0,
479
+ className: "w-full px-4 py-2 rounded-lg border border-border-default bg-bg-surface text-text-primary focus:ring-2 focus:ring-status-warning-bg focus:border-transparent",
480
+ placeholder: b("auth.security.yourPassword", "Your password")
458
481
  })]
459
482
  }),
460
- /* @__PURE__ */ d("div", {
483
+ /* @__PURE__ */ f("div", {
461
484
  className: "flex gap-3",
462
- children: [/* @__PURE__ */ u("button", {
485
+ children: [/* @__PURE__ */ d("button", {
486
+ type: "button",
463
487
  onClick: Q,
464
- className: "flex-1 px-4 py-2 rounded-lg border border-border-default text-text-primary font-medium hover:bg-bg-sunken transition-colors",
465
- children: C("auth.security.cancel", "Cancel")
466
- }), /* @__PURE__ */ d("button", {
467
- onClick: X,
468
- disabled: !V || k,
488
+ className: "flex-1 px-4 py-2 rounded-lg border border-border-default text-text-primary font-medium hover:bg-bg-sunken transition-colors",
489
+ children: b("auth.security.cancel", "Cancel")
490
+ }), /* @__PURE__ */ f("button", {
491
+ type: "button",
492
+ onClick: () => void fe(),
493
+ disabled: !N || C,
469
494
  className: "flex-1 px-4 py-2 rounded-lg bg-status-warning-bg text-white font-medium hover:bg-status-warning-bg-hover disabled:opacity-50 disabled:cursor-not-allowed transition-colors flex items-center justify-center gap-2",
470
- children: [k && /* @__PURE__ */ u(b, { className: "w-4 h-4 animate-spin" }), C("auth.security.deactivateBtn", "Deactivate")]
495
+ children: [C && /* @__PURE__ */ d(_, { className: "w-4 h-4 animate-spin" }), b("auth.security.deactivateBtn", "Deactivate")]
471
496
  })]
472
497
  })
473
498
  ]
474
499
  })
475
500
  }),
476
- z && /* @__PURE__ */ u("div", {
501
+ j && /* @__PURE__ */ d("div", {
477
502
  className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4",
478
- children: /* @__PURE__ */ d("div", {
479
- className: "w-full max-w-md bg-bg-surface rounded-2xl shadow-2xl p-6",
503
+ role: "presentation",
504
+ onClick: (e) => {
505
+ e.target === e.currentTarget && Q();
506
+ },
507
+ children: /* @__PURE__ */ f("div", {
508
+ ref: Z,
509
+ role: "dialog",
510
+ "aria-modal": "true",
511
+ "aria-labelledby": W,
512
+ tabIndex: -1,
513
+ className: "w-full max-w-md bg-bg-surface rounded-2xl shadow-2xl p-6 outline-none",
480
514
  children: [
481
- /* @__PURE__ */ u("h3", {
515
+ /* @__PURE__ */ d("h3", {
516
+ id: W,
482
517
  className: "text-xl font-bold text-status-error-text mb-2",
483
- children: C("auth.security.deleteTitle", "Delete Account Permanently")
518
+ children: b("auth.security.deleteTitle", "Delete Account Permanently")
484
519
  }),
485
- /* @__PURE__ */ u("p", {
486
- className: "text-sm text-text-secondary mb-4",
487
- children: C("auth.security.deleteDesc", "This action is irreversible. All your data will be permanently deleted and cannot be recovered.")
520
+ /* @__PURE__ */ d("p", {
521
+ className: "text-sm text-text-secondary mb-4",
522
+ children: b("auth.security.deleteDesc", "This action is irreversible. All your data will be permanently deleted and cannot be recovered.")
488
523
  }),
489
- G && /* @__PURE__ */ u("div", {
524
+ L && /* @__PURE__ */ d("div", {
525
+ id: q,
526
+ role: "alert",
490
527
  className: "mb-4 p-3 rounded-lg bg-status-error-bg-subtle text-status-error-text text-sm",
491
- children: G
528
+ children: L
492
529
  }),
493
- q && /* @__PURE__ */ u("div", {
530
+ z && /* @__PURE__ */ d("div", {
531
+ role: "status",
494
532
  className: "mb-4 p-3 rounded-lg bg-status-success-bg-subtle text-status-success-text text-sm",
495
- children: q
533
+ children: z
496
534
  }),
497
- /* @__PURE__ */ d("div", {
535
+ /* @__PURE__ */ f("div", {
498
536
  className: "mb-4",
499
- children: [/* @__PURE__ */ u("label", {
500
- className: "block text-sm font-medium text-text-primary mb-1",
501
- children: C("auth.security.enterPasswordDelete", "Enter your password")
502
- }), /* @__PURE__ */ u("input", {
537
+ children: [/* @__PURE__ */ d("label", {
538
+ htmlFor: G,
539
+ className: "block text-sm font-medium text-text-primary mb-1",
540
+ children: b("auth.security.enterPasswordDelete", "Enter your password")
541
+ }), /* @__PURE__ */ d("input", {
542
+ id: G,
503
543
  type: "password",
504
- value: V,
505
- onChange: (e) => H(e.target.value),
506
- className: "w-full px-4 py-2 rounded-lg border border-border-default bg-bg-surface text-text-primary focus:ring-2 focus:ring-status-error-bg focus:border-transparent",
507
- placeholder: C("auth.security.yourPassword", "Your password")
544
+ value: N,
545
+ onChange: (e) => P(e.target.value),
546
+ "aria-describedby": L ? q : void 0,
547
+ className: "w-full px-4 py-2 rounded-lg border border-border-default bg-bg-surface text-text-primary focus:ring-2 focus:ring-status-error-bg focus:border-transparent",
548
+ placeholder: b("auth.security.yourPassword", "Your password")
508
549
  })]
509
550
  }),
510
- /* @__PURE__ */ d("div", {
551
+ /* @__PURE__ */ f("div", {
511
552
  className: "mb-4",
512
- children: [/* @__PURE__ */ d("label", {
513
- className: "block text-sm font-medium text-text-primary mb-1",
553
+ children: [/* @__PURE__ */ f("label", {
554
+ htmlFor: K,
555
+ className: "block text-sm font-medium text-text-primary mb-1",
514
556
  children: [
515
- C("auth.security.type", "Type"),
557
+ b("auth.security.type", "Type"),
516
558
  " ",
517
- /* @__PURE__ */ u("code", {
518
- className: "px-1 py-0.5 rounded bg-bg-sunken text-status-error-text font-mono text-sm",
519
- children: x
559
+ /* @__PURE__ */ d("code", {
560
+ className: "px-1 py-0.5 rounded bg-bg-sunken text-status-error-text font-mono text-sm",
561
+ children: v
520
562
  }),
521
563
  " ",
522
- C("auth.security.toConfirm", "to confirm")
564
+ b("auth.security.toConfirm", "to confirm")
523
565
  ]
524
- }), /* @__PURE__ */ u("input", {
566
+ }), /* @__PURE__ */ d("input", {
567
+ id: K,
525
568
  type: "text",
526
- value: U,
527
- onChange: (e) => W(e.target.value),
528
- className: "w-full px-4 py-2 rounded-lg border border-border-default bg-bg-surface text-text-primary focus:ring-2 focus:ring-status-error-bg focus:border-transparent font-mono",
529
- placeholder: C("auth.security.deleteConfirmPlaceholder", "DELETE MY ACCOUNT")
569
+ value: F,
570
+ onChange: (e) => I(e.target.value),
571
+ "aria-describedby": L ? q : void 0,
572
+ className: "w-full px-4 py-2 rounded-lg border border-border-default bg-bg-surface text-text-primary focus:ring-2 focus:ring-status-error-bg focus:border-transparent font-mono",
573
+ placeholder: b("auth.security.deleteConfirmPlaceholder", "DELETE MY ACCOUNT")
530
574
  })]
531
575
  }),
532
- /* @__PURE__ */ d("div", {
576
+ /* @__PURE__ */ f("div", {
533
577
  className: "flex gap-3",
534
- children: [/* @__PURE__ */ u("button", {
578
+ children: [/* @__PURE__ */ d("button", {
579
+ type: "button",
535
580
  onClick: Q,
536
- className: "flex-1 px-4 py-2 rounded-lg border border-border-default text-text-primary font-medium hover:bg-bg-sunken transition-colors",
537
- children: C("auth.security.cancel", "Cancel")
538
- }), /* @__PURE__ */ d("button", {
539
- onClick: Z,
540
- disabled: !V || U !== x || A,
581
+ className: "flex-1 px-4 py-2 rounded-lg border border-border-default text-text-primary font-medium hover:bg-bg-sunken transition-colors",
582
+ children: b("auth.security.cancel", "Cancel")
583
+ }), /* @__PURE__ */ f("button", {
584
+ type: "button",
585
+ onClick: () => void pe(),
586
+ disabled: !N || F !== v || w,
541
587
  className: "flex-1 px-4 py-2 rounded-lg bg-status-error-bg text-white font-medium hover:bg-status-error-bg-hover disabled:opacity-50 disabled:cursor-not-allowed transition-colors flex items-center justify-center gap-2",
542
- children: [A && /* @__PURE__ */ u(b, { className: "w-4 h-4 animate-spin" }), C("auth.security.deleteForever", "Delete Forever")]
588
+ children: [w && /* @__PURE__ */ d(_, { className: "w-4 h-4 animate-spin" }), b("auth.security.deleteForever", "Delete Forever")]
543
589
  })]
544
590
  })
545
591
  ]
546
592
  })
547
593
  }),
548
- /* @__PURE__ */ u("footer", {
594
+ /* @__PURE__ */ d("footer", {
549
595
  className: "mt-12 pt-6 border-t border-border-subtle ",
550
- children: /* @__PURE__ */ d("div", {
596
+ children: /* @__PURE__ */ f("div", {
551
597
  className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 text-sm text-text-secondary ",
552
- children: [/* @__PURE__ */ d("p", { children: [
553
- C("auth.security.signedInAs", "Signed in as"),
598
+ children: [/* @__PURE__ */ f("p", { children: [
599
+ b("auth.security.signedInAs", "Signed in as"),
554
600
  " ",
555
- /* @__PURE__ */ u("span", {
601
+ /* @__PURE__ */ d("span", {
556
602
  className: "font-medium text-text-primary ",
557
- children: T?.email
603
+ children: S?.email
558
604
  })
559
- ] }), /* @__PURE__ */ d("div", {
605
+ ] }), /* @__PURE__ */ f("div", {
560
606
  className: "flex items-center gap-4",
561
607
  children: [
562
- /* @__PURE__ */ u("button", {
563
- onClick: () => w("/auth/login"),
564
- className: "hover:text-text-primary transition-colors",
565
- children: C("auth.security.switchAccount", "Switch Account")
608
+ /* @__PURE__ */ d("button", {
609
+ type: "button",
610
+ onClick: () => x("/auth/login"),
611
+ className: "hover:text-text-primary transition-colors",
612
+ children: b("auth.security.switchAccount", "Switch Account")
566
613
  }),
567
- /* @__PURE__ */ u("span", {
568
- className: "text-text-muted ",
614
+ /* @__PURE__ */ d("span", {
615
+ className: "text-text-muted",
616
+ "aria-hidden": "true",
569
617
  children: "|"
570
618
  }),
571
- /* @__PURE__ */ u("button", {
572
- onClick: () => P(!0),
573
- className: "hover:text-status-error-text transition-colors",
574
- children: C("auth.security.signOut", "Sign Out")
619
+ /* @__PURE__ */ d("button", {
620
+ type: "button",
621
+ onClick: () => O(!0),
622
+ className: "hover:text-status-error-text transition-colors",
623
+ children: b("auth.security.signOut", "Sign Out")
575
624
  })
576
625
  ]
577
626
  })]
@@ -582,6 +631,6 @@ function S() {
582
631
  });
583
632
  }
584
633
  //#endregion
585
- export { S as SecurityPage };
634
+ export { y as SecurityPage };
586
635
 
587
636
  //# sourceMappingURL=SecurityPage.js.map