@better-auth-ui/heroui 1.6.28 → 1.6.29

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/plugins.js CHANGED
@@ -1,19 +1,19 @@
1
1
  "use client";
2
- import { a as e, o as t, r as n, t as r } from "./user-view-CxSDufx_.js";
3
- import { authMutationKeys as i, authQueryKeys as a, createAuthPlugin as o, fileToBase64 as s } from "@better-auth-ui/core";
4
- import { ThemePreviewDark as c, ThemePreviewLight as l, ThemePreviewSystem as u, useAcceptInvitation as d, useActiveOrganization as f, useAddPasskey as p, useAuth as m, useAuthPlugin as h, useAuthenticate as g, useCancelInvitation as _, useCheckSlug as v, useCreateApiKey as y, useCreateOrganization as b, useDeleteApiKey as x, useDeleteOrganization as S, useDeletePasskey as C, useDeleteUser as ee, useFetchOptions as w, useHasPermission as T, useInviteMember as te, useIsUsernameAvailable as ne, useLeaveOrganization as re, useListAccounts as ie, useListApiKeys as ae, useListDeviceSessions as oe, useListOrganizationInvitations as se, useListOrganizationMembers as ce, useListOrganizations as le, useListPasskeys as ue, useListUserInvitations as de, useRejectInvitation as fe, useRemoveMember as pe, useRevokeMultiSession as me, useSession as E, useSetActiveOrganization as he, useSetActiveSession as ge, useSignInEmail as _e, useSignInMagicLink as ve, useSignInPasskey as ye, useSignInUsername as be, useUpdateMemberRole as xe, useUpdateOrganization as Se, useUser as Ce } from "@better-auth-ui/react";
5
- import { ArrowRightArrowLeft as we, ArrowRightFromSquare as Te, Briefcase as Ee, Check as De, ChevronsExpandVertical as Oe, CirclePlus as ke, Clock as Ae, CloudArrowUpIn as je, Copy as Me, Display as Ne, Ellipsis as Pe, Envelope as Fe, Fingerprint as Ie, Funnel as Le, Gear as Re, Key as ze, Lock as Be, Moon as Ve, Palette as He, PaperPlane as Ue, Pencil as We, Person as Ge, PersonPlus as Ke, Sun as qe, TrashBin as Je, TriangleExclamation as Ye, Xmark as D } from "@gravity-ui/icons";
6
- import { AlertDialog as O, Avatar as Xe, Button as k, Card as A, Checkbox as Ze, Chip as j, Description as Qe, Dropdown as M, EmptyState as $e, FieldError as N, Form as P, Input as F, InputGroup as I, Label as L, Link as et, ListBox as tt, Radio as R, RadioGroup as nt, SearchField as z, Select as rt, Skeleton as B, Spinner as V, Table as H, Tabs as U, TextField as W, cn as G, toast as K, useIsHydrated as it } from "@heroui/react";
7
- import { useEffect as at, useMemo as ot, useRef as st, useState as q } from "react";
8
- import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
2
+ import { a as e, o as t, r as n, s as r, t as i } from "./user-view-D9ial2fQ.js";
3
+ import { authMutationKeys as a, authQueryKeys as o, createAuthPlugin as s, fileToBase64 as c } from "@better-auth-ui/core";
4
+ import { ThemePreviewDark as l, ThemePreviewLight as u, ThemePreviewSystem as d, useAcceptInvitation as f, useActiveOrganization as p, useAddPasskey as m, useAuth as h, useAuthPlugin as g, useAuthenticate as _, useCancelInvitation as v, useCheckSlug as y, useCreateApiKey as b, useCreateOrganization as x, useDeleteApiKey as S, useDeleteOrganization as C, useDeletePasskey as w, useDeleteUser as ee, useFetchOptions as te, useHasPermission as T, useInviteMember as ne, useIsUsernameAvailable as re, useLeaveOrganization as ie, useListAccounts as E, useListApiKeys as ae, useListDeviceSessions as oe, useListOrganizationInvitations as se, useListOrganizationMembers as ce, useListOrganizations as le, useListPasskeys as ue, useListUserInvitations as de, useRejectInvitation as fe, useRemoveMember as pe, useRevokeMultiSession as me, useSession as D, useSetActiveOrganization as he, useSetActiveSession as ge, useSignInEmail as _e, useSignInMagicLink as ve, useSignInPasskey as ye, useSignInUsername as be, useUpdateMemberRole as xe, useUpdateOrganization as Se, useUser as Ce } from "@better-auth-ui/react";
5
+ import { ArrowRightArrowLeft as we, ArrowRightFromSquare as Te, Briefcase as Ee, Check as De, ChevronsExpandVertical as Oe, CirclePlus as ke, Clock as Ae, CloudArrowUpIn as je, Copy as Me, Display as Ne, Ellipsis as Pe, Envelope as Fe, Fingerprint as Ie, Funnel as Le, Gear as Re, Key as ze, Lock as Be, Moon as Ve, Palette as He, PaperPlane as Ue, Pencil as We, Person as Ge, PersonPlus as Ke, Sun as qe, TrashBin as Je, TriangleExclamation as Ye, Xmark as O } from "@gravity-ui/icons";
6
+ import { AlertDialog as k, Avatar as Xe, Button as A, Card as j, Checkbox as Ze, Chip as M, Description as Qe, Dropdown as N, EmptyState as $e, FieldError as P, Form as F, Input as I, InputGroup as L, Label as R, Link as et, ListBox as tt, Radio as z, RadioGroup as nt, SearchField as B, Select as rt, Skeleton as V, Spinner as H, Table as U, Tabs as W, TextField as G, cn as K, toast as q, useIsHydrated as it } from "@heroui/react";
7
+ import { useEffect as at, useMemo as ot, useRef as st, useState as J } from "react";
8
+ import { Fragment as Y, jsx as X, jsxs as Z } from "react/jsx-runtime";
9
9
  import { buttonVariants as ct } from "@heroui/styles";
10
- import { useIsMutating as Z, useQueryClient as lt } from "@tanstack/react-query";
11
- import { apiKeyPlugin as ut, deleteUserPlugin as dt, magicLinkPlugin as ft, multiSessionPlugin as pt, organizationPlugin as mt, passkeyPlugin as ht, themePlugin as gt, usernamePlugin as _t } from "@better-auth-ui/core/plugins";
12
- import { useDebouncer as vt } from "@tanstack/react-pacer";
10
+ import { useIsMutating as lt, useQueryClient as ut } from "@tanstack/react-query";
11
+ import { apiKeyPlugin as dt, deleteUserPlugin as ft, lastLoginMethodPlugin as pt, magicLinkPlugin as mt, multiSessionPlugin as ht, organizationPlugin as gt, passkeyPlugin as _t, themePlugin as vt, usernamePlugin as yt } from "@better-auth-ui/core/plugins";
12
+ import { useDebouncer as bt } from "@tanstack/react-pacer";
13
13
  //#region src/components/auth/api-key/organization-api-keys.tsx
