@burdenoff/microfe-auth 2026.828.2 → 2026.830.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 (64) hide show
  1. package/dist/auth/AuthRoot.js +43 -41
  2. package/dist/auth/AuthRoot.js.map +1 -1
  3. package/dist/auth/components/AuthLayout.js +65 -67
  4. package/dist/auth/components/AuthLayout.js.map +1 -1
  5. package/dist/auth/components/CaptchaV2.js +21 -24
  6. package/dist/auth/components/CaptchaV2.js.map +1 -1
  7. package/dist/auth/components/ConfirmActionDialog.js +33 -32
  8. package/dist/auth/components/ConfirmActionDialog.js.map +1 -1
  9. package/dist/auth/components/profile/UserProfileMenu.js +44 -46
  10. package/dist/auth/components/profile/UserProfileMenu.js.map +1 -1
  11. package/dist/auth/components/workspace/WorkspaceSelector.js +62 -68
  12. package/dist/auth/components/workspace/WorkspaceSelector.js.map +1 -1
  13. package/dist/auth/pages/AuditLogPage.js +65 -68
  14. package/dist/auth/pages/AuditLogPage.js.map +1 -1
  15. package/dist/auth/pages/EmailVerifyPage.js +51 -54
  16. package/dist/auth/pages/EmailVerifyPage.js.map +1 -1
  17. package/dist/auth/pages/LoginPage.js +223 -225
  18. package/dist/auth/pages/LoginPage.js.map +1 -1
  19. package/dist/auth/pages/MagicLinkPage.js +67 -69
  20. package/dist/auth/pages/MagicLinkPage.js.map +1 -1
  21. package/dist/auth/pages/MfaSetupPage.js +85 -88
  22. package/dist/auth/pages/MfaSetupPage.js.map +1 -1
  23. package/dist/auth/pages/MfaVerifyPage.js +60 -63
  24. package/dist/auth/pages/MfaVerifyPage.js.map +1 -1
  25. package/dist/auth/pages/OAuthCallbackPage.js +37 -40
  26. package/dist/auth/pages/OAuthCallbackPage.js.map +1 -1
  27. package/dist/auth/pages/PasswordResetPage.js +102 -105
  28. package/dist/auth/pages/PasswordResetPage.js.map +1 -1
  29. package/dist/auth/pages/ReactivatePage.js +54 -57
  30. package/dist/auth/pages/ReactivatePage.js.map +1 -1
  31. package/dist/auth/pages/RegisterPage.js +171 -174
  32. package/dist/auth/pages/RegisterPage.js.map +1 -1
  33. package/dist/auth/pages/SSOClearPage.js +21 -20
  34. package/dist/auth/pages/SSOClearPage.js.map +1 -1
  35. package/dist/auth/pages/SSODepositPage.js +27 -26
  36. package/dist/auth/pages/SSODepositPage.js.map +1 -1
  37. package/dist/auth/pages/SSORelayCallbackPage.js +19 -18
  38. package/dist/auth/pages/SSORelayCallbackPage.js.map +1 -1
  39. package/dist/auth/pages/SecurityPage.js +247 -250
  40. package/dist/auth/pages/SecurityPage.js.map +1 -1
  41. package/dist/auth/pages/SessionsPage.js +95 -98
  42. package/dist/auth/pages/SessionsPage.js.map +1 -1
  43. package/dist/auth/pages/SsoCallbackPage.js +53 -56
  44. package/dist/auth/pages/SsoCallbackPage.js.map +1 -1
  45. package/dist/auth/pages/SsoConfigPage.js +296 -299
  46. package/dist/auth/pages/SsoConfigPage.js.map +1 -1
  47. package/dist/auth/pages/SsoLoginPage.js +65 -68
  48. package/dist/auth/pages/SsoLoginPage.js.map +1 -1
  49. package/dist/auth/pages/UserDetailsPage.js +124 -127
  50. package/dist/auth/pages/UserDetailsPage.js.map +1 -1
  51. package/dist/auth/pages/UserProfilePage.js +171 -174
  52. package/dist/auth/pages/UserProfilePage.js.map +1 -1
  53. package/dist/auth/pages/UsersPage.js +322 -325
  54. package/dist/auth/pages/UsersPage.js.map +1 -1
  55. package/dist/index.d.ts +1 -0
  56. package/dist/index.js +2 -1
  57. package/dist/shared/hooks/index.d.ts +1 -6
  58. package/dist/shared/hooks/useTr.d.ts +16 -0
  59. package/dist/shared/hooks/useTr.js +14 -0
  60. package/dist/shared/hooks/useTr.js.map +1 -0
  61. package/dist/translations/en.d.ts +806 -248
  62. package/dist/translations/en.js +870 -0
  63. package/dist/translations/en.js.map +1 -0
  64. package/package.json +1 -1
@@ -1,26 +1,27 @@
1
1
  import { useAuth as e } from "../providers/AuthProvider.js";
2
2
  import { useAuthStore as t } from "../store/authStore.js";
