react-resizable-panels 4.15.2 → 4.15.3

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.
@@ -1,16 +1,16 @@
1
1
  "use client";
2
- import { jsx as X, jsxs as Nn } from "react/jsx-runtime";
3
- import { useId as Fn, useLayoutEffect as ln, useEffect as je, useRef as H, useCallback as se, createContext as Ue, useContext as We, useState as ve, useMemo as pe, useImperativeHandle as St, useSyncExternalStore as at, Children as _n, isValidElement as un } from "react";
2
+ import { jsx as X, jsxs as On } from "react/jsx-runtime";
3
+ import { useId as Gn, useLayoutEffect as ln, useEffect as Ve, useRef as j, useCallback as se, createContext as Ue, useContext as We, useState as ve, useMemo as pe, useImperativeHandle as St, useSyncExternalStore as at, Children as Nn, isValidElement as un } from "react";
4
4
  function it(e) {
5
5
  return (typeof e == "number" || typeof e == "string") && e !== "";
6
6
  }
7
7
  function Ae(e) {
8
- const t = Fn();
8
+ const t = Gn();
9
9
  return it(e) ? `${e}` : t;
10
10
  }
11
- const re = typeof window < "u" ? ln : je;
11
+ const re = typeof window < "u" ? ln : Ve;
12
12
  function xe(e) {
13
- const t = H(e);
13
+ const t = j(e);
14
14
  return re(() => {
15
15
  t.current = e;
16
16
  }, [e]), se(
@@ -42,17 +42,17 @@ function Xe(e, t) {
42
42
  function ht(e, t) {
43
43
  return t ? e * 2 + 1 : e + 1;
44
44
  }
45
- function Bn(e, t) {
45
+ function Fn(e, t) {
46
46
  return t ? e * 2 - 1 : e;
47
47
  }
48
48
  function At(e, t, n) {
49
49
  const o = ht(e, n);
50
- return t === void 0 ? `${o} / -1` : `${o} / span ${Bn(t, n)}`;
50
+ return t === void 0 ? `${o} / -1` : `${o} / span ${Fn(t, n)}`;
51
51
  }
52
- function Hn(e) {
52
+ function _n(e) {
53
53
  return `${e * 2} / span 1`;
54
54
  }
55
- function qn({
55
+ function Bn({
56
56
  crossCount: e,
57
57
  crossSpan: t,
58
58
  crossStart: n,
@@ -79,7 +79,7 @@ function fn() {
79
79
  "Grid Context not found; did you render a Cell or Gridline outside of a Grid?"
80
80
  ), e;
81
81
  }
82
- function Vn({
82
+ function jn({
83
83
  children: e,
84
84
  className: t,
85
85
  column: n,
@@ -91,7 +91,7 @@ function Vn({
91
91
  style: u,
92
92
  ...l
93
93
  }) {
94
- const c = Ae(i), { gutters: d, registerCell: p } = fn(), g = H(null), m = Ye(g, r);
94
+ const c = Ae(i), { gutters: d, registerCell: p } = fn(), g = j(null), m = Ye(g, r);
95
95
  return re(() => {
96
96
  const f = g.current;
97
97
  if (f !== null)
@@ -125,9 +125,11 @@ function Vn({
125
125
  }
126
126
  );
127
127
  }
128
- Vn.displayName = "Cell";
128
+ const Qo = /* @__PURE__ */ Object.assign(jn, {
129
+ displayName: "Cell"
130
+ });
129
131
  let et;
130
- function jn() {
132
+ function Hn() {
131
133
  return et === void 0 && (typeof matchMedia == "function" ? et = !!matchMedia("(pointer:coarse)").matches : et = !1), et;
132
134
  }
133
135
  function gt({
@@ -135,7 +137,7 @@ function gt({
135
137
  axis: t,
136
138
  rect: n
137
139
  }) {
138
- const o = e ? jn() ? t.resizeTargetMinimumSize.coarse : t.resizeTargetMinimumSize.fine : 0;
140
+ const o = e ? Hn() ? t.resizeTargetMinimumSize.coarse : t.resizeTargetMinimumSize.fine : 0;
139
141
  if (n.width < o) {
140
142
  const r = o - n.width;
141
143
  n = new DOMRect(
@@ -182,7 +184,7 @@ function Dt({
182
184
  }
183
185
  return r;
184
186
  }
185
- function Un({
187
+ function qn({
186
188
  axis: e,
187
189
  cells: t,
188
190
  crossTrackCount: n,
@@ -206,10 +208,10 @@ function Un({
206
208
  separator: h
207
209
  }), S = (b, x) => {
208
210
  let h;
209
- for (const I of t) {
210
- const L = e === "column" ? I.row : I.column, M = e === "column" ? I.rowSpan : I.columnSpan;
211
+ for (const C of t) {
212
+ const L = e === "column" ? C.row : C.column, M = e === "column" ? C.rowSpan : C.columnSpan;
211
213
  if (x === "start" ? L === b : L + M - 1 === b) {
212
- const T = I.element.getBoundingClientRect();
214
+ const T = C.element.getBoundingClientRect();
213
215
  if (x === "start") {
214
216
  const P = e === "column" ? T.top : T.left;
215
217
  h = h === void 0 ? P : Math.min(h, P);
@@ -226,7 +228,7 @@ function Un({
226
228
  if (!x || x.index < 1 || x.index >= c || (v.add(x.index), !s && (b.disabled || b.element.hasAttribute("aria-disabled"))) || !m(x.index))
227
229
  continue;
228
230
  let h = b.element.getBoundingClientRect();
229
- const { crossSpan: I, crossStart: L } = x, M = I === void 0 ? n : L + I;
231
+ const { crossSpan: C, crossStart: L } = x, M = C === void 0 ? n : L + C;
230
232
  let T = e === "column" ? h.top : h.left, P = e === "column" ? h.bottom : h.right;
231
233
  if (L > 0) {
232
234
  const G = S(L - 1, "end");
@@ -259,8 +261,8 @@ function Un({
259
261
  () => new Array(c)
260
262
  );
261
263
  for (const b of t) {
262
- const [x, h, I, L] = e === "column" ? [b.column, b.columnSpan, b.row, b.rowSpan] : [b.row, b.rowSpan, b.column, b.columnSpan];
263
- for (let M = Math.max(0, I); M < Math.min(n, I + L); M++)
264
+ const [x, h, C, L] = e === "column" ? [b.column, b.columnSpan, b.row, b.rowSpan] : [b.row, b.rowSpan, b.column, b.columnSpan];
265
+ for (let M = Math.max(0, C); M < Math.min(n, C + L); M++)
264
266
  for (let T = Math.max(0, x); T < Math.min(c, x + h); T++)
265
267
  w[M][T] ??= b;
266
268
  }
@@ -281,16 +283,16 @@ function Un({
281
283
  }, R.set(b, x);
282
284
  }
283
285
  return x;
284
- }, O = ({ crossEnd: b, crossStart: x, end: h, start: I }) => e === "column" ? new DOMRect(I, x, h - I, b - x) : new DOMRect(x, I, b - x, h - I);
286
+ }, O = ({ crossEnd: b, crossStart: x, end: h, start: C }) => e === "column" ? new DOMRect(C, x, h - C, b - x) : new DOMRect(x, C, b - x, h - C);
285
287
  for (let b = 1; b < c; b++) {
286
288
  if (v.has(b) || !m(b))
287
289
  continue;
288
290
  let x;
289
291
  for (let h = 0; h < n; h++) {
290
- const I = w[h][b - 1], L = w[h][b];
292
+ const C = w[h][b - 1], L = w[h][b];
291
293
  let M;
292
- if ((I || L) && I !== L) {
293
- const T = I ? k(I) : void 0, P = L ? k(L) : void 0, G = T?.end ?? P.start, N = P?.start ?? T.end, E = Math.max(
294
+ if ((C || L) && C !== L) {
295
+ const T = C ? k(C) : void 0, P = L ? k(L) : void 0, G = T?.end ?? P.start, N = P?.start ?? T.end, E = Math.max(
294
296
  T?.crossStart ?? -1 / 0,
295
297
  P?.crossStart ?? -1 / 0
296
298
  ), A = Math.min(
@@ -319,7 +321,7 @@ function fe(e) {
319
321
  const t = parseFloat(e ?? "");
320
322
  return Number.isFinite(t) ? t : 0;
321
323
  }
322
- function Wn({
324
+ function Vn({
323
325
  axis: e,
324
326
  element: t,
325
327
  gutterSizes: n,
@@ -401,7 +403,7 @@ class pn {
401
403
  }
402
404
  }
403
405
  }
404
- function Yn(e) {
406
+ function Un(e) {
405
407
  const t = (o) => {
406
408
  o.preventDefault(), o.stopPropagation(), n();
407
409
  }, n = () => {
@@ -420,7 +422,7 @@ function ae() {
420
422
  function wt(e) {
421
423
  return bt.addListener("change", e);
422
424
  }
423
- function Xn(e, t = [], n, o = !1) {
425
+ function Wn(e, t = [], n, o = !1) {
424
426
  const r = Y, i = { ...Y };
425
427
  i.cursorFlags = e, i.state === "active" && (i.didPointerMove ||= o, i.previews = t, n && (i.previewLayoutMap = n)), Y = i, bt.emit("change", {
426
428
  prev: r,
@@ -431,12 +433,12 @@ function he(e) {
431
433
  const t = Y;
432
434
  Y = e, t.state === "active" && e.state !== "active" && t.didPointerMove && (t.hitRegions.forEach(({ separator: n }) => {
433
435
  n && n.element.ownerDocument.activeElement === n.element && n.element.blur();
434
- }), Yn(t.ownerDocument)), bt.emit("change", {
436
+ }), Un(t.ownerDocument)), bt.emit("change", {
435
437
  prev: t,
436
438
  next: e
437
439
  });
438
440
  }
439
- function Kn(e) {
441
+ function Yn(e) {
440
442
  Y.state !== "active" || !Y.previews.some((t) => t.separator === e) || he({
441
443
  ...Y,
442
444
  previews: Y.previews.map(
@@ -444,7 +446,7 @@ function Kn(e) {
444
446
  )
445
447
  });
446
448
  }
447
- function Jn(e) {
449
+ function Xn(e) {
448
450
  if (Y.state === "inactive")
449
451
  return;
450
452
  const t = Y.hitRegions.filter((o) => o.axis !== e), n = Y.state === "active" && Y.previews.some((o) => o.axis === e);
@@ -464,13 +466,13 @@ function Jn(e) {
464
466
  } else
465
467
  he({ ...Y, hitRegions: t });
466
468
  }
467
- const Zn = (e) => e, pt = () => {
469
+ const Kn = (e) => e, pt = () => {
468
470
  }, hn = 1, gn = 2, yn = 4, Sn = 8, $t = 3, Ot = 12;
469
471
  let tt;
470
472
  function Gt() {
471
473
  return tt === void 0 && (tt = !1, typeof window < "u" && (window.navigator.userAgent.includes("Chrome") || window.navigator.userAgent.includes("Firefox")) && (tt = !0)), tt;
472
474
  }
473
- function Qn({
475
+ function Jn({
474
476
  cursorFlags: e,
475
477
  axes: t,
476
478
  state: n
@@ -526,7 +528,7 @@ function Ft(e) {
526
528
  switch (o.state !== "inactive" && o.ownerDocument !== e && (o = { cursorFlags: 0, state: "inactive" }), o.state) {
527
529
  case "active":
528
530
  case "hover": {
529
- const r = Qn({
531
+ const r = Jn({
530
532
  cursorFlags: o.cursorFlags,
531
533
  axes: o.hitRegions.map((s) => s.axis),
532
534
  state: o.state
@@ -549,7 +551,7 @@ function Ft(e) {
549
551
  function _t(e) {
550
552
  return e.state === "inactive" ? void 0 : e.ownerDocument;
551
553
  }
552
- function eo({
554
+ function Zn({
553
555
  next: e,
554
556
  prev: t
555
557
  }) {
@@ -568,15 +570,15 @@ function xt(e, t) {
568
570
  }
569
571
  function _e(e, t) {
570
572
  return Array.from(t).sort((n, o) => {
571
- const r = e === "horizontal" ? to(n, o) : no(n, o);
573
+ const r = e === "horizontal" ? Qn(n, o) : eo(n, o);
572
574
  return r !== 0 ? r : xt(n.element, o.element);
573
575
  });
574
576
  }
575
- function to(e, t) {
577
+ function Qn(e, t) {
576
578
  const n = e.element.offsetLeft - t.element.offsetLeft;
577
579
  return n !== 0 ? n : e.element.offsetWidth - t.element.offsetWidth;
578
580
  }
579
- function no(e, t) {
581
+ function eo(e, t) {
580
582
  const n = e.element.offsetTop - t.element.offsetTop;
581
583
  return n !== 0 ? n : e.element.offsetHeight - t.element.offsetHeight;
582
584
  }
@@ -595,7 +597,7 @@ function vn(e, t) {
595
597
  )
596
598
  };
597
599
  }
598
- function oo({
600
+ function to({
599
601
  orientation: e,
600
602
  rects: t,
601
603
  targetRect: n
@@ -665,7 +667,7 @@ function zt({
665
667
  break;
666
668
  }
667
669
  case 1: {
668
- const x = y[0], h = oo({
670
+ const x = y[0], h = to({
669
671
  orientation: r,
670
672
  rects: [w, R],
671
673
  targetRect: x.element.getBoundingClientRect()
@@ -726,18 +728,18 @@ function zt({
726
728
  function Lt(e) {
727
729
  return e.ownerDocument.defaultView ?? window;
728
730
  }
729
- function ro(e, t) {
731
+ function no(e, t) {
730
732
  const n = Lt(e).getComputedStyle(e), o = parseFloat(n.fontSize);
731
733
  return t * o;
732
734
  }
733
- function io(e, t) {
735
+ function oo(e, t) {
734
736
  const n = getComputedStyle(e.ownerDocument.documentElement), o = parseFloat(n.fontSize);
735
737
  return t * o;
736
738
  }
737
- function so(e, t) {
739
+ function ro(e, t) {
738
740
  return t / 100 * Lt(e).innerHeight;
739
741
  }
740
- function ao(e, t) {
742
+ function io(e, t) {
741
743
  return t / 100 * Lt(e).innerWidth;
742
744
  }
743
745
  function Me({
@@ -757,19 +759,19 @@ function Me({
757
759
  break;
758
760
  }
759
761
  case "rem": {
760
- o = io(t, r);
762
+ o = oo(t, r);
761
763
  break;
762
764
  }
763
765
  case "em": {
764
- o = ro(t, r);
766
+ o = no(t, r);
765
767
  break;
766
768
  }
767
769
  case "vh": {
768
- o = so(t, r);
770
+ o = ro(t, r);
769
771
  break;
770
772
  }
771
773
  case "vw": {
772
- o = ao(t, r);
774
+ o = io(t, r);
773
775
  break;
774
776
  }
775
777
  }
@@ -778,7 +780,7 @@ function Me({
778
780
  function Q(e) {
779
781
  return parseFloat(e.toFixed(3));
780
782
  }
781
- function It(e, t = Ke({ axis: e })) {
783
+ function Ct(e, t = Ke({ axis: e })) {
782
784
  const { items: n } = e;
783
785
  return t === 0 ? n.map((o) => ({
784
786
  groupResizeBehavior: o.constraintProps.groupResizeBehavior,
@@ -850,7 +852,7 @@ function It(e, t = Ke({ axis: e })) {
850
852
  });
851
853
  }
852
854
  let me = /* @__PURE__ */ new Map();
853
- const Ct = new pn();
855
+ const It = new pn();
854
856
  let Be = 0;
855
857
  const nt = [];
856
858
  let ot;
@@ -860,7 +862,7 @@ function ct() {
860
862
  function Rt() {
861
863
  for (let e = 0; e < nt.length; e++)
862
864
  try {
863
- Ct.emit("axisChange", nt[e]);
865
+ It.emit("axisChange", nt[e]);
864
866
  } catch (t) {
865
867
  ot ??= { error: t };
866
868
  }
@@ -872,7 +874,7 @@ function lt() {
872
874
  throw ot = void 0, e;
873
875
  }
874
876
  }
875
- function co(e) {
877
+ function so(e) {
876
878
  me = new Map(me), me.delete(e);
877
879
  }
878
880
  function Te(e, t) {
@@ -890,8 +892,8 @@ function ue(e, t) {
890
892
  function be() {
891
893
  return me;
892
894
  }
893
- function qe(e, t) {
894
- return Ct.addListener("axisChange", (n) => {
895
+ function He(e, t) {
896
+ return It.addListener("axisChange", (n) => {
895
897
  n.axis.id === e && t(n);
896
898
  });
897
899
  }
@@ -904,7 +906,7 @@ function ge(e, t, n) {
904
906
  prev: o,
905
907
  next: t
906
908
  };
907
- Be > 0 ? nt.push(r) : Ct.emit("axisChange", r);
909
+ Be > 0 ? nt.push(r) : It.emit("axisChange", r);
908
910
  }
909
911
  function bn(e, { pointerId: t, pointerType: n }) {
910
912
  return t === e.pointerId || // There is only one pen, but it may be assigned a new pointerId each time it comes into range
@@ -913,7 +915,7 @@ function bn(e, { pointerId: t, pointerType: n }) {
913
915
  function ut(e, t, n = {}) {
914
916
  return e.ownerDocument === t && (n.pointerId === void 0 || bn(e, n));
915
917
  }
916
- function lo(e, t) {
918
+ function ao(e, t) {
917
919
  if (e.length !== t.length)
918
920
  return !1;
919
921
  for (let n = 0; n < e.length; n++)
@@ -951,7 +953,7 @@ function Pe({
951
953
  o = l;
952
954
  return o = Math.min(u, o), o = Q(o), o;
953
955
  }
954
- function Ve({
956
+ function qe({
955
957
  delta: e,
956
958
  initialLayout: t,
957
959
  itemConstraints: n,
@@ -1075,7 +1077,7 @@ function Ve({
1075
1077
  e < 0 ? f-- : f++;
1076
1078
  }
1077
1079
  }
1078
- if (lo(u, l))
1080
+ if (ao(u, l))
1079
1081
  return r;
1080
1082
  {
1081
1083
  const m = e < 0 ? d : c, f = a[m];
@@ -1126,12 +1128,12 @@ function le(e, t) {
1126
1128
  function Pt(e) {
1127
1129
  ct();
1128
1130
  try {
1129
- uo(e);
1131
+ co(e);
1130
1132
  } finally {
1131
1133
  lt();
1132
1134
  }
1133
1135
  }
1134
- function uo({
1136
+ function co({
1135
1137
  commit: e,
1136
1138
  event: t,
1137
1139
  hitRegions: n,
@@ -1164,15 +1166,15 @@ function uo({
1164
1166
  separatorToItems: h
1165
1167
  } = R;
1166
1168
  if (O && x && h) {
1167
- const I = m.resizePreviewMode === "separator" ? c.get(m) ?? x : x, L = Ve({
1169
+ const C = m.resizePreviewMode === "separator" ? c.get(m) ?? x : x, L = qe({
1168
1170
  delta: z,
1169
1171
  initialLayout: w,
1170
1172
  itemConstraints: O,
1171
1173
  pivotIndices: g.items.map((M) => S.indexOf(M)),
1172
- prevLayout: I,
1174
+ prevLayout: C,
1173
1175
  trigger: "mouse-or-touch"
1174
1176
  });
1175
- if (m.resizePreviewMode === "separator" && !e && !le(L, I)) {
1177
+ if (m.resizePreviewMode === "separator" && !e && !le(L, C)) {
1176
1178
  c.set(m, L);
1177
1179
  let M = 0;
1178
1180
  const T = S.map((P) => (M += L[P.id] - w[P.id], M * (f / 100)));
@@ -1183,7 +1185,7 @@ function uo({
1183
1185
  return G === P.offset ? P : { ...P, offset: G };
1184
1186
  });
1185
1187
  }
1186
- if (le(L, I) && z !== 0 && !v)
1188
+ if (le(L, C) && z !== 0 && !v)
1187
1189
  switch (y) {
1188
1190
  case "horizontal": {
1189
1191
  a |= z < 0 ? hn : gn;
@@ -1208,7 +1210,7 @@ function uo({
1208
1210
  let d = 0;
1209
1211
  t.movementX === 0 ? d |= s & $t : d |= a & $t, t.movementY === 0 ? d |= s & Ot : d |= a & Ot;
1210
1212
  const p = u.state === "active" && (t.clientX !== u.pointerDownAtPoint.x || t.clientY !== u.pointerDownAtPoint.y);
1211
- Xn(d, l, c, p);
1213
+ Wn(d, l, c, p);
1212
1214
  }
1213
1215
  function wn(e, t) {
1214
1216
  const n = ae();
@@ -1251,7 +1253,7 @@ function Bt(e) {
1251
1253
  movementY: r
1252
1254
  });
1253
1255
  }
1254
- function fo(e, t, n) {
1256
+ function lo(e, t, n) {
1255
1257
  let o, r = {
1256
1258
  x: 1 / 0,
1257
1259
  y: 1 / 0
@@ -1274,14 +1276,14 @@ function fo(e, t, n) {
1274
1276
  hitRegion: o
1275
1277
  } : void 0;
1276
1278
  }
1277
- function mo(e) {
1279
+ function uo(e) {
1278
1280
  return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
1279
1281
  }
1280
- function po(e, t) {
1282
+ function fo(e, t) {
1281
1283
  if (e === t) throw new Error("Cannot compare node with itself");
1282
1284
  const n = {
1283
- a: Vt(e),
1284
- b: Vt(t)
1285
+ a: qt(e),
1286
+ b: qt(t)
1285
1287
  };
1286
1288
  let o;
1287
1289
  for (; n.a.at(-1) === n.b.at(-1); )
@@ -1291,8 +1293,8 @@ function po(e, t) {
1291
1293
  "Stacking order can only be calculated for elements with a common ancestor"
1292
1294
  );
1293
1295
  const r = {
1294
- a: qt(Ht(n.a)),
1295
- b: qt(Ht(n.b))
1296
+ a: Ht(jt(n.a)),
1297
+ b: Ht(jt(n.b))
1296
1298
  };
1297
1299
  if (r.a === r.b) {
1298
1300
  const i = o.childNodes, s = {
@@ -1308,27 +1310,27 @@ function po(e, t) {
1308
1310
  }
1309
1311
  return Math.sign(r.a - r.b);
1310
1312
  }
1311
- const ho = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
1312
- function go(e) {
1313
+ const mo = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
1314
+ function po(e) {
1313
1315
  const t = getComputedStyle(xn(e) ?? e).display;
1314
1316
  return t === "flex" || t === "inline-flex";
1315
1317
  }
1316
- function yo(e) {
1318
+ function ho(e) {
1317
1319
  const t = getComputedStyle(e);
1318
- return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || go(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" || ho.test(t.willChange) || t.webkitOverflowScrolling === "touch");
1320
+ return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || po(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" || mo.test(t.willChange) || t.webkitOverflowScrolling === "touch");
1319
1321
  }
1320
- function Ht(e) {
1322
+ function jt(e) {
1321
1323
  let t = e.length;
1322
1324
  for (; t--; ) {
1323
1325
  const n = e[t];
1324
- if (F(n, "Missing node"), yo(n)) return n;
1326
+ if (F(n, "Missing node"), ho(n)) return n;
1325
1327
  }
1326
1328
  return null;
1327
1329
  }
1328
- function qt(e) {
1330
+ function Ht(e) {
1329
1331
  return e && Number(getComputedStyle(e).zIndex) || 0;
1330
1332
  }
1331
- function Vt(e) {
1333
+ function qt(e) {
1332
1334
  const t = [];
1333
1335
  for (; e; )
1334
1336
  t.push(e), e = xn(e);
@@ -1336,36 +1338,36 @@ function Vt(e) {
1336
1338
  }
1337
1339
  function xn(e) {
1338
1340
  const { parentNode: t } = e;
1339
- return mo(t) ? t.host : t;
1341
+ return uo(t) ? t.host : t;
1340
1342
  }
1341
- function So(e, t) {
1343
+ function go(e, t) {
1342
1344
  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;
1343
1345
  }
1344
- function vo(e) {
1346
+ function yo(e) {
1345
1347
  try {
1346
1348
  return e.matches(":modal");
1347
1349
  } catch {
1348
1350
  return !1;
1349
1351
  }
1350
1352
  }
1351
- function bo({
1353
+ function So({
1352
1354
  axisElement: e,
1353
1355
  hitRegion: t,
1354
1356
  pointerEventTarget: n
1355
1357
  }) {
1356
1358
  if (yt(n)) {
1357
1359
  const o = n.closest("dialog");
1358
- if (o && !o.contains(e) && vo(o))
1360
+ if (o && !o.contains(e) && yo(o))
1359
1361
  return !1;
1360
1362
  }
1361
1363
  if (!yt(n) || n.contains(e) || e.contains(n) || !n.isConnected || !e.isConnected)
1362
1364
  return !0;
1363
- if (po(n, e) > 0) {
1365
+ if (fo(n, e) > 0) {
1364
1366
  let o = n;
1365
1367
  for (; o; ) {
1366
1368
  if (o.contains(e))
1367
1369
  return !0;
1368
- if (So(o.getBoundingClientRect(), t))
1370
+ if (go(o.getBoundingClientRect(), t))
1369
1371
  return !1;
1370
1372
  o = o.parentElement;
1371
1373
  }
@@ -1377,18 +1379,18 @@ function Et(e, t, n) {
1377
1379
  return t.forEach((r, i) => {
1378
1380
  if (i.disabled || i.element.ownerDocument !== n)
1379
1381
  return;
1380
- const s = zt({ axis: i }), a = fo(i.orientation, s, {
1382
+ const s = zt({ axis: i }), a = lo(i.orientation, s, {
1381
1383
  x: e.clientX,
1382
1384
  y: e.clientY
1383
1385
  });
1384
- a && a.distance.x <= 0 && a.distance.y <= 0 && bo({
1386
+ a && a.distance.x <= 0 && a.distance.y <= 0 && So({
1385
1387
  axisElement: i.element,
1386
1388
  hitRegion: a.hitRegion.rect,
1387
1389
  pointerEventTarget: e.target
1388
1390
  }) && o.push(a.hitRegion);
1389
1391
  }), o;
1390
1392
  }
1391
- function wo(e) {
1393
+ function vo(e) {
1392
1394
  let t = 0, n = 0;
1393
1395
  const o = {};
1394
1396
  for (const i of e)
@@ -1406,7 +1408,7 @@ function wo(e) {
1406
1408
  }
1407
1409
  return o;
1408
1410
  }
1409
- function xo(e, t) {
1411
+ function bo(e, t) {
1410
1412
  const n = e.map((r) => r.id), o = Object.keys(t);
1411
1413
  if (n.length !== o.length)
1412
1414
  return !1;
@@ -1420,7 +1422,7 @@ function zn({
1420
1422
  itemConstraints: t
1421
1423
  }) {
1422
1424
  const n = e.items.map(({ id: r }) => r).join(","), o = e.mutableState.defaultLayout;
1423
- return e.mutableState.layouts[n] ?? (o && xo(e.items, o) ? o : wo(t));
1425
+ return e.mutableState.layouts[n] ?? (o && bo(e.items, o) ? o : vo(t));
1424
1426
  }
1425
1427
  function Ln(e, t) {
1426
1428
  if (Object.keys(e).length !== Object.keys(t).length)
@@ -1430,7 +1432,7 @@ function Ln(e, t) {
1430
1432
  return !1;
1431
1433
  return !0;
1432
1434
  }
1433
- function zo(e, t) {
1435
+ function wo(e, t) {
1434
1436
  return e.length !== t.length ? !1 : e.every((n, o) => Ln(n, t[o]));
1435
1437
  }
1436
1438
  function ze({
@@ -1481,7 +1483,7 @@ function ze({
1481
1483
  }
1482
1484
  return o.reduce((s, a, u) => (s[t[u].itemId] = a, s), {});
1483
1485
  }
1484
- function In({
1486
+ function Cn({
1485
1487
  itemIds: e,
1486
1488
  layout: t
1487
1489
  }) {
@@ -1498,7 +1500,7 @@ function In({
1498
1500
  }))
1499
1501
  });
1500
1502
  }
1501
- function Lo({
1503
+ function xo({
1502
1504
  axis: e,
1503
1505
  nextAxisSize: t,
1504
1506
  prevAxisSize: n,
@@ -1552,16 +1554,16 @@ function Mt({
1552
1554
  const n = Ke({ axis: e });
1553
1555
  if (n === 0)
1554
1556
  return;
1555
- const o = It(e, n);
1557
+ const o = Ct(e, n);
1556
1558
  let r = t.requestedAxisSize, i = t.requestedLayout;
1557
- t.defaultLayoutDeferred && (r = n, i = In({
1559
+ t.defaultLayoutDeferred && (r = n, i = Cn({
1558
1560
  itemIds: e.items.map(({ id: l }) => l),
1559
1561
  layout: zn({
1560
1562
  axis: e,
1561
1563
  itemConstraints: o
1562
1564
  })
1563
1565
  }));
1564
- const s = Lo({
1566
+ const s = xo({
1565
1567
  axis: e,
1566
1568
  nextAxisSize: n,
1567
1569
  prevAxisSize: r,
@@ -1571,7 +1573,7 @@ function Mt({
1571
1573
  itemConstraints: o
1572
1574
  });
1573
1575
  return {
1574
- changed: t.defaultLayoutDeferred || !le(t.layout, a) || !zo(
1576
+ changed: t.defaultLayoutDeferred || !le(t.layout, a) || !wo(
1575
1577
  t.derivedItemConstraints,
1576
1578
  o
1577
1579
  ) || t.axisSize !== n,
@@ -1637,11 +1639,11 @@ function kt({
1637
1639
  derivedItemConstraints: g
1638
1640
  }) => {
1639
1641
  const m = p[t], f = d.findIndex((h) => h.id === t), y = f === 0, S = f === d.length - 1;
1640
- if (S && c < m && (y || d.slice(0, f).every((h, I) => {
1641
- const L = g[I];
1642
+ if (S && c < m && (y || d.slice(0, f).every((h, C) => {
1643
+ const L = g[C];
1642
1644
  return L?.collapsible && W(L.collapsedSize, p[L.itemId]);
1643
1645
  }))) {
1644
- const h = d.slice(0, f).reduce((I, L) => I + p[L.id], 0);
1646
+ const h = d.slice(0, f).reduce((C, L) => C + p[L.id], 0);
1645
1647
  return {
1646
1648
  ...p,
1647
1649
  [t]: Q(100 - h)
@@ -1655,8 +1657,8 @@ function kt({
1655
1657
  }), R = { ...p };
1656
1658
  let k = w - m;
1657
1659
  for (const h of y ? [1] : S ? [-1] : [1, -1])
1658
- for (let I = f + h; I >= 0 && I < d.length && !W(k, 0); I += h) {
1659
- const L = g[I], M = R[L.itemId];
1660
+ for (let C = f + h; C >= 0 && C < d.length && !W(k, 0); C += h) {
1661
+ const L = g[C], M = R[L.itemId];
1660
1662
  if (st(L, R) || (k > 0 ? oe(M, L.minSize) <= 0 : oe(M, L.maxSize) >= 0))
1661
1663
  continue;
1662
1664
  const T = k > 0 ? Math.max(L.minSize, M - k) : Math.min(L.maxSize, M - k);
@@ -1664,22 +1666,22 @@ function kt({
1664
1666
  }
1665
1667
  if (R[t] = Q(w - k), W(k, 0) || l && oe(R[t], z.minSize) >= 0)
1666
1668
  return R;
1667
- const O = (h, I, L) => {
1669
+ const O = (h, C, L) => {
1668
1670
  const M = h === "after" ? 1 : -1, T = (G) => {
1669
1671
  for (let N = f + M; N >= 0 && N < d.length; N += M) {
1670
1672
  const E = g[N];
1671
- if (!st(E, I) && G(E))
1673
+ if (!st(E, C) && G(E))
1672
1674
  return N;
1673
1675
  }
1674
1676
  }, P = T(
1675
- ({ itemId: G, maxSize: N, minSize: E }) => L > 0 ? oe(I[G], E) > 0 : oe(I[G], N) < 0
1677
+ ({ itemId: G, maxSize: N, minSize: E }) => L > 0 ? oe(C[G], E) > 0 : oe(C[G], N) < 0
1676
1678
  ) ?? T(() => !0) ?? f + M;
1677
- return Ve({
1679
+ return qe({
1678
1680
  delta: h === "after" ? L : -L,
1679
- initialLayout: I,
1681
+ initialLayout: C,
1680
1682
  itemConstraints: g,
1681
1683
  pivotIndices: h === "after" ? [f, P] : [P, f],
1682
- prevLayout: I,
1684
+ prevLayout: C,
1683
1685
  trigger: "imperative-api"
1684
1686
  });
1685
1687
  };
@@ -1690,21 +1692,21 @@ function kt({
1690
1692
  c - m
1691
1693
  );
1692
1694
  const b = (h) => {
1693
- const I = O(h, p, c - m), L = c - I[t];
1694
- return W(L, 0) ? I : O(
1695
+ const C = O(h, p, c - m), L = c - C[t];
1696
+ return W(L, 0) ? C : O(
1695
1697
  h === "after" ? "before" : "after",
1696
- I,
1698
+ C,
1697
1699
  L
1698
1700
  );
1699
1701
  }, x = b("after");
1700
- if (jt({
1702
+ if (Vt({
1701
1703
  itemConstraints: g,
1702
1704
  itemId: t,
1703
1705
  nextLayout: x,
1704
1706
  prevLayout: p
1705
1707
  })) {
1706
1708
  const h = b("before");
1707
- if (!jt({
1709
+ if (!Vt({
1708
1710
  itemConstraints: g,
1709
1711
  itemId: t,
1710
1712
  nextLayout: h,
@@ -1769,7 +1771,7 @@ function kt({
1769
1771
  function st({ collapsedSize: e, collapsible: t, itemId: n }, o) {
1770
1772
  return t && W(o[n], e);
1771
1773
  }
1772
- function jt({
1774
+ function Vt({
1773
1775
  itemConstraints: e,
1774
1776
  itemId: t,
1775
1777
  nextLayout: n,
@@ -1802,7 +1804,7 @@ function Ut(e) {
1802
1804
  }
1803
1805
  });
1804
1806
  }
1805
- function Cn(e) {
1807
+ function In(e) {
1806
1808
  const t = be();
1807
1809
  for (const [n] of t)
1808
1810
  if (n.separators.some(
@@ -1811,7 +1813,7 @@ function Cn(e) {
1811
1813
  return n;
1812
1814
  throw Error("Could not find parent Group for separator element");
1813
1815
  }
1814
- function He({
1816
+ function je({
1815
1817
  axisId: e
1816
1818
  }) {
1817
1819
  const t = () => {
@@ -1846,13 +1848,13 @@ function He({
1846
1848
  };
1847
1849
  }
1848
1850
  function Re(e, t) {
1849
- const n = Cn(e), o = ue(n.id, !0), r = n.separators.find(
1851
+ const n = In(e), o = ue(n.id, !0), r = n.separators.find(
1850
1852
  (d) => d.element === e
1851
1853
  );
1852
1854
  F(r, "Matching separator not found");
1853
1855
  const i = o.separatorToItems.get(r);
1854
1856
  F(i, "Matching panels not found");
1855
- const s = i.map((d) => n.items.indexOf(d)), u = He({ axisId: n.id }).getLayout(), l = Ve({
1857
+ const s = i.map((d) => n.items.indexOf(d)), u = je({ axisId: n.id }).getLayout(), l = qe({
1856
1858
  delta: t,
1857
1859
  initialLayout: u,
1858
1860
  itemConstraints: o.derivedItemConstraints,
@@ -1881,13 +1883,13 @@ function Re(e, t) {
1881
1883
  { isUserInteraction: !0 }
1882
1884
  );
1883
1885
  }
1884
- function Io(e) {
1886
+ function zo(e) {
1885
1887
  return e.separators.filter((t) => !t.disabled);
1886
1888
  }
1887
1889
  function Wt(e) {
1888
1890
  if (e.defaultPrevented)
1889
1891
  return;
1890
- const t = e.currentTarget, n = Cn(t);
1892
+ const t = e.currentTarget, n = In(t);
1891
1893
  if (!(n.disabled || n.separators.find(
1892
1894
  (r) => r.element === t
1893
1895
  )?.disabled))
@@ -1931,7 +1933,7 @@ function Wt(e) {
1931
1933
  }
1932
1934
  case "F6": {
1933
1935
  e.preventDefault();
1934
- const r = Io(n).map(
1936
+ const r = zo(n).map(
1935
1937
  (u) => u.element
1936
1938
  ), i = r.findIndex(
1937
1939
  (u) => u === e.currentTarget
@@ -1994,7 +1996,7 @@ function Yt(e) {
1994
1996
  function Xt(e) {
1995
1997
  De(e.currentTarget, e);
1996
1998
  }
1997
- function Co(e, t) {
1999
+ function Lo(e, t) {
1998
2000
  const { element: n, orientation: o, items: r } = e, i = n.getBoundingClientRect(), s = o === "horizontal";
1999
2001
  return zt({
2000
2002
  expandHitTargets: !1,
@@ -2057,7 +2059,7 @@ function Kt(e) {
2057
2059
  u && r.set(a.axis, u.layout);
2058
2060
  });
2059
2061
  const s = Array.from(r.keys()).flatMap(
2060
- (a) => a.resizePreviewMode === "separator" ? Co(a, o) : []
2062
+ (a) => a.resizePreviewMode === "separator" ? Lo(a, o) : []
2061
2063
  );
2062
2064
  he({
2063
2065
  cursorFlags: 0,
@@ -2161,7 +2163,7 @@ function tn(e) {
2161
2163
  function nn(e) {
2162
2164
  De(e.currentTarget.document);
2163
2165
  }
2164
- function Ro(e, t, n) {
2166
+ function Co(e, t, n) {
2165
2167
  if (!n[0])
2166
2168
  return;
2167
2169
  const r = e.items.find((l) => l.element === t);
@@ -2201,7 +2203,7 @@ function Rn(e) {
2201
2203
  }
2202
2204
  } else
2203
2205
  try {
2204
- Ro(e, v, S);
2206
+ Co(e, v, S);
2205
2207
  } catch (z) {
2206
2208
  f ??= { error: z };
2207
2209
  }
@@ -2218,7 +2220,7 @@ function Rn(e) {
2218
2220
  `Panel ids must be unique; id "${m.id}" was used more than once`
2219
2221
  ), o.add(m.id), m.onResize && i.observe(m.element);
2220
2222
  });
2221
- const s = Ke({ axis: e }), a = It(e, s), u = zn({
2223
+ const s = Ke({ axis: e }), a = Ct(e, s), u = zn({
2222
2224
  axis: e,
2223
2225
  itemConstraints: a
2224
2226
  }), l = ze({
@@ -2238,7 +2240,7 @@ function Rn(e) {
2238
2240
  axisSize: s,
2239
2241
  layout: l,
2240
2242
  requestedAxisSize: s,
2241
- requestedLayout: In({
2243
+ requestedLayout: Cn({
2242
2244
  itemIds: e.items.map(({ id: m }) => m),
2243
2245
  layout: u
2244
2246
  }),
@@ -2248,7 +2250,7 @@ function Rn(e) {
2248
2250
  !r.has(m.id),
2249
2251
  `Separator ids must be unique; id "${m.id}" was used more than once`
2250
2252
  ), r.add(m.id), m.element.addEventListener("keydown", Wt);
2251
- }), on || (on = !0, wt(eo)), Ee.get(c) === 1 && (c.addEventListener("contextmenu", Bt, !0), c.addEventListener("dblclick", Ut, !0), c.addEventListener(
2253
+ }), on || (on = !0, wt(Zn)), Ee.get(c) === 1 && (c.addEventListener("contextmenu", Bt, !0), c.addEventListener("dblclick", Ut, !0), c.addEventListener(
2252
2254
  "lostpointercapture",
2253
2255
  Yt,
2254
2256
  !0
@@ -2260,7 +2262,7 @@ function Rn(e) {
2260
2262
  t = !1, Ee.set(
2261
2263
  c,
2262
2264
  Math.max(0, (Ee.get(c) ?? 0) - 1)
2263
- ), co(e), Jn(e), e.separators.forEach((f) => {
2265
+ ), so(e), Xn(e), e.separators.forEach((f) => {
2264
2266
  f.element.removeEventListener("keydown", Wt);
2265
2267
  }), Ee.get(c) || (c.removeEventListener(
2266
2268
  "contextmenu",
@@ -2311,14 +2313,14 @@ function En() {
2311
2313
  return [e, n];
2312
2314
  }
2313
2315
  function dt(e) {
2314
- const t = H({ ...e });
2316
+ const t = j({ ...e });
2315
2317
  return re(() => {
2316
2318
  for (const n in e)
2317
2319
  t.current[n] = e[n];
2318
2320
  }, [e]), t.current;
2319
2321
  }
2320
2322
  const Tt = Ue(null), Mn = Ue(null);
2321
- function Po({
2323
+ function Io({
2322
2324
  layout: e,
2323
2325
  itemConstraints: t,
2324
2326
  itemId: n,
@@ -2331,7 +2333,7 @@ function Po({
2331
2333
  if (a) {
2332
2334
  const u = a.maxSize, l = a.collapsible ? a.collapsedSize : a.minSize, c = [o, o + 1];
2333
2335
  i = ze({
2334
- layout: Ve({
2336
+ layout: qe({
2335
2337
  delta: l - s,
2336
2338
  initialLayout: e,
2337
2339
  itemConstraints: t,
@@ -2340,7 +2342,7 @@ function Po({
2340
2342
  }),
2341
2343
  itemConstraints: t
2342
2344
  })[n], r = ze({
2343
- layout: Ve({
2345
+ layout: qe({
2344
2346
  delta: u - s,
2345
2347
  initialLayout: e,
2346
2348
  itemConstraints: t,
@@ -2385,7 +2387,7 @@ function kn({
2385
2387
  className: r,
2386
2388
  preview: p,
2387
2389
  style: f
2388
- }), [w, R] = ve({}), [k, O] = ve("inactive"), [b, x] = ve(!1), h = H(null), I = H(null), L = Ye(h, l), M = n === "horizontal" ? "vertical" : "horizontal";
2390
+ }), [w, R] = ve({}), [k, O] = ve("inactive"), [b, x] = ve(!1), h = j(null), C = j(null), L = Ye(h, l), M = n === "horizontal" ? "vertical" : "horizontal";
2389
2391
  re(() => {
2390
2392
  const G = h.current;
2391
2393
  if (G !== null) {
@@ -2407,34 +2409,34 @@ function kn({
2407
2409
  return z.style;
2408
2410
  }
2409
2411
  };
2410
- I.current = N;
2412
+ C.current = N;
2411
2413
  const E = g(N), A = wt(
2412
- (j) => {
2414
+ (V) => {
2413
2415
  O(
2414
- j.next.state !== "inactive" && j.next.hitRegions.some(
2416
+ V.next.state !== "inactive" && V.next.hitRegions.some(
2415
2417
  (U) => U.separator === N || (d?.(U) ?? !1)
2416
- ) ? j.next.state : "inactive"
2418
+ ) ? V.next.state : "inactive"
2417
2419
  );
2418
2420
  }
2419
- ), V = qe(
2421
+ ), q = He(
2420
2422
  t,
2421
- (j) => {
2422
- const { derivedItemConstraints: U, layout: de, separatorToItems: we } = j.next, Le = we.get(N);
2423
+ (V) => {
2424
+ const { derivedItemConstraints: U, layout: de, separatorToItems: we } = V.next, Le = we.get(N);
2423
2425
  if (Le) {
2424
- const Ie = Le[0], $e = U.findIndex(
2425
- (C) => C.itemId === Ie.id
2426
- ), { layoutStrategy: ee } = j.axis;
2426
+ const Ce = Le[0], $e = U.findIndex(
2427
+ (I) => I.itemId === Ce.id
2428
+ ), { layoutStrategy: ee } = V.axis;
2427
2429
  R({
2428
- ...Po({
2430
+ ...Io({
2429
2431
  layout: de,
2430
2432
  itemConstraints: U,
2431
- itemId: Ie.id,
2433
+ itemId: Ce.id,
2432
2434
  itemIndex: $e
2433
2435
  }),
2434
2436
  // Items without DOM elements of their own (e.g. Grid tracks) control other elements
2435
2437
  ...ee?.getItemAriaControls && {
2436
2438
  valueControls: ee.getItemAriaControls(
2437
- Ie.id
2439
+ Ce.id
2438
2440
  )
2439
2441
  }
2440
2442
  });
@@ -2442,13 +2444,13 @@ function kn({
2442
2444
  }
2443
2445
  );
2444
2446
  return () => {
2445
- I.current = null, A(), V(), E();
2447
+ C.current = null, A(), q(), E();
2446
2448
  };
2447
2449
  }
2448
2450
  }, [t, c, d, g, z]), re(() => {
2449
- const G = I.current;
2450
- G && Kn(G);
2451
- }, [p]), je(() => {
2451
+ const G = C.current;
2452
+ G && Yn(G);
2453
+ }, [p]), Ve(() => {
2452
2454
  v(c, { disabled: a, disableDoubleClick: u });
2453
2455
  }, [a, u, c, v]);
2454
2456
  let T;
@@ -2538,7 +2540,7 @@ function rn({
2538
2540
  h
2539
2541
  ),
2540
2542
  [e, o, r, i, a, g]
2541
- ), b = Hn(a), x = qn({
2543
+ ), b = _n(a), x = Bn({
2542
2544
  crossCount: z,
2543
2545
  crossSpan: o,
2544
2546
  crossStart: r,
@@ -2568,7 +2570,7 @@ function rn({
2568
2570
  }
2569
2571
  );
2570
2572
  }
2571
- function Tn(e) {
2573
+ function Ro(e) {
2572
2574
  const { children: t, className: n, disabled: o, elementRef: r, style: i } = e;
2573
2575
  return e.type === "column" ? /* @__PURE__ */ X(
2574
2576
  rn,
@@ -2598,8 +2600,9 @@ function Tn(e) {
2598
2600
  }
2599
2601
  );
2600
2602
  }
2601
- Tn.displayName = "Gridline";
2602
- const ke = ["column", "row"], sn = { columns: {}, rows: {} };
2603
+ const Po = /* @__PURE__ */ Object.assign(Ro, {
2604
+ displayName: "Gridline"
2605
+ }), ke = ["column", "row"], sn = { columns: {}, rows: {} };
2603
2606
  function Eo({
2604
2607
  children: e,
2605
2608
  className: t,
@@ -2621,59 +2624,59 @@ function Eo({
2621
2624
  ...m
2622
2625
  }) {
2623
2626
  const f = Ae(u), y = se(
2624
- (C) => C === "column" ? `${f}:columns` : `${f}:rows`,
2627
+ (I) => I === "column" ? `${f}:columns` : `${f}:rows`,
2625
2628
  [f]
2626
- ), S = an(n, "columns"), v = an(p, "rows"), z = (C) => C === "column" ? S : v, w = H({
2629
+ ), S = an(n, "columns"), v = an(p, "rows"), z = (I) => I === "column" ? S : v, w = j({
2627
2630
  onLayoutChange: sn,
2628
2631
  onLayoutChanged: sn
2629
- }), R = xe((C) => {
2630
- cn(w.current.onLayoutChange, C) || (w.current.onLayoutChange = C, l?.(C));
2632
+ }), R = xe((I) => {
2633
+ cn(w.current.onLayoutChange, I) || (w.current.onLayoutChange = I, l?.(I));
2631
2634
  }), k = xe(
2632
- (C, D, B) => {
2633
- cn(w.current.onLayoutChanged, C) || (w.current.onLayoutChanged = C, c?.(C, { isUserInteraction: D, requestedLayout: B }));
2635
+ (I, D, B) => {
2636
+ cn(w.current.onLayoutChanged, I) || (w.current.onLayoutChanged = I, c?.(I, { isUserInteraction: D, requestedLayout: B }));
2634
2637
  }
2635
- ), O = H(null), b = Ye(O, s), [x, h] = En(), I = H({
2638
+ ), O = j(null), b = Ye(O, s), [x, h] = En(), C = j({
2636
2639
  cells: [],
2637
2640
  column: { expandedItemSizes: {}, layouts: {} },
2638
2641
  loggedErrors: /* @__PURE__ */ new Set(),
2639
2642
  row: { expandedItemSizes: {}, layouts: {} },
2640
2643
  separators: /* @__PURE__ */ new Map()
2641
2644
  }), L = { column: !1, row: !1 };
2642
- for (const C of I.current.separators.values())
2643
- L[C.axis] = !0;
2644
- An(e, L);
2645
+ for (const I of C.current.separators.values())
2646
+ L[I.axis] = !0;
2647
+ Tn(e, L);
2645
2648
  const M = dt({
2646
2649
  defaultLayout: o,
2647
2650
  disableCursor: r,
2648
2651
  resizeTargetMinimumSize: d
2649
2652
  }), T = xe(() => !!M.disableCursor), P = se(
2650
- (C) => {
2651
- const D = I.current;
2652
- return D.cells = [...D.cells, C], h(), () => {
2653
+ (I) => {
2654
+ const D = C.current;
2655
+ return D.cells = [...D.cells, I], h(), () => {
2653
2656
  D.cells = D.cells.filter(
2654
- (B) => B !== C
2657
+ (B) => B !== I
2655
2658
  ), h();
2656
2659
  };
2657
2660
  },
2658
2661
  [h]
2659
2662
  ), G = se(
2660
- (C, D) => {
2661
- const B = I.current;
2662
- return B.separators = new Map(B.separators), B.separators.set(D, C), h(), () => {
2663
+ (I, D) => {
2664
+ const B = C.current;
2665
+ return B.separators = new Map(B.separators), B.separators.set(D, I), h(), () => {
2663
2666
  B.separators = new Map(B.separators), B.separators.delete(D), h();
2664
2667
  };
2665
2668
  },
2666
2669
  [h]
2667
2670
  ), N = se(
2668
- (C, {
2671
+ (I, {
2669
2672
  disabled: D,
2670
2673
  disableDoubleClick: B
2671
2674
  }) => {
2672
- for (const _ of I.current.separators.keys())
2673
- _.id === C && (_.disabled = D, _.disableDoubleClick = B);
2675
+ for (const _ of C.current.separators.keys())
2676
+ _.id === I && (_.disabled = D, _.disableDoubleClick = B);
2674
2677
  },
2675
2678
  []
2676
- ), E = I.current.separators, A = pe(
2679
+ ), E = C.current.separators, A = pe(
2677
2680
  () => ({
2678
2681
  getDisableCursor: T,
2679
2682
  getResizeAxisId: y,
@@ -2704,12 +2707,12 @@ function Eo({
2704
2707
  E,
2705
2708
  N
2706
2709
  ]
2707
- ), V = H([]);
2710
+ ), q = j([]);
2708
2711
  re(() => {
2709
- const C = O.current;
2710
- if (C === null)
2712
+ const I = O.current;
2713
+ if (I === null)
2711
2714
  return;
2712
- const D = I.current, B = ko({
2715
+ const D = C.current, B = ko({
2713
2716
  cells: D.cells,
2714
2717
  separatorPlacements: D.separators,
2715
2718
  trackCounts: { column: S.length, row: v.length }
@@ -2717,12 +2720,12 @@ function Eo({
2717
2720
  B.forEach(($) => {
2718
2721
  D.loggedErrors.has($) || console.error($);
2719
2722
  }), D.loggedErrors = new Set(B);
2720
- const _ = ($) => Array.from(D.separators.entries()).filter(([, J]) => J.axis === $).sort(([, J], [, ye]) => J.index - ye.index).map(([J]) => J), q = ($) => {
2721
- const J = $ === "column" ? S : v, ye = $ === "column" ? v : S, Se = J.map((te) => te.id), Je = y($), Ze = _($), Ce = Ze.length > 0, Qe = J.map(
2723
+ const _ = ($) => Array.from(D.separators.entries()).filter(([, J]) => J.axis === $).sort(([, J], [, ye]) => J.index - ye.index).map(([J]) => J), H = ($) => {
2724
+ const J = $ === "column" ? S : v, ye = $ === "column" ? v : S, Se = J.map((te) => te.id), Je = y($), Ze = _($), Ie = Ze.length > 0, Qe = J.map(
2722
2725
  ({ id: te, ...ie }, ne) => ({
2723
2726
  // Tracks don't have DOM elements of their own;
2724
2727
  // the Grid element is used to resolve relative size constraints (e.g. "em")
2725
- element: C,
2728
+ element: I,
2726
2729
  id: Se[ne],
2727
2730
  idIsStable: !0,
2728
2731
  mutableValues: {
@@ -2734,7 +2737,7 @@ function Eo({
2734
2737
  })
2735
2738
  ), Ge = () => {
2736
2739
  const te = [];
2737
- if (Ce) {
2740
+ if (Ie) {
2738
2741
  for (const [ie, ne] of D.separators)
2739
2742
  if (ne.axis === $ && vt(ne.index, J.length)) {
2740
2743
  const Fe = ie.element.getBoundingClientRect();
@@ -2744,11 +2747,11 @@ function Eo({
2744
2747
  );
2745
2748
  }
2746
2749
  }
2747
- return Wn({
2750
+ return Vn({
2748
2751
  axis: $,
2749
- element: C,
2752
+ element: I,
2750
2753
  gutterSizes: te.filter((ie) => ie !== void 0),
2751
- hasGutters: Ce,
2754
+ hasGutters: Ie,
2752
2755
  layout: ue(Je)?.layout,
2753
2756
  trackIds: Se
2754
2757
  });
@@ -2764,14 +2767,14 @@ function Eo({
2764
2767
  }
2765
2768
  return {
2766
2769
  disabled: !!i,
2767
- element: C,
2770
+ element: I,
2768
2771
  id: Je,
2769
2772
  layoutStrategy: {
2770
2773
  getItemAriaControls: (te) => {
2771
2774
  const ie = Se.indexOf(te);
2772
2775
  return D.cells.filter((ne) => {
2773
- const Fe = $ === "column" ? ne.column : ne.row, Gn = $ === "column" ? ne.columnSpan : ne.rowSpan;
2774
- return Fe <= ie && ie < Fe + Gn;
2776
+ const Fe = $ === "column" ? ne.column : ne.row, $n = $ === "column" ? ne.columnSpan : ne.rowSpan;
2777
+ return Fe <= ie && ie < Fe + $n;
2775
2778
  }).map((ne) => ne.element.id).filter(Boolean).join(" ") || void 0;
2776
2779
  },
2777
2780
  calculateAvailableSize: () => Ge().availableSize,
@@ -2779,7 +2782,7 @@ function Eo({
2779
2782
  expandHitTargets: te,
2780
2783
  axis: ie,
2781
2784
  includeDisabled: ne
2782
- }) => Un({
2785
+ }) => qn({
2783
2786
  axis: $,
2784
2787
  cells: D.cells,
2785
2788
  crossTrackCount: ye.length,
@@ -2805,8 +2808,8 @@ function Eo({
2805
2808
  },
2806
2809
  separators: Ze
2807
2810
  };
2808
- }, Z = ke.map(q);
2809
- V.current = Z;
2811
+ }, Z = ke.map(H);
2812
+ q.current = Z;
2810
2813
  const K = Z.map(($) => Rn($)), ce = () => {
2811
2814
  const [$, J] = Z.map(
2812
2815
  (ye) => ue(ye.id)
@@ -2834,11 +2837,11 @@ function Eo({
2834
2837
  );
2835
2838
  }
2836
2839
  } catch (J) {
2837
- throw V.current = [], K.forEach((ye) => ye()), J;
2840
+ throw q.current = [], K.forEach((ye) => ye()), J;
2838
2841
  }
2839
2842
  }
2840
2843
  const Oe = Z.map(
2841
- ($) => qe($.id, (J) => {
2844
+ ($) => He($.id, (J) => {
2842
2845
  const {
2843
2846
  defaultLayoutDeferred: ye,
2844
2847
  derivedItemConstraints: Se,
@@ -2854,25 +2857,25 @@ function Eo({
2854
2857
  prevLayout: J.prev?.layout,
2855
2858
  requestedLayout: Ze
2856
2859
  });
2857
- const Ce = ce();
2858
- if (Ce) {
2860
+ const Ie = ce();
2861
+ if (Ie) {
2859
2862
  const Qe = ae(), Ge = Qe.state !== "active" || !Qe.hitRegions.some(
2860
2863
  (Ne) => Z.includes(Ne.axis)
2861
2864
  );
2862
2865
  try {
2863
- R(Ce.layout);
2866
+ R(Ie.layout);
2864
2867
  } finally {
2865
2868
  Ge && k(
2866
- Ce.layout,
2869
+ Ie.layout,
2867
2870
  J.isUserInteraction,
2868
- Ce.requestedLayout
2871
+ Ie.requestedLayout
2869
2872
  );
2870
2873
  }
2871
2874
  }
2872
2875
  })
2873
2876
  );
2874
2877
  return () => {
2875
- V.current = [], K.forEach(($) => $()), Oe.forEach(($) => $());
2878
+ q.current = [], K.forEach(($) => $()), Oe.forEach(($) => $());
2876
2879
  };
2877
2880
  }, [
2878
2881
  S,
@@ -2884,27 +2887,27 @@ function Eo({
2884
2887
  v,
2885
2888
  x,
2886
2889
  M
2887
- ]), je(() => {
2888
- V.current.forEach((C) => {
2889
- C.mutableState.defaultLayout = o?.[C.orientation === "horizontal" ? "columns" : "rows"], C.mutableState.disableCursor = !!r;
2890
+ ]), Ve(() => {
2891
+ q.current.forEach((I) => {
2892
+ I.mutableState.defaultLayout = o?.[I.orientation === "horizontal" ? "columns" : "rows"], I.mutableState.disableCursor = !!r;
2890
2893
  });
2891
2894
  });
2892
- const j = pe(() => {
2893
- const C = () => {
2894
- const [_, q] = ke.map(y);
2895
- return !Te(_) || !Te(q) ? { columns: {}, rows: {} } : {
2896
- columns: He({
2895
+ const V = pe(() => {
2896
+ const I = () => {
2897
+ const [_, H] = ke.map(y);
2898
+ return !Te(_) || !Te(H) ? { columns: {}, rows: {} } : {
2899
+ columns: je({
2897
2900
  axisId: _
2898
2901
  }).getLayout(),
2899
- rows: He({ axisId: q }).getLayout()
2902
+ rows: je({ axisId: H }).getLayout()
2900
2903
  };
2901
- }, D = (_) => _.map((q) => `"${q}"`).join(", "), B = (_, q) => {
2904
+ }, D = (_) => _.map((H) => `"${H}"`).join(", "), B = (_, H) => {
2902
2905
  const Z = y(_), K = () => {
2903
2906
  const ce = Te(Z);
2904
2907
  return F(ce, `Grid "${f}" has not been mounted`), F(
2905
- ce.items.some((Oe) => Oe.id === q),
2906
- `Grid "${f}" no longer contains a ${_} with id "${q}"; ${_} ids are ${D(ce.items.map((Oe) => Oe.id))}`
2907
- ), kt({ axisId: Z, itemId: q });
2908
+ ce.items.some((Oe) => Oe.id === H),
2909
+ `Grid "${f}" no longer contains a ${_} with id "${H}"; ${_} ids are ${D(ce.items.map((Oe) => Oe.id))}`
2910
+ ), kt({ axisId: Z, itemId: H });
2908
2911
  };
2909
2912
  return {
2910
2913
  collapse: () => K().collapse(),
@@ -2915,60 +2918,60 @@ function Eo({
2915
2918
  };
2916
2919
  };
2917
2920
  return {
2918
- getLayout: C,
2919
- getTrackById: (_, q) => {
2920
- const Z = _ === "column" ? S : v, K = `${q}`;
2921
+ getLayout: I,
2922
+ getTrackById: (_, H) => {
2923
+ const Z = _ === "column" ? S : v, K = `${H}`;
2921
2924
  return F(
2922
2925
  Z.some((ce) => ce.id === K),
2923
2926
  `Grid "${f}" does not contain a ${_} with id "${K}"; ${_} ids are ${D(Z.map((ce) => ce.id))}`
2924
2927
  ), B(_, K);
2925
2928
  },
2926
- getTrackByIndex: (_, q) => {
2927
- const Z = _ === "column" ? S : v, K = Number.isInteger(q) ? Z[q] : void 0;
2929
+ getTrackByIndex: (_, H) => {
2930
+ const Z = _ === "column" ? S : v, K = Number.isInteger(H) ? Z[H] : void 0;
2928
2931
  return F(
2929
2932
  K,
2930
- `Grid "${f}" does not contain a ${_} at index ${q}; it has ${Z.length} ${_}s`
2933
+ `Grid "${f}" does not contain a ${_} at index ${H}; it has ${Z.length} ${_}s`
2931
2934
  ), B(_, K.id);
2932
2935
  },
2933
- setLayout: (_) => (ke.forEach((q) => {
2934
- const Z = _[q === "column" ? "columns" : "rows"], K = y(q);
2935
- Z && Te(K) && He({ axisId: K }).setLayout(Z);
2936
- }), C())
2936
+ setLayout: (_) => (ke.forEach((H) => {
2937
+ const Z = _[H === "column" ? "columns" : "rows"], K = y(H);
2938
+ Z && Te(K) && je({ axisId: K }).setLayout(Z);
2939
+ }), I())
2937
2940
  };
2938
2941
  }, [S, y, f, v]);
2939
- St(a, () => j, [j]);
2940
- const U = H(j);
2942
+ St(a, () => V, [V]);
2943
+ const U = j(V);
2941
2944
  re(() => {
2942
- U.current = j;
2945
+ U.current = V;
2943
2946
  });
2944
2947
  const de = pe(
2945
2948
  () => ({
2946
2949
  getLayout: () => U.current.getLayout(),
2947
- getTrackById: (C, D) => U.current.getTrackById(C, D),
2948
- getTrackByIndex: (C, D) => U.current.getTrackByIndex(C, D),
2950
+ getTrackById: (I, D) => U.current.getTrackById(I, D),
2951
+ getTrackByIndex: (I, D) => U.current.getTrackByIndex(I, D),
2949
2952
  id: f,
2950
- setLayout: (C) => U.current.setLayout(C)
2953
+ setLayout: (I) => U.current.setLayout(I)
2951
2954
  }),
2952
2955
  [f]
2953
- ), we = () => ke.map((C) => {
2954
- const D = ue(y(C)), B = z(C);
2955
- return (D && !D.defaultLayoutDeferred ? B.map((q) => `minmax(0, ${D.layout[q.id] ?? 1}fr)`) : Mo(
2956
+ ), we = () => ke.map((I) => {
2957
+ const D = ue(y(I)), B = z(I);
2958
+ return (D && !D.defaultLayoutDeferred ? B.map((H) => `minmax(0, ${D.layout[H.id] ?? 1}fr)`) : Mo(
2956
2959
  B,
2957
- o?.[C === "column" ? "columns" : "rows"]
2958
- )).join(L[C] ? " auto " : " ");
2960
+ o?.[I === "column" ? "columns" : "rows"]
2961
+ )).join(L[I] ? " auto " : " ");
2959
2962
  }).join("|"), Le = se(
2960
- (C) => {
2963
+ (I) => {
2961
2964
  const D = ke.map(
2962
- (B) => qe(y(B), C)
2965
+ (B) => He(y(B), I)
2963
2966
  );
2964
2967
  return () => D.forEach((B) => B());
2965
2968
  },
2966
2969
  [y]
2967
- ), Ie = at(
2970
+ ), Ce = at(
2968
2971
  Le,
2969
2972
  we,
2970
2973
  we
2971
- ), [$e, ee] = Ie.split("|");
2974
+ ), [$e, ee] = Ce.split("|");
2972
2975
  return /* @__PURE__ */ X(dn.Provider, { value: A, children: /* @__PURE__ */ X(
2973
2976
  "div",
2974
2977
  {
@@ -2994,7 +2997,9 @@ function Eo({
2994
2997
  }
2995
2998
  ) });
2996
2999
  }
2997
- Eo.displayName = "Grid";
3000
+ const er = /* @__PURE__ */ Object.assign(Eo, {
3001
+ displayName: "Grid"
3002
+ });
2998
3003
  function an(e, t) {
2999
3004
  const n = JSON.stringify(e);
3000
3005
  return pe(() => {
@@ -3008,14 +3013,14 @@ function an(e, t) {
3008
3013
  ), o;
3009
3014
  }, [n]);
3010
3015
  }
3011
- function An(e, t) {
3012
- _n.forEach(e, (n) => {
3016
+ function Tn(e, t) {
3017
+ Nn.forEach(e, (n) => {
3013
3018
  if (un(n))
3014
- if (n.type === Tn) {
3019
+ if (n.type === Po) {
3015
3020
  const { type: o } = n.props;
3016
3021
  o === "column" ? t.column = !0 : o === "row" && (t.row = !0);
3017
3022
  } else // Fragments
3018
- typeof n.type == "symbol" && n.props !== null && typeof n.props == "object" && "children" in n.props && An(n.props.children, t);
3023
+ typeof n.type == "symbol" && n.props !== null && typeof n.props == "object" && "children" in n.props && Tn(n.props.children, t);
3019
3024
  });
3020
3025
  }
3021
3026
  function Mo(e, t) {
@@ -3099,7 +3104,7 @@ function ko({
3099
3104
  function cn(e, t) {
3100
3105
  return le(e.columns, t.columns) && le(e.rows, t.rows);
3101
3106
  }
3102
- function Jo({
3107
+ function tr({
3103
3108
  id: e,
3104
3109
  onlySaveAfterUserInteractions: t,
3105
3110
  storage: n = localStorage
@@ -3145,13 +3150,13 @@ function To() {
3145
3150
  return function() {
3146
3151
  };
3147
3152
  }
3148
- function Zo() {
3153
+ function nr() {
3149
3154
  return ve(null);
3150
3155
  }
3151
- function Qo() {
3152
- return H(null);
3156
+ function or() {
3157
+ return j(null);
3153
3158
  }
3154
- function er() {
3159
+ function rr() {
3155
3160
  return We(Mn);
3156
3161
  }
3157
3162
  function Ao(e) {
@@ -3163,7 +3168,7 @@ function Ao(e) {
3163
3168
  function Do({
3164
3169
  separator: e
3165
3170
  }) {
3166
- const { element: t } = e, n = H(null);
3171
+ const { element: t } = e, n = j(null);
3167
3172
  return re(() => {
3168
3173
  const o = t.cloneNode(!0), r = [t, ...t.querySelectorAll("*")], i = [o, ...o.querySelectorAll("*")], s = t.ownerDocument.defaultView;
3169
3174
  return r.forEach((a, u) => {
@@ -3207,8 +3212,8 @@ function ft() {
3207
3212
  "Group Context not found; did you render a Panel or Separator outside of a Group?"
3208
3213
  ), e;
3209
3214
  }
3210
- function Dn(e) {
3211
- const { registerOverlay: t } = ft(), n = H(e);
3215
+ function $o(e) {
3216
+ const { registerOverlay: t } = ft(), n = j(e);
3212
3217
  Ln(n.current, e) || (n.current = e);
3213
3218
  const o = n.current;
3214
3219
  return re(
@@ -3216,8 +3221,13 @@ function Dn(e) {
3216
3221
  [t, o]
3217
3222
  ), null;
3218
3223
  }
3219
- Dn.displayName = "SeparatorOverlay";
3220
- function $o({
3224
+ const Oo = /* @__PURE__ */ Object.assign(
3225
+ $o,
3226
+ {
3227
+ displayName: "SeparatorOverlay"
3228
+ }
3229
+ );
3230
+ function Go({
3221
3231
  active: e,
3222
3232
  orientation: t,
3223
3233
  style: n,
@@ -3254,14 +3264,14 @@ function $o({
3254
3264
  }
3255
3265
  );
3256
3266
  }
3257
- function Oo({
3267
+ function No({
3258
3268
  overlay: e,
3259
3269
  preview: t
3260
3270
  }) {
3261
3271
  const { axis: n, offset: o, rect: r, separator: i } = t, s = n.orientation === "horizontal";
3262
3272
  let a = i?.preview, u = e;
3263
- return un(a) && a.type === Dn && (u = a.props, a = void 0), a == null && (u ? a = /* @__PURE__ */ X(
3264
- $o,
3273
+ return un(a) && a.type === Oo && (u = a.props, a = void 0), a == null && (u ? a = /* @__PURE__ */ X(
3274
+ Go,
3265
3275
  {
3266
3276
  ...u,
3267
3277
  active: t.active,
@@ -3286,27 +3296,27 @@ function Oo({
3286
3296
  }
3287
3297
  );
3288
3298
  }
3289
- function Go(e) {
3299
+ function Fo(e) {
3290
3300
  return Array.from(e).sort(xt);
3291
3301
  }
3292
- const $n = Ue(null);
3293
- function No(e, t) {
3294
- const n = H({
3302
+ const An = Ue(null);
3303
+ function _o(e, t) {
3304
+ const n = j({
3295
3305
  getLayout: () => ({}),
3296
- setLayout: Zn
3306
+ setLayout: Kn
3297
3307
  });
3298
3308
  return St(t, () => n.current, []), re(() => {
3299
3309
  Object.assign(
3300
3310
  n.current,
3301
- He({ axisId: e })
3311
+ je({ axisId: e })
3302
3312
  );
3303
3313
  }), n;
3304
3314
  }
3305
- function Fo({
3315
+ function Bo({
3306
3316
  groupId: e,
3307
3317
  resizePreviewMode: t
3308
3318
  }) {
3309
- const [n, o] = ve([]), r = H(n);
3319
+ const [n, o] = ve([]), r = j(n);
3310
3320
  return re(() => {
3311
3321
  const i = (a) => {
3312
3322
  const u = Te(e), l = t === "separator" && a.state === "active" ? a.previews.filter(
@@ -3326,7 +3336,7 @@ function Fo({
3326
3336
  return i(ae()), s;
3327
3337
  }, [e, t]), n;
3328
3338
  }
3329
- function _o({
3339
+ function jo({
3330
3340
  children: e,
3331
3341
  className: t,
3332
3342
  defaultLayout: n,
@@ -3346,24 +3356,24 @@ function _o({
3346
3356
  style: g,
3347
3357
  ...m
3348
3358
  }) {
3349
- const f = H({
3359
+ const f = j({
3350
3360
  onLayoutChange: {},
3351
3361
  onLayoutChanged: {}
3352
3362
  }), y = xe((E) => {
3353
3363
  le(f.current.onLayoutChange, E) || (f.current.onLayoutChange = E, u?.(E));
3354
3364
  }), S = xe(
3355
- (E, A, V) => {
3356
- le(f.current.onLayoutChanged, E) || (f.current.onLayoutChanged = E, l?.(E, { isUserInteraction: A, requestedLayout: V }));
3365
+ (E, A, q) => {
3366
+ le(f.current.onLayoutChanged, E) || (f.current.onLayoutChanged = E, l?.(E, { isUserInteraction: A, requestedLayout: q }));
3357
3367
  }
3358
- ), v = Ae(a), [z, w] = ve(), R = Fo({
3368
+ ), v = Ae(a), [z, w] = ve(), R = Bo({
3359
3369
  groupId: v,
3360
3370
  resizePreviewMode: d
3361
- }), k = H(null), [O, b] = En(), x = H([]), h = H({
3371
+ }), k = j(null), [O, b] = En(), x = j([]), h = j({
3362
3372
  lastExpandedPanelSizes: {},
3363
3373
  layouts: {},
3364
3374
  panels: [],
3365
3375
  separators: []
3366
- }), I = Ye(k, i), L = No(v, s), M = pe(
3376
+ }), C = Ye(k, i), L = _o(v, s), M = pe(
3367
3377
  () => ({
3368
3378
  getLayout: () => L.current.getLayout(),
3369
3379
  id: v,
@@ -3373,10 +3383,10 @@ function _o({
3373
3383
  [v, L, c]
3374
3384
  ), T = xe(
3375
3385
  (E, A) => {
3376
- const V = ue(E);
3377
- if (V)
3386
+ const q = ue(E);
3387
+ if (q)
3378
3388
  return {
3379
- flexGrow: V.layout[A] ?? 1
3389
+ flexGrow: q.layout[A] ?? 1
3380
3390
  };
3381
3391
  if (n?.[A])
3382
3392
  return {
@@ -3402,7 +3412,7 @@ function _o({
3402
3412
  E
3403
3413
  ]), b(), () => {
3404
3414
  A.panels = A.panels.filter(
3405
- (V) => V !== E
3415
+ (q) => q !== E
3406
3416
  ), b();
3407
3417
  };
3408
3418
  },
@@ -3416,35 +3426,35 @@ function _o({
3416
3426
  E
3417
3427
  ]), b(), () => {
3418
3428
  A.separators = A.separators.filter(
3419
- (V) => V !== E
3429
+ (q) => q !== E
3420
3430
  ), b();
3421
3431
  };
3422
3432
  },
3423
3433
  updatePanelProps: (E, { disabled: A }) => {
3424
- const j = h.current.panels.find(
3434
+ const V = h.current.panels.find(
3425
3435
  (we) => we.id === E
3426
3436
  );
3427
- if (!j || j.constraintProps.disabled === A)
3437
+ if (!V || V.constraintProps.disabled === A)
3428
3438
  return;
3429
- j.constraintProps.disabled = A;
3439
+ V.constraintProps.disabled = A;
3430
3440
  const U = Te(v), de = ue(v);
3431
3441
  U && de && ge(U, {
3432
3442
  ...de,
3433
- derivedItemConstraints: It(U)
3443
+ derivedItemConstraints: Ct(U)
3434
3444
  });
3435
3445
  },
3436
3446
  updateSeparatorProps: (E, {
3437
3447
  disabled: A,
3438
- disableDoubleClick: V
3448
+ disableDoubleClick: q
3439
3449
  }) => {
3440
3450
  const U = h.current.separators.find(
3441
3451
  (de) => de.id === E
3442
3452
  );
3443
- U && (U.disabled = A, U.disableDoubleClick = V);
3453
+ U && (U.disabled = A, U.disableDoubleClick = q);
3444
3454
  }
3445
3455
  }),
3446
3456
  [T, v, b, c, P]
3447
- ), N = H(null);
3457
+ ), N = j(null);
3448
3458
  return re(() => {
3449
3459
  const E = k.current;
3450
3460
  if (E === null)
@@ -3456,24 +3466,24 @@ function _o({
3456
3466
  ), A.separators = _e(
3457
3467
  c,
3458
3468
  A.separators
3459
- ), x.current = Go([
3469
+ ), x.current = Fo([
3460
3470
  ...A.panels.map(({ element: ee }) => ee),
3461
3471
  ...A.separators.map(({ element: ee }) => ee)
3462
3472
  ]);
3463
- let V;
3473
+ let q;
3464
3474
  if (P.defaultLayout !== void 0 && Object.keys(P.defaultLayout).length === A.panels.length) {
3465
- V = {};
3475
+ q = {};
3466
3476
  for (const ee of A.panels) {
3467
- const C = P.defaultLayout[ee.id];
3468
- C !== void 0 && (V[ee.id] = C);
3477
+ const I = P.defaultLayout[ee.id];
3478
+ I !== void 0 && (q[ee.id] = I);
3469
3479
  }
3470
3480
  }
3471
- const j = {
3481
+ const V = {
3472
3482
  disabled: !!r,
3473
3483
  element: E,
3474
3484
  id: v,
3475
3485
  mutableState: {
3476
- defaultLayout: V,
3486
+ defaultLayout: q,
3477
3487
  disableCursor: !!P.disableCursor,
3478
3488
  expandedItemSizes: h.current.lastExpandedPanelSizes,
3479
3489
  layouts: h.current.layouts
@@ -3486,40 +3496,40 @@ function _o({
3486
3496
  },
3487
3497
  separators: A.separators
3488
3498
  };
3489
- N.current = j;
3490
- const U = Rn(j), {
3499
+ N.current = V;
3500
+ const U = Rn(V), {
3491
3501
  defaultLayoutDeferred: de,
3492
3502
  derivedItemConstraints: we,
3493
3503
  layout: Le,
3494
- requestedLayout: Ie
3495
- } = ue(j.id, !0);
3504
+ requestedLayout: Ce
3505
+ } = ue(V.id, !0);
3496
3506
  if (!de && we.length > 0)
3497
3507
  try {
3498
3508
  try {
3499
3509
  y(Le);
3500
3510
  } finally {
3501
- S(Le, !1, Ie);
3511
+ S(Le, !1, Ce);
3502
3512
  }
3503
3513
  } catch (ee) {
3504
3514
  throw N.current = null, U(), ee;
3505
3515
  }
3506
- const $e = qe(v, (ee) => {
3516
+ const $e = He(v, (ee) => {
3507
3517
  const {
3508
- defaultLayoutDeferred: C,
3518
+ defaultLayoutDeferred: I,
3509
3519
  derivedItemConstraints: D,
3510
3520
  layout: B,
3511
3521
  requestedLayout: _
3512
3522
  } = ee.next;
3513
- if (C || D.length === 0)
3523
+ if (I || D.length === 0)
3514
3524
  return;
3515
3525
  Pn({
3516
3526
  derivedItemConstraints: D,
3517
- axis: j,
3527
+ axis: V,
3518
3528
  layout: B,
3519
3529
  prevLayout: ee.prev?.layout,
3520
3530
  requestedLayout: _
3521
3531
  });
3522
- const q = ae(), Z = q.state !== "active" || !q.hitRegions.some((K) => K.axis === j);
3532
+ const H = ae(), Z = H.state !== "active" || !H.hitRegions.some((K) => K.axis === V);
3523
3533
  try {
3524
3534
  y(B);
3525
3535
  } finally {
@@ -3544,10 +3554,10 @@ function _o({
3544
3554
  P
3545
3555
  ]), re(() => {
3546
3556
  Ao(x.current) || b();
3547
- }), je(() => {
3557
+ }), Ve(() => {
3548
3558
  const E = N.current;
3549
3559
  E && (E.mutableState.defaultLayout = n, E.mutableState.disableCursor = !!o);
3550
- }), /* @__PURE__ */ X($n.Provider, { value: M, children: /* @__PURE__ */ X(Tt.Provider, { value: G, children: /* @__PURE__ */ Nn(
3560
+ }), /* @__PURE__ */ X(An.Provider, { value: M, children: /* @__PURE__ */ X(Tt.Provider, { value: G, children: /* @__PURE__ */ On(
3551
3561
  "div",
3552
3562
  {
3553
3563
  ...m,
@@ -3555,7 +3565,7 @@ function _o({
3555
3565
  "data-group": !0,
3556
3566
  "data-testid": Xe(m, a),
3557
3567
  id: v,
3558
- ref: I,
3568
+ ref: C,
3559
3569
  style: {
3560
3570
  height: "100%",
3561
3571
  width: "100%",
@@ -3574,7 +3584,7 @@ function _o({
3574
3584
  children: [
3575
3585
  e,
3576
3586
  R.map((E) => /* @__PURE__ */ X(
3577
- Oo,
3587
+ No,
3578
3588
  {
3579
3589
  overlay: z,
3580
3590
  preview: E
@@ -3585,11 +3595,13 @@ function _o({
3585
3595
  }
3586
3596
  ) }) });
3587
3597
  }
3588
- _o.displayName = "Group";
3598
+ const ir = /* @__PURE__ */ Object.assign(jo, {
3599
+ displayName: "Group"
3600
+ });
3589
3601
  function rt(e, t) {
3590
3602
  return `react-resizable-panels:${[e, ...t].join(":")}`;
3591
3603
  }
3592
- function Bo({
3604
+ function Ho({
3593
3605
  id: e,
3594
3606
  panelIds: t,
3595
3607
  storage: n
@@ -3624,7 +3636,7 @@ function Bo({
3624
3636
  } catch {
3625
3637
  }
3626
3638
  }
3627
- function tr({
3639
+ function sr({
3628
3640
  debounceSaveMs: e = 100,
3629
3641
  onlySaveAfterUserInteractions: t,
3630
3642
  panelIds: n,
@@ -3632,7 +3644,7 @@ function tr({
3632
3644
  ...r
3633
3645
  }) {
3634
3646
  const i = n !== void 0, s = "id" in r ? r.id : r.groupId, a = rt(s, n ?? []), u = at(
3635
- Ho,
3647
+ qo,
3636
3648
  () => o.getItem(a),
3637
3649
  () => o.getItem(a)
3638
3650
  ), l = pe(() => {
@@ -3643,12 +3655,12 @@ function tr({
3643
3655
  }
3644
3656
  }, [u]), c = pe(() => {
3645
3657
  if (!l)
3646
- return Bo({
3658
+ return Ho({
3647
3659
  id: s,
3648
3660
  panelIds: n,
3649
3661
  storage: o
3650
3662
  });
3651
- }, [l, s, n, o]), d = l ?? c, p = H(null), g = se(() => {
3663
+ }, [l, s, n, o]), d = l ?? c, p = j(null), g = se(() => {
3652
3664
  const y = p.current;
3653
3665
  y && (p.current = null, clearTimeout(y));
3654
3666
  }, []);
@@ -3706,22 +3718,22 @@ function tr({
3706
3718
  onLayoutChanged: m
3707
3719
  };
3708
3720
  }
3709
- function Ho() {
3721
+ function qo() {
3710
3722
  return function() {
3711
3723
  };
3712
3724
  }
3713
- function nr() {
3725
+ function ar() {
3714
3726
  return ve(null);
3715
3727
  }
3716
- function or() {
3717
- return H(null);
3728
+ function cr() {
3729
+ return j(null);
3718
3730
  }
3719
- function rr() {
3720
- return We($n);
3731
+ function lr() {
3732
+ return We(An);
3721
3733
  }
3722
- const On = Ue(null);
3723
- function qo(e, t) {
3724
- const { id: n } = ft(), o = H({
3734
+ const Dn = Ue(null);
3735
+ function Vo(e, t) {
3736
+ const { id: n } = ft(), o = j({
3725
3737
  collapse: pt,
3726
3738
  expand: pt,
3727
3739
  getSize: () => ({
@@ -3738,7 +3750,7 @@ function qo(e, t) {
3738
3750
  );
3739
3751
  }), o;
3740
3752
  }
3741
- function Vo({
3753
+ function Uo({
3742
3754
  children: e,
3743
3755
  className: t,
3744
3756
  collapsedSize: n = "0%",
@@ -3758,13 +3770,13 @@ function Vo({
3758
3770
  }) {
3759
3771
  const y = it(l), S = Ae(l), v = dt({
3760
3772
  disabled: s
3761
- }), z = H(null), w = Ye(z, a), {
3773
+ }), z = j(null), w = Ye(z, a), {
3762
3774
  getPanelStyles: R,
3763
3775
  id: k,
3764
3776
  orientation: O,
3765
3777
  registerPanel: b,
3766
3778
  updatePanelProps: x
3767
- } = ft(), h = p !== null, I = xe(
3779
+ } = ft(), h = p !== null, C = xe(
3768
3780
  (N, E, A) => {
3769
3781
  p?.(N, l, A);
3770
3782
  }
@@ -3780,7 +3792,7 @@ function Vo({
3780
3792
  expandToSize: void 0,
3781
3793
  prevSize: void 0
3782
3794
  },
3783
- onResize: h ? I : void 0,
3795
+ onResize: h ? C : void 0,
3784
3796
  constraintProps: {
3785
3797
  groupResizeBehavior: u,
3786
3798
  collapsedSize: n,
@@ -3805,13 +3817,13 @@ function Vo({
3805
3817
  y,
3806
3818
  c,
3807
3819
  d,
3808
- I,
3820
+ C,
3809
3821
  b,
3810
3822
  v
3811
- ]), je(() => {
3823
+ ]), Ve(() => {
3812
3824
  x(S, { disabled: s });
3813
3825
  }, [s, S, x]);
3814
- const L = qo(S, g), M = pe(
3826
+ const L = Vo(S, g), M = pe(
3815
3827
  () => ({
3816
3828
  collapse: () => L.current.collapse(),
3817
3829
  expand: () => L.current.expand(),
@@ -3827,7 +3839,7 @@ function Vo({
3827
3839
  if (N)
3828
3840
  return JSON.stringify(N);
3829
3841
  }, P = at(
3830
- (N) => qe(k, N),
3842
+ (N) => He(k, N),
3831
3843
  T,
3832
3844
  T
3833
3845
  );
@@ -3846,7 +3858,7 @@ function Vo({
3846
3858
  id: S,
3847
3859
  ref: w,
3848
3860
  style: {
3849
- ...jo,
3861
+ ...Wo,
3850
3862
  display: "flex",
3851
3863
  flexBasis: 0,
3852
3864
  flexShrink: 1,
@@ -3869,14 +3881,15 @@ function Vo({
3869
3881
  // See github.com/bvaughn/react-resizable-panels/issues/662
3870
3882
  touchAction: O === "horizontal" ? "pan-y" : "pan-x"
3871
3883
  },
3872
- children: /* @__PURE__ */ X(On.Provider, { value: M, children: e })
3884
+ children: /* @__PURE__ */ X(Dn.Provider, { value: M, children: e })
3873
3885
  }
3874
3886
  )
3875
3887
  }
3876
3888
  );
3877
3889
  }
3878
- Vo.displayName = "Panel";
3879
- const jo = {
3890
+ const ur = /* @__PURE__ */ Object.assign(Uo, {
3891
+ displayName: "Panel"
3892
+ }), Wo = {
3880
3893
  minHeight: 0,
3881
3894
  maxHeight: "100%",
3882
3895
  height: "auto",
@@ -3888,17 +3901,17 @@ const jo = {
3888
3901
  padding: 0,
3889
3902
  margin: 0
3890
3903
  };
3891
- function ir() {
3904
+ function dr() {
3892
3905
  return ve(null);
3893
3906
  }
3894
- function sr() {
3895
- return H(null);
3907
+ function fr() {
3908
+ return j(null);
3896
3909
  }
3897
- function ar() {
3898
- return We(On);
3910
+ function mr() {
3911
+ return We(Dn);
3899
3912
  }
3900
- const Uo = { flexBasis: "auto" }, Wo = { flexGrow: 0, flexShrink: 0 };
3901
- function Yo({
3913
+ const Yo = { flexBasis: "auto" }, Xo = { flexGrow: 0, flexShrink: 0 };
3914
+ function Ko({
3902
3915
  children: e,
3903
3916
  className: t,
3904
3917
  disabled: n,
@@ -3931,34 +3944,36 @@ function Yo({
3931
3944
  id: l,
3932
3945
  preview: s,
3933
3946
  registerSeparator: g,
3934
- requiredStyle: Wo,
3947
+ requiredStyle: Xo,
3935
3948
  style: a,
3936
- styleDefaults: Uo,
3949
+ styleDefaults: Yo,
3937
3950
  updateSeparatorProps: m,
3938
3951
  children: e
3939
3952
  }
3940
3953
  );
3941
3954
  }
3942
- Yo.displayName = "Separator";
3955
+ const pr = /* @__PURE__ */ Object.assign(Ko, {
3956
+ displayName: "Separator"
3957
+ });
3943
3958
  export {
3944
- Vn as Cell,
3945
- Eo as Grid,
3946
- Tn as Gridline,
3947
- _o as Group,
3948
- Vo as Panel,
3949
- Yo as Separator,
3950
- Dn as SeparatorOverlay,
3951
- jn as isCoarsePointer,
3952
- Jo as useDefaultGridLayout,
3953
- tr as useDefaultLayout,
3954
- Zo as useGridCallbackRef,
3955
- Qo as useGridRef,
3956
- nr as useGroupCallbackRef,
3957
- or as useGroupRef,
3958
- ir as usePanelCallbackRef,
3959
- sr as usePanelRef,
3960
- er as useParentGrid,
3961
- rr as useParentGroup,
3962
- ar as useParentPanel
3959
+ Qo as Cell,
3960
+ er as Grid,
3961
+ Po as Gridline,
3962
+ ir as Group,
3963
+ ur as Panel,
3964
+ pr as Separator,
3965
+ Oo as SeparatorOverlay,
3966
+ Hn as isCoarsePointer,
3967
+ tr as useDefaultGridLayout,
3968
+ sr as useDefaultLayout,
3969
+ nr as useGridCallbackRef,
3970
+ or as useGridRef,
3971
+ ar as useGroupCallbackRef,
3972
+ cr as useGroupRef,
3973
+ dr as usePanelCallbackRef,
3974
+ fr as usePanelRef,
3975
+ rr as useParentGrid,
3976
+ lr as useParentGroup,
3977
+ mr as useParentPanel
3963
3978
  };
3964
3979
  //# sourceMappingURL=react-resizable-panels.js.map