fluid-dnd 1.3.1-beta.0 → 1.3.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{HandlerPublisher-BK0HGzXk.js → HandlerPublisher-BjHK5JWM.js} +1 -1
- package/dist/{HandlerPublisher-CJjcAWlb.cjs → HandlerPublisher-DopQmmiO.cjs} +1 -1
- package/dist/index/index.cjs +1 -1
- package/dist/index/index.mjs +1 -1
- package/dist/{index-Cm06gxy7.js → index-Br5-BQhK.js} +512 -511
- package/dist/index-DtPM9-d-.cjs +1 -0
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.mjs +2 -2
- package/dist/svelte/index.cjs +1 -1
- package/dist/svelte/index.mjs +2 -2
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/index-D1uENWRM.cjs +0 -1
@@ -1,33 +1,33 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var
|
4
|
-
const U = "draggable",
|
1
|
+
var Te = Object.defineProperty;
|
2
|
+
var Ee = (t, e, n) => e in t ? Te(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
3
|
+
var j = (t, e, n) => Ee(t, typeof e != "symbol" ? e + "" : e, n);
|
4
|
+
const U = "draggable", Xt = "droppable", Lt = "handler-class", Ft = "dragging", Wt = "dragging-handler-class", Vt = "dropping", oe = "grabbing", ye = "grab", Kt = "disable-transition", nt = (t, e) => t.classList.contains(e), bt = (t, e, n = !1) => {
|
5
5
|
t.classList.toggle(e, n);
|
6
6
|
}, st = (t, e) => {
|
7
7
|
t.classList.add(e);
|
8
|
-
},
|
8
|
+
}, Ct = (t, e) => {
|
9
9
|
t.classList.remove(e);
|
10
|
-
},
|
10
|
+
}, Ce = (t, e) => At(e).every(
|
11
11
|
(n) => nt(t, n)
|
12
|
-
), gt = (t) => t ? `.${
|
12
|
+
), gt = (t) => t ? `.${At(t).join(".")}` : "", Ae = (t, e) => {
|
13
13
|
if (!e)
|
14
14
|
return;
|
15
|
-
const n =
|
15
|
+
const n = At(e);
|
16
16
|
t.classList.add(...n);
|
17
|
-
},
|
17
|
+
}, At = (t) => t ? t.split(" ").filter((e) => e) : [], V = "horizontal", tt = "vertical", xe = () => {
|
18
18
|
const { scrollX: t, scrollY: e } = window;
|
19
19
|
return { scrollX: t, scrollY: e };
|
20
|
-
}, zt = (t) => !t || t.trim().length == 0 || t == "normal" ? 0 : parseFloat(t), we = (t) => t ? parseInt(t) : -1,
|
20
|
+
}, zt = (t) => !t || t.trim().length == 0 || t == "normal" ? 0 : parseFloat(t), we = (t) => t ? parseInt(t) : -1, Be = (t) => {
|
21
21
|
const e = getComputedStyle(t), n = new DOMMatrixReadOnly(e.transform);
|
22
22
|
return {
|
23
23
|
x: n.m41,
|
24
24
|
y: n.m42
|
25
25
|
};
|
26
|
-
}, re = (t, e) => t.x1 > e.x1 ? re(e, t) : t.x2 < e.x1 ? 0 : t.x2 >= e.x2 ? t.x2 - t.x1 : t.x2 - e.x1, pt = (t, e) => !
|
27
|
-
const n =
|
26
|
+
}, re = (t, e) => t.x1 > e.x1 ? re(e, t) : t.x2 < e.x1 ? 0 : t.x2 >= e.x2 ? t.x2 - t.x1 : t.x2 - e.x1, pt = (t, e) => !Me(t, e), Me = (t, e) => {
|
27
|
+
const n = Ot(t), s = Ot(e), o = Qt(n, s, tt), r = Qt(n, s, V);
|
28
28
|
return o >= Math.min(n.height, s.height) / 2 && r >= Math.min(n.width, s.width) / 2;
|
29
29
|
}, Qt = (t, e, n) => {
|
30
|
-
const { before: s, distance: o } =
|
30
|
+
const { before: s, distance: o } = B(n);
|
31
31
|
return re(
|
32
32
|
{
|
33
33
|
x1: t[s],
|
@@ -41,7 +41,7 @@ const U = "draggable", It = "droppable", Lt = "handler-class", qt = "dragging",
|
|
41
41
|
}, L = (t, e) => t ? zt(getComputedStyle(t)[e]) : 0, Ut = (t) => {
|
42
42
|
const { scrollLeft: e, scrollTop: n } = t;
|
43
43
|
return { scrollLeft: e, scrollTop: n };
|
44
|
-
},
|
44
|
+
}, Ot = (t) => t.getBoundingClientRect(), B = (t) => {
|
45
45
|
const e = t == V;
|
46
46
|
return {
|
47
47
|
beforeMargin: e ? "marginLeft" : "marginTop",
|
@@ -61,11 +61,11 @@ const U = "draggable", It = "droppable", Lt = "handler-class", qt = "dragging",
|
|
61
61
|
scrollDistance: e ? "scrollWidth" : "scrollHeight",
|
62
62
|
clientDistance: e ? "clientWidth" : "clientHeight",
|
63
63
|
paddingBefore: e ? "paddingLeft" : "paddingTop",
|
64
|
-
getRect:
|
64
|
+
getRect: Ot
|
65
65
|
};
|
66
|
-
},
|
66
|
+
}, Mt = (t, e) => Re(t, e), ie = (t) => [...t.children].filter(
|
67
67
|
(n) => nt(n, U)
|
68
|
-
),
|
68
|
+
), Re = (t, e) => {
|
69
69
|
const n = [...e.children].filter(
|
70
70
|
(o) => nt(o, U) && !o.isEqualNode(t)
|
71
71
|
).toReversed(), s = [...e.children].findLastIndex(
|
@@ -76,7 +76,7 @@ const U = "draggable", It = "droppable", Lt = "handler-class", qt = "dragging",
|
|
76
76
|
s,
|
77
77
|
e
|
78
78
|
];
|
79
|
-
},
|
79
|
+
}, Le = (t) => {
|
80
80
|
let e = t.parentElement;
|
81
81
|
for (; e; ) {
|
82
82
|
if (window.getComputedStyle(e).position === "fixed")
|
@@ -88,23 +88,23 @@ const U = "draggable", It = "droppable", Lt = "handler-class", qt = "dragging",
|
|
88
88
|
const {
|
89
89
|
before: n,
|
90
90
|
borderBeforeWidth: s
|
91
|
-
} =
|
92
|
-
return o ?
|
93
|
-
},
|
91
|
+
} = B(e), o = Le(t);
|
92
|
+
return o ? Ot(o)[n] + L(o, s) : 0;
|
93
|
+
}, Tt = (t) => window.TouchEvent && t instanceof TouchEvent, it = (t) => t instanceof HTMLElement, ae = (t) => t instanceof MouseEvent, Oe = ["onmouseup", "onmousedown", "onmousemove"], Ne = (t, e, n) => {
|
94
94
|
t && (t.style.height = `${e}px`, t.style.width = `${n}px`);
|
95
|
-
},
|
96
|
-
!t || !
|
97
|
-
},
|
95
|
+
}, Et = (t, e, n) => {
|
96
|
+
!t || !it(t) || (n == 0 && e == 0 ? t.style.transform = "" : t.style.transform = `translate(${n}px,${e}px)`);
|
97
|
+
}, Fe = (t, e, n, s) => {
|
98
98
|
t[e] = (o) => {
|
99
99
|
if (o.defaultPrevented)
|
100
100
|
return;
|
101
101
|
s && s(o);
|
102
|
-
const r =
|
102
|
+
const r = _t(o);
|
103
103
|
n(r);
|
104
104
|
};
|
105
|
-
},
|
106
|
-
n && (
|
107
|
-
},
|
105
|
+
}, It = (t, e, n, s) => {
|
106
|
+
n && (Pe(e) ? t[e] = n : Fe(t, e, n, s));
|
107
|
+
}, Pe = (t) => Oe.includes(t), $e = (t) => {
|
108
108
|
const { target: e } = t;
|
109
109
|
return {
|
110
110
|
clientX: 0,
|
@@ -117,8 +117,8 @@ const U = "draggable", It = "droppable", Lt = "handler-class", qt = "dragging",
|
|
117
117
|
offsetX: 0,
|
118
118
|
offsetY: 0
|
119
119
|
};
|
120
|
-
},
|
121
|
-
const n = (s, o) =>
|
120
|
+
}, Ge = (t, e) => {
|
121
|
+
const n = (s, o) => Ye(e, window, o, s);
|
122
122
|
if (ae(t)) {
|
123
123
|
const { offsetX: s, offsetY: o } = t;
|
124
124
|
return [s, o];
|
@@ -129,16 +129,16 @@ const U = "draggable", It = "droppable", Lt = "handler-class", qt = "dragging",
|
|
129
129
|
n(s, tt)
|
130
130
|
];
|
131
131
|
}
|
132
|
-
},
|
132
|
+
}, _t = (t) => {
|
133
133
|
const e = Ie(t);
|
134
134
|
if (!e)
|
135
|
-
return
|
136
|
-
const [n, s] =
|
135
|
+
return $e(t);
|
136
|
+
const [n, s] = Ge(t, e), { clientX: o, clientY: r, pageX: c, pageY: l, screenX: f, screenY: g, target: m } = e;
|
137
137
|
return {
|
138
138
|
clientX: o,
|
139
139
|
clientY: r,
|
140
140
|
pageX: c,
|
141
|
-
pageY:
|
141
|
+
pageY: l,
|
142
142
|
screenX: f,
|
143
143
|
screenY: g,
|
144
144
|
target: m,
|
@@ -146,27 +146,27 @@ const U = "draggable", It = "droppable", Lt = "handler-class", qt = "dragging",
|
|
146
146
|
offsetY: s
|
147
147
|
};
|
148
148
|
}, Ie = (t) => {
|
149
|
-
if (
|
149
|
+
if (Tt(t))
|
150
150
|
return t.touches[0] ?? t.changedTouches[0];
|
151
151
|
if (ae(t))
|
152
152
|
return t;
|
153
|
-
},
|
154
|
-
const { page: o, scroll: r, before: c, borderBeforeWidth:
|
155
|
-
return t[o] - e[r] - g[c] - L(s,
|
156
|
-
},
|
157
|
-
|
153
|
+
}, Ye = (t, e, n, s) => {
|
154
|
+
const { page: o, scroll: r, before: c, borderBeforeWidth: l, getRect: f } = B(n), g = f(s);
|
155
|
+
return t[o] - e[r] - g[c] - L(s, l);
|
156
|
+
}, Pt = (t, e, n = "ease-out", s = "transform") => {
|
157
|
+
it(t) && (t.style.transitionDuration = `${e}ms`, t.style.transitionTimingFunction = `${n}`, t.style.transitionProperty = `${s}`);
|
158
158
|
}, le = (t, e, n) => {
|
159
|
-
!t || !
|
159
|
+
!t || !it(t) || (t[e] = () => {
|
160
160
|
n();
|
161
161
|
});
|
162
|
-
},
|
162
|
+
}, Xe = (t) => {
|
163
163
|
var e = t.querySelector("style");
|
164
164
|
if (!e) {
|
165
165
|
var n = document.createElement("style");
|
166
166
|
return t.appendChild(n), n;
|
167
167
|
}
|
168
168
|
return e;
|
169
|
-
},
|
169
|
+
}, We = (t, e) => {
|
170
170
|
const n = /\.-?[_a-zA-Z0-9-*\s<>():]+/g, [s] = e.match(n) || [];
|
171
171
|
for (const o of t.cssRules) {
|
172
172
|
const [r] = o.cssText.match(n) || [];
|
@@ -174,203 +174,203 @@ const U = "draggable", It = "droppable", Lt = "handler-class", qt = "dragging",
|
|
174
174
|
return !0;
|
175
175
|
}
|
176
176
|
return !1;
|
177
|
-
},
|
177
|
+
}, Ve = (t, e) => {
|
178
178
|
e.forEach((n) => {
|
179
|
-
|
179
|
+
_e(t, n);
|
180
180
|
});
|
181
|
-
},
|
181
|
+
}, _e = (t, e) => {
|
182
182
|
var s;
|
183
|
-
var n =
|
184
|
-
n.sheet && (
|
183
|
+
var n = Xe(t);
|
184
|
+
n.sheet && (We(n.sheet, e) || (s = n.sheet) == null || s.insertRule(e, n.sheet.cssRules.length));
|
185
185
|
}, ue = (t, e = {}) => {
|
186
186
|
for (const n of Object.keys(e)) {
|
187
187
|
const s = e[n];
|
188
|
-
s != null &&
|
188
|
+
s != null && He(t, `--${n}`, s);
|
189
189
|
}
|
190
|
-
},
|
190
|
+
}, He = (t, e, n) => t && t.style.setProperty(e, n), fe = "startDrag", Nt = "drag", jt = "startDrop", qe = "drop", at = "temp-child", de = "cubic-bezier(0.2, 0, 0, 1)", ze = (t) => t === qe || t === jt, Ht = (t) => !t || t.length == 0 ? 0 : zt(t.replace("px", "")), je = (t, e) => {
|
191
191
|
const n = getComputedStyle(t)[e];
|
192
192
|
if (n.match("%")) {
|
193
193
|
const o = zt(n.replace("%", "")), { width: r } = t.getBoundingClientRect();
|
194
194
|
return r * (o / 100);
|
195
195
|
}
|
196
|
-
return
|
196
|
+
return Ht(n);
|
197
197
|
}, Zt = (t, e) => {
|
198
198
|
if (!(t instanceof Element))
|
199
199
|
return [
|
200
200
|
0,
|
201
201
|
!1
|
202
202
|
];
|
203
|
-
const n =
|
203
|
+
const n = je(t, e), s = getComputedStyle(t).display, o = n > 0 || s === "flex";
|
204
204
|
return [n, o];
|
205
|
-
},
|
205
|
+
}, Ze = (t) => {
|
206
206
|
const { top: e, left: n } = getComputedStyle(t);
|
207
|
-
return [
|
208
|
-
},
|
209
|
-
const { gap: n } =
|
207
|
+
return [Ht(e), Ht(n)];
|
208
|
+
}, ke = (t, e) => {
|
209
|
+
const { gap: n } = B(e), [s, o] = Zt(t, n);
|
210
210
|
return o ? s : 0;
|
211
211
|
};
|
212
|
-
function
|
213
|
-
let { height: c, width:
|
212
|
+
function yt(t, e, n, s, o = t.previousElementSibling, r = t.nextElementSibling) {
|
213
|
+
let { height: c, width: l } = Je(
|
214
214
|
n,
|
215
215
|
t,
|
216
216
|
o,
|
217
217
|
r
|
218
218
|
);
|
219
|
-
return pt(t, s) && e == Nt && (c = 0,
|
219
|
+
return pt(t, s) && e == Nt && (c = 0, l = 0), { height: c, width: l };
|
220
220
|
}
|
221
|
-
const
|
221
|
+
const Je = (t, e, n, s) => {
|
222
222
|
const {
|
223
223
|
afterMargin: o,
|
224
224
|
beforeMargin: r,
|
225
225
|
distance: c,
|
226
|
-
gap:
|
226
|
+
gap: l,
|
227
227
|
getRect: f
|
228
|
-
} =
|
228
|
+
} = B(t), g = L(e, o), m = L(e, r), b = L(s, r), [M, O] = Zt(
|
229
229
|
e.parentElement,
|
230
|
-
|
230
|
+
l
|
231
231
|
), F = f(e)[c];
|
232
|
-
if (
|
233
|
-
return te(F, m, g,
|
234
|
-
const [y, p,
|
232
|
+
if (O)
|
233
|
+
return te(F, m, g, M, 0, t);
|
234
|
+
const [y, p, T] = Ke(
|
235
235
|
n,
|
236
|
-
|
236
|
+
b,
|
237
237
|
g,
|
238
238
|
m,
|
239
239
|
o
|
240
240
|
);
|
241
|
-
return te(F, p, y, 0,
|
242
|
-
},
|
241
|
+
return te(F, p, y, 0, T, t);
|
242
|
+
}, Ke = (t, e, n, s, o) => {
|
243
243
|
const r = Math.max(e, n);
|
244
|
-
let c = s,
|
244
|
+
let c = s, l = e;
|
245
245
|
if (t) {
|
246
246
|
const f = L(
|
247
247
|
t,
|
248
248
|
o
|
249
249
|
);
|
250
|
-
c = Math.max(f, s),
|
250
|
+
c = Math.max(f, s), l = Math.max(l, f);
|
251
251
|
}
|
252
|
-
return [r, c,
|
253
|
-
}, te = (t, e, n, s, o, r) =>
|
252
|
+
return [r, c, l];
|
253
|
+
}, te = (t, e, n, s, o, r) => Qe(r, t + e + n + s - o), Qe = (t, e) => t == V ? { width: e, height: 0 } : { width: 0, height: e }, ee = (t, e) => {
|
254
254
|
const {
|
255
255
|
borderBeforeWidth: n,
|
256
256
|
paddingBefore: s,
|
257
257
|
axis: o,
|
258
258
|
getRect: r
|
259
|
-
} =
|
260
|
-
return c +
|
261
|
-
},
|
262
|
-
const [n, s] =
|
259
|
+
} = B(t), c = L(e, n), l = L(e, s), f = r(e)[o];
|
260
|
+
return c + l + f;
|
261
|
+
}, Ue = (t, e) => {
|
262
|
+
const [n, s] = Ze(e), o = ee(tt, t);
|
263
263
|
return [
|
264
264
|
ee(V, t) - s,
|
265
265
|
o - n
|
266
266
|
];
|
267
267
|
};
|
268
|
-
function
|
268
|
+
function tn(t, e, n, s, o, r, c, l, f) {
|
269
269
|
let g = 0, m = 0;
|
270
|
-
const
|
271
|
-
if (n === s && !
|
270
|
+
const b = !!(n < 0 && f);
|
271
|
+
if (n === s && !b)
|
272
272
|
return ne(
|
273
273
|
{ height: g, width: m },
|
274
274
|
t,
|
275
275
|
o,
|
276
276
|
c,
|
277
|
-
|
277
|
+
b
|
278
278
|
);
|
279
|
-
const [
|
280
|
-
if (
|
281
|
-
const [et,
|
282
|
-
g +=
|
279
|
+
const [M, O, F, y] = sn(e, n, s, f);
|
280
|
+
if (b) {
|
281
|
+
const [et, ut] = Ue(l, f);
|
282
|
+
g += ut, m += et;
|
283
283
|
}
|
284
284
|
const {
|
285
285
|
scrollElement: p,
|
286
|
-
beforeMargin:
|
287
|
-
afterMargin:
|
288
|
-
distance:
|
289
|
-
gap:
|
290
|
-
} =
|
286
|
+
beforeMargin: T,
|
287
|
+
afterMargin: R,
|
288
|
+
distance: w,
|
289
|
+
gap: P
|
290
|
+
} = B(t), [X, Z] = Zt(l, P), [
|
291
291
|
_,
|
292
292
|
H,
|
293
|
-
|
294
|
-
] =
|
295
|
-
|
296
|
-
O,
|
293
|
+
$
|
294
|
+
] = rn(
|
295
|
+
T,
|
297
296
|
R,
|
298
|
-
M
|
297
|
+
M,
|
298
|
+
O == null ? void 0 : O.previousElementSibling,
|
299
299
|
y,
|
300
|
-
|
301
|
-
|
302
|
-
), [
|
303
|
-
|
304
|
-
|
305
|
-
|
300
|
+
Z,
|
301
|
+
b
|
302
|
+
), [k, q, J] = on(
|
303
|
+
T,
|
304
|
+
R,
|
305
|
+
w,
|
306
306
|
F,
|
307
307
|
X,
|
308
|
-
|
309
|
-
),
|
308
|
+
Z
|
309
|
+
), I = nn(
|
310
310
|
q,
|
311
|
+
k,
|
311
312
|
J,
|
312
|
-
K,
|
313
313
|
H,
|
314
314
|
_,
|
315
315
|
X
|
316
|
-
), z =
|
316
|
+
), z = b ? l[p] : en(p, l, r), Y = (y ? I - $ : $ - I) - z;
|
317
317
|
return t === tt ? g += Y : t === V && (m += Y), ne(
|
318
318
|
{ height: g, width: m },
|
319
319
|
t,
|
320
320
|
o,
|
321
321
|
c,
|
322
|
-
|
322
|
+
b
|
323
323
|
);
|
324
324
|
}
|
325
|
-
const
|
325
|
+
const en = (t, e, n) => {
|
326
326
|
const s = e[t], o = n[t];
|
327
327
|
return s - o;
|
328
|
-
},
|
328
|
+
}, nn = (t, e, n, s, o, r) => {
|
329
329
|
const c = Math.max(e, o);
|
330
330
|
return Math.max(n, s) + t + c + r;
|
331
|
-
},
|
331
|
+
}, sn = (t, e, n, s) => {
|
332
332
|
const o = e < n, [r, c] = [e, n].toSorted(
|
333
|
-
(m,
|
334
|
-
),
|
333
|
+
(m, b) => m - b
|
334
|
+
), l = t[e] ?? s, f = t[n];
|
335
335
|
let g = o ? t.slice(r + 1, c + 1) : t.slice(r, c);
|
336
336
|
return r < 0 && s && (g = t.slice(r + 1, c)), [
|
337
|
-
|
337
|
+
l,
|
338
338
|
f,
|
339
339
|
g,
|
340
340
|
o
|
341
341
|
];
|
342
|
-
},
|
342
|
+
}, on = (t, e, n, s, o, r) => {
|
343
343
|
if (s.length == 0)
|
344
344
|
return [0, 0, 0];
|
345
345
|
const c = L(s[0], t);
|
346
|
-
let
|
346
|
+
let l = 0, f = -c;
|
347
347
|
for (const [g, m] of s.entries()) {
|
348
|
-
const
|
349
|
-
r && (
|
348
|
+
const b = m.getBoundingClientRect()[n], M = L(m, t);
|
349
|
+
r && (l += M), r && g > 0 ? l += o : l = Math.max(l, M), f += l + b, l = L(m, e);
|
350
350
|
}
|
351
|
-
return [c, f,
|
351
|
+
return [c, f, l];
|
352
352
|
}, ne = (t, e, n, s, o) => {
|
353
|
-
const { scroll: r, distance: c } =
|
353
|
+
const { scroll: r, distance: c } = B(e), l = window[r], f = n[r], g = o ? 0 : f - 2 * l + s[r];
|
354
354
|
return t[c] += g, t;
|
355
|
-
},
|
356
|
-
const
|
357
|
-
return
|
355
|
+
}, rn = (t, e, n, s, o, r, c) => {
|
356
|
+
const l = o ? n.previousElementSibling : s;
|
357
|
+
return cn(
|
358
358
|
t,
|
359
359
|
e,
|
360
|
-
|
360
|
+
l,
|
361
361
|
n,
|
362
362
|
r,
|
363
363
|
c
|
364
364
|
);
|
365
|
-
},
|
365
|
+
}, cn = (t, e, n, s, o, r) => {
|
366
366
|
if (o)
|
367
367
|
return [0, 0, 0];
|
368
368
|
const c = L(
|
369
369
|
r ? null : n,
|
370
370
|
e
|
371
|
-
),
|
372
|
-
let f = Math.max(c,
|
373
|
-
return [c,
|
371
|
+
), l = L(s, t);
|
372
|
+
let f = Math.max(c, l);
|
373
|
+
return [c, l, f];
|
374
374
|
}, kt = (t, e, n, s = () => !0) => {
|
375
375
|
const o = new MutationObserver((r) => {
|
376
376
|
if (r = r.filter(s), r.length > 0) {
|
@@ -379,49 +379,49 @@ const nn = (t, e, n) => {
|
|
379
379
|
}
|
380
380
|
});
|
381
381
|
return o.observe(e, n), o;
|
382
|
-
},
|
382
|
+
}, an = (t, e, n) => {
|
383
383
|
n != 0 && (e === "vertical" ? t.scrollBy(0, n) : t.scrollBy(n, 0));
|
384
|
-
},
|
385
|
-
const { scrollDistance: s, clientDistance: o, scrollElement: r } =
|
384
|
+
}, ln = (t, e, n) => {
|
385
|
+
const { scrollDistance: s, clientDistance: o, scrollElement: r } = B(t);
|
386
386
|
return n[r] / (e[s] - e[o]);
|
387
|
-
},
|
388
|
-
let s =
|
387
|
+
}, un = "startDrag", ge = "cubic-bezier(0.2, 0, 0, 1)", pe = 50, qt = (t) => it(t) ? t.classList.contains(at) : !1, fn = (t, e, n) => {
|
388
|
+
let s = yt(
|
389
389
|
e,
|
390
|
-
|
390
|
+
un,
|
391
391
|
n,
|
392
392
|
t
|
393
393
|
);
|
394
|
-
const o =
|
394
|
+
const o = ke(t, n), { distance: r } = B(n);
|
395
395
|
s[r] -= o;
|
396
|
-
const [c,
|
397
|
-
return s[
|
398
|
-
},
|
399
|
-
const n = t == V ? tt : V, { distance: s, getRect: o } =
|
396
|
+
const [c, l] = dn(n, e);
|
397
|
+
return s[l] = c, s;
|
398
|
+
}, dn = (t, e) => {
|
399
|
+
const n = t == V ? tt : V, { distance: s, getRect: o } = B(n);
|
400
400
|
return [
|
401
401
|
o(e)[s],
|
402
402
|
s
|
403
403
|
];
|
404
404
|
}, ht = (t, e, n) => {
|
405
|
-
|
406
|
-
},
|
405
|
+
Ne(t, e, n), t.style.minWidth = `${n}px`;
|
406
|
+
}, gn = (t, e, n) => (s) => {
|
407
407
|
e.contains(t) && (ht(t, n.height, n.width), s.disconnect());
|
408
|
-
},
|
408
|
+
}, pn = (t, e) => {
|
409
409
|
if (!e)
|
410
410
|
return;
|
411
|
-
const { droppable: n, config: s, scroll: o } = t, { direction: r } = s, c =
|
412
|
-
c && (n[g] = n[
|
411
|
+
const { droppable: n, config: s, scroll: o } = t, { direction: r } = s, c = ln(s.direction, n, o) > 0.99, { scrollDistance: l, clientDistance: f, scrollElement: g } = B(r);
|
412
|
+
c && (n[g] = n[l] - n[f]);
|
413
413
|
}, he = (t, e, n, s) => {
|
414
414
|
if (!n)
|
415
415
|
return;
|
416
|
-
const { droppable: o, config: r } = n, { direction: c, animationDuration:
|
417
|
-
if (
|
416
|
+
const { droppable: o, config: r } = n, { direction: c, animationDuration: l } = r;
|
417
|
+
if (pn(n, e), o.querySelector(`.${at}`) || !t)
|
418
418
|
return;
|
419
419
|
var f = t.tagName == "LI" ? "DIV" : t.tagName, g = document.createElement(f);
|
420
|
-
st(g,
|
421
|
-
const m =
|
422
|
-
return
|
420
|
+
st(g, at), ht(g, 0, 0);
|
421
|
+
const m = fn(o, t, c);
|
422
|
+
return Pt(
|
423
423
|
g,
|
424
|
-
|
424
|
+
l,
|
425
425
|
ge,
|
426
426
|
"width, min-width, height"
|
427
427
|
), [g, m, o];
|
@@ -429,38 +429,38 @@ const nn = (t, e, n) => {
|
|
429
429
|
const r = he(t, n, s);
|
430
430
|
if (!r)
|
431
431
|
return;
|
432
|
-
const [c,
|
433
|
-
e.isSameNode(f) && ht(c,
|
434
|
-
|
432
|
+
const [c, l, f] = r;
|
433
|
+
e.isSameNode(f) && ht(c, l.height, l.width), kt(
|
434
|
+
gn(c, f, l),
|
435
435
|
f,
|
436
436
|
{
|
437
437
|
childList: !0,
|
438
438
|
subtree: !0
|
439
439
|
}
|
440
440
|
), f.appendChild(c);
|
441
|
-
},
|
441
|
+
}, hn = (t, e, n) => {
|
442
442
|
const s = he(t, e, n);
|
443
443
|
if (!s)
|
444
444
|
return;
|
445
445
|
const [o, r, c] = s;
|
446
|
-
c.appendChild(o),
|
447
|
-
},
|
446
|
+
c.appendChild(o), mn(o, r);
|
447
|
+
}, mn = (t, e) => requestAnimationFrame(() => {
|
448
448
|
ht(t, e.height, e.width), requestAnimationFrame(() => {
|
449
|
-
|
449
|
+
Pt(
|
450
450
|
t,
|
451
451
|
0,
|
452
452
|
ge,
|
453
453
|
"width, min-width, height"
|
454
454
|
);
|
455
455
|
});
|
456
|
-
}),
|
456
|
+
}), Sn = (t, e, n, s, o = !0) => {
|
457
457
|
if (n) {
|
458
458
|
var r = document.querySelectorAll(
|
459
|
-
`${gt(n)} > .${
|
459
|
+
`${gt(n)} > .${at}`
|
460
460
|
);
|
461
461
|
r.forEach((c) => {
|
462
|
-
const
|
463
|
-
if (
|
462
|
+
const l = c.parentElement;
|
463
|
+
if (l != null && l.isSameNode(e) || !o && (l != null && l.isSameNode(t)))
|
464
464
|
return;
|
465
465
|
ht(c, 0, 0), setTimeout(() => {
|
466
466
|
var g;
|
@@ -468,8 +468,8 @@ const nn = (t, e, n) => {
|
|
468
468
|
}, s + pe);
|
469
469
|
});
|
470
470
|
}
|
471
|
-
},
|
472
|
-
var s = t.querySelectorAll(`.${
|
471
|
+
}, vt = (t, e, n = !1) => {
|
472
|
+
var s = t.querySelectorAll(`.${at}`);
|
473
473
|
s.forEach((o) => {
|
474
474
|
const r = o;
|
475
475
|
n ? (ht(r, 0, 0), setTimeout(() => {
|
@@ -477,255 +477,255 @@ const nn = (t, e, n) => {
|
|
477
477
|
}, e + pe)) : t.removeChild(o);
|
478
478
|
});
|
479
479
|
}, Dn = 50;
|
480
|
-
function
|
480
|
+
function vn(t, e, n, s, o, r) {
|
481
481
|
let c = e;
|
482
482
|
const {
|
483
|
-
direction:
|
483
|
+
direction: l,
|
484
484
|
handlerSelector: f,
|
485
485
|
onRemoveAtEvent: g,
|
486
486
|
animationDuration: m,
|
487
|
-
delayBeforeInsert:
|
488
|
-
draggingClass:
|
489
|
-
} = t,
|
490
|
-
if (!
|
487
|
+
delayBeforeInsert: b,
|
488
|
+
draggingClass: M
|
489
|
+
} = t, O = (u, a, h, D, C) => {
|
490
|
+
if (!D)
|
491
491
|
return;
|
492
|
-
const { droppable:
|
492
|
+
const { droppable: E, config: v } = D, A = yt(
|
493
493
|
u,
|
494
|
-
|
495
|
-
|
496
|
-
|
494
|
+
a,
|
495
|
+
v.direction,
|
496
|
+
E
|
497
497
|
);
|
498
|
-
|
498
|
+
ze(a) ? Z(
|
499
499
|
u,
|
500
|
-
|
500
|
+
a,
|
501
501
|
A,
|
502
502
|
h,
|
503
|
-
|
503
|
+
D,
|
504
504
|
C
|
505
|
-
) :
|
505
|
+
) : T(
|
506
506
|
u,
|
507
|
-
|
507
|
+
a,
|
508
508
|
A,
|
509
|
-
|
509
|
+
D
|
510
510
|
);
|
511
|
-
}, F = (u,
|
512
|
-
const
|
513
|
-
|
511
|
+
}, F = (u, a, h, D, C) => {
|
512
|
+
const E = yt(
|
513
|
+
a,
|
514
514
|
"insert",
|
515
515
|
t.direction,
|
516
516
|
h
|
517
|
-
), { onInsertEvent:
|
517
|
+
), { onInsertEvent: v } = t, A = ie(h);
|
518
518
|
for (const [N, x] of A.entries())
|
519
|
-
nt(x, U) && N >= u && X(x,
|
519
|
+
nt(x, U) && N >= u && X(x, E);
|
520
520
|
C(), setTimeout(() => {
|
521
|
-
|
522
|
-
},
|
523
|
-
}, y = (u,
|
521
|
+
v(u, D), me(u, h, t), et(a), W(a, n), vt(n, 0, !0);
|
522
|
+
}, b);
|
523
|
+
}, y = (u, a, h, D) => {
|
524
524
|
if (!h || !h.droppable || !h.config)
|
525
525
|
return;
|
526
|
-
const { droppable: C, config:
|
527
|
-
let [
|
528
|
-
|
529
|
-
const A =
|
530
|
-
|
526
|
+
const { droppable: C, config: E } = h;
|
527
|
+
let [v] = Mt(a, C);
|
528
|
+
v = [a, ...v].toReversed();
|
529
|
+
const A = yt(
|
530
|
+
a,
|
531
531
|
"remove",
|
532
|
-
|
532
|
+
E.direction,
|
533
533
|
C
|
534
534
|
);
|
535
|
-
for (const [N, x] of
|
536
|
-
N >= u && (
|
537
|
-
|
535
|
+
for (const [N, x] of v.entries())
|
536
|
+
N >= u && (P(x, A), setTimeout(() => {
|
537
|
+
D(x);
|
538
538
|
}, m));
|
539
539
|
}, p = (u) => {
|
540
|
-
|
540
|
+
vt(n, m, !0), setTimeout(() => {
|
541
541
|
et(u), W(u, n);
|
542
542
|
}, m);
|
543
|
-
},
|
544
|
-
const { config: C, droppable:
|
545
|
-
|
543
|
+
}, T = (u, a, h, D) => {
|
544
|
+
const { config: C, droppable: E } = D, [v] = Mt(u, E), A = pt(u, E);
|
545
|
+
v.length == 0 && w(
|
546
546
|
h,
|
547
547
|
1,
|
548
548
|
C.direction,
|
549
|
-
|
549
|
+
v
|
550
550
|
);
|
551
|
-
for (const [N, x] of
|
551
|
+
for (const [N, x] of v.entries()) {
|
552
552
|
if (!nt(x, U))
|
553
553
|
continue;
|
554
|
-
const
|
554
|
+
const G = R(
|
555
555
|
C.direction,
|
556
556
|
u,
|
557
557
|
x,
|
558
558
|
h
|
559
559
|
);
|
560
|
-
if (!A &&
|
561
|
-
h =
|
560
|
+
if (!A && G)
|
561
|
+
h = G;
|
562
562
|
else if (!A)
|
563
563
|
continue;
|
564
|
-
const
|
565
|
-
|
564
|
+
const K = v.length - N;
|
565
|
+
w(
|
566
566
|
h,
|
567
|
-
|
567
|
+
K,
|
568
568
|
C.direction,
|
569
|
-
|
570
|
-
),
|
569
|
+
v
|
570
|
+
), a === fe ? P(x, h) : a === Nt && X(x, h);
|
571
571
|
}
|
572
|
-
},
|
573
|
-
const { before: C, distance:
|
574
|
-
return
|
575
|
-
},
|
576
|
-
const C =
|
577
|
-
(
|
578
|
-
).length, { distance:
|
579
|
-
u[
|
580
|
-
},
|
581
|
-
const { width: h, height:
|
582
|
-
|
583
|
-
}, X = (u,
|
584
|
-
const { width: h, height:
|
585
|
-
|
586
|
-
},
|
587
|
-
const { droppable:
|
572
|
+
}, R = (u, a, h, D) => {
|
573
|
+
const { before: C, distance: E, axis: v, getRect: A } = B(u), N = A(a), x = A(h), G = N[C], K = x[C], mt = x[E], ft = K + mt / 2, St = Be(h)[v], rt = ft - St;
|
574
|
+
return G > rt ? { height: 0, width: 0 } : D;
|
575
|
+
}, w = (u, a, h, D) => {
|
576
|
+
const C = D.filter(
|
577
|
+
(v) => nt(v, U)
|
578
|
+
).length, { distance: E } = B(h);
|
579
|
+
u[E] == 0 ? c = Math.max(c, a) : c = Math.min(c, a - 1), c = Math.min(c, C);
|
580
|
+
}, P = (u, a) => {
|
581
|
+
const { width: h, height: D } = a;
|
582
|
+
Et(u, D, h);
|
583
|
+
}, X = (u, a) => {
|
584
|
+
const { width: h, height: D } = a;
|
585
|
+
Et(u, D, h), Pt(u, m, de);
|
586
|
+
}, Z = (u, a, h, D, C, E) => {
|
587
|
+
const { droppable: v, scroll: A, config: N } = C, [x, G] = Mt(
|
588
588
|
u,
|
589
|
-
|
590
|
-
),
|
591
|
-
|
592
|
-
const [
|
589
|
+
v
|
590
|
+
), K = x.toReversed(), mt = G === -1 ? K.length : G;
|
591
|
+
K.splice(mt, 0, u);
|
592
|
+
const [ft, St, rt] = _(
|
593
593
|
u,
|
594
|
-
|
595
|
-
|
596
|
-
|
594
|
+
G,
|
595
|
+
K,
|
596
|
+
v
|
597
597
|
);
|
598
|
-
h =
|
598
|
+
h = yt(
|
599
599
|
u,
|
600
|
-
|
600
|
+
a,
|
601
601
|
N.direction,
|
602
602
|
n,
|
603
|
-
|
604
|
-
|
603
|
+
ft,
|
604
|
+
St
|
605
605
|
);
|
606
|
-
const
|
606
|
+
const $t = xe(), xt = tn(
|
607
607
|
N.direction,
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
608
|
+
K,
|
609
|
+
G,
|
610
|
+
rt,
|
611
|
+
$t,
|
612
612
|
A,
|
613
|
-
|
614
|
-
|
613
|
+
D,
|
614
|
+
v,
|
615
615
|
u
|
616
616
|
);
|
617
617
|
x.length == 0 && H(
|
618
618
|
void 0,
|
619
619
|
h,
|
620
620
|
u,
|
621
|
-
|
621
|
+
xt
|
622
622
|
);
|
623
|
-
for (const [
|
623
|
+
for (const [Gt, wt] of x.toReversed().entries()) {
|
624
624
|
let Bt = h;
|
625
|
-
|
626
|
-
|
625
|
+
rt - 1 >= Gt && (Bt = { height: 0, width: 0 }), a === jt && !nt(wt, at) && H(
|
626
|
+
wt,
|
627
627
|
Bt,
|
628
628
|
u,
|
629
|
-
|
629
|
+
xt
|
630
630
|
);
|
631
631
|
}
|
632
|
-
|
633
|
-
|
632
|
+
$(
|
633
|
+
rt,
|
634
634
|
u,
|
635
635
|
N,
|
636
|
-
|
637
|
-
|
636
|
+
v,
|
637
|
+
E
|
638
638
|
);
|
639
|
-
}, _ = (u,
|
640
|
-
const
|
639
|
+
}, _ = (u, a, h, D) => {
|
640
|
+
const E = pt(u, D) ? a : c, v = () => a < E ? [E, E + 1] : a > E ? [E - 1, E] : [E - 1, E + 1], [A, N] = v(), x = h[A] ?? null, G = h[N] ?? null;
|
641
641
|
return [
|
642
642
|
x,
|
643
|
-
|
644
|
-
|
643
|
+
G,
|
644
|
+
E
|
645
645
|
];
|
646
|
-
}, H = (u,
|
647
|
-
|
646
|
+
}, H = (u, a, h, D) => {
|
647
|
+
Et(u, a.height, a.width), Et(
|
648
648
|
h,
|
649
|
-
|
650
|
-
|
649
|
+
D.height,
|
650
|
+
D.width
|
651
651
|
);
|
652
|
-
},
|
653
|
-
const { onInsertEvent:
|
654
|
-
st(
|
655
|
-
if (
|
652
|
+
}, $ = (u, a, h, D, C) => {
|
653
|
+
const { onInsertEvent: E, onDragEnd: v } = h;
|
654
|
+
st(a, Vt), J(a, n, D, () => {
|
655
|
+
if (Ct(a, Vt), C != null) {
|
656
656
|
const A = g(C, !0);
|
657
|
-
A != null && (
|
657
|
+
A != null && (E(u, A, !0), v({ value: A, index: u })), q(a), k();
|
658
658
|
}
|
659
659
|
});
|
660
|
-
},
|
660
|
+
}, k = () => {
|
661
661
|
if (s) {
|
662
662
|
var u = document.querySelectorAll(
|
663
663
|
`${gt(s)} > .${U}`
|
664
664
|
);
|
665
|
-
for (const
|
666
|
-
Y(
|
665
|
+
for (const a of u)
|
666
|
+
Y(a);
|
667
667
|
}
|
668
668
|
}, q = (u) => {
|
669
669
|
setTimeout(() => {
|
670
|
-
|
670
|
+
Ct(u, M);
|
671
671
|
}, Dn);
|
672
|
-
},
|
672
|
+
}, J = (u, a, h, D) => {
|
673
673
|
setTimeout(() => {
|
674
|
-
|
674
|
+
D && D(), I(a, h), z(h), et(u), W(u, a), W(u, h);
|
675
675
|
}, m);
|
676
|
-
},
|
677
|
-
u.isSameNode(
|
676
|
+
}, I = (u, a) => {
|
677
|
+
u.isSameNode(a) ? vt(u, m) : (vt(u, m, !0), vt(a, m));
|
678
678
|
}, z = (u) => {
|
679
679
|
if (n.isSameNode(u))
|
680
680
|
return;
|
681
|
-
var [
|
682
|
-
if (!
|
681
|
+
var [a] = n.querySelectorAll(`.${at}`);
|
682
|
+
if (!a)
|
683
683
|
return;
|
684
|
-
const { distance: h } =
|
685
|
-
|
686
|
-
}, W = (u,
|
687
|
-
const [h] =
|
688
|
-
for (const
|
689
|
-
Y(
|
684
|
+
const { distance: h } = B(l);
|
685
|
+
it(a) && (a.style[h] = "0px");
|
686
|
+
}, W = (u, a) => {
|
687
|
+
const [h] = Mt(u, a);
|
688
|
+
for (const D of [...h, u])
|
689
|
+
Y(D);
|
690
690
|
}, Y = (u) => {
|
691
|
-
|
691
|
+
it(u) && (u.style.transition = "", u.style.transform = "");
|
692
692
|
}, et = (u) => {
|
693
693
|
r(), ot(u, !1), u.style.transform = "", u.style.transition = "", u.style.top = "", u.style.left = "", ue(u, {
|
694
694
|
fixedHeight: "",
|
695
695
|
fixedWidth: ""
|
696
696
|
});
|
697
|
-
},
|
698
|
-
const h =
|
699
|
-
bt(document.body, oe, u), bt(h ||
|
700
|
-
}, ot = (u,
|
701
|
-
bt(u,
|
697
|
+
}, ut = (u, a) => {
|
698
|
+
const h = a.querySelector(f);
|
699
|
+
bt(document.body, oe, u), bt(h || a, Wt, u);
|
700
|
+
}, ot = (u, a) => {
|
701
|
+
bt(u, Ft, a), ut(a, u), o.toggleGrabClass(!a);
|
702
702
|
};
|
703
703
|
return [
|
704
|
-
|
704
|
+
O,
|
705
705
|
y,
|
706
706
|
F,
|
707
707
|
p,
|
708
708
|
ot
|
709
709
|
];
|
710
710
|
}
|
711
|
-
const
|
711
|
+
const bn = (t) => t.addedNodes.values().filter((n) => !qt(n)).toArray().length > 0, me = (t, e, n) => {
|
712
712
|
const { insertingFromClass: s, animationDuration: o } = n, r = kt(() => {
|
713
|
-
const
|
714
|
-
st(
|
715
|
-
|
713
|
+
const l = ie(e)[t];
|
714
|
+
st(l, s), st(l, Kt), setTimeout(() => {
|
715
|
+
Ct(l, Kt), Ct(l, s), r.disconnect();
|
716
716
|
}, o);
|
717
717
|
}, e, {
|
718
718
|
childList: !0
|
719
|
-
},
|
720
|
-
},
|
719
|
+
}, bn);
|
720
|
+
}, Nn = (t, e, n, s) => {
|
721
721
|
if (!e)
|
722
722
|
return;
|
723
723
|
const { onInsertEvent: o, delayBeforeInsert: r } = t;
|
724
724
|
setTimeout(() => {
|
725
725
|
o(n, s), me(n, e, t);
|
726
726
|
}, r);
|
727
|
-
},
|
728
|
-
const n = (
|
727
|
+
}, Tn = (t, e) => {
|
728
|
+
const n = (l, f) => t.removeAtEvent(l, f), s = (l, f, g) => t.insertEvent(l, f, g), o = () => t.getLength(), r = (l) => t.getValue(l), c = (l) => l;
|
729
729
|
return {
|
730
730
|
direction: (e == null ? void 0 : e.direction) ?? tt,
|
731
731
|
handlerSelector: (e == null ? void 0 : e.handlerSelector) ?? U,
|
@@ -748,7 +748,7 @@ const Tn = (t) => t.addedNodes.values().filter((n) => !Ht(n)).toArray().length >
|
|
748
748
|
delayBeforeInsert: (e == null ? void 0 : e.delayBeforeInsert) ?? 200,
|
749
749
|
mapFrom: (e == null ? void 0 : e.mapFrom) ?? c
|
750
750
|
};
|
751
|
-
},
|
751
|
+
}, En = (t, e) => {
|
752
752
|
const { config: n, droppable: s } = t, { onInsertEvent: o, onDragEnd: r } = n;
|
753
753
|
return {
|
754
754
|
...n,
|
@@ -758,7 +758,7 @@ const Tn = (t) => t.addedNodes.values().filter((n) => !Ht(n)).toArray().length >
|
|
758
758
|
},
|
759
759
|
onInsertEvent: (f, g) => o(f, e(g, s), !0)
|
760
760
|
};
|
761
|
-
},
|
761
|
+
}, yn = (t) => {
|
762
762
|
let e = { offsetX: 0, offsetY: 0 }, n = { top: 0, left: 0 }, s = { x: 0, y: 0 };
|
763
763
|
const o = (f) => {
|
764
764
|
t.style.transform = `translate( ${f.x}px, ${f.y}px)`;
|
@@ -766,67 +766,67 @@ const Tn = (t) => t.addedNodes.values().filter((n) => !Ht(n)).toArray().length >
|
|
766
766
|
t.style.top = `${f.top}px`, t.style.left = `${f.left}px`;
|
767
767
|
};
|
768
768
|
return [
|
769
|
-
(f, g, m,
|
770
|
-
const
|
769
|
+
(f, g, m, b) => {
|
770
|
+
const M = (y) => {
|
771
771
|
const {
|
772
772
|
beforeMargin: p,
|
773
|
-
borderBeforeWidth:
|
774
|
-
before:
|
775
|
-
offset:
|
776
|
-
scroll:
|
773
|
+
borderBeforeWidth: T,
|
774
|
+
before: R,
|
775
|
+
offset: w,
|
776
|
+
scroll: P,
|
777
777
|
page: X,
|
778
|
-
inner:
|
778
|
+
inner: Z,
|
779
779
|
distance: _,
|
780
780
|
axis: H,
|
781
|
-
getRect:
|
782
|
-
} =
|
783
|
-
if (Y >= q -
|
784
|
-
const ot = Y - n[
|
785
|
-
return
|
781
|
+
getRect: $
|
782
|
+
} = B(y), k = m[X], q = window[P], J = window[Z], I = $(f)[_], z = L(f, T), W = L(f, p), Y = k - e[w], et = ce(f, y);
|
783
|
+
if (Y >= q - I / 2 && Y <= q + J) {
|
784
|
+
const ot = Y - n[R] - z - W - q - et;
|
785
|
+
return O(y), ot;
|
786
786
|
}
|
787
787
|
return s[H];
|
788
|
-
},
|
789
|
-
if (f && nt(f,
|
790
|
-
const { before: p, distance:
|
788
|
+
}, O = (y) => {
|
789
|
+
if (f && nt(f, Ft) && y === b) {
|
790
|
+
const { before: p, distance: T, axis: R, getRect: w } = B(b), P = w(f)[T], X = w(g), Z = n[p] - X[p] + s[R], H = X[T] - P, $ = Z / H, k = P / H, q = 0.1, J = 0.2, I = 0.8;
|
791
791
|
let z = 0;
|
792
792
|
const W = pt(f, g);
|
793
|
-
!W &&
|
794
|
-
const Y = q *
|
795
|
-
|
793
|
+
!W && $ < J && $ > -k ? z = $ / J - 1 : !W && $ > I && $ < 1 + k && (z = 1 / (1 - I) * ($ - I));
|
794
|
+
const Y = q * P * z;
|
795
|
+
an(g, b, Y);
|
796
796
|
}
|
797
797
|
}, F = (y) => {
|
798
|
-
const { axis: p } =
|
799
|
-
s[p] =
|
798
|
+
const { axis: p } = B(y);
|
799
|
+
s[p] = M(y), o(s);
|
800
800
|
};
|
801
801
|
F(V), F(tt);
|
802
802
|
},
|
803
803
|
(f, g) => {
|
804
|
-
const [m,
|
804
|
+
const [m, b, M, O] = xn(
|
805
805
|
f,
|
806
806
|
g,
|
807
807
|
t
|
808
808
|
);
|
809
809
|
n = {
|
810
810
|
top: m,
|
811
|
-
left:
|
812
|
-
}, r(n), e = { offsetX:
|
811
|
+
left: b
|
812
|
+
}, r(n), e = { offsetX: M, offsetY: O };
|
813
813
|
}
|
814
814
|
];
|
815
815
|
}, Rt = (t, e, n) => {
|
816
|
-
const { borderBeforeWidth: s, before: o, getRect: r } =
|
816
|
+
const { borderBeforeWidth: s, before: o, getRect: r } = B(t);
|
817
817
|
return r(e)[o] - r(n)[o] - L(n, s);
|
818
|
-
},
|
819
|
-
let { offsetX: n, offsetY: s, target: o } = t, r =
|
818
|
+
}, Cn = (t, e) => {
|
819
|
+
let { offsetX: n, offsetY: s, target: o } = t, r = An(o, e);
|
820
820
|
const c = o;
|
821
821
|
return c && r && !c.isSameNode(r) && (n += Rt(V, c, r), s += Rt(tt, c, r)), r && e != o && (n += Rt(V, r, e), s += Rt(tt, r, e)), [n, s];
|
822
|
-
},
|
822
|
+
}, An = (t, e) => {
|
823
823
|
const n = t == null ? void 0 : t.closest(`.${Lt}`);
|
824
824
|
return n && n.isSameNode(e) ? t : n;
|
825
825
|
}, se = (t, e, n, s) => {
|
826
|
-
const { offset: o, beforeMargin: r, page: c, borderBeforeWidth:
|
827
|
-
return e[c] - s[o] - L(n, r) - L(n,
|
828
|
-
},
|
829
|
-
const [s, o] =
|
826
|
+
const { offset: o, beforeMargin: r, page: c, borderBeforeWidth: l, scroll: f } = B(t), g = ce(n, t);
|
827
|
+
return e[c] - s[o] - L(n, r) - L(n, l) - window[f] - g;
|
828
|
+
}, xn = (t, e, n) => {
|
829
|
+
const [s, o] = Cn(t, n);
|
830
830
|
return [
|
831
831
|
se(tt, t, e, {
|
832
832
|
offsetX: s,
|
@@ -853,7 +853,7 @@ const Tn = (t) => t.addedNodes.values().filter((n) => !Ht(n)).toArray().length >
|
|
853
853
|
static updateScrolls(e, n) {
|
854
854
|
for (const s of Q.configs) {
|
855
855
|
const { droppable: o } = s;
|
856
|
-
(n &&
|
856
|
+
(n && Ce(o, n) || o.isSameNode(e)) && (s.scroll = Ut(o));
|
857
857
|
}
|
858
858
|
}
|
859
859
|
static getConfig(e) {
|
@@ -862,36 +862,36 @@ const Tn = (t) => t.addedNodes.values().filter((n) => !Ht(n)).toArray().length >
|
|
862
862
|
);
|
863
863
|
}
|
864
864
|
};
|
865
|
-
|
865
|
+
j(Q, "configs", []), j(Q, "removeObsoleteConfigs", () => {
|
866
866
|
const e = Q.configs.filter(
|
867
867
|
({ droppable: n }) => document.contains(n)
|
868
868
|
);
|
869
869
|
Q.configs = e;
|
870
870
|
});
|
871
|
-
let
|
871
|
+
let lt = Q;
|
872
872
|
class wn {
|
873
873
|
constructor(e, n, s, o, r, c) {
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
this.parent = s, this.draggableElement = e, this.groupClass = n, this.dragEvent = o, this.mapFrom = c, this.initial = s ?
|
874
|
+
j(this, "initial");
|
875
|
+
j(this, "current");
|
876
|
+
j(this, "parent");
|
877
|
+
j(this, "draggableElement");
|
878
|
+
j(this, "groupClass");
|
879
|
+
j(this, "dragEvent");
|
880
|
+
j(this, "changeDroppable");
|
881
|
+
j(this, "mapFrom");
|
882
|
+
this.parent = s, this.draggableElement = e, this.groupClass = n, this.dragEvent = o, this.mapFrom = c, this.initial = s ? lt.getConfig(s) : void 0, this.changeDroppable = r;
|
883
883
|
}
|
884
884
|
getDraggableAncestor(e, n, s) {
|
885
885
|
return document.elementsFromPoint(e, n).filter((o) => !o.isSameNode(s));
|
886
886
|
}
|
887
887
|
getElementBelow(e, n, s = !0) {
|
888
888
|
const o = (c) => {
|
889
|
-
const [
|
889
|
+
const [l] = c.getDraggableAncestor(
|
890
890
|
n.clientX,
|
891
891
|
n.clientY,
|
892
892
|
e
|
893
893
|
);
|
894
|
-
return
|
894
|
+
return l;
|
895
895
|
};
|
896
896
|
let r = null;
|
897
897
|
return s ? (e.hidden = !0, r = o(this), e.hidden = !1) : r = o(this), r;
|
@@ -921,11 +921,11 @@ class wn {
|
|
921
921
|
});
|
922
922
|
}
|
923
923
|
getConfigFrom(e) {
|
924
|
-
const n =
|
924
|
+
const n = lt.getConfig(e);
|
925
925
|
if (n)
|
926
926
|
return e.isSameNode(this.parent) ? n : {
|
927
927
|
...n,
|
928
|
-
config:
|
928
|
+
config: En(n, this.mapFrom)
|
929
929
|
};
|
930
930
|
}
|
931
931
|
getCurrentConfig(e) {
|
@@ -937,7 +937,7 @@ class wn {
|
|
937
937
|
))
|
938
938
|
return this.current;
|
939
939
|
const s = this.getCurrent(n, e);
|
940
|
-
return s ? (
|
940
|
+
return s ? (it(s) && !s.onscroll && this.setOnScroll(s), this.getConfigFrom(s)) : this.getConfigFrom(this.parent);
|
941
941
|
}
|
942
942
|
updateConfig(e) {
|
943
943
|
const n = this.current;
|
@@ -948,32 +948,32 @@ class wn {
|
|
948
948
|
return !this.getCurrent(s, e, n);
|
949
949
|
}
|
950
950
|
}
|
951
|
-
function
|
951
|
+
function Bn(t, e, n, s, o) {
|
952
952
|
const {
|
953
953
|
handlerSelector: r,
|
954
954
|
isDraggable: c,
|
955
|
-
droppableGroup:
|
955
|
+
droppableGroup: l,
|
956
956
|
animationDuration: f,
|
957
957
|
delayBeforeRemove: g,
|
958
958
|
draggingClass: m,
|
959
|
-
removingClass:
|
960
|
-
onRemoveAtEvent:
|
961
|
-
droppableClass:
|
959
|
+
removingClass: b,
|
960
|
+
onRemoveAtEvent: M,
|
961
|
+
droppableClass: O,
|
962
962
|
onDragStart: F
|
963
|
-
} = n, y =
|
964
|
-
let p = 0,
|
963
|
+
} = n, y = At(l).map((i) => `droppable-group-${i}`).join(" ");
|
964
|
+
let p = 0, T = {
|
965
965
|
scrollX: 0,
|
966
966
|
scrollY: 0
|
967
|
-
},
|
968
|
-
const [X,
|
967
|
+
}, R = { pageX: 0, pageY: 0 }, w, P;
|
968
|
+
const [X, Z] = yn(
|
969
969
|
t
|
970
970
|
), [
|
971
971
|
_,
|
972
972
|
H,
|
973
|
-
|
974
|
-
|
973
|
+
$,
|
974
|
+
k,
|
975
975
|
q
|
976
|
-
] =
|
976
|
+
] = vn(
|
977
977
|
n,
|
978
978
|
e,
|
979
979
|
s,
|
@@ -981,57 +981,60 @@ function Rn(t, e, n, s, o) {
|
|
981
981
|
o,
|
982
982
|
() => p = 0
|
983
983
|
/* NOT_DRAGGING */
|
984
|
-
),
|
984
|
+
), J = () => {
|
985
985
|
st(t, U);
|
986
|
-
},
|
986
|
+
}, I = (i) => {
|
987
987
|
st(i, Lt), o.addSubscriber(i);
|
988
988
|
}, z = () => {
|
989
989
|
if (c(t)) {
|
990
990
|
const i = t.querySelector(r);
|
991
|
-
|
991
|
+
I(i || t);
|
992
992
|
}
|
993
993
|
}, W = () => {
|
994
|
-
z(),
|
994
|
+
z(), J();
|
995
995
|
}, Y = (i) => {
|
996
|
-
const d = i == null ? void 0 : i.querySelector(`.${Lt}`),
|
997
|
-
return d &&
|
996
|
+
const d = i == null ? void 0 : i.querySelector(`.${Lt}`), S = d == null ? void 0 : d.parentElement;
|
997
|
+
return d && S && nt(S, Xt) && !S.isSameNode(s) ? null : d;
|
998
998
|
}, et = (i) => {
|
999
999
|
const d = Y(i) ?? i;
|
1000
|
-
d && c(i) && (
|
1000
|
+
d && c(i) && (It(
|
1001
1001
|
d,
|
1002
1002
|
"onmousedown",
|
1003
|
-
|
1004
|
-
),
|
1003
|
+
G("mousemove", "mouseup")
|
1004
|
+
), It(
|
1005
1005
|
d,
|
1006
1006
|
"ontouchstart",
|
1007
|
-
|
1008
|
-
(
|
1009
|
-
|
1007
|
+
G("touchmove", "touchend"),
|
1008
|
+
(S) => {
|
1009
|
+
P = {
|
1010
|
+
x: S.touches[0].clientX,
|
1011
|
+
y: S.touches[0].clientY
|
1012
|
+
};
|
1010
1013
|
}
|
1011
|
-
),
|
1012
|
-
},
|
1014
|
+
), ut(d)), i != null && i.isSameNode(d) || It(i, "onmousedown", K), st(s, Xt);
|
1015
|
+
}, ut = (i) => {
|
1013
1016
|
const d = i.querySelectorAll("img");
|
1014
|
-
Array.from(d).forEach((
|
1015
|
-
|
1017
|
+
Array.from(d).forEach((S) => {
|
1018
|
+
S.onmousedown = () => !1;
|
1016
1019
|
});
|
1017
1020
|
}, ot = () => {
|
1018
|
-
if (
|
1021
|
+
if (R.pageX == 0 && R.pageY == 0 || !a.current)
|
1019
1022
|
return;
|
1020
|
-
const { droppable: i, config: d } =
|
1021
|
-
X(t, i,
|
1023
|
+
const { droppable: i, config: d } = a.current;
|
1024
|
+
X(t, i, R, d.direction), _(
|
1022
1025
|
t,
|
1023
1026
|
Nt,
|
1024
|
-
|
1025
|
-
|
1027
|
+
T,
|
1028
|
+
a.current
|
1026
1029
|
);
|
1027
1030
|
}, u = (i, d) => {
|
1028
1031
|
d && p == 2 && !(i != null && i.droppable.isSameNode(d.droppable)) && _(
|
1029
1032
|
t,
|
1030
1033
|
Nt,
|
1031
|
-
|
1034
|
+
T,
|
1032
1035
|
d
|
1033
1036
|
);
|
1034
|
-
},
|
1037
|
+
}, a = new wn(
|
1035
1038
|
t,
|
1036
1039
|
y,
|
1037
1040
|
s,
|
@@ -1039,25 +1042,25 @@ function Rn(t, e, n, s, o) {
|
|
1039
1042
|
u,
|
1040
1043
|
n.mapFrom
|
1041
1044
|
), h = (i) => {
|
1042
|
-
if (!
|
1045
|
+
if (!a.current)
|
1043
1046
|
return;
|
1044
1047
|
const d = y ? Array.from(
|
1045
1048
|
document.querySelectorAll(gt(y))
|
1046
1049
|
) : [s];
|
1047
|
-
for (const
|
1048
|
-
|
1049
|
-
|
1050
|
-
!i &&
|
1050
|
+
for (const S of d)
|
1051
|
+
S.classList.toggle(
|
1052
|
+
O,
|
1053
|
+
!i && S.isSameNode(a.current.droppable)
|
1051
1054
|
);
|
1052
|
-
},
|
1053
|
-
|
1054
|
-
const
|
1055
|
-
h(
|
1055
|
+
}, D = (i, d = !1) => {
|
1056
|
+
a.updateConfig(i);
|
1057
|
+
const S = a.isOutside(i);
|
1058
|
+
h(S), p === 1 && !d ? rt(i) : p === 2 && (C(S), xt(i));
|
1056
1059
|
}, C = (i = !0) => {
|
1057
|
-
if (!
|
1060
|
+
if (!a.current)
|
1058
1061
|
return;
|
1059
|
-
const { droppable: d } =
|
1060
|
-
|
1062
|
+
const { droppable: d } = a.current;
|
1063
|
+
Sn(
|
1061
1064
|
d,
|
1062
1065
|
s,
|
1063
1066
|
y,
|
@@ -1067,184 +1070,182 @@ function Rn(t, e, n, s, o) {
|
|
1067
1070
|
t,
|
1068
1071
|
s,
|
1069
1072
|
p == 1,
|
1070
|
-
|
1073
|
+
a.current
|
1071
1074
|
);
|
1072
|
-
}, T = (i) => {
|
1073
|
-
const d = t.getBoundingClientRect();
|
1074
|
-
return i.clientX >= d.left && i.clientX <= d.right && i.clientY >= d.top && i.clientY <= d.bottom;
|
1075
1075
|
}, E = (i) => {
|
1076
|
-
if (
|
1077
|
-
const d = i.touches[0].
|
1078
|
-
if (
|
1079
|
-
return
|
1076
|
+
if (Tt(i) && P && p == 1) {
|
1077
|
+
const d = Math.abs(i.touches[0].clientX - P.x), S = Math.abs(i.touches[0].clientY - P.y);
|
1078
|
+
if (Math.abs(d) > 5 && Math.abs(S) > 5)
|
1079
|
+
return clearTimeout(w), !1;
|
1080
1080
|
}
|
1081
|
-
return !
|
1082
|
-
},
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1081
|
+
return !0;
|
1082
|
+
}, v = (i) => {
|
1083
|
+
clearTimeout(w);
|
1084
|
+
const d = _t(i);
|
1085
|
+
if (Tt(i) && i.cancelable && i.preventDefault(), Tt(i) && !i.cancelable || !E(i)) {
|
1086
|
+
ft("touchmove", i);
|
1086
1087
|
return;
|
1087
1088
|
}
|
1088
|
-
|
1089
|
-
},
|
1090
|
-
i == "touchmove" ?
|
1089
|
+
D(d, Tt(i));
|
1090
|
+
}, A = (i, d) => {
|
1091
|
+
i == "touchmove" ? w = setTimeout(() => {
|
1091
1092
|
d();
|
1092
|
-
},
|
1093
|
-
},
|
1094
|
-
const { clientX:
|
1095
|
-
return
|
1096
|
-
},
|
1093
|
+
}, 150) : d();
|
1094
|
+
}, N = (i, d) => {
|
1095
|
+
const { clientX: S, clientY: dt } = i, ct = document.elementFromPoint(S, dt), Dt = ct == null ? void 0 : ct.closest(`.${U}`);
|
1096
|
+
return Dt && d.isSameNode(Dt);
|
1097
|
+
}, x = (i) => {
|
1097
1098
|
const d = n.onGetValue(e);
|
1098
1099
|
return { index: e, element: i, value: d };
|
1099
|
-
},
|
1100
|
-
if (!
|
1100
|
+
}, G = (i, d) => (S) => {
|
1101
|
+
if (!N(S, t))
|
1101
1102
|
return;
|
1102
|
-
|
1103
|
-
const { scrollX: dt, scrollY:
|
1104
|
-
if (
|
1103
|
+
lt.updateScrolls(s, y);
|
1104
|
+
const { scrollX: dt, scrollY: ct } = window;
|
1105
|
+
if (T = { scrollX: dt, scrollY: ct }, p === 0) {
|
1105
1106
|
p = 1;
|
1106
|
-
const
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
}),
|
1107
|
+
const Dt = x(t);
|
1108
|
+
Dt && F(Dt), A(i, () => {
|
1109
|
+
i == "touchmove" && (a.updateConfig(S), h(a.isOutside(S)), rt(S));
|
1110
|
+
}), document.addEventListener(i, v, {
|
1111
|
+
passive: !1
|
1112
|
+
}), Gt(s), document.addEventListener(d, mt(i), {
|
1112
1113
|
once: !0
|
1113
1114
|
});
|
1114
1115
|
}
|
1115
|
-
},
|
1116
|
-
|
1117
|
-
},
|
1116
|
+
}, K = (i) => a.updateConfig(i), mt = (i) => (d) => {
|
1117
|
+
ft(i, d);
|
1118
|
+
}, ft = (i, d) => {
|
1118
1119
|
h(!0);
|
1119
|
-
const
|
1120
|
-
|
1121
|
-
const dt =
|
1120
|
+
const S = _t(d);
|
1121
|
+
Bt(a.isOutside(S, !1)), clearTimeout(w), document.removeEventListener(i, v), a.updateConfig(S);
|
1122
|
+
const dt = a.getCurrentConfig(S);
|
1122
1123
|
if (dt) {
|
1123
|
-
const { droppable:
|
1124
|
-
ct
|
1124
|
+
const { droppable: ct } = dt;
|
1125
|
+
St(ct);
|
1125
1126
|
}
|
1126
1127
|
s.onscroll = null;
|
1127
|
-
},
|
1128
|
+
}, St = (i) => {
|
1128
1129
|
if (i.onscroll = null, !y)
|
1129
1130
|
return;
|
1130
1131
|
const d = Array.from(
|
1131
1132
|
document.querySelectorAll(gt(y))
|
1132
1133
|
);
|
1133
|
-
for (const
|
1134
|
-
|
1135
|
-
},
|
1134
|
+
for (const S of d)
|
1135
|
+
it(S) && (S.onscroll = null);
|
1136
|
+
}, rt = (i) => {
|
1136
1137
|
Yt(
|
1137
1138
|
t,
|
1138
1139
|
s,
|
1139
1140
|
p == 1,
|
1140
|
-
|
1141
|
-
),
|
1141
|
+
a.current
|
1142
|
+
), $t(), _(
|
1142
1143
|
t,
|
1143
1144
|
fe,
|
1144
|
-
|
1145
|
-
|
1146
|
-
),
|
1147
|
-
},
|
1145
|
+
T,
|
1146
|
+
a.current
|
1147
|
+
), Se(t), Z(i, t);
|
1148
|
+
}, $t = () => {
|
1148
1149
|
p = 2;
|
1149
|
-
},
|
1150
|
-
const { pageX: d, pageY:
|
1151
|
-
|
1152
|
-
},
|
1153
|
-
if (p !== 2) {
|
1150
|
+
}, xt = (i) => {
|
1151
|
+
const { pageX: d, pageY: S } = i;
|
1152
|
+
R = { pageX: d, pageY: S }, ot();
|
1153
|
+
}, Gt = (i) => le(i, "onscroll", wt), wt = () => ot(), Bt = (i) => {
|
1154
|
+
if (p !== 2 && p !== 1) {
|
1154
1155
|
p = 0;
|
1155
1156
|
return;
|
1156
1157
|
}
|
1157
|
-
p = 3, Jt(t), _(
|
1158
|
+
p = 3, Jt(t), t.classList.contains(Ft) && _(
|
1158
1159
|
t,
|
1159
1160
|
jt,
|
1160
|
-
|
1161
|
-
i ?
|
1161
|
+
T,
|
1162
|
+
i ? a.initial : a.current,
|
1162
1163
|
e
|
1163
1164
|
);
|
1164
1165
|
}, Jt = (i) => {
|
1165
|
-
|
1166
|
-
},
|
1167
|
-
const { height: d, width:
|
1166
|
+
Pt(i, f, de), Et(i, 0, 0);
|
1167
|
+
}, Se = (i) => {
|
1168
|
+
const { height: d, width: S } = i.getBoundingClientRect();
|
1168
1169
|
ue(i, {
|
1169
1170
|
fixedHeight: `${d}px`,
|
1170
|
-
fixedWidth: `${
|
1171
|
+
fixedWidth: `${S}px`
|
1171
1172
|
}), q(i, !0), bt(i, m, !0), i.style.transition = "";
|
1172
1173
|
}, De = (i, d) => {
|
1173
|
-
|
1174
|
+
Ct(t, b), Yt(
|
1174
1175
|
t,
|
1175
1176
|
s,
|
1176
1177
|
p == 1,
|
1177
|
-
|
1178
|
+
a.initial
|
1178
1179
|
), H(
|
1179
1180
|
i,
|
1180
1181
|
t,
|
1181
1182
|
d,
|
1182
|
-
(
|
1183
|
-
Jt(
|
1183
|
+
(S) => {
|
1184
|
+
Jt(S), k(t);
|
1184
1185
|
}
|
1185
|
-
),
|
1186
|
-
},
|
1187
|
-
if (!
|
1186
|
+
), M(e, !0);
|
1187
|
+
}, ve = (i) => {
|
1188
|
+
if (!a.initial)
|
1188
1189
|
return;
|
1189
|
-
const d =
|
1190
|
-
i == e && (st(t,
|
1190
|
+
const d = a.initial;
|
1191
|
+
i == e && (st(t, b), setTimeout(() => {
|
1191
1192
|
De(i, d);
|
1192
1193
|
}, g));
|
1193
|
-
},
|
1194
|
-
(i === e || i === n.onGetLegth() && e === i - 1) &&
|
1194
|
+
}, be = (i, d) => {
|
1195
|
+
(i === e || i === n.onGetLegth() && e === i - 1) && $(
|
1195
1196
|
i,
|
1196
1197
|
t,
|
1197
1198
|
s,
|
1198
1199
|
d,
|
1199
1200
|
() => {
|
1200
|
-
|
1201
|
+
hn(
|
1201
1202
|
t,
|
1202
1203
|
p == 1,
|
1203
|
-
|
1204
|
+
a.initial
|
1204
1205
|
);
|
1205
1206
|
}
|
1206
1207
|
);
|
1207
1208
|
};
|
1208
|
-
return W(), et(t), [
|
1209
|
+
return W(), et(t), [ve, be];
|
1209
1210
|
}
|
1210
|
-
const
|
1211
|
-
t &&
|
1212
|
-
},
|
1213
|
-
|
1211
|
+
const Mn = (t, e) => {
|
1212
|
+
t && Ae(e, t);
|
1213
|
+
}, Rn = () => {
|
1214
|
+
Ve(document.body, [
|
1214
1215
|
`.${U}{touch-action:manipulation;user-select:none;box-sizing:border-box!important;-webkit-user-select:none;}`,
|
1215
1216
|
`.${Lt}{pointer-events:auto!important;}`,
|
1216
|
-
`.${
|
1217
|
+
`.${ye}{cursor:grab;}`,
|
1217
1218
|
".temp-child{touch-action:none;pointer-events:none;box-sizing:border-box!important;}",
|
1218
1219
|
".droppable{box-sizing:border-box!important;}",
|
1219
|
-
`.${
|
1220
|
-
`.${Xt}{pointer-events:none!important;}`,
|
1220
|
+
`.${Ft}{position:fixed;z-index:5000;width:var(--fixedWidth)!important;height:var(--fixedHeight)!important;}`,
|
1221
1221
|
`.${Wt}{pointer-events:none!important;}`,
|
1222
|
+
`.${Vt}{pointer-events:none!important;}`,
|
1222
1223
|
`.${oe}{cursor:grabbing;}`,
|
1223
1224
|
".disable-transition{transition:none!important;}"
|
1224
1225
|
]);
|
1225
1226
|
};
|
1226
|
-
function
|
1227
|
+
function Ln(t, e, n, s = "index") {
|
1227
1228
|
const o = s;
|
1228
1229
|
let r = [], c = [];
|
1229
|
-
const { droppableGroup:
|
1230
|
+
const { droppableGroup: l } = t;
|
1230
1231
|
if (!n)
|
1231
1232
|
return [
|
1232
1233
|
r,
|
1233
1234
|
c
|
1234
1235
|
];
|
1235
|
-
const f =
|
1236
|
-
|
1236
|
+
const f = At(l).map((g) => `droppable-group-${g}`).join(" ");
|
1237
|
+
Rn(), Mn(f, n);
|
1237
1238
|
for (const g of n.children) {
|
1238
|
-
const m = g.getAttribute(o),
|
1239
|
-
if (
|
1240
|
-
const [
|
1241
|
-
|
1242
|
-
|
1239
|
+
const m = g.getAttribute(o), b = we(m), M = g;
|
1240
|
+
if (M && b >= 0) {
|
1241
|
+
const [O, F] = Bn(
|
1242
|
+
M,
|
1243
|
+
b,
|
1243
1244
|
t,
|
1244
1245
|
n,
|
1245
1246
|
e
|
1246
1247
|
);
|
1247
|
-
r.push(
|
1248
|
+
r.push(O), c.push(F);
|
1248
1249
|
}
|
1249
1250
|
}
|
1250
1251
|
return [
|
@@ -1252,48 +1253,48 @@ function Mn(t, e, n, s = "index") {
|
|
1252
1253
|
c
|
1253
1254
|
];
|
1254
1255
|
}
|
1255
|
-
function
|
1256
|
+
function Fn(t, e, n, s = "index", o = !0) {
|
1256
1257
|
let r = [], c = [];
|
1257
|
-
const
|
1258
|
-
for (const
|
1259
|
-
|
1260
|
-
}, g = (p,
|
1261
|
-
if (
|
1262
|
-
t.insertToListEmpty(
|
1258
|
+
const l = Tn(t, n), f = (p) => {
|
1259
|
+
for (const T of r)
|
1260
|
+
T(p);
|
1261
|
+
}, g = (p, T) => {
|
1262
|
+
if (l.onGetLegth() === 0)
|
1263
|
+
t.insertToListEmpty(l, p, T);
|
1263
1264
|
else
|
1264
|
-
for (const
|
1265
|
-
|
1265
|
+
for (const w of c)
|
1266
|
+
w(p, T);
|
1266
1267
|
}, m = (p) => {
|
1267
|
-
const [
|
1268
|
-
r =
|
1269
|
-
},
|
1270
|
-
const
|
1271
|
-
return
|
1272
|
-
},
|
1268
|
+
const [T, R] = Ln(l, e, p, s);
|
1269
|
+
r = T, c = R;
|
1270
|
+
}, b = (p) => {
|
1271
|
+
const T = p.addedNodes.values().filter((w) => !qt(w)).toArray(), R = p.removedNodes.values().filter((w) => !qt(w)).toArray();
|
1272
|
+
return T.length > 0 || R.length > 0;
|
1273
|
+
}, M = (p) => {
|
1273
1274
|
kt(
|
1274
|
-
(
|
1275
|
-
m(p), o ||
|
1275
|
+
(T) => {
|
1276
|
+
m(p), o || T.disconnect();
|
1276
1277
|
},
|
1277
1278
|
p,
|
1278
1279
|
{ childList: !0 },
|
1279
|
-
|
1280
|
+
b
|
1280
1281
|
);
|
1281
|
-
},
|
1282
|
-
st(p,
|
1282
|
+
}, O = (p) => {
|
1283
|
+
st(p, Xt);
|
1283
1284
|
}, F = (p) => {
|
1284
|
-
|
1285
|
+
lt.addConfig(
|
1285
1286
|
p,
|
1286
|
-
|
1287
|
+
l
|
1287
1288
|
);
|
1288
1289
|
};
|
1289
1290
|
return [f, g, (p) => {
|
1290
|
-
p && (
|
1291
|
+
p && (O(p), F(p), M(p), m(p), lt.removeObsoleteConfigs());
|
1291
1292
|
}];
|
1292
1293
|
}
|
1293
1294
|
export {
|
1294
|
-
|
1295
|
+
ye as G,
|
1295
1296
|
st as a,
|
1296
|
-
|
1297
|
-
|
1297
|
+
Fn as d,
|
1298
|
+
Nn as i,
|
1298
1299
|
bt as t
|
1299
1300
|
};
|