likec4 1.59.4 → 1.61.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/README.md +2 -0
- package/__app__/codegen/react.mjs +4 -10
- package/__app__/codegen/webcomponent.mjs +6 -131
- package/__app__/index.html +15 -15
- package/__app__/src/aichat/index.mjs +11 -7
- package/__app__/src/chunks/AIChat.mjs +1355 -739
- package/__app__/src/chunks/ErrorComponent.mjs +444 -0
- package/__app__/src/chunks/Header.mjs +269 -0
- package/__app__/src/chunks/ViewReact.mjs +438 -0
- package/__app__/src/chunks/find.mjs +38 -0
- package/__app__/src/chunks/hooks.mjs +158 -472
- package/__app__/src/chunks/libs/@tabler/icons-react.mjs +340 -0
- package/__app__/src/chunks/libs/@tanstack-ai.mjs +11841 -1417
- package/__app__/src/chunks/libs/@tanstack.mjs +5110 -2404
- package/__app__/src/chunks/libs/fast-equals.mjs +507 -214
- package/__app__/src/chunks/libs/html-to-image.mjs +613 -0
- package/__app__/src/chunks/libs/nanostores.mjs +170 -0
- package/__app__/src/chunks/libs/react-resizable-panels.mjs +2792 -0
- package/__app__/src/chunks/react.mjs +22 -0
- package/__app__/src/chunks/rolldown-runtime.mjs +16 -29
- package/__app__/src/chunks/router.mjs +106 -0
- package/__app__/src/chunks/scope.mjs +106 -0
- package/__app__/src/chunks/searchParams.mjs +29 -0
- package/__app__/src/chunks/single-index.mjs +465 -0
- package/__app__/src/chunks/styled-system.mjs +1826 -2528
- package/__app__/src/chunks/useAsync.mjs +69 -0
- package/__app__/src/chunks/useSyncedRef.mjs +16 -0
- package/__app__/src/components/ColorSchemeToggle.mjs +124 -0
- package/__app__/src/components/CopyToClipboard.mjs +53 -0
- package/__app__/src/components/ErrorComponent.mjs +1 -0
- package/__app__/src/components/NavigationPanel.mjs +63 -0
- package/__app__/src/components/NotFound.mjs +155 -0
- package/__app__/src/components/ViewOutlet.mjs +9 -0
- package/__app__/src/components/model-diff/CompareModelProvider.mjs +44 -0
- package/__app__/src/components/model-diff/ModelDiffPanel.mjs +179 -0
- package/__app__/src/components/model-diff/compare-model.mjs +76 -0
- package/__app__/src/components/model-diff/state.mjs +45 -0
- package/__app__/src/components/search/OverviewSearch.mjs +92 -0
- package/__app__/src/components/search/OverviewSearchAdapter.mjs +94 -0
- package/__app__/src/components/sidebar/DiagramTree.css.mjs +48 -0
- package/__app__/src/components/sidebar/DiagramsTree.mjs +304 -0
- package/__app__/src/components/sidebar/Drawer.mjs +178 -0
- package/__app__/src/components/sidebar/SidebarBurger.mjs +28 -0
- package/__app__/src/components/sidebar/data.mjs +94 -0
- package/__app__/src/components/sidebar/state.mjs +16 -0
- package/__app__/src/components/view-page/Header.mjs +1 -0
- package/__app__/src/components/view-page/SelectProject.mjs +258 -0
- package/__app__/src/components/view-page/ShareModal.mjs +111 -0
- package/__app__/src/components/view-page/share-modal/AlertLocalhost.mjs +31 -0
- package/__app__/src/components/view-page/share-modal/CopyButtonChild.mjs +36 -0
- package/__app__/src/components/view-page/share-modal/EmbedPanel.mjs +100 -0
- package/__app__/src/components/view-page/share-modal/WebcomponentsPanel.mjs +264 -0
- package/__app__/src/components/view-page/state.mjs +17 -0
- package/__app__/src/context/LikeC4CustomizationContext.mjs +26 -0
- package/__app__/src/context/LikeC4IconRendererContext.mjs +29 -0
- package/__app__/src/context/LikeC4ModelContext.mjs +34 -0
- package/__app__/src/context/LikeC4ProjectsContext.mjs +40 -0
- package/__app__/src/context/ModelDiffsContext.mjs +33 -0
- package/__app__/src/context/safeCtx.mjs +14 -0
- package/__app__/src/fonts.css +112 -1
- package/__app__/src/hooks.mjs +1 -0
- package/__app__/src/main.mjs +6 -29151
- package/__app__/src/pages/EmbedPage.mjs +93 -0
- package/__app__/src/pages/ExportPage.mjs +691 -0
- package/__app__/src/pages/ProjectsOverview.mjs +23 -0
- package/__app__/src/pages/ViewAsD2.mjs +105 -0
- package/__app__/src/pages/ViewAsDot.mjs +65 -0
- package/__app__/src/pages/ViewAsMmd.mjs +109 -0
- package/__app__/src/pages/ViewAsPuml.mjs +105 -0
- package/__app__/src/pages/ViewEditor.mjs +220 -0
- package/__app__/src/pages/ViewReact.mjs +1 -0
- package/__app__/src/pages/export-layout.mjs +95 -0
- package/__app__/src/pages/export-page-params.mjs +9 -0
- package/__app__/src/pages/styles.css.mjs +23 -0
- package/__app__/src/routeTree.gen.mjs +105 -0
- package/__app__/src/router.mjs +1 -0
- package/__app__/src/routes/__root.mjs +65 -0
- package/__app__/src/routes/index.css.mjs +29 -0
- package/__app__/src/routes/index.mjs +32 -0
- package/__app__/src/routes/project._projectId/-components.mjs +100 -0
- package/__app__/src/routes/project._projectId/embed._viewId.mjs +5 -0
- package/__app__/src/routes/project._projectId/export._viewId.mjs +24 -0
- package/__app__/src/routes/project._projectId/index.mjs +14 -0
- package/__app__/src/routes/project._projectId/route.mjs +93 -0
- package/__app__/src/routes/project._projectId/view._viewId.d2.mjs +34 -0
- package/__app__/src/routes/project._projectId/view._viewId.dot.mjs +41 -0
- package/__app__/src/routes/project._projectId/view._viewId.index.mjs +7 -0
- package/__app__/src/routes/project._projectId/view._viewId.mjs +23 -0
- package/__app__/src/routes/project._projectId/view._viewId.mmd.mjs +39 -0
- package/__app__/src/routes/project._projectId/view._viewId.puml.mjs +34 -0
- package/__app__/src/routes/projects.mjs +36 -0
- package/__app__/src/routes/single-index.mjs +1 -0
- package/__app__/src/routes/webcomponent._.mjs +94 -0
- package/__app__/src/style.css +18497 -1
- package/config/schema.json +146 -97
- package/dist/app/render-view-client.css +1 -1
- package/dist/app/render-view-client.js +394 -238
- package/dist/chunks/enableServer.mjs +1 -1
- package/dist/chunks/filenames.mjs +25 -17
- package/dist/chunks/generate-likec4.mjs +5 -0
- package/dist/chunks/index.d.mts +255 -194
- package/dist/chunks/index2.d.mts +8246 -3610
- package/dist/chunks/libs/@chenglou/pretext.mjs +9 -0
- package/dist/chunks/libs/@chevrotain/gast.mjs +27 -1
- package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +81 -9
- package/dist/chunks/libs/@logtape/logtape.mjs +5 -4
- package/dist/chunks/libs/@lume/kiwi.mjs +1 -1
- package/dist/chunks/libs/@ts-graphviz/common.d.mts +2 -4
- package/dist/chunks/libs/@ts-graphviz/core.mjs +1 -1
- package/dist/chunks/libs/birpc.mjs +1 -1
- package/dist/chunks/libs/chevrotain-allstar.mjs +2 -2
- package/dist/chunks/libs/chevrotain.mjs +88 -36
- package/dist/chunks/libs/clone.mjs +1 -0
- package/dist/chunks/libs/eventemitter3.mjs +1 -1
- package/dist/chunks/libs/fast-equals.mjs +1 -0
- package/dist/chunks/libs/fontkit.mjs +1 -0
- package/dist/chunks/libs/json5.mjs +4 -4
- package/dist/chunks/libs/langium.d.mts +6707 -6715
- package/dist/chunks/libs/langium.mjs +16 -24
- package/dist/chunks/libs/merge-error-cause.mjs +1 -1
- package/dist/chunks/libs/p-limit.mjs +1 -0
- package/dist/chunks/libs/p-queue.mjs +1 -1
- package/dist/chunks/libs/package-manager-detector.mjs +1 -1
- package/dist/chunks/libs/pako.mjs +1 -1
- package/dist/chunks/libs/pathe.mjs +1 -1
- package/dist/chunks/libs/pretty-ms.mjs +1 -1
- package/dist/chunks/libs/remeda.mjs +1 -1
- package/dist/chunks/libs/ufo.mjs +1 -1
- package/dist/chunks/libs/unstorage.mjs +1 -1
- package/dist/chunks/libs/which.mjs +1 -1
- package/dist/chunks/node.mjs +111 -77
- package/dist/chunks/rolldown-runtime.mjs +1 -1
- package/dist/chunks/sequence-view.mjs +1 -1
- package/dist/chunks/vite-plugin.mjs +185 -166
- package/dist/cli/index.mjs +254 -1306
- package/dist/config/index.d.mts +66 -5
- package/dist/config/index.mjs +1 -1
- package/dist/generators/likec4.d.mts +6530 -0
- package/dist/generators/likec4.mjs +1 -0
- package/dist/index.d.mts +2 -4
- package/dist/model/index.d.mts +0 -7
- package/dist/vite-plugin/index.d.mts +83 -58
- package/dist/vite-plugin/index.mjs +1 -1
- package/dist/vite-plugin/internal/chunks/rolldown-runtime.mjs +8 -0
- package/dist/vite-plugin/internal/index.d.mts +92 -17
- package/dist/vite-plugin/internal/index.mjs +225 -126
- package/generators/likec4/package.json +4 -0
- package/package.json +134 -122
- package/react/index.d.mts +7496 -26659
- package/react/index.mjs +533 -63936
- package/react/rolldown-runtime-CfRud99p.js +1 -0
- package/skills/likec4-dsl/SKILL.md +474 -0
- package/skills/likec4-dsl/evals/evals-public.json +207 -0
- package/skills/likec4-dsl/evals/grading-spec.json +603 -0
- package/skills/likec4-dsl/references/bridge-leanix-drawio.md +42 -0
- package/skills/likec4-dsl/references/cli.md +168 -0
- package/skills/likec4-dsl/references/configuration.md +266 -0
- package/skills/likec4-dsl/references/deployment.md +160 -0
- package/skills/likec4-dsl/references/diffs.md +52 -0
- package/skills/likec4-dsl/references/dynamic-views.md +455 -0
- package/skills/likec4-dsl/references/examples.md +370 -0
- package/skills/likec4-dsl/references/identifier-validity.md +90 -0
- package/skills/likec4-dsl/references/include-predicates-wildcards.md +180 -0
- package/skills/likec4-dsl/references/model.md +182 -0
- package/skills/likec4-dsl/references/predicates.md +123 -0
- package/skills/likec4-dsl/references/relationships-bidirectional.md +176 -0
- package/skills/likec4-dsl/references/specification.md +79 -0
- package/skills/likec4-dsl/references/style-tokens-colors.md +150 -0
- package/skills/likec4-dsl/references/troubleshooting.md +101 -0
- package/skills/likec4-dsl/references/views.md +329 -0
- package/vite-plugin-modules.d.ts +126 -51
- package/__app__/src/chunks/LikeC4Styles.mjs +0 -2306
- package/__app__/src/chunks/ProjectsOverview.mjs +0 -537
- package/__app__/src/chunks/es.mjs +0 -439
- package/__app__/src/chunks/libs/@floating-ui.mjs +0 -2532
- package/__app__/src/chunks/libs/@mantine.mjs +0 -13868
- package/__app__/src/chunks/libs/@xstate/react.mjs +0 -2015
- package/__app__/src/chunks/libs/@xyflow/react.mjs +0 -5367
- package/__app__/src/chunks/libs/bezier-js.mjs +0 -1007
- package/__app__/src/chunks/libs/d3.mjs +0 -2817
- package/__app__/src/chunks/libs/framer.mjs +0 -5926
- package/__app__/src/chunks/libs/zod.mjs +0 -3176
- package/dist/chunks/libs/@chevrotain/types.d.mts +0 -108
- package/dist/chunks/libs/picomatch.mjs +0 -1
- package/dist/chunks/libs/zod.d.mts +0 -3840
- package/dist/chunks/libs/zod.mjs +0 -65
|
@@ -0,0 +1,2792 @@
|
|
|
1
|
+
import "../rolldown-runtime.mjs";
|
|
2
|
+
import { Children, createContext, isValidElement, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
// ../../node_modules/.pnpm/react-resizable-panels@4.14.3_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-resizable-panels/dist/react-resizable-panels.js
|
|
5
|
+
function Te(e) {
|
|
6
|
+
const t = useId();
|
|
7
|
+
return `${e ?? t}`;
|
|
8
|
+
}
|
|
9
|
+
var ne = typeof window < "u" ? useLayoutEffect : useEffect;
|
|
10
|
+
function ge(e) {
|
|
11
|
+
const t = useRef(e);
|
|
12
|
+
return ne(() => {
|
|
13
|
+
t.current = e;
|
|
14
|
+
}, [e]), useCallback((...n) => t.current?.(...n), [t]);
|
|
15
|
+
}
|
|
16
|
+
function qe(...e) {
|
|
17
|
+
return ge((t) => {
|
|
18
|
+
e.forEach((n) => {
|
|
19
|
+
if (n) switch (typeof n) {
|
|
20
|
+
case "function":
|
|
21
|
+
n(t);
|
|
22
|
+
break;
|
|
23
|
+
case "object": n.current = t;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function nt(e, t) {
|
|
29
|
+
return t ? e * 2 + 1 : e + 1;
|
|
30
|
+
}
|
|
31
|
+
function Sn(e, t) {
|
|
32
|
+
return t ? e * 2 - 1 : e;
|
|
33
|
+
}
|
|
34
|
+
function ht(e, t, n) {
|
|
35
|
+
const o = nt(e, n);
|
|
36
|
+
return t === void 0 ? `${o} / -1` : `${o} / span ${Sn(t, n)}`;
|
|
37
|
+
}
|
|
38
|
+
function vn(e) {
|
|
39
|
+
return `${e * 2} / span 1`;
|
|
40
|
+
}
|
|
41
|
+
function bn({ crossCount: e, crossSpan: t, crossStart: n, hasGutters: o }) {
|
|
42
|
+
const r = t === void 0 ? e : n + t;
|
|
43
|
+
if (n === 0 && r === e) return "1 / -1";
|
|
44
|
+
let i = nt(n, o);
|
|
45
|
+
let s = nt(r - 1, o) + 1;
|
|
46
|
+
return o && (n > 0 && i--, r < e && s++), `${i} / ${s}`;
|
|
47
|
+
}
|
|
48
|
+
function at(e, t) {
|
|
49
|
+
return Number.isInteger(e) && e >= 1 && e < t;
|
|
50
|
+
}
|
|
51
|
+
function D(e, t = "Assertion error") {
|
|
52
|
+
if (!e) throw Error(t);
|
|
53
|
+
}
|
|
54
|
+
var jt = createContext(null);
|
|
55
|
+
function Ut() {
|
|
56
|
+
const e = useContext(jt);
|
|
57
|
+
return D(e, "Grid Context not found; did you render a Cell or Gridline outside of a Grid?"), e;
|
|
58
|
+
}
|
|
59
|
+
function xn({ children: e, className: t, column: n, columnSpan: o = 1, elementRef: r, id: i, row: s, rowSpan: l = 1, style: a, ...c }) {
|
|
60
|
+
const u = Te(i), { gutters: d, registerCell: p } = Ut(), y = useRef(null), m = qe(y, r);
|
|
61
|
+
return ne(() => {
|
|
62
|
+
const f = y.current;
|
|
63
|
+
if (f !== null) return p({
|
|
64
|
+
column: n,
|
|
65
|
+
columnSpan: o,
|
|
66
|
+
element: f,
|
|
67
|
+
id: u,
|
|
68
|
+
row: s,
|
|
69
|
+
rowSpan: l
|
|
70
|
+
});
|
|
71
|
+
}, [
|
|
72
|
+
n,
|
|
73
|
+
o,
|
|
74
|
+
u,
|
|
75
|
+
p,
|
|
76
|
+
s,
|
|
77
|
+
l
|
|
78
|
+
]), /* @__PURE__ */ jsx("div", {
|
|
79
|
+
...c,
|
|
80
|
+
className: t,
|
|
81
|
+
"data-cell": !0,
|
|
82
|
+
"data-testid": u,
|
|
83
|
+
id: u,
|
|
84
|
+
ref: m,
|
|
85
|
+
style: {
|
|
86
|
+
overflow: "auto",
|
|
87
|
+
...a,
|
|
88
|
+
minHeight: 0,
|
|
89
|
+
minWidth: 0,
|
|
90
|
+
gridColumn: ht(n, o, d.column),
|
|
91
|
+
gridRow: ht(s, l, d.row)
|
|
92
|
+
},
|
|
93
|
+
children: e
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
xn.displayName = "Cell";
|
|
97
|
+
var We;
|
|
98
|
+
function wn() {
|
|
99
|
+
return We === void 0 && (typeof matchMedia == "function" ? We = !!matchMedia("(pointer:coarse)").matches : We = !1), We;
|
|
100
|
+
}
|
|
101
|
+
function ot({ expandHitTargets: e, axis: t, rect: n }) {
|
|
102
|
+
const o = e ? wn() ? t.resizeTargetMinimumSize.coarse : t.resizeTargetMinimumSize.fine : 0;
|
|
103
|
+
if (n.width < o) {
|
|
104
|
+
const r = o - n.width;
|
|
105
|
+
n = new DOMRect(n.x - r / 2, n.y, n.width + r, n.height);
|
|
106
|
+
}
|
|
107
|
+
if (n.height < o) {
|
|
108
|
+
const r = o - n.height;
|
|
109
|
+
n = new DOMRect(n.x, n.y - r / 2, n.width, n.height + r);
|
|
110
|
+
}
|
|
111
|
+
return n;
|
|
112
|
+
}
|
|
113
|
+
function gt({ axis: e, cells: t, index: n, rect: o }) {
|
|
114
|
+
let r = [o];
|
|
115
|
+
for (const i of t) {
|
|
116
|
+
const s = e === "column" ? i.column : i.row;
|
|
117
|
+
const l = e === "column" ? i.columnSpan : i.rowSpan;
|
|
118
|
+
if (s >= n || s + l <= n) continue;
|
|
119
|
+
const a = i.element.getBoundingClientRect();
|
|
120
|
+
const c = e === "column" ? a.top : a.left;
|
|
121
|
+
const u = e === "column" ? a.bottom : a.right;
|
|
122
|
+
u <= c || (r = r.flatMap((d) => {
|
|
123
|
+
const p = e === "column" ? d.top : d.left;
|
|
124
|
+
const y = e === "column" ? d.bottom : d.right;
|
|
125
|
+
if (c >= y || u <= p) return [d];
|
|
126
|
+
const m = [];
|
|
127
|
+
const f = (S, h) => {
|
|
128
|
+
m.push(e === "column" ? new DOMRect(d.x, S, d.width, h - S) : new DOMRect(S, d.y, h - S, d.height));
|
|
129
|
+
};
|
|
130
|
+
return p < c && f(p, c), y > u && f(u, y), m;
|
|
131
|
+
}));
|
|
132
|
+
}
|
|
133
|
+
return r;
|
|
134
|
+
}
|
|
135
|
+
function zn({ axis: e, cells: t, crossTrackCount: n, expandHitTargets: o, resizeAxis: r, axisSize: i, includeDisabled: s, separatorPlacements: l }) {
|
|
136
|
+
const { items: a, separators: c } = r, u = a.length;
|
|
137
|
+
let d = -1;
|
|
138
|
+
let p = -1;
|
|
139
|
+
let y = 0;
|
|
140
|
+
if (a.forEach((b, w) => {
|
|
141
|
+
b.constraintProps.disabled || (y++, d === -1 && (d = w), p = w);
|
|
142
|
+
}), !s && y < 2) return [];
|
|
143
|
+
const m = (b) => s || b > d && b <= p;
|
|
144
|
+
const f = [];
|
|
145
|
+
const S = (b, w, v) => ({
|
|
146
|
+
axis: r,
|
|
147
|
+
axisSize: i,
|
|
148
|
+
items: [a[b - 1], a[b]],
|
|
149
|
+
rect: w,
|
|
150
|
+
separator: v
|
|
151
|
+
});
|
|
152
|
+
const h = (b, w) => {
|
|
153
|
+
let v;
|
|
154
|
+
for (const T of t) {
|
|
155
|
+
const O = e === "column" ? T.row : T.column;
|
|
156
|
+
const R = e === "column" ? T.rowSpan : T.columnSpan;
|
|
157
|
+
if (w === "start" ? O === b : O + R - 1 === b) {
|
|
158
|
+
const E = T.element.getBoundingClientRect();
|
|
159
|
+
if (w === "start") {
|
|
160
|
+
const P = e === "column" ? E.top : E.left;
|
|
161
|
+
v = v === void 0 ? P : Math.min(v, P);
|
|
162
|
+
} else {
|
|
163
|
+
const P = e === "column" ? E.bottom : E.right;
|
|
164
|
+
v = v === void 0 ? P : Math.max(v, P);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return v;
|
|
169
|
+
};
|
|
170
|
+
const g = /* @__PURE__ */ new Set();
|
|
171
|
+
for (const b of c) {
|
|
172
|
+
const w = l.get(b);
|
|
173
|
+
if (!w || w.index < 1 || w.index >= u || (g.add(w.index), !s && (b.disabled || b.element.hasAttribute("aria-disabled"))) || !m(w.index)) continue;
|
|
174
|
+
let v = b.element.getBoundingClientRect();
|
|
175
|
+
const { crossSpan: T, crossStart: O } = w, R = T === void 0 ? n : O + T;
|
|
176
|
+
let E = e === "column" ? v.top : v.left;
|
|
177
|
+
let P = e === "column" ? v.bottom : v.right;
|
|
178
|
+
if (O > 0) {
|
|
179
|
+
const z = h(O - 1, "end");
|
|
180
|
+
z !== void 0 && z < E && (E = z);
|
|
181
|
+
}
|
|
182
|
+
if (R < n) {
|
|
183
|
+
const z = h(R, "start");
|
|
184
|
+
z !== void 0 && z > P && (P = z);
|
|
185
|
+
}
|
|
186
|
+
v = e === "column" ? new DOMRect(v.x, E, v.width, P - E) : new DOMRect(E, v.y, P - E, v.height), v = ot({
|
|
187
|
+
expandHitTargets: o,
|
|
188
|
+
axis: r,
|
|
189
|
+
rect: v
|
|
190
|
+
}), s ? f.push(S(w.index, v, b)) : gt({
|
|
191
|
+
axis: e,
|
|
192
|
+
cells: t,
|
|
193
|
+
index: w.index,
|
|
194
|
+
rect: v
|
|
195
|
+
}).forEach((z) => {
|
|
196
|
+
f.push(S(w.index, z, b));
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
const I = (b, w) => {
|
|
200
|
+
gt({
|
|
201
|
+
axis: e,
|
|
202
|
+
cells: t,
|
|
203
|
+
index: b,
|
|
204
|
+
rect: ot({
|
|
205
|
+
expandHitTargets: o,
|
|
206
|
+
axis: r,
|
|
207
|
+
rect: w
|
|
208
|
+
})
|
|
209
|
+
}).forEach((v) => {
|
|
210
|
+
f.push(S(b, v));
|
|
211
|
+
});
|
|
212
|
+
};
|
|
213
|
+
const x = Array.from({ length: n }, () => new Array(u));
|
|
214
|
+
for (const b of t) {
|
|
215
|
+
const [w, v, T, O] = e === "column" ? [
|
|
216
|
+
b.column,
|
|
217
|
+
b.columnSpan,
|
|
218
|
+
b.row,
|
|
219
|
+
b.rowSpan
|
|
220
|
+
] : [
|
|
221
|
+
b.row,
|
|
222
|
+
b.rowSpan,
|
|
223
|
+
b.column,
|
|
224
|
+
b.columnSpan
|
|
225
|
+
];
|
|
226
|
+
for (let R = Math.max(0, T); R < Math.min(n, T + O); R++) for (let E = Math.max(0, w); E < Math.min(u, w + v); E++) x[R][E] ??= b;
|
|
227
|
+
}
|
|
228
|
+
const C = /* @__PURE__ */ new Map();
|
|
229
|
+
const A = (b) => {
|
|
230
|
+
let w = C.get(b);
|
|
231
|
+
if (!w) {
|
|
232
|
+
const v = b.element.getBoundingClientRect();
|
|
233
|
+
w = e === "column" ? {
|
|
234
|
+
crossEnd: v.bottom,
|
|
235
|
+
crossStart: v.top,
|
|
236
|
+
end: v.right,
|
|
237
|
+
start: v.left
|
|
238
|
+
} : {
|
|
239
|
+
crossEnd: v.right,
|
|
240
|
+
crossStart: v.left,
|
|
241
|
+
end: v.bottom,
|
|
242
|
+
start: v.top
|
|
243
|
+
}, C.set(b, w);
|
|
244
|
+
}
|
|
245
|
+
return w;
|
|
246
|
+
};
|
|
247
|
+
const N = ({ crossEnd: b, crossStart: w, end: v, start: T }) => e === "column" ? new DOMRect(T, w, v - T, b - w) : new DOMRect(w, T, b - w, v - T);
|
|
248
|
+
for (let b = 1; b < u; b++) {
|
|
249
|
+
if (g.has(b) || !m(b)) continue;
|
|
250
|
+
let w;
|
|
251
|
+
for (let v = 0; v < n; v++) {
|
|
252
|
+
const T = x[v][b - 1];
|
|
253
|
+
const O = x[v][b];
|
|
254
|
+
let R;
|
|
255
|
+
if ((T || O) && T !== O) {
|
|
256
|
+
const E = T ? A(T) : void 0;
|
|
257
|
+
const P = O ? A(O) : void 0;
|
|
258
|
+
const z = E?.end ?? P.start;
|
|
259
|
+
const M = P?.start ?? E.end;
|
|
260
|
+
const q = Math.max(E?.crossStart ?? -1 / 0, P?.crossStart ?? -1 / 0);
|
|
261
|
+
const J = Math.min(E?.crossEnd ?? 1 / 0, P?.crossEnd ?? 1 / 0);
|
|
262
|
+
R = {
|
|
263
|
+
crossEnd: Math.max(q, J),
|
|
264
|
+
crossStart: q,
|
|
265
|
+
end: Math.max(z, M),
|
|
266
|
+
start: Math.min(z, M)
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
R ? w = w ? {
|
|
270
|
+
crossEnd: Math.max(w.crossEnd, R.crossEnd),
|
|
271
|
+
crossStart: Math.min(w.crossStart, R.crossStart),
|
|
272
|
+
end: Math.max(w.end, R.end),
|
|
273
|
+
start: Math.min(w.start, R.start)
|
|
274
|
+
} : R : w && (I(b, N(w)), w = void 0);
|
|
275
|
+
}
|
|
276
|
+
w && I(b, N(w));
|
|
277
|
+
}
|
|
278
|
+
return f;
|
|
279
|
+
}
|
|
280
|
+
function le(e) {
|
|
281
|
+
const t = parseFloat(e ?? "");
|
|
282
|
+
return Number.isFinite(t) ? t : 0;
|
|
283
|
+
}
|
|
284
|
+
function In({ axis: e, element: t, gutterSizes: n, hasGutters: o, layout: r, trackIds: i }) {
|
|
285
|
+
const s = i.length;
|
|
286
|
+
const l = o ? s * 2 - 1 : s;
|
|
287
|
+
const a = t.ownerDocument.defaultView?.getComputedStyle(t);
|
|
288
|
+
const c = e === "column" ? a?.gridTemplateColumns : a?.gridTemplateRows;
|
|
289
|
+
if (c) {
|
|
290
|
+
const f = c.trim().split(/\s+/);
|
|
291
|
+
if (f.length === l && f.every((S) => /^-?[\d.]+px$/.test(S))) {
|
|
292
|
+
const S = i.map((h, g) => le(f[o ? g * 2 : g]));
|
|
293
|
+
return {
|
|
294
|
+
availableSize: S.reduce((h, g) => h + g, 0),
|
|
295
|
+
trackSizes: S
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
const u = e === "column" ? t.offsetWidth : t.offsetHeight;
|
|
300
|
+
const d = e === "column" ? le(a?.paddingLeft) + le(a?.paddingRight) + le(a?.borderLeftWidth) + le(a?.borderRightWidth) : le(a?.paddingTop) + le(a?.paddingBottom) + le(a?.borderTopWidth) + le(a?.borderBottomWidth);
|
|
301
|
+
const p = le(e === "column" ? a?.columnGap : a?.rowGap);
|
|
302
|
+
const y = n.reduce((f, S) => f + S, 0);
|
|
303
|
+
const m = Math.max(0, u - d - p * Math.max(0, l - 1) - y);
|
|
304
|
+
return {
|
|
305
|
+
availableSize: m,
|
|
306
|
+
trackSizes: i.map((f) => r && r[f] !== void 0 ? r[f] / 100 * m : m / s)
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
function Wt(e) {
|
|
310
|
+
switch (typeof e) {
|
|
311
|
+
case "number": return [e, "px"];
|
|
312
|
+
case "string": {
|
|
313
|
+
const t = parseFloat(e);
|
|
314
|
+
return e.endsWith("%") ? [t, "%"] : e.endsWith("px") ? [t, "px"] : e.endsWith("rem") ? [t, "rem"] : e.endsWith("em") ? [t, "em"] : e.endsWith("vh") ? [t, "vh"] : e.endsWith("vw") ? [t, "vw"] : [t, "%"];
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
var Yt = class {
|
|
319
|
+
#e = {};
|
|
320
|
+
addListener(t, n) {
|
|
321
|
+
const o = this.#e[t];
|
|
322
|
+
return o === void 0 ? this.#e[t] = [n] : o.includes(n) || o.push(n), () => {
|
|
323
|
+
this.removeListener(t, n);
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
emit(t, n) {
|
|
327
|
+
const o = this.#e[t];
|
|
328
|
+
if (o !== void 0) if (o.length === 1) o[0].call(null, n);
|
|
329
|
+
else {
|
|
330
|
+
let r = !1;
|
|
331
|
+
let i = null;
|
|
332
|
+
const s = Array.from(o);
|
|
333
|
+
for (let l = 0; l < s.length; l++) {
|
|
334
|
+
const a = s[l];
|
|
335
|
+
try {
|
|
336
|
+
a.call(null, n);
|
|
337
|
+
} catch (c) {
|
|
338
|
+
i === null && (r = !0, i = c);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
if (r) throw i;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
removeAllListeners() {
|
|
345
|
+
this.#e = {};
|
|
346
|
+
}
|
|
347
|
+
removeListener(t, n) {
|
|
348
|
+
const o = this.#e[t];
|
|
349
|
+
if (o !== void 0) {
|
|
350
|
+
const r = o.indexOf(n);
|
|
351
|
+
r >= 0 && o.splice(r, 1);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
};
|
|
355
|
+
var V = {
|
|
356
|
+
cursorFlags: 0,
|
|
357
|
+
state: "inactive"
|
|
358
|
+
};
|
|
359
|
+
var lt = new Yt();
|
|
360
|
+
function se() {
|
|
361
|
+
return V;
|
|
362
|
+
}
|
|
363
|
+
function Kt(e) {
|
|
364
|
+
return lt.addListener("change", e);
|
|
365
|
+
}
|
|
366
|
+
function Ln(e, t = [], n, o = !1) {
|
|
367
|
+
const r = V;
|
|
368
|
+
const i = { ...V };
|
|
369
|
+
i.cursorFlags = e, i.state === "active" && (i.didPointerMove ||= o, i.previews = t, n && (i.previewLayoutMap = n)), V = i, lt.emit("change", {
|
|
370
|
+
prev: r,
|
|
371
|
+
next: i
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
function de(e) {
|
|
375
|
+
const t = V;
|
|
376
|
+
V = e, t.state === "active" && e.state !== "active" && t.didPointerMove && t.hitRegions.forEach(({ separator: n }) => {
|
|
377
|
+
n && n.element.ownerDocument.activeElement === n.element && n.element.blur();
|
|
378
|
+
}), lt.emit("change", {
|
|
379
|
+
prev: t,
|
|
380
|
+
next: e
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
function Cn(e) {
|
|
384
|
+
V.state !== "active" || !V.previews.some((t) => t.separator === e) || de({
|
|
385
|
+
...V,
|
|
386
|
+
previews: V.previews.map((t) => t.separator === e ? { ...t } : t)
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
function Rn(e) {
|
|
390
|
+
if (V.state === "inactive") return !1;
|
|
391
|
+
const t = V.hitRegions.filter((o) => o.axis !== e);
|
|
392
|
+
const n = V.state === "active" && V.previews.some((o) => o.axis === e);
|
|
393
|
+
if (t.length === V.hitRegions.length && !n) return !1;
|
|
394
|
+
if (t.length === 0) de({
|
|
395
|
+
cursorFlags: 0,
|
|
396
|
+
state: "inactive"
|
|
397
|
+
});
|
|
398
|
+
else if (V.state === "active") {
|
|
399
|
+
const o = new Map(V.initialLayoutMap);
|
|
400
|
+
const r = new Map(V.previewLayoutMap);
|
|
401
|
+
o.delete(e), r.delete(e), de({
|
|
402
|
+
...V,
|
|
403
|
+
cursorFlags: 0,
|
|
404
|
+
hitRegions: t,
|
|
405
|
+
initialLayoutMap: o,
|
|
406
|
+
previewLayoutMap: r,
|
|
407
|
+
previews: V.previews.filter((i) => i.axis !== e)
|
|
408
|
+
});
|
|
409
|
+
} else de({
|
|
410
|
+
...V,
|
|
411
|
+
hitRegions: t
|
|
412
|
+
});
|
|
413
|
+
return !0;
|
|
414
|
+
}
|
|
415
|
+
var Mn = (e) => e;
|
|
416
|
+
var tt = () => {};
|
|
417
|
+
var Xt = 1;
|
|
418
|
+
var Jt = 2;
|
|
419
|
+
var Zt = 4;
|
|
420
|
+
var Qt = 8;
|
|
421
|
+
var yt = 3;
|
|
422
|
+
var St = 12;
|
|
423
|
+
var Ye;
|
|
424
|
+
function vt() {
|
|
425
|
+
return Ye === void 0 && (Ye = !1, typeof window < "u" && (window.navigator.userAgent.includes("Chrome") || window.navigator.userAgent.includes("Firefox")) && (Ye = !0)), Ye;
|
|
426
|
+
}
|
|
427
|
+
function En({ cursorFlags: e, axes: t, state: n }) {
|
|
428
|
+
let o = 0;
|
|
429
|
+
let r = 0;
|
|
430
|
+
switch (n) {
|
|
431
|
+
case "active":
|
|
432
|
+
case "hover": t.forEach((i) => {
|
|
433
|
+
if (!i.mutableState.disableCursor) switch (i.orientation) {
|
|
434
|
+
case "horizontal":
|
|
435
|
+
o++;
|
|
436
|
+
break;
|
|
437
|
+
case "vertical": r++;
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
if (!(o === 0 && r === 0)) {
|
|
442
|
+
switch (n) {
|
|
443
|
+
case "active": if (e && vt()) {
|
|
444
|
+
const i = (e & Xt) !== 0;
|
|
445
|
+
const s = (e & Jt) !== 0;
|
|
446
|
+
const l = (e & Zt) !== 0;
|
|
447
|
+
const a = (e & Qt) !== 0;
|
|
448
|
+
if (i) return l ? "se-resize" : a ? "ne-resize" : "e-resize";
|
|
449
|
+
if (s) return l ? "sw-resize" : a ? "nw-resize" : "w-resize";
|
|
450
|
+
if (l) return "s-resize";
|
|
451
|
+
if (a) return "n-resize";
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
return vt() ? o > 0 && r > 0 ? "move" : o > 0 ? "ew-resize" : "ns-resize" : o > 0 && r > 0 ? "grab" : o > 0 ? "col-resize" : "row-resize";
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
var bt = /* @__PURE__ */ new WeakMap();
|
|
458
|
+
function Ve(e) {
|
|
459
|
+
if (!e.defaultView || !e.adoptedStyleSheets) return;
|
|
460
|
+
let { prevStyle: t, styleSheet: n } = bt.get(e) ?? {};
|
|
461
|
+
n === void 0 && (n = new e.defaultView.CSSStyleSheet(), e.adoptedStyleSheets && (Object.isExtensible(e.adoptedStyleSheets) ? e.adoptedStyleSheets.push(n) : e.adoptedStyleSheets = [...e.adoptedStyleSheets, n]));
|
|
462
|
+
const o = se();
|
|
463
|
+
switch (o.state) {
|
|
464
|
+
case "active":
|
|
465
|
+
case "hover": {
|
|
466
|
+
const r = En({
|
|
467
|
+
cursorFlags: o.cursorFlags,
|
|
468
|
+
axes: o.hitRegions.map((s) => s.axis),
|
|
469
|
+
state: o.state
|
|
470
|
+
});
|
|
471
|
+
const i = `*, *:hover {cursor: ${r} !important; }`;
|
|
472
|
+
if (t === i) return;
|
|
473
|
+
t = i, r ? n.cssRules.length === 0 ? n.insertRule(i) : n.replaceSync(i) : n.cssRules.length === 1 && n.deleteRule(0);
|
|
474
|
+
break;
|
|
475
|
+
}
|
|
476
|
+
case "inactive": t = void 0, n.cssRules.length === 1 && n.deleteRule(0);
|
|
477
|
+
}
|
|
478
|
+
bt.set(e, {
|
|
479
|
+
prevStyle: t,
|
|
480
|
+
styleSheet: n
|
|
481
|
+
});
|
|
482
|
+
}
|
|
483
|
+
function ke({ axis: e }) {
|
|
484
|
+
const { layoutStrategy: t, orientation: n, items: o } = e;
|
|
485
|
+
return t ? t.calculateAvailableSize() : o.reduce((r, i) => (r += n === "horizontal" ? i.element.offsetWidth : i.element.offsetHeight, r), 0);
|
|
486
|
+
}
|
|
487
|
+
function ct(e, t) {
|
|
488
|
+
const n = e.compareDocumentPosition(t);
|
|
489
|
+
return n & Node.DOCUMENT_POSITION_DISCONNECTED ? 0 : n & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
490
|
+
}
|
|
491
|
+
function Ne(e, t) {
|
|
492
|
+
return Array.from(t).sort((n, o) => {
|
|
493
|
+
const r = e === "horizontal" ? Pn(n, o) : kn(n, o);
|
|
494
|
+
return r !== 0 ? r : ct(n.element, o.element);
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
function Pn(e, t) {
|
|
498
|
+
const n = e.element.offsetLeft - t.element.offsetLeft;
|
|
499
|
+
return n !== 0 ? n : e.element.offsetWidth - t.element.offsetWidth;
|
|
500
|
+
}
|
|
501
|
+
function kn(e, t) {
|
|
502
|
+
const n = e.element.offsetTop - t.element.offsetTop;
|
|
503
|
+
return n !== 0 ? n : e.element.offsetHeight - t.element.offsetHeight;
|
|
504
|
+
}
|
|
505
|
+
function rt(e) {
|
|
506
|
+
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.ELEMENT_NODE;
|
|
507
|
+
}
|
|
508
|
+
function en(e, t) {
|
|
509
|
+
return {
|
|
510
|
+
x: e.x >= t.left && e.x <= t.right ? 0 : Math.min(Math.abs(e.x - t.left), Math.abs(e.x - t.right)),
|
|
511
|
+
y: e.y >= t.top && e.y <= t.bottom ? 0 : Math.min(Math.abs(e.y - t.top), Math.abs(e.y - t.bottom))
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
function Tn({ orientation: e, rects: t, targetRect: n }) {
|
|
515
|
+
const o = {
|
|
516
|
+
x: n.x + n.width / 2,
|
|
517
|
+
y: n.y + n.height / 2
|
|
518
|
+
};
|
|
519
|
+
let r;
|
|
520
|
+
let i = Number.MAX_VALUE;
|
|
521
|
+
for (const s of t) {
|
|
522
|
+
const { x: l, y: a } = en(o, s), c = e === "horizontal" ? l : a;
|
|
523
|
+
c < i && (i = c, r = s);
|
|
524
|
+
}
|
|
525
|
+
return D(r, "No rect found"), r;
|
|
526
|
+
}
|
|
527
|
+
function ut({ expandHitTargets: e = !0, axis: t, includeDisabled: n = !1 }) {
|
|
528
|
+
if (t.layoutStrategy) return t.layoutStrategy.calculateHitRegions({
|
|
529
|
+
expandHitTargets: e,
|
|
530
|
+
axis: t,
|
|
531
|
+
includeDisabled: n
|
|
532
|
+
});
|
|
533
|
+
const { element: o, orientation: r, items: i, separators: s } = t, l = Ne(r, Array.from(o.children).filter(rt).filter((h) => !h.hasAttribute("data-resize-preview")).map((h) => ({ element: h }))).map(({ element: h }) => h), a = [];
|
|
534
|
+
let c = !1;
|
|
535
|
+
let u = !1;
|
|
536
|
+
let d = -1;
|
|
537
|
+
let p;
|
|
538
|
+
let y = -1;
|
|
539
|
+
let m = 0;
|
|
540
|
+
let f;
|
|
541
|
+
let S = [];
|
|
542
|
+
{
|
|
543
|
+
let h = -1;
|
|
544
|
+
for (const g of l) g.hasAttribute("data-panel") && (h++, g.hasAttribute("data-disabled") || (m++, d === -1 && (d = h), y = h));
|
|
545
|
+
}
|
|
546
|
+
if (n || m > 1) {
|
|
547
|
+
let h = -1;
|
|
548
|
+
for (const g of l) if (g.hasAttribute("data-panel")) {
|
|
549
|
+
h++;
|
|
550
|
+
const I = i.find((x) => x.element === g);
|
|
551
|
+
if (I) {
|
|
552
|
+
if (f) {
|
|
553
|
+
const x = f.element.getBoundingClientRect();
|
|
554
|
+
const C = g.getBoundingClientRect();
|
|
555
|
+
let A;
|
|
556
|
+
if (u) {
|
|
557
|
+
const N = r === "horizontal" ? new DOMRect(x.right, x.top, 0, x.height) : new DOMRect(x.left, x.bottom, x.width, 0);
|
|
558
|
+
const b = r === "horizontal" ? new DOMRect(C.left, C.top, 0, C.height) : new DOMRect(C.left, C.top, C.width, 0);
|
|
559
|
+
switch (S.length) {
|
|
560
|
+
case 0:
|
|
561
|
+
A = [N, b];
|
|
562
|
+
break;
|
|
563
|
+
case 1: {
|
|
564
|
+
const w = S[0];
|
|
565
|
+
A = [w, Tn({
|
|
566
|
+
orientation: r,
|
|
567
|
+
rects: [x, C],
|
|
568
|
+
targetRect: w.element.getBoundingClientRect()
|
|
569
|
+
}) === x ? b : N];
|
|
570
|
+
break;
|
|
571
|
+
}
|
|
572
|
+
default: A = S;
|
|
573
|
+
}
|
|
574
|
+
} else S.length ? A = S : A = [r === "horizontal" ? new DOMRect(x.right, C.top, C.left - x.right, C.height) : new DOMRect(C.left, x.bottom, C.width, C.top - x.bottom)];
|
|
575
|
+
for (const N of A) {
|
|
576
|
+
const b = ot({
|
|
577
|
+
expandHitTargets: e,
|
|
578
|
+
axis: t,
|
|
579
|
+
rect: "width" in N ? N : N.element.getBoundingClientRect()
|
|
580
|
+
});
|
|
581
|
+
(n || !c && !(h <= d || h > y)) && (p ??= ke({ axis: t }), a.push({
|
|
582
|
+
axis: t,
|
|
583
|
+
axisSize: p,
|
|
584
|
+
items: [f, I],
|
|
585
|
+
separator: "width" in N ? void 0 : N,
|
|
586
|
+
rect: b
|
|
587
|
+
})), c = !1;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
u = !1, f = I, S = [];
|
|
591
|
+
}
|
|
592
|
+
} else if (g.hasAttribute("data-separator")) {
|
|
593
|
+
g.ariaDisabled !== null && (c = !0);
|
|
594
|
+
const I = s.find((x) => x.element === g);
|
|
595
|
+
I ? S.push(I) : (f = void 0, S = []);
|
|
596
|
+
} else u = !0;
|
|
597
|
+
}
|
|
598
|
+
return a;
|
|
599
|
+
}
|
|
600
|
+
function $n(e, t) {
|
|
601
|
+
const n = getComputedStyle(e);
|
|
602
|
+
return t * parseFloat(n.fontSize);
|
|
603
|
+
}
|
|
604
|
+
function An(e, t) {
|
|
605
|
+
const n = getComputedStyle(e.ownerDocument.documentElement);
|
|
606
|
+
return t * parseFloat(n.fontSize);
|
|
607
|
+
}
|
|
608
|
+
function Dn(e) {
|
|
609
|
+
return e / 100 * window.innerHeight;
|
|
610
|
+
}
|
|
611
|
+
function On(e) {
|
|
612
|
+
return e / 100 * window.innerWidth;
|
|
613
|
+
}
|
|
614
|
+
function Ce({ axisSize: e, itemElement: t, styleProp: n }) {
|
|
615
|
+
let o;
|
|
616
|
+
const [r, i] = Wt(n);
|
|
617
|
+
switch (i) {
|
|
618
|
+
case "%":
|
|
619
|
+
o = r / 100 * e;
|
|
620
|
+
break;
|
|
621
|
+
case "px":
|
|
622
|
+
o = r;
|
|
623
|
+
break;
|
|
624
|
+
case "rem":
|
|
625
|
+
o = An(t, r);
|
|
626
|
+
break;
|
|
627
|
+
case "em":
|
|
628
|
+
o = $n(t, r);
|
|
629
|
+
break;
|
|
630
|
+
case "vh":
|
|
631
|
+
o = Dn(r);
|
|
632
|
+
break;
|
|
633
|
+
case "vw": o = On(r);
|
|
634
|
+
}
|
|
635
|
+
return o;
|
|
636
|
+
}
|
|
637
|
+
function X(e) {
|
|
638
|
+
return parseFloat(e.toFixed(3));
|
|
639
|
+
}
|
|
640
|
+
function it(e) {
|
|
641
|
+
const { items: t } = e, n = ke({ axis: e });
|
|
642
|
+
return n === 0 ? t.map((o) => ({
|
|
643
|
+
groupResizeBehavior: o.constraintProps.groupResizeBehavior,
|
|
644
|
+
collapsedSize: 0,
|
|
645
|
+
collapsible: o.constraintProps.collapsible === !0,
|
|
646
|
+
defaultSize: void 0,
|
|
647
|
+
disabled: o.constraintProps.disabled,
|
|
648
|
+
minSize: 0,
|
|
649
|
+
maxSize: 100,
|
|
650
|
+
itemId: o.id
|
|
651
|
+
})) : t.map((o) => {
|
|
652
|
+
const { element: r, constraintProps: i } = o;
|
|
653
|
+
let s = 0;
|
|
654
|
+
if (i.collapsedSize !== void 0) s = X(Ce({
|
|
655
|
+
axisSize: n,
|
|
656
|
+
itemElement: r,
|
|
657
|
+
styleProp: i.collapsedSize
|
|
658
|
+
}) / n * 100);
|
|
659
|
+
let l;
|
|
660
|
+
if (i.collapsedThreshold !== void 0) l = X(Ce({
|
|
661
|
+
axisSize: n,
|
|
662
|
+
itemElement: r,
|
|
663
|
+
styleProp: i.collapsedThreshold
|
|
664
|
+
}) / n * 100);
|
|
665
|
+
let a;
|
|
666
|
+
if (i.defaultSize !== void 0) a = X(Ce({
|
|
667
|
+
axisSize: n,
|
|
668
|
+
itemElement: r,
|
|
669
|
+
styleProp: i.defaultSize
|
|
670
|
+
}) / n * 100);
|
|
671
|
+
let c = 0;
|
|
672
|
+
if (i.minSize !== void 0) c = X(Ce({
|
|
673
|
+
axisSize: n,
|
|
674
|
+
itemElement: r,
|
|
675
|
+
styleProp: i.minSize
|
|
676
|
+
}) / n * 100);
|
|
677
|
+
let u = 100;
|
|
678
|
+
if (i.maxSize !== void 0) u = X(Ce({
|
|
679
|
+
axisSize: n,
|
|
680
|
+
itemElement: r,
|
|
681
|
+
styleProp: i.maxSize
|
|
682
|
+
}) / n * 100);
|
|
683
|
+
return {
|
|
684
|
+
groupResizeBehavior: i.groupResizeBehavior,
|
|
685
|
+
collapsedSize: s,
|
|
686
|
+
collapsedThreshold: l,
|
|
687
|
+
collapsible: i.collapsible === !0,
|
|
688
|
+
defaultSize: a,
|
|
689
|
+
disabled: i.disabled,
|
|
690
|
+
minSize: c,
|
|
691
|
+
maxSize: u,
|
|
692
|
+
itemId: o.id
|
|
693
|
+
};
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
var ue = /* @__PURE__ */ new Map();
|
|
697
|
+
var tn = new Yt();
|
|
698
|
+
function Nn(e) {
|
|
699
|
+
ue = new Map(ue), ue.delete(e);
|
|
700
|
+
}
|
|
701
|
+
function Me(e, t) {
|
|
702
|
+
for (const [n] of ue) if (n.id === e) return n;
|
|
703
|
+
}
|
|
704
|
+
function ae(e, t) {
|
|
705
|
+
for (const [n, o] of ue) if (n.id === e) return o;
|
|
706
|
+
if (t) throw Error(`Could not find data for Group with id ${e}`);
|
|
707
|
+
}
|
|
708
|
+
function he() {
|
|
709
|
+
return ue;
|
|
710
|
+
}
|
|
711
|
+
function _e(e, t) {
|
|
712
|
+
return tn.addListener("axisChange", (n) => {
|
|
713
|
+
n.axis.id === e && t(n);
|
|
714
|
+
});
|
|
715
|
+
}
|
|
716
|
+
function fe(e, t, n) {
|
|
717
|
+
const o = ue.get(e);
|
|
718
|
+
ue = new Map(ue), ue.set(e, t), tn.emit("axisChange", {
|
|
719
|
+
axis: e,
|
|
720
|
+
isUserInteraction: n?.isUserInteraction === !0,
|
|
721
|
+
prev: o,
|
|
722
|
+
next: t
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
function Gn(e, t) {
|
|
726
|
+
if (e.length !== t.length) return !1;
|
|
727
|
+
for (let n = 0; n < e.length; n++) if (e[n] != t[n]) return !1;
|
|
728
|
+
return !0;
|
|
729
|
+
}
|
|
730
|
+
function Y(e, t, n = 0) {
|
|
731
|
+
return Math.abs(X(e) - X(t)) <= n;
|
|
732
|
+
}
|
|
733
|
+
function ce(e, t) {
|
|
734
|
+
return Y(e, t) ? 0 : e > t ? 1 : -1;
|
|
735
|
+
}
|
|
736
|
+
function Ee({ overrideDisabledItems: e, itemConstraints: t, prevSize: n, size: o }) {
|
|
737
|
+
const { collapsedSize: r = 0, collapsedThreshold: i, collapsible: s, disabled: l, maxSize: a = 100, minSize: c = 0 } = t;
|
|
738
|
+
if (l && !e) return n;
|
|
739
|
+
if (ce(o, c) < 0) if (s) {
|
|
740
|
+
const u = i ?? (c - r) / 2;
|
|
741
|
+
const d = ce(n, r) <= 0;
|
|
742
|
+
const p = d ? r + u : c - u;
|
|
743
|
+
const y = ce(o, p);
|
|
744
|
+
ce(o, r) <= 0 || y < 0 || i !== void 0 && d && y === 0 ? o = r : o = c;
|
|
745
|
+
} else o = c;
|
|
746
|
+
return o = Math.min(a, o), o = X(o), o;
|
|
747
|
+
}
|
|
748
|
+
function Fe({ delta: e, initialLayout: t, itemConstraints: n, pivotIndices: o, prevLayout: r, trigger: i }) {
|
|
749
|
+
if (Y(e, 0)) return t;
|
|
750
|
+
const s = i === "imperative-api", l = n.map(({ itemId: m }) => t[m]), a = n.map(({ itemId: m }) => r[m]), c = [...l], [u, d] = o;
|
|
751
|
+
D(u != null, "Invalid first pivot index"), D(d != null, "Invalid second pivot index");
|
|
752
|
+
let p = 0;
|
|
753
|
+
switch (i) {
|
|
754
|
+
case "keyboard":
|
|
755
|
+
{
|
|
756
|
+
const m = e < 0 ? d : u;
|
|
757
|
+
const f = n[m];
|
|
758
|
+
D(f, `Panel constraints not found for index ${m}`);
|
|
759
|
+
const { collapsedSize: S = 0, collapsible: h, minSize: g = 0 } = f;
|
|
760
|
+
if (h) {
|
|
761
|
+
const I = l[m];
|
|
762
|
+
if (D(I != null, `Previous layout not found for panel index ${m}`), Y(I, S)) {
|
|
763
|
+
const x = g - I;
|
|
764
|
+
ce(x, Math.abs(e)) > 0 && (e = e < 0 ? 0 - x : x);
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
{
|
|
769
|
+
const m = e < 0 ? u : d;
|
|
770
|
+
const f = n[m];
|
|
771
|
+
D(f, `No panel constraints found for index ${m}`);
|
|
772
|
+
const { collapsedSize: S = 0, collapsible: h, minSize: g = 0 } = f;
|
|
773
|
+
if (h) {
|
|
774
|
+
const I = l[m];
|
|
775
|
+
if (D(I != null, `Previous layout not found for panel index ${m}`), Y(I, g)) {
|
|
776
|
+
const x = I - S;
|
|
777
|
+
ce(x, Math.abs(e)) > 0 && (e = e < 0 ? 0 - x : x);
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
break;
|
|
782
|
+
default: {
|
|
783
|
+
const m = e < 0 ? d : u;
|
|
784
|
+
const f = n[m];
|
|
785
|
+
D(f, `Panel constraints not found for index ${m}`);
|
|
786
|
+
const S = l[m], { collapsedSize: h, collapsedThreshold: g, collapsible: I, minSize: x } = f;
|
|
787
|
+
if (I && ce(S, x) < 0) {
|
|
788
|
+
const C = x - h;
|
|
789
|
+
const A = g ?? C / 2;
|
|
790
|
+
if (ce(S + Math.abs(e), x) < 0) {
|
|
791
|
+
const b = ce(Math.abs(e), A);
|
|
792
|
+
b > 0 || b === 0 && g === void 0 && e < 0 ? e = e < 0 ? -C : C : e = 0;
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
break;
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
{
|
|
799
|
+
const m = e < 0 ? 1 : -1;
|
|
800
|
+
let f = e < 0 ? d : u;
|
|
801
|
+
let S = 0;
|
|
802
|
+
for (;;) {
|
|
803
|
+
const g = l[f];
|
|
804
|
+
D(g != null, `Previous layout not found for panel index ${f}`);
|
|
805
|
+
const x = Ee({
|
|
806
|
+
overrideDisabledItems: s,
|
|
807
|
+
itemConstraints: n[f],
|
|
808
|
+
prevSize: g,
|
|
809
|
+
size: 100
|
|
810
|
+
}) - g;
|
|
811
|
+
if (S += x, f += m, f < 0 || f >= n.length) break;
|
|
812
|
+
}
|
|
813
|
+
const h = Math.min(Math.abs(e), Math.abs(S));
|
|
814
|
+
e = e < 0 ? 0 - h : h;
|
|
815
|
+
}
|
|
816
|
+
{
|
|
817
|
+
let f = e < 0 ? u : d;
|
|
818
|
+
for (; f >= 0 && f < n.length;) {
|
|
819
|
+
const S = Math.abs(e) - Math.abs(p);
|
|
820
|
+
const h = l[f];
|
|
821
|
+
D(h != null, `Previous layout not found for panel index ${f}`);
|
|
822
|
+
const g = h - S;
|
|
823
|
+
const I = Ee({
|
|
824
|
+
overrideDisabledItems: s,
|
|
825
|
+
itemConstraints: n[f],
|
|
826
|
+
prevSize: h,
|
|
827
|
+
size: g
|
|
828
|
+
});
|
|
829
|
+
if (!Y(h, I) && (p += h - I, c[f] = I, p.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, { numeric: !0 }) >= 0)) break;
|
|
830
|
+
e < 0 ? f-- : f++;
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
if (Gn(a, c)) return r;
|
|
834
|
+
{
|
|
835
|
+
const m = e < 0 ? d : u;
|
|
836
|
+
const f = l[m];
|
|
837
|
+
D(f != null, `Previous layout not found for panel index ${m}`);
|
|
838
|
+
const S = f + p;
|
|
839
|
+
const h = Ee({
|
|
840
|
+
overrideDisabledItems: s,
|
|
841
|
+
itemConstraints: n[m],
|
|
842
|
+
prevSize: f,
|
|
843
|
+
size: S
|
|
844
|
+
});
|
|
845
|
+
if (c[m] = h, !Y(h, S)) {
|
|
846
|
+
let g = S - h;
|
|
847
|
+
let x = e < 0 ? d : u;
|
|
848
|
+
for (; x >= 0 && x < n.length;) {
|
|
849
|
+
const C = c[x];
|
|
850
|
+
D(C != null, `Previous layout not found for panel index ${x}`);
|
|
851
|
+
const A = C + g;
|
|
852
|
+
const N = Ee({
|
|
853
|
+
overrideDisabledItems: s,
|
|
854
|
+
itemConstraints: n[x],
|
|
855
|
+
prevSize: C,
|
|
856
|
+
size: A
|
|
857
|
+
});
|
|
858
|
+
if (Y(C, N) || (g -= N - C, c[x] = N), Y(g, 0)) break;
|
|
859
|
+
e > 0 ? x-- : x++;
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
return Y(Object.values(c).reduce((m, f) => f + m, 0), 100, .1) ? c.reduce((m, f, S) => (m[n[S].itemId] = f, m), {}) : r;
|
|
864
|
+
}
|
|
865
|
+
function ie(e, t) {
|
|
866
|
+
if (Object.keys(e).length !== Object.keys(t).length) return !1;
|
|
867
|
+
for (const n in e) if (t[n] === void 0 || ce(e[n], t[n]) !== 0) return !1;
|
|
868
|
+
return !0;
|
|
869
|
+
}
|
|
870
|
+
function dt({ commit: e, document: t, event: n, hitRegions: o, initialLayoutMap: r, mountedAxes: i, pointerDownAtPoint: s, prevCursorFlags: l }) {
|
|
871
|
+
let a = 0;
|
|
872
|
+
const c = se();
|
|
873
|
+
let u = c.state === "active" ? c.previews : [];
|
|
874
|
+
const d = new Map(c.state === "active" ? c.previewLayoutMap : void 0);
|
|
875
|
+
o.forEach((m) => {
|
|
876
|
+
const { axis: f, axisSize: S } = m, { orientation: h, items: g } = f;
|
|
877
|
+
if (e && f.resizePreviewMode !== "separator") return;
|
|
878
|
+
const { disableCursor: I } = f.mutableState;
|
|
879
|
+
let x = 0;
|
|
880
|
+
s ? h === "horizontal" ? x = (n.clientX - s.x) / S * 100 : x = (n.clientY - s.y) / S * 100 : h === "horizontal" ? x = n.clientX < 0 ? -100 : 100 : x = n.clientY < 0 ? -100 : 100;
|
|
881
|
+
const C = r.get(f);
|
|
882
|
+
const A = i.get(f);
|
|
883
|
+
if (!C || !A) return;
|
|
884
|
+
const { defaultLayoutDeferred: N, derivedItemConstraints: b, axisSize: w, layout: v, separatorToItems: T } = A;
|
|
885
|
+
if (b && v && T) {
|
|
886
|
+
const O = f.resizePreviewMode === "separator" ? d.get(f) ?? v : v;
|
|
887
|
+
const R = Fe({
|
|
888
|
+
delta: x,
|
|
889
|
+
initialLayout: C,
|
|
890
|
+
itemConstraints: b,
|
|
891
|
+
pivotIndices: m.items.map((E) => g.indexOf(E)),
|
|
892
|
+
prevLayout: O,
|
|
893
|
+
trigger: "mouse-or-touch"
|
|
894
|
+
});
|
|
895
|
+
if (f.resizePreviewMode === "separator" && !e && !ie(R, O)) {
|
|
896
|
+
d.set(f, R);
|
|
897
|
+
let E = 0;
|
|
898
|
+
const P = g.map((z) => (E += R[z.id] - C[z.id], E * (S / 100)));
|
|
899
|
+
u = u.map((z) => {
|
|
900
|
+
if (z.axis !== f) return z;
|
|
901
|
+
const M = P[z.itemIndex];
|
|
902
|
+
return M === z.offset ? z : {
|
|
903
|
+
...z,
|
|
904
|
+
offset: M
|
|
905
|
+
};
|
|
906
|
+
});
|
|
907
|
+
}
|
|
908
|
+
if (ie(R, O) && x !== 0 && !I) switch (h) {
|
|
909
|
+
case "horizontal":
|
|
910
|
+
a |= x < 0 ? Xt : Jt;
|
|
911
|
+
break;
|
|
912
|
+
case "vertical": a |= x < 0 ? Zt : Qt;
|
|
913
|
+
}
|
|
914
|
+
(f.resizePreviewMode !== "separator" || e) && !ie(R, v) && fe(m.axis, {
|
|
915
|
+
defaultLayoutDeferred: N,
|
|
916
|
+
derivedItemConstraints: b,
|
|
917
|
+
axisSize: w,
|
|
918
|
+
layout: R,
|
|
919
|
+
requestedAxisSize: w,
|
|
920
|
+
requestedLayout: R,
|
|
921
|
+
separatorToItems: T
|
|
922
|
+
});
|
|
923
|
+
}
|
|
924
|
+
});
|
|
925
|
+
let p = 0;
|
|
926
|
+
n.movementX === 0 ? p |= l & yt : p |= a & yt, n.movementY === 0 ? p |= l & St : p |= a & St;
|
|
927
|
+
const y = c.state === "active" && (n.clientX !== c.pointerDownAtPoint.x || n.clientY !== c.pointerDownAtPoint.y);
|
|
928
|
+
Ln(p, u, d, y), Ve(t);
|
|
929
|
+
}
|
|
930
|
+
function nn(e, t) {
|
|
931
|
+
const n = se();
|
|
932
|
+
const o = he();
|
|
933
|
+
let r = !1;
|
|
934
|
+
switch (n.state) {
|
|
935
|
+
case "active": dt({
|
|
936
|
+
commit: !0,
|
|
937
|
+
document: e,
|
|
938
|
+
event: t,
|
|
939
|
+
hitRegions: n.hitRegions,
|
|
940
|
+
initialLayoutMap: n.initialLayoutMap,
|
|
941
|
+
mountedAxes: o,
|
|
942
|
+
pointerDownAtPoint: n.pointerDownAtPoint,
|
|
943
|
+
prevCursorFlags: n.cursorFlags
|
|
944
|
+
}), de({
|
|
945
|
+
cursorFlags: 0,
|
|
946
|
+
state: "inactive"
|
|
947
|
+
}), n.hitRegions.length > 0 && (Ve(e), r = !0, n.hitRegions.forEach((i) => {
|
|
948
|
+
if (!o.has(i.axis)) return;
|
|
949
|
+
const s = ae(i.axis.id, !0);
|
|
950
|
+
fe(i.axis, s, { isUserInteraction: !0 });
|
|
951
|
+
}));
|
|
952
|
+
}
|
|
953
|
+
return r;
|
|
954
|
+
}
|
|
955
|
+
function xt(e) {
|
|
956
|
+
e.defaultPrevented || nn(e.currentTarget, e);
|
|
957
|
+
}
|
|
958
|
+
function _n(e, t, n) {
|
|
959
|
+
let o;
|
|
960
|
+
let r = {
|
|
961
|
+
x: 1 / 0,
|
|
962
|
+
y: 1 / 0
|
|
963
|
+
};
|
|
964
|
+
for (const i of t) {
|
|
965
|
+
const s = en(n, i.rect);
|
|
966
|
+
switch (e) {
|
|
967
|
+
case "horizontal":
|
|
968
|
+
(s.x < r.x || s.x === r.x && s.y <= r.y) && (o = i, r = s);
|
|
969
|
+
break;
|
|
970
|
+
case "vertical": (s.y < r.y || s.y === r.y && s.x <= r.x) && (o = i, r = s);
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
return o ? {
|
|
974
|
+
distance: r,
|
|
975
|
+
hitRegion: o
|
|
976
|
+
} : void 0;
|
|
977
|
+
}
|
|
978
|
+
function Fn(e) {
|
|
979
|
+
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
|
|
980
|
+
}
|
|
981
|
+
function Bn(e, t) {
|
|
982
|
+
if (e === t) throw new Error("Cannot compare node with itself");
|
|
983
|
+
const n = {
|
|
984
|
+
a: It(e),
|
|
985
|
+
b: It(t)
|
|
986
|
+
};
|
|
987
|
+
let o;
|
|
988
|
+
for (; n.a.at(-1) === n.b.at(-1);) o = n.a.pop(), n.b.pop();
|
|
989
|
+
D(o, "Stacking order can only be calculated for elements with a common ancestor");
|
|
990
|
+
const r = {
|
|
991
|
+
a: zt(wt(n.a)),
|
|
992
|
+
b: zt(wt(n.b))
|
|
993
|
+
};
|
|
994
|
+
if (r.a === r.b) {
|
|
995
|
+
const i = o.childNodes;
|
|
996
|
+
const s = {
|
|
997
|
+
a: n.a.at(-1),
|
|
998
|
+
b: n.b.at(-1)
|
|
999
|
+
};
|
|
1000
|
+
let l = i.length;
|
|
1001
|
+
for (; l--;) {
|
|
1002
|
+
const a = i[l];
|
|
1003
|
+
if (a === s.a) return 1;
|
|
1004
|
+
if (a === s.b) return -1;
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
return Math.sign(r.a - r.b);
|
|
1008
|
+
}
|
|
1009
|
+
var qn = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
|
|
1010
|
+
function Vn(e) {
|
|
1011
|
+
const t = getComputedStyle(on(e) ?? e).display;
|
|
1012
|
+
return t === "flex" || t === "inline-flex";
|
|
1013
|
+
}
|
|
1014
|
+
function Hn(e) {
|
|
1015
|
+
const t = getComputedStyle(e);
|
|
1016
|
+
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || Vn(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" || qn.test(t.willChange) || t.webkitOverflowScrolling === "touch");
|
|
1017
|
+
}
|
|
1018
|
+
function wt(e) {
|
|
1019
|
+
let t = e.length;
|
|
1020
|
+
for (; t--;) {
|
|
1021
|
+
const n = e[t];
|
|
1022
|
+
if (D(n, "Missing node"), Hn(n)) return n;
|
|
1023
|
+
}
|
|
1024
|
+
return null;
|
|
1025
|
+
}
|
|
1026
|
+
function zt(e) {
|
|
1027
|
+
return e && Number(getComputedStyle(e).zIndex) || 0;
|
|
1028
|
+
}
|
|
1029
|
+
function It(e) {
|
|
1030
|
+
const t = [];
|
|
1031
|
+
for (; e;) t.push(e), e = on(e);
|
|
1032
|
+
return t;
|
|
1033
|
+
}
|
|
1034
|
+
function on(e) {
|
|
1035
|
+
const { parentNode: t } = e;
|
|
1036
|
+
return Fn(t) ? t.host : t;
|
|
1037
|
+
}
|
|
1038
|
+
function jn(e, t) {
|
|
1039
|
+
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;
|
|
1040
|
+
}
|
|
1041
|
+
function Un(e) {
|
|
1042
|
+
try {
|
|
1043
|
+
return e.matches(":modal");
|
|
1044
|
+
} catch {
|
|
1045
|
+
return !1;
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
function Wn({ axisElement: e, hitRegion: t, pointerEventTarget: n }) {
|
|
1049
|
+
if (rt(n)) {
|
|
1050
|
+
const o = n.closest("dialog");
|
|
1051
|
+
if (o && !o.contains(e) && Un(o)) return !1;
|
|
1052
|
+
}
|
|
1053
|
+
if (!rt(n) || n.contains(e) || e.contains(n)) return !0;
|
|
1054
|
+
if (Bn(n, e) > 0) {
|
|
1055
|
+
let o = n;
|
|
1056
|
+
for (; o;) {
|
|
1057
|
+
if (o.contains(e)) return !0;
|
|
1058
|
+
if (jn(o.getBoundingClientRect(), t)) return !1;
|
|
1059
|
+
o = o.parentElement;
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
return !0;
|
|
1063
|
+
}
|
|
1064
|
+
function ft(e, t) {
|
|
1065
|
+
const n = [];
|
|
1066
|
+
return t.forEach((o, r) => {
|
|
1067
|
+
if (r.disabled) return;
|
|
1068
|
+
const i = ut({ axis: r });
|
|
1069
|
+
const s = _n(r.orientation, i, {
|
|
1070
|
+
x: e.clientX,
|
|
1071
|
+
y: e.clientY
|
|
1072
|
+
});
|
|
1073
|
+
s && s.distance.x <= 0 && s.distance.y <= 0 && Wn({
|
|
1074
|
+
axisElement: r.element,
|
|
1075
|
+
hitRegion: s.hitRegion.rect,
|
|
1076
|
+
pointerEventTarget: e.target
|
|
1077
|
+
}) && n.push(s.hitRegion);
|
|
1078
|
+
}), n;
|
|
1079
|
+
}
|
|
1080
|
+
function ye({ layout: e, itemConstraints: t }) {
|
|
1081
|
+
const n = t.map(({ itemId: s }) => e[s]);
|
|
1082
|
+
const o = [...n];
|
|
1083
|
+
const r = o.reduce((s, l) => s + l, 0);
|
|
1084
|
+
if (Object.keys(e).length !== t.length) throw Error(`Invalid ${t.length} panel layout: ${Object.values(e).map((s) => `${s}%`).join(", ")}`);
|
|
1085
|
+
if (!Y(r, 100) && o.length > 0) for (let s = 0; s < t.length; s++) {
|
|
1086
|
+
const l = o[s];
|
|
1087
|
+
D(l != null, `No layout data found for index ${s}`);
|
|
1088
|
+
const a = 100 / r * l;
|
|
1089
|
+
o[s] = a;
|
|
1090
|
+
}
|
|
1091
|
+
let i = 0;
|
|
1092
|
+
for (let s = 0; s < t.length; s++) {
|
|
1093
|
+
const l = n[s];
|
|
1094
|
+
D(l != null, `No layout data found for index ${s}`);
|
|
1095
|
+
const a = o[s];
|
|
1096
|
+
D(a != null, `No layout data found for index ${s}`);
|
|
1097
|
+
const c = Ee({
|
|
1098
|
+
overrideDisabledItems: !0,
|
|
1099
|
+
itemConstraints: t[s],
|
|
1100
|
+
prevSize: l,
|
|
1101
|
+
size: a
|
|
1102
|
+
});
|
|
1103
|
+
a != c && (i += a - c, o[s] = c);
|
|
1104
|
+
}
|
|
1105
|
+
if (!Y(i, 0)) for (let s = 0; s < t.length; s++) {
|
|
1106
|
+
const l = o[s];
|
|
1107
|
+
D(l != null, `No layout data found for index ${s}`);
|
|
1108
|
+
const a = l + i;
|
|
1109
|
+
const c = Ee({
|
|
1110
|
+
overrideDisabledItems: !0,
|
|
1111
|
+
itemConstraints: t[s],
|
|
1112
|
+
prevSize: l,
|
|
1113
|
+
size: a
|
|
1114
|
+
});
|
|
1115
|
+
if (l !== c && (i -= c - l, o[s] = c, Y(i, 0))) break;
|
|
1116
|
+
}
|
|
1117
|
+
return o.reduce((s, l, a) => (s[t[a].itemId] = l, s), {});
|
|
1118
|
+
}
|
|
1119
|
+
function mt({ axisId: e, itemId: t }) {
|
|
1120
|
+
const n = () => {
|
|
1121
|
+
const a = he();
|
|
1122
|
+
for (const [c, { defaultLayoutDeferred: u, derivedItemConstraints: d, layout: p, axisSize: y, separatorToItems: m }] of a) if (c.id === e) return {
|
|
1123
|
+
defaultLayoutDeferred: u,
|
|
1124
|
+
derivedItemConstraints: d,
|
|
1125
|
+
axis: c,
|
|
1126
|
+
axisSize: y,
|
|
1127
|
+
layout: p,
|
|
1128
|
+
separatorToItems: m
|
|
1129
|
+
};
|
|
1130
|
+
throw Error(`Group ${e} not found`);
|
|
1131
|
+
};
|
|
1132
|
+
const o = () => {
|
|
1133
|
+
const a = n().derivedItemConstraints.find((c) => c.itemId === t);
|
|
1134
|
+
if (a !== void 0) return a;
|
|
1135
|
+
throw Error(`Panel constraints not found for Panel ${t}`);
|
|
1136
|
+
};
|
|
1137
|
+
const r = () => {
|
|
1138
|
+
const a = n().axis.items.find((c) => c.id === t);
|
|
1139
|
+
if (a !== void 0) return a;
|
|
1140
|
+
throw Error(`Layout not found for Panel ${t}`);
|
|
1141
|
+
};
|
|
1142
|
+
const i = () => {
|
|
1143
|
+
const a = n().layout[t];
|
|
1144
|
+
if (a !== void 0) return a;
|
|
1145
|
+
throw Error(`Layout not found for Panel ${t}`);
|
|
1146
|
+
};
|
|
1147
|
+
const s = ({ nextSize: a, items: c, prevLayout: u, derivedItemConstraints: d }) => {
|
|
1148
|
+
const p = i();
|
|
1149
|
+
const y = c.findIndex((h) => h.id === t);
|
|
1150
|
+
const m = y === 0;
|
|
1151
|
+
const f = y === c.length - 1;
|
|
1152
|
+
if (f && a < p && (m || c.slice(0, y).every((h, g) => {
|
|
1153
|
+
const I = d[g];
|
|
1154
|
+
return I?.collapsible && Y(I.collapsedSize, u[I.itemId]);
|
|
1155
|
+
}))) {
|
|
1156
|
+
const h = c.slice(0, y).reduce((g, I) => g + u[I.id], 0);
|
|
1157
|
+
return {
|
|
1158
|
+
...u,
|
|
1159
|
+
[t]: X(100 - h)
|
|
1160
|
+
};
|
|
1161
|
+
}
|
|
1162
|
+
return Fe({
|
|
1163
|
+
delta: f ? p - a : a - p,
|
|
1164
|
+
initialLayout: u,
|
|
1165
|
+
itemConstraints: d,
|
|
1166
|
+
pivotIndices: f ? [y - 1, y] : [y, y + 1],
|
|
1167
|
+
prevLayout: u,
|
|
1168
|
+
trigger: "imperative-api"
|
|
1169
|
+
});
|
|
1170
|
+
};
|
|
1171
|
+
const l = (a) => {
|
|
1172
|
+
if (a === i()) return;
|
|
1173
|
+
const { defaultLayoutDeferred: u, derivedItemConstraints: d, axis: p, axisSize: y, layout: m, separatorToItems: f } = n(), h = ye({
|
|
1174
|
+
layout: s({
|
|
1175
|
+
nextSize: a,
|
|
1176
|
+
items: p.items,
|
|
1177
|
+
prevLayout: m,
|
|
1178
|
+
derivedItemConstraints: d
|
|
1179
|
+
}),
|
|
1180
|
+
itemConstraints: d
|
|
1181
|
+
});
|
|
1182
|
+
ie(m, h) || fe(p, {
|
|
1183
|
+
defaultLayoutDeferred: u,
|
|
1184
|
+
derivedItemConstraints: d,
|
|
1185
|
+
axisSize: y,
|
|
1186
|
+
layout: h,
|
|
1187
|
+
requestedAxisSize: y,
|
|
1188
|
+
requestedLayout: h,
|
|
1189
|
+
separatorToItems: f
|
|
1190
|
+
});
|
|
1191
|
+
};
|
|
1192
|
+
return {
|
|
1193
|
+
collapse: () => {
|
|
1194
|
+
const { collapsible: a, collapsedSize: c } = o(), { mutableValues: u } = r(), d = i();
|
|
1195
|
+
a && d !== c && (u.expandToSize = d, l(c));
|
|
1196
|
+
},
|
|
1197
|
+
expand: () => {
|
|
1198
|
+
const { collapsible: a, collapsedSize: c, minSize: u } = o(), { mutableValues: d } = r(), p = i();
|
|
1199
|
+
if (a && p === c) {
|
|
1200
|
+
let y = d.expandToSize ?? u;
|
|
1201
|
+
y === 0 && (y = 1), l(y);
|
|
1202
|
+
}
|
|
1203
|
+
},
|
|
1204
|
+
getSize: () => {
|
|
1205
|
+
const { axis: a } = n(), c = i(), { element: u } = r();
|
|
1206
|
+
return {
|
|
1207
|
+
asPercentage: c,
|
|
1208
|
+
inPixels: a.layoutStrategy ? a.layoutStrategy.getItemSizeInPixels(t) : a.orientation === "horizontal" ? u.offsetWidth : u.offsetHeight
|
|
1209
|
+
};
|
|
1210
|
+
},
|
|
1211
|
+
isCollapsed: () => {
|
|
1212
|
+
const { collapsible: a, collapsedSize: c } = o(), u = i();
|
|
1213
|
+
return a && Y(c, u);
|
|
1214
|
+
},
|
|
1215
|
+
resize: (a) => {
|
|
1216
|
+
const { axis: c } = n(), { element: u } = r(), d = ke({ axis: c }), y = X(Ce({
|
|
1217
|
+
axisSize: d,
|
|
1218
|
+
itemElement: u,
|
|
1219
|
+
styleProp: a
|
|
1220
|
+
}) / d * 100);
|
|
1221
|
+
l(y);
|
|
1222
|
+
}
|
|
1223
|
+
};
|
|
1224
|
+
}
|
|
1225
|
+
function Lt(e) {
|
|
1226
|
+
if (e.defaultPrevented) return;
|
|
1227
|
+
ft(e, he()).forEach((o) => {
|
|
1228
|
+
if (o.separator && !o.separator.disableDoubleClick) {
|
|
1229
|
+
const r = o.items.find((i) => i.constraintProps.defaultSize !== void 0);
|
|
1230
|
+
if (r) {
|
|
1231
|
+
const i = r.constraintProps.defaultSize;
|
|
1232
|
+
const s = mt({
|
|
1233
|
+
axisId: o.axis.id,
|
|
1234
|
+
itemId: r.id
|
|
1235
|
+
});
|
|
1236
|
+
s && i !== void 0 && (s.resize(i), e.preventDefault());
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
});
|
|
1240
|
+
}
|
|
1241
|
+
function rn(e) {
|
|
1242
|
+
const t = he();
|
|
1243
|
+
for (const [n] of t) if (n.separators.some((o) => o.element === e)) return n;
|
|
1244
|
+
throw Error("Could not find parent Group for separator element");
|
|
1245
|
+
}
|
|
1246
|
+
function Ge({ axisId: e }) {
|
|
1247
|
+
const t = () => {
|
|
1248
|
+
const n = he();
|
|
1249
|
+
for (const [o, r] of n) if (o.id === e) return {
|
|
1250
|
+
axis: o,
|
|
1251
|
+
...r
|
|
1252
|
+
};
|
|
1253
|
+
throw Error(`Could not find Group with id "${e}"`);
|
|
1254
|
+
};
|
|
1255
|
+
return {
|
|
1256
|
+
getLayout() {
|
|
1257
|
+
const { defaultLayoutDeferred: n, layout: o } = t();
|
|
1258
|
+
return n ? {} : o;
|
|
1259
|
+
},
|
|
1260
|
+
setLayout(n) {
|
|
1261
|
+
const { defaultLayoutDeferred: o, derivedItemConstraints: r, axis: i, axisSize: s, layout: l, separatorToItems: a } = t(), c = ye({
|
|
1262
|
+
layout: n,
|
|
1263
|
+
itemConstraints: r
|
|
1264
|
+
});
|
|
1265
|
+
return o ? l : (ie(l, c) || fe(i, {
|
|
1266
|
+
defaultLayoutDeferred: o,
|
|
1267
|
+
derivedItemConstraints: r,
|
|
1268
|
+
axisSize: s,
|
|
1269
|
+
layout: c,
|
|
1270
|
+
requestedAxisSize: s,
|
|
1271
|
+
requestedLayout: c,
|
|
1272
|
+
separatorToItems: a
|
|
1273
|
+
}), c);
|
|
1274
|
+
}
|
|
1275
|
+
};
|
|
1276
|
+
}
|
|
1277
|
+
function we(e, t) {
|
|
1278
|
+
const n = rn(e);
|
|
1279
|
+
const o = ae(n.id, !0);
|
|
1280
|
+
const r = n.separators.find((d) => d.element === e);
|
|
1281
|
+
D(r, "Matching separator not found");
|
|
1282
|
+
const i = o.separatorToItems.get(r);
|
|
1283
|
+
D(i, "Matching panels not found");
|
|
1284
|
+
const s = i.map((d) => n.items.indexOf(d));
|
|
1285
|
+
const a = Ge({ axisId: n.id }).getLayout();
|
|
1286
|
+
const u = ye({
|
|
1287
|
+
layout: Fe({
|
|
1288
|
+
delta: t,
|
|
1289
|
+
initialLayout: a,
|
|
1290
|
+
itemConstraints: o.derivedItemConstraints,
|
|
1291
|
+
pivotIndices: s,
|
|
1292
|
+
prevLayout: a,
|
|
1293
|
+
trigger: "keyboard"
|
|
1294
|
+
}),
|
|
1295
|
+
itemConstraints: o.derivedItemConstraints
|
|
1296
|
+
});
|
|
1297
|
+
ie(a, u) || fe(n, {
|
|
1298
|
+
defaultLayoutDeferred: o.defaultLayoutDeferred,
|
|
1299
|
+
derivedItemConstraints: o.derivedItemConstraints,
|
|
1300
|
+
axisSize: o.axisSize,
|
|
1301
|
+
layout: u,
|
|
1302
|
+
requestedAxisSize: o.axisSize,
|
|
1303
|
+
requestedLayout: u,
|
|
1304
|
+
separatorToItems: o.separatorToItems
|
|
1305
|
+
}, { isUserInteraction: !0 });
|
|
1306
|
+
}
|
|
1307
|
+
function Ct(e) {
|
|
1308
|
+
if (e.defaultPrevented) return;
|
|
1309
|
+
const t = e.currentTarget;
|
|
1310
|
+
const n = rn(t);
|
|
1311
|
+
if (!(n.disabled || n.separators.find((r) => r.element === t)?.disabled)) switch (e.key) {
|
|
1312
|
+
case "ArrowDown":
|
|
1313
|
+
e.preventDefault(), n.orientation === "vertical" && we(t, 5);
|
|
1314
|
+
break;
|
|
1315
|
+
case "ArrowLeft":
|
|
1316
|
+
e.preventDefault(), n.orientation === "horizontal" && we(t, -5);
|
|
1317
|
+
break;
|
|
1318
|
+
case "ArrowRight":
|
|
1319
|
+
e.preventDefault(), n.orientation === "horizontal" && we(t, 5);
|
|
1320
|
+
break;
|
|
1321
|
+
case "ArrowUp":
|
|
1322
|
+
e.preventDefault(), n.orientation === "vertical" && we(t, -5);
|
|
1323
|
+
break;
|
|
1324
|
+
case "End":
|
|
1325
|
+
e.preventDefault(), we(t, 100);
|
|
1326
|
+
break;
|
|
1327
|
+
case "Enter": {
|
|
1328
|
+
e.preventDefault();
|
|
1329
|
+
const { derivedItemConstraints: i, layout: s, separatorToItems: l } = ae(n.id, !0), a = n.separators.find((p) => p.element === t);
|
|
1330
|
+
D(a, "Matching separator not found");
|
|
1331
|
+
const c = l.get(a);
|
|
1332
|
+
D(c, "Matching panels not found");
|
|
1333
|
+
const u = c[0];
|
|
1334
|
+
const d = i.find((p) => p.itemId === u.id);
|
|
1335
|
+
if (D(d, "Panel metadata not found"), d.collapsible) {
|
|
1336
|
+
const p = s[u.id];
|
|
1337
|
+
we(t, (d.collapsedSize === p ? n.mutableState.expandedItemSizes[u.id] ?? d.minSize : d.collapsedSize) - p);
|
|
1338
|
+
}
|
|
1339
|
+
break;
|
|
1340
|
+
}
|
|
1341
|
+
case "F6": {
|
|
1342
|
+
e.preventDefault();
|
|
1343
|
+
const r = n.separators.map((a) => a.element);
|
|
1344
|
+
const i = Array.from(r).findIndex((a) => a === e.currentTarget);
|
|
1345
|
+
D(i !== null, "Index not found");
|
|
1346
|
+
r[e.shiftKey ? i > 0 ? i - 1 : r.length - 1 : i + 1 < r.length ? i + 1 : 0].focus({ preventScroll: !0 });
|
|
1347
|
+
break;
|
|
1348
|
+
}
|
|
1349
|
+
case "Home": e.preventDefault(), we(t, -100);
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
function Je(e) {
|
|
1353
|
+
const t = se();
|
|
1354
|
+
if (t.state !== "active") return !1;
|
|
1355
|
+
const n = he();
|
|
1356
|
+
return t.previewLayoutMap.forEach((o, r) => {
|
|
1357
|
+
const i = n.get(r);
|
|
1358
|
+
r.resizePreviewMode === "separator" && i && !ie(o, i.layout) && fe(r, {
|
|
1359
|
+
...i,
|
|
1360
|
+
layout: o,
|
|
1361
|
+
requestedAxisSize: i.axisSize,
|
|
1362
|
+
requestedLayout: o
|
|
1363
|
+
});
|
|
1364
|
+
}), de({
|
|
1365
|
+
cursorFlags: 0,
|
|
1366
|
+
state: "inactive"
|
|
1367
|
+
}), t.hitRegions.forEach((o) => {
|
|
1368
|
+
if (!n.has(o.axis)) return;
|
|
1369
|
+
const r = ae(o.axis.id, !0);
|
|
1370
|
+
fe(o.axis, r, { isUserInteraction: !0 });
|
|
1371
|
+
}), Ve(e), !0;
|
|
1372
|
+
}
|
|
1373
|
+
function Rt(e) {
|
|
1374
|
+
const t = se();
|
|
1375
|
+
if (t.state !== "active") return;
|
|
1376
|
+
const n = t.hitRegions.flatMap(({ separator: o }) => o ? [o.element] : []);
|
|
1377
|
+
!n.some((o) => o === e.target) || n.some((o) => o.hasPointerCapture?.(e.pointerId)) || Je(e.currentTarget);
|
|
1378
|
+
}
|
|
1379
|
+
function Mt(e) {
|
|
1380
|
+
Je(e.currentTarget);
|
|
1381
|
+
}
|
|
1382
|
+
function Yn(e, t) {
|
|
1383
|
+
const { element: n, orientation: o, items: r } = e, i = n.getBoundingClientRect(), s = o === "horizontal";
|
|
1384
|
+
return ut({
|
|
1385
|
+
expandHitTargets: !1,
|
|
1386
|
+
axis: e,
|
|
1387
|
+
includeDisabled: !0
|
|
1388
|
+
}).map(({ items: a, rect: c, separator: u }, d) => {
|
|
1389
|
+
const p = r.indexOf(a[0]);
|
|
1390
|
+
const y = s ? c.left + c.width / 2 : c.top + c.height / 2;
|
|
1391
|
+
return {
|
|
1392
|
+
active: t.some((f) => {
|
|
1393
|
+
if (f.axis !== e || f.items[0] !== a[0]) return !1;
|
|
1394
|
+
if (u || f.separator) return f.separator === u;
|
|
1395
|
+
const S = s ? f.rect.left + f.rect.width / 2 : f.rect.top + f.rect.height / 2;
|
|
1396
|
+
return Y(y, S);
|
|
1397
|
+
}),
|
|
1398
|
+
axis: e,
|
|
1399
|
+
key: u ? `separator-${u.id}` : `panel-${a[0].id}-${d}`,
|
|
1400
|
+
offset: 0,
|
|
1401
|
+
itemIndex: p,
|
|
1402
|
+
rect: new DOMRect((s && !u ? y : c.left) - i.left - n.clientLeft + n.scrollLeft, (!s && !u ? y : c.top) - i.top - n.clientTop + n.scrollTop, s && !u ? 0 : c.width, !s && !u ? 0 : c.height),
|
|
1403
|
+
separator: u
|
|
1404
|
+
};
|
|
1405
|
+
});
|
|
1406
|
+
}
|
|
1407
|
+
function Et(e) {
|
|
1408
|
+
if (e.defaultPrevented) return;
|
|
1409
|
+
if (e.pointerType === "mouse" && e.button > 0) return;
|
|
1410
|
+
const t = he();
|
|
1411
|
+
const n = ft(e, t);
|
|
1412
|
+
if (n.length === 0) return;
|
|
1413
|
+
const o = /* @__PURE__ */ new Map();
|
|
1414
|
+
let r = !1;
|
|
1415
|
+
n.forEach((s) => {
|
|
1416
|
+
s.separator && (r || (r = !0, s.separator.element.focus({
|
|
1417
|
+
focusVisible: !1,
|
|
1418
|
+
preventScroll: !0
|
|
1419
|
+
})));
|
|
1420
|
+
const l = t.get(s.axis);
|
|
1421
|
+
l && o.set(s.axis, l.layout);
|
|
1422
|
+
});
|
|
1423
|
+
const i = Array.from(o.keys()).flatMap((s) => s.resizePreviewMode === "separator" ? Yn(s, n) : []);
|
|
1424
|
+
de({
|
|
1425
|
+
cursorFlags: 0,
|
|
1426
|
+
didPointerMove: !1,
|
|
1427
|
+
hitRegions: n,
|
|
1428
|
+
initialLayoutMap: o,
|
|
1429
|
+
pointerDownAtPoint: {
|
|
1430
|
+
x: e.clientX,
|
|
1431
|
+
y: e.clientY
|
|
1432
|
+
},
|
|
1433
|
+
previewLayoutMap: new Map(o),
|
|
1434
|
+
previews: i,
|
|
1435
|
+
state: "active"
|
|
1436
|
+
}), e.preventDefault();
|
|
1437
|
+
}
|
|
1438
|
+
function Pt(e) {
|
|
1439
|
+
const t = he();
|
|
1440
|
+
const n = se();
|
|
1441
|
+
switch (n.state) {
|
|
1442
|
+
case "active": dt({
|
|
1443
|
+
commit: !1,
|
|
1444
|
+
document: e.currentTarget,
|
|
1445
|
+
event: e,
|
|
1446
|
+
hitRegions: n.hitRegions,
|
|
1447
|
+
initialLayoutMap: n.initialLayoutMap,
|
|
1448
|
+
mountedAxes: t,
|
|
1449
|
+
prevCursorFlags: n.cursorFlags
|
|
1450
|
+
});
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
function kt(e) {
|
|
1454
|
+
if (e.defaultPrevented) return;
|
|
1455
|
+
const t = se();
|
|
1456
|
+
const n = he();
|
|
1457
|
+
switch (t.state) {
|
|
1458
|
+
case "active":
|
|
1459
|
+
if (e.buttons === 0) {
|
|
1460
|
+
Je(e.currentTarget);
|
|
1461
|
+
return;
|
|
1462
|
+
}
|
|
1463
|
+
for (const o of t.hitRegions) if (o.separator) {
|
|
1464
|
+
const { element: r } = o.separator;
|
|
1465
|
+
r.isConnected && !r.hasPointerCapture?.(e.pointerId) && r.setPointerCapture?.(e.pointerId);
|
|
1466
|
+
}
|
|
1467
|
+
dt({
|
|
1468
|
+
commit: !1,
|
|
1469
|
+
document: e.currentTarget,
|
|
1470
|
+
event: e,
|
|
1471
|
+
hitRegions: t.hitRegions,
|
|
1472
|
+
initialLayoutMap: t.initialLayoutMap,
|
|
1473
|
+
mountedAxes: n,
|
|
1474
|
+
pointerDownAtPoint: t.pointerDownAtPoint,
|
|
1475
|
+
prevCursorFlags: t.cursorFlags
|
|
1476
|
+
});
|
|
1477
|
+
break;
|
|
1478
|
+
default: {
|
|
1479
|
+
const o = ft(e, n);
|
|
1480
|
+
o.length === 0 ? t.state !== "inactive" && de({
|
|
1481
|
+
cursorFlags: 0,
|
|
1482
|
+
state: "inactive"
|
|
1483
|
+
}) : de({
|
|
1484
|
+
cursorFlags: 0,
|
|
1485
|
+
hitRegions: o,
|
|
1486
|
+
state: "hover"
|
|
1487
|
+
}), Ve(e.currentTarget);
|
|
1488
|
+
break;
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
function Tt(e) {
|
|
1493
|
+
if (e.relatedTarget instanceof HTMLIFrameElement) switch (se().state) {
|
|
1494
|
+
case "hover": de({
|
|
1495
|
+
cursorFlags: 0,
|
|
1496
|
+
state: "inactive"
|
|
1497
|
+
});
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
function $t(e) {
|
|
1501
|
+
if (e.defaultPrevented) return;
|
|
1502
|
+
if (e.pointerType === "mouse" && e.button > 0) return;
|
|
1503
|
+
nn(e.currentTarget, e) && e.preventDefault();
|
|
1504
|
+
}
|
|
1505
|
+
function At(e) {
|
|
1506
|
+
e.target === e.currentTarget && Je(e.currentTarget.document);
|
|
1507
|
+
}
|
|
1508
|
+
function Kn(e) {
|
|
1509
|
+
let t = 0;
|
|
1510
|
+
let n = 0;
|
|
1511
|
+
const o = {};
|
|
1512
|
+
for (const i of e) if (i.defaultSize !== void 0) {
|
|
1513
|
+
t++;
|
|
1514
|
+
const s = X(i.defaultSize);
|
|
1515
|
+
n += s, o[i.itemId] = s;
|
|
1516
|
+
} else o[i.itemId] = void 0;
|
|
1517
|
+
const r = e.length - t;
|
|
1518
|
+
if (r !== 0) {
|
|
1519
|
+
const i = X((100 - n) / r);
|
|
1520
|
+
for (const s of e) s.defaultSize === void 0 && (o[s.itemId] = i);
|
|
1521
|
+
}
|
|
1522
|
+
return o;
|
|
1523
|
+
}
|
|
1524
|
+
function Xn(e, t) {
|
|
1525
|
+
const n = e.map((r) => r.id);
|
|
1526
|
+
const o = Object.keys(t);
|
|
1527
|
+
if (n.length !== o.length) return !1;
|
|
1528
|
+
for (const r of n) if (!o.includes(r)) return !1;
|
|
1529
|
+
return !0;
|
|
1530
|
+
}
|
|
1531
|
+
function Dt({ axis: e, itemConstraints: t }) {
|
|
1532
|
+
const n = e.items.map(({ id: r }) => r).join(",");
|
|
1533
|
+
const o = e.mutableState.defaultLayout;
|
|
1534
|
+
return e.mutableState.layouts[n] ?? (o && Xn(e.items, o) ? o : Kn(t));
|
|
1535
|
+
}
|
|
1536
|
+
function Ot({ itemIds: e, layout: t }) {
|
|
1537
|
+
return ye({
|
|
1538
|
+
layout: t,
|
|
1539
|
+
itemConstraints: e.map((n) => ({
|
|
1540
|
+
collapsedSize: 0,
|
|
1541
|
+
collapsible: !1,
|
|
1542
|
+
defaultSize: void 0,
|
|
1543
|
+
disabled: void 0,
|
|
1544
|
+
itemId: n,
|
|
1545
|
+
maxSize: 100,
|
|
1546
|
+
minSize: 0
|
|
1547
|
+
}))
|
|
1548
|
+
});
|
|
1549
|
+
}
|
|
1550
|
+
function Jn(e, t, n) {
|
|
1551
|
+
if (!n[0]) return;
|
|
1552
|
+
const r = e.items.find((c) => c.element === t);
|
|
1553
|
+
if (!r || !r.onResize) return;
|
|
1554
|
+
const i = ke({ axis: e });
|
|
1555
|
+
const s = e.orientation === "horizontal" ? r.element.offsetWidth : r.element.offsetHeight;
|
|
1556
|
+
const l = r.mutableValues.prevSize;
|
|
1557
|
+
const a = {
|
|
1558
|
+
asPercentage: X(s / i * 100),
|
|
1559
|
+
inPixels: s
|
|
1560
|
+
};
|
|
1561
|
+
r.mutableValues.prevSize = a, r.onResize(a, r.id, l);
|
|
1562
|
+
}
|
|
1563
|
+
function sn(e, t) {
|
|
1564
|
+
if (Object.keys(e).length !== Object.keys(t).length) return !1;
|
|
1565
|
+
for (const o in e) if (e[o] !== t[o]) return !1;
|
|
1566
|
+
return !0;
|
|
1567
|
+
}
|
|
1568
|
+
function Zn(e, t) {
|
|
1569
|
+
return e.length !== t.length ? !1 : e.every((n, o) => sn(n, t[o]));
|
|
1570
|
+
}
|
|
1571
|
+
function Qn({ axis: e, nextAxisSize: t, prevAxisSize: n, prevLayout: o }) {
|
|
1572
|
+
if (n <= 0 || t <= 0 || n === t) return o;
|
|
1573
|
+
let r = 0;
|
|
1574
|
+
let i = 0;
|
|
1575
|
+
let s = !1;
|
|
1576
|
+
const l = /* @__PURE__ */ new Map();
|
|
1577
|
+
const a = [];
|
|
1578
|
+
for (const d of e.items) {
|
|
1579
|
+
const p = o[d.id] ?? 0;
|
|
1580
|
+
switch (d.constraintProps.groupResizeBehavior) {
|
|
1581
|
+
case "preserve-pixel-size": {
|
|
1582
|
+
s = !0;
|
|
1583
|
+
const m = X(p / 100 * n / t * 100);
|
|
1584
|
+
l.set(d.id, m), r += m;
|
|
1585
|
+
break;
|
|
1586
|
+
}
|
|
1587
|
+
default: a.push(d.id), i += p;
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
if (!s || a.length === 0) return o;
|
|
1591
|
+
const c = 100 - r;
|
|
1592
|
+
const u = { ...o };
|
|
1593
|
+
if (l.forEach((d, p) => {
|
|
1594
|
+
u[p] = d;
|
|
1595
|
+
}), i > 0) for (const d of a) u[d] = X((o[d] ?? 0) / i * c);
|
|
1596
|
+
else {
|
|
1597
|
+
const d = X(c / a.length);
|
|
1598
|
+
for (const p of a) u[p] = d;
|
|
1599
|
+
}
|
|
1600
|
+
return u;
|
|
1601
|
+
}
|
|
1602
|
+
var Le = /* @__PURE__ */ new Map();
|
|
1603
|
+
function an(e) {
|
|
1604
|
+
let t = !0;
|
|
1605
|
+
D(e.element.ownerDocument.defaultView, "Cannot register an unmounted Group");
|
|
1606
|
+
const n = e.element.ownerDocument.defaultView.ResizeObserver;
|
|
1607
|
+
const o = /* @__PURE__ */ new Set();
|
|
1608
|
+
const r = /* @__PURE__ */ new Set();
|
|
1609
|
+
const i = new n((m) => {
|
|
1610
|
+
for (const f of m) {
|
|
1611
|
+
const { borderBoxSize: S, target: h } = f;
|
|
1612
|
+
if (h === e.element) {
|
|
1613
|
+
if (t) {
|
|
1614
|
+
const g = ke({ axis: e });
|
|
1615
|
+
if (g === 0) return;
|
|
1616
|
+
const I = ae(e.id);
|
|
1617
|
+
if (!I) return;
|
|
1618
|
+
const x = it(e);
|
|
1619
|
+
let C = I.requestedAxisSize;
|
|
1620
|
+
let A = I.requestedLayout;
|
|
1621
|
+
I.defaultLayoutDeferred && (C = g, A = Ot({
|
|
1622
|
+
itemIds: e.items.map(({ id: w }) => w),
|
|
1623
|
+
layout: Dt({
|
|
1624
|
+
axis: e,
|
|
1625
|
+
itemConstraints: x
|
|
1626
|
+
})
|
|
1627
|
+
}));
|
|
1628
|
+
const b = ye({
|
|
1629
|
+
layout: Qn({
|
|
1630
|
+
axis: e,
|
|
1631
|
+
nextAxisSize: g,
|
|
1632
|
+
prevAxisSize: C,
|
|
1633
|
+
prevLayout: A
|
|
1634
|
+
}),
|
|
1635
|
+
itemConstraints: x
|
|
1636
|
+
});
|
|
1637
|
+
if (!I.defaultLayoutDeferred && ie(I.layout, b) && Zn(I.derivedItemConstraints, x) && I.axisSize === g) continue;
|
|
1638
|
+
fe(e, {
|
|
1639
|
+
defaultLayoutDeferred: !1,
|
|
1640
|
+
derivedItemConstraints: x,
|
|
1641
|
+
axisSize: g,
|
|
1642
|
+
layout: b,
|
|
1643
|
+
requestedAxisSize: C,
|
|
1644
|
+
requestedLayout: A,
|
|
1645
|
+
separatorToItems: I.separatorToItems
|
|
1646
|
+
});
|
|
1647
|
+
}
|
|
1648
|
+
} else Jn(e, h, S);
|
|
1649
|
+
}
|
|
1650
|
+
});
|
|
1651
|
+
i.observe(e.element), e.items.forEach((m) => {
|
|
1652
|
+
D(!o.has(m.id), `Panel ids must be unique; id "${m.id}" was used more than once`), o.add(m.id), m.onResize && i.observe(m.element);
|
|
1653
|
+
});
|
|
1654
|
+
const s = ke({ axis: e });
|
|
1655
|
+
const l = it(e);
|
|
1656
|
+
const a = Dt({
|
|
1657
|
+
axis: e,
|
|
1658
|
+
itemConstraints: l
|
|
1659
|
+
});
|
|
1660
|
+
const c = ye({
|
|
1661
|
+
layout: a,
|
|
1662
|
+
itemConstraints: l
|
|
1663
|
+
});
|
|
1664
|
+
const u = e.element.ownerDocument;
|
|
1665
|
+
const d = u.defaultView;
|
|
1666
|
+
Le.set(u, (Le.get(u) ?? 0) + 1);
|
|
1667
|
+
const p = /* @__PURE__ */ new Map();
|
|
1668
|
+
return ut({
|
|
1669
|
+
axis: e,
|
|
1670
|
+
includeDisabled: !0
|
|
1671
|
+
}).forEach((m) => {
|
|
1672
|
+
m.separator && p.set(m.separator, m.items);
|
|
1673
|
+
}), fe(e, {
|
|
1674
|
+
defaultLayoutDeferred: s === 0,
|
|
1675
|
+
derivedItemConstraints: l,
|
|
1676
|
+
axisSize: s,
|
|
1677
|
+
layout: c,
|
|
1678
|
+
requestedAxisSize: s,
|
|
1679
|
+
requestedLayout: Ot({
|
|
1680
|
+
itemIds: e.items.map(({ id: m }) => m),
|
|
1681
|
+
layout: a
|
|
1682
|
+
}),
|
|
1683
|
+
separatorToItems: p
|
|
1684
|
+
}), e.separators.forEach((m) => {
|
|
1685
|
+
D(!r.has(m.id), `Separator ids must be unique; id "${m.id}" was used more than once`), r.add(m.id), m.element.addEventListener("keydown", Ct);
|
|
1686
|
+
}), Le.get(u) === 1 && (u.addEventListener("contextmenu", xt, !0), u.addEventListener("dblclick", Lt, !0), u.addEventListener("lostpointercapture", Rt, !0), u.addEventListener("pointercancel", Mt, !0), u.addEventListener("pointerdown", Et, !0), u.addEventListener("pointerleave", Pt), u.addEventListener("pointermove", kt), u.addEventListener("pointerout", Tt), u.addEventListener("pointerup", $t, !0), d?.addEventListener("blur", At)), function() {
|
|
1687
|
+
t = !1, Le.set(u, Math.max(0, (Le.get(u) ?? 0) - 1)), Nn(e), Rn(e) && Ve(u), e.separators.forEach((f) => {
|
|
1688
|
+
f.element.removeEventListener("keydown", Ct);
|
|
1689
|
+
}), Le.get(u) || (u.removeEventListener("contextmenu", xt, !0), u.removeEventListener("dblclick", Lt, !0), u.removeEventListener("lostpointercapture", Rt, !0), u.removeEventListener("pointercancel", Mt, !0), u.removeEventListener("pointerdown", Et, !0), u.removeEventListener("pointerleave", Pt), u.removeEventListener("pointermove", kt), u.removeEventListener("pointerout", Tt), u.removeEventListener("pointerup", $t, !0), d?.removeEventListener("blur", At)), i.disconnect();
|
|
1690
|
+
};
|
|
1691
|
+
}
|
|
1692
|
+
function ln({ derivedItemConstraints: e, axis: t, layout: n, prevLayout: o, requestedLayout: r }) {
|
|
1693
|
+
const i = t.items.map(({ id: s }) => s).join(",");
|
|
1694
|
+
t.mutableState.layouts[i] = r, o && e.forEach((s) => {
|
|
1695
|
+
if (s.collapsible) {
|
|
1696
|
+
const l = Y(s.collapsedSize, n[s.itemId]);
|
|
1697
|
+
const a = Y(s.collapsedSize, o[s.itemId]);
|
|
1698
|
+
l && !a && (t.mutableState.expandedItemSizes[s.itemId] = o[s.itemId]);
|
|
1699
|
+
}
|
|
1700
|
+
});
|
|
1701
|
+
}
|
|
1702
|
+
function cn() {
|
|
1703
|
+
const [e, t] = useState({});
|
|
1704
|
+
return [e, useCallback(() => t({}), [])];
|
|
1705
|
+
}
|
|
1706
|
+
function Ze(e) {
|
|
1707
|
+
const t = useRef({ ...e });
|
|
1708
|
+
return ne(() => {
|
|
1709
|
+
for (const n in e) t.current[n] = e[n];
|
|
1710
|
+
}, [e]), t.current;
|
|
1711
|
+
}
|
|
1712
|
+
var pt = createContext(null);
|
|
1713
|
+
function eo({ layout: e, itemConstraints: t, itemId: n, itemIndex: o }) {
|
|
1714
|
+
let r;
|
|
1715
|
+
let i;
|
|
1716
|
+
const s = e[n];
|
|
1717
|
+
const l = t.find((a) => a.itemId === n);
|
|
1718
|
+
if (l) {
|
|
1719
|
+
const a = l.maxSize;
|
|
1720
|
+
const c = l.collapsible ? l.collapsedSize : l.minSize;
|
|
1721
|
+
const u = [o, o + 1];
|
|
1722
|
+
i = ye({
|
|
1723
|
+
layout: Fe({
|
|
1724
|
+
delta: c - s,
|
|
1725
|
+
initialLayout: e,
|
|
1726
|
+
itemConstraints: t,
|
|
1727
|
+
pivotIndices: u,
|
|
1728
|
+
prevLayout: e
|
|
1729
|
+
}),
|
|
1730
|
+
itemConstraints: t
|
|
1731
|
+
})[n], r = ye({
|
|
1732
|
+
layout: Fe({
|
|
1733
|
+
delta: a - s,
|
|
1734
|
+
initialLayout: e,
|
|
1735
|
+
itemConstraints: t,
|
|
1736
|
+
pivotIndices: u,
|
|
1737
|
+
prevLayout: e
|
|
1738
|
+
}),
|
|
1739
|
+
itemConstraints: t
|
|
1740
|
+
})[n];
|
|
1741
|
+
}
|
|
1742
|
+
return {
|
|
1743
|
+
valueControls: n,
|
|
1744
|
+
valueMax: r,
|
|
1745
|
+
valueMin: i,
|
|
1746
|
+
valueNow: s
|
|
1747
|
+
};
|
|
1748
|
+
}
|
|
1749
|
+
function un({ attributes: e, axisId: t, axisOrientation: n, children: o, className: r, disableCursor: i, disabled: s, disableDoubleClick: l, elementRef: a, id: c, isSharedHitRegion: u, preview: d, registerSeparator: p, requiredStyle: y, style: m, styleDefaults: f, tabIndex: S = 0, updateSeparatorProps: h }) {
|
|
1750
|
+
const g = Ze({
|
|
1751
|
+
disabled: s,
|
|
1752
|
+
disableDoubleClick: l,
|
|
1753
|
+
children: o,
|
|
1754
|
+
className: r,
|
|
1755
|
+
preview: d,
|
|
1756
|
+
style: m
|
|
1757
|
+
}), [I, x] = useState({}), [C, A] = useState("inactive"), [N, b] = useState(!1), w = useRef(null), v = useRef(null), T = qe(w, a), O = n === "horizontal" ? "vertical" : "horizontal";
|
|
1758
|
+
ne(() => {
|
|
1759
|
+
const P = w.current;
|
|
1760
|
+
if (P !== null) {
|
|
1761
|
+
const z = {
|
|
1762
|
+
disabled: g.disabled,
|
|
1763
|
+
disableDoubleClick: g.disableDoubleClick,
|
|
1764
|
+
element: P,
|
|
1765
|
+
id: c,
|
|
1766
|
+
get children() {
|
|
1767
|
+
return g.children;
|
|
1768
|
+
},
|
|
1769
|
+
get className() {
|
|
1770
|
+
return g.className;
|
|
1771
|
+
},
|
|
1772
|
+
get preview() {
|
|
1773
|
+
return g.preview;
|
|
1774
|
+
},
|
|
1775
|
+
get style() {
|
|
1776
|
+
return g.style;
|
|
1777
|
+
}
|
|
1778
|
+
};
|
|
1779
|
+
v.current = z;
|
|
1780
|
+
const M = p(z);
|
|
1781
|
+
const q = Kt((H) => {
|
|
1782
|
+
A(H.next.state !== "inactive" && H.next.hitRegions.some((Z) => Z.separator === z || (u?.(Z) ?? !1)) ? H.next.state : "inactive");
|
|
1783
|
+
});
|
|
1784
|
+
const J = _e(t, (H) => {
|
|
1785
|
+
const { derivedItemConstraints: Z, layout: Se, separatorToItems: ze } = H.next, Ie = ze.get(z);
|
|
1786
|
+
if (Ie) {
|
|
1787
|
+
const ve = Ie[0], L = Z.findIndex((_) => _.itemId === ve.id), { layoutStrategy: k } = H.axis;
|
|
1788
|
+
x({
|
|
1789
|
+
...eo({
|
|
1790
|
+
layout: Se,
|
|
1791
|
+
itemConstraints: Z,
|
|
1792
|
+
itemId: ve.id,
|
|
1793
|
+
itemIndex: L
|
|
1794
|
+
}),
|
|
1795
|
+
...k?.getItemAriaControls && { valueControls: k.getItemAriaControls(ve.id) }
|
|
1796
|
+
});
|
|
1797
|
+
}
|
|
1798
|
+
});
|
|
1799
|
+
return () => {
|
|
1800
|
+
v.current = null, q(), J(), M();
|
|
1801
|
+
};
|
|
1802
|
+
}
|
|
1803
|
+
}, [
|
|
1804
|
+
t,
|
|
1805
|
+
c,
|
|
1806
|
+
u,
|
|
1807
|
+
p,
|
|
1808
|
+
g
|
|
1809
|
+
]), ne(() => {
|
|
1810
|
+
const P = v.current;
|
|
1811
|
+
P && Cn(P);
|
|
1812
|
+
}, [d]), useEffect(() => {
|
|
1813
|
+
h(c, {
|
|
1814
|
+
disabled: s,
|
|
1815
|
+
disableDoubleClick: l
|
|
1816
|
+
});
|
|
1817
|
+
}, [
|
|
1818
|
+
s,
|
|
1819
|
+
l,
|
|
1820
|
+
c,
|
|
1821
|
+
h
|
|
1822
|
+
]);
|
|
1823
|
+
let R;
|
|
1824
|
+
s && !i && (R = "not-allowed");
|
|
1825
|
+
let E;
|
|
1826
|
+
if (s) E = "disabled";
|
|
1827
|
+
else switch (C) {
|
|
1828
|
+
case "active":
|
|
1829
|
+
E = "active";
|
|
1830
|
+
break;
|
|
1831
|
+
default: N ? E = "focus" : E = C;
|
|
1832
|
+
}
|
|
1833
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1834
|
+
...e,
|
|
1835
|
+
"aria-controls": I.valueControls,
|
|
1836
|
+
"aria-disabled": s || void 0,
|
|
1837
|
+
"aria-orientation": O,
|
|
1838
|
+
"aria-valuemax": I.valueMax,
|
|
1839
|
+
"aria-valuemin": I.valueMin,
|
|
1840
|
+
"aria-valuenow": I.valueNow,
|
|
1841
|
+
children: o,
|
|
1842
|
+
className: r,
|
|
1843
|
+
"data-separator": E,
|
|
1844
|
+
"data-testid": c,
|
|
1845
|
+
id: c,
|
|
1846
|
+
onBlur: () => b(!1),
|
|
1847
|
+
onFocus: () => b(!0),
|
|
1848
|
+
ref: T,
|
|
1849
|
+
role: "separator",
|
|
1850
|
+
style: {
|
|
1851
|
+
...f,
|
|
1852
|
+
cursor: R,
|
|
1853
|
+
...m,
|
|
1854
|
+
...y,
|
|
1855
|
+
touchAction: "none"
|
|
1856
|
+
},
|
|
1857
|
+
tabIndex: s ? void 0 : S
|
|
1858
|
+
});
|
|
1859
|
+
}
|
|
1860
|
+
function Nt({ axis: e, children: t, className: n, crossSpan: o, crossStart: r, disabled: i, elementRef: s, index: l, style: a }) {
|
|
1861
|
+
const c = Te(void 0), { getDisableCursor: u, getResizeAxisId: d, gutters: p, registerSeparator: y, separatorPlacements: m, trackCounts: f, updateSeparatorProps: S } = Ut(), h = d(e), g = e === "column" ? "row" : "column", I = f[g], x = !!i || !at(l, f[e]);
|
|
1862
|
+
let C = !0;
|
|
1863
|
+
for (const v of m.values()) if (v.axis === e && v.index === l && !v.disabled && v.crossStart < r) {
|
|
1864
|
+
C = !1;
|
|
1865
|
+
break;
|
|
1866
|
+
}
|
|
1867
|
+
const A = useCallback((v) => v.axis.id === h && v.axis.items.indexOf(v.items[1]) === l, [h, l]);
|
|
1868
|
+
const N = useCallback((v) => y({
|
|
1869
|
+
axis: e,
|
|
1870
|
+
crossSpan: o,
|
|
1871
|
+
crossStart: r,
|
|
1872
|
+
disabled: !!i,
|
|
1873
|
+
index: l
|
|
1874
|
+
}, v), [
|
|
1875
|
+
e,
|
|
1876
|
+
o,
|
|
1877
|
+
r,
|
|
1878
|
+
i,
|
|
1879
|
+
l,
|
|
1880
|
+
y
|
|
1881
|
+
]);
|
|
1882
|
+
const b = vn(l);
|
|
1883
|
+
const w = bn({
|
|
1884
|
+
crossCount: I,
|
|
1885
|
+
crossSpan: o,
|
|
1886
|
+
crossStart: r,
|
|
1887
|
+
hasGutters: p[g]
|
|
1888
|
+
});
|
|
1889
|
+
return /* @__PURE__ */ jsx(un, {
|
|
1890
|
+
axisId: h,
|
|
1891
|
+
axisOrientation: e === "column" ? "horizontal" : "vertical",
|
|
1892
|
+
className: n,
|
|
1893
|
+
disableCursor: u(),
|
|
1894
|
+
disabled: x,
|
|
1895
|
+
disableDoubleClick: void 0,
|
|
1896
|
+
elementRef: s,
|
|
1897
|
+
id: c,
|
|
1898
|
+
isSharedHitRegion: A,
|
|
1899
|
+
registerSeparator: N,
|
|
1900
|
+
requiredStyle: {
|
|
1901
|
+
gridColumn: e === "column" ? b : w,
|
|
1902
|
+
gridRow: e === "row" ? b : w
|
|
1903
|
+
},
|
|
1904
|
+
style: a,
|
|
1905
|
+
tabIndex: C ? 0 : -1,
|
|
1906
|
+
updateSeparatorProps: S,
|
|
1907
|
+
children: t
|
|
1908
|
+
});
|
|
1909
|
+
}
|
|
1910
|
+
function dn(e) {
|
|
1911
|
+
const { children: t, className: n, disabled: o, elementRef: r, style: i } = e;
|
|
1912
|
+
return e.type === "column" ? /* @__PURE__ */ jsx(Nt, {
|
|
1913
|
+
axis: "column",
|
|
1914
|
+
className: n,
|
|
1915
|
+
crossSpan: e.rowSpan,
|
|
1916
|
+
crossStart: e.row ?? 0,
|
|
1917
|
+
disabled: o,
|
|
1918
|
+
elementRef: r,
|
|
1919
|
+
index: e.column,
|
|
1920
|
+
style: i,
|
|
1921
|
+
children: t
|
|
1922
|
+
}) : /* @__PURE__ */ jsx(Nt, {
|
|
1923
|
+
axis: "row",
|
|
1924
|
+
className: n,
|
|
1925
|
+
crossSpan: e.columnSpan,
|
|
1926
|
+
crossStart: e.column ?? 0,
|
|
1927
|
+
disabled: o,
|
|
1928
|
+
elementRef: r,
|
|
1929
|
+
index: e.row,
|
|
1930
|
+
style: i,
|
|
1931
|
+
children: t
|
|
1932
|
+
});
|
|
1933
|
+
}
|
|
1934
|
+
dn.displayName = "Gridline";
|
|
1935
|
+
var Re = ["column", "row"];
|
|
1936
|
+
var Gt = {
|
|
1937
|
+
columns: {},
|
|
1938
|
+
rows: {}
|
|
1939
|
+
};
|
|
1940
|
+
function to({ children: e, className: t, columns: n, defaultLayout: o, disableCursor: r, disabled: i, elementRef: s, gridRef: l, id: a, onLayoutChange: c, onLayoutChanged: u, resizeTargetMinimumSize: d = {
|
|
1941
|
+
coarse: 20,
|
|
1942
|
+
fine: 10
|
|
1943
|
+
}, rows: p, style: y, ...m }) {
|
|
1944
|
+
const f = Te(a), S = useCallback((L) => L === "column" ? `${f}:columns` : `${f}:rows`, [f]), h = _t(n, "columns"), g = _t(p, "rows"), I = (L) => L === "column" ? h : g, x = useRef({
|
|
1945
|
+
onLayoutChange: Gt,
|
|
1946
|
+
onLayoutChanged: Gt
|
|
1947
|
+
}), C = ge((L) => {
|
|
1948
|
+
Ft(x.current.onLayoutChange, L) || (x.current.onLayoutChange = L, c?.(L));
|
|
1949
|
+
}), A = ge((L, k, _) => {
|
|
1950
|
+
Ft(x.current.onLayoutChanged, L) || (x.current.onLayoutChanged = L, u?.(L, {
|
|
1951
|
+
isUserInteraction: k,
|
|
1952
|
+
requestedLayout: _
|
|
1953
|
+
}));
|
|
1954
|
+
}), N = useRef(null), b = qe(N, s), [w, v] = cn(), T = useRef({
|
|
1955
|
+
cells: [],
|
|
1956
|
+
column: {
|
|
1957
|
+
expandedItemSizes: {},
|
|
1958
|
+
layouts: {}
|
|
1959
|
+
},
|
|
1960
|
+
loggedErrors: /* @__PURE__ */ new Set(),
|
|
1961
|
+
row: {
|
|
1962
|
+
expandedItemSizes: {},
|
|
1963
|
+
layouts: {}
|
|
1964
|
+
},
|
|
1965
|
+
separators: /* @__PURE__ */ new Map()
|
|
1966
|
+
}), O = {
|
|
1967
|
+
column: !1,
|
|
1968
|
+
row: !1
|
|
1969
|
+
};
|
|
1970
|
+
for (const L of T.current.separators.values()) O[L.axis] = !0;
|
|
1971
|
+
fn(e, O);
|
|
1972
|
+
const R = Ze({
|
|
1973
|
+
defaultLayout: o,
|
|
1974
|
+
disableCursor: r,
|
|
1975
|
+
resizeTargetMinimumSize: d
|
|
1976
|
+
});
|
|
1977
|
+
const E = ge(() => !!R.disableCursor);
|
|
1978
|
+
const P = useCallback((L) => {
|
|
1979
|
+
const k = T.current;
|
|
1980
|
+
return k.cells = [...k.cells, L], v(), () => {
|
|
1981
|
+
k.cells = k.cells.filter((_) => _ !== L), v();
|
|
1982
|
+
};
|
|
1983
|
+
}, [v]);
|
|
1984
|
+
const z = useCallback((L, k) => {
|
|
1985
|
+
const _ = T.current;
|
|
1986
|
+
return _.separators = new Map(_.separators), _.separators.set(k, L), v(), () => {
|
|
1987
|
+
_.separators = new Map(_.separators), _.separators.delete(k), v();
|
|
1988
|
+
};
|
|
1989
|
+
}, [v]);
|
|
1990
|
+
const M = useCallback((L, { disabled: k, disableDoubleClick: _ }) => {
|
|
1991
|
+
for (const G of T.current.separators.keys()) G.id === L && (G.disabled = k, G.disableDoubleClick = _);
|
|
1992
|
+
}, []);
|
|
1993
|
+
const q = T.current.separators;
|
|
1994
|
+
const J = useMemo(() => ({
|
|
1995
|
+
getDisableCursor: E,
|
|
1996
|
+
getResizeAxisId: S,
|
|
1997
|
+
gutters: {
|
|
1998
|
+
column: O.column,
|
|
1999
|
+
row: O.row
|
|
2000
|
+
},
|
|
2001
|
+
id: f,
|
|
2002
|
+
registerCell: P,
|
|
2003
|
+
registerSeparator: z,
|
|
2004
|
+
separatorPlacements: q,
|
|
2005
|
+
trackCounts: {
|
|
2006
|
+
column: h.length,
|
|
2007
|
+
row: g.length
|
|
2008
|
+
},
|
|
2009
|
+
updateSeparatorProps: M
|
|
2010
|
+
}), [
|
|
2011
|
+
h.length,
|
|
2012
|
+
E,
|
|
2013
|
+
S,
|
|
2014
|
+
O.column,
|
|
2015
|
+
O.row,
|
|
2016
|
+
f,
|
|
2017
|
+
P,
|
|
2018
|
+
z,
|
|
2019
|
+
g.length,
|
|
2020
|
+
q,
|
|
2021
|
+
M
|
|
2022
|
+
]);
|
|
2023
|
+
const H = useRef([]);
|
|
2024
|
+
ne(() => {
|
|
2025
|
+
const L = N.current;
|
|
2026
|
+
if (L === null) return;
|
|
2027
|
+
const k = T.current;
|
|
2028
|
+
const _ = oo({
|
|
2029
|
+
cells: k.cells,
|
|
2030
|
+
separatorPlacements: k.separators,
|
|
2031
|
+
trackCounts: {
|
|
2032
|
+
column: h.length,
|
|
2033
|
+
row: g.length
|
|
2034
|
+
}
|
|
2035
|
+
});
|
|
2036
|
+
_.forEach(($) => {
|
|
2037
|
+
k.loggedErrors.has($) || console.error($);
|
|
2038
|
+
}), k.loggedErrors = new Set(_);
|
|
2039
|
+
const G = ($) => Array.from(k.separators.entries()).filter(([, W]) => W.axis === $).sort(([, W], [, be]) => W.index - be.index).map(([W]) => W);
|
|
2040
|
+
const F = ($) => {
|
|
2041
|
+
const W = $ === "column" ? h : g;
|
|
2042
|
+
const be = $ === "column" ? g : h;
|
|
2043
|
+
const me = W.map((Q) => Q.id);
|
|
2044
|
+
const He = S($);
|
|
2045
|
+
const je = G($);
|
|
2046
|
+
const xe = je.length > 0;
|
|
2047
|
+
const Ue = W.map(({ id: Q, ...oe }, ee) => ({
|
|
2048
|
+
element: L,
|
|
2049
|
+
id: me[ee],
|
|
2050
|
+
idIsStable: !0,
|
|
2051
|
+
mutableValues: {
|
|
2052
|
+
expandToSize: void 0,
|
|
2053
|
+
prevSize: void 0
|
|
2054
|
+
},
|
|
2055
|
+
onResize: void 0,
|
|
2056
|
+
constraintProps: oe
|
|
2057
|
+
}));
|
|
2058
|
+
const Ae = () => {
|
|
2059
|
+
const Q = [];
|
|
2060
|
+
if (xe) {
|
|
2061
|
+
for (const [oe, ee] of k.separators) if (ee.axis === $ && at(ee.index, W.length)) {
|
|
2062
|
+
const Oe = oe.element.getBoundingClientRect();
|
|
2063
|
+
Q[ee.index] = Math.max(Q[ee.index] ?? 0, $ === "column" ? Oe.width : Oe.height);
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
return In({
|
|
2067
|
+
axis: $,
|
|
2068
|
+
element: L,
|
|
2069
|
+
gutterSizes: Q.filter((oe) => oe !== void 0),
|
|
2070
|
+
hasGutters: xe,
|
|
2071
|
+
layout: ae(He)?.layout,
|
|
2072
|
+
trackIds: me
|
|
2073
|
+
});
|
|
2074
|
+
};
|
|
2075
|
+
let De;
|
|
2076
|
+
const et = R.defaultLayout?.[$ === "column" ? "columns" : "rows"];
|
|
2077
|
+
if (et !== void 0 && Object.keys(et).length === me.length) {
|
|
2078
|
+
De = {};
|
|
2079
|
+
for (const Q of me) {
|
|
2080
|
+
const oe = et[Q];
|
|
2081
|
+
oe !== void 0 && (De[Q] = oe);
|
|
2082
|
+
}
|
|
2083
|
+
}
|
|
2084
|
+
return {
|
|
2085
|
+
disabled: !!i,
|
|
2086
|
+
element: L,
|
|
2087
|
+
id: He,
|
|
2088
|
+
layoutStrategy: {
|
|
2089
|
+
getItemAriaControls: (Q) => {
|
|
2090
|
+
const oe = me.indexOf(Q);
|
|
2091
|
+
return k.cells.filter((ee) => {
|
|
2092
|
+
const Oe = $ === "column" ? ee.column : ee.row;
|
|
2093
|
+
const pn = $ === "column" ? ee.columnSpan : ee.rowSpan;
|
|
2094
|
+
return Oe <= oe && oe < Oe + pn;
|
|
2095
|
+
}).map((ee) => ee.element.id).filter(Boolean).join(" ") || void 0;
|
|
2096
|
+
},
|
|
2097
|
+
calculateAvailableSize: () => Ae().availableSize,
|
|
2098
|
+
calculateHitRegions: ({ expandHitTargets: Q, axis: oe, includeDisabled: ee }) => zn({
|
|
2099
|
+
axis: $,
|
|
2100
|
+
cells: k.cells,
|
|
2101
|
+
crossTrackCount: be.length,
|
|
2102
|
+
expandHitTargets: Q,
|
|
2103
|
+
resizeAxis: oe,
|
|
2104
|
+
axisSize: Ae().availableSize,
|
|
2105
|
+
includeDisabled: ee,
|
|
2106
|
+
separatorPlacements: k.separators
|
|
2107
|
+
}),
|
|
2108
|
+
getItemSizeInPixels: (Q) => Ae().trackSizes[me.indexOf(Q)] ?? 0
|
|
2109
|
+
},
|
|
2110
|
+
mutableState: {
|
|
2111
|
+
defaultLayout: De,
|
|
2112
|
+
disableCursor: !!R.disableCursor,
|
|
2113
|
+
expandedItemSizes: k[$].expandedItemSizes,
|
|
2114
|
+
layouts: k[$].layouts
|
|
2115
|
+
},
|
|
2116
|
+
orientation: $ === "column" ? "horizontal" : "vertical",
|
|
2117
|
+
items: Ue,
|
|
2118
|
+
resizePreviewMode: "panel",
|
|
2119
|
+
get resizeTargetMinimumSize() {
|
|
2120
|
+
return R.resizeTargetMinimumSize;
|
|
2121
|
+
},
|
|
2122
|
+
separators: je
|
|
2123
|
+
};
|
|
2124
|
+
};
|
|
2125
|
+
const j = Re.map(F);
|
|
2126
|
+
H.current = j;
|
|
2127
|
+
const U = j.map(($) => an($));
|
|
2128
|
+
const te = () => {
|
|
2129
|
+
const [$, W] = j.map((be) => ae(be.id));
|
|
2130
|
+
if (!(!$ || !W || $.defaultLayoutDeferred || W.defaultLayoutDeferred)) return {
|
|
2131
|
+
layout: {
|
|
2132
|
+
columns: $.layout,
|
|
2133
|
+
rows: W.layout
|
|
2134
|
+
},
|
|
2135
|
+
requestedLayout: {
|
|
2136
|
+
columns: $.requestedLayout,
|
|
2137
|
+
rows: W.requestedLayout
|
|
2138
|
+
}
|
|
2139
|
+
};
|
|
2140
|
+
};
|
|
2141
|
+
{
|
|
2142
|
+
const $ = te();
|
|
2143
|
+
$ && (C($.layout), A($.layout, !1, $.requestedLayout));
|
|
2144
|
+
}
|
|
2145
|
+
const $e = j.map(($) => _e($.id, (W) => {
|
|
2146
|
+
const { defaultLayoutDeferred: be, derivedItemConstraints: me, layout: He, requestedLayout: je } = W.next;
|
|
2147
|
+
if (be || me.length === 0) return;
|
|
2148
|
+
ln({
|
|
2149
|
+
derivedItemConstraints: me,
|
|
2150
|
+
axis: $,
|
|
2151
|
+
layout: He,
|
|
2152
|
+
prevLayout: W.prev?.layout,
|
|
2153
|
+
requestedLayout: je
|
|
2154
|
+
});
|
|
2155
|
+
const xe = te();
|
|
2156
|
+
if (xe) {
|
|
2157
|
+
const Ue = se();
|
|
2158
|
+
const Ae = Ue.state !== "active" || !Ue.hitRegions.some((De) => j.includes(De.axis));
|
|
2159
|
+
C(xe.layout), Ae && A(xe.layout, W.isUserInteraction, xe.requestedLayout);
|
|
2160
|
+
}
|
|
2161
|
+
}));
|
|
2162
|
+
return () => {
|
|
2163
|
+
H.current = [], U.forEach(($) => $()), $e.forEach(($) => $());
|
|
2164
|
+
};
|
|
2165
|
+
}, [
|
|
2166
|
+
h,
|
|
2167
|
+
i,
|
|
2168
|
+
S,
|
|
2169
|
+
f,
|
|
2170
|
+
A,
|
|
2171
|
+
C,
|
|
2172
|
+
g,
|
|
2173
|
+
w,
|
|
2174
|
+
R
|
|
2175
|
+
]), useEffect(() => {
|
|
2176
|
+
H.current.forEach((L) => {
|
|
2177
|
+
L.mutableState.defaultLayout = o?.[L.orientation === "horizontal" ? "columns" : "rows"], L.mutableState.disableCursor = !!r;
|
|
2178
|
+
});
|
|
2179
|
+
}), useImperativeHandle(l, () => {
|
|
2180
|
+
const L = () => {
|
|
2181
|
+
const [G, F] = Re.map(S);
|
|
2182
|
+
return !Me(G) || !Me(F) ? {
|
|
2183
|
+
columns: {},
|
|
2184
|
+
rows: {}
|
|
2185
|
+
} : {
|
|
2186
|
+
columns: Ge({ axisId: G }).getLayout(),
|
|
2187
|
+
rows: Ge({ axisId: F }).getLayout()
|
|
2188
|
+
};
|
|
2189
|
+
};
|
|
2190
|
+
const k = (G) => G.map((F) => `"${F}"`).join(", ");
|
|
2191
|
+
const _ = (G, F) => {
|
|
2192
|
+
const j = S(G);
|
|
2193
|
+
const U = () => {
|
|
2194
|
+
const te = Me(j);
|
|
2195
|
+
return D(te, `Grid "${f}" has not been mounted`), D(te.items.some(($e) => $e.id === F), `Grid "${f}" no longer contains a ${G} with id "${F}"; ${G} ids are ${k(te.items.map(($e) => $e.id))}`), mt({
|
|
2196
|
+
axisId: j,
|
|
2197
|
+
itemId: F
|
|
2198
|
+
});
|
|
2199
|
+
};
|
|
2200
|
+
return {
|
|
2201
|
+
collapse: () => U().collapse(),
|
|
2202
|
+
expand: () => U().expand(),
|
|
2203
|
+
getSize: () => U().getSize(),
|
|
2204
|
+
isCollapsed: () => U().isCollapsed(),
|
|
2205
|
+
resize: (te) => U().resize(te)
|
|
2206
|
+
};
|
|
2207
|
+
};
|
|
2208
|
+
return {
|
|
2209
|
+
getLayout: L,
|
|
2210
|
+
getTrackById: (G, F) => {
|
|
2211
|
+
const j = G === "column" ? h : g;
|
|
2212
|
+
const U = `${F}`;
|
|
2213
|
+
return D(j.some((te) => te.id === U), `Grid "${f}" does not contain a ${G} with id "${U}"; ${G} ids are ${k(j.map((te) => te.id))}`), _(G, U);
|
|
2214
|
+
},
|
|
2215
|
+
getTrackByIndex: (G, F) => {
|
|
2216
|
+
const j = G === "column" ? h : g;
|
|
2217
|
+
const U = Number.isInteger(F) ? j[F] : void 0;
|
|
2218
|
+
return D(U, `Grid "${f}" does not contain a ${G} at index ${F}; it has ${j.length} ${G}s`), _(G, U.id);
|
|
2219
|
+
},
|
|
2220
|
+
setLayout: (G) => (Re.forEach((F) => {
|
|
2221
|
+
const j = G[F === "column" ? "columns" : "rows"];
|
|
2222
|
+
const U = S(F);
|
|
2223
|
+
j && Me(U) && Ge({ axisId: U }).setLayout(j);
|
|
2224
|
+
}), L())
|
|
2225
|
+
};
|
|
2226
|
+
}, [
|
|
2227
|
+
h,
|
|
2228
|
+
S,
|
|
2229
|
+
f,
|
|
2230
|
+
g
|
|
2231
|
+
]);
|
|
2232
|
+
const Z = () => Re.map((L) => {
|
|
2233
|
+
const k = ae(S(L));
|
|
2234
|
+
const _ = I(L);
|
|
2235
|
+
return (k && !k.defaultLayoutDeferred ? _.map((F) => `minmax(0, ${k.layout[F.id] ?? 1}fr)`) : no(_, o?.[L === "column" ? "columns" : "rows"])).join(O[L] ? " auto " : " ");
|
|
2236
|
+
}).join("|"), Se = useCallback((L) => {
|
|
2237
|
+
const k = Re.map((_) => _e(S(_), L));
|
|
2238
|
+
return () => k.forEach((_) => _());
|
|
2239
|
+
}, [S]), [Ie, ve] = useSyncExternalStore(Se, Z, Z).split("|");
|
|
2240
|
+
return /* @__PURE__ */ jsx(jt.Provider, {
|
|
2241
|
+
value: J,
|
|
2242
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
2243
|
+
...m,
|
|
2244
|
+
className: t,
|
|
2245
|
+
"data-grid": !0,
|
|
2246
|
+
"data-testid": f,
|
|
2247
|
+
id: f,
|
|
2248
|
+
ref: b,
|
|
2249
|
+
style: {
|
|
2250
|
+
height: "100%",
|
|
2251
|
+
width: "100%",
|
|
2252
|
+
overflow: "hidden",
|
|
2253
|
+
...y,
|
|
2254
|
+
display: "grid",
|
|
2255
|
+
gridTemplateColumns: Ie,
|
|
2256
|
+
gridTemplateRows: ve,
|
|
2257
|
+
touchAction: "none"
|
|
2258
|
+
},
|
|
2259
|
+
children: /* @__PURE__ */ jsx(pt.Provider, {
|
|
2260
|
+
value: null,
|
|
2261
|
+
children: e
|
|
2262
|
+
})
|
|
2263
|
+
})
|
|
2264
|
+
});
|
|
2265
|
+
}
|
|
2266
|
+
to.displayName = "Grid";
|
|
2267
|
+
function _t(e, t) {
|
|
2268
|
+
const n = JSON.stringify(e);
|
|
2269
|
+
return useMemo(() => {
|
|
2270
|
+
const o = typeof e == "number" ? Array.from({ length: e }, (r, i) => ({ id: `${i}` })) : e.map((r, i) => ({
|
|
2271
|
+
...r,
|
|
2272
|
+
id: `${r.id ?? i}`
|
|
2273
|
+
}));
|
|
2274
|
+
return D(o.length > 0, `Grid must have at least one track; "${t}" is ${n}`), o;
|
|
2275
|
+
}, [n]);
|
|
2276
|
+
}
|
|
2277
|
+
function fn(e, t) {
|
|
2278
|
+
Children.forEach(e, (n) => {
|
|
2279
|
+
if (isValidElement(n)) if (n.type === dn) {
|
|
2280
|
+
const { type: o } = n.props;
|
|
2281
|
+
o === "column" ? t.column = !0 : o === "row" && (t.row = !0);
|
|
2282
|
+
} else typeof n.type == "symbol" && n.props !== null && typeof n.props == "object" && "children" in n.props && fn(n.props.children, t);
|
|
2283
|
+
});
|
|
2284
|
+
}
|
|
2285
|
+
function no(e, t) {
|
|
2286
|
+
if (t) return e.map((i) => `minmax(0, ${t[i.id] ?? 1}fr)`);
|
|
2287
|
+
const n = e.map((i) => i.defaultSize === void 0 ? void 0 : Wt(i.defaultSize));
|
|
2288
|
+
let o = 100;
|
|
2289
|
+
let r = 0;
|
|
2290
|
+
return n.forEach((i) => {
|
|
2291
|
+
i === void 0 ? r++ : i[1] === "%" && (o -= i[0]);
|
|
2292
|
+
}), n.map((i) => {
|
|
2293
|
+
if (i === void 0) return `minmax(0, ${Math.max(0, o) / Math.max(1, r)}fr)`;
|
|
2294
|
+
const [s, l] = i;
|
|
2295
|
+
return l === "%" ? `minmax(0, ${s}fr)` : `${s}${l}`;
|
|
2296
|
+
});
|
|
2297
|
+
}
|
|
2298
|
+
function oo({ cells: e, separatorPlacements: t, trackCounts: n }) {
|
|
2299
|
+
const o = [];
|
|
2300
|
+
for (const l of e) Re.forEach((a) => {
|
|
2301
|
+
const [c, u] = a === "column" ? [l.column, l.columnSpan] : [l.row, l.rowSpan], d = n[a];
|
|
2302
|
+
(!Number.isInteger(c) || !Number.isInteger(u) || c < 0 || u < 1 || c + u > d) && o.push(`Invalid Cell ${a} placement (${a}: ${c}, ${a}Span: ${u}); Grid has ${d} ${a}s`);
|
|
2303
|
+
});
|
|
2304
|
+
const r = ({ axis: l, crossSpan: a, crossStart: c, disabled: u, index: d }) => {
|
|
2305
|
+
const p = l === "column" ? "row" : "column";
|
|
2306
|
+
let y = `type="${l}" ${l}={${d}}`;
|
|
2307
|
+
return (c !== 0 || a !== void 0) && (y += ` ${p}={${c}}`), a !== void 0 && (y += ` ${p}Span={${a}}`), u && (y += " disabled"), `<Gridline ${y} />`;
|
|
2308
|
+
};
|
|
2309
|
+
const i = Array.from(t.values()).filter((l) => {
|
|
2310
|
+
const { axis: a, crossSpan: c, crossStart: u, index: d } = l, p = a === "column" ? "row" : "column", y = n[a], m = n[p];
|
|
2311
|
+
let f = !0;
|
|
2312
|
+
return at(d, y) || (o.push(`Invalid ${a} Gridline ${a} (${d}); must be between 1 and ${y - 1}`), f = !1), !Number.isInteger(u) || u < 0 || u >= m ? (o.push(`Invalid ${a} Gridline ${p} (${u}); must be between 0 and ${m - 1}`), f = !1) : c !== void 0 && (!Number.isInteger(c) || c < 1 || u + c > m) && (o.push(`Invalid ${a} Gridline ${p}Span (${c}); Grid has ${m} ${p}s`), f = !1), f;
|
|
2313
|
+
});
|
|
2314
|
+
const s = (l) => {
|
|
2315
|
+
const a = n[l.axis === "column" ? "row" : "column"];
|
|
2316
|
+
return [l.crossStart, l.crossSpan === void 0 ? a : l.crossStart + l.crossSpan];
|
|
2317
|
+
};
|
|
2318
|
+
return i.forEach((l, a) => {
|
|
2319
|
+
const { axis: c, index: u } = l, [d, p] = s(l);
|
|
2320
|
+
for (const y of e) {
|
|
2321
|
+
const [m, f, S, h] = c === "column" ? [
|
|
2322
|
+
y.column,
|
|
2323
|
+
y.columnSpan,
|
|
2324
|
+
y.row,
|
|
2325
|
+
y.rowSpan
|
|
2326
|
+
] : [
|
|
2327
|
+
y.row,
|
|
2328
|
+
y.rowSpan,
|
|
2329
|
+
y.column,
|
|
2330
|
+
y.columnSpan
|
|
2331
|
+
];
|
|
2332
|
+
if (m < u && u < m + f && S < p && d < S + h) {
|
|
2333
|
+
const g = c === "column" ? "row" : "column";
|
|
2334
|
+
o.push(`${r(l)} overlaps a Cell that spans across it (${c}: ${m}, ${c}Span: ${f}, ${g}: ${S}, ${g}Span: ${h}); use the ${g} and ${g}Span props to render gridlines beside the Cell instead`);
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2337
|
+
for (const y of i.slice(a + 1)) if (y.axis === c && y.index === u) {
|
|
2338
|
+
const [m, f] = s(y);
|
|
2339
|
+
m < p && d < f && o.push(`${r(l)} overlaps ${r(y)}`);
|
|
2340
|
+
}
|
|
2341
|
+
}), o;
|
|
2342
|
+
}
|
|
2343
|
+
function Ft(e, t) {
|
|
2344
|
+
return ie(e.columns, t.columns) && ie(e.rows, t.rows);
|
|
2345
|
+
}
|
|
2346
|
+
function io(e) {
|
|
2347
|
+
for (let t = 1; t < e.length; t++) if (ct(e[t - 1], e[t]) > 0) return !1;
|
|
2348
|
+
return !0;
|
|
2349
|
+
}
|
|
2350
|
+
function so({ separator: e }) {
|
|
2351
|
+
const { element: t } = e, n = useRef(null);
|
|
2352
|
+
return ne(() => {
|
|
2353
|
+
const o = t.cloneNode(!0);
|
|
2354
|
+
const r = [t, ...t.querySelectorAll("*")];
|
|
2355
|
+
const i = [o, ...o.querySelectorAll("*")];
|
|
2356
|
+
const s = t.ownerDocument.defaultView;
|
|
2357
|
+
return r.forEach((l, a) => {
|
|
2358
|
+
const c = i[a];
|
|
2359
|
+
if (c instanceof s.HTMLElement || c instanceof s.SVGElement) {
|
|
2360
|
+
const u = s.getComputedStyle(l);
|
|
2361
|
+
for (let d = 0; d < u.length; d++) {
|
|
2362
|
+
const p = u.item(d);
|
|
2363
|
+
c.style.setProperty(p, u.getPropertyValue(p));
|
|
2364
|
+
}
|
|
2365
|
+
}
|
|
2366
|
+
c.removeAttribute("data-testid"), c.removeAttribute("id");
|
|
2367
|
+
}), Object.assign(o.style, {
|
|
2368
|
+
boxSizing: "border-box",
|
|
2369
|
+
height: "100%",
|
|
2370
|
+
margin: "0",
|
|
2371
|
+
position: "static",
|
|
2372
|
+
transform: "none",
|
|
2373
|
+
width: "100%"
|
|
2374
|
+
}), n.current.appendChild(o), () => o.remove();
|
|
2375
|
+
}, [t]), /* @__PURE__ */ jsx("div", {
|
|
2376
|
+
ref: n,
|
|
2377
|
+
style: {
|
|
2378
|
+
height: "100%",
|
|
2379
|
+
opacity: .65,
|
|
2380
|
+
pointerEvents: "none",
|
|
2381
|
+
width: "100%"
|
|
2382
|
+
}
|
|
2383
|
+
});
|
|
2384
|
+
}
|
|
2385
|
+
function Qe() {
|
|
2386
|
+
const e = useContext(pt);
|
|
2387
|
+
return D(e, "Group Context not found; did you render a Panel or Separator outside of a Group?"), e;
|
|
2388
|
+
}
|
|
2389
|
+
function mn(e) {
|
|
2390
|
+
const { registerOverlay: t } = Qe(), n = useRef(e);
|
|
2391
|
+
sn(n.current, e) || (n.current = e);
|
|
2392
|
+
const o = n.current;
|
|
2393
|
+
return ne(() => t(o), [t, o]), null;
|
|
2394
|
+
}
|
|
2395
|
+
mn.displayName = "SeparatorOverlay";
|
|
2396
|
+
function ao({ active: e, orientation: t, style: n, ...o }) {
|
|
2397
|
+
let r;
|
|
2398
|
+
switch (t) {
|
|
2399
|
+
case "horizontal":
|
|
2400
|
+
r = {
|
|
2401
|
+
height: "100%",
|
|
2402
|
+
minWidth: "1px"
|
|
2403
|
+
};
|
|
2404
|
+
break;
|
|
2405
|
+
case "vertical": r = {
|
|
2406
|
+
minHeight: "1px",
|
|
2407
|
+
width: "100%"
|
|
2408
|
+
};
|
|
2409
|
+
}
|
|
2410
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2411
|
+
...o,
|
|
2412
|
+
"data-separator-overlay": e ? "active" : "inactive",
|
|
2413
|
+
style: {
|
|
2414
|
+
...r,
|
|
2415
|
+
...n,
|
|
2416
|
+
flexShrink: 0,
|
|
2417
|
+
pointerEvents: "none"
|
|
2418
|
+
}
|
|
2419
|
+
});
|
|
2420
|
+
}
|
|
2421
|
+
function lo({ overlay: e, preview: t }) {
|
|
2422
|
+
const { axis: n, offset: o, rect: r, separator: i } = t, s = n.orientation === "horizontal";
|
|
2423
|
+
let l = i?.preview;
|
|
2424
|
+
let a = e;
|
|
2425
|
+
return isValidElement(l) && l.type === mn && (a = l.props, l = void 0), l ?? (a ? l = /* @__PURE__ */ jsx(ao, {
|
|
2426
|
+
...a,
|
|
2427
|
+
active: t.active,
|
|
2428
|
+
orientation: n.orientation
|
|
2429
|
+
}) : i && (l = /* @__PURE__ */ jsx(so, { separator: i }))), /* @__PURE__ */ jsx("div", {
|
|
2430
|
+
"aria-hidden": "true",
|
|
2431
|
+
"data-resize-preview": !0,
|
|
2432
|
+
inert: !0,
|
|
2433
|
+
style: {
|
|
2434
|
+
height: r.height,
|
|
2435
|
+
left: r.left,
|
|
2436
|
+
pointerEvents: "none",
|
|
2437
|
+
position: "absolute",
|
|
2438
|
+
top: r.top,
|
|
2439
|
+
transform: s ? `translateX(${o}px)` : `translateY(${o}px)`,
|
|
2440
|
+
width: r.width
|
|
2441
|
+
},
|
|
2442
|
+
children: l
|
|
2443
|
+
});
|
|
2444
|
+
}
|
|
2445
|
+
function co(e) {
|
|
2446
|
+
return Array.from(e).sort(ct);
|
|
2447
|
+
}
|
|
2448
|
+
function uo(e, t) {
|
|
2449
|
+
const n = useRef({
|
|
2450
|
+
getLayout: () => ({}),
|
|
2451
|
+
setLayout: Mn
|
|
2452
|
+
});
|
|
2453
|
+
useImperativeHandle(t, () => n.current, []), ne(() => {
|
|
2454
|
+
Object.assign(n.current, Ge({ axisId: e }));
|
|
2455
|
+
});
|
|
2456
|
+
}
|
|
2457
|
+
function fo({ groupId: e, resizePreviewMode: t }) {
|
|
2458
|
+
const [n, o] = useState([]), r = useRef(n);
|
|
2459
|
+
return ne(() => {
|
|
2460
|
+
const i = (l) => {
|
|
2461
|
+
const a = Me(e);
|
|
2462
|
+
const c = t === "separator" && l.state === "active" ? l.previews.filter((d) => d.axis === a && (d.active || !Y(d.offset, 0))) : [];
|
|
2463
|
+
const u = r.current;
|
|
2464
|
+
u.length === c.length && c.every((d, p) => d === u[p]) || (r.current = c, o(c));
|
|
2465
|
+
};
|
|
2466
|
+
if (t !== "separator") {
|
|
2467
|
+
i(se());
|
|
2468
|
+
return;
|
|
2469
|
+
}
|
|
2470
|
+
const s = Kt(({ next: l }) => i(l));
|
|
2471
|
+
return i(se()), s;
|
|
2472
|
+
}, [e, t]), n;
|
|
2473
|
+
}
|
|
2474
|
+
function mo({ children: e, className: t, defaultLayout: n, disableCursor: o, disabled: r, elementRef: i, groupRef: s, id: l, onLayoutChange: a, onLayoutChanged: c, orientation: u = "horizontal", resizePreviewMode: d = "panel", resizeTargetMinimumSize: p = {
|
|
2475
|
+
coarse: 20,
|
|
2476
|
+
fine: 10
|
|
2477
|
+
}, style: y, ...m }) {
|
|
2478
|
+
const f = useRef({
|
|
2479
|
+
onLayoutChange: {},
|
|
2480
|
+
onLayoutChanged: {}
|
|
2481
|
+
}), S = ge((z) => {
|
|
2482
|
+
ie(f.current.onLayoutChange, z) || (f.current.onLayoutChange = z, a?.(z));
|
|
2483
|
+
}), h = ge((z, M, q) => {
|
|
2484
|
+
ie(f.current.onLayoutChanged, z) || (f.current.onLayoutChanged = z, c?.(z, {
|
|
2485
|
+
isUserInteraction: M,
|
|
2486
|
+
requestedLayout: q
|
|
2487
|
+
}));
|
|
2488
|
+
}), g = Te(l), [I, x] = useState(), C = fo({
|
|
2489
|
+
groupId: g,
|
|
2490
|
+
resizePreviewMode: d
|
|
2491
|
+
}), A = useRef(null), [N, b] = cn(), w = useRef([]), v = useRef({
|
|
2492
|
+
lastExpandedPanelSizes: {},
|
|
2493
|
+
layouts: {},
|
|
2494
|
+
panels: [],
|
|
2495
|
+
separators: []
|
|
2496
|
+
}), T = qe(A, i);
|
|
2497
|
+
uo(g, s);
|
|
2498
|
+
const O = ge((z, M) => {
|
|
2499
|
+
const q = ae(z);
|
|
2500
|
+
if (q) return { flexGrow: q.layout[M] ?? 1 };
|
|
2501
|
+
if (n?.[M]) return { flexGrow: n?.[M] };
|
|
2502
|
+
});
|
|
2503
|
+
const R = Ze({
|
|
2504
|
+
defaultLayout: n,
|
|
2505
|
+
disableCursor: o,
|
|
2506
|
+
resizeTargetMinimumSize: p
|
|
2507
|
+
});
|
|
2508
|
+
const E = useMemo(() => ({
|
|
2509
|
+
get disableCursor() {
|
|
2510
|
+
return !!R.disableCursor;
|
|
2511
|
+
},
|
|
2512
|
+
getPanelStyles: O,
|
|
2513
|
+
id: g,
|
|
2514
|
+
orientation: u,
|
|
2515
|
+
registerPanel: (z) => {
|
|
2516
|
+
const M = v.current;
|
|
2517
|
+
return M.panels = Ne(u, [...M.panels, z]), b(), () => {
|
|
2518
|
+
M.panels = M.panels.filter((q) => q !== z), b();
|
|
2519
|
+
};
|
|
2520
|
+
},
|
|
2521
|
+
registerOverlay: (z) => (x(z), () => {
|
|
2522
|
+
x(void 0);
|
|
2523
|
+
}),
|
|
2524
|
+
registerSeparator: (z) => {
|
|
2525
|
+
const M = v.current;
|
|
2526
|
+
return M.separators = Ne(u, [...M.separators, z]), b(), () => {
|
|
2527
|
+
M.separators = M.separators.filter((q) => q !== z), b();
|
|
2528
|
+
};
|
|
2529
|
+
},
|
|
2530
|
+
updatePanelProps: (z, { disabled: M }) => {
|
|
2531
|
+
const J = v.current.panels.find((Se) => Se.id === z);
|
|
2532
|
+
J && (J.constraintProps.disabled = M);
|
|
2533
|
+
const H = Me(g);
|
|
2534
|
+
const Z = ae(g);
|
|
2535
|
+
H && Z && fe(H, {
|
|
2536
|
+
...Z,
|
|
2537
|
+
derivedItemConstraints: it(H)
|
|
2538
|
+
});
|
|
2539
|
+
},
|
|
2540
|
+
updateSeparatorProps: (z, { disabled: M, disableDoubleClick: q }) => {
|
|
2541
|
+
const H = v.current.separators.find((Z) => Z.id === z);
|
|
2542
|
+
H && (H.disabled = M, H.disableDoubleClick = q);
|
|
2543
|
+
}
|
|
2544
|
+
}), [
|
|
2545
|
+
O,
|
|
2546
|
+
g,
|
|
2547
|
+
b,
|
|
2548
|
+
u,
|
|
2549
|
+
R
|
|
2550
|
+
]);
|
|
2551
|
+
const P = useRef(null);
|
|
2552
|
+
return ne(() => {
|
|
2553
|
+
const z = A.current;
|
|
2554
|
+
if (z === null) return;
|
|
2555
|
+
const M = v.current;
|
|
2556
|
+
M.panels = Ne(u, M.panels), M.separators = Ne(u, M.separators), w.current = co([...M.panels.map(({ element: L }) => L), ...M.separators.map(({ element: L }) => L)]);
|
|
2557
|
+
let q;
|
|
2558
|
+
if (R.defaultLayout !== void 0 && Object.keys(R.defaultLayout).length === M.panels.length) {
|
|
2559
|
+
q = {};
|
|
2560
|
+
for (const L of M.panels) {
|
|
2561
|
+
const k = R.defaultLayout[L.id];
|
|
2562
|
+
k !== void 0 && (q[L.id] = k);
|
|
2563
|
+
}
|
|
2564
|
+
}
|
|
2565
|
+
const J = {
|
|
2566
|
+
disabled: !!r,
|
|
2567
|
+
element: z,
|
|
2568
|
+
id: g,
|
|
2569
|
+
mutableState: {
|
|
2570
|
+
defaultLayout: q,
|
|
2571
|
+
disableCursor: !!R.disableCursor,
|
|
2572
|
+
expandedItemSizes: v.current.lastExpandedPanelSizes,
|
|
2573
|
+
layouts: v.current.layouts
|
|
2574
|
+
},
|
|
2575
|
+
orientation: u,
|
|
2576
|
+
items: M.panels,
|
|
2577
|
+
resizePreviewMode: d,
|
|
2578
|
+
get resizeTargetMinimumSize() {
|
|
2579
|
+
return R.resizeTargetMinimumSize;
|
|
2580
|
+
},
|
|
2581
|
+
separators: M.separators
|
|
2582
|
+
};
|
|
2583
|
+
P.current = J;
|
|
2584
|
+
const H = an(J), { defaultLayoutDeferred: Z, derivedItemConstraints: Se, layout: ze, requestedLayout: Ie } = ae(J.id, !0);
|
|
2585
|
+
!Z && Se.length > 0 && (S(ze), h(ze, !1, Ie));
|
|
2586
|
+
const ve = _e(g, (L) => {
|
|
2587
|
+
const { defaultLayoutDeferred: k, derivedItemConstraints: _, layout: G, requestedLayout: F } = L.next;
|
|
2588
|
+
if (k || _.length === 0) return;
|
|
2589
|
+
ln({
|
|
2590
|
+
derivedItemConstraints: _,
|
|
2591
|
+
axis: J,
|
|
2592
|
+
layout: G,
|
|
2593
|
+
prevLayout: L.prev?.layout,
|
|
2594
|
+
requestedLayout: F
|
|
2595
|
+
});
|
|
2596
|
+
const j = se();
|
|
2597
|
+
const U = j.state !== "active" || !j.hitRegions.some((te) => te.axis === J);
|
|
2598
|
+
S(G), U && h(G, L.isUserInteraction, F);
|
|
2599
|
+
});
|
|
2600
|
+
return () => {
|
|
2601
|
+
P.current = null, H(), ve();
|
|
2602
|
+
};
|
|
2603
|
+
}, [
|
|
2604
|
+
r,
|
|
2605
|
+
g,
|
|
2606
|
+
h,
|
|
2607
|
+
S,
|
|
2608
|
+
u,
|
|
2609
|
+
N,
|
|
2610
|
+
d,
|
|
2611
|
+
R
|
|
2612
|
+
]), ne(() => {
|
|
2613
|
+
io(w.current) || b();
|
|
2614
|
+
}), useEffect(() => {
|
|
2615
|
+
const z = P.current;
|
|
2616
|
+
z && (z.mutableState.defaultLayout = n, z.mutableState.disableCursor = !!o);
|
|
2617
|
+
}), /* @__PURE__ */ jsx(pt.Provider, {
|
|
2618
|
+
value: E,
|
|
2619
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
2620
|
+
...m,
|
|
2621
|
+
className: t,
|
|
2622
|
+
"data-group": !0,
|
|
2623
|
+
"data-testid": g,
|
|
2624
|
+
id: g,
|
|
2625
|
+
ref: T,
|
|
2626
|
+
style: {
|
|
2627
|
+
height: "100%",
|
|
2628
|
+
width: "100%",
|
|
2629
|
+
overflow: "hidden",
|
|
2630
|
+
position: d === "separator" ? "relative" : void 0,
|
|
2631
|
+
...y,
|
|
2632
|
+
display: "flex",
|
|
2633
|
+
flexDirection: u === "horizontal" ? "row" : "column",
|
|
2634
|
+
flexWrap: "nowrap",
|
|
2635
|
+
touchAction: u === "horizontal" ? "pan-y" : "pan-x"
|
|
2636
|
+
},
|
|
2637
|
+
children: [e, C.map((z) => /* @__PURE__ */ jsx(lo, {
|
|
2638
|
+
overlay: I,
|
|
2639
|
+
preview: z
|
|
2640
|
+
}, z.key))]
|
|
2641
|
+
})
|
|
2642
|
+
});
|
|
2643
|
+
}
|
|
2644
|
+
mo.displayName = "Group";
|
|
2645
|
+
function go(e, t) {
|
|
2646
|
+
const { id: n } = Qe(), o = useRef({
|
|
2647
|
+
collapse: tt,
|
|
2648
|
+
expand: tt,
|
|
2649
|
+
getSize: () => ({
|
|
2650
|
+
asPercentage: 0,
|
|
2651
|
+
inPixels: 0
|
|
2652
|
+
}),
|
|
2653
|
+
isCollapsed: () => !1,
|
|
2654
|
+
resize: tt
|
|
2655
|
+
});
|
|
2656
|
+
useImperativeHandle(t, () => o.current, []), ne(() => {
|
|
2657
|
+
Object.assign(o.current, mt({
|
|
2658
|
+
axisId: n,
|
|
2659
|
+
itemId: e
|
|
2660
|
+
}));
|
|
2661
|
+
});
|
|
2662
|
+
}
|
|
2663
|
+
function yo({ children: e, className: t, collapsedSize: n = "0%", collapsedThreshold: o, collapsible: r = !1, defaultSize: i, disabled: s, elementRef: l, groupResizeBehavior: a = "preserve-relative-size", id: c, maxSize: u = "100%", minSize: d = "0%", onResize: p, panelRef: y, style: m, ...f }) {
|
|
2664
|
+
const S = !!c, h = Te(c), g = Ze({ disabled: s }), I = useRef(null), x = qe(I, l), { getPanelStyles: C, id: A, orientation: N, registerPanel: b, updatePanelProps: w } = Qe(), v = p !== null, T = ge((P, z, M) => {
|
|
2665
|
+
p?.(P, c, M);
|
|
2666
|
+
});
|
|
2667
|
+
ne(() => {
|
|
2668
|
+
const P = I.current;
|
|
2669
|
+
if (P !== null) {
|
|
2670
|
+
const z = {
|
|
2671
|
+
element: P,
|
|
2672
|
+
id: h,
|
|
2673
|
+
idIsStable: S,
|
|
2674
|
+
mutableValues: {
|
|
2675
|
+
expandToSize: void 0,
|
|
2676
|
+
prevSize: void 0
|
|
2677
|
+
},
|
|
2678
|
+
onResize: v ? T : void 0,
|
|
2679
|
+
constraintProps: {
|
|
2680
|
+
groupResizeBehavior: a,
|
|
2681
|
+
collapsedSize: n,
|
|
2682
|
+
collapsedThreshold: o,
|
|
2683
|
+
collapsible: r,
|
|
2684
|
+
defaultSize: i,
|
|
2685
|
+
disabled: g.disabled,
|
|
2686
|
+
maxSize: u,
|
|
2687
|
+
minSize: d
|
|
2688
|
+
}
|
|
2689
|
+
};
|
|
2690
|
+
return b(z);
|
|
2691
|
+
}
|
|
2692
|
+
}, [
|
|
2693
|
+
a,
|
|
2694
|
+
n,
|
|
2695
|
+
o,
|
|
2696
|
+
r,
|
|
2697
|
+
i,
|
|
2698
|
+
v,
|
|
2699
|
+
h,
|
|
2700
|
+
S,
|
|
2701
|
+
u,
|
|
2702
|
+
d,
|
|
2703
|
+
T,
|
|
2704
|
+
b,
|
|
2705
|
+
g
|
|
2706
|
+
]), useEffect(() => {
|
|
2707
|
+
w(h, { disabled: s });
|
|
2708
|
+
}, [
|
|
2709
|
+
s,
|
|
2710
|
+
h,
|
|
2711
|
+
w
|
|
2712
|
+
]), go(h, y);
|
|
2713
|
+
const O = () => {
|
|
2714
|
+
const P = C(A, h);
|
|
2715
|
+
if (P) return JSON.stringify(P);
|
|
2716
|
+
};
|
|
2717
|
+
const R = useSyncExternalStore((P) => _e(A, P), O, O);
|
|
2718
|
+
let E;
|
|
2719
|
+
return R ? E = JSON.parse(R) : i !== void 0 ? E = {
|
|
2720
|
+
flexGrow: void 0,
|
|
2721
|
+
flexShrink: void 0,
|
|
2722
|
+
flexBasis: i
|
|
2723
|
+
} : E = { flexGrow: 1 }, /* @__PURE__ */ jsx("div", {
|
|
2724
|
+
...f,
|
|
2725
|
+
"data-disabled": s || void 0,
|
|
2726
|
+
"data-panel": !0,
|
|
2727
|
+
"data-testid": h,
|
|
2728
|
+
id: h,
|
|
2729
|
+
ref: x,
|
|
2730
|
+
style: {
|
|
2731
|
+
...So,
|
|
2732
|
+
display: "flex",
|
|
2733
|
+
flexBasis: 0,
|
|
2734
|
+
flexShrink: 1,
|
|
2735
|
+
overflow: "visible",
|
|
2736
|
+
...E
|
|
2737
|
+
},
|
|
2738
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
2739
|
+
className: t,
|
|
2740
|
+
style: {
|
|
2741
|
+
maxHeight: "100%",
|
|
2742
|
+
maxWidth: "100%",
|
|
2743
|
+
flexGrow: 1,
|
|
2744
|
+
overflow: "auto",
|
|
2745
|
+
...m,
|
|
2746
|
+
touchAction: N === "horizontal" ? "pan-y" : "pan-x"
|
|
2747
|
+
},
|
|
2748
|
+
children: e
|
|
2749
|
+
})
|
|
2750
|
+
});
|
|
2751
|
+
}
|
|
2752
|
+
yo.displayName = "Panel";
|
|
2753
|
+
var So = {
|
|
2754
|
+
minHeight: 0,
|
|
2755
|
+
maxHeight: "100%",
|
|
2756
|
+
height: "auto",
|
|
2757
|
+
minWidth: 0,
|
|
2758
|
+
maxWidth: "100%",
|
|
2759
|
+
width: "auto",
|
|
2760
|
+
border: "none",
|
|
2761
|
+
borderWidth: 0,
|
|
2762
|
+
padding: 0,
|
|
2763
|
+
margin: 0
|
|
2764
|
+
};
|
|
2765
|
+
var vo = { flexBasis: "auto" };
|
|
2766
|
+
var bo = {
|
|
2767
|
+
flexGrow: 0,
|
|
2768
|
+
flexShrink: 0
|
|
2769
|
+
};
|
|
2770
|
+
function xo({ children: e, className: t, disabled: n, disableDoubleClick: o, elementRef: r, id: i, preview: s, style: l, ...a }) {
|
|
2771
|
+
const c = Te(i), { disableCursor: u, id: d, orientation: p, registerSeparator: y, updateSeparatorProps: m } = Qe();
|
|
2772
|
+
return /* @__PURE__ */ jsx(un, {
|
|
2773
|
+
attributes: a,
|
|
2774
|
+
axisId: d,
|
|
2775
|
+
axisOrientation: p,
|
|
2776
|
+
className: t,
|
|
2777
|
+
disableCursor: u,
|
|
2778
|
+
disabled: n,
|
|
2779
|
+
disableDoubleClick: o,
|
|
2780
|
+
elementRef: r,
|
|
2781
|
+
id: c,
|
|
2782
|
+
preview: s,
|
|
2783
|
+
registerSeparator: y,
|
|
2784
|
+
requiredStyle: bo,
|
|
2785
|
+
style: l,
|
|
2786
|
+
styleDefaults: vo,
|
|
2787
|
+
updateSeparatorProps: m,
|
|
2788
|
+
children: e
|
|
2789
|
+
});
|
|
2790
|
+
}
|
|
2791
|
+
xo.displayName = "Separator";
|
|
2792
|
+
export { xo as n, yo as r, mo as t };
|