@vue-dnd-kit/core 2.0.3 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,76 +1,76 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".dnd-kit-default-overlay{transform:translate3d(var(--position-x),var(--position-y),0)}.dnd-kit-overlay-container{position:fixed;top:0;left:0;pointer-events:none;cursor:grabbing;z-index:9999}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
import { ref as
|
|
3
|
-
const
|
|
2
|
+
import { ref as W, watch as oe, shallowRef as J, reactive as V, computed as b, onScopeDispose as We, onMounted as Y, onBeforeUnmount as X, inject as ze, defineComponent as Oe, unref as k, openBlock as C, createElementBlock as j, normalizeStyle as xe, Fragment as ue, renderList as je, createBlock as Q, resolveDynamicComponent as fe, createCommentVNode as Je, useTemplateRef as Qe, provide as et, renderSlot as Ae, Teleport as tt, createElementVNode as nt, mergeProps as st } from "vue";
|
|
3
|
+
const T = {
|
|
4
4
|
SELECT_AREA: "data-dnd-kit-select-area",
|
|
5
5
|
DRAGGABLE: "data-dnd-kit-draggable",
|
|
6
6
|
DROPPABLE: "data-dnd-kit-droppable",
|
|
7
7
|
CONSTRAINT_AREA: "data-dnd-kit-constraint-area"
|
|
8
|
-
},
|
|
9
|
-
SELECT_AREA: `[${
|
|
10
|
-
DRAGGABLE: `[${
|
|
11
|
-
CONSTRAINT_AREA: `[${
|
|
12
|
-
},
|
|
8
|
+
}, F = {
|
|
9
|
+
SELECT_AREA: `[${T.SELECT_AREA}]`,
|
|
10
|
+
DRAGGABLE: `[${T.DRAGGABLE}]`,
|
|
11
|
+
CONSTRAINT_AREA: `[${T.CONSTRAINT_AREA}]`
|
|
12
|
+
}, De = "VueDnDKitProvider", Ee = (e, t, s, n) => {
|
|
13
13
|
const o = /* @__PURE__ */ new Set();
|
|
14
|
-
return t.forEach((
|
|
15
|
-
const r = e.get(
|
|
16
|
-
if (!r ||
|
|
17
|
-
const
|
|
18
|
-
if (!
|
|
19
|
-
o.add(
|
|
14
|
+
return t.forEach((a) => {
|
|
15
|
+
const r = e.get(a), i = n ? n(a) : r?.disabled;
|
|
16
|
+
if (!r || i) return;
|
|
17
|
+
const g = r.modifier?.keys, l = r.modifier?.method;
|
|
18
|
+
if (!g || !l || g.length === 0) {
|
|
19
|
+
o.add(a);
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
g[l]((c) => s.value.has(c)) && o.add(a);
|
|
23
23
|
}), o;
|
|
24
24
|
};
|
|
25
|
-
let
|
|
26
|
-
const
|
|
25
|
+
let Be = "", ot = "", rt = "";
|
|
26
|
+
const v = (e) => e.value ? e.value instanceof HTMLElement ? e.value : e.value.$el : null, H = (e, t) => e !== t && e.contains(t), it = (e, t) => !(e.right < t.left || e.left > t.right || e.bottom < t.top || e.top > t.bottom), de = () => {
|
|
27
27
|
const e = document.body;
|
|
28
|
-
|
|
29
|
-
},
|
|
28
|
+
Be = e.style.userSelect, e.style.userSelect = "none", window.addEventListener("contextmenu", w), window.addEventListener("selectstart", w), window.addEventListener("touchstart", w), window.addEventListener("touchmove", w);
|
|
29
|
+
}, me = () => {
|
|
30
30
|
const e = document.body;
|
|
31
|
-
e.style.userSelect =
|
|
32
|
-
},
|
|
31
|
+
e.style.userSelect = Be, e.style.touchAction = ot, e.style.overscrollBehavior = rt, window.removeEventListener("contextmenu", w), window.removeEventListener("selectstart", w), window.removeEventListener("touchstart", w), window.removeEventListener("touchmove", w);
|
|
32
|
+
}, w = (e) => e.preventDefault(), Me = (e, t) => {
|
|
33
33
|
if (t.entities.draggableMap.get(e)?.disabled) return !0;
|
|
34
34
|
for (const n of t.entities.visibleDraggableSet)
|
|
35
|
-
if (t.entities.draggableMap.get(n)?.disabled &&
|
|
35
|
+
if (t.entities.draggableMap.get(n)?.disabled && H(n, e)) return !0;
|
|
36
36
|
return !1;
|
|
37
|
-
},
|
|
37
|
+
}, _ = (e, t) => {
|
|
38
38
|
if (t.entities.droppableMap.get(e)?.disabled) return !0;
|
|
39
39
|
for (const n of t.entities.visibleDroppableSet)
|
|
40
|
-
if (t.entities.droppableMap.get(n)?.disabled &&
|
|
40
|
+
if (t.entities.droppableMap.get(n)?.disabled && H(n, e)) return !0;
|
|
41
41
|
return !1;
|
|
42
|
-
},
|
|
42
|
+
}, ve = (e, t) => {
|
|
43
43
|
if (!e.length || !t.length) return !0;
|
|
44
44
|
const s = new Set(t);
|
|
45
45
|
return e.some((n) => s.has(n));
|
|
46
46
|
};
|
|
47
|
-
function
|
|
47
|
+
function at(e, t, s, n) {
|
|
48
48
|
const o = /* @__PURE__ */ new Set();
|
|
49
|
-
for (const
|
|
50
|
-
const
|
|
51
|
-
for (const l of
|
|
49
|
+
for (const i of t.keys()) {
|
|
50
|
+
const g = s.get(i);
|
|
51
|
+
for (const l of g?.groups ?? []) o.add(l);
|
|
52
52
|
}
|
|
53
|
-
const
|
|
54
|
-
for (const
|
|
55
|
-
const l = n.get(
|
|
56
|
-
|
|
53
|
+
const a = [...o], r = /* @__PURE__ */ new Set();
|
|
54
|
+
for (const i of e) {
|
|
55
|
+
const l = n.get(i)?.groups ?? [];
|
|
56
|
+
ve(a, l) && r.add(i);
|
|
57
57
|
}
|
|
58
58
|
return r;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function lt(e, t, s) {
|
|
61
61
|
const n = /* @__PURE__ */ new Set();
|
|
62
62
|
for (const r of t.keys()) {
|
|
63
|
-
const
|
|
64
|
-
for (const
|
|
63
|
+
const i = s.get(r);
|
|
64
|
+
for (const g of i?.groups ?? []) n.add(g);
|
|
65
65
|
}
|
|
66
|
-
const o = [...n],
|
|
66
|
+
const o = [...n], a = /* @__PURE__ */ new Set();
|
|
67
67
|
for (const r of e) {
|
|
68
|
-
const
|
|
69
|
-
|
|
68
|
+
const g = s.get(r)?.groups ?? [];
|
|
69
|
+
ve(o, g) && a.add(r);
|
|
70
70
|
}
|
|
71
|
-
return
|
|
71
|
+
return a;
|
|
72
72
|
}
|
|
73
|
-
const
|
|
73
|
+
const le = (e) => {
|
|
74
74
|
const t = new IntersectionObserver((s) => {
|
|
75
75
|
s.forEach((n) => {
|
|
76
76
|
const o = n.target;
|
|
@@ -82,23 +82,23 @@ const fe = (e) => {
|
|
|
82
82
|
unobserve: (s) => t.unobserve(s),
|
|
83
83
|
disconnect: () => t.disconnect()
|
|
84
84
|
};
|
|
85
|
-
},
|
|
85
|
+
}, ct = (e) => {
|
|
86
86
|
const t = new ResizeObserver((s) => {
|
|
87
87
|
const n = s[0];
|
|
88
88
|
if (!n) return;
|
|
89
|
-
const { width: o, height:
|
|
90
|
-
e.value = { width: o, height:
|
|
89
|
+
const { width: o, height: a } = n.contentRect;
|
|
90
|
+
e.value = { width: o, height: a };
|
|
91
91
|
});
|
|
92
92
|
return {
|
|
93
93
|
observe: (s) => t.observe(s),
|
|
94
94
|
unobserve: (s) => t.unobserve(s),
|
|
95
95
|
disconnect: () => t.disconnect()
|
|
96
96
|
};
|
|
97
|
-
},
|
|
98
|
-
const t =
|
|
97
|
+
}, gt = (e) => {
|
|
98
|
+
const t = W(null), s = ct(t), n = oe(
|
|
99
99
|
e,
|
|
100
|
-
(
|
|
101
|
-
s.disconnect(),
|
|
100
|
+
(a) => {
|
|
101
|
+
s.disconnect(), a && s.observe(a);
|
|
102
102
|
},
|
|
103
103
|
{ immediate: !0 }
|
|
104
104
|
);
|
|
@@ -108,18 +108,18 @@ const fe = (e) => {
|
|
|
108
108
|
}
|
|
109
109
|
} };
|
|
110
110
|
};
|
|
111
|
-
function
|
|
111
|
+
function he(e, t = 0, s = 0) {
|
|
112
112
|
return {
|
|
113
113
|
start: { x: e.clientX, y: e.clientY },
|
|
114
114
|
current: { x: e.clientX, y: e.clientY },
|
|
115
115
|
offset: { x: t, y: s }
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function Fe(e, t) {
|
|
119
119
|
const s = t.getBoundingClientRect(), n = s.width > 0 ? (e.clientX - s.left) / s.width : 0.5, o = s.height > 0 ? (e.clientY - s.top) / s.height : 0.5;
|
|
120
120
|
return { x: n, y: o };
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function _e(e, t) {
|
|
123
123
|
return {
|
|
124
124
|
...t,
|
|
125
125
|
initialHTML: e.innerHTML,
|
|
@@ -127,34 +127,34 @@ function je(e, t) {
|
|
|
127
127
|
initialOuterHTML: e.outerHTML
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function ut(e, t, s) {
|
|
131
131
|
e.forEach((n) => {
|
|
132
132
|
const o = t.get(n);
|
|
133
|
-
s.set(n,
|
|
133
|
+
s.set(n, _e(n, o));
|
|
134
134
|
}), e.clear();
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function ft(e, t, s) {
|
|
137
137
|
s.clear();
|
|
138
138
|
const n = t.get(e);
|
|
139
|
-
s.set(e,
|
|
139
|
+
s.set(e, _e(e, n));
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
e.entities.initiatingDraggable && (e.state.value = "dragging",
|
|
141
|
+
function ee(e) {
|
|
142
|
+
e.entities.initiatingDraggable && (e.state.value = "dragging", dt(
|
|
143
143
|
e.entities.initiatingDraggable,
|
|
144
144
|
e.entities.selectedSet,
|
|
145
145
|
e.entities.draggableMap,
|
|
146
146
|
e.entities.draggingMap
|
|
147
147
|
));
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
t.has(e) ?
|
|
149
|
+
function dt(e, t, s, n) {
|
|
150
|
+
t.has(e) ? ut(t, s, n) : (t.clear(), ft(e, s, n));
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function Ge(e, t, s, n) {
|
|
153
153
|
if (n || !s) return !0;
|
|
154
154
|
const o = e.closest(s);
|
|
155
155
|
return o ? t.contains(o) : !1;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function mt(e, t) {
|
|
158
158
|
if (!e || !t) return 1;
|
|
159
159
|
const s = Math.abs(e.current.x - e.start.x), n = Math.abs(e.current.y - e.start.y);
|
|
160
160
|
if (typeof t == "number") {
|
|
@@ -163,31 +163,31 @@ function It(e, t) {
|
|
|
163
163
|
}
|
|
164
164
|
const {
|
|
165
165
|
x: o = 0,
|
|
166
|
-
y:
|
|
166
|
+
y: a = 0,
|
|
167
167
|
condition: r = "any"
|
|
168
168
|
} = t;
|
|
169
|
-
if (o === 0 &&
|
|
170
|
-
const
|
|
171
|
-
return r === "both" ? Math.min(
|
|
169
|
+
if (o === 0 && a === 0) return 1;
|
|
170
|
+
const i = o > 0 ? Math.min(s / o, 1) : 1, g = a > 0 ? Math.min(n / a, 1) : 1;
|
|
171
|
+
return r === "both" ? Math.min(i, g) : Math.max(i, g);
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function He(e, t, s) {
|
|
174
174
|
if (!s) return !0;
|
|
175
175
|
const n = s.distance != null, o = s.delay != null;
|
|
176
176
|
return !n && !o ? !0 : n && !o ? e >= 1 : !n && o ? t >= 1 : (s.condition ?? "both") === "both" ? e >= 1 && t >= 1 : e >= 1 || t >= 1;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function ht(e) {
|
|
179
179
|
if (e.state.value !== "activating" || !e.entities.initiatingDraggable)
|
|
180
180
|
return !1;
|
|
181
181
|
const t = e.entities.draggableMap.get(
|
|
182
182
|
e.entities.initiatingDraggable
|
|
183
183
|
);
|
|
184
|
-
return
|
|
184
|
+
return He(
|
|
185
185
|
e.distanceProgress.value,
|
|
186
186
|
e.delay.progress,
|
|
187
187
|
t?.activation
|
|
188
|
-
) ? (
|
|
188
|
+
) ? (ee(e), !0) : !1;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function bt(e, t) {
|
|
191
191
|
let s = null;
|
|
192
192
|
const n = () => {
|
|
193
193
|
if (e.state.value !== "activating" || !e.entities.initiatingDraggable) {
|
|
@@ -196,15 +196,15 @@ function kt(e, t) {
|
|
|
196
196
|
}
|
|
197
197
|
const o = e.entities.draggableMap.get(
|
|
198
198
|
e.entities.initiatingDraggable
|
|
199
|
-
),
|
|
200
|
-
if (!
|
|
199
|
+
), a = o?.activation?.delay;
|
|
200
|
+
if (!a) {
|
|
201
201
|
s = null;
|
|
202
202
|
return;
|
|
203
203
|
}
|
|
204
204
|
e.delay.progress = Math.min(
|
|
205
|
-
(Date.now() - e.delay.startTime) / (
|
|
205
|
+
(Date.now() - e.delay.startTime) / (a * 1e3),
|
|
206
206
|
1
|
|
207
|
-
),
|
|
207
|
+
), He(
|
|
208
208
|
e.distanceProgress.value,
|
|
209
209
|
e.delay.progress,
|
|
210
210
|
o?.activation
|
|
@@ -216,53 +216,53 @@ function kt(e, t) {
|
|
|
216
216
|
}
|
|
217
217
|
};
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function yt(e, t) {
|
|
220
220
|
const s = e.closest(
|
|
221
|
-
|
|
221
|
+
F.CONSTRAINT_AREA
|
|
222
222
|
);
|
|
223
223
|
return !s || !t.has(s) ? null : {
|
|
224
224
|
element: s,
|
|
225
225
|
entity: t.get(s)
|
|
226
226
|
};
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function pt(e, t, s, n) {
|
|
229
229
|
return s === "x" ? { x: e, y: n.top } : s === "y" ? { x: n.left, y: t } : { x: e, y: t };
|
|
230
230
|
}
|
|
231
|
-
function
|
|
232
|
-
let
|
|
233
|
-
return s !== "y" && (
|
|
231
|
+
function St(e, t, s, n, o) {
|
|
232
|
+
let a = e, r = t;
|
|
233
|
+
return s !== "y" && (a = Math.max(
|
|
234
234
|
n.left,
|
|
235
235
|
Math.min(n.right - o.width, e)
|
|
236
236
|
)), s !== "x" && (r = Math.max(
|
|
237
237
|
n.top,
|
|
238
238
|
Math.min(n.bottom - o.height, t)
|
|
239
|
-
)), { x:
|
|
239
|
+
)), { x: a, y: r };
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function Dt(e, t, s, n, o) {
|
|
242
242
|
if (!e || !t)
|
|
243
243
|
return { x: 0, y: 0 };
|
|
244
|
-
const
|
|
245
|
-
let
|
|
244
|
+
const a = t.getBoundingClientRect(), r = a.width || o?.width || 0, i = a.height || o?.height || 0;
|
|
245
|
+
let g = e.current.x - r * e.offset.x, l = e.current.y - i * e.offset.y;
|
|
246
246
|
if (!s)
|
|
247
|
-
return { x:
|
|
248
|
-
const
|
|
249
|
-
if (!
|
|
250
|
-
return { x:
|
|
251
|
-
const { element: c, entity: f } =
|
|
252
|
-
|
|
247
|
+
return { x: g, y: l };
|
|
248
|
+
const u = yt(s, n);
|
|
249
|
+
if (!u)
|
|
250
|
+
return { x: g, y: l };
|
|
251
|
+
const { element: c, entity: f } = u, d = c.getBoundingClientRect(), m = s.getBoundingClientRect(), h = pt(
|
|
252
|
+
g,
|
|
253
253
|
l,
|
|
254
254
|
f.axis || "both",
|
|
255
255
|
m
|
|
256
256
|
);
|
|
257
|
-
return f.restrictToArea ?
|
|
257
|
+
return f.restrictToArea ? St(
|
|
258
258
|
h.x,
|
|
259
259
|
h.y,
|
|
260
260
|
f.axis || "both",
|
|
261
261
|
d,
|
|
262
|
-
|
|
262
|
+
a
|
|
263
263
|
) : h;
|
|
264
264
|
}
|
|
265
|
-
const
|
|
265
|
+
const N = {
|
|
266
266
|
forDrag: ["Enter", "Space"],
|
|
267
267
|
forCancel: ["Escape"],
|
|
268
268
|
forDrop: ["Enter", "Space"],
|
|
@@ -278,19 +278,19 @@ const W = {
|
|
|
278
278
|
],
|
|
279
279
|
forMoveFaster: ["ShiftLeft", "ShiftRight"]
|
|
280
280
|
};
|
|
281
|
-
function
|
|
282
|
-
const s =
|
|
281
|
+
function Mt(e, t) {
|
|
282
|
+
const s = J(), n = W(), a = {
|
|
283
283
|
keys: {
|
|
284
|
-
pressedKeys:
|
|
285
|
-
forDrag: [...
|
|
286
|
-
forCancel: [...
|
|
287
|
-
forDrop: [...
|
|
288
|
-
forMove: [...
|
|
289
|
-
forMoveFaster: [...
|
|
284
|
+
pressedKeys: W(/* @__PURE__ */ new Set()),
|
|
285
|
+
forDrag: [...N.forDrag],
|
|
286
|
+
forCancel: [...N.forCancel],
|
|
287
|
+
forDrop: [...N.forDrop],
|
|
288
|
+
forMove: [...N.forMove],
|
|
289
|
+
forMoveFaster: [...N.forMoveFaster]
|
|
290
290
|
},
|
|
291
291
|
step: 8,
|
|
292
292
|
moveFaster: 4
|
|
293
|
-
}, r =
|
|
293
|
+
}, r = V({
|
|
294
294
|
draggableMap: /* @__PURE__ */ new Map(),
|
|
295
295
|
droppableMap: /* @__PURE__ */ new Map(),
|
|
296
296
|
selectableAreaMap: /* @__PURE__ */ new Map(),
|
|
@@ -299,93 +299,93 @@ function Bt(e, t) {
|
|
|
299
299
|
selectingArea: void 0,
|
|
300
300
|
draggingMap: /* @__PURE__ */ new Map(),
|
|
301
301
|
selectedSet: /* @__PURE__ */ new Set(),
|
|
302
|
-
allowedDroppableSet:
|
|
302
|
+
allowedDroppableSet: b(() => s.value ? at(
|
|
303
303
|
r.visibleDroppableSet,
|
|
304
304
|
r.draggingMap,
|
|
305
305
|
r.draggableMap,
|
|
306
306
|
r.droppableMap
|
|
307
307
|
) : /* @__PURE__ */ new Set()),
|
|
308
|
-
allowedDraggableSet:
|
|
308
|
+
allowedDraggableSet: b(() => s.value ? lt(
|
|
309
309
|
r.visibleDraggableSet,
|
|
310
310
|
r.draggingMap,
|
|
311
311
|
r.draggableMap
|
|
312
312
|
) : /* @__PURE__ */ new Set()),
|
|
313
|
-
modifiersSelectableAreaSet:
|
|
313
|
+
modifiersSelectableAreaSet: b(() => Ee(
|
|
314
314
|
r.selectableAreaMap,
|
|
315
315
|
r.visibleSelectableAreaSet,
|
|
316
|
-
|
|
316
|
+
a.keys.pressedKeys
|
|
317
317
|
)),
|
|
318
|
-
modifiersDraggableSet:
|
|
318
|
+
modifiersDraggableSet: b(() => Ee(
|
|
319
319
|
r.draggableMap,
|
|
320
320
|
r.visibleDraggableSet,
|
|
321
|
-
|
|
322
|
-
(
|
|
321
|
+
a.keys.pressedKeys,
|
|
322
|
+
(x) => Me(x, { entities: r })
|
|
323
323
|
)),
|
|
324
324
|
visibleDraggableSet: /* @__PURE__ */ new Set(),
|
|
325
325
|
visibleDroppableSet: /* @__PURE__ */ new Set(),
|
|
326
326
|
visibleSelectableAreaSet: /* @__PURE__ */ new Set()
|
|
327
|
-
}),
|
|
327
|
+
}), i = V({
|
|
328
328
|
draggable: /* @__PURE__ */ new Map(),
|
|
329
329
|
droppable: /* @__PURE__ */ new Map()
|
|
330
|
-
}),
|
|
331
|
-
throttle:
|
|
332
|
-
}, l =
|
|
330
|
+
}), g = {
|
|
331
|
+
throttle: J(0)
|
|
332
|
+
}, l = V({
|
|
333
333
|
x: window.scrollX,
|
|
334
334
|
y: window.scrollY
|
|
335
|
-
}),
|
|
335
|
+
}), u = V({
|
|
336
336
|
progress: 0,
|
|
337
337
|
startTime: 0
|
|
338
|
-
}), c =
|
|
338
|
+
}), c = b(() => {
|
|
339
339
|
if (!n.value || !r.initiatingDraggable) return 0;
|
|
340
|
-
const
|
|
341
|
-
return
|
|
342
|
-
}), f =
|
|
340
|
+
const x = r.draggableMap.get(r.initiatingDraggable)?.activation?.distance;
|
|
341
|
+
return x ? mt(n.value, x) : 1;
|
|
342
|
+
}), f = le(
|
|
343
343
|
r.visibleDraggableSet
|
|
344
|
-
), d =
|
|
344
|
+
), d = le(
|
|
345
345
|
r.visibleDroppableSet
|
|
346
|
-
), m =
|
|
346
|
+
), m = le(
|
|
347
347
|
r.visibleSelectableAreaSet
|
|
348
|
-
), { overlaySize: h, overlaySizeObserver:
|
|
349
|
-
const
|
|
350
|
-
return
|
|
348
|
+
), { overlaySize: h, overlaySizeObserver: p } = gt(e), y = W(), M = b(() => {
|
|
349
|
+
const D = r.initiatingDraggable;
|
|
350
|
+
return Dt(
|
|
351
351
|
n.value,
|
|
352
352
|
e.value,
|
|
353
|
-
|
|
353
|
+
D || null,
|
|
354
354
|
r.constraintsAreaMap,
|
|
355
355
|
h.value
|
|
356
356
|
);
|
|
357
|
-
}),
|
|
357
|
+
}), S = b({
|
|
358
358
|
get: () => t?.overlayTo,
|
|
359
|
-
set: (
|
|
360
|
-
}),
|
|
359
|
+
set: (D) => S.value = D
|
|
360
|
+
}), U = b(() => t?.autoScrollViewport);
|
|
361
361
|
return {
|
|
362
362
|
state: s,
|
|
363
363
|
pointer: n,
|
|
364
364
|
entities: r,
|
|
365
|
-
keyboard:
|
|
365
|
+
keyboard: a,
|
|
366
366
|
scrollPosition: l,
|
|
367
|
-
delay:
|
|
367
|
+
delay: u,
|
|
368
368
|
distanceProgress: c,
|
|
369
|
-
hovered:
|
|
370
|
-
collision:
|
|
369
|
+
hovered: i,
|
|
370
|
+
collision: g,
|
|
371
371
|
overlay: {
|
|
372
372
|
size: h,
|
|
373
|
-
position:
|
|
374
|
-
render:
|
|
373
|
+
position: M,
|
|
374
|
+
render: y,
|
|
375
375
|
ref: e,
|
|
376
|
-
to:
|
|
376
|
+
to: S
|
|
377
377
|
},
|
|
378
378
|
lib: {
|
|
379
379
|
draggableObserver: f,
|
|
380
380
|
droppableObserver: d,
|
|
381
381
|
selectableAreaObserver: m,
|
|
382
|
-
overlaySizeObserver:
|
|
382
|
+
overlaySizeObserver: p,
|
|
383
383
|
rectCache: /* @__PURE__ */ new Map()
|
|
384
384
|
},
|
|
385
|
-
autoScrollViewport:
|
|
385
|
+
autoScrollViewport: U
|
|
386
386
|
};
|
|
387
387
|
}
|
|
388
|
-
const
|
|
388
|
+
const te = (e) => {
|
|
389
389
|
const t = e.hovered.draggable.keys().next().value;
|
|
390
390
|
if (t) {
|
|
391
391
|
const n = e.entities.draggableMap.get(t);
|
|
@@ -398,179 +398,179 @@ const ce = (e) => {
|
|
|
398
398
|
}
|
|
399
399
|
e.lib.rectCache.clear(), e.pointer.value = void 0, e.state.value = void 0, e.entities.selectingArea = void 0, e.entities.initiatingDraggable = void 0, e.delay.progress = 0, e.delay.startTime = 0, e.entities.draggingMap.clear(), e.hovered.draggable.clear(), e.hovered.droppable.clear();
|
|
400
400
|
};
|
|
401
|
-
function
|
|
401
|
+
function I(e, t, s) {
|
|
402
402
|
const n = Math.max(0, Math.min(t, e.length));
|
|
403
403
|
return [...e.slice(0, n), ...s, ...e.slice(n)];
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function we(e, t, s = 1) {
|
|
406
406
|
const n = Math.max(0, Math.min(t, e.length - 1)), o = Math.max(0, Math.min(s, e.length - n));
|
|
407
407
|
return [...e.slice(0, n), ...e.slice(n + o)];
|
|
408
408
|
}
|
|
409
|
-
function
|
|
410
|
-
const s = [...new Set(t)].filter((o) => o >= 0 && o < e.length).sort((o,
|
|
409
|
+
function G(e, t) {
|
|
410
|
+
const s = [...new Set(t)].filter((o) => o >= 0 && o < e.length).sort((o, a) => a - o);
|
|
411
411
|
let n = e;
|
|
412
|
-
for (const o of s) n =
|
|
412
|
+
for (const o of s) n = we(n, o, 1);
|
|
413
413
|
return n;
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function Ke(e, t, s) {
|
|
416
416
|
if (t === s || t < 0 || s < 0 || t >= e.length || s >= e.length)
|
|
417
417
|
return e;
|
|
418
418
|
const n = [...e];
|
|
419
419
|
return [n[t], n[s]] = [n[s], n[t]], n;
|
|
420
420
|
}
|
|
421
|
-
const
|
|
421
|
+
const R = {
|
|
422
422
|
getInsertSide(e, t) {
|
|
423
423
|
return e ? t === "vertical" ? e.top && !e.bottom ? "before" : e.bottom && !e.top ? "after" : e.top ? "before" : null : e.left && !e.right ? "before" : e.right && !e.left ? "after" : e.left ? "before" : null : null;
|
|
424
424
|
},
|
|
425
425
|
isAtZoneStart(e, t) {
|
|
426
|
-
return
|
|
426
|
+
return R.getInsertSide(e, t) === "before" && !e?.center;
|
|
427
427
|
},
|
|
428
428
|
isAtZoneEnd(e, t) {
|
|
429
|
-
return
|
|
429
|
+
return R.getInsertSide(e, t) === "after" && !e?.center;
|
|
430
430
|
}
|
|
431
431
|
};
|
|
432
|
-
function
|
|
432
|
+
function Ne(e, t) {
|
|
433
433
|
const { draggedItems: s, dropZone: n, hoveredDraggable: o } = e;
|
|
434
434
|
if (!s.length) return null;
|
|
435
|
-
const
|
|
435
|
+
const a = o?.placement.center === !0 && n != null && n.items !== o.items, r = a ? n.items : o?.items ?? n?.items;
|
|
436
436
|
if (!r) return null;
|
|
437
|
-
const
|
|
438
|
-
let
|
|
439
|
-
if (o && !
|
|
440
|
-
const f = o.items ===
|
|
437
|
+
const i = s[0].items, g = s.map((f) => f.index), l = r.length;
|
|
438
|
+
let u, c;
|
|
439
|
+
if (o && !a) {
|
|
440
|
+
const f = o.items === i && g.includes(o.index);
|
|
441
441
|
if (f && s.length === 1) {
|
|
442
|
-
const d =
|
|
443
|
-
|
|
442
|
+
const d = R.isAtZoneStart(n?.placement, t);
|
|
443
|
+
u = d ? 0 : l, c = d ? "prepend" : "append";
|
|
444
444
|
} else {
|
|
445
445
|
if (f)
|
|
446
446
|
return null;
|
|
447
447
|
{
|
|
448
|
-
const d =
|
|
449
|
-
d === "before" ? (
|
|
448
|
+
const d = R.getInsertSide(o.placement, t), m = o.index;
|
|
449
|
+
d === "before" ? (u = Math.max(0, m), c = "insert") : d === "after" ? (u = Math.min(l, m + 1), c = "insert") : (u = l, c = "append");
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
452
|
} else {
|
|
453
453
|
if (!n) return null;
|
|
454
|
-
const f =
|
|
455
|
-
|
|
454
|
+
const f = R.isAtZoneStart(n.placement, t);
|
|
455
|
+
u = f ? 0 : l, c = f ? "prepend" : "append";
|
|
456
456
|
}
|
|
457
|
-
return { targetIndex:
|
|
457
|
+
return { targetIndex: u, mode: c, targetArr: r };
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function vt(e, t = "vertical") {
|
|
460
460
|
const { draggedItems: s } = e;
|
|
461
461
|
if (!s.length) return null;
|
|
462
|
-
const n =
|
|
462
|
+
const n = Ne(e, t);
|
|
463
463
|
if (!n) return null;
|
|
464
|
-
const { targetArr: o, mode:
|
|
464
|
+
const { targetArr: o, mode: a } = n;
|
|
465
465
|
let { targetIndex: r } = n;
|
|
466
|
-
const
|
|
466
|
+
const i = s.map((c) => c.index), g = s.map((c) => c.item), l = s[0].items;
|
|
467
467
|
if (l === o) {
|
|
468
|
-
const c =
|
|
468
|
+
const c = i.filter((d) => d < r).length;
|
|
469
469
|
r = Math.max(0, r - c);
|
|
470
|
-
const f =
|
|
471
|
-
return { sourceItems: f, targetItems: f, draggedItems:
|
|
470
|
+
const f = I(G(l, i), r, g);
|
|
471
|
+
return { sourceItems: f, targetItems: f, draggedItems: g, sourceIndexes: i, targetIndex: r, mode: a, sameList: !0 };
|
|
472
472
|
} else {
|
|
473
|
-
const c =
|
|
474
|
-
return { sourceItems: c, targetItems: f, draggedItems:
|
|
473
|
+
const c = G(l, i), f = I(o, r, g);
|
|
474
|
+
return { sourceItems: c, targetItems: f, draggedItems: g, sourceIndexes: i, targetIndex: r, mode: a, sameList: !1 };
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
function
|
|
477
|
+
function wt(e) {
|
|
478
478
|
const { draggedItems: t, hoveredDraggable: s } = e;
|
|
479
479
|
if (!t.length || !s) return null;
|
|
480
|
-
const n = t.map((
|
|
480
|
+
const n = t.map((u) => u.index), o = s.index, a = t.map((u) => u.item), r = s.item, i = t[0].items, g = s.items, l = i === g;
|
|
481
481
|
if (l && n.includes(o)) return null;
|
|
482
482
|
if (t.length === 1) {
|
|
483
|
-
const
|
|
483
|
+
const u = n[0];
|
|
484
484
|
if (l) {
|
|
485
|
-
const c =
|
|
485
|
+
const c = Ke(i, u, o);
|
|
486
486
|
return { sourceItems: c, targetItems: c, sourceIndexes: n, targetIndex: o, sameList: !0 };
|
|
487
487
|
} else {
|
|
488
|
-
const c = [...
|
|
489
|
-
return c[
|
|
488
|
+
const c = [...i], f = [...g];
|
|
489
|
+
return c[u] = g[o], f[o] = i[u], { sourceItems: c, targetItems: f, sourceIndexes: n, targetIndex: o, sameList: !1 };
|
|
490
490
|
}
|
|
491
491
|
} else {
|
|
492
|
-
const
|
|
492
|
+
const u = Math.min(...n);
|
|
493
493
|
if (l) {
|
|
494
|
-
const c = n.filter((
|
|
495
|
-
let h =
|
|
496
|
-
h =
|
|
497
|
-
const
|
|
498
|
-
return h =
|
|
494
|
+
const c = n.filter((y) => y < o).length, f = Math.max(0, o - c), d = n.filter((y) => y < u).length, m = Math.max(0, u - d);
|
|
495
|
+
let h = G(i, n);
|
|
496
|
+
h = I(h, f, a);
|
|
497
|
+
const p = m >= f ? m + a.length : m;
|
|
498
|
+
return h = I(h, p, [r]), { sourceItems: h, targetItems: h, sourceIndexes: n, targetIndex: f, sameList: !0 };
|
|
499
499
|
} else {
|
|
500
|
-
const c = n.filter((h) => h <
|
|
501
|
-
let d =
|
|
502
|
-
d =
|
|
503
|
-
let m =
|
|
504
|
-
return m =
|
|
500
|
+
const c = n.filter((h) => h < u).length, f = Math.max(0, u - c);
|
|
501
|
+
let d = G(i, n);
|
|
502
|
+
d = I(d, f, [r]);
|
|
503
|
+
let m = we(g, o);
|
|
504
|
+
return m = I(m, o, a), { sourceItems: d, targetItems: m, sourceIndexes: n, targetIndex: o, sameList: !1 };
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function xt(e, t = "vertical") {
|
|
509
509
|
const { draggedItems: s } = e;
|
|
510
510
|
if (!s.length) return null;
|
|
511
|
-
const n =
|
|
511
|
+
const n = Ne(e, t);
|
|
512
512
|
if (!n) return null;
|
|
513
|
-
const { targetArr: o, targetIndex:
|
|
514
|
-
return { targetItems:
|
|
513
|
+
const { targetArr: o, targetIndex: a, mode: r } = n, i = s.map((l) => l.item);
|
|
514
|
+
return { targetItems: I(o, a, i), copiedItems: i, targetIndex: a, mode: r };
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function At(e) {
|
|
517
517
|
const { draggedItems: t } = e;
|
|
518
518
|
if (!t.length) return null;
|
|
519
519
|
const s = t.map((r) => r.index), n = t.map((r) => r.item), o = t[0].items;
|
|
520
|
-
return { sourceItems:
|
|
520
|
+
return { sourceItems: G(o, s), removedItems: n, sourceIndexes: s };
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function Et(e) {
|
|
523
523
|
return {
|
|
524
524
|
// Low-level array ops
|
|
525
|
-
insertAt:
|
|
526
|
-
removeAt:
|
|
527
|
-
removeIndexes:
|
|
528
|
-
swapAt:
|
|
525
|
+
insertAt: I,
|
|
526
|
+
removeAt: we,
|
|
527
|
+
removeIndexes: G,
|
|
528
|
+
swapAt: Ke,
|
|
529
529
|
// Placement helpers
|
|
530
|
-
getInsertSide: (t, s) =>
|
|
531
|
-
isAtZoneStart: (t, s) =>
|
|
532
|
-
isAtZoneEnd: (t, s) =>
|
|
530
|
+
getInsertSide: (t, s) => R.getInsertSide(t, s),
|
|
531
|
+
isAtZoneStart: (t, s) => R.isAtZoneStart(t, s),
|
|
532
|
+
isAtZoneEnd: (t, s) => R.isAtZoneEnd(t, s),
|
|
533
533
|
// High-level (event-bound)
|
|
534
|
-
suggestSort: (t) =>
|
|
535
|
-
suggestSwap: () =>
|
|
536
|
-
suggestCopy: (t) =>
|
|
537
|
-
suggestRemove: () =>
|
|
534
|
+
suggestSort: (t) => vt(e, t),
|
|
535
|
+
suggestSwap: () => wt(e),
|
|
536
|
+
suggestCopy: (t) => xt(e, t),
|
|
537
|
+
suggestRemove: () => At(e)
|
|
538
538
|
};
|
|
539
539
|
}
|
|
540
|
-
const
|
|
541
|
-
|
|
540
|
+
const P = (e) => e.keys().next().value, Lt = (e) => e.target.closest(
|
|
541
|
+
F.DRAGGABLE
|
|
542
542
|
);
|
|
543
|
-
function
|
|
543
|
+
function Ct(e) {
|
|
544
544
|
const t = e.entities.initiatingDraggable;
|
|
545
545
|
if (!t) return [];
|
|
546
546
|
const n = (e.entities.draggingMap.get(t) ?? e.entities.draggableMap.get(t))?.payload;
|
|
547
547
|
if (!n) return [];
|
|
548
548
|
const o = n();
|
|
549
549
|
if (!Array.isArray(o) || o.length < 2) return [];
|
|
550
|
-
const [
|
|
551
|
-
return
|
|
552
|
-
index:
|
|
553
|
-
item: l[
|
|
550
|
+
const [a, r, i] = o, g = Number(a), l = r, u = /* @__PURE__ */ new Map();
|
|
551
|
+
return u.set(g, {
|
|
552
|
+
index: g,
|
|
553
|
+
item: l[g],
|
|
554
554
|
items: l,
|
|
555
|
-
dropData:
|
|
555
|
+
dropData: i
|
|
556
556
|
}), e.entities.draggingMap.forEach((c, f) => {
|
|
557
557
|
const m = e.entities.draggableMap.get(f)?.payload;
|
|
558
558
|
if (!m) return;
|
|
559
559
|
const h = m();
|
|
560
560
|
if (!Array.isArray(h) || h.length < 2) return;
|
|
561
|
-
const [
|
|
562
|
-
if (
|
|
563
|
-
const
|
|
564
|
-
|
|
565
|
-
index:
|
|
566
|
-
item:
|
|
561
|
+
const [p, y, M] = h;
|
|
562
|
+
if (y !== l) return;
|
|
563
|
+
const S = Number(p);
|
|
564
|
+
u.has(S) || u.set(S, {
|
|
565
|
+
index: S,
|
|
566
|
+
item: y[S],
|
|
567
567
|
items: l,
|
|
568
|
-
dropData:
|
|
568
|
+
dropData: M
|
|
569
569
|
});
|
|
570
|
-
}), [...
|
|
570
|
+
}), [...u.values()].sort((c, f) => c.index - f.index);
|
|
571
571
|
}
|
|
572
|
-
const
|
|
573
|
-
const s =
|
|
572
|
+
const E = (e, t) => {
|
|
573
|
+
const s = Ct(e);
|
|
574
574
|
let n, o;
|
|
575
575
|
if (t) {
|
|
576
576
|
const r = e.entities.droppableMap.get(t)?.payload;
|
|
@@ -582,15 +582,15 @@ const R = (e, t) => {
|
|
|
582
582
|
placement: e.hovered.droppable.get(t)
|
|
583
583
|
});
|
|
584
584
|
}
|
|
585
|
-
const
|
|
586
|
-
if (
|
|
587
|
-
const
|
|
588
|
-
if (
|
|
589
|
-
const f =
|
|
585
|
+
const i = P(e.hovered.draggable);
|
|
586
|
+
if (i && (i === t || t.contains(i)) && i) {
|
|
587
|
+
const u = e.entities.draggableMap.get(i)?.payload, c = e.hovered.draggable.get(i);
|
|
588
|
+
if (u) {
|
|
589
|
+
const f = u();
|
|
590
590
|
if (Array.isArray(f) && f.length >= 2) {
|
|
591
|
-
const [d, m, h] = f,
|
|
591
|
+
const [d, m, h] = f, p = Number(d);
|
|
592
592
|
o = {
|
|
593
|
-
element:
|
|
593
|
+
element: i,
|
|
594
594
|
placement: c ?? {
|
|
595
595
|
top: !1,
|
|
596
596
|
right: !1,
|
|
@@ -598,8 +598,8 @@ const R = (e, t) => {
|
|
|
598
598
|
left: !1,
|
|
599
599
|
center: !1
|
|
600
600
|
},
|
|
601
|
-
index:
|
|
602
|
-
item: m[
|
|
601
|
+
index: p,
|
|
602
|
+
item: m[p],
|
|
603
603
|
items: m,
|
|
604
604
|
dropData: h
|
|
605
605
|
};
|
|
@@ -612,31 +612,31 @@ const R = (e, t) => {
|
|
|
612
612
|
dropZone: n,
|
|
613
613
|
hoveredDraggable: o,
|
|
614
614
|
provider: e,
|
|
615
|
-
helpers:
|
|
615
|
+
helpers: Et({ draggedItems: s, dropZone: n, hoveredDraggable: o })
|
|
616
616
|
};
|
|
617
|
-
},
|
|
617
|
+
}, B = (e, t, s) => {
|
|
618
618
|
if (!t) return;
|
|
619
619
|
const n = e.entities.draggingMap.get(t) ?? e.entities.draggableMap.get(t);
|
|
620
|
-
!n || n.disabled || n.events?.[s]?.(
|
|
621
|
-
},
|
|
622
|
-
const s =
|
|
620
|
+
!n || n.disabled || n.events?.[s]?.(E(e));
|
|
621
|
+
}, A = (e, t) => {
|
|
622
|
+
const s = E(e);
|
|
623
623
|
e.entities.draggingMap.forEach((n) => {
|
|
624
624
|
n.disabled || n.events?.[t]?.(s);
|
|
625
625
|
});
|
|
626
|
-
},
|
|
626
|
+
}, It = (e, t, s) => {
|
|
627
627
|
if (t !== s) {
|
|
628
|
-
if (t && !
|
|
629
|
-
const n =
|
|
628
|
+
if (t && !_(t, e)) {
|
|
629
|
+
const n = E(e, t);
|
|
630
630
|
e.entities.droppableMap.get(t)?.events?.onLeave?.(n);
|
|
631
631
|
}
|
|
632
|
-
if (s && !
|
|
633
|
-
const n =
|
|
632
|
+
if (s && !_(s, e)) {
|
|
633
|
+
const n = E(e, s);
|
|
634
634
|
e.entities.droppableMap.get(s)?.events?.onEnter?.(n);
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
|
-
},
|
|
637
|
+
}, Rt = (e, t, s) => {
|
|
638
638
|
if (t !== s) {
|
|
639
|
-
const n =
|
|
639
|
+
const n = E(e);
|
|
640
640
|
if (t) {
|
|
641
641
|
const o = e.entities.draggableMap.get(t);
|
|
642
642
|
o && !o.disabled && o.events?.onLeave?.(n);
|
|
@@ -646,61 +646,61 @@ const R = (e, t) => {
|
|
|
646
646
|
o && !o.disabled && o.events?.onHover?.(n);
|
|
647
647
|
}
|
|
648
648
|
}
|
|
649
|
-
},
|
|
650
|
-
const n =
|
|
651
|
-
!n || !e.entities.draggingMap.has(n) || e.entities.draggingMap.get(n)?.events?.[s]?.(
|
|
652
|
-
},
|
|
653
|
-
const s =
|
|
654
|
-
s && !
|
|
655
|
-
},
|
|
656
|
-
const s =
|
|
657
|
-
s && !
|
|
649
|
+
}, ce = (e, t, s) => {
|
|
650
|
+
const n = Lt(t);
|
|
651
|
+
!n || !e.entities.draggingMap.has(n) || e.entities.draggingMap.get(n)?.events?.[s]?.(E(e));
|
|
652
|
+
}, kt = (e, t) => {
|
|
653
|
+
const s = P(t.droppable);
|
|
654
|
+
s && !_(s, e) && e.entities.droppableMap.get(s)?.events?.onLeave?.(E(e, s));
|
|
655
|
+
}, Ze = (e, t) => {
|
|
656
|
+
const s = P(t.droppable);
|
|
657
|
+
s && !_(s, e) && e.entities.droppableMap.get(s)?.events?.onLeave?.(E(e, s));
|
|
658
658
|
};
|
|
659
|
-
function
|
|
660
|
-
return e.parentElement?.closest(
|
|
659
|
+
function Pt(e) {
|
|
660
|
+
return e.parentElement?.closest(F.SELECT_AREA) ?? null;
|
|
661
661
|
}
|
|
662
|
-
const
|
|
662
|
+
const Tt = (e, t, s) => {
|
|
663
663
|
if (!s) return {};
|
|
664
|
-
const n = s.getBoundingClientRect(), o = Math.max(n.left, Math.min(e.x, t.x)),
|
|
664
|
+
const n = s.getBoundingClientRect(), o = Math.max(n.left, Math.min(e.x, t.x)), a = Math.max(n.top, Math.min(e.y, t.y)), r = Math.min(n.right, Math.max(e.x, t.x)), i = Math.min(n.bottom, Math.max(e.y, t.y)), g = Math.max(0, r - o), l = Math.max(0, i - a);
|
|
665
665
|
return {
|
|
666
666
|
left: `${o}px`,
|
|
667
|
-
top: `${
|
|
668
|
-
width: `${
|
|
667
|
+
top: `${a}px`,
|
|
668
|
+
width: `${g}px`,
|
|
669
669
|
height: `${l}px`,
|
|
670
670
|
position: "fixed",
|
|
671
671
|
pointerEvents: "none",
|
|
672
672
|
border: "1px solid #3b82f6",
|
|
673
673
|
backgroundColor: "#3b82f61a"
|
|
674
674
|
};
|
|
675
|
-
},
|
|
675
|
+
}, zt = (e) => {
|
|
676
676
|
if (!e.pointer.value || !e.entities.selectingArea) return;
|
|
677
|
-
const { selectingArea: t } = e.entities, s =
|
|
677
|
+
const { selectingArea: t } = e.entities, s = Ot(
|
|
678
678
|
e.pointer.value.start,
|
|
679
679
|
e.pointer.value.current
|
|
680
680
|
), n = e.entities.selectableAreaMap.get(t)?.groups ?? [], o = e.lib.rectCache;
|
|
681
|
-
e.entities.visibleDraggableSet.forEach((
|
|
682
|
-
if (
|
|
683
|
-
const r =
|
|
681
|
+
e.entities.visibleDraggableSet.forEach((a) => {
|
|
682
|
+
if (a === t || !t.contains(a)) return;
|
|
683
|
+
const r = Pt(a);
|
|
684
684
|
if (r && r !== t) {
|
|
685
|
-
e.entities.selectedSet.delete(
|
|
685
|
+
e.entities.selectedSet.delete(a);
|
|
686
686
|
return;
|
|
687
687
|
}
|
|
688
|
-
if (
|
|
689
|
-
e.entities.selectedSet.delete(
|
|
688
|
+
if (Me(a, e)) {
|
|
689
|
+
e.entities.selectedSet.delete(a);
|
|
690
690
|
return;
|
|
691
691
|
}
|
|
692
|
-
const
|
|
693
|
-
if (!
|
|
694
|
-
e.entities.selectedSet.delete(
|
|
692
|
+
const g = e.entities.draggableMap.get(a)?.groups ?? [];
|
|
693
|
+
if (!ve(n, g)) {
|
|
694
|
+
e.entities.selectedSet.delete(a);
|
|
695
695
|
return;
|
|
696
696
|
}
|
|
697
|
-
let l = o.get(
|
|
698
|
-
l || (l =
|
|
697
|
+
let l = o.get(a);
|
|
698
|
+
l || (l = a.getBoundingClientRect(), o.set(a, l)), it(s, l) ? e.entities.selectedSet.add(a) : e.entities.selectedSet.delete(a);
|
|
699
699
|
});
|
|
700
|
-
},
|
|
701
|
-
const s = Math.min(e.x, t.x), n = Math.min(e.y, t.y), o = Math.max(e.x, t.x),
|
|
702
|
-
return new DOMRect(s, n, r,
|
|
703
|
-
},
|
|
700
|
+
}, Ot = (e, t) => {
|
|
701
|
+
const s = Math.min(e.x, t.x), n = Math.min(e.y, t.y), o = Math.max(e.x, t.x), a = Math.max(e.y, t.y), r = o - s, i = a - n;
|
|
702
|
+
return new DOMRect(s, n, r, i);
|
|
703
|
+
}, Bt = (e, t, s = 5) => {
|
|
704
704
|
const n = s / 2;
|
|
705
705
|
return {
|
|
706
706
|
left: e - n,
|
|
@@ -708,13 +708,13 @@ const jt = (e, t, s) => {
|
|
|
708
708
|
width: s,
|
|
709
709
|
height: s
|
|
710
710
|
};
|
|
711
|
-
},
|
|
711
|
+
}, Ft = (e) => {
|
|
712
712
|
const t = e.pointer.value?.current, s = t?.x ?? 0, n = t?.y ?? 0;
|
|
713
|
-
return
|
|
714
|
-
},
|
|
713
|
+
return Bt(s, n, 5);
|
|
714
|
+
}, O = (e, t, s) => {
|
|
715
715
|
const n = e.left + e.width / 2, o = e.top + e.height / 2;
|
|
716
716
|
if (s) {
|
|
717
|
-
const
|
|
717
|
+
const i = s.top ?? 0, g = s.right ?? 0, l = s.bottom ?? 0, u = s.left ?? 0, c = t.left + u, f = t.right - g, d = t.top + i, m = t.bottom - l;
|
|
718
718
|
if (c < f && d < m && n >= c && n <= f && o >= d && o <= m)
|
|
719
719
|
return {
|
|
720
720
|
top: !1,
|
|
@@ -724,96 +724,96 @@ const jt = (e, t, s) => {
|
|
|
724
724
|
center: !0
|
|
725
725
|
};
|
|
726
726
|
}
|
|
727
|
-
const
|
|
727
|
+
const a = t.left + t.width / 2, r = t.top + t.height / 2;
|
|
728
728
|
return {
|
|
729
729
|
top: o <= r,
|
|
730
730
|
bottom: o > r,
|
|
731
|
-
left: n <=
|
|
732
|
-
right: n >
|
|
731
|
+
left: n <= a,
|
|
732
|
+
right: n > a,
|
|
733
733
|
center: !1
|
|
734
734
|
};
|
|
735
|
-
},
|
|
735
|
+
}, _t = (e) => ({
|
|
736
736
|
x: e.left + e.width / 2,
|
|
737
737
|
y: e.top + e.height / 2
|
|
738
|
-
}),
|
|
739
|
-
const s =
|
|
738
|
+
}), Le = (e, t) => {
|
|
739
|
+
const s = _t(t);
|
|
740
740
|
return Math.hypot(e.x - s.x, e.y - s.y);
|
|
741
741
|
};
|
|
742
|
-
function
|
|
742
|
+
function Gt(e, t) {
|
|
743
743
|
return e === t ? !0 : !e || !t ? !1 : e.top === t.top && e.right === t.right && e.bottom === t.bottom && e.left === t.left && e.center === t.center;
|
|
744
744
|
}
|
|
745
|
-
function
|
|
746
|
-
|
|
745
|
+
function $(e, t) {
|
|
746
|
+
Gt(e.hoveredPlacement, t) || (e.hoveredPlacement = t);
|
|
747
747
|
}
|
|
748
|
-
const
|
|
749
|
-
const n =
|
|
748
|
+
const Ht = (e, t) => e.find((s) => s !== t && H(t, s)), ne = (e, t, s) => {
|
|
749
|
+
const n = P(t.droppable), o = P(t.draggable);
|
|
750
750
|
o && t.draggable.delete(o), n && t.droppable.delete(n);
|
|
751
|
-
const
|
|
752
|
-
if (r &&
|
|
753
|
-
const c = r.getBoundingClientRect(), f = e.entities.draggableMap.get(r)?.placementMargins, d =
|
|
751
|
+
const a = Ft(e), r = s.zones[0], i = s.elements[0];
|
|
752
|
+
if (r && i && r === i && e.entities.droppableMap.has(r) && r) {
|
|
753
|
+
const c = r.getBoundingClientRect(), f = e.entities.draggableMap.get(r)?.placementMargins, d = O(a, c, f);
|
|
754
754
|
if (d.center) {
|
|
755
755
|
t.droppable.set(r, d);
|
|
756
|
-
const m =
|
|
756
|
+
const m = Ht(s.elements, r);
|
|
757
757
|
if (m) {
|
|
758
758
|
const h = m.getBoundingClientRect();
|
|
759
759
|
t.draggable.set(
|
|
760
760
|
m,
|
|
761
|
-
|
|
761
|
+
O(a, h, void 0)
|
|
762
762
|
);
|
|
763
763
|
}
|
|
764
764
|
} else
|
|
765
|
-
t.draggable.set(
|
|
765
|
+
t.draggable.set(i, d);
|
|
766
766
|
} else {
|
|
767
767
|
if (r) {
|
|
768
768
|
const c = r.getBoundingClientRect();
|
|
769
|
-
t.droppable.set(r,
|
|
769
|
+
t.droppable.set(r, O(a, c));
|
|
770
770
|
}
|
|
771
|
-
if (
|
|
771
|
+
if (i)
|
|
772
772
|
if (r)
|
|
773
|
-
if (
|
|
774
|
-
const c =
|
|
773
|
+
if (H(r, i)) {
|
|
774
|
+
const c = i.getBoundingClientRect(), f = e.entities.draggableMap.get(i)?.placementMargins;
|
|
775
775
|
t.draggable.set(
|
|
776
|
-
|
|
777
|
-
|
|
776
|
+
i,
|
|
777
|
+
O(a, c, f)
|
|
778
778
|
);
|
|
779
779
|
} else {
|
|
780
|
-
const c = e.pointer.value?.current ?? { x: 0, y: 0 }, f = r.getBoundingClientRect(), d =
|
|
781
|
-
if (
|
|
780
|
+
const c = e.pointer.value?.current ?? { x: 0, y: 0 }, f = r.getBoundingClientRect(), d = i.getBoundingClientRect(), m = Le(c, f);
|
|
781
|
+
if (Le(c, d) < m) {
|
|
782
782
|
t.droppable.clear();
|
|
783
|
-
const
|
|
783
|
+
const p = e.entities.draggableMap.get(i)?.placementMargins;
|
|
784
784
|
t.draggable.set(
|
|
785
|
-
|
|
786
|
-
|
|
785
|
+
i,
|
|
786
|
+
O(a, d, p)
|
|
787
787
|
);
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
790
|
else {
|
|
791
|
-
const c =
|
|
791
|
+
const c = i.getBoundingClientRect(), f = e.entities.draggableMap.get(i)?.placementMargins;
|
|
792
792
|
t.draggable.set(
|
|
793
|
-
|
|
794
|
-
|
|
793
|
+
i,
|
|
794
|
+
O(a, c, f)
|
|
795
795
|
);
|
|
796
796
|
}
|
|
797
797
|
}
|
|
798
|
-
const l =
|
|
799
|
-
if (o && o !==
|
|
798
|
+
const l = P(t.droppable), u = P(t.draggable);
|
|
799
|
+
if (o && o !== u) {
|
|
800
800
|
const c = e.entities.draggableMap.get(o);
|
|
801
|
-
c &&
|
|
801
|
+
c && $(c, void 0);
|
|
802
802
|
}
|
|
803
803
|
if (n && n !== l) {
|
|
804
804
|
const c = e.entities.droppableMap.get(n);
|
|
805
|
-
c &&
|
|
805
|
+
c && $(c, void 0);
|
|
806
806
|
}
|
|
807
|
-
if (
|
|
808
|
-
const c = e.entities.draggableMap.get(
|
|
809
|
-
c &&
|
|
807
|
+
if (u) {
|
|
808
|
+
const c = e.entities.draggableMap.get(u);
|
|
809
|
+
c && $(c, t.draggable.get(u));
|
|
810
810
|
}
|
|
811
811
|
if (l) {
|
|
812
812
|
const c = e.entities.droppableMap.get(l);
|
|
813
|
-
c &&
|
|
813
|
+
c && $(c, t.droppable.get(l));
|
|
814
814
|
}
|
|
815
|
-
|
|
816
|
-
},
|
|
815
|
+
It(e, n, l), Rt(e, o, u);
|
|
816
|
+
}, Ce = (e, t) => e.x < t.x + t.width && e.x + e.width > t.x && e.y < t.y + t.height && e.y + e.height > t.y, se = (e) => {
|
|
817
817
|
if (!e)
|
|
818
818
|
return { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, right: 0, bottom: 0 };
|
|
819
819
|
const t = e.getBoundingClientRect();
|
|
@@ -827,344 +827,168 @@ const en = (e, t) => e.find((s) => s !== t && _(t, s)), U = (e, t, s) => {
|
|
|
827
827
|
right: t.right,
|
|
828
828
|
bottom: t.bottom
|
|
829
829
|
};
|
|
830
|
-
},
|
|
830
|
+
}, Z = (e) => ({
|
|
831
831
|
x: e.x + e.width / 2,
|
|
832
832
|
y: e.y + e.height / 2
|
|
833
|
-
}),
|
|
833
|
+
}), Kt = (e, t) => Math.hypot(t.x - e.x, t.y - e.y), be = (e, t) => {
|
|
834
834
|
const s = Math.max(
|
|
835
835
|
0,
|
|
836
836
|
Math.min(e.x + e.width, t.x + t.width) - Math.max(e.x, t.x)
|
|
837
837
|
), n = Math.max(
|
|
838
838
|
0,
|
|
839
839
|
Math.min(e.y + e.height, t.y + t.height) - Math.max(e.y, t.y)
|
|
840
|
-
), o = s * n,
|
|
841
|
-
return
|
|
842
|
-
},
|
|
840
|
+
), o = s * n, a = e.width * e.height, r = t.width * t.height;
|
|
841
|
+
return a === 0 || r === 0 ? 0 : (o / a * 100 + o / r * 100) / 2;
|
|
842
|
+
}, Nt = (e, t, s) => t >= e.x && t <= e.x + e.width && s >= e.y && s <= e.y + e.height, Zt = (e) => e.overlay.ref?.value ?? null, Yt = (e) => {
|
|
843
843
|
const t = e.overlay.position?.value ?? { x: 0, y: 0 }, { x: s, y: n } = t, o = e.overlay.size?.value;
|
|
844
|
-
let
|
|
844
|
+
let a, r;
|
|
845
845
|
if (o)
|
|
846
|
-
|
|
846
|
+
a = o.width, r = o.height;
|
|
847
847
|
else {
|
|
848
|
-
const
|
|
849
|
-
|
|
848
|
+
const i = e.overlay.ref?.value?.getBoundingClientRect();
|
|
849
|
+
a = i?.width ?? 0, r = i?.height ?? 0;
|
|
850
850
|
}
|
|
851
851
|
return {
|
|
852
852
|
x: s,
|
|
853
853
|
y: n,
|
|
854
|
-
width:
|
|
854
|
+
width: a,
|
|
855
855
|
height: r,
|
|
856
856
|
top: n,
|
|
857
857
|
left: s,
|
|
858
|
-
right: s +
|
|
858
|
+
right: s + a,
|
|
859
859
|
bottom: n + r
|
|
860
860
|
};
|
|
861
|
-
},
|
|
862
|
-
(s) =>
|
|
863
|
-
),
|
|
864
|
-
function
|
|
861
|
+
}, Ye = (e) => e.entities.allowedDraggableSet, Xe = (e) => e.entities.allowedDroppableSet, Xt = (e, t) => !t.entities.draggingMap.has(e), Ut = (e, t) => ![...t.entities.draggingMap.keys()].some(
|
|
862
|
+
(s) => H(s, e)
|
|
863
|
+
), Vt = (e, t) => t.entities.draggableMap.has(e) ? !Me(e, t) : t.entities.droppableMap.has(e) ? !_(e, t) : !0, ye = (e, t) => Xt(e, t) && Ut(e, t) && Vt(e, t), Ie = 10;
|
|
864
|
+
function q(e, t) {
|
|
865
865
|
return Math.hypot(
|
|
866
866
|
t.x - (e.x + e.width / 2),
|
|
867
867
|
t.y - (e.y + e.height / 2)
|
|
868
868
|
);
|
|
869
869
|
}
|
|
870
|
-
function
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
}
|
|
876
|
-
|
|
877
|
-
const t = e.pointer.value?.current ?? { x: 0, y: 0 }, s = [...et(e)].filter(
|
|
878
|
-
(r) => $(r, e)
|
|
879
|
-
), n = [...tt(e)].filter(
|
|
880
|
-
(r) => $(r, e)
|
|
881
|
-
), o = s.filter(
|
|
882
|
-
(r) => we(V(r), t.x, t.y)
|
|
883
|
-
), i = n.filter(
|
|
884
|
-
(r) => we(V(r), t.x, t.y)
|
|
885
|
-
);
|
|
886
|
-
return o.length === 0 && i.length === 0 ? null : {
|
|
887
|
-
elements: _e(o),
|
|
888
|
-
zones: _e(i)
|
|
889
|
-
};
|
|
870
|
+
function $t(e) {
|
|
871
|
+
const t = e.pointer.value?.current ?? { x: 0, y: 0 }, s = document.elementsFromPoint(t.x, t.y), n = Ye(e), o = Xe(e), a = [], r = [];
|
|
872
|
+
for (const i of s) {
|
|
873
|
+
const g = n.has(i), l = o.has(i);
|
|
874
|
+
!g && !l || ye(i, e) && (g && a.push(i), l && r.push(i));
|
|
875
|
+
}
|
|
876
|
+
return a.length === 0 && r.length === 0 ? null : { elements: a, zones: r };
|
|
890
877
|
}
|
|
891
|
-
const
|
|
892
|
-
if (!
|
|
893
|
-
const s =
|
|
878
|
+
const pe = (e) => {
|
|
879
|
+
if (!Zt(e)) return { elements: [], zones: [] };
|
|
880
|
+
const s = $t(e);
|
|
894
881
|
if (s) return s;
|
|
895
|
-
const n =
|
|
896
|
-
(l) =>
|
|
897
|
-
), r = [...
|
|
898
|
-
(l) =>
|
|
899
|
-
),
|
|
900
|
-
({ box: l }) =>
|
|
901
|
-
).sort((l,
|
|
902
|
-
({ box: l }) =>
|
|
903
|
-
).sort((l,
|
|
904
|
-
return { elements:
|
|
882
|
+
const n = Yt(e), o = e.pointer.value?.current ?? { x: 0, y: 0 }, a = [...Ye(e)].filter(
|
|
883
|
+
(l) => ye(l, e)
|
|
884
|
+
), r = [...Xe(e)].filter(
|
|
885
|
+
(l) => ye(l, e)
|
|
886
|
+
), i = a.map((l) => ({ n: l, box: se(l) })).filter(
|
|
887
|
+
({ box: l }) => Ce(l, n) && be(l, n) >= Ie
|
|
888
|
+
).sort((l, u) => q(l.box, o) - q(u.box, o)).map(({ n: l }) => l), g = r.map((l) => ({ n: l, box: se(l) })).filter(
|
|
889
|
+
({ box: l }) => Ce(l, n) && be(l, n) >= Ie
|
|
890
|
+
).sort((l, u) => q(l.box, o) - q(u.box, o)).map(({ n: l }) => l);
|
|
891
|
+
return { elements: i, zones: g };
|
|
905
892
|
};
|
|
906
|
-
function
|
|
907
|
-
globalThis.onmessage = (t) => {
|
|
908
|
-
const { callId: s, data: n } = t.data;
|
|
909
|
-
try {
|
|
910
|
-
const o = e(n);
|
|
911
|
-
globalThis.postMessage({ callId: s, ok: !0, result: o });
|
|
912
|
-
} catch (o) {
|
|
913
|
-
globalThis.postMessage({ callId: s, ok: !1, error: String(o) });
|
|
914
|
-
}
|
|
915
|
-
};
|
|
916
|
-
}
|
|
917
|
-
function ln(e, t) {
|
|
918
|
-
return [
|
|
919
|
-
t.map((n) => n.toString()).join(`
|
|
920
|
-
|
|
921
|
-
`),
|
|
922
|
-
`var __fn = ${e.toString()};`,
|
|
923
|
-
`(${an.toString()})(__fn);`
|
|
924
|
-
].join(`
|
|
925
|
-
|
|
926
|
-
`);
|
|
927
|
-
}
|
|
928
|
-
function cn(e, t) {
|
|
929
|
-
let s = null, n = null, o = !1, i = 0;
|
|
930
|
-
const r = /* @__PURE__ */ new Map();
|
|
931
|
-
try {
|
|
932
|
-
const l = ln(e, t?.localDependencies ?? []), g = new Blob([l], { type: "application/javascript" });
|
|
933
|
-
n = URL.createObjectURL(g), s = new Worker(n), o = !0, s.onmessage = (c) => {
|
|
934
|
-
const f = r.get(c.data.callId);
|
|
935
|
-
f && (r.delete(c.data.callId), c.data.ok ? f.resolve(c.data.result) : f.reject(new Error(c.data.error)));
|
|
936
|
-
}, s.onerror = (c) => {
|
|
937
|
-
o = !1;
|
|
938
|
-
for (const f of r.values()) f.reject(new Error(c.message));
|
|
939
|
-
r.clear(), s?.terminate(), s = null;
|
|
940
|
-
};
|
|
941
|
-
} catch {
|
|
942
|
-
o = !1;
|
|
943
|
-
}
|
|
944
|
-
return {
|
|
945
|
-
run: (l) => {
|
|
946
|
-
if (!s || !o)
|
|
947
|
-
try {
|
|
948
|
-
return Promise.resolve(e(l));
|
|
949
|
-
} catch (c) {
|
|
950
|
-
return Promise.reject(c instanceof Error ? c : new Error(String(c)));
|
|
951
|
-
}
|
|
952
|
-
const g = ++i;
|
|
953
|
-
return new Promise((c, f) => {
|
|
954
|
-
r.set(g, { resolve: c, reject: f }), s.postMessage({ callId: g, data: l });
|
|
955
|
-
});
|
|
956
|
-
},
|
|
957
|
-
terminate: () => {
|
|
958
|
-
for (const l of r.values()) l.reject(new Error("Worker terminated"));
|
|
959
|
-
r.clear(), s?.terminate(), s = null, n && (URL.revokeObjectURL(n), n = null), o = !1;
|
|
960
|
-
},
|
|
961
|
-
get isSupported() {
|
|
962
|
-
return o;
|
|
963
|
-
}
|
|
964
|
-
};
|
|
965
|
-
}
|
|
966
|
-
function st(e, t, s, n, o, i, r, a) {
|
|
967
|
-
return e < o + r && e + s > o && t < i + a && t + n > i;
|
|
968
|
-
}
|
|
969
|
-
function ot(e, t, s, n, o, i, r, a) {
|
|
970
|
-
const u = Math.max(0, Math.min(e + s, o + r) - Math.max(e, o)), l = Math.max(0, Math.min(t + n, i + a) - Math.max(t, i)), g = u * l, c = s * n, f = r * a;
|
|
971
|
-
return !c || !f ? 0 : (g / c * 100 + g / f * 100) / 2;
|
|
972
|
-
}
|
|
973
|
-
function re(e, t, s, n, o, i) {
|
|
974
|
-
return o >= e && o <= e + s && i >= t && i <= t + n;
|
|
975
|
-
}
|
|
976
|
-
function un(e) {
|
|
977
|
-
const { containerBox: t, pointer: s, elements: n, elementCount: o, zones: i, zoneCount: r, config: a } = e, { x: u, y: l, width: g, height: c } = t, { x: f, y: d } = s, m = a.minOverlapPercent, h = u + g / 2, w = l + c / 2, D = re(u, l, g, c, f, d);
|
|
978
|
-
function v(x, K) {
|
|
979
|
-
const S = [], b = x;
|
|
980
|
-
for (let y = 0; y < K; y++) {
|
|
981
|
-
const p = y * 4, C = b[p], I = b[p + 1], L = b[p + 2], k = b[p + 3];
|
|
982
|
-
if (!st(C, I, L, k, u, l, g, c)) continue;
|
|
983
|
-
const ke = ot(C, I, L, k, u, l, g, c);
|
|
984
|
-
ke < m || S.push({
|
|
985
|
-
index: y,
|
|
986
|
-
overlapPercent: ke,
|
|
987
|
-
centerDistance: Math.hypot(h - (C + L / 2), w - (I + k / 2)),
|
|
988
|
-
isPointerInElement: re(C, I, L, k, f, d),
|
|
989
|
-
depth: 0
|
|
990
|
-
});
|
|
991
|
-
}
|
|
992
|
-
for (let y = 0; y < S.length; y++) {
|
|
993
|
-
const p = S[y].index * 4, C = b[p] + b[p + 2] / 2, I = b[p + 1] + b[p + 3] / 2;
|
|
994
|
-
for (let L = 0; L < S.length; L++) {
|
|
995
|
-
if (y === L) continue;
|
|
996
|
-
const k = S[L].index * 4;
|
|
997
|
-
re(b[k], b[k + 1], b[k + 2], b[k + 3], C, I) && S[y].depth++;
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
|
-
return S.sort((y, p) => {
|
|
1001
|
-
if (D) {
|
|
1002
|
-
if (y.isPointerInElement && p.isPointerInElement) return p.depth - y.depth;
|
|
1003
|
-
if (y.isPointerInElement !== p.isPointerInElement) return y.isPointerInElement ? -1 : 1;
|
|
1004
|
-
}
|
|
1005
|
-
return Math.abs(y.overlapPercent - p.overlapPercent) <= 1 ? y.centerDistance - p.centerDistance : p.overlapPercent - y.overlapPercent;
|
|
1006
|
-
}), S.map((y) => y.index);
|
|
1007
|
-
}
|
|
1008
|
-
return {
|
|
1009
|
-
elementIndices: v(n, o),
|
|
1010
|
-
zoneIndices: v(i, r)
|
|
1011
|
-
};
|
|
1012
|
-
}
|
|
1013
|
-
let me = null;
|
|
1014
|
-
function rt() {
|
|
1015
|
-
return me || (me = cn(un, {
|
|
1016
|
-
localDependencies: [st, ot, re]
|
|
1017
|
-
})), me;
|
|
1018
|
-
}
|
|
1019
|
-
function Fe(e, t) {
|
|
1020
|
-
const s = [];
|
|
1021
|
-
for (const n of e) {
|
|
1022
|
-
let o = t.get(n);
|
|
1023
|
-
o || (o = n.getBoundingClientRect(), t.set(n, o)), s.push(o.x, o.y, o.width, o.height);
|
|
1024
|
-
}
|
|
1025
|
-
return s;
|
|
1026
|
-
}
|
|
1027
|
-
let xe = 0;
|
|
1028
|
-
function gn(e) {
|
|
1029
|
-
const t = rt(), s = ++xe, n = [...e.entities.allowedDraggableSet].filter(
|
|
1030
|
-
(l) => $(l, e)
|
|
1031
|
-
), o = [...e.entities.allowedDroppableSet].filter(
|
|
1032
|
-
(l) => $(l, e)
|
|
1033
|
-
), i = Qe(e), r = e.pointer.value?.current, a = e.lib.rectCache, u = {
|
|
1034
|
-
containerBox: {
|
|
1035
|
-
x: i.x,
|
|
1036
|
-
y: i.y,
|
|
1037
|
-
width: i.width,
|
|
1038
|
-
height: i.height
|
|
1039
|
-
},
|
|
1040
|
-
pointer: { x: r?.x ?? 0, y: r?.y ?? 0 },
|
|
1041
|
-
elements: Fe(n, a),
|
|
1042
|
-
elementCount: n.length,
|
|
1043
|
-
zones: Fe(o, a),
|
|
1044
|
-
zoneCount: o.length,
|
|
1045
|
-
config: { minOverlapPercent: 10 }
|
|
1046
|
-
};
|
|
1047
|
-
t.run(u).then((l) => {
|
|
1048
|
-
if (s !== xe || e.state.value !== "dragging") return;
|
|
1049
|
-
const g = l.elementIndices.map(
|
|
1050
|
-
(f) => n[f]
|
|
1051
|
-
), c = l.zoneIndices.map(
|
|
1052
|
-
(f) => o[f]
|
|
1053
|
-
);
|
|
1054
|
-
U(e, e.hovered, {
|
|
1055
|
-
elements: g,
|
|
1056
|
-
zones: c
|
|
1057
|
-
});
|
|
1058
|
-
});
|
|
1059
|
-
}
|
|
1060
|
-
function Ee(e) {
|
|
893
|
+
function Se(e) {
|
|
1061
894
|
if (e.collision?.run) {
|
|
1062
|
-
const
|
|
1063
|
-
|
|
1064
|
-
return;
|
|
1065
|
-
}
|
|
1066
|
-
const t = nt(e);
|
|
1067
|
-
if (t) {
|
|
1068
|
-
xe++, U(e, e.hovered, t);
|
|
895
|
+
const s = e.collision.run(e);
|
|
896
|
+
ne(e, e.hovered, s);
|
|
1069
897
|
return;
|
|
1070
898
|
}
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
else {
|
|
1074
|
-
const n = ve(e);
|
|
1075
|
-
U(e, e.hovered, n);
|
|
1076
|
-
}
|
|
899
|
+
const t = pe(e);
|
|
900
|
+
ne(e, e.hovered, t);
|
|
1077
901
|
}
|
|
1078
|
-
function
|
|
902
|
+
function qt(e, t) {
|
|
1079
903
|
const s = e.collision?.throttle?.value ?? 0;
|
|
1080
904
|
if (s <= 0) {
|
|
1081
|
-
|
|
905
|
+
Se(e);
|
|
1082
906
|
return;
|
|
1083
907
|
}
|
|
1084
908
|
const n = Date.now();
|
|
1085
|
-
n - t.value >= s && (t.value = n,
|
|
909
|
+
n - t.value >= s && (t.value = n, Se(e));
|
|
1086
910
|
}
|
|
1087
|
-
async function
|
|
911
|
+
async function Ue(e) {
|
|
1088
912
|
const t = e.hovered.droppable.keys().next().value;
|
|
1089
|
-
if (!t ||
|
|
1090
|
-
const s = e.entities.droppableMap.get(t), n =
|
|
913
|
+
if (!t || _(t, e)) return "accept";
|
|
914
|
+
const s = e.entities.droppableMap.get(t), n = E(e, t), o = s?.events?.onDrop?.(n);
|
|
1091
915
|
if (o != null && typeof o.then == "function") {
|
|
1092
916
|
e.state.value = "pending";
|
|
1093
917
|
let r;
|
|
1094
918
|
try {
|
|
1095
919
|
r = await o;
|
|
1096
920
|
} catch {
|
|
1097
|
-
const
|
|
1098
|
-
return
|
|
921
|
+
const i = e.entities.initiatingDraggable;
|
|
922
|
+
return B(e, i, "onSelfDragCancel"), A(e, "onDragCancel"), Ze(e, e.hovered), "cancel";
|
|
1099
923
|
}
|
|
1100
924
|
return r === !1 ? (e.state.value = "dragging", "decline") : "accept";
|
|
1101
925
|
}
|
|
1102
926
|
return o === !1 ? "decline" : "accept";
|
|
1103
927
|
}
|
|
1104
|
-
function
|
|
928
|
+
function Ve(e) {
|
|
1105
929
|
const t = e.entities.initiatingDraggable;
|
|
1106
|
-
|
|
930
|
+
B(e, t, "onSelfDragEnd"), A(e, "onDragEnd"), kt(e, e.hovered);
|
|
1107
931
|
}
|
|
1108
|
-
function
|
|
932
|
+
function Wt(e) {
|
|
1109
933
|
const t = e.entities.selectingArea;
|
|
1110
934
|
if (!t) return;
|
|
1111
935
|
const s = e.entities.selectableAreaMap.get(t), n = [...e.entities.selectedSet];
|
|
1112
936
|
s?.events?.onSelected?.(n);
|
|
1113
937
|
}
|
|
1114
|
-
const
|
|
938
|
+
const jt = (e) => {
|
|
1115
939
|
const t = {
|
|
1116
940
|
current: null
|
|
1117
941
|
}, s = { value: 0 }, n = async () => {
|
|
1118
|
-
|
|
1119
|
-
const
|
|
1120
|
-
if (
|
|
1121
|
-
const
|
|
1122
|
-
if (
|
|
1123
|
-
|
|
942
|
+
me(), t.current?.cancel(), t.current = null;
|
|
943
|
+
const i = e.state.value;
|
|
944
|
+
if (i === "dragging") {
|
|
945
|
+
const g = await Ue(e);
|
|
946
|
+
if (g === "accept" && Ve(e), g === "accept" || g === "cancel") {
|
|
947
|
+
te(e), document.removeEventListener("pointerup", n), document.removeEventListener("pointermove", o);
|
|
1124
948
|
return;
|
|
1125
949
|
}
|
|
1126
950
|
return;
|
|
1127
|
-
} else
|
|
1128
|
-
|
|
1129
|
-
}, o = (
|
|
951
|
+
} else i === "selecting" && Wt(e);
|
|
952
|
+
te(e), document.removeEventListener("pointerup", n), document.removeEventListener("pointermove", o);
|
|
953
|
+
}, o = (i) => {
|
|
1130
954
|
if (e.pointer.value) {
|
|
1131
|
-
if (e.pointer.value.current = { x:
|
|
1132
|
-
|
|
955
|
+
if (e.pointer.value.current = { x: i.clientX, y: i.clientY }, ht(e)) {
|
|
956
|
+
ce(e, i, "onSelfDragStart"), A(e, "onDragStart");
|
|
1133
957
|
return;
|
|
1134
958
|
}
|
|
1135
959
|
if (e.state.value === "dragging") {
|
|
1136
|
-
|
|
1137
|
-
const
|
|
1138
|
-
|
|
960
|
+
qt(e, s);
|
|
961
|
+
const g = e.entities.initiatingDraggable;
|
|
962
|
+
B(e, g, "onSelfDragMove"), A(e, "onDragMove");
|
|
1139
963
|
}
|
|
1140
|
-
e.state.value === "selecting" &&
|
|
964
|
+
e.state.value === "selecting" && zt(e);
|
|
1141
965
|
}
|
|
1142
966
|
};
|
|
1143
|
-
return { pointerDown: (
|
|
967
|
+
return { pointerDown: (i) => {
|
|
1144
968
|
document.addEventListener("pointerup", n), document.addEventListener("pointermove", o);
|
|
1145
|
-
const
|
|
1146
|
-
|
|
1147
|
-
),
|
|
1148
|
-
|
|
969
|
+
const g = i.target, l = g.closest(
|
|
970
|
+
F.SELECT_AREA
|
|
971
|
+
), u = g.closest(
|
|
972
|
+
F.DRAGGABLE
|
|
1149
973
|
);
|
|
1150
974
|
if (e.entities.modifiersSelectableAreaSet.size > 0 && e.entities.modifiersSelectableAreaSet.has(l)) {
|
|
1151
|
-
|
|
975
|
+
de(), e.pointer.value = he(i), e.state.value = "selecting", e.entities.selectingArea = l;
|
|
1152
976
|
return;
|
|
1153
977
|
}
|
|
1154
|
-
if (e.entities.modifiersDraggableSet.size > 0 && e.entities.modifiersDraggableSet.has(
|
|
1155
|
-
const c = e.entities.draggableMap.get(
|
|
1156
|
-
if (!
|
|
978
|
+
if (e.entities.modifiersDraggableSet.size > 0 && e.entities.modifiersDraggableSet.has(u)) {
|
|
979
|
+
const c = e.entities.draggableMap.get(u);
|
|
980
|
+
if (!Ge(g, u, c?.dragHandle))
|
|
1157
981
|
return;
|
|
1158
|
-
|
|
1159
|
-
const f =
|
|
1160
|
-
e.pointer.value =
|
|
1161
|
-
|
|
1162
|
-
}))) : (
|
|
982
|
+
de(), e.entities.initiatingDraggable = u;
|
|
983
|
+
const f = Fe(i, u);
|
|
984
|
+
e.pointer.value = he(i, f.x, f.y), c?.activation?.distance || c?.activation?.delay ? (e.state.value = "activating", c?.activation?.delay && (e.delay.startTime = Date.now(), t.current = bt(e, () => {
|
|
985
|
+
ee(e), ce(e, i, "onSelfDragStart"), A(e, "onDragStart");
|
|
986
|
+
}))) : (ee(e), ce(e, i, "onSelfDragStart"), A(e, "onDragStart"));
|
|
1163
987
|
}
|
|
1164
988
|
}, pointerUp: n, pointerMove: o, cleanup: () => {
|
|
1165
989
|
t.current?.cancel(), document.removeEventListener("pointerup", n), document.removeEventListener("pointermove", o), e.lib.draggableObserver.disconnect(), e.lib.droppableObserver.disconnect(), e.lib.selectableAreaObserver.disconnect(), e.lib.overlaySizeObserver.disconnect();
|
|
1166
990
|
} };
|
|
1167
|
-
},
|
|
991
|
+
}, Jt = {
|
|
1168
992
|
ArrowUp: { dx: 0, dy: -1 },
|
|
1169
993
|
ArrowDown: { dx: 0, dy: 1 },
|
|
1170
994
|
ArrowLeft: { dx: -1, dy: 0 },
|
|
@@ -1173,37 +997,37 @@ const mn = (e) => {
|
|
|
1173
997
|
KeyA: { dx: -1, dy: 0 },
|
|
1174
998
|
KeyS: { dx: 0, dy: 1 },
|
|
1175
999
|
KeyD: { dx: 1, dy: 0 }
|
|
1176
|
-
},
|
|
1000
|
+
}, Qt = (e) => (t) => {
|
|
1177
1001
|
const { keys: s } = e.keyboard;
|
|
1178
1002
|
if (s.pressedKeys.value.add(t.code), e.state.value === "dragging") {
|
|
1179
1003
|
if (s.forCancel.includes(t.code)) {
|
|
1180
|
-
t.preventDefault(),
|
|
1004
|
+
t.preventDefault(), me(), B(
|
|
1181
1005
|
e,
|
|
1182
1006
|
e.entities.initiatingDraggable,
|
|
1183
1007
|
"onSelfDragCancel"
|
|
1184
|
-
),
|
|
1008
|
+
), A(e, "onDragCancel"), Ze(e, e.hovered), te(e);
|
|
1185
1009
|
return;
|
|
1186
1010
|
}
|
|
1187
1011
|
if (s.forDrop.includes(t.code)) {
|
|
1188
|
-
t.preventDefault(), (async () => (await
|
|
1012
|
+
t.preventDefault(), (async () => (await Ue(e) && Ve(e), me(), te(e)))();
|
|
1189
1013
|
return;
|
|
1190
1014
|
}
|
|
1191
|
-
const o =
|
|
1015
|
+
const o = Jt[t.code];
|
|
1192
1016
|
if (o && s.forMove.includes(t.code) && e.pointer.value) {
|
|
1193
1017
|
t.preventDefault();
|
|
1194
|
-
const
|
|
1018
|
+
const a = s.forMoveFaster.some(
|
|
1195
1019
|
(l) => s.pressedKeys.value.has(l)
|
|
1196
|
-
), r = e.keyboard.step * (
|
|
1020
|
+
), r = e.keyboard.step * (a ? e.keyboard.moveFaster : 1);
|
|
1197
1021
|
e.pointer.value.current = {
|
|
1198
1022
|
x: e.pointer.value.current.x + o.dx * r,
|
|
1199
1023
|
y: e.pointer.value.current.y + o.dy * r
|
|
1200
1024
|
};
|
|
1201
|
-
const
|
|
1202
|
-
|
|
1025
|
+
const g = (e.collision?.run ?? pe)(e);
|
|
1026
|
+
ne(e, e.hovered, g), B(
|
|
1203
1027
|
e,
|
|
1204
1028
|
e.entities.initiatingDraggable,
|
|
1205
1029
|
"onSelfDragMove"
|
|
1206
|
-
),
|
|
1030
|
+
), A(e, "onDragMove");
|
|
1207
1031
|
return;
|
|
1208
1032
|
}
|
|
1209
1033
|
return;
|
|
@@ -1211,59 +1035,59 @@ const mn = (e) => {
|
|
|
1211
1035
|
if (s.forDrag.includes(t.code)) {
|
|
1212
1036
|
const o = document.activeElement;
|
|
1213
1037
|
if (!o) return;
|
|
1214
|
-
const
|
|
1215
|
-
|
|
1038
|
+
const a = o.closest(
|
|
1039
|
+
F.DRAGGABLE
|
|
1216
1040
|
);
|
|
1217
|
-
if (!
|
|
1041
|
+
if (!a || e.entities.modifiersDraggableSet.size === 0 || !e.entities.modifiersDraggableSet.has(a))
|
|
1218
1042
|
return;
|
|
1219
|
-
const r = e.entities.draggableMap.get(
|
|
1220
|
-
if (!
|
|
1043
|
+
const r = e.entities.draggableMap.get(a);
|
|
1044
|
+
if (!Ge(o, a, r?.dragHandle, !0))
|
|
1221
1045
|
return;
|
|
1222
|
-
t.preventDefault(),
|
|
1223
|
-
const
|
|
1224
|
-
clientX:
|
|
1046
|
+
t.preventDefault(), de();
|
|
1047
|
+
const i = a.getBoundingClientRect(), g = i.left + i.width / 2, l = i.top + i.height / 2, u = {
|
|
1048
|
+
clientX: g,
|
|
1225
1049
|
clientY: l
|
|
1226
1050
|
};
|
|
1227
|
-
e.entities.initiatingDraggable =
|
|
1228
|
-
const c =
|
|
1229
|
-
e.pointer.value =
|
|
1230
|
-
|
|
1051
|
+
e.entities.initiatingDraggable = a;
|
|
1052
|
+
const c = Fe(u, a);
|
|
1053
|
+
e.pointer.value = he(
|
|
1054
|
+
u,
|
|
1231
1055
|
c.x,
|
|
1232
1056
|
c.y
|
|
1233
|
-
),
|
|
1234
|
-
const d = (e.collision?.run ??
|
|
1235
|
-
|
|
1057
|
+
), ee(e);
|
|
1058
|
+
const d = (e.collision?.run ?? pe)(e);
|
|
1059
|
+
ne(e, e.hovered, d), B(e, a, "onSelfDragStart"), A(e, "onDragStart");
|
|
1236
1060
|
}
|
|
1237
|
-
},
|
|
1061
|
+
}, en = (e) => (t) => {
|
|
1238
1062
|
e.keyboard.keys.pressedKeys.value.delete(t.code);
|
|
1239
|
-
},
|
|
1063
|
+
}, tn = (e) => () => {
|
|
1240
1064
|
e.keyboard.keys.pressedKeys.value.clear();
|
|
1241
|
-
},
|
|
1242
|
-
keyDown:
|
|
1243
|
-
keyUp:
|
|
1244
|
-
clear:
|
|
1245
|
-
},
|
|
1246
|
-
e.state.value && (e.scrollPosition.x = window.scrollX, e.scrollPosition.y = window.scrollY, e.lib.rectCache.clear(), e.state.value === "dragging" &&
|
|
1247
|
-
},
|
|
1248
|
-
function
|
|
1065
|
+
}, ge = {
|
|
1066
|
+
keyDown: Qt,
|
|
1067
|
+
keyUp: en,
|
|
1068
|
+
clear: tn
|
|
1069
|
+
}, nn = (e) => () => {
|
|
1070
|
+
e.state.value && (e.scrollPosition.x = window.scrollX, e.scrollPosition.y = window.scrollY, e.lib.rectCache.clear(), e.state.value === "dragging" && Se(e));
|
|
1071
|
+
}, L = 50, sn = 144, Re = 1e3 / sn;
|
|
1072
|
+
function on(e) {
|
|
1249
1073
|
return e == null ? {
|
|
1250
|
-
top:
|
|
1251
|
-
right:
|
|
1252
|
-
bottom:
|
|
1253
|
-
left:
|
|
1074
|
+
top: L,
|
|
1075
|
+
right: L,
|
|
1076
|
+
bottom: L,
|
|
1077
|
+
left: L
|
|
1254
1078
|
} : typeof e == "number" ? {
|
|
1255
1079
|
top: e,
|
|
1256
1080
|
right: e,
|
|
1257
1081
|
bottom: e,
|
|
1258
1082
|
left: e
|
|
1259
1083
|
} : {
|
|
1260
|
-
top: e.top ??
|
|
1261
|
-
right: e.right ??
|
|
1262
|
-
bottom: e.bottom ??
|
|
1263
|
-
left: e.left ??
|
|
1084
|
+
top: e.top ?? L,
|
|
1085
|
+
right: e.right ?? L,
|
|
1086
|
+
bottom: e.bottom ?? L,
|
|
1087
|
+
left: e.left ?? L
|
|
1264
1088
|
};
|
|
1265
1089
|
}
|
|
1266
|
-
const
|
|
1090
|
+
const rn = {
|
|
1267
1091
|
getScrollState(e) {
|
|
1268
1092
|
return {
|
|
1269
1093
|
scrollTop: e.scrollTop,
|
|
@@ -1274,37 +1098,37 @@ const wn = {
|
|
|
1274
1098
|
e.scrollTop = t, e.scrollLeft = s;
|
|
1275
1099
|
}
|
|
1276
1100
|
};
|
|
1277
|
-
function
|
|
1278
|
-
const { speed:
|
|
1279
|
-
let
|
|
1280
|
-
const d = (
|
|
1281
|
-
o && (o.value =
|
|
1282
|
-
}, m = (
|
|
1283
|
-
const
|
|
1284
|
-
if (!
|
|
1101
|
+
function $e(e, t, s, n = rn, o) {
|
|
1102
|
+
const { speed: a = 10, disabled: r = !1 } = t, i = on(t.threshold);
|
|
1103
|
+
let g = null, l = null, u = null, c = 0, f = 0;
|
|
1104
|
+
const d = (y) => {
|
|
1105
|
+
o && (o.value = y);
|
|
1106
|
+
}, m = (y) => {
|
|
1107
|
+
const M = e.value, S = s();
|
|
1108
|
+
if (!M || !S || r) {
|
|
1285
1109
|
d(!1);
|
|
1286
1110
|
return;
|
|
1287
1111
|
}
|
|
1288
|
-
l || (l =
|
|
1289
|
-
const
|
|
1290
|
-
if (
|
|
1291
|
-
|
|
1112
|
+
l || (l = y);
|
|
1113
|
+
const U = y - l;
|
|
1114
|
+
if (U < Re) {
|
|
1115
|
+
g = requestAnimationFrame(m);
|
|
1292
1116
|
return;
|
|
1293
1117
|
}
|
|
1294
|
-
const
|
|
1295
|
-
l =
|
|
1296
|
-
const { scrollTop:
|
|
1297
|
-
(!
|
|
1298
|
-
let
|
|
1299
|
-
|
|
1118
|
+
const D = a * (U / Re);
|
|
1119
|
+
l = y;
|
|
1120
|
+
const { scrollTop: x, scrollLeft: K } = n.getScrollState(M);
|
|
1121
|
+
(!u || c !== x || f !== K) && (u = n.getRect ? n.getRect(M) : M.getBoundingClientRect(), c = x, f = K);
|
|
1122
|
+
let z = !1, ie = x, ae = K;
|
|
1123
|
+
i.top > 0 && S.y - u.top < i.top ? (ie = x - D, z = !0) : i.bottom > 0 && u.bottom - S.y < i.bottom && (ie = x + D, z = !0), i.left > 0 && S.x - u.left < i.left ? (ae = K - D, z = !0) : i.right > 0 && u.right - S.x < i.right && (ae = K + D, z = !0), z && n.setScroll(M, ie, ae), d(z), g = requestAnimationFrame(m);
|
|
1300
1124
|
};
|
|
1301
1125
|
return { run: () => {
|
|
1302
|
-
l = null,
|
|
1126
|
+
l = null, g = requestAnimationFrame(m);
|
|
1303
1127
|
}, stop: () => {
|
|
1304
|
-
|
|
1128
|
+
g && (cancelAnimationFrame(g), g = null), u = null, c = 0, f = 0, l = null, d(!1);
|
|
1305
1129
|
} };
|
|
1306
1130
|
}
|
|
1307
|
-
const
|
|
1131
|
+
const an = {
|
|
1308
1132
|
getScrollState() {
|
|
1309
1133
|
return {
|
|
1310
1134
|
scrollTop: window.scrollY ?? document.documentElement.scrollTop,
|
|
@@ -1317,58 +1141,58 @@ const vn = {
|
|
|
1317
1141
|
getRect() {
|
|
1318
1142
|
return new DOMRect(0, 0, window.innerWidth, window.innerHeight);
|
|
1319
1143
|
}
|
|
1320
|
-
},
|
|
1144
|
+
}, ln = {
|
|
1321
1145
|
get value() {
|
|
1322
1146
|
return typeof document < "u" ? document.documentElement : null;
|
|
1323
1147
|
}
|
|
1324
1148
|
};
|
|
1325
|
-
function
|
|
1326
|
-
const s =
|
|
1327
|
-
|
|
1149
|
+
function cn(e, t) {
|
|
1150
|
+
const s = J(!1), o = $e(
|
|
1151
|
+
ln,
|
|
1328
1152
|
t ?? {},
|
|
1329
1153
|
() => {
|
|
1330
1154
|
if (e.state.value !== "dragging") return null;
|
|
1331
|
-
const
|
|
1332
|
-
return
|
|
1333
|
-
x:
|
|
1334
|
-
y:
|
|
1335
|
-
} :
|
|
1155
|
+
const i = e.overlay.position.value, g = e.overlay.size.value;
|
|
1156
|
+
return i ? g?.width && g?.height ? {
|
|
1157
|
+
x: i.x + g.width / 2,
|
|
1158
|
+
y: i.y + g.height / 2
|
|
1159
|
+
} : i : null;
|
|
1336
1160
|
},
|
|
1337
|
-
|
|
1161
|
+
an,
|
|
1338
1162
|
s
|
|
1339
|
-
),
|
|
1163
|
+
), a = oe(
|
|
1340
1164
|
() => e.state.value,
|
|
1341
|
-
(
|
|
1342
|
-
|
|
1165
|
+
(i) => {
|
|
1166
|
+
i === "dragging" ? o.run() : o.stop();
|
|
1343
1167
|
}
|
|
1344
1168
|
), r = () => {
|
|
1345
|
-
|
|
1169
|
+
a(), o.stop();
|
|
1346
1170
|
};
|
|
1347
|
-
return
|
|
1171
|
+
return We(r), { isScrolling: s, stop: r };
|
|
1348
1172
|
}
|
|
1349
|
-
const
|
|
1350
|
-
const t =
|
|
1173
|
+
const gn = (e) => {
|
|
1174
|
+
const t = jt(e), s = ge.keyDown(e), n = ge.keyUp(e), o = ge.clear(e), a = nn(e);
|
|
1351
1175
|
let r = null;
|
|
1352
|
-
|
|
1176
|
+
oe(
|
|
1353
1177
|
e.autoScrollViewport,
|
|
1354
|
-
(
|
|
1355
|
-
r?.(), r = null, (
|
|
1178
|
+
(i) => {
|
|
1179
|
+
r?.(), r = null, (i === !0 || i && typeof i == "object") && (r = cn(
|
|
1356
1180
|
e,
|
|
1357
|
-
|
|
1181
|
+
i === !0 ? {} : i
|
|
1358
1182
|
).stop);
|
|
1359
1183
|
},
|
|
1360
1184
|
{ immediate: !0 }
|
|
1361
|
-
),
|
|
1362
|
-
document.addEventListener("pointerdown", t.pointerDown), document.addEventListener("keydown", s), document.addEventListener("keyup", n), document.addEventListener("blur", o), document.addEventListener("scroll",
|
|
1363
|
-
}),
|
|
1364
|
-
document.removeEventListener("pointerdown", t.pointerDown), document.removeEventListener("pointerup", t.pointerUp), document.removeEventListener("pointermove", t.pointerMove), document.removeEventListener("keydown", s), document.removeEventListener("keyup", n), document.removeEventListener("blur", o), document.removeEventListener("scroll",
|
|
1185
|
+
), Y(() => {
|
|
1186
|
+
document.addEventListener("pointerdown", t.pointerDown), document.addEventListener("keydown", s), document.addEventListener("keyup", n), document.addEventListener("blur", o), document.addEventListener("scroll", a, !0);
|
|
1187
|
+
}), X(() => {
|
|
1188
|
+
document.removeEventListener("pointerdown", t.pointerDown), document.removeEventListener("pointerup", t.pointerUp), document.removeEventListener("pointermove", t.pointerMove), document.removeEventListener("keydown", s), document.removeEventListener("keyup", n), document.removeEventListener("blur", o), document.removeEventListener("scroll", a, !0), r?.(), t.cleanup();
|
|
1365
1189
|
});
|
|
1366
|
-
},
|
|
1367
|
-
const e =
|
|
1190
|
+
}, re = () => {
|
|
1191
|
+
const e = ze(De);
|
|
1368
1192
|
if (!e) throw Error("DnD provider not found");
|
|
1369
1193
|
return e;
|
|
1370
|
-
},
|
|
1371
|
-
const e =
|
|
1194
|
+
}, qe = () => {
|
|
1195
|
+
const e = re();
|
|
1372
1196
|
return {
|
|
1373
1197
|
overlay: e.overlay,
|
|
1374
1198
|
delay: e.delay,
|
|
@@ -1382,31 +1206,31 @@ const An = (e) => {
|
|
|
1382
1206
|
collision: e.collision,
|
|
1383
1207
|
autoScrollViewport: e.autoScrollViewport
|
|
1384
1208
|
};
|
|
1385
|
-
},
|
|
1209
|
+
}, un = /* @__PURE__ */ Oe({
|
|
1386
1210
|
__name: "DefaultOverlay",
|
|
1387
1211
|
setup(e) {
|
|
1388
|
-
const { entities: t, state: s, overlay: n } =
|
|
1389
|
-
return (o,
|
|
1212
|
+
const { entities: t, state: s, overlay: n } = qe();
|
|
1213
|
+
return (o, a) => k(s) === "dragging" ? (C(), j("div", {
|
|
1390
1214
|
key: 0,
|
|
1391
1215
|
class: "dnd-kit-default-overlay",
|
|
1392
|
-
style:
|
|
1393
|
-
"--position-x":
|
|
1394
|
-
"--position-y":
|
|
1216
|
+
style: xe({
|
|
1217
|
+
"--position-x": k(n).position.value.x + "px",
|
|
1218
|
+
"--position-y": k(n).position.value.y + "px"
|
|
1395
1219
|
})
|
|
1396
1220
|
}, [
|
|
1397
|
-
(
|
|
1398
|
-
|
|
1221
|
+
(C(!0), j(ue, null, je(k(t).draggingMap, ([r, i]) => (C(), j(ue, null, [
|
|
1222
|
+
k(t).draggableMap.get(r)?.render ? (C(), Q(fe(k(t).draggableMap.get(r)?.render), { key: 0 })) : (C(), Q(fe(r.tagName), {
|
|
1399
1223
|
key: 1,
|
|
1400
|
-
innerHTML:
|
|
1401
|
-
style:
|
|
1402
|
-
width:
|
|
1403
|
-
height:
|
|
1224
|
+
innerHTML: i.initialOuterHTML,
|
|
1225
|
+
style: xe({
|
|
1226
|
+
width: i.initialRect.width + "px",
|
|
1227
|
+
height: i.initialRect.height + "px"
|
|
1404
1228
|
})
|
|
1405
1229
|
}, null, 8, ["innerHTML", "style"]))
|
|
1406
1230
|
], 64))), 256))
|
|
1407
|
-
], 4)) :
|
|
1231
|
+
], 4)) : Je("", !0);
|
|
1408
1232
|
}
|
|
1409
|
-
}),
|
|
1233
|
+
}), hn = /* @__PURE__ */ Oe({
|
|
1410
1234
|
__name: "DnDProvider",
|
|
1411
1235
|
props: {
|
|
1412
1236
|
autoScrollViewport: { type: [Object, Boolean, null] },
|
|
@@ -1415,80 +1239,80 @@ const An = (e) => {
|
|
|
1415
1239
|
class: {}
|
|
1416
1240
|
},
|
|
1417
1241
|
setup(e) {
|
|
1418
|
-
const t = e, s =
|
|
1419
|
-
|
|
1420
|
-
const o =
|
|
1421
|
-
() => n.overlay.render.value ??
|
|
1242
|
+
const t = e, s = Qe("overlayRef"), n = Mt(s, t);
|
|
1243
|
+
gn(n);
|
|
1244
|
+
const o = b(
|
|
1245
|
+
() => n.overlay.render.value ?? un
|
|
1422
1246
|
);
|
|
1423
|
-
return
|
|
1424
|
-
|
|
1425
|
-
(
|
|
1426
|
-
to:
|
|
1247
|
+
return et(De, n), (a, r) => (C(), j(ue, null, [
|
|
1248
|
+
Ae(a.$slots, "default"),
|
|
1249
|
+
(C(), Q(tt, {
|
|
1250
|
+
to: k(n).overlay.to.value || "body"
|
|
1427
1251
|
}, [
|
|
1428
|
-
|
|
1252
|
+
nt("div", st({
|
|
1429
1253
|
ref_key: "overlayRef",
|
|
1430
1254
|
ref: s,
|
|
1431
1255
|
class: "dnd-kit-overlay-container"
|
|
1432
1256
|
}, t), [
|
|
1433
|
-
|
|
1434
|
-
(
|
|
1257
|
+
Ae(a.$slots, "overlay", { overlay: o.value }, () => [
|
|
1258
|
+
(C(), Q(fe(o.value)))
|
|
1435
1259
|
])
|
|
1436
1260
|
], 16)
|
|
1437
1261
|
], 8, ["to"]))
|
|
1438
1262
|
], 64));
|
|
1439
1263
|
}
|
|
1440
1264
|
});
|
|
1441
|
-
function
|
|
1442
|
-
const n =
|
|
1443
|
-
let o,
|
|
1444
|
-
typeof t == "function" ? (o = {},
|
|
1445
|
-
const
|
|
1265
|
+
function bn(e, t, s) {
|
|
1266
|
+
const n = re();
|
|
1267
|
+
let o, a, r;
|
|
1268
|
+
typeof t == "function" ? (o = {}, a = t) : (o = t ?? {}, a = s);
|
|
1269
|
+
const i = b({
|
|
1446
1270
|
get() {
|
|
1447
|
-
const c =
|
|
1271
|
+
const c = v(e);
|
|
1448
1272
|
return c ? n.entities.selectedSet.has(c) : !1;
|
|
1449
1273
|
},
|
|
1450
1274
|
set(c) {
|
|
1451
|
-
const f =
|
|
1275
|
+
const f = v(e);
|
|
1452
1276
|
f && n.entities.selectedSet[c ? "add" : "delete"](f);
|
|
1453
1277
|
}
|
|
1454
|
-
}),
|
|
1455
|
-
const c =
|
|
1278
|
+
}), g = b(() => {
|
|
1279
|
+
const c = v(e);
|
|
1456
1280
|
return c ? n.entities.draggingMap.has(c) : !1;
|
|
1457
|
-
}), l =
|
|
1458
|
-
const c =
|
|
1281
|
+
}), l = b(() => {
|
|
1282
|
+
const c = v(e);
|
|
1459
1283
|
return c ? n.entities.allowedDraggableSet.has(c) : !1;
|
|
1460
|
-
}),
|
|
1461
|
-
const c =
|
|
1284
|
+
}), u = b(() => {
|
|
1285
|
+
const c = v(e);
|
|
1462
1286
|
if (c)
|
|
1463
1287
|
return n.entities.draggableMap.get(c)?.hoveredPlacement;
|
|
1464
1288
|
});
|
|
1465
|
-
return
|
|
1466
|
-
r =
|
|
1289
|
+
return Y(() => {
|
|
1290
|
+
r = v(e), r && (r.addEventListener("dragstart", w), r.addEventListener("drag", w), r.addEventListener("dragend", w), r.setAttribute(T.DRAGGABLE, ""), n.lib.draggableObserver.observe(r), n.entities.draggableMap.set(r, {
|
|
1467
1291
|
render: o.render,
|
|
1468
1292
|
disabled: o.disabled ?? !1,
|
|
1469
1293
|
groups: o.groups ?? [],
|
|
1470
1294
|
modifier: o.modifier,
|
|
1471
1295
|
events: o.events,
|
|
1472
|
-
payload:
|
|
1296
|
+
payload: a,
|
|
1473
1297
|
dragHandle: o.dragHandle,
|
|
1474
1298
|
activation: o.activation,
|
|
1475
1299
|
placementMargins: o.placementMargins,
|
|
1476
1300
|
hoveredPlacement: void 0
|
|
1477
1301
|
}));
|
|
1478
|
-
}),
|
|
1302
|
+
}), X(() => {
|
|
1479
1303
|
r && (n.lib.draggableObserver.unobserve(r), n.entities.visibleDraggableSet.delete(r), n.entities.draggableMap.delete(r), n.entities.modifiersDraggableSet.delete(r));
|
|
1480
1304
|
}), {
|
|
1481
|
-
selected:
|
|
1482
|
-
isDragging:
|
|
1305
|
+
selected: i,
|
|
1306
|
+
isDragging: g,
|
|
1483
1307
|
isAllowed: l,
|
|
1484
|
-
isDragOver:
|
|
1308
|
+
isDragOver: u
|
|
1485
1309
|
};
|
|
1486
1310
|
}
|
|
1487
|
-
const
|
|
1488
|
-
const s =
|
|
1311
|
+
const yn = (e, t) => {
|
|
1312
|
+
const s = re(), n = b(() => e.value === s.entities.selectingArea);
|
|
1489
1313
|
let o = null;
|
|
1490
|
-
|
|
1491
|
-
o =
|
|
1314
|
+
Y(() => {
|
|
1315
|
+
o = v(e), o && (o.setAttribute(T.SELECT_AREA, ""), s.lib.selectableAreaObserver.observe(o), s.entities.selectableAreaMap.set(o, {
|
|
1492
1316
|
modifier: t?.modifier ?? {
|
|
1493
1317
|
keys: ["ControlLeft"],
|
|
1494
1318
|
method: "every"
|
|
@@ -1497,128 +1321,128 @@ const Tn = (e, t) => {
|
|
|
1497
1321
|
disabled: t?.disabled ?? !1,
|
|
1498
1322
|
groups: t?.groups ?? []
|
|
1499
1323
|
}));
|
|
1500
|
-
}),
|
|
1324
|
+
}), X(() => {
|
|
1501
1325
|
o && (s.lib.selectableAreaObserver.unobserve(o), s.entities.visibleSelectableAreaSet.delete(o), s.entities.modifiersSelectableAreaSet.delete(o), s.entities.selectableAreaMap.delete(o));
|
|
1502
1326
|
});
|
|
1503
|
-
const
|
|
1327
|
+
const a = b(() => {
|
|
1504
1328
|
s.scrollPosition.x, s.scrollPosition.y;
|
|
1505
1329
|
const r = s.pointer.value;
|
|
1506
|
-
return !r || s.state.value !== "selecting" || !o || !n.value ? {} :
|
|
1330
|
+
return !r || s.state.value !== "selecting" || !o || !n.value ? {} : Tt(r.start, r.current, o);
|
|
1507
1331
|
});
|
|
1508
1332
|
return {
|
|
1509
1333
|
isSelecting: n,
|
|
1510
|
-
style:
|
|
1334
|
+
style: a
|
|
1511
1335
|
};
|
|
1512
1336
|
};
|
|
1513
|
-
function
|
|
1514
|
-
const s =
|
|
1337
|
+
function pn(e, t) {
|
|
1338
|
+
const s = ze(De);
|
|
1515
1339
|
if (!s) throw Error("DnD provider not found");
|
|
1516
1340
|
let n = null;
|
|
1517
|
-
return
|
|
1518
|
-
n =
|
|
1341
|
+
return Y(() => {
|
|
1342
|
+
n = v(e), n && (n.setAttribute(T.CONSTRAINT_AREA, ""), s.entities.constraintsAreaMap.set(n, {
|
|
1519
1343
|
axis: t?.axis || "both",
|
|
1520
1344
|
restrictToArea: t?.restrictToArea || !1
|
|
1521
1345
|
}));
|
|
1522
|
-
}),
|
|
1346
|
+
}), X(() => {
|
|
1523
1347
|
n && s.entities.constraintsAreaMap.delete(n);
|
|
1524
1348
|
}), {};
|
|
1525
1349
|
}
|
|
1526
|
-
function
|
|
1527
|
-
const n =
|
|
1528
|
-
let o = null,
|
|
1529
|
-
typeof t == "function" ? (
|
|
1530
|
-
const
|
|
1531
|
-
const l =
|
|
1350
|
+
function Sn(e, t, s) {
|
|
1351
|
+
const n = re();
|
|
1352
|
+
let o = null, a, r;
|
|
1353
|
+
typeof t == "function" ? (a = {}, r = t) : (a = t ?? {}, r = s);
|
|
1354
|
+
const i = b(() => {
|
|
1355
|
+
const l = v(e);
|
|
1532
1356
|
return l ? n.entities.allowedDroppableSet.has(l) : !1;
|
|
1533
|
-
}),
|
|
1534
|
-
const l =
|
|
1357
|
+
}), g = b(() => {
|
|
1358
|
+
const l = v(e);
|
|
1535
1359
|
if (l)
|
|
1536
1360
|
return n.entities.droppableMap.get(l)?.hoveredPlacement;
|
|
1537
1361
|
});
|
|
1538
|
-
return
|
|
1539
|
-
o =
|
|
1540
|
-
disabled:
|
|
1541
|
-
groups:
|
|
1542
|
-
events:
|
|
1362
|
+
return Y(() => {
|
|
1363
|
+
o = v(e), o && (o.setAttribute(T.DROPPABLE, ""), n.lib.droppableObserver.observe(o), n.entities.droppableMap.set(o, {
|
|
1364
|
+
disabled: a.disabled ?? !1,
|
|
1365
|
+
groups: a.groups ?? [],
|
|
1366
|
+
events: a.events,
|
|
1543
1367
|
payload: r,
|
|
1544
1368
|
hoveredPlacement: void 0
|
|
1545
1369
|
}));
|
|
1546
|
-
}),
|
|
1370
|
+
}), X(() => {
|
|
1547
1371
|
o && (n.lib.droppableObserver.unobserve(o), n.entities.visibleDroppableSet.delete(o), n.entities.droppableMap.delete(o));
|
|
1548
1372
|
}), {
|
|
1549
|
-
isAllowed:
|
|
1550
|
-
isDragOver:
|
|
1373
|
+
isAllowed: i,
|
|
1374
|
+
isDragOver: g
|
|
1551
1375
|
};
|
|
1552
1376
|
}
|
|
1553
|
-
const
|
|
1554
|
-
const s =
|
|
1377
|
+
const Dn = (e, t) => {
|
|
1378
|
+
const s = qe(), n = J(!1), a = $e(
|
|
1555
1379
|
e,
|
|
1556
1380
|
t ?? {},
|
|
1557
1381
|
() => {
|
|
1558
1382
|
if (s.state.value !== "dragging") return null;
|
|
1559
|
-
const r = s.overlay.position.value,
|
|
1560
|
-
return r ?
|
|
1561
|
-
x: r.x +
|
|
1562
|
-
y: r.y +
|
|
1383
|
+
const r = s.overlay.position.value, i = s.overlay.size.value;
|
|
1384
|
+
return r ? i?.width && i?.height ? {
|
|
1385
|
+
x: r.x + i.width / 2,
|
|
1386
|
+
y: r.y + i.height / 2
|
|
1563
1387
|
} : r : null;
|
|
1564
1388
|
},
|
|
1565
1389
|
void 0,
|
|
1566
1390
|
n
|
|
1567
1391
|
);
|
|
1568
|
-
return
|
|
1392
|
+
return oe(
|
|
1569
1393
|
() => s.state.value,
|
|
1570
1394
|
(r) => {
|
|
1571
|
-
r === "dragging" ?
|
|
1395
|
+
r === "dragging" ? a.run() : a.stop();
|
|
1572
1396
|
}
|
|
1573
1397
|
), { isScrolling: n };
|
|
1574
1398
|
};
|
|
1575
|
-
function
|
|
1399
|
+
function ke(e, t) {
|
|
1576
1400
|
return t <= 0 ? e : Math.round(e / t) * t;
|
|
1577
1401
|
}
|
|
1578
|
-
function
|
|
1402
|
+
function Mn(e, t) {
|
|
1579
1403
|
const s = t && "grid" in t && t.grid != null, n = t ? s ? t.grid : t.gridX : 1, o = t ? s ? t.grid : t.gridY : 1;
|
|
1580
|
-
return
|
|
1581
|
-
const { x:
|
|
1404
|
+
return b(() => {
|
|
1405
|
+
const { x: a, y: r } = e.value;
|
|
1582
1406
|
return {
|
|
1583
|
-
x:
|
|
1584
|
-
y:
|
|
1407
|
+
x: ke(a, n),
|
|
1408
|
+
y: ke(r, o)
|
|
1585
1409
|
};
|
|
1586
1410
|
});
|
|
1587
1411
|
}
|
|
1588
|
-
const
|
|
1412
|
+
const Pe = () => !0, Te = () => 0, fn = "separate", dn = () => {
|
|
1589
1413
|
const e = {
|
|
1590
|
-
filterElements:
|
|
1591
|
-
filterZones:
|
|
1592
|
-
sortElements:
|
|
1593
|
-
sortZones:
|
|
1594
|
-
mergeStrategy:
|
|
1414
|
+
filterElements: Pe,
|
|
1415
|
+
filterZones: Pe,
|
|
1416
|
+
sortElements: Te,
|
|
1417
|
+
sortZones: Te,
|
|
1418
|
+
mergeStrategy: fn,
|
|
1595
1419
|
pickClosestBetweenFirst: !1
|
|
1596
|
-
}, t = (n, o,
|
|
1597
|
-
const
|
|
1598
|
-
for (const m of
|
|
1599
|
-
if (!
|
|
1600
|
-
const h =
|
|
1420
|
+
}, t = (n, o, a, r, i, g, l) => {
|
|
1421
|
+
const u = r instanceof Set ? r : new Set(r), c = { containerBox: o, pointer: a }, f = e.minOverlapPercent, d = [];
|
|
1422
|
+
for (const m of u) {
|
|
1423
|
+
if (!i(m, n)) continue;
|
|
1424
|
+
const h = se(m);
|
|
1601
1425
|
if (!l(h, c)) continue;
|
|
1602
|
-
const
|
|
1603
|
-
if (f !== void 0 &&
|
|
1604
|
-
let
|
|
1605
|
-
for (const
|
|
1606
|
-
|
|
1426
|
+
const p = be(h, o);
|
|
1427
|
+
if (f !== void 0 && p < f) continue;
|
|
1428
|
+
let y = 0;
|
|
1429
|
+
for (const M of u)
|
|
1430
|
+
M !== m && H(M, m) && y++;
|
|
1607
1431
|
d.push({
|
|
1608
1432
|
node: m,
|
|
1609
1433
|
box: h,
|
|
1610
1434
|
meta: {
|
|
1611
|
-
isPointerInElement:
|
|
1612
|
-
overlapPercent:
|
|
1613
|
-
depth:
|
|
1614
|
-
centerDistance:
|
|
1615
|
-
|
|
1616
|
-
|
|
1435
|
+
isPointerInElement: Nt(h, a.x, a.y),
|
|
1436
|
+
overlapPercent: p,
|
|
1437
|
+
depth: y,
|
|
1438
|
+
centerDistance: Kt(
|
|
1439
|
+
Z(o),
|
|
1440
|
+
Z(h)
|
|
1617
1441
|
)
|
|
1618
1442
|
}
|
|
1619
1443
|
});
|
|
1620
1444
|
}
|
|
1621
|
-
return d.sort((m, h) =>
|
|
1445
|
+
return d.sort((m, h) => g(m, h, c)), d;
|
|
1622
1446
|
}, s = {
|
|
1623
1447
|
container(n) {
|
|
1624
1448
|
return e.container = n, s;
|
|
@@ -1663,12 +1487,12 @@ const Ke = () => !0, Ze = () => 0, In = "separate", Ln = () => {
|
|
|
1663
1487
|
"sensor: container, elements, zones, collision are required"
|
|
1664
1488
|
);
|
|
1665
1489
|
return (o) => {
|
|
1666
|
-
const
|
|
1667
|
-
if (!
|
|
1668
|
-
const r = n.containerBox ? n.containerBox(o) :
|
|
1490
|
+
const a = n.container(o);
|
|
1491
|
+
if (!a) return { elements: [], zones: [] };
|
|
1492
|
+
const r = n.containerBox ? n.containerBox(o) : se(a), i = o.pointer.value?.current ?? { x: 0, y: 0 }, g = t(
|
|
1669
1493
|
o,
|
|
1670
1494
|
r,
|
|
1671
|
-
|
|
1495
|
+
i,
|
|
1672
1496
|
n.elements(o),
|
|
1673
1497
|
n.filterElements,
|
|
1674
1498
|
n.sortElements,
|
|
@@ -1676,15 +1500,15 @@ const Ke = () => !0, Ze = () => 0, In = "separate", Ln = () => {
|
|
|
1676
1500
|
), l = t(
|
|
1677
1501
|
o,
|
|
1678
1502
|
r,
|
|
1679
|
-
|
|
1503
|
+
i,
|
|
1680
1504
|
n.zones(o),
|
|
1681
1505
|
n.filterZones,
|
|
1682
1506
|
n.sortZones,
|
|
1683
1507
|
n.collision
|
|
1684
1508
|
);
|
|
1685
1509
|
if (n.mergeStrategy === "unified-closest") {
|
|
1686
|
-
const
|
|
1687
|
-
...
|
|
1510
|
+
const u = [
|
|
1511
|
+
...g.map((f) => ({
|
|
1688
1512
|
node: f.node,
|
|
1689
1513
|
box: f.box,
|
|
1690
1514
|
isZone: !1,
|
|
@@ -1697,47 +1521,47 @@ const Ke = () => !0, Ze = () => 0, In = "separate", Ln = () => {
|
|
|
1697
1521
|
distance: 0
|
|
1698
1522
|
}))
|
|
1699
1523
|
];
|
|
1700
|
-
if (
|
|
1701
|
-
for (const f of
|
|
1702
|
-
const d =
|
|
1524
|
+
if (u.length === 0) return { elements: [], zones: [] };
|
|
1525
|
+
for (const f of u) {
|
|
1526
|
+
const d = Z(f.box);
|
|
1703
1527
|
f.distance = Math.hypot(
|
|
1704
|
-
|
|
1705
|
-
|
|
1528
|
+
i.x - d.x,
|
|
1529
|
+
i.y - d.y
|
|
1706
1530
|
);
|
|
1707
1531
|
}
|
|
1708
|
-
const c =
|
|
1532
|
+
const c = u.reduce(
|
|
1709
1533
|
(f, d) => d.distance < f.distance ? d : f
|
|
1710
1534
|
);
|
|
1711
1535
|
return c.isZone ? { elements: [], zones: [c.node] } : { elements: [c.node], zones: [] };
|
|
1712
1536
|
}
|
|
1713
|
-
if (n.pickClosestBetweenFirst &&
|
|
1714
|
-
const
|
|
1715
|
-
|
|
1716
|
-
|
|
1537
|
+
if (n.pickClosestBetweenFirst && g[0] && l[0]) {
|
|
1538
|
+
const u = Z(l[0].box), c = Z(g[0].box), f = Math.hypot(
|
|
1539
|
+
i.x - u.x,
|
|
1540
|
+
i.y - u.y
|
|
1717
1541
|
);
|
|
1718
1542
|
return Math.hypot(
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
) < f ? { elements:
|
|
1543
|
+
i.x - c.x,
|
|
1544
|
+
i.y - c.y
|
|
1545
|
+
) < f ? { elements: g.map((m) => m.node), zones: [] } : { elements: [], zones: l.map((m) => m.node) };
|
|
1722
1546
|
}
|
|
1723
1547
|
return {
|
|
1724
|
-
elements:
|
|
1725
|
-
zones: l.map((
|
|
1548
|
+
elements: g.map((u) => u.node),
|
|
1549
|
+
zones: l.map((u) => u.node)
|
|
1726
1550
|
};
|
|
1727
1551
|
};
|
|
1728
1552
|
}
|
|
1729
1553
|
};
|
|
1730
1554
|
return s;
|
|
1731
|
-
},
|
|
1555
|
+
}, vn = () => dn();
|
|
1732
1556
|
export {
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1557
|
+
hn as DnDProvider,
|
|
1558
|
+
vn as createSensor,
|
|
1559
|
+
pe as defaultCollisionDetection,
|
|
1560
|
+
Dn as makeAutoScroll,
|
|
1561
|
+
pn as makeConstraintArea,
|
|
1562
|
+
bn as makeDraggable,
|
|
1563
|
+
Sn as makeDroppable,
|
|
1564
|
+
yn as makeSelectionArea,
|
|
1565
|
+
Mn as makeSnappedOverlayPosition,
|
|
1566
|
+
qe as useDnDProvider
|
|
1743
1567
|
};
|