fluid-dnd 1.3.1-beta.0 → 1.3.3-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.
@@ -1,33 +1,33 @@
1
- var Ee = Object.defineProperty;
2
- var ye = (t, e, n) => e in t ? Ee(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var Z = (t, e, n) => ye(t, typeof e != "symbol" ? e + "" : e, n);
4
- const U = "draggable", It = "droppable", Lt = "handler-class", qt = "dragging", Xt = "dragging-handler-class", Wt = "dropping", oe = "grabbing", Ce = "grab", Kt = "disable-transition", nt = (t, e) => t.classList.contains(e), bt = (t, e, n = !1) => {
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
- }, yt = (t, e) => {
8
+ }, Ct = (t, e) => {
9
9
  t.classList.remove(e);
10
- }, Ae = (t, e) => Ct(e).every(
10
+ }, Ce = (t, e) => At(e).every(
11
11
  (n) => nt(t, n)
12
- ), gt = (t) => t ? `.${Ct(t).join(".")}` : "", xe = (t, e) => {
12
+ ), gt = (t) => t ? `.${At(t).join(".")}` : "", Ae = (t, e) => {
13
13
  if (!e)
14
14
  return;
15
- const n = Ct(e);
15
+ const n = At(e);
16
16
  t.classList.add(...n);
17
- }, Ct = (t) => t ? t.split(" ").filter((e) => e) : [], V = "horizontal", tt = "vertical", Be = () => {
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, Re = (t) => {
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) => !Oe(t, e), Oe = (t, e) => {
27
- const n = Mt(t), s = Mt(e), o = Qt(n, s, tt), r = Qt(n, s, V);
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 } = w(n);
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
- }, Mt = (t) => t.getBoundingClientRect(), w = (t) => {
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: Mt
64
+ getRect: Ot
65
65
  };
66
- }, wt = (t, e) => Le(t, e), ie = (t) => [...t.children].filter(
66
+ }, Mt = (t, e) => Re(t, e), ie = (t) => [...t.children].filter(
67
67
  (n) => nt(n, U)
68
- ), Le = (t, e) => {
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
- }, Me = (t) => {
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
- } = w(e), o = Me(t);
92
- return o ? Mt(o)[n] + L(o, s) : 0;
93
- }, Ot = (t) => window.TouchEvent && t instanceof TouchEvent, rt = (t) => t instanceof HTMLElement, ae = (t) => t instanceof MouseEvent, Ne = ["onmouseup", "onmousedown", "onmousemove"], Fe = (t, e, n) => {
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
- }, Tt = (t, e, n) => {
96
- !t || !rt(t) || (n == 0 && e == 0 ? t.style.transform = "" : t.style.transform = `translate(${n}px,${e}px)`);
97
- }, Pe = (t, e, n, s) => {
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 = Vt(o);
102
+ const r = _t(o);
103
103
  n(r);
104
104
  };
