@better-auth-ui/heroui 1.6.19 → 1.6.20

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.
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { a as e, i as t, n, r, t as i } from "./user-view--47tVtJ3.js";
3
3
  import { authMutationKeys as a, authQueryKeys as o, fileToBase64 as s, getProviderName as c, parseAdditionalFieldValue as l, resolveInputType as u } from "@better-auth-ui/core";
4
- import { AuthProvider as d, providerIcons as f, useAccountInfo as p, useAuth as m, useAuthenticate as h, useChangeEmail as g, useChangePassword as _, useFetchOptions as v, useLinkSocial as y, useListAccounts as b, useListSessions as ee, useRequestPasswordReset as x, useResetPassword as S, useRevokeSession as te, useSendVerificationEmail as ne, useSession as C, useSignInEmail as re, useSignOut as ie, useSignUpEmail as ae, useUnlinkAccount as w, useUpdateUser as oe } from "@better-auth-ui/react";
5
- import { ArrowRightFromSquare as T, ArrowRightToSquare as se, Check as E, ChevronsExpandVertical as ce, CloudArrowUpIn as le, Copy as ue, Display as de, Eye as D, EyeSlash as O, Gear as fe, Link as pe, LinkSlash as me, Person as he, PersonPlus as ge, PlugConnection as _e, Shield as ve, Smartphone as ye, TrashBin as be, Xmark as xe } from "@gravity-ui/icons";
6
- import { Button as k, Calendar as A, Card as j, Checkbox as M, Chip as Se, ComboBox as Ce, DateField as we, DatePicker as Te, Description as Ee, Dropdown as N, FieldError as P, Fieldset as F, Form as I, Input as L, InputGroup as R, Label as z, Link as B, ListBox as V, NumberField as H, RouterProvider as De, Select as U, Skeleton as W, Slider as Oe, Spinner as G, Switch as ke, Tabs as K, TextArea as Ae, TextField as q, TimeField as je, cn as J, toast as Y } from "@heroui/react";
4
+ import { AuthProvider as d, providerIcons as f, useAccountInfo as p, useAuth as m, useAuthenticate as h, useChangeEmail as g, useChangePassword as _, useFetchOptions as v, useLinkSocial as y, useListAccounts as ee, useListSessions as te, useRequestPasswordReset as b, useResetPassword as x, useRevokeSession as ne, useSendVerificationEmail as re, useSession as S, useSignInEmail as ie, useSignOut as C, useSignUpEmail as ae, useUnlinkAccount as oe, useUpdateUser as w } from "@better-auth-ui/react";
5
+ import { ArrowRightFromSquare as se, ArrowRightToSquare as T, Check as ce, ChevronsExpandVertical as le, CloudArrowUpIn as ue, Copy as de, Display as fe, Eye as E, EyeSlash as D, Gear as pe, Link as me, LinkSlash as he, Person as ge, PersonPlus as _e, PlugConnection as ve, Shield as ye, Smartphone as be, TrashBin as xe, Xmark as Se } from "@gravity-ui/icons";
6
+ import { Button as O, Calendar as k, Card as A, Checkbox as j, Chip as Ce, ComboBox as we, DateField as Te, DatePicker as Ee, Description as De, Dropdown as M, FieldError as N, Fieldset as P, Form as F, Input as I, InputGroup as L, Label as R, Link as z, ListBox as B, NumberField as V, RouterProvider as Oe, Select as H, Skeleton as U, Slider as W, Spinner as G, Switch as ke, Tabs as K, TextArea as Ae, TextField as q, TimeField as je, cn as J, toast as Y } from "@heroui/react";
7
7
  import { fromDate as Me, getLocalTimeZone as Ne, parseDate as Pe, parseDateTime as Fe, toCalendarDate as Ie, toCalendarDateTime as Le } from "@internationalized/date";
8
8
  import { isValidElement as Re, useEffect as ze, useMemo as Be, useRef as Ve, useState as X } from "react";
9
9
  import { Fragment as Z, jsx as Q, jsxs as $ } from "react/jsx-runtime";
@@ -36,14 +36,14 @@ function Ye({ getValue: e, isDisabled: t }) {
36
36
  Y.danger(e instanceof Error ? e.message : String(e));
37
37
  }
38
38
  }
