@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.
- package/README.md +27 -48
- package/dist/SortableTree/SortableTree.d.ts +1 -1
- package/dist/SortableTree/index.d.ts +1 -1
- package/dist/SortableTree/types.d.ts +2 -6
- package/dist/SortableTree/utilities.d.ts +7 -14
- package/dist/react-sortable-tree.js +787 -783
- package/dist/react-sortable-tree.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
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
|
|
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
|
-
} =
|
|
31
|
+
} = Z(e);
|
|
32
32
|
return e instanceof t;
|
|
33
33
|
}
|
|
34
34
|
function Ue(e) {
|
|
35
|
-
return Me(e) ? !1 : e instanceof
|
|
35
|
+
return Me(e) ? !1 : e instanceof Z(e).HTMLElement;
|
|
36
36
|
}
|
|
37
37
|
function hn(e) {
|
|
38
|
-
return e instanceof
|
|
38
|
+
return e instanceof Z(e).SVGElement;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
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 :
|
|
43
|
+
const ie = ft ? Qn : k;
|
|
44
44
|
function gt(e) {
|
|
45
|
-
const t =
|
|
45
|
+
const t = B(e);
|
|
46
46
|
return ie(() => {
|
|
47
47
|
t.current = e;
|
|
48
|
-
}),
|
|
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 =
|
|
55
|
+
const e = B(null), t = $((r, o) => {
|
|
56
56
|
e.current = setInterval(r, o);
|
|
57
|
-
}, []), n =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
92
|
-
return
|
|
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
|
-
} =
|
|
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
|
-
} =
|
|
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
|
|
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 [
|
|
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
|
|
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
|
|
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:
|
|
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 =
|
|
262
|
-
|
|
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 =
|
|
270
|
-
return [
|
|
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 (
|
|
326
|
+
if (k(() => {
|
|
327
327
|
c(!0);
|
|
328
328
|
}, []), ur(T(() => ({
|
|
329
329
|
onDragStart(d) {
|
|
330
330
|
let {
|
|
331
|
-
active:
|
|
331
|
+
active: g
|
|
332
332
|
} = d;
|
|
333
333
|
i(t.onDragStart({
|
|
334
|
-
active:
|
|
334
|
+
active: g
|
|
335
335
|
}));
|
|
336
336
|
},
|
|
337
337
|
onDragMove(d) {
|
|
338
338
|
let {
|
|
339
|
-
active:
|
|
340
|
-
over:
|
|
339
|
+
active: g,
|
|
340
|
+
over: h
|
|
341
341
|
} = d;
|
|
342
342
|
t.onDragMove && i(t.onDragMove({
|
|
343
|
-
active:
|
|
344
|
-
over:
|
|
343
|
+
active: g,
|
|
344
|
+
over: h
|
|
345
345
|
}));
|
|
346
346
|
},
|
|
347
347
|
onDragOver(d) {
|
|
348
348
|
let {
|
|
349
|
-
active:
|
|
350
|
-
over:
|
|
349
|
+
active: g,
|
|
350
|
+
over: h
|
|
351
351
|
} = d;
|
|
352
352
|
i(t.onDragOver({
|
|
353
|
-
active:
|
|
354
|
-
over:
|
|
353
|
+
active: g,
|
|
354
|
+
over: h
|
|
355
355
|
}));
|
|
356
356
|
},
|
|
357
357
|
onDragEnd(d) {
|
|
358
358
|
let {
|
|
359
|
-
active:
|
|
360
|
-
over:
|
|
359
|
+
active: g,
|
|
360
|
+
over: h
|
|
361
361
|
} = d;
|
|
362
362
|
i(t.onDragEnd({
|
|
363
|
-
active:
|
|
364
|
-
over:
|
|
363
|
+
active: g,
|
|
364
|
+
over: h
|
|
365
365
|
}));
|
|
366
366
|
},
|
|
367
367
|
onDragCancel(d) {
|
|
368
368
|
let {
|
|
369
|
-
active:
|
|
370
|
-
over:
|
|
369
|
+
active: g,
|
|
370
|
+
over: h
|
|
371
371
|
} = d;
|
|
372
372
|
i(t.onDragCancel({
|
|
373
|
-
active:
|
|
374
|
-
over:
|
|
373
|
+
active: g,
|
|
374
|
+
over: h
|
|
375
375
|
}));
|
|
376
376
|
}
|
|
377
377
|
}), [i, t])), !l)
|
|
378
378
|
return null;
|
|
379
|
-
const u =
|
|
379
|
+
const u = j.createElement(j.Fragment, null, j.createElement(ar, {
|
|
380
380
|
id: r,
|
|
381
381
|
value: o.draggable
|
|
382
|
-
}),
|
|
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((
|
|
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
|
|
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
|
-
} =
|
|
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
|
|
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 =
|
|
681
|
+
return t === void 0 && (t = Z(e).getComputedStyle(e)), t.position === "fixed";
|
|
682
682
|
}
|
|
683
|
-
function
|
|
684
|
-
t === void 0 && (t =
|
|
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 =
|
|
701
|
-
return o !== e &&
|
|
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 ===
|
|
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
|
|
754
|
+
const Ar = {
|
|
755
755
|
x: 0.2,
|
|
756
756
|
y: 0.2
|
|
757
757
|
};
|
|
758
|
-
function
|
|
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 =
|
|
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:
|
|
771
|
-
} = Rn(e),
|
|
770
|
+
isRight: g
|
|
771
|
+
} = Rn(e), h = {
|
|
772
772
|
x: 0,
|
|
773
773
|
y: 0
|
|
774
|
-
},
|
|
774
|
+
}, b = {
|
|
775
775
|
x: 0,
|
|
776
776
|
y: 0
|
|
777
|
-
},
|
|
777
|
+
}, f = {
|
|
778
778
|
height: t.height * o.y,
|
|
779
779
|
width: t.width * o.x
|
|
780
780
|
};
|
|
781
|
-
return !c && i <= t.top +
|
|
782
|
-
direction:
|
|
783
|
-
speed:
|
|
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
|
|
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 =
|
|
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
|
|
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
|
|
875
|
+
function Br(e) {
|
|
876
876
|
const {
|
|
877
877
|
EventTarget: t
|
|
878
|
-
} =
|
|
879
|
-
return e instanceof t ? 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
|
|
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
|
|
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
|
|
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(
|
|
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 =
|
|
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
|
|
984
|
+
const g = st(d, u), h = {
|
|
985
985
|
x: 0,
|
|
986
986
|
y: 0
|
|
987
987
|
}, {
|
|
988
|
-
scrollableAncestors:
|
|
988
|
+
scrollableAncestors: b
|
|
989
989
|
} = r.current;
|
|
990
|
-
for (const
|
|
990
|
+
for (const f of b) {
|
|
991
991
|
const p = t.code, {
|
|
992
|
-
isTop:
|
|
993
|
-
isRight:
|
|
992
|
+
isTop: m,
|
|
993
|
+
isRight: w,
|
|
994
994
|
isLeft: y,
|
|
995
|
-
isBottom:
|
|
995
|
+
isBottom: C,
|
|
996
996
|
maxScroll: x,
|
|
997
|
-
minScroll:
|
|
998
|
-
} = Rn(
|
|
999
|
-
x: Math.min(p === S.Right ?
|
|
1000
|
-
y: Math.min(p === S.Down ?
|
|
1001
|
-
},
|
|
1002
|
-
if (
|
|
1003
|
-
const A =
|
|
1004
|
-
if (
|
|
1005
|
-
|
|
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
|
-
|
|
1012
|
-
left: -
|
|
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 (
|
|
1017
|
-
const A =
|
|
1018
|
-
if (
|
|
1019
|
-
|
|
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
|
-
|
|
1026
|
-
top: -
|
|
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),
|
|
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
|
-
|
|
1058
|
+
zt.activators = [{
|
|
1059
1059
|
eventName: "onKeyDown",
|
|
1060
1060
|
handler: (e, t, n) => {
|
|
1061
1061
|
let {
|
|
1062
|
-
keyboardCodes: r =
|
|
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 =
|
|
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 =
|
|
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,
|
|
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 =
|
|
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,
|
|
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:
|
|
1302
|
+
threshold: g
|
|
1303
1303
|
} = e;
|
|
1304
|
-
const
|
|
1304
|
+
const h = Vr({
|
|
1305
1305
|
delta: d,
|
|
1306
1306
|
disabled: !i
|
|
1307
|
-
}), [
|
|
1307
|
+
}), [b, f] = nr(), p = B({
|
|
1308
1308
|
x: 0,
|
|
1309
1309
|
y: 0
|
|
1310
|
-
}),
|
|
1310
|
+
}), m = B({
|
|
1311
1311
|
x: 0,
|
|
1312
1312
|
y: 0
|
|
1313
|
-
}),
|
|
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 =
|
|
1326
|
-
const
|
|
1327
|
-
if (!
|
|
1325
|
+
}, [n, o, l]), y = B(null), C = $(() => {
|
|
1326
|
+
const I = y.current;
|
|
1327
|
+
if (!I)
|
|
1328
1328
|
return;
|
|
1329
|
-
const
|
|
1330
|
-
|
|
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
|
-
|
|
1332
|
+
k(
|
|
1333
1333
|
() => {
|
|
1334
|
-
if (!i || !c.length || !
|
|
1335
|
-
|
|
1334
|
+
if (!i || !c.length || !w) {
|
|
1335
|
+
f();
|
|
1336
1336
|
return;
|
|
1337
1337
|
}
|
|
1338
|
-
for (const
|
|
1339
|
-
if ((r == null ? void 0 : r(
|
|
1338
|
+
for (const I of x) {
|
|
1339
|
+
if ((r == null ? void 0 : r(I)) === !1)
|
|
1340
1340
|
continue;
|
|
1341
|
-
const
|
|
1341
|
+
const R = c.indexOf(I), E = u[R];
|
|
1342
1342
|
if (!E)
|
|
1343
1343
|
continue;
|
|
1344
1344
|
const {
|
|
1345
|
-
direction:
|
|
1346
|
-
speed:
|
|
1347
|
-
} =
|
|
1345
|
+
direction: M,
|
|
1346
|
+
speed: z
|
|
1347
|
+
} = Nr(I, E, w, t, g);
|
|
1348
1348
|
for (const A of ["x", "y"])
|
|
1349
|
-
|
|
1350
|
-
if (
|
|
1351
|
-
|
|
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
|
-
},
|
|
1358
|
+
}, m.current = {
|
|
1359
1359
|
x: 0,
|
|
1360
1360
|
y: 0
|
|
1361
|
-
},
|
|
1361
|
+
}, f();
|
|
1362
1362
|
},
|
|
1363
1363
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1364
1364
|
[
|
|
1365
1365
|
t,
|
|
1366
|
-
|
|
1366
|
+
C,
|
|
1367
1367
|
r,
|
|
1368
|
-
|
|
1368
|
+
f,
|
|
1369
1369
|
i,
|
|
1370
1370
|
s,
|
|
1371
1371
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1372
|
-
JSON.stringify(
|
|
1372
|
+
JSON.stringify(w),
|
|
1373
1373
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1374
|
-
JSON.stringify(
|
|
1375
|
-
|
|
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(
|
|
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
|
|
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
|
-
})(
|
|
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 =
|
|
1457
|
-
|
|
1458
|
-
}, [
|
|
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 (!
|
|
1462
|
-
const
|
|
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
|
-
|
|
1467
|
+
w.set(y.id, y.rect.current);
|
|
1468
1468
|
continue;
|
|
1469
1469
|
}
|
|
1470
|
-
const
|
|
1471
|
-
y.rect.current = x, 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
|
|
1473
|
+
return w;
|
|
1474
1474
|
}
|
|
1475
|
-
return
|
|
1475
|
+
return m;
|
|
1476
1476
|
}, [e, i, n, d, l]);
|
|
1477
|
-
return
|
|
1477
|
+
return k(() => {
|
|
1478
1478
|
u.current = e;
|
|
1479
|
-
}, [e]),
|
|
1479
|
+
}, [e]), k(
|
|
1480
1480
|
() => {
|
|
1481
|
-
d ||
|
|
1481
|
+
d || h();
|
|
1482
1482
|
},
|
|
1483
1483
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1484
1484
|
[n, d]
|
|
1485
|
-
),
|
|
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
|
-
),
|
|
1491
|
+
), k(
|
|
1492
1492
|
() => {
|
|
1493
|
-
d || typeof a != "number" ||
|
|
1494
|
-
|
|
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,
|
|
1498
|
+
[a, d, h, ...r]
|
|
1499
1499
|
), {
|
|
1500
|
-
droppableRects:
|
|
1501
|
-
measureDroppableContainers:
|
|
1500
|
+
droppableRects: f,
|
|
1501
|
+
measureDroppableContainers: h,
|
|
1502
1502
|
measuringScheduled: i != null
|
|
1503
1503
|
};
|
|
1504
1504
|
function p() {
|
|
1505
1505
|
switch (c) {
|
|
1506
|
-
case
|
|
1506
|
+
case Ne.Always:
|
|
1507
1507
|
return !1;
|
|
1508
|
-
case
|
|
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
|
|
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
|
|
1553
|
+
return k(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
|
|
1554
1554
|
}
|
|
1555
1555
|
function Gr(e) {
|
|
1556
|
-
return new
|
|
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] =
|
|
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 =
|
|
1601
|
-
return
|
|
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 =
|
|
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
|
|
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 =
|
|
1636
|
-
return
|
|
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
|
-
),
|
|
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
|
-
|
|
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
|
|
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 =
|
|
1690
|
-
const [n] = e, r =
|
|
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
|
|
1697
|
+
return e.length ? e.map((l) => In(l) ? r : new Bt(t(l), l)) : St;
|
|
1698
1698
|
}
|
|
1699
1699
|
}
|
|
1700
|
-
function
|
|
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 =
|
|
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
|
|
1718
|
+
const g = t(u);
|
|
1719
1719
|
return d ? {
|
|
1720
1720
|
...d,
|
|
1721
|
-
width:
|
|
1722
|
-
height:
|
|
1723
|
-
} :
|
|
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 =
|
|
1730
|
-
const u =
|
|
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:
|
|
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:
|
|
1753
|
+
strategy: Ne.WhileDragging,
|
|
1754
1754
|
frequency: Ot.Optimized
|
|
1755
1755
|
},
|
|
1756
1756
|
dragOverlay: {
|
|
1757
|
-
measure:
|
|
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
|
-
},
|
|
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(
|
|
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
|
-
} =
|
|
1939
|
-
return
|
|
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 =
|
|
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
|
|
2023
|
-
|
|
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
|
|
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
|
-
})(
|
|
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:
|
|
2049
|
-
modifiers:
|
|
2050
|
-
...
|
|
2048
|
+
measuring: g,
|
|
2049
|
+
modifiers: h,
|
|
2050
|
+
...b
|
|
2051
2051
|
} = t;
|
|
2052
|
-
const
|
|
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:
|
|
2054
|
+
active: R,
|
|
2055
2055
|
nodes: E,
|
|
2056
|
-
translate:
|
|
2056
|
+
translate: M
|
|
2057
2057
|
},
|
|
2058
2058
|
droppable: {
|
|
2059
|
-
containers:
|
|
2059
|
+
containers: z
|
|
2060
2060
|
}
|
|
2061
|
-
} = p, A =
|
|
2061
|
+
} = p, A = R ? E.get(R) : null, Q = B({
|
|
2062
2062
|
initial: null,
|
|
2063
2063
|
translated: null
|
|
2064
|
-
}),
|
|
2065
|
-
var
|
|
2066
|
-
return
|
|
2067
|
-
id:
|
|
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: (
|
|
2070
|
-
rect:
|
|
2069
|
+
data: (U = A == null ? void 0 : A.data) != null ? U : so,
|
|
2070
|
+
rect: Q
|
|
2071
2071
|
} : null;
|
|
2072
|
-
}, [
|
|
2073
|
-
droppableRects:
|
|
2074
|
-
measureDroppableContainers:
|
|
2075
|
-
measuringScheduled:
|
|
2076
|
-
} = Wr(
|
|
2077
|
-
dragging:
|
|
2078
|
-
dependencies: [
|
|
2079
|
-
config:
|
|
2080
|
-
}),
|
|
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:
|
|
2083
|
-
config:
|
|
2084
|
-
initialRect:
|
|
2085
|
-
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(
|
|
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:
|
|
2090
|
+
activeNode: H,
|
|
2091
2091
|
collisionRect: null,
|
|
2092
2092
|
collisions: null,
|
|
2093
|
-
droppableRects:
|
|
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
|
-
}),
|
|
2102
|
-
measure:
|
|
2103
|
-
}),
|
|
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:
|
|
2106
|
-
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:
|
|
2111
|
-
active:
|
|
2110
|
+
activatorEvent: q,
|
|
2111
|
+
active: ee,
|
|
2112
2112
|
activeNodeRect: O,
|
|
2113
|
-
containerNodeRect:
|
|
2114
|
-
draggingNodeRect:
|
|
2115
|
-
over:
|
|
2113
|
+
containerNodeRect: he,
|
|
2114
|
+
draggingNodeRect: Re,
|
|
2115
|
+
over: L.current.over,
|
|
2116
2116
|
overlayNodeRect: ae.rect,
|
|
2117
|
-
scrollableAncestors:
|
|
2117
|
+
scrollableAncestors: ve,
|
|
2118
2118
|
scrollableAncestorRects: Ge,
|
|
2119
2119
|
windowRect: mt
|
|
2120
|
-
}), Xt =
|
|
2121
|
-
active:
|
|
2122
|
-
collisionRect:
|
|
2123
|
-
droppableRects:
|
|
2124
|
-
droppableContainers:
|
|
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"), [
|
|
2127
|
-
(
|
|
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:
|
|
2130
|
-
options:
|
|
2131
|
-
} =
|
|
2132
|
-
if (
|
|
2129
|
+
sensor: ne,
|
|
2130
|
+
options: me
|
|
2131
|
+
} = te;
|
|
2132
|
+
if (J.current == null)
|
|
2133
2133
|
return;
|
|
2134
|
-
const re = E.get(
|
|
2134
|
+
const re = E.get(J.current);
|
|
2135
2135
|
if (!re)
|
|
2136
2136
|
return;
|
|
2137
|
-
const le =
|
|
2138
|
-
active:
|
|
2137
|
+
const le = U.nativeEvent, fe = new ne({
|
|
2138
|
+
active: J.current,
|
|
2139
2139
|
activeNode: re,
|
|
2140
2140
|
event: le,
|
|
2141
|
-
options:
|
|
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:
|
|
2144
|
+
context: L,
|
|
2145
2145
|
onStart(ce) {
|
|
2146
|
-
const
|
|
2147
|
-
if (
|
|
2146
|
+
const Be = J.current;
|
|
2147
|
+
if (Be == null)
|
|
2148
2148
|
return;
|
|
2149
|
-
const
|
|
2150
|
-
if (!
|
|
2149
|
+
const ze = E.get(Be);
|
|
2150
|
+
if (!ze)
|
|
2151
2151
|
return;
|
|
2152
2152
|
const {
|
|
2153
2153
|
onDragStart: Qe
|
|
2154
|
-
} =
|
|
2154
|
+
} = se.current, et = {
|
|
2155
2155
|
active: {
|
|
2156
|
-
id:
|
|
2157
|
-
data:
|
|
2158
|
-
rect:
|
|
2156
|
+
id: Be,
|
|
2157
|
+
data: ze.data,
|
|
2158
|
+
rect: Q
|
|
2159
2159
|
}
|
|
2160
2160
|
};
|
|
2161
2161
|
je(() => {
|
|
2162
|
-
Qe == null || Qe(et), x(
|
|
2162
|
+
Qe == null || Qe(et), x(ye.Initializing), m({
|
|
2163
2163
|
type: X.DragStart,
|
|
2164
2164
|
initialCoordinates: ce,
|
|
2165
|
-
active:
|
|
2166
|
-
}),
|
|
2165
|
+
active: Be
|
|
2166
|
+
}), w({
|
|
2167
2167
|
type: "onDragStart",
|
|
2168
2168
|
event: et
|
|
2169
2169
|
});
|
|
2170
2170
|
});
|
|
2171
2171
|
},
|
|
2172
2172
|
onMove(ce) {
|
|
2173
|
-
|
|
2173
|
+
m({
|
|
2174
2174
|
type: X.DragMove,
|
|
2175
2175
|
coordinates: ce
|
|
2176
2176
|
});
|
|
2177
2177
|
},
|
|
2178
|
-
onEnd:
|
|
2179
|
-
onCancel:
|
|
2178
|
+
onEnd: Te(X.DragEnd),
|
|
2179
|
+
onCancel: Te(X.DragCancel)
|
|
2180
2180
|
});
|
|
2181
2181
|
je(() => {
|
|
2182
|
-
|
|
2182
|
+
De(fe), Ce(U.nativeEvent);
|
|
2183
2183
|
});
|
|
2184
|
-
function
|
|
2184
|
+
function Te(ce) {
|
|
2185
2185
|
return async function() {
|
|
2186
2186
|
const {
|
|
2187
|
-
active:
|
|
2187
|
+
active: ze,
|
|
2188
2188
|
collisions: Qe,
|
|
2189
2189
|
over: et,
|
|
2190
2190
|
scrollAdjustedTranslate: Jt
|
|
2191
|
-
} =
|
|
2191
|
+
} = L.current;
|
|
2192
2192
|
let $e = null;
|
|
2193
|
-
if (
|
|
2193
|
+
if (ze && Jt) {
|
|
2194
2194
|
const {
|
|
2195
2195
|
cancelDrop: _e
|
|
2196
|
-
} =
|
|
2196
|
+
} = se.current;
|
|
2197
2197
|
$e = {
|
|
2198
2198
|
activatorEvent: le,
|
|
2199
|
-
active:
|
|
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
|
-
|
|
2206
|
-
|
|
2205
|
+
J.current = null, je(() => {
|
|
2206
|
+
m({
|
|
2207
2207
|
type: ce
|
|
2208
|
-
}), x(
|
|
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 =
|
|
2212
|
-
yt == null || yt($e),
|
|
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 =
|
|
2224
|
-
const re =
|
|
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
|
-
|
|
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
|
|
2232
|
+
const fe = {
|
|
2233
2233
|
active: le
|
|
2234
2234
|
};
|
|
2235
|
-
|
|
2236
|
-
capturedBy:
|
|
2237
|
-
},
|
|
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 &&
|
|
2241
|
-
}, [O,
|
|
2240
|
+
O && C === ye.Initializing && x(ye.Initialized);
|
|
2241
|
+
}, [O, C]), k(
|
|
2242
2242
|
() => {
|
|
2243
2243
|
const {
|
|
2244
|
-
onDragMove:
|
|
2245
|
-
} =
|
|
2246
|
-
active:
|
|
2247
|
-
activatorEvent:
|
|
2248
|
-
collisions:
|
|
2244
|
+
onDragMove: U
|
|
2245
|
+
} = se.current, {
|
|
2246
|
+
active: te,
|
|
2247
|
+
activatorEvent: ne,
|
|
2248
|
+
collisions: me,
|
|
2249
2249
|
over: re
|
|
2250
|
-
} =
|
|
2251
|
-
if (!
|
|
2250
|
+
} = L.current;
|
|
2251
|
+
if (!te || !ne)
|
|
2252
2252
|
return;
|
|
2253
2253
|
const le = {
|
|
2254
|
-
active:
|
|
2255
|
-
activatorEvent:
|
|
2256
|
-
collisions:
|
|
2254
|
+
active: te,
|
|
2255
|
+
activatorEvent: ne,
|
|
2256
|
+
collisions: me,
|
|
2257
2257
|
delta: {
|
|
2258
|
-
x:
|
|
2259
|
-
y:
|
|
2258
|
+
x: Ee.x,
|
|
2259
|
+
y: Ee.y
|
|
2260
2260
|
},
|
|
2261
2261
|
over: re
|
|
2262
2262
|
};
|
|
2263
2263
|
je(() => {
|
|
2264
|
-
|
|
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
|
-
[
|
|
2272
|
-
),
|
|
2271
|
+
[Ee.x, Ee.y]
|
|
2272
|
+
), k(
|
|
2273
2273
|
() => {
|
|
2274
2274
|
const {
|
|
2275
|
-
active:
|
|
2276
|
-
activatorEvent:
|
|
2277
|
-
collisions:
|
|
2278
|
-
droppableContainers:
|
|
2275
|
+
active: U,
|
|
2276
|
+
activatorEvent: te,
|
|
2277
|
+
collisions: ne,
|
|
2278
|
+
droppableContainers: me,
|
|
2279
2279
|
scrollAdjustedTranslate: re
|
|
2280
|
-
} =
|
|
2281
|
-
if (!
|
|
2280
|
+
} = L.current;
|
|
2281
|
+
if (!U || J.current == null || !te || !re)
|
|
2282
2282
|
return;
|
|
2283
2283
|
const {
|
|
2284
2284
|
onDragOver: le
|
|
2285
|
-
} =
|
|
2286
|
-
id:
|
|
2287
|
-
rect:
|
|
2288
|
-
data:
|
|
2289
|
-
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:
|
|
2292
|
-
activatorEvent:
|
|
2293
|
-
collisions:
|
|
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:
|
|
2298
|
+
over: Te
|
|
2299
2299
|
};
|
|
2300
2300
|
je(() => {
|
|
2301
|
-
Kt(
|
|
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
|
-
|
|
2311
|
-
activatorEvent:
|
|
2312
|
-
active:
|
|
2313
|
-
activeNode:
|
|
2314
|
-
collisionRect:
|
|
2310
|
+
L.current = {
|
|
2311
|
+
activatorEvent: q,
|
|
2312
|
+
active: ee,
|
|
2313
|
+
activeNode: H,
|
|
2314
|
+
collisionRect: Oe,
|
|
2315
2315
|
collisions: ke,
|
|
2316
|
-
droppableRects:
|
|
2316
|
+
droppableRects: P,
|
|
2317
2317
|
draggableNodes: E,
|
|
2318
|
-
draggingNode:
|
|
2319
|
-
draggingNodeRect:
|
|
2320
|
-
droppableContainers:
|
|
2321
|
-
over:
|
|
2322
|
-
scrollableAncestors:
|
|
2323
|
-
scrollAdjustedTranslate:
|
|
2324
|
-
},
|
|
2325
|
-
initial:
|
|
2326
|
-
translated:
|
|
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
|
-
}, [
|
|
2329
|
-
...
|
|
2330
|
-
delta:
|
|
2331
|
-
draggingRect:
|
|
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:
|
|
2333
|
+
scrollableAncestors: ve,
|
|
2334
2334
|
scrollableAncestorRects: Ge
|
|
2335
2335
|
});
|
|
2336
2336
|
const qn = T(() => ({
|
|
2337
|
-
active:
|
|
2338
|
-
activeNode:
|
|
2337
|
+
active: ee,
|
|
2338
|
+
activeNode: H,
|
|
2339
2339
|
activeNodeRect: O,
|
|
2340
|
-
activatorEvent:
|
|
2340
|
+
activatorEvent: q,
|
|
2341
2341
|
collisions: ke,
|
|
2342
|
-
containerNodeRect:
|
|
2342
|
+
containerNodeRect: he,
|
|
2343
2343
|
dragOverlay: ae,
|
|
2344
2344
|
draggableNodes: E,
|
|
2345
|
-
droppableContainers:
|
|
2346
|
-
droppableRects:
|
|
2347
|
-
over:
|
|
2348
|
-
measureDroppableContainers:
|
|
2349
|
-
scrollableAncestors:
|
|
2345
|
+
droppableContainers: z,
|
|
2346
|
+
droppableRects: P,
|
|
2347
|
+
over: be,
|
|
2348
|
+
measureDroppableContainers: N,
|
|
2349
|
+
scrollableAncestors: ve,
|
|
2350
2350
|
scrollableAncestorRects: Ge,
|
|
2351
|
-
measuringConfiguration:
|
|
2352
|
-
measuringScheduled:
|
|
2351
|
+
measuringConfiguration: D,
|
|
2352
|
+
measuringScheduled: F,
|
|
2353
2353
|
windowRect: mt
|
|
2354
|
-
}), [
|
|
2355
|
-
activatorEvent:
|
|
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:
|
|
2357
|
+
active: ee,
|
|
2358
2358
|
activeNodeRect: O,
|
|
2359
2359
|
ariaDescribedById: {
|
|
2360
|
-
draggable:
|
|
2360
|
+
draggable: Se
|
|
2361
2361
|
},
|
|
2362
|
-
dispatch:
|
|
2362
|
+
dispatch: m,
|
|
2363
2363
|
draggableNodes: E,
|
|
2364
|
-
over:
|
|
2365
|
-
measureDroppableContainers:
|
|
2366
|
-
}), [
|
|
2367
|
-
return
|
|
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
|
-
},
|
|
2369
|
+
}, j.createElement(qe.Provider, {
|
|
2370
2370
|
value: Gn
|
|
2371
|
-
},
|
|
2371
|
+
}, j.createElement(Ln.Provider, {
|
|
2372
2372
|
value: qn
|
|
2373
|
-
},
|
|
2373
|
+
}, j.createElement(vt.Provider, {
|
|
2374
2374
|
value: Wn
|
|
2375
|
-
}, c)),
|
|
2375
|
+
}, c)), j.createElement(uo, {
|
|
2376
2376
|
disabled: (a == null ? void 0 : a.restoreFocus) === !1
|
|
2377
|
-
})),
|
|
2377
|
+
})), j.createElement(hr, {
|
|
2378
2378
|
...a,
|
|
2379
|
-
hiddenTextDescribedById:
|
|
2379
|
+
hiddenTextDescribedById: Se
|
|
2380
2380
|
}));
|
|
2381
2381
|
function Zn() {
|
|
2382
|
-
const
|
|
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:
|
|
2385
|
+
enabled: ne
|
|
2386
2386
|
} : {
|
|
2387
|
-
enabled:
|
|
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:
|
|
2406
|
-
} =
|
|
2407
|
-
role:
|
|
2408
|
-
roleDescription:
|
|
2409
|
-
tabIndex:
|
|
2410
|
-
} = o ?? {}, p = (l == null ? void 0 : l.id) === t,
|
|
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:
|
|
2416
|
-
activatorNode:
|
|
2417
|
-
data:
|
|
2415
|
+
node: w,
|
|
2416
|
+
activatorNode: C,
|
|
2417
|
+
data: R
|
|
2418
2418
|
}), () => {
|
|
2419
|
-
const
|
|
2420
|
-
|
|
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:
|
|
2427
|
-
tabIndex:
|
|
2426
|
+
role: h,
|
|
2427
|
+
tabIndex: f,
|
|
2428
2428
|
"aria-disabled": r,
|
|
2429
|
-
"aria-pressed": p &&
|
|
2430
|
-
"aria-roledescription":
|
|
2429
|
+
"aria-pressed": p && h === cn ? !0 : void 0,
|
|
2430
|
+
"aria-roledescription": b,
|
|
2431
2431
|
"aria-describedby": u.draggable
|
|
2432
|
-
}), [r,
|
|
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 :
|
|
2440
|
-
node:
|
|
2441
|
-
over:
|
|
2439
|
+
listeners: r ? void 0 : I,
|
|
2440
|
+
node: w,
|
|
2441
|
+
over: g,
|
|
2442
2442
|
setNodeRef: y,
|
|
2443
2443
|
setActivatorNodeRef: x,
|
|
2444
|
-
transform:
|
|
2444
|
+
transform: m
|
|
2445
2445
|
};
|
|
2446
2446
|
}
|
|
2447
2447
|
function kn() {
|
|
2448
|
-
return
|
|
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
|
-
} =
|
|
2465
|
+
} = we(qe), u = B({
|
|
2466
2466
|
disabled: n
|
|
2467
|
-
}), d =
|
|
2468
|
-
disabled:
|
|
2469
|
-
updateMeasurementsFor:
|
|
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
|
-
},
|
|
2474
|
+
}, m = Ye(f ?? r), w = $(
|
|
2475
2475
|
() => {
|
|
2476
2476
|
if (!d.current) {
|
|
2477
2477
|
d.current = !0;
|
|
2478
2478
|
return;
|
|
2479
2479
|
}
|
|
2480
|
-
|
|
2481
|
-
c(Array.isArray(
|
|
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:
|
|
2488
|
-
disabled:
|
|
2489
|
-
}),
|
|
2490
|
-
y && (
|
|
2491
|
-
}, [y]), [x,
|
|
2492
|
-
return
|
|
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:
|
|
2503
|
-
data:
|
|
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
|
-
),
|
|
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:
|
|
2521
|
+
rect: g,
|
|
2522
2522
|
isOver: (l == null ? void 0 : l.id) === r,
|
|
2523
2523
|
node: x,
|
|
2524
2524
|
over: l,
|
|
2525
|
-
setNodeRef:
|
|
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]),
|
|
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
|
|
2560
|
-
value:
|
|
2561
|
-
},
|
|
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
|
-
},
|
|
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:
|
|
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
|
|
2597
|
+
return j.createElement(n, {
|
|
2598
2598
|
className: s,
|
|
2599
|
-
style:
|
|
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:
|
|
2630
|
+
transform: ge.Transform.toString(t)
|
|
2631
2631
|
}, {
|
|
2632
|
-
transform:
|
|
2632
|
+
transform: ge.Transform.toString(n)
|
|
2633
2633
|
}];
|
|
2634
|
-
},
|
|
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
|
|
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 =
|
|
2662
|
+
const c = Nn(s);
|
|
2663
2663
|
if (!c)
|
|
2664
2664
|
return;
|
|
2665
2665
|
const {
|
|
2666
2666
|
transform: u
|
|
2667
|
-
} =
|
|
2667
|
+
} = Z(s).getComputedStyle(s), d = xn(u);
|
|
2668
2668
|
if (!d)
|
|
2669
2669
|
return;
|
|
2670
|
-
const
|
|
2671
|
-
return On(l, o.draggable.measure),
|
|
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
|
|
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
|
-
...
|
|
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
|
-
},
|
|
2714
|
+
}, g = {
|
|
2715
2715
|
x: l.x - u.x,
|
|
2716
2716
|
y: l.y - u.y,
|
|
2717
2717
|
...d
|
|
2718
|
-
},
|
|
2718
|
+
}, h = o({
|
|
2719
2719
|
...c,
|
|
2720
2720
|
active: s,
|
|
2721
2721
|
dragOverlay: a,
|
|
2722
2722
|
transform: {
|
|
2723
2723
|
initial: l,
|
|
2724
|
-
final:
|
|
2724
|
+
final: g
|
|
2725
2725
|
}
|
|
2726
|
-
}), [
|
|
2727
|
-
if (JSON.stringify(
|
|
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
|
-
}),
|
|
2733
|
+
}), m = a.node.animate(h, {
|
|
2734
2734
|
duration: t,
|
|
2735
2735
|
easing: n,
|
|
2736
2736
|
fill: "forwards"
|
|
2737
2737
|
});
|
|
2738
|
-
return new Promise((
|
|
2739
|
-
|
|
2740
|
-
p == null || p(),
|
|
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
|
|
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
|
|
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:
|
|
2768
|
-
containerNodeRect:
|
|
2769
|
-
draggableNodes:
|
|
2770
|
-
droppableContainers:
|
|
2767
|
+
activeNodeRect: g,
|
|
2768
|
+
containerNodeRect: h,
|
|
2769
|
+
draggableNodes: b,
|
|
2770
|
+
droppableContainers: f,
|
|
2771
2771
|
dragOverlay: p,
|
|
2772
|
-
over:
|
|
2773
|
-
measuringConfiguration:
|
|
2772
|
+
over: m,
|
|
2773
|
+
measuringConfiguration: w,
|
|
2774
2774
|
scrollableAncestors: y,
|
|
2775
|
-
scrollableAncestorRects:
|
|
2775
|
+
scrollableAncestorRects: C,
|
|
2776
2776
|
windowRect: x
|
|
2777
|
-
} = kn(),
|
|
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:
|
|
2781
|
-
containerNodeRect:
|
|
2780
|
+
activeNodeRect: g,
|
|
2781
|
+
containerNodeRect: h,
|
|
2782
2782
|
draggingNodeRect: p.rect,
|
|
2783
|
-
over:
|
|
2783
|
+
over: m,
|
|
2784
2784
|
overlayNodeRect: p.rect,
|
|
2785
2785
|
scrollableAncestors: y,
|
|
2786
|
-
scrollableAncestorRects:
|
|
2787
|
-
transform:
|
|
2786
|
+
scrollableAncestorRects: C,
|
|
2787
|
+
transform: I,
|
|
2788
2788
|
windowRect: x
|
|
2789
|
-
}),
|
|
2789
|
+
}), M = jt(g), z = To({
|
|
2790
2790
|
config: r,
|
|
2791
|
-
draggableNodes:
|
|
2792
|
-
droppableContainers:
|
|
2793
|
-
measuringConfiguration:
|
|
2794
|
-
}), A =
|
|
2795
|
-
return
|
|
2796
|
-
animation:
|
|
2797
|
-
}, d &&
|
|
2798
|
-
key:
|
|
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:
|
|
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
|
|
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
|
-
},
|
|
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 =
|
|
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
|
|
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
|
|
2899
|
+
const zn = "Sortable", $n = /* @__PURE__ */ j.createContext({
|
|
2900
2900
|
activeIndex: -1,
|
|
2901
|
-
containerId:
|
|
2901
|
+
containerId: zn,
|
|
2902
2902
|
disableTransforms: !1,
|
|
2903
2903
|
items: [],
|
|
2904
2904
|
overIndex: -1,
|
|
2905
2905
|
useDragOverlay: !1,
|
|
2906
2906
|
sortedRects: [],
|
|
2907
|
-
strategy:
|
|
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 =
|
|
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(
|
|
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
|
-
|
|
2930
|
-
}, [
|
|
2931
|
-
|
|
2932
|
-
}, [
|
|
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:
|
|
2935
|
+
activeIndex: f,
|
|
2936
2936
|
containerId: d,
|
|
2937
|
-
disabled:
|
|
2937
|
+
disabled: C,
|
|
2938
2938
|
disableTransforms: y,
|
|
2939
|
-
items:
|
|
2939
|
+
items: h,
|
|
2940
2940
|
overIndex: p,
|
|
2941
|
-
useDragOverlay:
|
|
2942
|
-
sortedRects: Lo(
|
|
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
|
-
[
|
|
2946
|
+
[f, d, C.draggable, C.droppable, y, h, p, l, g, o]
|
|
2947
2947
|
);
|
|
2948
|
-
return
|
|
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__ */
|
|
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 =
|
|
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 =
|
|
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]),
|
|
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:
|
|
3027
|
-
disabled:
|
|
3028
|
-
disableTransforms:
|
|
3029
|
-
sortedRects:
|
|
3026
|
+
activeIndex: g,
|
|
3027
|
+
disabled: h,
|
|
3028
|
+
disableTransforms: b,
|
|
3029
|
+
sortedRects: f,
|
|
3030
3030
|
overIndex: p,
|
|
3031
|
-
useDragOverlay:
|
|
3032
|
-
strategy:
|
|
3033
|
-
} =
|
|
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:
|
|
3036
|
+
index: C,
|
|
3037
3037
|
items: u
|
|
3038
3038
|
},
|
|
3039
3039
|
...o
|
|
3040
|
-
}), [d, o,
|
|
3041
|
-
rect:
|
|
3040
|
+
}), [d, o, C, u]), I = T(() => u.slice(u.indexOf(s)), [u, s]), {
|
|
3041
|
+
rect: R,
|
|
3042
3042
|
node: E,
|
|
3043
|
-
isOver:
|
|
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:
|
|
3050
|
+
updateMeasurementsFor: I,
|
|
3051
3051
|
...l
|
|
3052
3052
|
}
|
|
3053
3053
|
}), {
|
|
3054
3054
|
active: A,
|
|
3055
|
-
activatorEvent:
|
|
3056
|
-
activeNodeRect:
|
|
3057
|
-
attributes:
|
|
3058
|
-
setNodeRef:
|
|
3059
|
-
listeners:
|
|
3060
|
-
isDragging:
|
|
3061
|
-
over:
|
|
3062
|
-
setActivatorNodeRef:
|
|
3063
|
-
transform:
|
|
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
|
-
}),
|
|
3073
|
-
rects:
|
|
3074
|
-
activeNodeRect:
|
|
3075
|
-
activeIndex:
|
|
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:
|
|
3078
|
-
}) : null,
|
|
3077
|
+
index: C
|
|
3078
|
+
}) : null, G = tt(g) && tt(p) ? i({
|
|
3079
3079
|
id: s,
|
|
3080
3080
|
items: u,
|
|
3081
|
-
activeIndex:
|
|
3081
|
+
activeIndex: g,
|
|
3082
3082
|
overIndex: p
|
|
3083
|
-
}) :
|
|
3084
|
-
activeId:
|
|
3083
|
+
}) : C, W = A == null ? void 0 : A.id, O = B({
|
|
3084
|
+
activeId: W,
|
|
3085
3085
|
items: u,
|
|
3086
|
-
newIndex:
|
|
3086
|
+
newIndex: G,
|
|
3087
3087
|
containerId: d
|
|
3088
|
-
}),
|
|
3088
|
+
}), he = u !== O.current.items, L = t({
|
|
3089
3089
|
active: A,
|
|
3090
3090
|
containerId: d,
|
|
3091
|
-
isDragging:
|
|
3092
|
-
isSorting:
|
|
3091
|
+
isDragging: q,
|
|
3092
|
+
isSorting: D,
|
|
3093
3093
|
id: s,
|
|
3094
|
-
index:
|
|
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
|
-
}),
|
|
3102
|
-
disabled: !
|
|
3103
|
-
index:
|
|
3101
|
+
}), pe = Yo({
|
|
3102
|
+
disabled: !L,
|
|
3103
|
+
index: C,
|
|
3104
3104
|
node: E,
|
|
3105
|
-
rect:
|
|
3105
|
+
rect: R
|
|
3106
3106
|
});
|
|
3107
|
-
return
|
|
3108
|
-
|
|
3109
|
-
}, [
|
|
3110
|
-
if (
|
|
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 (
|
|
3113
|
-
O.current.activeId =
|
|
3112
|
+
if (W && !O.current.activeId) {
|
|
3113
|
+
O.current.activeId = W;
|
|
3114
3114
|
return;
|
|
3115
3115
|
}
|
|
3116
|
-
const
|
|
3117
|
-
O.current.activeId =
|
|
3116
|
+
const Ie = setTimeout(() => {
|
|
3117
|
+
O.current.activeId = W;
|
|
3118
3118
|
}, 50);
|
|
3119
|
-
return () => clearTimeout(
|
|
3120
|
-
}, [
|
|
3119
|
+
return () => clearTimeout(Ie);
|
|
3120
|
+
}, [W]), {
|
|
3121
3121
|
active: A,
|
|
3122
|
-
activeIndex:
|
|
3123
|
-
attributes:
|
|
3122
|
+
activeIndex: g,
|
|
3123
|
+
attributes: J,
|
|
3124
3124
|
data: x,
|
|
3125
|
-
rect:
|
|
3126
|
-
index:
|
|
3127
|
-
newIndex:
|
|
3125
|
+
rect: R,
|
|
3126
|
+
index: C,
|
|
3127
|
+
newIndex: G,
|
|
3128
3128
|
items: u,
|
|
3129
|
-
isOver:
|
|
3130
|
-
isSorting:
|
|
3131
|
-
isDragging:
|
|
3132
|
-
listeners:
|
|
3129
|
+
isOver: M,
|
|
3130
|
+
isSorting: D,
|
|
3131
|
+
isDragging: q,
|
|
3132
|
+
listeners: De,
|
|
3133
3133
|
node: E,
|
|
3134
3134
|
overIndex: p,
|
|
3135
|
-
over:
|
|
3136
|
-
setNodeRef:
|
|
3137
|
-
setActivatorNodeRef:
|
|
3138
|
-
setDroppableNodeRef:
|
|
3139
|
-
setDraggableNodeRef:
|
|
3140
|
-
transform:
|
|
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
|
-
|
|
3147
|
-
|
|
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 (!(
|
|
3151
|
-
return
|
|
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
|
|
3174
|
-
const i = e.findIndex(({ id:
|
|
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
|
-
}),
|
|
3177
|
-
let
|
|
3178
|
-
return
|
|
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
|
|
3181
|
-
return
|
|
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
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
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
|
|
3217
|
+
return n(e);
|
|
3216
3218
|
}
|
|
3217
3219
|
function ti(e, t, n) {
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
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
|
|
3231
|
+
return r(e);
|
|
3228
3232
|
}
|
|
3229
3233
|
function Fn(e, t) {
|
|
3230
|
-
const
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
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
|
|
3247
|
+
function ni(e, t) {
|
|
3244
3248
|
const n = Qo(e, t);
|
|
3245
3249
|
return n ? Hn(n.children) : 0;
|
|
3246
3250
|
}
|
|
3247
|
-
function
|
|
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
|
|
3255
|
+
const oi = [
|
|
3252
3256
|
S.Down,
|
|
3253
3257
|
S.Right,
|
|
3254
3258
|
S.Up,
|
|
3255
3259
|
S.Left
|
|
3256
|
-
],
|
|
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 (
|
|
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 (
|
|
3268
|
-
const { depth:
|
|
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 (
|
|
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 (
|
|
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
|
|
3294
|
-
c.forEach((
|
|
3295
|
-
if (
|
|
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(
|
|
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 &&
|
|
3305
|
+
a.top < p.top && g.push(f);
|
|
3302
3306
|
break;
|
|
3303
3307
|
case S.Up:
|
|
3304
|
-
a.top > p.top &&
|
|
3308
|
+
a.top > p.top && g.push(f);
|
|
3305
3309
|
break;
|
|
3306
3310
|
}
|
|
3307
3311
|
});
|
|
3308
|
-
const
|
|
3312
|
+
const h = yr({
|
|
3309
3313
|
active: i,
|
|
3310
3314
|
collisionRect: a,
|
|
3311
3315
|
pointerCoordinates: null,
|
|
3312
3316
|
droppableRects: l,
|
|
3313
|
-
droppableContainers:
|
|
3317
|
+
droppableContainers: g
|
|
3314
3318
|
});
|
|
3315
|
-
let
|
|
3316
|
-
if (
|
|
3317
|
-
const
|
|
3318
|
-
if (
|
|
3319
|
-
const
|
|
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:
|
|
3325
|
+
const { depth: I } = At(
|
|
3322
3326
|
u,
|
|
3323
3327
|
i.id,
|
|
3324
|
-
|
|
3328
|
+
b,
|
|
3325
3329
|
(y.depth - x.depth) * n,
|
|
3326
3330
|
n
|
|
3327
|
-
), E =
|
|
3331
|
+
), E = w > C ? 1 : -1, M = t ? (a.height - f.height) / 2 : 0;
|
|
3328
3332
|
return {
|
|
3329
|
-
x: p.left +
|
|
3330
|
-
y: p.top + E *
|
|
3333
|
+
x: p.left + I * n,
|
|
3334
|
+
y: p.top + E * M
|
|
3331
3335
|
};
|
|
3332
3336
|
}
|
|
3333
3337
|
}
|
|
3334
3338
|
}
|
|
3335
3339
|
}
|
|
3336
|
-
},
|
|
3337
|
-
Wrapper:
|
|
3338
|
-
clone:
|
|
3339
|
-
TreeItem:
|
|
3340
|
-
ghost:
|
|
3341
|
-
indicator:
|
|
3342
|
-
Text:
|
|
3343
|
-
Count:
|
|
3344
|
-
disableInteraction:
|
|
3345
|
-
disableSelection:
|
|
3346
|
-
Collapse:
|
|
3347
|
-
collapsed:
|
|
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
|
|
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
|
|
3389
|
-
const
|
|
3390
|
-
Action:
|
|
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:
|
|
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
|
-
),
|
|
3408
|
-
function
|
|
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__ */
|
|
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
|
|
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__ */
|
|
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
|
|
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:
|
|
3469
|
-
onAdd:
|
|
3470
|
-
onLabelClick:
|
|
3471
|
-
style:
|
|
3472
|
+
onRemove: g,
|
|
3473
|
+
onAdd: h,
|
|
3474
|
+
onLabelClick: b,
|
|
3475
|
+
style: f,
|
|
3472
3476
|
value: p,
|
|
3473
|
-
wrapperRef:
|
|
3474
|
-
...
|
|
3475
|
-
}, y) => /* @__PURE__ */
|
|
3477
|
+
wrapperRef: m,
|
|
3478
|
+
...w
|
|
3479
|
+
}, y) => /* @__PURE__ */ _(
|
|
3476
3480
|
"li",
|
|
3477
3481
|
{
|
|
3478
|
-
className:
|
|
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:
|
|
3490
|
+
ref: m,
|
|
3487
3491
|
style: {
|
|
3488
3492
|
"--spacing": `${l * n}px`
|
|
3489
3493
|
},
|
|
3490
|
-
...
|
|
3491
|
-
children: /* @__PURE__ */ fn("div", { className: ue.TreeItem, ref: y, style:
|
|
3492
|
-
!i && /* @__PURE__ */
|
|
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:
|
|
3498
|
-
children:
|
|
3501
|
+
className: Nt(ue.Collapse, u && ue.collapsed),
|
|
3502
|
+
children: Ri
|
|
3499
3503
|
}
|
|
3500
3504
|
),
|
|
3501
|
-
/* @__PURE__ */
|
|
3502
|
-
!t &&
|
|
3503
|
-
!t &&
|
|
3504
|
-
t && e && e > 1 ? /* @__PURE__ */
|
|
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
|
-
),
|
|
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:
|
|
3525
|
+
animateLayoutChanges: Oi
|
|
3522
3526
|
}), d = {
|
|
3523
|
-
transform:
|
|
3527
|
+
transform: ge.Translate.toString(c),
|
|
3524
3528
|
transition: u
|
|
3525
3529
|
};
|
|
3526
|
-
return /* @__PURE__ */
|
|
3527
|
-
|
|
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),
|
|
3548
|
+
const dn = ut(Ti), Ai = {
|
|
3545
3549
|
droppable: {
|
|
3546
|
-
strategy:
|
|
3550
|
+
strategy: Ne.Always
|
|
3547
3551
|
}
|
|
3548
3552
|
}, Ni = {
|
|
3549
3553
|
keyframes({ transform: e }) {
|
|
3550
3554
|
return [
|
|
3551
|
-
{ opacity: 1, transform:
|
|
3555
|
+
{ opacity: 1, transform: ge.Transform.toString(e.initial) },
|
|
3552
3556
|
{
|
|
3553
3557
|
opacity: 0,
|
|
3554
|
-
transform:
|
|
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:
|
|
3566
|
-
easing:
|
|
3569
|
+
duration: Tt.duration,
|
|
3570
|
+
easing: Tt.easing
|
|
3567
3571
|
});
|
|
3568
3572
|
}
|
|
3569
3573
|
};
|
|
3570
|
-
function
|
|
3571
|
-
|
|
3572
|
-
|
|
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
|
|
3585
|
-
let v = It(
|
|
3586
|
-
const
|
|
3587
|
-
|
|
3588
|
-
(
|
|
3589
|
-
...
|
|
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
|
-
} :
|
|
3595
|
+
} : N
|
|
3592
3596
|
));
|
|
3593
|
-
const
|
|
3594
|
-
(
|
|
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
|
|
3601
|
+
return ri(
|
|
3598
3602
|
v,
|
|
3599
|
-
|
|
3603
|
+
g ? [g, ...P] : P
|
|
3600
3604
|
);
|
|
3601
|
-
}, [
|
|
3602
|
-
items:
|
|
3603
|
-
offset:
|
|
3604
|
-
}), [
|
|
3605
|
-
() =>
|
|
3606
|
-
),
|
|
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(
|
|
3609
|
-
coordinateGetter:
|
|
3612
|
+
Gt(zt, {
|
|
3613
|
+
coordinateGetter: R
|
|
3610
3614
|
})
|
|
3611
|
-
),
|
|
3612
|
-
|
|
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:
|
|
3615
|
-
offset:
|
|
3618
|
+
items: C,
|
|
3619
|
+
offset: p
|
|
3616
3620
|
};
|
|
3617
|
-
}, [
|
|
3618
|
-
const
|
|
3621
|
+
}, [C, p]);
|
|
3622
|
+
const A = $(
|
|
3619
3623
|
({ active: { id: v } }) => {
|
|
3620
|
-
|
|
3621
|
-
const
|
|
3622
|
-
|
|
3623
|
-
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
|
-
[
|
|
3628
|
-
), Q =
|
|
3629
|
-
|
|
3630
|
-
}, []),
|
|
3631
|
-
|
|
3632
|
-
}, []),
|
|
3633
|
-
|
|
3634
|
-
}, []),
|
|
3635
|
-
({ active: v, over:
|
|
3636
|
-
if (
|
|
3637
|
-
const { depth:
|
|
3638
|
-
|
|
3639
|
-
const
|
|
3640
|
-
t(
|
|
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
|
-
[
|
|
3644
|
-
),
|
|
3645
|
-
|
|
3646
|
-
}, [
|
|
3647
|
+
[e, x, u, J, t]
|
|
3648
|
+
), De = $(() => {
|
|
3649
|
+
J();
|
|
3650
|
+
}, [J]), q = $(
|
|
3647
3651
|
(v) => {
|
|
3648
|
-
t((
|
|
3652
|
+
t((D) => ei(D, v));
|
|
3649
3653
|
},
|
|
3650
3654
|
[t]
|
|
3651
|
-
),
|
|
3655
|
+
), Ce = $(
|
|
3652
3656
|
({
|
|
3653
3657
|
id: v,
|
|
3654
|
-
canFetchChildren:
|
|
3655
|
-
collapsed:
|
|
3656
|
-
}) =>
|
|
3657
|
-
(
|
|
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
|
-
),
|
|
3661
|
-
(v,
|
|
3662
|
-
if (
|
|
3664
|
+
), se = $(
|
|
3665
|
+
(v, D, P) => {
|
|
3666
|
+
if (P && x) {
|
|
3663
3667
|
if (v !== "onDragEnd") {
|
|
3664
|
-
if (
|
|
3668
|
+
if (w && x.parentId === w.parentId && P === w.overId)
|
|
3665
3669
|
return;
|
|
3666
|
-
|
|
3667
|
-
parentId:
|
|
3668
|
-
overId:
|
|
3670
|
+
y({
|
|
3671
|
+
parentId: x.parentId,
|
|
3672
|
+
overId: P
|
|
3669
3673
|
});
|
|
3670
3674
|
}
|
|
3671
|
-
const
|
|
3672
|
-
let
|
|
3673
|
-
const
|
|
3674
|
-
if (
|
|
3675
|
-
if (
|
|
3676
|
-
|
|
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
|
|
3679
|
-
for (;
|
|
3680
|
-
const
|
|
3681
|
-
|
|
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
|
-
|
|
3687
|
+
L && (W = `${D} was ${O} after ${L.id}.`);
|
|
3684
3688
|
}
|
|
3685
3689
|
else {
|
|
3686
|
-
const
|
|
3687
|
-
|
|
3690
|
+
const L = K[F + 1];
|
|
3691
|
+
W = `${D} was ${O} before ${L.id}.`;
|
|
3688
3692
|
}
|
|
3689
|
-
return
|
|
3693
|
+
return W;
|
|
3690
3694
|
}
|
|
3691
3695
|
},
|
|
3692
|
-
[
|
|
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:
|
|
3702
|
-
return
|
|
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:
|
|
3705
|
-
return
|
|
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:
|
|
3708
|
-
return
|
|
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:
|
|
3718
|
+
sensors: E,
|
|
3715
3719
|
collisionDetection: mr,
|
|
3716
|
-
measuring:
|
|
3717
|
-
onDragStart:
|
|
3720
|
+
measuring: Ai,
|
|
3721
|
+
onDragStart: A,
|
|
3718
3722
|
onDragMove: Q,
|
|
3719
|
-
onDragOver:
|
|
3720
|
-
onDragEnd:
|
|
3721
|
-
onDragCancel:
|
|
3722
|
-
children: /* @__PURE__ */ fn($o, { items:
|
|
3723
|
-
|
|
3724
|
-
({ id: v, label:
|
|
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:
|
|
3729
|
-
disableDragging: !!
|
|
3730
|
-
depth: v ===
|
|
3732
|
+
value: D,
|
|
3733
|
+
disableDragging: !!K,
|
|
3734
|
+
depth: v === g && x ? x.depth : F,
|
|
3731
3735
|
indentationWidth: i,
|
|
3732
3736
|
indicator: o,
|
|
3733
|
-
collapsed: !!(
|
|
3734
|
-
onCollapse: n && (
|
|
3735
|
-
onRemove: s ? () => a ? a(v) :
|
|
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
|
-
|
|
3747
|
+
/* @__PURE__ */ _(
|
|
3748
|
+
Mo,
|
|
3745
3749
|
{
|
|
3746
3750
|
dropAnimation: Ni,
|
|
3747
|
-
modifiers: o ? [
|
|
3748
|
-
children:
|
|
3751
|
+
modifiers: o ? [Li] : void 0,
|
|
3752
|
+
children: g && z ? /* @__PURE__ */ _(
|
|
3749
3753
|
dn,
|
|
3750
3754
|
{
|
|
3751
|
-
id:
|
|
3752
|
-
depth:
|
|
3755
|
+
id: g,
|
|
3756
|
+
depth: z.depth,
|
|
3753
3757
|
clone: !0,
|
|
3754
|
-
childCount:
|
|
3755
|
-
value:
|
|
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
|
|
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
|
|
3788
|
+
const zi = ut(Mi);
|
|
3785
3789
|
export {
|
|
3786
|
-
|
|
3787
|
-
|
|
3790
|
+
zi as SortableTree,
|
|
3791
|
+
Fn as getItemById,
|
|
3788
3792
|
ei as removeItemById,
|
|
3789
3793
|
ti as setTreeItemProperties
|
|
3790
3794
|
};
|