@tailor-platform/app-shell 0.29.0 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/app-shell.js CHANGED
@@ -1,24 +1,29 @@
1
- import { jsx as a, jsxs as c, Fragment as S } from "react/jsx-runtime";
2
- import { capitalCase as E } from "change-case";
3
- import { useRouteError as me, isRouteErrorResponse as he, redirect as pe, Outlet as ot, NavLink as fe, Navigate as ge, useRouteLoaderData as be, createMemoryRouter as ve, createBrowserRouter as xe, RouterProvider as ye, useLocation as X, Link as $, Await as $t, useMatch as Ne, useNavigate as Se } from "react-router";
4
- import { Link as mn, useLocation as hn, useNavigate as pn, useParams as fn, useRouteError as gn, useSearchParams as bn } from "react-router";
5
- import { cva as it } from "class-variance-authority";
6
- import { useRender as j } from "@base-ui/react/use-render";
7
- import { clsx as Ce } from "clsx";
8
- import { twMerge as Te } from "tailwind-merge";
9
- import { AlertCircle as St, Table as ke, XIcon as Wt, PanelLeftIcon as Re, ExternalLink as Ft, ChevronRight as W, SunIcon as Pe, SearchIcon as Ae, Check as Be, Copy as De } from "lucide-react";
10
- import * as g from "react";
11
- import { createContext as Z, useContext as I, useState as V, useMemo as M, useEffect as F, useSyncExternalStore as Ot, Suspense as lt, useRef as jt, useCallback as D } from "react";
12
- import { Toaster as Me, toast as Ee } from "sonner";
13
- import { parsePath as Ie } from "@tailor-platform/app-shell-vite-plugin/parser";
14
- import { Dialog as x } from "@base-ui/react/dialog";
15
- import { Tooltip as A } from "@base-ui/react/tooltip";
16
- import { Collapsible as ct } from "@base-ui/react/collapsible";
17
- import { createAuthClient as Le } from "@tailor-platform/auth-public-client";
18
- function m(...t) {
19
- return Te(Ce(t));
20
- }
21
- const _e = it(
1
+ import { jsx as a, jsxs as d, Fragment as M } from "react/jsx-runtime";
2
+ import { capitalCase as J } from "change-case";
3
+ import { useRouteError as vs, isRouteErrorResponse as ys, redirect as Ns, Outlet as te, NavLink as Cs, Navigate as Ss, useRouteLoaderData as Ts, createMemoryRouter as Is, createBrowserRouter as Rs, RouterProvider as ks, useLocation as Et, Link as dt, Await as Oe, useMatch as Ls, useNavigate as Ps } from "react-router";
4
+ import { Link as Fo, useLocation as Oo, useNavigate as Go, useParams as jo, useRouteError as Wo, useSearchParams as Ho } from "react-router";
5
+ import { cva as ee } from "class-variance-authority";
6
+ import { useRender as ft } from "@base-ui/react/use-render";
7
+ import { clsx as As } from "clsx";
8
+ import { twMerge as Ms } from "tailwind-merge";
9
+ import { AlertCircle as Ae, Table as Vs, XIcon as gt, PanelLeftIcon as Ds, ExternalLink as Ge, ChevronRight as ut, SunIcon as _s, SearchIcon as Es, Check as Bs, Copy as zs, CheckIcon as je, ChevronDownIcon as ae } from "lucide-react";
10
+ import * as N from "react";
11
+ import { createContext as Bt, useContext as tt, useState as V, useMemo as H, useEffect as X, useSyncExternalStore as We, Suspense as se, useRef as U, useCallback as A } from "react";
12
+ import { Toaster as $s, toast as Fs } from "sonner";
13
+ import { parsePath as Os } from "@tailor-platform/app-shell-vite-plugin/parser";
14
+ import { Drawer as B } from "@base-ui/react/drawer";
15
+ import { Tooltip as q } from "@base-ui/react/tooltip";
16
+ import { Collapsible as F } from "@base-ui/react/collapsible";
17
+ import { Dialog as W } from "@base-ui/react/dialog";
18
+ import { createAuthClient as Gs } from "@tailor-platform/auth-public-client";
19
+ import { Menu as k } from "@base-ui/react/menu";
20
+ import { Select as D } from "@base-ui/react/select";
21
+ import { Combobox as I } from "@base-ui/react/combobox";
22
+ import { Autocomplete as L } from "@base-ui/react/autocomplete";
23
+ function c(...t) {
24
+ return Ms(As(t));
25
+ }
26
+ const js = ee(
22
27
  "astw:inline-flex astw:items-center astw:justify-center astw:gap-2 astw:whitespace-nowrap astw:rounded-md astw:text-sm astw:font-medium astw:transition-all astw:disabled:pointer-events-none astw:disabled:opacity-50 astw:[&_svg]:pointer-events-none astw:[&_svg:not([class*='size-'])]:size-4 astw:shrink-0 astw:[&_svg]:shrink-0 astw:outline-none astw:focus-visible:border-ring astw:focus-visible:ring-ring/50 astw:focus-visible:ring-[3px] astw:aria-invalid:ring-destructive/20 astw:dark:aria-invalid:ring-destructive/40 astw:aria-invalid:border-destructive",
23
28
  {
24
29
  variants: {
@@ -43,48 +48,41 @@ const _e = it(
43
48
  }
44
49
  }
45
50
  );
46
- function O({
47
- className: t,
48
- variant: e,
49
- size: s,
50
- render: n,
51
- children: r,
52
- ...o
53
- }) {
54
- return j({
51
+ function wt({ className: t, variant: e, size: s, render: n, children: r, ...o }) {
52
+ return ft({
55
53
  defaultTagName: "button",
56
54
  render: n,
57
55
  props: {
58
56
  "data-slot": "button",
59
- className: m(_e({ variant: e, size: s, className: t })),
57
+ className: c(js({ variant: e, size: s, className: t })),
60
58
  children: r,
61
59
  ...o
62
60
  }
63
61
  });
64
62
  }
65
- const G = "en", ze = () => {
63
+ const kt = "en", Ws = () => {
66
64
  try {
67
65
  if (typeof navigator > "u")
68
- return G;
66
+ return kt;
69
67
  const t = navigator.languages?.[0] ?? navigator.language;
70
- return t ? new Intl.Locale(t).language : G;
68
+ return t ? new Intl.Locale(t).language : kt;
71
69
  } catch {
72
- return G;
70
+ return kt;
73
71
  }
74
- }, U = (t) => (e, s) => e ? typeof e == "string" ? e : e(t) ?? s : s, Ut = (t) => {
75
- const e = U(t);
76
- return (s, n) => e(s, typeof s == "string" ? s : E(n));
77
- }, $e = (t) => ({
72
+ }, bt = (t) => (e, s) => e ? typeof e == "string" ? e : e(t) ?? s : s, He = (t) => {
73
+ const e = bt(t);
74
+ return (s, n) => e(s, typeof s == "string" ? s : J(n));
75
+ }, Hs = (t) => ({
78
76
  modules: t.modules,
79
77
  settingsResources: t.settingsResources ?? [],
80
- errorBoundary: t.errorBoundary ?? /* @__PURE__ */ a(z, {}),
78
+ errorBoundary: t.errorBoundary ?? /* @__PURE__ */ a(ot, {}),
81
79
  basePath: t.basePath,
82
- locale: t.locale ?? ze()
83
- }), dt = Z({
80
+ locale: t.locale ?? Ws()
81
+ }), ne = Bt({
84
82
  configurations: {
85
83
  modules: [],
86
84
  settingsResources: [],
87
- locale: G,
85
+ locale: kt,
88
86
  // Using null! to avoid circular dependency issues.
89
87
  // DefaultErrorBoundary imports useT from i18n-labels, which imports
90
88
  // defineI18nLabels from hooks/i18n, which imports useAppShellConfig
@@ -93,18 +91,18 @@ const G = "en", ze = () => {
93
91
  // always provides the context via AppShellConfigContext.Provider.
94
92
  errorBoundary: null
95
93
  }
96
- }), ut = Z({
94
+ }), re = Bt({
97
95
  contextData: {}
98
- }), C = () => I(dt), Hs = () => I(ut), Ht = () => {
99
- const t = I(dt), e = I(ut);
96
+ }), K = () => tt(ne), mo = () => tt(re), Ue = () => {
97
+ const t = tt(ne), e = tt(re);
100
98
  return {
101
99
  ...t,
102
100
  ...e
103
101
  };
104
- }, We = () => {
105
- const { configurations: t } = C(), e = U(t.locale);
102
+ }, Us = () => {
103
+ const { configurations: t } = K(), e = bt(t.locale);
106
104
  return (s, n) => e(s, n);
107
- }, Fe = (t) => {
105
+ }, Ks = (t) => {
108
106
  const e = (s) => (n) => t[s]?.[n] ?? t.en[n];
109
107
  return {
110
108
  /**
@@ -127,7 +125,7 @@ const G = "en", ze = () => {
127
125
  * ```
128
126
  */
129
127
  useT: () => {
130
- const { configurations: s } = C(), n = e(s.locale), r = ((o, ...i) => {
128
+ const { configurations: s } = K(), n = e(s.locale), r = ((o, ...i) => {
131
129
  const l = n(o);
132
130
  return typeof l == "function" ? l(i[0]) : l;
133
131
  });
@@ -163,7 +161,7 @@ const G = "en", ze = () => {
163
161
  return typeof o == "function" ? o(n[0]) : o;
164
162
  }
165
163
  };
166
- }, Oe = Fe({
164
+ }, Ys = Ks({
167
165
  en: {
168
166
  error404Title: "404 Not Found",
169
167
  error404Body: "The page you requested could not be found.",
@@ -202,19 +200,19 @@ const G = "en", ze = () => {
202
200
  commandPaletteSearch: "ページを検索...",
203
201
  commandPaletteNoResults: "結果が見つかりません"
204
202
  }
205
- }), B = Oe.useT, z = () => {
206
- const t = me(), e = B(), s = {
203
+ }), Q = Ys.useT, ot = () => {
204
+ const t = vs(), e = Q(), s = {
207
205
  role: "alert",
208
206
  "aria-label": "default-error-boundary"
209
207
  };
210
- if (he(t) && t.status === 404)
211
- return /* @__PURE__ */ a("div", { ...s, className: "astw:p-6", children: /* @__PURE__ */ c("div", { className: "astw:flex astw:items-start astw:gap-4", children: [
212
- /* @__PURE__ */ a(St, { className: "astw:h-5 astw:w-5 astw:text-destructive astw:flex-shrink-0 astw:mt-0.5" }),
213
- /* @__PURE__ */ c("div", { children: [
208
+ if (ys(t) && t.status === 404)
209
+ return /* @__PURE__ */ a("div", { ...s, className: "astw:p-6", children: /* @__PURE__ */ d("div", { className: "astw:flex astw:items-start astw:gap-4", children: [
210
+ /* @__PURE__ */ a(Ae, { className: "astw:h-5 astw:w-5 astw:text-destructive astw:flex-shrink-0 astw:mt-0.5" }),
211
+ /* @__PURE__ */ d("div", { children: [
214
212
  /* @__PURE__ */ a("h1", { className: "astw:font-semibold astw:text-lg", children: e("error404Title") }),
215
213
  /* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground astw:mt-1", children: e("error404Body") }),
216
214
  /* @__PURE__ */ a(
217
- O,
215
+ wt,
218
216
  {
219
217
  variant: "outline",
220
218
  size: "sm",
@@ -226,13 +224,13 @@ const G = "en", ze = () => {
226
224
  ] })
227
225
  ] }) });
228
226
  const n = t instanceof Error ? t.message : e("errorUnexpected");
229
- return /* @__PURE__ */ a("div", { ...s, className: "astw:p-6", children: /* @__PURE__ */ c("div", { className: "astw:flex astw:items-start astw:gap-4", children: [
230
- /* @__PURE__ */ a(St, { className: "astw:h-5 astw:w-5 astw:text-destructive astw:flex-shrink-0 astw:mt-0.5" }),
231
- /* @__PURE__ */ c("div", { children: [
227
+ return /* @__PURE__ */ a("div", { ...s, className: "astw:p-6", children: /* @__PURE__ */ d("div", { className: "astw:flex astw:items-start astw:gap-4", children: [
228
+ /* @__PURE__ */ a(Ae, { className: "astw:h-5 astw:w-5 astw:text-destructive astw:flex-shrink-0 astw:mt-0.5" }),
229
+ /* @__PURE__ */ d("div", { children: [
232
230
  /* @__PURE__ */ a("h1", { className: "astw:font-semibold astw:text-lg", children: e("errorTitle") }),
233
231
  /* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground astw:mt-1", children: n }),
234
232
  /* @__PURE__ */ a(
235
- O,
233
+ wt,
236
234
  {
237
235
  variant: "outline",
238
236
  size: "sm",
@@ -244,16 +242,16 @@ const G = "en", ze = () => {
244
242
  ] })
245
243
  ] }) });
246
244
  };
247
- let Kt = {};
248
- const je = (t) => {
249
- Kt = t;
250
- }, Ks = () => ({ type: "pass" }), Vs = () => ({ type: "hidden" }), Gs = (t) => ({
245
+ let Ke = {};
246
+ const qs = (t) => {
247
+ Ke = t;
248
+ }, po = () => ({ type: "pass" }), ho = () => ({ type: "hidden" }), fo = (t) => ({
251
249
  type: "redirect",
252
250
  to: t
253
- }), q = () => new Response("Not Found", { status: 404 }), wt = async (t) => {
251
+ }), Lt = () => new Response("Not Found", { status: 404 }), oe = async (t) => {
254
252
  if (!t || t.length === 0) return { type: "pass" };
255
253
  const e = {
256
- context: Kt
254
+ context: Ke
257
255
  };
258
256
  for (const s of t) {
259
257
  const n = await s(e);
@@ -261,28 +259,28 @@ const je = (t) => {
261
259
  return n;
262
260
  }
263
261
  return { type: "pass" };
264
- }, Vt = (t, e) => async (s) => {
265
- const n = await wt(t);
262
+ }, Ye = (t, e) => async (s) => {
263
+ const n = await oe(t);
266
264
  switch (n.type) {
267
265
  case "hidden":
268
- throw q();
266
+ throw Lt();
269
267
  case "redirect":
270
- return pe(n.to);
268
+ return Ns(n.to);
271
269
  case "pass":
272
270
  return e ? e(s) : null;
273
271
  }
274
- }, Gt = (t, e) => () => {
275
- const { configurations: s } = C(), { metaTitle: n, fallbackTitle: r } = t, i = U(s.locale)(n, r);
272
+ }, qe = (t, e) => () => {
273
+ const { configurations: s } = K(), { metaTitle: n, fallbackTitle: r } = t, i = bt(s.locale)(n, r);
276
274
  return e(i);
277
275
  };
278
- function qs(t) {
279
- const { path: e, meta: s, component: n, resources: r, errorBoundary: o, guards: i } = t, l = s?.title ?? E(e), u = E(e), d = i && i.length > 0 ? Vt(i) : void 0, w = n ? Gt({ metaTitle: l, fallbackTitle: u }, (h) => n({ title: h, resources: r })) : void 0;
276
+ function go(t) {
277
+ const { path: e, meta: s, component: n, resources: r, errorBoundary: o, guards: i } = t, l = s?.title ?? J(e), m = J(e), u = i && i.length > 0 ? Ye(i) : void 0, w = n ? qe({ metaTitle: l, fallbackTitle: m }, (p) => n({ title: p, resources: r })) : void 0;
280
278
  return {
281
279
  path: e,
282
280
  type: "component",
283
281
  _type: "module",
284
282
  component: w,
285
- loader: d,
283
+ loader: u,
286
284
  meta: {
287
285
  title: l,
288
286
  ...s?.breadcrumbTitle !== void 0 ? { breadcrumbTitle: s.breadcrumbTitle } : {},
@@ -291,14 +289,14 @@ function qs(t) {
291
289
  icon: t.meta?.icon
292
290
  },
293
291
  resources: r,
294
- errorBoundary: o || /* @__PURE__ */ a(z, {}),
292
+ errorBoundary: o || /* @__PURE__ */ a(ot, {}),
295
293
  guards: i
296
294
  };
297
295
  }
298
- function Ys(t) {
299
- const { path: e, component: s, subResources: n, meta: r, errorBoundary: o, guards: i } = t, l = r?.title ?? E(e), u = E(e), d = i && i.length > 0 ? Vt(i) : void 0, w = s ? Gt(
300
- { metaTitle: l, fallbackTitle: u },
301
- (h) => s({ title: h, resources: n })
296
+ function bo(t) {
297
+ const { path: e, component: s, subResources: n, meta: r, errorBoundary: o, guards: i } = t, l = r?.title ?? J(e), m = J(e), u = i && i.length > 0 ? Ye(i) : void 0, w = s ? qe(
298
+ { metaTitle: l, fallbackTitle: m },
299
+ (p) => s({ title: p, resources: n })
302
300
  ) : void 0;
303
301
  return {
304
302
  _type: "resource",
@@ -311,27 +309,27 @@ function Ys(t) {
311
309
  },
312
310
  component: w,
313
311
  subResources: n,
314
- errorBoundary: o ?? /* @__PURE__ */ a(z, {}),
312
+ errorBoundary: o ?? /* @__PURE__ */ a(ot, {}),
315
313
  guards: i,
316
- loader: d
314
+ loader: u
317
315
  };
318
316
  }
319
- const Ue = () => {
320
- const t = B();
321
- return /* @__PURE__ */ c(S, { children: [
317
+ const Xs = () => {
318
+ const t = Q();
319
+ return /* @__PURE__ */ d(M, { children: [
322
320
  /* @__PURE__ */ a("p", { className: "astw:font-semibold astw:leading-none astw:tracking-tight", children: t("welcomeTitle") }),
323
321
  /* @__PURE__ */ a("p", { className: "pt-4", children: t("welcomeBody") })
324
322
  ] });
325
- }, Ct = () => /* @__PURE__ */ c(S, { children: [
326
- /* @__PURE__ */ a(ot, {}),
327
- /* @__PURE__ */ a(Me, {})
328
- ] }), He = () => {
329
- const { configurations: t } = Ht(), e = B(), s = We();
330
- return /* @__PURE__ */ c("div", { className: "astw:mx-auto astw:flex-col astw:flex astw:md:flex-row astw:max-w-5xl astw:gap-[10px] astw:w-full", children: [
331
- /* @__PURE__ */ a("div", { children: /* @__PURE__ */ c("nav", { className: "astw:bg-card astw:md:w-xs astw:rounded-md astw:border astw:p-3 astw:shadow-xs", children: [
323
+ }, Me = () => /* @__PURE__ */ d(M, { children: [
324
+ /* @__PURE__ */ a(te, {}),
325
+ /* @__PURE__ */ a($s, {})
326
+ ] }), Qs = () => {
327
+ const { configurations: t } = Ue(), e = Q(), s = Us();
328
+ return /* @__PURE__ */ d("div", { className: "astw:mx-auto astw:flex-col astw:flex astw:md:flex-row astw:max-w-5xl astw:gap-[10px] astw:w-full", children: [
329
+ /* @__PURE__ */ a("div", { children: /* @__PURE__ */ d("nav", { className: "astw:bg-card astw:md:w-xs astw:rounded-md astw:border astw:p-3 astw:shadow-xs", children: [
332
330
  /* @__PURE__ */ a("h2", { className: "astw:text-sm astw:leading-[36px] astw:mb-2 astw:font-bold ", children: e("settings") }),
333
- /* @__PURE__ */ a("ul", { className: "astw:flex astw:flex-col astw:gap-1", children: t.settingsResources.map((n) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(fe, { to: `./${n.path}`, children: ({ isActive: r }) => /* @__PURE__ */ c(
334
- O,
331
+ /* @__PURE__ */ a("ul", { className: "astw:flex astw:flex-col astw:gap-1", children: t.settingsResources.map((n) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(Cs, { to: `./${n.path}`, children: ({ isActive: r }) => /* @__PURE__ */ d(
332
+ wt,
335
333
  {
336
334
  variant: r ? "secondary" : "ghost",
337
335
  className: "astw:w-full astw:justify-start",
@@ -342,9 +340,9 @@ const Ue = () => {
342
340
  }
343
341
  ) }) }, n.path)) })
344
342
  ] }) }),
345
- /* @__PURE__ */ a("section", { className: "astw:bg-card astw:flex-1 astw:rounded-md astw:border astw:shadow-xs", children: /* @__PURE__ */ a(ot, {}) })
343
+ /* @__PURE__ */ a("section", { className: "astw:bg-card astw:flex-1 astw:rounded-md astw:border astw:shadow-xs", children: /* @__PURE__ */ a(te, {}) })
346
344
  ] });
347
- }, mt = (t) => () => /* @__PURE__ */ a(S, { children: t }), Ke = (t) => t.component ? {
345
+ }, ie = (t) => () => /* @__PURE__ */ a(M, { children: t }), Zs = (t) => t.component ? {
348
346
  index: !0,
349
347
  Component: t.component,
350
348
  ...t.loader && { loader: t.loader }
@@ -357,42 +355,42 @@ const Ue = () => {
357
355
  loader: async (e) => {
358
356
  const s = await t.loader(e);
359
357
  if (s instanceof Response) return s;
360
- throw q();
358
+ throw Lt();
361
359
  }
362
360
  } : {
363
361
  index: !0,
364
362
  Component: () => null,
365
363
  loader: () => {
366
- throw q();
364
+ throw Lt();
367
365
  }
368
- }, qt = (t, e, s) => {
366
+ }, Xe = (t, e, s) => {
369
367
  const n = t.errorBoundary || s, r = (e ?? []).map(
370
- (l) => qt(l, l.subResources, n)
371
- ), i = [Ke(t), ...r];
368
+ (l) => Xe(l, l.subResources, n)
369
+ ), i = [Zs(t), ...r];
372
370
  return {
373
371
  path: t.path,
374
372
  ...t.errorBoundary && {
375
- ErrorBoundary: mt(t.errorBoundary)
373
+ ErrorBoundary: ie(t.errorBoundary)
376
374
  },
377
375
  ...i.length > 0 ? { children: i } : {}
378
376
  };
379
- }, Ve = (t) => t.map((e) => qt(e, e.resources, e.errorBoundary)), Ge = ({
377
+ }, Js = (t) => t.map((e) => Xe(e, e.resources, e.errorBoundary)), tn = ({
380
378
  modules: t,
381
379
  settingsResources: e,
382
380
  rootComponent: s
383
381
  }) => {
384
382
  const n = {
385
383
  index: !0,
386
- Component: s ?? Ue
384
+ Component: s ?? Xs
387
385
  }, r = e.length > 0 ? [
388
386
  {
389
387
  path: "settings",
390
388
  index: !0,
391
- Component: () => /* @__PURE__ */ a(ge, { to: e[0].path, relative: "path", replace: !0 })
389
+ Component: () => /* @__PURE__ */ a(Ss, { to: e[0].path, relative: "path", replace: !0 })
392
390
  },
393
391
  {
394
392
  path: "settings",
395
- Component: He,
393
+ Component: Qs,
396
394
  children: e.map((o) => {
397
395
  if (!o.component)
398
396
  throw new Error(`Settings resource "${o.path}" must have a component.`);
@@ -400,7 +398,7 @@ const Ue = () => {
400
398
  path: o.path,
401
399
  Component: o.component,
402
400
  ...o.errorBoundary && {
403
- ErrorBoundary: mt(o.errorBoundary)
401
+ ErrorBoundary: ie(o.errorBoundary)
404
402
  }
405
403
  };
406
404
  })
@@ -409,29 +407,29 @@ const Ue = () => {
409
407
  return [
410
408
  n,
411
409
  {
412
- children: Ve(t)
410
+ children: Js(t)
413
411
  },
414
412
  ...r,
415
413
  {
416
414
  path: "*",
417
415
  loader: () => {
418
- throw q();
416
+ throw Lt();
419
417
  },
420
418
  // Component is required to suppress React Router's warning about empty leaf routes,
421
419
  // even though the loader always throws and this component will never render.
422
420
  Component: () => null,
423
- ErrorBoundary: z
421
+ ErrorBoundary: ot
424
422
  }
425
423
  ];
426
- }, Yt = "appshell-root-nav", qe = (t) => ({
427
- loaderID: Yt,
428
- loader: async () => ({ navItems: Ye(t) })
429
- }), Qt = () => be(Yt)?.navItems, Ye = async (t) => {
430
- const e = Ut(t.locale);
424
+ }, Qe = "appshell-root-nav", en = (t) => ({
425
+ loaderID: Qe,
426
+ loader: async () => ({ navItems: an(t) })
427
+ }), Ze = () => Ts(Qe)?.navItems, an = async (t) => {
428
+ const e = He(t.locale);
431
429
  return (await Promise.all(
432
430
  t.modules.map(async (n) => {
433
- if (n.path.startsWith(":") || (await wt(n.guards)).type !== "pass") return null;
434
- const o = await Xt(
431
+ if (n.path.startsWith(":") || (await oe(n.guards)).type !== "pass") return null;
432
+ const o = await Je(
435
433
  n.resources,
436
434
  n.path,
437
435
  e
@@ -441,36 +439,36 @@ const Ue = () => {
441
439
  )).filter((n) => n !== null).map(({ module: n, resources: r }) => ({
442
440
  title: e(n.meta.title, n.path),
443
441
  url: n.meta.menuItemClickable ? n.path : void 0,
444
- icon: n.meta.icon || /* @__PURE__ */ a(ke, {}),
442
+ icon: n.meta.icon || /* @__PURE__ */ a(Vs, {}),
445
443
  items: r
446
444
  }));
447
- }, Xt = async (t, e, s) => (await Promise.all(
445
+ }, Je = async (t, e, s) => (await Promise.all(
448
446
  t.map(async (r) => {
449
- if (r.path.startsWith(":") || (await wt(r.guards)).type !== "pass") return null;
450
- const i = `${e}/${r.path}`, l = s(r.meta.title, r.path), u = r.component !== void 0, d = r.subResources ? await Xt(r.subResources, i, s) : void 0, w = d && d.length > 0;
451
- return !u && !w ? null : {
447
+ if (r.path.startsWith(":") || (await oe(r.guards)).type !== "pass") return null;
448
+ const i = `${e}/${r.path}`, l = s(r.meta.title, r.path), m = r.component !== void 0, u = r.subResources ? await Je(r.subResources, i, s) : void 0, w = u && u.length > 0;
449
+ return !m && !w ? null : {
452
450
  title: l,
453
- url: u ? i : void 0,
454
- items: w ? d : void 0
451
+ url: m ? i : void 0,
452
+ items: w ? u : void 0
455
453
  };
456
454
  })
457
- )).filter((r) => r !== null), Qe = (t) => {
458
- const { configurations: e } = C(), { rootComponent: s, children: n } = t, r = Ge({
455
+ )).filter((r) => r !== null), sn = (t) => {
456
+ const { configurations: e } = K(), { rootComponent: s, children: n } = t, r = tn({
459
457
  modules: e.modules,
460
458
  settingsResources: e.settingsResources,
461
459
  rootComponent: s
462
- }), o = e.errorBoundary, { loaderID: i, loader: l } = qe({
460
+ }), o = e.errorBoundary, { loaderID: i, loader: l } = en({
463
461
  modules: e.modules,
464
462
  locale: e.locale
465
- }), u = [
463
+ }), m = [
466
464
  {
467
465
  id: i,
468
466
  loader: l,
469
467
  element: n,
470
468
  children: o ? [
471
469
  {
472
- element: /* @__PURE__ */ a(ot, {}),
473
- ErrorBoundary: mt(o),
470
+ element: /* @__PURE__ */ a(te, {}),
471
+ ErrorBoundary: ie(o),
474
472
  children: r
475
473
  }
476
474
  ] : r,
@@ -480,19 +478,19 @@ const Ue = () => {
480
478
  */
481
479
  HydrateFallback: () => null
482
480
  }
483
- ], d = e.basePath ? "/" + e.basePath : void 0, w = t.memory ? ve(u, {
484
- basename: d,
481
+ ], u = e.basePath ? "/" + e.basePath : void 0, w = t.memory ? Is(m, {
482
+ basename: u,
485
483
  ...t.initialEntries ? { initialEntries: t.initialEntries } : {}
486
- }) : xe(u, {
487
- basename: d
484
+ }) : Rs(m, {
485
+ basename: u
488
486
  });
489
- return /* @__PURE__ */ a(ye, { router: w });
490
- }, Xe = {
487
+ return /* @__PURE__ */ a(ks, { router: w });
488
+ }, nn = {
491
489
  resolvedTheme: "light",
492
490
  theme: "system",
493
491
  setTheme: () => null
494
- }, Zt = Z(Xe);
495
- function Ze({
492
+ }, ta = Bt(nn);
493
+ function rn({
496
494
  children: t,
497
495
  storageKey: e,
498
496
  defaultTheme: s = "system",
@@ -500,30 +498,30 @@ function Ze({
500
498
  }) {
501
499
  const [r, o] = V(
502
500
  () => localStorage.getItem(e) || s
503
- ), i = M(() => r !== "system" ? r : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", [r]);
504
- F(() => {
505
- const u = window.document.documentElement;
506
- u.classList.remove("light", "dark"), u.classList.add(i);
501
+ ), i = H(() => r !== "system" ? r : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", [r]);
502
+ X(() => {
503
+ const m = window.document.documentElement;
504
+ m.classList.remove("light", "dark"), m.classList.add(i);
507
505
  }, [i]);
508
506
  const l = {
509
507
  resolvedTheme: i,
510
508
  theme: r,
511
- setTheme: (u) => {
512
- localStorage.setItem(e, u), o(u);
509
+ setTheme: (m) => {
510
+ localStorage.setItem(e, m), o(m);
513
511
  }
514
512
  };
515
- return /* @__PURE__ */ a(Zt.Provider, { ...n, value: l, children: t });
513
+ return /* @__PURE__ */ a(ta.Provider, { ...n, value: l, children: t });
516
514
  }
517
- const Je = () => {
518
- const t = I(Zt);
515
+ const on = () => {
516
+ const t = tt(ta);
519
517
  if (t === void 0) throw new Error("useTheme must be used within a ThemeProvider");
520
518
  return t;
521
- }, ta = () => () => {
522
- }, ea = () => !0, aa = () => !1;
523
- function sa() {
524
- return Ot(ta, ea, aa);
519
+ }, ln = () => () => {
520
+ }, cn = () => !0, dn = () => !1;
521
+ function un() {
522
+ return We(ln, cn, dn);
525
523
  }
526
- function na(t) {
524
+ function wn(t) {
527
525
  const e = {
528
526
  path: "",
529
527
  fullPath: "",
@@ -531,7 +529,7 @@ function na(t) {
531
529
  children: /* @__PURE__ */ new Map()
532
530
  };
533
531
  for (const s of t) {
534
- const n = Ie(s.path);
532
+ const n = Os(s.path);
535
533
  let r = e, o = "";
536
534
  for (const i of n)
537
535
  i.type !== "group" && (o = o ? `${o}/${i.converted}` : i.converted, r.children.has(i.converted) || r.children.set(i.converted, {
@@ -544,13 +542,13 @@ function na(t) {
544
542
  }
545
543
  return e;
546
544
  }
547
- function Jt(t, e) {
548
- return t?.appShellPageProps?.meta?.title ?? E(e || "home");
545
+ function ea(t, e) {
546
+ return t?.appShellPageProps?.meta?.title ?? J(e || "home");
549
547
  }
550
- function te(t) {
551
- const e = t.component, s = Jt(e, t.path), n = e?.appShellPageProps?.meta?.icon, r = e?.appShellPageProps?.loader, o = [];
548
+ function aa(t) {
549
+ const e = t.component, s = ea(e, t.path), n = e?.appShellPageProps?.meta?.icon, r = e?.appShellPageProps?.loader, o = [];
552
550
  for (const i of t.children.values())
553
- o.push(te(i));
551
+ o.push(aa(i));
554
552
  return {
555
553
  _type: "resource",
556
554
  type: "component",
@@ -561,15 +559,15 @@ function te(t) {
561
559
  },
562
560
  component: e ? () => /* @__PURE__ */ a(e, {}) : void 0,
563
561
  subResources: o.length > 0 ? o : void 0,
564
- errorBoundary: /* @__PURE__ */ a(z, {}),
562
+ errorBoundary: /* @__PURE__ */ a(ot, {}),
565
563
  guards: t.guards,
566
564
  loader: r
567
565
  };
568
566
  }
569
- function Tt(t) {
570
- const e = t.component, s = Jt(e, t.path), n = e?.appShellPageProps?.meta?.icon, r = e?.appShellPageProps?.loader, o = [];
567
+ function Ve(t) {
568
+ const e = t.component, s = ea(e, t.path), n = e?.appShellPageProps?.meta?.icon, r = e?.appShellPageProps?.loader, o = [];
571
569
  for (const i of t.children.values())
572
- o.push(te(i));
570
+ o.push(aa(i));
573
571
  return {
574
572
  _type: "module",
575
573
  type: "component",
@@ -581,17 +579,17 @@ function Tt(t) {
581
579
  },
582
580
  component: e ? () => /* @__PURE__ */ a(e, {}) : void 0,
583
581
  resources: o,
584
- errorBoundary: /* @__PURE__ */ a(z, {}),
582
+ errorBoundary: /* @__PURE__ */ a(ot, {}),
585
583
  guards: t.guards,
586
584
  loader: r
587
585
  };
588
586
  }
589
- function ra(t) {
587
+ function mn(t) {
590
588
  if (t.length === 0)
591
589
  return [];
592
- const e = na(t), s = [];
590
+ const e = wn(t), s = [];
593
591
  if (e.component) {
594
- const n = Tt({
592
+ const n = Ve({
595
593
  ...e,
596
594
  path: "",
597
595
  children: /* @__PURE__ */ new Map()
@@ -600,14 +598,14 @@ function ra(t) {
600
598
  s.push(n);
601
599
  }
602
600
  for (const n of e.children.values())
603
- s.push(Tt(n));
601
+ s.push(Ve(n));
604
602
  return s;
605
603
  }
606
- const ee = (t) => {
607
- const e = sa(), s = t.contextData ?? {};
608
- je(s);
609
- const n = t.modules, r = M(
610
- () => n ? $e({
604
+ const sa = (t) => {
605
+ const e = un(), s = t.contextData ?? {};
606
+ qs(s);
607
+ const n = t.modules, r = H(
608
+ () => n ? Hs({
611
609
  modules: n,
612
610
  settingsResources: t.settingsResources,
613
611
  basePath: t.basePath,
@@ -615,26 +613,26 @@ const ee = (t) => {
615
613
  locale: t.locale
616
614
  }) : null,
617
615
  [n, t.settingsResources, t.basePath, t.errorBoundary, t.locale]
618
- ), o = M(
616
+ ), o = H(
619
617
  () => r ? { title: t.title, icon: t.icon, configurations: r } : null,
620
618
  [t.title, t.icon, r]
621
- ), i = M(
619
+ ), i = H(
622
620
  () => ({ contextData: t.contextData ?? {} }),
623
621
  [t.contextData]
624
622
  );
625
623
  if (!n || !o) {
626
624
  const l = "[AppShell] No routes configured. Either use the appShellRoutes() vite-plugin for automatic page configuration, or pass the 'modules' prop for manual configuration.";
627
- return console.error(l), /* @__PURE__ */ a("div", { className: "astw:flex astw:min-h-screen astw:items-center astw:justify-center astw:bg-background astw:p-4", children: /* @__PURE__ */ c("div", { className: "astw:max-w-md astw:rounded-lg astw:border astw:border-destructive/50 astw:bg-destructive/10 astw:p-6 astw:text-center", children: [
625
+ return console.error(l), /* @__PURE__ */ a("div", { className: "astw:flex astw:min-h-screen astw:items-center astw:justify-center astw:bg-background astw:p-4", children: /* @__PURE__ */ d("div", { className: "astw:max-w-md astw:rounded-lg astw:border astw:border-destructive/50 astw:bg-destructive/10 astw:p-6 astw:text-center", children: [
628
626
  /* @__PURE__ */ a("h1", { className: "astw:mb-2 astw:text-lg astw:font-semibold astw:text-destructive", children: "Configuration Error" }),
629
627
  /* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground", children: l })
630
628
  ] }) });
631
629
  }
632
- return e ? /* @__PURE__ */ a(dt.Provider, { value: o, children: /* @__PURE__ */ a(ut.Provider, { value: i, children: /* @__PURE__ */ a(Ze, { defaultTheme: "system", storageKey: "appshell-ui-theme", children: /* @__PURE__ */ a(Qe, { rootComponent: t.rootComponent, children: t.children }) }) }) }) : null;
630
+ return e ? /* @__PURE__ */ a(ne.Provider, { value: o, children: /* @__PURE__ */ a(re.Provider, { value: i, children: /* @__PURE__ */ a(rn, { defaultTheme: "system", storageKey: "appshell-ui-theme", children: /* @__PURE__ */ a(sn, { rootComponent: t.rootComponent, children: t.children }) }) }) }) : null;
633
631
  };
634
- function oa(t) {
635
- const e = ra(t), s = e.find((o) => o.path === ""), n = e.filter((o) => o.path !== "");
632
+ function pn(t) {
633
+ const e = mn(t), s = e.find((o) => o.path === ""), n = e.filter((o) => o.path !== "");
636
634
  return (o) => /* @__PURE__ */ a(
637
- ee,
635
+ sa,
638
636
  {
639
637
  ...o,
640
638
  modules: n,
@@ -642,40 +640,40 @@ function oa(t) {
642
640
  }
643
641
  );
644
642
  }
645
- ee.WithPages = oa;
646
- const tt = 768;
647
- function ia() {
648
- const [t, e] = g.useState(void 0);
649
- return g.useEffect(() => {
650
- const s = window.matchMedia(`(max-width: ${tt - 1}px)`), n = () => {
651
- e(window.innerWidth < tt);
643
+ sa.WithPages = pn;
644
+ const Kt = 768;
645
+ function hn() {
646
+ const [t, e] = N.useState(void 0);
647
+ return N.useEffect(() => {
648
+ const s = window.matchMedia(`(max-width: ${Kt - 1}px)`), n = () => {
649
+ e(window.innerWidth < Kt);
652
650
  };
653
- return s.addEventListener("change", n), e(window.innerWidth < tt), () => s.removeEventListener("change", n);
651
+ return s.addEventListener("change", n), e(window.innerWidth < Kt), () => s.removeEventListener("change", n);
654
652
  }, []), !!t;
655
653
  }
656
- const et = 768, at = 1199;
657
- function la() {
658
- const [t, e] = g.useState(void 0);
659
- return g.useEffect(() => {
654
+ const Yt = 768, qt = 1199;
655
+ function fn() {
656
+ const [t, e] = N.useState(void 0);
657
+ return N.useEffect(() => {
660
658
  const s = window.matchMedia(
661
- `(min-width: ${et}px) and (max-width: ${at}px)`
659
+ `(min-width: ${Yt}px) and (max-width: ${qt}px)`
662
660
  ), n = () => {
663
661
  e(
664
- window.innerWidth >= et && window.innerWidth <= at
662
+ window.innerWidth >= Yt && window.innerWidth <= qt
665
663
  );
666
664
  };
667
665
  return s.addEventListener("change", n), e(
668
- window.innerWidth >= et && window.innerWidth <= at
666
+ window.innerWidth >= Yt && window.innerWidth <= qt
669
667
  ), () => s.removeEventListener("change", n);
670
668
  }, []), !!t;
671
669
  }
672
- function ca({ className: t, type: e, ...s }) {
670
+ function gn({ className: t, type: e, ...s }) {
673
671
  return /* @__PURE__ */ a(
674
672
  "input",
675
673
  {
676
674
  type: e,
677
675
  "data-slot": "input",
678
- className: m(
676
+ className: c(
679
677
  "astw:file:text-foreground astw:placeholder:text-muted-foreground astw:selection:bg-primary astw:selection:text-primary-foreground astw:dark:bg-input/30 astw:border-input astw:flex astw:h-9 astw:w-full astw:min-w-0 astw:rounded-md astw:border astw:bg-transparent astw:px-3 astw:py-1 astw:text-base astw:shadow-xs astw:transition-[color,box-shadow] astw:outline-none astw:file:inline-flex astw:file:h-7 astw:file:border-0 astw:file:bg-transparent astw:file:text-sm astw:file:font-medium astw:disabled:pointer-events-none astw:disabled:cursor-not-allowed astw:disabled:opacity-50 astw:md:text-sm",
680
678
  "astw:focus-visible:border-ring astw:focus-visible:ring-ring/50 astw:focus-visible:ring-[3px]",
681
679
  "astw:aria-invalid:ring-destructive/20 astw:dark:aria-invalid:ring-destructive/40 astw:aria-invalid:border-destructive",
@@ -685,7 +683,7 @@ function ca({ className: t, type: e, ...s }) {
685
683
  }
686
684
  );
687
685
  }
688
- function da({
686
+ function bn({
689
687
  className: t,
690
688
  orientation: e = "horizontal",
691
689
  decorative: s = !0,
@@ -698,7 +696,7 @@ function da({
698
696
  role: s ? "none" : "separator",
699
697
  "aria-orientation": s ? void 0 : e,
700
698
  "data-orientation": e,
701
- className: m(
699
+ className: c(
702
700
  "astw:bg-border astw:shrink-0",
703
701
  e === "horizontal" ? "astw:h-px astw:w-full" : "astw:h-full astw:w-px",
704
702
  t
@@ -707,135 +705,195 @@ function da({
707
705
  }
708
706
  );
709
707
  }
710
- function kt({ ...t }) {
711
- return /* @__PURE__ */ a(x.Root, { "data-slot": "sheet", ...t });
708
+ const xn = {
709
+ top: "up",
710
+ right: "right",
711
+ bottom: "down",
712
+ left: "left"
713
+ }, na = N.createContext("right");
714
+ function ra({ side: t = "right", ...e }) {
715
+ return /* @__PURE__ */ a(na.Provider, { value: t, children: /* @__PURE__ */ a(B.Root, { "data-slot": "sheet", swipeDirection: xn[t], ...e }) });
712
716
  }
713
- function ua({ ...t }) {
714
- return /* @__PURE__ */ a(x.Portal, { "data-slot": "sheet-portal", ...t });
717
+ ra.displayName = "Sheet.Root";
718
+ function oa({ ...t }) {
719
+ return /* @__PURE__ */ a(B.Trigger, { "data-slot": "sheet-trigger", ...t });
715
720
  }
716
- function wa({ className: t, ...e }) {
721
+ oa.displayName = "Sheet.Trigger";
722
+ function ia({ ...t }) {
723
+ return /* @__PURE__ */ a(B.Close, { "data-slot": "sheet-close", ...t });
724
+ }
725
+ ia.displayName = "Sheet.Close";
726
+ function la({ ...t }) {
727
+ return /* @__PURE__ */ a(B.Portal, { "data-slot": "sheet-portal", ...t });
728
+ }
729
+ la.displayName = "Sheet.Portal";
730
+ function ca({ className: t, ...e }) {
717
731
  return /* @__PURE__ */ a(
718
- x.Backdrop,
732
+ B.Backdrop,
719
733
  {
720
734
  "data-slot": "sheet-overlay",
721
- className: m(
722
- "astw:data-open:animate-in astw:data-ending-style:animate-out astw:data-ending-style:fade-out-0 astw:data-open:fade-in-0 astw:fixed astw:inset-0 astw:z-50 astw:bg-black/50",
735
+ className: c(
736
+ "astw:data-open:animate-in astw:data-ending-style:animate-out astw:data-ending-style:fade-out-0 astw:data-open:fade-in-0 astw:fill-mode-forwards astw:fixed astw:inset-0 astw:z-50 astw:bg-black/50",
723
737
  t
724
738
  ),
725
739
  ...e
726
740
  }
727
741
  );
728
742
  }
729
- function Rt({
730
- className: t,
731
- children: e,
732
- side: s = "right",
733
- ...n
734
- }) {
735
- return /* @__PURE__ */ c(ua, { children: [
736
- /* @__PURE__ */ a(wa, {}),
737
- /* @__PURE__ */ c(
738
- x.Popup,
743
+ ca.displayName = "Sheet.Overlay";
744
+ function da({ className: t, children: e, ...s }) {
745
+ const n = N.useContext(na);
746
+ return /* @__PURE__ */ d(la, { children: [
747
+ /* @__PURE__ */ a(ca, {}),
748
+ /* @__PURE__ */ a(
749
+ B.Viewport,
739
750
  {
740
- "data-slot": "sheet-content",
741
- className: m(
742
- "astw:bg-background astw:data-open:animate-in astw:data-ending-style:animate-out astw:fixed astw:z-50 astw:flex astw:flex-col astw:gap-4 astw:shadow-lg astw:transition astw:ease-in-out astw:data-ending-style:duration-300 astw:data-open:duration-500",
743
- s === "right" && "astw:data-ending-style:slide-out-to-right astw:data-open:slide-in-from-right astw:inset-y-0 astw:right-0 astw:h-full astw:w-3/4 astw:border-l astw:sm:max-w-sm",
744
- s === "left" && "astw:data-ending-style:slide-out-to-left astw:data-open:slide-in-from-left astw:inset-y-0 astw:left-0 astw:h-full astw:w-3/4 astw:border-r astw:sm:max-w-sm",
745
- s === "top" && "astw:data-ending-style:slide-out-to-top astw:data-open:slide-in-from-top astw:inset-x-0 astw:top-0 astw:h-auto astw:border-b",
746
- s === "bottom" && "astw:data-ending-style:slide-out-to-bottom astw:data-open:slide-in-from-bottom astw:inset-x-0 astw:bottom-0 astw:h-auto astw:border-t",
747
- t
751
+ "data-slot": "sheet-viewport",
752
+ className: c(
753
+ "astw:fixed astw:inset-0 astw:z-50 astw:flex",
754
+ n === "right" && "astw:items-stretch astw:justify-end",
755
+ n === "left" && "astw:items-stretch astw:justify-start",
756
+ n === "top" && "astw:items-start astw:justify-stretch",
757
+ n === "bottom" && "astw:items-end astw:justify-stretch"
748
758
  ),
749
- ...n,
750
- children: [
751
- e,
752
- /* @__PURE__ */ c(x.Close, { className: "astw:ring-offset-bg astw:focus:ring-ring astw:data-open:bg-secondary astw:absolute astw:top-4 astw:right-4 astw:rounded-xs astw:opacity-70 astw:transition-opacity astw:hover:opacity-100 astw:focus:ring-2 astw:focus:ring-offset-2 astw:focus:outline-hidden astw:disabled:pointer-events-none", children: [
753
- /* @__PURE__ */ a(Wt, { className: "astw:size-4" }),
754
- /* @__PURE__ */ a("span", { className: "astw:sr-only", children: "Close" })
755
- ] })
756
- ]
759
+ children: /* @__PURE__ */ d(
760
+ B.Popup,
761
+ {
762
+ "data-slot": "sheet-content",
763
+ className: c(
764
+ "astw:bg-background astw:flex astw:flex-col astw:gap-4 astw:shadow-lg astw:transition-transform astw:ease-[cubic-bezier(0.32,0.72,0,1)] astw:duration-[450ms]",
765
+ n === "right" && "astw:h-full astw:w-3/4 astw:border-l astw:sm:max-w-sm astw:[transform:translateX(var(--drawer-swipe-movement-x))] astw:data-ending-style:[transform:translateX(100%)] astw:data-starting-style:[transform:translateX(100%)]",
766
+ n === "left" && "astw:h-full astw:w-3/4 astw:border-r astw:sm:max-w-sm astw:[transform:translateX(var(--drawer-swipe-movement-x))] astw:data-ending-style:[transform:translateX(-100%)] astw:data-starting-style:[transform:translateX(-100%)]",
767
+ n === "top" && "astw:w-full astw:h-auto astw:border-b astw:[transform:translateY(var(--drawer-swipe-movement-y))] astw:data-ending-style:[transform:translateY(-100%)] astw:data-starting-style:[transform:translateY(-100%)]",
768
+ n === "bottom" && "astw:w-full astw:h-auto astw:border-t astw:[transform:translateY(var(--drawer-swipe-movement-y))] astw:data-ending-style:[transform:translateY(100%)] astw:data-starting-style:[transform:translateY(100%)]",
769
+ "astw:data-swiping:select-none",
770
+ t
771
+ ),
772
+ ...s,
773
+ children: [
774
+ /* @__PURE__ */ a(B.Content, { "data-slot": "sheet-inner-content", className: "astw:contents", children: e }),
775
+ /* @__PURE__ */ d(B.Close, { className: "astw:ring-offset-bg astw:focus:ring-ring astw:data-open:bg-secondary astw:absolute astw:top-4 astw:right-4 astw:rounded-xs astw:opacity-70 astw:transition-opacity astw:hover:opacity-100 astw:focus:ring-2 astw:focus:ring-offset-2 astw:focus:outline-hidden astw:disabled:pointer-events-none", children: [
776
+ /* @__PURE__ */ a(gt, { className: "astw:size-4" }),
777
+ /* @__PURE__ */ a("span", { className: "astw:sr-only", children: "Close" })
778
+ ] })
779
+ ]
780
+ }
781
+ )
757
782
  }
758
783
  )
759
784
  ] });
760
785
  }
761
- function Pt({ className: t, ...e }) {
786
+ da.displayName = "Sheet.Content";
787
+ function ua({ className: t, ...e }) {
762
788
  return /* @__PURE__ */ a(
763
789
  "div",
764
790
  {
765
791
  "data-slot": "sheet-header",
766
- className: m("astw:flex astw:flex-col astw:gap-1.5 astw:p-4", t),
792
+ className: c("astw:flex astw:flex-col astw:gap-1.5 astw:p-4", t),
793
+ ...e
794
+ }
795
+ );
796
+ }
797
+ ua.displayName = "Sheet.Header";
798
+ function wa({ className: t, ...e }) {
799
+ return /* @__PURE__ */ a(
800
+ "div",
801
+ {
802
+ "data-slot": "sheet-footer",
803
+ className: c("astw:mt-auto astw:flex astw:flex-col astw:gap-2 astw:p-4", t),
767
804
  ...e
768
805
  }
769
806
  );
770
807
  }
771
- function At({ className: t, ...e }) {
808
+ wa.displayName = "Sheet.Footer";
809
+ function ma({ className: t, ...e }) {
772
810
  return /* @__PURE__ */ a(
773
- x.Title,
811
+ B.Title,
774
812
  {
775
813
  "data-slot": "sheet-title",
776
- className: m("astw:text-foreground astw:font-semibold", t),
814
+ className: c("astw:text-foreground astw:font-semibold", t),
777
815
  ...e
778
816
  }
779
817
  );
780
818
  }
781
- function Bt({
782
- className: t,
783
- ...e
784
- }) {
819
+ ma.displayName = "Sheet.Title";
820
+ function pa({ className: t, ...e }) {
785
821
  return /* @__PURE__ */ a(
786
- x.Description,
822
+ B.Description,
787
823
  {
788
824
  "data-slot": "sheet-description",
789
- className: m("astw:text-muted-foreground astw:text-sm", t),
825
+ className: c("astw:text-muted-foreground astw:text-sm", t),
790
826
  ...e
791
827
  }
792
828
  );
793
829
  }
794
- function ht({
795
- delayDuration: t = 0,
796
- children: e,
797
- ...s
798
- }) {
799
- return /* @__PURE__ */ a(A.Provider, { "data-slot": "tooltip-provider", delay: t, ...s, children: e });
830
+ pa.displayName = "Sheet.Description";
831
+ const $ = {
832
+ Root: ra,
833
+ Trigger: oa,
834
+ Close: ia,
835
+ Content: da,
836
+ Header: ua,
837
+ Footer: wa,
838
+ Title: ma,
839
+ Description: pa
840
+ };
841
+ function ha({ delay: t = 0, children: e, ...s }) {
842
+ return /* @__PURE__ */ a(q.Provider, { "data-slot": "tooltip-provider", delay: t, ...s, children: e });
800
843
  }
801
- function pt({ children: t, ...e }) {
802
- return /* @__PURE__ */ a(ht, { children: /* @__PURE__ */ a(A.Root, { "data-slot": "tooltip", ...e, children: t }) });
844
+ ha.displayName = "Tooltip.Provider";
845
+ function fa({ children: t, ...e }) {
846
+ return /* @__PURE__ */ a(q.Root, { "data-slot": "tooltip", ...e, children: t });
803
847
  }
804
- function ft({ ...t }) {
805
- return /* @__PURE__ */ a(A.Trigger, { "data-slot": "tooltip-trigger", ...t });
848
+ fa.displayName = "Tooltip.Root";
849
+ function ga({ ...t }) {
850
+ return /* @__PURE__ */ a(q.Trigger, { "data-slot": "tooltip-trigger", ...t });
806
851
  }
807
- function gt({
852
+ ga.displayName = "Tooltip.Trigger";
853
+ function ba({
808
854
  className: t,
809
- sideOffset: e = 0,
810
- side: s = "top",
811
- align: n = "center",
812
- children: r,
813
- ...o
855
+ position: e,
856
+ side: s,
857
+ align: n,
858
+ sideOffset: r,
859
+ children: o,
860
+ ...i
814
861
  }) {
815
- return /* @__PURE__ */ a(A.Portal, { children: /* @__PURE__ */ a(A.Positioner, { sideOffset: e, side: s, align: n, children: /* @__PURE__ */ c(
816
- A.Popup,
862
+ const l = e ?? {
863
+ side: s,
864
+ align: n,
865
+ sideOffset: r
866
+ }, { side: m = "top", align: u = "center", sideOffset: w = 5 } = l;
867
+ return /* @__PURE__ */ a(q.Portal, { children: /* @__PURE__ */ a(q.Positioner, { sideOffset: w, side: m, align: u, children: /* @__PURE__ */ d(
868
+ q.Popup,
817
869
  {
818
870
  "data-slot": "tooltip-content",
819
- className: m(
820
- "astw:bg-primary astw:text-primary-foreground astw:animate-in astw:fade-in-0 astw:zoom-in-95 astw:data-ending-style:animate-out astw:data-ending-style:fade-out-0 astw:data-ending-style:zoom-out-95 astw:data-[side=bottom]:slide-in-from-top-2 astw:data-[side=left]:slide-in-from-right-2 astw:data-[side=right]:slide-in-from-left-2 astw:data-[side=top]:slide-in-from-bottom-2 astw:z-50 astw:w-fit astw:origin-(--transform-origin) astw:rounded-md astw:px-3 astw:py-1.5 astw:text-xs astw:text-balance",
871
+ className: c(
872
+ "astw:bg-primary astw:text-primary-foreground astw:animate-in astw:fade-in-0 astw:zoom-in-95 astw:data-ending-style:animate-out astw:data-ending-style:fade-out-0 astw:data-ending-style:zoom-out-95 astw:data-[side=bottom]:slide-in-from-top-2 astw:data-[side=left]:slide-in-from-right-2 astw:data-[side=right]:slide-in-from-left-2 astw:data-[side=top]:slide-in-from-bottom-2 astw:z-50 astw:w-fit astw:overflow-visible astw:origin-(--transform-origin) astw:rounded-md astw:px-3 astw:py-1.5 astw:text-xs astw:text-balance",
821
873
  t
822
874
  ),
823
- ...o,
875
+ ...i,
824
876
  children: [
825
- r,
826
- /* @__PURE__ */ a(A.Arrow, { className: "astw:bg-primary astw:fill-primary astw:z-50 astw:size-2.5 astw:translate-y-[calc(-50%_-_2px)] astw:rotate-45 astw:rounded-[2px]" })
877
+ o,
878
+ /* @__PURE__ */ a(q.Arrow, { className: "astw:size-2.5 astw:rotate-45 astw:bg-primary astw:data-[side=top]:-bottom-1 astw:data-[side=bottom]:-top-1 astw:data-[side=left]:-right-1 astw:data-[side=right]:-left-1" })
827
879
  ]
828
880
  }
829
881
  ) }) });
830
882
  }
831
- const ae = "16rem", ma = "18rem", ha = "3rem", pa = "b", se = g.createContext(null);
832
- function H() {
833
- const t = g.useContext(se);
883
+ ba.displayName = "Tooltip.Content";
884
+ const z = {
885
+ Root: fa,
886
+ Trigger: ga,
887
+ Content: ba,
888
+ Provider: ha
889
+ }, xa = "16rem", vn = "18rem", yn = "3rem", Nn = "b", va = N.createContext(null);
890
+ function it() {
891
+ const t = N.useContext(va);
834
892
  if (!t)
835
893
  throw new Error("useSidebar must be used within a SidebarProvider.");
836
894
  return t;
837
895
  }
838
- function fa({
896
+ function Cn({
839
897
  defaultOpen: t = !0,
840
898
  open: e,
841
899
  onOpenChange: s,
@@ -844,55 +902,55 @@ function fa({
844
902
  children: o,
845
903
  ...i
846
904
  }) {
847
- const l = ia(), u = la(), [d, w] = g.useState(!1), [h, f] = g.useState(!1), [b, p] = g.useState(t), v = e ?? b, k = g.useCallback(
848
- (y) => {
849
- const P = typeof y == "function" ? y(v) : y;
850
- s ? s(P) : p(P);
905
+ const l = hn(), m = fn(), [u, w] = N.useState(!1), [p, h] = N.useState(!1), [b, f] = N.useState(t), g = e ?? b, y = N.useCallback(
906
+ (R) => {
907
+ const x = typeof R == "function" ? R(g) : R;
908
+ s ? s(x) : f(x);
851
909
  },
852
- [s, v]
853
- ), R = u && !l, K = g.useCallback(() => l ? w((y) => !y) : R ? f((y) => !y) : k((y) => !y), [l, R, k, w]);
854
- g.useEffect(() => {
855
- const y = (P) => {
856
- P.key === pa && (P.metaKey || P.ctrlKey) && (P.preventDefault(), K());
910
+ [s, g]
911
+ ), v = m && !l, S = N.useCallback(() => l ? w((R) => !R) : v ? h((R) => !R) : y((R) => !R), [l, v, y, w]);
912
+ N.useEffect(() => {
913
+ const R = (x) => {
914
+ x.key === Nn && (x.metaKey || x.ctrlKey) && (x.preventDefault(), S());
857
915
  };
858
- return window.addEventListener("keydown", y), () => window.removeEventListener("keydown", y);
859
- }, [K]);
860
- const Nt = v ? "expanded" : "collapsed", we = g.useMemo(
916
+ return window.addEventListener("keydown", R), () => window.removeEventListener("keydown", R);
917
+ }, [S]);
918
+ const T = g ? "expanded" : "collapsed", P = N.useMemo(
861
919
  () => ({
862
- state: Nt,
863
- open: v,
864
- setOpen: k,
920
+ state: T,
921
+ open: g,
922
+ setOpen: y,
865
923
  isMobile: l,
866
- openMobile: d,
924
+ openMobile: u,
867
925
  setOpenMobile: w,
868
- toggleSidebar: K,
869
- isIconMode: R,
870
- openIconMode: h,
871
- setOpenIconMode: f
926
+ toggleSidebar: S,
927
+ isIconMode: v,
928
+ openIconMode: p,
929
+ setOpenIconMode: h
872
930
  }),
873
931
  [
874
- Nt,
875
- v,
876
- k,
932
+ T,
933
+ g,
934
+ y,
877
935
  l,
878
- d,
936
+ u,
879
937
  w,
880
- K,
881
- R,
882
- h,
883
- f
938
+ S,
939
+ v,
940
+ p,
941
+ h
884
942
  ]
885
943
  );
886
- return /* @__PURE__ */ a(se.Provider, { value: we, children: /* @__PURE__ */ a(ht, { delayDuration: 0, children: /* @__PURE__ */ a(
944
+ return /* @__PURE__ */ a(va.Provider, { value: P, children: /* @__PURE__ */ a(z.Provider, { delay: 0, children: /* @__PURE__ */ a(
887
945
  "div",
888
946
  {
889
947
  "data-slot": "sidebar-wrapper",
890
948
  style: {
891
- "--sidebar-width": ae,
892
- "--sidebar-width-icon": ha,
949
+ "--sidebar-width": xa,
950
+ "--sidebar-width-icon": yn,
893
951
  ...r
894
952
  },
895
- className: m(
953
+ className: c(
896
954
  "astw:group/sidebar-wrapper astw:has-data-[variant=inset]:bg-sidebar astw:flex astw:min-h-svh astw:w-full astw:overflow-hidden",
897
955
  n
898
956
  ),
@@ -901,7 +959,7 @@ function fa({
901
959
  }
902
960
  ) }) });
903
961
  }
904
- function ga({
962
+ function Sn({
905
963
  side: t = "left",
906
964
  variant: e = "sidebar",
907
965
  collapsible: s = "offcanvas",
@@ -909,39 +967,38 @@ function ga({
909
967
  children: r,
910
968
  ...o
911
969
  }) {
912
- const { isMobile: i, state: l, openMobile: u, setOpenMobile: d, isIconMode: w, openIconMode: h, setOpenIconMode: f } = H();
970
+ const { isMobile: i, state: l, openMobile: m, setOpenMobile: u, isIconMode: w, openIconMode: p, setOpenIconMode: h } = it();
913
971
  return s === "none" ? /* @__PURE__ */ a(
914
972
  "div",
915
973
  {
916
974
  "data-slot": "sidebar",
917
- className: m(
975
+ className: c(
918
976
  "astw:bg-sidebar astw:text-sidebar-foreground astw:flex astw:h-full astw:w-(--sidebar-width) astw:flex-col",
919
977
  n
920
978
  ),
921
979
  ...o,
922
980
  children: r
923
981
  }
924
- ) : i ? /* @__PURE__ */ a(kt, { open: u, onOpenChange: d, ...o, children: /* @__PURE__ */ c(
925
- Rt,
982
+ ) : i ? /* @__PURE__ */ a($.Root, { open: m, onOpenChange: u, side: t, ...o, children: /* @__PURE__ */ d(
983
+ $.Content,
926
984
  {
927
985
  "data-sidebar": "sidebar",
928
986
  "data-slot": "sidebar",
929
987
  "data-mobile": "true",
930
988
  className: "astw:bg-sidebar astw:text-sidebar-foreground astw:w-(--sidebar-width) astw:p-0 astw:[&>button]:hidden",
931
989
  style: {
932
- "--sidebar-width": ma
990
+ "--sidebar-width": vn
933
991
  },
934
- side: t,
935
992
  children: [
936
- /* @__PURE__ */ c(Pt, { className: "astw:sr-only", children: [
937
- /* @__PURE__ */ a(At, { children: "Sidebar" }),
938
- /* @__PURE__ */ a(Bt, { children: "Displays the mobile sidebar." })
993
+ /* @__PURE__ */ d($.Header, { className: "astw:sr-only", children: [
994
+ /* @__PURE__ */ a($.Title, { children: "Sidebar" }),
995
+ /* @__PURE__ */ a($.Description, { children: "Displays the mobile sidebar." })
939
996
  ] }),
940
- /* @__PURE__ */ a("div", { className: "flex h-full w-full flex-col", children: r })
997
+ /* @__PURE__ */ a("div", { className: "astw:flex astw:h-full astw:w-full astw:flex-col", children: r })
941
998
  ]
942
999
  }
943
- ) }) : w && s === "icon" ? /* @__PURE__ */ c(S, { children: [
944
- /* @__PURE__ */ c(
1000
+ ) }) : w && s === "icon" ? /* @__PURE__ */ d(M, { children: [
1001
+ /* @__PURE__ */ d(
945
1002
  "div",
946
1003
  {
947
1004
  className: "astw:group astw:peer astw:text-sidebar-foreground astw:hidden astw:md:block",
@@ -955,7 +1012,7 @@ function ga({
955
1012
  "div",
956
1013
  {
957
1014
  "data-slot": "sidebar-gap",
958
- className: m(
1015
+ className: c(
959
1016
  "astw:relative astw:bg-transparent astw:transition-[width] astw:duration-200 astw:ease-linear",
960
1017
  e === "floating" || e === "inset" ? "astw:group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "astw:group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
961
1018
  )
@@ -965,7 +1022,7 @@ function ga({
965
1022
  "div",
966
1023
  {
967
1024
  "data-slot": "sidebar-container",
968
- className: m(
1025
+ className: c(
969
1026
  "astw:fixed astw:inset-y-0 astw:z-10 astw:hidden astw:h-svh astw:transition-[left,right,width] astw:duration-200 astw:ease-linear astw:md:flex",
970
1027
  t === "left" ? "astw:left-0" : "astw:right-0",
971
1028
  e === "floating" || e === "inset" ? "astw:p-2 astw:group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "astw:group-data-[collapsible=icon]:w-(--sidebar-width-icon) astw:group-data-[side=left]:border-r astw:group-data-[side=right]:border-l",
@@ -985,27 +1042,26 @@ function ga({
985
1042
  ]
986
1043
  }
987
1044
  ),
988
- /* @__PURE__ */ a(kt, { open: h, onOpenChange: f, ...o, children: /* @__PURE__ */ c(
989
- Rt,
1045
+ /* @__PURE__ */ a($.Root, { open: p, onOpenChange: h, side: t, ...o, children: /* @__PURE__ */ d(
1046
+ $.Content,
990
1047
  {
991
1048
  "data-sidebar": "sidebar",
992
1049
  "data-slot": "sidebar-overlay",
993
1050
  "data-icon-mode": "true",
994
1051
  className: "astw:bg-sidebar astw:text-sidebar-foreground astw:w-(--sidebar-width) astw:p-0 astw:[&>button]:hidden",
995
1052
  style: {
996
- "--sidebar-width": ae
1053
+ "--sidebar-width": xa
997
1054
  },
998
- side: t,
999
1055
  children: [
1000
- /* @__PURE__ */ c(Pt, { className: "astw:sr-only", children: [
1001
- /* @__PURE__ */ a(At, { children: "Sidebar" }),
1002
- /* @__PURE__ */ a(Bt, { children: "Displays the sidebar overlay." })
1056
+ /* @__PURE__ */ d($.Header, { className: "astw:sr-only", children: [
1057
+ /* @__PURE__ */ a($.Title, { children: "Sidebar" }),
1058
+ /* @__PURE__ */ a($.Description, { children: "Displays the sidebar overlay." })
1003
1059
  ] }),
1004
- /* @__PURE__ */ a("div", { className: "flex h-full w-full flex-col", children: r })
1060
+ /* @__PURE__ */ a("div", { className: "astw:flex astw:h-full astw:w-full astw:flex-col", children: r })
1005
1061
  ]
1006
1062
  }
1007
1063
  ) })
1008
- ] }) : /* @__PURE__ */ c(
1064
+ ] }) : /* @__PURE__ */ d(
1009
1065
  "div",
1010
1066
  {
1011
1067
  className: "astw:group astw:peer astw:text-sidebar-foreground astw:hidden astw:md:block",
@@ -1019,7 +1075,7 @@ function ga({
1019
1075
  "div",
1020
1076
  {
1021
1077
  "data-slot": "sidebar-gap",
1022
- className: m(
1078
+ className: c(
1023
1079
  "astw:relative astw:w-(--sidebar-width) astw:bg-transparent astw:transition-[width] astw:duration-200 astw:ease-linear",
1024
1080
  "astw:group-data-[collapsible=offcanvas]:w-0",
1025
1081
  "astw:group-data-[side=right]:rotate-180",
@@ -1031,7 +1087,7 @@ function ga({
1031
1087
  "div",
1032
1088
  {
1033
1089
  "data-slot": "sidebar-container",
1034
- className: m(
1090
+ className: c(
1035
1091
  "astw:fixed astw:inset-y-0 astw:z-10 astw:hidden astw:h-svh astw:w-(--sidebar-width) astw:transition-[left,right,width] astw:duration-200 astw:ease-linear astw:md:flex",
1036
1092
  t === "left" ? "astw:left-0 astw:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "astw:right-0 astw:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
1037
1093
  // Adjust the padding for floating and inset variants.
@@ -1055,33 +1111,33 @@ function ga({
1055
1111
  }
1056
1112
  );
1057
1113
  }
1058
- function ne({ className: t, onClick: e, ...s }) {
1059
- const { toggleSidebar: n } = H();
1060
- return /* @__PURE__ */ c(
1061
- O,
1114
+ function ya({ className: t, onClick: e, ...s }) {
1115
+ const { toggleSidebar: n } = it();
1116
+ return /* @__PURE__ */ d(
1117
+ wt,
1062
1118
  {
1063
1119
  "data-sidebar": "trigger",
1064
1120
  "data-slot": "sidebar-trigger",
1065
1121
  variant: "ghost",
1066
1122
  size: "icon",
1067
- className: m("astw:text-muted-foreground", t),
1123
+ className: c("astw:text-muted-foreground", t),
1068
1124
  onClick: (r) => {
1069
1125
  e?.(r), n();
1070
1126
  },
1071
1127
  ...s,
1072
1128
  children: [
1073
- /* @__PURE__ */ a(Re, { className: "astw:size-4.5" }),
1129
+ /* @__PURE__ */ a(Ds, { className: "astw:size-4.5" }),
1074
1130
  /* @__PURE__ */ a("span", { className: "astw:sr-only", children: "Toggle Sidebar" })
1075
1131
  ]
1076
1132
  }
1077
1133
  );
1078
1134
  }
1079
- function ba({ className: t, ...e }) {
1135
+ function Tn({ className: t, ...e }) {
1080
1136
  return /* @__PURE__ */ a(
1081
1137
  "main",
1082
1138
  {
1083
1139
  "data-slot": "sidebar-inset",
1084
- className: m(
1140
+ className: c(
1085
1141
  "astw:bg-background astw:relative astw:flex astw:w-full astw:flex-1 astw:flex-col",
1086
1142
  "astw:px-4 astw:md:peer-data-[variant=inset]:px-8 astw:md:peer-data-[variant=inset]:py-2",
1087
1143
  // astw:md:peer-data-[variant=inset]:peer-data-[state=collapsed]:pl-2
@@ -1091,35 +1147,35 @@ function ba({ className: t, ...e }) {
1091
1147
  }
1092
1148
  );
1093
1149
  }
1094
- function va({ className: t, ...e }) {
1150
+ function In({ className: t, ...e }) {
1095
1151
  return /* @__PURE__ */ a(
1096
1152
  "div",
1097
1153
  {
1098
1154
  "data-slot": "sidebar-header",
1099
1155
  "data-sidebar": "header",
1100
- className: m("astw:flex astw:flex-row astw:items-center astw:gap-0.5 astw:p-2", t),
1156
+ className: c("astw:flex astw:flex-row astw:items-center astw:gap-0.5 astw:p-2", t),
1101
1157
  ...e
1102
1158
  }
1103
1159
  );
1104
1160
  }
1105
- function xa({ className: t, ...e }) {
1161
+ function Rn({ className: t, ...e }) {
1106
1162
  return /* @__PURE__ */ a(
1107
- da,
1163
+ bn,
1108
1164
  {
1109
1165
  "data-slot": "sidebar-separator",
1110
1166
  "data-sidebar": "separator",
1111
- className: m("astw:bg-sidebar-border astw:mx-2 astw:w-auto", t),
1167
+ className: c("astw:bg-sidebar-border astw:mx-2 astw:w-auto", t),
1112
1168
  ...e
1113
1169
  }
1114
1170
  );
1115
1171
  }
1116
- function ya({ className: t, ...e }) {
1172
+ function kn({ className: t, ...e }) {
1117
1173
  return /* @__PURE__ */ a(
1118
1174
  "div",
1119
1175
  {
1120
1176
  "data-slot": "sidebar-content",
1121
1177
  "data-sidebar": "content",
1122
- className: m(
1178
+ className: c(
1123
1179
  "astw:flex astw:min-h-0 astw:flex-1 astw:flex-col astw:gap-2 astw:overflow-auto astw:group-data-[collapsible=icon]:overflow-hidden",
1124
1180
  t
1125
1181
  ),
@@ -1127,13 +1183,13 @@ function ya({ className: t, ...e }) {
1127
1183
  }
1128
1184
  );
1129
1185
  }
1130
- function bt({ className: t, ...e }) {
1186
+ function le({ className: t, ...e }) {
1131
1187
  return /* @__PURE__ */ a(
1132
1188
  "div",
1133
1189
  {
1134
1190
  "data-slot": "sidebar-group",
1135
1191
  "data-sidebar": "group",
1136
- className: m(
1192
+ className: c(
1137
1193
  "astw:relative astw:flex astw:w-full astw:min-w-0 astw:flex-col astw:p-2",
1138
1194
  t
1139
1195
  ),
@@ -1141,29 +1197,29 @@ function bt({ className: t, ...e }) {
1141
1197
  }
1142
1198
  );
1143
1199
  }
1144
- function vt({ className: t, ...e }) {
1200
+ function ce({ className: t, ...e }) {
1145
1201
  return /* @__PURE__ */ a(
1146
1202
  "ul",
1147
1203
  {
1148
1204
  "data-slot": "sidebar-menu",
1149
1205
  "data-sidebar": "menu",
1150
- className: m("astw:flex astw:w-full astw:min-w-0 astw:flex-col astw:gap-1", t),
1206
+ className: c("astw:flex astw:w-full astw:min-w-0 astw:flex-col astw:gap-1", t),
1151
1207
  ...e
1152
1208
  }
1153
1209
  );
1154
1210
  }
1155
- function L({ className: t, ...e }) {
1211
+ function et({ className: t, ...e }) {
1156
1212
  return /* @__PURE__ */ a(
1157
1213
  "li",
1158
1214
  {
1159
1215
  "data-slot": "sidebar-menu-item",
1160
1216
  "data-sidebar": "menu-item",
1161
- className: m("astw:group/menu-item astw:relative", t),
1217
+ className: c("astw:group/menu-item astw:relative", t),
1162
1218
  ...e
1163
1219
  }
1164
1220
  );
1165
1221
  }
1166
- const Na = it(
1222
+ const Ln = ee(
1167
1223
  "astw:peer/menu-button astw:flex astw:w-full astw:items-center astw:gap-2 astw:overflow-hidden astw:rounded-md astw:p-2 astw:text-left astw:text-sm astw:outline-hidden astw:ring-sidebar-ring astw:transition-[width,height,padding] astw:hover:bg-sidebar-accent astw:hover:text-sidebar-accent-foreground astw:focus-visible:ring-2 astw:active:bg-sidebar-accent astw:active:text-sidebar-accent-foreground astw:disabled:pointer-events-none astw:disabled:opacity-50 astw:group-has-data-[sidebar=menu-action]/menu-item:pr-8 astw:aria-disabled:pointer-events-none astw:aria-disabled:opacity-50 astw:data-[active=true]:bg-sidebar-accent astw:data-[active=true]:font-medium astw:data-[active=true]:text-sidebar-accent-foreground astw:data-[state=open]:hover:bg-sidebar-accent astw:data-[state=open]:hover:text-sidebar-accent-foreground astw:group-data-[collapsible=icon]:size-8! astw:group-data-[collapsible=icon]:p-2! astw:[&>span:last-child]:truncate astw:group-data-[collapsible=icon]:[&>span:last-child]:hidden astw:[&>svg]:size-4 astw:[&>svg]:shrink-0",
1168
1224
  {
1169
1225
  variants: {
@@ -1183,7 +1239,7 @@ const Na = it(
1183
1239
  }
1184
1240
  }
1185
1241
  );
1186
- function _({
1242
+ function at({
1187
1243
  render: t,
1188
1244
  isActive: e = !1,
1189
1245
  variant: s = "default",
@@ -1191,9 +1247,15 @@ function _({
1191
1247
  tooltip: r,
1192
1248
  className: o,
1193
1249
  children: i,
1194
- ...l
1250
+ onClick: l,
1251
+ ...m
1195
1252
  }) {
1196
- const { isMobile: u, state: d } = H(), w = j({
1253
+ const { isMobile: u, state: w, setOpenMobile: p, openIconMode: h, setOpenIconMode: b } = it(), f = N.useCallback(
1254
+ (y) => {
1255
+ l?.(y), !y.defaultPrevented && (u ? p(!1) : h && b(!1));
1256
+ },
1257
+ [l, u, p, h, b]
1258
+ ), g = ft({
1197
1259
  defaultTagName: "button",
1198
1260
  render: t,
1199
1261
  props: {
@@ -1201,40 +1263,40 @@ function _({
1201
1263
  "data-sidebar": "menu-button",
1202
1264
  "data-size": n,
1203
1265
  "data-active": e,
1204
- className: m(Na({ variant: s, size: n }), o),
1266
+ className: c(Ln({ variant: s, size: n }), o),
1267
+ onClick: f,
1205
1268
  children: i,
1206
- ...l
1269
+ ...m
1207
1270
  }
1208
1271
  });
1209
1272
  return r ? (typeof r == "string" && (r = {
1210
1273
  children: r
1211
- }), /* @__PURE__ */ c(pt, { children: [
1212
- /* @__PURE__ */ a(ft, { render: w }),
1274
+ }), /* @__PURE__ */ d(z.Root, { children: [
1275
+ /* @__PURE__ */ a(z.Trigger, { render: g }),
1213
1276
  /* @__PURE__ */ a(
1214
- gt,
1277
+ z.Content,
1215
1278
  {
1216
- side: "right",
1217
- align: "center",
1218
- hidden: d !== "collapsed" || u,
1279
+ position: { side: "right", align: "center" },
1280
+ hidden: w !== "collapsed" || u,
1219
1281
  ...r
1220
1282
  }
1221
1283
  )
1222
- ] })) : w;
1284
+ ] })) : g;
1223
1285
  }
1224
- function Y({
1286
+ function Pt({
1225
1287
  className: t,
1226
1288
  render: e,
1227
1289
  showOnHover: s = !1,
1228
1290
  children: n,
1229
1291
  ...r
1230
1292
  }) {
1231
- return j({
1293
+ return ft({
1232
1294
  defaultTagName: "button",
1233
1295
  render: e,
1234
1296
  props: {
1235
1297
  "data-slot": "sidebar-menu-action",
1236
1298
  "data-sidebar": "menu-action",
1237
- className: m(
1299
+ className: c(
1238
1300
  "astw:text-sidebar-foreground astw:ring-sidebar-ring astw:hover:bg-sidebar-accent astw:hover:text-sidebar-accent-foreground astw:peer-hover/menu-button:text-sidebar-accent-foreground astw:absolute astw:top-1.5 astw:right-1 astw:flex astw:aspect-square astw:w-5 astw:items-center astw:justify-center astw:rounded-md astw:p-0 astw:outline-hidden astw:transition-transform astw:focus-visible:ring-2 astw:[&>svg]:size-4 astw:[&>svg]:shrink-0",
1239
1301
  // Increases the hit area of the button on mobile.
1240
1302
  "astw:after:absolute astw:after:-inset-2 astw:md:after:hidden",
@@ -1250,13 +1312,13 @@ function Y({
1250
1312
  }
1251
1313
  });
1252
1314
  }
1253
- function st({ className: t, ...e }) {
1315
+ function Qt({ className: t, ...e }) {
1254
1316
  return /* @__PURE__ */ a(
1255
1317
  "ul",
1256
1318
  {
1257
1319
  "data-slot": "sidebar-menu-sub",
1258
1320
  "data-sidebar": "menu-sub",
1259
- className: m(
1321
+ className: c(
1260
1322
  "astw:border-sidebar-border astw:ml-3.5 astw:mr-0 astw:flex astw:min-w-0 astw:translate-x-px astw:flex-col astw:gap-1 astw:border-l astw:pl-2.5 astw:pr-0 astw:py-0.5",
1261
1323
  "astw:group-data-[collapsible=icon]:hidden",
1262
1324
  t
@@ -1265,26 +1327,33 @@ function st({ className: t, ...e }) {
1265
1327
  }
1266
1328
  );
1267
1329
  }
1268
- function Sa({ className: t, ...e }) {
1330
+ function Pn({ className: t, ...e }) {
1269
1331
  return /* @__PURE__ */ a(
1270
1332
  "li",
1271
1333
  {
1272
1334
  "data-slot": "sidebar-menu-sub-item",
1273
1335
  "data-sidebar": "menu-sub-item",
1274
- className: m("astw:group/menu-sub-item astw:relative", t),
1336
+ className: c("astw:group/menu-sub-item astw:relative", t),
1275
1337
  ...e
1276
1338
  }
1277
1339
  );
1278
1340
  }
1279
- function Ca({
1341
+ function An({
1280
1342
  render: t,
1281
1343
  size: e = "md",
1282
1344
  isActive: s = !1,
1283
1345
  className: n,
1284
1346
  children: r,
1285
- ...o
1347
+ onClick: o,
1348
+ ...i
1286
1349
  }) {
1287
- return j({
1350
+ const { isMobile: l, setOpenMobile: m, openIconMode: u, setOpenIconMode: w } = it(), p = N.useCallback(
1351
+ (h) => {
1352
+ o?.(h), !h.defaultPrevented && (l ? m(!1) : u && w(!1));
1353
+ },
1354
+ [o, l, m, u, w]
1355
+ );
1356
+ return ft({
1288
1357
  defaultTagName: "a",
1289
1358
  render: t,
1290
1359
  props: {
@@ -1292,7 +1361,8 @@ function Ca({
1292
1361
  "data-sidebar": "menu-sub-button",
1293
1362
  "data-size": e,
1294
1363
  "data-active": s,
1295
- className: m(
1364
+ onClick: p,
1365
+ className: c(
1296
1366
  "astw:text-sidebar-foreground astw:ring-sidebar-ring astw:hover:bg-sidebar-accent astw:hover:text-sidebar-accent-foreground astw:active:bg-sidebar-accent astw:active:text-sidebar-accent-foreground astw:[&>svg]:text-sidebar-accent-foreground astw:flex astw:h-7 astw:min-w-0 astw:-translate-x-px astw:items-center astw:gap-2 astw:overflow-hidden astw:rounded-md astw:px-2 astw:outline-hidden astw:focus-visible:ring-2 astw:disabled:pointer-events-none astw:disabled:opacity-50 astw:aria-disabled:pointer-events-none astw:aria-disabled:opacity-50 astw:[&>span:last-child]:truncate astw:group-data-[collapsible=icon]:[&>span:last-child]:hidden astw:[&>svg]:size-4 astw:[&>svg]:shrink-0",
1297
1367
  "astw:data-[active=true]:bg-sidebar-accent astw:data-[active=true]:text-sidebar-accent-foreground",
1298
1368
  e === "sm" && "astw:text-xs",
@@ -1301,50 +1371,50 @@ function Ca({
1301
1371
  n
1302
1372
  ),
1303
1373
  children: r,
1304
- ...o
1374
+ ...i
1305
1375
  }
1306
1376
  });
1307
1377
  }
1308
- const Ta = (t) => {
1309
- const { configurations: e } = C(), { modules: s, locale: n } = e;
1310
- return ka(t) ? null : Ra(t, s, n);
1311
- }, ka = (t) => t.startsWith("http://") || t.startsWith("https://"), Ra = (t, e, s) => {
1312
- const n = U(s), r = Dt(t);
1378
+ const Mn = (t) => {
1379
+ const { configurations: e } = K(), { modules: s, locale: n } = e;
1380
+ return Vn(t) ? null : Dn(t, s, n);
1381
+ }, Vn = (t) => t.startsWith("http://") || t.startsWith("https://"), Dn = (t, e, s) => {
1382
+ const n = bt(s), r = De(t);
1313
1383
  for (const o of e) {
1314
- const i = Dt(o.path);
1315
- if (re(r, i))
1384
+ const i = De(o.path);
1385
+ if (Na(r, i))
1316
1386
  return {
1317
1387
  title: n(o.meta.title, o.path),
1318
1388
  icon: o.meta.icon
1319
1389
  };
1320
- const l = oe(r, i, o.resources, n);
1390
+ const l = Ca(r, i, o.resources, n);
1321
1391
  if (l)
1322
1392
  return l;
1323
1393
  }
1324
1394
  return null;
1325
- }, re = (t, e) => {
1395
+ }, Na = (t, e) => {
1326
1396
  if (t === e) return !0;
1327
1397
  const s = t.split("/"), n = e.split("/");
1328
1398
  return s.length !== n.length ? !1 : n.every((r, o) => r.startsWith(":") || r === s[o]);
1329
- }, Dt = (t) => {
1399
+ }, De = (t) => {
1330
1400
  let e = t;
1331
1401
  return e.startsWith("/") || (e = `/${e}`), e.length > 1 && e.endsWith("/") && (e = e.slice(0, -1)), e;
1332
- }, oe = (t, e, s, n) => {
1402
+ }, Ca = (t, e, s, n) => {
1333
1403
  for (const r of s) {
1334
1404
  const o = `${e}/${r.path}`;
1335
- if (re(t, o))
1405
+ if (Na(t, o))
1336
1406
  return {
1337
1407
  title: n(r.meta.title, r.path),
1338
1408
  icon: r.meta.icon
1339
1409
  };
1340
1410
  if (r.subResources) {
1341
- const i = oe(t, o, r.subResources, n);
1411
+ const i = Ca(t, o, r.subResources, n);
1342
1412
  if (i)
1343
1413
  return i;
1344
1414
  }
1345
1415
  }
1346
1416
  return null;
1347
- }, Qs = (t) => {
1417
+ }, xo = (t) => {
1348
1418
  const {
1349
1419
  to: e,
1350
1420
  external: s,
@@ -1352,14 +1422,14 @@ const Ta = (t) => {
1352
1422
  activeMatch: r = "prefix",
1353
1423
  title: o,
1354
1424
  icon: i
1355
- } = t, { pathname: l } = X(), u = Ta(e), d = r === "exact" ? l === e : l === e || l.startsWith(`${e}/`), w = o ?? u?.title ?? Pa(e), h = i ?? u?.icon, f = {
1425
+ } = t, { pathname: l } = Et(), m = Mn(e), u = r === "exact" ? l === e : l === e || l.startsWith(`${e}/`), w = o ?? m?.title ?? _n(e), p = i ?? m?.icon, h = {
1356
1426
  title: w,
1357
1427
  url: e,
1358
- icon: h,
1359
- isActive: d
1428
+ icon: p,
1429
+ isActive: u
1360
1430
  };
1361
- return s || ie(e) ? /* @__PURE__ */ a(L, { children: /* @__PURE__ */ a(
1362
- _,
1431
+ return s || Sa(e) ? /* @__PURE__ */ a(et, { children: /* @__PURE__ */ a(
1432
+ at,
1363
1433
  {
1364
1434
  render: (
1365
1435
  // oxlint-disable-next-line jsx-a11y/anchor-has-content -- content is provided by SidebarMenuButton's children
@@ -1369,35 +1439,35 @@ const Ta = (t) => {
1369
1439
  href: e,
1370
1440
  target: "_blank",
1371
1441
  rel: "noopener noreferrer",
1372
- className: d ? "astw:bg-sidebar-accent astw:font-medium" : void 0
1442
+ className: u ? "astw:bg-sidebar-accent astw:font-medium" : void 0
1373
1443
  }
1374
1444
  )
1375
1445
  ),
1376
1446
  tooltip: w,
1377
- children: n ? n(f) : /* @__PURE__ */ c(S, { children: [
1378
- h ?? /* @__PURE__ */ a(Ft, { className: "astw:size-4" }),
1447
+ children: n ? n(h) : /* @__PURE__ */ d(M, { children: [
1448
+ p ?? /* @__PURE__ */ a(Ge, { className: "astw:size-4" }),
1379
1449
  /* @__PURE__ */ a("span", { children: w })
1380
1450
  ] })
1381
1451
  }
1382
- ) }) : /* @__PURE__ */ a(L, { children: /* @__PURE__ */ a(
1383
- _,
1452
+ ) }) : /* @__PURE__ */ a(et, { children: /* @__PURE__ */ a(
1453
+ at,
1384
1454
  {
1385
1455
  render: /* @__PURE__ */ a(
1386
- $,
1456
+ dt,
1387
1457
  {
1388
1458
  to: e,
1389
- className: d ? "astw:bg-sidebar-accent astw:font-medium" : void 0
1459
+ className: u ? "astw:bg-sidebar-accent astw:font-medium" : void 0
1390
1460
  }
1391
1461
  ),
1392
1462
  tooltip: w,
1393
- children: n ? n(f) : /* @__PURE__ */ c(S, { children: [
1394
- h,
1463
+ children: n ? n(h) : /* @__PURE__ */ d(M, { children: [
1464
+ p,
1395
1465
  /* @__PURE__ */ a("span", { children: w })
1396
1466
  ] })
1397
1467
  }
1398
1468
  ) });
1399
- }, ie = (t) => t.startsWith("http://") || t.startsWith("https://"), Pa = (t) => {
1400
- if (ie(t))
1469
+ }, Sa = (t) => t.startsWith("http://") || t.startsWith("https://"), _n = (t) => {
1470
+ if (Sa(t))
1401
1471
  try {
1402
1472
  return new URL(t).hostname;
1403
1473
  } catch {
@@ -1405,27 +1475,17 @@ const Ta = (t) => {
1405
1475
  }
1406
1476
  const e = t.split("/").filter(Boolean);
1407
1477
  return (e[e.length - 1] ?? t).split("-").map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join(" ");
1408
- };
1409
- function nt({ ...t }) {
1410
- return /* @__PURE__ */ a(ct.Root, { "data-slot": "collapsible", ...t });
1411
- }
1412
- function Q({ ...t }) {
1413
- return /* @__PURE__ */ a(ct.Trigger, { "data-slot": "collapsible-trigger", ...t });
1414
- }
1415
- function rt({ ...t }) {
1416
- return /* @__PURE__ */ a(ct.Panel, { "data-slot": "collapsible-content", ...t });
1417
- }
1418
- const Xs = (t) => {
1419
- const { title: e, icon: s, to: n, defaultOpen: r = !0, children: o } = t, { pathname: i } = X(), { configurations: l } = C(), u = U(l.locale), d = B(), w = u(e, typeof e == "string" ? e : ""), h = n ? i === n : !1;
1420
- return n ? /* @__PURE__ */ c(nt, { render: /* @__PURE__ */ a(L, {}), defaultOpen: r, children: [
1421
- /* @__PURE__ */ c(
1422
- _,
1478
+ }, vo = (t) => {
1479
+ const { title: e, icon: s, to: n, defaultOpen: r = !0, children: o } = t, { pathname: i } = Et(), { configurations: l } = K(), m = bt(l.locale), u = Q(), w = m(e, typeof e == "string" ? e : ""), p = n ? i === n : !1;
1480
+ return n ? /* @__PURE__ */ d(F.Root, { render: /* @__PURE__ */ a(et, {}), defaultOpen: r, children: [
1481
+ /* @__PURE__ */ d(
1482
+ at,
1423
1483
  {
1424
1484
  render: /* @__PURE__ */ a(
1425
- $,
1485
+ dt,
1426
1486
  {
1427
1487
  to: n,
1428
- className: h ? "astw:bg-sidebar-accent astw:font-medium" : void 0
1488
+ className: p ? "astw:bg-sidebar-accent astw:font-medium" : void 0
1429
1489
  }
1430
1490
  ),
1431
1491
  tooltip: w,
@@ -1435,68 +1495,69 @@ const Xs = (t) => {
1435
1495
  ]
1436
1496
  }
1437
1497
  ),
1438
- /* @__PURE__ */ c(
1439
- Q,
1498
+ /* @__PURE__ */ d(
1499
+ F.Trigger,
1440
1500
  {
1441
- render: /* @__PURE__ */ a(Y, { className: "astw:data-panel-open:rotate-90" }),
1501
+ render: /* @__PURE__ */ a(Pt, { className: "astw:data-panel-open:rotate-90" }),
1442
1502
  children: [
1443
- /* @__PURE__ */ a(W, {}),
1444
- /* @__PURE__ */ a("span", { className: "astw:sr-only", children: d("toggle") })
1503
+ /* @__PURE__ */ a(ut, {}),
1504
+ /* @__PURE__ */ a("span", { className: "astw:sr-only", children: u("toggle") })
1445
1505
  ]
1446
1506
  }
1447
1507
  ),
1448
- /* @__PURE__ */ a(rt, { children: /* @__PURE__ */ a(st, { children: o }) })
1449
- ] }) : /* @__PURE__ */ c(nt, { render: /* @__PURE__ */ a(L, {}), defaultOpen: r, children: [
1450
- /* @__PURE__ */ c(Q, { className: "astw:flex astw:w-full astw:[&[data-panel-open]_.astw-rotate-target]:rotate-90", children: [
1451
- /* @__PURE__ */ c(
1452
- _,
1508
+ /* @__PURE__ */ a(F.Panel, { children: /* @__PURE__ */ a(Qt, { children: o }) })
1509
+ ] }) : /* @__PURE__ */ d(F.Root, { render: /* @__PURE__ */ a(et, {}), defaultOpen: r, children: [
1510
+ /* @__PURE__ */ d(F.Trigger, { className: "astw:flex astw:w-full astw:[&[data-panel-open]_.astw-rotate-target]:rotate-90", children: [
1511
+ /* @__PURE__ */ d(
1512
+ at,
1453
1513
  {
1454
1514
  render: /* @__PURE__ */ a("span", { className: "astw:flex astw:w-full" }),
1455
1515
  tooltip: w,
1516
+ onClick: (h) => h.preventDefault(),
1456
1517
  children: [
1457
1518
  s,
1458
1519
  /* @__PURE__ */ a("span", { children: w })
1459
1520
  ]
1460
1521
  }
1461
1522
  ),
1462
- /* @__PURE__ */ c(Y, { className: "astw-rotate-target", render: /* @__PURE__ */ a("span", {}), children: [
1463
- /* @__PURE__ */ a(W, {}),
1464
- /* @__PURE__ */ a("span", { className: "astw:sr-only", children: d("toggle") })
1523
+ /* @__PURE__ */ d(Pt, { className: "astw-rotate-target", render: /* @__PURE__ */ a("span", {}), children: [
1524
+ /* @__PURE__ */ a(ut, {}),
1525
+ /* @__PURE__ */ a("span", { className: "astw:sr-only", children: u("toggle") })
1465
1526
  ] })
1466
1527
  ] }),
1467
- /* @__PURE__ */ a(rt, { children: /* @__PURE__ */ a(st, { children: o }) })
1528
+ /* @__PURE__ */ a(F.Panel, { children: /* @__PURE__ */ a(Qt, { children: o }) })
1468
1529
  ] });
1469
- }, Zs = () => /* @__PURE__ */ a(xa, {}), Aa = (t) => {
1470
- const { title: e, icon: s } = C(), { pathname: n } = X(), { isIconMode: r } = H(), o = /* @__PURE__ */ c(va, { children: [
1530
+ }, yo = () => /* @__PURE__ */ a(Rn, {}), En = (t) => {
1531
+ const { title: e, icon: s } = K(), { pathname: n } = Et(), { isIconMode: r } = it(), o = /* @__PURE__ */ d(In, { children: [
1471
1532
  s,
1472
- /* @__PURE__ */ a("h1", { className: m("astw:text-sm astw:mb-2 astw:mt-2 astw:px-2", r && "astw:hidden"), children: e })
1533
+ /* @__PURE__ */ a("h1", { className: c("astw:text-sm astw:mb-2 astw:mt-2 astw:px-2", r && "astw:hidden"), children: e })
1473
1534
  ] });
1474
- return /* @__PURE__ */ c(ga, { variant: "inset", collapsible: r ? "icon" : "offcanvas", children: [
1475
- !r && /* @__PURE__ */ c("div", { className: "astw:flex astw:justify-between astw:items-center", children: [
1535
+ return /* @__PURE__ */ d(Sn, { variant: "inset", collapsible: r ? "icon" : "offcanvas", children: [
1536
+ !r && /* @__PURE__ */ d("div", { className: "astw:flex astw:justify-between astw:items-center", children: [
1476
1537
  t.header ?? o,
1477
- /* @__PURE__ */ a("div", { className: "astw:hidden astw:md:block", children: /* @__PURE__ */ a(ne, { className: "astw:-ml-1" }) })
1538
+ /* @__PURE__ */ a("div", { className: "astw:hidden astw:md:block", children: /* @__PURE__ */ a(ya, { className: "astw:-ml-1" }) })
1478
1539
  ] }),
1479
- /* @__PURE__ */ a(ya, { children: t.children ? (
1540
+ /* @__PURE__ */ a(kn, { children: t.children ? (
1480
1541
  // New API: children-based explicit definition
1481
- /* @__PURE__ */ a(bt, { children: /* @__PURE__ */ a(vt, { children: t.children }) })
1542
+ /* @__PURE__ */ a(le, { children: /* @__PURE__ */ a(ce, { children: t.children }) })
1482
1543
  ) : (
1483
1544
  // Existing behavior: auto-generation from resources
1484
- /* @__PURE__ */ a(lt, { fallback: /* @__PURE__ */ a(Ea, {}), children: /* @__PURE__ */ a(Ba, { currentPath: n }) })
1545
+ /* @__PURE__ */ a(se, { fallback: /* @__PURE__ */ a(Fn, {}), children: /* @__PURE__ */ a(Bn, { currentPath: n }) })
1485
1546
  ) }),
1486
1547
  t.footer ?? null
1487
1548
  ] });
1488
- }, Ba = ({ currentPath: t }) => {
1489
- const e = Qt();
1490
- return /* @__PURE__ */ a($t, { resolve: e, children: (s) => /* @__PURE__ */ a(Da, { items: s ?? [], currentPath: t }) });
1491
- }, Da = (t) => {
1492
- const e = B();
1493
- return /* @__PURE__ */ a(bt, { children: /* @__PURE__ */ a(vt, { children: t.items.map((s) => /* @__PURE__ */ c(nt, { render: /* @__PURE__ */ a(L, {}), defaultOpen: !0, children: [
1494
- s.url ? /* @__PURE__ */ c(S, { children: [
1495
- /* @__PURE__ */ c(
1496
- _,
1549
+ }, Bn = ({ currentPath: t }) => {
1550
+ const e = Ze();
1551
+ return /* @__PURE__ */ a(Oe, { resolve: e, children: (s) => /* @__PURE__ */ a(zn, { items: s ?? [], currentPath: t }) });
1552
+ }, zn = (t) => {
1553
+ const e = Q();
1554
+ return /* @__PURE__ */ a(le, { children: /* @__PURE__ */ a(ce, { children: t.items.map((s) => /* @__PURE__ */ d(F.Root, { render: /* @__PURE__ */ a(et, {}), defaultOpen: !0, children: [
1555
+ s.url ? /* @__PURE__ */ d(M, { children: [
1556
+ /* @__PURE__ */ d(
1557
+ at,
1497
1558
  {
1498
1559
  render: /* @__PURE__ */ a(
1499
- $,
1560
+ dt,
1500
1561
  {
1501
1562
  to: s.url,
1502
1563
  className: s.url === t.currentPath ? "astw:bg-sidebar-accent astw:font-medium" : void 0
@@ -1509,38 +1570,43 @@ const Xs = (t) => {
1509
1570
  ]
1510
1571
  }
1511
1572
  ),
1512
- !!s.items?.length && /* @__PURE__ */ c(
1513
- Q,
1573
+ !!s.items?.length && /* @__PURE__ */ d(
1574
+ F.Trigger,
1514
1575
  {
1515
- render: /* @__PURE__ */ a(Y, { className: "astw:data-panel-open:rotate-90" }),
1576
+ render: /* @__PURE__ */ a(Pt, { className: "astw:data-panel-open:rotate-90" }),
1516
1577
  children: [
1517
- /* @__PURE__ */ a(W, {}),
1578
+ /* @__PURE__ */ a(ut, {}),
1518
1579
  /* @__PURE__ */ a("span", { className: "astw:sr-only", children: e("toggle") })
1519
1580
  ]
1520
1581
  }
1521
1582
  )
1522
- ] }) : /* @__PURE__ */ a(S, { children: /* @__PURE__ */ c(Q, { className: "astw:flex astw:w-full astw:[&[data-panel-open]_.astw-rotate-target]:rotate-90", children: [
1523
- /* @__PURE__ */ c(
1524
- _,
1583
+ ] }) : /* @__PURE__ */ a(M, { children: /* @__PURE__ */ d(F.Trigger, { className: "astw:flex astw:w-full astw:[&[data-panel-open]_.astw-rotate-target]:rotate-90", children: [
1584
+ /* @__PURE__ */ d(
1585
+ at,
1525
1586
  {
1526
1587
  render: /* @__PURE__ */ a("span", { className: "astw:flex astw:w-full" }),
1527
1588
  tooltip: s.title,
1589
+ onClick: (n) => (
1590
+ // Prevent SidebarMenuButton's auto-close behavior so the mobile sidebar
1591
+ // stays open when toggling a collapsible group.
1592
+ n.preventDefault()
1593
+ ),
1528
1594
  children: [
1529
1595
  s.icon,
1530
1596
  /* @__PURE__ */ a("span", { children: s.title })
1531
1597
  ]
1532
1598
  }
1533
1599
  ),
1534
- !!s.items?.length && /* @__PURE__ */ c(Y, { className: "astw-rotate-target", render: /* @__PURE__ */ a("span", {}), children: [
1535
- /* @__PURE__ */ a(W, {}),
1600
+ !!s.items?.length && /* @__PURE__ */ d(Pt, { className: "astw-rotate-target", render: /* @__PURE__ */ a("span", {}), children: [
1601
+ /* @__PURE__ */ a(ut, {}),
1536
1602
  /* @__PURE__ */ a("span", { className: "astw:sr-only", children: e("toggle") })
1537
1603
  ] })
1538
1604
  ] }) }),
1539
- !!s.items?.length && /* @__PURE__ */ a(rt, { children: /* @__PURE__ */ a(st, { children: s.items?.filter((n) => n.url).map((n) => /* @__PURE__ */ a(Sa, { children: /* @__PURE__ */ a(
1540
- Ca,
1605
+ !!s.items?.length && /* @__PURE__ */ a(F.Panel, { children: /* @__PURE__ */ a(Qt, { children: s.items?.filter((n) => n.url).map((n) => /* @__PURE__ */ a(Pn, { children: /* @__PURE__ */ a(
1606
+ An,
1541
1607
  {
1542
1608
  render: /* @__PURE__ */ a(
1543
- $,
1609
+ dt,
1544
1610
  {
1545
1611
  to: n.url,
1546
1612
  className: n.url === t.currentPath ? "astw:bg-sidebar-accent astw:font-medium" : void 0
@@ -1550,7 +1616,7 @@ const Xs = (t) => {
1550
1616
  }
1551
1617
  ) }, n.title)) }) })
1552
1618
  ] }, s.title)) }) });
1553
- }, Ma = [104, 80, 112, 88, 96, 100, 84, 92], Ea = () => /* @__PURE__ */ a(bt, { children: /* @__PURE__ */ a(vt, { className: "astw:px-2", children: Ma.map((t, e) => /* @__PURE__ */ a(L, { children: /* @__PURE__ */ c("div", { className: "astw:flex astw:items-center astw:gap-2 astw:py-1.5", children: [
1619
+ }, $n = [104, 80, 112, 88, 96, 100, 84, 92], Fn = () => /* @__PURE__ */ a(le, { children: /* @__PURE__ */ a(ce, { className: "astw:px-2", children: $n.map((t, e) => /* @__PURE__ */ a(et, { children: /* @__PURE__ */ d("div", { className: "astw:flex astw:items-center astw:gap-2 astw:py-1.5", children: [
1554
1620
  /* @__PURE__ */ a("div", { className: "astw:h-4 astw:w-4 astw:rounded-md astw:bg-muted" }),
1555
1621
  /* @__PURE__ */ a(
1556
1622
  "div",
@@ -1560,15 +1626,15 @@ const Xs = (t) => {
1560
1626
  }
1561
1627
  )
1562
1628
  ] }) }, e)) }) });
1563
- function Mt({ ...t }) {
1629
+ function _e({ ...t }) {
1564
1630
  return /* @__PURE__ */ a("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...t });
1565
1631
  }
1566
- function Et({ className: t, ...e }) {
1632
+ function Ee({ className: t, ...e }) {
1567
1633
  return /* @__PURE__ */ a(
1568
1634
  "ol",
1569
1635
  {
1570
1636
  "data-slot": "breadcrumb-list",
1571
- className: m(
1637
+ className: c(
1572
1638
  "astw:text-muted-foreground astw:flex astw:flex-wrap astw:items-center astw:gap-1.5 astw:text-sm astw:break-words astw:sm:gap-2.5",
1573
1639
  t
1574
1640
  ),
@@ -1576,27 +1642,27 @@ function Et({ className: t, ...e }) {
1576
1642
  }
1577
1643
  );
1578
1644
  }
1579
- function It({ className: t, ...e }) {
1645
+ function Be({ className: t, ...e }) {
1580
1646
  return /* @__PURE__ */ a(
1581
1647
  "li",
1582
1648
  {
1583
1649
  "data-slot": "breadcrumb-item",
1584
- className: m("astw:inline-flex astw:items-center astw:gap-1.5", t),
1650
+ className: c("astw:inline-flex astw:items-center astw:gap-1.5", t),
1585
1651
  ...e
1586
1652
  }
1587
1653
  );
1588
1654
  }
1589
- function Lt({
1655
+ function ze({
1590
1656
  render: t,
1591
1657
  className: e,
1592
1658
  children: s,
1593
1659
  to: n,
1594
1660
  ...r
1595
1661
  }) {
1596
- const o = m("astw:hover:text-foreground astw:transition-colors", e);
1597
- return j({
1662
+ const o = c("astw:hover:text-foreground astw:transition-colors", e);
1663
+ return ft({
1598
1664
  defaultTagName: "a",
1599
- render: t ?? /* @__PURE__ */ a($, { to: n }),
1665
+ render: t ?? /* @__PURE__ */ a(dt, { to: n }),
1600
1666
  props: {
1601
1667
  "data-slot": "breadcrumb-link",
1602
1668
  className: o,
@@ -1605,28 +1671,28 @@ function Lt({
1605
1671
  }
1606
1672
  });
1607
1673
  }
1608
- function Ia({ children: t, className: e, ...s }) {
1674
+ function On({ children: t, className: e, ...s }) {
1609
1675
  return /* @__PURE__ */ a(
1610
1676
  "li",
1611
1677
  {
1612
1678
  "data-slot": "breadcrumb-separator",
1613
1679
  role: "presentation",
1614
1680
  "aria-hidden": "true",
1615
- className: m("astw:[&>svg]:size-3.5", e),
1681
+ className: c("astw:[&>svg]:size-3.5", e),
1616
1682
  ...s,
1617
- children: t ?? /* @__PURE__ */ a(W, {})
1683
+ children: t ?? /* @__PURE__ */ a(ut, {})
1618
1684
  }
1619
1685
  );
1620
1686
  }
1621
- function La(t, e) {
1687
+ function Gn(t, e) {
1622
1688
  if (!e.trim()) return t;
1623
1689
  const s = e.toLowerCase();
1624
1690
  return t.filter(
1625
1691
  (n) => n.title.toLowerCase().includes(s) || n.path.toLowerCase().includes(s)
1626
1692
  );
1627
1693
  }
1628
- const _a = (t, e) => {
1629
- const s = Ut(e);
1694
+ const jn = (t, e) => {
1695
+ const s = He(e);
1630
1696
  return t.reduce(
1631
1697
  (n, r) => {
1632
1698
  const o = s(r.meta.title, r.path);
@@ -1635,14 +1701,14 @@ const _a = (t, e) => {
1635
1701
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- breadcrumbTitle exists at runtime but not in CommonPageResource type
1636
1702
  breadcrumbTitle: r.meta.breadcrumbTitle
1637
1703
  };
1638
- const i = (l, u) => {
1639
- !l || l.length === 0 || l.forEach((d) => {
1640
- const w = `${u}/${d.path}`, h = s(d.meta.title, d.path);
1704
+ const i = (l, m) => {
1705
+ !l || l.length === 0 || l.forEach((u) => {
1706
+ const w = `${m}/${u.path}`, p = s(u.meta.title, u.path);
1641
1707
  n[w] = {
1642
- title: h,
1708
+ title: p,
1643
1709
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- breadcrumbTitle exists at runtime but not in CommonPageResource type
1644
- breadcrumbTitle: d.meta.breadcrumbTitle
1645
- }, d.subResources && d.subResources.length > 0 && i(d.subResources, w);
1710
+ breadcrumbTitle: u.meta.breadcrumbTitle
1711
+ }, u.subResources && u.subResources.length > 0 && i(u.subResources, w);
1646
1712
  });
1647
1713
  };
1648
1714
  return r.resources && r.resources.length > 0 && i(r.resources, r.path), n;
@@ -1650,22 +1716,22 @@ const _a = (t, e) => {
1650
1716
  {}
1651
1717
  );
1652
1718
  };
1653
- function za(t, e, s, n) {
1654
- const r = t.split("/").filter((u) => u !== ""), o = e && r[0] === e ? r.slice(1) : r, i = _a(s, n), l = o.map((u, d) => {
1655
- const w = o.slice(0, d + 1).join("/");
1656
- let h = i[w];
1657
- if (!h) {
1658
- const b = Object.entries(i).find(([p]) => {
1659
- const v = p.split("/").map((R) => R.startsWith(":") ? "[^/]+" : R).join("/");
1660
- return new RegExp(`^${v}$`).test(w);
1719
+ function Wn(t, e, s, n) {
1720
+ const r = t.split("/").filter((m) => m !== ""), o = e && r[0] === e ? r.slice(1) : r, i = jn(s, n), l = o.map((m, u) => {
1721
+ const w = o.slice(0, u + 1).join("/");
1722
+ let p = i[w];
1723
+ if (!p) {
1724
+ const b = Object.entries(i).find(([f]) => {
1725
+ const g = f.split("/").map((v) => v.startsWith(":") ? "[^/]+" : v).join("/");
1726
+ return new RegExp(`^${g}$`).test(w);
1661
1727
  })?.[1];
1662
- b && (h = b);
1728
+ b && (p = b);
1663
1729
  }
1664
- let f;
1665
- return h ? typeof h.breadcrumbTitle == "function" ? f = h.breadcrumbTitle(u) : typeof h.breadcrumbTitle == "string" ? f = h.breadcrumbTitle : f = h.title : f = decodeURIComponent(u), {
1666
- segment: u,
1730
+ let h;
1731
+ return p ? typeof p.breadcrumbTitle == "function" ? h = p.breadcrumbTitle(m) : typeof p.breadcrumbTitle == "string" ? h = p.breadcrumbTitle : h = p.title : h = decodeURIComponent(m), {
1732
+ segment: m,
1667
1733
  path: w,
1668
- title: f
1734
+ title: h
1669
1735
  };
1670
1736
  });
1671
1737
  return {
@@ -1673,87 +1739,94 @@ function za(t, e, s, n) {
1673
1739
  segments: l
1674
1740
  };
1675
1741
  }
1676
- const $a = () => {
1677
- const { configurations: t } = C(), e = X();
1678
- return za(
1742
+ const Hn = () => {
1743
+ const { configurations: t } = K(), e = Et();
1744
+ return Wn(
1679
1745
  e.pathname,
1680
1746
  t.basePath,
1681
1747
  t.modules,
1682
1748
  t.locale
1683
1749
  );
1684
- }, Wa = () => {
1685
- const { segments: t } = $a(), e = Ne("/:prefix/settings/:suffix"), s = B();
1686
- return e ? /* @__PURE__ */ a(Mt, { children: /* @__PURE__ */ a(Et, { children: /* @__PURE__ */ a("div", { className: "astw:inline-flex astw:items-center astw:gap-3 astw:last:text-foreground", children: /* @__PURE__ */ a(It, { children: /* @__PURE__ */ a(Lt, { to: `/${e.params.prefix}/settings`, children: s("settings") }) }) }) }) }) : /* @__PURE__ */ a(Mt, { children: /* @__PURE__ */ a(Et, { children: t.map((n, r) => /* @__PURE__ */ c(
1750
+ }, Un = () => {
1751
+ const { segments: t } = Hn(), e = Ls("/:prefix/settings/:suffix"), s = Q();
1752
+ return e ? /* @__PURE__ */ a(_e, { children: /* @__PURE__ */ a(Ee, { children: /* @__PURE__ */ a("div", { className: "astw:inline-flex astw:items-center astw:gap-3 astw:last:text-foreground", children: /* @__PURE__ */ a(Be, { children: /* @__PURE__ */ a(ze, { to: `/${e.params.prefix}/settings`, children: s("settings") }) }) }) }) }) : /* @__PURE__ */ a(_e, { children: /* @__PURE__ */ a(Ee, { children: t.map((n, r) => /* @__PURE__ */ d(
1687
1753
  "div",
1688
1754
  {
1689
1755
  className: "astw:inline-flex astw:items-center astw:gap-3 astw:last:text-foreground",
1690
1756
  children: [
1691
- /* @__PURE__ */ a(It, { children: /* @__PURE__ */ a(Lt, { to: n.path, children: n.title }) }),
1692
- r < t.length - 1 && /* @__PURE__ */ a(Ia, {})
1757
+ /* @__PURE__ */ a(Be, { children: /* @__PURE__ */ a(ze, { to: n.path, children: n.title }) }),
1758
+ r < t.length - 1 && /* @__PURE__ */ a(On, {})
1693
1759
  ]
1694
1760
  },
1695
1761
  r
1696
1762
  )) }) });
1697
- }, Fa = () => {
1698
- const { open: t, isIconMode: e } = H();
1699
- return /* @__PURE__ */ a("div", { className: t && !e ? "astw:md:hidden" : void 0, children: /* @__PURE__ */ a(ne, { className: "astw:-ml-2.5" }) });
1700
- }, Js = (t) => {
1701
- const e = t.children ? t.children({ Outlet: Ct }) : null, s = Je(), n = () => {
1763
+ }, Kn = () => {
1764
+ const { open: t, isIconMode: e } = it();
1765
+ return /* @__PURE__ */ a("div", { className: t && !e ? "astw:md:hidden" : void 0, children: /* @__PURE__ */ a(ya, { className: "astw:-ml-2.5" }) });
1766
+ }, No = (t) => {
1767
+ const e = t.children ? t.children({ Outlet: Me }) : null, s = on(), n = () => {
1702
1768
  s.setTheme(s.theme === "dark" ? "light" : "dark");
1703
1769
  };
1704
- return /* @__PURE__ */ a(fa, { className: "astw:flex astw:flex-col", children: /* @__PURE__ */ c("div", { className: "astw:flex astw:flex-1", children: [
1705
- t.sidebar ?? /* @__PURE__ */ a(Aa, {}),
1706
- /* @__PURE__ */ c(ba, { className: "astw:w-[calc(100%-var(--sidebar-width))]", children: [
1707
- /* @__PURE__ */ a("header", { className: "astw:flex astw:h-14 astw:shrink-0 astw:items-center astw:gap-2 astw:transition-[width,height] astw:ease-linear astw:group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ c("div", { className: "astw:flex astw:w-full astw:items-center astw:justify-between", children: [
1708
- /* @__PURE__ */ c("div", { className: "astw:flex astw:items-center astw:gap-2", children: [
1709
- /* @__PURE__ */ a(Fa, {}),
1710
- /* @__PURE__ */ a(Wa, {})
1770
+ return /* @__PURE__ */ a(Cn, { className: "astw:flex astw:flex-col", children: /* @__PURE__ */ d("div", { className: "astw:flex astw:flex-1", children: [
1771
+ t.sidebar ?? /* @__PURE__ */ a(En, {}),
1772
+ /* @__PURE__ */ d(Tn, { className: "astw:w-[calc(100%-var(--sidebar-width))]", children: [
1773
+ /* @__PURE__ */ a("header", { className: "astw:flex astw:h-14 astw:shrink-0 astw:items-center astw:gap-2 astw:transition-[width,height] astw:ease-linear astw:group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ d("div", { className: "astw:flex astw:w-full astw:items-center astw:justify-between", children: [
1774
+ /* @__PURE__ */ d("div", { className: "astw:flex astw:items-center astw:gap-2", children: [
1775
+ /* @__PURE__ */ a(Kn, {}),
1776
+ /* @__PURE__ */ a(Un, {})
1711
1777
  ] }),
1712
- /* @__PURE__ */ a("div", { className: "astw:flex astw:items-center astw:gap-2", children: /* @__PURE__ */ a(O, { variant: "outline", size: "icon", onClick: n, children: /* @__PURE__ */ a(Pe, {}) }) })
1778
+ /* @__PURE__ */ a("div", { className: "astw:flex astw:items-center astw:gap-2", children: /* @__PURE__ */ a(wt, { variant: "outline", size: "icon", onClick: n, children: /* @__PURE__ */ a(_s, {}) }) })
1713
1779
  ] }) }),
1714
- /* @__PURE__ */ a("div", { className: "astw:flex astw:flex-col astw:gap-4 astw:flex-1 astw:min-h-0", children: e ?? /* @__PURE__ */ a(Ct, {}) })
1780
+ /* @__PURE__ */ a("div", { className: "astw:flex astw:flex-col astw:gap-4 astw:flex-1 astw:min-h-0", children: e ?? /* @__PURE__ */ a(Me, {}) })
1715
1781
  ] })
1716
1782
  ] }) });
1717
1783
  };
1718
- function Oa({ ...t }) {
1719
- return /* @__PURE__ */ a(x.Root, { "data-slot": "dialog", ...t });
1784
+ function Ta({ ...t }) {
1785
+ return /* @__PURE__ */ a(W.Root, { "data-slot": "dialog", ...t });
1720
1786
  }
1721
- function ja({ ...t }) {
1722
- return /* @__PURE__ */ a(x.Portal, { "data-slot": "dialog-portal", ...t });
1787
+ Ta.displayName = "Dialog.Root";
1788
+ function Ia({ ...t }) {
1789
+ return /* @__PURE__ */ a(W.Trigger, { "data-slot": "dialog-trigger", ...t });
1723
1790
  }
1724
- function Ua({ className: t, ...e }) {
1791
+ Ia.displayName = "Dialog.Trigger";
1792
+ function Ra({ ...t }) {
1793
+ return /* @__PURE__ */ a(W.Portal, { "data-slot": "dialog-portal", ...t });
1794
+ }
1795
+ Ra.displayName = "Dialog.Portal";
1796
+ function ka({ ...t }) {
1797
+ return /* @__PURE__ */ a(W.Close, { "data-slot": "dialog-close", ...t });
1798
+ }
1799
+ ka.displayName = "Dialog.Close";
1800
+ function La({ className: t, ...e }) {
1725
1801
  return /* @__PURE__ */ a(
1726
- x.Backdrop,
1802
+ W.Backdrop,
1727
1803
  {
1728
1804
  "data-slot": "dialog-overlay",
1729
- className: m(
1730
- "astw:data-open:animate-in astw:data-ending-style:animate-out astw:data-ending-style:fade-out-0 astw:data-open:fade-in-0 astw:fixed astw:inset-0 astw:z-50 astw:bg-black/50",
1805
+ className: c(
1806
+ "astw:data-open:animate-in astw:data-ending-style:animate-out astw:data-ending-style:fade-out-0 astw:data-open:fade-in-0 astw:fill-mode-forwards astw:fixed astw:inset-0 astw:z-50 astw:bg-black/50",
1731
1807
  t
1732
1808
  ),
1733
1809
  ...e
1734
1810
  }
1735
1811
  );
1736
1812
  }
1737
- function Ha({
1738
- className: t,
1739
- children: e,
1740
- ...s
1741
- }) {
1742
- return /* @__PURE__ */ c(ja, { "data-slot": "dialog-portal", children: [
1743
- /* @__PURE__ */ a(Ua, {}),
1744
- /* @__PURE__ */ c(
1745
- x.Popup,
1813
+ La.displayName = "Dialog.Overlay";
1814
+ function Pa({ className: t, children: e, ...s }) {
1815
+ return /* @__PURE__ */ d(Ra, { "data-slot": "dialog-portal", children: [
1816
+ /* @__PURE__ */ a(La, {}),
1817
+ /* @__PURE__ */ d(
1818
+ W.Popup,
1746
1819
  {
1747
1820
  "data-slot": "dialog-content",
1748
- className: m(
1749
- "astw:bg-background astw:data-open:animate-in astw:data-ending-style:animate-out astw:data-ending-style:fade-out-0 astw:data-open:fade-in-0 astw:data-ending-style:zoom-out-95 astw:data-open:zoom-in-95 astw:fixed astw:top-[50%] astw:left-[50%] astw:z-50 astw:grid astw:w-full astw:max-w-[calc(100%-2rem)] astw:translate-x-[-50%] astw:translate-y-[-50%] astw:gap-4 astw:rounded-lg astw:border astw:p-6 astw:shadow-lg astw:duration-200 astw:sm:max-w-lg",
1821
+ className: c(
1822
+ "astw:bg-background astw:data-open:animate-in astw:data-ending-style:animate-out astw:data-ending-style:fade-out-0 astw:data-open:fade-in-0 astw:data-ending-style:zoom-out-95 astw:data-open:zoom-in-95 astw:fill-mode-forwards astw:fixed astw:top-[50%] astw:left-[50%] astw:z-50 astw:grid astw:w-full astw:max-w-[calc(100%-2rem)] astw:translate-x-[-50%] astw:translate-y-[-50%] astw:gap-4 astw:rounded-lg astw:border astw:p-6 astw:shadow-lg astw:duration-200 astw:sm:max-w-lg",
1750
1823
  t
1751
1824
  ),
1752
1825
  ...s,
1753
1826
  children: [
1754
1827
  e,
1755
- /* @__PURE__ */ c(x.Close, { className: "astw:ring-offset-bg astw:focus:ring-ring astw:data-open:bg-accent astw:data-open:text-muted-foreground astw:absolute astw:top-4 astw:right-4 astw:rounded-xs astw:opacity-70 astw:transition-opacity astw:hover:opacity-100 astw:focus:ring-2 astw:focus:ring-offset-2 astw:focus:outline-hidden astw:disabled:pointer-events-none astw:[&_svg]:pointer-events-none astw:[&_svg]:shrink-0 astw:[&_svg:not([class*='size-'])]:size-4", children: [
1756
- /* @__PURE__ */ a(Wt, {}),
1828
+ /* @__PURE__ */ d(W.Close, { className: "astw:ring-offset-bg astw:focus:ring-ring astw:data-open:bg-accent astw:data-open:text-muted-foreground astw:absolute astw:top-4 astw:right-4 astw:rounded-xs astw:opacity-70 astw:transition-opacity astw:hover:opacity-100 astw:focus:ring-2 astw:focus:ring-offset-2 astw:focus:outline-hidden astw:disabled:pointer-events-none astw:[&_svg]:pointer-events-none astw:[&_svg]:shrink-0 astw:[&_svg:not([class*='size-'])]:size-4", children: [
1829
+ /* @__PURE__ */ a(gt, {}),
1757
1830
  /* @__PURE__ */ a("span", { className: "astw:sr-only", children: "Close" })
1758
1831
  ] })
1759
1832
  ]
@@ -1761,17 +1834,68 @@ function Ha({
1761
1834
  )
1762
1835
  ] });
1763
1836
  }
1764
- function Ka({ className: t, ...e }) {
1837
+ Pa.displayName = "Dialog.Content";
1838
+ function Aa({ className: t, ...e }) {
1839
+ return /* @__PURE__ */ a(
1840
+ "div",
1841
+ {
1842
+ "data-slot": "dialog-header",
1843
+ className: c(
1844
+ "astw:flex astw:flex-col astw:gap-2 astw:text-center astw:sm:text-left",
1845
+ t
1846
+ ),
1847
+ ...e
1848
+ }
1849
+ );
1850
+ }
1851
+ Aa.displayName = "Dialog.Header";
1852
+ function Ma({ className: t, ...e }) {
1765
1853
  return /* @__PURE__ */ a(
1766
- x.Title,
1854
+ "div",
1855
+ {
1856
+ "data-slot": "dialog-footer",
1857
+ className: c(
1858
+ "astw:flex astw:flex-col-reverse astw:gap-2 astw:sm:flex-row astw:sm:justify-end",
1859
+ t
1860
+ ),
1861
+ ...e
1862
+ }
1863
+ );
1864
+ }
1865
+ Ma.displayName = "Dialog.Footer";
1866
+ function Va({ className: t, ...e }) {
1867
+ return /* @__PURE__ */ a(
1868
+ W.Title,
1767
1869
  {
1768
1870
  "data-slot": "dialog-title",
1769
- className: m("astw:text-lg astw:leading-none astw:font-semibold", t),
1871
+ className: c("astw:text-lg astw:leading-none astw:font-semibold", t),
1872
+ ...e
1873
+ }
1874
+ );
1875
+ }
1876
+ Va.displayName = "Dialog.Title";
1877
+ function Da({ className: t, ...e }) {
1878
+ return /* @__PURE__ */ a(
1879
+ W.Description,
1880
+ {
1881
+ "data-slot": "dialog-description",
1882
+ className: c("astw:text-muted-foreground astw:text-sm", t),
1770
1883
  ...e
1771
1884
  }
1772
1885
  );
1773
1886
  }
1774
- function Va(t) {
1887
+ Da.displayName = "Dialog.Description";
1888
+ const Xt = {
1889
+ Root: Ta,
1890
+ Close: ka,
1891
+ Content: Pa,
1892
+ Description: Da,
1893
+ Footer: Ma,
1894
+ Header: Aa,
1895
+ Title: Va,
1896
+ Trigger: Ia
1897
+ };
1898
+ function Yn(t) {
1775
1899
  const e = [], s = (n, r, o) => {
1776
1900
  n.forEach((i) => {
1777
1901
  const l = [...o, i.title];
@@ -1792,119 +1916,119 @@ function Va(t) {
1792
1916
  }), s(n.items, n.icon, [n.title]);
1793
1917
  }), e;
1794
1918
  }
1795
- function Ga({ routes: t }) {
1796
- const e = Se(), s = jt(null), [n, r] = V(!1), [o, i] = V(""), [l, u] = V(0), d = M(() => La(t, o), [t, o]), w = D((p) => {
1797
- i(p), u(0);
1919
+ function qn({ routes: t }) {
1920
+ const e = Ps(), s = U(null), [n, r] = V(!1), [o, i] = V(""), [l, m] = V(0), u = H(() => Gn(t, o), [t, o]), w = A((f) => {
1921
+ i(f), m(0);
1798
1922
  }, []);
1799
- F(() => {
1800
- const p = (v) => {
1801
- (v.metaKey || v.ctrlKey) && v.key === "k" && (v.preventDefault(), r((k) => !k));
1923
+ X(() => {
1924
+ const f = (g) => {
1925
+ (g.metaKey || g.ctrlKey) && g.key === "k" && (g.preventDefault(), r((y) => !y));
1802
1926
  };
1803
- return document.addEventListener("keydown", p), () => document.removeEventListener("keydown", p);
1927
+ return document.addEventListener("keydown", f), () => document.removeEventListener("keydown", f);
1804
1928
  }, []);
1805
- const h = D((p) => {
1806
- r(p), p || (i(""), u(0));
1929
+ const p = A((f) => {
1930
+ r(f), f || (i(""), m(0));
1807
1931
  }, []);
1808
- F(() => {
1932
+ X(() => {
1809
1933
  s.current && s.current.querySelector(`[data-index="${l}"]`)?.scrollIntoView({ block: "nearest" });
1810
1934
  }, [l]);
1811
- const f = D(
1812
- (p) => {
1813
- e(p.path), r(!1), i("");
1935
+ const h = A(
1936
+ (f) => {
1937
+ e(f.path), r(!1), i("");
1814
1938
  },
1815
1939
  [e]
1816
- ), b = D(
1817
- (p) => {
1818
- if (!p.nativeEvent.isComposing)
1819
- switch (p.key) {
1940
+ ), b = A(
1941
+ (f) => {
1942
+ if (!f.nativeEvent.isComposing)
1943
+ switch (f.key) {
1820
1944
  case "ArrowDown":
1821
- p.preventDefault(), u((v) => v < d.length - 1 ? v + 1 : v);
1945
+ f.preventDefault(), m((g) => g < u.length - 1 ? g + 1 : g);
1822
1946
  break;
1823
1947
  case "ArrowUp":
1824
- p.preventDefault(), u((v) => v > 0 ? v - 1 : v);
1948
+ f.preventDefault(), m((g) => g > 0 ? g - 1 : g);
1825
1949
  break;
1826
1950
  case "Enter":
1827
- p.preventDefault(), d[l] && f(d[l]);
1951
+ f.preventDefault(), u[l] && h(u[l]);
1828
1952
  break;
1829
1953
  }
1830
1954
  },
1831
- [d, l, f]
1955
+ [u, l, h]
1832
1956
  );
1833
1957
  return {
1834
1958
  open: n,
1835
- handleOpenChange: h,
1959
+ handleOpenChange: p,
1836
1960
  search: o,
1837
1961
  setSearch: w,
1838
1962
  selectedIndex: l,
1839
- filteredRoutes: d,
1840
- handleSelect: f,
1963
+ filteredRoutes: u,
1964
+ handleSelect: h,
1841
1965
  handleKeyDown: b,
1842
1966
  listRef: s
1843
1967
  };
1844
1968
  }
1845
- function qa({ navItems: t }) {
1846
- const e = B(), s = M(() => Va(t), [t]), {
1969
+ function Xn({ navItems: t }) {
1970
+ const e = Q(), s = H(() => Yn(t), [t]), {
1847
1971
  open: n,
1848
1972
  handleOpenChange: r,
1849
1973
  search: o,
1850
1974
  setSearch: i,
1851
1975
  selectedIndex: l,
1852
- filteredRoutes: u,
1853
- handleSelect: d,
1976
+ filteredRoutes: m,
1977
+ handleSelect: u,
1854
1978
  handleKeyDown: w,
1855
- listRef: h
1856
- } = Ga({ routes: s });
1857
- return /* @__PURE__ */ a(Oa, { open: n, onOpenChange: r, children: /* @__PURE__ */ c(
1858
- Ha,
1979
+ listRef: p
1980
+ } = qn({ routes: s });
1981
+ return /* @__PURE__ */ a(Xt.Root, { open: n, onOpenChange: r, children: /* @__PURE__ */ d(
1982
+ Xt.Content,
1859
1983
  {
1860
1984
  className: "astw:p-0 astw:gap-0 astw:sm:max-w-2xl astw:overflow-hidden",
1861
1985
  onKeyDown: w,
1862
1986
  "aria-describedby": void 0,
1863
1987
  children: [
1864
- /* @__PURE__ */ a(Ka, { className: "astw:sr-only", children: e("commandPaletteSearch") }),
1865
- /* @__PURE__ */ c("div", { className: "astw:flex astw:items-center astw:border-b astw:px-3 astw:py-1", children: [
1866
- /* @__PURE__ */ a(Ae, { className: "astw:mr-2 astw:h-4 astw:w-4 astw:shrink-0 astw:opacity-50" }),
1988
+ /* @__PURE__ */ a(Xt.Title, { className: "astw:sr-only", children: e("commandPaletteSearch") }),
1989
+ /* @__PURE__ */ d("div", { className: "astw:flex astw:items-center astw:border-b astw:px-3 astw:py-1", children: [
1990
+ /* @__PURE__ */ a(Es, { className: "astw:mr-2 astw:h-4 astw:w-4 astw:shrink-0 astw:opacity-50" }),
1867
1991
  /* @__PURE__ */ a(
1868
- ca,
1992
+ gn,
1869
1993
  {
1870
1994
  value: o,
1871
- onChange: (f) => i(f.target.value),
1995
+ onChange: (h) => i(h.target.value),
1872
1996
  placeholder: e("commandPaletteSearch"),
1873
1997
  className: "astw:flex astw:h-10 astw:w-full astw:rounded-md astw:bg-transparent astw:py-3 astw:text-sm astw:outline-none astw:border-0 astw:shadow-none astw:focus-visible:ring-0 astw:placeholder:text-muted-foreground astw:disabled:cursor-not-allowed astw:disabled:opacity-50",
1874
1998
  autoFocus: !0
1875
1999
  }
1876
2000
  )
1877
2001
  ] }),
1878
- /* @__PURE__ */ a("div", { ref: h, className: "astw:max-h-75 astw:overflow-y-auto astw:overflow-x-hidden", children: u.length === 0 ? /* @__PURE__ */ a("div", { className: "astw:py-6 astw:text-center astw:text-sm astw:text-muted-foreground", children: e("commandPaletteNoResults") }) : /* @__PURE__ */ a("div", { className: "astw:p-1", children: u.map((f, b) => /* @__PURE__ */ c(
2002
+ /* @__PURE__ */ a("div", { ref: p, className: "astw:max-h-75 astw:overflow-y-auto astw:overflow-x-hidden", children: m.length === 0 ? /* @__PURE__ */ a("div", { className: "astw:py-6 astw:text-center astw:text-sm astw:text-muted-foreground", children: e("commandPaletteNoResults") }) : /* @__PURE__ */ a("div", { className: "astw:p-1", children: m.map((h, b) => /* @__PURE__ */ d(
1879
2003
  "button",
1880
2004
  {
1881
2005
  "data-index": b,
1882
- onClick: () => d(f),
1883
- className: m(
2006
+ onClick: () => u(h),
2007
+ className: c(
1884
2008
  "astw:relative astw:flex astw:flex-col astw:w-full astw:cursor-pointer astw:select-none astw:items-start astw:rounded-sm astw:px-2 astw:py-2 astw:text-sm astw:outline-none astw:text-left",
1885
2009
  b === l ? "astw:bg-accent astw:text-accent-foreground" : "astw:hover:bg-accent astw:hover:text-accent-foreground"
1886
2010
  ),
1887
2011
  children: [
1888
- /* @__PURE__ */ a("span", { className: "astw:truncate astw:w-full astw:text-left", children: f.breadcrumb.join(" > ") }),
1889
- /* @__PURE__ */ c("span", { className: "astw:text-[11px] astw:text-muted-foreground astw:truncate astw:w-full astw:text-left", children: [
2012
+ /* @__PURE__ */ a("span", { className: "astw:truncate astw:w-full astw:text-left", children: h.breadcrumb.join(" > ") }),
2013
+ /* @__PURE__ */ d("span", { className: "astw:text-[11px] astw:text-muted-foreground astw:truncate astw:w-full astw:text-left", children: [
1890
2014
  "/",
1891
- f.path
2015
+ h.path
1892
2016
  ] })
1893
2017
  ]
1894
2018
  },
1895
- f.path
2019
+ h.path
1896
2020
  )) }) })
1897
2021
  ]
1898
2022
  }
1899
2023
  ) });
1900
2024
  }
1901
- function tn() {
1902
- const t = Qt();
1903
- return /* @__PURE__ */ a(lt, { fallback: null, children: /* @__PURE__ */ a($t, { resolve: t, children: (e) => /* @__PURE__ */ a(qa, { navItems: e ?? [] }) }) });
2025
+ function Co() {
2026
+ const t = Ze();
2027
+ return /* @__PURE__ */ a(se, { fallback: null, children: /* @__PURE__ */ a(Oe, { resolve: t, children: (e) => /* @__PURE__ */ a(Xn, { navItems: e ?? [] }) }) });
1904
2028
  }
1905
- function Ya(t, e, s) {
2029
+ function Qn(t, e, s) {
1906
2030
  if (s.current === null || s.current.contextData !== e || s.current.guards !== t) {
1907
- const n = Za(t, e), r = {
2031
+ const n = tr(t, e), r = {
1908
2032
  contextData: e,
1909
2033
  guards: t,
1910
2034
  promise: n,
@@ -1921,7 +2045,7 @@ function Ya(t, e, s) {
1921
2045
  }
1922
2046
  return s.current;
1923
2047
  }
1924
- function Qa(t) {
2048
+ function Zn(t) {
1925
2049
  const { state: e } = t;
1926
2050
  switch (e.status) {
1927
2051
  case "fulfilled":
@@ -1932,10 +2056,10 @@ function Qa(t) {
1932
2056
  throw e.promise;
1933
2057
  }
1934
2058
  }
1935
- const en = (t) => {
1936
- const { guards: e, children: s, fallback: n = null, loading: r = null } = t, { contextData: o } = Ht(), i = jt(null), l = Ya(e, o, i);
1937
- return /* @__PURE__ */ a(lt, { fallback: r, children: /* @__PURE__ */ a(Xa, { cache: l, fallback: n, children: s }) });
1938
- }, Xa = (t) => Qa(t.cache).type === "pass" ? /* @__PURE__ */ a(S, { children: t.children }) : /* @__PURE__ */ a(S, { children: t.fallback }), Za = async (t, e) => {
2059
+ const So = (t) => {
2060
+ const { guards: e, children: s, fallback: n = null, loading: r = null } = t, { contextData: o } = Ue(), i = U(null), l = Qn(e, o, i);
2061
+ return /* @__PURE__ */ a(se, { fallback: r, children: /* @__PURE__ */ a(Jn, { cache: l, fallback: n, children: s }) });
2062
+ }, Jn = (t) => Zn(t.cache).type === "pass" ? /* @__PURE__ */ a(M, { children: t.children }) : /* @__PURE__ */ a(M, { children: t.fallback }), tr = async (t, e) => {
1939
2063
  const s = { context: e };
1940
2064
  for (const n of t) {
1941
2065
  const r = await n(s);
@@ -1944,8 +2068,8 @@ const en = (t) => {
1944
2068
  }
1945
2069
  return { type: "pass" };
1946
2070
  };
1947
- function an(t) {
1948
- const e = Le(t), { appUri: s } = t;
2071
+ function To(t) {
2072
+ const e = Gs(t), { appUri: s } = t;
1949
2073
  return {
1950
2074
  ...e,
1951
2075
  getAppUri() {
@@ -1953,38 +2077,38 @@ function an(t) {
1953
2077
  }
1954
2078
  };
1955
2079
  }
1956
- function Ja(t) {
2080
+ function er(t) {
1957
2081
  const e = new URLSearchParams(t.search);
1958
2082
  e.delete("code"), e.delete("state");
1959
2083
  const s = e.toString();
1960
2084
  return t.pathname + (s ? `?${s}` : "") + t.hash;
1961
2085
  }
1962
- const le = Z(null), sn = (t) => {
1963
- const e = t.client, s = D(
1964
- (l) => e.addEventListener((u) => {
1965
- u.type === "auth_state_changed" && l();
2086
+ const _a = Bt(null), Io = (t) => {
2087
+ const e = t.client, s = A(
2088
+ (l) => e.addEventListener((m) => {
2089
+ m.type === "auth_state_changed" && l();
1966
2090
  }),
1967
2091
  [e]
1968
- ), n = D(() => e.getState(), [e]), r = Ot(s, n);
1969
- F(() => {
2092
+ ), n = A(() => e.getState(), [e]), r = We(s, n);
2093
+ X(() => {
1970
2094
  (async () => {
1971
2095
  if (new URLSearchParams(window.location.search).has("code"))
1972
2096
  try {
1973
2097
  await e.handleCallback();
1974
- const d = Ja(new URL(window.location.href));
1975
- window.history.replaceState({}, "", d);
1976
- } catch (d) {
1977
- console.error("Failed to handle callback:", d);
2098
+ const u = er(new URL(window.location.href));
2099
+ window.history.replaceState({}, "", u);
2100
+ } catch (u) {
2101
+ console.error("Failed to handle callback:", u);
1978
2102
  }
1979
2103
  else
1980
2104
  await e.checkAuthStatus();
1981
2105
  })();
1982
- }, [e]), F(() => {
2106
+ }, [e]), X(() => {
1983
2107
  t.autoLogin && (!r.isReady || r.isAuthenticated || e.login());
1984
2108
  }, [r.isReady, r.isAuthenticated, t.autoLogin, e]);
1985
2109
  const o = r.isAuthenticated, i = t.guardComponent && (!r.isReady || !o) ? /* @__PURE__ */ a(t.guardComponent, {}) : t.children;
1986
2110
  return /* @__PURE__ */ a(
1987
- le.Provider,
2111
+ _a.Provider,
1988
2112
  {
1989
2113
  value: {
1990
2114
  authState: r,
@@ -1996,13 +2120,13 @@ const le = Z(null), sn = (t) => {
1996
2120
  children: i
1997
2121
  }
1998
2122
  );
1999
- }, ce = () => {
2000
- const t = I(le);
2123
+ }, Ea = () => {
2124
+ const t = tt(_a);
2001
2125
  if (!t)
2002
2126
  throw new Error("useAuth/useAuthSuspense must be used within an AuthProvider");
2003
2127
  return t;
2004
- }, nn = () => {
2005
- const t = ce(), { isAuthenticated: e, error: s, isReady: n } = t.authState;
2128
+ }, Ro = () => {
2129
+ const t = Ea(), { isAuthenticated: e, error: s, isReady: n } = t.authState;
2006
2130
  return {
2007
2131
  error: s,
2008
2132
  isAuthenticated: e,
@@ -2011,8 +2135,8 @@ const le = Z(null), sn = (t) => {
2011
2135
  logout: t.logout,
2012
2136
  checkAuthStatus: t.checkAuthStatus
2013
2137
  };
2014
- }, rn = () => {
2015
- const t = ce();
2138
+ }, ko = () => {
2139
+ const t = Ea();
2016
2140
  if (!t.authState.isReady)
2017
2141
  throw t.ready();
2018
2142
  const { isAuthenticated: e, error: s } = t.authState;
@@ -2023,7 +2147,16 @@ const le = Z(null), sn = (t) => {
2023
2147
  logout: t.logout,
2024
2148
  checkAuthStatus: t.checkAuthStatus
2025
2149
  };
2026
- }, on = () => Ee, ts = it(
2150
+ };
2151
+ function Lo() {
2152
+ return {
2153
+ for(t, ...e) {
2154
+ const s = e[0];
2155
+ return s ? t.replace(/:([^/?]+)|\*([^/?]+)/g, (n, r, o) => r ? encodeURIComponent(s[r] ?? "") : (s[o] ?? "").split("/").map((l) => encodeURIComponent(l)).join("/")) : t;
2156
+ }
2157
+ };
2158
+ }
2159
+ const Po = () => Fs, ar = ee(
2027
2160
  "astw:inline-flex astw:items-center astw:rounded-md astw:border astw:px-2 astw:py-0.5 astw:text-xs astw:font-medium astw:transition-colors astw:focus:outline-none astw:focus:ring-2 astw:focus:ring-ring astw:focus:ring-offset-2",
2028
2161
  {
2029
2162
  variants: {
@@ -2045,44 +2178,44 @@ const le = Z(null), sn = (t) => {
2045
2178
  variant: "default"
2046
2179
  }
2047
2180
  }
2048
- ), es = {
2181
+ ), sr = {
2049
2182
  "outline-success": "astw:bg-green-500",
2050
2183
  "outline-warning": "astw:bg-orange-500",
2051
2184
  "outline-error": "astw:bg-red-500",
2052
2185
  "outline-info": "astw:bg-blue-500",
2053
2186
  "outline-neutral": "astw:bg-neutral-400"
2054
2187
  };
2055
- function as({ variant: t }) {
2056
- const e = es[t];
2057
- return e ? /* @__PURE__ */ a("div", { className: "astw:size-3 astw:shrink-0 astw:flex astw:items-center astw:justify-center", children: /* @__PURE__ */ a("div", { className: m("astw:size-[7px] astw:rounded-full", e) }) }) : null;
2188
+ function nr({ variant: t }) {
2189
+ const e = sr[t];
2190
+ return e ? /* @__PURE__ */ a("div", { className: "astw:size-3 astw:shrink-0 astw:flex astw:items-center astw:justify-center", children: /* @__PURE__ */ a("div", { className: c("astw:size-1.75 astw:rounded-full", e) }) }) : null;
2058
2191
  }
2059
- function ss({ className: t, variant: e, children: s, ...n }) {
2192
+ function rr({ className: t, variant: e, children: s, ...n }) {
2060
2193
  const r = e?.toString().startsWith("outline-");
2061
- return /* @__PURE__ */ c("div", { className: m(ts({ variant: e }), t), ...n, children: [
2062
- r && /* @__PURE__ */ a(as, { variant: e }),
2194
+ return /* @__PURE__ */ d("div", { className: c(ar({ variant: e }), t), ...n, children: [
2195
+ r && /* @__PURE__ */ a(nr, { variant: e }),
2063
2196
  s
2064
2197
  ] });
2065
2198
  }
2066
- function ns(t) {
2199
+ function or(t) {
2067
2200
  return t.type === "divider";
2068
2201
  }
2069
- function rs(t) {
2202
+ function ir(t) {
2070
2203
  return t.type !== "divider" && "key" in t;
2071
2204
  }
2072
- function J(t, e) {
2205
+ function zt(t, e) {
2073
2206
  return e.split(".").reduce((s, n) => {
2074
2207
  if (s && typeof s == "object" && n in s)
2075
2208
  return s[n];
2076
2209
  }, t);
2077
2210
  }
2078
- function N(t) {
2211
+ function _(t) {
2079
2212
  return t == null || t === "";
2080
2213
  }
2081
- function os(t) {
2214
+ function lr(t) {
2082
2215
  return t.toLowerCase().replace(/_/g, " ").replace(/^\w/, (e) => e.toUpperCase());
2083
2216
  }
2084
- function is(t, e = "medium") {
2085
- if (N(t)) return "";
2217
+ function cr(t, e = "medium") {
2218
+ if (_(t)) return "";
2086
2219
  const s = t instanceof Date ? t : new Date(String(t));
2087
2220
  if (isNaN(s.getTime())) return String(t);
2088
2221
  switch (e) {
@@ -2113,8 +2246,8 @@ function is(t, e = "medium") {
2113
2246
  return s.toLocaleDateString();
2114
2247
  }
2115
2248
  }
2116
- function ls(t, e) {
2117
- if (N(t)) return "";
2249
+ function dr(t, e) {
2250
+ if (_(t)) return "";
2118
2251
  const s = typeof t == "number" ? t : parseFloat(String(t));
2119
2252
  if (isNaN(s)) return String(t);
2120
2253
  try {
@@ -2126,8 +2259,8 @@ function ls(t, e) {
2126
2259
  return `${e || "$"}${s.toFixed(2)}`;
2127
2260
  }
2128
2261
  }
2129
- function cs(t) {
2130
- if (N(t)) return [];
2262
+ function ur(t) {
2263
+ if (_(t)) return [];
2131
2264
  if (typeof t == "string")
2132
2265
  return t.split(/[,\n]/).map((e) => e.trim()).filter(Boolean);
2133
2266
  if (typeof t == "object" && t !== null) {
@@ -2138,47 +2271,47 @@ function cs(t) {
2138
2271
  }
2139
2272
  return [String(t)];
2140
2273
  }
2141
- function de({ value: t }) {
2142
- const [e, s] = g.useState(!1);
2143
- return /* @__PURE__ */ c(pt, { children: [
2274
+ function Ba({ value: t }) {
2275
+ const [e, s] = N.useState(!1), n = async (r) => {
2276
+ r.stopPropagation();
2277
+ try {
2278
+ await navigator.clipboard.writeText(t), s(!0), setTimeout(() => s(!1), 2e3);
2279
+ } catch {
2280
+ }
2281
+ };
2282
+ return /* @__PURE__ */ d(z.Root, { children: [
2144
2283
  /* @__PURE__ */ a(
2145
- ft,
2284
+ z.Trigger,
2146
2285
  {
2147
2286
  render: /* @__PURE__ */ a(
2148
2287
  "button",
2149
2288
  {
2150
- onClick: async (r) => {
2151
- r.stopPropagation();
2152
- try {
2153
- await navigator.clipboard.writeText(t), s(!0), setTimeout(() => s(!1), 2e3);
2154
- } catch {
2155
- }
2156
- },
2289
+ onClick: n,
2157
2290
  className: "astw:ml-0.5 astw:inline-flex astw:items-center astw:justify-center astw:p-1 astw:rounded astw:hover:bg-muted astw:transition-colors astw:text-muted-foreground astw:hover:text-foreground"
2158
2291
  }
2159
2292
  ),
2160
- children: e ? /* @__PURE__ */ a(Be, { className: "astw:h-3 astw:w-3", strokeWidth: 2.5 }) : /* @__PURE__ */ a(De, { className: "astw:h-3 astw:w-3", strokeWidth: 2.5 })
2293
+ children: e ? /* @__PURE__ */ a(Bs, { className: "astw:h-3 astw:w-3", strokeWidth: 2.5 }) : /* @__PURE__ */ a(zs, { className: "astw:h-3 astw:w-3", strokeWidth: 2.5 })
2161
2294
  }
2162
2295
  ),
2163
- /* @__PURE__ */ a(gt, { side: "top", children: e ? "Copied!" : "Copy" })
2296
+ /* @__PURE__ */ a(z.Content, { position: { side: "top" }, children: e ? "Copied!" : "Copy" })
2164
2297
  ] });
2165
2298
  }
2166
- const T = "–";
2167
- function ds({ field: t }) {
2168
- const e = N(t.value) ? T : String(t.value), s = t.meta?.copyable && !N(t.value), n = t.meta?.truncateLines, r = g.useRef(null), [o, i] = g.useState(!1);
2169
- g.useEffect(() => {
2299
+ const Y = "–";
2300
+ function wr({ field: t }) {
2301
+ const e = _(t.value) ? Y : String(t.value), s = t.meta?.copyable && !_(t.value), n = t.meta?.truncateLines, r = N.useRef(null), [o, i] = N.useState(!1);
2302
+ N.useEffect(() => {
2170
2303
  if (!n) {
2171
2304
  i(!1);
2172
2305
  return;
2173
2306
  }
2174
- const d = () => {
2307
+ const u = () => {
2175
2308
  if (r.current) {
2176
- const h = r.current;
2177
- i(h.scrollHeight > h.clientHeight + 1);
2309
+ const p = r.current;
2310
+ i(p.scrollHeight > p.clientHeight + 1);
2178
2311
  }
2179
- }, w = setTimeout(d, 50);
2180
- return window.addEventListener("resize", d), () => {
2181
- clearTimeout(w), window.removeEventListener("resize", d);
2312
+ }, w = setTimeout(u, 50);
2313
+ return window.addEventListener("resize", u), () => {
2314
+ clearTimeout(w), window.removeEventListener("resize", u);
2182
2315
  };
2183
2316
  }, [e, n]);
2184
2317
  const l = n && n > 0 ? {
@@ -2186,7 +2319,7 @@ function ds({ field: t }) {
2186
2319
  WebkitLineClamp: n,
2187
2320
  WebkitBoxOrient: "vertical",
2188
2321
  overflow: "hidden"
2189
- } : void 0, u = /* @__PURE__ */ c("div", { className: "astw:flex astw:items-start astw:gap-1 astw:min-w-0", children: [
2322
+ } : void 0, m = /* @__PURE__ */ d("div", { className: "astw:flex astw:items-start astw:gap-1 astw:min-w-0", children: [
2190
2323
  /* @__PURE__ */ a(
2191
2324
  "p",
2192
2325
  {
@@ -2196,36 +2329,36 @@ function ds({ field: t }) {
2196
2329
  children: e
2197
2330
  }
2198
2331
  ),
2199
- s && /* @__PURE__ */ a(de, { value: String(t.value) })
2332
+ s && /* @__PURE__ */ a(Ba, { value: String(t.value) })
2200
2333
  ] });
2201
- return n && o ? /* @__PURE__ */ c(pt, { children: [
2202
- /* @__PURE__ */ a(ft, { render: /* @__PURE__ */ a("span", { className: "astw:cursor-default" }), children: u }),
2203
- /* @__PURE__ */ a(gt, { side: "bottom", style: { maxWidth: 320 }, children: /* @__PURE__ */ a("p", { className: "astw:text-sm", children: e }) })
2204
- ] }) : u;
2205
- }
2206
- function us({ field: t }) {
2207
- if (N(t.value))
2208
- return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: T });
2334
+ return n && o ? /* @__PURE__ */ d(z.Root, { children: [
2335
+ /* @__PURE__ */ a(z.Trigger, { render: /* @__PURE__ */ a("span", { className: "astw:cursor-default" }), children: m }),
2336
+ /* @__PURE__ */ a(z.Content, { position: { side: "bottom" }, style: { maxWidth: 320 }, children: /* @__PURE__ */ a("p", { className: "astw:text-sm", children: e }) })
2337
+ ] }) : m;
2338
+ }
2339
+ function mr({ field: t }) {
2340
+ if (_(t.value))
2341
+ return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: Y });
2209
2342
  const e = String(t.value), s = t.meta?.badgeVariantMap || {}, n = e.toLowerCase(), r = s[e] || s[n] || "outline-neutral";
2210
- return /* @__PURE__ */ a(ss, { variant: r, className: "astw:w-fit", children: os(e) });
2343
+ return /* @__PURE__ */ a(rr, { variant: r, className: "astw:w-fit", children: lr(e) });
2211
2344
  }
2212
- function ws({ field: t }) {
2213
- if (N(t.value))
2214
- return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: T });
2215
- const e = t.meta?.currencyKey || "currency", s = J(t.data, e), n = ls(t.value, s);
2345
+ function pr({ field: t }) {
2346
+ if (_(t.value))
2347
+ return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: Y });
2348
+ const e = t.meta?.currencyKey || "currency", s = zt(t.data, e), n = dr(t.value, s);
2216
2349
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground astw:tabular-nums", children: n });
2217
2350
  }
2218
- function ms({ field: t }) {
2219
- if (N(t.value))
2220
- return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: T });
2221
- const e = t.meta?.dateFormat || "medium", s = is(t.value, e);
2351
+ function hr({ field: t }) {
2352
+ if (_(t.value))
2353
+ return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: Y });
2354
+ const e = t.meta?.dateFormat || "medium", s = cr(t.value, e);
2222
2355
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: s });
2223
2356
  }
2224
- function hs({ field: t }) {
2225
- if (N(t.value))
2226
- return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: T });
2227
- const e = t.meta?.hrefKey, s = e ? J(t.data, e) : void 0, n = t.meta?.external ?? !1, r = String(t.value);
2228
- return s ? /* @__PURE__ */ c(
2357
+ function fr({ field: t }) {
2358
+ if (_(t.value))
2359
+ return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: Y });
2360
+ const e = t.meta?.hrefKey, s = e ? zt(t.data, e) : void 0, n = t.meta?.external ?? !1, r = String(t.value);
2361
+ return s ? /* @__PURE__ */ d(
2229
2362
  "a",
2230
2363
  {
2231
2364
  href: s,
@@ -2234,63 +2367,63 @@ function hs({ field: t }) {
2234
2367
  className: "astw:inline-flex astw:items-center astw:gap-1 astw:text-sm astw:text-primary astw:hover:underline",
2235
2368
  children: [
2236
2369
  r,
2237
- n && /* @__PURE__ */ a(Ft, { className: "astw:h-3 astw:w-3" })
2370
+ n && /* @__PURE__ */ a(Ge, { className: "astw:h-3 astw:w-3" })
2238
2371
  ]
2239
2372
  }
2240
2373
  ) : /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: r });
2241
2374
  }
2242
- function ps({ field: t }) {
2243
- if (N(t.value))
2244
- return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: T });
2245
- const e = cs(t.value), s = t.meta?.copyable && !N(t.value), n = e.join(`
2375
+ function gr({ field: t }) {
2376
+ if (_(t.value))
2377
+ return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: Y });
2378
+ const e = ur(t.value), s = t.meta?.copyable && !_(t.value), n = e.join(`
2246
2379
  `);
2247
- return /* @__PURE__ */ c("div", { className: "astw:flex astw:items-start astw:gap-1 astw:min-w-0", children: [
2248
- /* @__PURE__ */ a("address", { className: "astw:text-sm astw:font-medium astw:text-foreground astw:not-italic", children: e.map((r, o) => /* @__PURE__ */ c(g.Fragment, { children: [
2380
+ return /* @__PURE__ */ d("div", { className: "astw:flex astw:items-start astw:gap-1 astw:min-w-0", children: [
2381
+ /* @__PURE__ */ a("address", { className: "astw:text-sm astw:font-medium astw:text-foreground astw:not-italic", children: e.map((r, o) => /* @__PURE__ */ d(N.Fragment, { children: [
2249
2382
  r,
2250
2383
  o < e.length - 1 && /* @__PURE__ */ a("br", {})
2251
2384
  ] }, o)) }),
2252
- s && /* @__PURE__ */ a(de, { value: n })
2385
+ s && /* @__PURE__ */ a(Ba, { value: n })
2253
2386
  ] });
2254
2387
  }
2255
- function fs({ field: t }) {
2256
- if (N(t.value))
2257
- return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: T });
2258
- const e = t.meta?.referenceIdKey, s = t.meta?.referenceUrlPattern, n = e ? J(t.data, e) : void 0, r = String(t.value);
2388
+ function br({ field: t }) {
2389
+ if (_(t.value))
2390
+ return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: Y });
2391
+ const e = t.meta?.referenceIdKey, s = t.meta?.referenceUrlPattern, n = e ? zt(t.data, e) : void 0, r = String(t.value);
2259
2392
  if (!n || !s)
2260
2393
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: r });
2261
2394
  const o = s.replace("{id}", n);
2262
2395
  return /* @__PURE__ */ a("a", { href: o, className: "astw:text-sm astw:text-primary astw:hover:underline", children: r });
2263
2396
  }
2264
- function _t(t) {
2397
+ function $e(t) {
2265
2398
  switch (t.type) {
2266
2399
  case "text":
2267
- return /* @__PURE__ */ a(ds, { field: t });
2400
+ return /* @__PURE__ */ a(wr, { field: t });
2268
2401
  case "badge":
2269
- return /* @__PURE__ */ a(us, { field: t });
2402
+ return /* @__PURE__ */ a(mr, { field: t });
2270
2403
  case "money":
2271
- return /* @__PURE__ */ a(ws, { field: t });
2404
+ return /* @__PURE__ */ a(pr, { field: t });
2272
2405
  case "date":
2273
- return /* @__PURE__ */ a(ms, { field: t });
2406
+ return /* @__PURE__ */ a(hr, { field: t });
2274
2407
  case "link":
2275
- return /* @__PURE__ */ a(hs, { field: t });
2408
+ return /* @__PURE__ */ a(fr, { field: t });
2276
2409
  case "address":
2277
- return /* @__PURE__ */ a(ps, { field: t });
2410
+ return /* @__PURE__ */ a(gr, { field: t });
2278
2411
  case "reference":
2279
- return /* @__PURE__ */ a(fs, { field: t });
2412
+ return /* @__PURE__ */ a(br, { field: t });
2280
2413
  default:
2281
- return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: T });
2414
+ return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: Y });
2282
2415
  }
2283
2416
  }
2284
- function gs(t) {
2417
+ function xr(t) {
2285
2418
  if (t.emptyBehavior !== "hide") return !1;
2286
2419
  const e = t.value;
2287
2420
  return e == null || e === "";
2288
2421
  }
2289
- function bs(t) {
2422
+ function vr(t) {
2290
2423
  return !1;
2291
2424
  }
2292
- function vs(t, e, s) {
2293
- const n = J(e, t.key);
2425
+ function yr(t, e, s) {
2426
+ const n = zt(e, t.key);
2294
2427
  return {
2295
2428
  id: `${t.key}-${s}`,
2296
2429
  label: t.label,
@@ -2301,26 +2434,26 @@ function vs(t, e, s) {
2301
2434
  data: e
2302
2435
  };
2303
2436
  }
2304
- function xs(t, e) {
2437
+ function Nr(t, e) {
2305
2438
  const s = [];
2306
2439
  let n = [], r = 0, o = 0;
2307
2440
  for (const i of t)
2308
- if (ns(i))
2441
+ if (or(i))
2309
2442
  n.length > 0 && (s.push({
2310
2443
  id: `section-${r}`,
2311
2444
  fields: n
2312
2445
  }), r++, n = []);
2313
- else if (rs(i)) {
2314
- const l = vs(i, e, o);
2315
- o++, gs(l) || n.push(l);
2446
+ else if (ir(i)) {
2447
+ const l = yr(i, e, o);
2448
+ o++, xr(l) || n.push(l);
2316
2449
  }
2317
2450
  return n.length > 0 && s.push({ id: `section-${r}`, fields: n }), s;
2318
2451
  }
2319
- function zt({ label: t, children: e, fullWidth: s }) {
2320
- return /* @__PURE__ */ c(
2452
+ function Fe({ label: t, children: e, fullWidth: s }) {
2453
+ return /* @__PURE__ */ d(
2321
2454
  "div",
2322
2455
  {
2323
- className: m(
2456
+ className: c(
2324
2457
  "astw:flex astw:flex-col astw:gap-1 astw:min-w-0 astw:py-2",
2325
2458
  s && "astw:col-span-full"
2326
2459
  ),
@@ -2331,15 +2464,16 @@ function zt({ label: t, children: e, fullWidth: s }) {
2331
2464
  }
2332
2465
  );
2333
2466
  }
2334
- function ln({
2467
+ function Ao({
2335
2468
  data: t,
2336
2469
  title: e,
2337
2470
  fields: s,
2338
2471
  columns: n = 3,
2339
2472
  className: r,
2340
- headerAction: o
2473
+ style: o,
2474
+ headerAction: i
2341
2475
  }) {
2342
- const i = xs(s, t), l = i.some((w) => w.fields.length > 0), u = m(
2476
+ const l = Nr(s, t), m = l.some((p) => p.fields.length > 0), u = c(
2343
2477
  "astw:grid astw:gap-x-6 astw:gap-y-4",
2344
2478
  // Default: 1 column
2345
2479
  "astw:grid-cols-1",
@@ -2351,34 +2485,35 @@ function ln({
2351
2485
  // 3-column mode: 1 → 2 → 3 columns
2352
2486
  "astw:@[400px]:grid-cols-2 astw:@[600px]:grid-cols-3"
2353
2487
  )
2354
- ), d = (w) => {
2355
- const h = w.fields.filter((b) => !0), f = w.fields.filter((b) => bs());
2356
- return /* @__PURE__ */ c("div", { className: "astw:space-y-4", children: [
2357
- h.length > 0 && /* @__PURE__ */ a("div", { className: u, children: h.map((b) => /* @__PURE__ */ a(zt, { label: b.label, children: _t(b) }, b.id)) }),
2358
- f.length > 0 && /* @__PURE__ */ a("div", { className: u, children: f.map((b) => /* @__PURE__ */ a(zt, { label: b.label, fullWidth: !0, children: _t(b) }, b.id)) })
2359
- ] }, w.id);
2488
+ ), w = (p) => {
2489
+ const h = p.fields.filter((f) => !0), b = p.fields.filter((f) => vr());
2490
+ return /* @__PURE__ */ d("div", { className: "astw:space-y-4", children: [
2491
+ h.length > 0 && /* @__PURE__ */ a("div", { className: u, children: h.map((f) => /* @__PURE__ */ a(Fe, { label: f.label, children: $e(f) }, f.id)) }),
2492
+ b.length > 0 && /* @__PURE__ */ a("div", { className: u, children: b.map((f) => /* @__PURE__ */ a(Fe, { label: f.label, fullWidth: !0, children: $e(f) }, f.id)) })
2493
+ ] }, p.id);
2360
2494
  };
2361
- return /* @__PURE__ */ a(ht, { delayDuration: 300, children: /* @__PURE__ */ c(
2495
+ return /* @__PURE__ */ a(z.Provider, { delay: 300, children: /* @__PURE__ */ d(
2362
2496
  "div",
2363
2497
  {
2364
- className: m(
2498
+ className: c(
2365
2499
  "astw:@container astw:bg-card astw:text-card-foreground astw:rounded-xl astw:border",
2366
2500
  r
2367
2501
  ),
2502
+ style: o,
2368
2503
  children: [
2369
- /* @__PURE__ */ c("div", { className: "astw:flex astw:items-center astw:justify-between astw:px-6 astw:py-6", children: [
2504
+ /* @__PURE__ */ d("div", { className: "astw:flex astw:items-center astw:justify-between astw:px-6 astw:py-6", children: [
2370
2505
  /* @__PURE__ */ a("h3", { className: "astw:text-lg astw:font-semibold astw:leading-none", children: e }),
2371
- o && /* @__PURE__ */ a("div", { children: o })
2506
+ i && /* @__PURE__ */ a("div", { children: i })
2372
2507
  ] }),
2373
- /* @__PURE__ */ a("div", { className: "astw:px-6 astw:pb-4", children: l ? /* @__PURE__ */ a("div", { className: "astw:space-y-4", children: i.map((w, h) => /* @__PURE__ */ c(g.Fragment, { children: [
2508
+ /* @__PURE__ */ a("div", { className: "astw:px-6 astw:pb-4", children: m ? /* @__PURE__ */ a("div", { className: "astw:space-y-4", children: l.map((p, h) => /* @__PURE__ */ d(N.Fragment, { children: [
2374
2509
  h > 0 && /* @__PURE__ */ a("div", { className: "astw:h-px astw:bg-border", role: "separator" }),
2375
- d(w)
2376
- ] }, w.id)) }) : /* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground", children: "No information available" }) })
2510
+ w(p)
2511
+ ] }, p.id)) }) : /* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground", children: "No information available" }) })
2377
2512
  ]
2378
2513
  }
2379
2514
  ) });
2380
2515
  }
2381
- const ys = "astw:flex astw:size-4 astw:items-center astw:justify-center", Ns = () => /* @__PURE__ */ a(
2516
+ const Cr = "astw:flex astw:size-4 astw:items-center astw:justify-center", Sr = () => /* @__PURE__ */ a(
2382
2517
  "svg",
2383
2518
  {
2384
2519
  className: "astw:size-4 astw:animate-spin",
@@ -2400,171 +2535,1663 @@ const ys = "astw:flex astw:size-4 astw:items-center astw:justify-center", Ns = (
2400
2535
  }
2401
2536
  )
2402
2537
  }
2403
- ), Ss = m(
2538
+ ), Tr = c(
2404
2539
  "astw:flex astw:items-center astw:gap-2 astw:w-full astw:rounded-md astw:px-3 astw:py-2",
2405
2540
  "astw:text-sm astw:font-medium astw:transition-colors astw:border astw:border-transparent",
2406
2541
  "astw:bg-transparent astw:text-left astw:cursor-pointer astw:[&_svg]:size-4 astw:[&_svg]:shrink-0"
2407
- ), Cs = "astw:hover:bg-accent astw:hover:text-accent-foreground astw:outline-none astw:focus-visible:ring-2 astw:focus-visible:ring-ring astw:focus-visible:ring-offset-2", Ts = "astw:pointer-events-none astw:opacity-50";
2408
- function ks({ action: t }) {
2409
- const { key: e, label: s, icon: n, onClick: r, disabled: o, loading: i } = t, l = !!o || !!i, u = /* @__PURE__ */ c(S, { children: [
2410
- /* @__PURE__ */ a("span", { className: ys, "aria-hidden": !0, children: i ? /* @__PURE__ */ a(Ns, {}) : n }),
2542
+ ), Ir = "astw:hover:bg-accent astw:hover:text-accent-foreground astw:outline-none astw:focus-visible:ring-2 astw:focus-visible:ring-ring astw:focus-visible:ring-offset-2", Rr = "astw:pointer-events-none astw:opacity-50";
2543
+ function kr({ action: t }) {
2544
+ const { key: e, label: s, icon: n, onClick: r, disabled: o, loading: i } = t, l = !!o || !!i, m = /* @__PURE__ */ d(M, { children: [
2545
+ /* @__PURE__ */ a("span", { className: Cr, "aria-hidden": !0, children: i ? /* @__PURE__ */ a(Sr, {}) : n }),
2411
2546
  /* @__PURE__ */ a("span", { className: "astw:min-w-0 astw:truncate", children: s })
2412
- ] }), d = m(
2413
- Ss,
2414
- l ? Ts : Cs
2547
+ ] }), u = c(
2548
+ Tr,
2549
+ l ? Rr : Ir
2415
2550
  );
2416
2551
  return /* @__PURE__ */ a(
2417
2552
  "button",
2418
2553
  {
2419
2554
  type: "button",
2420
- className: d,
2555
+ className: u,
2421
2556
  onClick: l ? void 0 : r,
2422
2557
  disabled: l,
2423
2558
  "aria-disabled": l,
2424
2559
  "aria-busy": i,
2425
2560
  "data-slot": "action-panel-item",
2426
2561
  "data-key": e,
2427
- children: u
2562
+ children: m
2428
2563
  }
2429
2564
  );
2430
2565
  }
2431
- function cn({ title: t, actions: e, className: s }) {
2432
- return /* @__PURE__ */ c(
2566
+ function Mo({ title: t, actions: e, className: s }) {
2567
+ return /* @__PURE__ */ d(
2433
2568
  "div",
2434
2569
  {
2435
- className: m(
2570
+ className: c(
2436
2571
  "astw:min-w-[278px] astw:w-full astw:bg-card astw:text-card-foreground astw:rounded-xl astw:border astw:shadow-xs",
2437
2572
  s
2438
2573
  ),
2439
2574
  children: [
2440
2575
  /* @__PURE__ */ a("div", { className: "astw:px-4 astw:pt-6 astw:pb-4", children: /* @__PURE__ */ a("h3", { className: "astw:text-lg astw:font-semibold astw:leading-none astw:pl-3", children: t }) }),
2441
- /* @__PURE__ */ a("div", { className: "astw:px-4 astw:pb-4", children: e.length === 0 ? /* @__PURE__ */ a("p", { className: "astw:py-2 astw:pl-3 astw:text-sm astw:text-muted-foreground", children: "No actions available" }) : /* @__PURE__ */ a("div", { className: "astw:flex astw:flex-col astw:gap-0", role: "list", children: e.map((n) => /* @__PURE__ */ a("div", { role: "listitem", children: /* @__PURE__ */ a(ks, { action: n }) }, n.key)) }) })
2576
+ /* @__PURE__ */ a("div", { className: "astw:px-4 astw:pb-4", children: e.length === 0 ? /* @__PURE__ */ a("p", { className: "astw:py-2 astw:pl-3 astw:text-sm astw:text-muted-foreground", children: "No actions available" }) : /* @__PURE__ */ a("div", { className: "astw:flex astw:flex-col astw:gap-0", role: "list", children: e.map((n) => /* @__PURE__ */ a("div", { role: "listitem", children: /* @__PURE__ */ a(kr, { action: n }) }, n.key)) }) })
2442
2577
  ]
2443
2578
  }
2444
2579
  );
2445
2580
  }
2446
- const xt = g.forwardRef(
2447
- ({ className: t, children: e, area: s, ...n }, r) => /* @__PURE__ */ a(
2581
+ const de = N.forwardRef(
2582
+ ({ className: t, style: e, children: s, area: n, ...r }, o) => /* @__PURE__ */ a(
2448
2583
  "div",
2449
2584
  {
2450
- ref: r,
2585
+ ref: o,
2451
2586
  "data-layout-column": "",
2452
- ...s ? { "data-area": s } : {},
2453
- className: m("astw:min-w-0 astw:flex astw:flex-col astw:gap-4", t),
2454
- ...n,
2455
- children: e
2587
+ ...n ? { "data-area": n } : {},
2588
+ className: c("astw:min-w-0 astw:flex astw:flex-col astw:gap-4", t),
2589
+ style: e,
2590
+ ...r,
2591
+ children: s
2456
2592
  }
2457
2593
  )
2458
2594
  );
2459
- xt.displayName = "Layout.Column";
2460
- function yt({ title: t, actions: e, children: s }) {
2595
+ de.displayName = "Layout.Column";
2596
+ function ue({ title: t, actions: e, children: s }) {
2461
2597
  const n = t || e != null && e.length > 0;
2462
- return /* @__PURE__ */ c("header", { "data-layout-header": "", className: "astw:flex astw:w-full astw:flex-col", children: [
2463
- n && /* @__PURE__ */ c("div", { className: "astw:flex astw:w-full astw:flex-1 astw:items-center astw:justify-between astw:pt-4", children: [
2598
+ return /* @__PURE__ */ d("header", { "data-layout-header": "", className: "astw:flex astw:w-full astw:flex-col", children: [
2599
+ n && /* @__PURE__ */ d("div", { className: "astw:flex astw:w-full astw:flex-1 astw:items-center astw:justify-between astw:pt-4", children: [
2464
2600
  t && /* @__PURE__ */ a("h1", { className: "astw:text-2xl astw:font-bold astw:tracking-tight", children: t }),
2465
- e != null && e.length > 0 && /* @__PURE__ */ a("div", { className: "astw:ml-auto astw:flex astw:gap-2 astw:items-center", children: e.map((r, o) => /* @__PURE__ */ a(g.Fragment, { children: r }, o)) })
2601
+ e != null && e.length > 0 && /* @__PURE__ */ a("div", { className: "astw:ml-auto astw:flex astw:gap-2 astw:items-center", children: e.map((r, o) => /* @__PURE__ */ a(N.Fragment, { children: r }, o)) })
2466
2602
  ] }),
2467
2603
  s != null && s !== !1 && /* @__PURE__ */ a("div", { className: "astw:w-full", children: s })
2468
2604
  ] });
2469
2605
  }
2470
- yt.displayName = "Layout.Header";
2471
- const Rs = {
2606
+ ue.displayName = "Layout.Header";
2607
+ const Lr = {
2472
2608
  left: "320px",
2473
2609
  main: "1fr",
2474
2610
  right: "280px"
2475
- }, Ps = {
2611
+ }, Pr = {
2476
2612
  2: "1fr 280px",
2477
2613
  3: "320px 1fr 280px"
2478
2614
  };
2479
- function ue({ columns: t, className: e, gap: s, title: n, actions: r, children: o }) {
2480
- const i = [];
2481
- let l = !1;
2482
- g.Children.forEach(o, (p) => {
2483
- g.isValidElement(p) && (p.type === yt ? l = !0 : p.type === xt && i.push(p.props.area));
2615
+ function za({ columns: t, className: e, style: s, gap: n, title: r, actions: o, children: i }) {
2616
+ const l = [];
2617
+ let m = !1;
2618
+ N.Children.forEach(i, (g) => {
2619
+ N.isValidElement(g) && (g.type === ue ? m = !0 : g.type === de && l.push(g.props.area));
2484
2620
  });
2485
- const u = i.length, d = t ?? u;
2621
+ const u = l.length, w = t ?? u;
2486
2622
  t !== void 0 && t !== u && console.warn(
2487
2623
  `Layout: \`columns\` prop (${t}) does not match Layout.Column child count (${u}). The \`columns\` prop is deprecated; remove it to use auto-detection.`
2488
2624
  );
2489
- const w = i.some((p) => p != null);
2625
+ const p = l.some((g) => g != null);
2490
2626
  let h;
2491
- d >= 2 && (w ? h = i.map((p) => p ? Rs[p] : "1fr").join(" ") : h = Ps[d] ?? `repeat(${d}, 1fr)`);
2492
- const f = s === void 0 || s === 4 ? "astw:gap-4" : s === 6 ? "astw:gap-6" : s === 8 ? "astw:gap-8" : "astw:gap-4", b = !l && (n || r != null && r.length > 0);
2493
- return /* @__PURE__ */ c(
2627
+ w >= 2 && (p ? h = l.map((g) => g ? Lr[g] : "1fr").join(" ") : h = Pr[w] ?? `repeat(${w}, 1fr)`);
2628
+ const b = n === void 0 || n === 4 ? "astw:gap-4" : n === 6 ? "astw:gap-6" : n === 8 ? "astw:gap-8" : "astw:gap-4", f = !m && (r || o != null && o.length > 0);
2629
+ return /* @__PURE__ */ d(
2494
2630
  "div",
2495
2631
  {
2496
- className: m(
2632
+ className: c(
2497
2633
  "astw:grid astw:grid-cols-1 astw:w-full",
2498
- l || b ? "astw:pb-4" : "astw:py-4",
2499
- f,
2634
+ m || f ? "astw:pb-4" : "astw:py-4",
2635
+ b,
2500
2636
  "astw:[&>[data-layout-header]]:col-span-full",
2501
- d === 2 && h && "astw:lg:grid-cols-[var(--layout-cols)]",
2502
- d >= 3 && h && "astw:xl:grid-cols-[var(--layout-cols)]",
2637
+ w === 2 && h && "astw:lg:grid-cols-[var(--layout-cols)]",
2638
+ w >= 3 && h && "astw:xl:grid-cols-[var(--layout-cols)]",
2503
2639
  e
2504
2640
  ),
2505
- style: h ? { "--layout-cols": h } : void 0,
2641
+ style: {
2642
+ ...s,
2643
+ ...h ? { "--layout-cols": h } : void 0
2644
+ },
2506
2645
  children: [
2507
- b && /* @__PURE__ */ c(
2646
+ f && /* @__PURE__ */ d(
2508
2647
  "header",
2509
2648
  {
2510
2649
  "data-layout-header": "",
2511
2650
  className: "astw:w-full astw:flex astw:justify-between astw:items-center astw:pt-4",
2512
2651
  children: [
2513
- n && /* @__PURE__ */ a("h1", { className: "astw:text-2xl astw:font-bold astw:tracking-tight", children: n }),
2514
- r != null && r.length > 0 && /* @__PURE__ */ a("div", { className: "astw:flex astw:gap-2 astw:items-center", children: r.map((p, v) => /* @__PURE__ */ a(g.Fragment, { children: p }, v)) })
2652
+ r && /* @__PURE__ */ a("h1", { className: "astw:text-2xl astw:font-bold astw:tracking-tight", children: r }),
2653
+ o != null && o.length > 0 && /* @__PURE__ */ a("div", { className: "astw:flex astw:gap-2 astw:items-center", children: o.map((g, y) => /* @__PURE__ */ a(N.Fragment, { children: g }, y)) })
2515
2654
  ]
2516
2655
  }
2517
2656
  ),
2518
- o
2657
+ i
2519
2658
  ]
2520
2659
  }
2521
2660
  );
2522
2661
  }
2523
- ue.Column = xt;
2524
- ue.Header = yt;
2525
- function dn() {
2526
- return {
2527
- for(t, ...e) {
2528
- const s = e[0];
2529
- return s ? t.replace(/:([^/?]+)|\*([^/?]+)/g, (n, r, o) => r ? encodeURIComponent(s[r] ?? "") : (s[o] ?? "").split("/").map((l) => encodeURIComponent(l)).join("/")) : t;
2662
+ za.Column = de;
2663
+ za.Header = ue;
2664
+ function $a({ className: t, containerClassName: e, ...s }) {
2665
+ return /* @__PURE__ */ a(
2666
+ "div",
2667
+ {
2668
+ "data-slot": "table-container",
2669
+ className: c("astw:relative astw:w-full astw:overflow-x-auto", e),
2670
+ children: /* @__PURE__ */ a(
2671
+ "table",
2672
+ {
2673
+ "data-slot": "table",
2674
+ className: c("astw:w-full astw:caption-bottom astw:text-sm", t),
2675
+ ...s
2676
+ }
2677
+ )
2530
2678
  }
2531
- };
2679
+ );
2680
+ }
2681
+ $a.displayName = "Table.Root";
2682
+ function Fa({ className: t, ...e }) {
2683
+ return /* @__PURE__ */ a("thead", { "data-slot": "table-header", className: c("astw:[&_tr]:border-b", t), ...e });
2684
+ }
2685
+ Fa.displayName = "Table.Header";
2686
+ function Oa({ className: t, ...e }) {
2687
+ return /* @__PURE__ */ a(
2688
+ "tbody",
2689
+ {
2690
+ "data-slot": "table-body",
2691
+ className: c("astw:[&_tr:last-child]:border-0", t),
2692
+ ...e
2693
+ }
2694
+ );
2695
+ }
2696
+ Oa.displayName = "Table.Body";
2697
+ function Ga({ className: t, ...e }) {
2698
+ return /* @__PURE__ */ a(
2699
+ "tfoot",
2700
+ {
2701
+ "data-slot": "table-footer",
2702
+ className: c("astw:border-t astw:font-medium astw:[&>tr]:last:border-b-0", t),
2703
+ ...e
2704
+ }
2705
+ );
2706
+ }
2707
+ Ga.displayName = "Table.Footer";
2708
+ function ja({ className: t, ...e }) {
2709
+ return /* @__PURE__ */ a(
2710
+ "tr",
2711
+ {
2712
+ "data-slot": "table-row",
2713
+ className: c(
2714
+ "astw:hover:bg-muted/50 astw:data-[state=selected]:bg-muted astw:border-b astw:transition-colors",
2715
+ t
2716
+ ),
2717
+ ...e
2718
+ }
2719
+ );
2720
+ }
2721
+ ja.displayName = "Table.Row";
2722
+ function Wa({ className: t, ...e }) {
2723
+ return /* @__PURE__ */ a(
2724
+ "th",
2725
+ {
2726
+ "data-slot": "table-head",
2727
+ className: c(
2728
+ "astw:text-foreground astw:h-10 astw:px-2 astw:text-left astw:align-middle astw:font-medium astw:whitespace-nowrap astw:[&:has([role=checkbox])]:pr-0 astw:[&>[role=checkbox]]:translate-y-[2px]",
2729
+ t
2730
+ ),
2731
+ ...e
2732
+ }
2733
+ );
2734
+ }
2735
+ Wa.displayName = "Table.Head";
2736
+ function Ha({ className: t, ...e }) {
2737
+ return /* @__PURE__ */ a(
2738
+ "td",
2739
+ {
2740
+ "data-slot": "table-cell",
2741
+ className: c(
2742
+ "astw:p-2 astw:align-middle astw:whitespace-nowrap astw:[&:has([role=checkbox])]:pr-0 astw:[&>[role=checkbox]]:translate-y-[2px]",
2743
+ t
2744
+ ),
2745
+ ...e
2746
+ }
2747
+ );
2748
+ }
2749
+ Ha.displayName = "Table.Cell";
2750
+ function Ua({ className: t, ...e }) {
2751
+ return /* @__PURE__ */ a(
2752
+ "caption",
2753
+ {
2754
+ "data-slot": "table-caption",
2755
+ className: c("astw:text-muted-foreground astw:mt-4 astw:text-sm", t),
2756
+ ...e
2757
+ }
2758
+ );
2759
+ }
2760
+ Ua.displayName = "Table.Caption";
2761
+ const Vo = { Root: $a, Header: Fa, Body: Oa, Footer: Ga, Row: ja, Head: Wa, Cell: Ha, Caption: Ua };
2762
+ function Ka({ children: t, ...e }) {
2763
+ return /* @__PURE__ */ a(k.Root, { "data-slot": "menu", ...e, children: t });
2764
+ }
2765
+ Ka.displayName = "Menu.Root";
2766
+ function Ya({ ...t }) {
2767
+ return /* @__PURE__ */ a(k.Trigger, { "data-slot": "menu-trigger", ...t });
2768
+ }
2769
+ Ya.displayName = "Menu.Trigger";
2770
+ function qa({
2771
+ className: t,
2772
+ position: e,
2773
+ children: s,
2774
+ ...n
2775
+ }) {
2776
+ const { side: r = "bottom", align: o = "start", sideOffset: i = 4 } = e ?? {};
2777
+ return /* @__PURE__ */ a(k.Portal, { children: /* @__PURE__ */ a(k.Positioner, { sideOffset: i, side: r, align: o, children: /* @__PURE__ */ a(
2778
+ k.Popup,
2779
+ {
2780
+ "data-slot": "menu-content",
2781
+ className: c(
2782
+ "astw:bg-popover astw:text-popover-foreground astw:z-50 astw:min-w-[8rem] astw:origin-(--transform-origin) astw:overflow-hidden astw:rounded-md astw:border astw:p-1 astw:shadow-md",
2783
+ "astw:animate-in astw:fade-in-0 astw:zoom-in-95 astw:data-ending-style:animate-out astw:data-ending-style:fade-out-0 astw:data-ending-style:zoom-out-95",
2784
+ "astw:data-[side=bottom]:slide-in-from-top-2 astw:data-[side=left]:slide-in-from-right-2 astw:data-[side=right]:slide-in-from-left-2 astw:data-[side=top]:slide-in-from-bottom-2",
2785
+ t
2786
+ ),
2787
+ ...n,
2788
+ children: s
2789
+ }
2790
+ ) }) });
2791
+ }
2792
+ qa.displayName = "Menu.Content";
2793
+ function Xa({ className: t, ...e }) {
2794
+ return /* @__PURE__ */ a(
2795
+ k.Item,
2796
+ {
2797
+ "data-slot": "menu-item",
2798
+ className: c(
2799
+ "astw:relative astw:flex astw:w-full astw:cursor-default astw:select-none astw:items-center astw:gap-2 astw:rounded-sm astw:px-2 astw:py-1.5 astw:text-sm astw:outline-hidden",
2800
+ "astw:data-highlighted:bg-accent astw:data-highlighted:text-accent-foreground",
2801
+ "astw:data-disabled:pointer-events-none astw:data-disabled:opacity-50",
2802
+ "astw:[&_svg]:pointer-events-none astw:[&_svg]:shrink-0 astw:[&_svg:not([class*='size-'])]:size-4",
2803
+ t
2804
+ ),
2805
+ ...e
2806
+ }
2807
+ );
2808
+ }
2809
+ Xa.displayName = "Menu.Item";
2810
+ function Qa({ className: t, ...e }) {
2811
+ return /* @__PURE__ */ a(
2812
+ k.LinkItem,
2813
+ {
2814
+ "data-slot": "menu-link-item",
2815
+ className: c(
2816
+ "astw:relative astw:flex astw:w-full astw:cursor-default astw:select-none astw:items-center astw:gap-2 astw:rounded-sm astw:px-2 astw:py-1.5 astw:text-sm astw:outline-hidden astw:no-underline",
2817
+ "astw:data-highlighted:bg-accent astw:data-highlighted:text-accent-foreground",
2818
+ "astw:[&_svg]:pointer-events-none astw:[&_svg]:shrink-0 astw:[&_svg:not([class*='size-'])]:size-4",
2819
+ t
2820
+ ),
2821
+ ...e
2822
+ }
2823
+ );
2824
+ }
2825
+ Qa.displayName = "Menu.LinkItem";
2826
+ function Za({ className: t, ...e }) {
2827
+ return /* @__PURE__ */ a(
2828
+ k.CheckboxItem,
2829
+ {
2830
+ "data-slot": "menu-checkbox-item",
2831
+ className: c(
2832
+ "astw:relative astw:flex astw:w-full astw:cursor-default astw:select-none astw:items-center astw:gap-2 astw:rounded-sm astw:py-1.5 astw:pr-2 astw:pl-8 astw:text-sm astw:outline-hidden",
2833
+ "astw:data-highlighted:bg-accent astw:data-highlighted:text-accent-foreground",
2834
+ "astw:data-disabled:pointer-events-none astw:data-disabled:opacity-50",
2835
+ t
2836
+ ),
2837
+ ...e
2838
+ }
2839
+ );
2840
+ }
2841
+ Za.displayName = "Menu.CheckboxItem";
2842
+ function Ja({
2843
+ className: t,
2844
+ ...e
2845
+ }) {
2846
+ return /* @__PURE__ */ a(
2847
+ k.CheckboxItemIndicator,
2848
+ {
2849
+ "data-slot": "menu-checkbox-item-indicator",
2850
+ className: c(
2851
+ "astw:absolute astw:left-2 astw:inline-flex astw:items-center astw:justify-center",
2852
+ t
2853
+ ),
2854
+ ...e
2855
+ }
2856
+ );
2857
+ }
2858
+ Ja.displayName = "Menu.CheckboxItemIndicator";
2859
+ function ts({ className: t, ...e }) {
2860
+ return /* @__PURE__ */ a(
2861
+ k.RadioItem,
2862
+ {
2863
+ "data-slot": "menu-radio-item",
2864
+ className: c(
2865
+ "astw:relative astw:flex astw:w-full astw:cursor-default astw:select-none astw:items-center astw:gap-2 astw:rounded-sm astw:py-1.5 astw:pr-2 astw:pl-8 astw:text-sm astw:outline-hidden",
2866
+ "astw:data-highlighted:bg-accent astw:data-highlighted:text-accent-foreground",
2867
+ "astw:data-disabled:pointer-events-none astw:data-disabled:opacity-50",
2868
+ t
2869
+ ),
2870
+ ...e
2871
+ }
2872
+ );
2873
+ }
2874
+ ts.displayName = "Menu.RadioItem";
2875
+ function es({
2876
+ className: t,
2877
+ ...e
2878
+ }) {
2879
+ return /* @__PURE__ */ a(
2880
+ k.RadioItemIndicator,
2881
+ {
2882
+ "data-slot": "menu-radio-item-indicator",
2883
+ className: c(
2884
+ "astw:absolute astw:left-2 astw:inline-flex astw:items-center astw:justify-center",
2885
+ t
2886
+ ),
2887
+ ...e
2888
+ }
2889
+ );
2890
+ }
2891
+ es.displayName = "Menu.RadioItemIndicator";
2892
+ function as({ ...t }) {
2893
+ return /* @__PURE__ */ a(k.RadioGroup, { "data-slot": "menu-radio-group", ...t });
2894
+ }
2895
+ as.displayName = "Menu.RadioGroup";
2896
+ function ss({ ...t }) {
2897
+ return /* @__PURE__ */ a(k.Group, { "data-slot": "menu-group", ...t });
2898
+ }
2899
+ ss.displayName = "Menu.Group";
2900
+ function ns({ className: t, ...e }) {
2901
+ return /* @__PURE__ */ a(
2902
+ k.GroupLabel,
2903
+ {
2904
+ "data-slot": "menu-group-label",
2905
+ className: c(
2906
+ "astw:px-2 astw:py-1.5 astw:text-xs astw:font-semibold astw:text-muted-foreground",
2907
+ t
2908
+ ),
2909
+ ...e
2910
+ }
2911
+ );
2912
+ }
2913
+ ns.displayName = "Menu.GroupLabel";
2914
+ function rs({ className: t, ...e }) {
2915
+ return /* @__PURE__ */ a(
2916
+ k.Separator,
2917
+ {
2918
+ "data-slot": "menu-separator",
2919
+ className: c("astw:bg-border astw:-mx-1 astw:my-1 astw:h-px", t),
2920
+ ...e
2921
+ }
2922
+ );
2923
+ }
2924
+ rs.displayName = "Menu.Separator";
2925
+ function os({ children: t, ...e }) {
2926
+ return /* @__PURE__ */ a(k.SubmenuRoot, { "data-slot": "menu-submenu", ...e, children: t });
2927
+ }
2928
+ os.displayName = "Menu.SubmenuRoot";
2929
+ function is({
2930
+ className: t,
2931
+ ...e
2932
+ }) {
2933
+ return /* @__PURE__ */ a(
2934
+ k.SubmenuTrigger,
2935
+ {
2936
+ "data-slot": "menu-submenu-trigger",
2937
+ className: c(
2938
+ "astw:relative astw:flex astw:w-full astw:cursor-default astw:select-none astw:items-center astw:gap-2 astw:rounded-sm astw:px-2 astw:py-1.5 astw:text-sm astw:outline-hidden",
2939
+ "astw:data-highlighted:bg-accent astw:data-highlighted:text-accent-foreground",
2940
+ "astw:data-disabled:pointer-events-none astw:data-disabled:opacity-50",
2941
+ "astw:[&_svg]:pointer-events-none astw:[&_svg]:shrink-0 astw:[&_svg:not([class*='size-'])]:size-4",
2942
+ t
2943
+ ),
2944
+ ...e
2945
+ }
2946
+ );
2947
+ }
2948
+ is.displayName = "Menu.SubmenuTrigger";
2949
+ const Do = {
2950
+ Root: Ka,
2951
+ Trigger: Ya,
2952
+ Content: qa,
2953
+ Item: Xa,
2954
+ LinkItem: Qa,
2955
+ CheckboxItem: Za,
2956
+ CheckboxItemIndicator: Ja,
2957
+ RadioItem: ts,
2958
+ RadioItemIndicator: es,
2959
+ RadioGroup: as,
2960
+ Group: ss,
2961
+ GroupLabel: ns,
2962
+ Separator: rs,
2963
+ SubmenuRoot: os,
2964
+ SubmenuTrigger: is
2965
+ };
2966
+ function st(t) {
2967
+ return /* @__PURE__ */ a(D.Root, { "data-slot": "select", ...t });
2968
+ }
2969
+ st.displayName = "Select.Root";
2970
+ function nt({
2971
+ className: t,
2972
+ children: e,
2973
+ ...s
2974
+ }) {
2975
+ return /* @__PURE__ */ d(
2976
+ D.Trigger,
2977
+ {
2978
+ "data-slot": "select-trigger",
2979
+ className: c(
2980
+ "astw:border-input astw:bg-background astw:text-foreground astw:flex astw:h-9 astw:w-full astw:items-center astw:justify-between astw:gap-2 astw:rounded-md astw:border astw:px-3 astw:py-2 astw:text-sm astw:shadow-xs astw:outline-none astw:transition-colors",
2981
+ "astw:focus-visible:border-ring astw:focus-visible:ring-ring/50 astw:focus-visible:ring-[3px]",
2982
+ "astw:disabled:cursor-not-allowed astw:disabled:opacity-50",
2983
+ "astw:placeholder:text-muted-foreground",
2984
+ "astw:[&_svg]:pointer-events-none astw:[&_svg:not([class*='size-'])]:size-4 astw:[&_svg]:shrink-0",
2985
+ t
2986
+ ),
2987
+ ...s,
2988
+ children: [
2989
+ e,
2990
+ /* @__PURE__ */ a(D.Icon, { children: /* @__PURE__ */ a(ae, { className: "astw:size-4 astw:opacity-50" }) })
2991
+ ]
2992
+ }
2993
+ );
2994
+ }
2995
+ nt.displayName = "Select.Trigger";
2996
+ function O({ ...t }) {
2997
+ return /* @__PURE__ */ a(D.Value, { "data-slot": "select-value", ...t });
2998
+ }
2999
+ O.displayName = "Select.Value";
3000
+ function rt({ className: t, ...e }) {
3001
+ return /* @__PURE__ */ a(D.Portal, { children: /* @__PURE__ */ a(D.Positioner, { children: /* @__PURE__ */ a(
3002
+ D.Popup,
3003
+ {
3004
+ "data-slot": "select-content",
3005
+ className: c(
3006
+ "astw:bg-popover astw:text-popover-foreground astw:data-open:animate-in astw:data-ending-style:animate-out astw:data-ending-style:fade-out-0 astw:data-open:fade-in-0 astw:data-ending-style:zoom-out-95 astw:data-open:zoom-in-95 astw:z-50 astw:w-[var(--anchor-width)] astw:min-w-32 astw:origin-(--transform-origin) astw:overflow-hidden astw:rounded-md astw:border astw:shadow-md",
3007
+ t
3008
+ ),
3009
+ ...e
3010
+ }
3011
+ ) }) });
3012
+ }
3013
+ rt.displayName = "Select.Content";
3014
+ function we({
3015
+ className: t,
3016
+ children: e,
3017
+ ...s
3018
+ }) {
3019
+ return /* @__PURE__ */ d(
3020
+ D.Item,
3021
+ {
3022
+ "data-slot": "select-item",
3023
+ className: c(
3024
+ "astw:relative astw:flex astw:w-full astw:cursor-default astw:items-center astw:gap-2 astw:rounded-sm astw:py-1.5 astw:pr-8 astw:pl-2 astw:text-sm astw:outline-hidden astw:select-none",
3025
+ "astw:focus:bg-accent astw:focus:text-accent-foreground",
3026
+ "astw:data-disabled:pointer-events-none astw:data-disabled:opacity-50",
3027
+ "astw:[&_svg]:pointer-events-none astw:[&_svg:not([class*='size-'])]:size-4 astw:[&_svg]:shrink-0",
3028
+ t
3029
+ ),
3030
+ ...s,
3031
+ children: [
3032
+ /* @__PURE__ */ a("span", { className: "astw:absolute astw:right-2 astw:flex astw:size-3.5 astw:items-center astw:justify-center", children: /* @__PURE__ */ a(D.ItemIndicator, { children: /* @__PURE__ */ a(je, { className: "astw:size-4" }) }) }),
3033
+ /* @__PURE__ */ a(D.ItemText, { children: e })
3034
+ ]
3035
+ }
3036
+ );
3037
+ }
3038
+ we.displayName = "Select.Item";
3039
+ function me({ ...t }) {
3040
+ return /* @__PURE__ */ a(D.Group, { "data-slot": "select-group", ...t });
3041
+ }
3042
+ me.displayName = "Select.Group";
3043
+ function pe({
3044
+ className: t,
3045
+ ...e
3046
+ }) {
3047
+ return /* @__PURE__ */ a(
3048
+ D.GroupLabel,
3049
+ {
3050
+ "data-slot": "select-group-label",
3051
+ className: c(
3052
+ "astw:text-muted-foreground astw:px-2 astw:py-1.5 astw:text-xs astw:font-medium",
3053
+ t
3054
+ ),
3055
+ ...e
3056
+ }
3057
+ );
3058
+ }
3059
+ pe.displayName = "Select.GroupLabel";
3060
+ function ls({ className: t, ...e }) {
3061
+ return /* @__PURE__ */ a(
3062
+ "div",
3063
+ {
3064
+ "data-slot": "select-separator",
3065
+ className: c("astw:bg-muted astw:-mx-1 astw:my-1 astw:h-px", t),
3066
+ ...e
3067
+ }
3068
+ );
3069
+ }
3070
+ ls.displayName = "Select.Separator";
3071
+ const Ar = {
3072
+ Root: st,
3073
+ Trigger: nt,
3074
+ Value: O,
3075
+ Content: rt,
3076
+ Item: we,
3077
+ Group: me,
3078
+ GroupLabel: pe,
3079
+ Separator: ls
3080
+ }, lt = (t) => ({
3081
+ label: String(t)
3082
+ });
3083
+ function he(t) {
3084
+ return t.length > 0 && typeof t[0] == "object" && t[0] !== null && "label" in t[0] && "items" in t[0];
3085
+ }
3086
+ function Zt(t, e) {
3087
+ return t.map((s) => {
3088
+ const n = e(s);
3089
+ return /* @__PURE__ */ a(we, { value: s, children: n.render ?? n.label }, n.key ?? n.label);
3090
+ });
3091
+ }
3092
+ function Mr(t) {
3093
+ const { items: e, placeholder: s, mapItem: n, className: r, disabled: o, ...i } = t, l = n ?? lt, m = (f) => l(f).label, u = he(e) ? e.map((f) => /* @__PURE__ */ d(me, { children: [
3094
+ /* @__PURE__ */ a(pe, { children: f.label }),
3095
+ Zt(f.items, l)
3096
+ ] }, f.label)) : Zt(e, l);
3097
+ if (i.multiple) {
3098
+ const { value: f, defaultValue: g, onValueChange: y, renderValue: v } = i;
3099
+ return /* @__PURE__ */ a("div", { className: r, children: /* @__PURE__ */ d(
3100
+ st,
3101
+ {
3102
+ multiple: !0,
3103
+ value: f,
3104
+ defaultValue: g,
3105
+ onValueChange: y && ((S) => y(S)),
3106
+ itemToStringLabel: m,
3107
+ disabled: o,
3108
+ children: [
3109
+ /* @__PURE__ */ a(nt, { children: v ? /* @__PURE__ */ a(O, { placeholder: s, children: (S) => v(S) }) : /* @__PURE__ */ a(O, { placeholder: s }) }),
3110
+ /* @__PURE__ */ a(rt, { children: u })
3111
+ ]
3112
+ }
3113
+ ) });
3114
+ }
3115
+ const { value: w, defaultValue: p, onValueChange: h, renderValue: b } = i;
3116
+ return /* @__PURE__ */ a("div", { className: r, children: /* @__PURE__ */ d(
3117
+ st,
3118
+ {
3119
+ value: w,
3120
+ defaultValue: p,
3121
+ onValueChange: h && ((f) => h(f)),
3122
+ itemToStringLabel: m,
3123
+ disabled: o,
3124
+ children: [
3125
+ /* @__PURE__ */ a(nt, { children: b ? /* @__PURE__ */ a(O, { placeholder: s, children: (f) => b(f) }) : /* @__PURE__ */ a(O, { placeholder: s }) }),
3126
+ /* @__PURE__ */ a(rt, { children: u })
3127
+ ]
3128
+ }
3129
+ ) });
3130
+ }
3131
+ function Vr(t) {
3132
+ const {
3133
+ fetcher: e,
3134
+ placeholder: s,
3135
+ loadingText: n = "Loading...",
3136
+ mapItem: r,
3137
+ className: o,
3138
+ disabled: i,
3139
+ ...l
3140
+ } = t, [m, u] = V([]), [w, p] = V(!1), h = U(e);
3141
+ h.current = e;
3142
+ const b = U(null), f = N.useCallback((x) => {
3143
+ if (x) {
3144
+ b.current?.abort();
3145
+ const G = new AbortController();
3146
+ b.current = G, p(!0), h.current({ signal: G.signal }).then((j) => {
3147
+ G.signal.aborted || u(j);
3148
+ }).catch((j) => {
3149
+ j instanceof DOMException && j.name === "AbortError" || G.signal.aborted || u([]);
3150
+ }).finally(() => {
3151
+ G.signal.aborted || p(!1);
3152
+ });
3153
+ }
3154
+ }, []);
3155
+ X(() => () => b.current?.abort(), []);
3156
+ const g = r ?? lt, y = (x) => g(x).label, v = w ? /* @__PURE__ */ a("div", { className: "astw:px-4 astw:pt-2 astw:pb-4 astw:text-center astw:text-sm astw:text-muted-foreground", children: n }) : Zt(m, g);
3157
+ if (l.multiple) {
3158
+ const { value: x, defaultValue: G, onValueChange: j, renderValue: Nt } = l;
3159
+ return /* @__PURE__ */ a("div", { className: o, children: /* @__PURE__ */ d(
3160
+ st,
3161
+ {
3162
+ multiple: !0,
3163
+ value: x,
3164
+ defaultValue: G,
3165
+ onValueChange: j && ((ct) => j(ct)),
3166
+ onOpenChange: f,
3167
+ itemToStringLabel: y,
3168
+ disabled: i,
3169
+ children: [
3170
+ /* @__PURE__ */ a(nt, { children: Nt ? /* @__PURE__ */ a(O, { placeholder: s, children: (ct) => Nt(ct) }) : /* @__PURE__ */ a(O, { placeholder: s }) }),
3171
+ /* @__PURE__ */ a(rt, { children: v })
3172
+ ]
3173
+ }
3174
+ ) });
3175
+ }
3176
+ const { value: S, defaultValue: T, onValueChange: P, renderValue: R } = l;
3177
+ return /* @__PURE__ */ a("div", { className: o, children: /* @__PURE__ */ d(
3178
+ st,
3179
+ {
3180
+ value: S,
3181
+ defaultValue: T,
3182
+ onValueChange: P && ((x) => P(x)),
3183
+ onOpenChange: f,
3184
+ itemToStringLabel: y,
3185
+ disabled: i,
3186
+ children: [
3187
+ /* @__PURE__ */ a(nt, { children: R ? /* @__PURE__ */ a(O, { placeholder: s, children: (x) => R(x) }) : /* @__PURE__ */ a(O, { placeholder: s }) }),
3188
+ /* @__PURE__ */ a(rt, { children: v })
3189
+ ]
3190
+ }
3191
+ ) });
3192
+ }
3193
+ const _o = Object.assign(Mr, {
3194
+ Async: Vr,
3195
+ Parts: Ar
3196
+ }), Dr = 300;
3197
+ function _r(t) {
3198
+ return typeof t == "function" ? { fn: t, debounceMs: Dr } : t;
3199
+ }
3200
+ function cs({ fetcher: t }) {
3201
+ const { fn: e, debounceMs: s } = _r(t), [n, r] = V([]), [o, i] = V(!1), [l, m] = V(""), [u, w] = V(void 0), p = U(null), h = U(null), b = U(e);
3202
+ b.current = e;
3203
+ const f = A(
3204
+ (g) => {
3205
+ if (m(g), h.current && (clearTimeout(h.current), h.current = null), g.trim().length === 0) {
3206
+ p.current?.abort(), p.current = null, r([]), w(void 0), i(!1);
3207
+ return;
3208
+ }
3209
+ i(!0), h.current = setTimeout(async () => {
3210
+ p.current?.abort();
3211
+ const y = new AbortController();
3212
+ p.current = y;
3213
+ try {
3214
+ const v = await b.current(g.trim(), {
3215
+ signal: y.signal
3216
+ });
3217
+ y.signal.aborted || (r(v), w(void 0));
3218
+ } catch (v) {
3219
+ if (v instanceof DOMException && v.name === "AbortError") return;
3220
+ y.signal.aborted || (r([]), w(v));
3221
+ } finally {
3222
+ y.signal.aborted || i(!1);
3223
+ }
3224
+ }, s);
3225
+ },
3226
+ [s]
3227
+ );
3228
+ return X(() => () => {
3229
+ h.current && clearTimeout(h.current), p.current?.abort();
3230
+ }, []), { items: n, loading: o, query: l, error: u, onInputValueChange: f };
3231
+ }
3232
+ function At(t) {
3233
+ return /* @__PURE__ */ a(I.Root, { "data-slot": "combobox", ...t });
3234
+ }
3235
+ At.displayName = "Combobox.Root";
3236
+ function mt({ className: t, ...e }) {
3237
+ return /* @__PURE__ */ a(
3238
+ I.Input,
3239
+ {
3240
+ "data-slot": "combobox-input",
3241
+ className: c(
3242
+ "astw:border-input astw:bg-background astw:text-foreground astw:placeholder:text-muted-foreground astw:flex astw:h-9 astw:w-full astw:rounded-md astw:border astw:px-3 astw:py-1 astw:text-sm astw:shadow-xs astw:outline-none astw:transition-colors",
3243
+ "astw:focus-visible:border-ring astw:focus-visible:ring-ring/50 astw:focus-visible:ring-[3px]",
3244
+ "astw:disabled:cursor-not-allowed astw:disabled:opacity-50",
3245
+ t
3246
+ ),
3247
+ ...e
3248
+ }
3249
+ );
3250
+ }
3251
+ mt.displayName = "Combobox.Input";
3252
+ function $t({
3253
+ className: t,
3254
+ children: e,
3255
+ ...s
3256
+ }) {
3257
+ return /* @__PURE__ */ a(
3258
+ I.Trigger,
3259
+ {
3260
+ "data-slot": "combobox-trigger",
3261
+ className: c(
3262
+ "astw:absolute astw:inset-y-0 astw:right-0 astw:flex astw:items-center astw:px-2 astw:text-muted-foreground astw:outline-none",
3263
+ "astw:hover:text-foreground",
3264
+ "astw:disabled:pointer-events-none astw:disabled:opacity-50",
3265
+ t
3266
+ ),
3267
+ ...s,
3268
+ children: e ?? /* @__PURE__ */ a(I.Icon, { children: /* @__PURE__ */ a(ae, { className: "astw:size-4" }) })
3269
+ }
3270
+ );
3271
+ }
3272
+ $t.displayName = "Combobox.Trigger";
3273
+ function Mt({
3274
+ className: t,
3275
+ children: e,
3276
+ ...s
3277
+ }) {
3278
+ return /* @__PURE__ */ a(
3279
+ I.InputGroup,
3280
+ {
3281
+ "data-slot": "combobox-input-group",
3282
+ className: c("astw:relative astw:flex astw:items-center", t),
3283
+ ...s,
3284
+ children: e ?? /* @__PURE__ */ d(M, { children: [
3285
+ /* @__PURE__ */ a(mt, {}),
3286
+ /* @__PURE__ */ a(Ft, {}),
3287
+ /* @__PURE__ */ a($t, {})
3288
+ ] })
3289
+ }
3290
+ );
3291
+ }
3292
+ Mt.displayName = "Combobox.InputGroup";
3293
+ function Vt({ className: t, ...e }) {
3294
+ return /* @__PURE__ */ a(I.Portal, { children: /* @__PURE__ */ a(I.Positioner, { children: /* @__PURE__ */ a(
3295
+ I.Popup,
3296
+ {
3297
+ "data-slot": "combobox-content",
3298
+ className: c(
3299
+ "astw:bg-popover astw:text-popover-foreground astw:data-open:animate-in astw:data-ending-style:animate-out astw:data-ending-style:fade-out-0 astw:data-open:fade-in-0 astw:data-ending-style:zoom-out-95 astw:data-open:zoom-in-95 astw:z-50 astw:w-[var(--anchor-width)] astw:min-w-32 astw:origin-(--transform-origin) astw:overflow-hidden astw:rounded-md astw:border astw:shadow-md",
3300
+ t
3301
+ ),
3302
+ ...e
3303
+ }
3304
+ ) }) });
3305
+ }
3306
+ Vt.displayName = "Combobox.Content";
3307
+ function Dt({ className: t, ...e }) {
3308
+ return /* @__PURE__ */ a(
3309
+ I.List,
3310
+ {
3311
+ "data-slot": "combobox-list",
3312
+ className: c("astw:max-h-60 astw:overflow-y-auto astw:p-1", t),
3313
+ ...e
3314
+ }
3315
+ );
3316
+ }
3317
+ Dt.displayName = "Combobox.List";
3318
+ function pt({
3319
+ className: t,
3320
+ children: e,
3321
+ ...s
3322
+ }) {
3323
+ return /* @__PURE__ */ d(
3324
+ I.Item,
3325
+ {
3326
+ "data-slot": "combobox-item",
3327
+ className: c(
3328
+ "astw:relative astw:flex astw:w-full astw:cursor-default astw:items-center astw:gap-2 astw:rounded-sm astw:py-1.5 astw:pr-8 astw:pl-2 astw:text-sm astw:outline-hidden astw:select-none",
3329
+ "astw:data-highlighted:bg-accent astw:data-highlighted:text-accent-foreground",
3330
+ "astw:data-disabled:pointer-events-none astw:data-disabled:opacity-50",
3331
+ t
3332
+ ),
3333
+ ...s,
3334
+ children: [
3335
+ /* @__PURE__ */ a("span", { className: "astw:absolute astw:right-2 astw:flex astw:size-3.5 astw:items-center astw:justify-center", children: /* @__PURE__ */ a(I.ItemIndicator, { children: /* @__PURE__ */ a(je, { className: "astw:size-4" }) }) }),
3336
+ e
3337
+ ]
3338
+ }
3339
+ );
3340
+ }
3341
+ pt.displayName = "Combobox.Item";
3342
+ function _t({ className: t, ...e }) {
3343
+ return /* @__PURE__ */ a(
3344
+ I.Empty,
3345
+ {
3346
+ "data-slot": "combobox-empty",
3347
+ className: c(
3348
+ "astw:px-4 astw:pt-2 astw:pb-4 astw:text-center astw:text-sm astw:text-muted-foreground astw:empty:hidden",
3349
+ t
3350
+ ),
3351
+ ...e
3352
+ }
3353
+ );
3354
+ }
3355
+ _t.displayName = "Combobox.Empty";
3356
+ function fe({ ...t }) {
3357
+ return /* @__PURE__ */ a(I.Group, { "data-slot": "combobox-group", ...t });
3358
+ }
3359
+ fe.displayName = "Combobox.Group";
3360
+ function ge({
3361
+ className: t,
3362
+ ...e
3363
+ }) {
3364
+ return /* @__PURE__ */ a(
3365
+ I.GroupLabel,
3366
+ {
3367
+ "data-slot": "combobox-group-label",
3368
+ className: c(
3369
+ "astw:text-muted-foreground astw:px-2 astw:py-1.5 astw:text-xs astw:font-medium",
3370
+ t
3371
+ ),
3372
+ ...e
3373
+ }
3374
+ );
3375
+ }
3376
+ ge.displayName = "Combobox.GroupLabel";
3377
+ function Ft({
3378
+ className: t,
3379
+ children: e,
3380
+ ...s
3381
+ }) {
3382
+ return /* @__PURE__ */ a(
3383
+ I.Clear,
3384
+ {
3385
+ "data-slot": "combobox-clear",
3386
+ className: c(
3387
+ "astw:absolute astw:inset-y-0 astw:right-6 astw:flex astw:items-center astw:px-1 astw:text-muted-foreground astw:outline-none",
3388
+ "astw:hover:text-foreground",
3389
+ t
3390
+ ),
3391
+ ...s,
3392
+ children: e ?? /* @__PURE__ */ a(gt, { className: "astw:size-3.5" })
3393
+ }
3394
+ );
3395
+ }
3396
+ Ft.displayName = "Combobox.Clear";
3397
+ function be({ className: t, ...e }) {
3398
+ return /* @__PURE__ */ a(
3399
+ I.Chips,
3400
+ {
3401
+ "data-slot": "combobox-chips",
3402
+ className: c(
3403
+ "astw:border-input astw:bg-background astw:flex astw:min-h-9 astw:w-full astw:flex-wrap astw:items-center astw:gap-1 astw:rounded-md astw:border astw:px-1.5 astw:py-1 astw:text-sm astw:shadow-xs",
3404
+ "astw:focus-within:border-ring astw:focus-within:ring-ring/50 astw:focus-within:ring-[3px]",
3405
+ // Strip standalone styles from nested Input
3406
+ "astw:[&_[data-slot=combobox-input]]:border-0 astw:[&_[data-slot=combobox-input]]:bg-transparent astw:[&_[data-slot=combobox-input]]:shadow-none astw:[&_[data-slot=combobox-input]]:ring-0",
3407
+ "astw:[&_[data-slot=combobox-input]]:h-auto astw:[&_[data-slot=combobox-input]]:min-w-20 astw:[&_[data-slot=combobox-input]]:flex-1 astw:[&_[data-slot=combobox-input]]:px-1.5 astw:[&_[data-slot=combobox-input]]:py-0",
3408
+ "astw:[&_[data-slot=combobox-input]]:focus-visible:border-transparent astw:[&_[data-slot=combobox-input]]:focus-visible:ring-0",
3409
+ t
3410
+ ),
3411
+ ...e
3412
+ }
3413
+ );
3414
+ }
3415
+ be.displayName = "Combobox.Chips";
3416
+ function xe({ className: t, ...e }) {
3417
+ return /* @__PURE__ */ a(
3418
+ I.Chip,
3419
+ {
3420
+ "data-slot": "combobox-chip",
3421
+ className: c(
3422
+ "astw:bg-secondary astw:text-secondary-foreground astw:flex astw:cursor-default astw:items-center astw:gap-1 astw:rounded-md astw:px-1.5 astw:py-0.5 astw:text-sm astw:outline-none",
3423
+ "astw:data-highlighted:bg-primary astw:data-highlighted:text-primary-foreground",
3424
+ "astw:focus-within:bg-primary astw:focus-within:text-primary-foreground",
3425
+ t
3426
+ ),
3427
+ ...e
3428
+ }
3429
+ );
3430
+ }
3431
+ xe.displayName = "Combobox.Chip";
3432
+ function ve({
3433
+ className: t,
3434
+ children: e,
3435
+ ...s
3436
+ }) {
3437
+ return /* @__PURE__ */ a(
3438
+ I.ChipRemove,
3439
+ {
3440
+ "data-slot": "combobox-chip-remove",
3441
+ className: c(
3442
+ "astw:rounded-sm astw:p-0.5 astw:text-inherit astw:outline-none",
3443
+ "astw:hover:bg-secondary-foreground/20",
3444
+ t
3445
+ ),
3446
+ ...s,
3447
+ children: e ?? /* @__PURE__ */ a(gt, { className: "astw:size-3" })
3448
+ }
3449
+ );
3450
+ }
3451
+ ve.displayName = "Combobox.ChipRemove";
3452
+ function ye({ ...t }) {
3453
+ return /* @__PURE__ */ a(I.Value, { "data-slot": "combobox-value", ...t });
3454
+ }
3455
+ ye.displayName = "Combobox.Value";
3456
+ function ds({ className: t, ...e }) {
3457
+ return /* @__PURE__ */ a(
3458
+ I.Status,
3459
+ {
3460
+ "data-slot": "combobox-status",
3461
+ className: c("astw:sr-only", t),
3462
+ ...e
3463
+ }
3464
+ );
3465
+ }
3466
+ ds.displayName = "Combobox.Status";
3467
+ function Ne({ ...t }) {
3468
+ return /* @__PURE__ */ a(I.Collection, { "data-slot": "combobox-collection", ...t });
3469
+ }
3470
+ Ne.displayName = "Combobox.Collection";
3471
+ const Er = (t) => `Create "${t}"`;
3472
+ function Ce(t) {
3473
+ const {
3474
+ items: e,
3475
+ getLabel: s,
3476
+ createItem: n,
3477
+ onItemCreated: r,
3478
+ formatCreateLabel: o = Er
3479
+ } = t, i = "multiple" in t && t.multiple === !0, [l, m] = V(
3480
+ () => i ? t.defaultValue ?? [] : t.defaultValue ?? null
3481
+ ), [u, w] = V(""), [p, h] = V(!1), b = l, f = l, g = m, y = m, v = U(null), S = t.onValueChange, T = u.trim(), P = T.toLocaleLowerCase(), R = T !== "" && e.some((C) => s(C).trim().toLocaleLowerCase() === P), x = H(() => p || T === "" || R ? null : { item: n(T), label: T }, [p, T, R, n]), G = H(() => x ? [...e, x.item] : e, [e, x]), j = A(
3482
+ (C) => x !== null && C === x.item,
3483
+ [x]
3484
+ ), Nt = A(
3485
+ (C) => x !== null && C === x.item ? x.label : void 0,
3486
+ [x]
3487
+ ), ct = A(
3488
+ (C) => x !== null && C === x.item ? o(x.label) : s(C),
3489
+ [x, s, o]
3490
+ ), gs = A(
3491
+ (C) => x !== null && C === x.item ? "" : s(C),
3492
+ [x, s]
3493
+ ), Ct = A(
3494
+ (C, St) => {
3495
+ if (p) return;
3496
+ const Z = n(C), Tt = (E) => {
3497
+ const Rt = E ?? Z;
3498
+ if (i) {
3499
+ const Pe = [...St ?? [], Rt];
3500
+ g(Pe), S?.(Pe);
3501
+ } else
3502
+ y(Rt), S?.(Rt);
3503
+ w(i ? "" : s(Rt));
3504
+ };
3505
+ if (!r) {
3506
+ Tt();
3507
+ return;
3508
+ }
3509
+ i || (v.current = C, w(C));
3510
+ const It = (E) => {
3511
+ if (v.current = null, h(!1), E === !1) {
3512
+ w("");
3513
+ return;
3514
+ }
3515
+ Tt(E != null && typeof E == "object" ? E : void 0);
3516
+ }, Le = () => {
3517
+ v.current = null, h(!1), w("");
3518
+ };
3519
+ try {
3520
+ const E = r(Z);
3521
+ E != null && typeof E.then == "function" ? (h(!0), E.then(It, Le)) : It(E);
3522
+ } catch {
3523
+ Le();
3524
+ }
3525
+ },
3526
+ [
3527
+ p,
3528
+ i,
3529
+ n,
3530
+ r,
3531
+ S,
3532
+ s,
3533
+ y,
3534
+ g
3535
+ ]
3536
+ ), bs = A(
3537
+ (C) => {
3538
+ if (C.find((Z) => x !== null && Z === x.item) && x) {
3539
+ const Z = x.label, Tt = C.filter((It) => !(x !== null && It === x.item));
3540
+ Ct(Z, Tt);
3541
+ return;
3542
+ }
3543
+ g(C), S?.(C), w("");
3544
+ },
3545
+ [Ct, S, x, g]
3546
+ ), xs = A(
3547
+ (C) => {
3548
+ if (C && x !== null && C === x.item) {
3549
+ const St = x.label;
3550
+ Ct(St);
3551
+ return;
3552
+ }
3553
+ y(C), S?.(C), w("");
3554
+ },
3555
+ [Ct, S, x, y]
3556
+ ), ke = {
3557
+ items: G,
3558
+ inputValue: u,
3559
+ onInputValueChange: A((C) => {
3560
+ v.current !== null && C === "" || w(C);
3561
+ }, []),
3562
+ itemToStringLabel: ct,
3563
+ itemToStringValue: gs,
3564
+ isCreateItem: j,
3565
+ getCreateLabel: Nt,
3566
+ formatCreateLabel: o,
3567
+ creating: p
3568
+ };
3569
+ return i ? {
3570
+ ...ke,
3571
+ value: b,
3572
+ onValueChange: bs,
3573
+ multiple: !0
3574
+ } : {
3575
+ ...ke,
3576
+ value: f,
3577
+ onValueChange: xs,
3578
+ multiple: !1
3579
+ };
3580
+ }
3581
+ function Se(t) {
3582
+ return cs(t);
3583
+ }
3584
+ const Br = {
3585
+ Root: At,
3586
+ InputGroup: Mt,
3587
+ Input: mt,
3588
+ Trigger: $t,
3589
+ Content: Vt,
3590
+ List: Dt,
3591
+ Item: pt,
3592
+ Empty: _t,
3593
+ Group: fe,
3594
+ GroupLabel: ge,
3595
+ Clear: Ft,
3596
+ Chips: be,
3597
+ Chip: xe,
3598
+ ChipRemove: ve,
3599
+ Value: ye,
3600
+ Collection: Ne,
3601
+ Status: ds,
3602
+ useFilter: I.useFilter,
3603
+ useCreatable: Ce,
3604
+ useAsync: Se
3605
+ };
3606
+ function Ot({
3607
+ className: t,
3608
+ placeholder: e,
3609
+ disabled: s,
3610
+ emptyContent: n,
3611
+ mapItem: r,
3612
+ listChildren: o,
3613
+ multiple: i,
3614
+ rootProps: l
3615
+ }) {
3616
+ return i ? /* @__PURE__ */ a("div", { className: t, children: /* @__PURE__ */ d(At, { multiple: !0, ...l, disabled: s, children: [
3617
+ /* @__PURE__ */ a(Mt, { children: /* @__PURE__ */ a(be, { children: /* @__PURE__ */ a(ye, { children: (m) => /* @__PURE__ */ d(M, { children: [
3618
+ m.map((u) => {
3619
+ const w = r(u);
3620
+ return /* @__PURE__ */ d(xe, { "aria-label": w.label, children: [
3621
+ w.label,
3622
+ /* @__PURE__ */ a(ve, {})
3623
+ ] }, w.key ?? w.label);
3624
+ }),
3625
+ /* @__PURE__ */ a(mt, { placeholder: m.length > 0 ? "" : e })
3626
+ ] }) }) }) }),
3627
+ /* @__PURE__ */ d(Vt, { children: [
3628
+ /* @__PURE__ */ a(_t, { children: n }),
3629
+ /* @__PURE__ */ a(Dt, { children: o })
3630
+ ] })
3631
+ ] }) }) : /* @__PURE__ */ a("div", { className: t, children: /* @__PURE__ */ d(At, { ...l, disabled: s, children: [
3632
+ /* @__PURE__ */ d(Mt, { children: [
3633
+ /* @__PURE__ */ a(mt, { placeholder: e }),
3634
+ /* @__PURE__ */ a(Ft, {}),
3635
+ /* @__PURE__ */ a($t, {})
3636
+ ] }),
3637
+ /* @__PURE__ */ d(Vt, { children: [
3638
+ /* @__PURE__ */ a(_t, { children: n }),
3639
+ /* @__PURE__ */ a(Dt, { children: o })
3640
+ ] })
3641
+ ] }) });
3642
+ }
3643
+ function Jt(t) {
3644
+ return (e) => {
3645
+ const s = t(e);
3646
+ return /* @__PURE__ */ a(pt, { value: e, children: s.render ?? s.label }, s.key ?? s.label);
3647
+ };
3648
+ }
3649
+ function us(t, e) {
3650
+ return (s) => {
3651
+ if (e.isCreateItem(s))
3652
+ return /* @__PURE__ */ a(pt, { value: s, children: e.formatCreateLabel(e.getCreateLabel(s) ?? "") }, "__create__");
3653
+ const n = t(s);
3654
+ return /* @__PURE__ */ a(pt, { value: s, children: n.render ?? n.label }, n.key ?? n.label);
3655
+ };
3656
+ }
3657
+ function zr(t) {
3658
+ const {
3659
+ items: e,
3660
+ placeholder: s,
3661
+ emptyText: n = "No results.",
3662
+ mapItem: r,
3663
+ className: o,
3664
+ disabled: i,
3665
+ multiple: l,
3666
+ ...m
3667
+ } = t, u = r ?? lt, w = (h) => u(h).label, p = he(e) ? (h) => {
3668
+ const b = h;
3669
+ return /* @__PURE__ */ d(fe, { items: b.items, children: [
3670
+ /* @__PURE__ */ a(ge, { children: b.label }),
3671
+ /* @__PURE__ */ a(Ne, { children: Jt(u) })
3672
+ ] }, b.label);
3673
+ } : Jt(u);
3674
+ return /* @__PURE__ */ a(
3675
+ Ot,
3676
+ {
3677
+ className: o,
3678
+ placeholder: s,
3679
+ disabled: i,
3680
+ emptyContent: n,
3681
+ mapItem: u,
3682
+ listChildren: p,
3683
+ multiple: l,
3684
+ rootProps: {
3685
+ items: e,
3686
+ ...m,
3687
+ itemToStringLabel: w
3688
+ }
3689
+ }
3690
+ );
3691
+ }
3692
+ function $r(t) {
3693
+ const {
3694
+ items: e,
3695
+ placeholder: s,
3696
+ emptyText: n = "No results.",
3697
+ mapItem: r,
3698
+ onCreateItem: o,
3699
+ formatCreateLabel: i,
3700
+ className: l,
3701
+ disabled: m,
3702
+ multiple: u,
3703
+ value: w,
3704
+ defaultValue: p,
3705
+ onValueChange: h
3706
+ } = t, v = Ce({
3707
+ items: e,
3708
+ multiple: u,
3709
+ getLabel: (S) => r(S).label,
3710
+ createItem: (S) => ({ __pending: !0, __value: S }),
3711
+ onItemCreated: (S) => o(S.__value),
3712
+ formatCreateLabel: i,
3713
+ defaultValue: p,
3714
+ onValueChange: h
3715
+ });
3716
+ return /* @__PURE__ */ a(
3717
+ Ot,
3718
+ {
3719
+ className: l,
3720
+ placeholder: s,
3721
+ disabled: m || v.creating,
3722
+ emptyContent: n,
3723
+ mapItem: r,
3724
+ listChildren: us(r, v),
3725
+ multiple: u,
3726
+ rootProps: {
3727
+ items: v.items,
3728
+ value: w ?? v.value,
3729
+ onValueChange: v.onValueChange,
3730
+ inputValue: v.inputValue,
3731
+ onInputValueChange: v.onInputValueChange,
3732
+ itemToStringLabel: v.itemToStringLabel,
3733
+ itemToStringValue: v.itemToStringValue
3734
+ }
3735
+ }
3736
+ );
3737
+ }
3738
+ function Fr(t) {
3739
+ return "onCreateItem" in t ? /* @__PURE__ */ a($r, { ...t }) : /* @__PURE__ */ a(zr, { ...t });
3740
+ }
3741
+ function Or(t) {
3742
+ const {
3743
+ fetcher: e,
3744
+ placeholder: s,
3745
+ emptyText: n = "No results.",
3746
+ loadingText: r = "Loading...",
3747
+ mapItem: o,
3748
+ className: i,
3749
+ disabled: l,
3750
+ multiple: m,
3751
+ ...u
3752
+ } = t, w = Se({ fetcher: e }), p = o ?? lt, h = (b) => p(b).label;
3753
+ return /* @__PURE__ */ a(
3754
+ Ot,
3755
+ {
3756
+ className: i,
3757
+ placeholder: s,
3758
+ disabled: l,
3759
+ emptyContent: w.loading ? r : n,
3760
+ mapItem: p,
3761
+ listChildren: Jt(p),
3762
+ multiple: m,
3763
+ rootProps: {
3764
+ items: w.items,
3765
+ filter: null,
3766
+ onInputValueChange: w.onInputValueChange,
3767
+ ...u,
3768
+ itemToStringLabel: h
3769
+ }
3770
+ }
3771
+ );
3772
+ }
3773
+ function Gr(t) {
3774
+ const {
3775
+ fetcher: e,
3776
+ placeholder: s,
3777
+ emptyText: n = "No results.",
3778
+ loadingText: r = "Loading...",
3779
+ mapItem: o,
3780
+ onCreateItem: i,
3781
+ formatCreateLabel: l,
3782
+ className: m,
3783
+ disabled: u,
3784
+ multiple: w,
3785
+ value: p,
3786
+ defaultValue: h,
3787
+ onValueChange: b
3788
+ } = t, f = Se({ fetcher: e }), g = (P) => o(P).label, y = (P) => ({ __pending: !0, __value: P }), v = (P) => i(P.__value), S = {
3789
+ items: f.items,
3790
+ multiple: w,
3791
+ getLabel: g,
3792
+ createItem: y,
3793
+ onItemCreated: v,
3794
+ formatCreateLabel: l,
3795
+ defaultValue: h,
3796
+ onValueChange: b
3797
+ }, T = Ce(S);
3798
+ return /* @__PURE__ */ a(
3799
+ Ot,
3800
+ {
3801
+ className: m,
3802
+ placeholder: s,
3803
+ disabled: u || T.creating,
3804
+ emptyContent: f.loading ? r : n,
3805
+ mapItem: o,
3806
+ listChildren: us(o, T),
3807
+ multiple: w,
3808
+ rootProps: {
3809
+ items: T.items,
3810
+ filter: null,
3811
+ value: p ?? T.value,
3812
+ onValueChange: T.onValueChange,
3813
+ inputValue: T.inputValue,
3814
+ onInputValueChange: (P) => {
3815
+ T.onInputValueChange(P), f.onInputValueChange(P);
3816
+ },
3817
+ itemToStringLabel: T.itemToStringLabel,
3818
+ itemToStringValue: T.itemToStringValue
3819
+ }
3820
+ }
3821
+ );
3822
+ }
3823
+ function jr(t) {
3824
+ return "onCreateItem" in t ? /* @__PURE__ */ a(Gr, { ...t }) : /* @__PURE__ */ a(Or, { ...t });
3825
+ }
3826
+ const Eo = Object.assign(Fr, {
3827
+ Async: jr,
3828
+ Parts: Br
3829
+ });
3830
+ function Gt(t) {
3831
+ return /* @__PURE__ */ a(
3832
+ L.Root,
3833
+ {
3834
+ "data-slot": "autocomplete",
3835
+ ...t
3836
+ }
3837
+ );
3838
+ }
3839
+ Gt.displayName = "Autocomplete.Root";
3840
+ function ws({ ...t }) {
3841
+ return /* @__PURE__ */ a(L.Value, { "data-slot": "autocomplete-value", ...t });
3842
+ }
3843
+ ws.displayName = "Autocomplete.Value";
3844
+ function xt({
3845
+ className: t,
3846
+ ...e
3847
+ }) {
3848
+ return /* @__PURE__ */ a(
3849
+ L.Input,
3850
+ {
3851
+ "data-slot": "autocomplete-input",
3852
+ className: c(
3853
+ "astw:border-input astw:bg-background astw:text-foreground astw:placeholder:text-muted-foreground astw:flex astw:h-9 astw:w-full astw:rounded-md astw:border astw:px-3 astw:py-1 astw:text-sm astw:shadow-xs astw:outline-none astw:transition-colors",
3854
+ "astw:focus-visible:border-ring astw:focus-visible:ring-ring/50 astw:focus-visible:ring-[3px]",
3855
+ "astw:disabled:cursor-not-allowed astw:disabled:opacity-50",
3856
+ t
3857
+ ),
3858
+ ...e
3859
+ }
3860
+ );
3861
+ }
3862
+ xt.displayName = "Autocomplete.Input";
3863
+ function vt({
3864
+ className: t,
3865
+ children: e,
3866
+ ...s
3867
+ }) {
3868
+ return /* @__PURE__ */ a(
3869
+ L.Trigger,
3870
+ {
3871
+ "data-slot": "autocomplete-trigger",
3872
+ className: c(
3873
+ "astw:absolute astw:inset-y-0 astw:right-0 astw:flex astw:items-center astw:px-2 astw:text-muted-foreground astw:outline-none",
3874
+ "astw:hover:text-foreground",
3875
+ "astw:disabled:pointer-events-none astw:disabled:opacity-50",
3876
+ t
3877
+ ),
3878
+ ...s,
3879
+ children: e ?? /* @__PURE__ */ a(L.Icon, { children: /* @__PURE__ */ a(ae, { className: "astw:size-4" }) })
3880
+ }
3881
+ );
3882
+ }
3883
+ vt.displayName = "Autocomplete.Trigger";
3884
+ function jt({ className: t, children: e, ...s }) {
3885
+ return /* @__PURE__ */ a(
3886
+ "div",
3887
+ {
3888
+ "data-slot": "autocomplete-input-group",
3889
+ className: c("astw:relative astw:flex astw:items-center", t),
3890
+ ...s,
3891
+ children: e ?? /* @__PURE__ */ d(M, { children: [
3892
+ /* @__PURE__ */ a(xt, {}),
3893
+ /* @__PURE__ */ a(yt, {}),
3894
+ /* @__PURE__ */ a(vt, {})
3895
+ ] })
3896
+ }
3897
+ );
3898
+ }
3899
+ jt.displayName = "Autocomplete.InputGroup";
3900
+ function Wt({
3901
+ className: t,
3902
+ ...e
3903
+ }) {
3904
+ return /* @__PURE__ */ a(L.Portal, { children: /* @__PURE__ */ a(L.Positioner, { children: /* @__PURE__ */ a(
3905
+ L.Popup,
3906
+ {
3907
+ "data-slot": "autocomplete-content",
3908
+ className: c(
3909
+ "astw:bg-popover astw:text-popover-foreground astw:data-open:animate-in astw:data-ending-style:animate-out astw:data-ending-style:fade-out-0 astw:data-open:fade-in-0 astw:data-ending-style:zoom-out-95 astw:data-open:zoom-in-95 astw:z-50 astw:w-[var(--anchor-width)] astw:min-w-32 astw:origin-(--transform-origin) astw:overflow-hidden astw:rounded-md astw:border astw:shadow-md",
3910
+ t
3911
+ ),
3912
+ ...e
3913
+ }
3914
+ ) }) });
3915
+ }
3916
+ Wt.displayName = "Autocomplete.Content";
3917
+ function Ht({
3918
+ className: t,
3919
+ ...e
3920
+ }) {
3921
+ return /* @__PURE__ */ a(
3922
+ L.List,
3923
+ {
3924
+ "data-slot": "autocomplete-list",
3925
+ className: c("astw:max-h-60 astw:overflow-y-auto astw:p-1", t),
3926
+ ...e
3927
+ }
3928
+ );
3929
+ }
3930
+ Ht.displayName = "Autocomplete.List";
3931
+ function ht({
3932
+ className: t,
3933
+ ...e
3934
+ }) {
3935
+ return /* @__PURE__ */ a(
3936
+ L.Item,
3937
+ {
3938
+ "data-slot": "autocomplete-item",
3939
+ className: c(
3940
+ "astw:relative astw:flex astw:w-full astw:cursor-default astw:items-center astw:gap-2 astw:rounded-sm astw:py-1.5 astw:px-2 astw:text-sm astw:outline-hidden astw:select-none",
3941
+ "astw:data-highlighted:bg-accent astw:data-highlighted:text-accent-foreground",
3942
+ "astw:data-disabled:pointer-events-none astw:data-disabled:opacity-50",
3943
+ t
3944
+ ),
3945
+ ...e
3946
+ }
3947
+ );
3948
+ }
3949
+ ht.displayName = "Autocomplete.Item";
3950
+ function Ut({
3951
+ className: t,
3952
+ ...e
3953
+ }) {
3954
+ return /* @__PURE__ */ a(
3955
+ L.Empty,
3956
+ {
3957
+ "data-slot": "autocomplete-empty",
3958
+ className: c(
3959
+ "astw:px-4 astw:pt-2 astw:pb-4 astw:text-center astw:text-sm astw:text-muted-foreground astw:empty:hidden",
3960
+ t
3961
+ ),
3962
+ ...e
3963
+ }
3964
+ );
3965
+ }
3966
+ Ut.displayName = "Autocomplete.Empty";
3967
+ function yt({
3968
+ className: t,
3969
+ children: e,
3970
+ ...s
3971
+ }) {
3972
+ return /* @__PURE__ */ a(
3973
+ L.Clear,
3974
+ {
3975
+ "data-slot": "autocomplete-clear",
3976
+ className: c(
3977
+ "astw:absolute astw:inset-y-0 astw:right-6 astw:flex astw:items-center astw:px-1 astw:text-muted-foreground astw:outline-none",
3978
+ "astw:hover:text-foreground",
3979
+ t
3980
+ ),
3981
+ ...s,
3982
+ children: e ?? /* @__PURE__ */ a(gt, { className: "astw:size-3.5" })
3983
+ }
3984
+ );
3985
+ }
3986
+ yt.displayName = "Autocomplete.Clear";
3987
+ function Te({ ...t }) {
3988
+ return /* @__PURE__ */ a(L.Group, { "data-slot": "autocomplete-group", ...t });
3989
+ }
3990
+ Te.displayName = "Autocomplete.Group";
3991
+ function Ie({
3992
+ className: t,
3993
+ ...e
3994
+ }) {
3995
+ return /* @__PURE__ */ a(
3996
+ L.GroupLabel,
3997
+ {
3998
+ "data-slot": "autocomplete-group-label",
3999
+ className: c(
4000
+ "astw:text-muted-foreground astw:px-2 astw:py-1.5 astw:text-xs astw:font-medium",
4001
+ t
4002
+ ),
4003
+ ...e
4004
+ }
4005
+ );
4006
+ }
4007
+ Ie.displayName = "Autocomplete.GroupLabel";
4008
+ function Re({
4009
+ ...t
4010
+ }) {
4011
+ return /* @__PURE__ */ a(L.Collection, { "data-slot": "autocomplete-collection", ...t });
4012
+ }
4013
+ Re.displayName = "Autocomplete.Collection";
4014
+ function ms({
4015
+ className: t,
4016
+ ...e
4017
+ }) {
4018
+ return /* @__PURE__ */ a(
4019
+ L.Status,
4020
+ {
4021
+ "data-slot": "autocomplete-status",
4022
+ className: c("astw:sr-only", t),
4023
+ ...e
4024
+ }
4025
+ );
4026
+ }
4027
+ ms.displayName = "Autocomplete.Status";
4028
+ function ps(t) {
4029
+ const { items: e, loading: s, query: n, error: r, onInputValueChange: o } = cs(t);
4030
+ return {
4031
+ items: e,
4032
+ loading: s,
4033
+ value: n,
4034
+ error: r,
4035
+ onValueChange: o
4036
+ };
4037
+ }
4038
+ const Wr = {
4039
+ Root: Gt,
4040
+ Value: ws,
4041
+ InputGroup: jt,
4042
+ Input: xt,
4043
+ Trigger: vt,
4044
+ Content: Wt,
4045
+ List: Ht,
4046
+ Item: ht,
4047
+ Empty: Ut,
4048
+ Clear: yt,
4049
+ Group: Te,
4050
+ GroupLabel: Ie,
4051
+ Collection: Re,
4052
+ Status: ms,
4053
+ useFilter: L.useFilter,
4054
+ useAsync: ps
4055
+ };
4056
+ function hs(t) {
4057
+ const {
4058
+ items: e,
4059
+ placeholder: s,
4060
+ emptyText: n = "No results.",
4061
+ mapItem: r,
4062
+ className: o,
4063
+ disabled: i,
4064
+ value: l,
4065
+ defaultValue: m,
4066
+ onValueChange: u
4067
+ } = t, w = r ?? lt, p = he(e) ? (h) => /* @__PURE__ */ d(Te, { items: h.items, children: [
4068
+ /* @__PURE__ */ a(Ie, { children: h.label }),
4069
+ /* @__PURE__ */ a(Re, { children: (b) => {
4070
+ const f = w(b);
4071
+ return /* @__PURE__ */ a(ht, { value: f.label, children: f.render ?? f.label }, f.key ?? f.label);
4072
+ } })
4073
+ ] }, h.label) : (h) => {
4074
+ const b = w(h);
4075
+ return /* @__PURE__ */ a(ht, { value: b.label, children: b.render ?? b.label }, b.key ?? b.label);
4076
+ };
4077
+ return /* @__PURE__ */ a("div", { className: o, children: /* @__PURE__ */ d(
4078
+ Gt,
4079
+ {
4080
+ items: e,
4081
+ value: l,
4082
+ defaultValue: m,
4083
+ onValueChange: u,
4084
+ disabled: i,
4085
+ children: [
4086
+ /* @__PURE__ */ d(jt, { children: [
4087
+ /* @__PURE__ */ a(xt, { placeholder: s }),
4088
+ /* @__PURE__ */ a(yt, {}),
4089
+ /* @__PURE__ */ a(vt, {})
4090
+ ] }),
4091
+ /* @__PURE__ */ d(Wt, { children: [
4092
+ /* @__PURE__ */ a(Ut, { children: n }),
4093
+ /* @__PURE__ */ a(Ht, { children: p })
4094
+ ] })
4095
+ ]
4096
+ }
4097
+ ) });
4098
+ }
4099
+ hs.displayName = "Autocomplete";
4100
+ function fs(t) {
4101
+ const {
4102
+ fetcher: e,
4103
+ placeholder: s,
4104
+ emptyText: n = "No results.",
4105
+ loadingText: r = "Loading...",
4106
+ mapItem: o,
4107
+ className: i,
4108
+ disabled: l,
4109
+ value: m,
4110
+ defaultValue: u,
4111
+ onValueChange: w
4112
+ } = t, p = ps({ fetcher: e }), h = o ?? lt, b = N.useCallback(
4113
+ (f) => {
4114
+ p.onValueChange(f), w?.(f);
4115
+ },
4116
+ [p, w]
4117
+ );
4118
+ return /* @__PURE__ */ a("div", { className: i, children: /* @__PURE__ */ d(
4119
+ Gt,
4120
+ {
4121
+ items: p.items,
4122
+ value: m !== void 0 ? m : p.value,
4123
+ defaultValue: u,
4124
+ onValueChange: b,
4125
+ filter: null,
4126
+ disabled: l,
4127
+ children: [
4128
+ /* @__PURE__ */ d(jt, { children: [
4129
+ /* @__PURE__ */ a(xt, { placeholder: s }),
4130
+ /* @__PURE__ */ a(yt, {}),
4131
+ /* @__PURE__ */ a(vt, {})
4132
+ ] }),
4133
+ /* @__PURE__ */ d(Wt, { children: [
4134
+ /* @__PURE__ */ a(Ut, { children: p.loading ? r : n }),
4135
+ /* @__PURE__ */ a(Ht, { children: (f) => {
4136
+ const g = h(f);
4137
+ return /* @__PURE__ */ a(ht, { value: g.label, children: g.render ?? g.label }, g.key ?? g.label);
4138
+ } })
4139
+ ] })
4140
+ ]
4141
+ }
4142
+ ) });
2532
4143
  }
4144
+ fs.displayName = "Autocomplete.Async";
4145
+ const Bo = Object.assign(hs, {
4146
+ Async: fs,
4147
+ Parts: Wr
4148
+ });
2533
4149
  export {
2534
- cn as ActionPanel,
2535
- ee as AppShell,
2536
- sn as AuthProvider,
2537
- ss as Badge,
2538
- tn as CommandPalette,
2539
- Aa as DefaultSidebar,
2540
- ln as DescriptionCard,
2541
- ue as Layout,
2542
- mn as Link,
2543
- Xs as SidebarGroup,
2544
- Qs as SidebarItem,
2545
- Js as SidebarLayout,
2546
- Zs as SidebarSeparator,
2547
- en as WithGuard,
2548
- ts as badgeVariants,
2549
- an as createAuthClient,
2550
- dn as createTypedPaths,
2551
- Fe as defineI18nLabels,
2552
- qs as defineModule,
2553
- Ys as defineResource,
2554
- Vs as hidden,
2555
- Ks as pass,
2556
- Gs as redirectTo,
2557
- Ht as useAppShell,
2558
- C as useAppShellConfig,
2559
- Hs as useAppShellData,
2560
- nn as useAuth,
2561
- rn as useAuthSuspense,
2562
- hn as useLocation,
2563
- pn as useNavigate,
2564
- Ta as usePageMeta,
2565
- fn as useParams,
2566
- gn as useRouteError,
2567
- bn as useSearchParams,
2568
- Je as useTheme,
2569
- on as useToast
4150
+ Mo as ActionPanel,
4151
+ sa as AppShell,
4152
+ Io as AuthProvider,
4153
+ Bo as Autocomplete,
4154
+ rr as Badge,
4155
+ wt as Button,
4156
+ Eo as Combobox,
4157
+ Co as CommandPalette,
4158
+ En as DefaultSidebar,
4159
+ Ao as DescriptionCard,
4160
+ Xt as Dialog,
4161
+ gn as Input,
4162
+ za as Layout,
4163
+ Fo as Link,
4164
+ Do as Menu,
4165
+ _o as Select,
4166
+ $ as Sheet,
4167
+ vo as SidebarGroup,
4168
+ xo as SidebarItem,
4169
+ No as SidebarLayout,
4170
+ yo as SidebarSeparator,
4171
+ Vo as Table,
4172
+ z as Tooltip,
4173
+ So as WithGuard,
4174
+ ar as badgeVariants,
4175
+ js as buttonVariants,
4176
+ To as createAuthClient,
4177
+ Lo as createTypedPaths,
4178
+ Ks as defineI18nLabels,
4179
+ go as defineModule,
4180
+ bo as defineResource,
4181
+ ho as hidden,
4182
+ po as pass,
4183
+ fo as redirectTo,
4184
+ Ue as useAppShell,
4185
+ K as useAppShellConfig,
4186
+ mo as useAppShellData,
4187
+ Ro as useAuth,
4188
+ ko as useAuthSuspense,
4189
+ Oo as useLocation,
4190
+ Go as useNavigate,
4191
+ Mn as usePageMeta,
4192
+ jo as useParams,
4193
+ Wo as useRouteError,
4194
+ Ho as useSearchParams,
4195
+ on as useTheme,
4196
+ Po as useToast
2570
4197
  };