39
- return /* @__PURE__ */ Q(k, {
39
+ return /* @__PURE__ */ Q(O, {
40
40
  isIconOnly: !0,
41
41
  "aria-label": n.settings.copyToClipboard,
42
42
  size: "sm",
43
43
  variant: "ghost",
44
44
  isDisabled: t,
45
45
  onPress: a,
46
- children: Q(r ? E : ue, { className: "size-4" })
46
+ children: Q(r ? ce : de, { className: "size-4" })
47
47
  });
48
48
  }
49
49
  function Xe({ name: e, field: t, isPending: n, variant: r }) {
@@ -65,18 +65,18 @@ function Xe({ name: e, field: t, isPending: n, variant: r }) {
65
65
  isDisabled: n,
66
66
  isReadOnly: t.readOnly,
67
67
  children: [
68
- /* @__PURE__ */ Q(z, { children: t.label }),
68
+ /* @__PURE__ */ Q(R, { children: t.label }),
69
69
  /* @__PURE__ */ Q(Ae, {
70
70
  placeholder: t.placeholder,
71
71
  required: t.required,
72
72
  variant: o
73
73
  }),
74
- /* @__PURE__ */ Q(P, {})
74
+ /* @__PURE__ */ Q(N, {})
75
75
  ]
76
76
  });
77
77
  if (a === "number") {
78
78
  let r = t.formatOptions?.maximumFractionDigits;
79
- return /* @__PURE__ */ $(H, {
79
+ return /* @__PURE__ */ $(V, {
80
80
  name: e,
81
81
  defaultValue: typeof t.defaultValue == "number" ? t.defaultValue : t.defaultValue != null && t.defaultValue !== "" ? Number(t.defaultValue) : void 0,
82
82
  minValue: t.min,
@@ -87,22 +87,22 @@ function Xe({ name: e, field: t, isPending: n, variant: r }) {
87
87
  isReadOnly: t.readOnly,
88
88
  variant: o,
89
89
  children: [
90
- /* @__PURE__ */ Q(z, { children: t.label }),
91
- /* @__PURE__ */ $(H.Group, { children: [
92
- /* @__PURE__ */ Q(H.DecrementButton, {}),
93
- /* @__PURE__ */ Q(H.Input, {
90
+ /* @__PURE__ */ Q(R, { children: t.label }),
91
+ /* @__PURE__ */ $(V.Group, { children: [
92
+ /* @__PURE__ */ Q(V.DecrementButton, {}),
93
+ /* @__PURE__ */ Q(V.Input, {
94
94
  placeholder: t.placeholder,
95
95
  required: t.required
96
96
  }),
97
- /* @__PURE__ */ Q(H.IncrementButton, {})
97
+ /* @__PURE__ */ Q(V.IncrementButton, {})
98
98
  ] }),
99
- /* @__PURE__ */ Q(P, {})
99
+ /* @__PURE__ */ Q(N, {})
100
100
  ]
101
101
  });
102
102
  }
103
103
  if (a === "slider") {
104
104
  let r = t.formatOptions?.maximumFractionDigits;
105
- return /* @__PURE__ */ $(Oe, {
105
+ return /* @__PURE__ */ $(W, {
106
106
  defaultValue: typeof t.defaultValue == "number" ? t.defaultValue : t.defaultValue == null ? void 0 : Number(t.defaultValue),
107
107
  minValue: t.min ?? 0,
108
108
  maxValue: t.max ?? 100,
@@ -112,8 +112,8 @@ function Xe({ name: e, field: t, isPending: n, variant: r }) {
112
112
  className: "flex flex-col gap-2",
113
113
  children: [/* @__PURE__ */ $("div", {
114
114
  className: "flex items-center justify-between gap-2",
115
- children: [/* @__PURE__ */ Q(z, { children: t.label }), /* @__PURE__ */ Q(Oe.Output, { className: "text-sm text-muted" })]
116
- }), /* @__PURE__ */ $(Oe.Track, { children: [/* @__PURE__ */ Q(Oe.Fill, {}), /* @__PURE__ */ Q(Oe.Thumb, { name: e })] })]
115
+ children: [/* @__PURE__ */ Q(R, { children: t.label }), /* @__PURE__ */ Q(W.Output, { className: "text-sm text-muted" })]
116
+ }), /* @__PURE__ */ $(W.Track, { children: [/* @__PURE__ */ Q(W.Fill, {}), /* @__PURE__ */ Q(W.Thumb, { name: e })] })]
117
117
  });
118
118
  }
119
119
  if (a === "switch") return /* @__PURE__ */ $(ke, {
@@ -121,18 +121,18 @@ function Xe({ name: e, field: t, isPending: n, variant: r }) {
121
121
  defaultSelected: t.defaultValue === !0 || t.defaultValue === "true",
122
122
  isDisabled: n,
123
123
  isReadOnly: t.readOnly,
124
- children: [/* @__PURE__ */ Q(ke.Control, { children: /* @__PURE__ */ Q(ke.Thumb, {}) }), /* @__PURE__ */ Q(z, { children: t.label })]
124
+ children: [/* @__PURE__ */ Q(ke.Control, { children: /* @__PURE__ */ Q(ke.Thumb, {}) }), /* @__PURE__ */ Q(R, { children: t.label })]
125
125
  });
126
- if (a === "checkbox") return /* @__PURE__ */ $(M, {
126
+ if (a === "checkbox") return /* @__PURE__ */ $(j, {
127
127
  name: e,
128
128
  defaultSelected: t.defaultValue === !0 || t.defaultValue === "true",
129
129
  isDisabled: n,
130
130
  isReadOnly: t.readOnly,
131
131
  isRequired: t.required,
132
132
  variant: o,
133
- children: [/* @__PURE__ */ Q(M.Control, { children: /* @__PURE__ */ Q(M.Indicator, {}) }), /* @__PURE__ */ Q(M.Content, { children: /* @__PURE__ */ Q(z, { children: t.label }) })]
133
+ children: [/* @__PURE__ */ Q(j.Control, { children: /* @__PURE__ */ Q(j.Indicator, {}) }), /* @__PURE__ */ Q(j.Content, { children: /* @__PURE__ */ Q(R, { children: t.label }) })]
134
134
  });
135
- if (a === "select") return /* @__PURE__ */ $(U, {
135
+ if (a === "select") return /* @__PURE__ */ $(H, {
136
136
  className: "[&[data-required=true]>.label]:after:content-none",
137
137
  name: e,
138
138
  defaultValue: t.defaultValue == null ? void 0 : String(t.defaultValue),
@@ -142,17 +142,17 @@ function Xe({ name: e, field: t, isPending: n, variant: r }) {
142
142
  variant: o,
143
143
  fullWidth: !0,
144
144
  children: [
145
- /* @__PURE__ */ Q(z, { children: t.label }),
146
- /* @__PURE__ */ $(U.Trigger, { children: [/* @__PURE__ */ Q(U.Value, {}), /* @__PURE__ */ Q(U.Indicator, {})] }),
147
- /* @__PURE__ */ Q(U.Popover, { children: /* @__PURE__ */ Q(V, { children: t.options?.map((e) => /* @__PURE__ */ $(V.Item, {
145
+ /* @__PURE__ */ Q(R, { children: t.label }),
146
+ /* @__PURE__ */ $(H.Trigger, { children: [/* @__PURE__ */ Q(H.Value, {}), /* @__PURE__ */ Q(H.Indicator, {})] }),
147
+ /* @__PURE__ */ Q(H.Popover, { children: /* @__PURE__ */ Q(B, { children: t.options?.map((e) => /* @__PURE__ */ $(B.Item, {
148
148
  id: e.value,
149
149
  textValue: typeof e.label == "string" ? e.label : e.value,
150
- children: [e.label, /* @__PURE__ */ Q(V.ItemIndicator, {})]
150
+ children: [e.label, /* @__PURE__ */ Q(B.ItemIndicator, {})]
151
151
  }, e.value)) }) }),
152
- /* @__PURE__ */ Q(P, {})
152
+ /* @__PURE__ */ Q(N, {})
153
153
  ]
154
154
  });
155
- if (a === "combobox") return /* @__PURE__ */ $(Ce, {
155
+ if (a === "combobox") return /* @__PURE__ */ $(we, {
156
156
  className: "[&[data-required=true]>.label]:after:content-none",
157
157
  name: e,
158
158
  defaultSelectedKey: t.defaultValue == null ? void 0 : String(t.defaultValue),
@@ -162,19 +162,19 @@ function Xe({ name: e, field: t, isPending: n, variant: r }) {
162
162
  variant: o,
163
163
  fullWidth: !0,
164
164
  children: [
165
- /* @__PURE__ */ Q(z, { children: t.label }),
166
- /* @__PURE__ */ $(Ce.InputGroup, { children: [/* @__PURE__ */ Q(L, { placeholder: t.placeholder }), /* @__PURE__ */ Q(Ce.Trigger, {})] }),
167
- /* @__PURE__ */ Q(Ce.Popover, { children: /* @__PURE__ */ Q(V, { children: t.options?.map((e) => /* @__PURE__ */ $(V.Item, {
165
+ /* @__PURE__ */ Q(R, { children: t.label }),
166
+ /* @__PURE__ */ $(we.InputGroup, { children: [/* @__PURE__ */ Q(I, { placeholder: t.placeholder }), /* @__PURE__ */ Q(we.Trigger, {})] }),
167
+ /* @__PURE__ */ Q(we.Popover, { children: /* @__PURE__ */ Q(B, { children: t.options?.map((e) => /* @__PURE__ */ $(B.Item, {
168
168
  id: e.value,
169
169
  textValue: typeof e.label == "string" ? e.label : e.value,
170
- children: [e.label, /* @__PURE__ */ Q(V.ItemIndicator, {})]
170
+ children: [e.label, /* @__PURE__ */ Q(B.ItemIndicator, {})]
171
171
  }, e.value)) }) }),
172
- /* @__PURE__ */ Q(P, {})
172
+ /* @__PURE__ */ Q(N, {})
173
173
  ]
174
174
  });
175
175
  if (a === "date" || a === "datetime") {
176
176
  let r = a === "datetime";
177
- return /* @__PURE__ */ Q(Te, {
177
+ return /* @__PURE__ */ Q(Ee, {
178
178
  className: "w-full [&[data-required=true]>.label]:after:content-none",
179
179
  name: e,
180
180
  defaultValue: r ? Je(t.defaultValue) : qe(t.defaultValue),
@@ -183,29 +183,29 @@ function Xe({ name: e, field: t, isPending: n, variant: r }) {
183
183
  isReadOnly: t.readOnly,
184
184
  isRequired: t.required,
185
185
  children: ({ state: n }) => /* @__PURE__ */ $(Z, { children: [
186
- /* @__PURE__ */ Q(z, { children: t.label }),
187
- /* @__PURE__ */ $(we.Group, {
186
+ /* @__PURE__ */ Q(R, { children: t.label }),
187
+ /* @__PURE__ */ $(Te.Group, {
188
188
  variant: o,
189
189
  fullWidth: !0,
190
- children: [/* @__PURE__ */ Q(we.Input, { children: (e) => /* @__PURE__ */ Q(we.Segment, { segment: e }) }), /* @__PURE__ */ Q(we.Suffix, { children: /* @__PURE__ */ Q(Te.Trigger, { children: /* @__PURE__ */ Q(Te.TriggerIndicator, {}) }) })]
190
+ children: [/* @__PURE__ */ Q(Te.Input, { children: (e) => /* @__PURE__ */ Q(Te.Segment, { segment: e }) }), /* @__PURE__ */ Q(Te.Suffix, { children: /* @__PURE__ */ Q(Ee.Trigger, { children: /* @__PURE__ */ Q(Ee.TriggerIndicator, {}) }) })]
191
191
  }),
192
- /* @__PURE__ */ Q(P, {}),
193
- /* @__PURE__ */ $(Te.Popover, {
192
+ /* @__PURE__ */ Q(N, {}),
193
+ /* @__PURE__ */ $(Ee.Popover, {
194
194
  className: "flex flex-col gap-3",
195
- children: [/* @__PURE__ */ $(A, {
195
+ children: [/* @__PURE__ */ $(k, {
196
196
  "aria-label": typeof t.label == "string" ? t.label : e,
197
197
  children: [
198
- /* @__PURE__ */ $(A.Header, { children: [
199
- /* @__PURE__ */ $(A.YearPickerTrigger, { children: [/* @__PURE__ */ Q(A.YearPickerTriggerHeading, {}), /* @__PURE__ */ Q(A.YearPickerTriggerIndicator, {})] }),
200
- /* @__PURE__ */ Q(A.NavButton, { slot: "previous" }),
201
- /* @__PURE__ */ Q(A.NavButton, { slot: "next" })
198
+ /* @__PURE__ */ $(k.Header, { children: [
199
+ /* @__PURE__ */ $(k.YearPickerTrigger, { children: [/* @__PURE__ */ Q(k.YearPickerTriggerHeading, {}), /* @__PURE__ */ Q(k.YearPickerTriggerIndicator, {})] }),
200
+ /* @__PURE__ */ Q(k.NavButton, { slot: "previous" }),
201
+ /* @__PURE__ */ Q(k.NavButton, { slot: "next" })
202
202
  ] }),
203
- /* @__PURE__ */ $(A.Grid, { children: [/* @__PURE__ */ Q(A.GridHeader, { children: (e) => /* @__PURE__ */ Q(A.HeaderCell, { children: e }) }), /* @__PURE__ */ Q(A.GridBody, { children: (e) => /* @__PURE__ */ Q(A.Cell, { date: e }) })] }),
204
- /* @__PURE__ */ Q(A.YearPickerGrid, { children: /* @__PURE__ */ Q(A.YearPickerGridBody, { children: ({ year: e }) => /* @__PURE__ */ Q(A.YearPickerCell, { year: e }) }) })
203
+ /* @__PURE__ */ $(k.Grid, { children: [/* @__PURE__ */ Q(k.GridHeader, { children: (e) => /* @__PURE__ */ Q(k.HeaderCell, { children: e }) }), /* @__PURE__ */ Q(k.GridBody, { children: (e) => /* @__PURE__ */ Q(k.Cell, { date: e }) })] }),
204
+ /* @__PURE__ */ Q(k.YearPickerGrid, { children: /* @__PURE__ */ Q(k.YearPickerGridBody, { children: ({ year: e }) => /* @__PURE__ */ Q(k.YearPickerCell, { year: e }) }) })
205
205
  ]
206
206
  }), r && /* @__PURE__ */ $("div", {
207
207
  className: "flex items-center justify-between",
208
- children: [/* @__PURE__ */ Q(z, { children: i.settings.time }), /* @__PURE__ */ Q(je, {
208
+ children: [/* @__PURE__ */ Q(R, { children: i.settings.time }), /* @__PURE__ */ Q(je, {
209
209
  "aria-label": i.settings.time,
210
210
  granularity: "minute",
211
211
  value: n.timeValue,
@@ -227,12 +227,12 @@ function Xe({ name: e, field: t, isPending: n, variant: r }) {
227
227
  isDisabled: n,
228
228
  isReadOnly: t.readOnly,
229
229
  children: [
230
- /* @__PURE__ */ Q(z, { children: t.label }),
231
- /* @__PURE__ */ $(R, {
230
+ /* @__PURE__ */ Q(R, { children: t.label }),
231
+ /* @__PURE__ */ $(L, {
232
232
  variant: o,
233
233
  children: [
234
- c && /* @__PURE__ */ Q(R.Prefix, { children: t.prefix }),
235
- /* @__PURE__ */ Q(R.Input, {
234
+ c && /* @__PURE__ */ Q(L.Prefix, { children: t.prefix }),
235
+ /* @__PURE__ */ Q(L.Input, {
236
236
  ref: s,
237
237
  placeholder: t.placeholder,
238
238
  required: t.required,
@@ -240,16 +240,16 @@ function Xe({ name: e, field: t, isPending: n, variant: r }) {
240
240
  inputMode: h,
241
241
  step: g
242
242
  }),
243
- t.copyable ? /* @__PURE__ */ Q(R.Suffix, {
243
+ t.copyable ? /* @__PURE__ */ Q(L.Suffix, {
244
244
  className: "px-0",
245
245
  children: /* @__PURE__ */ Q(Ye, {
246
246
  getValue: () => s.current?.value,
247
247
  isDisabled: n
248
248
  })
249
- }) : t.suffix != null && /* @__PURE__ */ Q(R.Suffix, { children: t.suffix })
249
+ }) : t.suffix != null && /* @__PURE__ */ Q(L.Suffix, { children: t.suffix })
250
250
  ]
251
251
  }),
252
- /* @__PURE__ */ Q(P, {})
252
+ /* @__PURE__ */ Q(N, {})
253
253
  ]
254
254
  }) : /* @__PURE__ */ $(q, {
255
255
  name: e,
@@ -257,8 +257,8 @@ function Xe({ name: e, field: t, isPending: n, variant: r }) {
257
257
  isDisabled: n,
258
258
  isReadOnly: t.readOnly,
259
259
  children: [
260
- /* @__PURE__ */ Q(z, { children: t.label }),
261
- /* @__PURE__ */ Q(L, {
260
+ /* @__PURE__ */ Q(R, { children: t.label }),
261
+ /* @__PURE__ */ Q(I, {
262
262
  placeholder: t.placeholder,
263
263
  required: t.required,
264
264
  variant: o,
@@ -266,93 +266,92 @@ function Xe({ name: e, field: t, isPending: n, variant: r }) {
266
266
  inputMode: h,
267
267
  step: g
268
268
  }),
269
- /* @__PURE__ */ Q(P, {})
269
+ /* @__PURE__ */ Q(N, {})
270
270
  ]
271
271
  });
272
272
  }
273
273
  //#endregion
274
274
  //#region src/components/auth/forgot-password.tsx
275
- function Ze({ className: e, variant: t, ...n }) {
276
- let { authClient: r, baseURL: i, basePaths: a, localization: o, viewPaths: s, navigate: c, plugins: l } = m(), { fetchOptions: u, resetFetchOptions: d } = v(), { mutate: f, isPending: p } = x(r, {
275
+ function Ze({ className: e, variant: t }) {
276
+ let { authClient: n, baseURL: r, basePaths: i, localization: a, viewPaths: o, navigate: s, plugins: c } = m(), { fetchOptions: l, resetFetchOptions: u } = v(), { mutate: d, isPending: f } = b(n, {
277
277
  onError: () => {
278
- d();
278
+ u();
279
279
  },
280
280
  onSuccess: () => {
281
- Y.success(o.auth.passwordResetEmailSent), c({ to: `${a.auth}/${s.auth.signIn}` });
281
+ Y.success(a.auth.passwordResetEmailSent), s({ to: `${i.auth}/${o.auth.signIn}` });
282
282
  }
283
283
  });
284
- function h(e) {
285
- e.preventDefault(), f({
284
+ function p(e) {
285
+ e.preventDefault(), d({
286
286
  email: new FormData(e.currentTarget).get("email"),
287
- redirectTo: `${i}${a.auth}/${s.auth.resetPassword}`,
288
- fetchOptions: u
287
+ redirectTo: `${r}${i.auth}/${o.auth.resetPassword}`,
288
+ fetchOptions: l
289
289
  });
290
290
  }
291
- let g = l.find((e) => e.captchaComponent)?.captchaComponent;
292
- return /* @__PURE__ */ $(j, {
291
+ let h = c.find((e) => e.captchaComponent)?.captchaComponent;
292
+ return /* @__PURE__ */ $(A, {
293
293
  className: J("w-full max-w-sm gap-4 md:p-6", e),
294
294
  variant: t,
295
- ...n,
296
295
  children: [
297
- /* @__PURE__ */ Q(j.Header, { children: /* @__PURE__ */ Q(j.Title, {
296
+ /* @__PURE__ */ Q(A.Header, { children: /* @__PURE__ */ Q(A.Title, {
298
297
  className: "text-xl font-semibold mb-1",
299
- children: o.auth.forgotPassword
298
+ children: a.auth.forgotPassword
300
299
  }) }),
301
- /* @__PURE__ */ Q(j.Content, {
300
+ /* @__PURE__ */ Q(A.Content, {
302
301
  className: "gap-4",
303
- children: /* @__PURE__ */ $(I, {
304
- onSubmit: h,
302
+ children: /* @__PURE__ */ $(F, {
303
+ onSubmit: p,
305
304
  className: "flex flex-col gap-4",
306
305
  children: [
307
306
  /* @__PURE__ */ $(q, {
308
307
  name: "email",
309
308
  type: "email",
310
309
  autoComplete: "email",
311
- isDisabled: p,
310
+ isDisabled: f,
312
311
  validate: (e) => {
313
- if (!e) return o.auth.fieldRequired;
314
- if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)) return o.auth.invalidEmail;
312
+ if (!e) return a.auth.fieldRequired;
313
+ if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)) return a.auth.invalidEmail;
315
314
  },
316
315
  children: [
317
- /* @__PURE__ */ Q(z, { children: o.auth.email }),
318
- /* @__PURE__ */ Q(L, {
319
- placeholder: o.auth.emailPlaceholder,
316
+ /* @__PURE__ */ Q(R, { children: a.auth.email }),
317
+ /* @__PURE__ */ Q(I, {
318
+ placeholder: a.auth.emailPlaceholder,
320
319
  required: !0,
321
320
  variant: t === "transparent" ? "primary" : "secondary"
322
321
  }),
323
- /* @__PURE__ */ Q(P, {})
322
+ /* @__PURE__ */ Q(N, {})
324
323
  ]
325
324
  }),
326
- g && /* @__PURE__ */ Q("div", {
325
+ h && /* @__PURE__ */ Q("div", {
327
326
  className: "flex justify-center",
328
- children: g
327
+ children: h
329
328
  }),
330
329
  /* @__PURE__ */ Q("div", {
331
330
  className: "flex flex-col gap-3",
332
- children: /* @__PURE__ */ $(k, {
331
+ children: /* @__PURE__ */ $(O, {
333
332
  type: "submit",
334
333
  className: "w-full",
335
- isPending: p,
336
- children: [p && /* @__PURE__ */ Q(G, {
334
+ isPending: f,
335
+ children: [f && /* @__PURE__ */ Q(G, {
337
336
  color: "current",
338
337
  size: "sm"
339
- }), o.auth.sendResetLink]
338
+ }), a.auth.sendResetLink]
340
339
  })
341
340
  })
342
341
  ]
343
342
  })
344
343
  }),
345
- /* @__PURE__ */ Q(j.Footer, {
344
+ /* @__PURE__ */ Q(A.Footer, {
346
345
  className: "flex-col gap-3",
347
- children: /* @__PURE__ */ $(Ee, {
346
+ children: /* @__PURE__ */ $(De, {
348
347
  className: "text-sm",
349
348
  children: [
350
- o.auth.rememberYourPassword,
349
+ a.auth.rememberYourPassword,
351
350
  " ",
352
- /* @__PURE__ */ Q(B, {
353
- href: `${a.auth}/${s.auth.signIn}`,
351
+ /* @__PURE__ */ Q(z, {
352
+ href: `${i.auth}/${o.auth.signIn}`,
354
353
  className: "text-accent no-underline hover:underline decoration-accent-hover",
355
- children: o.auth.signIn
354
+ children: a.auth.signIn
356
355
  })
357
356
  ]
358
357
  })
@@ -362,150 +361,149 @@ function Ze({ className: e, variant: t, ...n }) {
362
361
  }
363
362
  //#endregion
364
363
  //#region src/components/auth/reset-password.tsx
365
- function Qe({ className: e, variant: t, ...n }) {
366
- let { authClient: r, basePaths: i, emailAndPassword: a, localization: o, viewPaths: s, navigate: c } = m(), { mutate: l, isPending: u } = S(r, { onSuccess: () => {
367
- Y.success(o.auth.passwordResetSuccess), c({ to: `${i.auth}/${s.auth.signIn}` });
368
- } }), [d, f] = X(!1), [p, h] = X(!1);
364
+ function Qe({ className: e, variant: t }) {
365
+ let { authClient: n, basePaths: r, emailAndPassword: i, localization: a, viewPaths: o, navigate: s } = m(), { mutate: c, isPending: l } = x(n, { onSuccess: () => {
366
+ Y.success(a.auth.passwordResetSuccess), s({ to: `${r.auth}/${o.auth.signIn}` });
367
+ } }), [u, d] = X(!1), [f, p] = X(!1);
369
368
  ze(() => {
370
- new URLSearchParams(window.location.search).get("token") || (Y.danger(o.auth.invalidResetPasswordToken), c({ to: `${i.auth}/${s.auth.signIn}` }));
369
+ new URLSearchParams(window.location.search).get("token") || (Y.danger(a.auth.invalidResetPasswordToken), s({ to: `${r.auth}/${o.auth.signIn}` }));
371
370
  }, [
372
- i.auth,
373
- o.auth.invalidResetPasswordToken,
374
- s.auth.signIn,
375
- c
371
+ r.auth,
372
+ a.auth.invalidResetPasswordToken,
373
+ o.auth.signIn,
374
+ s
376
375
  ]);
377
- function g(e) {
376
+ function h(e) {
378
377
  e.preventDefault();
379
378
  let t = new URLSearchParams(window.location.search).get("token");
380
379
  if (!t) {
381
- Y.danger(o.auth.invalidResetPasswordToken), c({ to: `${i.auth}/${s.auth.signIn}` });
380
+ Y.danger(a.auth.invalidResetPasswordToken), s({ to: `${r.auth}/${o.auth.signIn}` });
382
381
  return;
383
382
  }
384
- let n = new FormData(e.currentTarget), r = n.get("password"), u = n.get("confirmPassword");
385
- if (a?.confirmPassword && r !== u) {
386
- Y.danger(o.auth.passwordsDoNotMatch);
383
+ let n = new FormData(e.currentTarget), l = n.get("password"), u = n.get("confirmPassword");
384
+ if (i?.confirmPassword && l !== u) {
385
+ Y.danger(a.auth.passwordsDoNotMatch);
387
386
  return;
388
387
  }
389
- l({
388
+ c({
390
389
  token: t,
391
- newPassword: r
390
+ newPassword: l
392
391
  });
393
392
  }
394
- return /* @__PURE__ */ $(j, {
393
+ return /* @__PURE__ */ $(A, {
395
394
  className: J("w-full max-w-sm gap-4 md:p-6", e),
396
395
  variant: t,
397
- ...n,
398
396
  children: [
399
- /* @__PURE__ */ Q(j.Header, { children: /* @__PURE__ */ Q(j.Title, {
397
+ /* @__PURE__ */ Q(A.Header, { children: /* @__PURE__ */ Q(A.Title, {
400
398
  className: "text-xl font-semibold mb-1",
401
- children: o.auth.resetPassword
399
+ children: a.auth.resetPassword
402
400
  }) }),
403
- /* @__PURE__ */ Q(j.Content, {
401
+ /* @__PURE__ */ Q(A.Content, {
404
402
  className: "gap-4",
405
- children: /* @__PURE__ */ $(I, {
406
- onSubmit: g,
403
+ children: /* @__PURE__ */ $(F, {
404
+ onSubmit: h,
407
405
  className: "flex flex-col gap-4",
408
406
  children: [
409
407
  /* @__PURE__ */ $(q, {
410
- minLength: a?.minPasswordLength,
411
- maxLength: a?.maxPasswordLength,
408
+ minLength: i?.minPasswordLength,
409
+ maxLength: i?.maxPasswordLength,
412
410
  name: "password",
413
411
  autoComplete: "new-password",
414
- isDisabled: u,
412
+ isDisabled: l,
415
413
  validate: (e) => {
416
- if (!e) return o.auth.fieldRequired;
417
- let t = a?.minPasswordLength, n = a?.maxPasswordLength;
418
- if (t && e.length < t) return o.auth.tooShort.replace("{{min}}", String(t));
419
- if (n && e.length > n) return o.auth.tooLong.replace("{{max}}", String(n));
414
+ if (!e) return a.auth.fieldRequired;
415
+ let t = i?.minPasswordLength, n = i?.maxPasswordLength;
416
+ if (t && e.length < t) return a.auth.tooShort.replace("{{min}}", String(t));
417
+ if (n && e.length > n) return a.auth.tooLong.replace("{{max}}", String(n));
420
418
  },
421
419
  children: [
422
- /* @__PURE__ */ Q(z, { children: o.auth.password }),
423
- /* @__PURE__ */ $(R, {
420
+ /* @__PURE__ */ Q(R, { children: a.auth.password }),
421
+ /* @__PURE__ */ $(L, {
424
422
  variant: t === "transparent" ? "primary" : "secondary",
425
- children: [/* @__PURE__ */ Q(R.Input, {
423
+ children: [/* @__PURE__ */ Q(L.Input, {
426
424
  name: "password",
427
- placeholder: o.auth.newPasswordPlaceholder,
428
- type: d ? "text" : "password",
425
+ placeholder: a.auth.newPasswordPlaceholder,
426
+ type: u ? "text" : "password",
429
427
  required: !0
430
- }), /* @__PURE__ */ Q(R.Suffix, {
428
+ }), /* @__PURE__ */ Q(L.Suffix, {
431
429
  className: "px-0",
432
- children: /* @__PURE__ */ Q(k, {
430
+ children: /* @__PURE__ */ Q(O, {
433
431
  isIconOnly: !0,
434
- "aria-label": d ? o.auth.hidePassword : o.auth.showPassword,
432
+ "aria-label": u ? a.auth.hidePassword : a.auth.showPassword,
435
433
  size: "sm",
436
434
  variant: "ghost",
437
- onPress: () => f(!d),
438
- isDisabled: u,
439
- children: Q(d ? O : D, {})
435
+ onPress: () => d(!u),
436
+ isDisabled: l,
437
+ children: Q(u ? D : E, {})
440
438
  })
441
439
  })]
442
440
  }),
443
- /* @__PURE__ */ Q(P, {})
441
+ /* @__PURE__ */ Q(N, {})
444
442
  ]
445
443
  }),
446
- a?.confirmPassword && /* @__PURE__ */ $(q, {
447
- minLength: a?.minPasswordLength,
448
- maxLength: a?.maxPasswordLength,
444
+ i?.confirmPassword && /* @__PURE__ */ $(q, {
445
+ minLength: i?.minPasswordLength,
446
+ maxLength: i?.maxPasswordLength,
449
447
  name: "confirmPassword",
450
448
  autoComplete: "new-password",
451
- isDisabled: u,
449
+ isDisabled: l,
452
450
  validate: (e) => {
453
- if (!e) return o.auth.fieldRequired;
454
- let t = a?.minPasswordLength, n = a?.maxPasswordLength;
455
- if (t && e.length < t) return o.auth.tooShort.replace("{{min}}", String(t));
456
- if (n && e.length > n) return o.auth.tooLong.replace("{{max}}", String(n));
451
+ if (!e) return a.auth.fieldRequired;
452
+ let t = i?.minPasswordLength, n = i?.maxPasswordLength;
453
+ if (t && e.length < t) return a.auth.tooShort.replace("{{min}}", String(t));
454
+ if (n && e.length > n) return a.auth.tooLong.replace("{{max}}", String(n));
457
455
  },
458
456
  children: [
459
- /* @__PURE__ */ Q(z, { children: o.auth.confirmPassword }),
460
- /* @__PURE__ */ $(R, {
457
+ /* @__PURE__ */ Q(R, { children: a.auth.confirmPassword }),
458
+ /* @__PURE__ */ $(L, {
461
459
  variant: t === "transparent" ? "primary" : "secondary",
462
- children: [/* @__PURE__ */ Q(R.Input, {
463
- placeholder: o.auth.confirmPasswordPlaceholder,
464
- type: p ? "text" : "password",
460
+ children: [/* @__PURE__ */ Q(L.Input, {
461
+ placeholder: a.auth.confirmPasswordPlaceholder,
462
+ type: f ? "text" : "password",
465
463
  required: !0,
466
464
  name: "confirmPassword"
467
- }), /* @__PURE__ */ Q(R.Suffix, {
465
+ }), /* @__PURE__ */ Q(L.Suffix, {
468
466
  className: "px-0",
469
- children: /* @__PURE__ */ Q(k, {
467
+ children: /* @__PURE__ */ Q(O, {
470
468
  isIconOnly: !0,
471
- "aria-label": p ? o.auth.hidePassword : o.auth.showPassword,
469
+ "aria-label": f ? a.auth.hidePassword : a.auth.showPassword,
472
470
  size: "sm",
473
471
  variant: "ghost",
474
- onPress: () => h(!p),
475
- isDisabled: u,
476
- children: Q(p ? O : D, {})
472
+ onPress: () => p(!f),
473
+ isDisabled: l,
474
+ children: Q(f ? D : E, {})
477
475
  })
478
476
  })]
479
477
  }),
480
- /* @__PURE__ */ Q(P, {})
478
+ /* @__PURE__ */ Q(N, {})
481
479
  ]
482
480
  }),
483
481
  /* @__PURE__ */ Q("div", {
484
482
  className: "flex flex-col gap-3",
485
- children: /* @__PURE__ */ $(k, {
483
+ children: /* @__PURE__ */ $(O, {
486
484
  type: "submit",
487
485
  className: "w-full",
488
- isPending: u,
489
- children: [u && /* @__PURE__ */ Q(G, {
486
+ isPending: l,
487
+ children: [l && /* @__PURE__ */ Q(G, {
490
488
  color: "current",
491
489
  size: "sm"
492
- }), o.auth.resetPassword]
490
+ }), a.auth.resetPassword]
493
491
  })
494
492
  })
495
493
  ]
496
494
  })
497
495
  }),
498
- /* @__PURE__ */ Q(j.Footer, {
496
+ /* @__PURE__ */ Q(A.Footer, {
499
497
  className: "flex-col gap-3",
500
- children: /* @__PURE__ */ $(Ee, {
498
+ children: /* @__PURE__ */ $(De, {
501
499
  className: "text-sm",
502
500
  children: [
503
- o.auth.rememberYourPassword,
501
+ a.auth.rememberYourPassword,
504
502
  " ",
505
- /* @__PURE__ */ Q(B, {
506
- href: `${i.auth}/${s.auth.signIn}`,
503
+ /* @__PURE__ */ Q(z, {
504
+ href: `${r.auth}/${o.auth.signIn}`,
507
505
  className: "text-accent no-underline hover:underline decoration-accent-hover",
508
- children: o.auth.signIn
506
+ children: a.auth.signIn
509
507
  })
510
508
  ]
511
509
  })
@@ -515,94 +513,93 @@ function Qe({ className: e, variant: t, ...n }) {
515
513
  }
516
514
  //#endregion
517
515
  //#region src/components/auth/sign-in.tsx
518
- function $e({ className: t, socialLayout: n, socialPosition: i = "bottom", variant: o, ...s }) {
519
- let { authClient: c, basePaths: l, baseURL: u, emailAndPassword: d, localization: f, plugins: p, redirectTo: h, socialProviders: g, viewPaths: _, navigate: y } = m(), { fetchOptions: b, resetFetchOptions: ee } = v(), [x, S] = X(""), { mutate: te } = ne(c, { onSuccess: () => Y.success(f.auth.verificationEmailSent) }), { mutate: C, isPending: ie } = re(c, {
516
+ function $e({ className: t, socialLayout: n, socialPosition: i = "bottom", variant: o }) {
517
+ let { authClient: s, basePaths: c, baseURL: l, emailAndPassword: u, localization: d, plugins: f, redirectTo: p, socialProviders: h, viewPaths: g, navigate: _ } = m(), { fetchOptions: y, resetFetchOptions: ee } = v(), [te, b] = X(""), { mutate: x } = re(s, { onSuccess: () => Y.success(d.auth.verificationEmailSent) }), { mutate: ne, isPending: S } = ie(s, {
520
518
  onError: (e, { email: t }) => {
521
- S(""), e.error?.code === "EMAIL_NOT_VERIFIED" && Y.danger(e.error?.message || e.message, { actionProps: {
522
- children: f.auth.resend,
523
- onClick: () => te({
519
+ b(""), e.error?.code === "EMAIL_NOT_VERIFIED" && Y.danger(e.error?.message || e.message, { actionProps: {
520
+ children: d.auth.resend,
521
+ onClick: () => x({
524
522
  email: t,
525
- callbackURL: `${u}${h}`
523
+ callbackURL: `${l}${p}`
526
524
  })
527
525
  } }), ee();
528
526
  },
529
- onSuccess: () => y({ to: h })
530
- }), ae = (e) => {
527
+ onSuccess: () => _({ to: p })
528
+ }), C = (e) => {
531
529
  e.preventDefault();
532
530
  let t = new FormData(e.currentTarget), n = t.get("email"), r = t.get("rememberMe") === "on";
533
- C({
531
+ ne({
534
532
  email: n,
535
- password: x,
536
- ...d?.rememberMe ? { rememberMe: r } : {},
537
- fetchOptions: b
533
+ password: te,
534
+ ...u?.rememberMe ? { rememberMe: r } : {},
535
+ fetchOptions: y
538
536
  });
539
- }, w = We({ mutationKey: a.signIn.all }) + We({ mutationKey: a.signUp.all }) > 0, oe = p.find((e) => e.captchaComponent)?.captchaComponent, T = d?.enabled && !!g?.length;
540
- return /* @__PURE__ */ $(j, {
537
+ }, ae = We({ mutationKey: a.signIn.all }) + We({ mutationKey: a.signUp.all }) > 0, oe = f.find((e) => e.captchaComponent)?.captchaComponent, w = u?.enabled && !!h?.length;
538
+ return /* @__PURE__ */ $(A, {
541
539
  className: J("w-full max-w-sm gap-4 md:p-6", t),
542
540
  variant: o,
543
- ...s,
544
541
  children: [
545
- /* @__PURE__ */ Q(j.Header, { children: /* @__PURE__ */ Q(j.Title, {
542
+ /* @__PURE__ */ Q(A.Header, { children: /* @__PURE__ */ Q(A.Title, {
546
543
  className: "text-xl font-semibold mb-1",
547
- children: f.auth.signIn
544
+ children: d.auth.signIn
548
545
  }) }),
549
- /* @__PURE__ */ $(j.Content, {
546
+ /* @__PURE__ */ $(A.Content, {
550
547
  className: "gap-4",
551
548
  children: [
552
- i === "top" && /* @__PURE__ */ $(Z, { children: [!!g?.length && /* @__PURE__ */ Q(r, { socialLayout: n }), T && /* @__PURE__ */ Q(e, { children: f.auth.or })] }),
553
- d?.enabled && /* @__PURE__ */ $(I, {
554
- onSubmit: ae,
549
+ i === "top" && /* @__PURE__ */ $(Z, { children: [!!h?.length && /* @__PURE__ */ Q(r, { socialLayout: n }), w && /* @__PURE__ */ Q(e, { children: d.auth.or })] }),
550
+ u?.enabled && /* @__PURE__ */ $(F, {
551
+ onSubmit: C,
555
552
  className: "flex flex-col gap-4",
556
553
  children: [
557
554
  /* @__PURE__ */ $(q, {
558
555
  name: "email",
559
556
  type: "email",
560
557
  autoComplete: "email",
561
- isDisabled: w,
558
+ isDisabled: ae,
562
559
  validate: (e) => {
563
- if (!e) return f.auth.fieldRequired;
564
- if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)) return f.auth.invalidEmail;
560
+ if (!e) return d.auth.fieldRequired;
561
+ if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)) return d.auth.invalidEmail;
565
562
  },
566
563
  children: [
567
- /* @__PURE__ */ Q(z, { children: f.auth.email }),
568
- /* @__PURE__ */ Q(L, {
569
- placeholder: f.auth.emailPlaceholder,
564
+ /* @__PURE__ */ Q(R, { children: d.auth.email }),
565
+ /* @__PURE__ */ Q(I, {
566
+ placeholder: d.auth.emailPlaceholder,
570
567
  variant: o === "transparent" ? "primary" : "secondary",
571
568
  required: !0
572
569
  }),
573
- /* @__PURE__ */ Q(P, {})
570
+ /* @__PURE__ */ Q(N, {})
574
571
  ]
575
572
  }),
576
573
  /* @__PURE__ */ $(q, {
577
- minLength: d?.minPasswordLength,
578
- maxLength: d?.maxPasswordLength,
574
+ minLength: u?.minPasswordLength,
575
+ maxLength: u?.maxPasswordLength,
579
576
  name: "password",
580
577
  type: "password",
581
578
  autoComplete: "current-password",
582
- isDisabled: w,
583
- value: x,
584
- onChange: S,
579
+ isDisabled: ae,
580
+ value: te,
581
+ onChange: b,
585
582
  validate: (e) => {
586
- if (!e) return f.auth.fieldRequired;
587
- let t = d?.minPasswordLength, n = d?.maxPasswordLength;
588
- if (t && e.length < t) return f.auth.tooShort.replace("{{min}}", String(t));
589
- if (n && e.length > n) return f.auth.tooLong.replace("{{max}}", String(n));
583
+ if (!e) return d.auth.fieldRequired;
584
+ let t = u?.minPasswordLength, n = u?.maxPasswordLength;
585
+ if (t && e.length < t) return d.auth.tooShort.replace("{{min}}", String(t));
586
+ if (n && e.length > n) return d.auth.tooLong.replace("{{max}}", String(n));
590
587
  },
591
588
  children: [
592
- /* @__PURE__ */ Q(z, { children: f.auth.password }),
593
- /* @__PURE__ */ Q(L, {
594
- placeholder: f.auth.passwordPlaceholder,
589
+ /* @__PURE__ */ Q(R, { children: d.auth.password }),
590
+ /* @__PURE__ */ Q(I, {
591
+ placeholder: d.auth.passwordPlaceholder,
595
592
  variant: o === "transparent" ? "primary" : "secondary",
596
593
  required: !0
597
594
  }),
598
- /* @__PURE__ */ Q(P, {})
595
+ /* @__PURE__ */ Q(N, {})
599
596
  ]
600
597
  }),
601
- d?.rememberMe && /* @__PURE__ */ $(M, {
598
+ u?.rememberMe && /* @__PURE__ */ $(j, {
602
599
  name: "rememberMe",
603
- isDisabled: w,
600
+ isDisabled: ae,
604
601
  variant: o === "transparent" ? "primary" : "secondary",
605
- children: [/* @__PURE__ */ Q(M.Control, { children: /* @__PURE__ */ Q(M.Indicator, {}) }), /* @__PURE__ */ Q(M.Content, { children: /* @__PURE__ */ Q(z, { children: f.auth.rememberMe }) })]
602
+ children: [/* @__PURE__ */ Q(j.Control, { children: /* @__PURE__ */ Q(j.Indicator, {}) }), /* @__PURE__ */ Q(j.Content, { children: /* @__PURE__ */ Q(R, { children: d.auth.rememberMe }) })]
606
603
  }),
607
604
  oe && /* @__PURE__ */ Q("div", {
608
605
  className: "flex justify-center",
@@ -610,36 +607,36 @@ function $e({ className: t, socialLayout: n, socialPosition: i = "bottom", varia
610
607
  }),
611
608
  /* @__PURE__ */ $("div", {
612
609
  className: "flex flex-col gap-3",
613
- children: [/* @__PURE__ */ $(k, {
610
+ children: [/* @__PURE__ */ $(O, {
614
611
  type: "submit",
615
612
  className: "w-full",
616
- isPending: w,
617
- children: [ie && /* @__PURE__ */ Q(G, {
613
+ isPending: ae,
614
+ children: [S && /* @__PURE__ */ Q(G, {
618
615
  color: "current",
619
616
  size: "sm"
620
- }), f.auth.signIn]
621
- }), p.flatMap((e) => e.authButtons?.map((t, n) => /* @__PURE__ */ Q(t, { view: "signIn" }, `${e.id}-${n.toString()}`)))]
617
+ }), d.auth.signIn]
618
+ }), f.flatMap((e) => e.authButtons?.map((t, n) => /* @__PURE__ */ Q(t, { view: "signIn" }, `${e.id}-${n.toString()}`)))]
622
619
  })
623
620
  ]
624
621
  }),
625
- i === "bottom" && /* @__PURE__ */ $(Z, { children: [T && /* @__PURE__ */ Q(e, { children: f.auth.or }), !!g?.length && /* @__PURE__ */ Q(r, { socialLayout: n })] })
622
+ i === "bottom" && /* @__PURE__ */ $(Z, { children: [w && /* @__PURE__ */ Q(e, { children: d.auth.or }), !!h?.length && /* @__PURE__ */ Q(r, { socialLayout: n })] })
626
623
  ]
627
624
  }),
628
- /* @__PURE__ */ $(j.Footer, {
625
+ /* @__PURE__ */ $(A.Footer, {
629
626
  className: "flex-col gap-3",
630
- children: [d?.enabled && d?.forgotPassword && /* @__PURE__ */ Q(B, {
631
- href: `${l.auth}/${_.auth.forgotPassword}`,
627
+ children: [u?.enabled && u?.forgotPassword && /* @__PURE__ */ Q(z, {
628
+ href: `${c.auth}/${g.auth.forgotPassword}`,
632
629
  className: "no-underline hover:underline",
633
- children: f.auth.forgotPasswordLink
634
- }), d?.enabled && /* @__PURE__ */ $(Ee, {
630
+ children: d.auth.forgotPasswordLink
631
+ }), u?.enabled && /* @__PURE__ */ $(De, {
635
632
  className: "text-sm",
636
633
  children: [
637
- f.auth.needToCreateAnAccount,
634
+ d.auth.needToCreateAnAccount,
638
635
  " ",
639
- /* @__PURE__ */ Q(B, {
640
- href: `${l.auth}/${_.auth.signUp}`,
636
+ /* @__PURE__ */ Q(z, {
637
+ href: `${c.auth}/${g.auth.signUp}`,
641
638
  className: "text-accent no-underline hover:underline decoration-accent-hover",
642
- children: f.auth.signUp
639
+ children: d.auth.signUp
643
640
  })
644
641
  ]
645
642
  })]
@@ -650,7 +647,7 @@ function $e({ className: t, socialLayout: n, socialPosition: i = "bottom", varia
650
647
  //#endregion
651
648
  //#region src/components/auth/sign-out.tsx
652
649
  function et({ className: e }) {
653
- let { authClient: t, basePaths: n, navigate: r, viewPaths: i } = m(), { mutate: a } = ie(t, {
650
+ let { authClient: t, basePaths: n, navigate: r, viewPaths: i } = m(), { mutate: a } = C(t, {
654
651
  onError: () => {
655
652
  r({
656
653
  to: `${n.auth}/${i.auth.signIn}`,
@@ -671,23 +668,23 @@ function et({ className: e }) {
671
668
  }
672
669
  //#endregion
673
670
  //#region src/components/auth/sign-up.tsx
674
- function tt({ className: t, socialLayout: n, socialPosition: i = "bottom", variant: o, ...s }) {
675
- let { additionalFields: c, authClient: u, basePaths: d, emailAndPassword: f, localization: p, plugins: h, redirectTo: g, socialProviders: _, viewPaths: y, navigate: b } = m(), { fetchOptions: ee, resetFetchOptions: x } = v(), [S, te] = X(""), [ne, C] = X(""), { mutate: re, isPending: ie } = ae(u, {
671
+ function tt({ className: t, socialLayout: n, socialPosition: i = "bottom", variant: o }) {
672
+ let { additionalFields: s, authClient: c, basePaths: u, emailAndPassword: d, localization: f, plugins: p, redirectTo: h, socialProviders: g, viewPaths: _, navigate: y } = m(), { fetchOptions: ee, resetFetchOptions: te } = v(), [b, x] = X(""), [ne, re] = X(""), { mutate: S, isPending: ie } = ae(c, {
676
673
  onError: () => {
677
- te(""), C(""), x();
674
+ x(""), re(""), te();
678
675
  },
679
676
  onSuccess: () => {
680
- f?.requireEmailVerification ? (Y.success(p.auth.verifyYourEmail), b({ to: `${d.auth}/${y.auth.signIn}` })) : b({ to: g });
677
+ d?.requireEmailVerification ? (Y.success(f.auth.verifyYourEmail), y({ to: `${u.auth}/${_.auth.signIn}` })) : y({ to: h });
681
678
  }
682
- }), [w, oe] = X(!1), [T, se] = X(!1), E = We({ mutationKey: a.signIn.all }) + We({ mutationKey: a.signUp.all }) > 0, ce = h.find((e) => e.captchaComponent)?.captchaComponent, le = async (e) => {
679
+ }), [C, oe] = X(!1), [w, se] = X(!1), T = We({ mutationKey: a.signIn.all }) + We({ mutationKey: a.signUp.all }) > 0, ce = p.find((e) => e.captchaComponent)?.captchaComponent, le = async (e) => {
683
680
  e.preventDefault();
684
681
  let t = new FormData(e.currentTarget), n = t.get("name") ?? "", r = t.get("email");
685
- if (f?.confirmPassword && S !== ne) {
686
- Y.danger(p.auth.passwordsDoNotMatch), te(""), C("");
682
+ if (d?.confirmPassword && b !== ne) {
683
+ Y.danger(f.auth.passwordsDoNotMatch), x(""), re("");
687
684
  return;
688
685
  }
689
686
  let i = {};
690
- for (let e of c ?? []) {
687
+ for (let e of s ?? []) {
691
688
  if (!e.signUp || e.readOnly) continue;
692
689
  let n = l(e, t.get(e.name));
693
690
  if (e.validate) try {
@@ -698,156 +695,155 @@ function tt({ className: t, socialLayout: n, socialPosition: i = "bottom", varia
698
695
  }
699
696
  n !== void 0 && (i[e.name] = n);
700
697
  }
701
- re({
698
+ S({
702
699
  name: n,
703
700
  email: r,
704
- password: S,
701
+ password: b,
705
702
  ...i,
706
703
  fetchOptions: ee
707
704
  });
708
- }, ue = f?.enabled && !!_?.length;
709
- return /* @__PURE__ */ $(j, {
705
+ }, ue = d?.enabled && !!g?.length;
706
+ return /* @__PURE__ */ $(A, {
710
707
  className: J("w-full max-w-sm gap-4 md:p-6", t),
711
708
  variant: o,
712
- ...s,
713
709
  children: [
714
- /* @__PURE__ */ Q(j.Header, { children: /* @__PURE__ */ Q(j.Title, {
710
+ /* @__PURE__ */ Q(A.Header, { children: /* @__PURE__ */ Q(A.Title, {
715
711
  className: "text-xl font-semibold mb-1",
716
- children: p.auth.signUp
712
+ children: f.auth.signUp
717
713
  }) }),
718
- /* @__PURE__ */ $(j.Content, {
714
+ /* @__PURE__ */ $(A.Content, {
719
715
  className: "gap-4",
720
716
  children: [
721
- i === "top" && /* @__PURE__ */ $(Z, { children: [!!_?.length && /* @__PURE__ */ Q(r, { socialLayout: n }), ue && /* @__PURE__ */ Q(e, { children: p.auth.or })] }),
722
- f?.enabled && /* @__PURE__ */ $(I, {
717
+ i === "top" && /* @__PURE__ */ $(Z, { children: [!!g?.length && /* @__PURE__ */ Q(r, { socialLayout: n }), ue && /* @__PURE__ */ Q(e, { children: f.auth.or })] }),
718
+ d?.enabled && /* @__PURE__ */ $(F, {
723
719
  onSubmit: le,
724
720
  className: "flex flex-col gap-4",
725
721
  children: [
726
- f.name !== !1 && /* @__PURE__ */ $(q, {
722
+ d.name !== !1 && /* @__PURE__ */ $(q, {
727
723
  name: "name",
728
724
  type: "text",
729
725
  autoComplete: "name",
730
- isDisabled: E,
726
+ isDisabled: T,
731
727
  validate: (e) => {
732
- if (!e) return p.auth.fieldRequired;
728
+ if (!e) return f.auth.fieldRequired;
733
729
  },
734
730
  children: [
735
- /* @__PURE__ */ Q(z, { children: p.auth.name }),
736
- /* @__PURE__ */ Q(L, {
737
- placeholder: p.auth.namePlaceholder,
731
+ /* @__PURE__ */ Q(R, { children: f.auth.name }),
732
+ /* @__PURE__ */ Q(I, {
733
+ placeholder: f.auth.namePlaceholder,
738
734
  required: !0,
739
735
  variant: o === "transparent" ? "primary" : "secondary"
740
736
  }),
741
- /* @__PURE__ */ Q(P, {})
737
+ /* @__PURE__ */ Q(N, {})
742
738
  ]
743
739
  }),
744
740
  /* @__PURE__ */ $(q, {
745
741
  name: "email",
746
742
  type: "email",
747
743
  autoComplete: "email",
748
- isDisabled: E,
744
+ isDisabled: T,
749
745
  validate: (e) => {
750
- if (!e) return p.auth.fieldRequired;
751
- if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)) return p.auth.invalidEmail;
746
+ if (!e) return f.auth.fieldRequired;
747
+ if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)) return f.auth.invalidEmail;
752
748
  },
753
749
  children: [
754
- /* @__PURE__ */ Q(z, { children: p.auth.email }),
755
- /* @__PURE__ */ Q(L, {
756
- placeholder: p.auth.emailPlaceholder,
750
+ /* @__PURE__ */ Q(R, { children: f.auth.email }),
751
+ /* @__PURE__ */ Q(I, {
752
+ placeholder: f.auth.emailPlaceholder,
757
753
  required: !0,
758
754
  variant: o === "transparent" ? "primary" : "secondary"
759
755
  }),
760
- /* @__PURE__ */ Q(P, {})
756
+ /* @__PURE__ */ Q(N, {})
761
757
  ]
762
758
  }),
763
- c?.map((e) => e.signUp === "above" && /* @__PURE__ */ Q(Xe, {
759
+ s?.map((e) => e.signUp === "above" && /* @__PURE__ */ Q(Xe, {
764
760
  name: e.name,
765
761
  field: e,
766
- isPending: E,
762
+ isPending: T,
767
763
  variant: o
768
764
  }, e.name)),
769
765
  /* @__PURE__ */ $(q, {
770
- minLength: f?.minPasswordLength,
771
- maxLength: f?.maxPasswordLength,
766
+ minLength: d?.minPasswordLength,
767
+ maxLength: d?.maxPasswordLength,
772
768
  name: "password",
773
769
  autoComplete: "new-password",
774
- isDisabled: E,
775
- value: S,
776
- onChange: te,
770
+ isDisabled: T,
771
+ value: b,
772
+ onChange: x,
777
773
  validate: (e) => {
778
- if (!e) return p.auth.fieldRequired;
779
- let t = f?.minPasswordLength, n = f?.maxPasswordLength;
780
- if (t && e.length < t) return p.auth.tooShort.replace("{{min}}", String(t));
781
- if (n && e.length > n) return p.auth.tooLong.replace("{{max}}", String(n));
774
+ if (!e) return f.auth.fieldRequired;
775
+ let t = d?.minPasswordLength, n = d?.maxPasswordLength;
776
+ if (t && e.length < t) return f.auth.tooShort.replace("{{min}}", String(t));
777
+ if (n && e.length > n) return f.auth.tooLong.replace("{{max}}", String(n));
782
778
  },
783
779
  children: [
784
- /* @__PURE__ */ Q(z, { children: p.auth.password }),
785
- /* @__PURE__ */ $(R, {
780
+ /* @__PURE__ */ Q(R, { children: f.auth.password }),
781
+ /* @__PURE__ */ $(L, {
786
782
  variant: o === "transparent" ? "primary" : "secondary",
787
- children: [/* @__PURE__ */ Q(R.Input, {
788
- placeholder: p.auth.passwordPlaceholder,
789
- type: w ? "text" : "password",
783
+ children: [/* @__PURE__ */ Q(L.Input, {
784
+ placeholder: f.auth.passwordPlaceholder,
785
+ type: C ? "text" : "password",
790
786
  name: "password",
791
787
  required: !0
792
- }), /* @__PURE__ */ Q(R.Suffix, {
788
+ }), /* @__PURE__ */ Q(L.Suffix, {
793
789
  className: "px-0",
794
- children: /* @__PURE__ */ Q(k, {
790
+ children: /* @__PURE__ */ Q(O, {
795
791
  isIconOnly: !0,
796
- "aria-label": w ? p.auth.hidePassword : p.auth.showPassword,
792
+ "aria-label": C ? f.auth.hidePassword : f.auth.showPassword,
797
793
  size: "sm",
798
794
  variant: "ghost",
799
- onPress: () => oe(!w),
800
- isDisabled: E,
801
- children: Q(w ? O : D, {})
795
+ onPress: () => oe(!C),
796
+ isDisabled: T,
797
+ children: Q(C ? D : E, {})
802
798
  })
803
799
  })]
804
800
  }),
805
- /* @__PURE__ */ Q(P, {})
801
+ /* @__PURE__ */ Q(N, {})
806
802
  ]
807
803
  }),
808
- f?.confirmPassword && /* @__PURE__ */ $(q, {
809
- minLength: f?.minPasswordLength,
810
- maxLength: f?.maxPasswordLength,
804
+ d?.confirmPassword && /* @__PURE__ */ $(q, {
805
+ minLength: d?.minPasswordLength,
806
+ maxLength: d?.maxPasswordLength,
811
807
  name: "confirmPassword",
812
808
  autoComplete: "new-password",
813
- isDisabled: E,
809
+ isDisabled: T,
814
810
  value: ne,
815
- onChange: C,
811
+ onChange: re,
816
812
  validate: (e) => {
817
- if (!e) return p.auth.fieldRequired;
818
- let t = f?.minPasswordLength, n = f?.maxPasswordLength;
819
- if (t && e.length < t) return p.auth.tooShort.replace("{{min}}", String(t));
820
- if (n && e.length > n) return p.auth.tooLong.replace("{{max}}", String(n));
813
+ if (!e) return f.auth.fieldRequired;
814
+ let t = d?.minPasswordLength, n = d?.maxPasswordLength;
815
+ if (t && e.length < t) return f.auth.tooShort.replace("{{min}}", String(t));
816
+ if (n && e.length > n) return f.auth.tooLong.replace("{{max}}", String(n));
821
817
  },
822
818
  children: [
823
- /* @__PURE__ */ Q(z, { children: p.auth.confirmPassword }),
824
- /* @__PURE__ */ $(R, {
819
+ /* @__PURE__ */ Q(R, { children: f.auth.confirmPassword }),
820
+ /* @__PURE__ */ $(L, {
825
821
  variant: o === "transparent" ? "primary" : "secondary",
826
- children: [/* @__PURE__ */ Q(R.Input, {
822
+ children: [/* @__PURE__ */ Q(L.Input, {
827
823
  name: "confirmPassword",
828
- placeholder: p.auth.confirmPasswordPlaceholder,
829
- type: T ? "text" : "password",
824
+ placeholder: f.auth.confirmPasswordPlaceholder,
825
+ type: w ? "text" : "password",
830
826
  required: !0
831
- }), /* @__PURE__ */ Q(R.Suffix, {
827
+ }), /* @__PURE__ */ Q(L.Suffix, {
832
828
  className: "px-0",
833
- children: /* @__PURE__ */ Q(k, {
829
+ children: /* @__PURE__ */ Q(O, {
834
830
  isIconOnly: !0,
835
- "aria-label": T ? p.auth.hidePassword : p.auth.showPassword,
831
+ "aria-label": w ? f.auth.hidePassword : f.auth.showPassword,
836
832
  size: "sm",
837
833
  variant: "ghost",
838
- onPress: () => se(!T),
839
- isDisabled: E,
840
- children: Q(T ? O : D, {})
834
+ onPress: () => se(!w),
835
+ isDisabled: T,
836
+ children: Q(w ? D : E, {})
841
837
  })
842
838
  })]
843
839
  }),
844
- /* @__PURE__ */ Q(P, {})
840
+ /* @__PURE__ */ Q(N, {})
845
841
  ]
846
842
  }),
847
- c?.map((e) => e.signUp && e.signUp !== "above" && /* @__PURE__ */ Q(Xe, {
843
+ s?.map((e) => e.signUp && e.signUp !== "above" && /* @__PURE__ */ Q(Xe, {
848
844
  name: e.name,
849
845
  field: e,
850
- isPending: E,
846
+ isPending: T,
851
847
  variant: o
852
848
  }, e.name)),
853
849
  ce && /* @__PURE__ */ Q("div", {
@@ -856,32 +852,32 @@ function tt({ className: t, socialLayout: n, socialPosition: i = "bottom", varia
856
852
  }),
857
853
  /* @__PURE__ */ $("div", {
858
854
  className: "flex flex-col gap-3",
859
- children: [/* @__PURE__ */ $(k, {
855
+ children: [/* @__PURE__ */ $(O, {
860
856
  type: "submit",
861
857
  className: "w-full",
862
- isPending: E,
858
+ isPending: T,
863
859
  children: [ie && /* @__PURE__ */ Q(G, {
864
860
  color: "current",
865
861
  size: "sm"
866
- }), p.auth.signUp]
867
- }), h.flatMap((e) => e.authButtons?.map((t, n) => /* @__PURE__ */ Q(t, { view: "signUp" }, `${e.id}-${n.toString()}`)))]
862
+ }), f.auth.signUp]
863
+ }), p.flatMap((e) => e.authButtons?.map((t, n) => /* @__PURE__ */ Q(t, { view: "signUp" }, `${e.id}-${n.toString()}`)))]
868
864
  })
869
865
  ]
870
866
  }),
871
- i === "bottom" && /* @__PURE__ */ $(Z, { children: [ue && /* @__PURE__ */ Q(e, { children: p.auth.or }), !!_?.length && /* @__PURE__ */ Q(r, { socialLayout: n })] })
867
+ i === "bottom" && /* @__PURE__ */ $(Z, { children: [ue && /* @__PURE__ */ Q(e, { children: f.auth.or }), !!g?.length && /* @__PURE__ */ Q(r, { socialLayout: n })] })
872
868
  ]
873
869
  }),
874
- /* @__PURE__ */ Q(j.Footer, {
870
+ /* @__PURE__ */ Q(A.Footer, {
875
871
  className: "flex-col gap-3",
876
- children: /* @__PURE__ */ $(Ee, {
872
+ children: /* @__PURE__ */ $(De, {
877
873
  className: "text-sm",
878
874
  children: [
879
- p.auth.alreadyHaveAnAccount,
875
+ f.auth.alreadyHaveAnAccount,
880
876
  " ",
881
- /* @__PURE__ */ Q(B, {
882
- href: `${d.auth}/${y.auth.signIn}`,
877
+ /* @__PURE__ */ Q(z, {
878
+ href: `${u.auth}/${_.auth.signIn}`,
883
879
  className: "text-accent no-underline hover:underline decoration-accent-hover",
884
- children: p.auth.signIn
880
+ children: f.auth.signIn
885
881
  })
886
882
  ]
887
883
  })
@@ -902,45 +898,48 @@ var nt = [
902
898
  forgotPassword: Ze,
903
899
  resetPassword: Qe
904
900
  };
905
- function it({ path: e, socialLayout: t, socialPosition: n, view: r, ...i }) {
906
- let { basePaths: a, emailAndPassword: o, plugins: s, viewPaths: c, navigate: l } = m();
907
- if (!r && !e) throw Error("[Better Auth UI] Either `view` or `path` must be provided");
908
- let u = r || Object.keys(c.auth).find((t) => c.auth[t] === e), d = !o?.enabled && u && nt.includes(u);
901
+ function it({ className: e, path: t, socialLayout: n, socialPosition: r, variant: i, view: a }) {
902
+ let { basePaths: o, emailAndPassword: s, plugins: c, viewPaths: l, navigate: u } = m();
903
+ if (!a && !t) throw Error("[Better Auth UI] Either `view` or `path` must be provided");
904
+ let d = a || Object.keys(l.auth).find((e) => l.auth[e] === t), f = !s?.enabled && d && nt.includes(d);
909
905
  if (ze(() => {
910
- d && l({
911
- to: `${a.auth}/${c.auth.signIn}`,
906
+ f && u({
907
+ to: `${o.auth}/${l.auth.signIn}`,
912
908
  replace: !0
913
909
  });
914
910
  }, [
915
- d,
916
- l,
917
- a.auth,
918
- c.auth.signIn
919
- ]), d) return null;
920
- for (let a of s) {
921
- let o = a.viewPaths?.auth, s = r ?? u ?? (o && Object.keys(o).find((t) => o[t] === e));
922
- if (!s) continue;
923
- let c = a.views?.auth?.[s];
924
- if (c) return /* @__PURE__ */ Q(c, {
925
- socialLayout: t,
926
- socialPosition: n,
927
- ...i
911
+ f,
912
+ u,
913
+ o.auth,
914
+ l.auth.signIn
915
+ ]), f) return null;
916
+ for (let o of c) {
917
+ let s = o.viewPaths?.auth, c = a ?? d ?? (s && Object.keys(s).find((e) => s[e] === t));
918
+ if (!c) continue;
919
+ let l = o.views?.auth?.[c];
920
+ if (l) return /* @__PURE__ */ Q(l, {
921
+ className: e,
922
+ socialLayout: n,
923
+ socialPosition: r,
924
+ variant: i
928
925
  });
929
926
  }
930
- if (u === "signIn" && !o?.enabled) {
931
- let e = s.find((e) => e.fallbackViews?.auth?.signIn)?.fallbackViews?.auth?.signIn;
932
- if (e) return /* @__PURE__ */ Q(e, {
933
- socialLayout: t,
934
- socialPosition: n,
935
- ...i
927
+ if (d === "signIn" && !s?.enabled) {
928
+ let t = c.find((e) => e.fallbackViews?.auth?.signIn)?.fallbackViews?.auth?.signIn;
929
+ if (t) return /* @__PURE__ */ Q(t, {
930
+ className: e,
931
+ socialLayout: n,
932
+ socialPosition: r,
933
+ variant: i
936
934
  });
937
935
  }
938
- let f = u ? rt[u] : void 0;
939
- if (!f) throw Error(`[Better Auth UI] Unknown view "${u}". Valid views are: ${Object.keys(rt).join(", ")}`);
940
- return /* @__PURE__ */ Q(f, {
941
- socialLayout: t,
942
- socialPosition: n,
943
- ...i
936
+ let p = d ? rt[d] : void 0;
937
+ if (!p) throw Error(`[Better Auth UI] Unknown view "${d}". Valid views are: ${Object.keys(rt).join(", ")}`);
938
+ return /* @__PURE__ */ Q(p, {
939
+ className: e,
940
+ socialLayout: n,
941
+ socialPosition: r,
942
+ variant: i
944
943
  });
945
944
  }
946
945
  //#endregion
@@ -970,7 +969,7 @@ function ot({ children: e, navigate: t, ...n }) {
970
969
  return /* @__PURE__ */ Q(d, {
971
970
  navigate: t,
972
971
  ...n,
973
- children: /* @__PURE__ */ $(De, {
972
+ children: /* @__PURE__ */ $(Oe, {
974
973
  navigate: (e) => t({ to: e }),
975
974
  children: [e, /* @__PURE__ */ Q(at, {})]
976
975
  })
@@ -979,7 +978,7 @@ function ot({ children: e, navigate: t, ...n }) {
979
978
  //#endregion
980
979
  //#region src/components/auth/settings/account/change-email.tsx
981
980
  function st({ className: e, variant: t, ...n }) {
982
- let { authClient: r, localization: i, baseURL: a, viewPaths: o } = m(), { data: s } = C(r), { mutate: c, isPending: l } = g(r, { onSuccess: () => Y.success(i.settings.changeEmailSuccess) });
981
+ let { authClient: r, localization: i, baseURL: a, viewPaths: o } = m(), { data: s } = S(r), { mutate: c, isPending: l } = g(r, { onSuccess: () => Y.success(i.settings.changeEmailSuccess) });
983
982
  function u(e) {
984
983
  e.preventDefault(), c({
985
984
  newEmail: new FormData(e.currentTarget).get("email"),
@@ -989,30 +988,30 @@ function st({ className: e, variant: t, ...n }) {
989
988
  return /* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q("h2", {
990
989
  className: J("text-sm font-semibold mb-3"),
991
990
  children: i.settings.changeEmail
992
- }), /* @__PURE__ */ Q(j, {
991
+ }), /* @__PURE__ */ Q(A, {
993
992
  className: J("p-4 gap-4", e),
994
993
  variant: t,
995
994
  ...n,
996
- children: /* @__PURE__ */ Q(j.Content, { children: /* @__PURE__ */ Q(I, {
995
+ children: /* @__PURE__ */ Q(A.Content, { children: /* @__PURE__ */ Q(F, {
997
996
  onSubmit: u,
998
- children: /* @__PURE__ */ $(F, {
997
+ children: /* @__PURE__ */ $(P, {
999
998
  className: "w-full gap-4",
1000
- children: [/* @__PURE__ */ Q(F.Group, { children: /* @__PURE__ */ $(q, {
999
+ children: [/* @__PURE__ */ Q(P.Group, { children: /* @__PURE__ */ $(q, {
1001
1000
  name: "email",
1002
1001
  type: "email",
1003
1002
  defaultValue: s?.user.email,
1004
1003
  isDisabled: l || !s,
1005
1004
  children: [
1006
- /* @__PURE__ */ Q(z, { children: i.auth.email }),
1007
- s ? /* @__PURE__ */ Q(L, {
1005
+ /* @__PURE__ */ Q(R, { children: i.auth.email }),
1006
+ s ? /* @__PURE__ */ Q(I, {
1008
1007
  required: !0,
1009
1008
  variant: t === "transparent" ? "primary" : "secondary",
1010
1009
  autoComplete: "email",
1011
1010
  placeholder: i.auth.emailPlaceholder
1012
- }) : /* @__PURE__ */ Q(W, { className: "h-10 md:h-9 w-full rounded-xl" }),
1013
- /* @__PURE__ */ Q(P, {})
1011
+ }) : /* @__PURE__ */ Q(U, { className: "h-10 md:h-9 w-full rounded-xl" }),
1012
+ /* @__PURE__ */ Q(N, {})
1014
1013
  ]
1015
- }, `${s?.user.id}-${s?.user.email}-email`) }), /* @__PURE__ */ Q(F.Actions, { children: /* @__PURE__ */ $(k, {
1014
+ }, `${s?.user.id}-${s?.user.email}-email`) }), /* @__PURE__ */ Q(P.Actions, { children: /* @__PURE__ */ $(O, {
1016
1015
  type: "submit",
1017
1016
  isPending: l,
1018
1017
  isDisabled: !s,
@@ -1029,7 +1028,7 @@ function st({ className: e, variant: t, ...n }) {
1029
1028
  //#endregion
1030
1029
  //#region src/components/auth/settings/account/change-avatar.tsx
1031
1030
  function ct({ className: e }) {
1032
- let { authClient: t, localization: r, avatar: i } = m(), { data: a } = C(t), { mutate: o, isPending: c } = oe(t), l = Ve(null), [u, d] = X(!1), [f, p] = X(!1), h = c || u || f;
1031
+ let { authClient: t, localization: r, avatar: i } = m(), { data: a } = S(t), { mutate: o, isPending: c } = w(t), l = Ve(null), [u, d] = X(!1), [f, p] = X(!1), h = c || u || f;
1033
1032
  async function g(e) {
1034
1033
  let t = e.target.files?.[0];
1035
1034
  if (t) {
@@ -1060,7 +1059,7 @@ function ct({ className: e }) {
1060
1059
  return /* @__PURE__ */ $("div", {
1061
1060
  className: J("flex flex-col gap-1", e),
1062
1061
  children: [
1063
- /* @__PURE__ */ Q(z, {
1062
+ /* @__PURE__ */ Q(R, {
1064
1063
  isDisabled: !a,
1065
1064
  children: r.settings.avatar
1066
1065
  }),
@@ -1073,7 +1072,7 @@ function ct({ className: e }) {
1073
1072
  }),
1074
1073
  /* @__PURE__ */ $("div", {
1075
1074
  className: "flex items-center gap-4",
1076
- children: [/* @__PURE__ */ Q(k, {
1075
+ children: [/* @__PURE__ */ Q(O, {
1077
1076
  type: "button",
1078
1077
  isIconOnly: !0,
1079
1078
  variant: "ghost",
@@ -1084,23 +1083,23 @@ function ct({ className: e }) {
1084
1083
  size: "lg",
1085
1084
  isPending: h
1086
1085
  })
1087
- }), /* @__PURE__ */ $(N, { children: [/* @__PURE__ */ $(k, {
1086
+ }), /* @__PURE__ */ $(M, { children: [/* @__PURE__ */ $(O, {
1088
1087
  isDisabled: !a || h,
1089
1088
  size: "sm",
1090
1089
  variant: "secondary",
1091
1090
  children: [h && /* @__PURE__ */ Q(G, { size: "sm" }), r.settings.changeAvatar]
1092
- }), /* @__PURE__ */ Q(N.Popover, {
1091
+ }), /* @__PURE__ */ Q(M.Popover, {
1093
1092
  className: "min-w-fit",
1094
- children: /* @__PURE__ */ $(N.Menu, { children: [/* @__PURE__ */ $(N.Item, {
1093
+ children: /* @__PURE__ */ $(M.Menu, { children: [/* @__PURE__ */ $(M.Item, {
1095
1094
  textValue: r.settings.uploadAvatar,
1096
1095
  onAction: () => l.current?.click(),
1097
- children: [/* @__PURE__ */ Q(le, { className: "text-muted" }), /* @__PURE__ */ Q(z, { children: r.settings.uploadAvatar })]
1098
- }), /* @__PURE__ */ $(N.Item, {
1096
+ children: [/* @__PURE__ */ Q(ue, { className: "text-muted" }), /* @__PURE__ */ Q(R, { children: r.settings.uploadAvatar })]
1097
+ }), /* @__PURE__ */ $(M.Item, {
1099
1098
  textValue: r.settings.deleteAvatar,
1100
1099
  isDisabled: !a?.user.image,
1101
1100
  onAction: _,
1102
1101
  variant: "danger",
1103
- children: [/* @__PURE__ */ Q(be, { className: "text-danger" }), /* @__PURE__ */ Q(z, { children: r.settings.deleteAvatar })]
1102
+ children: [/* @__PURE__ */ Q(xe, { className: "text-danger" }), /* @__PURE__ */ Q(R, { children: r.settings.deleteAvatar })]
1104
1103
  })] })
1105
1104
  })] })]
1106
1105
  })
@@ -1110,7 +1109,7 @@ function ct({ className: e }) {
1110
1109
  //#endregion
1111
1110
  //#region src/components/auth/settings/account/user-profile.tsx
1112
1111
  function lt({ className: e, variant: t, ...n }) {
1113
- let { additionalFields: r, authClient: i, localization: a } = m(), { data: o } = C(i), { mutate: s, isPending: c } = oe(i, { onSuccess: () => Y.success(a.settings.profileUpdatedSuccess) });
1112
+ let { additionalFields: r, authClient: i, localization: a } = m(), { data: o } = S(i), { mutate: s, isPending: c } = w(i, { onSuccess: () => Y.success(a.settings.profileUpdatedSuccess) });
1114
1113
  async function u(e) {
1115
1114
  e.preventDefault();
1116
1115
  let t = new FormData(e.currentTarget), n = t.get("name"), i = {};
@@ -1133,11 +1132,11 @@ function lt({ className: e, variant: t, ...n }) {
1133
1132
  return /* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q("h2", {
1134
1133
  className: J("text-sm font-semibold mb-3"),
1135
1134
  children: a.settings.userProfile
1136
- }), /* @__PURE__ */ Q(j, {
1135
+ }), /* @__PURE__ */ Q(A, {
1137
1136
  className: J("p-4 gap-4", e),
1138
1137
  variant: t,
1139
1138
  ...n,
1140
- children: /* @__PURE__ */ Q(j.Content, { children: /* @__PURE__ */ $(I, {
1139
+ children: /* @__PURE__ */ Q(A.Content, { children: /* @__PURE__ */ $(F, {
1141
1140
  onSubmit: u,
1142
1141
  className: "flex flex-col gap-4",
1143
1142
  children: [
@@ -1147,19 +1146,19 @@ function lt({ className: e, variant: t, ...n }) {
1147
1146
  defaultValue: o?.user.name,
1148
1147
  isDisabled: c || !o,
1149
1148
  children: [
1150
- /* @__PURE__ */ Q(z, { children: a.auth.name }),
1151
- /* @__PURE__ */ Q(L, {
1149
+ /* @__PURE__ */ Q(R, { children: a.auth.name }),
1150
+ /* @__PURE__ */ Q(I, {
1152
1151
  className: J(!o && "hidden"),
1153
1152
  autoComplete: "name",
1154
1153
  placeholder: a.auth.name,
1155
1154
  variant: t === "transparent" ? "primary" : "secondary"
1156
1155
  }),
1157
- !o && /* @__PURE__ */ Q(W, { className: "h-10 md:h-9 w-full rounded-xl" }),
1158
- /* @__PURE__ */ Q(P, {})
1156
+ !o && /* @__PURE__ */ Q(U, { className: "h-10 md:h-9 w-full rounded-xl" }),
1157
+ /* @__PURE__ */ Q(N, {})
1159
1158
  ]
1160
1159
  }, `${o?.user?.id}-${o?.user?.name}-name`),
1161
1160
  r?.filter((e) => e.profile !== !1).map((e) => {
1162
- if (!o) return e.inputType === "hidden" ? null : /* @__PURE__ */ Q(W, { className: "h-10 md:h-9 w-full rounded-xl" }, e.name);
1161
+ if (!o) return e.inputType === "hidden" ? null : /* @__PURE__ */ Q(U, { className: "h-10 md:h-9 w-full rounded-xl" }, e.name);
1163
1162
  let n = o.user[e.name], r = `${o.user.id}-${e.name}-${n instanceof Date ? n.toISOString() : String(n ?? "")}`;
1164
1163
  return /* @__PURE__ */ Q(Xe, {
1165
1164
  name: e.name,
@@ -1171,7 +1170,7 @@ function lt({ className: e, variant: t, ...n }) {
1171
1170
  variant: t
1172
1171
  }, r);
1173
1172
  }),
1174
- /* @__PURE__ */ $(k, {
1173
+ /* @__PURE__ */ $(O, {
1175
1174
  type: "submit",
1176
1175
  isPending: c,
1177
1176
  isDisabled: !o,
@@ -1216,20 +1215,20 @@ function dt(e) {
1216
1215
  return n.format(0, "second");
1217
1216
  }
1218
1217
  function ft({ activeSession: e }) {
1219
- let { authClient: t, basePaths: n, localization: r, viewPaths: i, navigate: a } = m(), { data: o } = C(t, { refetchOnMount: !1 }), { mutate: s, isPending: c } = te(t, { onSuccess: () => Y.success(r.settings.revokeSessionSuccess) }), l = e.token === o?.session.token, u = Ke.parse(e.userAgent || "");
1218
+ let { authClient: t, basePaths: n, localization: r, viewPaths: i, navigate: a } = m(), { data: o } = S(t, { refetchOnMount: !1 }), { mutate: s, isPending: c } = ne(t, { onSuccess: () => Y.success(r.settings.revokeSessionSuccess) }), l = e.token === o?.session.token, u = Ke.parse(e.userAgent || "");
1220
1219
  return /* @__PURE__ */ $("div", {
1221
1220
  className: "flex items-center gap-3",
1222
1221
  children: [
1223
1222
  /* @__PURE__ */ Q("div", {
1224
1223
  className: "flex size-10 shrink-0 items-center justify-center rounded-xl bg-surface-secondary",
1225
- children: u.platform.type === "mobile" || u.platform.type === "tablet" ? /* @__PURE__ */ Q(ye, { className: "size-4.5" }) : /* @__PURE__ */ Q(de, { className: "size-4.5" })
1224
+ children: u.platform.type === "mobile" || u.platform.type === "tablet" ? /* @__PURE__ */ Q(be, { className: "size-4.5" }) : /* @__PURE__ */ Q(fe, { className: "size-4.5" })
1226
1225
  }),
1227
1226
  /* @__PURE__ */ $("div", {
1228
1227
  className: "flex flex-col min-w-0",
1229
1228
  children: [/* @__PURE__ */ $("span", {
1230
1229
  className: "text-sm font-medium truncate",
1231
1230
  children: [u.browser.name || "Unknown Browser", u.os.name ? `, ${u.os.name}` : ""]
1232
- }), l ? /* @__PURE__ */ Q(Se, {
1231
+ }), l ? /* @__PURE__ */ Q(Ce, {
1233
1232
  color: "accent",
1234
1233
  size: "sm",
1235
1234
  children: r.settings.currentSession
@@ -1238,7 +1237,7 @@ function ft({ activeSession: e }) {
1238
1237
  children: dt(e.createdAt)
1239
1238
  })]
1240
1239
  }),
1241
- /* @__PURE__ */ $(k, {
1240
+ /* @__PURE__ */ $(O, {
1242
1241
  className: "ml-auto shrink-0",
1243
1242
  variant: "outline",
1244
1243
  size: "sm",
@@ -1248,7 +1247,7 @@ function ft({ activeSession: e }) {
1248
1247
  children: [c ? /* @__PURE__ */ Q(G, {
1249
1248
  color: "current",
1250
1249
  size: "sm"
1251
- }) : Q(l ? T : xe, {}), l ? r.auth.signOut : r.settings.revoke]
1250
+ }) : Q(l ? se : Se, {}), l ? r.auth.signOut : r.settings.revoke]
1252
1251
  })
1253
1252
  ]
1254
1253
  });
@@ -1256,15 +1255,15 @@ function ft({ activeSession: e }) {
1256
1255
  //#endregion
1257
1256
  //#region src/components/auth/settings/security/active-sessions.tsx
1258
1257
  function pt({ className: e, variant: t, ...n }) {
1259
- let { authClient: r, localization: i } = m(), { data: a } = C(r), { data: o, isPending: s } = ee(r), c = o && [...o].sort((e, t) => e.id === a?.session.id ? -1 : +(t.id === a?.session.id));
1258
+ let { authClient: r, localization: i } = m(), { data: a } = S(r), { data: o, isPending: s } = te(r), c = o && [...o].sort((e, t) => e.id === a?.session.id ? -1 : +(t.id === a?.session.id));
1260
1259
  return /* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q("h2", {
1261
1260
  className: J("text-sm font-semibold mb-3"),
1262
1261
  children: i.settings.activeSessions
1263
- }), /* @__PURE__ */ Q(j, {
1262
+ }), /* @__PURE__ */ Q(A, {
1264
1263
  className: J(e),
1265
1264
  variant: t,
1266
1265
  ...n,
1267
- children: /* @__PURE__ */ Q(j.Content, {
1266
+ children: /* @__PURE__ */ Q(A.Content, {
1268
1267
  className: "gap-0",
1269
1268
  children: s ? /* @__PURE__ */ Q(mt, {}) : c?.map((e, t) => /* @__PURE__ */ $("div", { children: [t > 0 && /* @__PURE__ */ Q("div", { className: "border-b border-dashed -mx-4 my-4" }), /* @__PURE__ */ Q(ft, { activeSession: e })] }, e.id))
1270
1269
  })
@@ -1275,9 +1274,9 @@ function mt() {
1275
1274
  className: "flex items-center justify-between",
1276
1275
  children: /* @__PURE__ */ $("div", {
1277
1276
  className: "flex items-center gap-3",
1278
- children: [/* @__PURE__ */ Q(W, { className: "size-10 rounded-xl" }), /* @__PURE__ */ $("div", {
1277
+ children: [/* @__PURE__ */ Q(U, { className: "size-10 rounded-xl" }), /* @__PURE__ */ $("div", {
1279
1278
  className: "flex flex-col gap-1",
1280
- children: [/* @__PURE__ */ Q(W, { className: "h-4 w-32 rounded-lg" }), /* @__PURE__ */ Q(W, { className: "h-3 w-24 rounded-lg" })]
1279
+ children: [/* @__PURE__ */ Q(U, { className: "h-4 w-32 rounded-lg" }), /* @__PURE__ */ Q(U, { className: "h-3 w-24 rounded-lg" })]
1281
1280
  })]
1282
1281
  })
1283
1282
  });
@@ -1285,7 +1284,7 @@ function mt() {
1285
1284
  //#endregion
1286
1285
  //#region src/components/auth/settings/security/change-password.tsx
1287
1286
  function ht({ className: e, variant: t, ...n }) {
1288
- let { authClient: r, emailAndPassword: i, localization: a } = m(), { data: o } = C(r), { data: s, isPending: c } = b(r), l = s?.some((e) => e.providerId === "credential");
1287
+ let { authClient: r, emailAndPassword: i, localization: a } = m(), { data: o } = S(r), { data: s, isPending: c } = ee(r), l = s?.some((e) => e.providerId === "credential");
1289
1288
  return !c && !l ? /* @__PURE__ */ Q(gt, {
1290
1289
  className: e,
1291
1290
  variant: t,
@@ -1300,7 +1299,7 @@ function ht({ className: e, variant: t, ...n }) {
1300
1299
  });
1301
1300
  }
1302
1301
  function gt({ className: e, variant: t, ...n }) {
1303
- let { authClient: r, localization: i, plugins: a } = m(), { data: o } = C(r), { fetchOptions: s, resetFetchOptions: c } = v(), { mutate: l, isPending: u } = x(r, {
1302
+ let { authClient: r, localization: i, plugins: a } = m(), { data: o } = S(r), { fetchOptions: s, resetFetchOptions: c } = v(), { mutate: l, isPending: u } = b(r, {
1304
1303
  onError: () => {
1305
1304
  c();
1306
1305
  },
@@ -1314,11 +1313,11 @@ function gt({ className: e, variant: t, ...n }) {
1314
1313
  return /* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q("h2", {
1315
1314
  className: J("text-sm font-semibold mb-3"),
1316
1315
  children: i.settings.changePassword
1317
- }), /* @__PURE__ */ Q(j, {
1316
+ }), /* @__PURE__ */ Q(A, {
1318
1317
  className: J(e),
1319
1318
  variant: t,
1320
1319
  ...n,
1321
- children: /* @__PURE__ */ $(j.Content, {
1320
+ children: /* @__PURE__ */ $(A.Content, {
1322
1321
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
1323
1322
  children: [/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q("p", {
1324
1323
  className: "text-sm font-medium leading-tight",
@@ -1328,7 +1327,7 @@ function gt({ className: e, variant: t, ...n }) {
1328
1327
  children: i.settings.setPasswordDescription
1329
1328
  })] }), /* @__PURE__ */ $("div", {
1330
1329
  className: "flex flex-col gap-3 items-start sm:items-end",
1331
- children: [d && /* @__PURE__ */ Q("div", { children: d }), /* @__PURE__ */ $(k, {
1330
+ children: [d && /* @__PURE__ */ Q("div", { children: d }), /* @__PURE__ */ $(O, {
1332
1331
  size: "sm",
1333
1332
  isPending: u,
1334
1333
  isDisabled: !o?.user.email,
@@ -1350,7 +1349,7 @@ function _t({ className: e, variant: t, emailAndPassword: n, localization: r, se
1350
1349
  onSuccess: () => {
1351
1350
  c(""), u(""), f(""), Y.success(r.settings.changePasswordSuccess);
1352
1351
  }
1353
- }), [g, v] = X(!1), [y, b] = X(!1), ee = (e) => {
1352
+ }), [g, v] = X(!1), [y, ee] = X(!1), te = (e) => {
1354
1353
  if (e.preventDefault(), n?.confirmPassword && l !== d) {
1355
1354
  c(""), u(""), f(""), Y.danger(r.auth.passwordsDoNotMatch);
1356
1355
  return;
@@ -1364,15 +1363,15 @@ function _t({ className: e, variant: t, emailAndPassword: n, localization: r, se
1364
1363
  return /* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q("h2", {
1365
1364
  className: J("text-sm font-semibold mb-3"),
1366
1365
  children: r.settings.changePassword
1367
- }), /* @__PURE__ */ Q(j, {
1366
+ }), /* @__PURE__ */ Q(A, {
1368
1367
  className: J("p-4 gap-4", e),
1369
1368
  variant: t,
1370
1369
  ...a,
1371
- children: /* @__PURE__ */ Q(j.Content, { children: /* @__PURE__ */ Q(I, {
1372
- onSubmit: ee,
1373
- children: /* @__PURE__ */ $(F, {
1370
+ children: /* @__PURE__ */ Q(A.Content, { children: /* @__PURE__ */ Q(F, {
1371
+ onSubmit: te,
1372
+ children: /* @__PURE__ */ $(P, {
1374
1373
  className: "w-full gap-4",
1375
- children: [/* @__PURE__ */ $(F.Group, { children: [
1374
+ children: [/* @__PURE__ */ $(P.Group, { children: [
1376
1375
  /* @__PURE__ */ $(q, {
1377
1376
  name: "currentPassword",
1378
1377
  type: "password",
@@ -1381,16 +1380,16 @@ function _t({ className: e, variant: t, emailAndPassword: n, localization: r, se
1381
1380
  value: s,
1382
1381
  onChange: c,
1383
1382
  children: [
1384
- /* @__PURE__ */ Q(z, { children: r.settings.currentPassword }),
1385
- /* @__PURE__ */ Q(L, {
1383
+ /* @__PURE__ */ Q(R, { children: r.settings.currentPassword }),
1384
+ /* @__PURE__ */ Q(I, {
1386
1385
  className: J(!i && "hidden"),
1387
1386
  autoComplete: "current-password",
1388
1387
  placeholder: r.settings.currentPasswordPlaceholder,
1389
1388
  required: !0,
1390
1389
  variant: t === "transparent" ? "primary" : "secondary"
1391
1390
  }),
1392
- !i && /* @__PURE__ */ Q(W, { className: "h-10 md:h-9 w-full rounded-xl" }),
1393
- /* @__PURE__ */ Q(P, {})
1391
+ !i && /* @__PURE__ */ Q(U, { className: "h-10 md:h-9 w-full rounded-xl" }),
1392
+ /* @__PURE__ */ Q(N, {})
1394
1393
  ]
1395
1394
  }),
1396
1395
  /* @__PURE__ */ $(q, {
@@ -1400,31 +1399,31 @@ function _t({ className: e, variant: t, emailAndPassword: n, localization: r, se
1400
1399
  value: l,
1401
1400
  onChange: u,
1402
1401
  children: [
1403
- /* @__PURE__ */ Q(z, { children: r.auth.newPassword }),
1404
- /* @__PURE__ */ $(R, {
1402
+ /* @__PURE__ */ Q(R, { children: r.auth.newPassword }),
1403
+ /* @__PURE__ */ $(L, {
1405
1404
  className: J(!i && "hidden"),
1406
1405
  variant: t === "transparent" ? "primary" : "secondary",
1407
- children: [/* @__PURE__ */ Q(R.Input, {
1406
+ children: [/* @__PURE__ */ Q(L.Input, {
1408
1407
  name: "newPassword",
1409
1408
  type: g ? "text" : "password",
1410
1409
  autoComplete: "new-password",
1411
1410
  placeholder: r.auth.newPasswordPlaceholder,
1412
1411
  required: !0
1413
- }), /* @__PURE__ */ Q(R.Suffix, {
1412
+ }), /* @__PURE__ */ Q(L.Suffix, {
1414
1413
  className: "px-0",
1415
- children: /* @__PURE__ */ Q(k, {
1414
+ children: /* @__PURE__ */ Q(O, {
1416
1415
  isIconOnly: !0,
1417
1416
  "aria-label": g ? r.auth.hidePassword : r.auth.showPassword,
1418
1417
  size: "sm",
1419
1418
  variant: "ghost",
1420
1419
  onPress: () => v(!g),
1421
1420
  isDisabled: h,
1422
- children: Q(g ? O : D, {})
1421
+ children: Q(g ? D : E, {})
1423
1422
  })
1424
1423
  })]
1425
1424
  }),
1426
- !i && /* @__PURE__ */ Q(W, { className: "h-10 md:h-9 w-full rounded-xl" }),
1427
- /* @__PURE__ */ Q(P, {})
1425
+ !i && /* @__PURE__ */ Q(U, { className: "h-10 md:h-9 w-full rounded-xl" }),
1426
+ /* @__PURE__ */ Q(N, {})
1428
1427
  ]
1429
1428
  }),
1430
1429
  n?.confirmPassword && /* @__PURE__ */ $(q, {
@@ -1435,34 +1434,34 @@ function _t({ className: e, variant: t, emailAndPassword: n, localization: r, se
1435
1434
  value: d,
1436
1435
  onChange: f,
1437
1436
  children: [
1438
- /* @__PURE__ */ Q(z, { children: r.auth.confirmPassword }),
1439
- /* @__PURE__ */ $(R, {
1437
+ /* @__PURE__ */ Q(R, { children: r.auth.confirmPassword }),
1438
+ /* @__PURE__ */ $(L, {
1440
1439
  className: J(!i && "hidden"),
1441
1440
  variant: t === "transparent" ? "primary" : "secondary",
1442
- children: [/* @__PURE__ */ Q(R.Input, {
1441
+ children: [/* @__PURE__ */ Q(L.Input, {
1443
1442
  name: "confirmPassword",
1444
1443
  type: y ? "text" : "password",
1445
1444
  autoComplete: "new-password",
1446
1445
  placeholder: r.auth.confirmPasswordPlaceholder,
1447
1446
  required: !0
1448
- }), /* @__PURE__ */ Q(R.Suffix, {
1447
+ }), /* @__PURE__ */ Q(L.Suffix, {
1449
1448
  className: "px-0",
1450
- children: /* @__PURE__ */ Q(k, {
1449
+ children: /* @__PURE__ */ Q(O, {
1451
1450
  isIconOnly: !0,
1452
1451
  "aria-label": y ? r.auth.hidePassword : r.auth.showPassword,
1453
1452
  size: "sm",
1454
1453
  variant: "ghost",
1455
- onPress: () => b(!y),
1454
+ onPress: () => ee(!y),
1456
1455
  isDisabled: h,
1457
- children: Q(y ? O : D, {})
1456
+ children: Q(y ? D : E, {})
1458
1457
  })
1459
1458
  })]
1460
1459
  }),
1461
- !i && /* @__PURE__ */ Q(W, { className: "h-10 md:h-9 w-full rounded-xl" }),
1462
- /* @__PURE__ */ Q(P, {})
1460
+ !i && /* @__PURE__ */ Q(U, { className: "h-10 md:h-9 w-full rounded-xl" }),
1461
+ /* @__PURE__ */ Q(N, {})
1463
1462
  ]
1464
1463
  })
1465
- ] }), /* @__PURE__ */ Q(F.Actions, { children: /* @__PURE__ */ $(k, {
1464
+ ] }), /* @__PURE__ */ Q(P.Actions, { children: /* @__PURE__ */ $(O, {
1466
1465
  type: "submit",
1467
1466
  isPending: h,
1468
1467
  isDisabled: !i,
@@ -1479,25 +1478,25 @@ function _t({ className: e, variant: t, emailAndPassword: n, localization: r, se
1479
1478
  //#endregion
1480
1479
  //#region src/components/auth/settings/security/linked-account.tsx
1481
1480
  function vt({ account: e, provider: t }) {
1482
- let { authClient: n, baseURL: r, localization: i } = m(), { data: a, isPending: o } = p(n, { query: { accountId: e?.accountId } }), { mutate: s, isPending: l } = y(n), { mutate: u, isPending: d } = w(n, { onSuccess: () => Y.success(i.settings.accountUnlinked) }), h = f[t], g = c(t), _ = a?.data?.login || a?.data?.username || a?.user?.email || a?.user?.name || e?.accountId;
1481
+ let { authClient: n, baseURL: r, localization: i } = m(), { data: a, isPending: o } = p(n, { query: { accountId: e?.accountId } }), { mutate: s, isPending: l } = y(n), { mutate: u, isPending: d } = oe(n, { onSuccess: () => Y.success(i.settings.accountUnlinked) }), h = f[t], g = c(t), _ = a?.data?.login || a?.data?.username || a?.user?.email || a?.user?.name || e?.accountId;
1483
1482
  return /* @__PURE__ */ $("div", {
1484
1483
  className: "flex items-center gap-3",
1485
1484
  children: [
1486
1485
  /* @__PURE__ */ Q("div", {
1487
1486
  className: J("flex size-10 shrink-0 items-center justify-center rounded-xl bg-surface-secondary"),
1488
- children: Q(h || _e, { className: "size-4.5" })
1487
+ children: Q(h || ve, { className: "size-4.5" })
1489
1488
  }),
1490
1489
  /* @__PURE__ */ $("div", {
1491
1490
  className: "flex flex-col min-w-0",
1492
1491
  children: [/* @__PURE__ */ Q("span", {
1493
1492
  className: "text-sm font-medium leading-tight",
1494
1493
  children: g
1495
- }), e && o ? /* @__PURE__ */ Q(W, { className: "h-3 w-24 my-0.5 rounded-lg" }) : /* @__PURE__ */ Q("span", {
1494
+ }), e && o ? /* @__PURE__ */ Q(U, { className: "h-3 w-24 my-0.5 rounded-lg" }) : /* @__PURE__ */ Q("span", {
1496
1495
  className: "text-xs text-muted truncate",
1497
1496
  children: e ? _ : i.settings.linkProvider.replace("{{provider}}", g)
1498
1497
  })]
1499
1498
  }),
1500
- e ? /* @__PURE__ */ $(k, {
1499
+ e ? /* @__PURE__ */ $(O, {
1501
1500
  className: "ml-auto shrink-0",
1502
1501
  variant: "outline",
1503
1502
  size: "sm",
@@ -1507,8 +1506,8 @@ function vt({ account: e, provider: t }) {
1507
1506
  children: [d ? /* @__PURE__ */ Q(G, {
1508
1507
  color: "current",
1509
1508
  size: "sm"
1510
- }) : /* @__PURE__ */ Q(me, {}), i.settings.unlinkProvider.replace("{{provider}}", "").trim()]
1511
- }) : /* @__PURE__ */ $(k, {
1509
+ }) : /* @__PURE__ */ Q(he, {}), i.settings.unlinkProvider.replace("{{provider}}", "").trim()]
1510
+ }) : /* @__PURE__ */ $(O, {
1512
1511
  className: "ml-auto shrink-0",
1513
1512
  variant: "outline",
1514
1513
  size: "sm",
@@ -1521,7 +1520,7 @@ function vt({ account: e, provider: t }) {
1521
1520
  children: [l ? /* @__PURE__ */ Q(G, {
1522
1521
  color: "current",
1523
1522
  size: "sm"
1524
- }) : /* @__PURE__ */ Q(pe, {}), i.settings.link]
1523
+ }) : /* @__PURE__ */ Q(me, {}), i.settings.link]
1525
1524
  })
1526
1525
  ]
1527
1526
  });
@@ -1529,7 +1528,7 @@ function vt({ account: e, provider: t }) {
1529
1528
  //#endregion
1530
1529
  //#region src/components/auth/settings/security/linked-accounts.tsx
1531
1530
  function yt({ className: e, variant: t, ...n }) {
1532
- let { authClient: r, localization: i, multipleAccountsPerProvider: a, socialProviders: o } = m(), { data: s, isPending: c } = b(r), l = s?.filter((e) => e.providerId !== "credential"), u = new Set(l?.map((e) => e.providerId)), d = a === !1 ? o?.filter((e) => !u.has(e)) : o, f = [...l?.map((e) => ({
1531
+ let { authClient: r, localization: i, multipleAccountsPerProvider: a, socialProviders: o } = m(), { data: s, isPending: c } = ee(r), l = s?.filter((e) => e.providerId !== "credential"), u = new Set(l?.map((e) => e.providerId)), d = a === !1 ? o?.filter((e) => !u.has(e)) : o, f = [...l?.map((e) => ({
1533
1532
  key: e.id,
1534
1533
  account: e,
1535
1534
  provider: e.providerId
@@ -1541,11 +1540,11 @@ function yt({ className: e, variant: t, ...n }) {
1541
1540
  return /* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q("h2", {
1542
1541
  className: J("text-sm font-semibold mb-3"),
1543
1542
  children: i.settings.linkedAccounts
1544
- }), /* @__PURE__ */ Q(j, {
1543
+ }), /* @__PURE__ */ Q(A, {
1545
1544
  className: J(e),
1546
1545
  variant: t,
1547
1546
  ...n,
1548
- children: /* @__PURE__ */ Q(j.Content, {
1547
+ children: /* @__PURE__ */ Q(A.Content, {
1549
1548
  className: "gap-0",
1550
1549
  children: c ? o?.map((e, t) => /* @__PURE__ */ $("div", { children: [t > 0 && /* @__PURE__ */ Q("div", { className: "border-b border-dashed -mx-4 my-4" }), /* @__PURE__ */ Q(bt, {})] }, e)) : f.map((e, t) => /* @__PURE__ */ $("div", { children: [t > 0 && /* @__PURE__ */ Q("div", { className: "border-b border-dashed -mx-4 my-4" }), /* @__PURE__ */ Q(vt, {
1551
1550
  account: e.account,
@@ -1559,9 +1558,9 @@ function bt() {
1559
1558
  className: "flex items-center justify-between",
1560
1559
  children: /* @__PURE__ */ $("div", {
1561
1560
  className: "flex items-center gap-3",
1562
- children: [/* @__PURE__ */ Q(W, { className: "size-10 rounded-xl" }), /* @__PURE__ */ $("div", {
1561
+ children: [/* @__PURE__ */ Q(U, { className: "size-10 rounded-xl" }), /* @__PURE__ */ $("div", {
1563
1562
  className: "flex flex-col gap-1",
1564
- children: [/* @__PURE__ */ Q(W, { className: "h-4 w-20 rounded-lg" }), /* @__PURE__ */ Q(W, { className: "h-3 w-32 rounded-lg" })]
1563
+ children: [/* @__PURE__ */ Q(U, { className: "h-4 w-20 rounded-lg" }), /* @__PURE__ */ Q(U, { className: "h-3 w-32 rounded-lg" })]
1565
1564
  })]
1566
1565
  })
1567
1566
  });
@@ -1619,7 +1618,7 @@ function St({ className: e, hideNav: t, path: n, variant: r, view: i, ...a }) {
1619
1618
  inline: "center"
1620
1619
  }),
1621
1620
  children: [
1622
- /* @__PURE__ */ Q(he, { className: "text-muted" }),
1621
+ /* @__PURE__ */ Q(ge, { className: "text-muted" }),
1623
1622
  c.settings.account,
1624
1623
  /* @__PURE__ */ Q(K.Indicator, {})
1625
1624
  ]
@@ -1633,7 +1632,7 @@ function St({ className: e, hideNav: t, path: n, variant: r, view: i, ...a }) {
1633
1632
  inline: "center"
1634
1633
  }),
1635
1634
  children: [
1636
- /* @__PURE__ */ Q(ve, { className: "text-muted" }),
1635
+ /* @__PURE__ */ Q(ye, { className: "text-muted" }),
1637
1636
  c.settings.security,
1638
1637
  /* @__PURE__ */ Q(K.Indicator, {})
1639
1638
  ]
@@ -1673,25 +1672,25 @@ function St({ className: e, hideNav: t, path: n, variant: r, view: i, ...a }) {
1673
1672
  function Ct(e, t) {
1674
1673
  if (Re(e)) return e;
1675
1674
  let { label: n, href: r, icon: i, variant: a } = e;
1676
- return /* @__PURE__ */ $(N.Item, {
1675
+ return /* @__PURE__ */ $(M.Item, {
1677
1676
  href: r,
1678
1677
  variant: a,
1679
1678
  textValue: typeof n == "string" ? n : void 0,
1680
- children: [i, /* @__PURE__ */ Q(z, { children: n })]
1679
+ children: [i, /* @__PURE__ */ Q(R, { children: n })]
1681
1680
  }, t);
1682
1681
  }
1683
1682
  function wt({ className: e, placement: t, size: r = "default", variant: a = "ghost", links: o, hideSettings: s, hideSubtitle: c }) {
1684
- let { authClient: l, basePaths: u, viewPaths: d, localization: f, plugins: p } = m(), { data: h, isPending: g } = C(l), _ = p.flatMap((e) => e.userMenuItems?.map((t, n) => /* @__PURE__ */ Q(t, { hideSubtitle: c }, `${e.id}-${n.toString()}`)) ?? []), v = o?.flatMap((e, t) => {
1683
+ let { authClient: l, basePaths: u, viewPaths: d, localization: f, plugins: p } = m(), { data: h, isPending: g } = S(l), _ = p.flatMap((e) => e.userMenuItems?.map((t, n) => /* @__PURE__ */ Q(t, { hideSubtitle: c }, `${e.id}-${n.toString()}`)) ?? []), v = o?.flatMap((e, t) => {
1685
1684
  if (!Re(e)) {
1686
1685
  let t = e.visibility ?? "always";
1687
1686
  if (t === "authenticated" && !h || t === "unauthenticated" && h) return [];
1688
1687
  }
1689
1688
  return [Ct(e, `user-button-link-${t.toString()}`)];
1690
1689
  });
1691
- return /* @__PURE__ */ $(N, { children: [r === "icon" ? /* @__PURE__ */ Q(N.Trigger, {
1692
- className: J("rounded-full", e),
1693
- children: /* @__PURE__ */ Q(n, {})
1694
- }) : /* @__PURE__ */ $(k, {
1690
+ return /* @__PURE__ */ $(M, { children: [r === "icon" ? /* @__PURE__ */ Q(M.Trigger, {
1691
+ className: J("rounded-full"),
1692
+ children: /* @__PURE__ */ Q(n, { className: e })
1693
+ }) : /* @__PURE__ */ $(O, {
1695
1694
  variant: a,
1696
1695
  className: J("h-auto font-normal justify-start px-2 py-2 text-left", e),
1697
1696
  children: [h || g ? /* @__PURE__ */ Q(i, {
@@ -1700,38 +1699,38 @@ function wt({ className: e, placement: t, size: r = "default", variant: a = "gho
1700
1699
  }) : /* @__PURE__ */ $(Z, { children: [/* @__PURE__ */ Q(n, {}), /* @__PURE__ */ Q("p", {
1701
1700
  className: "text-sm font-medium",
1702
1701
  children: f.auth.account
1703
- })] }), /* @__PURE__ */ Q(ce, { className: "ml-auto size-3 text-muted" })]
1704
- }), /* @__PURE__ */ $(N.Popover, {
1702
+ })] }), /* @__PURE__ */ Q(le, { className: "ml-auto size-3 text-muted" })]
1703
+ }), /* @__PURE__ */ $(M.Popover, {
1705
1704
  placement: t,
1706
1705
  className: "min-w-40 md:min-w-56 max-w-[48svw]",
1707
1706
  children: [h && /* @__PURE__ */ Q("div", {
1708
1707
  className: "px-3 pt-3 pb-1",
1709
1708
  children: /* @__PURE__ */ Q(i, { hideSubtitle: c })
1710
- }), /* @__PURE__ */ Q(N.Menu, { children: h ? /* @__PURE__ */ $(Z, { children: [
1709
+ }), /* @__PURE__ */ Q(M.Menu, { children: h ? /* @__PURE__ */ $(Z, { children: [
1711
1710
  v,
1712
- !s && /* @__PURE__ */ $(N.Item, {
1711
+ !s && /* @__PURE__ */ $(M.Item, {
1713
1712
  textValue: f.settings.settings,
1714
1713
  href: `${u.settings}/${d.settings.account}`,
1715
- children: [/* @__PURE__ */ Q(fe, { className: "text-muted" }), /* @__PURE__ */ Q(z, { children: f.settings.settings })]
1714
+ children: [/* @__PURE__ */ Q(pe, { className: "text-muted" }), /* @__PURE__ */ Q(R, { children: f.settings.settings })]
1716
1715
  }),
1717
1716
  _,
1718
- /* @__PURE__ */ $(N.Item, {
1717
+ /* @__PURE__ */ $(M.Item, {
1719
1718
  textValue: f.auth.signOut,
1720
1719
  href: `${u.auth}/${d.auth.signOut}`,
1721
1720
  variant: "danger",
1722
- children: [/* @__PURE__ */ Q(T, { className: "text-danger" }), /* @__PURE__ */ Q(z, { children: f.auth.signOut })]
1721
+ children: [/* @__PURE__ */ Q(se, { className: "text-danger" }), /* @__PURE__ */ Q(R, { children: f.auth.signOut })]
1723
1722
  })
1724
1723
  ] }) : /* @__PURE__ */ $(Z, { children: [
1725
1724
  v,
1726
- /* @__PURE__ */ $(N.Item, {
1725
+ /* @__PURE__ */ $(M.Item, {
1727
1726
  textValue: f.auth.signIn,
1728
1727
  href: `${u.auth}/${d.auth.signIn}`,
1729
- children: [/* @__PURE__ */ Q(se, { className: "text-muted" }), /* @__PURE__ */ Q(z, { children: f.auth.signIn })]
1728
+ children: [/* @__PURE__ */ Q(T, { className: "text-muted" }), /* @__PURE__ */ Q(R, { children: f.auth.signIn })]
1730
1729
  }),
1731
- /* @__PURE__ */ $(N.Item, {
1730
+ /* @__PURE__ */ $(M.Item, {
1732
1731
  textValue: f.auth.signUp,
1733
1732
  href: `${u.auth}/${d.auth.signUp}`,
1734
- children: [/* @__PURE__ */ Q(ge, { className: "text-muted" }), /* @__PURE__ */ Q(z, { children: f.auth.signUp })]
1733
+ children: [/* @__PURE__ */ Q(_e, { className: "text-muted" }), /* @__PURE__ */ Q(R, { children: f.auth.signUp })]
1735
1734
  }),
1736
1735
  _
1737
1736
  ] }) })]