@tailor-platform/app-shell 0.23.0 → 0.24.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 +583 -539
- package/dist/index.d.ts +201 -66
- package/package.json +4 -4
package/dist/app-shell.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { cva as X } from "class-variance-authority";
|
|
1
|
+
import { jsx as a, jsxs as d, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import { capitalCase as A } from "change-case";
|
|
3
|
+
import { useRouteError as Yt, isRouteErrorResponse as Xt, redirect as kt, Outlet as G, NavLink as Zt, Navigate as Jt, useRouteLoaderData as te, createMemoryRouter as ee, createBrowserRouter as ae, RouterProvider as se, useHref as re, Link as ne, useLocation as Rt, Await as Et, useMatch as oe, useNavigate as ie } from "react-router";
|
|
4
|
+
import { Link as xs, useLocation as vs, useNavigate as ys, useParams as Ns, useRouteError as Cs, useSearchParams as Ss } from "react-router";
|
|
5
|
+
import { Slot as z } from "@radix-ui/react-slot";
|
|
6
|
+
import { cva as Y } from "class-variance-authority";
|
|
8
7
|
import { clsx as le } from "clsx";
|
|
9
8
|
import { twMerge as de } from "tailwind-merge";
|
|
10
|
-
import { AlertCircle as dt, Table as ce, XIcon as
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
9
|
+
import { AlertCircle as dt, Table as ce, XIcon as Bt, PanelLeftIcon as we, ChevronRight as Q, SunIcon as ue, SearchIcon as me, ExternalLink as he, Check as fe, Copy as ge } from "lucide-react";
|
|
10
|
+
import * as p from "react";
|
|
11
|
+
import { createContext as W, useContext as D, useState as R, useMemo as k, useEffect as y, Suspense as Dt, useRef as pe, useCallback as ct } from "react";
|
|
12
|
+
import { Toaster as be } from "sonner";
|
|
13
|
+
import * as X from "@radix-ui/react-collapsible";
|
|
14
14
|
import "@radix-ui/react-separator";
|
|
15
15
|
import * as b from "@radix-ui/react-dialog";
|
|
16
16
|
import * as E from "@radix-ui/react-tooltip";
|
|
17
|
-
import { print as
|
|
18
|
-
import { createAuthClient as
|
|
17
|
+
import { print as xe } from "graphql";
|
|
18
|
+
import { createAuthClient as ve } from "@tailor-platform/auth-browser-client";
|
|
19
19
|
function m(...t) {
|
|
20
20
|
return de(le(t));
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const ye = Y(
|
|
23
23
|
"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",
|
|
24
24
|
{
|
|
25
25
|
variants: {
|
|
@@ -44,7 +44,7 @@ const ve = X(
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
);
|
|
47
|
-
function
|
|
47
|
+
function _({
|
|
48
48
|
className: t,
|
|
49
49
|
variant: e,
|
|
50
50
|
size: s,
|
|
@@ -52,30 +52,57 @@ function I({
|
|
|
52
52
|
...n
|
|
53
53
|
}) {
|
|
54
54
|
return /* @__PURE__ */ a(
|
|
55
|
-
r ?
|
|
55
|
+
r ? z : "button",
|
|
56
56
|
{
|
|
57
57
|
"data-slot": "button",
|
|
58
|
-
className: m(
|
|
58
|
+
className: m(ye({ variant: e, size: s, className: t })),
|
|
59
59
|
...n
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
62
|
}
|
|
63
|
-
const
|
|
63
|
+
const $ = "en", Ne = () => {
|
|
64
64
|
try {
|
|
65
65
|
if (typeof navigator > "u")
|
|
66
|
-
return
|
|
66
|
+
return $;
|
|
67
67
|
const t = navigator.languages?.[0] ?? navigator.language;
|
|
68
|
-
return t ? new Intl.Locale(t).language :
|
|
68
|
+
return t ? new Intl.Locale(t).language : $;
|
|
69
69
|
} catch {
|
|
70
|
-
return
|
|
70
|
+
return $;
|
|
71
71
|
}
|
|
72
|
-
},
|
|
73
|
-
const e =
|
|
74
|
-
return (s, r) => e(s, typeof s == "string" ? s :
|
|
75
|
-
},
|
|
76
|
-
|
|
72
|
+
}, Z = (t) => (e, s) => e ? typeof e == "string" ? e : e(t) ?? s : s, Pt = (t) => {
|
|
73
|
+
const e = Z(t);
|
|
74
|
+
return (s, r) => e(s, typeof s == "string" ? s : A(r));
|
|
75
|
+
}, Ce = (t) => ({
|
|
76
|
+
modules: t.modules,
|
|
77
|
+
settingsResources: t.settingsResources ?? [],
|
|
78
|
+
errorBoundary: t.errorBoundary ?? /* @__PURE__ */ a(j, {}),
|
|
79
|
+
basePath: t.basePath,
|
|
80
|
+
locale: t.locale ?? Ne()
|
|
81
|
+
}), J = W({
|
|
82
|
+
configurations: {
|
|
83
|
+
modules: [],
|
|
84
|
+
settingsResources: [],
|
|
85
|
+
locale: $,
|
|
86
|
+
// Using null! to avoid circular dependency issues.
|
|
87
|
+
// DefaultErrorBoundary imports useT from i18n-labels, which imports
|
|
88
|
+
// defineI18nLabels from hooks/i18n, which imports useAppShellConfig
|
|
89
|
+
// from this file - creating a circular reference.
|
|
90
|
+
// This default value is never used in practice because AppShell
|
|
91
|
+
// always provides the context via AppShellConfigContext.Provider.
|
|
92
|
+
errorBoundary: null
|
|
93
|
+
}
|
|
94
|
+
}), tt = W({
|
|
95
|
+
contextData: {}
|
|
96
|
+
}), P = () => D(J), ns = () => D(tt), Se = () => {
|
|
97
|
+
const t = D(J), e = D(tt);
|
|
98
|
+
return {
|
|
99
|
+
...t,
|
|
100
|
+
...e
|
|
101
|
+
};
|
|
102
|
+
}, Te = () => {
|
|
103
|
+
const { configurations: t } = P(), e = Z(t.locale);
|
|
77
104
|
return (s, r) => e(s, r);
|
|
78
|
-
},
|
|
105
|
+
}, ke = (t) => {
|
|
79
106
|
const e = (s) => (r) => t[s]?.[r] ?? t.en[r];
|
|
80
107
|
return {
|
|
81
108
|
/**
|
|
@@ -98,11 +125,14 @@ const O = "en", ye = () => {
|
|
|
98
125
|
* ```
|
|
99
126
|
*/
|
|
100
127
|
useT: () => {
|
|
101
|
-
const { configurations: s } =
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return typeof i == "function" ? i(o[0]) : i;
|
|
128
|
+
const { configurations: s } = P(), r = e(s.locale), n = ((o, ...i) => {
|
|
129
|
+
const l = r(o);
|
|
130
|
+
return typeof l == "function" ? l(i[0]) : l;
|
|
105
131
|
});
|
|
132
|
+
return n.dynamic = (o, i) => {
|
|
133
|
+
const l = t[s.locale]?.[o] ?? t.en[o];
|
|
134
|
+
return l === void 0 || typeof l == "function" ? i : l;
|
|
135
|
+
}, n;
|
|
106
136
|
},
|
|
107
137
|
/**
|
|
108
138
|
* A function to get the translater for a specific label key.
|
|
@@ -131,7 +161,7 @@ const O = "en", ye = () => {
|
|
|
131
161
|
return typeof o == "function" ? o(r[0]) : o;
|
|
132
162
|
}
|
|
133
163
|
};
|
|
134
|
-
},
|
|
164
|
+
}, Re = ke({
|
|
135
165
|
en: {
|
|
136
166
|
error404Title: "404 Not Found",
|
|
137
167
|
error404Body: "The page you requested could not be found.",
|
|
@@ -170,19 +200,19 @@ const O = "en", ye = () => {
|
|
|
170
200
|
commandPaletteSearch: "ページを検索...",
|
|
171
201
|
commandPaletteNoResults: "結果が見つかりません"
|
|
172
202
|
}
|
|
173
|
-
}),
|
|
174
|
-
const t = Yt(), e =
|
|
203
|
+
}), L = Re.useT, j = () => {
|
|
204
|
+
const t = Yt(), e = L(), s = {
|
|
175
205
|
role: "alert",
|
|
176
206
|
"aria-label": "default-error-boundary"
|
|
177
207
|
};
|
|
178
208
|
if (Xt(t) && t.status === 404)
|
|
179
|
-
return /* @__PURE__ */ a("div", { ...s, className: "astw:p-6", children: /* @__PURE__ */
|
|
209
|
+
return /* @__PURE__ */ a("div", { ...s, className: "astw:p-6", children: /* @__PURE__ */ d("div", { className: "astw:flex astw:items-start astw:gap-4", children: [
|
|
180
210
|
/* @__PURE__ */ a(dt, { className: "astw:h-5 astw:w-5 astw:text-destructive astw:flex-shrink-0 astw:mt-0.5" }),
|
|
181
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ d("div", { children: [
|
|
182
212
|
/* @__PURE__ */ a("h1", { className: "astw:font-semibold astw:text-lg", children: e("error404Title") }),
|
|
183
213
|
/* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground astw:mt-1", children: e("error404Body") }),
|
|
184
214
|
/* @__PURE__ */ a(
|
|
185
|
-
|
|
215
|
+
_,
|
|
186
216
|
{
|
|
187
217
|
variant: "outline",
|
|
188
218
|
size: "sm",
|
|
@@ -194,13 +224,13 @@ const O = "en", ye = () => {
|
|
|
194
224
|
] })
|
|
195
225
|
] }) });
|
|
196
226
|
const r = t instanceof Error ? t.message : e("errorUnexpected");
|
|
197
|
-
return /* @__PURE__ */ a("div", { ...s, className: "astw:p-6", children: /* @__PURE__ */
|
|
227
|
+
return /* @__PURE__ */ a("div", { ...s, className: "astw:p-6", children: /* @__PURE__ */ d("div", { className: "astw:flex astw:items-start astw:gap-4", children: [
|
|
198
228
|
/* @__PURE__ */ a(dt, { className: "astw:h-5 astw:w-5 astw:text-destructive astw:flex-shrink-0 astw:mt-0.5" }),
|
|
199
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ d("div", { children: [
|
|
200
230
|
/* @__PURE__ */ a("h1", { className: "astw:font-semibold astw:text-lg", children: e("errorTitle") }),
|
|
201
231
|
/* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground astw:mt-1", children: r }),
|
|
202
232
|
/* @__PURE__ */ a(
|
|
203
|
-
|
|
233
|
+
_,
|
|
204
234
|
{
|
|
205
235
|
variant: "outline",
|
|
206
236
|
size: "sm",
|
|
@@ -211,162 +241,157 @@ const O = "en", ye = () => {
|
|
|
211
241
|
)
|
|
212
242
|
] })
|
|
213
243
|
] }) });
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
errorBoundary: /* @__PURE__ */ a(z, {}),
|
|
225
|
-
locale: O
|
|
226
|
-
}
|
|
227
|
-
}), k = () => G(Pt), ke = () => {
|
|
228
|
-
const t = B();
|
|
229
|
-
return /* @__PURE__ */ l(L, { children: [
|
|
230
|
-
/* @__PURE__ */ a("p", { className: "astw:font-semibold astw:leading-none astw:tracking-tight", children: t("welcomeTitle") }),
|
|
231
|
-
/* @__PURE__ */ a("p", { className: "pt-4", children: t("welcomeBody") })
|
|
232
|
-
] });
|
|
233
|
-
}, ct = () => /* @__PURE__ */ l(L, { children: [
|
|
234
|
-
/* @__PURE__ */ a(Y, {}),
|
|
235
|
-
/* @__PURE__ */ a(ge, {})
|
|
236
|
-
] }), Re = () => {
|
|
237
|
-
const { configurations: t } = k(), e = B(), s = Ne();
|
|
238
|
-
return /* @__PURE__ */ l("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: [
|
|
239
|
-
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ l("nav", { className: "astw:bg-card astw:md:w-xs astw:rounded-md astw:border astw:p-3 astw:shadow-xs", children: [
|
|
240
|
-
/* @__PURE__ */ a("h2", { className: "astw:text-sm astw:leading-[36px] astw:mb-2 astw:font-bold ", children: e("settings") }),
|
|
241
|
-
/* @__PURE__ */ a("ul", { className: "astw:flex astw:flex-col astw:gap-1", children: t.settingsResources.map((r) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(Zt, { to: `./${r.path}`, children: ({ isActive: n }) => /* @__PURE__ */ l(
|
|
242
|
-
I,
|
|
243
|
-
{
|
|
244
|
-
variant: n ? "secondary" : "ghost",
|
|
245
|
-
className: "astw:w-full astw:justify-start",
|
|
246
|
-
children: [
|
|
247
|
-
r.meta.icon,
|
|
248
|
-
s(r.meta.title, r.path)
|
|
249
|
-
]
|
|
250
|
-
}
|
|
251
|
-
) }) }, r.path)) })
|
|
252
|
-
] }) }),
|
|
253
|
-
/* @__PURE__ */ a("section", { className: "astw:bg-card astw:flex-1 astw:rounded-md astw:border astw:shadow-xs", children: /* @__PURE__ */ a(Y, {}) })
|
|
254
|
-
] });
|
|
255
|
-
}, Dt = () => new Response("Not Found", { status: 404 }), tt = async (t, e) => {
|
|
256
|
-
if (!t) return { state: "visible" };
|
|
257
|
-
const s = new URL(e.request.url);
|
|
258
|
-
return await t({
|
|
244
|
+
};
|
|
245
|
+
let Lt = {};
|
|
246
|
+
const Ee = (t) => {
|
|
247
|
+
Lt = t;
|
|
248
|
+
}, os = () => ({ type: "pass" }), is = () => ({ type: "hidden" }), ls = (t) => ({
|
|
249
|
+
type: "redirect",
|
|
250
|
+
to: t
|
|
251
|
+
}), Mt = () => new Response("Not Found", { status: 404 }), et = async (t, e) => {
|
|
252
|
+
if (!t || t.length === 0) return { type: "pass" };
|
|
253
|
+
const s = new URL(e.request.url), r = {
|
|
259
254
|
params: e.params,
|
|
260
255
|
searchParams: s.searchParams,
|
|
261
|
-
signal: e.request.signal
|
|
262
|
-
|
|
263
|
-
}
|
|
264
|
-
|
|
256
|
+
signal: e.request.signal,
|
|
257
|
+
context: Lt
|
|
258
|
+
};
|
|
259
|
+
for (const n of t) {
|
|
260
|
+
const o = await n(r);
|
|
261
|
+
if (o.type !== "pass")
|
|
262
|
+
return o;
|
|
263
|
+
}
|
|
264
|
+
return { type: "pass" };
|
|
265
|
+
}, It = (t, e) => async (s) => {
|
|
266
|
+
const r = await et(t, s);
|
|
267
|
+
switch (r.type) {
|
|
265
268
|
case "hidden":
|
|
266
|
-
throw
|
|
267
|
-
case "
|
|
269
|
+
throw Mt();
|
|
270
|
+
case "redirect":
|
|
271
|
+
return kt(r.to);
|
|
272
|
+
case "pass":
|
|
268
273
|
return e ? e(s) : null;
|
|
269
274
|
}
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
return {
|
|
273
|
-
redirectTo: t
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
function U(t) {
|
|
277
|
-
return typeof t == "object" && t !== null && "redirectTo" in t;
|
|
278
|
-
}
|
|
279
|
-
const It = (t, e) => () => {
|
|
280
|
-
const { configurations: s } = k(), { metaTitle: r, fallbackTitle: n } = t, i = J(s.locale)(r, n);
|
|
275
|
+
}, At = (t, e) => () => {
|
|
276
|
+
const { configurations: s } = P(), { metaTitle: r, fallbackTitle: n } = t, i = Z(s.locale)(r, n);
|
|
281
277
|
return e(i);
|
|
282
278
|
};
|
|
283
|
-
function
|
|
284
|
-
const { path: e, meta: s, component: r, resources: n, errorBoundary: o,
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
} : {
|
|
289
|
-
// Regular component with locale-aware title
|
|
290
|
-
component: It(
|
|
291
|
-
{ metaTitle: c, fallbackTitle: u },
|
|
292
|
-
(h) => r({ title: h, resources: n })
|
|
293
|
-
),
|
|
294
|
-
baseLoader: void 0
|
|
295
|
-
}, d = i || w.baseLoader ? Mt(i, w.baseLoader) : void 0;
|
|
279
|
+
function ds(t) {
|
|
280
|
+
const { path: e, meta: s, component: r, resources: n, errorBoundary: o, guards: i } = t, l = s?.title ?? A(e), u = A(e), w = i && i.length > 0 ? It(i) : void 0, c = r ? At(
|
|
281
|
+
{ metaTitle: l, fallbackTitle: u },
|
|
282
|
+
(h) => r({ title: h, resources: n })
|
|
283
|
+
) : void 0;
|
|
296
284
|
return {
|
|
297
285
|
path: e,
|
|
298
286
|
type: "component",
|
|
299
287
|
_type: "module",
|
|
300
|
-
component:
|
|
301
|
-
loader:
|
|
288
|
+
component: c,
|
|
289
|
+
loader: w,
|
|
302
290
|
meta: {
|
|
303
|
-
title:
|
|
291
|
+
title: l,
|
|
304
292
|
...s?.breadcrumbTitle !== void 0 ? { breadcrumbTitle: s.breadcrumbTitle } : {},
|
|
305
293
|
...s,
|
|
306
|
-
menuItemClickable:
|
|
294
|
+
menuItemClickable: r !== void 0,
|
|
307
295
|
icon: t.meta?.icon
|
|
308
296
|
},
|
|
309
297
|
resources: n,
|
|
310
|
-
errorBoundary: o || /* @__PURE__ */ a(
|
|
311
|
-
|
|
298
|
+
errorBoundary: o || /* @__PURE__ */ a(j, {}),
|
|
299
|
+
guards: i
|
|
312
300
|
};
|
|
313
301
|
}
|
|
314
|
-
function
|
|
315
|
-
const { path: e, component: s, subResources: r, meta: n, errorBoundary: o,
|
|
302
|
+
function cs(t) {
|
|
303
|
+
const { path: e, component: s, subResources: r, meta: n, errorBoundary: o, guards: i } = t, l = n?.title ?? A(e), u = A(e), w = i && i.length > 0 ? It(i) : void 0;
|
|
316
304
|
return {
|
|
317
305
|
_type: "resource",
|
|
318
306
|
type: "component",
|
|
319
307
|
path: e,
|
|
320
308
|
meta: {
|
|
321
|
-
title:
|
|
309
|
+
title: l,
|
|
322
310
|
icon: n?.icon,
|
|
323
311
|
...n?.breadcrumbTitle !== void 0 ? { breadcrumbTitle: n.breadcrumbTitle } : {}
|
|
324
312
|
},
|
|
325
|
-
component:
|
|
326
|
-
{ metaTitle:
|
|
327
|
-
(
|
|
313
|
+
component: At(
|
|
314
|
+
{ metaTitle: l, fallbackTitle: u },
|
|
315
|
+
(c) => s({ title: c, resources: r })
|
|
328
316
|
),
|
|
329
317
|
subResources: r,
|
|
330
|
-
errorBoundary: o ?? /* @__PURE__ */ a(
|
|
331
|
-
|
|
318
|
+
errorBoundary: o ?? /* @__PURE__ */ a(j, {}),
|
|
319
|
+
guards: i,
|
|
332
320
|
loader: w
|
|
333
321
|
};
|
|
334
322
|
}
|
|
335
|
-
const
|
|
336
|
-
const
|
|
323
|
+
const Be = () => {
|
|
324
|
+
const t = L();
|
|
325
|
+
return /* @__PURE__ */ d(B, { children: [
|
|
326
|
+
/* @__PURE__ */ a("p", { className: "astw:font-semibold astw:leading-none astw:tracking-tight", children: t("welcomeTitle") }),
|
|
327
|
+
/* @__PURE__ */ a("p", { className: "pt-4", children: t("welcomeBody") })
|
|
328
|
+
] });
|
|
329
|
+
}, wt = () => /* @__PURE__ */ d(B, { children: [
|
|
330
|
+
/* @__PURE__ */ a(G, {}),
|
|
331
|
+
/* @__PURE__ */ a(be, {})
|
|
332
|
+
] }), De = () => {
|
|
333
|
+
const { configurations: t } = Se(), e = L(), s = Te();
|
|
334
|
+
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: [
|
|
335
|
+
/* @__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: [
|
|
336
|
+
/* @__PURE__ */ a("h2", { className: "astw:text-sm astw:leading-[36px] astw:mb-2 astw:font-bold ", children: e("settings") }),
|
|
337
|
+
/* @__PURE__ */ a("ul", { className: "astw:flex astw:flex-col astw:gap-1", children: t.settingsResources.map((r) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(Zt, { to: `./${r.path}`, children: ({ isActive: n }) => /* @__PURE__ */ d(
|
|
338
|
+
_,
|
|
339
|
+
{
|
|
340
|
+
variant: n ? "secondary" : "ghost",
|
|
341
|
+
className: "astw:w-full astw:justify-start",
|
|
342
|
+
children: [
|
|
343
|
+
r.meta.icon,
|
|
344
|
+
s(r.meta.title, r.path)
|
|
345
|
+
]
|
|
346
|
+
}
|
|
347
|
+
) }) }, r.path)) })
|
|
348
|
+
] }) }),
|
|
349
|
+
/* @__PURE__ */ a("section", { className: "astw:bg-card astw:flex-1 astw:rounded-md astw:border astw:shadow-xs", children: /* @__PURE__ */ a(G, {}) })
|
|
350
|
+
] });
|
|
351
|
+
}, at = (t) => () => /* @__PURE__ */ a(B, { children: t }), _t = (t, e, s) => {
|
|
352
|
+
const r = t.errorBoundary || s, n = t.component ? {
|
|
337
353
|
index: !0,
|
|
338
|
-
Component: t.component
|
|
339
|
-
|
|
340
|
-
};
|
|
354
|
+
Component: t.component
|
|
355
|
+
} : void 0;
|
|
341
356
|
return {
|
|
342
357
|
path: t.path,
|
|
358
|
+
...t.loader && { loader: t.loader },
|
|
343
359
|
...t.errorBoundary && {
|
|
344
|
-
ErrorBoundary:
|
|
360
|
+
ErrorBoundary: at(t.errorBoundary)
|
|
345
361
|
},
|
|
346
362
|
...e && e.length > 0 ? {
|
|
347
363
|
children: [
|
|
348
|
-
n,
|
|
364
|
+
...n ? [n] : [],
|
|
349
365
|
...e.map(
|
|
350
|
-
(o) =>
|
|
366
|
+
(o) => _t(o, o.subResources, r)
|
|
351
367
|
)
|
|
352
368
|
]
|
|
353
|
-
} : {
|
|
369
|
+
} : n ? {
|
|
354
370
|
children: [n]
|
|
355
|
-
}
|
|
371
|
+
} : {}
|
|
356
372
|
};
|
|
357
|
-
},
|
|
358
|
-
|
|
359
|
-
|
|
373
|
+
}, Pe = (t) => {
|
|
374
|
+
const e = _t(t, t.resources, t.errorBoundary);
|
|
375
|
+
if (!t.component && t.resources.length > 0) {
|
|
376
|
+
const s = t.resources[0].path, r = {
|
|
377
|
+
index: !0,
|
|
378
|
+
loader: () => kt(s)
|
|
379
|
+
}, n = {
|
|
380
|
+
path: e.path,
|
|
381
|
+
children: [r, ...e.children ?? []],
|
|
382
|
+
...e.loader && { loader: e.loader }
|
|
383
|
+
};
|
|
384
|
+
return e.ErrorBoundary && (n.ErrorBoundary = e.ErrorBoundary), n;
|
|
385
|
+
}
|
|
386
|
+
return e;
|
|
387
|
+
}, Le = (t) => t.map((e) => Pe(e)), Me = ({
|
|
360
388
|
modules: t,
|
|
361
389
|
settingsResources: e,
|
|
362
390
|
rootComponent: s
|
|
363
391
|
}) => {
|
|
364
|
-
const r =
|
|
392
|
+
const r = {
|
|
365
393
|
index: !0,
|
|
366
|
-
|
|
367
|
-
} : {
|
|
368
|
-
index: !0,
|
|
369
|
-
Component: s ?? ke
|
|
394
|
+
Component: s ?? Be
|
|
370
395
|
}, n = e.length > 0 ? [
|
|
371
396
|
{
|
|
372
397
|
path: "settings",
|
|
@@ -382,12 +407,12 @@ const et = (t) => () => /* @__PURE__ */ a(L, { children: t }), At = (t, e, s) =>
|
|
|
382
407
|
},
|
|
383
408
|
{
|
|
384
409
|
path: "settings",
|
|
385
|
-
Component:
|
|
410
|
+
Component: De,
|
|
386
411
|
children: e.map((o) => ({
|
|
387
412
|
path: o.path,
|
|
388
413
|
Component: o.component,
|
|
389
414
|
...o.errorBoundary && {
|
|
390
|
-
ErrorBoundary:
|
|
415
|
+
ErrorBoundary: at(o.errorBoundary)
|
|
391
416
|
}
|
|
392
417
|
}))
|
|
393
418
|
}
|
|
@@ -395,29 +420,29 @@ const et = (t) => () => /* @__PURE__ */ a(L, { children: t }), At = (t, e, s) =>
|
|
|
395
420
|
return [
|
|
396
421
|
r,
|
|
397
422
|
{
|
|
398
|
-
children:
|
|
423
|
+
children: Le(t)
|
|
399
424
|
},
|
|
400
425
|
...n,
|
|
401
426
|
{
|
|
402
427
|
path: "*",
|
|
403
428
|
loader: () => {
|
|
404
|
-
throw
|
|
429
|
+
throw Mt();
|
|
405
430
|
},
|
|
406
431
|
// Component is required to suppress React Router's warning about empty leaf routes,
|
|
407
432
|
// even though the loader always throws and this component will never render.
|
|
408
433
|
Component: () => null,
|
|
409
|
-
ErrorBoundary:
|
|
434
|
+
ErrorBoundary: j
|
|
410
435
|
}
|
|
411
436
|
];
|
|
412
|
-
}, zt = "appshell-root-nav",
|
|
437
|
+
}, zt = "appshell-root-nav", Ie = (t) => ({
|
|
413
438
|
loaderID: zt,
|
|
414
|
-
loader: async (e) => ({ navItems:
|
|
415
|
-
}),
|
|
416
|
-
const s =
|
|
439
|
+
loader: async (e) => ({ navItems: Ae(t, e) })
|
|
440
|
+
}), Ft = () => te(zt)?.navItems, Ae = async (t, e) => {
|
|
441
|
+
const s = Pt(t.locale);
|
|
417
442
|
return (await Promise.all(
|
|
418
443
|
t.modules.map(async (n) => {
|
|
419
|
-
if (n.path.startsWith(":") || (await
|
|
420
|
-
const i = await
|
|
444
|
+
if (n.path.startsWith(":") || (await et(n.guards, e)).type !== "pass") return null;
|
|
445
|
+
const i = await Ot(
|
|
421
446
|
n.resources,
|
|
422
447
|
n.path,
|
|
423
448
|
e,
|
|
@@ -431,38 +456,38 @@ const et = (t) => () => /* @__PURE__ */ a(L, { children: t }), At = (t, e, s) =>
|
|
|
431
456
|
icon: n.meta.icon || /* @__PURE__ */ a(ce, {}),
|
|
432
457
|
items: o
|
|
433
458
|
}));
|
|
434
|
-
},
|
|
459
|
+
}, Ot = async (t, e, s, r) => (await Promise.all(
|
|
435
460
|
t.map(async (o) => {
|
|
436
|
-
if (o.path.startsWith(":") || (await
|
|
437
|
-
const
|
|
461
|
+
if (o.path.startsWith(":") || (await et(o.guards, s)).type !== "pass") return null;
|
|
462
|
+
const l = `${e}/${o.path}`, u = r(o.meta.title, o.path), w = o.subResources ? await Ot(
|
|
438
463
|
o.subResources,
|
|
439
|
-
|
|
464
|
+
l,
|
|
440
465
|
s,
|
|
441
466
|
r
|
|
442
467
|
) : void 0;
|
|
443
468
|
return {
|
|
444
469
|
title: u,
|
|
445
|
-
url:
|
|
470
|
+
url: l,
|
|
446
471
|
items: w && w.length > 0 ? w : void 0
|
|
447
472
|
};
|
|
448
473
|
})
|
|
449
|
-
)).filter((o) => o !== null),
|
|
450
|
-
const { configurations: e } =
|
|
474
|
+
)).filter((o) => o !== null), _e = (t) => {
|
|
475
|
+
const { configurations: e } = P(), { rootComponent: s, children: r } = t, n = Me({
|
|
451
476
|
modules: e.modules,
|
|
452
477
|
settingsResources: e.settingsResources,
|
|
453
478
|
rootComponent: s
|
|
454
|
-
}), o = e.errorBoundary, { loaderID: i, loader:
|
|
479
|
+
}), o = e.errorBoundary, { loaderID: i, loader: l } = Ie({
|
|
455
480
|
modules: e.modules,
|
|
456
481
|
locale: e.locale
|
|
457
482
|
}), u = [
|
|
458
483
|
{
|
|
459
484
|
id: i,
|
|
460
|
-
loader:
|
|
485
|
+
loader: l,
|
|
461
486
|
element: r,
|
|
462
487
|
children: o ? [
|
|
463
488
|
{
|
|
464
|
-
element: /* @__PURE__ */ a(
|
|
465
|
-
ErrorBoundary:
|
|
489
|
+
element: /* @__PURE__ */ a(G, {}),
|
|
490
|
+
ErrorBoundary: at(o),
|
|
466
491
|
children: n
|
|
467
492
|
}
|
|
468
493
|
] : n,
|
|
@@ -472,19 +497,19 @@ const et = (t) => () => /* @__PURE__ */ a(L, { children: t }), At = (t, e, s) =>
|
|
|
472
497
|
*/
|
|
473
498
|
HydrateFallback: () => null
|
|
474
499
|
}
|
|
475
|
-
], w = e.basePath ? "/" + e.basePath : void 0,
|
|
500
|
+
], w = e.basePath ? "/" + e.basePath : void 0, c = t.memory ? ee(u, {
|
|
476
501
|
basename: w,
|
|
477
502
|
...t.initialEntries ? { initialEntries: t.initialEntries } : {}
|
|
478
503
|
}) : ae(u, {
|
|
479
504
|
basename: w
|
|
480
505
|
});
|
|
481
|
-
return /* @__PURE__ */ a(se, { router:
|
|
482
|
-
},
|
|
506
|
+
return /* @__PURE__ */ a(se, { router: c });
|
|
507
|
+
}, ze = {
|
|
483
508
|
resolvedTheme: "light",
|
|
484
509
|
theme: "system",
|
|
485
510
|
setTheme: () => null
|
|
486
|
-
},
|
|
487
|
-
function
|
|
511
|
+
}, $t = W(ze);
|
|
512
|
+
function Fe({
|
|
488
513
|
children: t,
|
|
489
514
|
storageKey: e,
|
|
490
515
|
defaultTheme: s = "system",
|
|
@@ -492,99 +517,114 @@ function Ie({
|
|
|
492
517
|
}) {
|
|
493
518
|
const [n, o] = R(
|
|
494
519
|
() => localStorage.getItem(e) || s
|
|
495
|
-
), i =
|
|
520
|
+
), i = k(() => n !== "system" ? n : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", [n]);
|
|
496
521
|
y(() => {
|
|
497
522
|
const u = window.document.documentElement;
|
|
498
523
|
u.classList.remove("light", "dark"), u.classList.add(i);
|
|
499
524
|
}, [i]);
|
|
500
|
-
const
|
|
525
|
+
const l = {
|
|
501
526
|
resolvedTheme: i,
|
|
502
527
|
theme: n,
|
|
503
528
|
setTheme: (u) => {
|
|
504
529
|
localStorage.setItem(e, u), o(u);
|
|
505
530
|
}
|
|
506
531
|
};
|
|
507
|
-
return /* @__PURE__ */ a(
|
|
532
|
+
return /* @__PURE__ */ a($t.Provider, { ...r, value: l, children: t });
|
|
508
533
|
}
|
|
509
|
-
const
|
|
510
|
-
const t =
|
|
534
|
+
const Oe = () => {
|
|
535
|
+
const t = D($t);
|
|
511
536
|
if (t === void 0)
|
|
512
537
|
throw new Error("useTheme must be used within a ThemeProvider");
|
|
513
538
|
return t;
|
|
514
|
-
},
|
|
539
|
+
}, ws = (t) => {
|
|
515
540
|
const [e, s] = R(!1);
|
|
516
|
-
|
|
541
|
+
y(function() {
|
|
517
542
|
s(!0);
|
|
518
|
-
}, [])
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
543
|
+
}, []);
|
|
544
|
+
const r = t.contextData ?? {};
|
|
545
|
+
Ee(r);
|
|
546
|
+
const n = k(
|
|
547
|
+
() => Ce({
|
|
548
|
+
modules: t.modules,
|
|
549
|
+
settingsResources: t.settingsResources,
|
|
550
|
+
basePath: t.basePath,
|
|
551
|
+
errorBoundary: t.errorBoundary,
|
|
552
|
+
locale: t.locale
|
|
553
|
+
}),
|
|
554
|
+
[
|
|
555
|
+
t.modules,
|
|
556
|
+
t.settingsResources,
|
|
557
|
+
t.basePath,
|
|
558
|
+
t.errorBoundary,
|
|
559
|
+
t.locale
|
|
560
|
+
]
|
|
561
|
+
), o = k(
|
|
562
|
+
() => ({ title: t.title, icon: t.icon, configurations: n }),
|
|
563
|
+
[t.title, t.icon, n]
|
|
564
|
+
), i = k(
|
|
565
|
+
() => ({ contextData: t.contextData ?? {} }),
|
|
566
|
+
[t.contextData]
|
|
567
|
+
);
|
|
568
|
+
return e ? /* @__PURE__ */ a(J.Provider, { value: o, children: /* @__PURE__ */ a(tt.Provider, { value: i, children: /* @__PURE__ */ a(Fe, { defaultTheme: "system", storageKey: "appshell-ui-theme", children: /* @__PURE__ */ a(_e, { rootComponent: t.rootComponent, children: t.children }) }) }) }) : null;
|
|
529
569
|
};
|
|
530
|
-
function
|
|
570
|
+
function $e({
|
|
531
571
|
...t
|
|
532
572
|
}) {
|
|
533
|
-
return /* @__PURE__ */ a(
|
|
573
|
+
return /* @__PURE__ */ a(X.Root, { "data-slot": "collapsible", ...t });
|
|
534
574
|
}
|
|
535
|
-
function
|
|
575
|
+
function ut({
|
|
536
576
|
...t
|
|
537
577
|
}) {
|
|
538
578
|
return /* @__PURE__ */ a(
|
|
539
|
-
|
|
579
|
+
X.CollapsibleTrigger,
|
|
540
580
|
{
|
|
541
581
|
"data-slot": "collapsible-trigger",
|
|
542
582
|
...t
|
|
543
583
|
}
|
|
544
584
|
);
|
|
545
585
|
}
|
|
546
|
-
function
|
|
586
|
+
function We({
|
|
547
587
|
...t
|
|
548
588
|
}) {
|
|
549
589
|
return /* @__PURE__ */ a(
|
|
550
|
-
|
|
590
|
+
X.CollapsibleContent,
|
|
551
591
|
{
|
|
552
592
|
"data-slot": "collapsible-content",
|
|
553
593
|
...t
|
|
554
594
|
}
|
|
555
595
|
);
|
|
556
596
|
}
|
|
557
|
-
const
|
|
558
|
-
function
|
|
559
|
-
const [t, e] =
|
|
597
|
+
const V = 768;
|
|
598
|
+
function je() {
|
|
599
|
+
const [t, e] = p.useState(
|
|
560
600
|
void 0
|
|
561
601
|
);
|
|
562
|
-
return
|
|
563
|
-
const s = window.matchMedia(`(max-width: ${
|
|
564
|
-
e(window.innerWidth <
|
|
602
|
+
return p.useEffect(() => {
|
|
603
|
+
const s = window.matchMedia(`(max-width: ${V - 1}px)`), r = () => {
|
|
604
|
+
e(window.innerWidth < V);
|
|
565
605
|
};
|
|
566
|
-
return s.addEventListener("change", r), e(window.innerWidth <
|
|
606
|
+
return s.addEventListener("change", r), e(window.innerWidth < V), () => s.removeEventListener("change", r);
|
|
567
607
|
}, []), !!t;
|
|
568
608
|
}
|
|
569
|
-
const
|
|
570
|
-
function
|
|
571
|
-
const [t, e] =
|
|
609
|
+
const H = 768, U = 1199;
|
|
610
|
+
function Ke() {
|
|
611
|
+
const [t, e] = p.useState(
|
|
572
612
|
void 0
|
|
573
613
|
);
|
|
574
|
-
return
|
|
614
|
+
return p.useEffect(() => {
|
|
575
615
|
const s = window.matchMedia(
|
|
576
|
-
`(min-width: ${
|
|
616
|
+
`(min-width: ${H}px) and (max-width: ${U}px)`
|
|
577
617
|
), r = () => {
|
|
578
618
|
e(
|
|
579
|
-
window.innerWidth >=
|
|
619
|
+
window.innerWidth >= H && window.innerWidth <= U
|
|
580
620
|
);
|
|
581
621
|
};
|
|
582
622
|
return s.addEventListener("change", r), e(
|
|
583
|
-
window.innerWidth >=
|
|
623
|
+
window.innerWidth >= H && window.innerWidth <= U
|
|
584
624
|
), () => s.removeEventListener("change", r);
|
|
585
625
|
}, []), !!t;
|
|
586
626
|
}
|
|
587
|
-
function
|
|
627
|
+
function Ve({ className: t, type: e, ...s }) {
|
|
588
628
|
return /* @__PURE__ */ a(
|
|
589
629
|
"input",
|
|
590
630
|
{
|
|
@@ -600,15 +640,15 @@ function $e({ className: t, type: e, ...s }) {
|
|
|
600
640
|
}
|
|
601
641
|
);
|
|
602
642
|
}
|
|
603
|
-
function
|
|
643
|
+
function mt({ ...t }) {
|
|
604
644
|
return /* @__PURE__ */ a(b.Root, { "data-slot": "sheet", ...t });
|
|
605
645
|
}
|
|
606
|
-
function
|
|
646
|
+
function He({
|
|
607
647
|
...t
|
|
608
648
|
}) {
|
|
609
649
|
return /* @__PURE__ */ a(b.Portal, { "data-slot": "sheet-portal", ...t });
|
|
610
650
|
}
|
|
611
|
-
function
|
|
651
|
+
function Ue({
|
|
612
652
|
className: t,
|
|
613
653
|
...e
|
|
614
654
|
}) {
|
|
@@ -624,15 +664,15 @@ function je({
|
|
|
624
664
|
}
|
|
625
665
|
);
|
|
626
666
|
}
|
|
627
|
-
function
|
|
667
|
+
function ht({
|
|
628
668
|
className: t,
|
|
629
669
|
children: e,
|
|
630
670
|
side: s = "right",
|
|
631
671
|
...r
|
|
632
672
|
}) {
|
|
633
|
-
return /* @__PURE__ */
|
|
634
|
-
/* @__PURE__ */ a(
|
|
635
|
-
/* @__PURE__ */
|
|
673
|
+
return /* @__PURE__ */ d(He, { children: [
|
|
674
|
+
/* @__PURE__ */ a(Ue, {}),
|
|
675
|
+
/* @__PURE__ */ d(
|
|
636
676
|
b.Content,
|
|
637
677
|
{
|
|
638
678
|
"data-slot": "sheet-content",
|
|
@@ -647,8 +687,8 @@ function mt({
|
|
|
647
687
|
...r,
|
|
648
688
|
children: [
|
|
649
689
|
e,
|
|
650
|
-
/* @__PURE__ */
|
|
651
|
-
/* @__PURE__ */ a(
|
|
690
|
+
/* @__PURE__ */ d(b.Close, { className: "astw:ring-offset-bg astw:focus:ring-ring astw:data-[state=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: [
|
|
691
|
+
/* @__PURE__ */ a(Bt, { className: "astw:size-4" }),
|
|
652
692
|
/* @__PURE__ */ a("span", { className: "astw:sr-only", children: "Close" })
|
|
653
693
|
] })
|
|
654
694
|
]
|
|
@@ -656,7 +696,7 @@ function mt({
|
|
|
656
696
|
)
|
|
657
697
|
] });
|
|
658
698
|
}
|
|
659
|
-
function
|
|
699
|
+
function ft({ className: t, ...e }) {
|
|
660
700
|
return /* @__PURE__ */ a(
|
|
661
701
|
"div",
|
|
662
702
|
{
|
|
@@ -666,7 +706,7 @@ function ht({ className: t, ...e }) {
|
|
|
666
706
|
}
|
|
667
707
|
);
|
|
668
708
|
}
|
|
669
|
-
function
|
|
709
|
+
function gt({
|
|
670
710
|
className: t,
|
|
671
711
|
...e
|
|
672
712
|
}) {
|
|
@@ -692,7 +732,7 @@ function pt({
|
|
|
692
732
|
}
|
|
693
733
|
);
|
|
694
734
|
}
|
|
695
|
-
function
|
|
735
|
+
function st({
|
|
696
736
|
delayDuration: t = 0,
|
|
697
737
|
...e
|
|
698
738
|
}) {
|
|
@@ -705,23 +745,23 @@ function at({
|
|
|
705
745
|
}
|
|
706
746
|
);
|
|
707
747
|
}
|
|
708
|
-
function
|
|
748
|
+
function rt({
|
|
709
749
|
...t
|
|
710
750
|
}) {
|
|
711
|
-
return /* @__PURE__ */ a(
|
|
751
|
+
return /* @__PURE__ */ a(st, { children: /* @__PURE__ */ a(E.Root, { "data-slot": "tooltip", ...t }) });
|
|
712
752
|
}
|
|
713
|
-
function
|
|
753
|
+
function nt({
|
|
714
754
|
...t
|
|
715
755
|
}) {
|
|
716
756
|
return /* @__PURE__ */ a(E.Trigger, { "data-slot": "tooltip-trigger", ...t });
|
|
717
757
|
}
|
|
718
|
-
function
|
|
758
|
+
function ot({
|
|
719
759
|
className: t,
|
|
720
760
|
sideOffset: e = 0,
|
|
721
761
|
children: s,
|
|
722
762
|
...r
|
|
723
763
|
}) {
|
|
724
|
-
return /* @__PURE__ */ a(E.Portal, { children: /* @__PURE__ */
|
|
764
|
+
return /* @__PURE__ */ a(E.Portal, { children: /* @__PURE__ */ d(
|
|
725
765
|
E.Content,
|
|
726
766
|
{
|
|
727
767
|
"data-slot": "tooltip-content",
|
|
@@ -738,14 +778,14 @@ function nt({
|
|
|
738
778
|
}
|
|
739
779
|
) });
|
|
740
780
|
}
|
|
741
|
-
const
|
|
742
|
-
function
|
|
743
|
-
const t =
|
|
781
|
+
const Wt = "16rem", Qe = "18rem", qe = "3rem", Ge = "b", jt = p.createContext(null);
|
|
782
|
+
function F() {
|
|
783
|
+
const t = p.useContext(jt);
|
|
744
784
|
if (!t)
|
|
745
785
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
746
786
|
return t;
|
|
747
787
|
}
|
|
748
|
-
function
|
|
788
|
+
function Ye({
|
|
749
789
|
defaultOpen: t = !0,
|
|
750
790
|
open: e,
|
|
751
791
|
onOpenChange: s,
|
|
@@ -754,41 +794,41 @@ function Ue({
|
|
|
754
794
|
children: o,
|
|
755
795
|
...i
|
|
756
796
|
}) {
|
|
757
|
-
const
|
|
797
|
+
const l = je(), u = Ke(), [w, c] = p.useState(!1), [h, f] = p.useState(!1), [g, M] = p.useState(t), C = e ?? g, I = p.useCallback(
|
|
758
798
|
(x) => {
|
|
759
799
|
const T = typeof x == "function" ? x(C) : x;
|
|
760
|
-
s ? s(T) :
|
|
800
|
+
s ? s(T) : M(T);
|
|
761
801
|
},
|
|
762
802
|
[s, C]
|
|
763
|
-
), S = u && !
|
|
764
|
-
|
|
803
|
+
), S = u && !l, O = p.useCallback(() => l ? c((x) => !x) : S ? f((x) => !x) : I((x) => !x), [l, S, I, c]);
|
|
804
|
+
p.useEffect(() => {
|
|
765
805
|
const x = (T) => {
|
|
766
|
-
T.key ===
|
|
806
|
+
T.key === Ge && (T.metaKey || T.ctrlKey) && (T.preventDefault(), O());
|
|
767
807
|
};
|
|
768
808
|
return window.addEventListener("keydown", x), () => window.removeEventListener("keydown", x);
|
|
769
|
-
}, [
|
|
770
|
-
const
|
|
809
|
+
}, [O]);
|
|
810
|
+
const lt = C ? "expanded" : "collapsed", Gt = p.useMemo(
|
|
771
811
|
() => ({
|
|
772
|
-
state:
|
|
812
|
+
state: lt,
|
|
773
813
|
open: C,
|
|
774
|
-
setOpen:
|
|
775
|
-
isMobile:
|
|
814
|
+
setOpen: I,
|
|
815
|
+
isMobile: l,
|
|
776
816
|
openMobile: w,
|
|
777
|
-
setOpenMobile:
|
|
778
|
-
toggleSidebar:
|
|
817
|
+
setOpenMobile: c,
|
|
818
|
+
toggleSidebar: O,
|
|
779
819
|
isIconMode: S,
|
|
780
820
|
openIconMode: h,
|
|
781
821
|
setOpenIconMode: f
|
|
782
822
|
}),
|
|
783
|
-
[
|
|
823
|
+
[lt, C, I, l, w, c, O, S, h, f]
|
|
784
824
|
);
|
|
785
|
-
return /* @__PURE__ */ a(
|
|
825
|
+
return /* @__PURE__ */ a(jt.Provider, { value: Gt, children: /* @__PURE__ */ a(st, { delayDuration: 0, children: /* @__PURE__ */ a(
|
|
786
826
|
"div",
|
|
787
827
|
{
|
|
788
828
|
"data-slot": "sidebar-wrapper",
|
|
789
829
|
style: {
|
|
790
|
-
"--sidebar-width":
|
|
791
|
-
"--sidebar-width-icon":
|
|
830
|
+
"--sidebar-width": Wt,
|
|
831
|
+
"--sidebar-width-icon": qe,
|
|
792
832
|
...n
|
|
793
833
|
},
|
|
794
834
|
className: m(
|
|
@@ -800,7 +840,7 @@ function Ue({
|
|
|
800
840
|
}
|
|
801
841
|
) }) });
|
|
802
842
|
}
|
|
803
|
-
function
|
|
843
|
+
function Xe({
|
|
804
844
|
side: t = "left",
|
|
805
845
|
variant: e = "sidebar",
|
|
806
846
|
collapsible: s = "offcanvas",
|
|
@@ -808,7 +848,7 @@ function Qe({
|
|
|
808
848
|
children: n,
|
|
809
849
|
...o
|
|
810
850
|
}) {
|
|
811
|
-
const { isMobile: i, state:
|
|
851
|
+
const { isMobile: i, state: l, openMobile: u, setOpenMobile: w, isIconMode: c, openIconMode: h, setOpenIconMode: f } = F();
|
|
812
852
|
return s === "none" ? /* @__PURE__ */ a(
|
|
813
853
|
"div",
|
|
814
854
|
{
|
|
@@ -820,27 +860,27 @@ function Qe({
|
|
|
820
860
|
...o,
|
|
821
861
|
children: n
|
|
822
862
|
}
|
|
823
|
-
) : i ? /* @__PURE__ */ a(
|
|
824
|
-
|
|
863
|
+
) : i ? /* @__PURE__ */ a(mt, { open: u, onOpenChange: w, ...o, children: /* @__PURE__ */ d(
|
|
864
|
+
ht,
|
|
825
865
|
{
|
|
826
866
|
"data-sidebar": "sidebar",
|
|
827
867
|
"data-slot": "sidebar",
|
|
828
868
|
"data-mobile": "true",
|
|
829
869
|
className: "astw:bg-sidebar astw:text-sidebar-foreground astw:w-(--sidebar-width) astw:p-0 astw:[&>button]:hidden",
|
|
830
870
|
style: {
|
|
831
|
-
"--sidebar-width":
|
|
871
|
+
"--sidebar-width": Qe
|
|
832
872
|
},
|
|
833
873
|
side: t,
|
|
834
874
|
children: [
|
|
835
|
-
/* @__PURE__ */
|
|
836
|
-
/* @__PURE__ */ a(
|
|
875
|
+
/* @__PURE__ */ d(ft, { className: "astw:sr-only", children: [
|
|
876
|
+
/* @__PURE__ */ a(gt, { children: "Sidebar" }),
|
|
837
877
|
/* @__PURE__ */ a(pt, { children: "Displays the mobile sidebar." })
|
|
838
878
|
] }),
|
|
839
879
|
/* @__PURE__ */ a("div", { className: "flex h-full w-full flex-col", children: n })
|
|
840
880
|
]
|
|
841
881
|
}
|
|
842
|
-
) }) :
|
|
843
|
-
/* @__PURE__ */
|
|
882
|
+
) }) : c && s === "icon" ? /* @__PURE__ */ d(B, { children: [
|
|
883
|
+
/* @__PURE__ */ d(
|
|
844
884
|
"div",
|
|
845
885
|
{
|
|
846
886
|
className: "astw:group astw:peer astw:text-sidebar-foreground astw:hidden astw:md:block",
|
|
@@ -884,32 +924,32 @@ function Qe({
|
|
|
884
924
|
]
|
|
885
925
|
}
|
|
886
926
|
),
|
|
887
|
-
/* @__PURE__ */ a(
|
|
888
|
-
|
|
927
|
+
/* @__PURE__ */ a(mt, { open: h, onOpenChange: f, ...o, children: /* @__PURE__ */ d(
|
|
928
|
+
ht,
|
|
889
929
|
{
|
|
890
930
|
"data-sidebar": "sidebar",
|
|
891
931
|
"data-slot": "sidebar-overlay",
|
|
892
932
|
"data-icon-mode": "true",
|
|
893
933
|
className: "astw:bg-sidebar astw:text-sidebar-foreground astw:w-(--sidebar-width) astw:p-0 astw:[&>button]:hidden",
|
|
894
934
|
style: {
|
|
895
|
-
"--sidebar-width":
|
|
935
|
+
"--sidebar-width": Wt
|
|
896
936
|
},
|
|
897
937
|
side: t,
|
|
898
938
|
children: [
|
|
899
|
-
/* @__PURE__ */
|
|
900
|
-
/* @__PURE__ */ a(
|
|
939
|
+
/* @__PURE__ */ d(ft, { className: "astw:sr-only", children: [
|
|
940
|
+
/* @__PURE__ */ a(gt, { children: "Sidebar" }),
|
|
901
941
|
/* @__PURE__ */ a(pt, { children: "Displays the sidebar overlay." })
|
|
902
942
|
] }),
|
|
903
943
|
/* @__PURE__ */ a("div", { className: "flex h-full w-full flex-col", children: n })
|
|
904
944
|
]
|
|
905
945
|
}
|
|
906
946
|
) })
|
|
907
|
-
] }) : /* @__PURE__ */
|
|
947
|
+
] }) : /* @__PURE__ */ d(
|
|
908
948
|
"div",
|
|
909
949
|
{
|
|
910
950
|
className: "astw:group astw:peer astw:text-sidebar-foreground astw:hidden astw:md:block",
|
|
911
|
-
"data-state":
|
|
912
|
-
"data-collapsible":
|
|
951
|
+
"data-state": l,
|
|
952
|
+
"data-collapsible": l === "collapsed" ? s : "",
|
|
913
953
|
"data-variant": e,
|
|
914
954
|
"data-side": t,
|
|
915
955
|
"data-slot": "sidebar",
|
|
@@ -954,14 +994,14 @@ function Qe({
|
|
|
954
994
|
}
|
|
955
995
|
);
|
|
956
996
|
}
|
|
957
|
-
function
|
|
997
|
+
function Kt({
|
|
958
998
|
className: t,
|
|
959
999
|
onClick: e,
|
|
960
1000
|
...s
|
|
961
1001
|
}) {
|
|
962
|
-
const { toggleSidebar: r } =
|
|
963
|
-
return /* @__PURE__ */
|
|
964
|
-
|
|
1002
|
+
const { toggleSidebar: r } = F();
|
|
1003
|
+
return /* @__PURE__ */ d(
|
|
1004
|
+
_,
|
|
965
1005
|
{
|
|
966
1006
|
"data-sidebar": "trigger",
|
|
967
1007
|
"data-slot": "sidebar-trigger",
|
|
@@ -979,7 +1019,7 @@ function jt({
|
|
|
979
1019
|
}
|
|
980
1020
|
);
|
|
981
1021
|
}
|
|
982
|
-
function
|
|
1022
|
+
function Ze({ className: t, ...e }) {
|
|
983
1023
|
return /* @__PURE__ */ a(
|
|
984
1024
|
"main",
|
|
985
1025
|
{
|
|
@@ -994,7 +1034,7 @@ function qe({ className: t, ...e }) {
|
|
|
994
1034
|
}
|
|
995
1035
|
);
|
|
996
1036
|
}
|
|
997
|
-
function
|
|
1037
|
+
function Je({ className: t, ...e }) {
|
|
998
1038
|
return /* @__PURE__ */ a(
|
|
999
1039
|
"div",
|
|
1000
1040
|
{
|
|
@@ -1005,7 +1045,7 @@ function Ge({ className: t, ...e }) {
|
|
|
1005
1045
|
}
|
|
1006
1046
|
);
|
|
1007
1047
|
}
|
|
1008
|
-
function
|
|
1048
|
+
function ta({ className: t, ...e }) {
|
|
1009
1049
|
return /* @__PURE__ */ a(
|
|
1010
1050
|
"div",
|
|
1011
1051
|
{
|
|
@@ -1016,7 +1056,7 @@ function Ye({ className: t, ...e }) {
|
|
|
1016
1056
|
}
|
|
1017
1057
|
);
|
|
1018
1058
|
}
|
|
1019
|
-
function
|
|
1059
|
+
function Vt({ className: t, ...e }) {
|
|
1020
1060
|
return /* @__PURE__ */ a(
|
|
1021
1061
|
"div",
|
|
1022
1062
|
{
|
|
@@ -1027,7 +1067,7 @@ function Kt({ className: t, ...e }) {
|
|
|
1027
1067
|
}
|
|
1028
1068
|
);
|
|
1029
1069
|
}
|
|
1030
|
-
function
|
|
1070
|
+
function Ht({ className: t, ...e }) {
|
|
1031
1071
|
return /* @__PURE__ */ a(
|
|
1032
1072
|
"ul",
|
|
1033
1073
|
{
|
|
@@ -1038,7 +1078,7 @@ function Vt({ className: t, ...e }) {
|
|
|
1038
1078
|
}
|
|
1039
1079
|
);
|
|
1040
1080
|
}
|
|
1041
|
-
function
|
|
1081
|
+
function Ut({ className: t, ...e }) {
|
|
1042
1082
|
return /* @__PURE__ */ a(
|
|
1043
1083
|
"li",
|
|
1044
1084
|
{
|
|
@@ -1049,7 +1089,7 @@ function Ht({ className: t, ...e }) {
|
|
|
1049
1089
|
}
|
|
1050
1090
|
);
|
|
1051
1091
|
}
|
|
1052
|
-
const
|
|
1092
|
+
const ea = Y(
|
|
1053
1093
|
"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",
|
|
1054
1094
|
{
|
|
1055
1095
|
variants: {
|
|
@@ -1069,7 +1109,7 @@ const Xe = X(
|
|
|
1069
1109
|
}
|
|
1070
1110
|
}
|
|
1071
1111
|
);
|
|
1072
|
-
function
|
|
1112
|
+
function bt({
|
|
1073
1113
|
asChild: t = !1,
|
|
1074
1114
|
isActive: e = !1,
|
|
1075
1115
|
variant: s = "default",
|
|
@@ -1078,23 +1118,23 @@ function gt({
|
|
|
1078
1118
|
className: o,
|
|
1079
1119
|
...i
|
|
1080
1120
|
}) {
|
|
1081
|
-
const
|
|
1082
|
-
|
|
1121
|
+
const l = t ? z : "button", { isMobile: u, state: w } = F(), c = /* @__PURE__ */ a(
|
|
1122
|
+
l,
|
|
1083
1123
|
{
|
|
1084
1124
|
"data-slot": "sidebar-menu-button",
|
|
1085
1125
|
"data-sidebar": "menu-button",
|
|
1086
1126
|
"data-size": r,
|
|
1087
1127
|
"data-active": e,
|
|
1088
|
-
className: m(
|
|
1128
|
+
className: m(ea({ variant: s, size: r }), o),
|
|
1089
1129
|
...i
|
|
1090
1130
|
}
|
|
1091
1131
|
);
|
|
1092
1132
|
return n ? (typeof n == "string" && (n = {
|
|
1093
1133
|
children: n
|
|
1094
|
-
}), /* @__PURE__ */
|
|
1095
|
-
/* @__PURE__ */ a(
|
|
1134
|
+
}), /* @__PURE__ */ d(rt, { children: [
|
|
1135
|
+
/* @__PURE__ */ a(nt, { asChild: !0, children: c }),
|
|
1096
1136
|
/* @__PURE__ */ a(
|
|
1097
|
-
|
|
1137
|
+
ot,
|
|
1098
1138
|
{
|
|
1099
1139
|
side: "right",
|
|
1100
1140
|
align: "center",
|
|
@@ -1102,16 +1142,16 @@ function gt({
|
|
|
1102
1142
|
...n
|
|
1103
1143
|
}
|
|
1104
1144
|
)
|
|
1105
|
-
] })) :
|
|
1145
|
+
] })) : c;
|
|
1106
1146
|
}
|
|
1107
|
-
function
|
|
1147
|
+
function xt({
|
|
1108
1148
|
className: t,
|
|
1109
1149
|
asChild: e = !1,
|
|
1110
1150
|
showOnHover: s = !1,
|
|
1111
1151
|
...r
|
|
1112
1152
|
}) {
|
|
1113
1153
|
return /* @__PURE__ */ a(
|
|
1114
|
-
e ?
|
|
1154
|
+
e ? z : "button",
|
|
1115
1155
|
{
|
|
1116
1156
|
"data-slot": "sidebar-menu-action",
|
|
1117
1157
|
"data-sidebar": "menu-action",
|
|
@@ -1130,7 +1170,7 @@ function bt({
|
|
|
1130
1170
|
}
|
|
1131
1171
|
);
|
|
1132
1172
|
}
|
|
1133
|
-
function
|
|
1173
|
+
function aa({ className: t, ...e }) {
|
|
1134
1174
|
return /* @__PURE__ */ a(
|
|
1135
1175
|
"ul",
|
|
1136
1176
|
{
|
|
@@ -1145,7 +1185,7 @@ function Ze({ className: t, ...e }) {
|
|
|
1145
1185
|
}
|
|
1146
1186
|
);
|
|
1147
1187
|
}
|
|
1148
|
-
function
|
|
1188
|
+
function sa({
|
|
1149
1189
|
className: t,
|
|
1150
1190
|
...e
|
|
1151
1191
|
}) {
|
|
@@ -1159,7 +1199,7 @@ function Je({
|
|
|
1159
1199
|
}
|
|
1160
1200
|
);
|
|
1161
1201
|
}
|
|
1162
|
-
function
|
|
1202
|
+
function ra({
|
|
1163
1203
|
asChild: t = !1,
|
|
1164
1204
|
size: e = "md",
|
|
1165
1205
|
isActive: s = !1,
|
|
@@ -1167,7 +1207,7 @@ function ta({
|
|
|
1167
1207
|
...n
|
|
1168
1208
|
}) {
|
|
1169
1209
|
return /* @__PURE__ */ a(
|
|
1170
|
-
t ?
|
|
1210
|
+
t ? z : "a",
|
|
1171
1211
|
{
|
|
1172
1212
|
"data-slot": "sidebar-menu-sub-button",
|
|
1173
1213
|
"data-sidebar": "menu-sub-button",
|
|
@@ -1185,17 +1225,17 @@ function ta({
|
|
|
1185
1225
|
}
|
|
1186
1226
|
);
|
|
1187
1227
|
}
|
|
1188
|
-
function
|
|
1228
|
+
function q({ to: t, children: e, ...s }) {
|
|
1189
1229
|
try {
|
|
1190
1230
|
return re(t), /* @__PURE__ */ a(ne, { to: t, ...s, children: e });
|
|
1191
1231
|
} catch {
|
|
1192
1232
|
return /* @__PURE__ */ a("a", { href: t, ...s, children: e });
|
|
1193
1233
|
}
|
|
1194
1234
|
}
|
|
1195
|
-
function
|
|
1235
|
+
function vt({ ...t }) {
|
|
1196
1236
|
return /* @__PURE__ */ a("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...t });
|
|
1197
1237
|
}
|
|
1198
|
-
function
|
|
1238
|
+
function yt({ className: t, ...e }) {
|
|
1199
1239
|
return /* @__PURE__ */ a(
|
|
1200
1240
|
"ol",
|
|
1201
1241
|
{
|
|
@@ -1208,7 +1248,7 @@ function vt({ className: t, ...e }) {
|
|
|
1208
1248
|
}
|
|
1209
1249
|
);
|
|
1210
1250
|
}
|
|
1211
|
-
function
|
|
1251
|
+
function Nt({ className: t, ...e }) {
|
|
1212
1252
|
return /* @__PURE__ */ a(
|
|
1213
1253
|
"li",
|
|
1214
1254
|
{
|
|
@@ -1218,14 +1258,14 @@ function yt({ className: t, ...e }) {
|
|
|
1218
1258
|
}
|
|
1219
1259
|
);
|
|
1220
1260
|
}
|
|
1221
|
-
function
|
|
1261
|
+
function Ct({
|
|
1222
1262
|
asChild: t,
|
|
1223
1263
|
className: e,
|
|
1224
1264
|
children: s,
|
|
1225
1265
|
...r
|
|
1226
1266
|
}) {
|
|
1227
1267
|
return /* @__PURE__ */ a(
|
|
1228
|
-
t ?
|
|
1268
|
+
t ? z : q,
|
|
1229
1269
|
{
|
|
1230
1270
|
"data-slot": "breadcrumb-link",
|
|
1231
1271
|
className: m("astw:hover:text-foreground astw:transition-colors", e),
|
|
@@ -1234,7 +1274,7 @@ function Nt({
|
|
|
1234
1274
|
}
|
|
1235
1275
|
);
|
|
1236
1276
|
}
|
|
1237
|
-
function
|
|
1277
|
+
function na({
|
|
1238
1278
|
children: t,
|
|
1239
1279
|
className: e,
|
|
1240
1280
|
...s
|
|
@@ -1247,19 +1287,19 @@ function ea({
|
|
|
1247
1287
|
"aria-hidden": "true",
|
|
1248
1288
|
className: m("astw:[&>svg]:size-3.5", e),
|
|
1249
1289
|
...s,
|
|
1250
|
-
children: t ?? /* @__PURE__ */ a(
|
|
1290
|
+
children: t ?? /* @__PURE__ */ a(Q, {})
|
|
1251
1291
|
}
|
|
1252
1292
|
);
|
|
1253
1293
|
}
|
|
1254
|
-
function
|
|
1294
|
+
function oa(t, e) {
|
|
1255
1295
|
if (!e.trim()) return t;
|
|
1256
1296
|
const s = e.toLowerCase();
|
|
1257
1297
|
return t.filter(
|
|
1258
1298
|
(r) => r.title.toLowerCase().includes(s) || r.path.toLowerCase().includes(s)
|
|
1259
1299
|
);
|
|
1260
1300
|
}
|
|
1261
|
-
const
|
|
1262
|
-
const s =
|
|
1301
|
+
const ia = (t, e) => {
|
|
1302
|
+
const s = Pt(e);
|
|
1263
1303
|
return t.reduce(
|
|
1264
1304
|
(r, n) => {
|
|
1265
1305
|
const o = s(n.meta.title, n.path);
|
|
@@ -1267,18 +1307,18 @@ const sa = (t, e) => {
|
|
|
1267
1307
|
title: o,
|
|
1268
1308
|
breadcrumbTitle: n.meta.breadcrumbTitle
|
|
1269
1309
|
};
|
|
1270
|
-
const i = (
|
|
1271
|
-
!
|
|
1272
|
-
const
|
|
1310
|
+
const i = (l, u) => {
|
|
1311
|
+
!l || l.length === 0 || l.forEach((w) => {
|
|
1312
|
+
const c = `${u}/${w.path}`, h = s(
|
|
1273
1313
|
w.meta.title,
|
|
1274
1314
|
w.path
|
|
1275
1315
|
);
|
|
1276
|
-
r[
|
|
1316
|
+
r[c] = {
|
|
1277
1317
|
title: h,
|
|
1278
1318
|
breadcrumbTitle: w.meta.breadcrumbTitle
|
|
1279
1319
|
}, w.subResources && w.subResources.length > 0 && i(
|
|
1280
1320
|
w.subResources,
|
|
1281
|
-
|
|
1321
|
+
c
|
|
1282
1322
|
);
|
|
1283
1323
|
});
|
|
1284
1324
|
};
|
|
@@ -1287,53 +1327,53 @@ const sa = (t, e) => {
|
|
|
1287
1327
|
{}
|
|
1288
1328
|
);
|
|
1289
1329
|
};
|
|
1290
|
-
function
|
|
1291
|
-
const n = t.split("/").filter((u) => u !== ""), o = e && n[0] === e ? n.slice(1) : n, i =
|
|
1292
|
-
const
|
|
1293
|
-
let h = i[
|
|
1330
|
+
function la(t, e, s, r) {
|
|
1331
|
+
const n = t.split("/").filter((u) => u !== ""), o = e && n[0] === e ? n.slice(1) : n, i = ia(s, r), l = o.map((u, w) => {
|
|
1332
|
+
const c = o.slice(0, w + 1).join("/");
|
|
1333
|
+
let h = i[c];
|
|
1294
1334
|
if (!h) {
|
|
1295
|
-
const
|
|
1296
|
-
([
|
|
1297
|
-
const C =
|
|
1298
|
-
return new RegExp(`^${C}$`).test(
|
|
1335
|
+
const g = Object.entries(i).find(
|
|
1336
|
+
([M]) => {
|
|
1337
|
+
const C = M.split("/").map((S) => S.startsWith(":") ? "[^/]+" : S).join("/");
|
|
1338
|
+
return new RegExp(`^${C}$`).test(c);
|
|
1299
1339
|
}
|
|
1300
1340
|
)?.[1];
|
|
1301
|
-
|
|
1341
|
+
g && (h = g);
|
|
1302
1342
|
}
|
|
1303
1343
|
let f;
|
|
1304
1344
|
return h ? typeof h.breadcrumbTitle == "function" ? f = h.breadcrumbTitle(u) : typeof h.breadcrumbTitle == "string" ? f = h.breadcrumbTitle : f = h.title : f = decodeURIComponent(u), {
|
|
1305
1345
|
segment: u,
|
|
1306
|
-
path:
|
|
1346
|
+
path: c,
|
|
1307
1347
|
title: f
|
|
1308
1348
|
};
|
|
1309
1349
|
});
|
|
1310
1350
|
return {
|
|
1311
1351
|
basePath: e || null,
|
|
1312
|
-
segments:
|
|
1352
|
+
segments: l
|
|
1313
1353
|
};
|
|
1314
1354
|
}
|
|
1315
|
-
const
|
|
1316
|
-
const { open: t, isIconMode: e } =
|
|
1317
|
-
return /* @__PURE__ */ a("div", { className: t && !e ? "astw:md:hidden" : void 0, children: /* @__PURE__ */ a(
|
|
1318
|
-
},
|
|
1319
|
-
const e = t.children ? t.children({ Outlet:
|
|
1355
|
+
const da = () => {
|
|
1356
|
+
const { open: t, isIconMode: e } = F();
|
|
1357
|
+
return /* @__PURE__ */ a("div", { className: t && !e ? "astw:md:hidden" : void 0, children: /* @__PURE__ */ a(Kt, { className: "astw:-ml-2.5" }) });
|
|
1358
|
+
}, us = (t) => {
|
|
1359
|
+
const e = t.children ? t.children({ Outlet: wt }) : null, s = Oe(), r = () => {
|
|
1320
1360
|
s.setTheme(s.theme === "dark" ? "light" : "dark");
|
|
1321
1361
|
};
|
|
1322
|
-
return /* @__PURE__ */ a(
|
|
1323
|
-
t.sidebar ?? /* @__PURE__ */ a(
|
|
1324
|
-
/* @__PURE__ */
|
|
1325
|
-
/* @__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__ */
|
|
1326
|
-
/* @__PURE__ */
|
|
1327
|
-
/* @__PURE__ */ a(
|
|
1328
|
-
/* @__PURE__ */ a(
|
|
1362
|
+
return /* @__PURE__ */ a(Ye, { className: "astw:flex astw:flex-col", children: /* @__PURE__ */ d("div", { className: "astw:flex astw:flex-1", children: [
|
|
1363
|
+
t.sidebar ?? /* @__PURE__ */ a(ca, {}),
|
|
1364
|
+
/* @__PURE__ */ d(Ze, { className: "astw:w-[calc(100%-var(--sidebar-width))]", children: [
|
|
1365
|
+
/* @__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: [
|
|
1366
|
+
/* @__PURE__ */ d("div", { className: "astw:flex astw:items-center astw:gap-2", children: [
|
|
1367
|
+
/* @__PURE__ */ a(da, {}),
|
|
1368
|
+
/* @__PURE__ */ a(fa, {})
|
|
1329
1369
|
] }),
|
|
1330
|
-
/* @__PURE__ */ a("div", { className: "astw:flex astw:items-center astw:gap-2", children: /* @__PURE__ */ a(
|
|
1370
|
+
/* @__PURE__ */ a("div", { className: "astw:flex astw:items-center astw:gap-2", children: /* @__PURE__ */ a(_, { variant: "outline", size: "icon", onClick: r, children: /* @__PURE__ */ a(ue, {}) }) })
|
|
1331
1371
|
] }) }),
|
|
1332
|
-
/* @__PURE__ */ a("div", { className: "astw:flex astw:flex-col astw:gap-4", children: e ?? /* @__PURE__ */ a(
|
|
1372
|
+
/* @__PURE__ */ a("div", { className: "astw:flex astw:flex-col astw:gap-4", children: e ?? /* @__PURE__ */ a(wt, {}) })
|
|
1333
1373
|
] })
|
|
1334
1374
|
] }) });
|
|
1335
|
-
},
|
|
1336
|
-
const { title: e, icon: s } =
|
|
1375
|
+
}, ca = (t) => {
|
|
1376
|
+
const { title: e, icon: s } = P(), { pathname: r } = Rt(), { isIconMode: n } = F(), o = /* @__PURE__ */ d(Je, { children: [
|
|
1337
1377
|
s,
|
|
1338
1378
|
/* @__PURE__ */ a(
|
|
1339
1379
|
"h1",
|
|
@@ -1346,23 +1386,23 @@ const na = () => {
|
|
|
1346
1386
|
}
|
|
1347
1387
|
)
|
|
1348
1388
|
] });
|
|
1349
|
-
return /* @__PURE__ */
|
|
1350
|
-
!n && /* @__PURE__ */
|
|
1389
|
+
return /* @__PURE__ */ d(Xe, { variant: "inset", collapsible: n ? "icon" : "offcanvas", children: [
|
|
1390
|
+
!n && /* @__PURE__ */ d("div", { className: "astw:flex astw:justify-between astw:items-center", children: [
|
|
1351
1391
|
t.header ?? o,
|
|
1352
|
-
/* @__PURE__ */ a("div", { className: "astw:hidden astw:md:block", children: /* @__PURE__ */ a(
|
|
1392
|
+
/* @__PURE__ */ a("div", { className: "astw:hidden astw:md:block", children: /* @__PURE__ */ a(Kt, { className: "astw:-ml-1" }) })
|
|
1353
1393
|
] }),
|
|
1354
|
-
/* @__PURE__ */ a(
|
|
1394
|
+
/* @__PURE__ */ a(ta, { children: /* @__PURE__ */ a(Dt, { fallback: /* @__PURE__ */ a(ma, {}), children: /* @__PURE__ */ a(wa, { currentPath: r }) }) }),
|
|
1355
1395
|
t.footer ?? null
|
|
1356
1396
|
] });
|
|
1357
|
-
},
|
|
1358
|
-
const e =
|
|
1359
|
-
return /* @__PURE__ */ a(Et, { resolve: e, children: (s) => /* @__PURE__ */ a(
|
|
1360
|
-
},
|
|
1361
|
-
const e =
|
|
1362
|
-
return /* @__PURE__ */ a(
|
|
1363
|
-
s.url ? /* @__PURE__ */
|
|
1364
|
-
/* @__PURE__ */ a(
|
|
1365
|
-
|
|
1397
|
+
}, wa = ({ currentPath: t }) => {
|
|
1398
|
+
const e = Ft();
|
|
1399
|
+
return /* @__PURE__ */ a(Et, { resolve: e, children: (s) => /* @__PURE__ */ a(ua, { items: s ?? [], currentPath: t }) });
|
|
1400
|
+
}, ua = (t) => {
|
|
1401
|
+
const e = L();
|
|
1402
|
+
return /* @__PURE__ */ a(Vt, { children: /* @__PURE__ */ a(Ht, { children: t.items.map((s) => /* @__PURE__ */ a($e, { asChild: !0, defaultOpen: !0, children: /* @__PURE__ */ d(Ut, { children: [
|
|
1403
|
+
s.url ? /* @__PURE__ */ d(B, { children: [
|
|
1404
|
+
/* @__PURE__ */ a(bt, { asChild: !0, tooltip: s.title, children: /* @__PURE__ */ d(
|
|
1405
|
+
q,
|
|
1366
1406
|
{
|
|
1367
1407
|
to: s.url,
|
|
1368
1408
|
className: s.url === t.currentPath ? "astw:bg-sidebar-accent astw:font-medium" : void 0,
|
|
@@ -1372,29 +1412,29 @@ const na = () => {
|
|
|
1372
1412
|
]
|
|
1373
1413
|
}
|
|
1374
1414
|
) }),
|
|
1375
|
-
!!s.items?.length && /* @__PURE__ */ a(
|
|
1376
|
-
/* @__PURE__ */ a(
|
|
1415
|
+
!!s.items?.length && /* @__PURE__ */ a(ut, { asChild: !0, children: /* @__PURE__ */ d(xt, { className: "astw:data-[state=open]:rotate-90", children: [
|
|
1416
|
+
/* @__PURE__ */ a(Q, {}),
|
|
1377
1417
|
/* @__PURE__ */ a("span", { className: "astw:sr-only", children: e("toggle") })
|
|
1378
1418
|
] }) })
|
|
1379
|
-
] }) : /* @__PURE__ */ a(
|
|
1380
|
-
/* @__PURE__ */ a(
|
|
1419
|
+
] }) : /* @__PURE__ */ a(B, { children: /* @__PURE__ */ d(ut, { className: "astw:flex astw:w-[100%] astw:[&[data-state=open]_.astw-rotate-target]:rotate-90", children: [
|
|
1420
|
+
/* @__PURE__ */ a(bt, { asChild: !0, tooltip: s.title, children: /* @__PURE__ */ d("span", { className: "astw:flex astw:w-[100%]", children: [
|
|
1381
1421
|
s.icon,
|
|
1382
1422
|
/* @__PURE__ */ a("span", { children: s.title })
|
|
1383
1423
|
] }) }),
|
|
1384
1424
|
!!s.items?.length && /* @__PURE__ */ a(
|
|
1385
|
-
|
|
1425
|
+
xt,
|
|
1386
1426
|
{
|
|
1387
1427
|
className: "astw-rotate-target",
|
|
1388
1428
|
asChild: !0,
|
|
1389
|
-
children: /* @__PURE__ */
|
|
1390
|
-
/* @__PURE__ */ a(
|
|
1429
|
+
children: /* @__PURE__ */ d("span", { children: [
|
|
1430
|
+
/* @__PURE__ */ a(Q, {}),
|
|
1391
1431
|
/* @__PURE__ */ a("span", { className: "astw:sr-only", children: e("toggle") })
|
|
1392
1432
|
] })
|
|
1393
1433
|
}
|
|
1394
1434
|
)
|
|
1395
1435
|
] }) }),
|
|
1396
|
-
!!s.items?.length && /* @__PURE__ */ a(
|
|
1397
|
-
|
|
1436
|
+
!!s.items?.length && /* @__PURE__ */ a(We, { children: /* @__PURE__ */ a(aa, { children: s.items?.map((r) => /* @__PURE__ */ a(sa, { children: /* @__PURE__ */ a(ra, { asChild: !0, children: /* @__PURE__ */ a(
|
|
1437
|
+
q,
|
|
1398
1438
|
{
|
|
1399
1439
|
to: r.url,
|
|
1400
1440
|
className: r.url === t.currentPath ? "astw:bg-sidebar-accent astw:font-medium" : void 0,
|
|
@@ -1402,9 +1442,9 @@ const na = () => {
|
|
|
1402
1442
|
}
|
|
1403
1443
|
) }) }, r.title)) }) })
|
|
1404
1444
|
] }) }, s.title)) }) });
|
|
1405
|
-
},
|
|
1445
|
+
}, ma = () => {
|
|
1406
1446
|
const e = [...[112, 96, 80, 104, 88, 100, 92, 84]].sort(() => Math.random() - 0.5);
|
|
1407
|
-
return /* @__PURE__ */ a(
|
|
1447
|
+
return /* @__PURE__ */ a(Vt, { children: /* @__PURE__ */ a(Ht, { className: "astw:px-2", children: e.map((s, r) => /* @__PURE__ */ a(Ut, { children: /* @__PURE__ */ d("div", { className: "astw:flex astw:items-center astw:gap-2 astw:py-1.5", children: [
|
|
1408
1448
|
/* @__PURE__ */ a("div", { className: "astw:h-4 astw:w-4 astw:rounded-md astw:bg-muted" }),
|
|
1409
1449
|
/* @__PURE__ */ a(
|
|
1410
1450
|
"div",
|
|
@@ -1414,39 +1454,39 @@ const na = () => {
|
|
|
1414
1454
|
}
|
|
1415
1455
|
)
|
|
1416
1456
|
] }) }, r)) }) });
|
|
1417
|
-
},
|
|
1418
|
-
const { configurations: t } =
|
|
1419
|
-
return
|
|
1457
|
+
}, ha = () => {
|
|
1458
|
+
const { configurations: t } = P(), e = Rt();
|
|
1459
|
+
return la(
|
|
1420
1460
|
e.pathname,
|
|
1421
1461
|
t.basePath,
|
|
1422
1462
|
t.modules,
|
|
1423
1463
|
t.locale
|
|
1424
1464
|
);
|
|
1425
|
-
},
|
|
1426
|
-
const { segments: t } =
|
|
1427
|
-
return e ? /* @__PURE__ */ a(
|
|
1465
|
+
}, fa = () => {
|
|
1466
|
+
const { segments: t } = ha(), e = oe("/:prefix/settings/:suffix"), s = L();
|
|
1467
|
+
return e ? /* @__PURE__ */ a(vt, { children: /* @__PURE__ */ a(yt, { children: /* @__PURE__ */ a("div", { className: "astw:inline-flex astw:items-center astw:gap-3 astw:last:text-foreground", children: /* @__PURE__ */ a(Nt, { children: /* @__PURE__ */ a(Ct, { to: `/${e.params.prefix}/settings`, children: s("settings") }) }) }) }) }) : /* @__PURE__ */ a(vt, { children: /* @__PURE__ */ a(yt, { children: t.map((r, n) => /* @__PURE__ */ d(
|
|
1428
1468
|
"div",
|
|
1429
1469
|
{
|
|
1430
1470
|
className: "astw:inline-flex astw:items-center astw:gap-3 astw:last:text-foreground",
|
|
1431
1471
|
children: [
|
|
1432
|
-
/* @__PURE__ */ a(
|
|
1433
|
-
n < t.length - 1 && /* @__PURE__ */ a(
|
|
1472
|
+
/* @__PURE__ */ a(Nt, { children: /* @__PURE__ */ a(Ct, { to: r.path, children: r.title }) }),
|
|
1473
|
+
n < t.length - 1 && /* @__PURE__ */ a(na, {})
|
|
1434
1474
|
]
|
|
1435
1475
|
},
|
|
1436
1476
|
n
|
|
1437
1477
|
)) }) });
|
|
1438
1478
|
};
|
|
1439
|
-
function
|
|
1479
|
+
function ga({
|
|
1440
1480
|
...t
|
|
1441
1481
|
}) {
|
|
1442
1482
|
return /* @__PURE__ */ a(b.Root, { "data-slot": "dialog", ...t });
|
|
1443
1483
|
}
|
|
1444
|
-
function
|
|
1484
|
+
function pa({
|
|
1445
1485
|
...t
|
|
1446
1486
|
}) {
|
|
1447
1487
|
return /* @__PURE__ */ a(b.Portal, { "data-slot": "dialog-portal", ...t });
|
|
1448
1488
|
}
|
|
1449
|
-
function
|
|
1489
|
+
function ba({
|
|
1450
1490
|
className: t,
|
|
1451
1491
|
...e
|
|
1452
1492
|
}) {
|
|
@@ -1462,14 +1502,14 @@ function ha({
|
|
|
1462
1502
|
}
|
|
1463
1503
|
);
|
|
1464
1504
|
}
|
|
1465
|
-
function
|
|
1505
|
+
function xa({
|
|
1466
1506
|
className: t,
|
|
1467
1507
|
children: e,
|
|
1468
1508
|
...s
|
|
1469
1509
|
}) {
|
|
1470
|
-
return /* @__PURE__ */
|
|
1471
|
-
/* @__PURE__ */ a(
|
|
1472
|
-
/* @__PURE__ */
|
|
1510
|
+
return /* @__PURE__ */ d(pa, { "data-slot": "dialog-portal", children: [
|
|
1511
|
+
/* @__PURE__ */ a(ba, {}),
|
|
1512
|
+
/* @__PURE__ */ d(
|
|
1473
1513
|
b.Content,
|
|
1474
1514
|
{
|
|
1475
1515
|
"data-slot": "dialog-content",
|
|
@@ -1480,8 +1520,8 @@ function fa({
|
|
|
1480
1520
|
...s,
|
|
1481
1521
|
children: [
|
|
1482
1522
|
e,
|
|
1483
|
-
/* @__PURE__ */
|
|
1484
|
-
/* @__PURE__ */ a(
|
|
1523
|
+
/* @__PURE__ */ d(b.Close, { className: "astw:ring-offset-bg astw:focus:ring-ring astw:data-[state=open]:bg-accent astw:data-[state=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: [
|
|
1524
|
+
/* @__PURE__ */ a(Bt, {}),
|
|
1485
1525
|
/* @__PURE__ */ a("span", { className: "astw:sr-only", children: "Close" })
|
|
1486
1526
|
] })
|
|
1487
1527
|
]
|
|
@@ -1489,7 +1529,7 @@ function fa({
|
|
|
1489
1529
|
)
|
|
1490
1530
|
] });
|
|
1491
1531
|
}
|
|
1492
|
-
function
|
|
1532
|
+
function va({
|
|
1493
1533
|
className: t,
|
|
1494
1534
|
...e
|
|
1495
1535
|
}) {
|
|
@@ -1502,16 +1542,16 @@ function pa({
|
|
|
1502
1542
|
}
|
|
1503
1543
|
);
|
|
1504
1544
|
}
|
|
1505
|
-
function
|
|
1545
|
+
function ya(t) {
|
|
1506
1546
|
const e = [], s = (r, n, o) => {
|
|
1507
1547
|
r.forEach((i) => {
|
|
1508
|
-
const
|
|
1548
|
+
const l = [...o, i.title];
|
|
1509
1549
|
e.push({
|
|
1510
1550
|
path: i.url,
|
|
1511
1551
|
title: i.title,
|
|
1512
1552
|
icon: n,
|
|
1513
|
-
breadcrumb:
|
|
1514
|
-
}), i.items && i.items.length > 0 && s(i.items, n,
|
|
1553
|
+
breadcrumb: l
|
|
1554
|
+
}), i.items && i.items.length > 0 && s(i.items, n, l);
|
|
1515
1555
|
});
|
|
1516
1556
|
};
|
|
1517
1557
|
return t.forEach((r) => {
|
|
@@ -1523,16 +1563,16 @@ function ga(t) {
|
|
|
1523
1563
|
}), s(r.items, r.icon, [r.title]);
|
|
1524
1564
|
}), e;
|
|
1525
1565
|
}
|
|
1526
|
-
function
|
|
1566
|
+
function Na({
|
|
1527
1567
|
routes: t
|
|
1528
1568
|
}) {
|
|
1529
|
-
const e = ie(), s =
|
|
1530
|
-
() =>
|
|
1569
|
+
const e = ie(), s = pe(null), [r, n] = R(!1), [o, i] = R(""), [l, u] = R(0), w = k(
|
|
1570
|
+
() => oa(t, o),
|
|
1531
1571
|
[t, o]
|
|
1532
1572
|
);
|
|
1533
1573
|
y(() => {
|
|
1534
|
-
const f = (
|
|
1535
|
-
(
|
|
1574
|
+
const f = (g) => {
|
|
1575
|
+
(g.metaKey || g.ctrlKey) && g.key === "k" && (g.preventDefault(), n((M) => !M));
|
|
1536
1576
|
};
|
|
1537
1577
|
return document.addEventListener("keydown", f), () => document.removeEventListener("keydown", f);
|
|
1538
1578
|
}, []), y(() => {
|
|
@@ -1540,70 +1580,70 @@ function ba({
|
|
|
1540
1580
|
}, [w]), y(() => {
|
|
1541
1581
|
r || (i(""), u(0));
|
|
1542
1582
|
}, [r]), y(() => {
|
|
1543
|
-
s.current && s.current.querySelector(`[data-index="${
|
|
1544
|
-
}, [
|
|
1545
|
-
const
|
|
1583
|
+
s.current && s.current.querySelector(`[data-index="${l}"]`)?.scrollIntoView({ block: "nearest" });
|
|
1584
|
+
}, [l]);
|
|
1585
|
+
const c = ct(
|
|
1546
1586
|
(f) => {
|
|
1547
1587
|
e(f.path), n(!1), i("");
|
|
1548
1588
|
},
|
|
1549
1589
|
[e]
|
|
1550
|
-
), h =
|
|
1590
|
+
), h = ct(
|
|
1551
1591
|
(f) => {
|
|
1552
1592
|
if (!f.nativeEvent.isComposing)
|
|
1553
1593
|
switch (f.key) {
|
|
1554
1594
|
case "ArrowDown":
|
|
1555
1595
|
f.preventDefault(), u(
|
|
1556
|
-
(
|
|
1596
|
+
(g) => g < w.length - 1 ? g + 1 : g
|
|
1557
1597
|
);
|
|
1558
1598
|
break;
|
|
1559
1599
|
case "ArrowUp":
|
|
1560
|
-
f.preventDefault(), u((
|
|
1600
|
+
f.preventDefault(), u((g) => g > 0 ? g - 1 : g);
|
|
1561
1601
|
break;
|
|
1562
1602
|
case "Enter":
|
|
1563
|
-
f.preventDefault(), w[
|
|
1603
|
+
f.preventDefault(), w[l] && c(w[l]);
|
|
1564
1604
|
break;
|
|
1565
1605
|
}
|
|
1566
1606
|
},
|
|
1567
|
-
[w,
|
|
1607
|
+
[w, l, c]
|
|
1568
1608
|
);
|
|
1569
1609
|
return {
|
|
1570
1610
|
open: r,
|
|
1571
1611
|
setOpen: n,
|
|
1572
1612
|
search: o,
|
|
1573
1613
|
setSearch: i,
|
|
1574
|
-
selectedIndex:
|
|
1614
|
+
selectedIndex: l,
|
|
1575
1615
|
filteredRoutes: w,
|
|
1576
|
-
handleSelect:
|
|
1616
|
+
handleSelect: c,
|
|
1577
1617
|
handleKeyDown: h,
|
|
1578
1618
|
listRef: s
|
|
1579
1619
|
};
|
|
1580
1620
|
}
|
|
1581
|
-
function
|
|
1621
|
+
function Ca({
|
|
1582
1622
|
navItems: t
|
|
1583
1623
|
}) {
|
|
1584
|
-
const e =
|
|
1624
|
+
const e = L(), s = k(() => ya(t), [t]), {
|
|
1585
1625
|
open: r,
|
|
1586
1626
|
setOpen: n,
|
|
1587
1627
|
search: o,
|
|
1588
1628
|
setSearch: i,
|
|
1589
|
-
selectedIndex:
|
|
1629
|
+
selectedIndex: l,
|
|
1590
1630
|
filteredRoutes: u,
|
|
1591
1631
|
handleSelect: w,
|
|
1592
|
-
handleKeyDown:
|
|
1632
|
+
handleKeyDown: c,
|
|
1593
1633
|
listRef: h
|
|
1594
|
-
} =
|
|
1595
|
-
return /* @__PURE__ */ a(
|
|
1596
|
-
|
|
1634
|
+
} = Na({ routes: s });
|
|
1635
|
+
return /* @__PURE__ */ a(ga, { open: r, onOpenChange: n, children: /* @__PURE__ */ d(
|
|
1636
|
+
xa,
|
|
1597
1637
|
{
|
|
1598
1638
|
className: "astw:p-0 astw:gap-0 astw:sm:max-w-2xl astw:overflow-hidden",
|
|
1599
|
-
onKeyDown:
|
|
1639
|
+
onKeyDown: c,
|
|
1600
1640
|
"aria-describedby": void 0,
|
|
1601
1641
|
children: [
|
|
1602
|
-
/* @__PURE__ */ a(
|
|
1603
|
-
/* @__PURE__ */
|
|
1642
|
+
/* @__PURE__ */ a(va, { className: "astw:sr-only", children: e("commandPaletteSearch") }),
|
|
1643
|
+
/* @__PURE__ */ d("div", { className: "astw:flex astw:items-center astw:border-b astw:px-3 astw:py-1", children: [
|
|
1604
1644
|
/* @__PURE__ */ a(me, { className: "astw:mr-2 astw:h-4 astw:w-4 astw:shrink-0 astw:opacity-50" }),
|
|
1605
1645
|
/* @__PURE__ */ a(
|
|
1606
|
-
|
|
1646
|
+
Ve,
|
|
1607
1647
|
{
|
|
1608
1648
|
value: o,
|
|
1609
1649
|
onChange: (f) => i(f.target.value),
|
|
@@ -1618,18 +1658,18 @@ function xa({
|
|
|
1618
1658
|
{
|
|
1619
1659
|
ref: h,
|
|
1620
1660
|
className: "astw:max-h-[300px] astw:overflow-y-auto astw:overflow-x-hidden",
|
|
1621
|
-
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,
|
|
1661
|
+
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, g) => /* @__PURE__ */ d(
|
|
1622
1662
|
"button",
|
|
1623
1663
|
{
|
|
1624
|
-
"data-index":
|
|
1664
|
+
"data-index": g,
|
|
1625
1665
|
onClick: () => w(f),
|
|
1626
1666
|
className: m(
|
|
1627
1667
|
"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",
|
|
1628
|
-
|
|
1668
|
+
g === l ? "astw:bg-accent astw:text-accent-foreground" : "astw:hover:bg-accent astw:hover:text-accent-foreground"
|
|
1629
1669
|
),
|
|
1630
1670
|
children: [
|
|
1631
1671
|
/* @__PURE__ */ a("span", { className: "astw:truncate astw:w-full astw:text-left", children: f.breadcrumb.join(" > ") }),
|
|
1632
|
-
/* @__PURE__ */
|
|
1672
|
+
/* @__PURE__ */ d("span", { className: "astw:text-[11px] astw:text-muted-foreground astw:truncate astw:w-full astw:text-left", children: [
|
|
1633
1673
|
"/",
|
|
1634
1674
|
f.path
|
|
1635
1675
|
] })
|
|
@@ -1643,17 +1683,17 @@ function xa({
|
|
|
1643
1683
|
}
|
|
1644
1684
|
) });
|
|
1645
1685
|
}
|
|
1646
|
-
function
|
|
1647
|
-
const t =
|
|
1648
|
-
return /* @__PURE__ */ a(
|
|
1686
|
+
function ms() {
|
|
1687
|
+
const t = Ft();
|
|
1688
|
+
return /* @__PURE__ */ a(Dt, { fallback: null, children: /* @__PURE__ */ a(Et, { resolve: t, children: (e) => /* @__PURE__ */ a(Ca, { navItems: e ?? [] }) }) });
|
|
1649
1689
|
}
|
|
1650
|
-
const
|
|
1651
|
-
const e =
|
|
1652
|
-
() =>
|
|
1690
|
+
const Qt = W(null), hs = (t) => {
|
|
1691
|
+
const e = k(
|
|
1692
|
+
() => ve({
|
|
1653
1693
|
clientId: t.clientId,
|
|
1654
1694
|
appUri: t.apiEndpoint,
|
|
1655
1695
|
redirectUri: t.redirectUri,
|
|
1656
|
-
meQuery: t.meQuery && (typeof t.meQuery == "string" ? t.meQuery :
|
|
1696
|
+
meQuery: t.meQuery && (typeof t.meQuery == "string" ? t.meQuery : xe(t.meQuery))
|
|
1657
1697
|
}),
|
|
1658
1698
|
[t.clientId, t.apiEndpoint, t.redirectUri, t.meQuery]
|
|
1659
1699
|
), [s, r] = R(
|
|
@@ -1669,7 +1709,7 @@ const Ut = q(null), is = (t) => {
|
|
|
1669
1709
|
);
|
|
1670
1710
|
const n = t.guardComponent && (s.isLoading || !s.isAuthenticated) ? /* @__PURE__ */ a(t.guardComponent, {}) : t.children;
|
|
1671
1711
|
return /* @__PURE__ */ a(
|
|
1672
|
-
|
|
1712
|
+
Qt.Provider,
|
|
1673
1713
|
{
|
|
1674
1714
|
value: {
|
|
1675
1715
|
authState: s,
|
|
@@ -1681,12 +1721,12 @@ const Ut = q(null), is = (t) => {
|
|
|
1681
1721
|
children: n
|
|
1682
1722
|
}
|
|
1683
1723
|
);
|
|
1684
|
-
},
|
|
1685
|
-
const t =
|
|
1724
|
+
}, fs = () => {
|
|
1725
|
+
const t = D(Qt);
|
|
1686
1726
|
if (!t)
|
|
1687
1727
|
throw new Error("useAuth must be used within an AuthProvider");
|
|
1688
1728
|
return t;
|
|
1689
|
-
},
|
|
1729
|
+
}, Sa = Y(
|
|
1690
1730
|
"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",
|
|
1691
1731
|
{
|
|
1692
1732
|
variants: {
|
|
@@ -1708,38 +1748,38 @@ const Ut = q(null), is = (t) => {
|
|
|
1708
1748
|
variant: "default"
|
|
1709
1749
|
}
|
|
1710
1750
|
}
|
|
1711
|
-
),
|
|
1751
|
+
), Ta = {
|
|
1712
1752
|
"outline-success": "astw:bg-green-500",
|
|
1713
1753
|
"outline-warning": "astw:bg-orange-500",
|
|
1714
1754
|
"outline-error": "astw:bg-red-500",
|
|
1715
1755
|
"outline-info": "astw:bg-blue-500",
|
|
1716
1756
|
"outline-neutral": "astw:bg-neutral-400"
|
|
1717
1757
|
};
|
|
1718
|
-
function
|
|
1719
|
-
const e =
|
|
1758
|
+
function ka({ variant: t }) {
|
|
1759
|
+
const e = Ta[t];
|
|
1720
1760
|
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;
|
|
1721
1761
|
}
|
|
1722
|
-
function
|
|
1762
|
+
function Ra({ className: t, variant: e, children: s, ...r }) {
|
|
1723
1763
|
const n = e?.toString().startsWith("outline-");
|
|
1724
|
-
return /* @__PURE__ */
|
|
1764
|
+
return /* @__PURE__ */ d(
|
|
1725
1765
|
"div",
|
|
1726
1766
|
{
|
|
1727
|
-
className: m(
|
|
1767
|
+
className: m(Sa({ variant: e }), t),
|
|
1728
1768
|
...r,
|
|
1729
1769
|
children: [
|
|
1730
|
-
n && /* @__PURE__ */ a(
|
|
1770
|
+
n && /* @__PURE__ */ a(ka, { variant: e }),
|
|
1731
1771
|
s
|
|
1732
1772
|
]
|
|
1733
1773
|
}
|
|
1734
1774
|
);
|
|
1735
1775
|
}
|
|
1736
|
-
function
|
|
1776
|
+
function Ea(t) {
|
|
1737
1777
|
return t.type === "divider";
|
|
1738
1778
|
}
|
|
1739
|
-
function
|
|
1779
|
+
function Ba(t) {
|
|
1740
1780
|
return t.type !== "divider" && "key" in t;
|
|
1741
1781
|
}
|
|
1742
|
-
function
|
|
1782
|
+
function K(t, e) {
|
|
1743
1783
|
return e.split(".").reduce((s, r) => {
|
|
1744
1784
|
if (s && typeof s == "object" && r in s)
|
|
1745
1785
|
return s[r];
|
|
@@ -1748,10 +1788,10 @@ function W(t, e) {
|
|
|
1748
1788
|
function v(t) {
|
|
1749
1789
|
return t == null || t === "";
|
|
1750
1790
|
}
|
|
1751
|
-
function
|
|
1791
|
+
function Da(t) {
|
|
1752
1792
|
return t.toLowerCase().replace(/_/g, " ").replace(/^\w/, (e) => e.toUpperCase());
|
|
1753
1793
|
}
|
|
1754
|
-
function
|
|
1794
|
+
function Pa(t, e = "medium") {
|
|
1755
1795
|
if (v(t)) return "";
|
|
1756
1796
|
const s = t instanceof Date ? t : new Date(String(t));
|
|
1757
1797
|
if (isNaN(s.getTime())) return String(t);
|
|
@@ -1783,7 +1823,7 @@ function Ra(t, e = "medium") {
|
|
|
1783
1823
|
return s.toLocaleDateString();
|
|
1784
1824
|
}
|
|
1785
1825
|
}
|
|
1786
|
-
function
|
|
1826
|
+
function La(t, e) {
|
|
1787
1827
|
if (v(t)) return "";
|
|
1788
1828
|
const s = typeof t == "number" ? t : parseFloat(String(t));
|
|
1789
1829
|
if (isNaN(s)) return String(t);
|
|
@@ -1796,7 +1836,7 @@ function Ea(t, e) {
|
|
|
1796
1836
|
return `${e || "$"}${s.toFixed(2)}`;
|
|
1797
1837
|
}
|
|
1798
1838
|
}
|
|
1799
|
-
function
|
|
1839
|
+
function Ma(t) {
|
|
1800
1840
|
if (v(t)) return [];
|
|
1801
1841
|
if (typeof t == "string")
|
|
1802
1842
|
return t.split(/[,\n]/).map((e) => e.trim()).filter(Boolean);
|
|
@@ -1812,10 +1852,10 @@ function La(t) {
|
|
|
1812
1852
|
}
|
|
1813
1853
|
return [String(t)];
|
|
1814
1854
|
}
|
|
1815
|
-
function
|
|
1816
|
-
const [e, s] =
|
|
1817
|
-
return /* @__PURE__ */
|
|
1818
|
-
/* @__PURE__ */ a(
|
|
1855
|
+
function qt({ value: t }) {
|
|
1856
|
+
const [e, s] = p.useState(!1);
|
|
1857
|
+
return /* @__PURE__ */ d(rt, { children: [
|
|
1858
|
+
/* @__PURE__ */ a(nt, { asChild: !0, children: /* @__PURE__ */ a(
|
|
1819
1859
|
"button",
|
|
1820
1860
|
{
|
|
1821
1861
|
onClick: async (n) => {
|
|
@@ -1826,16 +1866,16 @@ function Qt({ value: t }) {
|
|
|
1826
1866
|
}
|
|
1827
1867
|
},
|
|
1828
1868
|
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",
|
|
1829
|
-
children: e ? /* @__PURE__ */ a(fe, { className: "astw:h-3 astw:w-3", strokeWidth: 2.5 }) : /* @__PURE__ */ a(
|
|
1869
|
+
children: e ? /* @__PURE__ */ a(fe, { className: "astw:h-3 astw:w-3", strokeWidth: 2.5 }) : /* @__PURE__ */ a(ge, { className: "astw:h-3 astw:w-3", strokeWidth: 2.5 })
|
|
1830
1870
|
}
|
|
1831
1871
|
) }),
|
|
1832
|
-
/* @__PURE__ */ a(
|
|
1872
|
+
/* @__PURE__ */ a(ot, { side: "top", children: e ? "Copied!" : "Copy" })
|
|
1833
1873
|
] });
|
|
1834
1874
|
}
|
|
1835
1875
|
const N = "–";
|
|
1836
|
-
function
|
|
1837
|
-
const e = v(t.value) ? N : String(t.value), s = t.meta?.copyable && !v(t.value), r = t.meta?.truncateLines, n =
|
|
1838
|
-
|
|
1876
|
+
function Ia({ field: t }) {
|
|
1877
|
+
const e = v(t.value) ? N : String(t.value), s = t.meta?.copyable && !v(t.value), r = t.meta?.truncateLines, n = p.useRef(null), [o, i] = p.useState(!1);
|
|
1878
|
+
p.useEffect(() => {
|
|
1839
1879
|
if (!r) {
|
|
1840
1880
|
i(!1);
|
|
1841
1881
|
return;
|
|
@@ -1845,56 +1885,56 @@ function Ba({ field: t }) {
|
|
|
1845
1885
|
const h = n.current;
|
|
1846
1886
|
i(h.scrollHeight > h.clientHeight + 1);
|
|
1847
1887
|
}
|
|
1848
|
-
},
|
|
1888
|
+
}, c = setTimeout(w, 50);
|
|
1849
1889
|
return window.addEventListener("resize", w), () => {
|
|
1850
|
-
clearTimeout(
|
|
1890
|
+
clearTimeout(c), window.removeEventListener("resize", w);
|
|
1851
1891
|
};
|
|
1852
1892
|
}, [e, r]);
|
|
1853
|
-
const
|
|
1893
|
+
const l = r && r > 0 ? {
|
|
1854
1894
|
display: "-webkit-box",
|
|
1855
1895
|
WebkitLineClamp: r,
|
|
1856
1896
|
WebkitBoxOrient: "vertical",
|
|
1857
1897
|
overflow: "hidden"
|
|
1858
|
-
} : void 0, u = /* @__PURE__ */
|
|
1898
|
+
} : void 0, u = /* @__PURE__ */ d("div", { className: "astw:flex astw:items-start astw:gap-1 astw:min-w-0", children: [
|
|
1859
1899
|
/* @__PURE__ */ a(
|
|
1860
1900
|
"p",
|
|
1861
1901
|
{
|
|
1862
1902
|
ref: n,
|
|
1863
1903
|
className: "astw:text-sm astw:font-medium astw:text-foreground astw:break-words astw:m-0",
|
|
1864
|
-
style:
|
|
1904
|
+
style: l,
|
|
1865
1905
|
children: e
|
|
1866
1906
|
}
|
|
1867
1907
|
),
|
|
1868
|
-
s && /* @__PURE__ */ a(
|
|
1908
|
+
s && /* @__PURE__ */ a(qt, { value: String(t.value) })
|
|
1869
1909
|
] });
|
|
1870
|
-
return r && o ? /* @__PURE__ */
|
|
1871
|
-
/* @__PURE__ */ a(
|
|
1872
|
-
/* @__PURE__ */ a(
|
|
1910
|
+
return r && o ? /* @__PURE__ */ d(rt, { children: [
|
|
1911
|
+
/* @__PURE__ */ a(nt, { asChild: !0, children: /* @__PURE__ */ a("span", { className: "astw:cursor-default", children: u }) }),
|
|
1912
|
+
/* @__PURE__ */ a(ot, { side: "bottom", style: { maxWidth: 320 }, children: /* @__PURE__ */ a("p", { className: "astw:text-sm", children: e }) })
|
|
1873
1913
|
] }) : u;
|
|
1874
1914
|
}
|
|
1875
|
-
function
|
|
1915
|
+
function Aa({ field: t }) {
|
|
1876
1916
|
if (v(t.value))
|
|
1877
1917
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: N });
|
|
1878
1918
|
const e = String(t.value), s = t.meta?.badgeVariantMap || {}, r = e.toLowerCase(), n = s[e] || s[r] || "outline-neutral";
|
|
1879
|
-
return /* @__PURE__ */ a(
|
|
1919
|
+
return /* @__PURE__ */ a(Ra, { variant: n, className: "astw:w-fit", children: Da(e) });
|
|
1880
1920
|
}
|
|
1881
|
-
function
|
|
1921
|
+
function _a({ field: t }) {
|
|
1882
1922
|
if (v(t.value))
|
|
1883
1923
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: N });
|
|
1884
|
-
const e = t.meta?.currencyKey || "currency", s =
|
|
1924
|
+
const e = t.meta?.currencyKey || "currency", s = K(t.data, e), r = La(t.value, s);
|
|
1885
1925
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground astw:tabular-nums", children: r });
|
|
1886
1926
|
}
|
|
1887
|
-
function
|
|
1927
|
+
function za({ field: t }) {
|
|
1888
1928
|
if (v(t.value))
|
|
1889
1929
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: N });
|
|
1890
|
-
const e = t.meta?.dateFormat || "medium", s =
|
|
1930
|
+
const e = t.meta?.dateFormat || "medium", s = Pa(t.value, e);
|
|
1891
1931
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: s });
|
|
1892
1932
|
}
|
|
1893
|
-
function
|
|
1933
|
+
function Fa({ field: t }) {
|
|
1894
1934
|
if (v(t.value))
|
|
1895
1935
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: N });
|
|
1896
|
-
const e = t.meta?.hrefKey, s = e ?
|
|
1897
|
-
return s ? /* @__PURE__ */
|
|
1936
|
+
const e = t.meta?.hrefKey, s = e ? K(t.data, e) : void 0, r = t.meta?.external ?? !1, n = String(t.value);
|
|
1937
|
+
return s ? /* @__PURE__ */ d(
|
|
1898
1938
|
"a",
|
|
1899
1939
|
{
|
|
1900
1940
|
href: s,
|
|
@@ -1908,58 +1948,58 @@ function Ia({ field: t }) {
|
|
|
1908
1948
|
}
|
|
1909
1949
|
) : /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: n });
|
|
1910
1950
|
}
|
|
1911
|
-
function
|
|
1951
|
+
function Oa({ field: t }) {
|
|
1912
1952
|
if (v(t.value))
|
|
1913
1953
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: N });
|
|
1914
|
-
const e =
|
|
1954
|
+
const e = Ma(t.value), s = t.meta?.copyable && !v(t.value), r = e.join(`
|
|
1915
1955
|
`);
|
|
1916
|
-
return /* @__PURE__ */
|
|
1917
|
-
/* @__PURE__ */ a("address", { className: "astw:text-sm astw:font-medium astw:text-foreground astw:not-italic", children: e.map((n, o) => /* @__PURE__ */
|
|
1956
|
+
return /* @__PURE__ */ d("div", { className: "astw:flex astw:items-start astw:gap-1 astw:min-w-0", children: [
|
|
1957
|
+
/* @__PURE__ */ a("address", { className: "astw:text-sm astw:font-medium astw:text-foreground astw:not-italic", children: e.map((n, o) => /* @__PURE__ */ d(p.Fragment, { children: [
|
|
1918
1958
|
n,
|
|
1919
1959
|
o < e.length - 1 && /* @__PURE__ */ a("br", {})
|
|
1920
1960
|
] }, o)) }),
|
|
1921
|
-
s && /* @__PURE__ */ a(
|
|
1961
|
+
s && /* @__PURE__ */ a(qt, { value: r })
|
|
1922
1962
|
] });
|
|
1923
1963
|
}
|
|
1924
|
-
function
|
|
1964
|
+
function $a({ field: t }) {
|
|
1925
1965
|
if (v(t.value))
|
|
1926
1966
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: N });
|
|
1927
|
-
const e = t.meta?.referenceIdKey, s = t.meta?.referenceUrlPattern, r = e ?
|
|
1967
|
+
const e = t.meta?.referenceIdKey, s = t.meta?.referenceUrlPattern, r = e ? K(t.data, e) : void 0, n = String(t.value);
|
|
1928
1968
|
if (!r || !s)
|
|
1929
1969
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: n });
|
|
1930
1970
|
const o = s.replace("{id}", r);
|
|
1931
1971
|
return /* @__PURE__ */ a("a", { href: o, className: "astw:text-sm astw:text-primary astw:hover:underline", children: n });
|
|
1932
1972
|
}
|
|
1933
|
-
function
|
|
1973
|
+
function St(t) {
|
|
1934
1974
|
switch (t.type) {
|
|
1935
1975
|
case "text":
|
|
1936
|
-
return /* @__PURE__ */ a(
|
|
1976
|
+
return /* @__PURE__ */ a(Ia, { field: t });
|
|
1937
1977
|
case "badge":
|
|
1938
|
-
return /* @__PURE__ */ a(
|
|
1978
|
+
return /* @__PURE__ */ a(Aa, { field: t });
|
|
1939
1979
|
case "money":
|
|
1940
|
-
return /* @__PURE__ */ a(
|
|
1980
|
+
return /* @__PURE__ */ a(_a, { field: t });
|
|
1941
1981
|
case "date":
|
|
1942
|
-
return /* @__PURE__ */ a(
|
|
1982
|
+
return /* @__PURE__ */ a(za, { field: t });
|
|
1943
1983
|
case "link":
|
|
1944
|
-
return /* @__PURE__ */ a(
|
|
1984
|
+
return /* @__PURE__ */ a(Fa, { field: t });
|
|
1945
1985
|
case "address":
|
|
1946
|
-
return /* @__PURE__ */ a(
|
|
1986
|
+
return /* @__PURE__ */ a(Oa, { field: t });
|
|
1947
1987
|
case "reference":
|
|
1948
|
-
return /* @__PURE__ */ a(
|
|
1988
|
+
return /* @__PURE__ */ a($a, { field: t });
|
|
1949
1989
|
default:
|
|
1950
1990
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: N });
|
|
1951
1991
|
}
|
|
1952
1992
|
}
|
|
1953
|
-
function
|
|
1993
|
+
function Wa(t) {
|
|
1954
1994
|
if (t.emptyBehavior !== "hide") return !1;
|
|
1955
1995
|
const e = t.value;
|
|
1956
1996
|
return e == null || e === "";
|
|
1957
1997
|
}
|
|
1958
|
-
function
|
|
1998
|
+
function ja(t) {
|
|
1959
1999
|
return !1;
|
|
1960
2000
|
}
|
|
1961
|
-
function
|
|
1962
|
-
const r =
|
|
2001
|
+
function Ka(t, e, s) {
|
|
2002
|
+
const r = K(e, t.key);
|
|
1963
2003
|
return {
|
|
1964
2004
|
id: `${t.key}-${s}`,
|
|
1965
2005
|
label: t.label,
|
|
@@ -1970,20 +2010,20 @@ function Oa(t, e, s) {
|
|
|
1970
2010
|
data: e
|
|
1971
2011
|
};
|
|
1972
2012
|
}
|
|
1973
|
-
function
|
|
2013
|
+
function Va(t, e) {
|
|
1974
2014
|
const s = [];
|
|
1975
2015
|
let r = [], n = 0, o = 0;
|
|
1976
2016
|
for (const i of t)
|
|
1977
|
-
if (
|
|
2017
|
+
if (Ea(i))
|
|
1978
2018
|
r.length > 0 && (s.push({ id: `section-${n}`, fields: r }), n++, r = []);
|
|
1979
|
-
else if (
|
|
1980
|
-
const
|
|
1981
|
-
o++,
|
|
2019
|
+
else if (Ba(i)) {
|
|
2020
|
+
const l = Ka(i, e, o);
|
|
2021
|
+
o++, Wa(l) || r.push(l);
|
|
1982
2022
|
}
|
|
1983
2023
|
return r.length > 0 && s.push({ id: `section-${n}`, fields: r }), s;
|
|
1984
2024
|
}
|
|
1985
|
-
function
|
|
1986
|
-
return /* @__PURE__ */
|
|
2025
|
+
function Tt({ label: t, children: e, fullWidth: s }) {
|
|
2026
|
+
return /* @__PURE__ */ d(
|
|
1987
2027
|
"div",
|
|
1988
2028
|
{
|
|
1989
2029
|
className: m(
|
|
@@ -1997,7 +2037,7 @@ function St({ label: t, children: e, fullWidth: s }) {
|
|
|
1997
2037
|
}
|
|
1998
2038
|
);
|
|
1999
2039
|
}
|
|
2000
|
-
function
|
|
2040
|
+
function gs({
|
|
2001
2041
|
data: t,
|
|
2002
2042
|
title: e,
|
|
2003
2043
|
fields: s,
|
|
@@ -2005,7 +2045,7 @@ function ds({
|
|
|
2005
2045
|
className: n,
|
|
2006
2046
|
headerAction: o
|
|
2007
2047
|
}) {
|
|
2008
|
-
const i =
|
|
2048
|
+
const i = Va(s, t), l = i.some((c) => c.fields.length > 0), u = m(
|
|
2009
2049
|
"astw:grid astw:gap-x-6 astw:gap-y-4",
|
|
2010
2050
|
// Default: 1 column
|
|
2011
2051
|
"astw:grid-cols-1",
|
|
@@ -2017,14 +2057,14 @@ function ds({
|
|
|
2017
2057
|
// 3-column mode: 1 → 2 → 3 columns
|
|
2018
2058
|
"astw:@[400px]:grid-cols-2 astw:@[600px]:grid-cols-3"
|
|
2019
2059
|
)
|
|
2020
|
-
), w = (
|
|
2021
|
-
const h =
|
|
2022
|
-
return /* @__PURE__ */
|
|
2023
|
-
h.length > 0 && /* @__PURE__ */ a("div", { className: u, children: h.map((
|
|
2024
|
-
f.length > 0 && /* @__PURE__ */ a("div", { className: u, children: f.map((
|
|
2025
|
-
] },
|
|
2060
|
+
), w = (c) => {
|
|
2061
|
+
const h = c.fields.filter((g) => !0), f = c.fields.filter((g) => ja());
|
|
2062
|
+
return /* @__PURE__ */ d("div", { className: "astw:space-y-4", children: [
|
|
2063
|
+
h.length > 0 && /* @__PURE__ */ a("div", { className: u, children: h.map((g) => /* @__PURE__ */ a(Tt, { label: g.label, children: St(g) }, g.id)) }),
|
|
2064
|
+
f.length > 0 && /* @__PURE__ */ a("div", { className: u, children: f.map((g) => /* @__PURE__ */ a(Tt, { label: g.label, fullWidth: !0, children: St(g) }, g.id)) })
|
|
2065
|
+
] }, c.id);
|
|
2026
2066
|
};
|
|
2027
|
-
return /* @__PURE__ */ a(
|
|
2067
|
+
return /* @__PURE__ */ a(st, { delayDuration: 300, children: /* @__PURE__ */ d(
|
|
2028
2068
|
"div",
|
|
2029
2069
|
{
|
|
2030
2070
|
className: m(
|
|
@@ -2032,19 +2072,19 @@ function ds({
|
|
|
2032
2072
|
n
|
|
2033
2073
|
),
|
|
2034
2074
|
children: [
|
|
2035
|
-
/* @__PURE__ */
|
|
2075
|
+
/* @__PURE__ */ d("div", { className: "astw:flex astw:items-center astw:justify-between astw:px-6 astw:py-6", children: [
|
|
2036
2076
|
/* @__PURE__ */ a("h3", { className: "astw:text-lg astw:font-semibold astw:leading-none", children: e }),
|
|
2037
2077
|
o && /* @__PURE__ */ a("div", { children: o })
|
|
2038
2078
|
] }),
|
|
2039
|
-
/* @__PURE__ */ a("div", { className: "astw:px-6 astw:pb-4", children:
|
|
2079
|
+
/* @__PURE__ */ a("div", { className: "astw:px-6 astw:pb-4", children: l ? /* @__PURE__ */ a("div", { className: "astw:space-y-4", children: i.map((c, h) => /* @__PURE__ */ d(p.Fragment, { children: [
|
|
2040
2080
|
h > 0 && /* @__PURE__ */ a("div", { className: "astw:h-px astw:bg-border", role: "separator" }),
|
|
2041
|
-
w(
|
|
2042
|
-
] },
|
|
2081
|
+
w(c)
|
|
2082
|
+
] }, c.id)) }) : /* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground", children: "No information available" }) })
|
|
2043
2083
|
]
|
|
2044
2084
|
}
|
|
2045
2085
|
) });
|
|
2046
2086
|
}
|
|
2047
|
-
const
|
|
2087
|
+
const it = p.forwardRef(
|
|
2048
2088
|
({ className: t, children: e, ...s }, r) => /* @__PURE__ */ a(
|
|
2049
2089
|
"div",
|
|
2050
2090
|
{
|
|
@@ -2055,8 +2095,8 @@ const ot = g.forwardRef(
|
|
|
2055
2095
|
}
|
|
2056
2096
|
)
|
|
2057
2097
|
);
|
|
2058
|
-
|
|
2059
|
-
function
|
|
2098
|
+
it.displayName = "Layout.Column";
|
|
2099
|
+
function Ha({
|
|
2060
2100
|
columns: t,
|
|
2061
2101
|
className: e,
|
|
2062
2102
|
gap: s = 4,
|
|
@@ -2065,13 +2105,13 @@ function Wa({
|
|
|
2065
2105
|
children: o
|
|
2066
2106
|
}) {
|
|
2067
2107
|
if (process.env.NODE_ENV !== "production") {
|
|
2068
|
-
const h =
|
|
2108
|
+
const h = p.Children.toArray(o).reduce((f, g) => p.isValidElement(g) && g.type === it ? f + 1 : f, 0);
|
|
2069
2109
|
if (h !== t)
|
|
2070
2110
|
throw new Error(
|
|
2071
2111
|
`Layout: Expected exactly ${t} Layout.Column child${t === 1 ? "" : "ren"}, but found ${h}. Please ensure the number of <Layout.Column> children matches the \`columns={${t}}\` prop.`
|
|
2072
2112
|
);
|
|
2073
2113
|
}
|
|
2074
|
-
const
|
|
2114
|
+
const l = m(
|
|
2075
2115
|
"astw:flex astw:w-full",
|
|
2076
2116
|
s === 4 ? "astw:gap-4" : s === 6 ? "astw:gap-6" : s === 8 ? "astw:gap-8" : "astw:gap-4",
|
|
2077
2117
|
// 1 column: Always stack vertically
|
|
@@ -2089,56 +2129,60 @@ function Wa({
|
|
|
2089
2129
|
"astw:xl:flex-row"
|
|
2090
2130
|
],
|
|
2091
2131
|
e
|
|
2092
|
-
), u =
|
|
2132
|
+
), u = p.useMemo(() => t === 1 ? p.Children.map(o, (c) => c) : t === 2 ? p.Children.map(o, (c, h) => p.isValidElement(c) ? p.cloneElement(c, {
|
|
2093
2133
|
className: m(
|
|
2094
|
-
|
|
2134
|
+
c.props.className,
|
|
2095
2135
|
h === 0 ? "astw:lg:flex-1" : "astw:lg:min-w-[280px]"
|
|
2096
2136
|
// Second column: fixed 280px
|
|
2097
2137
|
)
|
|
2098
|
-
}) :
|
|
2138
|
+
}) : c) : t === 3 ? p.Children.map(o, (c, h) => p.isValidElement(c) ? p.cloneElement(c, {
|
|
2099
2139
|
className: m(
|
|
2100
|
-
|
|
2140
|
+
c.props.className,
|
|
2101
2141
|
h === 0 ? "astw:xl:min-w-[320px]" : h === 2 ? "astw:xl:min-w-[280px]" : "astw:xl:flex-1"
|
|
2102
2142
|
// Middle column: flexible
|
|
2103
2143
|
)
|
|
2104
|
-
}) :
|
|
2105
|
-
return /* @__PURE__ */
|
|
2106
|
-
w && /* @__PURE__ */
|
|
2144
|
+
}) : c) : o, [o, t]), w = r || n && n.length > 0;
|
|
2145
|
+
return /* @__PURE__ */ d("div", { className: "astw:flex astw:flex-col", children: [
|
|
2146
|
+
w && /* @__PURE__ */ d(
|
|
2107
2147
|
"header",
|
|
2108
2148
|
{
|
|
2109
2149
|
className: "astw:w-full astw:flex astw:justify-between astw:items-center",
|
|
2110
2150
|
style: { padding: "1.5rem", paddingBottom: "1rem" },
|
|
2111
2151
|
children: [
|
|
2112
2152
|
r && /* @__PURE__ */ a("h1", { style: { fontSize: "1.5rem", fontWeight: "bold" }, children: r }),
|
|
2113
|
-
n && n.length > 0 && /* @__PURE__ */ a("div", { className: "astw:flex astw:gap-2 astw:items-center", children: n.map((
|
|
2153
|
+
n && n.length > 0 && /* @__PURE__ */ a("div", { className: "astw:flex astw:gap-2 astw:items-center", children: n.map((c, h) => /* @__PURE__ */ a(p.Fragment, { children: c }, h)) })
|
|
2114
2154
|
]
|
|
2115
2155
|
}
|
|
2116
2156
|
),
|
|
2117
|
-
/* @__PURE__ */ a("div", { style: { padding: w ? "0 1.5rem 1.5rem 1.5rem" : "1.5rem" }, children: /* @__PURE__ */ a("div", { className:
|
|
2157
|
+
/* @__PURE__ */ a("div", { style: { padding: w ? "0 1.5rem 1.5rem 1.5rem" : "1.5rem" }, children: /* @__PURE__ */ a("div", { className: l, children: u }) })
|
|
2118
2158
|
] });
|
|
2119
2159
|
}
|
|
2120
|
-
|
|
2160
|
+
Ha.Column = it;
|
|
2121
2161
|
export {
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
ls as
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2162
|
+
ws as AppShell,
|
|
2163
|
+
hs as AuthProvider,
|
|
2164
|
+
Ra as Badge,
|
|
2165
|
+
ms as CommandPalette,
|
|
2166
|
+
ca as DefaultSidebar,
|
|
2167
|
+
gs as DescriptionCard,
|
|
2168
|
+
Ha as Layout,
|
|
2169
|
+
xs as Link,
|
|
2170
|
+
us as SidebarLayout,
|
|
2171
|
+
Sa as badgeVariants,
|
|
2172
|
+
ke as defineI18nLabels,
|
|
2173
|
+
ds as defineModule,
|
|
2174
|
+
cs as defineResource,
|
|
2175
|
+
is as hidden,
|
|
2176
|
+
os as pass,
|
|
2177
|
+
ls as redirectTo,
|
|
2178
|
+
Se as useAppShell,
|
|
2179
|
+
P as useAppShellConfig,
|
|
2180
|
+
ns as useAppShellData,
|
|
2181
|
+
fs as useAuth,
|
|
2182
|
+
vs as useLocation,
|
|
2183
|
+
ys as useNavigate,
|
|
2184
|
+
Ns as useParams,
|
|
2185
|
+
Cs as useRouteError,
|
|
2186
|
+
Ss as useSearchParams,
|
|
2187
|
+
Oe as useTheme
|
|
2144
2188
|
};
|