@burdenoff/microfe-auth 2026.718.2 → 2026.718.3

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