@burdenoff/microfe-auth 2026.908.1 → 2026.917.1

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