@middag-io/react 0.27.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/{FormPanelBlock-B7Rc-PLS.js → FormPanelBlock-Cd_uiDze.js} +2 -1
- package/dist-lib/{FormSection-C7bOS9Wy.js → FormSection-B6Tcbwrf.js} +43 -39
- package/dist-lib/base/blocks/DenseTableBlock.d.ts.map +1 -1
- package/dist-lib/base/form/FormField.d.ts.map +1 -1
- package/dist-lib/base/form/fields/EntityPickerField.d.ts +3 -1
- package/dist-lib/base/form/fields/EntityPickerField.d.ts.map +1 -1
- package/dist-lib/base/partials/DataTable/index.d.ts.map +1 -1
- package/dist-lib/base/shell/BasicShell.d.ts.map +1 -1
- package/dist-lib/middag-react.css +1 -1
- package/dist-lib/middag-react.js +683 -629
- package/package.json +1 -1
package/dist-lib/middag-react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as e, r as t, t as n } from "./utils-Yj2czlvU.js";
|
|
2
|
-
import { $ as r, A as i, B as a, C as o, D as s, E as c, F as l, G as u, H as d, I as f, J as p, K as m, L as h, M as g, N as _, O as v, P as y, Q as b, R as x, S as ee, U as S, V as C, W as te, X as ne, Y as w, Z as T, _ as re, a as ie, at as E, b as ae, c as oe, ct as D, d as se, dt as O, et as k, f as ce, ft as A, g as le, h as ue, i as de, it as fe, j as pe, k as me, l as he, lt as ge, m as _e, n as j, nt as ve, o as ye, ot as be, p as xe, pt as M, q as Se, r as Ce, rt as we, s as Te, st as Ee, t as De, tt as Oe, u as ke, ut as N, v as Ae, w as je, x as Me, y as Ne, z as Pe } from "./FormSection-
|
|
2
|
+
import { $ as r, A as i, B as a, C as o, D as s, E as c, F as l, G as u, H as d, I as f, J as p, K as m, L as h, M as g, N as _, O as v, P as y, Q as b, R as x, S as ee, U as S, V as C, W as te, X as ne, Y as w, Z as T, _ as re, a as ie, at as E, b as ae, c as oe, ct as D, d as se, dt as O, et as k, f as ce, ft as A, g as le, h as ue, i as de, it as fe, j as pe, k as me, l as he, lt as ge, m as _e, n as j, nt as ve, o as ye, ot as be, p as xe, pt as M, q as Se, r as Ce, rt as we, s as Te, st as Ee, t as De, tt as Oe, u as ke, ut as N, v as Ae, w as je, x as Me, y as Ne, z as Pe } from "./FormSection-B6Tcbwrf.js";
|
|
3
3
|
import { c as Fe, d as Ie, f as Le, g as Re, i as ze, l as Be, m as Ve, o as P, p as He, r as Ue, t as F, u as We } from "./button-Ba1PcsOx.js";
|
|
4
4
|
import { $ as Ge, Q as Ke } from "./combobox-BbYGWCFO.js";
|
|
5
5
|
import { t as qe } from "./chevron-right-Casn6MFU.js";
|
|
@@ -6116,7 +6116,11 @@ function wd({ columns: e, rows: t, rowKey: r, pagination: i, sort: a, filters: o
|
|
|
6116
6116
|
manualSorting: !w,
|
|
6117
6117
|
enableRowSelection: !!ye || !!C,
|
|
6118
6118
|
enableGlobalFilter: w,
|
|
6119
|
-
globalFilterFn:
|
|
6119
|
+
globalFilterFn: (e, t, n) => {
|
|
6120
|
+
if (n == null || n === "") return !0;
|
|
6121
|
+
let r = String(n).toLowerCase(), i = (e) => e == null ? "" : Array.isArray(e) ? e.map(i).join(" ") : typeof e == "object" ? Object.entries(e).filter(([e]) => e !== "href" && e !== "url").map(([, e]) => i(e)).join(" ") : String(e);
|
|
6122
|
+
return i(e.original).toLowerCase().includes(r);
|
|
6123
|
+
},
|
|
6120
6124
|
onSortingChange: ve,
|
|
6121
6125
|
onRowSelectionChange: ce,
|
|
6122
6126
|
onColumnVisibilityChange: ue,
|
|
@@ -6450,16 +6454,16 @@ function Td(e, t) {
|
|
|
6450
6454
|
//#endregion
|
|
6451
6455
|
//#region src/base/blocks/DenseTableBlock.tsx
|
|
6452
6456
|
function Ed({ block: e }) {
|
|
6453
|
-
let { t } = I(), { data: n, key: r, meta: i } = e, a = i?.loading === !0, o = i?.clientSide === !0, s = i?.rowKey ?? "id", u = i?.partialReloadKey ?? r, { select:
|
|
6457
|
+
let { t } = I(), { data: n, key: r, meta: i } = e, a = i?.loading === !0, o = i?.clientSide === !0, s = i?.rowKey ?? "id", u = i?.partialReloadKey ?? r, d = o && typeof window < "u" ? new URLSearchParams(window.location.search).get("search") ?? "" : "", { select: f, selectedId: p, enabled: m } = hl();
|
|
6454
6458
|
xl(e.poll);
|
|
6455
|
-
let [
|
|
6459
|
+
let [h, g] = U(null), _ = (e.poll?.intervalMs ?? 0) > 0, v = Yn(_);
|
|
6456
6460
|
H(() => {
|
|
6457
|
-
|
|
6458
|
-
}, [
|
|
6459
|
-
let
|
|
6460
|
-
if (
|
|
6461
|
+
v.current && !_ && h?.waiting && g(null), v.current = _;
|
|
6462
|
+
}, [_, h?.waiting]);
|
|
6463
|
+
let y = V((e) => {
|
|
6464
|
+
if (m) {
|
|
6461
6465
|
let t = e.id ?? e[s];
|
|
6462
|
-
t != null &&
|
|
6466
|
+
t != null && f(t);
|
|
6463
6467
|
return;
|
|
6464
6468
|
}
|
|
6465
6469
|
if (n.rowHref) {
|
|
@@ -6467,24 +6471,24 @@ function Ed({ block: e }) {
|
|
|
6467
6471
|
W.visit(t);
|
|
6468
6472
|
}
|
|
6469
6473
|
}, [
|
|
6470
|
-
|
|
6474
|
+
m,
|
|
6471
6475
|
s,
|
|
6472
|
-
|
|
6476
|
+
f,
|
|
6473
6477
|
n.rowHref
|
|
6474
6478
|
]);
|
|
6475
6479
|
H(() => {
|
|
6476
|
-
if (
|
|
6480
|
+
if (m && n.rows.length > 0 && p == null) {
|
|
6477
6481
|
let e = n.rows[0], t = e.id ?? e[s];
|
|
6478
|
-
t != null &&
|
|
6482
|
+
t != null && f(t);
|
|
6479
6483
|
}
|
|
6480
6484
|
}, [
|
|
6481
|
-
|
|
6485
|
+
m,
|
|
6482
6486
|
n.rows,
|
|
6483
6487
|
s,
|
|
6484
|
-
|
|
6485
|
-
|
|
6488
|
+
f,
|
|
6489
|
+
p
|
|
6486
6490
|
]);
|
|
6487
|
-
let
|
|
6491
|
+
let b = V((e) => {
|
|
6488
6492
|
let t = {};
|
|
6489
6493
|
e.page !== void 0 && (t.page = e.page), e.perPage !== void 0 && (t.per_page = e.perPage), e.sort?.key && (t.sort = e.sort.key, t.direction = e.sort.direction), e.search !== void 0 && (t.search = e.search), e.filters && Object.entries(e.filters).forEach(([e, n]) => {
|
|
6490
6494
|
t[`filter[${e}]`] = Array.isArray(n) ? n.join(",") : n;
|
|
@@ -6493,7 +6497,7 @@ function Ed({ block: e }) {
|
|
|
6493
6497
|
preserveScroll: !0,
|
|
6494
6498
|
only: [u]
|
|
6495
6499
|
});
|
|
6496
|
-
}, [u]),
|
|
6500
|
+
}, [u]), x = V((e, t) => {
|
|
6497
6501
|
let r = n.bulkActions?.find((t) => t.id === e);
|
|
6498
6502
|
if (!r) return;
|
|
6499
6503
|
let i = Zc(r);
|
|
@@ -6501,7 +6505,7 @@ function Ed({ block: e }) {
|
|
|
6501
6505
|
preserveState: !0,
|
|
6502
6506
|
only: [u]
|
|
6503
6507
|
});
|
|
6504
|
-
}, [u, n.bulkActions]),
|
|
6508
|
+
}, [u, n.bulkActions]), ee = n.columns.map((e) => ({
|
|
6505
6509
|
key: e.key,
|
|
6506
6510
|
label: l(e.label, t),
|
|
6507
6511
|
type: e.variant === "badge" ? "status" : e.variant ?? "text",
|
|
@@ -6511,10 +6515,10 @@ function Ed({ block: e }) {
|
|
|
6511
6515
|
href: e.href,
|
|
6512
6516
|
entityType: e.entity?.type,
|
|
6513
6517
|
entityIdField: e.entity?.id
|
|
6514
|
-
})),
|
|
6518
|
+
})), S = n.sort?.column ? {
|
|
6515
6519
|
key: n.sort.column,
|
|
6516
6520
|
direction: n.sort.direction ?? "asc"
|
|
6517
|
-
} : void 0,
|
|
6521
|
+
} : void 0, C = n.rowActions?.map((e) => {
|
|
6518
6522
|
let n = Zc(e);
|
|
6519
6523
|
return {
|
|
6520
6524
|
id: e.id,
|
|
@@ -6525,7 +6529,7 @@ function Ed({ block: e }) {
|
|
|
6525
6529
|
onAction: (t) => {
|
|
6526
6530
|
let r = Td(n.url, t);
|
|
6527
6531
|
if (e.confirmation) {
|
|
6528
|
-
|
|
6532
|
+
g({
|
|
6529
6533
|
open: !0,
|
|
6530
6534
|
confirmation: e.confirmation,
|
|
6531
6535
|
row: t,
|
|
@@ -6551,39 +6555,40 @@ function Ed({ block: e }) {
|
|
|
6551
6555
|
if (e.disabled_reason_field) return String(t[e.disabled_reason_field] ?? "") || void 0;
|
|
6552
6556
|
}
|
|
6553
6557
|
};
|
|
6554
|
-
}),
|
|
6555
|
-
if (!
|
|
6556
|
-
let { href: e, method: t, isNavigation: n, confirmation: r } =
|
|
6557
|
-
r.waitForPolling ?
|
|
6558
|
+
}), te = V(() => {
|
|
6559
|
+
if (!h) return;
|
|
6560
|
+
let { href: e, method: t, isNavigation: n, confirmation: r } = h;
|
|
6561
|
+
r.waitForPolling ? g((e) => e ? {
|
|
6558
6562
|
...e,
|
|
6559
6563
|
waiting: !0
|
|
6560
|
-
} : null) :
|
|
6564
|
+
} : null) : g(null), e && (n ? W.visit(e) : t === "delete" ? W.delete(e, {
|
|
6561
6565
|
preserveState: !0,
|
|
6562
6566
|
only: [u]
|
|
6563
6567
|
}) : W[t ?? "post"](e, {}, {
|
|
6564
6568
|
preserveState: !0,
|
|
6565
6569
|
only: [u]
|
|
6566
6570
|
}));
|
|
6567
|
-
}, [
|
|
6568
|
-
|
|
6571
|
+
}, [h, u]), ne = V(() => {
|
|
6572
|
+
g(null);
|
|
6569
6573
|
}, []);
|
|
6570
6574
|
return /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(wd, {
|
|
6571
|
-
columns:
|
|
6575
|
+
columns: ee,
|
|
6572
6576
|
rows: n.rows,
|
|
6573
6577
|
rowKey: s,
|
|
6574
6578
|
pagination: n.pagination ? {
|
|
6575
6579
|
...n.pagination,
|
|
6576
6580
|
page: Math.max(0, n.pagination.page - 1)
|
|
6577
6581
|
} : void 0,
|
|
6578
|
-
sort:
|
|
6582
|
+
sort: S,
|
|
6579
6583
|
filters: n.filters?.available,
|
|
6580
6584
|
appliedFilters: n.filters?.applied,
|
|
6581
|
-
rowActions:
|
|
6585
|
+
rowActions: C,
|
|
6582
6586
|
actionsAlwaysVisible: i?.actionsAlwaysVisible === !0,
|
|
6583
6587
|
bulkActions: n.bulkActions,
|
|
6584
|
-
onRowClick:
|
|
6585
|
-
selectedRowKey:
|
|
6588
|
+
onRowClick: m || n.rowHref ? y : void 0,
|
|
6589
|
+
selectedRowKey: m && p ? String(p) : void 0,
|
|
6586
6590
|
isLoading: a,
|
|
6591
|
+
searchValue: d,
|
|
6587
6592
|
searchPlaceholder: n.searchPlaceholder,
|
|
6588
6593
|
emptyStateIcon: n.emptyState?.icon,
|
|
6589
6594
|
emptyStateTitle: n.emptyState?.title,
|
|
@@ -6592,22 +6597,22 @@ function Ed({ block: e }) {
|
|
|
6592
6597
|
label: n.emptyState.cta.label,
|
|
6593
6598
|
href: n.emptyState.cta.href
|
|
6594
6599
|
} : void 0,
|
|
6595
|
-
onParamChange: o ? void 0 :
|
|
6596
|
-
onBulkAction:
|
|
6600
|
+
onParamChange: o ? void 0 : b,
|
|
6601
|
+
onBulkAction: x,
|
|
6597
6602
|
remember: e.remember ?? !1,
|
|
6598
6603
|
rememberKey: r,
|
|
6599
6604
|
clientSide: o
|
|
6600
|
-
}),
|
|
6601
|
-
open:
|
|
6602
|
-
onClose:
|
|
6603
|
-
onConfirm:
|
|
6604
|
-
title: l(
|
|
6605
|
-
message: Td(l(
|
|
6606
|
-
intent:
|
|
6607
|
-
confirmLabel: l(
|
|
6608
|
-
cancelLabel: l(
|
|
6609
|
-
waiting:
|
|
6610
|
-
waitingMessage:
|
|
6605
|
+
}), h && /* @__PURE__ */ K(zc, {
|
|
6606
|
+
open: h.open,
|
|
6607
|
+
onClose: ne,
|
|
6608
|
+
onConfirm: te,
|
|
6609
|
+
title: l(h.confirmation.title, t),
|
|
6610
|
+
message: Td(l(h.confirmation.message, t), h.row),
|
|
6611
|
+
intent: h.confirmation.intent,
|
|
6612
|
+
confirmLabel: l(h.confirmation.confirmLabel, t) || void 0,
|
|
6613
|
+
cancelLabel: l(h.confirmation.cancelLabel, t) || void 0,
|
|
6614
|
+
waiting: h.waiting,
|
|
6615
|
+
waitingMessage: h.confirmation.waitingMessage
|
|
6611
6616
|
})] });
|
|
6612
6617
|
}
|
|
6613
6618
|
//#endregion
|
|
@@ -6747,7 +6752,7 @@ function jd({ block: e }) {
|
|
|
6747
6752
|
}
|
|
6748
6753
|
//#endregion
|
|
6749
6754
|
//#region src/base/blocks/FormPanelBlock.lazy.tsx
|
|
6750
|
-
var Md = Un(() => import("./FormPanelBlock-
|
|
6755
|
+
var Md = Un(() => import("./FormPanelBlock-Cd_uiDze.js").then((e) => ({ default: e.FormPanelBlock })));
|
|
6751
6756
|
function Nd() {
|
|
6752
6757
|
return /* @__PURE__ */ q("div", {
|
|
6753
6758
|
className: "mx-auto max-w-[720px] space-y-6",
|
|
@@ -8894,13 +8899,51 @@ function Em({ node: e, activeKey: t }) {
|
|
|
8894
8899
|
})
|
|
8895
8900
|
}) });
|
|
8896
8901
|
}
|
|
8897
|
-
function Dm({
|
|
8902
|
+
function Dm({ auth: e, logoutUrl: t, csrfToken: n }) {
|
|
8903
|
+
let r = e.name.split(/\s+/).filter(Boolean).slice(0, 2).map((e) => e[0]?.toUpperCase() ?? "").join("") || "?";
|
|
8904
|
+
return /* @__PURE__ */ q(Zu, { children: [/* @__PURE__ */ K($u, {
|
|
8905
|
+
asChild: !0,
|
|
8906
|
+
children: /* @__PURE__ */ K("button", {
|
|
8907
|
+
type: "button",
|
|
8908
|
+
className: "focus-visible:ring-ring rounded-full transition-opacity hover:opacity-80 focus-visible:ring-2 focus-visible:outline-none",
|
|
8909
|
+
"aria-label": e.name,
|
|
8910
|
+
children: /* @__PURE__ */ q(Ne, {
|
|
8911
|
+
className: "size-8",
|
|
8912
|
+
children: [e.avatarUrl ? /* @__PURE__ */ K(Me, {
|
|
8913
|
+
src: e.avatarUrl,
|
|
8914
|
+
alt: e.name
|
|
8915
|
+
}) : null, /* @__PURE__ */ K(ae, {
|
|
8916
|
+
className: "text-xs",
|
|
8917
|
+
children: r
|
|
8918
|
+
})]
|
|
8919
|
+
})
|
|
8920
|
+
})
|
|
8921
|
+
}), /* @__PURE__ */ q(ed, {
|
|
8922
|
+
align: "end",
|
|
8923
|
+
className: "w-56",
|
|
8924
|
+
children: [/* @__PURE__ */ K(od, { children: /* @__PURE__ */ q("div", {
|
|
8925
|
+
className: "flex min-w-0 flex-col",
|
|
8926
|
+
children: [/* @__PURE__ */ K("span", {
|
|
8927
|
+
className: "truncate text-sm font-medium",
|
|
8928
|
+
children: e.name
|
|
8929
|
+
}), e.email ? /* @__PURE__ */ K("span", {
|
|
8930
|
+
className: "text-muted-foreground truncate text-xs font-normal",
|
|
8931
|
+
children: e.email
|
|
8932
|
+
}) : null]
|
|
8933
|
+
}) }), t ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(sd, {}), /* @__PURE__ */ K(nd, {
|
|
8934
|
+
className: "text-destructive focus:text-destructive",
|
|
8935
|
+
onSelect: () => W.post(t, n ? { _token: n } : {}),
|
|
8936
|
+
children: "Sign out"
|
|
8937
|
+
})] }) : null]
|
|
8938
|
+
})] });
|
|
8939
|
+
}
|
|
8940
|
+
function Om({ children: e }) {
|
|
8898
8941
|
let { t } = I(), { props: n } = tr(), r = qf(), i = n.navigation ?? Tm, a = n.contract?.page ?? {
|
|
8899
8942
|
key: "unknown",
|
|
8900
8943
|
title: "",
|
|
8901
8944
|
breadcrumbs: [],
|
|
8902
8945
|
actions: []
|
|
8903
|
-
};
|
|
8946
|
+
}, o = n.auth, s = a.actions ?? [], c = n.logoutUrl, u = n.csrf_token;
|
|
8904
8947
|
return /* @__PURE__ */ q(Mp, { children: [
|
|
8905
8948
|
/* @__PURE__ */ q(Np, {
|
|
8906
8949
|
collapsible: "offcanvas",
|
|
@@ -8951,30 +8994,41 @@ function Dm({ children: e }) {
|
|
|
8951
8994
|
}),
|
|
8952
8995
|
/* @__PURE__ */ q(Ip, { children: [/* @__PURE__ */ q("header", {
|
|
8953
8996
|
className: "border-border flex h-14 shrink-0 items-center gap-3 border-b px-4",
|
|
8954
|
-
children: [
|
|
8955
|
-
className: "
|
|
8956
|
-
|
|
8957
|
-
"
|
|
8958
|
-
|
|
8959
|
-
|
|
8960
|
-
className: "flex items-center gap-1",
|
|
8961
|
-
children:
|
|
8962
|
-
"
|
|
8963
|
-
children: "
|
|
8964
|
-
|
|
8965
|
-
|
|
8966
|
-
|
|
8967
|
-
|
|
8968
|
-
|
|
8969
|
-
|
|
8970
|
-
|
|
8971
|
-
|
|
8972
|
-
|
|
8973
|
-
|
|
8974
|
-
|
|
8975
|
-
|
|
8976
|
-
|
|
8977
|
-
|
|
8997
|
+
children: [
|
|
8998
|
+
/* @__PURE__ */ K(Pp, { className: "text-muted-foreground hover:text-foreground" }),
|
|
8999
|
+
/* @__PURE__ */ q("div", {
|
|
9000
|
+
className: "flex min-w-0 flex-col",
|
|
9001
|
+
children: [a.breadcrumbs && a.breadcrumbs.length > 0 && /* @__PURE__ */ K("nav", {
|
|
9002
|
+
"aria-label": "Breadcrumb",
|
|
9003
|
+
className: "text-muted-foreground flex items-center gap-1 text-xs",
|
|
9004
|
+
children: a.breadcrumbs.map((e, n) => /* @__PURE__ */ q("span", {
|
|
9005
|
+
className: "flex items-center gap-1",
|
|
9006
|
+
children: [n > 0 && /* @__PURE__ */ K("span", {
|
|
9007
|
+
"aria-hidden": "true",
|
|
9008
|
+
children: "/"
|
|
9009
|
+
}), e.href ? /* @__PURE__ */ K(Qn, {
|
|
9010
|
+
href: e.href,
|
|
9011
|
+
className: "hover:text-foreground truncate",
|
|
9012
|
+
children: l(e.label, t)
|
|
9013
|
+
}) : /* @__PURE__ */ K("span", {
|
|
9014
|
+
className: "truncate",
|
|
9015
|
+
children: l(e.label, t)
|
|
9016
|
+
})]
|
|
9017
|
+
}, `${e.label}-${n}`))
|
|
9018
|
+
}), a.title && /* @__PURE__ */ K("span", {
|
|
9019
|
+
className: "text-foreground truncate text-sm font-medium",
|
|
9020
|
+
children: l(a.title, t)
|
|
9021
|
+
})]
|
|
9022
|
+
}),
|
|
9023
|
+
(s.length > 0 || o?.name) && /* @__PURE__ */ q("div", {
|
|
9024
|
+
className: "ml-auto flex shrink-0 items-center gap-2",
|
|
9025
|
+
children: [s.map((e, t) => /* @__PURE__ */ K(Sf, { action: e }, e.id ?? t)), o?.name ? /* @__PURE__ */ K(Dm, {
|
|
9026
|
+
auth: o,
|
|
9027
|
+
logoutUrl: c,
|
|
9028
|
+
csrfToken: u
|
|
9029
|
+
}) : null]
|
|
9030
|
+
})
|
|
9031
|
+
]
|
|
8978
9032
|
}), /* @__PURE__ */ K("main", {
|
|
8979
9033
|
id: "middag-main-content",
|
|
8980
9034
|
className: "flex min-h-0 flex-1 flex-col overflow-auto",
|
|
@@ -8990,7 +9044,7 @@ function Dm({ children: e }) {
|
|
|
8990
9044
|
}
|
|
8991
9045
|
//#endregion
|
|
8992
9046
|
//#region src/base/shell/ImmersiveShell.tsx
|
|
8993
|
-
function
|
|
9047
|
+
function km({ children: e }) {
|
|
8994
9048
|
let { t } = I(), { props: n } = tr(), r = n.contract?.page ?? {
|
|
8995
9049
|
key: "unknown",
|
|
8996
9050
|
title: "",
|
|
@@ -9038,19 +9092,19 @@ function Om({ children: e }) {
|
|
|
9038
9092
|
}
|
|
9039
9093
|
//#endregion
|
|
9040
9094
|
//#region src/base/utils/register-default-icons.ts
|
|
9041
|
-
var
|
|
9042
|
-
function
|
|
9043
|
-
|
|
9095
|
+
var Am = !1;
|
|
9096
|
+
function jm() {
|
|
9097
|
+
Am || (Am = !0, k("inbox", Yt), k("square", ft), k("arrow-up", qt), k("arrow-down", rt), k("arrow-right", rn), k("check-circle", Bt), k("check", Rt), k("circle-x", st), k("alert-circle", Qt), k("search", kt), k("menu", on), k("settings", Lt), k("settings-2", Kt), k("plug", lt), k("filter", Dt), k("layout-dashboard", Wt), k("dashboard", Wt), k("puzzle", sn), k("git-branch", Ct), k("shield", nn), k("lock", Pt), k("users", Mt), k("user", tt), k("chart", St), k("calendar", _t), k("mail", yt), k("bell", Ft), k("cloud", xt), k("link", wt), k("workflow", at), k("database", nt), k("code", At), k("file-export", ct), k("tag", jt), k("layers", an), k("segment", Dt), k("edit", Et), k("delete", Ut), k("trash", Ut), k("copy", ut), k("view", ot), k("eye", ot), k("download", dt), k("upload", Ze), k("refresh", ht), k("clock", et), k("star", Xt), k("folder", Ot), k("file", It), k("globe", cn), k("more-horizontal", Nt), k("external-link", cn), k("sliders-horizontal", Dt), k("home", bt), k("shopping-cart", Gt), k("zap", Jt), k("graduation-cap", mt), k("wrench", Ht), k("terminal", vt), k("target", Zt), k("pie-chart", pt), k("activity", zt), k("monitor", it), k("file-text", It), k("rss", Vt), k("help-circle", $t), r("connector", lt), r("workflow", at), r("segment", Dt), r("instancegroup", an), r("condition", Ct), r("compliance", nn), r("offering", jt), r("order", Gt), r("course", mt), r("form", It), r("certificate", ct));
|
|
9044
9098
|
}
|
|
9045
9099
|
//#endregion
|
|
9046
9100
|
//#region src/app/register-defaults.ts
|
|
9047
|
-
var
|
|
9048
|
-
function
|
|
9049
|
-
|
|
9101
|
+
var Mm = !1;
|
|
9102
|
+
function Nm() {
|
|
9103
|
+
Mm || (Mm = !0, br("basic", Om), br("immersive", km), xr("stack", uf), xr("sidebar", lf), xr("dashboard", sf), xr("wizard", Cf), Sr("dense_table", Ed), Sr("empty_state", jd), Sr("metric_card", Kd), Sr("status_strip", Zd), Sr("detail_panel", Dd), Sr("activity_timeline", pl), Sr("markdown_panel", Rd), Sr("card_grid", gl), Sr("action_grid", Qc), Sr("link_list", Fd), Sr("tabbed_panel", $d), Sr("workflow_progress", ef), Sr("form_panel", Pd), nf(), jm(), Bf());
|
|
9050
9104
|
}
|
|
9051
9105
|
//#endregion
|
|
9052
9106
|
//#region src/app/HostSlot.tsx
|
|
9053
|
-
function
|
|
9107
|
+
function Pm(e) {
|
|
9054
9108
|
let t = document.querySelector(e), n = /* @__PURE__ */ new Set();
|
|
9055
9109
|
return {
|
|
9056
9110
|
subscribe: (r) => {
|
|
@@ -9069,13 +9123,13 @@ function Nm(e) {
|
|
|
9069
9123
|
getSnapshot: () => t
|
|
9070
9124
|
};
|
|
9071
9125
|
}
|
|
9072
|
-
function
|
|
9073
|
-
let r = Jn(() =>
|
|
9126
|
+
function Fm({ selector: e, children: t, fallback: n = !1 }) {
|
|
9127
|
+
let r = Jn(() => Pm(e), [e]), i = Xn(r.subscribe, r.getSnapshot);
|
|
9074
9128
|
return i ? ar(t, i) : n ? /* @__PURE__ */ K(G, { children: t }) : null;
|
|
9075
9129
|
}
|
|
9076
9130
|
//#endregion
|
|
9077
9131
|
//#region src/base/partials/ActionBar/index.tsx
|
|
9078
|
-
function
|
|
9132
|
+
function Im({ selectedCount: e, totalCount: t, actions: n, onAction: r, onSelectAll: i, isLoading: a }) {
|
|
9079
9133
|
let { t: o } = I(), [s, c] = U(null), u = (e) => {
|
|
9080
9134
|
e.confirmation ? c(e) : r(e.id);
|
|
9081
9135
|
}, d = s ? l(s.confirmation?.message, o) || o("middag.ui.actionbar.confirm_bulk").replace("{label}", l(s.label, o)).replace("{count}", String(e)).replace("{items}", o(e === 1 ? "middag.ui.actionbar.item_one" : "middag.ui.actionbar.item_other")) : "";
|
|
@@ -9120,7 +9174,7 @@ function Fm({ selectedCount: e, totalCount: t, actions: n, onAction: r, onSelect
|
|
|
9120
9174
|
}
|
|
9121
9175
|
//#endregion
|
|
9122
9176
|
//#region src/components/reui/frame.tsx
|
|
9123
|
-
var
|
|
9177
|
+
var Lm = Ve([
|
|
9124
9178
|
"relative flex flex-col bg-muted/50 gap-0.75 p-0.75 rounded-(--frame-radius)",
|
|
9125
9179
|
"[--frame-radius:var(--radius-2xl)]",
|
|
9126
9180
|
"[--frame-panel-bg:var(--color-card)] [--frame-panel-border-color:var(--color-border)] [--frame-border-color:var(--color-border)]"
|
|
@@ -9163,9 +9217,9 @@ var Im = Ve([
|
|
|
9163
9217
|
dense: !1
|
|
9164
9218
|
}
|
|
9165
9219
|
});
|
|
9166
|
-
function
|
|
9220
|
+
function Rm({ className: e, variant: t, spacing: r, stacked: i, dense: a, ...o }) {
|
|
9167
9221
|
return /* @__PURE__ */ K("div", {
|
|
9168
|
-
className: n(
|
|
9222
|
+
className: n(Lm({
|
|
9169
9223
|
variant: t,
|
|
9170
9224
|
spacing: r,
|
|
9171
9225
|
stacked: i,
|
|
@@ -9176,21 +9230,21 @@ function Lm({ className: e, variant: t, spacing: r, stacked: i, dense: a, ...o }
|
|
|
9176
9230
|
...o
|
|
9177
9231
|
});
|
|
9178
9232
|
}
|
|
9179
|
-
function
|
|
9233
|
+
function zm({ className: e, fit: t, ...r }) {
|
|
9180
9234
|
return /* @__PURE__ */ K("div", {
|
|
9181
9235
|
className: n("relative grow overflow-hidden rounded-(--frame-radius) border border-(--frame-panel-border-color) bg-(--frame-panel-bg) bg-clip-padding shadow-xs", "before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--frame-radius)-1px)] before:shadow-black/5", "dark:bg-clip-border dark:before:shadow-white/5", "p-(--frame-panel-p)", e),
|
|
9182
9236
|
"data-slot": "frame-panel",
|
|
9183
9237
|
...r
|
|
9184
9238
|
});
|
|
9185
9239
|
}
|
|
9186
|
-
function
|
|
9240
|
+
function Bm({ className: e, ...t }) {
|
|
9187
9241
|
return /* @__PURE__ */ K("header", {
|
|
9188
9242
|
className: n("flex flex-col px-(--frame-panel-header-px) py-(--frame-panel-header-py)", e),
|
|
9189
9243
|
"data-slot": "frame-panel-header",
|
|
9190
9244
|
...t
|
|
9191
9245
|
});
|
|
9192
9246
|
}
|
|
9193
|
-
function
|
|
9247
|
+
function Vm({ className: e, ...t }) {
|
|
9194
9248
|
return /* @__PURE__ */ K("div", {
|
|
9195
9249
|
className: n("text-sm font-semibold", e),
|
|
9196
9250
|
"data-slot": "frame-panel-title",
|
|
@@ -9199,7 +9253,7 @@ function Bm({ className: e, ...t }) {
|
|
|
9199
9253
|
}
|
|
9200
9254
|
//#endregion
|
|
9201
9255
|
//#region src/base/partials/DetailSection/index.tsx
|
|
9202
|
-
var
|
|
9256
|
+
var Hm = {
|
|
9203
9257
|
active: "success-light",
|
|
9204
9258
|
connected: "success-light",
|
|
9205
9259
|
healthy: "success-light",
|
|
@@ -9213,10 +9267,10 @@ var Vm = {
|
|
|
9213
9267
|
inactive: "outline",
|
|
9214
9268
|
unknown: "outline"
|
|
9215
9269
|
};
|
|
9216
|
-
function
|
|
9217
|
-
return
|
|
9270
|
+
function Um(e) {
|
|
9271
|
+
return Hm[e.toLowerCase()] ?? "outline";
|
|
9218
9272
|
}
|
|
9219
|
-
function
|
|
9273
|
+
function Wm({ text: e }) {
|
|
9220
9274
|
let { t } = I(), [r, i] = U(!1);
|
|
9221
9275
|
return /* @__PURE__ */ K("button", {
|
|
9222
9276
|
type: "button",
|
|
@@ -9232,7 +9286,7 @@ function Um({ text: e }) {
|
|
|
9232
9286
|
})
|
|
9233
9287
|
});
|
|
9234
9288
|
}
|
|
9235
|
-
function
|
|
9289
|
+
function Gm({ field: e }) {
|
|
9236
9290
|
let { t, locale: n } = I(), { value: r, kind: i = "text", href: a } = e;
|
|
9237
9291
|
if (r == null) return /* @__PURE__ */ K("span", {
|
|
9238
9292
|
className: "text-muted-foreground",
|
|
@@ -9240,7 +9294,7 @@ function Wm({ field: e }) {
|
|
|
9240
9294
|
});
|
|
9241
9295
|
switch (i) {
|
|
9242
9296
|
case "status": return /* @__PURE__ */ K(f, {
|
|
9243
|
-
variant:
|
|
9297
|
+
variant: Um(String(r)),
|
|
9244
9298
|
size: "sm",
|
|
9245
9299
|
children: String(r)
|
|
9246
9300
|
});
|
|
@@ -9285,12 +9339,12 @@ function Wm({ field: e }) {
|
|
|
9285
9339
|
});
|
|
9286
9340
|
}
|
|
9287
9341
|
}
|
|
9288
|
-
function
|
|
9342
|
+
function Km({ section: e }) {
|
|
9289
9343
|
let [t, r] = U(e.defaultCollapsed ?? !1), i = !t, a = `detail-section-${e.id}-content`;
|
|
9290
|
-
return /* @__PURE__ */ q(
|
|
9344
|
+
return /* @__PURE__ */ q(Rm, {
|
|
9291
9345
|
variant: "default",
|
|
9292
9346
|
spacing: "sm",
|
|
9293
|
-
children: [/* @__PURE__ */ K(
|
|
9347
|
+
children: [/* @__PURE__ */ K(Bm, { children: /* @__PURE__ */ q("div", {
|
|
9294
9348
|
className: "flex items-center justify-between",
|
|
9295
9349
|
children: [/* @__PURE__ */ q(F, {
|
|
9296
9350
|
variant: "ghost",
|
|
@@ -9303,7 +9357,7 @@ function Gm({ section: e }) {
|
|
|
9303
9357
|
icon: i ? rt : rn,
|
|
9304
9358
|
size: 14,
|
|
9305
9359
|
"aria-hidden": "true"
|
|
9306
|
-
}), /* @__PURE__ */ K(
|
|
9360
|
+
}), /* @__PURE__ */ K(Vm, {
|
|
9307
9361
|
className: "text-base",
|
|
9308
9362
|
children: e.title
|
|
9309
9363
|
})]
|
|
@@ -9316,7 +9370,7 @@ function Gm({ section: e }) {
|
|
|
9316
9370
|
children: e.label
|
|
9317
9371
|
}, e.id))
|
|
9318
9372
|
})]
|
|
9319
|
-
}) }), /* @__PURE__ */ K(
|
|
9373
|
+
}) }), /* @__PURE__ */ K(zm, {
|
|
9320
9374
|
className: n("transition-[opacity,height] duration-200 ease-[var(--ease-default)]", i ? "opacity-100" : "hidden opacity-0"),
|
|
9321
9375
|
children: /* @__PURE__ */ K("div", {
|
|
9322
9376
|
id: a,
|
|
@@ -9329,7 +9383,7 @@ function Gm({ section: e }) {
|
|
|
9329
9383
|
children: e.label
|
|
9330
9384
|
}), /* @__PURE__ */ q("dd", {
|
|
9331
9385
|
className: "flex items-center",
|
|
9332
|
-
children: [/* @__PURE__ */ K(
|
|
9386
|
+
children: [/* @__PURE__ */ K(Gm, { field: e }), e.copyable && e.value !== null && e.value !== void 0 && /* @__PURE__ */ K(Wm, { text: String(e.value) })]
|
|
9333
9387
|
})]
|
|
9334
9388
|
}, e.key))
|
|
9335
9389
|
})
|
|
@@ -9337,13 +9391,13 @@ function Gm({ section: e }) {
|
|
|
9337
9391
|
})]
|
|
9338
9392
|
});
|
|
9339
9393
|
}
|
|
9340
|
-
function
|
|
9394
|
+
function qm() {
|
|
9341
9395
|
return /* @__PURE__ */ K("div", {
|
|
9342
9396
|
className: "space-y-6",
|
|
9343
|
-
children: [1, 2].map((e) => /* @__PURE__ */ q(
|
|
9397
|
+
children: [1, 2].map((e) => /* @__PURE__ */ q(Rm, {
|
|
9344
9398
|
variant: "default",
|
|
9345
9399
|
spacing: "sm",
|
|
9346
|
-
children: [/* @__PURE__ */ K(
|
|
9400
|
+
children: [/* @__PURE__ */ K(Bm, { children: /* @__PURE__ */ K(R, { className: "h-5 w-36" }) }), /* @__PURE__ */ K(zm, { children: /* @__PURE__ */ K("div", {
|
|
9347
9401
|
className: "space-y-4",
|
|
9348
9402
|
children: [
|
|
9349
9403
|
1,
|
|
@@ -9357,15 +9411,15 @@ function Km() {
|
|
|
9357
9411
|
}, e))
|
|
9358
9412
|
});
|
|
9359
9413
|
}
|
|
9360
|
-
function
|
|
9361
|
-
return t ? /* @__PURE__ */ K(
|
|
9414
|
+
function Jm({ sections: e, isLoading: t }) {
|
|
9415
|
+
return t ? /* @__PURE__ */ K(qm, {}) : /* @__PURE__ */ K("div", {
|
|
9362
9416
|
className: "space-y-6",
|
|
9363
|
-
children: e.map((e) => /* @__PURE__ */ K(
|
|
9417
|
+
children: e.map((e) => /* @__PURE__ */ K(Km, { section: e }, e.id))
|
|
9364
9418
|
});
|
|
9365
9419
|
}
|
|
9366
9420
|
//#endregion
|
|
9367
9421
|
//#region src/components/reui/item.tsx
|
|
9368
|
-
var
|
|
9422
|
+
var Ym = Ve("group/item flex flex-wrap items-center rounded-md border border-transparent text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-accent/50", {
|
|
9369
9423
|
variants: {
|
|
9370
9424
|
variant: {
|
|
9371
9425
|
default: "bg-transparent",
|
|
@@ -9382,12 +9436,12 @@ var Jm = Ve("group/item flex flex-wrap items-center rounded-md border border-tra
|
|
|
9382
9436
|
size: "default"
|
|
9383
9437
|
}
|
|
9384
9438
|
});
|
|
9385
|
-
function
|
|
9439
|
+
function Xm({ className: e, variant: t = "default", size: r = "default", asChild: i = !1, ...a }) {
|
|
9386
9440
|
return /* @__PURE__ */ K(i ? Be : "div", {
|
|
9387
9441
|
"data-slot": "item",
|
|
9388
9442
|
"data-variant": t,
|
|
9389
9443
|
"data-size": r,
|
|
9390
|
-
className: n(
|
|
9444
|
+
className: n(Ym({
|
|
9391
9445
|
variant: t,
|
|
9392
9446
|
size: r,
|
|
9393
9447
|
className: e
|
|
@@ -9395,7 +9449,7 @@ function Ym({ className: e, variant: t = "default", size: r = "default", asChild
|
|
|
9395
9449
|
...a
|
|
9396
9450
|
});
|
|
9397
9451
|
}
|
|
9398
|
-
var
|
|
9452
|
+
var Zm = Ve("flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none", {
|
|
9399
9453
|
variants: { variant: {
|
|
9400
9454
|
default: "bg-transparent",
|
|
9401
9455
|
icon: "size-8 rounded-sm border bg-muted [&_svg:not([class*='size-'])]:size-4",
|
|
@@ -9403,39 +9457,39 @@ var Xm = Ve("flex shrink-0 items-center justify-center gap-2 group-has-[[data-sl
|
|
|
9403
9457
|
} },
|
|
9404
9458
|
defaultVariants: { variant: "default" }
|
|
9405
9459
|
});
|
|
9406
|
-
function
|
|
9460
|
+
function Qm({ className: e, variant: t = "default", ...r }) {
|
|
9407
9461
|
return /* @__PURE__ */ K("div", {
|
|
9408
9462
|
"data-slot": "item-media",
|
|
9409
9463
|
"data-variant": t,
|
|
9410
|
-
className: n(
|
|
9464
|
+
className: n(Zm({
|
|
9411
9465
|
variant: t,
|
|
9412
9466
|
className: e
|
|
9413
9467
|
})),
|
|
9414
9468
|
...r
|
|
9415
9469
|
});
|
|
9416
9470
|
}
|
|
9417
|
-
function
|
|
9471
|
+
function $m({ className: e, ...t }) {
|
|
9418
9472
|
return /* @__PURE__ */ K("div", {
|
|
9419
9473
|
"data-slot": "item-content",
|
|
9420
9474
|
className: n("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none", e),
|
|
9421
9475
|
...t
|
|
9422
9476
|
});
|
|
9423
9477
|
}
|
|
9424
|
-
function
|
|
9478
|
+
function eh({ className: e, ...t }) {
|
|
9425
9479
|
return /* @__PURE__ */ K("div", {
|
|
9426
9480
|
"data-slot": "item-title",
|
|
9427
9481
|
className: n("flex w-fit items-center gap-2 text-sm leading-snug font-medium", e),
|
|
9428
9482
|
...t
|
|
9429
9483
|
});
|
|
9430
9484
|
}
|
|
9431
|
-
function
|
|
9485
|
+
function th({ className: e, ...t }) {
|
|
9432
9486
|
return /* @__PURE__ */ K("p", {
|
|
9433
9487
|
"data-slot": "item-description",
|
|
9434
9488
|
className: n("line-clamp-2 text-sm leading-normal font-normal text-balance text-muted-foreground", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", e),
|
|
9435
9489
|
...t
|
|
9436
9490
|
});
|
|
9437
9491
|
}
|
|
9438
|
-
function
|
|
9492
|
+
function nh({ className: e, ...t }) {
|
|
9439
9493
|
return /* @__PURE__ */ K("div", {
|
|
9440
9494
|
"data-slot": "item-actions",
|
|
9441
9495
|
className: n("flex items-center gap-2", e),
|
|
@@ -9444,8 +9498,8 @@ function th({ className: e, ...t }) {
|
|
|
9444
9498
|
}
|
|
9445
9499
|
//#endregion
|
|
9446
9500
|
//#region src/base/partials/EntityItem/index.tsx
|
|
9447
|
-
function
|
|
9448
|
-
return /* @__PURE__ */ q(
|
|
9501
|
+
function rh({ title: e, description: t, avatar: n, icon: r, actions: i, variant: a = "default", size: o = "default", href: s, onClick: c, className: l }) {
|
|
9502
|
+
return /* @__PURE__ */ q(Xm, {
|
|
9449
9503
|
variant: a,
|
|
9450
9504
|
size: o,
|
|
9451
9505
|
className: l,
|
|
@@ -9456,14 +9510,14 @@ function nh({ title: e, description: t, avatar: n, icon: r, actions: i, variant:
|
|
|
9456
9510
|
src: n.src,
|
|
9457
9511
|
alt: n.alt ?? ""
|
|
9458
9512
|
}), n.fallback && /* @__PURE__ */ K(ae, { children: n.fallback })]
|
|
9459
|
-
}) : r ? /* @__PURE__ */ K(
|
|
9513
|
+
}) : r ? /* @__PURE__ */ K(Qm, {
|
|
9460
9514
|
variant: "icon",
|
|
9461
9515
|
children: /* @__PURE__ */ K(L, {
|
|
9462
9516
|
icon: h(r),
|
|
9463
9517
|
"aria-hidden": "true"
|
|
9464
9518
|
})
|
|
9465
9519
|
}) : null,
|
|
9466
|
-
/* @__PURE__ */ q(
|
|
9520
|
+
/* @__PURE__ */ q($m, { children: [/* @__PURE__ */ K(eh, { children: s ? /* @__PURE__ */ K(Qn, {
|
|
9467
9521
|
href: s,
|
|
9468
9522
|
className: "hover:text-primary hover:underline",
|
|
9469
9523
|
children: e
|
|
@@ -9472,8 +9526,8 @@ function nh({ title: e, description: t, avatar: n, icon: r, actions: i, variant:
|
|
|
9472
9526
|
onClick: c,
|
|
9473
9527
|
className: "hover:text-primary text-left hover:underline",
|
|
9474
9528
|
children: e
|
|
9475
|
-
}) : e }), t && /* @__PURE__ */ K(
|
|
9476
|
-
i && i.length > 0 && /* @__PURE__ */ K(
|
|
9529
|
+
}) : e }), t && /* @__PURE__ */ K(th, { children: t })] }),
|
|
9530
|
+
i && i.length > 0 && /* @__PURE__ */ K(nh, { children: i.map((e) => {
|
|
9477
9531
|
let t = /* @__PURE__ */ q(G, { children: [e.icon && /* @__PURE__ */ K(L, {
|
|
9478
9532
|
icon: h(e.icon),
|
|
9479
9533
|
className: "size-4",
|
|
@@ -9501,7 +9555,7 @@ function nh({ title: e, description: t, avatar: n, icon: r, actions: i, variant:
|
|
|
9501
9555
|
}
|
|
9502
9556
|
//#endregion
|
|
9503
9557
|
//#region src/base/partials/LogViewer/JsonBlock.tsx
|
|
9504
|
-
function
|
|
9558
|
+
function ih({ data: e }) {
|
|
9505
9559
|
let [t, r] = U(!1), i = JSON.stringify(e, null, 2);
|
|
9506
9560
|
return (Array.isArray(e) ? e : Object.keys(e)).length === 0 ? /* @__PURE__ */ K(G, {}) : /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K("button", {
|
|
9507
9561
|
type: "button",
|
|
@@ -9515,7 +9569,7 @@ function rh({ data: e }) {
|
|
|
9515
9569
|
}
|
|
9516
9570
|
//#endregion
|
|
9517
9571
|
//#region src/base/partials/LogViewer/LogEntry.tsx
|
|
9518
|
-
var
|
|
9572
|
+
var ah = {
|
|
9519
9573
|
ERROR: "destructive-light",
|
|
9520
9574
|
CRITICAL: "destructive-light",
|
|
9521
9575
|
WARNING: "warning-light",
|
|
@@ -9524,16 +9578,16 @@ var ih = {
|
|
|
9524
9578
|
NOTICE: "invert-light",
|
|
9525
9579
|
RAW: "secondary"
|
|
9526
9580
|
};
|
|
9527
|
-
function
|
|
9528
|
-
return
|
|
9581
|
+
function oh(e) {
|
|
9582
|
+
return ah[e] ?? "secondary";
|
|
9529
9583
|
}
|
|
9530
|
-
function
|
|
9584
|
+
function sh({ line: e }) {
|
|
9531
9585
|
let t = e.context != null && typeof e.context == "object" && (Array.isArray(e.context) ? e.context.length > 0 : Object.keys(e.context).length > 0);
|
|
9532
9586
|
return /* @__PURE__ */ q("div", {
|
|
9533
9587
|
className: "group hover:bg-accent/30 flex items-start gap-2 px-3 py-1.5 font-mono text-xs",
|
|
9534
9588
|
children: [
|
|
9535
9589
|
/* @__PURE__ */ K(f, {
|
|
9536
|
-
variant:
|
|
9590
|
+
variant: oh(e.level),
|
|
9537
9591
|
size: "xs",
|
|
9538
9592
|
className: "mt-0.5 shrink-0 font-mono",
|
|
9539
9593
|
children: e.level.substring(0, 5).padEnd(5)
|
|
@@ -9550,7 +9604,7 @@ function oh({ line: e }) {
|
|
|
9550
9604
|
className: "flex-1 break-words",
|
|
9551
9605
|
children: [/* @__PURE__ */ K("span", { children: e.message }), t && /* @__PURE__ */ K("span", {
|
|
9552
9606
|
className: "ml-1",
|
|
9553
|
-
children: /* @__PURE__ */ K(
|
|
9607
|
+
children: /* @__PURE__ */ K(ih, { data: e.context })
|
|
9554
9608
|
})]
|
|
9555
9609
|
})
|
|
9556
9610
|
]
|
|
@@ -9558,7 +9612,7 @@ function oh({ line: e }) {
|
|
|
9558
9612
|
}
|
|
9559
9613
|
//#endregion
|
|
9560
9614
|
//#region src/base/partials/LogViewer/LogViewerToolbar.tsx
|
|
9561
|
-
function
|
|
9615
|
+
function ch({ filename: e, totalLines: t, downloadUrl: n, rawMode: r, onToggleRaw: i, rawContent: a, onClose: o }) {
|
|
9562
9616
|
let { t: s } = I();
|
|
9563
9617
|
return /* @__PURE__ */ q("div", {
|
|
9564
9618
|
className: "border-border flex items-center gap-2 border-b px-3 py-2",
|
|
@@ -9629,7 +9683,7 @@ function sh({ filename: e, totalLines: t, downloadUrl: n, rawMode: r, onToggleRa
|
|
|
9629
9683
|
}
|
|
9630
9684
|
//#endregion
|
|
9631
9685
|
//#region src/base/partials/LogViewer/index.tsx
|
|
9632
|
-
function
|
|
9686
|
+
function lh({ lines: e, filename: t, downloadUrl: n, totalLines: r, hasMore: i, isLoading: a = !1, onLoadMore: o, onClose: s }) {
|
|
9633
9687
|
let [c, l] = U(!1), u = Yn(null), d = e.map((e) => {
|
|
9634
9688
|
if (e.level === "RAW") return e.message;
|
|
9635
9689
|
let t = Object.keys(e.context).length > 0 ? " " + JSON.stringify(e.context) : "";
|
|
@@ -9660,7 +9714,7 @@ function ch({ lines: e, filename: t, downloadUrl: n, totalLines: r, hasMore: i,
|
|
|
9660
9714
|
})]
|
|
9661
9715
|
}) : /* @__PURE__ */ q("div", {
|
|
9662
9716
|
className: "flex flex-col rounded-lg border",
|
|
9663
|
-
children: [/* @__PURE__ */ K(
|
|
9717
|
+
children: [/* @__PURE__ */ K(ch, {
|
|
9664
9718
|
filename: t,
|
|
9665
9719
|
totalLines: r,
|
|
9666
9720
|
downloadUrl: n,
|
|
@@ -9675,7 +9729,7 @@ function ch({ lines: e, filename: t, downloadUrl: n, totalLines: r, hasMore: i,
|
|
|
9675
9729
|
children: d
|
|
9676
9730
|
}) : /* @__PURE__ */ K("div", {
|
|
9677
9731
|
className: "divide-border divide-y",
|
|
9678
|
-
children: e.map((e, t) => /* @__PURE__ */ K(
|
|
9732
|
+
children: e.map((e, t) => /* @__PURE__ */ K(sh, { line: e }, t))
|
|
9679
9733
|
}), i && /* @__PURE__ */ K("div", {
|
|
9680
9734
|
ref: u,
|
|
9681
9735
|
className: "flex justify-center py-3",
|
|
@@ -9689,34 +9743,34 @@ function ch({ lines: e, filename: t, downloadUrl: n, totalLines: r, hasMore: i,
|
|
|
9689
9743
|
}
|
|
9690
9744
|
//#endregion
|
|
9691
9745
|
//#region src/components/reui/menubar.tsx
|
|
9692
|
-
function
|
|
9746
|
+
function uh({ className: e, ...t }) {
|
|
9693
9747
|
return /* @__PURE__ */ K(Cs, {
|
|
9694
9748
|
"data-slot": "menubar",
|
|
9695
9749
|
className: n("flex h-9 items-center gap-1 rounded-md border bg-background p-1 shadow-xs", e),
|
|
9696
9750
|
...t
|
|
9697
9751
|
});
|
|
9698
9752
|
}
|
|
9699
|
-
function
|
|
9753
|
+
function dh({ ...e }) {
|
|
9700
9754
|
return /* @__PURE__ */ K(ws, {
|
|
9701
9755
|
"data-slot": "menubar-menu",
|
|
9702
9756
|
...e
|
|
9703
9757
|
});
|
|
9704
9758
|
}
|
|
9705
|
-
function
|
|
9759
|
+
function fh({ ...e }) {
|
|
9706
9760
|
return /* @__PURE__ */ K(Es, {
|
|
9707
9761
|
"data-slot": "menubar-portal",
|
|
9708
9762
|
...e
|
|
9709
9763
|
});
|
|
9710
9764
|
}
|
|
9711
|
-
function
|
|
9765
|
+
function ph({ className: e, ...t }) {
|
|
9712
9766
|
return /* @__PURE__ */ K(Ts, {
|
|
9713
9767
|
"data-slot": "menubar-trigger",
|
|
9714
9768
|
className: n("flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", e),
|
|
9715
9769
|
...t
|
|
9716
9770
|
});
|
|
9717
9771
|
}
|
|
9718
|
-
function
|
|
9719
|
-
return /* @__PURE__ */ K(
|
|
9772
|
+
function mh({ className: e, align: t = "start", alignOffset: r = -4, sideOffset: i = 8, ...a }) {
|
|
9773
|
+
return /* @__PURE__ */ K(fh, { children: /* @__PURE__ */ K(Ds, {
|
|
9720
9774
|
"data-slot": "menubar-content",
|
|
9721
9775
|
align: t,
|
|
9722
9776
|
alignOffset: r,
|
|
@@ -9725,7 +9779,7 @@ function ph({ className: e, align: t = "start", alignOffset: r = -4, sideOffset:
|
|
|
9725
9779
|
...a
|
|
9726
9780
|
}) });
|
|
9727
9781
|
}
|
|
9728
|
-
function
|
|
9782
|
+
function hh({ className: e, inset: t, variant: r = "default", ...i }) {
|
|
9729
9783
|
return /* @__PURE__ */ K(Os, {
|
|
9730
9784
|
"data-slot": "menubar-item",
|
|
9731
9785
|
"data-inset": t,
|
|
@@ -9734,14 +9788,14 @@ function mh({ className: e, inset: t, variant: r = "default", ...i }) {
|
|
|
9734
9788
|
...i
|
|
9735
9789
|
});
|
|
9736
9790
|
}
|
|
9737
|
-
function
|
|
9791
|
+
function gh({ className: e, ...t }) {
|
|
9738
9792
|
return /* @__PURE__ */ K(ks, {
|
|
9739
9793
|
"data-slot": "menubar-separator",
|
|
9740
9794
|
className: n("-mx-1 my-1 h-px bg-border", e),
|
|
9741
9795
|
...t
|
|
9742
9796
|
});
|
|
9743
9797
|
}
|
|
9744
|
-
function
|
|
9798
|
+
function _h({ className: e, ...t }) {
|
|
9745
9799
|
return /* @__PURE__ */ K("span", {
|
|
9746
9800
|
"data-slot": "menubar-shortcut",
|
|
9747
9801
|
className: n("ml-auto text-xs tracking-widest text-muted-foreground", e),
|
|
@@ -9750,21 +9804,21 @@ function gh({ className: e, ...t }) {
|
|
|
9750
9804
|
}
|
|
9751
9805
|
//#endregion
|
|
9752
9806
|
//#region src/base/partials/MenuBar/index.tsx
|
|
9753
|
-
function
|
|
9807
|
+
function vh({ menus: e, ariaLabel: t, className: n }) {
|
|
9754
9808
|
let { t: r } = I();
|
|
9755
|
-
return /* @__PURE__ */ K(
|
|
9809
|
+
return /* @__PURE__ */ K(uh, {
|
|
9756
9810
|
"aria-label": t ?? r("middag.ui.menubar.label"),
|
|
9757
9811
|
className: n,
|
|
9758
|
-
children: e.map((e, t) => /* @__PURE__ */ q(
|
|
9812
|
+
children: e.map((e, t) => /* @__PURE__ */ q(dh, { children: [/* @__PURE__ */ K(ph, { children: e.label }), /* @__PURE__ */ K(mh, { children: e.entries.map((e, t) => e.type === "separator" ? /* @__PURE__ */ K(gh, {}, `sep-${t}`) : /* @__PURE__ */ q(hh, {
|
|
9759
9813
|
disabled: e.disabled,
|
|
9760
9814
|
onSelect: e.onSelect,
|
|
9761
|
-
children: [e.label, e.shortcut ? /* @__PURE__ */ K(
|
|
9815
|
+
children: [e.label, e.shortcut ? /* @__PURE__ */ K(_h, { children: e.shortcut }) : null]
|
|
9762
9816
|
}, `${e.label}-${t}`)) })] }, `${e.label}-${t}`))
|
|
9763
9817
|
});
|
|
9764
9818
|
}
|
|
9765
9819
|
//#endregion
|
|
9766
9820
|
//#region src/base/partials/QuickRecordSheet/index.tsx
|
|
9767
|
-
function
|
|
9821
|
+
function yh({ open: e, onOpenChange: t, title: n, description: r, children: i, footer: a, side: o = "right", trigger: s }) {
|
|
9768
9822
|
return /* @__PURE__ */ q(hp, {
|
|
9769
9823
|
open: e,
|
|
9770
9824
|
onOpenChange: t,
|
|
@@ -9787,21 +9841,21 @@ function vh({ open: e, onOpenChange: t, title: n, description: r, children: i, f
|
|
|
9787
9841
|
}
|
|
9788
9842
|
//#endregion
|
|
9789
9843
|
//#region node_modules/react-resizable-panels/dist/react-resizable-panels.js
|
|
9790
|
-
function
|
|
9844
|
+
function bh(e, t) {
|
|
9791
9845
|
let n = getComputedStyle(e);
|
|
9792
9846
|
return t * parseFloat(n.fontSize);
|
|
9793
9847
|
}
|
|
9794
|
-
function
|
|
9848
|
+
function xh(e, t) {
|
|
9795
9849
|
let n = getComputedStyle(e.ownerDocument.body);
|
|
9796
9850
|
return t * parseFloat(n.fontSize);
|
|
9797
9851
|
}
|
|
9798
|
-
function
|
|
9852
|
+
function Sh(e) {
|
|
9799
9853
|
return e / 100 * window.innerHeight;
|
|
9800
9854
|
}
|
|
9801
|
-
function
|
|
9855
|
+
function Ch(e) {
|
|
9802
9856
|
return e / 100 * window.innerWidth;
|
|
9803
9857
|
}
|
|
9804
|
-
function
|
|
9858
|
+
function wh(e) {
|
|
9805
9859
|
switch (typeof e) {
|
|
9806
9860
|
case "number": return [e, "px"];
|
|
9807
9861
|
case "string": {
|
|
@@ -9810,8 +9864,8 @@ function Ch(e) {
|
|
|
9810
9864
|
}
|
|
9811
9865
|
}
|
|
9812
9866
|
}
|
|
9813
|
-
function
|
|
9814
|
-
let r, [i, a] =
|
|
9867
|
+
function Th({ groupSize: e, panelElement: t, styleProp: n }) {
|
|
9868
|
+
let r, [i, a] = wh(n);
|
|
9815
9869
|
switch (a) {
|
|
9816
9870
|
case "%":
|
|
9817
9871
|
r = i / 100 * e;
|
|
@@ -9820,29 +9874,29 @@ function wh({ groupSize: e, panelElement: t, styleProp: n }) {
|
|
|
9820
9874
|
r = i;
|
|
9821
9875
|
break;
|
|
9822
9876
|
case "rem":
|
|
9823
|
-
r =
|
|
9877
|
+
r = xh(t, i);
|
|
9824
9878
|
break;
|
|
9825
9879
|
case "em":
|
|
9826
|
-
r =
|
|
9880
|
+
r = bh(t, i);
|
|
9827
9881
|
break;
|
|
9828
9882
|
case "vh":
|
|
9829
|
-
r =
|
|
9883
|
+
r = Sh(i);
|
|
9830
9884
|
break;
|
|
9831
9885
|
case "vw":
|
|
9832
|
-
r =
|
|
9886
|
+
r = Ch(i);
|
|
9833
9887
|
break;
|
|
9834
9888
|
}
|
|
9835
9889
|
return r;
|
|
9836
9890
|
}
|
|
9837
|
-
function
|
|
9891
|
+
function Eh(e) {
|
|
9838
9892
|
return parseFloat(e.toFixed(3));
|
|
9839
9893
|
}
|
|
9840
|
-
function
|
|
9894
|
+
function Dh({ group: e }) {
|
|
9841
9895
|
let { orientation: t, panels: n } = e;
|
|
9842
9896
|
return n.reduce((e, n) => (e += t === "horizontal" ? n.element.offsetWidth : n.element.offsetHeight, e), 0);
|
|
9843
9897
|
}
|
|
9844
|
-
function
|
|
9845
|
-
let { panels: t } = e, n =
|
|
9898
|
+
function Oh(e) {
|
|
9899
|
+
let { panels: t } = e, n = Dh({ group: e });
|
|
9846
9900
|
return n === 0 ? t.map((e) => ({
|
|
9847
9901
|
groupResizeBehavior: e.panelConstraints.groupResizeBehavior,
|
|
9848
9902
|
collapsedSize: 0,
|
|
@@ -9854,25 +9908,25 @@ function Dh(e) {
|
|
|
9854
9908
|
panelId: e.id
|
|
9855
9909
|
})) : t.map((e) => {
|
|
9856
9910
|
let { element: t, panelConstraints: r } = e, i = 0;
|
|
9857
|
-
r.collapsedSize !== void 0 && (i = Th(
|
|
9911
|
+
r.collapsedSize !== void 0 && (i = Eh(Th({
|
|
9858
9912
|
groupSize: n,
|
|
9859
9913
|
panelElement: t,
|
|
9860
9914
|
styleProp: r.collapsedSize
|
|
9861
9915
|
}) / n * 100));
|
|
9862
9916
|
let a;
|
|
9863
|
-
r.defaultSize !== void 0 && (a = Th(
|
|
9917
|
+
r.defaultSize !== void 0 && (a = Eh(Th({
|
|
9864
9918
|
groupSize: n,
|
|
9865
9919
|
panelElement: t,
|
|
9866
9920
|
styleProp: r.defaultSize
|
|
9867
9921
|
}) / n * 100));
|
|
9868
9922
|
let o = 0;
|
|
9869
|
-
r.minSize !== void 0 && (o = Th(
|
|
9923
|
+
r.minSize !== void 0 && (o = Eh(Th({
|
|
9870
9924
|
groupSize: n,
|
|
9871
9925
|
panelElement: t,
|
|
9872
9926
|
styleProp: r.minSize
|
|
9873
9927
|
}) / n * 100));
|
|
9874
9928
|
let s = 100;
|
|
9875
|
-
return r.maxSize !== void 0 && (s = Th(
|
|
9929
|
+
return r.maxSize !== void 0 && (s = Eh(Th({
|
|
9876
9930
|
groupSize: n,
|
|
9877
9931
|
panelElement: t,
|
|
9878
9932
|
styleProp: r.maxSize
|
|
@@ -9891,43 +9945,43 @@ function Dh(e) {
|
|
|
9891
9945
|
function Z(e, t = "Assertion error") {
|
|
9892
9946
|
if (!e) throw Error(t);
|
|
9893
9947
|
}
|
|
9894
|
-
function Oh(e, t) {
|
|
9895
|
-
return Array.from(t).sort(e === "horizontal" ? kh : Ah);
|
|
9896
|
-
}
|
|
9897
9948
|
function kh(e, t) {
|
|
9949
|
+
return Array.from(t).sort(e === "horizontal" ? Ah : jh);
|
|
9950
|
+
}
|
|
9951
|
+
function Ah(e, t) {
|
|
9898
9952
|
let n = e.element.offsetLeft - t.element.offsetLeft;
|
|
9899
9953
|
return n === 0 ? e.element.offsetWidth - t.element.offsetWidth : n;
|
|
9900
9954
|
}
|
|
9901
|
-
function
|
|
9955
|
+
function jh(e, t) {
|
|
9902
9956
|
let n = e.element.offsetTop - t.element.offsetTop;
|
|
9903
9957
|
return n === 0 ? e.element.offsetHeight - t.element.offsetHeight : n;
|
|
9904
9958
|
}
|
|
9905
|
-
function
|
|
9959
|
+
function Mh(e) {
|
|
9906
9960
|
return typeof e == "object" && !!e && "nodeType" in e && e.nodeType === Node.ELEMENT_NODE;
|
|
9907
9961
|
}
|
|
9908
|
-
function
|
|
9962
|
+
function Nh(e, t) {
|
|
9909
9963
|
return {
|
|
9910
9964
|
x: e.x >= t.left && e.x <= t.right ? 0 : Math.min(Math.abs(e.x - t.left), Math.abs(e.x - t.right)),
|
|
9911
9965
|
y: e.y >= t.top && e.y <= t.bottom ? 0 : Math.min(Math.abs(e.y - t.top), Math.abs(e.y - t.bottom))
|
|
9912
9966
|
};
|
|
9913
9967
|
}
|
|
9914
|
-
function
|
|
9968
|
+
function Ph({ orientation: e, rects: t, targetRect: n }) {
|
|
9915
9969
|
let r = {
|
|
9916
9970
|
x: n.x + n.width / 2,
|
|
9917
9971
|
y: n.y + n.height / 2
|
|
9918
9972
|
}, i, a = Number.MAX_VALUE;
|
|
9919
9973
|
for (let n of t) {
|
|
9920
|
-
let { x: t, y: o } =
|
|
9974
|
+
let { x: t, y: o } = Nh(r, n), s = e === "horizontal" ? t : o;
|
|
9921
9975
|
s < a && (a = s, i = n);
|
|
9922
9976
|
}
|
|
9923
9977
|
return Z(i, "No rect found"), i;
|
|
9924
9978
|
}
|
|
9925
|
-
var
|
|
9926
|
-
function
|
|
9927
|
-
return
|
|
9979
|
+
var Fh;
|
|
9980
|
+
function Ih() {
|
|
9981
|
+
return Fh === void 0 && (Fh = typeof matchMedia == "function" ? !!matchMedia("(pointer:coarse)").matches : !1), Fh;
|
|
9928
9982
|
}
|
|
9929
|
-
function
|
|
9930
|
-
let { element: t, orientation: n, panels: r, separators: i } = e, a =
|
|
9983
|
+
function Lh(e) {
|
|
9984
|
+
let { element: t, orientation: n, panels: r, separators: i } = e, a = kh(n, Array.from(t.children).filter(Mh).map((e) => ({ element: e }))).map(({ element: e }) => e), o = [], s = !1, c = !1, l = -1, u = -1, d = 0, f, p = [];
|
|
9931
9985
|
{
|
|
9932
9986
|
let e = -1;
|
|
9933
9987
|
for (let t of a) t.hasAttribute("data-panel") && (e++, t.hasAttribute("data-disabled") || (d++, l === -1 && (l = e), u = e));
|
|
@@ -9948,7 +10002,7 @@ function Ih(e) {
|
|
|
9948
10002
|
break;
|
|
9949
10003
|
case 1: {
|
|
9950
10004
|
let i = p[0];
|
|
9951
|
-
m = [i,
|
|
10005
|
+
m = [i, Ph({
|
|
9952
10006
|
orientation: n,
|
|
9953
10007
|
rects: [r, a],
|
|
9954
10008
|
targetRect: i.element.getBoundingClientRect()
|
|
@@ -9961,7 +10015,7 @@ function Ih(e) {
|
|
|
9961
10015
|
}
|
|
9962
10016
|
} else m = p.length ? p : [n === "horizontal" ? new DOMRect(r.right, a.top, a.left - r.right, a.height) : new DOMRect(a.left, r.bottom, a.width, a.top - r.bottom)];
|
|
9963
10017
|
for (let n of m) {
|
|
9964
|
-
let r = "width" in n ? n : n.element.getBoundingClientRect(), a =
|
|
10018
|
+
let r = "width" in n ? n : n.element.getBoundingClientRect(), a = Ih() ? e.resizeTargetMinimumSize.coarse : e.resizeTargetMinimumSize.fine;
|
|
9965
10019
|
if (r.width < a) {
|
|
9966
10020
|
let e = a - r.width;
|
|
9967
10021
|
r = new DOMRect(r.x - e / 2, r.y, r.width + e, r.height);
|
|
@@ -9972,7 +10026,7 @@ function Ih(e) {
|
|
|
9972
10026
|
}
|
|
9973
10027
|
!s && !(t <= l || t > u) && o.push({
|
|
9974
10028
|
group: e,
|
|
9975
|
-
groupSize:
|
|
10029
|
+
groupSize: Dh({ group: e }),
|
|
9976
10030
|
panels: [f, i],
|
|
9977
10031
|
separator: "width" in n ? void 0 : n,
|
|
9978
10032
|
rect: r
|
|
@@ -9989,7 +10043,7 @@ function Ih(e) {
|
|
|
9989
10043
|
}
|
|
9990
10044
|
return o;
|
|
9991
10045
|
}
|
|
9992
|
-
var
|
|
10046
|
+
var Rh = class {
|
|
9993
10047
|
#e = {};
|
|
9994
10048
|
addListener(e, t) {
|
|
9995
10049
|
let n = this.#e[e];
|
|
@@ -10023,40 +10077,40 @@ var Lh = class {
|
|
|
10023
10077
|
e >= 0 && n.splice(e, 1);
|
|
10024
10078
|
}
|
|
10025
10079
|
}
|
|
10026
|
-
},
|
|
10027
|
-
function
|
|
10028
|
-
|
|
10029
|
-
}
|
|
10030
|
-
function Vh(e, t) {
|
|
10031
|
-
for (let [t] of Rh) if (t.id === e) return t;
|
|
10080
|
+
}, zh = /* @__PURE__ */ new Map(), Bh = new Rh();
|
|
10081
|
+
function Vh(e) {
|
|
10082
|
+
zh = new Map(zh), zh.delete(e);
|
|
10032
10083
|
}
|
|
10033
10084
|
function Hh(e, t) {
|
|
10034
|
-
for (let [t
|
|
10085
|
+
for (let [t] of zh) if (t.id === e) return t;
|
|
10086
|
+
}
|
|
10087
|
+
function Uh(e, t) {
|
|
10088
|
+
for (let [t, n] of zh) if (t.id === e) return n;
|
|
10035
10089
|
if (t) throw Error(`Could not find data for Group with id ${e}`);
|
|
10036
10090
|
}
|
|
10037
|
-
function
|
|
10038
|
-
return
|
|
10091
|
+
function Wh() {
|
|
10092
|
+
return zh;
|
|
10039
10093
|
}
|
|
10040
|
-
function
|
|
10041
|
-
return
|
|
10094
|
+
function Gh(e, t) {
|
|
10095
|
+
return Bh.addListener("groupChange", (n) => {
|
|
10042
10096
|
n.group.id === e && t(n);
|
|
10043
10097
|
});
|
|
10044
10098
|
}
|
|
10045
|
-
function
|
|
10046
|
-
let n =
|
|
10047
|
-
|
|
10099
|
+
function Kh(e, t) {
|
|
10100
|
+
let n = zh.get(e);
|
|
10101
|
+
zh = new Map(zh), zh.set(e, t), Bh.emit("groupChange", {
|
|
10048
10102
|
group: e,
|
|
10049
10103
|
prev: n,
|
|
10050
10104
|
next: t
|
|
10051
10105
|
});
|
|
10052
10106
|
}
|
|
10053
|
-
function
|
|
10107
|
+
function qh(e, t, n) {
|
|
10054
10108
|
let r, i = {
|
|
10055
10109
|
x: Infinity,
|
|
10056
10110
|
y: Infinity
|
|
10057
10111
|
};
|
|
10058
10112
|
for (let a of t) {
|
|
10059
|
-
let t =
|
|
10113
|
+
let t = Nh(n, a.rect);
|
|
10060
10114
|
switch (e) {
|
|
10061
10115
|
case "horizontal":
|
|
10062
10116
|
t.x <= i.x && (r = a, i = t);
|
|
@@ -10071,20 +10125,20 @@ function Kh(e, t, n) {
|
|
|
10071
10125
|
hitRegion: r
|
|
10072
10126
|
} : void 0;
|
|
10073
10127
|
}
|
|
10074
|
-
function
|
|
10128
|
+
function Jh(e) {
|
|
10075
10129
|
return typeof e == "object" && !!e && "nodeType" in e && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
|
|
10076
10130
|
}
|
|
10077
|
-
function
|
|
10131
|
+
function Yh(e, t) {
|
|
10078
10132
|
if (e === t) throw Error("Cannot compare node with itself");
|
|
10079
10133
|
let n = {
|
|
10080
|
-
a:
|
|
10081
|
-
b:
|
|
10134
|
+
a: tg(e),
|
|
10135
|
+
b: tg(t)
|
|
10082
10136
|
}, r;
|
|
10083
10137
|
for (; n.a.at(-1) === n.b.at(-1);) r = n.a.pop(), n.b.pop();
|
|
10084
10138
|
Z(r, "Stacking order can only be calculated for elements with a common ancestor");
|
|
10085
10139
|
let i = {
|
|
10086
|
-
a: $h(
|
|
10087
|
-
b: $h(
|
|
10140
|
+
a: eg($h(n.a)),
|
|
10141
|
+
b: eg($h(n.b))
|
|
10088
10142
|
};
|
|
10089
10143
|
if (i.a === i.b) {
|
|
10090
10144
|
let e = r.childNodes, t = {
|
|
@@ -10099,87 +10153,87 @@ function Jh(e, t) {
|
|
|
10099
10153
|
}
|
|
10100
10154
|
return Math.sign(i.a - i.b);
|
|
10101
10155
|
}
|
|
10102
|
-
var
|
|
10103
|
-
function
|
|
10104
|
-
let t = getComputedStyle(
|
|
10156
|
+
var Xh = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
|
|
10157
|
+
function Zh(e) {
|
|
10158
|
+
let t = getComputedStyle(ng(e) ?? e).display;
|
|
10105
10159
|
return t === "flex" || t === "inline-flex";
|
|
10106
10160
|
}
|
|
10107
|
-
function
|
|
10161
|
+
function Qh(e) {
|
|
10108
10162
|
let t = getComputedStyle(e);
|
|
10109
|
-
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" ||
|
|
10163
|
+
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || Zh(e)) || +t.opacity < 1 || "transform" in t && t.transform !== "none" || "webkitTransform" in t && t.webkitTransform !== "none" || "mixBlendMode" in t && t.mixBlendMode !== "normal" || "filter" in t && t.filter !== "none" || "webkitFilter" in t && t.webkitFilter !== "none" || "isolation" in t && t.isolation === "isolate" || Xh.test(t.willChange) || t.webkitOverflowScrolling === "touch");
|
|
10110
10164
|
}
|
|
10111
|
-
function
|
|
10165
|
+
function $h(e) {
|
|
10112
10166
|
let t = e.length;
|
|
10113
10167
|
for (; t--;) {
|
|
10114
10168
|
let n = e[t];
|
|
10115
|
-
if (Z(n, "Missing node"),
|
|
10169
|
+
if (Z(n, "Missing node"), Qh(n)) return n;
|
|
10116
10170
|
}
|
|
10117
10171
|
return null;
|
|
10118
10172
|
}
|
|
10119
|
-
function
|
|
10173
|
+
function eg(e) {
|
|
10120
10174
|
return e && Number(getComputedStyle(e).zIndex) || 0;
|
|
10121
10175
|
}
|
|
10122
|
-
function
|
|
10176
|
+
function tg(e) {
|
|
10123
10177
|
let t = [];
|
|
10124
|
-
for (; e;) t.push(e), e =
|
|
10178
|
+
for (; e;) t.push(e), e = ng(e);
|
|
10125
10179
|
return t;
|
|
10126
10180
|
}
|
|
10127
|
-
function
|
|
10181
|
+
function ng(e) {
|
|
10128
10182
|
let { parentNode: t } = e;
|
|
10129
|
-
return
|
|
10183
|
+
return Jh(t) ? t.host : t;
|
|
10130
10184
|
}
|
|
10131
|
-
function
|
|
10185
|
+
function rg(e, t) {
|
|
10132
10186
|
return e.x < t.x + t.width && e.x + e.width > t.x && e.y < t.y + t.height && e.y + e.height > t.y;
|
|
10133
10187
|
}
|
|
10134
|
-
function
|
|
10135
|
-
if (!
|
|
10136
|
-
if (
|
|
10188
|
+
function ig({ groupElement: e, hitRegion: t, pointerEventTarget: n }) {
|
|
10189
|
+
if (!Mh(n) || n.contains(e) || e.contains(n)) return !0;
|
|
10190
|
+
if (Yh(n, e) > 0) {
|
|
10137
10191
|
let r = n;
|
|
10138
10192
|
for (; r;) {
|
|
10139
10193
|
if (r.contains(e)) return !0;
|
|
10140
|
-
if (
|
|
10194
|
+
if (rg(r.getBoundingClientRect(), t)) return !1;
|
|
10141
10195
|
r = r.parentElement;
|
|
10142
10196
|
}
|
|
10143
10197
|
}
|
|
10144
10198
|
return !0;
|
|
10145
10199
|
}
|
|
10146
|
-
function
|
|
10200
|
+
function ag(e, t) {
|
|
10147
10201
|
let n = [];
|
|
10148
10202
|
return t.forEach((t, r) => {
|
|
10149
10203
|
if (r.disabled) return;
|
|
10150
|
-
let i =
|
|
10204
|
+
let i = Lh(r), a = qh(r.orientation, i, {
|
|
10151
10205
|
x: e.clientX,
|
|
10152
10206
|
y: e.clientY
|
|
10153
10207
|
});
|
|
10154
|
-
a && a.distance.x <= 0 && a.distance.y <= 0 &&
|
|
10208
|
+
a && a.distance.x <= 0 && a.distance.y <= 0 && ig({
|
|
10155
10209
|
groupElement: r.element,
|
|
10156
10210
|
hitRegion: a.hitRegion.rect,
|
|
10157
10211
|
pointerEventTarget: e.target
|
|
10158
10212
|
}) && n.push(a.hitRegion);
|
|
10159
10213
|
}), n;
|
|
10160
10214
|
}
|
|
10161
|
-
function
|
|
10215
|
+
function og(e, t) {
|
|
10162
10216
|
if (e.length !== t.length) return !1;
|
|
10163
10217
|
for (let n = 0; n < e.length; n++) if (e[n] != t[n]) return !1;
|
|
10164
10218
|
return !0;
|
|
10165
10219
|
}
|
|
10166
|
-
function
|
|
10167
|
-
return Math.abs(
|
|
10220
|
+
function sg(e, t, n = 0) {
|
|
10221
|
+
return Math.abs(Eh(e) - Eh(t)) <= n;
|
|
10168
10222
|
}
|
|
10169
|
-
function
|
|
10170
|
-
return
|
|
10223
|
+
function cg(e, t) {
|
|
10224
|
+
return sg(e, t) ? 0 : e > t ? 1 : -1;
|
|
10171
10225
|
}
|
|
10172
|
-
function
|
|
10226
|
+
function lg({ overrideDisabledPanels: e, panelConstraints: t, prevSize: n, size: r }) {
|
|
10173
10227
|
let { collapsedSize: i = 0, collapsible: a, disabled: o, maxSize: s = 100, minSize: c = 0 } = t;
|
|
10174
10228
|
if (o && !e) return n;
|
|
10175
|
-
if (
|
|
10229
|
+
if (cg(r, c) < 0) if (a) {
|
|
10176
10230
|
let e = (i + c) / 2;
|
|
10177
|
-
r =
|
|
10231
|
+
r = cg(r, e) < 0 ? i : c;
|
|
10178
10232
|
} else r = c;
|
|
10179
|
-
return r = Math.min(s, r), r =
|
|
10233
|
+
return r = Math.min(s, r), r = Eh(r), r;
|
|
10180
10234
|
}
|
|
10181
|
-
function
|
|
10182
|
-
if (
|
|
10235
|
+
function ug({ delta: e, initialLayout: t, panelConstraints: n, pivotIndices: r, prevLayout: i, trigger: a }) {
|
|
10236
|
+
if (sg(e, 0)) return t;
|
|
10183
10237
|
let o = a === "imperative-api", s = Object.values(t), c = Object.values(i), l = [...s], [u, d] = r;
|
|
10184
10238
|
Z(u != null, "Invalid first pivot index"), Z(d != null, "Invalid second pivot index");
|
|
10185
10239
|
let f = 0;
|
|
@@ -10191,9 +10245,9 @@ function lg({ delta: e, initialLayout: t, panelConstraints: n, pivotIndices: r,
|
|
|
10191
10245
|
let { collapsedSize: i = 0, collapsible: a, minSize: o = 0 } = r;
|
|
10192
10246
|
if (a) {
|
|
10193
10247
|
let n = s[t];
|
|
10194
|
-
if (Z(n != null, `Previous layout not found for panel index ${t}`),
|
|
10248
|
+
if (Z(n != null, `Previous layout not found for panel index ${t}`), sg(n, i)) {
|
|
10195
10249
|
let t = o - n;
|
|
10196
|
-
|
|
10250
|
+
cg(t, Math.abs(e)) > 0 && (e = e < 0 ? 0 - t : t);
|
|
10197
10251
|
}
|
|
10198
10252
|
}
|
|
10199
10253
|
}
|
|
@@ -10203,9 +10257,9 @@ function lg({ delta: e, initialLayout: t, panelConstraints: n, pivotIndices: r,
|
|
|
10203
10257
|
let { collapsedSize: i = 0, collapsible: a, minSize: o = 0 } = r;
|
|
10204
10258
|
if (a) {
|
|
10205
10259
|
let n = s[t];
|
|
10206
|
-
if (Z(n != null, `Previous layout not found for panel index ${t}`),
|
|
10260
|
+
if (Z(n != null, `Previous layout not found for panel index ${t}`), sg(n, o)) {
|
|
10207
10261
|
let t = n - i;
|
|
10208
|
-
|
|
10262
|
+
cg(t, Math.abs(e)) > 0 && (e = e < 0 ? 0 - t : t);
|
|
10209
10263
|
}
|
|
10210
10264
|
}
|
|
10211
10265
|
}
|
|
@@ -10214,12 +10268,12 @@ function lg({ delta: e, initialLayout: t, panelConstraints: n, pivotIndices: r,
|
|
|
10214
10268
|
let t = e < 0 ? d : u, r = n[t];
|
|
10215
10269
|
Z(r, `Panel constraints not found for index ${t}`);
|
|
10216
10270
|
let i = s[t], { collapsible: a, collapsedSize: o, minSize: c } = r;
|
|
10217
|
-
if (a &&
|
|
10271
|
+
if (a && cg(i, c) < 0) if (e > 0) {
|
|
10218
10272
|
let t = c - o, n = t / 2;
|
|
10219
|
-
|
|
10273
|
+
cg(i + e, c) < 0 && (e = cg(e, n) <= 0 ? 0 : t);
|
|
10220
10274
|
} else {
|
|
10221
10275
|
let t = c - o, n = 100 - t / 2;
|
|
10222
|
-
|
|
10276
|
+
cg(i - e, c) < 0 && (e = cg(100 + e, n) > 0 ? 0 : -t);
|
|
10223
10277
|
}
|
|
10224
10278
|
break;
|
|
10225
10279
|
}
|
|
@@ -10229,7 +10283,7 @@ function lg({ delta: e, initialLayout: t, panelConstraints: n, pivotIndices: r,
|
|
|
10229
10283
|
for (;;) {
|
|
10230
10284
|
let e = s[r];
|
|
10231
10285
|
Z(e != null, `Previous layout not found for panel index ${r}`);
|
|
10232
|
-
let a =
|
|
10286
|
+
let a = lg({
|
|
10233
10287
|
overrideDisabledPanels: o,
|
|
10234
10288
|
panelConstraints: n[r],
|
|
10235
10289
|
prevSize: e,
|
|
@@ -10245,55 +10299,55 @@ function lg({ delta: e, initialLayout: t, panelConstraints: n, pivotIndices: r,
|
|
|
10245
10299
|
for (; t >= 0 && t < n.length;) {
|
|
10246
10300
|
let r = Math.abs(e) - Math.abs(f), i = s[t];
|
|
10247
10301
|
Z(i != null, `Previous layout not found for panel index ${t}`);
|
|
10248
|
-
let a = i - r, c =
|
|
10302
|
+
let a = i - r, c = lg({
|
|
10249
10303
|
overrideDisabledPanels: o,
|
|
10250
10304
|
panelConstraints: n[t],
|
|
10251
10305
|
prevSize: i,
|
|
10252
10306
|
size: a
|
|
10253
10307
|
});
|
|
10254
|
-
if (!
|
|
10308
|
+
if (!sg(i, c) && (f += i - c, l[t] = c, f.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, { numeric: !0 }) >= 0)) break;
|
|
10255
10309
|
e < 0 ? t-- : t++;
|
|
10256
10310
|
}
|
|
10257
10311
|
}
|
|
10258
|
-
if (
|
|
10312
|
+
if (og(c, l)) return i;
|
|
10259
10313
|
{
|
|
10260
10314
|
let t = e < 0 ? d : u, r = s[t];
|
|
10261
10315
|
Z(r != null, `Previous layout not found for panel index ${t}`);
|
|
10262
|
-
let i = r + f, a =
|
|
10316
|
+
let i = r + f, a = lg({
|
|
10263
10317
|
overrideDisabledPanels: o,
|
|
10264
10318
|
panelConstraints: n[t],
|
|
10265
10319
|
prevSize: r,
|
|
10266
10320
|
size: i
|
|
10267
10321
|
});
|
|
10268
|
-
if (l[t] = a, !
|
|
10322
|
+
if (l[t] = a, !sg(a, i)) {
|
|
10269
10323
|
let t = i - a, r = e < 0 ? d : u;
|
|
10270
10324
|
for (; r >= 0 && r < n.length;) {
|
|
10271
10325
|
let i = l[r];
|
|
10272
10326
|
Z(i != null, `Previous layout not found for panel index ${r}`);
|
|
10273
|
-
let a = i + t, s =
|
|
10327
|
+
let a = i + t, s = lg({
|
|
10274
10328
|
overrideDisabledPanels: o,
|
|
10275
10329
|
panelConstraints: n[r],
|
|
10276
10330
|
prevSize: i,
|
|
10277
10331
|
size: a
|
|
10278
10332
|
});
|
|
10279
|
-
if (
|
|
10333
|
+
if (sg(i, s) || (t -= s - i, l[r] = s), sg(t, 0)) break;
|
|
10280
10334
|
e > 0 ? r-- : r++;
|
|
10281
10335
|
}
|
|
10282
10336
|
}
|
|
10283
10337
|
}
|
|
10284
|
-
if (!
|
|
10338
|
+
if (!sg(Object.values(l).reduce((e, t) => t + e, 0), 100, .1)) return i;
|
|
10285
10339
|
let p = Object.keys(i);
|
|
10286
10340
|
return l.reduce((e, t, n) => (e[p[n]] = t, e), {});
|
|
10287
10341
|
}
|
|
10288
|
-
function
|
|
10342
|
+
function dg(e, t) {
|
|
10289
10343
|
if (Object.keys(e).length !== Object.keys(t).length) return !1;
|
|
10290
|
-
for (let n in e) if (t[n] === void 0 ||
|
|
10344
|
+
for (let n in e) if (t[n] === void 0 || cg(e[n], t[n]) !== 0) return !1;
|
|
10291
10345
|
return !0;
|
|
10292
10346
|
}
|
|
10293
|
-
function
|
|
10347
|
+
function fg({ layout: e, panelConstraints: t }) {
|
|
10294
10348
|
let n = Object.values(e), r = [...n], i = r.reduce((e, t) => e + t, 0);
|
|
10295
10349
|
if (r.length !== t.length) throw Error(`Invalid ${t.length} panel layout: ${r.map((e) => `${e}%`).join(", ")}`);
|
|
10296
|
-
if (!
|
|
10350
|
+
if (!sg(i, 100) && r.length > 0) for (let e = 0; e < t.length; e++) {
|
|
10297
10351
|
let t = r[e];
|
|
10298
10352
|
Z(t != null, `No layout data found for index ${e}`), r[e] = 100 / i * t;
|
|
10299
10353
|
}
|
|
@@ -10303,7 +10357,7 @@ function dg({ layout: e, panelConstraints: t }) {
|
|
|
10303
10357
|
Z(i != null, `No layout data found for index ${e}`);
|
|
10304
10358
|
let o = r[e];
|
|
10305
10359
|
Z(o != null, `No layout data found for index ${e}`);
|
|
10306
|
-
let s =
|
|
10360
|
+
let s = lg({
|
|
10307
10361
|
overrideDisabledPanels: !0,
|
|
10308
10362
|
panelConstraints: t[e],
|
|
10309
10363
|
prevSize: i,
|
|
@@ -10311,23 +10365,23 @@ function dg({ layout: e, panelConstraints: t }) {
|
|
|
10311
10365
|
});
|
|
10312
10366
|
o != s && (a += o - s, r[e] = s);
|
|
10313
10367
|
}
|
|
10314
|
-
if (!
|
|
10368
|
+
if (!sg(a, 0)) for (let e = 0; e < t.length; e++) {
|
|
10315
10369
|
let n = r[e];
|
|
10316
10370
|
Z(n != null, `No layout data found for index ${e}`);
|
|
10317
|
-
let i = n + a, o =
|
|
10371
|
+
let i = n + a, o = lg({
|
|
10318
10372
|
overrideDisabledPanels: !0,
|
|
10319
10373
|
panelConstraints: t[e],
|
|
10320
10374
|
prevSize: n,
|
|
10321
10375
|
size: i
|
|
10322
10376
|
});
|
|
10323
|
-
if (n !== o && (a -= o - n, r[e] = o,
|
|
10377
|
+
if (n !== o && (a -= o - n, r[e] = o, sg(a, 0))) break;
|
|
10324
10378
|
}
|
|
10325
10379
|
let o = Object.keys(e);
|
|
10326
10380
|
return r.reduce((e, t, n) => (e[o[n]] = t, e), {});
|
|
10327
10381
|
}
|
|
10328
|
-
function
|
|
10382
|
+
function pg({ groupId: e, panelId: t }) {
|
|
10329
10383
|
let n = () => {
|
|
10330
|
-
let t =
|
|
10384
|
+
let t = Wh();
|
|
10331
10385
|
for (let [n, { defaultLayoutDeferred: r, derivedPanelConstraints: i, layout: a, groupSize: o, separatorToPanels: s }] of t) if (n.id === e) return {
|
|
10332
10386
|
defaultLayoutDeferred: r,
|
|
10333
10387
|
derivedPanelConstraints: i,
|
|
@@ -10353,15 +10407,15 @@ function fg({ groupId: e, panelId: t }) {
|
|
|
10353
10407
|
let o = a(), s = n.findIndex((e) => e.id === t), c = s === 0, l = s === n.length - 1;
|
|
10354
10408
|
if (l && e < o && (c || n.slice(0, s).every((e, t) => {
|
|
10355
10409
|
let n = i[t];
|
|
10356
|
-
return n?.collapsible &&
|
|
10410
|
+
return n?.collapsible && sg(n.collapsedSize, r[n.panelId]);
|
|
10357
10411
|
}))) {
|
|
10358
10412
|
let e = n.slice(0, s).reduce((e, t) => e + r[t.id], 0);
|
|
10359
10413
|
return {
|
|
10360
10414
|
...r,
|
|
10361
|
-
[t]:
|
|
10415
|
+
[t]: Eh(100 - e)
|
|
10362
10416
|
};
|
|
10363
10417
|
}
|
|
10364
|
-
return
|
|
10418
|
+
return ug({
|
|
10365
10419
|
delta: l ? o - e : e - o,
|
|
10366
10420
|
initialLayout: r,
|
|
10367
10421
|
panelConstraints: i,
|
|
@@ -10371,7 +10425,7 @@ function fg({ groupId: e, panelId: t }) {
|
|
|
10371
10425
|
});
|
|
10372
10426
|
}, s = (e) => {
|
|
10373
10427
|
if (e === a()) return;
|
|
10374
|
-
let { defaultLayoutDeferred: t, derivedPanelConstraints: r, group: i, groupSize: s, layout: c, separatorToPanels: l } = n(), u =
|
|
10428
|
+
let { defaultLayoutDeferred: t, derivedPanelConstraints: r, group: i, groupSize: s, layout: c, separatorToPanels: l } = n(), u = fg({
|
|
10375
10429
|
layout: o({
|
|
10376
10430
|
nextSize: e,
|
|
10377
10431
|
panels: i.panels,
|
|
@@ -10380,7 +10434,7 @@ function fg({ groupId: e, panelId: t }) {
|
|
|
10380
10434
|
}),
|
|
10381
10435
|
panelConstraints: r
|
|
10382
10436
|
});
|
|
10383
|
-
|
|
10437
|
+
dg(c, u) || Kh(i, {
|
|
10384
10438
|
defaultLayoutDeferred: t,
|
|
10385
10439
|
derivedPanelConstraints: r,
|
|
10386
10440
|
groupSize: s,
|
|
@@ -10409,11 +10463,11 @@ function fg({ groupId: e, panelId: t }) {
|
|
|
10409
10463
|
},
|
|
10410
10464
|
isCollapsed: () => {
|
|
10411
10465
|
let { collapsible: e, collapsedSize: t } = r(), n = a();
|
|
10412
|
-
return e &&
|
|
10466
|
+
return e && sg(t, n);
|
|
10413
10467
|
},
|
|
10414
10468
|
resize: (e) => {
|
|
10415
|
-
let { group: t } = n(), { element: r } = i(), a =
|
|
10416
|
-
s(Th(
|
|
10469
|
+
let { group: t } = n(), { element: r } = i(), a = Dh({ group: t });
|
|
10470
|
+
s(Eh(Th({
|
|
10417
10471
|
groupSize: a,
|
|
10418
10472
|
panelElement: r,
|
|
10419
10473
|
styleProp: e
|
|
@@ -10421,12 +10475,12 @@ function fg({ groupId: e, panelId: t }) {
|
|
|
10421
10475
|
}
|
|
10422
10476
|
};
|
|
10423
10477
|
}
|
|
10424
|
-
function
|
|
10425
|
-
e.defaultPrevented ||
|
|
10478
|
+
function mg(e) {
|
|
10479
|
+
e.defaultPrevented || ag(e, Wh()).forEach((t) => {
|
|
10426
10480
|
if (t.separator && !t.separator.disableDoubleClick) {
|
|
10427
10481
|
let n = t.panels.find((e) => e.panelConstraints.defaultSize !== void 0);
|
|
10428
10482
|
if (n) {
|
|
10429
|
-
let r = n.panelConstraints.defaultSize, i =
|
|
10483
|
+
let r = n.panelConstraints.defaultSize, i = pg({
|
|
10430
10484
|
groupId: t.group.id,
|
|
10431
10485
|
panelId: n.id
|
|
10432
10486
|
});
|
|
@@ -10435,14 +10489,14 @@ function pg(e) {
|
|
|
10435
10489
|
}
|
|
10436
10490
|
});
|
|
10437
10491
|
}
|
|
10438
|
-
function
|
|
10439
|
-
let t =
|
|
10492
|
+
function hg(e) {
|
|
10493
|
+
let t = Wh();
|
|
10440
10494
|
for (let [n] of t) if (n.separators.some((t) => t.element === e)) return n;
|
|
10441
10495
|
throw Error("Could not find parent Group for separator element");
|
|
10442
10496
|
}
|
|
10443
|
-
function
|
|
10497
|
+
function gg({ groupId: e }) {
|
|
10444
10498
|
let t = () => {
|
|
10445
|
-
let t =
|
|
10499
|
+
let t = Wh();
|
|
10446
10500
|
for (let [n, r] of t) if (n.id === e) return {
|
|
10447
10501
|
group: n,
|
|
10448
10502
|
...r
|
|
@@ -10455,11 +10509,11 @@ function hg({ groupId: e }) {
|
|
|
10455
10509
|
return e ? {} : n;
|
|
10456
10510
|
},
|
|
10457
10511
|
setLayout(e) {
|
|
10458
|
-
let { defaultLayoutDeferred: n, derivedPanelConstraints: r, group: i, groupSize: a, layout: o, separatorToPanels: s } = t(), c =
|
|
10512
|
+
let { defaultLayoutDeferred: n, derivedPanelConstraints: r, group: i, groupSize: a, layout: o, separatorToPanels: s } = t(), c = fg({
|
|
10459
10513
|
layout: e,
|
|
10460
10514
|
panelConstraints: r
|
|
10461
10515
|
});
|
|
10462
|
-
return n ? o : (
|
|
10516
|
+
return n ? o : (dg(o, c) || Kh(i, {
|
|
10463
10517
|
defaultLayoutDeferred: n,
|
|
10464
10518
|
derivedPanelConstraints: r,
|
|
10465
10519
|
groupSize: a,
|
|
@@ -10469,13 +10523,13 @@ function hg({ groupId: e }) {
|
|
|
10469
10523
|
}
|
|
10470
10524
|
};
|
|
10471
10525
|
}
|
|
10472
|
-
function
|
|
10473
|
-
let n =
|
|
10526
|
+
function _g(e, t) {
|
|
10527
|
+
let n = hg(e), r = Uh(n.id, !0), i = n.separators.find((t) => t.element === e);
|
|
10474
10528
|
Z(i, "Matching separator not found");
|
|
10475
10529
|
let a = r.separatorToPanels.get(i);
|
|
10476
10530
|
Z(a, "Matching panels not found");
|
|
10477
|
-
let o = a.map((e) => n.panels.indexOf(e)), s =
|
|
10478
|
-
layout:
|
|
10531
|
+
let o = a.map((e) => n.panels.indexOf(e)), s = gg({ groupId: n.id }).getLayout(), c = fg({
|
|
10532
|
+
layout: ug({
|
|
10479
10533
|
delta: t,
|
|
10480
10534
|
initialLayout: s,
|
|
10481
10535
|
panelConstraints: r.derivedPanelConstraints,
|
|
@@ -10485,7 +10539,7 @@ function gg(e, t) {
|
|
|
10485
10539
|
}),
|
|
10486
10540
|
panelConstraints: r.derivedPanelConstraints
|
|
10487
10541
|
});
|
|
10488
|
-
|
|
10542
|
+
dg(s, c) || Kh(n, {
|
|
10489
10543
|
defaultLayoutDeferred: r.defaultLayoutDeferred,
|
|
10490
10544
|
derivedPanelConstraints: r.derivedPanelConstraints,
|
|
10491
10545
|
groupSize: r.groupSize,
|
|
@@ -10493,76 +10547,76 @@ function gg(e, t) {
|
|
|
10493
10547
|
separatorToPanels: r.separatorToPanels
|
|
10494
10548
|
});
|
|
10495
10549
|
}
|
|
10496
|
-
function
|
|
10550
|
+
function vg(e) {
|
|
10497
10551
|
if (e.defaultPrevented) return;
|
|
10498
|
-
let t = e.currentTarget, n =
|
|
10552
|
+
let t = e.currentTarget, n = hg(t);
|
|
10499
10553
|
if (!n.disabled) switch (e.key) {
|
|
10500
10554
|
case "ArrowDown":
|
|
10501
|
-
e.preventDefault(), n.orientation === "vertical" &&
|
|
10555
|
+
e.preventDefault(), n.orientation === "vertical" && _g(t, 5);
|
|
10502
10556
|
break;
|
|
10503
10557
|
case "ArrowLeft":
|
|
10504
|
-
e.preventDefault(), n.orientation === "horizontal" &&
|
|
10558
|
+
e.preventDefault(), n.orientation === "horizontal" && _g(t, -5);
|
|
10505
10559
|
break;
|
|
10506
10560
|
case "ArrowRight":
|
|
10507
|
-
e.preventDefault(), n.orientation === "horizontal" &&
|
|
10561
|
+
e.preventDefault(), n.orientation === "horizontal" && _g(t, 5);
|
|
10508
10562
|
break;
|
|
10509
10563
|
case "ArrowUp":
|
|
10510
|
-
e.preventDefault(), n.orientation === "vertical" &&
|
|
10564
|
+
e.preventDefault(), n.orientation === "vertical" && _g(t, -5);
|
|
10511
10565
|
break;
|
|
10512
10566
|
case "End":
|
|
10513
|
-
e.preventDefault(),
|
|
10567
|
+
e.preventDefault(), _g(t, 100);
|
|
10514
10568
|
break;
|
|
10515
10569
|
case "Enter": {
|
|
10516
10570
|
e.preventDefault();
|
|
10517
|
-
let n =
|
|
10571
|
+
let n = hg(t), { derivedPanelConstraints: r, layout: i, separatorToPanels: a } = Uh(n.id, !0), o = n.separators.find((e) => e.element === t);
|
|
10518
10572
|
Z(o, "Matching separator not found");
|
|
10519
10573
|
let s = a.get(o);
|
|
10520
10574
|
Z(s, "Matching panels not found");
|
|
10521
10575
|
let c = s[0], l = r.find((e) => e.panelId === c.id);
|
|
10522
10576
|
if (Z(l, "Panel metadata not found"), l.collapsible) {
|
|
10523
10577
|
let e = i[c.id];
|
|
10524
|
-
|
|
10578
|
+
_g(t, (l.collapsedSize === e ? n.mutableState.expandedPanelSizes[c.id] ?? l.minSize : l.collapsedSize) - e);
|
|
10525
10579
|
}
|
|
10526
10580
|
break;
|
|
10527
10581
|
}
|
|
10528
10582
|
case "F6": {
|
|
10529
10583
|
e.preventDefault();
|
|
10530
|
-
let n =
|
|
10584
|
+
let n = hg(t).separators.map((e) => e.element), r = Array.from(n).findIndex((t) => t === e.currentTarget);
|
|
10531
10585
|
Z(r !== null, "Index not found"), n[e.shiftKey ? r > 0 ? r - 1 : n.length - 1 : r + 1 < n.length ? r + 1 : 0].focus({ preventScroll: !0 });
|
|
10532
10586
|
break;
|
|
10533
10587
|
}
|
|
10534
10588
|
case "Home":
|
|
10535
|
-
e.preventDefault(),
|
|
10589
|
+
e.preventDefault(), _g(t, -100);
|
|
10536
10590
|
break;
|
|
10537
10591
|
}
|
|
10538
10592
|
}
|
|
10539
|
-
var
|
|
10593
|
+
var yg = {
|
|
10540
10594
|
cursorFlags: 0,
|
|
10541
10595
|
state: "inactive"
|
|
10542
|
-
},
|
|
10543
|
-
function
|
|
10544
|
-
return
|
|
10545
|
-
}
|
|
10546
|
-
function xg(e) {
|
|
10547
|
-
return yg.addListener("change", e);
|
|
10596
|
+
}, bg = new Rh();
|
|
10597
|
+
function xg() {
|
|
10598
|
+
return yg;
|
|
10548
10599
|
}
|
|
10549
10600
|
function Sg(e) {
|
|
10550
|
-
|
|
10551
|
-
|
|
10601
|
+
return bg.addListener("change", e);
|
|
10602
|
+
}
|
|
10603
|
+
function Cg(e) {
|
|
10604
|
+
let t = yg, n = { ...yg };
|
|
10605
|
+
n.cursorFlags = e, yg = n, bg.emit("change", {
|
|
10552
10606
|
prev: t,
|
|
10553
10607
|
next: n
|
|
10554
10608
|
});
|
|
10555
10609
|
}
|
|
10556
|
-
function
|
|
10557
|
-
let t =
|
|
10558
|
-
|
|
10610
|
+
function wg(e) {
|
|
10611
|
+
let t = yg;
|
|
10612
|
+
yg = e, bg.emit("change", {
|
|
10559
10613
|
prev: t,
|
|
10560
10614
|
next: e
|
|
10561
10615
|
});
|
|
10562
10616
|
}
|
|
10563
|
-
function
|
|
10617
|
+
function Tg(e) {
|
|
10564
10618
|
if (e.defaultPrevented || e.pointerType === "mouse" && e.button > 0) return;
|
|
10565
|
-
let t =
|
|
10619
|
+
let t = Wh(), n = ag(e, t), r = /* @__PURE__ */ new Map(), i = !1;
|
|
10566
10620
|
n.forEach((e) => {
|
|
10567
10621
|
e.separator && (i || (i = !0, e.separator.element.focus({
|
|
10568
10622
|
focusVisible: !1,
|
|
@@ -10570,7 +10624,7 @@ function wg(e) {
|
|
|
10570
10624
|
})));
|
|
10571
10625
|
let n = t.get(e.group);
|
|
10572
10626
|
n && r.set(e.group, n.layout);
|
|
10573
|
-
}),
|
|
10627
|
+
}), wg({
|
|
10574
10628
|
cursorFlags: 0,
|
|
10575
10629
|
hitRegions: n,
|
|
10576
10630
|
initialLayoutMap: r,
|
|
@@ -10581,11 +10635,11 @@ function wg(e) {
|
|
|
10581
10635
|
state: "active"
|
|
10582
10636
|
}), n.length && e.preventDefault();
|
|
10583
10637
|
}
|
|
10584
|
-
var
|
|
10585
|
-
function
|
|
10586
|
-
return
|
|
10638
|
+
var Eg = (e) => e, Dg = () => {}, Og = 1, kg = 2, Ag = 4, jg = 8, Mg = 3, Ng = 12, Pg;
|
|
10639
|
+
function Fg() {
|
|
10640
|
+
return Pg === void 0 && (Pg = !1, typeof window < "u" && (window.navigator.userAgent.includes("Chrome") || window.navigator.userAgent.includes("Firefox")) && (Pg = !0)), Pg;
|
|
10587
10641
|
}
|
|
10588
|
-
function
|
|
10642
|
+
function Ig({ cursorFlags: e, groups: t, state: n }) {
|
|
10589
10643
|
let r = 0, i = 0;
|
|
10590
10644
|
switch (n) {
|
|
10591
10645
|
case "active":
|
|
@@ -10603,8 +10657,8 @@ function Fg({ cursorFlags: e, groups: t, state: n }) {
|
|
|
10603
10657
|
if (!(r === 0 && i === 0)) {
|
|
10604
10658
|
switch (n) {
|
|
10605
10659
|
case "active":
|
|
10606
|
-
if (e &&
|
|
10607
|
-
let t = (e &
|
|
10660
|
+
if (e && Fg()) {
|
|
10661
|
+
let t = (e & Og) !== 0, n = (e & kg) !== 0, r = (e & Ag) !== 0, i = (e & jg) !== 0;
|
|
10608
10662
|
if (t) return r ? "se-resize" : i ? "ne-resize" : "e-resize";
|
|
10609
10663
|
if (n) return r ? "sw-resize" : i ? "nw-resize" : "w-resize";
|
|
10610
10664
|
if (r) return "s-resize";
|
|
@@ -10612,19 +10666,19 @@ function Fg({ cursorFlags: e, groups: t, state: n }) {
|
|
|
10612
10666
|
}
|
|
10613
10667
|
break;
|
|
10614
10668
|
}
|
|
10615
|
-
return
|
|
10669
|
+
return Fg() ? r > 0 && i > 0 ? "move" : r > 0 ? "ew-resize" : "ns-resize" : r > 0 && i > 0 ? "grab" : r > 0 ? "col-resize" : "row-resize";
|
|
10616
10670
|
}
|
|
10617
10671
|
}
|
|
10618
|
-
var
|
|
10619
|
-
function
|
|
10672
|
+
var Lg = /* @__PURE__ */ new WeakMap();
|
|
10673
|
+
function Rg(e) {
|
|
10620
10674
|
if (e.defaultView === null || e.defaultView === void 0) return;
|
|
10621
|
-
let { prevStyle: t, styleSheet: n } =
|
|
10675
|
+
let { prevStyle: t, styleSheet: n } = Lg.get(e) ?? {};
|
|
10622
10676
|
n === void 0 && (n = new e.defaultView.CSSStyleSheet(), e.adoptedStyleSheets && (Object.isExtensible(e.adoptedStyleSheets) ? e.adoptedStyleSheets.push(n) : e.adoptedStyleSheets = [...e.adoptedStyleSheets, n]));
|
|
10623
|
-
let r =
|
|
10677
|
+
let r = xg();
|
|
10624
10678
|
switch (r.state) {
|
|
10625
10679
|
case "active":
|
|
10626
10680
|
case "hover": {
|
|
10627
|
-
let e =
|
|
10681
|
+
let e = Ig({
|
|
10628
10682
|
cursorFlags: r.cursorFlags,
|
|
10629
10683
|
groups: r.hitRegions.map((e) => e.group),
|
|
10630
10684
|
state: r.state
|
|
@@ -10637,12 +10691,12 @@ function Lg(e) {
|
|
|
10637
10691
|
t = void 0, n.cssRules.length === 1 && n.deleteRule(0);
|
|
10638
10692
|
break;
|
|
10639
10693
|
}
|
|
10640
|
-
|
|
10694
|
+
Lg.set(e, {
|
|
10641
10695
|
prevStyle: t,
|
|
10642
10696
|
styleSheet: n
|
|
10643
10697
|
});
|
|
10644
10698
|
}
|
|
10645
|
-
function
|
|
10699
|
+
function zg({ document: e, event: t, hitRegions: n, initialLayoutMap: r, mountedGroups: i, pointerDownAtPoint: a, prevCursorFlags: o }) {
|
|
10646
10700
|
let s = 0;
|
|
10647
10701
|
n.forEach((e) => {
|
|
10648
10702
|
let { group: n, groupSize: o } = e, { orientation: c, panels: l } = n, { disableCursor: u } = n.mutableState, d = 0;
|
|
@@ -10651,7 +10705,7 @@ function Rg({ document: e, event: t, hitRegions: n, initialLayoutMap: r, mounted
|
|
|
10651
10705
|
if (!f || !p) return;
|
|
10652
10706
|
let { defaultLayoutDeferred: m, derivedPanelConstraints: h, groupSize: g, layout: _, separatorToPanels: v } = p;
|
|
10653
10707
|
if (h && _ && v) {
|
|
10654
|
-
let t =
|
|
10708
|
+
let t = ug({
|
|
10655
10709
|
delta: d,
|
|
10656
10710
|
initialLayout: f,
|
|
10657
10711
|
panelConstraints: h,
|
|
@@ -10659,16 +10713,16 @@ function Rg({ document: e, event: t, hitRegions: n, initialLayoutMap: r, mounted
|
|
|
10659
10713
|
prevLayout: _,
|
|
10660
10714
|
trigger: "mouse-or-touch"
|
|
10661
10715
|
});
|
|
10662
|
-
if (
|
|
10716
|
+
if (dg(t, _)) {
|
|
10663
10717
|
if (d !== 0 && !u) switch (c) {
|
|
10664
10718
|
case "horizontal":
|
|
10665
|
-
s |= d < 0 ?
|
|
10719
|
+
s |= d < 0 ? Og : kg;
|
|
10666
10720
|
break;
|
|
10667
10721
|
case "vertical":
|
|
10668
|
-
s |= d < 0 ?
|
|
10722
|
+
s |= d < 0 ? Ag : jg;
|
|
10669
10723
|
break;
|
|
10670
10724
|
}
|
|
10671
|
-
} else
|
|
10725
|
+
} else Kh(e.group, {
|
|
10672
10726
|
defaultLayoutDeferred: m,
|
|
10673
10727
|
derivedPanelConstraints: h,
|
|
10674
10728
|
groupSize: g,
|
|
@@ -10678,12 +10732,12 @@ function Rg({ document: e, event: t, hitRegions: n, initialLayoutMap: r, mounted
|
|
|
10678
10732
|
}
|
|
10679
10733
|
});
|
|
10680
10734
|
let c = 0;
|
|
10681
|
-
t.movementX === 0 ? c |= o &
|
|
10735
|
+
t.movementX === 0 ? c |= o & Mg : c |= s & Mg, t.movementY === 0 ? c |= o & Ng : c |= s & Ng, Cg(c), Rg(e);
|
|
10682
10736
|
}
|
|
10683
|
-
function
|
|
10684
|
-
let t =
|
|
10737
|
+
function Bg(e) {
|
|
10738
|
+
let t = Wh(), n = xg();
|
|
10685
10739
|
switch (n.state) {
|
|
10686
|
-
case "active":
|
|
10740
|
+
case "active": zg({
|
|
10687
10741
|
document: e.currentTarget,
|
|
10688
10742
|
event: e,
|
|
10689
10743
|
hitRegions: n.hitRegions,
|
|
@@ -10693,18 +10747,18 @@ function zg(e) {
|
|
|
10693
10747
|
});
|
|
10694
10748
|
}
|
|
10695
10749
|
}
|
|
10696
|
-
function
|
|
10750
|
+
function Vg(e) {
|
|
10697
10751
|
if (e.defaultPrevented) return;
|
|
10698
|
-
let t =
|
|
10752
|
+
let t = xg(), n = Wh();
|
|
10699
10753
|
switch (t.state) {
|
|
10700
10754
|
case "active":
|
|
10701
10755
|
if (e.buttons === 0) {
|
|
10702
|
-
|
|
10756
|
+
wg({
|
|
10703
10757
|
cursorFlags: 0,
|
|
10704
10758
|
state: "inactive"
|
|
10705
10759
|
}), t.hitRegions.forEach((e) => {
|
|
10706
|
-
let t =
|
|
10707
|
-
|
|
10760
|
+
let t = Uh(e.group.id, !0);
|
|
10761
|
+
Kh(e.group, t);
|
|
10708
10762
|
});
|
|
10709
10763
|
return;
|
|
10710
10764
|
}
|
|
@@ -10712,7 +10766,7 @@ function Bg(e) {
|
|
|
10712
10766
|
let { element: t } = n.separator;
|
|
10713
10767
|
t.hasPointerCapture?.(e.pointerId) || t.setPointerCapture?.(e.pointerId);
|
|
10714
10768
|
}
|
|
10715
|
-
|
|
10769
|
+
zg({
|
|
10716
10770
|
document: e.currentTarget,
|
|
10717
10771
|
event: e,
|
|
10718
10772
|
hitRegions: t.hitRegions,
|
|
@@ -10723,70 +10777,70 @@ function Bg(e) {
|
|
|
10723
10777
|
});
|
|
10724
10778
|
break;
|
|
10725
10779
|
default: {
|
|
10726
|
-
let r =
|
|
10727
|
-
r.length === 0 ? t.state !== "inactive" &&
|
|
10780
|
+
let r = ag(e, n);
|
|
10781
|
+
r.length === 0 ? t.state !== "inactive" && wg({
|
|
10728
10782
|
cursorFlags: 0,
|
|
10729
10783
|
state: "inactive"
|
|
10730
|
-
}) :
|
|
10784
|
+
}) : wg({
|
|
10731
10785
|
cursorFlags: 0,
|
|
10732
10786
|
hitRegions: r,
|
|
10733
10787
|
state: "hover"
|
|
10734
|
-
}),
|
|
10788
|
+
}), Rg(e.currentTarget);
|
|
10735
10789
|
break;
|
|
10736
10790
|
}
|
|
10737
10791
|
}
|
|
10738
10792
|
}
|
|
10739
|
-
function
|
|
10740
|
-
if (e.relatedTarget instanceof HTMLIFrameElement) switch (
|
|
10741
|
-
case "hover":
|
|
10793
|
+
function Hg(e) {
|
|
10794
|
+
if (e.relatedTarget instanceof HTMLIFrameElement) switch (xg().state) {
|
|
10795
|
+
case "hover": wg({
|
|
10742
10796
|
cursorFlags: 0,
|
|
10743
10797
|
state: "inactive"
|
|
10744
10798
|
});
|
|
10745
10799
|
}
|
|
10746
10800
|
}
|
|
10747
|
-
function
|
|
10801
|
+
function Ug(e) {
|
|
10748
10802
|
if (e.defaultPrevented || e.pointerType === "mouse" && e.button > 0) return;
|
|
10749
|
-
let t =
|
|
10803
|
+
let t = xg();
|
|
10750
10804
|
switch (t.state) {
|
|
10751
|
-
case "active":
|
|
10805
|
+
case "active": wg({
|
|
10752
10806
|
cursorFlags: 0,
|
|
10753
10807
|
state: "inactive"
|
|
10754
|
-
}), t.hitRegions.length > 0 && (
|
|
10755
|
-
let t =
|
|
10756
|
-
|
|
10808
|
+
}), t.hitRegions.length > 0 && (Rg(e.currentTarget), t.hitRegions.forEach((e) => {
|
|
10809
|
+
let t = Uh(e.group.id, !0);
|
|
10810
|
+
Kh(e.group, t);
|
|
10757
10811
|
}), e.preventDefault());
|
|
10758
10812
|
}
|
|
10759
10813
|
}
|
|
10760
|
-
function
|
|
10814
|
+
function Wg(e) {
|
|
10761
10815
|
let t = 0, n = 0, r = {};
|
|
10762
10816
|
for (let i of e) if (i.defaultSize !== void 0) {
|
|
10763
10817
|
t++;
|
|
10764
|
-
let e =
|
|
10818
|
+
let e = Eh(i.defaultSize);
|
|
10765
10819
|
n += e, r[i.panelId] = e;
|
|
10766
10820
|
} else r[i.panelId] = void 0;
|
|
10767
10821
|
let i = e.length - t;
|
|
10768
10822
|
if (i !== 0) {
|
|
10769
|
-
let t =
|
|
10823
|
+
let t = Eh((100 - n) / i);
|
|
10770
10824
|
for (let n of e) n.defaultSize === void 0 && (r[n.panelId] = t);
|
|
10771
10825
|
}
|
|
10772
10826
|
return r;
|
|
10773
10827
|
}
|
|
10774
|
-
function
|
|
10828
|
+
function Gg(e, t, n) {
|
|
10775
10829
|
if (!n[0]) return;
|
|
10776
10830
|
let r = e.panels.find((e) => e.element === t);
|
|
10777
10831
|
if (!r || !r.onResize) return;
|
|
10778
|
-
let i =
|
|
10779
|
-
asPercentage:
|
|
10832
|
+
let i = Dh({ group: e }), a = e.orientation === "horizontal" ? r.element.offsetWidth : r.element.offsetHeight, o = r.mutableValues.prevSize, s = {
|
|
10833
|
+
asPercentage: Eh(a / i * 100),
|
|
10780
10834
|
inPixels: a
|
|
10781
10835
|
};
|
|
10782
10836
|
r.mutableValues.prevSize = s, r.onResize(s, r.id, o);
|
|
10783
10837
|
}
|
|
10784
|
-
function
|
|
10838
|
+
function Kg(e, t) {
|
|
10785
10839
|
if (Object.keys(e).length !== Object.keys(t).length) return !1;
|
|
10786
10840
|
for (let n in e) if (e[n] !== t[n]) return !1;
|
|
10787
10841
|
return !0;
|
|
10788
10842
|
}
|
|
10789
|
-
function
|
|
10843
|
+
function qg({ group: e, nextGroupSize: t, prevGroupSize: n, prevLayout: r }) {
|
|
10790
10844
|
if (n <= 0 || t <= 0 || n === t) return r;
|
|
10791
10845
|
let i = 0, a = 0, o = !1, s = /* @__PURE__ */ new Map(), c = [];
|
|
10792
10846
|
for (let l of e.panels) {
|
|
@@ -10794,7 +10848,7 @@ function Kg({ group: e, nextGroupSize: t, prevGroupSize: n, prevLayout: r }) {
|
|
|
10794
10848
|
switch (l.panelConstraints.groupResizeBehavior) {
|
|
10795
10849
|
case "preserve-pixel-size": {
|
|
10796
10850
|
o = !0;
|
|
10797
|
-
let r =
|
|
10851
|
+
let r = Eh(e / 100 * n / t * 100);
|
|
10798
10852
|
s.set(l.id, r), i += r;
|
|
10799
10853
|
break;
|
|
10800
10854
|
}
|
|
@@ -10807,21 +10861,21 @@ function Kg({ group: e, nextGroupSize: t, prevGroupSize: n, prevLayout: r }) {
|
|
|
10807
10861
|
let l = 100 - i, u = { ...r };
|
|
10808
10862
|
if (s.forEach((e, t) => {
|
|
10809
10863
|
u[t] = e;
|
|
10810
|
-
}), a > 0) for (let e of c) u[e] =
|
|
10864
|
+
}), a > 0) for (let e of c) u[e] = Eh((r[e] ?? 0) / a * l);
|
|
10811
10865
|
else {
|
|
10812
|
-
let e =
|
|
10866
|
+
let e = Eh(l / c.length);
|
|
10813
10867
|
for (let t of c) u[t] = e;
|
|
10814
10868
|
}
|
|
10815
10869
|
return u;
|
|
10816
10870
|
}
|
|
10817
|
-
function
|
|
10871
|
+
function Jg(e, t) {
|
|
10818
10872
|
let n = e.map((e) => e.id), r = Object.keys(t);
|
|
10819
10873
|
if (n.length !== r.length) return !1;
|
|
10820
10874
|
for (let e of n) if (!r.includes(e)) return !1;
|
|
10821
10875
|
return !0;
|
|
10822
10876
|
}
|
|
10823
|
-
var
|
|
10824
|
-
function
|
|
10877
|
+
var Yg = /* @__PURE__ */ new Map();
|
|
10878
|
+
function Xg(e) {
|
|
10825
10879
|
let t = !0;
|
|
10826
10880
|
Z(e.element.ownerDocument.defaultView, "Cannot register an unmounted Group");
|
|
10827
10881
|
let n = e.element.ownerDocument.defaultView.ResizeObserver, r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), a = new n((n) => {
|
|
@@ -10829,12 +10883,12 @@ function Yg(e) {
|
|
|
10829
10883
|
let { borderBoxSize: n, target: i } = r;
|
|
10830
10884
|
if (i === e.element) {
|
|
10831
10885
|
if (t) {
|
|
10832
|
-
let t =
|
|
10886
|
+
let t = Dh({ group: e });
|
|
10833
10887
|
if (t === 0) return;
|
|
10834
|
-
let n =
|
|
10888
|
+
let n = Uh(e.id);
|
|
10835
10889
|
if (!n) return;
|
|
10836
|
-
let r =
|
|
10837
|
-
layout:
|
|
10890
|
+
let r = Oh(e), i = n.defaultLayoutDeferred ? Wg(r) : n.layout, a = fg({
|
|
10891
|
+
layout: qg({
|
|
10838
10892
|
group: e,
|
|
10839
10893
|
nextGroupSize: t,
|
|
10840
10894
|
prevGroupSize: n.groupSize,
|
|
@@ -10842,8 +10896,8 @@ function Yg(e) {
|
|
|
10842
10896
|
}),
|
|
10843
10897
|
panelConstraints: r
|
|
10844
10898
|
});
|
|
10845
|
-
if (!n.defaultLayoutDeferred &&
|
|
10846
|
-
|
|
10899
|
+
if (!n.defaultLayoutDeferred && dg(n.layout, a) && Kg(n.derivedPanelConstraints, r) && n.groupSize === t) return;
|
|
10900
|
+
Kh(e, {
|
|
10847
10901
|
defaultLayoutDeferred: !1,
|
|
10848
10902
|
derivedPanelConstraints: r,
|
|
10849
10903
|
groupSize: t,
|
|
@@ -10851,53 +10905,53 @@ function Yg(e) {
|
|
|
10851
10905
|
separatorToPanels: n.separatorToPanels
|
|
10852
10906
|
});
|
|
10853
10907
|
}
|
|
10854
|
-
} else
|
|
10908
|
+
} else Gg(e, i, n);
|
|
10855
10909
|
}
|
|
10856
10910
|
});
|
|
10857
10911
|
a.observe(e.element), e.panels.forEach((e) => {
|
|
10858
10912
|
Z(!r.has(e.id), `Panel ids must be unique; id "${e.id}" was used more than once`), r.add(e.id), e.onResize && a.observe(e.element);
|
|
10859
10913
|
});
|
|
10860
|
-
let o =
|
|
10861
|
-
l && (
|
|
10862
|
-
let u =
|
|
10863
|
-
layout: e.mutableState.layouts[c] ?? l ??
|
|
10914
|
+
let o = Dh({ group: e }), s = Oh(e), c = e.panels.map(({ id: e }) => e).join(","), l = e.mutableState.defaultLayout;
|
|
10915
|
+
l && (Jg(e.panels, l) || (l = void 0));
|
|
10916
|
+
let u = fg({
|
|
10917
|
+
layout: e.mutableState.layouts[c] ?? l ?? Wg(s),
|
|
10864
10918
|
panelConstraints: s
|
|
10865
10919
|
}), d = e.element.ownerDocument;
|
|
10866
|
-
|
|
10920
|
+
Yg.set(d, (Yg.get(d) ?? 0) + 1);
|
|
10867
10921
|
let f = /* @__PURE__ */ new Map();
|
|
10868
|
-
return
|
|
10922
|
+
return Lh(e).forEach((e) => {
|
|
10869
10923
|
e.separator && f.set(e.separator, e.panels);
|
|
10870
|
-
}),
|
|
10924
|
+
}), Kh(e, {
|
|
10871
10925
|
defaultLayoutDeferred: o === 0,
|
|
10872
10926
|
derivedPanelConstraints: s,
|
|
10873
10927
|
groupSize: o,
|
|
10874
10928
|
layout: u,
|
|
10875
10929
|
separatorToPanels: f
|
|
10876
10930
|
}), e.separators.forEach((e) => {
|
|
10877
|
-
Z(!i.has(e.id), `Separator ids must be unique; id "${e.id}" was used more than once`), i.add(e.id), e.element.addEventListener("keydown",
|
|
10878
|
-
}),
|
|
10879
|
-
t = !1,
|
|
10880
|
-
e.element.removeEventListener("keydown",
|
|
10881
|
-
}),
|
|
10931
|
+
Z(!i.has(e.id), `Separator ids must be unique; id "${e.id}" was used more than once`), i.add(e.id), e.element.addEventListener("keydown", vg);
|
|
10932
|
+
}), Yg.get(d) === 1 && (d.addEventListener("dblclick", mg, !0), d.addEventListener("pointerdown", Tg, !0), d.addEventListener("pointerleave", Bg), d.addEventListener("pointermove", Vg), d.addEventListener("pointerout", Hg), d.addEventListener("pointerup", Ug, !0)), function() {
|
|
10933
|
+
t = !1, Yg.set(d, Math.max(0, (Yg.get(d) ?? 0) - 1)), Vh(e), e.separators.forEach((e) => {
|
|
10934
|
+
e.element.removeEventListener("keydown", vg);
|
|
10935
|
+
}), Yg.get(d) || (d.removeEventListener("dblclick", mg, !0), d.removeEventListener("pointerdown", Tg, !0), d.removeEventListener("pointerleave", Bg), d.removeEventListener("pointermove", Vg), d.removeEventListener("pointerout", Hg), d.removeEventListener("pointerup", Ug, !0)), a.disconnect();
|
|
10882
10936
|
};
|
|
10883
10937
|
}
|
|
10884
|
-
function
|
|
10938
|
+
function Zg() {
|
|
10885
10939
|
let [e, t] = U({});
|
|
10886
10940
|
return [e, V(() => t({}), [])];
|
|
10887
10941
|
}
|
|
10888
|
-
function
|
|
10942
|
+
function Qg(e) {
|
|
10889
10943
|
let t = Gn();
|
|
10890
10944
|
return `${e ?? t}`;
|
|
10891
10945
|
}
|
|
10892
|
-
var
|
|
10893
|
-
function
|
|
10946
|
+
var $g = typeof window < "u" ? qn : H;
|
|
10947
|
+
function e_(e) {
|
|
10894
10948
|
let t = Yn(e);
|
|
10895
|
-
return
|
|
10949
|
+
return $g(() => {
|
|
10896
10950
|
t.current = e;
|
|
10897
10951
|
}, [e]), V((...e) => t.current?.(...e), [t]);
|
|
10898
10952
|
}
|
|
10899
|
-
function
|
|
10900
|
-
return
|
|
10953
|
+
function t_(...e) {
|
|
10954
|
+
return e_((t) => {
|
|
10901
10955
|
e.forEach((e) => {
|
|
10902
10956
|
if (e) switch (typeof e) {
|
|
10903
10957
|
case "function":
|
|
@@ -10910,43 +10964,43 @@ function e_(...e) {
|
|
|
10910
10964
|
});
|
|
10911
10965
|
});
|
|
10912
10966
|
}
|
|
10913
|
-
function
|
|
10967
|
+
function n_(e) {
|
|
10914
10968
|
let t = Yn({ ...e });
|
|
10915
|
-
return
|
|
10969
|
+
return $g(() => {
|
|
10916
10970
|
for (let n in e) t.current[n] = e[n];
|
|
10917
10971
|
}, [e]), t.current;
|
|
10918
10972
|
}
|
|
10919
|
-
var
|
|
10920
|
-
function
|
|
10973
|
+
var r_ = Vn(null);
|
|
10974
|
+
function i_(e, t) {
|
|
10921
10975
|
let n = Yn({
|
|
10922
10976
|
getLayout: () => ({}),
|
|
10923
|
-
setLayout:
|
|
10977
|
+
setLayout: Eg
|
|
10924
10978
|
});
|
|
10925
|
-
Kn(t, () => n.current, []),
|
|
10926
|
-
Object.assign(n.current,
|
|
10979
|
+
Kn(t, () => n.current, []), $g(() => {
|
|
10980
|
+
Object.assign(n.current, gg({ groupId: e }));
|
|
10927
10981
|
});
|
|
10928
10982
|
}
|
|
10929
|
-
function
|
|
10983
|
+
function a_({ children: e, className: t, defaultLayout: n, disableCursor: r, disabled: i, elementRef: a, groupRef: o, id: s, onLayoutChange: c, onLayoutChanged: l, orientation: u = "horizontal", resizeTargetMinimumSize: d = {
|
|
10930
10984
|
coarse: 20,
|
|
10931
10985
|
fine: 10
|
|
10932
10986
|
}, style: f, ...p }) {
|
|
10933
10987
|
let m = Yn({
|
|
10934
10988
|
onLayoutChange: {},
|
|
10935
10989
|
onLayoutChanged: {}
|
|
10936
|
-
}), h =
|
|
10937
|
-
|
|
10938
|
-
}), g =
|
|
10939
|
-
|
|
10940
|
-
}), _ =
|
|
10990
|
+
}), h = e_((e) => {
|
|
10991
|
+
dg(m.current.onLayoutChange, e) || (m.current.onLayoutChange = e, c?.(e));
|
|
10992
|
+
}), g = e_((e) => {
|
|
10993
|
+
dg(m.current.onLayoutChanged, e) || (m.current.onLayoutChanged = e, l?.(e));
|
|
10994
|
+
}), _ = Qg(s), v = Yn(null), [y, b] = Zg(), x = Yn({
|
|
10941
10995
|
lastExpandedPanelSizes: {},
|
|
10942
10996
|
layouts: {},
|
|
10943
10997
|
panels: [],
|
|
10944
10998
|
resizeTargetMinimumSize: d,
|
|
10945
10999
|
separators: []
|
|
10946
|
-
}), ee =
|
|
10947
|
-
|
|
10948
|
-
let S =
|
|
10949
|
-
let r =
|
|
11000
|
+
}), ee = t_(v, a);
|
|
11001
|
+
i_(_, o);
|
|
11002
|
+
let S = e_((e, t) => {
|
|
11003
|
+
let r = xg(), i = Hh(e), a = Uh(e);
|
|
10950
11004
|
if (a) {
|
|
10951
11005
|
let e = !1;
|
|
10952
11006
|
switch (r.state) {
|
|
@@ -10960,7 +11014,7 @@ function i_({ children: e, className: t, defaultLayout: n, disableCursor: r, dis
|
|
|
10960
11014
|
};
|
|
10961
11015
|
}
|
|
10962
11016
|
if (n?.[t]) return { flexGrow: n?.[t] };
|
|
10963
|
-
}), C =
|
|
11017
|
+
}), C = n_({
|
|
10964
11018
|
defaultLayout: n,
|
|
10965
11019
|
disableCursor: r
|
|
10966
11020
|
}), te = Jn(() => ({
|
|
@@ -10972,23 +11026,23 @@ function i_({ children: e, className: t, defaultLayout: n, disableCursor: r, dis
|
|
|
10972
11026
|
orientation: u,
|
|
10973
11027
|
registerPanel: (e) => {
|
|
10974
11028
|
let t = x.current;
|
|
10975
|
-
return t.panels =
|
|
11029
|
+
return t.panels = kh(u, [...t.panels, e]), b(), () => {
|
|
10976
11030
|
t.panels = t.panels.filter((t) => t !== e), b();
|
|
10977
11031
|
};
|
|
10978
11032
|
},
|
|
10979
11033
|
registerSeparator: (e) => {
|
|
10980
11034
|
let t = x.current;
|
|
10981
|
-
return t.separators =
|
|
11035
|
+
return t.separators = kh(u, [...t.separators, e]), b(), () => {
|
|
10982
11036
|
t.separators = t.separators.filter((t) => t !== e), b();
|
|
10983
11037
|
};
|
|
10984
11038
|
},
|
|
10985
11039
|
updatePanelProps: (e, { disabled: t }) => {
|
|
10986
11040
|
let n = x.current.panels.find((t) => t.id === e);
|
|
10987
11041
|
n && (n.panelConstraints.disabled = t);
|
|
10988
|
-
let r =
|
|
10989
|
-
r && i &&
|
|
11042
|
+
let r = Hh(_), i = Uh(_);
|
|
11043
|
+
r && i && Kh(r, {
|
|
10990
11044
|
...i,
|
|
10991
|
-
derivedPanelConstraints:
|
|
11045
|
+
derivedPanelConstraints: Oh(r)
|
|
10992
11046
|
});
|
|
10993
11047
|
},
|
|
10994
11048
|
updateSeparatorProps: (e, { disabled: t, disableDoubleClick: n }) => {
|
|
@@ -11002,7 +11056,7 @@ function i_({ children: e, className: t, defaultLayout: n, disableCursor: r, dis
|
|
|
11002
11056
|
u,
|
|
11003
11057
|
C
|
|
11004
11058
|
]), ne = Yn(null);
|
|
11005
|
-
return
|
|
11059
|
+
return $g(() => {
|
|
11006
11060
|
let e = v.current;
|
|
11007
11061
|
if (e === null) return;
|
|
11008
11062
|
let t = x.current, n;
|
|
@@ -11029,9 +11083,9 @@ function i_({ children: e, className: t, defaultLayout: n, disableCursor: r, dis
|
|
|
11029
11083
|
separators: t.separators
|
|
11030
11084
|
};
|
|
11031
11085
|
ne.current = r;
|
|
11032
|
-
let a =
|
|
11086
|
+
let a = Xg(r), { defaultLayoutDeferred: o, derivedPanelConstraints: s, layout: c } = Uh(r.id, !0);
|
|
11033
11087
|
!o && s.length > 0 && (h(c), g(c));
|
|
11034
|
-
let l =
|
|
11088
|
+
let l = Gh(_, (e) => {
|
|
11035
11089
|
let { defaultLayoutDeferred: t, derivedPanelConstraints: n, layout: i } = e.next;
|
|
11036
11090
|
if (t || n.length === 0) return;
|
|
11037
11091
|
let a = r.panels.map(({ id: e }) => e).join(",");
|
|
@@ -11039,12 +11093,12 @@ function i_({ children: e, className: t, defaultLayout: n, disableCursor: r, dis
|
|
|
11039
11093
|
if (t.collapsible) {
|
|
11040
11094
|
let { layout: n } = e.prev ?? {};
|
|
11041
11095
|
if (n) {
|
|
11042
|
-
let e =
|
|
11096
|
+
let e = sg(t.collapsedSize, i[t.panelId]), a = sg(t.collapsedSize, n[t.panelId]);
|
|
11043
11097
|
e && !a && (r.mutableState.expandedPanelSizes[t.panelId] = n[t.panelId]);
|
|
11044
11098
|
}
|
|
11045
11099
|
}
|
|
11046
11100
|
});
|
|
11047
|
-
let o =
|
|
11101
|
+
let o = xg().state !== "active";
|
|
11048
11102
|
h(i), o && g(i);
|
|
11049
11103
|
});
|
|
11050
11104
|
return () => {
|
|
@@ -11061,7 +11115,7 @@ function i_({ children: e, className: t, defaultLayout: n, disableCursor: r, dis
|
|
|
11061
11115
|
]), H(() => {
|
|
11062
11116
|
let e = ne.current;
|
|
11063
11117
|
e && (e.mutableState.defaultLayout = n, e.mutableState.disableCursor = !!r);
|
|
11064
|
-
}), /* @__PURE__ */ K(
|
|
11118
|
+
}), /* @__PURE__ */ K(r_.Provider, {
|
|
11065
11119
|
value: te,
|
|
11066
11120
|
children: /* @__PURE__ */ K("div", {
|
|
11067
11121
|
...p,
|
|
@@ -11084,34 +11138,34 @@ function i_({ children: e, className: t, defaultLayout: n, disableCursor: r, dis
|
|
|
11084
11138
|
})
|
|
11085
11139
|
});
|
|
11086
11140
|
}
|
|
11087
|
-
|
|
11088
|
-
function
|
|
11089
|
-
let e = Wn(
|
|
11141
|
+
a_.displayName = "Group";
|
|
11142
|
+
function o_() {
|
|
11143
|
+
let e = Wn(r_);
|
|
11090
11144
|
return Z(e, "Group Context not found; did you render a Panel or Separator outside of a Group?"), e;
|
|
11091
11145
|
}
|
|
11092
|
-
function
|
|
11093
|
-
let { id: n } =
|
|
11094
|
-
collapse:
|
|
11095
|
-
expand:
|
|
11146
|
+
function s_(e, t) {
|
|
11147
|
+
let { id: n } = o_(), r = Yn({
|
|
11148
|
+
collapse: Dg,
|
|
11149
|
+
expand: Dg,
|
|
11096
11150
|
getSize: () => ({
|
|
11097
11151
|
asPercentage: 0,
|
|
11098
11152
|
inPixels: 0
|
|
11099
11153
|
}),
|
|
11100
11154
|
isCollapsed: () => !1,
|
|
11101
|
-
resize:
|
|
11155
|
+
resize: Dg
|
|
11102
11156
|
});
|
|
11103
|
-
Kn(t, () => r.current, []),
|
|
11104
|
-
Object.assign(r.current,
|
|
11157
|
+
Kn(t, () => r.current, []), $g(() => {
|
|
11158
|
+
Object.assign(r.current, pg({
|
|
11105
11159
|
groupId: n,
|
|
11106
11160
|
panelId: e
|
|
11107
11161
|
}));
|
|
11108
11162
|
});
|
|
11109
11163
|
}
|
|
11110
|
-
function
|
|
11111
|
-
let h = !!c, g =
|
|
11164
|
+
function c_({ children: e, className: t, collapsedSize: n = "0%", collapsible: r = !1, defaultSize: i, disabled: a, elementRef: o, groupResizeBehavior: s = "preserve-relative-size", id: c, maxSize: l = "100%", minSize: u = "0%", onResize: d, panelRef: f, style: p, ...m }) {
|
|
11165
|
+
let h = !!c, g = Qg(c), _ = n_({ disabled: a }), v = Yn(null), y = t_(v, o), { getPanelStyles: b, id: x, orientation: ee, registerPanel: S, updatePanelProps: C } = o_(), te = d !== null, ne = e_((e, t, n) => {
|
|
11112
11166
|
d?.(e, c, n);
|
|
11113
11167
|
});
|
|
11114
|
-
|
|
11168
|
+
$g(() => {
|
|
11115
11169
|
let e = v.current;
|
|
11116
11170
|
if (e !== null) return S({
|
|
11117
11171
|
element: e,
|
|
@@ -11151,11 +11205,11 @@ function s_({ children: e, className: t, collapsedSize: n = "0%", collapsible: r
|
|
|
11151
11205
|
a,
|
|
11152
11206
|
g,
|
|
11153
11207
|
C
|
|
11154
|
-
]),
|
|
11208
|
+
]), s_(g, f);
|
|
11155
11209
|
let w = () => {
|
|
11156
11210
|
let e = b(x, g);
|
|
11157
11211
|
if (e) return JSON.stringify(e);
|
|
11158
|
-
}, T = Xn((e) =>
|
|
11212
|
+
}, T = Xn((e) => Gh(x, e), w, w), re;
|
|
11159
11213
|
return re = T ? JSON.parse(T) : i ? {
|
|
11160
11214
|
flexGrow: void 0,
|
|
11161
11215
|
flexShrink: void 0,
|
|
@@ -11168,7 +11222,7 @@ function s_({ children: e, className: t, collapsedSize: n = "0%", collapsible: r
|
|
|
11168
11222
|
id: g,
|
|
11169
11223
|
ref: y,
|
|
11170
11224
|
style: {
|
|
11171
|
-
...
|
|
11225
|
+
...l_,
|
|
11172
11226
|
display: "flex",
|
|
11173
11227
|
flexBasis: 0,
|
|
11174
11228
|
flexShrink: 1,
|
|
@@ -11189,8 +11243,8 @@ function s_({ children: e, className: t, collapsedSize: n = "0%", collapsible: r
|
|
|
11189
11243
|
})
|
|
11190
11244
|
});
|
|
11191
11245
|
}
|
|
11192
|
-
|
|
11193
|
-
var
|
|
11246
|
+
c_.displayName = "Panel";
|
|
11247
|
+
var l_ = {
|
|
11194
11248
|
minHeight: 0,
|
|
11195
11249
|
maxHeight: "100%",
|
|
11196
11250
|
height: "auto",
|
|
@@ -11202,12 +11256,12 @@ var c_ = {
|
|
|
11202
11256
|
padding: 0,
|
|
11203
11257
|
margin: 0
|
|
11204
11258
|
};
|
|
11205
|
-
function
|
|
11259
|
+
function u_({ layout: e, panelConstraints: t, panelId: n, panelIndex: r }) {
|
|
11206
11260
|
let i, a, o = e[n], s = t.find((e) => e.panelId === n);
|
|
11207
11261
|
if (s) {
|
|
11208
11262
|
let c = s.maxSize, l = s.collapsible ? s.collapsedSize : s.minSize, u = [r, r + 1];
|
|
11209
|
-
a =
|
|
11210
|
-
layout:
|
|
11263
|
+
a = fg({
|
|
11264
|
+
layout: ug({
|
|
11211
11265
|
delta: l - o,
|
|
11212
11266
|
initialLayout: e,
|
|
11213
11267
|
panelConstraints: t,
|
|
@@ -11215,8 +11269,8 @@ function l_({ layout: e, panelConstraints: t, panelId: n, panelIndex: r }) {
|
|
|
11215
11269
|
prevLayout: e
|
|
11216
11270
|
}),
|
|
11217
11271
|
panelConstraints: t
|
|
11218
|
-
})[n], i =
|
|
11219
|
-
layout:
|
|
11272
|
+
})[n], i = fg({
|
|
11273
|
+
layout: ug({
|
|
11220
11274
|
delta: c - o,
|
|
11221
11275
|
initialLayout: e,
|
|
11222
11276
|
panelConstraints: t,
|
|
@@ -11233,12 +11287,12 @@ function l_({ layout: e, panelConstraints: t, panelId: n, panelIndex: r }) {
|
|
|
11233
11287
|
valueNow: o
|
|
11234
11288
|
};
|
|
11235
11289
|
}
|
|
11236
|
-
function
|
|
11237
|
-
let c =
|
|
11290
|
+
function d_({ children: e, className: t, disabled: n, disableDoubleClick: r, elementRef: i, id: a, style: o, ...s }) {
|
|
11291
|
+
let c = Qg(a), l = n_({
|
|
11238
11292
|
disabled: n,
|
|
11239
11293
|
disableDoubleClick: r
|
|
11240
|
-
}), [u, d] = U({}), [f, p] = U("inactive"), [m, h] = U(!1), g = Yn(null), _ =
|
|
11241
|
-
|
|
11294
|
+
}), [u, d] = U({}), [f, p] = U("inactive"), [m, h] = U(!1), g = Yn(null), _ = t_(g, i), { disableCursor: v, id: y, orientation: b, registerSeparator: x, updateSeparatorProps: ee } = o_(), S = b === "horizontal" ? "vertical" : "horizontal";
|
|
11295
|
+
$g(() => {
|
|
11242
11296
|
let e = g.current;
|
|
11243
11297
|
if (e !== null) {
|
|
11244
11298
|
let t = {
|
|
@@ -11246,13 +11300,13 @@ function u_({ children: e, className: t, disabled: n, disableDoubleClick: r, ele
|
|
|
11246
11300
|
disableDoubleClick: l.disableDoubleClick,
|
|
11247
11301
|
element: e,
|
|
11248
11302
|
id: c
|
|
11249
|
-
}, n = x(t), r =
|
|
11303
|
+
}, n = x(t), r = Sg((e) => {
|
|
11250
11304
|
p(e.next.state !== "inactive" && e.next.hitRegions.some((e) => e.separator === t) ? e.next.state : "inactive");
|
|
11251
|
-
}), i =
|
|
11305
|
+
}), i = Gh(y, (e) => {
|
|
11252
11306
|
let { derivedPanelConstraints: n, layout: r, separatorToPanels: i } = e.next, a = i.get(t);
|
|
11253
11307
|
if (a) {
|
|
11254
11308
|
let e = a[0], t = a.indexOf(e);
|
|
11255
|
-
d(
|
|
11309
|
+
d(u_({
|
|
11256
11310
|
layout: r,
|
|
11257
11311
|
panelConstraints: n,
|
|
11258
11312
|
panelId: e.id,
|
|
@@ -11318,24 +11372,24 @@ function u_({ children: e, className: t, disabled: n, disableDoubleClick: r, ele
|
|
|
11318
11372
|
tabIndex: n ? void 0 : 0
|
|
11319
11373
|
});
|
|
11320
11374
|
}
|
|
11321
|
-
|
|
11375
|
+
d_.displayName = "Separator";
|
|
11322
11376
|
//#endregion
|
|
11323
11377
|
//#region src/components/reui/resizable.tsx
|
|
11324
|
-
function
|
|
11325
|
-
return /* @__PURE__ */ K(
|
|
11378
|
+
function f_({ className: e, ...t }) {
|
|
11379
|
+
return /* @__PURE__ */ K(a_, {
|
|
11326
11380
|
"data-slot": "resizable-panel-group",
|
|
11327
11381
|
className: n("flex h-full w-full aria-[orientation=vertical]:flex-col", e),
|
|
11328
11382
|
...t
|
|
11329
11383
|
});
|
|
11330
11384
|
}
|
|
11331
|
-
function
|
|
11332
|
-
return /* @__PURE__ */ K(
|
|
11385
|
+
function p_({ ...e }) {
|
|
11386
|
+
return /* @__PURE__ */ K(c_, {
|
|
11333
11387
|
"data-slot": "resizable-panel",
|
|
11334
11388
|
...e
|
|
11335
11389
|
});
|
|
11336
11390
|
}
|
|
11337
|
-
function
|
|
11338
|
-
return /* @__PURE__ */ K(
|
|
11391
|
+
function m_({ withHandle: e, className: t, ...r }) {
|
|
11392
|
+
return /* @__PURE__ */ K(d_, {
|
|
11339
11393
|
"data-slot": "resizable-handle",
|
|
11340
11394
|
className: n("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90", t),
|
|
11341
11395
|
...r,
|
|
@@ -11347,34 +11401,34 @@ function p_({ withHandle: e, className: t, ...r }) {
|
|
|
11347
11401
|
}
|
|
11348
11402
|
//#endregion
|
|
11349
11403
|
//#region src/base/partials/ResizableSidebar/index.tsx
|
|
11350
|
-
function
|
|
11351
|
-
let c = /* @__PURE__ */ K(
|
|
11404
|
+
function h_({ children: e, aside: t, asideSide: r = "right", defaultAsideSize: i = 30, minAsideSize: a = 15, maxAsideSize: o = 50, className: s }) {
|
|
11405
|
+
let c = /* @__PURE__ */ K(p_, {
|
|
11352
11406
|
defaultSize: 100 - i,
|
|
11353
11407
|
minSize: 100 - o,
|
|
11354
11408
|
children: e
|
|
11355
|
-
}), l = /* @__PURE__ */ K(
|
|
11409
|
+
}), l = /* @__PURE__ */ K(p_, {
|
|
11356
11410
|
defaultSize: i,
|
|
11357
11411
|
minSize: a,
|
|
11358
11412
|
maxSize: o,
|
|
11359
11413
|
children: t
|
|
11360
11414
|
});
|
|
11361
|
-
return /* @__PURE__ */ K(
|
|
11415
|
+
return /* @__PURE__ */ K(f_, {
|
|
11362
11416
|
orientation: "horizontal",
|
|
11363
11417
|
className: n("h-full", s),
|
|
11364
11418
|
children: r === "left" ? /* @__PURE__ */ q(G, { children: [
|
|
11365
11419
|
l,
|
|
11366
|
-
/* @__PURE__ */ K(
|
|
11420
|
+
/* @__PURE__ */ K(m_, { withHandle: !0 }),
|
|
11367
11421
|
c
|
|
11368
11422
|
] }) : /* @__PURE__ */ q(G, { children: [
|
|
11369
11423
|
c,
|
|
11370
|
-
/* @__PURE__ */ K(
|
|
11424
|
+
/* @__PURE__ */ K(m_, { withHandle: !0 }),
|
|
11371
11425
|
l
|
|
11372
11426
|
] })
|
|
11373
11427
|
});
|
|
11374
11428
|
}
|
|
11375
11429
|
//#endregion
|
|
11376
11430
|
//#region src/base/partials/StatusIndicator/index.tsx
|
|
11377
|
-
var
|
|
11431
|
+
var g_ = {
|
|
11378
11432
|
connected: "bg-success",
|
|
11379
11433
|
active: "bg-success",
|
|
11380
11434
|
healthy: "bg-success",
|
|
@@ -11388,16 +11442,16 @@ var h_ = {
|
|
|
11388
11442
|
inactive: "bg-muted-foreground",
|
|
11389
11443
|
unknown: "bg-muted-foreground"
|
|
11390
11444
|
};
|
|
11391
|
-
function
|
|
11392
|
-
return
|
|
11445
|
+
function __(e) {
|
|
11446
|
+
return g_[e.toLowerCase()] ?? "bg-muted-foreground";
|
|
11393
11447
|
}
|
|
11394
|
-
function
|
|
11448
|
+
function v_({ status: e, label: t, size: r = "sm" }) {
|
|
11395
11449
|
let i = r === "sm" ? "h-2 w-2" : "h-4 w-4";
|
|
11396
11450
|
return /* @__PURE__ */ q("span", {
|
|
11397
11451
|
className: "inline-flex items-center gap-2",
|
|
11398
11452
|
"aria-label": `Status: ${t ?? e}`,
|
|
11399
11453
|
children: [/* @__PURE__ */ K("span", {
|
|
11400
|
-
className: n("shrink-0 rounded-full", i,
|
|
11454
|
+
className: n("shrink-0 rounded-full", i, __(e)),
|
|
11401
11455
|
"aria-hidden": "true"
|
|
11402
11456
|
}), t && /* @__PURE__ */ K("span", {
|
|
11403
11457
|
className: "text-foreground text-sm",
|
|
@@ -11407,7 +11461,7 @@ function __({ status: e, label: t, size: r = "sm" }) {
|
|
|
11407
11461
|
}
|
|
11408
11462
|
//#endregion
|
|
11409
11463
|
//#region src/components/reui/scrollspy.tsx
|
|
11410
|
-
function
|
|
11464
|
+
function y_({ children: e, targetRef: t, onUpdate: n, className: r, offset: i = 0, smooth: a = !0, dataAttribute: o = "scrollspy", history: s = !0 }) {
|
|
11411
11465
|
let c = Yn(null), l = Yn(null), u = Yn(null), d = V((e, t = !1) => {
|
|
11412
11466
|
e && (l.current?.forEach((t) => {
|
|
11413
11467
|
t.getAttribute(`data-${o}-anchor`) === e ? t.setAttribute("data-active", "true") : t.removeAttribute("data-active");
|
|
@@ -11507,24 +11561,24 @@ function v_({ children: e, targetRef: t, onUpdate: n, className: r, offset: i =
|
|
|
11507
11561
|
}
|
|
11508
11562
|
//#endregion
|
|
11509
11563
|
//#region src/base/partials/TableOfContents/index.tsx
|
|
11510
|
-
var
|
|
11564
|
+
var b_ = {
|
|
11511
11565
|
2: "",
|
|
11512
11566
|
3: "pl-3",
|
|
11513
11567
|
4: "pl-6"
|
|
11514
11568
|
};
|
|
11515
|
-
function
|
|
11569
|
+
function x_({ items: e, targetRef: t, offset: r = 0, history: i = !0, ariaLabel: a, className: o }) {
|
|
11516
11570
|
let { t: s } = I();
|
|
11517
11571
|
return /* @__PURE__ */ K("nav", {
|
|
11518
11572
|
"aria-label": a ?? s("middag.ui.table_of_contents.label"),
|
|
11519
11573
|
className: n("text-sm", o),
|
|
11520
|
-
children: /* @__PURE__ */ K(
|
|
11574
|
+
children: /* @__PURE__ */ K(y_, {
|
|
11521
11575
|
targetRef: t,
|
|
11522
11576
|
offset: r,
|
|
11523
11577
|
history: i,
|
|
11524
11578
|
children: /* @__PURE__ */ K("ul", {
|
|
11525
11579
|
className: "flex flex-col gap-0.5",
|
|
11526
11580
|
children: e.map((e) => /* @__PURE__ */ K("li", {
|
|
11527
|
-
className:
|
|
11581
|
+
className: b_[e.level ?? 2] ?? "",
|
|
11528
11582
|
children: /* @__PURE__ */ K("a", {
|
|
11529
11583
|
href: `#${e.id}`,
|
|
11530
11584
|
"data-scrollspy-anchor": e.id,
|
|
@@ -11538,7 +11592,7 @@ function b_({ items: e, targetRef: t, offset: r = 0, history: i = !0, ariaLabel:
|
|
|
11538
11592
|
}
|
|
11539
11593
|
//#endregion
|
|
11540
11594
|
//#region src/components/reui/spinner.tsx
|
|
11541
|
-
function
|
|
11595
|
+
function S_({ className: e, ...t }) {
|
|
11542
11596
|
return /* @__PURE__ */ K(Ir, {
|
|
11543
11597
|
role: "status",
|
|
11544
11598
|
"aria-label": "Loading",
|
|
@@ -11548,7 +11602,7 @@ function x_({ className: e, ...t }) {
|
|
|
11548
11602
|
}
|
|
11549
11603
|
//#endregion
|
|
11550
11604
|
//#region src/base/partials/TimelineList/index.tsx
|
|
11551
|
-
var
|
|
11605
|
+
var C_ = {
|
|
11552
11606
|
success: "bg-success text-white",
|
|
11553
11607
|
warning: "bg-warning text-white",
|
|
11554
11608
|
error: "bg-destructive text-white",
|
|
@@ -11557,10 +11611,10 @@ var S_ = {
|
|
|
11557
11611
|
primary: "bg-primary text-primary-foreground",
|
|
11558
11612
|
muted: "bg-muted-foreground/20 text-muted-foreground"
|
|
11559
11613
|
};
|
|
11560
|
-
function
|
|
11561
|
-
return e ?
|
|
11614
|
+
function w_(e) {
|
|
11615
|
+
return e ? C_[e.toLowerCase()] ?? C_.muted : C_.muted;
|
|
11562
11616
|
}
|
|
11563
|
-
function
|
|
11617
|
+
function T_({ detail: e, entryId: t }) {
|
|
11564
11618
|
let { t: n } = I(), [r, i] = U(!1), a = `timeline-detail-${t}`;
|
|
11565
11619
|
return /* @__PURE__ */ q("div", {
|
|
11566
11620
|
className: "mt-1",
|
|
@@ -11582,8 +11636,8 @@ function w_({ detail: e, entryId: t }) {
|
|
|
11582
11636
|
})]
|
|
11583
11637
|
});
|
|
11584
11638
|
}
|
|
11585
|
-
function
|
|
11586
|
-
let { locale: r } = I(), i = e.icon ? h(e.icon) : Yt, a =
|
|
11639
|
+
function E_({ entry: e, isLast: t }) {
|
|
11640
|
+
let { locale: r } = I(), i = e.icon ? h(e.icon) : Yt, a = w_(e.color);
|
|
11587
11641
|
return /* @__PURE__ */ q("li", {
|
|
11588
11642
|
className: "relative flex gap-4 pb-6 last:pb-0",
|
|
11589
11643
|
children: [
|
|
@@ -11623,7 +11677,7 @@ function T_({ entry: e, isLast: t }) {
|
|
|
11623
11677
|
children: ll(e.timestamp, r)
|
|
11624
11678
|
})
|
|
11625
11679
|
]
|
|
11626
|
-
}), e.detail && /* @__PURE__ */ K(
|
|
11680
|
+
}), e.detail && /* @__PURE__ */ K(T_, {
|
|
11627
11681
|
detail: e.detail,
|
|
11628
11682
|
entryId: e.id
|
|
11629
11683
|
})]
|
|
@@ -11631,7 +11685,7 @@ function T_({ entry: e, isLast: t }) {
|
|
|
11631
11685
|
]
|
|
11632
11686
|
});
|
|
11633
11687
|
}
|
|
11634
|
-
function
|
|
11688
|
+
function D_() {
|
|
11635
11689
|
return /* @__PURE__ */ q("div", {
|
|
11636
11690
|
className: "space-y-6",
|
|
11637
11691
|
children: [/* @__PURE__ */ K(R, { className: "h-4 w-20" }), /* @__PURE__ */ K("div", {
|
|
@@ -11653,9 +11707,9 @@ function E_() {
|
|
|
11653
11707
|
})]
|
|
11654
11708
|
});
|
|
11655
11709
|
}
|
|
11656
|
-
function
|
|
11710
|
+
function O_({ groups: e, isLoading: t, hasMore: n, isLoadingMore: r, onLoadMore: i }) {
|
|
11657
11711
|
let { t: a } = I();
|
|
11658
|
-
return t ? /* @__PURE__ */ K(
|
|
11712
|
+
return t ? /* @__PURE__ */ K(D_, {}) : e.length === 0 || e.every((e) => e.entries.length === 0) ? /* @__PURE__ */ K(y, {
|
|
11659
11713
|
variant: "no-results",
|
|
11660
11714
|
icon: "clock",
|
|
11661
11715
|
title: a("middag.ui.timeline.no_activity"),
|
|
@@ -11669,7 +11723,7 @@ function D_({ groups: e, isLoading: t, hasMore: n, isLoadingMore: r, onLoadMore:
|
|
|
11669
11723
|
children: e.label
|
|
11670
11724
|
}), /* @__PURE__ */ K("ol", {
|
|
11671
11725
|
className: "space-y-0",
|
|
11672
|
-
children: e.entries.map((t, n) => /* @__PURE__ */ K(
|
|
11726
|
+
children: e.entries.map((t, n) => /* @__PURE__ */ K(E_, {
|
|
11673
11727
|
entry: t,
|
|
11674
11728
|
isLast: n === e.entries.length - 1
|
|
11675
11729
|
}, t.id))
|
|
@@ -11681,14 +11735,14 @@ function D_({ groups: e, isLoading: t, hasMore: n, isLoadingMore: r, onLoadMore:
|
|
|
11681
11735
|
size: "sm",
|
|
11682
11736
|
onClick: i,
|
|
11683
11737
|
disabled: r,
|
|
11684
|
-
children: r ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(
|
|
11738
|
+
children: r ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(S_, { className: "mr-2" }), a("middag.ui.loading")] }) : a("middag.ui.load_more")
|
|
11685
11739
|
})
|
|
11686
11740
|
})]
|
|
11687
11741
|
});
|
|
11688
11742
|
}
|
|
11689
11743
|
//#endregion
|
|
11690
11744
|
//#region src/components/reui/toggle.tsx
|
|
11691
|
-
var
|
|
11745
|
+
var k_ = Ve("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
11692
11746
|
variants: {
|
|
11693
11747
|
variant: {
|
|
11694
11748
|
default: "bg-transparent",
|
|
@@ -11704,12 +11758,12 @@ var O_ = Ve("inline-flex items-center justify-center gap-2 rounded-md text-sm fo
|
|
|
11704
11758
|
variant: "default",
|
|
11705
11759
|
size: "default"
|
|
11706
11760
|
}
|
|
11707
|
-
}),
|
|
11761
|
+
}), A_ = z.createContext({
|
|
11708
11762
|
size: "default",
|
|
11709
11763
|
variant: "default",
|
|
11710
11764
|
spacing: 0
|
|
11711
11765
|
});
|
|
11712
|
-
function
|
|
11766
|
+
function j_({ className: e, variant: t, size: r, spacing: i = 0, children: a, ...o }) {
|
|
11713
11767
|
return /* @__PURE__ */ K(Ys, {
|
|
11714
11768
|
"data-slot": "toggle-group",
|
|
11715
11769
|
"data-variant": t,
|
|
@@ -11718,7 +11772,7 @@ function A_({ className: e, variant: t, size: r, spacing: i = 0, children: a, ..
|
|
|
11718
11772
|
style: { "--gap": i },
|
|
11719
11773
|
className: n("group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs", e),
|
|
11720
11774
|
...o,
|
|
11721
|
-
children: /* @__PURE__ */ K(
|
|
11775
|
+
children: /* @__PURE__ */ K(A_.Provider, {
|
|
11722
11776
|
value: {
|
|
11723
11777
|
variant: t,
|
|
11724
11778
|
size: r,
|
|
@@ -11728,14 +11782,14 @@ function A_({ className: e, variant: t, size: r, spacing: i = 0, children: a, ..
|
|
|
11728
11782
|
})
|
|
11729
11783
|
});
|
|
11730
11784
|
}
|
|
11731
|
-
function
|
|
11732
|
-
let o = z.useContext(
|
|
11785
|
+
function M_({ className: e, children: t, variant: r, size: i, ...a }) {
|
|
11786
|
+
let o = z.useContext(A_);
|
|
11733
11787
|
return /* @__PURE__ */ K(Xs, {
|
|
11734
11788
|
"data-slot": "toggle-group-item",
|
|
11735
11789
|
"data-variant": o.variant || r,
|
|
11736
11790
|
"data-size": o.size || i,
|
|
11737
11791
|
"data-spacing": o.spacing,
|
|
11738
|
-
className: n(
|
|
11792
|
+
className: n(k_({
|
|
11739
11793
|
variant: o.variant || r,
|
|
11740
11794
|
size: o.size || i
|
|
11741
11795
|
}), "w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10", "data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l", e),
|
|
@@ -11745,14 +11799,14 @@ function j_({ className: e, children: t, variant: r, size: i, ...a }) {
|
|
|
11745
11799
|
}
|
|
11746
11800
|
//#endregion
|
|
11747
11801
|
//#region src/base/partials/ToggleGroupControl/index.tsx
|
|
11748
|
-
function
|
|
11749
|
-
let { t } = I(), { options: n, variant: r, size: i, ariaLabel: a, className: o } = e, s = a ?? t("middag.ui.toggle_group.label"), c = n.map((e) => /* @__PURE__ */ K(
|
|
11802
|
+
function N_(e) {
|
|
11803
|
+
let { t } = I(), { options: n, variant: r, size: i, ariaLabel: a, className: o } = e, s = a ?? t("middag.ui.toggle_group.label"), c = n.map((e) => /* @__PURE__ */ K(M_, {
|
|
11750
11804
|
value: e.value,
|
|
11751
11805
|
disabled: e.disabled,
|
|
11752
11806
|
"aria-label": e.ariaLabel ?? e.label,
|
|
11753
11807
|
children: e.label
|
|
11754
11808
|
}, e.value));
|
|
11755
|
-
return e.type === "multiple" ? /* @__PURE__ */ K(
|
|
11809
|
+
return e.type === "multiple" ? /* @__PURE__ */ K(j_, {
|
|
11756
11810
|
type: "multiple",
|
|
11757
11811
|
value: e.value,
|
|
11758
11812
|
defaultValue: e.defaultValue,
|
|
@@ -11762,7 +11816,7 @@ function M_(e) {
|
|
|
11762
11816
|
"aria-label": s,
|
|
11763
11817
|
className: o,
|
|
11764
11818
|
children: c
|
|
11765
|
-
}) : /* @__PURE__ */ K(
|
|
11819
|
+
}) : /* @__PURE__ */ K(j_, {
|
|
11766
11820
|
type: "single",
|
|
11767
11821
|
value: e.value,
|
|
11768
11822
|
defaultValue: e.defaultValue,
|
|
@@ -11776,16 +11830,16 @@ function M_(e) {
|
|
|
11776
11830
|
}
|
|
11777
11831
|
//#endregion
|
|
11778
11832
|
//#region node_modules/@headless-tree/core/dist/index.mjs
|
|
11779
|
-
var
|
|
11833
|
+
var P_ = Object.defineProperty, F_ = Object.defineProperties, I_ = Object.getOwnPropertyDescriptors, L_ = Object.getOwnPropertySymbols, R_ = Object.prototype.hasOwnProperty, z_ = Object.prototype.propertyIsEnumerable, B_ = (e, t, n) => t in e ? P_(e, t, {
|
|
11780
11834
|
enumerable: !0,
|
|
11781
11835
|
configurable: !0,
|
|
11782
11836
|
writable: !0,
|
|
11783
11837
|
value: n
|
|
11784
11838
|
}) : e[t] = n, Q = (e, t) => {
|
|
11785
|
-
for (var n in t ||= {})
|
|
11786
|
-
if (
|
|
11839
|
+
for (var n in t ||= {}) R_.call(t, n) && B_(e, n, t[n]);
|
|
11840
|
+
if (L_) for (var n of L_(t)) z_.call(t, n) && B_(e, n, t[n]);
|
|
11787
11841
|
return e;
|
|
11788
|
-
},
|
|
11842
|
+
}, V_ = (e, t) => F_(e, I_(t)), H_ = (e, t, n) => new Promise((r, i) => {
|
|
11789
11843
|
var a = (e) => {
|
|
11790
11844
|
try {
|
|
11791
11845
|
s(n.next(e));
|
|
@@ -11801,30 +11855,30 @@ var N_ = Object.defineProperty, P_ = Object.defineProperties, F_ = Object.getOwn
|
|
|
11801
11855
|
}, s = (e) => e.done ? r(e.value) : Promise.resolve(e.value).then(a, o);
|
|
11802
11856
|
s((n = n.apply(e, t)).next());
|
|
11803
11857
|
});
|
|
11804
|
-
function
|
|
11858
|
+
function U_(e, t) {
|
|
11805
11859
|
return typeof e == "function" ? e(t) : e;
|
|
11806
11860
|
}
|
|
11807
|
-
function
|
|
11861
|
+
function W_(e, t) {
|
|
11808
11862
|
return (n) => {
|
|
11809
|
-
t.setState((t) =>
|
|
11863
|
+
t.setState((t) => V_(Q({}, t), { [e]: U_(n, t[e]) }));
|
|
11810
11864
|
};
|
|
11811
11865
|
}
|
|
11812
|
-
var
|
|
11866
|
+
var G_ = (e, t = 100, n = 1e3) => new Promise((r) => {
|
|
11813
11867
|
let i, a = setInterval(() => {
|
|
11814
11868
|
e() && (r(), clearInterval(a), clearTimeout(i));
|
|
11815
11869
|
}, t);
|
|
11816
11870
|
i = setTimeout(() => {
|
|
11817
11871
|
clearInterval(a), r();
|
|
11818
11872
|
}, n);
|
|
11819
|
-
}),
|
|
11873
|
+
}), K_ = "Headless Tree: ", q_ = (e) => Error(K_ + e), J_ = (e) => console.warn(K_ + e), Y_ = {
|
|
11820
11874
|
key: "tree",
|
|
11821
11875
|
getInitialState: (e) => Q({
|
|
11822
11876
|
expandedItems: [],
|
|
11823
11877
|
focusedItem: null
|
|
11824
11878
|
}, e),
|
|
11825
11879
|
getDefaultConfig: (e, t) => Q({
|
|
11826
|
-
setExpandedItems:
|
|
11827
|
-
setFocusedItem:
|
|
11880
|
+
setExpandedItems: W_("expandedItems", t),
|
|
11881
|
+
setFocusedItem: W_("focusedItem", t)
|
|
11828
11882
|
}, e),
|
|
11829
11883
|
stateHandlerNames: {
|
|
11830
11884
|
expandedItems: "setExpandedItems",
|
|
@@ -11834,7 +11888,7 @@ var W_ = (e, t = 100, n = 1e3) => new Promise((r) => {
|
|
|
11834
11888
|
getItemsMeta: ({ tree: e }) => {
|
|
11835
11889
|
let { rootItemId: t } = e.getConfig(), { expandedItems: n } = e.getState(), r = [], i = new Set(n), a = (t, n, o, s, c) => {
|
|
11836
11890
|
if (n.includes(t)) {
|
|
11837
|
-
|
|
11891
|
+
J_(`Circular reference for ${n.join(".")}`);
|
|
11838
11892
|
return;
|
|
11839
11893
|
}
|
|
11840
11894
|
if (r.push({
|
|
@@ -11875,10 +11929,10 @@ var W_ = (e, t = 100, n = 1e3) => new Promise((r) => {
|
|
|
11875
11929
|
(t = e.getItems()[r]) == null || t.setFocused();
|
|
11876
11930
|
},
|
|
11877
11931
|
updateDomFocus: ({ tree: e }) => {
|
|
11878
|
-
setTimeout(() =>
|
|
11932
|
+
setTimeout(() => H_(null, null, function* () {
|
|
11879
11933
|
var t, n, r, i;
|
|
11880
11934
|
let a = e.getFocusedItem();
|
|
11881
|
-
(n = (t = e.getConfig()).scrollToItem) == null || n.call(t, a), yield
|
|
11935
|
+
(n = (t = e.getConfig()).scrollToItem) == null || n.call(t, a), yield G_(() => a.getElement() !== null, 20, 500);
|
|
11882
11936
|
let o = a.getElement();
|
|
11883
11937
|
if (!o) {
|
|
11884
11938
|
(r = e.getItems()[0]) == null || r.setFocused(), (i = e.getItems()[0]?.getElement()) == null || i.focus();
|
|
@@ -11887,7 +11941,7 @@ var W_ = (e, t = 100, n = 1e3) => new Promise((r) => {
|
|
|
11887
11941
|
o.focus();
|
|
11888
11942
|
}));
|
|
11889
11943
|
},
|
|
11890
|
-
getContainerProps: ({ prev: e, tree: t }, n) =>
|
|
11944
|
+
getContainerProps: ({ prev: e, tree: t }, n) => V_(Q({}, e?.()), {
|
|
11891
11945
|
role: "tree",
|
|
11892
11946
|
"aria-label": n ?? "",
|
|
11893
11947
|
ref: t.registerElement
|
|
@@ -11895,15 +11949,15 @@ var W_ = (e, t = 100, n = 1e3) => new Promise((r) => {
|
|
|
11895
11949
|
isSearchOpen: () => !1
|
|
11896
11950
|
},
|
|
11897
11951
|
itemInstance: {
|
|
11898
|
-
scrollTo: (e, t) =>
|
|
11952
|
+
scrollTo: (e, t) => H_(null, [e, t], function* ({ tree: e, item: t }, n) {
|
|
11899
11953
|
var r, i, a;
|
|
11900
|
-
(i = (r = e.getConfig()).scrollToItem) == null || i.call(r, t), yield
|
|
11954
|
+
(i = (r = e.getConfig()).scrollToItem) == null || i.call(r, t), yield G_(() => t.getElement() !== null, 20), (a = t.getElement()) == null || a.scrollIntoView(n);
|
|
11901
11955
|
}),
|
|
11902
11956
|
getId: ({ itemId: e }) => e,
|
|
11903
11957
|
getKey: ({ itemId: e }) => e,
|
|
11904
11958
|
getProps: ({ item: e, prev: t }) => {
|
|
11905
11959
|
let n = e.getItemMeta();
|
|
11906
|
-
return
|
|
11960
|
+
return V_(Q({}, t?.()), {
|
|
11907
11961
|
ref: e.registerElement,
|
|
11908
11962
|
role: "treeitem",
|
|
11909
11963
|
"aria-setsize": n.setSize,
|
|
@@ -11999,7 +12053,7 @@ var W_ = (e, t = 100, n = 1e3) => new Promise((r) => {
|
|
|
11999
12053
|
}
|
|
12000
12054
|
}
|
|
12001
12055
|
}
|
|
12002
|
-
},
|
|
12056
|
+
}, X_ = (e, t, n) => {
|
|
12003
12057
|
let r = {};
|
|
12004
12058
|
return [r, () => {
|
|
12005
12059
|
let i = n(r);
|
|
@@ -12009,23 +12063,23 @@ var W_ = (e, t = 100, n = 1e3) => new Promise((r) => {
|
|
|
12009
12063
|
methodLoop: for (let [e, t] of Object.entries(a)) {
|
|
12010
12064
|
if (!t) continue methodLoop;
|
|
12011
12065
|
let n = r[e];
|
|
12012
|
-
r[e] = (...e) => t(
|
|
12066
|
+
r[e] = (...e) => t(V_(Q({}, i), { prev: n }), ...e);
|
|
12013
12067
|
}
|
|
12014
12068
|
}
|
|
12015
12069
|
}];
|
|
12016
|
-
},
|
|
12070
|
+
}, Z_ = (e) => {
|
|
12017
12071
|
let t = e?.map((e) => e.key);
|
|
12018
12072
|
for (let n of e ?? []) {
|
|
12019
12073
|
let e = n.deps?.find((e) => !t?.includes(e));
|
|
12020
|
-
if (e) throw
|
|
12074
|
+
if (e) throw q_(`${n.key} needs ${e}`);
|
|
12021
12075
|
}
|
|
12022
|
-
},
|
|
12076
|
+
}, Q_ = (e, t) => {
|
|
12023
12077
|
let n = e.length;
|
|
12024
12078
|
for (let r = 0; r < n; r++) for (let i = r + 1; i < n; i++) t(e[i], e[r]) < 0 && ([e[r], e[i]] = [e[i], e[r]]);
|
|
12025
12079
|
return e;
|
|
12026
|
-
},
|
|
12027
|
-
let t = e.instanceBuilder ??
|
|
12028
|
-
|
|
12080
|
+
}, $_ = (e) => (t, n) => n.key && t.overwrites?.includes(n.key) ? 1 : t.key && n.overwrites?.includes(t.key) ? -1 : e.indexOf(t) - e.indexOf(n), ev = (e = []) => Q_(e, $_(e)), tv = (e) => {
|
|
12081
|
+
let t = e.instanceBuilder ?? X_, n = [Y_, ...ev(e.features)];
|
|
12082
|
+
Z_(n);
|
|
12029
12083
|
let r = [...n], [i, a] = t(r, "treeInstance", (e) => ({ tree: e })), o = n.reduce((e, t) => t.getInitialState?.call(t, e, i) ?? e, e.initialState ?? e.state ?? {}), s = n.reduce((e, t) => t.getDefaultConfig?.call(t, e, i) ?? e, e), c = n.reduce((e, t) => Q(Q({}, e), t.stateHandlerNames), {}), l, u = { current: {} }, d = !1, f = {}, p = [], m = {}, h = {}, g = {}, _ = {}, v = () => {
|
|
12030
12084
|
p = [], g = {};
|
|
12031
12085
|
let [e, n] = t(r, "itemInstance", (e) => ({
|
|
@@ -12132,10 +12186,10 @@ var W_ = (e, t = 100, n = 1e3) => new Promise((r) => {
|
|
|
12132
12186
|
});
|
|
12133
12187
|
for (let e of r) Object.assign(_, e.hotkeys ?? {});
|
|
12134
12188
|
return a(), i;
|
|
12135
|
-
},
|
|
12189
|
+
}, nv = {
|
|
12136
12190
|
key: "selection",
|
|
12137
12191
|
getInitialState: (e) => Q({ selectedItems: [] }, e),
|
|
12138
|
-
getDefaultConfig: (e, t) => Q({ setSelectedItems:
|
|
12192
|
+
getDefaultConfig: (e, t) => Q({ setSelectedItems: W_("selectedItems", t) }, e),
|
|
12139
12193
|
stateHandlerNames: { selectedItems: "setSelectedItems" },
|
|
12140
12194
|
treeInstance: {
|
|
12141
12195
|
setSelectedItems: ({ tree: e }, t) => {
|
|
@@ -12173,7 +12227,7 @@ var W_ = (e, t = 100, n = 1e3) => new Promise((r) => {
|
|
|
12173
12227
|
toggleSelect: ({ item: e }) => {
|
|
12174
12228
|
e.isSelected() ? e.deselect() : e.select();
|
|
12175
12229
|
},
|
|
12176
|
-
getProps: ({ tree: e, item: t, itemId: n, prev: r }) =>
|
|
12230
|
+
getProps: ({ tree: e, item: t, itemId: n, prev: r }) => V_(Q({}, r?.()), {
|
|
12177
12231
|
"aria-selected": t.isSelected() ? "true" : "false",
|
|
12178
12232
|
onClick: (i) => {
|
|
12179
12233
|
var a, o;
|
|
@@ -12211,7 +12265,7 @@ var W_ = (e, t = 100, n = 1e3) => new Promise((r) => {
|
|
|
12211
12265
|
}
|
|
12212
12266
|
}
|
|
12213
12267
|
}
|
|
12214
|
-
},
|
|
12268
|
+
}, rv = (e) => e.code !== "" && e.code !== "Unidentified" ? e.code : e.key, iv = {
|
|
12215
12269
|
letter: /^Key[A-Z]$/,
|
|
12216
12270
|
letterornumber: /^(Key[A-Z]|Digit[0-9])$/,
|
|
12217
12271
|
plus: /^(NumpadAdd|Plus)$/,
|
|
@@ -12220,31 +12274,31 @@ var W_ = (e, t = 100, n = 1e3) => new Promise((r) => {
|
|
|
12220
12274
|
shift: /^(ShiftLeft|ShiftRight)$/,
|
|
12221
12275
|
metaorcontrol: /^(MetaLeft|MetaRight|ControlLeft|ControlRight)$/,
|
|
12222
12276
|
enter: /^(Enter|NumpadEnter)$/
|
|
12223
|
-
},
|
|
12277
|
+
}, av = (e, t, n) => {
|
|
12224
12278
|
let r = n.hotkey.toLowerCase().split("+"), i = r.every((t) => {
|
|
12225
|
-
if (t in
|
|
12279
|
+
if (t in iv) return [...e].some((e) => iv[t].test(e));
|
|
12226
12280
|
let n = [...e].map((e) => e.toLowerCase());
|
|
12227
12281
|
return !!(n.includes(t.toLowerCase()) || n.includes(`key${t.toLowerCase()}`));
|
|
12228
12282
|
}), a = !n.isEnabled || n.isEnabled(t), o = e.size === r.length;
|
|
12229
12283
|
return i && a && o;
|
|
12230
|
-
},
|
|
12284
|
+
}, ov = (e, t, n, r) => Object.entries(Q(Q({}, n), r)).find(([, n]) => av(e, t, n))?.[0], sv = {
|
|
12231
12285
|
key: "hotkeys-core",
|
|
12232
12286
|
onTreeMount: (e, t) => {
|
|
12233
12287
|
let n = e.getDataRef(), r = (t) => {
|
|
12234
12288
|
var r;
|
|
12235
12289
|
let { ignoreHotkeysOnInputs: i, onTreeHotkey: a, hotkeys: o } = e.getConfig();
|
|
12236
12290
|
if (t.target instanceof HTMLInputElement && i) return;
|
|
12237
|
-
let s =
|
|
12291
|
+
let s = rv(t);
|
|
12238
12292
|
(r = n.current).pressedKeys ?? (r.pressedKeys = /* @__PURE__ */ new Set());
|
|
12239
12293
|
let c = !n.current.pressedKeys.has(s);
|
|
12240
12294
|
n.current.pressedKeys.add(s);
|
|
12241
|
-
let l =
|
|
12295
|
+
let l = ov(n.current.pressedKeys, e, e.getHotkeyPresets(), o);
|
|
12242
12296
|
if (t.target instanceof HTMLInputElement && n.current.pressedKeys.delete(s), !l) return;
|
|
12243
12297
|
let u = Q(Q({}, e.getHotkeyPresets()[l]), o?.[l]);
|
|
12244
12298
|
u && (!u.allowWhenInputFocused && t.target instanceof HTMLInputElement || !u.canRepeat && !c || (u.preventDefault && t.preventDefault(), u.handler(t, e), a?.(l, t)));
|
|
12245
12299
|
}, i = (e) => {
|
|
12246
12300
|
var t;
|
|
12247
|
-
(t = n.current).pressedKeys ?? (t.pressedKeys = /* @__PURE__ */ new Set()), n.current.pressedKeys.delete(
|
|
12301
|
+
(t = n.current).pressedKeys ?? (t.pressedKeys = /* @__PURE__ */ new Set()), n.current.pressedKeys.delete(rv(e));
|
|
12248
12302
|
}, a = () => {
|
|
12249
12303
|
n.current.pressedKeys = /* @__PURE__ */ new Set();
|
|
12250
12304
|
};
|
|
@@ -12254,31 +12308,31 @@ var W_ = (e, t = 100, n = 1e3) => new Promise((r) => {
|
|
|
12254
12308
|
let n = e.getDataRef();
|
|
12255
12309
|
n.current.keyupHandler && (document.removeEventListener("keyup", n.current.keyupHandler), delete n.current.keyupHandler), n.current.keydownHandler && (t.removeEventListener("keydown", n.current.keydownHandler), delete n.current.keydownHandler), n.current.resetHandler && (window.removeEventListener("focus", n.current.resetHandler), delete n.current.resetHandler);
|
|
12256
12310
|
}
|
|
12257
|
-
},
|
|
12258
|
-
if (!e) throw
|
|
12259
|
-
if (typeof e == "object" && "then" in e) throw
|
|
12311
|
+
}, cv = "sync dataLoader returned undefined", lv = "sync dataLoader returned promise", uv = (e) => {
|
|
12312
|
+
if (!e) throw q_(cv);
|
|
12313
|
+
if (typeof e == "object" && "then" in e) throw q_(lv);
|
|
12260
12314
|
return e;
|
|
12261
|
-
},
|
|
12315
|
+
}, dv = {
|
|
12262
12316
|
key: "sync-data-loader",
|
|
12263
12317
|
getInitialState: (e) => Q({
|
|
12264
12318
|
loadingItemData: [],
|
|
12265
12319
|
loadingItemChildrens: []
|
|
12266
12320
|
}, e),
|
|
12267
12321
|
getDefaultConfig: (e, t) => Q({
|
|
12268
|
-
setLoadingItemData:
|
|
12269
|
-
setLoadingItemChildrens:
|
|
12322
|
+
setLoadingItemData: W_("loadingItemData", t),
|
|
12323
|
+
setLoadingItemChildrens: W_("loadingItemChildrens", t)
|
|
12270
12324
|
}, e),
|
|
12271
12325
|
stateHandlerNames: {
|
|
12272
12326
|
loadingItemData: "setLoadingItemData",
|
|
12273
12327
|
loadingItemChildrens: "setLoadingItemChildrens"
|
|
12274
12328
|
},
|
|
12275
12329
|
treeInstance: {
|
|
12276
|
-
waitForItemDataLoaded: () =>
|
|
12277
|
-
waitForItemChildrenLoaded: () =>
|
|
12278
|
-
retrieveItemData: ({ tree: e }, t) =>
|
|
12330
|
+
waitForItemDataLoaded: () => H_(null, null, function* () {}),
|
|
12331
|
+
waitForItemChildrenLoaded: () => H_(null, null, function* () {}),
|
|
12332
|
+
retrieveItemData: ({ tree: e }, t) => uv(e.getConfig().dataLoader.getItem(t)),
|
|
12279
12333
|
retrieveChildrenIds: ({ tree: e }, t) => {
|
|
12280
12334
|
let { dataLoader: n } = e.getConfig();
|
|
12281
|
-
return "getChildren" in n ?
|
|
12335
|
+
return "getChildren" in n ? uv(n.getChildren(t)) : uv(n.getChildrenWithData(t)).map((e) => e.data);
|
|
12282
12336
|
},
|
|
12283
12337
|
loadItemData: ({ tree: e }, t) => e.retrieveItemData(t),
|
|
12284
12338
|
loadChildrenIds: ({ tree: e }, t) => e.retrieveChildrenIds(t)
|
|
@@ -12287,36 +12341,36 @@ var W_ = (e, t = 100, n = 1e3) => new Promise((r) => {
|
|
|
12287
12341
|
isLoading: () => !1,
|
|
12288
12342
|
hasLoadedData: () => !0
|
|
12289
12343
|
}
|
|
12290
|
-
},
|
|
12344
|
+
}, fv = Object.defineProperty, pv = Object.defineProperties, mv = Object.getOwnPropertyDescriptors, hv = Object.getOwnPropertySymbols, gv = Object.prototype.hasOwnProperty, _v = Object.prototype.propertyIsEnumerable, vv = (e, t, n) => t in e ? fv(e, t, {
|
|
12291
12345
|
enumerable: !0,
|
|
12292
12346
|
configurable: !0,
|
|
12293
12347
|
writable: !0,
|
|
12294
12348
|
value: n
|
|
12295
|
-
}) : e[t] = n,
|
|
12296
|
-
for (var n in t ||= {})
|
|
12297
|
-
if (
|
|
12349
|
+
}) : e[t] = n, yv = (e, t) => {
|
|
12350
|
+
for (var n in t ||= {}) gv.call(t, n) && vv(e, n, t[n]);
|
|
12351
|
+
if (hv) for (var n of hv(t)) _v.call(t, n) && vv(e, n, t[n]);
|
|
12298
12352
|
return e;
|
|
12299
|
-
},
|
|
12300
|
-
let [t] = U(() => ({ current:
|
|
12353
|
+
}, bv = (e, t) => pv(e, mv(t)), xv = (e) => {
|
|
12354
|
+
let [t] = U(() => ({ current: tv(e) })), [n, r] = U(() => t.current.getState());
|
|
12301
12355
|
return H(() => (t.current.setMounted(!0), t.current.rebuildTree(), () => {
|
|
12302
12356
|
t.current.setMounted(!1);
|
|
12303
|
-
}), [t]), t.current.setConfig((t) => yv(
|
|
12304
|
-
state:
|
|
12357
|
+
}), [t]), t.current.setConfig((t) => bv(yv(yv({}, t), e), {
|
|
12358
|
+
state: yv(yv({}, n), e.state),
|
|
12305
12359
|
setState: (t) => {
|
|
12306
12360
|
var n;
|
|
12307
12361
|
r(t), (n = e.setState) == null || n.call(e, t);
|
|
12308
12362
|
}
|
|
12309
12363
|
})), t.current;
|
|
12310
|
-
},
|
|
12364
|
+
}, Sv = Vn({
|
|
12311
12365
|
indent: 20,
|
|
12312
12366
|
currentItem: void 0,
|
|
12313
12367
|
tree: void 0,
|
|
12314
12368
|
toggleIconType: "plus-minus"
|
|
12315
12369
|
});
|
|
12316
|
-
function
|
|
12317
|
-
return Wn(
|
|
12370
|
+
function Cv() {
|
|
12371
|
+
return Wn(Sv);
|
|
12318
12372
|
}
|
|
12319
|
-
function
|
|
12373
|
+
function wv({ indent: e = 20, tree: t, className: r, toggleIconType: i = "chevron", asChild: a = !1, ...o }) {
|
|
12320
12374
|
let s = t && typeof t.getContainerProps == "function" ? t.getContainerProps() : {}, { style: c, ...l } = {
|
|
12321
12375
|
...o,
|
|
12322
12376
|
...s
|
|
@@ -12324,7 +12378,7 @@ function Cv({ indent: e = 20, tree: t, className: r, toggleIconType: i = "chevro
|
|
|
12324
12378
|
...c,
|
|
12325
12379
|
"--tree-indent": `${e}px`
|
|
12326
12380
|
}, d = a ? Be : "div";
|
|
12327
|
-
return /* @__PURE__ */ K(
|
|
12381
|
+
return /* @__PURE__ */ K(Sv.Provider, {
|
|
12328
12382
|
value: {
|
|
12329
12383
|
indent: e,
|
|
12330
12384
|
tree: t,
|
|
@@ -12338,8 +12392,8 @@ function Cv({ indent: e = 20, tree: t, className: r, toggleIconType: i = "chevro
|
|
|
12338
12392
|
})
|
|
12339
12393
|
});
|
|
12340
12394
|
}
|
|
12341
|
-
function
|
|
12342
|
-
let o =
|
|
12395
|
+
function Tv({ item: e, className: t, asChild: r = !1, children: i, ...a }) {
|
|
12396
|
+
let o = Cv(), { indent: s } = o, c = typeof e.getProps == "function" ? e.getProps() : {}, { style: l, ...u } = {
|
|
12343
12397
|
...a,
|
|
12344
12398
|
children: i,
|
|
12345
12399
|
...c
|
|
@@ -12357,7 +12411,7 @@ function wv({ item: e, className: t, asChild: r = !1, children: i, ...a }) {
|
|
|
12357
12411
|
"data-search-match": typeof e.isMatchingSearch == "function" ? e.isMatchingSearch() || !1 : void 0,
|
|
12358
12412
|
"aria-expanded": e.isExpanded()
|
|
12359
12413
|
}, p = r ? Be : "button";
|
|
12360
|
-
return /* @__PURE__ */ K(
|
|
12414
|
+
return /* @__PURE__ */ K(Sv.Provider, {
|
|
12361
12415
|
value: {
|
|
12362
12416
|
...o,
|
|
12363
12417
|
currentItem: e
|
|
@@ -12369,8 +12423,8 @@ function wv({ item: e, className: t, asChild: r = !1, children: i, ...a }) {
|
|
|
12369
12423
|
})
|
|
12370
12424
|
});
|
|
12371
12425
|
}
|
|
12372
|
-
function
|
|
12373
|
-
let { currentItem: o, toggleIconType: s } =
|
|
12426
|
+
function Ev({ item: e, children: t, className: r, asChild: i = !1, ...a }) {
|
|
12427
|
+
let { currentItem: o, toggleIconType: s } = Cv(), c = e || o;
|
|
12374
12428
|
return c ? /* @__PURE__ */ K(i ? Be : "span", {
|
|
12375
12429
|
"data-slot": "tree-item-label",
|
|
12376
12430
|
className: n("in-focus-visible:ring-ring/50 bg-background hover:bg-accent in-data-[selected=true]:bg-accent in-data-[selected=true]:text-accent-foreground in-data-[drag-target=true]:bg-accent flex items-center gap-1 transition-colors not-in-data-[folder=true]:ps-7 in-focus-visible:ring-[3px] in-data-[search-match=true]:bg-blue-50! [&_svg]:pointer-events-none [&_svg]:shrink-0", "rounded-sm", "py-1.5", "px-2", "text-sm", r),
|
|
@@ -12394,8 +12448,8 @@ function Tv({ item: e, children: t, className: r, asChild: i = !1, ...a }) {
|
|
|
12394
12448
|
}
|
|
12395
12449
|
//#endregion
|
|
12396
12450
|
//#region src/base/partials/TreeView/index.tsx
|
|
12397
|
-
function
|
|
12398
|
-
let { t: o } = I(), s =
|
|
12451
|
+
function Dv({ items: e, rootItemId: t, expandedItems: n, indent: r = 20, ariaLabel: i, className: a }) {
|
|
12452
|
+
let { t: o } = I(), s = xv({
|
|
12399
12453
|
initialState: n ? { expandedItems: n } : void 0,
|
|
12400
12454
|
indent: r,
|
|
12401
12455
|
rootItemId: t,
|
|
@@ -12406,32 +12460,32 @@ function Ev({ items: e, rootItemId: t, expandedItems: n, indent: r = 20, ariaLab
|
|
|
12406
12460
|
getChildren: (t) => e[t]?.children ?? []
|
|
12407
12461
|
},
|
|
12408
12462
|
features: [
|
|
12409
|
-
|
|
12410
|
-
|
|
12411
|
-
|
|
12463
|
+
dv,
|
|
12464
|
+
sv,
|
|
12465
|
+
nv
|
|
12412
12466
|
]
|
|
12413
12467
|
});
|
|
12414
12468
|
return /* @__PURE__ */ K("nav", {
|
|
12415
12469
|
"aria-label": i ?? o("middag.ui.tree.label"),
|
|
12416
12470
|
className: a,
|
|
12417
|
-
children: /* @__PURE__ */ K(
|
|
12471
|
+
children: /* @__PURE__ */ K(wv, {
|
|
12418
12472
|
indent: r,
|
|
12419
12473
|
tree: s,
|
|
12420
|
-
children: s.getItems().map((e) => /* @__PURE__ */ K(
|
|
12474
|
+
children: s.getItems().map((e) => /* @__PURE__ */ K(Tv, {
|
|
12421
12475
|
item: e,
|
|
12422
|
-
children: /* @__PURE__ */ K(
|
|
12476
|
+
children: /* @__PURE__ */ K(Ev, {})
|
|
12423
12477
|
}, e.getId()))
|
|
12424
12478
|
})
|
|
12425
12479
|
});
|
|
12426
12480
|
}
|
|
12427
12481
|
//#endregion
|
|
12428
12482
|
//#region src/base/theme/theme-context.tsx
|
|
12429
|
-
var
|
|
12483
|
+
var Ov = [
|
|
12430
12484
|
"classic",
|
|
12431
12485
|
"enterprise",
|
|
12432
12486
|
"soft",
|
|
12433
12487
|
"midnight"
|
|
12434
|
-
],
|
|
12488
|
+
], kv = {
|
|
12435
12489
|
classic: {
|
|
12436
12490
|
id: "classic",
|
|
12437
12491
|
badge: {
|
|
@@ -12488,19 +12542,19 @@ var Dv = [
|
|
|
12488
12542
|
},
|
|
12489
12543
|
card: { bordered: !0 }
|
|
12490
12544
|
}
|
|
12491
|
-
},
|
|
12492
|
-
function
|
|
12493
|
-
return Wn(
|
|
12545
|
+
}, Av = Vn(kv.classic);
|
|
12546
|
+
function jv() {
|
|
12547
|
+
return Wn(Av);
|
|
12494
12548
|
}
|
|
12495
|
-
function
|
|
12496
|
-
return
|
|
12549
|
+
function Mv(e) {
|
|
12550
|
+
return kv[e];
|
|
12497
12551
|
}
|
|
12498
|
-
var
|
|
12552
|
+
var Nv = {
|
|
12499
12553
|
classic: "theme-classic",
|
|
12500
12554
|
enterprise: "theme-enterprise",
|
|
12501
12555
|
soft: "theme-soft",
|
|
12502
12556
|
midnight: "theme-midnight"
|
|
12503
|
-
},
|
|
12557
|
+
}, Pv = {
|
|
12504
12558
|
classic: {
|
|
12505
12559
|
width: "260px",
|
|
12506
12560
|
icon: "60px"
|
|
@@ -12518,23 +12572,23 @@ var Mv = {
|
|
|
12518
12572
|
icon: "52px"
|
|
12519
12573
|
}
|
|
12520
12574
|
};
|
|
12521
|
-
function
|
|
12522
|
-
return /* @__PURE__ */ K(
|
|
12523
|
-
value: Jn(() =>
|
|
12575
|
+
function Fv({ theme: e, children: t }) {
|
|
12576
|
+
return /* @__PURE__ */ K(Av, {
|
|
12577
|
+
value: Jn(() => kv[e], [e]),
|
|
12524
12578
|
children: t
|
|
12525
12579
|
});
|
|
12526
12580
|
}
|
|
12527
12581
|
//#endregion
|
|
12528
12582
|
//#region src/base/theme/host-layout-detector.ts
|
|
12529
|
-
var
|
|
12583
|
+
var Iv = [
|
|
12530
12584
|
"#wpadminbar",
|
|
12531
12585
|
"nav.navbar",
|
|
12532
12586
|
"[data-region=\"navbar\"]",
|
|
12533
12587
|
"[data-host-header]"
|
|
12534
|
-
],
|
|
12535
|
-
function
|
|
12588
|
+
], Lv = null, Rv = null;
|
|
12589
|
+
function zv() {
|
|
12536
12590
|
if (typeof document > "u") return 0;
|
|
12537
|
-
for (let e of
|
|
12591
|
+
for (let e of Iv) {
|
|
12538
12592
|
let t = document.querySelector(e);
|
|
12539
12593
|
if (t) {
|
|
12540
12594
|
let e = t.getBoundingClientRect();
|
|
@@ -12543,28 +12597,28 @@ function Rv() {
|
|
|
12543
12597
|
}
|
|
12544
12598
|
return 0;
|
|
12545
12599
|
}
|
|
12546
|
-
function
|
|
12547
|
-
let e =
|
|
12600
|
+
function Bv() {
|
|
12601
|
+
let e = zv(), t = document.documentElement.style.getPropertyValue("--host-header-height"), n = `${e}px`;
|
|
12548
12602
|
t !== n && document.documentElement.style.setProperty("--host-header-height", n);
|
|
12549
12603
|
}
|
|
12550
|
-
function
|
|
12551
|
-
typeof document > "u" || (
|
|
12552
|
-
requestAnimationFrame(() =>
|
|
12553
|
-
}),
|
|
12604
|
+
function Vv() {
|
|
12605
|
+
typeof document > "u" || (Bv(), Rv || (Rv = () => Bv(), window.addEventListener("resize", Rv, { passive: !0 })), Lv || (Lv = new MutationObserver(() => {
|
|
12606
|
+
requestAnimationFrame(() => Bv());
|
|
12607
|
+
}), Lv.observe(document.body, {
|
|
12554
12608
|
childList: !0,
|
|
12555
12609
|
subtree: !1,
|
|
12556
12610
|
attributes: !1
|
|
12557
12611
|
})));
|
|
12558
12612
|
}
|
|
12559
|
-
function
|
|
12613
|
+
function Hv(e) {
|
|
12560
12614
|
typeof document > "u" || document.documentElement.style.setProperty("--host-header-height", `${e}px`);
|
|
12561
12615
|
}
|
|
12562
|
-
function
|
|
12563
|
-
|
|
12616
|
+
function Uv() {
|
|
12617
|
+
Rv &&= (window.removeEventListener("resize", Rv), null), Lv &&= (Lv.disconnect(), null);
|
|
12564
12618
|
}
|
|
12565
12619
|
//#endregion
|
|
12566
12620
|
//#region src/app/providers/locales/pt-BR.ts
|
|
12567
|
-
var
|
|
12621
|
+
var Wv = {
|
|
12568
12622
|
"middag.ui.shell.skip_to_content": "Pular para o conteúdo principal",
|
|
12569
12623
|
"middag.ui.sidebar.collapse": "Recolher",
|
|
12570
12624
|
"middag.ui.sidebar.expand": "Expandir",
|
|
@@ -12703,8 +12757,8 @@ var Uv = {
|
|
|
12703
12757
|
"middag.ui.log.download": "Baixar",
|
|
12704
12758
|
"middag.ui.dense_table.confirm_action": "Confirmar \"{label}\"?",
|
|
12705
12759
|
"middag.ui.page_action.confirm_message": "Esta ação não pode ser desfeita."
|
|
12706
|
-
},
|
|
12707
|
-
function
|
|
12760
|
+
}, Gv = Vn(null);
|
|
12761
|
+
function Kv({ children: e }) {
|
|
12708
12762
|
let { props: t } = tr(), n = t.auth, r = Jn(() => ({
|
|
12709
12763
|
user: {
|
|
12710
12764
|
id: n.id,
|
|
@@ -12715,27 +12769,27 @@ function Gv({ children: e }) {
|
|
|
12715
12769
|
capabilities: n.capabilities,
|
|
12716
12770
|
can: (e) => n.capabilities.includes(e)
|
|
12717
12771
|
}), [n]);
|
|
12718
|
-
return /* @__PURE__ */ K(
|
|
12772
|
+
return /* @__PURE__ */ K(Gv.Provider, {
|
|
12719
12773
|
value: r,
|
|
12720
12774
|
children: e
|
|
12721
12775
|
});
|
|
12722
12776
|
}
|
|
12723
|
-
function
|
|
12724
|
-
let e = Wn(
|
|
12777
|
+
function qv() {
|
|
12778
|
+
let e = Wn(Gv);
|
|
12725
12779
|
if (!e) throw Error("[@middag-io/react] useAuth must be used within <AuthProvider>. Wrap your app root with <AuthProvider>. Docs: https://ui-docs.middag.io/guides/providers");
|
|
12726
12780
|
return e;
|
|
12727
12781
|
}
|
|
12728
|
-
function
|
|
12729
|
-
let { can: n } =
|
|
12782
|
+
function Jv({ capability: e, children: t }) {
|
|
12783
|
+
let { can: n } = qv();
|
|
12730
12784
|
return n(e) ? /* @__PURE__ */ K(G, { children: t }) : null;
|
|
12731
12785
|
}
|
|
12732
|
-
function
|
|
12733
|
-
let { can: n } =
|
|
12786
|
+
function Yv({ capability: e, children: t }) {
|
|
12787
|
+
let { can: n } = qv();
|
|
12734
12788
|
return n(e) ? null : /* @__PURE__ */ K(G, { children: t });
|
|
12735
12789
|
}
|
|
12736
12790
|
//#endregion
|
|
12737
12791
|
//#region src/app/providers/flash.tsx
|
|
12738
|
-
function
|
|
12792
|
+
function Xv({ children: e }) {
|
|
12739
12793
|
let { props: t } = tr(), n = t.flash, r = Yn(null);
|
|
12740
12794
|
return H(() => {
|
|
12741
12795
|
n && JSON.stringify(n) !== JSON.stringify(r.current) && (r.current = n, n.success && om.success(n.success), n.error && om.error(n.error), n.info && om.info(n.info), n.warning && om.warning(n.warning), n.toast && om[n.toast.severity](n.toast.message, { duration: n.toast.duration ?? 5e3 }));
|
|
@@ -12743,23 +12797,23 @@ function Yv({ children: e }) {
|
|
|
12743
12797
|
}
|
|
12744
12798
|
//#endregion
|
|
12745
12799
|
//#region src/app/providers/scope.tsx
|
|
12746
|
-
var
|
|
12747
|
-
function
|
|
12800
|
+
var Zv = Vn({});
|
|
12801
|
+
function Qv({ children: e }) {
|
|
12748
12802
|
let { props: t } = tr(), n = Jn(() => t.scope ?? {}, [t.scope]);
|
|
12749
|
-
return /* @__PURE__ */ K(
|
|
12803
|
+
return /* @__PURE__ */ K(Zv.Provider, {
|
|
12750
12804
|
value: n,
|
|
12751
12805
|
children: e
|
|
12752
12806
|
});
|
|
12753
12807
|
}
|
|
12754
|
-
function
|
|
12755
|
-
return Wn(
|
|
12808
|
+
function $v() {
|
|
12809
|
+
return Wn(Zv);
|
|
12756
12810
|
}
|
|
12757
|
-
function
|
|
12758
|
-
return
|
|
12811
|
+
function ey(e) {
|
|
12812
|
+
return $v()[e];
|
|
12759
12813
|
}
|
|
12760
12814
|
//#endregion
|
|
12761
12815
|
//#region src/app/providers/progress.tsx
|
|
12762
|
-
var
|
|
12816
|
+
var ty = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
12763
12817
|
(function(n, r) {
|
|
12764
12818
|
typeof define == "function" && define.amd ? define(r) : typeof e == "object" ? t.exports = r() : n.NProgress = r();
|
|
12765
12819
|
})(e, function() {
|
|
@@ -12913,21 +12967,21 @@ var ey = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
12913
12967
|
return e;
|
|
12914
12968
|
});
|
|
12915
12969
|
})))(), 1);
|
|
12916
|
-
|
|
12970
|
+
ty.default.configure({
|
|
12917
12971
|
showSpinner: !1,
|
|
12918
12972
|
minimum: .08,
|
|
12919
12973
|
speed: 200,
|
|
12920
12974
|
trickleSpeed: 200
|
|
12921
12975
|
});
|
|
12922
|
-
function
|
|
12976
|
+
function ny({ children: e }) {
|
|
12923
12977
|
return H(() => {
|
|
12924
12978
|
let e = W.on("start", () => {
|
|
12925
|
-
|
|
12979
|
+
ty.default.start();
|
|
12926
12980
|
}), t = W.on("finish", (e) => {
|
|
12927
|
-
if (e.detail.visit.completed)
|
|
12928
|
-
else if (e.detail.visit.interrupted)
|
|
12981
|
+
if (e.detail.visit.completed) ty.default.done();
|
|
12982
|
+
else if (e.detail.visit.interrupted) ty.default.set(0);
|
|
12929
12983
|
else {
|
|
12930
|
-
|
|
12984
|
+
ty.default.done();
|
|
12931
12985
|
let e = document.querySelector("#nprogress .bar");
|
|
12932
12986
|
e && (e.style.background = "var(--destructive)", setTimeout(() => {
|
|
12933
12987
|
e.style.background = "";
|
|
@@ -12941,7 +12995,7 @@ function ty({ children: e }) {
|
|
|
12941
12995
|
}
|
|
12942
12996
|
//#endregion
|
|
12943
12997
|
//#region src/app/providers/inertia-error-reporter.tsx
|
|
12944
|
-
function
|
|
12998
|
+
function ry({ children: e }) {
|
|
12945
12999
|
let t = kr(), { t: n } = I();
|
|
12946
13000
|
return H(() => {
|
|
12947
13001
|
let e = W.on("httpException", (e) => {
|
|
@@ -12964,7 +13018,7 @@ function ny({ children: e }) {
|
|
|
12964
13018
|
}
|
|
12965
13019
|
//#endregion
|
|
12966
13020
|
//#region src/base/hooks/useLazyTabs.ts
|
|
12967
|
-
function
|
|
13021
|
+
function iy(e) {
|
|
12968
13022
|
let [t, n] = U(new Set([e])), [r, i] = U(/* @__PURE__ */ new Set()), [a, o] = U(/* @__PURE__ */ new Set()), s = V((e) => {
|
|
12969
13023
|
i((t) => new Set([...t, e])), o((t) => {
|
|
12970
13024
|
let n = new Set(t);
|
|
@@ -13003,11 +13057,11 @@ function ry(e) {
|
|
|
13003
13057
|
}
|
|
13004
13058
|
//#endregion
|
|
13005
13059
|
//#region src/assets/lottie/index.ts
|
|
13006
|
-
var
|
|
13060
|
+
var ay = "/lottie";
|
|
13007
13061
|
function $(e, t) {
|
|
13008
|
-
return t.map((t) => `${
|
|
13062
|
+
return t.map((t) => `${ay}/${e}/${t}`);
|
|
13009
13063
|
}
|
|
13010
|
-
var
|
|
13064
|
+
var oy = {
|
|
13011
13065
|
loading: $("loading", [
|
|
13012
13066
|
"spinner-1.json",
|
|
13013
13067
|
"spinner-2.json",
|
|
@@ -13102,4 +13156,4 @@ var ay = {
|
|
|
13102
13156
|
])
|
|
13103
13157
|
};
|
|
13104
13158
|
//#endregion
|
|
13105
|
-
export {
|
|
13159
|
+
export { Im as ActionBar, Qc as ActionGridBlock, pl as ActivityTimelineBlock, If as AnnotatedCell, Kv as AuthProvider, Om as BasicShell, cf as BlockRegion, Of as BooleanCell, Jv as Can, Yv as Cannot, gl as CardGridBlock, zc as ConfirmationDialog, Vr as ContractPage, sf as DashboardLayout, wd as DataTable, Ed as DenseTableBlock, Dd as DetailPanelBlock, Jm as DetailSection, Zu as DropdownMenu, rd as DropdownMenuCheckboxItem, ed as DropdownMenuContent, td as DropdownMenuGroup, nd as DropdownMenuItem, od as DropdownMenuLabel, Qu as DropdownMenuPortal, id as DropdownMenuRadioGroup, ad as DropdownMenuRadioItem, sd as DropdownMenuSeparator, cd as DropdownMenuShortcut, ld as DropdownMenuSub, dd as DropdownMenuSubContent, ud as DropdownMenuSubTrigger, $u as DropdownMenuTrigger, y as EmptyPlaceholder, jd as EmptyStateBlock, rh as EntityItem, fr as EntityLink, ur as EntityRoutesProvider, Or as ErrorReporterProvider, Xu as FilterBar, Xv as FlashProvider, Pd as FormPanelBlock, De as FormSection, Fm as HostSlot, Nf as HtmlCell, Xe as I18nProvider, km as ImmersiveShell, ry as InertiaErrorReporter, Ye as LIB_UI_DEFAULTS, hr as LazyBlock, Af as LinkCell, Pf as LinkGroupCell, Fd as LinkListBlock, lh as LogViewer, Fv as MIDDAGThemeProvider, In as MarkdownContent, Rd as MarkdownPanelBlock, vh as MenuBar, Kd as MetricCardBlock, Mr as NavErrorBoundary, Rf as ProgressCell, ny as ProgressProvider, yh as QuickRecordSheet, h_ as ResizableSidebar, Mf as RichStatusCell, Qv as ScopeProvider, Np as Sidebar, zp as SidebarContent, Rp as SidebarFooter, Bp as SidebarGroup, Lp as SidebarHeader, Ip as SidebarInset, lf as SidebarLayout, Hp as SidebarMenu, Gp as SidebarMenuButton, Up as SidebarMenuItem, Mp as SidebarProvider, Fp as SidebarRail, Pp as SidebarTrigger, uf as StackLayout, af as StatRow, Yd as StatusBar, Df as StatusCell, v_ as StatusIndicator, Zd as StatusStripBlock, bf as StepIndicator, Nv as THEME_CLASSES, Ov as THEME_IDS, Pv as THEME_SIDEBAR_DIMS, $d as TabbedPanelBlock, x_ as TableOfContents, O_ as TimelineList, kf as TimestampCell, wm as Toaster, N_ as ToggleGroupControl, Bd as Tooltip, Hd as TooltipContent, zd as TooltipProvider, Vd as TooltipTrigger, Dv as TreeView, Cf as WizardLayout, ef as WorkflowProgressBlock, lp as applyTheme, yr as blockRegistry, dp as cycleAppearance, Uv as destroyHostHeaderHeight, sp as getEffectiveTheme, rp as getStoragePrefix, cp as getStoredAppearance, Mv as getThemeOverrides, pp as initDir, Vv as initHostHeaderHeight, gr as isLazyBlock, vr as layoutRegistry, Wv as localePtBR, Wv as ptBR, oy as lottie, mp as onSystemThemeChange, sr as pageContractSchema, Sr as registerBlock, Gr as registerCellRenderer, Bf as registerDefaultCells, nf as registerDefaultFields, jm as registerDefaultIcons, Nm as registerDefaults, r as registerEntityIcon, J as registerFieldComponent, k as registerIcon, xr as registerLayout, br as registerShell, Je as registerUiStrings, Tr as resolveBlock, Kr as resolveCellRenderer, Oe as resolveEntityIcon, Ur as resolveFieldComponent, ve as resolveIcon, wr as resolveLayout, Cr as resolveShell, up as setAppearance, Hv as setHostHeaderHeight, np as setStoragePrefix, _r as shellRegistry, ip as storageKey, fp as toggleDir, qv as useAuth, dr as useEntityRoute, kr as useErrorReporter, hl as useInspector, qf as useIsDark, iy as useLazyTabs, Yu as useRemember, $v as useScope, ey as useScopeKey, jp as useSidebar, jv as useThemeOverrides, I as useTranslation, cr as validatePageContract };
|