@object-ui/plugin-kanban 0.3.0 → 0.5.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,9 +1,6 @@
1
- import { j as L } from "./index-i_5clVsp.js";
2
- import * as ye from "react";
3
- import j, { useLayoutEffect as zn, useEffect as T, useRef as M, useMemo as A, useCallback as $, useState as X, memo as Bn, useReducer as Fn, createContext as Ke, useContext as pe, forwardRef as $n, cloneElement as Xn } from "react";
4
- import { unstable_batchedUpdates as et, createPortal as Yn } from "react-dom";
5
- import { Badge as en, ScrollArea as Kn, Card as Wn, CardHeader as Hn, CardTitle as Un, CardDescription as Vn, CardContent as qn } from "@object-ui/components";
6
- function Gn() {
1
+ import M, { useRef as I, useMemo as A, useLayoutEffect as Nn, useEffect as T, useCallback as F, useState as $, memo as Mn, useReducer as Ln, useContext as ve, createContext as je, cloneElement as Pn, forwardRef as zn } from "react";
2
+ import { unstable_batchedUpdates as Qe, createPortal as kn } from "react-dom";
3
+ function Bn() {
7
4
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
8
5
  t[n] = arguments[n];
9
6
  return A(
@@ -14,62 +11,62 @@ function Gn() {
14
11
  t
15
12
  );
16
13
  }
17
- const dt = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
18
- function Ne(e) {
14
+ const lt = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
15
+ function Re(e) {
19
16
  const t = Object.prototype.toString.call(e);
20
17
  return t === "[object Window]" || // In Electron context the Window object serializes to [object global]
21
18
  t === "[object global]";
22
19
  }
23
- function Rt(e) {
20
+ function St(e) {
24
21
  return "nodeType" in e;
25
22
  }
26
- function Y(e) {
23
+ function X(e) {
27
24
  var t, n;
28
- return e ? Ne(e) ? e : Rt(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
25
+ return e ? Re(e) ? e : St(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
29
26
  }
30
- function Et(e) {
27
+ function Ct(e) {
31
28
  const {
32
29
  Document: t
33
- } = Y(e);
30
+ } = X(e);
34
31
  return e instanceof t;
35
32
  }
36
- function We(e) {
37
- return Ne(e) ? !1 : e instanceof Y(e).HTMLElement;
33
+ function Ye(e) {
34
+ return Re(e) ? !1 : e instanceof X(e).HTMLElement;
38
35
  }
39
- function tn(e) {
40
- return e instanceof Y(e).SVGElement;
36
+ function Jt(e) {
37
+ return e instanceof X(e).SVGElement;
41
38
  }
42
- function Ie(e) {
43
- return e ? Ne(e) ? e.document : Rt(e) ? Et(e) ? e : We(e) || tn(e) ? e.ownerDocument : document : document : document;
39
+ function Ee(e) {
40
+ return e ? Re(e) ? e.document : St(e) ? Ct(e) ? e : Ye(e) || Jt(e) ? e.ownerDocument : document : document : document;
44
41
  }
45
- const Q = dt ? zn : T;
46
- function ut(e) {
47
- const t = M(e);
48
- return Q(() => {
42
+ const _ = lt ? Nn : T;
43
+ function ct(e) {
44
+ const t = I(e);
45
+ return _(() => {
49
46
  t.current = e;
50
- }), $(function() {
47
+ }), F(function() {
51
48
  for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
52
49
  r[o] = arguments[o];
53
50
  return t.current == null ? void 0 : t.current(...r);
54
51
  }, []);
55
52
  }
56
- function Jn() {
57
- const e = M(null), t = $((r, o) => {
53
+ function Fn() {
54
+ const e = I(null), t = F((r, o) => {
58
55
  e.current = setInterval(r, o);
59
- }, []), n = $(() => {
56
+ }, []), n = F(() => {
60
57
  e.current !== null && (clearInterval(e.current), e.current = null);
61
58
  }, []);
62
59
  return [t, n];
63
60
  }
64
- function Xe(e, t) {
61
+ function $e(e, t) {
65
62
  t === void 0 && (t = [e]);
66
- const n = M(e);
67
- return Q(() => {
63
+ const n = I(e);
64
+ return _(() => {
68
65
  n.current !== e && (n.current = e);
69
66
  }, t), n;
70
67
  }
71
- function He(e, t) {
72
- const n = M();
68
+ function Ke(e, t) {
69
+ const n = I();
73
70
  return A(
74
71
  () => {
75
72
  const r = e(n.current);
@@ -79,8 +76,8 @@ function He(e, t) {
79
76
  [...t]
80
77
  );
81
78
  }
82
- function ot(e) {
83
- const t = ut(e), n = M(null), r = $(
79
+ function nt(e) {
80
+ const t = ct(e), n = I(null), r = F(
84
81
  (o) => {
85
82
  o !== n.current && t?.(o, n.current), n.current = o;
86
83
  },
@@ -89,30 +86,30 @@ function ot(e) {
89
86
  );
90
87
  return [n, r];
91
88
  }
92
- function it(e) {
93
- const t = M();
89
+ function rt(e) {
90
+ const t = I();
94
91
  return T(() => {
95
92
  t.current = e;
96
93
  }, [e]), t.current;
97
94
  }
98
- let mt = {};
99
- function Ue(e, t) {
95
+ let pt = {};
96
+ function We(e, t) {
100
97
  return A(() => {
101
98
  if (t)
102
99
  return t;
103
- const n = mt[e] == null ? 0 : mt[e] + 1;
104
- return mt[e] = n, e + "-" + n;
100
+ const n = pt[e] == null ? 0 : pt[e] + 1;
101
+ return pt[e] = n, e + "-" + n;
105
102
  }, [e, t]);
106
103
  }
107
- function nn(e) {
104
+ function _t(e) {
108
105
  return function(t) {
109
106
  for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
110
107
  r[o - 1] = arguments[o];
111
108
  return r.reduce((i, s) => {
112
109
  const a = Object.entries(s);
113
110
  for (const [l, c] of a) {
114
- const d = i[l];
115
- d != null && (i[l] = d + e * c);
111
+ const u = i[l];
112
+ u != null && (i[l] = u + e * c);
116
113
  }
117
114
  return i;
118
115
  }, {
@@ -120,28 +117,28 @@ function nn(e) {
120
117
  });
121
118
  };
122
119
  }
123
- const Ee = /* @__PURE__ */ nn(1), st = /* @__PURE__ */ nn(-1);
124
- function _n(e) {
120
+ const Ce = /* @__PURE__ */ _t(1), ot = /* @__PURE__ */ _t(-1);
121
+ function $n(e) {
125
122
  return "clientX" in e && "clientY" in e;
126
123
  }
127
- function ft(e) {
124
+ function ut(e) {
128
125
  if (!e)
129
126
  return !1;
130
127
  const {
131
128
  KeyboardEvent: t
132
- } = Y(e.target);
129
+ } = X(e.target);
133
130
  return t && e instanceof t;
134
131
  }
135
- function Qn(e) {
132
+ function Xn(e) {
136
133
  if (!e)
137
134
  return !1;
138
135
  const {
139
136
  TouchEvent: t
140
- } = Y(e.target);
137
+ } = X(e.target);
141
138
  return t && e instanceof t;
142
139
  }
143
- function at(e) {
144
- if (Qn(e)) {
140
+ function it(e) {
141
+ if (Xn(e)) {
145
142
  if (e.touches && e.touches.length) {
146
143
  const {
147
144
  clientX: t,
@@ -162,7 +159,7 @@ function at(e) {
162
159
  };
163
160
  }
164
161
  }
165
- return _n(e) ? {
162
+ return $n(e) ? {
166
163
  x: e.clientX,
167
164
  y: e.clientY
168
165
  } : null;
@@ -206,24 +203,24 @@ const be = /* @__PURE__ */ Object.freeze({
206
203
  return t + " " + n + "ms " + r;
207
204
  }
208
205
  }
209
- }), Xt = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
210
- function Zn(e) {
211
- return e.matches(Xt) ? e : e.querySelector(Xt);
206
+ }), Bt = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
207
+ function jn(e) {
208
+ return e.matches(Bt) ? e : e.querySelector(Bt);
212
209
  }
213
- const er = {
210
+ const Yn = {
214
211
  display: "none"
215
212
  };
216
- function tr(e) {
213
+ function Kn(e) {
217
214
  let {
218
215
  id: t,
219
216
  value: n
220
217
  } = e;
221
- return j.createElement("div", {
218
+ return M.createElement("div", {
222
219
  id: t,
223
- style: er
220
+ style: Yn
224
221
  }, n);
225
222
  }
226
- function nr(e) {
223
+ function Wn(e) {
227
224
  let {
228
225
  id: t,
229
226
  announcement: n,
@@ -243,7 +240,7 @@ function nr(e) {
243
240
  clipPath: "inset(100%)",
244
241
  whiteSpace: "nowrap"
245
242
  };
246
- return j.createElement("div", {
243
+ return M.createElement("div", {
247
244
  id: t,
248
245
  style: o,
249
246
  role: "status",
@@ -251,27 +248,27 @@ function nr(e) {
251
248
  "aria-atomic": !0
252
249
  }, n);
253
250
  }
254
- function rr() {
255
- const [e, t] = X("");
251
+ function Un() {
252
+ const [e, t] = $("");
256
253
  return {
257
- announce: $((r) => {
254
+ announce: F((r) => {
258
255
  r != null && t(r);
259
256
  }, []),
260
257
  announcement: e
261
258
  };
262
259
  }
263
- const rn = /* @__PURE__ */ Ke(null);
264
- function or(e) {
265
- const t = pe(rn);
260
+ const Qt = /* @__PURE__ */ je(null);
261
+ function Hn(e) {
262
+ const t = ve(Qt);
266
263
  T(() => {
267
264
  if (!t)
268
265
  throw new Error("useDndMonitor must be used within a children of <DndContext>");
269
266
  return t(e);
270
267
  }, [e, t]);
271
268
  }
272
- function ir() {
273
- const [e] = X(() => /* @__PURE__ */ new Set()), t = $((r) => (e.add(r), () => e.delete(r)), [e]);
274
- return [$((r) => {
269
+ function Vn() {
270
+ const [e] = $(() => /* @__PURE__ */ new Set()), t = F((r) => (e.add(r), () => e.delete(r)), [e]);
271
+ return [F((r) => {
275
272
  let {
276
273
  type: o,
277
274
  event: i
@@ -282,13 +279,13 @@ function ir() {
282
279
  });
283
280
  }, [e]), t];
284
281
  }
285
- const sr = {
282
+ const qn = {
286
283
  draggable: `
287
284
  To pick up a draggable item, press the space bar.
288
285
  While dragging, use the arrow keys to move the item.
289
286
  Press space again to drop the item in its new position, or press escape to cancel.
290
287
  `
291
- }, ar = {
288
+ }, Gn = {
292
289
  onDragStart(e) {
293
290
  let {
294
291
  active: t
@@ -316,86 +313,86 @@ const sr = {
316
313
  return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
317
314
  }
318
315
  };
319
- function lr(e) {
316
+ function Jn(e) {
320
317
  let {
321
- announcements: t = ar,
318
+ announcements: t = Gn,
322
319
  container: n,
323
320
  hiddenTextDescribedById: r,
324
- screenReaderInstructions: o = sr
321
+ screenReaderInstructions: o = qn
325
322
  } = e;
326
323
  const {
327
324
  announce: i,
328
325
  announcement: s
329
- } = rr(), a = Ue("DndLiveRegion"), [l, c] = X(!1);
326
+ } = Un(), a = We("DndLiveRegion"), [l, c] = $(!1);
330
327
  if (T(() => {
331
328
  c(!0);
332
- }, []), or(A(() => ({
333
- onDragStart(u) {
329
+ }, []), Hn(A(() => ({
330
+ onDragStart(d) {
334
331
  let {
335
- active: h
336
- } = u;
332
+ active: g
333
+ } = d;
337
334
  i(t.onDragStart({
338
- active: h
335
+ active: g
339
336
  }));
340
337
  },
341
- onDragMove(u) {
338
+ onDragMove(d) {
342
339
  let {
343
- active: h,
340
+ active: g,
344
341
  over: f
345
- } = u;
342
+ } = d;
346
343
  t.onDragMove && i(t.onDragMove({
347
- active: h,
344
+ active: g,
348
345
  over: f
349
346
  }));
350
347
  },
351
- onDragOver(u) {
348
+ onDragOver(d) {
352
349
  let {
353
- active: h,
350
+ active: g,
354
351
  over: f
355
- } = u;
352
+ } = d;
356
353
  i(t.onDragOver({
357
- active: h,
354
+ active: g,
358
355
  over: f
359
356
  }));
360
357
  },
361
- onDragEnd(u) {
358
+ onDragEnd(d) {
362
359
  let {
363
- active: h,
360
+ active: g,
364
361
  over: f
365
- } = u;
362
+ } = d;
366
363
  i(t.onDragEnd({
367
- active: h,
364
+ active: g,
368
365
  over: f
369
366
  }));
370
367
  },
371
- onDragCancel(u) {
368
+ onDragCancel(d) {
372
369
  let {
373
- active: h,
370
+ active: g,
374
371
  over: f
375
- } = u;
372
+ } = d;
376
373
  i(t.onDragCancel({
377
- active: h,
374
+ active: g,
378
375
  over: f
379
376
  }));
380
377
  }
381
378
  }), [i, t])), !l)
382
379
  return null;
383
- const d = j.createElement(j.Fragment, null, j.createElement(tr, {
380
+ const u = M.createElement(M.Fragment, null, M.createElement(Kn, {
384
381
  id: r,
385
382
  value: o.draggable
386
- }), j.createElement(nr, {
383
+ }), M.createElement(Wn, {
387
384
  id: a,
388
385
  announcement: s
389
386
  }));
390
- return n ? Yn(d, n) : d;
387
+ return n ? kn(u, n) : u;
391
388
  }
392
- var k;
389
+ var P;
393
390
  (function(e) {
394
391
  e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
395
- })(k || (k = {}));
396
- function lt() {
392
+ })(P || (P = {}));
393
+ function st() {
397
394
  }
398
- function cr(e, t) {
395
+ function Ao(e, t) {
399
396
  return A(
400
397
  () => ({
401
398
  sensor: e,
@@ -405,7 +402,7 @@ function cr(e, t) {
405
402
  [e, t]
406
403
  );
407
404
  }
408
- function dr() {
405
+ function Oo() {
409
406
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
410
407
  t[n] = arguments[n];
411
408
  return A(
@@ -414,15 +411,15 @@ function dr() {
414
411
  [...t]
415
412
  );
416
413
  }
417
- const Z = /* @__PURE__ */ Object.freeze({
414
+ const Q = /* @__PURE__ */ Object.freeze({
418
415
  x: 0,
419
416
  y: 0
420
417
  });
421
- function ur(e, t) {
418
+ function _n(e, t) {
422
419
  return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2));
423
420
  }
424
- function fr(e, t) {
425
- const n = at(e);
421
+ function Qn(e, t) {
422
+ const n = it(e);
426
423
  if (!n)
427
424
  return "0 0";
428
425
  const r = {
@@ -431,7 +428,7 @@ function fr(e, t) {
431
428
  };
432
429
  return r.x + "% " + r.y + "%";
433
430
  }
434
- function gr(e, t) {
431
+ function Zn(e, t) {
435
432
  let {
436
433
  data: {
437
434
  value: n
@@ -443,7 +440,7 @@ function gr(e, t) {
443
440
  } = t;
444
441
  return n - r;
445
442
  }
446
- function hr(e, t) {
443
+ function er(e, t) {
447
444
  let {
448
445
  data: {
449
446
  value: n
@@ -455,7 +452,7 @@ function hr(e, t) {
455
452
  } = t;
456
453
  return r - n;
457
454
  }
458
- function Yt(e) {
455
+ function Ft(e) {
459
456
  let {
460
457
  left: t,
461
458
  top: n,
@@ -476,45 +473,45 @@ function Yt(e) {
476
473
  y: n + r
477
474
  }];
478
475
  }
479
- function vr(e, t) {
476
+ function tr(e, t) {
480
477
  if (!e || e.length === 0)
481
478
  return null;
482
479
  const [n] = e;
483
480
  return n[t];
484
481
  }
485
- const pr = (e) => {
482
+ const Io = (e) => {
486
483
  let {
487
484
  collisionRect: t,
488
485
  droppableRects: n,
489
486
  droppableContainers: r
490
487
  } = e;
491
- const o = Yt(t), i = [];
488
+ const o = Ft(t), i = [];
492
489
  for (const s of r) {
493
490
  const {
494
491
  id: a
495
492
  } = s, l = n.get(a);
496
493
  if (l) {
497
- const c = Yt(l), d = o.reduce((h, f, p) => h + ur(c[p], f), 0), u = Number((d / 4).toFixed(4));
494
+ const c = Ft(l), u = o.reduce((g, f, x) => g + _n(c[x], f), 0), d = Number((u / 4).toFixed(4));
498
495
  i.push({
499
496
  id: a,
500
497
  data: {
501
498
  droppableContainer: s,
502
- value: u
499
+ value: d
503
500
  }
504
501
  });
505
502
  }
506
503
  }
507
- return i.sort(gr);
504
+ return i.sort(Zn);
508
505
  };
509
- function br(e, t) {
506
+ function nr(e, t) {
510
507
  const n = Math.max(t.top, e.top), r = Math.max(t.left, e.left), o = Math.min(t.left + t.width, e.left + e.width), i = Math.min(t.top + t.height, e.top + e.height), s = o - r, a = i - n;
511
508
  if (r < o && n < i) {
512
- const l = t.width * t.height, c = e.width * e.height, d = s * a, u = d / (l + c - d);
513
- return Number(u.toFixed(4));
509
+ const l = t.width * t.height, c = e.width * e.height, u = s * a, d = u / (l + c - u);
510
+ return Number(d.toFixed(4));
514
511
  }
515
512
  return 0;
516
513
  }
517
- const mr = (e) => {
514
+ const rr = (e) => {
518
515
  let {
519
516
  collisionRect: t,
520
517
  droppableRects: n,
@@ -526,7 +523,7 @@ const mr = (e) => {
526
523
  id: s
527
524
  } = i, a = n.get(s);
528
525
  if (a) {
529
- const l = br(a, t);
526
+ const l = nr(a, t);
530
527
  l > 0 && o.push({
531
528
  id: s,
532
529
  data: {
@@ -536,22 +533,22 @@ const mr = (e) => {
536
533
  });
537
534
  }
538
535
  }
539
- return o.sort(hr);
536
+ return o.sort(er);
540
537
  };
541
- function yr(e, t, n) {
538
+ function or(e, t, n) {
542
539
  return {
543
540
  ...e,
544
541
  scaleX: t && n ? t.width / n.width : 1,
545
542
  scaleY: t && n ? t.height / n.height : 1
546
543
  };
547
544
  }
548
- function on(e, t) {
545
+ function Zt(e, t) {
549
546
  return e && t ? {
550
547
  x: e.left - t.left,
551
548
  y: e.top - t.top
552
- } : Z;
549
+ } : Q;
553
550
  }
554
- function xr(e) {
551
+ function ir(e) {
555
552
  return function(n) {
556
553
  for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
557
554
  o[i - 1] = arguments[i];
@@ -566,8 +563,8 @@ function xr(e) {
566
563
  });
567
564
  };
568
565
  }
569
- const wr = /* @__PURE__ */ xr(1);
570
- function sn(e) {
566
+ const sr = /* @__PURE__ */ ir(1);
567
+ function en(e) {
571
568
  if (e.startsWith("matrix3d(")) {
572
569
  const t = e.slice(9, -1).split(/, /);
573
570
  return {
@@ -587,8 +584,8 @@ function sn(e) {
587
584
  }
588
585
  return null;
589
586
  }
590
- function Dr(e, t, n) {
591
- const r = sn(t);
587
+ function ar(e, t, n) {
588
+ const r = en(t);
592
589
  if (!r)
593
590
  return e;
594
591
  const {
@@ -596,28 +593,28 @@ function Dr(e, t, n) {
596
593
  scaleY: i,
597
594
  x: s,
598
595
  y: a
599
- } = r, l = e.left - s - (1 - o) * parseFloat(n), c = e.top - a - (1 - i) * parseFloat(n.slice(n.indexOf(" ") + 1)), d = o ? e.width / o : e.width, u = i ? e.height / i : e.height;
596
+ } = r, l = e.left - s - (1 - o) * parseFloat(n), c = e.top - a - (1 - i) * parseFloat(n.slice(n.indexOf(" ") + 1)), u = o ? e.width / o : e.width, d = i ? e.height / i : e.height;
600
597
  return {
601
- width: d,
602
- height: u,
598
+ width: u,
599
+ height: d,
603
600
  top: c,
604
- right: l + d,
605
- bottom: c + u,
601
+ right: l + u,
602
+ bottom: c + d,
606
603
  left: l
607
604
  };
608
605
  }
609
- const Cr = {
606
+ const lr = {
610
607
  ignoreTransform: !1
611
608
  };
612
609
  function Ae(e, t) {
613
- t === void 0 && (t = Cr);
610
+ t === void 0 && (t = lr);
614
611
  let n = e.getBoundingClientRect();
615
612
  if (t.ignoreTransform) {
616
613
  const {
617
614
  transform: c,
618
- transformOrigin: d
619
- } = Y(e).getComputedStyle(e);
620
- c && (n = Dr(n, c, d));
615
+ transformOrigin: u
616
+ } = X(e).getComputedStyle(e);
617
+ c && (n = ar(n, c, u));
621
618
  }
622
619
  const {
623
620
  top: r,
@@ -636,12 +633,12 @@ function Ae(e, t) {
636
633
  right: l
637
634
  };
638
635
  }
639
- function Kt(e) {
636
+ function $t(e) {
640
637
  return Ae(e, {
641
638
  ignoreTransform: !0
642
639
  });
643
640
  }
644
- function Sr(e) {
641
+ function cr(e) {
645
642
  const t = e.innerWidth, n = e.innerHeight;
646
643
  return {
647
644
  top: 0,
@@ -652,62 +649,62 @@ function Sr(e) {
652
649
  height: n
653
650
  };
654
651
  }
655
- function Rr(e, t) {
656
- return t === void 0 && (t = Y(e).getComputedStyle(e)), t.position === "fixed";
652
+ function ur(e, t) {
653
+ return t === void 0 && (t = X(e).getComputedStyle(e)), t.position === "fixed";
657
654
  }
658
- function Er(e, t) {
659
- t === void 0 && (t = Y(e).getComputedStyle(e));
655
+ function dr(e, t) {
656
+ t === void 0 && (t = X(e).getComputedStyle(e));
660
657
  const n = /(auto|scroll|overlay)/;
661
658
  return ["overflow", "overflowX", "overflowY"].some((o) => {
662
659
  const i = t[o];
663
660
  return typeof i == "string" ? n.test(i) : !1;
664
661
  });
665
662
  }
666
- function Nt(e, t) {
663
+ function Rt(e, t) {
667
664
  const n = [];
668
665
  function r(o) {
669
666
  if (t != null && n.length >= t || !o)
670
667
  return n;
671
- if (Et(o) && o.scrollingElement != null && !n.includes(o.scrollingElement))
668
+ if (Ct(o) && o.scrollingElement != null && !n.includes(o.scrollingElement))
672
669
  return n.push(o.scrollingElement), n;
673
- if (!We(o) || tn(o) || n.includes(o))
670
+ if (!Ye(o) || Jt(o) || n.includes(o))
674
671
  return n;
675
- const i = Y(e).getComputedStyle(o);
676
- return o !== e && Er(o, i) && n.push(o), Rr(o, i) ? n : r(o.parentNode);
672
+ const i = X(e).getComputedStyle(o);
673
+ return o !== e && dr(o, i) && n.push(o), ur(o, i) ? n : r(o.parentNode);
677
674
  }
678
675
  return e ? r(e) : n;
679
676
  }
680
- function an(e) {
681
- const [t] = Nt(e, 1);
677
+ function tn(e) {
678
+ const [t] = Rt(e, 1);
682
679
  return t ?? null;
683
680
  }
684
- function yt(e) {
685
- return !dt || !e ? null : Ne(e) ? e : Rt(e) ? Et(e) || e === Ie(e).scrollingElement ? window : We(e) ? e : null : null;
681
+ function bt(e) {
682
+ return !lt || !e ? null : Re(e) ? e : St(e) ? Ct(e) || e === Ee(e).scrollingElement ? window : Ye(e) ? e : null : null;
686
683
  }
687
- function ln(e) {
688
- return Ne(e) ? e.scrollX : e.scrollLeft;
684
+ function nn(e) {
685
+ return Re(e) ? e.scrollX : e.scrollLeft;
689
686
  }
690
- function cn(e) {
691
- return Ne(e) ? e.scrollY : e.scrollTop;
687
+ function rn(e) {
688
+ return Re(e) ? e.scrollY : e.scrollTop;
692
689
  }
693
- function Dt(e) {
690
+ function wt(e) {
694
691
  return {
695
- x: ln(e),
696
- y: cn(e)
692
+ x: nn(e),
693
+ y: rn(e)
697
694
  };
698
695
  }
699
- var P;
696
+ var z;
700
697
  (function(e) {
701
698
  e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
702
- })(P || (P = {}));
703
- function dn(e) {
704
- return !dt || !e ? !1 : e === document.scrollingElement;
699
+ })(z || (z = {}));
700
+ function on(e) {
701
+ return !lt || !e ? !1 : e === document.scrollingElement;
705
702
  }
706
- function un(e) {
703
+ function sn(e) {
707
704
  const t = {
708
705
  x: 0,
709
706
  y: 0
710
- }, n = dn(e) ? {
707
+ }, n = on(e) ? {
711
708
  height: window.innerHeight,
712
709
  width: window.innerWidth
713
710
  } : {
@@ -726,39 +723,39 @@ function un(e) {
726
723
  minScroll: t
727
724
  };
728
725
  }
729
- const Nr = {
726
+ const fr = {
730
727
  x: 0.2,
731
728
  y: 0.2
732
729
  };
733
- function Ir(e, t, n, r, o) {
730
+ function gr(e, t, n, r, o) {
734
731
  let {
735
732
  top: i,
736
733
  left: s,
737
734
  right: a,
738
735
  bottom: l
739
736
  } = n;
740
- r === void 0 && (r = 10), o === void 0 && (o = Nr);
737
+ r === void 0 && (r = 10), o === void 0 && (o = fr);
741
738
  const {
742
739
  isTop: c,
743
- isBottom: d,
744
- isLeft: u,
745
- isRight: h
746
- } = un(e), f = {
740
+ isBottom: u,
741
+ isLeft: d,
742
+ isRight: g
743
+ } = sn(e), f = {
747
744
  x: 0,
748
745
  y: 0
749
- }, p = {
746
+ }, x = {
750
747
  x: 0,
751
748
  y: 0
752
- }, g = {
749
+ }, h = {
753
750
  height: t.height * o.y,
754
751
  width: t.width * o.x
755
752
  };
756
- return !c && i <= t.top + g.height ? (f.y = P.Backward, p.y = r * Math.abs((t.top + g.height - i) / g.height)) : !d && l >= t.bottom - g.height && (f.y = P.Forward, p.y = r * Math.abs((t.bottom - g.height - l) / g.height)), !h && a >= t.right - g.width ? (f.x = P.Forward, p.x = r * Math.abs((t.right - g.width - a) / g.width)) : !u && s <= t.left + g.width && (f.x = P.Backward, p.x = r * Math.abs((t.left + g.width - s) / g.width)), {
753
+ return !c && i <= t.top + h.height ? (f.y = z.Backward, x.y = r * Math.abs((t.top + h.height - i) / h.height)) : !u && l >= t.bottom - h.height && (f.y = z.Forward, x.y = r * Math.abs((t.bottom - h.height - l) / h.height)), !g && a >= t.right - h.width ? (f.x = z.Forward, x.x = r * Math.abs((t.right - h.width - a) / h.width)) : !d && s <= t.left + h.width && (f.x = z.Backward, x.x = r * Math.abs((t.left + h.width - s) / h.width)), {
757
754
  direction: f,
758
- speed: p
755
+ speed: x
759
756
  };
760
757
  }
761
- function Ar(e) {
758
+ function hr(e) {
762
759
  if (e === document.scrollingElement) {
763
760
  const {
764
761
  innerWidth: i,
@@ -788,16 +785,16 @@ function Ar(e) {
788
785
  height: e.clientHeight
789
786
  };
790
787
  }
791
- function fn(e) {
792
- return e.reduce((t, n) => Ee(t, Dt(n)), Z);
788
+ function an(e) {
789
+ return e.reduce((t, n) => Ce(t, wt(n)), Q);
793
790
  }
794
- function Or(e) {
795
- return e.reduce((t, n) => t + ln(n), 0);
791
+ function vr(e) {
792
+ return e.reduce((t, n) => t + nn(n), 0);
796
793
  }
797
- function Tr(e) {
798
- return e.reduce((t, n) => t + cn(n), 0);
794
+ function pr(e) {
795
+ return e.reduce((t, n) => t + rn(n), 0);
799
796
  }
800
- function gn(e, t) {
797
+ function ln(e, t) {
801
798
  if (t === void 0 && (t = Ae), !e)
802
799
  return;
803
800
  const {
@@ -806,25 +803,25 @@ function gn(e, t) {
806
803
  bottom: o,
807
804
  right: i
808
805
  } = t(e);
809
- an(e) && (o <= 0 || i <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
806
+ tn(e) && (o <= 0 || i <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
810
807
  block: "center",
811
808
  inline: "center"
812
809
  });
813
810
  }
814
- const Mr = [["x", ["left", "right"], Or], ["y", ["top", "bottom"], Tr]];
815
- class It {
811
+ const br = [["x", ["left", "right"], vr], ["y", ["top", "bottom"], pr]];
812
+ class Et {
816
813
  constructor(t, n) {
817
814
  this.rect = void 0, this.width = void 0, this.height = void 0, this.top = void 0, this.bottom = void 0, this.right = void 0, this.left = void 0;
818
- const r = Nt(n), o = fn(r);
815
+ const r = Rt(n), o = an(r);
819
816
  this.rect = {
820
817
  ...t
821
818
  }, this.width = t.width, this.height = t.height;
822
- for (const [i, s, a] of Mr)
819
+ for (const [i, s, a] of br)
823
820
  for (const l of s)
824
821
  Object.defineProperty(this, l, {
825
822
  get: () => {
826
- const c = a(r), d = o[i] - c;
827
- return this.rect[l] + d;
823
+ const c = a(r), u = o[i] - c;
824
+ return this.rect[l] + u;
828
825
  },
829
826
  enumerable: !0
830
827
  });
@@ -833,7 +830,7 @@ class It {
833
830
  });
834
831
  }
835
832
  }
836
- class Be {
833
+ class ke {
837
834
  constructor(t) {
838
835
  this.target = void 0, this.listeners = [], this.removeAll = () => {
839
836
  this.listeners.forEach((n) => {
@@ -847,62 +844,62 @@ class Be {
847
844
  (o = this.target) == null || o.addEventListener(t, n, r), this.listeners.push([t, n, r]);
848
845
  }
849
846
  }
850
- function Lr(e) {
847
+ function yr(e) {
851
848
  const {
852
849
  EventTarget: t
853
- } = Y(e);
854
- return e instanceof t ? e : Ie(e);
850
+ } = X(e);
851
+ return e instanceof t ? e : Ee(e);
855
852
  }
856
- function xt(e, t) {
853
+ function yt(e, t) {
857
854
  const n = Math.abs(e.x), r = Math.abs(e.y);
858
855
  return typeof t == "number" ? Math.sqrt(n ** 2 + r ** 2) > t : "x" in t && "y" in t ? n > t.x && r > t.y : "x" in t ? n > t.x : "y" in t ? r > t.y : !1;
859
856
  }
860
- var J;
857
+ var q;
861
858
  (function(e) {
862
859
  e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
863
- })(J || (J = {}));
864
- function Wt(e) {
860
+ })(q || (q = {}));
861
+ function Xt(e) {
865
862
  e.preventDefault();
866
863
  }
867
- function jr(e) {
864
+ function mr(e) {
868
865
  e.stopPropagation();
869
866
  }
870
- var N;
867
+ var C;
871
868
  (function(e) {
872
869
  e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
873
- })(N || (N = {}));
874
- const hn = {
875
- start: [N.Space, N.Enter],
876
- cancel: [N.Esc],
877
- end: [N.Space, N.Enter, N.Tab]
878
- }, kr = (e, t) => {
870
+ })(C || (C = {}));
871
+ const cn = {
872
+ start: [C.Space, C.Enter],
873
+ cancel: [C.Esc],
874
+ end: [C.Space, C.Enter, C.Tab]
875
+ }, wr = (e, t) => {
879
876
  let {
880
877
  currentCoordinates: n
881
878
  } = t;
882
879
  switch (e.code) {
883
- case N.Right:
880
+ case C.Right:
884
881
  return {
885
882
  ...n,
886
883
  x: n.x + 25
887
884
  };
888
- case N.Left:
885
+ case C.Left:
889
886
  return {
890
887
  ...n,
891
888
  x: n.x - 25
892
889
  };
893
- case N.Down:
890
+ case C.Down:
894
891
  return {
895
892
  ...n,
896
893
  y: n.y + 25
897
894
  };
898
- case N.Up:
895
+ case C.Up:
899
896
  return {
900
897
  ...n,
901
898
  y: n.y - 25
902
899
  };
903
900
  }
904
901
  };
905
- class vn {
902
+ class un {
906
903
  constructor(t) {
907
904
  this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = t;
908
905
  const {
@@ -910,27 +907,27 @@ class vn {
910
907
  target: n
911
908
  }
912
909
  } = t;
913
- this.props = t, this.listeners = new Be(Ie(n)), this.windowListeners = new Be(Y(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
910
+ this.props = t, this.listeners = new ke(Ee(n)), this.windowListeners = new ke(X(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
914
911
  }
915
912
  attach() {
916
- this.handleStart(), this.windowListeners.add(J.Resize, this.handleCancel), this.windowListeners.add(J.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(J.Keydown, this.handleKeyDown));
913
+ this.handleStart(), this.windowListeners.add(q.Resize, this.handleCancel), this.windowListeners.add(q.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(q.Keydown, this.handleKeyDown));
917
914
  }
918
915
  handleStart() {
919
916
  const {
920
917
  activeNode: t,
921
918
  onStart: n
922
919
  } = this.props, r = t.node.current;
923
- r && gn(r), n(Z);
920
+ r && ln(r), n(Q);
924
921
  }
925
922
  handleKeyDown(t) {
926
- if (ft(t)) {
923
+ if (ut(t)) {
927
924
  const {
928
925
  active: n,
929
926
  context: r,
930
927
  options: o
931
928
  } = this.props, {
932
- keyboardCodes: i = hn,
933
- coordinateGetter: s = kr,
929
+ keyboardCodes: i = cn,
930
+ coordinateGetter: s = wr,
934
931
  scrollBehavior: a = "smooth"
935
932
  } = o, {
936
933
  code: l
@@ -945,66 +942,66 @@ class vn {
945
942
  }
946
943
  const {
947
944
  collisionRect: c
948
- } = r.current, d = c ? {
945
+ } = r.current, u = c ? {
949
946
  x: c.left,
950
947
  y: c.top
951
- } : Z;
952
- this.referenceCoordinates || (this.referenceCoordinates = d);
953
- const u = s(t, {
948
+ } : Q;
949
+ this.referenceCoordinates || (this.referenceCoordinates = u);
950
+ const d = s(t, {
954
951
  active: n,
955
952
  context: r.current,
956
- currentCoordinates: d
953
+ currentCoordinates: u
957
954
  });
958
- if (u) {
959
- const h = st(u, d), f = {
955
+ if (d) {
956
+ const g = ot(d, u), f = {
960
957
  x: 0,
961
958
  y: 0
962
959
  }, {
963
- scrollableAncestors: p
960
+ scrollableAncestors: x
964
961
  } = r.current;
965
- for (const g of p) {
962
+ for (const h of x) {
966
963
  const v = t.code, {
967
- isTop: b,
964
+ isTop: p,
968
965
  isRight: y,
969
- isLeft: m,
966
+ isLeft: b,
970
967
  isBottom: D,
971
- maxScroll: x,
972
- minScroll: S
973
- } = un(g), w = Ar(g), C = {
974
- x: Math.min(v === N.Right ? w.right - w.width / 2 : w.right, Math.max(v === N.Right ? w.left : w.left + w.width / 2, u.x)),
975
- y: Math.min(v === N.Down ? w.bottom - w.height / 2 : w.bottom, Math.max(v === N.Down ? w.top : w.top + w.height / 2, u.y))
976
- }, R = v === N.Right && !y || v === N.Left && !m, O = v === N.Down && !D || v === N.Up && !b;
977
- if (R && C.x !== u.x) {
978
- const E = g.scrollLeft + h.x, z = v === N.Right && E <= x.x || v === N.Left && E >= S.x;
979
- if (z && !h.y) {
980
- g.scrollTo({
981
- left: E,
968
+ maxScroll: S,
969
+ minScroll: R
970
+ } = sn(h), m = hr(h), w = {
971
+ x: Math.min(v === C.Right ? m.right - m.width / 2 : m.right, Math.max(v === C.Right ? m.left : m.left + m.width / 2, d.x)),
972
+ y: Math.min(v === C.Down ? m.bottom - m.height / 2 : m.bottom, Math.max(v === C.Down ? m.top : m.top + m.height / 2, d.y))
973
+ }, N = v === C.Right && !y || v === C.Left && !b, L = v === C.Down && !D || v === C.Up && !p;
974
+ if (N && w.x !== d.x) {
975
+ const O = h.scrollLeft + g.x, G = v === C.Right && O <= S.x || v === C.Left && O >= R.x;
976
+ if (G && !g.y) {
977
+ h.scrollTo({
978
+ left: O,
982
979
  behavior: a
983
980
  });
984
981
  return;
985
982
  }
986
- z ? f.x = g.scrollLeft - E : f.x = v === N.Right ? g.scrollLeft - x.x : g.scrollLeft - S.x, f.x && g.scrollBy({
983
+ G ? f.x = h.scrollLeft - O : f.x = v === C.Right ? h.scrollLeft - S.x : h.scrollLeft - R.x, f.x && h.scrollBy({
987
984
  left: -f.x,
988
985
  behavior: a
989
986
  });
990
987
  break;
991
- } else if (O && C.y !== u.y) {
992
- const E = g.scrollTop + h.y, z = v === N.Down && E <= x.y || v === N.Up && E >= S.y;
993
- if (z && !h.x) {
994
- g.scrollTo({
995
- top: E,
988
+ } else if (L && w.y !== d.y) {
989
+ const O = h.scrollTop + g.y, G = v === C.Down && O <= S.y || v === C.Up && O >= R.y;
990
+ if (G && !g.x) {
991
+ h.scrollTo({
992
+ top: O,
996
993
  behavior: a
997
994
  });
998
995
  return;
999
996
  }
1000
- z ? f.y = g.scrollTop - E : f.y = v === N.Down ? g.scrollTop - x.y : g.scrollTop - S.y, f.y && g.scrollBy({
997
+ G ? f.y = h.scrollTop - O : f.y = v === C.Down ? h.scrollTop - S.y : h.scrollTop - R.y, f.y && h.scrollBy({
1001
998
  top: -f.y,
1002
999
  behavior: a
1003
1000
  });
1004
1001
  break;
1005
1002
  }
1006
1003
  }
1007
- this.handleMove(t, Ee(st(u, this.referenceCoordinates), f));
1004
+ this.handleMove(t, Ce(ot(d, this.referenceCoordinates), f));
1008
1005
  }
1009
1006
  }
1010
1007
  }
@@ -1030,11 +1027,11 @@ class vn {
1030
1027
  this.listeners.removeAll(), this.windowListeners.removeAll();
1031
1028
  }
1032
1029
  }
1033
- vn.activators = [{
1030
+ un.activators = [{
1034
1031
  eventName: "onKeyDown",
1035
1032
  handler: (e, t, n) => {
1036
1033
  let {
1037
- keyboardCodes: r = hn,
1034
+ keyboardCodes: r = cn,
1038
1035
  onActivation: o
1039
1036
  } = t, {
1040
1037
  active: i
@@ -1051,22 +1048,22 @@ vn.activators = [{
1051
1048
  return !1;
1052
1049
  }
1053
1050
  }];
1054
- function Ht(e) {
1051
+ function jt(e) {
1055
1052
  return !!(e && "distance" in e);
1056
1053
  }
1057
- function Ut(e) {
1054
+ function Yt(e) {
1058
1055
  return !!(e && "delay" in e);
1059
1056
  }
1060
1057
  class At {
1061
1058
  constructor(t, n, r) {
1062
1059
  var o;
1063
- r === void 0 && (r = Lr(t.event.target)), this.props = void 0, this.events = void 0, this.autoScrollEnabled = !0, this.document = void 0, this.activated = !1, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = t, this.events = n;
1060
+ r === void 0 && (r = yr(t.event.target)), this.props = void 0, this.events = void 0, this.autoScrollEnabled = !0, this.document = void 0, this.activated = !1, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = t, this.events = n;
1064
1061
  const {
1065
1062
  event: i
1066
1063
  } = t, {
1067
1064
  target: s
1068
1065
  } = i;
1069
- this.props = t, this.events = n, this.document = Ie(s), this.documentListeners = new Be(this.document), this.listeners = new Be(r), this.windowListeners = new Be(Y(s)), this.initialCoordinates = (o = at(i)) != null ? o : Z, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
1066
+ this.props = t, this.events = n, this.document = Ee(s), this.documentListeners = new ke(this.document), this.listeners = new ke(r), this.windowListeners = new ke(X(s)), this.initialCoordinates = (o = it(i)) != null ? o : Q, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
1070
1067
  }
1071
1068
  attach() {
1072
1069
  const {
@@ -1080,18 +1077,18 @@ class At {
1080
1077
  } = this;
1081
1078
  if (this.listeners.add(t.move.name, this.handleMove, {
1082
1079
  passive: !1
1083
- }), this.listeners.add(t.end.name, this.handleEnd), t.cancel && this.listeners.add(t.cancel.name, this.handleCancel), this.windowListeners.add(J.Resize, this.handleCancel), this.windowListeners.add(J.DragStart, Wt), this.windowListeners.add(J.VisibilityChange, this.handleCancel), this.windowListeners.add(J.ContextMenu, Wt), this.documentListeners.add(J.Keydown, this.handleKeydown), n) {
1080
+ }), this.listeners.add(t.end.name, this.handleEnd), t.cancel && this.listeners.add(t.cancel.name, this.handleCancel), this.windowListeners.add(q.Resize, this.handleCancel), this.windowListeners.add(q.DragStart, Xt), this.windowListeners.add(q.VisibilityChange, this.handleCancel), this.windowListeners.add(q.ContextMenu, Xt), this.documentListeners.add(q.Keydown, this.handleKeydown), n) {
1084
1081
  if (r != null && r({
1085
1082
  event: this.props.event,
1086
1083
  activeNode: this.props.activeNode,
1087
1084
  options: this.props.options
1088
1085
  }))
1089
1086
  return this.handleStart();
1090
- if (Ut(n)) {
1087
+ if (Yt(n)) {
1091
1088
  this.timeoutId = setTimeout(this.handleStart, n.delay), this.handlePending(n);
1092
1089
  return;
1093
1090
  }
1094
- if (Ht(n)) {
1091
+ if (jt(n)) {
1095
1092
  this.handlePending(n);
1096
1093
  return;
1097
1094
  }
@@ -1114,9 +1111,9 @@ class At {
1114
1111
  } = this, {
1115
1112
  onStart: n
1116
1113
  } = this.props;
1117
- t && (this.activated = !0, this.documentListeners.add(J.Click, jr, {
1114
+ t && (this.activated = !0, this.documentListeners.add(q.Click, mr, {
1118
1115
  capture: !0
1119
- }), this.removeTextSelection(), this.documentListeners.add(J.SelectionChange, this.removeTextSelection), n(t));
1116
+ }), this.removeTextSelection(), this.documentListeners.add(q.SelectionChange, this.removeTextSelection), n(t));
1120
1117
  }
1121
1118
  handleMove(t) {
1122
1119
  var n;
@@ -1132,15 +1129,15 @@ class At {
1132
1129
  } = i;
1133
1130
  if (!o)
1134
1131
  return;
1135
- const l = (n = at(t)) != null ? n : Z, c = st(o, l);
1132
+ const l = (n = it(t)) != null ? n : Q, c = ot(o, l);
1136
1133
  if (!r && a) {
1137
- if (Ht(a)) {
1138
- if (a.tolerance != null && xt(c, a.tolerance))
1134
+ if (jt(a)) {
1135
+ if (a.tolerance != null && yt(c, a.tolerance))
1139
1136
  return this.handleCancel();
1140
- if (xt(c, a.distance))
1137
+ if (yt(c, a.distance))
1141
1138
  return this.handleStart();
1142
1139
  }
1143
- if (Ut(a) && xt(c, a.tolerance))
1140
+ if (Yt(a) && yt(c, a.tolerance))
1144
1141
  return this.handleCancel();
1145
1142
  this.handlePending(a, c);
1146
1143
  return;
@@ -1162,14 +1159,14 @@ class At {
1162
1159
  this.detach(), this.activated || t(this.props.active), n();
1163
1160
  }
1164
1161
  handleKeydown(t) {
1165
- t.code === N.Esc && this.handleCancel();
1162
+ t.code === C.Esc && this.handleCancel();
1166
1163
  }
1167
1164
  removeTextSelection() {
1168
1165
  var t;
1169
1166
  (t = this.document.getSelection()) == null || t.removeAllRanges();
1170
1167
  }
1171
1168
  }
1172
- const Pr = {
1169
+ const xr = {
1173
1170
  cancel: {
1174
1171
  name: "pointercancel"
1175
1172
  },
@@ -1180,15 +1177,15 @@ const Pr = {
1180
1177
  name: "pointerup"
1181
1178
  }
1182
1179
  };
1183
- class Ot extends At {
1180
+ class dn extends At {
1184
1181
  constructor(t) {
1185
1182
  const {
1186
1183
  event: n
1187
- } = t, r = Ie(n.target);
1188
- super(t, Pr, r);
1184
+ } = t, r = Ee(n.target);
1185
+ super(t, xr, r);
1189
1186
  }
1190
1187
  }
1191
- Ot.activators = [{
1188
+ dn.activators = [{
1192
1189
  eventName: "onPointerDown",
1193
1190
  handler: (e, t) => {
1194
1191
  let {
@@ -1201,7 +1198,7 @@ Ot.activators = [{
1201
1198
  }), !0);
1202
1199
  }
1203
1200
  }];
1204
- const zr = {
1201
+ const Dr = {
1205
1202
  move: {
1206
1203
  name: "mousemove"
1207
1204
  },
@@ -1209,16 +1206,16 @@ const zr = {
1209
1206
  name: "mouseup"
1210
1207
  }
1211
1208
  };
1212
- var Ct;
1209
+ var xt;
1213
1210
  (function(e) {
1214
1211
  e[e.RightClick = 2] = "RightClick";
1215
- })(Ct || (Ct = {}));
1216
- class Br extends At {
1212
+ })(xt || (xt = {}));
1213
+ class Sr extends At {
1217
1214
  constructor(t) {
1218
- super(t, zr, Ie(t.event.target));
1215
+ super(t, Dr, Ee(t.event.target));
1219
1216
  }
1220
1217
  }
1221
- Br.activators = [{
1218
+ Sr.activators = [{
1222
1219
  eventName: "onMouseDown",
1223
1220
  handler: (e, t) => {
1224
1221
  let {
@@ -1226,12 +1223,12 @@ Br.activators = [{
1226
1223
  } = e, {
1227
1224
  onActivation: r
1228
1225
  } = t;
1229
- return n.button === Ct.RightClick ? !1 : (r?.({
1226
+ return n.button === xt.RightClick ? !1 : (r?.({
1230
1227
  event: n
1231
1228
  }), !0);
1232
1229
  }
1233
1230
  }];
1234
- const wt = {
1231
+ const mt = {
1235
1232
  cancel: {
1236
1233
  name: "touchcancel"
1237
1234
  },
@@ -1242,22 +1239,22 @@ const wt = {
1242
1239
  name: "touchend"
1243
1240
  }
1244
1241
  };
1245
- class Fr extends At {
1242
+ class Cr extends At {
1246
1243
  constructor(t) {
1247
- super(t, wt);
1244
+ super(t, mt);
1248
1245
  }
1249
1246
  static setup() {
1250
- return window.addEventListener(wt.move.name, t, {
1247
+ return window.addEventListener(mt.move.name, t, {
1251
1248
  capture: !1,
1252
1249
  passive: !1
1253
1250
  }), function() {
1254
- window.removeEventListener(wt.move.name, t);
1251
+ window.removeEventListener(mt.move.name, t);
1255
1252
  };
1256
1253
  function t() {
1257
1254
  }
1258
1255
  }
1259
1256
  }
1260
- Fr.activators = [{
1257
+ Cr.activators = [{
1261
1258
  eventName: "onTouchStart",
1262
1259
  handler: (e, t) => {
1263
1260
  let {
@@ -1273,152 +1270,152 @@ Fr.activators = [{
1273
1270
  }), !0);
1274
1271
  }
1275
1272
  }];
1276
- var Fe;
1273
+ var Be;
1277
1274
  (function(e) {
1278
1275
  e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect";
1279
- })(Fe || (Fe = {}));
1280
- var ct;
1276
+ })(Be || (Be = {}));
1277
+ var at;
1281
1278
  (function(e) {
1282
1279
  e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
1283
- })(ct || (ct = {}));
1284
- function $r(e) {
1280
+ })(at || (at = {}));
1281
+ function Rr(e) {
1285
1282
  let {
1286
1283
  acceleration: t,
1287
- activator: n = Fe.Pointer,
1284
+ activator: n = Be.Pointer,
1288
1285
  canScroll: r,
1289
1286
  draggingRect: o,
1290
1287
  enabled: i,
1291
1288
  interval: s = 5,
1292
- order: a = ct.TreeOrder,
1289
+ order: a = at.TreeOrder,
1293
1290
  pointerCoordinates: l,
1294
1291
  scrollableAncestors: c,
1295
- scrollableAncestorRects: d,
1296
- delta: u,
1297
- threshold: h
1292
+ scrollableAncestorRects: u,
1293
+ delta: d,
1294
+ threshold: g
1298
1295
  } = e;
1299
- const f = Yr({
1300
- delta: u,
1296
+ const f = Ar({
1297
+ delta: d,
1301
1298
  disabled: !i
1302
- }), [p, g] = Jn(), v = M({
1299
+ }), [x, h] = Fn(), v = I({
1303
1300
  x: 0,
1304
1301
  y: 0
1305
- }), b = M({
1302
+ }), p = I({
1306
1303
  x: 0,
1307
1304
  y: 0
1308
1305
  }), y = A(() => {
1309
1306
  switch (n) {
1310
- case Fe.Pointer:
1307
+ case Be.Pointer:
1311
1308
  return l ? {
1312
1309
  top: l.y,
1313
1310
  bottom: l.y,
1314
1311
  left: l.x,
1315
1312
  right: l.x
1316
1313
  } : null;
1317
- case Fe.DraggableRect:
1314
+ case Be.DraggableRect:
1318
1315
  return o;
1319
1316
  }
1320
- }, [n, o, l]), m = M(null), D = $(() => {
1321
- const S = m.current;
1322
- if (!S)
1317
+ }, [n, o, l]), b = I(null), D = F(() => {
1318
+ const R = b.current;
1319
+ if (!R)
1323
1320
  return;
1324
- const w = v.current.x * b.current.x, C = v.current.y * b.current.y;
1325
- S.scrollBy(w, C);
1326
- }, []), x = A(() => a === ct.TreeOrder ? [...c].reverse() : c, [a, c]);
1321
+ const m = v.current.x * p.current.x, w = v.current.y * p.current.y;
1322
+ R.scrollBy(m, w);
1323
+ }, []), S = A(() => a === at.TreeOrder ? [...c].reverse() : c, [a, c]);
1327
1324
  T(
1328
1325
  () => {
1329
1326
  if (!i || !c.length || !y) {
1330
- g();
1327
+ h();
1331
1328
  return;
1332
1329
  }
1333
- for (const S of x) {
1334
- if (r?.(S) === !1)
1330
+ for (const R of S) {
1331
+ if (r?.(R) === !1)
1335
1332
  continue;
1336
- const w = c.indexOf(S), C = d[w];
1337
- if (!C)
1333
+ const m = c.indexOf(R), w = u[m];
1334
+ if (!w)
1338
1335
  continue;
1339
1336
  const {
1340
- direction: R,
1341
- speed: O
1342
- } = Ir(S, C, y, t, h);
1343
- for (const E of ["x", "y"])
1344
- f[E][R[E]] || (O[E] = 0, R[E] = 0);
1345
- if (O.x > 0 || O.y > 0) {
1346
- g(), m.current = S, p(D, s), v.current = O, b.current = R;
1337
+ direction: N,
1338
+ speed: L
1339
+ } = gr(R, w, y, t, g);
1340
+ for (const O of ["x", "y"])
1341
+ f[O][N[O]] || (L[O] = 0, N[O] = 0);
1342
+ if (L.x > 0 || L.y > 0) {
1343
+ h(), b.current = R, x(D, s), v.current = L, p.current = N;
1347
1344
  return;
1348
1345
  }
1349
1346
  }
1350
1347
  v.current = {
1351
1348
  x: 0,
1352
1349
  y: 0
1353
- }, b.current = {
1350
+ }, p.current = {
1354
1351
  x: 0,
1355
1352
  y: 0
1356
- }, g();
1353
+ }, h();
1357
1354
  },
1358
1355
  // eslint-disable-next-line react-hooks/exhaustive-deps
1359
1356
  [
1360
1357
  t,
1361
1358
  D,
1362
1359
  r,
1363
- g,
1360
+ h,
1364
1361
  i,
1365
1362
  s,
1366
1363
  // eslint-disable-next-line react-hooks/exhaustive-deps
1367
1364
  JSON.stringify(y),
1368
1365
  // eslint-disable-next-line react-hooks/exhaustive-deps
1369
1366
  JSON.stringify(f),
1370
- p,
1371
- c,
1372
1367
  x,
1373
- d,
1368
+ c,
1369
+ S,
1370
+ u,
1374
1371
  // eslint-disable-next-line react-hooks/exhaustive-deps
1375
- JSON.stringify(h)
1372
+ JSON.stringify(g)
1376
1373
  ]
1377
1374
  );
1378
1375
  }
1379
- const Xr = {
1376
+ const Er = {
1380
1377
  x: {
1381
- [P.Backward]: !1,
1382
- [P.Forward]: !1
1378
+ [z.Backward]: !1,
1379
+ [z.Forward]: !1
1383
1380
  },
1384
1381
  y: {
1385
- [P.Backward]: !1,
1386
- [P.Forward]: !1
1382
+ [z.Backward]: !1,
1383
+ [z.Forward]: !1
1387
1384
  }
1388
1385
  };
1389
- function Yr(e) {
1386
+ function Ar(e) {
1390
1387
  let {
1391
1388
  delta: t,
1392
1389
  disabled: n
1393
1390
  } = e;
1394
- const r = it(t);
1395
- return He((o) => {
1391
+ const r = rt(t);
1392
+ return Ke((o) => {
1396
1393
  if (n || !r || !o)
1397
- return Xr;
1394
+ return Er;
1398
1395
  const i = {
1399
1396
  x: Math.sign(t.x - r.x),
1400
1397
  y: Math.sign(t.y - r.y)
1401
1398
  };
1402
1399
  return {
1403
1400
  x: {
1404
- [P.Backward]: o.x[P.Backward] || i.x === -1,
1405
- [P.Forward]: o.x[P.Forward] || i.x === 1
1401
+ [z.Backward]: o.x[z.Backward] || i.x === -1,
1402
+ [z.Forward]: o.x[z.Forward] || i.x === 1
1406
1403
  },
1407
1404
  y: {
1408
- [P.Backward]: o.y[P.Backward] || i.y === -1,
1409
- [P.Forward]: o.y[P.Forward] || i.y === 1
1405
+ [z.Backward]: o.y[z.Backward] || i.y === -1,
1406
+ [z.Forward]: o.y[z.Forward] || i.y === 1
1410
1407
  }
1411
1408
  };
1412
1409
  }, [n, t, r]);
1413
1410
  }
1414
- function Kr(e, t) {
1411
+ function Or(e, t) {
1415
1412
  const n = t != null ? e.get(t) : void 0, r = n ? n.node.current : null;
1416
- return He((o) => {
1413
+ return Ke((o) => {
1417
1414
  var i;
1418
1415
  return t == null ? null : (i = r ?? o) != null ? i : null;
1419
1416
  }, [r, t]);
1420
1417
  }
1421
- function Wr(e, t) {
1418
+ function Ir(e, t) {
1422
1419
  return A(() => e.reduce((n, r) => {
1423
1420
  const {
1424
1421
  sensor: o
@@ -1429,54 +1426,54 @@ function Wr(e, t) {
1429
1426
  return [...n, ...i];
1430
1427
  }, []), [e, t]);
1431
1428
  }
1432
- var Ye;
1429
+ var Xe;
1433
1430
  (function(e) {
1434
1431
  e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
1435
- })(Ye || (Ye = {}));
1436
- var St;
1432
+ })(Xe || (Xe = {}));
1433
+ var Dt;
1437
1434
  (function(e) {
1438
1435
  e.Optimized = "optimized";
1439
- })(St || (St = {}));
1440
- const Vt = /* @__PURE__ */ new Map();
1441
- function Hr(e, t) {
1436
+ })(Dt || (Dt = {}));
1437
+ const Kt = /* @__PURE__ */ new Map();
1438
+ function Tr(e, t) {
1442
1439
  let {
1443
1440
  dragging: n,
1444
1441
  dependencies: r,
1445
1442
  config: o
1446
1443
  } = t;
1447
- const [i, s] = X(null), {
1444
+ const [i, s] = $(null), {
1448
1445
  frequency: a,
1449
1446
  measure: l,
1450
1447
  strategy: c
1451
- } = o, d = M(e), u = v(), h = Xe(u), f = $(function(b) {
1452
- b === void 0 && (b = []), !h.current && s((y) => y === null ? b : y.concat(b.filter((m) => !y.includes(m))));
1453
- }, [h]), p = M(null), g = He((b) => {
1454
- if (u && !n)
1455
- return Vt;
1456
- if (!b || b === Vt || d.current !== e || i != null) {
1448
+ } = o, u = I(e), d = v(), g = $e(d), f = F(function(p) {
1449
+ p === void 0 && (p = []), !g.current && s((y) => y === null ? p : y.concat(p.filter((b) => !y.includes(b))));
1450
+ }, [g]), x = I(null), h = Ke((p) => {
1451
+ if (d && !n)
1452
+ return Kt;
1453
+ if (!p || p === Kt || u.current !== e || i != null) {
1457
1454
  const y = /* @__PURE__ */ new Map();
1458
- for (let m of e) {
1459
- if (!m)
1455
+ for (let b of e) {
1456
+ if (!b)
1460
1457
  continue;
1461
- if (i && i.length > 0 && !i.includes(m.id) && m.rect.current) {
1462
- y.set(m.id, m.rect.current);
1458
+ if (i && i.length > 0 && !i.includes(b.id) && b.rect.current) {
1459
+ y.set(b.id, b.rect.current);
1463
1460
  continue;
1464
1461
  }
1465
- const D = m.node.current, x = D ? new It(l(D), D) : null;
1466
- m.rect.current = x, x && y.set(m.id, x);
1462
+ const D = b.node.current, S = D ? new Et(l(D), D) : null;
1463
+ b.rect.current = S, S && y.set(b.id, S);
1467
1464
  }
1468
1465
  return y;
1469
1466
  }
1470
- return b;
1471
- }, [e, i, n, u, l]);
1467
+ return p;
1468
+ }, [e, i, n, d, l]);
1472
1469
  return T(() => {
1473
- d.current = e;
1470
+ u.current = e;
1474
1471
  }, [e]), T(
1475
1472
  () => {
1476
- u || f();
1473
+ d || f();
1477
1474
  },
1478
1475
  // eslint-disable-next-line react-hooks/exhaustive-deps
1479
- [n, u]
1476
+ [n, d]
1480
1477
  ), T(
1481
1478
  () => {
1482
1479
  i && i.length > 0 && s(null);
@@ -1485,40 +1482,40 @@ function Hr(e, t) {
1485
1482
  [JSON.stringify(i)]
1486
1483
  ), T(
1487
1484
  () => {
1488
- u || typeof a != "number" || p.current !== null || (p.current = setTimeout(() => {
1489
- f(), p.current = null;
1485
+ d || typeof a != "number" || x.current !== null || (x.current = setTimeout(() => {
1486
+ f(), x.current = null;
1490
1487
  }, a));
1491
1488
  },
1492
1489
  // eslint-disable-next-line react-hooks/exhaustive-deps
1493
- [a, u, f, ...r]
1490
+ [a, d, f, ...r]
1494
1491
  ), {
1495
- droppableRects: g,
1492
+ droppableRects: h,
1496
1493
  measureDroppableContainers: f,
1497
1494
  measuringScheduled: i != null
1498
1495
  };
1499
1496
  function v() {
1500
1497
  switch (c) {
1501
- case Ye.Always:
1498
+ case Xe.Always:
1502
1499
  return !1;
1503
- case Ye.BeforeDragging:
1500
+ case Xe.BeforeDragging:
1504
1501
  return n;
1505
1502
  default:
1506
1503
  return !n;
1507
1504
  }
1508
1505
  }
1509
1506
  }
1510
- function Tt(e, t) {
1511
- return He((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
1507
+ function Ot(e, t) {
1508
+ return Ke((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
1512
1509
  }
1513
- function Ur(e, t) {
1514
- return Tt(e, t);
1510
+ function Nr(e, t) {
1511
+ return Ot(e, t);
1515
1512
  }
1516
- function Vr(e) {
1513
+ function Mr(e) {
1517
1514
  let {
1518
1515
  callback: t,
1519
1516
  disabled: n
1520
1517
  } = e;
1521
- const r = ut(t), o = A(() => {
1518
+ const r = ct(t), o = A(() => {
1522
1519
  if (n || typeof window > "u" || typeof window.MutationObserver > "u")
1523
1520
  return;
1524
1521
  const {
@@ -1528,12 +1525,12 @@ function Vr(e) {
1528
1525
  }, [r, n]);
1529
1526
  return T(() => () => o?.disconnect(), [o]), o;
1530
1527
  }
1531
- function gt(e) {
1528
+ function dt(e) {
1532
1529
  let {
1533
1530
  callback: t,
1534
1531
  disabled: n
1535
1532
  } = e;
1536
- const r = ut(t), o = A(
1533
+ const r = ct(t), o = A(
1537
1534
  () => {
1538
1535
  if (n || typeof window > "u" || typeof window.ResizeObserver > "u")
1539
1536
  return;
@@ -1547,12 +1544,12 @@ function gt(e) {
1547
1544
  );
1548
1545
  return T(() => () => o?.disconnect(), [o]), o;
1549
1546
  }
1550
- function qr(e) {
1551
- return new It(Ae(e), e);
1547
+ function Lr(e) {
1548
+ return new Et(Ae(e), e);
1552
1549
  }
1553
- function qt(e, t, n) {
1554
- t === void 0 && (t = qr);
1555
- const [r, o] = X(null);
1550
+ function Wt(e, t, n) {
1551
+ t === void 0 && (t = Lr);
1552
+ const [r, o] = $(null);
1556
1553
  function i() {
1557
1554
  o((l) => {
1558
1555
  if (!e)
@@ -1561,59 +1558,59 @@ function qt(e, t, n) {
1561
1558
  var c;
1562
1559
  return (c = l ?? n) != null ? c : null;
1563
1560
  }
1564
- const d = t(e);
1565
- return JSON.stringify(l) === JSON.stringify(d) ? l : d;
1561
+ const u = t(e);
1562
+ return JSON.stringify(l) === JSON.stringify(u) ? l : u;
1566
1563
  });
1567
1564
  }
1568
- const s = Vr({
1565
+ const s = Mr({
1569
1566
  callback(l) {
1570
1567
  if (e)
1571
1568
  for (const c of l) {
1572
1569
  const {
1573
- type: d,
1574
- target: u
1570
+ type: u,
1571
+ target: d
1575
1572
  } = c;
1576
- if (d === "childList" && u instanceof HTMLElement && u.contains(e)) {
1573
+ if (u === "childList" && d instanceof HTMLElement && d.contains(e)) {
1577
1574
  i();
1578
1575
  break;
1579
1576
  }
1580
1577
  }
1581
1578
  }
1582
- }), a = gt({
1579
+ }), a = dt({
1583
1580
  callback: i
1584
1581
  });
1585
- return Q(() => {
1582
+ return _(() => {
1586
1583
  i(), e ? (a?.observe(e), s?.observe(document.body, {
1587
1584
  childList: !0,
1588
1585
  subtree: !0
1589
1586
  })) : (a?.disconnect(), s?.disconnect());
1590
1587
  }, [e]), r;
1591
1588
  }
1592
- function Gr(e) {
1593
- const t = Tt(e);
1594
- return on(e, t);
1589
+ function Pr(e) {
1590
+ const t = Ot(e);
1591
+ return Zt(e, t);
1595
1592
  }
1596
- const Gt = [];
1597
- function Jr(e) {
1598
- const t = M(e), n = He((r) => e ? r && r !== Gt && e && t.current && e.parentNode === t.current.parentNode ? r : Nt(e) : Gt, [e]);
1593
+ const Ut = [];
1594
+ function zr(e) {
1595
+ const t = I(e), n = Ke((r) => e ? r && r !== Ut && e && t.current && e.parentNode === t.current.parentNode ? r : Rt(e) : Ut, [e]);
1599
1596
  return T(() => {
1600
1597
  t.current = e;
1601
1598
  }, [e]), n;
1602
1599
  }
1603
- function _r(e) {
1604
- const [t, n] = X(null), r = M(e), o = $((i) => {
1605
- const s = yt(i.target);
1606
- s && n((a) => a ? (a.set(s, Dt(s)), new Map(a)) : null);
1600
+ function kr(e) {
1601
+ const [t, n] = $(null), r = I(e), o = F((i) => {
1602
+ const s = bt(i.target);
1603
+ s && n((a) => a ? (a.set(s, wt(s)), new Map(a)) : null);
1607
1604
  }, []);
1608
1605
  return T(() => {
1609
1606
  const i = r.current;
1610
1607
  if (e !== i) {
1611
1608
  s(i);
1612
1609
  const a = e.map((l) => {
1613
- const c = yt(l);
1610
+ const c = bt(l);
1614
1611
  return c ? (c.addEventListener("scroll", o, {
1615
1612
  passive: !0
1616
- }), [c, Dt(c)]) : null;
1613
+ }), [c, wt(c)]) : null;
1617
1614
  }).filter((l) => l != null);
1618
1615
  n(a.length ? new Map(a) : null), r.current = e;
1619
1616
  }
@@ -1622,15 +1619,15 @@ function _r(e) {
1622
1619
  };
1623
1620
  function s(a) {
1624
1621
  a.forEach((l) => {
1625
- const c = yt(l);
1622
+ const c = bt(l);
1626
1623
  c?.removeEventListener("scroll", o);
1627
1624
  });
1628
1625
  }
1629
- }, [o, e]), A(() => e.length ? t ? Array.from(t.values()).reduce((i, s) => Ee(i, s), Z) : fn(e) : Z, [e, t]);
1626
+ }, [o, e]), A(() => e.length ? t ? Array.from(t.values()).reduce((i, s) => Ce(i, s), Q) : an(e) : Q, [e, t]);
1630
1627
  }
1631
- function Jt(e, t) {
1628
+ function Ht(e, t) {
1632
1629
  t === void 0 && (t = []);
1633
- const n = M(null);
1630
+ const n = I(null);
1634
1631
  return T(
1635
1632
  () => {
1636
1633
  n.current = null;
@@ -1638,14 +1635,14 @@ function Jt(e, t) {
1638
1635
  // eslint-disable-next-line react-hooks/exhaustive-deps
1639
1636
  t
1640
1637
  ), T(() => {
1641
- const r = e !== Z;
1638
+ const r = e !== Q;
1642
1639
  r && !n.current && (n.current = e), !r && n.current && (n.current = null);
1643
- }, [e]), n.current ? st(e, n.current) : Z;
1640
+ }, [e]), n.current ? ot(e, n.current) : Q;
1644
1641
  }
1645
- function Qr(e) {
1642
+ function Br(e) {
1646
1643
  T(
1647
1644
  () => {
1648
- if (!dt)
1645
+ if (!lt)
1649
1646
  return;
1650
1647
  const t = e.map((n) => {
1651
1648
  let {
@@ -1668,7 +1665,7 @@ function Qr(e) {
1668
1665
  })
1669
1666
  );
1670
1667
  }
1671
- function Zr(e, t) {
1668
+ function Fr(e, t) {
1672
1669
  return A(() => e.reduce((n, r) => {
1673
1670
  let {
1674
1671
  eventName: o,
@@ -1679,84 +1676,84 @@ function Zr(e, t) {
1679
1676
  }, n;
1680
1677
  }, {}), [e, t]);
1681
1678
  }
1682
- function pn(e) {
1683
- return A(() => e ? Sr(e) : null, [e]);
1679
+ function fn(e) {
1680
+ return A(() => e ? cr(e) : null, [e]);
1684
1681
  }
1685
- const _t = [];
1686
- function eo(e, t) {
1682
+ const Vt = [];
1683
+ function $r(e, t) {
1687
1684
  t === void 0 && (t = Ae);
1688
- const [n] = e, r = pn(n ? Y(n) : null), [o, i] = X(_t);
1685
+ const [n] = e, r = fn(n ? X(n) : null), [o, i] = $(Vt);
1689
1686
  function s() {
1690
- i(() => e.length ? e.map((l) => dn(l) ? r : new It(t(l), l)) : _t);
1687
+ i(() => e.length ? e.map((l) => on(l) ? r : new Et(t(l), l)) : Vt);
1691
1688
  }
1692
- const a = gt({
1689
+ const a = dt({
1693
1690
  callback: s
1694
1691
  });
1695
- return Q(() => {
1692
+ return _(() => {
1696
1693
  a?.disconnect(), s(), e.forEach((l) => a?.observe(l));
1697
1694
  }, [e]), o;
1698
1695
  }
1699
- function bn(e) {
1696
+ function gn(e) {
1700
1697
  if (!e)
1701
1698
  return null;
1702
1699
  if (e.children.length > 1)
1703
1700
  return e;
1704
1701
  const t = e.children[0];
1705
- return We(t) ? t : e;
1702
+ return Ye(t) ? t : e;
1706
1703
  }
1707
- function to(e) {
1704
+ function Xr(e) {
1708
1705
  let {
1709
1706
  measure: t
1710
1707
  } = e;
1711
- const [n, r] = X(null), o = $((c) => {
1708
+ const [n, r] = $(null), o = F((c) => {
1712
1709
  for (const {
1713
- target: d
1710
+ target: u
1714
1711
  } of c)
1715
- if (We(d)) {
1716
- r((u) => {
1717
- const h = t(d);
1718
- return u ? {
1719
- ...u,
1720
- width: h.width,
1721
- height: h.height
1722
- } : h;
1712
+ if (Ye(u)) {
1713
+ r((d) => {
1714
+ const g = t(u);
1715
+ return d ? {
1716
+ ...d,
1717
+ width: g.width,
1718
+ height: g.height
1719
+ } : g;
1723
1720
  });
1724
1721
  break;
1725
1722
  }
1726
- }, [t]), i = gt({
1723
+ }, [t]), i = dt({
1727
1724
  callback: o
1728
- }), s = $((c) => {
1729
- const d = bn(c);
1730
- i?.disconnect(), d && i?.observe(d), r(d ? t(d) : null);
1731
- }, [t, i]), [a, l] = ot(s);
1725
+ }), s = F((c) => {
1726
+ const u = gn(c);
1727
+ i?.disconnect(), u && i?.observe(u), r(u ? t(u) : null);
1728
+ }, [t, i]), [a, l] = nt(s);
1732
1729
  return A(() => ({
1733
1730
  nodeRef: a,
1734
1731
  rect: n,
1735
1732
  setRef: l
1736
1733
  }), [n, a, l]);
1737
1734
  }
1738
- const no = [{
1739
- sensor: Ot,
1735
+ const jr = [{
1736
+ sensor: dn,
1740
1737
  options: {}
1741
1738
  }, {
1742
- sensor: vn,
1739
+ sensor: un,
1743
1740
  options: {}
1744
- }], ro = {
1741
+ }], Yr = {
1745
1742
  current: {}
1746
- }, rt = {
1743
+ }, tt = {
1747
1744
  draggable: {
1748
- measure: Kt
1745
+ measure: $t
1749
1746
  },
1750
1747
  droppable: {
1751
- measure: Kt,
1752
- strategy: Ye.WhileDragging,
1753
- frequency: St.Optimized
1748
+ measure: $t,
1749
+ strategy: Xe.WhileDragging,
1750
+ frequency: Dt.Optimized
1754
1751
  },
1755
1752
  dragOverlay: {
1756
1753
  measure: Ae
1757
1754
  }
1758
1755
  };
1759
- class $e extends Map {
1756
+ class Fe extends Map {
1760
1757
  get(t) {
1761
1758
  var n;
1762
1759
  return t != null && (n = super.get(t)) != null ? n : void 0;
@@ -1777,7 +1774,7 @@ class $e extends Map {
1777
1774
  return (n = (r = this.get(t)) == null ? void 0 : r.node.current) != null ? n : void 0;
1778
1775
  }
1779
1776
  }
1780
- const oo = {
1777
+ const Kr = {
1781
1778
  activatorEvent: null,
1782
1779
  active: null,
1783
1780
  activeNode: null,
@@ -1786,22 +1783,22 @@ const oo = {
1786
1783
  containerNodeRect: null,
1787
1784
  draggableNodes: /* @__PURE__ */ new Map(),
1788
1785
  droppableRects: /* @__PURE__ */ new Map(),
1789
- droppableContainers: /* @__PURE__ */ new $e(),
1786
+ droppableContainers: /* @__PURE__ */ new Fe(),
1790
1787
  over: null,
1791
1788
  dragOverlay: {
1792
1789
  nodeRef: {
1793
1790
  current: null
1794
1791
  },
1795
1792
  rect: null,
1796
- setRef: lt
1793
+ setRef: st
1797
1794
  },
1798
1795
  scrollableAncestors: [],
1799
1796
  scrollableAncestorRects: [],
1800
- measuringConfiguration: rt,
1801
- measureDroppableContainers: lt,
1797
+ measuringConfiguration: tt,
1798
+ measureDroppableContainers: st,
1802
1799
  windowRect: null,
1803
1800
  measuringScheduled: !1
1804
- }, mn = {
1801
+ }, hn = {
1805
1802
  activatorEvent: null,
1806
1803
  activators: [],
1807
1804
  active: null,
@@ -1809,12 +1806,12 @@ const oo = {
1809
1806
  ariaDescribedById: {
1810
1807
  draggable: ""
1811
1808
  },
1812
- dispatch: lt,
1809
+ dispatch: st,
1813
1810
  draggableNodes: /* @__PURE__ */ new Map(),
1814
1811
  over: null,
1815
- measureDroppableContainers: lt
1816
- }, Ve = /* @__PURE__ */ Ke(mn), yn = /* @__PURE__ */ Ke(oo);
1817
- function io() {
1812
+ measureDroppableContainers: st
1813
+ }, Ue = /* @__PURE__ */ je(hn), vn = /* @__PURE__ */ je(Kr);
1814
+ function Wr() {
1818
1815
  return {
1819
1816
  draggable: {
1820
1817
  active: null,
@@ -1829,13 +1826,13 @@ function io() {
1829
1826
  }
1830
1827
  },
1831
1828
  droppable: {
1832
- containers: new $e()
1829
+ containers: new Fe()
1833
1830
  }
1834
1831
  };
1835
1832
  }
1836
- function so(e, t) {
1833
+ function Ur(e, t) {
1837
1834
  switch (t.type) {
1838
- case k.DragStart:
1835
+ case P.DragStart:
1839
1836
  return {
1840
1837
  ...e,
1841
1838
  draggable: {
@@ -1844,7 +1841,7 @@ function so(e, t) {
1844
1841
  active: t.active
1845
1842
  }
1846
1843
  };
1847
- case k.DragMove:
1844
+ case P.DragMove:
1848
1845
  return e.draggable.active == null ? e : {
1849
1846
  ...e,
1850
1847
  draggable: {
@@ -1855,8 +1852,8 @@ function so(e, t) {
1855
1852
  }
1856
1853
  }
1857
1854
  };
1858
- case k.DragEnd:
1859
- case k.DragCancel:
1855
+ case P.DragEnd:
1856
+ case P.DragCancel:
1860
1857
  return {
1861
1858
  ...e,
1862
1859
  draggable: {
@@ -1872,12 +1869,12 @@ function so(e, t) {
1872
1869
  }
1873
1870
  }
1874
1871
  };
1875
- case k.RegisterDroppable: {
1872
+ case P.RegisterDroppable: {
1876
1873
  const {
1877
1874
  element: n
1878
1875
  } = t, {
1879
1876
  id: r
1880
- } = n, o = new $e(e.droppable.containers);
1877
+ } = n, o = new Fe(e.droppable.containers);
1881
1878
  return o.set(r, n), {
1882
1879
  ...e,
1883
1880
  droppable: {
@@ -1886,7 +1883,7 @@ function so(e, t) {
1886
1883
  }
1887
1884
  };
1888
1885
  }
1889
- case k.SetDroppableDisabled: {
1886
+ case P.SetDroppableDisabled: {
1890
1887
  const {
1891
1888
  id: n,
1892
1889
  key: r,
@@ -1894,7 +1891,7 @@ function so(e, t) {
1894
1891
  } = t, i = e.droppable.containers.get(n);
1895
1892
  if (!i || r !== i.key)
1896
1893
  return e;
1897
- const s = new $e(e.droppable.containers);
1894
+ const s = new Fe(e.droppable.containers);
1898
1895
  return s.set(n, {
1899
1896
  ...i,
1900
1897
  disabled: o
@@ -1906,14 +1903,14 @@ function so(e, t) {
1906
1903
  }
1907
1904
  };
1908
1905
  }
1909
- case k.UnregisterDroppable: {
1906
+ case P.UnregisterDroppable: {
1910
1907
  const {
1911
1908
  id: n,
1912
1909
  key: r
1913
1910
  } = t, o = e.droppable.containers.get(n);
1914
1911
  if (!o || r !== o.key)
1915
1912
  return e;
1916
- const i = new $e(e.droppable.containers);
1913
+ const i = new Fe(e.droppable.containers);
1917
1914
  return i.delete(n), {
1918
1915
  ...e,
1919
1916
  droppable: {
@@ -1926,7 +1923,7 @@ function so(e, t) {
1926
1923
  return e;
1927
1924
  }
1928
1925
  }
1929
- function ao(e) {
1926
+ function Hr(e) {
1930
1927
  let {
1931
1928
  disabled: t
1932
1929
  } = e;
@@ -1934,10 +1931,10 @@ function ao(e) {
1934
1931
  active: n,
1935
1932
  activatorEvent: r,
1936
1933
  draggableNodes: o
1937
- } = pe(Ve), i = it(r), s = it(n?.id);
1934
+ } = ve(Ue), i = rt(r), s = rt(n?.id);
1938
1935
  return T(() => {
1939
1936
  if (!t && !r && i && s != null) {
1940
- if (!ft(i) || document.activeElement === i.target)
1937
+ if (!ut(i) || document.activeElement === i.target)
1941
1938
  return;
1942
1939
  const a = o.get(s);
1943
1940
  if (!a)
@@ -1949,12 +1946,12 @@ function ao(e) {
1949
1946
  if (!l.current && !c.current)
1950
1947
  return;
1951
1948
  requestAnimationFrame(() => {
1952
- for (const d of [l.current, c.current]) {
1953
- if (!d)
1949
+ for (const u of [l.current, c.current]) {
1950
+ if (!u)
1954
1951
  continue;
1955
- const u = Zn(d);
1956
- if (u) {
1957
- u.focus();
1952
+ const d = jn(u);
1953
+ if (d) {
1954
+ d.focus();
1958
1955
  break;
1959
1956
  }
1960
1957
  }
@@ -1962,7 +1959,7 @@ function ao(e) {
1962
1959
  }
1963
1960
  }, [r, t, o, s, i]), null;
1964
1961
  }
1965
- function xn(e, t) {
1962
+ function pn(e, t) {
1966
1963
  let {
1967
1964
  transform: n,
1968
1965
  ...r
@@ -1972,19 +1969,19 @@ function xn(e, t) {
1972
1969
  ...r
1973
1970
  }), n) : n;
1974
1971
  }
1975
- function lo(e) {
1972
+ function Vr(e) {
1976
1973
  return A(
1977
1974
  () => ({
1978
1975
  draggable: {
1979
- ...rt.draggable,
1976
+ ...tt.draggable,
1980
1977
  ...e?.draggable
1981
1978
  },
1982
1979
  droppable: {
1983
- ...rt.droppable,
1980
+ ...tt.droppable,
1984
1981
  ...e?.droppable
1985
1982
  },
1986
1983
  dragOverlay: {
1987
- ...rt.dragOverlay,
1984
+ ...tt.dragOverlay,
1988
1985
  ...e?.dragOverlay
1989
1986
  }
1990
1987
  }),
@@ -1992,21 +1989,21 @@ function lo(e) {
1992
1989
  [e?.draggable, e?.droppable, e?.dragOverlay]
1993
1990
  );
1994
1991
  }
1995
- function co(e) {
1992
+ function qr(e) {
1996
1993
  let {
1997
1994
  activeNode: t,
1998
1995
  measure: n,
1999
1996
  initialRect: r,
2000
1997
  config: o = !0
2001
1998
  } = e;
2002
- const i = M(!1), {
1999
+ const i = I(!1), {
2003
2000
  x: s,
2004
2001
  y: a
2005
2002
  } = typeof o == "boolean" ? {
2006
2003
  x: o,
2007
2004
  y: o
2008
2005
  } : o;
2009
- Q(() => {
2006
+ _(() => {
2010
2007
  if (!s && !a || !t) {
2011
2008
  i.current = !1;
2012
2009
  return;
@@ -2016,229 +2013,229 @@ function co(e) {
2016
2013
  const c = t?.node.current;
2017
2014
  if (!c || c.isConnected === !1)
2018
2015
  return;
2019
- const d = n(c), u = on(d, r);
2020
- if (s || (u.x = 0), a || (u.y = 0), i.current = !0, Math.abs(u.x) > 0 || Math.abs(u.y) > 0) {
2021
- const h = an(c);
2022
- h && h.scrollBy({
2023
- top: u.y,
2024
- left: u.x
2016
+ const u = n(c), d = Zt(u, r);
2017
+ if (s || (d.x = 0), a || (d.y = 0), i.current = !0, Math.abs(d.x) > 0 || Math.abs(d.y) > 0) {
2018
+ const g = tn(c);
2019
+ g && g.scrollBy({
2020
+ top: d.y,
2021
+ left: d.x
2025
2022
  });
2026
2023
  }
2027
2024
  }, [t, s, a, r, n]);
2028
2025
  }
2029
- const ht = /* @__PURE__ */ Ke({
2030
- ...Z,
2026
+ const ft = /* @__PURE__ */ je({
2027
+ ...Q,
2031
2028
  scaleX: 1,
2032
2029
  scaleY: 1
2033
2030
  });
2034
- var ve;
2031
+ var he;
2035
2032
  (function(e) {
2036
2033
  e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
2037
- })(ve || (ve = {}));
2038
- const uo = /* @__PURE__ */ Bn(function(t) {
2034
+ })(he || (he = {}));
2035
+ const To = /* @__PURE__ */ Mn(function(t) {
2039
2036
  var n, r, o, i;
2040
2037
  let {
2041
2038
  id: s,
2042
2039
  accessibility: a,
2043
2040
  autoScroll: l = !0,
2044
2041
  children: c,
2045
- sensors: d = no,
2046
- collisionDetection: u = mr,
2047
- measuring: h,
2042
+ sensors: u = jr,
2043
+ collisionDetection: d = rr,
2044
+ measuring: g,
2048
2045
  modifiers: f,
2049
- ...p
2046
+ ...x
2050
2047
  } = t;
2051
- const g = Fn(so, void 0, io), [v, b] = g, [y, m] = ir(), [D, x] = X(ve.Uninitialized), S = D === ve.Initialized, {
2048
+ const h = Ln(Ur, void 0, Wr), [v, p] = h, [y, b] = Vn(), [D, S] = $(he.Uninitialized), R = D === he.Initialized, {
2052
2049
  draggable: {
2053
- active: w,
2054
- nodes: C,
2055
- translate: R
2050
+ active: m,
2051
+ nodes: w,
2052
+ translate: N
2056
2053
  },
2057
2054
  droppable: {
2058
- containers: O
2055
+ containers: L
2059
2056
  }
2060
- } = v, E = w != null ? C.get(w) : null, z = M({
2057
+ } = v, O = m != null ? w.get(m) : null, G = I({
2061
2058
  initial: null,
2062
2059
  translated: null
2063
- }), _ = A(() => {
2064
- var F;
2065
- return w != null ? {
2066
- id: w,
2060
+ }), J = A(() => {
2061
+ var B;
2062
+ return m != null ? {
2063
+ id: m,
2067
2064
  // It's possible for the active node to unmount while dragging
2068
- data: (F = E?.data) != null ? F : ro,
2069
- rect: z
2065
+ data: (B = O?.data) != null ? B : Yr,
2066
+ rect: G
2070
2067
  } : null;
2071
- }, [w, E]), ee = M(null), [Oe, qe] = X(null), [W, Ge] = X(null), oe = Xe(p, Object.values(p)), Te = Ue("DndDescribedBy", s), Je = A(() => O.getEnabled(), [O]), K = lo(h), {
2072
- droppableRects: ie,
2073
- measureDroppableContainers: me,
2074
- measuringScheduled: Me
2075
- } = Hr(Je, {
2076
- dragging: S,
2077
- dependencies: [R.x, R.y],
2078
- config: K.droppable
2079
- }), q = Kr(C, w), _e = A(() => W ? at(W) : null, [W]), ce = Pn(), se = Ur(q, K.draggable.measure);
2080
- co({
2081
- activeNode: w != null ? C.get(w) : null,
2082
- config: ce.layoutShiftCompensation,
2083
- initialRect: se,
2084
- measure: K.draggable.measure
2068
+ }, [m, O]), Z = I(null), [Oe, He] = $(null), [Y, Ve] = $(null), re = $e(x, Object.values(x)), Ie = We("DndDescribedBy", s), qe = A(() => L.getEnabled(), [L]), j = Vr(g), {
2069
+ droppableRects: oe,
2070
+ measureDroppableContainers: pe,
2071
+ measuringScheduled: Te
2072
+ } = Tr(qe, {
2073
+ dragging: R,
2074
+ dependencies: [N.x, N.y],
2075
+ config: j.droppable
2076
+ }), H = Or(w, m), Ge = A(() => Y ? it(Y) : null, [Y]), le = Tn(), ie = Nr(H, j.draggable.measure);
2077
+ qr({
2078
+ activeNode: m != null ? w.get(m) : null,
2079
+ config: le.layoutShiftCompensation,
2080
+ initialRect: ie,
2081
+ measure: j.draggable.measure
2085
2082
  });
2086
- const I = qt(q, K.draggable.measure, se), Le = qt(q ? q.parentElement : null), te = M({
2083
+ const E = Wt(H, j.draggable.measure, ie), Ne = Wt(H ? H.parentElement : null), ee = I({
2087
2084
  activatorEvent: null,
2088
2085
  active: null,
2089
- activeNode: q,
2086
+ activeNode: H,
2090
2087
  collisionRect: null,
2091
2088
  collisions: null,
2092
- droppableRects: ie,
2093
- draggableNodes: C,
2089
+ droppableRects: oe,
2090
+ draggableNodes: w,
2094
2091
  draggingNode: null,
2095
2092
  draggingNodeRect: null,
2096
- droppableContainers: O,
2093
+ droppableContainers: L,
2097
2094
  over: null,
2098
2095
  scrollableAncestors: [],
2099
2096
  scrollAdjustedTranslate: null
2100
- }), xe = O.getNodeFor((n = te.current.over) == null ? void 0 : n.id), ae = to({
2101
- measure: K.dragOverlay.measure
2102
- }), we = (r = ae.nodeRef.current) != null ? r : q, De = S ? (o = ae.rect) != null ? o : I : null, Lt = !!(ae.nodeRef.current && ae.rect), jt = Gr(Lt ? null : I), vt = pn(we ? Y(we) : null), de = Jr(S ? xe ?? q : null), Qe = eo(de), Ze = xn(f, {
2097
+ }), ye = L.getNodeFor((n = ee.current.over) == null ? void 0 : n.id), se = Xr({
2098
+ measure: j.dragOverlay.measure
2099
+ }), me = (r = se.nodeRef.current) != null ? r : H, we = R ? (o = se.rect) != null ? o : E : null, It = !!(se.nodeRef.current && se.rect), Tt = Pr(It ? null : E), gt = fn(me ? X(me) : null), ce = zr(R ? ye ?? H : null), Je = $r(ce), _e = pn(f, {
2103
2100
  transform: {
2104
- x: R.x - jt.x,
2105
- y: R.y - jt.y,
2101
+ x: N.x - Tt.x,
2102
+ y: N.y - Tt.y,
2106
2103
  scaleX: 1,
2107
2104
  scaleY: 1
2108
2105
  },
2109
- activatorEvent: W,
2110
- active: _,
2111
- activeNodeRect: I,
2112
- containerNodeRect: Le,
2113
- draggingNodeRect: De,
2114
- over: te.current.over,
2115
- overlayNodeRect: ae.rect,
2116
- scrollableAncestors: de,
2117
- scrollableAncestorRects: Qe,
2118
- windowRect: vt
2119
- }), kt = _e ? Ee(_e, R) : null, Pt = _r(de), An = Jt(Pt), On = Jt(Pt, [I]), Ce = Ee(Ze, An), Se = De ? wr(De, Ze) : null, je = _ && Se ? u({
2120
- active: _,
2121
- collisionRect: Se,
2122
- droppableRects: ie,
2123
- droppableContainers: Je,
2124
- pointerCoordinates: kt
2125
- }) : null, zt = vr(je, "id"), [ue, Bt] = X(null), Tn = Lt ? Ze : Ee(Ze, On), Mn = yr(Tn, (i = ue?.rect) != null ? i : null, I), pt = M(null), Ft = $(
2126
- (F, H) => {
2106
+ activatorEvent: Y,
2107
+ active: J,
2108
+ activeNodeRect: E,
2109
+ containerNodeRect: Ne,
2110
+ draggingNodeRect: we,
2111
+ over: ee.current.over,
2112
+ overlayNodeRect: se.rect,
2113
+ scrollableAncestors: ce,
2114
+ scrollableAncestorRects: Je,
2115
+ windowRect: gt
2116
+ }), Nt = Ge ? Ce(Ge, N) : null, Mt = kr(ce), Sn = Ht(Mt), Cn = Ht(Mt, [E]), xe = Ce(_e, Sn), De = we ? sr(we, _e) : null, Me = J && De ? d({
2117
+ active: J,
2118
+ collisionRect: De,
2119
+ droppableRects: oe,
2120
+ droppableContainers: qe,
2121
+ pointerCoordinates: Nt
2122
+ }) : null, Lt = tr(Me, "id"), [ue, Pt] = $(null), Rn = It ? _e : Ce(_e, Cn), En = or(Rn, (i = ue?.rect) != null ? i : null, E), ht = I(null), zt = F(
2123
+ (B, K) => {
2127
2124
  let {
2128
- sensor: U,
2129
- options: fe
2130
- } = H;
2131
- if (ee.current == null)
2125
+ sensor: W,
2126
+ options: de
2127
+ } = K;
2128
+ if (Z.current == null)
2132
2129
  return;
2133
- const G = C.get(ee.current);
2134
- if (!G)
2130
+ const V = w.get(Z.current);
2131
+ if (!V)
2135
2132
  return;
2136
- const V = F.nativeEvent, ne = new U({
2137
- active: ee.current,
2138
- activeNode: G,
2139
- event: V,
2140
- options: fe,
2133
+ const U = B.nativeEvent, te = new W({
2134
+ active: Z.current,
2135
+ activeNode: V,
2136
+ event: U,
2137
+ options: de,
2141
2138
  // Sensors need to be instantiated with refs for arguments that change over time
2142
2139
  // otherwise they are frozen in time with the stale arguments
2143
- context: te,
2144
- onAbort(B) {
2145
- if (!C.get(B))
2140
+ context: ee,
2141
+ onAbort(k) {
2142
+ if (!w.get(k))
2146
2143
  return;
2147
2144
  const {
2148
- onDragAbort: re
2149
- } = oe.current, le = {
2150
- id: B
2145
+ onDragAbort: ne
2146
+ } = re.current, ae = {
2147
+ id: k
2151
2148
  };
2152
- re?.(le), y({
2149
+ ne?.(ae), y({
2153
2150
  type: "onDragAbort",
2154
- event: le
2151
+ event: ae
2155
2152
  });
2156
2153
  },
2157
- onPending(B, ge, re, le) {
2158
- if (!C.get(B))
2154
+ onPending(k, fe, ne, ae) {
2155
+ if (!w.get(k))
2159
2156
  return;
2160
2157
  const {
2161
2158
  onDragPending: Pe
2162
- } = oe.current, he = {
2163
- id: B,
2164
- constraint: ge,
2165
- initialCoordinates: re,
2166
- offset: le
2159
+ } = re.current, ge = {
2160
+ id: k,
2161
+ constraint: fe,
2162
+ initialCoordinates: ne,
2163
+ offset: ae
2167
2164
  };
2168
- Pe?.(he), y({
2165
+ Pe?.(ge), y({
2169
2166
  type: "onDragPending",
2170
- event: he
2167
+ event: ge
2171
2168
  });
2172
2169
  },
2173
- onStart(B) {
2174
- const ge = ee.current;
2175
- if (ge == null)
2170
+ onStart(k) {
2171
+ const fe = Z.current;
2172
+ if (fe == null)
2176
2173
  return;
2177
- const re = C.get(ge);
2178
- if (!re)
2174
+ const ne = w.get(fe);
2175
+ if (!ne)
2179
2176
  return;
2180
2177
  const {
2181
- onDragStart: le
2182
- } = oe.current, ke = {
2183
- activatorEvent: V,
2178
+ onDragStart: ae
2179
+ } = re.current, Le = {
2180
+ activatorEvent: U,
2184
2181
  active: {
2185
- id: ge,
2186
- data: re.data,
2187
- rect: z
2182
+ id: fe,
2183
+ data: ne.data,
2184
+ rect: G
2188
2185
  }
2189
2186
  };
2190
- et(() => {
2191
- le?.(ke), x(ve.Initializing), b({
2192
- type: k.DragStart,
2193
- initialCoordinates: B,
2194
- active: ge
2187
+ Qe(() => {
2188
+ ae?.(Le), S(he.Initializing), p({
2189
+ type: P.DragStart,
2190
+ initialCoordinates: k,
2191
+ active: fe
2195
2192
  }), y({
2196
2193
  type: "onDragStart",
2197
- event: ke
2198
- }), qe(pt.current), Ge(V);
2194
+ event: Le
2195
+ }), He(ht.current), Ve(U);
2199
2196
  });
2200
2197
  },
2201
- onMove(B) {
2202
- b({
2203
- type: k.DragMove,
2204
- coordinates: B
2198
+ onMove(k) {
2199
+ p({
2200
+ type: P.DragMove,
2201
+ coordinates: k
2205
2202
  });
2206
2203
  },
2207
- onEnd: Re(k.DragEnd),
2208
- onCancel: Re(k.DragCancel)
2204
+ onEnd: Se(P.DragEnd),
2205
+ onCancel: Se(P.DragCancel)
2209
2206
  });
2210
- pt.current = ne;
2211
- function Re(B) {
2207
+ ht.current = te;
2208
+ function Se(k) {
2212
2209
  return async function() {
2213
2210
  const {
2214
- active: re,
2215
- collisions: le,
2216
- over: ke,
2211
+ active: ne,
2212
+ collisions: ae,
2213
+ over: Le,
2217
2214
  scrollAdjustedTranslate: Pe
2218
- } = te.current;
2219
- let he = null;
2220
- if (re && Pe) {
2215
+ } = ee.current;
2216
+ let ge = null;
2217
+ if (ne && Pe) {
2221
2218
  const {
2222
2219
  cancelDrop: ze
2223
- } = oe.current;
2224
- he = {
2225
- activatorEvent: V,
2226
- active: re,
2227
- collisions: le,
2220
+ } = re.current;
2221
+ ge = {
2222
+ activatorEvent: U,
2223
+ active: ne,
2224
+ collisions: ae,
2228
2225
  delta: Pe,
2229
- over: ke
2230
- }, B === k.DragEnd && typeof ze == "function" && await Promise.resolve(ze(he)) && (B = k.DragCancel);
2226
+ over: Le
2227
+ }, k === P.DragEnd && typeof ze == "function" && await Promise.resolve(ze(ge)) && (k = P.DragCancel);
2231
2228
  }
2232
- ee.current = null, et(() => {
2233
- b({
2234
- type: B
2235
- }), x(ve.Uninitialized), Bt(null), qe(null), Ge(null), pt.current = null;
2236
- const ze = B === k.DragEnd ? "onDragEnd" : "onDragCancel";
2237
- if (he) {
2238
- const bt = oe.current[ze];
2239
- bt?.(he), y({
2229
+ Z.current = null, Qe(() => {
2230
+ p({
2231
+ type: k
2232
+ }), S(he.Uninitialized), Pt(null), He(null), Ve(null), ht.current = null;
2233
+ const ze = k === P.DragEnd ? "onDragEnd" : "onDragCancel";
2234
+ if (ge) {
2235
+ const vt = re.current[ze];
2236
+ vt?.(ge), y({
2240
2237
  type: ze,
2241
- event: he
2238
+ event: ge
2242
2239
  });
2243
2240
  }
2244
2241
  });
@@ -2246,319 +2243,319 @@ const uo = /* @__PURE__ */ Bn(function(t) {
2246
2243
  }
2247
2244
  },
2248
2245
  // eslint-disable-next-line react-hooks/exhaustive-deps
2249
- [C]
2250
- ), Ln = $((F, H) => (U, fe) => {
2251
- const G = U.nativeEvent, V = C.get(fe);
2246
+ [w]
2247
+ ), An = F((B, K) => (W, de) => {
2248
+ const V = W.nativeEvent, U = w.get(de);
2252
2249
  if (
2253
2250
  // Another sensor is already instantiating
2254
- ee.current !== null || // No active draggable
2255
- !V || // Event has already been captured
2256
- G.dndKit || G.defaultPrevented
2251
+ Z.current !== null || // No active draggable
2252
+ !U || // Event has already been captured
2253
+ V.dndKit || V.defaultPrevented
2257
2254
  )
2258
2255
  return;
2259
- const ne = {
2260
- active: V
2256
+ const te = {
2257
+ active: U
2261
2258
  };
2262
- F(U, H.options, ne) === !0 && (G.dndKit = {
2263
- capturedBy: H.sensor
2264
- }, ee.current = fe, Ft(U, H));
2265
- }, [C, Ft]), $t = Wr(d, Ln);
2266
- Qr(d), Q(() => {
2267
- I && D === ve.Initializing && x(ve.Initialized);
2268
- }, [I, D]), T(
2259
+ B(W, K.options, te) === !0 && (V.dndKit = {
2260
+ capturedBy: K.sensor
2261
+ }, Z.current = de, zt(W, K));
2262
+ }, [w, zt]), kt = Ir(u, An);
2263
+ Br(u), _(() => {
2264
+ E && D === he.Initializing && S(he.Initialized);
2265
+ }, [E, D]), T(
2269
2266
  () => {
2270
2267
  const {
2271
- onDragMove: F
2272
- } = oe.current, {
2273
- active: H,
2274
- activatorEvent: U,
2275
- collisions: fe,
2276
- over: G
2277
- } = te.current;
2278
- if (!H || !U)
2268
+ onDragMove: B
2269
+ } = re.current, {
2270
+ active: K,
2271
+ activatorEvent: W,
2272
+ collisions: de,
2273
+ over: V
2274
+ } = ee.current;
2275
+ if (!K || !W)
2279
2276
  return;
2280
- const V = {
2281
- active: H,
2282
- activatorEvent: U,
2283
- collisions: fe,
2277
+ const U = {
2278
+ active: K,
2279
+ activatorEvent: W,
2280
+ collisions: de,
2284
2281
  delta: {
2285
- x: Ce.x,
2286
- y: Ce.y
2282
+ x: xe.x,
2283
+ y: xe.y
2287
2284
  },
2288
- over: G
2285
+ over: V
2289
2286
  };
2290
- et(() => {
2291
- F?.(V), y({
2287
+ Qe(() => {
2288
+ B?.(U), y({
2292
2289
  type: "onDragMove",
2293
- event: V
2290
+ event: U
2294
2291
  });
2295
2292
  });
2296
2293
  },
2297
2294
  // eslint-disable-next-line react-hooks/exhaustive-deps
2298
- [Ce.x, Ce.y]
2295
+ [xe.x, xe.y]
2299
2296
  ), T(
2300
2297
  () => {
2301
2298
  const {
2302
- active: F,
2303
- activatorEvent: H,
2304
- collisions: U,
2305
- droppableContainers: fe,
2306
- scrollAdjustedTranslate: G
2307
- } = te.current;
2308
- if (!F || ee.current == null || !H || !G)
2299
+ active: B,
2300
+ activatorEvent: K,
2301
+ collisions: W,
2302
+ droppableContainers: de,
2303
+ scrollAdjustedTranslate: V
2304
+ } = ee.current;
2305
+ if (!B || Z.current == null || !K || !V)
2309
2306
  return;
2310
2307
  const {
2311
- onDragOver: V
2312
- } = oe.current, ne = fe.get(zt), Re = ne && ne.rect.current ? {
2313
- id: ne.id,
2314
- rect: ne.rect.current,
2315
- data: ne.data,
2316
- disabled: ne.disabled
2317
- } : null, B = {
2318
- active: F,
2319
- activatorEvent: H,
2320
- collisions: U,
2308
+ onDragOver: U
2309
+ } = re.current, te = de.get(Lt), Se = te && te.rect.current ? {
2310
+ id: te.id,
2311
+ rect: te.rect.current,
2312
+ data: te.data,
2313
+ disabled: te.disabled
2314
+ } : null, k = {
2315
+ active: B,
2316
+ activatorEvent: K,
2317
+ collisions: W,
2321
2318
  delta: {
2322
- x: G.x,
2323
- y: G.y
2319
+ x: V.x,
2320
+ y: V.y
2324
2321
  },
2325
- over: Re
2322
+ over: Se
2326
2323
  };
2327
- et(() => {
2328
- Bt(Re), V?.(B), y({
2324
+ Qe(() => {
2325
+ Pt(Se), U?.(k), y({
2329
2326
  type: "onDragOver",
2330
- event: B
2327
+ event: k
2331
2328
  });
2332
2329
  });
2333
2330
  },
2334
2331
  // eslint-disable-next-line react-hooks/exhaustive-deps
2335
- [zt]
2336
- ), Q(() => {
2337
- te.current = {
2338
- activatorEvent: W,
2339
- active: _,
2340
- activeNode: q,
2341
- collisionRect: Se,
2342
- collisions: je,
2343
- droppableRects: ie,
2344
- draggableNodes: C,
2345
- draggingNode: we,
2346
- draggingNodeRect: De,
2347
- droppableContainers: O,
2332
+ [Lt]
2333
+ ), _(() => {
2334
+ ee.current = {
2335
+ activatorEvent: Y,
2336
+ active: J,
2337
+ activeNode: H,
2338
+ collisionRect: De,
2339
+ collisions: Me,
2340
+ droppableRects: oe,
2341
+ draggableNodes: w,
2342
+ draggingNode: me,
2343
+ draggingNodeRect: we,
2344
+ droppableContainers: L,
2348
2345
  over: ue,
2349
- scrollableAncestors: de,
2350
- scrollAdjustedTranslate: Ce
2351
- }, z.current = {
2352
- initial: De,
2353
- translated: Se
2346
+ scrollableAncestors: ce,
2347
+ scrollAdjustedTranslate: xe
2348
+ }, G.current = {
2349
+ initial: we,
2350
+ translated: De
2354
2351
  };
2355
- }, [_, q, je, Se, C, we, De, ie, O, ue, de, Ce]), $r({
2356
- ...ce,
2357
- delta: R,
2358
- draggingRect: Se,
2359
- pointerCoordinates: kt,
2360
- scrollableAncestors: de,
2361
- scrollableAncestorRects: Qe
2352
+ }, [J, H, Me, De, w, me, we, oe, L, ue, ce, xe]), Rr({
2353
+ ...le,
2354
+ delta: N,
2355
+ draggingRect: De,
2356
+ pointerCoordinates: Nt,
2357
+ scrollableAncestors: ce,
2358
+ scrollableAncestorRects: Je
2362
2359
  });
2363
- const jn = A(() => ({
2364
- active: _,
2365
- activeNode: q,
2366
- activeNodeRect: I,
2367
- activatorEvent: W,
2368
- collisions: je,
2369
- containerNodeRect: Le,
2370
- dragOverlay: ae,
2371
- draggableNodes: C,
2372
- droppableContainers: O,
2373
- droppableRects: ie,
2360
+ const On = A(() => ({
2361
+ active: J,
2362
+ activeNode: H,
2363
+ activeNodeRect: E,
2364
+ activatorEvent: Y,
2365
+ collisions: Me,
2366
+ containerNodeRect: Ne,
2367
+ dragOverlay: se,
2368
+ draggableNodes: w,
2369
+ droppableContainers: L,
2370
+ droppableRects: oe,
2374
2371
  over: ue,
2375
- measureDroppableContainers: me,
2376
- scrollableAncestors: de,
2377
- scrollableAncestorRects: Qe,
2378
- measuringConfiguration: K,
2379
- measuringScheduled: Me,
2380
- windowRect: vt
2381
- }), [_, q, I, W, je, Le, ae, C, O, ie, ue, me, de, Qe, K, Me, vt]), kn = A(() => ({
2382
- activatorEvent: W,
2383
- activators: $t,
2384
- active: _,
2385
- activeNodeRect: I,
2372
+ measureDroppableContainers: pe,
2373
+ scrollableAncestors: ce,
2374
+ scrollableAncestorRects: Je,
2375
+ measuringConfiguration: j,
2376
+ measuringScheduled: Te,
2377
+ windowRect: gt
2378
+ }), [J, H, E, Y, Me, Ne, se, w, L, oe, ue, pe, ce, Je, j, Te, gt]), In = A(() => ({
2379
+ activatorEvent: Y,
2380
+ activators: kt,
2381
+ active: J,
2382
+ activeNodeRect: E,
2386
2383
  ariaDescribedById: {
2387
- draggable: Te
2384
+ draggable: Ie
2388
2385
  },
2389
- dispatch: b,
2390
- draggableNodes: C,
2386
+ dispatch: p,
2387
+ draggableNodes: w,
2391
2388
  over: ue,
2392
- measureDroppableContainers: me
2393
- }), [W, $t, _, I, b, Te, C, ue, me]);
2394
- return j.createElement(rn.Provider, {
2395
- value: m
2396
- }, j.createElement(Ve.Provider, {
2397
- value: kn
2398
- }, j.createElement(yn.Provider, {
2399
- value: jn
2400
- }, j.createElement(ht.Provider, {
2401
- value: Mn
2402
- }, c)), j.createElement(ao, {
2389
+ measureDroppableContainers: pe
2390
+ }), [Y, kt, J, E, p, Ie, w, ue, pe]);
2391
+ return M.createElement(Qt.Provider, {
2392
+ value: b
2393
+ }, M.createElement(Ue.Provider, {
2394
+ value: In
2395
+ }, M.createElement(vn.Provider, {
2396
+ value: On
2397
+ }, M.createElement(ft.Provider, {
2398
+ value: En
2399
+ }, c)), M.createElement(Hr, {
2403
2400
  disabled: a?.restoreFocus === !1
2404
- })), j.createElement(lr, {
2401
+ })), M.createElement(Jn, {
2405
2402
  ...a,
2406
- hiddenTextDescribedById: Te
2403
+ hiddenTextDescribedById: Ie
2407
2404
  }));
2408
- function Pn() {
2409
- const F = Oe?.autoScrollEnabled === !1, H = typeof l == "object" ? l.enabled === !1 : l === !1, U = S && !F && !H;
2405
+ function Tn() {
2406
+ const B = Oe?.autoScrollEnabled === !1, K = typeof l == "object" ? l.enabled === !1 : l === !1, W = R && !B && !K;
2410
2407
  return typeof l == "object" ? {
2411
2408
  ...l,
2412
- enabled: U
2409
+ enabled: W
2413
2410
  } : {
2414
- enabled: U
2411
+ enabled: W
2415
2412
  };
2416
2413
  }
2417
- }), fo = /* @__PURE__ */ Ke(null), Qt = "button", go = "Draggable";
2418
- function ho(e) {
2414
+ }), Gr = /* @__PURE__ */ je(null), qt = "button", Jr = "Draggable";
2415
+ function _r(e) {
2419
2416
  let {
2420
2417
  id: t,
2421
2418
  data: n,
2422
2419
  disabled: r = !1,
2423
2420
  attributes: o
2424
2421
  } = e;
2425
- const i = Ue(go), {
2422
+ const i = We(Jr), {
2426
2423
  activators: s,
2427
2424
  activatorEvent: a,
2428
2425
  active: l,
2429
2426
  activeNodeRect: c,
2430
- ariaDescribedById: d,
2431
- draggableNodes: u,
2432
- over: h
2433
- } = pe(Ve), {
2434
- role: f = Qt,
2435
- roleDescription: p = "draggable",
2436
- tabIndex: g = 0
2437
- } = o ?? {}, v = l?.id === t, b = pe(v ? ht : fo), [y, m] = ot(), [D, x] = ot(), S = Zr(s, t), w = Xe(n);
2438
- Q(
2439
- () => (u.set(t, {
2427
+ ariaDescribedById: u,
2428
+ draggableNodes: d,
2429
+ over: g
2430
+ } = ve(Ue), {
2431
+ role: f = qt,
2432
+ roleDescription: x = "draggable",
2433
+ tabIndex: h = 0
2434
+ } = o ?? {}, v = l?.id === t, p = ve(v ? ft : Gr), [y, b] = nt(), [D, S] = nt(), R = Fr(s, t), m = $e(n);
2435
+ _(
2436
+ () => (d.set(t, {
2440
2437
  id: t,
2441
2438
  key: i,
2442
2439
  node: y,
2443
2440
  activatorNode: D,
2444
- data: w
2441
+ data: m
2445
2442
  }), () => {
2446
- const R = u.get(t);
2447
- R && R.key === i && u.delete(t);
2443
+ const N = d.get(t);
2444
+ N && N.key === i && d.delete(t);
2448
2445
  }),
2449
2446
  // eslint-disable-next-line react-hooks/exhaustive-deps
2450
- [u, t]
2447
+ [d, t]
2451
2448
  );
2452
- const C = A(() => ({
2449
+ const w = A(() => ({
2453
2450
  role: f,
2454
- tabIndex: g,
2451
+ tabIndex: h,
2455
2452
  "aria-disabled": r,
2456
- "aria-pressed": v && f === Qt ? !0 : void 0,
2457
- "aria-roledescription": p,
2458
- "aria-describedby": d.draggable
2459
- }), [r, f, g, v, p, d.draggable]);
2453
+ "aria-pressed": v && f === qt ? !0 : void 0,
2454
+ "aria-roledescription": x,
2455
+ "aria-describedby": u.draggable
2456
+ }), [r, f, h, v, x, u.draggable]);
2460
2457
  return {
2461
2458
  active: l,
2462
2459
  activatorEvent: a,
2463
2460
  activeNodeRect: c,
2464
- attributes: C,
2461
+ attributes: w,
2465
2462
  isDragging: v,
2466
- listeners: r ? void 0 : S,
2463
+ listeners: r ? void 0 : R,
2467
2464
  node: y,
2468
- over: h,
2469
- setNodeRef: m,
2470
- setActivatorNodeRef: x,
2471
- transform: b
2465
+ over: g,
2466
+ setNodeRef: b,
2467
+ setActivatorNodeRef: S,
2468
+ transform: p
2472
2469
  };
2473
2470
  }
2474
- function wn() {
2475
- return pe(yn);
2471
+ function bn() {
2472
+ return ve(vn);
2476
2473
  }
2477
- const vo = "Droppable", po = {
2474
+ const Qr = "Droppable", Zr = {
2478
2475
  timeout: 25
2479
2476
  };
2480
- function bo(e) {
2477
+ function eo(e) {
2481
2478
  let {
2482
2479
  data: t,
2483
2480
  disabled: n = !1,
2484
2481
  id: r,
2485
2482
  resizeObserverConfig: o
2486
2483
  } = e;
2487
- const i = Ue(vo), {
2484
+ const i = We(Qr), {
2488
2485
  active: s,
2489
2486
  dispatch: a,
2490
2487
  over: l,
2491
2488
  measureDroppableContainers: c
2492
- } = pe(Ve), d = M({
2489
+ } = ve(Ue), u = I({
2493
2490
  disabled: n
2494
- }), u = M(!1), h = M(null), f = M(null), {
2495
- disabled: p,
2496
- updateMeasurementsFor: g,
2491
+ }), d = I(!1), g = I(null), f = I(null), {
2492
+ disabled: x,
2493
+ updateMeasurementsFor: h,
2497
2494
  timeout: v
2498
2495
  } = {
2499
- ...po,
2496
+ ...Zr,
2500
2497
  ...o
2501
- }, b = Xe(g ?? r), y = $(
2498
+ }, p = $e(h ?? r), y = F(
2502
2499
  () => {
2503
- if (!u.current) {
2504
- u.current = !0;
2500
+ if (!d.current) {
2501
+ d.current = !0;
2505
2502
  return;
2506
2503
  }
2507
2504
  f.current != null && clearTimeout(f.current), f.current = setTimeout(() => {
2508
- c(Array.isArray(b.current) ? b.current : [b.current]), f.current = null;
2505
+ c(Array.isArray(p.current) ? p.current : [p.current]), f.current = null;
2509
2506
  }, v);
2510
2507
  },
2511
2508
  //eslint-disable-next-line react-hooks/exhaustive-deps
2512
2509
  [v]
2513
- ), m = gt({
2510
+ ), b = dt({
2514
2511
  callback: y,
2515
- disabled: p || !s
2516
- }), D = $((C, R) => {
2517
- m && (R && (m.unobserve(R), u.current = !1), C && m.observe(C));
2518
- }, [m]), [x, S] = ot(D), w = Xe(t);
2512
+ disabled: x || !s
2513
+ }), D = F((w, N) => {
2514
+ b && (N && (b.unobserve(N), d.current = !1), w && b.observe(w));
2515
+ }, [b]), [S, R] = nt(D), m = $e(t);
2519
2516
  return T(() => {
2520
- !m || !x.current || (m.disconnect(), u.current = !1, m.observe(x.current));
2521
- }, [x, m]), T(
2517
+ !b || !S.current || (b.disconnect(), d.current = !1, b.observe(S.current));
2518
+ }, [S, b]), T(
2522
2519
  () => (a({
2523
- type: k.RegisterDroppable,
2520
+ type: P.RegisterDroppable,
2524
2521
  element: {
2525
2522
  id: r,
2526
2523
  key: i,
2527
2524
  disabled: n,
2528
- node: x,
2529
- rect: h,
2530
- data: w
2525
+ node: S,
2526
+ rect: g,
2527
+ data: m
2531
2528
  }
2532
2529
  }), () => a({
2533
- type: k.UnregisterDroppable,
2530
+ type: P.UnregisterDroppable,
2534
2531
  key: i,
2535
2532
  id: r
2536
2533
  })),
2537
2534
  // eslint-disable-next-line react-hooks/exhaustive-deps
2538
2535
  [r]
2539
2536
  ), T(() => {
2540
- n !== d.current.disabled && (a({
2541
- type: k.SetDroppableDisabled,
2537
+ n !== u.current.disabled && (a({
2538
+ type: P.SetDroppableDisabled,
2542
2539
  id: r,
2543
2540
  key: i,
2544
2541
  disabled: n
2545
- }), d.current.disabled = n);
2542
+ }), u.current.disabled = n);
2546
2543
  }, [r, i, n, a]), {
2547
2544
  active: s,
2548
- rect: h,
2545
+ rect: g,
2549
2546
  isOver: l?.id === r,
2550
- node: x,
2547
+ node: S,
2551
2548
  over: l,
2552
- setNodeRef: S
2549
+ setNodeRef: R
2553
2550
  };
2554
2551
  }
2555
- function mo(e) {
2552
+ function to(e) {
2556
2553
  let {
2557
2554
  animation: t,
2558
2555
  children: n
2559
2556
  } = e;
2560
- const [r, o] = X(null), [i, s] = X(null), a = it(n);
2561
- return !n && !r && a && o(a), Q(() => {
2557
+ const [r, o] = $(null), [i, s] = $(null), a = rt(n);
2558
+ return !n && !r && a && o(a), _(() => {
2562
2559
  if (!i)
2563
2560
  return;
2564
2561
  const l = r?.key, c = r?.props.id;
@@ -2569,30 +2566,30 @@ function mo(e) {
2569
2566
  Promise.resolve(t(c, i)).then(() => {
2570
2567
  o(null);
2571
2568
  });
2572
- }, [t, r, i]), j.createElement(j.Fragment, null, n, r ? Xn(r, {
2569
+ }, [t, r, i]), M.createElement(M.Fragment, null, n, r ? Pn(r, {
2573
2570
  ref: s
2574
2571
  }) : null);
2575
2572
  }
2576
- const yo = {
2573
+ const no = {
2577
2574
  x: 0,
2578
2575
  y: 0,
2579
2576
  scaleX: 1,
2580
2577
  scaleY: 1
2581
2578
  };
2582
- function xo(e) {
2579
+ function ro(e) {
2583
2580
  let {
2584
2581
  children: t
2585
2582
  } = e;
2586
- return j.createElement(Ve.Provider, {
2587
- value: mn
2588
- }, j.createElement(ht.Provider, {
2589
- value: yo
2583
+ return M.createElement(Ue.Provider, {
2584
+ value: hn
2585
+ }, M.createElement(ft.Provider, {
2586
+ value: no
2590
2587
  }, t));
2591
2588
  }
2592
- const wo = {
2589
+ const oo = {
2593
2590
  position: "fixed",
2594
2591
  touchAction: "none"
2595
- }, Do = (e) => ft(e) ? "transform 250ms ease" : void 0, Co = /* @__PURE__ */ $n((e, t) => {
2592
+ }, io = (e) => ut(e) ? "transform 250ms ease" : void 0, so = /* @__PURE__ */ zn((e, t) => {
2596
2593
  let {
2597
2594
  as: n,
2598
2595
  activatorEvent: r,
@@ -2602,31 +2599,31 @@ const wo = {
2602
2599
  rect: a,
2603
2600
  style: l,
2604
2601
  transform: c,
2605
- transition: d = Do
2602
+ transition: u = io
2606
2603
  } = e;
2607
2604
  if (!a)
2608
2605
  return null;
2609
- const u = o ? c : {
2606
+ const d = o ? c : {
2610
2607
  ...c,
2611
2608
  scaleX: 1,
2612
2609
  scaleY: 1
2613
- }, h = {
2614
- ...wo,
2610
+ }, g = {
2611
+ ...oo,
2615
2612
  width: a.width,
2616
2613
  height: a.height,
2617
2614
  top: a.top,
2618
2615
  left: a.left,
2619
- transform: be.Transform.toString(u),
2620
- transformOrigin: o && r ? fr(r, a) : void 0,
2621
- transition: typeof d == "function" ? d(r) : d,
2616
+ transform: be.Transform.toString(d),
2617
+ transformOrigin: o && r ? Qn(r, a) : void 0,
2618
+ transition: typeof u == "function" ? u(r) : u,
2622
2619
  ...l
2623
2620
  };
2624
- return j.createElement(n, {
2621
+ return M.createElement(n, {
2625
2622
  className: s,
2626
- style: h,
2623
+ style: g,
2627
2624
  ref: t
2628
2625
  }, i);
2629
- }), So = (e) => (t) => {
2626
+ }), ao = (e) => (t) => {
2630
2627
  let {
2631
2628
  active: n,
2632
2629
  dragOverlay: r
@@ -2646,7 +2643,7 @@ const wo = {
2646
2643
  n.node.style.setProperty(l, c);
2647
2644
  s != null && s.active && n.node.classList.remove(s.active);
2648
2645
  };
2649
- }, Ro = (e) => {
2646
+ }, lo = (e) => {
2650
2647
  let {
2651
2648
  transform: {
2652
2649
  initial: t,
@@ -2658,11 +2655,11 @@ const wo = {
2658
2655
  }, {
2659
2656
  transform: be.Transform.toString(n)
2660
2657
  }];
2661
- }, Eo = {
2658
+ }, co = {
2662
2659
  duration: 250,
2663
2660
  easing: "ease",
2664
- keyframes: Ro,
2665
- sideEffects: /* @__PURE__ */ So({
2661
+ keyframes: lo,
2662
+ sideEffects: /* @__PURE__ */ ao({
2666
2663
  styles: {
2667
2664
  active: {
2668
2665
  opacity: "0"
@@ -2670,14 +2667,14 @@ const wo = {
2670
2667
  }
2671
2668
  })
2672
2669
  };
2673
- function No(e) {
2670
+ function uo(e) {
2674
2671
  let {
2675
2672
  config: t,
2676
2673
  draggableNodes: n,
2677
2674
  droppableContainers: r,
2678
2675
  measuringConfiguration: o
2679
2676
  } = e;
2680
- return ut((i, s) => {
2677
+ return ct((i, s) => {
2681
2678
  if (t === null)
2682
2679
  return;
2683
2680
  const a = n.get(i);
@@ -2686,16 +2683,16 @@ function No(e) {
2686
2683
  const l = a.node.current;
2687
2684
  if (!l)
2688
2685
  return;
2689
- const c = bn(s);
2686
+ const c = gn(s);
2690
2687
  if (!c)
2691
2688
  return;
2692
2689
  const {
2693
- transform: d
2694
- } = Y(s).getComputedStyle(s), u = sn(d);
2695
- if (!u)
2690
+ transform: u
2691
+ } = X(s).getComputedStyle(s), d = en(u);
2692
+ if (!d)
2696
2693
  return;
2697
- const h = typeof t == "function" ? t : Io(t);
2698
- return gn(l, o.draggable.measure), h({
2694
+ const g = typeof t == "function" ? t : fo(t);
2695
+ return ln(l, o.draggable.measure), g({
2699
2696
  active: {
2700
2697
  id: i,
2701
2698
  data: a.data,
@@ -2709,18 +2706,18 @@ function No(e) {
2709
2706
  },
2710
2707
  droppableContainers: r,
2711
2708
  measuringConfiguration: o,
2712
- transform: u
2709
+ transform: d
2713
2710
  });
2714
2711
  });
2715
2712
  }
2716
- function Io(e) {
2713
+ function fo(e) {
2717
2714
  const {
2718
2715
  duration: t,
2719
2716
  easing: n,
2720
2717
  sideEffects: r,
2721
2718
  keyframes: o
2722
2719
  } = {
2723
- ...Eo,
2720
+ ...co,
2724
2721
  ...e
2725
2722
  };
2726
2723
  return (i) => {
@@ -2732,51 +2729,51 @@ function Io(e) {
2732
2729
  } = i;
2733
2730
  if (!t)
2734
2731
  return;
2735
- const d = {
2732
+ const u = {
2736
2733
  x: a.rect.left - s.rect.left,
2737
2734
  y: a.rect.top - s.rect.top
2738
- }, u = {
2735
+ }, d = {
2739
2736
  scaleX: l.scaleX !== 1 ? s.rect.width * l.scaleX / a.rect.width : 1,
2740
2737
  scaleY: l.scaleY !== 1 ? s.rect.height * l.scaleY / a.rect.height : 1
2741
- }, h = {
2742
- x: l.x - d.x,
2743
- y: l.y - d.y,
2744
- ...u
2738
+ }, g = {
2739
+ x: l.x - u.x,
2740
+ y: l.y - u.y,
2741
+ ...d
2745
2742
  }, f = o({
2746
2743
  ...c,
2747
2744
  active: s,
2748
2745
  dragOverlay: a,
2749
2746
  transform: {
2750
2747
  initial: l,
2751
- final: h
2748
+ final: g
2752
2749
  }
2753
- }), [p] = f, g = f[f.length - 1];
2754
- if (JSON.stringify(p) === JSON.stringify(g))
2750
+ }), [x] = f, h = f[f.length - 1];
2751
+ if (JSON.stringify(x) === JSON.stringify(h))
2755
2752
  return;
2756
2753
  const v = r?.({
2757
2754
  active: s,
2758
2755
  dragOverlay: a,
2759
2756
  ...c
2760
- }), b = a.node.animate(f, {
2757
+ }), p = a.node.animate(f, {
2761
2758
  duration: t,
2762
2759
  easing: n,
2763
2760
  fill: "forwards"
2764
2761
  });
2765
2762
  return new Promise((y) => {
2766
- b.onfinish = () => {
2763
+ p.onfinish = () => {
2767
2764
  v?.(), y();
2768
2765
  };
2769
2766
  });
2770
2767
  };
2771
2768
  }
2772
- let Zt = 0;
2773
- function Ao(e) {
2769
+ let Gt = 0;
2770
+ function go(e) {
2774
2771
  return A(() => {
2775
2772
  if (e != null)
2776
- return Zt++, Zt;
2773
+ return Gt++, Gt;
2777
2774
  }, [e]);
2778
2775
  }
2779
- const Oo = /* @__PURE__ */ j.memo((e) => {
2776
+ const No = /* @__PURE__ */ M.memo((e) => {
2780
2777
  let {
2781
2778
  adjustScale: t = !1,
2782
2779
  children: n,
@@ -2789,69 +2786,69 @@ const Oo = /* @__PURE__ */ j.memo((e) => {
2789
2786
  zIndex: c = 999
2790
2787
  } = e;
2791
2788
  const {
2792
- activatorEvent: d,
2793
- active: u,
2794
- activeNodeRect: h,
2789
+ activatorEvent: u,
2790
+ active: d,
2791
+ activeNodeRect: g,
2795
2792
  containerNodeRect: f,
2796
- draggableNodes: p,
2797
- droppableContainers: g,
2793
+ draggableNodes: x,
2794
+ droppableContainers: h,
2798
2795
  dragOverlay: v,
2799
- over: b,
2796
+ over: p,
2800
2797
  measuringConfiguration: y,
2801
- scrollableAncestors: m,
2798
+ scrollableAncestors: b,
2802
2799
  scrollableAncestorRects: D,
2803
- windowRect: x
2804
- } = wn(), S = pe(ht), w = Ao(u?.id), C = xn(s, {
2805
- activatorEvent: d,
2806
- active: u,
2807
- activeNodeRect: h,
2800
+ windowRect: S
2801
+ } = bn(), R = ve(ft), m = go(d?.id), w = pn(s, {
2802
+ activatorEvent: u,
2803
+ active: d,
2804
+ activeNodeRect: g,
2808
2805
  containerNodeRect: f,
2809
2806
  draggingNodeRect: v.rect,
2810
- over: b,
2807
+ over: p,
2811
2808
  overlayNodeRect: v.rect,
2812
- scrollableAncestors: m,
2809
+ scrollableAncestors: b,
2813
2810
  scrollableAncestorRects: D,
2814
- transform: S,
2815
- windowRect: x
2816
- }), R = Tt(h), O = No({
2811
+ transform: R,
2812
+ windowRect: S
2813
+ }), N = Ot(g), L = uo({
2817
2814
  config: r,
2818
- draggableNodes: p,
2819
- droppableContainers: g,
2815
+ draggableNodes: x,
2816
+ droppableContainers: h,
2820
2817
  measuringConfiguration: y
2821
- }), E = R ? v.setRef : void 0;
2822
- return j.createElement(xo, null, j.createElement(mo, {
2823
- animation: O
2824
- }, u && w ? j.createElement(Co, {
2825
- key: w,
2826
- id: u.id,
2827
- ref: E,
2818
+ }), O = N ? v.setRef : void 0;
2819
+ return M.createElement(ro, null, M.createElement(to, {
2820
+ animation: L
2821
+ }, d && m ? M.createElement(so, {
2822
+ key: m,
2823
+ id: d.id,
2824
+ ref: O,
2828
2825
  as: a,
2829
- activatorEvent: d,
2826
+ activatorEvent: u,
2830
2827
  adjustScale: t,
2831
2828
  className: l,
2832
2829
  transition: i,
2833
- rect: R,
2830
+ rect: N,
2834
2831
  style: {
2835
2832
  zIndex: c,
2836
2833
  ...o
2837
2834
  },
2838
- transform: C
2835
+ transform: w
2839
2836
  }, n) : null));
2840
2837
  });
2841
- function Mt(e, t, n) {
2838
+ function yn(e, t, n) {
2842
2839
  const r = e.slice();
2843
2840
  return r.splice(n < 0 ? r.length + n : n, 0, r.splice(t, 1)[0]), r;
2844
2841
  }
2845
- function To(e, t) {
2842
+ function ho(e, t) {
2846
2843
  return e.reduce((n, r, o) => {
2847
2844
  const i = t.get(r);
2848
2845
  return i && (n[o] = i), n;
2849
2846
  }, Array(e.length));
2850
2847
  }
2851
- function tt(e) {
2848
+ function Ze(e) {
2852
2849
  return e !== null && e >= 0;
2853
2850
  }
2854
- function Mo(e, t) {
2851
+ function vo(e, t) {
2855
2852
  if (e === t)
2856
2853
  return !0;
2857
2854
  if (e.length !== t.length)
@@ -2861,30 +2858,30 @@ function Mo(e, t) {
2861
2858
  return !1;
2862
2859
  return !0;
2863
2860
  }
2864
- function Lo(e) {
2861
+ function po(e) {
2865
2862
  return typeof e == "boolean" ? {
2866
2863
  draggable: e,
2867
2864
  droppable: e
2868
2865
  } : e;
2869
2866
  }
2870
- const Dn = (e) => {
2867
+ const mn = (e) => {
2871
2868
  let {
2872
2869
  rects: t,
2873
2870
  activeIndex: n,
2874
2871
  overIndex: r,
2875
2872
  index: o
2876
2873
  } = e;
2877
- const i = Mt(t, r, n), s = t[o], a = i[o];
2874
+ const i = yn(t, r, n), s = t[o], a = i[o];
2878
2875
  return !a || !s ? null : {
2879
2876
  x: a.left - s.left,
2880
2877
  y: a.top - s.top,
2881
2878
  scaleX: a.width / s.width,
2882
2879
  scaleY: a.height / s.height
2883
2880
  };
2884
- }, nt = {
2881
+ }, et = {
2885
2882
  scaleX: 1,
2886
2883
  scaleY: 1
2887
- }, jo = (e) => {
2884
+ }, Mo = (e) => {
2888
2885
  var t;
2889
2886
  let {
2890
2887
  activeIndex: n,
@@ -2901,48 +2898,48 @@ const Dn = (e) => {
2901
2898
  return c ? {
2902
2899
  x: 0,
2903
2900
  y: n < s ? c.top + c.height - (a.top + a.height) : c.top - a.top,
2904
- ...nt
2901
+ ...et
2905
2902
  } : null;
2906
2903
  }
2907
- const l = ko(i, o, n);
2904
+ const l = bo(i, o, n);
2908
2905
  return o > n && o <= s ? {
2909
2906
  x: 0,
2910
2907
  y: -a.height - l,
2911
- ...nt
2908
+ ...et
2912
2909
  } : o < n && o >= s ? {
2913
2910
  x: 0,
2914
2911
  y: a.height + l,
2915
- ...nt
2912
+ ...et
2916
2913
  } : {
2917
2914
  x: 0,
2918
2915
  y: 0,
2919
- ...nt
2916
+ ...et
2920
2917
  };
2921
2918
  };
2922
- function ko(e, t, n) {
2919
+ function bo(e, t, n) {
2923
2920
  const r = e[t], o = e[t - 1], i = e[t + 1];
2924
2921
  return r ? n < t ? o ? r.top - (o.top + o.height) : i ? i.top - (r.top + r.height) : 0 : i ? i.top - (r.top + r.height) : o ? r.top - (o.top + o.height) : 0 : 0;
2925
2922
  }
2926
- const Cn = "Sortable", Sn = /* @__PURE__ */ j.createContext({
2923
+ const wn = "Sortable", xn = /* @__PURE__ */ M.createContext({
2927
2924
  activeIndex: -1,
2928
- containerId: Cn,
2925
+ containerId: wn,
2929
2926
  disableTransforms: !1,
2930
2927
  items: [],
2931
2928
  overIndex: -1,
2932
2929
  useDragOverlay: !1,
2933
2930
  sortedRects: [],
2934
- strategy: Dn,
2931
+ strategy: mn,
2935
2932
  disabled: {
2936
2933
  draggable: !1,
2937
2934
  droppable: !1
2938
2935
  }
2939
2936
  });
2940
- function Po(e) {
2937
+ function Lo(e) {
2941
2938
  let {
2942
2939
  children: t,
2943
2940
  id: n,
2944
2941
  items: r,
2945
- strategy: o = Dn,
2942
+ strategy: o = mn,
2946
2943
  disabled: i = !1
2947
2944
  } = e;
2948
2945
  const {
@@ -2950,41 +2947,41 @@ function Po(e) {
2950
2947
  dragOverlay: a,
2951
2948
  droppableRects: l,
2952
2949
  over: c,
2953
- measureDroppableContainers: d
2954
- } = wn(), u = Ue(Cn, n), h = a.rect !== null, f = A(() => r.map((S) => typeof S == "object" && "id" in S ? S.id : S), [r]), p = s != null, g = s ? f.indexOf(s.id) : -1, v = c ? f.indexOf(c.id) : -1, b = M(f), y = !Mo(f, b.current), m = v !== -1 && g === -1 || y, D = Lo(i);
2955
- Q(() => {
2956
- y && p && d(f);
2957
- }, [y, f, p, d]), T(() => {
2958
- b.current = f;
2950
+ measureDroppableContainers: u
2951
+ } = bn(), d = We(wn, n), g = a.rect !== null, f = A(() => r.map((R) => typeof R == "object" && "id" in R ? R.id : R), [r]), x = s != null, h = s ? f.indexOf(s.id) : -1, v = c ? f.indexOf(c.id) : -1, p = I(f), y = !vo(f, p.current), b = v !== -1 && h === -1 || y, D = po(i);
2952
+ _(() => {
2953
+ y && x && u(f);
2954
+ }, [y, f, x, u]), T(() => {
2955
+ p.current = f;
2959
2956
  }, [f]);
2960
- const x = A(
2957
+ const S = A(
2961
2958
  () => ({
2962
- activeIndex: g,
2963
- containerId: u,
2959
+ activeIndex: h,
2960
+ containerId: d,
2964
2961
  disabled: D,
2965
- disableTransforms: m,
2962
+ disableTransforms: b,
2966
2963
  items: f,
2967
2964
  overIndex: v,
2968
- useDragOverlay: h,
2969
- sortedRects: To(f, l),
2965
+ useDragOverlay: g,
2966
+ sortedRects: ho(f, l),
2970
2967
  strategy: o
2971
2968
  }),
2972
2969
  // eslint-disable-next-line react-hooks/exhaustive-deps
2973
- [g, u, D.draggable, D.droppable, m, f, v, l, h, o]
2970
+ [h, d, D.draggable, D.droppable, b, f, v, l, g, o]
2974
2971
  );
2975
- return j.createElement(Sn.Provider, {
2976
- value: x
2972
+ return M.createElement(xn.Provider, {
2973
+ value: S
2977
2974
  }, t);
2978
2975
  }
2979
- const zo = (e) => {
2976
+ const yo = (e) => {
2980
2977
  let {
2981
2978
  id: t,
2982
2979
  items: n,
2983
2980
  activeIndex: r,
2984
2981
  overIndex: o
2985
2982
  } = e;
2986
- return Mt(n, r, o).indexOf(t);
2987
- }, Bo = (e) => {
2983
+ return yn(n, r, o).indexOf(t);
2984
+ }, mo = (e) => {
2988
2985
  let {
2989
2986
  containerId: t,
2990
2987
  isSorting: n,
@@ -2997,37 +2994,37 @@ const zo = (e) => {
2997
2994
  transition: c
2998
2995
  } = e;
2999
2996
  return !c || !r || a !== i && o === s ? !1 : n ? !0 : s !== o && t === l;
3000
- }, Fo = {
2997
+ }, wo = {
3001
2998
  duration: 200,
3002
2999
  easing: "ease"
3003
- }, Rn = "transform", $o = /* @__PURE__ */ be.Transition.toString({
3004
- property: Rn,
3000
+ }, Dn = "transform", xo = /* @__PURE__ */ be.Transition.toString({
3001
+ property: Dn,
3005
3002
  duration: 0,
3006
3003
  easing: "linear"
3007
- }), Xo = {
3004
+ }), Do = {
3008
3005
  roleDescription: "sortable"
3009
3006
  };
3010
- function Yo(e) {
3007
+ function So(e) {
3011
3008
  let {
3012
3009
  disabled: t,
3013
3010
  index: n,
3014
3011
  node: r,
3015
3012
  rect: o
3016
3013
  } = e;
3017
- const [i, s] = X(null), a = M(n);
3018
- return Q(() => {
3014
+ const [i, s] = $(null), a = I(n);
3015
+ return _(() => {
3019
3016
  if (!t && n !== a.current && r.current) {
3020
3017
  const l = o.current;
3021
3018
  if (l) {
3022
3019
  const c = Ae(r.current, {
3023
3020
  ignoreTransform: !0
3024
- }), d = {
3021
+ }), u = {
3025
3022
  x: l.left - c.left,
3026
3023
  y: l.top - c.top,
3027
3024
  scaleX: l.width / c.width,
3028
3025
  scaleY: l.height / c.height
3029
3026
  };
3030
- (d.x || d.y) && s(d);
3027
+ (u.x || u.y) && s(u);
3031
3028
  }
3032
3029
  }
3033
3030
  n !== a.current && (a.current = n);
@@ -3035,153 +3032,153 @@ function Yo(e) {
3035
3032
  i && s(null);
3036
3033
  }, [i]), i;
3037
3034
  }
3038
- function En(e) {
3035
+ function Po(e) {
3039
3036
  let {
3040
- animateLayoutChanges: t = Bo,
3037
+ animateLayoutChanges: t = mo,
3041
3038
  attributes: n,
3042
3039
  disabled: r,
3043
3040
  data: o,
3044
- getNewIndex: i = zo,
3041
+ getNewIndex: i = yo,
3045
3042
  id: s,
3046
3043
  strategy: a,
3047
3044
  resizeObserverConfig: l,
3048
- transition: c = Fo
3045
+ transition: c = wo
3049
3046
  } = e;
3050
3047
  const {
3051
- items: d,
3052
- containerId: u,
3053
- activeIndex: h,
3048
+ items: u,
3049
+ containerId: d,
3050
+ activeIndex: g,
3054
3051
  disabled: f,
3055
- disableTransforms: p,
3056
- sortedRects: g,
3052
+ disableTransforms: x,
3053
+ sortedRects: h,
3057
3054
  overIndex: v,
3058
- useDragOverlay: b,
3055
+ useDragOverlay: p,
3059
3056
  strategy: y
3060
- } = pe(Sn), m = Ko(r, f), D = d.indexOf(s), x = A(() => ({
3057
+ } = ve(xn), b = Co(r, f), D = u.indexOf(s), S = A(() => ({
3061
3058
  sortable: {
3062
- containerId: u,
3059
+ containerId: d,
3063
3060
  index: D,
3064
- items: d
3061
+ items: u
3065
3062
  },
3066
3063
  ...o
3067
- }), [u, o, D, d]), S = A(() => d.slice(d.indexOf(s)), [d, s]), {
3068
- rect: w,
3069
- node: C,
3070
- isOver: R,
3071
- setNodeRef: O
3072
- } = bo({
3064
+ }), [d, o, D, u]), R = A(() => u.slice(u.indexOf(s)), [u, s]), {
3065
+ rect: m,
3066
+ node: w,
3067
+ isOver: N,
3068
+ setNodeRef: L
3069
+ } = eo({
3073
3070
  id: s,
3074
- data: x,
3075
- disabled: m.droppable,
3071
+ data: S,
3072
+ disabled: b.droppable,
3076
3073
  resizeObserverConfig: {
3077
- updateMeasurementsFor: S,
3074
+ updateMeasurementsFor: R,
3078
3075
  ...l
3079
3076
  }
3080
3077
  }), {
3081
- active: E,
3082
- activatorEvent: z,
3083
- activeNodeRect: _,
3084
- attributes: ee,
3078
+ active: O,
3079
+ activatorEvent: G,
3080
+ activeNodeRect: J,
3081
+ attributes: Z,
3085
3082
  setNodeRef: Oe,
3086
- listeners: qe,
3087
- isDragging: W,
3088
- over: Ge,
3089
- setActivatorNodeRef: oe,
3090
- transform: Te
3091
- } = ho({
3083
+ listeners: He,
3084
+ isDragging: Y,
3085
+ over: Ve,
3086
+ setActivatorNodeRef: re,
3087
+ transform: Ie
3088
+ } = _r({
3092
3089
  id: s,
3093
- data: x,
3090
+ data: S,
3094
3091
  attributes: {
3095
- ...Xo,
3092
+ ...Do,
3096
3093
  ...n
3097
3094
  },
3098
- disabled: m.draggable
3099
- }), Je = Gn(O, Oe), K = !!E, ie = K && !p && tt(h) && tt(v), me = !b && W, Me = me && ie ? Te : null, _e = ie ? Me ?? (a ?? y)({
3100
- rects: g,
3101
- activeNodeRect: _,
3102
- activeIndex: h,
3095
+ disabled: b.draggable
3096
+ }), qe = Bn(L, Oe), j = !!O, oe = j && !x && Ze(g) && Ze(v), pe = !p && Y, Te = pe && oe ? Ie : null, Ge = oe ? Te ?? (a ?? y)({
3097
+ rects: h,
3098
+ activeNodeRect: J,
3099
+ activeIndex: g,
3103
3100
  overIndex: v,
3104
3101
  index: D
3105
- }) : null, ce = tt(h) && tt(v) ? i({
3102
+ }) : null, le = Ze(g) && Ze(v) ? i({
3106
3103
  id: s,
3107
- items: d,
3108
- activeIndex: h,
3104
+ items: u,
3105
+ activeIndex: g,
3109
3106
  overIndex: v
3110
- }) : D, se = E?.id, I = M({
3111
- activeId: se,
3112
- items: d,
3113
- newIndex: ce,
3114
- containerId: u
3115
- }), Le = d !== I.current.items, te = t({
3116
- active: E,
3117
- containerId: u,
3118
- isDragging: W,
3119
- isSorting: K,
3107
+ }) : D, ie = O?.id, E = I({
3108
+ activeId: ie,
3109
+ items: u,
3110
+ newIndex: le,
3111
+ containerId: d
3112
+ }), Ne = u !== E.current.items, ee = t({
3113
+ active: O,
3114
+ containerId: d,
3115
+ isDragging: Y,
3116
+ isSorting: j,
3120
3117
  id: s,
3121
3118
  index: D,
3122
- items: d,
3123
- newIndex: I.current.newIndex,
3124
- previousItems: I.current.items,
3125
- previousContainerId: I.current.containerId,
3119
+ items: u,
3120
+ newIndex: E.current.newIndex,
3121
+ previousItems: E.current.items,
3122
+ previousContainerId: E.current.containerId,
3126
3123
  transition: c,
3127
- wasDragging: I.current.activeId != null
3128
- }), xe = Yo({
3129
- disabled: !te,
3124
+ wasDragging: E.current.activeId != null
3125
+ }), ye = So({
3126
+ disabled: !ee,
3130
3127
  index: D,
3131
- node: C,
3132
- rect: w
3128
+ node: w,
3129
+ rect: m
3133
3130
  });
3134
3131
  return T(() => {
3135
- K && I.current.newIndex !== ce && (I.current.newIndex = ce), u !== I.current.containerId && (I.current.containerId = u), d !== I.current.items && (I.current.items = d);
3136
- }, [K, ce, u, d]), T(() => {
3137
- if (se === I.current.activeId)
3132
+ j && E.current.newIndex !== le && (E.current.newIndex = le), d !== E.current.containerId && (E.current.containerId = d), u !== E.current.items && (E.current.items = u);
3133
+ }, [j, le, d, u]), T(() => {
3134
+ if (ie === E.current.activeId)
3138
3135
  return;
3139
- if (se != null && I.current.activeId == null) {
3140
- I.current.activeId = se;
3136
+ if (ie != null && E.current.activeId == null) {
3137
+ E.current.activeId = ie;
3141
3138
  return;
3142
3139
  }
3143
- const we = setTimeout(() => {
3144
- I.current.activeId = se;
3140
+ const me = setTimeout(() => {
3141
+ E.current.activeId = ie;
3145
3142
  }, 50);
3146
- return () => clearTimeout(we);
3147
- }, [se]), {
3148
- active: E,
3149
- activeIndex: h,
3150
- attributes: ee,
3151
- data: x,
3152
- rect: w,
3143
+ return () => clearTimeout(me);
3144
+ }, [ie]), {
3145
+ active: O,
3146
+ activeIndex: g,
3147
+ attributes: Z,
3148
+ data: S,
3149
+ rect: m,
3153
3150
  index: D,
3154
- newIndex: ce,
3155
- items: d,
3156
- isOver: R,
3157
- isSorting: K,
3158
- isDragging: W,
3159
- listeners: qe,
3160
- node: C,
3151
+ newIndex: le,
3152
+ items: u,
3153
+ isOver: N,
3154
+ isSorting: j,
3155
+ isDragging: Y,
3156
+ listeners: He,
3157
+ node: w,
3161
3158
  overIndex: v,
3162
- over: Ge,
3163
- setNodeRef: Je,
3164
- setActivatorNodeRef: oe,
3165
- setDroppableNodeRef: O,
3159
+ over: Ve,
3160
+ setNodeRef: qe,
3161
+ setActivatorNodeRef: re,
3162
+ setDroppableNodeRef: L,
3166
3163
  setDraggableNodeRef: Oe,
3167
- transform: xe ?? _e,
3168
- transition: ae()
3164
+ transform: ye ?? Ge,
3165
+ transition: se()
3169
3166
  };
3170
- function ae() {
3167
+ function se() {
3171
3168
  if (
3172
3169
  // Temporarily disable transitions for a single frame to set up derived transforms
3173
- xe || // Or to prevent items jumping to back to their "new" position when items change
3174
- Le && I.current.newIndex === D
3170
+ ye || // Or to prevent items jumping to back to their "new" position when items change
3171
+ Ne && E.current.newIndex === D
3175
3172
  )
3176
- return $o;
3177
- if (!(me && !ft(z) || !c) && (K || te))
3173
+ return xo;
3174
+ if (!(pe && !ut(G) || !c) && (j || ee))
3178
3175
  return be.Transition.toString({
3179
3176
  ...c,
3180
- property: Rn
3177
+ property: Dn
3181
3178
  });
3182
3179
  }
3183
3180
  }
3184
- function Ko(e, t) {
3181
+ function Co(e, t) {
3185
3182
  var n, r;
3186
3183
  return typeof e == "boolean" ? {
3187
3184
  draggable: e,
@@ -3192,144 +3189,17 @@ function Ko(e, t) {
3192
3189
  droppable: (r = e?.droppable) != null ? r : t.droppable
3193
3190
  };
3194
3191
  }
3195
- N.Down, N.Right, N.Up, N.Left;
3196
- const Nn = (...e) => e.filter(Boolean).join(" ");
3197
- function In({ card: e }) {
3198
- const {
3199
- attributes: t,
3200
- listeners: n,
3201
- setNodeRef: r,
3202
- transform: o,
3203
- transition: i,
3204
- isDragging: s
3205
- } = En({ id: e.id }), a = {
3206
- transform: be.Transform.toString(o),
3207
- transition: i,
3208
- opacity: s ? 0.5 : void 0
3209
- };
3210
- return /* @__PURE__ */ L.jsx("div", { ref: r, style: a, ...t, ...n, children: /* @__PURE__ */ L.jsxs(Wn, { className: "mb-2 cursor-grab active:cursor-grabbing border-border bg-card/60 hover:border-primary/40 hover:shadow-lg hover:shadow-primary/10 transition-all duration-300 group", children: [
3211
- /* @__PURE__ */ L.jsxs(Hn, { className: "p-4", children: [
3212
- /* @__PURE__ */ L.jsx(Un, { className: "text-sm font-medium font-mono tracking-tight text-foreground group-hover:text-primary transition-colors", children: e.title }),
3213
- e.description && /* @__PURE__ */ L.jsx(Vn, { className: "text-xs text-muted-foreground font-mono", children: e.description })
3214
- ] }),
3215
- e.badges && e.badges.length > 0 && /* @__PURE__ */ L.jsx(qn, { className: "p-4 pt-0", children: /* @__PURE__ */ L.jsx("div", { className: "flex flex-wrap gap-1", children: e.badges.map((l, c) => /* @__PURE__ */ L.jsx(en, { variant: l.variant || "default", className: "text-xs", children: l.label }, c)) }) })
3216
- ] }) });
3217
- }
3218
- function Wo({
3219
- column: e,
3220
- cards: t
3221
- }) {
3222
- const n = t || [], { setNodeRef: r } = En({
3223
- id: e.id,
3224
- data: {
3225
- type: "column"
3226
- }
3227
- }), o = e.limit && n.length >= e.limit;
3228
- return /* @__PURE__ */ L.jsxs(
3229
- "div",
3230
- {
3231
- ref: r,
3232
- className: Nn(
3233
- "flex flex-col w-80 flex-shrink-0 rounded-lg border border-border bg-card/20 backdrop-blur-sm shadow-xl",
3234
- e.className
3235
- ),
3236
- children: [
3237
- /* @__PURE__ */ L.jsx("div", { className: "p-4 border-b border-border/50 bg-muted/20", children: /* @__PURE__ */ L.jsxs("div", { className: "flex items-center justify-between", children: [
3238
- /* @__PURE__ */ L.jsx("h3", { className: "font-mono text-sm font-semibold tracking-wider text-primary/90 uppercase", children: e.title }),
3239
- /* @__PURE__ */ L.jsxs("div", { className: "flex items-center gap-2", children: [
3240
- /* @__PURE__ */ L.jsxs("span", { className: "font-mono text-xs text-muted-foreground", children: [
3241
- n.length,
3242
- e.limit && ` / ${e.limit}`
3243
- ] }),
3244
- o && /* @__PURE__ */ L.jsx(en, { variant: "destructive", className: "text-xs", children: "Full" })
3245
- ] })
3246
- ] }) }),
3247
- /* @__PURE__ */ L.jsx(Kn, { className: "flex-1 p-4", children: /* @__PURE__ */ L.jsx(
3248
- Po,
3249
- {
3250
- items: n.map((i) => i.id),
3251
- strategy: jo,
3252
- children: /* @__PURE__ */ L.jsx("div", { className: "space-y-2", children: n.map((i) => /* @__PURE__ */ L.jsx(In, { card: i }, i.id)) })
3253
- }
3254
- ) })
3255
- ]
3256
- }
3257
- );
3258
- }
3259
- function Go({ columns: e, onCardMove: t, className: n }) {
3260
- const [r, o] = ye.useState(null), i = ye.useMemo(() => (e || []).map((p) => ({
3261
- ...p,
3262
- cards: p.cards || []
3263
- })), [e]), [s, a] = ye.useState(i);
3264
- ye.useEffect(() => {
3265
- a(i);
3266
- }, [i]);
3267
- const l = dr(
3268
- cr(Ot, {
3269
- activationConstraint: {
3270
- distance: 8
3271
- }
3272
- })
3273
- ), c = (p) => {
3274
- const { active: g } = p, v = u(g.id);
3275
- o(v);
3276
- }, d = (p) => {
3277
- const { active: g, over: v } = p;
3278
- if (o(null), !v) return;
3279
- const b = g.id, y = v.id;
3280
- if (b === y) return;
3281
- const m = h(b), D = h(y) || f(y);
3282
- if (!(!m || !D))
3283
- if (m.id === D.id) {
3284
- const x = [...m.cards], S = x.findIndex((R) => R.id === b), w = x.findIndex((R) => R.id === y), C = Mt(x, S, w);
3285
- a(
3286
- (R) => R.map(
3287
- (O) => O.id === m.id ? { ...O, cards: C } : O
3288
- )
3289
- );
3290
- } else {
3291
- const x = [...m.cards], S = [...D.cards], w = x.findIndex((E) => E.id === b), R = y === D.id ? S.length : S.findIndex((E) => E.id === y), [O] = x.splice(w, 1);
3292
- S.splice(R, 0, O), a(
3293
- (E) => E.map((z) => z.id === m.id ? { ...z, cards: x } : z.id === D.id ? { ...z, cards: S } : z)
3294
- ), t && t(b, m.id, D.id, R);
3295
- }
3296
- }, u = ye.useCallback(
3297
- (p) => {
3298
- for (const g of s) {
3299
- const v = g.cards.find((b) => b.id === p);
3300
- if (v) return v;
3301
- }
3302
- return null;
3303
- },
3304
- [s]
3305
- ), h = ye.useCallback(
3306
- (p) => s.find((g) => g.cards.some((v) => v.id === p)) || null,
3307
- [s]
3308
- ), f = ye.useCallback(
3309
- (p) => s.find((g) => g.id === p) || null,
3310
- [s]
3311
- );
3312
- return /* @__PURE__ */ L.jsxs(
3313
- uo,
3314
- {
3315
- sensors: l,
3316
- collisionDetection: pr,
3317
- onDragStart: c,
3318
- onDragEnd: d,
3319
- children: [
3320
- /* @__PURE__ */ L.jsx("div", { className: Nn("flex gap-4 overflow-x-auto p-4", n), children: s.map((p) => /* @__PURE__ */ L.jsx(
3321
- Wo,
3322
- {
3323
- column: p,
3324
- cards: p.cards
3325
- },
3326
- p.id
3327
- )) }),
3328
- /* @__PURE__ */ L.jsx(Oo, { children: r ? /* @__PURE__ */ L.jsx(In, { card: r }) : null })
3329
- ]
3330
- }
3331
- );
3332
- }
3192
+ C.Down, C.Right, C.Up, C.Left;
3333
3193
  export {
3334
- Go as default
3194
+ be as C,
3195
+ To as D,
3196
+ dn as P,
3197
+ Lo as S,
3198
+ Ao as a,
3199
+ No as b,
3200
+ Io as c,
3201
+ yn as d,
3202
+ Po as e,
3203
+ Oo as u,
3204
+ Mo as v
3335
3205
  };