@tempots/beatui 0.25.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/{2019-DrrKn54V.js → 2019-Cw6dbOsG.js} +2 -2
  2. package/dist/{2019-BGvIfJgi.cjs → 2019-DU48Szvf.cjs} +1 -1
  3. package/dist/{2020-CFnlLHs-.js → 2020-C4Shen9O.js} +2 -2
  4. package/dist/{2020-BK5C7IVQ.cjs → 2020-Cp1L6hfj.cjs} +1 -1
  5. package/dist/{ar-BgrUqaxG.js → ar-L29B4drg.js} +1 -1
  6. package/dist/ar-Xt0B1GBx.cjs +1 -0
  7. package/dist/auth/index.cjs.js +1 -1
  8. package/dist/auth/index.es.js +443 -425
  9. package/dist/de-BBH6Q1uM.cjs +1 -0
  10. package/dist/{de-D_sdCcAw.js → de-BL9YMCWJ.js} +1 -1
  11. package/dist/es-3mljmytv.cjs +1 -0
  12. package/dist/{es-DczvLqEV.js → es-CS4u7MZp.js} +1 -1
  13. package/dist/fa-C06uowfA.cjs +1 -0
  14. package/dist/{fa-DhPP5Tgo.js → fa-_5IxCXGI.js} +1 -1
  15. package/dist/{fr-D3WwoeQg.js → fr-B-ZWm43Y.js} +1 -1
  16. package/dist/fr-ZoJsA1s0.cjs +1 -0
  17. package/dist/he-D-_HCjOB.cjs +1 -0
  18. package/dist/{he-CFhi-6Rs.js → he-J-Bcrgy9.js} +1 -1
  19. package/dist/hi-B9yNE6-J.cjs +1 -0
  20. package/dist/{hi-Cqy8JcS7.js → hi-ClGaIH71.js} +1 -1
  21. package/dist/{index-CvvASOCn.cjs → index-CLfb1616.cjs} +4 -4
  22. package/dist/{index-DkuGi1I_.js → index-DxiM_mmQ.js} +15 -15
  23. package/dist/{index-CNVCqpBH.cjs → index-NUMH-iWq.cjs} +1 -1
  24. package/dist/{index-BMX9_XgV.js → index-Nv9nZIgS.js} +1 -1
  25. package/dist/index.cjs.js +2 -2
  26. package/dist/index.es.js +274 -276
  27. package/dist/it-D-bh7RoG.cjs +1 -0
  28. package/dist/{it-CtMArqSp.js → it-Dv8tmKm5.js} +1 -1
  29. package/dist/ja-B4rdImcD.cjs +1 -0
  30. package/dist/{ja-UFqZT78C.js → ja-BpqiZN5f.js} +1 -1
  31. package/dist/json-schema/index.cjs.js +1 -1
  32. package/dist/json-schema/index.es.js +1 -1
  33. package/dist/{ko-B5LB1_X_.js → ko-Bpa6y038.js} +1 -1
  34. package/dist/ko-C43-vhJF.cjs +1 -0
  35. package/dist/modal-DKWKUrDF.cjs +1 -0
  36. package/dist/{modal-C2Aa-aVN.js → modal-Fect9dc4.js} +1 -1
  37. package/dist/{nl-DCfHVqzQ.js → nl-B5HYWGRz.js} +1 -1
  38. package/dist/nl-DDjoZpiU.cjs +1 -0
  39. package/dist/{translations-GO9sIajX.js → notice-DKO4C8y2.js} +475 -376
  40. package/dist/{translations-DpZ-btu9.cjs → notice-DrmHRjLV.cjs} +2 -2
  41. package/dist/pl-CXYiY-nR.cjs +1 -0
  42. package/dist/{pl-UcTv39q1.js → pl-DksXqLHk.js} +1 -1
  43. package/dist/{pt-CXsgmVtb.js → pt-7-6UhRtW.js} +1 -1
  44. package/dist/pt-CnC1YN5K.cjs +1 -0
  45. package/dist/{ru-C0MvZW2g.js → ru-I676X0Bt.js} +1 -1
  46. package/dist/ru-_1DUTMUW.cjs +1 -0
  47. package/dist/{tr-CIIkc1uL.js → tr-CssmRZfH.js} +1 -1
  48. package/dist/tr-DA-8X7MK.cjs +1 -0
  49. package/dist/{translations-CB6iJ1Rn.js → translations-BBguPjg9.js} +1 -1
  50. package/dist/translations-CrqWcCGM.cjs +1 -0
  51. package/dist/ur-B1YkWWDx.cjs +1 -0
  52. package/dist/{ur-Cpx9oyTV.js → ur-BCWL2ev1.js} +1 -1
  53. package/dist/utils-ClYvMRfA.cjs +1 -0
  54. package/dist/{notice-wSAzLfbl.js → utils-DU4oGQiY.js} +647 -746
  55. package/dist/{vi-D24AUQ01.js → vi-D5K4x_hN.js} +1 -1
  56. package/dist/vi-DA-qqgHJ.cjs +1 -0
  57. package/dist/zh-B4HcAg-5.cjs +1 -0
  58. package/dist/{zh-25YFRjoV.js → zh-HUwi9F-w.js} +1 -1
  59. package/package.json +3 -3
  60. package/dist/ar-BAb4yHZS.cjs +0 -1
  61. package/dist/de-Dn2CdXgD.cjs +0 -1
  62. package/dist/es-CEPxKSog.cjs +0 -1
  63. package/dist/fa-NvkKjIQ6.cjs +0 -1
  64. package/dist/fr-cR59lx1A.cjs +0 -1
  65. package/dist/he-CxSHPJMg.cjs +0 -1
  66. package/dist/hi-DLnz3lCX.cjs +0 -1
  67. package/dist/it-C7Kv6j-_.cjs +0 -1
  68. package/dist/ja-BPL80aw5.cjs +0 -1
  69. package/dist/ko-Cmt_34Xp.cjs +0 -1
  70. package/dist/modal-UsqvSvHy.cjs +0 -1
  71. package/dist/nl-B-WL9SX2.cjs +0 -1
  72. package/dist/notice-DyoWY5tY.cjs +0 -1
  73. package/dist/pl-TGqkSi2w.cjs +0 -1
  74. package/dist/pt-Ua_e-1JE.cjs +0 -1
  75. package/dist/ru-9YWCN6fR.cjs +0 -1
  76. package/dist/tr-D70Oy8aN.cjs +0 -1
  77. package/dist/translations-NYxsXjMT.cjs +0 -1
  78. package/dist/ur-DmxXuJ9O.cjs +0 -1
  79. package/dist/vi-Cboo_ueb.cjs +0 -1
  80. package/dist/zh-BXivX7rD.cjs +0 -1
