lizaui 12.0.21 → 12.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/autocomplete/index.cjs.js +1 -1
- package/dist/autocomplete/index.cjs.js.map +1 -1
- package/dist/autocomplete/index.es.js +1 -1
- package/dist/autocomplete/index.es.js.map +1 -1
- package/dist/calendar/index.cjs.js.map +1 -1
- package/dist/calendar/index.es.js.map +1 -1
- package/dist/chunks/BaseCollection-CdxYWaH6.js.map +1 -1
- package/dist/chunks/BaseCollection-DxI8p0cP.js.map +1 -1
- package/dist/chunks/Button-Bumy9bze.js.map +1 -1
- package/dist/chunks/Button-CFYOfByw.js.map +1 -1
- package/dist/chunks/FocusScope-4TdD5fCA.js.map +1 -1
- package/dist/chunks/FocusScope-jSNMAXzg.js.map +1 -1
- package/dist/chunks/Hidden-BY45Dc0j.js.map +1 -1
- package/dist/chunks/Hidden-C55DpjMP.js.map +1 -1
- package/dist/chunks/I18nProvider-BUfkOEhQ.js.map +1 -1
- package/dist/chunks/I18nProvider-Coj9x7B8.js.map +1 -1
- package/dist/chunks/ProgressBar-542C1mif.js.map +1 -1
- package/dist/chunks/ProgressBar-BiKRsJ8m.js.map +1 -1
- package/dist/chunks/SharedElementTransition-BSCoaphV.js.map +1 -1
- package/dist/chunks/SharedElementTransition-CJVe1D_I.js.map +1 -1
- package/dist/chunks/VisuallyHidden-CTe1-RoI.js.map +1 -1
- package/dist/chunks/VisuallyHidden-DPJuOMsW.js.map +1 -1
- package/dist/chunks/chevron-right-Bfa8mqfk.js.map +1 -1
- package/dist/chunks/chevron-right-D57wjjUp.js.map +1 -1
- package/dist/chunks/chevron-up-D8XaBFJG.js.map +1 -1
- package/dist/chunks/chevron-up-Diak1VOI.js.map +1 -1
- package/dist/chunks/chevrons-up-down-BEtKEloL.js.map +1 -1
- package/dist/chunks/chevrons-up-down-Cu7ozFlE.js.map +1 -1
- package/dist/chunks/createLucideIcon-C6RDgWrQ.js.map +1 -1
- package/dist/chunks/createLucideIcon-DvjiV7vp.js.map +1 -1
- package/dist/chunks/filterDOMProps-DqJGvnmf.js.map +1 -1
- package/dist/chunks/filterDOMProps-JgzPXl3Q.js.map +1 -1
- package/dist/chunks/focusSafely-CKxVSn6H.js.map +1 -1
- package/dist/chunks/focusSafely-DfEgLKh6.js.map +1 -1
- package/dist/chunks/index-CULZAuw9.js.map +1 -1
- package/dist/chunks/index-DvmTR3H_.js.map +1 -1
- package/dist/chunks/mergeRefs-Y9oG13yB.js.map +1 -1
- package/dist/chunks/mergeRefs-t6d4XvXq.js.map +1 -1
- package/dist/chunks/number-CYgYWykt.js.map +1 -1
- package/dist/chunks/number-DDpsLN2d.js.map +1 -1
- package/dist/chunks/radio-group-BwXvYzSm.js.map +1 -1
- package/dist/chunks/radio-group-hO2beGF6.js.map +1 -1
- package/dist/chunks/scroll-area-TppWtXwO.js.map +1 -1
- package/dist/chunks/scroll-area-W95K6hNR.js.map +1 -1
- package/dist/chunks/{textarea-8fv2j5Lo.js → textarea-C-0g_4r4.js} +1119 -1002
- package/dist/chunks/textarea-C-0g_4r4.js.map +1 -0
- package/dist/chunks/{textarea-DNdGuFw8.js → textarea-DUJqX13u.js} +1120 -1003
- package/dist/chunks/textarea-DUJqX13u.js.map +1 -0
- package/dist/chunks/useFormReset-BYRGk5vb.js.map +1 -1
- package/dist/chunks/useFormReset-Bgv2ktIE.js.map +1 -1
- package/dist/chunks/{useHasTabbableChild-kl2T5gEX.js → useHasTabbableChild-3an_bW0u.js} +2 -2
- package/dist/chunks/useHasTabbableChild-3an_bW0u.js.map +1 -0
- package/dist/chunks/{useHasTabbableChild-CSJ0P5QT.js → useHasTabbableChild-PNwltE9y.js} +2 -2
- package/dist/chunks/useHasTabbableChild-PNwltE9y.js.map +1 -0
- package/dist/chunks/useHover-BHCSbkLb.js.map +1 -1
- package/dist/chunks/useHover-D9f9xyxz.js.map +1 -1
- package/dist/chunks/useLabel-CzhH-Tov.js.map +1 -1
- package/dist/chunks/useLabel-YLbDMN-c.js.map +1 -1
- package/dist/chunks/useLabels-BiXnWBSL.js.map +1 -1
- package/dist/chunks/useLabels-Bl0mJafM.js.map +1 -1
- package/dist/chunks/useMove-DeuS9PRx.js.map +1 -1
- package/dist/chunks/useMove-Xpbmb6OD.js.map +1 -1
- package/dist/chunks/usePress-Arf10jW0.js.map +1 -1
- package/dist/chunks/usePress-B1yQk_p8.js.map +1 -1
- package/dist/chunks/useProgressBar-BsO-Q5JP.js.map +1 -1
- package/dist/chunks/useProgressBar-d2k0k8r0.js.map +1 -1
- package/dist/chunks/useSlot-CFaaZeQE.js.map +1 -1
- package/dist/chunks/useSlot-TNtJf1z8.js.map +1 -1
- package/dist/chunks/utils-BCEhcDlv.js.map +1 -1
- package/dist/chunks/utils-DvHk9ofL.js.map +1 -1
- package/dist/components/ui/index.d.ts +0 -1
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/data-table/index.cjs.js +1 -1
- package/dist/data-table/index.cjs.js.map +1 -1
- package/dist/data-table/index.es.js +1 -1
- package/dist/data-table/index.es.js.map +1 -1
- package/dist/form-tabs/index.cjs.js.map +1 -1
- package/dist/form-tabs/index.es.js.map +1 -1
- package/dist/lizaui.css +9 -9
- package/dist/meter/index.cjs.js.map +1 -1
- package/dist/meter/index.es.js.map +1 -1
- package/dist/pagination/index.cjs.js +1 -1
- package/dist/pagination/index.es.js +1 -1
- package/dist/slider/index.cjs.js.map +1 -1
- package/dist/slider/index.es.js.map +1 -1
- package/dist/tabs/index.cjs.js +1 -1
- package/dist/tabs/index.cjs.js.map +1 -1
- package/dist/tabs/index.es.js +1 -1
- package/dist/tabs/index.es.js.map +1 -1
- package/dist/time-input/index.cjs.js +1 -1
- package/dist/time-input/index.es.js +1 -1
- package/dist/toggle-switch/index.cjs.js.map +1 -1
- package/dist/toggle-switch/index.es.js.map +1 -1
- package/dist/toolbar/index.cjs.js.map +1 -1
- package/dist/toolbar/index.es.js.map +1 -1
- package/dist/travel-calendar/index.cjs.js +1 -1
- package/dist/travel-calendar/index.es.js +1 -1
- package/dist/ui/index.cjs.js +94 -420
- package/dist/ui/index.cjs.js.map +1 -1
- package/dist/ui/index.es.js +96 -422
- package/dist/ui/index.es.js.map +1 -1
- package/package.json +31 -31
- package/dist/chunks/textarea-8fv2j5Lo.js.map +0 -1
- package/dist/chunks/textarea-DNdGuFw8.js.map +0 -1
- package/dist/chunks/useHasTabbableChild-CSJ0P5QT.js.map +0 -1
- package/dist/chunks/useHasTabbableChild-kl2T5gEX.js.map +0 -1
- package/dist/components/ui/tabs.d.ts +0 -8
- package/dist/components/ui/tabs.d.ts.map +0 -1
|
@@ -925,12 +925,12 @@ const Switch = (t0) => {
|
|
|
925
925
|
return t28;
|
|
926
926
|
};
|
|
927
927
|
Switch.displayName = "Switch";
|
|
928
|
-
function
|
|
928
|
+
function De(e) {
|
|
929
929
|
const t = React.useId();
|
|
930
930
|
return `${e ?? t}`;
|
|
931
931
|
}
|
|
932
932
|
const ne = typeof window < "u" ? React.useLayoutEffect : React.useEffect;
|
|
933
|
-
function
|
|
933
|
+
function ye(e) {
|
|
934
934
|
const t = React.useRef(e);
|
|
935
935
|
return ne(() => {
|
|
936
936
|
t.current = e;
|
|
@@ -939,8 +939,8 @@ function ge(e) {
|
|
|
939
939
|
[t]
|
|
940
940
|
);
|
|
941
941
|
}
|
|
942
|
-
function
|
|
943
|
-
return
|
|
942
|
+
function Ve(...e) {
|
|
943
|
+
return ye((t) => {
|
|
944
944
|
e.forEach((n) => {
|
|
945
945
|
if (n)
|
|
946
946
|
switch (typeof n) {
|
|
@@ -956,21 +956,21 @@ function qe(...e) {
|
|
|
956
956
|
});
|
|
957
957
|
});
|
|
958
958
|
}
|
|
959
|
-
function
|
|
959
|
+
function O(e, t = "Assertion error") {
|
|
960
960
|
if (!e)
|
|
961
961
|
throw Error(t);
|
|
962
962
|
}
|
|
963
963
|
React.createContext(null);
|
|
964
|
-
let
|
|
965
|
-
function
|
|
966
|
-
return
|
|
964
|
+
let Ye;
|
|
965
|
+
function kn() {
|
|
966
|
+
return Ye === void 0 && (typeof matchMedia == "function" ? Ye = !!matchMedia("(pointer:coarse)").matches : Ye = false), Ye;
|
|
967
967
|
}
|
|
968
|
-
function
|
|
968
|
+
function ct({
|
|
969
969
|
expandHitTargets: e,
|
|
970
970
|
axis: t,
|
|
971
971
|
rect: n
|
|
972
972
|
}) {
|
|
973
|
-
const o = e ?
|
|
973
|
+
const o = e ? kn() ? t.resizeTargetMinimumSize.coarse : t.resizeTargetMinimumSize.fine : 0;
|
|
974
974
|
if (n.width < o) {
|
|
975
975
|
const r = o - n.width;
|
|
976
976
|
n = new DOMRect(
|
|
@@ -991,7 +991,7 @@ function ot({
|
|
|
991
991
|
}
|
|
992
992
|
return n;
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function sn(e) {
|
|
995
995
|
switch (typeof e) {
|
|
996
996
|
case "number":
|
|
997
997
|
return [e, "px"];
|
|
@@ -1001,7 +1001,7 @@ function Wt(e) {
|
|
|
1001
1001
|
}
|
|
1002
1002
|
}
|
|
1003
1003
|
}
|
|
1004
|
-
class
|
|
1004
|
+
class an {
|
|
1005
1005
|
#e = {};
|
|
1006
1006
|
addListener(t, n) {
|
|
1007
1007
|
const o = this.#e[t];
|
|
@@ -1011,23 +1011,24 @@ class Yt {
|
|
|
1011
1011
|
}
|
|
1012
1012
|
emit(t, n) {
|
|
1013
1013
|
const o = this.#e[t];
|
|
1014
|
-
if (o !== void 0)
|
|
1015
|
-
if (o.length === 1)
|
|
1014
|
+
if (o !== void 0) {
|
|
1015
|
+
if (o.length === 1) {
|
|
1016
1016
|
o[0].call(null, n);
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
}
|
|
1017
|
+
return;
|
|
1018
|
+
}
|
|
1019
|
+
let r;
|
|
1020
|
+
const i = Array.from(o);
|
|
1021
|
+
for (let s = 0; s < i.length; s++) {
|
|
1022
|
+
const c = i[s];
|
|
1023
|
+
try {
|
|
1024
|
+
c.call(null, n);
|
|
1025
|
+
} catch (a) {
|
|
1026
|
+
r ??= { error: a };
|
|
1027
1027
|
}
|
|
1028
|
-
if (r)
|
|
1029
|
-
throw i;
|
|
1030
1028
|
}
|
|
1029
|
+
if (r)
|
|
1030
|
+
throw r.error;
|
|
1031
|
+
}
|
|
1031
1032
|
}
|
|
1032
1033
|
removeAllListeners() {
|
|
1033
1034
|
this.#e = {};
|
|
@@ -1044,16 +1045,16 @@ let V = {
|
|
|
1044
1045
|
cursorFlags: 0,
|
|
1045
1046
|
state: "inactive"
|
|
1046
1047
|
};
|
|
1047
|
-
const
|
|
1048
|
-
function
|
|
1048
|
+
const mt = new an();
|
|
1049
|
+
function ie() {
|
|
1049
1050
|
return V;
|
|
1050
1051
|
}
|
|
1051
|
-
function
|
|
1052
|
-
return
|
|
1052
|
+
function pt(e) {
|
|
1053
|
+
return mt.addListener("change", e);
|
|
1053
1054
|
}
|
|
1054
|
-
function
|
|
1055
|
+
function On(e, t = [], n, o = false) {
|
|
1055
1056
|
const r = V, i = { ...V };
|
|
1056
|
-
i.cursorFlags = e, i.state === "active" && (i.didPointerMove ||= o, i.previews = t, n && (i.previewLayoutMap = n)), V = i,
|
|
1057
|
+
i.cursorFlags = e, i.state === "active" && (i.didPointerMove ||= o, i.previews = t, n && (i.previewLayoutMap = n)), V = i, mt.emit("change", {
|
|
1057
1058
|
prev: r,
|
|
1058
1059
|
next: i
|
|
1059
1060
|
});
|
|
@@ -1062,12 +1063,12 @@ function de(e) {
|
|
|
1062
1063
|
const t = V;
|
|
1063
1064
|
V = e, t.state === "active" && e.state !== "active" && t.didPointerMove && t.hitRegions.forEach(({ separator: n }) => {
|
|
1064
1065
|
n && n.element.ownerDocument.activeElement === n.element && n.element.blur();
|
|
1065
|
-
}),
|
|
1066
|
+
}), mt.emit("change", {
|
|
1066
1067
|
prev: t,
|
|
1067
1068
|
next: e
|
|
1068
1069
|
});
|
|
1069
1070
|
}
|
|
1070
|
-
function
|
|
1071
|
+
function Nn(e) {
|
|
1071
1072
|
V.state !== "active" || !V.previews.some((t) => t.separator === e) || de({
|
|
1072
1073
|
...V,
|
|
1073
1074
|
previews: V.previews.map(
|
|
@@ -1075,35 +1076,33 @@ function Cn(e) {
|
|
|
1075
1076
|
)
|
|
1076
1077
|
});
|
|
1077
1078
|
}
|
|
1078
|
-
function
|
|
1079
|
+
function Gn(e) {
|
|
1079
1080
|
if (V.state === "inactive")
|
|
1080
|
-
return
|
|
1081
|
+
return;
|
|
1081
1082
|
const t = V.hitRegions.filter((o) => o.axis !== e), n = V.state === "active" && V.previews.some((o) => o.axis === e);
|
|
1082
|
-
if (t.length === V.hitRegions.length && !n)
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
de({ ...V, hitRegions: t });
|
|
1098
|
-
return true;
|
|
1083
|
+
if (!(t.length === V.hitRegions.length && !n))
|
|
1084
|
+
if (t.length === 0)
|
|
1085
|
+
de({ cursorFlags: 0, state: "inactive" });
|
|
1086
|
+
else if (V.state === "active") {
|
|
1087
|
+
const o = new Map(V.initialLayoutMap), r = new Map(V.previewLayoutMap);
|
|
1088
|
+
o.delete(e), r.delete(e), de({
|
|
1089
|
+
...V,
|
|
1090
|
+
cursorFlags: 0,
|
|
1091
|
+
hitRegions: t,
|
|
1092
|
+
initialLayoutMap: o,
|
|
1093
|
+
previewLayoutMap: r,
|
|
1094
|
+
previews: V.previews.filter((i) => i.axis !== e)
|
|
1095
|
+
});
|
|
1096
|
+
} else
|
|
1097
|
+
de({ ...V, hitRegions: t });
|
|
1099
1098
|
}
|
|
1100
|
-
const
|
|
1101
|
-
},
|
|
1102
|
-
let
|
|
1103
|
-
function
|
|
1104
|
-
return
|
|
1099
|
+
const Fn = (e) => e, st = () => {
|
|
1100
|
+
}, cn = 1, ln = 2, un = 4, dn = 8, Lt$1 = 3, Ct$1 = 12;
|
|
1101
|
+
let Xe;
|
|
1102
|
+
function Rt() {
|
|
1103
|
+
return Xe === void 0 && (Xe = false, typeof window < "u" && (window.navigator.userAgent.includes("Chrome") || window.navigator.userAgent.includes("Firefox")) && (Xe = true)), Xe;
|
|
1105
1104
|
}
|
|
1106
|
-
function
|
|
1105
|
+
function _n({
|
|
1107
1106
|
cursorFlags: e,
|
|
1108
1107
|
axes: t,
|
|
1109
1108
|
state: n
|
|
@@ -1129,13 +1128,13 @@ function En({
|
|
|
1129
1128
|
if (!(o === 0 && r === 0)) {
|
|
1130
1129
|
switch (n) {
|
|
1131
1130
|
case "active": {
|
|
1132
|
-
if (e &&
|
|
1133
|
-
const i = (e &
|
|
1131
|
+
if (e && Rt()) {
|
|
1132
|
+
const i = (e & cn) !== 0, s = (e & ln) !== 0, c = (e & un) !== 0, a = (e & dn) !== 0;
|
|
1134
1133
|
if (i)
|
|
1135
|
-
return
|
|
1134
|
+
return c ? "se-resize" : a ? "ne-resize" : "e-resize";
|
|
1136
1135
|
if (s)
|
|
1137
|
-
return
|
|
1138
|
-
if (
|
|
1136
|
+
return c ? "sw-resize" : a ? "nw-resize" : "w-resize";
|
|
1137
|
+
if (c)
|
|
1139
1138
|
return "s-resize";
|
|
1140
1139
|
if (a)
|
|
1141
1140
|
return "n-resize";
|
|
@@ -1143,23 +1142,23 @@ function En({
|
|
|
1143
1142
|
break;
|
|
1144
1143
|
}
|
|
1145
1144
|
}
|
|
1146
|
-
return
|
|
1145
|
+
return Rt() ? o > 0 && r > 0 ? "move" : o > 0 ? "ew-resize" : "ns-resize" : o > 0 && r > 0 ? "grab" : o > 0 ? "col-resize" : "row-resize";
|
|
1147
1146
|
}
|
|
1148
1147
|
}
|
|
1149
|
-
const
|
|
1150
|
-
function
|
|
1148
|
+
const Et$1 = /* @__PURE__ */ new WeakMap();
|
|
1149
|
+
function Mt$1(e) {
|
|
1151
1150
|
if (!e.defaultView || !e.adoptedStyleSheets)
|
|
1152
1151
|
return;
|
|
1153
|
-
let { prevStyle: t, styleSheet: n } =
|
|
1152
|
+
let { prevStyle: t, styleSheet: n } = Et$1.get(e) ?? {};
|
|
1154
1153
|
n === void 0 && (n = new e.defaultView.CSSStyleSheet(), e.adoptedStyleSheets && (Object.isExtensible(e.adoptedStyleSheets) ? e.adoptedStyleSheets.push(n) : e.adoptedStyleSheets = [
|
|
1155
1154
|
...e.adoptedStyleSheets,
|
|
1156
1155
|
n
|
|
1157
1156
|
]));
|
|
1158
|
-
|
|
1159
|
-
switch (o.state) {
|
|
1157
|
+
let o = ie();
|
|
1158
|
+
switch (o.state !== "inactive" && o.ownerDocument !== e && (o = { cursorFlags: 0, state: "inactive" }), o.state) {
|
|
1160
1159
|
case "active":
|
|
1161
1160
|
case "hover": {
|
|
1162
|
-
const r =
|
|
1161
|
+
const r = _n({
|
|
1163
1162
|
cursorFlags: o.cursorFlags,
|
|
1164
1163
|
axes: o.hitRegions.map((s) => s.axis),
|
|
1165
1164
|
state: o.state
|
|
@@ -1174,39 +1173,49 @@ function Ve(e) {
|
|
|
1174
1173
|
break;
|
|
1175
1174
|
}
|
|
1176
1175
|
}
|
|
1177
|
-
|
|
1176
|
+
Et$1.set(e, {
|
|
1178
1177
|
prevStyle: t,
|
|
1179
1178
|
styleSheet: n
|
|
1180
1179
|
});
|
|
1181
1180
|
}
|
|
1182
|
-
function
|
|
1181
|
+
function Pt$1(e) {
|
|
1182
|
+
return e.state === "inactive" ? void 0 : e.ownerDocument;
|
|
1183
|
+
}
|
|
1184
|
+
function Bn({
|
|
1185
|
+
next: e,
|
|
1186
|
+
prev: t
|
|
1187
|
+
}) {
|
|
1188
|
+
const n = Pt$1(t), o = Pt$1(e);
|
|
1189
|
+
n && n !== o && Mt$1(n), o && Mt$1(o);
|
|
1190
|
+
}
|
|
1191
|
+
function Te({
|
|
1183
1192
|
axis: e
|
|
1184
1193
|
}) {
|
|
1185
1194
|
const { layoutStrategy: t, orientation: n, items: o } = e;
|
|
1186
1195
|
return t ? t.calculateAvailableSize() : o.reduce((r, i) => (r += n === "horizontal" ? i.element.offsetWidth : i.element.offsetHeight, r), 0);
|
|
1187
1196
|
}
|
|
1188
|
-
function
|
|
1197
|
+
function ht$1(e, t) {
|
|
1189
1198
|
const n = e.compareDocumentPosition(t);
|
|
1190
1199
|
return n & Node.DOCUMENT_POSITION_DISCONNECTED ? 0 : n & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
1191
1200
|
}
|
|
1192
|
-
function
|
|
1201
|
+
function Ge(e, t) {
|
|
1193
1202
|
return Array.from(t).sort((n, o) => {
|
|
1194
|
-
const r = e === "horizontal" ?
|
|
1195
|
-
return r !== 0 ? r :
|
|
1203
|
+
const r = e === "horizontal" ? qn(n, o) : Hn(n, o);
|
|
1204
|
+
return r !== 0 ? r : ht$1(n.element, o.element);
|
|
1196
1205
|
});
|
|
1197
1206
|
}
|
|
1198
|
-
function
|
|
1207
|
+
function qn(e, t) {
|
|
1199
1208
|
const n = e.element.offsetLeft - t.element.offsetLeft;
|
|
1200
1209
|
return n !== 0 ? n : e.element.offsetWidth - t.element.offsetWidth;
|
|
1201
1210
|
}
|
|
1202
|
-
function
|
|
1211
|
+
function Hn(e, t) {
|
|
1203
1212
|
const n = e.element.offsetTop - t.element.offsetTop;
|
|
1204
1213
|
return n !== 0 ? n : e.element.offsetHeight - t.element.offsetHeight;
|
|
1205
1214
|
}
|
|
1206
|
-
function
|
|
1215
|
+
function lt(e) {
|
|
1207
1216
|
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.ELEMENT_NODE;
|
|
1208
1217
|
}
|
|
1209
|
-
function
|
|
1218
|
+
function fn(e, t) {
|
|
1210
1219
|
return {
|
|
1211
1220
|
x: e.x >= t.left && e.x <= t.right ? 0 : Math.min(
|
|
1212
1221
|
Math.abs(e.x - t.left),
|
|
@@ -1218,7 +1227,7 @@ function en(e, t) {
|
|
|
1218
1227
|
)
|
|
1219
1228
|
};
|
|
1220
1229
|
}
|
|
1221
|
-
function
|
|
1230
|
+
function Vn({
|
|
1222
1231
|
orientation: e,
|
|
1223
1232
|
rects: t,
|
|
1224
1233
|
targetRect: n
|
|
@@ -1229,12 +1238,12 @@ function Tn({
|
|
|
1229
1238
|
};
|
|
1230
1239
|
let r, i = Number.MAX_VALUE;
|
|
1231
1240
|
for (const s of t) {
|
|
1232
|
-
const { x:
|
|
1233
|
-
|
|
1241
|
+
const { x: c, y: a } = fn(o, s), u = e === "horizontal" ? c : a;
|
|
1242
|
+
u < i && (i = u, r = s);
|
|
1234
1243
|
}
|
|
1235
|
-
return
|
|
1244
|
+
return O(r, "No rect found"), r;
|
|
1236
1245
|
}
|
|
1237
|
-
function
|
|
1246
|
+
function gt({
|
|
1238
1247
|
expandHitTargets: e = true,
|
|
1239
1248
|
axis: t,
|
|
1240
1249
|
includeDisabled: n = false
|
|
@@ -1245,30 +1254,30 @@ function ut({
|
|
|
1245
1254
|
axis: t,
|
|
1246
1255
|
includeDisabled: n
|
|
1247
1256
|
});
|
|
1248
|
-
const { element: o, orientation: r, items: i, separators: s } = t,
|
|
1257
|
+
const { element: o, orientation: r, items: i, separators: s } = t, c = Ge(
|
|
1249
1258
|
r,
|
|
1250
|
-
Array.from(o.children).filter(
|
|
1259
|
+
Array.from(o.children).filter(lt).filter((h) => !h.hasAttribute("data-resize-preview")).map((h) => ({ element: h }))
|
|
1251
1260
|
).map(({ element: h }) => h), a = [];
|
|
1252
|
-
let
|
|
1261
|
+
let u = false, l = false, d = -1, g, p = -1, m = 0, f, y = [];
|
|
1253
1262
|
{
|
|
1254
1263
|
let h = -1;
|
|
1255
|
-
for (const
|
|
1256
|
-
|
|
1264
|
+
for (const S of c)
|
|
1265
|
+
S.hasAttribute("data-panel") && (h++, S.hasAttribute("data-disabled") || (m++, d === -1 && (d = h), p = h));
|
|
1257
1266
|
}
|
|
1258
1267
|
if (n || m > 1) {
|
|
1259
1268
|
let h = -1;
|
|
1260
|
-
for (const
|
|
1261
|
-
if (
|
|
1269
|
+
for (const S of c)
|
|
1270
|
+
if (S.hasAttribute("data-panel")) {
|
|
1262
1271
|
h++;
|
|
1263
|
-
const
|
|
1264
|
-
(x) => x.element ===
|
|
1272
|
+
const z = i.find(
|
|
1273
|
+
(x) => x.element === S
|
|
1265
1274
|
);
|
|
1266
|
-
if (
|
|
1275
|
+
if (z) {
|
|
1267
1276
|
if (f) {
|
|
1268
|
-
const x = f.element.getBoundingClientRect(),
|
|
1269
|
-
let
|
|
1270
|
-
if (
|
|
1271
|
-
const
|
|
1277
|
+
const x = f.element.getBoundingClientRect(), R = S.getBoundingClientRect();
|
|
1278
|
+
let N;
|
|
1279
|
+
if (l) {
|
|
1280
|
+
const $ = r === "horizontal" ? new DOMRect(
|
|
1272
1281
|
x.right,
|
|
1273
1282
|
x.top,
|
|
1274
1283
|
0,
|
|
@@ -1278,86 +1287,86 @@ function ut({
|
|
|
1278
1287
|
x.bottom,
|
|
1279
1288
|
x.width,
|
|
1280
1289
|
0
|
|
1281
|
-
), b = r === "horizontal" ? new DOMRect(
|
|
1282
|
-
switch (
|
|
1290
|
+
), b = r === "horizontal" ? new DOMRect(R.left, R.top, 0, R.height) : new DOMRect(R.left, R.top, R.width, 0);
|
|
1291
|
+
switch (y.length) {
|
|
1283
1292
|
case 0: {
|
|
1284
|
-
|
|
1285
|
-
|
|
1293
|
+
N = [
|
|
1294
|
+
$,
|
|
1286
1295
|
b
|
|
1287
1296
|
];
|
|
1288
1297
|
break;
|
|
1289
1298
|
}
|
|
1290
1299
|
case 1: {
|
|
1291
|
-
const w =
|
|
1300
|
+
const w = y[0], v = Vn({
|
|
1292
1301
|
orientation: r,
|
|
1293
|
-
rects: [x,
|
|
1302
|
+
rects: [x, R],
|
|
1294
1303
|
targetRect: w.element.getBoundingClientRect()
|
|
1295
1304
|
});
|
|
1296
|
-
|
|
1305
|
+
N = [
|
|
1297
1306
|
w,
|
|
1298
|
-
v === x ? b :
|
|
1307
|
+
v === x ? b : $
|
|
1299
1308
|
];
|
|
1300
1309
|
break;
|
|
1301
1310
|
}
|
|
1302
1311
|
default: {
|
|
1303
|
-
|
|
1312
|
+
N = y;
|
|
1304
1313
|
break;
|
|
1305
1314
|
}
|
|
1306
1315
|
}
|
|
1307
1316
|
} else
|
|
1308
|
-
|
|
1317
|
+
y.length ? N = y : N = [
|
|
1309
1318
|
r === "horizontal" ? new DOMRect(
|
|
1310
1319
|
x.right,
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1320
|
+
R.top,
|
|
1321
|
+
R.left - x.right,
|
|
1322
|
+
R.height
|
|
1314
1323
|
) : new DOMRect(
|
|
1315
|
-
|
|
1324
|
+
R.left,
|
|
1316
1325
|
x.bottom,
|
|
1317
|
-
|
|
1318
|
-
|
|
1326
|
+
R.width,
|
|
1327
|
+
R.top - x.bottom
|
|
1319
1328
|
)
|
|
1320
1329
|
];
|
|
1321
|
-
for (const
|
|
1322
|
-
const b =
|
|
1330
|
+
for (const $ of N) {
|
|
1331
|
+
const b = ct({
|
|
1323
1332
|
expandHitTargets: e,
|
|
1324
1333
|
axis: t,
|
|
1325
|
-
rect: "width" in
|
|
1326
|
-
}), w = h <= d || h >
|
|
1327
|
-
(n || !
|
|
1334
|
+
rect: "width" in $ ? $ : $.element.getBoundingClientRect()
|
|
1335
|
+
}), w = h <= d || h > p;
|
|
1336
|
+
(n || !u && !w) && (g ??= Te({ axis: t }), a.push({
|
|
1328
1337
|
axis: t,
|
|
1329
|
-
axisSize:
|
|
1330
|
-
items: [f,
|
|
1331
|
-
separator: "width" in
|
|
1338
|
+
axisSize: g,
|
|
1339
|
+
items: [f, z],
|
|
1340
|
+
separator: "width" in $ ? void 0 : $,
|
|
1332
1341
|
rect: b
|
|
1333
|
-
})),
|
|
1342
|
+
})), u = false;
|
|
1334
1343
|
}
|
|
1335
1344
|
}
|
|
1336
|
-
|
|
1345
|
+
l = false, f = z, y = [];
|
|
1337
1346
|
}
|
|
1338
|
-
} else if (
|
|
1339
|
-
|
|
1340
|
-
const
|
|
1341
|
-
(x) => x.element ===
|
|
1347
|
+
} else if (S.hasAttribute("data-separator")) {
|
|
1348
|
+
S.ariaDisabled !== null && (u = true);
|
|
1349
|
+
const z = s.find(
|
|
1350
|
+
(x) => x.element === S
|
|
1342
1351
|
);
|
|
1343
|
-
|
|
1352
|
+
z ? y.push(z) : (f = void 0, y = []);
|
|
1344
1353
|
} else
|
|
1345
|
-
|
|
1354
|
+
l = true;
|
|
1346
1355
|
}
|
|
1347
1356
|
return a;
|
|
1348
1357
|
}
|
|
1349
|
-
function
|
|
1358
|
+
function jn(e, t) {
|
|
1350
1359
|
const n = getComputedStyle(e), o = parseFloat(n.fontSize);
|
|
1351
1360
|
return t * o;
|
|
1352
1361
|
}
|
|
1353
|
-
function
|
|
1362
|
+
function Un(e, t) {
|
|
1354
1363
|
const n = getComputedStyle(e.ownerDocument.documentElement), o = parseFloat(n.fontSize);
|
|
1355
1364
|
return t * o;
|
|
1356
1365
|
}
|
|
1357
|
-
function
|
|
1366
|
+
function Wn(e) {
|
|
1358
1367
|
return e / 100 * window.innerHeight;
|
|
1359
1368
|
}
|
|
1360
|
-
function
|
|
1369
|
+
function Yn(e) {
|
|
1361
1370
|
return e / 100 * window.innerWidth;
|
|
1362
1371
|
}
|
|
1363
1372
|
function Ce({
|
|
@@ -1366,7 +1375,7 @@ function Ce({
|
|
|
1366
1375
|
styleProp: n
|
|
1367
1376
|
}) {
|
|
1368
1377
|
let o;
|
|
1369
|
-
const [r, i] =
|
|
1378
|
+
const [r, i] = sn(n);
|
|
1370
1379
|
switch (i) {
|
|
1371
1380
|
case "%": {
|
|
1372
1381
|
o = r / 100 * e;
|
|
@@ -1377,29 +1386,29 @@ function Ce({
|
|
|
1377
1386
|
break;
|
|
1378
1387
|
}
|
|
1379
1388
|
case "rem": {
|
|
1380
|
-
o =
|
|
1389
|
+
o = Un(t, r);
|
|
1381
1390
|
break;
|
|
1382
1391
|
}
|
|
1383
1392
|
case "em": {
|
|
1384
|
-
o =
|
|
1393
|
+
o = jn(t, r);
|
|
1385
1394
|
break;
|
|
1386
1395
|
}
|
|
1387
1396
|
case "vh": {
|
|
1388
|
-
o =
|
|
1397
|
+
o = Wn(r);
|
|
1389
1398
|
break;
|
|
1390
1399
|
}
|
|
1391
1400
|
case "vw": {
|
|
1392
|
-
o =
|
|
1401
|
+
o = Yn(r);
|
|
1393
1402
|
break;
|
|
1394
1403
|
}
|
|
1395
1404
|
}
|
|
1396
1405
|
return o;
|
|
1397
1406
|
}
|
|
1398
|
-
function
|
|
1407
|
+
function K(e) {
|
|
1399
1408
|
return parseFloat(e.toFixed(3));
|
|
1400
1409
|
}
|
|
1401
|
-
function
|
|
1402
|
-
const { items: t } = e, n =
|
|
1410
|
+
function ut(e) {
|
|
1411
|
+
const { items: t } = e, n = Te({ axis: e });
|
|
1403
1412
|
return n === 0 ? t.map((o) => ({
|
|
1404
1413
|
groupResizeBehavior: o.constraintProps.groupResizeBehavior,
|
|
1405
1414
|
collapsedSize: 0,
|
|
@@ -1418,16 +1427,16 @@ function it(e) {
|
|
|
1418
1427
|
itemElement: r,
|
|
1419
1428
|
styleProp: i.collapsedSize
|
|
1420
1429
|
});
|
|
1421
|
-
s =
|
|
1430
|
+
s = K(d / n * 100);
|
|
1422
1431
|
}
|
|
1423
|
-
let
|
|
1432
|
+
let c;
|
|
1424
1433
|
if (i.collapsedThreshold !== void 0) {
|
|
1425
1434
|
const d = Ce({
|
|
1426
1435
|
axisSize: n,
|
|
1427
1436
|
itemElement: r,
|
|
1428
1437
|
styleProp: i.collapsedThreshold
|
|
1429
1438
|
});
|
|
1430
|
-
|
|
1439
|
+
c = K(d / n * 100);
|
|
1431
1440
|
}
|
|
1432
1441
|
let a;
|
|
1433
1442
|
if (i.defaultSize !== void 0) {
|
|
@@ -1436,45 +1445,66 @@ function it(e) {
|
|
|
1436
1445
|
itemElement: r,
|
|
1437
1446
|
styleProp: i.defaultSize
|
|
1438
1447
|
});
|
|
1439
|
-
a =
|
|
1448
|
+
a = K(d / n * 100);
|
|
1440
1449
|
}
|
|
1441
|
-
let
|
|
1450
|
+
let u = 0;
|
|
1442
1451
|
if (i.minSize !== void 0) {
|
|
1443
1452
|
const d = Ce({
|
|
1444
1453
|
axisSize: n,
|
|
1445
1454
|
itemElement: r,
|
|
1446
1455
|
styleProp: i.minSize
|
|
1447
1456
|
});
|
|
1448
|
-
|
|
1457
|
+
u = K(d / n * 100);
|
|
1449
1458
|
}
|
|
1450
|
-
let
|
|
1459
|
+
let l = 100;
|
|
1451
1460
|
if (i.maxSize !== void 0) {
|
|
1452
1461
|
const d = Ce({
|
|
1453
1462
|
axisSize: n,
|
|
1454
1463
|
itemElement: r,
|
|
1455
1464
|
styleProp: i.maxSize
|
|
1456
1465
|
});
|
|
1457
|
-
|
|
1466
|
+
l = K(d / n * 100);
|
|
1458
1467
|
}
|
|
1459
1468
|
return {
|
|
1460
1469
|
groupResizeBehavior: i.groupResizeBehavior,
|
|
1461
1470
|
collapsedSize: s,
|
|
1462
|
-
collapsedThreshold:
|
|
1471
|
+
collapsedThreshold: c,
|
|
1463
1472
|
collapsible: i.collapsible === true,
|
|
1464
1473
|
defaultSize: a,
|
|
1465
1474
|
disabled: i.disabled,
|
|
1466
|
-
minSize:
|
|
1467
|
-
maxSize:
|
|
1475
|
+
minSize: u,
|
|
1476
|
+
maxSize: l,
|
|
1468
1477
|
itemId: o.id
|
|
1469
1478
|
};
|
|
1470
1479
|
});
|
|
1471
1480
|
}
|
|
1472
1481
|
let ue = /* @__PURE__ */ new Map();
|
|
1473
|
-
const
|
|
1474
|
-
|
|
1482
|
+
const yt = new an();
|
|
1483
|
+
let Fe = 0;
|
|
1484
|
+
const Ke = [];
|
|
1485
|
+
let Je;
|
|
1486
|
+
function et() {
|
|
1487
|
+
Fe++;
|
|
1488
|
+
}
|
|
1489
|
+
function St$1() {
|
|
1490
|
+
for (let e = 0; e < Ke.length; e++)
|
|
1491
|
+
try {
|
|
1492
|
+
yt.emit("axisChange", Ke[e]);
|
|
1493
|
+
} catch (t) {
|
|
1494
|
+
Je ??= { error: t };
|
|
1495
|
+
}
|
|
1496
|
+
Ke.length = 0;
|
|
1497
|
+
}
|
|
1498
|
+
function tt() {
|
|
1499
|
+
if (Fe === 1 && St$1(), Fe--, Fe === 0 && Je) {
|
|
1500
|
+
const { error: e } = Je;
|
|
1501
|
+
throw Je = void 0, e;
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
function Xn(e) {
|
|
1475
1505
|
ue = new Map(ue), ue.delete(e);
|
|
1476
1506
|
}
|
|
1477
|
-
function
|
|
1507
|
+
function Ee(e, t) {
|
|
1478
1508
|
for (const [n] of ue)
|
|
1479
1509
|
if (n.id === e)
|
|
1480
1510
|
return n;
|
|
@@ -1486,24 +1516,33 @@ function ae(e, t) {
|
|
|
1486
1516
|
if (t)
|
|
1487
1517
|
throw Error(`Could not find data for Group with id ${e}`);
|
|
1488
1518
|
}
|
|
1489
|
-
function
|
|
1519
|
+
function ge() {
|
|
1490
1520
|
return ue;
|
|
1491
1521
|
}
|
|
1492
|
-
function
|
|
1493
|
-
return
|
|
1522
|
+
function Be(e, t) {
|
|
1523
|
+
return yt.addListener("axisChange", (n) => {
|
|
1494
1524
|
n.axis.id === e && t(n);
|
|
1495
1525
|
});
|
|
1496
1526
|
}
|
|
1497
1527
|
function fe(e, t, n) {
|
|
1498
1528
|
const o = ue.get(e);
|
|
1499
|
-
ue = new Map(ue), ue.set(e, t)
|
|
1529
|
+
ue = new Map(ue), ue.set(e, t);
|
|
1530
|
+
const r = {
|
|
1500
1531
|
axis: e,
|
|
1501
1532
|
isUserInteraction: n?.isUserInteraction === true,
|
|
1502
1533
|
prev: o,
|
|
1503
1534
|
next: t
|
|
1504
|
-
}
|
|
1535
|
+
};
|
|
1536
|
+
Fe > 0 ? Ke.push(r) : yt.emit("axisChange", r);
|
|
1537
|
+
}
|
|
1538
|
+
function mn(e, { pointerId: t, pointerType: n }) {
|
|
1539
|
+
return t === e.pointerId || // There is only one pen, but it may be assigned a new pointerId each time it comes into range
|
|
1540
|
+
n === "pen" && e.pointerType === "pen";
|
|
1505
1541
|
}
|
|
1506
|
-
function
|
|
1542
|
+
function nt$1(e, t, n = {}) {
|
|
1543
|
+
return e.ownerDocument === t && (n.pointerId === void 0 || mn(e, n));
|
|
1544
|
+
}
|
|
1545
|
+
function Kn(e, t) {
|
|
1507
1546
|
if (e.length !== t.length)
|
|
1508
1547
|
return false;
|
|
1509
1548
|
for (let n = 0; n < e.length; n++)
|
|
@@ -1512,12 +1551,12 @@ function Gn(e, t) {
|
|
|
1512
1551
|
return true;
|
|
1513
1552
|
}
|
|
1514
1553
|
function Y(e, t, n = 0) {
|
|
1515
|
-
return Math.abs(
|
|
1554
|
+
return Math.abs(K(e) - K(t)) <= n;
|
|
1516
1555
|
}
|
|
1517
|
-
function
|
|
1556
|
+
function le(e, t) {
|
|
1518
1557
|
return Y(e, t) ? 0 : e > t ? 1 : -1;
|
|
1519
1558
|
}
|
|
1520
|
-
function
|
|
1559
|
+
function Me({
|
|
1521
1560
|
overrideDisabledItems: e,
|
|
1522
1561
|
itemConstraints: t,
|
|
1523
1562
|
prevSize: n,
|
|
@@ -1527,21 +1566,21 @@ function Ee({
|
|
|
1527
1566
|
collapsedSize: r = 0,
|
|
1528
1567
|
collapsedThreshold: i,
|
|
1529
1568
|
collapsible: s,
|
|
1530
|
-
disabled:
|
|
1569
|
+
disabled: c,
|
|
1531
1570
|
maxSize: a = 100,
|
|
1532
|
-
minSize:
|
|
1571
|
+
minSize: u = 0
|
|
1533
1572
|
} = t;
|
|
1534
|
-
if (
|
|
1573
|
+
if (c && !e)
|
|
1535
1574
|
return n;
|
|
1536
|
-
if (
|
|
1575
|
+
if (le(o, u) < 0)
|
|
1537
1576
|
if (s) {
|
|
1538
|
-
const
|
|
1539
|
-
|
|
1577
|
+
const l = i ?? (u - r) / 2, d = le(n, r) <= 0, g = d ? r + l : u - l, p = le(o, g);
|
|
1578
|
+
le(o, r) <= 0 || p < 0 || i !== void 0 && d && p === 0 ? o = r : o = u;
|
|
1540
1579
|
} else
|
|
1541
|
-
o =
|
|
1542
|
-
return o = Math.min(a, o), o =
|
|
1580
|
+
o = u;
|
|
1581
|
+
return o = Math.min(a, o), o = K(o), o;
|
|
1543
1582
|
}
|
|
1544
|
-
function
|
|
1583
|
+
function qe({
|
|
1545
1584
|
delta: e,
|
|
1546
1585
|
initialLayout: t,
|
|
1547
1586
|
itemConstraints: n,
|
|
@@ -1551,73 +1590,73 @@ function Fe({
|
|
|
1551
1590
|
}) {
|
|
1552
1591
|
if (Y(e, 0))
|
|
1553
1592
|
return t;
|
|
1554
|
-
const s = i === "imperative-api",
|
|
1593
|
+
const s = i === "imperative-api", c = n.map(
|
|
1555
1594
|
({ itemId: m }) => t[m]
|
|
1556
1595
|
), a = n.map(
|
|
1557
1596
|
({ itemId: m }) => r[m]
|
|
1558
|
-
),
|
|
1559
|
-
|
|
1560
|
-
let
|
|
1597
|
+
), u = [...c], [l, d] = o;
|
|
1598
|
+
O(l != null, "Invalid first pivot index"), O(d != null, "Invalid second pivot index");
|
|
1599
|
+
let g = 0;
|
|
1561
1600
|
switch (i) {
|
|
1562
1601
|
case "keyboard": {
|
|
1563
1602
|
{
|
|
1564
|
-
const m = e < 0 ? d :
|
|
1565
|
-
|
|
1603
|
+
const m = e < 0 ? d : l, f = n[m];
|
|
1604
|
+
O(
|
|
1566
1605
|
f,
|
|
1567
1606
|
`Panel constraints not found for index ${m}`
|
|
1568
1607
|
);
|
|
1569
1608
|
const {
|
|
1570
|
-
collapsedSize:
|
|
1609
|
+
collapsedSize: y = 0,
|
|
1571
1610
|
collapsible: h,
|
|
1572
|
-
minSize:
|
|
1611
|
+
minSize: S = 0
|
|
1573
1612
|
} = f;
|
|
1574
1613
|
if (h) {
|
|
1575
|
-
const
|
|
1576
|
-
if (
|
|
1577
|
-
|
|
1614
|
+
const z = c[m];
|
|
1615
|
+
if (O(
|
|
1616
|
+
z != null,
|
|
1578
1617
|
`Previous layout not found for panel index ${m}`
|
|
1579
|
-
), Y(
|
|
1580
|
-
const x =
|
|
1581
|
-
|
|
1618
|
+
), Y(z, y)) {
|
|
1619
|
+
const x = S - z;
|
|
1620
|
+
le(x, Math.abs(e)) > 0 && (e = e < 0 ? 0 - x : x);
|
|
1582
1621
|
}
|
|
1583
1622
|
}
|
|
1584
1623
|
}
|
|
1585
1624
|
{
|
|
1586
|
-
const m = e < 0 ?
|
|
1587
|
-
|
|
1625
|
+
const m = e < 0 ? l : d, f = n[m];
|
|
1626
|
+
O(
|
|
1588
1627
|
f,
|
|
1589
1628
|
`No panel constraints found for index ${m}`
|
|
1590
1629
|
);
|
|
1591
1630
|
const {
|
|
1592
|
-
collapsedSize:
|
|
1631
|
+
collapsedSize: y = 0,
|
|
1593
1632
|
collapsible: h,
|
|
1594
|
-
minSize:
|
|
1633
|
+
minSize: S = 0
|
|
1595
1634
|
} = f;
|
|
1596
1635
|
if (h) {
|
|
1597
|
-
const
|
|
1598
|
-
if (
|
|
1599
|
-
|
|
1636
|
+
const z = c[m];
|
|
1637
|
+
if (O(
|
|
1638
|
+
z != null,
|
|
1600
1639
|
`Previous layout not found for panel index ${m}`
|
|
1601
|
-
), Y(
|
|
1602
|
-
const x =
|
|
1603
|
-
|
|
1640
|
+
), Y(z, S)) {
|
|
1641
|
+
const x = z - y;
|
|
1642
|
+
le(x, Math.abs(e)) > 0 && (e = e < 0 ? 0 - x : x);
|
|
1604
1643
|
}
|
|
1605
1644
|
}
|
|
1606
1645
|
}
|
|
1607
1646
|
break;
|
|
1608
1647
|
}
|
|
1609
1648
|
default: {
|
|
1610
|
-
const m = e < 0 ? d :
|
|
1611
|
-
|
|
1649
|
+
const m = e < 0 ? d : l, f = n[m];
|
|
1650
|
+
O(
|
|
1612
1651
|
f,
|
|
1613
1652
|
`Panel constraints not found for index ${m}`
|
|
1614
1653
|
);
|
|
1615
|
-
const
|
|
1616
|
-
if (
|
|
1617
|
-
const
|
|
1618
|
-
if (
|
|
1619
|
-
const b =
|
|
1620
|
-
b > 0 || b === 0 && w ? e = e < 0 ? -
|
|
1654
|
+
const y = c[m], { collapsedSize: h, collapsedThreshold: S, collapsible: z, minSize: x } = f;
|
|
1655
|
+
if (z && le(y, x) < 0) {
|
|
1656
|
+
const R = x - h, N = S ?? R / 2, $ = y + Math.abs(e);
|
|
1657
|
+
if (le($, x) < 0) {
|
|
1658
|
+
const b = le(Math.abs(e), N), w = S === void 0 && e < 0;
|
|
1659
|
+
b > 0 || b === 0 && w ? e = e < 0 ? -R : R : e = 0;
|
|
1621
1660
|
}
|
|
1622
1661
|
}
|
|
1623
1662
|
break;
|
|
@@ -1625,212 +1664,229 @@ function Fe({
|
|
|
1625
1664
|
}
|
|
1626
1665
|
{
|
|
1627
1666
|
const m = e < 0 ? 1 : -1;
|
|
1628
|
-
let f = e < 0 ? d :
|
|
1667
|
+
let f = e < 0 ? d : l, y = 0;
|
|
1629
1668
|
for (; ; ) {
|
|
1630
|
-
const
|
|
1631
|
-
|
|
1632
|
-
|
|
1669
|
+
const S = c[f];
|
|
1670
|
+
O(
|
|
1671
|
+
S != null,
|
|
1633
1672
|
`Previous layout not found for panel index ${f}`
|
|
1634
1673
|
);
|
|
1635
|
-
const x =
|
|
1674
|
+
const x = Me({
|
|
1636
1675
|
overrideDisabledItems: s,
|
|
1637
1676
|
itemConstraints: n[f],
|
|
1638
|
-
prevSize:
|
|
1677
|
+
prevSize: S,
|
|
1639
1678
|
size: 100
|
|
1640
|
-
}) -
|
|
1641
|
-
if (
|
|
1679
|
+
}) - S;
|
|
1680
|
+
if (y += x, f += m, f < 0 || f >= n.length)
|
|
1642
1681
|
break;
|
|
1643
1682
|
}
|
|
1644
|
-
const h = Math.min(Math.abs(e), Math.abs(
|
|
1683
|
+
const h = Math.min(Math.abs(e), Math.abs(y));
|
|
1645
1684
|
e = e < 0 ? 0 - h : h;
|
|
1646
1685
|
}
|
|
1647
1686
|
{
|
|
1648
|
-
let f = e < 0 ?
|
|
1687
|
+
let f = e < 0 ? l : d;
|
|
1649
1688
|
for (; f >= 0 && f < n.length; ) {
|
|
1650
|
-
const
|
|
1651
|
-
|
|
1689
|
+
const y = Math.abs(e) - Math.abs(g), h = c[f];
|
|
1690
|
+
O(
|
|
1652
1691
|
h != null,
|
|
1653
1692
|
`Previous layout not found for panel index ${f}`
|
|
1654
1693
|
);
|
|
1655
|
-
const
|
|
1694
|
+
const S = h - y, z = Me({
|
|
1656
1695
|
overrideDisabledItems: s,
|
|
1657
1696
|
itemConstraints: n[f],
|
|
1658
1697
|
prevSize: h,
|
|
1659
|
-
size:
|
|
1698
|
+
size: S
|
|
1660
1699
|
});
|
|
1661
|
-
if (!Y(h,
|
|
1700
|
+
if (!Y(h, z) && (g += h - z, u[f] = z, g.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
|
|
1662
1701
|
numeric: true
|
|
1663
1702
|
}) >= 0))
|
|
1664
1703
|
break;
|
|
1665
1704
|
e < 0 ? f-- : f++;
|
|
1666
1705
|
}
|
|
1667
1706
|
}
|
|
1668
|
-
if (
|
|
1707
|
+
if (Kn(a, u))
|
|
1669
1708
|
return r;
|
|
1670
1709
|
{
|
|
1671
|
-
const m = e < 0 ? d :
|
|
1672
|
-
|
|
1710
|
+
const m = e < 0 ? d : l, f = c[m];
|
|
1711
|
+
O(
|
|
1673
1712
|
f != null,
|
|
1674
1713
|
`Previous layout not found for panel index ${m}`
|
|
1675
1714
|
);
|
|
1676
|
-
const
|
|
1715
|
+
const y = f + g, h = Me({
|
|
1677
1716
|
overrideDisabledItems: s,
|
|
1678
1717
|
itemConstraints: n[m],
|
|
1679
1718
|
prevSize: f,
|
|
1680
|
-
size:
|
|
1719
|
+
size: y
|
|
1681
1720
|
});
|
|
1682
|
-
if (
|
|
1683
|
-
let
|
|
1721
|
+
if (u[m] = h, !Y(h, y)) {
|
|
1722
|
+
let S = y - h, x = e < 0 ? d : l;
|
|
1684
1723
|
for (; x >= 0 && x < n.length; ) {
|
|
1685
|
-
const
|
|
1686
|
-
|
|
1687
|
-
|
|
1724
|
+
const R = u[x];
|
|
1725
|
+
O(
|
|
1726
|
+
R != null,
|
|
1688
1727
|
`Previous layout not found for panel index ${x}`
|
|
1689
1728
|
);
|
|
1690
|
-
const
|
|
1729
|
+
const N = R + S, $ = Me({
|
|
1691
1730
|
overrideDisabledItems: s,
|
|
1692
1731
|
itemConstraints: n[x],
|
|
1693
|
-
prevSize:
|
|
1694
|
-
size:
|
|
1732
|
+
prevSize: R,
|
|
1733
|
+
size: N
|
|
1695
1734
|
});
|
|
1696
|
-
if (Y(
|
|
1735
|
+
if (Y(R, $) || (S -= $ - R, u[x] = $), Y(S, 0))
|
|
1697
1736
|
break;
|
|
1698
1737
|
e > 0 ? x-- : x++;
|
|
1699
1738
|
}
|
|
1700
1739
|
}
|
|
1701
1740
|
}
|
|
1702
|
-
const
|
|
1741
|
+
const p = Object.values(u).reduce(
|
|
1703
1742
|
(m, f) => f + m,
|
|
1704
1743
|
0
|
|
1705
1744
|
);
|
|
1706
|
-
return Y(
|
|
1745
|
+
return Y(p, 100, 0.1) ? u.reduce((m, f, y) => (m[n[y].itemId] = f, m), {}) : r;
|
|
1707
1746
|
}
|
|
1708
|
-
function
|
|
1747
|
+
function se(e, t) {
|
|
1709
1748
|
if (Object.keys(e).length !== Object.keys(t).length)
|
|
1710
1749
|
return false;
|
|
1711
1750
|
for (const n in e)
|
|
1712
|
-
if (t[n] === void 0 ||
|
|
1751
|
+
if (t[n] === void 0 || le(e[n], t[n]) !== 0)
|
|
1713
1752
|
return false;
|
|
1714
1753
|
return true;
|
|
1715
1754
|
}
|
|
1716
|
-
function
|
|
1755
|
+
function vt(e) {
|
|
1756
|
+
et();
|
|
1757
|
+
try {
|
|
1758
|
+
Jn(e);
|
|
1759
|
+
} finally {
|
|
1760
|
+
tt();
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
function Jn({
|
|
1717
1764
|
commit: e,
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
prevCursorFlags: l
|
|
1765
|
+
event: t,
|
|
1766
|
+
hitRegions: n,
|
|
1767
|
+
initialLayoutMap: o,
|
|
1768
|
+
mountedAxes: r,
|
|
1769
|
+
pointerDownAtPoint: i,
|
|
1770
|
+
prevCursorFlags: s
|
|
1725
1771
|
}) {
|
|
1726
|
-
let
|
|
1727
|
-
const
|
|
1728
|
-
let u =
|
|
1729
|
-
const
|
|
1730
|
-
|
|
1772
|
+
let c = 0;
|
|
1773
|
+
const a = ie();
|
|
1774
|
+
let u = a.state === "active" ? a.previews : [];
|
|
1775
|
+
const l = new Map(
|
|
1776
|
+
a.state === "active" ? a.previewLayoutMap : void 0
|
|
1731
1777
|
);
|
|
1732
|
-
|
|
1733
|
-
const { axis:
|
|
1734
|
-
if (e &&
|
|
1778
|
+
n.forEach((p) => {
|
|
1779
|
+
const { axis: m, axisSize: f } = p, { orientation: y, items: h } = m;
|
|
1780
|
+
if (e && m.resizePreviewMode !== "separator")
|
|
1735
1781
|
return;
|
|
1736
|
-
const { disableCursor:
|
|
1737
|
-
let
|
|
1738
|
-
|
|
1739
|
-
const
|
|
1740
|
-
if (!
|
|
1782
|
+
const { disableCursor: S } = m.mutableState;
|
|
1783
|
+
let z = 0;
|
|
1784
|
+
i ? y === "horizontal" ? z = (t.clientX - i.x) / f * 100 : z = (t.clientY - i.y) / f * 100 : y === "horizontal" ? z = t.clientX < 0 ? -100 : 100 : z = t.clientY < 0 ? -100 : 100;
|
|
1785
|
+
const x = o.get(m), R = r.get(m);
|
|
1786
|
+
if (!x || !R)
|
|
1741
1787
|
return;
|
|
1742
1788
|
const {
|
|
1743
1789
|
defaultLayoutDeferred: N,
|
|
1744
|
-
derivedItemConstraints:
|
|
1745
|
-
axisSize:
|
|
1746
|
-
layout:
|
|
1747
|
-
separatorToItems:
|
|
1748
|
-
} =
|
|
1749
|
-
if (
|
|
1750
|
-
const
|
|
1751
|
-
delta:
|
|
1752
|
-
initialLayout:
|
|
1753
|
-
itemConstraints:
|
|
1754
|
-
pivotIndices:
|
|
1755
|
-
prevLayout:
|
|
1790
|
+
derivedItemConstraints: $,
|
|
1791
|
+
axisSize: b,
|
|
1792
|
+
layout: w,
|
|
1793
|
+
separatorToItems: v
|
|
1794
|
+
} = R;
|
|
1795
|
+
if ($ && w && v) {
|
|
1796
|
+
const T = m.resizePreviewMode === "separator" ? l.get(m) ?? w : w, A = qe({
|
|
1797
|
+
delta: z,
|
|
1798
|
+
initialLayout: x,
|
|
1799
|
+
itemConstraints: $,
|
|
1800
|
+
pivotIndices: p.items.map((E) => h.indexOf(E)),
|
|
1801
|
+
prevLayout: T,
|
|
1756
1802
|
trigger: "mouse-or-touch"
|
|
1757
1803
|
});
|
|
1758
|
-
if (
|
|
1759
|
-
|
|
1804
|
+
if (m.resizePreviewMode === "separator" && !e && !se(A, T)) {
|
|
1805
|
+
l.set(m, A);
|
|
1760
1806
|
let E = 0;
|
|
1761
|
-
const
|
|
1762
|
-
u = u.map((
|
|
1763
|
-
if (
|
|
1764
|
-
return
|
|
1765
|
-
const
|
|
1766
|
-
return
|
|
1807
|
+
const D = h.map((C) => (E += A[C.id] - x[C.id], E * (f / 100)));
|
|
1808
|
+
u = u.map((C) => {
|
|
1809
|
+
if (C.axis !== m)
|
|
1810
|
+
return C;
|
|
1811
|
+
const I = D[C.itemIndex];
|
|
1812
|
+
return I === C.offset ? C : { ...C, offset: I };
|
|
1767
1813
|
});
|
|
1768
1814
|
}
|
|
1769
|
-
if (
|
|
1770
|
-
switch (
|
|
1815
|
+
if (se(A, T) && z !== 0 && !S)
|
|
1816
|
+
switch (y) {
|
|
1771
1817
|
case "horizontal": {
|
|
1772
|
-
|
|
1818
|
+
c |= z < 0 ? cn : ln;
|
|
1773
1819
|
break;
|
|
1774
1820
|
}
|
|
1775
1821
|
case "vertical": {
|
|
1776
|
-
|
|
1822
|
+
c |= z < 0 ? un : dn;
|
|
1777
1823
|
break;
|
|
1778
1824
|
}
|
|
1779
1825
|
}
|
|
1780
|
-
(
|
|
1826
|
+
(m.resizePreviewMode !== "separator" || e) && !se(A, w) && fe(p.axis, {
|
|
1781
1827
|
defaultLayoutDeferred: N,
|
|
1782
|
-
derivedItemConstraints:
|
|
1783
|
-
axisSize:
|
|
1784
|
-
layout:
|
|
1785
|
-
requestedAxisSize:
|
|
1786
|
-
requestedLayout:
|
|
1787
|
-
separatorToItems:
|
|
1828
|
+
derivedItemConstraints: $,
|
|
1829
|
+
axisSize: b,
|
|
1830
|
+
layout: A,
|
|
1831
|
+
requestedAxisSize: b,
|
|
1832
|
+
requestedLayout: A,
|
|
1833
|
+
separatorToItems: v
|
|
1788
1834
|
});
|
|
1789
1835
|
}
|
|
1790
1836
|
});
|
|
1791
|
-
let
|
|
1792
|
-
|
|
1793
|
-
const
|
|
1794
|
-
|
|
1795
|
-
}
|
|
1796
|
-
function
|
|
1797
|
-
const n =
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
})
|
|
1837
|
+
let d = 0;
|
|
1838
|
+
t.movementX === 0 ? d |= s & Lt$1 : d |= c & Lt$1, t.movementY === 0 ? d |= s & Ct$1 : d |= c & Ct$1;
|
|
1839
|
+
const g = a.state === "active" && (t.clientX !== a.pointerDownAtPoint.x || t.clientY !== a.pointerDownAtPoint.y);
|
|
1840
|
+
On(d, u, l, g);
|
|
1841
|
+
}
|
|
1842
|
+
function pn(e, t) {
|
|
1843
|
+
const n = ie();
|
|
1844
|
+
if (n.state !== "active" || !nt$1(n, e, t))
|
|
1845
|
+
return;
|
|
1846
|
+
const o = ge();
|
|
1847
|
+
et();
|
|
1848
|
+
try {
|
|
1849
|
+
vt({
|
|
1850
|
+
commit: true,
|
|
1851
|
+
event: t,
|
|
1852
|
+
hitRegions: n.hitRegions,
|
|
1853
|
+
initialLayoutMap: n.initialLayoutMap,
|
|
1854
|
+
mountedAxes: o,
|
|
1855
|
+
pointerDownAtPoint: n.pointerDownAtPoint,
|
|
1856
|
+
prevCursorFlags: n.cursorFlags
|
|
1857
|
+
}), St$1(), de({
|
|
1858
|
+
cursorFlags: 0,
|
|
1859
|
+
state: "inactive"
|
|
1860
|
+
}), n.hitRegions.length > 0 && (t.preventDefault?.(), n.hitRegions.forEach((r) => {
|
|
1861
|
+
if (!o.has(r.axis))
|
|
1862
|
+
return;
|
|
1863
|
+
const i = ae(r.axis.id, true);
|
|
1864
|
+
fe(r.axis, i, {
|
|
1865
|
+
isUserInteraction: true
|
|
1866
|
+
});
|
|
1867
|
+
}));
|
|
1868
|
+
} finally {
|
|
1869
|
+
tt();
|
|
1821
1870
|
}
|
|
1822
|
-
return r;
|
|
1823
1871
|
}
|
|
1824
|
-
function
|
|
1825
|
-
|
|
1872
|
+
function Tt$1(e) {
|
|
1873
|
+
if (e.defaultPrevented)
|
|
1874
|
+
return;
|
|
1875
|
+
const { clientX: t, clientY: n, movementX: o, movementY: r } = e;
|
|
1876
|
+
pn(e.currentTarget, {
|
|
1877
|
+
clientX: t,
|
|
1878
|
+
clientY: n,
|
|
1879
|
+
movementX: o,
|
|
1880
|
+
movementY: r
|
|
1881
|
+
});
|
|
1826
1882
|
}
|
|
1827
|
-
function
|
|
1883
|
+
function Zn(e, t, n) {
|
|
1828
1884
|
let o, r = {
|
|
1829
1885
|
x: 1 / 0,
|
|
1830
1886
|
y: 1 / 0
|
|
1831
1887
|
};
|
|
1832
1888
|
for (const i of t) {
|
|
1833
|
-
const s =
|
|
1889
|
+
const s = fn(n, i.rect);
|
|
1834
1890
|
switch (e) {
|
|
1835
1891
|
case "horizontal": {
|
|
1836
1892
|
(s.x < r.x || s.x === r.x && s.y <= r.y) && (o = i, r = s);
|
|
@@ -1847,126 +1903,126 @@ function _n(e, t, n) {
|
|
|
1847
1903
|
hitRegion: o
|
|
1848
1904
|
} : void 0;
|
|
1849
1905
|
}
|
|
1850
|
-
function
|
|
1906
|
+
function Qn(e) {
|
|
1851
1907
|
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
|
|
1852
1908
|
}
|
|
1853
|
-
function
|
|
1909
|
+
function eo(e, t) {
|
|
1854
1910
|
if (e === t) throw new Error("Cannot compare node with itself");
|
|
1855
1911
|
const n = {
|
|
1856
|
-
a:
|
|
1857
|
-
b:
|
|
1912
|
+
a: At(e),
|
|
1913
|
+
b: At(t)
|
|
1858
1914
|
};
|
|
1859
1915
|
let o;
|
|
1860
1916
|
for (; n.a.at(-1) === n.b.at(-1); )
|
|
1861
1917
|
o = n.a.pop(), n.b.pop();
|
|
1862
|
-
|
|
1918
|
+
O(
|
|
1863
1919
|
o,
|
|
1864
1920
|
"Stacking order can only be calculated for elements with a common ancestor"
|
|
1865
1921
|
);
|
|
1866
1922
|
const r = {
|
|
1867
|
-
a:
|
|
1868
|
-
b:
|
|
1923
|
+
a: kt$1(Dt(n.a)),
|
|
1924
|
+
b: kt$1(Dt(n.b))
|
|
1869
1925
|
};
|
|
1870
1926
|
if (r.a === r.b) {
|
|
1871
1927
|
const i = o.childNodes, s = {
|
|
1872
1928
|
a: n.a.at(-1),
|
|
1873
1929
|
b: n.b.at(-1)
|
|
1874
1930
|
};
|
|
1875
|
-
let
|
|
1876
|
-
for (;
|
|
1877
|
-
const a = i[
|
|
1931
|
+
let c = i.length;
|
|
1932
|
+
for (; c--; ) {
|
|
1933
|
+
const a = i[c];
|
|
1878
1934
|
if (a === s.a) return 1;
|
|
1879
1935
|
if (a === s.b) return -1;
|
|
1880
1936
|
}
|
|
1881
1937
|
}
|
|
1882
1938
|
return Math.sign(r.a - r.b);
|
|
1883
1939
|
}
|
|
1884
|
-
const
|
|
1885
|
-
function
|
|
1886
|
-
const t = getComputedStyle(
|
|
1940
|
+
const to = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
|
|
1941
|
+
function no(e) {
|
|
1942
|
+
const t = getComputedStyle(hn(e) ?? e).display;
|
|
1887
1943
|
return t === "flex" || t === "inline-flex";
|
|
1888
1944
|
}
|
|
1889
|
-
function
|
|
1945
|
+
function oo(e) {
|
|
1890
1946
|
const t = getComputedStyle(e);
|
|
1891
|
-
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" ||
|
|
1947
|
+
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || no(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" || to.test(t.willChange) || t.webkitOverflowScrolling === "touch");
|
|
1892
1948
|
}
|
|
1893
|
-
function
|
|
1949
|
+
function Dt(e) {
|
|
1894
1950
|
let t = e.length;
|
|
1895
1951
|
for (; t--; ) {
|
|
1896
1952
|
const n = e[t];
|
|
1897
|
-
if (
|
|
1953
|
+
if (O(n, "Missing node"), oo(n)) return n;
|
|
1898
1954
|
}
|
|
1899
1955
|
return null;
|
|
1900
1956
|
}
|
|
1901
|
-
function
|
|
1957
|
+
function kt$1(e) {
|
|
1902
1958
|
return e && Number(getComputedStyle(e).zIndex) || 0;
|
|
1903
1959
|
}
|
|
1904
|
-
function
|
|
1960
|
+
function At(e) {
|
|
1905
1961
|
const t = [];
|
|
1906
1962
|
for (; e; )
|
|
1907
|
-
t.push(e), e =
|
|
1963
|
+
t.push(e), e = hn(e);
|
|
1908
1964
|
return t;
|
|
1909
1965
|
}
|
|
1910
|
-
function
|
|
1966
|
+
function hn(e) {
|
|
1911
1967
|
const { parentNode: t } = e;
|
|
1912
|
-
return
|
|
1968
|
+
return Qn(t) ? t.host : t;
|
|
1913
1969
|
}
|
|
1914
|
-
function
|
|
1970
|
+
function ro(e, t) {
|
|
1915
1971
|
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;
|
|
1916
1972
|
}
|
|
1917
|
-
function
|
|
1973
|
+
function io(e) {
|
|
1918
1974
|
try {
|
|
1919
1975
|
return e.matches(":modal");
|
|
1920
1976
|
} catch {
|
|
1921
1977
|
return false;
|
|
1922
1978
|
}
|
|
1923
1979
|
}
|
|
1924
|
-
function
|
|
1980
|
+
function so({
|
|
1925
1981
|
axisElement: e,
|
|
1926
1982
|
hitRegion: t,
|
|
1927
1983
|
pointerEventTarget: n
|
|
1928
1984
|
}) {
|
|
1929
|
-
if (
|
|
1985
|
+
if (lt(n)) {
|
|
1930
1986
|
const o = n.closest("dialog");
|
|
1931
|
-
if (o && !o.contains(e) &&
|
|
1987
|
+
if (o && !o.contains(e) && io(o))
|
|
1932
1988
|
return false;
|
|
1933
1989
|
}
|
|
1934
|
-
if (!
|
|
1990
|
+
if (!lt(n) || n.contains(e) || e.contains(n))
|
|
1935
1991
|
return true;
|
|
1936
|
-
if (
|
|
1992
|
+
if (eo(n, e) > 0) {
|
|
1937
1993
|
let o = n;
|
|
1938
1994
|
for (; o; ) {
|
|
1939
1995
|
if (o.contains(e))
|
|
1940
1996
|
return true;
|
|
1941
|
-
if (
|
|
1997
|
+
if (ro(o.getBoundingClientRect(), t))
|
|
1942
1998
|
return false;
|
|
1943
1999
|
o = o.parentElement;
|
|
1944
2000
|
}
|
|
1945
2001
|
}
|
|
1946
2002
|
return true;
|
|
1947
2003
|
}
|
|
1948
|
-
function
|
|
1949
|
-
const
|
|
1950
|
-
return t.forEach((
|
|
1951
|
-
if (
|
|
2004
|
+
function bt$1(e, t, n) {
|
|
2005
|
+
const o = [];
|
|
2006
|
+
return t.forEach((r, i) => {
|
|
2007
|
+
if (i.disabled || i.element.ownerDocument !== n)
|
|
1952
2008
|
return;
|
|
1953
|
-
const
|
|
2009
|
+
const s = gt({ axis: i }), c = Zn(i.orientation, s, {
|
|
1954
2010
|
x: e.clientX,
|
|
1955
2011
|
y: e.clientY
|
|
1956
2012
|
});
|
|
1957
|
-
|
|
1958
|
-
axisElement:
|
|
1959
|
-
hitRegion:
|
|
2013
|
+
c && c.distance.x <= 0 && c.distance.y <= 0 && so({
|
|
2014
|
+
axisElement: i.element,
|
|
2015
|
+
hitRegion: c.hitRegion.rect,
|
|
1960
2016
|
pointerEventTarget: e.target
|
|
1961
|
-
}) &&
|
|
1962
|
-
}),
|
|
2017
|
+
}) && o.push(c.hitRegion);
|
|
2018
|
+
}), o;
|
|
1963
2019
|
}
|
|
1964
|
-
function
|
|
2020
|
+
function Se({
|
|
1965
2021
|
layout: e,
|
|
1966
2022
|
itemConstraints: t
|
|
1967
2023
|
}) {
|
|
1968
2024
|
const n = t.map(({ itemId: s }) => e[s]), o = [...n], r = o.reduce(
|
|
1969
|
-
(s,
|
|
2025
|
+
(s, c) => s + c,
|
|
1970
2026
|
0
|
|
1971
2027
|
);
|
|
1972
2028
|
if (Object.keys(e).length !== t.length)
|
|
@@ -1975,75 +2031,75 @@ function ye({
|
|
|
1975
2031
|
);
|
|
1976
2032
|
if (!Y(r, 100) && o.length > 0)
|
|
1977
2033
|
for (let s = 0; s < t.length; s++) {
|
|
1978
|
-
const
|
|
1979
|
-
|
|
1980
|
-
const a = 100 / r *
|
|
2034
|
+
const c = o[s];
|
|
2035
|
+
O(c != null, `No layout data found for index ${s}`);
|
|
2036
|
+
const a = 100 / r * c;
|
|
1981
2037
|
o[s] = a;
|
|
1982
2038
|
}
|
|
1983
2039
|
let i = 0;
|
|
1984
2040
|
for (let s = 0; s < t.length; s++) {
|
|
1985
|
-
const
|
|
1986
|
-
|
|
2041
|
+
const c = n[s];
|
|
2042
|
+
O(c != null, `No layout data found for index ${s}`);
|
|
1987
2043
|
const a = o[s];
|
|
1988
|
-
|
|
1989
|
-
const
|
|
2044
|
+
O(a != null, `No layout data found for index ${s}`);
|
|
2045
|
+
const u = Me({
|
|
1990
2046
|
overrideDisabledItems: true,
|
|
1991
2047
|
itemConstraints: t[s],
|
|
1992
|
-
prevSize:
|
|
2048
|
+
prevSize: c,
|
|
1993
2049
|
size: a
|
|
1994
2050
|
});
|
|
1995
|
-
a !=
|
|
2051
|
+
a != u && (i += a - u, o[s] = u);
|
|
1996
2052
|
}
|
|
1997
2053
|
if (!Y(i, 0))
|
|
1998
2054
|
for (let s = 0; s < t.length; s++) {
|
|
1999
|
-
const
|
|
2000
|
-
|
|
2001
|
-
const a =
|
|
2055
|
+
const c = o[s];
|
|
2056
|
+
O(c != null, `No layout data found for index ${s}`);
|
|
2057
|
+
const a = c + i, u = Me({
|
|
2002
2058
|
overrideDisabledItems: true,
|
|
2003
2059
|
itemConstraints: t[s],
|
|
2004
|
-
prevSize:
|
|
2060
|
+
prevSize: c,
|
|
2005
2061
|
size: a
|
|
2006
2062
|
});
|
|
2007
|
-
if (
|
|
2063
|
+
if (c !== u && (i -= u - c, o[s] = u, Y(i, 0)))
|
|
2008
2064
|
break;
|
|
2009
2065
|
}
|
|
2010
|
-
return o.reduce((s,
|
|
2066
|
+
return o.reduce((s, c, a) => (s[t[a].itemId] = c, s), {});
|
|
2011
2067
|
}
|
|
2012
|
-
function
|
|
2068
|
+
function xt$1({
|
|
2013
2069
|
axisId: e,
|
|
2014
2070
|
itemId: t
|
|
2015
2071
|
}) {
|
|
2016
2072
|
const n = () => {
|
|
2017
|
-
const a =
|
|
2073
|
+
const a = ge();
|
|
2018
2074
|
for (const [
|
|
2019
|
-
|
|
2075
|
+
u,
|
|
2020
2076
|
{
|
|
2021
|
-
defaultLayoutDeferred:
|
|
2077
|
+
defaultLayoutDeferred: l,
|
|
2022
2078
|
derivedItemConstraints: d,
|
|
2023
|
-
layout:
|
|
2024
|
-
axisSize:
|
|
2079
|
+
layout: g,
|
|
2080
|
+
axisSize: p,
|
|
2025
2081
|
separatorToItems: m
|
|
2026
2082
|
}
|
|
2027
2083
|
] of a)
|
|
2028
|
-
if (
|
|
2084
|
+
if (u.id === e)
|
|
2029
2085
|
return {
|
|
2030
|
-
defaultLayoutDeferred:
|
|
2086
|
+
defaultLayoutDeferred: l,
|
|
2031
2087
|
derivedItemConstraints: d,
|
|
2032
|
-
axis:
|
|
2033
|
-
axisSize:
|
|
2034
|
-
layout:
|
|
2088
|
+
axis: u,
|
|
2089
|
+
axisSize: p,
|
|
2090
|
+
layout: g,
|
|
2035
2091
|
separatorToItems: m
|
|
2036
2092
|
};
|
|
2037
2093
|
throw Error(`Group ${e} not found`);
|
|
2038
2094
|
}, o = () => {
|
|
2039
2095
|
const a = n().derivedItemConstraints.find(
|
|
2040
|
-
(
|
|
2096
|
+
(u) => u.itemId === t
|
|
2041
2097
|
);
|
|
2042
2098
|
if (a !== void 0)
|
|
2043
2099
|
return a;
|
|
2044
2100
|
throw Error(`Panel constraints not found for Panel ${t}`);
|
|
2045
2101
|
}, r = () => {
|
|
2046
|
-
const a = n().axis.items.find((
|
|
2102
|
+
const a = n().axis.items.find((u) => u.id === t);
|
|
2047
2103
|
if (a !== void 0)
|
|
2048
2104
|
return a;
|
|
2049
2105
|
throw Error(`Layout not found for Panel ${t}`);
|
|
@@ -2054,103 +2110,107 @@ function mt({
|
|
|
2054
2110
|
throw Error(`Layout not found for Panel ${t}`);
|
|
2055
2111
|
}, s = ({
|
|
2056
2112
|
nextSize: a,
|
|
2057
|
-
items:
|
|
2058
|
-
prevLayout:
|
|
2113
|
+
items: u,
|
|
2114
|
+
prevLayout: l,
|
|
2059
2115
|
derivedItemConstraints: d
|
|
2060
2116
|
}) => {
|
|
2061
|
-
const
|
|
2062
|
-
if (f && a <
|
|
2063
|
-
const
|
|
2064
|
-
return
|
|
2117
|
+
const g = i(), p = u.findIndex((h) => h.id === t), m = p === 0, f = p === u.length - 1;
|
|
2118
|
+
if (f && a < g && (m || u.slice(0, p).every((h, S) => {
|
|
2119
|
+
const z = d[S];
|
|
2120
|
+
return z?.collapsible && Y(z.collapsedSize, l[z.itemId]);
|
|
2065
2121
|
}))) {
|
|
2066
|
-
const h =
|
|
2122
|
+
const h = u.slice(0, p).reduce((S, z) => S + l[z.id], 0);
|
|
2067
2123
|
return {
|
|
2068
|
-
...
|
|
2069
|
-
[t]:
|
|
2124
|
+
...l,
|
|
2125
|
+
[t]: K(100 - h)
|
|
2070
2126
|
};
|
|
2071
2127
|
}
|
|
2072
|
-
return
|
|
2073
|
-
delta: f ?
|
|
2074
|
-
initialLayout:
|
|
2128
|
+
return qe({
|
|
2129
|
+
delta: f ? g - a : a - g,
|
|
2130
|
+
initialLayout: l,
|
|
2075
2131
|
itemConstraints: d,
|
|
2076
|
-
pivotIndices: f ? [
|
|
2077
|
-
prevLayout:
|
|
2132
|
+
pivotIndices: f ? [p - 1, p] : [p, p + 1],
|
|
2133
|
+
prevLayout: l,
|
|
2078
2134
|
trigger: "imperative-api"
|
|
2079
2135
|
});
|
|
2080
|
-
},
|
|
2081
|
-
const
|
|
2082
|
-
if (a ===
|
|
2136
|
+
}, c = (a) => {
|
|
2137
|
+
const u = i();
|
|
2138
|
+
if (a === u)
|
|
2083
2139
|
return;
|
|
2084
2140
|
const {
|
|
2085
|
-
defaultLayoutDeferred:
|
|
2141
|
+
defaultLayoutDeferred: l,
|
|
2086
2142
|
derivedItemConstraints: d,
|
|
2087
|
-
axis:
|
|
2088
|
-
axisSize:
|
|
2143
|
+
axis: g,
|
|
2144
|
+
axisSize: p,
|
|
2089
2145
|
layout: m,
|
|
2090
2146
|
separatorToItems: f
|
|
2091
|
-
} = n(),
|
|
2147
|
+
} = n(), y = s({
|
|
2092
2148
|
nextSize: a,
|
|
2093
|
-
items:
|
|
2149
|
+
items: g.items,
|
|
2094
2150
|
prevLayout: m,
|
|
2095
2151
|
derivedItemConstraints: d
|
|
2096
|
-
}), h =
|
|
2097
|
-
layout:
|
|
2152
|
+
}), h = Se({
|
|
2153
|
+
layout: y,
|
|
2098
2154
|
itemConstraints: d
|
|
2099
2155
|
});
|
|
2100
|
-
|
|
2101
|
-
defaultLayoutDeferred:
|
|
2156
|
+
se(m, h) || fe(g, {
|
|
2157
|
+
defaultLayoutDeferred: l,
|
|
2102
2158
|
derivedItemConstraints: d,
|
|
2103
|
-
axisSize:
|
|
2159
|
+
axisSize: p,
|
|
2104
2160
|
layout: h,
|
|
2105
|
-
requestedAxisSize:
|
|
2161
|
+
requestedAxisSize: p,
|
|
2106
2162
|
requestedLayout: h,
|
|
2107
2163
|
separatorToItems: f
|
|
2108
2164
|
});
|
|
2109
2165
|
};
|
|
2110
2166
|
return {
|
|
2111
2167
|
collapse: () => {
|
|
2112
|
-
const { collapsible: a, collapsedSize:
|
|
2113
|
-
a && d !==
|
|
2168
|
+
const { collapsible: a, collapsedSize: u } = o(), { mutableValues: l } = r(), d = i();
|
|
2169
|
+
a && d !== u && (l.expandToSize = d, c(u));
|
|
2114
2170
|
},
|
|
2115
2171
|
expand: () => {
|
|
2116
|
-
const { collapsible: a, collapsedSize:
|
|
2117
|
-
if (a &&
|
|
2118
|
-
let
|
|
2119
|
-
|
|
2172
|
+
const { collapsible: a, collapsedSize: u, minSize: l } = o(), { mutableValues: d } = r(), g = i();
|
|
2173
|
+
if (a && g === u) {
|
|
2174
|
+
let p = d.expandToSize ?? l;
|
|
2175
|
+
p === 0 && (p = 1), c(p);
|
|
2120
2176
|
}
|
|
2121
2177
|
},
|
|
2122
2178
|
getSize: () => {
|
|
2123
|
-
const { axis: a } = n(),
|
|
2179
|
+
const { axis: a } = n(), u = i(), { element: l } = r(), d = a.layoutStrategy ? a.layoutStrategy.getItemSizeInPixels(t) : a.orientation === "horizontal" ? l.offsetWidth : l.offsetHeight;
|
|
2124
2180
|
return {
|
|
2125
|
-
asPercentage:
|
|
2181
|
+
asPercentage: u,
|
|
2126
2182
|
inPixels: d
|
|
2127
2183
|
};
|
|
2128
2184
|
},
|
|
2129
2185
|
isCollapsed: () => {
|
|
2130
|
-
const { collapsible: a, collapsedSize:
|
|
2131
|
-
return a && Y(
|
|
2186
|
+
const { collapsible: a, collapsedSize: u } = o(), l = i();
|
|
2187
|
+
return a && Y(u, l);
|
|
2132
2188
|
},
|
|
2133
2189
|
resize: (a) => {
|
|
2134
|
-
const { axis:
|
|
2190
|
+
const { axis: u } = n(), { element: l } = r(), d = Te({ axis: u }), g = Ce({
|
|
2135
2191
|
axisSize: d,
|
|
2136
|
-
itemElement:
|
|
2192
|
+
itemElement: l,
|
|
2137
2193
|
styleProp: a
|
|
2138
|
-
}),
|
|
2139
|
-
|
|
2194
|
+
}), p = K(g / d * 100);
|
|
2195
|
+
c(p);
|
|
2140
2196
|
}
|
|
2141
2197
|
};
|
|
2142
2198
|
}
|
|
2143
|
-
function
|
|
2199
|
+
function $t$1(e) {
|
|
2144
2200
|
if (e.defaultPrevented)
|
|
2145
2201
|
return;
|
|
2146
|
-
const t =
|
|
2147
|
-
|
|
2202
|
+
const t = ge();
|
|
2203
|
+
bt$1(
|
|
2204
|
+
e,
|
|
2205
|
+
t,
|
|
2206
|
+
e.currentTarget
|
|
2207
|
+
).forEach((o) => {
|
|
2148
2208
|
if (o.separator && !o.separator.disableDoubleClick) {
|
|
2149
2209
|
const r = o.items.find(
|
|
2150
2210
|
(i) => i.constraintProps.defaultSize !== void 0
|
|
2151
2211
|
);
|
|
2152
2212
|
if (r) {
|
|
2153
|
-
const i = r.constraintProps.defaultSize, s =
|
|
2213
|
+
const i = r.constraintProps.defaultSize, s = xt$1({
|
|
2154
2214
|
axisId: o.axis.id,
|
|
2155
2215
|
itemId: r.id
|
|
2156
2216
|
});
|
|
@@ -2159,8 +2219,8 @@ function Lt$1(e) {
|
|
|
2159
2219
|
}
|
|
2160
2220
|
});
|
|
2161
2221
|
}
|
|
2162
|
-
function
|
|
2163
|
-
const t =
|
|
2222
|
+
function gn(e) {
|
|
2223
|
+
const t = ge();
|
|
2164
2224
|
for (const [n] of t)
|
|
2165
2225
|
if (n.separators.some(
|
|
2166
2226
|
(o) => o.element === e
|
|
@@ -2168,11 +2228,11 @@ function rn(e) {
|
|
|
2168
2228
|
return n;
|
|
2169
2229
|
throw Error("Could not find parent Group for separator element");
|
|
2170
2230
|
}
|
|
2171
|
-
function
|
|
2231
|
+
function _e({
|
|
2172
2232
|
axisId: e
|
|
2173
2233
|
}) {
|
|
2174
2234
|
const t = () => {
|
|
2175
|
-
const n =
|
|
2235
|
+
const n = ge();
|
|
2176
2236
|
for (const [o, r] of n)
|
|
2177
2237
|
if (o.id === e)
|
|
2178
2238
|
return { axis: o, ...r };
|
|
@@ -2189,51 +2249,51 @@ function Ge({
|
|
|
2189
2249
|
derivedItemConstraints: r,
|
|
2190
2250
|
axis: i,
|
|
2191
2251
|
axisSize: s,
|
|
2192
|
-
layout:
|
|
2252
|
+
layout: c,
|
|
2193
2253
|
separatorToItems: a
|
|
2194
|
-
} = t(),
|
|
2254
|
+
} = t(), u = Se({
|
|
2195
2255
|
layout: n,
|
|
2196
2256
|
itemConstraints: r
|
|
2197
2257
|
});
|
|
2198
|
-
return o ?
|
|
2258
|
+
return o ? c : (se(c, u) || fe(i, {
|
|
2199
2259
|
defaultLayoutDeferred: o,
|
|
2200
2260
|
derivedItemConstraints: r,
|
|
2201
2261
|
axisSize: s,
|
|
2202
|
-
layout:
|
|
2262
|
+
layout: u,
|
|
2203
2263
|
requestedAxisSize: s,
|
|
2204
|
-
requestedLayout:
|
|
2264
|
+
requestedLayout: u,
|
|
2205
2265
|
separatorToItems: a
|
|
2206
|
-
}),
|
|
2266
|
+
}), u);
|
|
2207
2267
|
}
|
|
2208
2268
|
};
|
|
2209
2269
|
}
|
|
2210
2270
|
function we(e, t) {
|
|
2211
|
-
const n =
|
|
2271
|
+
const n = gn(e), o = ae(n.id, true), r = n.separators.find(
|
|
2212
2272
|
(d) => d.element === e
|
|
2213
2273
|
);
|
|
2214
|
-
|
|
2274
|
+
O(r, "Matching separator not found");
|
|
2215
2275
|
const i = o.separatorToItems.get(r);
|
|
2216
|
-
|
|
2217
|
-
const s = i.map((d) => n.items.indexOf(d)), a =
|
|
2276
|
+
O(i, "Matching panels not found");
|
|
2277
|
+
const s = i.map((d) => n.items.indexOf(d)), a = _e({ axisId: n.id }).getLayout(), u = qe({
|
|
2218
2278
|
delta: t,
|
|
2219
2279
|
initialLayout: a,
|
|
2220
2280
|
itemConstraints: o.derivedItemConstraints,
|
|
2221
2281
|
pivotIndices: s,
|
|
2222
2282
|
prevLayout: a,
|
|
2223
2283
|
trigger: "keyboard"
|
|
2224
|
-
}),
|
|
2225
|
-
layout:
|
|
2284
|
+
}), l = Se({
|
|
2285
|
+
layout: u,
|
|
2226
2286
|
itemConstraints: o.derivedItemConstraints
|
|
2227
2287
|
});
|
|
2228
|
-
|
|
2288
|
+
se(a, l) || fe(
|
|
2229
2289
|
n,
|
|
2230
2290
|
{
|
|
2231
2291
|
defaultLayoutDeferred: o.defaultLayoutDeferred,
|
|
2232
2292
|
derivedItemConstraints: o.derivedItemConstraints,
|
|
2233
2293
|
axisSize: o.axisSize,
|
|
2234
|
-
layout:
|
|
2294
|
+
layout: l,
|
|
2235
2295
|
requestedAxisSize: o.axisSize,
|
|
2236
|
-
requestedLayout:
|
|
2296
|
+
requestedLayout: l,
|
|
2237
2297
|
separatorToItems: o.separatorToItems
|
|
2238
2298
|
},
|
|
2239
2299
|
// Keyboard resizes (arrow keys, Home/End, Enter collapse/expand) originate
|
|
@@ -2243,10 +2303,10 @@ function we(e, t) {
|
|
|
2243
2303
|
{ isUserInteraction: true }
|
|
2244
2304
|
);
|
|
2245
2305
|
}
|
|
2246
|
-
function
|
|
2306
|
+
function Ot$1(e) {
|
|
2247
2307
|
if (e.defaultPrevented)
|
|
2248
2308
|
return;
|
|
2249
|
-
const t = e.currentTarget, n =
|
|
2309
|
+
const t = e.currentTarget, n = gn(t);
|
|
2250
2310
|
if (!(n.disabled || n.separators.find(
|
|
2251
2311
|
(r) => r.element === t
|
|
2252
2312
|
)?.disabled))
|
|
@@ -2273,18 +2333,18 @@ function Ct$1(e) {
|
|
|
2273
2333
|
}
|
|
2274
2334
|
case "Enter": {
|
|
2275
2335
|
e.preventDefault();
|
|
2276
|
-
const r = ae(n.id, true), { derivedItemConstraints: i, layout: s, separatorToItems:
|
|
2277
|
-
(
|
|
2336
|
+
const r = ae(n.id, true), { derivedItemConstraints: i, layout: s, separatorToItems: c } = r, a = n.separators.find(
|
|
2337
|
+
(g) => g.element === t
|
|
2278
2338
|
);
|
|
2279
|
-
|
|
2280
|
-
const
|
|
2281
|
-
|
|
2282
|
-
const
|
|
2283
|
-
(
|
|
2339
|
+
O(a, "Matching separator not found");
|
|
2340
|
+
const u = c.get(a);
|
|
2341
|
+
O(u, "Matching panels not found");
|
|
2342
|
+
const l = u[0], d = i.find(
|
|
2343
|
+
(g) => g.itemId === l.id
|
|
2284
2344
|
);
|
|
2285
|
-
if (
|
|
2286
|
-
const
|
|
2287
|
-
we(t,
|
|
2345
|
+
if (O(d, "Panel metadata not found"), d.collapsible) {
|
|
2346
|
+
const g = s[l.id], p = d.collapsedSize === g ? n.mutableState.expandedItemSizes[l.id] ?? d.minSize : d.collapsedSize;
|
|
2347
|
+
we(t, p - g);
|
|
2288
2348
|
}
|
|
2289
2349
|
break;
|
|
2290
2350
|
}
|
|
@@ -2295,7 +2355,7 @@ function Ct$1(e) {
|
|
|
2295
2355
|
), i = Array.from(r).findIndex(
|
|
2296
2356
|
(a) => a === e.currentTarget
|
|
2297
2357
|
);
|
|
2298
|
-
|
|
2358
|
+
O(i !== null, "Index not found");
|
|
2299
2359
|
const s = e.shiftKey ? i > 0 ? i - 1 : r.length - 1 : i + 1 < r.length ? i + 1 : 0;
|
|
2300
2360
|
r[s].focus({
|
|
2301
2361
|
preventScroll: true
|
|
@@ -2308,33 +2368,39 @@ function Ct$1(e) {
|
|
|
2308
2368
|
}
|
|
2309
2369
|
}
|
|
2310
2370
|
}
|
|
2311
|
-
function
|
|
2312
|
-
const
|
|
2313
|
-
if (
|
|
2371
|
+
function ke(e, t) {
|
|
2372
|
+
const n = ie();
|
|
2373
|
+
if (n.state !== "active" || !nt$1(n, e, t))
|
|
2314
2374
|
return false;
|
|
2315
|
-
const
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
layout
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2375
|
+
const o = ge();
|
|
2376
|
+
et();
|
|
2377
|
+
try {
|
|
2378
|
+
n.previewLayoutMap.forEach((r, i) => {
|
|
2379
|
+
const s = o.get(i);
|
|
2380
|
+
i.resizePreviewMode === "separator" && s && !se(r, s.layout) && fe(i, {
|
|
2381
|
+
...s,
|
|
2382
|
+
layout: r,
|
|
2383
|
+
requestedAxisSize: s.axisSize,
|
|
2384
|
+
requestedLayout: r
|
|
2385
|
+
});
|
|
2386
|
+
}), St$1(), de({
|
|
2387
|
+
cursorFlags: 0,
|
|
2388
|
+
state: "inactive"
|
|
2389
|
+
}), n.hitRegions.forEach((r) => {
|
|
2390
|
+
if (!o.has(r.axis))
|
|
2391
|
+
return;
|
|
2392
|
+
const i = ae(r.axis.id, true);
|
|
2393
|
+
fe(r.axis, i, {
|
|
2394
|
+
isUserInteraction: true
|
|
2395
|
+
});
|
|
2333
2396
|
});
|
|
2334
|
-
}
|
|
2397
|
+
} finally {
|
|
2398
|
+
tt();
|
|
2399
|
+
}
|
|
2400
|
+
return true;
|
|
2335
2401
|
}
|
|
2336
|
-
function
|
|
2337
|
-
const t =
|
|
2402
|
+
function Nt$1(e) {
|
|
2403
|
+
const t = ie();
|
|
2338
2404
|
if (t.state !== "active")
|
|
2339
2405
|
return;
|
|
2340
2406
|
const n = t.hitRegions.flatMap(
|
|
@@ -2342,176 +2408,197 @@ function Rt(e) {
|
|
|
2342
2408
|
);
|
|
2343
2409
|
!n.some((o) => o === e.target) || n.some(
|
|
2344
2410
|
(o) => o.hasPointerCapture?.(e.pointerId)
|
|
2345
|
-
) ||
|
|
2411
|
+
) || ke(e.currentTarget, e);
|
|
2346
2412
|
}
|
|
2347
|
-
function
|
|
2348
|
-
|
|
2413
|
+
function Gt$1(e) {
|
|
2414
|
+
ke(e.currentTarget, e);
|
|
2349
2415
|
}
|
|
2350
|
-
function
|
|
2416
|
+
function ao(e, t) {
|
|
2351
2417
|
const { element: n, orientation: o, items: r } = e, i = n.getBoundingClientRect(), s = o === "horizontal";
|
|
2352
|
-
return
|
|
2418
|
+
return gt({
|
|
2353
2419
|
expandHitTargets: false,
|
|
2354
2420
|
axis: e,
|
|
2355
2421
|
includeDisabled: true
|
|
2356
|
-
}).map(({ items: a, rect:
|
|
2357
|
-
const
|
|
2422
|
+
}).map(({ items: a, rect: u, separator: l }, d) => {
|
|
2423
|
+
const g = r.indexOf(a[0]), p = s ? u.left + u.width / 2 : u.top + u.height / 2;
|
|
2358
2424
|
return {
|
|
2359
2425
|
active: t.some((f) => {
|
|
2360
2426
|
if (f.axis !== e || f.items[0] !== a[0])
|
|
2361
2427
|
return false;
|
|
2362
|
-
if (
|
|
2363
|
-
return f.separator ===
|
|
2364
|
-
const
|
|
2365
|
-
return Y(
|
|
2428
|
+
if (l || f.separator)
|
|
2429
|
+
return f.separator === l;
|
|
2430
|
+
const y = s ? f.rect.left + f.rect.width / 2 : f.rect.top + f.rect.height / 2;
|
|
2431
|
+
return Y(p, y);
|
|
2366
2432
|
}),
|
|
2367
2433
|
axis: e,
|
|
2368
|
-
key:
|
|
2434
|
+
key: l ? `separator-${l.id}` : `panel-${a[0].id}-${d}`,
|
|
2369
2435
|
offset: 0,
|
|
2370
|
-
itemIndex:
|
|
2436
|
+
itemIndex: g,
|
|
2371
2437
|
rect: new DOMRect(
|
|
2372
|
-
(s && !
|
|
2373
|
-
(!s && !
|
|
2374
|
-
s && !
|
|
2375
|
-
!s && !
|
|
2438
|
+
(s && !l ? p : u.left) - i.left - n.clientLeft + n.scrollLeft,
|
|
2439
|
+
(!s && !l ? p : u.top) - i.top - n.clientTop + n.scrollTop,
|
|
2440
|
+
s && !l ? 0 : u.width,
|
|
2441
|
+
!s && !l ? 0 : u.height
|
|
2376
2442
|
),
|
|
2377
|
-
separator:
|
|
2443
|
+
separator: l
|
|
2378
2444
|
};
|
|
2379
2445
|
});
|
|
2380
2446
|
}
|
|
2381
|
-
function
|
|
2447
|
+
function Ft$1(e) {
|
|
2382
2448
|
if (e.defaultPrevented)
|
|
2383
2449
|
return;
|
|
2384
2450
|
if (e.pointerType === "mouse" && e.button > 0)
|
|
2385
2451
|
return;
|
|
2386
|
-
const t =
|
|
2387
|
-
if (
|
|
2452
|
+
const t = ie();
|
|
2453
|
+
if (t.state === "active") {
|
|
2454
|
+
mn(t, e) && ke(
|
|
2455
|
+
t.ownerDocument,
|
|
2456
|
+
t
|
|
2457
|
+
);
|
|
2458
|
+
return;
|
|
2459
|
+
}
|
|
2460
|
+
const n = ge(), o = bt$1(
|
|
2461
|
+
e,
|
|
2462
|
+
n,
|
|
2463
|
+
e.currentTarget
|
|
2464
|
+
);
|
|
2465
|
+
if (o.length === 0)
|
|
2388
2466
|
return;
|
|
2389
|
-
const
|
|
2390
|
-
let
|
|
2391
|
-
|
|
2392
|
-
|
|
2467
|
+
const r = /* @__PURE__ */ new Map();
|
|
2468
|
+
let i = false;
|
|
2469
|
+
o.forEach((c) => {
|
|
2470
|
+
c.separator && (i || (i = true, c.separator.element.focus({
|
|
2393
2471
|
// @ts-expect-error https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#browser_compatibility
|
|
2394
2472
|
focusVisible: false,
|
|
2395
2473
|
preventScroll: true
|
|
2396
2474
|
})));
|
|
2397
|
-
const
|
|
2398
|
-
|
|
2475
|
+
const a = n.get(c.axis);
|
|
2476
|
+
a && r.set(c.axis, a.layout);
|
|
2399
2477
|
});
|
|
2400
|
-
const
|
|
2401
|
-
(
|
|
2478
|
+
const s = Array.from(r.keys()).flatMap(
|
|
2479
|
+
(c) => c.resizePreviewMode === "separator" ? ao(c, o) : []
|
|
2402
2480
|
);
|
|
2403
2481
|
de({
|
|
2404
2482
|
cursorFlags: 0,
|
|
2405
2483
|
didPointerMove: false,
|
|
2406
|
-
hitRegions:
|
|
2407
|
-
initialLayoutMap:
|
|
2484
|
+
hitRegions: o,
|
|
2485
|
+
initialLayoutMap: r,
|
|
2486
|
+
ownerDocument: e.currentTarget,
|
|
2408
2487
|
pointerDownAtPoint: { x: e.clientX, y: e.clientY },
|
|
2409
|
-
|
|
2410
|
-
|
|
2488
|
+
pointerId: e.pointerId,
|
|
2489
|
+
pointerType: e.pointerType,
|
|
2490
|
+
previewLayoutMap: new Map(r),
|
|
2491
|
+
previews: s,
|
|
2411
2492
|
state: "active"
|
|
2412
2493
|
}), e.preventDefault();
|
|
2413
2494
|
}
|
|
2414
|
-
function
|
|
2415
|
-
const t =
|
|
2416
|
-
switch (
|
|
2417
|
-
case "active":
|
|
2418
|
-
|
|
2495
|
+
function _t$1(e) {
|
|
2496
|
+
const t = e.currentTarget, n = ge(), o = ie();
|
|
2497
|
+
switch (o.state) {
|
|
2498
|
+
case "active": {
|
|
2499
|
+
if (!nt$1(o, t, e))
|
|
2500
|
+
return;
|
|
2501
|
+
vt({
|
|
2419
2502
|
commit: false,
|
|
2420
|
-
document: e.currentTarget,
|
|
2421
2503
|
event: e,
|
|
2422
|
-
hitRegions:
|
|
2423
|
-
initialLayoutMap:
|
|
2424
|
-
mountedAxes:
|
|
2425
|
-
prevCursorFlags:
|
|
2504
|
+
hitRegions: o.hitRegions,
|
|
2505
|
+
initialLayoutMap: o.initialLayoutMap,
|
|
2506
|
+
mountedAxes: n,
|
|
2507
|
+
prevCursorFlags: o.cursorFlags
|
|
2426
2508
|
});
|
|
2509
|
+
}
|
|
2427
2510
|
}
|
|
2428
2511
|
}
|
|
2429
|
-
function
|
|
2512
|
+
function Bt(e) {
|
|
2430
2513
|
if (e.defaultPrevented)
|
|
2431
2514
|
return;
|
|
2432
|
-
const t =
|
|
2433
|
-
switch (
|
|
2515
|
+
const t = e.currentTarget, n = ie(), o = ge();
|
|
2516
|
+
switch (n.state) {
|
|
2434
2517
|
case "active": {
|
|
2518
|
+
if (!nt$1(n, t, e))
|
|
2519
|
+
return;
|
|
2435
2520
|
if (
|
|
2436
2521
|
// Skip this check for "pointerleave" events, else Firefox triggers a false positive (see #514)
|
|
2437
2522
|
e.buttons === 0
|
|
2438
2523
|
) {
|
|
2439
|
-
|
|
2524
|
+
ke(t, e);
|
|
2440
2525
|
return;
|
|
2441
2526
|
}
|
|
2442
|
-
for (const
|
|
2443
|
-
if (
|
|
2444
|
-
const { element:
|
|
2445
|
-
|
|
2527
|
+
for (const r of n.hitRegions)
|
|
2528
|
+
if (r.separator) {
|
|
2529
|
+
const { element: i } = r.separator;
|
|
2530
|
+
i.isConnected && !i.hasPointerCapture?.(e.pointerId) && i.setPointerCapture?.(e.pointerId);
|
|
2446
2531
|
}
|
|
2447
|
-
|
|
2532
|
+
vt({
|
|
2448
2533
|
commit: false,
|
|
2449
|
-
document: e.currentTarget,
|
|
2450
2534
|
event: e,
|
|
2451
|
-
hitRegions:
|
|
2452
|
-
initialLayoutMap:
|
|
2453
|
-
mountedAxes:
|
|
2454
|
-
pointerDownAtPoint:
|
|
2455
|
-
prevCursorFlags:
|
|
2535
|
+
hitRegions: n.hitRegions,
|
|
2536
|
+
initialLayoutMap: n.initialLayoutMap,
|
|
2537
|
+
mountedAxes: o,
|
|
2538
|
+
pointerDownAtPoint: n.pointerDownAtPoint,
|
|
2539
|
+
prevCursorFlags: n.cursorFlags
|
|
2456
2540
|
});
|
|
2457
2541
|
break;
|
|
2458
2542
|
}
|
|
2459
2543
|
default: {
|
|
2460
|
-
const
|
|
2461
|
-
|
|
2544
|
+
const r = bt$1(
|
|
2545
|
+
e,
|
|
2546
|
+
o,
|
|
2547
|
+
t
|
|
2548
|
+
);
|
|
2549
|
+
r.length === 0 ? n.state !== "inactive" && de({
|
|
2462
2550
|
cursorFlags: 0,
|
|
2463
2551
|
state: "inactive"
|
|
2464
2552
|
}) : de({
|
|
2465
2553
|
cursorFlags: 0,
|
|
2466
|
-
hitRegions:
|
|
2554
|
+
hitRegions: r,
|
|
2555
|
+
ownerDocument: t,
|
|
2467
2556
|
state: "hover"
|
|
2468
|
-
})
|
|
2557
|
+
});
|
|
2469
2558
|
break;
|
|
2470
2559
|
}
|
|
2471
2560
|
}
|
|
2472
2561
|
}
|
|
2473
|
-
function
|
|
2474
|
-
if (e.relatedTarget instanceof HTMLIFrameElement)
|
|
2475
|
-
|
|
2562
|
+
function qt(e) {
|
|
2563
|
+
if (e.relatedTarget instanceof HTMLIFrameElement) {
|
|
2564
|
+
const t = ie();
|
|
2565
|
+
switch (t.state) {
|
|
2476
2566
|
case "hover":
|
|
2477
|
-
de({
|
|
2567
|
+
t.ownerDocument === e.currentTarget && de({
|
|
2478
2568
|
cursorFlags: 0,
|
|
2479
2569
|
state: "inactive"
|
|
2480
2570
|
});
|
|
2481
2571
|
}
|
|
2572
|
+
}
|
|
2482
2573
|
}
|
|
2483
|
-
function
|
|
2484
|
-
|
|
2485
|
-
return;
|
|
2486
|
-
if (e.pointerType === "mouse" && e.button > 0)
|
|
2487
|
-
return;
|
|
2488
|
-
nn(
|
|
2489
|
-
e.currentTarget,
|
|
2490
|
-
e
|
|
2491
|
-
) && e.preventDefault();
|
|
2574
|
+
function Ht(e) {
|
|
2575
|
+
e.defaultPrevented || e.pointerType === "mouse" && e.button > 0 || pn(e.currentTarget, e);
|
|
2492
2576
|
}
|
|
2493
|
-
function
|
|
2494
|
-
e.target === e.currentTarget &&
|
|
2577
|
+
function Vt(e) {
|
|
2578
|
+
e.target === e.currentTarget && ke(e.currentTarget.document);
|
|
2579
|
+
}
|
|
2580
|
+
function jt$1(e) {
|
|
2581
|
+
ke(e.currentTarget.document);
|
|
2495
2582
|
}
|
|
2496
|
-
function
|
|
2583
|
+
function co(e) {
|
|
2497
2584
|
let t = 0, n = 0;
|
|
2498
2585
|
const o = {};
|
|
2499
2586
|
for (const i of e)
|
|
2500
2587
|
if (i.defaultSize !== void 0) {
|
|
2501
2588
|
t++;
|
|
2502
|
-
const s =
|
|
2589
|
+
const s = K(i.defaultSize);
|
|
2503
2590
|
n += s, o[i.itemId] = s;
|
|
2504
2591
|
} else
|
|
2505
2592
|
o[i.itemId] = void 0;
|
|
2506
2593
|
const r = e.length - t;
|
|
2507
2594
|
if (r !== 0) {
|
|
2508
|
-
const i =
|
|
2595
|
+
const i = K((100 - n) / r);
|
|
2509
2596
|
for (const s of e)
|
|
2510
2597
|
s.defaultSize === void 0 && (o[s.itemId] = i);
|
|
2511
2598
|
}
|
|
2512
2599
|
return o;
|
|
2513
2600
|
}
|
|
2514
|
-
function
|
|
2601
|
+
function lo(e, t) {
|
|
2515
2602
|
const n = e.map((r) => r.id), o = Object.keys(t);
|
|
2516
2603
|
if (n.length !== o.length)
|
|
2517
2604
|
return false;
|
|
@@ -2520,18 +2607,18 @@ function Xn(e, t) {
|
|
|
2520
2607
|
return false;
|
|
2521
2608
|
return true;
|
|
2522
2609
|
}
|
|
2523
|
-
function
|
|
2610
|
+
function Ut({
|
|
2524
2611
|
axis: e,
|
|
2525
2612
|
itemConstraints: t
|
|
2526
2613
|
}) {
|
|
2527
2614
|
const n = e.items.map(({ id: r }) => r).join(","), o = e.mutableState.defaultLayout;
|
|
2528
|
-
return e.mutableState.layouts[n] ?? (o &&
|
|
2615
|
+
return e.mutableState.layouts[n] ?? (o && lo(e.items, o) ? o : co(t));
|
|
2529
2616
|
}
|
|
2530
|
-
function
|
|
2617
|
+
function Wt({
|
|
2531
2618
|
itemIds: e,
|
|
2532
2619
|
layout: t
|
|
2533
2620
|
}) {
|
|
2534
|
-
return
|
|
2621
|
+
return Se({
|
|
2535
2622
|
layout: t,
|
|
2536
2623
|
itemConstraints: e.map((n) => ({
|
|
2537
2624
|
collapsedSize: 0,
|
|
@@ -2544,19 +2631,19 @@ function Ot$1({
|
|
|
2544
2631
|
}))
|
|
2545
2632
|
});
|
|
2546
2633
|
}
|
|
2547
|
-
function
|
|
2634
|
+
function uo(e, t, n) {
|
|
2548
2635
|
if (!n[0])
|
|
2549
2636
|
return;
|
|
2550
|
-
const r = e.items.find((
|
|
2637
|
+
const r = e.items.find((u) => u.element === t);
|
|
2551
2638
|
if (!r || !r.onResize)
|
|
2552
2639
|
return;
|
|
2553
|
-
const i =
|
|
2554
|
-
asPercentage:
|
|
2640
|
+
const i = Te({ axis: e }), s = e.orientation === "horizontal" ? r.element.offsetWidth : r.element.offsetHeight, c = r.mutableValues.prevSize, a = {
|
|
2641
|
+
asPercentage: K(s / i * 100),
|
|
2555
2642
|
inPixels: s
|
|
2556
2643
|
};
|
|
2557
|
-
r.mutableValues.prevSize = a, r.onResize(a, r.id,
|
|
2644
|
+
r.mutableValues.prevSize = a, r.onResize(a, r.id, c);
|
|
2558
2645
|
}
|
|
2559
|
-
function
|
|
2646
|
+
function yn(e, t) {
|
|
2560
2647
|
if (Object.keys(e).length !== Object.keys(t).length)
|
|
2561
2648
|
return false;
|
|
2562
2649
|
for (const o in e)
|
|
@@ -2564,10 +2651,10 @@ function sn(e, t) {
|
|
|
2564
2651
|
return false;
|
|
2565
2652
|
return true;
|
|
2566
2653
|
}
|
|
2567
|
-
function
|
|
2568
|
-
return e.length !== t.length ? false : e.every((n, o) =>
|
|
2654
|
+
function fo(e, t) {
|
|
2655
|
+
return e.length !== t.length ? false : e.every((n, o) => yn(n, t[o]));
|
|
2569
2656
|
}
|
|
2570
|
-
function
|
|
2657
|
+
function mo({
|
|
2571
2658
|
axis: e,
|
|
2572
2659
|
nextAxisSize: t,
|
|
2573
2660
|
prevAxisSize: n,
|
|
@@ -2576,173 +2663,186 @@ function Qn({
|
|
|
2576
2663
|
if (n <= 0 || t <= 0 || n === t)
|
|
2577
2664
|
return o;
|
|
2578
2665
|
let r = 0, i = 0, s = false;
|
|
2579
|
-
const
|
|
2666
|
+
const c = /* @__PURE__ */ new Map(), a = [];
|
|
2580
2667
|
for (const d of e.items) {
|
|
2581
|
-
const
|
|
2668
|
+
const g = o[d.id] ?? 0;
|
|
2582
2669
|
switch (d.constraintProps.groupResizeBehavior) {
|
|
2583
2670
|
case "preserve-pixel-size": {
|
|
2584
2671
|
s = true;
|
|
2585
|
-
const
|
|
2586
|
-
|
|
2672
|
+
const p = g / 100 * n, m = K(
|
|
2673
|
+
p / t * 100
|
|
2587
2674
|
);
|
|
2588
|
-
|
|
2675
|
+
c.set(d.id, m), r += m;
|
|
2589
2676
|
break;
|
|
2590
2677
|
}
|
|
2591
2678
|
case "preserve-relative-size":
|
|
2592
2679
|
default: {
|
|
2593
|
-
a.push(d.id), i +=
|
|
2680
|
+
a.push(d.id), i += g;
|
|
2594
2681
|
break;
|
|
2595
2682
|
}
|
|
2596
2683
|
}
|
|
2597
2684
|
}
|
|
2598
2685
|
if (!s || a.length === 0)
|
|
2599
2686
|
return o;
|
|
2600
|
-
const
|
|
2601
|
-
if (
|
|
2602
|
-
|
|
2687
|
+
const u = 100 - r, l = { ...o };
|
|
2688
|
+
if (c.forEach((d, g) => {
|
|
2689
|
+
l[g] = d;
|
|
2603
2690
|
}), i > 0)
|
|
2604
2691
|
for (const d of a) {
|
|
2605
|
-
const
|
|
2606
|
-
|
|
2607
|
-
|
|
2692
|
+
const g = o[d] ?? 0;
|
|
2693
|
+
l[d] = K(
|
|
2694
|
+
g / i * u
|
|
2608
2695
|
);
|
|
2609
2696
|
}
|
|
2610
2697
|
else {
|
|
2611
|
-
const d =
|
|
2612
|
-
for (const
|
|
2613
|
-
|
|
2698
|
+
const d = K(u / a.length);
|
|
2699
|
+
for (const g of a)
|
|
2700
|
+
l[g] = d;
|
|
2614
2701
|
}
|
|
2615
|
-
return
|
|
2702
|
+
return l;
|
|
2616
2703
|
}
|
|
2617
2704
|
const Le = /* @__PURE__ */ new Map();
|
|
2618
|
-
|
|
2705
|
+
let Yt = false;
|
|
2706
|
+
function Sn(e) {
|
|
2619
2707
|
let t = true;
|
|
2620
|
-
|
|
2708
|
+
O(
|
|
2621
2709
|
e.element.ownerDocument.defaultView,
|
|
2622
2710
|
"Cannot register an unmounted Group"
|
|
2623
2711
|
);
|
|
2624
2712
|
const n = e.element.ownerDocument.defaultView.ResizeObserver, o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = new n((m) => {
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2713
|
+
let f;
|
|
2714
|
+
et();
|
|
2715
|
+
try {
|
|
2716
|
+
for (const y of m) {
|
|
2717
|
+
const { borderBoxSize: h, target: S } = y;
|
|
2718
|
+
if (S === e.element) {
|
|
2719
|
+
if (t) {
|
|
2720
|
+
const z = Te({ axis: e });
|
|
2721
|
+
if (z === 0)
|
|
2722
|
+
break;
|
|
2723
|
+
const x = ae(e.id);
|
|
2724
|
+
if (!x)
|
|
2725
|
+
break;
|
|
2726
|
+
const R = ut(e);
|
|
2727
|
+
let N = x.requestedAxisSize, $ = x.requestedLayout;
|
|
2728
|
+
x.defaultLayoutDeferred && (N = z, $ = Wt({
|
|
2729
|
+
itemIds: e.items.map(({ id: v }) => v),
|
|
2730
|
+
layout: Ut({
|
|
2731
|
+
axis: e,
|
|
2732
|
+
itemConstraints: R
|
|
2733
|
+
})
|
|
2734
|
+
}));
|
|
2735
|
+
const b = mo({
|
|
2640
2736
|
axis: e,
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
})
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2737
|
+
nextAxisSize: z,
|
|
2738
|
+
prevAxisSize: N,
|
|
2739
|
+
prevLayout: $
|
|
2740
|
+
}), w = Se({
|
|
2741
|
+
layout: b,
|
|
2742
|
+
itemConstraints: R
|
|
2743
|
+
});
|
|
2744
|
+
if (!x.defaultLayoutDeferred && se(x.layout, w) && fo(
|
|
2745
|
+
x.derivedItemConstraints,
|
|
2746
|
+
R
|
|
2747
|
+
) && x.axisSize === z)
|
|
2748
|
+
continue;
|
|
2749
|
+
fe(e, {
|
|
2750
|
+
defaultLayoutDeferred: false,
|
|
2751
|
+
derivedItemConstraints: R,
|
|
2752
|
+
axisSize: z,
|
|
2753
|
+
layout: w,
|
|
2754
|
+
requestedAxisSize: N,
|
|
2755
|
+
requestedLayout: $,
|
|
2756
|
+
separatorToItems: x.separatorToItems
|
|
2757
|
+
});
|
|
2758
|
+
}
|
|
2759
|
+
} else
|
|
2760
|
+
try {
|
|
2761
|
+
uo(e, S, h);
|
|
2762
|
+
} catch (z) {
|
|
2763
|
+
f ??= { error: z };
|
|
2764
|
+
}
|
|
2765
|
+
}
|
|
2766
|
+
} finally {
|
|
2767
|
+
tt();
|
|
2670
2768
|
}
|
|
2769
|
+
if (f)
|
|
2770
|
+
throw f.error;
|
|
2671
2771
|
});
|
|
2672
2772
|
i.observe(e.element), e.items.forEach((m) => {
|
|
2673
|
-
|
|
2773
|
+
O(
|
|
2674
2774
|
!o.has(m.id),
|
|
2675
2775
|
`Panel ids must be unique; id "${m.id}" was used more than once`
|
|
2676
2776
|
), o.add(m.id), m.onResize && i.observe(m.element);
|
|
2677
2777
|
});
|
|
2678
|
-
const s =
|
|
2778
|
+
const s = Te({ axis: e }), c = ut(e), a = Ut({
|
|
2679
2779
|
axis: e,
|
|
2680
|
-
itemConstraints:
|
|
2681
|
-
}),
|
|
2780
|
+
itemConstraints: c
|
|
2781
|
+
}), u = Se({
|
|
2682
2782
|
layout: a,
|
|
2683
|
-
itemConstraints:
|
|
2684
|
-
}),
|
|
2783
|
+
itemConstraints: c
|
|
2784
|
+
}), l = e.element.ownerDocument, d = l.defaultView;
|
|
2685
2785
|
Le.set(
|
|
2686
|
-
|
|
2687
|
-
(Le.get(
|
|
2786
|
+
l,
|
|
2787
|
+
(Le.get(l) ?? 0) + 1
|
|
2688
2788
|
);
|
|
2689
|
-
const
|
|
2690
|
-
return
|
|
2691
|
-
m.separator &&
|
|
2789
|
+
const g = /* @__PURE__ */ new Map();
|
|
2790
|
+
return gt({ axis: e, includeDisabled: true }).forEach((m) => {
|
|
2791
|
+
m.separator && g.set(m.separator, m.items);
|
|
2692
2792
|
}), fe(e, {
|
|
2693
2793
|
defaultLayoutDeferred: s === 0,
|
|
2694
|
-
derivedItemConstraints:
|
|
2794
|
+
derivedItemConstraints: c,
|
|
2695
2795
|
axisSize: s,
|
|
2696
|
-
layout:
|
|
2796
|
+
layout: u,
|
|
2697
2797
|
requestedAxisSize: s,
|
|
2698
|
-
requestedLayout:
|
|
2798
|
+
requestedLayout: Wt({
|
|
2699
2799
|
itemIds: e.items.map(({ id: m }) => m),
|
|
2700
2800
|
layout: a
|
|
2701
2801
|
}),
|
|
2702
|
-
separatorToItems:
|
|
2802
|
+
separatorToItems: g
|
|
2703
2803
|
}), e.separators.forEach((m) => {
|
|
2704
|
-
|
|
2804
|
+
O(
|
|
2705
2805
|
!r.has(m.id),
|
|
2706
2806
|
`Separator ids must be unique; id "${m.id}" was used more than once`
|
|
2707
|
-
), r.add(m.id), m.element.addEventListener("keydown",
|
|
2708
|
-
}), Le.get(
|
|
2807
|
+
), r.add(m.id), m.element.addEventListener("keydown", Ot$1);
|
|
2808
|
+
}), Yt || (Yt = true, pt(Bn)), Le.get(l) === 1 && (l.addEventListener("contextmenu", Tt$1, true), l.addEventListener("dblclick", $t$1, true), l.addEventListener(
|
|
2709
2809
|
"lostpointercapture",
|
|
2710
|
-
|
|
2810
|
+
Nt$1,
|
|
2711
2811
|
true
|
|
2712
|
-
),
|
|
2812
|
+
), l.addEventListener(
|
|
2713
2813
|
"pointercancel",
|
|
2714
|
-
|
|
2814
|
+
Gt$1,
|
|
2715
2815
|
true
|
|
2716
|
-
),
|
|
2816
|
+
), l.addEventListener("pointerdown", Ft$1, true), l.addEventListener("pointerleave", _t$1), l.addEventListener("pointermove", Bt), l.addEventListener("pointerout", qt), l.addEventListener("pointerup", Ht, true), d?.addEventListener("blur", Vt), d?.addEventListener("pagehide", jt$1)), function() {
|
|
2717
2817
|
t = false, Le.set(
|
|
2718
|
-
|
|
2719
|
-
Math.max(0, (Le.get(
|
|
2720
|
-
),
|
|
2721
|
-
f.element.removeEventListener("keydown",
|
|
2722
|
-
}), Le.get(
|
|
2818
|
+
l,
|
|
2819
|
+
Math.max(0, (Le.get(l) ?? 0) - 1)
|
|
2820
|
+
), Xn(e), Gn(e), e.separators.forEach((f) => {
|
|
2821
|
+
f.element.removeEventListener("keydown", Ot$1);
|
|
2822
|
+
}), Le.get(l) || (l.removeEventListener(
|
|
2723
2823
|
"contextmenu",
|
|
2724
|
-
|
|
2824
|
+
Tt$1,
|
|
2725
2825
|
true
|
|
2726
|
-
),
|
|
2826
|
+
), l.removeEventListener(
|
|
2727
2827
|
"dblclick",
|
|
2728
|
-
|
|
2828
|
+
$t$1,
|
|
2729
2829
|
true
|
|
2730
|
-
),
|
|
2830
|
+
), l.removeEventListener(
|
|
2731
2831
|
"lostpointercapture",
|
|
2732
|
-
|
|
2832
|
+
Nt$1,
|
|
2733
2833
|
true
|
|
2734
|
-
),
|
|
2834
|
+
), l.removeEventListener(
|
|
2735
2835
|
"pointercancel",
|
|
2736
|
-
|
|
2836
|
+
Gt$1,
|
|
2737
2837
|
true
|
|
2738
|
-
),
|
|
2838
|
+
), l.removeEventListener(
|
|
2739
2839
|
"pointerdown",
|
|
2740
|
-
|
|
2840
|
+
Ft$1,
|
|
2741
2841
|
true
|
|
2742
|
-
),
|
|
2842
|
+
), l.removeEventListener("pointerleave", _t$1), l.removeEventListener("pointermove", Bt), l.removeEventListener("pointerout", qt), l.removeEventListener("pointerup", Ht, true), d?.removeEventListener("blur", Vt), d?.removeEventListener("pagehide", jt$1)), i.disconnect();
|
|
2743
2843
|
};
|
|
2744
2844
|
}
|
|
2745
|
-
function
|
|
2845
|
+
function vn({
|
|
2746
2846
|
derivedItemConstraints: e,
|
|
2747
2847
|
axis: t,
|
|
2748
2848
|
layout: n,
|
|
@@ -2752,56 +2852,56 @@ function ln({
|
|
|
2752
2852
|
const i = t.items.map(({ id: s }) => s).join(",");
|
|
2753
2853
|
t.mutableState.layouts[i] = r, o && e.forEach((s) => {
|
|
2754
2854
|
if (s.collapsible) {
|
|
2755
|
-
const
|
|
2855
|
+
const c = Y(
|
|
2756
2856
|
s.collapsedSize,
|
|
2757
2857
|
n[s.itemId]
|
|
2758
2858
|
), a = Y(
|
|
2759
2859
|
s.collapsedSize,
|
|
2760
2860
|
o[s.itemId]
|
|
2761
2861
|
);
|
|
2762
|
-
|
|
2862
|
+
c && !a && (t.mutableState.expandedItemSizes[s.itemId] = o[s.itemId]);
|
|
2763
2863
|
}
|
|
2764
2864
|
});
|
|
2765
2865
|
}
|
|
2766
|
-
function
|
|
2866
|
+
function bn() {
|
|
2767
2867
|
const [e, t] = React.useState({}), n = React.useCallback(() => t({}), []);
|
|
2768
2868
|
return [e, n];
|
|
2769
2869
|
}
|
|
2770
|
-
function
|
|
2870
|
+
function ot(e) {
|
|
2771
2871
|
const t = React.useRef({ ...e });
|
|
2772
2872
|
return ne(() => {
|
|
2773
2873
|
for (const n in e)
|
|
2774
2874
|
t.current[n] = e[n];
|
|
2775
2875
|
}, [e]), t.current;
|
|
2776
2876
|
}
|
|
2777
|
-
const
|
|
2778
|
-
function
|
|
2877
|
+
const wt$1 = React.createContext(null);
|
|
2878
|
+
function po({
|
|
2779
2879
|
layout: e,
|
|
2780
2880
|
itemConstraints: t,
|
|
2781
2881
|
itemId: n,
|
|
2782
2882
|
itemIndex: o
|
|
2783
2883
|
}) {
|
|
2784
2884
|
let r, i;
|
|
2785
|
-
const s = e[n],
|
|
2885
|
+
const s = e[n], c = t.find(
|
|
2786
2886
|
(a) => a.itemId === n
|
|
2787
2887
|
);
|
|
2788
|
-
if (
|
|
2789
|
-
const a =
|
|
2790
|
-
i =
|
|
2791
|
-
layout:
|
|
2792
|
-
delta:
|
|
2888
|
+
if (c) {
|
|
2889
|
+
const a = c.maxSize, u = c.collapsible ? c.collapsedSize : c.minSize, l = [o, o + 1];
|
|
2890
|
+
i = Se({
|
|
2891
|
+
layout: qe({
|
|
2892
|
+
delta: u - s,
|
|
2793
2893
|
initialLayout: e,
|
|
2794
2894
|
itemConstraints: t,
|
|
2795
|
-
pivotIndices:
|
|
2895
|
+
pivotIndices: l,
|
|
2796
2896
|
prevLayout: e
|
|
2797
2897
|
}),
|
|
2798
2898
|
itemConstraints: t
|
|
2799
|
-
})[n], r =
|
|
2800
|
-
layout:
|
|
2899
|
+
})[n], r = Se({
|
|
2900
|
+
layout: qe({
|
|
2801
2901
|
delta: a - s,
|
|
2802
2902
|
initialLayout: e,
|
|
2803
2903
|
itemConstraints: t,
|
|
2804
|
-
pivotIndices:
|
|
2904
|
+
pivotIndices: l,
|
|
2805
2905
|
prevLayout: e
|
|
2806
2906
|
}),
|
|
2807
2907
|
itemConstraints: t
|
|
@@ -2814,7 +2914,7 @@ function eo({
|
|
|
2814
2914
|
valueNow: s
|
|
2815
2915
|
};
|
|
2816
2916
|
}
|
|
2817
|
-
function
|
|
2917
|
+
function xn({
|
|
2818
2918
|
attributes: e,
|
|
2819
2919
|
axisId: t,
|
|
2820
2920
|
axisOrientation: n,
|
|
@@ -2822,75 +2922,75 @@ function un({
|
|
|
2822
2922
|
className: r,
|
|
2823
2923
|
disableCursor: i,
|
|
2824
2924
|
disabled: s,
|
|
2825
|
-
disableDoubleClick:
|
|
2925
|
+
disableDoubleClick: c,
|
|
2826
2926
|
elementRef: a,
|
|
2827
|
-
id:
|
|
2828
|
-
isSharedHitRegion:
|
|
2927
|
+
id: u,
|
|
2928
|
+
isSharedHitRegion: l,
|
|
2829
2929
|
preview: d,
|
|
2830
|
-
registerSeparator:
|
|
2831
|
-
requiredStyle:
|
|
2930
|
+
registerSeparator: g,
|
|
2931
|
+
requiredStyle: p,
|
|
2832
2932
|
style: m,
|
|
2833
2933
|
styleDefaults: f,
|
|
2834
|
-
tabIndex:
|
|
2934
|
+
tabIndex: y = 0,
|
|
2835
2935
|
updateSeparatorProps: h
|
|
2836
2936
|
}) {
|
|
2837
|
-
const
|
|
2937
|
+
const S = ot({
|
|
2838
2938
|
disabled: s,
|
|
2839
|
-
disableDoubleClick:
|
|
2939
|
+
disableDoubleClick: c,
|
|
2840
2940
|
children: o,
|
|
2841
2941
|
className: r,
|
|
2842
2942
|
preview: d,
|
|
2843
2943
|
style: m
|
|
2844
|
-
}), [
|
|
2944
|
+
}), [z, x] = React.useState({}), [R, N] = React.useState("inactive"), [$, b] = React.useState(false), w = React.useRef(null), v = React.useRef(null), T = Ve(w, a), A = n === "horizontal" ? "vertical" : "horizontal";
|
|
2845
2945
|
ne(() => {
|
|
2846
|
-
const
|
|
2847
|
-
if (
|
|
2848
|
-
const
|
|
2849
|
-
disabled:
|
|
2850
|
-
disableDoubleClick:
|
|
2851
|
-
element:
|
|
2852
|
-
id:
|
|
2946
|
+
const C = w.current;
|
|
2947
|
+
if (C !== null) {
|
|
2948
|
+
const I = {
|
|
2949
|
+
disabled: S.disabled,
|
|
2950
|
+
disableDoubleClick: S.disableDoubleClick,
|
|
2951
|
+
element: C,
|
|
2952
|
+
id: u,
|
|
2853
2953
|
get children() {
|
|
2854
|
-
return
|
|
2954
|
+
return S.children;
|
|
2855
2955
|
},
|
|
2856
2956
|
get className() {
|
|
2857
|
-
return
|
|
2957
|
+
return S.className;
|
|
2858
2958
|
},
|
|
2859
2959
|
get preview() {
|
|
2860
|
-
return
|
|
2960
|
+
return S.preview;
|
|
2861
2961
|
},
|
|
2862
2962
|
get style() {
|
|
2863
|
-
return
|
|
2963
|
+
return S.style;
|
|
2864
2964
|
}
|
|
2865
2965
|
};
|
|
2866
|
-
v.current =
|
|
2867
|
-
const M =
|
|
2966
|
+
v.current = I;
|
|
2967
|
+
const M = g(I), q = pt(
|
|
2868
2968
|
(H) => {
|
|
2869
|
-
|
|
2969
|
+
N(
|
|
2870
2970
|
H.next.state !== "inactive" && H.next.hitRegions.some(
|
|
2871
|
-
(Z) => Z.separator ===
|
|
2971
|
+
(Z) => Z.separator === I || (l?.(Z) ?? false)
|
|
2872
2972
|
) ? H.next.state : "inactive"
|
|
2873
2973
|
);
|
|
2874
2974
|
}
|
|
2875
|
-
), J =
|
|
2975
|
+
), J = Be(
|
|
2876
2976
|
t,
|
|
2877
2977
|
(H) => {
|
|
2878
|
-
const { derivedItemConstraints: Z, layout:
|
|
2978
|
+
const { derivedItemConstraints: Z, layout: ve, separatorToItems: ze } = H.next, Ie = ze.get(I);
|
|
2879
2979
|
if (Ie) {
|
|
2880
|
-
const
|
|
2881
|
-
(
|
|
2882
|
-
), { layoutStrategy:
|
|
2980
|
+
const be = Ie[0], L = Z.findIndex(
|
|
2981
|
+
(F2) => F2.itemId === be.id
|
|
2982
|
+
), { layoutStrategy: P } = H.axis;
|
|
2883
2983
|
x({
|
|
2884
|
-
...
|
|
2885
|
-
layout:
|
|
2984
|
+
...po({
|
|
2985
|
+
layout: ve,
|
|
2886
2986
|
itemConstraints: Z,
|
|
2887
|
-
itemId:
|
|
2987
|
+
itemId: be.id,
|
|
2888
2988
|
itemIndex: L
|
|
2889
2989
|
}),
|
|
2890
2990
|
// Items without DOM elements of their own (e.g. Grid tracks) control other elements
|
|
2891
|
-
...
|
|
2892
|
-
valueControls:
|
|
2893
|
-
|
|
2991
|
+
...P?.getItemAriaControls && {
|
|
2992
|
+
valueControls: P.getItemAriaControls(
|
|
2993
|
+
be.id
|
|
2894
2994
|
)
|
|
2895
2995
|
}
|
|
2896
2996
|
});
|
|
@@ -2901,83 +3001,83 @@ function un({
|
|
|
2901
3001
|
v.current = null, q(), J(), M();
|
|
2902
3002
|
};
|
|
2903
3003
|
}
|
|
2904
|
-
}, [t,
|
|
2905
|
-
const
|
|
2906
|
-
|
|
3004
|
+
}, [t, u, l, g, S]), ne(() => {
|
|
3005
|
+
const C = v.current;
|
|
3006
|
+
C && Nn(C);
|
|
2907
3007
|
}, [d]), React.useEffect(() => {
|
|
2908
|
-
h(
|
|
2909
|
-
}, [s,
|
|
2910
|
-
let R;
|
|
2911
|
-
s && !i && (R = "not-allowed");
|
|
3008
|
+
h(u, { disabled: s, disableDoubleClick: c });
|
|
3009
|
+
}, [s, c, u, h]);
|
|
2912
3010
|
let E;
|
|
3011
|
+
s && !i && (E = "not-allowed");
|
|
3012
|
+
let D;
|
|
2913
3013
|
if (s)
|
|
2914
|
-
|
|
3014
|
+
D = "disabled";
|
|
2915
3015
|
else
|
|
2916
|
-
switch (
|
|
3016
|
+
switch (R) {
|
|
2917
3017
|
case "active": {
|
|
2918
|
-
|
|
3018
|
+
D = "active";
|
|
2919
3019
|
break;
|
|
2920
3020
|
}
|
|
2921
3021
|
default:
|
|
2922
|
-
|
|
3022
|
+
$ ? D = "focus" : D = R;
|
|
2923
3023
|
}
|
|
2924
3024
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2925
3025
|
"div",
|
|
2926
3026
|
{
|
|
2927
3027
|
...e,
|
|
2928
|
-
"aria-controls":
|
|
3028
|
+
"aria-controls": z.valueControls,
|
|
2929
3029
|
"aria-disabled": s || void 0,
|
|
2930
|
-
"aria-orientation":
|
|
2931
|
-
"aria-valuemax":
|
|
2932
|
-
"aria-valuemin":
|
|
2933
|
-
"aria-valuenow":
|
|
3030
|
+
"aria-orientation": A,
|
|
3031
|
+
"aria-valuemax": z.valueMax,
|
|
3032
|
+
"aria-valuemin": z.valueMin,
|
|
3033
|
+
"aria-valuenow": z.valueNow,
|
|
2934
3034
|
children: o,
|
|
2935
3035
|
className: r,
|
|
2936
|
-
"data-separator":
|
|
2937
|
-
"data-testid":
|
|
2938
|
-
id:
|
|
3036
|
+
"data-separator": D,
|
|
3037
|
+
"data-testid": u,
|
|
3038
|
+
id: u,
|
|
2939
3039
|
onBlur: () => b(false),
|
|
2940
3040
|
onFocus: () => b(true),
|
|
2941
3041
|
ref: T,
|
|
2942
3042
|
role: "separator",
|
|
2943
3043
|
style: {
|
|
2944
3044
|
...f,
|
|
2945
|
-
cursor:
|
|
3045
|
+
cursor: E,
|
|
2946
3046
|
...m,
|
|
2947
|
-
...
|
|
3047
|
+
...p,
|
|
2948
3048
|
// Inform the browser that the library is handling touch events for this element
|
|
2949
3049
|
// See github.com/bvaughn/react-resizable-panels/issues/662
|
|
2950
3050
|
touchAction: "none"
|
|
2951
3051
|
},
|
|
2952
|
-
tabIndex: s ? void 0 :
|
|
3052
|
+
tabIndex: s ? void 0 : y
|
|
2953
3053
|
}
|
|
2954
3054
|
);
|
|
2955
3055
|
}
|
|
2956
|
-
function
|
|
3056
|
+
function vo(e) {
|
|
2957
3057
|
for (let t = 1; t < e.length; t++)
|
|
2958
|
-
if (
|
|
3058
|
+
if (ht$1(e[t - 1], e[t]) > 0)
|
|
2959
3059
|
return false;
|
|
2960
3060
|
return true;
|
|
2961
3061
|
}
|
|
2962
|
-
function
|
|
3062
|
+
function bo({
|
|
2963
3063
|
separator: e
|
|
2964
3064
|
}) {
|
|
2965
3065
|
const { element: t } = e, n = React.useRef(null);
|
|
2966
3066
|
return ne(() => {
|
|
2967
3067
|
const o = t.cloneNode(true), r = [t, ...t.querySelectorAll("*")], i = [o, ...o.querySelectorAll("*")], s = t.ownerDocument.defaultView;
|
|
2968
|
-
return r.forEach((
|
|
2969
|
-
const
|
|
2970
|
-
if (
|
|
2971
|
-
const
|
|
2972
|
-
for (let d = 0; d <
|
|
2973
|
-
const
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
3068
|
+
return r.forEach((c, a) => {
|
|
3069
|
+
const u = i[a];
|
|
3070
|
+
if (u instanceof s.HTMLElement || u instanceof s.SVGElement) {
|
|
3071
|
+
const l = s.getComputedStyle(c);
|
|
3072
|
+
for (let d = 0; d < l.length; d++) {
|
|
3073
|
+
const g = l.item(d);
|
|
3074
|
+
u.style.setProperty(
|
|
3075
|
+
g,
|
|
3076
|
+
l.getPropertyValue(g)
|
|
2977
3077
|
);
|
|
2978
3078
|
}
|
|
2979
3079
|
}
|
|
2980
|
-
|
|
3080
|
+
u.removeAttribute("data-testid"), u.removeAttribute("id");
|
|
2981
3081
|
}), Object.assign(o.style, {
|
|
2982
3082
|
boxSizing: "border-box",
|
|
2983
3083
|
height: "100%",
|
|
@@ -2999,24 +3099,24 @@ function so({
|
|
|
2999
3099
|
}
|
|
3000
3100
|
);
|
|
3001
3101
|
}
|
|
3002
|
-
function
|
|
3003
|
-
const e = React.useContext(
|
|
3004
|
-
return
|
|
3102
|
+
function rt() {
|
|
3103
|
+
const e = React.useContext(wt$1);
|
|
3104
|
+
return O(
|
|
3005
3105
|
e,
|
|
3006
3106
|
"Group Context not found; did you render a Panel or Separator outside of a Group?"
|
|
3007
3107
|
), e;
|
|
3008
3108
|
}
|
|
3009
|
-
function
|
|
3010
|
-
const { registerOverlay: t } =
|
|
3011
|
-
|
|
3109
|
+
function In(e) {
|
|
3110
|
+
const { registerOverlay: t } = rt(), n = React.useRef(e);
|
|
3111
|
+
yn(n.current, e) || (n.current = e);
|
|
3012
3112
|
const o = n.current;
|
|
3013
3113
|
return ne(
|
|
3014
3114
|
() => t(o),
|
|
3015
3115
|
[t, o]
|
|
3016
3116
|
), null;
|
|
3017
3117
|
}
|
|
3018
|
-
|
|
3019
|
-
function
|
|
3118
|
+
In.displayName = "SeparatorOverlay";
|
|
3119
|
+
function xo({
|
|
3020
3120
|
active: e,
|
|
3021
3121
|
orientation: t,
|
|
3022
3122
|
style: n,
|
|
@@ -3053,20 +3153,20 @@ function ao({
|
|
|
3053
3153
|
}
|
|
3054
3154
|
);
|
|
3055
3155
|
}
|
|
3056
|
-
function
|
|
3156
|
+
function wo({
|
|
3057
3157
|
overlay: e,
|
|
3058
3158
|
preview: t
|
|
3059
3159
|
}) {
|
|
3060
3160
|
const { axis: n, offset: o, rect: r, separator: i } = t, s = n.orientation === "horizontal";
|
|
3061
|
-
let
|
|
3062
|
-
return React.isValidElement(
|
|
3063
|
-
|
|
3161
|
+
let c = i?.preview, a = e;
|
|
3162
|
+
return React.isValidElement(c) && c.type === In && (a = c.props, c = void 0), c == null && (a ? c = /* @__PURE__ */ jsxRuntime.jsx(
|
|
3163
|
+
xo,
|
|
3064
3164
|
{
|
|
3065
3165
|
...a,
|
|
3066
3166
|
active: t.active,
|
|
3067
3167
|
orientation: n.orientation
|
|
3068
3168
|
}
|
|
3069
|
-
) : i && (
|
|
3169
|
+
) : i && (c = /* @__PURE__ */ jsxRuntime.jsx(bo, { separator: i }))), /* @__PURE__ */ jsxRuntime.jsx(
|
|
3070
3170
|
"div",
|
|
3071
3171
|
{
|
|
3072
3172
|
"aria-hidden": "true",
|
|
@@ -3081,50 +3181,50 @@ function lo({
|
|
|
3081
3181
|
transform: s ? `translateX(${o}px)` : `translateY(${o}px)`,
|
|
3082
3182
|
width: r.width
|
|
3083
3183
|
},
|
|
3084
|
-
children:
|
|
3184
|
+
children: c
|
|
3085
3185
|
}
|
|
3086
3186
|
);
|
|
3087
3187
|
}
|
|
3088
|
-
function
|
|
3089
|
-
return Array.from(e).sort(
|
|
3188
|
+
function zo(e) {
|
|
3189
|
+
return Array.from(e).sort(ht$1);
|
|
3090
3190
|
}
|
|
3091
|
-
function
|
|
3191
|
+
function Io(e, t) {
|
|
3092
3192
|
const n = React.useRef({
|
|
3093
3193
|
getLayout: () => ({}),
|
|
3094
|
-
setLayout:
|
|
3194
|
+
setLayout: Fn
|
|
3095
3195
|
});
|
|
3096
3196
|
React.useImperativeHandle(t, () => n.current, []), ne(() => {
|
|
3097
3197
|
Object.assign(
|
|
3098
3198
|
n.current,
|
|
3099
|
-
|
|
3199
|
+
_e({ axisId: e })
|
|
3100
3200
|
);
|
|
3101
3201
|
});
|
|
3102
3202
|
}
|
|
3103
|
-
function
|
|
3203
|
+
function Lo({
|
|
3104
3204
|
groupId: e,
|
|
3105
3205
|
resizePreviewMode: t
|
|
3106
3206
|
}) {
|
|
3107
3207
|
const [n, o] = React.useState([]), r = React.useRef(n);
|
|
3108
3208
|
return ne(() => {
|
|
3109
|
-
const i = (
|
|
3110
|
-
const a =
|
|
3209
|
+
const i = (c) => {
|
|
3210
|
+
const a = Ee(e), u = t === "separator" && c.state === "active" ? c.previews.filter(
|
|
3111
3211
|
(d) => d.axis === a && (d.active || !Y(d.offset, 0))
|
|
3112
|
-
) : [],
|
|
3113
|
-
|
|
3114
|
-
(d,
|
|
3115
|
-
) || (r.current =
|
|
3212
|
+
) : [], l = r.current;
|
|
3213
|
+
l.length === u.length && u.every(
|
|
3214
|
+
(d, g) => d === l[g]
|
|
3215
|
+
) || (r.current = u, o(u));
|
|
3116
3216
|
};
|
|
3117
3217
|
if (t !== "separator") {
|
|
3118
|
-
i(
|
|
3218
|
+
i(ie());
|
|
3119
3219
|
return;
|
|
3120
3220
|
}
|
|
3121
|
-
const s =
|
|
3122
|
-
({ next:
|
|
3221
|
+
const s = pt(
|
|
3222
|
+
({ next: c }) => i(c)
|
|
3123
3223
|
);
|
|
3124
|
-
return i(
|
|
3224
|
+
return i(ie()), s;
|
|
3125
3225
|
}, [e, t]), n;
|
|
3126
3226
|
}
|
|
3127
|
-
function
|
|
3227
|
+
function Co({
|
|
3128
3228
|
children: e,
|
|
3129
3229
|
className: t,
|
|
3130
3230
|
defaultLayout: n,
|
|
@@ -3132,40 +3232,40 @@ function mo({
|
|
|
3132
3232
|
disabled: r,
|
|
3133
3233
|
elementRef: i,
|
|
3134
3234
|
groupRef: s,
|
|
3135
|
-
id:
|
|
3235
|
+
id: c,
|
|
3136
3236
|
onLayoutChange: a,
|
|
3137
|
-
onLayoutChanged:
|
|
3138
|
-
orientation:
|
|
3237
|
+
onLayoutChanged: u,
|
|
3238
|
+
orientation: l = "horizontal",
|
|
3139
3239
|
resizePreviewMode: d = "panel",
|
|
3140
|
-
resizeTargetMinimumSize:
|
|
3240
|
+
resizeTargetMinimumSize: g = {
|
|
3141
3241
|
coarse: 20,
|
|
3142
3242
|
fine: 10
|
|
3143
3243
|
},
|
|
3144
|
-
style:
|
|
3244
|
+
style: p,
|
|
3145
3245
|
...m
|
|
3146
3246
|
}) {
|
|
3147
3247
|
const f = React.useRef({
|
|
3148
3248
|
onLayoutChange: {},
|
|
3149
3249
|
onLayoutChanged: {}
|
|
3150
|
-
}),
|
|
3151
|
-
|
|
3152
|
-
}), h =
|
|
3153
|
-
(
|
|
3154
|
-
|
|
3155
|
-
}
|
|
3156
|
-
),
|
|
3157
|
-
groupId:
|
|
3250
|
+
}), y = ye((I) => {
|
|
3251
|
+
se(f.current.onLayoutChange, I) || (f.current.onLayoutChange = I, a?.(I));
|
|
3252
|
+
}), h = ye(
|
|
3253
|
+
(I, M, q) => {
|
|
3254
|
+
se(f.current.onLayoutChanged, I) || (f.current.onLayoutChanged = I, u?.(I, { isUserInteraction: M, requestedLayout: q }));
|
|
3255
|
+
}
|
|
3256
|
+
), S = De(c), [z, x] = React.useState(), R = Lo({
|
|
3257
|
+
groupId: S,
|
|
3158
3258
|
resizePreviewMode: d
|
|
3159
|
-
}),
|
|
3259
|
+
}), N = React.useRef(null), [$, b] = bn(), w = React.useRef([]), v = React.useRef({
|
|
3160
3260
|
lastExpandedPanelSizes: {},
|
|
3161
3261
|
layouts: {},
|
|
3162
3262
|
panels: [],
|
|
3163
3263
|
separators: []
|
|
3164
|
-
}), T =
|
|
3165
|
-
|
|
3166
|
-
const
|
|
3167
|
-
(
|
|
3168
|
-
const q = ae(
|
|
3264
|
+
}), T = Ve(N, i);
|
|
3265
|
+
Io(S, s);
|
|
3266
|
+
const A = ye(
|
|
3267
|
+
(I, M) => {
|
|
3268
|
+
const q = ae(I);
|
|
3169
3269
|
if (q)
|
|
3170
3270
|
return {
|
|
3171
3271
|
flexGrow: q.layout[M] ?? 1
|
|
@@ -3175,209 +3275,226 @@ function mo({
|
|
|
3175
3275
|
flexGrow: n?.[M]
|
|
3176
3276
|
};
|
|
3177
3277
|
}
|
|
3178
|
-
),
|
|
3278
|
+
), E = ot({
|
|
3179
3279
|
defaultLayout: n,
|
|
3180
3280
|
disableCursor: o,
|
|
3181
|
-
resizeTargetMinimumSize:
|
|
3182
|
-
}),
|
|
3281
|
+
resizeTargetMinimumSize: g
|
|
3282
|
+
}), D = React.useMemo(
|
|
3183
3283
|
() => ({
|
|
3184
3284
|
get disableCursor() {
|
|
3185
|
-
return !!
|
|
3285
|
+
return !!E.disableCursor;
|
|
3186
3286
|
},
|
|
3187
|
-
getPanelStyles:
|
|
3188
|
-
id:
|
|
3189
|
-
orientation:
|
|
3190
|
-
registerPanel: (
|
|
3287
|
+
getPanelStyles: A,
|
|
3288
|
+
id: S,
|
|
3289
|
+
orientation: l,
|
|
3290
|
+
registerPanel: (I) => {
|
|
3191
3291
|
const M = v.current;
|
|
3192
|
-
return M.panels =
|
|
3292
|
+
return M.panels = Ge(l, [
|
|
3193
3293
|
...M.panels,
|
|
3194
|
-
|
|
3294
|
+
I
|
|
3195
3295
|
]), b(), () => {
|
|
3196
3296
|
M.panels = M.panels.filter(
|
|
3197
|
-
(q) => q !==
|
|
3297
|
+
(q) => q !== I
|
|
3198
3298
|
), b();
|
|
3199
3299
|
};
|
|
3200
3300
|
},
|
|
3201
|
-
registerOverlay: (
|
|
3301
|
+
registerOverlay: (I) => (x(I), () => {
|
|
3202
3302
|
x(void 0);
|
|
3203
3303
|
}),
|
|
3204
|
-
registerSeparator: (
|
|
3304
|
+
registerSeparator: (I) => {
|
|
3205
3305
|
const M = v.current;
|
|
3206
|
-
return M.separators =
|
|
3306
|
+
return M.separators = Ge(l, [
|
|
3207
3307
|
...M.separators,
|
|
3208
|
-
|
|
3308
|
+
I
|
|
3209
3309
|
]), b(), () => {
|
|
3210
3310
|
M.separators = M.separators.filter(
|
|
3211
|
-
(q) => q !==
|
|
3311
|
+
(q) => q !== I
|
|
3212
3312
|
), b();
|
|
3213
3313
|
};
|
|
3214
3314
|
},
|
|
3215
|
-
updatePanelProps: (
|
|
3315
|
+
updatePanelProps: (I, { disabled: M }) => {
|
|
3216
3316
|
const J = v.current.panels.find(
|
|
3217
|
-
(
|
|
3317
|
+
(ve) => ve.id === I
|
|
3218
3318
|
);
|
|
3219
3319
|
J && (J.constraintProps.disabled = M);
|
|
3220
|
-
const H =
|
|
3320
|
+
const H = Ee(S), Z = ae(S);
|
|
3221
3321
|
H && Z && fe(H, {
|
|
3222
3322
|
...Z,
|
|
3223
|
-
derivedItemConstraints:
|
|
3323
|
+
derivedItemConstraints: ut(H)
|
|
3224
3324
|
});
|
|
3225
3325
|
},
|
|
3226
|
-
updateSeparatorProps: (
|
|
3326
|
+
updateSeparatorProps: (I, {
|
|
3227
3327
|
disabled: M,
|
|
3228
3328
|
disableDoubleClick: q
|
|
3229
3329
|
}) => {
|
|
3230
3330
|
const H = v.current.separators.find(
|
|
3231
|
-
(Z) => Z.id ===
|
|
3331
|
+
(Z) => Z.id === I
|
|
3232
3332
|
);
|
|
3233
3333
|
H && (H.disabled = M, H.disableDoubleClick = q);
|
|
3234
3334
|
}
|
|
3235
3335
|
}),
|
|
3236
|
-
[
|
|
3237
|
-
),
|
|
3336
|
+
[A, S, b, l, E]
|
|
3337
|
+
), C = React.useRef(null);
|
|
3238
3338
|
return ne(() => {
|
|
3239
|
-
const
|
|
3240
|
-
if (
|
|
3339
|
+
const I = N.current;
|
|
3340
|
+
if (I === null)
|
|
3241
3341
|
return;
|
|
3242
3342
|
const M = v.current;
|
|
3243
|
-
M.panels =
|
|
3244
|
-
|
|
3343
|
+
M.panels = Ge(
|
|
3344
|
+
l,
|
|
3245
3345
|
M.panels
|
|
3246
|
-
), M.separators =
|
|
3247
|
-
|
|
3346
|
+
), M.separators = Ge(
|
|
3347
|
+
l,
|
|
3248
3348
|
M.separators
|
|
3249
|
-
), w.current =
|
|
3349
|
+
), w.current = zo([
|
|
3250
3350
|
...M.panels.map(({ element: L }) => L),
|
|
3251
3351
|
...M.separators.map(({ element: L }) => L)
|
|
3252
3352
|
]);
|
|
3253
3353
|
let q;
|
|
3254
|
-
if (
|
|
3354
|
+
if (E.defaultLayout !== void 0 && Object.keys(E.defaultLayout).length === M.panels.length) {
|
|
3255
3355
|
q = {};
|
|
3256
3356
|
for (const L of M.panels) {
|
|
3257
|
-
const
|
|
3258
|
-
|
|
3357
|
+
const P = E.defaultLayout[L.id];
|
|
3358
|
+
P !== void 0 && (q[L.id] = P);
|
|
3259
3359
|
}
|
|
3260
3360
|
}
|
|
3261
3361
|
const J = {
|
|
3262
3362
|
disabled: !!r,
|
|
3263
|
-
element:
|
|
3264
|
-
id:
|
|
3363
|
+
element: I,
|
|
3364
|
+
id: S,
|
|
3265
3365
|
mutableState: {
|
|
3266
3366
|
defaultLayout: q,
|
|
3267
|
-
disableCursor: !!
|
|
3367
|
+
disableCursor: !!E.disableCursor,
|
|
3268
3368
|
expandedItemSizes: v.current.lastExpandedPanelSizes,
|
|
3269
3369
|
layouts: v.current.layouts
|
|
3270
3370
|
},
|
|
3271
|
-
orientation:
|
|
3371
|
+
orientation: l,
|
|
3272
3372
|
items: M.panels,
|
|
3273
3373
|
resizePreviewMode: d,
|
|
3274
3374
|
get resizeTargetMinimumSize() {
|
|
3275
|
-
return
|
|
3375
|
+
return E.resizeTargetMinimumSize;
|
|
3276
3376
|
},
|
|
3277
3377
|
separators: M.separators
|
|
3278
3378
|
};
|
|
3279
|
-
|
|
3280
|
-
const H =
|
|
3379
|
+
C.current = J;
|
|
3380
|
+
const H = Sn(J), {
|
|
3281
3381
|
defaultLayoutDeferred: Z,
|
|
3282
|
-
derivedItemConstraints:
|
|
3382
|
+
derivedItemConstraints: ve,
|
|
3283
3383
|
layout: ze,
|
|
3284
3384
|
requestedLayout: Ie
|
|
3285
3385
|
} = ae(J.id, true);
|
|
3286
|
-
!Z &&
|
|
3287
|
-
|
|
3386
|
+
if (!Z && ve.length > 0)
|
|
3387
|
+
try {
|
|
3388
|
+
try {
|
|
3389
|
+
y(ze);
|
|
3390
|
+
} finally {
|
|
3391
|
+
h(ze, false, Ie);
|
|
3392
|
+
}
|
|
3393
|
+
} catch (L) {
|
|
3394
|
+
throw C.current = null, H(), L;
|
|
3395
|
+
}
|
|
3396
|
+
const be = Be(S, (L) => {
|
|
3288
3397
|
const {
|
|
3289
|
-
defaultLayoutDeferred:
|
|
3290
|
-
derivedItemConstraints:
|
|
3398
|
+
defaultLayoutDeferred: P,
|
|
3399
|
+
derivedItemConstraints: F2,
|
|
3291
3400
|
layout: G,
|
|
3292
|
-
requestedLayout:
|
|
3401
|
+
requestedLayout: _
|
|
3293
3402
|
} = L.next;
|
|
3294
|
-
if (
|
|
3403
|
+
if (P || F2.length === 0)
|
|
3295
3404
|
return;
|
|
3296
|
-
|
|
3297
|
-
derivedItemConstraints:
|
|
3405
|
+
vn({
|
|
3406
|
+
derivedItemConstraints: F2,
|
|
3298
3407
|
axis: J,
|
|
3299
3408
|
layout: G,
|
|
3300
3409
|
prevLayout: L.prev?.layout,
|
|
3301
|
-
requestedLayout:
|
|
3410
|
+
requestedLayout: _
|
|
3302
3411
|
});
|
|
3303
|
-
const j =
|
|
3304
|
-
|
|
3412
|
+
const j = ie(), U2 = j.state !== "active" || !j.hitRegions.some((te) => te.axis === J);
|
|
3413
|
+
try {
|
|
3414
|
+
y(G);
|
|
3415
|
+
} finally {
|
|
3416
|
+
U2 && h(
|
|
3417
|
+
G,
|
|
3418
|
+
L.isUserInteraction,
|
|
3419
|
+
_
|
|
3420
|
+
);
|
|
3421
|
+
}
|
|
3305
3422
|
});
|
|
3306
3423
|
return () => {
|
|
3307
|
-
|
|
3424
|
+
C.current = null, H(), be();
|
|
3308
3425
|
};
|
|
3309
3426
|
}, [
|
|
3310
3427
|
r,
|
|
3311
|
-
g,
|
|
3312
|
-
h,
|
|
3313
3428
|
S,
|
|
3314
|
-
|
|
3315
|
-
|
|
3429
|
+
h,
|
|
3430
|
+
y,
|
|
3431
|
+
l,
|
|
3432
|
+
$,
|
|
3316
3433
|
d,
|
|
3317
|
-
|
|
3434
|
+
E
|
|
3318
3435
|
]), ne(() => {
|
|
3319
|
-
|
|
3436
|
+
vo(w.current) || b();
|
|
3320
3437
|
}), React.useEffect(() => {
|
|
3321
|
-
const
|
|
3322
|
-
|
|
3323
|
-
}), /* @__PURE__ */ jsxRuntime.jsx(
|
|
3438
|
+
const I = C.current;
|
|
3439
|
+
I && (I.mutableState.defaultLayout = n, I.mutableState.disableCursor = !!o);
|
|
3440
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(wt$1.Provider, { value: D, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3324
3441
|
"div",
|
|
3325
3442
|
{
|
|
3326
3443
|
...m,
|
|
3327
3444
|
className: t,
|
|
3328
3445
|
"data-group": true,
|
|
3329
|
-
"data-testid":
|
|
3330
|
-
id:
|
|
3446
|
+
"data-testid": S,
|
|
3447
|
+
id: S,
|
|
3331
3448
|
ref: T,
|
|
3332
3449
|
style: {
|
|
3333
3450
|
height: "100%",
|
|
3334
3451
|
width: "100%",
|
|
3335
3452
|
overflow: "hidden",
|
|
3336
3453
|
position: d === "separator" ? "relative" : void 0,
|
|
3337
|
-
...
|
|
3454
|
+
...p,
|
|
3338
3455
|
display: "flex",
|
|
3339
|
-
flexDirection:
|
|
3456
|
+
flexDirection: l === "horizontal" ? "row" : "column",
|
|
3340
3457
|
flexWrap: "nowrap",
|
|
3341
3458
|
// Inform the browser that the library is handling touch events for this element
|
|
3342
3459
|
// but still allow users to scroll content within panels in the non-resizing direction
|
|
3343
3460
|
// NOTE This is not an inherited style
|
|
3344
3461
|
// See github.com/bvaughn/react-resizable-panels/issues/662
|
|
3345
|
-
touchAction:
|
|
3462
|
+
touchAction: l === "horizontal" ? "pan-y" : "pan-x"
|
|
3346
3463
|
},
|
|
3347
3464
|
children: [
|
|
3348
3465
|
e,
|
|
3349
|
-
|
|
3350
|
-
|
|
3466
|
+
R.map((I) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3467
|
+
wo,
|
|
3351
3468
|
{
|
|
3352
|
-
overlay:
|
|
3353
|
-
preview:
|
|
3469
|
+
overlay: z,
|
|
3470
|
+
preview: I
|
|
3354
3471
|
},
|
|
3355
|
-
|
|
3472
|
+
I.key
|
|
3356
3473
|
))
|
|
3357
3474
|
]
|
|
3358
3475
|
}
|
|
3359
3476
|
) });
|
|
3360
3477
|
}
|
|
3361
|
-
|
|
3362
|
-
function
|
|
3363
|
-
const { id: n } =
|
|
3364
|
-
collapse:
|
|
3365
|
-
expand:
|
|
3478
|
+
Co.displayName = "Group";
|
|
3479
|
+
function Mo(e, t) {
|
|
3480
|
+
const { id: n } = rt(), o = React.useRef({
|
|
3481
|
+
collapse: st,
|
|
3482
|
+
expand: st,
|
|
3366
3483
|
getSize: () => ({
|
|
3367
3484
|
asPercentage: 0,
|
|
3368
3485
|
inPixels: 0
|
|
3369
3486
|
}),
|
|
3370
3487
|
isCollapsed: () => false,
|
|
3371
|
-
resize:
|
|
3488
|
+
resize: st
|
|
3372
3489
|
});
|
|
3373
3490
|
React.useImperativeHandle(t, () => o.current, []), ne(() => {
|
|
3374
3491
|
Object.assign(
|
|
3375
3492
|
o.current,
|
|
3376
|
-
|
|
3493
|
+
xt$1({ axisId: n, itemId: e })
|
|
3377
3494
|
);
|
|
3378
3495
|
});
|
|
3379
3496
|
}
|
|
3380
|
-
function
|
|
3497
|
+
function Po({
|
|
3381
3498
|
children: e,
|
|
3382
3499
|
className: t,
|
|
3383
3500
|
collapsedSize: n = "0%",
|
|
@@ -3385,36 +3502,36 @@ function yo({
|
|
|
3385
3502
|
collapsible: r = false,
|
|
3386
3503
|
defaultSize: i,
|
|
3387
3504
|
disabled: s,
|
|
3388
|
-
elementRef:
|
|
3505
|
+
elementRef: c,
|
|
3389
3506
|
groupResizeBehavior: a = "preserve-relative-size",
|
|
3390
|
-
id:
|
|
3391
|
-
maxSize:
|
|
3507
|
+
id: u,
|
|
3508
|
+
maxSize: l = "100%",
|
|
3392
3509
|
minSize: d = "0%",
|
|
3393
|
-
onResize:
|
|
3394
|
-
panelRef:
|
|
3510
|
+
onResize: g,
|
|
3511
|
+
panelRef: p,
|
|
3395
3512
|
style: m,
|
|
3396
3513
|
...f
|
|
3397
3514
|
}) {
|
|
3398
|
-
const
|
|
3515
|
+
const y = !!u, h = De(u), S = ot({
|
|
3399
3516
|
disabled: s
|
|
3400
|
-
}),
|
|
3401
|
-
getPanelStyles:
|
|
3402
|
-
id:
|
|
3403
|
-
orientation:
|
|
3517
|
+
}), z = React.useRef(null), x = Ve(z, c), {
|
|
3518
|
+
getPanelStyles: R,
|
|
3519
|
+
id: N,
|
|
3520
|
+
orientation: $,
|
|
3404
3521
|
registerPanel: b,
|
|
3405
3522
|
updatePanelProps: w
|
|
3406
|
-
} =
|
|
3407
|
-
(
|
|
3408
|
-
|
|
3523
|
+
} = rt(), v = g !== null, T = ye(
|
|
3524
|
+
(C, I, M) => {
|
|
3525
|
+
g?.(C, u, M);
|
|
3409
3526
|
}
|
|
3410
3527
|
);
|
|
3411
3528
|
ne(() => {
|
|
3412
|
-
const
|
|
3413
|
-
if (
|
|
3414
|
-
const
|
|
3415
|
-
element:
|
|
3529
|
+
const C = z.current;
|
|
3530
|
+
if (C !== null) {
|
|
3531
|
+
const I = {
|
|
3532
|
+
element: C,
|
|
3416
3533
|
id: h,
|
|
3417
|
-
idIsStable:
|
|
3534
|
+
idIsStable: y,
|
|
3418
3535
|
mutableValues: {
|
|
3419
3536
|
expandToSize: void 0,
|
|
3420
3537
|
prevSize: void 0
|
|
@@ -3426,12 +3543,12 @@ function yo({
|
|
|
3426
3543
|
collapsedThreshold: o,
|
|
3427
3544
|
collapsible: r,
|
|
3428
3545
|
defaultSize: i,
|
|
3429
|
-
disabled:
|
|
3430
|
-
maxSize:
|
|
3546
|
+
disabled: S.disabled,
|
|
3547
|
+
maxSize: l,
|
|
3431
3548
|
minSize: d
|
|
3432
3549
|
}
|
|
3433
3550
|
};
|
|
3434
|
-
return b(
|
|
3551
|
+
return b(I);
|
|
3435
3552
|
}
|
|
3436
3553
|
}, [
|
|
3437
3554
|
a,
|
|
@@ -3441,30 +3558,30 @@ function yo({
|
|
|
3441
3558
|
i,
|
|
3442
3559
|
v,
|
|
3443
3560
|
h,
|
|
3444
|
-
|
|
3445
|
-
|
|
3561
|
+
y,
|
|
3562
|
+
l,
|
|
3446
3563
|
d,
|
|
3447
3564
|
T,
|
|
3448
3565
|
b,
|
|
3449
|
-
|
|
3566
|
+
S
|
|
3450
3567
|
]), React.useEffect(() => {
|
|
3451
3568
|
w(h, { disabled: s });
|
|
3452
|
-
}, [s, h, w]),
|
|
3453
|
-
const
|
|
3454
|
-
const
|
|
3455
|
-
if (
|
|
3456
|
-
return JSON.stringify(
|
|
3457
|
-
},
|
|
3458
|
-
(
|
|
3459
|
-
|
|
3460
|
-
|
|
3569
|
+
}, [s, h, w]), Mo(h, p);
|
|
3570
|
+
const A = () => {
|
|
3571
|
+
const C = R(N, h);
|
|
3572
|
+
if (C)
|
|
3573
|
+
return JSON.stringify(C);
|
|
3574
|
+
}, E = React.useSyncExternalStore(
|
|
3575
|
+
(C) => Be(N, C),
|
|
3576
|
+
A,
|
|
3577
|
+
A
|
|
3461
3578
|
);
|
|
3462
|
-
let
|
|
3463
|
-
return
|
|
3579
|
+
let D;
|
|
3580
|
+
return E ? D = JSON.parse(E) : i !== void 0 ? D = {
|
|
3464
3581
|
flexGrow: void 0,
|
|
3465
3582
|
flexShrink: void 0,
|
|
3466
3583
|
flexBasis: i
|
|
3467
|
-
} :
|
|
3584
|
+
} : D = { flexGrow: 1 }, /* @__PURE__ */ jsxRuntime.jsx(
|
|
3468
3585
|
"div",
|
|
3469
3586
|
{
|
|
3470
3587
|
...f,
|
|
@@ -3474,12 +3591,12 @@ function yo({
|
|
|
3474
3591
|
id: h,
|
|
3475
3592
|
ref: x,
|
|
3476
3593
|
style: {
|
|
3477
|
-
...
|
|
3594
|
+
...To,
|
|
3478
3595
|
display: "flex",
|
|
3479
3596
|
flexBasis: 0,
|
|
3480
3597
|
flexShrink: 1,
|
|
3481
3598
|
overflow: "visible",
|
|
3482
|
-
...
|
|
3599
|
+
...D
|
|
3483
3600
|
},
|
|
3484
3601
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3485
3602
|
"div",
|
|
@@ -3495,7 +3612,7 @@ function yo({
|
|
|
3495
3612
|
// but still allow users to scroll content within panels in the non-resizing direction
|
|
3496
3613
|
// NOTE This is not an inherited style
|
|
3497
3614
|
// See github.com/bvaughn/react-resizable-panels/issues/662
|
|
3498
|
-
touchAction:
|
|
3615
|
+
touchAction: $ === "horizontal" ? "pan-y" : "pan-x"
|
|
3499
3616
|
},
|
|
3500
3617
|
children: e
|
|
3501
3618
|
}
|
|
@@ -3503,8 +3620,8 @@ function yo({
|
|
|
3503
3620
|
}
|
|
3504
3621
|
);
|
|
3505
3622
|
}
|
|
3506
|
-
|
|
3507
|
-
const
|
|
3623
|
+
Po.displayName = "Panel";
|
|
3624
|
+
const To = {
|
|
3508
3625
|
minHeight: 0,
|
|
3509
3626
|
maxHeight: "100%",
|
|
3510
3627
|
height: "auto",
|
|
@@ -3516,8 +3633,8 @@ const So = {
|
|
|
3516
3633
|
padding: 0,
|
|
3517
3634
|
margin: 0
|
|
3518
3635
|
};
|
|
3519
|
-
const
|
|
3520
|
-
function
|
|
3636
|
+
const Do = { flexBasis: "auto" }, ko = { flexGrow: 0, flexShrink: 0 };
|
|
3637
|
+
function Ao({
|
|
3521
3638
|
children: e,
|
|
3522
3639
|
className: t,
|
|
3523
3640
|
disabled: n,
|
|
@@ -3525,39 +3642,39 @@ function xo({
|
|
|
3525
3642
|
elementRef: r,
|
|
3526
3643
|
id: i,
|
|
3527
3644
|
preview: s,
|
|
3528
|
-
style:
|
|
3645
|
+
style: c,
|
|
3529
3646
|
...a
|
|
3530
3647
|
}) {
|
|
3531
|
-
const
|
|
3532
|
-
disableCursor:
|
|
3648
|
+
const u = De(i), {
|
|
3649
|
+
disableCursor: l,
|
|
3533
3650
|
id: d,
|
|
3534
|
-
orientation:
|
|
3535
|
-
registerSeparator:
|
|
3651
|
+
orientation: g,
|
|
3652
|
+
registerSeparator: p,
|
|
3536
3653
|
updateSeparatorProps: m
|
|
3537
|
-
} =
|
|
3654
|
+
} = rt();
|
|
3538
3655
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3539
|
-
|
|
3656
|
+
xn,
|
|
3540
3657
|
{
|
|
3541
3658
|
attributes: a,
|
|
3542
3659
|
axisId: d,
|
|
3543
|
-
axisOrientation:
|
|
3660
|
+
axisOrientation: g,
|
|
3544
3661
|
className: t,
|
|
3545
|
-
disableCursor:
|
|
3662
|
+
disableCursor: l,
|
|
3546
3663
|
disabled: n,
|
|
3547
3664
|
disableDoubleClick: o,
|
|
3548
3665
|
elementRef: r,
|
|
3549
|
-
id:
|
|
3666
|
+
id: u,
|
|
3550
3667
|
preview: s,
|
|
3551
|
-
registerSeparator:
|
|
3552
|
-
requiredStyle:
|
|
3553
|
-
style:
|
|
3554
|
-
styleDefaults:
|
|
3668
|
+
registerSeparator: p,
|
|
3669
|
+
requiredStyle: ko,
|
|
3670
|
+
style: c,
|
|
3671
|
+
styleDefaults: Do,
|
|
3555
3672
|
updateSeparatorProps: m,
|
|
3556
3673
|
children: e
|
|
3557
3674
|
}
|
|
3558
3675
|
);
|
|
3559
3676
|
}
|
|
3560
|
-
|
|
3677
|
+
Ao.displayName = "Separator";
|
|
3561
3678
|
var kt = Object.defineProperty, xt = Object.defineProperties;
|
|
3562
3679
|
var Gt = Object.getOwnPropertyDescriptors;
|
|
3563
3680
|
var U = Object.getOwnPropertySymbols;
|
|
@@ -3597,8 +3714,8 @@ function Mt({ containerRef: o, inputRef: r, pushPasswordManagerStrategy: t, isFo
|
|
|
3597
3714
|
let [w, T] = React__namespace.useState(false), [x, M] = React__namespace.useState(false), [V2, I] = React__namespace.useState(false), q = React__namespace.useMemo(() => t === "none" ? false : (t === "increase-width" || t === "experimental-no-flickering") && w && x, [w, x, t]), y = React__namespace.useCallback(() => {
|
|
3598
3715
|
let m = o.current, S = r.current;
|
|
3599
3716
|
if (!m || !S || V2 || t === "none") return;
|
|
3600
|
-
let R = m, i = R.getBoundingClientRect().left + R.offsetWidth, G = R.getBoundingClientRect().top + R.offsetHeight / 2, ot2 = i - Ot,
|
|
3601
|
-
document.querySelectorAll(jt).length === 0 && document.elementFromPoint(ot2,
|
|
3717
|
+
let R = m, i = R.getBoundingClientRect().left + R.offsetWidth, G = R.getBoundingClientRect().top + R.offsetHeight / 2, ot2 = i - Ot, X = G;
|
|
3718
|
+
document.querySelectorAll(jt).length === 0 && document.elementFromPoint(ot2, X) === m || (M(Ct(m) >= nt), T(true), I(true));
|
|
3602
3719
|
}, [o, r, V2, t]);
|
|
3603
3720
|
return React__namespace.useEffect(() => {
|
|
3604
3721
|
let m = o.current;
|
|
@@ -3623,13 +3740,13 @@ function Mt({ containerRef: o, inputRef: r, pushPasswordManagerStrategy: t, isFo
|
|
|
3623
3740
|
}, [r, u, t, y]), { hasPWMBadge: w, willPushPWMBadge: q, PWM_BADGE_SPACE_WIDTH: Lt };
|
|
3624
3741
|
}
|
|
3625
3742
|
var Nt = React__namespace.createContext({}), $t = React__namespace.forwardRef((ot2, G) => {
|
|
3626
|
-
var
|
|
3627
|
-
var z,
|
|
3628
|
-
let [rt2, at] = React__namespace.useState(typeof i.defaultValue == "string" ? i.defaultValue : ""), l = o != null ? o : rt2,
|
|
3743
|
+
var X = ot2, { value: o, onChange: r, maxLength: t, textAlign: u = "left", pattern: w, placeholder: T, inputMode: x = "numeric", onComplete: M, pushPasswordManagerStrategy: V2 = "increase-width", pasteTransformer: I, containerClassName: q, noScriptCSSFallback: y = Ft, nonce: m, render: S, children: R } = X, i = wt(X, ["value", "onChange", "maxLength", "textAlign", "pattern", "placeholder", "inputMode", "onComplete", "pushPasswordManagerStrategy", "pasteTransformer", "containerClassName", "noScriptCSSFallback", "nonce", "render", "children"]);
|
|
3744
|
+
var z, ft, mt2, pt2, Rt2;
|
|
3745
|
+
let [rt2, at] = React__namespace.useState(typeof i.defaultValue == "string" ? i.defaultValue : ""), l = o != null ? o : rt2, D = Tt(l), O2 = React__namespace.useCallback((a) => {
|
|
3629
3746
|
r == null || r(a), at(a);
|
|
3630
|
-
}, [r]), p = React__namespace.useMemo(() => w ? typeof w == "string" ? new RegExp(w) : w : null, [w]), d = React__namespace.useRef(null),
|
|
3747
|
+
}, [r]), p = React__namespace.useMemo(() => w ? typeof w == "string" ? new RegExp(w) : w : null, [w]), d = React__namespace.useRef(null), K2 = React__namespace.useRef(null), J = React__namespace.useRef({ value: l, onChange: O2, isIOS: typeof window != "undefined" && ((ft = (z = window == null ? void 0 : window.CSS) == null ? void 0 : z.supports) == null ? void 0 : ft.call(z, "-webkit-touch-callout", "none")) }), Y2 = React__namespace.useRef({ prev: [(mt2 = d.current) == null ? void 0 : mt2.selectionStart, (pt2 = d.current) == null ? void 0 : pt2.selectionEnd, (Rt2 = d.current) == null ? void 0 : Rt2.selectionDirection] });
|
|
3631
3748
|
React__namespace.useImperativeHandle(G, () => d.current, []), React__namespace.useEffect(() => {
|
|
3632
|
-
let a = d.current, n =
|
|
3749
|
+
let a = d.current, n = K2.current;
|
|
3633
3750
|
if (!a || !n) return;
|
|
3634
3751
|
J.current.value !== a.value && J.current.onChange(a.value), Y2.current.prev = [a.selectionStart, a.selectionEnd, a.selectionDirection];
|
|
3635
3752
|
function c() {
|
|
@@ -3639,25 +3756,25 @@ var Nt = React__namespace.createContext({}), $t = React__namespace.forwardRef((o
|
|
|
3639
3756
|
}
|
|
3640
3757
|
let s = a.selectionStart, P = a.selectionEnd, $ = a.selectionDirection, v = a.maxLength, B = a.value, _ = Y2.current.prev, g = -1, E = -1, C;
|
|
3641
3758
|
if (B.length !== 0 && s !== null && P !== null) {
|
|
3642
|
-
let
|
|
3643
|
-
if (
|
|
3759
|
+
let Bt2 = s === P, Wt2 = s === B.length && B.length < v;
|
|
3760
|
+
if (Bt2 && !Wt2) {
|
|
3644
3761
|
let W = s;
|
|
3645
3762
|
if (W === 0) g = 0, E = 1, C = "forward";
|
|
3646
3763
|
else if (W === v) g = W - 1, E = W, C = "backward";
|
|
3647
3764
|
else if (v > 1 && B.length > 1) {
|
|
3648
|
-
let
|
|
3765
|
+
let et2 = 0;
|
|
3649
3766
|
if (_[0] !== null && _[1] !== null) {
|
|
3650
3767
|
C = W < _[1] ? "backward" : "forward";
|
|
3651
3768
|
let At2 = _[0] === _[1] && _[0] < v;
|
|
3652
|
-
C === "backward" && !At2 && (
|
|
3769
|
+
C === "backward" && !At2 && (et2 = -1);
|
|
3653
3770
|
}
|
|
3654
|
-
g =
|
|
3771
|
+
g = et2 + W, E = et2 + W + 1;
|
|
3655
3772
|
}
|
|
3656
3773
|
}
|
|
3657
3774
|
g !== -1 && E !== -1 && g !== E && a.setSelectionRange(g, E, C);
|
|
3658
3775
|
}
|
|
3659
|
-
let vt2 = g !== -1 ? g : s,
|
|
3660
|
-
j(vt2), N(
|
|
3776
|
+
let vt2 = g !== -1 ? g : s, gt2 = E !== -1 ? E : P, Ht2 = C != null ? C : $;
|
|
3777
|
+
j(vt2), N(gt2), Y2.current.prev = [vt2, gt2, Ht2];
|
|
3661
3778
|
}
|
|
3662
3779
|
if (document.addEventListener("selectionchange", c, { capture: true }), c(), document.activeElement === a && Q(true), !document.getElementById("input-otp-style")) {
|
|
3663
3780
|
let s = document.createElement("style");
|
|
@@ -3675,7 +3792,7 @@ var Nt = React__namespace.createContext({}), $t = React__namespace.forwardRef((o
|
|
|
3675
3792
|
document.removeEventListener("selectionchange", c, { capture: true }), f == null || f.disconnect();
|
|
3676
3793
|
};
|
|
3677
3794
|
}, []);
|
|
3678
|
-
let [ct2,
|
|
3795
|
+
let [ct2, it] = React__namespace.useState(false), [L, Q] = React__namespace.useState(false), [H, j] = React__namespace.useState(null), [A, N] = React__namespace.useState(null);
|
|
3679
3796
|
React__namespace.useEffect(() => {
|
|
3680
3797
|
let a = _t(() => {
|
|
3681
3798
|
var f, s, P, $;
|
|
@@ -3687,16 +3804,16 @@ var Nt = React__namespace.createContext({}), $t = React__namespace.forwardRef((o
|
|
|
3687
3804
|
a.forEach((n) => clearTimeout(n));
|
|
3688
3805
|
};
|
|
3689
3806
|
}, [l, L]), React__namespace.useEffect(() => {
|
|
3690
|
-
|
|
3691
|
-
}, [t, M,
|
|
3692
|
-
let k = Mt({ containerRef:
|
|
3807
|
+
D !== void 0 && l !== D && D.length < t && l.length === t && (M == null || M(l));
|
|
3808
|
+
}, [t, M, D, l]);
|
|
3809
|
+
let k = Mt({ containerRef: K2, inputRef: d, pushPasswordManagerStrategy: V2, isFocused: L }), st2 = React__namespace.useCallback((a) => {
|
|
3693
3810
|
let n = a.currentTarget.value.slice(0, t);
|
|
3694
3811
|
if (n.length > 0 && p && !p.test(n)) {
|
|
3695
3812
|
a.preventDefault();
|
|
3696
3813
|
return;
|
|
3697
3814
|
}
|
|
3698
|
-
typeof
|
|
3699
|
-
}, [t,
|
|
3815
|
+
typeof D == "string" && n.length < D.length && document.dispatchEvent(new Event("selectionchange")), O2(n);
|
|
3816
|
+
}, [t, O2, D, p]), lt2 = React__namespace.useCallback(() => {
|
|
3700
3817
|
var a;
|
|
3701
3818
|
if (d.current) {
|
|
3702
3819
|
let n = Math.min(d.current.value.length, t - 1), c = d.current.value.length;
|
|
@@ -3711,20 +3828,20 @@ var Nt = React__namespace.createContext({}), $t = React__namespace.forwardRef((o
|
|
|
3711
3828
|
a.preventDefault();
|
|
3712
3829
|
let f = (g = d.current) == null ? void 0 : g.selectionStart, s = (E = d.current) == null ? void 0 : E.selectionEnd, v = (f !== s ? l.slice(0, f) + b + l.slice(s) : l.slice(0, f) + b + l.slice(f)).slice(0, t);
|
|
3713
3830
|
if (v.length > 0 && p && !p.test(v)) return;
|
|
3714
|
-
n.value = v,
|
|
3831
|
+
n.value = v, O2(v);
|
|
3715
3832
|
let B = Math.min(v.length, t - 1), _ = v.length;
|
|
3716
3833
|
n.setSelectionRange(B, _), j(B), N(_);
|
|
3717
|
-
}, [t,
|
|
3834
|
+
}, [t, O2, I, p, l]), It = React__namespace.useMemo(() => ({ position: "relative", cursor: i.disabled ? "default" : "text", userSelect: "none", WebkitUserSelect: "none", pointerEvents: "none" }), [i.disabled]), dt = React__namespace.useMemo(() => ({ position: "absolute", inset: 0, width: k.willPushPWMBadge ? `calc(100% + ${k.PWM_BADGE_SPACE_WIDTH})` : "100%", clipPath: k.willPushPWMBadge ? `inset(0 ${k.PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0, height: "100%", display: "flex", textAlign: u, opacity: "1", color: "transparent", pointerEvents: "all", background: "transparent", caretColor: "transparent", border: "0 solid transparent", outline: "0 solid transparent", boxShadow: "none", lineHeight: "1", letterSpacing: "-.5em", fontSize: "var(--root-height, 16px)", fontFamily: "monospace", fontVariantNumeric: "tabular-nums" }), [k.PWM_BADGE_SPACE_WIDTH, k.willPushPWMBadge, u]), yt2 = React__namespace.useMemo(() => {
|
|
3718
3835
|
var a;
|
|
3719
|
-
return React__namespace.createElement("input", Pt(bt({ autoComplete: i.autoComplete || "one-time-code" }, i), { "data-input-otp": true, "data-input-otp-placeholder-shown": l.length === 0 || void 0, "data-input-otp-mss": H, "data-input-otp-mse": A, inputMode: x, pattern: p == null ? void 0 : p.source, "aria-placeholder": T, style:
|
|
3836
|
+
return React__namespace.createElement("input", Pt(bt({ autoComplete: i.autoComplete || "one-time-code" }, i), { "data-input-otp": true, "data-input-otp-placeholder-shown": l.length === 0 || void 0, "data-input-otp-mss": H, "data-input-otp-mse": A, inputMode: x, pattern: p == null ? void 0 : p.source, "aria-placeholder": T, style: dt, maxLength: t, value: l, ref: d, spellCheck: (a = i.spellCheck) != null ? a : false, onPaste: (n) => {
|
|
3720
3837
|
var c;
|
|
3721
3838
|
ut2(n), (c = i.onPaste) == null || c.call(i, n);
|
|
3722
|
-
}, onChange:
|
|
3839
|
+
}, onChange: st2, onMouseOver: (n) => {
|
|
3723
3840
|
var c;
|
|
3724
|
-
|
|
3841
|
+
it(true), (c = i.onMouseOver) == null || c.call(i, n);
|
|
3725
3842
|
}, onMouseLeave: (n) => {
|
|
3726
3843
|
var c;
|
|
3727
|
-
|
|
3844
|
+
it(false), (c = i.onMouseLeave) == null || c.call(i, n);
|
|
3728
3845
|
}, onFocus: (n) => {
|
|
3729
3846
|
var c;
|
|
3730
3847
|
lt2(), (c = i.onFocus) == null || c.call(i, n);
|
|
@@ -3732,12 +3849,12 @@ var Nt = React__namespace.createContext({}), $t = React__namespace.forwardRef((o
|
|
|
3732
3849
|
var c;
|
|
3733
3850
|
Q(false), (c = i.onBlur) == null || c.call(i, n);
|
|
3734
3851
|
} }));
|
|
3735
|
-
}, [
|
|
3852
|
+
}, [st2, lt2, ut2, x, dt, t, A, H, T, i, p == null ? void 0 : p.source, l]), tt2 = React__namespace.useMemo(() => ({ slots: Array.from({ length: t }).map((a, n) => {
|
|
3736
3853
|
var s;
|
|
3737
3854
|
let c = L && H !== null && A !== null && (H === A && n === H || n >= H && n < A), b = l[n] !== void 0 ? l[n] : null, f = l[0] !== void 0 ? null : (s = T == null ? void 0 : T[n]) != null ? s : null;
|
|
3738
3855
|
return { char: b, placeholderChar: f, isActive: c, hasFakeCaret: c && b === null };
|
|
3739
3856
|
}), isFocused: L, isHovering: !i.disabled && ct2 }), [L, ct2, t, A, H, T, i.disabled, l]), Dt2 = React__namespace.useMemo(() => S ? S(tt2) : React__namespace.createElement(Nt.Provider, { value: tt2 }, R), [R, tt2, S]);
|
|
3740
|
-
return React__namespace.createElement(React__namespace.Fragment, null, y !== null && React__namespace.createElement("noscript", null, React__namespace.createElement("style", null, y)), React__namespace.createElement("div", { ref:
|
|
3857
|
+
return React__namespace.createElement(React__namespace.Fragment, null, y !== null && React__namespace.createElement("noscript", null, React__namespace.createElement("style", null, y)), React__namespace.createElement("div", { ref: K2, "data-input-otp-container": true, translate: "no", style: It, className: q }, Dt2, React__namespace.createElement("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" } }, yt2)));
|
|
3741
3858
|
});
|
|
3742
3859
|
$t.displayName = "Input";
|
|
3743
3860
|
function F(o, r) {
|
|
@@ -4021,11 +4138,11 @@ const Textarea = React__namespace.forwardRef((t0, ref) => {
|
|
|
4021
4138
|
});
|
|
4022
4139
|
Textarea.displayName = "Textarea";
|
|
4023
4140
|
exports.$t = $t;
|
|
4141
|
+
exports.Ao = Ao;
|
|
4024
4142
|
exports.Badge = Badge;
|
|
4143
|
+
exports.Co = Co;
|
|
4025
4144
|
exports.Nt = Nt;
|
|
4145
|
+
exports.Po = Po;
|
|
4026
4146
|
exports.Switch = Switch;
|
|
4027
4147
|
exports.Textarea = Textarea;
|
|
4028
|
-
|
|
4029
|
-
exports.xo = xo;
|
|
4030
|
-
exports.yo = yo;
|
|
4031
|
-
//# sourceMappingURL=textarea-8fv2j5Lo.js.map
|
|
4148
|
+
//# sourceMappingURL=textarea-C-0g_4r4.js.map
|