@burdenoff/microfe-auth 2026.916.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.
@@ -1,138 +1,144 @@
1
1
  import { useAuth as e } from "../providers/AuthProvider.js";
2
2
  import { useTr as t } from "../../shared/hooks/useTr.js";
3
3
  import { useAuthOperations as n } from "../hooks/useAuthOperations.js";
4
- import { useOAuthOperations as ee } from "../hooks/useOAuthOperations.js";
5
- import { AuthLayout as r } from "../components/AuthLayout.js";
6
- import { AlertIcon as i, CheckIcon as te, EmailIcon as a, EyeIcon as o, EyeOffIcon as s, GitHubIcon as ne, GoogleIcon as re, LockIcon as c, MicrosoftIcon as l, SpinnerIcon as u, UserIcon as d, XIcon as f } from "../components/AuthIcons.js";
7
- import { validateEmail as p, validatePassword as ie } from "../utils/validation.js";
8
- import { resolveLegalUrl as m } from "../utils/legalUrls.js";
4
+ import { useOAuthOperations as r } from "../hooks/useOAuthOperations.js";
5
+ import { AuthLayout as i } from "../components/AuthLayout.js";
6
+ import { AlertIcon as a, CheckIcon as ee, EmailIcon as o, EyeIcon as s, EyeOffIcon as c, GitHubIcon as te, GoogleIcon as ne, LockIcon as l, MicrosoftIcon as u, SpinnerIcon as d, UserIcon as f, XIcon as p } from "../components/AuthIcons.js";
7
+ import { validateEmail as m, validatePassword as re, validateUserFields as ie } from "../utils/validation.js";
8
+ import { resolveLegalUrl as h } from "../utils/legalUrls.js";
9
9
  import { CaptchaV2 as ae } from "../components/CaptchaV2.js";
10
10
  import { useSignupCaptcha as oe } from "../hooks/useSignupCaptcha.js";
11
- import { useState as h } from "react";
12
- import { useNavigate as g } from "react-router";
13
- import { Fragment as se, jsx as _, jsxs as v } from "react/jsx-runtime";
14
- import { Button as y } from "@burdenoff/fe-libs/button";
11
+ import { useState as g } from "react";
12
+ import { useNavigate as _ } from "react-router";
13
+ import { Fragment as se, jsx as v, jsxs as y } from "react/jsx-runtime";
14
+ import { Button as b } from "@burdenoff/fe-libs/button";
15
15
  import { PagePurpose as ce } from "@burdenoff/fe-libs/ui";
16
16
  //#region src/auth/pages/RegisterPage.tsx