@@ -1,9 +1,9 @@
1
- import { localStorageProp as ae, prop as E, Use as P, html as l, OnDispose as U, attr as t, on as T, When as _, coalesce as g, computedOf as f, bind as ne, ForEach as re, Value as J, OneOfValue as ie, Fragment as A } from "@tempots/dom";
2
- import { t as ce, b as K, u as R, S as q, c as oe, d as $, P as M, E as W, a as O, T as le, I as me } from "../translations-GO9sIajX.js";
3
- import { s as I, o as G, b as D, M as ue } from "../modal-C2Aa-aVN.js";
4
- import { AuthI18n as x } from "../translations-CB6iJ1Rn.js";
5
- import { classes as de } from "@tempots/ui";
6
- const N = {
1
+ import { localStorageProp as re, prop as E, Use as P, html as i, OnDispose as U, attr as t, on as T, When as L, coalesce as h, Ensure as N, computedOf as f, bind as ie, ForEach as ce, Value as Q, OneOfValue as le, Fragment as A } from "@tempots/dom";
2
+ import { t as me, b as ee, u as R, S as q, c as se, d as $, P as M, E as W, N as G, a as O, T as ue, I as de } from "../notice-DKO4C8y2.js";
3
+ import { s as I, o as H, b as D, M as pe } from "../modal-Fect9dc4.js";
4
+ import { AuthI18n as x } from "../translations-BBguPjg9.js";
5
+ import { classes as he } from "@tempots/ui";
6
+ const j = {
7
7
  google: { name: "Google", icon: "logos:google-icon", color: "#4285f4" },
8
8
  github: { name: "GitHub", icon: "logos:github-icon", color: "#333" },
9
9
  apple: { name: "Apple", icon: "logos:apple", color: "#000" },
@@ -49,17 +49,17 @@ const N = {
49
49
  paypal: { name: "PayPal", icon: "logos:paypal", color: "#0070ba" },
50
50
  x: { name: "X", icon: "simple-icons:x", color: "#000" }
51
51
  };
52
- function pe(e) {
53
- return N[e]?.name || e;
52
+ function ge(e) {
53
+ return j[e]?.name || e;
54
54
  }
55
- function xe(e) {
56
- return N[e]?.icon || "mdi:account";
55
+ function Be(e) {
56
+ return j[e]?.icon || "mdi:account";
57
57
  }
58
- function qe(e) {
59
- return N[e]?.color || "#666";
58
+ function $e(e) {
59
+ return j[e]?.color || "#666";
60
60
  }
61
- function Be(e, o = "Continue with {provider}") {
62
- return o.replace("{provider}", pe(e));
61
+ function Ie(e, o = "Continue with {provider}") {
62
+ return o.replace("{provider}", ge(e));
63
63
  }
64
64
  const B = {
65
65
  minLength: 8,
@@ -68,18 +68,18 @@ const B = {
68
68
  requireNumbers: !0,
69
69
  requireSymbols: !1
70
70
  };
71
- function $e(e) {
71
+ function Te(e) {
72
72
  return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);
73
73
  }
74
- function he(e = 32) {
74
+ function fe(e = 32) {
75
75
  const o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
76
- let i = "";
76
+ let c = "";
77
77
  for (let m = 0; m < e; m++)
78
- i += o.charAt(Math.floor(Math.random() * o.length));
79
- return i;
78
+ c += o.charAt(Math.floor(Math.random() * o.length));
79
+ return c;
80
80
  }
81
- function Ie(e, o, i, m = [], c = {}) {
82
- const n = {
81
+ function Ae(e, o, c, m = [], l = {}) {
82
+ const a = {
83
83
  google: "https://accounts.google.com/oauth/authorize",
84
84
  github: "https://github.com/login/oauth/authorize",
85
85
  apple: "https://appleid.apple.com/auth/authorize",
@@ -129,60 +129,60 @@ function Ie(e, o, i, m = [], c = {}) {
129
129
  yahoo: ["openid", "email", "profile"],
130
130
  paypal: ["openid", "email", "profile"],
131
131
  x: ["openid", "email", "profile"]
132
- }, a = n[e];
133
- if (!a)
132
+ }, n = a[e];
133
+ if (!n)
134
134
  throw new Error(`Unsupported provider: ${e}`);
135
- const u = m.length > 0 ? m : s[e], r = he(), b = new URLSearchParams({
135
+ const u = m.length > 0 ? m : s[e], r = fe(), w = new URLSearchParams({
136
136
  client_id: o,
137
- redirect_uri: i,
137
+ redirect_uri: c,
138
138
  scope: u.join(" "),
139
139
  state: r,
140
140
  response_type: "code",
141
- ...c
141
+ ...l
142
142
  });
143
- return `${a}?${b.toString()}`;
143
+ return `${n}?${w.toString()}`;
144
144
  }
145
- function Te(e, o, i, m) {
146
- const c = window.open(
145
+ function Ce(e, o, c, m) {
146
+ const l = window.open(
147
147
  e,
148
148
  `${o}_login`,
149
149
  "width=500,height=600,scrollbars=yes,resizable=yes"
150
150
  );
151
- if (!c) {
151
+ if (!l) {
152
152
  m?.(new Error("Failed to open popup window"));
153
153
  return;
154
154
  }
155
- const n = setInterval(() => {
156
- c.closed && (clearInterval(n), m?.(new Error("Login cancelled")));
157
- }, 1e3), s = (a) => {
158
- a.origin === window.location.origin && (a.data.type === "SOCIAL_LOGIN_SUCCESS" ? (clearInterval(n), c.close(), window.removeEventListener("message", s), i?.(a.data.result)) : a.data.type === "SOCIAL_LOGIN_ERROR" && (clearInterval(n), c.close(), window.removeEventListener("message", s), m?.(new Error(a.data.error))));
155
+ const a = setInterval(() => {
156
+ l.closed && (clearInterval(a), m?.(new Error("Login cancelled")));
157
+ }, 1e3), s = (n) => {
158
+ n.origin === window.location.origin && (n.data.type === "SOCIAL_LOGIN_SUCCESS" ? (clearInterval(a), l.close(), window.removeEventListener("message", s), c?.(n.data.result)) : n.data.type === "SOCIAL_LOGIN_ERROR" && (clearInterval(a), l.close(), window.removeEventListener("message", s), m?.(new Error(n.data.error))));
159
159
  };
160
160
  window.addEventListener("message", s);
161
161
  }
162
- function Ae(e) {
162
+ function ze(e) {
163
163
  return e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e ? String(e.message) : "An unexpected error occurred";
164
164
  }
165
- function Ce() {
165
+ function Ee() {
166
166
  return typeof window < "u" && typeof document < "u";
167
167
  }
168
- function H({
168
+ function X({
169
169
  task: e,
170
170
  message: o,
171
- onStart: i,
171
+ onStart: c,
172
172
  onEnd: m
173
173
  }) {
174
- return async (c) => {
175
- i?.();
176
- const n = await ce({
177
- task: e != null ? () => e(c) : async () => null,
174
+ return async (l) => {
175
+ c?.();
176
+ const a = await me({
177
+ task: e != null ? () => e(l) : async () => null,
178
178
  errorMessage: o,
179
179
  errorPath: ["root"],
180
- validation: (s) => s != null ? K.invalid({ message: s }) : K.valid
180
+ validation: (s) => s != null ? ee.invalid({ message: s }) : ee.valid
181
181
  });
182
- return m?.(), n;
182
+ return m?.(), a;
183
183
  };
184
184
  }
185
- function j(e = B) {
185
+ function Y(e = B) {
186
186
  let o = I();
187
187
  return e.minLength && (o = o.min(
188
188
  e.minLength,
@@ -199,56 +199,56 @@ function j(e = B) {
199
199
  )), e.requireSymbols && (o = o.regex(
200
200
  /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/,
201
201
  "Password must contain at least one special character"
202
- )), e.customValidation && (o = o.refine((i) => e.customValidation(i))), o;
202
+ )), e.customValidation && (o = o.refine((c) => e.customValidation(c))), o;
203
203
  }
204
204
  const V = I().min(1, "Email is required").email("Please enter a valid email address");
205
- function X(e) {
206
- const o = e ? j(e) : I().refine(
207
- (i) => i.length > 0 ? null : "Password is required"
205
+ function Z(e) {
206
+ const o = e ? Y(e) : I().refine(
207
+ (c) => c.length > 0 ? null : "Password is required"
208
208
  );
209
- return G({
209
+ return H({
210
210
  email: V,
211
211
  password: o,
212
212
  rememberMe: D().default(!1)
213
213
  }).schema();
214
214
  }
215
- function Y(e = B, o) {
216
- const i = j(e), m = o?.showNameField !== !1, c = o?.showConfirmPassword !== !1, n = o?.showAcceptTermsAndConditions !== !1, s = {
215
+ function J(e = B, o) {
216
+ const c = Y(e), m = o?.showNameField !== !1, l = o?.showConfirmPassword !== !1, a = o?.showAcceptTermsAndConditions !== !1, s = {
217
217
  name: m ? I().min(1, "Name is required").optional() : I().optional(),
218
218
  email: V,
219
- password: i,
219
+ password: c,
220
220
  // Always require confirmPassword as string to match SignUpData interface
221
221
  // When not shown, it should accept any value (including empty string)
222
- confirmPassword: c ? I().min(1, "Please confirm your password") : I(),
222
+ confirmPassword: l ? I().min(1, "Please confirm your password") : I(),
223
223
  // Accept any string value when not shown
224
- acceptTerms: n ? D().refine(
224
+ acceptTerms: a ? D().refine(
225
225
  (u) => u === !0,
226
226
  "You must accept the terms and conditions"
227
227
  ) : D().default(!0)
228
228
  // Default to true when not shown
229
- }, a = G(s);
230
- return c ? a.refine(
229
+ }, n = H(s);
230
+ return l ? n.refine(
231
231
  (u) => u.password === u.confirmPassword ? null : "Passwords don't match",
232
232
  { path: ["confirmPassword"] }
233
- ).schema() : a.schema();
233
+ ).schema() : n.schema();
234
234
  }
235
- const te = G({
235
+ const ne = H({
236
236
  email: V
237
- }).schema(), ze = X(), Ee = Y(), Ue = {
238
- signIn: X,
239
- signUp: Y,
240
- resetPassword: () => te
237
+ }).schema(), Ue = Z(), Oe = J(), Ve = {
238
+ signIn: Z,
239
+ signUp: J,
240
+ resetPassword: () => ne
241
241
  };
242
- function Oe(e) {
242
+ function Fe(e) {
243
243
  const o = V.validate(e);
244
244
  return o.success ? null : o.errors[0]?.message || "Invalid email";
245
245
  }
246
- function Ve(e, o = B) {
247
- const m = j(o).validate(e);
246
+ function Me(e, o = B) {
247
+ const m = Y(o).validate(e);
248
248
  return m.success ? null : m.errors[0]?.message || "Invalid password";
249
249
  }
250
- function Z(e, o = B) {
251
- const i = {
250
+ function K(e, o = B) {
251
+ const c = {
252
252
  length: e.length >= (o.minLength || 8),
253
253
  uppercase: /[A-Z]/.test(e),
254
254
  lowercase: /[a-z]/.test(e),
@@ -264,87 +264,91 @@ function Z(e, o = B) {
264
264
  o.requireNumbers,
265
265
  o.requireSymbols,
266
266
  !!o.customValidation
267
- ].filter(Boolean).length, c = [
268
- i.length,
269
- o.requireUppercase ? i.uppercase : null,
270
- o.requireLowercase ? i.lowercase : null,
271
- o.requireNumbers ? i.numbers : null,
272
- o.requireSymbols ? i.symbols : null,
273
- o.customValidation ? i.custom : null
274
- ].filter((a) => a === !0).length, n = m > 0 ? Math.round(c / m * 100) : 0;
267
+ ].filter(Boolean).length, l = [
268
+ c.length,
269
+ o.requireUppercase ? c.uppercase : null,
270
+ o.requireLowercase ? c.lowercase : null,
271
+ o.requireNumbers ? c.numbers : null,
272
+ o.requireSymbols ? c.symbols : null,
273
+ o.customValidation ? c.custom : null
274
+ ].filter((n) => n === !0).length, a = m > 0 ? Math.round(l / m * 100) : 0;
275
275
  let s;
276
- return n < 40 ? s = "weak" : n < 60 ? s = "fair" : n < 80 ? s = "good" : s = "strong", { strength: s, score: n, checks: i };
276
+ return a < 40 ? s = "weak" : a < 60 ? s = "fair" : a < 80 ? s = "good" : s = "strong", { strength: s, score: a, checks: c };
277
277
  }
278
- const se = () => ae({
278
+ const ae = () => re({
279
279
  key: "bui_auth_email",
280
280
  defaultValue: null
281
281
  });
282
- function ge({
282
+ function be({
283
283
  onSignIn: e,
284
284
  passwordRules: o,
285
- labels: i,
285
+ labels: c,
286
286
  showRememberMe: m
287
287
  }) {
288
- const c = E(!1), n = se(), s = X(o), a = R({
288
+ const l = E(!1), a = ae(), s = Z(o), n = R({
289
289
  schema: s,
290
- onSubmit: H({
291
- task: e != null ? (h) => e({
292
- email: h.email,
293
- password: h.password
294
- }) : void 0,
290
+ onSubmit: X({
291
+ task: e,
295
292
  message: "Reset password failed",
296
293
  onStart: () => {
297
- c.set(!0), a.controller.disable();
294
+ l.set(!0), n.controller.disable();
298
295
  },
299
296
  onEnd: () => {
300
- c.set(!1), a.controller.enable();
297
+ l.set(!1), n.controller.enable();
301
298
  }
302
299
  }),
303
300
  initialValue: {
304
301
  email: "",
305
302
  password: ""
306
303
  }
307
- }), { controller: u, submit: r } = a;
308
- c.on(u.setDisabled);
309
- const b = u.field("email"), w = u.field("password");
310
- return n.on((h) => {
311
- h != null && b.change(h);
312
- }), b.value.on((h) => {
313
- n.value != null && (n.value = h);
304
+ }), { controller: u, submit: r } = n;
305
+ l.on(u.setDisabled);
306
+ const w = u.field("email"), _ = u.field("password");
307
+ return a.on((g) => {
308
+ g != null && w.change(g);
309
+ }), w.value.on((g) => {
310
+ a.value != null && (a.value = g);
314
311
  }), P(
315
312
  x,
316
- (h) => (
313
+ (g) => (
317
314
  // Email/Password form
318
- l.form(
319
- U(u.dispose, n.dispose, c.dispose),
315
+ i.form(
316
+ U(u.dispose, a.dispose, l.dispose),
320
317
  t.class("bc-auth-form__form"),
321
318
  T.submit(r),
322
319
  q(
323
320
  t.class("bc-auth-form__fields"),
321
+ N(
322
+ u.error,
323
+ (b) => G(
324
+ { variant: "danger", tone: "prominent", role: "alert" },
325
+ i.div(b)
326
+ )
327
+ ),
324
328
  // Email field
325
329
  $(W, {
326
- controller: b,
327
- label: g(i?.emailLabel, h.$.emailLabel)
330
+ controller: w,
331
+ label: h(c?.emailLabel, g.$.emailLabel)
328
332
  }),
329
333
  // Password field
330
334
  $(M, {
331
- controller: w,
332
- label: g(i?.passwordLabel, h.$.passwordLabel)
335
+ controller: _,
336
+ label: h(c?.passwordLabel, g.$.passwordLabel)
333
337
  }),
334
338
  // Remember me checkbox
335
- _(
339
+ L(
336
340
  m ?? !0,
337
- () => l.div(
341
+ () => i.div(
338
342
  t.class("bc-auth-form__remember-me"),
339
- l.label(
343
+ i.label(
340
344
  t.class("bc-auth-form__checkbox-label"),
341
- oe({
342
- value: n.map((L) => L != null),
343
- after: l.span(
344
- g(i?.rememberMeLabel, h.$.rememberMeLabel)
345
+ se({
346
+ value: a.map((b) => b != null),
347
+ after: i.span(
348
+ h(c?.rememberMeLabel, g.$.rememberMeLabel)
345
349
  ),
346
- onChange: (L) => {
347
- L ? n.value = b.value.value ?? "" : n.value = null;
350
+ onChange: (b) => {
351
+ b ? a.value = w.value.value ?? "" : a.value = null;
348
352
  }
349
353
  })
350
354
  )
@@ -357,23 +361,23 @@ function ge({
357
361
  type: "submit",
358
362
  variant: "filled",
359
363
  color: "primary",
360
- loading: c,
364
+ loading: l,
361
365
  disabled: u.disabledOrHasErrors
362
366
  },
363
367
  t.class("bc-auth-form__submit"),
364
- g(i?.signInButton, h.$.signInButton)
368
+ h(c?.signInButton, g.$.signInButton)
365
369
  )
366
370
  )
367
371
  )
368
372
  );
369
373
  }
370
- function fe({
374
+ function we({
371
375
  password: e,
372
376
  rules: o = B,
373
- showLabel: i = !0,
377
+ showLabel: c = !0,
374
378
  className: m
375
379
  }) {
376
- const c = f(e)((r) => !r || r.length === 0 ? {
380
+ const l = f(e)((r) => !r || r.length === 0 ? {
377
381
  strength: "weak",
378
382
  score: 0,
379
383
  checks: {
@@ -384,149 +388,149 @@ function fe({
384
388
  symbols: !1,
385
389
  custom: !1
386
390
  }
387
- } : Z(r, o)), n = c.map((r) => r.strength), s = c.map((r) => r.score), a = c.map((r) => r.checks), u = f(
388
- n,
391
+ } : K(r, o)), a = l.map((r) => r.strength), s = l.map((r) => r.score), n = l.map((r) => r.checks), u = f(
392
+ a,
389
393
  m
390
- )((r, b) => [
394
+ )((r, w) => [
391
395
  "bc-password-strength",
392
396
  `bc-password-strength--${r}`,
393
- b
397
+ w
394
398
  ].filter(Boolean).join(" "));
395
- return l.div(
399
+ return i.div(
396
400
  t.class(u),
397
401
  // Strength bar
398
- l.div(
402
+ i.div(
399
403
  t.class("bc-password-strength__bar"),
400
- l.div(
404
+ i.div(
401
405
  t.class("bc-password-strength__fill"),
402
406
  t.style(s.map((r) => `width: ${r}%`))
403
407
  )
404
408
  ),
405
409
  // Strength label (optional)
406
- _(
407
- i,
410
+ L(
411
+ c,
408
412
  () => P(
409
413
  x,
410
- (r) => l.div(
414
+ (r) => i.div(
411
415
  t.class("bc-password-strength__label"),
412
416
  f(
413
- n,
417
+ a,
414
418
  r
415
- )((b, w) => {
416
- switch (b) {
419
+ )((w, _) => {
420
+ switch (w) {
417
421
  case "weak":
418
- return w.passwordStrengthWeak;
422
+ return _.passwordStrengthWeak;
419
423
  case "fair":
420
- return w.passwordStrengthFair;
424
+ return _.passwordStrengthFair;
421
425
  case "good":
422
- return w.passwordStrengthGood;
426
+ return _.passwordStrengthGood;
423
427
  case "strong":
424
- return w.passwordStrengthStrong;
428
+ return _.passwordStrengthStrong;
425
429
  default:
426
- return w.passwordStrengthWeak;
430
+ return _.passwordStrengthWeak;
427
431
  }
428
432
  })
429
433
  )
430
434
  )
431
435
  ),
432
436
  // Requirements checklist
433
- l.div(
437
+ i.div(
434
438
  t.class("bc-password-strength__requirements"),
435
439
  // Length requirement
436
- _(
440
+ L(
437
441
  o.minLength !== void 0,
438
- () => l.div(
442
+ () => i.div(
439
443
  t.class("bc-password-strength__requirement"),
440
444
  t.class(
441
- f(a)(
445
+ f(n)(
442
446
  (r) => r.length ? "bc-password-strength__requirement--met" : ""
443
447
  )
444
448
  ),
445
- l.span(
449
+ i.span(
446
450
  t.class("bc-password-strength__requirement-icon"),
447
- f(a)((r) => r.length ? "✓" : "○")
451
+ f(n)((r) => r.length ? "✓" : "○")
448
452
  ),
449
- l.span(
453
+ i.span(
450
454
  t.class("bc-password-strength__requirement-text"),
451
455
  `At least ${o.minLength} characters`
452
456
  )
453
457
  )
454
458
  ),
455
459
  // Uppercase requirement
456
- _(
460
+ L(
457
461
  o.requireUppercase === !0,
458
- () => l.div(
462
+ () => i.div(
459
463
  t.class("bc-password-strength__requirement"),
460
464
  t.class(
461
- f(a)(
465
+ f(n)(
462
466
  (r) => r.uppercase ? "bc-password-strength__requirement--met" : ""
463
467
  )
464
468
  ),
465
- l.span(
469
+ i.span(
466
470
  t.class("bc-password-strength__requirement-icon"),
467
- f(a)((r) => r.uppercase ? "✓" : "○")
471
+ f(n)((r) => r.uppercase ? "✓" : "○")
468
472
  ),
469
- l.span(
473
+ i.span(
470
474
  t.class("bc-password-strength__requirement-text"),
471
475
  "One uppercase letter"
472
476
  )
473
477
  )
474
478
  ),
475
479
  // Lowercase requirement
476
- _(
480
+ L(
477
481
  o.requireLowercase === !0,
478
- () => l.div(
482
+ () => i.div(
479
483
  t.class("bc-password-strength__requirement"),
480
484
  t.class(
481
- f(a)(
485
+ f(n)(
482
486
  (r) => r.lowercase ? "bc-password-strength__requirement--met" : ""
483
487
  )
484
488
  ),
485
- l.span(
489
+ i.span(
486
490
  t.class("bc-password-strength__requirement-icon"),
487
- f(a)((r) => r.lowercase ? "✓" : "○")
491
+ f(n)((r) => r.lowercase ? "✓" : "○")
488
492
  ),
489
- l.span(
493
+ i.span(
490
494
  t.class("bc-password-strength__requirement-text"),
491
495
  "One lowercase letter"
492
496
  )
493
497
  )
494
498
  ),
495
499
  // Numbers requirement
496
- _(
500
+ L(
497
501
  o.requireNumbers === !0,
498
- () => l.div(
502
+ () => i.div(
499
503
  t.class("bc-password-strength__requirement"),
500
504
  t.class(
501
- f(a)(
505
+ f(n)(
502
506
  (r) => r.numbers ? "bc-password-strength__requirement--met" : ""
503
507
  )
504
508
  ),
505
- l.span(
509
+ i.span(
506
510
  t.class("bc-password-strength__requirement-icon"),
507
- f(a)((r) => r.numbers ? "✓" : "○")
511
+ f(n)((r) => r.numbers ? "✓" : "○")
508
512
  ),
509
- l.span(
513
+ i.span(
510
514
  t.class("bc-password-strength__requirement-text"),
511
515
  "One number"
512
516
  )
513
517
  )
514
518
  ),
515
519
  // Symbols requirement
516
- _(
520
+ L(
517
521
  o.requireSymbols === !0,
518
- () => l.div(
522
+ () => i.div(
519
523
  t.class("bc-password-strength__requirement"),
520
524
  t.class(
521
- f(a)(
525
+ f(n)(
522
526
  (r) => r.symbols ? "bc-password-strength__requirement--met" : ""
523
527
  )
524
528
  ),
525
- l.span(
529
+ i.span(
526
530
  t.class("bc-password-strength__requirement-icon"),
527
- f(a)((r) => r.symbols ? "✓" : "○")
531
+ f(n)((r) => r.symbols ? "✓" : "○")
528
532
  ),
529
- l.span(
533
+ i.span(
530
534
  t.class("bc-password-strength__requirement-text"),
531
535
  "One special character"
532
536
  )
@@ -535,92 +539,92 @@ function fe({
535
539
  )
536
540
  );
537
541
  }
538
- function Fe({
542
+ function De({
539
543
  password: e,
540
544
  rules: o = B,
541
- className: i
545
+ className: c
542
546
  }) {
543
- const m = f(e)((a) => !a || a.length === 0 ? { strength: "weak", score: 0 } : Z(a, o)), c = m.map((a) => a.strength), n = m.map((a) => a.score), s = f(
544
- c,
545
- i
546
- )((a, u) => [
547
+ const m = f(e)((n) => !n || n.length === 0 ? { strength: "weak", score: 0 } : K(n, o)), l = m.map((n) => n.strength), a = m.map((n) => n.score), s = f(
548
+ l,
549
+ c
550
+ )((n, u) => [
547
551
  "bc-password-strength-bar",
548
- `bc-password-strength-bar--${a}`,
552
+ `bc-password-strength-bar--${n}`,
549
553
  u
550
554
  ].filter(Boolean).join(" "));
551
- return l.div(
555
+ return i.div(
552
556
  t.class(s),
553
- l.div(
557
+ i.div(
554
558
  t.class("bc-password-strength-bar__fill"),
555
- t.style(n.map((a) => `width: ${a}%`))
559
+ t.style(a.map((n) => `width: ${n}%`))
556
560
  )
557
561
  );
558
562
  }
559
- function Me({
563
+ function Ne({
560
564
  password: e,
561
565
  rules: o = B,
562
- className: i
566
+ className: c
563
567
  }) {
564
- const m = f(e)((n) => !n || n.length === 0 ? "weak" : Z(n, o).strength), c = f(
568
+ const m = f(e)((a) => !a || a.length === 0 ? "weak" : K(a, o).strength), l = f(
565
569
  m,
566
- i
567
- )((n, s) => [
570
+ c
571
+ )((a, s) => [
568
572
  "bc-password-strength-text",
569
- `bc-password-strength-text--${n}`,
573
+ `bc-password-strength-text--${a}`,
570
574
  s
571
575
  ].filter(Boolean).join(" "));
572
576
  return P(
573
577
  x,
574
- (n) => l.span(
575
- t.class(c),
578
+ (a) => i.span(
579
+ t.class(l),
576
580
  f(
577
581
  m,
578
- n
579
- )((s, a) => {
582
+ a
583
+ )((s, n) => {
580
584
  switch (s) {
581
585
  case "weak":
582
- return a.passwordStrengthWeak;
586
+ return n.passwordStrengthWeak;
583
587
  case "fair":
584
- return a.passwordStrengthFair;
588
+ return n.passwordStrengthFair;
585
589
  case "good":
586
- return a.passwordStrengthGood;
590
+ return n.passwordStrengthGood;
587
591
  case "strong":
588
- return a.passwordStrengthStrong;
592
+ return n.passwordStrengthStrong;
589
593
  default:
590
- return a.passwordStrengthWeak;
594
+ return n.passwordStrengthWeak;
591
595
  }
592
596
  })
593
597
  )
594
598
  );
595
599
  }
596
- function be({
600
+ function _e({
597
601
  passwordRules: e,
598
602
  labels: o,
599
- showPasswordStrength: i,
603
+ showPasswordStrength: c,
600
604
  onSignUp: m,
601
- showNameField: c,
602
- showConfirmPassword: n,
605
+ showNameField: l,
606
+ showConfirmPassword: a,
603
607
  showAcceptTermsAndConditions: s,
604
- termsAndConditions: a
608
+ termsAndConditions: n
605
609
  }) {
606
- const u = E(!1), r = e || B, b = Y(r, {
607
- showNameField: c !== !1,
608
- showConfirmPassword: n !== !1,
610
+ const u = E(!1), r = e || B, w = J(r, {
611
+ showNameField: l !== !1,
612
+ showConfirmPassword: a !== !1,
609
613
  showAcceptTermsAndConditions: s !== !1
610
- }), w = R({
611
- schema: b,
612
- onSubmit: H({
613
- task: m != null ? (y) => m({
614
- email: y.email,
615
- password: y.password,
616
- name: y.name
614
+ }), _ = R({
615
+ schema: w,
616
+ onSubmit: X({
617
+ task: m != null ? (S) => m({
618
+ email: S.email,
619
+ password: S.password,
620
+ name: S.name
617
621
  }) : void 0,
618
622
  message: "Reset password failed",
619
623
  onStart: () => {
620
- u.set(!0), w.controller.disable();
624
+ u.set(!0), _.controller.disable();
621
625
  },
622
626
  onEnd: () => {
623
- u.set(!1), w.controller.enable();
627
+ u.set(!1), _.controller.enable();
624
628
  }
625
629
  }),
626
630
  initialValue: {
@@ -630,80 +634,87 @@ function be({
630
634
  confirmPassword: "",
631
635
  acceptTerms: !1
632
636
  }
633
- }), { controller: h, submit: L } = w;
634
- u.on(h.setDisabled);
635
- const k = h.field("name"), C = h.field("email"), z = h.field("password"), F = h.field("confirmPassword"), v = h.field("acceptTerms");
637
+ }), { controller: g, submit: b } = _;
638
+ u.on(g.setDisabled);
639
+ const k = g.field("name"), C = g.field("email"), z = g.field("password"), F = g.field("confirmPassword"), y = g.field("acceptTerms");
636
640
  return P(
637
641
  x,
638
- (y) => (
642
+ (S) => (
639
643
  // Registration form
640
- l.form(
641
- U(h.dispose, u.dispose),
644
+ i.form(
645
+ U(g.dispose, u.dispose),
642
646
  t.class("bc-auth-form__form"),
643
- T.submit(L),
647
+ T.submit(b),
644
648
  q(
645
649
  t.class("bc-auth-form__fields"),
650
+ N(
651
+ g.error,
652
+ (v) => G(
653
+ { variant: "danger", tone: "prominent", role: "alert" },
654
+ i.div(v)
655
+ )
656
+ ),
646
657
  // Name field (optional)
647
- _(
648
- c !== !1,
649
- () => $(le, {
658
+ L(
659
+ l !== !1,
660
+ () => $(ue, {
650
661
  controller: k.transform(
651
- (S) => S ?? "",
652
- (S) => S === "" ? void 0 : S
662
+ (v) => v ?? "",
663
+ (v) => v === "" ? void 0 : v
653
664
  ),
654
- label: g(o?.nameLabel, y.$.nameLabel)
665
+ label: h(o?.nameLabel, S.$.nameLabel)
655
666
  })
656
667
  ),
657
668
  // Email field
658
669
  $(W, {
659
670
  controller: C,
660
- label: g(o?.emailLabel, y.$.emailLabel)
671
+ label: h(o?.emailLabel, S.$.emailLabel)
661
672
  }),
662
673
  // Password field
663
674
  $(M, {
664
675
  controller: z,
665
- label: g(o?.passwordLabel, y.$.passwordLabel)
676
+ label: h(o?.passwordLabel, S.$.passwordLabel)
666
677
  }),
667
678
  // Password strength indicator
668
- _(
669
- i ?? !1,
670
- () => fe({
679
+ L(
680
+ c ?? !1,
681
+ () => we({
671
682
  password: z.value,
672
683
  rules: r,
673
684
  showLabel: !0
674
685
  })
675
686
  ),
676
687
  // Confirm password field
677
- _(
678
- n ?? !1,
688
+ L(
689
+ a ?? !1,
679
690
  () => $(M, {
680
691
  controller: F,
681
- label: g(
692
+ label: h(
682
693
  o?.confirmPasswordLabel,
683
- y.$.confirmPasswordLabel
694
+ S.$.confirmPasswordLabel
684
695
  )
685
696
  })
686
697
  ),
687
698
  // Terms acceptance checkbox
688
- _(
699
+ L(
689
700
  s ?? !1,
690
- () => l.div(
701
+ () => i.div(
691
702
  t.class("bc-auth-form__terms"),
692
- l.label(
703
+ i.label(
693
704
  t.class("bc-auth-form__checkbox-label"),
694
- oe({
695
- value: v.value.map((S) => S ?? !1),
696
- onChange: (S) => v.change(S)
705
+ se({
706
+ value: y.value.map((v) => v ?? !1),
707
+ onChange: (v) => y.change(v)
697
708
  }),
698
- l.span(
699
- a || g(o?.acceptTermsLabel, y.$.acceptTermsLabel)
709
+ i.span(
710
+ n || h(o?.acceptTermsLabel, S.$.acceptTermsLabel)
700
711
  )
701
712
  ),
702
- _(
703
- v.errorVisible,
704
- () => l.div(
713
+ L(
714
+ y.errorVisible,
715
+ () => i.div(
705
716
  t.class("bc-auth-form__field-error"),
706
- v.error.map((S) => S || "")
717
+ y.error.map((v) => v || "")
707
718
  )
708
719
  )
709
720
  )
@@ -716,58 +727,65 @@ function be({
716
727
  variant: "filled",
717
728
  color: "primary",
718
729
  loading: u,
719
- disabled: h.disabledOrHasErrors
730
+ disabled: g.disabledOrHasErrors
720
731
  },
721
732
  t.class("bc-auth-form__submit"),
722
- g(o?.signUpButton, y.$.signUpButton)
733
+ h(o?.signUpButton, S.$.signUpButton)
723
734
  )
724
735
  )
725
736
  )
726
737
  );
727
738
  }
728
- function we({
739
+ function Le({
729
740
  onResetPassword: e,
730
741
  labels: o = {}
731
742
  }) {
732
- const i = se(), m = E(!1), c = R({
733
- schema: te,
734
- onSubmit: H({
743
+ const c = ae(), m = E(!1), l = R({
744
+ schema: ne,
745
+ onSubmit: X({
735
746
  task: e,
736
747
  message: "Reset password failed",
737
748
  onStart: () => {
738
- m.set(!0), c.controller.disable();
749
+ m.set(!0), l.controller.disable();
739
750
  },
740
751
  onEnd: () => {
741
- m.set(!1), c.controller.enable();
752
+ m.set(!1), l.controller.enable();
742
753
  }
743
754
  }),
744
755
  initialValue: {
745
756
  email: ""
746
757
  }
747
- }), { controller: n, submit: s } = c;
748
- m.on(n.setDisabled);
749
- const a = n.field("email");
750
- return i.on((u) => {
751
- u != null && a.change(u);
758
+ }), { controller: a, submit: s } = l;
759
+ m.on(a.setDisabled);
760
+ const n = a.field("email");
761
+ return c.on((u) => {
762
+ u != null && n.change(u);
752
763
  }), P(
753
764
  x,
754
765
  (u) => (
755
766
  // Reset password form
756
- l.form(
757
- U(n.dispose, i.dispose, m.dispose),
767
+ i.form(
768
+ U(a.dispose, c.dispose, m.dispose),
758
769
  t.class("bc-auth-form__form"),
770
+ N(
771
+ a.error,
772
+ (r) => G(
773
+ { variant: "danger", tone: "prominent", role: "alert" },
774
+ i.div(r)
775
+ )
776
+ ),
759
777
  // Description
760
- l.p(
778
+ i.p(
761
779
  t.class("bc-auth-form__description"),
762
- g(o?.resetPasswordDescription, u.$.resetPasswordDescription)
780
+ h(o?.resetPasswordDescription, u.$.resetPasswordDescription)
763
781
  ),
764
782
  T.submit(s),
765
783
  q(
766
784
  t.class("bc-auth-form__fields"),
767
785
  // Email field
768
786
  $(W, {
769
- controller: a,
770
- label: g(o?.emailLabel, u.$.emailLabel)
787
+ controller: n,
788
+ label: h(o?.emailLabel, u.$.emailLabel)
771
789
  })
772
790
  ),
773
791
  // Submit button
@@ -777,10 +795,10 @@ function we({
777
795
  type: "submit",
778
796
  variant: "filled",
779
797
  color: "primary",
780
- disabled: n.disabledOrHasErrors
798
+ disabled: a.disabledOrHasErrors
781
799
  },
782
800
  t.class("bc-auth-form__submit"),
783
- g(o?.resetPasswordButton, u.$.resetPasswordButton)
801
+ h(o?.resetPasswordButton, u.$.resetPasswordButton)
784
802
  )
785
803
  )
786
804
  )
@@ -789,19 +807,19 @@ function we({
789
807
  function p({
790
808
  provider: e,
791
809
  onClick: o,
792
- size: i = "md",
810
+ size: c = "md",
793
811
  name: m,
794
- icon: c,
795
- color: n,
812
+ icon: l,
813
+ color: a,
796
814
  flow: s,
797
- labels: a
815
+ labels: n
798
816
  }) {
799
817
  return O(
800
818
  {
801
819
  type: "button",
802
820
  variant: "filled",
803
- size: i,
804
- color: n,
821
+ size: c,
822
+ color: a,
805
823
  onClick: async () => {
806
824
  if (o)
807
825
  try {
@@ -819,47 +837,47 @@ function p({
819
837
  t.class(
820
838
  f(e)((r) => `bc-social-login-button--${r}`)
821
839
  ),
822
- l.span(
840
+ i.span(
823
841
  t.class("bc-social-login-button__inner"),
824
- l.span(
842
+ i.span(
825
843
  t.class("bc-social-login-button__icon"),
826
- me({ icon: c, size: i }, t.class("bc-social-login-button__icon-inner"))
844
+ de({ icon: l, size: c }, t.class("bc-social-login-button__icon-inner"))
827
845
  ),
828
846
  P(
829
847
  x,
830
- (r) => l.span(
848
+ (r) => i.span(
831
849
  t.class("bc-social-login-button__label"),
832
- ne(
833
- g(a?.continueWithProvider, r.$.continueWithProvider)
850
+ ie(
851
+ h(n?.continueWithProvider, r.$.continueWithProvider)
834
852
  )(m)
835
853
  )
836
854
  )
837
855
  )
838
856
  );
839
857
  }
840
- function _e({
858
+ function ve({
841
859
  providers: e,
842
860
  onProviderClick: o,
843
- size: i = "md",
861
+ size: c = "md",
844
862
  className: m
845
863
  }) {
846
864
  return q(
847
865
  t.class("bc-social-login-buttons"),
848
866
  t.class(m),
849
- re(
867
+ ce(
850
868
  e,
851
- (c) => p({
852
- provider: c.$.provider,
853
- flow: c.$.flow,
854
- color: c.map(
855
- ({ provider: n }) => d[n].color
869
+ (l) => p({
870
+ provider: l.$.provider,
871
+ flow: l.$.flow,
872
+ color: l.map(
873
+ ({ provider: a }) => d[a].color
856
874
  ),
857
- name: c.map(({ provider: n }) => d[n].name),
858
- icon: c.map(({ provider: n }) => d[n].icon),
875
+ name: l.map(({ provider: a }) => d[a].name),
876
+ icon: l.map(({ provider: a }) => d[a].icon),
859
877
  onClick: async () => {
860
- o && await o(c.$.provider.value);
878
+ o && await o(l.$.provider.value);
861
879
  },
862
- size: i
880
+ size: c
863
881
  })
864
882
  )
865
883
  );
@@ -995,174 +1013,174 @@ const d = {
995
1013
  color: "blue"
996
1014
  // distinct deep blue tone (not Facebook’s exact blue)
997
1015
  }
998
- }, De = (e) => p({
1016
+ }, Re = (e) => p({
999
1017
  ...e,
1000
1018
  ...d.google,
1001
1019
  provider: "google"
1002
- }), Re = (e) => p({
1020
+ }), We = (e) => p({
1003
1021
  ...e,
1004
1022
  ...d.github,
1005
1023
  provider: "github"
1006
- }), We = (e) => p({
1024
+ }), Ge = (e) => p({
1007
1025
  ...e,
1008
1026
  ...d.apple,
1009
1027
  provider: "apple"
1010
- }), Ge = (e) => p({
1028
+ }), He = (e) => p({
1011
1029
  ...e,
1012
1030
  ...d.facebook,
1013
1031
  provider: "facebook"
1014
- }), Ne = (e) => p({
1032
+ }), je = (e) => p({
1015
1033
  ...e,
1016
1034
  ...d.x,
1017
1035
  provider: "x"
1018
- }), He = (e) => p({
1036
+ }), Xe = (e) => p({
1019
1037
  ...e,
1020
1038
  ...d.twitter,
1021
1039
  provider: "twitter"
1022
- }), je = (e) => p({
1040
+ }), Ye = (e) => p({
1023
1041
  ...e,
1024
1042
  ...d.microsoft,
1025
1043
  provider: "microsoft"
1026
- }), Xe = (e) => p({
1044
+ }), Ze = (e) => p({
1027
1045
  ...e,
1028
1046
  ...d.discord,
1029
1047
  provider: "discord"
1030
- }), Ye = (e) => p({
1048
+ }), Je = (e) => p({
1031
1049
  ...e,
1032
1050
  ...d.linkedin,
1033
1051
  provider: "linkedin"
1034
- }), Ze = (e) => p({
1052
+ }), Ke = (e) => p({
1035
1053
  ...e,
1036
1054
  ...d.instagram,
1037
1055
  provider: "instagram"
1038
- }), Je = (e) => p({
1056
+ }), Qe = (e) => p({
1039
1057
  ...e,
1040
1058
  ...d.tiktok,
1041
1059
  provider: "tiktok"
1042
- }), Ke = (e) => p({
1060
+ }), eo = (e) => p({
1043
1061
  ...e,
1044
1062
  ...d.snapchat,
1045
1063
  provider: "snapchat"
1046
- }), Qe = (e) => p({
1064
+ }), oo = (e) => p({
1047
1065
  ...e,
1048
1066
  ...d.reddit,
1049
1067
  provider: "reddit"
1050
- }), eo = (e) => p({
1068
+ }), to = (e) => p({
1051
1069
  ...e,
1052
1070
  ...d.pinterest,
1053
1071
  provider: "pinterest"
1054
- }), oo = (e) => p({
1072
+ }), so = (e) => p({
1055
1073
  ...e,
1056
1074
  ...d.twitch,
1057
1075
  provider: "twitch"
1058
- }), to = (e) => p({
1076
+ }), no = (e) => p({
1059
1077
  ...e,
1060
1078
  ...d.steam,
1061
1079
  provider: "steam"
1062
- }), so = (e) => p({
1080
+ }), ao = (e) => p({
1063
1081
  ...e,
1064
1082
  ...d.epic,
1065
1083
  provider: "epic"
1066
- }), ao = (e) => p({
1084
+ }), ro = (e) => p({
1067
1085
  ...e,
1068
1086
  ...d.playstation,
1069
1087
  provider: "playstation"
1070
- }), no = (e) => p({
1088
+ }), io = (e) => p({
1071
1089
  ...e,
1072
1090
  ...d.xbox,
1073
1091
  provider: "xbox"
1074
- }), ro = (e) => p({
1092
+ }), co = (e) => p({
1075
1093
  ...e,
1076
1094
  ...d.whatsapp,
1077
1095
  provider: "whatsapp"
1078
- }), io = (e) => p({
1096
+ }), lo = (e) => p({
1079
1097
  ...e,
1080
1098
  ...d.wechat,
1081
1099
  provider: "wechat"
1082
- }), co = (e) => p({
1100
+ }), mo = (e) => p({
1083
1101
  ...e,
1084
1102
  ...d.amazon,
1085
1103
  provider: "amazon"
1086
- }), lo = (e) => p({
1104
+ }), uo = (e) => p({
1087
1105
  ...e,
1088
1106
  ...d.yahoo,
1089
1107
  provider: "yahoo"
1090
- }), mo = (e) => p({
1108
+ }), po = (e) => p({
1091
1109
  ...e,
1092
1110
  ...d.paypal,
1093
1111
  provider: "paypal"
1094
1112
  });
1095
- function Q({ providers: e }) {
1113
+ function oe({ providers: e }) {
1096
1114
  return q(
1097
- _e({
1115
+ ve({
1098
1116
  providers: e
1099
1117
  })
1100
1118
  );
1101
1119
  }
1102
- function Le({
1120
+ function ke({
1103
1121
  mode: e,
1104
1122
  socialProviders: o,
1105
- passwordRules: i,
1123
+ passwordRules: c,
1106
1124
  showRememberMe: m,
1107
- showSocialDivider: c,
1108
- showPasswordStrength: n,
1125
+ showSocialDivider: l,
1126
+ showPasswordStrength: a,
1109
1127
  labels: s,
1110
- onSignIn: a,
1128
+ onSignIn: n,
1111
1129
  onSignUp: u,
1112
1130
  onResetPassword: r,
1113
- onModeChange: b,
1131
+ onModeChange: w,
1114
1132
  // onSocialLogin,
1115
- showContainer: w
1116
- }, ...h) {
1117
- const L = e != null ? J.deriveProp(e) : E("signin");
1118
- return L.on((k) => b?.(k)), P(x, (k) => {
1133
+ showContainer: _
1134
+ }, ...g) {
1135
+ const b = e != null ? Q.deriveProp(e) : E("signin");
1136
+ return b.on((k) => w?.(k)), P(x, (k) => {
1119
1137
  function C() {
1120
- const v = g(s?.hasAccountLink, k.$.hasAccountLink);
1121
- return l.button(
1138
+ const y = h(s?.hasAccountLink, k.$.hasAccountLink);
1139
+ return i.button(
1122
1140
  t.type("button"),
1123
1141
  t.class("bc-auth-form__link"),
1124
- T.click(() => L.set("signin")),
1125
- v
1142
+ T.click(() => b.set("signin")),
1143
+ y
1126
1144
  );
1127
1145
  }
1128
1146
  function z() {
1129
- return l.button(
1147
+ return i.button(
1130
1148
  t.type("button"),
1131
1149
  t.class("bc-auth-form__link"),
1132
- T.click(() => L.set("signup")),
1133
- g(s?.noAccountLink, k.$.noAccountLink)
1150
+ T.click(() => b.set("signup")),
1151
+ h(s?.noAccountLink, k.$.noAccountLink)
1134
1152
  );
1135
1153
  }
1136
1154
  function F() {
1137
- return l.button(
1155
+ return i.button(
1138
1156
  t.type("button"),
1139
1157
  t.class("bc-auth-form__link"),
1140
- T.click(() => L.set("reset-password")),
1141
- g(s?.forgotPasswordLink, k.$.forgotPasswordLink)
1158
+ T.click(() => b.set("reset-password")),
1159
+ h(s?.forgotPasswordLink, k.$.forgotPasswordLink)
1142
1160
  );
1143
1161
  }
1144
- return l.div(
1145
- de({
1162
+ return i.div(
1163
+ he({
1146
1164
  "bc-auth-container": !0,
1147
- "bc-auth-container--styled": J.map(w ?? !0, (v) => v)
1165
+ "bc-auth-container--styled": Q.map(_ ?? !0, (y) => y)
1148
1166
  }),
1149
- t.class(L.map((v) => `bc-auth-container--${v}`)),
1167
+ t.class(b.map((y) => `bc-auth-container--${y}`)),
1150
1168
  t.class("bc-auth-form"),
1151
- U(L.dispose),
1152
- ie(L, {
1169
+ U(b.dispose),
1170
+ le(b, {
1153
1171
  signin: () => A(
1154
- l.h2(
1172
+ i.h2(
1155
1173
  t.class("bc-auth-form__title"),
1156
- g(s?.signInTitle, k.$.signInTitle)
1174
+ h(s?.signInTitle, k.$.signInTitle)
1157
1175
  ),
1158
1176
  o != null ? A(
1159
- Q({ providers: o }),
1160
- _(c ?? !1, ee)
1177
+ oe({ providers: o }),
1178
+ L(l ?? !1, te)
1161
1179
  ) : null,
1162
- ge({
1163
- onSignIn: a,
1180
+ be({
1181
+ onSignIn: n,
1164
1182
  showRememberMe: m,
1165
- passwordRules: i,
1183
+ passwordRules: c,
1166
1184
  labels: {
1167
1185
  emailLabel: s?.emailLabel,
1168
1186
  passwordLabel: s?.passwordLabel,
@@ -1179,15 +1197,15 @@ function Le({
1179
1197
  )
1180
1198
  ),
1181
1199
  signup: () => A(
1182
- l.h2(
1200
+ i.h2(
1183
1201
  t.class("bc-auth-form__title"),
1184
- g(s?.signUpTitle, k.$.signUpTitle)
1202
+ h(s?.signUpTitle, k.$.signUpTitle)
1185
1203
  ),
1186
1204
  o != null ? A(
1187
- Q({ providers: o }),
1188
- _(c ?? !1, ee)
1205
+ oe({ providers: o }),
1206
+ L(l ?? !1, te)
1189
1207
  ) : null,
1190
- be({
1208
+ _e({
1191
1209
  labels: {
1192
1210
  nameLabel: s?.nameLabel,
1193
1211
  emailLabel: s?.emailLabel,
@@ -1198,17 +1216,17 @@ function Le({
1198
1216
  hasAccountLink: s?.hasAccountLink
1199
1217
  },
1200
1218
  onSignUp: u,
1201
- passwordRules: i,
1202
- showPasswordStrength: n
1219
+ passwordRules: c,
1220
+ showPasswordStrength: a
1203
1221
  }),
1204
1222
  q(t.class("bc-auth-form__footer"), C())
1205
1223
  ),
1206
1224
  "reset-password": () => A(
1207
- l.h2(
1225
+ i.h2(
1208
1226
  t.class("bc-auth-form__title"),
1209
- g(s?.resetPasswordTitle, k.$.resetPasswordTitle)
1227
+ h(s?.resetPasswordTitle, k.$.resetPasswordTitle)
1210
1228
  ),
1211
- we({
1229
+ Le({
1212
1230
  labels: {
1213
1231
  backToSignInLink: s?.backToSignInLink,
1214
1232
  emailLabel: s?.emailLabel,
@@ -1220,107 +1238,107 @@ function Le({
1220
1238
  q(t.class("bc-auth-form__footer"), C())
1221
1239
  )
1222
1240
  }),
1223
- ...h
1241
+ ...g
1224
1242
  );
1225
1243
  });
1226
1244
  }
1227
- function uo(e) {
1228
- return ue(
1245
+ function ho(e) {
1246
+ return pe(
1229
1247
  {
1230
1248
  size: "sm",
1231
1249
  dismissable: !0,
1232
1250
  showCloseButton: !0
1233
1251
  },
1234
- (o, i) => e(
1252
+ (o, c) => e(
1235
1253
  (m) => o({
1236
- body: Le({ showContainer: !1, ...m }),
1254
+ body: ke({ showContainer: !1, ...m }),
1237
1255
  header: P(
1238
1256
  x,
1239
- (c) => g(m.modalTitle, c.$.authenticationTitle)
1257
+ (l) => h(m.modalTitle, l.$.authenticationTitle)
1240
1258
  )
1241
1259
  })
1242
1260
  )
1243
1261
  );
1244
1262
  }
1245
- function ee({
1263
+ function te({
1246
1264
  labels: e,
1247
1265
  className: o
1248
1266
  } = {}) {
1249
- return l.div(
1267
+ return i.div(
1250
1268
  t.class("bc-auth-divider"),
1251
1269
  t.class(o),
1252
- l.div(t.class("bc-auth-divider__line")),
1270
+ i.div(t.class("bc-auth-divider__line")),
1253
1271
  P(
1254
1272
  x,
1255
- (i) => l.span(
1273
+ (c) => i.span(
1256
1274
  t.class("bc-auth-divider__text"),
1257
- g(e?.text, i.$.orDivider)
1275
+ h(e?.text, c.$.orDivider)
1258
1276
  )
1259
1277
  ),
1260
- l.div(t.class("bc-auth-divider__line"))
1278
+ i.div(t.class("bc-auth-divider__line"))
1261
1279
  );
1262
1280
  }
1263
1281
  export {
1264
- co as AmazonLoginButton,
1265
- We as AppleLoginButton,
1266
- Le as AuthContainer,
1267
- ee as AuthDivider,
1268
- uo as AuthModal,
1269
- Xe as DiscordLoginButton,
1270
- so as EpicLoginButton,
1271
- Ge as FacebookLoginButton,
1272
- Re as GitHubLoginButton,
1273
- De as GoogleLoginButton,
1274
- Ze as InstagramLoginButton,
1275
- Ye as LinkedInLoginButton,
1276
- je as MicrosoftLoginButton,
1277
- Fe as PasswordStrengthBar,
1278
- fe as PasswordStrengthIndicator,
1279
- Me as PasswordStrengthText,
1280
- mo as PayPalLoginButton,
1281
- eo as PinterestLoginButton,
1282
- ao as PlayStationLoginButton,
1283
- Qe as RedditLoginButton,
1284
- we as ResetPasswordForm,
1285
- ge as SignInForm,
1286
- be as SignUpForm,
1287
- Ke as SnapchatLoginButton,
1282
+ mo as AmazonLoginButton,
1283
+ Ge as AppleLoginButton,
1284
+ ke as AuthContainer,
1285
+ te as AuthDivider,
1286
+ ho as AuthModal,
1287
+ Ze as DiscordLoginButton,
1288
+ ao as EpicLoginButton,
1289
+ He as FacebookLoginButton,
1290
+ We as GitHubLoginButton,
1291
+ Re as GoogleLoginButton,
1292
+ Ke as InstagramLoginButton,
1293
+ Je as LinkedInLoginButton,
1294
+ Ye as MicrosoftLoginButton,
1295
+ De as PasswordStrengthBar,
1296
+ we as PasswordStrengthIndicator,
1297
+ Ne as PasswordStrengthText,
1298
+ po as PayPalLoginButton,
1299
+ to as PinterestLoginButton,
1300
+ ro as PlayStationLoginButton,
1301
+ oo as RedditLoginButton,
1302
+ Le as ResetPasswordForm,
1303
+ be as SignInForm,
1304
+ _e as SignUpForm,
1305
+ eo as SnapchatLoginButton,
1288
1306
  p as SocialLoginButton,
1289
- _e as SocialLoginButtons,
1290
- Q as SocialProviders,
1291
- to as SteamLoginButton,
1292
- Je as TiktokLoginButton,
1293
- oo as TwitchLoginButton,
1294
- He as TwitterLoginButton,
1295
- io as WeChatLoginButton,
1296
- ro as WhatsAppLoginButton,
1297
- Ne as XLoginButtin,
1298
- no as XboxLoginButton,
1299
- lo as YahooLoginButton,
1300
- Ue as authSchemas,
1301
- Z as calculatePasswordStrength,
1302
- j as createPasswordSchema,
1303
- X as createSignInSchema,
1304
- Y as createSignUpSchema,
1305
- Ie as createSocialLoginUrl,
1307
+ ve as SocialLoginButtons,
1308
+ oe as SocialProviders,
1309
+ no as SteamLoginButton,
1310
+ Qe as TiktokLoginButton,
1311
+ so as TwitchLoginButton,
1312
+ Xe as TwitterLoginButton,
1313
+ lo as WeChatLoginButton,
1314
+ co as WhatsAppLoginButton,
1315
+ je as XLoginButtin,
1316
+ io as XboxLoginButton,
1317
+ uo as YahooLoginButton,
1318
+ Ve as authSchemas,
1319
+ K as calculatePasswordStrength,
1320
+ Y as createPasswordSchema,
1321
+ Z as createSignInSchema,
1322
+ J as createSignUpSchema,
1323
+ Ae as createSocialLoginUrl,
1306
1324
  B as defaultPasswordRules,
1307
- ze as defaultSignInSchema,
1308
- Ee as defaultSignUpSchema,
1325
+ Ue as defaultSignInSchema,
1326
+ Oe as defaultSignUpSchema,
1309
1327
  V as emailSchema,
1310
- Ae as formatAuthError,
1311
- pe as formatProviderName,
1312
- Be as formatSocialLoginText,
1313
- he as generateRandomString,
1314
- qe as getProviderColor,
1315
- xe as getProviderIcon,
1316
- Ce as isBrowser,
1317
- $e as isValidEmail,
1318
- Te as openSocialLoginPopup,
1319
- N as providerInfo,
1320
- H as requestToControllerValidation,
1321
- te as resetPasswordSchema,
1328
+ ze as formatAuthError,
1329
+ ge as formatProviderName,
1330
+ Ie as formatSocialLoginText,
1331
+ fe as generateRandomString,
1332
+ $e as getProviderColor,
1333
+ Be as getProviderIcon,
1334
+ Ee as isBrowser,
1335
+ Te as isValidEmail,
1336
+ Ce as openSocialLoginPopup,
1337
+ j as providerInfo,
1338
+ X as requestToControllerValidation,
1339
+ ne as resetPasswordSchema,
1322
1340
  d as socialProviderInfo,
1323
- se as useAuthEmailProp,
1324
- Oe as validateEmail,
1325
- Ve as validatePassword
1341
+ ae as useAuthEmailProp,
1342
+ Fe as validateEmail,
1343
+ Me as validatePassword
1326
1344
  };