@window-splitter/vue 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { defineComponent as be, useId as Ie, inject as X, computed as $, onMounted as G, watchEffect as ue, onUnmounted as Be, createElementBlock as ye, openBlock as Pe, normalizeProps as je, guardReactiveProps as We, renderSlot as Se, createPropsRestProxy as Ee, ref as me, provide as ie, onWatcherCleanup as Ue, mergeProps as Ke, unref as Ge } from "vue";
2
- var Xe = 20, Ye = 1, J = 1e6, Je = 1e6, Qe = -7, Ze = 21, _e = !1, ne = "[big.js] ", j = ne + "Invalid ", fe = j + "decimal places", et = j + "rounding mode", Ne = ne + "Division by zero", I = {}, N = void 0, tt = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;
1
+ import { defineComponent as be, useId as Ie, inject as X, computed as H, onMounted as G, watchEffect as ue, onUnmounted as Be, createElementBlock as ye, openBlock as Pe, normalizeProps as We, guardReactiveProps as Ue, renderSlot as Se, createPropsRestProxy as Ee, ref as me, provide as ie, onWatcherCleanup as Ge, mergeProps as Ke, unref as Xe } from "vue";
2
+ var Ye = 20, Je = 1, J = 1e6, Qe = 1e6, Ze = -7, _e = 21, et = !1, ne = "[big.js] ", W = ne + "Invalid ", fe = W + "decimal places", tt = W + "rounding mode", Ne = ne + "Division by zero", I = {}, N = void 0, nt = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;
3
3
  function Oe() {
4
4
  function e(t) {
5
5
  var a = this;
@@ -9,19 +9,19 @@ function Oe() {
9
9
  else {
10
10
  if (typeof t != "string") {
11
11
  if (e.strict === !0 && typeof t != "bigint")
12
- throw TypeError(j + "value");
12
+ throw TypeError(W + "value");
13
13
  t = t === 0 && 1 / t < 0 ? "-0" : String(t);
14
14
  }
15
- nt(a, t);
15
+ at(a, t);
16
16
  }
17
17
  a.constructor = e;
18
18
  }
19
- return e.prototype = I, e.DP = Xe, e.RM = Ye, e.NE = Qe, e.PE = Ze, e.strict = _e, e.roundDown = 0, e.roundHalfUp = 1, e.roundHalfEven = 2, e.roundUp = 3, e;
19
+ return e.prototype = I, e.DP = Ye, e.RM = Je, e.NE = Ze, e.PE = _e, e.strict = et, e.roundDown = 0, e.roundHalfUp = 1, e.roundHalfEven = 2, e.roundUp = 3, e;
20
20
  }
21
- function nt(e, t) {
21
+ function at(e, t) {
22
22
  var a, r, l;
23
- if (!tt.test(t))
24
- throw Error(j + "number");
23
+ if (!nt.test(t))
24
+ throw Error(W + "number");
25
25
  for (e.s = t.charAt(0) == "-" ? (t = t.slice(1), -1) : 1, (a = t.indexOf(".")) > -1 && (t = t.replace(".", "")), (r = t.search(/e/i)) > 0 ? (a < 0 && (a = r), a += +t.slice(r + 1), t = t.substring(0, r)) : a < 0 && (a = t.length), l = t.length, r = 0; r < l && t.charAt(r) == "0"; ) ++r;
26
26
  if (r == l)
27
27
  e.c = [e.e = 0];
@@ -31,10 +31,10 @@ function nt(e, t) {
31
31
  }
32
32
  return e;
33
33
  }
34
- function W(e, t, a, r) {
34
+ function U(e, t, a, r) {
35
35
  var l = e.c;
36
36
  if (a === N && (a = e.constructor.RM), a !== 0 && a !== 1 && a !== 2 && a !== 3)
37
- throw Error(et);
37
+ throw Error(tt);
38
38
  if (t < 1)
39
39
  r = a === 3 && (r || !!l[0]) || t === 0 && (a === 1 && l[0] >= 5 || a === 2 && (l[0] > 5 || l[0] === 5 && (r || l[1] !== N))), l.length = 1, r ? (e.e = e.e - t + 1, l[0] = 1) : l[0] = e.e = 0;
40
40
  else if (t < l.length) {
@@ -68,13 +68,13 @@ I.abs = function() {
68
68
  return e.s = 1, e;
69
69
  };
70
70
  I.cmp = function(e) {
71
- var t, a = this, r = a.c, l = (e = new a.constructor(e)).c, n = a.s, i = e.s, o = a.e, u = e.e;
71
+ var t, a = this, r = a.c, l = (e = new a.constructor(e)).c, n = a.s, i = e.s, u = a.e, d = e.e;
72
72
  if (!r[0] || !l[0]) return r[0] ? n : l[0] ? -i : 0;
73
73
  if (n != i) return n;
74
- if (t = n < 0, o != u) return o > u ^ t ? 1 : -1;
75
- for (i = (o = r.length) < (u = l.length) ? o : u, n = -1; ++n < i; )
74
+ if (t = n < 0, u != d) return u > d ^ t ? 1 : -1;
75
+ for (i = (u = r.length) < (d = l.length) ? u : d, n = -1; ++n < i; )
76
76
  if (r[n] != l[n]) return r[n] > l[n] ^ t ? 1 : -1;
77
- return o == u ? 0 : o > u ^ t ? 1 : -1;
77
+ return u == d ? 0 : u > d ^ t ? 1 : -1;
78
78
  };
79
79
  I.div = function(e) {
80
80
  var t = this, a = t.constructor, r = t.c, l = (e = new a(e)).c, n = t.s == e.s ? 1 : -1, i = a.DP;
@@ -84,33 +84,33 @@ I.div = function(e) {
84
84
  throw Error(Ne);
85
85
  if (!r[0])
86
86
  return e.s = n, e.c = [e.e = 0], e;
87
- var o, u, d, c, m, s = l.slice(), f = o = l.length, h = r.length, p = r.slice(0, o), v = p.length, g = e, z = g.c = [], C = 0, x = i + (g.e = t.e - e.e) + 1;
88
- for (g.s = n, n = x < 0 ? 0 : x, s.unshift(0); v++ < o; ) p.push(0);
87
+ var u, d, c, s, m, o = l.slice(), f = u = l.length, h = r.length, p = r.slice(0, u), v = p.length, g = e, z = g.c = [], y = 0, x = i + (g.e = t.e - e.e) + 1;
88
+ for (g.s = n, n = x < 0 ? 0 : x, o.unshift(0); v++ < u; ) p.push(0);
89
89
  do {
90
- for (d = 0; d < 10; d++) {
91
- if (o != (v = p.length))
92
- c = o > v ? 1 : -1;
90
+ for (c = 0; c < 10; c++) {
91
+ if (u != (v = p.length))
92
+ s = u > v ? 1 : -1;
93
93
  else
94
- for (m = -1, c = 0; ++m < o; )
94
+ for (m = -1, s = 0; ++m < u; )
95
95
  if (l[m] != p[m]) {
96
- c = l[m] > p[m] ? 1 : -1;
96
+ s = l[m] > p[m] ? 1 : -1;
97
97
  break;
98
98
  }
99
- if (c < 0) {
100
- for (u = v == o ? l : s; v; ) {
101
- if (p[--v] < u[v]) {
99
+ if (s < 0) {
100
+ for (d = v == u ? l : o; v; ) {
101
+ if (p[--v] < d[v]) {
102
102
  for (m = v; m && !p[--m]; ) p[m] = 9;
103
103
  --p[m], p[v] += 10;
104
104
  }
105
- p[v] -= u[v];
105
+ p[v] -= d[v];
106
106
  }
107
107
  for (; !p[0]; ) p.shift();
108
108
  } else
109
109
  break;
110
110
  }
111
- z[C++] = c ? d : ++d, p[0] && c ? p[v] = r[f] || 0 : p = [r[f]];
111
+ z[y++] = s ? c : ++c, p[0] && s ? p[v] = r[f] || 0 : p = [r[f]];
112
112
  } while ((f++ < h || p[0] !== N) && n--);
113
- return !z[0] && C != 1 && (z.shift(), g.e--, x--), C > x && W(g, x, a.RM, p[0] !== N), g;
113
+ return !z[0] && y != 1 && (z.shift(), g.e--, x--), y > x && U(g, x, a.RM, p[0] !== N), g;
114
114
  };
115
115
  I.eq = function(e) {
116
116
  return this.cmp(e) === 0;
@@ -128,33 +128,33 @@ I.lte = function(e) {
128
128
  return this.cmp(e) < 1;
129
129
  };
130
130
  I.minus = I.sub = function(e) {
131
- var t, a, r, l, n = this, i = n.constructor, o = n.s, u = (e = new i(e)).s;
132
- if (o != u)
133
- return e.s = -u, n.plus(e);
134
- var d = n.c.slice(), c = n.e, m = e.c, s = e.e;
135
- if (!d[0] || !m[0])
136
- return m[0] ? e.s = -u : d[0] ? e = new i(n) : e.s = 1, e;
137
- if (o = c - s) {
138
- for ((l = o < 0) ? (o = -o, r = d) : (s = c, r = m), r.reverse(), u = o; u--; ) r.push(0);
131
+ var t, a, r, l, n = this, i = n.constructor, u = n.s, d = (e = new i(e)).s;
132
+ if (u != d)
133
+ return e.s = -d, n.plus(e);
134
+ var c = n.c.slice(), s = n.e, m = e.c, o = e.e;
135
+ if (!c[0] || !m[0])
136
+ return m[0] ? e.s = -d : c[0] ? e = new i(n) : e.s = 1, e;
137
+ if (u = s - o) {
138
+ for ((l = u < 0) ? (u = -u, r = c) : (o = s, r = m), r.reverse(), d = u; d--; ) r.push(0);
139
139
  r.reverse();
140
140
  } else
141
- for (a = ((l = d.length < m.length) ? d : m).length, o = u = 0; u < a; u++)
142
- if (d[u] != m[u]) {
143
- l = d[u] < m[u];
141
+ for (a = ((l = c.length < m.length) ? c : m).length, u = d = 0; d < a; d++)
142
+ if (c[d] != m[d]) {
143
+ l = c[d] < m[d];
144
144
  break;
145
145
  }
146
- if (l && (r = d, d = m, m = r, e.s = -e.s), (u = (a = m.length) - (t = d.length)) > 0) for (; u--; ) d[t++] = 0;
147
- for (u = t; a > o; ) {
148
- if (d[--a] < m[a]) {
149
- for (t = a; t && !d[--t]; ) d[t] = 9;
150
- --d[t], d[a] += 10;
146
+ if (l && (r = c, c = m, m = r, e.s = -e.s), (d = (a = m.length) - (t = c.length)) > 0) for (; d--; ) c[t++] = 0;
147
+ for (d = t; a > u; ) {
148
+ if (c[--a] < m[a]) {
149
+ for (t = a; t && !c[--t]; ) c[t] = 9;
150
+ --c[t], c[a] += 10;
151
151
  }
152
- d[a] -= m[a];
152
+ c[a] -= m[a];
153
153
  }
154
- for (; d[--u] === 0; ) d.pop();
155
- for (; d[0] === 0; )
156
- d.shift(), --s;
157
- return d[0] || (e.s = 1, d = [s = 0]), e.c = d, e.e = s, e;
154
+ for (; c[--d] === 0; ) c.pop();
155
+ for (; c[0] === 0; )
156
+ c.shift(), --o;
157
+ return c[0] || (e.s = 1, c = [o = 0]), e.c = c, e.e = o, e;
158
158
  };
159
159
  I.mod = function(e) {
160
160
  var t, a = this, r = a.constructor, l = a.s, n = (e = new r(e)).s;
@@ -170,58 +170,58 @@ I.plus = I.add = function(e) {
170
170
  var t, a, r, l = this, n = l.constructor;
171
171
  if (e = new n(e), l.s != e.s)
172
172
  return e.s = -e.s, l.minus(e);
173
- var i = l.e, o = l.c, u = e.e, d = e.c;
174
- if (!o[0] || !d[0])
175
- return d[0] || (o[0] ? e = new n(l) : e.s = l.s), e;
176
- if (o = o.slice(), t = i - u) {
177
- for (t > 0 ? (u = i, r = d) : (t = -t, r = o), r.reverse(); t--; ) r.push(0);
173
+ var i = l.e, u = l.c, d = e.e, c = e.c;
174
+ if (!u[0] || !c[0])
175
+ return c[0] || (u[0] ? e = new n(l) : e.s = l.s), e;
176
+ if (u = u.slice(), t = i - d) {
177
+ for (t > 0 ? (d = i, r = c) : (t = -t, r = u), r.reverse(); t--; ) r.push(0);
178
178
  r.reverse();
179
179
  }
180
- for (o.length - d.length < 0 && (r = d, d = o, o = r), t = d.length, a = 0; t; o[t] %= 10) a = (o[--t] = o[t] + d[t] + a) / 10 | 0;
181
- for (a && (o.unshift(a), ++u), t = o.length; o[--t] === 0; ) o.pop();
182
- return e.c = o, e.e = u, e;
180
+ for (u.length - c.length < 0 && (r = c, c = u, u = r), t = c.length, a = 0; t; u[t] %= 10) a = (u[--t] = u[t] + c[t] + a) / 10 | 0;
181
+ for (a && (u.unshift(a), ++d), t = u.length; u[--t] === 0; ) u.pop();
182
+ return e.c = u, e.e = d, e;
183
183
  };
184
184
  I.pow = function(e) {
185
185
  var t = this, a = new t.constructor("1"), r = a, l = e < 0;
186
- if (e !== ~~e || e < -1e6 || e > Je)
187
- throw Error(j + "exponent");
186
+ if (e !== ~~e || e < -1e6 || e > Qe)
187
+ throw Error(W + "exponent");
188
188
  for (l && (e = -e); e & 1 && (r = r.times(t)), e >>= 1, !!e; )
189
189
  t = t.times(t);
190
190
  return l ? a.div(r) : r;
191
191
  };
192
192
  I.prec = function(e, t) {
193
193
  if (e !== ~~e || e < 1 || e > J)
194
- throw Error(j + "precision");
195
- return W(new this.constructor(this), e, t);
194
+ throw Error(W + "precision");
195
+ return U(new this.constructor(this), e, t);
196
196
  };
197
197
  I.round = function(e, t) {
198
198
  if (e === N) e = 0;
199
199
  else if (e !== ~~e || e < -1e6 || e > J)
200
200
  throw Error(fe);
201
- return W(new this.constructor(this), e + this.e + 1, t);
201
+ return U(new this.constructor(this), e + this.e + 1, t);
202
202
  };
203
203
  I.sqrt = function() {
204
- var e, t, a, r = this, l = r.constructor, n = r.s, i = r.e, o = new l("0.5");
204
+ var e, t, a, r = this, l = r.constructor, n = r.s, i = r.e, u = new l("0.5");
205
205
  if (!r.c[0]) return new l(r);
206
206
  if (n < 0)
207
207
  throw Error(ne + "No square root");
208
208
  n = Math.sqrt(r + ""), n === 0 || n === 1 / 0 ? (t = r.c.join(""), t.length + i & 1 || (t += "0"), n = Math.sqrt(t), i = ((i + 1) / 2 | 0) - (i < 0 || i & 1), e = new l((n == 1 / 0 ? "5e" : (n = n.toExponential()).slice(0, n.indexOf("e") + 1)) + i)) : e = new l(n + ""), i = e.e + (l.DP += 4);
209
209
  do
210
- a = e, e = o.times(a.plus(r.div(a)));
210
+ a = e, e = u.times(a.plus(r.div(a)));
211
211
  while (a.c.slice(0, i).join("") !== e.c.slice(0, i).join(""));
212
- return W(e, (l.DP -= 4) + e.e + 1, l.RM);
212
+ return U(e, (l.DP -= 4) + e.e + 1, l.RM);
213
213
  };
214
214
  I.times = I.mul = function(e) {
215
- var t, a = this, r = a.constructor, l = a.c, n = (e = new r(e)).c, i = l.length, o = n.length, u = a.e, d = e.e;
215
+ var t, a = this, r = a.constructor, l = a.c, n = (e = new r(e)).c, i = l.length, u = n.length, d = a.e, c = e.e;
216
216
  if (e.s = a.s == e.s ? 1 : -1, !l[0] || !n[0])
217
217
  return e.c = [e.e = 0], e;
218
- for (e.e = u + d, i < o && (t = l, l = n, n = t, d = i, i = o, o = d), t = new Array(d = i + o); d--; ) t[d] = 0;
219
- for (u = o; u--; ) {
220
- for (o = 0, d = i + u; d > u; )
221
- o = t[d] + n[u] * l[d - u - 1] + o, t[d--] = o % 10, o = o / 10 | 0;
222
- t[d] = o;
218
+ for (e.e = d + c, i < u && (t = l, l = n, n = t, c = i, i = u, u = c), t = new Array(c = i + u); c--; ) t[c] = 0;
219
+ for (d = u; d--; ) {
220
+ for (u = 0, c = i + d; c > d; )
221
+ u = t[c] + n[d] * l[c - d - 1] + u, t[c--] = u % 10, u = u / 10 | 0;
222
+ t[c] = u;
223
223
  }
224
- for (o ? ++e.e : t.shift(), u = t.length; !t[--u]; ) t.pop();
224
+ for (u ? ++e.e : t.shift(), d = t.length; !t[--d]; ) t.pop();
225
225
  return e.c = t, e;
226
226
  };
227
227
  I.toExponential = function(e, t) {
@@ -229,7 +229,7 @@ I.toExponential = function(e, t) {
229
229
  if (e !== N) {
230
230
  if (e !== ~~e || e < 0 || e > J)
231
231
  throw Error(fe);
232
- for (a = W(new a.constructor(a), ++e, t); a.c.length < e; ) a.c.push(0);
232
+ for (a = U(new a.constructor(a), ++e, t); a.c.length < e; ) a.c.push(0);
233
233
  }
234
234
  return Q(a, !0, !!r);
235
235
  };
@@ -238,7 +238,7 @@ I.toFixed = function(e, t) {
238
238
  if (e !== N) {
239
239
  if (e !== ~~e || e < 0 || e > J)
240
240
  throw Error(fe);
241
- for (a = W(new a.constructor(a), e + a.e + 1, t), e = e + a.e + 1; a.c.length < e; ) a.c.push(0);
241
+ for (a = U(new a.constructor(a), e + a.e + 1, t), e = e + a.e + 1; a.c.length < e; ) a.c.push(0);
242
242
  }
243
243
  return Q(a, !1, !!r);
244
244
  };
@@ -256,8 +256,8 @@ I.toPrecision = function(e, t) {
256
256
  var a = this, r = a.constructor, l = a.c[0];
257
257
  if (e !== N) {
258
258
  if (e !== ~~e || e < 1 || e > J)
259
- throw Error(j + "precision");
260
- for (a = W(new r(a), e, t); a.c.length < e; ) a.c.push(0);
259
+ throw Error(W + "precision");
260
+ for (a = U(new r(a), e, t); a.c.length < e; ) a.c.push(0);
261
261
  }
262
262
  return Q(a, e <= a.e || a.e <= r.NE || a.e >= r.PE, !!l);
263
263
  };
@@ -268,7 +268,7 @@ I.valueOf = function() {
268
268
  return Q(e, e.e <= t.NE || e.e >= t.PE, !0);
269
269
  };
270
270
  var b = Oe();
271
- function at(e, t) {
271
+ function rt(e, t) {
272
272
  e.forEach((a) => {
273
273
  try {
274
274
  t(a);
@@ -278,7 +278,7 @@ function at(e, t) {
278
278
  });
279
279
  }
280
280
  let _ = 0;
281
- function rt() {
281
+ function lt() {
282
282
  let e = /* @__PURE__ */ new Set(), t = e;
283
283
  return {
284
284
  add(a) {
@@ -288,43 +288,43 @@ function rt() {
288
288
  return _ -= t == e && e.has(a) ? 1 : 0, e.delete(a);
289
289
  },
290
290
  flush(a) {
291
- t.size && (e = /* @__PURE__ */ new Set(), _ -= t.size, at(t, (r) => r(a) && e.add(r)), _ += e.size, t = e);
291
+ t.size && (e = /* @__PURE__ */ new Set(), _ -= t.size, rt(t, (r) => r(a) && e.add(r)), _ += e.size, t = e);
292
292
  }
293
293
  };
294
294
  }
295
- const He = rt(), $e = typeof window < "u" ? window.requestAnimationFrame : () => {
296
- }, ae = (e) => lt(e, He);
295
+ const He = lt(), $e = typeof window < "u" ? window.requestAnimationFrame : () => {
296
+ }, ae = (e) => it(e, He);
297
297
  ae.now = typeof performance < "u" ? () => performance.now() : Date.now;
298
298
  ae.batchedUpdates = (e) => e();
299
- let F = -1;
300
- function lt(e, t) {
301
- t.add(e), it();
302
- }
303
- function it() {
304
- F < 0 && (F = 0, $e(Le));
299
+ let T = -1;
300
+ function it(e, t) {
301
+ t.add(e), ot();
305
302
  }
306
303
  function ot() {
307
- F = -1;
304
+ T < 0 && (T = 0, $e(Le));
305
+ }
306
+ function st() {
307
+ T = -1;
308
308
  }
309
309
  function Le() {
310
- ~F && ($e(Le), ae.batchedUpdates(st));
310
+ ~T && ($e(Le), ae.batchedUpdates(ut));
311
311
  }
312
- function st() {
313
- const e = F;
314
- if (F = ae.now(), !_) {
315
- ot();
312
+ function ut() {
313
+ const e = T;
314
+ if (T = ae.now(), !_) {
315
+ st();
316
316
  return;
317
317
  }
318
- He.flush(e ? Math.min(64, F - e) : 16.667);
318
+ He.flush(e ? Math.min(64, T - e) : 16.667);
319
319
  }
320
320
  const xe = 50;
321
- function ut(e) {
321
+ function ct(e) {
322
322
  return { type: "percent", value: new b(e) };
323
323
  }
324
- function L(e) {
324
+ function $(e) {
325
325
  return { type: "pixel", value: new b(e) };
326
326
  }
327
- function ct(e) {
327
+ function dt(e) {
328
328
  let t = he.linear, a = 300;
329
329
  return e.collapseAnimation && (typeof e.collapseAnimation == "string" ? t = he[e.collapseAnimation] : (a = e.collapseAnimation.duration, t = typeof e.collapseAnimation.easing == "function" ? e.collapseAnimation.easing : he[e.collapseAnimation.easing])), { ease: t, duration: a };
330
330
  }
@@ -342,28 +342,28 @@ const he = {
342
342
  function Ve(e) {
343
343
  return e.orientation === "horizontal" ? e.dragOvershoot.gt(0) ? "w-resize" : e.dragOvershoot.lt(0) ? "e-resize" : "ew-resize" : e.dragOvershoot.gt(0) ? "n-resize" : e.dragOvershoot.lt(0) ? "s-resize" : "ns-resize";
344
344
  }
345
- function dt(e) {
345
+ function ft(e) {
346
346
  if ("context" in e && (e = e.context), "items" in e) {
347
347
  e.dragOvershoot = new b(e.dragOvershoot || 0);
348
348
  for (const t of e.items)
349
- y(t) ? (t.currentValue.value = new b(t.currentValue.value), t.collapsedSize.value = new b(t.collapsedSize.value), t.min.value = new b(t.min.value), t.default && (t.default.value = new b(t.default.value)), t.max && t.max !== "1fr" && (t.max.value = new b(t.max.value))) : t.size.value = new b(t.size.value);
349
+ P(t) ? (t.currentValue.value = new b(t.currentValue.value), t.collapsedSize.value = new b(t.collapsedSize.value), t.min.value = new b(t.min.value), t.default && (t.default.value = new b(t.default.value)), t.max && t.max !== "1fr" && (t.max.value = new b(t.max.value))) : t.size.value = new b(t.size.value);
350
350
  return e;
351
351
  }
352
352
  }
353
- function T(e, t) {
353
+ function j(e, t) {
354
354
  if (!e)
355
355
  throw new Error(t);
356
356
  }
357
357
  function Z(e, t) {
358
- T(t.includes(e.type), `Invalid event type: ${t}. Expected: ${t.join(" | ")}`);
358
+ j(t.includes(e.type), `Invalid event type: ${t}. Expected: ${t.join(" | ")}`);
359
359
  }
360
- function y(e) {
360
+ function P(e) {
361
361
  return !!(e && typeof e == "object" && "type" in e && e.type === "panel");
362
362
  }
363
- function k(e) {
363
+ function R(e) {
364
364
  return !!(e && typeof e == "object" && "type" in e && e.type === "handle");
365
365
  }
366
- function ft(e) {
366
+ function pt(e) {
367
367
  const t = () => {
368
368
  let r = null;
369
369
  return (l) => {
@@ -377,77 +377,77 @@ function ft(e) {
377
377
  };
378
378
  return { ...{
379
379
  type: "panel",
380
- min: q(e.min || "0px"),
381
- max: e.max ? q(e.max) : "1fr",
380
+ min: F(e.min || "0px"),
381
+ max: e.max ? F(e.max) : "1fr",
382
382
  collapsed: e.collapsible ? e.collapsed ?? e.defaultCollapsed ?? !1 : void 0,
383
383
  collapsible: e.collapsible,
384
- collapsedSize: q(e.collapsedSize ?? "0px"),
384
+ collapsedSize: F(e.collapsedSize ?? "0px"),
385
385
  onCollapseChange: e.onCollapseChange,
386
386
  onResize: { current: t() },
387
387
  collapseIsControlled: typeof e.collapsed < "u",
388
388
  sizeBeforeCollapse: void 0,
389
389
  id: e.id,
390
390
  collapseAnimation: e.collapseAnimation,
391
- default: e.default ? q(e.default) : void 0,
391
+ default: e.default ? F(e.default) : void 0,
392
392
  isStaticAtRest: e.isStaticAtRest
393
- }, currentValue: L(-1) };
393
+ }, currentValue: $(-1) };
394
394
  }
395
395
  function ee(e, t) {
396
396
  return e.type === t.type && e.value.eq(t.value);
397
397
  }
398
- function pt(e, t) {
398
+ function mt(e, t) {
399
399
  return !!(!t || !ee(e.min, t.min) || e.max === "1fr" && t.max !== "1fr" || e.max !== "1fr" && t.max === "1fr" || e.max !== "1fr" && t.max !== "1fr" && !ee(e.max, t.max) || e.default && !t.default || !e.default && t.default || e.default && t.default && !ee(e.default, t.default) || !ee(e.collapsedSize, t.collapsedSize) || e.isStaticAtRest !== t.isStaticAtRest || e.collapseAnimation && !t.collapseAnimation || !e.collapseAnimation && t.collapseAnimation || typeof e.collapseAnimation == "string" && typeof t.collapseAnimation == "string" && e.collapseAnimation !== t.collapseAnimation || typeof e.collapseAnimation == "object" && typeof t.collapseAnimation == "object" && (e.collapseAnimation.duration !== t.collapseAnimation.duration || e.collapseAnimation.easing !== t.collapseAnimation.easing) || e.collapsible !== t.collapsible);
400
400
  }
401
- function mt(e, t) {
401
+ function ht(e, t) {
402
402
  return !t || !ee(e.size, t.size);
403
403
  }
404
- function ht(e) {
404
+ function gt(e) {
405
405
  return {
406
406
  type: "handle",
407
407
  ...e,
408
- size: typeof e.size == "string" ? q(e.size) : e.size
408
+ size: typeof e.size == "string" ? F(e.size) : e.size
409
409
  };
410
410
  }
411
- function q(e) {
411
+ function F(e) {
412
412
  if (e === "1fr" && (e = "100%"), e.endsWith("px"))
413
- return L(parseFloat(e));
413
+ return $(parseFloat(e));
414
414
  if (e.endsWith("%"))
415
- return ut(parseFloat(e) / 100);
415
+ return ct(parseFloat(e) / 100);
416
416
  throw new Error(`Invalid unit: ${e}`);
417
417
  }
418
418
  function Y(e, t) {
419
419
  return t.type === "pixel" ? e === 0 ? 0 : t.value.div(e).toNumber() : t.value.toNumber();
420
420
  }
421
- function D(e) {
421
+ function V(e) {
422
422
  return e.orientation === "horizontal" ? e.size.width : e.size.height;
423
423
  }
424
- function P(e, t) {
425
- const a = t === "1fr" ? q(t) : t;
426
- return a.type === "pixel" ? a.value : a.value.mul(D(e));
424
+ function C(e, t) {
425
+ const a = t === "1fr" ? F(t) : t;
426
+ return a.type === "pixel" ? a.value : a.value.mul(V(e));
427
427
  }
428
- function H(e, t, a) {
429
- const r = P(e, t.min), l = P(e, t.max);
428
+ function O(e, t, a) {
429
+ const r = C(e, t.min), l = C(e, t.max);
430
430
  return a.gte(r) && a.lte(l) ? a : a.lt(r) ? r : l;
431
431
  }
432
- function E(e, t) {
432
+ function B(e, t) {
433
433
  const a = e.items.find((r) => r.id === t);
434
- if (a && y(a))
434
+ if (a && P(a))
435
435
  return a;
436
436
  throw new Error(`Expected panel with id: ${t}`);
437
437
  }
438
438
  function Ce(e, t) {
439
439
  const a = e.items.findIndex((r) => r.id === t);
440
- if (a !== -1 && k(e.items[a]))
440
+ if (a !== -1 && R(e.items[a]))
441
441
  return a;
442
442
  throw new Error(`Expected panel handle with id: ${t}`);
443
443
  }
444
- function gt(e, t) {
444
+ function vt(e, t) {
445
445
  if (!e.items.length)
446
446
  throw new Error("No items in group");
447
447
  const a = Ce(e, t), r = e.items[a - 1], l = e.items[a + 1];
448
- if (r && y(r) && r.collapsible)
448
+ if (r && P(r) && r.collapsible)
449
449
  return r;
450
- if (l && y(l) && l.collapsible)
450
+ if (l && P(l) && l.collapsible)
451
451
  return l;
452
452
  throw new Error(`No collapsible panel found for handle: ${t}`);
453
453
  }
@@ -455,25 +455,25 @@ function ce(e, t) {
455
455
  const a = e.items.findIndex((l) => l.id === t);
456
456
  if (e.activeDragHandleId) {
457
457
  const l = Ce(e, e.activeDragHandleId), n = e.items[l];
458
- if (n && k(n))
458
+ if (n && R(n))
459
459
  return {
460
460
  item: n,
461
461
  direction: l > a ? 1 : -1
462
462
  };
463
463
  }
464
- T(a !== -1, `Expected panel before: ${t}`);
464
+ j(a !== -1, `Expected panel before: ${t}`);
465
465
  let r = e.items[a + 1];
466
- if (r && k(r))
466
+ if (r && R(r))
467
467
  return { item: r, direction: 1 };
468
- if (r = e.items[a - 1], r && k(r))
468
+ if (r = e.items[a - 1], r && R(r))
469
469
  return { item: r, direction: -1 };
470
470
  throw new Error(`Cant find handle for panel: ${t}`);
471
471
  }
472
472
  function Me(e, t) {
473
473
  const a = e.items.findIndex((l) => l.id === t);
474
- T(a !== -1, `Expected panel before: ${t}`);
474
+ j(a !== -1, `Expected panel before: ${t}`);
475
475
  let r = e.items[a + 1];
476
- return r && k(r) && te(e, e.items, a + 1, 1, "add") ? { item: r, direction: 1 } : (r = e.items[a - 1], r && k(r) && te(e, e.items, a - 1, -1, "add") ? { item: r, direction: -1 } : ce(e, t));
476
+ return r && R(r) && te(e, e.items, a + 1, 1, "add") ? { item: r, direction: 1 } : (r = e.items[a - 1], r && R(r) && te(e, e.items, a - 1, -1, "add") ? { item: r, direction: -1 } : ce(e, t));
477
477
  }
478
478
  function qe(e) {
479
479
  const t = {}, a = e.map((i) => i.order).filter((i) => i !== void 0);
@@ -484,81 +484,81 @@ function qe(e) {
484
484
  r++;
485
485
  t[i.id] = r;
486
486
  }
487
- const l = e.filter((i) => i.order === void 0), n = e.filter((i) => i.order !== void 0).sort((i, o) => i.order - o.order);
487
+ const l = e.filter((i) => i.order === void 0), n = e.filter((i) => i.order !== void 0).sort((i, u) => i.order - u.order);
488
488
  for (const i of n)
489
489
  l.splice(i.order, 0, i);
490
490
  return l;
491
491
  }
492
- function vt(e, t, a) {
493
- return T(t.currentValue.type === "pixel", `panelHasSpace only works with number values: ${t.id} ${t.currentValue}`), t.collapsible ? !t.collapsed : a === "add" ? t.currentValue.value.gte(P(e, t.min)) && t.currentValue.value.lt(P(e, t.max)) : t.currentValue.value.gt(P(e, t.min));
492
+ function wt(e, t, a) {
493
+ return j(t.currentValue.type === "pixel", `panelHasSpace only works with number values: ${t.id} ${t.currentValue}`), t.collapsible ? !t.collapsed : a === "add" ? t.currentValue.value.gte(C(e, t.min)) && t.currentValue.value.lt(C(e, t.max)) : t.currentValue.value.gt(C(e, t.min));
494
494
  }
495
495
  function te(e, t, a, r, l, n) {
496
496
  const i = r === -1 ? t.slice(0, a + 1).reverse() : t.slice(a);
497
- for (const o of i) {
498
- if (!y(o))
497
+ for (const u of i) {
498
+ if (!P(u))
499
499
  continue;
500
- const u = n ? ve(e, o) : o;
501
- if (vt(e, u, l))
502
- return o;
500
+ const d = n ? ve(e, u) : u;
501
+ if (wt(e, d, l))
502
+ return u;
503
503
  }
504
504
  }
505
505
  function pe(e) {
506
506
  let t = new b(0);
507
507
  for (const a of e.items)
508
- k(a) ? t = t.add(a.size.value) : (a.collapsed && a.currentValue.type === "pixel" || a.isStaticAtRest) && (t = t.add(a.currentValue.value));
508
+ R(a) ? t = t.add(a.size.value) : (a.collapsed && a.currentValue.type === "pixel" || a.isStaticAtRest) && (t = t.add(a.currentValue.value));
509
509
  return t;
510
510
  }
511
- function B(e) {
511
+ function k(e) {
512
512
  return e.type === "pixel" ? `${e.value.toNumber()}px` : `${e.value.mul(100).toNumber()}%`;
513
513
  }
514
- function wt(e) {
515
- return O(e).map((t) => y(t) ? t.currentValue.value.toNumber() : P(e, t.size).toNumber());
514
+ function zt(e) {
515
+ return E(e).map((t) => P(t) ? t.currentValue.value.toNumber() : C(e, t.size).toNumber());
516
516
  }
517
- function zt(e, t) {
518
- return E({ ...e, items: O(e) }, t).currentValue.value.toNumber();
517
+ function bt(e, t) {
518
+ return B({ ...e, items: E(e) }, t).currentValue.value.toNumber();
519
519
  }
520
- function bt(e) {
520
+ function It(e) {
521
521
  return Ae({
522
522
  ...e,
523
- items: O(e)
524
- }).map((a) => k(a) ? Y(D(e), a.size) : Y(D(e), a.currentValue));
523
+ items: E(e)
524
+ }).map((a) => R(a) ? Y(V(e), a.size) : Y(V(e), a.currentValue));
525
525
  }
526
- function It(e, t) {
527
- const a = O(e), r = E({ ...e, items: a }, t);
528
- return Y(D(e), r.currentValue);
526
+ function yt(e, t) {
527
+ const a = E(e), r = B({ ...e, items: a }, t);
528
+ return Y(V(e), r.currentValue);
529
529
  }
530
530
  function De(e) {
531
531
  const t = pe(e);
532
532
  let a = !1;
533
533
  return e.items.map((r) => {
534
534
  if (r.type === "panel") {
535
- const l = B(r.min);
535
+ const l = k(r.min);
536
536
  if (r.currentValue.type === "pixel" && r.currentValue.value.toNumber() !== -1) {
537
537
  if (r.isStaticAtRest) {
538
- const n = r.max === "1fr" ? "100%" : B(r.max);
539
- return `clamp(${l}, ${B(r.currentValue)}, ${n})`;
538
+ const n = r.max === "1fr" ? "100%" : k(r.max);
539
+ return `clamp(${l}, ${k(r.currentValue)}, ${n})`;
540
540
  }
541
- return B(r.currentValue);
541
+ return k(r.currentValue);
542
542
  } else if (r.currentValue.type === "percent") {
543
543
  if (!a && (r.max === "1fr" || r.max.type === "percent" && r.max.value.eq(100)))
544
544
  return a = !0, `minmax(${l}, 1fr)`;
545
- const n = r.max === "1fr" ? "100%" : B(r.max);
545
+ const n = r.max === "1fr" ? "100%" : k(r.max);
546
546
  return `minmax(${l}, min(calc(${r.currentValue.value} * (100% - ${t}px)), ${n}))`;
547
547
  } else {
548
548
  if (r.collapsible && r.collapsed)
549
- return B(r.collapsedSize);
549
+ return k(r.collapsedSize);
550
550
  if (r.default) {
551
- if (e.items.some((o) => y(o) && o.id !== r.id && !o.collapsed && (o.max === "1fr" || o.max.type === "percent" && o.max.value.eq(100))))
552
- return B(r.default);
553
- const i = r.max === "1fr" ? "1fr" : B(r.max);
554
- return `minmax(${B(r.default)}, ${i})`;
551
+ if (e.items.some((u) => P(u) && u.id !== r.id && !u.collapsed && (u.max === "1fr" || u.max.type === "percent" && u.max.value.eq(100))))
552
+ return k(r.default);
553
+ const i = r.max === "1fr" ? "1fr" : k(r.max);
554
+ return `minmax(${k(r.default)}, ${i})`;
555
555
  } else {
556
- const n = r.max === "1fr" ? "1fr" : B(r.max);
556
+ const n = r.max === "1fr" ? "1fr" : k(r.max);
557
557
  return `minmax(${l}, ${n})`;
558
558
  }
559
559
  }
560
560
  }
561
- return B(r.size);
561
+ return k(r.size);
562
562
  }).join(" ");
563
563
  }
564
564
  function ge(e, t) {
@@ -569,19 +569,19 @@ function ge(e, t) {
569
569
  function ve(e, t) {
570
570
  return {
571
571
  ...t,
572
- min: L(-1e5),
573
- max: L(1e5)
572
+ min: $(-1e5),
573
+ max: $(1e5)
574
574
  };
575
575
  }
576
- function O(e) {
576
+ function E(e) {
577
577
  const t = pe(e), a = [];
578
578
  for (const r of e.items) {
579
- if (!r || !y(r)) {
579
+ if (!r || !P(r)) {
580
580
  a.push({ ...r });
581
581
  continue;
582
582
  }
583
583
  if (r.lastKnownSize) {
584
- const n = L(e.orientation === "horizontal" ? r.lastKnownSize.width : r.lastKnownSize.height);
584
+ const n = $(e.orientation === "horizontal" ? r.lastKnownSize.width : r.lastKnownSize.height);
585
585
  a.push({ ...r, currentValue: n });
586
586
  continue;
587
587
  }
@@ -589,71 +589,71 @@ function O(e) {
589
589
  a.push({ ...r });
590
590
  continue;
591
591
  }
592
- const l = new b(D(e)).minus(t).mul(r.currentValue.value);
592
+ const l = new b(V(e)).minus(t).mul(r.currentValue.value);
593
593
  a.push({
594
594
  ...r,
595
- currentValue: L(l.toNumber())
595
+ currentValue: $(l.toNumber())
596
596
  });
597
597
  }
598
598
  return a;
599
599
  }
600
600
  function oe(e, t) {
601
- var A, R, K, M;
602
- const a = Ce(e, t.handleId), r = e.items[a], l = [...e.items];
603
- let n = e.orientation === "horizontal" ? t.value.deltaX : t.value.deltaY;
604
- if (t.value.shiftKey && (n *= e.shiftAmount ?? 15), n === 0)
601
+ var D, K, L, M;
602
+ const a = Ce(e, t.handleId), r = e.items[a], n = e.items.some((w) => P(w) && w.currentValue.type !== "pixel") ? E(e) : [...e.items];
603
+ let i = e.orientation === "horizontal" ? t.value.deltaX : t.value.deltaY;
604
+ if (t.value.shiftKey && (i *= e.shiftAmount ?? 15), i === 0)
605
605
  return {};
606
- const i = n / Math.abs(n), o = te(e, l, a + i, i, "subtract", t.disregardCollapseBuffer);
607
- if (!o)
606
+ const u = i / Math.abs(i), d = te(e, n, a + u, u, "subtract", t.disregardCollapseBuffer);
607
+ if (!d)
608
608
  return {
609
- dragOvershoot: e.dragOvershoot.add(n)
609
+ dragOvershoot: e.dragOvershoot.add(i)
610
610
  };
611
- T(y(o), `Expected panel before: ${r.id}`);
612
- const u = t.type === "collapsePanel" && // If we have the panel id just use that
613
- (l.find((V) => V.id === t.panelId && o.id !== t.panelId) || // otherwise fallback to the next panel with space
614
- te(e, l, a - i, i * -1, "add", t.disregardCollapseBuffer)) || l[a - i];
615
- if (T(u && y(u), `Expected panel after: ${r.id}`), u.currentValue.value.eq(P(e, u.max)))
611
+ j(P(d), `Expected panel before: ${r.id}`);
612
+ const c = t.type === "collapsePanel" && // If we have the panel id just use that
613
+ (n.find((w) => w.id === t.panelId && d.id !== t.panelId) || // otherwise fallback to the next panel with space
614
+ te(e, n, a - u, u * -1, "add", t.disregardCollapseBuffer)) || n[a - u];
615
+ if (j(c && P(c), `Expected panel after: ${r.id}`), c.currentValue.value.eq(C(e, c.max)))
616
616
  return {
617
- dragOvershoot: e.dragOvershoot.add(n)
617
+ dragOvershoot: e.dragOvershoot.add(i)
618
618
  };
619
- const d = e.dragOvershoot.add(n);
619
+ const s = e.dragOvershoot.add(i);
620
620
  if (!t.disregardCollapseBuffer && !t.controlled) {
621
- const V = d.lt(0) && i > 0, w = d.gt(0) && i > 0, S = d.gt(0) && i < 0, U = d.lt(0) && i < 0, re = u.currentValue.value.add(new b(d).mul(S ? i : 1)), le = P(e, u.min), Te = d.abs().lt(xe) && // Let the panel expand at it's min size
622
- !u.currentValue.value.add(d.abs()).gte(u.min.value) && u.collapsible && u.collapsed && (w || U);
623
- if (re.lte(le) && (d.eq(0) || S || V || Te))
624
- return { dragOvershoot: d };
621
+ const w = s.lt(0) && u > 0, S = s.gt(0) && u > 0, q = s.gt(0) && u < 0, re = s.lt(0) && u < 0, le = c.currentValue.value.add(new b(s).mul(q ? u : 1)), Te = C(e, c.min), je = s.abs().lt(xe) && // Let the panel expand at it's min size
622
+ !c.currentValue.value.add(s.abs()).gte(c.min.value) && c.collapsible && c.collapsed && (S || re);
623
+ if (le.lte(Te) && (s.eq(0) || q || w || je))
624
+ return { dragOvershoot: s };
625
625
  }
626
- if (!t.disregardCollapseBuffer && !t.controlled && o.collapsible && o.currentValue.value.eq(P(e, o.min))) {
627
- const V = o.currentValue.value.sub(d.abs());
628
- if (d.abs().lt(xe) && V.gt(P(e, o.collapsedSize)))
629
- return { dragOvershoot: d };
626
+ if (!t.disregardCollapseBuffer && !t.controlled && d.collapsible && d.currentValue.value.eq(C(e, d.min))) {
627
+ const w = d.currentValue.value.sub(s.abs());
628
+ if (s.abs().lt(xe) && w.gt(C(e, d.collapsedSize)))
629
+ return { dragOvershoot: s };
630
630
  }
631
- const c = ve(e, o), m = o.currentValue.value, s = o.currentValue.value.minus(new b(n).mul(i));
632
- let f = t.disregardCollapseBuffer ? H(e, c, s) : H(e, o, s);
633
- const h = ve(e, u), p = u.currentValue.value, v = m.minus(f), g = u.currentValue.value.add(v);
634
- let z = t.disregardCollapseBuffer ? H(e, h, g) : H(e, u, g);
631
+ const m = ve(e, d), o = d.currentValue.value, f = d.currentValue.value.minus(new b(i).mul(u));
632
+ let h = t.disregardCollapseBuffer ? O(e, m, f) : O(e, d, f);
633
+ const p = ve(e, c), v = c.currentValue.value, g = o.minus(h), z = c.currentValue.value.add(g);
634
+ let y = t.disregardCollapseBuffer ? O(e, p, z) : O(e, c, z);
635
635
  if (t.disregardCollapseBuffer)
636
- u.collapsible && u.collapsed && (u.collapsed = !1);
637
- else if (u.collapsible && u.collapsed) {
638
- if ((A = u.onCollapseChange) != null && A.current && u.collapseIsControlled && !t.controlled && !t.isVirtual)
639
- return u.onCollapseChange.current(!1), { dragOvershoot: d };
640
- const V = (
636
+ c.collapsible && c.collapsed && (c.collapsed = !1);
637
+ else if (c.collapsible && c.collapsed) {
638
+ if ((D = c.onCollapseChange) != null && D.current && c.collapseIsControlled && !t.controlled && !t.isVirtual)
639
+ return c.onCollapseChange.current(!1), { dragOvershoot: s };
640
+ const w = (
641
641
  // Take the size it was at
642
- P(e, u.collapsedSize).add(e.dragOvershoot.abs()).sub(z.add(Math.abs(n)))
642
+ C(e, c.collapsedSize).add(e.dragOvershoot.abs()).sub(y.add(Math.abs(i)))
643
643
  );
644
- if (V.gt(0) && (z = z.add(V)), f = f.minus(z.minus(p).minus(Math.abs(n))), f.lt(o.min.value) && !o.collapsible)
645
- return { dragOvershoot: d };
646
- u.collapsed = !1, (R = u.onCollapseChange) != null && R.current && !u.collapseIsControlled && !t.controlled && !t.isVirtual && u.onCollapseChange.current(!1);
644
+ if (w.gt(0) && (y = y.add(w)), h = h.minus(y.minus(v).minus(Math.abs(i))), h.lt(d.min.value) && !d.collapsible)
645
+ return { dragOvershoot: s };
646
+ c.collapsed = !1, (K = c.onCollapseChange) != null && K.current && !c.collapseIsControlled && !t.controlled && !t.isVirtual && c.onCollapseChange.current(!1);
647
647
  }
648
- const C = o.currentValue.value.eq(P(e, o.min));
649
- if (!t.disregardCollapseBuffer && o.collapsible && C) {
650
- if ((K = o.onCollapseChange) != null && K.current && o.collapseIsControlled && !t.controlled && !t.isVirtual)
651
- return o.onCollapseChange.current(!0), { dragOvershoot: d };
652
- o.collapsed = !0, f = P(e, o.collapsedSize), z = u.currentValue.value.add(m.minus(f)), (M = o.onCollapseChange) != null && M.current && !o.collapseIsControlled && !t.controlled && !t.isVirtual && o.onCollapseChange.current(!0);
648
+ const x = d.currentValue.value.eq(C(e, d.min));
649
+ if (!t.disregardCollapseBuffer && d.collapsible && x) {
650
+ if ((L = d.onCollapseChange) != null && L.current && d.collapseIsControlled && !t.controlled && !t.isVirtual)
651
+ return d.onCollapseChange.current(!0), { dragOvershoot: s };
652
+ d.collapsed = !0, h = C(e, d.collapsedSize), y = c.currentValue.value.add(o.minus(h)), (M = d.onCollapseChange) != null && M.current && !d.collapseIsControlled && !t.controlled && !t.isVirtual && d.onCollapseChange.current(!0);
653
653
  }
654
- o.currentValue = { type: "pixel", value: f }, u.currentValue = { type: "pixel", value: z };
655
- const x = new b(D(e)).minus(l.reduce((V, w) => V.add(y(w) ? w.currentValue.value : w.size.value), new b(0)));
656
- return x.eq(0) || (o.currentValue.value = H(e, o, o.currentValue.value.add(x))), { items: l };
654
+ d.currentValue = { type: "pixel", value: h }, c.currentValue = { type: "pixel", value: y };
655
+ const A = new b(V(e)).minus(n.reduce((w, S) => w.add(P(S) ? S.currentValue.value : S.size.value), new b(0)));
656
+ return A.eq(0) || (d.currentValue.value = O(e, d, d.currentValue.value.add(A))), { items: n };
657
657
  }
658
658
  function Ae(e) {
659
659
  const t = [...e.items];
@@ -669,7 +669,7 @@ function Ae(e) {
669
669
  ...r,
670
670
  currentValue: {
671
671
  type: "percent",
672
- value: r.currentValue.value.div(new b(D(e)).sub(a))
672
+ value: r.currentValue.value.div(new b(V(e)).sub(a))
673
673
  }
674
674
  });
675
675
  }), t;
@@ -686,115 +686,115 @@ function we({ delta: e, orientation: t = "horizontal", shiftKey: a = !1 }) {
686
686
  deltaY: t === "horizontal" ? 0 : e
687
687
  };
688
688
  }
689
- function de({ context: e, handleId: t, delta: a, direction: r, controlled: l, disregardCollapseBuffer: n, isVirtual: i, panelId: o }) {
690
- let u = e;
691
- for (let d = 0; d < a.abs().toNumber(); d++)
692
- u = oe({
689
+ function de({ context: e, handleId: t, delta: a, direction: r, controlled: l, disregardCollapseBuffer: n, isVirtual: i, panelId: u }) {
690
+ let d = e;
691
+ for (let c = 0; c < a.abs().toNumber(); c++)
692
+ d = oe({
693
693
  ...e,
694
- ...u
694
+ ...d
695
695
  }, {
696
696
  handleId: t,
697
697
  type: "collapsePanel",
698
698
  controlled: l,
699
699
  disregardCollapseBuffer: n,
700
700
  isVirtual: i,
701
- panelId: o,
701
+ panelId: u,
702
702
  value: we({
703
703
  delta: r,
704
704
  orientation: e.orientation
705
705
  })
706
706
  });
707
- return u;
707
+ return d;
708
708
  }
709
709
  function ze(e, t, a, r) {
710
710
  let l = !1, n = 1, i = new b(r);
711
711
  for (; i.toNumber() !== 0; ) {
712
- const o = te(e, t, a + n, n, r.gt(0) ? "add" : "subtract");
713
- if (!o) {
712
+ const u = te(e, t, a + n, n, r.gt(0) ? "add" : "subtract");
713
+ if (!u) {
714
714
  if (l)
715
715
  break;
716
716
  n = n === 1 ? -1 : 1, l = !0;
717
717
  continue;
718
718
  }
719
- const u = o.currentValue.value, d = H(e, o, u.add(i));
720
- o.currentValue.value = d, i = i.sub(d.sub(u)), n = n === 1 ? -1 : 1;
719
+ const d = u.currentValue.value, c = O(e, u, d.add(i));
720
+ u.currentValue.value = c, i = i.sub(c.sub(d)), n = n === 1 ? -1 : 1;
721
721
  }
722
722
  }
723
- function yt(e) {
724
- if (e.items.some((u) => y(u) && u.currentValue.value.eq(-1)))
723
+ function Pt(e) {
724
+ if (e.items.some((d) => P(d) && d.currentValue.value.eq(-1)))
725
725
  return e;
726
- const t = new b(D(e)), a = t.sub(pe(e).toNumber()), l = e.items.map((u) => {
727
- if (k(u))
728
- return u.size.value;
729
- if (u.collapsed)
730
- return P(e, u.currentValue);
731
- const d = u.currentValue.type === "pixel" && u.currentValue.value || u.currentValue.value.mul(a);
732
- return H(e, u, d);
733
- }).reduce((u, d) => u.add(d), new b(0)), n = l.abs().sub(t);
734
- if (n.eq(0) || t.eq(0))
726
+ const t = new b(V(e)), a = t.sub(pe(e).toNumber()), l = e.items.map((d) => {
727
+ if (R(d))
728
+ return d.size.value;
729
+ if (d.collapsed)
730
+ return C(e, d.currentValue);
731
+ const c = d.currentValue.type === "pixel" && d.currentValue.value || d.currentValue.value.mul(a);
732
+ return O(e, d, c);
733
+ }).reduce((d, c) => d.add(c), new b(0)), n = l.abs().sub(t);
734
+ if (n.abs().lt(1) || t.eq(0))
735
735
  return e;
736
- let i = { ...e, items: O(e) };
737
- const o = i.items.find((u) => !!(y(u) && u.collapsible));
738
- if (o) {
739
- const u = i.items.findIndex((m) => m.id === o.id), d = ce(i, o.id), c = o.currentValue.value.sub(P(i, o.collapsedSize));
736
+ let i = { ...e, items: E(e) };
737
+ const u = i.items.find((d) => !!(P(d) && d.collapsible));
738
+ if (u) {
739
+ const d = i.items.findIndex((m) => m.id === u.id), c = ce(i, u.id), s = u.currentValue.value.sub(C(i, u.collapsedSize));
740
740
  i = {
741
741
  ...i,
742
742
  ...de({
743
- handleId: d.item.id,
744
- delta: c,
745
- direction: d.direction * -1,
746
- panelId: o.id,
743
+ handleId: c.item.id,
744
+ delta: s,
745
+ direction: c.direction * -1,
746
+ panelId: u.id,
747
747
  context: {
748
748
  ...i,
749
749
  // act like its the old size so the space is distributed correctly
750
750
  size: { width: l.toNumber(), height: l.toNumber() }
751
751
  }
752
752
  })
753
- }, ze(i, i.items, u, n.neg());
753
+ }, ze(i, i.items, d, n.neg());
754
754
  }
755
755
  return { ...i, items: Ae(i) };
756
756
  }
757
757
  function Re(e) {
758
758
  return e.map((t) => ({ ...t, lastKnownSize: void 0 }));
759
759
  }
760
- function Pt(e, t) {
760
+ function St(e, t) {
761
761
  document.cookie = `${e}=${encodeURIComponent(`${t}`)};path=/;max-age=31536000`;
762
762
  }
763
763
  function Fe(e, t) {
764
- const a = E(e, t.panelId);
764
+ const a = B(e, t.panelId);
765
765
  if (t.type === "expandPanel")
766
- return new b(a.sizeBeforeCollapse ?? P(e, a.min)).minus(a.currentValue.value);
767
- const r = P(e, a.collapsedSize);
766
+ return new b(a.sizeBeforeCollapse ?? C(e, a.min)).minus(a.currentValue.value);
767
+ const r = C(e, a.collapsedSize);
768
768
  return a.currentValue.value.minus(r);
769
769
  }
770
770
  function ke(e, t, a, r) {
771
- const l = E(e, t.panelId), n = Me(e, t.panelId);
771
+ const l = B(e, t.panelId), n = Me(e, t.panelId);
772
772
  let i = new b(n.direction);
773
- const o = Fe(e, t), u = { ...e, items: O(e) }, d = de({
774
- context: u,
773
+ const u = Fe(e, t), d = { ...e, items: E(e) }, c = de({
774
+ context: d,
775
775
  panelId: t.panelId,
776
776
  handleId: n.item.id,
777
- delta: o,
777
+ delta: u,
778
778
  direction: n.direction,
779
779
  isVirtual: !0
780
780
  });
781
- return new Promise((c, m) => {
781
+ return new Promise((s, m) => {
782
782
  r.signal.addEventListener("abort", () => {
783
783
  m(new Error("Operation was canceled"));
784
784
  }), t.type === "collapsePanel" && (l.sizeBeforeCollapse = l.currentValue.value.toNumber(), i = i.mul(new b(-1)));
785
- const s = 60, { duration: f, ease: h } = ct(l), p = Math.ceil(l.collapseAnimation ? f / (1e3 / s) : 1);
785
+ const o = 60, { duration: f, ease: h } = dt(l), p = Math.ceil(l.collapseAnimation ? f / (1e3 / o) : 1);
786
786
  let v = 0, g = new b(0);
787
787
  function z() {
788
- const C = ++v / p, x = new b(l.collapseAnimation ? h(C) : 1), A = x.mul(o).sub(g).mul(i);
788
+ const y = ++v / p, x = new b(l.collapseAnimation ? h(y) : 1), A = x.mul(u).sub(g).mul(i);
789
789
  if (a({
790
790
  type: "applyDelta",
791
791
  handleId: n.item.id,
792
792
  delta: A.toNumber(),
793
793
  panelId: l.id
794
794
  }), g = g.add(A.abs().mul(A.gt(0) && i.lt(0) || A.lt(0) && i.gt(0) ? -1 : 1)), x.eq(1)) {
795
- e.items.find((K) => y(K) && K.currentValue.value.round(void 0, b.roundHalfEven).lt(0)) && se(e, d);
796
- const R = t.type === "expandPanel" ? "expand" : "collapse";
797
- return c({ panelId: l.id, action: R, resolve: t.resolve }), !1;
795
+ e.items.find((K) => P(K) && K.currentValue.value.round(void 0, b.roundHalfEven).lt(0)) && se(e, c);
796
+ const D = t.type === "expandPanel" ? "expand" : "collapse";
797
+ return s({ panelId: l.id, action: D, resolve: t.resolve }), !1;
798
798
  }
799
799
  return !0;
800
800
  }
@@ -805,8 +805,8 @@ function se(e, t) {
805
805
  for (const a in t)
806
806
  e[a] = t[a];
807
807
  }
808
- let St = 0;
809
- function Ct(e, t) {
808
+ let Ct = 0;
809
+ function At(e, t) {
810
810
  const a = new AbortController(), r = {
811
811
  current: "idle"
812
812
  };
@@ -816,12 +816,12 @@ function Ct(e, t) {
816
816
  items: e.items || [],
817
817
  orientation: e.orientation || "horizontal",
818
818
  dragOvershoot: new b(0),
819
- groupId: e.groupId || `group-${St++}`,
819
+ groupId: e.groupId || `group-${Ct++}`,
820
820
  autosaveStrategy: e.autosaveStrategy,
821
821
  shiftAmount: e.shiftAmount ?? 15
822
822
  }, i = {
823
823
  prepare: () => {
824
- n.items = O(n);
824
+ n.items = E(n);
825
825
  },
826
826
  clearLastKnownSize: () => {
827
827
  n.items = Re(n.items);
@@ -830,94 +830,94 @@ function Ct(e, t) {
830
830
  n.dragOvershoot = new b(0), n.items = Ae(n);
831
831
  },
832
832
  onResize: () => {
833
- var c, m;
834
- for (const s of n.items)
835
- if (y(s)) {
836
- const f = s.lastKnownSize ? new b(n.orientation === "horizontal" ? s.lastKnownSize.width : s.lastKnownSize.height) : H(n, s, P(n, s.currentValue)), h = D(n);
837
- (m = (c = s.onResize) == null ? void 0 : c.current) == null || m.call(c, {
833
+ var s, m;
834
+ for (const o of n.items)
835
+ if (P(o)) {
836
+ const f = o.lastKnownSize ? new b(n.orientation === "horizontal" ? o.lastKnownSize.width : o.lastKnownSize.height) : O(n, o, C(n, o.currentValue)), h = V(n);
837
+ (m = (s = o.onResize) == null ? void 0 : s.current) == null || m.call(s, {
838
838
  pixel: f.toNumber(),
839
- percentage: h > 0 ? f.div(D(n)).toNumber() : -1
839
+ percentage: h > 0 ? f.div(V(n)).toNumber() : -1
840
840
  });
841
841
  }
842
842
  },
843
843
  onAutosave: () => {
844
844
  if (!n.autosaveStrategy || typeof window > "u")
845
845
  return;
846
- const c = { ...n };
847
- c.items = Re(n.items), c.activeDragHandleId = n.activeDragHandleId;
848
- const m = JSON.stringify(c);
849
- n.autosaveStrategy === "localStorage" ? localStorage.setItem(n.groupId, m) : Pt(n.groupId, m);
846
+ const s = { ...n };
847
+ s.items = Re(n.items), s.activeDragHandleId = n.activeDragHandleId;
848
+ const m = JSON.stringify(s);
849
+ n.autosaveStrategy === "localStorage" ? localStorage.setItem(n.groupId, m) : St(n.groupId, m);
850
850
  },
851
- removeItem: (c) => {
852
- const m = n.items.findIndex((p) => p.id === c), s = n.items[m];
853
- if (!s)
851
+ removeItem: (s) => {
852
+ const m = n.items.findIndex((p) => p.id === s), o = n.items[m];
853
+ if (!o)
854
854
  return;
855
- const f = n.items.filter((p) => p.id !== c), h = y(s) ? s.currentValue.value : s.size.value;
855
+ const f = n.items.filter((p) => p.id !== s), h = P(o) ? o.currentValue.value : o.size.value;
856
856
  ze(n, f, m, h), n.items = f;
857
857
  },
858
- notifyCollapseToggle: (c) => {
859
- var s, f;
860
- Z(c, ["collapsePanel", "expandPanel"]);
861
- const m = E(n, c.panelId);
862
- (f = (s = m.onCollapseChange) == null ? void 0 : s.current) == null || f.call(s, !m.collapsed);
858
+ notifyCollapseToggle: (s) => {
859
+ var o, f;
860
+ Z(s, ["collapsePanel", "expandPanel"]);
861
+ const m = B(n, s.panelId);
862
+ (f = (o = m.onCollapseChange) == null ? void 0 : o.current) == null || f.call(o, !m.collapsed);
863
863
  },
864
- runCollapseToggle: (c) => {
865
- Z(c, ["collapsePanel", "expandPanel"]);
866
- const m = ce(n, c.panelId), s = c.type === "collapsePanel" ? m.direction * -1 : m.direction, f = oe(n, {
867
- panelId: c.panelId,
864
+ runCollapseToggle: (s) => {
865
+ Z(s, ["collapsePanel", "expandPanel"]);
866
+ const m = ce(n, s.panelId), o = s.type === "collapsePanel" ? m.direction * -1 : m.direction, f = oe(n, {
867
+ panelId: s.panelId,
868
868
  handleId: m.item.id,
869
869
  type: "dragHandle",
870
- controlled: c.controlled,
870
+ controlled: s.controlled,
871
871
  value: we({
872
- delta: s,
872
+ delta: o,
873
873
  orientation: n.orientation
874
874
  })
875
875
  });
876
876
  se(n, f);
877
877
  },
878
- onAnimationEnd: (c) => {
879
- var s, f;
880
- T(c, "Expected output from animation actor");
881
- const m = E(n, c.panelId);
882
- m.collapsed = c.action === "collapse", m.collapsed && (m.currentValue = m.collapsedSize), m.collapseIsControlled || (f = (s = m.onCollapseChange) == null ? void 0 : s.current) == null || f.call(s, m.collapsed), i.commit();
878
+ onAnimationEnd: (s) => {
879
+ var o, f;
880
+ j(s, "Expected output from animation actor");
881
+ const m = B(n, s.panelId);
882
+ m.collapsed = s.action === "collapse", m.collapsed && (m.currentValue = m.collapsedSize), m.collapseIsControlled || (f = (o = m.onCollapseChange) == null ? void 0 : o.current) == null || f.call(o, m.collapsed), i.commit();
883
883
  }
884
884
  };
885
885
  i.onAutosave();
886
- const o = {
887
- shouldNotifyCollapseToggle: (c) => {
888
- Z(c, ["collapsePanel", "expandPanel"]);
889
- const m = E(n, c.panelId);
890
- return !c.controlled && m.collapseIsControlled === !0;
886
+ const u = {
887
+ shouldNotifyCollapseToggle: (s) => {
888
+ Z(s, ["collapsePanel", "expandPanel"]);
889
+ const m = B(n, s.panelId);
890
+ return !s.controlled && m.collapseIsControlled === !0;
891
891
  },
892
- shouldCollapseToggle: (c) => (Z(c, ["collapsePanel", "expandPanel"]), E(n, c.panelId).collapseIsControlled === !0),
893
- cannotExpandPanel: (c) => {
894
- Z(c, ["expandPanel"]);
895
- const m = O(n);
896
- let s = { ...n, items: m };
897
- const f = Fe(n, c), h = Me(s, c.panelId);
898
- s = {
899
- ...s,
892
+ shouldCollapseToggle: (s) => (Z(s, ["collapsePanel", "expandPanel"]), B(n, s.panelId).collapseIsControlled === !0),
893
+ cannotExpandPanel: (s) => {
894
+ Z(s, ["expandPanel"]);
895
+ const m = E(n);
896
+ let o = { ...n, items: m };
897
+ const f = Fe(n, s), h = Me(o, s.panelId);
898
+ o = {
899
+ ...o,
900
900
  ...de({
901
- context: s,
902
- panelId: c.panelId,
901
+ context: o,
902
+ panelId: s.panelId,
903
903
  handleId: h.item.id,
904
- controlled: c.controlled,
904
+ controlled: s.controlled,
905
905
  delta: f,
906
906
  direction: h.direction,
907
907
  isVirtual: !0
908
908
  })
909
909
  };
910
- const p = s.items.find((z) => z.id === c.panelId), v = s.items.reduce((z, C) => z.add(y(C) ? C.currentValue.value : C.size.value), new b(0)), g = p && y(p) && !p.currentValue.value.eq(p.collapsedSize.value);
911
- return v.gt(D(n)) || !g;
910
+ const p = o.items.find((z) => z.id === s.panelId), v = o.items.reduce((z, y) => z.add(P(y) ? y.currentValue.value : y.size.value), new b(0)), g = p && P(p) && !p.currentValue.value.eq(p.collapsedSize.value);
911
+ return v.gt(V(n)) || !g;
912
912
  }
913
913
  };
914
- function u(c) {
914
+ function d(s) {
915
915
  switch (r.current) {
916
916
  case "dragging":
917
917
  i.commit(), n.activeDragHandleId = void 0;
918
918
  break;
919
919
  }
920
- switch (c) {
920
+ switch (s) {
921
921
  case "idle":
922
922
  i.onAutosave();
923
923
  break;
@@ -928,11 +928,11 @@ function Ct(e, t) {
928
928
  i.prepare(), i.clearLastKnownSize();
929
929
  break;
930
930
  }
931
- r.current = c, t == null || t(n);
931
+ r.current = s, t == null || t(n);
932
932
  }
933
- function d(c) {
933
+ function c(s) {
934
934
  var m;
935
- switch (c.type) {
935
+ switch (s.type) {
936
936
  case "lockGroup":
937
937
  l = !0;
938
938
  break;
@@ -941,107 +941,107 @@ function Ct(e, t) {
941
941
  break;
942
942
  }
943
943
  if (!l) {
944
- switch (c.type) {
944
+ switch (s.type) {
945
945
  case "updateItemIndex":
946
- n.items = qe(n.items.map((s) => s.id === c.itemId ? { ...s, order: c.index } : s));
946
+ n.items = qe(n.items.map((o) => o.id === s.itemId ? { ...o, order: s.index } : o));
947
947
  break;
948
948
  case "registerPanel":
949
949
  n.items = ge(n.items, {
950
950
  type: "panel",
951
- currentValue: L(-1),
952
- ...c.data
951
+ currentValue: $(-1),
952
+ ...s.data
953
953
  });
954
954
  break;
955
955
  case "unregisterPanel":
956
- i.prepare(), i.removeItem(c.id), i.clearLastKnownSize(), i.commit(), i.onResize(), i.onAutosave();
956
+ i.prepare(), i.removeItem(s.id), i.clearLastKnownSize(), i.commit(), i.onResize(), i.onAutosave();
957
957
  break;
958
958
  case "registerPanelHandle": {
959
- n.items = ge(n.items, c.data);
959
+ n.items = ge(n.items, s.data);
960
960
  break;
961
961
  }
962
962
  case "unregisterPanelHandle":
963
- i.prepare(), i.removeItem(c.id), i.clearLastKnownSize(), i.commit(), i.onResize(), i.onAutosave();
963
+ i.prepare(), i.removeItem(s.id), i.clearLastKnownSize(), i.commit(), i.onResize(), i.onAutosave();
964
964
  break;
965
965
  case "registerDynamicPanel": {
966
966
  i.prepare();
967
- let s = L(0);
968
- c.data.collapsible && c.data.collapsed && c.data.collapsedSize ? s = {
967
+ let o = $(0);
968
+ s.data.collapsible && s.data.collapsed && s.data.collapsedSize ? o = {
969
969
  type: "pixel",
970
- value: P(n, c.data.collapsedSize)
971
- } : c.data.default ? s = {
970
+ value: C(n, s.data.collapsedSize)
971
+ } : s.data.default ? o = {
972
972
  type: "pixel",
973
- value: P(n, c.data.default)
974
- } : s = {
973
+ value: C(n, s.data.default)
974
+ } : o = {
975
975
  type: "pixel",
976
- value: P(n, c.data.min)
976
+ value: C(n, s.data.min)
977
977
  };
978
978
  const f = ge(n.items, {
979
979
  type: "panel",
980
- ...c.data,
981
- currentValue: s
982
- }), h = f.findIndex((g) => g.id === c.data.id), p = { ...n }, v = n.items.reduce((g, z) => k(z) ? g.add(P(n, z.size)) : g.add(z.currentValue.value), new b(0)).minus(D(n));
983
- ze(p, f, h, s.value.add(v).neg()), n.items = f, i.clearLastKnownSize(), i.commit(), i.onResize(), i.onAutosave();
980
+ ...s.data,
981
+ currentValue: o
982
+ }), h = f.findIndex((g) => g.id === s.data.id), p = { ...n }, v = n.items.reduce((g, z) => R(z) ? g.add(C(n, z.size)) : g.add(z.currentValue.value), new b(0)).minus(V(n));
983
+ ze(p, f, h, o.value.add(v).neg()), n.items = f, i.clearLastKnownSize(), i.commit(), i.onResize(), i.onAutosave();
984
984
  break;
985
985
  }
986
986
  case "rebindPanelCallbacks":
987
- for (const s of n.items)
988
- y(s) && s.id === c.data.id && (s.onCollapseChange = c.data.onCollapseChange, s.onResize = c.data.onResize);
987
+ for (const o of n.items)
988
+ P(o) && o.id === s.data.id && (o.onCollapseChange = s.data.onCollapseChange, o.onResize = s.data.onResize);
989
989
  break;
990
990
  case "updateConstraints":
991
991
  i.prepare();
992
- for (const s of n.items)
993
- if (y(s) && s.id === c.data.id) {
994
- const f = c.data;
995
- s.min = f.min, s.max = f.max, s.default = f.default, s.collapsedSize = f.collapsedSize, s.isStaticAtRest = f.isStaticAtRest, s.collapseAnimation = f.collapseAnimation, s.collapsible = f.collapsible;
996
- } else if (k(s) && s.id === c.data.id) {
997
- const f = c.data;
998
- s.size = f.size;
992
+ for (const o of n.items)
993
+ if (P(o) && o.id === s.data.id) {
994
+ const f = s.data;
995
+ o.min = f.min, o.max = f.max, o.default = f.default, o.collapsedSize = f.collapsedSize, o.isStaticAtRest = f.isStaticAtRest, o.collapseAnimation = f.collapseAnimation, o.collapsible = f.collapsible;
996
+ } else if (R(o) && o.id === s.data.id) {
997
+ const f = s.data;
998
+ o.size = f.size;
999
999
  }
1000
1000
  i.clearLastKnownSize(), i.commit(), i.onResize(), i.onAutosave();
1001
1001
  break;
1002
1002
  case "setActualItemsSize": {
1003
- const s = n.items.map((p) => {
1004
- if (!y(p))
1003
+ const o = n.items.map((p) => {
1004
+ if (!P(p))
1005
1005
  return p;
1006
- const v = c.childrenSizes[p.id] || p.lastKnownSize;
1006
+ const v = s.childrenSizes[p.id] || p.lastKnownSize;
1007
1007
  return { ...p, lastKnownSize: v };
1008
1008
  });
1009
1009
  let f = 0, h = !1;
1010
- for (const p of s)
1011
- if (y(p)) {
1010
+ for (const p of o)
1011
+ if (P(p)) {
1012
1012
  const v = (m = p.lastKnownSize) == null ? void 0 : m[n.orientation === "horizontal" ? "width" : "height"];
1013
1013
  if (!v) {
1014
- n.items = s, h = !0;
1014
+ n.items = o, h = !0;
1015
1015
  break;
1016
1016
  }
1017
1017
  f += v;
1018
1018
  } else
1019
1019
  f += p.size.value.toNumber();
1020
- h ? n.items = s : f > D(n) && r.current !== "dragging" ? n.items = yt({
1020
+ h ? n.items = o : f > V(n) && r.current === "idle" ? n.items = Pt({
1021
1021
  ...n,
1022
- items: O({ ...n, items: s })
1023
- }).items : n.items = s, i.onResize();
1022
+ items: E({ ...n, items: o })
1023
+ }).items : n.items = o, i.onResize();
1024
1024
  break;
1025
1025
  }
1026
1026
  case "setSize": {
1027
- n.size = c.size, i.onResize();
1027
+ n.size = s.size, i.onResize();
1028
1028
  break;
1029
1029
  }
1030
1030
  case "setOrientation":
1031
- n.orientation = c.orientation, i.clearLastKnownSize(), i.onResize();
1031
+ n.orientation = s.orientation, i.clearLastKnownSize(), i.onResize();
1032
1032
  break;
1033
1033
  }
1034
1034
  if (r.current === "idle")
1035
- switch (c.type) {
1035
+ switch (s.type) {
1036
1036
  case "dragHandleStart":
1037
- u("dragging"), n.activeDragHandleId = c.handleId;
1037
+ d("dragging"), n.activeDragHandleId = s.handleId;
1038
1038
  break;
1039
1039
  case "setPanelPixelSize": {
1040
1040
  i.prepare(), i.clearLastKnownSize();
1041
- const s = E(n, c.panelId), f = ce(n, c.panelId), h = s.currentValue.value, p = H(n, s, P(n, q(c.size))), v = p > h, g = v ? p.minus(h) : h.minus(p);
1042
- s.sizeBeforeCollapse = p.toNumber(), Object.assign(n, de({
1041
+ const o = B(n, s.panelId), f = ce(n, s.panelId), h = o.currentValue.value, p = O(n, o, C(n, F(s.size))), v = p.gt(h), g = v ? p.minus(h) : h.minus(p);
1042
+ o.sizeBeforeCollapse = p.toNumber(), Object.assign(n, de({
1043
1043
  context: n,
1044
- panelId: c.panelId,
1044
+ panelId: s.panelId,
1045
1045
  direction: f.direction * (v ? 1 : -1),
1046
1046
  handleId: f.item.id,
1047
1047
  delta: g
@@ -1049,41 +1049,41 @@ function Ct(e, t) {
1049
1049
  break;
1050
1050
  }
1051
1051
  case "collapsePanel":
1052
- o.shouldNotifyCollapseToggle(c) ? i.notifyCollapseToggle(c) : E(n, c.panelId).collapsed || (u("togglingCollapse"), a.abort(), ke(n, c, d, a).then((f) => {
1053
- i.onAnimationEnd(f), u("idle"), c.resolve && requestAnimationFrame(c.resolve);
1052
+ u.shouldNotifyCollapseToggle(s) ? i.notifyCollapseToggle(s) : B(n, s.panelId).collapsed || (d("togglingCollapse"), a.abort(), ke(n, s, c, a).then((f) => {
1053
+ i.onAnimationEnd(f), d("idle"), s.resolve && requestAnimationFrame(s.resolve);
1054
1054
  }));
1055
1055
  break;
1056
1056
  case "expandPanel":
1057
- if (o.cannotExpandPanel(c))
1057
+ if (u.cannotExpandPanel(s))
1058
1058
  break;
1059
- o.shouldNotifyCollapseToggle(c) ? i.notifyCollapseToggle(c) : E(n, c.panelId).collapsed && (u("togglingCollapse"), a.abort(), ke(n, c, d, a).then((f) => {
1060
- i.onAnimationEnd(f), u("idle"), c.resolve && requestAnimationFrame(c.resolve);
1059
+ u.shouldNotifyCollapseToggle(s) ? i.notifyCollapseToggle(s) : B(n, s.panelId).collapsed && (d("togglingCollapse"), a.abort(), ke(n, s, c, a).then((f) => {
1060
+ i.onAnimationEnd(f), d("idle"), s.resolve && requestAnimationFrame(s.resolve);
1061
1061
  }));
1062
1062
  break;
1063
1063
  }
1064
1064
  else if (r.current === "dragging")
1065
- switch (c.type) {
1065
+ switch (s.type) {
1066
1066
  case "dragHandle":
1067
- i.clearLastKnownSize(), se(n, oe(n, c)), i.onResize();
1067
+ i.clearLastKnownSize(), se(n, oe(n, s)), i.onResize();
1068
1068
  break;
1069
1069
  case "dragHandleEnd":
1070
- u("idle");
1070
+ d("idle");
1071
1071
  break;
1072
1072
  case "expandPanel":
1073
1073
  case "collapsePanel":
1074
- o.shouldCollapseToggle(c) && i.runCollapseToggle(c);
1074
+ u.shouldCollapseToggle(s) && i.runCollapseToggle(s);
1075
1075
  break;
1076
1076
  }
1077
1077
  else if (r.current === "togglingCollapse")
1078
- switch (c.type) {
1078
+ switch (s.type) {
1079
1079
  case "applyDelta":
1080
1080
  se(n, oe(n, {
1081
- panelId: c.panelId,
1082
- handleId: c.handleId,
1081
+ panelId: s.panelId,
1082
+ handleId: s.handleId,
1083
1083
  type: "collapsePanel",
1084
1084
  disregardCollapseBuffer: !0,
1085
1085
  value: we({
1086
- delta: c.delta,
1086
+ delta: s.delta,
1087
1087
  orientation: n.orientation
1088
1088
  })
1089
1089
  })), i.onResize();
@@ -1092,9 +1092,9 @@ function Ct(e, t) {
1092
1092
  t == null || t(n);
1093
1093
  }
1094
1094
  }
1095
- return [n, d, r];
1095
+ return [n, c, r];
1096
1096
  }
1097
- function At({ groupId: e, id: t, collapsible: a, collapsed: r }) {
1097
+ function xt({ groupId: e, id: t, collapsible: a, collapsed: r }) {
1098
1098
  const l = {
1099
1099
  id: t,
1100
1100
  "data-splitter-group-id": e,
@@ -1103,7 +1103,7 @@ function At({ groupId: e, id: t, collapsible: a, collapsed: r }) {
1103
1103
  };
1104
1104
  return a && (l["data-collapsed"] = r), l;
1105
1105
  }
1106
- function xt({ groupId: e, id: t, orientation: a, isDragging: r, activeDragHandleId: l, disabled: n, controlsId: i, min: o, max: u, currentValue: d, groupSize: c }) {
1106
+ function Vt({ groupId: e, id: t, orientation: a, isDragging: r, activeDragHandleId: l, disabled: n, controlsId: i, min: u, max: d, currentValue: c, groupSize: s }) {
1107
1107
  return {
1108
1108
  id: t,
1109
1109
  role: "separator",
@@ -1115,19 +1115,19 @@ function xt({ groupId: e, id: t, orientation: a, isDragging: r, activeDragHandle
1115
1115
  "aria-label": "Resize Handle",
1116
1116
  "aria-disabled": n,
1117
1117
  "aria-controls": i,
1118
- "aria-valuemin": o ? Y(c, o) : void 0,
1119
- "aria-valuemax": u === "1fr" ? 100 : u ? Y(c, u) : void 0,
1120
- "aria-valuenow": d ? Y(c, d) : void 0
1118
+ "aria-valuemin": u ? Y(s, u) : void 0,
1119
+ "aria-valuemax": d === "1fr" ? 100 : d ? Y(s, d) : void 0,
1120
+ "aria-valuenow": c ? Y(s, c) : void 0
1121
1121
  };
1122
1122
  }
1123
- function Vt(e, t) {
1123
+ function Dt(e, t) {
1124
1124
  const a = new ResizeObserver((l) => {
1125
1125
  const n = {};
1126
1126
  for (const i of l) {
1127
- const u = i.target.getAttribute("data-splitter-id"), d = i.borderBoxSize[0];
1128
- u && d && (n[u] = {
1129
- width: d.inlineSize,
1130
- height: d.blockSize
1127
+ const d = i.target.getAttribute("data-splitter-id"), c = i.borderBoxSize[0];
1128
+ d && c && (n[d] = {
1129
+ width: c.inlineSize,
1130
+ height: c.blockSize
1131
1131
  });
1132
1132
  }
1133
1133
  t(n);
@@ -1138,76 +1138,76 @@ function Vt(e, t) {
1138
1138
  a.disconnect();
1139
1139
  };
1140
1140
  }
1141
- function Dt(e) {
1142
- const { onMoveStart: t, onMove: a, onMoveEnd: r } = e, l = { didMove: !1, lastPosition: null, id: null }, n = (s, f, h, p) => {
1141
+ function Rt(e) {
1142
+ const { onMoveStart: t, onMove: a, onMoveEnd: r } = e, l = { didMove: !1, lastPosition: null, id: null }, n = (o, f, h, p) => {
1143
1143
  h === 0 && p === 0 || (l.didMove || (l.didMove = !0, t == null || t({
1144
1144
  type: "movestart",
1145
1145
  pointerType: f,
1146
- shiftKey: s.shiftKey,
1147
- metaKey: s.metaKey,
1148
- ctrlKey: s.ctrlKey,
1149
- altKey: s.altKey
1146
+ shiftKey: o.shiftKey,
1147
+ metaKey: o.metaKey,
1148
+ ctrlKey: o.ctrlKey,
1149
+ altKey: o.altKey
1150
1150
  })), a == null || a({
1151
1151
  type: "move",
1152
1152
  pointerType: f,
1153
1153
  deltaX: h,
1154
1154
  deltaY: p,
1155
- shiftKey: s.shiftKey,
1156
- metaKey: s.metaKey,
1157
- ctrlKey: s.ctrlKey,
1158
- altKey: s.altKey
1155
+ shiftKey: o.shiftKey,
1156
+ metaKey: o.metaKey,
1157
+ ctrlKey: o.ctrlKey,
1158
+ altKey: o.altKey
1159
1159
  }));
1160
- }, i = (s, f) => {
1160
+ }, i = (o, f) => {
1161
1161
  l.didMove && (r == null || r({
1162
1162
  type: "moveend",
1163
1163
  pointerType: f,
1164
- shiftKey: s.shiftKey,
1165
- metaKey: s.metaKey,
1166
- ctrlKey: s.ctrlKey,
1167
- altKey: s.altKey
1164
+ shiftKey: o.shiftKey,
1165
+ metaKey: o.metaKey,
1166
+ ctrlKey: o.ctrlKey,
1167
+ altKey: o.altKey
1168
1168
  }));
1169
- }, o = {}, u = () => {
1169
+ }, u = {}, d = () => {
1170
1170
  l.didMove = !1;
1171
- }, d = (s) => {
1171
+ }, c = (o) => {
1172
1172
  var f, h;
1173
- if (s.pointerId === l.id) {
1174
- const p = s.pointerType || "mouse";
1175
- n(s, p, s.pageX - (((f = l.lastPosition) == null ? void 0 : f.pageX) ?? 0), s.pageY - (((h = l.lastPosition) == null ? void 0 : h.pageY) ?? 0)), l.lastPosition = { pageX: s.pageX, pageY: s.pageY };
1173
+ if (o.pointerId === l.id) {
1174
+ const p = o.pointerType || "mouse";
1175
+ n(o, p, o.pageX - (((f = l.lastPosition) == null ? void 0 : f.pageX) ?? 0), o.pageY - (((h = l.lastPosition) == null ? void 0 : h.pageY) ?? 0)), l.lastPosition = { pageX: o.pageX, pageY: o.pageY };
1176
1176
  }
1177
- }, c = (s) => {
1178
- if (s.pointerId === l.id) {
1179
- const f = s.pointerType || "mouse";
1180
- i(s, f), l.id = null, window.removeEventListener("pointermove", d, !1), window.removeEventListener("pointerup", c, !1), window.removeEventListener("pointercancel", c, !1);
1177
+ }, s = (o) => {
1178
+ if (o.pointerId === l.id) {
1179
+ const f = o.pointerType || "mouse";
1180
+ i(o, f), l.id = null, window.removeEventListener("pointermove", c, !1), window.removeEventListener("pointerup", s, !1), window.removeEventListener("pointercancel", s, !1);
1181
1181
  }
1182
1182
  };
1183
- o.onPointerDown = (s) => {
1184
- s.button === 0 && l.id == null && (u(), s.stopPropagation(), s.preventDefault(), l.lastPosition = { pageX: s.pageX, pageY: s.pageY }, l.id = s.pointerId, window.addEventListener("pointermove", d, !1), window.addEventListener("pointerup", c, !1), window.addEventListener("pointercancel", c, !1));
1183
+ u.onPointerDown = (o) => {
1184
+ o.button === 0 && l.id == null && (d(), o.stopPropagation(), o.preventDefault(), l.lastPosition = { pageX: o.pageX, pageY: o.pageY }, l.id = o.pointerId, window.addEventListener("pointermove", c, !1), window.addEventListener("pointerup", s, !1), window.addEventListener("pointercancel", s, !1));
1185
1185
  };
1186
- const m = (s, f, h) => {
1187
- u(), n(s, "keyboard", f, h), i(s, "keyboard");
1186
+ const m = (o, f, h) => {
1187
+ d(), n(o, "keyboard", f, h), i(o, "keyboard");
1188
1188
  };
1189
- return o.onKeyDown = (s) => {
1190
- switch (s.key) {
1189
+ return u.onKeyDown = (o) => {
1190
+ switch (o.key) {
1191
1191
  case "Left":
1192
1192
  case "ArrowLeft":
1193
- s.preventDefault(), s.stopPropagation(), m(s, -1, 0);
1193
+ o.preventDefault(), o.stopPropagation(), m(o, -1, 0);
1194
1194
  break;
1195
1195
  case "Right":
1196
1196
  case "ArrowRight":
1197
- s.preventDefault(), s.stopPropagation(), m(s, 1, 0);
1197
+ o.preventDefault(), o.stopPropagation(), m(o, 1, 0);
1198
1198
  break;
1199
1199
  case "Up":
1200
1200
  case "ArrowUp":
1201
- s.preventDefault(), s.stopPropagation(), m(s, 0, -1);
1201
+ o.preventDefault(), o.stopPropagation(), m(o, 0, -1);
1202
1202
  break;
1203
1203
  case "Down":
1204
1204
  case "ArrowDown":
1205
- s.preventDefault(), s.stopPropagation(), m(s, 0, 1);
1205
+ o.preventDefault(), o.stopPropagation(), m(o, 0, 1);
1206
1206
  break;
1207
1207
  }
1208
- }, { moveProps: o };
1208
+ }, { moveProps: u };
1209
1209
  }
1210
- const Et = /* @__PURE__ */ be({
1210
+ const Kt = /* @__PURE__ */ be({
1211
1211
  __name: "Panel",
1212
1212
  props: {
1213
1213
  onResize: {},
@@ -1229,16 +1229,16 @@ const Et = /* @__PURE__ */ be({
1229
1229
  max: l,
1230
1230
  id: n,
1231
1231
  collapsible: i,
1232
- collapsedSize: o,
1233
- onCollapseChange: u,
1234
- collapseAnimation: d,
1235
- onResize: c,
1232
+ collapsedSize: u,
1233
+ onCollapseChange: d,
1234
+ collapseAnimation: c,
1235
+ onResize: s,
1236
1236
  defaultCollapsed: m,
1237
- default: s,
1237
+ default: o,
1238
1238
  isStaticAtRest: f,
1239
1239
  collapsed: h,
1240
1240
  ...p
1241
- } = a, v = n || Ie(), g = X("send"), z = X("state"), C = X("isPrerender"), x = () => ft({
1241
+ } = a, v = n || Ie(), g = X("send"), z = X("state"), y = X("isPrerender"), x = () => pt({
1242
1242
  id: v,
1243
1243
  min: a.min,
1244
1244
  max: a.max,
@@ -1249,15 +1249,15 @@ const Et = /* @__PURE__ */ be({
1249
1249
  collapseAnimation: a.collapseAnimation,
1250
1250
  onResize: a.onResize ? { current: a.onResize } : void 0,
1251
1251
  defaultCollapsed: m,
1252
- default: s,
1252
+ default: o,
1253
1253
  isStaticAtRest: f
1254
- }), A = $(() => {
1254
+ }), A = H(() => {
1255
1255
  var S;
1256
- const w = (S = z == null ? void 0 : z.value) == null ? void 0 : S.items.find((U) => U.id === v);
1257
- if (!(!w || !y(w)))
1256
+ const w = (S = z == null ? void 0 : z.value) == null ? void 0 : S.items.find((q) => q.id === v);
1257
+ if (!(!w || !P(w)))
1258
1258
  return w;
1259
1259
  });
1260
- let R = !1;
1260
+ let D = !1;
1261
1261
  A.value ? g == null || g({
1262
1262
  type: "rebindPanelCallbacks",
1263
1263
  data: {
@@ -1265,22 +1265,22 @@ const Et = /* @__PURE__ */ be({
1265
1265
  onCollapseChange: a.onCollapseChange ? { current: a.onCollapseChange } : void 0,
1266
1266
  onResize: a.onResize ? { current: a.onResize } : void 0
1267
1267
  }
1268
- }) : C != null && C.value ? g == null || g({ type: "registerPanel", data: x() }) : R = !0, G(() => {
1268
+ }) : y != null && y.value ? g == null || g({ type: "registerPanel", data: x() }) : D = !0, G(() => {
1269
1269
  var le;
1270
1270
  const w = (le = z == null ? void 0 : z.value) == null ? void 0 : le.groupId;
1271
- if (!w || !R) return;
1271
+ if (!w || !D) return;
1272
1272
  const S = document.getElementById(w);
1273
1273
  if (!S) return;
1274
- const U = document.getElementById(v);
1275
- if (!U) return;
1276
- const re = Array.from(S.children).indexOf(U);
1274
+ const q = document.getElementById(v);
1275
+ if (!q) return;
1276
+ const re = Array.from(S.children).indexOf(q);
1277
1277
  typeof re == "number" && (g == null || g({
1278
1278
  type: "registerDynamicPanel",
1279
1279
  data: { ...x(), order: re }
1280
- }), R = !1);
1280
+ }), D = !1);
1281
1281
  });
1282
- const K = $(
1283
- () => !R && pt(x(), A.value)
1282
+ const K = H(
1283
+ () => !D && mt(x(), A.value)
1284
1284
  );
1285
1285
  ue(() => {
1286
1286
  K.value && (g == null || g({ type: "updateConstraints", data: x() }));
@@ -1310,11 +1310,11 @@ const Et = /* @__PURE__ */ be({
1310
1310
  var w, S;
1311
1311
  return !!((w = A.value) != null && w.collapsible && !((S = A.value) != null && S.collapsed));
1312
1312
  },
1313
- getPixelSize: () => zt(z.value, v),
1314
- getPercentageSize: () => It(z.value, v),
1313
+ getPixelSize: () => bt(z.value, v),
1314
+ getPercentageSize: () => yt(z.value, v),
1315
1315
  setSize: (w) => g == null ? void 0 : g({ type: "setPanelPixelSize", panelId: v, size: w })
1316
1316
  });
1317
- const M = $(
1317
+ const L = H(
1318
1318
  () => {
1319
1319
  var w;
1320
1320
  return (w = A.value) == null ? void 0 : w.collapseIsControlled;
@@ -1322,15 +1322,15 @@ const Et = /* @__PURE__ */ be({
1322
1322
  );
1323
1323
  ue(() => {
1324
1324
  a.collapsed, requestAnimationFrame(() => {
1325
- M.value && (a.collapsed ? g == null || g({ type: "collapsePanel", panelId: v, controlled: !0 }) : g == null || g({ type: "expandPanel", panelId: v, controlled: !0 }));
1325
+ L.value && (a.collapsed ? g == null || g({ type: "collapsePanel", panelId: v, controlled: !0 }) : g == null || g({ type: "expandPanel", panelId: v, controlled: !0 }));
1326
1326
  });
1327
1327
  });
1328
- const V = $(() => {
1328
+ const M = H(() => {
1329
1329
  var S;
1330
1330
  const w = A.value;
1331
1331
  return {
1332
1332
  ...p,
1333
- ...At({
1333
+ ...xt({
1334
1334
  groupId: (S = z == null ? void 0 : z.value) == null ? void 0 : S.groupId,
1335
1335
  id: v,
1336
1336
  collapsible: w == null ? void 0 : w.collapsible,
@@ -1343,11 +1343,11 @@ const Et = /* @__PURE__ */ be({
1343
1343
  }
1344
1344
  };
1345
1345
  });
1346
- return (w, S) => (Pe(), ye("div", je(We(V.value)), [
1346
+ return (w, S) => (Pe(), ye("div", We(Ue(M.value)), [
1347
1347
  Se(w.$slots, "default")
1348
1348
  ], 16));
1349
1349
  }
1350
- }), Rt = ["id"], Kt = /* @__PURE__ */ be({
1350
+ }), kt = ["id"], Nt = /* @__PURE__ */ be({
1351
1351
  __name: "PanelGroup",
1352
1352
  props: {
1353
1353
  snapshot: {},
@@ -1366,23 +1366,23 @@ const Et = /* @__PURE__ */ be({
1366
1366
  }
1367
1367
  const l = me(!0);
1368
1368
  ie("isPrerender", l);
1369
- const n = e.autosaveId || e.id || Ie(), [i, o, u] = Ct(
1369
+ const n = e.autosaveId || e.id || Ie(), [i, u, d] = At(
1370
1370
  {
1371
1371
  orientation: e.orientation,
1372
1372
  groupId: n,
1373
1373
  autosaveStrategy: e.autosaveStrategy,
1374
1374
  shiftAmount: e.shiftAmount,
1375
- ...r ? dt(r) : void 0
1375
+ ...r ? ft(r) : void 0
1376
1376
  },
1377
1377
  (f) => {
1378
- d.value = { ...f };
1378
+ c.value = { ...f };
1379
1379
  }
1380
1380
  );
1381
1381
  G(() => {
1382
1382
  l.value = !1;
1383
1383
  });
1384
- const d = me(i), c = $(() => {
1385
- const f = De(d.value);
1384
+ const c = me(i), s = H(() => {
1385
+ const f = De(c.value);
1386
1386
  return {
1387
1387
  height: "100%",
1388
1388
  display: "grid",
@@ -1390,42 +1390,42 @@ const Et = /* @__PURE__ */ be({
1390
1390
  gridTemplateRows: e.orientation === "vertical" ? f : void 0
1391
1391
  };
1392
1392
  });
1393
- ie("send", o), ie("state", d), ie("id", u);
1393
+ ie("send", u), ie("state", c), ie("id", d);
1394
1394
  const m = me(null);
1395
1395
  G(() => {
1396
1396
  const f = new ResizeObserver(([h]) => {
1397
- h && h.contentRect.width > 0 && h.contentRect.height > 0 && (o == null || o({ type: "setSize", size: h.contentRect }));
1397
+ h && h.contentRect.width > 0 && h.contentRect.height > 0 && (u == null || u({ type: "setSize", size: h.contentRect }));
1398
1398
  });
1399
1399
  return m.value && f.observe(m.value), () => f.disconnect();
1400
1400
  });
1401
- const s = $(
1401
+ const o = H(
1402
1402
  () => {
1403
1403
  var f;
1404
- return (f = d.value) == null ? void 0 : f.items.map((h) => h.id).join(",");
1404
+ return (f = c.value) == null ? void 0 : f.items.map((h) => h.id).join(",");
1405
1405
  }
1406
1406
  );
1407
1407
  return G(() => {
1408
1408
  ue(() => {
1409
- s.value;
1410
- const f = Vt(n, (h) => {
1411
- o({ type: "setActualItemsSize", childrenSizes: h });
1409
+ o.value;
1410
+ const f = Dt(n, (h) => {
1411
+ u({ type: "setActualItemsSize", childrenSizes: h });
1412
1412
  });
1413
- Ue(f);
1413
+ Ge(f);
1414
1414
  });
1415
- }), G(() => (o({ type: "unlockGroup" }), () => o({ type: "lockGroup" }))), t({
1415
+ }), G(() => (u({ type: "unlockGroup" }), () => u({ type: "lockGroup" }))), t({
1416
1416
  getId: () => n,
1417
- getPixelSizes: () => wt(d.value),
1418
- getPercentageSizes: () => bt(d.value),
1417
+ getPixelSizes: () => zt(c.value),
1418
+ getPercentageSizes: () => It(c.value),
1419
1419
  getTemplate: () => De({
1420
- ...d.value,
1421
- items: O(d.value)
1420
+ ...c.value,
1421
+ items: E(c.value)
1422
1422
  }),
1423
- getState: () => u.current === "idle" ? "idle" : "dragging",
1423
+ getState: () => d.current === "idle" ? "idle" : "dragging",
1424
1424
  setSizes: (f) => {
1425
1425
  var h;
1426
1426
  for (let p = 0; p < f.length; p++) {
1427
- const v = (h = d.value) == null ? void 0 : h.items[p], g = f[p];
1428
- v && y(v) && g && o({
1427
+ const v = (h = c.value) == null ? void 0 : h.items[p], g = f[p];
1428
+ v && P(v) && g && u({
1429
1429
  type: "setPanelPixelSize",
1430
1430
  panelId: v.id,
1431
1431
  size: g
@@ -1433,16 +1433,16 @@ const Et = /* @__PURE__ */ be({
1433
1433
  }
1434
1434
  }
1435
1435
  }), (f, h) => (Pe(), ye("div", Ke(a, {
1436
- id: Ge(n),
1436
+ id: Xe(n),
1437
1437
  ref_key: "elementRef",
1438
1438
  ref: m,
1439
1439
  "data-panel-group-wrapper": "",
1440
- style: c.value
1440
+ style: s.value
1441
1441
  }), [
1442
1442
  Se(f.$slots, "default")
1443
- ], 16, Rt));
1443
+ ], 16, kt));
1444
1444
  }
1445
- }), kt = ["tabindex"], Nt = /* @__PURE__ */ be({
1445
+ }), Bt = ["tabindex"], Ot = /* @__PURE__ */ be({
1446
1446
  __name: "PanelResizer",
1447
1447
  props: {
1448
1448
  disabled: { type: Boolean },
@@ -1454,35 +1454,35 @@ const Et = /* @__PURE__ */ be({
1454
1454
  id: {}
1455
1455
  },
1456
1456
  setup(e) {
1457
- const t = Ee(e, ["size", "id", "onDragStart", "onDrag", "onDragEnd", "disabled"]), r = e.id || Ie(), l = X("send"), n = X("state"), i = X("isPrerender"), o = () => ht({ size: e.size, id: r }), u = $(() => {
1457
+ const t = Ee(e, ["size", "id", "onDragStart", "onDrag", "onDragEnd", "disabled"]), r = e.id || Ie(), l = X("send"), n = X("state"), i = X("isPrerender"), u = () => gt({ size: e.size, id: r }), d = H(() => {
1458
1458
  var p;
1459
1459
  const h = (p = n == null ? void 0 : n.value) == null ? void 0 : p.items.find((v) => v.id === r);
1460
- if (!(!h || !k(h)))
1460
+ if (!(!h || !R(h)))
1461
1461
  return h;
1462
1462
  });
1463
- let d = !1;
1464
- u.value || (i != null && i.value ? l == null || l({ type: "registerPanelHandle", data: o() }) : d = !0), G(() => {
1465
- var z, C;
1466
- if (!((z = n == null ? void 0 : n.value) == null ? void 0 : z.groupId) || !d) return;
1467
- const p = document.getElementById((C = n == null ? void 0 : n.value) == null ? void 0 : C.groupId);
1463
+ let c = !1;
1464
+ d.value || (i != null && i.value ? l == null || l({ type: "registerPanelHandle", data: u() }) : c = !0), G(() => {
1465
+ var z, y;
1466
+ if (!((z = n == null ? void 0 : n.value) == null ? void 0 : z.groupId) || !c) return;
1467
+ const p = document.getElementById((y = n == null ? void 0 : n.value) == null ? void 0 : y.groupId);
1468
1468
  if (!p) return;
1469
1469
  const v = document.getElementById(r);
1470
1470
  if (!v) return;
1471
1471
  const g = Array.from(p.children).indexOf(v);
1472
1472
  typeof g == "number" && (l == null || l({
1473
1473
  type: "registerPanelHandle",
1474
- data: { ...o(), order: g }
1475
- }), d = !1);
1474
+ data: { ...u(), order: g }
1475
+ }), c = !1);
1476
1476
  });
1477
- const c = $(
1478
- () => !d && mt(o(), u.value)
1477
+ const s = H(
1478
+ () => !c && ht(u(), d.value)
1479
1479
  );
1480
1480
  ue(() => {
1481
- c.value && (l == null || l({ type: "updateConstraints", data: o() }));
1481
+ s.value && (l == null || l({ type: "updateConstraints", data: u() }));
1482
1482
  }), Be(() => {
1483
1483
  requestAnimationFrame(() => l == null ? void 0 : l({ type: "unregisterPanelHandle", id: r }));
1484
1484
  });
1485
- const { moveProps: m } = Dt({
1485
+ const { moveProps: m } = Rt({
1486
1486
  onMoveStart: () => {
1487
1487
  var h;
1488
1488
  l == null || l({ type: "dragHandleStart", handleId: r }), (h = e.onDragStart) == null || h.call(e), n != null && n.value && (document.body.style.cursor = Ve(n == null ? void 0 : n.value) || "auto");
@@ -1495,41 +1495,41 @@ const Et = /* @__PURE__ */ be({
1495
1495
  var h;
1496
1496
  l == null || l({ type: "dragHandleEnd", handleId: r }), (h = e.onDragEnd) == null || h.call(e), document.body.style.cursor = "auto";
1497
1497
  }
1498
- }), s = (h) => {
1498
+ }), o = (h) => {
1499
1499
  if (n != null && n.value)
1500
1500
  try {
1501
- const p = gt(n == null ? void 0 : n.value, r);
1501
+ const p = vt(n == null ? void 0 : n.value, r);
1502
1502
  h.key === "Enter" && p && (p.collapsed ? l == null || l({ type: "expandPanel", panelId: p.id }) : l == null || l({ type: "collapsePanel", panelId: p.id }));
1503
1503
  } catch {
1504
1504
  }
1505
- }, f = $(() => {
1506
- var g, z, C, x, A, R, K, M, V;
1505
+ }, f = H(() => {
1506
+ var g, z, y, x, A, D, K, L, M;
1507
1507
  const h = (g = n == null ? void 0 : n.value) == null ? void 0 : g.items.findIndex((w) => w.id === r);
1508
1508
  if (!h) return { id: r };
1509
- const p = (z = n == null ? void 0 : n.value) == null ? void 0 : z.items[h], v = (C = n == null ? void 0 : n.value) == null ? void 0 : C.items[h - 1];
1510
- return !v || !y(v) ? { id: r } : {
1509
+ const p = (z = n == null ? void 0 : n.value) == null ? void 0 : z.items[h], v = (y = n == null ? void 0 : n.value) == null ? void 0 : y.items[h - 1];
1510
+ return !v || !P(v) ? { id: r } : {
1511
1511
  ...t,
1512
- ...xt({
1512
+ ...Vt({
1513
1513
  groupId: (x = n == null ? void 0 : n.value) == null ? void 0 : x.groupId,
1514
1514
  id: r,
1515
1515
  orientation: ((A = n == null ? void 0 : n.value) == null ? void 0 : A.orientation) || "horizontal",
1516
- isDragging: ((R = n == null ? void 0 : n.value) == null ? void 0 : R.activeDragHandleId) === r,
1516
+ isDragging: ((D = n == null ? void 0 : n.value) == null ? void 0 : D.activeDragHandleId) === r,
1517
1517
  activeDragHandleId: (K = n == null ? void 0 : n.value) == null ? void 0 : K.activeDragHandleId,
1518
1518
  disabled: e.disabled,
1519
1519
  controlsId: v.id,
1520
1520
  min: v.min,
1521
1521
  max: v.max,
1522
1522
  currentValue: v.currentValue,
1523
- groupSize: D(n.value)
1523
+ groupSize: V(n.value)
1524
1524
  }),
1525
1525
  onpointerdown: e.disabled ? void 0 : m.onPointerDown,
1526
1526
  onkeydown: e.disabled ? void 0 : (w) => {
1527
- m.onKeyDown(w), s(w);
1527
+ m.onKeyDown(w), o(w);
1528
1528
  },
1529
1529
  style: {
1530
1530
  cursor: n != null && n.value ? Ve(n.value) : void 0,
1531
- width: ((M = n == null ? void 0 : n.value) == null ? void 0 : M.orientation) === "horizontal" ? `${p == null ? void 0 : p.size.value.toNumber()}px` : "100%",
1532
- height: ((V = n == null ? void 0 : n.value) == null ? void 0 : V.orientation) === "vertical" ? `${p == null ? void 0 : p.size.value.toNumber()}px` : "100%"
1531
+ width: ((L = n == null ? void 0 : n.value) == null ? void 0 : L.orientation) === "horizontal" ? `${p == null ? void 0 : p.size.value.toNumber()}px` : "100%",
1532
+ height: ((M = n == null ? void 0 : n.value) == null ? void 0 : M.orientation) === "vertical" ? `${p == null ? void 0 : p.size.value.toNumber()}px` : "100%"
1533
1533
  }
1534
1534
  };
1535
1535
  });
@@ -1537,12 +1537,12 @@ const Et = /* @__PURE__ */ be({
1537
1537
  tabindex: h.disabled ? -1 : 0
1538
1538
  }), [
1539
1539
  Se(h.$slots, "default")
1540
- ], 16, kt));
1540
+ ], 16, Bt));
1541
1541
  }
1542
1542
  });
1543
1543
  export {
1544
- Et as Panel,
1545
- Kt as PanelGroup,
1546
- Nt as PanelResizer
1544
+ Kt as Panel,
1545
+ Nt as PanelGroup,
1546
+ Ot as PanelResizer
1547
1547
  };
1548
1548
  //# sourceMappingURL=index.mjs.map