3
- import { useAuthOperations as n } from "../hooks/useAuthOperations.js";
4
- import { useMyWorkspaces as r } from "../hooks/useMyWorkspaces.js";
5
- import { useOAuthOperations as i } from "../hooks/useOAuthOperations.js";
6
- import { sanitizePostLoginPath as a } from "../utils/redirect.js";
7
- import { AuthLayout as o } from "../components/AuthLayout.js";
8
- import { AlertIcon as s, EmailIcon as c, EyeIcon as l, EyeOffIcon as ee, GoogleIcon as te, LockIcon as ne, MicrosoftIcon as u, SpinnerIcon as d } from "../components/AuthIcons.js";
9
- import { useCaptchaV3 as re } from "../hooks/useCaptchaV3.js";
10
- import { MFA_REDIRECT as ie } from "../constants/sessionKeys.js";
11
- import { useCallback as f, useEffect as p, useRef as ae, useState as m } from "react";
12
- import { SSORedirectSpinner as oe, getSSORedirectUrl as se } from "@burdenoff/fe-libs/shared/components";
13
- import { useLocation as ce, useNavigate as le, useSearchParams as ue } from "react-router";
14
- import { useActiveContext as de, useI18n as fe } from "@burdenoff/fe-libs/shared/providers/shell";
15
- import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
16
- import { beginSsoNavigation as pe, buildSsoDepositUrl as me, isSsoNavigationPending as he, markSsoDepositPending as ge, mintSsoSessionTokens as _e } from "@burdenoff/fe-libs/shared/utils";
17
- import { resolveAuthBridgeConfig as ve } from "@burdenoff/fe-libs/shared/config";
18
- import { resolveGatewayUrls as ye } from "@burdenoff/fe-libs/shared/config/gatewayUrls";
19
- import { Button as be } from "@burdenoff/fe-libs/button";
20
- import { PagePurpose as xe } from "@burdenoff/fe-libs/ui";
21
- import { getProfileTokens as Se, getProfileUser as Ce, getProfileWorkspaceToken as we, getProfiles as Te, resolveActiveProfileId as Ee } from "@burdenoff/fe-libs/shared/providers/shell/ProfileStorageManager";
3
+ import { useTr as n } from "../../shared/hooks/useTr.js";
4
+ import { useAuthOperations as r } from "../hooks/useAuthOperations.js";
5
+ import { useMyWorkspaces as i } from "../hooks/useMyWorkspaces.js";
6
+ import { useOAuthOperations as a } from "../hooks/useOAuthOperations.js";
7
+ import { sanitizePostLoginPath as o } from "../utils/redirect.js";
8
+ import { AuthLayout as s } from "../components/AuthLayout.js";
9
+ import { AlertIcon as c, EmailIcon as l, EyeIcon as ee, EyeOffIcon as te, GoogleIcon as ne, LockIcon as re, MicrosoftIcon as u, SpinnerIcon as ie } from "../components/AuthIcons.js";
10
+ import { useCaptchaV3 as ae } from "../hooks/useCaptchaV3.js";
11
+ import { MFA_REDIRECT as oe } from "../constants/sessionKeys.js";
12
+ import { useCallback as se, useEffect as d, useRef as ce, useState as f } from "react";
13
+ import { SSORedirectSpinner as le, getSSORedirectUrl as ue } from "@burdenoff/fe-libs/shared/components";
14
+ import { useLocation as de, useNavigate as fe, useSearchParams as pe } from "react-router";
15
+ import { useActiveContext as me } from "@burdenoff/fe-libs/shared/providers/shell";
16
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
17
+ import { beginSsoNavigation as he, buildSsoDepositUrl as ge, isSsoNavigationPending as _e, markSsoDepositPending as ve, mintSsoSessionTokens as ye } from "@burdenoff/fe-libs/shared/utils";
18
+ import { resolveAuthBridgeConfig as be } from "@burdenoff/fe-libs/shared/config";
19
+ import { resolveGatewayUrls as xe } from "@burdenoff/fe-libs/shared/config/gatewayUrls";
20
+ import { Button as Se } from "@burdenoff/fe-libs/button";
21
+ import { PagePurpose as Ce } from "@burdenoff/fe-libs/ui";
22
+ import { getProfileTokens as g, getProfileUser as we, getProfileWorkspaceToken as Te, getProfiles as _, resolveActiveProfileId as v } from "@burdenoff/fe-libs/shared/providers/shell/ProfileStorageManager";
22
23
  //#region src/auth/pages/LoginPage.tsx
