@tailor-platform/app-shell 0.35.0 → 0.35.1
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.css +1 -1
- package/dist/app-shell.js +384 -353
- package/package.json +1 -1
package/dist/app-shell.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a, jsxs as c, Fragment as V } from "react/jsx-runtime";
|
|
2
2
|
import { capitalCase as Ct } from "change-case";
|
|
3
3
|
import { useRouteError as An, isRouteErrorResponse as Pn, redirect as Ln, Outlet as Re, NavLink as En, Navigate as Mn, useRouteLoaderData as Dn, createMemoryRouter as zn, createBrowserRouter as Vn, RouterProvider as _n, Await as ka, useNavigate as Bn, useLocation as Ft, Link as zt, useMatch as On } from "react-router";
|
|
4
|
-
import { Link as
|
|
4
|
+
import { Link as ac, useLocation as sc, useNavigate as nc, useParams as rc, useRouteError as oc, useSearchParams as ic } from "react-router";
|
|
5
5
|
import { cva as le } from "class-variance-authority";
|
|
6
6
|
import { useRender as jt } from "@base-ui/react/use-render";
|
|
7
7
|
import { clsx as $n } from "clsx";
|
|
@@ -9,27 +9,28 @@ import { twMerge as Fn } from "tailwind-merge";
|
|
|
9
9
|
import { AlertCircle as ca, Table as jn, XIcon as It, SearchIcon as Ia, LoaderCircleIcon as Gn, PanelLeftIcon as Hn, ExternalLink as Ra, ChevronRight as Vt, SunIcon as Kn, Check as Un, Copy as Wn, CheckIcon as Aa, ChevronDownIcon as Ae, ArrowLeftIcon as da, ArrowRightIcon as qn, UploadIcon as Yn, AlertTriangleIcon as Xn, CheckCircle2Icon as Pe, CircleAlertIcon as Qn, CircleDashedIcon as Zn } from "lucide-react";
|
|
10
10
|
import * as k from "react";
|
|
11
11
|
import { createContext as mt, useContext as tt, useMemo as G, useState as E, useEffect as st, useCallback as I, useId as Jn, useRef as j, Suspense as Le, useReducer as tr, useSyncExternalStore as Ee } from "react";
|
|
12
|
-
import {
|
|
12
|
+
import { useTheme as er } from "next-themes";
|
|
13
|
+
import { Toaster as ar, toast as sr } from "sonner";
|
|
13
14
|
import { Dialog as nt } from "@base-ui/react/dialog";
|
|
14
|
-
import { parsePath as
|
|
15
|
+
import { parsePath as nr } from "@tailor-platform/app-shell-vite-plugin/parser";
|
|
15
16
|
import { Drawer as z } from "@base-ui/react/drawer";
|
|
16
17
|
import { Tooltip as ct } from "@base-ui/react/tooltip";
|
|
17
18
|
import { Collapsible as Z } from "@base-ui/react/collapsible";
|
|
18
|
-
import { createAuthClient as
|
|
19
|
+
import { createAuthClient as rr } from "@tailor-platform/auth-public-client";
|
|
19
20
|
import { Avatar as Me } from "@base-ui/react/avatar";
|
|
20
21
|
import { Field as Rt } from "@base-ui/react/field";
|
|
21
22
|
import { Fieldset as Pa } from "@base-ui/react/fieldset";
|
|
22
|
-
import { Form as
|
|
23
|
+
import { Form as or } from "@base-ui/react/form";
|
|
23
24
|
import { Menu as O } from "@base-ui/react/menu";
|
|
24
25
|
import { Select as W } from "@base-ui/react/select";
|
|
25
26
|
import { Combobox as D } from "@base-ui/react/combobox";
|
|
26
27
|
import { Autocomplete as $ } from "@base-ui/react/autocomplete";
|
|
27
|
-
import
|
|
28
|
+
import ir from "papaparse";
|
|
28
29
|
import xe from "encoding-japanese";
|
|
29
30
|
function f(...t) {
|
|
30
31
|
return Fn($n(t));
|
|
31
32
|
}
|
|
32
|
-
const
|
|
33
|
+
const lr = le(
|
|
33
34
|
"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",
|
|
34
35
|
{
|
|
35
36
|
variants: {
|
|
@@ -61,13 +62,13 @@ function _t({ className: t, variant: e, size: s, render: n, children: r, ...o })
|
|
|
61
62
|
render: n,
|
|
62
63
|
props: {
|
|
63
64
|
"data-slot": "button",
|
|
64
|
-
className: f(
|
|
65
|
+
className: f(lr({ variant: e, size: s, className: t })),
|
|
65
66
|
children: r,
|
|
66
67
|
...o
|
|
67
68
|
}
|
|
68
69
|
});
|
|
69
70
|
}
|
|
70
|
-
const te = "en",
|
|
71
|
+
const te = "en", cr = () => {
|
|
71
72
|
try {
|
|
72
73
|
if (typeof navigator > "u")
|
|
73
74
|
return te;
|
|
@@ -79,12 +80,12 @@ const te = "en", lr = () => {
|
|
|
79
80
|
}, Gt = (t) => (e, s) => e ? typeof e == "string" ? e : e(t) ?? s : s, La = (t) => {
|
|
80
81
|
const e = Gt(t);
|
|
81
82
|
return (s, n) => e(s, typeof s == "string" ? s : Ct(n));
|
|
82
|
-
},
|
|
83
|
+
}, dr = (t) => ({
|
|
83
84
|
modules: t.modules,
|
|
84
85
|
settingsResources: t.settingsResources ?? [],
|
|
85
86
|
errorBoundary: t.errorBoundary ?? /* @__PURE__ */ a(At, {}),
|
|
86
87
|
basePath: t.basePath,
|
|
87
|
-
locale: t.locale ??
|
|
88
|
+
locale: t.locale ?? cr()
|
|
88
89
|
}), De = mt({
|
|
89
90
|
configurations: {
|
|
90
91
|
modules: [],
|
|
@@ -100,13 +101,13 @@ const te = "en", lr = () => {
|
|
|
100
101
|
}
|
|
101
102
|
}), ze = mt({
|
|
102
103
|
contextData: {}
|
|
103
|
-
}), ot = () => tt(De),
|
|
104
|
+
}), ot = () => tt(De), Cl = () => tt(ze), Ea = () => {
|
|
104
105
|
const t = tt(De), e = tt(ze);
|
|
105
106
|
return {
|
|
106
107
|
...t,
|
|
107
108
|
...e
|
|
108
109
|
};
|
|
109
|
-
},
|
|
110
|
+
}, ur = () => {
|
|
110
111
|
const { configurations: t } = ot(), e = Gt(t.locale);
|
|
111
112
|
return (s, n) => e(s, n);
|
|
112
113
|
}, Ma = (t) => {
|
|
@@ -168,7 +169,7 @@ const te = "en", lr = () => {
|
|
|
168
169
|
return typeof o == "function" ? o(n[0]) : o;
|
|
169
170
|
}
|
|
170
171
|
};
|
|
171
|
-
},
|
|
172
|
+
}, wr = Ma({
|
|
172
173
|
en: {
|
|
173
174
|
error404Title: "404 Not Found",
|
|
174
175
|
error404Body: "The page you requested could not be found.",
|
|
@@ -217,7 +218,7 @@ const te = "en", lr = () => {
|
|
|
217
218
|
commandPaletteSearchModes: "検索モード",
|
|
218
219
|
commandPaletteSearching: "検索中..."
|
|
219
220
|
}
|
|
220
|
-
}), it =
|
|
221
|
+
}), it = wr.useT, At = () => {
|
|
221
222
|
const t = An(), e = it(), s = {
|
|
222
223
|
role: "alert",
|
|
223
224
|
"aria-label": "default-error-boundary"
|
|
@@ -260,9 +261,9 @@ const te = "en", lr = () => {
|
|
|
260
261
|
] }) });
|
|
261
262
|
};
|
|
262
263
|
let Da = {};
|
|
263
|
-
const
|
|
264
|
+
const mr = (t) => {
|
|
264
265
|
Da = t;
|
|
265
|
-
},
|
|
266
|
+
}, Sl = () => ({ type: "pass" }), Tl = () => ({ type: "hidden" }), kl = (t) => ({
|
|
266
267
|
type: "redirect",
|
|
267
268
|
to: t
|
|
268
269
|
}), ee = () => new Response("Not Found", { status: 404 }), Ve = async (t) => {
|
|
@@ -290,7 +291,7 @@ const wr = (t) => {
|
|
|
290
291
|
const { configurations: s } = ot(), { metaTitle: n, fallbackTitle: r } = t, i = Gt(s.locale)(n, r);
|
|
291
292
|
return e(i);
|
|
292
293
|
};
|
|
293
|
-
function
|
|
294
|
+
function Il(t) {
|
|
294
295
|
const { path: e, meta: s, component: n, resources: r, errorBoundary: o, guards: i } = t, l = s?.title ?? Ct(e), d = Ct(e), m = i && i.length > 0 ? Ht(i) : void 0, u = n ? za({ metaTitle: l, fallbackTitle: d }, (w) => n({ title: w, resources: r })) : void 0;
|
|
295
296
|
return {
|
|
296
297
|
path: e,
|
|
@@ -310,7 +311,7 @@ function Sl(t) {
|
|
|
310
311
|
guards: i
|
|
311
312
|
};
|
|
312
313
|
}
|
|
313
|
-
function
|
|
314
|
+
function Rl(t) {
|
|
314
315
|
const { path: e, component: s, subResources: n, meta: r, errorBoundary: o, guards: i } = t, l = r?.title ?? Ct(e), d = Ct(e), m = i && i.length > 0 ? Ht(i) : void 0, u = s ? za(
|
|
315
316
|
{ metaTitle: l, fallbackTitle: d },
|
|
316
317
|
(w) => s({ title: w, resources: n })
|
|
@@ -331,7 +332,23 @@ function Tl(t) {
|
|
|
331
332
|
loader: m
|
|
332
333
|
};
|
|
333
334
|
}
|
|
334
|
-
const
|
|
335
|
+
const pr = ({ ...t }) => {
|
|
336
|
+
const { theme: e = "system" } = er();
|
|
337
|
+
return /* @__PURE__ */ a(
|
|
338
|
+
ar,
|
|
339
|
+
{
|
|
340
|
+
richColors: !0,
|
|
341
|
+
theme: e,
|
|
342
|
+
className: "astw:toaster astw:group",
|
|
343
|
+
style: {
|
|
344
|
+
"--normal-bg": "var(--popover)",
|
|
345
|
+
"--normal-text": "var(--popover-foreground)",
|
|
346
|
+
"--normal-border": "var(--border)"
|
|
347
|
+
},
|
|
348
|
+
...t
|
|
349
|
+
}
|
|
350
|
+
);
|
|
351
|
+
}, fr = () => {
|
|
335
352
|
const t = it();
|
|
336
353
|
return /* @__PURE__ */ c(V, { children: [
|
|
337
354
|
/* @__PURE__ */ a("p", { className: "astw:font-semibold astw:leading-none astw:tracking-tight", children: t("welcomeTitle") }),
|
|
@@ -339,9 +356,9 @@ const mr = () => {
|
|
|
339
356
|
] });
|
|
340
357
|
}, ua = () => /* @__PURE__ */ c(V, { children: [
|
|
341
358
|
/* @__PURE__ */ a(Re, {}),
|
|
342
|
-
/* @__PURE__ */ a(
|
|
343
|
-
] }),
|
|
344
|
-
const { configurations: t } = Ea(), e = it(), s =
|
|
359
|
+
/* @__PURE__ */ a(pr, {})
|
|
360
|
+
] }), hr = () => {
|
|
361
|
+
const { configurations: t } = Ea(), e = it(), s = ur();
|
|
345
362
|
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: [
|
|
346
363
|
/* @__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: [
|
|
347
364
|
/* @__PURE__ */ a("h2", { className: "astw:text-sm astw:leading-[36px] astw:mb-2 astw:font-bold ", children: e("settings") }),
|
|
@@ -391,7 +408,7 @@ const mr = () => {
|
|
|
391
408
|
},
|
|
392
409
|
...i.length > 0 ? { children: i } : {}
|
|
393
410
|
};
|
|
394
|
-
},
|
|
411
|
+
}, gr = (t) => t.map((e) => _a(e, e.resources, e.errorBoundary)), br = ({
|
|
395
412
|
modules: t,
|
|
396
413
|
settingsResources: e,
|
|
397
414
|
rootComponent: s,
|
|
@@ -399,7 +416,7 @@ const mr = () => {
|
|
|
399
416
|
}) => {
|
|
400
417
|
const r = n && n.length > 0 ? Ht(n) : void 0, o = Va({
|
|
401
418
|
path: "",
|
|
402
|
-
component: s ??
|
|
419
|
+
component: s ?? fr,
|
|
403
420
|
loader: r
|
|
404
421
|
}), i = e.length > 0 ? [
|
|
405
422
|
{
|
|
@@ -409,7 +426,7 @@ const mr = () => {
|
|
|
409
426
|
},
|
|
410
427
|
{
|
|
411
428
|
path: "settings",
|
|
412
|
-
Component:
|
|
429
|
+
Component: hr,
|
|
413
430
|
children: e.map((l) => {
|
|
414
431
|
if (!l.component)
|
|
415
432
|
throw new Error(`Settings resource "${l.path}" must have a component.`);
|
|
@@ -426,7 +443,7 @@ const mr = () => {
|
|
|
426
443
|
return [
|
|
427
444
|
o,
|
|
428
445
|
{
|
|
429
|
-
children:
|
|
446
|
+
children: gr(t)
|
|
430
447
|
},
|
|
431
448
|
...i,
|
|
432
449
|
{
|
|
@@ -440,10 +457,10 @@ const mr = () => {
|
|
|
440
457
|
ErrorBoundary: At
|
|
441
458
|
}
|
|
442
459
|
];
|
|
443
|
-
}, Ba = "appshell-root-nav",
|
|
460
|
+
}, Ba = "appshell-root-nav", xr = (t) => ({
|
|
444
461
|
loaderID: Ba,
|
|
445
|
-
loader: async () => ({ navItems:
|
|
446
|
-
}), Oa = () => Dn(Ba)?.navItems,
|
|
462
|
+
loader: async () => ({ navItems: vr(t) })
|
|
463
|
+
}), Oa = () => Dn(Ba)?.navItems, vr = async (t) => {
|
|
447
464
|
const e = La(t.locale);
|
|
448
465
|
return (await Promise.all(
|
|
449
466
|
t.modules.map(async (n) => {
|
|
@@ -453,7 +470,7 @@ const mr = () => {
|
|
|
453
470
|
n.path,
|
|
454
471
|
e
|
|
455
472
|
);
|
|
456
|
-
return o.length === 0 ? null : { module: n, resources: o };
|
|
473
|
+
return o.length === 0 && !n.meta.menuItemClickable ? null : { module: n, resources: o };
|
|
457
474
|
})
|
|
458
475
|
)).filter((n) => n !== null).map(({ module: n, resources: r }) => ({
|
|
459
476
|
title: e(n.meta.title, n.path),
|
|
@@ -471,8 +488,8 @@ const mr = () => {
|
|
|
471
488
|
items: u ? m : void 0
|
|
472
489
|
};
|
|
473
490
|
})
|
|
474
|
-
)).filter((r) => r !== null),
|
|
475
|
-
const { configurations: e, contentRoutes: s, children: n } = t, { loaderID: r, loader: o } =
|
|
491
|
+
)).filter((r) => r !== null), yr = (t) => {
|
|
492
|
+
const { configurations: e, contentRoutes: s, children: n } = t, { loaderID: r, loader: o } = xr({
|
|
476
493
|
modules: e.modules,
|
|
477
494
|
locale: e.locale
|
|
478
495
|
}), i = e.errorBoundary, l = i ? [
|
|
@@ -491,9 +508,9 @@ const mr = () => {
|
|
|
491
508
|
// Return null to silence hydration warnings.
|
|
492
509
|
HydrateFallback: () => null
|
|
493
510
|
};
|
|
494
|
-
},
|
|
511
|
+
}, Nr = (t) => {
|
|
495
512
|
const { rootComponent: e, children: s } = t, { configurations: n } = ot(), r = G(
|
|
496
|
-
() =>
|
|
513
|
+
() => br({
|
|
497
514
|
modules: n.modules,
|
|
498
515
|
settingsResources: n.settingsResources,
|
|
499
516
|
rootComponent: e,
|
|
@@ -502,7 +519,7 @@ const mr = () => {
|
|
|
502
519
|
[n.modules, n.settingsResources, e, t.rootGuards]
|
|
503
520
|
), o = G(
|
|
504
521
|
() => [
|
|
505
|
-
|
|
522
|
+
yr({
|
|
506
523
|
configurations: n,
|
|
507
524
|
contentRoutes: r,
|
|
508
525
|
children: s
|
|
@@ -519,12 +536,12 @@ const mr = () => {
|
|
|
519
536
|
[i, l, t.memory, o]
|
|
520
537
|
);
|
|
521
538
|
return /* @__PURE__ */ a(_n, { router: d });
|
|
522
|
-
},
|
|
539
|
+
}, Cr = {
|
|
523
540
|
resolvedTheme: "light",
|
|
524
541
|
theme: "system",
|
|
525
542
|
setTheme: () => null
|
|
526
|
-
}, Fa = mt(
|
|
527
|
-
function
|
|
543
|
+
}, Fa = mt(Cr);
|
|
544
|
+
function Sr({
|
|
528
545
|
children: t,
|
|
529
546
|
storageKey: e,
|
|
530
547
|
defaultTheme: s = "system",
|
|
@@ -546,11 +563,11 @@ function Nr({
|
|
|
546
563
|
};
|
|
547
564
|
return /* @__PURE__ */ a(Fa.Provider, { ...n, value: l, children: t });
|
|
548
565
|
}
|
|
549
|
-
const
|
|
566
|
+
const Tr = () => {
|
|
550
567
|
const t = tt(Fa);
|
|
551
568
|
if (t === void 0) throw new Error("useTheme must be used within a ThemeProvider");
|
|
552
569
|
return t;
|
|
553
|
-
}, ja = mt(null),
|
|
570
|
+
}, ja = mt(null), kr = ({ children: t }) => {
|
|
554
571
|
const [e, s] = E(() => /* @__PURE__ */ new Map()), n = I((o, i) => {
|
|
555
572
|
s((l) => {
|
|
556
573
|
const d = new Map(l);
|
|
@@ -570,7 +587,7 @@ const Cr = () => {
|
|
|
570
587
|
throw new Error("useBreadcrumbOverride must be used within BreadcrumbOverrideProvider");
|
|
571
588
|
return t;
|
|
572
589
|
}, Ha = mt(null), Be = mt(null);
|
|
573
|
-
function
|
|
590
|
+
function Ir({
|
|
574
591
|
children: t,
|
|
575
592
|
searchSources: e = []
|
|
576
593
|
}) {
|
|
@@ -594,14 +611,14 @@ function Tr({
|
|
|
594
611
|
);
|
|
595
612
|
return /* @__PURE__ */ a(Ha.Provider, { value: m, children: /* @__PURE__ */ a(Be.Provider, { value: u, children: t }) });
|
|
596
613
|
}
|
|
597
|
-
function
|
|
614
|
+
function Rr() {
|
|
598
615
|
const t = tt(Ha);
|
|
599
616
|
if (!t)
|
|
600
617
|
throw new Error("useCommandPaletteDispatch must be used within CommandPaletteProvider");
|
|
601
618
|
return t;
|
|
602
619
|
}
|
|
603
|
-
function
|
|
604
|
-
const s = Jn(), { register: n } =
|
|
620
|
+
function Ar(t, e) {
|
|
621
|
+
const s = Jn(), { register: n } = Rr(), r = j(e);
|
|
605
622
|
r.current = e;
|
|
606
623
|
const o = e.map((i) => `${i.key}\0${i.label}`).join(`
|
|
607
624
|
`);
|
|
@@ -620,7 +637,7 @@ function Ka() {
|
|
|
620
637
|
throw new Error("useCommandPaletteState must be used within CommandPaletteProvider");
|
|
621
638
|
return t;
|
|
622
639
|
}
|
|
623
|
-
function
|
|
640
|
+
function Pr() {
|
|
624
641
|
const t = tt(Be);
|
|
625
642
|
if (!t)
|
|
626
643
|
throw new Error("useCommandPaletteActions must be used within CommandPaletteProvider");
|
|
@@ -747,7 +764,7 @@ const dt = {
|
|
|
747
764
|
"astw:focus-visible:border-ring astw:focus-visible:ring-ring/50 astw:focus-visible:ring-[3px]",
|
|
748
765
|
"astw:disabled:pointer-events-none astw:disabled:cursor-not-allowed astw:disabled:opacity-50"
|
|
749
766
|
];
|
|
750
|
-
function
|
|
767
|
+
function Lr({ className: t, type: e, ...s }) {
|
|
751
768
|
return /* @__PURE__ */ a(
|
|
752
769
|
"input",
|
|
753
770
|
{
|
|
@@ -763,14 +780,14 @@ function Ar({ className: t, type: e, ...s }) {
|
|
|
763
780
|
}
|
|
764
781
|
);
|
|
765
782
|
}
|
|
766
|
-
function
|
|
783
|
+
function Er(t, e) {
|
|
767
784
|
if (!e.trim()) return t;
|
|
768
785
|
const s = e.toLowerCase();
|
|
769
786
|
return t.filter(
|
|
770
787
|
(n) => n.title.toLowerCase().includes(s) || n.path.toLowerCase().includes(s)
|
|
771
788
|
);
|
|
772
789
|
}
|
|
773
|
-
const
|
|
790
|
+
const Mr = (t, e) => {
|
|
774
791
|
const s = La(e);
|
|
775
792
|
return t.reduce(
|
|
776
793
|
(n, r) => {
|
|
@@ -795,8 +812,8 @@ const Lr = (t, e) => {
|
|
|
795
812
|
{}
|
|
796
813
|
);
|
|
797
814
|
};
|
|
798
|
-
function
|
|
799
|
-
const r = t.split("/").filter((d) => d !== ""), o = e && r[0] === e ? r.slice(1) : r, i =
|
|
815
|
+
function Dr(t, e, s, n) {
|
|
816
|
+
const r = t.split("/").filter((d) => d !== ""), o = e && r[0] === e ? r.slice(1) : r, i = Mr(s, n), l = o.map((d, m) => {
|
|
800
817
|
const u = o.slice(0, m + 1).join("/");
|
|
801
818
|
let w = i[u];
|
|
802
819
|
if (!w) {
|
|
@@ -820,7 +837,7 @@ function Er(t, e, s, n) {
|
|
|
820
837
|
};
|
|
821
838
|
}
|
|
822
839
|
const Zt = "astw:relative astw:flex astw:w-full astw:cursor-pointer astw:select-none astw:rounded-sm astw:px-2 astw:py-2 astw:text-sm astw:outline-none astw:text-left", Jt = (t) => t ? "astw:bg-accent astw:text-accent-foreground" : "astw:hover:bg-accent astw:hover:text-accent-foreground";
|
|
823
|
-
function
|
|
840
|
+
function zr(t) {
|
|
824
841
|
const e = [], s = (n, r, o) => {
|
|
825
842
|
n.forEach((i) => {
|
|
826
843
|
const l = [...o, i.title];
|
|
@@ -841,17 +858,17 @@ function Mr(t) {
|
|
|
841
858
|
}), s(n.items, n.icon, [n.title]);
|
|
842
859
|
}), e;
|
|
843
860
|
}
|
|
844
|
-
function
|
|
861
|
+
function Vr(t, e) {
|
|
845
862
|
if (!e.trim()) return t;
|
|
846
863
|
const s = e.toLowerCase();
|
|
847
864
|
return t.filter((n) => n.label.toLowerCase().includes(s));
|
|
848
865
|
}
|
|
849
|
-
const
|
|
866
|
+
const _r = 300, Se = {
|
|
850
867
|
mode: "browse",
|
|
851
868
|
search: "",
|
|
852
869
|
selectedIndex: 0
|
|
853
|
-
},
|
|
854
|
-
function
|
|
870
|
+
}, Br = [];
|
|
871
|
+
function Or(t, e) {
|
|
855
872
|
switch (e.type) {
|
|
856
873
|
case "SET_SEARCH":
|
|
857
874
|
return t.mode === "search" ? { ...t, query: e.value, selectedIndex: 0 } : e.detectedSource ? {
|
|
@@ -893,7 +910,7 @@ function _r(t, e) {
|
|
|
893
910
|
return Se;
|
|
894
911
|
}
|
|
895
912
|
}
|
|
896
|
-
function
|
|
913
|
+
function $r(t, e) {
|
|
897
914
|
const s = t.indexOf(":");
|
|
898
915
|
if (s < 1) return { activeSource: null, searchQuery: t };
|
|
899
916
|
const n = t.slice(0, s), r = e.find((o) => o.prefix === n);
|
|
@@ -902,18 +919,18 @@ function Br(t, e) {
|
|
|
902
919
|
searchQuery: t.slice(s + 1).trimStart()
|
|
903
920
|
} : { activeSource: null, searchQuery: t };
|
|
904
921
|
}
|
|
905
|
-
function
|
|
922
|
+
function Fr({
|
|
906
923
|
routes: t,
|
|
907
924
|
contextualActions: e = [],
|
|
908
925
|
searchSources: s = [],
|
|
909
926
|
open: n,
|
|
910
927
|
setOpen: r
|
|
911
928
|
}) {
|
|
912
|
-
const o = Bn(), i = j(null), [l, d] = tr(
|
|
913
|
-
() => p ? [] :
|
|
929
|
+
const o = Bn(), i = j(null), [l, d] = tr(Or, Se), m = j(null), u = l.mode === "search" ? l.query : l.search, w = l.selectedIndex, p = l.mode === "search" ? l.source : null, g = l.mode === "search" ? l.results : Br, y = l.mode === "search" ? l.isSearching : !1, h = G(
|
|
930
|
+
() => p ? [] : Vr(e, u),
|
|
914
931
|
[e, u, p]
|
|
915
932
|
), x = G(
|
|
916
|
-
() => p ? [] :
|
|
933
|
+
() => p ? [] : Er(t, u),
|
|
917
934
|
[t, u, p]
|
|
918
935
|
);
|
|
919
936
|
st(() => {
|
|
@@ -929,7 +946,7 @@ function Or({
|
|
|
929
946
|
}).catch(() => {
|
|
930
947
|
S.signal.aborted || d({ type: "SEARCH_FAIL" });
|
|
931
948
|
});
|
|
932
|
-
},
|
|
949
|
+
}, _r);
|
|
933
950
|
return () => {
|
|
934
951
|
clearTimeout(b), m.current?.abort(), m.current = null;
|
|
935
952
|
};
|
|
@@ -960,7 +977,7 @@ function Or({
|
|
|
960
977
|
d({ type: "SET_SEARCH", value: b });
|
|
961
978
|
return;
|
|
962
979
|
}
|
|
963
|
-
const S =
|
|
980
|
+
const S = $r(b, s);
|
|
964
981
|
d({
|
|
965
982
|
type: "SET_SEARCH",
|
|
966
983
|
value: b,
|
|
@@ -1035,8 +1052,8 @@ function Or({
|
|
|
1035
1052
|
listRef: i
|
|
1036
1053
|
};
|
|
1037
1054
|
}
|
|
1038
|
-
function
|
|
1039
|
-
const e = it(), s =
|
|
1055
|
+
function jr({ navItems: t }) {
|
|
1056
|
+
const e = it(), s = Pr(), { searchSources: n, open: r, setOpen: o } = Ka(), i = G(() => zr(t), [t]), {
|
|
1040
1057
|
open: l,
|
|
1041
1058
|
handleOpenChange: d,
|
|
1042
1059
|
search: m,
|
|
@@ -1051,7 +1068,7 @@ function $r({ navItems: t }) {
|
|
|
1051
1068
|
handleSelectItem: v,
|
|
1052
1069
|
handleKeyDown: C,
|
|
1053
1070
|
listRef: A
|
|
1054
|
-
} =
|
|
1071
|
+
} = Fr({
|
|
1055
1072
|
routes: i,
|
|
1056
1073
|
contextualActions: s,
|
|
1057
1074
|
searchSources: n,
|
|
@@ -1070,7 +1087,7 @@ function $r({ navItems: t }) {
|
|
|
1070
1087
|
/* @__PURE__ */ a(Ia, { className: "astw:mr-2 astw:h-4 astw:w-4 astw:shrink-0 astw:opacity-50" }),
|
|
1071
1088
|
h && /* @__PURE__ */ a("span", { className: "astw:inline-flex astw:items-center astw:shrink-0 astw:rounded astw:bg-muted astw:px-1.5 astw:py-0.5 astw:mr-1.5 astw:text-xs astw:font-medium astw:text-muted-foreground", children: h.prefix }),
|
|
1072
1089
|
/* @__PURE__ */ a(
|
|
1073
|
-
|
|
1090
|
+
Lr,
|
|
1074
1091
|
{
|
|
1075
1092
|
value: m,
|
|
1076
1093
|
onChange: (R) => u(R.target.value),
|
|
@@ -1203,19 +1220,19 @@ function $r({ navItems: t }) {
|
|
|
1203
1220
|
}
|
|
1204
1221
|
) });
|
|
1205
1222
|
}
|
|
1206
|
-
function
|
|
1223
|
+
function Al() {
|
|
1207
1224
|
return null;
|
|
1208
1225
|
}
|
|
1209
|
-
function
|
|
1226
|
+
function Gr() {
|
|
1210
1227
|
const t = Oa();
|
|
1211
|
-
return /* @__PURE__ */ a(Le, { fallback: null, children: /* @__PURE__ */ a(ka, { resolve: t, children: (e) => /* @__PURE__ */ a(
|
|
1228
|
+
return /* @__PURE__ */ a(Le, { fallback: null, children: /* @__PURE__ */ a(ka, { resolve: t, children: (e) => /* @__PURE__ */ a(jr, { navItems: e ?? [] }) }) });
|
|
1212
1229
|
}
|
|
1213
|
-
const
|
|
1214
|
-
},
|
|
1215
|
-
function
|
|
1216
|
-
return Ee(
|
|
1230
|
+
const Hr = () => () => {
|
|
1231
|
+
}, Kr = () => !0, Ur = () => !1;
|
|
1232
|
+
function Wr() {
|
|
1233
|
+
return Ee(Hr, Kr, Ur);
|
|
1217
1234
|
}
|
|
1218
|
-
function
|
|
1235
|
+
function qr(t) {
|
|
1219
1236
|
const e = {
|
|
1220
1237
|
path: "",
|
|
1221
1238
|
fullPath: "",
|
|
@@ -1223,7 +1240,7 @@ function Ur(t) {
|
|
|
1223
1240
|
children: /* @__PURE__ */ new Map()
|
|
1224
1241
|
};
|
|
1225
1242
|
for (const s of t) {
|
|
1226
|
-
const n =
|
|
1243
|
+
const n = nr(s.path);
|
|
1227
1244
|
let r = e, o = "";
|
|
1228
1245
|
for (const i of n)
|
|
1229
1246
|
i.type !== "group" && (o = o ? `${o}/${i.converted}` : i.converted, r.children.has(i.converted) || r.children.set(i.converted, {
|
|
@@ -1280,10 +1297,10 @@ function wa(t) {
|
|
|
1280
1297
|
loader: i
|
|
1281
1298
|
};
|
|
1282
1299
|
}
|
|
1283
|
-
function
|
|
1300
|
+
function Yr(t) {
|
|
1284
1301
|
if (t.length === 0)
|
|
1285
1302
|
return [];
|
|
1286
|
-
const e =
|
|
1303
|
+
const e = qr(t), s = [];
|
|
1287
1304
|
if (e.component) {
|
|
1288
1305
|
const n = wa({
|
|
1289
1306
|
...e,
|
|
@@ -1298,10 +1315,10 @@ function Wr(t) {
|
|
|
1298
1315
|
return s;
|
|
1299
1316
|
}
|
|
1300
1317
|
const ma = (t) => {
|
|
1301
|
-
const e =
|
|
1302
|
-
|
|
1318
|
+
const e = Wr(), s = t.contextData ?? {};
|
|
1319
|
+
mr(s);
|
|
1303
1320
|
const n = t.modules, r = G(
|
|
1304
|
-
() => n ?
|
|
1321
|
+
() => n ? dr({
|
|
1305
1322
|
modules: n,
|
|
1306
1323
|
settingsResources: t.settingsResources,
|
|
1307
1324
|
basePath: t.basePath,
|
|
@@ -1323,13 +1340,13 @@ const ma = (t) => {
|
|
|
1323
1340
|
/* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground", children: l })
|
|
1324
1341
|
] }) });
|
|
1325
1342
|
}
|
|
1326
|
-
return e ? /* @__PURE__ */ a(De.Provider, { value: o, children: /* @__PURE__ */ a(ze.Provider, { value: i, children: /* @__PURE__ */ a(
|
|
1343
|
+
return e ? /* @__PURE__ */ a(De.Provider, { value: o, children: /* @__PURE__ */ a(ze.Provider, { value: i, children: /* @__PURE__ */ a(kr, { children: /* @__PURE__ */ a(Ir, { searchSources: t.searchSources, children: /* @__PURE__ */ a(Sr, { defaultTheme: "system", storageKey: "appshell-ui-theme", children: /* @__PURE__ */ c(Nr, { rootComponent: t.rootComponent, rootGuards: t.rootGuards, children: [
|
|
1327
1344
|
t.children,
|
|
1328
|
-
/* @__PURE__ */ a(
|
|
1345
|
+
/* @__PURE__ */ a(Gr, {})
|
|
1329
1346
|
] }) }) }) }) }) }) : null;
|
|
1330
1347
|
};
|
|
1331
1348
|
ma.WithPages = (t) => {
|
|
1332
|
-
const e =
|
|
1349
|
+
const e = Yr(t), s = e.find((o) => o.path === ""), n = e.filter((o) => o.path !== "");
|
|
1333
1350
|
return (o) => /* @__PURE__ */ a(
|
|
1334
1351
|
ma,
|
|
1335
1352
|
{
|
|
@@ -1341,7 +1358,7 @@ ma.WithPages = (t) => {
|
|
|
1341
1358
|
);
|
|
1342
1359
|
};
|
|
1343
1360
|
const ve = 768;
|
|
1344
|
-
function
|
|
1361
|
+
function Xr() {
|
|
1345
1362
|
const [t, e] = k.useState(void 0);
|
|
1346
1363
|
return k.useEffect(() => {
|
|
1347
1364
|
const s = window.matchMedia(`(max-width: ${ve - 1}px)`), n = () => {
|
|
@@ -1351,7 +1368,7 @@ function qr() {
|
|
|
1351
1368
|
}, []), !!t;
|
|
1352
1369
|
}
|
|
1353
1370
|
const ye = 768, Ne = 1199;
|
|
1354
|
-
function
|
|
1371
|
+
function Qr() {
|
|
1355
1372
|
const [t, e] = k.useState(void 0);
|
|
1356
1373
|
return k.useEffect(() => {
|
|
1357
1374
|
const s = window.matchMedia(
|
|
@@ -1366,7 +1383,7 @@ function Yr() {
|
|
|
1366
1383
|
), () => s.removeEventListener("change", n);
|
|
1367
1384
|
}, []), !!t;
|
|
1368
1385
|
}
|
|
1369
|
-
function
|
|
1386
|
+
function Zr({
|
|
1370
1387
|
className: t,
|
|
1371
1388
|
orientation: e = "horizontal",
|
|
1372
1389
|
decorative: s = !0,
|
|
@@ -1388,14 +1405,14 @@ function Xr({
|
|
|
1388
1405
|
}
|
|
1389
1406
|
);
|
|
1390
1407
|
}
|
|
1391
|
-
const
|
|
1408
|
+
const Jr = {
|
|
1392
1409
|
top: "up",
|
|
1393
1410
|
right: "right",
|
|
1394
1411
|
bottom: "down",
|
|
1395
1412
|
left: "left"
|
|
1396
1413
|
}, rs = k.createContext("right");
|
|
1397
1414
|
function os({ side: t = "right", ...e }) {
|
|
1398
|
-
return /* @__PURE__ */ a(rs.Provider, { value: t, children: /* @__PURE__ */ a(z.Root, { "data-slot": "sheet", swipeDirection:
|
|
1415
|
+
return /* @__PURE__ */ a(rs.Provider, { value: t, children: /* @__PURE__ */ a(z.Root, { "data-slot": "sheet", swipeDirection: Jr[t], ...e }) });
|
|
1399
1416
|
}
|
|
1400
1417
|
os.displayName = "Sheet.Root";
|
|
1401
1418
|
function is({ ...t }) {
|
|
@@ -1569,14 +1586,14 @@ const Y = {
|
|
|
1569
1586
|
Trigger: bs,
|
|
1570
1587
|
Content: xs,
|
|
1571
1588
|
Provider: hs
|
|
1572
|
-
}, vs = "16rem",
|
|
1589
|
+
}, vs = "16rem", to = "18rem", eo = "3rem", ao = "b", ys = k.createContext(null);
|
|
1573
1590
|
function Pt() {
|
|
1574
1591
|
const t = k.useContext(ys);
|
|
1575
1592
|
if (!t)
|
|
1576
1593
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
1577
1594
|
return t;
|
|
1578
1595
|
}
|
|
1579
|
-
function
|
|
1596
|
+
function so({
|
|
1580
1597
|
defaultOpen: t = !0,
|
|
1581
1598
|
open: e,
|
|
1582
1599
|
onOpenChange: s,
|
|
@@ -1585,7 +1602,7 @@ function eo({
|
|
|
1585
1602
|
children: o,
|
|
1586
1603
|
...i
|
|
1587
1604
|
}) {
|
|
1588
|
-
const l =
|
|
1605
|
+
const l = Xr(), d = Qr(), [m, u] = k.useState(!1), [w, p] = k.useState(!1), [g, y] = k.useState(t), h = e ?? g, x = k.useCallback(
|
|
1589
1606
|
(T) => {
|
|
1590
1607
|
const b = typeof T == "function" ? T(h) : T;
|
|
1591
1608
|
s ? s(b) : y(b);
|
|
@@ -1594,7 +1611,7 @@ function eo({
|
|
|
1594
1611
|
), N = d && !l, v = k.useCallback(() => l ? u((T) => !T) : N ? p((T) => !T) : x((T) => !T), [l, N, x, u]);
|
|
1595
1612
|
k.useEffect(() => {
|
|
1596
1613
|
const T = (b) => {
|
|
1597
|
-
b.key ===
|
|
1614
|
+
b.key === ao && (b.metaKey || b.ctrlKey) && (b.preventDefault(), v());
|
|
1598
1615
|
};
|
|
1599
1616
|
return window.addEventListener("keydown", T), () => window.removeEventListener("keydown", T);
|
|
1600
1617
|
}, [v]);
|
|
@@ -1630,7 +1647,7 @@ function eo({
|
|
|
1630
1647
|
"data-slot": "sidebar-wrapper",
|
|
1631
1648
|
style: {
|
|
1632
1649
|
"--sidebar-width": vs,
|
|
1633
|
-
"--sidebar-width-icon":
|
|
1650
|
+
"--sidebar-width-icon": eo,
|
|
1634
1651
|
...r
|
|
1635
1652
|
},
|
|
1636
1653
|
className: f(
|
|
@@ -1642,7 +1659,7 @@ function eo({
|
|
|
1642
1659
|
}
|
|
1643
1660
|
) }) });
|
|
1644
1661
|
}
|
|
1645
|
-
function
|
|
1662
|
+
function no({
|
|
1646
1663
|
side: t = "left",
|
|
1647
1664
|
variant: e = "sidebar",
|
|
1648
1665
|
collapsible: s = "offcanvas",
|
|
@@ -1670,7 +1687,7 @@ function ao({
|
|
|
1670
1687
|
"data-mobile": "true",
|
|
1671
1688
|
className: "astw:bg-sidebar astw:text-sidebar-foreground astw:w-(--sidebar-width) astw:p-0 astw:[&>button]:hidden",
|
|
1672
1689
|
style: {
|
|
1673
|
-
"--sidebar-width":
|
|
1690
|
+
"--sidebar-width": to
|
|
1674
1691
|
},
|
|
1675
1692
|
children: [
|
|
1676
1693
|
/* @__PURE__ */ c(X.Header, { className: "astw:sr-only", children: [
|
|
@@ -1815,7 +1832,7 @@ function Ns({ className: t, onClick: e, ...s }) {
|
|
|
1815
1832
|
}
|
|
1816
1833
|
);
|
|
1817
1834
|
}
|
|
1818
|
-
function
|
|
1835
|
+
function ro({ className: t, ...e }) {
|
|
1819
1836
|
return /* @__PURE__ */ a(
|
|
1820
1837
|
"main",
|
|
1821
1838
|
{
|
|
@@ -1830,7 +1847,7 @@ function so({ className: t, ...e }) {
|
|
|
1830
1847
|
}
|
|
1831
1848
|
);
|
|
1832
1849
|
}
|
|
1833
|
-
function
|
|
1850
|
+
function oo({ className: t, ...e }) {
|
|
1834
1851
|
return /* @__PURE__ */ a(
|
|
1835
1852
|
"div",
|
|
1836
1853
|
{
|
|
@@ -1841,9 +1858,9 @@ function no({ className: t, ...e }) {
|
|
|
1841
1858
|
}
|
|
1842
1859
|
);
|
|
1843
1860
|
}
|
|
1844
|
-
function
|
|
1861
|
+
function io({ className: t, ...e }) {
|
|
1845
1862
|
return /* @__PURE__ */ a(
|
|
1846
|
-
|
|
1863
|
+
Zr,
|
|
1847
1864
|
{
|
|
1848
1865
|
"data-slot": "sidebar-separator",
|
|
1849
1866
|
"data-sidebar": "separator",
|
|
@@ -1852,7 +1869,7 @@ function ro({ className: t, ...e }) {
|
|
|
1852
1869
|
}
|
|
1853
1870
|
);
|
|
1854
1871
|
}
|
|
1855
|
-
function
|
|
1872
|
+
function lo({ className: t, ...e }) {
|
|
1856
1873
|
return /* @__PURE__ */ a(
|
|
1857
1874
|
"div",
|
|
1858
1875
|
{
|
|
@@ -1902,7 +1919,7 @@ function ut({ className: t, ...e }) {
|
|
|
1902
1919
|
}
|
|
1903
1920
|
);
|
|
1904
1921
|
}
|
|
1905
|
-
const
|
|
1922
|
+
const co = le(
|
|
1906
1923
|
"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",
|
|
1907
1924
|
{
|
|
1908
1925
|
variants: {
|
|
@@ -1946,7 +1963,7 @@ function wt({
|
|
|
1946
1963
|
"data-sidebar": "menu-button",
|
|
1947
1964
|
"data-size": n,
|
|
1948
1965
|
"data-active": e,
|
|
1949
|
-
className: f(
|
|
1966
|
+
className: f(co({ variant: s, size: n }), o),
|
|
1950
1967
|
onClick: y,
|
|
1951
1968
|
children: i,
|
|
1952
1969
|
...d
|
|
@@ -2010,7 +2027,7 @@ function Te({ className: t, ...e }) {
|
|
|
2010
2027
|
}
|
|
2011
2028
|
);
|
|
2012
2029
|
}
|
|
2013
|
-
function
|
|
2030
|
+
function uo({ className: t, ...e }) {
|
|
2014
2031
|
return /* @__PURE__ */ a(
|
|
2015
2032
|
"li",
|
|
2016
2033
|
{
|
|
@@ -2021,7 +2038,7 @@ function lo({ className: t, ...e }) {
|
|
|
2021
2038
|
}
|
|
2022
2039
|
);
|
|
2023
2040
|
}
|
|
2024
|
-
function
|
|
2041
|
+
function wo({
|
|
2025
2042
|
render: t,
|
|
2026
2043
|
size: e = "md",
|
|
2027
2044
|
isActive: s = !1,
|
|
@@ -2058,10 +2075,10 @@ function co({
|
|
|
2058
2075
|
}
|
|
2059
2076
|
});
|
|
2060
2077
|
}
|
|
2061
|
-
const
|
|
2078
|
+
const mo = (t) => {
|
|
2062
2079
|
const { configurations: e } = ot(), { modules: s, locale: n } = e;
|
|
2063
|
-
return
|
|
2064
|
-
},
|
|
2080
|
+
return po(t) ? null : fo(t, s, n);
|
|
2081
|
+
}, po = (t) => t.startsWith("http://") || t.startsWith("https://"), fo = (t, e, s) => {
|
|
2065
2082
|
const n = Gt(s), r = pa(t);
|
|
2066
2083
|
for (const o of e) {
|
|
2067
2084
|
const i = pa(o.path);
|
|
@@ -2097,7 +2114,7 @@ const uo = (t) => {
|
|
|
2097
2114
|
}
|
|
2098
2115
|
}
|
|
2099
2116
|
return null;
|
|
2100
|
-
},
|
|
2117
|
+
}, Pl = (t) => {
|
|
2101
2118
|
const {
|
|
2102
2119
|
to: e,
|
|
2103
2120
|
external: s,
|
|
@@ -2105,7 +2122,7 @@ const uo = (t) => {
|
|
|
2105
2122
|
activeMatch: r = "prefix",
|
|
2106
2123
|
title: o,
|
|
2107
2124
|
icon: i
|
|
2108
|
-
} = t, { pathname: l } = Ft(), d =
|
|
2125
|
+
} = t, { pathname: l } = Ft(), d = mo(e), m = r === "exact" ? l === e : l === e || l.startsWith(`${e}/`), u = o ?? d?.title ?? ho(e), w = i ?? d?.icon, p = {
|
|
2109
2126
|
title: u,
|
|
2110
2127
|
url: e,
|
|
2111
2128
|
icon: w,
|
|
@@ -2149,7 +2166,7 @@ const uo = (t) => {
|
|
|
2149
2166
|
] })
|
|
2150
2167
|
}
|
|
2151
2168
|
) });
|
|
2152
|
-
}, Ts = (t) => t.startsWith("http://") || t.startsWith("https://"),
|
|
2169
|
+
}, Ts = (t) => t.startsWith("http://") || t.startsWith("https://"), ho = (t) => {
|
|
2153
2170
|
if (Ts(t))
|
|
2154
2171
|
try {
|
|
2155
2172
|
return new URL(t).hostname;
|
|
@@ -2158,7 +2175,7 @@ const uo = (t) => {
|
|
|
2158
2175
|
}
|
|
2159
2176
|
const e = t.split("/").filter(Boolean);
|
|
2160
2177
|
return (e[e.length - 1] ?? t).split("-").map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join(" ");
|
|
2161
|
-
},
|
|
2178
|
+
}, Ll = (t) => {
|
|
2162
2179
|
const { title: e, icon: s, to: n, defaultOpen: r = !0, children: o } = t, { pathname: i } = Ft(), { configurations: l } = ot(), d = Gt(l.locale), m = it(), u = d(e, typeof e == "string" ? e : ""), w = n ? i === n : !1;
|
|
2163
2180
|
return n ? /* @__PURE__ */ c(Z.Root, { render: /* @__PURE__ */ a(ut, {}), defaultOpen: r, children: [
|
|
2164
2181
|
/* @__PURE__ */ c(
|
|
@@ -2210,7 +2227,7 @@ const uo = (t) => {
|
|
|
2210
2227
|
] }),
|
|
2211
2228
|
/* @__PURE__ */ a(Z.Panel, { children: /* @__PURE__ */ a(Te, { children: o }) })
|
|
2212
2229
|
] });
|
|
2213
|
-
},
|
|
2230
|
+
}, El = () => /* @__PURE__ */ a(io, {}), ks = () => {
|
|
2214
2231
|
const { setOpen: t } = Ka(), e = it();
|
|
2215
2232
|
return /* @__PURE__ */ a(ut, { children: /* @__PURE__ */ c(
|
|
2216
2233
|
wt,
|
|
@@ -2224,17 +2241,17 @@ const uo = (t) => {
|
|
|
2224
2241
|
]
|
|
2225
2242
|
}
|
|
2226
2243
|
) });
|
|
2227
|
-
},
|
|
2228
|
-
const { title: e, icon: s } = ot(), { pathname: n } = Ft(), { isIconMode: r } = Pt(), o = /* @__PURE__ */ c(
|
|
2244
|
+
}, go = (t) => {
|
|
2245
|
+
const { title: e, icon: s } = ot(), { pathname: n } = Ft(), { isIconMode: r } = Pt(), o = /* @__PURE__ */ c(oo, { children: [
|
|
2229
2246
|
s,
|
|
2230
2247
|
/* @__PURE__ */ a("h1", { className: f("astw:text-sm astw:mb-2 astw:mt-2 astw:px-2", r && "astw:hidden"), children: e })
|
|
2231
2248
|
] });
|
|
2232
|
-
return /* @__PURE__ */ c(
|
|
2249
|
+
return /* @__PURE__ */ c(no, { variant: "inset", collapsible: r ? "icon" : "offcanvas", children: [
|
|
2233
2250
|
!r && /* @__PURE__ */ c("div", { className: "astw:flex astw:justify-between astw:items-center", children: [
|
|
2234
2251
|
t.header ?? o,
|
|
2235
2252
|
/* @__PURE__ */ a("div", { className: "astw:hidden astw:md:block", children: /* @__PURE__ */ a(Ns, { className: "astw:-ml-1" }) })
|
|
2236
2253
|
] }),
|
|
2237
|
-
/* @__PURE__ */ a(
|
|
2254
|
+
/* @__PURE__ */ a(lo, { children: t.children ? (
|
|
2238
2255
|
// New API: children-based explicit definition
|
|
2239
2256
|
/* @__PURE__ */ a(Oe, { children: /* @__PURE__ */ c($e, { children: [
|
|
2240
2257
|
/* @__PURE__ */ a(ks, {}),
|
|
@@ -2242,14 +2259,14 @@ const uo = (t) => {
|
|
|
2242
2259
|
] }) })
|
|
2243
2260
|
) : (
|
|
2244
2261
|
// Existing behavior: auto-generation from resources
|
|
2245
|
-
/* @__PURE__ */ a(Le, { fallback: /* @__PURE__ */ a(
|
|
2262
|
+
/* @__PURE__ */ a(Le, { fallback: /* @__PURE__ */ a(yo, {}), children: /* @__PURE__ */ a(bo, { currentPath: n }) })
|
|
2246
2263
|
) }),
|
|
2247
2264
|
t.footer ?? null
|
|
2248
2265
|
] });
|
|
2249
|
-
},
|
|
2266
|
+
}, bo = ({ currentPath: t }) => {
|
|
2250
2267
|
const e = Oa();
|
|
2251
|
-
return /* @__PURE__ */ a(ka, { resolve: e, children: (s) => /* @__PURE__ */ a(
|
|
2252
|
-
}, fa = (t, e) => t ? (t.startsWith("/") ? t : `/${t}`) === e : !1,
|
|
2268
|
+
return /* @__PURE__ */ a(ka, { resolve: e, children: (s) => /* @__PURE__ */ a(xo, { items: s ?? [], currentPath: t }) });
|
|
2269
|
+
}, fa = (t, e) => t ? (t.startsWith("/") ? t : `/${t}`) === e : !1, xo = (t) => {
|
|
2253
2270
|
const e = it();
|
|
2254
2271
|
return /* @__PURE__ */ a(Oe, { children: /* @__PURE__ */ c($e, { children: [
|
|
2255
2272
|
/* @__PURE__ */ a(ks, {}),
|
|
@@ -2304,8 +2321,8 @@ const uo = (t) => {
|
|
|
2304
2321
|
/* @__PURE__ */ a("span", { className: "astw:sr-only", children: e("toggle") })
|
|
2305
2322
|
] })
|
|
2306
2323
|
] }) }),
|
|
2307
|
-
!!s.items?.length && /* @__PURE__ */ a(Z.Panel, { children: /* @__PURE__ */ a(Te, { children: s.items?.filter((n) => n.url).map((n) => /* @__PURE__ */ a(
|
|
2308
|
-
|
|
2324
|
+
!!s.items?.length && /* @__PURE__ */ a(Z.Panel, { children: /* @__PURE__ */ a(Te, { children: s.items?.filter((n) => n.url).map((n) => /* @__PURE__ */ a(uo, { children: /* @__PURE__ */ a(
|
|
2325
|
+
wo,
|
|
2309
2326
|
{
|
|
2310
2327
|
render: /* @__PURE__ */ a(
|
|
2311
2328
|
zt,
|
|
@@ -2319,7 +2336,7 @@ const uo = (t) => {
|
|
|
2319
2336
|
) }, n.title)) }) })
|
|
2320
2337
|
] }, s.title))
|
|
2321
2338
|
] }) });
|
|
2322
|
-
},
|
|
2339
|
+
}, vo = [104, 80, 112, 88, 96, 100, 84, 92], yo = () => /* @__PURE__ */ a(Oe, { children: /* @__PURE__ */ a($e, { className: "astw:px-2", children: vo.map((t, e) => /* @__PURE__ */ a(ut, { children: /* @__PURE__ */ c("div", { className: "astw:flex astw:items-center astw:gap-2 astw:py-1.5", children: [
|
|
2323
2340
|
/* @__PURE__ */ a("div", { className: "astw:h-4 astw:w-4 astw:rounded-md astw:bg-muted" }),
|
|
2324
2341
|
/* @__PURE__ */ a(
|
|
2325
2342
|
"div",
|
|
@@ -2374,7 +2391,7 @@ function xa({
|
|
|
2374
2391
|
}
|
|
2375
2392
|
});
|
|
2376
2393
|
}
|
|
2377
|
-
function
|
|
2394
|
+
function No({
|
|
2378
2395
|
className: t,
|
|
2379
2396
|
ariaCurrent: e = "location",
|
|
2380
2397
|
...s
|
|
@@ -2390,7 +2407,7 @@ function vo({
|
|
|
2390
2407
|
}
|
|
2391
2408
|
);
|
|
2392
2409
|
}
|
|
2393
|
-
function
|
|
2410
|
+
function Co({ children: t, className: e, ...s }) {
|
|
2394
2411
|
return /* @__PURE__ */ a(
|
|
2395
2412
|
"li",
|
|
2396
2413
|
{
|
|
@@ -2403,16 +2420,16 @@ function yo({ children: t, className: e, ...s }) {
|
|
|
2403
2420
|
}
|
|
2404
2421
|
);
|
|
2405
2422
|
}
|
|
2406
|
-
const
|
|
2423
|
+
const So = () => {
|
|
2407
2424
|
const { configurations: t } = ot(), e = Ft();
|
|
2408
|
-
return
|
|
2425
|
+
return Dr(
|
|
2409
2426
|
e.pathname,
|
|
2410
2427
|
t.basePath,
|
|
2411
2428
|
t.modules,
|
|
2412
2429
|
t.locale
|
|
2413
2430
|
);
|
|
2414
|
-
},
|
|
2415
|
-
const { basePath: t, segments: e } =
|
|
2431
|
+
}, To = () => {
|
|
2432
|
+
const { basePath: t, segments: e } = So(), { overrides: s } = Ga(), n = On("/:prefix/settings/:suffix"), r = it();
|
|
2416
2433
|
return n ? /* @__PURE__ */ a(ha, { children: /* @__PURE__ */ a(ga, { children: /* @__PURE__ */ a("div", { className: "astw:inline-flex astw:items-center astw:gap-3 astw:last:text-foreground", children: /* @__PURE__ */ a(ba, { children: /* @__PURE__ */ a(xa, { to: `/${n.params.prefix}/settings`, children: r("settings") }) }) }) }) }) : /* @__PURE__ */ a(ha, { children: /* @__PURE__ */ a(ga, { children: e.map((o, i) => {
|
|
2417
2434
|
const l = t ? `/${t}/${o.path}` : `/${o.path}`, d = s.get(l) ?? o.title;
|
|
2418
2435
|
return /* @__PURE__ */ c(
|
|
@@ -2423,28 +2440,28 @@ const No = () => {
|
|
|
2423
2440
|
/* @__PURE__ */ a(ba, { children: o.clickable ? /* @__PURE__ */ a(xa, { to: o.path, children: d }) : (
|
|
2424
2441
|
// Non-last segments use ariaCurrent={false} to avoid announcing
|
|
2425
2442
|
// intermediate items as the current location to screen readers.
|
|
2426
|
-
/* @__PURE__ */ a(
|
|
2443
|
+
/* @__PURE__ */ a(No, { ariaCurrent: i === e.length - 1 ? "location" : !1, children: d })
|
|
2427
2444
|
) }),
|
|
2428
|
-
i < e.length - 1 && /* @__PURE__ */ a(
|
|
2445
|
+
i < e.length - 1 && /* @__PURE__ */ a(Co, {})
|
|
2429
2446
|
]
|
|
2430
2447
|
},
|
|
2431
2448
|
i
|
|
2432
2449
|
);
|
|
2433
2450
|
}) }) });
|
|
2434
|
-
},
|
|
2451
|
+
}, ko = () => {
|
|
2435
2452
|
const { open: t, isIconMode: e } = Pt();
|
|
2436
2453
|
return /* @__PURE__ */ a("div", { className: t && !e ? "astw:md:hidden" : void 0, children: /* @__PURE__ */ a(Ns, { className: "astw:-ml-2.5" }) });
|
|
2437
|
-
},
|
|
2438
|
-
const e = t.children ? t.children({ Outlet: ua }) : null, s =
|
|
2454
|
+
}, Ml = (t) => {
|
|
2455
|
+
const e = t.children ? t.children({ Outlet: ua }) : null, s = Tr(), n = () => {
|
|
2439
2456
|
s.setTheme(s.theme === "dark" ? "light" : "dark");
|
|
2440
2457
|
};
|
|
2441
|
-
return /* @__PURE__ */ a(
|
|
2442
|
-
t.sidebar ?? /* @__PURE__ */ a(
|
|
2443
|
-
/* @__PURE__ */ c(
|
|
2458
|
+
return /* @__PURE__ */ a(so, { className: "astw:flex astw:flex-col", children: /* @__PURE__ */ c("div", { className: "astw:flex astw:flex-1", children: [
|
|
2459
|
+
t.sidebar ?? /* @__PURE__ */ a(go, {}),
|
|
2460
|
+
/* @__PURE__ */ c(ro, { className: "astw:w-[calc(100%-var(--sidebar-width))]", children: [
|
|
2444
2461
|
/* @__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: [
|
|
2445
2462
|
/* @__PURE__ */ c("div", { className: "astw:flex astw:items-center astw:gap-2", children: [
|
|
2446
|
-
/* @__PURE__ */ a(
|
|
2447
|
-
/* @__PURE__ */ a(
|
|
2463
|
+
/* @__PURE__ */ a(ko, {}),
|
|
2464
|
+
/* @__PURE__ */ a(To, {})
|
|
2448
2465
|
] }),
|
|
2449
2466
|
/* @__PURE__ */ a("div", { className: "astw:flex astw:items-center astw:gap-2", children: /* @__PURE__ */ a(_t, { variant: "outline", size: "icon", onClick: n, children: /* @__PURE__ */ a(Kn, {}) }) })
|
|
2450
2467
|
] }) }),
|
|
@@ -2452,9 +2469,9 @@ const No = () => {
|
|
|
2452
2469
|
] })
|
|
2453
2470
|
] }) });
|
|
2454
2471
|
};
|
|
2455
|
-
function
|
|
2472
|
+
function Io(t, e, s) {
|
|
2456
2473
|
if (s.current === null || s.current.contextData !== e || s.current.guards !== t) {
|
|
2457
|
-
const n =
|
|
2474
|
+
const n = Po(t, e), r = {
|
|
2458
2475
|
contextData: e,
|
|
2459
2476
|
guards: t,
|
|
2460
2477
|
promise: n,
|
|
@@ -2471,7 +2488,7 @@ function To(t, e, s) {
|
|
|
2471
2488
|
}
|
|
2472
2489
|
return s.current;
|
|
2473
2490
|
}
|
|
2474
|
-
function
|
|
2491
|
+
function Ro(t) {
|
|
2475
2492
|
const { state: e } = t;
|
|
2476
2493
|
switch (e.status) {
|
|
2477
2494
|
case "fulfilled":
|
|
@@ -2482,10 +2499,10 @@ function ko(t) {
|
|
|
2482
2499
|
throw e.promise;
|
|
2483
2500
|
}
|
|
2484
2501
|
}
|
|
2485
|
-
const
|
|
2486
|
-
const { guards: e, children: s, fallback: n = null, loading: r = null } = t, { contextData: o } = Ea(), i = j(null), l =
|
|
2487
|
-
return /* @__PURE__ */ a(Le, { fallback: r, children: /* @__PURE__ */ a(
|
|
2488
|
-
},
|
|
2502
|
+
const Dl = (t) => {
|
|
2503
|
+
const { guards: e, children: s, fallback: n = null, loading: r = null } = t, { contextData: o } = Ea(), i = j(null), l = Io(e, o, i);
|
|
2504
|
+
return /* @__PURE__ */ a(Le, { fallback: r, children: /* @__PURE__ */ a(Ao, { cache: l, fallback: n, children: s }) });
|
|
2505
|
+
}, Ao = (t) => Ro(t.cache).type === "pass" ? /* @__PURE__ */ a(V, { children: t.children }) : /* @__PURE__ */ a(V, { children: t.fallback }), Po = async (t, e) => {
|
|
2489
2506
|
const s = { context: e };
|
|
2490
2507
|
for (const n of t) {
|
|
2491
2508
|
const r = await n(s);
|
|
@@ -2493,7 +2510,7 @@ const Ll = (t) => {
|
|
|
2493
2510
|
return r;
|
|
2494
2511
|
}
|
|
2495
2512
|
return { type: "pass" };
|
|
2496
|
-
},
|
|
2513
|
+
}, Lo = () => {
|
|
2497
2514
|
let t = "idle";
|
|
2498
2515
|
const e = "callbackstatuschange", s = new EventTarget(), n = (r) => {
|
|
2499
2516
|
t = r, s.dispatchEvent(new Event(e));
|
|
@@ -2518,8 +2535,8 @@ const Ll = (t) => {
|
|
|
2518
2535
|
}
|
|
2519
2536
|
};
|
|
2520
2537
|
};
|
|
2521
|
-
function
|
|
2522
|
-
const e =
|
|
2538
|
+
function zl(t) {
|
|
2539
|
+
const e = rr(t), { appUri: s } = t, n = Lo();
|
|
2523
2540
|
if (typeof window < "u") {
|
|
2524
2541
|
const o = new URL(window.location.href);
|
|
2525
2542
|
if (Rs(o)) {
|
|
@@ -2542,16 +2559,16 @@ function El(t) {
|
|
|
2542
2559
|
}
|
|
2543
2560
|
};
|
|
2544
2561
|
}
|
|
2545
|
-
const Is = mt(null), Rs = (t) => t.searchParams.has("code") || t.searchParams.has("error"),
|
|
2562
|
+
const Is = mt(null), Rs = (t) => t.searchParams.has("code") || t.searchParams.has("error"), Eo = () => typeof window > "u" ? !1 : Rs(new URL(window.location.href)), Mo = ({
|
|
2546
2563
|
guardComponent: t,
|
|
2547
2564
|
children: e
|
|
2548
2565
|
}) => {
|
|
2549
|
-
const { isReady: s, isAuthenticated: n } =
|
|
2566
|
+
const { isReady: s, isAuthenticated: n } = _o();
|
|
2550
2567
|
return !s || !n ? t() : e;
|
|
2551
|
-
},
|
|
2568
|
+
}, Do = (t) => {
|
|
2552
2569
|
const e = j(null), s = I(() => {
|
|
2553
2570
|
const n = t.client.getState();
|
|
2554
|
-
!t.enabled ||
|
|
2571
|
+
!t.enabled || Eo() || !n.isReady || n.isAuthenticated || e.current || (e.current = t.client.login().then(() => {
|
|
2555
2572
|
}).catch((r) => {
|
|
2556
2573
|
console.error("Failed to auto-login after session expiry:", r);
|
|
2557
2574
|
}).finally(() => {
|
|
@@ -2568,7 +2585,7 @@ const Is = mt(null), Rs = (t) => t.searchParams.has("code") || t.searchParams.ha
|
|
|
2568
2585
|
[t.client, s]
|
|
2569
2586
|
)
|
|
2570
2587
|
};
|
|
2571
|
-
},
|
|
2588
|
+
}, zo = (t, e) => {
|
|
2572
2589
|
const s = j(null);
|
|
2573
2590
|
return I(async () => {
|
|
2574
2591
|
const r = t.getState();
|
|
@@ -2580,18 +2597,18 @@ const Is = mt(null), Rs = (t) => t.searchParams.has("code") || t.searchParams.ha
|
|
|
2580
2597
|
s.current = null;
|
|
2581
2598
|
})), s.current;
|
|
2582
2599
|
}, [t, e]);
|
|
2583
|
-
},
|
|
2600
|
+
}, Vo = (t) => {
|
|
2584
2601
|
const e = I(
|
|
2585
2602
|
(n) => t.subscribeCallbackStatus?.(n) ?? (() => {
|
|
2586
2603
|
}),
|
|
2587
2604
|
[t]
|
|
2588
2605
|
), s = I(() => t.getCallbackStatusSnapshot?.() ?? "idle", [t]);
|
|
2589
2606
|
return Ee(e, s);
|
|
2590
|
-
},
|
|
2591
|
-
const e = t.client, { subscribeAuthState: s } =
|
|
2607
|
+
}, Vl = (t) => {
|
|
2608
|
+
const e = t.client, { subscribeAuthState: s } = Do({
|
|
2592
2609
|
client: e,
|
|
2593
2610
|
enabled: t.autoLogin
|
|
2594
|
-
}), n = I(() => e.getState(), [e]), r = Ee(s, n), o =
|
|
2611
|
+
}), n = I(() => e.getState(), [e]), r = Ee(s, n), o = Vo(e), i = zo(e, o);
|
|
2595
2612
|
st(() => {
|
|
2596
2613
|
i().catch((m) => {
|
|
2597
2614
|
console.error("Failed to check auth status:", m);
|
|
@@ -2607,13 +2624,13 @@ const Is = mt(null), Rs = (t) => t.searchParams.has("code") || t.searchParams.ha
|
|
|
2607
2624
|
}),
|
|
2608
2625
|
[r, e]
|
|
2609
2626
|
);
|
|
2610
|
-
return /* @__PURE__ */ a(Is.Provider, { value: d, children: t.guardComponent ? /* @__PURE__ */ a(
|
|
2627
|
+
return /* @__PURE__ */ a(Is.Provider, { value: d, children: t.guardComponent ? /* @__PURE__ */ a(Mo, { guardComponent: t.guardComponent, children: l }) : l });
|
|
2611
2628
|
}, As = () => {
|
|
2612
2629
|
const t = tt(Is);
|
|
2613
2630
|
if (!t)
|
|
2614
2631
|
throw new Error("useAuth/useAuthSuspense must be used within an AuthProvider");
|
|
2615
2632
|
return t;
|
|
2616
|
-
},
|
|
2633
|
+
}, _o = () => {
|
|
2617
2634
|
const t = As(), { isAuthenticated: e, error: s, isReady: n } = t.authState;
|
|
2618
2635
|
return {
|
|
2619
2636
|
error: s,
|
|
@@ -2623,7 +2640,7 @@ const Is = mt(null), Rs = (t) => t.searchParams.has("code") || t.searchParams.ha
|
|
|
2623
2640
|
logout: t.logout,
|
|
2624
2641
|
checkAuthStatus: t.checkAuthStatus
|
|
2625
2642
|
};
|
|
2626
|
-
},
|
|
2643
|
+
}, _l = () => {
|
|
2627
2644
|
const t = As();
|
|
2628
2645
|
if (!t.authState.isReady)
|
|
2629
2646
|
throw t.ready();
|
|
@@ -2636,7 +2653,7 @@ const Is = mt(null), Rs = (t) => t.searchParams.has("code") || t.searchParams.ha
|
|
|
2636
2653
|
checkAuthStatus: t.checkAuthStatus
|
|
2637
2654
|
};
|
|
2638
2655
|
};
|
|
2639
|
-
function
|
|
2656
|
+
function Bl() {
|
|
2640
2657
|
return {
|
|
2641
2658
|
for(t, ...e) {
|
|
2642
2659
|
const s = e[0];
|
|
@@ -2644,12 +2661,12 @@ function zl() {
|
|
|
2644
2661
|
}
|
|
2645
2662
|
};
|
|
2646
2663
|
}
|
|
2647
|
-
const
|
|
2648
|
-
function
|
|
2664
|
+
const Ol = () => sr;
|
|
2665
|
+
function $l(t) {
|
|
2649
2666
|
const e = Ft(), { register: s, unregister: n } = Ga(), r = e.pathname;
|
|
2650
2667
|
st(() => (t ? s(r, t) : n(r), () => n(r)), [r, t, s, n]);
|
|
2651
2668
|
}
|
|
2652
|
-
const
|
|
2669
|
+
const Bo = le(
|
|
2653
2670
|
"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",
|
|
2654
2671
|
{
|
|
2655
2672
|
variants: {
|
|
@@ -2671,21 +2688,21 @@ const Vo = le(
|
|
|
2671
2688
|
variant: "default"
|
|
2672
2689
|
}
|
|
2673
2690
|
}
|
|
2674
|
-
),
|
|
2691
|
+
), Oo = {
|
|
2675
2692
|
"outline-success": "astw:bg-green-500",
|
|
2676
2693
|
"outline-warning": "astw:bg-orange-500",
|
|
2677
2694
|
"outline-error": "astw:bg-red-500",
|
|
2678
2695
|
"outline-info": "astw:bg-blue-500",
|
|
2679
2696
|
"outline-neutral": "astw:bg-neutral-400"
|
|
2680
2697
|
};
|
|
2681
|
-
function
|
|
2682
|
-
const e =
|
|
2698
|
+
function $o({ variant: t }) {
|
|
2699
|
+
const e = Oo[t];
|
|
2683
2700
|
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: f("astw:size-1.75 astw:rounded-full", e) }) }) : null;
|
|
2684
2701
|
}
|
|
2685
|
-
function
|
|
2702
|
+
function Fo({ className: t, variant: e, children: s, ...n }) {
|
|
2686
2703
|
const r = e?.toString().startsWith("outline-");
|
|
2687
|
-
return /* @__PURE__ */ c("div", { className: f(
|
|
2688
|
-
r && /* @__PURE__ */ a(
|
|
2704
|
+
return /* @__PURE__ */ c("div", { className: f(Bo({ variant: e }), t), ...n, children: [
|
|
2705
|
+
r && /* @__PURE__ */ a($o, { variant: e }),
|
|
2689
2706
|
s
|
|
2690
2707
|
] });
|
|
2691
2708
|
}
|
|
@@ -2714,7 +2731,14 @@ function Ls({ className: t, title: e, description: s, children: n, ...r }) {
|
|
|
2714
2731
|
),
|
|
2715
2732
|
...r,
|
|
2716
2733
|
children: [
|
|
2717
|
-
e && /* @__PURE__ */ a(
|
|
2734
|
+
e && /* @__PURE__ */ a(
|
|
2735
|
+
"h3",
|
|
2736
|
+
{
|
|
2737
|
+
"data-slot": "card-title",
|
|
2738
|
+
className: "astw:text-lg astw:font-semibold astw:leading-none astw:text-card-foreground",
|
|
2739
|
+
children: e
|
|
2740
|
+
}
|
|
2741
|
+
),
|
|
2718
2742
|
s && /* @__PURE__ */ a("div", { "data-slot": "card-description", className: "astw:text-muted-foreground astw:text-sm", children: s }),
|
|
2719
2743
|
n
|
|
2720
2744
|
]
|
|
@@ -2723,14 +2747,21 @@ function Ls({ className: t, title: e, description: s, children: n, ...r }) {
|
|
|
2723
2747
|
}
|
|
2724
2748
|
Ls.displayName = "Card.Header";
|
|
2725
2749
|
function Es({ className: t, ...e }) {
|
|
2726
|
-
return /* @__PURE__ */ a(
|
|
2750
|
+
return /* @__PURE__ */ a(
|
|
2751
|
+
"div",
|
|
2752
|
+
{
|
|
2753
|
+
"data-slot": "card-content",
|
|
2754
|
+
className: f("astw:px-6 astw:pb-6 astw:first:pt-6", t),
|
|
2755
|
+
...e
|
|
2756
|
+
}
|
|
2757
|
+
);
|
|
2727
2758
|
}
|
|
2728
2759
|
Es.displayName = "Card.Content";
|
|
2729
2760
|
const Nt = { Root: Ps, Header: Ls, Content: Es };
|
|
2730
|
-
function
|
|
2761
|
+
function jo(t) {
|
|
2731
2762
|
return t.type === "divider";
|
|
2732
2763
|
}
|
|
2733
|
-
function
|
|
2764
|
+
function Go(t) {
|
|
2734
2765
|
return t.type !== "divider" && "key" in t;
|
|
2735
2766
|
}
|
|
2736
2767
|
function ce(t, e) {
|
|
@@ -2742,10 +2773,10 @@ function ce(t, e) {
|
|
|
2742
2773
|
function q(t) {
|
|
2743
2774
|
return t == null || t === "";
|
|
2744
2775
|
}
|
|
2745
|
-
function
|
|
2776
|
+
function Ho(t) {
|
|
2746
2777
|
return t.toLowerCase().replace(/_/g, " ").replace(/^\w/, (e) => e.toUpperCase());
|
|
2747
2778
|
}
|
|
2748
|
-
function
|
|
2779
|
+
function Ko(t, e = "medium") {
|
|
2749
2780
|
if (q(t)) return "";
|
|
2750
2781
|
const s = t instanceof Date ? t : new Date(String(t));
|
|
2751
2782
|
if (isNaN(s.getTime())) return String(t);
|
|
@@ -2777,7 +2808,7 @@ function Go(t, e = "medium") {
|
|
|
2777
2808
|
return s.toLocaleDateString();
|
|
2778
2809
|
}
|
|
2779
2810
|
}
|
|
2780
|
-
function
|
|
2811
|
+
function Uo(t, e) {
|
|
2781
2812
|
if (q(t)) return "";
|
|
2782
2813
|
const s = typeof t == "number" ? t : parseFloat(String(t));
|
|
2783
2814
|
if (isNaN(s)) return String(t);
|
|
@@ -2790,7 +2821,7 @@ function Ho(t, e) {
|
|
|
2790
2821
|
return `${e || "$"}${s.toFixed(2)}`;
|
|
2791
2822
|
}
|
|
2792
2823
|
}
|
|
2793
|
-
function
|
|
2824
|
+
function Wo(t) {
|
|
2794
2825
|
if (q(t)) return [];
|
|
2795
2826
|
if (typeof t == "string")
|
|
2796
2827
|
return t.split(/[,\n]/).map((e) => e.trim()).filter(Boolean);
|
|
@@ -2828,7 +2859,7 @@ function Ms({ value: t }) {
|
|
|
2828
2859
|
] });
|
|
2829
2860
|
}
|
|
2830
2861
|
const lt = "–";
|
|
2831
|
-
function
|
|
2862
|
+
function qo({ field: t }) {
|
|
2832
2863
|
const e = q(t.value) ? lt : String(t.value), s = t.meta?.copyable && !q(t.value), n = t.meta?.truncateLines, r = k.useRef(null), [o, i] = k.useState(!1);
|
|
2833
2864
|
k.useEffect(() => {
|
|
2834
2865
|
if (!n) {
|
|
@@ -2867,25 +2898,25 @@ function Uo({ field: t }) {
|
|
|
2867
2898
|
/* @__PURE__ */ a(Y.Content, { position: { side: "bottom" }, style: { maxWidth: 320 }, children: /* @__PURE__ */ a("p", { className: "astw:text-sm", children: e }) })
|
|
2868
2899
|
] }) : d;
|
|
2869
2900
|
}
|
|
2870
|
-
function
|
|
2901
|
+
function Yo({ field: t }) {
|
|
2871
2902
|
if (q(t.value))
|
|
2872
2903
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: lt });
|
|
2873
2904
|
const e = String(t.value), s = t.meta?.badgeVariantMap || {}, n = e.toLowerCase(), r = s[e] || s[n] || "outline-neutral";
|
|
2874
|
-
return /* @__PURE__ */ a(
|
|
2905
|
+
return /* @__PURE__ */ a(Fo, { variant: r, className: "astw:w-fit", children: Ho(e) });
|
|
2875
2906
|
}
|
|
2876
|
-
function
|
|
2907
|
+
function Xo({ field: t }) {
|
|
2877
2908
|
if (q(t.value))
|
|
2878
2909
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: lt });
|
|
2879
|
-
const e = t.meta?.currencyKey || "currency", s = ce(t.data, e), n =
|
|
2910
|
+
const e = t.meta?.currencyKey || "currency", s = ce(t.data, e), n = Uo(t.value, s);
|
|
2880
2911
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground astw:tabular-nums", children: n });
|
|
2881
2912
|
}
|
|
2882
|
-
function
|
|
2913
|
+
function Qo({ field: t }) {
|
|
2883
2914
|
if (q(t.value))
|
|
2884
2915
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: lt });
|
|
2885
|
-
const e = t.meta?.dateFormat || "medium", s =
|
|
2916
|
+
const e = t.meta?.dateFormat || "medium", s = Ko(t.value, e);
|
|
2886
2917
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: s });
|
|
2887
2918
|
}
|
|
2888
|
-
function
|
|
2919
|
+
function Zo({ field: t }) {
|
|
2889
2920
|
if (q(t.value))
|
|
2890
2921
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: lt });
|
|
2891
2922
|
const e = t.meta?.hrefKey, s = e ? ce(t.data, e) : void 0, n = t.meta?.external ?? !1, r = String(t.value);
|
|
@@ -2903,10 +2934,10 @@ function Xo({ field: t }) {
|
|
|
2903
2934
|
}
|
|
2904
2935
|
) : /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: r });
|
|
2905
2936
|
}
|
|
2906
|
-
function
|
|
2937
|
+
function Jo({ field: t }) {
|
|
2907
2938
|
if (q(t.value))
|
|
2908
2939
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: lt });
|
|
2909
|
-
const e =
|
|
2940
|
+
const e = Wo(t.value), s = t.meta?.copyable && !q(t.value), n = e.join(`
|
|
2910
2941
|
`);
|
|
2911
2942
|
return /* @__PURE__ */ c("div", { className: "astw:flex astw:items-start astw:gap-1 astw:min-w-0", children: [
|
|
2912
2943
|
/* @__PURE__ */ a("address", { className: "astw:text-sm astw:font-medium astw:text-foreground astw:not-italic", children: e.map((r, o) => /* @__PURE__ */ c(k.Fragment, { children: [
|
|
@@ -2916,7 +2947,7 @@ function Qo({ field: t }) {
|
|
|
2916
2947
|
s && /* @__PURE__ */ a(Ms, { value: n })
|
|
2917
2948
|
] });
|
|
2918
2949
|
}
|
|
2919
|
-
function
|
|
2950
|
+
function ti({ field: t }) {
|
|
2920
2951
|
if (q(t.value))
|
|
2921
2952
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: lt });
|
|
2922
2953
|
const e = t.meta?.referenceIdKey, s = t.meta?.referenceUrlPattern, n = e ? ce(t.data, e) : void 0, r = String(t.value);
|
|
@@ -2928,32 +2959,32 @@ function Zo({ field: t }) {
|
|
|
2928
2959
|
function va(t) {
|
|
2929
2960
|
switch (t.type) {
|
|
2930
2961
|
case "text":
|
|
2931
|
-
return /* @__PURE__ */ a(
|
|
2962
|
+
return /* @__PURE__ */ a(qo, { field: t });
|
|
2932
2963
|
case "badge":
|
|
2933
|
-
return /* @__PURE__ */ a(
|
|
2964
|
+
return /* @__PURE__ */ a(Yo, { field: t });
|
|
2934
2965
|
case "money":
|
|
2935
|
-
return /* @__PURE__ */ a(
|
|
2966
|
+
return /* @__PURE__ */ a(Xo, { field: t });
|
|
2936
2967
|
case "date":
|
|
2937
|
-
return /* @__PURE__ */ a(
|
|
2968
|
+
return /* @__PURE__ */ a(Qo, { field: t });
|
|
2938
2969
|
case "link":
|
|
2939
|
-
return /* @__PURE__ */ a(
|
|
2970
|
+
return /* @__PURE__ */ a(Zo, { field: t });
|
|
2940
2971
|
case "address":
|
|
2941
|
-
return /* @__PURE__ */ a(
|
|
2972
|
+
return /* @__PURE__ */ a(Jo, { field: t });
|
|
2942
2973
|
case "reference":
|
|
2943
|
-
return /* @__PURE__ */ a(
|
|
2974
|
+
return /* @__PURE__ */ a(ti, { field: t });
|
|
2944
2975
|
default:
|
|
2945
2976
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: lt });
|
|
2946
2977
|
}
|
|
2947
2978
|
}
|
|
2948
|
-
function
|
|
2979
|
+
function ei(t) {
|
|
2949
2980
|
if (t.emptyBehavior !== "hide") return !1;
|
|
2950
2981
|
const e = t.value;
|
|
2951
2982
|
return e == null || e === "";
|
|
2952
2983
|
}
|
|
2953
|
-
function
|
|
2984
|
+
function ai(t) {
|
|
2954
2985
|
return !1;
|
|
2955
2986
|
}
|
|
2956
|
-
function
|
|
2987
|
+
function si(t, e, s) {
|
|
2957
2988
|
const n = ce(e, t.key);
|
|
2958
2989
|
return {
|
|
2959
2990
|
id: `${t.key}-${s}`,
|
|
@@ -2965,18 +2996,18 @@ function ei(t, e, s) {
|
|
|
2965
2996
|
data: e
|
|
2966
2997
|
};
|
|
2967
2998
|
}
|
|
2968
|
-
function
|
|
2999
|
+
function ni(t, e) {
|
|
2969
3000
|
const s = [];
|
|
2970
3001
|
let n = [], r = 0, o = 0;
|
|
2971
3002
|
for (const i of t)
|
|
2972
|
-
if (
|
|
3003
|
+
if (jo(i))
|
|
2973
3004
|
n.length > 0 && (s.push({
|
|
2974
3005
|
id: `section-${r}`,
|
|
2975
3006
|
fields: n
|
|
2976
3007
|
}), r++, n = []);
|
|
2977
|
-
else if (
|
|
2978
|
-
const l =
|
|
2979
|
-
o++,
|
|
3008
|
+
else if (Go(i)) {
|
|
3009
|
+
const l = si(i, e, o);
|
|
3010
|
+
o++, ei(l) || n.push(l);
|
|
2980
3011
|
}
|
|
2981
3012
|
return n.length > 0 && s.push({ id: `section-${r}`, fields: n }), s;
|
|
2982
3013
|
}
|
|
@@ -2995,7 +3026,7 @@ function ya({ label: t, children: e, fullWidth: s }) {
|
|
|
2995
3026
|
}
|
|
2996
3027
|
);
|
|
2997
3028
|
}
|
|
2998
|
-
function
|
|
3029
|
+
function Fl({
|
|
2999
3030
|
data: t,
|
|
3000
3031
|
title: e,
|
|
3001
3032
|
fields: s,
|
|
@@ -3004,7 +3035,7 @@ function Bl({
|
|
|
3004
3035
|
style: o,
|
|
3005
3036
|
headerAction: i
|
|
3006
3037
|
}) {
|
|
3007
|
-
const l =
|
|
3038
|
+
const l = ni(s, t), d = l.some((w) => w.fields.length > 0), m = f(
|
|
3008
3039
|
"astw:grid astw:gap-x-6 astw:gap-y-4",
|
|
3009
3040
|
// Default: 1 column
|
|
3010
3041
|
"astw:grid-cols-1",
|
|
@@ -3017,7 +3048,7 @@ function Bl({
|
|
|
3017
3048
|
"astw:@[400px]:grid-cols-2 astw:@[600px]:grid-cols-3"
|
|
3018
3049
|
)
|
|
3019
3050
|
), u = (w) => {
|
|
3020
|
-
const p = w.fields.filter((y) => !0), g = w.fields.filter((y) =>
|
|
3051
|
+
const p = w.fields.filter((y) => !0), g = w.fields.filter((y) => ai());
|
|
3021
3052
|
return /* @__PURE__ */ c("div", { className: "astw:space-y-4", children: [
|
|
3022
3053
|
p.length > 0 && /* @__PURE__ */ a("div", { className: m, children: p.map((y) => /* @__PURE__ */ a(ya, { label: y.label, children: va(y) }, y.id)) }),
|
|
3023
3054
|
g.length > 0 && /* @__PURE__ */ a("div", { className: m, children: g.map((y) => /* @__PURE__ */ a(ya, { label: y.label, fullWidth: !0, children: va(y) }, y.id)) })
|
|
@@ -3034,7 +3065,7 @@ function Bl({
|
|
|
3034
3065
|
] }, w.id)) }) : /* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground", children: "No information available" }) })
|
|
3035
3066
|
] }) });
|
|
3036
3067
|
}
|
|
3037
|
-
const
|
|
3068
|
+
const ri = le(
|
|
3038
3069
|
"astw:relative astw:flex astw:shrink-0 astw:items-center astw:justify-center astw:overflow-hidden astw:rounded-full astw:bg-muted astw:text-muted-foreground astw:font-medium",
|
|
3039
3070
|
{
|
|
3040
3071
|
variants: {
|
|
@@ -3054,7 +3085,7 @@ function Ds({ className: t, size: e, ...s }) {
|
|
|
3054
3085
|
Me.Root,
|
|
3055
3086
|
{
|
|
3056
3087
|
"data-slot": "avatar",
|
|
3057
|
-
className: f(
|
|
3088
|
+
className: f(ri({ size: e }), t),
|
|
3058
3089
|
...s
|
|
3059
3090
|
}
|
|
3060
3091
|
);
|
|
@@ -3087,7 +3118,7 @@ const Ce = {
|
|
|
3087
3118
|
Image: zs,
|
|
3088
3119
|
Fallback: Vs
|
|
3089
3120
|
};
|
|
3090
|
-
function
|
|
3121
|
+
function oi(t) {
|
|
3091
3122
|
const e = typeof t == "string" ? new Date(t) : t, s = /* @__PURE__ */ new Date(), n = new Date(s);
|
|
3092
3123
|
n.setDate(n.getDate() - 1);
|
|
3093
3124
|
const r = e.toDateString();
|
|
@@ -3097,7 +3128,7 @@ function ni(t) {
|
|
|
3097
3128
|
year: "numeric"
|
|
3098
3129
|
});
|
|
3099
3130
|
}
|
|
3100
|
-
function
|
|
3131
|
+
function ii(t) {
|
|
3101
3132
|
const e = typeof t == "string" ? new Date(t) : t;
|
|
3102
3133
|
return Number.isNaN(e.getTime()) ? typeof t == "string" ? t : "" : e.toLocaleDateString(void 0, {
|
|
3103
3134
|
day: "numeric",
|
|
@@ -3107,11 +3138,11 @@ function ri(t) {
|
|
|
3107
3138
|
minute: "2-digit"
|
|
3108
3139
|
});
|
|
3109
3140
|
}
|
|
3110
|
-
function
|
|
3141
|
+
function li(t) {
|
|
3111
3142
|
return t.trim().split(/\s+/).map((e) => e[0]).slice(0, 2).join("").toUpperCase();
|
|
3112
3143
|
}
|
|
3113
3144
|
const _s = k.createContext(null);
|
|
3114
|
-
function
|
|
3145
|
+
function ci() {
|
|
3115
3146
|
const t = k.useContext(_s);
|
|
3116
3147
|
if (!t)
|
|
3117
3148
|
throw new Error("ActivityCard compound components must be used within ActivityCard.Root");
|
|
@@ -3172,7 +3203,7 @@ function Ca(t, e, s) {
|
|
|
3172
3203
|
if (s === "day") {
|
|
3173
3204
|
const n = /* @__PURE__ */ new Map();
|
|
3174
3205
|
for (const o of t) {
|
|
3175
|
-
const i =
|
|
3206
|
+
const i = oi(o.timestamp);
|
|
3176
3207
|
n.has(i) || n.set(i, []), n.get(i).push(o);
|
|
3177
3208
|
}
|
|
3178
3209
|
const r = Array.from(n.entries());
|
|
@@ -3181,7 +3212,7 @@ function Ca(t, e, s) {
|
|
|
3181
3212
|
return /* @__PURE__ */ a("div", { className: "astw:flex astw:flex-col astw:gap-5", children: Na(t, e, null) });
|
|
3182
3213
|
}
|
|
3183
3214
|
function je({ children: t }) {
|
|
3184
|
-
const { items: e, maxVisible: s, overflowLabel: n, groupBy: r } =
|
|
3215
|
+
const { items: e, maxVisible: s, overflowLabel: n, groupBy: r } = ci(), [o, i] = k.useState(!1), [l, d] = k.useState(!1), m = k.useRef(null), u = e.slice(0, s), w = e.length - s, p = w > 0, g = k.useCallback(() => {
|
|
3185
3216
|
d(!0), m.current && clearTimeout(m.current), m.current = setTimeout(() => {
|
|
3186
3217
|
d(!1), m.current = null;
|
|
3187
3218
|
}, 600);
|
|
@@ -3246,7 +3277,7 @@ function Ge({ indicator: t, children: e, className: s }) {
|
|
|
3246
3277
|
);
|
|
3247
3278
|
}
|
|
3248
3279
|
Ge.displayName = "ActivityCard.Item";
|
|
3249
|
-
function
|
|
3280
|
+
function di({
|
|
3250
3281
|
items: t,
|
|
3251
3282
|
title: e,
|
|
3252
3283
|
maxVisible: s = 6,
|
|
@@ -3270,7 +3301,7 @@ function li({
|
|
|
3270
3301
|
{
|
|
3271
3302
|
indicator: l ? /* @__PURE__ */ c(Ce.Root, { "aria-hidden": !0, children: [
|
|
3272
3303
|
i.actor?.avatarUrl ? /* @__PURE__ */ a(Ce.Image, { src: i.actor.avatarUrl, alt: "" }) : null,
|
|
3273
|
-
/* @__PURE__ */ a(Ce.Fallback, { children:
|
|
3304
|
+
/* @__PURE__ */ a(Ce.Fallback, { children: li(l) })
|
|
3274
3305
|
] }) : void 0,
|
|
3275
3306
|
children: [
|
|
3276
3307
|
/* @__PURE__ */ c("p", { className: "astw:text-sm astw:font-medium astw:leading-normal astw:text-foreground", children: [
|
|
@@ -3278,7 +3309,7 @@ function li({
|
|
|
3278
3309
|
l ? " " : null,
|
|
3279
3310
|
/* @__PURE__ */ a("span", { className: "astw:text-muted-foreground", children: i.description })
|
|
3280
3311
|
] }),
|
|
3281
|
-
/* @__PURE__ */ a("p", { className: "astw:text-xs astw:leading-none astw:text-muted-foreground", children:
|
|
3312
|
+
/* @__PURE__ */ a("p", { className: "astw:text-xs astw:leading-none astw:text-muted-foreground", children: ii(i.timestamp) })
|
|
3282
3313
|
]
|
|
3283
3314
|
}
|
|
3284
3315
|
);
|
|
@@ -3286,11 +3317,11 @@ function li({
|
|
|
3286
3317
|
}
|
|
3287
3318
|
);
|
|
3288
3319
|
}
|
|
3289
|
-
const
|
|
3320
|
+
const jl = Object.assign(di, {
|
|
3290
3321
|
Root: Fe,
|
|
3291
3322
|
Items: je,
|
|
3292
3323
|
Item: Ge
|
|
3293
|
-
}),
|
|
3324
|
+
}), ui = "astw:flex astw:size-4 astw:items-center astw:justify-center", wi = () => /* @__PURE__ */ a(
|
|
3294
3325
|
"svg",
|
|
3295
3326
|
{
|
|
3296
3327
|
className: "astw:size-4 astw:animate-spin",
|
|
@@ -3312,18 +3343,18 @@ const Ol = Object.assign(li, {
|
|
|
3312
3343
|
}
|
|
3313
3344
|
)
|
|
3314
3345
|
}
|
|
3315
|
-
),
|
|
3346
|
+
), mi = f(
|
|
3316
3347
|
"astw:flex astw:items-center astw:gap-2 astw:w-full astw:rounded-md astw:px-3 astw:py-2",
|
|
3317
3348
|
"astw:text-sm astw:font-medium astw:transition-colors astw:border astw:border-transparent",
|
|
3318
3349
|
"astw:bg-transparent astw:text-left astw:cursor-pointer astw:[&_svg]:size-4 astw:[&_svg]:shrink-0"
|
|
3319
|
-
),
|
|
3320
|
-
function
|
|
3350
|
+
), pi = "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", fi = "astw:pointer-events-none astw:opacity-50";
|
|
3351
|
+
function hi({ action: t }) {
|
|
3321
3352
|
const { key: e, label: s, icon: n, onClick: r, disabled: o, loading: i } = t, l = !!o || !!i, d = /* @__PURE__ */ c(V, { children: [
|
|
3322
|
-
/* @__PURE__ */ a("span", { className:
|
|
3353
|
+
/* @__PURE__ */ a("span", { className: ui, "aria-hidden": !0, children: i ? /* @__PURE__ */ a(wi, {}) : n }),
|
|
3323
3354
|
/* @__PURE__ */ a("span", { className: "astw:min-w-0 astw:truncate", children: s })
|
|
3324
3355
|
] }), m = f(
|
|
3325
|
-
|
|
3326
|
-
l ?
|
|
3356
|
+
mi,
|
|
3357
|
+
l ? fi : pi
|
|
3327
3358
|
);
|
|
3328
3359
|
return /* @__PURE__ */ a(
|
|
3329
3360
|
"button",
|
|
@@ -3340,8 +3371,8 @@ function pi({ action: t }) {
|
|
|
3340
3371
|
}
|
|
3341
3372
|
);
|
|
3342
3373
|
}
|
|
3343
|
-
function
|
|
3344
|
-
return
|
|
3374
|
+
function Gl({ title: t, actions: e, className: s }) {
|
|
3375
|
+
return Ar(
|
|
3345
3376
|
t,
|
|
3346
3377
|
e.filter((n) => !n.disabled && !n.loading && n.onClick).map((n) => ({
|
|
3347
3378
|
key: n.key,
|
|
@@ -3350,16 +3381,16 @@ function $l({ title: t, actions: e, className: s }) {
|
|
|
3350
3381
|
onSelect: n.onClick
|
|
3351
3382
|
}))
|
|
3352
3383
|
), /* @__PURE__ */ c(Nt.Root, { className: f("astw:min-w-69.5 astw:w-full", s), children: [
|
|
3353
|
-
/* @__PURE__ */ a(Nt.Header, { title: t, className: "astw:
|
|
3354
|
-
/* @__PURE__ */ a(Nt.Content, { 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(
|
|
3384
|
+
/* @__PURE__ */ a(Nt.Header, { title: t, className: "astw:px-8" }),
|
|
3385
|
+
/* @__PURE__ */ a(Nt.Content, { 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(hi, { action: n }) }, n.key)) }) })
|
|
3355
3386
|
] });
|
|
3356
3387
|
}
|
|
3357
|
-
const
|
|
3388
|
+
const gi = "astw:flex astw:size-4 astw:items-center astw:justify-center astw:shrink-0 astw:text-muted-foreground", bi = {
|
|
3358
3389
|
up: "astw:text-green-600 dark:astw:text-green-400",
|
|
3359
3390
|
down: "astw:text-red-600 dark:astw:text-red-400",
|
|
3360
3391
|
neutral: "astw:text-muted-foreground"
|
|
3361
3392
|
};
|
|
3362
|
-
function
|
|
3393
|
+
function Hl({ title: t, value: e, trend: s, description: n, icon: r, className: o }) {
|
|
3363
3394
|
const i = s != null || n != null && n !== "";
|
|
3364
3395
|
return /* @__PURE__ */ c(
|
|
3365
3396
|
Nt.Root,
|
|
@@ -3368,7 +3399,7 @@ function Fl({ title: t, value: e, trend: s, description: n, icon: r, className:
|
|
|
3368
3399
|
className: f("astw:min-w-0 astw:w-full astw:px-4 astw:py-4", o),
|
|
3369
3400
|
children: [
|
|
3370
3401
|
/* @__PURE__ */ c("div", { className: "astw:flex astw:items-center astw:gap-2 astw:mb-6", children: [
|
|
3371
|
-
r != null && /* @__PURE__ */ a("span", { className:
|
|
3402
|
+
r != null && /* @__PURE__ */ a("span", { className: gi, "aria-hidden": !0, children: r }),
|
|
3372
3403
|
/* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-muted-foreground astw:min-w-0 astw:truncate", children: t })
|
|
3373
3404
|
] }),
|
|
3374
3405
|
/* @__PURE__ */ a("div", { className: "astw:text-2xl astw:font-bold astw:tracking-tight astw:break-words", children: e }),
|
|
@@ -3378,7 +3409,7 @@ function Fl({ title: t, value: e, trend: s, description: n, icon: r, className:
|
|
|
3378
3409
|
{
|
|
3379
3410
|
className: f(
|
|
3380
3411
|
"astw:text-sm astw:font-medium",
|
|
3381
|
-
|
|
3412
|
+
bi[s.direction]
|
|
3382
3413
|
),
|
|
3383
3414
|
"data-direction": s.direction,
|
|
3384
3415
|
children: s.value
|
|
@@ -3416,11 +3447,11 @@ function Ke({ title: t, actions: e, children: s }) {
|
|
|
3416
3447
|
] });
|
|
3417
3448
|
}
|
|
3418
3449
|
Ke.displayName = "Layout.Header";
|
|
3419
|
-
const
|
|
3450
|
+
const xi = {
|
|
3420
3451
|
left: "320px",
|
|
3421
3452
|
main: "1fr",
|
|
3422
3453
|
right: "280px"
|
|
3423
|
-
},
|
|
3454
|
+
}, vi = {
|
|
3424
3455
|
2: "1fr 280px",
|
|
3425
3456
|
3: "320px 1fr 280px"
|
|
3426
3457
|
};
|
|
@@ -3436,7 +3467,7 @@ function Bs({ columns: t, className: e, style: s, gap: n, title: r, actions: o,
|
|
|
3436
3467
|
);
|
|
3437
3468
|
const w = l.some((h) => h != null);
|
|
3438
3469
|
let p;
|
|
3439
|
-
u >= 2 && (w ? p = l.map((h) => h ?
|
|
3470
|
+
u >= 2 && (w ? p = l.map((h) => h ? xi[h] : "1fr").join(" ") : p = vi[u] ?? `repeat(${u}, 1fr)`);
|
|
3440
3471
|
const g = n === void 0 || n === 4 ? "astw:gap-4" : n === 6 ? "astw:gap-6" : n === 8 ? "astw:gap-8" : "astw:gap-4", y = !d && (r || o != null && o.length > 0);
|
|
3441
3472
|
return /* @__PURE__ */ c(
|
|
3442
3473
|
"div",
|
|
@@ -3537,7 +3568,7 @@ function Hs({ className: t, ...e }) {
|
|
|
3537
3568
|
{
|
|
3538
3569
|
"data-slot": "table-head",
|
|
3539
3570
|
className: f(
|
|
3540
|
-
"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]",
|
|
3571
|
+
"astw:text-foreground astw:h-10 astw:px-2 astw:first:pl-6 astw:last:pr-6 astw:text-left astw:align-middle astw:font-medium astw:whitespace-nowrap astw:[&:has([role=checkbox])]:pr-0 astw:[&>[role=checkbox]]:translate-y-[2px]",
|
|
3541
3572
|
t
|
|
3542
3573
|
),
|
|
3543
3574
|
...e
|
|
@@ -3551,7 +3582,7 @@ function Ks({ className: t, ...e }) {
|
|
|
3551
3582
|
{
|
|
3552
3583
|
"data-slot": "table-cell",
|
|
3553
3584
|
className: f(
|
|
3554
|
-
"astw:
|
|
3585
|
+
"astw:px-2 astw:py-2 astw:first:pl-6 astw:last:pr-6 astw:align-middle astw:whitespace-nowrap astw:[&:has([role=checkbox])]:pr-0 astw:[&>[role=checkbox]]:translate-y-[2px]",
|
|
3555
3586
|
t
|
|
3556
3587
|
),
|
|
3557
3588
|
...e
|
|
@@ -3570,7 +3601,7 @@ function Us({ className: t, ...e }) {
|
|
|
3570
3601
|
);
|
|
3571
3602
|
}
|
|
3572
3603
|
Us.displayName = "Table.Caption";
|
|
3573
|
-
const
|
|
3604
|
+
const Kl = { Root: Os, Header: $s, Body: Fs, Footer: js, Row: Gs, Head: Hs, Cell: Ks, Caption: Us };
|
|
3574
3605
|
function Ws({
|
|
3575
3606
|
className: t,
|
|
3576
3607
|
children: e,
|
|
@@ -3649,7 +3680,7 @@ function Zs({ ...t }) {
|
|
|
3649
3680
|
return /* @__PURE__ */ a(Rt.Validity, { ...t });
|
|
3650
3681
|
}
|
|
3651
3682
|
Zs.displayName = "Field.Validity";
|
|
3652
|
-
const
|
|
3683
|
+
const Ul = {
|
|
3653
3684
|
Root: Ws,
|
|
3654
3685
|
Label: qs,
|
|
3655
3686
|
Control: Ys,
|
|
@@ -3672,18 +3703,18 @@ function tn({ className: t, ...e }) {
|
|
|
3672
3703
|
);
|
|
3673
3704
|
}
|
|
3674
3705
|
tn.displayName = "Fieldset.Legend";
|
|
3675
|
-
const
|
|
3706
|
+
const Wl = {
|
|
3676
3707
|
Root: Js,
|
|
3677
3708
|
Legend: tn
|
|
3678
3709
|
};
|
|
3679
|
-
function
|
|
3710
|
+
function yi({
|
|
3680
3711
|
className: t,
|
|
3681
3712
|
children: e,
|
|
3682
3713
|
...s
|
|
3683
3714
|
}) {
|
|
3684
|
-
return /* @__PURE__ */ a(
|
|
3715
|
+
return /* @__PURE__ */ a(or, { "data-slot": "form", className: f(t), ...s, children: e });
|
|
3685
3716
|
}
|
|
3686
|
-
|
|
3717
|
+
yi.displayName = "Form";
|
|
3687
3718
|
function en({ children: t, ...e }) {
|
|
3688
3719
|
return /* @__PURE__ */ a(O.Root, { "data-slot": "menu", ...e, children: t });
|
|
3689
3720
|
}
|
|
@@ -3875,7 +3906,7 @@ function hn({
|
|
|
3875
3906
|
);
|
|
3876
3907
|
}
|
|
3877
3908
|
hn.displayName = "Menu.SubmenuTrigger";
|
|
3878
|
-
const
|
|
3909
|
+
const ql = {
|
|
3879
3910
|
Root: en,
|
|
3880
3911
|
Trigger: an,
|
|
3881
3912
|
Content: sn,
|
|
@@ -4008,7 +4039,7 @@ function gn({ className: t, ...e }) {
|
|
|
4008
4039
|
);
|
|
4009
4040
|
}
|
|
4010
4041
|
gn.displayName = "Select.Separator";
|
|
4011
|
-
const
|
|
4042
|
+
const Ni = {
|
|
4012
4043
|
Root: St,
|
|
4013
4044
|
Trigger: Tt,
|
|
4014
4045
|
Value: J,
|
|
@@ -4029,7 +4060,7 @@ function ke(t, e) {
|
|
|
4029
4060
|
return /* @__PURE__ */ a(Ue, { value: s, children: n.render ?? n.label }, n.key ?? n.label);
|
|
4030
4061
|
});
|
|
4031
4062
|
}
|
|
4032
|
-
function
|
|
4063
|
+
function Ci(t) {
|
|
4033
4064
|
const {
|
|
4034
4065
|
items: e,
|
|
4035
4066
|
placeholder: s,
|
|
@@ -4094,7 +4125,7 @@ function bn({ fetcher: t }) {
|
|
|
4094
4125
|
}, []);
|
|
4095
4126
|
return st(() => () => d.current?.abort(), []), { items: e, loading: n, error: o, onOpenChange: m };
|
|
4096
4127
|
}
|
|
4097
|
-
function
|
|
4128
|
+
function Si(t) {
|
|
4098
4129
|
const {
|
|
4099
4130
|
fetcher: e,
|
|
4100
4131
|
placeholder: s,
|
|
@@ -4141,16 +4172,16 @@ function Ni(t) {
|
|
|
4141
4172
|
}
|
|
4142
4173
|
) });
|
|
4143
4174
|
}
|
|
4144
|
-
const
|
|
4145
|
-
Async:
|
|
4146
|
-
Parts:
|
|
4175
|
+
const Yl = Object.assign(Ci, {
|
|
4176
|
+
Async: Si,
|
|
4177
|
+
Parts: Ni,
|
|
4147
4178
|
useAsync: bn
|
|
4148
|
-
}),
|
|
4149
|
-
function
|
|
4150
|
-
return typeof t == "function" ? { fn: t, debounceMs:
|
|
4179
|
+
}), Ti = 300;
|
|
4180
|
+
function ki(t) {
|
|
4181
|
+
return typeof t == "function" ? { fn: t, debounceMs: Ti } : t;
|
|
4151
4182
|
}
|
|
4152
4183
|
function xn({ fetcher: t }) {
|
|
4153
|
-
const { fn: e, debounceMs: s } =
|
|
4184
|
+
const { fn: e, debounceMs: s } = ki(t), [n, r] = E([]), [o, i] = E(!1), [l, d] = E(""), [m, u] = E(void 0), w = j(null), p = j(null), g = j(e);
|
|
4154
4185
|
g.current = e;
|
|
4155
4186
|
const y = I(
|
|
4156
4187
|
(v, C) => {
|
|
@@ -4443,14 +4474,14 @@ function aa({ ...t }) {
|
|
|
4443
4474
|
return /* @__PURE__ */ a(D.Collection, { "data-slot": "combobox-collection", ...t });
|
|
4444
4475
|
}
|
|
4445
4476
|
aa.displayName = "Combobox.Collection";
|
|
4446
|
-
const
|
|
4477
|
+
const Ii = (t) => `Create "${t}"`;
|
|
4447
4478
|
function sa(t) {
|
|
4448
4479
|
const {
|
|
4449
4480
|
items: e,
|
|
4450
4481
|
getLabel: s,
|
|
4451
4482
|
createItem: n,
|
|
4452
4483
|
onItemCreated: r,
|
|
4453
|
-
formatCreateLabel: o =
|
|
4484
|
+
formatCreateLabel: o = Ii
|
|
4454
4485
|
} = t, i = "multiple" in t && t.multiple === !0, [l, d] = E(
|
|
4455
4486
|
() => i ? t.defaultValue ?? [] : t.defaultValue ?? null
|
|
4456
4487
|
), [m, u] = E(""), [w, p] = E(!1), g = l, y = l, h = d, x = d, N = j(null), v = t.onValueChange, C = m.trim(), A = C.toLocaleLowerCase(), T = C !== "" && e.some((L) => s(L).trim().toLocaleLowerCase() === A), b = G(() => w || C === "" || T ? null : { item: n(C), label: C }, [w, C, T, n]), S = G(() => b ? [...e, b.item] : e, [e, b]), H = I(
|
|
@@ -4556,7 +4587,7 @@ function sa(t) {
|
|
|
4556
4587
|
function na(t) {
|
|
4557
4588
|
return xn(t);
|
|
4558
4589
|
}
|
|
4559
|
-
const
|
|
4590
|
+
const Ri = D.useFilter, Ai = {
|
|
4560
4591
|
Root: se,
|
|
4561
4592
|
InputGroup: ne,
|
|
4562
4593
|
Input: Bt,
|
|
@@ -4627,7 +4658,7 @@ function yn(t, e) {
|
|
|
4627
4658
|
return /* @__PURE__ */ a(Ot, { value: s, children: n.render ?? n.label }, n.key ?? n.label);
|
|
4628
4659
|
};
|
|
4629
4660
|
}
|
|
4630
|
-
function
|
|
4661
|
+
function Pi(t) {
|
|
4631
4662
|
const {
|
|
4632
4663
|
items: e,
|
|
4633
4664
|
placeholder: s,
|
|
@@ -4664,7 +4695,7 @@ function Ri(t) {
|
|
|
4664
4695
|
}
|
|
4665
4696
|
);
|
|
4666
4697
|
}
|
|
4667
|
-
function
|
|
4698
|
+
function Li(t) {
|
|
4668
4699
|
const {
|
|
4669
4700
|
items: e,
|
|
4670
4701
|
placeholder: s,
|
|
@@ -4712,10 +4743,10 @@ function Ai(t) {
|
|
|
4712
4743
|
}
|
|
4713
4744
|
);
|
|
4714
4745
|
}
|
|
4715
|
-
function
|
|
4716
|
-
return "onCreateItem" in t ? /* @__PURE__ */ a(
|
|
4746
|
+
function Ei(t) {
|
|
4747
|
+
return "onCreateItem" in t ? /* @__PURE__ */ a(Li, { ...t }) : /* @__PURE__ */ a(Pi, { ...t });
|
|
4717
4748
|
}
|
|
4718
|
-
function
|
|
4749
|
+
function Mi(t) {
|
|
4719
4750
|
const {
|
|
4720
4751
|
fetcher: e,
|
|
4721
4752
|
placeholder: s,
|
|
@@ -4750,7 +4781,7 @@ function Li(t) {
|
|
|
4750
4781
|
}
|
|
4751
4782
|
);
|
|
4752
4783
|
}
|
|
4753
|
-
function
|
|
4784
|
+
function Di(t) {
|
|
4754
4785
|
const {
|
|
4755
4786
|
fetcher: e,
|
|
4756
4787
|
placeholder: s,
|
|
@@ -4803,14 +4834,14 @@ function Ei(t) {
|
|
|
4803
4834
|
}
|
|
4804
4835
|
);
|
|
4805
4836
|
}
|
|
4806
|
-
function
|
|
4807
|
-
return "onCreateItem" in t ? /* @__PURE__ */ a(
|
|
4837
|
+
function zi(t) {
|
|
4838
|
+
return "onCreateItem" in t ? /* @__PURE__ */ a(Di, { ...t }) : /* @__PURE__ */ a(Mi, { ...t });
|
|
4808
4839
|
}
|
|
4809
|
-
const
|
|
4810
|
-
Async:
|
|
4811
|
-
Parts:
|
|
4840
|
+
const Vi = Object.assign(Ei, {
|
|
4841
|
+
Async: zi,
|
|
4842
|
+
Parts: Ai,
|
|
4812
4843
|
useAsync: na,
|
|
4813
|
-
useFilter:
|
|
4844
|
+
useFilter: Ri,
|
|
4814
4845
|
useCreatable: sa
|
|
4815
4846
|
});
|
|
4816
4847
|
function me(t) {
|
|
@@ -5029,7 +5060,7 @@ function Sn(t) {
|
|
|
5029
5060
|
onValueChange: o
|
|
5030
5061
|
};
|
|
5031
5062
|
}
|
|
5032
|
-
const
|
|
5063
|
+
const _i = $.useFilter, Bi = {
|
|
5033
5064
|
Root: me,
|
|
5034
5065
|
Value: Nn,
|
|
5035
5066
|
InputGroup: pe,
|
|
@@ -5136,13 +5167,13 @@ function kn(t) {
|
|
|
5136
5167
|
) });
|
|
5137
5168
|
}
|
|
5138
5169
|
kn.displayName = "Autocomplete.Async";
|
|
5139
|
-
const
|
|
5170
|
+
const Xl = Object.assign(Tn, {
|
|
5140
5171
|
Async: kn,
|
|
5141
|
-
Parts:
|
|
5172
|
+
Parts: Bi,
|
|
5142
5173
|
useAsync: Sn,
|
|
5143
|
-
useFilter:
|
|
5174
|
+
useFilter: _i
|
|
5144
5175
|
});
|
|
5145
|
-
async function
|
|
5176
|
+
async function Oi(t) {
|
|
5146
5177
|
const e = await t.arrayBuffer(), s = new Uint8Array(e), n = xe.detect(s);
|
|
5147
5178
|
if (n && n !== "ASCII" && n !== "UTF8") {
|
|
5148
5179
|
const r = xe.convert(s, {
|
|
@@ -5154,9 +5185,9 @@ async function _i(t) {
|
|
|
5154
5185
|
return new TextDecoder("utf-8").decode(s);
|
|
5155
5186
|
}
|
|
5156
5187
|
async function In(t) {
|
|
5157
|
-
const e = await
|
|
5188
|
+
const e = await Oi(t);
|
|
5158
5189
|
return new Promise((s, n) => {
|
|
5159
|
-
|
|
5190
|
+
ir.parse(e, {
|
|
5160
5191
|
skipEmptyLines: !0,
|
|
5161
5192
|
complete: (r) => {
|
|
5162
5193
|
const o = r.data;
|
|
@@ -5173,7 +5204,7 @@ async function In(t) {
|
|
|
5173
5204
|
});
|
|
5174
5205
|
});
|
|
5175
5206
|
}
|
|
5176
|
-
function
|
|
5207
|
+
function $i(t, e) {
|
|
5177
5208
|
const s = /* @__PURE__ */ new Set();
|
|
5178
5209
|
return t.map((n) => {
|
|
5179
5210
|
const r = n.trim().toLowerCase();
|
|
@@ -5214,7 +5245,7 @@ function Sa(t, e, s, n, r) {
|
|
|
5214
5245
|
});
|
|
5215
5246
|
return { issues: o, parsedRows: d };
|
|
5216
5247
|
}
|
|
5217
|
-
function
|
|
5248
|
+
function Fi(t, e, s) {
|
|
5218
5249
|
const n = e.filter((i) => i.level === "warning"), r = new Set(s.map((i) => i.row)).size, o = new Set(n.map((i) => i.rowIndex)).size;
|
|
5219
5250
|
return {
|
|
5220
5251
|
totalRows: t,
|
|
@@ -5225,7 +5256,7 @@ function Oi(t, e, s) {
|
|
|
5225
5256
|
skippedRows: 0
|
|
5226
5257
|
};
|
|
5227
5258
|
}
|
|
5228
|
-
async function
|
|
5259
|
+
async function ji(t, e, s, n) {
|
|
5229
5260
|
const { headers: r, rows: o } = await In(t), i = /* @__PURE__ */ new Map();
|
|
5230
5261
|
for (let u = 0; u < r.length; u++)
|
|
5231
5262
|
i.set(r[u], u);
|
|
@@ -5255,7 +5286,7 @@ async function $i(t, e, s, n) {
|
|
|
5255
5286
|
})
|
|
5256
5287
|
);
|
|
5257
5288
|
}
|
|
5258
|
-
const
|
|
5289
|
+
const Gi = Ma({
|
|
5259
5290
|
en: {
|
|
5260
5291
|
uploadTitle: "Upload CSV",
|
|
5261
5292
|
uploadDescription: "Select a CSV file to import",
|
|
@@ -5306,10 +5337,10 @@ const Fi = Ma({
|
|
|
5306
5337
|
fileSizeError: "ファイルサイズが上限を超えています",
|
|
5307
5338
|
parseError: "CSVファイルの解析に失敗しました"
|
|
5308
5339
|
}
|
|
5309
|
-
}), be =
|
|
5340
|
+
}), be = Gi.useT, Rn = k.createContext({
|
|
5310
5341
|
current: null
|
|
5311
5342
|
});
|
|
5312
|
-
function
|
|
5343
|
+
function Hi({
|
|
5313
5344
|
items: t,
|
|
5314
5345
|
value: e,
|
|
5315
5346
|
onValueChange: s,
|
|
@@ -5317,7 +5348,7 @@ function ji({
|
|
|
5317
5348
|
}) {
|
|
5318
5349
|
const r = k.useContext(Rn);
|
|
5319
5350
|
return /* @__PURE__ */ a(
|
|
5320
|
-
|
|
5351
|
+
Vi,
|
|
5321
5352
|
{
|
|
5322
5353
|
items: t,
|
|
5323
5354
|
value: e,
|
|
@@ -5327,7 +5358,7 @@ function ji({
|
|
|
5327
5358
|
}
|
|
5328
5359
|
);
|
|
5329
5360
|
}
|
|
5330
|
-
function
|
|
5361
|
+
function Ki({
|
|
5331
5362
|
maxFileSize: t,
|
|
5332
5363
|
schema: e,
|
|
5333
5364
|
onFileSelected: s,
|
|
@@ -5411,7 +5442,7 @@ function Gi({
|
|
|
5411
5442
|
)
|
|
5412
5443
|
] });
|
|
5413
5444
|
}
|
|
5414
|
-
function
|
|
5445
|
+
function Ui({
|
|
5415
5446
|
csvHeaders: t,
|
|
5416
5447
|
rawRows: e,
|
|
5417
5448
|
schema: s,
|
|
@@ -5454,7 +5485,7 @@ function Hi({
|
|
|
5454
5485
|
d.description && /* @__PURE__ */ a("span", { className: "astw:text-xs astw:text-muted-foreground", children: d.description })
|
|
5455
5486
|
] }) }),
|
|
5456
5487
|
/* @__PURE__ */ a("td", { className: "astw:px-3 astw:py-2 astw:align-middle", children: /* @__PURE__ */ a(
|
|
5457
|
-
|
|
5488
|
+
Hi,
|
|
5458
5489
|
{
|
|
5459
5490
|
items: t.filter((g) => !n.some(
|
|
5460
5491
|
(h) => h.csvHeader === g && h.columnKey !== null && h.columnKey !== d.key
|
|
@@ -5473,7 +5504,7 @@ function Hi({
|
|
|
5473
5504
|
}) })
|
|
5474
5505
|
] }) }) });
|
|
5475
5506
|
}
|
|
5476
|
-
function
|
|
5507
|
+
function Wi({
|
|
5477
5508
|
schema: t,
|
|
5478
5509
|
csvHeaders: e,
|
|
5479
5510
|
rawRows: s,
|
|
@@ -5583,7 +5614,7 @@ function Ki({
|
|
|
5583
5614
|
}
|
|
5584
5615
|
);
|
|
5585
5616
|
}
|
|
5586
|
-
function
|
|
5617
|
+
function qi({
|
|
5587
5618
|
fileName: t,
|
|
5588
5619
|
totalRows: e,
|
|
5589
5620
|
correctedRows: s
|
|
@@ -5609,7 +5640,7 @@ function Ui({
|
|
|
5609
5640
|
}
|
|
5610
5641
|
);
|
|
5611
5642
|
}
|
|
5612
|
-
function
|
|
5643
|
+
function Ql({
|
|
5613
5644
|
open: t,
|
|
5614
5645
|
onOpenChange: e,
|
|
5615
5646
|
schema: s,
|
|
@@ -5633,7 +5664,7 @@ function ql({
|
|
|
5633
5664
|
try {
|
|
5634
5665
|
const { headers: M, rows: K } = await In(P);
|
|
5635
5666
|
u(P), p(M), y(K);
|
|
5636
|
-
const F =
|
|
5667
|
+
const F = $i(M, s.columns);
|
|
5637
5668
|
x(F), d("mapping");
|
|
5638
5669
|
} catch {
|
|
5639
5670
|
b(i("parseError"));
|
|
@@ -5715,8 +5746,8 @@ function ql({
|
|
|
5715
5746
|
mappings: h,
|
|
5716
5747
|
corrections: C,
|
|
5717
5748
|
issues: P,
|
|
5718
|
-
summary:
|
|
5719
|
-
buildRows: () =>
|
|
5749
|
+
summary: Fi(g.length, N, C),
|
|
5750
|
+
buildRows: () => ji(m, s, h, C)
|
|
5720
5751
|
};
|
|
5721
5752
|
H(!0);
|
|
5722
5753
|
try {
|
|
@@ -5784,7 +5815,7 @@ function ql({
|
|
|
5784
5815
|
] }),
|
|
5785
5816
|
/* @__PURE__ */ c("div", { className: "astw:flex-1 astw:flex astw:flex-col astw:overflow-y-auto astw:px-6 astw:py-4", children: [
|
|
5786
5817
|
l === "upload" && /* @__PURE__ */ a(
|
|
5787
|
-
|
|
5818
|
+
Ki,
|
|
5788
5819
|
{
|
|
5789
5820
|
maxFileSize: n,
|
|
5790
5821
|
schema: s,
|
|
@@ -5793,7 +5824,7 @@ function ql({
|
|
|
5793
5824
|
}
|
|
5794
5825
|
),
|
|
5795
5826
|
l === "mapping" && /* @__PURE__ */ a(
|
|
5796
|
-
|
|
5827
|
+
Ui,
|
|
5797
5828
|
{
|
|
5798
5829
|
csvHeaders: w,
|
|
5799
5830
|
rawRows: g,
|
|
@@ -5803,7 +5834,7 @@ function ql({
|
|
|
5803
5834
|
}
|
|
5804
5835
|
),
|
|
5805
5836
|
l === "review" && /* @__PURE__ */ a(
|
|
5806
|
-
|
|
5837
|
+
Wi,
|
|
5807
5838
|
{
|
|
5808
5839
|
schema: s,
|
|
5809
5840
|
csvHeaders: w,
|
|
@@ -5817,7 +5848,7 @@ function ql({
|
|
|
5817
5848
|
}
|
|
5818
5849
|
),
|
|
5819
5850
|
l === "complete" && /* @__PURE__ */ a(
|
|
5820
|
-
|
|
5851
|
+
qi,
|
|
5821
5852
|
{
|
|
5822
5853
|
fileName: m?.name ?? "",
|
|
5823
5854
|
totalRows: g.length,
|
|
@@ -5911,8 +5942,8 @@ function ql({
|
|
|
5911
5942
|
function Ta(t) {
|
|
5912
5943
|
return ["upload", "mapping", "review", "complete"].indexOf(t);
|
|
5913
5944
|
}
|
|
5914
|
-
const
|
|
5915
|
-
function
|
|
5945
|
+
const Yi = 10 * 1024 * 1024;
|
|
5946
|
+
function Zl(t) {
|
|
5916
5947
|
const { schema: e, onImport: s, onValidate: n, maxFileSize: r } = t, [o, i] = E(!1);
|
|
5917
5948
|
return { open: I(() => {
|
|
5918
5949
|
i(!0);
|
|
@@ -5920,7 +5951,7 @@ function Yl(t) {
|
|
|
5920
5951
|
open: o,
|
|
5921
5952
|
onOpenChange: i,
|
|
5922
5953
|
schema: e,
|
|
5923
|
-
maxFileSize: r ??
|
|
5954
|
+
maxFileSize: r ?? Yi,
|
|
5924
5955
|
onImport: s,
|
|
5925
5956
|
onValidate: n
|
|
5926
5957
|
} };
|
|
@@ -5934,7 +5965,7 @@ function Q(t) {
|
|
|
5934
5965
|
function Dt(t) {
|
|
5935
5966
|
return { "~standard": { version: 1, vendor: "csv-importer", validate: t } };
|
|
5936
5967
|
}
|
|
5937
|
-
const
|
|
5968
|
+
const Jl = {
|
|
5938
5969
|
/** Pass-through with optional length constraints. `min: 1` serves as a required check. */
|
|
5939
5970
|
string(t) {
|
|
5940
5971
|
return Dt((e) => {
|
|
@@ -5975,64 +6006,64 @@ const Xl = {
|
|
|
5975
6006
|
}
|
|
5976
6007
|
};
|
|
5977
6008
|
export {
|
|
5978
|
-
|
|
5979
|
-
|
|
6009
|
+
Gl as ActionPanel,
|
|
6010
|
+
jl as ActivityCard,
|
|
5980
6011
|
ma as AppShell,
|
|
5981
|
-
|
|
5982
|
-
|
|
6012
|
+
Vl as AuthProvider,
|
|
6013
|
+
Xl as Autocomplete,
|
|
5983
6014
|
Ce as Avatar,
|
|
5984
|
-
|
|
6015
|
+
Fo as Badge,
|
|
5985
6016
|
_t as Button,
|
|
5986
6017
|
Nt as Card,
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
6018
|
+
Vi as Combobox,
|
|
6019
|
+
Al as CommandPalette,
|
|
6020
|
+
Ql as CsvImporter,
|
|
6021
|
+
go as DefaultSidebar,
|
|
6022
|
+
Fl as DescriptionCard,
|
|
5992
6023
|
dt as Dialog,
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
6024
|
+
Ul as Field,
|
|
6025
|
+
Wl as Fieldset,
|
|
6026
|
+
yi as Form,
|
|
6027
|
+
Lr as Input,
|
|
5997
6028
|
Bs as Layout,
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6029
|
+
ac as Link,
|
|
6030
|
+
ql as Menu,
|
|
6031
|
+
Hl as MetricCard,
|
|
6032
|
+
Yl as Select,
|
|
6002
6033
|
X as Sheet,
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6034
|
+
Ll as SidebarGroup,
|
|
6035
|
+
Pl as SidebarItem,
|
|
6036
|
+
Ml as SidebarLayout,
|
|
6037
|
+
El as SidebarSeparator,
|
|
6038
|
+
Kl as Table,
|
|
6008
6039
|
Y as Tooltip,
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6040
|
+
Dl as WithGuard,
|
|
6041
|
+
ri as avatarVariants,
|
|
6042
|
+
Bo as badgeVariants,
|
|
6043
|
+
lr as buttonVariants,
|
|
6044
|
+
zl as createAuthClient,
|
|
6045
|
+
Bl as createTypedPaths,
|
|
6046
|
+
Jl as csv,
|
|
6016
6047
|
Ma as defineI18nLabels,
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6048
|
+
Il as defineModule,
|
|
6049
|
+
Rl as defineResource,
|
|
6050
|
+
Tl as hidden,
|
|
6051
|
+
Sl as pass,
|
|
6052
|
+
kl as redirectTo,
|
|
6022
6053
|
Ea as useAppShell,
|
|
6023
6054
|
ot as useAppShellConfig,
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6055
|
+
Cl as useAppShellData,
|
|
6056
|
+
_o as useAuth,
|
|
6057
|
+
_l as useAuthSuspense,
|
|
6058
|
+
Zl as useCsvImporter,
|
|
6059
|
+
sc as useLocation,
|
|
6060
|
+
nc as useNavigate,
|
|
6061
|
+
$l as useOverrideBreadcrumb,
|
|
6062
|
+
mo as usePageMeta,
|
|
6063
|
+
rc as useParams,
|
|
6064
|
+
Ar as useRegisterCommandPaletteActions,
|
|
6065
|
+
oc as useRouteError,
|
|
6066
|
+
ic as useSearchParams,
|
|
6067
|
+
Tr as useTheme,
|
|
6068
|
+
Ol as useToast
|
|
6038
6069
|
};
|