105
- }, Gt = (t, e, n, s) => {
106
- n && ($e(e) ? t[e] = n : Pe(t, e, n, s));
107
- }, $e = (t) => Ne.includes(t), Ge = (t) => {
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
- }, Ye = (t, e) => {
121
- const n = (s, o) => Xe(e, window, o, s);
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
- }, Vt = (t) => {
132
+ }, _t = (t) => {
133
133
  const e = Ie(t);
134
134
  if (!e)
135
- return Ge(t);
136
- const [n, s] = Ye(t, e), { clientX: o, clientY: r, pageX: c, pageY: a, screenX: f, screenY: g, target: m } = e;
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: a,
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 (Ot(t))
149
+ if (Tt(t))
150
150
  return t.touches[0] ?? t.changedTouches[0];
151
151
  if (ae(t))
152
152
  return t;
153
- }, Xe = (t, e, n, s) => {
154
- const { page: o, scroll: r, before: c, borderBeforeWidth: a, getRect: f } = w(n), g = f(s);
155
- return t[o] - e[r] - g[c] - L(s, a);
156
- }, Ft = (t, e, n = "ease-out", s = "transform") => {
157
- rt(t) && (t.style.transitionDuration = `${e}ms`, t.style.transitionTimingFunction = `${n}`, t.style.transitionProperty = `${s}`);
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 || !rt(t) || (t[e] = () => {
159
+ !t || !it(t) || (t[e] = () => {
160
160
  n();
161
161
  });
162
- }, We = (t) => {
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
- }, Ve = (t, e) => {
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
- }, _e = (t, e) => {
177
+ }, Ve = (t, e) => {
178
178
  e.forEach((n) => {
179
- He(t, n);
179
+ _e(t, n);
180
180
  });
181
- }, He = (t, e) => {
181
+ }, _e = (t, e) => {
182
182
  var s;
183
- var n = We(t);
184
- n.sheet && (Ve(n.sheet, e) || (s = n.sheet) == null || s.insertRule(e, n.sheet.cssRules.length));
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 && qe(t, `--${n}`, s);
188
+ s != null && He(t, `--${n}`, s);
189
189
  }
190
- }, qe = (t, e, n) => t && t.style.setProperty(e, n), fe = "startDrag", Nt = "drag", jt = "startDrop", ze = "drop", lt = "temp-child", de = "cubic-bezier(0.2, 0, 0, 1)", je = (t) => t === ze || t === jt, _t = (t) => !t || t.length == 0 ? 0 : zt(t.replace("px", "")), Ze = (t, e) => {
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 _t(n);
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 = Ze(t, e), s = getComputedStyle(t).display, o = n > 0 || s === "flex";
203
+ const n = je(t, e), s = getComputedStyle(t).display, o = n > 0 || s === "flex";
204
204
  return [n, o];
205
- }, ke = (t) => {
205
+ }, Ze = (t) => {
206
206
  const { top: e, left: n } = getComputedStyle(t);
207
- return [_t(e), _t(n)];
208
- }, Je = (t, e) => {
209
- const { gap: n } = w(e), [s, o] = Zt(t, 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 Et(t, e, n, s, o = t.previousElementSibling, r = t.nextElementSibling) {
213
- let { height: c, width: a } = Ke(
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, a = 0), { height: c, width: a };
219
+ return pt(t, s) && e == Nt && (c = 0, l = 0), { height: c, width: l };
220
220
  }
221
- const Ke = (t, e, n, s) => {
221
+ const Je = (t, e, n, s) => {
222
222
  const {
223
223
  afterMargin: o,
224
224
  beforeMargin: r,
225
225
  distance: c,
226
- gap: a,
226
+ gap: l,
227
227
  getRect: f
228
- } = w(t), g = L(e, o), m = L(e, r), D = L(s, r), [R, M] = Zt(
228
+ } = B(t), g = L(e, o), m = L(e, r), b = L(s, r), [M, O] = Zt(
229
229
  e.parentElement,
230
- a
230
+ l
231
231
  ), F = f(e)[c];
232
- if (M)
233
- return te(F, m, g, R, 0, t);
234
- const [y, p, b] = Qe(
232
+ if (O)
233
+ return te(F, m, g, M, 0, t);
234
+ const [y, p, E] = Ke(
235
235
  n,
236
- D,
236
+ b,
237
237
  g,
238
238
  m,
239
239
  o
240
240
  );
241
- return te(F, p, y, 0, b, t);
242
- }, Qe = (t, e, n, s, o) => {
241
+ return te(F, p, y, 0, E, t);
242
+ }, Ke = (t, e, n, s, o) => {
243
243
  const r = Math.max(e, n);
244
- let c = s, a = e;
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), a = Math.max(a, f);
250
+ c = Math.max(f, s), l = Math.max(l, f);
251
251
  }
252
- return [r, c, a];
253
- }, te = (t, e, n, s, o, r) => Ue(r, t + e + n + s - o), Ue = (t, e) => t == V ? { width: e, height: 0 } : { width: 0, height: e }, ee = (t, e) => {
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
- } = w(t), c = L(e, n), a = L(e, s), f = r(e)[o];
260
- return c + a + f;
261
- }, tn = (t, e) => {
262
- const [n, s] = ke(e), o = ee(tt, t);
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 en(t, e, n, s, o, r, c, a, f) {
268
+ function tn(t, e, n, s, o, r, c, l, f) {
269
269
  let g = 0, m = 0;
270
- const D = !!(n < 0 && f);
271
- if (n === s && !D)
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
- D
277
+ b
278
278
  );
279
- const [R, M, F, y] = on(e, n, s, f);
280
- if (D) {
281
- const [et, ft] = tn(a, f);
282
- g += ft, m += et;
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: b,
287
- afterMargin: O,
288
- distance: B,
289
- gap: $
290
- } = w(t), [X, k] = Zt(a, $), [
286
+ beforeMargin: E,
287
+ afterMargin: R,
288
+ distance: w,
289
+ gap: P
290
+ } = B(t), [X, Z] = Zt(l, P), [
291
291
  _,
292
292
  H,
293
- P
294
- ] = cn(
295
- b,
296
- O,
293
+ $
294
+ ] = rn(
295
+ E,
297
296
  R,
298
- M == null ? void 0 : M.previousElementSibling,
297
+ M,
298
+ O == null ? void 0 : O.previousElementSibling,
299
299
  y,
300
- k,
301
- D
302
- ), [J, q, K] = rn(
303
- b,
304
- O,
305
- B,
300
+ Z,
301
+ b
302
+ ), [k, q, J] = on(
303
+ E,
304
+ R,
305
+ w,
306
306
  F,
307
307
  X,
308
- k
309
- ), G = sn(
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 = D ? a[p] : nn(p, a, r), Y = (y ? G - P : P - G) - 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
- D
322
+ b
323
323
  );
324
324
  }
325
- const nn = (t, e, n) => {
325
+ const en = (t, e, n) => {
326
326
  const s = e[t], o = n[t];
327
327
  return s - o;
328
- }, sn = (t, e, n, s, o, r) => {
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
- }, on = (t, e, n, s) => {
331
+ }, sn = (t, e, n, s) => {
332
332
  const o = e < n, [r, c] = [e, n].toSorted(
333
- (m, D) => m - D
334
- ), a = t[e] ?? s, f = t[n];
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
- a,
337
+ l,
338
338
  f,
339
339
  g,
340
340
  o
341
341
  ];
342
- }, rn = (t, e, n, s, o, r) => {
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 a = 0, f = -c;
346
+ let l = 0, f = -c;
347
347
  for (const [g, m] of s.entries()) {
348
- const D = m.getBoundingClientRect()[n], R = L(m, t);
349
- r && (a += R), r && g > 0 ? a += o : a = Math.max(a, R), f += a + D, a = L(m, e);
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, a];
351
+ return [c, f, l];
352
352
  }, ne = (t, e, n, s, o) => {
353
- const { scroll: r, distance: c } = w(e), a = window[r], f = n[r], g = o ? 0 : f - 2 * a + s[r];
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
- }, cn = (t, e, n, s, o, r, c) => {
356
- const a = o ? n.previousElementSibling : s;
357
- return an(
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
- a,
360
+ l,
361
361
  n,
362
362
  r,
363
363
  c
364
364
  );
365
- }, an = (t, e, n, s, o, r) => {
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
- ), a = L(s, t);
372
- let f = Math.max(c, a);
373
- return [c, a, f];
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
- }, ln = (t, e, n) => {
382
+ }, an = (t, e, n) => {
383
383
  n != 0 && (e === "vertical" ? t.scrollBy(0, n) : t.scrollBy(n, 0));
384
- }, un = (t, e, n) => {
385
- const { scrollDistance: s, clientDistance: o, scrollElement: r } = w(t);
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
- }, fn = "startDrag", ge = "cubic-bezier(0.2, 0, 0, 1)", pe = 50, Ht = (t) => rt(t) ? t.classList.contains(lt) : !1, dn = (t, e, n) => {
388
- let s = Et(
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
- fn,
390
+ un,
391
391
  n,
392
392
  t
393
393
  );
394
- const o = Je(t, n), { distance: r } = w(n);
394
+ const o = ke(t, n), { distance: r } = B(n);
395
395
  s[r] -= o;
396
- const [c, a] = gn(n, e);
397
- return s[a] = c, s;
398
- }, gn = (t, e) => {
399
- const n = t == V ? tt : V, { distance: s, getRect: o } = w(n);
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
- Fe(t, e, n), t.style.minWidth = `${n}px`;
406
- }, pn = (t, e, n) => (s) => {
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
- }, hn = (t, e) => {
408
+ }, pn = (t, e) => {
409
409
  if (!e)
410
410
  return;
411
- const { droppable: n, config: s, scroll: o } = t, { direction: r } = s, c = un(s.direction, n, o) > 0.99, { scrollDistance: a, clientDistance: f, scrollElement: g } = w(r);
412
- c && (n[g] = n[a] - n[f]);
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: a } = r;
417
- if (hn(n, e), o.querySelector(`.${lt}`) || !t)
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, lt), ht(g, 0, 0);
421
- const m = dn(o, t, c);
422
- return Ft(
420
+ st(g, at), ht(g, 0, 0);
421
+ const m = fn(o, t, c);
422
+ return Pt(
423
423
  g,
424
- a,
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, a, f] = r;
433
- e.isSameNode(f) && ht(c, a.height, a.width), kt(
434
- pn(c, f, a),
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
- }, mn = (t, e, n) => {
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), Sn(o, r);
447
- }, Sn = (t, e) => requestAnimationFrame(() => {
446
+ c.appendChild(o), mn(o, r);
447
+ }, mn = (t, e) => requestAnimationFrame(() => {
448
448
  ht(t, e.height, e.width), requestAnimationFrame(() => {
449
- Ft(
449
+ Pt(
450
450
  t,
451
451
  0,
452
452
  ge,
453
453
  "width, min-width, height"
454
454
  );
455
455
  });
456
- }), vn = (t, e, n, s, o = !0) => {
456
+ }), Sn = (t, e, n, s, o = !0) => {
457
457
  if (n) {
458
458
  var r = document.querySelectorAll(
459
- `${gt(n)} > .${lt}`
459
+ `${gt(n)} > .${at}`
460
460
  );
461
461
  r.forEach((c) => {
462
- const a = c.parentElement;
463
- if (a != null && a.isSameNode(e) || !o && (a != null && a.isSameNode(t)))
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
- }, Dt = (t, e, n = !1) => {
472
- var s = t.querySelectorAll(`.${lt}`);
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 bn(t, e, n, s, o, r) {
480
+ function vn(t, e, n, s, o, r) {
481
481
  let c = e;
482
482
  const {
483
- direction: a,
483
+ direction: l,
484
484
  handlerSelector: f,
485
485
  onRemoveAtEvent: g,
486
486
  animationDuration: m,
487
- delayBeforeInsert: D,
488
- draggingClass: R
489
- } = t, M = (u, l, h, S, C) => {
490
- if (!S)
487
+ delayBeforeInsert: b,
488
+ draggingClass: M
489
+ } = t, O = (u, a, h, D, C) => {
490
+ if (!D)
491
491
  return;
492
- const { droppable: T, config: E } = S, A = Et(
492
+ const { droppable: T, config: v } = D, A = yt(
493
493
  u,
494
- l,
495
- E.direction,
494
+ a,
495
+ v.direction,
496
496
  T
497
497
  );
498
- je(l) ? k(
498
+ ze(a) ? Z(
499
499
  u,
500
- l,
500
+ a,
501
501
  A,
502
502
  h,
503
- S,
503
+ D,
504
504
  C
505
- ) : b(
505
+ ) : E(
506
506
  u,
507
- l,
507
+ a,
508
508
  A,
509
- S
509
+ D
510
510
  );
511
- }, F = (u, l, h, S, C) => {
512
- const T = Et(
513
- l,
511
+ }, F = (u, a, h, D, C) => {
512
+ const T = yt(
513
+ a,
514
514
  "insert",
515
515
  t.direction,
516
516
  h
517
- ), { onInsertEvent: E } = t, A = ie(h);
517
+ ), { onInsertEvent: v } = t, A = ie(h);
518
518
  for (const [N, x] of A.entries())
519
519
  nt(x, U) && N >= u && X(x, T);
520
520
  C(), setTimeout(() => {
521
- E(u, S), me(u, h, t), et(l), W(l, n), Dt(n, 0, !0);
522
- }, D);
523
- }, y = (u, l, h, S) => {
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
526
  const { droppable: C, config: T } = h;
527
- let [E] = wt(l, C);
528
- E = [l, ...E].toReversed();
529
- const A = Et(
530
- l,
527
+ let [v] = Mt(a, C);
528
+ v = [a, ...v].toReversed();
529
+ const A = yt(
530
+ a,
531
531
  "remove",
532
532
  T.direction,
533
533
  C
534
534
  );
535
- for (const [N, x] of E.entries())
536
- N >= u && ($(x, A), setTimeout(() => {
537
- S(x);
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
- Dt(n, m, !0), setTimeout(() => {
540
+ vt(n, m, !0), setTimeout(() => {
541
541
  et(u), W(u, n);
542
542
  }, m);
543
- }, b = (u, l, h, S) => {
544
- const { config: C, droppable: T } = S, [E] = wt(u, T), A = pt(u, T);
545
- E.length == 0 && B(
543
+ }, E = (u, a, h, D) => {
544
+ const { config: C, droppable: T } = D, [v] = Mt(u, T), A = pt(u, T);
545
+ v.length == 0 && w(
546
546
  h,
547
547
  1,
548
548
  C.direction,
549
- E
549
+ v
550
550
  );
551
- for (const [N, x] of E.entries()) {
551
+ for (const [N, x] of v.entries()) {
552
552
  if (!nt(x, U))
553
553
  continue;
554
- const I = O(
554
+ const G = R(
555
555
  C.direction,
556
556
  u,
557
557
  x,
558
558
  h
559
559
  );
560
- if (!A && I)
561
- h = I;
560
+ if (!A && G)
561
+ h = G;
562
562
  else if (!A)
563
563
  continue;
564
- const j = E.length - N;
565
- B(
564
+ const K = v.length - N;
565
+ w(
566
566
  h,
567
- j,
567
+ K,
568
568
  C.direction,
569
- E
570
- ), l === fe ? $(x, h) : l === Nt && X(x, h);
569
+ v
570
+ ), a === fe ? P(x, h) : a === Nt && X(x, h);
571
571
  }
572
- }, O = (u, l, h, S) => {
573
- const { before: C, distance: T, axis: E, getRect: A } = w(u), N = A(l), x = A(h), I = N[C], j = x[C], mt = x[T], St = j + mt / 2, it = Re(h)[E], ct = St - it;
574
- return I > ct ? { height: 0, width: 0 } : S;
575
- }, B = (u, l, h, S) => {
576
- const C = S.filter(
577
- (E) => nt(E, U)
578
- ).length, { distance: T } = w(h);
579
- u[T] == 0 ? c = Math.max(c, l) : c = Math.min(c, l - 1), c = Math.min(c, C);
580
- }, $ = (u, l) => {
581
- const { width: h, height: S } = l;
582
- Tt(u, S, h);
583
- }, X = (u, l) => {
584
- const { width: h, height: S } = l;
585
- Tt(u, S, h), Ft(u, m, de);
586
- }, k = (u, l, h, S, C, T) => {
587
- const { droppable: E, scroll: A, config: N } = C, [x, I] = wt(
572
+ }, R = (u, a, h, D) => {
573
+ const { before: C, distance: T, axis: v, getRect: A } = B(u), N = A(a), x = A(h), G = N[C], K = x[C], mt = x[T], 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: T } = B(h);
579
+ u[T] == 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, T) => {
587
+ const { droppable: v, scroll: A, config: N } = C, [x, G] = Mt(
588
588
  u,
589
- E
590
- ), j = x.toReversed(), mt = I === -1 ? j.length : I;
591
- j.splice(mt, 0, u);
592
- const [St, it, ct] = _(
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
- I,
595
- j,
596
- E
594
+ G,
595
+ K,
596
+ v
597
597
  );
598
- h = Et(
598
+ h = yt(
599
599
  u,
600
- l,
600
+ a,
601
601
  N.direction,
602
602
  n,
603
- St,
604
- it
603
+ ft,
604
+ St
605
605
  );
606
- const Pt = Be(), At = en(
606
+ const $t = xe(), xt = tn(
607
607
  N.direction,
608
- j,
609
- I,
610
- ct,
611
- Pt,
608
+ K,
609
+ G,
610
+ rt,
611
+ $t,
612
612
  A,
613
- S,
614
- E,
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
- At
621
+ xt
622
622
  );
623
- for (const [$t, xt] of x.toReversed().entries()) {
623
+ for (const [Gt, wt] of x.toReversed().entries()) {
624
624
  let Bt = h;
625
- ct - 1 >= $t && (Bt = { height: 0, width: 0 }), l === jt && !nt(xt, lt) && H(
626
- xt,
625
+ rt - 1 >= Gt && (Bt = { height: 0, width: 0 }), a === jt && !nt(wt, at) && H(
626
+ wt,
627
627
  Bt,
628
628
  u,
629
- At
629
+ xt
630
630
  );
631
631
  }
632
- P(
633
- ct,
632
+ $(
633
+ rt,
634
634
  u,
635
635
  N,
636
- E,
636
+ v,
637
637
  T
638
638
  );
639
- }, _ = (u, l, h, S) => {
640
- const T = pt(u, S) ? l : c, E = () => l < T ? [T, T + 1] : l > T ? [T - 1, T] : [T - 1, T + 1], [A, N] = E(), x = h[A] ?? null, I = h[N] ?? null;
639
+ }, _ = (u, a, h, D) => {
640
+ const T = pt(u, D) ? a : c, v = () => a < T ? [T, T + 1] : a > T ? [T - 1, T] : [T - 1, T + 1], [A, N] = v(), x = h[A] ?? null, G = h[N] ?? null;
641
641
  return [
642
642
  x,
643
- I,
643
+ G,
644
644
  T
645
645
  ];
646
- }, H = (u, l, h, S) => {
647
- Tt(u, l.height, l.width), Tt(
646
+ }, H = (u, a, h, D) => {
647
+ Et(u, a.height, a.width), Et(
648
648
  h,
649
- S.height,
650
- S.width
649
+ D.height,
650
+ D.width
651
651
  );
652
- }, P = (u, l, h, S, C) => {
653
- const { onInsertEvent: T, onDragEnd: E } = h;
654
- st(l, Wt), K(l, n, S, () => {
655
- if (yt(l, Wt), C != null) {
652
+ }, $ = (u, a, h, D, C) => {
653
+ const { onInsertEvent: T, 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 && (T(u, A, !0), E({ value: A, index: u })), q(l), J();
657
+ A != null && (T(u, A, !0), v({ value: A, index: u })), q(a), k();
658
658
  }
659
659
  });
660
- }, J = () => {
660
+ }, k = () => {
661
661
  if (s) {
662
662
  var u = document.querySelectorAll(
663
663
  `${gt(s)} > .${U}`
664
664
  );
665
- for (const l of u)
666
- Y(l);
665
+ for (const a of u)
666
+ Y(a);
667
667
  }
668
668
  }, q = (u) => {
669
669
  setTimeout(() => {
670
- yt(u, R);
670
+ Ct(u, M);
671
671
  }, Dn);
672
- }, K = (u, l, h, S) => {
672
+ }, J = (u, a, h, D) => {
673
673
  setTimeout(() => {
674
- S && S(), G(l, h), z(h), et(u), W(u, l), W(u, h);
674
+ D && D(), I(a, h), z(h), et(u), W(u, a), W(u, h);
675
675
  }, m);
676
- }, G = (u, l) => {
677
- u.isSameNode(l) ? Dt(u, m) : (Dt(u, m, !0), Dt(l, m));
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 [l] = n.querySelectorAll(`.${lt}`);
682
- if (!l)
681
+ var [a] = n.querySelectorAll(`.${at}`);
682
+ if (!a)
683
683
  return;
684
- const { distance: h } = w(a);
685
- rt(l) && (l.style[h] = "0px");
686
- }, W = (u, l) => {
687
- const [h] = wt(u, l);
688
- for (const S of [...h, u])
689
- Y(S);
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
- rt(u) && (u.style.transition = "", u.style.transform = "");
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
- }, ft = (u, l) => {
698
- const h = l.querySelector(f);
699
- bt(document.body, oe, u), bt(h || l, Xt, u);
700
- }, ot = (u, l) => {
701
- bt(u, qt, l), ft(l, u), o.toggleGrabClass(!l);
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
- M,
704
+ O,
705
705
  y,
706
706
  F,
707
707
  p,
708
708
  ot
709
709
  ];
710
710
  }
711
- const Tn = (t) => t.addedNodes.values().filter((n) => !Ht(n)).toArray().length > 0, me = (t, e, n) => {
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 a = ie(e)[t];
714
- st(a, s), st(a, Kt), setTimeout(() => {
715
- yt(a, Kt), yt(a, s), r.disconnect();
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
- }, Tn);
720
- }, Fn = (t, e, n, s) => {
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
- }, En = (t, e) => {
728
- const n = (a, f) => t.removeAtEvent(a, f), s = (a, f, g) => t.insertEvent(a, f, g), o = () => t.getLength(), r = (a) => t.getValue(a), c = (a) => a;
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
- }, yn = (t, e) => {
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
- }, Cn = (t) => {
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, D) => {
770
- const R = (y) => {
769
+ (f, g, m, b) => {
770
+ const M = (y) => {
771
771
  const {
772
772
  beforeMargin: p,
773
- borderBeforeWidth: b,
774
- before: O,
775
- offset: B,
776
- scroll: $,
773
+ borderBeforeWidth: E,
774
+ before: R,
775
+ offset: w,
776
+ scroll: P,
777
777
  page: X,
778
- inner: k,
778
+ inner: Z,
779
779
  distance: _,
780
780
  axis: H,
781
- getRect: P
782
- } = w(y), J = m[X], q = window[$], K = window[k], G = P(f)[_], z = L(f, b), W = L(f, p), Y = J - e[B], et = ce(f, y);
783
- if (Y >= q - G / 2 && Y <= q + K) {
784
- const ot = Y - n[O] - z - W - q - et;
785
- return M(y), ot;
781
+ getRect: $
782
+ } = B(y), k = m[X], q = window[P], J = window[Z], I = $(f)[_], z = L(f, E), 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
- }, M = (y) => {
789
- if (f && nt(f, qt) && y === D) {
790
- const { before: p, distance: b, axis: O, getRect: B } = w(D), $ = B(f)[b], X = B(g), k = n[p] - X[p] + s[O], H = X[b] - $, P = k / H, J = $ / H, q = 0.1, K = 0.2, G = 0.8;
788
+ }, O = (y) => {
789
+ if (f && nt(f, Ft) && y === b) {
790
+ const { before: p, distance: E, axis: R, getRect: w } = B(b), P = w(f)[E], X = w(g), Z = n[p] - X[p] + s[R], H = X[E] - 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 && P < K && P > -J ? z = P / K - 1 : !W && P > G && P < 1 + J && (z = 1 / (1 - G) * (P - G));
794
- const Y = q * $ * z;
795
- ln(g, D, Y);
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 } = w(y);
799
- s[p] = R(y), o(s);
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, D, R, M] = Bn(
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: D
812
- }, r(n), e = { offsetX: R, offsetY: M };
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 } = w(t);
816
+ const { borderBeforeWidth: s, before: o, getRect: r } = B(t);
817
817
  return r(e)[o] - r(n)[o] - L(n, s);
818
- }, An = (t, e) => {
819
- let { offsetX: n, offsetY: s, target: o } = t, r = xn(o, e);
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
- }, xn = (t, e) => {
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: a, scroll: f } = w(t), g = ce(n, t);
827
- return e[c] - s[o] - L(n, r) - L(n, a) - window[f] - g;
828
- }, Bn = (t, e, n) => {
829
- const [s, o] = An(t, n);
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 && Ae(o, n) || o.isSameNode(e)) && (s.scroll = Ut(o));
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
- Z(Q, "configs", []), Z(Q, "removeObsoleteConfigs", () => {
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 ut = Q;
871
+ let lt = Q;
872
872
  class wn {
873
873
  constructor(e, n, s, o, r, c) {
874
- Z(this, "initial");
875
- Z(this, "current");
876
- Z(this, "parent");
877
- Z(this, "draggableElement");
878
- Z(this, "groupClass");
879
- Z(this, "dragEvent");
880
- Z(this, "changeDroppable");
881
- Z(this, "mapFrom");
882
- this.parent = s, this.draggableElement = e, this.groupClass = n, this.dragEvent = o, this.mapFrom = c, this.initial = s ? ut.getConfig(s) : void 0, this.changeDroppable = r;
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 [a] = c.getDraggableAncestor(
889
+ const [l] = c.getDraggableAncestor(
890
890
  n.clientX,
891
891
  n.clientY,
892
892
  e
893
893
  );
894
- return a;
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 = ut.getConfig(e);
924
+ const n = lt.getConfig(e);
925
925
  if (n)
926
926
  return e.isSameNode(this.parent) ? n : {
927
927
  ...n,
928
- config: yn(n, this.mapFrom)
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 ? (rt(s) && !s.onscroll && this.setOnScroll(s), this.getConfigFrom(s)) : this.getConfigFrom(this.parent);
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 Rn(t, e, n, s, o) {
951
+ function Bn(t, e, n, s, o) {
952
952
  const {
953
953
  handlerSelector: r,
954
954
  isDraggable: c,
955
- droppableGroup: a,
955
+ droppableGroup: l,
956
956
  animationDuration: f,
957
957
  delayBeforeRemove: g,
958
958
  draggingClass: m,
959
- removingClass: D,
960
- onRemoveAtEvent: R,
961
- droppableClass: M,
959
+ removingClass: b,
960
+ onRemoveAtEvent: M,
961
+ droppableClass: O,
962
962
  onDragStart: F
963
- } = n, y = Ct(a).map((i) => `droppable-group-${i}`).join(" ");
964
- let p = 0, b = {
963
+ } = n, y = At(l).map((i) => `droppable-group-${i}`).join(" ");
964
+ let p = 0, E = {
965
965
  scrollX: 0,
966
966
  scrollY: 0
967
- }, O = { pageX: 0, pageY: 0 }, B, $;
968
- const [X, k] = Cn(
967
+ }, R = { pageX: 0, pageY: 0 }, w, P;
968
+ const [X, Z] = yn(
969
969
  t
970
970
  ), [
971
971
  _,
972
972
  H,
973
- P,
974
- J,
973
+ $,
974
+ k,
975
975
  q
976
- ] = bn(
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
- ), K = () => {
984
+ ), J = () => {
985
985
  st(t, U);
986
- }, G = (i) => {
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
- G(i || t);
991
+ I(i || t);
992
992
  }
993
993
  }, W = () => {
994
- z(), K();
994
+ z(), J();
995
995
  }, Y = (i) => {
996
- const d = i == null ? void 0 : i.querySelector(`.${Lt}`), v = d == null ? void 0 : d.parentElement;
997
- return d && v && nt(v, It) && !v.isSameNode(s) ? null : 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) && (Gt(
1000
+ d && c(i) && (It(
1001
1001
  d,
1002
1002
  "onmousedown",
1003
- j("mousemove", "mouseup")
1004
- ), Gt(
1003
+ G("mousemove", "mouseup")
1004
+ ), It(
1005
1005
  d,
1006
1006
  "ontouchstart",
1007
- j("touchmove", "touchend"),
1008
- (v) => {
1009
- B = v.changedTouches[0].clientY;
1007
+ G("touchmove", "touchend"),
1008
+ (S) => {
1009
+ P = {
1010
+ x: S.touches[0].clientX,
1011
+ y: S.touches[0].clientY
1012
+ };
1010
1013
  }
1011
- ), ft(d)), i != null && i.isSameNode(d) || Gt(i, "onmousedown", mt), st(s, It);
1012
- }, ft = (i) => {
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((v) => {
1015
- v.onmousedown = () => !1;
1017
+ Array.from(d).forEach((S) => {
1018
+ S.onmousedown = () => !1;
1016
1019
  });
1017
1020
  }, ot = () => {
1018
- if (O.pageX == 0 && O.pageY == 0 || !l.current)
1021
+ if (R.pageX == 0 && R.pageY == 0 || !a.current)
1019
1022
  return;
1020
- const { droppable: i, config: d } = l.current;
1021
- X(t, i, O, d.direction), _(
1023
+ const { droppable: i, config: d } = a.current;
1024
+ X(t, i, R, d.direction), _(
1022
1025
  t,
1023
1026
  Nt,
1024
- b,
1025
- l.current
1027
+ E,
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
- b,
1034
+ E,
1032
1035
  d
1033
1036
  );
1034
- }, l = new wn(
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 (!l.current)
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 v of d)
1048
- v.classList.toggle(
1049
- M,
1050
- !i && v.isSameNode(l.current.droppable)
1050
+ for (const S of d)
1051
+ S.classList.toggle(
1052
+ O,
1053
+ !i && S.isSameNode(a.current.droppable)
1051
1054
  );
1052
- }, S = (i) => {
1053
- l.updateConfig(i);
1054
- const d = l.isOutside(i);
1055
- h(d), p === 1 ? Pt(i) : p === 2 && (C(d), $t(i));
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 (!l.current)
1060
+ if (!a.current)
1058
1061
  return;
1059
- const { droppable: d } = l.current;
1060
- vn(
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
- l.current
1073
+ a.current
1071
1074
  );
1072
1075
  }, 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
- }, E = (i) => {
1076
- if (Ot(i) && B && p == 1) {
1077
- const d = i.touches[0].clientY, v = d - B;
1078
- if (B = d, Math.abs(v) > 5)
1079
- return it("touchmove", i), !0;
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 !1;
1082
- }, A = (i) => {
1083
- const d = Vt(i);
1084
- if (Ot(i) && i.cancelable && i.preventDefault(), Ot(i) && !i.cancelable || !T(d) || E(i)) {
1085
- it("touchmove", i);
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 || !T(i)) {
1086
+ ft("touchmove", i);
1086
1087
  return;
1087
1088
  }
1088
- S(d);
1089
- }, N = (i, d) => {
1090
- i == "touchmove" ? $ = setTimeout(() => {
1089
+ D(d, Tt(i));
1090
+ }, A = (i, d) => {
1091
+ i == "touchmove" ? w = setTimeout(() => {
1091
1092
  d();
1092
- }, 200) : d();
1093
- }, x = (i, d) => {
1094
- const { clientX: v, clientY: dt } = i, at = document.elementFromPoint(v, dt), vt = at == null ? void 0 : at.closest(`.${U}`);
1095
- return vt && d.isSameNode(vt);
1096
- }, I = (i) => {
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
- }, j = (i, d) => (v) => {
1100
- if (!x(v, t))
1100
+ }, G = (i, d) => (S) => {
1101
+ if (!N(S, t))
1101
1102
  return;
1102
- ut.updateScrolls(s, y);
1103
- const { scrollX: dt, scrollY: at } = window;
1104
- if (b = { scrollX: dt, scrollY: at }, p === 0) {
1103
+ lt.updateScrolls(s, y);
1104
+ const { scrollX: dt, scrollY: ct } = window;
1105
+ if (E = { scrollX: dt, scrollY: ct }, p === 0) {
1105
1106
  p = 1;
1106
- const vt = I(t);
1107
- vt && F(vt), N(i, () => {
1108
- document.addEventListener(i, A, {
1109
- passive: !1
1110
- });
1111
- }), xt(s), document.addEventListener(d, St(i), {
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
- }, mt = (i) => l.updateConfig(i), St = (i) => (d) => {
1116
- it(i, d);
1117
- }, it = (i, d) => {
1116
+ }, K = (i) => a.updateConfig(i), mt = (i) => (d) => {
1117
+ ft(i, d);
1118
+ }, ft = (i, d) => {
1118
1119
  h(!0);
1119
- const v = Vt(d);
1120
- clearTimeout($), Se(l.isOutside(v, !1)), document.removeEventListener(i, A), l.updateConfig(v);
1121
- const dt = l.getCurrentConfig(v);
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: at } = dt;
1124
- ct(at);
1124
+ const { droppable: ct } = dt;
1125
+ St(ct);
1125
1126
  }
1126
1127
  s.onscroll = null;
1127
- }, ct = (i) => {
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 v of d)
1134
- rt(v) && (v.onscroll = null);
1135
- }, Pt = (i) => {
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
- l.current
1141
- ), At(), _(
1141
+ a.current
1142
+ ), $t(), _(
1142
1143
  t,
1143
1144
  fe,
1144
- b,
1145
- l.current
1146
- ), ve(t), k(i, t);
1147
- }, At = () => {
1145
+ E,
1146
+ a.current
1147
+ ), Se(t), Z(i, t);
1148
+ }, $t = () => {
1148
1149
  p = 2;
1149
- }, $t = (i) => {
1150
- const { pageX: d, pageY: v } = i;
1151
- O = { pageX: d, pageY: v }, ot();
1152
- }, xt = (i) => le(i, "onscroll", Bt), Bt = () => ot(), Se = (i) => {
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
- b,
1161
- i ? l.initial : l.current,
1161
+ E,
1162
+ i ? a.initial : a.current,
1162
1163
  e
1163
1164
  );
1164
1165
  }, Jt = (i) => {
1165
- Ft(i, f, de), Tt(i, 0, 0);
1166
- }, ve = (i) => {
1167
- const { height: d, width: v } = i.getBoundingClientRect();
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: `${v}px`
1171
+ fixedWidth: `${S}px`
1171
1172
  }), q(i, !0), bt(i, m, !0), i.style.transition = "";
1172
1173
  }, De = (i, d) => {
1173
- yt(t, D), Yt(
1174
+ Ct(t, b), Yt(
1174
1175
  t,
1175
1176
  s,
1176
1177
  p == 1,
1177
- l.initial
1178
+ a.initial
1178
1179
  ), H(
1179
1180
  i,
1180
1181
  t,
1181
1182
  d,
1182
- (v) => {
1183
- Jt(v), J(t);
1183
+ (S) => {
1184
+ Jt(S), k(t);
1184
1185
  }
1185
- ), R(e, !0);
1186
- }, be = (i) => {
1187
- if (!l.initial)
1186
+ ), M(e, !0);
1187
+ }, ve = (i) => {
1188
+ if (!a.initial)
1188
1189
  return;
1189
- const d = l.initial;
1190
- i == e && (st(t, D), setTimeout(() => {
1190
+ const d = a.initial;
1191
+ i == e && (st(t, b), setTimeout(() => {
1191
1192
  De(i, d);
1192
1193
  }, g));
1193
- }, Te = (i, d) => {
1194
- (i === e || i === n.onGetLegth() && e === i - 1) && P(
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
- mn(
1201
+ hn(
1201
1202
  t,
1202
1203
  p == 1,
1203
- l.initial
1204
+ a.initial
1204
1205
  );
1205
1206
  }
1206
1207
  );
1207
1208
  };
1208
- return W(), et(t), [be, Te];
1209
+ return W(), et(t), [ve, be];
1209
1210
  }
1210
- const On = (t, e) => {
1211
- t && xe(e, t);
1212
- }, Ln = () => {
1213
- _e(document.body, [
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
- `.${Ce}{cursor:grab;}`,
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
- `.${qt}{position:fixed;z-index:5000;width:var(--fixedWidth)!important;height:var(--fixedHeight)!important;}`,
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 Mn(t, e, n, s = "index") {
1227
+ function Ln(t, e, n, s = "index") {
1227
1228
  const o = s;
1228
1229
  let r = [], c = [];
1229
- const { droppableGroup: a } = t;
1230
+ const { droppableGroup: l } = t;
1230
1231
  if (!n)
1231
1232
  return [
1232
1233
  r,
1233
1234
  c
1234
1235
  ];
1235
- const f = Ct(a).map((g) => `droppable-group-${g}`).join(" ");
1236
- Ln(), On(f, n);
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), D = we(m), R = g;
1239
- if (R && D >= 0) {
1240
- const [M, F] = Rn(
1241
- R,
1242
- D,
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(M), c.push(F);
1248
+ r.push(O), c.push(F);
1248
1249
  }
1249
1250
  }
1250
1251
  return [
@@ -1252,48 +1253,49 @@ function Mn(t, e, n, s = "index") {
1252
1253
  c
1253
1254
  ];
1254
1255
  }
1255
- function Pn(t, e, n, s = "index", o = !0) {
1256
- let r = [], c = [];
1257
- const a = En(t, n), f = (p) => {
1258
- for (const b of r)
1259
- b(p);
1260
- }, g = (p, b) => {
1261
- if (a.onGetLegth() === 0)
1262
- t.insertToListEmpty(a, p, b);
1256
+ function Fn(t, e, n, s = "index") {
1257
+ let o = [], r = [], c;
1258
+ const l = Tn(t, n), f = (p) => {
1259
+ for (const E of o)
1260
+ E(p);
1261
+ }, g = (p, E) => {
1262
+ if (l.onGetLegth() === 0)
1263
+ t.insertToListEmpty(l, p, E);
1263
1264
  else
1264
- for (const B of c)
1265
- B(p, b);
1265
+ for (const w of r)
1266
+ w(p, E);
1266
1267
  }, m = (p) => {
1267
- const [b, O] = Mn(a, e, p, s);
1268
- r = b, c = O;
1269
- }, D = (p) => {
1270
- const b = p.addedNodes.values().filter((B) => !Ht(B)).toArray(), O = p.removedNodes.values().filter((B) => !Ht(B)).toArray();
1271
- return b.length > 0 || O.length > 0;
1272
- }, R = (p) => {
1273
- kt(
1274
- (b) => {
1275
- m(p), o || b.disconnect();
1268
+ const [E, R] = Ln(l, e, p, s);
1269
+ o = E, r = R;
1270
+ }, b = (p) => {
1271
+ const E = p.addedNodes.values().filter((w) => !qt(w)).toArray(), R = p.removedNodes.values().filter((w) => !qt(w)).toArray();
1272
+ return E.length > 0 || R.length > 0;
1273
+ }, M = (p) => {
1274
+ c = kt(
1275
+ () => {
1276
+ m(p);
1276
1277
  },
1277
1278
  p,
1278
1279
  { childList: !0 },
1279
- D
1280
+ b
1280
1281
  );
1281
- }, M = (p) => {
1282
- st(p, It);
1282
+ }, O = (p) => {
1283
+ st(p, Xt);
1283
1284
  }, F = (p) => {
1284
- ut.addConfig(
1285
+ lt.addConfig(
1285
1286
  p,
1286
- a
1287
+ l
1287
1288
  );
1288
1289
  };
1289
1290
  return [f, g, (p) => {
1290
- p && (M(p), F(p), R(p), m(p), ut.removeObsoleteConfigs());
1291
+ if (p)
1292
+ return O(p), F(p), M(p), m(p), lt.removeObsoleteConfigs(), c;
1291
1293
  }];
1292
1294
  }
1293
1295
  export {
1294
- Ce as G,
1296
+ ye as G,
1295
1297
  st as a,
1296
- Pn as d,
1297
- Fn as i,
1298
+ Fn as d,
1299
+ Nn as i,
1298
1300
  bt as t
1299
1301
  };