14
- function yt({ className: e, variant: t }) {
15
- let { authClient: n } = m(), { data: r } = E(n), { data: i, isPending: a } = f(n), { data: o } = ce(n);
16
- return o?.members.some((e) => e.role === "owner" && e.userId === r?.user.id) ? /* @__PURE__ */ Y(Dt, {
14
+ function xt({ className: e, variant: t }) {
15
+ let { authClient: n } = h(), { data: r } = D(n), { data: i, isPending: a } = p(n), { data: o } = ce(n);
16
+ return o?.members.some((e) => e.role === "owner" && e.userId === r?.user.id) ? /* @__PURE__ */ X(kt, {
17
17
  className: e,
18
18
  variant: t,
19
19
  organizationId: i?.id,
@@ -22,55 +22,55 @@ function yt({ className: e, variant: t }) {
22
22
  }
23
23
  //#endregion
24
24
  //#region src/lib/auth/api-key-plugin.ts
25
- var bt = o(ut.id, (e = {}) => {
26
- let t = ut(e);
25
+ var St = s(dt.id, (e = {}) => {
26
+ let t = dt(e);
27
27
  return {
28
28
  ...t,
29
- securityCards: [Dt],
30
- ...t.organization ? { organizationCards: [yt] } : {}
29
+ securityCards: [kt],
30
+ ...t.organization ? { organizationCards: [xt] } : {}
31
31
  };
32
32
  });
33
33
  //#endregion
34
34
  //#region src/components/auth/api-key/delete-api-key-dialog.tsx
35
- function xt({ isOpen: e, onOpenChange: t, apiKey: n, organizationId: r }) {
36
- let { authClient: i, localization: a } = m(), { localization: o } = h(bt), s = `${n.start}${"*".repeat(16)}`, { mutate: c, isPending: l } = x(i, { onSuccess: () => t(!1) });
37
- return /* @__PURE__ */ Y(O.Backdrop, {
35
+ function Ct({ isOpen: e, onOpenChange: t, apiKey: n, organizationId: r }) {
36
+ let { authClient: i, localization: a } = h(), { localization: o } = g(St), s = `${n.start}${"*".repeat(16)}`, { mutate: c, isPending: l } = S(i, { onSuccess: () => t(!1) });
37
+ return /* @__PURE__ */ X(k.Backdrop, {
38
38
  isOpen: e,
39
39
  onOpenChange: t,
40
- children: /* @__PURE__ */ Y(O.Container, { children: /* @__PURE__ */ X(O.Dialog, { children: [
41
- /* @__PURE__ */ Y(O.CloseTrigger, {}),
42
- /* @__PURE__ */ X(O.Header, { children: [/* @__PURE__ */ Y(O.Icon, {
40
+ children: /* @__PURE__ */ X(k.Container, { children: /* @__PURE__ */ Z(k.Dialog, { children: [
41
+ /* @__PURE__ */ X(k.CloseTrigger, {}),
42
+ /* @__PURE__ */ Z(k.Header, { children: [/* @__PURE__ */ X(k.Icon, {
43
43
  status: "danger",
44
- children: /* @__PURE__ */ Y(ze, {})
45
- }), /* @__PURE__ */ Y(O.Heading, { children: o.deleteApiKey })] }),
46
- /* @__PURE__ */ X(O.Body, {
44
+ children: /* @__PURE__ */ X(ze, {})
45
+ }), /* @__PURE__ */ X(k.Heading, { children: o.deleteApiKey })] }),
46
+ /* @__PURE__ */ Z(k.Body, {
47
47
  className: "flex flex-col gap-4 overflow-visible",
48
- children: [/* @__PURE__ */ Y("p", {
48
+ children: [/* @__PURE__ */ X("p", {
49
49
  className: "text-muted text-sm",
50
50
  children: o.deleteApiKeyWarning
51
- }), /* @__PURE__ */ X(W, {
51
+ }), /* @__PURE__ */ Z(G, {
52
52
  value: s,
53
53
  className: "font-mono text-xs",
54
54
  variant: "secondary",
55
- children: [/* @__PURE__ */ Y(L, { children: n.name || o.apiKey }), /* @__PURE__ */ Y(F, {
55
+ children: [/* @__PURE__ */ X(R, { children: n.name || o.apiKey }), /* @__PURE__ */ X(I, {
56
56
  readOnly: !0,
57
57
  className: "font-mono text-xs"
58
58
  })]
59
59
  })]
60
60
  }),
61
- /* @__PURE__ */ X(O.Footer, { children: [/* @__PURE__ */ Y(k, {
61
+ /* @__PURE__ */ Z(k.Footer, { children: [/* @__PURE__ */ X(A, {
62
62
  slot: "close",
63
63
  variant: "tertiary",
64
64
  isDisabled: l,
65
65
  children: a.settings.cancel
66
- }), /* @__PURE__ */ X(k, {
66
+ }), /* @__PURE__ */ Z(A, {
67
67
  variant: "danger",
68
68
  onPress: () => c({
69
69
  keyId: n.id,
70
70
  ...r ? { configId: "organization" } : {}
71
71
  }),
72
72
  isPending: l,
73
- children: [l && /* @__PURE__ */ Y(V, {
73
+ children: [l && /* @__PURE__ */ X(H, {
74
74
  color: "current",
75
75
  size: "sm"
76
76
  }), o.deleteApiKey]
@@ -80,27 +80,27 @@ function xt({ isOpen: e, onOpenChange: t, apiKey: n, organizationId: r }) {
80
80
  }
81
81
  //#endregion
82
82
  //#region src/components/auth/api-key/api-key.tsx
83
- function St({ apiKey: e, hideDelete: t, organizationId: n }) {
84
- let { localization: r } = m(), { localization: i } = h(bt), [a, o] = q(!1), s = `${e.start}${"*".repeat(16)}`;
85
- return /* @__PURE__ */ X("div", {
83
+ function wt({ apiKey: e, hideDelete: t, organizationId: n }) {
84
+ let { localization: r } = h(), { localization: i } = g(St), [a, o] = J(!1), s = `${e.start}${"*".repeat(16)}`;
85
+ return /* @__PURE__ */ Z("div", {
86
86
  className: "flex items-center gap-3",
87
87
  children: [
88
- /* @__PURE__ */ Y("div", {
88
+ /* @__PURE__ */ X("div", {
89
89
  className: "flex size-10 shrink-0 items-center justify-center rounded-xl bg-surface-secondary",
90
- children: /* @__PURE__ */ Y(ze, { className: "size-4.5" })
90
+ children: /* @__PURE__ */ X(ze, { className: "size-4.5" })
91
91
  }),
92
- /* @__PURE__ */ X("div", {
92
+ /* @__PURE__ */ Z("div", {
93
93
  className: "flex flex-col min-w-0",
94
94
  children: [
95
- /* @__PURE__ */ Y("span", {
95
+ /* @__PURE__ */ X("span", {
96
96
  className: "text-sm font-medium leading-tight truncate",
97
97
  children: e.name || i.apiKey
98
98
  }),
99
- /* @__PURE__ */ Y("span", {
99
+ /* @__PURE__ */ X("span", {
100
100
  className: "text-xs text-muted font-mono truncate",
101
101
  children: s
102
102
  }),
103
- /* @__PURE__ */ Y("span", {
103
+ /* @__PURE__ */ X("span", {
104
104
  className: "text-xs text-muted",
105
105
  children: new Date(e.createdAt).toLocaleString(void 0, {
106
106
  dateStyle: "medium",
@@ -109,14 +109,14 @@ function St({ apiKey: e, hideDelete: t, organizationId: n }) {
109
109
  })
110
110
  ]
111
111
  }),
112
- !t && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(k, {
112
+ !t && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ Z(A, {
113
113
  className: "ml-auto shrink-0",
114
114
  variant: "outline",
115
115
  size: "sm",
116
116
  onPress: () => o(!0),
117
117
  "aria-label": i.deleteApiKey,
118
- children: [/* @__PURE__ */ Y(D, {}), r.settings.delete]
119
- }), /* @__PURE__ */ Y(xt, {
118
+ children: [/* @__PURE__ */ X(O, {}), r.settings.delete]
119
+ }), /* @__PURE__ */ X(Ct, {
120
120
  isOpen: a,
121
121
  onOpenChange: o,
122
122
  apiKey: e,
@@ -127,17 +127,17 @@ function St({ apiKey: e, hideDelete: t, organizationId: n }) {
127
127
  }
128
128
  //#endregion
129
129
  //#region src/components/auth/api-key/api-key-skeleton.tsx
130
- function Ct() {
131
- return /* @__PURE__ */ Y("div", {
130
+ function Tt() {
131
+ return /* @__PURE__ */ X("div", {
132
132
  className: "flex items-center justify-between",
133
- children: /* @__PURE__ */ X("div", {
133
+ children: /* @__PURE__ */ Z("div", {
134
134
  className: "flex items-center gap-3",
135
- children: [/* @__PURE__ */ Y(B, { className: "size-10 rounded-xl" }), /* @__PURE__ */ X("div", {
135
+ children: [/* @__PURE__ */ X(V, { className: "size-10 rounded-xl" }), /* @__PURE__ */ Z("div", {
136
136
  className: "flex flex-col gap-1",
137
137
  children: [
138
- /* @__PURE__ */ Y(B, { className: "h-4 w-28 rounded-lg" }),
139
- /* @__PURE__ */ Y(B, { className: "h-3 w-36 rounded-lg" }),
140
- /* @__PURE__ */ Y(B, { className: "h-3 w-32 rounded-lg" })
138
+ /* @__PURE__ */ X(V, { className: "h-4 w-28 rounded-lg" }),
139
+ /* @__PURE__ */ X(V, { className: "h-3 w-36 rounded-lg" }),
140
+ /* @__PURE__ */ X(V, { className: "h-3 w-32 rounded-lg" })
141
141
  ]
142
142
  })]
143
143
  })
@@ -145,26 +145,26 @@ function Ct() {
145
145
  }
146
146
  //#endregion
147
147
  //#region src/components/auth/api-key/api-keys-empty.tsx
148
- function wt({ onCreatePress: e, hideCreate: t }) {
149
- let { localization: n } = h(bt);
150
- return /* @__PURE__ */ X("div", {
148
+ function Et({ onCreatePress: e, hideCreate: t }) {
149
+ let { localization: n } = g(St);
150
+ return /* @__PURE__ */ Z("div", {
151
151
  className: "flex flex-col items-center justify-center gap-4",
152
152
  children: [
153
- /* @__PURE__ */ Y("div", {
153
+ /* @__PURE__ */ X("div", {
154
154
  className: "flex size-10 items-center justify-center rounded-xl bg-surface-secondary",
155
- children: /* @__PURE__ */ Y(ze, { className: "size-4.5" })
155
+ children: /* @__PURE__ */ X(ze, { className: "size-4.5" })
156
156
  }),
157
- /* @__PURE__ */ X("div", {
157
+ /* @__PURE__ */ Z("div", {
158
158
  className: "flex flex-col items-center justify-center gap-1 text-center",
159
- children: [/* @__PURE__ */ Y("p", {
159
+ children: [/* @__PURE__ */ X("p", {
160
160
  className: "text-sm font-semibold",
161
161
  children: n.noApiKeys
162
- }), /* @__PURE__ */ Y("p", {
162
+ }), /* @__PURE__ */ X("p", {
163
163
  className: "text-muted text-xs",
164
164
  children: n.apiKeysDescription
165
165
  })]
166
166
  }),
167
- !t && /* @__PURE__ */ Y(k, {
167
+ !t && /* @__PURE__ */ X(A, {
168
168
  size: "sm",
169
169
  onPress: e,
170
170
  children: n.createApiKey
@@ -174,33 +174,33 @@ function wt({ onCreatePress: e, hideCreate: t }) {
174
174
  }
175
175
  //#endregion
176
176
  //#region src/components/auth/api-key/new-api-key-dialog.tsx
177
- function Tt({ isOpen: e, onOpenChange: t, name: n, secretKey: r }) {
178
- let { localization: i } = m(), { localization: a } = h(bt), [o, s] = q(!1);
179
- return /* @__PURE__ */ Y(O.Backdrop, {
177
+ function Dt({ isOpen: e, onOpenChange: t, name: n, secretKey: r }) {
178
+ let { localization: i } = h(), { localization: a } = g(St), [o, s] = J(!1);
179
+ return /* @__PURE__ */ X(k.Backdrop, {
180
180
  isOpen: e,
181
181
  onOpenChange: t,
182
- children: /* @__PURE__ */ Y(O.Container, { children: /* @__PURE__ */ X(O.Dialog, { children: [
183
- /* @__PURE__ */ Y(O.CloseTrigger, {}),
184
- /* @__PURE__ */ X(O.Header, { children: [/* @__PURE__ */ Y(O.Icon, {
182
+ children: /* @__PURE__ */ X(k.Container, { children: /* @__PURE__ */ Z(k.Dialog, { children: [
183
+ /* @__PURE__ */ X(k.CloseTrigger, {}),
184
+ /* @__PURE__ */ Z(k.Header, { children: [/* @__PURE__ */ X(k.Icon, {
185
185
  status: "warning",
186
- children: /* @__PURE__ */ Y(ze, {})
187
- }), /* @__PURE__ */ Y(O.Heading, { children: a.newApiKey })] }),
188
- /* @__PURE__ */ X(O.Body, {
186
+ children: /* @__PURE__ */ X(ze, {})
187
+ }), /* @__PURE__ */ X(k.Heading, { children: a.newApiKey })] }),
188
+ /* @__PURE__ */ Z(k.Body, {
189
189
  className: "flex flex-col gap-4 overflow-visible",
190
- children: [/* @__PURE__ */ Y("p", {
190
+ children: [/* @__PURE__ */ X("p", {
191
191
  className: "text-muted text-sm",
192
192
  children: a.newApiKeyWarning
193
- }), /* @__PURE__ */ X(W, {
193
+ }), /* @__PURE__ */ Z(G, {
194
194
  value: r ?? "",
195
195
  className: "font-mono text-xs",
196
- children: [/* @__PURE__ */ Y(L, { children: n || a.apiKey }), /* @__PURE__ */ X(I, {
196
+ children: [/* @__PURE__ */ X(R, { children: n || a.apiKey }), /* @__PURE__ */ Z(L, {
197
197
  variant: "secondary",
198
- children: [/* @__PURE__ */ Y(I.Input, {
198
+ children: [/* @__PURE__ */ X(L.Input, {
199
199
  readOnly: !0,
200
200
  className: "font-mono text-xs"
201
- }), /* @__PURE__ */ Y(I.Suffix, {
201
+ }), /* @__PURE__ */ X(L.Suffix, {
202
202
  className: "px-0",
203
- children: /* @__PURE__ */ Y(k, {
203
+ children: /* @__PURE__ */ X(A, {
204
204
  isIconOnly: !0,
205
205
  "aria-label": i.settings.copyToClipboard,
206
206
  size: "sm",
@@ -209,16 +209,16 @@ function Tt({ isOpen: e, onOpenChange: t, name: n, secretKey: r }) {
209
209
  if (r) try {
210
210
  await navigator.clipboard.writeText(r), s(!0), setTimeout(() => s(!1), 1500);
211
211
  } catch (e) {
212
- K.danger(e instanceof Error ? e.message : String(e));
212
+ q.danger(e instanceof Error ? e.message : String(e));
213
213
  }
214
214
  },
215
- children: Y(o ? De : Me, {})
215
+ children: X(o ? De : Me, {})
216
216
  })
217
217
  })]
218
218
  })]
219
219
  })]
220
220
  }),
221
- /* @__PURE__ */ Y(O.Footer, { children: /* @__PURE__ */ Y(k, {
221
+ /* @__PURE__ */ X(k.Footer, { children: /* @__PURE__ */ X(A, {
222
222
  slot: "close",
223
223
  children: a.dismissNewKey
224
224
  }) })
@@ -227,14 +227,14 @@ function Tt({ isOpen: e, onOpenChange: t, name: n, secretKey: r }) {
227
227
  }
228
228
  //#endregion
229
229
  //#region src/components/auth/api-key/create-api-key-dialog.tsx
230
- function Et({ isOpen: e, onOpenChange: t, organizationId: n }) {
231
- let { authClient: r, localization: i } = m(), { localization: a } = h(bt), { mutate: o, isPending: s } = y(r), [c, l] = q(!1), [u, d] = q(null), [f, p] = q(null), g = (e) => {
230
+ function Ot({ isOpen: e, onOpenChange: t, organizationId: n }) {
231
+ let { authClient: r, localization: i } = h(), { localization: a } = g(St), { mutate: o, isPending: s } = b(r), [c, l] = J(!1), [u, d] = J(null), [f, p] = J(null), m = (e) => {
232
232
  e || (d(null), p(null)), t(e);
233
233
  };
234
- return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(O.Backdrop, {
234
+ return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(k.Backdrop, {
235
235
  isOpen: e,
236
- onOpenChange: g,
237
- children: /* @__PURE__ */ Y(O.Container, { children: /* @__PURE__ */ Y(O.Dialog, { children: /* @__PURE__ */ X(P, {
236
+ onOpenChange: m,
237
+ children: /* @__PURE__ */ X(k.Container, { children: /* @__PURE__ */ X(k.Dialog, { children: /* @__PURE__ */ Z(F, {
238
238
  onSubmit: (e) => {
239
239
  e.preventDefault();
240
240
  let t = new FormData(e.target).get("name")?.trim();
@@ -245,52 +245,52 @@ function Et({ isOpen: e, onOpenChange: t, organizationId: n }) {
245
245
  configId: "organization"
246
246
  } : {}
247
247
  } : void 0, { onSuccess: (e) => {
248
- g(!1), d(t), p(e.key), l(!0);
248
+ m(!1), d(t), p(e.key), l(!0);
249
249
  } });
250
250
  },
251
251
  children: [
252
- /* @__PURE__ */ Y(O.CloseTrigger, {}),
253
- /* @__PURE__ */ X(O.Header, { children: [/* @__PURE__ */ Y(O.Icon, {
252
+ /* @__PURE__ */ X(k.CloseTrigger, {}),
253
+ /* @__PURE__ */ Z(k.Header, { children: [/* @__PURE__ */ X(k.Icon, {
254
254
  status: "default",
255
- children: /* @__PURE__ */ Y(ze, {})
256
- }), /* @__PURE__ */ Y(O.Heading, { children: a.createApiKey })] }),
257
- /* @__PURE__ */ X(O.Body, {
255
+ children: /* @__PURE__ */ X(ze, {})
256
+ }), /* @__PURE__ */ X(k.Heading, { children: a.createApiKey })] }),
257
+ /* @__PURE__ */ Z(k.Body, {
258
258
  className: "overflow-visible",
259
- children: [/* @__PURE__ */ Y("p", {
259
+ children: [/* @__PURE__ */ X("p", {
260
260
  className: "text-muted text-sm",
261
261
  children: a.apiKeysDescription
262
- }), /* @__PURE__ */ X(W, {
262
+ }), /* @__PURE__ */ Z(G, {
263
263
  className: "mt-4",
264
264
  id: "name",
265
265
  name: "name",
266
266
  isDisabled: s,
267
267
  children: [
268
- /* @__PURE__ */ Y(L, { children: a.name }),
269
- /* @__PURE__ */ Y(F, {
268
+ /* @__PURE__ */ X(R, { children: a.name }),
269
+ /* @__PURE__ */ X(I, {
270
270
  autoFocus: !0,
271
271
  placeholder: i.settings.optional,
272
272
  variant: "secondary"
273
273
  }),
274
- /* @__PURE__ */ Y(N, {})
274
+ /* @__PURE__ */ X(P, {})
275
275
  ]
276
276
  })]
277
277
  }),
278
- /* @__PURE__ */ X(O.Footer, { children: [/* @__PURE__ */ Y(k, {
278
+ /* @__PURE__ */ Z(k.Footer, { children: [/* @__PURE__ */ X(A, {
279
279
  slot: "close",
280
280
  variant: "tertiary",
281
281
  isDisabled: s,
282
282
  children: i.settings.cancel
283
- }), /* @__PURE__ */ X(k, {
283
+ }), /* @__PURE__ */ Z(A, {
284
284
  type: "submit",
285
285
  isPending: s,
286
- children: [s && /* @__PURE__ */ Y(V, {
286
+ children: [s && /* @__PURE__ */ X(H, {
287
287
  color: "current",
288
288
  size: "sm"
289
289
  }), a.createApiKey]
290
290
  })] })
291
291
  ]
292
292
  }) }) })
293
- }), /* @__PURE__ */ Y(Tt, {
293
+ }), /* @__PURE__ */ X(Dt, {
294
294
  isOpen: c,
295
295
  onOpenChange: l,
296
296
  secretKey: f,
@@ -299,23 +299,23 @@ function Et({ isOpen: e, onOpenChange: t, organizationId: n }) {
299
299
  }
300
300
  //#endregion
301
301
  //#region src/components/auth/api-key/api-keys.tsx
302
- function Dt({ className: e, variant: t, organizationId: n, isPending: r, hideCreate: i, hideDelete: a }) {
303
- let { authClient: o } = m(), { localization: s } = h(bt), { data: c, isPending: l } = ae(o, {
302
+ function kt({ className: e, variant: t, organizationId: n, isPending: r, hideCreate: i, hideDelete: a }) {
303
+ let { authClient: o } = h(), { localization: s } = g(St), { data: c, isPending: l } = ae(o, {
304
304
  enabled: !r,
305
305
  ...n ? { query: {
306
306
  organizationId: n,
307
307
  configId: "organization"
308
308
  } } : {}
309
- }), u = r || l, [d, f] = q(!1);
310
- return /* @__PURE__ */ X("div", {
311
- className: G("flex flex-col gap-3", e),
309
+ }), u = r || l, [d, f] = J(!1);
310
+ return /* @__PURE__ */ Z("div", {
311
+ className: K("flex flex-col gap-3", e),
312
312
  children: [
313
- /* @__PURE__ */ X("div", {
313
+ /* @__PURE__ */ Z("div", {
314
314
  className: "flex items-end justify-between gap-3",
315
- children: [/* @__PURE__ */ Y("h2", {
315
+ children: [/* @__PURE__ */ X("h2", {
316
316
  className: "text-sm font-semibold truncate",
317
317
  children: s.apiKeys
318
- }), !i && /* @__PURE__ */ Y(k, {
318
+ }), !i && /* @__PURE__ */ X(A, {
319
319
  className: "shrink-0",
320
320
  size: "sm",
321
321
  isDisabled: u,
@@ -323,18 +323,18 @@ function Dt({ className: e, variant: t, organizationId: n, isPending: r, hideCre
323
323
  children: s.createApiKey
324
324
  })]
325
325
  }),
326
- /* @__PURE__ */ Y(A, {
326
+ /* @__PURE__ */ X(j, {
327
327
  variant: t,
328
- children: /* @__PURE__ */ Y(A.Content, { children: u ? /* @__PURE__ */ Y(Ct, {}) : c?.apiKeys.length ? c?.apiKeys.map((e, t) => /* @__PURE__ */ X("div", { children: [t > 0 && /* @__PURE__ */ Y("div", { className: "border-b border-dashed -mx-4 my-4" }), /* @__PURE__ */ Y(St, {
328
+ children: /* @__PURE__ */ X(j.Content, { children: u ? /* @__PURE__ */ X(Tt, {}) : c?.apiKeys.length ? c?.apiKeys.map((e, t) => /* @__PURE__ */ Z("div", { children: [t > 0 && /* @__PURE__ */ X("div", { className: "border-b border-dashed -mx-4 my-4" }), /* @__PURE__ */ X(wt, {
329
329
  apiKey: e,
330
330
  hideDelete: a,
331
331
  organizationId: n
332
- })] }, e.id)) : /* @__PURE__ */ Y(wt, {
332
+ })] }, e.id)) : /* @__PURE__ */ X(Et, {
333
333
  onCreatePress: () => f(!0),
334
334
  hideCreate: i
335
335
  }) })
336
336
  }),
337
- !i && /* @__PURE__ */ Y(Et, {
337
+ !i && /* @__PURE__ */ X(Ot, {
338
338
  isOpen: d,
339
339
  onOpenChange: f,
340
340
  organizationId: n
@@ -344,58 +344,58 @@ function Dt({ className: e, variant: t, organizationId: n, isPending: r, hideCre
344
344
  }
345
345
  //#endregion
346
346
  //#region src/lib/auth/delete-user-plugin.ts
347
- var Ot = o(dt.id, (e = {}) => ({
348
- ...dt(e),
349
- securityCards: [At]
347
+ var At = s(ft.id, (e = {}) => ({
348
+ ...ft(e),
349
+ securityCards: [Mt]
350
350
  }));
351
351
  //#endregion
352
352
  //#region src/components/auth/delete-user/delete-account.tsx
353
- function kt({ className: e, variant: t, ...n }) {
354
- let { authClient: r, basePaths: i, localization: o, navigate: s, viewPaths: c } = m(), { localization: l, sendDeleteAccountVerification: u } = h(Ot), { data: d } = ie(r), f = lt(), [p, g] = q(!1), [_, v] = q(""), y = d?.some((e) => e.providerId === "credential"), b = !u && y, { mutate: x, isPending: S } = ee(r), C = (e) => {
355
- g(e), v("");
353
+ function jt({ className: e, variant: t, ...n }) {
354
+ let { authClient: r, basePaths: i, localization: a, navigate: s, viewPaths: c } = h(), { localization: l, sendDeleteAccountVerification: u } = g(At), { data: d } = E(r), f = ut(), [p, m] = J(!1), [_, v] = J(""), y = d?.some((e) => e.providerId === "credential"), b = !u && y, { mutate: x, isPending: S } = ee(r), C = (e) => {
355
+ m(e), v("");
356
356
  }, w = async (e) => {
357
357
  e.preventDefault(), x({ ...b ? { password: _ } : {} }, { onSuccess: () => {
358
- g(!1), v(""), u ? K.success(l.deleteUserVerificationSent) : (K.success(l.deleteUserSuccess), f.removeQueries({ queryKey: a.all }), s({
358
+ m(!1), v(""), u ? q.success(l.deleteUserVerificationSent) : (q.success(l.deleteUserSuccess), f.removeQueries({ queryKey: o.all }), s({
359
359
  to: `${i.auth}/${c.auth.signIn}`,
360
360
  replace: !0
361
361
  }));
362
362
  } });
363
363
  };
364
- return /* @__PURE__ */ Y(A, {
364
+ return /* @__PURE__ */ X(j, {
365
365
  className: e,
366
366
  variant: t,
367
367
  ...n,
368
- children: /* @__PURE__ */ X(A.Content, {
368
+ children: /* @__PURE__ */ Z(j.Content, {
369
369
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
370
- children: [/* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
370
+ children: [/* @__PURE__ */ Z("div", { children: [/* @__PURE__ */ X("p", {
371
371
  className: "text-sm font-medium leading-tight",
372
372
  children: l.deleteAccount
373
- }), /* @__PURE__ */ Y("p", {
373
+ }), /* @__PURE__ */ X("p", {
374
374
  className: "text-muted text-xs mt-0.5",
375
375
  children: l.deleteAccountDescription
376
- })] }), /* @__PURE__ */ X(O, { children: [/* @__PURE__ */ Y(k, {
376
+ })] }), /* @__PURE__ */ Z(k, { children: [/* @__PURE__ */ X(A, {
377
377
  isDisabled: !d,
378
378
  size: "sm",
379
379
  variant: "danger-soft",
380
- onPress: () => g(!0),
380
+ onPress: () => m(!0),
381
381
  children: l.deleteAccount
382
- }), /* @__PURE__ */ Y(O.Backdrop, {
382
+ }), /* @__PURE__ */ X(k.Backdrop, {
383
383
  isOpen: p,
384
384
  onOpenChange: C,
385
- children: /* @__PURE__ */ Y(O.Container, { children: /* @__PURE__ */ Y(O.Dialog, { children: /* @__PURE__ */ X(P, {
385
+ children: /* @__PURE__ */ X(k.Container, { children: /* @__PURE__ */ X(k.Dialog, { children: /* @__PURE__ */ Z(F, {
386
386
  onSubmit: w,
387
387
  children: [
388
- /* @__PURE__ */ Y(O.CloseTrigger, {}),
389
- /* @__PURE__ */ X(O.Header, { children: [/* @__PURE__ */ Y(O.Icon, {
388
+ /* @__PURE__ */ X(k.CloseTrigger, {}),
389
+ /* @__PURE__ */ Z(k.Header, { children: [/* @__PURE__ */ X(k.Icon, {
390
390
  status: "danger",
391
- children: /* @__PURE__ */ Y(Ye, {})
392
- }), /* @__PURE__ */ Y(O.Heading, { children: l.deleteAccount })] }),
393
- /* @__PURE__ */ X(O.Body, {
391
+ children: /* @__PURE__ */ X(Ye, {})
392
+ }), /* @__PURE__ */ X(k.Heading, { children: l.deleteAccount })] }),
393
+ /* @__PURE__ */ Z(k.Body, {
394
394
  className: "overflow-visible",
395
- children: [/* @__PURE__ */ Y("p", {
395
+ children: [/* @__PURE__ */ X("p", {
396
396
  className: "text-muted text-sm",
397
397
  children: l.deleteAccountDescription
398
- }), b && /* @__PURE__ */ X(W, {
398
+ }), b && /* @__PURE__ */ Z(G, {
399
399
  className: "mt-4",
400
400
  name: "password",
401
401
  type: "password",
@@ -403,27 +403,27 @@ function kt({ className: e, variant: t, ...n }) {
403
403
  value: _,
404
404
  onChange: v,
405
405
  children: [
406
- /* @__PURE__ */ Y(L, { children: o.auth.password }),
407
- /* @__PURE__ */ Y(F, {
406
+ /* @__PURE__ */ X(R, { children: a.auth.password }),
407
+ /* @__PURE__ */ X(I, {
408
408
  autoComplete: "current-password",
409
- placeholder: o.auth.passwordPlaceholder,
409
+ placeholder: a.auth.passwordPlaceholder,
410
410
  required: !0,
411
411
  variant: "secondary"
412
412
  }),
413
- /* @__PURE__ */ Y(N, {})
413
+ /* @__PURE__ */ X(P, {})
414
414
  ]
415
415
  })]
416
416
  }),
417
- /* @__PURE__ */ X(O.Footer, { children: [/* @__PURE__ */ Y(k, {
417
+ /* @__PURE__ */ Z(k.Footer, { children: [/* @__PURE__ */ X(A, {
418
418
  slot: "close",
419
419
  variant: "tertiary",
420
420
  isDisabled: S,
421
- children: o.settings.cancel
422
- }), /* @__PURE__ */ X(k, {
421
+ children: a.settings.cancel
422
+ }), /* @__PURE__ */ Z(A, {
423
423
  type: "submit",
424
424
  variant: "danger",
425
425
  isPending: S,
426
- children: [S && /* @__PURE__ */ Y(V, {
426
+ children: [S && /* @__PURE__ */ X(H, {
427
427
  color: "current",
428
428
  size: "sm"
429
429
  }), l.deleteAccount]
@@ -436,59 +436,59 @@ function kt({ className: e, variant: t, ...n }) {
436
436
  }
437
437
  //#endregion
438
438
  //#region src/components/auth/delete-user/danger-zone.tsx
439
- function At({ className: e, variant: t, ...n }) {
440
- let { localization: r } = m();
441
- return /* @__PURE__ */ X("div", {
442
- className: G("flex w-full flex-col", e),
439
+ function Mt({ className: e, variant: t, ...n }) {
440
+ let { localization: r } = h();
441
+ return /* @__PURE__ */ Z("div", {
442
+ className: K("flex w-full flex-col", e),
443
443
  ...n,
444
- children: [/* @__PURE__ */ Y("h2", {
445
- className: G("text-sm font-semibold mb-3 text-danger"),
444
+ children: [/* @__PURE__ */ X("h2", {
445
+ className: K("text-sm font-semibold mb-3 text-danger"),
446
446
  children: r.settings.dangerZone
447
- }), /* @__PURE__ */ Y(kt, { variant: t })]
447
+ }), /* @__PURE__ */ X(jt, { variant: t })]
448
448
  });
449
449
  }
450
450
  //#endregion
451
451
  //#region src/components/auth/magic-link/magic-link-button.tsx
452
- function jt({ view: e }) {
453
- let { basePaths: t, emailAndPassword: n, viewPaths: r, localization: a } = m(), o = Z({ mutationKey: i.signIn.all }) + Z({ mutationKey: i.signUp.all }) > 0, { localization: s, viewPaths: c } = h(Pt), l = e === "magicLink";
454
- return l && !n?.enabled ? null : /* @__PURE__ */ X(et, {
452
+ function Nt({ view: e }) {
453
+ let { basePaths: t, emailAndPassword: n, viewPaths: r, localization: i } = h(), o = lt({ mutationKey: a.signIn.all }) + lt({ mutationKey: a.signUp.all }) > 0, { localization: s, viewPaths: c } = g(It), l = e === "magicLink";
454
+ return l && !n?.enabled ? null : /* @__PURE__ */ Z(et, {
455
455
  href: `${t.auth}/${l ? r.auth.signIn : c.auth.magicLink}`,
456
456
  isDisabled: o,
457
- className: G(ct({ variant: "tertiary" }), "w-full gap-2", o && "status-disabled"),
458
- children: [Y(l ? Be : Fe, {}), a.auth.continueWith.replace("{{provider}}", l ? a.auth.password : s.magicLink)]
457
+ className: K(ct({ variant: "tertiary" }), "w-full gap-2", o && "status-disabled"),
458
+ children: [X(l ? Be : Fe, {}), i.auth.continueWith.replace("{{provider}}", l ? i.auth.password : s.magicLink)]
459
459
  });
460
460
  }
461
461
  //#endregion
462
462
  //#region src/components/auth/magic-link/magic-link-sent.tsx
463
- var Mt = "better-auth-ui.magic-link-sent";
464
- function Nt({ className: e, variant: n }) {
465
- let { basePaths: r, emailAndPassword: i, localization: a, viewPaths: o } = m(), { localization: s } = h(Pt), [c, l] = q(it() && sessionStorage.getItem("better-auth-ui.magic-link-sent") || "");
463
+ var Pt = "better-auth-ui.magic-link-sent";
464
+ function Ft({ className: e, variant: t }) {
465
+ let { basePaths: n, emailAndPassword: i, localization: a, viewPaths: o } = h(), { localization: s } = g(It), [c, l] = J(it() && sessionStorage.getItem("better-auth-ui.magic-link-sent") || "");
466
466
  return at(() => {
467
467
  l(sessionStorage.getItem("better-auth-ui.magic-link-sent") ?? "");
468
- }, []), /* @__PURE__ */ X(A, {
469
- className: G("w-full max-w-sm gap-4 md:p-6", e),
470
- variant: n,
468
+ }, []), /* @__PURE__ */ Z(j, {
469
+ className: K("w-full max-w-sm gap-4 md:p-6", e),
470
+ variant: t,
471
471
  children: [
472
- /* @__PURE__ */ Y(A.Header, { children: /* @__PURE__ */ Y(A.Title, {
472
+ /* @__PURE__ */ X(j.Header, { children: /* @__PURE__ */ X(j.Title, {
473
473
  className: "text-xl font-semibold mb-1",
474
474
  children: a.auth.checkYourEmailTitle
475
475
  }) }),
476
- /* @__PURE__ */ X(A.Content, {
476
+ /* @__PURE__ */ Z(j.Content, {
477
477
  className: "gap-4",
478
- children: [/* @__PURE__ */ Y(Qe, {
478
+ children: [/* @__PURE__ */ X(Qe, {
479
479
  className: "text-sm",
480
480
  children: c ? s.magicLinkSentTo.replace("{{email}}", c) : s.magicLinkSent
481
- }), c && /* @__PURE__ */ Y(t, { email: c })]
481
+ }), c && /* @__PURE__ */ X(r, { email: c })]
482
482
  }),
483
- i?.enabled && /* @__PURE__ */ Y(A.Footer, {
483
+ i?.enabled && /* @__PURE__ */ X(j.Footer, {
484
484
  className: "flex-col gap-3",
485
- children: /* @__PURE__ */ X(Qe, {
485
+ children: /* @__PURE__ */ Z(Qe, {
486
486
  className: "text-sm",
487
487
  children: [
488
488
  a.auth.needToCreateAnAccount,
489
489
  " ",
490
- /* @__PURE__ */ Y(et, {
491
- href: `${r.auth}/${o.auth.signUp}`,
490
+ /* @__PURE__ */ X(et, {
491
+ href: `${n.auth}/${o.auth.signUp}`,
492
492
  className: "text-accent no-underline hover:underline decoration-accent-hover",
493
493
  children: a.auth.signUp
494
494
  })
@@ -500,81 +500,87 @@ function Nt({ className: e, variant: n }) {
500
500
  }
501
501
  //#endregion
502
502
  //#region src/lib/auth/magic-link-plugin.ts
503
- var Pt = o(ft.id, (e = {}) => ({
504
- ...ft(e),
505
- authButtons: [jt],
503
+ var It = s(mt.id, (e = {}) => ({
504
+ ...mt(e),
505
+ authButtons: [Nt],
506
506
  views: { auth: {
507
- magicLink: Ft,
508
- magicLinkSent: Nt
507
+ magicLink: Lt,
508
+ magicLinkSent: Ft
509
509
  } },
510
- fallbackViews: { auth: { signIn: Ft } }
510
+ fallbackViews: { auth: { signIn: Lt } }
511
511
  }));
512
512
  //#endregion
513
513
  //#region src/components/auth/magic-link/magic-link.tsx
514
- function Ft({ className: t, socialLayout: r, socialPosition: a = "bottom", variant: o }) {
515
- let { authClient: s, basePaths: c, baseURL: l, emailAndPassword: u, localization: d, navigate: f, plugins: p, redirectTo: g, socialProviders: _, viewPaths: v } = m(), { localization: y, viewPaths: b } = h(Pt), [x, S] = q(""), { mutate: C, isPending: ee } = ve(s, { onSuccess: (e, t) => {
516
- sessionStorage.setItem(Mt, t.email), f({ to: `${c.auth}/${b.auth.magicLinkSent}` });
517
- } }), w = Z({ mutationKey: i.signIn.all }) + Z({ mutationKey: i.signUp.all }) > 0, T = (e) => {
514
+ function Lt({ className: e, socialLayout: r, socialPosition: i = "bottom", variant: o }) {
515
+ let { authClient: s, basePaths: c, baseURL: l, emailAndPassword: u, localization: d, navigate: f, plugins: p, redirectTo: m, socialProviders: _, viewPaths: v } = h(), { localization: y, viewPaths: b } = g(It), [x, S] = J(""), { mutate: C, isPending: w } = ve(s, { onSuccess: (e, t) => {
516
+ sessionStorage.setItem(Pt, t.email), f({ to: `${c.auth}/${b.auth.magicLinkSent}` });
517
+ } }), ee = lt({ mutationKey: a.signIn.all }) + lt({ mutationKey: a.signUp.all }) > 0, te = (e) => {
518
518
  e.preventDefault(), C({
519
519
  email: x,
520
- callbackURL: `${l}${g}`
520
+ callbackURL: `${l}${m}`
521
521
  });
522
- }, te = !!_?.length;
523
- return /* @__PURE__ */ X(A, {
524
- className: G("w-full max-w-sm gap-4 md:p-6", t),
522
+ }, T = !!_?.length;
523
+ return /* @__PURE__ */ Z(j, {
524
+ className: K("w-full max-w-sm gap-4 md:p-6", e),
525
525
  variant: o,
526
526
  children: [
527
- /* @__PURE__ */ Y(A.Header, { children: /* @__PURE__ */ Y(A.Title, {
527
+ /* @__PURE__ */ X(j.Header, { children: /* @__PURE__ */ X(j.Title, {
528
528
  className: "text-xl font-semibold mb-1",
529
529
  children: d.auth.signIn
530
530
  }) }),
531
- /* @__PURE__ */ X(A.Content, {
531
+ /* @__PURE__ */ Z(j.Content, {
532
532
  className: "gap-4",
533
533
  children: [
534
- a === "top" && /* @__PURE__ */ X(J, { children: [!!_?.length && /* @__PURE__ */ Y(n, { socialLayout: r }), te && /* @__PURE__ */ Y(e, { children: d.auth.or })] }),
535
- /* @__PURE__ */ X(P, {
536
- onSubmit: T,
534
+ i === "top" && /* @__PURE__ */ Z(Y, { children: [!!_?.length && /* @__PURE__ */ X(n, {
535
+ socialLayout: r,
536
+ view: "magicLink"
537
+ }), T && /* @__PURE__ */ X(t, { children: d.auth.or })] }),
538
+ /* @__PURE__ */ Z(F, {
539
+ onSubmit: te,
537
540
  className: "flex flex-col gap-4",
538
- children: [/* @__PURE__ */ X(W, {
541
+ children: [/* @__PURE__ */ Z(G, {
539
542
  name: "email",
540
543
  type: "email",
541
544
  autoComplete: "email",
542
- isDisabled: w,
545
+ isDisabled: ee,
543
546
  value: x,
544
547
  onChange: S,
545
548
  children: [
546
- /* @__PURE__ */ Y(L, { children: d.auth.email }),
547
- /* @__PURE__ */ Y(F, {
549
+ /* @__PURE__ */ X(R, { children: d.auth.email }),
550
+ /* @__PURE__ */ X(I, {
548
551
  placeholder: d.auth.emailPlaceholder,
549
552
  required: !0,
550
553
  variant: o === "transparent" ? "primary" : "secondary"
551
554
  }),
552
- /* @__PURE__ */ Y(N, {})
555
+ /* @__PURE__ */ X(P, {})
553
556
  ]
554
- }), /* @__PURE__ */ X("div", {
557
+ }), /* @__PURE__ */ Z("div", {
555
558
  className: "flex flex-col gap-3",
556
- children: [/* @__PURE__ */ X(k, {
559
+ children: [/* @__PURE__ */ Z(A, {
557
560
  type: "submit",
558
561
  className: "w-full",
559
- isPending: w,
560
- children: [ee && /* @__PURE__ */ Y(V, {
562
+ isPending: ee,
563
+ children: [w && /* @__PURE__ */ X(H, {
561
564
  color: "current",
562
565
  size: "sm"
563
566
  }), y.sendMagicLink]
564
- }), p.flatMap((e) => (e.authButtons ?? []).map((t, n) => /* @__PURE__ */ Y(t, { view: "magicLink" }, `${e.id}-${n.toString()}`)))]
567
+ }), p.flatMap((e) => (e.authButtons ?? []).map((t, n) => /* @__PURE__ */ X(t, { view: "magicLink" }, `${e.id}-${n.toString()}`)))]
565
568
  })]
566
569
  }),
567
- a === "bottom" && /* @__PURE__ */ X(J, { children: [te && /* @__PURE__ */ Y(e, { children: d.auth.or }), !!_?.length && /* @__PURE__ */ Y(n, { socialLayout: r })] })
570
+ i === "bottom" && /* @__PURE__ */ Z(Y, { children: [T && /* @__PURE__ */ X(t, { children: d.auth.or }), !!_?.length && /* @__PURE__ */ X(n, {
571
+ socialLayout: r,
572
+ view: "magicLink"
573
+ })] })
568
574
  ]
569
575
  }),
570
- u?.enabled && /* @__PURE__ */ Y(A.Footer, {
576
+ u?.enabled && /* @__PURE__ */ X(j.Footer, {
571
577
  className: "flex-col gap-3",
572
- children: /* @__PURE__ */ X(Qe, {
578
+ children: /* @__PURE__ */ Z(Qe, {
573
579
  className: "text-sm",
574
580
  children: [
575
581
  d.auth.needToCreateAnAccount,
576
582
  " ",
577
- /* @__PURE__ */ Y(et, {
583
+ /* @__PURE__ */ X(et, {
578
584
  href: `${c.auth}/${v.auth.signUp}`,
579
585
  className: "text-accent no-underline hover:underline decoration-accent-hover",
580
586
  children: d.auth.signUp
@@ -587,8 +593,8 @@ function Ft({ className: t, socialLayout: r, socialPosition: a = "bottom", varia
587
593
  }
588
594
  //#endregion
589
595
  //#region src/components/auth/multi-session/manage-accounts.tsx
590
- function It({ className: e, variant: t, ...n }) {
591
- let { authClient: r } = m(), { localization: i } = h(Bt), { data: a } = E(r), { data: o, isPending: s } = oe(r), c = o?.filter((e) => e.session.id !== a?.session.id), l = [{
596
+ function Rt({ className: e, variant: t, ...n }) {
597
+ let { authClient: r } = h(), { localization: i } = g(Ht), { data: a } = D(r), { data: o, isPending: s } = oe(r), c = o?.filter((e) => e.session.id !== a?.session.id), l = [{
592
598
  key: a?.session.id ?? "current",
593
599
  deviceSession: s ? null : a,
594
600
  isPending: s
@@ -597,16 +603,16 @@ function It({ className: e, variant: t, ...n }) {
597
603
  deviceSession: e,
598
604
  isPending: !1
599
605
  })) ?? []];
600
- return /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("h2", {
601
- className: G("text-sm font-semibold mb-3"),
606
+ return /* @__PURE__ */ Z("div", { children: [/* @__PURE__ */ X("h2", {
607
+ className: K("text-sm font-semibold mb-3"),
602
608
  children: i.manageAccounts
603
- }), /* @__PURE__ */ Y(A, {
604
- className: G(e),
609
+ }), /* @__PURE__ */ X(j, {
610
+ className: K(e),
605
611
  variant: t,
606
612
  ...n,
607
- children: /* @__PURE__ */ Y(A.Content, {
613
+ children: /* @__PURE__ */ X(j.Content, {
608
614
  className: "gap-0",
609
- children: l.map((e, t) => /* @__PURE__ */ X("div", { children: [t > 0 && /* @__PURE__ */ Y("div", { className: "border-b border-dashed -mx-4 my-4" }), /* @__PURE__ */ Y(Vt, {
615
+ children: l.map((e, t) => /* @__PURE__ */ Z("div", { children: [t > 0 && /* @__PURE__ */ X("div", { className: "border-b border-dashed -mx-4 my-4" }), /* @__PURE__ */ X(Ut, {
610
616
  deviceSession: e.deviceSession,
611
617
  isPending: e.isPending
612
618
  })] }, e.key))
@@ -615,16 +621,16 @@ function It({ className: e, variant: t, ...n }) {
615
621
  }
616
622
  //#endregion
617
623
  //#region src/components/auth/multi-session/switch-account-submenu-item.tsx
618
- function Lt({ deviceSession: e, hideSubtitle: t }) {
619
- let { authClient: n } = m(), { mutate: i, isPending: a } = ge(n, { onSuccess: () => window.scrollTo({ top: 0 }) });
620
- return /* @__PURE__ */ X(M.Item, {
624
+ function zt({ deviceSession: e, hideSubtitle: t }) {
625
+ let { authClient: n } = h(), { mutate: r, isPending: a } = ge(n, { onSuccess: () => window.scrollTo({ top: 0 }) });
626
+ return /* @__PURE__ */ Z(N.Item, {
621
627
  className: "px-2",
622
628
  isDisabled: a,
623
- onPress: () => i({ sessionToken: e.session.token }),
624
- children: [/* @__PURE__ */ Y(r, {
629
+ onPress: () => r({ sessionToken: e.session.token }),
630
+ children: [/* @__PURE__ */ X(i, {
625
631
  user: e.user,
626
632
  hideSubtitle: t
627
- }), a && /* @__PURE__ */ Y(V, {
633
+ }), a && /* @__PURE__ */ X(H, {
628
634
  color: "current",
629
635
  size: "sm",
630
636
  className: "ml-auto"
@@ -633,117 +639,117 @@ function Lt({ deviceSession: e, hideSubtitle: t }) {
633
639
  }
634
640
  //#endregion
635
641
  //#region src/components/auth/multi-session/switch-account-submenu-content.tsx
636
- function Rt({ hideSubtitle: e }) {
637
- let { authClient: t, basePaths: n, viewPaths: i } = m(), { localization: a } = h(Bt), { data: o } = E(t), { data: s, isPending: c } = oe(t);
638
- return /* @__PURE__ */ Y(M.Popover, {
642
+ function Bt({ hideSubtitle: e }) {
643
+ let { authClient: t, basePaths: n, viewPaths: r } = h(), { localization: a } = g(Ht), { data: o } = D(t), { data: s, isPending: c } = oe(t);
644
+ return /* @__PURE__ */ X(N.Popover, {
639
645
  className: "min-w-40 md:min-w-56 max-w-[48svw]",
640
- children: /* @__PURE__ */ X(M.Menu, { children: [
641
- /* @__PURE__ */ X(M.Item, {
646
+ children: /* @__PURE__ */ Z(N.Menu, { children: [
647
+ /* @__PURE__ */ Z(N.Item, {
642
648
  className: "px-2",
643
- children: [/* @__PURE__ */ Y(r, {
649
+ children: [/* @__PURE__ */ X(i, {
644
650
  isPending: c,
645
651
  hideSubtitle: e
646
- }), !c && /* @__PURE__ */ Y(De, { className: "ml-auto" })]
652
+ }), !c && /* @__PURE__ */ X(De, { className: "ml-auto" })]
647
653
  }),
648
- s?.filter((e) => e.session.id !== o?.session?.id).map((t) => /* @__PURE__ */ Y(Lt, {
654
+ s?.filter((e) => e.session.id !== o?.session?.id).map((t) => /* @__PURE__ */ X(zt, {
649
655
  deviceSession: t,
650
656
  hideSubtitle: e
651
657
  }, t.session.id)),
652
- /* @__PURE__ */ X(M.Item, {
658
+ /* @__PURE__ */ Z(N.Item, {
653
659
  textValue: a.addAccount,
654
- href: `${n.auth}/${i.auth.signIn}`,
655
- children: [/* @__PURE__ */ Y(ke, { className: "text-muted" }), /* @__PURE__ */ Y(L, { children: a.addAccount })]
660
+ href: `${n.auth}/${r.auth.signIn}`,
661
+ children: [/* @__PURE__ */ X(ke, { className: "text-muted" }), /* @__PURE__ */ X(R, { children: a.addAccount })]
656
662
  })
657
663
  ] })
658
664
  });
659
665
  }
660
666
  //#endregion
661
667
  //#region src/components/auth/multi-session/switch-account-submenu.tsx
662
- function zt({ className: e, hideSubtitle: t }) {
663
- let { authClient: n } = m(), { data: r } = E(n), { localization: i } = h(Bt);
664
- return r ? /* @__PURE__ */ X(M.SubmenuTrigger, { children: [/* @__PURE__ */ X(M.Item, {
668
+ function Vt({ className: e, hideSubtitle: t }) {
669
+ let { authClient: n } = h(), { data: r } = D(n), { localization: i } = g(Ht);
670
+ return r ? /* @__PURE__ */ Z(N.SubmenuTrigger, { children: [/* @__PURE__ */ Z(N.Item, {
665
671
  className: e,
666
672
  textValue: i.switchAccount,
667
673
  children: [
668
- /* @__PURE__ */ Y(we, { className: "text-muted" }),
669
- /* @__PURE__ */ Y(L, { children: i.switchAccount }),
670
- /* @__PURE__ */ Y(M.SubmenuIndicator, {})
674
+ /* @__PURE__ */ X(we, { className: "text-muted" }),
675
+ /* @__PURE__ */ X(R, { children: i.switchAccount }),
676
+ /* @__PURE__ */ X(N.SubmenuIndicator, {})
671
677
  ]
672
- }), /* @__PURE__ */ Y(M.Popover, {
678
+ }), /* @__PURE__ */ X(N.Popover, {
673
679
  className: "min-w-40 md:min-w-56 max-w-[48svw]",
674
- children: /* @__PURE__ */ Y(Rt, { hideSubtitle: t })
680
+ children: /* @__PURE__ */ X(Bt, { hideSubtitle: t })
675
681
  })] }) : null;
676
682
  }
677
683
  //#endregion
678
684
  //#region src/lib/auth/multi-session-plugin.ts
679
- var Bt = o(pt.id, (e = {}) => ({
680
- ...pt(e),
681
- accountCards: [It],
682
- userMenuItems: [zt]
685
+ var Ht = s(ht.id, (e = {}) => ({
686
+ ...ht(e),
687
+ accountCards: [Rt],
688
+ userMenuItems: [Vt]
683
689
  }));
684
690
  //#endregion
685
691
  //#region src/components/auth/multi-session/manage-account.tsx
686
- function Vt({ deviceSession: e, isPending: t }) {
687
- let { authClient: n, localization: i } = m(), { localization: a } = h(Bt), { data: o } = Ce(n), { mutate: s, isPending: c } = ge(n, { onSuccess: () => window.scrollTo({ top: 0 }) }), { mutate: l, isPending: u } = me(n, { onSuccess: () => K.success(i.settings.revokeSessionSuccess) }), d = e?.session.userId === o?.id, f = c || u;
688
- return /* @__PURE__ */ X("div", {
692
+ function Ut({ deviceSession: e, isPending: t }) {
693
+ let { authClient: n, localization: r } = h(), { localization: a } = g(Ht), { data: o } = Ce(n), { mutate: s, isPending: c } = ge(n, { onSuccess: () => window.scrollTo({ top: 0 }) }), { mutate: l, isPending: u } = me(n, { onSuccess: () => q.success(r.settings.revokeSessionSuccess) }), d = e?.session.userId === o?.id, f = c || u;
694
+ return /* @__PURE__ */ Z("div", {
689
695
  className: "flex items-center justify-between gap-3",
690
696
  children: [
691
- /* @__PURE__ */ Y(r, {
697
+ /* @__PURE__ */ X(i, {
692
698
  user: e?.user,
693
699
  isPending: t,
694
700
  size: "md"
695
701
  }),
696
- e && d && /* @__PURE__ */ X(k, {
702
+ e && d && /* @__PURE__ */ Z(A, {
697
703
  className: "shrink-0",
698
704
  variant: "outline",
699
705
  size: "sm",
700
706
  onPress: () => l({ sessionToken: e.session.token }),
701
707
  isDisabled: f,
702
- children: [u ? /* @__PURE__ */ Y(V, {
708
+ children: [u ? /* @__PURE__ */ X(H, {
703
709
  color: "current",
704
710
  size: "sm"
705
- }) : /* @__PURE__ */ Y(Te, {}), i.auth.signOut]
711
+ }) : /* @__PURE__ */ X(Te, {}), r.auth.signOut]
706
712
  }),
707
- e && !d && /* @__PURE__ */ X(M, { children: [/* @__PURE__ */ Y(k, {
713
+ e && !d && /* @__PURE__ */ Z(N, { children: [/* @__PURE__ */ X(A, {
708
714
  isIconOnly: !0,
709
715
  variant: "ghost",
710
716
  className: "shrink-0",
711
717
  size: "sm",
712
718
  isDisabled: f,
713
- children: /* @__PURE__ */ Y(Pe, {})
714
- }), /* @__PURE__ */ Y(M.Popover, { children: /* @__PURE__ */ X(M.Menu, { children: [/* @__PURE__ */ X(M.Item, {
719
+ children: /* @__PURE__ */ X(Pe, {})
720
+ }), /* @__PURE__ */ X(N.Popover, { children: /* @__PURE__ */ Z(N.Menu, { children: [/* @__PURE__ */ Z(N.Item, {
715
721
  textValue: a.switchAccount,
716
722
  onAction: () => s({ sessionToken: e.session.token }),
717
- children: [/* @__PURE__ */ Y(we, { className: "text-muted" }), a.switchAccount]
718
- }), /* @__PURE__ */ X(M.Item, {
719
- textValue: i.auth.signOut,
723
+ children: [/* @__PURE__ */ X(we, { className: "text-muted" }), a.switchAccount]
724
+ }), /* @__PURE__ */ Z(N.Item, {
725
+ textValue: r.auth.signOut,
720
726
  onAction: () => l({ sessionToken: e.session.token }),
721
- children: [/* @__PURE__ */ Y(Te, { className: "text-muted" }), i.auth.signOut]
727
+ children: [/* @__PURE__ */ X(Te, { className: "text-muted" }), r.auth.signOut]
722
728
  })] }) })] })
723
729
  ]
724
730
  });
725
731
  }
726
732
  //#endregion
727
733
  //#region src/components/auth/organization/slug-field.tsx
728
- function Ht(e) {
734
+ function Wt(e) {
729
735
  return e.toLowerCase().replace(/[^a-z0-9]+/g, "-");
730
736
  }
731
- function Ut({ value: e, onChange: t, currentSlug: n, variant: r, ...i }) {
732
- let { authClient: a, localization: o } = m(), { localization: s, checkSlug: c, slugPrefix: l } = h($), { mutate: u, data: d, error: f, reset: p } = v(a), g = vt((e) => {
737
+ function Gt({ value: e, onChange: t, currentSlug: n, variant: r, ...i }) {
738
+ let { authClient: a, localization: o } = h(), { localization: s, checkSlug: c, slugPrefix: l } = g($), { mutate: u, data: d, error: f, reset: p } = y(a), m = bt((e) => {
733
739
  !c || !e.trim() || e.trim() === n || u({ slug: e.trim() });
734
740
  }, { wait: 500 });
735
741
  at(() => {
736
- c && (p(), g.maybeExecute(e));
742
+ c && (p(), m.maybeExecute(e));
737
743
  }, [
738
744
  c,
739
745
  e,
740
- g.maybeExecute,
746
+ m.maybeExecute,
741
747
  p
742
748
  ]);
743
749
  let _ = (e) => {
744
- t(Ht(e));
750
+ t(Wt(e));
745
751
  };
746
- return /* @__PURE__ */ X(W, {
752
+ return /* @__PURE__ */ Z(G, {
747
753
  id: "slug",
748
754
  name: "slug",
749
755
  ...i,
@@ -753,43 +759,43 @@ function Ut({ value: e, onChange: t, currentSlug: n, variant: r, ...i }) {
753
759
  if (!e) return o.auth.fieldRequired;
754
760
  },
755
761
  children: [
756
- /* @__PURE__ */ Y(L, { children: s.slug }),
757
- /* @__PURE__ */ X(I, {
762
+ /* @__PURE__ */ X(R, { children: s.slug }),
763
+ /* @__PURE__ */ Z(L, {
758
764
  variant: r,
759
765
  children: [
760
- l && /* @__PURE__ */ Y(I.Prefix, {
766
+ l && /* @__PURE__ */ X(L.Prefix, {
761
767
  className: "pr-1.5 text-muted",
762
768
  children: l
763
769
  }),
764
- /* @__PURE__ */ Y(I.Input, {
770
+ /* @__PURE__ */ X(L.Input, {
765
771
  placeholder: s.slugPlaceholder,
766
772
  required: !0
767
773
  }),
768
- c && !!e.trim() && e.trim() !== n && /* @__PURE__ */ Y(I.Suffix, {
774
+ c && !!e.trim() && e.trim() !== n && /* @__PURE__ */ X(L.Suffix, {
769
775
  className: "px-2",
770
- children: d?.status ? /* @__PURE__ */ Y(De, { className: "text-success" }) : f ? /* @__PURE__ */ Y(D, { className: "text-danger" }) : /* @__PURE__ */ Y(V, {
776
+ children: d?.status ? /* @__PURE__ */ X(De, { className: "text-success" }) : f ? /* @__PURE__ */ X(O, { className: "text-danger" }) : /* @__PURE__ */ X(H, {
771
777
  size: "sm",
772
778
  color: "current"
773
779
  })
774
780
  })
775
781
  ]
776
782
  }),
777
- /* @__PURE__ */ Y(N, {})
783
+ /* @__PURE__ */ X(P, {})
778
784
  ]
779
785
  });
780
786
  }
781
787
  //#endregion
782
788
  //#region src/components/auth/organization/create-organization-dialog.tsx
783
- function Wt({ isOpen: e, onOpenChange: t }) {
784
- let { authClient: n, localization: r } = m(), { localization: i } = h($), [a, o] = q(""), [s, c] = q(""), [l, u] = q(!1), { mutate: d, isPending: f } = b(n, { onSuccess: () => t(!1) });
789
+ function Kt({ isOpen: e, onOpenChange: t }) {
790
+ let { authClient: n, localization: r } = h(), { localization: i } = g($), [a, o] = J(""), [s, c] = J(""), [l, u] = J(!1), { mutate: d, isPending: f } = x(n, { onSuccess: () => t(!1) });
785
791
  return at(() => {
786
792
  e || (c(""), o(""), u(!1));
787
793
  }, [e]), at(() => {
788
- l || c(Ht(a));
789
- }, [a, l]), /* @__PURE__ */ Y(O.Backdrop, {
794
+ l || c(Wt(a));
795
+ }, [a, l]), /* @__PURE__ */ X(k.Backdrop, {
790
796
  isOpen: e,
791
797
  onOpenChange: t,
792
- children: /* @__PURE__ */ Y(O.Container, { children: /* @__PURE__ */ Y(O.Dialog, { children: /* @__PURE__ */ X(P, {
798
+ children: /* @__PURE__ */ X(k.Container, { children: /* @__PURE__ */ X(k.Dialog, { children: /* @__PURE__ */ Z(F, {
793
799
  onSubmit: (e) => {
794
800
  e.preventDefault(), d({
795
801
  name: a,
@@ -797,19 +803,19 @@ function Wt({ isOpen: e, onOpenChange: t }) {
797
803
  });
798
804
  },
799
805
  children: [
800
- /* @__PURE__ */ Y(O.CloseTrigger, {}),
801
- /* @__PURE__ */ X(O.Header, { children: [/* @__PURE__ */ Y(O.Icon, {
806
+ /* @__PURE__ */ X(k.CloseTrigger, {}),
807
+ /* @__PURE__ */ Z(k.Header, { children: [/* @__PURE__ */ X(k.Icon, {
802
808
  status: "default",
803
- children: /* @__PURE__ */ Y(Ee, {})
804
- }), /* @__PURE__ */ Y(O.Heading, { children: i.createOrganization })] }),
805
- /* @__PURE__ */ X(O.Body, {
809
+ children: /* @__PURE__ */ X(Ee, {})
810
+ }), /* @__PURE__ */ X(k.Heading, { children: i.createOrganization })] }),
811
+ /* @__PURE__ */ Z(k.Body, {
806
812
  className: "flex flex-col gap-4 overflow-visible",
807
813
  children: [
808
- /* @__PURE__ */ Y("p", {
814
+ /* @__PURE__ */ X("p", {
809
815
  className: "text-muted text-sm",
810
816
  children: i.organizationsDescription
811
817
  }),
812
- /* @__PURE__ */ X(W, {
818
+ /* @__PURE__ */ Z(G, {
813
819
  id: "name",
814
820
  name: "name",
815
821
  isDisabled: f,
@@ -819,17 +825,17 @@ function Wt({ isOpen: e, onOpenChange: t }) {
819
825
  if (!e) return r.auth.fieldRequired;
820
826
  },
821
827
  children: [
822
- /* @__PURE__ */ Y(L, { children: i.name }),
823
- /* @__PURE__ */ Y(F, {
828
+ /* @__PURE__ */ X(R, { children: i.name }),
829
+ /* @__PURE__ */ X(I, {
824
830
  required: !0,
825
831
  autoFocus: !0,
826
832
  placeholder: i.namePlaceholder,
827
833
  variant: "secondary"
828
834
  }),
829
- /* @__PURE__ */ Y(N, {})
835
+ /* @__PURE__ */ X(P, {})
830
836
  ]
831
837
  }),
832
- /* @__PURE__ */ Y(Ut, {
838
+ /* @__PURE__ */ X(Gt, {
833
839
  value: s,
834
840
  onChange: (e) => {
835
841
  c(e), u(!0);
@@ -839,15 +845,15 @@ function Wt({ isOpen: e, onOpenChange: t }) {
839
845
  })
840
846
  ]
841
847
  }),
842
- /* @__PURE__ */ X(O.Footer, { children: [/* @__PURE__ */ Y(k, {
848
+ /* @__PURE__ */ Z(k.Footer, { children: [/* @__PURE__ */ X(A, {
843
849
  slot: "close",
844
850
  variant: "tertiary",
845
851
  isDisabled: f,
846
852
  children: r.settings.cancel
847
- }), /* @__PURE__ */ X(k, {
853
+ }), /* @__PURE__ */ Z(A, {
848
854
  type: "submit",
849
855
  isPending: f,
850
- children: [f && /* @__PURE__ */ Y(V, {
856
+ children: [f && /* @__PURE__ */ X(H, {
851
857
  color: "current",
852
858
  size: "sm"
853
859
  }), i.createOrganization]
@@ -858,128 +864,128 @@ function Wt({ isOpen: e, onOpenChange: t }) {
858
864
  }
859
865
  //#endregion
860
866
  //#region src/components/auth/organization/organization-logo.tsx
861
- function Gt({ className: e, fallback: t, isPending: n, organization: r, size: i = "sm", style: a, ...o }) {
862
- if (n && !r) return /* @__PURE__ */ Y(B, {
863
- className: G("rounded-full", i === "sm" ? "size-8" : i === "md" ? "size-10" : "size-12", e),
867
+ function qt({ className: e, fallback: t, isPending: n, organization: r, size: i = "sm", style: a, ...o }) {
868
+ if (n && !r) return /* @__PURE__ */ X(V, {
869
+ className: K("rounded-full", i === "sm" ? "size-8" : i === "md" ? "size-10" : "size-12", e),
864
870
  style: a
865
871
  });
866
872
  let s = r?.name?.slice(0, 2).toUpperCase();
867
- return /* @__PURE__ */ X(Xe, {
873
+ return /* @__PURE__ */ Z(Xe, {
868
874
  size: i,
869
- className: G("rounded-full", e),
875
+ className: K("rounded-full", e),
870
876
  style: a,
871
877
  ...o,
872
- children: [/* @__PURE__ */ Y(Xe.Image, {
878
+ children: [/* @__PURE__ */ X(Xe.Image, {
873
879
  alt: r?.name ?? "Organization",
874
880
  src: r?.logo ?? void 0
875
- }), /* @__PURE__ */ Y(Xe.Fallback, {
876
- className: G(i === "lg" ? "text-xl" : i === "md" ? "text-base" : "text-sm"),
881
+ }), /* @__PURE__ */ X(Xe.Fallback, {
882
+ className: K(i === "lg" ? "text-xl" : i === "md" ? "text-base" : "text-sm"),
877
883
  delayMs: r?.logo ? 600 : void 0,
878
- children: t || s || /* @__PURE__ */ Y(Ee, { className: "size-4" })
884
+ children: t || s || /* @__PURE__ */ X(Ee, { className: "size-4" })
879
885
  })]
880
886
  });
881
887
  }
882
888
  //#endregion
883
889
  //#region src/components/auth/organization/organization-view-skeleton.tsx
884
- function Kt({ className: e, hideSlug: t, size: n = "md", ...r }) {
885
- return /* @__PURE__ */ X("div", {
886
- className: G("flex min-w-0 items-center gap-2", e),
890
+ function Jt({ className: e, hideSlug: t, size: n = "md", ...r }) {
891
+ return /* @__PURE__ */ Z("div", {
892
+ className: K("flex min-w-0 items-center gap-2", e),
887
893
  ...r,
888
- children: [/* @__PURE__ */ Y(Gt, {
894
+ children: [/* @__PURE__ */ X(qt, {
889
895
  isPending: !0,
890
896
  className: n === "sm" ? "size-5" : void 0,
891
897
  size: n === "lg" ? "md" : "sm"
892
- }), /* @__PURE__ */ X("div", {
898
+ }), /* @__PURE__ */ Z("div", {
893
899
  className: "flex flex-col min-w-0 gap-1",
894
- children: [/* @__PURE__ */ Y(B, { className: "h-3.5 w-20 rounded-lg" }), !t && /* @__PURE__ */ Y(B, { className: "h-3 w-28 rounded-lg mt-[0.5px] mb-0.5" })]
900
+ children: [/* @__PURE__ */ X(V, { className: "h-3.5 w-20 rounded-lg" }), !t && /* @__PURE__ */ X(V, { className: "h-3 w-28 rounded-lg mt-[0.5px] mb-0.5" })]
895
901
  })]
896
902
  });
897
903
  }
898
904
  //#endregion
899
905
  //#region src/components/auth/organization/organization-view.tsx
900
906
  function Q({ className: e, isPending: t, size: n = "md", hideSlug: r, hideRole: i, organization: a, ...o }) {
901
- let { authClient: s } = m(), { roles: c, slugPrefix: l } = h($), { data: u } = E(s), { data: d, isPending: p } = f(s, { enabled: !a && !t }), g = a ?? d, { data: _, isPending: v } = ce(s, {
902
- query: { organizationId: g?.id },
903
- enabled: !!g?.id && !i
907
+ let { authClient: s } = h(), { roles: c, slugPrefix: l } = g($), { data: u } = D(s), { data: d, isPending: f } = p(s, { enabled: !a && !t }), m = a ?? d, { data: _, isPending: v } = ce(s, {
908
+ query: { organizationId: m?.id },
909
+ enabled: !!m?.id && !i
904
910
  }), y = _?.members?.find((e) => e.userId === u?.user.id);
905
- return t || !a && p || !i && g?.id && v ? /* @__PURE__ */ Y(Kt, {
911
+ return t || !a && f || !i && m?.id && v ? /* @__PURE__ */ X(Jt, {
906
912
  className: e,
907
913
  hideSlug: r,
908
914
  size: n,
909
915
  ...o
910
- }) : /* @__PURE__ */ X("div", {
911
- className: G("flex min-w-0 items-center gap-2", e),
916
+ }) : /* @__PURE__ */ Z("div", {
917
+ className: K("flex min-w-0 items-center gap-2", e),
912
918
  ...o,
913
- children: [/* @__PURE__ */ Y(Gt, {
914
- organization: g,
919
+ children: [/* @__PURE__ */ X(qt, {
920
+ organization: m,
915
921
  className: n === "sm" ? "size-5 [&>span]:text-xs" : void 0,
916
922
  size: n === "lg" ? "md" : "sm"
917
- }), /* @__PURE__ */ X("div", {
923
+ }), /* @__PURE__ */ Z("div", {
918
924
  className: "flex flex-col min-w-0",
919
- children: [/* @__PURE__ */ X("div", {
925
+ children: [/* @__PURE__ */ Z("div", {
920
926
  className: "flex min-w-0 items-center gap-2",
921
- children: [/* @__PURE__ */ Y("p", {
927
+ children: [/* @__PURE__ */ X("p", {
922
928
  className: "text-foreground text-sm font-medium truncate leading-tight",
923
- children: g?.name
924
- }), !i && !!y && /* @__PURE__ */ Y(j, {
929
+ children: m?.name
930
+ }), !i && !!y && /* @__PURE__ */ X(M, {
925
931
  className: "shrink-0 -my-0.5",
926
932
  size: "sm",
927
933
  children: c?.[y.role] ?? y.role
928
934
  })]
929
- }), !r && !!g?.slug && /* @__PURE__ */ X("p", {
935
+ }), !r && !!m?.slug && /* @__PURE__ */ Z("p", {
930
936
  className: "text-muted text-xs truncate overflow-x-hidden font-mono leading-tight",
931
- children: [l, g.slug]
937
+ children: [l, m.slug]
932
938
  })]
933
939
  })]
934
940
  });
935
941
  }
936
942
  //#endregion
937
943
  //#region src/components/auth/organization/organization-row.tsx
938
- function qt({ organization: e }) {
939
- let { authClient: t, basePaths: n, navigate: r } = m(), { localization: i, viewPaths: a, slug: o, slugPrefix: s } = h($), { mutate: c, isPending: l } = he(t, { onSuccess: () => {
944
+ function Yt({ organization: e }) {
945
+ let { authClient: t, basePaths: n, navigate: r } = h(), { localization: i, viewPaths: a, slug: o, slugPrefix: s } = g($), { mutate: c, isPending: l } = he(t, { onSuccess: () => {
940
946
  r({ to: `${n.organization}/${a.organization.settings}` });
941
947
  } });
942
948
  function u() {
943
949
  o === void 0 ? c({ organizationId: e.id }) : r({ to: `${n.organization}/${s}${e.slug}/${a.organization.settings}` });
944
950
  }
945
- return /* @__PURE__ */ X("div", {
951
+ return /* @__PURE__ */ Z("div", {
946
952
  className: "flex items-center gap-3",
947
- children: [/* @__PURE__ */ Y(Q, { organization: e }), /* @__PURE__ */ X(k, {
953
+ children: [/* @__PURE__ */ X(Q, { organization: e }), /* @__PURE__ */ Z(A, {
948
954
  className: "ml-auto shrink-0",
949
955
  variant: "outline",
950
956
  size: "sm",
951
957
  isPending: l,
952
958
  onPress: u,
953
959
  "aria-label": i.manage,
954
- children: [l ? /* @__PURE__ */ Y(V, {
960
+ children: [l ? /* @__PURE__ */ X(H, {
955
961
  color: "current",
956
962
  size: "sm"
957
- }) : /* @__PURE__ */ Y(Re, {}), i.manage]
963
+ }) : /* @__PURE__ */ X(Re, {}), i.manage]
958
964
  })]
959
965
  });
960
966
  }
961
967
  //#endregion
962
968
  //#region src/components/auth/organization/organizations-empty.tsx
963
- function Jt({ onCreatePress: e }) {
964
- let { localization: t } = h($);
965
- return /* @__PURE__ */ X($e, {
969
+ function Xt({ onCreatePress: e }) {
970
+ let { localization: t } = g($);
971
+ return /* @__PURE__ */ Z($e, {
966
972
  className: "flex flex-col items-center gap-4 text-center",
967
973
  children: [
968
- /* @__PURE__ */ Y("div", {
974
+ /* @__PURE__ */ X("div", {
969
975
  className: "flex size-12 items-center justify-center rounded-full bg-surface-secondary",
970
- children: /* @__PURE__ */ Y(Ee, { className: "size-5" })
976
+ children: /* @__PURE__ */ X(Ee, { className: "size-5" })
971
977
  }),
972
- /* @__PURE__ */ X("div", {
978
+ /* @__PURE__ */ Z("div", {
973
979
  className: "flex flex-col gap-2",
974
- children: [/* @__PURE__ */ Y("p", {
980
+ children: [/* @__PURE__ */ X("p", {
975
981
  className: "text-sm font-semibold text-foreground",
976
982
  children: t.noOrganizations
977
- }), /* @__PURE__ */ Y("span", {
983
+ }), /* @__PURE__ */ X("span", {
978
984
  className: "text-sm text-muted",
979
985
  children: t.organizationsDescription
980
986
  })]
981
987
  }),
982
- /* @__PURE__ */ Y(k, {
988
+ /* @__PURE__ */ X(A, {
983
989
  size: "sm",
984
990
  onPress: e,
985
991
  children: t.createOrganization
@@ -989,57 +995,57 @@ function Jt({ onCreatePress: e }) {
989
995
  }
990
996
  //#endregion
991
997
  //#region src/components/auth/organization/organizations.tsx
992
- function Yt({ variant: e }) {
993
- let { authClient: t } = m(), { localization: n } = h($), [r, i] = q(!1), { data: a, isPending: o } = le(t);
994
- return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X("div", {
998
+ function Zt({ variant: e }) {
999
+ let { authClient: t } = h(), { localization: n } = g($), [r, i] = J(!1), { data: a, isPending: o } = le(t);
1000
+ return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ Z("div", {
995
1001
  className: "flex flex-col gap-3",
996
- children: [/* @__PURE__ */ X("div", {
1002
+ children: [/* @__PURE__ */ Z("div", {
997
1003
  className: "flex items-end justify-between gap-3",
998
- children: [/* @__PURE__ */ Y("h2", {
1004
+ children: [/* @__PURE__ */ X("h2", {
999
1005
  className: "truncate text-sm font-semibold",
1000
1006
  children: n.organizations
1001
- }), /* @__PURE__ */ Y(k, {
1007
+ }), /* @__PURE__ */ X(A, {
1002
1008
  className: "shrink-0",
1003
1009
  size: "sm",
1004
1010
  isDisabled: o,
1005
1011
  onPress: () => i(!0),
1006
1012
  children: n.createOrganization
1007
1013
  })]
1008
- }), /* @__PURE__ */ Y(A, {
1014
+ }), /* @__PURE__ */ X(j, {
1009
1015
  variant: e,
1010
- children: /* @__PURE__ */ Y(A.Content, {
1016
+ children: /* @__PURE__ */ X(j.Content, {
1011
1017
  className: "gap-0",
1012
- children: o ? /* @__PURE__ */ Y(Kt, {}) : a?.length ? a.map((e, t) => /* @__PURE__ */ X("div", { children: [t > 0 && /* @__PURE__ */ Y("div", { className: "-mx-4 my-4 border-b border-dashed" }), /* @__PURE__ */ Y(qt, { organization: e })] }, e.id)) : /* @__PURE__ */ Y(Jt, { onCreatePress: () => i(!0) })
1018
+ children: o ? /* @__PURE__ */ X(Jt, {}) : a?.length ? a.map((e, t) => /* @__PURE__ */ Z("div", { children: [t > 0 && /* @__PURE__ */ X("div", { className: "-mx-4 my-4 border-b border-dashed" }), /* @__PURE__ */ X(Yt, { organization: e })] }, e.id)) : /* @__PURE__ */ X(Xt, { onCreatePress: () => i(!0) })
1013
1019
  })
1014
1020
  })]
1015
- }), /* @__PURE__ */ Y(Wt, {
1021
+ }), /* @__PURE__ */ X(Kt, {
1016
1022
  isOpen: r,
1017
1023
  onOpenChange: i
1018
1024
  })] });
1019
1025
  }
1020
1026
  //#endregion
1021
1027
  //#region src/components/auth/organization/user-invitation-row.tsx
1022
- function Xt({ invitation: e }) {
1023
- let { authClient: t } = m(), { localization: n, roles: r } = h($), { mutate: i, isPending: a } = d(t), { mutate: o, isPending: s } = fe(t);
1024
- return /* @__PURE__ */ X("div", {
1028
+ function Qt({ invitation: e }) {
1029
+ let { authClient: t } = h(), { localization: n, roles: r } = g($), { mutate: i, isPending: a } = f(t), { mutate: o, isPending: s } = fe(t);
1030
+ return /* @__PURE__ */ Z("div", {
1025
1031
  className: "flex items-center gap-3",
1026
1032
  children: [
1027
- /* @__PURE__ */ Y("div", {
1033
+ /* @__PURE__ */ X("div", {
1028
1034
  className: "flex size-10 shrink-0 items-center justify-center rounded-xl bg-surface-secondary",
1029
- children: /* @__PURE__ */ Y(Ae, { className: "size-4.5" })
1035
+ children: /* @__PURE__ */ X(Ae, { className: "size-4.5" })
1030
1036
  }),
1031
- /* @__PURE__ */ X("div", {
1037
+ /* @__PURE__ */ Z("div", {
1032
1038
  className: "flex flex-col",
1033
- children: [/* @__PURE__ */ X("div", {
1039
+ children: [/* @__PURE__ */ Z("div", {
1034
1040
  className: "flex items-center gap-1.5",
1035
- children: [/* @__PURE__ */ Y("span", {
1041
+ children: [/* @__PURE__ */ X("span", {
1036
1042
  className: "truncate text-sm font-medium leading-tight",
1037
1043
  children: e.organizationName
1038
- }), /* @__PURE__ */ Y(j, {
1044
+ }), /* @__PURE__ */ X(M, {
1039
1045
  size: "sm",
1040
1046
  children: r?.[e.role] ?? e.role
1041
1047
  })]
1042
- }), /* @__PURE__ */ Y("span", {
1048
+ }), /* @__PURE__ */ X("span", {
1043
1049
  className: "truncate text-muted text-xs",
1044
1050
  children: new Date(e.createdAt).toLocaleString(void 0, {
1045
1051
  dateStyle: "medium",
@@ -1047,19 +1053,19 @@ function Xt({ invitation: e }) {
1047
1053
  })
1048
1054
  })]
1049
1055
  }),
1050
- /* @__PURE__ */ X("div", {
1056
+ /* @__PURE__ */ Z("div", {
1051
1057
  className: "ml-auto flex shrink-0 items-center gap-2",
1052
- children: [/* @__PURE__ */ X(k, {
1058
+ children: [/* @__PURE__ */ Z(A, {
1053
1059
  variant: "outline",
1054
1060
  size: "sm",
1055
1061
  isPending: a,
1056
1062
  isDisabled: s,
1057
1063
  onPress: () => i({ invitationId: e.id }),
1058
- children: [a ? /* @__PURE__ */ Y(V, {
1064
+ children: [a ? /* @__PURE__ */ X(H, {
1059
1065
  color: "current",
1060
1066
  size: "sm"
1061
- }) : /* @__PURE__ */ Y(De, {}), n.accept]
1062
- }), /* @__PURE__ */ Y(k, {
1067
+ }) : /* @__PURE__ */ X(De, {}), n.accept]
1068
+ }), /* @__PURE__ */ X(A, {
1063
1069
  variant: "danger-soft",
1064
1070
  size: "sm",
1065
1071
  isIconOnly: !0,
@@ -1067,10 +1073,10 @@ function Xt({ invitation: e }) {
1067
1073
  isDisabled: a,
1068
1074
  onPress: () => o({ invitationId: e.id }),
1069
1075
  "aria-label": n.rejectInvitation,
1070
- children: s ? /* @__PURE__ */ Y(V, {
1076
+ children: s ? /* @__PURE__ */ X(H, {
1071
1077
  color: "current",
1072
1078
  size: "sm"
1073
- }) : /* @__PURE__ */ Y(D, {})
1079
+ }) : /* @__PURE__ */ X(O, {})
1074
1080
  })]
1075
1081
  })
1076
1082
  ]
@@ -1078,30 +1084,30 @@ function Xt({ invitation: e }) {
1078
1084
  }
1079
1085
  //#endregion
1080
1086
  //#region src/components/auth/organization/user-invitation-row-skeleton.tsx
1081
- function Zt() {
1082
- return /* @__PURE__ */ X("div", {
1087
+ function $t() {
1088
+ return /* @__PURE__ */ Z("div", {
1083
1089
  className: "flex items-center gap-3",
1084
- children: [/* @__PURE__ */ Y(B, { className: "size-10 shrink-0 rounded-xl" }), /* @__PURE__ */ X("div", {
1090
+ children: [/* @__PURE__ */ X(V, { className: "size-10 shrink-0 rounded-xl" }), /* @__PURE__ */ Z("div", {
1085
1091
  className: "flex flex-col gap-1",
1086
- children: [/* @__PURE__ */ Y(B, { className: "h-4 w-40 rounded-lg" }), /* @__PURE__ */ Y(B, { className: "h-3 w-28 rounded-lg" })]
1092
+ children: [/* @__PURE__ */ X(V, { className: "h-4 w-40 rounded-lg" }), /* @__PURE__ */ X(V, { className: "h-3 w-28 rounded-lg" })]
1087
1093
  })]
1088
1094
  });
1089
1095
  }
1090
1096
  //#endregion
1091
1097
  //#region src/components/auth/organization/user-invitations-empty.tsx
1092
- function Qt() {
1093
- let { localization: e } = h($);
1094
- return /* @__PURE__ */ X($e, {
1098
+ function en() {
1099
+ let { localization: e } = g($);
1100
+ return /* @__PURE__ */ Z($e, {
1095
1101
  className: "flex flex-col items-center gap-4 text-center",
1096
- children: [/* @__PURE__ */ Y("div", {
1102
+ children: [/* @__PURE__ */ X("div", {
1097
1103
  className: "flex size-12 items-center justify-center rounded-full bg-surface-secondary",
1098
- children: /* @__PURE__ */ Y(Ue, { className: "size-5" })
1099
- }), /* @__PURE__ */ X("div", {
1104
+ children: /* @__PURE__ */ X(Ue, { className: "size-5" })
1105
+ }), /* @__PURE__ */ Z("div", {
1100
1106
  className: "flex flex-col gap-2",
1101
- children: [/* @__PURE__ */ Y("p", {
1107
+ children: [/* @__PURE__ */ X("p", {
1102
1108
  className: "text-sm font-semibold text-foreground",
1103
1109
  children: e.noInvitations
1104
- }), /* @__PURE__ */ Y("span", {
1110
+ }), /* @__PURE__ */ X("span", {
1105
1111
  className: "text-sm text-muted",
1106
1112
  children: e.userInvitationsEmptyDescription
1107
1113
  })]
@@ -1110,58 +1116,58 @@ function Qt() {
1110
1116
  }
1111
1117
  //#endregion
1112
1118
  //#region src/components/auth/organization/user-invitations.tsx
1113
- function $t({ variant: e }) {
1114
- let { authClient: t } = m(), { localization: n } = h($), { data: r, isPending: i } = de(t);
1115
- return /* @__PURE__ */ X("div", {
1119
+ function tn({ variant: e }) {
1120
+ let { authClient: t } = h(), { localization: n } = g($), { data: r, isPending: i } = de(t);
1121
+ return /* @__PURE__ */ Z("div", {
1116
1122
  className: "flex flex-col gap-3",
1117
- children: [/* @__PURE__ */ Y("h2", {
1123
+ children: [/* @__PURE__ */ X("h2", {
1118
1124
  className: "truncate text-sm font-semibold",
1119
1125
  children: n.invitations
1120
- }), /* @__PURE__ */ Y(A, {
1126
+ }), /* @__PURE__ */ X(j, {
1121
1127
  variant: e,
1122
- children: /* @__PURE__ */ Y(A.Content, { children: i ? /* @__PURE__ */ Y(Zt, {}) : r?.length ? r?.map((e, t) => /* @__PURE__ */ X("div", { children: [t > 0 && /* @__PURE__ */ Y("div", { className: "border-b border-dashed -mx-4 my-4" }), /* @__PURE__ */ Y(Xt, { invitation: e })] }, e.id)) : /* @__PURE__ */ Y(Qt, {}) })
1128
+ children: /* @__PURE__ */ X(j.Content, { children: i ? /* @__PURE__ */ X($t, {}) : r?.length ? r?.map((e, t) => /* @__PURE__ */ Z("div", { children: [t > 0 && /* @__PURE__ */ X("div", { className: "border-b border-dashed -mx-4 my-4" }), /* @__PURE__ */ X(Qt, { invitation: e })] }, e.id)) : /* @__PURE__ */ X(en, {}) })
1123
1129
  })]
1124
1130
  });
1125
1131
  }
1126
1132
  //#endregion
1127
1133
  //#region src/components/auth/organization/organizations-settings.tsx
1128
- function en({ className: e, variant: t, ...n }) {
1129
- return /* @__PURE__ */ X("div", {
1130
- className: G("flex w-full flex-col gap-4 md:gap-6", e),
1134
+ function nn({ className: e, variant: t, ...n }) {
1135
+ return /* @__PURE__ */ Z("div", {
1136
+ className: K("flex w-full flex-col gap-4 md:gap-6", e),
1131
1137
  ...n,
1132
- children: [/* @__PURE__ */ Y(Yt, { variant: t }), /* @__PURE__ */ Y($t, { variant: t })]
1138
+ children: [/* @__PURE__ */ X(Zt, { variant: t }), /* @__PURE__ */ X(tn, { variant: t })]
1133
1139
  });
1134
1140
  }
1135
1141
  //#endregion
1136
1142
  //#region src/lib/auth/organization-plugin.tsx
1137
- var $ = o(mt.id, (e = {}) => {
1138
- let t = mt(e);
1143
+ var $ = s(gt.id, (e = {}) => {
1144
+ let t = gt(e);
1139
1145
  return {
1140
1146
  ...t,
1141
1147
  localization: t.localization,
1142
1148
  settingsTabs: [{
1143
1149
  view: "organizations",
1144
- label: /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(Ee, { className: "text-muted" }), t.localization.organizations] }),
1145
- component: en
1150
+ label: /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(Ee, { className: "text-muted" }), t.localization.organizations] }),
1151
+ component: nn
1146
1152
  }]
1147
1153
  };
1148
1154
  });
1149
1155
  //#endregion
1150
1156
  //#region src/components/auth/organization/change-organization-logo.tsx
1151
- function tn({ className: e }) {
1152
- let { authClient: t } = m(), { logo: n, localization: r } = h($), { data: i, isPending: a } = f(t), { mutate: o, isPending: c } = Se(t), l = st(null), [u, d] = q(!1), [p, g] = q(!1), _ = c || u || p;
1157
+ function rn({ className: e }) {
1158
+ let { authClient: t } = h(), { logo: n, localization: r } = g($), { data: i, isPending: a } = p(t), { mutate: o, isPending: s } = Se(t), l = st(null), [u, d] = J(!1), [f, m] = J(!1), _ = s || u || f;
1153
1159
  async function v(e) {
1154
1160
  let t = e.target.files?.[0];
1155
1161
  if (!(!t || !i)) {
1156
1162
  e.target.value = "", d(!0);
1157
1163
  try {
1158
1164
  let e = await n.resize?.(t, n.size, n.extension) || t;
1159
- o({ data: { logo: await n.upload?.(e) || await s(e) } }, {
1160
- onSuccess: () => K.success(r.logoChangedSuccess),
1165
+ o({ data: { logo: await n.upload?.(e) || await c(e) } }, {
1166
+ onSuccess: () => q.success(r.logoChangedSuccess),
1161
1167
  onSettled: () => d(!1)
1162
1168
  });
1163
1169
  } catch (e) {
1164
- d(!1), e instanceof Error && K.danger(e.message);
1170
+ d(!1), e instanceof Error && q.danger(e.message);
1165
1171
  }
1166
1172
  }
1167
1173
  }
@@ -1169,64 +1175,64 @@ function tn({ className: e }) {
1169
1175
  let e = i?.logo;
1170
1176
  o({ data: { logo: "" } }, { onSuccess: async () => {
1171
1177
  if (!e) {
1172
- K.success(r.logoDeletedSuccess);
1178
+ q.success(r.logoDeletedSuccess);
1173
1179
  return;
1174
1180
  }
1175
- g(!0);
1181
+ m(!0);
1176
1182
  try {
1177
- await n.delete?.(e), K.success(r.logoDeletedSuccess);
1183
+ await n.delete?.(e), q.success(r.logoDeletedSuccess);
1178
1184
  } catch (e) {
1179
- e instanceof Error && K.danger(e.message);
1185
+ e instanceof Error && q.danger(e.message);
1180
1186
  } finally {
1181
- g(!1);
1187
+ m(!1);
1182
1188
  }
1183
1189
  } });
1184
1190
  }
1185
- return n.enabled ? /* @__PURE__ */ X("div", {
1186
- className: G("flex flex-col gap-1", e),
1191
+ return n.enabled ? /* @__PURE__ */ Z("div", {
1192
+ className: K("flex flex-col gap-1", e),
1187
1193
  children: [
1188
- /* @__PURE__ */ Y(L, {
1194
+ /* @__PURE__ */ X(R, {
1189
1195
  isDisabled: !i,
1190
1196
  children: r.logo
1191
1197
  }),
1192
- /* @__PURE__ */ Y("input", {
1198
+ /* @__PURE__ */ X("input", {
1193
1199
  ref: l,
1194
1200
  type: "file",
1195
1201
  accept: "image/*",
1196
1202
  className: "hidden",
1197
1203
  onChange: v
1198
1204
  }),
1199
- /* @__PURE__ */ X("div", {
1205
+ /* @__PURE__ */ Z("div", {
1200
1206
  className: "flex items-center gap-4",
1201
- children: [/* @__PURE__ */ Y(k, {
1207
+ children: [/* @__PURE__ */ X(A, {
1202
1208
  type: "button",
1203
1209
  isIconOnly: !0,
1204
1210
  variant: "ghost",
1205
1211
  className: "p-0 h-auto w-auto rounded-full",
1206
1212
  isDisabled: !i || _,
1207
1213
  onPress: () => l.current?.click(),
1208
- children: /* @__PURE__ */ Y(Gt, {
1214
+ children: /* @__PURE__ */ X(qt, {
1209
1215
  size: "lg",
1210
1216
  isPending: a,
1211
1217
  organization: i
1212
1218
  })
1213
- }), /* @__PURE__ */ X(M, { children: [/* @__PURE__ */ X(k, {
1219
+ }), /* @__PURE__ */ Z(N, { children: [/* @__PURE__ */ Z(A, {
1214
1220
  isDisabled: !i || _,
1215
1221
  size: "sm",
1216
1222
  variant: "secondary",
1217
- children: [_ && /* @__PURE__ */ Y(V, { size: "sm" }), r.changeLogo]
1218
- }), /* @__PURE__ */ Y(M.Popover, {
1223
+ children: [_ && /* @__PURE__ */ X(H, { size: "sm" }), r.changeLogo]
1224
+ }), /* @__PURE__ */ X(N.Popover, {
1219
1225
  className: "min-w-fit",
1220
- children: /* @__PURE__ */ X(M.Menu, { children: [/* @__PURE__ */ X(M.Item, {
1226
+ children: /* @__PURE__ */ Z(N.Menu, { children: [/* @__PURE__ */ Z(N.Item, {
1221
1227
  textValue: r.uploadLogo,
1222
1228
  onAction: () => l.current?.click(),
1223
- children: [/* @__PURE__ */ Y(je, { className: "text-muted" }), /* @__PURE__ */ Y(L, { children: r.uploadLogo })]
1224
- }), /* @__PURE__ */ X(M.Item, {
1229
+ children: [/* @__PURE__ */ X(je, { className: "text-muted" }), /* @__PURE__ */ X(R, { children: r.uploadLogo })]
1230
+ }), /* @__PURE__ */ Z(N.Item, {
1225
1231
  textValue: r.deleteLogo,
1226
1232
  isDisabled: !i?.logo,
1227
1233
  onAction: y,
1228
1234
  variant: "danger",
1229
- children: [/* @__PURE__ */ Y(Je, { className: "text-danger" }), /* @__PURE__ */ Y(L, { children: r.deleteLogo })]
1235
+ children: [/* @__PURE__ */ X(Je, { className: "text-danger" }), /* @__PURE__ */ X(R, { children: r.deleteLogo })]
1230
1236
  })] })
1231
1237
  })] })]
1232
1238
  })
@@ -1235,9 +1241,9 @@ function tn({ className: e }) {
1235
1241
  }
1236
1242
  //#endregion
1237
1243
  //#region src/components/auth/organization/delete-organization-dialog.tsx
1238
- function nn({ isOpen: e, onOpenChange: t, organization: n }) {
1239
- let { authClient: r, basePaths: i, localization: a, navigate: o } = m(), { localization: s, viewPaths: c } = h($), { mutate: l, isPending: u } = S(r, { onSuccess: () => {
1240
- t(!1), K.success(s.organizationDeleted), o({
1244
+ function an({ isOpen: e, onOpenChange: t, organization: n }) {
1245
+ let { authClient: r, basePaths: i, localization: a, navigate: o } = h(), { localization: s, viewPaths: c } = g($), { mutate: l, isPending: u } = C(r, { onSuccess: () => {
1246
+ t(!1), q.success(s.organizationDeleted), o({
1241
1247
  to: `${i.settings}/${c.settings.organizations}`,
1242
1248
  replace: !0
1243
1249
  });
@@ -1245,40 +1251,40 @@ function nn({ isOpen: e, onOpenChange: t, organization: n }) {
1245
1251
  function d(e) {
1246
1252
  e.preventDefault(), l({ organizationId: n.id });
1247
1253
  }
1248
- return /* @__PURE__ */ Y(O.Backdrop, {
1254
+ return /* @__PURE__ */ X(k.Backdrop, {
1249
1255
  isOpen: e,
1250
1256
  onOpenChange: t,
1251
- children: /* @__PURE__ */ Y(O.Container, { children: /* @__PURE__ */ Y(O.Dialog, { children: /* @__PURE__ */ X(P, {
1257
+ children: /* @__PURE__ */ X(k.Container, { children: /* @__PURE__ */ X(k.Dialog, { children: /* @__PURE__ */ Z(F, {
1252
1258
  onSubmit: d,
1253
1259
  children: [
1254
- /* @__PURE__ */ Y(O.CloseTrigger, {}),
1255
- /* @__PURE__ */ X(O.Header, { children: [/* @__PURE__ */ Y(O.Icon, {
1260
+ /* @__PURE__ */ X(k.CloseTrigger, {}),
1261
+ /* @__PURE__ */ Z(k.Header, { children: [/* @__PURE__ */ X(k.Icon, {
1256
1262
  status: "danger",
1257
- children: /* @__PURE__ */ Y(Ye, {})
1258
- }), /* @__PURE__ */ Y(O.Heading, { children: s.deleteOrganization })] }),
1259
- /* @__PURE__ */ X(O.Body, {
1263
+ children: /* @__PURE__ */ X(Ye, {})
1264
+ }), /* @__PURE__ */ X(k.Heading, { children: s.deleteOrganization })] }),
1265
+ /* @__PURE__ */ Z(k.Body, {
1260
1266
  className: "flex flex-col gap-4 overflow-visible",
1261
- children: [/* @__PURE__ */ Y("p", {
1267
+ children: [/* @__PURE__ */ X("p", {
1262
1268
  className: "text-muted text-sm",
1263
1269
  children: s.deleteOrganizationDescription
1264
- }), /* @__PURE__ */ Y(A, {
1270
+ }), /* @__PURE__ */ X(j, {
1265
1271
  variant: "secondary",
1266
- children: /* @__PURE__ */ Y(A.Content, { children: /* @__PURE__ */ Y(Q, {
1272
+ children: /* @__PURE__ */ X(j.Content, { children: /* @__PURE__ */ X(Q, {
1267
1273
  organization: n,
1268
1274
  hideRole: !0
1269
1275
  }) })
1270
1276
  })]
1271
1277
  }),
1272
- /* @__PURE__ */ X(O.Footer, { children: [/* @__PURE__ */ Y(k, {
1278
+ /* @__PURE__ */ Z(k.Footer, { children: [/* @__PURE__ */ X(A, {
1273
1279
  slot: "close",
1274
1280
  variant: "tertiary",
1275
1281
  isDisabled: u,
1276
1282
  children: a.settings.cancel
1277
- }), /* @__PURE__ */ X(k, {
1283
+ }), /* @__PURE__ */ Z(A, {
1278
1284
  type: "submit",
1279
1285
  variant: "danger",
1280
1286
  isPending: u,
1281
- children: [u && /* @__PURE__ */ Y(V, {
1287
+ children: [u && /* @__PURE__ */ X(H, {
1282
1288
  color: "current",
1283
1289
  size: "sm"
1284
1290
  }), s.deleteOrganization]
@@ -1289,34 +1295,34 @@ function nn({ isOpen: e, onOpenChange: t, organization: n }) {
1289
1295
  }
1290
1296
  //#endregion
1291
1297
  //#region src/components/auth/organization/delete-organization-skeleton.tsx
1292
- function rn() {
1293
- return /* @__PURE__ */ X("div", {
1298
+ function on() {
1299
+ return /* @__PURE__ */ Z("div", {
1294
1300
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
1295
- children: [/* @__PURE__ */ X("div", {
1301
+ children: [/* @__PURE__ */ Z("div", {
1296
1302
  className: "flex flex-col gap-1",
1297
- children: [/* @__PURE__ */ Y(B, { className: "h-3.5 w-40 rounded-lg" }), /* @__PURE__ */ Y(B, { className: "h-3 w-64 rounded-lg" })]
1298
- }), /* @__PURE__ */ Y(B, { className: "h-8 w-36 shrink-0 rounded-full" })]
1303
+ children: [/* @__PURE__ */ X(V, { className: "h-3.5 w-40 rounded-lg" }), /* @__PURE__ */ X(V, { className: "h-3 w-64 rounded-lg" })]
1304
+ }), /* @__PURE__ */ X(V, { className: "h-8 w-36 shrink-0 rounded-full" })]
1299
1305
  });
1300
1306
  }
1301
1307
  //#endregion
1302
1308
  //#region src/components/auth/organization/delete-organization.tsx
1303
- function an() {
1304
- let { authClient: e } = m(), { localization: t } = h($), { data: n } = f(e), { data: r, isPending: i } = T(e, { permissions: { organization: ["delete"] } }), [a, o] = q(!1);
1305
- return i ? /* @__PURE__ */ Y(rn, {}) : r?.success ? /* @__PURE__ */ X("div", {
1309
+ function sn() {
1310
+ let { authClient: e } = h(), { localization: t } = g($), { data: n } = p(e), { data: r, isPending: i } = T(e, { permissions: { organization: ["delete"] } }), [a, o] = J(!1);
1311
+ return i ? /* @__PURE__ */ X(on, {}) : r?.success ? /* @__PURE__ */ Z("div", {
1306
1312
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
1307
- children: [/* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
1313
+ children: [/* @__PURE__ */ Z("div", { children: [/* @__PURE__ */ X("p", {
1308
1314
  className: "text-sm font-medium leading-tight",
1309
1315
  children: t.deleteOrganization
1310
- }), /* @__PURE__ */ Y("p", {
1316
+ }), /* @__PURE__ */ X("p", {
1311
1317
  className: "text-muted mt-0.5 text-xs",
1312
1318
  children: t.deleteOrganizationDescription
1313
- })] }), /* @__PURE__ */ X(O, { children: [/* @__PURE__ */ Y(k, {
1319
+ })] }), /* @__PURE__ */ Z(k, { children: [/* @__PURE__ */ X(A, {
1314
1320
  isDisabled: !n,
1315
1321
  size: "sm",
1316
1322
  variant: "danger-soft",
1317
1323
  onPress: () => o(!0),
1318
1324
  children: t.deleteOrganization
1319
- }), n && /* @__PURE__ */ Y(nn, {
1325
+ }), n && /* @__PURE__ */ X(an, {
1320
1326
  isOpen: a,
1321
1327
  onOpenChange: o,
1322
1328
  organization: n
@@ -1325,22 +1331,22 @@ function an() {
1325
1331
  }
1326
1332
  //#endregion
1327
1333
  //#region src/components/auth/organization/invite-member-dialog.tsx
1328
- var on = (e) => e.includes("member") ? "member" : e.at(-1) ?? "";
1329
- function sn({ isOpen: e, onOpenChange: t }) {
1330
- let { authClient: n, localization: r } = m(), { localization: i, roles: a } = h($), [o, s] = q(() => on(Object.keys(a)));
1334
+ var cn = (e) => e.includes("member") ? "member" : e.at(-1) ?? "";
1335
+ function ln({ isOpen: e, onOpenChange: t }) {
1336
+ let { authClient: n, localization: r } = h(), { localization: i, roles: a } = g($), [o, s] = J(() => cn(Object.keys(a)));
1331
1337
  at(() => {
1332
1338
  s((e) => {
1333
1339
  let t = Object.keys(a);
1334
- return t.includes(e) ? e : on(t);
1340
+ return t.includes(e) ? e : cn(t);
1335
1341
  });
1336
1342
  }, [a]);
1337
- let { mutate: c, isPending: l } = te(n, { onSuccess: () => {
1338
- t(!1), K.success(i.inviteMemberSuccess);
1343
+ let { mutate: c, isPending: l } = ne(n, { onSuccess: () => {
1344
+ t(!1), q.success(i.inviteMemberSuccess);
1339
1345
  } }), u = Object.keys(a).includes(o);
1340
- return /* @__PURE__ */ Y(O.Backdrop, {
1346
+ return /* @__PURE__ */ X(k.Backdrop, {
1341
1347
  isOpen: e,
1342
1348
  onOpenChange: t,
1343
- children: /* @__PURE__ */ Y(O.Container, { children: /* @__PURE__ */ Y(O.Dialog, { children: /* @__PURE__ */ X(P, {
1349
+ children: /* @__PURE__ */ X(k.Container, { children: /* @__PURE__ */ X(k.Dialog, { children: /* @__PURE__ */ Z(F, {
1344
1350
  onSubmit: (e) => {
1345
1351
  e.preventDefault(), u && c({
1346
1352
  email: new FormData(e.target).get("email").trim(),
@@ -1348,19 +1354,19 @@ function sn({ isOpen: e, onOpenChange: t }) {
1348
1354
  });
1349
1355
  },
1350
1356
  children: [
1351
- /* @__PURE__ */ Y(O.CloseTrigger, {}),
1352
- /* @__PURE__ */ X(O.Header, { children: [/* @__PURE__ */ Y(O.Icon, {
1357
+ /* @__PURE__ */ X(k.CloseTrigger, {}),
1358
+ /* @__PURE__ */ Z(k.Header, { children: [/* @__PURE__ */ X(k.Icon, {
1353
1359
  status: "default",
1354
- children: /* @__PURE__ */ Y(Ke, {})
1355
- }), /* @__PURE__ */ Y(O.Heading, { children: i.inviteMember })] }),
1356
- /* @__PURE__ */ X(O.Body, {
1360
+ children: /* @__PURE__ */ X(Ke, {})
1361
+ }), /* @__PURE__ */ X(k.Heading, { children: i.inviteMember })] }),
1362
+ /* @__PURE__ */ Z(k.Body, {
1357
1363
  className: "flex flex-col gap-4 overflow-visible",
1358
1364
  children: [
1359
- /* @__PURE__ */ Y("p", {
1365
+ /* @__PURE__ */ X("p", {
1360
1366
  className: "text-muted text-sm",
1361
1367
  children: i.inviteMemberDescription
1362
1368
  }),
1363
- /* @__PURE__ */ X(W, {
1369
+ /* @__PURE__ */ Z(G, {
1364
1370
  id: "email",
1365
1371
  name: "email",
1366
1372
  type: "email",
@@ -1370,17 +1376,17 @@ function sn({ isOpen: e, onOpenChange: t }) {
1370
1376
  if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)) return r.auth.invalidEmail;
1371
1377
  },
1372
1378
  children: [
1373
- /* @__PURE__ */ Y(L, { children: r.auth.email }),
1374
- /* @__PURE__ */ Y(F, {
1379
+ /* @__PURE__ */ X(R, { children: r.auth.email }),
1380
+ /* @__PURE__ */ X(I, {
1375
1381
  autoFocus: !0,
1376
1382
  placeholder: r.auth.email,
1377
1383
  variant: "secondary",
1378
1384
  required: !0
1379
1385
  }),
1380
- /* @__PURE__ */ Y(N, {})
1386
+ /* @__PURE__ */ X(P, {})
1381
1387
  ]
1382
1388
  }),
1383
- /* @__PURE__ */ X(rt, {
1389
+ /* @__PURE__ */ Z(rt, {
1384
1390
  name: "role",
1385
1391
  value: o,
1386
1392
  onChange: (e) => {
@@ -1390,28 +1396,28 @@ function sn({ isOpen: e, onOpenChange: t }) {
1390
1396
  variant: "secondary",
1391
1397
  fullWidth: !0,
1392
1398
  children: [
1393
- /* @__PURE__ */ Y(L, { children: i.role }),
1394
- /* @__PURE__ */ X(rt.Trigger, { children: [/* @__PURE__ */ Y(rt.Value, {}), /* @__PURE__ */ Y(rt.Indicator, {})] }),
1395
- /* @__PURE__ */ Y(rt.Popover, { children: /* @__PURE__ */ Y(tt, { children: Object.entries(a).map(([e, t]) => /* @__PURE__ */ X(tt.Item, {
1399
+ /* @__PURE__ */ X(R, { children: i.role }),
1400
+ /* @__PURE__ */ Z(rt.Trigger, { children: [/* @__PURE__ */ X(rt.Value, {}), /* @__PURE__ */ X(rt.Indicator, {})] }),
1401
+ /* @__PURE__ */ X(rt.Popover, { children: /* @__PURE__ */ X(tt, { children: Object.entries(a).map(([e, t]) => /* @__PURE__ */ Z(tt.Item, {
1396
1402
  id: e,
1397
1403
  textValue: t,
1398
- children: [t, /* @__PURE__ */ Y(tt.ItemIndicator, {})]
1404
+ children: [t, /* @__PURE__ */ X(tt.ItemIndicator, {})]
1399
1405
  }, e)) }) }),
1400
- /* @__PURE__ */ Y(N, {})
1406
+ /* @__PURE__ */ X(P, {})
1401
1407
  ]
1402
1408
  })
1403
1409
  ]
1404
1410
  }),
1405
- /* @__PURE__ */ X(O.Footer, { children: [/* @__PURE__ */ Y(k, {
1411
+ /* @__PURE__ */ Z(k.Footer, { children: [/* @__PURE__ */ X(A, {
1406
1412
  slot: "close",
1407
1413
  variant: "tertiary",
1408
1414
  isDisabled: l,
1409
1415
  children: r.settings.cancel
1410
- }), /* @__PURE__ */ X(k, {
1416
+ }), /* @__PURE__ */ Z(A, {
1411
1417
  type: "submit",
1412
1418
  isPending: l,
1413
1419
  isDisabled: !u,
1414
- children: [l && /* @__PURE__ */ Y(V, {
1420
+ children: [l && /* @__PURE__ */ X(H, {
1415
1421
  color: "current",
1416
1422
  size: "sm"
1417
1423
  }), i.inviteMember]
@@ -1422,45 +1428,45 @@ function sn({ isOpen: e, onOpenChange: t }) {
1422
1428
  }
1423
1429
  //#endregion
1424
1430
  //#region src/components/auth/organization/leave-organization-dialog.tsx
1425
- function cn({ isOpen: e, onOpenChange: t, organization: n }) {
1426
- let { authClient: r, basePaths: i, localization: a, navigate: o } = m(), { localization: s, viewPaths: c } = h($), { mutate: l, isPending: u } = re(r, { onSuccess: () => {
1427
- t(!1), K.success(s.leftOrganization), o({
1431
+ function un({ isOpen: e, onOpenChange: t, organization: n }) {
1432
+ let { authClient: r, basePaths: i, localization: a, navigate: o } = h(), { localization: s, viewPaths: c } = g($), { mutate: l, isPending: u } = ie(r, { onSuccess: () => {
1433
+ t(!1), q.success(s.leftOrganization), o({
1428
1434
  to: `${i.settings}/${c.settings.organizations}`,
1429
1435
  replace: !0
1430
1436
  });
1431
1437
  } });
1432
- return /* @__PURE__ */ Y(O.Backdrop, {
1438
+ return /* @__PURE__ */ X(k.Backdrop, {
1433
1439
  isOpen: e,
1434
1440
  onOpenChange: t,
1435
- children: /* @__PURE__ */ Y(O.Container, { children: /* @__PURE__ */ X(O.Dialog, { children: [
1436
- /* @__PURE__ */ Y(O.CloseTrigger, {}),
1437
- /* @__PURE__ */ X(O.Header, { children: [/* @__PURE__ */ Y(O.Icon, {
1441
+ children: /* @__PURE__ */ X(k.Container, { children: /* @__PURE__ */ Z(k.Dialog, { children: [
1442
+ /* @__PURE__ */ X(k.CloseTrigger, {}),
1443
+ /* @__PURE__ */ Z(k.Header, { children: [/* @__PURE__ */ X(k.Icon, {
1438
1444
  status: "danger",
1439
- children: /* @__PURE__ */ Y(Te, {})
1440
- }), /* @__PURE__ */ Y(O.Heading, { children: s.leaveOrganization })] }),
1441
- /* @__PURE__ */ X(O.Body, {
1445
+ children: /* @__PURE__ */ X(Te, {})
1446
+ }), /* @__PURE__ */ X(k.Heading, { children: s.leaveOrganization })] }),
1447
+ /* @__PURE__ */ Z(k.Body, {
1442
1448
  className: "flex flex-col gap-4 overflow-visible",
1443
- children: [/* @__PURE__ */ Y("p", {
1449
+ children: [/* @__PURE__ */ X("p", {
1444
1450
  className: "text-muted text-sm",
1445
1451
  children: s.leaveOrganizationDescription
1446
- }), /* @__PURE__ */ Y(A, {
1452
+ }), /* @__PURE__ */ X(j, {
1447
1453
  variant: "secondary",
1448
- children: /* @__PURE__ */ Y(A.Content, { children: /* @__PURE__ */ Y(Q, {
1454
+ children: /* @__PURE__ */ X(j.Content, { children: /* @__PURE__ */ X(Q, {
1449
1455
  organization: n,
1450
1456
  hideRole: !0
1451
1457
  }) })
1452
1458
  })]
1453
1459
  }),
1454
- /* @__PURE__ */ X(O.Footer, { children: [/* @__PURE__ */ Y(k, {
1460
+ /* @__PURE__ */ Z(k.Footer, { children: [/* @__PURE__ */ X(A, {
1455
1461
  slot: "close",
1456
1462
  variant: "tertiary",
1457
1463
  isDisabled: u,
1458
1464
  children: a.settings.cancel
1459
- }), /* @__PURE__ */ X(k, {
1465
+ }), /* @__PURE__ */ Z(A, {
1460
1466
  variant: "danger",
1461
1467
  isPending: u,
1462
1468
  onPress: () => l({ organizationId: n.id }),
1463
- children: [u && /* @__PURE__ */ Y(V, {
1469
+ children: [u && /* @__PURE__ */ X(H, {
1464
1470
  color: "current",
1465
1471
  size: "sm"
1466
1472
  }), s.leaveOrganization]
@@ -1470,23 +1476,23 @@ function cn({ isOpen: e, onOpenChange: t, organization: n }) {
1470
1476
  }
1471
1477
  //#endregion
1472
1478
  //#region src/components/auth/organization/leave-organization.tsx
1473
- function ln() {
1474
- let { authClient: e } = m(), { localization: t } = h($), { data: n } = f(e), [r, i] = q(!1);
1475
- return /* @__PURE__ */ X("div", {
1479
+ function dn() {
1480
+ let { authClient: e } = h(), { localization: t } = g($), { data: n } = p(e), [r, i] = J(!1);
1481
+ return /* @__PURE__ */ Z("div", {
1476
1482
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
1477
- children: [/* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
1483
+ children: [/* @__PURE__ */ Z("div", { children: [/* @__PURE__ */ X("p", {
1478
1484
  className: "text-sm font-medium leading-tight",
1479
1485
  children: t.leaveOrganization
1480
- }), /* @__PURE__ */ Y("p", {
1486
+ }), /* @__PURE__ */ X("p", {
1481
1487
  className: "text-muted mt-0.5 text-xs",
1482
1488
  children: t.leaveOrganizationDescription
1483
- })] }), /* @__PURE__ */ X(O, { children: [/* @__PURE__ */ Y(k, {
1489
+ })] }), /* @__PURE__ */ Z(k, { children: [/* @__PURE__ */ X(A, {
1484
1490
  isDisabled: !n,
1485
1491
  size: "sm",
1486
1492
  variant: "danger-soft",
1487
1493
  onPress: () => i(!0),
1488
1494
  children: t.leaveOrganization
1489
- }), n && /* @__PURE__ */ Y(cn, {
1495
+ }), n && /* @__PURE__ */ X(un, {
1490
1496
  isOpen: r,
1491
1497
  onOpenChange: i,
1492
1498
  organization: n
@@ -1495,80 +1501,80 @@ function ln() {
1495
1501
  }
1496
1502
  //#endregion
1497
1503
  //#region src/components/auth/organization/organization-invitation-row-skeleton.tsx
1498
- function un() {
1499
- return /* @__PURE__ */ X(H.Row, { children: [
1500
- /* @__PURE__ */ Y(H.Cell, { children: /* @__PURE__ */ Y(B, { className: "h-4 w-48 rounded-lg" }) }),
1501
- /* @__PURE__ */ Y(H.Cell, { children: /* @__PURE__ */ Y(B, { className: "h-4 w-36 rounded-lg" }) }),
1502
- /* @__PURE__ */ Y(H.Cell, { children: /* @__PURE__ */ Y(B, { className: "h-4 w-16 rounded-lg" }) }),
1503
- /* @__PURE__ */ Y(H.Cell, { children: /* @__PURE__ */ Y(B, { className: "h-4 w-14 rounded-full" }) }),
1504
- /* @__PURE__ */ Y(H.Cell, {})
1504
+ function fn() {
1505
+ return /* @__PURE__ */ Z(U.Row, { children: [
1506
+ /* @__PURE__ */ X(U.Cell, { children: /* @__PURE__ */ X(V, { className: "h-4 w-48 rounded-lg" }) }),
1507
+ /* @__PURE__ */ X(U.Cell, { children: /* @__PURE__ */ X(V, { className: "h-4 w-36 rounded-lg" }) }),
1508
+ /* @__PURE__ */ X(U.Cell, { children: /* @__PURE__ */ X(V, { className: "h-4 w-16 rounded-lg" }) }),
1509
+ /* @__PURE__ */ X(U.Cell, { children: /* @__PURE__ */ X(V, { className: "h-4 w-14 rounded-full" }) }),
1510
+ /* @__PURE__ */ X(U.Cell, {})
1505
1511
  ] });
1506
1512
  }
1507
1513
  //#endregion
1508
1514
  //#region src/components/auth/organization/organization-invitation-row.tsx
1509
- function dn({ invitation: e }) {
1510
- let { authClient: t } = m(), { localization: n, roles: r } = h($), { data: i, isPending: a } = T(t, { permissions: { invitation: ["cancel"] } }), { mutate: o, isPending: s } = _(t), c = r?.[e.role] ?? e.role, l = n[e.status] ?? e.status, u = e.status === "pending" ? "warning" : e.status === "accepted" ? "success" : e.status === "rejected" ? "danger" : "default";
1511
- return a ? /* @__PURE__ */ Y(un, {}) : /* @__PURE__ */ X(H.Row, { children: [
1512
- /* @__PURE__ */ Y(H.Cell, {
1515
+ function pn({ invitation: e }) {
1516
+ let { authClient: t } = h(), { localization: n, roles: r } = g($), { data: i, isPending: a } = T(t, { permissions: { invitation: ["cancel"] } }), { mutate: o, isPending: s } = v(t), c = r?.[e.role] ?? e.role, l = n[e.status] ?? e.status, u = e.status === "pending" ? "warning" : e.status === "accepted" ? "success" : e.status === "rejected" ? "danger" : "default";
1517
+ return a ? /* @__PURE__ */ X(fn, {}) : /* @__PURE__ */ Z(U.Row, { children: [
1518
+ /* @__PURE__ */ X(U.Cell, {
1513
1519
  className: "font-medium text-sm",
1514
1520
  children: e.email
1515
1521
  }),
1516
- /* @__PURE__ */ Y(H.Cell, {
1522
+ /* @__PURE__ */ X(U.Cell, {
1517
1523
  className: "text-muted text-xs tabular-nums whitespace-nowrap",
1518
1524
  children: new Date(e.createdAt).toLocaleString(void 0, {
1519
1525
  dateStyle: "short",
1520
1526
  timeStyle: "short"
1521
1527
  })
1522
1528
  }),
1523
- /* @__PURE__ */ Y(H.Cell, {
1529
+ /* @__PURE__ */ X(U.Cell, {
1524
1530
  className: "text-sm",
1525
1531
  children: c
1526
1532
  }),
1527
- /* @__PURE__ */ Y(H.Cell, {
1533
+ /* @__PURE__ */ X(U.Cell, {
1528
1534
  className: "text-sm",
1529
- children: /* @__PURE__ */ Y(j, {
1535
+ children: /* @__PURE__ */ X(M, {
1530
1536
  color: u,
1531
1537
  size: "sm",
1532
1538
  variant: "soft",
1533
1539
  children: l
1534
1540
  })
1535
1541
  }),
1536
- /* @__PURE__ */ Y(H.Cell, {
1542
+ /* @__PURE__ */ X(U.Cell, {
1537
1543
  className: "text-end",
1538
- children: i?.success && e.status === "pending" && /* @__PURE__ */ Y(k, {
1544
+ children: i?.success && e.status === "pending" && /* @__PURE__ */ X(A, {
1539
1545
  isIconOnly: !0,
1540
1546
  size: "sm",
1541
1547
  variant: "danger-soft",
1542
1548
  isPending: s,
1543
1549
  onPress: () => o({ invitationId: e.id }),
1544
1550
  "aria-label": n.cancelInvitation,
1545
- children: s ? /* @__PURE__ */ Y(V, {
1551
+ children: s ? /* @__PURE__ */ X(H, {
1546
1552
  color: "current",
1547
1553
  size: "sm"
1548
- }) : /* @__PURE__ */ Y(D, {})
1554
+ }) : /* @__PURE__ */ X(O, {})
1549
1555
  })
1550
1556
  })
1551
1557
  ] });
1552
1558
  }
1553
1559
  //#endregion
1554
1560
  //#region src/components/auth/organization/organization-invitations-empty.tsx
1555
- function fn({ onInvitePress: e }) {
1556
- let { localization: t } = h($);
1557
- return /* @__PURE__ */ X($e, {
1561
+ function mn({ onInvitePress: e }) {
1562
+ let { localization: t } = g($);
1563
+ return /* @__PURE__ */ Z($e, {
1558
1564
  className: "flex flex-col items-center gap-4 text-center p-4",
1559
1565
  children: [
1560
- /* @__PURE__ */ Y(Ue, { className: "size-6 text-muted" }),
1561
- /* @__PURE__ */ X("div", {
1566
+ /* @__PURE__ */ X(Ue, { className: "size-6 text-muted" }),
1567
+ /* @__PURE__ */ Z("div", {
1562
1568
  className: "flex flex-col gap-2",
1563
- children: [/* @__PURE__ */ Y("p", {
1569
+ children: [/* @__PURE__ */ X("p", {
1564
1570
  className: "text-sm font-semibold text-foreground",
1565
1571
  children: t.noInvitations
1566
- }), /* @__PURE__ */ Y("span", {
1572
+ }), /* @__PURE__ */ X("span", {
1567
1573
  className: "text-sm text-muted",
1568
1574
  children: t.organizationInvitationsEmptyDescription
1569
1575
  })]
1570
1576
  }),
1571
- /* @__PURE__ */ Y(k, {
1577
+ /* @__PURE__ */ X(A, {
1572
1578
  size: "sm",
1573
1579
  onPress: e,
1574
1580
  children: t.inviteMember
@@ -1578,187 +1584,187 @@ function fn({ onInvitePress: e }) {
1578
1584
  }
1579
1585
  //#endregion
1580
1586
  //#region src/components/auth/organization/organization-invitations.tsx
1581
- function pn({ className: e, ...t }) {
1582
- let { authClient: n, localization: r } = m(), { localization: i, roles: a } = h($), { data: o, isPending: s } = se(n), { isPending: c } = T(n, { permissions: { invitation: ["cancel"] } }), l = s || c, [u, d] = q(), [f, p] = q("all"), [g, _] = q("all"), [v, y] = q(""), b = ot(() => o?.filter((e) => (f === "all" || e.role === f) && (g === "all" || e.status === g) && e.email.toLowerCase().includes(v.toLowerCase())), [
1587
+ function hn({ className: e, ...t }) {
1588
+ let { authClient: n, localization: r } = h(), { localization: i, roles: a } = g($), { data: o, isPending: s } = se(n), { isPending: c } = T(n, { permissions: { invitation: ["cancel"] } }), l = s || c, [u, d] = J(), [f, p] = J("all"), [m, _] = J("all"), [v, y] = J(""), b = ot(() => o?.filter((e) => (f === "all" || e.role === f) && (m === "all" || e.status === m) && e.email.toLowerCase().includes(v.toLowerCase())), [
1583
1589
  v,
1584
1590
  o,
1585
1591
  f,
1586
- g
1592
+ m
1587
1593
  ]), x = ot(() => !u || !b ? b : [...b].sort((e, t) => {
1588
1594
  let n = u.column, r = 0;
1589
1595
  return r = n === "createdAt" ? new Date(e.createdAt).getTime() - new Date(t.createdAt).getTime() : String(e[n]).localeCompare(String(t[n])), u.direction === "descending" && (r *= -1), r;
1590
- }), [u, b]), [S, C] = q(!1);
1591
- return /* @__PURE__ */ X("div", {
1592
- className: G("flex flex-col gap-3", e),
1596
+ }), [u, b]), [S, C] = J(!1);
1597
+ return /* @__PURE__ */ Z("div", {
1598
+ className: K("flex flex-col gap-3", e),
1593
1599
  ...t,
1594
1600
  children: [
1595
- /* @__PURE__ */ Y("h3", {
1601
+ /* @__PURE__ */ X("h3", {
1596
1602
  className: "truncate text-sm font-semibold",
1597
1603
  children: i.invitations
1598
1604
  }),
1599
- /* @__PURE__ */ X("div", {
1605
+ /* @__PURE__ */ Z("div", {
1600
1606
  className: "flex flex-col gap-4",
1601
1607
  children: [
1602
- /* @__PURE__ */ X("div", {
1608
+ /* @__PURE__ */ Z("div", {
1603
1609
  className: "flex items-center gap-3",
1604
1610
  children: [
1605
- /* @__PURE__ */ Y(z, {
1611
+ /* @__PURE__ */ X(B, {
1606
1612
  className: "min-w-0",
1607
1613
  "aria-label": i.search,
1608
1614
  value: v,
1609
1615
  onChange: y,
1610
1616
  isDisabled: l,
1611
- children: /* @__PURE__ */ X(z.Group, { children: [
1612
- /* @__PURE__ */ Y(z.SearchIcon, {}),
1613
- /* @__PURE__ */ Y(z.Input, {
1617
+ children: /* @__PURE__ */ Z(B.Group, { children: [
1618
+ /* @__PURE__ */ X(B.SearchIcon, {}),
1619
+ /* @__PURE__ */ X(B.Input, {
1614
1620
  placeholder: i.search,
1615
1621
  className: "sm:w-[200px]"
1616
1622
  }),
1617
- /* @__PURE__ */ Y(z.ClearButton, {})
1623
+ /* @__PURE__ */ X(B.ClearButton, {})
1618
1624
  ] })
1619
1625
  }),
1620
- /* @__PURE__ */ X(M, { children: [/* @__PURE__ */ X(k, {
1626
+ /* @__PURE__ */ Z(N, { children: [/* @__PURE__ */ Z(A, {
1621
1627
  size: "sm",
1622
1628
  variant: "secondary",
1623
1629
  isDisabled: l,
1624
- children: [/* @__PURE__ */ Y(Le, {}), i.role]
1625
- }), /* @__PURE__ */ Y(M.Popover, { children: /* @__PURE__ */ X(M.Menu, {
1630
+ children: [/* @__PURE__ */ X(Le, {}), i.role]
1631
+ }), /* @__PURE__ */ X(N.Popover, { children: /* @__PURE__ */ Z(N.Menu, {
1626
1632
  selectionMode: "single",
1627
1633
  selectedKeys: new Set([f]),
1628
1634
  onSelectionChange: (e) => {
1629
1635
  let t = [...e][0];
1630
1636
  p(t ?? "all");
1631
1637
  },
1632
- children: [/* @__PURE__ */ X(M.Item, {
1638
+ children: [/* @__PURE__ */ Z(N.Item, {
1633
1639
  id: "all",
1634
1640
  textValue: i.all,
1635
- children: [/* @__PURE__ */ Y(L, { children: i.all }), /* @__PURE__ */ Y(M.ItemIndicator, {})]
1636
- }), Object.entries(a).map(([e, t]) => /* @__PURE__ */ X(M.Item, {
1641
+ children: [/* @__PURE__ */ X(R, { children: i.all }), /* @__PURE__ */ X(N.ItemIndicator, {})]
1642
+ }), Object.entries(a).map(([e, t]) => /* @__PURE__ */ Z(N.Item, {
1637
1643
  id: e,
1638
1644
  textValue: t,
1639
- children: [/* @__PURE__ */ Y(L, { children: t }), /* @__PURE__ */ Y(M.ItemIndicator, {})]
1645
+ children: [/* @__PURE__ */ X(R, { children: t }), /* @__PURE__ */ X(N.ItemIndicator, {})]
1640
1646
  }, e))]
1641
1647
  }) })] }),
1642
- /* @__PURE__ */ X(M, { children: [/* @__PURE__ */ X(k, {
1648
+ /* @__PURE__ */ Z(N, { children: [/* @__PURE__ */ Z(A, {
1643
1649
  size: "sm",
1644
1650
  variant: "secondary",
1645
1651
  isDisabled: l,
1646
- children: [/* @__PURE__ */ Y(Le, {}), i.status]
1647
- }), /* @__PURE__ */ Y(M.Popover, { children: /* @__PURE__ */ X(M.Menu, {
1652
+ children: [/* @__PURE__ */ X(Le, {}), i.status]
1653
+ }), /* @__PURE__ */ X(N.Popover, { children: /* @__PURE__ */ Z(N.Menu, {
1648
1654
  selectionMode: "single",
1649
- selectedKeys: new Set([g]),
1655
+ selectedKeys: new Set([m]),
1650
1656
  onSelectionChange: (e) => {
1651
1657
  let t = [...e][0];
1652
1658
  _(t ?? "all");
1653
1659
  },
1654
- children: [/* @__PURE__ */ X(M.Item, {
1660
+ children: [/* @__PURE__ */ Z(N.Item, {
1655
1661
  id: "all",
1656
1662
  textValue: i.all,
1657
- children: [/* @__PURE__ */ Y(L, { children: i.all }), /* @__PURE__ */ Y(M.ItemIndicator, {})]
1663
+ children: [/* @__PURE__ */ X(R, { children: i.all }), /* @__PURE__ */ X(N.ItemIndicator, {})]
1658
1664
  }), [
1659
1665
  "pending",
1660
1666
  "accepted",
1661
1667
  "rejected",
1662
1668
  "canceled"
1663
- ].map((e) => /* @__PURE__ */ X(M.Item, {
1669
+ ].map((e) => /* @__PURE__ */ Z(N.Item, {
1664
1670
  id: e,
1665
1671
  textValue: i[e] ?? e,
1666
- children: [/* @__PURE__ */ Y(L, { children: i[e] ?? e }), /* @__PURE__ */ Y(M.ItemIndicator, {})]
1672
+ children: [/* @__PURE__ */ X(R, { children: i[e] ?? e }), /* @__PURE__ */ X(N.ItemIndicator, {})]
1667
1673
  }, e))]
1668
1674
  }) })] })
1669
1675
  ]
1670
1676
  }),
1671
- (f !== "all" || g !== "all") && /* @__PURE__ */ X("div", {
1677
+ (f !== "all" || m !== "all") && /* @__PURE__ */ Z("div", {
1672
1678
  className: "flex flex-wrap gap-2",
1673
- children: [f !== "all" && /* @__PURE__ */ X(j, {
1679
+ children: [f !== "all" && /* @__PURE__ */ Z(M, {
1674
1680
  size: "sm",
1675
1681
  variant: "secondary",
1676
1682
  className: "w-fit",
1677
- children: [/* @__PURE__ */ X(j.Label, { children: [
1683
+ children: [/* @__PURE__ */ Z(M.Label, { children: [
1678
1684
  i.role,
1679
1685
  ":",
1680
1686
  " ",
1681
- /* @__PURE__ */ Y("span", {
1687
+ /* @__PURE__ */ X("span", {
1682
1688
  className: "capitalize",
1683
1689
  children: a?.[f] ?? f
1684
1690
  })
1685
- ] }), /* @__PURE__ */ Y("button", {
1691
+ ] }), /* @__PURE__ */ X("button", {
1686
1692
  type: "button",
1687
1693
  "aria-label": i.clear,
1688
1694
  className: "text-muted hover:text-foreground inline-flex cursor-pointer items-center",
1689
1695
  onClick: () => p("all"),
1690
- children: /* @__PURE__ */ Y(D, { className: "size-3" })
1696
+ children: /* @__PURE__ */ X(O, { className: "size-3" })
1691
1697
  })]
1692
- }), g !== "all" && /* @__PURE__ */ X(j, {
1698
+ }), m !== "all" && /* @__PURE__ */ Z(M, {
1693
1699
  size: "sm",
1694
1700
  variant: "secondary",
1695
1701
  className: "w-fit",
1696
- children: [/* @__PURE__ */ X(j.Label, { children: [
1702
+ children: [/* @__PURE__ */ Z(M.Label, { children: [
1697
1703
  i.status,
1698
1704
  ":",
1699
1705
  " ",
1700
- i[g] ?? g
1701
- ] }), /* @__PURE__ */ Y("button", {
1706
+ i[m] ?? m
1707
+ ] }), /* @__PURE__ */ X("button", {
1702
1708
  type: "button",
1703
1709
  "aria-label": i.clear,
1704
1710
  className: "text-muted hover:text-foreground inline-flex cursor-pointer items-center",
1705
1711
  onClick: () => _("all"),
1706
- children: /* @__PURE__ */ Y(D, { className: "size-3" })
1712
+ children: /* @__PURE__ */ X(O, { className: "size-3" })
1707
1713
  })]
1708
1714
  })]
1709
1715
  }),
1710
- /* @__PURE__ */ Y(H, { children: /* @__PURE__ */ Y(H.ScrollContainer, { children: /* @__PURE__ */ X(H.Content, {
1716
+ /* @__PURE__ */ X(U, { children: /* @__PURE__ */ X(U.ScrollContainer, { children: /* @__PURE__ */ Z(U.Content, {
1711
1717
  "aria-label": i.invitations,
1712
1718
  sortDescriptor: u,
1713
1719
  onSortChange: (e) => {
1714
1720
  d(u?.column === e.column && e.direction === "ascending" ? void 0 : e);
1715
1721
  },
1716
- children: [/* @__PURE__ */ X(H.Header, { children: [
1717
- /* @__PURE__ */ Y(H.Column, {
1722
+ children: [/* @__PURE__ */ Z(U.Header, { children: [
1723
+ /* @__PURE__ */ X(U.Column, {
1718
1724
  allowsSorting: !0,
1719
1725
  isRowHeader: !0,
1720
1726
  id: "email",
1721
- children: ({ sortDirection: e }) => /* @__PURE__ */ Y(H.SortableColumnHeader, {
1727
+ children: ({ sortDirection: e }) => /* @__PURE__ */ X(U.SortableColumnHeader, {
1722
1728
  sortDirection: e,
1723
1729
  children: r.auth.email
1724
1730
  })
1725
1731
  }),
1726
- /* @__PURE__ */ Y(H.Column, {
1732
+ /* @__PURE__ */ X(U.Column, {
1727
1733
  allowsSorting: !0,
1728
1734
  id: "createdAt",
1729
- children: ({ sortDirection: e }) => /* @__PURE__ */ Y(H.SortableColumnHeader, {
1735
+ children: ({ sortDirection: e }) => /* @__PURE__ */ X(U.SortableColumnHeader, {
1730
1736
  sortDirection: e,
1731
1737
  children: i.invitedAt
1732
1738
  })
1733
1739
  }),
1734
- /* @__PURE__ */ Y(H.Column, {
1740
+ /* @__PURE__ */ X(U.Column, {
1735
1741
  allowsSorting: !0,
1736
1742
  id: "role",
1737
- children: ({ sortDirection: e }) => /* @__PURE__ */ Y(H.SortableColumnHeader, {
1743
+ children: ({ sortDirection: e }) => /* @__PURE__ */ X(U.SortableColumnHeader, {
1738
1744
  sortDirection: e,
1739
1745
  children: i.role
1740
1746
  })
1741
1747
  }),
1742
- /* @__PURE__ */ Y(H.Column, {
1748
+ /* @__PURE__ */ X(U.Column, {
1743
1749
  allowsSorting: !0,
1744
1750
  id: "status",
1745
- children: ({ sortDirection: e }) => /* @__PURE__ */ Y(H.SortableColumnHeader, {
1751
+ children: ({ sortDirection: e }) => /* @__PURE__ */ X(U.SortableColumnHeader, {
1746
1752
  sortDirection: e,
1747
1753
  children: i.status
1748
1754
  })
1749
1755
  }),
1750
- /* @__PURE__ */ Y(H.Column, {
1756
+ /* @__PURE__ */ X(U.Column, {
1751
1757
  className: "text-end",
1752
1758
  children: i.actions
1753
1759
  })
1754
- ] }), /* @__PURE__ */ Y(H.Body, {
1755
- renderEmptyState: () => /* @__PURE__ */ Y(fn, { onInvitePress: () => C(!0) }),
1756
- children: l ? /* @__PURE__ */ Y(un, {}) : x?.map((e) => /* @__PURE__ */ Y(dn, { invitation: e }, e.id))
1760
+ ] }), /* @__PURE__ */ X(U.Body, {
1761
+ renderEmptyState: () => /* @__PURE__ */ X(mn, { onInvitePress: () => C(!0) }),
1762
+ children: l ? /* @__PURE__ */ X(fn, {}) : x?.map((e) => /* @__PURE__ */ X(pn, { invitation: e }, e.id))
1757
1763
  })]
1758
1764
  }) }) })
1759
1765
  ]
1760
1766
  }),
1761
- /* @__PURE__ */ Y(sn, {
1767
+ /* @__PURE__ */ X(ln, {
1762
1768
  isOpen: S,
1763
1769
  onOpenChange: C
1764
1770
  })
@@ -1767,61 +1773,61 @@ function pn({ className: e, ...t }) {
1767
1773
  }
1768
1774
  //#endregion
1769
1775
  //#region src/components/auth/organization/organization-member-row-skeleton.tsx
1770
- function mn() {
1771
- return /* @__PURE__ */ X(H.Row, { children: [
1772
- /* @__PURE__ */ Y(H.Cell, { children: /* @__PURE__ */ Y(r, { isPending: !0 }) }),
1773
- /* @__PURE__ */ Y(H.Cell, { children: /* @__PURE__ */ Y(B, { className: "h-4 w-18 rounded-lg" }) }),
1774
- /* @__PURE__ */ Y(H.Cell, {
1776
+ function gn() {
1777
+ return /* @__PURE__ */ Z(U.Row, { children: [
1778
+ /* @__PURE__ */ X(U.Cell, { children: /* @__PURE__ */ X(i, { isPending: !0 }) }),
1779
+ /* @__PURE__ */ X(U.Cell, { children: /* @__PURE__ */ X(V, { className: "h-4 w-18 rounded-lg" }) }),
1780
+ /* @__PURE__ */ X(U.Cell, {
1775
1781
  className: "flex justify-end",
1776
- children: /* @__PURE__ */ Y(B, { className: "size-8 rounded-full" })
1782
+ children: /* @__PURE__ */ X(V, { className: "size-8 rounded-full" })
1777
1783
  })
1778
1784
  ] });
1779
1785
  }
1780
1786
  //#endregion
1781
1787
  //#region src/components/auth/organization/remove-member-dialog.tsx
1782
- function hn({ isOpen: e, onOpenChange: t, member: n }) {
1783
- let { authClient: i, localization: a } = m(), { localization: o, roles: s } = h($), { mutate: c, isPending: l } = pe(i, { onSuccess: () => {
1784
- t(!1), K.success(o.memberRemoved);
1788
+ function _n({ isOpen: e, onOpenChange: t, member: n }) {
1789
+ let { authClient: r, localization: a } = h(), { localization: o, roles: s } = g($), { mutate: c, isPending: l } = pe(r, { onSuccess: () => {
1790
+ t(!1), q.success(o.memberRemoved);
1785
1791
  } });
1786
- return /* @__PURE__ */ Y(O.Backdrop, {
1792
+ return /* @__PURE__ */ X(k.Backdrop, {
1787
1793
  isOpen: e,
1788
1794
  onOpenChange: t,
1789
- children: /* @__PURE__ */ Y(O.Container, { children: /* @__PURE__ */ X(O.Dialog, { children: [
1790
- /* @__PURE__ */ Y(O.CloseTrigger, {}),
1791
- /* @__PURE__ */ X(O.Header, { children: [/* @__PURE__ */ Y(O.Icon, {
1795
+ children: /* @__PURE__ */ X(k.Container, { children: /* @__PURE__ */ Z(k.Dialog, { children: [
1796
+ /* @__PURE__ */ X(k.CloseTrigger, {}),
1797
+ /* @__PURE__ */ Z(k.Header, { children: [/* @__PURE__ */ X(k.Icon, {
1792
1798
  status: "danger",
1793
- children: /* @__PURE__ */ Y(Je, {})
1794
- }), /* @__PURE__ */ Y(O.Heading, { children: o.removeMember })] }),
1795
- /* @__PURE__ */ X(O.Body, {
1799
+ children: /* @__PURE__ */ X(Je, {})
1800
+ }), /* @__PURE__ */ X(k.Heading, { children: o.removeMember })] }),
1801
+ /* @__PURE__ */ Z(k.Body, {
1796
1802
  className: "flex flex-col gap-4 overflow-visible",
1797
- children: [/* @__PURE__ */ Y("p", {
1803
+ children: [/* @__PURE__ */ X("p", {
1798
1804
  className: "text-muted text-sm",
1799
1805
  children: o.removeMemberWarning
1800
- }), /* @__PURE__ */ Y(A, {
1806
+ }), /* @__PURE__ */ X(j, {
1801
1807
  variant: "secondary",
1802
- children: /* @__PURE__ */ X(A.Content, {
1808
+ children: /* @__PURE__ */ Z(j.Content, {
1803
1809
  className: "justify-between flex-row items-center gap-2",
1804
- children: [/* @__PURE__ */ Y(r, { user: n.user }), /* @__PURE__ */ Y(j, {
1810
+ children: [/* @__PURE__ */ X(i, { user: n.user }), /* @__PURE__ */ X(M, {
1805
1811
  size: "sm",
1806
1812
  variant: "tertiary",
1807
- children: /* @__PURE__ */ Y(j.Label, { children: s?.[n.role] ?? n.role })
1813
+ children: /* @__PURE__ */ X(M.Label, { children: s?.[n.role] ?? n.role })
1808
1814
  })]
1809
1815
  })
1810
1816
  })]
1811
1817
  }),
1812
- /* @__PURE__ */ X(O.Footer, { children: [/* @__PURE__ */ Y(k, {
1818
+ /* @__PURE__ */ Z(k.Footer, { children: [/* @__PURE__ */ X(A, {
1813
1819
  slot: "close",
1814
1820
  variant: "tertiary",
1815
1821
  isDisabled: l,
1816
1822
  children: a.settings.cancel
1817
- }), /* @__PURE__ */ X(k, {
1823
+ }), /* @__PURE__ */ Z(A, {
1818
1824
  variant: "danger",
1819
1825
  isPending: l,
1820
1826
  onPress: () => c({
1821
1827
  memberIdOrEmail: n.id,
1822
1828
  organizationId: n.organizationId
1823
1829
  }),
1824
- children: [l && /* @__PURE__ */ Y(V, {
1830
+ children: [l && /* @__PURE__ */ X(H, {
1825
1831
  color: "current",
1826
1832
  size: "sm"
1827
1833
  }), o.removeMember]
@@ -1831,54 +1837,54 @@ function hn({ isOpen: e, onOpenChange: t, member: n }) {
1831
1837
  }
1832
1838
  //#endregion
1833
1839
  //#region src/components/auth/organization/organization-member-row.tsx
1834
- function gn({ member: e, isOwner: t, organization: n }) {
1835
- let { authClient: i } = m(), { localization: a, roles: o } = h($), { data: s } = E(i), { data: c, isPending: l } = T(i, { permissions: { member: ["update"] } }), { data: u, isPending: d } = T(i, { permissions: { member: ["delete"] } }), f = l || d, { mutate: p, isPending: g } = xe(i, { onSuccess: () => K.success(a.memberRoleUpdated) }), _ = o?.[e.role] ?? e.role, v = Object.entries(o).filter(([e]) => t || e !== "owner"), y = s?.user.id === e.userId, [b, x] = q(!1), [S, C] = q(!1);
1836
- return f ? /* @__PURE__ */ Y(mn, {}) : /* @__PURE__ */ X(H.Row, { children: [
1837
- /* @__PURE__ */ Y(H.Cell, { children: /* @__PURE__ */ Y(r, { user: e.user }) }),
1838
- /* @__PURE__ */ Y(H.Cell, { children: _ }),
1839
- /* @__PURE__ */ X(H.Cell, { children: [/* @__PURE__ */ X("div", {
1840
+ function vn({ member: e, isOwner: t, organization: n }) {
1841
+ let { authClient: r } = h(), { localization: a, roles: o } = g($), { data: s } = D(r), { data: c, isPending: l } = T(r, { permissions: { member: ["update"] } }), { data: u, isPending: d } = T(r, { permissions: { member: ["delete"] } }), f = l || d, { mutate: p, isPending: m } = xe(r, { onSuccess: () => q.success(a.memberRoleUpdated) }), _ = o?.[e.role] ?? e.role, v = Object.entries(o).filter(([e]) => t || e !== "owner"), y = s?.user.id === e.userId, [b, x] = J(!1), [S, C] = J(!1);
1842
+ return f ? /* @__PURE__ */ X(gn, {}) : /* @__PURE__ */ Z(U.Row, { children: [
1843
+ /* @__PURE__ */ X(U.Cell, { children: /* @__PURE__ */ X(i, { user: e.user }) }),
1844
+ /* @__PURE__ */ X(U.Cell, { children: _ }),
1845
+ /* @__PURE__ */ Z(U.Cell, { children: [/* @__PURE__ */ Z("div", {
1840
1846
  className: "flex items-center justify-end gap-1",
1841
- children: [c?.success && /* @__PURE__ */ X(M, { children: [/* @__PURE__ */ Y(k, {
1847
+ children: [c?.success && /* @__PURE__ */ Z(N, { children: [/* @__PURE__ */ X(A, {
1842
1848
  isIconOnly: !0,
1843
1849
  size: "sm",
1844
1850
  variant: "tertiary",
1845
- isDisabled: g,
1851
+ isDisabled: m,
1846
1852
  "aria-label": a.changeMemberRole,
1847
- children: g ? /* @__PURE__ */ Y(V, {
1853
+ children: m ? /* @__PURE__ */ X(H, {
1848
1854
  color: "current",
1849
1855
  size: "sm"
1850
- }) : /* @__PURE__ */ Y(We, {})
1851
- }), /* @__PURE__ */ Y(M.Popover, {
1856
+ }) : /* @__PURE__ */ X(We, {})
1857
+ }), /* @__PURE__ */ X(N.Popover, {
1852
1858
  className: "min-w-fit",
1853
- children: /* @__PURE__ */ Y(M.Menu, { children: v.map(([t, n]) => /* @__PURE__ */ Y(M.Item, {
1859
+ children: /* @__PURE__ */ X(N.Menu, { children: v.map(([t, n]) => /* @__PURE__ */ X(N.Item, {
1854
1860
  textValue: n,
1855
1861
  isDisabled: e.role === t,
1856
1862
  onAction: () => p({
1857
1863
  memberId: e.id,
1858
1864
  role: t
1859
1865
  }),
1860
- children: /* @__PURE__ */ Y(L, { children: n })
1866
+ children: /* @__PURE__ */ X(R, { children: n })
1861
1867
  }, t)) })
1862
- })] }), y ? /* @__PURE__ */ Y(k, {
1868
+ })] }), y ? /* @__PURE__ */ X(A, {
1863
1869
  isIconOnly: !0,
1864
1870
  size: "sm",
1865
1871
  variant: "danger-soft",
1866
1872
  "aria-label": a.leaveOrganization,
1867
1873
  onPress: () => C(!0),
1868
- children: /* @__PURE__ */ Y(Te, {})
1869
- }) : u?.success && /* @__PURE__ */ Y(k, {
1874
+ children: /* @__PURE__ */ X(Te, {})
1875
+ }) : u?.success && /* @__PURE__ */ X(A, {
1870
1876
  isIconOnly: !0,
1871
1877
  size: "sm",
1872
1878
  variant: "danger-soft",
1873
1879
  "aria-label": a.removeMember,
1874
1880
  onPress: () => x(!0),
1875
- children: /* @__PURE__ */ Y(Je, {})
1881
+ children: /* @__PURE__ */ X(Je, {})
1876
1882
  })]
1877
- }), y && n ? /* @__PURE__ */ Y(cn, {
1883
+ }), y && n ? /* @__PURE__ */ X(un, {
1878
1884
  isOpen: S,
1879
1885
  onOpenChange: C,
1880
1886
  organization: n
1881
- }) : u?.success && /* @__PURE__ */ Y(hn, {
1887
+ }) : u?.success && /* @__PURE__ */ X(_n, {
1882
1888
  isOpen: b,
1883
1889
  onOpenChange: x,
1884
1890
  member: e
@@ -1887,123 +1893,123 @@ function gn({ member: e, isOwner: t, organization: n }) {
1887
1893
  }
1888
1894
  //#endregion
1889
1895
  //#region src/components/auth/organization/organization-members.tsx
1890
- function _n({ className: e, ...t }) {
1891
- let { authClient: n } = m(), { localization: r, roles: i } = h($), { data: a } = E(n), { data: o, isPending: s } = f(n), { data: c, isPending: l } = ce(n), { isPending: u } = T(n, { permissions: { member: ["update"] } }), { isPending: d } = T(n, { permissions: { member: ["delete"] } }), p = s || l || u || d, [g, _] = q(), [v, y] = q("all"), [b, x] = q(""), S = ot(() => c?.members.filter((e) => (v === "all" || e.role === v) && (e.user.name.toLowerCase().includes(b.toLowerCase()) || e.user.email.toLowerCase().includes(b.toLowerCase()))), [
1896
+ function yn({ className: e, ...t }) {
1897
+ let { authClient: n } = h(), { localization: r, roles: i } = g($), { data: a } = D(n), { data: o, isPending: s } = p(n), { data: c, isPending: l } = ce(n), { isPending: u } = T(n, { permissions: { member: ["update"] } }), { isPending: d } = T(n, { permissions: { member: ["delete"] } }), f = s || l || u || d, [m, _] = J(), [v, y] = J("all"), [b, x] = J(""), S = ot(() => c?.members.filter((e) => (v === "all" || e.role === v) && (e.user.name.toLowerCase().includes(b.toLowerCase()) || e.user.email.toLowerCase().includes(b.toLowerCase()))), [
1892
1898
  b,
1893
1899
  c?.members,
1894
1900
  v
1895
- ]), C = ot(() => !g || !S ? S : [...S].sort((e, t) => {
1896
- let n = g.column, r = n === "user" ? e.user.name || e.user.email : String(e[n]), i = n === "user" ? t.user.name || t.user.email : String(t[n]), a = r.localeCompare(i);
1897
- return g.direction === "descending" && (a *= -1), a;
1898
- }), [g, S]), [ee, w] = q(!1), te = c?.members.some((e) => e.role === "owner" && e.userId === a?.user.id);
1899
- return /* @__PURE__ */ X("div", {
1900
- className: G("flex flex-col gap-3", e),
1901
+ ]), C = ot(() => !m || !S ? S : [...S].sort((e, t) => {
1902
+ let n = m.column, r = n === "user" ? e.user.name || e.user.email : String(e[n]), i = n === "user" ? t.user.name || t.user.email : String(t[n]), a = r.localeCompare(i);
1903
+ return m.direction === "descending" && (a *= -1), a;
1904
+ }), [m, S]), [w, ee] = J(!1), te = c?.members.some((e) => e.role === "owner" && e.userId === a?.user.id);
1905
+ return /* @__PURE__ */ Z("div", {
1906
+ className: K("flex flex-col gap-3", e),
1901
1907
  ...t,
1902
1908
  children: [
1903
- /* @__PURE__ */ X("div", {
1909
+ /* @__PURE__ */ Z("div", {
1904
1910
  className: "flex items-end justify-between gap-3",
1905
- children: [/* @__PURE__ */ Y("h3", {
1911
+ children: [/* @__PURE__ */ X("h3", {
1906
1912
  className: "truncate text-sm font-semibold",
1907
1913
  children: r.members
1908
- }), /* @__PURE__ */ Y(k, {
1914
+ }), /* @__PURE__ */ X(A, {
1909
1915
  className: "shrink-0",
1910
1916
  size: "sm",
1911
- isDisabled: p,
1912
- onPress: () => w(!0),
1917
+ isDisabled: f,
1918
+ onPress: () => ee(!0),
1913
1919
  children: r.inviteMember
1914
1920
  })]
1915
1921
  }),
1916
- /* @__PURE__ */ X("div", {
1922
+ /* @__PURE__ */ Z("div", {
1917
1923
  className: "flex flex-col gap-4",
1918
1924
  children: [
1919
- /* @__PURE__ */ X("div", {
1925
+ /* @__PURE__ */ Z("div", {
1920
1926
  className: "flex items-center gap-3",
1921
- children: [/* @__PURE__ */ Y(z, {
1927
+ children: [/* @__PURE__ */ X(B, {
1922
1928
  className: "min-w-0",
1923
1929
  "aria-label": r.search,
1924
1930
  value: b,
1925
1931
  onChange: x,
1926
- isDisabled: p,
1927
- children: /* @__PURE__ */ X(z.Group, { children: [
1928
- /* @__PURE__ */ Y(z.SearchIcon, {}),
1929
- /* @__PURE__ */ Y(z.Input, {
1932
+ isDisabled: f,
1933
+ children: /* @__PURE__ */ Z(B.Group, { children: [
1934
+ /* @__PURE__ */ X(B.SearchIcon, {}),
1935
+ /* @__PURE__ */ X(B.Input, {
1930
1936
  placeholder: r.search,
1931
1937
  className: "sm:w-[200px]"
1932
1938
  }),
1933
- /* @__PURE__ */ Y(z.ClearButton, {})
1939
+ /* @__PURE__ */ X(B.ClearButton, {})
1934
1940
  ] })
1935
- }), /* @__PURE__ */ X(M, { children: [/* @__PURE__ */ X(k, {
1941
+ }), /* @__PURE__ */ Z(N, { children: [/* @__PURE__ */ Z(A, {
1936
1942
  size: "sm",
1937
1943
  variant: "secondary",
1938
- isDisabled: p,
1939
- children: [/* @__PURE__ */ Y(Le, {}), r.role]
1940
- }), /* @__PURE__ */ Y(M.Popover, { children: /* @__PURE__ */ X(M.Menu, {
1944
+ isDisabled: f,
1945
+ children: [/* @__PURE__ */ X(Le, {}), r.role]
1946
+ }), /* @__PURE__ */ X(N.Popover, { children: /* @__PURE__ */ Z(N.Menu, {
1941
1947
  selectionMode: "single",
1942
1948
  selectedKeys: new Set([v]),
1943
1949
  onSelectionChange: (e) => {
1944
1950
  let t = [...e][0];
1945
1951
  y(t ?? "all");
1946
1952
  },
1947
- children: [/* @__PURE__ */ X(M.Item, {
1953
+ children: [/* @__PURE__ */ Z(N.Item, {
1948
1954
  id: "all",
1949
1955
  textValue: r.all,
1950
- children: [/* @__PURE__ */ Y(L, { children: r.all }), /* @__PURE__ */ Y(M.ItemIndicator, {})]
1951
- }), Object.entries(i).map(([e, t]) => /* @__PURE__ */ X(M.Item, {
1956
+ children: [/* @__PURE__ */ X(R, { children: r.all }), /* @__PURE__ */ X(N.ItemIndicator, {})]
1957
+ }), Object.entries(i).map(([e, t]) => /* @__PURE__ */ Z(N.Item, {
1952
1958
  id: e,
1953
1959
  textValue: t,
1954
- children: [/* @__PURE__ */ Y(L, { children: t }), /* @__PURE__ */ Y(M.ItemIndicator, {})]
1960
+ children: [/* @__PURE__ */ X(R, { children: t }), /* @__PURE__ */ X(N.ItemIndicator, {})]
1955
1961
  }, e))]
1956
1962
  }) })] })]
1957
1963
  }),
1958
- v !== "all" && /* @__PURE__ */ X(j, {
1964
+ v !== "all" && /* @__PURE__ */ Z(M, {
1959
1965
  size: "sm",
1960
1966
  variant: "secondary",
1961
1967
  className: "w-fit",
1962
- children: [/* @__PURE__ */ X(j.Label, { children: [
1968
+ children: [/* @__PURE__ */ Z(M.Label, { children: [
1963
1969
  r.role,
1964
1970
  ":",
1965
1971
  " ",
1966
- /* @__PURE__ */ Y("span", {
1972
+ /* @__PURE__ */ X("span", {
1967
1973
  className: "capitalize",
1968
1974
  children: i?.[v] ?? v
1969
1975
  })
1970
- ] }), /* @__PURE__ */ Y("button", {
1976
+ ] }), /* @__PURE__ */ X("button", {
1971
1977
  type: "button",
1972
1978
  "aria-label": r.clear,
1973
1979
  className: "text-muted hover:text-foreground inline-flex cursor-pointer items-center",
1974
1980
  onClick: () => y("all"),
1975
- children: /* @__PURE__ */ Y(D, { className: "size-3" })
1981
+ children: /* @__PURE__ */ X(O, { className: "size-3" })
1976
1982
  })]
1977
1983
  }),
1978
- /* @__PURE__ */ Y(H, { children: /* @__PURE__ */ Y(H.ScrollContainer, { children: /* @__PURE__ */ X(H.Content, {
1984
+ /* @__PURE__ */ X(U, { children: /* @__PURE__ */ X(U.ScrollContainer, { children: /* @__PURE__ */ Z(U.Content, {
1979
1985
  "aria-label": r.members,
1980
- sortDescriptor: g,
1986
+ sortDescriptor: m,
1981
1987
  onSortChange: (e) => {
1982
- _(g?.column === e.column && e.direction === "ascending" ? void 0 : e);
1988
+ _(m?.column === e.column && e.direction === "ascending" ? void 0 : e);
1983
1989
  },
1984
- children: [/* @__PURE__ */ X(H.Header, { children: [
1985
- /* @__PURE__ */ Y(H.Column, {
1990
+ children: [/* @__PURE__ */ Z(U.Header, { children: [
1991
+ /* @__PURE__ */ X(U.Column, {
1986
1992
  allowsSorting: !0,
1987
1993
  isRowHeader: !0,
1988
1994
  id: "user",
1989
- children: ({ sortDirection: e }) => /* @__PURE__ */ Y(H.SortableColumnHeader, {
1995
+ children: ({ sortDirection: e }) => /* @__PURE__ */ X(U.SortableColumnHeader, {
1990
1996
  sortDirection: e,
1991
1997
  children: r.member
1992
1998
  })
1993
1999
  }),
1994
- /* @__PURE__ */ Y(H.Column, {
2000
+ /* @__PURE__ */ X(U.Column, {
1995
2001
  allowsSorting: !0,
1996
2002
  id: "role",
1997
- children: ({ sortDirection: e }) => /* @__PURE__ */ Y(H.SortableColumnHeader, {
2003
+ children: ({ sortDirection: e }) => /* @__PURE__ */ X(U.SortableColumnHeader, {
1998
2004
  sortDirection: e,
1999
2005
  children: r.role
2000
2006
  })
2001
2007
  }),
2002
- /* @__PURE__ */ Y(H.Column, {
2008
+ /* @__PURE__ */ X(U.Column, {
2003
2009
  className: "text-end",
2004
2010
  children: r.actions
2005
2011
  })
2006
- ] }), /* @__PURE__ */ Y(H.Body, { children: p ? /* @__PURE__ */ Y(mn, {}) : !!o && C?.map((e) => /* @__PURE__ */ Y(gn, {
2012
+ ] }), /* @__PURE__ */ X(U.Body, { children: f ? /* @__PURE__ */ X(gn, {}) : !!o && C?.map((e) => /* @__PURE__ */ X(vn, {
2007
2013
  member: e,
2008
2014
  isOwner: te,
2009
2015
  organization: o
@@ -2011,101 +2017,101 @@ function _n({ className: e, ...t }) {
2011
2017
  }) }) })
2012
2018
  ]
2013
2019
  }),
2014
- /* @__PURE__ */ Y(sn, {
2015
- isOpen: ee,
2016
- onOpenChange: w
2020
+ /* @__PURE__ */ X(ln, {
2021
+ isOpen: w,
2022
+ onOpenChange: ee
2017
2023
  })
2018
2024
  ]
2019
2025
  });
2020
2026
  }
2021
2027
  //#endregion
2022
2028
  //#region src/components/auth/organization/organization-people.tsx
2023
- function vn({ className: e, ...t }) {
2024
- return /* @__PURE__ */ X("div", {
2025
- className: G("flex flex-col gap-4 md:gap-6", e),
2029
+ function bn({ className: e, ...t }) {
2030
+ return /* @__PURE__ */ Z("div", {
2031
+ className: K("flex flex-col gap-4 md:gap-6", e),
2026
2032
  ...t,
2027
- children: [/* @__PURE__ */ Y(_n, {}), /* @__PURE__ */ Y(pn, {})]
2033
+ children: [/* @__PURE__ */ X(yn, {}), /* @__PURE__ */ X(hn, {})]
2028
2034
  });
2029
2035
  }
2030
2036
  //#endregion
2031
2037
  //#region src/components/auth/organization/organization-danger-zone.tsx
2032
- function yn({ className: e, variant: t, ...n }) {
2033
- let { authClient: r, localization: i } = m(), { data: a, isPending: o } = T(r, { permissions: { organization: ["delete"] } }), s = !!a?.success;
2034
- return /* @__PURE__ */ X("div", {
2035
- className: G("flex w-full flex-col", e),
2038
+ function xn({ className: e, variant: t, ...n }) {
2039
+ let { authClient: r, localization: i } = h(), { data: a, isPending: o } = T(r, { permissions: { organization: ["delete"] } }), s = !!a?.success;
2040
+ return /* @__PURE__ */ Z("div", {
2041
+ className: K("flex w-full flex-col", e),
2036
2042
  ...n,
2037
- children: [/* @__PURE__ */ Y("h2", {
2038
- className: G("mb-3 text-sm font-semibold text-danger"),
2043
+ children: [/* @__PURE__ */ X("h2", {
2044
+ className: K("mb-3 text-sm font-semibold text-danger"),
2039
2045
  children: i.settings.dangerZone
2040
- }), /* @__PURE__ */ Y(A, {
2046
+ }), /* @__PURE__ */ X(j, {
2041
2047
  variant: t,
2042
- children: /* @__PURE__ */ Y(A.Content, {
2048
+ children: /* @__PURE__ */ X(j.Content, {
2043
2049
  className: "gap-0",
2044
- children: o ? /* @__PURE__ */ Y(rn, {}) : /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(ln, {}), s && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("div", { className: "border-b border-dashed -mx-4 my-4" }), /* @__PURE__ */ Y(an, {})] })] })
2050
+ children: o ? /* @__PURE__ */ X(on, {}) : /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(dn, {}), s && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("div", { className: "border-b border-dashed -mx-4 my-4" }), /* @__PURE__ */ X(sn, {})] })] })
2045
2051
  })
2046
2052
  })]
2047
2053
  });
2048
2054
  }
2049
2055
  //#endregion
2050
2056
  //#region src/components/auth/organization/organization-profile.tsx
2051
- function bn({ className: e, variant: t, ...n }) {
2052
- let { authClient: r, localization: i } = m(), { localization: a } = h($), { data: o } = f(r), [s, c] = q(o?.slug ?? "");
2057
+ function Sn({ className: e, variant: t, ...n }) {
2058
+ let { authClient: r, localization: i } = h(), { localization: a } = g($), { data: o } = p(r), [s, c] = J(o?.slug ?? "");
2053
2059
  at(() => {
2054
2060
  c(o?.slug ?? "");
2055
2061
  }, [o?.slug]);
2056
- let { mutate: l, isPending: u } = Se(r, { onSuccess: () => K.success(a.organizationUpdatedSuccess) });
2062
+ let { mutate: l, isPending: u } = Se(r, { onSuccess: () => q.success(a.organizationUpdatedSuccess) });
2057
2063
  function d(e) {
2058
2064
  e.preventDefault(), o && l({ data: {
2059
2065
  name: new FormData(e.currentTarget).get("name"),
2060
2066
  slug: s
2061
2067
  } });
2062
2068
  }
2063
- let p = t === "transparent" ? "primary" : "secondary";
2064
- return /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("h2", {
2065
- className: G("mb-3 text-sm font-semibold"),
2069
+ let f = t === "transparent" ? "primary" : "secondary";
2070
+ return /* @__PURE__ */ Z("div", { children: [/* @__PURE__ */ X("h2", {
2071
+ className: K("mb-3 text-sm font-semibold"),
2066
2072
  children: a.organizationProfile
2067
- }), /* @__PURE__ */ Y(A, {
2068
- className: G(e),
2073
+ }), /* @__PURE__ */ X(j, {
2074
+ className: K(e),
2069
2075
  variant: t,
2070
2076
  ...n,
2071
- children: /* @__PURE__ */ Y(A.Content, { children: /* @__PURE__ */ X(P, {
2077
+ children: /* @__PURE__ */ X(j.Content, { children: /* @__PURE__ */ Z(F, {
2072
2078
  onSubmit: d,
2073
2079
  className: "flex flex-col gap-4",
2074
2080
  children: [
2075
- /* @__PURE__ */ Y(tn, {}),
2076
- /* @__PURE__ */ X(W, {
2081
+ /* @__PURE__ */ X(rn, {}),
2082
+ /* @__PURE__ */ Z(G, {
2077
2083
  name: "name",
2078
2084
  defaultValue: o?.name,
2079
2085
  isDisabled: u || !o,
2080
2086
  children: [
2081
- /* @__PURE__ */ Y(L, { children: a.name }),
2082
- /* @__PURE__ */ Y(F, {
2083
- className: G(!o && "hidden"),
2087
+ /* @__PURE__ */ X(R, { children: a.name }),
2088
+ /* @__PURE__ */ X(I, {
2089
+ className: K(!o && "hidden"),
2084
2090
  autoComplete: "organization",
2085
2091
  placeholder: a.namePlaceholder,
2086
- variant: p
2092
+ variant: f
2087
2093
  }),
2088
- !o && /* @__PURE__ */ Y(B, { className: "h-10 w-full rounded-xl md:h-9" }),
2089
- /* @__PURE__ */ Y(N, {})
2094
+ !o && /* @__PURE__ */ X(V, { className: "h-10 w-full rounded-xl md:h-9" }),
2095
+ /* @__PURE__ */ X(P, {})
2090
2096
  ]
2091
2097
  }, `${o?.id}-${o?.name}-name`),
2092
- o ? /* @__PURE__ */ Y(Ut, {
2098
+ o ? /* @__PURE__ */ X(Gt, {
2093
2099
  value: s,
2094
2100
  onChange: c,
2095
2101
  currentSlug: o.slug,
2096
2102
  isDisabled: u,
2097
- variant: p
2098
- }) : /* @__PURE__ */ X(W, {
2103
+ variant: f
2104
+ }) : /* @__PURE__ */ Z(G, {
2099
2105
  isDisabled: !0,
2100
- children: [/* @__PURE__ */ Y(L, { children: a.slug }), /* @__PURE__ */ Y(B, { className: "h-10 w-full rounded-xl md:h-9" })]
2106
+ children: [/* @__PURE__ */ X(R, { children: a.slug }), /* @__PURE__ */ X(V, { className: "h-10 w-full rounded-xl md:h-9" })]
2101
2107
  }),
2102
- /* @__PURE__ */ X(k, {
2108
+ /* @__PURE__ */ Z(A, {
2103
2109
  type: "submit",
2104
2110
  isPending: u,
2105
2111
  isDisabled: !o,
2106
2112
  size: "sm",
2107
2113
  className: "mt-1",
2108
- children: [u && /* @__PURE__ */ Y(V, {
2114
+ children: [u && /* @__PURE__ */ X(H, {
2109
2115
  color: "current",
2110
2116
  size: "sm"
2111
2117
  }), i.settings.saveChanges]
@@ -2116,25 +2122,25 @@ function bn({ className: e, variant: t, ...n }) {
2116
2122
  }
2117
2123
  //#endregion
2118
2124
  //#region src/components/auth/organization/organization-settings.tsx
2119
- function xn({ className: e, variant: t, ...n }) {
2120
- let { plugins: r } = m();
2121
- return /* @__PURE__ */ X("div", {
2122
- className: G("flex flex-col gap-4 md:gap-6", e),
2125
+ function Cn({ className: e, variant: t, ...n }) {
2126
+ let { plugins: r } = h();
2127
+ return /* @__PURE__ */ Z("div", {
2128
+ className: K("flex flex-col gap-4 md:gap-6", e),
2123
2129
  ...n,
2124
2130
  children: [
2125
- /* @__PURE__ */ Y(bn, { variant: t }),
2126
- r.flatMap((e) => e.organizationCards?.map((n, r) => /* @__PURE__ */ Y(n, { variant: t }, `${e.id}-${r.toString()}`))),
2127
- /* @__PURE__ */ Y(yn, { variant: t })
2131
+ /* @__PURE__ */ X(Sn, { variant: t }),
2132
+ r.flatMap((e) => e.organizationCards?.map((n, r) => /* @__PURE__ */ X(n, { variant: t }, `${e.id}-${r.toString()}`))),
2133
+ /* @__PURE__ */ X(xn, { variant: t })
2128
2134
  ]
2129
2135
  });
2130
2136
  }
2131
2137
  //#endregion
2132
2138
  //#region src/components/auth/organization/organization.tsx
2133
- function Sn({ className: e, hideNav: t, path: n, variant: r, view: i, ...a }) {
2139
+ function wn({ className: e, hideNav: t, path: n, variant: r, view: i, ...a }) {
2134
2140
  if (!i && !n) throw Error("[Better Auth UI] Either `view` or `path` must be provided");
2135
- let { authClient: o, basePaths: s, localization: c, navigate: l } = m();
2136
- g(o);
2137
- let { localization: u, viewPaths: d, slug: p, slugPrefix: _ } = h($), { data: v, isPending: y } = f(o);
2141
+ let { authClient: o, basePaths: s, localization: c, navigate: l } = h();
2142
+ _(o);
2143
+ let { localization: u, viewPaths: d, slug: f, slugPrefix: m } = g($), { data: v, isPending: y } = p(o);
2138
2144
  at(() => {
2139
2145
  !y && !v && l({
2140
2146
  to: `${s.settings}/${d.settings?.organizations}`,
@@ -2156,220 +2162,220 @@ function Sn({ className: e, hideNav: t, path: n, variant: r, view: i, ...a }) {
2156
2162
  let e = Object.values(d.organization).join(", ");
2157
2163
  throw Error(`[Better Auth UI] Unknown organization path "${n}". Valid paths are: ${e}`);
2158
2164
  }
2159
- return !y && !v ? null : /* @__PURE__ */ X(U, {
2160
- className: G(e),
2165
+ return !y && !v ? null : /* @__PURE__ */ Z(W, {
2166
+ className: K(e),
2161
2167
  orientation: "horizontal",
2162
2168
  selectedKey: b,
2163
2169
  ...a,
2164
2170
  children: [
2165
- !t && /* @__PURE__ */ Y(U.ListContainer, { children: /* @__PURE__ */ X(U.List, {
2171
+ !t && /* @__PURE__ */ X(W.ListContainer, { children: /* @__PURE__ */ Z(W.List, {
2166
2172
  "aria-label": c.settings.settings,
2167
2173
  className: "max-w-fit overflow-x-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
2168
- children: [/* @__PURE__ */ X(U.Tab, {
2174
+ children: [/* @__PURE__ */ Z(W.Tab, {
2169
2175
  id: "settings",
2170
- href: p ? `${s.organization}/${_}${p}/${d.organization.settings}` : `${s.organization}/${d.organization.settings}`,
2176
+ href: f ? `${s.organization}/${m}${f}/${d.organization.settings}` : `${s.organization}/${d.organization.settings}`,
2171
2177
  className: "gap-2",
2172
2178
  onPress: (e) => e.target.scrollIntoView({
2173
2179
  behavior: "smooth",
2174
2180
  inline: "center"
2175
2181
  }),
2176
2182
  children: [
2177
- /* @__PURE__ */ Y(Re, { className: "text-muted" }),
2183
+ /* @__PURE__ */ X(Re, { className: "text-muted" }),
2178
2184
  c.settings.settings,
2179
- /* @__PURE__ */ Y(U.Indicator, {})
2185
+ /* @__PURE__ */ X(W.Indicator, {})
2180
2186
  ]
2181
- }), /* @__PURE__ */ X(U.Tab, {
2187
+ }), /* @__PURE__ */ Z(W.Tab, {
2182
2188
  id: "people",
2183
- href: p ? `${s.organization}/${_}${p}/${d.organization.people}` : `${s.organization}/${d.organization.people}`,
2189
+ href: f ? `${s.organization}/${m}${f}/${d.organization.people}` : `${s.organization}/${d.organization.people}`,
2184
2190
  className: "gap-2",
2185
2191
  onPress: (e) => e.target.scrollIntoView({
2186
2192
  behavior: "smooth",
2187
2193
  inline: "center"
2188
2194
  }),
2189
2195
  children: [
2190
- /* @__PURE__ */ Y(Ge, { className: "text-muted" }),
2196
+ /* @__PURE__ */ X(Ge, { className: "text-muted" }),
2191
2197
  u.people,
2192
- /* @__PURE__ */ Y(U.Indicator, {})
2198
+ /* @__PURE__ */ X(W.Indicator, {})
2193
2199
  ]
2194
2200
  })]
2195
2201
  }) }),
2196
- /* @__PURE__ */ Y(U.Panel, {
2202
+ /* @__PURE__ */ X(W.Panel, {
2197
2203
  id: "settings",
2198
2204
  className: "px-0",
2199
- children: /* @__PURE__ */ Y(xn, { variant: r })
2205
+ children: /* @__PURE__ */ X(Cn, { variant: r })
2200
2206
  }),
2201
- /* @__PURE__ */ Y(U.Panel, {
2207
+ /* @__PURE__ */ X(W.Panel, {
2202
2208
  id: "people",
2203
2209
  className: "px-0",
2204
- children: /* @__PURE__ */ Y(vn, {})
2210
+ children: /* @__PURE__ */ X(bn, {})
2205
2211
  })
2206
2212
  ]
2207
2213
  });
2208
2214
  }
2209
2215
  //#endregion
2210
2216
  //#region src/components/auth/organization/organization-switcher.tsx
2211
- function Cn({ className: e, hideCreate: t, hidePersonal: n, hideSettings: i, hideSlug: a = !0, setActive: o, placement: s, variant: c = "ghost", size: l = "md", trigger: u, ...d }) {
2212
- let { authClient: p, navigate: g, basePaths: _, localization: v, viewPaths: y } = m(), { data: b, isPending: x } = E(p), { localization: S, viewPaths: C, slug: ee, slugPrefix: w } = h($), { data: T, isPending: te } = f(p), { data: ne, isPending: re } = le(p), { mutate: ie } = he(p), ae = x || !!b && (re || te), [oe, se] = q(!1), [ce, ue] = q(!1);
2213
- function de(e) {
2214
- o ? o(e) : ee === void 0 ? ie({ organizationId: e?.id ?? null }) : g({ to: e ? `${_.organization}/${w}${e.slug}/${C.organization.settings}` : `${_.settings}/${y.settings.account}` });
2217
+ function Tn({ className: e, hideCreate: t, hidePersonal: n, hideSettings: r, hideSlug: a = !0, setActive: o, placement: s, variant: c = "ghost", size: l = "md", trigger: u, ...d }) {
2218
+ let { authClient: f, navigate: m, basePaths: _, localization: v, viewPaths: y } = h(), { data: b, isPending: x } = D(f), { localization: S, viewPaths: C, slug: w, slugPrefix: ee } = g($), { data: te, isPending: T } = p(f), { data: ne, isPending: re } = le(f), { mutate: ie } = he(f), E = x || !!b && (re || T), [ae, oe] = J(!1), [se, ce] = J(!1);
2219
+ function ue(e) {
2220
+ o ? o(e) : w === void 0 ? ie({ organizationId: e?.id ?? null }) : m({ to: e ? `${_.organization}/${ee}${e.slug}/${C.organization.settings}` : `${_.settings}/${y.settings.account}` });
2215
2221
  }
2216
- return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(M, {
2217
- isOpen: ce,
2218
- onOpenChange: ue,
2219
- children: [u ? /* @__PURE__ */ Y(M.Trigger, { children: u }) : /* @__PURE__ */ X(k, {
2222
+ return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ Z(N, {
2223
+ isOpen: se,
2224
+ onOpenChange: ce,
2225
+ children: [u ? /* @__PURE__ */ X(N.Trigger, { children: u }) : /* @__PURE__ */ Z(A, {
2220
2226
  variant: c,
2221
- className: G("h-auto px-2 py-2 text-left", e),
2222
- isDisabled: !b || ae,
2227
+ className: K("h-auto px-2 py-2 text-left", e),
2228
+ isDisabled: !b || E,
2223
2229
  "aria-label": S.organization,
2224
2230
  ...d,
2225
- children: [ae ? /* @__PURE__ */ Y(Q, {
2231
+ children: [E ? /* @__PURE__ */ X(Q, {
2226
2232
  size: l,
2227
2233
  isPending: !0,
2228
2234
  hideRole: !0,
2229
2235
  hideSlug: a
2230
- }) : T ? /* @__PURE__ */ Y(Q, {
2236
+ }) : te ? /* @__PURE__ */ X(Q, {
2231
2237
  size: l,
2232
2238
  hideRole: !0,
2233
2239
  hideSlug: a
2234
- }) : b && !n ? /* @__PURE__ */ Y(r, {
2240
+ }) : b && !n ? /* @__PURE__ */ X(i, {
2235
2241
  size: l,
2236
2242
  hideSubtitle: a
2237
- }) : /* @__PURE__ */ Y(Q, {
2243
+ }) : /* @__PURE__ */ X(Q, {
2238
2244
  size: l,
2239
2245
  hideRole: !0,
2240
2246
  hideSlug: a,
2241
2247
  organization: { name: S.organization }
2242
- }), /* @__PURE__ */ Y(Oe, { className: "size-3 shrink-0 text-muted" })]
2243
- }), /* @__PURE__ */ X(M.Popover, {
2248
+ }), /* @__PURE__ */ X(Oe, { className: "size-3 shrink-0 text-muted" })]
2249
+ }), /* @__PURE__ */ Z(N.Popover, {
2244
2250
  placement: s,
2245
2251
  className: "max-w-svw",
2246
- children: [T ? /* @__PURE__ */ X("div", {
2252
+ children: [te ? /* @__PURE__ */ Z("div", {
2247
2253
  className: "flex items-center justify-between gap-4 px-4 pt-3",
2248
- children: [/* @__PURE__ */ Y(Q, {
2254
+ children: [/* @__PURE__ */ X(Q, {
2249
2255
  hideRole: !0,
2250
2256
  hideSlug: a,
2251
- organization: T
2252
- }), !i && /* @__PURE__ */ X(et, {
2253
- href: ee ? `${_.organization}/${w}${ee}/${C.organization.settings}` : `${_.organization}/${C.organization.settings}`,
2254
- className: G(ct({
2257
+ organization: te
2258
+ }), !r && /* @__PURE__ */ Z(et, {
2259
+ href: w ? `${_.organization}/${ee}${w}/${C.organization.settings}` : `${_.organization}/${C.organization.settings}`,
2260
+ className: K(ct({
2255
2261
  variant: "outline",
2256
2262
  size: "sm"
2257
2263
  }), "shrink-0 gap-2"),
2258
- onPress: () => ue(!1),
2259
- children: [/* @__PURE__ */ Y(Re, { className: "text-muted" }), S.manage]
2264
+ onPress: () => ce(!1),
2265
+ children: [/* @__PURE__ */ X(Re, { className: "text-muted" }), S.manage]
2260
2266
  })]
2261
- }) : !ae && b?.user && !n ? /* @__PURE__ */ X("div", {
2267
+ }) : !E && b?.user && !n ? /* @__PURE__ */ Z("div", {
2262
2268
  className: "flex items-center justify-between gap-4 px-4 pt-3",
2263
- children: [/* @__PURE__ */ Y(r, { hideSubtitle: a }), !i && /* @__PURE__ */ X(et, {
2269
+ children: [/* @__PURE__ */ X(i, { hideSubtitle: a }), !r && /* @__PURE__ */ Z(et, {
2264
2270
  href: `${_.settings}/${y.settings.account}`,
2265
- className: G(ct({
2271
+ className: K(ct({
2266
2272
  variant: "outline",
2267
2273
  size: "sm"
2268
2274
  }), "shrink-0 gap-2"),
2269
- onPress: () => ue(!1),
2270
- children: [/* @__PURE__ */ Y(Re, { className: "text-muted" }), v.settings.settings]
2275
+ onPress: () => ce(!1),
2276
+ children: [/* @__PURE__ */ X(Re, { className: "text-muted" }), v.settings.settings]
2271
2277
  })]
2272
- }) : null, /* @__PURE__ */ X(M.Menu, { children: [
2273
- !!T && !n && /* @__PURE__ */ Y(M.Item, {
2278
+ }) : null, /* @__PURE__ */ Z(N.Menu, { children: [
2279
+ !!te && !n && /* @__PURE__ */ X(N.Item, {
2274
2280
  textValue: S.personalAccount,
2275
- onPress: () => de(null),
2276
- children: /* @__PURE__ */ Y(r, { hideSubtitle: a })
2281
+ onPress: () => ue(null),
2282
+ children: /* @__PURE__ */ X(i, { hideSubtitle: a })
2277
2283
  }),
2278
- ne?.filter((e) => e.id !== T?.id)?.map((e) => /* @__PURE__ */ Y(M.Item, {
2284
+ ne?.filter((e) => e.id !== te?.id)?.map((e) => /* @__PURE__ */ X(N.Item, {
2279
2285
  textValue: e.name,
2280
- onPress: () => de(e),
2281
- children: /* @__PURE__ */ Y(Q, {
2286
+ onPress: () => ue(e),
2287
+ children: /* @__PURE__ */ X(Q, {
2282
2288
  hideRole: !0,
2283
2289
  hideSlug: a,
2284
2290
  organization: e
2285
2291
  })
2286
2292
  }, e.id)),
2287
- !t && /* @__PURE__ */ X(M.Item, {
2293
+ !t && /* @__PURE__ */ Z(N.Item, {
2288
2294
  textValue: S.createOrganization,
2289
- onPress: () => se(!0),
2290
- children: [/* @__PURE__ */ Y(ke, { className: "text-muted" }), /* @__PURE__ */ Y(L, { children: S.createOrganization })]
2295
+ onPress: () => oe(!0),
2296
+ children: [/* @__PURE__ */ X(ke, { className: "text-muted" }), /* @__PURE__ */ X(R, { children: S.createOrganization })]
2291
2297
  })
2292
2298
  ] })]
2293
2299
  })]
2294
- }), /* @__PURE__ */ Y(Wt, {
2295
- isOpen: oe,
2296
- onOpenChange: se
2300
+ }), /* @__PURE__ */ X(Kt, {
2301
+ isOpen: ae,
2302
+ onOpenChange: oe
2297
2303
  })] });
2298
2304
  }
2299
2305
  //#endregion
2300
2306
  //#region src/components/auth/passkey/passkey-button.tsx
2301
- function wn({ view: e }) {
2302
- let { authClient: t, localization: n, redirectTo: r, navigate: a } = m(), { localization: o } = h(Tn), { mutate: s, isPending: c } = ye(t, { onSuccess: () => a({ to: r }) }), l = Z({ mutationKey: i.signIn.all }) + Z({ mutationKey: i.signUp.all }) > 0;
2303
- return e === "signUp" ? null : /* @__PURE__ */ X(k, {
2307
+ function En({ view: e }) {
2308
+ let { authClient: t, localization: n, redirectTo: r, navigate: i } = h(), { localization: o } = g(Dn), { mutate: s, isPending: c } = ye(t, { onSuccess: () => i({ to: r }) }), l = lt({ mutationKey: a.signIn.all }) + lt({ mutationKey: a.signUp.all }) > 0;
2309
+ return e === "signUp" ? null : /* @__PURE__ */ Z(A, {
2304
2310
  className: "w-full",
2305
2311
  variant: "tertiary",
2306
2312
  isDisabled: l,
2307
2313
  isPending: c,
2308
2314
  onPress: () => s(),
2309
- children: [c ? /* @__PURE__ */ Y(V, {
2315
+ children: [c ? /* @__PURE__ */ X(H, {
2310
2316
  color: "current",
2311
2317
  size: "sm"
2312
- }) : /* @__PURE__ */ Y(Ie, {}), n.auth.continueWith.replace("{{provider}}", o.passkey)]
2318
+ }) : /* @__PURE__ */ X(Ie, {}), n.auth.continueWith.replace("{{provider}}", o.passkey)]
2313
2319
  });
2314
2320
  }
2315
2321
  //#endregion
2316
2322
  //#region src/lib/auth/passkey-plugin.ts
2317
- var Tn = o(ht.id, (e = {}) => ({
2318
- ...ht(e),
2319
- authButtons: [wn],
2320
- securityCards: [jn]
2323
+ var Dn = s(_t.id, (e = {}) => ({
2324
+ ..._t(e),
2325
+ authButtons: [En],
2326
+ securityCards: [Nn]
2321
2327
  }));
2322
2328
  //#endregion
2323
2329
  //#region src/components/auth/passkey/add-passkey-dialog.tsx
2324
- function En({ isOpen: e, onOpenChange: t }) {
2325
- let { authClient: n, localization: r } = m(), { localization: i } = h(Tn), { mutate: a, isPending: o } = p(n), s = (e) => {
2330
+ function On({ isOpen: e, onOpenChange: t }) {
2331
+ let { authClient: n, localization: r } = h(), { localization: i } = g(Dn), { mutate: a, isPending: o } = m(n), s = (e) => {
2326
2332
  t(e);
2327
2333
  };
2328
- return /* @__PURE__ */ Y(O.Backdrop, {
2334
+ return /* @__PURE__ */ X(k.Backdrop, {
2329
2335
  isOpen: e,
2330
2336
  onOpenChange: s,
2331
- children: /* @__PURE__ */ Y(O.Container, { children: /* @__PURE__ */ Y(O.Dialog, { children: /* @__PURE__ */ X(P, {
2337
+ children: /* @__PURE__ */ X(k.Container, { children: /* @__PURE__ */ X(k.Dialog, { children: /* @__PURE__ */ Z(F, {
2332
2338
  onSubmit: (e) => {
2333
2339
  e.preventDefault();
2334
2340
  let t = new FormData(e.target).get("name")?.trim();
2335
2341
  a(t ? { name: t } : void 0, { onSuccess: () => s(!1) });
2336
2342
  },
2337
2343
  children: [
2338
- /* @__PURE__ */ Y(O.CloseTrigger, {}),
2339
- /* @__PURE__ */ X(O.Header, { children: [/* @__PURE__ */ Y(O.Icon, {
2344
+ /* @__PURE__ */ X(k.CloseTrigger, {}),
2345
+ /* @__PURE__ */ Z(k.Header, { children: [/* @__PURE__ */ X(k.Icon, {
2340
2346
  status: "default",
2341
- children: /* @__PURE__ */ Y(Ie, {})
2342
- }), /* @__PURE__ */ Y(O.Heading, { children: i.addPasskey })] }),
2343
- /* @__PURE__ */ X(O.Body, {
2347
+ children: /* @__PURE__ */ X(Ie, {})
2348
+ }), /* @__PURE__ */ X(k.Heading, { children: i.addPasskey })] }),
2349
+ /* @__PURE__ */ Z(k.Body, {
2344
2350
  className: "overflow-visible",
2345
- children: [/* @__PURE__ */ Y("p", {
2351
+ children: [/* @__PURE__ */ X("p", {
2346
2352
  className: "text-muted text-sm",
2347
2353
  children: i.passkeysDescription
2348
- }), /* @__PURE__ */ X(W, {
2354
+ }), /* @__PURE__ */ Z(G, {
2349
2355
  className: "mt-4",
2350
2356
  id: "name",
2351
2357
  name: "name",
2352
2358
  isDisabled: o,
2353
2359
  children: [
2354
- /* @__PURE__ */ Y(L, { children: i.name }),
2355
- /* @__PURE__ */ Y(F, {
2360
+ /* @__PURE__ */ X(R, { children: i.name }),
2361
+ /* @__PURE__ */ X(I, {
2356
2362
  autoFocus: !0,
2357
2363
  placeholder: r.settings.optional,
2358
2364
  variant: "secondary"
2359
2365
  }),
2360
- /* @__PURE__ */ Y(N, {})
2366
+ /* @__PURE__ */ X(P, {})
2361
2367
  ]
2362
2368
  })]
2363
2369
  }),
2364
- /* @__PURE__ */ X(O.Footer, { children: [/* @__PURE__ */ Y(k, {
2370
+ /* @__PURE__ */ Z(k.Footer, { children: [/* @__PURE__ */ X(A, {
2365
2371
  slot: "close",
2366
2372
  variant: "tertiary",
2367
2373
  isDisabled: o,
2368
2374
  children: r.settings.cancel
2369
- }), /* @__PURE__ */ X(k, {
2375
+ }), /* @__PURE__ */ Z(A, {
2370
2376
  type: "submit",
2371
2377
  isPending: o,
2372
- children: [o && /* @__PURE__ */ Y(V, {
2378
+ children: [o && /* @__PURE__ */ X(H, {
2373
2379
  color: "current",
2374
2380
  size: "sm"
2375
2381
  }), i.addPasskey]
@@ -2380,38 +2386,38 @@ function En({ isOpen: e, onOpenChange: t }) {
2380
2386
  }
2381
2387
  //#endregion
2382
2388
  //#region src/components/auth/passkey/delete-passkey-dialog.tsx
2383
- function Dn({ isOpen: e, onOpenChange: t, passkey: n }) {
2384
- let { authClient: r, localization: i } = m(), { localization: a } = h(Tn), o = n.name || a.passkey, { mutate: s, isPending: c } = C(r, { onSuccess: () => t(!1) });
2385
- return /* @__PURE__ */ Y(O.Backdrop, {
2389
+ function kn({ isOpen: e, onOpenChange: t, passkey: n }) {
2390
+ let { authClient: r, localization: i } = h(), { localization: a } = g(Dn), o = n.name || a.passkey, { mutate: s, isPending: c } = w(r, { onSuccess: () => t(!1) });
2391
+ return /* @__PURE__ */ X(k.Backdrop, {
2386
2392
  isOpen: e,
2387
2393
  onOpenChange: t,
2388
- children: /* @__PURE__ */ Y(O.Container, { children: /* @__PURE__ */ X(O.Dialog, { children: [
2389
- /* @__PURE__ */ Y(O.CloseTrigger, {}),
2390
- /* @__PURE__ */ X(O.Header, { children: [/* @__PURE__ */ Y(O.Icon, {
2394
+ children: /* @__PURE__ */ X(k.Container, { children: /* @__PURE__ */ Z(k.Dialog, { children: [
2395
+ /* @__PURE__ */ X(k.CloseTrigger, {}),
2396
+ /* @__PURE__ */ Z(k.Header, { children: [/* @__PURE__ */ X(k.Icon, {
2391
2397
  status: "danger",
2392
- children: /* @__PURE__ */ Y(Ie, {})
2393
- }), /* @__PURE__ */ Y(O.Heading, { children: a.deletePasskeyTitle })] }),
2394
- /* @__PURE__ */ X(O.Body, {
2398
+ children: /* @__PURE__ */ X(Ie, {})
2399
+ }), /* @__PURE__ */ X(k.Heading, { children: a.deletePasskeyTitle })] }),
2400
+ /* @__PURE__ */ Z(k.Body, {
2395
2401
  className: "flex flex-col gap-4 overflow-visible",
2396
- children: [/* @__PURE__ */ Y("p", {
2402
+ children: [/* @__PURE__ */ X("p", {
2397
2403
  className: "text-muted text-sm",
2398
2404
  children: a.deletePasskeyWarning
2399
- }), /* @__PURE__ */ X(W, {
2405
+ }), /* @__PURE__ */ Z(G, {
2400
2406
  value: o,
2401
2407
  variant: "secondary",
2402
- children: [/* @__PURE__ */ Y(L, { children: n.name || a.passkey }), /* @__PURE__ */ Y(F, { readOnly: !0 })]
2408
+ children: [/* @__PURE__ */ X(R, { children: n.name || a.passkey }), /* @__PURE__ */ X(I, { readOnly: !0 })]
2403
2409
  })]
2404
2410
  }),
2405
- /* @__PURE__ */ X(O.Footer, { children: [/* @__PURE__ */ Y(k, {
2411
+ /* @__PURE__ */ Z(k.Footer, { children: [/* @__PURE__ */ X(A, {
2406
2412
  slot: "close",
2407
2413
  variant: "tertiary",
2408
2414
  isDisabled: c,
2409
2415
  children: i.settings.cancel
2410
- }), /* @__PURE__ */ X(k, {
2416
+ }), /* @__PURE__ */ Z(A, {
2411
2417
  variant: "danger",
2412
2418
  onPress: () => s({ id: n.id }),
2413
2419
  isPending: c,
2414
- children: [c && /* @__PURE__ */ Y(V, {
2420
+ children: [c && /* @__PURE__ */ X(H, {
2415
2421
  color: "current",
2416
2422
  size: "sm"
2417
2423
  }), a.deletePasskeyTitle]
@@ -2421,21 +2427,21 @@ function Dn({ isOpen: e, onOpenChange: t, passkey: n }) {
2421
2427
  }
2422
2428
  //#endregion
2423
2429
  //#region src/components/auth/passkey/passkey.tsx
2424
- function On({ passkey: e }) {
2425
- let { localization: t } = m(), { localization: n } = h(Tn), [r, i] = q(!1), a = e.name || n.passkey;
2426
- return /* @__PURE__ */ X("div", {
2430
+ function An({ passkey: e }) {
2431
+ let { localization: t } = h(), { localization: n } = g(Dn), [r, i] = J(!1), a = e.name || n.passkey;
2432
+ return /* @__PURE__ */ Z("div", {
2427
2433
  className: "flex items-center gap-3",
2428
2434
  children: [
2429
- /* @__PURE__ */ Y("div", {
2435
+ /* @__PURE__ */ X("div", {
2430
2436
  className: "flex size-10 shrink-0 items-center justify-center rounded-xl bg-surface-secondary",
2431
- children: /* @__PURE__ */ Y(Ie, { className: "size-4.5" })
2437
+ children: /* @__PURE__ */ X(Ie, { className: "size-4.5" })
2432
2438
  }),
2433
- /* @__PURE__ */ X("div", {
2439
+ /* @__PURE__ */ Z("div", {
2434
2440
  className: "flex min-w-0 flex-col",
2435
- children: [/* @__PURE__ */ Y("span", {
2441
+ children: [/* @__PURE__ */ X("span", {
2436
2442
  className: "truncate text-sm font-medium leading-tight",
2437
2443
  children: a
2438
- }), /* @__PURE__ */ Y("span", {
2444
+ }), /* @__PURE__ */ X("span", {
2439
2445
  className: "text-xs text-muted",
2440
2446
  children: new Date(e.createdAt).toLocaleString(void 0, {
2441
2447
  dateStyle: "medium",
@@ -2443,15 +2449,15 @@ function On({ passkey: e }) {
2443
2449
  })
2444
2450
  })]
2445
2451
  }),
2446
- /* @__PURE__ */ X(k, {
2452
+ /* @__PURE__ */ Z(A, {
2447
2453
  className: "ml-auto shrink-0",
2448
2454
  variant: "outline",
2449
2455
  size: "sm",
2450
2456
  onPress: () => i(!0),
2451
2457
  "aria-label": n.deletePasskey.replace("{{name}}", a),
2452
- children: [/* @__PURE__ */ Y(D, {}), t.settings.delete]
2458
+ children: [/* @__PURE__ */ X(O, {}), t.settings.delete]
2453
2459
  }),
2454
- /* @__PURE__ */ Y(Dn, {
2460
+ /* @__PURE__ */ X(kn, {
2455
2461
  isOpen: r,
2456
2462
  onOpenChange: i,
2457
2463
  passkey: e
@@ -2461,40 +2467,40 @@ function On({ passkey: e }) {
2461
2467
  }
2462
2468
  //#endregion
2463
2469
  //#region src/components/auth/passkey/passkey-skeleton.tsx
2464
- function kn() {
2465
- return /* @__PURE__ */ Y("div", {
2470
+ function jn() {
2471
+ return /* @__PURE__ */ X("div", {
2466
2472
  className: "flex items-center justify-between",
2467
- children: /* @__PURE__ */ X("div", {
2473
+ children: /* @__PURE__ */ Z("div", {
2468
2474
  className: "flex items-center gap-3",
2469
- children: [/* @__PURE__ */ Y(B, { className: "size-10 rounded-xl" }), /* @__PURE__ */ X("div", {
2475
+ children: [/* @__PURE__ */ X(V, { className: "size-10 rounded-xl" }), /* @__PURE__ */ Z("div", {
2470
2476
  className: "flex flex-col gap-1",
2471
- children: [/* @__PURE__ */ Y(B, { className: "h-4 w-28 rounded-lg" }), /* @__PURE__ */ Y(B, { className: "h-3 w-32 rounded-lg" })]
2477
+ children: [/* @__PURE__ */ X(V, { className: "h-4 w-28 rounded-lg" }), /* @__PURE__ */ X(V, { className: "h-3 w-32 rounded-lg" })]
2472
2478
  })]
2473
2479
  })
2474
2480
  });
2475
2481
  }
2476
2482
  //#endregion
2477
2483
  //#region src/components/auth/passkey/passkeys-empty.tsx
2478
- function An({ onAddPress: e }) {
2479
- let { localization: t } = h(Tn);
2480
- return /* @__PURE__ */ X("div", {
2484
+ function Mn({ onAddPress: e }) {
2485
+ let { localization: t } = g(Dn);
2486
+ return /* @__PURE__ */ Z("div", {
2481
2487
  className: "flex flex-col items-center justify-center gap-4",
2482
2488
  children: [
2483
- /* @__PURE__ */ Y("div", {
2489
+ /* @__PURE__ */ X("div", {
2484
2490
  className: "flex size-10 items-center justify-center rounded-xl bg-surface-secondary",
2485
- children: /* @__PURE__ */ Y(Ie, { className: "size-4.5" })
2491
+ children: /* @__PURE__ */ X(Ie, { className: "size-4.5" })
2486
2492
  }),
2487
- /* @__PURE__ */ X("div", {
2493
+ /* @__PURE__ */ Z("div", {
2488
2494
  className: "flex flex-col items-center justify-center gap-1 text-center",
2489
- children: [/* @__PURE__ */ Y("p", {
2495
+ children: [/* @__PURE__ */ X("p", {
2490
2496
  className: "text-sm font-semibold",
2491
2497
  children: t.noPasskeys
2492
- }), /* @__PURE__ */ Y("p", {
2498
+ }), /* @__PURE__ */ X("p", {
2493
2499
  className: "text-muted text-xs",
2494
2500
  children: t.passkeysDescription
2495
2501
  })]
2496
2502
  }),
2497
- /* @__PURE__ */ Y(k, {
2503
+ /* @__PURE__ */ X(A, {
2498
2504
  size: "sm",
2499
2505
  onPress: e,
2500
2506
  children: t.addPasskey
@@ -2504,17 +2510,17 @@ function An({ onAddPress: e }) {
2504
2510
  }
2505
2511
  //#endregion
2506
2512
  //#region src/components/auth/passkey/passkeys.tsx
2507
- function jn({ className: e, variant: t, ...n }) {
2508
- let { authClient: r } = m(), { localization: i } = h(Tn), { data: a, isPending: o } = ue(r), [s, c] = q(!1);
2509
- return /* @__PURE__ */ X("div", {
2510
- className: G("flex flex-col gap-3", e),
2513
+ function Nn({ className: e, variant: t, ...n }) {
2514
+ let { authClient: r } = h(), { localization: i } = g(Dn), { data: a, isPending: o } = ue(r), [s, c] = J(!1);
2515
+ return /* @__PURE__ */ Z("div", {
2516
+ className: K("flex flex-col gap-3", e),
2511
2517
  children: [
2512
- /* @__PURE__ */ X("div", {
2518
+ /* @__PURE__ */ Z("div", {
2513
2519
  className: "flex items-end justify-between gap-3",
2514
- children: [/* @__PURE__ */ Y("h2", {
2520
+ children: [/* @__PURE__ */ X("h2", {
2515
2521
  className: "text-sm font-semibold truncate",
2516
2522
  children: i.passkeys
2517
- }), /* @__PURE__ */ Y(k, {
2523
+ }), /* @__PURE__ */ X(A, {
2518
2524
  className: "shrink-0",
2519
2525
  size: "sm",
2520
2526
  isDisabled: o,
@@ -2522,12 +2528,12 @@ function jn({ className: e, variant: t, ...n }) {
2522
2528
  children: i.addPasskey
2523
2529
  })]
2524
2530
  }),
2525
- /* @__PURE__ */ Y(A, {
2531
+ /* @__PURE__ */ X(j, {
2526
2532
  variant: t,
2527
2533
  ...n,
2528
- children: /* @__PURE__ */ Y(A.Content, { children: o ? /* @__PURE__ */ Y(kn, {}) : a?.length ? a.map((e, t) => /* @__PURE__ */ X("div", { children: [t > 0 && /* @__PURE__ */ Y("div", { className: "border-b border-dashed -mx-4 my-4" }), /* @__PURE__ */ Y(On, { passkey: e })] }, e.id)) : /* @__PURE__ */ Y(An, { onAddPress: () => c(!0) }) })
2534
+ children: /* @__PURE__ */ X(j.Content, { children: o ? /* @__PURE__ */ X(jn, {}) : a?.length ? a.map((e, t) => /* @__PURE__ */ Z("div", { children: [t > 0 && /* @__PURE__ */ X("div", { className: "border-b border-dashed -mx-4 my-4" }), /* @__PURE__ */ X(An, { passkey: e })] }, e.id)) : /* @__PURE__ */ X(Mn, { onAddPress: () => c(!0) }) })
2529
2535
  }),
2530
- /* @__PURE__ */ Y(En, {
2536
+ /* @__PURE__ */ X(On, {
2531
2537
  isOpen: s,
2532
2538
  onOpenChange: c
2533
2539
  })
@@ -2536,23 +2542,23 @@ function jn({ className: e, variant: t, ...n }) {
2536
2542
  }
2537
2543
  //#endregion
2538
2544
  //#region src/components/auth/theme/theme-toggle-item.tsx
2539
- var Mn = "[role=\"tab\"][aria-selected=\"true\"]";
2540
- function Nn() {
2541
- let { useTheme: e, localization: t } = h(Pn), { theme: n, setTheme: r, themes: i = [] } = e();
2542
- return /* @__PURE__ */ X(M.Item, {
2545
+ var Pn = "[role=\"tab\"][aria-selected=\"true\"]";
2546
+ function Fn() {
2547
+ let { useTheme: e, localization: t } = g(In), { theme: n, setTheme: r, themes: i = [] } = e();
2548
+ return /* @__PURE__ */ Z(N.Item, {
2543
2549
  className: "py-1 pe-2",
2544
2550
  onFocus: (e) => {
2545
- e.target === e.currentTarget && e.currentTarget.querySelector(Mn)?.focus({ preventScroll: !0 });
2551
+ e.target === e.currentTarget && e.currentTarget.querySelector(Pn)?.focus({ preventScroll: !0 });
2546
2552
  },
2547
2553
  shouldCloseOnSelect: !1,
2548
2554
  children: [
2549
- /* @__PURE__ */ Y(He, { className: "text-muted" }),
2550
- /* @__PURE__ */ Y(L, { children: t.theme }),
2551
- /* @__PURE__ */ Y(U, {
2555
+ /* @__PURE__ */ X(He, { className: "text-muted" }),
2556
+ /* @__PURE__ */ X(R, { children: t.theme }),
2557
+ /* @__PURE__ */ X(W, {
2552
2558
  className: "ml-auto",
2553
2559
  selectedKey: n,
2554
2560
  onSelectionChange: (e) => r(e),
2555
- children: /* @__PURE__ */ Y(U.ListContainer, {
2561
+ children: /* @__PURE__ */ X(W.ListContainer, {
2556
2562
  onKeyDown: (e) => {
2557
2563
  if (e.key !== "ArrowUp" && e.key !== "ArrowDown") return;
2558
2564
  let t = e.target;
@@ -2564,24 +2570,24 @@ function Nn() {
2564
2570
  let o = i[e.key === "ArrowDown" ? a + 1 : a - 1];
2565
2571
  o && (e.preventDefault(), o.focus());
2566
2572
  },
2567
- children: /* @__PURE__ */ X(U.List, {
2573
+ children: /* @__PURE__ */ Z(W.List, {
2568
2574
  "aria-label": t.theme,
2569
2575
  className: "*:h-5 *:w-5 *:p-0",
2570
2576
  children: [
2571
- i.includes("system") && /* @__PURE__ */ X(U.Tab, {
2577
+ i.includes("system") && /* @__PURE__ */ Z(W.Tab, {
2572
2578
  id: "system",
2573
2579
  "aria-label": t.system,
2574
- children: [/* @__PURE__ */ Y(Ne, { className: "size-3" }), /* @__PURE__ */ Y(U.Indicator, {})]
2580
+ children: [/* @__PURE__ */ X(Ne, { className: "size-3" }), /* @__PURE__ */ X(W.Indicator, {})]
2575
2581
  }),
2576
- i.includes("light") && /* @__PURE__ */ X(U.Tab, {
2582
+ i.includes("light") && /* @__PURE__ */ Z(W.Tab, {
2577
2583
  id: "light",
2578
2584
  "aria-label": t.light,
2579
- children: [/* @__PURE__ */ Y(qe, { className: "size-3" }), /* @__PURE__ */ Y(U.Indicator, {})]
2585
+ children: [/* @__PURE__ */ X(qe, { className: "size-3" }), /* @__PURE__ */ X(W.Indicator, {})]
2580
2586
  }),
2581
- i.includes("dark") && /* @__PURE__ */ X(U.Tab, {
2587
+ i.includes("dark") && /* @__PURE__ */ Z(W.Tab, {
2582
2588
  id: "dark",
2583
2589
  "aria-label": t.dark,
2584
- children: [/* @__PURE__ */ Y(Ve, { className: "size-3" }), /* @__PURE__ */ Y(U.Indicator, {})]
2590
+ children: [/* @__PURE__ */ X(Ve, { className: "size-3" }), /* @__PURE__ */ X(W.Indicator, {})]
2585
2591
  })
2586
2592
  ]
2587
2593
  })
@@ -2592,8 +2598,8 @@ function Nn() {
2592
2598
  }
2593
2599
  //#endregion
2594
2600
  //#region src/lib/auth/theme-plugin.ts
2595
- var Pn = o(gt.id, ({ useTheme: e, ...t }) => {
2596
- let n = gt({
2601
+ var In = s(vt.id, ({ useTheme: e, ...t }) => {
2602
+ let n = vt({
2597
2603
  setTheme: () => {},
2598
2604
  ...t
2599
2605
  });
@@ -2604,69 +2610,69 @@ var Pn = o(gt.id, ({ useTheme: e, ...t }) => {
2604
2610
  setTheme: n.setTheme,
2605
2611
  themes: n.themes
2606
2612
  })),
2607
- userMenuItems: [Nn],
2608
- accountCards: [Fn]
2613
+ userMenuItems: [Fn],
2614
+ accountCards: [Ln]
2609
2615
  };
2610
2616
  });
2611
2617
  //#endregion
2612
2618
  //#region src/components/auth/theme/appearance.tsx
2613
- function Fn({ className: e, variant: t, ...n }) {
2614
- let { useTheme: r, localization: i } = h(Pn), { theme: a, setTheme: o, themes: s = [] } = r(), d = it();
2615
- return /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("h2", {
2616
- className: G("text-sm font-semibold mb-3"),
2619
+ function Ln({ className: e, variant: t, ...n }) {
2620
+ let { useTheme: r, localization: i } = g(In), { theme: a, setTheme: o, themes: s = [] } = r(), c = it();
2621
+ return /* @__PURE__ */ Z("div", { children: [/* @__PURE__ */ X("h2", {
2622
+ className: K("text-sm font-semibold mb-3"),
2617
2623
  children: i.appearance
2618
- }), /* @__PURE__ */ Y(A, {
2619
- className: G("p-4 gap-4", e),
2624
+ }), /* @__PURE__ */ X(j, {
2625
+ className: K("p-4 gap-4", e),
2620
2626
  variant: t,
2621
2627
  ...n,
2622
- children: /* @__PURE__ */ X(A.Content, { children: [/* @__PURE__ */ Y(L, { children: i.theme }), /* @__PURE__ */ Y(nt, {
2628
+ children: /* @__PURE__ */ Z(j.Content, { children: [/* @__PURE__ */ X(R, { children: i.theme }), /* @__PURE__ */ X(nt, {
2623
2629
  variant: t === "transparent" ? "secondary" : "primary",
2624
- value: d ? a : "",
2630
+ value: c ? a : "",
2625
2631
  onChange: o,
2626
- isDisabled: !d || !a,
2627
- children: /* @__PURE__ */ X("div", {
2632
+ isDisabled: !c || !a,
2633
+ children: /* @__PURE__ */ Z("div", {
2628
2634
  className: "grid gap-3 grid-cols-2 sm:grid-cols-3",
2629
2635
  children: [
2630
- s.includes("system") && /* @__PURE__ */ Y(R, {
2636
+ s.includes("system") && /* @__PURE__ */ X(z, {
2631
2637
  value: "system",
2632
- className: G("mt-0 px-4 pb-4 pt-3 rounded-xl", "border border-transparent data-[selected=true]:border-accent data-[selected=true]:bg-accent/10", "data-[focus-visible=true]:border-accent data-[focus-visible=true]:bg-accent/10", t === "transparent" ? "bg-surface" : "bg-surface-secondary"),
2633
- children: /* @__PURE__ */ X(R.Content, {
2638
+ className: K("mt-0 px-4 pb-4 pt-3 rounded-xl", "border border-transparent data-[selected=true]:border-accent data-[selected=true]:bg-accent/10", "data-[focus-visible=true]:border-accent data-[focus-visible=true]:bg-accent/10", t === "transparent" ? "bg-surface" : "bg-surface-secondary"),
2639
+ children: /* @__PURE__ */ Z(z.Content, {
2634
2640
  className: "gap-2",
2635
- children: [/* @__PURE__ */ X("div", {
2641
+ children: [/* @__PURE__ */ Z("div", {
2636
2642
  className: "flex gap-2 justify-between",
2637
- children: [/* @__PURE__ */ X("span", {
2643
+ children: [/* @__PURE__ */ Z("span", {
2638
2644
  className: "flex gap-2 items-center",
2639
- children: [/* @__PURE__ */ Y(Ne, { className: "text-muted" }), i.system]
2640
- }), /* @__PURE__ */ Y(R.Control, { children: /* @__PURE__ */ Y(R.Indicator, {}) })]
2641
- }), /* @__PURE__ */ Y(u, { className: "w-full" })]
2645
+ children: [/* @__PURE__ */ X(Ne, { className: "text-muted" }), i.system]
2646
+ }), /* @__PURE__ */ X(z.Control, { children: /* @__PURE__ */ X(z.Indicator, {}) })]
2647
+ }), /* @__PURE__ */ X(d, { className: "w-full" })]
2642
2648
  })
2643
2649
  }),
2644
- s.includes("light") && /* @__PURE__ */ Y(R, {
2650
+ s.includes("light") && /* @__PURE__ */ X(z, {
2645
2651
  value: "light",
2646
- className: G("mt-0 px-4 pb-4 pt-3 rounded-xl", "border border-transparent data-[selected=true]:border-accent data-[selected=true]:bg-accent/10", "data-[focus-visible=true]:border-accent data-[focus-visible=true]:bg-accent/10", t === "transparent" ? "bg-surface" : "bg-surface-secondary"),
2647
- children: /* @__PURE__ */ X(R.Content, {
2652
+ className: K("mt-0 px-4 pb-4 pt-3 rounded-xl", "border border-transparent data-[selected=true]:border-accent data-[selected=true]:bg-accent/10", "data-[focus-visible=true]:border-accent data-[focus-visible=true]:bg-accent/10", t === "transparent" ? "bg-surface" : "bg-surface-secondary"),
2653
+ children: /* @__PURE__ */ Z(z.Content, {
2648
2654
  className: "gap-2",
2649
- children: [/* @__PURE__ */ X("div", {
2655
+ children: [/* @__PURE__ */ Z("div", {
2650
2656
  className: "flex gap-2 justify-between",
2651
- children: [/* @__PURE__ */ X("span", {
2657
+ children: [/* @__PURE__ */ Z("span", {
2652
2658
  className: "flex gap-2 items-center",
2653
- children: [/* @__PURE__ */ Y(qe, { className: "text-muted" }), i.light]
2654
- }), /* @__PURE__ */ Y(R.Control, { children: /* @__PURE__ */ Y(R.Indicator, {}) })]
2655
- }), /* @__PURE__ */ Y(l, { className: "w-full" })]
2659
+ children: [/* @__PURE__ */ X(qe, { className: "text-muted" }), i.light]
2660
+ }), /* @__PURE__ */ X(z.Control, { children: /* @__PURE__ */ X(z.Indicator, {}) })]
2661
+ }), /* @__PURE__ */ X(u, { className: "w-full" })]
2656
2662
  })
2657
2663
  }),
2658
- s.includes("dark") && /* @__PURE__ */ Y(R, {
2664
+ s.includes("dark") && /* @__PURE__ */ X(z, {
2659
2665
  value: "dark",
2660
- className: G("mt-0 px-4 pb-4 pt-3 rounded-xl", "border border-transparent data-[selected=true]:border-accent data-[selected=true]:bg-accent/10", "data-[focus-visible=true]:border-accent data-[focus-visible=true]:bg-accent/10", t === "transparent" ? "bg-surface" : "bg-surface-secondary"),
2661
- children: /* @__PURE__ */ X(R.Content, {
2666
+ className: K("mt-0 px-4 pb-4 pt-3 rounded-xl", "border border-transparent data-[selected=true]:border-accent data-[selected=true]:bg-accent/10", "data-[focus-visible=true]:border-accent data-[focus-visible=true]:bg-accent/10", t === "transparent" ? "bg-surface" : "bg-surface-secondary"),
2667
+ children: /* @__PURE__ */ Z(z.Content, {
2662
2668
  className: "gap-2",
2663
- children: [/* @__PURE__ */ X("div", {
2669
+ children: [/* @__PURE__ */ Z("div", {
2664
2670
  className: "flex gap-2 justify-between",
2665
- children: [/* @__PURE__ */ X("span", {
2671
+ children: [/* @__PURE__ */ Z("span", {
2666
2672
  className: "flex gap-2 items-center",
2667
- children: [/* @__PURE__ */ Y(Ve, { className: "text-muted" }), i.dark]
2668
- }), /* @__PURE__ */ Y(R.Control, { children: /* @__PURE__ */ Y(R.Indicator, {}) })]
2669
- }), /* @__PURE__ */ Y(c, { className: "w-full" })]
2673
+ children: [/* @__PURE__ */ X(Ve, { className: "text-muted" }), i.dark]
2674
+ }), /* @__PURE__ */ X(z.Control, { children: /* @__PURE__ */ X(z.Indicator, {}) })]
2675
+ }), /* @__PURE__ */ X(l, { className: "w-full" })]
2670
2676
  })
2671
2677
  })
2672
2678
  ]
@@ -2676,8 +2682,8 @@ function Fn({ className: e, variant: t, ...n }) {
2676
2682
  }
2677
2683
  //#endregion
2678
2684
  //#region src/components/auth/username/username-field.tsx
2679
- function In({ name: e, field: t, isPending: n, variant: r }) {
2680
- let { authClient: i } = m(), { localization: a, minUsernameLength: o, maxUsernameLength: s, isUsernameAvailable: c, usernamePrefix: l } = h(Ln), u = String(t.defaultValue ?? ""), [d, f] = q(u), { mutate: p, data: g, error: _, reset: v } = ne(i, { onError: () => {} }), y = vt((e) => {
2685
+ function Rn({ name: e, field: t, isPending: n, variant: r }) {
2686
+ let { authClient: i } = h(), { localization: a, minUsernameLength: o, maxUsernameLength: s, isUsernameAvailable: c, usernamePrefix: l } = g(zn), u = String(t.defaultValue ?? ""), [d, f] = J(u), { mutate: p, data: m, error: _, reset: v } = re(i, { onError: () => {} }), y = bt((e) => {
2681
2687
  let t = e.trim();
2682
2688
  if (!t || t === u) {
2683
2689
  v();
@@ -2688,8 +2694,8 @@ function In({ name: e, field: t, isPending: n, variant: r }) {
2688
2694
  function b(e) {
2689
2695
  f(e), v(), c && y.maybeExecute(e);
2690
2696
  }
2691
- let x = !!c && !!d.trim() && d.trim() !== u, { localization: S } = m();
2692
- return /* @__PURE__ */ X(W, {
2697
+ let x = !!c && !!d.trim() && d.trim() !== u, { localization: S } = h();
2698
+ return /* @__PURE__ */ Z(G, {
2693
2699
  name: e,
2694
2700
  type: "text",
2695
2701
  autoComplete: "username",
@@ -2705,182 +2711,195 @@ function In({ name: e, field: t, isPending: n, variant: r }) {
2705
2711
  if (s && e.length > s) return S.auth.tooLong.replace("{{max}}", String(s));
2706
2712
  },
2707
2713
  children: [
2708
- /* @__PURE__ */ Y(L, { children: t.label }),
2709
- /* @__PURE__ */ X(I, {
2714
+ /* @__PURE__ */ X(R, { children: t.label }),
2715
+ /* @__PURE__ */ Z(L, {
2710
2716
  variant: r === "transparent" ? "primary" : "secondary",
2711
2717
  children: [
2712
- l && /* @__PURE__ */ Y(I.Prefix, {
2718
+ l && /* @__PURE__ */ X(L.Prefix, {
2713
2719
  className: "pr-1.5 text-muted",
2714
2720
  children: l
2715
2721
  }),
2716
- /* @__PURE__ */ Y(I.Input, {
2722
+ /* @__PURE__ */ X(L.Input, {
2717
2723
  placeholder: t.placeholder,
2718
2724
  required: t.required
2719
2725
  }),
2720
- x && /* @__PURE__ */ Y(I.Suffix, {
2721
- "aria-label": g?.available ? a.usernameAvailable : g?.available === !1 ? a.usernameTaken : void 0,
2726
+ x && /* @__PURE__ */ X(L.Suffix, {
2727
+ "aria-label": m?.available ? a.usernameAvailable : m?.available === !1 ? a.usernameTaken : void 0,
2722
2728
  className: "px-2",
2723
- children: g?.available ? /* @__PURE__ */ Y(De, { className: "text-success" }) : _ || g?.available === !1 ? /* @__PURE__ */ Y(D, { className: "text-danger" }) : /* @__PURE__ */ Y(V, {
2729
+ children: m?.available ? /* @__PURE__ */ X(De, { className: "text-success" }) : _ || m?.available === !1 ? /* @__PURE__ */ X(O, { className: "text-danger" }) : /* @__PURE__ */ X(H, {
2724
2730
  size: "sm",
2725
2731
  color: "current"
2726
2732
  })
2727
2733
  })
2728
2734
  ]
2729
2735
  }),
2730
- /* @__PURE__ */ Y(N, {})
2736
+ /* @__PURE__ */ X(P, {})
2731
2737
  ]
2732
2738
  });
2733
2739
  }
2734
2740
  //#endregion
2735
2741
  //#region src/lib/auth/username-plugin.tsx
2736
- var Ln = o(_t.id, (e = {}) => {
2737
- let t = _t(e);
2742
+ var zn = s(yt.id, (e = {}) => {
2743
+ let t = yt(e);
2738
2744
  return {
2739
2745
  ...t,
2740
2746
  additionalFields: t.additionalFields?.map((e) => e.name === "username" ? {
2741
2747
  ...e,
2742
- render: In
2748
+ render: Rn
2743
2749
  } : e),
2744
- views: { auth: { signIn: Rn } }
2750
+ views: { auth: { signIn: Bn } }
2745
2751
  };
2746
2752
  });
2747
2753
  //#endregion
2748
2754
  //#region src/components/auth/username/sign-in-username.tsx
2749
- function Rn({ className: t, socialLayout: r, socialPosition: a = "bottom", variant: o }) {
2750
- let { authClient: s, basePaths: c, emailAndPassword: l, localization: u, plugins: d, redirectTo: f, socialProviders: p, viewPaths: g, navigate: _ } = m(), { fetchOptions: v, resetFetchOptions: y } = w(), { localization: b } = h(Ln), [x, S] = q("");
2751
- function C(e) {
2755
+ function Bn({ className: r, socialLayout: i, socialPosition: o = "bottom", variant: s }) {
2756
+ let { authClient: c, basePaths: l, emailAndPassword: u, localization: d, plugins: f, redirectTo: p, socialProviders: m, viewPaths: _, navigate: v } = h(), { fetchOptions: y, resetFetchOptions: b } = te(), { localization: x } = g(zn), [S, C] = J("");
2757
+ function w(e) {
2752
2758
  return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);
2753
2759
  }
2754
- let { mutate: ee, isPending: T } = _e(s, {
2760
+ let { mutate: ee, isPending: T } = _e(c, {
2755
2761
  onError: (e, { email: t }) => {
2756
- S(""), e.error?.code === "EMAIL_NOT_VERIFIED" && (sessionStorage.setItem("better-auth-ui.verify-email", t), _({ to: `${c.auth}/${g.auth.verifyEmail}` })), y();
2762
+ C(""), e.error?.code === "EMAIL_NOT_VERIFIED" && (sessionStorage.setItem("better-auth-ui.verify-email", t), v({ to: `${l.auth}/${_.auth.verifyEmail}` })), b();
2757
2763
  },
2758
2764
  onSuccess: () => {
2759
- sessionStorage.removeItem("better-auth-ui.verify-email"), _({ to: f });
2765
+ sessionStorage.removeItem("better-auth-ui.verify-email"), v({ to: p });
2760
2766
  }
2761
- }), { mutate: te, isPending: ne } = be(s, {
2767
+ }), { mutate: ne, isPending: re } = be(c, {
2762
2768
  onError: (e) => {
2763
- S(""), e.error?.code === "EMAIL_NOT_VERIFIED" && (sessionStorage.removeItem("better-auth-ui.verify-email"), _({ to: `${c.auth}/${g.auth.verifyEmail}` })), y();
2769
+ C(""), e.error?.code === "EMAIL_NOT_VERIFIED" && (sessionStorage.removeItem("better-auth-ui.verify-email"), v({ to: `${l.auth}/${_.auth.verifyEmail}` })), b();
2764
2770
  },
2765
2771
  onSuccess: () => {
2766
- sessionStorage.removeItem("better-auth-ui.verify-email"), _({ to: f });
2772
+ sessionStorage.removeItem("better-auth-ui.verify-email"), v({ to: p });
2767
2773
  }
2768
- }), re = (e) => {
2774
+ }), ie = (e) => {
2769
2775
  e.preventDefault();
2770
2776
  let t = new FormData(e.currentTarget), n = t.get("email"), r = t.get("rememberMe") === "on";
2771
- C(n) ? ee({
2777
+ w(n) ? ee({
2772
2778
  email: n,
2773
- password: x,
2774
- ...l?.rememberMe ? { rememberMe: r } : {},
2775
- fetchOptions: v
2776
- }) : te({
2779
+ password: S,
2780
+ ...u?.rememberMe ? { rememberMe: r } : {},
2781
+ fetchOptions: y
2782
+ }) : ne({
2777
2783
  username: n,
2778
- password: x,
2779
- ...l?.rememberMe ? { rememberMe: r } : {},
2780
- fetchOptions: v
2784
+ password: S,
2785
+ ...u?.rememberMe ? { rememberMe: r } : {},
2786
+ fetchOptions: y
2781
2787
  });
2782
- }, ie = Z({ mutationKey: i.signIn.all }) + Z({ mutationKey: i.signUp.all }) > 0, ae = T || ne, oe = d.find((e) => e.captchaComponent)?.captchaComponent, se = l?.enabled && !!p?.length;
2783
- return /* @__PURE__ */ X(A, {
2784
- className: G("w-full max-w-sm gap-4 md:p-6", t),
2785
- variant: o,
2788
+ }, E = lt({ mutationKey: a.signIn.all }) + lt({ mutationKey: a.signUp.all }) > 0, ae = T || re, oe = f.find((e) => e.captchaComponent)?.captchaComponent, se = u?.enabled && !!m?.length;
2789
+ return /* @__PURE__ */ Z(j, {
2790
+ className: K("w-full max-w-sm gap-4 md:p-6", r),
2791
+ variant: s,
2786
2792
  children: [
2787
- /* @__PURE__ */ Y(A.Header, { children: /* @__PURE__ */ Y(A.Title, {
2793
+ /* @__PURE__ */ X(j.Header, { children: /* @__PURE__ */ X(j.Title, {
2788
2794
  className: "text-xl font-semibold mb-1",
2789
- children: u.auth.signIn
2795
+ children: d.auth.signIn
2790
2796
  }) }),
2791
- /* @__PURE__ */ X(A.Content, {
2797
+ /* @__PURE__ */ Z(j.Content, {
2792
2798
  className: "gap-4",
2793
2799
  children: [
2794
- a === "top" && /* @__PURE__ */ X(J, { children: [!!p?.length && /* @__PURE__ */ Y(n, { socialLayout: r }), se && /* @__PURE__ */ Y(e, { children: u.auth.or })] }),
2795
- l?.enabled && /* @__PURE__ */ X(P, {
2796
- onSubmit: re,
2800
+ o === "top" && /* @__PURE__ */ Z(Y, { children: [!!m?.length && /* @__PURE__ */ X(n, {
2801
+ socialLayout: i,
2802
+ view: "signIn"
2803
+ }), se && /* @__PURE__ */ X(t, { children: d.auth.or })] }),
2804
+ u?.enabled && /* @__PURE__ */ Z(F, {
2805
+ onSubmit: ie,
2797
2806
  className: "flex flex-col gap-4",
2798
2807
  children: [
2799
- /* @__PURE__ */ X(W, {
2808
+ /* @__PURE__ */ Z(G, {
2800
2809
  name: "email",
2801
2810
  type: "text",
2802
2811
  autoComplete: "username email",
2803
- isDisabled: ie,
2812
+ isDisabled: E,
2804
2813
  validate: (e) => {
2805
- if (!e) return u.auth.fieldRequired;
2814
+ if (!e) return d.auth.fieldRequired;
2806
2815
  },
2807
2816
  children: [
2808
- /* @__PURE__ */ Y(L, { children: b.username }),
2809
- /* @__PURE__ */ Y(F, {
2810
- placeholder: b.usernameOrEmailPlaceholder,
2811
- variant: o === "transparent" ? "primary" : "secondary",
2817
+ /* @__PURE__ */ X(R, { children: x.username }),
2818
+ /* @__PURE__ */ X(I, {
2819
+ placeholder: x.usernameOrEmailPlaceholder,
2820
+ variant: s === "transparent" ? "primary" : "secondary",
2812
2821
  required: !0
2813
2822
  }),
2814
- /* @__PURE__ */ Y(N, {})
2823
+ /* @__PURE__ */ X(P, {})
2815
2824
  ]
2816
2825
  }),
2817
- /* @__PURE__ */ X(W, {
2818
- minLength: l?.minPasswordLength,
2819
- maxLength: l?.maxPasswordLength,
2826
+ /* @__PURE__ */ Z(G, {
2827
+ minLength: u?.minPasswordLength,
2828
+ maxLength: u?.maxPasswordLength,
2820
2829
  name: "password",
2821
2830
  type: "password",
2822
2831
  autoComplete: "current-password",
2823
- isDisabled: ie,
2824
- value: x,
2825
- onChange: S,
2832
+ isDisabled: E,
2833
+ value: S,
2834
+ onChange: C,
2826
2835
  validate: (e) => {
2827
- if (!e) return u.auth.fieldRequired;
2828
- let t = l?.minPasswordLength, n = l?.maxPasswordLength;
2829
- if (t && e.length < t) return u.auth.tooShort.replace("{{min}}", String(t));
2830
- if (n && e.length > n) return u.auth.tooLong.replace("{{max}}", String(n));
2836
+ if (!e) return d.auth.fieldRequired;
2837
+ let t = u?.minPasswordLength, n = u?.maxPasswordLength;
2838
+ if (t && e.length < t) return d.auth.tooShort.replace("{{min}}", String(t));
2839
+ if (n && e.length > n) return d.auth.tooLong.replace("{{max}}", String(n));
2831
2840
  },
2832
2841
  children: [
2833
- /* @__PURE__ */ Y(L, { children: u.auth.password }),
2834
- /* @__PURE__ */ Y(F, {
2835
- placeholder: u.auth.passwordPlaceholder,
2836
- variant: o === "transparent" ? "primary" : "secondary",
2842
+ /* @__PURE__ */ X(R, { children: d.auth.password }),
2843
+ /* @__PURE__ */ X(I, {
2844
+ placeholder: d.auth.passwordPlaceholder,
2845
+ variant: s === "transparent" ? "primary" : "secondary",
2837
2846
  required: !0
2838
2847
  }),
2839
- /* @__PURE__ */ Y(N, {})
2848
+ /* @__PURE__ */ X(P, {})
2840
2849
  ]
2841
2850
  }),
2842
- l?.rememberMe && /* @__PURE__ */ Y(Ze, {
2851
+ u?.rememberMe && /* @__PURE__ */ X(Ze, {
2843
2852
  name: "rememberMe",
2844
- isDisabled: ie,
2845
- variant: o === "transparent" ? "primary" : "secondary",
2846
- children: /* @__PURE__ */ X(Ze.Content, { children: [/* @__PURE__ */ Y(Ze.Control, { children: /* @__PURE__ */ Y(Ze.Indicator, {}) }), u.auth.rememberMe] })
2853
+ isDisabled: E,
2854
+ variant: s === "transparent" ? "primary" : "secondary",
2855
+ children: /* @__PURE__ */ Z(Ze.Content, { children: [/* @__PURE__ */ X(Ze.Control, { children: /* @__PURE__ */ X(Ze.Indicator, {}) }), d.auth.rememberMe] })
2847
2856
  }),
2848
- oe && /* @__PURE__ */ Y("div", {
2857
+ oe && /* @__PURE__ */ X("div", {
2849
2858
  className: "flex justify-center",
2850
2859
  children: oe
2851
2860
  }),
2852
- /* @__PURE__ */ X("div", {
2861
+ /* @__PURE__ */ Z("div", {
2853
2862
  className: "flex flex-col gap-3",
2854
- children: [/* @__PURE__ */ X(k, {
2863
+ children: [/* @__PURE__ */ Z(A, {
2855
2864
  type: "submit",
2856
- className: "w-full",
2857
- isPending: ae || ie,
2858
- children: [ae && /* @__PURE__ */ Y(V, {
2859
- color: "current",
2860
- size: "sm"
2861
- }), u.auth.signIn]
2862
- }), d.flatMap((e) => e.authButtons?.map((t, n) => /* @__PURE__ */ Y(t, { view: "signIn" }, `${e.id}-${n.toString()}`)))]
2865
+ className: "relative w-full overflow-visible",
2866
+ isPending: ae || E,
2867
+ children: [
2868
+ ae && /* @__PURE__ */ X(H, {
2869
+ color: "current",
2870
+ size: "sm"
2871
+ }),
2872
+ d.auth.signIn,
2873
+ /* @__PURE__ */ X(e, {
2874
+ method: ["email", "username"],
2875
+ floating: !0
2876
+ })
2877
+ ]
2878
+ }), f.flatMap((e) => e.authButtons?.map((t, n) => /* @__PURE__ */ X(t, { view: "signIn" }, `${e.id}-${n.toString()}`)))]
2863
2879
  })
2864
2880
  ]
2865
2881
  }),
2866
- a === "bottom" && /* @__PURE__ */ X(J, { children: [se && /* @__PURE__ */ Y(e, { children: u.auth.or }), !!p?.length && /* @__PURE__ */ Y(n, { socialLayout: r })] })
2882
+ o === "bottom" && /* @__PURE__ */ Z(Y, { children: [se && /* @__PURE__ */ X(t, { children: d.auth.or }), !!m?.length && /* @__PURE__ */ X(n, {
2883
+ socialLayout: i,
2884
+ view: "signIn"
2885
+ })] })
2867
2886
  ]
2868
2887
  }),
2869
- /* @__PURE__ */ X(A.Footer, {
2888
+ /* @__PURE__ */ Z(j.Footer, {
2870
2889
  className: "flex-col gap-3",
2871
- children: [l?.enabled && l?.forgotPassword && /* @__PURE__ */ Y(et, {
2872
- href: `${c.auth}/${g.auth.forgotPassword}`,
2890
+ children: [u?.enabled && u?.forgotPassword && /* @__PURE__ */ X(et, {
2891
+ href: `${l.auth}/${_.auth.forgotPassword}`,
2873
2892
  className: "text-sm no-underline hover:underline",
2874
- children: u.auth.forgotPasswordLink
2875
- }), l?.enabled && /* @__PURE__ */ X(Qe, {
2893
+ children: d.auth.forgotPasswordLink
2894
+ }), u?.enabled && /* @__PURE__ */ Z(Qe, {
2876
2895
  className: "text-sm",
2877
2896
  children: [
2878
- u.auth.needToCreateAnAccount,
2897
+ d.auth.needToCreateAnAccount,
2879
2898
  " ",
2880
- /* @__PURE__ */ Y(et, {
2881
- href: `${c.auth}/${g.auth.signUp}`,
2899
+ /* @__PURE__ */ X(et, {
2900
+ href: `${l.auth}/${_.auth.signUp}`,
2882
2901
  className: "text-accent no-underline hover:underline decoration-accent-hover",
2883
- children: u.auth.signUp
2902
+ children: d.auth.signUp
2884
2903
  })
2885
2904
  ]
2886
2905
  })]
@@ -2889,4 +2908,7 @@ function Rn({ className: t, socialLayout: r, socialPosition: a = "bottom", varia
2889
2908
  });
2890
2909
  }
2891
2910
  //#endregion
2892
- export { Dt as ApiKeys, Fn as Appearance, tn as ChangeOrganizationLogo, Wt as CreateOrganizationDialog, At as DangerZone, kt as DeleteAccount, an as DeleteOrganization, rn as DeleteOrganizationSkeleton, sn as InviteMemberDialog, ln as LeaveOrganization, Mt as MAGIC_LINK_SENT_STORAGE_KEY, Ft as MagicLink, Nt as MagicLinkSent, Vt as ManageAccount, It as ManageAccounts, Sn as Organization, yt as OrganizationApiKeys, yn as OrganizationDangerZone, pn as OrganizationInvitations, fn as OrganizationInvitationsEmpty, Gt as OrganizationLogo, _n as OrganizationMembers, vn as OrganizationPeople, bn as OrganizationProfile, qt as OrganizationRow, xn as OrganizationSettings, Cn as OrganizationSwitcher, Q as OrganizationView, Kt as OrganizationViewSkeleton, Yt as Organizations, en as OrganizationsSettings, jn as Passkeys, Rn as SignInUsername, zt as SwitchAccountSubmenu, Rt as SwitchAccountSubmenuContent, Lt as SwitchAccountSubmenuItem, Nn as ThemeToggleItem, $t as UserInvitations, In as UsernameField, bt as apiKeyPlugin, Ot as deleteUserPlugin, Pt as magicLinkPlugin, Bt as multiSessionPlugin, $ as organizationPlugin, Tn as passkeyPlugin, Pn as themePlugin, Ln as usernamePlugin };
2911
+ //#region src/lib/auth/last-login-method-plugin.ts
2912
+ var Vn = s(pt.id, (e = {}) => ({ ...pt(e) }));
2913
+ //#endregion
2914
+ export { kt as ApiKeys, Ln as Appearance, rn as ChangeOrganizationLogo, Kt as CreateOrganizationDialog, Mt as DangerZone, jt as DeleteAccount, sn as DeleteOrganization, on as DeleteOrganizationSkeleton, ln as InviteMemberDialog, e as LastUsedBadge, dn as LeaveOrganization, Pt as MAGIC_LINK_SENT_STORAGE_KEY, Lt as MagicLink, Ft as MagicLinkSent, Ut as ManageAccount, Rt as ManageAccounts, wn as Organization, xt as OrganizationApiKeys, xn as OrganizationDangerZone, hn as OrganizationInvitations, mn as OrganizationInvitationsEmpty, qt as OrganizationLogo, yn as OrganizationMembers, bn as OrganizationPeople, Sn as OrganizationProfile, Yt as OrganizationRow, Cn as OrganizationSettings, Tn as OrganizationSwitcher, Q as OrganizationView, Jt as OrganizationViewSkeleton, Zt as Organizations, nn as OrganizationsSettings, Nn as Passkeys, Bn as SignInUsername, Vt as SwitchAccountSubmenu, Bt as SwitchAccountSubmenuContent, zt as SwitchAccountSubmenuItem, Fn as ThemeToggleItem, tn as UserInvitations, Rn as UsernameField, St as apiKeyPlugin, At as deleteUserPlugin, Vn as lastLoginMethodPlugin, It as magicLinkPlugin, Ht as multiSessionPlugin, $ as organizationPlugin, Dn as passkeyPlugin, In as themePlugin, zn as usernamePlugin };