react-resizable-panels 4.13.1 → 4.13.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,6 +1,6 @@
1
1
  "use client";
2
- import { jsx as U, jsxs as wt } from "react/jsx-runtime";
3
- import { useState as Z, useCallback as ce, useId as Pt, useLayoutEffect as Qe, useEffect as Se, useRef as O, createContext as Lt, useContext as Ct, isValidElement as Rt, useImperativeHandle as et, useMemo as Pe, useSyncExternalStore as tt } from "react";
2
+ import { jsx as B, jsxs as wt } from "react/jsx-runtime";
3
+ import { useState as Z, useCallback as ce, useId as Pt, useLayoutEffect as et, useEffect as Se, useRef as T, createContext as Lt, useContext as Ct, isValidElement as Rt, useImperativeHandle as tt, useMemo as Pe, useSyncExternalStore as nt } from "react";
4
4
  function Mt(e, t) {
5
5
  const n = getComputedStyle(e), o = parseFloat(n.fontSize);
6
6
  return t * o;
@@ -15,7 +15,7 @@ function It(e) {
15
15
  function kt(e) {
16
16
  return e / 100 * window.innerWidth;
17
17
  }
18
- function Tt(e) {
18
+ function Ot(e) {
19
19
  switch (typeof e) {
20
20
  case "number":
21
21
  return [e, "px"];
@@ -31,8 +31,8 @@ function ie({
31
31
  styleProp: n
32
32
  }) {
33
33
  let o;
34
- const [r, s] = Tt(n);
35
- switch (s) {
34
+ const [r, i] = Ot(n);
35
+ switch (i) {
36
36
  case "%": {
37
37
  o = r / 100 * e;
38
38
  break;
@@ -60,7 +60,7 @@ function ie({
60
60
  }
61
61
  return o;
62
62
  }
63
- function A(e) {
63
+ function F(e) {
64
64
  return parseFloat(e.toFixed(3));
65
65
  }
66
66
  function ae({
@@ -81,66 +81,66 @@ function Le(e) {
81
81
  maxSize: 100,
82
82
  panelId: o.id
83
83
  })) : t.map((o) => {
84
- const { element: r, panelConstraints: s } = o;
85
- let i = 0;
86
- if (s.collapsedSize !== void 0) {
84
+ const { element: r, panelConstraints: i } = o;
85
+ let s = 0;
86
+ if (i.collapsedSize !== void 0) {
87
87
  const f = ie({
88
88
  groupSize: n,
89
89
  panelElement: r,
90
- styleProp: s.collapsedSize
90
+ styleProp: i.collapsedSize
91
91
  });
92
- i = A(f / n * 100);
92
+ s = F(f / n * 100);
93
93
  }
94
94
  let u;
95
- if (s.collapsedThreshold !== void 0) {
95
+ if (i.collapsedThreshold !== void 0) {
96
96
  const f = ie({
97
97
  groupSize: n,
98
98
  panelElement: r,
99
- styleProp: s.collapsedThreshold
99
+ styleProp: i.collapsedThreshold
100
100
  });
101
- u = A(f / n * 100);
101
+ u = F(f / n * 100);
102
102
  }
103
103
  let c;
104
- if (s.defaultSize !== void 0) {
104
+ if (i.defaultSize !== void 0) {
105
105
  const f = ie({
106
106
  groupSize: n,
107
107
  panelElement: r,
108
- styleProp: s.defaultSize
108
+ styleProp: i.defaultSize
109
109
  });
110
- c = A(f / n * 100);
110
+ c = F(f / n * 100);
111
111
  }
112
112
  let a = 0;
113
- if (s.minSize !== void 0) {
113
+ if (i.minSize !== void 0) {
114
114
  const f = ie({
115
115
  groupSize: n,
116
116
  panelElement: r,
117
- styleProp: s.minSize
117
+ styleProp: i.minSize
118
118
  });
119
- a = A(f / n * 100);
119
+ a = F(f / n * 100);
120
120
  }
121
121
  let l = 100;
122
- if (s.maxSize !== void 0) {
122
+ if (i.maxSize !== void 0) {
123
123
  const f = ie({
124
124
  groupSize: n,
125
125
  panelElement: r,
126
- styleProp: s.maxSize
126
+ styleProp: i.maxSize
127
127
  });
128
- l = A(f / n * 100);
128
+ l = F(f / n * 100);
129
129
  }
130
130
  return {
131
- groupResizeBehavior: s.groupResizeBehavior,
132
- collapsedSize: i,
131
+ groupResizeBehavior: i.groupResizeBehavior,
132
+ collapsedSize: s,
133
133
  collapsedThreshold: u,
134
- collapsible: s.collapsible === !0,
134
+ collapsible: i.collapsible === !0,
135
135
  defaultSize: c,
136
- disabled: s.disabled,
136
+ disabled: i.disabled,
137
137
  minSize: a,
138
138
  maxSize: l,
139
139
  panelId: o.id
140
140
  };
141
141
  });
142
142
  }
143
- class nt {
143
+ class ot {
144
144
  #e = {};
145
145
  addListener(t, n) {
146
146
  const o = this.#e[t];
@@ -154,18 +154,18 @@ class nt {
154
154
  if (o.length === 1)
155
155
  o[0].call(null, n);
156
156
  else {
157
- let r = !1, s = null;
158
- const i = Array.from(o);
159
- for (let u = 0; u < i.length; u++) {
160
- const c = i[u];
157
+ let r = !1, i = null;
158
+ const s = Array.from(o);
159
+ for (let u = 0; u < s.length; u++) {
160
+ const c = s[u];
161
161
  try {
162
162
  c.call(null, n);
163
163
  } catch (a) {
164
- s === null && (r = !0, s = a);
164
+ i === null && (r = !0, i = a);
165
165
  }
166
166
  }
167
167
  if (r)
168
- throw s;
168
+ throw i;
169
169
  }
170
170
  }
171
171
  removeAllListeners() {
@@ -179,70 +179,72 @@ class nt {
179
179
  }
180
180
  }
181
181
  }
182
- let T = {
182
+ let k = {
183
183
  cursorFlags: 0,
184
184
  state: "inactive"
185
185
  };
186
- const Re = new nt();
187
- function X() {
188
- return T;
189
- }
190
- function ot(e) {
191
- return Re.addListener("change", e);
192
- }
193
- function Dt(e, t = [], n) {
194
- const o = T, r = { ...T };
195
- r.cursorFlags = e, r.state === "active" && (r.previews = t, n && (r.previewLayoutMap = n)), T = r, Re.emit("change", {
196
- prev: o,
197
- next: r
186
+ const Me = new ot();
187
+ function q() {
188
+ return k;
189
+ }
190
+ function rt(e) {
191
+ return Me.addListener("change", e);
192
+ }
193
+ function Dt(e, t = [], n, o = !1) {
194
+ const r = k, i = { ...k };
195
+ i.cursorFlags = e, i.state === "active" && (i.didPointerMove ||= o, i.previews = t, n && (i.previewLayoutMap = n)), k = i, Me.emit("change", {
196
+ prev: r,
197
+ next: i
198
198
  });
199
199
  }
200
200
  function W(e) {
201
- const t = T;
202
- T = e, Re.emit("change", {
201
+ const t = k;
202
+ k = e, t.state === "active" && e.state !== "active" && t.didPointerMove && t.hitRegions.forEach(({ separator: n }) => {
203
+ n && n.element.ownerDocument.activeElement === n.element && n.element.blur();
204
+ }), Me.emit("change", {
203
205
  prev: t,
204
206
  next: e
205
207
  });
206
208
  }
207
- function Ot(e) {
208
- T.state !== "active" || !T.previews.some((t) => t.separator === e) || W({
209
- ...T,
210
- previews: T.previews.map(
209
+ function Tt(e) {
210
+ k.state !== "active" || !k.previews.some((t) => t.separator === e) || W({
211
+ ...k,
212
+ previews: k.previews.map(
211
213
  (t) => t.separator === e ? { ...t } : t
212
214
  )
213
215
  });
214
216
  }
215
- function Gt(e) {
216
- if (T.state === "inactive")
217
+ function Nt(e) {
218
+ if (k.state === "inactive")
217
219
  return !1;
218
- const t = T.hitRegions.filter(
220
+ const t = k.hitRegions.filter(
219
221
  (o) => o.group !== e
220
- ), n = T.state === "active" && T.previews.some((o) => o.group === e);
221
- if (t.length === T.hitRegions.length && !n)
222
+ ), n = k.state === "active" && k.previews.some((o) => o.group === e);
223
+ if (t.length === k.hitRegions.length && !n)
222
224
  return !1;
223
225
  if (t.length === 0)
224
226
  W({ cursorFlags: 0, state: "inactive" });
225
- else if (T.state === "active") {
226
- const o = new Map(T.initialLayoutMap), r = new Map(T.previewLayoutMap);
227
+ else if (k.state === "active") {
228
+ const o = new Map(k.initialLayoutMap), r = new Map(k.previewLayoutMap);
227
229
  o.delete(e), r.delete(e), W({
228
- ...T,
230
+ ...k,
229
231
  cursorFlags: 0,
230
232
  hitRegions: t,
231
233
  initialLayoutMap: o,
232
234
  previewLayoutMap: r,
233
- previews: T.previews.filter((s) => s.group !== e)
235
+ previews: k.previews.filter((i) => i.group !== e)
234
236
  });
235
237
  } else
236
- W({ ...T, hitRegions: t });
238
+ W({ ...k, hitRegions: t });
237
239
  return !0;
238
240
  }
239
- const At = (e) => e, we = () => {
240
- }, rt = 1, it = 2, st = 4, at = 8, Fe = 3, Ne = 12;
241
+ const Gt = (e) => e, we = () => {
242
+ }, it = 1, st = 2, at = 4, lt = 8, Fe = 3, _e = 12;
241
243
  let me;
242
- function _e() {
244
+ function $e() {
243
245
  return me === void 0 && (me = !1, typeof window < "u" && (window.navigator.userAgent.includes("Chrome") || window.navigator.userAgent.includes("Firefox")) && (me = !0)), me;
244
246
  }
245
- function Ft({
247
+ function At({
246
248
  cursorFlags: e,
247
249
  groups: t,
248
250
  state: n
@@ -251,9 +253,9 @@ function Ft({
251
253
  switch (n) {
252
254
  case "active":
253
255
  case "hover":
254
- t.forEach((s) => {
255
- if (!s.mutableState.disableCursor)
256
- switch (s.orientation) {
256
+ t.forEach((i) => {
257
+ if (!i.mutableState.disableCursor)
258
+ switch (i.orientation) {
257
259
  case "horizontal": {
258
260
  o++;
259
261
  break;
@@ -268,11 +270,11 @@ function Ft({
268
270
  if (!(o === 0 && r === 0)) {
269
271
  switch (n) {
270
272
  case "active": {
271
- if (e && _e()) {
272
- const s = (e & rt) !== 0, i = (e & it) !== 0, u = (e & st) !== 0, c = (e & at) !== 0;
273
- if (s)
274
- return u ? "se-resize" : c ? "ne-resize" : "e-resize";
273
+ if (e && $e()) {
274
+ const i = (e & it) !== 0, s = (e & st) !== 0, u = (e & at) !== 0, c = (e & lt) !== 0;
275
275
  if (i)
276
+ return u ? "se-resize" : c ? "ne-resize" : "e-resize";
277
+ if (s)
276
278
  return u ? "sw-resize" : c ? "nw-resize" : "w-resize";
277
279
  if (u)
278
280
  return "s-resize";
@@ -282,30 +284,30 @@ function Ft({
282
284
  break;
283
285
  }
284
286
  }
285
- return _e() ? o > 0 && r > 0 ? "move" : o > 0 ? "ew-resize" : "ns-resize" : o > 0 && r > 0 ? "grab" : o > 0 ? "col-resize" : "row-resize";
287
+ return $e() ? o > 0 && r > 0 ? "move" : o > 0 ? "ew-resize" : "ns-resize" : o > 0 && r > 0 ? "grab" : o > 0 ? "col-resize" : "row-resize";
286
288
  }
287
289
  }
288
- const $e = /* @__PURE__ */ new WeakMap();
290
+ const He = /* @__PURE__ */ new WeakMap();
289
291
  function fe(e) {
290
292
  if (!e.defaultView || !e.adoptedStyleSheets)
291
293
  return;
292
- let { prevStyle: t, styleSheet: n } = $e.get(e) ?? {};
294
+ let { prevStyle: t, styleSheet: n } = He.get(e) ?? {};
293
295
  n === void 0 && (n = new e.defaultView.CSSStyleSheet(), e.adoptedStyleSheets && (Object.isExtensible(e.adoptedStyleSheets) ? e.adoptedStyleSheets.push(n) : e.adoptedStyleSheets = [
294
296
  ...e.adoptedStyleSheets,
295
297
  n
296
298
  ]));
297
- const o = X();
299
+ const o = q();
298
300
  switch (o.state) {
299
301
  case "active":
300
302
  case "hover": {
301
- const r = Ft({
303
+ const r = At({
302
304
  cursorFlags: o.cursorFlags,
303
- groups: o.hitRegions.map((i) => i.group),
305
+ groups: o.hitRegions.map((s) => s.group),
304
306
  state: o.state
305
- }), s = `*, *:hover {cursor: ${r} !important; }`;
306
- if (t === s)
307
+ }), i = `*, *:hover {cursor: ${r} !important; }`;
308
+ if (t === i)
307
309
  return;
308
- t = s, r ? n.cssRules.length === 0 ? n.insertRule(s) : n.replaceSync(s) : n.cssRules.length === 1 && n.deleteRule(0);
310
+ t = i, r ? n.cssRules.length === 0 ? n.insertRule(i) : n.replaceSync(i) : n.cssRules.length === 1 && n.deleteRule(0);
309
311
  break;
310
312
  }
311
313
  case "inactive": {
@@ -313,7 +315,7 @@ function fe(e) {
313
315
  break;
314
316
  }
315
317
  }
316
- $e.set(e, {
318
+ He.set(e, {
317
319
  prevStyle: t,
318
320
  styleSheet: n
319
321
  });
@@ -323,11 +325,15 @@ function L(e, t = "Assertion error") {
323
325
  throw Error(t);
324
326
  }
325
327
  function Ce(e, t) {
326
- return Array.from(t).sort(
327
- e === "horizontal" ? Nt : _t
328
- );
328
+ return Array.from(t).sort((n, o) => {
329
+ const r = e === "horizontal" ? Ft(n, o) : _t(n, o);
330
+ if (r !== 0)
331
+ return r;
332
+ const i = n.element.compareDocumentPosition(o.element);
333
+ return i & Node.DOCUMENT_POSITION_DISCONNECTED ? 0 : i & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
334
+ });
329
335
  }
330
- function Nt(e, t) {
336
+ function Ft(e, t) {
331
337
  const n = e.element.offsetLeft - t.element.offsetLeft;
332
338
  return n !== 0 ? n : e.element.offsetWidth - t.element.offsetWidth;
333
339
  }
@@ -335,7 +341,7 @@ function _t(e, t) {
335
341
  const n = e.element.offsetTop - t.element.offsetTop;
336
342
  return n !== 0 ? n : e.element.offsetHeight - t.element.offsetHeight;
337
343
  }
338
- function lt(e) {
344
+ function Re(e) {
339
345
  return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.ELEMENT_NODE;
340
346
  }
341
347
  function ct(e, t) {
@@ -359,10 +365,10 @@ function $t({
359
365
  x: n.x + n.width / 2,
360
366
  y: n.y + n.height / 2
361
367
  };
362
- let r, s = Number.MAX_VALUE;
363
- for (const i of t) {
364
- const { x: u, y: c } = ct(o, i), a = e === "horizontal" ? u : c;
365
- a < s && (s = a, r = i);
368
+ let r, i = Number.MAX_VALUE;
369
+ for (const s of t) {
370
+ const { x: u, y: c } = ct(o, s), a = e === "horizontal" ? u : c;
371
+ a < i && (i = a, r = s);
366
372
  }
367
373
  return L(r, "No rect found"), r;
368
374
  }
@@ -370,156 +376,156 @@ let ge;
370
376
  function Ht() {
371
377
  return ge === void 0 && (typeof matchMedia == "function" ? ge = !!matchMedia("(pointer:coarse)").matches : ge = !1), ge;
372
378
  }
373
- function Me({
379
+ function Ee({
374
380
  expandHitTargets: e = !0,
375
381
  group: t,
376
382
  includeDisabled: n = !1
377
383
  }) {
378
- const { element: o, orientation: r, panels: s, separators: i } = t, u = Ce(
384
+ const { element: o, orientation: r, panels: i, separators: s } = t, u = Ce(
379
385
  r,
380
- Array.from(o.children).filter(lt).filter((m) => !m.hasAttribute("data-resize-preview")).map((m) => ({ element: m }))
381
- ).map(({ element: m }) => m), c = [];
382
- let a = !1, l = !1, f = -1, y, d = -1, p = 0, h, v = [];
386
+ Array.from(o.children).filter(Re).filter((h) => !h.hasAttribute("data-resize-preview")).map((h) => ({ element: h }))
387
+ ).map(({ element: h }) => h), c = [];
388
+ let a = !1, l = !1, f = -1, y, p = -1, g = 0, d, v = [];
383
389
  {
384
- let m = -1;
385
- for (const g of u)
386
- g.hasAttribute("data-panel") && (m++, g.hasAttribute("data-disabled") || (p++, f === -1 && (f = m), d = m));
390
+ let h = -1;
391
+ for (const m of u)
392
+ m.hasAttribute("data-panel") && (h++, m.hasAttribute("data-disabled") || (g++, f === -1 && (f = h), p = h));
387
393
  }
388
- if (n || p > 1) {
389
- let m = -1;
390
- for (const g of u)
391
- if (g.hasAttribute("data-panel")) {
392
- m++;
393
- const x = s.find(
394
- (b) => b.element === g
394
+ if (n || g > 1) {
395
+ let h = -1;
396
+ for (const m of u)
397
+ if (m.hasAttribute("data-panel")) {
398
+ h++;
399
+ const x = i.find(
400
+ (S) => S.element === m
395
401
  );
396
402
  if (x) {
397
- if (h) {
398
- const b = h.element.getBoundingClientRect(), z = g.getBoundingClientRect();
399
- let E;
403
+ if (d) {
404
+ const S = d.element.getBoundingClientRect(), P = m.getBoundingClientRect();
405
+ let C;
400
406
  if (l) {
401
- const R = r === "horizontal" ? new DOMRect(
402
- b.right,
403
- b.top,
407
+ const E = r === "horizontal" ? new DOMRect(
408
+ S.right,
409
+ S.top,
404
410
  0,
405
- b.height
411
+ S.height
406
412
  ) : new DOMRect(
407
- b.left,
408
- b.bottom,
409
- b.width,
413
+ S.left,
414
+ S.bottom,
415
+ S.width,
410
416
  0
411
- ), w = r === "horizontal" ? new DOMRect(z.left, z.top, 0, z.height) : new DOMRect(z.left, z.top, z.width, 0);
417
+ ), w = r === "horizontal" ? new DOMRect(P.left, P.top, 0, P.height) : new DOMRect(P.left, P.top, P.width, 0);
412
418
  switch (v.length) {
413
419
  case 0: {
414
- E = [
415
- R,
420
+ C = [
421
+ E,
416
422
  w
417
423
  ];
418
424
  break;
419
425
  }
420
426
  case 1: {
421
- const C = v[0], F = $t({
427
+ const R = v[0], N = $t({
422
428
  orientation: r,
423
- rects: [b, z],
424
- targetRect: C.element.getBoundingClientRect()
429
+ rects: [S, P],
430
+ targetRect: R.element.getBoundingClientRect()
425
431
  });
426
- E = [
427
- C,
428
- F === b ? w : R
432
+ C = [
433
+ R,
434
+ N === S ? w : E
429
435
  ];
430
436
  break;
431
437
  }
432
438
  default: {
433
- E = v;
439
+ C = v;
434
440
  break;
435
441
  }
436
442
  }
437
443
  } else
438
- v.length ? E = v : E = [
444
+ v.length ? C = v : C = [
439
445
  r === "horizontal" ? new DOMRect(
440
- b.right,
441
- z.top,
442
- z.left - b.right,
443
- z.height
446
+ S.right,
447
+ P.top,
448
+ P.left - S.right,
449
+ P.height
444
450
  ) : new DOMRect(
445
- z.left,
446
- b.bottom,
447
- z.width,
448
- z.top - b.bottom
451
+ P.left,
452
+ S.bottom,
453
+ P.width,
454
+ P.top - S.bottom
449
455
  )
450
456
  ];
451
- for (const R of E) {
452
- let w = "width" in R ? R : R.element.getBoundingClientRect();
453
- const C = e ? Ht() ? t.resizeTargetMinimumSize.coarse : t.resizeTargetMinimumSize.fine : 0;
454
- if (w.width < C) {
455
- const I = C - w.width;
457
+ for (const E of C) {
458
+ let w = "width" in E ? E : E.element.getBoundingClientRect();
459
+ const R = e ? Ht() ? t.resizeTargetMinimumSize.coarse : t.resizeTargetMinimumSize.fine : 0;
460
+ if (w.width < R) {
461
+ const O = R - w.width;
456
462
  w = new DOMRect(
457
- w.x - I / 2,
463
+ w.x - O / 2,
458
464
  w.y,
459
- w.width + I,
465
+ w.width + O,
460
466
  w.height
461
467
  );
462
468
  }
463
- if (w.height < C) {
464
- const I = C - w.height;
469
+ if (w.height < R) {
470
+ const O = R - w.height;
465
471
  w = new DOMRect(
466
472
  w.x,
467
- w.y - I / 2,
473
+ w.y - O / 2,
468
474
  w.width,
469
- w.height + I
475
+ w.height + O
470
476
  );
471
477
  }
472
- const F = m <= f || m > d;
473
- (n || !a && !F) && (y ??= ae({ group: t }), c.push({
478
+ const N = h <= f || h > p;
479
+ (n || !a && !N) && (y ??= ae({ group: t }), c.push({
474
480
  group: t,
475
481
  groupSize: y,
476
- panels: [h, x],
477
- separator: "width" in R ? void 0 : R,
482
+ panels: [d, x],
483
+ separator: "width" in E ? void 0 : E,
478
484
  rect: w
479
485
  })), a = !1;
480
486
  }
481
487
  }
482
- l = !1, h = x, v = [];
488
+ l = !1, d = x, v = [];
483
489
  }
484
- } else if (g.hasAttribute("data-separator")) {
485
- g.ariaDisabled !== null && (a = !0);
486
- const x = i.find(
487
- (b) => b.element === g
490
+ } else if (m.hasAttribute("data-separator")) {
491
+ m.ariaDisabled !== null && (a = !0);
492
+ const x = s.find(
493
+ (S) => S.element === m
488
494
  );
489
- x ? v.push(x) : (h = void 0, v = []);
495
+ x ? v.push(x) : (d = void 0, v = []);
490
496
  } else
491
497
  l = !0;
492
498
  }
493
499
  return c;
494
500
  }
495
- let B = /* @__PURE__ */ new Map();
496
- const ut = new nt();
501
+ let U = /* @__PURE__ */ new Map();
502
+ const ut = new ot();
497
503
  function Vt(e) {
498
- B = new Map(B), B.delete(e);
504
+ U = new Map(U), U.delete(e);
499
505
  }
500
506
  function ft(e, t) {
501
- for (const [n] of B)
507
+ for (const [n] of U)
502
508
  if (n.id === e)
503
509
  return n;
504
510
  }
505
511
  function Q(e, t) {
506
- for (const [n, o] of B)
512
+ for (const [n, o] of U)
507
513
  if (n.id === e)
508
514
  return o;
509
515
  if (t)
510
516
  throw Error(`Could not find data for Group with id ${e}`);
511
517
  }
512
518
  function ee() {
513
- return B;
519
+ return U;
514
520
  }
515
- function Ee(e, t) {
521
+ function Ie(e, t) {
516
522
  return ut.addListener("groupChange", (n) => {
517
523
  n.group.id === e && t(n);
518
524
  });
519
525
  }
520
- function q(e, t, n) {
521
- const o = B.get(e);
522
- B = new Map(B), B.set(e, t), ut.emit("groupChange", {
526
+ function X(e, t, n) {
527
+ const o = U.get(e);
528
+ U = new Map(U), U.set(e, t), ut.emit("groupChange", {
523
529
  group: e,
524
530
  isUserInteraction: n?.isUserInteraction === !0,
525
531
  prev: o,
@@ -535,7 +541,7 @@ function jt(e, t) {
535
541
  return !0;
536
542
  }
537
543
  function D(e, t, n = 0) {
538
- return Math.abs(A(e) - A(t)) <= n;
544
+ return Math.abs(F(e) - F(t)) <= n;
539
545
  }
540
546
  function j(e, t) {
541
547
  return D(e, t) ? 0 : e > t ? 1 : -1;
@@ -548,8 +554,8 @@ function se({
548
554
  }) {
549
555
  const {
550
556
  collapsedSize: r = 0,
551
- collapsedThreshold: s,
552
- collapsible: i,
557
+ collapsedThreshold: i,
558
+ collapsible: s,
553
559
  disabled: u,
554
560
  maxSize: c = 100,
555
561
  minSize: a = 0
@@ -557,12 +563,12 @@ function se({
557
563
  if (u && !e)
558
564
  return n;
559
565
  if (j(o, a) < 0)
560
- if (i) {
561
- const l = s ?? (a - r) / 2, f = j(n, r) <= 0, y = f ? r + l : a - l, d = j(o, y);
562
- j(o, r) <= 0 || d < 0 || s !== void 0 && f && d === 0 ? o = r : o = a;
566
+ if (s) {
567
+ const l = i ?? (a - r) / 2, f = j(n, r) <= 0, y = f ? r + l : a - l, p = j(o, y);
568
+ j(o, r) <= 0 || p < 0 || i !== void 0 && f && p === 0 ? o = r : o = a;
563
569
  } else
564
570
  o = a;
565
- return o = Math.min(c, o), o = A(o), o;
571
+ return o = Math.min(c, o), o = F(o), o;
566
572
  }
567
573
  function de({
568
574
  delta: e,
@@ -570,163 +576,163 @@ function de({
570
576
  panelConstraints: n,
571
577
  pivotIndices: o,
572
578
  prevLayout: r,
573
- trigger: s
579
+ trigger: i
574
580
  }) {
575
581
  if (D(e, 0))
576
582
  return t;
577
- const i = s === "imperative-api", u = n.map(
578
- ({ panelId: p }) => t[p]
583
+ const s = i === "imperative-api", u = n.map(
584
+ ({ panelId: g }) => t[g]
579
585
  ), c = n.map(
580
- ({ panelId: p }) => r[p]
586
+ ({ panelId: g }) => r[g]
581
587
  ), a = [...u], [l, f] = o;
582
588
  L(l != null, "Invalid first pivot index"), L(f != null, "Invalid second pivot index");
583
589
  let y = 0;
584
- switch (s) {
590
+ switch (i) {
585
591
  case "keyboard": {
586
592
  {
587
- const p = e < 0 ? f : l, h = n[p];
593
+ const g = e < 0 ? f : l, d = n[g];
588
594
  L(
589
- h,
590
- `Panel constraints not found for index ${p}`
595
+ d,
596
+ `Panel constraints not found for index ${g}`
591
597
  );
592
598
  const {
593
599
  collapsedSize: v = 0,
594
- collapsible: m,
595
- minSize: g = 0
596
- } = h;
597
- if (m) {
598
- const x = u[p];
600
+ collapsible: h,
601
+ minSize: m = 0
602
+ } = d;
603
+ if (h) {
604
+ const x = u[g];
599
605
  if (L(
600
606
  x != null,
601
- `Previous layout not found for panel index ${p}`
607
+ `Previous layout not found for panel index ${g}`
602
608
  ), D(x, v)) {
603
- const b = g - x;
604
- j(b, Math.abs(e)) > 0 && (e = e < 0 ? 0 - b : b);
609
+ const S = m - x;
610
+ j(S, Math.abs(e)) > 0 && (e = e < 0 ? 0 - S : S);
605
611
  }
606
612
  }
607
613
  }
608
614
  {
609
- const p = e < 0 ? l : f, h = n[p];
615
+ const g = e < 0 ? l : f, d = n[g];
610
616
  L(
611
- h,
612
- `No panel constraints found for index ${p}`
617
+ d,
618
+ `No panel constraints found for index ${g}`
613
619
  );
614
620
  const {
615
621
  collapsedSize: v = 0,
616
- collapsible: m,
617
- minSize: g = 0
618
- } = h;
619
- if (m) {
620
- const x = u[p];
622
+ collapsible: h,
623
+ minSize: m = 0
624
+ } = d;
625
+ if (h) {
626
+ const x = u[g];
621
627
  if (L(
622
628
  x != null,
623
- `Previous layout not found for panel index ${p}`
624
- ), D(x, g)) {
625
- const b = x - v;
626
- j(b, Math.abs(e)) > 0 && (e = e < 0 ? 0 - b : b);
629
+ `Previous layout not found for panel index ${g}`
630
+ ), D(x, m)) {
631
+ const S = x - v;
632
+ j(S, Math.abs(e)) > 0 && (e = e < 0 ? 0 - S : S);
627
633
  }
628
634
  }
629
635
  }
630
636
  break;
631
637
  }
632
638
  default: {
633
- const p = e < 0 ? f : l, h = n[p];
639
+ const g = e < 0 ? f : l, d = n[g];
634
640
  L(
635
- h,
636
- `Panel constraints not found for index ${p}`
641
+ d,
642
+ `Panel constraints not found for index ${g}`
637
643
  );
638
- const v = u[p], { collapsedSize: m, collapsedThreshold: g, collapsible: x, minSize: b } = h;
639
- if (x && j(v, b) < 0) {
640
- const z = b - m, E = g ?? z / 2, R = v + Math.abs(e);
641
- if (j(R, b) < 0) {
642
- const w = j(Math.abs(e), E), C = g === void 0 && e < 0;
643
- w > 0 || w === 0 && C ? e = e < 0 ? -z : z : e = 0;
644
+ const v = u[g], { collapsedSize: h, collapsedThreshold: m, collapsible: x, minSize: S } = d;
645
+ if (x && j(v, S) < 0) {
646
+ const P = S - h, C = m ?? P / 2, E = v + Math.abs(e);
647
+ if (j(E, S) < 0) {
648
+ const w = j(Math.abs(e), C), R = m === void 0 && e < 0;
649
+ w > 0 || w === 0 && R ? e = e < 0 ? -P : P : e = 0;
644
650
  }
645
651
  }
646
652
  break;
647
653
  }
648
654
  }
649
655
  {
650
- const p = e < 0 ? 1 : -1;
651
- let h = e < 0 ? f : l, v = 0;
656
+ const g = e < 0 ? 1 : -1;
657
+ let d = e < 0 ? f : l, v = 0;
652
658
  for (; ; ) {
653
- const g = u[h];
659
+ const m = u[d];
654
660
  L(
655
- g != null,
656
- `Previous layout not found for panel index ${h}`
661
+ m != null,
662
+ `Previous layout not found for panel index ${d}`
657
663
  );
658
- const b = se({
659
- overrideDisabledPanels: i,
660
- panelConstraints: n[h],
661
- prevSize: g,
664
+ const S = se({
665
+ overrideDisabledPanels: s,
666
+ panelConstraints: n[d],
667
+ prevSize: m,
662
668
  size: 100
663
- }) - g;
664
- if (v += b, h += p, h < 0 || h >= n.length)
669
+ }) - m;
670
+ if (v += S, d += g, d < 0 || d >= n.length)
665
671
  break;
666
672
  }
667
- const m = Math.min(Math.abs(e), Math.abs(v));
668
- e = e < 0 ? 0 - m : m;
673
+ const h = Math.min(Math.abs(e), Math.abs(v));
674
+ e = e < 0 ? 0 - h : h;
669
675
  }
670
676
  {
671
- let h = e < 0 ? l : f;
672
- for (; h >= 0 && h < n.length; ) {
673
- const v = Math.abs(e) - Math.abs(y), m = u[h];
677
+ let d = e < 0 ? l : f;
678
+ for (; d >= 0 && d < n.length; ) {
679
+ const v = Math.abs(e) - Math.abs(y), h = u[d];
674
680
  L(
675
- m != null,
676
- `Previous layout not found for panel index ${h}`
681
+ h != null,
682
+ `Previous layout not found for panel index ${d}`
677
683
  );
678
- const g = m - v, x = se({
679
- overrideDisabledPanels: i,
680
- panelConstraints: n[h],
681
- prevSize: m,
682
- size: g
684
+ const m = h - v, x = se({
685
+ overrideDisabledPanels: s,
686
+ panelConstraints: n[d],
687
+ prevSize: h,
688
+ size: m
683
689
  });
684
- if (!D(m, x) && (y += m - x, a[h] = x, y.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
690
+ if (!D(h, x) && (y += h - x, a[d] = x, y.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
685
691
  numeric: !0
686
692
  }) >= 0))
687
693
  break;
688
- e < 0 ? h-- : h++;
694
+ e < 0 ? d-- : d++;
689
695
  }
690
696
  }
691
697
  if (jt(c, a))
692
698
  return r;
693
699
  {
694
- const p = e < 0 ? f : l, h = u[p];
700
+ const g = e < 0 ? f : l, d = u[g];
695
701
  L(
696
- h != null,
697
- `Previous layout not found for panel index ${p}`
702
+ d != null,
703
+ `Previous layout not found for panel index ${g}`
698
704
  );
699
- const v = h + y, m = se({
700
- overrideDisabledPanels: i,
701
- panelConstraints: n[p],
702
- prevSize: h,
705
+ const v = d + y, h = se({
706
+ overrideDisabledPanels: s,
707
+ panelConstraints: n[g],
708
+ prevSize: d,
703
709
  size: v
704
710
  });
705
- if (a[p] = m, !D(m, v)) {
706
- let g = v - m, b = e < 0 ? f : l;
707
- for (; b >= 0 && b < n.length; ) {
708
- const z = a[b];
711
+ if (a[g] = h, !D(h, v)) {
712
+ let m = v - h, S = e < 0 ? f : l;
713
+ for (; S >= 0 && S < n.length; ) {
714
+ const P = a[S];
709
715
  L(
710
- z != null,
711
- `Previous layout not found for panel index ${b}`
716
+ P != null,
717
+ `Previous layout not found for panel index ${S}`
712
718
  );
713
- const E = z + g, R = se({
714
- overrideDisabledPanels: i,
715
- panelConstraints: n[b],
716
- prevSize: z,
717
- size: E
719
+ const C = P + m, E = se({
720
+ overrideDisabledPanels: s,
721
+ panelConstraints: n[S],
722
+ prevSize: P,
723
+ size: C
718
724
  });
719
- if (D(z, R) || (g -= R - z, a[b] = R), D(g, 0))
725
+ if (D(P, E) || (m -= E - P, a[S] = E), D(m, 0))
720
726
  break;
721
- e > 0 ? b-- : b++;
727
+ e > 0 ? S-- : S++;
722
728
  }
723
729
  }
724
730
  }
725
- const d = Object.values(a).reduce(
726
- (p, h) => h + p,
731
+ const p = Object.values(a).reduce(
732
+ (g, d) => d + g,
727
733
  0
728
734
  );
729
- return D(d, 100, 0.1) ? a.reduce((p, h, v) => (p[n[v].panelId] = h, p), {}) : r;
735
+ return D(p, 100, 0.1) ? a.reduce((g, d, v) => (g[n[v].panelId] = d, g), {}) : r;
730
736
  }
731
737
  function K(e, t) {
732
738
  if (Object.keys(e).length !== Object.keys(t).length)
@@ -736,88 +742,90 @@ function K(e, t) {
736
742
  return !1;
737
743
  return !0;
738
744
  }
739
- function Ie({
745
+ function ke({
740
746
  commit: e,
741
747
  document: t,
742
748
  event: n,
743
749
  hitRegions: o,
744
750
  initialLayoutMap: r,
745
- mountedGroups: s,
746
- pointerDownAtPoint: i,
751
+ mountedGroups: i,
752
+ pointerDownAtPoint: s,
747
753
  prevCursorFlags: u
748
754
  }) {
749
755
  let c = 0;
750
- const a = X();
756
+ const a = q();
751
757
  let l = a.state === "active" ? a.previews : [];
752
758
  const f = new Map(
753
759
  a.state === "active" ? a.previewLayoutMap : void 0
754
760
  );
755
- o.forEach((d) => {
756
- const { group: p, groupSize: h } = d, { orientation: v, panels: m } = p;
757
- if (e && p.resizePreviewMode !== "separator")
761
+ o.forEach((g) => {
762
+ const { group: d, groupSize: v } = g, { orientation: h, panels: m } = d;
763
+ if (e && d.resizePreviewMode !== "separator")
758
764
  return;
759
- const { disableCursor: g } = p.mutableState;
760
- let x = 0;
761
- i ? v === "horizontal" ? x = (n.clientX - i.x) / h * 100 : x = (n.clientY - i.y) / h * 100 : v === "horizontal" ? x = n.clientX < 0 ? -100 : 100 : x = n.clientY < 0 ? -100 : 100;
762
- const b = r.get(p), z = s.get(p);
763
- if (!b || !z)
765
+ const { disableCursor: x } = d.mutableState;
766
+ let S = 0;
767
+ s ? h === "horizontal" ? S = (n.clientX - s.x) / v * 100 : S = (n.clientY - s.y) / v * 100 : h === "horizontal" ? S = n.clientX < 0 ? -100 : 100 : S = n.clientY < 0 ? -100 : 100;
768
+ const P = r.get(d), C = i.get(d);
769
+ if (!P || !C)
764
770
  return;
765
771
  const {
766
772
  defaultLayoutDeferred: E,
767
- derivedPanelConstraints: R,
768
- groupSize: w,
769
- layout: C,
770
- separatorToPanels: F
771
- } = z;
772
- if (R && C && F) {
773
- const I = p.resizePreviewMode === "separator" ? f.get(p) ?? C : C, M = de({
774
- delta: x,
775
- initialLayout: b,
776
- panelConstraints: R,
777
- pivotIndices: d.panels.map((N) => m.indexOf(N)),
773
+ derivedPanelConstraints: w,
774
+ groupSize: R,
775
+ layout: N,
776
+ separatorToPanels: O
777
+ } = C;
778
+ if (w && N && O) {
779
+ const I = d.resizePreviewMode === "separator" ? f.get(d) ?? N : N, G = de({
780
+ delta: S,
781
+ initialLayout: P,
782
+ panelConstraints: w,
783
+ pivotIndices: g.panels.map((_) => m.indexOf(_)),
778
784
  prevLayout: I,
779
785
  trigger: "mouse-or-touch"
780
786
  });
781
- if (p.resizePreviewMode === "separator" && !e && !K(M, I)) {
782
- f.set(p, M);
783
- let N = 0;
784
- const _ = m.map((S) => (N += M[S.id] - b[S.id], N * (h / 100)));
785
- l = l.map((S) => {
786
- if (S.group !== p)
787
- return S;
788
- const P = _[S.panelIndex];
789
- return P === S.offset ? S : { ...S, offset: P };
787
+ if (d.resizePreviewMode === "separator" && !e && !K(G, I)) {
788
+ f.set(d, G);
789
+ let _ = 0;
790
+ const b = m.map((z) => (_ += G[z.id] - P[z.id], _ * (v / 100)));
791
+ l = l.map((z) => {
792
+ if (z.group !== d)
793
+ return z;
794
+ const M = b[z.panelIndex];
795
+ return M === z.offset ? z : { ...z, offset: M };
790
796
  });
791
797
  }
792
- if (K(M, I) && x !== 0 && !g)
793
- switch (v) {
798
+ if (K(G, I) && S !== 0 && !x)
799
+ switch (h) {
794
800
  case "horizontal": {
795
- c |= x < 0 ? rt : it;
801
+ c |= S < 0 ? it : st;
796
802
  break;
797
803
  }
798
804
  case "vertical": {
799
- c |= x < 0 ? st : at;
805
+ c |= S < 0 ? at : lt;
800
806
  break;
801
807
  }
802
808
  }
803
- (p.resizePreviewMode !== "separator" || e) && !K(M, C) && q(d.group, {
809
+ (d.resizePreviewMode !== "separator" || e) && !K(G, N) && X(g.group, {
804
810
  defaultLayoutDeferred: E,
805
- derivedPanelConstraints: R,
806
- groupSize: w,
807
- layout: M,
808
- separatorToPanels: F
811
+ derivedPanelConstraints: w,
812
+ groupSize: R,
813
+ layout: G,
814
+ separatorToPanels: O
809
815
  });
810
816
  }
811
817
  });
812
818
  let y = 0;
813
- n.movementX === 0 ? y |= u & Fe : y |= c & Fe, n.movementY === 0 ? y |= u & Ne : y |= c & Ne, Dt(y, l, f), fe(t);
819
+ n.movementX === 0 ? y |= u & Fe : y |= c & Fe, n.movementY === 0 ? y |= u & _e : y |= c & _e;
820
+ const p = a.state === "active" && (n.clientX !== a.pointerDownAtPoint.x || n.clientY !== a.pointerDownAtPoint.y);
821
+ Dt(y, l, f, p), fe(t);
814
822
  }
815
823
  function dt(e, t) {
816
- const n = X(), o = ee();
824
+ const n = q(), o = ee();
817
825
  let r = !1;
818
826
  switch (n.state) {
819
827
  case "active":
820
- Ie({
828
+ ke({
821
829
  commit: !0,
822
830
  document: e,
823
831
  event: t,
@@ -829,34 +837,34 @@ function dt(e, t) {
829
837
  }), W({
830
838
  cursorFlags: 0,
831
839
  state: "inactive"
832
- }), n.hitRegions.length > 0 && (fe(e), r = !0, n.hitRegions.forEach((s) => {
833
- if (!o.has(s.group))
840
+ }), n.hitRegions.length > 0 && (fe(e), r = !0, n.hitRegions.forEach((i) => {
841
+ if (!o.has(i.group))
834
842
  return;
835
- const i = Q(s.group.id, !0);
836
- q(s.group, i, {
843
+ const s = Q(i.group.id, !0);
844
+ X(i.group, s, {
837
845
  isUserInteraction: !0
838
846
  });
839
847
  }));
840
848
  }
841
849
  return r;
842
850
  }
843
- function He(e) {
851
+ function Ve(e) {
844
852
  e.defaultPrevented || dt(e.currentTarget, e);
845
853
  }
846
- function Bt(e, t, n) {
854
+ function Ut(e, t, n) {
847
855
  let o, r = {
848
856
  x: 1 / 0,
849
857
  y: 1 / 0
850
858
  };
851
- for (const s of t) {
852
- const i = ct(n, s.rect);
859
+ for (const i of t) {
860
+ const s = ct(n, i.rect);
853
861
  switch (e) {
854
862
  case "horizontal": {
855
- i.x <= r.x && (o = s, r = i);
863
+ s.x <= r.x && (o = i, r = s);
856
864
  break;
857
865
  }
858
866
  case "vertical": {
859
- i.y <= r.y && (o = s, r = i);
867
+ s.y <= r.y && (o = i, r = s);
860
868
  break;
861
869
  }
862
870
  }
@@ -866,7 +874,7 @@ function Bt(e, t, n) {
866
874
  hitRegion: o
867
875
  } : void 0;
868
876
  }
869
- function Ut(e) {
877
+ function Bt(e) {
870
878
  return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
871
879
  }
872
880
  function Wt(e, t) {
@@ -883,41 +891,41 @@ function Wt(e, t) {
883
891
  "Stacking order can only be calculated for elements with a common ancestor"
884
892
  );
885
893
  const r = {
886
- a: je(Ve(n.a)),
887
- b: je(Ve(n.b))
894
+ a: Ue(je(n.a)),
895
+ b: Ue(je(n.b))
888
896
  };
889
897
  if (r.a === r.b) {
890
- const s = o.childNodes, i = {
898
+ const i = o.childNodes, s = {
891
899
  a: n.a.at(-1),
892
900
  b: n.b.at(-1)
893
901
  };
894
- let u = s.length;
902
+ let u = i.length;
895
903
  for (; u--; ) {
896
- const c = s[u];
897
- if (c === i.a) return 1;
898
- if (c === i.b) return -1;
904
+ const c = i[u];
905
+ if (c === s.a) return 1;
906
+ if (c === s.b) return -1;
899
907
  }
900
908
  }
901
909
  return Math.sign(r.a - r.b);
902
910
  }
903
911
  const Kt = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
904
- function qt(e) {
912
+ function Xt(e) {
905
913
  const t = getComputedStyle(pt(e) ?? e).display;
906
914
  return t === "flex" || t === "inline-flex";
907
915
  }
908
- function Xt(e) {
916
+ function qt(e) {
909
917
  const t = getComputedStyle(e);
910
- return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || qt(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" || Kt.test(t.willChange) || t.webkitOverflowScrolling === "touch");
918
+ return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || Xt(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" || Kt.test(t.willChange) || t.webkitOverflowScrolling === "touch");
911
919
  }
912
- function Ve(e) {
920
+ function je(e) {
913
921
  let t = e.length;
914
922
  for (; t--; ) {
915
923
  const n = e[t];
916
- if (L(n, "Missing node"), Xt(n)) return n;
924
+ if (L(n, "Missing node"), qt(n)) return n;
917
925
  }
918
926
  return null;
919
927
  }
920
- function je(e) {
928
+ function Ue(e) {
921
929
  return e && Number(getComputedStyle(e).zIndex) || 0;
922
930
  }
923
931
  function Be(e) {
@@ -928,17 +936,29 @@ function Be(e) {
928
936
  }
929
937
  function pt(e) {
930
938
  const { parentNode: t } = e;
931
- return Ut(t) ? t.host : t;
939
+ return Bt(t) ? t.host : t;
932
940
  }
933
941
  function Yt(e, t) {
934
942
  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;
935
943
  }
936
- function Jt({
944
+ function Jt(e) {
945
+ try {
946
+ return e.matches(":modal");
947
+ } catch {
948
+ return !1;
949
+ }
950
+ }
951
+ function Zt({
937
952
  groupElement: e,
938
953
  hitRegion: t,
939
954
  pointerEventTarget: n
940
955
  }) {
941
- if (!lt(n) || n.contains(e) || e.contains(n))
956
+ if (Re(n)) {
957
+ const o = n.closest("dialog");
958
+ if (o && !o.contains(e) && Jt(o))
959
+ return !1;
960
+ }
961
+ if (!Re(n) || n.contains(e) || e.contains(n))
942
962
  return !0;
943
963
  if (Wt(n, e) > 0) {
944
964
  let o = n;
@@ -952,69 +972,69 @@ function Jt({
952
972
  }
953
973
  return !0;
954
974
  }
955
- function ke(e, t) {
975
+ function Oe(e, t) {
956
976
  const n = [];
957
977
  return t.forEach((o, r) => {
958
978
  if (r.disabled)
959
979
  return;
960
- const s = Me({ group: r }), i = Bt(r.orientation, s, {
980
+ const i = Ee({ group: r }), s = Ut(r.orientation, i, {
961
981
  x: e.clientX,
962
982
  y: e.clientY
963
983
  });
964
- i && i.distance.x <= 0 && i.distance.y <= 0 && Jt({
984
+ s && s.distance.x <= 0 && s.distance.y <= 0 && Zt({
965
985
  groupElement: r.element,
966
- hitRegion: i.hitRegion.rect,
986
+ hitRegion: s.hitRegion.rect,
967
987
  pointerEventTarget: e.target
968
- }) && n.push(i.hitRegion);
988
+ }) && n.push(s.hitRegion);
969
989
  }), n;
970
990
  }
971
991
  function ne({
972
992
  layout: e,
973
993
  panelConstraints: t
974
994
  }) {
975
- const n = t.map(({ panelId: i }) => e[i]), o = [...n], r = o.reduce(
976
- (i, u) => i + u,
995
+ const n = t.map(({ panelId: s }) => e[s]), o = [...n], r = o.reduce(
996
+ (s, u) => s + u,
977
997
  0
978
998
  );
979
999
  if (Object.keys(e).length !== t.length)
980
1000
  throw Error(
981
- `Invalid ${t.length} panel layout: ${Object.values(e).map((i) => `${i}%`).join(", ")}`
1001
+ `Invalid ${t.length} panel layout: ${Object.values(e).map((s) => `${s}%`).join(", ")}`
982
1002
  );
983
1003
  if (!D(r, 100) && o.length > 0)
984
- for (let i = 0; i < t.length; i++) {
985
- const u = o[i];
986
- L(u != null, `No layout data found for index ${i}`);
1004
+ for (let s = 0; s < t.length; s++) {
1005
+ const u = o[s];
1006
+ L(u != null, `No layout data found for index ${s}`);
987
1007
  const c = 100 / r * u;
988
- o[i] = c;
1008
+ o[s] = c;
989
1009
  }
990
- let s = 0;
991
- for (let i = 0; i < t.length; i++) {
992
- const u = n[i];
993
- L(u != null, `No layout data found for index ${i}`);
994
- const c = o[i];
995
- L(c != null, `No layout data found for index ${i}`);
1010
+ let i = 0;
1011
+ for (let s = 0; s < t.length; s++) {
1012
+ const u = n[s];
1013
+ L(u != null, `No layout data found for index ${s}`);
1014
+ const c = o[s];
1015
+ L(c != null, `No layout data found for index ${s}`);
996
1016
  const a = se({
997
1017
  overrideDisabledPanels: !0,
998
- panelConstraints: t[i],
1018
+ panelConstraints: t[s],
999
1019
  prevSize: u,
1000
1020
  size: c
1001
1021
  });
1002
- c != a && (s += c - a, o[i] = a);
1022
+ c != a && (i += c - a, o[s] = a);
1003
1023
  }
1004
- if (!D(s, 0))
1005
- for (let i = 0; i < t.length; i++) {
1006
- const u = o[i];
1007
- L(u != null, `No layout data found for index ${i}`);
1008
- const c = u + s, a = se({
1024
+ if (!D(i, 0))
1025
+ for (let s = 0; s < t.length; s++) {
1026
+ const u = o[s];
1027
+ L(u != null, `No layout data found for index ${s}`);
1028
+ const c = u + i, a = se({
1009
1029
  overrideDisabledPanels: !0,
1010
- panelConstraints: t[i],
1030
+ panelConstraints: t[s],
1011
1031
  prevSize: u,
1012
1032
  size: c
1013
1033
  });
1014
- if (u !== a && (s -= a - u, o[i] = a, D(s, 0)))
1034
+ if (u !== a && (i -= a - u, o[s] = a, D(i, 0)))
1015
1035
  break;
1016
1036
  }
1017
- return o.reduce((i, u, c) => (i[t[c].panelId] = u, i), {});
1037
+ return o.reduce((s, u, c) => (s[t[c].panelId] = u, s), {});
1018
1038
  }
1019
1039
  function ht({
1020
1040
  groupId: e,
@@ -1028,8 +1048,8 @@ function ht({
1028
1048
  defaultLayoutDeferred: l,
1029
1049
  derivedPanelConstraints: f,
1030
1050
  layout: y,
1031
- groupSize: d,
1032
- separatorToPanels: p
1051
+ groupSize: p,
1052
+ separatorToPanels: g
1033
1053
  }
1034
1054
  ] of c)
1035
1055
  if (a.id === e)
@@ -1037,9 +1057,9 @@ function ht({
1037
1057
  defaultLayoutDeferred: l,
1038
1058
  derivedPanelConstraints: f,
1039
1059
  group: a,
1040
- groupSize: d,
1060
+ groupSize: p,
1041
1061
  layout: y,
1042
- separatorToPanels: p
1062
+ separatorToPanels: g
1043
1063
  };
1044
1064
  throw Error(`Group ${e} not found`);
1045
1065
  }, o = () => {
@@ -1054,85 +1074,85 @@ function ht({
1054
1074
  if (c !== void 0)
1055
1075
  return c;
1056
1076
  throw Error(`Layout not found for Panel ${t}`);
1057
- }, s = () => {
1077
+ }, i = () => {
1058
1078
  const c = n().layout[t];
1059
1079
  if (c !== void 0)
1060
1080
  return c;
1061
1081
  throw Error(`Layout not found for Panel ${t}`);
1062
- }, i = ({
1082
+ }, s = ({
1063
1083
  nextSize: c,
1064
1084
  panels: a,
1065
1085
  prevLayout: l,
1066
1086
  derivedPanelConstraints: f
1067
1087
  }) => {
1068
- const y = s(), d = a.findIndex((m) => m.id === t), p = d === 0, h = d === a.length - 1;
1069
- if (h && c < y && (p || a.slice(0, d).every((m, g) => {
1070
- const x = f[g];
1088
+ const y = i(), p = a.findIndex((h) => h.id === t), g = p === 0, d = p === a.length - 1;
1089
+ if (d && c < y && (g || a.slice(0, p).every((h, m) => {
1090
+ const x = f[m];
1071
1091
  return x?.collapsible && D(x.collapsedSize, l[x.panelId]);
1072
1092
  }))) {
1073
- const m = a.slice(0, d).reduce((g, x) => g + l[x.id], 0);
1093
+ const h = a.slice(0, p).reduce((m, x) => m + l[x.id], 0);
1074
1094
  return {
1075
1095
  ...l,
1076
- [t]: A(100 - m)
1096
+ [t]: F(100 - h)
1077
1097
  };
1078
1098
  }
1079
1099
  return de({
1080
- delta: h ? y - c : c - y,
1100
+ delta: d ? y - c : c - y,
1081
1101
  initialLayout: l,
1082
1102
  panelConstraints: f,
1083
- pivotIndices: h ? [d - 1, d] : [d, d + 1],
1103
+ pivotIndices: d ? [p - 1, p] : [p, p + 1],
1084
1104
  prevLayout: l,
1085
1105
  trigger: "imperative-api"
1086
1106
  });
1087
1107
  }, u = (c) => {
1088
- const a = s();
1108
+ const a = i();
1089
1109
  if (c === a)
1090
1110
  return;
1091
1111
  const {
1092
1112
  defaultLayoutDeferred: l,
1093
1113
  derivedPanelConstraints: f,
1094
1114
  group: y,
1095
- groupSize: d,
1096
- layout: p,
1097
- separatorToPanels: h
1098
- } = n(), v = i({
1115
+ groupSize: p,
1116
+ layout: g,
1117
+ separatorToPanels: d
1118
+ } = n(), v = s({
1099
1119
  nextSize: c,
1100
1120
  panels: y.panels,
1101
- prevLayout: p,
1121
+ prevLayout: g,
1102
1122
  derivedPanelConstraints: f
1103
- }), m = ne({
1123
+ }), h = ne({
1104
1124
  layout: v,
1105
1125
  panelConstraints: f
1106
1126
  });
1107
- K(p, m) || q(y, {
1127
+ K(g, h) || X(y, {
1108
1128
  defaultLayoutDeferred: l,
1109
1129
  derivedPanelConstraints: f,
1110
- groupSize: d,
1111
- layout: m,
1112
- separatorToPanels: h
1130
+ groupSize: p,
1131
+ layout: h,
1132
+ separatorToPanels: d
1113
1133
  });
1114
1134
  };
1115
1135
  return {
1116
1136
  collapse: () => {
1117
- const { collapsible: c, collapsedSize: a } = o(), { mutableValues: l } = r(), f = s();
1137
+ const { collapsible: c, collapsedSize: a } = o(), { mutableValues: l } = r(), f = i();
1118
1138
  c && f !== a && (l.expandToSize = f, u(a));
1119
1139
  },
1120
1140
  expand: () => {
1121
- const { collapsible: c, collapsedSize: a, minSize: l } = o(), { mutableValues: f } = r(), y = s();
1141
+ const { collapsible: c, collapsedSize: a, minSize: l } = o(), { mutableValues: f } = r(), y = i();
1122
1142
  if (c && y === a) {
1123
- let d = f.expandToSize ?? l;
1124
- d === 0 && (d = 1), u(d);
1143
+ let p = f.expandToSize ?? l;
1144
+ p === 0 && (p = 1), u(p);
1125
1145
  }
1126
1146
  },
1127
1147
  getSize: () => {
1128
- const { group: c } = n(), a = s(), { element: l } = r(), f = c.orientation === "horizontal" ? l.offsetWidth : l.offsetHeight;
1148
+ const { group: c } = n(), a = i(), { element: l } = r(), f = c.orientation === "horizontal" ? l.offsetWidth : l.offsetHeight;
1129
1149
  return {
1130
1150
  asPercentage: a,
1131
1151
  inPixels: f
1132
1152
  };
1133
1153
  },
1134
1154
  isCollapsed: () => {
1135
- const { collapsible: c, collapsedSize: a } = o(), l = s();
1155
+ const { collapsible: c, collapsedSize: a } = o(), l = i();
1136
1156
  return c && D(a, l);
1137
1157
  },
1138
1158
  resize: (c) => {
@@ -1140,26 +1160,26 @@ function ht({
1140
1160
  groupSize: f,
1141
1161
  panelElement: l,
1142
1162
  styleProp: c
1143
- }), d = A(y / f * 100);
1144
- u(d);
1163
+ }), p = F(y / f * 100);
1164
+ u(p);
1145
1165
  }
1146
1166
  };
1147
1167
  }
1148
- function Ue(e) {
1168
+ function We(e) {
1149
1169
  if (e.defaultPrevented)
1150
1170
  return;
1151
1171
  const t = ee();
1152
- ke(e, t).forEach((o) => {
1172
+ Oe(e, t).forEach((o) => {
1153
1173
  if (o.separator && !o.separator.disableDoubleClick) {
1154
1174
  const r = o.panels.find(
1155
- (s) => s.panelConstraints.defaultSize !== void 0
1175
+ (i) => i.panelConstraints.defaultSize !== void 0
1156
1176
  );
1157
1177
  if (r) {
1158
- const s = r.panelConstraints.defaultSize, i = ht({
1178
+ const i = r.panelConstraints.defaultSize, s = ht({
1159
1179
  groupId: o.group.id,
1160
1180
  panelId: r.id
1161
1181
  });
1162
- i && s !== void 0 && (i.resize(s), e.preventDefault());
1182
+ s && i !== void 0 && (s.resize(i), e.preventDefault());
1163
1183
  }
1164
1184
  }
1165
1185
  });
@@ -1192,18 +1212,18 @@ function mt({
1192
1212
  const {
1193
1213
  defaultLayoutDeferred: o,
1194
1214
  derivedPanelConstraints: r,
1195
- group: s,
1196
- groupSize: i,
1215
+ group: i,
1216
+ groupSize: s,
1197
1217
  layout: u,
1198
1218
  separatorToPanels: c
1199
1219
  } = t(), a = ne({
1200
1220
  layout: n,
1201
1221
  panelConstraints: r
1202
1222
  });
1203
- return o ? u : (K(u, a) || q(s, {
1223
+ return o ? u : (K(u, a) || X(i, {
1204
1224
  defaultLayoutDeferred: o,
1205
1225
  derivedPanelConstraints: r,
1206
- groupSize: i,
1226
+ groupSize: s,
1207
1227
  layout: a,
1208
1228
  separatorToPanels: c
1209
1229
  }), a);
@@ -1215,20 +1235,20 @@ function te(e, t) {
1215
1235
  (f) => f.element === e
1216
1236
  );
1217
1237
  L(r, "Matching separator not found");
1218
- const s = o.separatorToPanels.get(r);
1219
- L(s, "Matching panels not found");
1220
- const i = s.map((f) => n.panels.indexOf(f)), c = mt({ groupId: n.id }).getLayout(), a = de({
1238
+ const i = o.separatorToPanels.get(r);
1239
+ L(i, "Matching panels not found");
1240
+ const s = i.map((f) => n.panels.indexOf(f)), c = mt({ groupId: n.id }).getLayout(), a = de({
1221
1241
  delta: t,
1222
1242
  initialLayout: c,
1223
1243
  panelConstraints: o.derivedPanelConstraints,
1224
- pivotIndices: i,
1244
+ pivotIndices: s,
1225
1245
  prevLayout: c,
1226
1246
  trigger: "keyboard"
1227
1247
  }), l = ne({
1228
1248
  layout: a,
1229
1249
  panelConstraints: o.derivedPanelConstraints
1230
1250
  });
1231
- K(c, l) || q(
1251
+ K(c, l) || X(
1232
1252
  n,
1233
1253
  {
1234
1254
  defaultLayoutDeferred: o.defaultLayoutDeferred,
@@ -1244,7 +1264,7 @@ function te(e, t) {
1244
1264
  { isUserInteraction: !0 }
1245
1265
  );
1246
1266
  }
1247
- function We(e) {
1267
+ function Ke(e) {
1248
1268
  if (e.defaultPrevented)
1249
1269
  return;
1250
1270
  const t = e.currentTarget, n = ye(t);
@@ -1274,31 +1294,31 @@ function We(e) {
1274
1294
  }
1275
1295
  case "Enter": {
1276
1296
  e.preventDefault();
1277
- const r = ye(t), s = Q(r.id, !0), { derivedPanelConstraints: i, layout: u, separatorToPanels: c } = s, a = r.separators.find(
1278
- (d) => d.element === t
1297
+ const r = ye(t), i = Q(r.id, !0), { derivedPanelConstraints: s, layout: u, separatorToPanels: c } = i, a = r.separators.find(
1298
+ (p) => p.element === t
1279
1299
  );
1280
1300
  L(a, "Matching separator not found");
1281
1301
  const l = c.get(a);
1282
1302
  L(l, "Matching panels not found");
1283
- const f = l[0], y = i.find(
1284
- (d) => d.panelId === f.id
1303
+ const f = l[0], y = s.find(
1304
+ (p) => p.panelId === f.id
1285
1305
  );
1286
1306
  if (L(y, "Panel metadata not found"), y.collapsible) {
1287
- const d = u[f.id], p = y.collapsedSize === d ? r.mutableState.expandedPanelSizes[f.id] ?? y.minSize : y.collapsedSize;
1288
- te(t, p - d);
1307
+ const p = u[f.id], g = y.collapsedSize === p ? r.mutableState.expandedPanelSizes[f.id] ?? y.minSize : y.collapsedSize;
1308
+ te(t, g - p);
1289
1309
  }
1290
1310
  break;
1291
1311
  }
1292
1312
  case "F6": {
1293
1313
  e.preventDefault();
1294
- const s = ye(t).separators.map(
1314
+ const i = ye(t).separators.map(
1295
1315
  (a) => a.element
1296
- ), i = Array.from(s).findIndex(
1316
+ ), s = Array.from(i).findIndex(
1297
1317
  (a) => a === e.currentTarget
1298
1318
  );
1299
- L(i !== null, "Index not found");
1300
- const u = e.shiftKey ? i > 0 ? i - 1 : s.length - 1 : i + 1 < s.length ? i + 1 : 0;
1301
- s[u].focus({
1319
+ L(s !== null, "Index not found");
1320
+ const u = e.shiftKey ? s > 0 ? s - 1 : i.length - 1 : s + 1 < i.length ? s + 1 : 0;
1321
+ i[u].focus({
1302
1322
  preventScroll: !0
1303
1323
  });
1304
1324
  break;
@@ -1309,76 +1329,77 @@ function We(e) {
1309
1329
  }
1310
1330
  }
1311
1331
  }
1312
- function Zt(e, t) {
1313
- const { element: n, orientation: o, panels: r } = e, s = n.getBoundingClientRect(), i = o === "horizontal";
1314
- return Me({
1332
+ function Qt(e, t) {
1333
+ const { element: n, orientation: o, panels: r } = e, i = n.getBoundingClientRect(), s = o === "horizontal";
1334
+ return Ee({
1315
1335
  expandHitTargets: !1,
1316
1336
  group: e,
1317
1337
  includeDisabled: !0
1318
1338
  }).map(
1319
1339
  ({ panels: c, rect: a, separator: l }, f) => {
1320
- const y = r.indexOf(c[0]), d = i ? a.left + a.width / 2 : a.top + a.height / 2;
1340
+ const y = r.indexOf(c[0]), p = s ? a.left + a.width / 2 : a.top + a.height / 2;
1321
1341
  return {
1322
- active: t.some((h) => {
1323
- if (h.group !== e || h.panels[0] !== c[0])
1342
+ active: t.some((d) => {
1343
+ if (d.group !== e || d.panels[0] !== c[0])
1324
1344
  return !1;
1325
- if (l || h.separator)
1326
- return h.separator === l;
1327
- const v = i ? h.rect.left + h.rect.width / 2 : h.rect.top + h.rect.height / 2;
1328
- return D(d, v);
1345
+ if (l || d.separator)
1346
+ return d.separator === l;
1347
+ const v = s ? d.rect.left + d.rect.width / 2 : d.rect.top + d.rect.height / 2;
1348
+ return D(p, v);
1329
1349
  }),
1330
1350
  group: e,
1331
1351
  key: l ? `separator-${l.id}` : `panel-${c[0].id}-${f}`,
1332
1352
  offset: 0,
1333
1353
  panelIndex: y,
1334
1354
  rect: new DOMRect(
1335
- (i && !l ? d : a.left) - s.left - n.clientLeft + n.scrollLeft,
1336
- (!i && !l ? d : a.top) - s.top - n.clientTop + n.scrollTop,
1337
- i && !l ? 0 : a.width,
1338
- !i && !l ? 0 : a.height
1355
+ (s && !l ? p : a.left) - i.left - n.clientLeft + n.scrollLeft,
1356
+ (!s && !l ? p : a.top) - i.top - n.clientTop + n.scrollTop,
1357
+ s && !l ? 0 : a.width,
1358
+ !s && !l ? 0 : a.height
1339
1359
  ),
1340
1360
  separator: l
1341
1361
  };
1342
1362
  }
1343
1363
  );
1344
1364
  }
1345
- function Ke(e) {
1365
+ function Xe(e) {
1346
1366
  if (e.defaultPrevented)
1347
1367
  return;
1348
1368
  if (e.pointerType === "mouse" && e.button > 0)
1349
1369
  return;
1350
- const t = ee(), n = ke(e, t);
1370
+ const t = ee(), n = Oe(e, t);
1351
1371
  if (n.length === 0)
1352
1372
  return;
1353
1373
  const o = /* @__PURE__ */ new Map();
1354
1374
  let r = !1;
1355
- n.forEach((i) => {
1356
- i.separator && (r || (r = !0, i.separator.element.focus({
1375
+ n.forEach((s) => {
1376
+ s.separator && (r || (r = !0, s.separator.element.focus({
1357
1377
  // @ts-expect-error https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#browser_compatibility
1358
1378
  focusVisible: !1,
1359
1379
  preventScroll: !0
1360
1380
  })));
1361
- const u = t.get(i.group);
1362
- u && o.set(i.group, u.layout);
1381
+ const u = t.get(s.group);
1382
+ u && o.set(s.group, u.layout);
1363
1383
  });
1364
- const s = Array.from(o.keys()).flatMap(
1365
- (i) => i.resizePreviewMode === "separator" ? Zt(i, n) : []
1384
+ const i = Array.from(o.keys()).flatMap(
1385
+ (s) => s.resizePreviewMode === "separator" ? Qt(s, n) : []
1366
1386
  );
1367
1387
  W({
1368
1388
  cursorFlags: 0,
1389
+ didPointerMove: !1,
1369
1390
  hitRegions: n,
1370
1391
  initialLayoutMap: o,
1371
1392
  pointerDownAtPoint: { x: e.clientX, y: e.clientY },
1372
1393
  previewLayoutMap: new Map(o),
1373
- previews: s,
1394
+ previews: i,
1374
1395
  state: "active"
1375
1396
  }), e.preventDefault();
1376
1397
  }
1377
1398
  function qe(e) {
1378
- const t = ee(), n = X();
1399
+ const t = ee(), n = q();
1379
1400
  switch (n.state) {
1380
1401
  case "active":
1381
- Ie({
1402
+ ke({
1382
1403
  commit: !1,
1383
1404
  document: e.currentTarget,
1384
1405
  event: e,
@@ -1389,10 +1410,10 @@ function qe(e) {
1389
1410
  });
1390
1411
  }
1391
1412
  }
1392
- function Xe(e) {
1413
+ function Ye(e) {
1393
1414
  if (e.defaultPrevented)
1394
1415
  return;
1395
- const t = X(), n = ee();
1416
+ const t = q(), n = ee();
1396
1417
  switch (t.state) {
1397
1418
  case "active": {
1398
1419
  if (
@@ -1400,8 +1421,8 @@ function Xe(e) {
1400
1421
  e.buttons === 0
1401
1422
  ) {
1402
1423
  t.previewLayoutMap.forEach((o, r) => {
1403
- const s = n.get(r);
1404
- r.resizePreviewMode === "separator" && s && !K(o, s.layout) && q(r, { ...s, layout: o });
1424
+ const i = n.get(r);
1425
+ r.resizePreviewMode === "separator" && i && !K(o, i.layout) && X(r, { ...i, layout: o });
1405
1426
  }), W({
1406
1427
  cursorFlags: 0,
1407
1428
  state: "inactive"
@@ -1409,7 +1430,7 @@ function Xe(e) {
1409
1430
  if (!n.has(o.group))
1410
1431
  return;
1411
1432
  const r = Q(o.group.id, !0);
1412
- q(o.group, r, {
1433
+ X(o.group, r, {
1413
1434
  isUserInteraction: !0
1414
1435
  });
1415
1436
  }), fe(e.currentTarget);
@@ -1420,7 +1441,7 @@ function Xe(e) {
1420
1441
  const { element: r } = o.separator;
1421
1442
  r.isConnected && !r.hasPointerCapture?.(e.pointerId) && r.setPointerCapture?.(e.pointerId);
1422
1443
  }
1423
- Ie({
1444
+ ke({
1424
1445
  commit: !1,
1425
1446
  document: e.currentTarget,
1426
1447
  event: e,
@@ -1433,7 +1454,7 @@ function Xe(e) {
1433
1454
  break;
1434
1455
  }
1435
1456
  default: {
1436
- const o = ke(e, n);
1457
+ const o = Oe(e, n);
1437
1458
  o.length === 0 ? t.state !== "inactive" && W({
1438
1459
  cursorFlags: 0,
1439
1460
  state: "inactive"
@@ -1446,9 +1467,9 @@ function Xe(e) {
1446
1467
  }
1447
1468
  }
1448
1469
  }
1449
- function Ye(e) {
1470
+ function Je(e) {
1450
1471
  if (e.relatedTarget instanceof HTMLIFrameElement)
1451
- switch (X().state) {
1472
+ switch (q().state) {
1452
1473
  case "hover":
1453
1474
  W({
1454
1475
  cursorFlags: 0,
@@ -1456,7 +1477,7 @@ function Ye(e) {
1456
1477
  });
1457
1478
  }
1458
1479
  }
1459
- function Je(e) {
1480
+ function Ze(e) {
1460
1481
  if (e.defaultPrevented)
1461
1482
  return;
1462
1483
  if (e.pointerType === "mouse" && e.button > 0)
@@ -1466,25 +1487,25 @@ function Je(e) {
1466
1487
  e
1467
1488
  ) && e.preventDefault();
1468
1489
  }
1469
- function Qt(e) {
1490
+ function en(e) {
1470
1491
  let t = 0, n = 0;
1471
1492
  const o = {};
1472
- for (const s of e)
1473
- if (s.defaultSize !== void 0) {
1493
+ for (const i of e)
1494
+ if (i.defaultSize !== void 0) {
1474
1495
  t++;
1475
- const i = A(s.defaultSize);
1476
- n += i, o[s.panelId] = i;
1496
+ const s = F(i.defaultSize);
1497
+ n += s, o[i.panelId] = s;
1477
1498
  } else
1478
- o[s.panelId] = void 0;
1499
+ o[i.panelId] = void 0;
1479
1500
  const r = e.length - t;
1480
1501
  if (r !== 0) {
1481
- const s = A((100 - n) / r);
1482
- for (const i of e)
1483
- i.defaultSize === void 0 && (o[i.panelId] = s);
1502
+ const i = F((100 - n) / r);
1503
+ for (const s of e)
1504
+ s.defaultSize === void 0 && (o[s.panelId] = i);
1484
1505
  }
1485
1506
  return o;
1486
1507
  }
1487
- function en(e, t) {
1508
+ function tn(e, t) {
1488
1509
  const n = e.map((r) => r.id), o = Object.keys(t);
1489
1510
  if (n.length !== o.length)
1490
1511
  return !1;
@@ -1493,22 +1514,22 @@ function en(e, t) {
1493
1514
  return !1;
1494
1515
  return !0;
1495
1516
  }
1496
- function Ze({
1517
+ function Qe({
1497
1518
  group: e,
1498
1519
  panelConstraints: t
1499
1520
  }) {
1500
1521
  const n = e.panels.map(({ id: r }) => r).join(","), o = e.mutableState.defaultLayout;
1501
- return e.mutableState.layouts[n] ?? (o && en(e.panels, o) ? o : Qt(t));
1522
+ return e.mutableState.layouts[n] ?? (o && tn(e.panels, o) ? o : en(t));
1502
1523
  }
1503
- function tn(e, t, n) {
1524
+ function nn(e, t, n) {
1504
1525
  if (!n[0])
1505
1526
  return;
1506
1527
  const r = e.panels.find((a) => a.element === t);
1507
1528
  if (!r || !r.onResize)
1508
1529
  return;
1509
- const s = ae({ group: e }), i = e.orientation === "horizontal" ? r.element.offsetWidth : r.element.offsetHeight, u = r.mutableValues.prevSize, c = {
1510
- asPercentage: A(i / s * 100),
1511
- inPixels: i
1530
+ const i = ae({ group: e }), s = e.orientation === "horizontal" ? r.element.offsetWidth : r.element.offsetHeight, u = r.mutableValues.prevSize, c = {
1531
+ asPercentage: F(s / i * 100),
1532
+ inPixels: s
1512
1533
  };
1513
1534
  r.mutableValues.prevSize = c, r.onResize(c, r.id, u);
1514
1535
  }
@@ -1520,10 +1541,10 @@ function gt(e, t) {
1520
1541
  return !1;
1521
1542
  return !0;
1522
1543
  }
1523
- function nn(e, t) {
1544
+ function on(e, t) {
1524
1545
  return e.length !== t.length ? !1 : e.every((n, o) => gt(n, t[o]));
1525
1546
  }
1526
- function on({
1547
+ function rn({
1527
1548
  group: e,
1528
1549
  nextGroupSize: t,
1529
1550
  prevGroupSize: n,
@@ -1531,40 +1552,40 @@ function on({
1531
1552
  }) {
1532
1553
  if (n <= 0 || t <= 0 || n === t)
1533
1554
  return o;
1534
- let r = 0, s = 0, i = !1;
1555
+ let r = 0, i = 0, s = !1;
1535
1556
  const u = /* @__PURE__ */ new Map(), c = [];
1536
1557
  for (const f of e.panels) {
1537
1558
  const y = o[f.id] ?? 0;
1538
1559
  switch (f.panelConstraints.groupResizeBehavior) {
1539
1560
  case "preserve-pixel-size": {
1540
- i = !0;
1541
- const d = y / 100 * n, p = A(
1542
- d / t * 100
1561
+ s = !0;
1562
+ const p = y / 100 * n, g = F(
1563
+ p / t * 100
1543
1564
  );
1544
- u.set(f.id, p), r += p;
1565
+ u.set(f.id, g), r += g;
1545
1566
  break;
1546
1567
  }
1547
1568
  case "preserve-relative-size":
1548
1569
  default: {
1549
- c.push(f.id), s += y;
1570
+ c.push(f.id), i += y;
1550
1571
  break;
1551
1572
  }
1552
1573
  }
1553
1574
  }
1554
- if (!i || c.length === 0)
1575
+ if (!s || c.length === 0)
1555
1576
  return o;
1556
1577
  const a = 100 - r, l = { ...o };
1557
1578
  if (u.forEach((f, y) => {
1558
1579
  l[y] = f;
1559
- }), s > 0)
1580
+ }), i > 0)
1560
1581
  for (const f of c) {
1561
1582
  const y = o[f] ?? 0;
1562
- l[f] = A(
1563
- y / s * a
1583
+ l[f] = F(
1584
+ y / i * a
1564
1585
  );
1565
1586
  }
1566
1587
  else {
1567
- const f = A(
1588
+ const f = F(
1568
1589
  a / c.length
1569
1590
  );
1570
1591
  for (const y of c)
@@ -1573,59 +1594,59 @@ function on({
1573
1594
  return l;
1574
1595
  }
1575
1596
  const re = /* @__PURE__ */ new Map();
1576
- function rn(e) {
1597
+ function sn(e) {
1577
1598
  let t = !0;
1578
1599
  L(
1579
1600
  e.element.ownerDocument.defaultView,
1580
1601
  "Cannot register an unmounted Group"
1581
1602
  );
1582
- const n = e.element.ownerDocument.defaultView.ResizeObserver, o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), s = new n((d) => {
1583
- for (const p of d) {
1584
- const { borderBoxSize: h, target: v } = p;
1603
+ const n = e.element.ownerDocument.defaultView.ResizeObserver, o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = new n((p) => {
1604
+ for (const g of p) {
1605
+ const { borderBoxSize: d, target: v } = g;
1585
1606
  if (v === e.element) {
1586
1607
  if (t) {
1587
- const m = ae({ group: e });
1588
- if (m === 0)
1608
+ const h = ae({ group: e });
1609
+ if (h === 0)
1589
1610
  return;
1590
- const g = Q(e.id);
1591
- if (!g)
1611
+ const m = Q(e.id);
1612
+ if (!m)
1592
1613
  return;
1593
- const x = Le(e), b = g.defaultLayoutDeferred ? Ze({
1614
+ const x = Le(e), S = m.defaultLayoutDeferred ? Qe({
1594
1615
  group: e,
1595
1616
  panelConstraints: x
1596
- }) : g.layout, z = on({
1617
+ }) : m.layout, P = rn({
1597
1618
  group: e,
1598
- nextGroupSize: m,
1599
- prevGroupSize: g.groupSize,
1600
- prevLayout: b
1601
- }), E = ne({
1602
- layout: z,
1619
+ nextGroupSize: h,
1620
+ prevGroupSize: m.groupSize,
1621
+ prevLayout: S
1622
+ }), C = ne({
1623
+ layout: P,
1603
1624
  panelConstraints: x
1604
1625
  });
1605
- if (!g.defaultLayoutDeferred && K(g.layout, E) && nn(
1606
- g.derivedPanelConstraints,
1626
+ if (!m.defaultLayoutDeferred && K(m.layout, C) && on(
1627
+ m.derivedPanelConstraints,
1607
1628
  x
1608
- ) && g.groupSize === m)
1629
+ ) && m.groupSize === h)
1609
1630
  continue;
1610
- q(e, {
1631
+ X(e, {
1611
1632
  defaultLayoutDeferred: !1,
1612
1633
  derivedPanelConstraints: x,
1613
- groupSize: m,
1614
- layout: E,
1615
- separatorToPanels: g.separatorToPanels
1634
+ groupSize: h,
1635
+ layout: C,
1636
+ separatorToPanels: m.separatorToPanels
1616
1637
  });
1617
1638
  }
1618
1639
  } else
1619
- tn(e, v, h);
1640
+ nn(e, v, d);
1620
1641
  }
1621
1642
  });
1622
- s.observe(e.element), e.panels.forEach((d) => {
1643
+ i.observe(e.element), e.panels.forEach((p) => {
1623
1644
  L(
1624
- !o.has(d.id),
1625
- `Panel ids must be unique; id "${d.id}" was used more than once`
1626
- ), o.add(d.id), d.onResize && s.observe(d.element);
1645
+ !o.has(p.id),
1646
+ `Panel ids must be unique; id "${p.id}" was used more than once`
1647
+ ), o.add(p.id), p.onResize && i.observe(p.element);
1627
1648
  });
1628
- const i = ae({ group: e }), u = Le(e), c = Ze({
1649
+ const s = ae({ group: e }), u = Le(e), c = Qe({
1629
1650
  group: e,
1630
1651
  panelConstraints: u
1631
1652
  }), a = ne({
@@ -1637,51 +1658,51 @@ function rn(e) {
1637
1658
  (re.get(l) ?? 0) + 1
1638
1659
  );
1639
1660
  const f = /* @__PURE__ */ new Map();
1640
- return Me({ group: e, includeDisabled: !0 }).forEach((d) => {
1641
- d.separator && f.set(d.separator, d.panels);
1642
- }), q(e, {
1643
- defaultLayoutDeferred: i === 0,
1661
+ return Ee({ group: e, includeDisabled: !0 }).forEach((p) => {
1662
+ p.separator && f.set(p.separator, p.panels);
1663
+ }), X(e, {
1664
+ defaultLayoutDeferred: s === 0,
1644
1665
  derivedPanelConstraints: u,
1645
- groupSize: i,
1666
+ groupSize: s,
1646
1667
  layout: a,
1647
1668
  separatorToPanels: f
1648
- }), e.separators.forEach((d) => {
1669
+ }), e.separators.forEach((p) => {
1649
1670
  L(
1650
- !r.has(d.id),
1651
- `Separator ids must be unique; id "${d.id}" was used more than once`
1652
- ), r.add(d.id), d.element.addEventListener("keydown", We);
1653
- }), re.get(l) === 1 && (l.addEventListener("contextmenu", He, !0), l.addEventListener("dblclick", Ue, !0), l.addEventListener("pointerdown", Ke, !0), l.addEventListener("pointerleave", qe), l.addEventListener("pointermove", Xe), l.addEventListener("pointerout", Ye), l.addEventListener("pointerup", Je, !0)), function() {
1671
+ !r.has(p.id),
1672
+ `Separator ids must be unique; id "${p.id}" was used more than once`
1673
+ ), r.add(p.id), p.element.addEventListener("keydown", Ke);
1674
+ }), re.get(l) === 1 && (l.addEventListener("contextmenu", Ve, !0), l.addEventListener("dblclick", We, !0), l.addEventListener("pointerdown", Xe, !0), l.addEventListener("pointerleave", qe), l.addEventListener("pointermove", Ye), l.addEventListener("pointerout", Je), l.addEventListener("pointerup", Ze, !0)), function() {
1654
1675
  t = !1, re.set(
1655
1676
  l,
1656
1677
  Math.max(0, (re.get(l) ?? 0) - 1)
1657
- ), Vt(e), Gt(e) && fe(l), e.separators.forEach((p) => {
1658
- p.element.removeEventListener("keydown", We);
1678
+ ), Vt(e), Nt(e) && fe(l), e.separators.forEach((g) => {
1679
+ g.element.removeEventListener("keydown", Ke);
1659
1680
  }), re.get(l) || (l.removeEventListener(
1660
1681
  "contextmenu",
1661
- He,
1682
+ Ve,
1662
1683
  !0
1663
1684
  ), l.removeEventListener(
1664
1685
  "dblclick",
1665
- Ue,
1686
+ We,
1666
1687
  !0
1667
1688
  ), l.removeEventListener(
1668
1689
  "pointerdown",
1669
- Ke,
1690
+ Xe,
1670
1691
  !0
1671
- ), l.removeEventListener("pointerleave", qe), l.removeEventListener("pointermove", Xe), l.removeEventListener("pointerout", Ye), l.removeEventListener("pointerup", Je, !0)), s.disconnect();
1692
+ ), l.removeEventListener("pointerleave", qe), l.removeEventListener("pointermove", Ye), l.removeEventListener("pointerout", Je), l.removeEventListener("pointerup", Ze, !0)), i.disconnect();
1672
1693
  };
1673
1694
  }
1674
- function sn() {
1695
+ function an() {
1675
1696
  const [e, t] = Z({}), n = ce(() => t({}), []);
1676
1697
  return [e, n];
1677
1698
  }
1678
- function Te(e) {
1699
+ function De(e) {
1679
1700
  const t = Pt();
1680
1701
  return `${e ?? t}`;
1681
1702
  }
1682
- const V = typeof window < "u" ? Qe : Se;
1703
+ const V = typeof window < "u" ? et : Se;
1683
1704
  function ue(e) {
1684
- const t = O(e);
1705
+ const t = T(e);
1685
1706
  return V(() => {
1686
1707
  t.current = e;
1687
1708
  }, [e]), ce(
@@ -1689,7 +1710,7 @@ function ue(e) {
1689
1710
  [t]
1690
1711
  );
1691
1712
  }
1692
- function De(...e) {
1713
+ function Te(...e) {
1693
1714
  return ue((t) => {
1694
1715
  e.forEach((n) => {
1695
1716
  if (n)
@@ -1706,24 +1727,24 @@ function De(...e) {
1706
1727
  });
1707
1728
  });
1708
1729
  }
1709
- function Oe(e) {
1710
- const t = O({ ...e });
1730
+ function Ne(e) {
1731
+ const t = T({ ...e });
1711
1732
  return V(() => {
1712
1733
  for (const n in e)
1713
1734
  t.current[n] = e[n];
1714
1735
  }, [e]), t.current;
1715
1736
  }
1716
1737
  const yt = Lt(null);
1717
- function an({
1738
+ function ln({
1718
1739
  separator: e
1719
1740
  }) {
1720
- const { element: t } = e, n = O(null);
1741
+ const { element: t } = e, n = T(null);
1721
1742
  return V(() => {
1722
- const o = t.cloneNode(!0), r = [t, ...t.querySelectorAll("*")], s = [o, ...o.querySelectorAll("*")], i = t.ownerDocument.defaultView;
1743
+ const o = t.cloneNode(!0), r = [t, ...t.querySelectorAll("*")], i = [o, ...o.querySelectorAll("*")], s = t.ownerDocument.defaultView;
1723
1744
  return r.forEach((u, c) => {
1724
- const a = s[c];
1725
- if (a instanceof i.HTMLElement || a instanceof i.SVGElement) {
1726
- const l = i.getComputedStyle(u);
1745
+ const a = i[c];
1746
+ if (a instanceof s.HTMLElement || a instanceof s.SVGElement) {
1747
+ const l = s.getComputedStyle(u);
1727
1748
  for (let f = 0; f < l.length; f++) {
1728
1749
  const y = l.item(f);
1729
1750
  a.style.setProperty(
@@ -1741,7 +1762,7 @@ function an({
1741
1762
  transform: "none",
1742
1763
  width: "100%"
1743
1764
  }), n.current.appendChild(o), () => o.remove();
1744
- }, [t]), /* @__PURE__ */ U(
1765
+ }, [t]), /* @__PURE__ */ B(
1745
1766
  "div",
1746
1767
  {
1747
1768
  ref: n,
@@ -1762,7 +1783,7 @@ function be() {
1762
1783
  ), e;
1763
1784
  }
1764
1785
  function vt(e) {
1765
- const { registerOverlay: t } = be(), n = O(e);
1786
+ const { registerOverlay: t } = be(), n = T(e);
1766
1787
  gt(n.current, e) || (n.current = e);
1767
1788
  const o = n.current;
1768
1789
  return V(
@@ -1771,7 +1792,7 @@ function vt(e) {
1771
1792
  ), null;
1772
1793
  }
1773
1794
  vt.displayName = "SeparatorOverlay";
1774
- function ln({
1795
+ function cn({
1775
1796
  active: e,
1776
1797
  orientation: t,
1777
1798
  style: n,
@@ -1794,7 +1815,7 @@ function ln({
1794
1815
  break;
1795
1816
  }
1796
1817
  }
1797
- return /* @__PURE__ */ U(
1818
+ return /* @__PURE__ */ B(
1798
1819
  "div",
1799
1820
  {
1800
1821
  ...o,
@@ -1808,20 +1829,20 @@ function ln({
1808
1829
  }
1809
1830
  );
1810
1831
  }
1811
- function cn({
1832
+ function un({
1812
1833
  overlay: e,
1813
1834
  preview: t
1814
1835
  }) {
1815
- const { group: n, offset: o, rect: r, separator: s } = t, i = n.orientation === "horizontal";
1816
- let u = s?.preview, c = e;
1817
- return Rt(u) && u.type === vt && (c = u.props, u = void 0), u == null && (c ? u = /* @__PURE__ */ U(
1818
- ln,
1836
+ const { group: n, offset: o, rect: r, separator: i } = t, s = n.orientation === "horizontal";
1837
+ let u = i?.preview, c = e;
1838
+ return Rt(u) && u.type === vt && (c = u.props, u = void 0), u == null && (c ? u = /* @__PURE__ */ B(
1839
+ cn,
1819
1840
  {
1820
1841
  ...c,
1821
1842
  active: t.active,
1822
1843
  orientation: n.orientation
1823
1844
  }
1824
- ) : s && (u = /* @__PURE__ */ U(an, { separator: s }))), /* @__PURE__ */ U(
1845
+ ) : i && (u = /* @__PURE__ */ B(ln, { separator: i }))), /* @__PURE__ */ B(
1825
1846
  "div",
1826
1847
  {
1827
1848
  "aria-hidden": "true",
@@ -1833,32 +1854,32 @@ function cn({
1833
1854
  pointerEvents: "none",
1834
1855
  position: "absolute",
1835
1856
  top: r.top,
1836
- transform: i ? `translateX(${o}px)` : `translateY(${o}px)`,
1857
+ transform: s ? `translateX(${o}px)` : `translateY(${o}px)`,
1837
1858
  width: r.width
1838
1859
  },
1839
1860
  children: u
1840
1861
  }
1841
1862
  );
1842
1863
  }
1843
- function un(e, t) {
1844
- const n = O({
1864
+ function fn(e, t) {
1865
+ const n = T({
1845
1866
  getLayout: () => ({}),
1846
- setLayout: At
1867
+ setLayout: Gt
1847
1868
  });
1848
- et(t, () => n.current, []), V(() => {
1869
+ tt(t, () => n.current, []), V(() => {
1849
1870
  Object.assign(
1850
1871
  n.current,
1851
1872
  mt({ groupId: e })
1852
1873
  );
1853
1874
  });
1854
1875
  }
1855
- function fn({
1876
+ function dn({
1856
1877
  groupId: e,
1857
1878
  resizePreviewMode: t
1858
1879
  }) {
1859
- const [n, o] = Z([]), r = O(n);
1880
+ const [n, o] = Z([]), r = T(n);
1860
1881
  return V(() => {
1861
- const s = (u) => {
1882
+ const i = (u) => {
1862
1883
  const c = ft(e), a = t === "separator" && u.state === "active" ? u.previews.filter(
1863
1884
  (f) => f.group === c && (f.active || !D(f.offset, 0))
1864
1885
  ) : [], l = r.current;
@@ -1867,23 +1888,23 @@ function fn({
1867
1888
  ) || (r.current = a, o(a));
1868
1889
  };
1869
1890
  if (t !== "separator") {
1870
- s(X());
1891
+ i(q());
1871
1892
  return;
1872
1893
  }
1873
- const i = ot(
1874
- ({ next: u }) => s(u)
1894
+ const s = rt(
1895
+ ({ next: u }) => i(u)
1875
1896
  );
1876
- return s(X()), i;
1897
+ return i(q()), s;
1877
1898
  }, [e, t]), n;
1878
1899
  }
1879
- function dn({
1900
+ function pn({
1880
1901
  children: e,
1881
1902
  className: t,
1882
1903
  defaultLayout: n,
1883
1904
  disableCursor: o,
1884
1905
  disabled: r,
1885
- elementRef: s,
1886
- groupRef: i,
1906
+ elementRef: i,
1907
+ groupRef: s,
1887
1908
  id: u,
1888
1909
  onLayoutChange: c,
1889
1910
  onLayoutChanged: a,
@@ -1893,140 +1914,140 @@ function dn({
1893
1914
  coarse: 20,
1894
1915
  fine: 10
1895
1916
  },
1896
- style: d,
1897
- ...p
1917
+ style: p,
1918
+ ...g
1898
1919
  }) {
1899
- const h = O({
1920
+ const d = T({
1900
1921
  onLayoutChange: {},
1901
1922
  onLayoutChanged: {}
1902
- }), v = ue((S) => {
1903
- K(h.current.onLayoutChange, S) || (h.current.onLayoutChange = S, c?.(S));
1904
- }), m = ue(
1905
- (S, P) => {
1906
- K(h.current.onLayoutChanged, S) || (h.current.onLayoutChanged = S, a?.(S, { isUserInteraction: P }));
1923
+ }), v = ue((b) => {
1924
+ K(d.current.onLayoutChange, b) || (d.current.onLayoutChange = b, c?.(b));
1925
+ }), h = ue(
1926
+ (b, z) => {
1927
+ K(d.current.onLayoutChanged, b) || (d.current.onLayoutChanged = b, a?.(b, { isUserInteraction: z }));
1907
1928
  }
1908
- ), g = Te(u), [x, b] = Z(), z = fn({
1909
- groupId: g,
1929
+ ), m = De(u), [x, S] = Z(), P = dn({
1930
+ groupId: m,
1910
1931
  resizePreviewMode: f
1911
- }), E = O(null), [R, w] = sn(), C = O({
1932
+ }), C = T(null), [E, w] = an(), R = T({
1912
1933
  lastExpandedPanelSizes: {},
1913
1934
  layouts: {},
1914
1935
  panels: [],
1915
1936
  separators: []
1916
- }), F = De(E, s);
1917
- un(g, i);
1918
- const I = ue(
1919
- (S, P) => {
1920
- const k = Q(S);
1921
- if (k)
1937
+ }), N = Te(C, i);
1938
+ fn(m, s);
1939
+ const O = ue(
1940
+ (b, z) => {
1941
+ const M = Q(b);
1942
+ if (M)
1922
1943
  return {
1923
- flexGrow: k.layout[P] ?? 1
1944
+ flexGrow: M.layout[z] ?? 1
1924
1945
  };
1925
- if (n?.[P])
1946
+ if (n?.[z])
1926
1947
  return {
1927
- flexGrow: n?.[P]
1948
+ flexGrow: n?.[z]
1928
1949
  };
1929
1950
  }
1930
- ), M = Oe({
1951
+ ), I = Ne({
1931
1952
  defaultLayout: n,
1932
1953
  disableCursor: o,
1933
1954
  resizeTargetMinimumSize: y
1934
- }), N = Pe(
1955
+ }), G = Pe(
1935
1956
  () => ({
1936
1957
  get disableCursor() {
1937
- return !!M.disableCursor;
1958
+ return !!I.disableCursor;
1938
1959
  },
1939
- getPanelStyles: I,
1940
- id: g,
1960
+ getPanelStyles: O,
1961
+ id: m,
1941
1962
  orientation: l,
1942
- registerPanel: (S) => {
1943
- const P = C.current;
1944
- return P.panels = Ce(l, [
1945
- ...P.panels,
1946
- S
1963
+ registerPanel: (b) => {
1964
+ const z = R.current;
1965
+ return z.panels = Ce(l, [
1966
+ ...z.panels,
1967
+ b
1947
1968
  ]), w(), () => {
1948
- P.panels = P.panels.filter(
1949
- (k) => k !== S
1969
+ z.panels = z.panels.filter(
1970
+ (M) => M !== b
1950
1971
  ), w();
1951
1972
  };
1952
1973
  },
1953
- registerOverlay: (S) => (b(S), () => {
1954
- b(void 0);
1974
+ registerOverlay: (b) => (S(b), () => {
1975
+ S(void 0);
1955
1976
  }),
1956
- registerSeparator: (S) => {
1957
- const P = C.current;
1958
- return P.separators = Ce(l, [
1959
- ...P.separators,
1960
- S
1977
+ registerSeparator: (b) => {
1978
+ const z = R.current;
1979
+ return z.separators = Ce(l, [
1980
+ ...z.separators,
1981
+ b
1961
1982
  ]), w(), () => {
1962
- P.separators = P.separators.filter(
1963
- (k) => k !== S
1983
+ z.separators = z.separators.filter(
1984
+ (M) => M !== b
1964
1985
  ), w();
1965
1986
  };
1966
1987
  },
1967
- updatePanelProps: (S, { disabled: P }) => {
1968
- const G = C.current.panels.find(
1969
- (oe) => oe.id === S
1988
+ updatePanelProps: (b, { disabled: z }) => {
1989
+ const A = R.current.panels.find(
1990
+ (oe) => oe.id === b
1970
1991
  );
1971
- G && (G.panelConstraints.disabled = P);
1972
- const $ = ft(g), Y = Q(g);
1973
- $ && Y && q($, {
1992
+ A && (A.panelConstraints.disabled = z);
1993
+ const $ = ft(m), Y = Q(m);
1994
+ $ && Y && X($, {
1974
1995
  ...Y,
1975
1996
  derivedPanelConstraints: Le($)
1976
1997
  });
1977
1998
  },
1978
- updateSeparatorProps: (S, {
1979
- disabled: P,
1980
- disableDoubleClick: k
1999
+ updateSeparatorProps: (b, {
2000
+ disabled: z,
2001
+ disableDoubleClick: M
1981
2002
  }) => {
1982
- const $ = C.current.separators.find(
1983
- (Y) => Y.id === S
2003
+ const $ = R.current.separators.find(
2004
+ (Y) => Y.id === b
1984
2005
  );
1985
- $ && ($.disabled = P, $.disableDoubleClick = k);
2006
+ $ && ($.disabled = z, $.disableDoubleClick = M);
1986
2007
  }
1987
2008
  }),
1988
- [I, g, w, l, M]
1989
- ), _ = O(null);
2009
+ [O, m, w, l, I]
2010
+ ), _ = T(null);
1990
2011
  return V(() => {
1991
- const S = E.current;
1992
- if (S === null)
2012
+ const b = C.current;
2013
+ if (b === null)
1993
2014
  return;
1994
- const P = C.current;
1995
- let k;
1996
- if (M.defaultLayout !== void 0 && Object.keys(M.defaultLayout).length === P.panels.length) {
1997
- k = {};
1998
- for (const J of P.panels) {
1999
- const pe = M.defaultLayout[J.id];
2000
- pe !== void 0 && (k[J.id] = pe);
2015
+ const z = R.current;
2016
+ let M;
2017
+ if (I.defaultLayout !== void 0 && Object.keys(I.defaultLayout).length === z.panels.length) {
2018
+ M = {};
2019
+ for (const J of z.panels) {
2020
+ const pe = I.defaultLayout[J.id];
2021
+ pe !== void 0 && (M[J.id] = pe);
2001
2022
  }
2002
2023
  }
2003
- const G = {
2024
+ const A = {
2004
2025
  disabled: !!r,
2005
- element: S,
2006
- id: g,
2026
+ element: b,
2027
+ id: m,
2007
2028
  mutableState: {
2008
- defaultLayout: k,
2009
- disableCursor: !!M.disableCursor,
2010
- expandedPanelSizes: C.current.lastExpandedPanelSizes,
2011
- layouts: C.current.layouts
2029
+ defaultLayout: M,
2030
+ disableCursor: !!I.disableCursor,
2031
+ expandedPanelSizes: R.current.lastExpandedPanelSizes,
2032
+ layouts: R.current.layouts
2012
2033
  },
2013
2034
  orientation: l,
2014
- panels: P.panels,
2035
+ panels: z.panels,
2015
2036
  resizePreviewMode: f,
2016
2037
  get resizeTargetMinimumSize() {
2017
- return M.resizeTargetMinimumSize;
2038
+ return I.resizeTargetMinimumSize;
2018
2039
  },
2019
- separators: P.separators
2040
+ separators: z.separators
2020
2041
  };
2021
- _.current = G;
2022
- const $ = rn(G), { defaultLayoutDeferred: Y, derivedPanelConstraints: oe, layout: le } = Q(G.id, !0);
2023
- !Y && oe.length > 0 && (v(le), m(le, !1));
2024
- const xe = Ee(g, (J) => {
2042
+ _.current = A;
2043
+ const $ = sn(A), { defaultLayoutDeferred: Y, derivedPanelConstraints: oe, layout: le } = Q(A.id, !0);
2044
+ !Y && oe.length > 0 && (v(le), h(le, !1));
2045
+ const xe = Ie(m, (J) => {
2025
2046
  const { defaultLayoutDeferred: pe, derivedPanelConstraints: Ge, layout: he } = J.next;
2026
2047
  if (pe || Ge.length === 0)
2027
2048
  return;
2028
- const St = G.panels.map(({ id: H }) => H).join(",");
2029
- G.mutableState.layouts[St] = he, Ge.forEach((H) => {
2049
+ const St = A.panels.map(({ id: H }) => H).join(",");
2050
+ A.mutableState.layouts[St] = he, Ge.forEach((H) => {
2030
2051
  if (H.collapsible) {
2031
2052
  const { layout: ze } = J.prev ?? {};
2032
2053
  if (ze) {
@@ -2037,43 +2058,43 @@ function dn({
2037
2058
  H.collapsedSize,
2038
2059
  ze[H.panelId]
2039
2060
  );
2040
- xt && !zt && (G.mutableState.expandedPanelSizes[H.panelId] = ze[H.panelId]);
2061
+ xt && !zt && (A.mutableState.expandedPanelSizes[H.panelId] = ze[H.panelId]);
2041
2062
  }
2042
2063
  }
2043
2064
  });
2044
- const Ae = X(), bt = Ae.state !== "active" || !Ae.hitRegions.some((H) => H.group === G);
2045
- v(he), bt && m(he, J.isUserInteraction);
2065
+ const Ae = q(), bt = Ae.state !== "active" || !Ae.hitRegions.some((H) => H.group === A);
2066
+ v(he), bt && h(he, J.isUserInteraction);
2046
2067
  });
2047
2068
  return () => {
2048
2069
  _.current = null, $(), xe();
2049
2070
  };
2050
2071
  }, [
2051
2072
  r,
2052
- g,
2053
2073
  m,
2074
+ h,
2054
2075
  v,
2055
2076
  l,
2056
- R,
2077
+ E,
2057
2078
  f,
2058
- M
2079
+ I
2059
2080
  ]), Se(() => {
2060
- const S = _.current;
2061
- S && (S.mutableState.defaultLayout = n, S.mutableState.disableCursor = !!o);
2062
- }), /* @__PURE__ */ U(yt.Provider, { value: N, children: /* @__PURE__ */ wt(
2081
+ const b = _.current;
2082
+ b && (b.mutableState.defaultLayout = n, b.mutableState.disableCursor = !!o);
2083
+ }), /* @__PURE__ */ B(yt.Provider, { value: G, children: /* @__PURE__ */ wt(
2063
2084
  "div",
2064
2085
  {
2065
- ...p,
2086
+ ...g,
2066
2087
  className: t,
2067
2088
  "data-group": !0,
2068
- "data-testid": g,
2069
- id: g,
2070
- ref: F,
2089
+ "data-testid": m,
2090
+ id: m,
2091
+ ref: N,
2071
2092
  style: {
2072
2093
  height: "100%",
2073
2094
  width: "100%",
2074
2095
  overflow: "hidden",
2075
2096
  position: f === "separator" ? "relative" : void 0,
2076
- ...d,
2097
+ ...p,
2077
2098
  display: "flex",
2078
2099
  flexDirection: l === "horizontal" ? "row" : "column",
2079
2100
  flexWrap: "nowrap",
@@ -2085,23 +2106,23 @@ function dn({
2085
2106
  },
2086
2107
  children: [
2087
2108
  e,
2088
- z.map((S) => /* @__PURE__ */ U(
2089
- cn,
2109
+ P.map((b) => /* @__PURE__ */ B(
2110
+ un,
2090
2111
  {
2091
2112
  overlay: x,
2092
- preview: S
2113
+ preview: b
2093
2114
  },
2094
- S.key
2115
+ b.key
2095
2116
  ))
2096
2117
  ]
2097
2118
  }
2098
2119
  ) });
2099
2120
  }
2100
- dn.displayName = "Group";
2121
+ pn.displayName = "Group";
2101
2122
  function ve(e, t) {
2102
2123
  return `react-resizable-panels:${[e, ...t].join(":")}`;
2103
2124
  }
2104
- function pn({
2125
+ function hn({
2105
2126
  id: e,
2106
2127
  panelIds: t,
2107
2128
  storage: n
@@ -2109,9 +2130,9 @@ function pn({
2109
2130
  const o = ve(e, []), r = n.getItem(o);
2110
2131
  if (r)
2111
2132
  try {
2112
- const s = JSON.parse(r);
2133
+ const i = JSON.parse(r);
2113
2134
  if (t) {
2114
- const i = t.join(","), u = s[i];
2135
+ const s = t.join(","), u = i[s];
2115
2136
  if (u && Array.isArray(u.layout) && t.length === u.layout.length) {
2116
2137
  const c = {};
2117
2138
  for (let a = 0; a < t.length; a++)
@@ -2119,11 +2140,11 @@ function pn({
2119
2140
  return c;
2120
2141
  }
2121
2142
  } else {
2122
- const i = Object.keys(s);
2123
- if (i.length === 1) {
2124
- const u = s[i[0]];
2143
+ const s = Object.keys(i);
2144
+ if (s.length === 1) {
2145
+ const u = i[s[0]];
2125
2146
  if (u && Array.isArray(u.layout)) {
2126
- const c = i[0].split(",");
2147
+ const c = s[0].split(",");
2127
2148
  if (c.length === u.layout.length) {
2128
2149
  const a = {};
2129
2150
  for (let l = 0; l < c.length; l++)
@@ -2136,69 +2157,69 @@ function pn({
2136
2157
  } catch {
2137
2158
  }
2138
2159
  }
2139
- function zn({
2160
+ function wn({
2140
2161
  debounceSaveMs: e = 100,
2141
2162
  onlySaveAfterUserInteractions: t,
2142
2163
  panelIds: n,
2143
2164
  storage: o = localStorage,
2144
2165
  ...r
2145
2166
  }) {
2146
- const s = n !== void 0, i = "id" in r ? r.id : r.groupId, u = ve(i, n ?? []), c = tt(
2147
- hn,
2167
+ const i = n !== void 0, s = "id" in r ? r.id : r.groupId, u = ve(s, n ?? []), c = nt(
2168
+ mn,
2148
2169
  () => o.getItem(u),
2149
2170
  () => o.getItem(u)
2150
2171
  ), a = Pe(() => {
2151
2172
  if (c) {
2152
- const v = JSON.parse(c), m = Object.values(v);
2153
- if (Array.from(m).every((g) => typeof g == "number"))
2173
+ const v = JSON.parse(c), h = Object.values(v);
2174
+ if (Array.from(h).every((m) => typeof m == "number"))
2154
2175
  return v;
2155
2176
  }
2156
2177
  }, [c]), l = Pe(() => {
2157
2178
  if (!a)
2158
- return pn({
2159
- id: i,
2179
+ return hn({
2180
+ id: s,
2160
2181
  panelIds: n,
2161
2182
  storage: o
2162
2183
  });
2163
- }, [a, i, n, o]), f = a ?? l, y = O(null), d = ce(() => {
2184
+ }, [a, s, n, o]), f = a ?? l, y = T(null), p = ce(() => {
2164
2185
  const v = y.current;
2165
2186
  v && (y.current = null, clearTimeout(v));
2166
2187
  }, []);
2167
- Qe(() => () => {
2168
- d();
2169
- }, [d]);
2170
- const p = ce(
2188
+ et(() => () => {
2189
+ p();
2190
+ }, [p]);
2191
+ const g = ce(
2171
2192
  // The hook persists every layout commit -- including library-driven ones --
2172
2193
  // because it owns its own storage and the goal is to remember whatever
2173
2194
  // layout the user is currently looking at. Consumers that only want to
2174
2195
  // persist on user interaction should branch on `isUserInteraction` in
2175
2196
  // their own callback (see #716) rather than via this hook.
2176
- (v, m) => {
2177
- if (t && !m.isUserInteraction)
2197
+ (v, h) => {
2198
+ if (t && !h.isUserInteraction)
2178
2199
  return;
2179
- d();
2180
- let g;
2181
- s ? g = ve(i, Object.keys(v)) : g = ve(i, []);
2200
+ p();
2201
+ let m;
2202
+ i ? m = ve(s, Object.keys(v)) : m = ve(s, []);
2182
2203
  try {
2183
- o.setItem(g, JSON.stringify(v));
2204
+ o.setItem(m, JSON.stringify(v));
2184
2205
  } catch (x) {
2185
2206
  console.error(x);
2186
2207
  }
2187
2208
  },
2188
2209
  [
2189
- d,
2190
- s,
2210
+ p,
2191
2211
  i,
2212
+ s,
2192
2213
  t,
2193
2214
  o
2194
2215
  ]
2195
- ), h = ce(
2216
+ ), d = ce(
2196
2217
  (v) => {
2197
- d(), e === 0 ? p(v, { isUserInteraction: !1 }) : y.current = setTimeout(() => {
2198
- p(v, { isUserInteraction: !1 });
2218
+ p(), e === 0 ? g(v, { isUserInteraction: !1 }) : y.current = setTimeout(() => {
2219
+ g(v, { isUserInteraction: !1 });
2199
2220
  }, e);
2200
2221
  },
2201
- [d, e, p]
2222
+ [p, e, g]
2202
2223
  );
2203
2224
  return {
2204
2225
  /**
@@ -2210,25 +2231,25 @@ function zn({
2210
2231
  *
2211
2232
  * @deprecated Use the {@link onLayoutChanged} prop instead.
2212
2233
  */
2213
- onLayoutChange: h,
2234
+ onLayoutChange: d,
2214
2235
  /**
2215
2236
  * Attach this callback on the `Group` as the `onLayoutChanged` prop.
2216
2237
  */
2217
- onLayoutChanged: p
2238
+ onLayoutChanged: g
2218
2239
  };
2219
2240
  }
2220
- function hn() {
2241
+ function mn() {
2221
2242
  return function() {
2222
2243
  };
2223
2244
  }
2224
- function wn() {
2245
+ function Pn() {
2225
2246
  return Z(null);
2226
2247
  }
2227
- function Pn() {
2228
- return O(null);
2248
+ function Ln() {
2249
+ return T(null);
2229
2250
  }
2230
- function mn(e, t) {
2231
- const { id: n } = be(), o = O({
2251
+ function gn(e, t) {
2252
+ const { id: n } = be(), o = T({
2232
2253
  collapse: we,
2233
2254
  expand: we,
2234
2255
  getSize: () => ({
@@ -2238,118 +2259,118 @@ function mn(e, t) {
2238
2259
  isCollapsed: () => !1,
2239
2260
  resize: we
2240
2261
  });
2241
- et(t, () => o.current, []), V(() => {
2262
+ tt(t, () => o.current, []), V(() => {
2242
2263
  Object.assign(
2243
2264
  o.current,
2244
2265
  ht({ groupId: n, panelId: e })
2245
2266
  );
2246
2267
  });
2247
2268
  }
2248
- function gn({
2269
+ function yn({
2249
2270
  children: e,
2250
2271
  className: t,
2251
2272
  collapsedSize: n = "0%",
2252
2273
  collapsedThreshold: o,
2253
2274
  collapsible: r = !1,
2254
- defaultSize: s,
2255
- disabled: i,
2275
+ defaultSize: i,
2276
+ disabled: s,
2256
2277
  elementRef: u,
2257
2278
  groupResizeBehavior: c = "preserve-relative-size",
2258
2279
  id: a,
2259
2280
  maxSize: l = "100%",
2260
2281
  minSize: f = "0%",
2261
2282
  onResize: y,
2262
- panelRef: d,
2263
- style: p,
2264
- ...h
2283
+ panelRef: p,
2284
+ style: g,
2285
+ ...d
2265
2286
  }) {
2266
- const v = !!a, m = Te(a), g = Oe({
2267
- disabled: i
2268
- }), x = O(null), b = De(x, u), {
2269
- getPanelStyles: z,
2270
- id: E,
2271
- orientation: R,
2287
+ const v = !!a, h = De(a), m = Ne({
2288
+ disabled: s
2289
+ }), x = T(null), S = Te(x, u), {
2290
+ getPanelStyles: P,
2291
+ id: C,
2292
+ orientation: E,
2272
2293
  registerPanel: w,
2273
- updatePanelProps: C
2274
- } = be(), F = y !== null, I = ue(
2275
- (S, P, k) => {
2276
- y?.(S, a, k);
2294
+ updatePanelProps: R
2295
+ } = be(), N = y !== null, O = ue(
2296
+ (b, z, M) => {
2297
+ y?.(b, a, M);
2277
2298
  }
2278
2299
  );
2279
2300
  V(() => {
2280
- const S = x.current;
2281
- if (S !== null) {
2282
- const P = {
2283
- element: S,
2284
- id: m,
2301
+ const b = x.current;
2302
+ if (b !== null) {
2303
+ const z = {
2304
+ element: b,
2305
+ id: h,
2285
2306
  idIsStable: v,
2286
2307
  mutableValues: {
2287
2308
  expandToSize: void 0,
2288
2309
  prevSize: void 0
2289
2310
  },
2290
- onResize: F ? I : void 0,
2311
+ onResize: N ? O : void 0,
2291
2312
  panelConstraints: {
2292
2313
  groupResizeBehavior: c,
2293
2314
  collapsedSize: n,
2294
2315
  collapsedThreshold: o,
2295
2316
  collapsible: r,
2296
- defaultSize: s,
2297
- disabled: g.disabled,
2317
+ defaultSize: i,
2318
+ disabled: m.disabled,
2298
2319
  maxSize: l,
2299
2320
  minSize: f
2300
2321
  }
2301
2322
  };
2302
- return w(P);
2323
+ return w(z);
2303
2324
  }
2304
2325
  }, [
2305
2326
  c,
2306
2327
  n,
2307
2328
  o,
2308
2329
  r,
2309
- s,
2310
- F,
2311
- m,
2330
+ i,
2331
+ N,
2332
+ h,
2312
2333
  v,
2313
2334
  l,
2314
2335
  f,
2315
- I,
2336
+ O,
2316
2337
  w,
2317
- g
2338
+ m
2318
2339
  ]), Se(() => {
2319
- C(m, { disabled: i });
2320
- }, [i, m, C]), mn(m, d);
2321
- const M = () => {
2322
- const S = z(E, m);
2323
- if (S)
2324
- return JSON.stringify(S);
2325
- }, N = tt(
2326
- (S) => Ee(E, S),
2327
- M,
2328
- M
2340
+ R(h, { disabled: s });
2341
+ }, [s, h, R]), gn(h, p);
2342
+ const I = () => {
2343
+ const b = P(C, h);
2344
+ if (b)
2345
+ return JSON.stringify(b);
2346
+ }, G = nt(
2347
+ (b) => Ie(C, b),
2348
+ I,
2349
+ I
2329
2350
  );
2330
2351
  let _;
2331
- return N ? _ = JSON.parse(N) : s !== void 0 ? _ = {
2352
+ return G ? _ = JSON.parse(G) : i !== void 0 ? _ = {
2332
2353
  flexGrow: void 0,
2333
2354
  flexShrink: void 0,
2334
- flexBasis: s
2335
- } : _ = { flexGrow: 1 }, /* @__PURE__ */ U(
2355
+ flexBasis: i
2356
+ } : _ = { flexGrow: 1 }, /* @__PURE__ */ B(
2336
2357
  "div",
2337
2358
  {
2338
- ...h,
2339
- "data-disabled": i || void 0,
2359
+ ...d,
2360
+ "data-disabled": s || void 0,
2340
2361
  "data-panel": !0,
2341
- "data-testid": m,
2342
- id: m,
2343
- ref: b,
2362
+ "data-testid": h,
2363
+ id: h,
2364
+ ref: S,
2344
2365
  style: {
2345
- ...yn,
2366
+ ...vn,
2346
2367
  display: "flex",
2347
2368
  flexBasis: 0,
2348
2369
  flexShrink: 1,
2349
2370
  overflow: "visible",
2350
2371
  ..._
2351
2372
  },
2352
- children: /* @__PURE__ */ U(
2373
+ children: /* @__PURE__ */ B(
2353
2374
  "div",
2354
2375
  {
2355
2376
  className: t,
@@ -2358,12 +2379,12 @@ function gn({
2358
2379
  maxWidth: "100%",
2359
2380
  flexGrow: 1,
2360
2381
  overflow: "auto",
2361
- ...p,
2382
+ ...g,
2362
2383
  // Inform the browser that the library is handling touch events for this element
2363
2384
  // but still allow users to scroll content within panels in the non-resizing direction
2364
2385
  // NOTE This is not an inherited style
2365
2386
  // See github.com/bvaughn/react-resizable-panels/issues/662
2366
- touchAction: R === "horizontal" ? "pan-y" : "pan-x"
2387
+ touchAction: E === "horizontal" ? "pan-y" : "pan-x"
2367
2388
  },
2368
2389
  children: e
2369
2390
  }
@@ -2371,8 +2392,8 @@ function gn({
2371
2392
  }
2372
2393
  );
2373
2394
  }
2374
- gn.displayName = "Panel";
2375
- const yn = {
2395
+ yn.displayName = "Panel";
2396
+ const vn = {
2376
2397
  minHeight: 0,
2377
2398
  maxHeight: "100%",
2378
2399
  height: "auto",
@@ -2384,27 +2405,27 @@ const yn = {
2384
2405
  padding: 0,
2385
2406
  margin: 0
2386
2407
  };
2387
- function Ln() {
2408
+ function Cn() {
2388
2409
  return Z(null);
2389
2410
  }
2390
- function Cn() {
2391
- return O(null);
2411
+ function Rn() {
2412
+ return T(null);
2392
2413
  }
2393
- function vn({
2414
+ function Sn({
2394
2415
  layout: e,
2395
2416
  panelConstraints: t,
2396
2417
  panelId: n,
2397
2418
  panelIndex: o
2398
2419
  }) {
2399
- let r, s;
2400
- const i = e[n], u = t.find(
2420
+ let r, i;
2421
+ const s = e[n], u = t.find(
2401
2422
  (c) => c.panelId === n
2402
2423
  );
2403
2424
  if (u) {
2404
2425
  const c = u.maxSize, a = u.collapsible ? u.collapsedSize : u.minSize, l = [o, o + 1];
2405
- s = ne({
2426
+ i = ne({
2406
2427
  layout: de({
2407
- delta: a - i,
2428
+ delta: a - s,
2408
2429
  initialLayout: e,
2409
2430
  panelConstraints: t,
2410
2431
  pivotIndices: l,
@@ -2413,7 +2434,7 @@ function vn({
2413
2434
  panelConstraints: t
2414
2435
  })[n], r = ne({
2415
2436
  layout: de({
2416
- delta: c - i,
2437
+ delta: c - s,
2417
2438
  initialLayout: e,
2418
2439
  panelConstraints: t,
2419
2440
  pivotIndices: l,
@@ -2425,42 +2446,42 @@ function vn({
2425
2446
  return {
2426
2447
  valueControls: n,
2427
2448
  valueMax: r,
2428
- valueMin: s,
2429
- valueNow: i
2449
+ valueMin: i,
2450
+ valueNow: s
2430
2451
  };
2431
2452
  }
2432
- function Sn({
2453
+ function bn({
2433
2454
  children: e,
2434
2455
  className: t,
2435
2456
  disabled: n,
2436
2457
  disableDoubleClick: o,
2437
2458
  elementRef: r,
2438
- id: s,
2439
- preview: i,
2459
+ id: i,
2460
+ preview: s,
2440
2461
  style: u,
2441
2462
  ...c
2442
2463
  }) {
2443
- const a = Te(s), l = Oe({
2464
+ const a = De(i), l = Ne({
2444
2465
  disabled: n,
2445
2466
  disableDoubleClick: o,
2446
2467
  children: e,
2447
2468
  className: t,
2448
- preview: i,
2469
+ preview: s,
2449
2470
  style: u
2450
- }), [f, y] = Z({}), [d, p] = Z("inactive"), [h, v] = Z(!1), m = O(null), g = O(null), x = De(m, r), {
2451
- disableCursor: b,
2452
- id: z,
2453
- orientation: E,
2454
- registerSeparator: R,
2471
+ }), [f, y] = Z({}), [p, g] = Z("inactive"), [d, v] = Z(!1), h = T(null), m = T(null), x = Te(h, r), {
2472
+ disableCursor: S,
2473
+ id: P,
2474
+ orientation: C,
2475
+ registerSeparator: E,
2455
2476
  updateSeparatorProps: w
2456
- } = be(), C = E === "horizontal" ? "vertical" : "horizontal";
2477
+ } = be(), R = C === "horizontal" ? "vertical" : "horizontal";
2457
2478
  V(() => {
2458
- const M = m.current;
2459
- if (M !== null) {
2460
- const N = {
2479
+ const I = h.current;
2480
+ if (I !== null) {
2481
+ const G = {
2461
2482
  disabled: l.disabled,
2462
2483
  disableDoubleClick: l.disableDoubleClick,
2463
- element: M,
2484
+ element: I,
2464
2485
  id: a,
2465
2486
  get children() {
2466
2487
  return l.children;
@@ -2475,27 +2496,27 @@ function Sn({
2475
2496
  return l.style;
2476
2497
  }
2477
2498
  };
2478
- g.current = N;
2479
- const _ = R(N), S = ot(
2480
- (k) => {
2481
- p(
2482
- k.next.state !== "inactive" && k.next.hitRegions.some(
2483
- (G) => G.separator === N
2484
- ) ? k.next.state : "inactive"
2499
+ m.current = G;
2500
+ const _ = E(G), b = rt(
2501
+ (M) => {
2502
+ g(
2503
+ M.next.state !== "inactive" && M.next.hitRegions.some(
2504
+ (A) => A.separator === G
2505
+ ) ? M.next.state : "inactive"
2485
2506
  );
2486
2507
  }
2487
- ), P = Ee(
2488
- z,
2489
- (k) => {
2490
- const { derivedPanelConstraints: G, layout: $, separatorToPanels: Y } = k.next, oe = Y.get(N);
2508
+ ), z = Ie(
2509
+ P,
2510
+ (M) => {
2511
+ const { derivedPanelConstraints: A, layout: $, separatorToPanels: Y } = M.next, oe = Y.get(G);
2491
2512
  if (oe) {
2492
- const le = oe[0], xe = G.findIndex(
2513
+ const le = oe[0], xe = A.findIndex(
2493
2514
  (J) => J.panelId === le.id
2494
2515
  );
2495
2516
  y(
2496
- vn({
2517
+ Sn({
2497
2518
  layout: $,
2498
- panelConstraints: G,
2519
+ panelConstraints: A,
2499
2520
  panelId: le.id,
2500
2521
  panelIndex: xe
2501
2522
  })
@@ -2504,42 +2525,42 @@ function Sn({
2504
2525
  }
2505
2526
  );
2506
2527
  return () => {
2507
- g.current = null, S(), P(), _();
2528
+ m.current = null, b(), z(), _();
2508
2529
  };
2509
2530
  }
2510
- }, [z, a, R, l]), V(() => {
2511
- const M = g.current;
2512
- M && Ot(M);
2513
- }, [i]), Se(() => {
2531
+ }, [P, a, E, l]), V(() => {
2532
+ const I = m.current;
2533
+ I && Tt(I);
2534
+ }, [s]), Se(() => {
2514
2535
  w(a, { disabled: n, disableDoubleClick: o });
2515
2536
  }, [n, o, a, w]);
2516
- let F;
2517
- n && !b && (F = "not-allowed");
2518
- let I;
2537
+ let N;
2538
+ n && !S && (N = "not-allowed");
2539
+ let O;
2519
2540
  if (n)
2520
- I = "disabled";
2541
+ O = "disabled";
2521
2542
  else
2522
- switch (d) {
2543
+ switch (p) {
2523
2544
  case "active": {
2524
- I = "active";
2545
+ O = "active";
2525
2546
  break;
2526
2547
  }
2527
2548
  default:
2528
- h ? I = "focus" : I = d;
2549
+ d ? O = "focus" : O = p;
2529
2550
  }
2530
- return /* @__PURE__ */ U(
2551
+ return /* @__PURE__ */ B(
2531
2552
  "div",
2532
2553
  {
2533
2554
  ...c,
2534
2555
  "aria-controls": f.valueControls,
2535
2556
  "aria-disabled": n || void 0,
2536
- "aria-orientation": C,
2557
+ "aria-orientation": R,
2537
2558
  "aria-valuemax": f.valueMax,
2538
2559
  "aria-valuemin": f.valueMin,
2539
2560
  "aria-valuenow": f.valueNow,
2540
2561
  children: e,
2541
2562
  className: t,
2542
- "data-separator": I,
2563
+ "data-separator": O,
2543
2564
  "data-testid": a,
2544
2565
  id: a,
2545
2566
  onBlur: () => v(!1),
@@ -2548,7 +2569,7 @@ function Sn({
2548
2569
  role: "separator",
2549
2570
  style: {
2550
2571
  flexBasis: "auto",
2551
- cursor: F,
2572
+ cursor: N,
2552
2573
  ...u,
2553
2574
  flexGrow: 0,
2554
2575
  flexShrink: 0,
@@ -2560,17 +2581,17 @@ function Sn({
2560
2581
  }
2561
2582
  );
2562
2583
  }
2563
- Sn.displayName = "Separator";
2584
+ bn.displayName = "Separator";
2564
2585
  export {
2565
- dn as Group,
2566
- gn as Panel,
2567
- Sn as Separator,
2586
+ pn as Group,
2587
+ yn as Panel,
2588
+ bn as Separator,
2568
2589
  vt as SeparatorOverlay,
2569
2590
  Ht as isCoarsePointer,
2570
- zn as useDefaultLayout,
2571
- wn as useGroupCallbackRef,
2572
- Pn as useGroupRef,
2573
- Ln as usePanelCallbackRef,
2574
- Cn as usePanelRef
2591
+ wn as useDefaultLayout,
2592
+ Pn as useGroupCallbackRef,
2593
+ Ln as useGroupRef,
2594
+ Cn as usePanelCallbackRef,
2595
+ Rn as usePanelRef
2575
2596
  };
2576
2597
  //# sourceMappingURL=react-resizable-panels.js.map