17
- function b() {
18
- let b = t(), { productName: x } = e(), S = g(), { signUp: C, resendVerification: le, isLoading: w, errorCode: T } = n(), { initiateGoogleOAuth: ue, initiateMicrosoftOAuth: de, isProviderConfigured: E } = ee(), [D, fe] = h(!1), [O, k] = h({
17
+ function x() {
18
+ let x = t(), { productName: S } = e(), C = _(), { signUp: w, resendVerification: le, isLoading: T, errorCode: E } = n(), { initiateGoogleOAuth: ue, initiateMicrosoftOAuth: de, isProviderConfigured: D } = r(), [O, fe] = g(!1), [k, A] = g({
19
19
  email: "",
20
20
  username: "",
21
21
  password: "",
22
22
  firstName: "",
23
23
  lastName: ""
24
- }), [A, j] = h([]), [M, N] = h(!1), [P, F] = h(null), [I, L] = h(null), [R, z] = h(null), [B, V] = h(0), { enabled: H, siteKey: pe } = oe(), [U, W] = h(!1), [G, K] = h(null), q = !!P && T === "ACCOUNT_DEACTIVATED", J = !!P && T === "ACCOUNT_REMOVED", Y = !!P && T === "ACCOUNT_SUSPENDED", X = (() => {
25
- let e = O.password;
24
+ }), [j, M] = g([]), [N, P] = g(!1), [F, I] = g(null), [L, R] = g(null), [z, B] = g(null), [V, pe] = g(0), { enabled: H, siteKey: me } = oe(), [U, W] = g(!1), [G, K] = g(null), q = !!F && E === "ACCOUNT_DEACTIVATED", J = !!F && E === "ACCOUNT_REMOVED", Y = !!F && E === "ACCOUNT_SUSPENDED", X = (() => {
25
+ let e = k.password;
26
26
  return [
27
27
  {
28
- label: b("auth.register.pwMin8", "At least 12 characters"),
28
+ label: x("auth.register.pwMin8", "At least 12 characters"),
29
29
  met: e.length >= 12
30
30
  },
31
31
  {
32
- label: b("auth.register.pwUppercase", "One uppercase letter"),
32
+ label: x("auth.register.pwUppercase", "One uppercase letter"),
33
33
  met: /[A-Z]/.test(e)
34
34
  },
35
35
  {
36
- label: b("auth.register.pwLowercase", "One lowercase letter"),
36
+ label: x("auth.register.pwLowercase", "One lowercase letter"),
37
37
  met: /[a-z]/.test(e)
38
38
  },
39
39
  {
40
- label: b("auth.register.pwNumber", "One number"),
40
+ label: x("auth.register.pwNumber", "One number"),
41
41
  met: /\d/.test(e)
42
42
  },
43
43
  {
44
- label: b("auth.register.pwSpecial", "One special character"),
44
+ label: x("auth.register.pwSpecial", "One special character"),
45
45
  met: /[!@#$%^&*(),.?":{}|<>]/.test(e)
46
46
  }
47
47
  ];
48
48
  })(), Z = (() => {
49
49
  let e = X.filter((e) => e.met).length;
50
50
  return e <= 2 ? {
51
- level: b("auth.register.passwordStrengthWeak", "weak"),
51
+ level: x("auth.register.passwordStrengthWeak", "weak"),
52
52
  color: "bg-status-error-bg-subtle0",
53
53
  width: "w-1/4"
54
54
  } : e <= 3 ? {
55
- level: b("auth.register.passwordStrengthFair", "fair"),
55
+ level: x("auth.register.passwordStrengthFair", "fair"),
56
56
  color: "bg-status-warning-text",
57
57
  width: "w-2/4"
58
58
  } : e <= 4 ? {
59
- level: b("auth.register.passwordStrengthGood", "good"),
59
+ level: x("auth.register.passwordStrengthGood", "good"),
60
60
  color: "bg-status-warning-bg-subtle0",
61
61
  width: "w-3/4"
62
62
  } : {
63
- level: b("auth.register.passwordStrengthStrong", "strong"),
63
+ level: x("auth.register.passwordStrengthStrong", "strong"),
64
64
  color: "bg-status-success-text",
65
65
  width: "w-full"
66
66
  };
67
- })(), me = async (e) => {
67
+ })(), he = async (e) => {
68
68
  e.preventDefault();
69
69
  let t = [];
70
- p(O.email) || t.push(b("auth.register.invalidEmail", "Please enter a valid email address")), (!O.username || O.username.length < 3) && t.push(b("auth.register.usernameMin3", "Username must be at least 3 characters")), /^[a-zA-Z0-9_-]+$/.test(O.username) || t.push(b("auth.register.usernameChars", "Username can only contain letters, numbers, underscores, and hyphens"));
71
- let n = ie(O.password);
72
- if (n.valid || t.push(...n.errors), H && !R && t.push(b("auth.register.completeCaptcha", "Please complete the reCAPTCHA verification")), t.length > 0) {
73
- j(t);
70
+ m(k.email) || t.push(x("auth.register.invalidEmail", "Please enter a valid email address"));
71
+ let n = ie(k);
72
+ n.valid || t.push(...n.errors.map((e) => x(`auth.register.${e.field}_${e.code}`, e.message)));
73
+ let r = re(k.password);
74
+ if (r.valid || t.push(...r.errors), H && !z && t.push(x("auth.register.completeCaptcha", "Please complete the reCAPTCHA verification")), t.length > 0) {
75
+ M(t);
74
76
  return;
75
77
  }
76
- j([]), F(null);
78
+ M([]), I(null);
77
79
  try {
78
- await C({
79
- ...O,
80
- ...R ? { recaptchaToken: R } : {}
81
- }), N(!0);
80
+ let e = n.values;
81
+ await w({
82
+ ...k,
83
+ firstName: e.firstName,
84
+ lastName: e.lastName,
85
+ username: e.username,
86
+ ...z ? { recaptchaToken: z } : {}
87
+ }), P(!0);
82
88
  } catch (e) {
83
- F(e instanceof Error ? e.message : b("auth.register.signUpFailed", "Sign up failed")), console.error("Sign up failed:", e), H && (z(null), V((e) => e + 1));
89
+ I(e instanceof Error ? e.message : x("auth.register.signUpFailed", "Sign up failed")), console.error("Sign up failed:", e), H && (B(null), pe((e) => e + 1));
84
90
  }
85
- }, he = () => {
86
- L(null);
91
+ }, ge = () => {
92
+ R(null);
87
93
  try {
88
94
  ue();
89
95
  } catch (e) {
90
- L(e instanceof Error ? e.message : b("auth.register.googleSignUpFailed", "Failed to initiate Google sign up"));
96
+ R(e instanceof Error ? e.message : x("auth.register.googleSignUpFailed", "Failed to initiate Google sign up"));
91
97
  }
92
- }, ge = () => {
93
- L(null);
98
+ }, _e = () => {
99
+ R(null);
94
100
  try {
95
101
  de();
96
102
  } catch (e) {
97
- L(e instanceof Error ? e.message : b("auth.register.microsoftSignUpFailed", "Failed to initiate Microsoft sign up"));
103
+ R(e instanceof Error ? e.message : x("auth.register.microsoftSignUpFailed", "Failed to initiate Microsoft sign up"));
98
104
  }
99
- }, Q = E("google"), $ = E("microsoft"), _e = [
105
+ }, Q = D("google"), $ = D("microsoft"), ve = [
100
106
  {
101
107
  name: "Google",
102
- icon: re,
103
- onClick: he,
108
+ icon: ne,
109
+ onClick: ge,
104
110
  disabled: !Q,
105
- tooltip: Q ? void 0 : b("auth.register.googleNotConfigured", "Google sign up is not configured")
111
+ tooltip: Q ? void 0 : x("auth.register.googleNotConfigured", "Google sign up is not configured")
106
112
  },
107
113
  {
108
114
  name: "GitHub",
109
- icon: ne,
115
+ icon: te,
110
116
  onClick: () => {},
111
117
  disabled: !0,
112
- tooltip: b("auth.register.githubNotConfigured", "GitHub sign up is not configured")
118
+ tooltip: x("auth.register.githubNotConfigured", "GitHub sign up is not configured")
113
119
  },
114
120
  {
115
121
  name: "Microsoft",
116
- icon: l,
117
- onClick: ge,
122
+ icon: u,
123
+ onClick: _e,
118
124
  disabled: !$,
119
- tooltip: $ ? void 0 : b("auth.register.microsoftNotConfigured", "Microsoft sign up is not configured")
125
+ tooltip: $ ? void 0 : x("auth.register.microsoftNotConfigured", "Microsoft sign up is not configured")
120
126
  }
121
- ], [ve, ye = ""] = b("auth.register.verificationEmailSentTo", "We've sent a verification email to {{email}}. Please check your inbox and click the verification link to activate your account.").split("{{email}}");
122
- return M ? /* @__PURE__ */ _(r, {
123
- title: b("auth.register.checkEmail", "Check your email"),
124
- subtitle: b("auth.register.verificationLinkSent", "We've sent you a verification link"),
125
- children: /* @__PURE__ */ v("div", {
127
+ ], [ye, be = ""] = x("auth.register.verificationEmailSentTo", "We've sent a verification email to {{email}}. Please check your inbox and click the verification link to activate your account.").split("{{email}}");
128
+ return N ? /* @__PURE__ */ v(i, {
129
+ title: x("auth.register.checkEmail", "Check your email"),
130
+ subtitle: x("auth.register.verificationLinkSent", "We've sent you a verification link"),
131
+ children: /* @__PURE__ */ y("div", {
126
132
  className: "flex flex-col items-center justify-center py-6",
127
133
  children: [
128
- /* @__PURE__ */ _("div", {
134
+ /* @__PURE__ */ v("div", {
129
135
  className: "size-20 rounded-full bg-status-success-bg-subtle flex items-center justify-center mb-6",
130
- children: /* @__PURE__ */ _("svg", {
136
+ children: /* @__PURE__ */ v("svg", {
131
137
  className: "size-10 text-status-success-text",
132
138
  fill: "none",
133
139
  viewBox: "0 0 24 24",
134
140
  stroke: "currentColor",
135
- children: /* @__PURE__ */ _("path", {
141
+ children: /* @__PURE__ */ v("path", {
136
142
  strokeLinecap: "round",
137
143
  strokeLinejoin: "round",
138
144
  strokeWidth: 2,
@@ -140,56 +146,56 @@ function b() {
140
146
  })
141
147
  })
142
148
  }),
143
- /* @__PURE__ */ _("h3", {
149
+ /* @__PURE__ */ v("h3", {
144
150
  className: "text-lg font-semibold text-[var(--color-text-primary)] mb-2",
145
- children: b("auth.register.accountCreated", "Account created successfully!")
151
+ children: x("auth.register.accountCreated", "Account created successfully!")
146
152
  }),
147
- /* @__PURE__ */ v("p", {
153
+ /* @__PURE__ */ y("p", {
148
154
  className: "text-center text-[var(--color-text-secondary)] mb-8 max-w-sm",
149
155
  children: [
150
- ve,
151
- /* @__PURE__ */ _("span", {
156
+ ye,
157
+ /* @__PURE__ */ v("span", {
152
158
  className: "font-medium text-[var(--color-text-primary)]",
153
- children: O.email
159
+ children: k.email
154
160
  }),
155
- ye
161
+ be
156
162
  ]
157
163
  }),
158
- /* @__PURE__ */ v("div", {
164
+ /* @__PURE__ */ y("div", {
159
165
  className: "space-y-3 w-full",
160
166
  children: [
161
- /* @__PURE__ */ _(y, {
167
+ /* @__PURE__ */ v(b, {
162
168
  type: "button",
163
- onClick: () => S("/auth/login"),
169
+ onClick: () => C("/auth/login"),
164
170
  variant: "default",
165
171
  size: "lg",
166
172
  className: "w-full font-semibold",
167
- children: b("auth.register.continueToSignIn", "Continue to sign in")
173
+ children: x("auth.register.continueToSignIn", "Continue to sign in")
168
174
  }),
169
- G && /* @__PURE__ */ _("p", {
175
+ G && /* @__PURE__ */ v("p", {
170
176
  className: "text-center text-sm text-status-error-text",
171
177
  children: G
172
178
  }),
173
- /* @__PURE__ */ v("p", {
179
+ /* @__PURE__ */ y("p", {
174
180
  className: "text-center text-sm text-[var(--color-text-tertiary)]",
175
181
  children: [
176
- b("auth.register.didntReceiveEmail", "Didn't receive the email? Check your spam folder or"),
182
+ x("auth.register.didntReceiveEmail", "Didn't receive the email? Check your spam folder or"),
177
183
  " ",
178
- /* @__PURE__ */ _("button", {
184
+ /* @__PURE__ */ v("button", {
179
185
  type: "button",
180
186
  disabled: U,
181
187
  onClick: async () => {
182
188
  K(null), W(!0);
183
189
  try {
184
- await le(O.email);
190
+ await le(k.email);
185
191
  } catch (e) {
186
- K(e instanceof Error ? e.message : b("auth.register.resendFailed", "Failed to resend verification email"));
192
+ K(e instanceof Error ? e.message : x("auth.register.resendFailed", "Failed to resend verification email"));
187
193
  } finally {
188
194
  W(!1);
189
195
  }
190
196
  },
191
197
  className: "text-text-link hover:text-text-linkHover font-medium disabled:opacity-50 disabled:cursor-not-allowed",
192
- children: U ? b("auth.register.resending", "resending...") : b("auth.register.tryAgain", "try again")
198
+ children: U ? x("auth.register.resending", "resending...") : x("auth.register.tryAgain", "try again")
193
199
  })
194
200
  ]
195
201
  })
@@ -197,223 +203,223 @@ function b() {
197
203
  })
198
204
  ]
199
205
  })
200
- }) : /* @__PURE__ */ v(r, {
201
- title: b("auth.register.createAccount", "Create your account"),
202
- subtitle: b("auth.register.startJourney", "Start your journey with {{productName}}").replace("{{productName}}", x || "Burdenoff Workspaces"),
203
- productName: x,
206
+ }) : /* @__PURE__ */ y(i, {
207
+ title: x("auth.register.createAccount", "Create your account"),
208
+ subtitle: x("auth.register.startJourney", "Start your journey with {{productName}}").replace("{{productName}}", S || "Burdenoff Workspaces"),
209
+ productName: S,
204
210
  children: [
205
- /* @__PURE__ */ _(ce, {
211
+ /* @__PURE__ */ v(ce, {
206
212
  className: "mb-5",
207
- children: b("auth.register.purpose", "Create your account to get a personal workspace and start collaborating. You'll verify your email, then you can sign in and invite your team.")
213
+ children: x("auth.register.purpose", "Create your account to get a personal workspace and start collaborating. You'll verify your email, then you can sign in and invite your team.")
208
214
  }),
209
- /* @__PURE__ */ v("form", {
210
- onSubmit: me,
215
+ /* @__PURE__ */ y("form", {
216
+ onSubmit: he,
211
217
  className: "space-y-5",
212
218
  children: [
213
- q && /* @__PURE__ */ v("div", {
219
+ q && /* @__PURE__ */ y("div", {
214
220
  className: "flex items-start gap-3 p-4 rounded-xl bg-status-warning-bg-subtle border border-status-warning-border",
215
- children: [/* @__PURE__ */ _(i, { className: "size-5 text-status-warning-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ v("div", {
221
+ children: [/* @__PURE__ */ v(a, { className: "size-5 text-status-warning-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ y("div", {
216
222
  className: "space-y-2",
217
223
  children: [
218
- /* @__PURE__ */ _("p", {
224
+ /* @__PURE__ */ v("p", {
219
225
  className: "text-sm font-medium text-status-warning-text",
220
- children: b("auth.register.accountDeactivated", "This email belongs to a deactivated account.")
226
+ children: x("auth.register.accountDeactivated", "This email belongs to a deactivated account.")
221
227
  }),
222
- /* @__PURE__ */ _("p", {
228
+ /* @__PURE__ */ v("p", {
223
229
  className: "text-xs text-status-warning-text/80",
224
- children: b("auth.register.accountDeactivatedHelp", "If this is your account, you can reactivate it instead of creating a new one.")
230
+ children: x("auth.register.accountDeactivatedHelp", "If this is your account, you can reactivate it instead of creating a new one.")
225
231
  }),
226
- /* @__PURE__ */ _("button", {
232
+ /* @__PURE__ */ v("button", {
227
233
  type: "button",
228
- onClick: () => S("/auth/reactivate", { state: { email: O.email } }),
234
+ onClick: () => C("/auth/reactivate", { state: { email: k.email } }),
229
235
  className: "text-sm font-semibold text-status-warning-text underline underline-offset-2",
230
- children: b("auth.register.reactivateCta", "Reactivate my account")
236
+ children: x("auth.register.reactivateCta", "Reactivate my account")
231
237
  })
232
238
  ]
233
239
  })]
234
240
  }),
235
- (J || Y) && /* @__PURE__ */ v("div", {
241
+ (J || Y) && /* @__PURE__ */ y("div", {
236
242
  className: "flex items-start gap-3 p-4 rounded-xl bg-status-warning-bg-subtle border border-status-warning-border",
237
- children: [/* @__PURE__ */ _(i, { className: "size-5 text-status-warning-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ _("p", {
243
+ children: [/* @__PURE__ */ v(a, { className: "size-5 text-status-warning-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ v("p", {
238
244
  className: "text-sm text-status-warning-text",
239
- children: P
245
+ children: F
240
246
  })]
241
247
  }),
242
- (P && !q && !J && !Y || A.length > 0) && /* @__PURE__ */ v("div", {
248
+ (F && !q && !J && !Y || j.length > 0) && /* @__PURE__ */ y("div", {
243
249
  className: "flex items-start gap-3 p-4 rounded-xl bg-status-error-bg-subtle border border-status-error-border",
244
- children: [/* @__PURE__ */ _(i, { className: "size-5 text-status-error-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ v("div", {
250
+ children: [/* @__PURE__ */ v(a, { className: "size-5 text-status-error-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ y("div", {
245
251
  className: "space-y-1",
246
- children: [P && !q && !J && !Y && /* @__PURE__ */ _("p", {
252
+ children: [F && !q && !J && !Y && /* @__PURE__ */ v("p", {
247
253
  className: "text-sm text-status-error-text",
248
- children: P
249
- }), A.map((e) => /* @__PURE__ */ _("p", {
254
+ children: F
255
+ }), j.map((e) => /* @__PURE__ */ v("p", {
250
256
  className: "text-sm text-status-error-text",
251
257
  children: e
252
258
  }, e))]
253
259
  })]
254
260
  }),
255
- /* @__PURE__ */ v("div", {
261
+ /* @__PURE__ */ y("div", {
256
262
  className: "grid grid-cols-2 gap-4",
257
- children: [/* @__PURE__ */ v("div", {
263
+ children: [/* @__PURE__ */ y("div", {
258
264
  className: "space-y-2",
259
- children: [/* @__PURE__ */ _("label", {
265
+ children: [/* @__PURE__ */ v("label", {
260
266
  htmlFor: "firstName",
261
267
  className: "block text-sm font-medium text-[var(--color-text-primary)]",
262
- children: b("auth.register.firstName", "First Name")
263
- }), /* @__PURE__ */ _("input", {
268
+ children: x("auth.register.firstName", "First Name")
269
+ }), /* @__PURE__ */ v("input", {
264
270
  id: "firstName",
265
271
  type: "text",
266
272
  required: !0,
267
273
  "aria-required": "true",
268
- "aria-label": b("auth.register.firstName", "First Name"),
269
- value: O.firstName,
270
- onChange: (e) => k({
271
- ...O,
274
+ "aria-label": x("auth.register.firstName", "First Name"),
275
+ value: k.firstName,
276
+ onChange: (e) => A({
277
+ ...k,
272
278
  firstName: e.target.value
273
279
  }),
274
280
  className: "block w-full px-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",
275
- placeholder: b("auth.register.firstNamePlaceholder", "Enter first name")
281
+ placeholder: x("auth.register.firstNamePlaceholder", "Enter first name")
276
282
  })]
277
- }), /* @__PURE__ */ v("div", {
283
+ }), /* @__PURE__ */ y("div", {
278
284
  className: "space-y-2",
279
- children: [/* @__PURE__ */ _("label", {
285
+ children: [/* @__PURE__ */ v("label", {
280
286
  htmlFor: "lastName",
281
287
  className: "block text-sm font-medium text-[var(--color-text-primary)]",
282
- children: b("auth.register.lastName", "Last Name")
283
- }), /* @__PURE__ */ _("input", {
288
+ children: x("auth.register.lastName", "Last Name")
289
+ }), /* @__PURE__ */ v("input", {
284
290
  id: "lastName",
285
291
  type: "text",
286
292
  required: !0,
287
293
  "aria-required": "true",
288
- "aria-label": b("auth.register.lastName", "Last Name"),
289
- value: O.lastName,
290
- onChange: (e) => k({
291
- ...O,
294
+ "aria-label": x("auth.register.lastName", "Last Name"),
295
+ value: k.lastName,
296
+ onChange: (e) => A({
297
+ ...k,
292
298
  lastName: e.target.value
293
299
  }),
294
300
  className: "block w-full px-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",
295
- placeholder: b("auth.register.lastNamePlaceholder", "Enter last name")
301
+ placeholder: x("auth.register.lastNamePlaceholder", "Enter last name")
296
302
  })]
297
303
  })]
298
304
  }),
299
- /* @__PURE__ */ v("div", {
305
+ /* @__PURE__ */ y("div", {
300
306
  className: "space-y-2",
301
- children: [/* @__PURE__ */ _("label", {
307
+ children: [/* @__PURE__ */ v("label", {
302
308
  htmlFor: "username",
303
309
  className: "block text-sm font-medium text-[var(--color-text-primary)]",
304
- children: b("auth.register.username", "Username")
305
- }), /* @__PURE__ */ v("div", {
310
+ children: x("auth.register.username", "Username")
311
+ }), /* @__PURE__ */ y("div", {
306
312
  className: "relative",
307
- children: [/* @__PURE__ */ _("div", {
313
+ children: [/* @__PURE__ */ v("div", {
308
314
  className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
309
- children: /* @__PURE__ */ _(d, { className: "size-5 text-[var(--color-text-tertiary)]" })
310
- }), /* @__PURE__ */ _("input", {
315
+ children: /* @__PURE__ */ v(f, { className: "size-5 text-[var(--color-text-tertiary)]" })
316
+ }), /* @__PURE__ */ v("input", {
311
317
  id: "username",
312
318
  type: "text",
313
319
  required: !0,
314
320
  "aria-required": "true",
315
- "aria-label": b("auth.register.username", "Username"),
321
+ "aria-label": x("auth.register.username", "Username"),
316
322
  autoComplete: "username",
317
- value: O.username,
318
- onChange: (e) => k({
319
- ...O,
323
+ value: k.username,
324
+ onChange: (e) => A({
325
+ ...k,
320
326
  username: e.target.value
321
327
  }),
322
328
  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",
323
- placeholder: b("auth.register.usernamePlaceholder", "Choose a username")
329
+ placeholder: x("auth.register.usernamePlaceholder", "Choose a username")
324
330
  })]
325
331
  })]
326
332
  }),
327
- /* @__PURE__ */ v("div", {
333
+ /* @__PURE__ */ y("div", {
328
334
  className: "space-y-2",
329
- children: [/* @__PURE__ */ _("label", {
335
+ children: [/* @__PURE__ */ v("label", {
330
336
  htmlFor: "email",
331
337
  className: "block text-sm font-medium text-[var(--color-text-primary)]",
332
- children: b("auth.register.email", "Email")
333
- }), /* @__PURE__ */ v("div", {
338
+ children: x("auth.register.email", "Email")
339
+ }), /* @__PURE__ */ y("div", {
334
340
  className: "relative",
335
- children: [/* @__PURE__ */ _("div", {
341
+ children: [/* @__PURE__ */ v("div", {
336
342
  className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
337
- children: /* @__PURE__ */ _(a, { className: "size-5 text-[var(--color-text-tertiary)]" })
338
- }), /* @__PURE__ */ _("input", {
343
+ children: /* @__PURE__ */ v(o, { className: "size-5 text-[var(--color-text-tertiary)]" })
344
+ }), /* @__PURE__ */ v("input", {
339
345
  id: "email",
340
346
  type: "email",
341
347
  required: !0,
342
348
  "aria-required": "true",
343
- "aria-label": b("auth.register.email", "Email"),
349
+ "aria-label": x("auth.register.email", "Email"),
344
350
  autoComplete: "email",
345
- value: O.email,
346
- onChange: (e) => k({
347
- ...O,
351
+ value: k.email,
352
+ onChange: (e) => A({
353
+ ...k,
348
354
  email: e.target.value
349
355
  }),
350
356
  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",
351
- placeholder: b("auth.register.emailPlaceholder", "you@example.com")
357
+ placeholder: x("auth.register.emailPlaceholder", "you@example.com")
352
358
  })]
353
359
  })]
354
360
  }),
355
- /* @__PURE__ */ v("div", {
361
+ /* @__PURE__ */ y("div", {
356
362
  className: "space-y-2",
357
363
  children: [
358
- /* @__PURE__ */ _("label", {
364
+ /* @__PURE__ */ v("label", {
359
365
  htmlFor: "password",
360
366
  className: "block text-sm font-medium text-[var(--color-text-primary)]",
361
- children: b("auth.register.password", "Password")
367
+ children: x("auth.register.password", "Password")
362
368
  }),
363
- /* @__PURE__ */ v("div", {
369
+ /* @__PURE__ */ y("div", {
364
370
  className: "relative",
365
371
  children: [
366
- /* @__PURE__ */ _("div", {
372
+ /* @__PURE__ */ v("div", {
367
373
  className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
368
- children: /* @__PURE__ */ _(c, { className: "size-5 text-[var(--color-text-tertiary)]" })
374
+ children: /* @__PURE__ */ v(l, { className: "size-5 text-[var(--color-text-tertiary)]" })
369
375
  }),
370
- /* @__PURE__ */ _("input", {
376
+ /* @__PURE__ */ v("input", {
371
377
  id: "password",
372
- type: D ? "text" : "password",
378
+ type: O ? "text" : "password",
373
379
  required: !0,
374
380
  "aria-required": "true",
375
- "aria-label": b("auth.register.password", "Password"),
381
+ "aria-label": x("auth.register.password", "Password"),
376
382
  autoComplete: "new-password",
377
- value: O.password,
378
- onChange: (e) => k({
379
- ...O,
383
+ value: k.password,
384
+ onChange: (e) => A({
385
+ ...k,
380
386
  password: e.target.value
381
387
  }),
382
388
  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",
383
- placeholder: b("auth.register.passwordPlaceholder", "Create a strong password")
389
+ placeholder: x("auth.register.passwordPlaceholder", "Create a strong password")
384
390
  }),
385
- /* @__PURE__ */ _("button", {
391
+ /* @__PURE__ */ v("button", {
386
392
  type: "button",
387
- onClick: () => fe(!D),
388
- "aria-label": D ? b("auth.register.hidePassword", "Hide password") : b("auth.register.showPassword", "Show password"),
393
+ onClick: () => fe(!O),
394
+ "aria-label": O ? x("auth.register.hidePassword", "Hide password") : x("auth.register.showPassword", "Show password"),
389
395
  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",
390
- children: _(D ? s : o, { className: "size-5" })
396
+ children: v(O ? c : s, { className: "size-5" })
391
397
  })
392
398
  ]
393
399
  }),
394
- O.password && /* @__PURE__ */ v("div", {
400
+ k.password && /* @__PURE__ */ y("div", {
395
401
  className: "space-y-3 pt-2",
396
- children: [/* @__PURE__ */ v("div", {
402
+ children: [/* @__PURE__ */ y("div", {
397
403
  className: "space-y-1",
398
- children: [/* @__PURE__ */ _("div", {
404
+ children: [/* @__PURE__ */ v("div", {
399
405
  className: "h-1.5 bg-[var(--color-bg-sunken)] rounded-full overflow-hidden",
400
- children: /* @__PURE__ */ _("div", { className: `h-full ${Z.color} ${Z.width} transition-all duration-300` })
401
- }), /* @__PURE__ */ v("p", {
406
+ children: /* @__PURE__ */ v("div", { className: `h-full ${Z.color} ${Z.width} transition-all duration-300` })
407
+ }), /* @__PURE__ */ y("p", {
402
408
  className: "text-xs text-[var(--color-text-tertiary)] capitalize",
403
409
  children: [
404
- b("auth.register.passwordStrength", "Password strength:"),
410
+ x("auth.register.passwordStrength", "Password strength:"),
405
411
  " ",
406
- /* @__PURE__ */ _("span", {
412
+ /* @__PURE__ */ v("span", {
407
413
  className: "font-medium",
408
414
  children: Z.level
409
415
  })
410
416
  ]
411
417
  })]
412
- }), /* @__PURE__ */ _("div", {
418
+ }), /* @__PURE__ */ v("div", {
413
419
  className: "grid grid-cols-2 gap-2",
414
- children: X.map((e) => /* @__PURE__ */ v("div", {
420
+ children: X.map((e) => /* @__PURE__ */ y("div", {
415
421
  className: "flex items-center gap-2",
416
- children: [e.met ? /* @__PURE__ */ _(te, { className: "size-4 text-status-success-text" }) : /* @__PURE__ */ _(f, { className: "size-4 text-[var(--color-text-tertiary)]" }), /* @__PURE__ */ _("span", {
422
+ children: [e.met ? /* @__PURE__ */ v(ee, { className: "size-4 text-status-success-text" }) : /* @__PURE__ */ v(p, { className: "size-4 text-[var(--color-text-tertiary)]" }), /* @__PURE__ */ v("span", {
417
423
  className: `text-xs ${e.met ? "text-status-success-text" : "text-[var(--color-text-tertiary)]"}`,
418
424
  children: e.label
419
425
  })]
@@ -422,91 +428,91 @@ function b() {
422
428
  })
423
429
  ]
424
430
  }),
425
- /* @__PURE__ */ v("p", {
431
+ /* @__PURE__ */ y("p", {
426
432
  className: "text-xs text-[var(--color-text-tertiary)] leading-relaxed",
427
433
  children: [
428
- b("auth.register.agreeToTerms", "By creating an account, you agree to our"),
434
+ x("auth.register.agreeToTerms", "By creating an account, you agree to our"),
429
435
  " ",
430
- /* @__PURE__ */ _("a", {
431
- href: m("/terms"),
436
+ /* @__PURE__ */ v("a", {
437
+ href: h("/terms"),
432
438
  target: "_blank",
433
439
  rel: "noopener noreferrer",
434
440
  className: "text-text-link underline underline-offset-2",
435
- children: b("auth.register.termsOfService", "Terms of Service")
441
+ children: x("auth.register.termsOfService", "Terms of Service")
436
442
  }),
437
443
  " ",
438
- b("auth.register.and", "and"),
444
+ x("auth.register.and", "and"),
439
445
  " ",
440
- /* @__PURE__ */ _("a", {
441
- href: m("/privacy"),
446
+ /* @__PURE__ */ v("a", {
447
+ href: h("/privacy"),
442
448
  target: "_blank",
443
449
  rel: "noopener noreferrer",
444
450
  className: "text-text-link underline underline-offset-2",
445
- children: b("auth.register.privacyPolicy", "Privacy Policy")
451
+ children: x("auth.register.privacyPolicy", "Privacy Policy")
446
452
  }),
447
453
  "."
448
454
  ]
449
455
  }),
450
- /* @__PURE__ */ _(ae, {
456
+ /* @__PURE__ */ v(ae, {
451
457
  enabled: H,
452
- siteKey: pe,
453
- onVerify: z,
454
- onExpired: () => z(null)
455
- }, B),
456
- /* @__PURE__ */ _(y, {
458
+ siteKey: me,
459
+ onVerify: B,
460
+ onExpired: () => B(null)
461
+ }, V),
462
+ /* @__PURE__ */ v(b, {
457
463
  type: "submit",
458
- disabled: w,
464
+ disabled: T,
459
465
  variant: "default",
460
466
  size: "lg",
461
467
  className: "w-full font-semibold",
462
- children: w ? /* @__PURE__ */ v(se, { children: [/* @__PURE__ */ _(u, { className: "size-5 animate-spin" }), /* @__PURE__ */ _("span", { children: b("auth.register.creatingAccount", "Creating account...") })] }) : b("auth.register.createAccountBtn", "Create account")
468
+ children: T ? /* @__PURE__ */ y(se, { children: [/* @__PURE__ */ v(d, { className: "size-5 animate-spin" }), /* @__PURE__ */ v("span", { children: x("auth.register.creatingAccount", "Creating account...") })] }) : x("auth.register.createAccountBtn", "Create account")
463
469
  })
464
470
  ]
465
471
  }),
466
- /* @__PURE__ */ v("div", {
472
+ /* @__PURE__ */ y("div", {
467
473
  className: "relative my-8",
468
- children: [/* @__PURE__ */ _("div", {
474
+ children: [/* @__PURE__ */ v("div", {
469
475
  className: "absolute inset-0 flex items-center",
470
- children: /* @__PURE__ */ _("div", { className: "w-full border-t border-[var(--color-border-default)]" })
471
- }), /* @__PURE__ */ _("div", {
476
+ children: /* @__PURE__ */ v("div", { className: "w-full border-t border-[var(--color-border-default)]" })
477
+ }), /* @__PURE__ */ v("div", {
472
478
  className: "relative flex justify-center",
473
- children: /* @__PURE__ */ _("span", {
479
+ children: /* @__PURE__ */ v("span", {
474
480
  className: "px-4 bg-[var(--color-bg-canvas)] text-sm text-[var(--color-text-tertiary)]",
475
- children: b("auth.register.orSignUpWith", "or sign up with")
481
+ children: x("auth.register.orSignUpWith", "or sign up with")
476
482
  })
477
483
  })]
478
484
  }),
479
- I && /* @__PURE__ */ v("div", {
485
+ L && /* @__PURE__ */ y("div", {
480
486
  className: "flex items-start gap-3 p-4 rounded-xl border bg-status-error-bg-subtle border-status-error-border",
481
- children: [/* @__PURE__ */ _(i, { className: "size-5 flex-shrink-0 mt-0.5 text-status-error-text" }), /* @__PURE__ */ _("p", {
487
+ children: [/* @__PURE__ */ v(a, { className: "size-5 flex-shrink-0 mt-0.5 text-status-error-text" }), /* @__PURE__ */ v("p", {
482
488
  className: "text-sm text-status-error-text",
483
- children: I
489
+ children: L
484
490
  })]
485
491
  }),
486
- /* @__PURE__ */ _("div", {
492
+ /* @__PURE__ */ v("div", {
487
493
  className: "grid grid-cols-3 gap-3",
488
- children: _e.map((e) => /* @__PURE__ */ v("button", {
494
+ children: ve.map((e) => /* @__PURE__ */ y("button", {
489
495
  type: "button",
490
496
  onClick: e.onClick,
491
497
  disabled: e.disabled,
492
498
  title: e.tooltip,
493
499
  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)]"}`,
494
- children: [/* @__PURE__ */ _(e.icon, { className: `size-5 ${e.disabled ? "opacity-50" : ""}` }), /* @__PURE__ */ _("span", {
500
+ children: [/* @__PURE__ */ v(e.icon, { className: `size-5 ${e.disabled ? "opacity-50" : ""}` }), /* @__PURE__ */ v("span", {
495
501
  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)]"}`,
496
502
  children: e.name
497
503
  })]
498
504
  }, e.name))
499
505
  }),
500
- /* @__PURE__ */ v("p", {
506
+ /* @__PURE__ */ y("p", {
501
507
  className: "mt-8 text-center text-sm text-[var(--color-text-secondary)]",
502
508
  children: [
503
- b("auth.register.alreadyHaveAccount", "Already have an account?"),
509
+ x("auth.register.alreadyHaveAccount", "Already have an account?"),
504
510
  " ",
505
- /* @__PURE__ */ _("button", {
511
+ /* @__PURE__ */ v("button", {
506
512
  type: "button",
507
- onClick: () => S("/auth/login"),
513
+ onClick: () => C("/auth/login"),
508
514
  className: "font-semibold text-text-link hover:text-text-linkHover transition-colors",
509
- children: b("auth.register.signIn", "Sign in")
515
+ children: x("auth.register.signIn", "Sign in")
510
516
  })
511
517
  ]
512
518
  })
@@ -514,6 +520,6 @@ function b() {
514
520
  });
515
521
  }
516
522
  //#endregion
517
- export { b as RegisterPage };
523
+ export { x as RegisterPage };
518
524
 
519
525
  //# sourceMappingURL=RegisterPage.js.map