23
- function De() {
24
+ function Ee() {
24
25
  if (typeof window > "u") return !1;
25
26
  let e = window;
26
27
  if (typeof e.Capacitor?.isNativePlatform == "function") try {
@@ -28,7 +29,7 @@ function De() {
28
29
  } catch {}
29
30
  return !!(typeof navigator < "u" && /Electron/i.test(navigator.userAgent || ""));
30
31
  }
31
- function Oe(e) {
32
+ function De(e) {
32
33
  if (typeof window > "u") return e;
33
34
  try {
34
35
  let t = new URL(e, window.location.origin);
@@ -37,7 +38,7 @@ function Oe(e) {
37
38
  return e;
38
39
  }
39
40
  }
40
- function ke(e) {
41
+ function Oe(e) {
41
42
  try {
42
43
  let t = e.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "="), r = JSON.parse(atob(n));
43
44
  return typeof r.exp == "number" && r.exp > Date.now() / 1e3;
@@ -45,16 +46,16 @@ function ke(e) {
45
46
  return !1;
46
47
  }
47
48
  }
48
- function Ae(e) {
49
+ function ke(e) {
49
50
  if (!e) return null;
50
51
  try {
51
52
  let t = new URL(decodeURIComponent(e), window.location.origin);
52
- return t.origin === window.location.origin ? v(t, { includeOrigin: !1 }) : null;
53
+ return t.origin === window.location.origin ? y(t, { includeOrigin: !1 }) : null;
53
54
  } catch {
54
55
  return null;
55
56
  }
56
57
  }
57
- function v(e, t) {
58
+ function y(e, t) {
58
59
  for (let t of [
59
60
  "sso_failed",
60
61
  "sso-failed",
@@ -64,97 +65,94 @@ function v(e, t) {
64
65
  let n = e.searchParams.toString();
65
66
  return `${e.pathname}${n ? `?${n}` : ""}${e.hash}`;
66
67
  }
67
- function y(e) {
68
+ function Ae(e) {
68
69
  try {
69
70
  let t = new URL(decodeURIComponent(e), window.location.origin);
70
- return v(t, { includeOrigin: t.origin !== window.location.origin });
71
+ return y(t, { includeOrigin: t.origin !== window.location.origin });
71
72
  } catch {
72
73
  return e;
73
74
  }
74
75
  }
75
76
  function b() {
76
- let v = le(), b = ce(), [x] = ue(), { t: S } = fe(), C = f((e, t) => {
77
- let n = S(e);
78
- return n === e ? t : n;
79
- }, [S]), { signIn: je, isLoading: w, error: T, errorCode: E, resendVerification: Me } = n(), { completeAuthFlow: Ne } = r(), { setWorkspace: D, setOrganization: Pe } = de(), { defaultPostLoginPath: Fe } = e(), { initiateGoogleOAuth: Ie, initiateMicrosoftOAuth: Le, isProviderConfigured: O } = i(), Re = t((e) => e.mfaRequired), { executeRecaptcha: ze } = re(), [k, Be] = m(!1), [Ve, He] = m(!1), Ue = f(async (e) => {
80
- if (typeof window > "u" || De()) return e;
77
+ let y = n(), b = fe(), je = de(), [x] = pe(), { signIn: Me, isLoading: Ne, error: S, errorCode: Pe, resendVerification: Fe } = r(), { completeAuthFlow: Ie } = i(), { setWorkspace: Le, setOrganization: C } = me(), { defaultPostLoginPath: w } = e(), { initiateGoogleOAuth: Re, initiateMicrosoftOAuth: ze, isProviderConfigured: T } = a(), E = t((e) => e.mfaRequired), { executeRecaptcha: Be } = ae(), [D, O] = f(!1), [Ve, He] = f(!1), k = se(async (e) => {
78
+ if (typeof window > "u" || Ee()) return e;
81
79
  try {
82
- let t = ve(), n = new URL(t.url), r = window.location.origin;
80
+ let t = be(), n = new URL(t.url), r = window.location.origin;
83
81
  if (n.origin === r) return e;
84
- let i = new URL(e, r).href, a = Ee();
82
+ let i = new URL(e, r).href, a = v();
85
83
  if (!a) return e;
86
- let o = Se(a), s = Ce(a);
84
+ let o = g(a), s = we(a);
87
85
  if (!o || !s) return e;
88
- let c = we(a), l = {
86
+ let c = Te(a), l = {
89
87
  ...o,
90
88
  workspaceToken: c
91
89
  };
92
90
  if (o.refreshToken) {
93
- let { globalBaseUrl: e } = ye(), { tokens: t } = await _e(`${e}/global/graphql`, o.refreshToken);
91
+ let { globalBaseUrl: e } = xe(), { tokens: t } = await ye(`${e}/global/graphql`, o.refreshToken);
94
92
  t && (l = {
95
93
  ...t,
96
94
  workspaceToken: c
97
95
  });
98
96
  }
99
- return ge(a), me(n.origin, i, {
97
+ return ve(a), ge(n.origin, i, {
100
98
  profileId: a,
101
99
  tokens: JSON.stringify(l),
102
100
  user: JSON.stringify(s),
103
- profiles: JSON.stringify(Te())
101
+ profiles: JSON.stringify(_())
104
102
  });
105
103
  } catch {
106
104
  return e;
107
105
  }
108
- }, []), A = ae(!1), j = f((e) => {
109
- let t = a(e);
106
+ }, []), A = ce(!1), j = se((e) => {
107
+ let t = o(e);
110
108
  if (typeof window > "u") {
111
- v(t);
109
+ b(t);
112
110
  return;
113
111
  }
114
112
  try {
115
113
  sessionStorage.setItem("bf-post-login-return-to", t);
116
114
  } catch {}
117
- if (De()) {
118
- v(Oe(t));
115
+ if (Ee()) {
116
+ b(De(t));
119
117
  return;
120
118
  }
121
119
  A.current = !0, (async () => {
122
- let e = await Promise.race([Ue(t), new Promise((e) => {
120
+ let e = await Promise.race([k(t), new Promise((e) => {
123
121
  window.setTimeout(() => e(t), 3e3);
124
122
  })]);
125
- e.includes("/auth/sso-deposit") ? (pe(), window.location.assign(e), window.setTimeout(() => {
126
- pe(), window.location.replace(e);
123
+ e.includes("/auth/sso-deposit") ? (he(), window.location.assign(e), window.setTimeout(() => {
124
+ he(), window.location.replace(e);
127
125
  }, 2500)) : window.location.assign(e), window.setTimeout(() => {
128
- typeof window < "u" && window.location.pathname === "/auth/login" && v("/dashboard");
126
+ typeof window < "u" && window.location.pathname === "/auth/login" && b("/dashboard");
129
127
  }, 3500);
130
128
  })();
131
- }, [v, Ue]), [M, We] = m(!1), [N, P] = m(!1), [Ge, F] = m(!1), [Ke, I] = m(!1), [L, R] = m(!1), [z, B] = m(!1), [qe, Je] = m(!1), [Ye, V] = m(!1), [Xe, H] = m(null), [Ze, U] = m(null), [W, G] = m({
129
+ }, [b, k]), [M, Ue] = f(!1), [N, P] = f(!1), [We, F] = f(!1), [Ge, I] = f(!1), [L, R] = f(!1), [z, B] = f(!1), [Ke, qe] = f(!1), [Je, V] = f(!1), [Ye, H] = f(null), [Xe, U] = f(null), [W, G] = f({
132
130
  email: "",
133
131
  password: "",
134
132
  rememberMe: !1
135
- }), [K, q] = m(null), [Qe, J] = m(!1), Y = x.get("mode") === "add-account", X = x.get("returnTo"), Z = ae(X), Q = x.get("reason");
136
- p(() => {
137
- Q === "session-expired" ? U(C("auth.login.sessionExpired", "Your session has expired. Please sign in again.")) : Q === "logout" && U(C("auth.login.signedOut", "You have been signed out."));
138
- }, [Q, C]), p(() => {
139
- !Z.current && X && (Z.current = X);
140
- }, [X]), p(() => {
141
- if (Y || k || A.current || he()) return;
142
- let e = Ee();
133
+ }), [K, q] = f(null), [J, Y] = f(!1), X = x.get("mode") === "add-account", Z = x.get("returnTo"), Q = ce(Z), $ = x.get("reason");
134
+ d(() => {
135
+ $ === "session-expired" ? U(y("auth.login.sessionExpired", "Your session has expired. Please sign in again.")) : $ === "logout" && U(y("auth.login.signedOut", "You have been signed out."));
136
+ }, [$, y]), d(() => {
137
+ !Q.current && Z && (Q.current = Z);
138
+ }, [Z]), d(() => {
139
+ if (X || D || A.current || _e()) return;
140
+ let e = v();
143
141
  if (e) {
144
- let n = Se(e), r = Ce(e);
145
- if (n?.accessToken && r && ke(n.accessToken)) {
146
- t.getState().loadFromProfile(e), j(Ae(X) ?? "/");
142
+ let n = g(e), r = we(e);
143
+ if (n?.accessToken && r && Oe(n.accessToken)) {
144
+ t.getState().loadFromProfile(e), j(ke(Z) ?? "/");
147
145
  return;
148
146
  }
149
147
  }
150
- let n = se();
148
+ let n = ue();
151
149
  n && (He(!0), window.location.replace(n));
152
150
  }, [
153
- Y,
154
- k,
151
+ X,
152
+ D,
155
153
  j,
156
- X
157
- ]), p(() => {
154
+ Z
155
+ ]), d(() => {
158
156
  try {
159
157
  localStorage.removeItem("remembered_password");
160
158
  let e = localStorage.getItem("remembered_email");
@@ -166,14 +164,14 @@ function b() {
166
164
  } catch (e) {
167
165
  console.warn("[LoginPage] Failed to load remembered email:", e);
168
166
  }
169
- }, []), p(() => {
170
- let e = b.state;
167
+ }, []), d(() => {
168
+ let e = je.state;
171
169
  e?.message && U(e.message), e?.email && G((t) => ({
172
170
  ...t,
173
171
  email: e.email
174
172
  })), e && window.history.replaceState({}, document.title);
175
- }, [b.state]);
176
- let $e = (e, t) => {
173
+ }, [je.state]);
174
+ let Ze = (e, t) => {
177
175
  if (t) switch (t) {
178
176
  case "ACCOUNT_DELETED": return "DELETED";
179
177
  case "ACCOUNT_SUSPENDED": return "SUSPENDED";
@@ -186,50 +184,50 @@ function b() {
186
184
  let n = e.toLowerCase();
187
185
  return n.includes("deleted") || n.includes("permanently deleted") ? "DELETED" : n.includes("suspended") ? "SUSPENDED" : n.includes("oauth provider") || n.includes("oauth-only") || n.includes("oauth only") ? "OAUTH_ONLY" : n.includes("inactive") || n.includes("deactivated") || n.includes("not active") ? "INACTIVE" : n.includes("verify your email") || n.includes("email not verified") || n.includes("email_not_verified") ? "EMAIL_NOT_VERIFIED" : null;
188
186
  };
189
- p(() => {
187
+ d(() => {
190
188
  let e = x.get("email");
191
189
  if (e && G((t) => ({
192
190
  ...t,
193
191
  email: e
194
192
  })), x.get("expired") === "true") {
195
- U(C("auth.login.sessionExpired", "Your session has expired. Please sign in again."));
193
+ U(y("auth.login.sessionExpired", "Your session has expired. Please sign in again."));
196
194
  let e = window.location.pathname;
197
195
  window.history.replaceState({}, document.title, e);
198
196
  }
199
- }, [x, C]), p(() => {
200
- Re && v("/auth/mfa-verify");
201
- }, [Re, v]);
202
- let et = async (e) => {
203
- e.preventDefault(), P(!1), F(!1), I(!1), R(!1), B(!1), J(!1), V(!1), q(null);
197
+ }, [x, y]), d(() => {
198
+ E && b("/auth/mfa-verify");
199
+ }, [E, b]);
200
+ let Qe = async (e) => {
201
+ e.preventDefault(), P(!1), F(!1), I(!1), R(!1), B(!1), Y(!1), V(!1), q(null);
204
202
  let n = (W.email ?? "").trim();
205
203
  if (!n) {
206
- q(C("auth.login.enterEmailOrUsername", "Please enter your email or username"));
204
+ q(y("auth.login.enterEmailOrUsername", "Please enter your email or username"));
207
205
  return;
208
206
  }
209
207
  if (n.includes("@") && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)) {
210
- q(C("auth.login.invalidEmail", "Please enter a valid email address"));
208
+ q(y("auth.login.invalidEmail", "Please enter a valid email address"));
211
209
  return;
212
210
  }
213
211
  if (!W.password || W.password.length < 1) {
214
- q(C("auth.login.enterPassword", "Please enter your password"));
212
+ q(y("auth.login.enterPassword", "Please enter your password"));
215
213
  return;
216
214
  }
217
- if (Y && Te().some((e) => e.email.toLowerCase() === n.toLowerCase())) {
218
- J(!0), q(null);
215
+ if (X && _().some((e) => e.email.toLowerCase() === n.toLowerCase())) {
216
+ Y(!0), q(null);
219
217
  return;
220
218
  }
221
- J(!1);
219
+ Y(!1);
222
220
  try {
223
- let e = await ze("login"), t = await je({
221
+ let e = await Be("login"), t = await Me({
224
222
  email: n,
225
223
  password: W.password,
226
224
  rememberMe: W.rememberMe,
227
225
  ...e ? { recaptchaToken: e } : {}
228
226
  });
229
227
  if (t.requiresMFA) {
230
- let e = y(Z.current || X || (Fe ?? "/dashboard"));
228
+ let e = Ae(Q.current || Z || (w ?? "/dashboard"));
231
229
  try {
232
- sessionStorage.setItem(ie, e);
230
+ sessionStorage.setItem(oe, e);
233
231
  } catch {}
234
232
  return;
235
233
  }
@@ -249,10 +247,10 @@ function b() {
249
247
  } catch (e) {
250
248
  console.warn("[LoginPage] Failed to save/clear remembered email:", e);
251
249
  }
252
- Be(!0);
253
- let e = y(Z.current || X || (Fe ?? "/dashboard"));
250
+ O(!0);
251
+ let e = Ae(Q.current || Z || (w ?? "/dashboard"));
254
252
  try {
255
- let n = await Promise.race([Ne(t.token), new Promise((e) => {
253
+ let n = await Promise.race([Ie(t.token), new Promise((e) => {
256
254
  window.setTimeout(() => {
257
255
  e({
258
256
  success: !1,
@@ -260,274 +258,274 @@ function b() {
260
258
  });
261
259
  }, 5e3);
262
260
  })]);
263
- n.success ? (n.workspace && (D(n.workspace.id), n.workspace.organizationId && Pe(n.workspace.organizationId)), j(e)) : n.error?.includes("No workspaces found") ? v("/onboarding/create-workspace") : (n.workspace && (D(n.workspace.id), n.workspace.organizationId && Pe(n.workspace.organizationId)), console.warn("Auth flow warning:", n.error), j(e));
261
+ n.success ? (n.workspace && (Le(n.workspace.id), n.workspace.organizationId && C(n.workspace.organizationId)), j(e)) : n.error?.includes("No workspaces found") ? b("/onboarding/create-workspace") : (n.workspace && (Le(n.workspace.id), n.workspace.organizationId && C(n.workspace.organizationId)), console.warn("Auth flow warning:", n.error), j(e));
264
262
  } catch (t) {
265
263
  console.error("Auth flow error (login succeeded):", t), j(e);
266
264
  } finally {
267
- A.current || Be(!1);
265
+ A.current || O(!1);
268
266
  }
269
267
  }
270
268
  } catch (e) {
271
269
  let n = e instanceof Error ? e.message : String(e);
272
270
  n.includes("reCAPTCHA") && q(n);
273
- let r = t.getState().errorCode, i = $e(n, r);
271
+ let r = t.getState().errorCode, i = Ze(n, r);
274
272
  i === "DELETED" ? F(!0) : i === "SUSPENDED" ? I(!0) : i === "OAUTH_ONLY" ? R(!0) : i === "INACTIVE" ? P(!0) : i === "EMAIL_NOT_VERIFIED" && B(!0);
275
273
  }
276
274
  };
277
- p(() => {
278
- if (T) {
279
- let e = $e(T, E);
275
+ d(() => {
276
+ if (S) {
277
+ let e = Ze(S, Pe);
280
278
  e === "DELETED" ? F(!0) : e === "SUSPENDED" ? I(!0) : e === "OAUTH_ONLY" ? R(!0) : e === "INACTIVE" ? P(!0) : e === "EMAIL_NOT_VERIFIED" && B(!0);
281
279
  }
282
- }, [T, E]);
283
- let tt = () => {
280
+ }, [S, Pe]);
281
+ let $e = () => {
284
282
  H(null);
285
283
  try {
286
- Ie();
284
+ Re();
287
285
  } catch (e) {
288
- H(e instanceof Error ? e.message : C("auth.login.googleSignInFailed", "Failed to initiate Google sign in"));
286
+ H(e instanceof Error ? e.message : y("auth.login.googleSignInFailed", "Failed to initiate Google sign in"));
289
287
  }
290
- }, nt = () => {
288
+ }, et = () => {
291
289
  H(null);
292
290
  try {
293
- Le();
291
+ ze();
294
292
  } catch (e) {
295
- H(e instanceof Error ? e.message : C("auth.login.microsoftSignInFailed", "Failed to initiate Microsoft sign in"));
293
+ H(e instanceof Error ? e.message : y("auth.login.microsoftSignInFailed", "Failed to initiate Microsoft sign in"));
296
294
  }
297
- }, rt = async () => {
298
- Je(!0), V(!1);
295
+ }, tt = async () => {
296
+ qe(!0), V(!1);
299
297
  try {
300
- (await Me((W.email ?? "").trim())).success ? V(!0) : q(C("auth.login.resendFailed", "Failed to resend verification email. Please try again."));
298
+ (await Fe((W.email ?? "").trim())).success ? V(!0) : q(y("auth.login.resendFailed", "Failed to resend verification email. Please try again."));
301
299
  } catch (e) {
302
- console.error("Failed to resend verification email:", e), q(e instanceof Error ? e.message : C("auth.login.resendFailed", "Failed to resend verification email. Please try again."));
300
+ console.error("Failed to resend verification email:", e), q(e instanceof Error ? e.message : y("auth.login.resendFailed", "Failed to resend verification email. Please try again."));
303
301
  } finally {
304
- Je(!1);
302
+ qe(!1);
305
303
  }
306
- }, it = O("google"), $ = O("microsoft"), at = [{
304
+ }, nt = T("google"), rt = T("microsoft"), it = [{
307
305
  name: "Google",
308
- icon: te,
309
- onClick: tt,
310
- disabled: !it,
311
- tooltip: it ? void 0 : C("auth.login.googleNotConfigured", "Google sign in is not configured")
306
+ icon: ne,
307
+ onClick: $e,
308
+ disabled: !nt,
309
+ tooltip: nt ? void 0 : y("auth.login.googleNotConfigured", "Google sign in is not configured")
312
310
  }, {
313
311
  name: "Microsoft",
314
312
  icon: u,
315
- onClick: nt,
316
- disabled: !$,
317
- tooltip: $ ? void 0 : C("auth.login.microsoftNotConfigured", "Microsoft sign in is not configured")
313
+ onClick: et,
314
+ disabled: !rt,
315
+ tooltip: rt ? void 0 : y("auth.login.microsoftNotConfigured", "Microsoft sign in is not configured")
318
316
  }];
319
- return Ve ? /* @__PURE__ */ g(oe, {}) : /* @__PURE__ */ _(o, {
320
- title: C("auth.login.welcomeBack", "Welcome back"),
321
- subtitle: C("auth.login.enterCredentials", "Enter your credentials to continue"),
317
+ return Ve ? /* @__PURE__ */ m(le, {}) : /* @__PURE__ */ h(s, {
318
+ title: y("auth.login.welcomeBack", "Welcome back"),
319
+ subtitle: y("auth.login.enterCredentials", "Enter your credentials to continue"),
322
320
  children: [
323
- /* @__PURE__ */ g(xe, {
321
+ /* @__PURE__ */ m(Ce, {
324
322
  className: "mb-5",
325
- children: C("auth.login.purpose", "Sign in to reach your workspaces, agents, and settings. Use your email and password, a social provider, or a passwordless magic link.")
323
+ children: y("auth.login.purpose", "Sign in to reach your workspaces, agents, and settings. Use your email and password, a social provider, or a passwordless magic link.")
326
324
  }),
327
- /* @__PURE__ */ _("form", {
328
- onSubmit: et,
325
+ /* @__PURE__ */ h("form", {
326
+ onSubmit: Qe,
329
327
  className: "space-y-5",
330
328
  children: [
331
- Ze && /* @__PURE__ */ _("div", {
329
+ Xe && /* @__PURE__ */ h("div", {
332
330
  className: "flex items-start gap-3 p-4 rounded-xl border bg-status-info-bg-subtle border-status-info-border",
333
- children: [/* @__PURE__ */ g("svg", {
331
+ children: [/* @__PURE__ */ m("svg", {
334
332
  className: "size-5 flex-shrink-0 mt-0.5 text-text-link",
335
333
  fill: "none",
336
334
  viewBox: "0 0 24 24",
337
335
  stroke: "currentColor",
338
- children: /* @__PURE__ */ g("path", {
336
+ children: /* @__PURE__ */ m("path", {
339
337
  strokeLinecap: "round",
340
338
  strokeLinejoin: "round",
341
339
  strokeWidth: 2,
342
340
  d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
343
341
  })
344
- }), /* @__PURE__ */ g("p", {
342
+ }), /* @__PURE__ */ m("p", {
345
343
  className: "text-sm text-status-info-text",
346
- children: Ze
344
+ children: Xe
347
345
  })]
348
346
  }),
349
- K && /* @__PURE__ */ _("div", {
347
+ K && /* @__PURE__ */ h("div", {
350
348
  className: "flex items-start gap-3 p-4 rounded-xl border bg-status-warning-bg-subtle border-status-warning-border",
351
- children: [/* @__PURE__ */ g(s, { className: "size-5 flex-shrink-0 mt-0.5 text-status-warning-text" }), /* @__PURE__ */ g("p", {
349
+ children: [/* @__PURE__ */ m(c, { className: "size-5 flex-shrink-0 mt-0.5 text-status-warning-text" }), /* @__PURE__ */ m("p", {
352
350
  className: "text-sm text-status-warning-text",
353
351
  children: K
354
352
  })]
355
353
  }),
356
- Qe && /* @__PURE__ */ _("div", {
354
+ J && /* @__PURE__ */ h("div", {
357
355
  className: "flex items-start gap-3 p-4 rounded-xl border bg-status-warning-bg-subtle border-status-warning-border",
358
- children: [/* @__PURE__ */ g(s, { className: "size-5 flex-shrink-0 mt-0.5 text-status-warning-text" }), /* @__PURE__ */ _("div", {
356
+ children: [/* @__PURE__ */ m(c, { className: "size-5 flex-shrink-0 mt-0.5 text-status-warning-text" }), /* @__PURE__ */ h("div", {
359
357
  className: "flex-1",
360
358
  children: [
361
- /* @__PURE__ */ g("p", {
359
+ /* @__PURE__ */ m("p", {
362
360
  className: "text-sm font-medium text-status-warning-text",
363
- children: C("auth.login.duplicateAccount", "This account is already signed in.")
361
+ children: y("auth.login.duplicateAccount", "This account is already signed in.")
364
362
  }),
365
- /* @__PURE__ */ g("p", {
363
+ /* @__PURE__ */ m("p", {
366
364
  className: "mt-1 text-sm text-status-warning-text/80",
367
- children: C("auth.login.duplicateAccountHint", "Please use a different account, or go back and switch to this account from the profile menu.")
365
+ children: y("auth.login.duplicateAccountHint", "Please use a different account, or go back and switch to this account from the profile menu.")
368
366
  }),
369
- (Z.current || X) && /* @__PURE__ */ _("button", {
367
+ (Q.current || Z) && /* @__PURE__ */ h("button", {
370
368
  type: "button",
371
- onClick: () => v(decodeURIComponent(Z.current || X || "/dashboard")),
369
+ onClick: () => b(decodeURIComponent(Q.current || Z || "/dashboard")),
372
370
  className: "mt-3 inline-flex items-center gap-2 px-4 py-2.5 rounded-xl border border-status-warning-border bg-bg-surface text-status-warning-text text-sm font-medium hover:bg-status-warning-bg-subtle hover:border-status-warning-border transition-all shadow-sm",
373
- children: [/* @__PURE__ */ g("svg", {
371
+ children: [/* @__PURE__ */ m("svg", {
374
372
  className: "size-4",
375
373
  fill: "none",
376
374
  viewBox: "0 0 24 24",
377
375
  stroke: "currentColor",
378
- children: /* @__PURE__ */ g("path", {
376
+ children: /* @__PURE__ */ m("path", {
379
377
  strokeLinecap: "round",
380
378
  strokeLinejoin: "round",
381
379
  strokeWidth: 2,
382
380
  d: "M10 19l-7-7m0 0l7-7m-7 7h18"
383
381
  })
384
- }), C("auth.login.goBackSwitchAccount", "Go back and switch account")]
382
+ }), y("auth.login.goBackSwitchAccount", "Go back and switch account")]
385
383
  })
386
384
  ]
387
385
  })]
388
386
  }),
389
- T && !K && !Qe && /* @__PURE__ */ _("div", {
387
+ S && !K && !J && /* @__PURE__ */ h("div", {
390
388
  className: `flex items-start gap-3 p-4 rounded-xl border ${N || L || z ? "bg-status-warning-bg-subtle border-status-warning-border" : "bg-status-error-bg-subtle border-status-error-border"}`,
391
- children: [/* @__PURE__ */ g(s, { className: `size-5 flex-shrink-0 mt-0.5 ${N || L || z ? "text-status-warning-text" : "text-status-error-text"}` }), /* @__PURE__ */ _("div", {
389
+ children: [/* @__PURE__ */ m(c, { className: `size-5 flex-shrink-0 mt-0.5 ${N || L || z ? "text-status-warning-text" : "text-status-error-text"}` }), /* @__PURE__ */ h("div", {
392
390
  className: "flex-1",
393
391
  children: [
394
- /* @__PURE__ */ g("p", {
392
+ /* @__PURE__ */ m("p", {
395
393
  className: `text-sm ${N || L || z ? "text-status-warning-text" : "text-status-error-text"}`,
396
- children: Ge ? C("auth.login.accountDeleted", "This account has been permanently deleted and cannot be recovered.") : Ke ? C("auth.login.accountSuspended", "Your account has been suspended. Please contact support for assistance.") : N ? C("auth.login.accountDeactivated", "Your account has been deactivated.") : L ? C("auth.login.oauthOnly", "This account uses OAuth sign-in. Please use Google or Microsoft to sign in.") : z ? C("auth.login.emailNotVerified", "Please verify your email before signing in. Check your inbox for the verification link.") : T
394
+ children: We ? y("auth.login.accountDeleted", "This account has been permanently deleted and cannot be recovered.") : Ge ? y("auth.login.accountSuspended", "Your account has been suspended. Please contact support for assistance.") : N ? y("auth.login.accountDeactivated", "Your account has been deactivated.") : L ? y("auth.login.oauthOnly", "This account uses OAuth sign-in. Please use Google or Microsoft to sign in.") : z ? y("auth.login.emailNotVerified", "Please verify your email before signing in. Check your inbox for the verification link.") : S
397
395
  }),
398
- N && /* @__PURE__ */ g("button", {
396
+ N && /* @__PURE__ */ m("button", {
399
397
  type: "button",
400
- onClick: () => v("/auth/reactivate", { state: { email: W.email } }),
398
+ onClick: () => b("/auth/reactivate", { state: { email: W.email } }),
401
399
  className: "mt-2 text-sm font-semibold text-status-warning-text hover:text-status-warning-text underline underline-offset-2",
402
- children: C("auth.login.clickReactivate", "Click here to reactivate your account")
400
+ children: y("auth.login.clickReactivate", "Click here to reactivate your account")
403
401
  }),
404
- z && /* @__PURE__ */ g("div", {
402
+ z && /* @__PURE__ */ m("div", {
405
403
  className: "mt-3",
406
- children: Ye ? /* @__PURE__ */ _("div", {
404
+ children: Je ? /* @__PURE__ */ h("div", {
407
405
  className: "flex items-center gap-2 text-sm text-status-success-text",
408
- children: [/* @__PURE__ */ g("svg", {
406
+ children: [/* @__PURE__ */ m("svg", {
409
407
  className: "size-4",
410
408
  fill: "none",
411
409
  viewBox: "0 0 24 24",
412
410
  stroke: "currentColor",
413
- children: /* @__PURE__ */ g("path", {
411
+ children: /* @__PURE__ */ m("path", {
414
412
  strokeLinecap: "round",
415
413
  strokeLinejoin: "round",
416
414
  strokeWidth: 2,
417
415
  d: "M5 13l4 4L19 7"
418
416
  })
419
- }), C("auth.login.verificationSent", "Verification email sent! Please check your inbox.")]
420
- }) : /* @__PURE__ */ g("button", {
417
+ }), y("auth.login.verificationSent", "Verification email sent! Please check your inbox.")]
418
+ }) : /* @__PURE__ */ m("button", {
421
419
  type: "button",
422
- onClick: rt,
423
- disabled: qe,
420
+ onClick: tt,
421
+ disabled: Ke,
424
422
  className: "inline-flex items-center gap-2 px-4 py-2.5 rounded-xl border border-status-warning-border bg-bg-surface text-status-warning-text text-sm font-medium hover:bg-status-warning-bg-subtle hover:border-status-warning-border transition-all shadow-sm disabled:opacity-50 disabled:cursor-not-allowed",
425
- children: qe ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(d, { className: "size-4 animate-spin" }), C("auth.login.sending", "Sending...")] }) : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("svg", {
423
+ children: Ke ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(ie, { className: "size-4 animate-spin" }), y("auth.login.sending", "Sending...")] }) : /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("svg", {
426
424
  className: "size-4",
427
425
  fill: "none",
428
426
  viewBox: "0 0 24 24",
429
427
  stroke: "currentColor",
430
- children: /* @__PURE__ */ g("path", {
428
+ children: /* @__PURE__ */ m("path", {
431
429
  strokeLinecap: "round",
432
430
  strokeLinejoin: "round",
433
431
  strokeWidth: 2,
434
432
  d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
435
433
  })
436
- }), C("auth.login.resendVerification", "Resend verification email")] })
434
+ }), y("auth.login.resendVerification", "Resend verification email")] })
437
435
  })
438
436
  }),
439
- L && /* @__PURE__ */ _("div", {
437
+ L && /* @__PURE__ */ h("div", {
440
438
  className: "mt-3 flex flex-col gap-2",
441
- children: [O("google") && /* @__PURE__ */ _("button", {
439
+ children: [T("google") && /* @__PURE__ */ h("button", {
442
440
  type: "button",
443
- onClick: tt,
441
+ onClick: $e,
444
442
  className: "inline-flex items-center justify-center gap-2 px-4 py-2.5 rounded-xl border border-border-default bg-bg-surface text-text-primary text-sm font-medium hover:bg-bg-canvas hover:border-border-default transition-all shadow-sm",
445
- children: [/* @__PURE__ */ g(te, { className: "size-5" }), C("auth.login.signInWithGoogle", "Sign in with Google")]
446
- }), O("microsoft") && /* @__PURE__ */ _("button", {
443
+ children: [/* @__PURE__ */ m(ne, { className: "size-5" }), y("auth.login.signInWithGoogle", "Sign in with Google")]
444
+ }), T("microsoft") && /* @__PURE__ */ h("button", {
447
445
  type: "button",
448
- onClick: nt,
446
+ onClick: et,
449
447
  className: "inline-flex items-center justify-center gap-2 px-4 py-2.5 rounded-xl border border-border-default bg-bg-surface text-text-primary text-sm font-medium hover:bg-bg-canvas hover:border-border-default transition-all shadow-sm",
450
- children: [/* @__PURE__ */ g(u, { className: "size-5" }), C("auth.login.signInWithMicrosoft", "Sign in with Microsoft")]
448
+ children: [/* @__PURE__ */ m(u, { className: "size-5" }), y("auth.login.signInWithMicrosoft", "Sign in with Microsoft")]
451
449
  })]
452
450
  })
453
451
  ]
454
452
  })]
455
453
  }),
456
- /* @__PURE__ */ _("div", {
454
+ /* @__PURE__ */ h("div", {
457
455
  className: "space-y-2",
458
- children: [/* @__PURE__ */ g("label", {
456
+ children: [/* @__PURE__ */ m("label", {
459
457
  htmlFor: "email",
460
458
  className: "block text-sm font-medium text-[var(--color-text-primary)]",
461
- children: C("auth.login.emailLabel", "Email")
462
- }), /* @__PURE__ */ _("div", {
459
+ children: y("auth.login.emailLabel", "Email")
460
+ }), /* @__PURE__ */ h("div", {
463
461
  className: "relative",
464
- children: [/* @__PURE__ */ g("div", {
462
+ children: [/* @__PURE__ */ m("div", {
465
463
  className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
466
- children: /* @__PURE__ */ g(c, { className: "size-5 text-[var(--color-text-tertiary)]" })
467
- }), /* @__PURE__ */ g("input", {
464
+ children: /* @__PURE__ */ m(l, { className: "size-5 text-[var(--color-text-tertiary)]" })
465
+ }), /* @__PURE__ */ m("input", {
468
466
  id: "email",
469
467
  type: "email",
470
468
  autoComplete: "email",
471
469
  required: !0,
472
470
  "aria-required": "true",
473
- "aria-label": C("auth.login.emailLabel", "Email"),
471
+ "aria-label": y("auth.login.emailLabel", "Email"),
474
472
  value: W.email,
475
473
  onChange: (e) => G({
476
474
  ...W,
477
475
  email: e.target.value
478
476
  }),
479
477
  className: "block w-full pl-[3.5rem] pr-4 py-3 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] placeholder:text-[var(--color-text-tertiary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
480
- placeholder: C("auth.login.emailPlaceholder", "you@example.com")
478
+ placeholder: y("auth.login.emailPlaceholder", "you@example.com")
481
479
  })]
482
480
  })]
483
481
  }),
484
- /* @__PURE__ */ _("div", {
482
+ /* @__PURE__ */ h("div", {
485
483
  className: "space-y-2",
486
- children: [/* @__PURE__ */ g("label", {
484
+ children: [/* @__PURE__ */ m("label", {
487
485
  htmlFor: "password",
488
486
  className: "block text-sm font-medium text-[var(--color-text-primary)]",
489
- children: C("auth.login.passwordLabel", "Password")
490
- }), /* @__PURE__ */ _("div", {
487
+ children: y("auth.login.passwordLabel", "Password")
488
+ }), /* @__PURE__ */ h("div", {
491
489
  className: "relative",
492
490
  children: [
493
- /* @__PURE__ */ g("div", {
491
+ /* @__PURE__ */ m("div", {
494
492
  className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
495
- children: /* @__PURE__ */ g(ne, { className: "size-5 text-[var(--color-text-tertiary)]" })
493
+ children: /* @__PURE__ */ m(re, { className: "size-5 text-[var(--color-text-tertiary)]" })
496
494
  }),
497
- /* @__PURE__ */ g("input", {
495
+ /* @__PURE__ */ m("input", {
498
496
  id: "password",
499
497
  type: M ? "text" : "password",
500
498
  autoComplete: "current-password",
501
499
  required: !0,
502
500
  "aria-required": "true",
503
- "aria-label": C("auth.login.passwordLabel", "Password"),
501
+ "aria-label": y("auth.login.passwordLabel", "Password"),
504
502
  value: W.password,
505
503
  onChange: (e) => G({
506
504
  ...W,
507
505
  password: e.target.value
508
506
  }),
509
507
  className: "block w-full pl-[3.5rem] pr-12 py-3 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] placeholder:text-[var(--color-text-tertiary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
510
- placeholder: C("auth.login.passwordPlaceholder", "Enter your password")
508
+ placeholder: y("auth.login.passwordPlaceholder", "Enter your password")
511
509
  }),
512
- /* @__PURE__ */ g("button", {
510
+ /* @__PURE__ */ m("button", {
513
511
  type: "button",
514
- onClick: () => We(!M),
515
- "aria-label": M ? "Hide password" : "Show password",
512
+ onClick: () => Ue(!M),
513
+ "aria-label": M ? y("auth.login.hidePassword", "Hide password") : y("auth.login.showPassword", "Show password"),
516
514
  className: "absolute inset-y-0 right-0 pr-3.5 flex items-center text-[var(--color-text-tertiary)] hover:text-[var(--color-text-secondary)] transition-colors",
517
- children: g(M ? ee : l, { className: "size-5" })
515
+ children: m(M ? te : ee, { className: "size-5" })
518
516
  })
519
517
  ]
520
518
  })]
521
519
  }),
522
- /* @__PURE__ */ _("div", {
520
+ /* @__PURE__ */ h("div", {
523
521
  className: "flex items-center justify-between",
524
- children: [/* @__PURE__ */ _("label", {
522
+ children: [/* @__PURE__ */ h("label", {
525
523
  className: "flex items-center gap-2 cursor-pointer group",
526
- children: [/* @__PURE__ */ _("div", {
524
+ children: [/* @__PURE__ */ h("div", {
527
525
  className: "relative",
528
- children: [/* @__PURE__ */ g("input", {
526
+ children: [/* @__PURE__ */ m("input", {
529
527
  type: "checkbox",
530
- "aria-label": C("auth.login.rememberMe", "Remember me"),
528
+ "aria-label": y("auth.login.rememberMe", "Remember me"),
531
529
  checked: W.rememberMe,
532
530
  onChange: (e) => {
533
531
  let t = e.target.checked;
@@ -541,103 +539,103 @@ function b() {
541
539
  }
542
540
  },
543
541
  className: "sr-only peer"
544
- }), /* @__PURE__ */ g("div", {
542
+ }), /* @__PURE__ */ m("div", {
545
543
  className: "size-5 rounded-md border-2 border-[var(--color-border-default)] bg-[var(--color-bg-surface)] peer-checked:bg-status-info-bg-subtle0 peer-checked:border-action-primary-bg transition-all peer-focus:ring-2 peer-focus:ring-action-primary-bg/20",
546
- children: /* @__PURE__ */ g("svg", {
544
+ children: /* @__PURE__ */ m("svg", {
547
545
  className: "size-full text-white opacity-0 peer-checked:opacity-100 transition-opacity p-0.5",
548
546
  fill: "none",
549
547
  viewBox: "0 0 24 24",
550
548
  stroke: "currentColor",
551
549
  strokeWidth: 3,
552
- children: /* @__PURE__ */ g("path", {
550
+ children: /* @__PURE__ */ m("path", {
553
551
  strokeLinecap: "round",
554
552
  strokeLinejoin: "round",
555
553
  d: "M5 13l4 4L19 7"
556
554
  })
557
555
  })
558
556
  })]
559
- }), /* @__PURE__ */ g("span", {
557
+ }), /* @__PURE__ */ m("span", {
560
558
  className: "text-sm text-[var(--color-text-secondary)] group-hover:text-[var(--color-text-primary)] transition-colors",
561
- children: C("auth.login.rememberMe", "Remember me")
559
+ children: y("auth.login.rememberMe", "Remember me")
562
560
  })]
563
- }), /* @__PURE__ */ g("button", {
561
+ }), /* @__PURE__ */ m("button", {
564
562
  type: "button",
565
- onClick: () => v("/auth/reset-password"),
563
+ onClick: () => b("/auth/reset-password"),
566
564
  className: "text-sm font-medium text-text-link hover:text-text-linkHover transition-colors",
567
- children: C("auth.login.forgotPassword", "Forgot password?")
565
+ children: y("auth.login.forgotPassword", "Forgot password?")
568
566
  })]
569
567
  }),
570
- /* @__PURE__ */ g(be, {
568
+ /* @__PURE__ */ m(Se, {
571
569
  type: "submit",
572
- disabled: w || k,
570
+ disabled: Ne || D,
573
571
  variant: "default",
574
572
  size: "lg",
575
573
  className: "w-full font-semibold",
576
- children: w || k ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(d, { className: "size-5 animate-spin" }), /* @__PURE__ */ g("span", { children: k ? C("auth.login.settingUpWorkspace", "Setting up workspace...") : C("auth.login.signingIn", "Signing in...") })] }) : C("auth.login.signIn", "Sign in")
574
+ children: Ne || D ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(ie, { className: "size-5 animate-spin" }), /* @__PURE__ */ m("span", { children: D ? y("auth.login.settingUpWorkspace", "Setting up workspace...") : y("auth.login.signingIn", "Signing in...") })] }) : y("auth.login.signIn", "Sign in")
577
575
  })
578
576
  ]
579
577
  }),
580
- /* @__PURE__ */ _("div", {
578
+ /* @__PURE__ */ h("div", {
581
579
  className: "relative my-8",
582
- children: [/* @__PURE__ */ g("div", {
580
+ children: [/* @__PURE__ */ m("div", {
583
581
  className: "absolute inset-0 flex items-center",
584
- children: /* @__PURE__ */ g("div", { className: "w-full border-t border-[var(--color-border-default)]" })
585
- }), /* @__PURE__ */ g("div", {
582
+ children: /* @__PURE__ */ m("div", { className: "w-full border-t border-[var(--color-border-default)]" })
583
+ }), /* @__PURE__ */ m("div", {
586
584
  className: "relative flex justify-center",
587
- children: /* @__PURE__ */ g("span", {
585
+ children: /* @__PURE__ */ m("span", {
588
586
  className: "px-4 bg-[var(--color-bg-canvas)] text-sm text-[var(--color-text-tertiary)]",
589
- children: C("auth.login.orContinueWith", "or continue with")
587
+ children: y("auth.login.orContinueWith", "or continue with")
590
588
  })
591
589
  })]
592
590
  }),
593
- Xe && /* @__PURE__ */ _("div", {
591
+ Ye && /* @__PURE__ */ h("div", {
594
592
  className: "flex items-start gap-3 p-4 rounded-xl border bg-status-error-bg-subtle border-status-error-border",
595
- children: [/* @__PURE__ */ g(s, { className: "size-5 flex-shrink-0 mt-0.5 text-status-error-text" }), /* @__PURE__ */ g("p", {
593
+ children: [/* @__PURE__ */ m(c, { className: "size-5 flex-shrink-0 mt-0.5 text-status-error-text" }), /* @__PURE__ */ m("p", {
596
594
  className: "text-sm text-status-error-text",
597
- children: Xe
595
+ children: Ye
598
596
  })]
599
597
  }),
600
- /* @__PURE__ */ g("div", {
598
+ /* @__PURE__ */ m("div", {
601
599
  className: "grid grid-cols-3 gap-3",
602
- children: at.map((e) => /* @__PURE__ */ _("button", {
600
+ children: it.map((e) => /* @__PURE__ */ h("button", {
603
601
  type: "button",
604
602
  onClick: e.onClick,
605
603
  disabled: e.disabled,
606
604
  title: e.tooltip,
607
605
  "aria-label": e.name,
608
606
  className: `flex items-center justify-center gap-2 px-4 py-3 rounded-xl border transition-all duration-200 group ${e.disabled ? "border-[var(--color-border-subtle)] bg-[var(--color-bg-disabled)] cursor-not-allowed opacity-50" : "border-[var(--color-border-default)] bg-[var(--color-bg-surface)] hover:bg-[var(--color-bg-sunken)] hover:border-[var(--color-border-strong)]"}`,
609
- children: [/* @__PURE__ */ g(e.icon, { className: `size-5 ${e.disabled ? "opacity-50" : ""}` }), /* @__PURE__ */ g("span", {
607
+ children: [/* @__PURE__ */ m(e.icon, { className: `size-5 ${e.disabled ? "opacity-50" : ""}` }), /* @__PURE__ */ m("span", {
610
608
  className: `sr-only sm:not-sr-only text-sm font-medium transition-colors ${e.disabled ? "text-[var(--color-text-disabled)]" : "text-[var(--color-text-secondary)] group-hover:text-[var(--color-text-primary)]"}`,
611
609
  children: e.name
612
610
  })]
613
611
  }, e.name))
614
612
  }),
615
- /* @__PURE__ */ g("div", {
613
+ /* @__PURE__ */ m("div", {
616
614
  className: "mt-4 text-center",
617
- children: /* @__PURE__ */ _("button", {
615
+ children: /* @__PURE__ */ h("button", {
618
616
  type: "button",
619
- onClick: () => v("/auth/magic-link"),
617
+ onClick: () => b("/auth/magic-link"),
620
618
  className: "text-sm text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] transition-colors",
621
619
  children: [
622
- C("auth.login.preferPasswordless", "Prefer passwordless login?"),
620
+ y("auth.login.preferPasswordless", "Prefer passwordless login?"),
623
621
  " ",
624
- /* @__PURE__ */ g("span", {
622
+ /* @__PURE__ */ m("span", {
625
623
  className: "font-semibold text-text-link hover:text-text-linkHover",
626
- children: C("auth.login.signInMagicLink", "Sign in with Magic Link")
624
+ children: y("auth.login.signInMagicLink", "Sign in with Magic Link")
627
625
  })
628
626
  ]
629
627
  })
630
628
  }),
631
- /* @__PURE__ */ _("p", {
629
+ /* @__PURE__ */ h("p", {
632
630
  className: "mt-6 text-center text-sm text-[var(--color-text-secondary)]",
633
631
  children: [
634
- C("auth.login.dontHaveAccount", "Don't have an account?"),
632
+ y("auth.login.dontHaveAccount", "Don't have an account?"),
635
633
  " ",
636
- /* @__PURE__ */ g("button", {
634
+ /* @__PURE__ */ m("button", {
637
635
  type: "button",
638
- onClick: () => v("/auth/register"),
636
+ onClick: () => b("/auth/register"),
639
637
  className: "font-semibold text-text-link hover:text-text-linkHover transition-colors",
640
- children: C("auth.login.signUp", "Sign up")
638
+ children: y("auth.login.signUp", "Sign up")
641
639
  })
642
640
  ]
643
641
  })