@blofin/blofin-ui 1.0.0-beta.7 → 1.0.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as
|
|
3
|
-
import * as
|
|
4
|
-
import V, { useLayoutEffect as
|
|
5
|
-
import { c as
|
|
6
|
-
import { c as
|
|
7
|
-
import { unstable_batchedUpdates as rt, createPortal as
|
|
8
|
-
import { u as
|
|
9
|
-
var
|
|
10
|
-
const Yn =
|
|
2
|
+
import { j as z } from "./jsx-runtime-ba6e4aac.js";
|
|
3
|
+
import * as Ce from "react";
|
|
4
|
+
import V, { useLayoutEffect as $n, useEffect as M, useRef as L, useMemo as O, useCallback as K, useState as Q, createContext as Je, memo as Fn, useReducer as Hn, useContext as Ie } from "react";
|
|
5
|
+
import { c as W } from "./index-c57db938.js";
|
|
6
|
+
import { c as Me } from "./clsx.m-e965ef18.js";
|
|
7
|
+
import { unstable_batchedUpdates as rt, createPortal as Wn } from "react-dom";
|
|
8
|
+
import { u as Xn } from "./useTheme-81e2a73e.js";
|
|
9
|
+
var ne = /* @__PURE__ */ ((e) => (e.default = "default", e.desc = "desc", e.asc = "asc", e))(ne || {});
|
|
10
|
+
const Yn = W("bu-w-full bu-rounded-lg", {
|
|
11
11
|
variants: {
|
|
12
12
|
theme: {
|
|
13
13
|
light: "bu-bg-light-background",
|
|
14
14
|
dark: "bu-bg-dark-background"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
}), Kn =
|
|
17
|
+
}), Kn = W("bu-w-full bu-border-collapse"), Un = W("bu-sticky bu-top-0 bu-z-[100]", {
|
|
18
18
|
variants: {
|
|
19
19
|
theme: {
|
|
20
20
|
light: "bu-bg-light-background",
|
|
21
21
|
dark: "bu-bg-dark-background"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
}), rn =
|
|
24
|
+
}), rn = W(
|
|
25
25
|
"bu-relative bu-z-[999] bu-h-[25px] bu-select-none bu-border-b bu-px-[4px] bu-text-left bu-text-[12px] bu-font-medium bu-transition-all bu-duration-300",
|
|
26
26
|
{
|
|
27
27
|
variants: {
|
|
@@ -35,28 +35,28 @@ const Yn = $("bu-w-full bu-overflow-auto bu-rounded-lg", {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
), on =
|
|
38
|
+
), on = W("bu-sticky bu-left-0 bu-top-0 bu-z-[1000]", {
|
|
39
39
|
variants: {
|
|
40
40
|
theme: {
|
|
41
41
|
light: "bu-bg-light-background",
|
|
42
42
|
dark: "bu-bg-dark-background"
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
}), sn =
|
|
45
|
+
}), sn = W("bu-sticky bu-right-0 bu-top-0 bu-z-[1000]", {
|
|
46
46
|
variants: {
|
|
47
47
|
theme: {
|
|
48
48
|
light: "bu-bg-light-background",
|
|
49
49
|
dark: "bu-bg-dark-background"
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
}), Vn =
|
|
52
|
+
}), Vn = W("bu-cursor-pointer", {
|
|
53
53
|
variants: {
|
|
54
54
|
theme: {
|
|
55
55
|
light: "hover:bu-bg-light-hover-fill-primary",
|
|
56
56
|
dark: "hover:bu-bg-dark-hover-fill-primary"
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
}), qn =
|
|
59
|
+
}), qn = W(
|
|
60
60
|
"bu-pointer-events-auto bu-opacity-0 bu-transition-opacity bu-duration-200 group-hover:bu-opacity-100",
|
|
61
61
|
{
|
|
62
62
|
variants: {
|
|
@@ -66,14 +66,14 @@ const Yn = $("bu-w-full bu-overflow-auto bu-rounded-lg", {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
), an =
|
|
69
|
+
), an = W("bu-z-[1002] !bu-cursor-grabbing bu-opacity-60 bu-shadow-lg", {
|
|
70
70
|
variants: {
|
|
71
71
|
theme: {
|
|
72
72
|
light: "bu-bg-light-background",
|
|
73
73
|
dark: "bu-bg-dark-background"
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
}), Gn =
|
|
76
|
+
}), Gn = W("bu-ml-2 bu-inline-flex bu-flex-col bu-align-middle"), Jn = W(
|
|
77
77
|
"bu-h-0 bu-w-0 bu-border-l-4 bu-border-r-4 bu-border-transparent",
|
|
78
78
|
{
|
|
79
79
|
variants: {
|
|
@@ -91,42 +91,42 @@ const Yn = $("bu-w-full bu-overflow-auto bu-rounded-lg", {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
), _n =
|
|
94
|
+
), _n = W("", {
|
|
95
95
|
variants: {
|
|
96
96
|
theme: {
|
|
97
97
|
light: "bu-bg-light-background",
|
|
98
98
|
dark: "bu-bg-dark-background"
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
}), Zn =
|
|
101
|
+
}), Zn = W("bu-group bu-border-b bu-transition-colors bu-duration-200", {
|
|
102
102
|
variants: {
|
|
103
103
|
theme: {
|
|
104
104
|
light: "bu-hover:bu-bg-light-fill-primary bu-border-light-line-primary",
|
|
105
105
|
dark: "bu-hover:bu-bg-dark-fill-primary bu-border-dark-line-primary"
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
}), ln =
|
|
108
|
+
}), ln = W("bu-h-[60px] bu-border-b bu-px-[4px] bu-text-[12px]", {
|
|
109
109
|
variants: {
|
|
110
110
|
theme: {
|
|
111
111
|
light: "bu-border-light-line-primary bu-text-light-label group-hover:bu-bg-light-fill-primary",
|
|
112
112
|
dark: "bu-border-dark-line-primary bu-text-dark-label group-hover:bu-bg-dark-fill-primary"
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
}), cn =
|
|
115
|
+
}), cn = W("bu-sticky bu-left-0", {
|
|
116
116
|
variants: {
|
|
117
117
|
theme: {
|
|
118
118
|
light: "bu-bg-light-background group-hover:bu-bg-light-fill-primary",
|
|
119
119
|
dark: "bu-bg-dark-background group-hover:bu-bg-dark-fill-primary"
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
}), un =
|
|
122
|
+
}), un = W("bu-sticky bu-right-0", {
|
|
123
123
|
variants: {
|
|
124
124
|
theme: {
|
|
125
125
|
light: "bu-bg-light-background group-hover:bu-bg-light-fill-primary",
|
|
126
126
|
dark: "bu-bg-dark-background group-hover:bu-bg-dark-fill-primary"
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
}), Qn =
|
|
129
|
+
}), Qn = W("bu-px-5 bu-py-10 bu-text-center", {
|
|
130
130
|
variants: {
|
|
131
131
|
theme: {
|
|
132
132
|
light: "bu-text-light-label-60",
|
|
@@ -168,7 +168,7 @@ const Yn = $("bu-w-full bu-overflow-auto bu-rounded-lg", {
|
|
|
168
168
|
function rr() {
|
|
169
169
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
170
170
|
t[n] = arguments[n];
|
|
171
|
-
return
|
|
171
|
+
return O(
|
|
172
172
|
() => (r) => {
|
|
173
173
|
t.forEach((o) => o(r));
|
|
174
174
|
},
|
|
@@ -177,62 +177,62 @@ function rr() {
|
|
|
177
177
|
);
|
|
178
178
|
}
|
|
179
179
|
const dt = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
180
|
-
function
|
|
180
|
+
function ze(e) {
|
|
181
181
|
const t = Object.prototype.toString.call(e);
|
|
182
182
|
return t === "[object Window]" || // In Electron context the Window object serializes to [object global]
|
|
183
183
|
t === "[object global]";
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function It(e) {
|
|
186
186
|
return "nodeType" in e;
|
|
187
187
|
}
|
|
188
188
|
function q(e) {
|
|
189
189
|
var t, n;
|
|
190
|
-
return e ?
|
|
190
|
+
return e ? ze(e) ? e : It(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function Et(e) {
|
|
193
193
|
const {
|
|
194
194
|
Document: t
|
|
195
195
|
} = q(e);
|
|
196
196
|
return e instanceof t;
|
|
197
197
|
}
|
|
198
|
-
function
|
|
199
|
-
return
|
|
198
|
+
function _e(e) {
|
|
199
|
+
return ze(e) ? !1 : e instanceof q(e).HTMLElement;
|
|
200
200
|
}
|
|
201
201
|
function dn(e) {
|
|
202
202
|
return e instanceof q(e).SVGElement;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
return e ?
|
|
204
|
+
function je(e) {
|
|
205
|
+
return e ? ze(e) ? e.document : It(e) ? Et(e) ? e : _e(e) || dn(e) ? e.ownerDocument : document : document : document;
|
|
206
206
|
}
|
|
207
|
-
const
|
|
207
|
+
const fe = dt ? $n : M;
|
|
208
208
|
function kt(e) {
|
|
209
|
-
const t =
|
|
210
|
-
return
|
|
209
|
+
const t = L(e);
|
|
210
|
+
return fe(() => {
|
|
211
211
|
t.current = e;
|
|
212
|
-
}),
|
|
212
|
+
}), K(function() {
|
|
213
213
|
for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
|
|
214
214
|
r[o] = arguments[o];
|
|
215
215
|
return t.current == null ? void 0 : t.current(...r);
|
|
216
216
|
}, []);
|
|
217
217
|
}
|
|
218
218
|
function or() {
|
|
219
|
-
const e =
|
|
219
|
+
const e = L(null), t = K((r, o) => {
|
|
220
220
|
e.current = setInterval(r, o);
|
|
221
|
-
}, []), n =
|
|
221
|
+
}, []), n = K(() => {
|
|
222
222
|
e.current !== null && (clearInterval(e.current), e.current = null);
|
|
223
223
|
}, []);
|
|
224
224
|
return [t, n];
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function Ve(e, t) {
|
|
227
227
|
t === void 0 && (t = [e]);
|
|
228
|
-
const n =
|
|
229
|
-
return
|
|
228
|
+
const n = L(e);
|
|
229
|
+
return fe(() => {
|
|
230
230
|
n.current !== e && (n.current = e);
|
|
231
231
|
}, t), n;
|
|
232
232
|
}
|
|
233
|
-
function
|
|
234
|
-
const n =
|
|
235
|
-
return
|
|
233
|
+
function Ze(e, t) {
|
|
234
|
+
const n = L();
|
|
235
|
+
return O(
|
|
236
236
|
() => {
|
|
237
237
|
const r = e(n.current);
|
|
238
238
|
return n.current = r, r;
|
|
@@ -242,7 +242,7 @@ function _e(e, t) {
|
|
|
242
242
|
);
|
|
243
243
|
}
|
|
244
244
|
function at(e) {
|
|
245
|
-
const t = kt(e), n =
|
|
245
|
+
const t = kt(e), n = L(null), r = K(
|
|
246
246
|
(o) => {
|
|
247
247
|
o !== n.current && (t == null || t(o, n.current)), n.current = o;
|
|
248
248
|
},
|
|
@@ -252,14 +252,14 @@ function at(e) {
|
|
|
252
252
|
return [n, r];
|
|
253
253
|
}
|
|
254
254
|
function mt(e) {
|
|
255
|
-
const t =
|
|
256
|
-
return
|
|
255
|
+
const t = L();
|
|
256
|
+
return M(() => {
|
|
257
257
|
t.current = e;
|
|
258
258
|
}, [e]), t.current;
|
|
259
259
|
}
|
|
260
260
|
let pt = {};
|
|
261
|
-
function
|
|
262
|
-
return
|
|
261
|
+
function Qe(e, t) {
|
|
262
|
+
return O(() => {
|
|
263
263
|
if (t)
|
|
264
264
|
return t;
|
|
265
265
|
const n = pt[e] == null ? 0 : pt[e] + 1;
|
|
@@ -272,9 +272,9 @@ function fn(e) {
|
|
|
272
272
|
r[o - 1] = arguments[o];
|
|
273
273
|
return r.reduce((i, s) => {
|
|
274
274
|
const a = Object.entries(s);
|
|
275
|
-
for (const [l,
|
|
276
|
-
const
|
|
277
|
-
|
|
275
|
+
for (const [l, u] of a) {
|
|
276
|
+
const c = i[l];
|
|
277
|
+
c != null && (i[l] = c + e * u);
|
|
278
278
|
}
|
|
279
279
|
return i;
|
|
280
280
|
}, {
|
|
@@ -282,11 +282,11 @@ function fn(e) {
|
|
|
282
282
|
});
|
|
283
283
|
};
|
|
284
284
|
}
|
|
285
|
-
const
|
|
285
|
+
const Le = /* @__PURE__ */ fn(1), lt = /* @__PURE__ */ fn(-1);
|
|
286
286
|
function ir(e) {
|
|
287
287
|
return "clientX" in e && "clientY" in e;
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function Tt(e) {
|
|
290
290
|
if (!e)
|
|
291
291
|
return !1;
|
|
292
292
|
const {
|
|
@@ -329,7 +329,7 @@ function St(e) {
|
|
|
329
329
|
y: e.clientY
|
|
330
330
|
} : null;
|
|
331
331
|
}
|
|
332
|
-
const
|
|
332
|
+
const qe = /* @__PURE__ */ Object.freeze({
|
|
333
333
|
Translate: {
|
|
334
334
|
toString(e) {
|
|
335
335
|
if (!e)
|
|
@@ -355,7 +355,7 @@ const Ve = /* @__PURE__ */ Object.freeze({
|
|
|
355
355
|
Transform: {
|
|
356
356
|
toString(e) {
|
|
357
357
|
if (e)
|
|
358
|
-
return [
|
|
358
|
+
return [qe.Translate.toString(e), qe.Scale.toString(e)].join(" ");
|
|
359
359
|
}
|
|
360
360
|
},
|
|
361
361
|
Transition: {
|
|
@@ -414,26 +414,26 @@ function ur(e) {
|
|
|
414
414
|
}, n);
|
|
415
415
|
}
|
|
416
416
|
function dr() {
|
|
417
|
-
const [e, t] =
|
|
417
|
+
const [e, t] = Q("");
|
|
418
418
|
return {
|
|
419
|
-
announce:
|
|
419
|
+
announce: K((r) => {
|
|
420
420
|
r != null && t(r);
|
|
421
421
|
}, []),
|
|
422
422
|
announcement: e
|
|
423
423
|
};
|
|
424
424
|
}
|
|
425
|
-
const hn = /* @__PURE__ */
|
|
425
|
+
const hn = /* @__PURE__ */ Je(null);
|
|
426
426
|
function fr(e) {
|
|
427
|
-
const t =
|
|
428
|
-
|
|
427
|
+
const t = Ie(hn);
|
|
428
|
+
M(() => {
|
|
429
429
|
if (!t)
|
|
430
430
|
throw new Error("useDndMonitor must be used within a children of <DndContext>");
|
|
431
431
|
return t(e);
|
|
432
432
|
}, [e, t]);
|
|
433
433
|
}
|
|
434
434
|
function hr() {
|
|
435
|
-
const [e] =
|
|
436
|
-
return [
|
|
435
|
+
const [e] = Q(() => /* @__PURE__ */ new Set()), t = K((r) => (e.add(r), () => e.delete(r)), [e]);
|
|
436
|
+
return [K((r) => {
|
|
437
437
|
let {
|
|
438
438
|
type: o,
|
|
439
439
|
event: i
|
|
@@ -488,77 +488,77 @@ function vr(e) {
|
|
|
488
488
|
const {
|
|
489
489
|
announce: i,
|
|
490
490
|
announcement: s
|
|
491
|
-
} = dr(), a =
|
|
492
|
-
if (
|
|
493
|
-
|
|
494
|
-
}, []), fr(
|
|
495
|
-
onDragStart(
|
|
491
|
+
} = dr(), a = Qe("DndLiveRegion"), [l, u] = Q(!1);
|
|
492
|
+
if (M(() => {
|
|
493
|
+
u(!0);
|
|
494
|
+
}, []), fr(O(() => ({
|
|
495
|
+
onDragStart(d) {
|
|
496
496
|
let {
|
|
497
|
-
active:
|
|
498
|
-
} =
|
|
497
|
+
active: f
|
|
498
|
+
} = d;
|
|
499
499
|
i(t.onDragStart({
|
|
500
|
-
active:
|
|
500
|
+
active: f
|
|
501
501
|
}));
|
|
502
502
|
},
|
|
503
|
-
onDragMove(
|
|
503
|
+
onDragMove(d) {
|
|
504
504
|
let {
|
|
505
|
-
active:
|
|
506
|
-
over:
|
|
507
|
-
} =
|
|
505
|
+
active: f,
|
|
506
|
+
over: h
|
|
507
|
+
} = d;
|
|
508
508
|
t.onDragMove && i(t.onDragMove({
|
|
509
|
-
active:
|
|
510
|
-
over:
|
|
509
|
+
active: f,
|
|
510
|
+
over: h
|
|
511
511
|
}));
|
|
512
512
|
},
|
|
513
|
-
onDragOver(
|
|
513
|
+
onDragOver(d) {
|
|
514
514
|
let {
|
|
515
|
-
active:
|
|
516
|
-
over:
|
|
517
|
-
} =
|
|
515
|
+
active: f,
|
|
516
|
+
over: h
|
|
517
|
+
} = d;
|
|
518
518
|
i(t.onDragOver({
|
|
519
|
-
active:
|
|
520
|
-
over:
|
|
519
|
+
active: f,
|
|
520
|
+
over: h
|
|
521
521
|
}));
|
|
522
522
|
},
|
|
523
|
-
onDragEnd(
|
|
523
|
+
onDragEnd(d) {
|
|
524
524
|
let {
|
|
525
|
-
active:
|
|
526
|
-
over:
|
|
527
|
-
} =
|
|
525
|
+
active: f,
|
|
526
|
+
over: h
|
|
527
|
+
} = d;
|
|
528
528
|
i(t.onDragEnd({
|
|
529
|
-
active:
|
|
530
|
-
over:
|
|
529
|
+
active: f,
|
|
530
|
+
over: h
|
|
531
531
|
}));
|
|
532
532
|
},
|
|
533
|
-
onDragCancel(
|
|
533
|
+
onDragCancel(d) {
|
|
534
534
|
let {
|
|
535
|
-
active:
|
|
536
|
-
over:
|
|
537
|
-
} =
|
|
535
|
+
active: f,
|
|
536
|
+
over: h
|
|
537
|
+
} = d;
|
|
538
538
|
i(t.onDragCancel({
|
|
539
|
-
active:
|
|
540
|
-
over:
|
|
539
|
+
active: f,
|
|
540
|
+
over: h
|
|
541
541
|
}));
|
|
542
542
|
}
|
|
543
543
|
}), [i, t])), !l)
|
|
544
544
|
return null;
|
|
545
|
-
const
|
|
545
|
+
const c = V.createElement(V.Fragment, null, V.createElement(cr, {
|
|
546
546
|
id: r,
|
|
547
547
|
value: o.draggable
|
|
548
548
|
}), V.createElement(ur, {
|
|
549
549
|
id: a,
|
|
550
550
|
announcement: s
|
|
551
551
|
}));
|
|
552
|
-
return n ?
|
|
552
|
+
return n ? Wn(c, n) : c;
|
|
553
553
|
}
|
|
554
|
-
var
|
|
554
|
+
var $;
|
|
555
555
|
(function(e) {
|
|
556
556
|
e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
|
|
557
|
-
})(
|
|
557
|
+
})($ || ($ = {}));
|
|
558
558
|
function ct() {
|
|
559
559
|
}
|
|
560
560
|
function Kt(e, t) {
|
|
561
|
-
return
|
|
561
|
+
return O(
|
|
562
562
|
() => ({
|
|
563
563
|
sensor: e,
|
|
564
564
|
options: t ?? {}
|
|
@@ -570,7 +570,7 @@ function Kt(e, t) {
|
|
|
570
570
|
function pr() {
|
|
571
571
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
572
572
|
t[n] = arguments[n];
|
|
573
|
-
return
|
|
573
|
+
return O(
|
|
574
574
|
() => [...t].filter((r) => r != null),
|
|
575
575
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
576
576
|
[...t]
|
|
@@ -631,12 +631,12 @@ const Sr = (e) => {
|
|
|
631
631
|
id: a
|
|
632
632
|
} = s, l = n.get(a);
|
|
633
633
|
if (l) {
|
|
634
|
-
const
|
|
634
|
+
const u = yr(Ut(l), o);
|
|
635
635
|
i.push({
|
|
636
636
|
id: a,
|
|
637
637
|
data: {
|
|
638
638
|
droppableContainer: s,
|
|
639
|
-
value:
|
|
639
|
+
value: u
|
|
640
640
|
}
|
|
641
641
|
});
|
|
642
642
|
}
|
|
@@ -646,8 +646,8 @@ const Sr = (e) => {
|
|
|
646
646
|
function Dr(e, t) {
|
|
647
647
|
const n = Math.max(t.top, e.top), r = Math.max(t.left, e.left), o = Math.min(t.left + t.width, e.left + e.width), i = Math.min(t.top + t.height, e.top + e.height), s = o - r, a = i - n;
|
|
648
648
|
if (r < o && n < i) {
|
|
649
|
-
const l = t.width * t.height,
|
|
650
|
-
return Number(
|
|
649
|
+
const l = t.width * t.height, u = e.width * e.height, c = s * a, d = c / (l + u - c);
|
|
650
|
+
return Number(d.toFixed(4));
|
|
651
651
|
}
|
|
652
652
|
return 0;
|
|
653
653
|
}
|
|
@@ -688,7 +688,7 @@ function gn(e, t) {
|
|
|
688
688
|
y: e.top - t.top
|
|
689
689
|
} : ie;
|
|
690
690
|
}
|
|
691
|
-
function
|
|
691
|
+
function Ir(e) {
|
|
692
692
|
return function(n) {
|
|
693
693
|
for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
|
|
694
694
|
o[i - 1] = arguments[i];
|
|
@@ -703,7 +703,7 @@ function Er(e) {
|
|
|
703
703
|
});
|
|
704
704
|
};
|
|
705
705
|
}
|
|
706
|
-
const
|
|
706
|
+
const Er = /* @__PURE__ */ Ir(1);
|
|
707
707
|
function kr(e) {
|
|
708
708
|
if (e.startsWith("matrix3d(")) {
|
|
709
709
|
const t = e.slice(9, -1).split(/, /);
|
|
@@ -724,7 +724,7 @@ function kr(e) {
|
|
|
724
724
|
}
|
|
725
725
|
return null;
|
|
726
726
|
}
|
|
727
|
-
function
|
|
727
|
+
function Tr(e, t, n) {
|
|
728
728
|
const r = kr(t);
|
|
729
729
|
if (!r)
|
|
730
730
|
return e;
|
|
@@ -733,28 +733,28 @@ function Ar(e, t, n) {
|
|
|
733
733
|
scaleY: i,
|
|
734
734
|
x: s,
|
|
735
735
|
y: a
|
|
736
|
-
} = r, l = e.left - s - (1 - o) * parseFloat(n),
|
|
736
|
+
} = r, l = e.left - s - (1 - o) * parseFloat(n), u = e.top - a - (1 - i) * parseFloat(n.slice(n.indexOf(" ") + 1)), c = o ? e.width / o : e.width, d = i ? e.height / i : e.height;
|
|
737
737
|
return {
|
|
738
|
-
width:
|
|
739
|
-
height:
|
|
740
|
-
top:
|
|
741
|
-
right: l +
|
|
742
|
-
bottom:
|
|
738
|
+
width: c,
|
|
739
|
+
height: d,
|
|
740
|
+
top: u,
|
|
741
|
+
right: l + c,
|
|
742
|
+
bottom: u + d,
|
|
743
743
|
left: l
|
|
744
744
|
};
|
|
745
745
|
}
|
|
746
|
-
const
|
|
746
|
+
const Ar = {
|
|
747
747
|
ignoreTransform: !1
|
|
748
748
|
};
|
|
749
|
-
function
|
|
750
|
-
t === void 0 && (t =
|
|
749
|
+
function Pe(e, t) {
|
|
750
|
+
t === void 0 && (t = Ar);
|
|
751
751
|
let n = e.getBoundingClientRect();
|
|
752
752
|
if (t.ignoreTransform) {
|
|
753
753
|
const {
|
|
754
|
-
transform:
|
|
755
|
-
transformOrigin:
|
|
754
|
+
transform: u,
|
|
755
|
+
transformOrigin: c
|
|
756
756
|
} = q(e).getComputedStyle(e);
|
|
757
|
-
|
|
757
|
+
u && (n = Tr(n, u, c));
|
|
758
758
|
}
|
|
759
759
|
const {
|
|
760
760
|
top: r,
|
|
@@ -774,11 +774,11 @@ function Le(e, t) {
|
|
|
774
774
|
};
|
|
775
775
|
}
|
|
776
776
|
function Vt(e) {
|
|
777
|
-
return
|
|
777
|
+
return Pe(e, {
|
|
778
778
|
ignoreTransform: !0
|
|
779
779
|
});
|
|
780
780
|
}
|
|
781
|
-
function
|
|
781
|
+
function Nr(e) {
|
|
782
782
|
const t = e.innerWidth, n = e.innerHeight;
|
|
783
783
|
return {
|
|
784
784
|
top: 0,
|
|
@@ -789,7 +789,7 @@ function Or(e) {
|
|
|
789
789
|
height: n
|
|
790
790
|
};
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function Or(e, t) {
|
|
793
793
|
return t === void 0 && (t = q(e).getComputedStyle(e)), t.position === "fixed";
|
|
794
794
|
}
|
|
795
795
|
function Mr(e, t) {
|
|
@@ -800,32 +800,32 @@ function Mr(e, t) {
|
|
|
800
800
|
return typeof i == "string" ? n.test(i) : !1;
|
|
801
801
|
});
|
|
802
802
|
}
|
|
803
|
-
function
|
|
803
|
+
function At(e, t) {
|
|
804
804
|
const n = [];
|
|
805
805
|
function r(o) {
|
|
806
806
|
if (t != null && n.length >= t || !o)
|
|
807
807
|
return n;
|
|
808
|
-
if (
|
|
808
|
+
if (Et(o) && o.scrollingElement != null && !n.includes(o.scrollingElement))
|
|
809
809
|
return n.push(o.scrollingElement), n;
|
|
810
|
-
if (!
|
|
810
|
+
if (!_e(o) || dn(o) || n.includes(o))
|
|
811
811
|
return n;
|
|
812
812
|
const i = q(e).getComputedStyle(o);
|
|
813
|
-
return o !== e && Mr(o, i) && n.push(o),
|
|
813
|
+
return o !== e && Mr(o, i) && n.push(o), Or(o, i) ? n : r(o.parentNode);
|
|
814
814
|
}
|
|
815
815
|
return e ? r(e) : n;
|
|
816
816
|
}
|
|
817
817
|
function bn(e) {
|
|
818
|
-
const [t] =
|
|
818
|
+
const [t] = At(e, 1);
|
|
819
819
|
return t ?? null;
|
|
820
820
|
}
|
|
821
821
|
function yt(e) {
|
|
822
|
-
return !dt || !e ? null :
|
|
822
|
+
return !dt || !e ? null : ze(e) ? e : It(e) ? Et(e) || e === je(e).scrollingElement ? window : _e(e) ? e : null : null;
|
|
823
823
|
}
|
|
824
824
|
function vn(e) {
|
|
825
|
-
return
|
|
825
|
+
return ze(e) ? e.scrollX : e.scrollLeft;
|
|
826
826
|
}
|
|
827
827
|
function pn(e) {
|
|
828
|
-
return
|
|
828
|
+
return ze(e) ? e.scrollY : e.scrollTop;
|
|
829
829
|
}
|
|
830
830
|
function Dt(e) {
|
|
831
831
|
return {
|
|
@@ -833,10 +833,10 @@ function Dt(e) {
|
|
|
833
833
|
y: pn(e)
|
|
834
834
|
};
|
|
835
835
|
}
|
|
836
|
-
var
|
|
836
|
+
var F;
|
|
837
837
|
(function(e) {
|
|
838
838
|
e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
|
|
839
|
-
})(
|
|
839
|
+
})(F || (F = {}));
|
|
840
840
|
function yn(e) {
|
|
841
841
|
return !dt || !e ? !1 : e === document.scrollingElement;
|
|
842
842
|
}
|
|
@@ -876,23 +876,23 @@ function zr(e, t, n, r, o) {
|
|
|
876
876
|
} = n;
|
|
877
877
|
r === void 0 && (r = 10), o === void 0 && (o = Lr);
|
|
878
878
|
const {
|
|
879
|
-
isTop:
|
|
880
|
-
isBottom:
|
|
881
|
-
isLeft:
|
|
882
|
-
isRight:
|
|
883
|
-
} = xn(e),
|
|
879
|
+
isTop: u,
|
|
880
|
+
isBottom: c,
|
|
881
|
+
isLeft: d,
|
|
882
|
+
isRight: f
|
|
883
|
+
} = xn(e), h = {
|
|
884
884
|
x: 0,
|
|
885
885
|
y: 0
|
|
886
|
-
},
|
|
886
|
+
}, v = {
|
|
887
887
|
x: 0,
|
|
888
888
|
y: 0
|
|
889
889
|
}, g = {
|
|
890
890
|
height: t.height * o.y,
|
|
891
891
|
width: t.width * o.x
|
|
892
892
|
};
|
|
893
|
-
return !
|
|
894
|
-
direction:
|
|
895
|
-
speed:
|
|
893
|
+
return !u && i <= t.top + g.height ? (h.y = F.Backward, v.y = r * Math.abs((t.top + g.height - i) / g.height)) : !c && l >= t.bottom - g.height && (h.y = F.Forward, v.y = r * Math.abs((t.bottom - g.height - l) / g.height)), !f && a >= t.right - g.width ? (h.x = F.Forward, v.x = r * Math.abs((t.right - g.width - a) / g.width)) : !d && s <= t.left + g.width && (h.x = F.Backward, v.x = r * Math.abs((t.left + g.width - s) / g.width)), {
|
|
894
|
+
direction: h,
|
|
895
|
+
speed: v
|
|
896
896
|
};
|
|
897
897
|
}
|
|
898
898
|
function jr(e) {
|
|
@@ -926,16 +926,16 @@ function jr(e) {
|
|
|
926
926
|
};
|
|
927
927
|
}
|
|
928
928
|
function wn(e) {
|
|
929
|
-
return e.reduce((t, n) =>
|
|
929
|
+
return e.reduce((t, n) => Le(t, Dt(n)), ie);
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function Pr(e) {
|
|
932
932
|
return e.reduce((t, n) => t + vn(n), 0);
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function Br(e) {
|
|
935
935
|
return e.reduce((t, n) => t + pn(n), 0);
|
|
936
936
|
}
|
|
937
|
-
function
|
|
938
|
-
if (t === void 0 && (t =
|
|
937
|
+
function $r(e, t) {
|
|
938
|
+
if (t === void 0 && (t = Pe), !e)
|
|
939
939
|
return;
|
|
940
940
|
const {
|
|
941
941
|
top: n,
|
|
@@ -948,20 +948,20 @@ function Fr(e, t) {
|
|
|
948
948
|
inline: "center"
|
|
949
949
|
});
|
|
950
950
|
}
|
|
951
|
-
const
|
|
952
|
-
class
|
|
951
|
+
const Fr = [["x", ["left", "right"], Pr], ["y", ["top", "bottom"], Br]];
|
|
952
|
+
class Nt {
|
|
953
953
|
constructor(t, n) {
|
|
954
954
|
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;
|
|
955
|
-
const r =
|
|
955
|
+
const r = At(n), o = wn(r);
|
|
956
956
|
this.rect = {
|
|
957
957
|
...t
|
|
958
958
|
}, this.width = t.width, this.height = t.height;
|
|
959
|
-
for (const [i, s, a] of
|
|
959
|
+
for (const [i, s, a] of Fr)
|
|
960
960
|
for (const l of s)
|
|
961
961
|
Object.defineProperty(this, l, {
|
|
962
962
|
get: () => {
|
|
963
|
-
const
|
|
964
|
-
return this.rect[l] +
|
|
963
|
+
const u = a(r), c = o[i] - u;
|
|
964
|
+
return this.rect[l] + c;
|
|
965
965
|
},
|
|
966
966
|
enumerable: !0
|
|
967
967
|
});
|
|
@@ -970,7 +970,7 @@ class Ot {
|
|
|
970
970
|
});
|
|
971
971
|
}
|
|
972
972
|
}
|
|
973
|
-
class
|
|
973
|
+
class Ye {
|
|
974
974
|
constructor(t) {
|
|
975
975
|
this.target = void 0, this.listeners = [], this.removeAll = () => {
|
|
976
976
|
this.listeners.forEach((n) => {
|
|
@@ -988,20 +988,20 @@ function Hr(e) {
|
|
|
988
988
|
const {
|
|
989
989
|
EventTarget: t
|
|
990
990
|
} = q(e);
|
|
991
|
-
return e instanceof t ? e :
|
|
991
|
+
return e instanceof t ? e : je(e);
|
|
992
992
|
}
|
|
993
993
|
function xt(e, t) {
|
|
994
994
|
const n = Math.abs(e.x), r = Math.abs(e.y);
|
|
995
995
|
return typeof t == "number" ? Math.sqrt(n ** 2 + r ** 2) > t : "x" in t && "y" in t ? n > t.x && r > t.y : "x" in t ? n > t.x : "y" in t ? r > t.y : !1;
|
|
996
996
|
}
|
|
997
|
-
var
|
|
997
|
+
var re;
|
|
998
998
|
(function(e) {
|
|
999
999
|
e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
|
|
1000
|
-
})(
|
|
1000
|
+
})(re || (re = {}));
|
|
1001
1001
|
function qt(e) {
|
|
1002
1002
|
e.preventDefault();
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1004
|
+
function Wr(e) {
|
|
1005
1005
|
e.stopPropagation();
|
|
1006
1006
|
}
|
|
1007
1007
|
var E;
|
|
@@ -1012,7 +1012,7 @@ const mn = {
|
|
|
1012
1012
|
start: [E.Space, E.Enter],
|
|
1013
1013
|
cancel: [E.Esc],
|
|
1014
1014
|
end: [E.Space, E.Enter, E.Tab]
|
|
1015
|
-
},
|
|
1015
|
+
}, Xr = (e, t) => {
|
|
1016
1016
|
let {
|
|
1017
1017
|
currentCoordinates: n
|
|
1018
1018
|
} = t;
|
|
@@ -1039,7 +1039,7 @@ const mn = {
|
|
|
1039
1039
|
};
|
|
1040
1040
|
}
|
|
1041
1041
|
};
|
|
1042
|
-
class
|
|
1042
|
+
class Ot {
|
|
1043
1043
|
constructor(t) {
|
|
1044
1044
|
this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = t;
|
|
1045
1045
|
const {
|
|
@@ -1047,27 +1047,27 @@ class Nt {
|
|
|
1047
1047
|
target: n
|
|
1048
1048
|
}
|
|
1049
1049
|
} = t;
|
|
1050
|
-
this.props = t, this.listeners = new
|
|
1050
|
+
this.props = t, this.listeners = new Ye(je(n)), this.windowListeners = new Ye(q(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
|
|
1051
1051
|
}
|
|
1052
1052
|
attach() {
|
|
1053
|
-
this.handleStart(), this.windowListeners.add(
|
|
1053
|
+
this.handleStart(), this.windowListeners.add(re.Resize, this.handleCancel), this.windowListeners.add(re.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(re.Keydown, this.handleKeyDown));
|
|
1054
1054
|
}
|
|
1055
1055
|
handleStart() {
|
|
1056
1056
|
const {
|
|
1057
1057
|
activeNode: t,
|
|
1058
1058
|
onStart: n
|
|
1059
1059
|
} = this.props, r = t.node.current;
|
|
1060
|
-
r &&
|
|
1060
|
+
r && $r(r), n(ie);
|
|
1061
1061
|
}
|
|
1062
1062
|
handleKeyDown(t) {
|
|
1063
|
-
if (
|
|
1063
|
+
if (Tt(t)) {
|
|
1064
1064
|
const {
|
|
1065
1065
|
active: n,
|
|
1066
1066
|
context: r,
|
|
1067
1067
|
options: o
|
|
1068
1068
|
} = this.props, {
|
|
1069
1069
|
keyboardCodes: i = mn,
|
|
1070
|
-
coordinateGetter: s =
|
|
1070
|
+
coordinateGetter: s = Xr,
|
|
1071
1071
|
scrollBehavior: a = "smooth"
|
|
1072
1072
|
} = o, {
|
|
1073
1073
|
code: l
|
|
@@ -1081,67 +1081,67 @@ class Nt {
|
|
|
1081
1081
|
return;
|
|
1082
1082
|
}
|
|
1083
1083
|
const {
|
|
1084
|
-
collisionRect:
|
|
1085
|
-
} = r.current,
|
|
1086
|
-
x:
|
|
1087
|
-
y:
|
|
1084
|
+
collisionRect: u
|
|
1085
|
+
} = r.current, c = u ? {
|
|
1086
|
+
x: u.left,
|
|
1087
|
+
y: u.top
|
|
1088
1088
|
} : ie;
|
|
1089
|
-
this.referenceCoordinates || (this.referenceCoordinates =
|
|
1090
|
-
const
|
|
1089
|
+
this.referenceCoordinates || (this.referenceCoordinates = c);
|
|
1090
|
+
const d = s(t, {
|
|
1091
1091
|
active: n,
|
|
1092
1092
|
context: r.current,
|
|
1093
|
-
currentCoordinates:
|
|
1093
|
+
currentCoordinates: c
|
|
1094
1094
|
});
|
|
1095
|
-
if (
|
|
1096
|
-
const
|
|
1095
|
+
if (d) {
|
|
1096
|
+
const f = lt(d, c), h = {
|
|
1097
1097
|
x: 0,
|
|
1098
1098
|
y: 0
|
|
1099
1099
|
}, {
|
|
1100
|
-
scrollableAncestors:
|
|
1100
|
+
scrollableAncestors: v
|
|
1101
1101
|
} = r.current;
|
|
1102
|
-
for (const g of
|
|
1103
|
-
const
|
|
1104
|
-
isTop:
|
|
1105
|
-
isRight:
|
|
1106
|
-
isLeft:
|
|
1107
|
-
isBottom:
|
|
1108
|
-
maxScroll:
|
|
1109
|
-
minScroll:
|
|
1110
|
-
} = xn(g),
|
|
1111
|
-
x: Math.min(
|
|
1112
|
-
y: Math.min(
|
|
1113
|
-
},
|
|
1114
|
-
if (
|
|
1115
|
-
const
|
|
1116
|
-
if (
|
|
1102
|
+
for (const g of v) {
|
|
1103
|
+
const b = t.code, {
|
|
1104
|
+
isTop: x,
|
|
1105
|
+
isRight: p,
|
|
1106
|
+
isLeft: y,
|
|
1107
|
+
isBottom: R,
|
|
1108
|
+
maxScroll: S,
|
|
1109
|
+
minScroll: I
|
|
1110
|
+
} = xn(g), m = jr(g), w = {
|
|
1111
|
+
x: Math.min(b === E.Right ? m.right - m.width / 2 : m.right, Math.max(b === E.Right ? m.left : m.left + m.width / 2, d.x)),
|
|
1112
|
+
y: Math.min(b === E.Down ? m.bottom - m.height / 2 : m.bottom, Math.max(b === E.Down ? m.top : m.top + m.height / 2, d.y))
|
|
1113
|
+
}, D = b === E.Right && !p || b === E.Left && !y, N = b === E.Down && !R || b === E.Up && !x;
|
|
1114
|
+
if (D && w.x !== d.x) {
|
|
1115
|
+
const C = g.scrollLeft + f.x, P = b === E.Right && C <= S.x || b === E.Left && C >= I.x;
|
|
1116
|
+
if (P && !f.y) {
|
|
1117
1117
|
g.scrollTo({
|
|
1118
|
-
left:
|
|
1118
|
+
left: C,
|
|
1119
1119
|
behavior: a
|
|
1120
1120
|
});
|
|
1121
1121
|
return;
|
|
1122
1122
|
}
|
|
1123
|
-
|
|
1124
|
-
left: -
|
|
1123
|
+
P ? h.x = g.scrollLeft - C : h.x = b === E.Right ? g.scrollLeft - S.x : g.scrollLeft - I.x, h.x && g.scrollBy({
|
|
1124
|
+
left: -h.x,
|
|
1125
1125
|
behavior: a
|
|
1126
1126
|
});
|
|
1127
1127
|
break;
|
|
1128
|
-
} else if (
|
|
1129
|
-
const
|
|
1130
|
-
if (
|
|
1128
|
+
} else if (N && w.y !== d.y) {
|
|
1129
|
+
const C = g.scrollTop + f.y, P = b === E.Down && C <= S.y || b === E.Up && C >= I.y;
|
|
1130
|
+
if (P && !f.x) {
|
|
1131
1131
|
g.scrollTo({
|
|
1132
|
-
top:
|
|
1132
|
+
top: C,
|
|
1133
1133
|
behavior: a
|
|
1134
1134
|
});
|
|
1135
1135
|
return;
|
|
1136
1136
|
}
|
|
1137
|
-
|
|
1138
|
-
top: -
|
|
1137
|
+
P ? h.y = g.scrollTop - C : h.y = b === E.Down ? g.scrollTop - S.y : g.scrollTop - I.y, h.y && g.scrollBy({
|
|
1138
|
+
top: -h.y,
|
|
1139
1139
|
behavior: a
|
|
1140
1140
|
});
|
|
1141
1141
|
break;
|
|
1142
1142
|
}
|
|
1143
1143
|
}
|
|
1144
|
-
this.handleMove(t,
|
|
1144
|
+
this.handleMove(t, Le(lt(d, this.referenceCoordinates), h));
|
|
1145
1145
|
}
|
|
1146
1146
|
}
|
|
1147
1147
|
}
|
|
@@ -1167,7 +1167,7 @@ class Nt {
|
|
|
1167
1167
|
this.listeners.removeAll(), this.windowListeners.removeAll();
|
|
1168
1168
|
}
|
|
1169
1169
|
}
|
|
1170
|
-
|
|
1170
|
+
Ot.activators = [{
|
|
1171
1171
|
eventName: "onKeyDown",
|
|
1172
1172
|
handler: (e, t, n) => {
|
|
1173
1173
|
let {
|
|
@@ -1203,7 +1203,7 @@ class Mt {
|
|
|
1203
1203
|
} = t, {
|
|
1204
1204
|
target: s
|
|
1205
1205
|
} = i;
|
|
1206
|
-
this.props = t, this.events = n, this.document =
|
|
1206
|
+
this.props = t, this.events = n, this.document = je(s), this.documentListeners = new Ye(this.document), this.listeners = new Ye(r), this.windowListeners = new Ye(q(s)), this.initialCoordinates = (o = St(i)) != null ? o : ie, 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();
|
|
1207
1207
|
}
|
|
1208
1208
|
attach() {
|
|
1209
1209
|
const {
|
|
@@ -1217,7 +1217,7 @@ class Mt {
|
|
|
1217
1217
|
} = this;
|
|
1218
1218
|
if (this.listeners.add(t.move.name, this.handleMove, {
|
|
1219
1219
|
passive: !1
|
|
1220
|
-
}), this.listeners.add(t.end.name, this.handleEnd), t.cancel && this.listeners.add(t.cancel.name, this.handleCancel), this.windowListeners.add(
|
|
1220
|
+
}), this.listeners.add(t.end.name, this.handleEnd), t.cancel && this.listeners.add(t.cancel.name, this.handleCancel), this.windowListeners.add(re.Resize, this.handleCancel), this.windowListeners.add(re.DragStart, qt), this.windowListeners.add(re.VisibilityChange, this.handleCancel), this.windowListeners.add(re.ContextMenu, qt), this.documentListeners.add(re.Keydown, this.handleKeydown), n) {
|
|
1221
1221
|
if (r != null && r({
|
|
1222
1222
|
event: this.props.event,
|
|
1223
1223
|
activeNode: this.props.activeNode,
|
|
@@ -1251,9 +1251,9 @@ class Mt {
|
|
|
1251
1251
|
} = this, {
|
|
1252
1252
|
onStart: n
|
|
1253
1253
|
} = this.props;
|
|
1254
|
-
t && (this.activated = !0, this.documentListeners.add(
|
|
1254
|
+
t && (this.activated = !0, this.documentListeners.add(re.Click, Wr, {
|
|
1255
1255
|
capture: !0
|
|
1256
|
-
}), this.removeTextSelection(), this.documentListeners.add(
|
|
1256
|
+
}), this.removeTextSelection(), this.documentListeners.add(re.SelectionChange, this.removeTextSelection), n(t));
|
|
1257
1257
|
}
|
|
1258
1258
|
handleMove(t) {
|
|
1259
1259
|
var n;
|
|
@@ -1269,17 +1269,17 @@ class Mt {
|
|
|
1269
1269
|
} = i;
|
|
1270
1270
|
if (!o)
|
|
1271
1271
|
return;
|
|
1272
|
-
const l = (n = St(t)) != null ? n : ie,
|
|
1272
|
+
const l = (n = St(t)) != null ? n : ie, u = lt(o, l);
|
|
1273
1273
|
if (!r && a) {
|
|
1274
1274
|
if (Gt(a)) {
|
|
1275
|
-
if (a.tolerance != null && xt(
|
|
1275
|
+
if (a.tolerance != null && xt(u, a.tolerance))
|
|
1276
1276
|
return this.handleCancel();
|
|
1277
|
-
if (xt(
|
|
1277
|
+
if (xt(u, a.distance))
|
|
1278
1278
|
return this.handleStart();
|
|
1279
1279
|
}
|
|
1280
|
-
if (Jt(a) && xt(
|
|
1280
|
+
if (Jt(a) && xt(u, a.tolerance))
|
|
1281
1281
|
return this.handleCancel();
|
|
1282
|
-
this.handlePending(a,
|
|
1282
|
+
this.handlePending(a, u);
|
|
1283
1283
|
return;
|
|
1284
1284
|
}
|
|
1285
1285
|
t.cancelable && t.preventDefault(), s(l);
|
|
@@ -1321,7 +1321,7 @@ class Lt extends Mt {
|
|
|
1321
1321
|
constructor(t) {
|
|
1322
1322
|
const {
|
|
1323
1323
|
event: n
|
|
1324
|
-
} = t, r =
|
|
1324
|
+
} = t, r = je(n.target);
|
|
1325
1325
|
super(t, Yr, r);
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
@@ -1352,7 +1352,7 @@ var Ct;
|
|
|
1352
1352
|
})(Ct || (Ct = {}));
|
|
1353
1353
|
class Ur extends Mt {
|
|
1354
1354
|
constructor(t) {
|
|
1355
|
-
super(t, Kr,
|
|
1355
|
+
super(t, Kr, je(t.event.target));
|
|
1356
1356
|
}
|
|
1357
1357
|
}
|
|
1358
1358
|
Ur.activators = [{
|
|
@@ -1410,10 +1410,10 @@ Vr.activators = [{
|
|
|
1410
1410
|
}), !0);
|
|
1411
1411
|
}
|
|
1412
1412
|
}];
|
|
1413
|
-
var
|
|
1413
|
+
var Ke;
|
|
1414
1414
|
(function(e) {
|
|
1415
1415
|
e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect";
|
|
1416
|
-
})(
|
|
1416
|
+
})(Ke || (Ke = {}));
|
|
1417
1417
|
var ut;
|
|
1418
1418
|
(function(e) {
|
|
1419
1419
|
e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
@@ -1421,73 +1421,73 @@ var ut;
|
|
|
1421
1421
|
function qr(e) {
|
|
1422
1422
|
let {
|
|
1423
1423
|
acceleration: t,
|
|
1424
|
-
activator: n =
|
|
1424
|
+
activator: n = Ke.Pointer,
|
|
1425
1425
|
canScroll: r,
|
|
1426
1426
|
draggingRect: o,
|
|
1427
1427
|
enabled: i,
|
|
1428
1428
|
interval: s = 5,
|
|
1429
1429
|
order: a = ut.TreeOrder,
|
|
1430
1430
|
pointerCoordinates: l,
|
|
1431
|
-
scrollableAncestors:
|
|
1432
|
-
scrollableAncestorRects:
|
|
1433
|
-
delta:
|
|
1434
|
-
threshold:
|
|
1431
|
+
scrollableAncestors: u,
|
|
1432
|
+
scrollableAncestorRects: c,
|
|
1433
|
+
delta: d,
|
|
1434
|
+
threshold: f
|
|
1435
1435
|
} = e;
|
|
1436
|
-
const
|
|
1437
|
-
delta:
|
|
1436
|
+
const h = Jr({
|
|
1437
|
+
delta: d,
|
|
1438
1438
|
disabled: !i
|
|
1439
|
-
}), [
|
|
1439
|
+
}), [v, g] = or(), b = L({
|
|
1440
1440
|
x: 0,
|
|
1441
1441
|
y: 0
|
|
1442
|
-
}),
|
|
1442
|
+
}), x = L({
|
|
1443
1443
|
x: 0,
|
|
1444
1444
|
y: 0
|
|
1445
|
-
}),
|
|
1445
|
+
}), p = O(() => {
|
|
1446
1446
|
switch (n) {
|
|
1447
|
-
case
|
|
1447
|
+
case Ke.Pointer:
|
|
1448
1448
|
return l ? {
|
|
1449
1449
|
top: l.y,
|
|
1450
1450
|
bottom: l.y,
|
|
1451
1451
|
left: l.x,
|
|
1452
1452
|
right: l.x
|
|
1453
1453
|
} : null;
|
|
1454
|
-
case
|
|
1454
|
+
case Ke.DraggableRect:
|
|
1455
1455
|
return o;
|
|
1456
1456
|
}
|
|
1457
|
-
}, [n, o, l]),
|
|
1458
|
-
const
|
|
1459
|
-
if (!
|
|
1457
|
+
}, [n, o, l]), y = L(null), R = K(() => {
|
|
1458
|
+
const I = y.current;
|
|
1459
|
+
if (!I)
|
|
1460
1460
|
return;
|
|
1461
|
-
const
|
|
1462
|
-
|
|
1463
|
-
}, []),
|
|
1464
|
-
|
|
1461
|
+
const m = b.current.x * x.current.x, w = b.current.y * x.current.y;
|
|
1462
|
+
I.scrollBy(m, w);
|
|
1463
|
+
}, []), S = O(() => a === ut.TreeOrder ? [...u].reverse() : u, [a, u]);
|
|
1464
|
+
M(
|
|
1465
1465
|
() => {
|
|
1466
|
-
if (!i || !
|
|
1466
|
+
if (!i || !u.length || !p) {
|
|
1467
1467
|
g();
|
|
1468
1468
|
return;
|
|
1469
1469
|
}
|
|
1470
|
-
for (const
|
|
1471
|
-
if ((r == null ? void 0 : r(
|
|
1470
|
+
for (const I of S) {
|
|
1471
|
+
if ((r == null ? void 0 : r(I)) === !1)
|
|
1472
1472
|
continue;
|
|
1473
|
-
const
|
|
1473
|
+
const m = u.indexOf(I), w = c[m];
|
|
1474
1474
|
if (!w)
|
|
1475
1475
|
continue;
|
|
1476
1476
|
const {
|
|
1477
|
-
direction:
|
|
1478
|
-
speed:
|
|
1479
|
-
} = zr(
|
|
1480
|
-
for (const
|
|
1481
|
-
|
|
1482
|
-
if (
|
|
1483
|
-
g(),
|
|
1477
|
+
direction: D,
|
|
1478
|
+
speed: N
|
|
1479
|
+
} = zr(I, w, p, t, f);
|
|
1480
|
+
for (const C of ["x", "y"])
|
|
1481
|
+
h[C][D[C]] || (N[C] = 0, D[C] = 0);
|
|
1482
|
+
if (N.x > 0 || N.y > 0) {
|
|
1483
|
+
g(), y.current = I, v(R, s), b.current = N, x.current = D;
|
|
1484
1484
|
return;
|
|
1485
1485
|
}
|
|
1486
1486
|
}
|
|
1487
|
-
|
|
1487
|
+
b.current = {
|
|
1488
1488
|
x: 0,
|
|
1489
1489
|
y: 0
|
|
1490
|
-
},
|
|
1490
|
+
}, x.current = {
|
|
1491
1491
|
x: 0,
|
|
1492
1492
|
y: 0
|
|
1493
1493
|
}, g();
|
|
@@ -1495,32 +1495,32 @@ function qr(e) {
|
|
|
1495
1495
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1496
1496
|
[
|
|
1497
1497
|
t,
|
|
1498
|
-
|
|
1498
|
+
R,
|
|
1499
1499
|
r,
|
|
1500
1500
|
g,
|
|
1501
1501
|
i,
|
|
1502
1502
|
s,
|
|
1503
1503
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1504
|
-
JSON.stringify(
|
|
1504
|
+
JSON.stringify(p),
|
|
1505
1505
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1506
|
-
JSON.stringify(
|
|
1507
|
-
|
|
1508
|
-
d,
|
|
1509
|
-
C,
|
|
1506
|
+
JSON.stringify(h),
|
|
1507
|
+
v,
|
|
1510
1508
|
u,
|
|
1509
|
+
S,
|
|
1510
|
+
c,
|
|
1511
1511
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1512
|
-
JSON.stringify(
|
|
1512
|
+
JSON.stringify(f)
|
|
1513
1513
|
]
|
|
1514
1514
|
);
|
|
1515
1515
|
}
|
|
1516
1516
|
const Gr = {
|
|
1517
1517
|
x: {
|
|
1518
|
-
[
|
|
1519
|
-
[
|
|
1518
|
+
[F.Backward]: !1,
|
|
1519
|
+
[F.Forward]: !1
|
|
1520
1520
|
},
|
|
1521
1521
|
y: {
|
|
1522
|
-
[
|
|
1523
|
-
[
|
|
1522
|
+
[F.Backward]: !1,
|
|
1523
|
+
[F.Forward]: !1
|
|
1524
1524
|
}
|
|
1525
1525
|
};
|
|
1526
1526
|
function Jr(e) {
|
|
@@ -1529,7 +1529,7 @@ function Jr(e) {
|
|
|
1529
1529
|
disabled: n
|
|
1530
1530
|
} = e;
|
|
1531
1531
|
const r = mt(t);
|
|
1532
|
-
return
|
|
1532
|
+
return Ze((o) => {
|
|
1533
1533
|
if (n || !r || !o)
|
|
1534
1534
|
return Gr;
|
|
1535
1535
|
const i = {
|
|
@@ -1538,25 +1538,25 @@ function Jr(e) {
|
|
|
1538
1538
|
};
|
|
1539
1539
|
return {
|
|
1540
1540
|
x: {
|
|
1541
|
-
[
|
|
1542
|
-
[
|
|
1541
|
+
[F.Backward]: o.x[F.Backward] || i.x === -1,
|
|
1542
|
+
[F.Forward]: o.x[F.Forward] || i.x === 1
|
|
1543
1543
|
},
|
|
1544
1544
|
y: {
|
|
1545
|
-
[
|
|
1546
|
-
[
|
|
1545
|
+
[F.Backward]: o.y[F.Backward] || i.y === -1,
|
|
1546
|
+
[F.Forward]: o.y[F.Forward] || i.y === 1
|
|
1547
1547
|
}
|
|
1548
1548
|
};
|
|
1549
1549
|
}, [n, t, r]);
|
|
1550
1550
|
}
|
|
1551
1551
|
function _r(e, t) {
|
|
1552
1552
|
const n = t != null ? e.get(t) : void 0, r = n ? n.node.current : null;
|
|
1553
|
-
return
|
|
1553
|
+
return Ze((o) => {
|
|
1554
1554
|
var i;
|
|
1555
1555
|
return t == null ? null : (i = r ?? o) != null ? i : null;
|
|
1556
1556
|
}, [r, t]);
|
|
1557
1557
|
}
|
|
1558
1558
|
function Zr(e, t) {
|
|
1559
|
-
return
|
|
1559
|
+
return O(() => e.reduce((n, r) => {
|
|
1560
1560
|
const {
|
|
1561
1561
|
sensor: o
|
|
1562
1562
|
} = r, i = o.activators.map((s) => ({
|
|
@@ -1566,10 +1566,10 @@ function Zr(e, t) {
|
|
|
1566
1566
|
return [...n, ...i];
|
|
1567
1567
|
}, []), [e, t]);
|
|
1568
1568
|
}
|
|
1569
|
-
var
|
|
1569
|
+
var Ge;
|
|
1570
1570
|
(function(e) {
|
|
1571
1571
|
e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
|
|
1572
|
-
})(
|
|
1572
|
+
})(Ge || (Ge = {}));
|
|
1573
1573
|
var Rt;
|
|
1574
1574
|
(function(e) {
|
|
1575
1575
|
e.Optimized = "optimized";
|
|
@@ -1581,63 +1581,63 @@ function Qr(e, t) {
|
|
|
1581
1581
|
dependencies: r,
|
|
1582
1582
|
config: o
|
|
1583
1583
|
} = t;
|
|
1584
|
-
const [i, s] =
|
|
1584
|
+
const [i, s] = Q(null), {
|
|
1585
1585
|
frequency: a,
|
|
1586
1586
|
measure: l,
|
|
1587
|
-
strategy:
|
|
1588
|
-
} = o,
|
|
1589
|
-
|
|
1590
|
-
}, [
|
|
1591
|
-
if (
|
|
1587
|
+
strategy: u
|
|
1588
|
+
} = o, c = L(e), d = b(), f = Ve(d), h = K(function(x) {
|
|
1589
|
+
x === void 0 && (x = []), !f.current && s((p) => p === null ? x : p.concat(x.filter((y) => !p.includes(y))));
|
|
1590
|
+
}, [f]), v = L(null), g = Ze((x) => {
|
|
1591
|
+
if (d && !n)
|
|
1592
1592
|
return _t;
|
|
1593
|
-
if (!
|
|
1594
|
-
const
|
|
1595
|
-
for (let
|
|
1596
|
-
if (!
|
|
1593
|
+
if (!x || x === _t || c.current !== e || i != null) {
|
|
1594
|
+
const p = /* @__PURE__ */ new Map();
|
|
1595
|
+
for (let y of e) {
|
|
1596
|
+
if (!y)
|
|
1597
1597
|
continue;
|
|
1598
|
-
if (i && i.length > 0 && !i.includes(
|
|
1599
|
-
|
|
1598
|
+
if (i && i.length > 0 && !i.includes(y.id) && y.rect.current) {
|
|
1599
|
+
p.set(y.id, y.rect.current);
|
|
1600
1600
|
continue;
|
|
1601
1601
|
}
|
|
1602
|
-
const
|
|
1603
|
-
|
|
1602
|
+
const R = y.node.current, S = R ? new Nt(l(R), R) : null;
|
|
1603
|
+
y.rect.current = S, S && p.set(y.id, S);
|
|
1604
1604
|
}
|
|
1605
|
-
return
|
|
1605
|
+
return p;
|
|
1606
1606
|
}
|
|
1607
|
-
return
|
|
1608
|
-
}, [e, i, n,
|
|
1609
|
-
return
|
|
1610
|
-
|
|
1611
|
-
}, [e]),
|
|
1607
|
+
return x;
|
|
1608
|
+
}, [e, i, n, d, l]);
|
|
1609
|
+
return M(() => {
|
|
1610
|
+
c.current = e;
|
|
1611
|
+
}, [e]), M(
|
|
1612
1612
|
() => {
|
|
1613
|
-
|
|
1613
|
+
d || h();
|
|
1614
1614
|
},
|
|
1615
1615
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1616
|
-
[n,
|
|
1617
|
-
),
|
|
1616
|
+
[n, d]
|
|
1617
|
+
), M(
|
|
1618
1618
|
() => {
|
|
1619
1619
|
i && i.length > 0 && s(null);
|
|
1620
1620
|
},
|
|
1621
1621
|
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1622
1622
|
[JSON.stringify(i)]
|
|
1623
|
-
),
|
|
1623
|
+
), M(
|
|
1624
1624
|
() => {
|
|
1625
|
-
|
|
1626
|
-
|
|
1625
|
+
d || typeof a != "number" || v.current !== null || (v.current = setTimeout(() => {
|
|
1626
|
+
h(), v.current = null;
|
|
1627
1627
|
}, a));
|
|
1628
1628
|
},
|
|
1629
1629
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1630
|
-
[a,
|
|
1630
|
+
[a, d, h, ...r]
|
|
1631
1631
|
), {
|
|
1632
1632
|
droppableRects: g,
|
|
1633
|
-
measureDroppableContainers:
|
|
1633
|
+
measureDroppableContainers: h,
|
|
1634
1634
|
measuringScheduled: i != null
|
|
1635
1635
|
};
|
|
1636
|
-
function
|
|
1637
|
-
switch (
|
|
1638
|
-
case
|
|
1636
|
+
function b() {
|
|
1637
|
+
switch (u) {
|
|
1638
|
+
case Ge.Always:
|
|
1639
1639
|
return !1;
|
|
1640
|
-
case
|
|
1640
|
+
case Ge.BeforeDragging:
|
|
1641
1641
|
return n;
|
|
1642
1642
|
default:
|
|
1643
1643
|
return !n;
|
|
@@ -1645,7 +1645,7 @@ function Qr(e, t) {
|
|
|
1645
1645
|
}
|
|
1646
1646
|
}
|
|
1647
1647
|
function Sn(e, t) {
|
|
1648
|
-
return
|
|
1648
|
+
return Ze((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
|
|
1649
1649
|
}
|
|
1650
1650
|
function eo(e, t) {
|
|
1651
1651
|
return Sn(e, t);
|
|
@@ -1655,7 +1655,7 @@ function to(e) {
|
|
|
1655
1655
|
callback: t,
|
|
1656
1656
|
disabled: n
|
|
1657
1657
|
} = e;
|
|
1658
|
-
const r = kt(t), o =
|
|
1658
|
+
const r = kt(t), o = O(() => {
|
|
1659
1659
|
if (n || typeof window > "u" || typeof window.MutationObserver > "u")
|
|
1660
1660
|
return;
|
|
1661
1661
|
const {
|
|
@@ -1663,14 +1663,14 @@ function to(e) {
|
|
|
1663
1663
|
} = window;
|
|
1664
1664
|
return new i(r);
|
|
1665
1665
|
}, [r, n]);
|
|
1666
|
-
return
|
|
1666
|
+
return M(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
|
|
1667
1667
|
}
|
|
1668
1668
|
function ft(e) {
|
|
1669
1669
|
let {
|
|
1670
1670
|
callback: t,
|
|
1671
1671
|
disabled: n
|
|
1672
1672
|
} = e;
|
|
1673
|
-
const r = kt(t), o =
|
|
1673
|
+
const r = kt(t), o = O(
|
|
1674
1674
|
() => {
|
|
1675
1675
|
if (n || typeof window > "u" || typeof window.ResizeObserver > "u")
|
|
1676
1676
|
return;
|
|
@@ -1682,35 +1682,35 @@ function ft(e) {
|
|
|
1682
1682
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1683
1683
|
[n]
|
|
1684
1684
|
);
|
|
1685
|
-
return
|
|
1685
|
+
return M(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
|
|
1686
1686
|
}
|
|
1687
1687
|
function no(e) {
|
|
1688
|
-
return new
|
|
1688
|
+
return new Nt(Pe(e), e);
|
|
1689
1689
|
}
|
|
1690
1690
|
function Zt(e, t, n) {
|
|
1691
1691
|
t === void 0 && (t = no);
|
|
1692
|
-
const [r, o] =
|
|
1692
|
+
const [r, o] = Q(null);
|
|
1693
1693
|
function i() {
|
|
1694
1694
|
o((l) => {
|
|
1695
1695
|
if (!e)
|
|
1696
1696
|
return null;
|
|
1697
1697
|
if (e.isConnected === !1) {
|
|
1698
|
-
var
|
|
1699
|
-
return (
|
|
1698
|
+
var u;
|
|
1699
|
+
return (u = l ?? n) != null ? u : null;
|
|
1700
1700
|
}
|
|
1701
|
-
const
|
|
1702
|
-
return JSON.stringify(l) === JSON.stringify(
|
|
1701
|
+
const c = t(e);
|
|
1702
|
+
return JSON.stringify(l) === JSON.stringify(c) ? l : c;
|
|
1703
1703
|
});
|
|
1704
1704
|
}
|
|
1705
1705
|
const s = to({
|
|
1706
1706
|
callback(l) {
|
|
1707
1707
|
if (e)
|
|
1708
|
-
for (const
|
|
1708
|
+
for (const u of l) {
|
|
1709
1709
|
const {
|
|
1710
|
-
type:
|
|
1711
|
-
target:
|
|
1712
|
-
} =
|
|
1713
|
-
if (
|
|
1710
|
+
type: c,
|
|
1711
|
+
target: d
|
|
1712
|
+
} = u;
|
|
1713
|
+
if (c === "childList" && d instanceof HTMLElement && d.contains(e)) {
|
|
1714
1714
|
i();
|
|
1715
1715
|
break;
|
|
1716
1716
|
}
|
|
@@ -1719,7 +1719,7 @@ function Zt(e, t, n) {
|
|
|
1719
1719
|
}), a = ft({
|
|
1720
1720
|
callback: i
|
|
1721
1721
|
});
|
|
1722
|
-
return
|
|
1722
|
+
return fe(() => {
|
|
1723
1723
|
i(), e ? (a == null || a.observe(e), s == null || s.observe(document.body, {
|
|
1724
1724
|
childList: !0,
|
|
1725
1725
|
subtree: !0
|
|
@@ -1732,25 +1732,25 @@ function ro(e) {
|
|
|
1732
1732
|
}
|
|
1733
1733
|
const Qt = [];
|
|
1734
1734
|
function oo(e) {
|
|
1735
|
-
const t =
|
|
1736
|
-
return
|
|
1735
|
+
const t = L(e), n = Ze((r) => e ? r && r !== Qt && e && t.current && e.parentNode === t.current.parentNode ? r : At(e) : Qt, [e]);
|
|
1736
|
+
return M(() => {
|
|
1737
1737
|
t.current = e;
|
|
1738
1738
|
}, [e]), n;
|
|
1739
1739
|
}
|
|
1740
1740
|
function io(e) {
|
|
1741
|
-
const [t, n] =
|
|
1741
|
+
const [t, n] = Q(null), r = L(e), o = K((i) => {
|
|
1742
1742
|
const s = yt(i.target);
|
|
1743
1743
|
s && n((a) => a ? (a.set(s, Dt(s)), new Map(a)) : null);
|
|
1744
1744
|
}, []);
|
|
1745
|
-
return
|
|
1745
|
+
return M(() => {
|
|
1746
1746
|
const i = r.current;
|
|
1747
1747
|
if (e !== i) {
|
|
1748
1748
|
s(i);
|
|
1749
1749
|
const a = e.map((l) => {
|
|
1750
|
-
const
|
|
1751
|
-
return
|
|
1750
|
+
const u = yt(l);
|
|
1751
|
+
return u ? (u.addEventListener("scroll", o, {
|
|
1752
1752
|
passive: !0
|
|
1753
|
-
}), [
|
|
1753
|
+
}), [u, Dt(u)]) : null;
|
|
1754
1754
|
}).filter((l) => l != null);
|
|
1755
1755
|
n(a.length ? new Map(a) : null), r.current = e;
|
|
1756
1756
|
}
|
|
@@ -1759,28 +1759,28 @@ function io(e) {
|
|
|
1759
1759
|
};
|
|
1760
1760
|
function s(a) {
|
|
1761
1761
|
a.forEach((l) => {
|
|
1762
|
-
const
|
|
1763
|
-
|
|
1762
|
+
const u = yt(l);
|
|
1763
|
+
u == null || u.removeEventListener("scroll", o);
|
|
1764
1764
|
});
|
|
1765
1765
|
}
|
|
1766
|
-
}, [o, e]),
|
|
1766
|
+
}, [o, e]), O(() => e.length ? t ? Array.from(t.values()).reduce((i, s) => Le(i, s), ie) : wn(e) : ie, [e, t]);
|
|
1767
1767
|
}
|
|
1768
1768
|
function en(e, t) {
|
|
1769
1769
|
t === void 0 && (t = []);
|
|
1770
|
-
const n =
|
|
1771
|
-
return
|
|
1770
|
+
const n = L(null);
|
|
1771
|
+
return M(
|
|
1772
1772
|
() => {
|
|
1773
1773
|
n.current = null;
|
|
1774
1774
|
},
|
|
1775
1775
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1776
1776
|
t
|
|
1777
|
-
),
|
|
1777
|
+
), M(() => {
|
|
1778
1778
|
const r = e !== ie;
|
|
1779
1779
|
r && !n.current && (n.current = e), !r && n.current && (n.current = null);
|
|
1780
1780
|
}, [e]), n.current ? lt(e, n.current) : ie;
|
|
1781
1781
|
}
|
|
1782
1782
|
function so(e) {
|
|
1783
|
-
|
|
1783
|
+
M(
|
|
1784
1784
|
() => {
|
|
1785
1785
|
if (!dt)
|
|
1786
1786
|
return;
|
|
@@ -1806,7 +1806,7 @@ function so(e) {
|
|
|
1806
1806
|
);
|
|
1807
1807
|
}
|
|
1808
1808
|
function ao(e, t) {
|
|
1809
|
-
return
|
|
1809
|
+
return O(() => e.reduce((n, r) => {
|
|
1810
1810
|
let {
|
|
1811
1811
|
eventName: o,
|
|
1812
1812
|
handler: i
|
|
@@ -1817,19 +1817,19 @@ function ao(e, t) {
|
|
|
1817
1817
|
}, {}), [e, t]);
|
|
1818
1818
|
}
|
|
1819
1819
|
function Dn(e) {
|
|
1820
|
-
return
|
|
1820
|
+
return O(() => e ? Nr(e) : null, [e]);
|
|
1821
1821
|
}
|
|
1822
1822
|
const tn = [];
|
|
1823
1823
|
function lo(e, t) {
|
|
1824
|
-
t === void 0 && (t =
|
|
1825
|
-
const [n] = e, r = Dn(n ? q(n) : null), [o, i] =
|
|
1824
|
+
t === void 0 && (t = Pe);
|
|
1825
|
+
const [n] = e, r = Dn(n ? q(n) : null), [o, i] = Q(tn);
|
|
1826
1826
|
function s() {
|
|
1827
|
-
i(() => e.length ? e.map((l) => yn(l) ? r : new
|
|
1827
|
+
i(() => e.length ? e.map((l) => yn(l) ? r : new Nt(t(l), l)) : tn);
|
|
1828
1828
|
}
|
|
1829
1829
|
const a = ft({
|
|
1830
1830
|
callback: s
|
|
1831
1831
|
});
|
|
1832
|
-
return
|
|
1832
|
+
return fe(() => {
|
|
1833
1833
|
a == null || a.disconnect(), s(), e.forEach((l) => a == null ? void 0 : a.observe(l));
|
|
1834
1834
|
}, [e]), o;
|
|
1835
1835
|
}
|
|
@@ -1839,34 +1839,34 @@ function co(e) {
|
|
|
1839
1839
|
if (e.children.length > 1)
|
|
1840
1840
|
return e;
|
|
1841
1841
|
const t = e.children[0];
|
|
1842
|
-
return
|
|
1842
|
+
return _e(t) ? t : e;
|
|
1843
1843
|
}
|
|
1844
1844
|
function uo(e) {
|
|
1845
1845
|
let {
|
|
1846
1846
|
measure: t
|
|
1847
1847
|
} = e;
|
|
1848
|
-
const [n, r] =
|
|
1848
|
+
const [n, r] = Q(null), o = K((u) => {
|
|
1849
1849
|
for (const {
|
|
1850
|
-
target:
|
|
1851
|
-
} of
|
|
1852
|
-
if (
|
|
1853
|
-
r((
|
|
1854
|
-
const
|
|
1855
|
-
return
|
|
1856
|
-
...
|
|
1857
|
-
width:
|
|
1858
|
-
height:
|
|
1859
|
-
} :
|
|
1850
|
+
target: c
|
|
1851
|
+
} of u)
|
|
1852
|
+
if (_e(c)) {
|
|
1853
|
+
r((d) => {
|
|
1854
|
+
const f = t(c);
|
|
1855
|
+
return d ? {
|
|
1856
|
+
...d,
|
|
1857
|
+
width: f.width,
|
|
1858
|
+
height: f.height
|
|
1859
|
+
} : f;
|
|
1860
1860
|
});
|
|
1861
1861
|
break;
|
|
1862
1862
|
}
|
|
1863
1863
|
}, [t]), i = ft({
|
|
1864
1864
|
callback: o
|
|
1865
|
-
}), s =
|
|
1866
|
-
const
|
|
1867
|
-
i == null || i.disconnect(),
|
|
1865
|
+
}), s = K((u) => {
|
|
1866
|
+
const c = co(u);
|
|
1867
|
+
i == null || i.disconnect(), c && (i == null || i.observe(c)), r(c ? t(c) : null);
|
|
1868
1868
|
}, [t, i]), [a, l] = at(s);
|
|
1869
|
-
return
|
|
1869
|
+
return O(() => ({
|
|
1870
1870
|
nodeRef: a,
|
|
1871
1871
|
rect: n,
|
|
1872
1872
|
setRef: l
|
|
@@ -1876,7 +1876,7 @@ const fo = [{
|
|
|
1876
1876
|
sensor: Lt,
|
|
1877
1877
|
options: {}
|
|
1878
1878
|
}, {
|
|
1879
|
-
sensor:
|
|
1879
|
+
sensor: Ot,
|
|
1880
1880
|
options: {}
|
|
1881
1881
|
}], ho = {
|
|
1882
1882
|
current: {}
|
|
@@ -1886,14 +1886,14 @@ const fo = [{
|
|
|
1886
1886
|
},
|
|
1887
1887
|
droppable: {
|
|
1888
1888
|
measure: Vt,
|
|
1889
|
-
strategy:
|
|
1889
|
+
strategy: Ge.WhileDragging,
|
|
1890
1890
|
frequency: Rt.Optimized
|
|
1891
1891
|
},
|
|
1892
1892
|
dragOverlay: {
|
|
1893
|
-
measure:
|
|
1893
|
+
measure: Pe
|
|
1894
1894
|
}
|
|
1895
1895
|
};
|
|
1896
|
-
class
|
|
1896
|
+
class Ue extends Map {
|
|
1897
1897
|
get(t) {
|
|
1898
1898
|
var n;
|
|
1899
1899
|
return t != null && (n = super.get(t)) != null ? n : void 0;
|
|
@@ -1923,7 +1923,7 @@ const go = {
|
|
|
1923
1923
|
containerNodeRect: null,
|
|
1924
1924
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
1925
1925
|
droppableRects: /* @__PURE__ */ new Map(),
|
|
1926
|
-
droppableContainers: /* @__PURE__ */ new
|
|
1926
|
+
droppableContainers: /* @__PURE__ */ new Ue(),
|
|
1927
1927
|
over: null,
|
|
1928
1928
|
dragOverlay: {
|
|
1929
1929
|
nodeRef: {
|
|
@@ -1950,7 +1950,7 @@ const go = {
|
|
|
1950
1950
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
1951
1951
|
over: null,
|
|
1952
1952
|
measureDroppableContainers: ct
|
|
1953
|
-
}, ht = /* @__PURE__ */
|
|
1953
|
+
}, ht = /* @__PURE__ */ Je(bo), Cn = /* @__PURE__ */ Je(go);
|
|
1954
1954
|
function vo() {
|
|
1955
1955
|
return {
|
|
1956
1956
|
draggable: {
|
|
@@ -1966,13 +1966,13 @@ function vo() {
|
|
|
1966
1966
|
}
|
|
1967
1967
|
},
|
|
1968
1968
|
droppable: {
|
|
1969
|
-
containers: new
|
|
1969
|
+
containers: new Ue()
|
|
1970
1970
|
}
|
|
1971
1971
|
};
|
|
1972
1972
|
}
|
|
1973
1973
|
function po(e, t) {
|
|
1974
1974
|
switch (t.type) {
|
|
1975
|
-
case
|
|
1975
|
+
case $.DragStart:
|
|
1976
1976
|
return {
|
|
1977
1977
|
...e,
|
|
1978
1978
|
draggable: {
|
|
@@ -1981,7 +1981,7 @@ function po(e, t) {
|
|
|
1981
1981
|
active: t.active
|
|
1982
1982
|
}
|
|
1983
1983
|
};
|
|
1984
|
-
case
|
|
1984
|
+
case $.DragMove:
|
|
1985
1985
|
return e.draggable.active == null ? e : {
|
|
1986
1986
|
...e,
|
|
1987
1987
|
draggable: {
|
|
@@ -1992,8 +1992,8 @@ function po(e, t) {
|
|
|
1992
1992
|
}
|
|
1993
1993
|
}
|
|
1994
1994
|
};
|
|
1995
|
-
case
|
|
1996
|
-
case
|
|
1995
|
+
case $.DragEnd:
|
|
1996
|
+
case $.DragCancel:
|
|
1997
1997
|
return {
|
|
1998
1998
|
...e,
|
|
1999
1999
|
draggable: {
|
|
@@ -2009,12 +2009,12 @@ function po(e, t) {
|
|
|
2009
2009
|
}
|
|
2010
2010
|
}
|
|
2011
2011
|
};
|
|
2012
|
-
case
|
|
2012
|
+
case $.RegisterDroppable: {
|
|
2013
2013
|
const {
|
|
2014
2014
|
element: n
|
|
2015
2015
|
} = t, {
|
|
2016
2016
|
id: r
|
|
2017
|
-
} = n, o = new
|
|
2017
|
+
} = n, o = new Ue(e.droppable.containers);
|
|
2018
2018
|
return o.set(r, n), {
|
|
2019
2019
|
...e,
|
|
2020
2020
|
droppable: {
|
|
@@ -2023,7 +2023,7 @@ function po(e, t) {
|
|
|
2023
2023
|
}
|
|
2024
2024
|
};
|
|
2025
2025
|
}
|
|
2026
|
-
case
|
|
2026
|
+
case $.SetDroppableDisabled: {
|
|
2027
2027
|
const {
|
|
2028
2028
|
id: n,
|
|
2029
2029
|
key: r,
|
|
@@ -2031,7 +2031,7 @@ function po(e, t) {
|
|
|
2031
2031
|
} = t, i = e.droppable.containers.get(n);
|
|
2032
2032
|
if (!i || r !== i.key)
|
|
2033
2033
|
return e;
|
|
2034
|
-
const s = new
|
|
2034
|
+
const s = new Ue(e.droppable.containers);
|
|
2035
2035
|
return s.set(n, {
|
|
2036
2036
|
...i,
|
|
2037
2037
|
disabled: o
|
|
@@ -2043,14 +2043,14 @@ function po(e, t) {
|
|
|
2043
2043
|
}
|
|
2044
2044
|
};
|
|
2045
2045
|
}
|
|
2046
|
-
case
|
|
2046
|
+
case $.UnregisterDroppable: {
|
|
2047
2047
|
const {
|
|
2048
2048
|
id: n,
|
|
2049
2049
|
key: r
|
|
2050
2050
|
} = t, o = e.droppable.containers.get(n);
|
|
2051
2051
|
if (!o || r !== o.key)
|
|
2052
2052
|
return e;
|
|
2053
|
-
const i = new
|
|
2053
|
+
const i = new Ue(e.droppable.containers);
|
|
2054
2054
|
return i.delete(n), {
|
|
2055
2055
|
...e,
|
|
2056
2056
|
droppable: {
|
|
@@ -2071,27 +2071,27 @@ function yo(e) {
|
|
|
2071
2071
|
active: n,
|
|
2072
2072
|
activatorEvent: r,
|
|
2073
2073
|
draggableNodes: o
|
|
2074
|
-
} =
|
|
2075
|
-
return
|
|
2074
|
+
} = Ie(ht), i = mt(r), s = mt(n == null ? void 0 : n.id);
|
|
2075
|
+
return M(() => {
|
|
2076
2076
|
if (!t && !r && i && s != null) {
|
|
2077
|
-
if (!
|
|
2077
|
+
if (!Tt(i) || document.activeElement === i.target)
|
|
2078
2078
|
return;
|
|
2079
2079
|
const a = o.get(s);
|
|
2080
2080
|
if (!a)
|
|
2081
2081
|
return;
|
|
2082
2082
|
const {
|
|
2083
2083
|
activatorNode: l,
|
|
2084
|
-
node:
|
|
2084
|
+
node: u
|
|
2085
2085
|
} = a;
|
|
2086
|
-
if (!l.current && !
|
|
2086
|
+
if (!l.current && !u.current)
|
|
2087
2087
|
return;
|
|
2088
2088
|
requestAnimationFrame(() => {
|
|
2089
|
-
for (const
|
|
2090
|
-
if (!
|
|
2089
|
+
for (const c of [l.current, u.current]) {
|
|
2090
|
+
if (!c)
|
|
2091
2091
|
continue;
|
|
2092
|
-
const
|
|
2093
|
-
if (
|
|
2094
|
-
|
|
2092
|
+
const d = ar(c);
|
|
2093
|
+
if (d) {
|
|
2094
|
+
d.focus();
|
|
2095
2095
|
break;
|
|
2096
2096
|
}
|
|
2097
2097
|
}
|
|
@@ -2110,7 +2110,7 @@ function xo(e, t) {
|
|
|
2110
2110
|
}), n) : n;
|
|
2111
2111
|
}
|
|
2112
2112
|
function wo(e) {
|
|
2113
|
-
return
|
|
2113
|
+
return O(
|
|
2114
2114
|
() => ({
|
|
2115
2115
|
draggable: {
|
|
2116
2116
|
...st.draggable,
|
|
@@ -2136,246 +2136,246 @@ function mo(e) {
|
|
|
2136
2136
|
initialRect: r,
|
|
2137
2137
|
config: o = !0
|
|
2138
2138
|
} = e;
|
|
2139
|
-
const i =
|
|
2139
|
+
const i = L(!1), {
|
|
2140
2140
|
x: s,
|
|
2141
2141
|
y: a
|
|
2142
2142
|
} = typeof o == "boolean" ? {
|
|
2143
2143
|
x: o,
|
|
2144
2144
|
y: o
|
|
2145
2145
|
} : o;
|
|
2146
|
-
|
|
2146
|
+
fe(() => {
|
|
2147
2147
|
if (!s && !a || !t) {
|
|
2148
2148
|
i.current = !1;
|
|
2149
2149
|
return;
|
|
2150
2150
|
}
|
|
2151
2151
|
if (i.current || !r)
|
|
2152
2152
|
return;
|
|
2153
|
-
const
|
|
2154
|
-
if (!
|
|
2153
|
+
const u = t == null ? void 0 : t.node.current;
|
|
2154
|
+
if (!u || u.isConnected === !1)
|
|
2155
2155
|
return;
|
|
2156
|
-
const
|
|
2157
|
-
if (s || (
|
|
2158
|
-
const
|
|
2159
|
-
|
|
2160
|
-
top:
|
|
2161
|
-
left:
|
|
2156
|
+
const c = n(u), d = gn(c, r);
|
|
2157
|
+
if (s || (d.x = 0), a || (d.y = 0), i.current = !0, Math.abs(d.x) > 0 || Math.abs(d.y) > 0) {
|
|
2158
|
+
const f = bn(u);
|
|
2159
|
+
f && f.scrollBy({
|
|
2160
|
+
top: d.y,
|
|
2161
|
+
left: d.x
|
|
2162
2162
|
});
|
|
2163
2163
|
}
|
|
2164
2164
|
}, [t, s, a, r, n]);
|
|
2165
2165
|
}
|
|
2166
|
-
const Rn = /* @__PURE__ */
|
|
2166
|
+
const Rn = /* @__PURE__ */ Je({
|
|
2167
2167
|
...ie,
|
|
2168
2168
|
scaleX: 1,
|
|
2169
2169
|
scaleY: 1
|
|
2170
2170
|
});
|
|
2171
|
-
var
|
|
2171
|
+
var De;
|
|
2172
2172
|
(function(e) {
|
|
2173
2173
|
e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
|
|
2174
|
-
})(
|
|
2175
|
-
const So = /* @__PURE__ */
|
|
2174
|
+
})(De || (De = {}));
|
|
2175
|
+
const So = /* @__PURE__ */ Fn(function(t) {
|
|
2176
2176
|
var n, r, o, i;
|
|
2177
2177
|
let {
|
|
2178
2178
|
id: s,
|
|
2179
2179
|
accessibility: a,
|
|
2180
2180
|
autoScroll: l = !0,
|
|
2181
|
-
children:
|
|
2182
|
-
sensors:
|
|
2183
|
-
collisionDetection:
|
|
2184
|
-
measuring:
|
|
2185
|
-
modifiers:
|
|
2186
|
-
...
|
|
2181
|
+
children: u,
|
|
2182
|
+
sensors: c = fo,
|
|
2183
|
+
collisionDetection: d = Cr,
|
|
2184
|
+
measuring: f,
|
|
2185
|
+
modifiers: h,
|
|
2186
|
+
...v
|
|
2187
2187
|
} = t;
|
|
2188
|
-
const g = Hn(po, void 0, vo), [
|
|
2188
|
+
const g = Hn(po, void 0, vo), [b, x] = g, [p, y] = hr(), [R, S] = Q(De.Uninitialized), I = R === De.Initialized, {
|
|
2189
2189
|
draggable: {
|
|
2190
|
-
active:
|
|
2190
|
+
active: m,
|
|
2191
2191
|
nodes: w,
|
|
2192
|
-
translate:
|
|
2192
|
+
translate: D
|
|
2193
2193
|
},
|
|
2194
2194
|
droppable: {
|
|
2195
|
-
containers:
|
|
2195
|
+
containers: N
|
|
2196
2196
|
}
|
|
2197
|
-
} =
|
|
2197
|
+
} = b, C = m != null ? w.get(m) : null, P = L({
|
|
2198
2198
|
initial: null,
|
|
2199
2199
|
translated: null
|
|
2200
|
-
}), j =
|
|
2201
|
-
var
|
|
2202
|
-
return
|
|
2203
|
-
id:
|
|
2200
|
+
}), j = O(() => {
|
|
2201
|
+
var Y;
|
|
2202
|
+
return m != null ? {
|
|
2203
|
+
id: m,
|
|
2204
2204
|
// It's possible for the active node to unmount while dragging
|
|
2205
|
-
data: (
|
|
2206
|
-
rect:
|
|
2205
|
+
data: (Y = C == null ? void 0 : C.data) != null ? Y : ho,
|
|
2206
|
+
rect: P
|
|
2207
2207
|
} : null;
|
|
2208
|
-
}, [
|
|
2209
|
-
droppableRects:
|
|
2210
|
-
measureDroppableContainers:
|
|
2211
|
-
measuringScheduled:
|
|
2212
|
-
} = Qr(
|
|
2213
|
-
dragging:
|
|
2214
|
-
dependencies: [
|
|
2215
|
-
config:
|
|
2216
|
-
}),
|
|
2208
|
+
}, [m, C]), T = L(null), [G, U] = Q(null), [k, se] = Q(null), B = Ve(v, Object.values(v)), ae = Qe("DndDescribedBy", s), le = O(() => N.getEnabled(), [N]), X = wo(f), {
|
|
2209
|
+
droppableRects: he,
|
|
2210
|
+
measureDroppableContainers: Re,
|
|
2211
|
+
measuringScheduled: Be
|
|
2212
|
+
} = Qr(le, {
|
|
2213
|
+
dragging: I,
|
|
2214
|
+
dependencies: [D.x, D.y],
|
|
2215
|
+
config: X.droppable
|
|
2216
|
+
}), ee = _r(w, m), et = O(() => k ? St(k) : null, [k]), pe = Bn(), ge = eo(ee, X.draggable.measure);
|
|
2217
2217
|
mo({
|
|
2218
|
-
activeNode:
|
|
2219
|
-
config:
|
|
2220
|
-
initialRect:
|
|
2221
|
-
measure:
|
|
2218
|
+
activeNode: m != null ? w.get(m) : null,
|
|
2219
|
+
config: pe.layoutShiftCompensation,
|
|
2220
|
+
initialRect: ge,
|
|
2221
|
+
measure: X.draggable.measure
|
|
2222
2222
|
});
|
|
2223
|
-
const
|
|
2223
|
+
const A = Zt(ee, X.draggable.measure, ge), $e = Zt(ee ? ee.parentElement : null), ce = L({
|
|
2224
2224
|
activatorEvent: null,
|
|
2225
2225
|
active: null,
|
|
2226
|
-
activeNode:
|
|
2226
|
+
activeNode: ee,
|
|
2227
2227
|
collisionRect: null,
|
|
2228
2228
|
collisions: null,
|
|
2229
|
-
droppableRects:
|
|
2229
|
+
droppableRects: he,
|
|
2230
2230
|
draggableNodes: w,
|
|
2231
2231
|
draggingNode: null,
|
|
2232
2232
|
draggingNodeRect: null,
|
|
2233
|
-
droppableContainers:
|
|
2233
|
+
droppableContainers: N,
|
|
2234
2234
|
over: null,
|
|
2235
2235
|
scrollableAncestors: [],
|
|
2236
2236
|
scrollAdjustedTranslate: null
|
|
2237
|
-
}),
|
|
2238
|
-
measure:
|
|
2239
|
-
}),
|
|
2237
|
+
}), Ee = N.getNodeFor((n = ce.current.over) == null ? void 0 : n.id), be = uo({
|
|
2238
|
+
measure: X.dragOverlay.measure
|
|
2239
|
+
}), ke = (r = be.nodeRef.current) != null ? r : ee, Te = I ? (o = be.rect) != null ? o : A : null, jt = !!(be.nodeRef.current && be.rect), Pt = ro(jt ? null : A), gt = Dn(ke ? q(ke) : null), ye = oo(I ? Ee ?? ee : null), tt = lo(ye), nt = xo(h, {
|
|
2240
2240
|
transform: {
|
|
2241
|
-
x:
|
|
2242
|
-
y:
|
|
2241
|
+
x: D.x - Pt.x,
|
|
2242
|
+
y: D.y - Pt.y,
|
|
2243
2243
|
scaleX: 1,
|
|
2244
2244
|
scaleY: 1
|
|
2245
2245
|
},
|
|
2246
|
-
activatorEvent:
|
|
2246
|
+
activatorEvent: k,
|
|
2247
2247
|
active: j,
|
|
2248
|
-
activeNodeRect:
|
|
2249
|
-
containerNodeRect:
|
|
2250
|
-
draggingNodeRect:
|
|
2251
|
-
over:
|
|
2252
|
-
overlayNodeRect:
|
|
2253
|
-
scrollableAncestors:
|
|
2248
|
+
activeNodeRect: A,
|
|
2249
|
+
containerNodeRect: $e,
|
|
2250
|
+
draggingNodeRect: Te,
|
|
2251
|
+
over: ce.current.over,
|
|
2252
|
+
overlayNodeRect: be.rect,
|
|
2253
|
+
scrollableAncestors: ye,
|
|
2254
2254
|
scrollableAncestorRects: tt,
|
|
2255
2255
|
windowRect: gt
|
|
2256
|
-
}),
|
|
2256
|
+
}), Bt = et ? Le(et, D) : null, $t = io(ye), Nn = en($t), On = en($t, [A]), Ae = Le(nt, Nn), Ne = Te ? Er(Te, nt) : null, Fe = j && Ne ? d({
|
|
2257
2257
|
active: j,
|
|
2258
|
-
collisionRect:
|
|
2259
|
-
droppableRects:
|
|
2260
|
-
droppableContainers:
|
|
2261
|
-
pointerCoordinates:
|
|
2262
|
-
}) : null,
|
|
2263
|
-
(
|
|
2258
|
+
collisionRect: Ne,
|
|
2259
|
+
droppableRects: he,
|
|
2260
|
+
droppableContainers: le,
|
|
2261
|
+
pointerCoordinates: Bt
|
|
2262
|
+
}) : null, Ft = mr(Fe, "id"), [xe, Ht] = Q(null), Mn = jt ? nt : Le(nt, On), Ln = Rr(Mn, (i = xe == null ? void 0 : xe.rect) != null ? i : null, A), bt = L(null), Wt = K(
|
|
2263
|
+
(Y, J) => {
|
|
2264
2264
|
let {
|
|
2265
|
-
sensor:
|
|
2266
|
-
options:
|
|
2267
|
-
} =
|
|
2268
|
-
if (
|
|
2265
|
+
sensor: _,
|
|
2266
|
+
options: we
|
|
2267
|
+
} = J;
|
|
2268
|
+
if (T.current == null)
|
|
2269
2269
|
return;
|
|
2270
|
-
const
|
|
2271
|
-
if (!
|
|
2270
|
+
const te = w.get(T.current);
|
|
2271
|
+
if (!te)
|
|
2272
2272
|
return;
|
|
2273
|
-
const
|
|
2274
|
-
active:
|
|
2275
|
-
activeNode:
|
|
2276
|
-
event:
|
|
2277
|
-
options:
|
|
2273
|
+
const Z = Y.nativeEvent, ue = new _({
|
|
2274
|
+
active: T.current,
|
|
2275
|
+
activeNode: te,
|
|
2276
|
+
event: Z,
|
|
2277
|
+
options: we,
|
|
2278
2278
|
// Sensors need to be instantiated with refs for arguments that change over time
|
|
2279
2279
|
// otherwise they are frozen in time with the stale arguments
|
|
2280
|
-
context:
|
|
2281
|
-
onAbort(
|
|
2282
|
-
if (!w.get(
|
|
2280
|
+
context: ce,
|
|
2281
|
+
onAbort(H) {
|
|
2282
|
+
if (!w.get(H))
|
|
2283
2283
|
return;
|
|
2284
2284
|
const {
|
|
2285
|
-
onDragAbort:
|
|
2286
|
-
} =
|
|
2287
|
-
id:
|
|
2285
|
+
onDragAbort: de
|
|
2286
|
+
} = B.current, ve = {
|
|
2287
|
+
id: H
|
|
2288
2288
|
};
|
|
2289
|
-
|
|
2289
|
+
de == null || de(ve), p({
|
|
2290
2290
|
type: "onDragAbort",
|
|
2291
|
-
event:
|
|
2291
|
+
event: ve
|
|
2292
2292
|
});
|
|
2293
2293
|
},
|
|
2294
|
-
onPending(
|
|
2295
|
-
if (!w.get(
|
|
2294
|
+
onPending(H, me, de, ve) {
|
|
2295
|
+
if (!w.get(H))
|
|
2296
2296
|
return;
|
|
2297
2297
|
const {
|
|
2298
|
-
onDragPending:
|
|
2299
|
-
} =
|
|
2300
|
-
id:
|
|
2301
|
-
constraint:
|
|
2302
|
-
initialCoordinates:
|
|
2303
|
-
offset:
|
|
2298
|
+
onDragPending: We
|
|
2299
|
+
} = B.current, Se = {
|
|
2300
|
+
id: H,
|
|
2301
|
+
constraint: me,
|
|
2302
|
+
initialCoordinates: de,
|
|
2303
|
+
offset: ve
|
|
2304
2304
|
};
|
|
2305
|
-
|
|
2305
|
+
We == null || We(Se), p({
|
|
2306
2306
|
type: "onDragPending",
|
|
2307
|
-
event:
|
|
2307
|
+
event: Se
|
|
2308
2308
|
});
|
|
2309
2309
|
},
|
|
2310
|
-
onStart(
|
|
2311
|
-
const
|
|
2312
|
-
if (
|
|
2310
|
+
onStart(H) {
|
|
2311
|
+
const me = T.current;
|
|
2312
|
+
if (me == null)
|
|
2313
2313
|
return;
|
|
2314
|
-
const
|
|
2315
|
-
if (!
|
|
2314
|
+
const de = w.get(me);
|
|
2315
|
+
if (!de)
|
|
2316
2316
|
return;
|
|
2317
2317
|
const {
|
|
2318
|
-
onDragStart:
|
|
2319
|
-
} =
|
|
2320
|
-
activatorEvent:
|
|
2318
|
+
onDragStart: ve
|
|
2319
|
+
} = B.current, He = {
|
|
2320
|
+
activatorEvent: Z,
|
|
2321
2321
|
active: {
|
|
2322
|
-
id:
|
|
2323
|
-
data:
|
|
2324
|
-
rect:
|
|
2322
|
+
id: me,
|
|
2323
|
+
data: de.data,
|
|
2324
|
+
rect: P
|
|
2325
2325
|
}
|
|
2326
2326
|
};
|
|
2327
2327
|
rt(() => {
|
|
2328
|
-
|
|
2329
|
-
type:
|
|
2330
|
-
initialCoordinates:
|
|
2331
|
-
active:
|
|
2332
|
-
}),
|
|
2328
|
+
ve == null || ve(He), S(De.Initializing), x({
|
|
2329
|
+
type: $.DragStart,
|
|
2330
|
+
initialCoordinates: H,
|
|
2331
|
+
active: me
|
|
2332
|
+
}), p({
|
|
2333
2333
|
type: "onDragStart",
|
|
2334
|
-
event:
|
|
2335
|
-
}),
|
|
2334
|
+
event: He
|
|
2335
|
+
}), U(bt.current), se(Z);
|
|
2336
2336
|
});
|
|
2337
2337
|
},
|
|
2338
|
-
onMove(
|
|
2339
|
-
|
|
2340
|
-
type:
|
|
2341
|
-
coordinates:
|
|
2338
|
+
onMove(H) {
|
|
2339
|
+
x({
|
|
2340
|
+
type: $.DragMove,
|
|
2341
|
+
coordinates: H
|
|
2342
2342
|
});
|
|
2343
2343
|
},
|
|
2344
|
-
onEnd:
|
|
2345
|
-
onCancel:
|
|
2344
|
+
onEnd: Oe($.DragEnd),
|
|
2345
|
+
onCancel: Oe($.DragCancel)
|
|
2346
2346
|
});
|
|
2347
|
-
bt.current =
|
|
2348
|
-
function
|
|
2347
|
+
bt.current = ue;
|
|
2348
|
+
function Oe(H) {
|
|
2349
2349
|
return async function() {
|
|
2350
2350
|
const {
|
|
2351
|
-
active:
|
|
2352
|
-
collisions:
|
|
2353
|
-
over:
|
|
2354
|
-
scrollAdjustedTranslate:
|
|
2355
|
-
} =
|
|
2356
|
-
let
|
|
2357
|
-
if (
|
|
2351
|
+
active: de,
|
|
2352
|
+
collisions: ve,
|
|
2353
|
+
over: He,
|
|
2354
|
+
scrollAdjustedTranslate: We
|
|
2355
|
+
} = ce.current;
|
|
2356
|
+
let Se = null;
|
|
2357
|
+
if (de && We) {
|
|
2358
2358
|
const {
|
|
2359
|
-
cancelDrop:
|
|
2360
|
-
} =
|
|
2361
|
-
|
|
2362
|
-
activatorEvent:
|
|
2363
|
-
active:
|
|
2364
|
-
collisions:
|
|
2365
|
-
delta:
|
|
2366
|
-
over:
|
|
2367
|
-
},
|
|
2359
|
+
cancelDrop: Xe
|
|
2360
|
+
} = B.current;
|
|
2361
|
+
Se = {
|
|
2362
|
+
activatorEvent: Z,
|
|
2363
|
+
active: de,
|
|
2364
|
+
collisions: ve,
|
|
2365
|
+
delta: We,
|
|
2366
|
+
over: He
|
|
2367
|
+
}, H === $.DragEnd && typeof Xe == "function" && await Promise.resolve(Xe(Se)) && (H = $.DragCancel);
|
|
2368
2368
|
}
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
type:
|
|
2372
|
-
}),
|
|
2373
|
-
const
|
|
2374
|
-
if (
|
|
2375
|
-
const vt =
|
|
2376
|
-
vt == null || vt(
|
|
2377
|
-
type:
|
|
2378
|
-
event:
|
|
2369
|
+
T.current = null, rt(() => {
|
|
2370
|
+
x({
|
|
2371
|
+
type: H
|
|
2372
|
+
}), S(De.Uninitialized), Ht(null), U(null), se(null), bt.current = null;
|
|
2373
|
+
const Xe = H === $.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
2374
|
+
if (Se) {
|
|
2375
|
+
const vt = B.current[Xe];
|
|
2376
|
+
vt == null || vt(Se), p({
|
|
2377
|
+
type: Xe,
|
|
2378
|
+
event: Se
|
|
2379
2379
|
});
|
|
2380
2380
|
}
|
|
2381
2381
|
});
|
|
@@ -2384,174 +2384,174 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2384
2384
|
},
|
|
2385
2385
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2386
2386
|
[w]
|
|
2387
|
-
), zn =
|
|
2388
|
-
const
|
|
2387
|
+
), zn = K((Y, J) => (_, we) => {
|
|
2388
|
+
const te = _.nativeEvent, Z = w.get(we);
|
|
2389
2389
|
if (
|
|
2390
2390
|
// Another sensor is already instantiating
|
|
2391
|
-
|
|
2392
|
-
!
|
|
2393
|
-
|
|
2391
|
+
T.current !== null || // No active draggable
|
|
2392
|
+
!Z || // Event has already been captured
|
|
2393
|
+
te.dndKit || te.defaultPrevented
|
|
2394
2394
|
)
|
|
2395
2395
|
return;
|
|
2396
|
-
const
|
|
2397
|
-
active:
|
|
2396
|
+
const ue = {
|
|
2397
|
+
active: Z
|
|
2398
2398
|
};
|
|
2399
|
-
|
|
2400
|
-
capturedBy:
|
|
2401
|
-
},
|
|
2402
|
-
}, [w,
|
|
2403
|
-
so(
|
|
2404
|
-
|
|
2405
|
-
}, [
|
|
2399
|
+
Y(_, J.options, ue) === !0 && (te.dndKit = {
|
|
2400
|
+
capturedBy: J.sensor
|
|
2401
|
+
}, T.current = we, Wt(_, J));
|
|
2402
|
+
}, [w, Wt]), Xt = Zr(c, zn);
|
|
2403
|
+
so(c), fe(() => {
|
|
2404
|
+
A && R === De.Initializing && S(De.Initialized);
|
|
2405
|
+
}, [A, R]), M(
|
|
2406
2406
|
() => {
|
|
2407
2407
|
const {
|
|
2408
|
-
onDragMove:
|
|
2409
|
-
} =
|
|
2410
|
-
active:
|
|
2411
|
-
activatorEvent:
|
|
2412
|
-
collisions:
|
|
2413
|
-
over:
|
|
2414
|
-
} =
|
|
2415
|
-
if (!
|
|
2408
|
+
onDragMove: Y
|
|
2409
|
+
} = B.current, {
|
|
2410
|
+
active: J,
|
|
2411
|
+
activatorEvent: _,
|
|
2412
|
+
collisions: we,
|
|
2413
|
+
over: te
|
|
2414
|
+
} = ce.current;
|
|
2415
|
+
if (!J || !_)
|
|
2416
2416
|
return;
|
|
2417
|
-
const
|
|
2418
|
-
active:
|
|
2419
|
-
activatorEvent:
|
|
2420
|
-
collisions:
|
|
2417
|
+
const Z = {
|
|
2418
|
+
active: J,
|
|
2419
|
+
activatorEvent: _,
|
|
2420
|
+
collisions: we,
|
|
2421
2421
|
delta: {
|
|
2422
|
-
x:
|
|
2423
|
-
y:
|
|
2422
|
+
x: Ae.x,
|
|
2423
|
+
y: Ae.y
|
|
2424
2424
|
},
|
|
2425
|
-
over:
|
|
2425
|
+
over: te
|
|
2426
2426
|
};
|
|
2427
2427
|
rt(() => {
|
|
2428
|
-
|
|
2428
|
+
Y == null || Y(Z), p({
|
|
2429
2429
|
type: "onDragMove",
|
|
2430
|
-
event:
|
|
2430
|
+
event: Z
|
|
2431
2431
|
});
|
|
2432
2432
|
});
|
|
2433
2433
|
},
|
|
2434
2434
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2435
|
-
[
|
|
2436
|
-
),
|
|
2435
|
+
[Ae.x, Ae.y]
|
|
2436
|
+
), M(
|
|
2437
2437
|
() => {
|
|
2438
2438
|
const {
|
|
2439
|
-
active:
|
|
2440
|
-
activatorEvent:
|
|
2441
|
-
collisions:
|
|
2442
|
-
droppableContainers:
|
|
2443
|
-
scrollAdjustedTranslate:
|
|
2444
|
-
} =
|
|
2445
|
-
if (!
|
|
2439
|
+
active: Y,
|
|
2440
|
+
activatorEvent: J,
|
|
2441
|
+
collisions: _,
|
|
2442
|
+
droppableContainers: we,
|
|
2443
|
+
scrollAdjustedTranslate: te
|
|
2444
|
+
} = ce.current;
|
|
2445
|
+
if (!Y || T.current == null || !J || !te)
|
|
2446
2446
|
return;
|
|
2447
2447
|
const {
|
|
2448
|
-
onDragOver:
|
|
2449
|
-
} =
|
|
2450
|
-
id:
|
|
2451
|
-
rect:
|
|
2452
|
-
data:
|
|
2453
|
-
disabled:
|
|
2454
|
-
} : null,
|
|
2455
|
-
active:
|
|
2456
|
-
activatorEvent:
|
|
2457
|
-
collisions:
|
|
2448
|
+
onDragOver: Z
|
|
2449
|
+
} = B.current, ue = we.get(Ft), Oe = ue && ue.rect.current ? {
|
|
2450
|
+
id: ue.id,
|
|
2451
|
+
rect: ue.rect.current,
|
|
2452
|
+
data: ue.data,
|
|
2453
|
+
disabled: ue.disabled
|
|
2454
|
+
} : null, H = {
|
|
2455
|
+
active: Y,
|
|
2456
|
+
activatorEvent: J,
|
|
2457
|
+
collisions: _,
|
|
2458
2458
|
delta: {
|
|
2459
|
-
x:
|
|
2460
|
-
y:
|
|
2459
|
+
x: te.x,
|
|
2460
|
+
y: te.y
|
|
2461
2461
|
},
|
|
2462
|
-
over:
|
|
2462
|
+
over: Oe
|
|
2463
2463
|
};
|
|
2464
2464
|
rt(() => {
|
|
2465
|
-
Ht(
|
|
2465
|
+
Ht(Oe), Z == null || Z(H), p({
|
|
2466
2466
|
type: "onDragOver",
|
|
2467
|
-
event:
|
|
2467
|
+
event: H
|
|
2468
2468
|
});
|
|
2469
2469
|
});
|
|
2470
2470
|
},
|
|
2471
2471
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2472
|
-
[
|
|
2473
|
-
),
|
|
2474
|
-
|
|
2475
|
-
activatorEvent:
|
|
2472
|
+
[Ft]
|
|
2473
|
+
), fe(() => {
|
|
2474
|
+
ce.current = {
|
|
2475
|
+
activatorEvent: k,
|
|
2476
2476
|
active: j,
|
|
2477
|
-
activeNode:
|
|
2478
|
-
collisionRect:
|
|
2479
|
-
collisions:
|
|
2480
|
-
droppableRects:
|
|
2477
|
+
activeNode: ee,
|
|
2478
|
+
collisionRect: Ne,
|
|
2479
|
+
collisions: Fe,
|
|
2480
|
+
droppableRects: he,
|
|
2481
2481
|
draggableNodes: w,
|
|
2482
|
-
draggingNode:
|
|
2483
|
-
draggingNodeRect:
|
|
2484
|
-
droppableContainers:
|
|
2485
|
-
over:
|
|
2486
|
-
scrollableAncestors:
|
|
2487
|
-
scrollAdjustedTranslate:
|
|
2488
|
-
},
|
|
2489
|
-
initial:
|
|
2490
|
-
translated:
|
|
2482
|
+
draggingNode: ke,
|
|
2483
|
+
draggingNodeRect: Te,
|
|
2484
|
+
droppableContainers: N,
|
|
2485
|
+
over: xe,
|
|
2486
|
+
scrollableAncestors: ye,
|
|
2487
|
+
scrollAdjustedTranslate: Ae
|
|
2488
|
+
}, P.current = {
|
|
2489
|
+
initial: Te,
|
|
2490
|
+
translated: Ne
|
|
2491
2491
|
};
|
|
2492
|
-
}, [j,
|
|
2493
|
-
...
|
|
2494
|
-
delta:
|
|
2495
|
-
draggingRect:
|
|
2496
|
-
pointerCoordinates:
|
|
2497
|
-
scrollableAncestors:
|
|
2492
|
+
}, [j, ee, Fe, Ne, w, ke, Te, he, N, xe, ye, Ae]), qr({
|
|
2493
|
+
...pe,
|
|
2494
|
+
delta: D,
|
|
2495
|
+
draggingRect: Ne,
|
|
2496
|
+
pointerCoordinates: Bt,
|
|
2497
|
+
scrollableAncestors: ye,
|
|
2498
2498
|
scrollableAncestorRects: tt
|
|
2499
2499
|
});
|
|
2500
|
-
const jn =
|
|
2500
|
+
const jn = O(() => ({
|
|
2501
2501
|
active: j,
|
|
2502
|
-
activeNode:
|
|
2503
|
-
activeNodeRect:
|
|
2504
|
-
activatorEvent:
|
|
2505
|
-
collisions:
|
|
2506
|
-
containerNodeRect:
|
|
2507
|
-
dragOverlay:
|
|
2502
|
+
activeNode: ee,
|
|
2503
|
+
activeNodeRect: A,
|
|
2504
|
+
activatorEvent: k,
|
|
2505
|
+
collisions: Fe,
|
|
2506
|
+
containerNodeRect: $e,
|
|
2507
|
+
dragOverlay: be,
|
|
2508
2508
|
draggableNodes: w,
|
|
2509
|
-
droppableContainers:
|
|
2510
|
-
droppableRects:
|
|
2511
|
-
over:
|
|
2512
|
-
measureDroppableContainers:
|
|
2513
|
-
scrollableAncestors:
|
|
2509
|
+
droppableContainers: N,
|
|
2510
|
+
droppableRects: he,
|
|
2511
|
+
over: xe,
|
|
2512
|
+
measureDroppableContainers: Re,
|
|
2513
|
+
scrollableAncestors: ye,
|
|
2514
2514
|
scrollableAncestorRects: tt,
|
|
2515
|
-
measuringConfiguration:
|
|
2516
|
-
measuringScheduled:
|
|
2515
|
+
measuringConfiguration: X,
|
|
2516
|
+
measuringScheduled: Be,
|
|
2517
2517
|
windowRect: gt
|
|
2518
|
-
}), [j,
|
|
2519
|
-
activatorEvent:
|
|
2520
|
-
activators:
|
|
2518
|
+
}), [j, ee, A, k, Fe, $e, be, w, N, he, xe, Re, ye, tt, X, Be, gt]), Pn = O(() => ({
|
|
2519
|
+
activatorEvent: k,
|
|
2520
|
+
activators: Xt,
|
|
2521
2521
|
active: j,
|
|
2522
|
-
activeNodeRect:
|
|
2522
|
+
activeNodeRect: A,
|
|
2523
2523
|
ariaDescribedById: {
|
|
2524
|
-
draggable:
|
|
2524
|
+
draggable: ae
|
|
2525
2525
|
},
|
|
2526
|
-
dispatch:
|
|
2526
|
+
dispatch: x,
|
|
2527
2527
|
draggableNodes: w,
|
|
2528
|
-
over:
|
|
2529
|
-
measureDroppableContainers:
|
|
2530
|
-
}), [
|
|
2528
|
+
over: xe,
|
|
2529
|
+
measureDroppableContainers: Re
|
|
2530
|
+
}), [k, Xt, j, A, x, ae, w, xe, Re]);
|
|
2531
2531
|
return V.createElement(hn.Provider, {
|
|
2532
|
-
value:
|
|
2532
|
+
value: y
|
|
2533
2533
|
}, V.createElement(ht.Provider, {
|
|
2534
|
-
value:
|
|
2534
|
+
value: Pn
|
|
2535
2535
|
}, V.createElement(Cn.Provider, {
|
|
2536
2536
|
value: jn
|
|
2537
2537
|
}, V.createElement(Rn.Provider, {
|
|
2538
2538
|
value: Ln
|
|
2539
|
-
},
|
|
2539
|
+
}, u)), V.createElement(yo, {
|
|
2540
2540
|
disabled: (a == null ? void 0 : a.restoreFocus) === !1
|
|
2541
2541
|
})), V.createElement(vr, {
|
|
2542
2542
|
...a,
|
|
2543
|
-
hiddenTextDescribedById:
|
|
2543
|
+
hiddenTextDescribedById: ae
|
|
2544
2544
|
}));
|
|
2545
|
-
function
|
|
2546
|
-
const
|
|
2545
|
+
function Bn() {
|
|
2546
|
+
const Y = (G == null ? void 0 : G.autoScrollEnabled) === !1, J = typeof l == "object" ? l.enabled === !1 : l === !1, _ = I && !Y && !J;
|
|
2547
2547
|
return typeof l == "object" ? {
|
|
2548
2548
|
...l,
|
|
2549
|
-
enabled:
|
|
2549
|
+
enabled: _
|
|
2550
2550
|
} : {
|
|
2551
|
-
enabled:
|
|
2551
|
+
enabled: _
|
|
2552
2552
|
};
|
|
2553
2553
|
}
|
|
2554
|
-
}), Do = /* @__PURE__ */
|
|
2554
|
+
}), Do = /* @__PURE__ */ Je(null), nn = "button", Co = "Draggable";
|
|
2555
2555
|
function Ro(e) {
|
|
2556
2556
|
let {
|
|
2557
2557
|
id: t,
|
|
@@ -2559,141 +2559,141 @@ function Ro(e) {
|
|
|
2559
2559
|
disabled: r = !1,
|
|
2560
2560
|
attributes: o
|
|
2561
2561
|
} = e;
|
|
2562
|
-
const i =
|
|
2562
|
+
const i = Qe(Co), {
|
|
2563
2563
|
activators: s,
|
|
2564
2564
|
activatorEvent: a,
|
|
2565
2565
|
active: l,
|
|
2566
|
-
activeNodeRect:
|
|
2567
|
-
ariaDescribedById:
|
|
2568
|
-
draggableNodes:
|
|
2569
|
-
over:
|
|
2570
|
-
} =
|
|
2571
|
-
role:
|
|
2572
|
-
roleDescription:
|
|
2566
|
+
activeNodeRect: u,
|
|
2567
|
+
ariaDescribedById: c,
|
|
2568
|
+
draggableNodes: d,
|
|
2569
|
+
over: f
|
|
2570
|
+
} = Ie(ht), {
|
|
2571
|
+
role: h = nn,
|
|
2572
|
+
roleDescription: v = "draggable",
|
|
2573
2573
|
tabIndex: g = 0
|
|
2574
|
-
} = o ?? {},
|
|
2575
|
-
|
|
2576
|
-
() => (
|
|
2574
|
+
} = o ?? {}, b = (l == null ? void 0 : l.id) === t, x = Ie(b ? Rn : Do), [p, y] = at(), [R, S] = at(), I = ao(s, t), m = Ve(n);
|
|
2575
|
+
fe(
|
|
2576
|
+
() => (d.set(t, {
|
|
2577
2577
|
id: t,
|
|
2578
2578
|
key: i,
|
|
2579
|
-
node:
|
|
2580
|
-
activatorNode:
|
|
2581
|
-
data:
|
|
2579
|
+
node: p,
|
|
2580
|
+
activatorNode: R,
|
|
2581
|
+
data: m
|
|
2582
2582
|
}), () => {
|
|
2583
|
-
const
|
|
2584
|
-
|
|
2583
|
+
const D = d.get(t);
|
|
2584
|
+
D && D.key === i && d.delete(t);
|
|
2585
2585
|
}),
|
|
2586
2586
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2587
|
-
[
|
|
2587
|
+
[d, t]
|
|
2588
2588
|
);
|
|
2589
|
-
const w =
|
|
2590
|
-
role:
|
|
2589
|
+
const w = O(() => ({
|
|
2590
|
+
role: h,
|
|
2591
2591
|
tabIndex: g,
|
|
2592
2592
|
"aria-disabled": r,
|
|
2593
|
-
"aria-pressed":
|
|
2594
|
-
"aria-roledescription":
|
|
2595
|
-
"aria-describedby":
|
|
2596
|
-
}), [r,
|
|
2593
|
+
"aria-pressed": b && h === nn ? !0 : void 0,
|
|
2594
|
+
"aria-roledescription": v,
|
|
2595
|
+
"aria-describedby": c.draggable
|
|
2596
|
+
}), [r, h, g, b, v, c.draggable]);
|
|
2597
2597
|
return {
|
|
2598
2598
|
active: l,
|
|
2599
2599
|
activatorEvent: a,
|
|
2600
|
-
activeNodeRect:
|
|
2600
|
+
activeNodeRect: u,
|
|
2601
2601
|
attributes: w,
|
|
2602
|
-
isDragging:
|
|
2603
|
-
listeners: r ? void 0 :
|
|
2604
|
-
node:
|
|
2605
|
-
over:
|
|
2606
|
-
setNodeRef:
|
|
2607
|
-
setActivatorNodeRef:
|
|
2608
|
-
transform:
|
|
2602
|
+
isDragging: b,
|
|
2603
|
+
listeners: r ? void 0 : I,
|
|
2604
|
+
node: p,
|
|
2605
|
+
over: f,
|
|
2606
|
+
setNodeRef: y,
|
|
2607
|
+
setActivatorNodeRef: S,
|
|
2608
|
+
transform: x
|
|
2609
2609
|
};
|
|
2610
2610
|
}
|
|
2611
|
-
function
|
|
2612
|
-
return
|
|
2611
|
+
function Io() {
|
|
2612
|
+
return Ie(Cn);
|
|
2613
2613
|
}
|
|
2614
|
-
const
|
|
2614
|
+
const Eo = "Droppable", ko = {
|
|
2615
2615
|
timeout: 25
|
|
2616
2616
|
};
|
|
2617
|
-
function
|
|
2617
|
+
function To(e) {
|
|
2618
2618
|
let {
|
|
2619
2619
|
data: t,
|
|
2620
2620
|
disabled: n = !1,
|
|
2621
2621
|
id: r,
|
|
2622
2622
|
resizeObserverConfig: o
|
|
2623
2623
|
} = e;
|
|
2624
|
-
const i =
|
|
2624
|
+
const i = Qe(Eo), {
|
|
2625
2625
|
active: s,
|
|
2626
2626
|
dispatch: a,
|
|
2627
2627
|
over: l,
|
|
2628
|
-
measureDroppableContainers:
|
|
2629
|
-
} =
|
|
2628
|
+
measureDroppableContainers: u
|
|
2629
|
+
} = Ie(ht), c = L({
|
|
2630
2630
|
disabled: n
|
|
2631
|
-
}),
|
|
2632
|
-
disabled:
|
|
2631
|
+
}), d = L(!1), f = L(null), h = L(null), {
|
|
2632
|
+
disabled: v,
|
|
2633
2633
|
updateMeasurementsFor: g,
|
|
2634
|
-
timeout:
|
|
2634
|
+
timeout: b
|
|
2635
2635
|
} = {
|
|
2636
2636
|
...ko,
|
|
2637
2637
|
...o
|
|
2638
|
-
},
|
|
2638
|
+
}, x = Ve(g ?? r), p = K(
|
|
2639
2639
|
() => {
|
|
2640
|
-
if (!
|
|
2641
|
-
|
|
2640
|
+
if (!d.current) {
|
|
2641
|
+
d.current = !0;
|
|
2642
2642
|
return;
|
|
2643
2643
|
}
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
},
|
|
2644
|
+
h.current != null && clearTimeout(h.current), h.current = setTimeout(() => {
|
|
2645
|
+
u(Array.isArray(x.current) ? x.current : [x.current]), h.current = null;
|
|
2646
|
+
}, b);
|
|
2647
2647
|
},
|
|
2648
2648
|
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2649
|
-
[
|
|
2650
|
-
),
|
|
2651
|
-
callback:
|
|
2652
|
-
disabled:
|
|
2653
|
-
}),
|
|
2654
|
-
|
|
2655
|
-
}, [
|
|
2656
|
-
return
|
|
2657
|
-
!
|
|
2658
|
-
}, [
|
|
2649
|
+
[b]
|
|
2650
|
+
), y = ft({
|
|
2651
|
+
callback: p,
|
|
2652
|
+
disabled: v || !s
|
|
2653
|
+
}), R = K((w, D) => {
|
|
2654
|
+
y && (D && (y.unobserve(D), d.current = !1), w && y.observe(w));
|
|
2655
|
+
}, [y]), [S, I] = at(R), m = Ve(t);
|
|
2656
|
+
return M(() => {
|
|
2657
|
+
!y || !S.current || (y.disconnect(), d.current = !1, y.observe(S.current));
|
|
2658
|
+
}, [S, y]), M(
|
|
2659
2659
|
() => (a({
|
|
2660
|
-
type:
|
|
2660
|
+
type: $.RegisterDroppable,
|
|
2661
2661
|
element: {
|
|
2662
2662
|
id: r,
|
|
2663
2663
|
key: i,
|
|
2664
2664
|
disabled: n,
|
|
2665
|
-
node:
|
|
2666
|
-
rect:
|
|
2667
|
-
data:
|
|
2665
|
+
node: S,
|
|
2666
|
+
rect: f,
|
|
2667
|
+
data: m
|
|
2668
2668
|
}
|
|
2669
2669
|
}), () => a({
|
|
2670
|
-
type:
|
|
2670
|
+
type: $.UnregisterDroppable,
|
|
2671
2671
|
key: i,
|
|
2672
2672
|
id: r
|
|
2673
2673
|
})),
|
|
2674
2674
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2675
2675
|
[r]
|
|
2676
|
-
),
|
|
2677
|
-
n !==
|
|
2678
|
-
type:
|
|
2676
|
+
), M(() => {
|
|
2677
|
+
n !== c.current.disabled && (a({
|
|
2678
|
+
type: $.SetDroppableDisabled,
|
|
2679
2679
|
id: r,
|
|
2680
2680
|
key: i,
|
|
2681
2681
|
disabled: n
|
|
2682
|
-
}),
|
|
2682
|
+
}), c.current.disabled = n);
|
|
2683
2683
|
}, [r, i, n, a]), {
|
|
2684
2684
|
active: s,
|
|
2685
|
-
rect:
|
|
2685
|
+
rect: f,
|
|
2686
2686
|
isOver: (l == null ? void 0 : l.id) === r,
|
|
2687
|
-
node:
|
|
2687
|
+
node: S,
|
|
2688
2688
|
over: l,
|
|
2689
|
-
setNodeRef:
|
|
2689
|
+
setNodeRef: I
|
|
2690
2690
|
};
|
|
2691
2691
|
}
|
|
2692
2692
|
function zt(e, t, n) {
|
|
2693
2693
|
const r = e.slice();
|
|
2694
2694
|
return r.splice(n < 0 ? r.length + n : n, 0, r.splice(t, 1)[0]), r;
|
|
2695
2695
|
}
|
|
2696
|
-
function
|
|
2696
|
+
function Ao(e, t) {
|
|
2697
2697
|
return e.reduce((n, r, o) => {
|
|
2698
2698
|
const i = t.get(r);
|
|
2699
2699
|
return i && (n[o] = i), n;
|
|
@@ -2702,7 +2702,7 @@ function To(e, t) {
|
|
|
2702
2702
|
function ot(e) {
|
|
2703
2703
|
return e !== null && e >= 0;
|
|
2704
2704
|
}
|
|
2705
|
-
function
|
|
2705
|
+
function No(e, t) {
|
|
2706
2706
|
if (e === t)
|
|
2707
2707
|
return !0;
|
|
2708
2708
|
if (e.length !== t.length)
|
|
@@ -2712,7 +2712,7 @@ function Oo(e, t) {
|
|
|
2712
2712
|
return !1;
|
|
2713
2713
|
return !0;
|
|
2714
2714
|
}
|
|
2715
|
-
function
|
|
2715
|
+
function Oo(e) {
|
|
2716
2716
|
return typeof e == "boolean" ? {
|
|
2717
2717
|
draggable: e,
|
|
2718
2718
|
droppable: e
|
|
@@ -2735,9 +2735,9 @@ const it = {
|
|
|
2735
2735
|
return null;
|
|
2736
2736
|
const l = Lo(n, s, o);
|
|
2737
2737
|
if (s === o) {
|
|
2738
|
-
const
|
|
2739
|
-
return
|
|
2740
|
-
x: o < i ?
|
|
2738
|
+
const u = n[i];
|
|
2739
|
+
return u ? {
|
|
2740
|
+
x: o < i ? u.left + u.width - (a.left + a.width) : u.left - a.left,
|
|
2741
2741
|
y: 0,
|
|
2742
2742
|
...it
|
|
2743
2743
|
} : null;
|
|
@@ -2760,7 +2760,7 @@ function Lo(e, t, n) {
|
|
|
2760
2760
|
const r = e[t], o = e[t - 1], i = e[t + 1];
|
|
2761
2761
|
return !r || !o && !i ? 0 : n < t ? o ? r.left - (o.left + o.width) : i.left - (r.left + r.width) : i ? i.left - (r.left + r.width) : r.left - (o.left + o.width);
|
|
2762
2762
|
}
|
|
2763
|
-
const
|
|
2763
|
+
const In = (e) => {
|
|
2764
2764
|
let {
|
|
2765
2765
|
rects: t,
|
|
2766
2766
|
activeIndex: n,
|
|
@@ -2774,15 +2774,15 @@ const En = (e) => {
|
|
|
2774
2774
|
scaleX: a.width / s.width,
|
|
2775
2775
|
scaleY: a.height / s.height
|
|
2776
2776
|
};
|
|
2777
|
-
},
|
|
2777
|
+
}, En = "Sortable", kn = /* @__PURE__ */ V.createContext({
|
|
2778
2778
|
activeIndex: -1,
|
|
2779
|
-
containerId:
|
|
2779
|
+
containerId: En,
|
|
2780
2780
|
disableTransforms: !1,
|
|
2781
2781
|
items: [],
|
|
2782
2782
|
overIndex: -1,
|
|
2783
2783
|
useDragOverlay: !1,
|
|
2784
2784
|
sortedRects: [],
|
|
2785
|
-
strategy:
|
|
2785
|
+
strategy: In,
|
|
2786
2786
|
disabled: {
|
|
2787
2787
|
draggable: !1,
|
|
2788
2788
|
droppable: !1
|
|
@@ -2793,38 +2793,38 @@ function zo(e) {
|
|
|
2793
2793
|
children: t,
|
|
2794
2794
|
id: n,
|
|
2795
2795
|
items: r,
|
|
2796
|
-
strategy: o =
|
|
2796
|
+
strategy: o = In,
|
|
2797
2797
|
disabled: i = !1
|
|
2798
2798
|
} = e;
|
|
2799
2799
|
const {
|
|
2800
2800
|
active: s,
|
|
2801
2801
|
dragOverlay: a,
|
|
2802
2802
|
droppableRects: l,
|
|
2803
|
-
over:
|
|
2804
|
-
measureDroppableContainers:
|
|
2805
|
-
} =
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
}, [
|
|
2809
|
-
|
|
2810
|
-
}, [
|
|
2811
|
-
const
|
|
2803
|
+
over: u,
|
|
2804
|
+
measureDroppableContainers: c
|
|
2805
|
+
} = Io(), d = Qe(En, n), f = a.rect !== null, h = O(() => r.map((I) => typeof I == "object" && "id" in I ? I.id : I), [r]), v = s != null, g = s ? h.indexOf(s.id) : -1, b = u ? h.indexOf(u.id) : -1, x = L(h), p = !No(h, x.current), y = b !== -1 && g === -1 || p, R = Oo(i);
|
|
2806
|
+
fe(() => {
|
|
2807
|
+
p && v && c(h);
|
|
2808
|
+
}, [p, h, v, c]), M(() => {
|
|
2809
|
+
x.current = h;
|
|
2810
|
+
}, [h]);
|
|
2811
|
+
const S = O(
|
|
2812
2812
|
() => ({
|
|
2813
2813
|
activeIndex: g,
|
|
2814
|
-
containerId:
|
|
2815
|
-
disabled:
|
|
2816
|
-
disableTransforms:
|
|
2817
|
-
items:
|
|
2818
|
-
overIndex:
|
|
2819
|
-
useDragOverlay:
|
|
2820
|
-
sortedRects:
|
|
2814
|
+
containerId: d,
|
|
2815
|
+
disabled: R,
|
|
2816
|
+
disableTransforms: y,
|
|
2817
|
+
items: h,
|
|
2818
|
+
overIndex: b,
|
|
2819
|
+
useDragOverlay: f,
|
|
2820
|
+
sortedRects: Ao(h, l),
|
|
2821
2821
|
strategy: o
|
|
2822
2822
|
}),
|
|
2823
2823
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2824
|
-
[g,
|
|
2824
|
+
[g, d, R.draggable, R.droppable, y, h, b, l, f, o]
|
|
2825
2825
|
);
|
|
2826
2826
|
return V.createElement(kn.Provider, {
|
|
2827
|
-
value:
|
|
2827
|
+
value: S
|
|
2828
2828
|
}, t);
|
|
2829
2829
|
}
|
|
2830
2830
|
const jo = (e) => {
|
|
@@ -2835,7 +2835,7 @@ const jo = (e) => {
|
|
|
2835
2835
|
overIndex: o
|
|
2836
2836
|
} = e;
|
|
2837
2837
|
return zt(n, r, o).indexOf(t);
|
|
2838
|
-
},
|
|
2838
|
+
}, Tn = (e) => {
|
|
2839
2839
|
let {
|
|
2840
2840
|
containerId: t,
|
|
2841
2841
|
isSorting: n,
|
|
@@ -2845,50 +2845,50 @@ const jo = (e) => {
|
|
|
2845
2845
|
newIndex: s,
|
|
2846
2846
|
previousItems: a,
|
|
2847
2847
|
previousContainerId: l,
|
|
2848
|
-
transition:
|
|
2848
|
+
transition: u
|
|
2849
2849
|
} = e;
|
|
2850
|
-
return !
|
|
2851
|
-
},
|
|
2850
|
+
return !u || !r || a !== i && o === s ? !1 : n ? !0 : s !== o && t === l;
|
|
2851
|
+
}, Po = {
|
|
2852
2852
|
duration: 200,
|
|
2853
2853
|
easing: "ease"
|
|
2854
|
-
},
|
|
2855
|
-
property:
|
|
2854
|
+
}, An = "transform", Bo = /* @__PURE__ */ qe.Transition.toString({
|
|
2855
|
+
property: An,
|
|
2856
2856
|
duration: 0,
|
|
2857
2857
|
easing: "linear"
|
|
2858
|
-
}),
|
|
2858
|
+
}), $o = {
|
|
2859
2859
|
roleDescription: "sortable"
|
|
2860
2860
|
};
|
|
2861
|
-
function
|
|
2861
|
+
function Fo(e) {
|
|
2862
2862
|
let {
|
|
2863
2863
|
disabled: t,
|
|
2864
2864
|
index: n,
|
|
2865
2865
|
node: r,
|
|
2866
2866
|
rect: o
|
|
2867
2867
|
} = e;
|
|
2868
|
-
const [i, s] =
|
|
2869
|
-
return
|
|
2868
|
+
const [i, s] = Q(null), a = L(n);
|
|
2869
|
+
return fe(() => {
|
|
2870
2870
|
if (!t && n !== a.current && r.current) {
|
|
2871
2871
|
const l = o.current;
|
|
2872
2872
|
if (l) {
|
|
2873
|
-
const
|
|
2873
|
+
const u = Pe(r.current, {
|
|
2874
2874
|
ignoreTransform: !0
|
|
2875
|
-
}),
|
|
2876
|
-
x: l.left -
|
|
2877
|
-
y: l.top -
|
|
2878
|
-
scaleX: l.width /
|
|
2879
|
-
scaleY: l.height /
|
|
2875
|
+
}), c = {
|
|
2876
|
+
x: l.left - u.left,
|
|
2877
|
+
y: l.top - u.top,
|
|
2878
|
+
scaleX: l.width / u.width,
|
|
2879
|
+
scaleY: l.height / u.height
|
|
2880
2880
|
};
|
|
2881
|
-
(
|
|
2881
|
+
(c.x || c.y) && s(c);
|
|
2882
2882
|
}
|
|
2883
2883
|
}
|
|
2884
2884
|
n !== a.current && (a.current = n);
|
|
2885
|
-
}, [t, n, r, o]),
|
|
2885
|
+
}, [t, n, r, o]), M(() => {
|
|
2886
2886
|
i && s(null);
|
|
2887
2887
|
}, [i]), i;
|
|
2888
2888
|
}
|
|
2889
2889
|
function Ho(e) {
|
|
2890
2890
|
let {
|
|
2891
|
-
animateLayoutChanges: t =
|
|
2891
|
+
animateLayoutChanges: t = Tn,
|
|
2892
2892
|
attributes: n,
|
|
2893
2893
|
disabled: r,
|
|
2894
2894
|
data: o,
|
|
@@ -2896,143 +2896,143 @@ function Ho(e) {
|
|
|
2896
2896
|
id: s,
|
|
2897
2897
|
strategy: a,
|
|
2898
2898
|
resizeObserverConfig: l,
|
|
2899
|
-
transition:
|
|
2899
|
+
transition: u = Po
|
|
2900
2900
|
} = e;
|
|
2901
2901
|
const {
|
|
2902
|
-
items:
|
|
2903
|
-
containerId:
|
|
2904
|
-
activeIndex:
|
|
2905
|
-
disabled:
|
|
2906
|
-
disableTransforms:
|
|
2902
|
+
items: c,
|
|
2903
|
+
containerId: d,
|
|
2904
|
+
activeIndex: f,
|
|
2905
|
+
disabled: h,
|
|
2906
|
+
disableTransforms: v,
|
|
2907
2907
|
sortedRects: g,
|
|
2908
|
-
overIndex:
|
|
2909
|
-
useDragOverlay:
|
|
2910
|
-
strategy:
|
|
2911
|
-
} =
|
|
2908
|
+
overIndex: b,
|
|
2909
|
+
useDragOverlay: x,
|
|
2910
|
+
strategy: p
|
|
2911
|
+
} = Ie(kn), y = Wo(r, h), R = c.indexOf(s), S = O(() => ({
|
|
2912
2912
|
sortable: {
|
|
2913
|
-
containerId:
|
|
2914
|
-
index:
|
|
2915
|
-
items:
|
|
2913
|
+
containerId: d,
|
|
2914
|
+
index: R,
|
|
2915
|
+
items: c
|
|
2916
2916
|
},
|
|
2917
2917
|
...o
|
|
2918
|
-
}), [
|
|
2919
|
-
rect:
|
|
2918
|
+
}), [d, o, R, c]), I = O(() => c.slice(c.indexOf(s)), [c, s]), {
|
|
2919
|
+
rect: m,
|
|
2920
2920
|
node: w,
|
|
2921
|
-
isOver:
|
|
2922
|
-
setNodeRef:
|
|
2923
|
-
} =
|
|
2921
|
+
isOver: D,
|
|
2922
|
+
setNodeRef: N
|
|
2923
|
+
} = To({
|
|
2924
2924
|
id: s,
|
|
2925
|
-
data:
|
|
2926
|
-
disabled:
|
|
2925
|
+
data: S,
|
|
2926
|
+
disabled: y.droppable,
|
|
2927
2927
|
resizeObserverConfig: {
|
|
2928
|
-
updateMeasurementsFor:
|
|
2928
|
+
updateMeasurementsFor: I,
|
|
2929
2929
|
...l
|
|
2930
2930
|
}
|
|
2931
2931
|
}), {
|
|
2932
|
-
active:
|
|
2933
|
-
activatorEvent:
|
|
2932
|
+
active: C,
|
|
2933
|
+
activatorEvent: P,
|
|
2934
2934
|
activeNodeRect: j,
|
|
2935
|
-
attributes:
|
|
2936
|
-
setNodeRef:
|
|
2937
|
-
listeners:
|
|
2938
|
-
isDragging:
|
|
2935
|
+
attributes: T,
|
|
2936
|
+
setNodeRef: G,
|
|
2937
|
+
listeners: U,
|
|
2938
|
+
isDragging: k,
|
|
2939
2939
|
over: se,
|
|
2940
|
-
setActivatorNodeRef:
|
|
2941
|
-
transform:
|
|
2940
|
+
setActivatorNodeRef: B,
|
|
2941
|
+
transform: ae
|
|
2942
2942
|
} = Ro({
|
|
2943
2943
|
id: s,
|
|
2944
|
-
data:
|
|
2944
|
+
data: S,
|
|
2945
2945
|
attributes: {
|
|
2946
|
-
|
|
2946
|
+
...$o,
|
|
2947
2947
|
...n
|
|
2948
2948
|
},
|
|
2949
|
-
disabled:
|
|
2950
|
-
}),
|
|
2949
|
+
disabled: y.draggable
|
|
2950
|
+
}), le = rr(N, G), X = !!C, he = X && !v && ot(f) && ot(b), Re = !x && k, Be = Re && he ? ae : null, et = he ? Be ?? (a ?? p)({
|
|
2951
2951
|
rects: g,
|
|
2952
2952
|
activeNodeRect: j,
|
|
2953
|
-
activeIndex:
|
|
2954
|
-
overIndex:
|
|
2955
|
-
index:
|
|
2956
|
-
}) : null,
|
|
2953
|
+
activeIndex: f,
|
|
2954
|
+
overIndex: b,
|
|
2955
|
+
index: R
|
|
2956
|
+
}) : null, pe = ot(f) && ot(b) ? i({
|
|
2957
2957
|
id: s,
|
|
2958
|
-
items:
|
|
2959
|
-
activeIndex:
|
|
2960
|
-
overIndex:
|
|
2961
|
-
}) :
|
|
2962
|
-
activeId:
|
|
2963
|
-
items:
|
|
2964
|
-
newIndex:
|
|
2965
|
-
containerId:
|
|
2966
|
-
}),
|
|
2967
|
-
active:
|
|
2968
|
-
containerId:
|
|
2969
|
-
isDragging:
|
|
2970
|
-
isSorting:
|
|
2958
|
+
items: c,
|
|
2959
|
+
activeIndex: f,
|
|
2960
|
+
overIndex: b
|
|
2961
|
+
}) : R, ge = C == null ? void 0 : C.id, A = L({
|
|
2962
|
+
activeId: ge,
|
|
2963
|
+
items: c,
|
|
2964
|
+
newIndex: pe,
|
|
2965
|
+
containerId: d
|
|
2966
|
+
}), $e = c !== A.current.items, ce = t({
|
|
2967
|
+
active: C,
|
|
2968
|
+
containerId: d,
|
|
2969
|
+
isDragging: k,
|
|
2970
|
+
isSorting: X,
|
|
2971
2971
|
id: s,
|
|
2972
|
-
index:
|
|
2973
|
-
items:
|
|
2974
|
-
newIndex:
|
|
2975
|
-
previousItems:
|
|
2976
|
-
previousContainerId:
|
|
2977
|
-
transition:
|
|
2978
|
-
wasDragging:
|
|
2979
|
-
}),
|
|
2980
|
-
disabled: !
|
|
2981
|
-
index:
|
|
2972
|
+
index: R,
|
|
2973
|
+
items: c,
|
|
2974
|
+
newIndex: A.current.newIndex,
|
|
2975
|
+
previousItems: A.current.items,
|
|
2976
|
+
previousContainerId: A.current.containerId,
|
|
2977
|
+
transition: u,
|
|
2978
|
+
wasDragging: A.current.activeId != null
|
|
2979
|
+
}), Ee = Fo({
|
|
2980
|
+
disabled: !ce,
|
|
2981
|
+
index: R,
|
|
2982
2982
|
node: w,
|
|
2983
|
-
rect:
|
|
2983
|
+
rect: m
|
|
2984
2984
|
});
|
|
2985
|
-
return
|
|
2986
|
-
|
|
2987
|
-
}, [
|
|
2988
|
-
if (
|
|
2985
|
+
return M(() => {
|
|
2986
|
+
X && A.current.newIndex !== pe && (A.current.newIndex = pe), d !== A.current.containerId && (A.current.containerId = d), c !== A.current.items && (A.current.items = c);
|
|
2987
|
+
}, [X, pe, d, c]), M(() => {
|
|
2988
|
+
if (ge === A.current.activeId)
|
|
2989
2989
|
return;
|
|
2990
|
-
if (
|
|
2991
|
-
|
|
2990
|
+
if (ge != null && A.current.activeId == null) {
|
|
2991
|
+
A.current.activeId = ge;
|
|
2992
2992
|
return;
|
|
2993
2993
|
}
|
|
2994
|
-
const
|
|
2995
|
-
|
|
2994
|
+
const ke = setTimeout(() => {
|
|
2995
|
+
A.current.activeId = ge;
|
|
2996
2996
|
}, 50);
|
|
2997
|
-
return () => clearTimeout(
|
|
2998
|
-
}, [
|
|
2999
|
-
active:
|
|
3000
|
-
activeIndex:
|
|
3001
|
-
attributes:
|
|
3002
|
-
data:
|
|
3003
|
-
rect:
|
|
3004
|
-
index:
|
|
3005
|
-
newIndex:
|
|
3006
|
-
items:
|
|
3007
|
-
isOver:
|
|
3008
|
-
isSorting:
|
|
3009
|
-
isDragging:
|
|
3010
|
-
listeners:
|
|
2997
|
+
return () => clearTimeout(ke);
|
|
2998
|
+
}, [ge]), {
|
|
2999
|
+
active: C,
|
|
3000
|
+
activeIndex: f,
|
|
3001
|
+
attributes: T,
|
|
3002
|
+
data: S,
|
|
3003
|
+
rect: m,
|
|
3004
|
+
index: R,
|
|
3005
|
+
newIndex: pe,
|
|
3006
|
+
items: c,
|
|
3007
|
+
isOver: D,
|
|
3008
|
+
isSorting: X,
|
|
3009
|
+
isDragging: k,
|
|
3010
|
+
listeners: U,
|
|
3011
3011
|
node: w,
|
|
3012
|
-
overIndex:
|
|
3012
|
+
overIndex: b,
|
|
3013
3013
|
over: se,
|
|
3014
|
-
setNodeRef:
|
|
3015
|
-
setActivatorNodeRef:
|
|
3016
|
-
setDroppableNodeRef:
|
|
3017
|
-
setDraggableNodeRef:
|
|
3018
|
-
transform:
|
|
3019
|
-
transition:
|
|
3014
|
+
setNodeRef: le,
|
|
3015
|
+
setActivatorNodeRef: B,
|
|
3016
|
+
setDroppableNodeRef: N,
|
|
3017
|
+
setDraggableNodeRef: G,
|
|
3018
|
+
transform: Ee ?? et,
|
|
3019
|
+
transition: be()
|
|
3020
3020
|
};
|
|
3021
|
-
function
|
|
3021
|
+
function be() {
|
|
3022
3022
|
if (
|
|
3023
3023
|
// Temporarily disable transitions for a single frame to set up derived transforms
|
|
3024
|
-
|
|
3025
|
-
|
|
3024
|
+
Ee || // Or to prevent items jumping to back to their "new" position when items change
|
|
3025
|
+
$e && A.current.newIndex === R
|
|
3026
3026
|
)
|
|
3027
|
-
return
|
|
3028
|
-
if (!(
|
|
3029
|
-
return
|
|
3030
|
-
...
|
|
3031
|
-
property:
|
|
3027
|
+
return Bo;
|
|
3028
|
+
if (!(Re && !Tt(P) || !u) && (X || ce))
|
|
3029
|
+
return qe.Transition.toString({
|
|
3030
|
+
...u,
|
|
3031
|
+
property: An
|
|
3032
3032
|
});
|
|
3033
3033
|
}
|
|
3034
3034
|
}
|
|
3035
|
-
function
|
|
3035
|
+
function Wo(e, t) {
|
|
3036
3036
|
var n, r;
|
|
3037
3037
|
return typeof e == "boolean" ? {
|
|
3038
3038
|
draggable: e,
|
|
@@ -3044,7 +3044,7 @@ function Xo(e, t) {
|
|
|
3044
3044
|
};
|
|
3045
3045
|
}
|
|
3046
3046
|
E.Down, E.Right, E.Up, E.Left;
|
|
3047
|
-
const
|
|
3047
|
+
const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
3048
3048
|
"svg",
|
|
3049
3049
|
{
|
|
3050
3050
|
width: "16",
|
|
@@ -3054,8 +3054,8 @@ const Wo = ({ className: e }) => /* @__PURE__ */ M.jsxs(
|
|
|
3054
3054
|
className: e,
|
|
3055
3055
|
style: { flexShrink: 0 },
|
|
3056
3056
|
children: [
|
|
3057
|
-
/* @__PURE__ */
|
|
3058
|
-
/* @__PURE__ */
|
|
3057
|
+
/* @__PURE__ */ z.jsx("rect", { x: "4", y: "5", width: "8", height: "2", rx: "1" }),
|
|
3058
|
+
/* @__PURE__ */ z.jsx("rect", { x: "4", y: "9", width: "8", height: "2", rx: "1" })
|
|
3059
3059
|
]
|
|
3060
3060
|
}
|
|
3061
3061
|
), Yo = ({
|
|
@@ -3069,106 +3069,114 @@ const Wo = ({ className: e }) => /* @__PURE__ */ M.jsxs(
|
|
|
3069
3069
|
dragHandleIcon: a,
|
|
3070
3070
|
theme: l = "light"
|
|
3071
3071
|
}) => {
|
|
3072
|
-
const
|
|
3073
|
-
const { isSorting:
|
|
3074
|
-
return
|
|
3072
|
+
const u = Ce.useRef(null), [c, d] = Ce.useState(null), f = (D) => {
|
|
3073
|
+
const { isSorting: N, wasDragging: C } = D;
|
|
3074
|
+
return N || C ? Tn(D) : !0;
|
|
3075
3075
|
}, {
|
|
3076
|
-
attributes:
|
|
3077
|
-
listeners:
|
|
3076
|
+
attributes: h,
|
|
3077
|
+
listeners: v,
|
|
3078
3078
|
setNodeRef: g,
|
|
3079
|
-
transform:
|
|
3080
|
-
transition:
|
|
3081
|
-
isDragging:
|
|
3079
|
+
transform: b,
|
|
3080
|
+
transition: x,
|
|
3081
|
+
isDragging: p
|
|
3082
3082
|
} = Ho({
|
|
3083
3083
|
id: e.key || `col-${t}`,
|
|
3084
3084
|
disabled: !s || !!e.fixed,
|
|
3085
|
-
animateLayoutChanges:
|
|
3085
|
+
animateLayoutChanges: f,
|
|
3086
3086
|
transition: {
|
|
3087
3087
|
duration: 250,
|
|
3088
3088
|
easing: "cubic-bezier(0.25, 1, 0.5, 1)"
|
|
3089
3089
|
}
|
|
3090
|
-
}),
|
|
3091
|
-
(
|
|
3092
|
-
|
|
3090
|
+
}), y = Ce.useCallback(
|
|
3091
|
+
(D) => {
|
|
3092
|
+
u.current = D, g(D);
|
|
3093
3093
|
},
|
|
3094
3094
|
[g]
|
|
3095
3095
|
);
|
|
3096
|
-
|
|
3097
|
-
if (
|
|
3098
|
-
const
|
|
3099
|
-
|
|
3096
|
+
Ce.useEffect(() => {
|
|
3097
|
+
if (p && u.current) {
|
|
3098
|
+
const D = u.current.getBoundingClientRect().width;
|
|
3099
|
+
d(D);
|
|
3100
3100
|
} else
|
|
3101
|
-
|
|
3102
|
-
}, [
|
|
3103
|
-
const
|
|
3104
|
-
const
|
|
3105
|
-
let
|
|
3106
|
-
e.fixed ?
|
|
3107
|
-
const
|
|
3108
|
-
transform:
|
|
3109
|
-
transition:
|
|
3101
|
+
p || d(null);
|
|
3102
|
+
}, [p]);
|
|
3103
|
+
const R = () => {
|
|
3104
|
+
const D = p && c ? `${c}px` : e.width || "auto";
|
|
3105
|
+
let N = "auto";
|
|
3106
|
+
e.fixed ? N = p ? 1001 : 1e3 : p && (N = 100);
|
|
3107
|
+
const C = {
|
|
3108
|
+
transform: b ? qe.Translate.toString(b) : void 0,
|
|
3109
|
+
transition: x || "transform 250ms cubic-bezier(0.25, 1, 0.5, 1)",
|
|
3110
3110
|
willChange: "transform",
|
|
3111
|
-
width:
|
|
3111
|
+
width: D,
|
|
3112
3112
|
textAlign: oe.getTextAlign(e.align),
|
|
3113
|
-
opacity:
|
|
3114
|
-
|
|
3113
|
+
opacity: p ? 0.5 : 1,
|
|
3114
|
+
// cursor 由 className 控制,不在 inline style 中设置
|
|
3115
|
+
zIndex: N,
|
|
3115
3116
|
whiteSpace: "nowrap",
|
|
3116
3117
|
overflow: "hidden",
|
|
3117
3118
|
textOverflow: "ellipsis"
|
|
3118
3119
|
};
|
|
3119
|
-
if (
|
|
3120
|
-
let
|
|
3121
|
-
for (let
|
|
3122
|
-
n[
|
|
3123
|
-
|
|
3120
|
+
if (p && c && (C.minWidth = `${c}px`, C.maxWidth = `${c}px`), e.fixed === "left") {
|
|
3121
|
+
let P = 0;
|
|
3122
|
+
for (let j = 0; j < t; j++)
|
|
3123
|
+
n[j].fixed === "left" && (P += parseInt(n[j].width || "150"));
|
|
3124
|
+
C.left = `${P}px`;
|
|
3124
3125
|
} else if (e.fixed === "right") {
|
|
3125
|
-
let
|
|
3126
|
-
for (let
|
|
3127
|
-
n[
|
|
3128
|
-
|
|
3126
|
+
let P = 0;
|
|
3127
|
+
for (let j = t + 1; j < n.length; j++)
|
|
3128
|
+
n[j].fixed === "right" && (P += parseInt(n[j].width || "150"));
|
|
3129
|
+
C.right = `${P}px`;
|
|
3129
3130
|
}
|
|
3130
|
-
return
|
|
3131
|
-
},
|
|
3131
|
+
return C;
|
|
3132
|
+
}, S = Me(
|
|
3132
3133
|
"bu-group",
|
|
3133
3134
|
oe.getThClasses({
|
|
3134
3135
|
theme: l,
|
|
3135
3136
|
fixed: e.fixed,
|
|
3136
3137
|
sortable: e.filter,
|
|
3137
|
-
isDragging:
|
|
3138
|
+
isDragging: p,
|
|
3138
3139
|
draggable: s
|
|
3139
3140
|
})
|
|
3140
|
-
),
|
|
3141
|
-
|
|
3141
|
+
), I = s && !e.fixed, m = e.filter && e.key, w = (D) => {
|
|
3142
|
+
m && (D.target.closest(".drag-handle-icon") || o(e));
|
|
3143
|
+
};
|
|
3144
|
+
return /* @__PURE__ */ z.jsx(
|
|
3142
3145
|
"th",
|
|
3143
3146
|
{
|
|
3144
|
-
ref:
|
|
3145
|
-
className:
|
|
3146
|
-
style:
|
|
3147
|
-
...
|
|
3148
|
-
...
|
|
3149
|
-
onClick:
|
|
3150
|
-
children: /* @__PURE__ */
|
|
3147
|
+
ref: y,
|
|
3148
|
+
className: S,
|
|
3149
|
+
style: R(),
|
|
3150
|
+
...h,
|
|
3151
|
+
...v,
|
|
3152
|
+
onClick: w,
|
|
3153
|
+
children: /* @__PURE__ */ z.jsxs(
|
|
3151
3154
|
"div",
|
|
3152
3155
|
{
|
|
3153
3156
|
className: "bu-relative bu-flex bu-items-center bu-gap-2",
|
|
3154
3157
|
style: { justifyContent: e.align || "center" },
|
|
3155
3158
|
children: [
|
|
3156
|
-
/* @__PURE__ */
|
|
3159
|
+
/* @__PURE__ */ z.jsxs("div", { className: "bu-flex bu-items-center", children: [
|
|
3157
3160
|
e.renderHeader ? e.renderHeader([]) : e.title,
|
|
3158
3161
|
i(e),
|
|
3159
3162
|
e.renderEndIcon ? e.renderEndIcon() : null
|
|
3160
3163
|
] }),
|
|
3161
|
-
|
|
3164
|
+
I && /* @__PURE__ */ z.jsx(
|
|
3162
3165
|
"span",
|
|
3163
3166
|
{
|
|
3164
|
-
|
|
3167
|
+
"data-drag-handle": !0,
|
|
3168
|
+
className: `${Me(
|
|
3165
3169
|
oe.dragHandle({
|
|
3166
3170
|
theme: l
|
|
3167
3171
|
}),
|
|
3168
|
-
"group-hover:bu-opacity-100"
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
+
"group-hover:bu-opacity-100"
|
|
3173
|
+
)} drag-handle-icon`,
|
|
3174
|
+
style: {
|
|
3175
|
+
display: "flex",
|
|
3176
|
+
alignItems: "center",
|
|
3177
|
+
marginLeft: "4px"
|
|
3178
|
+
},
|
|
3179
|
+
children: a !== null && (a || /* @__PURE__ */ z.jsx(Xo, {}))
|
|
3172
3180
|
}
|
|
3173
3181
|
)
|
|
3174
3182
|
]
|
|
@@ -3185,22 +3193,22 @@ const Wo = ({ className: e }) => /* @__PURE__ */ M.jsxs(
|
|
|
3185
3193
|
theadClass: i,
|
|
3186
3194
|
draggable: s = !1,
|
|
3187
3195
|
dragHandleIcon: a,
|
|
3188
|
-
theme: l = "light"
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3196
|
+
theme: l = "light",
|
|
3197
|
+
rowIdPrefix: u
|
|
3198
|
+
} = e, c = (f) => {
|
|
3199
|
+
f.filter && f.key && r(f.key, f.type);
|
|
3200
|
+
}, d = (f) => {
|
|
3201
|
+
if (!f.filter || !f.key)
|
|
3193
3202
|
return null;
|
|
3194
|
-
const h = n[
|
|
3195
|
-
return /* @__PURE__ */
|
|
3203
|
+
const h = n[f.key] || ne.default, v = l === "dark" ? "rgba(235, 236, 245, 0.20)" : "rgba(10, 10, 10, 0.20)", g = l === "dark" ? "rgba(235, 236, 245, 0.60)" : "rgba(10, 10, 10, 0.60)", b = h !== ne.default;
|
|
3204
|
+
return /* @__PURE__ */ z.jsx(
|
|
3196
3205
|
"span",
|
|
3197
3206
|
{
|
|
3198
|
-
className:
|
|
3207
|
+
className: Me(
|
|
3199
3208
|
"bu-inline-flex bu-align-middle bu-transition-opacity bu-duration-200",
|
|
3200
|
-
"bu-ml-[4px]"
|
|
3201
|
-
g ? "bu-opacity-100" : "bu-opacity-0 group-hover:bu-opacity-100"
|
|
3209
|
+
"bu-ml-[4px]"
|
|
3202
3210
|
),
|
|
3203
|
-
children: /* @__PURE__ */
|
|
3211
|
+
children: /* @__PURE__ */ z.jsxs(
|
|
3204
3212
|
"svg",
|
|
3205
3213
|
{
|
|
3206
3214
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3208,21 +3216,23 @@ const Wo = ({ className: e }) => /* @__PURE__ */ M.jsxs(
|
|
|
3208
3216
|
height: "10",
|
|
3209
3217
|
viewBox: "0 0 6 10",
|
|
3210
3218
|
fill: "none",
|
|
3219
|
+
className: Me(
|
|
3220
|
+
"bu-transition-opacity bu-duration-200",
|
|
3221
|
+
b ? "bu-opacity-100" : "bu-opacity-0 group-hover:bu-opacity-100"
|
|
3222
|
+
),
|
|
3211
3223
|
children: [
|
|
3212
|
-
/* @__PURE__ */
|
|
3224
|
+
/* @__PURE__ */ z.jsx(
|
|
3213
3225
|
"path",
|
|
3214
3226
|
{
|
|
3215
3227
|
d: "M5.4847 3.04301V4.10942H0.151367V3.04301L2.81803 0.376343L5.4847 3.04301Z",
|
|
3216
|
-
fill: h ===
|
|
3217
|
-
fillOpacity: h === U.asc ? "1" : "0.2"
|
|
3228
|
+
fill: h === ne.asc ? g : v
|
|
3218
3229
|
}
|
|
3219
3230
|
),
|
|
3220
|
-
/* @__PURE__ */
|
|
3231
|
+
/* @__PURE__ */ z.jsx(
|
|
3221
3232
|
"path",
|
|
3222
3233
|
{
|
|
3223
3234
|
d: "M5.4847 5.89067V6.95707L2.81803 9.62374L0.151367 6.95707V5.89067H5.4847Z",
|
|
3224
|
-
fill: h ===
|
|
3225
|
-
fillOpacity: h === U.desc ? "1" : "0.2"
|
|
3235
|
+
fill: h === ne.desc ? g : v
|
|
3226
3236
|
}
|
|
3227
3237
|
)
|
|
3228
3238
|
]
|
|
@@ -3231,66 +3241,67 @@ const Wo = ({ className: e }) => /* @__PURE__ */ M.jsxs(
|
|
|
3231
3241
|
}
|
|
3232
3242
|
);
|
|
3233
3243
|
};
|
|
3234
|
-
return /* @__PURE__ */
|
|
3244
|
+
return /* @__PURE__ */ z.jsx("thead", { className: Me(oe.thead({ theme: l }), i), children: /* @__PURE__ */ z.jsx("tr", { id: u ? `${u}-thead` : "", children: t.map((f, h) => /* @__PURE__ */ z.jsx(
|
|
3235
3245
|
Yo,
|
|
3236
3246
|
{
|
|
3237
|
-
column:
|
|
3247
|
+
column: f,
|
|
3238
3248
|
index: h,
|
|
3239
3249
|
columns: t,
|
|
3240
|
-
sortState:
|
|
3241
|
-
onSort:
|
|
3242
|
-
renderSortIcon:
|
|
3243
|
-
isDragging:
|
|
3250
|
+
sortState: f.key ? n[f.key] : void 0,
|
|
3251
|
+
onSort: c,
|
|
3252
|
+
renderSortIcon: d,
|
|
3253
|
+
isDragging: f.key === o,
|
|
3244
3254
|
draggable: s,
|
|
3245
3255
|
dragHandleIcon: a,
|
|
3246
3256
|
theme: l
|
|
3247
3257
|
},
|
|
3248
|
-
|
|
3258
|
+
f.key || h
|
|
3249
3259
|
)) }) });
|
|
3250
3260
|
}, Uo = (e) => {
|
|
3251
|
-
const { columns: t, data: n, rowKey: r, tdClass: o, tbodyClass: i, theme: s = "light" } = e, a = (
|
|
3252
|
-
const
|
|
3253
|
-
textAlign: oe.getTextAlign(
|
|
3261
|
+
const { columns: t, data: n, rowKey: r, tdClass: o, tbodyClass: i, theme: s = "light" } = e, a = (c, d) => {
|
|
3262
|
+
const f = {
|
|
3263
|
+
textAlign: oe.getTextAlign(c.align)
|
|
3254
3264
|
};
|
|
3255
|
-
if (
|
|
3256
|
-
let
|
|
3257
|
-
for (let
|
|
3258
|
-
t[
|
|
3259
|
-
|
|
3260
|
-
} else if (
|
|
3261
|
-
let
|
|
3262
|
-
for (let
|
|
3263
|
-
t[
|
|
3264
|
-
|
|
3265
|
+
if (c.fixed === "left") {
|
|
3266
|
+
let h = 0;
|
|
3267
|
+
for (let v = 0; v < d; v++)
|
|
3268
|
+
t[v].fixed === "left" && (h += parseInt(t[v].width || "150"));
|
|
3269
|
+
f.left = `${h}px`;
|
|
3270
|
+
} else if (c.fixed === "right") {
|
|
3271
|
+
let h = 0;
|
|
3272
|
+
for (let v = d + 1; v < t.length; v++)
|
|
3273
|
+
t[v].fixed === "right" && (h += parseInt(t[v].width || "150"));
|
|
3274
|
+
f.right = `${h}px`;
|
|
3265
3275
|
}
|
|
3266
|
-
return
|
|
3267
|
-
}, l = (
|
|
3268
|
-
if (
|
|
3269
|
-
return
|
|
3276
|
+
return f;
|
|
3277
|
+
}, l = (c, d, f) => c.render ? c.render(d, f) : c.key ? d[c.key] : null, u = (c, d, f) => {
|
|
3278
|
+
if (c.onCell)
|
|
3279
|
+
return c.onCell(d, f);
|
|
3270
3280
|
};
|
|
3271
|
-
return /* @__PURE__ */
|
|
3281
|
+
return /* @__PURE__ */ z.jsx("tbody", { className: Me(oe.tbody({ theme: s }), i), children: n.map((c, d) => /* @__PURE__ */ z.jsx(
|
|
3272
3282
|
"tr",
|
|
3273
3283
|
{
|
|
3284
|
+
id: e.rowIdPrefix ? `${e.rowIdPrefix}-${d}` : "",
|
|
3274
3285
|
className: oe.tr({ theme: s }),
|
|
3275
|
-
children: t.map((
|
|
3276
|
-
const
|
|
3277
|
-
return
|
|
3286
|
+
children: t.map((f, h) => {
|
|
3287
|
+
const v = u(f, c, d);
|
|
3288
|
+
return v === 0 ? null : /* @__PURE__ */ z.jsx(
|
|
3278
3289
|
"td",
|
|
3279
3290
|
{
|
|
3280
3291
|
className: oe.getTdClasses({
|
|
3281
3292
|
theme: s,
|
|
3282
|
-
fixed:
|
|
3293
|
+
fixed: f.fixed,
|
|
3283
3294
|
customClass: o
|
|
3284
3295
|
}),
|
|
3285
|
-
style: a(
|
|
3286
|
-
colSpan:
|
|
3287
|
-
children: l(
|
|
3296
|
+
style: a(f, h),
|
|
3297
|
+
colSpan: v,
|
|
3298
|
+
children: l(f, c, d)
|
|
3288
3299
|
},
|
|
3289
|
-
|
|
3300
|
+
f.key || h
|
|
3290
3301
|
);
|
|
3291
3302
|
})
|
|
3292
3303
|
},
|
|
3293
|
-
|
|
3304
|
+
c[r] || d
|
|
3294
3305
|
)) });
|
|
3295
3306
|
}, Vo = (e) => {
|
|
3296
3307
|
let {
|
|
@@ -3310,104 +3321,126 @@ const Wo = ({ className: e }) => /* @__PURE__ */ M.jsxs(
|
|
|
3310
3321
|
tbodyClass: s,
|
|
3311
3322
|
renderEmpty: a,
|
|
3312
3323
|
onSortChange: l,
|
|
3313
|
-
tableLayout:
|
|
3314
|
-
draggable:
|
|
3324
|
+
tableLayout: u = "auto",
|
|
3325
|
+
draggable: c = !1,
|
|
3315
3326
|
// 默认不启用拖拽
|
|
3316
|
-
onColumnsChange:
|
|
3317
|
-
dragHandleIcon:
|
|
3318
|
-
maxHeight:
|
|
3319
|
-
|
|
3327
|
+
onColumnsChange: d,
|
|
3328
|
+
dragHandleIcon: f,
|
|
3329
|
+
maxHeight: h,
|
|
3330
|
+
rowIdPrefix: v
|
|
3331
|
+
} = e, { theme: g } = Xn(), [b, x] = Ce.useState(t), [p, y] = Ce.useState({}), [R, S] = Ce.useState(null), I = pr(
|
|
3320
3332
|
Kt(Lt, {
|
|
3321
3333
|
activationConstraint: {
|
|
3322
3334
|
distance: 8
|
|
3323
3335
|
// 8px 移动后才激活拖拽
|
|
3324
3336
|
}
|
|
3325
3337
|
}),
|
|
3326
|
-
Kt(
|
|
3338
|
+
Kt(Ot)
|
|
3327
3339
|
);
|
|
3328
|
-
|
|
3329
|
-
|
|
3340
|
+
Ce.useEffect(() => {
|
|
3341
|
+
x(t);
|
|
3330
3342
|
}, [t]);
|
|
3331
|
-
const
|
|
3332
|
-
const
|
|
3333
|
-
let
|
|
3334
|
-
|
|
3335
|
-
const
|
|
3336
|
-
let
|
|
3337
|
-
if (
|
|
3338
|
-
if (
|
|
3339
|
-
l({ sortKey:
|
|
3343
|
+
const m = (T, G) => {
|
|
3344
|
+
const U = p[T] || ne.default;
|
|
3345
|
+
let k;
|
|
3346
|
+
U === ne.default ? k = ne.desc : U === ne.desc ? k = ne.asc : k = ne.default;
|
|
3347
|
+
const se = G || "single";
|
|
3348
|
+
let B;
|
|
3349
|
+
if (se === "single" ? B = { [T]: k } : (B = { ...p, [T]: k }, k === ne.default && delete B[T]), y(B), l)
|
|
3350
|
+
if (se === "single")
|
|
3351
|
+
l({ sortKey: T, sort: k });
|
|
3340
3352
|
else {
|
|
3341
|
-
const
|
|
3342
|
-
sortKey:
|
|
3343
|
-
sort:
|
|
3353
|
+
const ae = Object.entries(B).map(([le, X]) => ({
|
|
3354
|
+
sortKey: le,
|
|
3355
|
+
sort: X
|
|
3344
3356
|
}));
|
|
3345
|
-
l(
|
|
3357
|
+
l(ae);
|
|
3346
3358
|
}
|
|
3347
|
-
},
|
|
3348
|
-
|
|
3349
|
-
},
|
|
3350
|
-
const { active:
|
|
3351
|
-
|
|
3352
|
-
const
|
|
3353
|
-
if (
|
|
3354
|
-
return
|
|
3355
|
-
const
|
|
3356
|
-
return
|
|
3359
|
+
}, w = (T) => {
|
|
3360
|
+
S(T.active.id);
|
|
3361
|
+
}, D = (T) => {
|
|
3362
|
+
const { active: G, over: U } = T;
|
|
3363
|
+
S(null), !(!U || G.id === U.id) && x((k) => {
|
|
3364
|
+
const se = k.findIndex((le) => le.key === G.id), B = k.findIndex((le) => le.key === U.id);
|
|
3365
|
+
if (se === -1 || B === -1 || k[B].fixed)
|
|
3366
|
+
return k;
|
|
3367
|
+
const ae = zt(k, se, B);
|
|
3368
|
+
return d && d(ae), ae;
|
|
3357
3369
|
});
|
|
3358
|
-
},
|
|
3370
|
+
}, N = b.filter((T) => !T.fixed && T.key).map((T) => T.key), P = (() => {
|
|
3371
|
+
const T = b.reduce((G, U) => {
|
|
3372
|
+
if (U.width) {
|
|
3373
|
+
const k = parseInt(U.width);
|
|
3374
|
+
return G + (isNaN(k) ? 150 : k);
|
|
3375
|
+
}
|
|
3376
|
+
return G + 150;
|
|
3377
|
+
}, 0);
|
|
3378
|
+
return T > 0 ? `${T}px` : void 0;
|
|
3379
|
+
})(), j = () => /* @__PURE__ */ z.jsx(
|
|
3359
3380
|
"div",
|
|
3360
3381
|
{
|
|
3361
|
-
className: oe.container({ theme:
|
|
3362
|
-
style:
|
|
3363
|
-
children: n.length > 0 ? /* @__PURE__ */
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3382
|
+
className: oe.container({ theme: g }),
|
|
3383
|
+
style: h ? { maxHeight: h, overflowX: "auto", overflowY: "auto" } : { overflowX: "auto" },
|
|
3384
|
+
children: n.length > 0 ? /* @__PURE__ */ z.jsxs(
|
|
3385
|
+
"table",
|
|
3386
|
+
{
|
|
3387
|
+
className: oe.table(),
|
|
3388
|
+
style: {
|
|
3389
|
+
tableLayout: u,
|
|
3390
|
+
minWidth: u === "fixed" ? P : void 0
|
|
3391
|
+
},
|
|
3392
|
+
children: [
|
|
3393
|
+
/* @__PURE__ */ z.jsx(
|
|
3394
|
+
Ko,
|
|
3395
|
+
{
|
|
3396
|
+
columns: b,
|
|
3397
|
+
sortStates: p,
|
|
3398
|
+
onSort: m,
|
|
3399
|
+
activeId: c ? R : null,
|
|
3400
|
+
theadClass: o,
|
|
3401
|
+
draggable: c,
|
|
3402
|
+
dragHandleIcon: f,
|
|
3403
|
+
theme: g,
|
|
3404
|
+
rowIdPrefix: v
|
|
3405
|
+
}
|
|
3406
|
+
),
|
|
3407
|
+
/* @__PURE__ */ z.jsx(
|
|
3408
|
+
Uo,
|
|
3409
|
+
{
|
|
3410
|
+
columns: b,
|
|
3411
|
+
data: n,
|
|
3412
|
+
rowKey: r,
|
|
3413
|
+
tdClass: i,
|
|
3414
|
+
tbodyClass: s,
|
|
3415
|
+
theme: g,
|
|
3416
|
+
rowIdPrefix: v
|
|
3417
|
+
}
|
|
3418
|
+
)
|
|
3419
|
+
]
|
|
3420
|
+
}
|
|
3421
|
+
) : /* @__PURE__ */ z.jsx("div", { className: oe.empty({ theme: g }), children: a || "No Data" })
|
|
3389
3422
|
}
|
|
3390
3423
|
);
|
|
3391
|
-
return
|
|
3424
|
+
return c ? /* @__PURE__ */ z.jsx(
|
|
3392
3425
|
So,
|
|
3393
3426
|
{
|
|
3394
|
-
sensors:
|
|
3427
|
+
sensors: I,
|
|
3395
3428
|
collisionDetection: Sr,
|
|
3396
|
-
onDragStart:
|
|
3397
|
-
onDragEnd:
|
|
3429
|
+
onDragStart: w,
|
|
3430
|
+
onDragEnd: D,
|
|
3398
3431
|
modifiers: [Vo],
|
|
3399
|
-
children: /* @__PURE__ */
|
|
3432
|
+
children: /* @__PURE__ */ z.jsx(
|
|
3400
3433
|
zo,
|
|
3401
3434
|
{
|
|
3402
|
-
items:
|
|
3435
|
+
items: N,
|
|
3403
3436
|
strategy: Mo,
|
|
3404
|
-
children:
|
|
3437
|
+
children: j()
|
|
3405
3438
|
}
|
|
3406
3439
|
)
|
|
3407
3440
|
}
|
|
3408
|
-
) :
|
|
3441
|
+
) : j();
|
|
3409
3442
|
};
|
|
3410
3443
|
export {
|
|
3411
3444
|
ei as P,
|
|
3412
|
-
|
|
3445
|
+
ne as S
|
|
3413
3446
|
};
|