react-smart-scheduler 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,69 +1,69 @@
1
- import { jsxs as W, jsx as b } from "react/jsx-runtime";
2
- import B, { useRef as C, useMemo as F, useLayoutEffect as wr, useEffect as P, useCallback as I, useState as R, memo as Dr, useReducer as Mr, useContext as At, createContext as oe, cloneElement as Sr, forwardRef as xr } from "react";
3
- import { unstable_batchedUpdates as ge, createPortal as Er } from "react-dom";
1
+ import { jsxs as L, jsx as p } from "react/jsx-runtime";
2
+ import B, { useRef as C, useMemo as Y, useLayoutEffect as Dr, useEffect as P, useCallback as F, useState as R, memo as Mr, useReducer as Sr, useContext as Rt, createContext as ie, cloneElement as xr, forwardRef as Er } from "react";
3
+ import { unstable_batchedUpdates as ve, createPortal as Or } from "react-dom";
4
4
  /*!
5
5
  * react-smart-scheduler v0.1.2
6
6
  * (c) 2026 react-smart-scheduler contributors
7
7
  * Released under the MIT License
8
8
  * https://github.com/satthish/react-smart-scheduler
9
9
  */
10
- const Ee = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
11
- function jt(t) {
10
+ const Ne = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
11
+ function Ht(t) {
12
12
  const e = Object.prototype.toString.call(t);
13
13
  return e === "[object Window]" || // In Electron context the Window object serializes to [object global]
14
14
  e === "[object global]";
15
15
  }
16
- function He(t) {
16
+ function qe(t) {
17
17
  return "nodeType" in t;
18
18
  }
19
- function U(t) {
19
+ function K(t) {
20
20
  var e, n;
21
- return t ? jt(t) ? t : He(t) && (e = (n = t.ownerDocument) == null ? void 0 : n.defaultView) != null ? e : window : window;
21
+ return t ? Ht(t) ? t : qe(t) && (e = (n = t.ownerDocument) == null ? void 0 : n.defaultView) != null ? e : window : window;
22
22
  }
23
- function qe(t) {
23
+ function _e(t) {
24
24
  const {
25
25
  Document: e
26
- } = U(t);
26
+ } = K(t);
27
27
  return t instanceof e;
28
28
  }
29
- function ae(t) {
30
- return jt(t) ? !1 : t instanceof U(t).HTMLElement;
29
+ function se(t) {
30
+ return Ht(t) ? !1 : t instanceof K(t).HTMLElement;
31
31
  }
32
32
  function Wn(t) {
33
- return t instanceof U(t).SVGElement;
33
+ return t instanceof K(t).SVGElement;
34
34
  }
35
35
  function Xt(t) {
36
- return t ? jt(t) ? t.document : He(t) ? qe(t) ? t : ae(t) || Wn(t) ? t.ownerDocument : document : document : document;
36
+ return t ? Ht(t) ? t.document : qe(t) ? _e(t) ? t : se(t) || Wn(t) ? t.ownerDocument : document : document : document;
37
37
  }
38
- const wt = Ee ? wr : P;
39
- function Oe(t) {
38
+ const wt = Ne ? Dr : P;
39
+ function ke(t) {
40
40
  const e = C(t);
41
41
  return wt(() => {
42
42
  e.current = t;
43
- }), I(function() {
43
+ }), F(function() {
44
44
  for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
45
45
  r[o] = arguments[o];
46
46
  return e.current == null ? void 0 : e.current(...r);
47
47
  }, []);
48
48
  }
49
- function Or() {
50
- const t = C(null), e = I((r, o) => {
49
+ function Nr() {
50
+ const t = C(null), e = F((r, o) => {
51
51
  t.current = setInterval(r, o);
52
- }, []), n = I(() => {
52
+ }, []), n = F(() => {
53
53
  t.current !== null && (clearInterval(t.current), t.current = null);
54
54
  }, []);
55
55
  return [e, n];
56
56
  }
57
- function ne(t, e) {
57
+ function oe(t, e) {
58
58
  e === void 0 && (e = [t]);
59
59
  const n = C(t);
60
60
  return wt(() => {
61
61
  n.current !== t && (n.current = t);
62
62
  }, e), n;
63
63
  }
64
- function ie(t, e) {
64
+ function ce(t, e) {
65
65
  const n = C();
66
- return F(
66
+ return Y(
67
67
  () => {
68
68
  const r = t(n.current);
69
69
  return n.current = r, r;
@@ -72,8 +72,8 @@ function ie(t, e) {
72
72
  [...e]
73
73
  );
74
74
  }
75
- function ye(t) {
76
- const e = Oe(t), n = C(null), r = I(
75
+ function pe(t) {
76
+ const e = ke(t), n = C(null), r = F(
77
77
  (o) => {
78
78
  o !== n.current && (e == null || e(o, n.current)), n.current = o;
79
79
  },
@@ -82,19 +82,19 @@ function ye(t) {
82
82
  );
83
83
  return [n, r];
84
84
  }
85
- function be(t) {
85
+ function we(t) {
86
86
  const e = C();
87
87
  return P(() => {
88
88
  e.current = t;
89
89
  }, [t]), e.current;
90
90
  }
91
- let Ae = {};
92
- function Ne(t, e) {
93
- return F(() => {
91
+ let We = {};
92
+ function Ce(t, e) {
93
+ return Y(() => {
94
94
  if (e)
95
95
  return e;
96
- const n = Ae[t] == null ? 0 : Ae[t] + 1;
97
- return Ae[t] = n, t + "-" + n;
96
+ const n = We[t] == null ? 0 : We[t] + 1;
97
+ return We[t] = n, t + "-" + n;
98
98
  }, [t, e]);
99
99
  }
100
100
  function Ln(t) {
@@ -113,28 +113,28 @@ function Ln(t) {
113
113
  });
114
114
  };
115
115
  }
116
- const zt = /* @__PURE__ */ Ln(1), pe = /* @__PURE__ */ Ln(-1);
117
- function Nr(t) {
116
+ const jt = /* @__PURE__ */ Ln(1), De = /* @__PURE__ */ Ln(-1);
117
+ function kr(t) {
118
118
  return "clientX" in t && "clientY" in t;
119
119
  }
120
- function _e(t) {
120
+ function Ve(t) {
121
121
  if (!t)
122
122
  return !1;
123
123
  const {
124
124
  KeyboardEvent: e
125
- } = U(t.target);
125
+ } = K(t.target);
126
126
  return e && t instanceof e;
127
127
  }
128
- function kr(t) {
128
+ function Cr(t) {
129
129
  if (!t)
130
130
  return !1;
131
131
  const {
132
132
  TouchEvent: e
133
- } = U(t.target);
133
+ } = K(t.target);
134
134
  return e && t instanceof e;
135
135
  }
136
- function we(t) {
137
- if (kr(t)) {
136
+ function Me(t) {
137
+ if (Cr(t)) {
138
138
  if (t.touches && t.touches.length) {
139
139
  const {
140
140
  clientX: e,
@@ -155,12 +155,12 @@ function we(t) {
155
155
  };
156
156
  }
157
157
  }
158
- return Nr(t) ? {
158
+ return kr(t) ? {
159
159
  x: t.clientX,
160
160
  y: t.clientY
161
161
  } : null;
162
162
  }
163
- const Wt = /* @__PURE__ */ Object.freeze({
163
+ const At = /* @__PURE__ */ Object.freeze({
164
164
  Translate: {
165
165
  toString(t) {
166
166
  if (!t)
@@ -186,7 +186,7 @@ const Wt = /* @__PURE__ */ Object.freeze({
186
186
  Transform: {
187
187
  toString(t) {
188
188
  if (t)
189
- return [Wt.Translate.toString(t), Wt.Scale.toString(t)].join(" ");
189
+ return [At.Translate.toString(t), At.Scale.toString(t)].join(" ");
190
190
  }
191
191
  },
192
192
  Transition: {
@@ -200,23 +200,23 @@ const Wt = /* @__PURE__ */ Object.freeze({
200
200
  }
201
201
  }
202
202
  }), cn = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
203
- function Cr(t) {
203
+ function Tr(t) {
204
204
  return t.matches(cn) ? t : t.querySelector(cn);
205
205
  }
206
- const Tr = {
206
+ const Pr = {
207
207
  display: "none"
208
208
  };
209
- function Pr(t) {
209
+ function Rr(t) {
210
210
  let {
211
211
  id: e,
212
212
  value: n
213
213
  } = t;
214
214
  return B.createElement("div", {
215
215
  id: e,
216
- style: Tr
216
+ style: Pr
217
217
  }, n);
218
218
  }
219
- function Rr(t) {
219
+ function Ar(t) {
220
220
  let {
221
221
  id: e,
222
222
  announcement: n,
@@ -244,27 +244,27 @@ function Rr(t) {
244
244
  "aria-atomic": !0
245
245
  }, n);
246
246
  }
247
- function Ar() {
247
+ function Wr() {
248
248
  const [t, e] = R("");
249
249
  return {
250
- announce: I((r) => {
250
+ announce: F((r) => {
251
251
  r != null && e(r);
252
252
  }, []),
253
253
  announcement: t
254
254
  };
255
255
  }
256
- const Yn = /* @__PURE__ */ oe(null);
257
- function Wr(t) {
258
- const e = At(Yn);
256
+ const Yn = /* @__PURE__ */ ie(null);
257
+ function Lr(t) {
258
+ const e = Rt(Yn);
259
259
  P(() => {
260
260
  if (!e)
261
261
  throw new Error("useDndMonitor must be used within a children of <DndContext>");
262
262
  return e(t);
263
263
  }, [t, e]);
264
264
  }
265
- function Lr() {
266
- const [t] = R(() => /* @__PURE__ */ new Set()), e = I((r) => (t.add(r), () => t.delete(r)), [t]);
267
- return [I((r) => {
265
+ function Yr() {
266
+ const [t] = R(() => /* @__PURE__ */ new Set()), e = F((r) => (t.add(r), () => t.delete(r)), [t]);
267
+ return [F((r) => {
268
268
  let {
269
269
  type: o,
270
270
  event: a
@@ -275,13 +275,13 @@ function Lr() {
275
275
  });
276
276
  }, [t]), e];
277
277
  }
278
- const Yr = {
278
+ const Fr = {
279
279
  draggable: `
280
280
  To pick up a draggable item, press the space bar.
281
281
  While dragging, use the arrow keys to move the item.
282
282
  Press space again to drop the item in its new position, or press escape to cancel.
283
283
  `
284
- }, Fr = {
284
+ }, Ir = {
285
285
  onDragStart(t) {
286
286
  let {
287
287
  active: e
@@ -309,20 +309,20 @@ const Yr = {
309
309
  return "Dragging was cancelled. Draggable item " + e.id + " was dropped.";
310
310
  }
311
311
  };
312
- function Ir(t) {
312
+ function Br(t) {
313
313
  let {
314
- announcements: e = Fr,
314
+ announcements: e = Ir,
315
315
  container: n,
316
316
  hiddenTextDescribedById: r,
317
- screenReaderInstructions: o = Yr
317
+ screenReaderInstructions: o = Fr
318
318
  } = t;
319
319
  const {
320
320
  announce: a,
321
321
  announcement: i
322
- } = Ar(), s = Ne("DndLiveRegion"), [c, l] = R(!1);
322
+ } = Wr(), s = Ce("DndLiveRegion"), [c, l] = R(!1);
323
323
  if (P(() => {
324
324
  l(!0);
325
- }, []), Wr(F(() => ({
325
+ }, []), Lr(Y(() => ({
326
326
  onDragStart(d) {
327
327
  let {
328
328
  active: f
@@ -373,23 +373,23 @@ function Ir(t) {
373
373
  }
374
374
  }), [a, e])), !c)
375
375
  return null;
376
- const u = B.createElement(B.Fragment, null, B.createElement(Pr, {
376
+ const u = B.createElement(B.Fragment, null, B.createElement(Rr, {
377
377
  id: r,
378
378
  value: o.draggable
379
- }), B.createElement(Rr, {
379
+ }), B.createElement(Ar, {
380
380
  id: s,
381
381
  announcement: i
382
382
  }));
383
- return n ? Er(u, n) : u;
383
+ return n ? Or(u, n) : u;
384
384
  }
385
- var X;
385
+ var j;
386
386
  (function(t) {
387
387
  t.DragStart = "dragStart", t.DragMove = "dragMove", t.DragEnd = "dragEnd", t.DragCancel = "dragCancel", t.DragOver = "dragOver", t.RegisterDroppable = "registerDroppable", t.SetDroppableDisabled = "setDroppableDisabled", t.UnregisterDroppable = "unregisterDroppable";
388
- })(X || (X = {}));
389
- function De() {
388
+ })(j || (j = {}));
389
+ function Se() {
390
390
  }
391
391
  function ln(t, e) {
392
- return F(
392
+ return Y(
393
393
  () => ({
394
394
  sensor: t,
395
395
  options: e ?? {}
@@ -398,10 +398,10 @@ function ln(t, e) {
398
398
  [t, e]
399
399
  );
400
400
  }
401
- function Br() {
401
+ function $r() {
402
402
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
403
403
  e[n] = arguments[n];
404
- return F(
404
+ return Y(
405
405
  () => [...e].filter((r) => r != null),
406
406
  // eslint-disable-next-line react-hooks/exhaustive-deps
407
407
  [...e]
@@ -411,8 +411,8 @@ const ut = /* @__PURE__ */ Object.freeze({
411
411
  x: 0,
412
412
  y: 0
413
413
  });
414
- function $r(t, e) {
415
- const n = we(t);
414
+ function zr(t, e) {
415
+ const n = Me(t);
416
416
  if (!n)
417
417
  return "0 0";
418
418
  const r = {
@@ -421,7 +421,7 @@ function $r(t, e) {
421
421
  };
422
422
  return r.x + "% " + r.y + "%";
423
423
  }
424
- function zr(t, e) {
424
+ function jr(t, e) {
425
425
  let {
426
426
  data: {
427
427
  value: n
@@ -433,7 +433,7 @@ function zr(t, e) {
433
433
  } = e;
434
434
  return r - n;
435
435
  }
436
- function jr(t, e) {
436
+ function Hr(t, e) {
437
437
  if (!t || t.length === 0)
438
438
  return null;
439
439
  const [n] = t;
@@ -447,7 +447,7 @@ function Xr(t, e) {
447
447
  }
448
448
  return 0;
449
449
  }
450
- const Hr = (t) => {
450
+ const qr = (t) => {
451
451
  let {
452
452
  collisionRect: e,
453
453
  droppableRects: n,
@@ -469,9 +469,9 @@ const Hr = (t) => {
469
469
  });
470
470
  }
471
471
  }
472
- return o.sort(zr);
472
+ return o.sort(jr);
473
473
  };
474
- function qr(t, e, n) {
474
+ function _r(t, e, n) {
475
475
  return {
476
476
  ...t,
477
477
  scaleX: e && n ? e.width / n.width : 1,
@@ -484,7 +484,7 @@ function Fn(t, e) {
484
484
  y: t.top - e.top
485
485
  } : ut;
486
486
  }
487
- function _r(t) {
487
+ function Vr(t) {
488
488
  return function(n) {
489
489
  for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
490
490
  o[a - 1] = arguments[a];
@@ -499,7 +499,7 @@ function _r(t) {
499
499
  });
500
500
  };
501
501
  }
502
- const Vr = /* @__PURE__ */ _r(1);
502
+ const Gr = /* @__PURE__ */ Vr(1);
503
503
  function In(t) {
504
504
  if (t.startsWith("matrix3d(")) {
505
505
  const e = t.slice(9, -1).split(/, /);
@@ -520,7 +520,7 @@ function In(t) {
520
520
  }
521
521
  return null;
522
522
  }
523
- function Gr(t, e, n) {
523
+ function Kr(t, e, n) {
524
524
  const r = In(e);
525
525
  if (!r)
526
526
  return t;
@@ -539,18 +539,18 @@ function Gr(t, e, n) {
539
539
  left: c
540
540
  };
541
541
  }
542
- const Kr = {
542
+ const Ur = {
543
543
  ignoreTransform: !1
544
544
  };
545
- function se(t, e) {
546
- e === void 0 && (e = Kr);
545
+ function le(t, e) {
546
+ e === void 0 && (e = Ur);
547
547
  let n = t.getBoundingClientRect();
548
548
  if (e.ignoreTransform) {
549
549
  const {
550
550
  transform: l,
551
551
  transformOrigin: u
552
- } = U(t).getComputedStyle(t);
553
- l && (n = Gr(n, l, u));
552
+ } = K(t).getComputedStyle(t);
553
+ l && (n = Kr(n, l, u));
554
554
  }
555
555
  const {
556
556
  top: r,
@@ -570,11 +570,11 @@ function se(t, e) {
570
570
  };
571
571
  }
572
572
  function un(t) {
573
- return se(t, {
573
+ return le(t, {
574
574
  ignoreTransform: !0
575
575
  });
576
576
  }
577
- function Ur(t) {
577
+ function Qr(t) {
578
578
  const e = t.innerWidth, n = t.innerHeight;
579
579
  return {
580
580
  top: 0,
@@ -585,58 +585,58 @@ function Ur(t) {
585
585
  height: n
586
586
  };
587
587
  }
588
- function Qr(t, e) {
589
- return e === void 0 && (e = U(t).getComputedStyle(t)), e.position === "fixed";
590
- }
591
588
  function Jr(t, e) {
592
- e === void 0 && (e = U(t).getComputedStyle(t));
589
+ return e === void 0 && (e = K(t).getComputedStyle(t)), e.position === "fixed";
590
+ }
591
+ function Zr(t, e) {
592
+ e === void 0 && (e = K(t).getComputedStyle(t));
593
593
  const n = /(auto|scroll|overlay)/;
594
594
  return ["overflow", "overflowX", "overflowY"].some((o) => {
595
595
  const a = e[o];
596
596
  return typeof a == "string" ? n.test(a) : !1;
597
597
  });
598
598
  }
599
- function Ve(t, e) {
599
+ function Ge(t, e) {
600
600
  const n = [];
601
601
  function r(o) {
602
602
  if (e != null && n.length >= e || !o)
603
603
  return n;
604
- if (qe(o) && o.scrollingElement != null && !n.includes(o.scrollingElement))
604
+ if (_e(o) && o.scrollingElement != null && !n.includes(o.scrollingElement))
605
605
  return n.push(o.scrollingElement), n;
606
- if (!ae(o) || Wn(o) || n.includes(o))
606
+ if (!se(o) || Wn(o) || n.includes(o))
607
607
  return n;
608
- const a = U(t).getComputedStyle(o);
609
- return o !== t && Jr(o, a) && n.push(o), Qr(o, a) ? n : r(o.parentNode);
608
+ const a = K(t).getComputedStyle(o);
609
+ return o !== t && Zr(o, a) && n.push(o), Jr(o, a) ? n : r(o.parentNode);
610
610
  }
611
611
  return t ? r(t) : n;
612
612
  }
613
613
  function Bn(t) {
614
- const [e] = Ve(t, 1);
614
+ const [e] = Ge(t, 1);
615
615
  return e ?? null;
616
616
  }
617
- function We(t) {
618
- return !Ee || !t ? null : jt(t) ? t : He(t) ? qe(t) || t === Xt(t).scrollingElement ? window : ae(t) ? t : null : null;
617
+ function Le(t) {
618
+ return !Ne || !t ? null : Ht(t) ? t : qe(t) ? _e(t) || t === Xt(t).scrollingElement ? window : se(t) ? t : null : null;
619
619
  }
620
620
  function $n(t) {
621
- return jt(t) ? t.scrollX : t.scrollLeft;
621
+ return Ht(t) ? t.scrollX : t.scrollLeft;
622
622
  }
623
623
  function zn(t) {
624
- return jt(t) ? t.scrollY : t.scrollTop;
624
+ return Ht(t) ? t.scrollY : t.scrollTop;
625
625
  }
626
- function Ie(t) {
626
+ function Be(t) {
627
627
  return {
628
628
  x: $n(t),
629
629
  y: zn(t)
630
630
  };
631
631
  }
632
- var q;
632
+ var H;
633
633
  (function(t) {
634
634
  t[t.Forward = 1] = "Forward", t[t.Backward = -1] = "Backward";
635
- })(q || (q = {}));
635
+ })(H || (H = {}));
636
636
  function jn(t) {
637
- return !Ee || !t ? !1 : t === document.scrollingElement;
637
+ return !Ne || !t ? !1 : t === document.scrollingElement;
638
638
  }
639
- function Xn(t) {
639
+ function Hn(t) {
640
640
  const e = {
641
641
  x: 0,
642
642
  y: 0
@@ -659,24 +659,24 @@ function Xn(t) {
659
659
  minScroll: e
660
660
  };
661
661
  }
662
- const Zr = {
662
+ const to = {
663
663
  x: 0.2,
664
664
  y: 0.2
665
665
  };
666
- function to(t, e, n, r, o) {
666
+ function eo(t, e, n, r, o) {
667
667
  let {
668
668
  top: a,
669
669
  left: i,
670
670
  right: s,
671
671
  bottom: c
672
672
  } = n;
673
- r === void 0 && (r = 10), o === void 0 && (o = Zr);
673
+ r === void 0 && (r = 10), o === void 0 && (o = to);
674
674
  const {
675
675
  isTop: l,
676
676
  isBottom: u,
677
677
  isLeft: d,
678
678
  isRight: f
679
- } = Xn(t), g = {
679
+ } = Hn(t), g = {
680
680
  x: 0,
681
681
  y: 0
682
682
  }, y = {
@@ -686,12 +686,12 @@ function to(t, e, n, r, o) {
686
686
  height: e.height * o.y,
687
687
  width: e.width * o.x
688
688
  };
689
- return !l && a <= e.top + h.height ? (g.y = q.Backward, y.y = r * Math.abs((e.top + h.height - a) / h.height)) : !u && c >= e.bottom - h.height && (g.y = q.Forward, y.y = r * Math.abs((e.bottom - h.height - c) / h.height)), !f && s >= e.right - h.width ? (g.x = q.Forward, y.x = r * Math.abs((e.right - h.width - s) / h.width)) : !d && i <= e.left + h.width && (g.x = q.Backward, y.x = r * Math.abs((e.left + h.width - i) / h.width)), {
689
+ return !l && a <= e.top + h.height ? (g.y = H.Backward, y.y = r * Math.abs((e.top + h.height - a) / h.height)) : !u && c >= e.bottom - h.height && (g.y = H.Forward, y.y = r * Math.abs((e.bottom - h.height - c) / h.height)), !f && s >= e.right - h.width ? (g.x = H.Forward, y.x = r * Math.abs((e.right - h.width - s) / h.width)) : !d && i <= e.left + h.width && (g.x = H.Backward, y.x = r * Math.abs((e.left + h.width - i) / h.width)), {
690
690
  direction: g,
691
691
  speed: y
692
692
  };
693
693
  }
694
- function eo(t) {
694
+ function no(t) {
695
695
  if (t === document.scrollingElement) {
696
696
  const {
697
697
  innerWidth: a,
@@ -721,17 +721,17 @@ function eo(t) {
721
721
  height: t.clientHeight
722
722
  };
723
723
  }
724
- function Hn(t) {
725
- return t.reduce((e, n) => zt(e, Ie(n)), ut);
724
+ function Xn(t) {
725
+ return t.reduce((e, n) => jt(e, Be(n)), ut);
726
726
  }
727
- function no(t) {
727
+ function ro(t) {
728
728
  return t.reduce((e, n) => e + $n(n), 0);
729
729
  }
730
- function ro(t) {
730
+ function oo(t) {
731
731
  return t.reduce((e, n) => e + zn(n), 0);
732
732
  }
733
733
  function qn(t, e) {
734
- if (e === void 0 && (e = se), !t)
734
+ if (e === void 0 && (e = le), !t)
735
735
  return;
736
736
  const {
737
737
  top: n,
@@ -744,15 +744,15 @@ function qn(t, e) {
744
744
  inline: "center"
745
745
  });
746
746
  }
747
- const oo = [["x", ["left", "right"], no], ["y", ["top", "bottom"], ro]];
748
- class Ge {
747
+ const ao = [["x", ["left", "right"], ro], ["y", ["top", "bottom"], oo]];
748
+ class Ke {
749
749
  constructor(e, n) {
750
750
  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;
751
- const r = Ve(n), o = Hn(r);
751
+ const r = Ge(n), o = Xn(r);
752
752
  this.rect = {
753
753
  ...e
754
754
  }, this.width = e.width, this.height = e.height;
755
- for (const [a, i, s] of oo)
755
+ for (const [a, i, s] of ao)
756
756
  for (const c of i)
757
757
  Object.defineProperty(this, c, {
758
758
  get: () => {
@@ -766,7 +766,7 @@ class Ge {
766
766
  });
767
767
  }
768
768
  }
769
- class Zt {
769
+ class ee {
770
770
  constructor(e) {
771
771
  this.target = void 0, this.listeners = [], this.removeAll = () => {
772
772
  this.listeners.forEach((n) => {
@@ -780,13 +780,13 @@ class Zt {
780
780
  (o = this.target) == null || o.addEventListener(e, n, r), this.listeners.push([e, n, r]);
781
781
  }
782
782
  }
783
- function ao(t) {
783
+ function io(t) {
784
784
  const {
785
785
  EventTarget: e
786
- } = U(t);
786
+ } = K(t);
787
787
  return t instanceof e ? t : Xt(t);
788
788
  }
789
- function Le(t, e) {
789
+ function Ye(t, e) {
790
790
  const n = Math.abs(t.x), r = Math.abs(t.y);
791
791
  return typeof e == "number" ? Math.sqrt(n ** 2 + r ** 2) > e : "x" in e && "y" in e ? n > e.x && r > e.y : "x" in e ? n > e.x : "y" in e ? r > e.y : !1;
792
792
  }
@@ -797,7 +797,7 @@ var it;
797
797
  function dn(t) {
798
798
  t.preventDefault();
799
799
  }
800
- function io(t) {
800
+ function so(t) {
801
801
  t.stopPropagation();
802
802
  }
803
803
  var k;
@@ -808,7 +808,7 @@ const _n = {
808
808
  start: [k.Space, k.Enter],
809
809
  cancel: [k.Esc],
810
810
  end: [k.Space, k.Enter, k.Tab]
811
- }, so = (t, e) => {
811
+ }, co = (t, e) => {
812
812
  let {
813
813
  currentCoordinates: n
814
814
  } = e;
@@ -843,7 +843,7 @@ class Vn {
843
843
  target: n
844
844
  }
845
845
  } = e;
846
- this.props = e, this.listeners = new Zt(Xt(n)), this.windowListeners = new Zt(U(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
846
+ this.props = e, this.listeners = new ee(Xt(n)), this.windowListeners = new ee(K(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
847
847
  }
848
848
  attach() {
849
849
  this.handleStart(), this.windowListeners.add(it.Resize, this.handleCancel), this.windowListeners.add(it.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(it.Keydown, this.handleKeyDown));
@@ -856,14 +856,14 @@ class Vn {
856
856
  r && qn(r), n(ut);
857
857
  }
858
858
  handleKeyDown(e) {
859
- if (_e(e)) {
859
+ if (Ve(e)) {
860
860
  const {
861
861
  active: n,
862
862
  context: r,
863
863
  options: o
864
864
  } = this.props, {
865
865
  keyboardCodes: a = _n,
866
- coordinateGetter: i = so,
866
+ coordinateGetter: i = co,
867
867
  scrollBehavior: s = "smooth"
868
868
  } = o, {
869
869
  code: c
@@ -889,7 +889,7 @@ class Vn {
889
889
  currentCoordinates: u
890
890
  });
891
891
  if (d) {
892
- const f = pe(d, u), g = {
892
+ const f = De(d, u), g = {
893
893
  x: 0,
894
894
  y: 0
895
895
  }, {
@@ -898,46 +898,46 @@ class Vn {
898
898
  for (const h of y) {
899
899
  const m = e.code, {
900
900
  isTop: v,
901
- isRight: p,
901
+ isRight: w,
902
902
  isLeft: D,
903
903
  isBottom: E,
904
- maxScroll: w,
905
- minScroll: x
906
- } = Xn(h), S = eo(h), M = {
904
+ maxScroll: b,
905
+ minScroll: M
906
+ } = Hn(h), S = no(h), x = {
907
907
  x: Math.min(m === k.Right ? S.right - S.width / 2 : S.right, Math.max(m === k.Right ? S.left : S.left + S.width / 2, d.x)),
908
908
  y: Math.min(m === k.Down ? S.bottom - S.height / 2 : S.bottom, Math.max(m === k.Down ? S.top : S.top + S.height / 2, d.y))
909
- }, N = m === k.Right && !p || m === k.Left && !D, L = m === k.Down && !E || m === k.Up && !v;
910
- if (N && M.x !== d.x) {
911
- const T = h.scrollLeft + f.x, G = m === k.Right && T <= w.x || m === k.Left && T >= x.x;
912
- if (G && !f.y) {
909
+ }, T = m === k.Right && !w || m === k.Left && !D, W = m === k.Down && !E || m === k.Up && !v;
910
+ if (T && x.x !== d.x) {
911
+ const O = h.scrollLeft + f.x, q = m === k.Right && O <= b.x || m === k.Left && O >= M.x;
912
+ if (q && !f.y) {
913
913
  h.scrollTo({
914
- left: T,
914
+ left: O,
915
915
  behavior: s
916
916
  });
917
917
  return;
918
918
  }
919
- G ? g.x = h.scrollLeft - T : g.x = m === k.Right ? h.scrollLeft - w.x : h.scrollLeft - x.x, g.x && h.scrollBy({
919
+ q ? g.x = h.scrollLeft - O : g.x = m === k.Right ? h.scrollLeft - b.x : h.scrollLeft - M.x, g.x && h.scrollBy({
920
920
  left: -g.x,
921
921
  behavior: s
922
922
  });
923
923
  break;
924
- } else if (L && M.y !== d.y) {
925
- const T = h.scrollTop + f.y, G = m === k.Down && T <= w.y || m === k.Up && T >= x.y;
926
- if (G && !f.x) {
924
+ } else if (W && x.y !== d.y) {
925
+ const O = h.scrollTop + f.y, q = m === k.Down && O <= b.y || m === k.Up && O >= M.y;
926
+ if (q && !f.x) {
927
927
  h.scrollTo({
928
- top: T,
928
+ top: O,
929
929
  behavior: s
930
930
  });
931
931
  return;
932
932
  }
933
- G ? g.y = h.scrollTop - T : g.y = m === k.Down ? h.scrollTop - w.y : h.scrollTop - x.y, g.y && h.scrollBy({
933
+ q ? g.y = h.scrollTop - O : g.y = m === k.Down ? h.scrollTop - b.y : h.scrollTop - M.y, g.y && h.scrollBy({
934
934
  top: -g.y,
935
935
  behavior: s
936
936
  });
937
937
  break;
938
938
  }
939
939
  }
940
- this.handleMove(e, zt(pe(d, this.referenceCoordinates), g));
940
+ this.handleMove(e, jt(De(d, this.referenceCoordinates), g));
941
941
  }
942
942
  }
943
943
  }
@@ -990,16 +990,16 @@ function fn(t) {
990
990
  function hn(t) {
991
991
  return !!(t && "delay" in t);
992
992
  }
993
- class Ke {
993
+ class Ue {
994
994
  constructor(e, n, r) {
995
995
  var o;
996
- r === void 0 && (r = ao(e.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 = e, this.events = n;
996
+ r === void 0 && (r = io(e.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 = e, this.events = n;
997
997
  const {
998
998
  event: a
999
999
  } = e, {
1000
1000
  target: i
1001
1001
  } = a;
1002
- this.props = e, this.events = n, this.document = Xt(i), this.documentListeners = new Zt(this.document), this.listeners = new Zt(r), this.windowListeners = new Zt(U(i)), this.initialCoordinates = (o = we(a)) != null ? o : ut, 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();
1002
+ this.props = e, this.events = n, this.document = Xt(i), this.documentListeners = new ee(this.document), this.listeners = new ee(r), this.windowListeners = new ee(K(i)), this.initialCoordinates = (o = Me(a)) != null ? o : ut, 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();
1003
1003
  }
1004
1004
  attach() {
1005
1005
  const {
@@ -1047,7 +1047,7 @@ class Ke {
1047
1047
  } = this, {
1048
1048
  onStart: n
1049
1049
  } = this.props;
1050
- e && (this.activated = !0, this.documentListeners.add(it.Click, io, {
1050
+ e && (this.activated = !0, this.documentListeners.add(it.Click, so, {
1051
1051
  capture: !0
1052
1052
  }), this.removeTextSelection(), this.documentListeners.add(it.SelectionChange, this.removeTextSelection), n(e));
1053
1053
  }
@@ -1065,15 +1065,15 @@ class Ke {
1065
1065
  } = a;
1066
1066
  if (!o)
1067
1067
  return;
1068
- const c = (n = we(e)) != null ? n : ut, l = pe(o, c);
1068
+ const c = (n = Me(e)) != null ? n : ut, l = De(o, c);
1069
1069
  if (!r && s) {
1070
1070
  if (fn(s)) {
1071
- if (s.tolerance != null && Le(l, s.tolerance))
1071
+ if (s.tolerance != null && Ye(l, s.tolerance))
1072
1072
  return this.handleCancel();
1073
- if (Le(l, s.distance))
1073
+ if (Ye(l, s.distance))
1074
1074
  return this.handleStart();
1075
1075
  }
1076
- if (hn(s) && Le(l, s.tolerance))
1076
+ if (hn(s) && Ye(l, s.tolerance))
1077
1077
  return this.handleCancel();
1078
1078
  this.handlePending(s, l);
1079
1079
  return;
@@ -1102,7 +1102,7 @@ class Ke {
1102
1102
  (e = this.document.getSelection()) == null || e.removeAllRanges();
1103
1103
  }
1104
1104
  }
1105
- const co = {
1105
+ const lo = {
1106
1106
  cancel: {
1107
1107
  name: "pointercancel"
1108
1108
  },
@@ -1113,15 +1113,15 @@ const co = {
1113
1113
  name: "pointerup"
1114
1114
  }
1115
1115
  };
1116
- class Ue extends Ke {
1116
+ class Qe extends Ue {
1117
1117
  constructor(e) {
1118
1118
  const {
1119
1119
  event: n
1120
1120
  } = e, r = Xt(n.target);
1121
- super(e, co, r);
1121
+ super(e, lo, r);
1122
1122
  }
1123
1123
  }
1124
- Ue.activators = [{
1124
+ Qe.activators = [{
1125
1125
  eventName: "onPointerDown",
1126
1126
  handler: (t, e) => {
1127
1127
  let {
@@ -1134,7 +1134,7 @@ Ue.activators = [{
1134
1134
  }), !0);
1135
1135
  }
1136
1136
  }];
1137
- const lo = {
1137
+ const uo = {
1138
1138
  move: {
1139
1139
  name: "mousemove"
1140
1140
  },
@@ -1142,16 +1142,16 @@ const lo = {
1142
1142
  name: "mouseup"
1143
1143
  }
1144
1144
  };
1145
- var Be;
1145
+ var $e;
1146
1146
  (function(t) {
1147
1147
  t[t.RightClick = 2] = "RightClick";
1148
- })(Be || (Be = {}));
1149
- class uo extends Ke {
1148
+ })($e || ($e = {}));
1149
+ class fo extends Ue {
1150
1150
  constructor(e) {
1151
- super(e, lo, Xt(e.event.target));
1151
+ super(e, uo, Xt(e.event.target));
1152
1152
  }
1153
1153
  }
1154
- uo.activators = [{
1154
+ fo.activators = [{
1155
1155
  eventName: "onMouseDown",
1156
1156
  handler: (t, e) => {
1157
1157
  let {
@@ -1159,12 +1159,12 @@ uo.activators = [{
1159
1159
  } = t, {
1160
1160
  onActivation: r
1161
1161
  } = e;
1162
- return n.button === Be.RightClick ? !1 : (r == null || r({
1162
+ return n.button === $e.RightClick ? !1 : (r == null || r({
1163
1163
  event: n
1164
1164
  }), !0);
1165
1165
  }
1166
1166
  }];
1167
- const Ye = {
1167
+ const Fe = {
1168
1168
  cancel: {
1169
1169
  name: "touchcancel"
1170
1170
  },
@@ -1175,16 +1175,16 @@ const Ye = {
1175
1175
  name: "touchend"
1176
1176
  }
1177
1177
  };
1178
- class Gn extends Ke {
1178
+ class Gn extends Ue {
1179
1179
  constructor(e) {
1180
- super(e, Ye);
1180
+ super(e, Fe);
1181
1181
  }
1182
1182
  static setup() {
1183
- return window.addEventListener(Ye.move.name, e, {
1183
+ return window.addEventListener(Fe.move.name, e, {
1184
1184
  capture: !1,
1185
1185
  passive: !1
1186
1186
  }), function() {
1187
- window.removeEventListener(Ye.move.name, e);
1187
+ window.removeEventListener(Fe.move.name, e);
1188
1188
  };
1189
1189
  function e() {
1190
1190
  }
@@ -1206,77 +1206,77 @@ Gn.activators = [{
1206
1206
  }), !0);
1207
1207
  }
1208
1208
  }];
1209
- var te;
1209
+ var ne;
1210
1210
  (function(t) {
1211
1211
  t[t.Pointer = 0] = "Pointer", t[t.DraggableRect = 1] = "DraggableRect";
1212
- })(te || (te = {}));
1213
- var Me;
1212
+ })(ne || (ne = {}));
1213
+ var xe;
1214
1214
  (function(t) {
1215
1215
  t[t.TreeOrder = 0] = "TreeOrder", t[t.ReversedTreeOrder = 1] = "ReversedTreeOrder";
1216
- })(Me || (Me = {}));
1217
- function fo(t) {
1216
+ })(xe || (xe = {}));
1217
+ function ho(t) {
1218
1218
  let {
1219
1219
  acceleration: e,
1220
- activator: n = te.Pointer,
1220
+ activator: n = ne.Pointer,
1221
1221
  canScroll: r,
1222
1222
  draggingRect: o,
1223
1223
  enabled: a,
1224
1224
  interval: i = 5,
1225
- order: s = Me.TreeOrder,
1225
+ order: s = xe.TreeOrder,
1226
1226
  pointerCoordinates: c,
1227
1227
  scrollableAncestors: l,
1228
1228
  scrollableAncestorRects: u,
1229
1229
  delta: d,
1230
1230
  threshold: f
1231
1231
  } = t;
1232
- const g = go({
1232
+ const g = mo({
1233
1233
  delta: d,
1234
1234
  disabled: !a
1235
- }), [y, h] = Or(), m = C({
1235
+ }), [y, h] = Nr(), m = C({
1236
1236
  x: 0,
1237
1237
  y: 0
1238
1238
  }), v = C({
1239
1239
  x: 0,
1240
1240
  y: 0
1241
- }), p = F(() => {
1241
+ }), w = Y(() => {
1242
1242
  switch (n) {
1243
- case te.Pointer:
1243
+ case ne.Pointer:
1244
1244
  return c ? {
1245
1245
  top: c.y,
1246
1246
  bottom: c.y,
1247
1247
  left: c.x,
1248
1248
  right: c.x
1249
1249
  } : null;
1250
- case te.DraggableRect:
1250
+ case ne.DraggableRect:
1251
1251
  return o;
1252
1252
  }
1253
- }, [n, o, c]), D = C(null), E = I(() => {
1254
- const x = D.current;
1255
- if (!x)
1253
+ }, [n, o, c]), D = C(null), E = F(() => {
1254
+ const M = D.current;
1255
+ if (!M)
1256
1256
  return;
1257
- const S = m.current.x * v.current.x, M = m.current.y * v.current.y;
1258
- x.scrollBy(S, M);
1259
- }, []), w = F(() => s === Me.TreeOrder ? [...l].reverse() : l, [s, l]);
1257
+ const S = m.current.x * v.current.x, x = m.current.y * v.current.y;
1258
+ M.scrollBy(S, x);
1259
+ }, []), b = Y(() => s === xe.TreeOrder ? [...l].reverse() : l, [s, l]);
1260
1260
  P(
1261
1261
  () => {
1262
- if (!a || !l.length || !p) {
1262
+ if (!a || !l.length || !w) {
1263
1263
  h();
1264
1264
  return;
1265
1265
  }
1266
- for (const x of w) {
1267
- if ((r == null ? void 0 : r(x)) === !1)
1266
+ for (const M of b) {
1267
+ if ((r == null ? void 0 : r(M)) === !1)
1268
1268
  continue;
1269
- const S = l.indexOf(x), M = u[S];
1270
- if (!M)
1269
+ const S = l.indexOf(M), x = u[S];
1270
+ if (!x)
1271
1271
  continue;
1272
1272
  const {
1273
- direction: N,
1274
- speed: L
1275
- } = to(x, M, p, e, f);
1276
- for (const T of ["x", "y"])
1277
- g[T][N[T]] || (L[T] = 0, N[T] = 0);
1278
- if (L.x > 0 || L.y > 0) {
1279
- h(), D.current = x, y(E, i), m.current = L, v.current = N;
1273
+ direction: T,
1274
+ speed: W
1275
+ } = eo(M, x, w, e, f);
1276
+ for (const O of ["x", "y"])
1277
+ g[O][T[O]] || (W[O] = 0, T[O] = 0);
1278
+ if (W.x > 0 || W.y > 0) {
1279
+ h(), D.current = M, y(E, i), m.current = W, v.current = T;
1280
1280
  return;
1281
1281
  }
1282
1282
  }
@@ -1297,62 +1297,62 @@ function fo(t) {
1297
1297
  a,
1298
1298
  i,
1299
1299
  // eslint-disable-next-line react-hooks/exhaustive-deps
1300
- JSON.stringify(p),
1300
+ JSON.stringify(w),
1301
1301
  // eslint-disable-next-line react-hooks/exhaustive-deps
1302
1302
  JSON.stringify(g),
1303
1303
  y,
1304
1304
  l,
1305
- w,
1305
+ b,
1306
1306
  u,
1307
1307
  // eslint-disable-next-line react-hooks/exhaustive-deps
1308
1308
  JSON.stringify(f)
1309
1309
  ]
1310
1310
  );
1311
1311
  }
1312
- const ho = {
1312
+ const go = {
1313
1313
  x: {
1314
- [q.Backward]: !1,
1315
- [q.Forward]: !1
1314
+ [H.Backward]: !1,
1315
+ [H.Forward]: !1
1316
1316
  },
1317
1317
  y: {
1318
- [q.Backward]: !1,
1319
- [q.Forward]: !1
1318
+ [H.Backward]: !1,
1319
+ [H.Forward]: !1
1320
1320
  }
1321
1321
  };
1322
- function go(t) {
1322
+ function mo(t) {
1323
1323
  let {
1324
1324
  delta: e,
1325
1325
  disabled: n
1326
1326
  } = t;
1327
- const r = be(e);
1328
- return ie((o) => {
1327
+ const r = we(e);
1328
+ return ce((o) => {
1329
1329
  if (n || !r || !o)
1330
- return ho;
1330
+ return go;
1331
1331
  const a = {
1332
1332
  x: Math.sign(e.x - r.x),
1333
1333
  y: Math.sign(e.y - r.y)
1334
1334
  };
1335
1335
  return {
1336
1336
  x: {
1337
- [q.Backward]: o.x[q.Backward] || a.x === -1,
1338
- [q.Forward]: o.x[q.Forward] || a.x === 1
1337
+ [H.Backward]: o.x[H.Backward] || a.x === -1,
1338
+ [H.Forward]: o.x[H.Forward] || a.x === 1
1339
1339
  },
1340
1340
  y: {
1341
- [q.Backward]: o.y[q.Backward] || a.y === -1,
1342
- [q.Forward]: o.y[q.Forward] || a.y === 1
1341
+ [H.Backward]: o.y[H.Backward] || a.y === -1,
1342
+ [H.Forward]: o.y[H.Forward] || a.y === 1
1343
1343
  }
1344
1344
  };
1345
1345
  }, [n, e, r]);
1346
1346
  }
1347
- function mo(t, e) {
1347
+ function vo(t, e) {
1348
1348
  const n = e != null ? t.get(e) : void 0, r = n ? n.node.current : null;
1349
- return ie((o) => {
1349
+ return ce((o) => {
1350
1350
  var a;
1351
1351
  return e == null ? null : (a = r ?? o) != null ? a : null;
1352
1352
  }, [r, e]);
1353
1353
  }
1354
- function vo(t, e) {
1355
- return F(() => t.reduce((n, r) => {
1354
+ function yo(t, e) {
1355
+ return Y(() => t.reduce((n, r) => {
1356
1356
  const {
1357
1357
  sensor: o
1358
1358
  } = r, a = o.activators.map((i) => ({
@@ -1362,16 +1362,16 @@ function vo(t, e) {
1362
1362
  return [...n, ...a];
1363
1363
  }, []), [t, e]);
1364
1364
  }
1365
- var re;
1365
+ var ae;
1366
1366
  (function(t) {
1367
1367
  t[t.Always = 0] = "Always", t[t.BeforeDragging = 1] = "BeforeDragging", t[t.WhileDragging = 2] = "WhileDragging";
1368
- })(re || (re = {}));
1369
- var $e;
1368
+ })(ae || (ae = {}));
1369
+ var ze;
1370
1370
  (function(t) {
1371
1371
  t.Optimized = "optimized";
1372
- })($e || ($e = {}));
1372
+ })(ze || (ze = {}));
1373
1373
  const gn = /* @__PURE__ */ new Map();
1374
- function yo(t, e) {
1374
+ function bo(t, e) {
1375
1375
  let {
1376
1376
  dragging: n,
1377
1377
  dependencies: r,
@@ -1381,24 +1381,24 @@ function yo(t, e) {
1381
1381
  frequency: s,
1382
1382
  measure: c,
1383
1383
  strategy: l
1384
- } = o, u = C(t), d = m(), f = ne(d), g = I(function(v) {
1385
- v === void 0 && (v = []), !f.current && i((p) => p === null ? v : p.concat(v.filter((D) => !p.includes(D))));
1386
- }, [f]), y = C(null), h = ie((v) => {
1384
+ } = o, u = C(t), d = m(), f = oe(d), g = F(function(v) {
1385
+ v === void 0 && (v = []), !f.current && i((w) => w === null ? v : w.concat(v.filter((D) => !w.includes(D))));
1386
+ }, [f]), y = C(null), h = ce((v) => {
1387
1387
  if (d && !n)
1388
1388
  return gn;
1389
1389
  if (!v || v === gn || u.current !== t || a != null) {
1390
- const p = /* @__PURE__ */ new Map();
1390
+ const w = /* @__PURE__ */ new Map();
1391
1391
  for (let D of t) {
1392
1392
  if (!D)
1393
1393
  continue;
1394
1394
  if (a && a.length > 0 && !a.includes(D.id) && D.rect.current) {
1395
- p.set(D.id, D.rect.current);
1395
+ w.set(D.id, D.rect.current);
1396
1396
  continue;
1397
1397
  }
1398
- const E = D.node.current, w = E ? new Ge(c(E), E) : null;
1399
- D.rect.current = w, w && p.set(D.id, w);
1398
+ const E = D.node.current, b = E ? new Ke(c(E), E) : null;
1399
+ D.rect.current = b, b && w.set(D.id, b);
1400
1400
  }
1401
- return p;
1401
+ return w;
1402
1402
  }
1403
1403
  return v;
1404
1404
  }, [t, a, n, d, c]);
@@ -1431,27 +1431,27 @@ function yo(t, e) {
1431
1431
  };
1432
1432
  function m() {
1433
1433
  switch (l) {
1434
- case re.Always:
1434
+ case ae.Always:
1435
1435
  return !1;
1436
- case re.BeforeDragging:
1436
+ case ae.BeforeDragging:
1437
1437
  return n;
1438
1438
  default:
1439
1439
  return !n;
1440
1440
  }
1441
1441
  }
1442
1442
  }
1443
- function Qe(t, e) {
1444
- return ie((n) => t ? n || (typeof e == "function" ? e(t) : t) : null, [e, t]);
1443
+ function Je(t, e) {
1444
+ return ce((n) => t ? n || (typeof e == "function" ? e(t) : t) : null, [e, t]);
1445
1445
  }
1446
- function bo(t, e) {
1447
- return Qe(t, e);
1446
+ function po(t, e) {
1447
+ return Je(t, e);
1448
1448
  }
1449
- function po(t) {
1449
+ function wo(t) {
1450
1450
  let {
1451
1451
  callback: e,
1452
1452
  disabled: n
1453
1453
  } = t;
1454
- const r = Oe(e), o = F(() => {
1454
+ const r = ke(e), o = Y(() => {
1455
1455
  if (n || typeof window > "u" || typeof window.MutationObserver > "u")
1456
1456
  return;
1457
1457
  const {
@@ -1461,12 +1461,12 @@ function po(t) {
1461
1461
  }, [r, n]);
1462
1462
  return P(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
1463
1463
  }
1464
- function ke(t) {
1464
+ function Te(t) {
1465
1465
  let {
1466
1466
  callback: e,
1467
1467
  disabled: n
1468
1468
  } = t;
1469
- const r = Oe(e), o = F(
1469
+ const r = ke(e), o = Y(
1470
1470
  () => {
1471
1471
  if (n || typeof window > "u" || typeof window.ResizeObserver > "u")
1472
1472
  return;
@@ -1480,11 +1480,11 @@ function ke(t) {
1480
1480
  );
1481
1481
  return P(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
1482
1482
  }
1483
- function wo(t) {
1484
- return new Ge(se(t), t);
1483
+ function Do(t) {
1484
+ return new Ke(le(t), t);
1485
1485
  }
1486
1486
  function mn(t, e, n) {
1487
- e === void 0 && (e = wo);
1487
+ e === void 0 && (e = Do);
1488
1488
  const [r, o] = R(null);
1489
1489
  function a() {
1490
1490
  o((c) => {
@@ -1498,7 +1498,7 @@ function mn(t, e, n) {
1498
1498
  return JSON.stringify(c) === JSON.stringify(u) ? c : u;
1499
1499
  });
1500
1500
  }
1501
- const i = po({
1501
+ const i = wo({
1502
1502
  callback(c) {
1503
1503
  if (t)
1504
1504
  for (const l of c) {
@@ -1512,7 +1512,7 @@ function mn(t, e, n) {
1512
1512
  }
1513
1513
  }
1514
1514
  }
1515
- }), s = ke({
1515
+ }), s = Te({
1516
1516
  callback: a
1517
1517
  });
1518
1518
  return wt(() => {
@@ -1522,31 +1522,31 @@ function mn(t, e, n) {
1522
1522
  })) : (s == null || s.disconnect(), i == null || i.disconnect());
1523
1523
  }, [t]), r;
1524
1524
  }
1525
- function Do(t) {
1526
- const e = Qe(t);
1525
+ function Mo(t) {
1526
+ const e = Je(t);
1527
1527
  return Fn(t, e);
1528
1528
  }
1529
1529
  const vn = [];
1530
- function Mo(t) {
1531
- const e = C(t), n = ie((r) => t ? r && r !== vn && t && e.current && t.parentNode === e.current.parentNode ? r : Ve(t) : vn, [t]);
1530
+ function So(t) {
1531
+ const e = C(t), n = ce((r) => t ? r && r !== vn && t && e.current && t.parentNode === e.current.parentNode ? r : Ge(t) : vn, [t]);
1532
1532
  return P(() => {
1533
1533
  e.current = t;
1534
1534
  }, [t]), n;
1535
1535
  }
1536
- function So(t) {
1537
- const [e, n] = R(null), r = C(t), o = I((a) => {
1538
- const i = We(a.target);
1539
- i && n((s) => s ? (s.set(i, Ie(i)), new Map(s)) : null);
1536
+ function xo(t) {
1537
+ const [e, n] = R(null), r = C(t), o = F((a) => {
1538
+ const i = Le(a.target);
1539
+ i && n((s) => s ? (s.set(i, Be(i)), new Map(s)) : null);
1540
1540
  }, []);
1541
1541
  return P(() => {
1542
1542
  const a = r.current;
1543
1543
  if (t !== a) {
1544
1544
  i(a);
1545
1545
  const s = t.map((c) => {
1546
- const l = We(c);
1546
+ const l = Le(c);
1547
1547
  return l ? (l.addEventListener("scroll", o, {
1548
1548
  passive: !0
1549
- }), [l, Ie(l)]) : null;
1549
+ }), [l, Be(l)]) : null;
1550
1550
  }).filter((c) => c != null);
1551
1551
  n(s.length ? new Map(s) : null), r.current = t;
1552
1552
  }
@@ -1555,11 +1555,11 @@ function So(t) {
1555
1555
  };
1556
1556
  function i(s) {
1557
1557
  s.forEach((c) => {
1558
- const l = We(c);
1558
+ const l = Le(c);
1559
1559
  l == null || l.removeEventListener("scroll", o);
1560
1560
  });
1561
1561
  }
1562
- }, [o, t]), F(() => t.length ? e ? Array.from(e.values()).reduce((a, i) => zt(a, i), ut) : Hn(t) : ut, [t, e]);
1562
+ }, [o, t]), Y(() => t.length ? e ? Array.from(e.values()).reduce((a, i) => jt(a, i), ut) : Xn(t) : ut, [t, e]);
1563
1563
  }
1564
1564
  function yn(t, e) {
1565
1565
  e === void 0 && (e = []);
@@ -1573,12 +1573,12 @@ function yn(t, e) {
1573
1573
  ), P(() => {
1574
1574
  const r = t !== ut;
1575
1575
  r && !n.current && (n.current = t), !r && n.current && (n.current = null);
1576
- }, [t]), n.current ? pe(t, n.current) : ut;
1576
+ }, [t]), n.current ? De(t, n.current) : ut;
1577
1577
  }
1578
- function xo(t) {
1578
+ function Eo(t) {
1579
1579
  P(
1580
1580
  () => {
1581
- if (!Ee)
1581
+ if (!Ne)
1582
1582
  return;
1583
1583
  const e = t.map((n) => {
1584
1584
  let {
@@ -1601,8 +1601,8 @@ function xo(t) {
1601
1601
  })
1602
1602
  );
1603
1603
  }
1604
- function Eo(t, e) {
1605
- return F(() => t.reduce((n, r) => {
1604
+ function Oo(t, e) {
1605
+ return Y(() => t.reduce((n, r) => {
1606
1606
  let {
1607
1607
  eventName: o,
1608
1608
  handler: a
@@ -1613,16 +1613,16 @@ function Eo(t, e) {
1613
1613
  }, {}), [t, e]);
1614
1614
  }
1615
1615
  function Kn(t) {
1616
- return F(() => t ? Ur(t) : null, [t]);
1616
+ return Y(() => t ? Qr(t) : null, [t]);
1617
1617
  }
1618
1618
  const bn = [];
1619
- function Oo(t, e) {
1620
- e === void 0 && (e = se);
1621
- const [n] = t, r = Kn(n ? U(n) : null), [o, a] = R(bn);
1619
+ function No(t, e) {
1620
+ e === void 0 && (e = le);
1621
+ const [n] = t, r = Kn(n ? K(n) : null), [o, a] = R(bn);
1622
1622
  function i() {
1623
- a(() => t.length ? t.map((c) => jn(c) ? r : new Ge(e(c), c)) : bn);
1623
+ a(() => t.length ? t.map((c) => jn(c) ? r : new Ke(e(c), c)) : bn);
1624
1624
  }
1625
- const s = ke({
1625
+ const s = Te({
1626
1626
  callback: i
1627
1627
  });
1628
1628
  return wt(() => {
@@ -1635,17 +1635,17 @@ function Un(t) {
1635
1635
  if (t.children.length > 1)
1636
1636
  return t;
1637
1637
  const e = t.children[0];
1638
- return ae(e) ? e : t;
1638
+ return se(e) ? e : t;
1639
1639
  }
1640
- function No(t) {
1640
+ function ko(t) {
1641
1641
  let {
1642
1642
  measure: e
1643
1643
  } = t;
1644
- const [n, r] = R(null), o = I((l) => {
1644
+ const [n, r] = R(null), o = F((l) => {
1645
1645
  for (const {
1646
1646
  target: u
1647
1647
  } of l)
1648
- if (ae(u)) {
1648
+ if (se(u)) {
1649
1649
  r((d) => {
1650
1650
  const f = e(u);
1651
1651
  return d ? {
@@ -1656,40 +1656,40 @@ function No(t) {
1656
1656
  });
1657
1657
  break;
1658
1658
  }
1659
- }, [e]), a = ke({
1659
+ }, [e]), a = Te({
1660
1660
  callback: o
1661
- }), i = I((l) => {
1661
+ }), i = F((l) => {
1662
1662
  const u = Un(l);
1663
1663
  a == null || a.disconnect(), u && (a == null || a.observe(u)), r(u ? e(u) : null);
1664
- }, [e, a]), [s, c] = ye(i);
1665
- return F(() => ({
1664
+ }, [e, a]), [s, c] = pe(i);
1665
+ return Y(() => ({
1666
1666
  nodeRef: s,
1667
1667
  rect: n,
1668
1668
  setRef: c
1669
1669
  }), [n, s, c]);
1670
1670
  }
1671
- const ko = [{
1672
- sensor: Ue,
1671
+ const Co = [{
1672
+ sensor: Qe,
1673
1673
  options: {}
1674
1674
  }, {
1675
1675
  sensor: Vn,
1676
1676
  options: {}
1677
- }], Co = {
1677
+ }], To = {
1678
1678
  current: {}
1679
- }, ve = {
1679
+ }, be = {
1680
1680
  draggable: {
1681
1681
  measure: un
1682
1682
  },
1683
1683
  droppable: {
1684
1684
  measure: un,
1685
- strategy: re.WhileDragging,
1686
- frequency: $e.Optimized
1685
+ strategy: ae.WhileDragging,
1686
+ frequency: ze.Optimized
1687
1687
  },
1688
1688
  dragOverlay: {
1689
- measure: se
1689
+ measure: le
1690
1690
  }
1691
1691
  };
1692
- class ee extends Map {
1692
+ class re extends Map {
1693
1693
  get(e) {
1694
1694
  var n;
1695
1695
  return e != null && (n = super.get(e)) != null ? n : void 0;
@@ -1710,7 +1710,7 @@ class ee extends Map {
1710
1710
  return (n = (r = this.get(e)) == null ? void 0 : r.node.current) != null ? n : void 0;
1711
1711
  }
1712
1712
  }
1713
- const To = {
1713
+ const Po = {
1714
1714
  activatorEvent: null,
1715
1715
  active: null,
1716
1716
  activeNode: null,
@@ -1719,19 +1719,19 @@ const To = {
1719
1719
  containerNodeRect: null,
1720
1720
  draggableNodes: /* @__PURE__ */ new Map(),
1721
1721
  droppableRects: /* @__PURE__ */ new Map(),
1722
- droppableContainers: /* @__PURE__ */ new ee(),
1722
+ droppableContainers: /* @__PURE__ */ new re(),
1723
1723
  over: null,
1724
1724
  dragOverlay: {
1725
1725
  nodeRef: {
1726
1726
  current: null
1727
1727
  },
1728
1728
  rect: null,
1729
- setRef: De
1729
+ setRef: Se
1730
1730
  },
1731
1731
  scrollableAncestors: [],
1732
1732
  scrollableAncestorRects: [],
1733
- measuringConfiguration: ve,
1734
- measureDroppableContainers: De,
1733
+ measuringConfiguration: be,
1734
+ measureDroppableContainers: Se,
1735
1735
  windowRect: null,
1736
1736
  measuringScheduled: !1
1737
1737
  }, Qn = {
@@ -1742,12 +1742,12 @@ const To = {
1742
1742
  ariaDescribedById: {
1743
1743
  draggable: ""
1744
1744
  },
1745
- dispatch: De,
1745
+ dispatch: Se,
1746
1746
  draggableNodes: /* @__PURE__ */ new Map(),
1747
1747
  over: null,
1748
- measureDroppableContainers: De
1749
- }, ce = /* @__PURE__ */ oe(Qn), Jn = /* @__PURE__ */ oe(To);
1750
- function Po() {
1748
+ measureDroppableContainers: Se
1749
+ }, ue = /* @__PURE__ */ ie(Qn), Jn = /* @__PURE__ */ ie(Po);
1750
+ function Ro() {
1751
1751
  return {
1752
1752
  draggable: {
1753
1753
  active: null,
@@ -1762,13 +1762,13 @@ function Po() {
1762
1762
  }
1763
1763
  },
1764
1764
  droppable: {
1765
- containers: new ee()
1765
+ containers: new re()
1766
1766
  }
1767
1767
  };
1768
1768
  }
1769
- function Ro(t, e) {
1769
+ function Ao(t, e) {
1770
1770
  switch (e.type) {
1771
- case X.DragStart:
1771
+ case j.DragStart:
1772
1772
  return {
1773
1773
  ...t,
1774
1774
  draggable: {
@@ -1777,7 +1777,7 @@ function Ro(t, e) {
1777
1777
  active: e.active
1778
1778
  }
1779
1779
  };
1780
- case X.DragMove:
1780
+ case j.DragMove:
1781
1781
  return t.draggable.active == null ? t : {
1782
1782
  ...t,
1783
1783
  draggable: {
@@ -1788,8 +1788,8 @@ function Ro(t, e) {
1788
1788
  }
1789
1789
  }
1790
1790
  };
1791
- case X.DragEnd:
1792
- case X.DragCancel:
1791
+ case j.DragEnd:
1792
+ case j.DragCancel:
1793
1793
  return {
1794
1794
  ...t,
1795
1795
  draggable: {
@@ -1805,12 +1805,12 @@ function Ro(t, e) {
1805
1805
  }
1806
1806
  }
1807
1807
  };
1808
- case X.RegisterDroppable: {
1808
+ case j.RegisterDroppable: {
1809
1809
  const {
1810
1810
  element: n
1811
1811
  } = e, {
1812
1812
  id: r
1813
- } = n, o = new ee(t.droppable.containers);
1813
+ } = n, o = new re(t.droppable.containers);
1814
1814
  return o.set(r, n), {
1815
1815
  ...t,
1816
1816
  droppable: {
@@ -1819,7 +1819,7 @@ function Ro(t, e) {
1819
1819
  }
1820
1820
  };
1821
1821
  }
1822
- case X.SetDroppableDisabled: {
1822
+ case j.SetDroppableDisabled: {
1823
1823
  const {
1824
1824
  id: n,
1825
1825
  key: r,
@@ -1827,7 +1827,7 @@ function Ro(t, e) {
1827
1827
  } = e, a = t.droppable.containers.get(n);
1828
1828
  if (!a || r !== a.key)
1829
1829
  return t;
1830
- const i = new ee(t.droppable.containers);
1830
+ const i = new re(t.droppable.containers);
1831
1831
  return i.set(n, {
1832
1832
  ...a,
1833
1833
  disabled: o
@@ -1839,14 +1839,14 @@ function Ro(t, e) {
1839
1839
  }
1840
1840
  };
1841
1841
  }
1842
- case X.UnregisterDroppable: {
1842
+ case j.UnregisterDroppable: {
1843
1843
  const {
1844
1844
  id: n,
1845
1845
  key: r
1846
1846
  } = e, o = t.droppable.containers.get(n);
1847
1847
  if (!o || r !== o.key)
1848
1848
  return t;
1849
- const a = new ee(t.droppable.containers);
1849
+ const a = new re(t.droppable.containers);
1850
1850
  return a.delete(n), {
1851
1851
  ...t,
1852
1852
  droppable: {
@@ -1859,7 +1859,7 @@ function Ro(t, e) {
1859
1859
  return t;
1860
1860
  }
1861
1861
  }
1862
- function Ao(t) {
1862
+ function Wo(t) {
1863
1863
  let {
1864
1864
  disabled: e
1865
1865
  } = t;
@@ -1867,10 +1867,10 @@ function Ao(t) {
1867
1867
  active: n,
1868
1868
  activatorEvent: r,
1869
1869
  draggableNodes: o
1870
- } = At(ce), a = be(r), i = be(n == null ? void 0 : n.id);
1870
+ } = Rt(ue), a = we(r), i = we(n == null ? void 0 : n.id);
1871
1871
  return P(() => {
1872
1872
  if (!e && !r && a && i != null) {
1873
- if (!_e(a) || document.activeElement === a.target)
1873
+ if (!Ve(a) || document.activeElement === a.target)
1874
1874
  return;
1875
1875
  const s = o.get(i);
1876
1876
  if (!s)
@@ -1885,7 +1885,7 @@ function Ao(t) {
1885
1885
  for (const u of [c.current, l.current]) {
1886
1886
  if (!u)
1887
1887
  continue;
1888
- const d = Cr(u);
1888
+ const d = Tr(u);
1889
1889
  if (d) {
1890
1890
  d.focus();
1891
1891
  break;
@@ -1905,19 +1905,19 @@ function Zn(t, e) {
1905
1905
  ...r
1906
1906
  }), n) : n;
1907
1907
  }
1908
- function Wo(t) {
1909
- return F(
1908
+ function Lo(t) {
1909
+ return Y(
1910
1910
  () => ({
1911
1911
  draggable: {
1912
- ...ve.draggable,
1912
+ ...be.draggable,
1913
1913
  ...t == null ? void 0 : t.draggable
1914
1914
  },
1915
1915
  droppable: {
1916
- ...ve.droppable,
1916
+ ...be.droppable,
1917
1917
  ...t == null ? void 0 : t.droppable
1918
1918
  },
1919
1919
  dragOverlay: {
1920
- ...ve.dragOverlay,
1920
+ ...be.dragOverlay,
1921
1921
  ...t == null ? void 0 : t.dragOverlay
1922
1922
  }
1923
1923
  }),
@@ -1925,7 +1925,7 @@ function Wo(t) {
1925
1925
  [t == null ? void 0 : t.draggable, t == null ? void 0 : t.droppable, t == null ? void 0 : t.dragOverlay]
1926
1926
  );
1927
1927
  }
1928
- function Lo(t) {
1928
+ function Yo(t) {
1929
1929
  let {
1930
1930
  activeNode: e,
1931
1931
  measure: n,
@@ -1959,7 +1959,7 @@ function Lo(t) {
1959
1959
  }
1960
1960
  }, [e, i, s, r, n]);
1961
1961
  }
1962
- const Ce = /* @__PURE__ */ oe({
1962
+ const Pe = /* @__PURE__ */ ie({
1963
1963
  ...ut,
1964
1964
  scaleX: 1,
1965
1965
  scaleY: 1
@@ -1968,209 +1968,209 @@ var kt;
1968
1968
  (function(t) {
1969
1969
  t[t.Uninitialized = 0] = "Uninitialized", t[t.Initializing = 1] = "Initializing", t[t.Initialized = 2] = "Initialized";
1970
1970
  })(kt || (kt = {}));
1971
- const Yo = /* @__PURE__ */ Dr(function(e) {
1971
+ const Fo = /* @__PURE__ */ Mr(function(e) {
1972
1972
  var n, r, o, a;
1973
1973
  let {
1974
1974
  id: i,
1975
1975
  accessibility: s,
1976
1976
  autoScroll: c = !0,
1977
1977
  children: l,
1978
- sensors: u = ko,
1979
- collisionDetection: d = Hr,
1978
+ sensors: u = Co,
1979
+ collisionDetection: d = qr,
1980
1980
  measuring: f,
1981
1981
  modifiers: g,
1982
1982
  ...y
1983
1983
  } = e;
1984
- const h = Mr(Ro, void 0, Po), [m, v] = h, [p, D] = Lr(), [E, w] = R(kt.Uninitialized), x = E === kt.Initialized, {
1984
+ const h = Sr(Ao, void 0, Ro), [m, v] = h, [w, D] = Yr(), [E, b] = R(kt.Uninitialized), M = E === kt.Initialized, {
1985
1985
  draggable: {
1986
1986
  active: S,
1987
- nodes: M,
1988
- translate: N
1987
+ nodes: x,
1988
+ translate: T
1989
1989
  },
1990
1990
  droppable: {
1991
- containers: L
1991
+ containers: W
1992
1992
  }
1993
- } = m, T = S != null ? M.get(S) : null, G = C({
1993
+ } = m, O = S != null ? x.get(S) : null, q = C({
1994
1994
  initial: null,
1995
1995
  translated: null
1996
- }), K = F(() => {
1996
+ }), G = Y(() => {
1997
1997
  var V;
1998
1998
  return S != null ? {
1999
1999
  id: S,
2000
2000
  // It's possible for the active node to unmount while dragging
2001
- data: (V = T == null ? void 0 : T.data) != null ? V : Co,
2002
- rect: G
2001
+ data: (V = O == null ? void 0 : O.data) != null ? V : To,
2002
+ rect: q
2003
2003
  } : null;
2004
- }, [S, T]), j = C(null), [ct, dt] = R(null), [lt, ue] = R(null), vt = ne(y, Object.values(y)), Ht = Ne("DndDescribedBy", i), Tt = F(() => L.getEnabled(), [L]), ft = Wo(f), {
2005
- droppableRects: yt,
2006
- measureDroppableContainers: Y,
2007
- measuringScheduled: Q
2008
- } = yo(Tt, {
2009
- dragging: x,
2010
- dependencies: [N.x, N.y],
2011
- config: ft.droppable
2012
- }), H = mo(M, S), nt = F(() => lt ? we(lt) : null, [lt]), qt = pr(), _t = bo(H, ft.draggable.measure);
2013
- Lo({
2014
- activeNode: S != null ? M.get(S) : null,
2015
- config: qt.layoutShiftCompensation,
2016
- initialRect: _t,
2017
- measure: ft.draggable.measure
2004
+ }, [S, O]), _ = C(null), [dt, Lt] = R(null), [U, qt] = R(null), tt = oe(y, Object.values(y)), _t = Ce("DndDescribedBy", i), fe = Y(() => W.getEnabled(), [W]), vt = Lo(f), {
2005
+ droppableRects: Dt,
2006
+ measureDroppableContainers: yt,
2007
+ measuringScheduled: Vt
2008
+ } = bo(fe, {
2009
+ dragging: M,
2010
+ dependencies: [T.x, T.y],
2011
+ config: vt.droppable
2012
+ }), Q = vo(x, S), $ = Y(() => U ? Me(U) : null, [U]), J = wr(), bt = po(Q, vt.draggable.measure);
2013
+ Yo({
2014
+ activeNode: S != null ? x.get(S) : null,
2015
+ config: J.layoutShiftCompensation,
2016
+ initialRect: bt,
2017
+ measure: vt.draggable.measure
2018
2018
  });
2019
- const $ = mn(H, ft.draggable.measure, _t), ht = mn(H ? H.parentElement : null), J = C({
2019
+ const I = mn(Q, vt.draggable.measure, bt), Yt = mn(Q ? Q.parentElement : null), ft = C({
2020
2020
  activatorEvent: null,
2021
2021
  active: null,
2022
- activeNode: H,
2022
+ activeNode: Q,
2023
2023
  collisionRect: null,
2024
2024
  collisions: null,
2025
- droppableRects: yt,
2026
- draggableNodes: M,
2025
+ droppableRects: Dt,
2026
+ draggableNodes: x,
2027
2027
  draggingNode: null,
2028
2028
  draggingNodeRect: null,
2029
- droppableContainers: L,
2029
+ droppableContainers: W,
2030
2030
  over: null,
2031
2031
  scrollableAncestors: [],
2032
2032
  scrollAdjustedTranslate: null
2033
- }), bt = L.getNodeFor((n = J.current.over) == null ? void 0 : n.id), rt = No({
2034
- measure: ft.dragOverlay.measure
2035
- }), Dt = (r = rt.nodeRef.current) != null ? r : H, ot = x ? (o = rt.rect) != null ? o : $ : null, de = !!(rt.nodeRef.current && rt.rect), tn = Do(de ? null : $), Te = Kn(Dt ? U(Dt) : null), Mt = Mo(x ? bt ?? H : null), fe = Oo(Mt), he = Zn(g, {
2033
+ }), ct = W.getNodeFor((n = ft.current.over) == null ? void 0 : n.id), Z = ko({
2034
+ measure: vt.dragOverlay.measure
2035
+ }), lt = (r = Z.nodeRef.current) != null ? r : Q, et = M ? (o = Z.rect) != null ? o : I : null, Mt = !!(Z.nodeRef.current && Z.rect), he = Mo(Mt ? null : I), Gt = Kn(lt ? K(lt) : null), ht = So(M ? ct ?? Q : null), ge = No(ht), me = Zn(g, {
2036
2036
  transform: {
2037
- x: N.x - tn.x,
2038
- y: N.y - tn.y,
2037
+ x: T.x - he.x,
2038
+ y: T.y - he.y,
2039
2039
  scaleX: 1,
2040
2040
  scaleY: 1
2041
2041
  },
2042
- activatorEvent: lt,
2043
- active: K,
2044
- activeNodeRect: $,
2045
- containerNodeRect: ht,
2046
- draggingNodeRect: ot,
2047
- over: J.current.over,
2048
- overlayNodeRect: rt.rect,
2049
- scrollableAncestors: Mt,
2050
- scrollableAncestorRects: fe,
2051
- windowRect: Te
2052
- }), en = nt ? zt(nt, N) : null, nn = So(Mt), fr = yn(nn), hr = yn(nn, [$]), Yt = zt(he, fr), Ft = ot ? Vr(ot, he) : null, Vt = K && Ft ? d({
2053
- active: K,
2054
- collisionRect: Ft,
2055
- droppableRects: yt,
2056
- droppableContainers: Tt,
2042
+ activatorEvent: U,
2043
+ active: G,
2044
+ activeNodeRect: I,
2045
+ containerNodeRect: Yt,
2046
+ draggingNodeRect: et,
2047
+ over: ft.current.over,
2048
+ overlayNodeRect: Z.rect,
2049
+ scrollableAncestors: ht,
2050
+ scrollableAncestorRects: ge,
2051
+ windowRect: Gt
2052
+ }), en = $ ? jt($, T) : null, nn = xo(ht), hr = yn(nn), gr = yn(nn, [I]), Ft = jt(me, hr), It = et ? Gr(et, me) : null, Kt = G && It ? d({
2053
+ active: G,
2054
+ collisionRect: It,
2055
+ droppableRects: Dt,
2056
+ droppableContainers: fe,
2057
2057
  pointerCoordinates: en
2058
- }) : null, rn = jr(Vt, "id"), [St, on] = R(null), gr = de ? he : zt(he, hr), mr = qr(gr, (a = St == null ? void 0 : St.rect) != null ? a : null, $), Pe = C(null), an = I(
2059
- (V, Z) => {
2058
+ }) : null, rn = Hr(Kt, "id"), [St, on] = R(null), mr = Mt ? me : jt(me, gr), vr = _r(mr, (a = St == null ? void 0 : St.rect) != null ? a : null, I), Re = C(null), an = F(
2059
+ (V, nt) => {
2060
2060
  let {
2061
- sensor: tt,
2061
+ sensor: rt,
2062
2062
  options: xt
2063
- } = Z;
2064
- if (j.current == null)
2063
+ } = nt;
2064
+ if (_.current == null)
2065
2065
  return;
2066
- const at = M.get(j.current);
2066
+ const at = x.get(_.current);
2067
2067
  if (!at)
2068
2068
  return;
2069
- const et = V.nativeEvent, gt = new tt({
2070
- active: j.current,
2069
+ const ot = V.nativeEvent, gt = new rt({
2070
+ active: _.current,
2071
2071
  activeNode: at,
2072
- event: et,
2072
+ event: ot,
2073
2073
  options: xt,
2074
2074
  // Sensors need to be instantiated with refs for arguments that change over time
2075
2075
  // otherwise they are frozen in time with the stale arguments
2076
- context: J,
2077
- onAbort(_) {
2078
- if (!M.get(_))
2076
+ context: ft,
2077
+ onAbort(X) {
2078
+ if (!x.get(X))
2079
2079
  return;
2080
2080
  const {
2081
2081
  onDragAbort: mt
2082
- } = vt.current, pt = {
2083
- id: _
2082
+ } = tt.current, pt = {
2083
+ id: X
2084
2084
  };
2085
- mt == null || mt(pt), p({
2085
+ mt == null || mt(pt), w({
2086
2086
  type: "onDragAbort",
2087
2087
  event: pt
2088
2088
  });
2089
2089
  },
2090
- onPending(_, Et, mt, pt) {
2091
- if (!M.get(_))
2090
+ onPending(X, Et, mt, pt) {
2091
+ if (!x.get(X))
2092
2092
  return;
2093
2093
  const {
2094
- onDragPending: Kt
2095
- } = vt.current, Ot = {
2096
- id: _,
2094
+ onDragPending: Qt
2095
+ } = tt.current, Ot = {
2096
+ id: X,
2097
2097
  constraint: Et,
2098
2098
  initialCoordinates: mt,
2099
2099
  offset: pt
2100
2100
  };
2101
- Kt == null || Kt(Ot), p({
2101
+ Qt == null || Qt(Ot), w({
2102
2102
  type: "onDragPending",
2103
2103
  event: Ot
2104
2104
  });
2105
2105
  },
2106
- onStart(_) {
2107
- const Et = j.current;
2106
+ onStart(X) {
2107
+ const Et = _.current;
2108
2108
  if (Et == null)
2109
2109
  return;
2110
- const mt = M.get(Et);
2110
+ const mt = x.get(Et);
2111
2111
  if (!mt)
2112
2112
  return;
2113
2113
  const {
2114
2114
  onDragStart: pt
2115
- } = vt.current, Gt = {
2116
- activatorEvent: et,
2115
+ } = tt.current, Ut = {
2116
+ activatorEvent: ot,
2117
2117
  active: {
2118
2118
  id: Et,
2119
2119
  data: mt.data,
2120
- rect: G
2120
+ rect: q
2121
2121
  }
2122
2122
  };
2123
- ge(() => {
2124
- pt == null || pt(Gt), w(kt.Initializing), v({
2125
- type: X.DragStart,
2126
- initialCoordinates: _,
2123
+ ve(() => {
2124
+ pt == null || pt(Ut), b(kt.Initializing), v({
2125
+ type: j.DragStart,
2126
+ initialCoordinates: X,
2127
2127
  active: Et
2128
- }), p({
2128
+ }), w({
2129
2129
  type: "onDragStart",
2130
- event: Gt
2131
- }), dt(Pe.current), ue(et);
2130
+ event: Ut
2131
+ }), Lt(Re.current), qt(ot);
2132
2132
  });
2133
2133
  },
2134
- onMove(_) {
2134
+ onMove(X) {
2135
2135
  v({
2136
- type: X.DragMove,
2137
- coordinates: _
2136
+ type: j.DragMove,
2137
+ coordinates: X
2138
2138
  });
2139
2139
  },
2140
- onEnd: It(X.DragEnd),
2141
- onCancel: It(X.DragCancel)
2140
+ onEnd: Bt(j.DragEnd),
2141
+ onCancel: Bt(j.DragCancel)
2142
2142
  });
2143
- Pe.current = gt;
2144
- function It(_) {
2143
+ Re.current = gt;
2144
+ function Bt(X) {
2145
2145
  return async function() {
2146
2146
  const {
2147
2147
  active: mt,
2148
2148
  collisions: pt,
2149
- over: Gt,
2150
- scrollAdjustedTranslate: Kt
2151
- } = J.current;
2149
+ over: Ut,
2150
+ scrollAdjustedTranslate: Qt
2151
+ } = ft.current;
2152
2152
  let Ot = null;
2153
- if (mt && Kt) {
2153
+ if (mt && Qt) {
2154
2154
  const {
2155
- cancelDrop: Ut
2156
- } = vt.current;
2155
+ cancelDrop: Jt
2156
+ } = tt.current;
2157
2157
  Ot = {
2158
- activatorEvent: et,
2158
+ activatorEvent: ot,
2159
2159
  active: mt,
2160
2160
  collisions: pt,
2161
- delta: Kt,
2162
- over: Gt
2163
- }, _ === X.DragEnd && typeof Ut == "function" && await Promise.resolve(Ut(Ot)) && (_ = X.DragCancel);
2161
+ delta: Qt,
2162
+ over: Ut
2163
+ }, X === j.DragEnd && typeof Jt == "function" && await Promise.resolve(Jt(Ot)) && (X = j.DragCancel);
2164
2164
  }
2165
- j.current = null, ge(() => {
2165
+ _.current = null, ve(() => {
2166
2166
  v({
2167
- type: _
2168
- }), w(kt.Uninitialized), on(null), dt(null), ue(null), Pe.current = null;
2169
- const Ut = _ === X.DragEnd ? "onDragEnd" : "onDragCancel";
2167
+ type: X
2168
+ }), b(kt.Uninitialized), on(null), Lt(null), qt(null), Re.current = null;
2169
+ const Jt = X === j.DragEnd ? "onDragEnd" : "onDragCancel";
2170
2170
  if (Ot) {
2171
- const Re = vt.current[Ut];
2172
- Re == null || Re(Ot), p({
2173
- type: Ut,
2171
+ const Ae = tt.current[Jt];
2172
+ Ae == null || Ae(Ot), w({
2173
+ type: Jt,
2174
2174
  event: Ot
2175
2175
  });
2176
2176
  }
@@ -2179,175 +2179,175 @@ const Yo = /* @__PURE__ */ Dr(function(e) {
2179
2179
  }
2180
2180
  },
2181
2181
  // eslint-disable-next-line react-hooks/exhaustive-deps
2182
- [M]
2183
- ), vr = I((V, Z) => (tt, xt) => {
2184
- const at = tt.nativeEvent, et = M.get(xt);
2182
+ [x]
2183
+ ), yr = F((V, nt) => (rt, xt) => {
2184
+ const at = rt.nativeEvent, ot = x.get(xt);
2185
2185
  if (
2186
2186
  // Another sensor is already instantiating
2187
- j.current !== null || // No active draggable
2188
- !et || // Event has already been captured
2187
+ _.current !== null || // No active draggable
2188
+ !ot || // Event has already been captured
2189
2189
  at.dndKit || at.defaultPrevented
2190
2190
  )
2191
2191
  return;
2192
2192
  const gt = {
2193
- active: et
2193
+ active: ot
2194
2194
  };
2195
- V(tt, Z.options, gt) === !0 && (at.dndKit = {
2196
- capturedBy: Z.sensor
2197
- }, j.current = xt, an(tt, Z));
2198
- }, [M, an]), sn = vo(u, vr);
2199
- xo(u), wt(() => {
2200
- $ && E === kt.Initializing && w(kt.Initialized);
2201
- }, [$, E]), P(
2195
+ V(rt, nt.options, gt) === !0 && (at.dndKit = {
2196
+ capturedBy: nt.sensor
2197
+ }, _.current = xt, an(rt, nt));
2198
+ }, [x, an]), sn = yo(u, yr);
2199
+ Eo(u), wt(() => {
2200
+ I && E === kt.Initializing && b(kt.Initialized);
2201
+ }, [I, E]), P(
2202
2202
  () => {
2203
2203
  const {
2204
2204
  onDragMove: V
2205
- } = vt.current, {
2206
- active: Z,
2207
- activatorEvent: tt,
2205
+ } = tt.current, {
2206
+ active: nt,
2207
+ activatorEvent: rt,
2208
2208
  collisions: xt,
2209
2209
  over: at
2210
- } = J.current;
2211
- if (!Z || !tt)
2210
+ } = ft.current;
2211
+ if (!nt || !rt)
2212
2212
  return;
2213
- const et = {
2214
- active: Z,
2215
- activatorEvent: tt,
2213
+ const ot = {
2214
+ active: nt,
2215
+ activatorEvent: rt,
2216
2216
  collisions: xt,
2217
2217
  delta: {
2218
- x: Yt.x,
2219
- y: Yt.y
2218
+ x: Ft.x,
2219
+ y: Ft.y
2220
2220
  },
2221
2221
  over: at
2222
2222
  };
2223
- ge(() => {
2224
- V == null || V(et), p({
2223
+ ve(() => {
2224
+ V == null || V(ot), w({
2225
2225
  type: "onDragMove",
2226
- event: et
2226
+ event: ot
2227
2227
  });
2228
2228
  });
2229
2229
  },
2230
2230
  // eslint-disable-next-line react-hooks/exhaustive-deps
2231
- [Yt.x, Yt.y]
2231
+ [Ft.x, Ft.y]
2232
2232
  ), P(
2233
2233
  () => {
2234
2234
  const {
2235
2235
  active: V,
2236
- activatorEvent: Z,
2237
- collisions: tt,
2236
+ activatorEvent: nt,
2237
+ collisions: rt,
2238
2238
  droppableContainers: xt,
2239
2239
  scrollAdjustedTranslate: at
2240
- } = J.current;
2241
- if (!V || j.current == null || !Z || !at)
2240
+ } = ft.current;
2241
+ if (!V || _.current == null || !nt || !at)
2242
2242
  return;
2243
2243
  const {
2244
- onDragOver: et
2245
- } = vt.current, gt = xt.get(rn), It = gt && gt.rect.current ? {
2244
+ onDragOver: ot
2245
+ } = tt.current, gt = xt.get(rn), Bt = gt && gt.rect.current ? {
2246
2246
  id: gt.id,
2247
2247
  rect: gt.rect.current,
2248
2248
  data: gt.data,
2249
2249
  disabled: gt.disabled
2250
- } : null, _ = {
2250
+ } : null, X = {
2251
2251
  active: V,
2252
- activatorEvent: Z,
2253
- collisions: tt,
2252
+ activatorEvent: nt,
2253
+ collisions: rt,
2254
2254
  delta: {
2255
2255
  x: at.x,
2256
2256
  y: at.y
2257
2257
  },
2258
- over: It
2258
+ over: Bt
2259
2259
  };
2260
- ge(() => {
2261
- on(It), et == null || et(_), p({
2260
+ ve(() => {
2261
+ on(Bt), ot == null || ot(X), w({
2262
2262
  type: "onDragOver",
2263
- event: _
2263
+ event: X
2264
2264
  });
2265
2265
  });
2266
2266
  },
2267
2267
  // eslint-disable-next-line react-hooks/exhaustive-deps
2268
2268
  [rn]
2269
2269
  ), wt(() => {
2270
- J.current = {
2271
- activatorEvent: lt,
2272
- active: K,
2273
- activeNode: H,
2274
- collisionRect: Ft,
2275
- collisions: Vt,
2276
- droppableRects: yt,
2277
- draggableNodes: M,
2278
- draggingNode: Dt,
2279
- draggingNodeRect: ot,
2280
- droppableContainers: L,
2270
+ ft.current = {
2271
+ activatorEvent: U,
2272
+ active: G,
2273
+ activeNode: Q,
2274
+ collisionRect: It,
2275
+ collisions: Kt,
2276
+ droppableRects: Dt,
2277
+ draggableNodes: x,
2278
+ draggingNode: lt,
2279
+ draggingNodeRect: et,
2280
+ droppableContainers: W,
2281
2281
  over: St,
2282
- scrollableAncestors: Mt,
2283
- scrollAdjustedTranslate: Yt
2284
- }, G.current = {
2285
- initial: ot,
2286
- translated: Ft
2282
+ scrollableAncestors: ht,
2283
+ scrollAdjustedTranslate: Ft
2284
+ }, q.current = {
2285
+ initial: et,
2286
+ translated: It
2287
2287
  };
2288
- }, [K, H, Vt, Ft, M, Dt, ot, yt, L, St, Mt, Yt]), fo({
2289
- ...qt,
2290
- delta: N,
2291
- draggingRect: Ft,
2288
+ }, [G, Q, Kt, It, x, lt, et, Dt, W, St, ht, Ft]), ho({
2289
+ ...J,
2290
+ delta: T,
2291
+ draggingRect: It,
2292
2292
  pointerCoordinates: en,
2293
- scrollableAncestors: Mt,
2294
- scrollableAncestorRects: fe
2293
+ scrollableAncestors: ht,
2294
+ scrollableAncestorRects: ge
2295
2295
  });
2296
- const yr = F(() => ({
2297
- active: K,
2298
- activeNode: H,
2299
- activeNodeRect: $,
2300
- activatorEvent: lt,
2301
- collisions: Vt,
2302
- containerNodeRect: ht,
2303
- dragOverlay: rt,
2304
- draggableNodes: M,
2305
- droppableContainers: L,
2306
- droppableRects: yt,
2296
+ const br = Y(() => ({
2297
+ active: G,
2298
+ activeNode: Q,
2299
+ activeNodeRect: I,
2300
+ activatorEvent: U,
2301
+ collisions: Kt,
2302
+ containerNodeRect: Yt,
2303
+ dragOverlay: Z,
2304
+ draggableNodes: x,
2305
+ droppableContainers: W,
2306
+ droppableRects: Dt,
2307
2307
  over: St,
2308
- measureDroppableContainers: Y,
2309
- scrollableAncestors: Mt,
2310
- scrollableAncestorRects: fe,
2311
- measuringConfiguration: ft,
2312
- measuringScheduled: Q,
2313
- windowRect: Te
2314
- }), [K, H, $, lt, Vt, ht, rt, M, L, yt, St, Y, Mt, fe, ft, Q, Te]), br = F(() => ({
2315
- activatorEvent: lt,
2308
+ measureDroppableContainers: yt,
2309
+ scrollableAncestors: ht,
2310
+ scrollableAncestorRects: ge,
2311
+ measuringConfiguration: vt,
2312
+ measuringScheduled: Vt,
2313
+ windowRect: Gt
2314
+ }), [G, Q, I, U, Kt, Yt, Z, x, W, Dt, St, yt, ht, ge, vt, Vt, Gt]), pr = Y(() => ({
2315
+ activatorEvent: U,
2316
2316
  activators: sn,
2317
- active: K,
2318
- activeNodeRect: $,
2317
+ active: G,
2318
+ activeNodeRect: I,
2319
2319
  ariaDescribedById: {
2320
- draggable: Ht
2320
+ draggable: _t
2321
2321
  },
2322
2322
  dispatch: v,
2323
- draggableNodes: M,
2323
+ draggableNodes: x,
2324
2324
  over: St,
2325
- measureDroppableContainers: Y
2326
- }), [lt, sn, K, $, v, Ht, M, St, Y]);
2325
+ measureDroppableContainers: yt
2326
+ }), [U, sn, G, I, v, _t, x, St, yt]);
2327
2327
  return B.createElement(Yn.Provider, {
2328
2328
  value: D
2329
- }, B.createElement(ce.Provider, {
2330
- value: br
2329
+ }, B.createElement(ue.Provider, {
2330
+ value: pr
2331
2331
  }, B.createElement(Jn.Provider, {
2332
- value: yr
2333
- }, B.createElement(Ce.Provider, {
2334
- value: mr
2335
- }, l)), B.createElement(Ao, {
2332
+ value: br
2333
+ }, B.createElement(Pe.Provider, {
2334
+ value: vr
2335
+ }, l)), B.createElement(Wo, {
2336
2336
  disabled: (s == null ? void 0 : s.restoreFocus) === !1
2337
- })), B.createElement(Ir, {
2337
+ })), B.createElement(Br, {
2338
2338
  ...s,
2339
- hiddenTextDescribedById: Ht
2339
+ hiddenTextDescribedById: _t
2340
2340
  }));
2341
- function pr() {
2342
- const V = (ct == null ? void 0 : ct.autoScrollEnabled) === !1, Z = typeof c == "object" ? c.enabled === !1 : c === !1, tt = x && !V && !Z;
2341
+ function wr() {
2342
+ const V = (dt == null ? void 0 : dt.autoScrollEnabled) === !1, nt = typeof c == "object" ? c.enabled === !1 : c === !1, rt = M && !V && !nt;
2343
2343
  return typeof c == "object" ? {
2344
2344
  ...c,
2345
- enabled: tt
2345
+ enabled: rt
2346
2346
  } : {
2347
- enabled: tt
2347
+ enabled: rt
2348
2348
  };
2349
2349
  }
2350
- }), Fo = /* @__PURE__ */ oe(null), pn = "button", Io = "Draggable";
2350
+ }), Io = /* @__PURE__ */ ie(null), pn = "button", Bo = "Draggable";
2351
2351
  function tr(t) {
2352
2352
  let {
2353
2353
  id: e,
@@ -2355,7 +2355,7 @@ function tr(t) {
2355
2355
  disabled: r = !1,
2356
2356
  attributes: o
2357
2357
  } = t;
2358
- const a = Ne(Io), {
2358
+ const a = Ce(Bo), {
2359
2359
  activators: i,
2360
2360
  activatorEvent: s,
2361
2361
  active: c,
@@ -2363,26 +2363,26 @@ function tr(t) {
2363
2363
  ariaDescribedById: u,
2364
2364
  draggableNodes: d,
2365
2365
  over: f
2366
- } = At(ce), {
2366
+ } = Rt(ue), {
2367
2367
  role: g = pn,
2368
2368
  roleDescription: y = "draggable",
2369
2369
  tabIndex: h = 0
2370
- } = o ?? {}, m = (c == null ? void 0 : c.id) === e, v = At(m ? Ce : Fo), [p, D] = ye(), [E, w] = ye(), x = Eo(i, e), S = ne(n);
2370
+ } = o ?? {}, m = (c == null ? void 0 : c.id) === e, v = Rt(m ? Pe : Io), [w, D] = pe(), [E, b] = pe(), M = Oo(i, e), S = oe(n);
2371
2371
  wt(
2372
2372
  () => (d.set(e, {
2373
2373
  id: e,
2374
2374
  key: a,
2375
- node: p,
2375
+ node: w,
2376
2376
  activatorNode: E,
2377
2377
  data: S
2378
2378
  }), () => {
2379
- const N = d.get(e);
2380
- N && N.key === a && d.delete(e);
2379
+ const T = d.get(e);
2380
+ T && T.key === a && d.delete(e);
2381
2381
  }),
2382
2382
  // eslint-disable-next-line react-hooks/exhaustive-deps
2383
2383
  [d, e]
2384
2384
  );
2385
- const M = F(() => ({
2385
+ const x = Y(() => ({
2386
2386
  role: g,
2387
2387
  tabIndex: h,
2388
2388
  "aria-disabled": r,
@@ -2394,20 +2394,20 @@ function tr(t) {
2394
2394
  active: c,
2395
2395
  activatorEvent: s,
2396
2396
  activeNodeRect: l,
2397
- attributes: M,
2397
+ attributes: x,
2398
2398
  isDragging: m,
2399
- listeners: r ? void 0 : x,
2400
- node: p,
2399
+ listeners: r ? void 0 : M,
2400
+ node: w,
2401
2401
  over: f,
2402
2402
  setNodeRef: D,
2403
- setActivatorNodeRef: w,
2403
+ setActivatorNodeRef: b,
2404
2404
  transform: v
2405
2405
  };
2406
2406
  }
2407
- function Bo() {
2408
- return At(Jn);
2407
+ function $o() {
2408
+ return Rt(Jn);
2409
2409
  }
2410
- const $o = "Droppable", zo = {
2410
+ const zo = "Droppable", jo = {
2411
2411
  timeout: 25
2412
2412
  };
2413
2413
  function er(t) {
@@ -2417,21 +2417,21 @@ function er(t) {
2417
2417
  id: r,
2418
2418
  resizeObserverConfig: o
2419
2419
  } = t;
2420
- const a = Ne($o), {
2420
+ const a = Ce(zo), {
2421
2421
  active: i,
2422
2422
  dispatch: s,
2423
2423
  over: c,
2424
2424
  measureDroppableContainers: l
2425
- } = At(ce), u = C({
2425
+ } = Rt(ue), u = C({
2426
2426
  disabled: n
2427
2427
  }), d = C(!1), f = C(null), g = C(null), {
2428
2428
  disabled: y,
2429
2429
  updateMeasurementsFor: h,
2430
2430
  timeout: m
2431
2431
  } = {
2432
- ...zo,
2432
+ ...jo,
2433
2433
  ...o
2434
- }, v = ne(h ?? r), p = I(
2434
+ }, v = oe(h ?? r), w = F(
2435
2435
  () => {
2436
2436
  if (!d.current) {
2437
2437
  d.current = !0;
@@ -2443,27 +2443,27 @@ function er(t) {
2443
2443
  },
2444
2444
  //eslint-disable-next-line react-hooks/exhaustive-deps
2445
2445
  [m]
2446
- ), D = ke({
2447
- callback: p,
2446
+ ), D = Te({
2447
+ callback: w,
2448
2448
  disabled: y || !i
2449
- }), E = I((M, N) => {
2450
- D && (N && (D.unobserve(N), d.current = !1), M && D.observe(M));
2451
- }, [D]), [w, x] = ye(E), S = ne(e);
2449
+ }), E = F((x, T) => {
2450
+ D && (T && (D.unobserve(T), d.current = !1), x && D.observe(x));
2451
+ }, [D]), [b, M] = pe(E), S = oe(e);
2452
2452
  return P(() => {
2453
- !D || !w.current || (D.disconnect(), d.current = !1, D.observe(w.current));
2454
- }, [w, D]), P(
2453
+ !D || !b.current || (D.disconnect(), d.current = !1, D.observe(b.current));
2454
+ }, [b, D]), P(
2455
2455
  () => (s({
2456
- type: X.RegisterDroppable,
2456
+ type: j.RegisterDroppable,
2457
2457
  element: {
2458
2458
  id: r,
2459
2459
  key: a,
2460
2460
  disabled: n,
2461
- node: w,
2461
+ node: b,
2462
2462
  rect: f,
2463
2463
  data: S
2464
2464
  }
2465
2465
  }), () => s({
2466
- type: X.UnregisterDroppable,
2466
+ type: j.UnregisterDroppable,
2467
2467
  key: a,
2468
2468
  id: r
2469
2469
  })),
@@ -2471,7 +2471,7 @@ function er(t) {
2471
2471
  [r]
2472
2472
  ), P(() => {
2473
2473
  n !== u.current.disabled && (s({
2474
- type: X.SetDroppableDisabled,
2474
+ type: j.SetDroppableDisabled,
2475
2475
  id: r,
2476
2476
  key: a,
2477
2477
  disabled: n
@@ -2480,17 +2480,17 @@ function er(t) {
2480
2480
  active: i,
2481
2481
  rect: f,
2482
2482
  isOver: (c == null ? void 0 : c.id) === r,
2483
- node: w,
2483
+ node: b,
2484
2484
  over: c,
2485
- setNodeRef: x
2485
+ setNodeRef: M
2486
2486
  };
2487
2487
  }
2488
- function jo(t) {
2488
+ function Ho(t) {
2489
2489
  let {
2490
2490
  animation: e,
2491
2491
  children: n
2492
2492
  } = t;
2493
- const [r, o] = R(null), [a, i] = R(null), s = be(n);
2493
+ const [r, o] = R(null), [a, i] = R(null), s = we(n);
2494
2494
  return !n && !r && s && o(s), wt(() => {
2495
2495
  if (!a)
2496
2496
  return;
@@ -2502,7 +2502,7 @@ function jo(t) {
2502
2502
  Promise.resolve(e(l, a)).then(() => {
2503
2503
  o(null);
2504
2504
  });
2505
- }, [e, r, a]), B.createElement(B.Fragment, null, n, r ? Sr(r, {
2505
+ }, [e, r, a]), B.createElement(B.Fragment, null, n, r ? xr(r, {
2506
2506
  ref: i
2507
2507
  }) : null);
2508
2508
  }
@@ -2512,20 +2512,20 @@ const Xo = {
2512
2512
  scaleX: 1,
2513
2513
  scaleY: 1
2514
2514
  };
2515
- function Ho(t) {
2515
+ function qo(t) {
2516
2516
  let {
2517
2517
  children: e
2518
2518
  } = t;
2519
- return B.createElement(ce.Provider, {
2519
+ return B.createElement(ue.Provider, {
2520
2520
  value: Qn
2521
- }, B.createElement(Ce.Provider, {
2521
+ }, B.createElement(Pe.Provider, {
2522
2522
  value: Xo
2523
2523
  }, e));
2524
2524
  }
2525
- const qo = {
2525
+ const _o = {
2526
2526
  position: "fixed",
2527
2527
  touchAction: "none"
2528
- }, _o = (t) => _e(t) ? "transform 250ms ease" : void 0, Vo = /* @__PURE__ */ xr((t, e) => {
2528
+ }, Vo = (t) => Ve(t) ? "transform 250ms ease" : void 0, Go = /* @__PURE__ */ Er((t, e) => {
2529
2529
  let {
2530
2530
  as: n,
2531
2531
  activatorEvent: r,
@@ -2535,7 +2535,7 @@ const qo = {
2535
2535
  rect: s,
2536
2536
  style: c,
2537
2537
  transform: l,
2538
- transition: u = _o
2538
+ transition: u = Vo
2539
2539
  } = t;
2540
2540
  if (!s)
2541
2541
  return null;
@@ -2544,13 +2544,13 @@ const qo = {
2544
2544
  scaleX: 1,
2545
2545
  scaleY: 1
2546
2546
  }, f = {
2547
- ...qo,
2547
+ ..._o,
2548
2548
  width: s.width,
2549
2549
  height: s.height,
2550
2550
  top: s.top,
2551
2551
  left: s.left,
2552
- transform: Wt.Transform.toString(d),
2553
- transformOrigin: o && r ? $r(r, s) : void 0,
2552
+ transform: At.Transform.toString(d),
2553
+ transformOrigin: o && r ? zr(r, s) : void 0,
2554
2554
  transition: typeof u == "function" ? u(r) : u,
2555
2555
  ...c
2556
2556
  };
@@ -2559,7 +2559,7 @@ const qo = {
2559
2559
  style: f,
2560
2560
  ref: e
2561
2561
  }, a);
2562
- }), Go = (t) => (e) => {
2562
+ }), Ko = (t) => (e) => {
2563
2563
  let {
2564
2564
  active: n,
2565
2565
  dragOverlay: r
@@ -2579,7 +2579,7 @@ const qo = {
2579
2579
  n.node.style.setProperty(c, l);
2580
2580
  i != null && i.active && n.node.classList.remove(i.active);
2581
2581
  };
2582
- }, Ko = (t) => {
2582
+ }, Uo = (t) => {
2583
2583
  let {
2584
2584
  transform: {
2585
2585
  initial: e,
@@ -2587,15 +2587,15 @@ const qo = {
2587
2587
  }
2588
2588
  } = t;
2589
2589
  return [{
2590
- transform: Wt.Transform.toString(e)
2590
+ transform: At.Transform.toString(e)
2591
2591
  }, {
2592
- transform: Wt.Transform.toString(n)
2592
+ transform: At.Transform.toString(n)
2593
2593
  }];
2594
- }, Uo = {
2594
+ }, Qo = {
2595
2595
  duration: 250,
2596
2596
  easing: "ease",
2597
- keyframes: Ko,
2598
- sideEffects: /* @__PURE__ */ Go({
2597
+ keyframes: Uo,
2598
+ sideEffects: /* @__PURE__ */ Ko({
2599
2599
  styles: {
2600
2600
  active: {
2601
2601
  opacity: "0"
@@ -2603,14 +2603,14 @@ const qo = {
2603
2603
  }
2604
2604
  })
2605
2605
  };
2606
- function Qo(t) {
2606
+ function Jo(t) {
2607
2607
  let {
2608
2608
  config: e,
2609
2609
  draggableNodes: n,
2610
2610
  droppableContainers: r,
2611
2611
  measuringConfiguration: o
2612
2612
  } = t;
2613
- return Oe((a, i) => {
2613
+ return ke((a, i) => {
2614
2614
  if (e === null)
2615
2615
  return;
2616
2616
  const s = n.get(a);
@@ -2624,10 +2624,10 @@ function Qo(t) {
2624
2624
  return;
2625
2625
  const {
2626
2626
  transform: u
2627
- } = U(i).getComputedStyle(i), d = In(u);
2627
+ } = K(i).getComputedStyle(i), d = In(u);
2628
2628
  if (!d)
2629
2629
  return;
2630
- const f = typeof e == "function" ? e : Jo(e);
2630
+ const f = typeof e == "function" ? e : Zo(e);
2631
2631
  return qn(c, o.draggable.measure), f({
2632
2632
  active: {
2633
2633
  id: a,
@@ -2646,14 +2646,14 @@ function Qo(t) {
2646
2646
  });
2647
2647
  });
2648
2648
  }
2649
- function Jo(t) {
2649
+ function Zo(t) {
2650
2650
  const {
2651
2651
  duration: e,
2652
2652
  easing: n,
2653
2653
  sideEffects: r,
2654
2654
  keyframes: o
2655
2655
  } = {
2656
- ...Uo,
2656
+ ...Qo,
2657
2657
  ...t
2658
2658
  };
2659
2659
  return (a) => {
@@ -2695,21 +2695,21 @@ function Jo(t) {
2695
2695
  easing: n,
2696
2696
  fill: "forwards"
2697
2697
  });
2698
- return new Promise((p) => {
2698
+ return new Promise((w) => {
2699
2699
  v.onfinish = () => {
2700
- m == null || m(), p();
2700
+ m == null || m(), w();
2701
2701
  };
2702
2702
  });
2703
2703
  };
2704
2704
  }
2705
2705
  let wn = 0;
2706
- function Zo(t) {
2707
- return F(() => {
2706
+ function ta(t) {
2707
+ return Y(() => {
2708
2708
  if (t != null)
2709
2709
  return wn++, wn;
2710
2710
  }, [t]);
2711
2711
  }
2712
- const ta = /* @__PURE__ */ B.memo((t) => {
2712
+ const ea = /* @__PURE__ */ B.memo((t) => {
2713
2713
  let {
2714
2714
  adjustScale: e = !1,
2715
2715
  children: n,
@@ -2730,11 +2730,11 @@ const ta = /* @__PURE__ */ B.memo((t) => {
2730
2730
  droppableContainers: h,
2731
2731
  dragOverlay: m,
2732
2732
  over: v,
2733
- measuringConfiguration: p,
2733
+ measuringConfiguration: w,
2734
2734
  scrollableAncestors: D,
2735
2735
  scrollableAncestorRects: E,
2736
- windowRect: w
2737
- } = Bo(), x = At(Ce), S = Zo(d == null ? void 0 : d.id), M = Zn(i, {
2736
+ windowRect: b
2737
+ } = $o(), M = Rt(Pe), S = ta(d == null ? void 0 : d.id), x = Zn(i, {
2738
2738
  activatorEvent: u,
2739
2739
  active: d,
2740
2740
  activeNodeRect: f,
@@ -2744,46 +2744,46 @@ const ta = /* @__PURE__ */ B.memo((t) => {
2744
2744
  overlayNodeRect: m.rect,
2745
2745
  scrollableAncestors: D,
2746
2746
  scrollableAncestorRects: E,
2747
- transform: x,
2748
- windowRect: w
2749
- }), N = Qe(f), L = Qo({
2747
+ transform: M,
2748
+ windowRect: b
2749
+ }), T = Je(f), W = Jo({
2750
2750
  config: r,
2751
2751
  draggableNodes: y,
2752
2752
  droppableContainers: h,
2753
- measuringConfiguration: p
2754
- }), T = N ? m.setRef : void 0;
2755
- return B.createElement(Ho, null, B.createElement(jo, {
2756
- animation: L
2757
- }, d && S ? B.createElement(Vo, {
2753
+ measuringConfiguration: w
2754
+ }), O = T ? m.setRef : void 0;
2755
+ return B.createElement(qo, null, B.createElement(Ho, {
2756
+ animation: W
2757
+ }, d && S ? B.createElement(Go, {
2758
2758
  key: S,
2759
2759
  id: d.id,
2760
- ref: T,
2760
+ ref: O,
2761
2761
  as: s,
2762
2762
  activatorEvent: u,
2763
2763
  adjustScale: e,
2764
2764
  className: c,
2765
2765
  transition: a,
2766
- rect: N,
2766
+ rect: T,
2767
2767
  style: {
2768
2768
  zIndex: l,
2769
2769
  ...o
2770
2770
  },
2771
- transform: M
2771
+ transform: x
2772
2772
  }, n) : null));
2773
2773
  });
2774
- function ea(t, e, n) {
2774
+ function na(t, e, n) {
2775
2775
  const r = {
2776
2776
  ...t
2777
2777
  };
2778
2778
  return e.top + t.y <= n.top ? r.y = n.top - e.top : e.bottom + t.y >= n.top + n.height && (r.y = n.top + n.height - e.bottom), e.left + t.x <= n.left ? r.x = n.left - e.left : e.right + t.x >= n.left + n.width && (r.x = n.left + n.width - e.right), r;
2779
2779
  }
2780
- const na = (t) => {
2780
+ const ra = (t) => {
2781
2781
  let {
2782
2782
  transform: e,
2783
2783
  draggingNodeRect: n,
2784
2784
  windowRect: r
2785
2785
  } = t;
2786
- return !n || !r ? e : ea(e, n, r);
2786
+ return !n || !r ? e : na(e, n, r);
2787
2787
  };
2788
2788
  function A(t) {
2789
2789
  const e = Object.prototype.toString.call(t);
@@ -2792,7 +2792,7 @@ function A(t) {
2792
2792
  function st(t, e) {
2793
2793
  return t instanceof Date ? new t.constructor(e) : new Date(e);
2794
2794
  }
2795
- function Rt(t, e) {
2795
+ function Pt(t, e) {
2796
2796
  const n = A(t);
2797
2797
  return isNaN(e) ? st(t, NaN) : (e && n.setDate(n.getDate() + e), n);
2798
2798
  }
@@ -2810,32 +2810,32 @@ function nr(t, e) {
2810
2810
  r
2811
2811
  ), n);
2812
2812
  }
2813
- function ra(t, e) {
2813
+ function oa(t, e) {
2814
2814
  const n = +A(t);
2815
2815
  return st(t, n + e);
2816
2816
  }
2817
- const rr = 6048e5, oa = 864e5, or = 6e4;
2818
- let aa = {};
2819
- function le() {
2820
- return aa;
2817
+ const rr = 6048e5, aa = 864e5, or = 6e4;
2818
+ let ia = {};
2819
+ function de() {
2820
+ return ia;
2821
2821
  }
2822
2822
  function Ct(t, e) {
2823
2823
  var s, c, l, u;
2824
- const n = le(), r = (e == null ? void 0 : e.weekStartsOn) ?? ((c = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : c.weekStartsOn) ?? n.weekStartsOn ?? ((u = (l = n.locale) == null ? void 0 : l.options) == null ? void 0 : u.weekStartsOn) ?? 0, o = A(t), a = o.getDay(), i = (a < r ? 7 : 0) + a - r;
2824
+ const n = de(), r = (e == null ? void 0 : e.weekStartsOn) ?? ((c = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : c.weekStartsOn) ?? n.weekStartsOn ?? ((u = (l = n.locale) == null ? void 0 : l.options) == null ? void 0 : u.weekStartsOn) ?? 0, o = A(t), a = o.getDay(), i = (a < r ? 7 : 0) + a - r;
2825
2825
  return o.setDate(o.getDate() - i), o.setHours(0, 0, 0, 0), o;
2826
2826
  }
2827
- function Se(t) {
2827
+ function Ee(t) {
2828
2828
  return Ct(t, { weekStartsOn: 1 });
2829
2829
  }
2830
2830
  function ar(t) {
2831
2831
  const e = A(t), n = e.getFullYear(), r = st(t, 0);
2832
2832
  r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
2833
- const o = Se(r), a = st(t, 0);
2833
+ const o = Ee(r), a = st(t, 0);
2834
2834
  a.setFullYear(n, 0, 4), a.setHours(0, 0, 0, 0);
2835
- const i = Se(a);
2835
+ const i = Ee(a);
2836
2836
  return e.getTime() >= o.getTime() ? n + 1 : e.getTime() >= i.getTime() ? n : n - 1;
2837
2837
  }
2838
- function Lt(t) {
2838
+ function Wt(t) {
2839
2839
  const e = A(t);
2840
2840
  return e.setHours(0, 0, 0, 0), e;
2841
2841
  }
@@ -2853,51 +2853,51 @@ function Dn(t) {
2853
2853
  );
2854
2854
  return n.setUTCFullYear(e.getFullYear()), +t - +n;
2855
2855
  }
2856
- function ia(t, e) {
2857
- const n = Lt(t), r = Lt(e), o = +n - Dn(n), a = +r - Dn(r);
2858
- return Math.round((o - a) / oa);
2856
+ function sa(t, e) {
2857
+ const n = Wt(t), r = Wt(e), o = +n - Dn(n), a = +r - Dn(r);
2858
+ return Math.round((o - a) / aa);
2859
2859
  }
2860
- function sa(t) {
2860
+ function ca(t) {
2861
2861
  const e = ar(t), n = st(t, 0);
2862
- return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0), Se(n);
2862
+ return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0), Ee(n);
2863
2863
  }
2864
- function $t(t, e) {
2865
- return ra(t, e * or);
2864
+ function zt(t, e) {
2865
+ return oa(t, e * or);
2866
2866
  }
2867
2867
  function ir(t, e) {
2868
2868
  const n = e * 7;
2869
- return Rt(t, n);
2869
+ return Pt(t, n);
2870
2870
  }
2871
- function ca(t) {
2871
+ function la(t) {
2872
2872
  return st(t, Date.now());
2873
2873
  }
2874
- function la(t, e) {
2875
- const n = Lt(t), r = Lt(e);
2874
+ function ua(t, e) {
2875
+ const n = Wt(t), r = Wt(e);
2876
2876
  return +n == +r;
2877
2877
  }
2878
- function ua(t) {
2878
+ function da(t) {
2879
2879
  return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
2880
2880
  }
2881
- function da(t) {
2882
- if (!ua(t) && typeof t != "number")
2881
+ function fa(t) {
2882
+ if (!da(t) && typeof t != "number")
2883
2883
  return !1;
2884
2884
  const e = A(t);
2885
2885
  return !isNaN(Number(e));
2886
2886
  }
2887
- function fa(t) {
2887
+ function ha(t) {
2888
2888
  return (e) => {
2889
2889
  const n = Math.trunc, r = n(e);
2890
2890
  return r === 0 ? 0 : r;
2891
2891
  };
2892
2892
  }
2893
- function ha(t, e) {
2893
+ function ga(t, e) {
2894
2894
  return +A(t) - +A(e);
2895
2895
  }
2896
- function ze(t, e, n) {
2897
- const r = ha(t, e) / or;
2898
- return fa()(r);
2896
+ function je(t, e, n) {
2897
+ const r = ga(t, e) / or;
2898
+ return ha()(r);
2899
2899
  }
2900
- function ga(t) {
2900
+ function ma(t) {
2901
2901
  const e = A(t), n = e.getMonth();
2902
2902
  return e.setFullYear(e.getFullYear(), n + 1, 0), e.setHours(23, 59, 59, 999), e;
2903
2903
  }
@@ -2912,20 +2912,20 @@ function sr(t, e) {
2912
2912
  c.push(A(i)), i.setDate(i.getDate() + s), i.setHours(0, 0, 0, 0);
2913
2913
  return o ? c.reverse() : c;
2914
2914
  }
2915
- function ma(t) {
2915
+ function va(t) {
2916
2916
  const e = A(t);
2917
2917
  return e.setDate(1), e.setHours(0, 0, 0, 0), e;
2918
2918
  }
2919
- function va(t) {
2919
+ function ya(t) {
2920
2920
  const e = A(t), n = st(t, 0);
2921
2921
  return n.setFullYear(e.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
2922
2922
  }
2923
- function Je(t, e) {
2923
+ function Ze(t, e) {
2924
2924
  var s, c, l, u;
2925
- const n = le(), r = (e == null ? void 0 : e.weekStartsOn) ?? ((c = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : c.weekStartsOn) ?? n.weekStartsOn ?? ((u = (l = n.locale) == null ? void 0 : l.options) == null ? void 0 : u.weekStartsOn) ?? 0, o = A(t), a = o.getDay(), i = (a < r ? -7 : 0) + 6 - (a - r);
2925
+ const n = de(), r = (e == null ? void 0 : e.weekStartsOn) ?? ((c = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : c.weekStartsOn) ?? n.weekStartsOn ?? ((u = (l = n.locale) == null ? void 0 : l.options) == null ? void 0 : u.weekStartsOn) ?? 0, o = A(t), a = o.getDay(), i = (a < r ? -7 : 0) + 6 - (a - r);
2926
2926
  return o.setDate(o.getDate() + i), o.setHours(23, 59, 59, 999), o;
2927
2927
  }
2928
- const ya = {
2928
+ const ba = {
2929
2929
  lessThanXSeconds: {
2930
2930
  one: "less than a second",
2931
2931
  other: "less than {{count}} seconds"
@@ -2987,54 +2987,54 @@ const ya = {
2987
2987
  one: "almost 1 year",
2988
2988
  other: "almost {{count}} years"
2989
2989
  }
2990
- }, ba = (t, e, n) => {
2990
+ }, pa = (t, e, n) => {
2991
2991
  let r;
2992
- const o = ya[t];
2992
+ const o = ba[t];
2993
2993
  return typeof o == "string" ? r = o : e === 1 ? r = o.one : r = o.other.replace("{{count}}", e.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
2994
2994
  };
2995
- function Fe(t) {
2995
+ function Ie(t) {
2996
2996
  return (e = {}) => {
2997
2997
  const n = e.width ? String(e.width) : t.defaultWidth;
2998
2998
  return t.formats[n] || t.formats[t.defaultWidth];
2999
2999
  };
3000
3000
  }
3001
- const pa = {
3001
+ const wa = {
3002
3002
  full: "EEEE, MMMM do, y",
3003
3003
  long: "MMMM do, y",
3004
3004
  medium: "MMM d, y",
3005
3005
  short: "MM/dd/yyyy"
3006
- }, wa = {
3006
+ }, Da = {
3007
3007
  full: "h:mm:ss a zzzz",
3008
3008
  long: "h:mm:ss a z",
3009
3009
  medium: "h:mm:ss a",
3010
3010
  short: "h:mm a"
3011
- }, Da = {
3011
+ }, Ma = {
3012
3012
  full: "{{date}} 'at' {{time}}",
3013
3013
  long: "{{date}} 'at' {{time}}",
3014
3014
  medium: "{{date}}, {{time}}",
3015
3015
  short: "{{date}}, {{time}}"
3016
- }, Ma = {
3017
- date: Fe({
3018
- formats: pa,
3019
- defaultWidth: "full"
3020
- }),
3021
- time: Fe({
3016
+ }, Sa = {
3017
+ date: Ie({
3022
3018
  formats: wa,
3023
3019
  defaultWidth: "full"
3024
3020
  }),
3025
- dateTime: Fe({
3021
+ time: Ie({
3026
3022
  formats: Da,
3027
3023
  defaultWidth: "full"
3024
+ }),
3025
+ dateTime: Ie({
3026
+ formats: Ma,
3027
+ defaultWidth: "full"
3028
3028
  })
3029
- }, Sa = {
3029
+ }, xa = {
3030
3030
  lastWeek: "'last' eeee 'at' p",
3031
3031
  yesterday: "'yesterday at' p",
3032
3032
  today: "'today at' p",
3033
3033
  tomorrow: "'tomorrow at' p",
3034
3034
  nextWeek: "eeee 'at' p",
3035
3035
  other: "P"
3036
- }, xa = (t, e, n, r) => Sa[t];
3037
- function Qt(t) {
3036
+ }, Ea = (t, e, n, r) => xa[t];
3037
+ function Zt(t) {
3038
3038
  return (e, n) => {
3039
3039
  const r = n != null && n.context ? String(n.context) : "standalone";
3040
3040
  let o;
@@ -3049,15 +3049,15 @@ function Qt(t) {
3049
3049
  return o[a];
3050
3050
  };
3051
3051
  }
3052
- const Ea = {
3052
+ const Oa = {
3053
3053
  narrow: ["B", "A"],
3054
3054
  abbreviated: ["BC", "AD"],
3055
3055
  wide: ["Before Christ", "Anno Domini"]
3056
- }, Oa = {
3056
+ }, Na = {
3057
3057
  narrow: ["1", "2", "3", "4"],
3058
3058
  abbreviated: ["Q1", "Q2", "Q3", "Q4"],
3059
3059
  wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
3060
- }, Na = {
3060
+ }, ka = {
3061
3061
  narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
3062
3062
  abbreviated: [
3063
3063
  "Jan",
@@ -3087,7 +3087,7 @@ const Ea = {
3087
3087
  "November",
3088
3088
  "December"
3089
3089
  ]
3090
- }, ka = {
3090
+ }, Ca = {
3091
3091
  narrow: ["S", "M", "T", "W", "T", "F", "S"],
3092
3092
  short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
3093
3093
  abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
@@ -3100,7 +3100,7 @@ const Ea = {
3100
3100
  "Friday",
3101
3101
  "Saturday"
3102
3102
  ]
3103
- }, Ca = {
3103
+ }, Ta = {
3104
3104
  narrow: {
3105
3105
  am: "a",
3106
3106
  pm: "p",
@@ -3131,7 +3131,7 @@ const Ea = {
3131
3131
  evening: "evening",
3132
3132
  night: "night"
3133
3133
  }
3134
- }, Ta = {
3134
+ }, Pa = {
3135
3135
  narrow: {
3136
3136
  am: "a",
3137
3137
  pm: "p",
@@ -3162,7 +3162,7 @@ const Ea = {
3162
3162
  evening: "in the evening",
3163
3163
  night: "at night"
3164
3164
  }
3165
- }, Pa = (t, e) => {
3165
+ }, Ra = (t, e) => {
3166
3166
  const n = Number(t), r = n % 100;
3167
3167
  if (r > 20 || r < 10)
3168
3168
  switch (r % 10) {
@@ -3174,40 +3174,40 @@ const Ea = {
3174
3174
  return n + "rd";
3175
3175
  }
3176
3176
  return n + "th";
3177
- }, Ra = {
3178
- ordinalNumber: Pa,
3179
- era: Qt({
3180
- values: Ea,
3177
+ }, Aa = {
3178
+ ordinalNumber: Ra,
3179
+ era: Zt({
3180
+ values: Oa,
3181
3181
  defaultWidth: "wide"
3182
3182
  }),
3183
- quarter: Qt({
3184
- values: Oa,
3183
+ quarter: Zt({
3184
+ values: Na,
3185
3185
  defaultWidth: "wide",
3186
3186
  argumentCallback: (t) => t - 1
3187
3187
  }),
3188
- month: Qt({
3189
- values: Na,
3190
- defaultWidth: "wide"
3191
- }),
3192
- day: Qt({
3188
+ month: Zt({
3193
3189
  values: ka,
3194
3190
  defaultWidth: "wide"
3195
3191
  }),
3196
- dayPeriod: Qt({
3192
+ day: Zt({
3197
3193
  values: Ca,
3194
+ defaultWidth: "wide"
3195
+ }),
3196
+ dayPeriod: Zt({
3197
+ values: Ta,
3198
3198
  defaultWidth: "wide",
3199
- formattingValues: Ta,
3199
+ formattingValues: Pa,
3200
3200
  defaultFormattingWidth: "wide"
3201
3201
  })
3202
3202
  };
3203
- function Jt(t) {
3203
+ function te(t) {
3204
3204
  return (e, n = {}) => {
3205
3205
  const r = n.width, o = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], a = e.match(o);
3206
3206
  if (!a)
3207
3207
  return null;
3208
- const i = a[0], s = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], c = Array.isArray(s) ? Wa(s, (d) => d.test(i)) : (
3208
+ const i = a[0], s = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], c = Array.isArray(s) ? La(s, (d) => d.test(i)) : (
3209
3209
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
3210
- Aa(s, (d) => d.test(i))
3210
+ Wa(s, (d) => d.test(i))
3211
3211
  );
3212
3212
  let l;
3213
3213
  l = t.valueCallback ? t.valueCallback(c) : c, l = n.valueCallback ? (
@@ -3218,17 +3218,17 @@ function Jt(t) {
3218
3218
  return { value: l, rest: u };
3219
3219
  };
3220
3220
  }
3221
- function Aa(t, e) {
3221
+ function Wa(t, e) {
3222
3222
  for (const n in t)
3223
3223
  if (Object.prototype.hasOwnProperty.call(t, n) && e(t[n]))
3224
3224
  return n;
3225
3225
  }
3226
- function Wa(t, e) {
3226
+ function La(t, e) {
3227
3227
  for (let n = 0; n < t.length; n++)
3228
3228
  if (e(t[n]))
3229
3229
  return n;
3230
3230
  }
3231
- function La(t) {
3231
+ function Ya(t) {
3232
3232
  return (e, n = {}) => {
3233
3233
  const r = e.match(t.matchPattern);
3234
3234
  if (!r) return null;
@@ -3240,19 +3240,19 @@ function La(t) {
3240
3240
  return { value: i, rest: s };
3241
3241
  };
3242
3242
  }
3243
- const Ya = /^(\d+)(th|st|nd|rd)?/i, Fa = /\d+/i, Ia = {
3243
+ const Fa = /^(\d+)(th|st|nd|rd)?/i, Ia = /\d+/i, Ba = {
3244
3244
  narrow: /^(b|a)/i,
3245
3245
  abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
3246
3246
  wide: /^(before christ|before common era|anno domini|common era)/i
3247
- }, Ba = {
3248
- any: [/^b/i, /^(a|c)/i]
3249
3247
  }, $a = {
3248
+ any: [/^b/i, /^(a|c)/i]
3249
+ }, za = {
3250
3250
  narrow: /^[1234]/i,
3251
3251
  abbreviated: /^q[1234]/i,
3252
3252
  wide: /^[1234](th|st|nd|rd)? quarter/i
3253
- }, za = {
3254
- any: [/1/i, /2/i, /3/i, /4/i]
3255
3253
  }, ja = {
3254
+ any: [/1/i, /2/i, /3/i, /4/i]
3255
+ }, Ha = {
3256
3256
  narrow: /^[jfmasond]/i,
3257
3257
  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
3258
3258
  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
@@ -3285,18 +3285,18 @@ const Ya = /^(\d+)(th|st|nd|rd)?/i, Fa = /\d+/i, Ia = {
3285
3285
  /^n/i,
3286
3286
  /^d/i
3287
3287
  ]
3288
- }, Ha = {
3288
+ }, qa = {
3289
3289
  narrow: /^[smtwf]/i,
3290
3290
  short: /^(su|mo|tu|we|th|fr|sa)/i,
3291
3291
  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
3292
3292
  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
3293
- }, qa = {
3293
+ }, _a = {
3294
3294
  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
3295
3295
  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
3296
- }, _a = {
3296
+ }, Va = {
3297
3297
  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
3298
3298
  any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
3299
- }, Va = {
3299
+ }, Ga = {
3300
3300
  any: {
3301
3301
  am: /^a/i,
3302
3302
  pm: /^p/i,
@@ -3307,82 +3307,82 @@ const Ya = /^(\d+)(th|st|nd|rd)?/i, Fa = /\d+/i, Ia = {
3307
3307
  evening: /evening/i,
3308
3308
  night: /night/i
3309
3309
  }
3310
- }, Ga = {
3311
- ordinalNumber: La({
3312
- matchPattern: Ya,
3313
- parsePattern: Fa,
3310
+ }, Ka = {
3311
+ ordinalNumber: Ya({
3312
+ matchPattern: Fa,
3313
+ parsePattern: Ia,
3314
3314
  valueCallback: (t) => parseInt(t, 10)
3315
3315
  }),
3316
- era: Jt({
3317
- matchPatterns: Ia,
3316
+ era: te({
3317
+ matchPatterns: Ba,
3318
3318
  defaultMatchWidth: "wide",
3319
- parsePatterns: Ba,
3319
+ parsePatterns: $a,
3320
3320
  defaultParseWidth: "any"
3321
3321
  }),
3322
- quarter: Jt({
3323
- matchPatterns: $a,
3322
+ quarter: te({
3323
+ matchPatterns: za,
3324
3324
  defaultMatchWidth: "wide",
3325
- parsePatterns: za,
3325
+ parsePatterns: ja,
3326
3326
  defaultParseWidth: "any",
3327
3327
  valueCallback: (t) => t + 1
3328
3328
  }),
3329
- month: Jt({
3330
- matchPatterns: ja,
3329
+ month: te({
3330
+ matchPatterns: Ha,
3331
3331
  defaultMatchWidth: "wide",
3332
3332
  parsePatterns: Xa,
3333
3333
  defaultParseWidth: "any"
3334
3334
  }),
3335
- day: Jt({
3336
- matchPatterns: Ha,
3335
+ day: te({
3336
+ matchPatterns: qa,
3337
3337
  defaultMatchWidth: "wide",
3338
- parsePatterns: qa,
3338
+ parsePatterns: _a,
3339
3339
  defaultParseWidth: "any"
3340
3340
  }),
3341
- dayPeriod: Jt({
3342
- matchPatterns: _a,
3341
+ dayPeriod: te({
3342
+ matchPatterns: Va,
3343
3343
  defaultMatchWidth: "any",
3344
- parsePatterns: Va,
3344
+ parsePatterns: Ga,
3345
3345
  defaultParseWidth: "any"
3346
3346
  })
3347
- }, Ka = {
3347
+ }, Ua = {
3348
3348
  code: "en-US",
3349
- formatDistance: ba,
3350
- formatLong: Ma,
3351
- formatRelative: xa,
3352
- localize: Ra,
3353
- match: Ga,
3349
+ formatDistance: pa,
3350
+ formatLong: Sa,
3351
+ formatRelative: Ea,
3352
+ localize: Aa,
3353
+ match: Ka,
3354
3354
  options: {
3355
3355
  weekStartsOn: 0,
3356
3356
  firstWeekContainsDate: 1
3357
3357
  }
3358
3358
  };
3359
- function Ua(t) {
3359
+ function Qa(t) {
3360
3360
  const e = A(t);
3361
- return ia(e, va(e)) + 1;
3361
+ return sa(e, ya(e)) + 1;
3362
3362
  }
3363
- function Qa(t) {
3364
- const e = A(t), n = +Se(e) - +sa(e);
3363
+ function Ja(t) {
3364
+ const e = A(t), n = +Ee(e) - +ca(e);
3365
3365
  return Math.round(n / rr) + 1;
3366
3366
  }
3367
3367
  function cr(t, e) {
3368
3368
  var u, d, f, g;
3369
- const n = A(t), r = n.getFullYear(), o = le(), a = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((d = (u = e == null ? void 0 : e.locale) == null ? void 0 : u.options) == null ? void 0 : d.firstWeekContainsDate) ?? o.firstWeekContainsDate ?? ((g = (f = o.locale) == null ? void 0 : f.options) == null ? void 0 : g.firstWeekContainsDate) ?? 1, i = st(t, 0);
3369
+ const n = A(t), r = n.getFullYear(), o = de(), a = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((d = (u = e == null ? void 0 : e.locale) == null ? void 0 : u.options) == null ? void 0 : d.firstWeekContainsDate) ?? o.firstWeekContainsDate ?? ((g = (f = o.locale) == null ? void 0 : f.options) == null ? void 0 : g.firstWeekContainsDate) ?? 1, i = st(t, 0);
3370
3370
  i.setFullYear(r + 1, 0, a), i.setHours(0, 0, 0, 0);
3371
3371
  const s = Ct(i, e), c = st(t, 0);
3372
3372
  c.setFullYear(r, 0, a), c.setHours(0, 0, 0, 0);
3373
3373
  const l = Ct(c, e);
3374
3374
  return n.getTime() >= s.getTime() ? r + 1 : n.getTime() >= l.getTime() ? r : r - 1;
3375
3375
  }
3376
- function Ja(t, e) {
3376
+ function Za(t, e) {
3377
3377
  var s, c, l, u;
3378
- const n = le(), r = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((c = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : c.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((u = (l = n.locale) == null ? void 0 : l.options) == null ? void 0 : u.firstWeekContainsDate) ?? 1, o = cr(t, e), a = st(t, 0);
3378
+ const n = de(), r = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((c = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : c.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((u = (l = n.locale) == null ? void 0 : l.options) == null ? void 0 : u.firstWeekContainsDate) ?? 1, o = cr(t, e), a = st(t, 0);
3379
3379
  return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0), Ct(a, e);
3380
3380
  }
3381
- function Za(t, e) {
3382
- const n = A(t), r = +Ct(n, e) - +Ja(n, e);
3381
+ function ti(t, e) {
3382
+ const n = A(t), r = +Ct(n, e) - +Za(n, e);
3383
3383
  return Math.round(r / rr) + 1;
3384
3384
  }
3385
- function O(t, e) {
3385
+ function N(t, e) {
3386
3386
  const n = t < 0 ? "-" : "", r = Math.abs(t).toString().padStart(e, "0");
3387
3387
  return n + r;
3388
3388
  }
@@ -3390,16 +3390,16 @@ const Nt = {
3390
3390
  // Year
3391
3391
  y(t, e) {
3392
3392
  const n = t.getFullYear(), r = n > 0 ? n : 1 - n;
3393
- return O(e === "yy" ? r % 100 : r, e.length);
3393
+ return N(e === "yy" ? r % 100 : r, e.length);
3394
3394
  },
3395
3395
  // Month
3396
3396
  M(t, e) {
3397
3397
  const n = t.getMonth();
3398
- return e === "M" ? String(n + 1) : O(n + 1, 2);
3398
+ return e === "M" ? String(n + 1) : N(n + 1, 2);
3399
3399
  },
3400
3400
  // Day of the month
3401
3401
  d(t, e) {
3402
- return O(t.getDate(), e.length);
3402
+ return N(t.getDate(), e.length);
3403
3403
  },
3404
3404
  // AM or PM
3405
3405
  a(t, e) {
@@ -3419,28 +3419,28 @@ const Nt = {
3419
3419
  },
3420
3420
  // Hour [1-12]
3421
3421
  h(t, e) {
3422
- return O(t.getHours() % 12 || 12, e.length);
3422
+ return N(t.getHours() % 12 || 12, e.length);
3423
3423
  },
3424
3424
  // Hour [0-23]
3425
3425
  H(t, e) {
3426
- return O(t.getHours(), e.length);
3426
+ return N(t.getHours(), e.length);
3427
3427
  },
3428
3428
  // Minute
3429
3429
  m(t, e) {
3430
- return O(t.getMinutes(), e.length);
3430
+ return N(t.getMinutes(), e.length);
3431
3431
  },
3432
3432
  // Second
3433
3433
  s(t, e) {
3434
- return O(t.getSeconds(), e.length);
3434
+ return N(t.getSeconds(), e.length);
3435
3435
  },
3436
3436
  // Fraction of second
3437
3437
  S(t, e) {
3438
3438
  const n = e.length, r = t.getMilliseconds(), o = Math.trunc(
3439
3439
  r * Math.pow(10, n - 3)
3440
3440
  );
3441
- return O(o, e.length);
3441
+ return N(o, e.length);
3442
3442
  }
3443
- }, Bt = {
3443
+ }, $t = {
3444
3444
  midnight: "midnight",
3445
3445
  noon: "noon",
3446
3446
  morning: "morning",
@@ -3476,14 +3476,14 @@ const Nt = {
3476
3476
  const o = cr(t, r), a = o > 0 ? o : 1 - o;
3477
3477
  if (e === "YY") {
3478
3478
  const i = a % 100;
3479
- return O(i, 2);
3479
+ return N(i, 2);
3480
3480
  }
3481
- return e === "Yo" ? n.ordinalNumber(a, { unit: "year" }) : O(a, e.length);
3481
+ return e === "Yo" ? n.ordinalNumber(a, { unit: "year" }) : N(a, e.length);
3482
3482
  },
3483
3483
  // ISO week-numbering year
3484
3484
  R: function(t, e) {
3485
3485
  const n = ar(t);
3486
- return O(n, e.length);
3486
+ return N(n, e.length);
3487
3487
  },
3488
3488
  // Extended year. This is a single number designating the year of this calendar system.
3489
3489
  // The main difference between `y` and `u` localizers are B.C. years:
@@ -3496,7 +3496,7 @@ const Nt = {
3496
3496
  // while `uu` pads single digit years to 2 characters and returns other years unchanged.
3497
3497
  u: function(t, e) {
3498
3498
  const n = t.getFullYear();
3499
- return O(n, e.length);
3499
+ return N(n, e.length);
3500
3500
  },
3501
3501
  // Quarter
3502
3502
  Q: function(t, e, n) {
@@ -3505,7 +3505,7 @@ const Nt = {
3505
3505
  case "Q":
3506
3506
  return String(r);
3507
3507
  case "QQ":
3508
- return O(r, 2);
3508
+ return N(r, 2);
3509
3509
  case "Qo":
3510
3510
  return n.ordinalNumber(r, { unit: "quarter" });
3511
3511
  case "QQQ":
@@ -3533,7 +3533,7 @@ const Nt = {
3533
3533
  case "q":
3534
3534
  return String(r);
3535
3535
  case "qq":
3536
- return O(r, 2);
3536
+ return N(r, 2);
3537
3537
  case "qo":
3538
3538
  return n.ordinalNumber(r, { unit: "quarter" });
3539
3539
  case "qqq":
@@ -3585,7 +3585,7 @@ const Nt = {
3585
3585
  case "L":
3586
3586
  return String(r + 1);
3587
3587
  case "LL":
3588
- return O(r + 1, 2);
3588
+ return N(r + 1, 2);
3589
3589
  case "Lo":
3590
3590
  return n.ordinalNumber(r + 1, { unit: "month" });
3591
3591
  case "LLL":
@@ -3605,13 +3605,13 @@ const Nt = {
3605
3605
  },
3606
3606
  // Local week of year
3607
3607
  w: function(t, e, n, r) {
3608
- const o = Za(t, r);
3609
- return e === "wo" ? n.ordinalNumber(o, { unit: "week" }) : O(o, e.length);
3608
+ const o = ti(t, r);
3609
+ return e === "wo" ? n.ordinalNumber(o, { unit: "week" }) : N(o, e.length);
3610
3610
  },
3611
3611
  // ISO week of year
3612
3612
  I: function(t, e, n) {
3613
- const r = Qa(t);
3614
- return e === "Io" ? n.ordinalNumber(r, { unit: "week" }) : O(r, e.length);
3613
+ const r = Ja(t);
3614
+ return e === "Io" ? n.ordinalNumber(r, { unit: "week" }) : N(r, e.length);
3615
3615
  },
3616
3616
  // Day of the month
3617
3617
  d: function(t, e, n) {
@@ -3619,8 +3619,8 @@ const Nt = {
3619
3619
  },
3620
3620
  // Day of year
3621
3621
  D: function(t, e, n) {
3622
- const r = Ua(t);
3623
- return e === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : O(r, e.length);
3622
+ const r = Qa(t);
3623
+ return e === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : N(r, e.length);
3624
3624
  },
3625
3625
  // Day of week
3626
3626
  E: function(t, e, n) {
@@ -3658,7 +3658,7 @@ const Nt = {
3658
3658
  case "e":
3659
3659
  return String(a);
3660
3660
  case "ee":
3661
- return O(a, 2);
3661
+ return N(a, 2);
3662
3662
  case "eo":
3663
3663
  return n.ordinalNumber(a, { unit: "day" });
3664
3664
  case "eee":
@@ -3691,7 +3691,7 @@ const Nt = {
3691
3691
  case "c":
3692
3692
  return String(a);
3693
3693
  case "cc":
3694
- return O(a, e.length);
3694
+ return N(a, e.length);
3695
3695
  case "co":
3696
3696
  return n.ordinalNumber(a, { unit: "day" });
3697
3697
  case "ccc":
@@ -3724,7 +3724,7 @@ const Nt = {
3724
3724
  case "i":
3725
3725
  return String(o);
3726
3726
  case "ii":
3727
- return O(o, e.length);
3727
+ return N(o, e.length);
3728
3728
  case "io":
3729
3729
  return n.ordinalNumber(o, { unit: "day" });
3730
3730
  case "iii":
@@ -3782,7 +3782,7 @@ const Nt = {
3782
3782
  b: function(t, e, n) {
3783
3783
  const r = t.getHours();
3784
3784
  let o;
3785
- switch (r === 12 ? o = Bt.noon : r === 0 ? o = Bt.midnight : o = r / 12 >= 1 ? "pm" : "am", e) {
3785
+ switch (r === 12 ? o = $t.noon : r === 0 ? o = $t.midnight : o = r / 12 >= 1 ? "pm" : "am", e) {
3786
3786
  case "b":
3787
3787
  case "bb":
3788
3788
  return n.dayPeriod(o, {
@@ -3811,7 +3811,7 @@ const Nt = {
3811
3811
  B: function(t, e, n) {
3812
3812
  const r = t.getHours();
3813
3813
  let o;
3814
- switch (r >= 17 ? o = Bt.evening : r >= 12 ? o = Bt.afternoon : r >= 4 ? o = Bt.morning : o = Bt.night, e) {
3814
+ switch (r >= 17 ? o = $t.evening : r >= 12 ? o = $t.afternoon : r >= 4 ? o = $t.morning : o = $t.night, e) {
3815
3815
  case "B":
3816
3816
  case "BB":
3817
3817
  case "BBB":
@@ -3847,12 +3847,12 @@ const Nt = {
3847
3847
  // Hour [0-11]
3848
3848
  K: function(t, e, n) {
3849
3849
  const r = t.getHours() % 12;
3850
- return e === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : O(r, e.length);
3850
+ return e === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : N(r, e.length);
3851
3851
  },
3852
3852
  // Hour [1-24]
3853
3853
  k: function(t, e, n) {
3854
3854
  let r = t.getHours();
3855
- return r === 0 && (r = 24), e === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : O(r, e.length);
3855
+ return r === 0 && (r = 24), e === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : N(r, e.length);
3856
3856
  },
3857
3857
  // Minute
3858
3858
  m: function(t, e, n) {
@@ -3876,11 +3876,11 @@ const Nt = {
3876
3876
  return xn(r);
3877
3877
  case "XXXX":
3878
3878
  case "XX":
3879
- return Pt(r);
3879
+ return Tt(r);
3880
3880
  case "XXXXX":
3881
3881
  case "XXX":
3882
3882
  default:
3883
- return Pt(r, ":");
3883
+ return Tt(r, ":");
3884
3884
  }
3885
3885
  },
3886
3886
  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
@@ -3891,11 +3891,11 @@ const Nt = {
3891
3891
  return xn(r);
3892
3892
  case "xxxx":
3893
3893
  case "xx":
3894
- return Pt(r);
3894
+ return Tt(r);
3895
3895
  case "xxxxx":
3896
3896
  case "xxx":
3897
3897
  default:
3898
- return Pt(r, ":");
3898
+ return Tt(r, ":");
3899
3899
  }
3900
3900
  },
3901
3901
  // Timezone (GMT)
@@ -3908,7 +3908,7 @@ const Nt = {
3908
3908
  return "GMT" + Sn(r, ":");
3909
3909
  case "OOOO":
3910
3910
  default:
3911
- return "GMT" + Pt(r, ":");
3911
+ return "GMT" + Tt(r, ":");
3912
3912
  }
3913
3913
  },
3914
3914
  // Timezone (specific non-location)
@@ -3921,29 +3921,29 @@ const Nt = {
3921
3921
  return "GMT" + Sn(r, ":");
3922
3922
  case "zzzz":
3923
3923
  default:
3924
- return "GMT" + Pt(r, ":");
3924
+ return "GMT" + Tt(r, ":");
3925
3925
  }
3926
3926
  },
3927
3927
  // Seconds timestamp
3928
3928
  t: function(t, e, n) {
3929
3929
  const r = Math.trunc(t.getTime() / 1e3);
3930
- return O(r, e.length);
3930
+ return N(r, e.length);
3931
3931
  },
3932
3932
  // Milliseconds timestamp
3933
3933
  T: function(t, e, n) {
3934
3934
  const r = t.getTime();
3935
- return O(r, e.length);
3935
+ return N(r, e.length);
3936
3936
  }
3937
3937
  };
3938
3938
  function Sn(t, e = "") {
3939
3939
  const n = t > 0 ? "-" : "+", r = Math.abs(t), o = Math.trunc(r / 60), a = r % 60;
3940
- return a === 0 ? n + String(o) : n + String(o) + e + O(a, 2);
3940
+ return a === 0 ? n + String(o) : n + String(o) + e + N(a, 2);
3941
3941
  }
3942
3942
  function xn(t, e) {
3943
- return t % 60 === 0 ? (t > 0 ? "-" : "+") + O(Math.abs(t) / 60, 2) : Pt(t, e);
3943
+ return t % 60 === 0 ? (t > 0 ? "-" : "+") + N(Math.abs(t) / 60, 2) : Tt(t, e);
3944
3944
  }
3945
- function Pt(t, e = "") {
3946
- const n = t > 0 ? "-" : "+", r = Math.abs(t), o = O(Math.trunc(r / 60), 2), a = O(r % 60, 2);
3945
+ function Tt(t, e = "") {
3946
+ const n = t > 0 ? "-" : "+", r = Math.abs(t), o = N(Math.trunc(r / 60), 2), a = N(r % 60, 2);
3947
3947
  return n + o + e + a;
3948
3948
  }
3949
3949
  const En = (t, e) => {
@@ -3970,7 +3970,7 @@ const En = (t, e) => {
3970
3970
  default:
3971
3971
  return e.time({ width: "full" });
3972
3972
  }
3973
- }, ti = (t, e) => {
3973
+ }, ei = (t, e) => {
3974
3974
  const n = t.match(/(P+)(p+)?/) || [], r = n[1], o = n[2];
3975
3975
  if (!o)
3976
3976
  return En(t, e);
@@ -3991,46 +3991,46 @@ const En = (t, e) => {
3991
3991
  break;
3992
3992
  }
3993
3993
  return a.replace("{{date}}", En(r, e)).replace("{{time}}", lr(o, e));
3994
- }, ei = {
3994
+ }, ni = {
3995
3995
  p: lr,
3996
- P: ti
3997
- }, ni = /^D+$/, ri = /^Y+$/, oi = ["D", "DD", "YY", "YYYY"];
3998
- function ai(t) {
3999
- return ni.test(t);
4000
- }
3996
+ P: ei
3997
+ }, ri = /^D+$/, oi = /^Y+$/, ai = ["D", "DD", "YY", "YYYY"];
4001
3998
  function ii(t) {
4002
3999
  return ri.test(t);
4003
4000
  }
4004
- function si(t, e, n) {
4005
- const r = ci(t, e, n);
4006
- if (console.warn(r), oi.includes(t)) throw new RangeError(r);
4001
+ function si(t) {
4002
+ return oi.test(t);
4007
4003
  }
4008
4004
  function ci(t, e, n) {
4005
+ const r = li(t, e, n);
4006
+ if (console.warn(r), ai.includes(t)) throw new RangeError(r);
4007
+ }
4008
+ function li(t, e, n) {
4009
4009
  const r = t[0] === "Y" ? "years" : "days of the month";
4010
4010
  return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
4011
4011
  }
4012
- const li = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, ui = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, di = /^'([^]*?)'?$/, fi = /''/g, hi = /[a-zA-Z]/;
4012
+ const ui = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, di = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, fi = /^'([^]*?)'?$/, hi = /''/g, gi = /[a-zA-Z]/;
4013
4013
  function z(t, e, n) {
4014
4014
  var u, d, f, g;
4015
- const r = le(), o = r.locale ?? Ka, a = r.firstWeekContainsDate ?? ((d = (u = r.locale) == null ? void 0 : u.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, i = r.weekStartsOn ?? ((g = (f = r.locale) == null ? void 0 : f.options) == null ? void 0 : g.weekStartsOn) ?? 0, s = A(t);
4016
- if (!da(s))
4015
+ const r = de(), o = r.locale ?? Ua, a = r.firstWeekContainsDate ?? ((d = (u = r.locale) == null ? void 0 : u.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, i = r.weekStartsOn ?? ((g = (f = r.locale) == null ? void 0 : f.options) == null ? void 0 : g.weekStartsOn) ?? 0, s = A(t);
4016
+ if (!fa(s))
4017
4017
  throw new RangeError("Invalid time value");
4018
- let c = e.match(ui).map((y) => {
4018
+ let c = e.match(di).map((y) => {
4019
4019
  const h = y[0];
4020
4020
  if (h === "p" || h === "P") {
4021
- const m = ei[h];
4021
+ const m = ni[h];
4022
4022
  return m(y, o.formatLong);
4023
4023
  }
4024
4024
  return y;
4025
- }).join("").match(li).map((y) => {
4025
+ }).join("").match(ui).map((y) => {
4026
4026
  if (y === "''")
4027
4027
  return { isToken: !1, value: "'" };
4028
4028
  const h = y[0];
4029
4029
  if (h === "'")
4030
- return { isToken: !1, value: gi(y) };
4030
+ return { isToken: !1, value: mi(y) };
4031
4031
  if (Mn[h])
4032
4032
  return { isToken: !0, value: y };
4033
- if (h.match(hi))
4033
+ if (h.match(gi))
4034
4034
  throw new RangeError(
4035
4035
  "Format string contains an unescaped latin alphabet character `" + h + "`"
4036
4036
  );
@@ -4045,51 +4045,51 @@ function z(t, e, n) {
4045
4045
  return c.map((y) => {
4046
4046
  if (!y.isToken) return y.value;
4047
4047
  const h = y.value;
4048
- (ii(h) || ai(h)) && si(h, e, String(t));
4048
+ (si(h) || ii(h)) && ci(h, e, String(t));
4049
4049
  const m = Mn[h[0]];
4050
4050
  return m(s, h, o.localize, l);
4051
4051
  }).join("");
4052
4052
  }
4053
- function gi(t) {
4054
- const e = t.match(di);
4055
- return e ? e[1].replace(fi, "'") : t;
4056
- }
4057
4053
  function mi(t) {
4058
- return A(t).getHours();
4054
+ const e = t.match(fi);
4055
+ return e ? e[1].replace(hi, "'") : t;
4059
4056
  }
4060
4057
  function vi(t) {
4058
+ return A(t).getHours();
4059
+ }
4060
+ function yi(t) {
4061
4061
  return A(t).getMinutes();
4062
4062
  }
4063
- function yi(t, e) {
4063
+ function bi(t, e) {
4064
4064
  const n = A(t), r = A(e);
4065
4065
  return n.getFullYear() === r.getFullYear() && n.getMonth() === r.getMonth();
4066
4066
  }
4067
- function je(t) {
4068
- return la(t, ca(t));
4069
- }
4070
- function bi(t, e) {
4071
- return Rt(t, -1);
4067
+ function He(t) {
4068
+ return ua(t, la(t));
4072
4069
  }
4073
4070
  function pi(t, e) {
4074
- return nr(t, -1);
4071
+ return Pt(t, -1);
4075
4072
  }
4076
4073
  function wi(t, e) {
4074
+ return nr(t, -1);
4075
+ }
4076
+ function Di(t, e) {
4077
4077
  return ir(t, -1);
4078
4078
  }
4079
- function Di(t) {
4080
- const e = Ct(t, { weekStartsOn: 0 }), n = Je(t, { weekStartsOn: 0 });
4079
+ function Mi(t) {
4080
+ const e = Ct(t, { weekStartsOn: 0 }), n = Ze(t, { weekStartsOn: 0 });
4081
4081
  return sr({ start: e, end: n });
4082
4082
  }
4083
- function Mi(t) {
4084
- const e = Ct(ma(t), { weekStartsOn: 0 }), n = Je(ga(t), { weekStartsOn: 0 });
4083
+ function Si(t) {
4084
+ const e = Ct(va(t), { weekStartsOn: 0 }), n = Ze(ma(t), { weekStartsOn: 0 });
4085
4085
  return sr({ start: e, end: n });
4086
4086
  }
4087
- function Si(t, e) {
4087
+ function xi(t, e) {
4088
4088
  switch (e) {
4089
4089
  case "day":
4090
4090
  return z(t, "EEEE, MMMM d, yyyy");
4091
4091
  case "week": {
4092
- const n = Ct(t, { weekStartsOn: 0 }), r = Je(t, { weekStartsOn: 0 });
4092
+ const n = Ct(t, { weekStartsOn: 0 }), r = Ze(t, { weekStartsOn: 0 });
4093
4093
  return z(n, "MMMM yyyy") === z(r, "MMMM yyyy") ? `${z(n, "MMMM d")} – ${z(r, "d, yyyy")}` : `${z(n, "MMM d")} – ${z(r, "MMM d, yyyy")}`;
4094
4094
  }
4095
4095
  case "month":
@@ -4099,11 +4099,11 @@ function Si(t, e) {
4099
4099
  function On(t) {
4100
4100
  return t === 0 ? "12 AM" : t < 12 ? `${t} AM` : t === 12 ? "12 PM" : `${t - 12} PM`;
4101
4101
  }
4102
- function me(t) {
4102
+ function ye(t) {
4103
4103
  return z(t, "h:mm a");
4104
4104
  }
4105
- function xi(t, e) {
4106
- const n = /* @__PURE__ */ new Date(), r = (e - t) * 60, o = mi(n) * 60 + vi(n) - t * 60;
4105
+ function Ei(t, e) {
4106
+ const n = /* @__PURE__ */ new Date(), r = (e - t) * 60, o = vi(n) * 60 + yi(n) - t * 60;
4107
4107
  return Math.max(0, Math.min(1, o / r));
4108
4108
  }
4109
4109
  function Xe(t, e = 15) {
@@ -4112,65 +4112,47 @@ function Xe(t, e = 15) {
4112
4112
  function Nn(t, e, n) {
4113
4113
  switch (e) {
4114
4114
  case "day":
4115
- return n === 1 ? Rt(t, 1) : bi(t);
4115
+ return n === 1 ? Pt(t, 1) : pi(t);
4116
4116
  case "week":
4117
- return n === 1 ? ir(t, 1) : wi(t);
4117
+ return n === 1 ? ir(t, 1) : Di(t);
4118
4118
  case "month":
4119
- return n === 1 ? nr(t, 1) : pi(t);
4119
+ return n === 1 ? nr(t, 1) : wi(t);
4120
4120
  }
4121
4121
  }
4122
- function Ei(t, e, n, r) {
4123
- const o = t / n * 60, a = r * 60 + o, i = Math.floor(a / 60), s = Math.floor(a % 60), c = Lt(e);
4122
+ function Oi(t, e, n, r) {
4123
+ const o = t / n * 60, a = r * 60 + o, i = Math.floor(a / 60), s = Math.floor(a % 60), c = Wt(e);
4124
4124
  return c.setHours(i, s, 0, 0), c;
4125
4125
  }
4126
- function Oi(t, e) {
4126
+ function Ni(t, e) {
4127
4127
  return (e - t) * 60;
4128
4128
  }
4129
4129
  function kn(t, e) {
4130
- return ze(t, Lt(t)) - e * 60;
4130
+ return je(t, Wt(t)) - e * 60;
4131
4131
  }
4132
- const Ni = [
4132
+ const ki = [
4133
4133
  { key: "day", label: "Day", labelShort: "Day" },
4134
4134
  { key: "week", label: "Week", labelShort: "Week" },
4135
4135
  { key: "month", label: "Month", labelShort: "Mo" }
4136
- ], ki = ({
4136
+ ], Ci = ({
4137
4137
  view: t,
4138
4138
  date: e,
4139
4139
  isMobile: n = !1,
4140
4140
  onViewChange: r,
4141
4141
  onDateChange: o
4142
- }) => /* @__PURE__ */ W(
4142
+ }) => /* @__PURE__ */ L(
4143
4143
  "header",
4144
4144
  {
4145
4145
  className: `rss-header${n ? " rss-header--mobile" : ""}`,
4146
4146
  role: "toolbar",
4147
4147
  "aria-label": "Calendar navigation",
4148
4148
  children: [
4149
- /* @__PURE__ */ W("div", { className: "rss-header-nav", children: [
4150
- /* @__PURE__ */ b(
4151
- "button",
4152
- {
4153
- className: "rss-btn rss-btn--icon",
4154
- onClick: () => o(Nn(e, t, -1)),
4155
- "aria-label": "Previous",
4156
- title: "Previous",
4157
- children: "‹"
4158
- }
4159
- ),
4160
- /* @__PURE__ */ b("button", { className: "rss-btn", onClick: () => o(/* @__PURE__ */ new Date()), "aria-label": "Go to today", children: "Today" }),
4161
- /* @__PURE__ */ b(
4162
- "button",
4163
- {
4164
- className: "rss-btn rss-btn--icon",
4165
- onClick: () => o(Nn(e, t, 1)),
4166
- "aria-label": "Next",
4167
- title: "Next",
4168
- children: "›"
4169
- }
4170
- )
4149
+ /* @__PURE__ */ L("div", { className: "rss-header-nav", children: [
4150
+ /* @__PURE__ */ p("button", { className: "rss-btn rss-btn--icon", onClick: () => o(Nn(e, t, -1)), "aria-label": "Previous", title: "Previous", children: "‹" }),
4151
+ /* @__PURE__ */ p("button", { className: "rss-btn", onClick: () => o(/* @__PURE__ */ new Date()), "aria-label": "Go to today", children: "Today" }),
4152
+ /* @__PURE__ */ p("button", { className: "rss-btn rss-btn--icon", onClick: () => o(Nn(e, t, 1)), "aria-label": "Next", title: "Next", children: "›" })
4171
4153
  ] }),
4172
- /* @__PURE__ */ b("h2", { className: "rss-header-title", "aria-live": "polite", children: Si(e, t) }),
4173
- /* @__PURE__ */ b("div", { className: "rss-view-switcher", role: "group", "aria-label": "View", children: Ni.map(({ key: c, label: l, labelShort: u }) => /* @__PURE__ */ b(
4154
+ /* @__PURE__ */ p("h2", { className: "rss-header-title", "aria-live": "polite", children: xi(e, t) }),
4155
+ /* @__PURE__ */ p("div", { className: "rss-view-switcher", role: "group", "aria-label": "View", children: ki.map(({ key: c, label: l, labelShort: u }) => /* @__PURE__ */ p(
4174
4156
  "button",
4175
4157
  {
4176
4158
  className: `rss-view-btn ${t === c ? "rss-view-btn--active" : ""}`,
@@ -4185,20 +4167,20 @@ const Ni = [
4185
4167
  );
4186
4168
  function ur(t, e) {
4187
4169
  return t.filter((n) => {
4188
- const r = Lt(e), o = new Date(r.getTime() + 24 * 60 * 60 * 1e3);
4170
+ const r = Wt(e), o = new Date(r.getTime() + 24 * 60 * 60 * 1e3);
4189
4171
  return n.start < o && n.end > r;
4190
4172
  });
4191
4173
  }
4192
- function Ci(t, e, n) {
4174
+ function Ti(t, e, n) {
4193
4175
  if (t.length === 0) return [];
4194
- const r = Oi(e, n), o = [...t].sort((s, c) => {
4176
+ const r = Ni(e, n), o = [...t].sort((s, c) => {
4195
4177
  const l = s.start.getTime() - c.start.getTime();
4196
- return l !== 0 ? l : ze(c.end, c.start) - ze(s.end, s.start);
4178
+ return l !== 0 ? l : je(c.end, c.start) - je(s.end, s.start);
4197
4179
  }), a = [];
4198
4180
  for (const s of o) {
4199
4181
  let c = !1;
4200
4182
  for (const l of a)
4201
- if (l.some((d) => Ti(d, s))) {
4183
+ if (l.some((d) => Pi(d, s))) {
4202
4184
  l.push(s), c = !0;
4203
4185
  break;
4204
4186
  }
@@ -4234,13 +4216,13 @@ function Ci(t, e, n) {
4234
4216
  }
4235
4217
  return i;
4236
4218
  }
4237
- function Ti(t, e) {
4219
+ function Pi(t, e) {
4238
4220
  return t.start < e.end && t.end > e.start;
4239
4221
  }
4240
- function Gi() {
4222
+ function Ki() {
4241
4223
  return `evt-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`;
4242
4224
  }
4243
- const xe = [
4225
+ const Oe = [
4244
4226
  "#3b82f6",
4245
4227
  // blue
4246
4228
  "#10b981",
@@ -4258,11 +4240,11 @@ const xe = [
4258
4240
  "#84cc16"
4259
4241
  // lime
4260
4242
  ];
4261
- function Ze(t) {
4243
+ function tn(t) {
4262
4244
  let e = 0;
4263
4245
  for (let n = 0; n < t.length; n++)
4264
4246
  e = e * 31 + t.charCodeAt(n) | 0;
4265
- return xe[Math.abs(e) % xe.length];
4247
+ return Oe[Math.abs(e) % Oe.length];
4266
4248
  }
4267
4249
  function Cn(t) {
4268
4250
  return z(t, "yyyy-MM-dd'T'HH:mm");
@@ -4270,7 +4252,7 @@ function Cn(t) {
4270
4252
  function Tn(t) {
4271
4253
  return new Date(t);
4272
4254
  }
4273
- const Pi = ({
4255
+ const Ri = ({
4274
4256
  event: t,
4275
4257
  initialStart: e,
4276
4258
  initialEnd: n,
@@ -4282,17 +4264,17 @@ const Pi = ({
4282
4264
  Cn((t == null ? void 0 : t.start) ?? e ?? /* @__PURE__ */ new Date())
4283
4265
  ), [f, g] = R(
4284
4266
  Cn((t == null ? void 0 : t.end) ?? n ?? new Date(Date.now() + 60 * 60 * 1e3))
4285
- ), [y, h] = R((t == null ? void 0 : t.color) ?? xe[0]);
4267
+ ), [y, h] = R((t == null ? void 0 : t.color) ?? Oe[0]);
4286
4268
  return P(() => {
4287
4269
  var v;
4288
4270
  (v = s.current) == null || v.focus();
4289
4271
  }, []), P(() => {
4290
- const v = (p) => {
4291
- p.key === "Escape" && a();
4272
+ const v = (w) => {
4273
+ w.key === "Escape" && a();
4292
4274
  };
4293
4275
  return window.addEventListener("keydown", v), () => window.removeEventListener("keydown", v);
4294
4276
  }, [a]), // Backdrop — click outside to close
4295
- /* @__PURE__ */ b(
4277
+ /* @__PURE__ */ p(
4296
4278
  "div",
4297
4279
  {
4298
4280
  className: "rss-modal-backdrop",
@@ -4302,9 +4284,9 @@ const Pi = ({
4302
4284
  onMouseDown: (v) => {
4303
4285
  v.target === v.currentTarget && a();
4304
4286
  },
4305
- children: /* @__PURE__ */ W("div", { className: "rss-modal", children: [
4306
- /* @__PURE__ */ b("h3", { className: "rss-modal-title", children: i ? "Edit Event" : "New Event" }),
4307
- /* @__PURE__ */ W("form", { onSubmit: (v) => {
4287
+ children: /* @__PURE__ */ L("div", { className: "rss-modal", children: [
4288
+ /* @__PURE__ */ p("h3", { className: "rss-modal-title", children: i ? "Edit Event" : "New Event" }),
4289
+ /* @__PURE__ */ L("form", { onSubmit: (v) => {
4308
4290
  v.preventDefault(), c.trim() && r({
4309
4291
  title: c.trim(),
4310
4292
  start: Tn(u),
@@ -4312,9 +4294,9 @@ const Pi = ({
4312
4294
  color: y
4313
4295
  });
4314
4296
  }, style: { display: "contents" }, children: [
4315
- /* @__PURE__ */ W("div", { className: "rss-form-group", children: [
4316
- /* @__PURE__ */ b("label", { className: "rss-label", htmlFor: "rss-event-title", children: "Title" }),
4317
- /* @__PURE__ */ b(
4297
+ /* @__PURE__ */ L("div", { className: "rss-form-group", children: [
4298
+ /* @__PURE__ */ p("label", { className: "rss-label", htmlFor: "rss-event-title", children: "Title" }),
4299
+ /* @__PURE__ */ p(
4318
4300
  "input",
4319
4301
  {
4320
4302
  id: "rss-event-title",
@@ -4329,10 +4311,10 @@ const Pi = ({
4329
4311
  }
4330
4312
  )
4331
4313
  ] }),
4332
- /* @__PURE__ */ W("div", { className: "rss-form-row", children: [
4333
- /* @__PURE__ */ W("div", { className: "rss-form-group", children: [
4334
- /* @__PURE__ */ b("label", { className: "rss-label", htmlFor: "rss-event-start", children: "Start" }),
4335
- /* @__PURE__ */ b(
4314
+ /* @__PURE__ */ L("div", { className: "rss-form-row", children: [
4315
+ /* @__PURE__ */ L("div", { className: "rss-form-group", children: [
4316
+ /* @__PURE__ */ p("label", { className: "rss-label", htmlFor: "rss-event-start", children: "Start" }),
4317
+ /* @__PURE__ */ p(
4336
4318
  "input",
4337
4319
  {
4338
4320
  id: "rss-event-start",
@@ -4344,9 +4326,9 @@ const Pi = ({
4344
4326
  }
4345
4327
  )
4346
4328
  ] }),
4347
- /* @__PURE__ */ W("div", { className: "rss-form-group", children: [
4348
- /* @__PURE__ */ b("label", { className: "rss-label", htmlFor: "rss-event-end", children: "End" }),
4349
- /* @__PURE__ */ b(
4329
+ /* @__PURE__ */ L("div", { className: "rss-form-group", children: [
4330
+ /* @__PURE__ */ p("label", { className: "rss-label", htmlFor: "rss-event-end", children: "End" }),
4331
+ /* @__PURE__ */ p(
4350
4332
  "input",
4351
4333
  {
4352
4334
  id: "rss-event-end",
@@ -4360,9 +4342,9 @@ const Pi = ({
4360
4342
  )
4361
4343
  ] })
4362
4344
  ] }),
4363
- /* @__PURE__ */ W("div", { className: "rss-form-group", children: [
4364
- /* @__PURE__ */ b("span", { className: "rss-label", children: "Color" }),
4365
- /* @__PURE__ */ b("div", { className: "rss-color-row", role: "radiogroup", "aria-label": "Event color", children: xe.map((v) => /* @__PURE__ */ b(
4345
+ /* @__PURE__ */ L("div", { className: "rss-form-group", children: [
4346
+ /* @__PURE__ */ p("span", { className: "rss-label", children: "Color" }),
4347
+ /* @__PURE__ */ p("div", { className: "rss-color-row", role: "radiogroup", "aria-label": "Event color", children: Oe.map((v) => /* @__PURE__ */ p(
4366
4348
  "button",
4367
4349
  {
4368
4350
  type: "button",
@@ -4376,8 +4358,8 @@ const Pi = ({
4376
4358
  v
4377
4359
  )) })
4378
4360
  ] }),
4379
- /* @__PURE__ */ W("div", { className: "rss-modal-actions", children: [
4380
- i && o && /* @__PURE__ */ b("div", { className: "rss-modal-actions-left", children: /* @__PURE__ */ b(
4361
+ /* @__PURE__ */ L("div", { className: "rss-modal-actions", children: [
4362
+ i && o && /* @__PURE__ */ p("div", { className: "rss-modal-actions-left", children: /* @__PURE__ */ p(
4381
4363
  "button",
4382
4364
  {
4383
4365
  type: "button",
@@ -4386,14 +4368,14 @@ const Pi = ({
4386
4368
  children: "Delete"
4387
4369
  }
4388
4370
  ) }),
4389
- /* @__PURE__ */ b("button", { type: "button", className: "rss-btn", onClick: a, children: "Cancel" }),
4390
- /* @__PURE__ */ b("button", { type: "submit", className: "rss-btn rss-btn--primary", children: i ? "Save" : "Create" })
4371
+ /* @__PURE__ */ p("button", { type: "button", className: "rss-btn", onClick: a, children: "Cancel" }),
4372
+ /* @__PURE__ */ p("button", { type: "submit", className: "rss-btn rss-btn--primary", children: i ? "Save" : "Create" })
4391
4373
  ] })
4392
4374
  ] })
4393
4375
  ] })
4394
4376
  }
4395
4377
  );
4396
- }, Ri = ({
4378
+ }, Ai = ({
4397
4379
  event: t,
4398
4380
  hourHeight: e,
4399
4381
  gridHeight: n,
@@ -4401,34 +4383,34 @@ const Pi = ({
4401
4383
  onResizeEnd: o,
4402
4384
  isOverlay: a = !1
4403
4385
  }) => {
4404
- const i = t.color ?? Ze(t.id), s = { type: "event", event: t }, { attributes: c, listeners: l, setNodeRef: u, transform: d, isDragging: f } = tr({
4386
+ const i = t.color ?? tn(t.id), s = { type: "event", event: t }, { attributes: c, listeners: l, setNodeRef: u, transform: d, isDragging: f } = tr({
4405
4387
  id: t.id,
4406
4388
  data: s,
4407
4389
  // Disable dragging while the user is resizing (handled separately)
4408
4390
  disabled: a
4409
- }), [g, y] = R(null), h = C(!1), m = g ?? t.end, v = I(
4410
- (w) => {
4391
+ }), [g, y] = R(null), h = C(!1), m = g ?? t.end, v = F(
4392
+ (b) => {
4411
4393
  if (f) return;
4412
- w.preventDefault(), w.stopPropagation();
4413
- const x = w.currentTarget;
4414
- x.setPointerCapture(w.pointerId);
4415
- const S = w.clientY, M = t.end;
4394
+ b.preventDefault(), b.stopPropagation();
4395
+ const M = b.currentTarget;
4396
+ M.setPointerCapture(b.pointerId);
4397
+ const S = b.clientY, x = t.end;
4416
4398
  h.current = !0;
4417
- const N = (T) => {
4418
- const G = T.clientY - S, K = Xe(G / e * 60), j = $t(M, K), ct = $t(t.start, 15);
4419
- y(j > ct ? j : ct);
4420
- }, L = (T) => {
4421
- const G = T.clientY - S, K = Xe(G / e * 60), j = $t(M, K), ct = $t(t.start, 15), dt = j > ct ? j : ct;
4422
- o(t.id, dt), y(null), h.current = !1, x.removeEventListener("pointermove", N), x.removeEventListener("pointerup", L);
4399
+ const T = (O) => {
4400
+ const q = O.clientY - S, G = Xe(q / e * 60), _ = zt(x, G), dt = zt(t.start, 15);
4401
+ y(_ > dt ? _ : dt);
4402
+ }, W = (O) => {
4403
+ const q = O.clientY - S, G = Xe(q / e * 60), _ = zt(x, G), dt = zt(t.start, 15), Lt = _ > dt ? _ : dt;
4404
+ o(t.id, Lt), y(null), h.current = !1, M.removeEventListener("pointermove", T), M.removeEventListener("pointerup", W);
4423
4405
  };
4424
- x.addEventListener("pointermove", N), x.addEventListener("pointerup", L);
4406
+ M.addEventListener("pointermove", T), M.addEventListener("pointerup", W);
4425
4407
  },
4426
4408
  [t, e, f, o]
4427
- ), p = n / e * 60;
4409
+ ), w = n / e * 60;
4428
4410
  let D = t.heightPercent;
4429
4411
  if (g) {
4430
- const w = t.start.getHours() * 60 + t.start.getMinutes(), x = m.getHours() * 60 + m.getMinutes();
4431
- D = Math.max(15, x - w) / p * 100;
4412
+ const b = t.start.getHours() * 60 + t.start.getMinutes(), M = m.getHours() * 60 + m.getMinutes();
4413
+ D = Math.max(15, M - b) / w * 100;
4432
4414
  }
4433
4415
  const E = {
4434
4416
  top: `${t.topPercent}%`,
@@ -4437,11 +4419,11 @@ const Pi = ({
4437
4419
  width: `calc(${t.widthPercent}% - 4px)`,
4438
4420
  background: i,
4439
4421
  // Apply dnd-kit's drag transform (identity when not dragging)
4440
- transform: Wt.Translate.toString(d),
4422
+ transform: At.Translate.toString(d),
4441
4423
  // Overlap: events at higher column indices sit slightly higher
4442
4424
  zIndex: a ? 100 : f ? 50 : 1
4443
4425
  };
4444
- return /* @__PURE__ */ W(
4426
+ return /* @__PURE__ */ L(
4445
4427
  "div",
4446
4428
  {
4447
4429
  ref: u,
@@ -4456,35 +4438,33 @@ const Pi = ({
4456
4438
  ...c,
4457
4439
  role: "button",
4458
4440
  tabIndex: 0,
4459
- "aria-label": `${t.title}, ${me(t.start)} to ${me(m)}`,
4460
- onClick: (w) => {
4461
- f || (w.stopPropagation(), r(t));
4441
+ "aria-label": `${t.title}, ${ye(t.start)} to ${ye(m)}`,
4442
+ onClick: (b) => {
4443
+ f || (b.stopPropagation(), r(t));
4462
4444
  },
4463
- onKeyDown: (w) => {
4464
- (w.key === "Enter" || w.key === " ") && (w.preventDefault(), r(t)), (w.key === "Delete" || w.key === "Backspace") && r(t);
4445
+ onKeyDown: (b) => {
4446
+ (b.key === "Enter" || b.key === " ") && (b.preventDefault(), r(t)), (b.key === "Delete" || b.key === "Backspace") && r(t);
4465
4447
  },
4466
4448
  children: [
4467
- /* @__PURE__ */ b("div", { className: "rss-event-title", children: t.title }),
4468
- /* @__PURE__ */ W("div", { className: "rss-event-time", children: [
4469
- me(t.start),
4449
+ /* @__PURE__ */ p("div", { className: "rss-event-title", children: t.title }),
4450
+ /* @__PURE__ */ L("div", { className: "rss-event-time", children: [
4451
+ ye(t.start),
4470
4452
  " – ",
4471
- me(m)
4453
+ ye(m)
4472
4454
  ] }),
4473
- !a && /* @__PURE__ */ b(
4455
+ !a && /* @__PURE__ */ p(
4474
4456
  "div",
4475
4457
  {
4476
4458
  className: "rss-event-resize-handle",
4477
4459
  "aria-hidden": "true",
4478
4460
  onPointerDown: v,
4479
- onClick: (w) => w.stopPropagation()
4461
+ onClick: (b) => b.stopPropagation()
4480
4462
  }
4481
4463
  )
4482
4464
  ]
4483
4465
  }
4484
4466
  );
4485
- };
4486
- Array.from({ length: 24 }, (t, e) => e);
4487
- const Ai = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dr = ({
4467
+ }, Wi = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dr = ({
4488
4468
  columns: t,
4489
4469
  events: e,
4490
4470
  hourHeight: n,
@@ -4501,27 +4481,24 @@ const Ai = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dr = ({
4501
4481
  ), u = l.length * n, d = C(null);
4502
4482
  P(() => {
4503
4483
  if (!d.current || !a) return;
4504
- const m = d.current, v = () => {
4505
- const D = t.length || 1;
4506
- a(m.offsetWidth / D);
4507
- };
4484
+ const m = d.current, v = () => a(m.offsetWidth / (t.length || 1));
4508
4485
  v();
4509
- const p = new ResizeObserver(v);
4510
- return p.observe(m), () => p.disconnect();
4486
+ const w = new ResizeObserver(v);
4487
+ return w.observe(m), () => w.disconnect();
4511
4488
  }, [t.length, a]);
4512
- const g = xi(r, o) * u, { setNodeRef: y } = er({ id: "timegrid-body" }), h = (m, v) => {
4489
+ const g = Ei(r, o) * u, { setNodeRef: y } = er({ id: "timegrid-body" }), h = (m, v) => {
4513
4490
  if (m.target.closest(".rss-event")) return;
4514
- const D = m.currentTarget.getBoundingClientRect(), E = m.clientY - D.top, w = Ei(E, v.date, n, r), x = new Date(w.getTime() + 60 * 60 * 1e3);
4515
- c(w, x);
4491
+ const D = m.currentTarget.getBoundingClientRect(), E = m.clientY - D.top, b = Oi(E, v.date, n, r), M = new Date(b.getTime() + 60 * 60 * 1e3);
4492
+ c(b, M);
4516
4493
  };
4517
- return /* @__PURE__ */ b("div", { className: "rss-timegrid", children: /* @__PURE__ */ W("div", { className: "rss-timegrid-scroll", children: [
4518
- /* @__PURE__ */ W("div", { className: "rss-timegrid-allday", "aria-hidden": "true", children: [
4519
- /* @__PURE__ */ b("div", { className: "rss-timegrid-allday-gutter" }),
4520
- /* @__PURE__ */ b("div", { className: "rss-day-headers", children: t.map((m) => {
4521
- const v = je(m.date);
4522
- return /* @__PURE__ */ W("div", { className: "rss-day-header", children: [
4523
- /* @__PURE__ */ b("span", { className: "rss-day-header-weekday", children: Ai[m.date.getDay()] }),
4524
- /* @__PURE__ */ b(
4494
+ return /* @__PURE__ */ p("div", { className: "rss-timegrid", children: /* @__PURE__ */ L("div", { className: "rss-timegrid-scroll", children: [
4495
+ /* @__PURE__ */ L("div", { className: "rss-timegrid-allday", "aria-hidden": "true", children: [
4496
+ /* @__PURE__ */ p("div", { className: "rss-timegrid-allday-gutter" }),
4497
+ /* @__PURE__ */ p("div", { className: "rss-day-headers", children: t.map((m) => {
4498
+ const v = He(m.date);
4499
+ return /* @__PURE__ */ L("div", { className: "rss-day-header", children: [
4500
+ /* @__PURE__ */ p("span", { className: "rss-day-header-weekday", children: Wi[m.date.getDay()] }),
4501
+ /* @__PURE__ */ p(
4525
4502
  "span",
4526
4503
  {
4527
4504
  className: `rss-day-header-num ${v ? "rss-day-header-num--today" : ""}`,
@@ -4531,14 +4508,14 @@ const Ai = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dr = ({
4531
4508
  ] }, m.key);
4532
4509
  }) })
4533
4510
  ] }),
4534
- /* @__PURE__ */ W(
4511
+ /* @__PURE__ */ L(
4535
4512
  "div",
4536
4513
  {
4537
4514
  className: "rss-timegrid-body",
4538
4515
  ref: y,
4539
4516
  style: { height: u },
4540
4517
  children: [
4541
- /* @__PURE__ */ b("div", { className: "rss-time-gutter", "aria-hidden": "true", children: l.map((m) => /* @__PURE__ */ b(
4518
+ /* @__PURE__ */ p("div", { className: "rss-time-gutter", "aria-hidden": "true", children: l.map((m) => /* @__PURE__ */ p(
4542
4519
  "div",
4543
4520
  {
4544
4521
  className: "rss-time-label",
@@ -4547,9 +4524,9 @@ const Ai = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dr = ({
4547
4524
  },
4548
4525
  m
4549
4526
  )) }),
4550
- /* @__PURE__ */ b("div", { className: "rss-columns", ref: d, style: { height: u }, children: t.map((m) => {
4551
- const v = ur(e, m.date), p = Ci(v, r, o), D = je(m.date);
4552
- return /* @__PURE__ */ W(
4527
+ /* @__PURE__ */ p("div", { className: "rss-columns", ref: d, style: { height: u }, children: t.map((m) => {
4528
+ const v = ur(e, m.date), w = Ti(v, r, o), D = He(m.date);
4529
+ return /* @__PURE__ */ L(
4553
4530
  "div",
4554
4531
  {
4555
4532
  className: `rss-column ${D ? "rss-column--today" : ""}`,
@@ -4558,7 +4535,7 @@ const Ai = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dr = ({
4558
4535
  "aria-label": z(m.date, "EEEE, MMMM d"),
4559
4536
  onClick: (E) => h(E, m),
4560
4537
  children: [
4561
- l.map((E) => /* @__PURE__ */ b(
4538
+ l.map((E) => /* @__PURE__ */ p(
4562
4539
  "div",
4563
4540
  {
4564
4541
  className: "rss-hour-cell",
@@ -4567,8 +4544,8 @@ const Ai = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dr = ({
4567
4544
  },
4568
4545
  E
4569
4546
  )),
4570
- p.map((E) => /* @__PURE__ */ b(
4571
- Ri,
4547
+ w.map((E) => /* @__PURE__ */ p(
4548
+ Ai,
4572
4549
  {
4573
4550
  event: E,
4574
4551
  hourHeight: n,
@@ -4578,13 +4555,12 @@ const Ai = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dr = ({
4578
4555
  },
4579
4556
  E.id
4580
4557
  )),
4581
- D && /* @__PURE__ */ b(
4558
+ D && /* @__PURE__ */ p(
4582
4559
  "div",
4583
4560
  {
4584
4561
  className: "rss-now-line",
4585
4562
  style: { top: g },
4586
- "aria-hidden": "true",
4587
- "aria-label": "Current time"
4563
+ "aria-hidden": "true"
4588
4564
  }
4589
4565
  )
4590
4566
  ]
@@ -4596,7 +4572,7 @@ const Ai = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dr = ({
4596
4572
  }
4597
4573
  )
4598
4574
  ] }) });
4599
- }, Wi = ({
4575
+ }, Li = ({
4600
4576
  date: t,
4601
4577
  events: e,
4602
4578
  hourHeight: n,
@@ -4608,7 +4584,7 @@ const Ai = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dr = ({
4608
4584
  onColumnWidthChange: c
4609
4585
  }) => {
4610
4586
  const l = [{ date: t, key: t.toDateString() }];
4611
- return /* @__PURE__ */ b(
4587
+ return /* @__PURE__ */ p(
4612
4588
  dr,
4613
4589
  {
4614
4590
  columns: l,
@@ -4622,7 +4598,7 @@ const Ai = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dr = ({
4622
4598
  onColumnWidthChange: c
4623
4599
  }
4624
4600
  );
4625
- }, Li = ({
4601
+ }, Yi = ({
4626
4602
  date: t,
4627
4603
  events: e,
4628
4604
  hourHeight: n,
@@ -4633,11 +4609,11 @@ const Ai = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dr = ({
4633
4609
  onSlotClick: s,
4634
4610
  onColumnWidthChange: c
4635
4611
  }) => {
4636
- const u = Di(t).map((d) => ({
4612
+ const u = Mi(t).map((d) => ({
4637
4613
  date: d,
4638
4614
  key: z(d, "yyyy-MM-dd")
4639
4615
  }));
4640
- return /* @__PURE__ */ b(
4616
+ return /* @__PURE__ */ p(
4641
4617
  dr,
4642
4618
  {
4643
4619
  columns: u,
@@ -4651,12 +4627,12 @@ const Ai = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dr = ({
4651
4627
  onColumnWidthChange: c
4652
4628
  }
4653
4629
  );
4654
- }, Yi = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], Pn = 3, Fi = ({ event: t, onClick: e }) => {
4630
+ }, Fi = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], Pn = 3, Ii = ({ event: t, onClick: e }) => {
4655
4631
  const n = { type: "event", event: t }, { attributes: r, listeners: o, setNodeRef: a, transform: i, isDragging: s } = tr({
4656
4632
  id: `month-${t.id}`,
4657
4633
  data: n
4658
- }), c = t.color ?? Ze(t.id);
4659
- return /* @__PURE__ */ b(
4634
+ }), c = t.color ?? tn(t.id);
4635
+ return /* @__PURE__ */ p(
4660
4636
  "div",
4661
4637
  {
4662
4638
  ref: a,
@@ -4664,7 +4640,7 @@ const Ai = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dr = ({
4664
4640
  style: {
4665
4641
  background: c,
4666
4642
  opacity: s ? 0.4 : 1,
4667
- transform: Wt.Translate.toString(i),
4643
+ transform: At.Translate.toString(i),
4668
4644
  cursor: "grab"
4669
4645
  },
4670
4646
  ...o,
@@ -4681,14 +4657,14 @@ const Ai = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dr = ({
4681
4657
  children: t.title
4682
4658
  }
4683
4659
  );
4684
- }, Ii = ({
4660
+ }, Bi = ({
4685
4661
  day: t,
4686
4662
  currentMonth: e,
4687
4663
  events: n,
4688
4664
  onEventClick: r,
4689
4665
  onSlotClick: o
4690
4666
  }) => {
4691
- const a = je(t), i = !yi(t, e), { setNodeRef: s, isOver: c } = er({
4667
+ const a = He(t), i = !bi(t, e), { setNodeRef: s, isOver: c } = er({
4692
4668
  id: `month-cell-${z(t, "yyyy-MM-dd")}`,
4693
4669
  data: { date: t }
4694
4670
  }), l = n.slice(0, Pn), u = n.length - Pn, d = () => {
@@ -4697,7 +4673,7 @@ const Ai = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dr = ({
4697
4673
  const g = new Date(t);
4698
4674
  g.setHours(10, 0, 0, 0), o(f, g);
4699
4675
  };
4700
- return /* @__PURE__ */ W(
4676
+ return /* @__PURE__ */ L(
4701
4677
  "div",
4702
4678
  {
4703
4679
  ref: s,
@@ -4712,7 +4688,7 @@ const Ai = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dr = ({
4712
4688
  role: "gridcell",
4713
4689
  "aria-label": z(t, "MMMM d, yyyy"),
4714
4690
  children: [
4715
- /* @__PURE__ */ b(
4691
+ /* @__PURE__ */ p(
4716
4692
  "span",
4717
4693
  {
4718
4694
  className: [
@@ -4723,8 +4699,8 @@ const Ai = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dr = ({
4723
4699
  children: z(t, "d")
4724
4700
  }
4725
4701
  ),
4726
- l.map((f) => /* @__PURE__ */ b(Fi, { event: f, onClick: r }, f.id)),
4727
- u > 0 && /* @__PURE__ */ W("span", { className: "rss-month-more", "aria-label": `${u} more events`, children: [
4702
+ l.map((f) => /* @__PURE__ */ p(Ii, { event: f, onClick: r }, f.id)),
4703
+ u > 0 && /* @__PURE__ */ L("span", { className: "rss-month-more", "aria-label": `${u} more events`, children: [
4728
4704
  "+",
4729
4705
  u,
4730
4706
  " more"
@@ -4732,19 +4708,19 @@ const Ai = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dr = ({
4732
4708
  ]
4733
4709
  }
4734
4710
  );
4735
- }, Bi = ({
4711
+ }, $i = ({
4736
4712
  date: t,
4737
4713
  events: e,
4738
4714
  onEventClick: n,
4739
4715
  onSlotClick: r
4740
4716
  }) => {
4741
- const o = Mi(t);
4742
- return /* @__PURE__ */ W("div", { className: "rss-month", role: "grid", "aria-label": z(t, "MMMM yyyy"), children: [
4743
- /* @__PURE__ */ b("div", { className: "rss-month-weekdays", role: "row", "aria-hidden": "true", children: Yi.map((a) => /* @__PURE__ */ b("div", { className: "rss-month-weekday", role: "columnheader", children: a }, a)) }),
4744
- /* @__PURE__ */ b("div", { className: "rss-month-grid", children: o.map((a) => {
4717
+ const o = Si(t);
4718
+ return /* @__PURE__ */ L("div", { className: "rss-month", role: "grid", "aria-label": z(t, "MMMM yyyy"), children: [
4719
+ /* @__PURE__ */ p("div", { className: "rss-month-weekdays", role: "row", "aria-hidden": "true", children: Fi.map((a) => /* @__PURE__ */ p("div", { className: "rss-month-weekday", role: "columnheader", children: a }, a)) }),
4720
+ /* @__PURE__ */ p("div", { className: "rss-month-grid", children: o.map((a) => {
4745
4721
  const i = ur(e, a);
4746
- return /* @__PURE__ */ b(
4747
- Ii,
4722
+ return /* @__PURE__ */ p(
4723
+ Bi,
4748
4724
  {
4749
4725
  day: a,
4750
4726
  currentMonth: t,
@@ -4757,19 +4733,19 @@ const Ai = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dr = ({
4757
4733
  }) })
4758
4734
  ] });
4759
4735
  };
4760
- function $i(t) {
4761
- const { onEventAdd: e, onEventChange: n, onEventDelete: r } = t, [o, a] = R(!1), [i, s] = R(null), [c, l] = R(null), u = I((h) => {
4736
+ function zi(t) {
4737
+ const { onEventAdd: e, onEventChange: n, onEventDelete: r } = t, [o, a] = R(!1), [i, s] = R(null), [c, l] = R(null), u = F((h) => {
4762
4738
  s(h), l(null), a(!0);
4763
- }, []), d = I((h) => {
4739
+ }, []), d = F((h) => {
4764
4740
  s(null), l(h), a(!0);
4765
- }, []), f = I(() => {
4741
+ }, []), f = F(() => {
4766
4742
  a(!1), s(null), l(null);
4767
- }, []), g = I(
4743
+ }, []), g = F(
4768
4744
  (h) => {
4769
4745
  i ? n == null || n({ ...i, ...h }) : e == null || e(h), f();
4770
4746
  },
4771
4747
  [i, n, e, f]
4772
- ), y = I(() => {
4748
+ ), y = F(() => {
4773
4749
  i && (r == null || r(i.id)), f();
4774
4750
  }, [i, r, f]);
4775
4751
  return {
@@ -4783,28 +4759,21 @@ function $i(t) {
4783
4759
  handleModalDelete: y
4784
4760
  };
4785
4761
  }
4786
- const Rn = {
4787
- /** Below this width → mobile */
4788
- mobile: 640,
4789
- /** Below this width (≥ mobile) → tablet */
4790
- tablet: 1024
4791
- };
4762
+ const Rn = { mobile: 640, tablet: 1024 };
4792
4763
  function An() {
4793
4764
  if (typeof window > "u") return "desktop";
4794
4765
  const t = window.innerWidth;
4795
4766
  return t < Rn.mobile ? "mobile" : t < Rn.tablet ? "tablet" : "desktop";
4796
4767
  }
4797
- function zi() {
4768
+ function ji() {
4798
4769
  const [t, e] = R(An);
4799
4770
  return P(() => {
4800
4771
  const n = () => e(An());
4801
4772
  return window.addEventListener("resize", n, { passive: !0 }), () => window.removeEventListener("resize", n);
4802
4773
  }, []), t;
4803
4774
  }
4804
- const ji = 64, Xi = 0, Hi = 24, Ki = ({
4775
+ const Hi = 64, Xi = 0, qi = 24, fr = ({
4805
4776
  events: t,
4806
- // Allow `view` to be undefined so we can distinguish "not provided" from
4807
- // "explicitly set to 'week'" — needed for breakpoint-based default.
4808
4777
  view: e,
4809
4778
  date: n,
4810
4779
  onEventAdd: r,
@@ -4812,145 +4781,136 @@ const ji = 64, Xi = 0, Hi = 24, Ki = ({
4812
4781
  onEventDelete: a,
4813
4782
  onViewChange: i,
4814
4783
  onDateChange: s,
4815
- hourHeight: c = ji,
4784
+ hourHeight: c = Hi,
4816
4785
  startHour: l = Xi,
4817
- endHour: u = Hi,
4818
- className: d = ""
4786
+ endHour: u = qi,
4787
+ className: d = "",
4788
+ slots: f
4819
4789
  }) => {
4820
- const g = zi() === "mobile", [y, h] = R(() => e !== void 0 ? e : typeof window < "u" && window.innerWidth < 640 ? "day" : "week"), [m, v] = R(n ?? /* @__PURE__ */ new Date()), p = e !== void 0 ? e : y, D = n ?? m, E = (Y) => {
4821
- h(Y), i == null || i(Y);
4822
- }, w = (Y) => {
4823
- v(Y), s == null || s(Y);
4790
+ const g = (f == null ? void 0 : f.Header) ?? Ci, y = (f == null ? void 0 : f.EventModal) ?? Ri, m = ji() === "mobile", [v, w] = R(() => e !== void 0 ? e : typeof window < "u" && window.innerWidth < 640 ? "day" : "week"), [D, E] = R(n ?? /* @__PURE__ */ new Date()), b = e !== void 0 ? e : v, M = n ?? D, S = ($) => {
4791
+ w($), i == null || i($);
4792
+ }, x = ($) => {
4793
+ E($), s == null || s($);
4824
4794
  }, {
4825
- isModalOpen: x,
4826
- editingEvent: S,
4827
- pendingSlot: M,
4828
- openEditModal: N,
4829
- openAddModal: L,
4830
- closeModal: T,
4831
- handleModalSave: G,
4832
- handleModalDelete: K
4833
- } = $i({ onEventAdd: r, onEventChange: o, onEventDelete: a }), [j, ct] = R(null), dt = C({ hourHeight: c, columnWidth: 0 });
4834
- dt.current.hourHeight = c;
4835
- const lt = Br(
4836
- ln(Ue, {
4837
- activationConstraint: {
4838
- // Require at least 6 px of movement before a drag starts so that
4839
- // taps on events still fire the click → open-modal handler.
4840
- distance: 6
4841
- }
4795
+ isModalOpen: T,
4796
+ editingEvent: W,
4797
+ pendingSlot: O,
4798
+ openEditModal: q,
4799
+ openAddModal: G,
4800
+ closeModal: _,
4801
+ handleModalSave: dt,
4802
+ handleModalDelete: Lt
4803
+ } = zi({ onEventAdd: r, onEventChange: o, onEventDelete: a }), [U, qt] = R(null), tt = C({ hourHeight: c, columnWidth: 0 });
4804
+ tt.current.hourHeight = c;
4805
+ const _t = $r(
4806
+ ln(Qe, {
4807
+ activationConstraint: { distance: 6 }
4842
4808
  }),
4843
4809
  ln(Gn, {
4844
- activationConstraint: {
4845
- // On touch, wait 150 ms OR move 8 px before starting drag.
4846
- // This gives time for the tap intent to resolve, reducing
4847
- // accidental drag-starts during scrolling.
4848
- delay: 150,
4849
- tolerance: 8
4850
- }
4810
+ activationConstraint: { delay: 150, tolerance: 8 }
4851
4811
  })
4852
- ), ue = (Y) => {
4853
- const Q = Y.active.data.current;
4854
- (Q == null ? void 0 : Q.type) === "event" && ct(Q.event);
4855
- }, vt = (Y) => {
4856
- var qt, _t;
4857
- const { delta: Q } = Y, H = Y.active.data.current;
4858
- if (ct(null), !H || H.type !== "event") return;
4859
- const nt = H.event;
4860
- if (p === "day" || p === "week") {
4861
- const $ = Xe(Q.y / dt.current.hourHeight * 60);
4862
- let ht = 0;
4863
- if (p === "week" && dt.current.columnWidth > 0 && (ht = Math.round(Q.x / dt.current.columnWidth)), $ === 0 && ht === 0) return;
4864
- const J = $t(Rt(nt.start, ht), $), bt = $t(Rt(nt.end, ht), $), rt = l * 60, Dt = u * 60, ot = J.getHours() * 60 + J.getMinutes(), de = bt.getHours() * 60 + bt.getMinutes();
4865
- if (ot < rt || de > Dt) return;
4866
- o == null || o({ ...nt, start: J, end: bt });
4812
+ ), fe = ($) => {
4813
+ const J = $.active.data.current;
4814
+ (J == null ? void 0 : J.type) === "event" && qt(J.event);
4815
+ }, vt = ($) => {
4816
+ var Yt, ft;
4817
+ const { delta: J } = $, bt = $.active.data.current;
4818
+ if (qt(null), !bt || bt.type !== "event") return;
4819
+ const I = bt.event;
4820
+ if (b === "day" || b === "week") {
4821
+ const ct = Xe(J.y / tt.current.hourHeight * 60);
4822
+ let Z = 0;
4823
+ if (b === "week" && tt.current.columnWidth > 0 && (Z = Math.round(J.x / tt.current.columnWidth)), ct === 0 && Z === 0) return;
4824
+ const lt = zt(Pt(I.start, Z), ct), et = zt(Pt(I.end, Z), ct), Mt = l * 60, he = u * 60, Gt = lt.getHours() * 60 + lt.getMinutes(), ht = et.getHours() * 60 + et.getMinutes();
4825
+ if (Gt < Mt || ht > he) return;
4826
+ o == null || o({ ...I, start: lt, end: et });
4867
4827
  return;
4868
4828
  }
4869
- if (p === "month") {
4870
- const $ = Y.over;
4871
- if (!((_t = (qt = $ == null ? void 0 : $.data) == null ? void 0 : qt.current) != null && _t.date)) return;
4872
- const ht = $.data.current.date, J = new Date(nt.start), bt = new Date(J);
4873
- bt.setHours(0, 0, 0, 0);
4874
- const rt = new Date(ht);
4875
- rt.setHours(0, 0, 0, 0);
4876
- const Dt = rt.getTime() - bt.getTime(), ot = Math.round(Dt / (24 * 60 * 60 * 1e3));
4877
- if (ot === 0) return;
4829
+ if (b === "month") {
4830
+ const ct = $.over;
4831
+ if (!((ft = (Yt = ct == null ? void 0 : ct.data) == null ? void 0 : Yt.current) != null && ft.date)) return;
4832
+ const Z = ct.data.current.date, lt = new Date(I.start);
4833
+ lt.setHours(0, 0, 0, 0);
4834
+ const et = new Date(Z);
4835
+ et.setHours(0, 0, 0, 0);
4836
+ const Mt = Math.round(
4837
+ (et.getTime() - lt.getTime()) / (24 * 60 * 60 * 1e3)
4838
+ );
4839
+ if (Mt === 0) return;
4878
4840
  o == null || o({
4879
- ...nt,
4880
- start: Rt(nt.start, ot),
4881
- end: Rt(nt.end, ot)
4841
+ ...I,
4842
+ start: Pt(I.start, Mt),
4843
+ end: Pt(I.end, Mt)
4882
4844
  });
4883
4845
  }
4884
- }, Ht = (Y, Q) => {
4885
- const H = t.find((nt) => nt.id === Y);
4886
- H && (o == null || o({ ...H, end: Q }));
4887
- }, Tt = j ? {
4888
- ...j,
4889
- color: j.color ?? Ze(j.id),
4846
+ }, Dt = ($, J) => {
4847
+ const bt = t.find((I) => I.id === $);
4848
+ bt && (o == null || o({ ...bt, end: J }));
4849
+ }, yt = U ? {
4850
+ ...U,
4851
+ color: U.color ?? tn(U.id),
4890
4852
  topPercent: 0,
4891
4853
  heightPercent: 0,
4892
4854
  leftPercent: 0,
4893
4855
  widthPercent: 100
4894
- } : null, ft = (Y, Q) => L({ start: Y, end: Q }), yt = {
4856
+ } : null, Vt = ($, J) => G({ start: $, end: J }), Q = {
4895
4857
  events: t,
4896
4858
  hourHeight: c,
4897
4859
  startHour: l,
4898
4860
  endHour: u,
4899
- onEventClick: N,
4900
- onEventResizeEnd: Ht,
4901
- onSlotClick: ft,
4902
- onColumnWidthChange: (Y) => {
4903
- dt.current.columnWidth = Y;
4861
+ onEventClick: q,
4862
+ onEventResizeEnd: Dt,
4863
+ onSlotClick: Vt,
4864
+ onColumnWidthChange: ($) => {
4865
+ tt.current.columnWidth = $;
4904
4866
  }
4905
4867
  };
4906
- return /* @__PURE__ */ W("div", { className: `rss-root ${d}`.trim(), children: [
4907
- /* @__PURE__ */ W(
4908
- Yo,
4868
+ return /* @__PURE__ */ L("div", { className: `rss-root ${d}`.trim(), children: [
4869
+ /* @__PURE__ */ L(
4870
+ Fo,
4909
4871
  {
4910
- sensors: lt,
4911
- modifiers: [na],
4912
- onDragStart: ue,
4872
+ sensors: _t,
4873
+ modifiers: [ra],
4874
+ onDragStart: fe,
4913
4875
  onDragEnd: vt,
4914
4876
  children: [
4915
- /* @__PURE__ */ b(
4916
- ki,
4877
+ /* @__PURE__ */ p(
4878
+ g,
4917
4879
  {
4918
- view: p,
4919
- date: D,
4920
- isMobile: g,
4921
- onViewChange: E,
4922
- onDateChange: w
4880
+ view: b,
4881
+ date: M,
4882
+ isMobile: m,
4883
+ onViewChange: S,
4884
+ onDateChange: x
4923
4885
  }
4924
4886
  ),
4925
- p === "day" && /* @__PURE__ */ b(Wi, { date: D, ...yt }),
4926
- p === "week" && /* @__PURE__ */ b(Li, { date: D, ...yt }),
4927
- p === "month" && /* @__PURE__ */ b(
4928
- Bi,
4887
+ b === "day" && /* @__PURE__ */ p(Li, { date: M, ...Q }),
4888
+ b === "week" && /* @__PURE__ */ p(Yi, { date: M, ...Q }),
4889
+ b === "month" && /* @__PURE__ */ p(
4890
+ $i,
4929
4891
  {
4930
- date: D,
4892
+ date: M,
4931
4893
  events: t,
4932
- onEventClick: N,
4933
- onSlotClick: ft
4894
+ onEventClick: q,
4895
+ onSlotClick: Vt
4934
4896
  }
4935
4897
  ),
4936
- Tt && /* @__PURE__ */ b(ta, { children: /* @__PURE__ */ b(
4898
+ yt && /* @__PURE__ */ p(ea, { children: /* @__PURE__ */ p(
4937
4899
  "div",
4938
4900
  {
4939
4901
  className: "rss-drag-overlay",
4940
4902
  style: {
4941
- // Give the overlay a fixed height so it looks natural.
4942
- // On mobile use a slightly shorter overlay to stay clear of fingers.
4943
- height: g ? c * 1.2 : c * 1.5,
4944
- width: p === "day" ? "100%" : 120
4903
+ height: m ? c * 1.2 : c * 1.5,
4904
+ width: b === "day" ? "100%" : 120
4945
4905
  },
4946
- children: /* @__PURE__ */ W(
4906
+ children: /* @__PURE__ */ L(
4947
4907
  "div",
4948
4908
  {
4949
4909
  className: "rss-event",
4950
4910
  style: {
4951
4911
  position: "relative",
4952
4912
  height: "100%",
4953
- background: Tt.color,
4913
+ background: yt.color,
4954
4914
  opacity: 0.9,
4955
4915
  top: 0,
4956
4916
  left: 0,
@@ -4958,8 +4918,8 @@ const ji = 64, Xi = 0, Hi = 24, Ki = ({
4958
4918
  boxShadow: "0 8px 24px rgb(0 0 0 / 0.2)"
4959
4919
  },
4960
4920
  children: [
4961
- /* @__PURE__ */ b("div", { className: "rss-event-title", children: Tt.title }),
4962
- /* @__PURE__ */ b("div", { className: "rss-event-time", children: z(Tt.start, "h:mm a") })
4921
+ /* @__PURE__ */ p("div", { className: "rss-event-title", children: yt.title }),
4922
+ /* @__PURE__ */ p("div", { className: "rss-event-time", children: z(yt.start, "h:mm a") })
4963
4923
  ]
4964
4924
  }
4965
4925
  )
@@ -4968,25 +4928,28 @@ const ji = 64, Xi = 0, Hi = 24, Ki = ({
4968
4928
  ]
4969
4929
  }
4970
4930
  ),
4971
- x && /* @__PURE__ */ b(
4972
- Pi,
4931
+ T && /* @__PURE__ */ p(
4932
+ y,
4973
4933
  {
4974
- event: S,
4975
- initialStart: M == null ? void 0 : M.start,
4976
- initialEnd: M == null ? void 0 : M.end,
4977
- onSave: G,
4978
- onDelete: S ? K : void 0,
4979
- onClose: T
4934
+ event: W,
4935
+ initialStart: O == null ? void 0 : O.start,
4936
+ initialEnd: O == null ? void 0 : O.end,
4937
+ onSave: dt,
4938
+ onDelete: W ? Lt : void 0,
4939
+ onClose: _
4980
4940
  }
4981
4941
  )
4982
4942
  ] });
4983
- }, Ui = "0.1.3";
4943
+ }, Ui = ({ className: t = "", ...e }) => /* @__PURE__ */ p(fr, { ...e, className: `rss-theme-tw ${t}`.trim() }), Qi = ({ className: t = "", ...e }) => /* @__PURE__ */ p(fr, { ...e, className: `rss-theme-mui ${t}`.trim() }), Ji = "0.1.5";
4984
4944
  export {
4985
- xe as EVENT_COLORS,
4986
- Ki as Scheduler,
4987
- Ui as VERSION,
4988
- Gi as generateId,
4989
- Ze as pickColor,
4990
- zi as useBreakpoint
4945
+ Oe as EVENT_COLORS,
4946
+ fr as HeadlessScheduler,
4947
+ Qi as MuiScheduler,
4948
+ fr as Scheduler,
4949
+ Ui as TailwindScheduler,
4950
+ Ji as VERSION,
4951
+ Ki as generateId,
4952
+ tn as pickColor,
4953
+ ji as useBreakpoint
4991
4954
  };
4992
4955
  //# sourceMappingURL=index.es.js.map