react-smart-scheduler 0.1.2 → 0.1.4
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.d.ts +24 -1
- package/dist/index.es.js +1274 -1225
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/scheduler.css +1 -1
- package/package.json +6 -6
package/dist/index.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import B, { useRef as C, useMemo as F, useLayoutEffect as
|
|
3
|
-
import { unstable_batchedUpdates as
|
|
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";
|
|
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
|
|
11
|
-
function
|
|
10
|
+
const Ee = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
11
|
+
function jt(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]";
|
|
@@ -18,27 +18,27 @@ function He(t) {
|
|
|
18
18
|
}
|
|
19
19
|
function U(t) {
|
|
20
20
|
var e, n;
|
|
21
|
-
return t ?
|
|
21
|
+
return t ? jt(t) ? t : He(t) && (e = (n = t.ownerDocument) == null ? void 0 : n.defaultView) != null ? e : window : window;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function qe(t) {
|
|
24
24
|
const {
|
|
25
25
|
Document: e
|
|
26
26
|
} = U(t);
|
|
27
27
|
return t instanceof e;
|
|
28
28
|
}
|
|
29
29
|
function ae(t) {
|
|
30
|
-
return
|
|
30
|
+
return jt(t) ? !1 : t instanceof U(t).HTMLElement;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function Wn(t) {
|
|
33
33
|
return t instanceof U(t).SVGElement;
|
|
34
34
|
}
|
|
35
35
|
function Xt(t) {
|
|
36
|
-
return t ?
|
|
36
|
+
return t ? jt(t) ? t.document : He(t) ? qe(t) ? t : ae(t) || Wn(t) ? t.ownerDocument : document : document : document;
|
|
37
37
|
}
|
|
38
|
-
const
|
|
39
|
-
function
|
|
38
|
+
const wt = Ee ? wr : P;
|
|
39
|
+
function Oe(t) {
|
|
40
40
|
const e = C(t);
|
|
41
|
-
return
|
|
41
|
+
return wt(() => {
|
|
42
42
|
e.current = t;
|
|
43
43
|
}), I(function() {
|
|
44
44
|
for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
|
|
@@ -46,7 +46,7 @@ function Ee(t) {
|
|
|
46
46
|
return e.current == null ? void 0 : e.current(...r);
|
|
47
47
|
}, []);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Or() {
|
|
50
50
|
const t = C(null), e = I((r, o) => {
|
|
51
51
|
t.current = setInterval(r, o);
|
|
52
52
|
}, []), n = I(() => {
|
|
@@ -57,7 +57,7 @@ function Mr() {
|
|
|
57
57
|
function ne(t, e) {
|
|
58
58
|
e === void 0 && (e = [t]);
|
|
59
59
|
const n = C(t);
|
|
60
|
-
return
|
|
60
|
+
return wt(() => {
|
|
61
61
|
n.current !== t && (n.current = t);
|
|
62
62
|
}, e), n;
|
|
63
63
|
}
|
|
@@ -72,8 +72,8 @@ function ie(t, e) {
|
|
|
72
72
|
[...e]
|
|
73
73
|
);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
const e =
|
|
75
|
+
function ye(t) {
|
|
76
|
+
const e = Oe(t), n = C(null), r = I(
|
|
77
77
|
(o) => {
|
|
78
78
|
o !== n.current && (e == null || e(o, n.current)), n.current = o;
|
|
79
79
|
},
|
|
@@ -82,22 +82,22 @@ function ve(t) {
|
|
|
82
82
|
);
|
|
83
83
|
return [n, r];
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function be(t) {
|
|
86
86
|
const e = C();
|
|
87
|
-
return
|
|
87
|
+
return P(() => {
|
|
88
88
|
e.current = t;
|
|
89
89
|
}, [t]), e.current;
|
|
90
90
|
}
|
|
91
|
-
let
|
|
92
|
-
function
|
|
91
|
+
let Ae = {};
|
|
92
|
+
function Ne(t, e) {
|
|
93
93
|
return F(() => {
|
|
94
94
|
if (e)
|
|
95
95
|
return e;
|
|
96
|
-
const n =
|
|
97
|
-
return
|
|
96
|
+
const n = Ae[t] == null ? 0 : Ae[t] + 1;
|
|
97
|
+
return Ae[t] = n, t + "-" + n;
|
|
98
98
|
}, [t, e]);
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function Ln(t) {
|
|
101
101
|
return function(e) {
|
|
102
102
|
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
|
|
103
103
|
r[o - 1] = arguments[o];
|
|
@@ -113,11 +113,11 @@ function Rn(t) {
|
|
|
113
113
|
});
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
|
-
const
|
|
117
|
-
function
|
|
116
|
+
const zt = /* @__PURE__ */ Ln(1), pe = /* @__PURE__ */ Ln(-1);
|
|
117
|
+
function Nr(t) {
|
|
118
118
|
return "clientX" in t && "clientY" in t;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function _e(t) {
|
|
121
121
|
if (!t)
|
|
122
122
|
return !1;
|
|
123
123
|
const {
|
|
@@ -125,7 +125,7 @@ function qe(t) {
|
|
|
125
125
|
} = U(t.target);
|
|
126
126
|
return e && t instanceof e;
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function kr(t) {
|
|
129
129
|
if (!t)
|
|
130
130
|
return !1;
|
|
131
131
|
const {
|
|
@@ -133,8 +133,8 @@ function Sr(t) {
|
|
|
133
133
|
} = U(t.target);
|
|
134
134
|
return e && t instanceof e;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
if (
|
|
136
|
+
function we(t) {
|
|
137
|
+
if (kr(t)) {
|
|
138
138
|
if (t.touches && t.touches.length) {
|
|
139
139
|
const {
|
|
140
140
|
clientX: e,
|
|
@@ -155,12 +155,12 @@ function pe(t) {
|
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
return
|
|
158
|
+
return Nr(t) ? {
|
|
159
159
|
x: t.clientX,
|
|
160
160
|
y: t.clientY
|
|
161
161
|
} : null;
|
|
162
162
|
}
|
|
163
|
-
const
|
|
163
|
+
const Wt = /* @__PURE__ */ Object.freeze({
|
|
164
164
|
Translate: {
|
|
165
165
|
toString(t) {
|
|
166
166
|
if (!t)
|
|
@@ -186,7 +186,7 @@ const Tt = /* @__PURE__ */ Object.freeze({
|
|
|
186
186
|
Transform: {
|
|
187
187
|
toString(t) {
|
|
188
188
|
if (t)
|
|
189
|
-
return [
|
|
189
|
+
return [Wt.Translate.toString(t), Wt.Scale.toString(t)].join(" ");
|
|
190
190
|
}
|
|
191
191
|
},
|
|
192
192
|
Transition: {
|
|
@@ -200,23 +200,23 @@ const Tt = /* @__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
|
|
203
|
+
function Cr(t) {
|
|
204
204
|
return t.matches(cn) ? t : t.querySelector(cn);
|
|
205
205
|
}
|
|
206
|
-
const
|
|
206
|
+
const Tr = {
|
|
207
207
|
display: "none"
|
|
208
208
|
};
|
|
209
|
-
function
|
|
209
|
+
function Pr(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:
|
|
216
|
+
style: Tr
|
|
217
217
|
}, n);
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function Rr(t) {
|
|
220
220
|
let {
|
|
221
221
|
id: e,
|
|
222
222
|
announcement: n,
|
|
@@ -244,8 +244,8 @@ function Cr(t) {
|
|
|
244
244
|
"aria-atomic": !0
|
|
245
245
|
}, n);
|
|
246
246
|
}
|
|
247
|
-
function
|
|
248
|
-
const [t, e] =
|
|
247
|
+
function Ar() {
|
|
248
|
+
const [t, e] = R("");
|
|
249
249
|
return {
|
|
250
250
|
announce: I((r) => {
|
|
251
251
|
r != null && e(r);
|
|
@@ -253,17 +253,17 @@ function kr() {
|
|
|
253
253
|
announcement: t
|
|
254
254
|
};
|
|
255
255
|
}
|
|
256
|
-
const
|
|
257
|
-
function
|
|
258
|
-
const e =
|
|
259
|
-
|
|
256
|
+
const Yn = /* @__PURE__ */ oe(null);
|
|
257
|
+
function Wr(t) {
|
|
258
|
+
const e = At(Yn);
|
|
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
|
|
266
|
-
const [t] =
|
|
265
|
+
function Lr() {
|
|
266
|
+
const [t] = R(() => /* @__PURE__ */ new Set()), e = I((r) => (t.add(r), () => t.delete(r)), [t]);
|
|
267
267
|
return [I((r) => {
|
|
268
268
|
let {
|
|
269
269
|
type: o,
|
|
@@ -275,13 +275,13 @@ function Pr() {
|
|
|
275
275
|
});
|
|
276
276
|
}, [t]), e];
|
|
277
277
|
}
|
|
278
|
-
const
|
|
278
|
+
const Yr = {
|
|
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
|
-
},
|
|
284
|
+
}, Fr = {
|
|
285
285
|
onDragStart(t) {
|
|
286
286
|
let {
|
|
287
287
|
active: e
|
|
@@ -309,20 +309,20 @@ const Rr = {
|
|
|
309
309
|
return "Dragging was cancelled. Draggable item " + e.id + " was dropped.";
|
|
310
310
|
}
|
|
311
311
|
};
|
|
312
|
-
function
|
|
312
|
+
function Ir(t) {
|
|
313
313
|
let {
|
|
314
|
-
announcements: e =
|
|
314
|
+
announcements: e = Fr,
|
|
315
315
|
container: n,
|
|
316
316
|
hiddenTextDescribedById: r,
|
|
317
|
-
screenReaderInstructions: o =
|
|
317
|
+
screenReaderInstructions: o = Yr
|
|
318
318
|
} = t;
|
|
319
319
|
const {
|
|
320
320
|
announce: a,
|
|
321
321
|
announcement: i
|
|
322
|
-
} =
|
|
323
|
-
if (
|
|
322
|
+
} = Ar(), s = Ne("DndLiveRegion"), [c, l] = R(!1);
|
|
323
|
+
if (P(() => {
|
|
324
324
|
l(!0);
|
|
325
|
-
}, []),
|
|
325
|
+
}, []), Wr(F(() => ({
|
|
326
326
|
onDragStart(d) {
|
|
327
327
|
let {
|
|
328
328
|
active: f
|
|
@@ -334,61 +334,61 @@ function Wr(t) {
|
|
|
334
334
|
onDragMove(d) {
|
|
335
335
|
let {
|
|
336
336
|
active: f,
|
|
337
|
-
over:
|
|
337
|
+
over: g
|
|
338
338
|
} = d;
|
|
339
339
|
e.onDragMove && a(e.onDragMove({
|
|
340
340
|
active: f,
|
|
341
|
-
over:
|
|
341
|
+
over: g
|
|
342
342
|
}));
|
|
343
343
|
},
|
|
344
344
|
onDragOver(d) {
|
|
345
345
|
let {
|
|
346
346
|
active: f,
|
|
347
|
-
over:
|
|
347
|
+
over: g
|
|
348
348
|
} = d;
|
|
349
349
|
a(e.onDragOver({
|
|
350
350
|
active: f,
|
|
351
|
-
over:
|
|
351
|
+
over: g
|
|
352
352
|
}));
|
|
353
353
|
},
|
|
354
354
|
onDragEnd(d) {
|
|
355
355
|
let {
|
|
356
356
|
active: f,
|
|
357
|
-
over:
|
|
357
|
+
over: g
|
|
358
358
|
} = d;
|
|
359
359
|
a(e.onDragEnd({
|
|
360
360
|
active: f,
|
|
361
|
-
over:
|
|
361
|
+
over: g
|
|
362
362
|
}));
|
|
363
363
|
},
|
|
364
364
|
onDragCancel(d) {
|
|
365
365
|
let {
|
|
366
366
|
active: f,
|
|
367
|
-
over:
|
|
367
|
+
over: g
|
|
368
368
|
} = d;
|
|
369
369
|
a(e.onDragCancel({
|
|
370
370
|
active: f,
|
|
371
|
-
over:
|
|
371
|
+
over: g
|
|
372
372
|
}));
|
|
373
373
|
}
|
|
374
374
|
}), [a, e])), !c)
|
|
375
375
|
return null;
|
|
376
|
-
const u = B.createElement(B.Fragment, null, B.createElement(
|
|
376
|
+
const u = B.createElement(B.Fragment, null, B.createElement(Pr, {
|
|
377
377
|
id: r,
|
|
378
378
|
value: o.draggable
|
|
379
|
-
}), B.createElement(
|
|
379
|
+
}), B.createElement(Rr, {
|
|
380
380
|
id: s,
|
|
381
381
|
announcement: i
|
|
382
382
|
}));
|
|
383
|
-
return n ?
|
|
383
|
+
return n ? Er(u, n) : u;
|
|
384
384
|
}
|
|
385
|
-
var
|
|
385
|
+
var X;
|
|
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
|
-
})(
|
|
389
|
-
function
|
|
388
|
+
})(X || (X = {}));
|
|
389
|
+
function De() {
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function ln(t, e) {
|
|
392
392
|
return F(
|
|
393
393
|
() => ({
|
|
394
394
|
sensor: t,
|
|
@@ -398,7 +398,7 @@ function Lr(t, e) {
|
|
|
398
398
|
[t, e]
|
|
399
399
|
);
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function Br() {
|
|
402
402
|
for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
|
|
403
403
|
e[n] = arguments[n];
|
|
404
404
|
return F(
|
|
@@ -407,12 +407,12 @@ function Yr() {
|
|
|
407
407
|
[...e]
|
|
408
408
|
);
|
|
409
409
|
}
|
|
410
|
-
const
|
|
410
|
+
const ut = /* @__PURE__ */ Object.freeze({
|
|
411
411
|
x: 0,
|
|
412
412
|
y: 0
|
|
413
413
|
});
|
|
414
|
-
function
|
|
415
|
-
const n =
|
|
414
|
+
function $r(t, e) {
|
|
415
|
+
const n = we(t);
|
|
416
416
|
if (!n)
|
|
417
417
|
return "0 0";
|
|
418
418
|
const r = {
|
|
@@ -421,7 +421,7 @@ function Fr(t, e) {
|
|
|
421
421
|
};
|
|
422
422
|
return r.x + "% " + r.y + "%";
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function zr(t, e) {
|
|
425
425
|
let {
|
|
426
426
|
data: {
|
|
427
427
|
value: n
|
|
@@ -433,13 +433,13 @@ function Ir(t, e) {
|
|
|
433
433
|
} = e;
|
|
434
434
|
return r - n;
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function jr(t, e) {
|
|
437
437
|
if (!t || t.length === 0)
|
|
438
438
|
return null;
|
|
439
439
|
const [n] = t;
|
|
440
440
|
return n[e];
|
|
441
441
|
}
|
|
442
|
-
function
|
|
442
|
+
function Xr(t, e) {
|
|
443
443
|
const n = Math.max(e.top, t.top), r = Math.max(e.left, t.left), o = Math.min(e.left + e.width, t.left + t.width), a = Math.min(e.top + e.height, t.top + t.height), i = o - r, s = a - n;
|
|
444
444
|
if (r < o && n < a) {
|
|
445
445
|
const c = e.width * e.height, l = t.width * t.height, u = i * s, d = u / (c + l - u);
|
|
@@ -447,7 +447,7 @@ function $r(t, e) {
|
|
|
447
447
|
}
|
|
448
448
|
return 0;
|
|
449
449
|
}
|
|
450
|
-
const
|
|
450
|
+
const Hr = (t) => {
|
|
451
451
|
let {
|
|
452
452
|
collisionRect: e,
|
|
453
453
|
droppableRects: n,
|
|
@@ -459,7 +459,7 @@ const zr = (t) => {
|
|
|
459
459
|
id: i
|
|
460
460
|
} = a, s = n.get(i);
|
|
461
461
|
if (s) {
|
|
462
|
-
const c =
|
|
462
|
+
const c = Xr(s, e);
|
|
463
463
|
c > 0 && o.push({
|
|
464
464
|
id: i,
|
|
465
465
|
data: {
|
|
@@ -469,22 +469,22 @@ const zr = (t) => {
|
|
|
469
469
|
});
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
return o.sort(
|
|
472
|
+
return o.sort(zr);
|
|
473
473
|
};
|
|
474
|
-
function
|
|
474
|
+
function qr(t, e, n) {
|
|
475
475
|
return {
|
|
476
476
|
...t,
|
|
477
477
|
scaleX: e && n ? e.width / n.width : 1,
|
|
478
478
|
scaleY: e && n ? e.height / n.height : 1
|
|
479
479
|
};
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function Fn(t, e) {
|
|
482
482
|
return t && e ? {
|
|
483
483
|
x: t.left - e.left,
|
|
484
484
|
y: t.top - e.top
|
|
485
|
-
} :
|
|
485
|
+
} : ut;
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function _r(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,8 +499,8 @@ function Hr(t) {
|
|
|
499
499
|
});
|
|
500
500
|
};
|
|
501
501
|
}
|
|
502
|
-
const
|
|
503
|
-
function
|
|
502
|
+
const Vr = /* @__PURE__ */ _r(1);
|
|
503
|
+
function In(t) {
|
|
504
504
|
if (t.startsWith("matrix3d(")) {
|
|
505
505
|
const e = t.slice(9, -1).split(/, /);
|
|
506
506
|
return {
|
|
@@ -520,8 +520,8 @@ function Ln(t) {
|
|
|
520
520
|
}
|
|
521
521
|
return null;
|
|
522
522
|
}
|
|
523
|
-
function
|
|
524
|
-
const r =
|
|
523
|
+
function Gr(t, e, n) {
|
|
524
|
+
const r = In(e);
|
|
525
525
|
if (!r)
|
|
526
526
|
return t;
|
|
527
527
|
const {
|
|
@@ -539,18 +539,18 @@ function qr(t, e, n) {
|
|
|
539
539
|
left: c
|
|
540
540
|
};
|
|
541
541
|
}
|
|
542
|
-
const
|
|
542
|
+
const Kr = {
|
|
543
543
|
ignoreTransform: !1
|
|
544
544
|
};
|
|
545
545
|
function se(t, e) {
|
|
546
|
-
e === void 0 && (e =
|
|
546
|
+
e === void 0 && (e = Kr);
|
|
547
547
|
let n = t.getBoundingClientRect();
|
|
548
548
|
if (e.ignoreTransform) {
|
|
549
549
|
const {
|
|
550
550
|
transform: l,
|
|
551
551
|
transformOrigin: u
|
|
552
552
|
} = U(t).getComputedStyle(t);
|
|
553
|
-
l && (n =
|
|
553
|
+
l && (n = Gr(n, l, u));
|
|
554
554
|
}
|
|
555
555
|
const {
|
|
556
556
|
top: r,
|
|
@@ -569,12 +569,12 @@ function se(t, e) {
|
|
|
569
569
|
right: c
|
|
570
570
|
};
|
|
571
571
|
}
|
|
572
|
-
function
|
|
572
|
+
function un(t) {
|
|
573
573
|
return se(t, {
|
|
574
574
|
ignoreTransform: !0
|
|
575
575
|
});
|
|
576
576
|
}
|
|
577
|
-
function
|
|
577
|
+
function Ur(t) {
|
|
578
578
|
const e = t.innerWidth, n = t.innerHeight;
|
|
579
579
|
return {
|
|
580
580
|
top: 0,
|
|
@@ -585,10 +585,10 @@ function Vr(t) {
|
|
|
585
585
|
height: n
|
|
586
586
|
};
|
|
587
587
|
}
|
|
588
|
-
function
|
|
588
|
+
function Qr(t, e) {
|
|
589
589
|
return e === void 0 && (e = U(t).getComputedStyle(t)), e.position === "fixed";
|
|
590
590
|
}
|
|
591
|
-
function
|
|
591
|
+
function Jr(t, e) {
|
|
592
592
|
e === void 0 && (e = U(t).getComputedStyle(t));
|
|
593
593
|
const n = /(auto|scroll|overlay)/;
|
|
594
594
|
return ["overflow", "overflowX", "overflowY"].some((o) => {
|
|
@@ -596,51 +596,51 @@ function Kr(t, e) {
|
|
|
596
596
|
return typeof a == "string" ? n.test(a) : !1;
|
|
597
597
|
});
|
|
598
598
|
}
|
|
599
|
-
function
|
|
599
|
+
function Ve(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 (
|
|
604
|
+
if (qe(o) && o.scrollingElement != null && !n.includes(o.scrollingElement))
|
|
605
605
|
return n.push(o.scrollingElement), n;
|
|
606
|
-
if (!ae(o) ||
|
|
606
|
+
if (!ae(o) || Wn(o) || n.includes(o))
|
|
607
607
|
return n;
|
|
608
608
|
const a = U(t).getComputedStyle(o);
|
|
609
|
-
return o !== t &&
|
|
609
|
+
return o !== t && Jr(o, a) && n.push(o), Qr(o, a) ? n : r(o.parentNode);
|
|
610
610
|
}
|
|
611
611
|
return t ? r(t) : n;
|
|
612
612
|
}
|
|
613
|
-
function
|
|
614
|
-
const [e] =
|
|
613
|
+
function Bn(t) {
|
|
614
|
+
const [e] = Ve(t, 1);
|
|
615
615
|
return e ?? null;
|
|
616
616
|
}
|
|
617
|
-
function
|
|
618
|
-
return !
|
|
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;
|
|
619
619
|
}
|
|
620
|
-
function
|
|
621
|
-
return
|
|
620
|
+
function $n(t) {
|
|
621
|
+
return jt(t) ? t.scrollX : t.scrollLeft;
|
|
622
622
|
}
|
|
623
|
-
function
|
|
624
|
-
return
|
|
623
|
+
function zn(t) {
|
|
624
|
+
return jt(t) ? t.scrollY : t.scrollTop;
|
|
625
625
|
}
|
|
626
|
-
function
|
|
626
|
+
function Ie(t) {
|
|
627
627
|
return {
|
|
628
|
-
x:
|
|
629
|
-
y:
|
|
628
|
+
x: $n(t),
|
|
629
|
+
y: zn(t)
|
|
630
630
|
};
|
|
631
631
|
}
|
|
632
632
|
var q;
|
|
633
633
|
(function(t) {
|
|
634
634
|
t[t.Forward = 1] = "Forward", t[t.Backward = -1] = "Backward";
|
|
635
635
|
})(q || (q = {}));
|
|
636
|
-
function
|
|
637
|
-
return !
|
|
636
|
+
function jn(t) {
|
|
637
|
+
return !Ee || !t ? !1 : t === document.scrollingElement;
|
|
638
638
|
}
|
|
639
|
-
function
|
|
639
|
+
function Xn(t) {
|
|
640
640
|
const e = {
|
|
641
641
|
x: 0,
|
|
642
642
|
y: 0
|
|
643
|
-
}, n =
|
|
643
|
+
}, n = jn(t) ? {
|
|
644
644
|
height: window.innerHeight,
|
|
645
645
|
width: window.innerWidth
|
|
646
646
|
} : {
|
|
@@ -659,39 +659,39 @@ function $n(t) {
|
|
|
659
659
|
minScroll: e
|
|
660
660
|
};
|
|
661
661
|
}
|
|
662
|
-
const
|
|
662
|
+
const Zr = {
|
|
663
663
|
x: 0.2,
|
|
664
664
|
y: 0.2
|
|
665
665
|
};
|
|
666
|
-
function
|
|
666
|
+
function to(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 =
|
|
673
|
+
r === void 0 && (r = 10), o === void 0 && (o = Zr);
|
|
674
674
|
const {
|
|
675
675
|
isTop: l,
|
|
676
676
|
isBottom: u,
|
|
677
677
|
isLeft: d,
|
|
678
678
|
isRight: f
|
|
679
|
-
} =
|
|
679
|
+
} = Xn(t), g = {
|
|
680
680
|
x: 0,
|
|
681
681
|
y: 0
|
|
682
682
|
}, y = {
|
|
683
683
|
x: 0,
|
|
684
684
|
y: 0
|
|
685
|
-
},
|
|
685
|
+
}, h = {
|
|
686
686
|
height: e.height * o.y,
|
|
687
687
|
width: e.width * o.x
|
|
688
688
|
};
|
|
689
|
-
return !l && a <= e.top +
|
|
690
|
-
direction:
|
|
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)), {
|
|
690
|
+
direction: g,
|
|
691
691
|
speed: y
|
|
692
692
|
};
|
|
693
693
|
}
|
|
694
|
-
function
|
|
694
|
+
function eo(t) {
|
|
695
695
|
if (t === document.scrollingElement) {
|
|
696
696
|
const {
|
|
697
697
|
innerWidth: a,
|
|
@@ -721,16 +721,16 @@ function Jr(t) {
|
|
|
721
721
|
height: t.clientHeight
|
|
722
722
|
};
|
|
723
723
|
}
|
|
724
|
-
function
|
|
725
|
-
return t.reduce((e, n) =>
|
|
724
|
+
function Hn(t) {
|
|
725
|
+
return t.reduce((e, n) => zt(e, Ie(n)), ut);
|
|
726
726
|
}
|
|
727
|
-
function
|
|
728
|
-
return t.reduce((e, n) => e +
|
|
727
|
+
function no(t) {
|
|
728
|
+
return t.reduce((e, n) => e + $n(n), 0);
|
|
729
729
|
}
|
|
730
|
-
function
|
|
731
|
-
return t.reduce((e, n) => e +
|
|
730
|
+
function ro(t) {
|
|
731
|
+
return t.reduce((e, n) => e + zn(n), 0);
|
|
732
732
|
}
|
|
733
|
-
function
|
|
733
|
+
function qn(t, e) {
|
|
734
734
|
if (e === void 0 && (e = se), !t)
|
|
735
735
|
return;
|
|
736
736
|
const {
|
|
@@ -739,20 +739,20 @@ function jn(t, e) {
|
|
|
739
739
|
bottom: o,
|
|
740
740
|
right: a
|
|
741
741
|
} = e(t);
|
|
742
|
-
|
|
742
|
+
Bn(t) && (o <= 0 || a <= 0 || n >= window.innerHeight || r >= window.innerWidth) && t.scrollIntoView({
|
|
743
743
|
block: "center",
|
|
744
744
|
inline: "center"
|
|
745
745
|
});
|
|
746
746
|
}
|
|
747
|
-
const
|
|
748
|
-
class
|
|
747
|
+
const oo = [["x", ["left", "right"], no], ["y", ["top", "bottom"], ro]];
|
|
748
|
+
class Ge {
|
|
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 =
|
|
751
|
+
const r = Ve(n), o = Hn(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
|
|
755
|
+
for (const [a, i, s] of oo)
|
|
756
756
|
for (const c of i)
|
|
757
757
|
Object.defineProperty(this, c, {
|
|
758
758
|
get: () => {
|
|
@@ -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
|
|
783
|
+
function ao(t) {
|
|
784
784
|
const {
|
|
785
785
|
EventTarget: e
|
|
786
786
|
} = U(t);
|
|
787
787
|
return t instanceof e ? t : Xt(t);
|
|
788
788
|
}
|
|
789
|
-
function
|
|
789
|
+
function Le(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
|
}
|
|
@@ -794,48 +794,48 @@ var it;
|
|
|
794
794
|
(function(t) {
|
|
795
795
|
t.Click = "click", t.DragStart = "dragstart", t.Keydown = "keydown", t.ContextMenu = "contextmenu", t.Resize = "resize", t.SelectionChange = "selectionchange", t.VisibilityChange = "visibilitychange";
|
|
796
796
|
})(it || (it = {}));
|
|
797
|
-
function
|
|
797
|
+
function dn(t) {
|
|
798
798
|
t.preventDefault();
|
|
799
799
|
}
|
|
800
|
-
function
|
|
800
|
+
function io(t) {
|
|
801
801
|
t.stopPropagation();
|
|
802
802
|
}
|
|
803
|
-
var
|
|
803
|
+
var k;
|
|
804
804
|
(function(t) {
|
|
805
805
|
t.Space = "Space", t.Down = "ArrowDown", t.Right = "ArrowRight", t.Left = "ArrowLeft", t.Up = "ArrowUp", t.Esc = "Escape", t.Enter = "Enter", t.Tab = "Tab";
|
|
806
|
-
})(
|
|
807
|
-
const
|
|
808
|
-
start: [
|
|
809
|
-
cancel: [
|
|
810
|
-
end: [
|
|
811
|
-
},
|
|
806
|
+
})(k || (k = {}));
|
|
807
|
+
const _n = {
|
|
808
|
+
start: [k.Space, k.Enter],
|
|
809
|
+
cancel: [k.Esc],
|
|
810
|
+
end: [k.Space, k.Enter, k.Tab]
|
|
811
|
+
}, so = (t, e) => {
|
|
812
812
|
let {
|
|
813
813
|
currentCoordinates: n
|
|
814
814
|
} = e;
|
|
815
815
|
switch (t.code) {
|
|
816
|
-
case
|
|
816
|
+
case k.Right:
|
|
817
817
|
return {
|
|
818
818
|
...n,
|
|
819
819
|
x: n.x + 25
|
|
820
820
|
};
|
|
821
|
-
case
|
|
821
|
+
case k.Left:
|
|
822
822
|
return {
|
|
823
823
|
...n,
|
|
824
824
|
x: n.x - 25
|
|
825
825
|
};
|
|
826
|
-
case
|
|
826
|
+
case k.Down:
|
|
827
827
|
return {
|
|
828
828
|
...n,
|
|
829
829
|
y: n.y + 25
|
|
830
830
|
};
|
|
831
|
-
case
|
|
831
|
+
case k.Up:
|
|
832
832
|
return {
|
|
833
833
|
...n,
|
|
834
834
|
y: n.y - 25
|
|
835
835
|
};
|
|
836
836
|
}
|
|
837
837
|
};
|
|
838
|
-
class
|
|
838
|
+
class Vn {
|
|
839
839
|
constructor(e) {
|
|
840
840
|
this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = e;
|
|
841
841
|
const {
|
|
@@ -853,17 +853,17 @@ class Xn {
|
|
|
853
853
|
activeNode: e,
|
|
854
854
|
onStart: n
|
|
855
855
|
} = this.props, r = e.node.current;
|
|
856
|
-
r &&
|
|
856
|
+
r && qn(r), n(ut);
|
|
857
857
|
}
|
|
858
858
|
handleKeyDown(e) {
|
|
859
|
-
if (
|
|
859
|
+
if (_e(e)) {
|
|
860
860
|
const {
|
|
861
861
|
active: n,
|
|
862
862
|
context: r,
|
|
863
863
|
options: o
|
|
864
864
|
} = this.props, {
|
|
865
|
-
keyboardCodes: a =
|
|
866
|
-
coordinateGetter: i =
|
|
865
|
+
keyboardCodes: a = _n,
|
|
866
|
+
coordinateGetter: i = so,
|
|
867
867
|
scrollBehavior: s = "smooth"
|
|
868
868
|
} = o, {
|
|
869
869
|
code: c
|
|
@@ -881,7 +881,7 @@ class Xn {
|
|
|
881
881
|
} = r.current, u = l ? {
|
|
882
882
|
x: l.left,
|
|
883
883
|
y: l.top
|
|
884
|
-
} :
|
|
884
|
+
} : ut;
|
|
885
885
|
this.referenceCoordinates || (this.referenceCoordinates = u);
|
|
886
886
|
const d = i(e, {
|
|
887
887
|
active: n,
|
|
@@ -889,55 +889,55 @@ class Xn {
|
|
|
889
889
|
currentCoordinates: u
|
|
890
890
|
});
|
|
891
891
|
if (d) {
|
|
892
|
-
const f =
|
|
892
|
+
const f = pe(d, u), g = {
|
|
893
893
|
x: 0,
|
|
894
894
|
y: 0
|
|
895
895
|
}, {
|
|
896
896
|
scrollableAncestors: y
|
|
897
897
|
} = r.current;
|
|
898
|
-
for (const
|
|
899
|
-
const
|
|
898
|
+
for (const h of y) {
|
|
899
|
+
const m = e.code, {
|
|
900
900
|
isTop: v,
|
|
901
|
-
isRight:
|
|
902
|
-
isLeft:
|
|
901
|
+
isRight: p,
|
|
902
|
+
isLeft: D,
|
|
903
903
|
isBottom: E,
|
|
904
|
-
maxScroll:
|
|
905
|
-
minScroll:
|
|
906
|
-
} =
|
|
907
|
-
x: Math.min(
|
|
908
|
-
y: Math.min(
|
|
909
|
-
},
|
|
910
|
-
if (
|
|
911
|
-
const T =
|
|
912
|
-
if (
|
|
913
|
-
|
|
904
|
+
maxScroll: w,
|
|
905
|
+
minScroll: x
|
|
906
|
+
} = Xn(h), S = eo(h), M = {
|
|
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
|
+
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) {
|
|
913
|
+
h.scrollTo({
|
|
914
914
|
left: T,
|
|
915
915
|
behavior: s
|
|
916
916
|
});
|
|
917
917
|
return;
|
|
918
918
|
}
|
|
919
|
-
|
|
920
|
-
left: -
|
|
919
|
+
G ? g.x = h.scrollLeft - T : g.x = m === k.Right ? h.scrollLeft - w.x : h.scrollLeft - x.x, g.x && h.scrollBy({
|
|
920
|
+
left: -g.x,
|
|
921
921
|
behavior: s
|
|
922
922
|
});
|
|
923
923
|
break;
|
|
924
|
-
} else if (
|
|
925
|
-
const T =
|
|
926
|
-
if (
|
|
927
|
-
|
|
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) {
|
|
927
|
+
h.scrollTo({
|
|
928
928
|
top: T,
|
|
929
929
|
behavior: s
|
|
930
930
|
});
|
|
931
931
|
return;
|
|
932
932
|
}
|
|
933
|
-
|
|
934
|
-
top: -
|
|
933
|
+
G ? g.y = h.scrollTop - T : g.y = m === k.Down ? h.scrollTop - w.y : h.scrollTop - x.y, g.y && h.scrollBy({
|
|
934
|
+
top: -g.y,
|
|
935
935
|
behavior: s
|
|
936
936
|
});
|
|
937
937
|
break;
|
|
938
938
|
}
|
|
939
939
|
}
|
|
940
|
-
this.handleMove(e,
|
|
940
|
+
this.handleMove(e, zt(pe(d, this.referenceCoordinates), g));
|
|
941
941
|
}
|
|
942
942
|
}
|
|
943
943
|
}
|
|
@@ -963,11 +963,11 @@ class Xn {
|
|
|
963
963
|
this.listeners.removeAll(), this.windowListeners.removeAll();
|
|
964
964
|
}
|
|
965
965
|
}
|
|
966
|
-
|
|
966
|
+
Vn.activators = [{
|
|
967
967
|
eventName: "onKeyDown",
|
|
968
968
|
handler: (t, e, n) => {
|
|
969
969
|
let {
|
|
970
|
-
keyboardCodes: r =
|
|
970
|
+
keyboardCodes: r = _n,
|
|
971
971
|
onActivation: o
|
|
972
972
|
} = e, {
|
|
973
973
|
active: a
|
|
@@ -984,22 +984,22 @@ Xn.activators = [{
|
|
|
984
984
|
return !1;
|
|
985
985
|
}
|
|
986
986
|
}];
|
|
987
|
-
function
|
|
987
|
+
function fn(t) {
|
|
988
988
|
return !!(t && "distance" in t);
|
|
989
989
|
}
|
|
990
|
-
function
|
|
990
|
+
function hn(t) {
|
|
991
991
|
return !!(t && "delay" in t);
|
|
992
992
|
}
|
|
993
|
-
class
|
|
993
|
+
class Ke {
|
|
994
994
|
constructor(e, n, r) {
|
|
995
995
|
var o;
|
|
996
|
-
r === void 0 && (r =
|
|
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;
|
|
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 =
|
|
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();
|
|
1003
1003
|
}
|
|
1004
1004
|
attach() {
|
|
1005
1005
|
const {
|
|
@@ -1013,18 +1013,18 @@ class Ge {
|
|
|
1013
1013
|
} = this;
|
|
1014
1014
|
if (this.listeners.add(e.move.name, this.handleMove, {
|
|
1015
1015
|
passive: !1
|
|
1016
|
-
}), this.listeners.add(e.end.name, this.handleEnd), e.cancel && this.listeners.add(e.cancel.name, this.handleCancel), this.windowListeners.add(it.Resize, this.handleCancel), this.windowListeners.add(it.DragStart,
|
|
1016
|
+
}), this.listeners.add(e.end.name, this.handleEnd), e.cancel && this.listeners.add(e.cancel.name, this.handleCancel), this.windowListeners.add(it.Resize, this.handleCancel), this.windowListeners.add(it.DragStart, dn), this.windowListeners.add(it.VisibilityChange, this.handleCancel), this.windowListeners.add(it.ContextMenu, dn), this.documentListeners.add(it.Keydown, this.handleKeydown), n) {
|
|
1017
1017
|
if (r != null && r({
|
|
1018
1018
|
event: this.props.event,
|
|
1019
1019
|
activeNode: this.props.activeNode,
|
|
1020
1020
|
options: this.props.options
|
|
1021
1021
|
}))
|
|
1022
1022
|
return this.handleStart();
|
|
1023
|
-
if (
|
|
1023
|
+
if (hn(n)) {
|
|
1024
1024
|
this.timeoutId = setTimeout(this.handleStart, n.delay), this.handlePending(n);
|
|
1025
1025
|
return;
|
|
1026
1026
|
}
|
|
1027
|
-
if (
|
|
1027
|
+
if (fn(n)) {
|
|
1028
1028
|
this.handlePending(n);
|
|
1029
1029
|
return;
|
|
1030
1030
|
}
|
|
@@ -1047,7 +1047,7 @@ class Ge {
|
|
|
1047
1047
|
} = this, {
|
|
1048
1048
|
onStart: n
|
|
1049
1049
|
} = this.props;
|
|
1050
|
-
e && (this.activated = !0, this.documentListeners.add(it.Click,
|
|
1050
|
+
e && (this.activated = !0, this.documentListeners.add(it.Click, io, {
|
|
1051
1051
|
capture: !0
|
|
1052
1052
|
}), this.removeTextSelection(), this.documentListeners.add(it.SelectionChange, this.removeTextSelection), n(e));
|
|
1053
1053
|
}
|
|
@@ -1065,15 +1065,15 @@ class Ge {
|
|
|
1065
1065
|
} = a;
|
|
1066
1066
|
if (!o)
|
|
1067
1067
|
return;
|
|
1068
|
-
const c = (n =
|
|
1068
|
+
const c = (n = we(e)) != null ? n : ut, l = pe(o, c);
|
|
1069
1069
|
if (!r && s) {
|
|
1070
|
-
if (
|
|
1071
|
-
if (s.tolerance != null &&
|
|
1070
|
+
if (fn(s)) {
|
|
1071
|
+
if (s.tolerance != null && Le(l, s.tolerance))
|
|
1072
1072
|
return this.handleCancel();
|
|
1073
|
-
if (
|
|
1073
|
+
if (Le(l, s.distance))
|
|
1074
1074
|
return this.handleStart();
|
|
1075
1075
|
}
|
|
1076
|
-
if (
|
|
1076
|
+
if (hn(s) && Le(l, s.tolerance))
|
|
1077
1077
|
return this.handleCancel();
|
|
1078
1078
|
this.handlePending(s, l);
|
|
1079
1079
|
return;
|
|
@@ -1095,14 +1095,14 @@ class Ge {
|
|
|
1095
1095
|
this.detach(), this.activated || e(this.props.active), n();
|
|
1096
1096
|
}
|
|
1097
1097
|
handleKeydown(e) {
|
|
1098
|
-
e.code ===
|
|
1098
|
+
e.code === k.Esc && this.handleCancel();
|
|
1099
1099
|
}
|
|
1100
1100
|
removeTextSelection() {
|
|
1101
1101
|
var e;
|
|
1102
1102
|
(e = this.document.getSelection()) == null || e.removeAllRanges();
|
|
1103
1103
|
}
|
|
1104
1104
|
}
|
|
1105
|
-
const
|
|
1105
|
+
const co = {
|
|
1106
1106
|
cancel: {
|
|
1107
1107
|
name: "pointercancel"
|
|
1108
1108
|
},
|
|
@@ -1113,15 +1113,15 @@ const ao = {
|
|
|
1113
1113
|
name: "pointerup"
|
|
1114
1114
|
}
|
|
1115
1115
|
};
|
|
1116
|
-
class
|
|
1116
|
+
class Ue extends Ke {
|
|
1117
1117
|
constructor(e) {
|
|
1118
1118
|
const {
|
|
1119
1119
|
event: n
|
|
1120
1120
|
} = e, r = Xt(n.target);
|
|
1121
|
-
super(e,
|
|
1121
|
+
super(e, co, r);
|
|
1122
1122
|
}
|
|
1123
1123
|
}
|
|
1124
|
-
|
|
1124
|
+
Ue.activators = [{
|
|
1125
1125
|
eventName: "onPointerDown",
|
|
1126
1126
|
handler: (t, e) => {
|
|
1127
1127
|
let {
|
|
@@ -1134,7 +1134,7 @@ Ke.activators = [{
|
|
|
1134
1134
|
}), !0);
|
|
1135
1135
|
}
|
|
1136
1136
|
}];
|
|
1137
|
-
const
|
|
1137
|
+
const lo = {
|
|
1138
1138
|
move: {
|
|
1139
1139
|
name: "mousemove"
|
|
1140
1140
|
},
|
|
@@ -1142,16 +1142,16 @@ const io = {
|
|
|
1142
1142
|
name: "mouseup"
|
|
1143
1143
|
}
|
|
1144
1144
|
};
|
|
1145
|
-
var
|
|
1145
|
+
var Be;
|
|
1146
1146
|
(function(t) {
|
|
1147
1147
|
t[t.RightClick = 2] = "RightClick";
|
|
1148
|
-
})(
|
|
1149
|
-
class
|
|
1148
|
+
})(Be || (Be = {}));
|
|
1149
|
+
class uo extends Ke {
|
|
1150
1150
|
constructor(e) {
|
|
1151
|
-
super(e,
|
|
1151
|
+
super(e, lo, Xt(e.event.target));
|
|
1152
1152
|
}
|
|
1153
1153
|
}
|
|
1154
|
-
|
|
1154
|
+
uo.activators = [{
|
|
1155
1155
|
eventName: "onMouseDown",
|
|
1156
1156
|
handler: (t, e) => {
|
|
1157
1157
|
let {
|
|
@@ -1159,12 +1159,12 @@ so.activators = [{
|
|
|
1159
1159
|
} = t, {
|
|
1160
1160
|
onActivation: r
|
|
1161
1161
|
} = e;
|
|
1162
|
-
return n.button ===
|
|
1162
|
+
return n.button === Be.RightClick ? !1 : (r == null || r({
|
|
1163
1163
|
event: n
|
|
1164
1164
|
}), !0);
|
|
1165
1165
|
}
|
|
1166
1166
|
}];
|
|
1167
|
-
const
|
|
1167
|
+
const Ye = {
|
|
1168
1168
|
cancel: {
|
|
1169
1169
|
name: "touchcancel"
|
|
1170
1170
|
},
|
|
@@ -1175,22 +1175,22 @@ const Le = {
|
|
|
1175
1175
|
name: "touchend"
|
|
1176
1176
|
}
|
|
1177
1177
|
};
|
|
1178
|
-
class
|
|
1178
|
+
class Gn extends Ke {
|
|
1179
1179
|
constructor(e) {
|
|
1180
|
-
super(e,
|
|
1180
|
+
super(e, Ye);
|
|
1181
1181
|
}
|
|
1182
1182
|
static setup() {
|
|
1183
|
-
return window.addEventListener(
|
|
1183
|
+
return window.addEventListener(Ye.move.name, e, {
|
|
1184
1184
|
capture: !1,
|
|
1185
1185
|
passive: !1
|
|
1186
1186
|
}), function() {
|
|
1187
|
-
window.removeEventListener(
|
|
1187
|
+
window.removeEventListener(Ye.move.name, e);
|
|
1188
1188
|
};
|
|
1189
1189
|
function e() {
|
|
1190
1190
|
}
|
|
1191
1191
|
}
|
|
1192
1192
|
}
|
|
1193
|
-
|
|
1193
|
+
Gn.activators = [{
|
|
1194
1194
|
eventName: "onTouchStart",
|
|
1195
1195
|
handler: (t, e) => {
|
|
1196
1196
|
let {
|
|
@@ -1210,11 +1210,11 @@ var te;
|
|
|
1210
1210
|
(function(t) {
|
|
1211
1211
|
t[t.Pointer = 0] = "Pointer", t[t.DraggableRect = 1] = "DraggableRect";
|
|
1212
1212
|
})(te || (te = {}));
|
|
1213
|
-
var
|
|
1213
|
+
var Me;
|
|
1214
1214
|
(function(t) {
|
|
1215
1215
|
t[t.TreeOrder = 0] = "TreeOrder", t[t.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
1216
|
-
})(
|
|
1217
|
-
function
|
|
1216
|
+
})(Me || (Me = {}));
|
|
1217
|
+
function fo(t) {
|
|
1218
1218
|
let {
|
|
1219
1219
|
acceleration: e,
|
|
1220
1220
|
activator: n = te.Pointer,
|
|
@@ -1222,23 +1222,23 @@ function lo(t) {
|
|
|
1222
1222
|
draggingRect: o,
|
|
1223
1223
|
enabled: a,
|
|
1224
1224
|
interval: i = 5,
|
|
1225
|
-
order: s =
|
|
1225
|
+
order: s = Me.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
|
|
1232
|
+
const g = go({
|
|
1233
1233
|
delta: d,
|
|
1234
1234
|
disabled: !a
|
|
1235
|
-
}), [y,
|
|
1235
|
+
}), [y, h] = Or(), m = C({
|
|
1236
1236
|
x: 0,
|
|
1237
1237
|
y: 0
|
|
1238
1238
|
}), v = C({
|
|
1239
1239
|
x: 0,
|
|
1240
1240
|
y: 0
|
|
1241
|
-
}),
|
|
1241
|
+
}), p = F(() => {
|
|
1242
1242
|
switch (n) {
|
|
1243
1243
|
case te.Pointer:
|
|
1244
1244
|
return c ? {
|
|
@@ -1250,66 +1250,66 @@ function lo(t) {
|
|
|
1250
1250
|
case te.DraggableRect:
|
|
1251
1251
|
return o;
|
|
1252
1252
|
}
|
|
1253
|
-
}, [n, o, c]),
|
|
1254
|
-
const
|
|
1255
|
-
if (!
|
|
1253
|
+
}, [n, o, c]), D = C(null), E = I(() => {
|
|
1254
|
+
const x = D.current;
|
|
1255
|
+
if (!x)
|
|
1256
1256
|
return;
|
|
1257
|
-
const
|
|
1258
|
-
|
|
1259
|
-
}, []),
|
|
1260
|
-
|
|
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]);
|
|
1260
|
+
P(
|
|
1261
1261
|
() => {
|
|
1262
|
-
if (!a || !l.length || !
|
|
1263
|
-
|
|
1262
|
+
if (!a || !l.length || !p) {
|
|
1263
|
+
h();
|
|
1264
1264
|
return;
|
|
1265
1265
|
}
|
|
1266
|
-
for (const
|
|
1267
|
-
if ((r == null ? void 0 : r(
|
|
1266
|
+
for (const x of w) {
|
|
1267
|
+
if ((r == null ? void 0 : r(x)) === !1)
|
|
1268
1268
|
continue;
|
|
1269
|
-
const
|
|
1270
|
-
if (!
|
|
1269
|
+
const S = l.indexOf(x), M = u[S];
|
|
1270
|
+
if (!M)
|
|
1271
1271
|
continue;
|
|
1272
1272
|
const {
|
|
1273
|
-
direction:
|
|
1274
|
-
speed:
|
|
1275
|
-
} =
|
|
1273
|
+
direction: N,
|
|
1274
|
+
speed: L
|
|
1275
|
+
} = to(x, M, p, e, f);
|
|
1276
1276
|
for (const T of ["x", "y"])
|
|
1277
|
-
|
|
1278
|
-
if (
|
|
1279
|
-
|
|
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;
|
|
1280
1280
|
return;
|
|
1281
1281
|
}
|
|
1282
1282
|
}
|
|
1283
|
-
|
|
1283
|
+
m.current = {
|
|
1284
1284
|
x: 0,
|
|
1285
1285
|
y: 0
|
|
1286
1286
|
}, v.current = {
|
|
1287
1287
|
x: 0,
|
|
1288
1288
|
y: 0
|
|
1289
|
-
},
|
|
1289
|
+
}, h();
|
|
1290
1290
|
},
|
|
1291
1291
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1292
1292
|
[
|
|
1293
1293
|
e,
|
|
1294
1294
|
E,
|
|
1295
1295
|
r,
|
|
1296
|
-
|
|
1296
|
+
h,
|
|
1297
1297
|
a,
|
|
1298
1298
|
i,
|
|
1299
1299
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1300
|
-
JSON.stringify(
|
|
1300
|
+
JSON.stringify(p),
|
|
1301
1301
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1302
|
-
JSON.stringify(
|
|
1302
|
+
JSON.stringify(g),
|
|
1303
1303
|
y,
|
|
1304
1304
|
l,
|
|
1305
|
-
|
|
1305
|
+
w,
|
|
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
|
|
1312
|
+
const ho = {
|
|
1313
1313
|
x: {
|
|
1314
1314
|
[q.Backward]: !1,
|
|
1315
1315
|
[q.Forward]: !1
|
|
@@ -1319,15 +1319,15 @@ const uo = {
|
|
|
1319
1319
|
[q.Forward]: !1
|
|
1320
1320
|
}
|
|
1321
1321
|
};
|
|
1322
|
-
function
|
|
1322
|
+
function go(t) {
|
|
1323
1323
|
let {
|
|
1324
1324
|
delta: e,
|
|
1325
1325
|
disabled: n
|
|
1326
1326
|
} = t;
|
|
1327
|
-
const r =
|
|
1327
|
+
const r = be(e);
|
|
1328
1328
|
return ie((o) => {
|
|
1329
1329
|
if (n || !r || !o)
|
|
1330
|
-
return
|
|
1330
|
+
return ho;
|
|
1331
1331
|
const a = {
|
|
1332
1332
|
x: Math.sign(e.x - r.x),
|
|
1333
1333
|
y: Math.sign(e.y - r.y)
|
|
@@ -1344,14 +1344,14 @@ function fo(t) {
|
|
|
1344
1344
|
};
|
|
1345
1345
|
}, [n, e, r]);
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1347
|
+
function mo(t, e) {
|
|
1348
1348
|
const n = e != null ? t.get(e) : void 0, r = n ? n.node.current : null;
|
|
1349
1349
|
return ie((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
|
|
1354
|
+
function vo(t, e) {
|
|
1355
1355
|
return F(() => t.reduce((n, r) => {
|
|
1356
1356
|
const {
|
|
1357
1357
|
sensor: o
|
|
@@ -1366,70 +1366,70 @@ var re;
|
|
|
1366
1366
|
(function(t) {
|
|
1367
1367
|
t[t.Always = 0] = "Always", t[t.BeforeDragging = 1] = "BeforeDragging", t[t.WhileDragging = 2] = "WhileDragging";
|
|
1368
1368
|
})(re || (re = {}));
|
|
1369
|
-
var
|
|
1369
|
+
var $e;
|
|
1370
1370
|
(function(t) {
|
|
1371
1371
|
t.Optimized = "optimized";
|
|
1372
|
-
})(
|
|
1373
|
-
const
|
|
1374
|
-
function
|
|
1372
|
+
})($e || ($e = {}));
|
|
1373
|
+
const gn = /* @__PURE__ */ new Map();
|
|
1374
|
+
function yo(t, e) {
|
|
1375
1375
|
let {
|
|
1376
1376
|
dragging: n,
|
|
1377
1377
|
dependencies: r,
|
|
1378
1378
|
config: o
|
|
1379
1379
|
} = e;
|
|
1380
|
-
const [a, i] =
|
|
1380
|
+
const [a, i] = R(null), {
|
|
1381
1381
|
frequency: s,
|
|
1382
1382
|
measure: c,
|
|
1383
1383
|
strategy: l
|
|
1384
|
-
} = o, u = C(t), d =
|
|
1385
|
-
v === void 0 && (v = []), !f.current && i((
|
|
1386
|
-
}, [f]), y = C(null),
|
|
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) => {
|
|
1387
1387
|
if (d && !n)
|
|
1388
|
-
return
|
|
1389
|
-
if (!v || v ===
|
|
1390
|
-
const
|
|
1391
|
-
for (let
|
|
1392
|
-
if (!
|
|
1388
|
+
return gn;
|
|
1389
|
+
if (!v || v === gn || u.current !== t || a != null) {
|
|
1390
|
+
const p = /* @__PURE__ */ new Map();
|
|
1391
|
+
for (let D of t) {
|
|
1392
|
+
if (!D)
|
|
1393
1393
|
continue;
|
|
1394
|
-
if (a && a.length > 0 && !a.includes(
|
|
1395
|
-
|
|
1394
|
+
if (a && a.length > 0 && !a.includes(D.id) && D.rect.current) {
|
|
1395
|
+
p.set(D.id, D.rect.current);
|
|
1396
1396
|
continue;
|
|
1397
1397
|
}
|
|
1398
|
-
const E =
|
|
1399
|
-
|
|
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);
|
|
1400
1400
|
}
|
|
1401
|
-
return
|
|
1401
|
+
return p;
|
|
1402
1402
|
}
|
|
1403
1403
|
return v;
|
|
1404
1404
|
}, [t, a, n, d, c]);
|
|
1405
|
-
return
|
|
1405
|
+
return P(() => {
|
|
1406
1406
|
u.current = t;
|
|
1407
|
-
}, [t]),
|
|
1407
|
+
}, [t]), P(
|
|
1408
1408
|
() => {
|
|
1409
|
-
d ||
|
|
1409
|
+
d || g();
|
|
1410
1410
|
},
|
|
1411
1411
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1412
1412
|
[n, d]
|
|
1413
|
-
),
|
|
1413
|
+
), P(
|
|
1414
1414
|
() => {
|
|
1415
1415
|
a && a.length > 0 && i(null);
|
|
1416
1416
|
},
|
|
1417
1417
|
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1418
1418
|
[JSON.stringify(a)]
|
|
1419
|
-
),
|
|
1419
|
+
), P(
|
|
1420
1420
|
() => {
|
|
1421
1421
|
d || typeof s != "number" || y.current !== null || (y.current = setTimeout(() => {
|
|
1422
|
-
|
|
1422
|
+
g(), y.current = null;
|
|
1423
1423
|
}, s));
|
|
1424
1424
|
},
|
|
1425
1425
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1426
|
-
[s, d,
|
|
1426
|
+
[s, d, g, ...r]
|
|
1427
1427
|
), {
|
|
1428
|
-
droppableRects:
|
|
1429
|
-
measureDroppableContainers:
|
|
1428
|
+
droppableRects: h,
|
|
1429
|
+
measureDroppableContainers: g,
|
|
1430
1430
|
measuringScheduled: a != null
|
|
1431
1431
|
};
|
|
1432
|
-
function
|
|
1432
|
+
function m() {
|
|
1433
1433
|
switch (l) {
|
|
1434
1434
|
case re.Always:
|
|
1435
1435
|
return !1;
|
|
@@ -1440,18 +1440,18 @@ function mo(t, e) {
|
|
|
1440
1440
|
}
|
|
1441
1441
|
}
|
|
1442
1442
|
}
|
|
1443
|
-
function
|
|
1443
|
+
function Qe(t, e) {
|
|
1444
1444
|
return ie((n) => t ? n || (typeof e == "function" ? e(t) : t) : null, [e, t]);
|
|
1445
1445
|
}
|
|
1446
|
-
function
|
|
1447
|
-
return
|
|
1446
|
+
function bo(t, e) {
|
|
1447
|
+
return Qe(t, e);
|
|
1448
1448
|
}
|
|
1449
|
-
function
|
|
1449
|
+
function po(t) {
|
|
1450
1450
|
let {
|
|
1451
1451
|
callback: e,
|
|
1452
1452
|
disabled: n
|
|
1453
1453
|
} = t;
|
|
1454
|
-
const r =
|
|
1454
|
+
const r = Oe(e), o = F(() => {
|
|
1455
1455
|
if (n || typeof window > "u" || typeof window.MutationObserver > "u")
|
|
1456
1456
|
return;
|
|
1457
1457
|
const {
|
|
@@ -1459,14 +1459,14 @@ function yo(t) {
|
|
|
1459
1459
|
} = window;
|
|
1460
1460
|
return new a(r);
|
|
1461
1461
|
}, [r, n]);
|
|
1462
|
-
return
|
|
1462
|
+
return P(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
|
|
1463
1463
|
}
|
|
1464
|
-
function
|
|
1464
|
+
function ke(t) {
|
|
1465
1465
|
let {
|
|
1466
1466
|
callback: e,
|
|
1467
1467
|
disabled: n
|
|
1468
1468
|
} = t;
|
|
1469
|
-
const r =
|
|
1469
|
+
const r = Oe(e), o = F(
|
|
1470
1470
|
() => {
|
|
1471
1471
|
if (n || typeof window > "u" || typeof window.ResizeObserver > "u")
|
|
1472
1472
|
return;
|
|
@@ -1478,14 +1478,14 @@ function Ne(t) {
|
|
|
1478
1478
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1479
1479
|
[n]
|
|
1480
1480
|
);
|
|
1481
|
-
return
|
|
1481
|
+
return P(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
|
|
1482
1482
|
}
|
|
1483
|
-
function
|
|
1484
|
-
return new
|
|
1483
|
+
function wo(t) {
|
|
1484
|
+
return new Ge(se(t), t);
|
|
1485
1485
|
}
|
|
1486
|
-
function
|
|
1487
|
-
e === void 0 && (e =
|
|
1488
|
-
const [r, o] =
|
|
1486
|
+
function mn(t, e, n) {
|
|
1487
|
+
e === void 0 && (e = wo);
|
|
1488
|
+
const [r, o] = R(null);
|
|
1489
1489
|
function a() {
|
|
1490
1490
|
o((c) => {
|
|
1491
1491
|
if (!t)
|
|
@@ -1498,7 +1498,7 @@ function gn(t, e, n) {
|
|
|
1498
1498
|
return JSON.stringify(c) === JSON.stringify(u) ? c : u;
|
|
1499
1499
|
});
|
|
1500
1500
|
}
|
|
1501
|
-
const i =
|
|
1501
|
+
const i = po({
|
|
1502
1502
|
callback(c) {
|
|
1503
1503
|
if (t)
|
|
1504
1504
|
for (const l of c) {
|
|
@@ -1512,41 +1512,41 @@ function gn(t, e, n) {
|
|
|
1512
1512
|
}
|
|
1513
1513
|
}
|
|
1514
1514
|
}
|
|
1515
|
-
}), s =
|
|
1515
|
+
}), s = ke({
|
|
1516
1516
|
callback: a
|
|
1517
1517
|
});
|
|
1518
|
-
return
|
|
1518
|
+
return wt(() => {
|
|
1519
1519
|
a(), t ? (s == null || s.observe(t), i == null || i.observe(document.body, {
|
|
1520
1520
|
childList: !0,
|
|
1521
1521
|
subtree: !0
|
|
1522
1522
|
})) : (s == null || s.disconnect(), i == null || i.disconnect());
|
|
1523
1523
|
}, [t]), r;
|
|
1524
1524
|
}
|
|
1525
|
-
function
|
|
1526
|
-
const e =
|
|
1527
|
-
return
|
|
1525
|
+
function Do(t) {
|
|
1526
|
+
const e = Qe(t);
|
|
1527
|
+
return Fn(t, e);
|
|
1528
1528
|
}
|
|
1529
|
-
const
|
|
1530
|
-
function
|
|
1531
|
-
const e = C(t), n = ie((r) => t ? r && r !==
|
|
1532
|
-
return
|
|
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]);
|
|
1532
|
+
return P(() => {
|
|
1533
1533
|
e.current = t;
|
|
1534
1534
|
}, [t]), n;
|
|
1535
1535
|
}
|
|
1536
|
-
function
|
|
1537
|
-
const [e, n] =
|
|
1538
|
-
const i =
|
|
1539
|
-
i && n((s) => s ? (s.set(i,
|
|
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);
|
|
1540
1540
|
}, []);
|
|
1541
|
-
return
|
|
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 =
|
|
1546
|
+
const l = We(c);
|
|
1547
1547
|
return l ? (l.addEventListener("scroll", o, {
|
|
1548
1548
|
passive: !0
|
|
1549
|
-
}), [l,
|
|
1549
|
+
}), [l, Ie(l)]) : null;
|
|
1550
1550
|
}).filter((c) => c != null);
|
|
1551
1551
|
n(s.length ? new Map(s) : null), r.current = t;
|
|
1552
1552
|
}
|
|
@@ -1555,30 +1555,30 @@ function Do(t) {
|
|
|
1555
1555
|
};
|
|
1556
1556
|
function i(s) {
|
|
1557
1557
|
s.forEach((c) => {
|
|
1558
|
-
const l =
|
|
1558
|
+
const l = We(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) =>
|
|
1562
|
+
}, [o, t]), F(() => t.length ? e ? Array.from(e.values()).reduce((a, i) => zt(a, i), ut) : Hn(t) : ut, [t, e]);
|
|
1563
1563
|
}
|
|
1564
|
-
function
|
|
1564
|
+
function yn(t, e) {
|
|
1565
1565
|
e === void 0 && (e = []);
|
|
1566
1566
|
const n = C(null);
|
|
1567
|
-
return
|
|
1567
|
+
return P(
|
|
1568
1568
|
() => {
|
|
1569
1569
|
n.current = null;
|
|
1570
1570
|
},
|
|
1571
1571
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1572
1572
|
e
|
|
1573
|
-
),
|
|
1574
|
-
const r = t !==
|
|
1573
|
+
), P(() => {
|
|
1574
|
+
const r = t !== ut;
|
|
1575
1575
|
r && !n.current && (n.current = t), !r && n.current && (n.current = null);
|
|
1576
|
-
}, [t]), n.current ?
|
|
1576
|
+
}, [t]), n.current ? pe(t, n.current) : ut;
|
|
1577
1577
|
}
|
|
1578
|
-
function
|
|
1579
|
-
|
|
1578
|
+
function xo(t) {
|
|
1579
|
+
P(
|
|
1580
1580
|
() => {
|
|
1581
|
-
if (!
|
|
1581
|
+
if (!Ee)
|
|
1582
1582
|
return;
|
|
1583
1583
|
const e = t.map((n) => {
|
|
1584
1584
|
let {
|
|
@@ -1601,7 +1601,7 @@ function Mo(t) {
|
|
|
1601
1601
|
})
|
|
1602
1602
|
);
|
|
1603
1603
|
}
|
|
1604
|
-
function
|
|
1604
|
+
function Eo(t, e) {
|
|
1605
1605
|
return F(() => t.reduce((n, r) => {
|
|
1606
1606
|
let {
|
|
1607
1607
|
eventName: o,
|
|
@@ -1612,24 +1612,24 @@ function xo(t, e) {
|
|
|
1612
1612
|
}, n;
|
|
1613
1613
|
}, {}), [t, e]);
|
|
1614
1614
|
}
|
|
1615
|
-
function
|
|
1616
|
-
return F(() => t ?
|
|
1615
|
+
function Kn(t) {
|
|
1616
|
+
return F(() => t ? Ur(t) : null, [t]);
|
|
1617
1617
|
}
|
|
1618
|
-
const
|
|
1619
|
-
function
|
|
1618
|
+
const bn = [];
|
|
1619
|
+
function Oo(t, e) {
|
|
1620
1620
|
e === void 0 && (e = se);
|
|
1621
|
-
const [n] = t, r =
|
|
1621
|
+
const [n] = t, r = Kn(n ? U(n) : null), [o, a] = R(bn);
|
|
1622
1622
|
function i() {
|
|
1623
|
-
a(() => t.length ? t.map((c) =>
|
|
1623
|
+
a(() => t.length ? t.map((c) => jn(c) ? r : new Ge(e(c), c)) : bn);
|
|
1624
1624
|
}
|
|
1625
|
-
const s =
|
|
1625
|
+
const s = ke({
|
|
1626
1626
|
callback: i
|
|
1627
1627
|
});
|
|
1628
|
-
return
|
|
1628
|
+
return wt(() => {
|
|
1629
1629
|
s == null || s.disconnect(), i(), t.forEach((c) => s == null ? void 0 : s.observe(c));
|
|
1630
1630
|
}, [t]), o;
|
|
1631
1631
|
}
|
|
1632
|
-
function
|
|
1632
|
+
function Un(t) {
|
|
1633
1633
|
if (!t)
|
|
1634
1634
|
return null;
|
|
1635
1635
|
if (t.children.length > 1)
|
|
@@ -1637,11 +1637,11 @@ function _n(t) {
|
|
|
1637
1637
|
const e = t.children[0];
|
|
1638
1638
|
return ae(e) ? e : t;
|
|
1639
1639
|
}
|
|
1640
|
-
function
|
|
1640
|
+
function No(t) {
|
|
1641
1641
|
let {
|
|
1642
1642
|
measure: e
|
|
1643
1643
|
} = t;
|
|
1644
|
-
const [n, r] =
|
|
1644
|
+
const [n, r] = R(null), o = I((l) => {
|
|
1645
1645
|
for (const {
|
|
1646
1646
|
target: u
|
|
1647
1647
|
} of l)
|
|
@@ -1656,34 +1656,34 @@ function Eo(t) {
|
|
|
1656
1656
|
});
|
|
1657
1657
|
break;
|
|
1658
1658
|
}
|
|
1659
|
-
}, [e]), a =
|
|
1659
|
+
}, [e]), a = ke({
|
|
1660
1660
|
callback: o
|
|
1661
1661
|
}), i = I((l) => {
|
|
1662
|
-
const u =
|
|
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] =
|
|
1664
|
+
}, [e, a]), [s, c] = ye(i);
|
|
1665
1665
|
return F(() => ({
|
|
1666
1666
|
nodeRef: s,
|
|
1667
1667
|
rect: n,
|
|
1668
1668
|
setRef: c
|
|
1669
1669
|
}), [n, s, c]);
|
|
1670
1670
|
}
|
|
1671
|
-
const
|
|
1672
|
-
sensor:
|
|
1671
|
+
const ko = [{
|
|
1672
|
+
sensor: Ue,
|
|
1673
1673
|
options: {}
|
|
1674
1674
|
}, {
|
|
1675
|
-
sensor:
|
|
1675
|
+
sensor: Vn,
|
|
1676
1676
|
options: {}
|
|
1677
|
-
}],
|
|
1677
|
+
}], Co = {
|
|
1678
1678
|
current: {}
|
|
1679
|
-
},
|
|
1679
|
+
}, ve = {
|
|
1680
1680
|
draggable: {
|
|
1681
|
-
measure:
|
|
1681
|
+
measure: un
|
|
1682
1682
|
},
|
|
1683
1683
|
droppable: {
|
|
1684
|
-
measure:
|
|
1684
|
+
measure: un,
|
|
1685
1685
|
strategy: re.WhileDragging,
|
|
1686
|
-
frequency:
|
|
1686
|
+
frequency: $e.Optimized
|
|
1687
1687
|
},
|
|
1688
1688
|
dragOverlay: {
|
|
1689
1689
|
measure: se
|
|
@@ -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
|
|
1713
|
+
const To = {
|
|
1714
1714
|
activatorEvent: null,
|
|
1715
1715
|
active: null,
|
|
1716
1716
|
activeNode: null,
|
|
@@ -1726,15 +1726,15 @@ const Co = {
|
|
|
1726
1726
|
current: null
|
|
1727
1727
|
},
|
|
1728
1728
|
rect: null,
|
|
1729
|
-
setRef:
|
|
1729
|
+
setRef: De
|
|
1730
1730
|
},
|
|
1731
1731
|
scrollableAncestors: [],
|
|
1732
1732
|
scrollableAncestorRects: [],
|
|
1733
|
-
measuringConfiguration:
|
|
1734
|
-
measureDroppableContainers:
|
|
1733
|
+
measuringConfiguration: ve,
|
|
1734
|
+
measureDroppableContainers: De,
|
|
1735
1735
|
windowRect: null,
|
|
1736
1736
|
measuringScheduled: !1
|
|
1737
|
-
},
|
|
1737
|
+
}, Qn = {
|
|
1738
1738
|
activatorEvent: null,
|
|
1739
1739
|
activators: [],
|
|
1740
1740
|
active: null,
|
|
@@ -1742,12 +1742,12 @@ const Co = {
|
|
|
1742
1742
|
ariaDescribedById: {
|
|
1743
1743
|
draggable: ""
|
|
1744
1744
|
},
|
|
1745
|
-
dispatch:
|
|
1745
|
+
dispatch: De,
|
|
1746
1746
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
1747
1747
|
over: null,
|
|
1748
|
-
measureDroppableContainers:
|
|
1749
|
-
}, ce = /* @__PURE__ */ oe(
|
|
1750
|
-
function
|
|
1748
|
+
measureDroppableContainers: De
|
|
1749
|
+
}, ce = /* @__PURE__ */ oe(Qn), Jn = /* @__PURE__ */ oe(To);
|
|
1750
|
+
function Po() {
|
|
1751
1751
|
return {
|
|
1752
1752
|
draggable: {
|
|
1753
1753
|
active: null,
|
|
@@ -1766,9 +1766,9 @@ function ko() {
|
|
|
1766
1766
|
}
|
|
1767
1767
|
};
|
|
1768
1768
|
}
|
|
1769
|
-
function
|
|
1769
|
+
function Ro(t, e) {
|
|
1770
1770
|
switch (e.type) {
|
|
1771
|
-
case
|
|
1771
|
+
case X.DragStart:
|
|
1772
1772
|
return {
|
|
1773
1773
|
...t,
|
|
1774
1774
|
draggable: {
|
|
@@ -1777,7 +1777,7 @@ function To(t, e) {
|
|
|
1777
1777
|
active: e.active
|
|
1778
1778
|
}
|
|
1779
1779
|
};
|
|
1780
|
-
case
|
|
1780
|
+
case X.DragMove:
|
|
1781
1781
|
return t.draggable.active == null ? t : {
|
|
1782
1782
|
...t,
|
|
1783
1783
|
draggable: {
|
|
@@ -1788,8 +1788,8 @@ function To(t, e) {
|
|
|
1788
1788
|
}
|
|
1789
1789
|
}
|
|
1790
1790
|
};
|
|
1791
|
-
case
|
|
1792
|
-
case
|
|
1791
|
+
case X.DragEnd:
|
|
1792
|
+
case X.DragCancel:
|
|
1793
1793
|
return {
|
|
1794
1794
|
...t,
|
|
1795
1795
|
draggable: {
|
|
@@ -1805,7 +1805,7 @@ function To(t, e) {
|
|
|
1805
1805
|
}
|
|
1806
1806
|
}
|
|
1807
1807
|
};
|
|
1808
|
-
case
|
|
1808
|
+
case X.RegisterDroppable: {
|
|
1809
1809
|
const {
|
|
1810
1810
|
element: n
|
|
1811
1811
|
} = e, {
|
|
@@ -1819,7 +1819,7 @@ function To(t, e) {
|
|
|
1819
1819
|
}
|
|
1820
1820
|
};
|
|
1821
1821
|
}
|
|
1822
|
-
case
|
|
1822
|
+
case X.SetDroppableDisabled: {
|
|
1823
1823
|
const {
|
|
1824
1824
|
id: n,
|
|
1825
1825
|
key: r,
|
|
@@ -1839,7 +1839,7 @@ function To(t, e) {
|
|
|
1839
1839
|
}
|
|
1840
1840
|
};
|
|
1841
1841
|
}
|
|
1842
|
-
case
|
|
1842
|
+
case X.UnregisterDroppable: {
|
|
1843
1843
|
const {
|
|
1844
1844
|
id: n,
|
|
1845
1845
|
key: r
|
|
@@ -1859,7 +1859,7 @@ function To(t, e) {
|
|
|
1859
1859
|
return t;
|
|
1860
1860
|
}
|
|
1861
1861
|
}
|
|
1862
|
-
function
|
|
1862
|
+
function Ao(t) {
|
|
1863
1863
|
let {
|
|
1864
1864
|
disabled: e
|
|
1865
1865
|
} = t;
|
|
@@ -1867,10 +1867,10 @@ function Po(t) {
|
|
|
1867
1867
|
active: n,
|
|
1868
1868
|
activatorEvent: r,
|
|
1869
1869
|
draggableNodes: o
|
|
1870
|
-
} =
|
|
1871
|
-
return
|
|
1870
|
+
} = At(ce), a = be(r), i = be(n == null ? void 0 : n.id);
|
|
1871
|
+
return P(() => {
|
|
1872
1872
|
if (!e && !r && a && i != null) {
|
|
1873
|
-
if (!
|
|
1873
|
+
if (!_e(a) || document.activeElement === a.target)
|
|
1874
1874
|
return;
|
|
1875
1875
|
const s = o.get(i);
|
|
1876
1876
|
if (!s)
|
|
@@ -1885,7 +1885,7 @@ function Po(t) {
|
|
|
1885
1885
|
for (const u of [c.current, l.current]) {
|
|
1886
1886
|
if (!u)
|
|
1887
1887
|
continue;
|
|
1888
|
-
const d =
|
|
1888
|
+
const d = Cr(u);
|
|
1889
1889
|
if (d) {
|
|
1890
1890
|
d.focus();
|
|
1891
1891
|
break;
|
|
@@ -1895,7 +1895,7 @@ function Po(t) {
|
|
|
1895
1895
|
}
|
|
1896
1896
|
}, [r, e, o, i, a]), null;
|
|
1897
1897
|
}
|
|
1898
|
-
function
|
|
1898
|
+
function Zn(t, e) {
|
|
1899
1899
|
let {
|
|
1900
1900
|
transform: n,
|
|
1901
1901
|
...r
|
|
@@ -1905,19 +1905,19 @@ function Kn(t, e) {
|
|
|
1905
1905
|
...r
|
|
1906
1906
|
}), n) : n;
|
|
1907
1907
|
}
|
|
1908
|
-
function
|
|
1908
|
+
function Wo(t) {
|
|
1909
1909
|
return F(
|
|
1910
1910
|
() => ({
|
|
1911
1911
|
draggable: {
|
|
1912
|
-
...
|
|
1912
|
+
...ve.draggable,
|
|
1913
1913
|
...t == null ? void 0 : t.draggable
|
|
1914
1914
|
},
|
|
1915
1915
|
droppable: {
|
|
1916
|
-
...
|
|
1916
|
+
...ve.droppable,
|
|
1917
1917
|
...t == null ? void 0 : t.droppable
|
|
1918
1918
|
},
|
|
1919
1919
|
dragOverlay: {
|
|
1920
|
-
...
|
|
1920
|
+
...ve.dragOverlay,
|
|
1921
1921
|
...t == null ? void 0 : t.dragOverlay
|
|
1922
1922
|
}
|
|
1923
1923
|
}),
|
|
@@ -1925,7 +1925,7 @@ function Ro(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
|
|
1928
|
+
function Lo(t) {
|
|
1929
1929
|
let {
|
|
1930
1930
|
activeNode: e,
|
|
1931
1931
|
measure: n,
|
|
@@ -1939,7 +1939,7 @@ function Ao(t) {
|
|
|
1939
1939
|
x: o,
|
|
1940
1940
|
y: o
|
|
1941
1941
|
} : o;
|
|
1942
|
-
|
|
1942
|
+
wt(() => {
|
|
1943
1943
|
if (!i && !s || !e) {
|
|
1944
1944
|
a.current = !1;
|
|
1945
1945
|
return;
|
|
@@ -1949,9 +1949,9 @@ function Ao(t) {
|
|
|
1949
1949
|
const l = e == null ? void 0 : e.node.current;
|
|
1950
1950
|
if (!l || l.isConnected === !1)
|
|
1951
1951
|
return;
|
|
1952
|
-
const u = n(l), d =
|
|
1952
|
+
const u = n(l), d = Fn(u, r);
|
|
1953
1953
|
if (i || (d.x = 0), s || (d.y = 0), a.current = !0, Math.abs(d.x) > 0 || Math.abs(d.y) > 0) {
|
|
1954
|
-
const f =
|
|
1954
|
+
const f = Bn(l);
|
|
1955
1955
|
f && f.scrollBy({
|
|
1956
1956
|
top: d.y,
|
|
1957
1957
|
left: d.x
|
|
@@ -1960,218 +1960,218 @@ function Ao(t) {
|
|
|
1960
1960
|
}, [e, i, s, r, n]);
|
|
1961
1961
|
}
|
|
1962
1962
|
const Ce = /* @__PURE__ */ oe({
|
|
1963
|
-
...
|
|
1963
|
+
...ut,
|
|
1964
1964
|
scaleX: 1,
|
|
1965
1965
|
scaleY: 1
|
|
1966
1966
|
});
|
|
1967
|
-
var
|
|
1967
|
+
var kt;
|
|
1968
1968
|
(function(t) {
|
|
1969
1969
|
t[t.Uninitialized = 0] = "Uninitialized", t[t.Initializing = 1] = "Initializing", t[t.Initialized = 2] = "Initialized";
|
|
1970
|
-
})(
|
|
1971
|
-
const
|
|
1970
|
+
})(kt || (kt = {}));
|
|
1971
|
+
const Yo = /* @__PURE__ */ Dr(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 =
|
|
1979
|
-
collisionDetection: d =
|
|
1978
|
+
sensors: u = ko,
|
|
1979
|
+
collisionDetection: d = Hr,
|
|
1980
1980
|
measuring: f,
|
|
1981
|
-
modifiers:
|
|
1981
|
+
modifiers: g,
|
|
1982
1982
|
...y
|
|
1983
1983
|
} = e;
|
|
1984
|
-
const
|
|
1984
|
+
const h = Mr(Ro, void 0, Po), [m, v] = h, [p, D] = Lr(), [E, w] = R(kt.Uninitialized), x = E === kt.Initialized, {
|
|
1985
1985
|
draggable: {
|
|
1986
|
-
active:
|
|
1987
|
-
nodes:
|
|
1988
|
-
translate:
|
|
1986
|
+
active: S,
|
|
1987
|
+
nodes: M,
|
|
1988
|
+
translate: N
|
|
1989
1989
|
},
|
|
1990
1990
|
droppable: {
|
|
1991
|
-
containers:
|
|
1991
|
+
containers: L
|
|
1992
1992
|
}
|
|
1993
|
-
} =
|
|
1993
|
+
} = m, T = S != null ? M.get(S) : null, G = C({
|
|
1994
1994
|
initial: null,
|
|
1995
1995
|
translated: null
|
|
1996
|
-
}),
|
|
1997
|
-
var
|
|
1998
|
-
return
|
|
1999
|
-
id:
|
|
1996
|
+
}), K = F(() => {
|
|
1997
|
+
var V;
|
|
1998
|
+
return S != null ? {
|
|
1999
|
+
id: S,
|
|
2000
2000
|
// It's possible for the active node to unmount while dragging
|
|
2001
|
-
data: (
|
|
2002
|
-
rect:
|
|
2001
|
+
data: (V = T == null ? void 0 : T.data) != null ? V : Co,
|
|
2002
|
+
rect: G
|
|
2003
2003
|
} : null;
|
|
2004
|
-
}, [
|
|
2005
|
-
droppableRects:
|
|
2006
|
-
measureDroppableContainers:
|
|
2007
|
-
measuringScheduled:
|
|
2008
|
-
} =
|
|
2009
|
-
dragging:
|
|
2010
|
-
dependencies: [
|
|
2011
|
-
config:
|
|
2012
|
-
}),
|
|
2013
|
-
|
|
2014
|
-
activeNode:
|
|
2015
|
-
config:
|
|
2016
|
-
initialRect:
|
|
2017
|
-
measure:
|
|
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
|
|
2018
2018
|
});
|
|
2019
|
-
const
|
|
2019
|
+
const $ = mn(H, ft.draggable.measure, _t), ht = mn(H ? H.parentElement : null), J = C({
|
|
2020
2020
|
activatorEvent: null,
|
|
2021
2021
|
active: null,
|
|
2022
|
-
activeNode:
|
|
2022
|
+
activeNode: H,
|
|
2023
2023
|
collisionRect: null,
|
|
2024
2024
|
collisions: null,
|
|
2025
|
-
droppableRects:
|
|
2026
|
-
draggableNodes:
|
|
2025
|
+
droppableRects: yt,
|
|
2026
|
+
draggableNodes: M,
|
|
2027
2027
|
draggingNode: null,
|
|
2028
2028
|
draggingNodeRect: null,
|
|
2029
|
-
droppableContainers:
|
|
2029
|
+
droppableContainers: L,
|
|
2030
2030
|
over: null,
|
|
2031
2031
|
scrollableAncestors: [],
|
|
2032
2032
|
scrollAdjustedTranslate: null
|
|
2033
|
-
}),
|
|
2034
|
-
measure:
|
|
2035
|
-
}),
|
|
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, {
|
|
2036
2036
|
transform: {
|
|
2037
|
-
x:
|
|
2038
|
-
y:
|
|
2037
|
+
x: N.x - tn.x,
|
|
2038
|
+
y: N.y - tn.y,
|
|
2039
2039
|
scaleX: 1,
|
|
2040
2040
|
scaleY: 1
|
|
2041
2041
|
},
|
|
2042
|
-
activatorEvent:
|
|
2043
|
-
active:
|
|
2044
|
-
activeNodeRect:
|
|
2042
|
+
activatorEvent: lt,
|
|
2043
|
+
active: K,
|
|
2044
|
+
activeNodeRect: $,
|
|
2045
2045
|
containerNodeRect: ht,
|
|
2046
|
-
draggingNodeRect:
|
|
2047
|
-
over:
|
|
2048
|
-
overlayNodeRect:
|
|
2049
|
-
scrollableAncestors:
|
|
2050
|
-
scrollableAncestorRects:
|
|
2051
|
-
windowRect:
|
|
2052
|
-
}), en =
|
|
2053
|
-
active:
|
|
2054
|
-
collisionRect:
|
|
2055
|
-
droppableRects:
|
|
2056
|
-
droppableContainers:
|
|
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,
|
|
2057
2057
|
pointerCoordinates: en
|
|
2058
|
-
}) : null, rn =
|
|
2059
|
-
(
|
|
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) => {
|
|
2060
2060
|
let {
|
|
2061
2061
|
sensor: tt,
|
|
2062
|
-
options:
|
|
2062
|
+
options: xt
|
|
2063
2063
|
} = Z;
|
|
2064
|
-
if (
|
|
2064
|
+
if (j.current == null)
|
|
2065
2065
|
return;
|
|
2066
|
-
const at =
|
|
2066
|
+
const at = M.get(j.current);
|
|
2067
2067
|
if (!at)
|
|
2068
2068
|
return;
|
|
2069
|
-
const et =
|
|
2070
|
-
active:
|
|
2069
|
+
const et = V.nativeEvent, gt = new tt({
|
|
2070
|
+
active: j.current,
|
|
2071
2071
|
activeNode: at,
|
|
2072
2072
|
event: et,
|
|
2073
|
-
options:
|
|
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:
|
|
2077
|
-
onAbort(
|
|
2078
|
-
if (!
|
|
2076
|
+
context: J,
|
|
2077
|
+
onAbort(_) {
|
|
2078
|
+
if (!M.get(_))
|
|
2079
2079
|
return;
|
|
2080
2080
|
const {
|
|
2081
2081
|
onDragAbort: mt
|
|
2082
|
-
} =
|
|
2083
|
-
id:
|
|
2082
|
+
} = vt.current, pt = {
|
|
2083
|
+
id: _
|
|
2084
2084
|
};
|
|
2085
|
-
mt == null || mt(
|
|
2085
|
+
mt == null || mt(pt), p({
|
|
2086
2086
|
type: "onDragAbort",
|
|
2087
|
-
event:
|
|
2087
|
+
event: pt
|
|
2088
2088
|
});
|
|
2089
2089
|
},
|
|
2090
|
-
onPending(
|
|
2091
|
-
if (!
|
|
2090
|
+
onPending(_, Et, mt, pt) {
|
|
2091
|
+
if (!M.get(_))
|
|
2092
2092
|
return;
|
|
2093
2093
|
const {
|
|
2094
2094
|
onDragPending: Kt
|
|
2095
|
-
} =
|
|
2096
|
-
id:
|
|
2097
|
-
constraint:
|
|
2095
|
+
} = vt.current, Ot = {
|
|
2096
|
+
id: _,
|
|
2097
|
+
constraint: Et,
|
|
2098
2098
|
initialCoordinates: mt,
|
|
2099
|
-
offset:
|
|
2099
|
+
offset: pt
|
|
2100
2100
|
};
|
|
2101
|
-
Kt == null || Kt(
|
|
2101
|
+
Kt == null || Kt(Ot), p({
|
|
2102
2102
|
type: "onDragPending",
|
|
2103
|
-
event:
|
|
2103
|
+
event: Ot
|
|
2104
2104
|
});
|
|
2105
2105
|
},
|
|
2106
|
-
onStart(
|
|
2107
|
-
const
|
|
2108
|
-
if (
|
|
2106
|
+
onStart(_) {
|
|
2107
|
+
const Et = j.current;
|
|
2108
|
+
if (Et == null)
|
|
2109
2109
|
return;
|
|
2110
|
-
const mt =
|
|
2110
|
+
const mt = M.get(Et);
|
|
2111
2111
|
if (!mt)
|
|
2112
2112
|
return;
|
|
2113
2113
|
const {
|
|
2114
|
-
onDragStart:
|
|
2115
|
-
} =
|
|
2114
|
+
onDragStart: pt
|
|
2115
|
+
} = vt.current, Gt = {
|
|
2116
2116
|
activatorEvent: et,
|
|
2117
2117
|
active: {
|
|
2118
|
-
id:
|
|
2118
|
+
id: Et,
|
|
2119
2119
|
data: mt.data,
|
|
2120
|
-
rect:
|
|
2120
|
+
rect: G
|
|
2121
2121
|
}
|
|
2122
2122
|
};
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
type:
|
|
2126
|
-
initialCoordinates:
|
|
2127
|
-
active:
|
|
2128
|
-
}),
|
|
2123
|
+
ge(() => {
|
|
2124
|
+
pt == null || pt(Gt), w(kt.Initializing), v({
|
|
2125
|
+
type: X.DragStart,
|
|
2126
|
+
initialCoordinates: _,
|
|
2127
|
+
active: Et
|
|
2128
|
+
}), p({
|
|
2129
2129
|
type: "onDragStart",
|
|
2130
2130
|
event: Gt
|
|
2131
|
-
}),
|
|
2131
|
+
}), dt(Pe.current), ue(et);
|
|
2132
2132
|
});
|
|
2133
2133
|
},
|
|
2134
|
-
onMove(
|
|
2134
|
+
onMove(_) {
|
|
2135
2135
|
v({
|
|
2136
|
-
type:
|
|
2137
|
-
coordinates:
|
|
2136
|
+
type: X.DragMove,
|
|
2137
|
+
coordinates: _
|
|
2138
2138
|
});
|
|
2139
2139
|
},
|
|
2140
|
-
onEnd:
|
|
2141
|
-
onCancel:
|
|
2140
|
+
onEnd: It(X.DragEnd),
|
|
2141
|
+
onCancel: It(X.DragCancel)
|
|
2142
2142
|
});
|
|
2143
|
-
|
|
2144
|
-
function
|
|
2143
|
+
Pe.current = gt;
|
|
2144
|
+
function It(_) {
|
|
2145
2145
|
return async function() {
|
|
2146
2146
|
const {
|
|
2147
2147
|
active: mt,
|
|
2148
|
-
collisions:
|
|
2148
|
+
collisions: pt,
|
|
2149
2149
|
over: Gt,
|
|
2150
2150
|
scrollAdjustedTranslate: Kt
|
|
2151
|
-
} =
|
|
2152
|
-
let
|
|
2151
|
+
} = J.current;
|
|
2152
|
+
let Ot = null;
|
|
2153
2153
|
if (mt && Kt) {
|
|
2154
2154
|
const {
|
|
2155
2155
|
cancelDrop: Ut
|
|
2156
|
-
} =
|
|
2157
|
-
|
|
2156
|
+
} = vt.current;
|
|
2157
|
+
Ot = {
|
|
2158
2158
|
activatorEvent: et,
|
|
2159
2159
|
active: mt,
|
|
2160
|
-
collisions:
|
|
2160
|
+
collisions: pt,
|
|
2161
2161
|
delta: Kt,
|
|
2162
2162
|
over: Gt
|
|
2163
|
-
},
|
|
2163
|
+
}, _ === X.DragEnd && typeof Ut == "function" && await Promise.resolve(Ut(Ot)) && (_ = X.DragCancel);
|
|
2164
2164
|
}
|
|
2165
|
-
|
|
2165
|
+
j.current = null, ge(() => {
|
|
2166
2166
|
v({
|
|
2167
|
-
type:
|
|
2168
|
-
}),
|
|
2169
|
-
const Ut =
|
|
2170
|
-
if (
|
|
2171
|
-
const
|
|
2172
|
-
|
|
2167
|
+
type: _
|
|
2168
|
+
}), w(kt.Uninitialized), on(null), dt(null), ue(null), Pe.current = null;
|
|
2169
|
+
const Ut = _ === X.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
2170
|
+
if (Ot) {
|
|
2171
|
+
const Re = vt.current[Ut];
|
|
2172
|
+
Re == null || Re(Ot), p({
|
|
2173
2173
|
type: Ut,
|
|
2174
|
-
event:
|
|
2174
|
+
event: Ot
|
|
2175
2175
|
});
|
|
2176
2176
|
}
|
|
2177
2177
|
});
|
|
@@ -2179,12 +2179,12 @@ const Wo = /* @__PURE__ */ yr(function(e) {
|
|
|
2179
2179
|
}
|
|
2180
2180
|
},
|
|
2181
2181
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2182
|
-
[
|
|
2183
|
-
),
|
|
2184
|
-
const at = tt.nativeEvent, et =
|
|
2182
|
+
[M]
|
|
2183
|
+
), vr = I((V, Z) => (tt, xt) => {
|
|
2184
|
+
const at = tt.nativeEvent, et = M.get(xt);
|
|
2185
2185
|
if (
|
|
2186
2186
|
// Another sensor is already instantiating
|
|
2187
|
-
|
|
2187
|
+
j.current !== null || // No active draggable
|
|
2188
2188
|
!et || // Event has already been captured
|
|
2189
2189
|
at.dndKit || at.defaultPrevented
|
|
2190
2190
|
)
|
|
@@ -2192,154 +2192,154 @@ const Wo = /* @__PURE__ */ yr(function(e) {
|
|
|
2192
2192
|
const gt = {
|
|
2193
2193
|
active: et
|
|
2194
2194
|
};
|
|
2195
|
-
|
|
2195
|
+
V(tt, Z.options, gt) === !0 && (at.dndKit = {
|
|
2196
2196
|
capturedBy: Z.sensor
|
|
2197
|
-
},
|
|
2198
|
-
}, [
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
}, [
|
|
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(
|
|
2202
2202
|
() => {
|
|
2203
2203
|
const {
|
|
2204
|
-
onDragMove:
|
|
2205
|
-
} =
|
|
2204
|
+
onDragMove: V
|
|
2205
|
+
} = vt.current, {
|
|
2206
2206
|
active: Z,
|
|
2207
2207
|
activatorEvent: tt,
|
|
2208
|
-
collisions:
|
|
2208
|
+
collisions: xt,
|
|
2209
2209
|
over: at
|
|
2210
|
-
} =
|
|
2210
|
+
} = J.current;
|
|
2211
2211
|
if (!Z || !tt)
|
|
2212
2212
|
return;
|
|
2213
2213
|
const et = {
|
|
2214
2214
|
active: Z,
|
|
2215
2215
|
activatorEvent: tt,
|
|
2216
|
-
collisions:
|
|
2216
|
+
collisions: xt,
|
|
2217
2217
|
delta: {
|
|
2218
|
-
x:
|
|
2219
|
-
y:
|
|
2218
|
+
x: Yt.x,
|
|
2219
|
+
y: Yt.y
|
|
2220
2220
|
},
|
|
2221
2221
|
over: at
|
|
2222
2222
|
};
|
|
2223
|
-
|
|
2224
|
-
|
|
2223
|
+
ge(() => {
|
|
2224
|
+
V == null || V(et), p({
|
|
2225
2225
|
type: "onDragMove",
|
|
2226
2226
|
event: et
|
|
2227
2227
|
});
|
|
2228
2228
|
});
|
|
2229
2229
|
},
|
|
2230
2230
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2231
|
-
[
|
|
2232
|
-
),
|
|
2231
|
+
[Yt.x, Yt.y]
|
|
2232
|
+
), P(
|
|
2233
2233
|
() => {
|
|
2234
2234
|
const {
|
|
2235
|
-
active:
|
|
2235
|
+
active: V,
|
|
2236
2236
|
activatorEvent: Z,
|
|
2237
2237
|
collisions: tt,
|
|
2238
|
-
droppableContainers:
|
|
2238
|
+
droppableContainers: xt,
|
|
2239
2239
|
scrollAdjustedTranslate: at
|
|
2240
|
-
} =
|
|
2241
|
-
if (!
|
|
2240
|
+
} = J.current;
|
|
2241
|
+
if (!V || j.current == null || !Z || !at)
|
|
2242
2242
|
return;
|
|
2243
2243
|
const {
|
|
2244
2244
|
onDragOver: et
|
|
2245
|
-
} =
|
|
2245
|
+
} = vt.current, gt = xt.get(rn), It = 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,
|
|
2251
|
-
active:
|
|
2250
|
+
} : null, _ = {
|
|
2251
|
+
active: V,
|
|
2252
2252
|
activatorEvent: Z,
|
|
2253
2253
|
collisions: tt,
|
|
2254
2254
|
delta: {
|
|
2255
2255
|
x: at.x,
|
|
2256
2256
|
y: at.y
|
|
2257
2257
|
},
|
|
2258
|
-
over:
|
|
2258
|
+
over: It
|
|
2259
2259
|
};
|
|
2260
|
-
|
|
2261
|
-
on(
|
|
2260
|
+
ge(() => {
|
|
2261
|
+
on(It), et == null || et(_), p({
|
|
2262
2262
|
type: "onDragOver",
|
|
2263
|
-
event:
|
|
2263
|
+
event: _
|
|
2264
2264
|
});
|
|
2265
2265
|
});
|
|
2266
2266
|
},
|
|
2267
2267
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2268
2268
|
[rn]
|
|
2269
|
-
),
|
|
2270
|
-
|
|
2271
|
-
activatorEvent:
|
|
2272
|
-
active:
|
|
2273
|
-
activeNode:
|
|
2274
|
-
collisionRect:
|
|
2269
|
+
), wt(() => {
|
|
2270
|
+
J.current = {
|
|
2271
|
+
activatorEvent: lt,
|
|
2272
|
+
active: K,
|
|
2273
|
+
activeNode: H,
|
|
2274
|
+
collisionRect: Ft,
|
|
2275
2275
|
collisions: Vt,
|
|
2276
|
-
droppableRects:
|
|
2277
|
-
draggableNodes:
|
|
2278
|
-
draggingNode:
|
|
2279
|
-
draggingNodeRect:
|
|
2280
|
-
droppableContainers:
|
|
2281
|
-
over:
|
|
2282
|
-
scrollableAncestors:
|
|
2283
|
-
scrollAdjustedTranslate:
|
|
2284
|
-
},
|
|
2285
|
-
initial:
|
|
2286
|
-
translated:
|
|
2276
|
+
droppableRects: yt,
|
|
2277
|
+
draggableNodes: M,
|
|
2278
|
+
draggingNode: Dt,
|
|
2279
|
+
draggingNodeRect: ot,
|
|
2280
|
+
droppableContainers: L,
|
|
2281
|
+
over: St,
|
|
2282
|
+
scrollableAncestors: Mt,
|
|
2283
|
+
scrollAdjustedTranslate: Yt
|
|
2284
|
+
}, G.current = {
|
|
2285
|
+
initial: ot,
|
|
2286
|
+
translated: Ft
|
|
2287
2287
|
};
|
|
2288
|
-
}, [
|
|
2289
|
-
...
|
|
2290
|
-
delta:
|
|
2291
|
-
draggingRect:
|
|
2288
|
+
}, [K, H, Vt, Ft, M, Dt, ot, yt, L, St, Mt, Yt]), fo({
|
|
2289
|
+
...qt,
|
|
2290
|
+
delta: N,
|
|
2291
|
+
draggingRect: Ft,
|
|
2292
2292
|
pointerCoordinates: en,
|
|
2293
|
-
scrollableAncestors:
|
|
2294
|
-
scrollableAncestorRects:
|
|
2293
|
+
scrollableAncestors: Mt,
|
|
2294
|
+
scrollableAncestorRects: fe
|
|
2295
2295
|
});
|
|
2296
|
-
const
|
|
2297
|
-
active:
|
|
2298
|
-
activeNode:
|
|
2299
|
-
activeNodeRect:
|
|
2300
|
-
activatorEvent:
|
|
2296
|
+
const yr = F(() => ({
|
|
2297
|
+
active: K,
|
|
2298
|
+
activeNode: H,
|
|
2299
|
+
activeNodeRect: $,
|
|
2300
|
+
activatorEvent: lt,
|
|
2301
2301
|
collisions: Vt,
|
|
2302
2302
|
containerNodeRect: ht,
|
|
2303
|
-
dragOverlay:
|
|
2304
|
-
draggableNodes:
|
|
2305
|
-
droppableContainers:
|
|
2306
|
-
droppableRects:
|
|
2307
|
-
over:
|
|
2308
|
-
measureDroppableContainers:
|
|
2309
|
-
scrollableAncestors:
|
|
2310
|
-
scrollableAncestorRects:
|
|
2311
|
-
measuringConfiguration:
|
|
2312
|
-
measuringScheduled:
|
|
2313
|
-
windowRect:
|
|
2314
|
-
}), [
|
|
2315
|
-
activatorEvent:
|
|
2303
|
+
dragOverlay: rt,
|
|
2304
|
+
draggableNodes: M,
|
|
2305
|
+
droppableContainers: L,
|
|
2306
|
+
droppableRects: yt,
|
|
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,
|
|
2316
2316
|
activators: sn,
|
|
2317
|
-
active:
|
|
2318
|
-
activeNodeRect:
|
|
2317
|
+
active: K,
|
|
2318
|
+
activeNodeRect: $,
|
|
2319
2319
|
ariaDescribedById: {
|
|
2320
|
-
draggable:
|
|
2320
|
+
draggable: Ht
|
|
2321
2321
|
},
|
|
2322
2322
|
dispatch: v,
|
|
2323
|
-
draggableNodes:
|
|
2324
|
-
over:
|
|
2325
|
-
measureDroppableContainers:
|
|
2326
|
-
}), [
|
|
2327
|
-
return B.createElement(
|
|
2328
|
-
value:
|
|
2323
|
+
draggableNodes: M,
|
|
2324
|
+
over: St,
|
|
2325
|
+
measureDroppableContainers: Y
|
|
2326
|
+
}), [lt, sn, K, $, v, Ht, M, St, Y]);
|
|
2327
|
+
return B.createElement(Yn.Provider, {
|
|
2328
|
+
value: D
|
|
2329
2329
|
}, B.createElement(ce.Provider, {
|
|
2330
|
-
value:
|
|
2331
|
-
}, B.createElement(
|
|
2332
|
-
value:
|
|
2330
|
+
value: br
|
|
2331
|
+
}, B.createElement(Jn.Provider, {
|
|
2332
|
+
value: yr
|
|
2333
2333
|
}, B.createElement(Ce.Provider, {
|
|
2334
|
-
value:
|
|
2335
|
-
}, l)), B.createElement(
|
|
2334
|
+
value: mr
|
|
2335
|
+
}, l)), B.createElement(Ao, {
|
|
2336
2336
|
disabled: (s == null ? void 0 : s.restoreFocus) === !1
|
|
2337
|
-
})), B.createElement(
|
|
2337
|
+
})), B.createElement(Ir, {
|
|
2338
2338
|
...s,
|
|
2339
|
-
hiddenTextDescribedById:
|
|
2339
|
+
hiddenTextDescribedById: Ht
|
|
2340
2340
|
}));
|
|
2341
|
-
function
|
|
2342
|
-
const
|
|
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;
|
|
2343
2343
|
return typeof c == "object" ? {
|
|
2344
2344
|
...c,
|
|
2345
2345
|
enabled: tt
|
|
@@ -2347,15 +2347,15 @@ const Wo = /* @__PURE__ */ yr(function(e) {
|
|
|
2347
2347
|
enabled: tt
|
|
2348
2348
|
};
|
|
2349
2349
|
}
|
|
2350
|
-
}),
|
|
2351
|
-
function
|
|
2350
|
+
}), Fo = /* @__PURE__ */ oe(null), pn = "button", Io = "Draggable";
|
|
2351
|
+
function tr(t) {
|
|
2352
2352
|
let {
|
|
2353
2353
|
id: e,
|
|
2354
2354
|
data: n,
|
|
2355
2355
|
disabled: r = !1,
|
|
2356
2356
|
attributes: o
|
|
2357
2357
|
} = t;
|
|
2358
|
-
const a =
|
|
2358
|
+
const a = Ne(Io), {
|
|
2359
2359
|
activators: i,
|
|
2360
2360
|
activatorEvent: s,
|
|
2361
2361
|
active: c,
|
|
@@ -2363,115 +2363,115 @@ function Un(t) {
|
|
|
2363
2363
|
ariaDescribedById: u,
|
|
2364
2364
|
draggableNodes: d,
|
|
2365
2365
|
over: f
|
|
2366
|
-
} =
|
|
2367
|
-
role:
|
|
2366
|
+
} = At(ce), {
|
|
2367
|
+
role: g = pn,
|
|
2368
2368
|
roleDescription: y = "draggable",
|
|
2369
|
-
tabIndex:
|
|
2370
|
-
} = o ?? {},
|
|
2371
|
-
|
|
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);
|
|
2371
|
+
wt(
|
|
2372
2372
|
() => (d.set(e, {
|
|
2373
2373
|
id: e,
|
|
2374
2374
|
key: a,
|
|
2375
|
-
node:
|
|
2375
|
+
node: p,
|
|
2376
2376
|
activatorNode: E,
|
|
2377
|
-
data:
|
|
2377
|
+
data: S
|
|
2378
2378
|
}), () => {
|
|
2379
|
-
const
|
|
2380
|
-
|
|
2379
|
+
const N = d.get(e);
|
|
2380
|
+
N && N.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
|
|
2386
|
-
role:
|
|
2387
|
-
tabIndex:
|
|
2385
|
+
const M = F(() => ({
|
|
2386
|
+
role: g,
|
|
2387
|
+
tabIndex: h,
|
|
2388
2388
|
"aria-disabled": r,
|
|
2389
|
-
"aria-pressed":
|
|
2389
|
+
"aria-pressed": m && g === pn ? !0 : void 0,
|
|
2390
2390
|
"aria-roledescription": y,
|
|
2391
2391
|
"aria-describedby": u.draggable
|
|
2392
|
-
}), [r,
|
|
2392
|
+
}), [r, g, h, m, y, u.draggable]);
|
|
2393
2393
|
return {
|
|
2394
2394
|
active: c,
|
|
2395
2395
|
activatorEvent: s,
|
|
2396
2396
|
activeNodeRect: l,
|
|
2397
|
-
attributes:
|
|
2398
|
-
isDragging:
|
|
2399
|
-
listeners: r ? void 0 :
|
|
2400
|
-
node:
|
|
2397
|
+
attributes: M,
|
|
2398
|
+
isDragging: m,
|
|
2399
|
+
listeners: r ? void 0 : x,
|
|
2400
|
+
node: p,
|
|
2401
2401
|
over: f,
|
|
2402
|
-
setNodeRef:
|
|
2403
|
-
setActivatorNodeRef:
|
|
2402
|
+
setNodeRef: D,
|
|
2403
|
+
setActivatorNodeRef: w,
|
|
2404
2404
|
transform: v
|
|
2405
2405
|
};
|
|
2406
2406
|
}
|
|
2407
|
-
function
|
|
2408
|
-
return
|
|
2407
|
+
function Bo() {
|
|
2408
|
+
return At(Jn);
|
|
2409
2409
|
}
|
|
2410
|
-
const
|
|
2410
|
+
const $o = "Droppable", zo = {
|
|
2411
2411
|
timeout: 25
|
|
2412
2412
|
};
|
|
2413
|
-
function
|
|
2413
|
+
function er(t) {
|
|
2414
2414
|
let {
|
|
2415
2415
|
data: e,
|
|
2416
2416
|
disabled: n = !1,
|
|
2417
2417
|
id: r,
|
|
2418
2418
|
resizeObserverConfig: o
|
|
2419
2419
|
} = t;
|
|
2420
|
-
const a =
|
|
2420
|
+
const a = Ne($o), {
|
|
2421
2421
|
active: i,
|
|
2422
2422
|
dispatch: s,
|
|
2423
2423
|
over: c,
|
|
2424
2424
|
measureDroppableContainers: l
|
|
2425
|
-
} =
|
|
2425
|
+
} = At(ce), u = C({
|
|
2426
2426
|
disabled: n
|
|
2427
|
-
}), d = C(!1), f = C(null),
|
|
2427
|
+
}), d = C(!1), f = C(null), g = C(null), {
|
|
2428
2428
|
disabled: y,
|
|
2429
|
-
updateMeasurementsFor:
|
|
2430
|
-
timeout:
|
|
2429
|
+
updateMeasurementsFor: h,
|
|
2430
|
+
timeout: m
|
|
2431
2431
|
} = {
|
|
2432
|
-
...
|
|
2432
|
+
...zo,
|
|
2433
2433
|
...o
|
|
2434
|
-
}, v = ne(
|
|
2434
|
+
}, v = ne(h ?? r), p = I(
|
|
2435
2435
|
() => {
|
|
2436
2436
|
if (!d.current) {
|
|
2437
2437
|
d.current = !0;
|
|
2438
2438
|
return;
|
|
2439
2439
|
}
|
|
2440
|
-
|
|
2441
|
-
l(Array.isArray(v.current) ? v.current : [v.current]),
|
|
2442
|
-
},
|
|
2440
|
+
g.current != null && clearTimeout(g.current), g.current = setTimeout(() => {
|
|
2441
|
+
l(Array.isArray(v.current) ? v.current : [v.current]), g.current = null;
|
|
2442
|
+
}, m);
|
|
2443
2443
|
},
|
|
2444
2444
|
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2445
|
-
[
|
|
2446
|
-
),
|
|
2447
|
-
callback:
|
|
2445
|
+
[m]
|
|
2446
|
+
), D = ke({
|
|
2447
|
+
callback: p,
|
|
2448
2448
|
disabled: y || !i
|
|
2449
|
-
}), E = I((
|
|
2450
|
-
|
|
2451
|
-
}, [
|
|
2452
|
-
return
|
|
2453
|
-
!
|
|
2454
|
-
}, [
|
|
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);
|
|
2452
|
+
return P(() => {
|
|
2453
|
+
!D || !w.current || (D.disconnect(), d.current = !1, D.observe(w.current));
|
|
2454
|
+
}, [w, D]), P(
|
|
2455
2455
|
() => (s({
|
|
2456
|
-
type:
|
|
2456
|
+
type: X.RegisterDroppable,
|
|
2457
2457
|
element: {
|
|
2458
2458
|
id: r,
|
|
2459
2459
|
key: a,
|
|
2460
2460
|
disabled: n,
|
|
2461
|
-
node:
|
|
2461
|
+
node: w,
|
|
2462
2462
|
rect: f,
|
|
2463
|
-
data:
|
|
2463
|
+
data: S
|
|
2464
2464
|
}
|
|
2465
2465
|
}), () => s({
|
|
2466
|
-
type:
|
|
2466
|
+
type: X.UnregisterDroppable,
|
|
2467
2467
|
key: a,
|
|
2468
2468
|
id: r
|
|
2469
2469
|
})),
|
|
2470
2470
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2471
2471
|
[r]
|
|
2472
|
-
),
|
|
2472
|
+
), P(() => {
|
|
2473
2473
|
n !== u.current.disabled && (s({
|
|
2474
|
-
type:
|
|
2474
|
+
type: X.SetDroppableDisabled,
|
|
2475
2475
|
id: r,
|
|
2476
2476
|
key: a,
|
|
2477
2477
|
disabled: n
|
|
@@ -2480,18 +2480,18 @@ function Qn(t) {
|
|
|
2480
2480
|
active: i,
|
|
2481
2481
|
rect: f,
|
|
2482
2482
|
isOver: (c == null ? void 0 : c.id) === r,
|
|
2483
|
-
node:
|
|
2483
|
+
node: w,
|
|
2484
2484
|
over: c,
|
|
2485
|
-
setNodeRef:
|
|
2485
|
+
setNodeRef: x
|
|
2486
2486
|
};
|
|
2487
2487
|
}
|
|
2488
|
-
function
|
|
2488
|
+
function jo(t) {
|
|
2489
2489
|
let {
|
|
2490
2490
|
animation: e,
|
|
2491
2491
|
children: n
|
|
2492
2492
|
} = t;
|
|
2493
|
-
const [r, o] =
|
|
2494
|
-
return !n && !r && s && o(s),
|
|
2493
|
+
const [r, o] = R(null), [a, i] = R(null), s = be(n);
|
|
2494
|
+
return !n && !r && s && o(s), wt(() => {
|
|
2495
2495
|
if (!a)
|
|
2496
2496
|
return;
|
|
2497
2497
|
const c = r == null ? void 0 : r.key, l = r == null ? void 0 : r.props.id;
|
|
@@ -2502,30 +2502,30 @@ function $o(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 ?
|
|
2505
|
+
}, [e, r, a]), B.createElement(B.Fragment, null, n, r ? Sr(r, {
|
|
2506
2506
|
ref: i
|
|
2507
2507
|
}) : null);
|
|
2508
2508
|
}
|
|
2509
|
-
const
|
|
2509
|
+
const Xo = {
|
|
2510
2510
|
x: 0,
|
|
2511
2511
|
y: 0,
|
|
2512
2512
|
scaleX: 1,
|
|
2513
2513
|
scaleY: 1
|
|
2514
2514
|
};
|
|
2515
|
-
function
|
|
2515
|
+
function Ho(t) {
|
|
2516
2516
|
let {
|
|
2517
2517
|
children: e
|
|
2518
2518
|
} = t;
|
|
2519
2519
|
return B.createElement(ce.Provider, {
|
|
2520
|
-
value:
|
|
2520
|
+
value: Qn
|
|
2521
2521
|
}, B.createElement(Ce.Provider, {
|
|
2522
|
-
value:
|
|
2522
|
+
value: Xo
|
|
2523
2523
|
}, e));
|
|
2524
2524
|
}
|
|
2525
|
-
const
|
|
2525
|
+
const qo = {
|
|
2526
2526
|
position: "fixed",
|
|
2527
2527
|
touchAction: "none"
|
|
2528
|
-
},
|
|
2528
|
+
}, _o = (t) => _e(t) ? "transform 250ms ease" : void 0, Vo = /* @__PURE__ */ xr((t, e) => {
|
|
2529
2529
|
let {
|
|
2530
2530
|
as: n,
|
|
2531
2531
|
activatorEvent: r,
|
|
@@ -2535,7 +2535,7 @@ const Ho = {
|
|
|
2535
2535
|
rect: s,
|
|
2536
2536
|
style: c,
|
|
2537
2537
|
transform: l,
|
|
2538
|
-
transition: u =
|
|
2538
|
+
transition: u = _o
|
|
2539
2539
|
} = t;
|
|
2540
2540
|
if (!s)
|
|
2541
2541
|
return null;
|
|
@@ -2544,13 +2544,13 @@ const Ho = {
|
|
|
2544
2544
|
scaleX: 1,
|
|
2545
2545
|
scaleY: 1
|
|
2546
2546
|
}, f = {
|
|
2547
|
-
...
|
|
2547
|
+
...qo,
|
|
2548
2548
|
width: s.width,
|
|
2549
2549
|
height: s.height,
|
|
2550
2550
|
top: s.top,
|
|
2551
2551
|
left: s.left,
|
|
2552
|
-
transform:
|
|
2553
|
-
transformOrigin: o && r ?
|
|
2552
|
+
transform: Wt.Transform.toString(d),
|
|
2553
|
+
transformOrigin: o && r ? $r(r, s) : void 0,
|
|
2554
2554
|
transition: typeof u == "function" ? u(r) : u,
|
|
2555
2555
|
...c
|
|
2556
2556
|
};
|
|
@@ -2559,7 +2559,7 @@ const Ho = {
|
|
|
2559
2559
|
style: f,
|
|
2560
2560
|
ref: e
|
|
2561
2561
|
}, a);
|
|
2562
|
-
}),
|
|
2562
|
+
}), Go = (t) => (e) => {
|
|
2563
2563
|
let {
|
|
2564
2564
|
active: n,
|
|
2565
2565
|
dragOverlay: r
|
|
@@ -2579,7 +2579,7 @@ const Ho = {
|
|
|
2579
2579
|
n.node.style.setProperty(c, l);
|
|
2580
2580
|
i != null && i.active && n.node.classList.remove(i.active);
|
|
2581
2581
|
};
|
|
2582
|
-
},
|
|
2582
|
+
}, Ko = (t) => {
|
|
2583
2583
|
let {
|
|
2584
2584
|
transform: {
|
|
2585
2585
|
initial: e,
|
|
@@ -2587,15 +2587,15 @@ const Ho = {
|
|
|
2587
2587
|
}
|
|
2588
2588
|
} = t;
|
|
2589
2589
|
return [{
|
|
2590
|
-
transform:
|
|
2590
|
+
transform: Wt.Transform.toString(e)
|
|
2591
2591
|
}, {
|
|
2592
|
-
transform:
|
|
2592
|
+
transform: Wt.Transform.toString(n)
|
|
2593
2593
|
}];
|
|
2594
|
-
},
|
|
2594
|
+
}, Uo = {
|
|
2595
2595
|
duration: 250,
|
|
2596
2596
|
easing: "ease",
|
|
2597
|
-
keyframes:
|
|
2598
|
-
sideEffects: /* @__PURE__ */
|
|
2597
|
+
keyframes: Ko,
|
|
2598
|
+
sideEffects: /* @__PURE__ */ Go({
|
|
2599
2599
|
styles: {
|
|
2600
2600
|
active: {
|
|
2601
2601
|
opacity: "0"
|
|
@@ -2603,14 +2603,14 @@ const Ho = {
|
|
|
2603
2603
|
}
|
|
2604
2604
|
})
|
|
2605
2605
|
};
|
|
2606
|
-
function
|
|
2606
|
+
function Qo(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
|
|
2613
|
+
return Oe((a, i) => {
|
|
2614
2614
|
if (e === null)
|
|
2615
2615
|
return;
|
|
2616
2616
|
const s = n.get(a);
|
|
@@ -2619,16 +2619,16 @@ function Ko(t) {
|
|
|
2619
2619
|
const c = s.node.current;
|
|
2620
2620
|
if (!c)
|
|
2621
2621
|
return;
|
|
2622
|
-
const l =
|
|
2622
|
+
const l = Un(i);
|
|
2623
2623
|
if (!l)
|
|
2624
2624
|
return;
|
|
2625
2625
|
const {
|
|
2626
2626
|
transform: u
|
|
2627
|
-
} = U(i).getComputedStyle(i), d =
|
|
2627
|
+
} = U(i).getComputedStyle(i), d = In(u);
|
|
2628
2628
|
if (!d)
|
|
2629
2629
|
return;
|
|
2630
|
-
const f = typeof e == "function" ? e :
|
|
2631
|
-
return
|
|
2630
|
+
const f = typeof e == "function" ? e : Jo(e);
|
|
2631
|
+
return qn(c, o.draggable.measure), f({
|
|
2632
2632
|
active: {
|
|
2633
2633
|
id: a,
|
|
2634
2634
|
data: s.data,
|
|
@@ -2646,14 +2646,14 @@ function Ko(t) {
|
|
|
2646
2646
|
});
|
|
2647
2647
|
});
|
|
2648
2648
|
}
|
|
2649
|
-
function
|
|
2649
|
+
function Jo(t) {
|
|
2650
2650
|
const {
|
|
2651
2651
|
duration: e,
|
|
2652
2652
|
easing: n,
|
|
2653
2653
|
sideEffects: r,
|
|
2654
2654
|
keyframes: o
|
|
2655
2655
|
} = {
|
|
2656
|
-
...
|
|
2656
|
+
...Uo,
|
|
2657
2657
|
...t
|
|
2658
2658
|
};
|
|
2659
2659
|
return (a) => {
|
|
@@ -2675,7 +2675,7 @@ function Uo(t) {
|
|
|
2675
2675
|
x: c.x - u.x,
|
|
2676
2676
|
y: c.y - u.y,
|
|
2677
2677
|
...d
|
|
2678
|
-
},
|
|
2678
|
+
}, g = o({
|
|
2679
2679
|
...l,
|
|
2680
2680
|
active: i,
|
|
2681
2681
|
dragOverlay: s,
|
|
@@ -2683,33 +2683,33 @@ function Uo(t) {
|
|
|
2683
2683
|
initial: c,
|
|
2684
2684
|
final: f
|
|
2685
2685
|
}
|
|
2686
|
-
}), [y] =
|
|
2687
|
-
if (JSON.stringify(y) === JSON.stringify(
|
|
2686
|
+
}), [y] = g, h = g[g.length - 1];
|
|
2687
|
+
if (JSON.stringify(y) === JSON.stringify(h))
|
|
2688
2688
|
return;
|
|
2689
|
-
const
|
|
2689
|
+
const m = r == null ? void 0 : r({
|
|
2690
2690
|
active: i,
|
|
2691
2691
|
dragOverlay: s,
|
|
2692
2692
|
...l
|
|
2693
|
-
}), v = s.node.animate(
|
|
2693
|
+
}), v = s.node.animate(g, {
|
|
2694
2694
|
duration: e,
|
|
2695
2695
|
easing: n,
|
|
2696
2696
|
fill: "forwards"
|
|
2697
2697
|
});
|
|
2698
|
-
return new Promise((
|
|
2698
|
+
return new Promise((p) => {
|
|
2699
2699
|
v.onfinish = () => {
|
|
2700
|
-
|
|
2700
|
+
m == null || m(), p();
|
|
2701
2701
|
};
|
|
2702
2702
|
});
|
|
2703
2703
|
};
|
|
2704
2704
|
}
|
|
2705
|
-
let
|
|
2706
|
-
function
|
|
2705
|
+
let wn = 0;
|
|
2706
|
+
function Zo(t) {
|
|
2707
2707
|
return F(() => {
|
|
2708
2708
|
if (t != null)
|
|
2709
|
-
return
|
|
2709
|
+
return wn++, wn;
|
|
2710
2710
|
}, [t]);
|
|
2711
2711
|
}
|
|
2712
|
-
const
|
|
2712
|
+
const ta = /* @__PURE__ */ B.memo((t) => {
|
|
2713
2713
|
let {
|
|
2714
2714
|
adjustScale: e = !1,
|
|
2715
2715
|
children: n,
|
|
@@ -2725,37 +2725,37 @@ const Jo = /* @__PURE__ */ B.memo((t) => {
|
|
|
2725
2725
|
activatorEvent: u,
|
|
2726
2726
|
active: d,
|
|
2727
2727
|
activeNodeRect: f,
|
|
2728
|
-
containerNodeRect:
|
|
2728
|
+
containerNodeRect: g,
|
|
2729
2729
|
draggableNodes: y,
|
|
2730
|
-
droppableContainers:
|
|
2731
|
-
dragOverlay:
|
|
2730
|
+
droppableContainers: h,
|
|
2731
|
+
dragOverlay: m,
|
|
2732
2732
|
over: v,
|
|
2733
|
-
measuringConfiguration:
|
|
2734
|
-
scrollableAncestors:
|
|
2733
|
+
measuringConfiguration: p,
|
|
2734
|
+
scrollableAncestors: D,
|
|
2735
2735
|
scrollableAncestorRects: E,
|
|
2736
|
-
windowRect:
|
|
2737
|
-
} =
|
|
2736
|
+
windowRect: w
|
|
2737
|
+
} = Bo(), x = At(Ce), S = Zo(d == null ? void 0 : d.id), M = Zn(i, {
|
|
2738
2738
|
activatorEvent: u,
|
|
2739
2739
|
active: d,
|
|
2740
2740
|
activeNodeRect: f,
|
|
2741
|
-
containerNodeRect:
|
|
2742
|
-
draggingNodeRect:
|
|
2741
|
+
containerNodeRect: g,
|
|
2742
|
+
draggingNodeRect: m.rect,
|
|
2743
2743
|
over: v,
|
|
2744
|
-
overlayNodeRect:
|
|
2745
|
-
scrollableAncestors:
|
|
2744
|
+
overlayNodeRect: m.rect,
|
|
2745
|
+
scrollableAncestors: D,
|
|
2746
2746
|
scrollableAncestorRects: E,
|
|
2747
|
-
transform:
|
|
2748
|
-
windowRect:
|
|
2749
|
-
}),
|
|
2747
|
+
transform: x,
|
|
2748
|
+
windowRect: w
|
|
2749
|
+
}), N = Qe(f), L = Qo({
|
|
2750
2750
|
config: r,
|
|
2751
2751
|
draggableNodes: y,
|
|
2752
|
-
droppableContainers:
|
|
2753
|
-
measuringConfiguration:
|
|
2754
|
-
}), T =
|
|
2755
|
-
return B.createElement(
|
|
2756
|
-
animation:
|
|
2757
|
-
}, d &&
|
|
2758
|
-
key:
|
|
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, {
|
|
2758
|
+
key: S,
|
|
2759
2759
|
id: d.id,
|
|
2760
2760
|
ref: T,
|
|
2761
2761
|
as: s,
|
|
@@ -2763,41 +2763,41 @@ const Jo = /* @__PURE__ */ B.memo((t) => {
|
|
|
2763
2763
|
adjustScale: e,
|
|
2764
2764
|
className: c,
|
|
2765
2765
|
transition: a,
|
|
2766
|
-
rect:
|
|
2766
|
+
rect: N,
|
|
2767
2767
|
style: {
|
|
2768
2768
|
zIndex: l,
|
|
2769
2769
|
...o
|
|
2770
2770
|
},
|
|
2771
|
-
transform:
|
|
2771
|
+
transform: M
|
|
2772
2772
|
}, n) : null));
|
|
2773
2773
|
});
|
|
2774
|
-
function
|
|
2774
|
+
function ea(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
|
|
2780
|
+
const na = (t) => {
|
|
2781
2781
|
let {
|
|
2782
2782
|
transform: e,
|
|
2783
2783
|
draggingNodeRect: n,
|
|
2784
2784
|
windowRect: r
|
|
2785
2785
|
} = t;
|
|
2786
|
-
return !n || !r ? e :
|
|
2786
|
+
return !n || !r ? e : ea(e, n, r);
|
|
2787
2787
|
};
|
|
2788
|
-
function
|
|
2788
|
+
function A(t) {
|
|
2789
2789
|
const e = Object.prototype.toString.call(t);
|
|
2790
2790
|
return t instanceof Date || typeof t == "object" && e === "[object Date]" ? new t.constructor(+t) : typeof t == "number" || e === "[object Number]" || typeof t == "string" || e === "[object String]" ? new Date(t) : /* @__PURE__ */ new Date(NaN);
|
|
2791
2791
|
}
|
|
2792
2792
|
function st(t, e) {
|
|
2793
2793
|
return t instanceof Date ? new t.constructor(e) : new Date(e);
|
|
2794
2794
|
}
|
|
2795
|
-
function
|
|
2796
|
-
const n =
|
|
2795
|
+
function Rt(t, e) {
|
|
2796
|
+
const n = A(t);
|
|
2797
2797
|
return isNaN(e) ? st(t, NaN) : (e && n.setDate(n.getDate() + e), n);
|
|
2798
2798
|
}
|
|
2799
|
-
function
|
|
2800
|
-
const n =
|
|
2799
|
+
function nr(t, e) {
|
|
2800
|
+
const n = A(t);
|
|
2801
2801
|
if (isNaN(e)) return st(t, NaN);
|
|
2802
2802
|
if (!e)
|
|
2803
2803
|
return n;
|
|
@@ -2810,37 +2810,37 @@ function Jn(t, e) {
|
|
|
2810
2810
|
r
|
|
2811
2811
|
), n);
|
|
2812
2812
|
}
|
|
2813
|
-
function
|
|
2814
|
-
const n = +
|
|
2813
|
+
function ra(t, e) {
|
|
2814
|
+
const n = +A(t);
|
|
2815
2815
|
return st(t, n + e);
|
|
2816
2816
|
}
|
|
2817
|
-
const
|
|
2818
|
-
let
|
|
2817
|
+
const rr = 6048e5, oa = 864e5, or = 6e4;
|
|
2818
|
+
let aa = {};
|
|
2819
2819
|
function le() {
|
|
2820
|
-
return
|
|
2820
|
+
return aa;
|
|
2821
2821
|
}
|
|
2822
|
-
function
|
|
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 =
|
|
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;
|
|
2825
2825
|
return o.setDate(o.getDate() - i), o.setHours(0, 0, 0, 0), o;
|
|
2826
2826
|
}
|
|
2827
|
-
function
|
|
2828
|
-
return
|
|
2827
|
+
function Se(t) {
|
|
2828
|
+
return Ct(t, { weekStartsOn: 1 });
|
|
2829
2829
|
}
|
|
2830
|
-
function
|
|
2831
|
-
const e =
|
|
2830
|
+
function ar(t) {
|
|
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 =
|
|
2833
|
+
const o = Se(r), a = st(t, 0);
|
|
2834
2834
|
a.setFullYear(n, 0, 4), a.setHours(0, 0, 0, 0);
|
|
2835
|
-
const i =
|
|
2835
|
+
const i = Se(a);
|
|
2836
2836
|
return e.getTime() >= o.getTime() ? n + 1 : e.getTime() >= i.getTime() ? n : n - 1;
|
|
2837
2837
|
}
|
|
2838
|
-
function
|
|
2839
|
-
const e =
|
|
2838
|
+
function Lt(t) {
|
|
2839
|
+
const e = A(t);
|
|
2840
2840
|
return e.setHours(0, 0, 0, 0), e;
|
|
2841
2841
|
}
|
|
2842
|
-
function
|
|
2843
|
-
const e =
|
|
2842
|
+
function Dn(t) {
|
|
2843
|
+
const e = A(t), n = new Date(
|
|
2844
2844
|
Date.UTC(
|
|
2845
2845
|
e.getFullYear(),
|
|
2846
2846
|
e.getMonth(),
|
|
@@ -2853,79 +2853,79 @@ function wn(t) {
|
|
|
2853
2853
|
);
|
|
2854
2854
|
return n.setUTCFullYear(e.getFullYear()), +t - +n;
|
|
2855
2855
|
}
|
|
2856
|
-
function
|
|
2857
|
-
const n =
|
|
2858
|
-
return Math.round((o - a) /
|
|
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);
|
|
2859
2859
|
}
|
|
2860
|
-
function
|
|
2861
|
-
const e =
|
|
2862
|
-
return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0),
|
|
2860
|
+
function sa(t) {
|
|
2861
|
+
const e = ar(t), n = st(t, 0);
|
|
2862
|
+
return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0), Se(n);
|
|
2863
2863
|
}
|
|
2864
|
-
function
|
|
2865
|
-
return
|
|
2864
|
+
function $t(t, e) {
|
|
2865
|
+
return ra(t, e * or);
|
|
2866
2866
|
}
|
|
2867
|
-
function
|
|
2867
|
+
function ir(t, e) {
|
|
2868
2868
|
const n = e * 7;
|
|
2869
|
-
return
|
|
2869
|
+
return Rt(t, n);
|
|
2870
2870
|
}
|
|
2871
|
-
function
|
|
2871
|
+
function ca(t) {
|
|
2872
2872
|
return st(t, Date.now());
|
|
2873
2873
|
}
|
|
2874
|
-
function
|
|
2875
|
-
const n =
|
|
2874
|
+
function la(t, e) {
|
|
2875
|
+
const n = Lt(t), r = Lt(e);
|
|
2876
2876
|
return +n == +r;
|
|
2877
2877
|
}
|
|
2878
|
-
function
|
|
2878
|
+
function ua(t) {
|
|
2879
2879
|
return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
|
|
2880
2880
|
}
|
|
2881
|
-
function
|
|
2882
|
-
if (!
|
|
2881
|
+
function da(t) {
|
|
2882
|
+
if (!ua(t) && typeof t != "number")
|
|
2883
2883
|
return !1;
|
|
2884
|
-
const e =
|
|
2884
|
+
const e = A(t);
|
|
2885
2885
|
return !isNaN(Number(e));
|
|
2886
2886
|
}
|
|
2887
|
-
function
|
|
2887
|
+
function fa(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
|
|
2894
|
-
return +
|
|
2893
|
+
function ha(t, e) {
|
|
2894
|
+
return +A(t) - +A(e);
|
|
2895
2895
|
}
|
|
2896
|
-
function
|
|
2897
|
-
const r =
|
|
2898
|
-
return
|
|
2896
|
+
function ze(t, e, n) {
|
|
2897
|
+
const r = ha(t, e) / or;
|
|
2898
|
+
return fa()(r);
|
|
2899
2899
|
}
|
|
2900
|
-
function
|
|
2901
|
-
const e =
|
|
2900
|
+
function ga(t) {
|
|
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
|
}
|
|
2904
|
-
function
|
|
2905
|
-
const n =
|
|
2904
|
+
function sr(t, e) {
|
|
2905
|
+
const n = A(t.start), r = A(t.end);
|
|
2906
2906
|
let o = +n > +r;
|
|
2907
2907
|
const a = o ? +n : +r, i = o ? r : n;
|
|
2908
2908
|
i.setHours(0, 0, 0, 0);
|
|
2909
2909
|
let s = 1;
|
|
2910
2910
|
const c = [];
|
|
2911
2911
|
for (; +i <= a; )
|
|
2912
|
-
c.push(
|
|
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
|
|
2916
|
-
const e =
|
|
2915
|
+
function ma(t) {
|
|
2916
|
+
const e = A(t);
|
|
2917
2917
|
return e.setDate(1), e.setHours(0, 0, 0, 0), e;
|
|
2918
2918
|
}
|
|
2919
|
-
function
|
|
2920
|
-
const e =
|
|
2919
|
+
function va(t) {
|
|
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
|
|
2923
|
+
function Je(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 =
|
|
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);
|
|
2926
2926
|
return o.setDate(o.getDate() + i), o.setHours(23, 59, 59, 999), o;
|
|
2927
2927
|
}
|
|
2928
|
-
const
|
|
2928
|
+
const ya = {
|
|
2929
2929
|
lessThanXSeconds: {
|
|
2930
2930
|
one: "less than a second",
|
|
2931
2931
|
other: "less than {{count}} seconds"
|
|
@@ -2987,53 +2987,53 @@ const ma = {
|
|
|
2987
2987
|
one: "almost 1 year",
|
|
2988
2988
|
other: "almost {{count}} years"
|
|
2989
2989
|
}
|
|
2990
|
-
},
|
|
2990
|
+
}, ba = (t, e, n) => {
|
|
2991
2991
|
let r;
|
|
2992
|
-
const o =
|
|
2992
|
+
const o = ya[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
|
|
2995
|
+
function Fe(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
|
|
3001
|
+
const pa = {
|
|
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
|
-
},
|
|
3006
|
+
}, wa = {
|
|
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
|
-
},
|
|
3011
|
+
}, Da = {
|
|
3012
3012
|
full: "{{date}} 'at' {{time}}",
|
|
3013
3013
|
long: "{{date}} 'at' {{time}}",
|
|
3014
3014
|
medium: "{{date}}, {{time}}",
|
|
3015
3015
|
short: "{{date}}, {{time}}"
|
|
3016
|
-
},
|
|
3017
|
-
date:
|
|
3018
|
-
formats:
|
|
3016
|
+
}, Ma = {
|
|
3017
|
+
date: Fe({
|
|
3018
|
+
formats: pa,
|
|
3019
3019
|
defaultWidth: "full"
|
|
3020
3020
|
}),
|
|
3021
|
-
time:
|
|
3022
|
-
formats:
|
|
3021
|
+
time: Fe({
|
|
3022
|
+
formats: wa,
|
|
3023
3023
|
defaultWidth: "full"
|
|
3024
3024
|
}),
|
|
3025
|
-
dateTime:
|
|
3026
|
-
formats:
|
|
3025
|
+
dateTime: Fe({
|
|
3026
|
+
formats: Da,
|
|
3027
3027
|
defaultWidth: "full"
|
|
3028
3028
|
})
|
|
3029
|
-
},
|
|
3029
|
+
}, Sa = {
|
|
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
|
-
},
|
|
3036
|
+
}, xa = (t, e, n, r) => Sa[t];
|
|
3037
3037
|
function Qt(t) {
|
|
3038
3038
|
return (e, n) => {
|
|
3039
3039
|
const r = n != null && n.context ? String(n.context) : "standalone";
|
|
@@ -3049,15 +3049,15 @@ function Qt(t) {
|
|
|
3049
3049
|
return o[a];
|
|
3050
3050
|
};
|
|
3051
3051
|
}
|
|
3052
|
-
const
|
|
3052
|
+
const Ea = {
|
|
3053
3053
|
narrow: ["B", "A"],
|
|
3054
3054
|
abbreviated: ["BC", "AD"],
|
|
3055
3055
|
wide: ["Before Christ", "Anno Domini"]
|
|
3056
|
-
},
|
|
3056
|
+
}, Oa = {
|
|
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
|
-
},
|
|
3060
|
+
}, Na = {
|
|
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 xa = {
|
|
|
3087
3087
|
"November",
|
|
3088
3088
|
"December"
|
|
3089
3089
|
]
|
|
3090
|
-
},
|
|
3090
|
+
}, ka = {
|
|
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 xa = {
|
|
|
3100
3100
|
"Friday",
|
|
3101
3101
|
"Saturday"
|
|
3102
3102
|
]
|
|
3103
|
-
},
|
|
3103
|
+
}, Ca = {
|
|
3104
3104
|
narrow: {
|
|
3105
3105
|
am: "a",
|
|
3106
3106
|
pm: "p",
|
|
@@ -3131,7 +3131,7 @@ const xa = {
|
|
|
3131
3131
|
evening: "evening",
|
|
3132
3132
|
night: "night"
|
|
3133
3133
|
}
|
|
3134
|
-
},
|
|
3134
|
+
}, Ta = {
|
|
3135
3135
|
narrow: {
|
|
3136
3136
|
am: "a",
|
|
3137
3137
|
pm: "p",
|
|
@@ -3162,7 +3162,7 @@ const xa = {
|
|
|
3162
3162
|
evening: "in the evening",
|
|
3163
3163
|
night: "at night"
|
|
3164
3164
|
}
|
|
3165
|
-
},
|
|
3165
|
+
}, Pa = (t, e) => {
|
|
3166
3166
|
const n = Number(t), r = n % 100;
|
|
3167
3167
|
if (r > 20 || r < 10)
|
|
3168
3168
|
switch (r % 10) {
|
|
@@ -3174,29 +3174,29 @@ const xa = {
|
|
|
3174
3174
|
return n + "rd";
|
|
3175
3175
|
}
|
|
3176
3176
|
return n + "th";
|
|
3177
|
-
},
|
|
3178
|
-
ordinalNumber:
|
|
3177
|
+
}, Ra = {
|
|
3178
|
+
ordinalNumber: Pa,
|
|
3179
3179
|
era: Qt({
|
|
3180
|
-
values:
|
|
3180
|
+
values: Ea,
|
|
3181
3181
|
defaultWidth: "wide"
|
|
3182
3182
|
}),
|
|
3183
3183
|
quarter: Qt({
|
|
3184
|
-
values:
|
|
3184
|
+
values: Oa,
|
|
3185
3185
|
defaultWidth: "wide",
|
|
3186
3186
|
argumentCallback: (t) => t - 1
|
|
3187
3187
|
}),
|
|
3188
3188
|
month: Qt({
|
|
3189
|
-
values:
|
|
3189
|
+
values: Na,
|
|
3190
3190
|
defaultWidth: "wide"
|
|
3191
3191
|
}),
|
|
3192
3192
|
day: Qt({
|
|
3193
|
-
values:
|
|
3193
|
+
values: ka,
|
|
3194
3194
|
defaultWidth: "wide"
|
|
3195
3195
|
}),
|
|
3196
3196
|
dayPeriod: Qt({
|
|
3197
|
-
values:
|
|
3197
|
+
values: Ca,
|
|
3198
3198
|
defaultWidth: "wide",
|
|
3199
|
-
formattingValues:
|
|
3199
|
+
formattingValues: Ta,
|
|
3200
3200
|
defaultFormattingWidth: "wide"
|
|
3201
3201
|
})
|
|
3202
3202
|
};
|
|
@@ -3205,9 +3205,9 @@ function Jt(t) {
|
|
|
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) ?
|
|
3208
|
+
const i = a[0], s = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], c = Array.isArray(s) ? Wa(s, (d) => d.test(i)) : (
|
|
3209
3209
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
3210
|
-
|
|
3210
|
+
Aa(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
|
|
3221
|
+
function Aa(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
|
|
3226
|
+
function Wa(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
|
|
3231
|
+
function La(t) {
|
|
3232
3232
|
return (e, n = {}) => {
|
|
3233
3233
|
const r = e.match(t.matchPattern);
|
|
3234
3234
|
if (!r) return null;
|
|
@@ -3240,23 +3240,23 @@ function Aa(t) {
|
|
|
3240
3240
|
return { value: i, rest: s };
|
|
3241
3241
|
};
|
|
3242
3242
|
}
|
|
3243
|
-
const
|
|
3243
|
+
const Ya = /^(\d+)(th|st|nd|rd)?/i, Fa = /\d+/i, Ia = {
|
|
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
|
-
},
|
|
3247
|
+
}, Ba = {
|
|
3248
3248
|
any: [/^b/i, /^(a|c)/i]
|
|
3249
|
-
},
|
|
3249
|
+
}, $a = {
|
|
3250
3250
|
narrow: /^[1234]/i,
|
|
3251
3251
|
abbreviated: /^q[1234]/i,
|
|
3252
3252
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
3253
|
-
},
|
|
3253
|
+
}, za = {
|
|
3254
3254
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
3255
|
-
},
|
|
3255
|
+
}, ja = {
|
|
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
|
|
3259
|
-
},
|
|
3259
|
+
}, Xa = {
|
|
3260
3260
|
narrow: [
|
|
3261
3261
|
/^j/i,
|
|
3262
3262
|
/^f/i,
|
|
@@ -3285,18 +3285,18 @@ const Wa = /^(\d+)(th|st|nd|rd)?/i, La = /\d+/i, Ya = {
|
|
|
3285
3285
|
/^n/i,
|
|
3286
3286
|
/^d/i
|
|
3287
3287
|
]
|
|
3288
|
-
},
|
|
3288
|
+
}, Ha = {
|
|
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
|
-
},
|
|
3293
|
+
}, qa = {
|
|
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
|
-
},
|
|
3296
|
+
}, _a = {
|
|
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
|
-
},
|
|
3299
|
+
}, Va = {
|
|
3300
3300
|
any: {
|
|
3301
3301
|
am: /^a/i,
|
|
3302
3302
|
pm: /^p/i,
|
|
@@ -3307,86 +3307,86 @@ const Wa = /^(\d+)(th|st|nd|rd)?/i, La = /\d+/i, Ya = {
|
|
|
3307
3307
|
evening: /evening/i,
|
|
3308
3308
|
night: /night/i
|
|
3309
3309
|
}
|
|
3310
|
-
},
|
|
3311
|
-
ordinalNumber:
|
|
3312
|
-
matchPattern:
|
|
3313
|
-
parsePattern:
|
|
3310
|
+
}, Ga = {
|
|
3311
|
+
ordinalNumber: La({
|
|
3312
|
+
matchPattern: Ya,
|
|
3313
|
+
parsePattern: Fa,
|
|
3314
3314
|
valueCallback: (t) => parseInt(t, 10)
|
|
3315
3315
|
}),
|
|
3316
3316
|
era: Jt({
|
|
3317
|
-
matchPatterns:
|
|
3317
|
+
matchPatterns: Ia,
|
|
3318
3318
|
defaultMatchWidth: "wide",
|
|
3319
|
-
parsePatterns:
|
|
3319
|
+
parsePatterns: Ba,
|
|
3320
3320
|
defaultParseWidth: "any"
|
|
3321
3321
|
}),
|
|
3322
3322
|
quarter: Jt({
|
|
3323
|
-
matchPatterns:
|
|
3323
|
+
matchPatterns: $a,
|
|
3324
3324
|
defaultMatchWidth: "wide",
|
|
3325
|
-
parsePatterns:
|
|
3325
|
+
parsePatterns: za,
|
|
3326
3326
|
defaultParseWidth: "any",
|
|
3327
3327
|
valueCallback: (t) => t + 1
|
|
3328
3328
|
}),
|
|
3329
3329
|
month: Jt({
|
|
3330
|
-
matchPatterns:
|
|
3330
|
+
matchPatterns: ja,
|
|
3331
3331
|
defaultMatchWidth: "wide",
|
|
3332
|
-
parsePatterns:
|
|
3332
|
+
parsePatterns: Xa,
|
|
3333
3333
|
defaultParseWidth: "any"
|
|
3334
3334
|
}),
|
|
3335
3335
|
day: Jt({
|
|
3336
|
-
matchPatterns:
|
|
3336
|
+
matchPatterns: Ha,
|
|
3337
3337
|
defaultMatchWidth: "wide",
|
|
3338
|
-
parsePatterns:
|
|
3338
|
+
parsePatterns: qa,
|
|
3339
3339
|
defaultParseWidth: "any"
|
|
3340
3340
|
}),
|
|
3341
3341
|
dayPeriod: Jt({
|
|
3342
|
-
matchPatterns:
|
|
3342
|
+
matchPatterns: _a,
|
|
3343
3343
|
defaultMatchWidth: "any",
|
|
3344
|
-
parsePatterns:
|
|
3344
|
+
parsePatterns: Va,
|
|
3345
3345
|
defaultParseWidth: "any"
|
|
3346
3346
|
})
|
|
3347
|
-
},
|
|
3347
|
+
}, Ka = {
|
|
3348
3348
|
code: "en-US",
|
|
3349
|
-
formatDistance:
|
|
3350
|
-
formatLong:
|
|
3351
|
-
formatRelative:
|
|
3352
|
-
localize:
|
|
3353
|
-
match:
|
|
3349
|
+
formatDistance: ba,
|
|
3350
|
+
formatLong: Ma,
|
|
3351
|
+
formatRelative: xa,
|
|
3352
|
+
localize: Ra,
|
|
3353
|
+
match: Ga,
|
|
3354
3354
|
options: {
|
|
3355
3355
|
weekStartsOn: 0,
|
|
3356
3356
|
firstWeekContainsDate: 1
|
|
3357
3357
|
}
|
|
3358
3358
|
};
|
|
3359
|
-
function
|
|
3360
|
-
const e =
|
|
3361
|
-
return
|
|
3359
|
+
function Ua(t) {
|
|
3360
|
+
const e = A(t);
|
|
3361
|
+
return ia(e, va(e)) + 1;
|
|
3362
3362
|
}
|
|
3363
|
-
function
|
|
3364
|
-
const e =
|
|
3365
|
-
return Math.round(n /
|
|
3363
|
+
function Qa(t) {
|
|
3364
|
+
const e = A(t), n = +Se(e) - +sa(e);
|
|
3365
|
+
return Math.round(n / rr) + 1;
|
|
3366
3366
|
}
|
|
3367
|
-
function
|
|
3368
|
-
var u, d, f,
|
|
3369
|
-
const n =
|
|
3367
|
+
function cr(t, e) {
|
|
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);
|
|
3370
3370
|
i.setFullYear(r + 1, 0, a), i.setHours(0, 0, 0, 0);
|
|
3371
|
-
const s =
|
|
3371
|
+
const s = Ct(i, e), c = st(t, 0);
|
|
3372
3372
|
c.setFullYear(r, 0, a), c.setHours(0, 0, 0, 0);
|
|
3373
|
-
const l =
|
|
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
|
|
3376
|
+
function Ja(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 =
|
|
3379
|
-
return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0),
|
|
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);
|
|
3379
|
+
return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0), Ct(a, e);
|
|
3380
3380
|
}
|
|
3381
|
-
function
|
|
3382
|
-
const n =
|
|
3383
|
-
return Math.round(r /
|
|
3381
|
+
function Za(t, e) {
|
|
3382
|
+
const n = A(t), r = +Ct(n, e) - +Ja(n, e);
|
|
3383
|
+
return Math.round(r / rr) + 1;
|
|
3384
3384
|
}
|
|
3385
3385
|
function O(t, e) {
|
|
3386
3386
|
const n = t < 0 ? "-" : "", r = Math.abs(t).toString().padStart(e, "0");
|
|
3387
3387
|
return n + r;
|
|
3388
3388
|
}
|
|
3389
|
-
const
|
|
3389
|
+
const Nt = {
|
|
3390
3390
|
// Year
|
|
3391
3391
|
y(t, e) {
|
|
3392
3392
|
const n = t.getFullYear(), r = n > 0 ? n : 1 - n;
|
|
@@ -3440,14 +3440,14 @@ const St = {
|
|
|
3440
3440
|
);
|
|
3441
3441
|
return O(o, e.length);
|
|
3442
3442
|
}
|
|
3443
|
-
},
|
|
3443
|
+
}, Bt = {
|
|
3444
3444
|
midnight: "midnight",
|
|
3445
3445
|
noon: "noon",
|
|
3446
3446
|
morning: "morning",
|
|
3447
3447
|
afternoon: "afternoon",
|
|
3448
3448
|
evening: "evening",
|
|
3449
3449
|
night: "night"
|
|
3450
|
-
},
|
|
3450
|
+
}, Mn = {
|
|
3451
3451
|
// Era
|
|
3452
3452
|
G: function(t, e, n) {
|
|
3453
3453
|
const r = t.getFullYear() > 0 ? 1 : 0;
|
|
@@ -3469,11 +3469,11 @@ const St = {
|
|
|
3469
3469
|
const r = t.getFullYear(), o = r > 0 ? r : 1 - r;
|
|
3470
3470
|
return n.ordinalNumber(o, { unit: "year" });
|
|
3471
3471
|
}
|
|
3472
|
-
return
|
|
3472
|
+
return Nt.y(t, e);
|
|
3473
3473
|
},
|
|
3474
3474
|
// Local week-numbering year
|
|
3475
3475
|
Y: function(t, e, n, r) {
|
|
3476
|
-
const o =
|
|
3476
|
+
const o = cr(t, r), a = o > 0 ? o : 1 - o;
|
|
3477
3477
|
if (e === "YY") {
|
|
3478
3478
|
const i = a % 100;
|
|
3479
3479
|
return O(i, 2);
|
|
@@ -3482,7 +3482,7 @@ const St = {
|
|
|
3482
3482
|
},
|
|
3483
3483
|
// ISO week-numbering year
|
|
3484
3484
|
R: function(t, e) {
|
|
3485
|
-
const n =
|
|
3485
|
+
const n = ar(t);
|
|
3486
3486
|
return O(n, e.length);
|
|
3487
3487
|
},
|
|
3488
3488
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
@@ -3560,7 +3560,7 @@ const St = {
|
|
|
3560
3560
|
switch (e) {
|
|
3561
3561
|
case "M":
|
|
3562
3562
|
case "MM":
|
|
3563
|
-
return
|
|
3563
|
+
return Nt.M(t, e);
|
|
3564
3564
|
case "Mo":
|
|
3565
3565
|
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
3566
3566
|
case "MMM":
|
|
@@ -3605,21 +3605,21 @@ const St = {
|
|
|
3605
3605
|
},
|
|
3606
3606
|
// Local week of year
|
|
3607
3607
|
w: function(t, e, n, r) {
|
|
3608
|
-
const o =
|
|
3608
|
+
const o = Za(t, r);
|
|
3609
3609
|
return e === "wo" ? n.ordinalNumber(o, { unit: "week" }) : O(o, e.length);
|
|
3610
3610
|
},
|
|
3611
3611
|
// ISO week of year
|
|
3612
3612
|
I: function(t, e, n) {
|
|
3613
|
-
const r =
|
|
3613
|
+
const r = Qa(t);
|
|
3614
3614
|
return e === "Io" ? n.ordinalNumber(r, { unit: "week" }) : O(r, e.length);
|
|
3615
3615
|
},
|
|
3616
3616
|
// Day of the month
|
|
3617
3617
|
d: function(t, e, n) {
|
|
3618
|
-
return e === "do" ? n.ordinalNumber(t.getDate(), { unit: "date" }) :
|
|
3618
|
+
return e === "do" ? n.ordinalNumber(t.getDate(), { unit: "date" }) : Nt.d(t, e);
|
|
3619
3619
|
},
|
|
3620
3620
|
// Day of year
|
|
3621
3621
|
D: function(t, e, n) {
|
|
3622
|
-
const r =
|
|
3622
|
+
const r = Ua(t);
|
|
3623
3623
|
return e === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : O(r, e.length);
|
|
3624
3624
|
},
|
|
3625
3625
|
// Day of week
|
|
@@ -3782,7 +3782,7 @@ const St = {
|
|
|
3782
3782
|
b: function(t, e, n) {
|
|
3783
3783
|
const r = t.getHours();
|
|
3784
3784
|
let o;
|
|
3785
|
-
switch (r === 12 ? o =
|
|
3785
|
+
switch (r === 12 ? o = Bt.noon : r === 0 ? o = Bt.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 St = {
|
|
|
3811
3811
|
B: function(t, e, n) {
|
|
3812
3812
|
const r = t.getHours();
|
|
3813
3813
|
let o;
|
|
3814
|
-
switch (r >= 17 ? o =
|
|
3814
|
+
switch (r >= 17 ? o = Bt.evening : r >= 12 ? o = Bt.afternoon : r >= 4 ? o = Bt.morning : o = Bt.night, e) {
|
|
3815
3815
|
case "B":
|
|
3816
3816
|
case "BB":
|
|
3817
3817
|
case "BBB":
|
|
@@ -3838,11 +3838,11 @@ const St = {
|
|
|
3838
3838
|
let r = t.getHours() % 12;
|
|
3839
3839
|
return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
|
|
3840
3840
|
}
|
|
3841
|
-
return
|
|
3841
|
+
return Nt.h(t, e);
|
|
3842
3842
|
},
|
|
3843
3843
|
// Hour [0-23]
|
|
3844
3844
|
H: function(t, e, n) {
|
|
3845
|
-
return e === "Ho" ? n.ordinalNumber(t.getHours(), { unit: "hour" }) :
|
|
3845
|
+
return e === "Ho" ? n.ordinalNumber(t.getHours(), { unit: "hour" }) : Nt.H(t, e);
|
|
3846
3846
|
},
|
|
3847
3847
|
// Hour [0-11]
|
|
3848
3848
|
K: function(t, e, n) {
|
|
@@ -3856,15 +3856,15 @@ const St = {
|
|
|
3856
3856
|
},
|
|
3857
3857
|
// Minute
|
|
3858
3858
|
m: function(t, e, n) {
|
|
3859
|
-
return e === "mo" ? n.ordinalNumber(t.getMinutes(), { unit: "minute" }) :
|
|
3859
|
+
return e === "mo" ? n.ordinalNumber(t.getMinutes(), { unit: "minute" }) : Nt.m(t, e);
|
|
3860
3860
|
},
|
|
3861
3861
|
// Second
|
|
3862
3862
|
s: function(t, e, n) {
|
|
3863
|
-
return e === "so" ? n.ordinalNumber(t.getSeconds(), { unit: "second" }) :
|
|
3863
|
+
return e === "so" ? n.ordinalNumber(t.getSeconds(), { unit: "second" }) : Nt.s(t, e);
|
|
3864
3864
|
},
|
|
3865
3865
|
// Fraction of second
|
|
3866
3866
|
S: function(t, e) {
|
|
3867
|
-
return
|
|
3867
|
+
return Nt.S(t, e);
|
|
3868
3868
|
},
|
|
3869
3869
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
3870
3870
|
X: function(t, e, n) {
|
|
@@ -3876,11 +3876,11 @@ const St = {
|
|
|
3876
3876
|
return xn(r);
|
|
3877
3877
|
case "XXXX":
|
|
3878
3878
|
case "XX":
|
|
3879
|
-
return
|
|
3879
|
+
return Pt(r);
|
|
3880
3880
|
case "XXXXX":
|
|
3881
3881
|
case "XXX":
|
|
3882
3882
|
default:
|
|
3883
|
-
return
|
|
3883
|
+
return Pt(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 St = {
|
|
|
3891
3891
|
return xn(r);
|
|
3892
3892
|
case "xxxx":
|
|
3893
3893
|
case "xx":
|
|
3894
|
-
return
|
|
3894
|
+
return Pt(r);
|
|
3895
3895
|
case "xxxxx":
|
|
3896
3896
|
case "xxx":
|
|
3897
3897
|
default:
|
|
3898
|
-
return
|
|
3898
|
+
return Pt(r, ":");
|
|
3899
3899
|
}
|
|
3900
3900
|
},
|
|
3901
3901
|
// Timezone (GMT)
|
|
@@ -3905,10 +3905,10 @@ const St = {
|
|
|
3905
3905
|
case "O":
|
|
3906
3906
|
case "OO":
|
|
3907
3907
|
case "OOO":
|
|
3908
|
-
return "GMT" +
|
|
3908
|
+
return "GMT" + Sn(r, ":");
|
|
3909
3909
|
case "OOOO":
|
|
3910
3910
|
default:
|
|
3911
|
-
return "GMT" +
|
|
3911
|
+
return "GMT" + Pt(r, ":");
|
|
3912
3912
|
}
|
|
3913
3913
|
},
|
|
3914
3914
|
// Timezone (specific non-location)
|
|
@@ -3918,10 +3918,10 @@ const St = {
|
|
|
3918
3918
|
case "z":
|
|
3919
3919
|
case "zz":
|
|
3920
3920
|
case "zzz":
|
|
3921
|
-
return "GMT" +
|
|
3921
|
+
return "GMT" + Sn(r, ":");
|
|
3922
3922
|
case "zzzz":
|
|
3923
3923
|
default:
|
|
3924
|
-
return "GMT" +
|
|
3924
|
+
return "GMT" + Pt(r, ":");
|
|
3925
3925
|
}
|
|
3926
3926
|
},
|
|
3927
3927
|
// Seconds timestamp
|
|
@@ -3935,18 +3935,18 @@ const St = {
|
|
|
3935
3935
|
return O(r, e.length);
|
|
3936
3936
|
}
|
|
3937
3937
|
};
|
|
3938
|
-
function
|
|
3938
|
+
function Sn(t, e = "") {
|
|
3939
3939
|
const n = t > 0 ? "-" : "+", r = Math.abs(t), o = Math.trunc(r / 60), a = r % 60;
|
|
3940
3940
|
return a === 0 ? n + String(o) : n + String(o) + e + O(a, 2);
|
|
3941
3941
|
}
|
|
3942
3942
|
function xn(t, e) {
|
|
3943
|
-
return t % 60 === 0 ? (t > 0 ? "-" : "+") + O(Math.abs(t) / 60, 2) :
|
|
3943
|
+
return t % 60 === 0 ? (t > 0 ? "-" : "+") + O(Math.abs(t) / 60, 2) : Pt(t, e);
|
|
3944
3944
|
}
|
|
3945
|
-
function
|
|
3945
|
+
function Pt(t, e = "") {
|
|
3946
3946
|
const n = t > 0 ? "-" : "+", r = Math.abs(t), o = O(Math.trunc(r / 60), 2), a = O(r % 60, 2);
|
|
3947
3947
|
return n + o + e + a;
|
|
3948
3948
|
}
|
|
3949
|
-
const
|
|
3949
|
+
const En = (t, e) => {
|
|
3950
3950
|
switch (t) {
|
|
3951
3951
|
case "P":
|
|
3952
3952
|
return e.date({ width: "short" });
|
|
@@ -3958,7 +3958,7 @@ const Sn = (t, e) => {
|
|
|
3958
3958
|
default:
|
|
3959
3959
|
return e.date({ width: "full" });
|
|
3960
3960
|
}
|
|
3961
|
-
},
|
|
3961
|
+
}, lr = (t, e) => {
|
|
3962
3962
|
switch (t) {
|
|
3963
3963
|
case "p":
|
|
3964
3964
|
return e.time({ width: "short" });
|
|
@@ -3970,10 +3970,10 @@ const Sn = (t, e) => {
|
|
|
3970
3970
|
default:
|
|
3971
3971
|
return e.time({ width: "full" });
|
|
3972
3972
|
}
|
|
3973
|
-
},
|
|
3973
|
+
}, ti = (t, e) => {
|
|
3974
3974
|
const n = t.match(/(P+)(p+)?/) || [], r = n[1], o = n[2];
|
|
3975
3975
|
if (!o)
|
|
3976
|
-
return
|
|
3976
|
+
return En(t, e);
|
|
3977
3977
|
let a;
|
|
3978
3978
|
switch (r) {
|
|
3979
3979
|
case "P":
|
|
@@ -3990,49 +3990,49 @@ const Sn = (t, e) => {
|
|
|
3990
3990
|
a = e.dateTime({ width: "full" });
|
|
3991
3991
|
break;
|
|
3992
3992
|
}
|
|
3993
|
-
return a.replace("{{date}}",
|
|
3994
|
-
},
|
|
3995
|
-
p:
|
|
3996
|
-
P:
|
|
3997
|
-
},
|
|
3998
|
-
function
|
|
3999
|
-
return
|
|
4000
|
-
}
|
|
4001
|
-
function
|
|
4002
|
-
return
|
|
4003
|
-
}
|
|
4004
|
-
function
|
|
4005
|
-
const r =
|
|
4006
|
-
if (console.warn(r),
|
|
4007
|
-
}
|
|
4008
|
-
function
|
|
3993
|
+
return a.replace("{{date}}", En(r, e)).replace("{{time}}", lr(o, e));
|
|
3994
|
+
}, ei = {
|
|
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
|
+
}
|
|
4001
|
+
function ii(t) {
|
|
4002
|
+
return ri.test(t);
|
|
4003
|
+
}
|
|
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);
|
|
4007
|
+
}
|
|
4008
|
+
function ci(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
|
|
4012
|
+
const li = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, ui = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, di = /^'([^]*?)'?$/, fi = /''/g, hi = /[a-zA-Z]/;
|
|
4013
4013
|
function z(t, e, n) {
|
|
4014
|
-
var u, d, f,
|
|
4015
|
-
const r = le(), o = r.locale ??
|
|
4016
|
-
if (!
|
|
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))
|
|
4017
4017
|
throw new RangeError("Invalid time value");
|
|
4018
|
-
let c = e.match(
|
|
4019
|
-
const
|
|
4020
|
-
if (
|
|
4021
|
-
const
|
|
4022
|
-
return
|
|
4018
|
+
let c = e.match(ui).map((y) => {
|
|
4019
|
+
const h = y[0];
|
|
4020
|
+
if (h === "p" || h === "P") {
|
|
4021
|
+
const m = ei[h];
|
|
4022
|
+
return m(y, o.formatLong);
|
|
4023
4023
|
}
|
|
4024
4024
|
return y;
|
|
4025
|
-
}).join("").match(
|
|
4025
|
+
}).join("").match(li).map((y) => {
|
|
4026
4026
|
if (y === "''")
|
|
4027
4027
|
return { isToken: !1, value: "'" };
|
|
4028
|
-
const
|
|
4029
|
-
if (
|
|
4030
|
-
return { isToken: !1, value:
|
|
4031
|
-
if (
|
|
4028
|
+
const h = y[0];
|
|
4029
|
+
if (h === "'")
|
|
4030
|
+
return { isToken: !1, value: gi(y) };
|
|
4031
|
+
if (Mn[h])
|
|
4032
4032
|
return { isToken: !0, value: y };
|
|
4033
|
-
if (
|
|
4033
|
+
if (h.match(hi))
|
|
4034
4034
|
throw new RangeError(
|
|
4035
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
4035
|
+
"Format string contains an unescaped latin alphabet character `" + h + "`"
|
|
4036
4036
|
);
|
|
4037
4037
|
return { isToken: !1, value: y };
|
|
4038
4038
|
});
|
|
@@ -4044,147 +4044,161 @@ function z(t, e, n) {
|
|
|
4044
4044
|
};
|
|
4045
4045
|
return c.map((y) => {
|
|
4046
4046
|
if (!y.isToken) return y.value;
|
|
4047
|
-
const
|
|
4048
|
-
(
|
|
4049
|
-
const
|
|
4050
|
-
return
|
|
4047
|
+
const h = y.value;
|
|
4048
|
+
(ii(h) || ai(h)) && si(h, e, String(t));
|
|
4049
|
+
const m = Mn[h[0]];
|
|
4050
|
+
return m(s, h, o.localize, l);
|
|
4051
4051
|
}).join("");
|
|
4052
4052
|
}
|
|
4053
|
-
function fi(t) {
|
|
4054
|
-
const e = t.match(li);
|
|
4055
|
-
return e ? e[1].replace(ui, "'") : t;
|
|
4056
|
-
}
|
|
4057
|
-
function hi(t) {
|
|
4058
|
-
return P(t).getHours();
|
|
4059
|
-
}
|
|
4060
4053
|
function gi(t) {
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
function mi(t, e) {
|
|
4064
|
-
const n = P(t), r = P(e);
|
|
4065
|
-
return n.getFullYear() === r.getFullYear() && n.getMonth() === r.getMonth();
|
|
4054
|
+
const e = t.match(di);
|
|
4055
|
+
return e ? e[1].replace(fi, "'") : t;
|
|
4066
4056
|
}
|
|
4067
|
-
function
|
|
4068
|
-
return
|
|
4057
|
+
function mi(t) {
|
|
4058
|
+
return A(t).getHours();
|
|
4069
4059
|
}
|
|
4070
|
-
function vi(t
|
|
4071
|
-
return
|
|
4060
|
+
function vi(t) {
|
|
4061
|
+
return A(t).getMinutes();
|
|
4072
4062
|
}
|
|
4073
4063
|
function yi(t, e) {
|
|
4074
|
-
|
|
4064
|
+
const n = A(t), r = A(e);
|
|
4065
|
+
return n.getFullYear() === r.getFullYear() && n.getMonth() === r.getMonth();
|
|
4066
|
+
}
|
|
4067
|
+
function je(t) {
|
|
4068
|
+
return la(t, ca(t));
|
|
4075
4069
|
}
|
|
4076
4070
|
function bi(t, e) {
|
|
4071
|
+
return Rt(t, -1);
|
|
4072
|
+
}
|
|
4073
|
+
function pi(t, e) {
|
|
4077
4074
|
return nr(t, -1);
|
|
4078
4075
|
}
|
|
4079
|
-
function
|
|
4080
|
-
|
|
4081
|
-
|
|
4076
|
+
function wi(t, e) {
|
|
4077
|
+
return ir(t, -1);
|
|
4078
|
+
}
|
|
4079
|
+
function Di(t) {
|
|
4080
|
+
const e = Ct(t, { weekStartsOn: 0 }), n = Je(t, { weekStartsOn: 0 });
|
|
4081
|
+
return sr({ start: e, end: n });
|
|
4082
4082
|
}
|
|
4083
|
-
function
|
|
4084
|
-
const e =
|
|
4085
|
-
return
|
|
4083
|
+
function Mi(t) {
|
|
4084
|
+
const e = Ct(ma(t), { weekStartsOn: 0 }), n = Je(ga(t), { weekStartsOn: 0 });
|
|
4085
|
+
return sr({ start: e, end: n });
|
|
4086
4086
|
}
|
|
4087
|
-
function
|
|
4087
|
+
function Si(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 =
|
|
4092
|
+
const n = Ct(t, { weekStartsOn: 0 }), r = Je(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":
|
|
4096
4096
|
return z(t, "MMMM yyyy");
|
|
4097
4097
|
}
|
|
4098
4098
|
}
|
|
4099
|
-
function
|
|
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
|
|
4102
|
+
function me(t) {
|
|
4103
4103
|
return z(t, "h:mm a");
|
|
4104
4104
|
}
|
|
4105
|
-
function
|
|
4106
|
-
const n = /* @__PURE__ */ new Date(), r = (e - t) * 60, o =
|
|
4105
|
+
function xi(t, e) {
|
|
4106
|
+
const n = /* @__PURE__ */ new Date(), r = (e - t) * 60, o = mi(n) * 60 + vi(n) - t * 60;
|
|
4107
4107
|
return Math.max(0, Math.min(1, o / r));
|
|
4108
4108
|
}
|
|
4109
|
-
function
|
|
4109
|
+
function Xe(t, e = 15) {
|
|
4110
4110
|
return Math.round(t / e) * e;
|
|
4111
4111
|
}
|
|
4112
|
-
function
|
|
4112
|
+
function Nn(t, e, n) {
|
|
4113
4113
|
switch (e) {
|
|
4114
4114
|
case "day":
|
|
4115
|
-
return n === 1 ?
|
|
4115
|
+
return n === 1 ? Rt(t, 1) : bi(t);
|
|
4116
4116
|
case "week":
|
|
4117
|
-
return n === 1 ?
|
|
4117
|
+
return n === 1 ? ir(t, 1) : wi(t);
|
|
4118
4118
|
case "month":
|
|
4119
|
-
return n === 1 ?
|
|
4119
|
+
return n === 1 ? nr(t, 1) : pi(t);
|
|
4120
4120
|
}
|
|
4121
4121
|
}
|
|
4122
|
-
function
|
|
4123
|
-
const o = t / n * 60, a = r * 60 + o, i = Math.floor(a / 60), s = Math.floor(a % 60), c =
|
|
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);
|
|
4124
4124
|
return c.setHours(i, s, 0, 0), c;
|
|
4125
4125
|
}
|
|
4126
|
-
function
|
|
4126
|
+
function Oi(t, e) {
|
|
4127
4127
|
return (e - t) * 60;
|
|
4128
4128
|
}
|
|
4129
|
-
function
|
|
4130
|
-
return
|
|
4131
|
-
}
|
|
4132
|
-
const
|
|
4133
|
-
{ key: "day", label: "Day" },
|
|
4134
|
-
{ key: "week", label: "Week" },
|
|
4135
|
-
{ key: "month", label: "Month" }
|
|
4136
|
-
],
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
] })
|
|
4172
|
-
|
|
4129
|
+
function kn(t, e) {
|
|
4130
|
+
return ze(t, Lt(t)) - e * 60;
|
|
4131
|
+
}
|
|
4132
|
+
const Ni = [
|
|
4133
|
+
{ key: "day", label: "Day", labelShort: "Day" },
|
|
4134
|
+
{ key: "week", label: "Week", labelShort: "Week" },
|
|
4135
|
+
{ key: "month", label: "Month", labelShort: "Mo" }
|
|
4136
|
+
], ki = ({
|
|
4137
|
+
view: t,
|
|
4138
|
+
date: e,
|
|
4139
|
+
isMobile: n = !1,
|
|
4140
|
+
onViewChange: r,
|
|
4141
|
+
onDateChange: o
|
|
4142
|
+
}) => /* @__PURE__ */ W(
|
|
4143
|
+
"header",
|
|
4144
|
+
{
|
|
4145
|
+
className: `rss-header${n ? " rss-header--mobile" : ""}`,
|
|
4146
|
+
role: "toolbar",
|
|
4147
|
+
"aria-label": "Calendar navigation",
|
|
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
|
+
)
|
|
4171
|
+
] }),
|
|
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(
|
|
4174
|
+
"button",
|
|
4175
|
+
{
|
|
4176
|
+
className: `rss-view-btn ${t === c ? "rss-view-btn--active" : ""}`,
|
|
4177
|
+
onClick: () => r(c),
|
|
4178
|
+
"aria-pressed": t === c,
|
|
4179
|
+
children: n ? u : l
|
|
4180
|
+
},
|
|
4181
|
+
c
|
|
4182
|
+
)) })
|
|
4183
|
+
]
|
|
4184
|
+
}
|
|
4185
|
+
);
|
|
4186
|
+
function ur(t, e) {
|
|
4173
4187
|
return t.filter((n) => {
|
|
4174
|
-
const r =
|
|
4188
|
+
const r = Lt(e), o = new Date(r.getTime() + 24 * 60 * 60 * 1e3);
|
|
4175
4189
|
return n.start < o && n.end > r;
|
|
4176
4190
|
});
|
|
4177
4191
|
}
|
|
4178
|
-
function
|
|
4192
|
+
function Ci(t, e, n) {
|
|
4179
4193
|
if (t.length === 0) return [];
|
|
4180
|
-
const r =
|
|
4194
|
+
const r = Oi(e, n), o = [...t].sort((s, c) => {
|
|
4181
4195
|
const l = s.start.getTime() - c.start.getTime();
|
|
4182
|
-
return l !== 0 ? l :
|
|
4196
|
+
return l !== 0 ? l : ze(c.end, c.start) - ze(s.end, s.start);
|
|
4183
4197
|
}), a = [];
|
|
4184
4198
|
for (const s of o) {
|
|
4185
4199
|
let c = !1;
|
|
4186
4200
|
for (const l of a)
|
|
4187
|
-
if (l.some((d) =>
|
|
4201
|
+
if (l.some((d) => Ti(d, s))) {
|
|
4188
4202
|
l.push(s), c = !0;
|
|
4189
4203
|
break;
|
|
4190
4204
|
}
|
|
@@ -4196,7 +4210,7 @@ function Ni(t, e, n) {
|
|
|
4196
4210
|
for (const u of s) {
|
|
4197
4211
|
let d = -1;
|
|
4198
4212
|
for (let f = 0; f < c.length; f++) {
|
|
4199
|
-
const
|
|
4213
|
+
const g = c[f], y = g[g.length - 1];
|
|
4200
4214
|
if (!y || y.end <= u.start) {
|
|
4201
4215
|
d = f;
|
|
4202
4216
|
break;
|
|
@@ -4207,11 +4221,11 @@ function Ni(t, e, n) {
|
|
|
4207
4221
|
const l = c.length;
|
|
4208
4222
|
c.forEach((u, d) => {
|
|
4209
4223
|
u.forEach((f) => {
|
|
4210
|
-
const
|
|
4224
|
+
const g = Math.max(0, kn(f.start, e)), y = Math.min(r, kn(f.end, e)), h = Math.max(15, y - g);
|
|
4211
4225
|
i.push({
|
|
4212
4226
|
...f,
|
|
4213
|
-
topPercent:
|
|
4214
|
-
heightPercent:
|
|
4227
|
+
topPercent: g / r * 100,
|
|
4228
|
+
heightPercent: h / r * 100,
|
|
4215
4229
|
leftPercent: d / l * 100,
|
|
4216
4230
|
widthPercent: 1 / l * 100
|
|
4217
4231
|
});
|
|
@@ -4220,10 +4234,10 @@ function Ni(t, e, n) {
|
|
|
4220
4234
|
}
|
|
4221
4235
|
return i;
|
|
4222
4236
|
}
|
|
4223
|
-
function
|
|
4237
|
+
function Ti(t, e) {
|
|
4224
4238
|
return t.start < e.end && t.end > e.start;
|
|
4225
4239
|
}
|
|
4226
|
-
function
|
|
4240
|
+
function Gi() {
|
|
4227
4241
|
return `evt-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`;
|
|
4228
4242
|
}
|
|
4229
4243
|
const xe = [
|
|
@@ -4244,7 +4258,7 @@ const xe = [
|
|
|
4244
4258
|
"#84cc16"
|
|
4245
4259
|
// lime
|
|
4246
4260
|
];
|
|
4247
|
-
function
|
|
4261
|
+
function Ze(t) {
|
|
4248
4262
|
let e = 0;
|
|
4249
4263
|
for (let n = 0; n < t.length; n++)
|
|
4250
4264
|
e = e * 31 + t.charCodeAt(n) | 0;
|
|
@@ -4253,10 +4267,10 @@ function Je(t) {
|
|
|
4253
4267
|
function Cn(t) {
|
|
4254
4268
|
return z(t, "yyyy-MM-dd'T'HH:mm");
|
|
4255
4269
|
}
|
|
4256
|
-
function
|
|
4270
|
+
function Tn(t) {
|
|
4257
4271
|
return new Date(t);
|
|
4258
4272
|
}
|
|
4259
|
-
const
|
|
4273
|
+
const Pi = ({
|
|
4260
4274
|
event: t,
|
|
4261
4275
|
initialStart: e,
|
|
4262
4276
|
initialEnd: n,
|
|
@@ -4264,17 +4278,17 @@ const ki = ({
|
|
|
4264
4278
|
onDelete: o,
|
|
4265
4279
|
onClose: a
|
|
4266
4280
|
}) => {
|
|
4267
|
-
const i = t !== null, s = C(null), [c, l] =
|
|
4281
|
+
const i = t !== null, s = C(null), [c, l] = R((t == null ? void 0 : t.title) ?? ""), [u, d] = R(
|
|
4268
4282
|
Cn((t == null ? void 0 : t.start) ?? e ?? /* @__PURE__ */ new Date())
|
|
4269
|
-
), [f,
|
|
4283
|
+
), [f, g] = R(
|
|
4270
4284
|
Cn((t == null ? void 0 : t.end) ?? n ?? new Date(Date.now() + 60 * 60 * 1e3))
|
|
4271
|
-
), [y,
|
|
4272
|
-
return
|
|
4285
|
+
), [y, h] = R((t == null ? void 0 : t.color) ?? xe[0]);
|
|
4286
|
+
return P(() => {
|
|
4273
4287
|
var v;
|
|
4274
4288
|
(v = s.current) == null || v.focus();
|
|
4275
|
-
}, []),
|
|
4276
|
-
const v = (
|
|
4277
|
-
|
|
4289
|
+
}, []), P(() => {
|
|
4290
|
+
const v = (p) => {
|
|
4291
|
+
p.key === "Escape" && a();
|
|
4278
4292
|
};
|
|
4279
4293
|
return window.addEventListener("keydown", v), () => window.removeEventListener("keydown", v);
|
|
4280
4294
|
}, [a]), // Backdrop — click outside to close
|
|
@@ -4288,17 +4302,17 @@ const ki = ({
|
|
|
4288
4302
|
onMouseDown: (v) => {
|
|
4289
4303
|
v.target === v.currentTarget && a();
|
|
4290
4304
|
},
|
|
4291
|
-
children: /* @__PURE__ */
|
|
4305
|
+
children: /* @__PURE__ */ W("div", { className: "rss-modal", children: [
|
|
4292
4306
|
/* @__PURE__ */ b("h3", { className: "rss-modal-title", children: i ? "Edit Event" : "New Event" }),
|
|
4293
|
-
/* @__PURE__ */
|
|
4307
|
+
/* @__PURE__ */ W("form", { onSubmit: (v) => {
|
|
4294
4308
|
v.preventDefault(), c.trim() && r({
|
|
4295
4309
|
title: c.trim(),
|
|
4296
|
-
start:
|
|
4297
|
-
end:
|
|
4310
|
+
start: Tn(u),
|
|
4311
|
+
end: Tn(f),
|
|
4298
4312
|
color: y
|
|
4299
4313
|
});
|
|
4300
4314
|
}, style: { display: "contents" }, children: [
|
|
4301
|
-
/* @__PURE__ */
|
|
4315
|
+
/* @__PURE__ */ W("div", { className: "rss-form-group", children: [
|
|
4302
4316
|
/* @__PURE__ */ b("label", { className: "rss-label", htmlFor: "rss-event-title", children: "Title" }),
|
|
4303
4317
|
/* @__PURE__ */ b(
|
|
4304
4318
|
"input",
|
|
@@ -4315,8 +4329,8 @@ const ki = ({
|
|
|
4315
4329
|
}
|
|
4316
4330
|
)
|
|
4317
4331
|
] }),
|
|
4318
|
-
/* @__PURE__ */
|
|
4319
|
-
/* @__PURE__ */
|
|
4332
|
+
/* @__PURE__ */ W("div", { className: "rss-form-row", children: [
|
|
4333
|
+
/* @__PURE__ */ W("div", { className: "rss-form-group", children: [
|
|
4320
4334
|
/* @__PURE__ */ b("label", { className: "rss-label", htmlFor: "rss-event-start", children: "Start" }),
|
|
4321
4335
|
/* @__PURE__ */ b(
|
|
4322
4336
|
"input",
|
|
@@ -4330,7 +4344,7 @@ const ki = ({
|
|
|
4330
4344
|
}
|
|
4331
4345
|
)
|
|
4332
4346
|
] }),
|
|
4333
|
-
/* @__PURE__ */
|
|
4347
|
+
/* @__PURE__ */ W("div", { className: "rss-form-group", children: [
|
|
4334
4348
|
/* @__PURE__ */ b("label", { className: "rss-label", htmlFor: "rss-event-end", children: "End" }),
|
|
4335
4349
|
/* @__PURE__ */ b(
|
|
4336
4350
|
"input",
|
|
@@ -4340,13 +4354,13 @@ const ki = ({
|
|
|
4340
4354
|
type: "datetime-local",
|
|
4341
4355
|
value: f,
|
|
4342
4356
|
min: u,
|
|
4343
|
-
onChange: (v) =>
|
|
4357
|
+
onChange: (v) => g(v.target.value),
|
|
4344
4358
|
required: !0
|
|
4345
4359
|
}
|
|
4346
4360
|
)
|
|
4347
4361
|
] })
|
|
4348
4362
|
] }),
|
|
4349
|
-
/* @__PURE__ */
|
|
4363
|
+
/* @__PURE__ */ W("div", { className: "rss-form-group", children: [
|
|
4350
4364
|
/* @__PURE__ */ b("span", { className: "rss-label", children: "Color" }),
|
|
4351
4365
|
/* @__PURE__ */ b("div", { className: "rss-color-row", role: "radiogroup", "aria-label": "Event color", children: xe.map((v) => /* @__PURE__ */ b(
|
|
4352
4366
|
"button",
|
|
@@ -4357,12 +4371,12 @@ const ki = ({
|
|
|
4357
4371
|
"aria-label": `Color ${v}`,
|
|
4358
4372
|
className: `rss-color-swatch ${v === y ? "rss-color-swatch--selected" : ""}`,
|
|
4359
4373
|
style: { background: v },
|
|
4360
|
-
onClick: () =>
|
|
4374
|
+
onClick: () => h(v)
|
|
4361
4375
|
},
|
|
4362
4376
|
v
|
|
4363
4377
|
)) })
|
|
4364
4378
|
] }),
|
|
4365
|
-
/* @__PURE__ */
|
|
4379
|
+
/* @__PURE__ */ W("div", { className: "rss-modal-actions", children: [
|
|
4366
4380
|
i && o && /* @__PURE__ */ b("div", { className: "rss-modal-actions-left", children: /* @__PURE__ */ b(
|
|
4367
4381
|
"button",
|
|
4368
4382
|
{
|
|
@@ -4379,7 +4393,7 @@ const ki = ({
|
|
|
4379
4393
|
] })
|
|
4380
4394
|
}
|
|
4381
4395
|
);
|
|
4382
|
-
},
|
|
4396
|
+
}, Ri = ({
|
|
4383
4397
|
event: t,
|
|
4384
4398
|
hourHeight: e,
|
|
4385
4399
|
gridHeight: n,
|
|
@@ -4387,54 +4401,54 @@ const ki = ({
|
|
|
4387
4401
|
onResizeEnd: o,
|
|
4388
4402
|
isOverlay: a = !1
|
|
4389
4403
|
}) => {
|
|
4390
|
-
const i = t.color ??
|
|
4404
|
+
const i = t.color ?? Ze(t.id), s = { type: "event", event: t }, { attributes: c, listeners: l, setNodeRef: u, transform: d, isDragging: f } = tr({
|
|
4391
4405
|
id: t.id,
|
|
4392
4406
|
data: s,
|
|
4393
4407
|
// Disable dragging while the user is resizing (handled separately)
|
|
4394
4408
|
disabled: a
|
|
4395
|
-
}), [
|
|
4396
|
-
(
|
|
4409
|
+
}), [g, y] = R(null), h = C(!1), m = g ?? t.end, v = I(
|
|
4410
|
+
(w) => {
|
|
4397
4411
|
if (f) return;
|
|
4398
|
-
|
|
4399
|
-
const
|
|
4400
|
-
|
|
4401
|
-
const
|
|
4402
|
-
|
|
4403
|
-
const
|
|
4404
|
-
const
|
|
4405
|
-
y(
|
|
4406
|
-
},
|
|
4407
|
-
const
|
|
4408
|
-
o(t.id,
|
|
4412
|
+
w.preventDefault(), w.stopPropagation();
|
|
4413
|
+
const x = w.currentTarget;
|
|
4414
|
+
x.setPointerCapture(w.pointerId);
|
|
4415
|
+
const S = w.clientY, M = t.end;
|
|
4416
|
+
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);
|
|
4409
4423
|
};
|
|
4410
|
-
|
|
4424
|
+
x.addEventListener("pointermove", N), x.addEventListener("pointerup", L);
|
|
4411
4425
|
},
|
|
4412
4426
|
[t, e, f, o]
|
|
4413
|
-
),
|
|
4414
|
-
let
|
|
4415
|
-
if (
|
|
4416
|
-
const
|
|
4417
|
-
|
|
4427
|
+
), p = n / e * 60;
|
|
4428
|
+
let D = t.heightPercent;
|
|
4429
|
+
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;
|
|
4418
4432
|
}
|
|
4419
4433
|
const E = {
|
|
4420
4434
|
top: `${t.topPercent}%`,
|
|
4421
|
-
height: `${
|
|
4435
|
+
height: `${D}%`,
|
|
4422
4436
|
left: `calc(${t.leftPercent}% + 2px)`,
|
|
4423
4437
|
width: `calc(${t.widthPercent}% - 4px)`,
|
|
4424
4438
|
background: i,
|
|
4425
4439
|
// Apply dnd-kit's drag transform (identity when not dragging)
|
|
4426
|
-
transform:
|
|
4440
|
+
transform: Wt.Translate.toString(d),
|
|
4427
4441
|
// Overlap: events at higher column indices sit slightly higher
|
|
4428
4442
|
zIndex: a ? 100 : f ? 50 : 1
|
|
4429
4443
|
};
|
|
4430
|
-
return /* @__PURE__ */
|
|
4444
|
+
return /* @__PURE__ */ W(
|
|
4431
4445
|
"div",
|
|
4432
4446
|
{
|
|
4433
4447
|
ref: u,
|
|
4434
4448
|
className: [
|
|
4435
4449
|
"rss-event",
|
|
4436
4450
|
f ? "rss-event--dragging" : "",
|
|
4437
|
-
|
|
4451
|
+
h.current ? "rss-event--resizing" : "",
|
|
4438
4452
|
a ? "rss-event--overlay" : ""
|
|
4439
4453
|
].filter(Boolean).join(" "),
|
|
4440
4454
|
style: E,
|
|
@@ -4442,19 +4456,19 @@ const ki = ({
|
|
|
4442
4456
|
...c,
|
|
4443
4457
|
role: "button",
|
|
4444
4458
|
tabIndex: 0,
|
|
4445
|
-
"aria-label": `${t.title}, ${
|
|
4446
|
-
onClick: (
|
|
4447
|
-
f || (
|
|
4459
|
+
"aria-label": `${t.title}, ${me(t.start)} to ${me(m)}`,
|
|
4460
|
+
onClick: (w) => {
|
|
4461
|
+
f || (w.stopPropagation(), r(t));
|
|
4448
4462
|
},
|
|
4449
|
-
onKeyDown: (
|
|
4450
|
-
(
|
|
4463
|
+
onKeyDown: (w) => {
|
|
4464
|
+
(w.key === "Enter" || w.key === " ") && (w.preventDefault(), r(t)), (w.key === "Delete" || w.key === "Backspace") && r(t);
|
|
4451
4465
|
},
|
|
4452
4466
|
children: [
|
|
4453
4467
|
/* @__PURE__ */ b("div", { className: "rss-event-title", children: t.title }),
|
|
4454
|
-
/* @__PURE__ */
|
|
4455
|
-
|
|
4468
|
+
/* @__PURE__ */ W("div", { className: "rss-event-time", children: [
|
|
4469
|
+
me(t.start),
|
|
4456
4470
|
" – ",
|
|
4457
|
-
|
|
4471
|
+
me(m)
|
|
4458
4472
|
] }),
|
|
4459
4473
|
!a && /* @__PURE__ */ b(
|
|
4460
4474
|
"div",
|
|
@@ -4462,7 +4476,7 @@ const ki = ({
|
|
|
4462
4476
|
className: "rss-event-resize-handle",
|
|
4463
4477
|
"aria-hidden": "true",
|
|
4464
4478
|
onPointerDown: v,
|
|
4465
|
-
onClick: (
|
|
4479
|
+
onClick: (w) => w.stopPropagation()
|
|
4466
4480
|
}
|
|
4467
4481
|
)
|
|
4468
4482
|
]
|
|
@@ -4470,7 +4484,7 @@ const ki = ({
|
|
|
4470
4484
|
);
|
|
4471
4485
|
};
|
|
4472
4486
|
Array.from({ length: 24 }, (t, e) => e);
|
|
4473
|
-
const
|
|
4487
|
+
const Ai = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dr = ({
|
|
4474
4488
|
columns: t,
|
|
4475
4489
|
events: e,
|
|
4476
4490
|
hourHeight: n,
|
|
@@ -4483,78 +4497,78 @@ const Pi = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], sr = ({
|
|
|
4483
4497
|
}) => {
|
|
4484
4498
|
const l = Array.from(
|
|
4485
4499
|
{ length: o - r },
|
|
4486
|
-
(
|
|
4500
|
+
(m, v) => r + v
|
|
4487
4501
|
), u = l.length * n, d = C(null);
|
|
4488
|
-
|
|
4502
|
+
P(() => {
|
|
4489
4503
|
if (!d.current || !a) return;
|
|
4490
|
-
const
|
|
4491
|
-
const
|
|
4492
|
-
a(
|
|
4504
|
+
const m = d.current, v = () => {
|
|
4505
|
+
const D = t.length || 1;
|
|
4506
|
+
a(m.offsetWidth / D);
|
|
4493
4507
|
};
|
|
4494
4508
|
v();
|
|
4495
|
-
const
|
|
4496
|
-
return
|
|
4509
|
+
const p = new ResizeObserver(v);
|
|
4510
|
+
return p.observe(m), () => p.disconnect();
|
|
4497
4511
|
}, [t.length, a]);
|
|
4498
|
-
const
|
|
4499
|
-
if (
|
|
4500
|
-
const
|
|
4501
|
-
c(
|
|
4512
|
+
const g = xi(r, o) * u, { setNodeRef: y } = er({ id: "timegrid-body" }), h = (m, v) => {
|
|
4513
|
+
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);
|
|
4502
4516
|
};
|
|
4503
|
-
return /* @__PURE__ */
|
|
4504
|
-
/* @__PURE__ */
|
|
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: [
|
|
4505
4519
|
/* @__PURE__ */ b("div", { className: "rss-timegrid-allday-gutter" }),
|
|
4506
|
-
/* @__PURE__ */ b("div", { className: "rss-day-headers", children: t.map((
|
|
4507
|
-
const v =
|
|
4508
|
-
return /* @__PURE__ */
|
|
4509
|
-
/* @__PURE__ */ b("span", { className: "rss-day-header-weekday", children:
|
|
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()] }),
|
|
4510
4524
|
/* @__PURE__ */ b(
|
|
4511
4525
|
"span",
|
|
4512
4526
|
{
|
|
4513
4527
|
className: `rss-day-header-num ${v ? "rss-day-header-num--today" : ""}`,
|
|
4514
|
-
children: z(
|
|
4528
|
+
children: z(m.date, "d")
|
|
4515
4529
|
}
|
|
4516
4530
|
)
|
|
4517
|
-
] },
|
|
4531
|
+
] }, m.key);
|
|
4518
4532
|
}) })
|
|
4519
4533
|
] }),
|
|
4520
|
-
/* @__PURE__ */
|
|
4534
|
+
/* @__PURE__ */ W(
|
|
4521
4535
|
"div",
|
|
4522
4536
|
{
|
|
4523
4537
|
className: "rss-timegrid-body",
|
|
4524
4538
|
ref: y,
|
|
4525
4539
|
style: { height: u },
|
|
4526
4540
|
children: [
|
|
4527
|
-
/* @__PURE__ */ b("div", { className: "rss-time-gutter", "aria-hidden": "true", children: l.map((
|
|
4541
|
+
/* @__PURE__ */ b("div", { className: "rss-time-gutter", "aria-hidden": "true", children: l.map((m) => /* @__PURE__ */ b(
|
|
4528
4542
|
"div",
|
|
4529
4543
|
{
|
|
4530
4544
|
className: "rss-time-label",
|
|
4531
4545
|
style: { height: n, lineHeight: `${n}px` },
|
|
4532
|
-
children:
|
|
4546
|
+
children: m === r ? "" : On(m)
|
|
4533
4547
|
},
|
|
4534
|
-
|
|
4548
|
+
m
|
|
4535
4549
|
)) }),
|
|
4536
|
-
/* @__PURE__ */ b("div", { className: "rss-columns", ref: d, style: { height: u }, children: t.map((
|
|
4537
|
-
const v =
|
|
4538
|
-
return /* @__PURE__ */
|
|
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(
|
|
4539
4553
|
"div",
|
|
4540
4554
|
{
|
|
4541
|
-
className: `rss-column ${
|
|
4555
|
+
className: `rss-column ${D ? "rss-column--today" : ""}`,
|
|
4542
4556
|
style: { height: u },
|
|
4543
4557
|
role: "grid",
|
|
4544
|
-
"aria-label": z(
|
|
4545
|
-
onClick: (E) =>
|
|
4558
|
+
"aria-label": z(m.date, "EEEE, MMMM d"),
|
|
4559
|
+
onClick: (E) => h(E, m),
|
|
4546
4560
|
children: [
|
|
4547
4561
|
l.map((E) => /* @__PURE__ */ b(
|
|
4548
4562
|
"div",
|
|
4549
4563
|
{
|
|
4550
4564
|
className: "rss-hour-cell",
|
|
4551
4565
|
style: { height: n },
|
|
4552
|
-
"aria-label": `${
|
|
4566
|
+
"aria-label": `${On(E)} on ${z(m.date, "MMMM d")}`
|
|
4553
4567
|
},
|
|
4554
4568
|
E
|
|
4555
4569
|
)),
|
|
4556
|
-
|
|
4557
|
-
|
|
4570
|
+
p.map((E) => /* @__PURE__ */ b(
|
|
4571
|
+
Ri,
|
|
4558
4572
|
{
|
|
4559
4573
|
event: E,
|
|
4560
4574
|
hourHeight: n,
|
|
@@ -4564,25 +4578,25 @@ const Pi = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], sr = ({
|
|
|
4564
4578
|
},
|
|
4565
4579
|
E.id
|
|
4566
4580
|
)),
|
|
4567
|
-
|
|
4581
|
+
D && /* @__PURE__ */ b(
|
|
4568
4582
|
"div",
|
|
4569
4583
|
{
|
|
4570
4584
|
className: "rss-now-line",
|
|
4571
|
-
style: { top:
|
|
4585
|
+
style: { top: g },
|
|
4572
4586
|
"aria-hidden": "true",
|
|
4573
4587
|
"aria-label": "Current time"
|
|
4574
4588
|
}
|
|
4575
4589
|
)
|
|
4576
4590
|
]
|
|
4577
4591
|
},
|
|
4578
|
-
|
|
4592
|
+
m.key
|
|
4579
4593
|
);
|
|
4580
4594
|
}) })
|
|
4581
4595
|
]
|
|
4582
4596
|
}
|
|
4583
|
-
)
|
|
4584
|
-
] });
|
|
4585
|
-
},
|
|
4597
|
+
)
|
|
4598
|
+
] }) });
|
|
4599
|
+
}, Wi = ({
|
|
4586
4600
|
date: t,
|
|
4587
4601
|
events: e,
|
|
4588
4602
|
hourHeight: n,
|
|
@@ -4595,7 +4609,7 @@ const Pi = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], sr = ({
|
|
|
4595
4609
|
}) => {
|
|
4596
4610
|
const l = [{ date: t, key: t.toDateString() }];
|
|
4597
4611
|
return /* @__PURE__ */ b(
|
|
4598
|
-
|
|
4612
|
+
dr,
|
|
4599
4613
|
{
|
|
4600
4614
|
columns: l,
|
|
4601
4615
|
events: e,
|
|
@@ -4608,7 +4622,7 @@ const Pi = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], sr = ({
|
|
|
4608
4622
|
onColumnWidthChange: c
|
|
4609
4623
|
}
|
|
4610
4624
|
);
|
|
4611
|
-
},
|
|
4625
|
+
}, Li = ({
|
|
4612
4626
|
date: t,
|
|
4613
4627
|
events: e,
|
|
4614
4628
|
hourHeight: n,
|
|
@@ -4619,12 +4633,12 @@ const Pi = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], sr = ({
|
|
|
4619
4633
|
onSlotClick: s,
|
|
4620
4634
|
onColumnWidthChange: c
|
|
4621
4635
|
}) => {
|
|
4622
|
-
const u =
|
|
4636
|
+
const u = Di(t).map((d) => ({
|
|
4623
4637
|
date: d,
|
|
4624
4638
|
key: z(d, "yyyy-MM-dd")
|
|
4625
4639
|
}));
|
|
4626
4640
|
return /* @__PURE__ */ b(
|
|
4627
|
-
|
|
4641
|
+
dr,
|
|
4628
4642
|
{
|
|
4629
4643
|
columns: u,
|
|
4630
4644
|
events: e,
|
|
@@ -4637,11 +4651,11 @@ const Pi = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], sr = ({
|
|
|
4637
4651
|
onColumnWidthChange: c
|
|
4638
4652
|
}
|
|
4639
4653
|
);
|
|
4640
|
-
},
|
|
4641
|
-
const n = { type: "event", event: t }, { attributes: r, listeners: o, setNodeRef: a, transform: i, isDragging: s } =
|
|
4654
|
+
}, Yi = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], Pn = 3, Fi = ({ event: t, onClick: e }) => {
|
|
4655
|
+
const n = { type: "event", event: t }, { attributes: r, listeners: o, setNodeRef: a, transform: i, isDragging: s } = tr({
|
|
4642
4656
|
id: `month-${t.id}`,
|
|
4643
4657
|
data: n
|
|
4644
|
-
}), c = t.color ??
|
|
4658
|
+
}), c = t.color ?? Ze(t.id);
|
|
4645
4659
|
return /* @__PURE__ */ b(
|
|
4646
4660
|
"div",
|
|
4647
4661
|
{
|
|
@@ -4650,7 +4664,7 @@ const Pi = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], sr = ({
|
|
|
4650
4664
|
style: {
|
|
4651
4665
|
background: c,
|
|
4652
4666
|
opacity: s ? 0.4 : 1,
|
|
4653
|
-
transform:
|
|
4667
|
+
transform: Wt.Translate.toString(i),
|
|
4654
4668
|
cursor: "grab"
|
|
4655
4669
|
},
|
|
4656
4670
|
...o,
|
|
@@ -4667,23 +4681,23 @@ const Pi = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], sr = ({
|
|
|
4667
4681
|
children: t.title
|
|
4668
4682
|
}
|
|
4669
4683
|
);
|
|
4670
|
-
},
|
|
4684
|
+
}, Ii = ({
|
|
4671
4685
|
day: t,
|
|
4672
4686
|
currentMonth: e,
|
|
4673
4687
|
events: n,
|
|
4674
4688
|
onEventClick: r,
|
|
4675
4689
|
onSlotClick: o
|
|
4676
4690
|
}) => {
|
|
4677
|
-
const a =
|
|
4691
|
+
const a = je(t), i = !yi(t, e), { setNodeRef: s, isOver: c } = er({
|
|
4678
4692
|
id: `month-cell-${z(t, "yyyy-MM-dd")}`,
|
|
4679
4693
|
data: { date: t }
|
|
4680
|
-
}), l = n.slice(0,
|
|
4694
|
+
}), l = n.slice(0, Pn), u = n.length - Pn, d = () => {
|
|
4681
4695
|
const f = new Date(t);
|
|
4682
4696
|
f.setHours(9, 0, 0, 0);
|
|
4683
|
-
const
|
|
4684
|
-
|
|
4697
|
+
const g = new Date(t);
|
|
4698
|
+
g.setHours(10, 0, 0, 0), o(f, g);
|
|
4685
4699
|
};
|
|
4686
|
-
return /* @__PURE__ */
|
|
4700
|
+
return /* @__PURE__ */ W(
|
|
4687
4701
|
"div",
|
|
4688
4702
|
{
|
|
4689
4703
|
ref: s,
|
|
@@ -4709,8 +4723,8 @@ const Pi = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], sr = ({
|
|
|
4709
4723
|
children: z(t, "d")
|
|
4710
4724
|
}
|
|
4711
4725
|
),
|
|
4712
|
-
l.map((f) => /* @__PURE__ */ b(
|
|
4713
|
-
u > 0 && /* @__PURE__ */
|
|
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: [
|
|
4714
4728
|
"+",
|
|
4715
4729
|
u,
|
|
4716
4730
|
" more"
|
|
@@ -4718,19 +4732,19 @@ const Pi = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], sr = ({
|
|
|
4718
4732
|
]
|
|
4719
4733
|
}
|
|
4720
4734
|
);
|
|
4721
|
-
},
|
|
4735
|
+
}, Bi = ({
|
|
4722
4736
|
date: t,
|
|
4723
4737
|
events: e,
|
|
4724
4738
|
onEventClick: n,
|
|
4725
4739
|
onSlotClick: r
|
|
4726
4740
|
}) => {
|
|
4727
|
-
const o =
|
|
4728
|
-
return /* @__PURE__ */
|
|
4729
|
-
/* @__PURE__ */ b("div", { className: "rss-month-weekdays", role: "row", "aria-hidden": "true", children:
|
|
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)) }),
|
|
4730
4744
|
/* @__PURE__ */ b("div", { className: "rss-month-grid", children: o.map((a) => {
|
|
4731
|
-
const i =
|
|
4745
|
+
const i = ur(e, a);
|
|
4732
4746
|
return /* @__PURE__ */ b(
|
|
4733
|
-
|
|
4747
|
+
Ii,
|
|
4734
4748
|
{
|
|
4735
4749
|
day: a,
|
|
4736
4750
|
currentMonth: t,
|
|
@@ -4743,16 +4757,16 @@ const Pi = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], sr = ({
|
|
|
4743
4757
|
}) })
|
|
4744
4758
|
] });
|
|
4745
4759
|
};
|
|
4746
|
-
function
|
|
4747
|
-
const { onEventAdd: e, onEventChange: n, onEventDelete: r } = t, [o, a] =
|
|
4748
|
-
s(
|
|
4749
|
-
}, []), d = I((
|
|
4750
|
-
s(null), l(
|
|
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) => {
|
|
4762
|
+
s(h), l(null), a(!0);
|
|
4763
|
+
}, []), d = I((h) => {
|
|
4764
|
+
s(null), l(h), a(!0);
|
|
4751
4765
|
}, []), f = I(() => {
|
|
4752
4766
|
a(!1), s(null), l(null);
|
|
4753
|
-
}, []),
|
|
4754
|
-
(
|
|
4755
|
-
i ? n == null || n({ ...i, ...
|
|
4767
|
+
}, []), g = I(
|
|
4768
|
+
(h) => {
|
|
4769
|
+
i ? n == null || n({ ...i, ...h }) : e == null || e(h), f();
|
|
4756
4770
|
},
|
|
4757
4771
|
[i, n, e, f]
|
|
4758
4772
|
), y = I(() => {
|
|
@@ -4765,144 +4779,178 @@ function Ii(t) {
|
|
|
4765
4779
|
openEditModal: u,
|
|
4766
4780
|
openAddModal: d,
|
|
4767
4781
|
closeModal: f,
|
|
4768
|
-
handleModalSave:
|
|
4782
|
+
handleModalSave: g,
|
|
4769
4783
|
handleModalDelete: y
|
|
4770
4784
|
};
|
|
4771
4785
|
}
|
|
4772
|
-
const
|
|
4786
|
+
const Rn = {
|
|
4787
|
+
/** Below this width → mobile */
|
|
4788
|
+
mobile: 640,
|
|
4789
|
+
/** Below this width (≥ mobile) → tablet */
|
|
4790
|
+
tablet: 1024
|
|
4791
|
+
};
|
|
4792
|
+
function An() {
|
|
4793
|
+
if (typeof window > "u") return "desktop";
|
|
4794
|
+
const t = window.innerWidth;
|
|
4795
|
+
return t < Rn.mobile ? "mobile" : t < Rn.tablet ? "tablet" : "desktop";
|
|
4796
|
+
}
|
|
4797
|
+
function zi() {
|
|
4798
|
+
const [t, e] = R(An);
|
|
4799
|
+
return P(() => {
|
|
4800
|
+
const n = () => e(An());
|
|
4801
|
+
return window.addEventListener("resize", n, { passive: !0 }), () => window.removeEventListener("resize", n);
|
|
4802
|
+
}, []), t;
|
|
4803
|
+
}
|
|
4804
|
+
const ji = 64, Xi = 0, Hi = 24, Ki = ({
|
|
4773
4805
|
events: t,
|
|
4774
|
-
view
|
|
4806
|
+
// Allow `view` to be undefined so we can distinguish "not provided" from
|
|
4807
|
+
// "explicitly set to 'week'" — needed for breakpoint-based default.
|
|
4808
|
+
view: e,
|
|
4775
4809
|
date: n,
|
|
4776
4810
|
onEventAdd: r,
|
|
4777
4811
|
onEventChange: o,
|
|
4778
4812
|
onEventDelete: a,
|
|
4779
4813
|
onViewChange: i,
|
|
4780
4814
|
onDateChange: s,
|
|
4781
|
-
hourHeight: c =
|
|
4782
|
-
startHour: l =
|
|
4783
|
-
endHour: u =
|
|
4815
|
+
hourHeight: c = ji,
|
|
4816
|
+
startHour: l = Xi,
|
|
4817
|
+
endHour: u = Hi,
|
|
4784
4818
|
className: d = ""
|
|
4785
4819
|
}) => {
|
|
4786
|
-
const [
|
|
4787
|
-
|
|
4788
|
-
}, w = (
|
|
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
4824
|
}, {
|
|
4791
|
-
isModalOpen:
|
|
4792
|
-
editingEvent:
|
|
4825
|
+
isModalOpen: x,
|
|
4826
|
+
editingEvent: S,
|
|
4793
4827
|
pendingSlot: M,
|
|
4794
|
-
openEditModal:
|
|
4795
|
-
openAddModal:
|
|
4796
|
-
closeModal:
|
|
4797
|
-
handleModalSave:
|
|
4798
|
-
handleModalDelete:
|
|
4799
|
-
} =
|
|
4800
|
-
|
|
4801
|
-
const
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
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
|
+
}
|
|
4842
|
+
}),
|
|
4843
|
+
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
|
+
}
|
|
4805
4851
|
})
|
|
4806
|
-
),
|
|
4807
|
-
const
|
|
4808
|
-
(
|
|
4809
|
-
},
|
|
4810
|
-
var
|
|
4811
|
-
const { delta:
|
|
4812
|
-
if (
|
|
4813
|
-
const
|
|
4814
|
-
if (
|
|
4815
|
-
const
|
|
4816
|
-
let
|
|
4817
|
-
if (
|
|
4818
|
-
const
|
|
4819
|
-
if (
|
|
4820
|
-
o == null || o({ ...
|
|
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 });
|
|
4821
4867
|
return;
|
|
4822
4868
|
}
|
|
4823
|
-
if (
|
|
4824
|
-
const
|
|
4825
|
-
if (!((_t = (
|
|
4826
|
-
const
|
|
4827
|
-
|
|
4828
|
-
const
|
|
4829
|
-
|
|
4830
|
-
const
|
|
4831
|
-
if (
|
|
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;
|
|
4832
4878
|
o == null || o({
|
|
4833
|
-
...
|
|
4834
|
-
start:
|
|
4835
|
-
end:
|
|
4879
|
+
...nt,
|
|
4880
|
+
start: Rt(nt.start, ot),
|
|
4881
|
+
end: Rt(nt.end, ot)
|
|
4836
4882
|
});
|
|
4837
4883
|
}
|
|
4838
|
-
},
|
|
4839
|
-
const
|
|
4840
|
-
|
|
4841
|
-
},
|
|
4842
|
-
...
|
|
4843
|
-
color:
|
|
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),
|
|
4844
4890
|
topPercent: 0,
|
|
4845
4891
|
heightPercent: 0,
|
|
4846
4892
|
leftPercent: 0,
|
|
4847
4893
|
widthPercent: 100
|
|
4848
|
-
} : null,
|
|
4894
|
+
} : null, ft = (Y, Q) => L({ start: Y, end: Q }), yt = {
|
|
4849
4895
|
events: t,
|
|
4850
4896
|
hourHeight: c,
|
|
4851
4897
|
startHour: l,
|
|
4852
4898
|
endHour: u,
|
|
4853
|
-
onEventClick:
|
|
4854
|
-
onEventResizeEnd:
|
|
4855
|
-
onSlotClick:
|
|
4856
|
-
onColumnWidthChange: (
|
|
4857
|
-
|
|
4899
|
+
onEventClick: N,
|
|
4900
|
+
onEventResizeEnd: Ht,
|
|
4901
|
+
onSlotClick: ft,
|
|
4902
|
+
onColumnWidthChange: (Y) => {
|
|
4903
|
+
dt.current.columnWidth = Y;
|
|
4858
4904
|
}
|
|
4859
4905
|
};
|
|
4860
|
-
return /* @__PURE__ */
|
|
4861
|
-
/* @__PURE__ */
|
|
4862
|
-
|
|
4906
|
+
return /* @__PURE__ */ W("div", { className: `rss-root ${d}`.trim(), children: [
|
|
4907
|
+
/* @__PURE__ */ W(
|
|
4908
|
+
Yo,
|
|
4863
4909
|
{
|
|
4864
|
-
sensors:
|
|
4865
|
-
modifiers: [
|
|
4866
|
-
onDragStart:
|
|
4867
|
-
onDragEnd:
|
|
4910
|
+
sensors: lt,
|
|
4911
|
+
modifiers: [na],
|
|
4912
|
+
onDragStart: ue,
|
|
4913
|
+
onDragEnd: vt,
|
|
4868
4914
|
children: [
|
|
4869
4915
|
/* @__PURE__ */ b(
|
|
4870
|
-
|
|
4916
|
+
ki,
|
|
4871
4917
|
{
|
|
4872
|
-
view:
|
|
4873
|
-
date:
|
|
4874
|
-
|
|
4918
|
+
view: p,
|
|
4919
|
+
date: D,
|
|
4920
|
+
isMobile: g,
|
|
4921
|
+
onViewChange: E,
|
|
4875
4922
|
onDateChange: w
|
|
4876
4923
|
}
|
|
4877
4924
|
),
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
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,
|
|
4882
4929
|
{
|
|
4883
|
-
date:
|
|
4930
|
+
date: D,
|
|
4884
4931
|
events: t,
|
|
4885
|
-
onEventClick:
|
|
4886
|
-
onSlotClick:
|
|
4932
|
+
onEventClick: N,
|
|
4933
|
+
onSlotClick: ft
|
|
4887
4934
|
}
|
|
4888
4935
|
),
|
|
4889
|
-
|
|
4936
|
+
Tt && /* @__PURE__ */ b(ta, { children: /* @__PURE__ */ b(
|
|
4890
4937
|
"div",
|
|
4891
4938
|
{
|
|
4892
4939
|
className: "rss-drag-overlay",
|
|
4893
4940
|
style: {
|
|
4894
|
-
// Give the overlay a fixed height so it looks natural
|
|
4895
|
-
|
|
4896
|
-
|
|
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
|
|
4897
4945
|
},
|
|
4898
|
-
children: /* @__PURE__ */
|
|
4946
|
+
children: /* @__PURE__ */ W(
|
|
4899
4947
|
"div",
|
|
4900
4948
|
{
|
|
4901
4949
|
className: "rss-event",
|
|
4902
4950
|
style: {
|
|
4903
4951
|
position: "relative",
|
|
4904
4952
|
height: "100%",
|
|
4905
|
-
background:
|
|
4953
|
+
background: Tt.color,
|
|
4906
4954
|
opacity: 0.9,
|
|
4907
4955
|
top: 0,
|
|
4908
4956
|
left: 0,
|
|
@@ -4910,8 +4958,8 @@ const Bi = 64, $i = 0, zi = 24, _i = ({
|
|
|
4910
4958
|
boxShadow: "0 8px 24px rgb(0 0 0 / 0.2)"
|
|
4911
4959
|
},
|
|
4912
4960
|
children: [
|
|
4913
|
-
/* @__PURE__ */ b("div", { className: "rss-event-title", children:
|
|
4914
|
-
/* @__PURE__ */ b("div", { className: "rss-event-time", children: z(
|
|
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") })
|
|
4915
4963
|
]
|
|
4916
4964
|
}
|
|
4917
4965
|
)
|
|
@@ -4920,24 +4968,25 @@ const Bi = 64, $i = 0, zi = 24, _i = ({
|
|
|
4920
4968
|
]
|
|
4921
4969
|
}
|
|
4922
4970
|
),
|
|
4923
|
-
|
|
4924
|
-
|
|
4971
|
+
x && /* @__PURE__ */ b(
|
|
4972
|
+
Pi,
|
|
4925
4973
|
{
|
|
4926
|
-
event:
|
|
4974
|
+
event: S,
|
|
4927
4975
|
initialStart: M == null ? void 0 : M.start,
|
|
4928
4976
|
initialEnd: M == null ? void 0 : M.end,
|
|
4929
|
-
onSave:
|
|
4930
|
-
onDelete:
|
|
4931
|
-
onClose:
|
|
4977
|
+
onSave: G,
|
|
4978
|
+
onDelete: S ? K : void 0,
|
|
4979
|
+
onClose: T
|
|
4932
4980
|
}
|
|
4933
4981
|
)
|
|
4934
4982
|
] });
|
|
4935
|
-
},
|
|
4983
|
+
}, Ui = "0.1.3";
|
|
4936
4984
|
export {
|
|
4937
4985
|
xe as EVENT_COLORS,
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4986
|
+
Ki as Scheduler,
|
|
4987
|
+
Ui as VERSION,
|
|
4988
|
+
Gi as generateId,
|
|
4989
|
+
Ze as pickColor,
|
|
4990
|
+
zi as useBreakpoint
|
|
4942
4991
|
};
|
|
4943
4992
|
//# sourceMappingURL=index.es.js.map
|