@clevertask/react-sortable-tree 0.0.3 → 0.0.5

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,5 +1,5 @@
1
- import { jsx as $, jsxs as fn } from "react/jsx-runtime";
2
- import F, { useMemo as T, useLayoutEffect as Qn, useEffect as P, useRef as k, useCallback as z, useState as V, createContext as Ke, memo as ut, useReducer as Nt, useContext as De, cloneElement as er, forwardRef as dt } from "react";
1
+ import { jsx as _, jsxs as fn } from "react/jsx-runtime";
2
+ import j, { useMemo as T, useLayoutEffect as Qn, useEffect as k, useRef as B, useCallback as $, useState as V, createContext as Ke, memo as ut, useReducer as Mt, useContext as we, cloneElement as er, forwardRef as dt } from "react";
3
3
  import { unstable_batchedUpdates as je, createPortal as gn } from "react-dom";
4
4
  function tr() {
5
5
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
@@ -21,53 +21,53 @@ function Me(e) {
21
21
  function Lt(e) {
22
22
  return "nodeType" in e;
23
23
  }
24
- function J(e) {
24
+ function Z(e) {
25
25
  var t, n;
26
26
  return e ? Me(e) ? e : Lt(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
27
27
  }
28
28
  function Pt(e) {
29
29
  const {
30
30
  Document: t
31
- } = J(e);
31
+ } = Z(e);
32
32
  return e instanceof t;
33
33
  }
34
34
  function Ue(e) {
35
- return Me(e) ? !1 : e instanceof J(e).HTMLElement;
35
+ return Me(e) ? !1 : e instanceof Z(e).HTMLElement;
36
36
  }
37
37
  function hn(e) {
38
- return e instanceof J(e).SVGElement;
38
+ return e instanceof Z(e).SVGElement;
39
39
  }
40
- function Ne(e) {
40
+ function Le(e) {
41
41
  return e ? Me(e) ? e.document : Lt(e) ? Pt(e) ? e : Ue(e) || hn(e) ? e.ownerDocument : document : document : document;
42
42
  }
43
- const ie = ft ? Qn : P;
43
+ const ie = ft ? Qn : k;
44
44
  function gt(e) {
45
- const t = k(e);
45
+ const t = B(e);
46
46
  return ie(() => {
47
47
  t.current = e;
48
- }), z(function() {
48
+ }), $(function() {
49
49
  for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
50
50
  r[o] = arguments[o];
51
51
  return t.current == null ? void 0 : t.current(...r);
52
52
  }, []);
53
53
  }
54
54
  function nr() {
55
- const e = k(null), t = z((r, o) => {
55
+ const e = B(null), t = $((r, o) => {
56
56
  e.current = setInterval(r, o);
57
- }, []), n = z(() => {
57
+ }, []), n = $(() => {
58
58
  e.current !== null && (clearInterval(e.current), e.current = null);
59
59
  }, []);
60
60
  return [t, n];
61
61
  }
62
62
  function Ye(e, t) {
63
63
  t === void 0 && (t = [e]);
64
- const n = k(e);
64
+ const n = B(e);
65
65
  return ie(() => {
66
66
  n.current !== e && (n.current = e);
67
67
  }, t), n;
68
68
  }
69
69
  function We(e, t) {
70
- const n = k();
70
+ const n = B();
71
71
  return T(
72
72
  () => {
73
73
  const r = e(n.current);
@@ -78,7 +78,7 @@ function We(e, t) {
78
78
  );
79
79
  }
80
80
  function ot(e) {
81
- const t = gt(e), n = k(null), r = z(
81
+ const t = gt(e), n = B(null), r = $(
82
82
  (o) => {
83
83
  o !== n.current && (t == null || t(o, n.current)), n.current = o;
84
84
  },
@@ -88,8 +88,8 @@ function ot(e) {
88
88
  return [n, r];
89
89
  }
90
90
  function it(e) {
91
- const t = k();
92
- return P(() => {
91
+ const t = B();
92
+ return k(() => {
93
93
  t.current = e;
94
94
  }, [e]), t.current;
95
95
  }
@@ -127,7 +127,7 @@ function ht(e) {
127
127
  return !1;
128
128
  const {
129
129
  KeyboardEvent: t
130
- } = J(e.target);
130
+ } = Z(e.target);
131
131
  return t && e instanceof t;
132
132
  }
133
133
  function or(e) {
@@ -135,7 +135,7 @@ function or(e) {
135
135
  return !1;
136
136
  const {
137
137
  TouchEvent: t
138
- } = J(e.target);
138
+ } = Z(e.target);
139
139
  return t && e instanceof t;
140
140
  }
141
141
  function at(e) {
@@ -165,7 +165,7 @@ function at(e) {
165
165
  y: e.clientY
166
166
  } : null;
167
167
  }
168
- const he = /* @__PURE__ */ Object.freeze({
168
+ const ge = /* @__PURE__ */ Object.freeze({
169
169
  Translate: {
170
170
  toString(e) {
171
171
  if (!e)
@@ -191,7 +191,7 @@ const he = /* @__PURE__ */ Object.freeze({
191
191
  Transform: {
192
192
  toString(e) {
193
193
  if (e)
194
- return [he.Translate.toString(e), he.Scale.toString(e)].join(" ");
194
+ return [ge.Translate.toString(e), ge.Scale.toString(e)].join(" ");
195
195
  }
196
196
  },
197
197
  Transition: {
@@ -216,7 +216,7 @@ function ar(e) {
216
216
  id: t,
217
217
  value: n
218
218
  } = e;
219
- return F.createElement("div", {
219
+ return j.createElement("div", {
220
220
  id: t,
221
221
  style: sr
222
222
  }, n);
@@ -239,7 +239,7 @@ function lr(e) {
239
239
  clipPath: "inset(100%)",
240
240
  whiteSpace: "nowrap"
241
241
  };
242
- return F.createElement("div", {
242
+ return j.createElement("div", {
243
243
  id: t,
244
244
  style: o,
245
245
  role: "status",
@@ -250,7 +250,7 @@ function lr(e) {
250
250
  function cr() {
251
251
  const [e, t] = V("");
252
252
  return {
253
- announce: z((r) => {
253
+ announce: $((r) => {
254
254
  r != null && t(r);
255
255
  }, []),
256
256
  announcement: e
@@ -258,16 +258,16 @@ function cr() {
258
258
  }
259
259
  const vn = /* @__PURE__ */ Ke(null);
260
260
  function ur(e) {
261
- const t = De(vn);
262
- P(() => {
261
+ const t = we(vn);
262
+ k(() => {
263
263
  if (!t)
264
264
  throw new Error("useDndMonitor must be used within a children of <DndContext>");
265
265
  return t(e);
266
266
  }, [e, t]);
267
267
  }
268
268
  function dr() {
269
- const [e] = V(() => /* @__PURE__ */ new Set()), t = z((r) => (e.add(r), () => e.delete(r)), [e]);
270
- return [z((r) => {
269
+ const [e] = V(() => /* @__PURE__ */ new Set()), t = $((r) => (e.add(r), () => e.delete(r)), [e]);
270
+ return [$((r) => {
271
271
  let {
272
272
  type: o,
273
273
  event: i
@@ -323,63 +323,63 @@ function hr(e) {
323
323
  announce: i,
324
324
  announcement: s
325
325
  } = cr(), a = Je("DndLiveRegion"), [l, c] = V(!1);
326
- if (P(() => {
326
+ if (k(() => {
327
327
  c(!0);
328
328
  }, []), ur(T(() => ({
329
329
  onDragStart(d) {
330
330
  let {
331
- active: h
331
+ active: g
332
332
  } = d;
333
333
  i(t.onDragStart({
334
- active: h
334
+ active: g
335
335
  }));
336
336
  },
337
337
  onDragMove(d) {
338
338
  let {
339
- active: h,
340
- over: f
339
+ active: g,
340
+ over: h
341
341
  } = d;
342
342
  t.onDragMove && i(t.onDragMove({
343
- active: h,
344
- over: f
343
+ active: g,
344
+ over: h
345
345
  }));
346
346
  },
347
347
  onDragOver(d) {
348
348
  let {
349
- active: h,
350
- over: f
349
+ active: g,
350
+ over: h
351
351
  } = d;
352
352
  i(t.onDragOver({
353
- active: h,
354
- over: f
353
+ active: g,
354
+ over: h
355
355
  }));
356
356
  },
357
357
  onDragEnd(d) {
358
358
  let {
359
- active: h,
360
- over: f
359
+ active: g,
360
+ over: h
361
361
  } = d;
362
362
  i(t.onDragEnd({
363
- active: h,
364
- over: f
363
+ active: g,
364
+ over: h
365
365
  }));
366
366
  },
367
367
  onDragCancel(d) {
368
368
  let {
369
- active: h,
370
- over: f
369
+ active: g,
370
+ over: h
371
371
  } = d;
372
372
  i(t.onDragCancel({
373
- active: h,
374
- over: f
373
+ active: g,
374
+ over: h
375
375
  }));
376
376
  }
377
377
  }), [i, t])), !l)
378
378
  return null;
379
- const u = F.createElement(F.Fragment, null, F.createElement(ar, {
379
+ const u = j.createElement(j.Fragment, null, j.createElement(ar, {
380
380
  id: r,
381
381
  value: o.draggable
382
- }), F.createElement(lr, {
382
+ }), j.createElement(lr, {
383
383
  id: a,
384
384
  announcement: s
385
385
  }));
@@ -519,7 +519,7 @@ const mr = (e) => {
519
519
  id: a
520
520
  } = s, l = n.get(a);
521
521
  if (l) {
522
- const c = Zt(l), u = o.reduce((h, f, m) => h + bn(c[m], f), 0), d = Number((u / 4).toFixed(4));
522
+ const c = Zt(l), u = o.reduce((g, h, b) => g + bn(c[b], h), 0), d = Number((u / 4).toFixed(4));
523
523
  i.push({
524
524
  id: a,
525
525
  data: {
@@ -634,14 +634,14 @@ function Ir(e, t, n) {
634
634
  const Rr = {
635
635
  ignoreTransform: !1
636
636
  };
637
- function Le(e, t) {
637
+ function Pe(e, t) {
638
638
  t === void 0 && (t = Rr);
639
639
  let n = e.getBoundingClientRect();
640
640
  if (t.ignoreTransform) {
641
641
  const {
642
642
  transform: c,
643
643
  transformOrigin: u
644
- } = J(e).getComputedStyle(e);
644
+ } = Z(e).getComputedStyle(e);
645
645
  c && (n = Ir(n, c, u));
646
646
  }
647
647
  const {
@@ -662,7 +662,7 @@ function Le(e, t) {
662
662
  };
663
663
  }
664
664
  function en(e) {
665
- return Le(e, {
665
+ return Pe(e, {
666
666
  ignoreTransform: !0
667
667
  });
668
668
  }
@@ -678,10 +678,10 @@ function Er(e) {
678
678
  };
679
679
  }
680
680
  function Or(e, t) {
681
- return t === void 0 && (t = J(e).getComputedStyle(e)), t.position === "fixed";
681
+ return t === void 0 && (t = Z(e).getComputedStyle(e)), t.position === "fixed";
682
682
  }
683
- function Ar(e, t) {
684
- t === void 0 && (t = J(e).getComputedStyle(e));
683
+ function Tr(e, t) {
684
+ t === void 0 && (t = Z(e).getComputedStyle(e));
685
685
  const n = /(auto|scroll|overlay)/;
686
686
  return ["overflow", "overflowX", "overflowY"].some((o) => {
687
687
  const i = t[o];
@@ -697,8 +697,8 @@ function kt(e, t) {
697
697
  return n.push(o.scrollingElement), n;
698
698
  if (!Ue(o) || hn(o) || n.includes(o))
699
699
  return n;
700
- const i = J(e).getComputedStyle(o);
701
- return o !== e && Ar(o, i) && n.push(o), Or(o, i) ? n : r(o.parentNode);
700
+ const i = Z(e).getComputedStyle(o);
701
+ return o !== e && Tr(o, i) && n.push(o), Or(o, i) ? n : r(o.parentNode);
702
702
  }
703
703
  return e ? r(e) : n;
704
704
  }
@@ -707,7 +707,7 @@ function Dn(e) {
707
707
  return t ?? null;
708
708
  }
709
709
  function xt(e) {
710
- return !ft || !e ? null : Me(e) ? e : Lt(e) ? Pt(e) || e === Ne(e).scrollingElement ? window : Ue(e) ? e : null : null;
710
+ return !ft || !e ? null : Me(e) ? e : Lt(e) ? Pt(e) || e === Le(e).scrollingElement ? window : Ue(e) ? e : null : null;
711
711
  }
712
712
  function Cn(e) {
713
713
  return Me(e) ? e.scrollX : e.scrollLeft;
@@ -751,39 +751,39 @@ function Rn(e) {
751
751
  minScroll: t
752
752
  };
753
753
  }
754
- const Tr = {
754
+ const Ar = {
755
755
  x: 0.2,
756
756
  y: 0.2
757
757
  };
758
- function Mr(e, t, n, r, o) {
758
+ function Nr(e, t, n, r, o) {
759
759
  let {
760
760
  top: i,
761
761
  left: s,
762
762
  right: a,
763
763
  bottom: l
764
764
  } = n;
765
- r === void 0 && (r = 10), o === void 0 && (o = Tr);
765
+ r === void 0 && (r = 10), o === void 0 && (o = Ar);
766
766
  const {
767
767
  isTop: c,
768
768
  isBottom: u,
769
769
  isLeft: d,
770
- isRight: h
771
- } = Rn(e), f = {
770
+ isRight: g
771
+ } = Rn(e), h = {
772
772
  x: 0,
773
773
  y: 0
774
- }, m = {
774
+ }, b = {
775
775
  x: 0,
776
776
  y: 0
777
- }, g = {
777
+ }, f = {
778
778
  height: t.height * o.y,
779
779
  width: t.width * o.x
780
780
  };
781
- return !c && i <= t.top + g.height ? (f.y = Y.Backward, m.y = r * Math.abs((t.top + g.height - i) / g.height)) : !u && l >= t.bottom - g.height && (f.y = Y.Forward, m.y = r * Math.abs((t.bottom - g.height - l) / g.height)), !h && a >= t.right - g.width ? (f.x = Y.Forward, m.x = r * Math.abs((t.right - g.width - a) / g.width)) : !d && s <= t.left + g.width && (f.x = Y.Backward, m.x = r * Math.abs((t.left + g.width - s) / g.width)), {
782
- direction: f,
783
- speed: m
781
+ return !c && i <= t.top + f.height ? (h.y = Y.Backward, b.y = r * Math.abs((t.top + f.height - i) / f.height)) : !u && l >= t.bottom - f.height && (h.y = Y.Forward, b.y = r * Math.abs((t.bottom - f.height - l) / f.height)), !g && a >= t.right - f.width ? (h.x = Y.Forward, b.x = r * Math.abs((t.right - f.width - a) / f.width)) : !d && s <= t.left + f.width && (h.x = Y.Backward, b.x = r * Math.abs((t.left + f.width - s) / f.width)), {
782
+ direction: h,
783
+ speed: b
784
784
  };
785
785
  }
786
- function Nr(e) {
786
+ function Mr(e) {
787
787
  if (e === document.scrollingElement) {
788
788
  const {
789
789
  innerWidth: i,
@@ -823,7 +823,7 @@ function Pr(e) {
823
823
  return e.reduce((t, n) => t + Sn(n), 0);
824
824
  }
825
825
  function On(e, t) {
826
- if (t === void 0 && (t = Le), !e)
826
+ if (t === void 0 && (t = Pe), !e)
827
827
  return;
828
828
  const {
829
829
  top: n,
@@ -837,7 +837,7 @@ function On(e, t) {
837
837
  });
838
838
  }
839
839
  const kr = [["x", ["left", "right"], Lr], ["y", ["top", "bottom"], Pr]];
840
- class zt {
840
+ class Bt {
841
841
  constructor(t, n) {
842
842
  this.rect = void 0, this.width = void 0, this.height = void 0, this.top = void 0, this.bottom = void 0, this.right = void 0, this.left = void 0;
843
843
  const r = kt(n), o = En(r);
@@ -872,11 +872,11 @@ class Fe {
872
872
  (o = this.target) == null || o.addEventListener(t, n, r), this.listeners.push([t, n, r]);
873
873
  }
874
874
  }
875
- function zr(e) {
875
+ function Br(e) {
876
876
  const {
877
877
  EventTarget: t
878
- } = J(e);
879
- return e instanceof t ? e : Ne(e);
878
+ } = Z(e);
879
+ return e instanceof t ? e : Le(e);
880
880
  }
881
881
  function Dt(e, t) {
882
882
  const n = Math.abs(e.x), r = Math.abs(e.y);
@@ -889,14 +889,14 @@ var oe;
889
889
  function tn(e) {
890
890
  e.preventDefault();
891
891
  }
892
- function Br(e) {
892
+ function zr(e) {
893
893
  e.stopPropagation();
894
894
  }
895
895
  var S;
896
896
  (function(e) {
897
897
  e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter";
898
898
  })(S || (S = {}));
899
- const An = {
899
+ const Tn = {
900
900
  start: [S.Space, S.Enter],
901
901
  cancel: [S.Esc],
902
902
  end: [S.Space, S.Enter]
@@ -927,7 +927,7 @@ const An = {
927
927
  };
928
928
  }
929
929
  };
930
- class Bt {
930
+ class zt {
931
931
  constructor(t) {
932
932
  this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = t;
933
933
  const {
@@ -935,7 +935,7 @@ class Bt {
935
935
  target: n
936
936
  }
937
937
  } = t;
938
- this.props = t, this.listeners = new Fe(Ne(n)), this.windowListeners = new Fe(J(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
938
+ this.props = t, this.listeners = new Fe(Le(n)), this.windowListeners = new Fe(Z(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
939
939
  }
940
940
  attach() {
941
941
  this.handleStart(), this.windowListeners.add(oe.Resize, this.handleCancel), this.windowListeners.add(oe.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(oe.Keydown, this.handleKeyDown));
@@ -954,7 +954,7 @@ class Bt {
954
954
  context: r,
955
955
  options: o
956
956
  } = this.props, {
957
- keyboardCodes: i = An,
957
+ keyboardCodes: i = Tn,
958
958
  coordinateGetter: s = $r,
959
959
  scrollBehavior: a = "smooth"
960
960
  } = o, {
@@ -981,55 +981,55 @@ class Bt {
981
981
  currentCoordinates: u
982
982
  });
983
983
  if (d) {
984
- const h = st(d, u), f = {
984
+ const g = st(d, u), h = {
985
985
  x: 0,
986
986
  y: 0
987
987
  }, {
988
- scrollableAncestors: m
988
+ scrollableAncestors: b
989
989
  } = r.current;
990
- for (const g of m) {
990
+ for (const f of b) {
991
991
  const p = t.code, {
992
- isTop: b,
993
- isRight: D,
992
+ isTop: m,
993
+ isRight: w,
994
994
  isLeft: y,
995
- isBottom: R,
995
+ isBottom: C,
996
996
  maxScroll: x,
997
- minScroll: w
998
- } = Rn(g), I = Nr(g), E = {
999
- x: Math.min(p === S.Right ? I.right - I.width / 2 : I.right, Math.max(p === S.Right ? I.left : I.left + I.width / 2, d.x)),
1000
- y: Math.min(p === S.Down ? I.bottom - I.height / 2 : I.bottom, Math.max(p === S.Down ? I.top : I.top + I.height / 2, d.y))
1001
- }, N = p === S.Right && !D || p === S.Left && !y, _ = p === S.Down && !R || p === S.Up && !b;
1002
- if (N && E.x !== d.x) {
1003
- const A = g.scrollLeft + h.x, Z = p === S.Right && A <= x.x || p === S.Left && A >= w.x;
1004
- if (Z && !h.y) {
1005
- g.scrollTo({
997
+ minScroll: I
998
+ } = Rn(f), R = Mr(f), E = {
999
+ x: Math.min(p === S.Right ? R.right - R.width / 2 : R.right, Math.max(p === S.Right ? R.left : R.left + R.width / 2, d.x)),
1000
+ y: Math.min(p === S.Down ? R.bottom - R.height / 2 : R.bottom, Math.max(p === S.Down ? R.top : R.top + R.height / 2, d.y))
1001
+ }, M = p === S.Right && !w || p === S.Left && !y, z = p === S.Down && !C || p === S.Up && !m;
1002
+ if (M && E.x !== d.x) {
1003
+ const A = f.scrollLeft + g.x, Q = p === S.Right && A <= x.x || p === S.Left && A >= I.x;
1004
+ if (Q && !g.y) {
1005
+ f.scrollTo({
1006
1006
  left: A,
1007
1007
  behavior: a
1008
1008
  });
1009
1009
  return;
1010
1010
  }
1011
- Z ? f.x = g.scrollLeft - A : f.x = p === S.Right ? g.scrollLeft - x.x : g.scrollLeft - w.x, f.x && g.scrollBy({
1012
- left: -f.x,
1011
+ Q ? h.x = f.scrollLeft - A : h.x = p === S.Right ? f.scrollLeft - x.x : f.scrollLeft - I.x, h.x && f.scrollBy({
1012
+ left: -h.x,
1013
1013
  behavior: a
1014
1014
  });
1015
1015
  break;
1016
- } else if (_ && E.y !== d.y) {
1017
- const A = g.scrollTop + h.y, Z = p === S.Down && A <= x.y || p === S.Up && A >= w.y;
1018
- if (Z && !h.x) {
1019
- g.scrollTo({
1016
+ } else if (z && E.y !== d.y) {
1017
+ const A = f.scrollTop + g.y, Q = p === S.Down && A <= x.y || p === S.Up && A >= I.y;
1018
+ if (Q && !g.x) {
1019
+ f.scrollTo({
1020
1020
  top: A,
1021
1021
  behavior: a
1022
1022
  });
1023
1023
  return;
1024
1024
  }
1025
- Z ? f.y = g.scrollTop - A : f.y = p === S.Down ? g.scrollTop - x.y : g.scrollTop - w.y, f.y && g.scrollBy({
1026
- top: -f.y,
1025
+ Q ? h.y = f.scrollTop - A : h.y = p === S.Down ? f.scrollTop - x.y : f.scrollTop - I.y, h.y && f.scrollBy({
1026
+ top: -h.y,
1027
1027
  behavior: a
1028
1028
  });
1029
1029
  break;
1030
1030
  }
1031
1031
  }
1032
- this.handleMove(t, Ae(st(d, this.referenceCoordinates), f));
1032
+ this.handleMove(t, Ae(st(d, this.referenceCoordinates), h));
1033
1033
  }
1034
1034
  }
1035
1035
  }
@@ -1055,11 +1055,11 @@ class Bt {
1055
1055
  this.listeners.removeAll(), this.windowListeners.removeAll();
1056
1056
  }
1057
1057
  }
1058
- Bt.activators = [{
1058
+ zt.activators = [{
1059
1059
  eventName: "onKeyDown",
1060
1060
  handler: (e, t, n) => {
1061
1061
  let {
1062
- keyboardCodes: r = An,
1062
+ keyboardCodes: r = Tn,
1063
1063
  onActivation: o
1064
1064
  } = t, {
1065
1065
  active: i
@@ -1085,13 +1085,13 @@ function rn(e) {
1085
1085
  class $t {
1086
1086
  constructor(t, n, r) {
1087
1087
  var o;
1088
- r === void 0 && (r = zr(t.event.target)), this.props = void 0, this.events = void 0, this.autoScrollEnabled = !0, this.document = void 0, this.activated = !1, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = t, this.events = n;
1088
+ r === void 0 && (r = Br(t.event.target)), this.props = void 0, this.events = void 0, this.autoScrollEnabled = !0, this.document = void 0, this.activated = !1, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = t, this.events = n;
1089
1089
  const {
1090
1090
  event: i
1091
1091
  } = t, {
1092
1092
  target: s
1093
1093
  } = i;
1094
- this.props = t, this.events = n, this.document = Ne(s), this.documentListeners = new Fe(this.document), this.listeners = new Fe(r), this.windowListeners = new Fe(J(s)), this.initialCoordinates = (o = at(i)) != null ? o : de, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
1094
+ this.props = t, this.events = n, this.document = Le(s), this.documentListeners = new Fe(this.document), this.listeners = new Fe(r), this.windowListeners = new Fe(Z(s)), this.initialCoordinates = (o = at(i)) != null ? o : de, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
1095
1095
  }
1096
1096
  attach() {
1097
1097
  const {
@@ -1130,7 +1130,7 @@ class $t {
1130
1130
  } = this, {
1131
1131
  onStart: n
1132
1132
  } = this.props;
1133
- t && (this.activated = !0, this.documentListeners.add(oe.Click, Br, {
1133
+ t && (this.activated = !0, this.documentListeners.add(oe.Click, zr, {
1134
1134
  capture: !0
1135
1135
  }), this.removeTextSelection(), this.documentListeners.add(oe.SelectionChange, this.removeTextSelection), n(t));
1136
1136
  }
@@ -1192,7 +1192,7 @@ class _t extends $t {
1192
1192
  constructor(t) {
1193
1193
  const {
1194
1194
  event: n
1195
- } = t, r = Ne(n.target);
1195
+ } = t, r = Le(n.target);
1196
1196
  super(t, _r, r);
1197
1197
  }
1198
1198
  }
@@ -1223,7 +1223,7 @@ var Et;
1223
1223
  })(Et || (Et = {}));
1224
1224
  class Fr extends $t {
1225
1225
  constructor(t) {
1226
- super(t, jr, Ne(t.event.target));
1226
+ super(t, jr, Le(t.event.target));
1227
1227
  }
1228
1228
  }
1229
1229
  Fr.activators = [{
@@ -1299,18 +1299,18 @@ function Xr(e) {
1299
1299
  scrollableAncestors: c,
1300
1300
  scrollableAncestorRects: u,
1301
1301
  delta: d,
1302
- threshold: h
1302
+ threshold: g
1303
1303
  } = e;
1304
- const f = Vr({
1304
+ const h = Vr({
1305
1305
  delta: d,
1306
1306
  disabled: !i
1307
- }), [m, g] = nr(), p = k({
1307
+ }), [b, f] = nr(), p = B({
1308
1308
  x: 0,
1309
1309
  y: 0
1310
- }), b = k({
1310
+ }), m = B({
1311
1311
  x: 0,
1312
1312
  y: 0
1313
- }), D = T(() => {
1313
+ }), w = T(() => {
1314
1314
  switch (n) {
1315
1315
  case He.Pointer:
1316
1316
  return l ? {
@@ -1322,62 +1322,62 @@ function Xr(e) {
1322
1322
  case He.DraggableRect:
1323
1323
  return o;
1324
1324
  }
1325
- }, [n, o, l]), y = k(null), R = z(() => {
1326
- const w = y.current;
1327
- if (!w)
1325
+ }, [n, o, l]), y = B(null), C = $(() => {
1326
+ const I = y.current;
1327
+ if (!I)
1328
1328
  return;
1329
- const I = p.current.x * b.current.x, E = p.current.y * b.current.y;
1330
- w.scrollBy(I, E);
1329
+ const R = p.current.x * m.current.x, E = p.current.y * m.current.y;
1330
+ I.scrollBy(R, E);
1331
1331
  }, []), x = T(() => a === ct.TreeOrder ? [...c].reverse() : c, [a, c]);
1332
- P(
1332
+ k(
1333
1333
  () => {
1334
- if (!i || !c.length || !D) {
1335
- g();
1334
+ if (!i || !c.length || !w) {
1335
+ f();
1336
1336
  return;
1337
1337
  }
1338
- for (const w of x) {
1339
- if ((r == null ? void 0 : r(w)) === !1)
1338
+ for (const I of x) {
1339
+ if ((r == null ? void 0 : r(I)) === !1)
1340
1340
  continue;
1341
- const I = c.indexOf(w), E = u[I];
1341
+ const R = c.indexOf(I), E = u[R];
1342
1342
  if (!E)
1343
1343
  continue;
1344
1344
  const {
1345
- direction: N,
1346
- speed: _
1347
- } = Mr(w, E, D, t, h);
1345
+ direction: M,
1346
+ speed: z
1347
+ } = Nr(I, E, w, t, g);
1348
1348
  for (const A of ["x", "y"])
1349
- f[A][N[A]] || (_[A] = 0, N[A] = 0);
1350
- if (_.x > 0 || _.y > 0) {
1351
- g(), y.current = w, m(R, s), p.current = _, b.current = N;
1349
+ h[A][M[A]] || (z[A] = 0, M[A] = 0);
1350
+ if (z.x > 0 || z.y > 0) {
1351
+ f(), y.current = I, b(C, s), p.current = z, m.current = M;
1352
1352
  return;
1353
1353
  }
1354
1354
  }
1355
1355
  p.current = {
1356
1356
  x: 0,
1357
1357
  y: 0
1358
- }, b.current = {
1358
+ }, m.current = {
1359
1359
  x: 0,
1360
1360
  y: 0
1361
- }, g();
1361
+ }, f();
1362
1362
  },
1363
1363
  // eslint-disable-next-line react-hooks/exhaustive-deps
1364
1364
  [
1365
1365
  t,
1366
- R,
1366
+ C,
1367
1367
  r,
1368
- g,
1368
+ f,
1369
1369
  i,
1370
1370
  s,
1371
1371
  // eslint-disable-next-line react-hooks/exhaustive-deps
1372
- JSON.stringify(D),
1372
+ JSON.stringify(w),
1373
1373
  // eslint-disable-next-line react-hooks/exhaustive-deps
1374
- JSON.stringify(f),
1375
- m,
1374
+ JSON.stringify(h),
1375
+ b,
1376
1376
  c,
1377
1377
  x,
1378
1378
  u,
1379
1379
  // eslint-disable-next-line react-hooks/exhaustive-deps
1380
- JSON.stringify(h)
1380
+ JSON.stringify(g)
1381
1381
  ]
1382
1382
  );
1383
1383
  }
@@ -1434,10 +1434,10 @@ function Ur(e, t) {
1434
1434
  return [...n, ...i];
1435
1435
  }, []), [e, t]);
1436
1436
  }
1437
- var Te;
1437
+ var Ne;
1438
1438
  (function(e) {
1439
1439
  e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
1440
- })(Te || (Te = {}));
1440
+ })(Ne || (Ne = {}));
1441
1441
  var Ot;
1442
1442
  (function(e) {
1443
1443
  e.Optimized = "optimized";
@@ -1453,59 +1453,59 @@ function Wr(e, t) {
1453
1453
  frequency: a,
1454
1454
  measure: l,
1455
1455
  strategy: c
1456
- } = o, u = k(e), d = p(), h = Ye(d), f = z(function(b) {
1457
- b === void 0 && (b = []), !h.current && s((D) => D === null ? b : D.concat(b.filter((y) => !D.includes(y))));
1458
- }, [h]), m = k(null), g = We((b) => {
1456
+ } = o, u = B(e), d = p(), g = Ye(d), h = $(function(m) {
1457
+ m === void 0 && (m = []), !g.current && s((w) => w === null ? m : w.concat(m.filter((y) => !w.includes(y))));
1458
+ }, [g]), b = B(null), f = We((m) => {
1459
1459
  if (d && !n)
1460
1460
  return on;
1461
- if (!b || b === on || u.current !== e || i != null) {
1462
- const D = /* @__PURE__ */ new Map();
1461
+ if (!m || m === on || u.current !== e || i != null) {
1462
+ const w = /* @__PURE__ */ new Map();
1463
1463
  for (let y of e) {
1464
1464
  if (!y)
1465
1465
  continue;
1466
1466
  if (i && i.length > 0 && !i.includes(y.id) && y.rect.current) {
1467
- D.set(y.id, y.rect.current);
1467
+ w.set(y.id, y.rect.current);
1468
1468
  continue;
1469
1469
  }
1470
- const R = y.node.current, x = R ? new zt(l(R), R) : null;
1471
- y.rect.current = x, x && D.set(y.id, x);
1470
+ const C = y.node.current, x = C ? new Bt(l(C), C) : null;
1471
+ y.rect.current = x, x && w.set(y.id, x);
1472
1472
  }
1473
- return D;
1473
+ return w;
1474
1474
  }
1475
- return b;
1475
+ return m;
1476
1476
  }, [e, i, n, d, l]);
1477
- return P(() => {
1477
+ return k(() => {
1478
1478
  u.current = e;
1479
- }, [e]), P(
1479
+ }, [e]), k(
1480
1480
  () => {
1481
- d || f();
1481
+ d || h();
1482
1482
  },
1483
1483
  // eslint-disable-next-line react-hooks/exhaustive-deps
1484
1484
  [n, d]
1485
- ), P(
1485
+ ), k(
1486
1486
  () => {
1487
1487
  i && i.length > 0 && s(null);
1488
1488
  },
1489
1489
  //eslint-disable-next-line react-hooks/exhaustive-deps
1490
1490
  [JSON.stringify(i)]
1491
- ), P(
1491
+ ), k(
1492
1492
  () => {
1493
- d || typeof a != "number" || m.current !== null || (m.current = setTimeout(() => {
1494
- f(), m.current = null;
1493
+ d || typeof a != "number" || b.current !== null || (b.current = setTimeout(() => {
1494
+ h(), b.current = null;
1495
1495
  }, a));
1496
1496
  },
1497
1497
  // eslint-disable-next-line react-hooks/exhaustive-deps
1498
- [a, d, f, ...r]
1498
+ [a, d, h, ...r]
1499
1499
  ), {
1500
- droppableRects: g,
1501
- measureDroppableContainers: f,
1500
+ droppableRects: f,
1501
+ measureDroppableContainers: h,
1502
1502
  measuringScheduled: i != null
1503
1503
  };
1504
1504
  function p() {
1505
1505
  switch (c) {
1506
- case Te.Always:
1506
+ case Ne.Always:
1507
1507
  return !1;
1508
- case Te.BeforeDragging:
1508
+ case Ne.BeforeDragging:
1509
1509
  return n;
1510
1510
  default:
1511
1511
  return !n;
@@ -1531,7 +1531,7 @@ function qr(e) {
1531
1531
  } = window;
1532
1532
  return new i(r);
1533
1533
  }, [r, n]);
1534
- return P(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
1534
+ return k(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
1535
1535
  }
1536
1536
  function pt(e) {
1537
1537
  let {
@@ -1550,14 +1550,14 @@ function pt(e) {
1550
1550
  // eslint-disable-next-line react-hooks/exhaustive-deps
1551
1551
  [n]
1552
1552
  );
1553
- return P(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
1553
+ return k(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
1554
1554
  }
1555
1555
  function Gr(e) {
1556
- return new zt(Le(e), e);
1556
+ return new Bt(Pe(e), e);
1557
1557
  }
1558
1558
  function sn(e, t, n) {
1559
1559
  t === void 0 && (t = Gr);
1560
- const [r, o] = Nt(a, null), i = qr({
1560
+ const [r, o] = Mt(a, null), i = qr({
1561
1561
  callback(l) {
1562
1562
  if (e)
1563
1563
  for (const c of l) {
@@ -1597,17 +1597,17 @@ function Zr(e) {
1597
1597
  }
1598
1598
  const an = [];
1599
1599
  function Qr(e) {
1600
- const t = k(e), n = We((r) => e ? r && r !== an && e && t.current && e.parentNode === t.current.parentNode ? r : kt(e) : an, [e]);
1601
- return P(() => {
1600
+ const t = B(e), n = We((r) => e ? r && r !== an && e && t.current && e.parentNode === t.current.parentNode ? r : kt(e) : an, [e]);
1601
+ return k(() => {
1602
1602
  t.current = e;
1603
1603
  }, [e]), n;
1604
1604
  }
1605
1605
  function eo(e) {
1606
- const [t, n] = V(null), r = k(e), o = z((i) => {
1606
+ const [t, n] = V(null), r = B(e), o = $((i) => {
1607
1607
  const s = xt(i.target);
1608
1608
  s && n((a) => a ? (a.set(s, Rt(s)), new Map(a)) : null);
1609
1609
  }, []);
1610
- return P(() => {
1610
+ return k(() => {
1611
1611
  const i = r.current;
1612
1612
  if (e !== i) {
1613
1613
  s(i);
@@ -1632,20 +1632,20 @@ function eo(e) {
1632
1632
  }
1633
1633
  function ln(e, t) {
1634
1634
  t === void 0 && (t = []);
1635
- const n = k(null);
1636
- return P(
1635
+ const n = B(null);
1636
+ return k(
1637
1637
  () => {
1638
1638
  n.current = null;
1639
1639
  },
1640
1640
  // eslint-disable-next-line react-hooks/exhaustive-deps
1641
1641
  t
1642
- ), P(() => {
1642
+ ), k(() => {
1643
1643
  const r = e !== de;
1644
1644
  r && !n.current && (n.current = e), !r && n.current && (n.current = null);
1645
1645
  }, [e]), n.current ? st(e, n.current) : de;
1646
1646
  }
1647
1647
  function to(e) {
1648
- P(
1648
+ k(
1649
1649
  () => {
1650
1650
  if (!ft)
1651
1651
  return;
@@ -1681,23 +1681,23 @@ function no(e, t) {
1681
1681
  }, n;
1682
1682
  }, {}), [e, t]);
1683
1683
  }
1684
- function Tn(e) {
1684
+ function An(e) {
1685
1685
  return T(() => e ? Er(e) : null, [e]);
1686
1686
  }
1687
1687
  const St = [];
1688
1688
  function ro(e, t) {
1689
- t === void 0 && (t = Le);
1690
- const [n] = e, r = Tn(n ? J(n) : null), [o, i] = Nt(a, St), s = pt({
1689
+ t === void 0 && (t = Pe);
1690
+ const [n] = e, r = An(n ? Z(n) : null), [o, i] = Mt(a, St), s = pt({
1691
1691
  callback: i
1692
1692
  });
1693
1693
  return e.length > 0 && o === St && i(), ie(() => {
1694
1694
  e.length ? e.forEach((l) => s == null ? void 0 : s.observe(l)) : (s == null || s.disconnect(), i());
1695
1695
  }, [e]), o;
1696
1696
  function a() {
1697
- return e.length ? e.map((l) => In(l) ? r : new zt(t(l), l)) : St;
1697
+ return e.length ? e.map((l) => In(l) ? r : new Bt(t(l), l)) : St;
1698
1698
  }
1699
1699
  }
1700
- function Mn(e) {
1700
+ function Nn(e) {
1701
1701
  if (!e)
1702
1702
  return null;
1703
1703
  if (e.children.length > 1)
@@ -1709,25 +1709,25 @@ function oo(e) {
1709
1709
  let {
1710
1710
  measure: t
1711
1711
  } = e;
1712
- const [n, r] = V(null), o = z((c) => {
1712
+ const [n, r] = V(null), o = $((c) => {
1713
1713
  for (const {
1714
1714
  target: u
1715
1715
  } of c)
1716
1716
  if (Ue(u)) {
1717
1717
  r((d) => {
1718
- const h = t(u);
1718
+ const g = t(u);
1719
1719
  return d ? {
1720
1720
  ...d,
1721
- width: h.width,
1722
- height: h.height
1723
- } : h;
1721
+ width: g.width,
1722
+ height: g.height
1723
+ } : g;
1724
1724
  });
1725
1725
  break;
1726
1726
  }
1727
1727
  }, [t]), i = pt({
1728
1728
  callback: o
1729
- }), s = z((c) => {
1730
- const u = Mn(c);
1729
+ }), s = $((c) => {
1730
+ const u = Nn(c);
1731
1731
  i == null || i.disconnect(), u && (i == null || i.observe(u)), r(u ? t(u) : null);
1732
1732
  }, [t, i]), [a, l] = ot(s);
1733
1733
  return T(() => ({
@@ -1740,7 +1740,7 @@ const io = [{
1740
1740
  sensor: _t,
1741
1741
  options: {}
1742
1742
  }, {
1743
- sensor: Bt,
1743
+ sensor: zt,
1744
1744
  options: {}
1745
1745
  }], so = {
1746
1746
  current: {}
@@ -1750,11 +1750,11 @@ const io = [{
1750
1750
  },
1751
1751
  droppable: {
1752
1752
  measure: en,
1753
- strategy: Te.WhileDragging,
1753
+ strategy: Ne.WhileDragging,
1754
1754
  frequency: Ot.Optimized
1755
1755
  },
1756
1756
  dragOverlay: {
1757
- measure: Le
1757
+ measure: Pe
1758
1758
  }
1759
1759
  };
1760
1760
  class Xe extends Map {
@@ -1802,7 +1802,7 @@ const ao = {
1802
1802
  measureDroppableContainers: lt,
1803
1803
  windowRect: null,
1804
1804
  measuringScheduled: !1
1805
- }, Nn = {
1805
+ }, Mn = {
1806
1806
  activatorEvent: null,
1807
1807
  activators: [],
1808
1808
  active: null,
@@ -1814,7 +1814,7 @@ const ao = {
1814
1814
  draggableNodes: /* @__PURE__ */ new Map(),
1815
1815
  over: null,
1816
1816
  measureDroppableContainers: lt
1817
- }, qe = /* @__PURE__ */ Ke(Nn), Ln = /* @__PURE__ */ Ke(ao);
1817
+ }, qe = /* @__PURE__ */ Ke(Mn), Ln = /* @__PURE__ */ Ke(ao);
1818
1818
  function lo() {
1819
1819
  return {
1820
1820
  draggable: {
@@ -1935,8 +1935,8 @@ function uo(e) {
1935
1935
  active: n,
1936
1936
  activatorEvent: r,
1937
1937
  draggableNodes: o
1938
- } = De(qe), i = it(r), s = it(n == null ? void 0 : n.id);
1939
- return P(() => {
1938
+ } = we(qe), i = it(r), s = it(n == null ? void 0 : n.id);
1939
+ return k(() => {
1940
1940
  if (!t && !r && i && s != null) {
1941
1941
  if (!ht(i) || document.activeElement === i.target)
1942
1942
  return;
@@ -2000,7 +2000,7 @@ function go(e) {
2000
2000
  initialRect: r,
2001
2001
  config: o = !0
2002
2002
  } = e;
2003
- const i = k(!1), {
2003
+ const i = B(!1), {
2004
2004
  x: s,
2005
2005
  y: a
2006
2006
  } = typeof o == "boolean" ? {
@@ -2019,8 +2019,8 @@ function go(e) {
2019
2019
  return;
2020
2020
  const u = n(c), d = wn(u, r);
2021
2021
  if (s || (d.x = 0), a || (d.y = 0), i.current = !0, Math.abs(d.x) > 0 || Math.abs(d.y) > 0) {
2022
- const h = Dn(c);
2023
- h && h.scrollBy({
2022
+ const g = Dn(c);
2023
+ g && g.scrollBy({
2024
2024
  top: d.y,
2025
2025
  left: d.x
2026
2026
  });
@@ -2032,10 +2032,10 @@ const vt = /* @__PURE__ */ Ke({
2032
2032
  scaleX: 1,
2033
2033
  scaleY: 1
2034
2034
  });
2035
- var xe;
2035
+ var ye;
2036
2036
  (function(e) {
2037
2037
  e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
2038
- })(xe || (xe = {}));
2038
+ })(ye || (ye = {}));
2039
2039
  const ho = /* @__PURE__ */ ut(function(t) {
2040
2040
  var n, r, o, i;
2041
2041
  let {
@@ -2045,171 +2045,171 @@ const ho = /* @__PURE__ */ ut(function(t) {
2045
2045
  children: c,
2046
2046
  sensors: u = io,
2047
2047
  collisionDetection: d = xr,
2048
- measuring: h,
2049
- modifiers: f,
2050
- ...m
2048
+ measuring: g,
2049
+ modifiers: h,
2050
+ ...b
2051
2051
  } = t;
2052
- const g = Nt(co, void 0, lo), [p, b] = g, [D, y] = dr(), [R, x] = V(xe.Uninitialized), w = R === xe.Initialized, {
2052
+ const f = Mt(co, void 0, lo), [p, m] = f, [w, y] = dr(), [C, x] = V(ye.Uninitialized), I = C === ye.Initialized, {
2053
2053
  draggable: {
2054
- active: I,
2054
+ active: R,
2055
2055
  nodes: E,
2056
- translate: N
2056
+ translate: M
2057
2057
  },
2058
2058
  droppable: {
2059
- containers: _
2059
+ containers: z
2060
2060
  }
2061
- } = p, A = I ? E.get(I) : null, Z = k({
2061
+ } = p, A = R ? E.get(R) : null, Q = B({
2062
2062
  initial: null,
2063
2063
  translated: null
2064
- }), Q = T(() => {
2065
- var K;
2066
- return I != null ? {
2067
- id: I,
2064
+ }), ee = T(() => {
2065
+ var U;
2066
+ return R != null ? {
2067
+ id: R,
2068
2068
  // It's possible for the active node to unmount while dragging
2069
- data: (K = A == null ? void 0 : A.data) != null ? K : so,
2070
- rect: Z
2069
+ data: (U = A == null ? void 0 : A.data) != null ? U : so,
2070
+ rect: Q
2071
2071
  } : null;
2072
- }, [I, A]), ne = k(null), [fe, Ce] = V(null), [W, Se] = V(null), pe = Ye(m, Object.values(m)), ve = Je("DndDescribedBy", s), Pe = T(() => _.getEnabled(), [_]), v = fo(h), {
2073
- droppableRects: C,
2074
- measureDroppableContainers: B,
2075
- measuringScheduled: L
2076
- } = Wr(Pe, {
2077
- dragging: w,
2078
- dependencies: [N.x, N.y],
2079
- config: v.droppable
2080
- }), M = Kr(E, I), q = T(() => W ? at(W) : null, [W]), H = Zn(), U = Jr(M, v.draggable.measure);
2072
+ }, [R, A]), J = B(null), [xe, De] = V(null), [q, Ce] = V(null), se = Ye(b, Object.values(b)), Se = Je("DndDescribedBy", s), v = T(() => z.getEnabled(), [z]), D = fo(g), {
2073
+ droppableRects: P,
2074
+ measureDroppableContainers: N,
2075
+ measuringScheduled: F
2076
+ } = Wr(v, {
2077
+ dragging: I,
2078
+ dependencies: [M.x, M.y],
2079
+ config: D.droppable
2080
+ }), H = Kr(E, R), K = T(() => q ? at(q) : null, [q]), G = Zn(), W = Jr(H, D.draggable.measure);
2081
2081
  go({
2082
- activeNode: I ? E.get(I) : null,
2083
- config: H.layoutShiftCompensation,
2084
- initialRect: U,
2085
- measure: v.draggable.measure
2082
+ activeNode: R ? E.get(R) : null,
2083
+ config: G.layoutShiftCompensation,
2084
+ initialRect: W,
2085
+ measure: D.draggable.measure
2086
2086
  });
2087
- const O = sn(M, v.draggable.measure, U), se = sn(M ? M.parentElement : null), G = k({
2087
+ const O = sn(H, D.draggable.measure, W), he = sn(H ? H.parentElement : null), L = B({
2088
2088
  activatorEvent: null,
2089
2089
  active: null,
2090
- activeNode: M,
2090
+ activeNode: H,
2091
2091
  collisionRect: null,
2092
2092
  collisions: null,
2093
- droppableRects: C,
2093
+ droppableRects: P,
2094
2094
  draggableNodes: E,
2095
2095
  draggingNode: null,
2096
2096
  draggingNodeRect: null,
2097
- droppableContainers: _,
2097
+ droppableContainers: z,
2098
2098
  over: null,
2099
2099
  scrollableAncestors: [],
2100
2100
  scrollAdjustedTranslate: null
2101
- }), j = _.getNodeFor((n = G.current.over) == null ? void 0 : n.id), ae = oo({
2102
- measure: v.dragOverlay.measure
2103
- }), be = (r = ae.nodeRef.current) != null ? r : M, Ie = w ? (o = ae.rect) != null ? o : O : null, Ft = !!(ae.nodeRef.current && ae.rect), Ht = Zr(Ft ? null : O), mt = Tn(be ? J(be) : null), me = Qr(w ? j ?? M : null), Ge = ro(me), Ze = Pn(f, {
2101
+ }), pe = z.getNodeFor((n = L.current.over) == null ? void 0 : n.id), ae = oo({
2102
+ measure: D.dragOverlay.measure
2103
+ }), Ie = (r = ae.nodeRef.current) != null ? r : H, Re = I ? (o = ae.rect) != null ? o : O : null, Ft = !!(ae.nodeRef.current && ae.rect), Ht = Zr(Ft ? null : O), mt = An(Ie ? Z(Ie) : null), ve = Qr(I ? pe ?? H : null), Ge = ro(ve), Ze = Pn(h, {
2104
2104
  transform: {
2105
- x: N.x - Ht.x,
2106
- y: N.y - Ht.y,
2105
+ x: M.x - Ht.x,
2106
+ y: M.y - Ht.y,
2107
2107
  scaleX: 1,
2108
2108
  scaleY: 1
2109
2109
  },
2110
- activatorEvent: W,
2111
- active: Q,
2110
+ activatorEvent: q,
2111
+ active: ee,
2112
2112
  activeNodeRect: O,
2113
- containerNodeRect: se,
2114
- draggingNodeRect: Ie,
2115
- over: G.current.over,
2113
+ containerNodeRect: he,
2114
+ draggingNodeRect: Re,
2115
+ over: L.current.over,
2116
2116
  overlayNodeRect: ae.rect,
2117
- scrollableAncestors: me,
2117
+ scrollableAncestors: ve,
2118
2118
  scrollableAncestorRects: Ge,
2119
2119
  windowRect: mt
2120
- }), Xt = q ? Ae(q, N) : null, Yt = eo(me), Vn = ln(Yt), Kn = ln(Yt, [O]), Re = Ae(Ze, Vn), Ee = Ie ? Sr(Ie, Ze) : null, ke = Q && Ee ? d({
2121
- active: Q,
2122
- collisionRect: Ee,
2123
- droppableRects: C,
2124
- droppableContainers: Pe,
2120
+ }), Xt = K ? Ae(K, M) : null, Yt = eo(ve), Vn = ln(Yt), Kn = ln(Yt, [O]), Ee = Ae(Ze, Vn), Oe = Re ? Sr(Re, Ze) : null, ke = ee && Oe ? d({
2121
+ active: ee,
2122
+ collisionRect: Oe,
2123
+ droppableRects: P,
2124
+ droppableContainers: v,
2125
2125
  pointerCoordinates: Xt
2126
- }) : null, Vt = yn(ke, "id"), [ye, Kt] = V(null), Un = Ft ? Ze : Ae(Ze, Kn), Wn = Dr(Un, (i = ye == null ? void 0 : ye.rect) != null ? i : null, O), Ut = z(
2127
- (K, ee) => {
2126
+ }) : null, Vt = yn(ke, "id"), [be, Kt] = V(null), Un = Ft ? Ze : Ae(Ze, Kn), Wn = Dr(Un, (i = be == null ? void 0 : be.rect) != null ? i : null, O), Ut = $(
2127
+ (U, te) => {
2128
2128
  let {
2129
- sensor: te,
2130
- options: we
2131
- } = ee;
2132
- if (ne.current == null)
2129
+ sensor: ne,
2130
+ options: me
2131
+ } = te;
2132
+ if (J.current == null)
2133
2133
  return;
2134
- const re = E.get(ne.current);
2134
+ const re = E.get(J.current);
2135
2135
  if (!re)
2136
2136
  return;
2137
- const le = K.nativeEvent, ge = new te({
2138
- active: ne.current,
2137
+ const le = U.nativeEvent, fe = new ne({
2138
+ active: J.current,
2139
2139
  activeNode: re,
2140
2140
  event: le,
2141
- options: we,
2141
+ options: me,
2142
2142
  // Sensors need to be instantiated with refs for arguments that change over time
2143
2143
  // otherwise they are frozen in time with the stale arguments
2144
- context: G,
2144
+ context: L,
2145
2145
  onStart(ce) {
2146
- const ze = ne.current;
2147
- if (ze == null)
2146
+ const Be = J.current;
2147
+ if (Be == null)
2148
2148
  return;
2149
- const Be = E.get(ze);
2150
- if (!Be)
2149
+ const ze = E.get(Be);
2150
+ if (!ze)
2151
2151
  return;
2152
2152
  const {
2153
2153
  onDragStart: Qe
2154
- } = pe.current, et = {
2154
+ } = se.current, et = {
2155
2155
  active: {
2156
- id: ze,
2157
- data: Be.data,
2158
- rect: Z
2156
+ id: Be,
2157
+ data: ze.data,
2158
+ rect: Q
2159
2159
  }
2160
2160
  };
2161
2161
  je(() => {
2162
- Qe == null || Qe(et), x(xe.Initializing), b({
2162
+ Qe == null || Qe(et), x(ye.Initializing), m({
2163
2163
  type: X.DragStart,
2164
2164
  initialCoordinates: ce,
2165
- active: ze
2166
- }), D({
2165
+ active: Be
2166
+ }), w({
2167
2167
  type: "onDragStart",
2168
2168
  event: et
2169
2169
  });
2170
2170
  });
2171
2171
  },
2172
2172
  onMove(ce) {
2173
- b({
2173
+ m({
2174
2174
  type: X.DragMove,
2175
2175
  coordinates: ce
2176
2176
  });
2177
2177
  },
2178
- onEnd: Oe(X.DragEnd),
2179
- onCancel: Oe(X.DragCancel)
2178
+ onEnd: Te(X.DragEnd),
2179
+ onCancel: Te(X.DragCancel)
2180
2180
  });
2181
2181
  je(() => {
2182
- Ce(ge), Se(K.nativeEvent);
2182
+ De(fe), Ce(U.nativeEvent);
2183
2183
  });
2184
- function Oe(ce) {
2184
+ function Te(ce) {
2185
2185
  return async function() {
2186
2186
  const {
2187
- active: Be,
2187
+ active: ze,
2188
2188
  collisions: Qe,
2189
2189
  over: et,
2190
2190
  scrollAdjustedTranslate: Jt
2191
- } = G.current;
2191
+ } = L.current;
2192
2192
  let $e = null;
2193
- if (Be && Jt) {
2193
+ if (ze && Jt) {
2194
2194
  const {
2195
2195
  cancelDrop: _e
2196
- } = pe.current;
2196
+ } = se.current;
2197
2197
  $e = {
2198
2198
  activatorEvent: le,
2199
- active: Be,
2199
+ active: ze,
2200
2200
  collisions: Qe,
2201
2201
  delta: Jt,
2202
2202
  over: et
2203
2203
  }, ce === X.DragEnd && typeof _e == "function" && await Promise.resolve(_e($e)) && (ce = X.DragCancel);
2204
2204
  }
2205
- ne.current = null, je(() => {
2206
- b({
2205
+ J.current = null, je(() => {
2206
+ m({
2207
2207
  type: ce
2208
- }), x(xe.Uninitialized), Kt(null), Ce(null), Se(null);
2208
+ }), x(ye.Uninitialized), Kt(null), De(null), Ce(null);
2209
2209
  const _e = ce === X.DragEnd ? "onDragEnd" : "onDragCancel";
2210
2210
  if ($e) {
2211
- const yt = pe.current[_e];
2212
- yt == null || yt($e), D({
2211
+ const yt = se.current[_e];
2212
+ yt == null || yt($e), w({
2213
2213
  type: _e,
2214
2214
  event: $e
2215
2215
  });
@@ -2220,85 +2220,85 @@ const ho = /* @__PURE__ */ ut(function(t) {
2220
2220
  },
2221
2221
  // eslint-disable-next-line react-hooks/exhaustive-deps
2222
2222
  [E]
2223
- ), Jn = z((K, ee) => (te, we) => {
2224
- const re = te.nativeEvent, le = E.get(we);
2223
+ ), Jn = $((U, te) => (ne, me) => {
2224
+ const re = ne.nativeEvent, le = E.get(me);
2225
2225
  if (
2226
2226
  // Another sensor is already instantiating
2227
- ne.current !== null || // No active draggable
2227
+ J.current !== null || // No active draggable
2228
2228
  !le || // Event has already been captured
2229
2229
  re.dndKit || re.defaultPrevented
2230
2230
  )
2231
2231
  return;
2232
- const ge = {
2232
+ const fe = {
2233
2233
  active: le
2234
2234
  };
2235
- K(te, ee.options, ge) === !0 && (re.dndKit = {
2236
- capturedBy: ee.sensor
2237
- }, ne.current = we, Ut(te, ee));
2235
+ U(ne, te.options, fe) === !0 && (re.dndKit = {
2236
+ capturedBy: te.sensor
2237
+ }, J.current = me, Ut(ne, te));
2238
2238
  }, [E, Ut]), Wt = Ur(u, Jn);
2239
2239
  to(u), ie(() => {
2240
- O && R === xe.Initializing && x(xe.Initialized);
2241
- }, [O, R]), P(
2240
+ O && C === ye.Initializing && x(ye.Initialized);
2241
+ }, [O, C]), k(
2242
2242
  () => {
2243
2243
  const {
2244
- onDragMove: K
2245
- } = pe.current, {
2246
- active: ee,
2247
- activatorEvent: te,
2248
- collisions: we,
2244
+ onDragMove: U
2245
+ } = se.current, {
2246
+ active: te,
2247
+ activatorEvent: ne,
2248
+ collisions: me,
2249
2249
  over: re
2250
- } = G.current;
2251
- if (!ee || !te)
2250
+ } = L.current;
2251
+ if (!te || !ne)
2252
2252
  return;
2253
2253
  const le = {
2254
- active: ee,
2255
- activatorEvent: te,
2256
- collisions: we,
2254
+ active: te,
2255
+ activatorEvent: ne,
2256
+ collisions: me,
2257
2257
  delta: {
2258
- x: Re.x,
2259
- y: Re.y
2258
+ x: Ee.x,
2259
+ y: Ee.y
2260
2260
  },
2261
2261
  over: re
2262
2262
  };
2263
2263
  je(() => {
2264
- K == null || K(le), D({
2264
+ U == null || U(le), w({
2265
2265
  type: "onDragMove",
2266
2266
  event: le
2267
2267
  });
2268
2268
  });
2269
2269
  },
2270
2270
  // eslint-disable-next-line react-hooks/exhaustive-deps
2271
- [Re.x, Re.y]
2272
- ), P(
2271
+ [Ee.x, Ee.y]
2272
+ ), k(
2273
2273
  () => {
2274
2274
  const {
2275
- active: K,
2276
- activatorEvent: ee,
2277
- collisions: te,
2278
- droppableContainers: we,
2275
+ active: U,
2276
+ activatorEvent: te,
2277
+ collisions: ne,
2278
+ droppableContainers: me,
2279
2279
  scrollAdjustedTranslate: re
2280
- } = G.current;
2281
- if (!K || ne.current == null || !ee || !re)
2280
+ } = L.current;
2281
+ if (!U || J.current == null || !te || !re)
2282
2282
  return;
2283
2283
  const {
2284
2284
  onDragOver: le
2285
- } = pe.current, ge = we.get(Vt), Oe = ge && ge.rect.current ? {
2286
- id: ge.id,
2287
- rect: ge.rect.current,
2288
- data: ge.data,
2289
- disabled: ge.disabled
2285
+ } = se.current, fe = me.get(Vt), Te = fe && fe.rect.current ? {
2286
+ id: fe.id,
2287
+ rect: fe.rect.current,
2288
+ data: fe.data,
2289
+ disabled: fe.disabled
2290
2290
  } : null, ce = {
2291
- active: K,
2292
- activatorEvent: ee,
2293
- collisions: te,
2291
+ active: U,
2292
+ activatorEvent: te,
2293
+ collisions: ne,
2294
2294
  delta: {
2295
2295
  x: re.x,
2296
2296
  y: re.y
2297
2297
  },
2298
- over: Oe
2298
+ over: Te
2299
2299
  };
2300
2300
  je(() => {
2301
- Kt(Oe), le == null || le(ce), D({
2301
+ Kt(Te), le == null || le(ce), w({
2302
2302
  type: "onDragOver",
2303
2303
  event: ce
2304
2304
  });
@@ -2307,84 +2307,84 @@ const ho = /* @__PURE__ */ ut(function(t) {
2307
2307
  // eslint-disable-next-line react-hooks/exhaustive-deps
2308
2308
  [Vt]
2309
2309
  ), ie(() => {
2310
- G.current = {
2311
- activatorEvent: W,
2312
- active: Q,
2313
- activeNode: M,
2314
- collisionRect: Ee,
2310
+ L.current = {
2311
+ activatorEvent: q,
2312
+ active: ee,
2313
+ activeNode: H,
2314
+ collisionRect: Oe,
2315
2315
  collisions: ke,
2316
- droppableRects: C,
2316
+ droppableRects: P,
2317
2317
  draggableNodes: E,
2318
- draggingNode: be,
2319
- draggingNodeRect: Ie,
2320
- droppableContainers: _,
2321
- over: ye,
2322
- scrollableAncestors: me,
2323
- scrollAdjustedTranslate: Re
2324
- }, Z.current = {
2325
- initial: Ie,
2326
- translated: Ee
2318
+ draggingNode: Ie,
2319
+ draggingNodeRect: Re,
2320
+ droppableContainers: z,
2321
+ over: be,
2322
+ scrollableAncestors: ve,
2323
+ scrollAdjustedTranslate: Ee
2324
+ }, Q.current = {
2325
+ initial: Re,
2326
+ translated: Oe
2327
2327
  };
2328
- }, [Q, M, ke, Ee, E, be, Ie, C, _, ye, me, Re]), Xr({
2329
- ...H,
2330
- delta: N,
2331
- draggingRect: Ee,
2328
+ }, [ee, H, ke, Oe, E, Ie, Re, P, z, be, ve, Ee]), Xr({
2329
+ ...G,
2330
+ delta: M,
2331
+ draggingRect: Oe,
2332
2332
  pointerCoordinates: Xt,
2333
- scrollableAncestors: me,
2333
+ scrollableAncestors: ve,
2334
2334
  scrollableAncestorRects: Ge
2335
2335
  });
2336
2336
  const qn = T(() => ({
2337
- active: Q,
2338
- activeNode: M,
2337
+ active: ee,
2338
+ activeNode: H,
2339
2339
  activeNodeRect: O,
2340
- activatorEvent: W,
2340
+ activatorEvent: q,
2341
2341
  collisions: ke,
2342
- containerNodeRect: se,
2342
+ containerNodeRect: he,
2343
2343
  dragOverlay: ae,
2344
2344
  draggableNodes: E,
2345
- droppableContainers: _,
2346
- droppableRects: C,
2347
- over: ye,
2348
- measureDroppableContainers: B,
2349
- scrollableAncestors: me,
2345
+ droppableContainers: z,
2346
+ droppableRects: P,
2347
+ over: be,
2348
+ measureDroppableContainers: N,
2349
+ scrollableAncestors: ve,
2350
2350
  scrollableAncestorRects: Ge,
2351
- measuringConfiguration: v,
2352
- measuringScheduled: L,
2351
+ measuringConfiguration: D,
2352
+ measuringScheduled: F,
2353
2353
  windowRect: mt
2354
- }), [Q, M, O, W, ke, se, ae, E, _, C, ye, B, me, Ge, v, L, mt]), Gn = T(() => ({
2355
- activatorEvent: W,
2354
+ }), [ee, H, O, q, ke, he, ae, E, z, P, be, N, ve, Ge, D, F, mt]), Gn = T(() => ({
2355
+ activatorEvent: q,
2356
2356
  activators: Wt,
2357
- active: Q,
2357
+ active: ee,
2358
2358
  activeNodeRect: O,
2359
2359
  ariaDescribedById: {
2360
- draggable: ve
2360
+ draggable: Se
2361
2361
  },
2362
- dispatch: b,
2362
+ dispatch: m,
2363
2363
  draggableNodes: E,
2364
- over: ye,
2365
- measureDroppableContainers: B
2366
- }), [W, Wt, Q, O, b, ve, E, ye, B]);
2367
- return F.createElement(vn.Provider, {
2364
+ over: be,
2365
+ measureDroppableContainers: N
2366
+ }), [q, Wt, ee, O, m, Se, E, be, N]);
2367
+ return j.createElement(vn.Provider, {
2368
2368
  value: y
2369
- }, F.createElement(qe.Provider, {
2369
+ }, j.createElement(qe.Provider, {
2370
2370
  value: Gn
2371
- }, F.createElement(Ln.Provider, {
2371
+ }, j.createElement(Ln.Provider, {
2372
2372
  value: qn
2373
- }, F.createElement(vt.Provider, {
2373
+ }, j.createElement(vt.Provider, {
2374
2374
  value: Wn
2375
- }, c)), F.createElement(uo, {
2375
+ }, c)), j.createElement(uo, {
2376
2376
  disabled: (a == null ? void 0 : a.restoreFocus) === !1
2377
- })), F.createElement(hr, {
2377
+ })), j.createElement(hr, {
2378
2378
  ...a,
2379
- hiddenTextDescribedById: ve
2379
+ hiddenTextDescribedById: Se
2380
2380
  }));
2381
2381
  function Zn() {
2382
- const K = (fe == null ? void 0 : fe.autoScrollEnabled) === !1, ee = typeof l == "object" ? l.enabled === !1 : l === !1, te = w && !K && !ee;
2382
+ const U = (xe == null ? void 0 : xe.autoScrollEnabled) === !1, te = typeof l == "object" ? l.enabled === !1 : l === !1, ne = I && !U && !te;
2383
2383
  return typeof l == "object" ? {
2384
2384
  ...l,
2385
- enabled: te
2385
+ enabled: ne
2386
2386
  } : {
2387
- enabled: te
2387
+ enabled: ne
2388
2388
  };
2389
2389
  }
2390
2390
  }), po = /* @__PURE__ */ Ke(null), cn = "button", vo = "Droppable";
@@ -2402,50 +2402,50 @@ function bo(e) {
2402
2402
  activeNodeRect: c,
2403
2403
  ariaDescribedById: u,
2404
2404
  draggableNodes: d,
2405
- over: h
2406
- } = De(qe), {
2407
- role: f = cn,
2408
- roleDescription: m = "draggable",
2409
- tabIndex: g = 0
2410
- } = o ?? {}, p = (l == null ? void 0 : l.id) === t, b = De(p ? vt : po), [D, y] = ot(), [R, x] = ot(), w = no(s, t), I = Ye(n);
2405
+ over: g
2406
+ } = we(qe), {
2407
+ role: h = cn,
2408
+ roleDescription: b = "draggable",
2409
+ tabIndex: f = 0
2410
+ } = o ?? {}, p = (l == null ? void 0 : l.id) === t, m = we(p ? vt : po), [w, y] = ot(), [C, x] = ot(), I = no(s, t), R = Ye(n);
2411
2411
  ie(
2412
2412
  () => (d.set(t, {
2413
2413
  id: t,
2414
2414
  key: i,
2415
- node: D,
2416
- activatorNode: R,
2417
- data: I
2415
+ node: w,
2416
+ activatorNode: C,
2417
+ data: R
2418
2418
  }), () => {
2419
- const N = d.get(t);
2420
- N && N.key === i && d.delete(t);
2419
+ const M = d.get(t);
2420
+ M && M.key === i && d.delete(t);
2421
2421
  }),
2422
2422
  // eslint-disable-next-line react-hooks/exhaustive-deps
2423
2423
  [d, t]
2424
2424
  );
2425
2425
  const E = T(() => ({
2426
- role: f,
2427
- tabIndex: g,
2426
+ role: h,
2427
+ tabIndex: f,
2428
2428
  "aria-disabled": r,
2429
- "aria-pressed": p && f === cn ? !0 : void 0,
2430
- "aria-roledescription": m,
2429
+ "aria-pressed": p && h === cn ? !0 : void 0,
2430
+ "aria-roledescription": b,
2431
2431
  "aria-describedby": u.draggable
2432
- }), [r, f, g, p, m, u.draggable]);
2432
+ }), [r, h, f, p, b, u.draggable]);
2433
2433
  return {
2434
2434
  active: l,
2435
2435
  activatorEvent: a,
2436
2436
  activeNodeRect: c,
2437
2437
  attributes: E,
2438
2438
  isDragging: p,
2439
- listeners: r ? void 0 : w,
2440
- node: D,
2441
- over: h,
2439
+ listeners: r ? void 0 : I,
2440
+ node: w,
2441
+ over: g,
2442
2442
  setNodeRef: y,
2443
2443
  setActivatorNodeRef: x,
2444
- transform: b
2444
+ transform: m
2445
2445
  };
2446
2446
  }
2447
2447
  function kn() {
2448
- return De(Ln);
2448
+ return we(Ln);
2449
2449
  }
2450
2450
  const mo = "Droppable", yo = {
2451
2451
  timeout: 25
@@ -2462,34 +2462,34 @@ function wo(e) {
2462
2462
  dispatch: a,
2463
2463
  over: l,
2464
2464
  measureDroppableContainers: c
2465
- } = De(qe), u = k({
2465
+ } = we(qe), u = B({
2466
2466
  disabled: n
2467
- }), d = k(!1), h = k(null), f = k(null), {
2468
- disabled: m,
2469
- updateMeasurementsFor: g,
2467
+ }), d = B(!1), g = B(null), h = B(null), {
2468
+ disabled: b,
2469
+ updateMeasurementsFor: f,
2470
2470
  timeout: p
2471
2471
  } = {
2472
2472
  ...yo,
2473
2473
  ...o
2474
- }, b = Ye(g ?? r), D = z(
2474
+ }, m = Ye(f ?? r), w = $(
2475
2475
  () => {
2476
2476
  if (!d.current) {
2477
2477
  d.current = !0;
2478
2478
  return;
2479
2479
  }
2480
- f.current != null && clearTimeout(f.current), f.current = setTimeout(() => {
2481
- c(Array.isArray(b.current) ? b.current : [b.current]), f.current = null;
2480
+ h.current != null && clearTimeout(h.current), h.current = setTimeout(() => {
2481
+ c(Array.isArray(m.current) ? m.current : [m.current]), h.current = null;
2482
2482
  }, p);
2483
2483
  },
2484
2484
  //eslint-disable-next-line react-hooks/exhaustive-deps
2485
2485
  [p]
2486
2486
  ), y = pt({
2487
- callback: D,
2488
- disabled: m || !s
2489
- }), R = z((E, N) => {
2490
- y && (N && (y.unobserve(N), d.current = !1), E && y.observe(E));
2491
- }, [y]), [x, w] = ot(R), I = Ye(t);
2492
- return P(() => {
2487
+ callback: w,
2488
+ disabled: b || !s
2489
+ }), C = $((E, M) => {
2490
+ y && (M && (y.unobserve(M), d.current = !1), E && y.observe(E));
2491
+ }, [y]), [x, I] = ot(C), R = Ye(t);
2492
+ return k(() => {
2493
2493
  !y || !x.current || (y.disconnect(), d.current = !1, y.observe(x.current));
2494
2494
  }, [x, y]), ie(
2495
2495
  () => (a({
@@ -2499,8 +2499,8 @@ function wo(e) {
2499
2499
  key: i,
2500
2500
  disabled: n,
2501
2501
  node: x,
2502
- rect: h,
2503
- data: I
2502
+ rect: g,
2503
+ data: R
2504
2504
  }
2505
2505
  }), () => a({
2506
2506
  type: X.UnregisterDroppable,
@@ -2509,7 +2509,7 @@ function wo(e) {
2509
2509
  })),
2510
2510
  // eslint-disable-next-line react-hooks/exhaustive-deps
2511
2511
  [r]
2512
- ), P(() => {
2512
+ ), k(() => {
2513
2513
  n !== u.current.disabled && (a({
2514
2514
  type: X.SetDroppableDisabled,
2515
2515
  id: r,
@@ -2518,11 +2518,11 @@ function wo(e) {
2518
2518
  }), u.current.disabled = n);
2519
2519
  }, [r, i, n, a]), {
2520
2520
  active: s,
2521
- rect: h,
2521
+ rect: g,
2522
2522
  isOver: (l == null ? void 0 : l.id) === r,
2523
2523
  node: x,
2524
2524
  over: l,
2525
- setNodeRef: w
2525
+ setNodeRef: I
2526
2526
  };
2527
2527
  }
2528
2528
  function xo(e) {
@@ -2542,7 +2542,7 @@ function xo(e) {
2542
2542
  Promise.resolve(t(c, i)).then(() => {
2543
2543
  o(null);
2544
2544
  });
2545
- }, [t, r, i]), F.createElement(F.Fragment, null, n, r ? er(r, {
2545
+ }, [t, r, i]), j.createElement(j.Fragment, null, n, r ? er(r, {
2546
2546
  ref: s
2547
2547
  }) : null);
2548
2548
  }
@@ -2556,9 +2556,9 @@ function Co(e) {
2556
2556
  let {
2557
2557
  children: t
2558
2558
  } = e;
2559
- return F.createElement(qe.Provider, {
2560
- value: Nn
2561
- }, F.createElement(vt.Provider, {
2559
+ return j.createElement(qe.Provider, {
2560
+ value: Mn
2561
+ }, j.createElement(vt.Provider, {
2562
2562
  value: Do
2563
2563
  }, t));
2564
2564
  }
@@ -2583,20 +2583,20 @@ const So = {
2583
2583
  ...c,
2584
2584
  scaleX: 1,
2585
2585
  scaleY: 1
2586
- }, h = {
2586
+ }, g = {
2587
2587
  ...So,
2588
2588
  width: a.width,
2589
2589
  height: a.height,
2590
2590
  top: a.top,
2591
2591
  left: a.left,
2592
- transform: he.Transform.toString(d),
2592
+ transform: ge.Transform.toString(d),
2593
2593
  transformOrigin: o && r ? vr(r, a) : void 0,
2594
2594
  transition: typeof u == "function" ? u(r) : u,
2595
2595
  ...l
2596
2596
  };
2597
- return F.createElement(n, {
2597
+ return j.createElement(n, {
2598
2598
  className: s,
2599
- style: h,
2599
+ style: g,
2600
2600
  ref: t
2601
2601
  }, i);
2602
2602
  }), Eo = (e) => (t) => {
@@ -2627,11 +2627,11 @@ const So = {
2627
2627
  }
2628
2628
  } = e;
2629
2629
  return [{
2630
- transform: he.Transform.toString(t)
2630
+ transform: ge.Transform.toString(t)
2631
2631
  }, {
2632
- transform: he.Transform.toString(n)
2632
+ transform: ge.Transform.toString(n)
2633
2633
  }];
2634
- }, At = {
2634
+ }, Tt = {
2635
2635
  duration: 250,
2636
2636
  easing: "ease",
2637
2637
  keyframes: Oo,
@@ -2643,7 +2643,7 @@ const So = {
2643
2643
  }
2644
2644
  })
2645
2645
  };
2646
- function Ao(e) {
2646
+ function To(e) {
2647
2647
  let {
2648
2648
  config: t,
2649
2649
  draggableNodes: n,
@@ -2659,16 +2659,16 @@ function Ao(e) {
2659
2659
  const l = a.node.current;
2660
2660
  if (!l)
2661
2661
  return;
2662
- const c = Mn(s);
2662
+ const c = Nn(s);
2663
2663
  if (!c)
2664
2664
  return;
2665
2665
  const {
2666
2666
  transform: u
2667
- } = J(s).getComputedStyle(s), d = xn(u);
2667
+ } = Z(s).getComputedStyle(s), d = xn(u);
2668
2668
  if (!d)
2669
2669
  return;
2670
- const h = typeof t == "function" ? t : To(t);
2671
- return On(l, o.draggable.measure), h({
2670
+ const g = typeof t == "function" ? t : Ao(t);
2671
+ return On(l, o.draggable.measure), g({
2672
2672
  active: {
2673
2673
  id: i,
2674
2674
  data: a.data,
@@ -2686,14 +2686,14 @@ function Ao(e) {
2686
2686
  });
2687
2687
  });
2688
2688
  }
2689
- function To(e) {
2689
+ function Ao(e) {
2690
2690
  const {
2691
2691
  duration: t,
2692
2692
  easing: n,
2693
2693
  sideEffects: r,
2694
2694
  keyframes: o
2695
2695
  } = {
2696
- ...At,
2696
+ ...Tt,
2697
2697
  ...e
2698
2698
  };
2699
2699
  return (i) => {
@@ -2711,45 +2711,45 @@ function To(e) {
2711
2711
  }, d = {
2712
2712
  scaleX: l.scaleX !== 1 ? s.rect.width * l.scaleX / a.rect.width : 1,
2713
2713
  scaleY: l.scaleY !== 1 ? s.rect.height * l.scaleY / a.rect.height : 1
2714
- }, h = {
2714
+ }, g = {
2715
2715
  x: l.x - u.x,
2716
2716
  y: l.y - u.y,
2717
2717
  ...d
2718
- }, f = o({
2718
+ }, h = o({
2719
2719
  ...c,
2720
2720
  active: s,
2721
2721
  dragOverlay: a,
2722
2722
  transform: {
2723
2723
  initial: l,
2724
- final: h
2724
+ final: g
2725
2725
  }
2726
- }), [m] = f, g = f[f.length - 1];
2727
- if (JSON.stringify(m) === JSON.stringify(g))
2726
+ }), [b] = h, f = h[h.length - 1];
2727
+ if (JSON.stringify(b) === JSON.stringify(f))
2728
2728
  return;
2729
2729
  const p = r == null ? void 0 : r({
2730
2730
  active: s,
2731
2731
  dragOverlay: a,
2732
2732
  ...c
2733
- }), b = a.node.animate(f, {
2733
+ }), m = a.node.animate(h, {
2734
2734
  duration: t,
2735
2735
  easing: n,
2736
2736
  fill: "forwards"
2737
2737
  });
2738
- return new Promise((D) => {
2739
- b.onfinish = () => {
2740
- p == null || p(), D();
2738
+ return new Promise((w) => {
2739
+ m.onfinish = () => {
2740
+ p == null || p(), w();
2741
2741
  };
2742
2742
  });
2743
2743
  };
2744
2744
  }
2745
2745
  let un = 0;
2746
- function Mo(e) {
2746
+ function No(e) {
2747
2747
  return T(() => {
2748
2748
  if (e != null)
2749
2749
  return un++, un;
2750
2750
  }, [e]);
2751
2751
  }
2752
- const No = /* @__PURE__ */ F.memo((e) => {
2752
+ const Mo = /* @__PURE__ */ j.memo((e) => {
2753
2753
  let {
2754
2754
  adjustScale: t = !1,
2755
2755
  children: n,
@@ -2764,38 +2764,38 @@ const No = /* @__PURE__ */ F.memo((e) => {
2764
2764
  const {
2765
2765
  activatorEvent: u,
2766
2766
  active: d,
2767
- activeNodeRect: h,
2768
- containerNodeRect: f,
2769
- draggableNodes: m,
2770
- droppableContainers: g,
2767
+ activeNodeRect: g,
2768
+ containerNodeRect: h,
2769
+ draggableNodes: b,
2770
+ droppableContainers: f,
2771
2771
  dragOverlay: p,
2772
- over: b,
2773
- measuringConfiguration: D,
2772
+ over: m,
2773
+ measuringConfiguration: w,
2774
2774
  scrollableAncestors: y,
2775
- scrollableAncestorRects: R,
2775
+ scrollableAncestorRects: C,
2776
2776
  windowRect: x
2777
- } = kn(), w = De(vt), I = Mo(d == null ? void 0 : d.id), E = Pn(s, {
2777
+ } = kn(), I = we(vt), R = No(d == null ? void 0 : d.id), E = Pn(s, {
2778
2778
  activatorEvent: u,
2779
2779
  active: d,
2780
- activeNodeRect: h,
2781
- containerNodeRect: f,
2780
+ activeNodeRect: g,
2781
+ containerNodeRect: h,
2782
2782
  draggingNodeRect: p.rect,
2783
- over: b,
2783
+ over: m,
2784
2784
  overlayNodeRect: p.rect,
2785
2785
  scrollableAncestors: y,
2786
- scrollableAncestorRects: R,
2787
- transform: w,
2786
+ scrollableAncestorRects: C,
2787
+ transform: I,
2788
2788
  windowRect: x
2789
- }), N = jt(h), _ = Ao({
2789
+ }), M = jt(g), z = To({
2790
2790
  config: r,
2791
- draggableNodes: m,
2792
- droppableContainers: g,
2793
- measuringConfiguration: D
2794
- }), A = N ? p.setRef : void 0;
2795
- return F.createElement(Co, null, F.createElement(xo, {
2796
- animation: _
2797
- }, d && I ? F.createElement(Ro, {
2798
- key: I,
2791
+ draggableNodes: b,
2792
+ droppableContainers: f,
2793
+ measuringConfiguration: w
2794
+ }), A = M ? p.setRef : void 0;
2795
+ return j.createElement(Co, null, j.createElement(xo, {
2796
+ animation: z
2797
+ }, d && R ? j.createElement(Ro, {
2798
+ key: R,
2799
2799
  id: d.id,
2800
2800
  ref: A,
2801
2801
  as: a,
@@ -2803,7 +2803,7 @@ const No = /* @__PURE__ */ F.memo((e) => {
2803
2803
  adjustScale: t,
2804
2804
  className: l,
2805
2805
  transition: i,
2806
- rect: N,
2806
+ rect: M,
2807
2807
  style: {
2808
2808
  zIndex: c,
2809
2809
  ...o
@@ -2840,7 +2840,7 @@ function ko(e) {
2840
2840
  droppable: e
2841
2841
  } : e;
2842
2842
  }
2843
- const zn = (e) => {
2843
+ const Bn = (e) => {
2844
2844
  let {
2845
2845
  rects: t,
2846
2846
  activeIndex: n,
@@ -2857,7 +2857,7 @@ const zn = (e) => {
2857
2857
  }, nt = {
2858
2858
  scaleX: 1,
2859
2859
  scaleY: 1
2860
- }, zo = (e) => {
2860
+ }, Bo = (e) => {
2861
2861
  var t;
2862
2862
  let {
2863
2863
  activeIndex: n,
@@ -2877,7 +2877,7 @@ const zn = (e) => {
2877
2877
  ...nt
2878
2878
  } : null;
2879
2879
  }
2880
- const l = Bo(i, o, n);
2880
+ const l = zo(i, o, n);
2881
2881
  return o > n && o <= s ? {
2882
2882
  x: 0,
2883
2883
  y: -a.height - l,
@@ -2892,19 +2892,19 @@ const zn = (e) => {
2892
2892
  ...nt
2893
2893
  };
2894
2894
  };
2895
- function Bo(e, t, n) {
2895
+ function zo(e, t, n) {
2896
2896
  const r = e[t], o = e[t - 1], i = e[t + 1];
2897
2897
  return r ? n < t ? o ? r.top - (o.top + o.height) : i ? i.top - (r.top + r.height) : 0 : i ? i.top - (r.top + r.height) : o ? r.top - (o.top + o.height) : 0 : 0;
2898
2898
  }
2899
- const Bn = "Sortable", $n = /* @__PURE__ */ F.createContext({
2899
+ const zn = "Sortable", $n = /* @__PURE__ */ j.createContext({
2900
2900
  activeIndex: -1,
2901
- containerId: Bn,
2901
+ containerId: zn,
2902
2902
  disableTransforms: !1,
2903
2903
  items: [],
2904
2904
  overIndex: -1,
2905
2905
  useDragOverlay: !1,
2906
2906
  sortedRects: [],
2907
- strategy: zn,
2907
+ strategy: Bn,
2908
2908
  disabled: {
2909
2909
  draggable: !1,
2910
2910
  droppable: !1
@@ -2915,7 +2915,7 @@ function $o(e) {
2915
2915
  children: t,
2916
2916
  id: n,
2917
2917
  items: r,
2918
- strategy: o = zn,
2918
+ strategy: o = Bn,
2919
2919
  disabled: i = !1
2920
2920
  } = e;
2921
2921
  const {
@@ -2924,28 +2924,28 @@ function $o(e) {
2924
2924
  droppableRects: l,
2925
2925
  over: c,
2926
2926
  measureDroppableContainers: u
2927
- } = kn(), d = Je(Bn, n), h = a.rect !== null, f = T(() => r.map((w) => typeof w == "object" && "id" in w ? w.id : w), [r]), m = s != null, g = s ? f.indexOf(s.id) : -1, p = c ? f.indexOf(c.id) : -1, b = k(f), D = !Po(f, b.current), y = p !== -1 && g === -1 || D, R = ko(i);
2927
+ } = kn(), d = Je(zn, n), g = a.rect !== null, h = T(() => r.map((I) => typeof I == "object" && "id" in I ? I.id : I), [r]), b = s != null, f = s ? h.indexOf(s.id) : -1, p = c ? h.indexOf(c.id) : -1, m = B(h), w = !Po(h, m.current), y = p !== -1 && f === -1 || w, C = ko(i);
2928
2928
  ie(() => {
2929
- D && m && u(f);
2930
- }, [D, f, m, u]), P(() => {
2931
- b.current = f;
2932
- }, [f]);
2929
+ w && b && u(h);
2930
+ }, [w, h, b, u]), k(() => {
2931
+ m.current = h;
2932
+ }, [h]);
2933
2933
  const x = T(
2934
2934
  () => ({
2935
- activeIndex: g,
2935
+ activeIndex: f,
2936
2936
  containerId: d,
2937
- disabled: R,
2937
+ disabled: C,
2938
2938
  disableTransforms: y,
2939
- items: f,
2939
+ items: h,
2940
2940
  overIndex: p,
2941
- useDragOverlay: h,
2942
- sortedRects: Lo(f, l),
2941
+ useDragOverlay: g,
2942
+ sortedRects: Lo(h, l),
2943
2943
  strategy: o
2944
2944
  }),
2945
2945
  // eslint-disable-next-line react-hooks/exhaustive-deps
2946
- [g, d, R.draggable, R.droppable, y, f, p, l, h, o]
2946
+ [f, d, C.draggable, C.droppable, y, h, p, l, g, o]
2947
2947
  );
2948
- return F.createElement($n.Provider, {
2948
+ return j.createElement($n.Provider, {
2949
2949
  value: x
2950
2950
  }, t);
2951
2951
  }
@@ -2973,7 +2973,7 @@ const _o = (e) => {
2973
2973
  }, Fo = {
2974
2974
  duration: 200,
2975
2975
  easing: "ease"
2976
- }, _n = "transform", Ho = /* @__PURE__ */ he.Transition.toString({
2976
+ }, _n = "transform", Ho = /* @__PURE__ */ ge.Transition.toString({
2977
2977
  property: _n,
2978
2978
  duration: 0,
2979
2979
  easing: "linear"
@@ -2987,12 +2987,12 @@ function Yo(e) {
2987
2987
  node: r,
2988
2988
  rect: o
2989
2989
  } = e;
2990
- const [i, s] = V(null), a = k(n);
2990
+ const [i, s] = V(null), a = B(n);
2991
2991
  return ie(() => {
2992
2992
  if (!t && n !== a.current && r.current) {
2993
2993
  const l = o.current;
2994
2994
  if (l) {
2995
- const c = Le(r.current, {
2995
+ const c = Pe(r.current, {
2996
2996
  ignoreTransform: !0
2997
2997
  }), u = {
2998
2998
  x: l.left - c.left,
@@ -3004,7 +3004,7 @@ function Yo(e) {
3004
3004
  }
3005
3005
  }
3006
3006
  n !== a.current && (a.current = n);
3007
- }, [t, n, r, o]), P(() => {
3007
+ }, [t, n, r, o]), k(() => {
3008
3008
  i && s(null);
3009
3009
  }, [i]), i;
3010
3010
  }
@@ -3023,44 +3023,44 @@ function Vo(e) {
3023
3023
  const {
3024
3024
  items: u,
3025
3025
  containerId: d,
3026
- activeIndex: h,
3027
- disabled: f,
3028
- disableTransforms: m,
3029
- sortedRects: g,
3026
+ activeIndex: g,
3027
+ disabled: h,
3028
+ disableTransforms: b,
3029
+ sortedRects: f,
3030
3030
  overIndex: p,
3031
- useDragOverlay: b,
3032
- strategy: D
3033
- } = De($n), y = Ko(r, f), R = u.indexOf(s), x = T(() => ({
3031
+ useDragOverlay: m,
3032
+ strategy: w
3033
+ } = we($n), y = Ko(r, h), C = u.indexOf(s), x = T(() => ({
3034
3034
  sortable: {
3035
3035
  containerId: d,
3036
- index: R,
3036
+ index: C,
3037
3037
  items: u
3038
3038
  },
3039
3039
  ...o
3040
- }), [d, o, R, u]), w = T(() => u.slice(u.indexOf(s)), [u, s]), {
3041
- rect: I,
3040
+ }), [d, o, C, u]), I = T(() => u.slice(u.indexOf(s)), [u, s]), {
3041
+ rect: R,
3042
3042
  node: E,
3043
- isOver: N,
3044
- setNodeRef: _
3043
+ isOver: M,
3044
+ setNodeRef: z
3045
3045
  } = wo({
3046
3046
  id: s,
3047
3047
  data: x,
3048
3048
  disabled: y.droppable,
3049
3049
  resizeObserverConfig: {
3050
- updateMeasurementsFor: w,
3050
+ updateMeasurementsFor: I,
3051
3051
  ...l
3052
3052
  }
3053
3053
  }), {
3054
3054
  active: A,
3055
- activatorEvent: Z,
3056
- activeNodeRect: Q,
3057
- attributes: ne,
3058
- setNodeRef: fe,
3059
- listeners: Ce,
3060
- isDragging: W,
3061
- over: Se,
3062
- setActivatorNodeRef: pe,
3063
- transform: ve
3055
+ activatorEvent: Q,
3056
+ activeNodeRect: ee,
3057
+ attributes: J,
3058
+ setNodeRef: xe,
3059
+ listeners: De,
3060
+ isDragging: q,
3061
+ over: Ce,
3062
+ setActivatorNodeRef: se,
3063
+ transform: Se
3064
3064
  } = bo({
3065
3065
  id: s,
3066
3066
  data: x,
@@ -3069,86 +3069,86 @@ function Vo(e) {
3069
3069
  ...n
3070
3070
  },
3071
3071
  disabled: y.draggable
3072
- }), Pe = tr(_, fe), v = !!A, C = v && !m && tt(h) && tt(p), B = !b && W, L = B && C ? ve : null, q = C ? L ?? (a ?? D)({
3073
- rects: g,
3074
- activeNodeRect: Q,
3075
- activeIndex: h,
3072
+ }), v = tr(z, xe), D = !!A, P = D && !b && tt(g) && tt(p), N = !m && q, F = N && P ? Se : null, K = P ? F ?? (a ?? w)({
3073
+ rects: f,
3074
+ activeNodeRect: ee,
3075
+ activeIndex: g,
3076
3076
  overIndex: p,
3077
- index: R
3078
- }) : null, H = tt(h) && tt(p) ? i({
3077
+ index: C
3078
+ }) : null, G = tt(g) && tt(p) ? i({
3079
3079
  id: s,
3080
3080
  items: u,
3081
- activeIndex: h,
3081
+ activeIndex: g,
3082
3082
  overIndex: p
3083
- }) : R, U = A == null ? void 0 : A.id, O = k({
3084
- activeId: U,
3083
+ }) : C, W = A == null ? void 0 : A.id, O = B({
3084
+ activeId: W,
3085
3085
  items: u,
3086
- newIndex: H,
3086
+ newIndex: G,
3087
3087
  containerId: d
3088
- }), se = u !== O.current.items, G = t({
3088
+ }), he = u !== O.current.items, L = t({
3089
3089
  active: A,
3090
3090
  containerId: d,
3091
- isDragging: W,
3092
- isSorting: v,
3091
+ isDragging: q,
3092
+ isSorting: D,
3093
3093
  id: s,
3094
- index: R,
3094
+ index: C,
3095
3095
  items: u,
3096
3096
  newIndex: O.current.newIndex,
3097
3097
  previousItems: O.current.items,
3098
3098
  previousContainerId: O.current.containerId,
3099
3099
  transition: c,
3100
3100
  wasDragging: O.current.activeId != null
3101
- }), j = Yo({
3102
- disabled: !G,
3103
- index: R,
3101
+ }), pe = Yo({
3102
+ disabled: !L,
3103
+ index: C,
3104
3104
  node: E,
3105
- rect: I
3105
+ rect: R
3106
3106
  });
3107
- return P(() => {
3108
- v && O.current.newIndex !== H && (O.current.newIndex = H), d !== O.current.containerId && (O.current.containerId = d), u !== O.current.items && (O.current.items = u);
3109
- }, [v, H, d, u]), P(() => {
3110
- if (U === O.current.activeId)
3107
+ return k(() => {
3108
+ D && O.current.newIndex !== G && (O.current.newIndex = G), d !== O.current.containerId && (O.current.containerId = d), u !== O.current.items && (O.current.items = u);
3109
+ }, [D, G, d, u]), k(() => {
3110
+ if (W === O.current.activeId)
3111
3111
  return;
3112
- if (U && !O.current.activeId) {
3113
- O.current.activeId = U;
3112
+ if (W && !O.current.activeId) {
3113
+ O.current.activeId = W;
3114
3114
  return;
3115
3115
  }
3116
- const be = setTimeout(() => {
3117
- O.current.activeId = U;
3116
+ const Ie = setTimeout(() => {
3117
+ O.current.activeId = W;
3118
3118
  }, 50);
3119
- return () => clearTimeout(be);
3120
- }, [U]), {
3119
+ return () => clearTimeout(Ie);
3120
+ }, [W]), {
3121
3121
  active: A,
3122
- activeIndex: h,
3123
- attributes: ne,
3122
+ activeIndex: g,
3123
+ attributes: J,
3124
3124
  data: x,
3125
- rect: I,
3126
- index: R,
3127
- newIndex: H,
3125
+ rect: R,
3126
+ index: C,
3127
+ newIndex: G,
3128
3128
  items: u,
3129
- isOver: N,
3130
- isSorting: v,
3131
- isDragging: W,
3132
- listeners: Ce,
3129
+ isOver: M,
3130
+ isSorting: D,
3131
+ isDragging: q,
3132
+ listeners: De,
3133
3133
  node: E,
3134
3134
  overIndex: p,
3135
- over: Se,
3136
- setNodeRef: Pe,
3137
- setActivatorNodeRef: pe,
3138
- setDroppableNodeRef: _,
3139
- setDraggableNodeRef: fe,
3140
- transform: j ?? q,
3135
+ over: Ce,
3136
+ setNodeRef: v,
3137
+ setActivatorNodeRef: se,
3138
+ setDroppableNodeRef: z,
3139
+ setDraggableNodeRef: xe,
3140
+ transform: pe ?? K,
3141
3141
  transition: ae()
3142
3142
  };
3143
3143
  function ae() {
3144
3144
  if (
3145
3145
  // Temporarily disable transitions for a single frame to set up derived transforms
3146
- j || // Or to prevent items jumping to back to their "new" position when items change
3147
- se && O.current.newIndex === R
3146
+ pe || // Or to prevent items jumping to back to their "new" position when items change
3147
+ he && O.current.newIndex === C
3148
3148
  )
3149
3149
  return Ho;
3150
- if (!(B && !ht(Z) || !c) && (v || G))
3151
- return he.Transition.toString({
3150
+ if (!(N && !ht(Q) || !c) && (D || L))
3151
+ return ge.Transition.toString({
3152
3152
  ...c,
3153
3153
  property: _n
3154
3154
  });
@@ -3170,15 +3170,15 @@ const Uo = /iPad|iPhone|iPod/.test(navigator.platform);
3170
3170
  function Wo(e, t) {
3171
3171
  return Math.round(e / t);
3172
3172
  }
3173
- function Tt(e, t, n, r, o) {
3174
- const i = e.findIndex(({ id: b }) => b === n), s = e.findIndex(({ id: b }) => b === t), a = e[s], l = Ve(e, s, i), c = l[i - 1], u = l[i + 1], d = Wo(r, o), h = a.depth + d, f = Jo({
3173
+ function At(e, t, n, r, o) {
3174
+ const i = e.findIndex(({ id: m }) => m === n), s = e.findIndex(({ id: m }) => m === t), a = e[s], l = Ve(e, s, i), c = l[i - 1], u = l[i + 1], d = Wo(r, o), g = a.depth + d, h = Jo({
3175
3175
  previousItem: c
3176
- }), m = qo({ nextItem: u });
3177
- let g = h;
3178
- return h >= f ? g = f : h < m && (g = m), { depth: g, maxDepth: f, minDepth: m, parentId: p() };
3176
+ }), b = qo({ nextItem: u });
3177
+ let f = g;
3178
+ return g >= h ? f = h : g < b && (f = b), { depth: f, maxDepth: h, minDepth: b, parentId: p() };
3179
3179
  function p() {
3180
- var D;
3181
- return g === 0 || !c ? null : g === c.depth ? c.parentId : g > c.depth ? c.id : ((D = l.slice(0, i).reverse().find((y) => y.depth === g)) == null ? void 0 : D.parentId) ?? null;
3180
+ var w;
3181
+ return f === 0 || !c ? null : f === c.depth ? c.parentId : f > c.depth ? c.id : ((w = l.slice(0, i).reverse().find((y) => y.depth === f)) == null ? void 0 : w.parentId) ?? null;
3182
3182
  }
3183
3183
  }
3184
3184
  function Jo({ previousItem: e }) {
@@ -3208,64 +3208,68 @@ function Qo(e, t) {
3208
3208
  return Fn(e, t);
3209
3209
  }
3210
3210
  function ei(e, t) {
3211
- const { items: n, itemMap: r } = e, o = new Map(r);
3212
- function i(a) {
3213
- return a.filter((l) => l.id === t ? (o.delete(t), !1) : (l.children.length && (l.children = i(l.children)), !0));
3211
+ function n(o) {
3212
+ return o.filter((i) => i.id !== t).map((i) => ({
3213
+ ...i,
3214
+ children: n(i.children || [])
3215
+ }));
3214
3216
  }
3215
- return { items: i(n), itemMap: o };
3217
+ return n(e);
3216
3218
  }
3217
3219
  function ti(e, t, n) {
3218
- const { items: r, itemMap: o } = e, i = Fn(e, t);
3219
- if (!i) return e;
3220
- const s = { ...i, ...n(i) }, a = new Map(o);
3221
- a.set(t, s);
3222
- function l(u) {
3223
- return u.map((d) => d.id === t ? (s.children && s.children.forEach((h) => {
3224
- a.set(h.id, h);
3225
- }), s) : d.children.length ? { ...d, children: l(d.children) } : d);
3220
+ function r(i) {
3221
+ return i.map((s) => {
3222
+ if (s.id === t) {
3223
+ const a = { ...s, ...n(s) };
3224
+ return a.children && a.children.length > 0 && (a.children = r(a.children)), a;
3225
+ } else return s.children && s.children.length > 0 ? {
3226
+ ...s,
3227
+ children: r(s.children)
3228
+ } : s;
3229
+ });
3226
3230
  }
3227
- return { items: l(r), itemMap: a };
3231
+ return r(e);
3228
3232
  }
3229
3233
  function Fn(e, t) {
3230
- const { itemMap: n } = e;
3231
- return n.get(t);
3232
- }
3233
- function ni(e) {
3234
- const t = /* @__PURE__ */ new Map();
3235
- function n(r) {
3236
- t.set(r.id, r), r.children.forEach(n);
3234
+ for (const n of e) {
3235
+ if (n.id === t)
3236
+ return n;
3237
+ if (n.children && n.children.length > 0) {
3238
+ const r = Fn(n.children, t);
3239
+ if (r)
3240
+ return r;
3241
+ }
3237
3242
  }
3238
- return e.forEach(n), { items: e, itemMap: t };
3239
3243
  }
3240
3244
  function Hn(e, t = 0) {
3241
3245
  return e.reduce((n, { children: r }) => r.length ? Hn(r, n + 1) : n + 1, t);
3242
3246
  }
3243
- function ri(e, t) {
3247
+ function ni(e, t) {
3244
3248
  const n = Qo(e, t);
3245
3249
  return n ? Hn(n.children) : 0;
3246
3250
  }
3247
- function oi(e, t) {
3251
+ function ri(e, t) {
3248
3252
  const n = [...t];
3249
3253
  return e.filter((r) => r.parentId && n.includes(r.parentId) ? (r.children.length && n.push(r.id), !1) : !0);
3250
3254
  }
3251
- const ii = [
3255
+ const oi = [
3252
3256
  S.Down,
3253
3257
  S.Right,
3254
3258
  S.Up,
3255
3259
  S.Left
3256
- ], si = [S.Left, S.Right], ai = (e, t, n) => (r, {
3260
+ ], ii = [S.Left, S.Right], si = (e, t, n) => (r, {
3257
3261
  currentCoordinates: o,
3258
3262
  context: { active: i, over: s, collisionRect: a, droppableRects: l, droppableContainers: c }
3259
3263
  }) => {
3260
- if (ii.includes(r.code)) {
3264
+ if (oi.includes(r.code)) {
3261
3265
  if (!i || !a)
3262
3266
  return;
3263
3267
  r.preventDefault();
3264
3268
  const {
3265
3269
  current: { items: u, offset: d }
3266
3270
  } = e;
3267
- if (si.includes(r.code) && (s != null && s.id)) {
3268
- const { depth: g, maxDepth: p, minDepth: b } = Tt(
3271
+ if (ii.includes(r.code) && (s != null && s.id)) {
3272
+ const { depth: f, maxDepth: p, minDepth: m } = At(
3269
3273
  u,
3270
3274
  i.id,
3271
3275
  s.id,
@@ -3274,14 +3278,14 @@ const ii = [
3274
3278
  );
3275
3279
  switch (r.code) {
3276
3280
  case S.Left:
3277
- if (g > b)
3281
+ if (f > m)
3278
3282
  return {
3279
3283
  ...o,
3280
3284
  x: o.x - n
3281
3285
  };
3282
3286
  break;
3283
3287
  case S.Right:
3284
- if (g < p)
3288
+ if (f < p)
3285
3289
  return {
3286
3290
  ...o,
3287
3291
  x: o.x + n
@@ -3290,63 +3294,63 @@ const ii = [
3290
3294
  }
3291
3295
  return;
3292
3296
  }
3293
- const h = [];
3294
- c.forEach((g) => {
3295
- if (g != null && g.disabled || g.id === (s == null ? void 0 : s.id))
3297
+ const g = [];
3298
+ c.forEach((f) => {
3299
+ if (f != null && f.disabled || f.id === (s == null ? void 0 : s.id))
3296
3300
  return;
3297
- const p = l.get(g.id);
3301
+ const p = l.get(f.id);
3298
3302
  if (p)
3299
3303
  switch (r.code) {
3300
3304
  case S.Down:
3301
- a.top < p.top && h.push(g);
3305
+ a.top < p.top && g.push(f);
3302
3306
  break;
3303
3307
  case S.Up:
3304
- a.top > p.top && h.push(g);
3308
+ a.top > p.top && g.push(f);
3305
3309
  break;
3306
3310
  }
3307
3311
  });
3308
- const f = yr({
3312
+ const h = yr({
3309
3313
  active: i,
3310
3314
  collisionRect: a,
3311
3315
  pointerCoordinates: null,
3312
3316
  droppableRects: l,
3313
- droppableContainers: h
3317
+ droppableContainers: g
3314
3318
  });
3315
- let m = yn(f, "id");
3316
- if (m === (s == null ? void 0 : s.id) && f.length > 1 && (m = f[1].id), m && (s != null && s.id)) {
3317
- const g = l.get(i.id), p = l.get(m), b = c.get(m);
3318
- if (g && p && b) {
3319
- const D = u.findIndex(({ id: w }) => w === m), y = u[D], R = u.findIndex(({ id: w }) => w === i.id), x = u[R];
3319
+ let b = yn(h, "id");
3320
+ if (b === (s == null ? void 0 : s.id) && h.length > 1 && (b = h[1].id), b && (s != null && s.id)) {
3321
+ const f = l.get(i.id), p = l.get(b), m = c.get(b);
3322
+ if (f && p && m) {
3323
+ const w = u.findIndex(({ id: I }) => I === b), y = u[w], C = u.findIndex(({ id: I }) => I === i.id), x = u[C];
3320
3324
  if (y && x) {
3321
- const { depth: w } = Tt(
3325
+ const { depth: I } = At(
3322
3326
  u,
3323
3327
  i.id,
3324
- m,
3328
+ b,
3325
3329
  (y.depth - x.depth) * n,
3326
3330
  n
3327
- ), E = D > R ? 1 : -1, N = t ? (a.height - g.height) / 2 : 0;
3331
+ ), E = w > C ? 1 : -1, M = t ? (a.height - f.height) / 2 : 0;
3328
3332
  return {
3329
- x: p.left + w * n,
3330
- y: p.top + E * N
3333
+ x: p.left + I * n,
3334
+ y: p.top + E * M
3331
3335
  };
3332
3336
  }
3333
3337
  }
3334
3338
  }
3335
3339
  }
3336
- }, li = "_Wrapper_wguit_1", ci = "_clone_wguit_8", ui = "_TreeItem_wguit_16", di = "_ghost_wguit_23", fi = "_indicator_wguit_23", gi = "_Text_wguit_78", hi = "_Count_wguit_90", pi = "_disableInteraction_wguit_106", vi = "_disableSelection_wguit_110", bi = "_Collapse_wguit_118", mi = "_collapsed_wguit_122", ue = {
3337
- Wrapper: li,
3338
- clone: ci,
3339
- TreeItem: ui,
3340
- ghost: di,
3341
- indicator: fi,
3342
- Text: gi,
3343
- Count: hi,
3344
- disableInteraction: pi,
3345
- disableSelection: vi,
3346
- Collapse: bi,
3347
- collapsed: mi
3340
+ }, ai = "_Wrapper_wguit_1", li = "_clone_wguit_8", ci = "_TreeItem_wguit_16", ui = "_ghost_wguit_23", di = "_indicator_wguit_23", fi = "_Text_wguit_78", gi = "_Count_wguit_90", hi = "_disableInteraction_wguit_106", pi = "_disableSelection_wguit_110", vi = "_Collapse_wguit_118", bi = "_collapsed_wguit_122", ue = {
3341
+ Wrapper: ai,
3342
+ clone: li,
3343
+ TreeItem: ci,
3344
+ ghost: ui,
3345
+ indicator: di,
3346
+ Text: fi,
3347
+ Count: gi,
3348
+ disableInteraction: hi,
3349
+ disableSelection: pi,
3350
+ Collapse: vi,
3351
+ collapsed: bi
3348
3352
  };
3349
- function yi(e) {
3353
+ function mi(e) {
3350
3354
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
3351
3355
  }
3352
3356
  var Xn = { exports: {} };
@@ -3385,16 +3389,16 @@ var Xn = { exports: {} };
3385
3389
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
3386
3390
  })();
3387
3391
  })(Xn);
3388
- var wi = Xn.exports;
3389
- const Mt = /* @__PURE__ */ yi(wi), xi = "_Action_7i4a4_1", Di = {
3390
- Action: xi
3392
+ var yi = Xn.exports;
3393
+ const Nt = /* @__PURE__ */ mi(yi), wi = "_Action_7i4a4_1", xi = {
3394
+ Action: wi
3391
3395
  }, bt = dt(
3392
- ({ active: e, className: t, cursor: n, style: r, ...o }, i) => /* @__PURE__ */ $(
3396
+ ({ active: e, className: t, cursor: n, style: r, ...o }, i) => /* @__PURE__ */ _(
3393
3397
  "button",
3394
3398
  {
3395
3399
  ref: i,
3396
3400
  ...o,
3397
- className: Mt(Di.Action, t),
3401
+ className: Nt(xi.Action, t),
3398
3402
  tabIndex: 0,
3399
3403
  style: {
3400
3404
  ...r,
@@ -3404,9 +3408,9 @@ const Mt = /* @__PURE__ */ yi(wi), xi = "_Action_7i4a4_1", Di = {
3404
3408
  }
3405
3409
  }
3406
3410
  )
3407
- ), Ci = dt((e, t) => /* @__PURE__ */ $(bt, { ref: t, cursor: "grab", "data-cypress": "draggable-handle", ...e, children: /* @__PURE__ */ $("svg", { viewBox: "0 0 20 20", width: "12", children: /* @__PURE__ */ $("path", { d: "M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z" }) }) }));
3408
- function Si(e) {
3409
- return /* @__PURE__ */ $(
3411
+ ), Di = dt((e, t) => /* @__PURE__ */ _(bt, { ref: t, cursor: "grab", "data-cypress": "draggable-handle", ...e, children: /* @__PURE__ */ _("svg", { viewBox: "0 0 20 20", width: "12", children: /* @__PURE__ */ _("path", { d: "M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z" }) }) }));
3412
+ function Ci(e) {
3413
+ return /* @__PURE__ */ _(
3410
3414
  bt,
3411
3415
  {
3412
3416
  ...e,
@@ -3414,7 +3418,7 @@ function Si(e) {
3414
3418
  fill: "rgba(255, 70, 70, 0.95)",
3415
3419
  background: "rgba(255, 70, 70, 0.1)"
3416
3420
  },
3417
- children: /* @__PURE__ */ $(
3421
+ children: /* @__PURE__ */ _(
3418
3422
  "svg",
3419
3423
  {
3420
3424
  width: "18",
@@ -3422,14 +3426,14 @@ function Si(e) {
3422
3426
  viewBox: "0 0 18 18",
3423
3427
  fill: "none",
3424
3428
  xmlns: "http://www.w3.org/2000/svg",
3425
- children: /* @__PURE__ */ $("path", { d: "M5.5 1C5.22386 1 5 1.22386 5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5H10H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5ZM5 4H10V12H5V4Z" })
3429
+ children: /* @__PURE__ */ _("path", { d: "M5.5 1C5.22386 1 5 1.22386 5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5H10H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5ZM5 4H10V12H5V4Z" })
3426
3430
  }
3427
3431
  )
3428
3432
  }
3429
3433
  );
3430
3434
  }
3431
- function Ii(e) {
3432
- return /* @__PURE__ */ $(
3435
+ function Si(e) {
3436
+ return /* @__PURE__ */ _(
3433
3437
  bt,
3434
3438
  {
3435
3439
  ...e,
@@ -3437,7 +3441,7 @@ function Ii(e) {
3437
3441
  fill: "rgba(255, 70, 70, 0.95)",
3438
3442
  background: "rgba(255, 70, 70, 0.1)"
3439
3443
  },
3440
- children: /* @__PURE__ */ $(
3444
+ children: /* @__PURE__ */ _(
3441
3445
  "svg",
3442
3446
  {
3443
3447
  width: "18",
@@ -3445,13 +3449,13 @@ function Ii(e) {
3445
3449
  viewBox: "0 0 18 18",
3446
3450
  fill: "none",
3447
3451
  xmlns: "http://www.w3.org/2000/svg",
3448
- children: /* @__PURE__ */ $("path", { d: "M8 2.75C8 2.47386 7.77614 2.25 7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75Z" })
3452
+ children: /* @__PURE__ */ _("path", { d: "M8 2.75C8 2.47386 7.77614 2.25 7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75Z" })
3449
3453
  }
3450
3454
  )
3451
3455
  }
3452
3456
  );
3453
3457
  }
3454
- const Ri = dt(
3458
+ const Ii = dt(
3455
3459
  ({
3456
3460
  childCount: e,
3457
3461
  clone: t,
@@ -3465,17 +3469,17 @@ const Ri = dt(
3465
3469
  indicator: c,
3466
3470
  collapsed: u,
3467
3471
  onCollapse: d,
3468
- onRemove: h,
3469
- onAdd: f,
3470
- onLabelClick: m,
3471
- style: g,
3472
+ onRemove: g,
3473
+ onAdd: h,
3474
+ onLabelClick: b,
3475
+ style: f,
3472
3476
  value: p,
3473
- wrapperRef: b,
3474
- ...D
3475
- }, y) => /* @__PURE__ */ $(
3477
+ wrapperRef: m,
3478
+ ...w
3479
+ }, y) => /* @__PURE__ */ _(
3476
3480
  "li",
3477
3481
  {
3478
- className: Mt(
3482
+ className: Nt(
3479
3483
  ue.Wrapper,
3480
3484
  t && ue.clone,
3481
3485
  s && ue.ghost,
@@ -3483,29 +3487,29 @@ const Ri = dt(
3483
3487
  r && ue.disableSelection,
3484
3488
  o && ue.disableInteraction
3485
3489
  ),
3486
- ref: b,
3490
+ ref: m,
3487
3491
  style: {
3488
3492
  "--spacing": `${l * n}px`
3489
3493
  },
3490
- ...D,
3491
- children: /* @__PURE__ */ fn("div", { className: ue.TreeItem, ref: y, style: g, children: [
3492
- !i && /* @__PURE__ */ $(Ci, { ...a }),
3493
- d && /* @__PURE__ */ $(
3494
+ ...w,
3495
+ children: /* @__PURE__ */ fn("div", { className: ue.TreeItem, ref: y, style: f, children: [
3496
+ !i && /* @__PURE__ */ _(Di, { ...a }),
3497
+ d && /* @__PURE__ */ _(
3494
3498
  bt,
3495
3499
  {
3496
3500
  onClick: d,
3497
- className: Mt(ue.Collapse, u && ue.collapsed),
3498
- children: Ei
3501
+ className: Nt(ue.Collapse, u && ue.collapsed),
3502
+ children: Ri
3499
3503
  }
3500
3504
  ),
3501
- /* @__PURE__ */ $("span", { onClick: m, className: ue.Text, children: p }),
3502
- !t && h && /* @__PURE__ */ $(Si, { onClick: h }),
3503
- !t && f && /* @__PURE__ */ $(Ii, { onClick: f }),
3504
- t && e && e > 1 ? /* @__PURE__ */ $("span", { className: ue.Count, children: e }) : null
3505
+ /* @__PURE__ */ _("span", { onClick: b, className: ue.Text, children: p }),
3506
+ !t && g && /* @__PURE__ */ _(Ci, { onClick: g }),
3507
+ !t && h && /* @__PURE__ */ _(Si, { onClick: h }),
3508
+ t && e && e > 1 ? /* @__PURE__ */ _("span", { className: ue.Count, children: e }) : null
3505
3509
  ] })
3506
3510
  }
3507
3511
  )
3508
- ), Ei = /* @__PURE__ */ $("svg", { width: "10", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 70 41", children: /* @__PURE__ */ $("path", { d: "M30.76 39.2402C31.885 40.3638 33.41 40.995 35 40.995C36.59 40.995 38.115 40.3638 39.24 39.2402L68.24 10.2402C69.2998 9.10284 69.8768 7.59846 69.8494 6.04406C69.822 4.48965 69.1923 3.00657 68.093 1.90726C66.9937 0.807959 65.5106 0.178263 63.9562 0.150837C62.4018 0.123411 60.8974 0.700397 59.76 1.76024L35 26.5102L10.24 1.76024C9.10259 0.700397 7.59822 0.123411 6.04381 0.150837C4.4894 0.178263 3.00632 0.807959 1.90702 1.90726C0.807714 3.00657 0.178019 4.48965 0.150593 6.04406C0.123167 7.59846 0.700153 9.10284 1.75999 10.2402L30.76 39.2402Z" }) }), Oi = ut(Ri), Ai = ({ isSorting: e, wasDragging: t }) => !(e || t);
3512
+ ), Ri = /* @__PURE__ */ _("svg", { width: "10", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 70 41", children: /* @__PURE__ */ _("path", { d: "M30.76 39.2402C31.885 40.3638 33.41 40.995 35 40.995C36.59 40.995 38.115 40.3638 39.24 39.2402L68.24 10.2402C69.2998 9.10284 69.8768 7.59846 69.8494 6.04406C69.822 4.48965 69.1923 3.00657 68.093 1.90726C66.9937 0.807959 65.5106 0.178263 63.9562 0.150837C62.4018 0.123411 60.8974 0.700397 59.76 1.76024L35 26.5102L10.24 1.76024C9.10259 0.700397 7.59822 0.123411 6.04381 0.150837C4.4894 0.178263 3.00632 0.807959 1.90702 1.90726C0.807714 3.00657 0.178019 4.48965 0.150593 6.04406C0.123167 7.59846 0.700153 9.10284 1.75999 10.2402L30.76 39.2402Z" }) }), Ei = ut(Ii), Oi = ({ isSorting: e, wasDragging: t }) => !(e || t);
3509
3513
  function Ti({ id: e, depth: t, ...n }) {
3510
3514
  const {
3511
3515
  attributes: r,
@@ -3518,13 +3522,13 @@ function Ti({ id: e, depth: t, ...n }) {
3518
3522
  transition: u
3519
3523
  } = Vo({
3520
3524
  id: e,
3521
- animateLayoutChanges: Ai
3525
+ animateLayoutChanges: Oi
3522
3526
  }), d = {
3523
- transform: he.Translate.toString(c),
3527
+ transform: ge.Translate.toString(c),
3524
3528
  transition: u
3525
3529
  };
3526
- return /* @__PURE__ */ $(
3527
- Oi,
3530
+ return /* @__PURE__ */ _(
3531
+ Ei,
3528
3532
  {
3529
3533
  ref: a,
3530
3534
  wrapperRef: l,
@@ -3541,17 +3545,17 @@ function Ti({ id: e, depth: t, ...n }) {
3541
3545
  }
3542
3546
  );
3543
3547
  }
3544
- const dn = ut(Ti), Mi = {
3548
+ const dn = ut(Ti), Ai = {
3545
3549
  droppable: {
3546
- strategy: Te.Always
3550
+ strategy: Ne.Always
3547
3551
  }
3548
3552
  }, Ni = {
3549
3553
  keyframes({ transform: e }) {
3550
3554
  return [
3551
- { opacity: 1, transform: he.Transform.toString(e.initial) },
3555
+ { opacity: 1, transform: ge.Transform.toString(e.initial) },
3552
3556
  {
3553
3557
  opacity: 0,
3554
- transform: he.Transform.toString({
3558
+ transform: ge.Transform.toString({
3555
3559
  ...e.final,
3556
3560
  x: e.final.x + 5,
3557
3561
  y: e.final.y + 5
@@ -3562,14 +3566,14 @@ const dn = ut(Ti), Mi = {
3562
3566
  easing: "ease-out",
3563
3567
  sideEffects({ active: e }) {
3564
3568
  e.node.animate([{ opacity: 0 }, { opacity: 1 }], {
3565
- duration: At.duration,
3566
- easing: At.easing
3569
+ duration: Tt.duration,
3570
+ easing: Tt.easing
3567
3571
  });
3568
3572
  }
3569
3573
  };
3570
- function Li({
3571
- treeStructure: e,
3572
- setTreeStructure: t,
3574
+ function Mi({
3575
+ items: e,
3576
+ setItems: t,
3573
3577
  isCollapsible: n,
3574
3578
  onLazyLoadChildren: r,
3575
3579
  showDropIndicator: o = !1,
@@ -3581,158 +3585,158 @@ function Li({
3581
3585
  onDragEnd: u,
3582
3586
  onItemClick: d
3583
3587
  }) {
3584
- const h = T(() => e.items, [e.items]), [f, m] = V(null), [g, p] = V(null), [b, D] = V(0), [y, R] = V(null), x = T(() => {
3585
- let v = It(h);
3586
- const C = v.filter(({ parentId: L }) => !L);
3587
- C.length === 1 && (v = v.map(
3588
- (L) => L.id === C[0].id ? {
3589
- ...L,
3588
+ const [g, h] = V(null), [b, f] = V(null), [p, m] = V(0), [w, y] = V(null), C = T(() => {
3589
+ let v = It(e);
3590
+ const D = v.filter(({ parentId: N }) => !N);
3591
+ D.length === 1 && (v = v.map(
3592
+ (N) => N.id === D[0].id ? {
3593
+ ...N,
3590
3594
  disableDragging: !0
3591
- } : L
3595
+ } : N
3592
3596
  ));
3593
- const B = v.reduce(
3594
- (L, { children: M, collapsed: q, id: H }) => (q && M.length && L.push(H), L),
3597
+ const P = v.reduce(
3598
+ (N, { children: F, collapsed: H, id: K }) => (H && F.length && N.push(K), N),
3595
3599
  []
3596
3600
  );
3597
- return oi(
3601
+ return ri(
3598
3602
  v,
3599
- f ? [f, ...B] : B
3603
+ g ? [g, ...P] : P
3600
3604
  );
3601
- }, [f, h]), w = f && g ? Tt(x, f, g, b, i) : null, I = k({
3602
- items: x,
3603
- offset: b
3604
- }), [E] = V(
3605
- () => ai(I, o, i)
3606
- ), N = pr(
3605
+ }, [g, e]), x = g && b ? At(C, g, b, p, i) : null, I = B({
3606
+ items: C,
3607
+ offset: p
3608
+ }), [R] = V(
3609
+ () => si(I, o, i)
3610
+ ), E = pr(
3607
3611
  Gt(_t),
3608
- Gt(Bt, {
3609
- coordinateGetter: E
3612
+ Gt(zt, {
3613
+ coordinateGetter: R
3610
3614
  })
3611
- ), _ = T(() => x.map(({ id: v }) => v), [x]), A = f ? x.find(({ id: v }) => v === f) : null;
3612
- P(() => {
3615
+ ), M = T(() => C.map(({ id: v }) => v), [C]), z = g ? C.find(({ id: v }) => v === g) : null;
3616
+ k(() => {
3613
3617
  I.current = {
3614
- items: x,
3615
- offset: b
3618
+ items: C,
3619
+ offset: p
3616
3620
  };
3617
- }, [x, b]);
3618
- const Z = z(
3621
+ }, [C, p]);
3622
+ const A = $(
3619
3623
  ({ active: { id: v } }) => {
3620
- m(v), p(v);
3621
- const C = x.find(({ id: B }) => B === v);
3622
- C && R({
3623
- parentId: C.parentId,
3624
+ h(v), f(v);
3625
+ const D = C.find(({ id: P }) => P === v);
3626
+ D && y({
3627
+ parentId: D.parentId,
3624
3628
  overId: v
3625
3629
  }), document.body.style.setProperty("cursor", "grabbing");
3626
3630
  },
3627
- [x]
3628
- ), Q = z(({ delta: v }) => {
3629
- D(v.x);
3630
- }, []), ne = z(({ over: v }) => {
3631
- p((v == null ? void 0 : v.id) ?? null);
3632
- }, []), fe = z(() => {
3633
- p(null), m(null), D(0), R(null), document.body.style.setProperty("cursor", "");
3634
- }, []), Ce = z(
3635
- ({ active: v, over: C }) => {
3636
- if (fe(), w && C) {
3637
- const { depth: B, parentId: L } = w, M = JSON.parse(JSON.stringify(It(h))), q = M.findIndex(({ id: j }) => j === C.id), H = M.findIndex(({ id: j }) => j === v.id), U = M[H];
3638
- M[H] = { ...U, depth: B, parentId: L };
3639
- const O = Ve(M, H, q), se = Go(O), G = Yn(se, M[H].id, L);
3640
- t(ni(se)), u == null || u(G);
3631
+ [C]
3632
+ ), Q = $(({ delta: v }) => {
3633
+ m(v.x);
3634
+ }, []), ee = $(({ over: v }) => {
3635
+ f((v == null ? void 0 : v.id) ?? null);
3636
+ }, []), J = $(() => {
3637
+ f(null), h(null), m(0), y(null), document.body.style.setProperty("cursor", "");
3638
+ }, []), xe = $(
3639
+ ({ active: v, over: D }) => {
3640
+ if (J(), x && D) {
3641
+ const { depth: P, parentId: N } = x, F = JSON.parse(JSON.stringify(It(e))), H = F.findIndex(({ id: L }) => L === D.id), K = F.findIndex(({ id: L }) => L === v.id), G = F[K];
3642
+ F[K] = { ...G, depth: P, parentId: N };
3643
+ const W = Ve(F, K, H), O = Go(W), he = Yn(O, F[K].id, N);
3644
+ t(O), u == null || u(he);
3641
3645
  }
3642
3646
  },
3643
- [h, w, u, fe, t]
3644
- ), W = z(() => {
3645
- fe();
3646
- }, [fe]), Se = z(
3647
+ [e, x, u, J, t]
3648
+ ), De = $(() => {
3649
+ J();
3650
+ }, [J]), q = $(
3647
3651
  (v) => {
3648
- t((C) => ei(C, v));
3652
+ t((D) => ei(D, v));
3649
3653
  },
3650
3654
  [t]
3651
- ), pe = z(
3655
+ ), Ce = $(
3652
3656
  ({
3653
3657
  id: v,
3654
- canFetchChildren: C,
3655
- collapsed: B
3656
- }) => C ? r == null ? void 0 : r(v, !!B) : t(
3657
- (L) => ti(L, v, (M) => ({ collapsed: !M.collapsed }))
3658
+ canFetchChildren: D,
3659
+ collapsed: P
3660
+ }) => D ? r == null ? void 0 : r(v, !!P) : t(
3661
+ (N) => ti(N, v, (F) => ({ collapsed: !F.collapsed }))
3658
3662
  ),
3659
3663
  [r, t]
3660
- ), ve = z(
3661
- (v, C, B) => {
3662
- if (B && w) {
3664
+ ), se = $(
3665
+ (v, D, P) => {
3666
+ if (P && x) {
3663
3667
  if (v !== "onDragEnd") {
3664
- if (y && w.parentId === y.parentId && B === y.overId)
3668
+ if (w && x.parentId === w.parentId && P === w.overId)
3665
3669
  return;
3666
- R({
3667
- parentId: w.parentId,
3668
- overId: B
3670
+ y({
3671
+ parentId: x.parentId,
3672
+ overId: P
3669
3673
  });
3670
3674
  }
3671
- const L = JSON.parse(JSON.stringify(It(h))), M = L.findIndex(({ id: j }) => j === B), q = L.findIndex(({ id: j }) => j === C), H = Ve(L, q, M), U = H[M - 1];
3672
- let O;
3673
- const se = v === "onDragEnd" ? "dropped" : "moved", G = v === "onDragEnd" ? "dropped" : "nested";
3674
- if (U)
3675
- if (w.depth > U.depth)
3676
- O = `${C} was ${G} under ${U.id}.`;
3675
+ const N = JSON.parse(JSON.stringify(It(e))), F = N.findIndex(({ id: L }) => L === P), H = N.findIndex(({ id: L }) => L === D), K = Ve(N, H, F), G = K[F - 1];
3676
+ let W;
3677
+ const O = v === "onDragEnd" ? "dropped" : "moved", he = v === "onDragEnd" ? "dropped" : "nested";
3678
+ if (G)
3679
+ if (x.depth > G.depth)
3680
+ W = `${D} was ${he} under ${G.id}.`;
3677
3681
  else {
3678
- let j = U;
3679
- for (; j && w.depth < j.depth; ) {
3680
- const ae = j.parentId;
3681
- j = H.find(({ id: be }) => be === ae);
3682
+ let L = G;
3683
+ for (; L && x.depth < L.depth; ) {
3684
+ const pe = L.parentId;
3685
+ L = K.find(({ id: ae }) => ae === pe);
3682
3686
  }
3683
- j && (O = `${C} was ${se} after ${j.id}.`);
3687
+ L && (W = `${D} was ${O} after ${L.id}.`);
3684
3688
  }
3685
3689
  else {
3686
- const j = H[M + 1];
3687
- O = `${C} was ${se} before ${j.id}.`;
3690
+ const L = K[F + 1];
3691
+ W = `${D} was ${O} before ${L.id}.`;
3688
3692
  }
3689
- return O;
3693
+ return W;
3690
3694
  }
3691
3695
  },
3692
- [y, h, w]
3696
+ [w, e, x]
3693
3697
  );
3694
- return /* @__PURE__ */ $(
3698
+ return /* @__PURE__ */ _(
3695
3699
  ho,
3696
3700
  {
3697
3701
  accessibility: { announcements: {
3698
3702
  onDragStart({ active: v }) {
3699
3703
  return `Picked up ${v.id}.`;
3700
3704
  },
3701
- onDragMove({ active: v, over: C }) {
3702
- return ve("onDragMove", v.id, C == null ? void 0 : C.id);
3705
+ onDragMove({ active: v, over: D }) {
3706
+ return se("onDragMove", v.id, D == null ? void 0 : D.id);
3703
3707
  },
3704
- onDragOver({ active: v, over: C }) {
3705
- return ve("onDragOver", v.id, C == null ? void 0 : C.id);
3708
+ onDragOver({ active: v, over: D }) {
3709
+ return se("onDragOver", v.id, D == null ? void 0 : D.id);
3706
3710
  },
3707
- onDragEnd({ active: v, over: C }) {
3708
- return ve("onDragEnd", v.id, C == null ? void 0 : C.id);
3711
+ onDragEnd({ active: v, over: D }) {
3712
+ return se("onDragEnd", v.id, D == null ? void 0 : D.id);
3709
3713
  },
3710
3714
  onDragCancel({ active: v }) {
3711
3715
  return `Moving was cancelled. ${v.id} was dropped in its original position.`;
3712
3716
  }
3713
3717
  } },
3714
- sensors: N,
3718
+ sensors: E,
3715
3719
  collisionDetection: mr,
3716
- measuring: Mi,
3717
- onDragStart: Z,
3720
+ measuring: Ai,
3721
+ onDragStart: A,
3718
3722
  onDragMove: Q,
3719
- onDragOver: ne,
3720
- onDragEnd: Ce,
3721
- onDragCancel: W,
3722
- children: /* @__PURE__ */ fn($o, { items: _, strategy: zo, children: [
3723
- x.map(
3724
- ({ id: v, label: C, children: B, collapsed: L, depth: M, canFetchChildren: q, disableDragging: H }) => /* @__PURE__ */ $(
3723
+ onDragOver: ee,
3724
+ onDragEnd: xe,
3725
+ onDragCancel: De,
3726
+ children: /* @__PURE__ */ fn($o, { items: M, strategy: Bo, children: [
3727
+ C.map(
3728
+ ({ id: v, label: D, children: P, collapsed: N, depth: F, canFetchChildren: H, disableDragging: K }) => /* @__PURE__ */ _(
3725
3729
  dn,
3726
3730
  {
3727
3731
  id: v,
3728
- value: C,
3729
- disableDragging: !!H,
3730
- depth: v === f && w ? w.depth : M,
3732
+ value: D,
3733
+ disableDragging: !!K,
3734
+ depth: v === g && x ? x.depth : F,
3731
3735
  indentationWidth: i,
3732
3736
  indicator: o,
3733
- collapsed: !!(L && (B.length || q)),
3734
- onCollapse: n && (B.length || q) ? () => pe({ id: v, canFetchChildren: q, collapsed: L }) : void 0,
3735
- onRemove: s ? () => a ? a(v) : Se(v) : void 0,
3737
+ collapsed: !!(N && (P.length || H)),
3738
+ onCollapse: n && (P.length || H) ? () => Ce({ id: v, canFetchChildren: H, collapsed: N }) : void 0,
3739
+ onRemove: s ? () => a ? a(v) : q(v) : void 0,
3736
3740
  onAdd: l ? () => c == null ? void 0 : c(v) : void 0,
3737
3741
  onLabelClick: d ? () => d(v) : void 0
3738
3742
  },
@@ -3740,19 +3744,19 @@ function Li({
3740
3744
  )
3741
3745
  ),
3742
3746
  gn(
3743
- /* @__PURE__ */ $(
3744
- No,
3747
+ /* @__PURE__ */ _(
3748
+ Mo,
3745
3749
  {
3746
3750
  dropAnimation: Ni,
3747
- modifiers: o ? [Pi] : void 0,
3748
- children: f && A ? /* @__PURE__ */ $(
3751
+ modifiers: o ? [Li] : void 0,
3752
+ children: g && z ? /* @__PURE__ */ _(
3749
3753
  dn,
3750
3754
  {
3751
- id: f,
3752
- depth: A.depth,
3755
+ id: g,
3756
+ depth: z.depth,
3753
3757
  clone: !0,
3754
- childCount: ri(e, f) + 1,
3755
- value: A.label,
3758
+ childCount: ni(e, g) + 1,
3759
+ value: z.label,
3756
3760
  indentationWidth: i
3757
3761
  }
3758
3762
  ) : null
@@ -3764,7 +3768,7 @@ function Li({
3764
3768
  }
3765
3769
  );
3766
3770
  }
3767
- const Pi = ({ transform: e }) => ({
3771
+ const Li = ({ transform: e }) => ({
3768
3772
  ...e,
3769
3773
  y: e.y - 25
3770
3774
  });
@@ -3781,10 +3785,10 @@ function Yn(e, t, n = null) {
3781
3785
  }
3782
3786
  return null;
3783
3787
  }
3784
- const $i = ut(Li);
3788
+ const zi = ut(Mi);
3785
3789
  export {
3786
- $i as SortableTree,
3787
- ni as createOptimizedTreeStructure,
3790
+ zi as SortableTree,
3791
+ Fn as getItemById,
3788
3792
  ei as removeItemById,
3789
3793
  ti as setTreeItemProperties
3790
3794
  };