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