bitz-react-admin-ui 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index.mjs +2 -2
- package/dist/_virtual/index2.mjs +2 -2
- package/dist/components/BitzTable/Store/utils/index.mjs +14 -30
- package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +36 -46
- package/dist/components/BitzTable/ToolBar/index.d.ts +0 -2
- package/dist/components/BitzTable/ToolBar/index.mjs +4 -6
- package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
- package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.d.ts +0 -10
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +0 -100
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.d.ts +0 -10
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +0 -103
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.d.ts +0 -13
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +0 -88
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.d.ts +0 -14
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +0 -261
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.d.ts +0 -6
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +0 -17
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.d.ts +0 -8
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.mjs +0 -13
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.d.ts +0 -10
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +0 -163
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.d.ts +0 -11
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +0 -44
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.d.ts +0 -2
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.mjs +0 -249
- package/dist/node_modules/.store/@ant-design_icons-svg@4.4.2/node_modules/@ant-design/icons-svg/es/asn/CheckCircleOutlined.mjs +0 -5
- package/dist/node_modules/.store/@ant-design_icons-svg@4.4.2/node_modules/@ant-design/icons-svg/es/asn/PicRightOutlined.mjs +0 -5
- package/dist/node_modules/.store/@ant-design_icons-svg@4.4.2/node_modules/@ant-design/icons-svg/es/asn/RedoOutlined.mjs +0 -5
- package/dist/node_modules/.store/@ant-design_icons-svg@4.4.2/node_modules/@ant-design/icons-svg/es/asn/SettingOutlined.mjs +0 -5
- package/dist/node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs +0 -15
- package/dist/node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/PicRightOutlined.mjs +0 -15
- package/dist/node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/RedoOutlined.mjs +0 -15
- package/dist/node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/SettingOutlined.mjs +0 -15
- package/dist/node_modules/.store/@dnd-kit_accessibility@3.1.0/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.mjs +0 -54
- package/dist/node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +0 -2179
- package/dist/node_modules/.store/@dnd-kit_modifiers@6.0.1/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs +0 -27
- package/dist/node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs +0 -367
- package/dist/node_modules/.store/@dnd-kit_utilities@3.2.2/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs +0 -235
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_DataView.mjs +0 -7
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_Promise.mjs +0 -7
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_Set.mjs +0 -7
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_WeakMap.mjs +0 -7
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_arrayEach.mjs +0 -8
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_arrayFilter.mjs +0 -10
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_baseAssign.mjs +0 -8
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_baseAssignIn.mjs +0 -8
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_baseClone.mjs +0 -65
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_baseGetAllKeys.mjs +0 -9
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_baseIsMap.mjs +0 -9
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_baseIsSet.mjs +0 -9
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_baseKeys.mjs +0 -14
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_baseSlice.mjs +0 -10
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_baseUnset.mjs +0 -10
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_cloneDataView.mjs +0 -8
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_cloneRegExp.mjs +0 -8
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_cloneSymbol.mjs +0 -8
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_copySymbols.mjs +0 -8
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_copySymbolsIn.mjs +0 -8
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_customOmitClone.mjs +0 -7
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_getAllKeys.mjs +0 -9
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_getAllKeysIn.mjs +0 -9
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_getSymbols.mjs +0 -11
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_getSymbolsIn.mjs +0 -13
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_getTag.mjs +0 -29
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_initCloneArray.mjs +0 -8
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_initCloneByTag.mjs +0 -42
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_nativeKeys.mjs +0 -6
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_parent.mjs +0 -8
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/isMap.mjs +0 -8
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/isSet.mjs +0 -8
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/keys.mjs +0 -9
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/last.mjs +0 -7
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs +0 -24
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/stubArray.mjs +0 -6
package/dist/node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs
DELETED
|
@@ -1,2179 +0,0 @@
|
|
|
1
|
-
import j, { createContext as Me, memo as un, useReducer as ot, useState as V, useRef as I, useMemo as L, useCallback as _, useEffect as E, useContext as he } from "react";
|
|
2
|
-
import { unstable_batchedUpdates as De, createPortal as dn } from "react-dom";
|
|
3
|
-
import { getWindow as G, useLatestValue as Re, useUniqueId as Ue, getEventCoordinates as Ze, add as fe, useIsomorphicLayoutEffect as se, useInterval as fn, usePrevious as et, useLazyMemo as Ae, subtract as Fe, canUseDOM as it, isHTMLElement as Xe, useNodeRef as Pe, isKeyboardEvent as Ft, findFirstFocusableNode as hn, isWindow as st, isNode as gn, isDocument as Pt, getOwnerDocument as ge, useEvent as $t, isSVGElement as vn } from "../../../../../@dnd-kit_utilities@3.2.2/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs";
|
|
4
|
-
import { useAnnouncement as pn, HiddenText as bn, LiveRegion as wn } from "../../../../../@dnd-kit_accessibility@3.1.0/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.mjs";
|
|
5
|
-
const Wt = /* @__PURE__ */ Me(null);
|
|
6
|
-
function yn(e) {
|
|
7
|
-
const t = he(Wt);
|
|
8
|
-
E(() => {
|
|
9
|
-
if (!t)
|
|
10
|
-
throw new Error("useDndMonitor must be used within a children of <DndContext>");
|
|
11
|
-
return t(e);
|
|
12
|
-
}, [e, t]);
|
|
13
|
-
}
|
|
14
|
-
function mn() {
|
|
15
|
-
const [e] = V(() => /* @__PURE__ */ new Set()), t = _((r) => (e.add(r), () => e.delete(r)), [e]);
|
|
16
|
-
return [_((r) => {
|
|
17
|
-
let {
|
|
18
|
-
type: i,
|
|
19
|
-
event: o
|
|
20
|
-
} = r;
|
|
21
|
-
e.forEach((s) => {
|
|
22
|
-
var l;
|
|
23
|
-
return (l = s[i]) == null ? void 0 : l.call(s, o);
|
|
24
|
-
});
|
|
25
|
-
}, [e]), t];
|
|
26
|
-
}
|
|
27
|
-
const Dn = {
|
|
28
|
-
draggable: `
|
|
29
|
-
To pick up a draggable item, press the space bar.
|
|
30
|
-
While dragging, use the arrow keys to move the item.
|
|
31
|
-
Press space again to drop the item in its new position, or press escape to cancel.
|
|
32
|
-
`
|
|
33
|
-
}, xn = {
|
|
34
|
-
onDragStart(e) {
|
|
35
|
-
let {
|
|
36
|
-
active: t
|
|
37
|
-
} = e;
|
|
38
|
-
return "Picked up draggable item " + t.id + ".";
|
|
39
|
-
},
|
|
40
|
-
onDragOver(e) {
|
|
41
|
-
let {
|
|
42
|
-
active: t,
|
|
43
|
-
over: n
|
|
44
|
-
} = e;
|
|
45
|
-
return n ? "Draggable item " + t.id + " was moved over droppable area " + n.id + "." : "Draggable item " + t.id + " is no longer over a droppable area.";
|
|
46
|
-
},
|
|
47
|
-
onDragEnd(e) {
|
|
48
|
-
let {
|
|
49
|
-
active: t,
|
|
50
|
-
over: n
|
|
51
|
-
} = e;
|
|
52
|
-
return n ? "Draggable item " + t.id + " was dropped over droppable area " + n.id : "Draggable item " + t.id + " was dropped.";
|
|
53
|
-
},
|
|
54
|
-
onDragCancel(e) {
|
|
55
|
-
let {
|
|
56
|
-
active: t
|
|
57
|
-
} = e;
|
|
58
|
-
return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
function Cn(e) {
|
|
62
|
-
let {
|
|
63
|
-
announcements: t = xn,
|
|
64
|
-
container: n,
|
|
65
|
-
hiddenTextDescribedById: r,
|
|
66
|
-
screenReaderInstructions: i = Dn
|
|
67
|
-
} = e;
|
|
68
|
-
const {
|
|
69
|
-
announce: o,
|
|
70
|
-
announcement: s
|
|
71
|
-
} = pn(), l = Ue("DndLiveRegion"), [a, u] = V(!1);
|
|
72
|
-
if (E(() => {
|
|
73
|
-
u(!0);
|
|
74
|
-
}, []), yn(L(() => ({
|
|
75
|
-
onDragStart(c) {
|
|
76
|
-
let {
|
|
77
|
-
active: g
|
|
78
|
-
} = c;
|
|
79
|
-
o(t.onDragStart({
|
|
80
|
-
active: g
|
|
81
|
-
}));
|
|
82
|
-
},
|
|
83
|
-
onDragMove(c) {
|
|
84
|
-
let {
|
|
85
|
-
active: g,
|
|
86
|
-
over: f
|
|
87
|
-
} = c;
|
|
88
|
-
t.onDragMove && o(t.onDragMove({
|
|
89
|
-
active: g,
|
|
90
|
-
over: f
|
|
91
|
-
}));
|
|
92
|
-
},
|
|
93
|
-
onDragOver(c) {
|
|
94
|
-
let {
|
|
95
|
-
active: g,
|
|
96
|
-
over: f
|
|
97
|
-
} = c;
|
|
98
|
-
o(t.onDragOver({
|
|
99
|
-
active: g,
|
|
100
|
-
over: f
|
|
101
|
-
}));
|
|
102
|
-
},
|
|
103
|
-
onDragEnd(c) {
|
|
104
|
-
let {
|
|
105
|
-
active: g,
|
|
106
|
-
over: f
|
|
107
|
-
} = c;
|
|
108
|
-
o(t.onDragEnd({
|
|
109
|
-
active: g,
|
|
110
|
-
over: f
|
|
111
|
-
}));
|
|
112
|
-
},
|
|
113
|
-
onDragCancel(c) {
|
|
114
|
-
let {
|
|
115
|
-
active: g,
|
|
116
|
-
over: f
|
|
117
|
-
} = c;
|
|
118
|
-
o(t.onDragCancel({
|
|
119
|
-
active: g,
|
|
120
|
-
over: f
|
|
121
|
-
}));
|
|
122
|
-
}
|
|
123
|
-
}), [o, t])), !a)
|
|
124
|
-
return null;
|
|
125
|
-
const d = j.createElement(j.Fragment, null, j.createElement(bn, {
|
|
126
|
-
id: r,
|
|
127
|
-
value: i.draggable
|
|
128
|
-
}), j.createElement(wn, {
|
|
129
|
-
id: l,
|
|
130
|
-
announcement: s
|
|
131
|
-
}));
|
|
132
|
-
return n ? dn(d, n) : d;
|
|
133
|
-
}
|
|
134
|
-
var R;
|
|
135
|
-
(function(e) {
|
|
136
|
-
e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
|
|
137
|
-
})(R || (R = {}));
|
|
138
|
-
function $e() {
|
|
139
|
-
}
|
|
140
|
-
const K = /* @__PURE__ */ Object.freeze({
|
|
141
|
-
x: 0,
|
|
142
|
-
y: 0
|
|
143
|
-
});
|
|
144
|
-
function Sn(e, t) {
|
|
145
|
-
let {
|
|
146
|
-
data: {
|
|
147
|
-
value: n
|
|
148
|
-
}
|
|
149
|
-
} = e, {
|
|
150
|
-
data: {
|
|
151
|
-
value: r
|
|
152
|
-
}
|
|
153
|
-
} = t;
|
|
154
|
-
return r - n;
|
|
155
|
-
}
|
|
156
|
-
function Rn(e, t) {
|
|
157
|
-
if (!e || e.length === 0)
|
|
158
|
-
return null;
|
|
159
|
-
const [n] = e;
|
|
160
|
-
return t ? n[t] : n;
|
|
161
|
-
}
|
|
162
|
-
function En(e, t) {
|
|
163
|
-
const n = Math.max(t.top, e.top), r = Math.max(t.left, e.left), i = Math.min(t.left + t.width, e.left + e.width), o = Math.min(t.top + t.height, e.top + e.height), s = i - r, l = o - n;
|
|
164
|
-
if (r < i && n < o) {
|
|
165
|
-
const a = t.width * t.height, u = e.width * e.height, d = s * l, c = d / (a + u - d);
|
|
166
|
-
return Number(c.toFixed(4));
|
|
167
|
-
}
|
|
168
|
-
return 0;
|
|
169
|
-
}
|
|
170
|
-
const Mn = (e) => {
|
|
171
|
-
let {
|
|
172
|
-
collisionRect: t,
|
|
173
|
-
droppableRects: n,
|
|
174
|
-
droppableContainers: r
|
|
175
|
-
} = e;
|
|
176
|
-
const i = [];
|
|
177
|
-
for (const o of r) {
|
|
178
|
-
const {
|
|
179
|
-
id: s
|
|
180
|
-
} = o, l = n.get(s);
|
|
181
|
-
if (l) {
|
|
182
|
-
const a = En(l, t);
|
|
183
|
-
a > 0 && i.push({
|
|
184
|
-
id: s,
|
|
185
|
-
data: {
|
|
186
|
-
droppableContainer: o,
|
|
187
|
-
value: a
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
return i.sort(Sn);
|
|
193
|
-
};
|
|
194
|
-
function An(e, t, n) {
|
|
195
|
-
return {
|
|
196
|
-
...e,
|
|
197
|
-
scaleX: t && n ? t.width / n.width : 1,
|
|
198
|
-
scaleY: t && n ? t.height / n.height : 1
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
function Ut(e, t) {
|
|
202
|
-
return e && t ? {
|
|
203
|
-
x: e.left - t.left,
|
|
204
|
-
y: e.top - t.top
|
|
205
|
-
} : K;
|
|
206
|
-
}
|
|
207
|
-
function On(e) {
|
|
208
|
-
return function(n) {
|
|
209
|
-
for (var r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), o = 1; o < r; o++)
|
|
210
|
-
i[o - 1] = arguments[o];
|
|
211
|
-
return i.reduce((s, l) => ({
|
|
212
|
-
...s,
|
|
213
|
-
top: s.top + e * l.y,
|
|
214
|
-
bottom: s.bottom + e * l.y,
|
|
215
|
-
left: s.left + e * l.x,
|
|
216
|
-
right: s.right + e * l.x
|
|
217
|
-
}), {
|
|
218
|
-
...n
|
|
219
|
-
});
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
const Nn = /* @__PURE__ */ On(1);
|
|
223
|
-
function Ln(e) {
|
|
224
|
-
if (e.startsWith("matrix3d(")) {
|
|
225
|
-
const t = e.slice(9, -1).split(/, /);
|
|
226
|
-
return {
|
|
227
|
-
x: +t[12],
|
|
228
|
-
y: +t[13],
|
|
229
|
-
scaleX: +t[0],
|
|
230
|
-
scaleY: +t[5]
|
|
231
|
-
};
|
|
232
|
-
} else if (e.startsWith("matrix(")) {
|
|
233
|
-
const t = e.slice(7, -1).split(/, /);
|
|
234
|
-
return {
|
|
235
|
-
x: +t[4],
|
|
236
|
-
y: +t[5],
|
|
237
|
-
scaleX: +t[0],
|
|
238
|
-
scaleY: +t[3]
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
return null;
|
|
242
|
-
}
|
|
243
|
-
function Tn(e, t, n) {
|
|
244
|
-
const r = Ln(t);
|
|
245
|
-
if (!r)
|
|
246
|
-
return e;
|
|
247
|
-
const {
|
|
248
|
-
scaleX: i,
|
|
249
|
-
scaleY: o,
|
|
250
|
-
x: s,
|
|
251
|
-
y: l
|
|
252
|
-
} = r, a = e.left - s - (1 - i) * parseFloat(n), u = e.top - l - (1 - o) * parseFloat(n.slice(n.indexOf(" ") + 1)), d = i ? e.width / i : e.width, c = o ? e.height / o : e.height;
|
|
253
|
-
return {
|
|
254
|
-
width: d,
|
|
255
|
-
height: c,
|
|
256
|
-
top: u,
|
|
257
|
-
right: a + d,
|
|
258
|
-
bottom: u + c,
|
|
259
|
-
left: a
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
const In = {
|
|
263
|
-
ignoreTransform: !1
|
|
264
|
-
};
|
|
265
|
-
function Oe(e, t) {
|
|
266
|
-
t === void 0 && (t = In);
|
|
267
|
-
let n = e.getBoundingClientRect();
|
|
268
|
-
if (t.ignoreTransform) {
|
|
269
|
-
const {
|
|
270
|
-
transform: u,
|
|
271
|
-
transformOrigin: d
|
|
272
|
-
} = G(e).getComputedStyle(e);
|
|
273
|
-
u && (n = Tn(n, u, d));
|
|
274
|
-
}
|
|
275
|
-
const {
|
|
276
|
-
top: r,
|
|
277
|
-
left: i,
|
|
278
|
-
width: o,
|
|
279
|
-
height: s,
|
|
280
|
-
bottom: l,
|
|
281
|
-
right: a
|
|
282
|
-
} = n;
|
|
283
|
-
return {
|
|
284
|
-
top: r,
|
|
285
|
-
left: i,
|
|
286
|
-
width: o,
|
|
287
|
-
height: s,
|
|
288
|
-
bottom: l,
|
|
289
|
-
right: a
|
|
290
|
-
};
|
|
291
|
-
}
|
|
292
|
-
function At(e) {
|
|
293
|
-
return Oe(e, {
|
|
294
|
-
ignoreTransform: !0
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
function kn(e) {
|
|
298
|
-
const t = e.innerWidth, n = e.innerHeight;
|
|
299
|
-
return {
|
|
300
|
-
top: 0,
|
|
301
|
-
left: 0,
|
|
302
|
-
right: t,
|
|
303
|
-
bottom: n,
|
|
304
|
-
width: t,
|
|
305
|
-
height: n
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
function zn(e, t) {
|
|
309
|
-
return t === void 0 && (t = G(e).getComputedStyle(e)), t.position === "fixed";
|
|
310
|
-
}
|
|
311
|
-
function Bn(e, t) {
|
|
312
|
-
t === void 0 && (t = G(e).getComputedStyle(e));
|
|
313
|
-
const n = /(auto|scroll|overlay)/;
|
|
314
|
-
return ["overflow", "overflowX", "overflowY"].some((i) => {
|
|
315
|
-
const o = t[i];
|
|
316
|
-
return typeof o == "string" ? n.test(o) : !1;
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
function lt(e, t) {
|
|
320
|
-
const n = [];
|
|
321
|
-
function r(i) {
|
|
322
|
-
if (t != null && n.length >= t || !i)
|
|
323
|
-
return n;
|
|
324
|
-
if (Pt(i) && i.scrollingElement != null && !n.includes(i.scrollingElement))
|
|
325
|
-
return n.push(i.scrollingElement), n;
|
|
326
|
-
if (!Xe(i) || vn(i) || n.includes(i))
|
|
327
|
-
return n;
|
|
328
|
-
const o = G(e).getComputedStyle(i);
|
|
329
|
-
return i !== e && Bn(i, o) && n.push(i), zn(i, o) ? n : r(i.parentNode);
|
|
330
|
-
}
|
|
331
|
-
return e ? r(e) : n;
|
|
332
|
-
}
|
|
333
|
-
function Xt(e) {
|
|
334
|
-
const [t] = lt(e, 1);
|
|
335
|
-
return t ?? null;
|
|
336
|
-
}
|
|
337
|
-
function Je(e) {
|
|
338
|
-
return !it || !e ? null : st(e) ? e : gn(e) ? Pt(e) || e === ge(e).scrollingElement ? window : Xe(e) ? e : null : null;
|
|
339
|
-
}
|
|
340
|
-
function _t(e) {
|
|
341
|
-
return st(e) ? e.scrollX : e.scrollLeft;
|
|
342
|
-
}
|
|
343
|
-
function Kt(e) {
|
|
344
|
-
return st(e) ? e.scrollY : e.scrollTop;
|
|
345
|
-
}
|
|
346
|
-
function tt(e) {
|
|
347
|
-
return {
|
|
348
|
-
x: _t(e),
|
|
349
|
-
y: Kt(e)
|
|
350
|
-
};
|
|
351
|
-
}
|
|
352
|
-
var O;
|
|
353
|
-
(function(e) {
|
|
354
|
-
e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
|
|
355
|
-
})(O || (O = {}));
|
|
356
|
-
function Yt(e) {
|
|
357
|
-
return !it || !e ? !1 : e === document.scrollingElement;
|
|
358
|
-
}
|
|
359
|
-
function jt(e) {
|
|
360
|
-
const t = {
|
|
361
|
-
x: 0,
|
|
362
|
-
y: 0
|
|
363
|
-
}, n = Yt(e) ? {
|
|
364
|
-
height: window.innerHeight,
|
|
365
|
-
width: window.innerWidth
|
|
366
|
-
} : {
|
|
367
|
-
height: e.clientHeight,
|
|
368
|
-
width: e.clientWidth
|
|
369
|
-
}, r = {
|
|
370
|
-
x: e.scrollWidth - n.width,
|
|
371
|
-
y: e.scrollHeight - n.height
|
|
372
|
-
}, i = e.scrollTop <= t.y, o = e.scrollLeft <= t.x, s = e.scrollTop >= r.y, l = e.scrollLeft >= r.x;
|
|
373
|
-
return {
|
|
374
|
-
isTop: i,
|
|
375
|
-
isLeft: o,
|
|
376
|
-
isBottom: s,
|
|
377
|
-
isRight: l,
|
|
378
|
-
maxScroll: r,
|
|
379
|
-
minScroll: t
|
|
380
|
-
};
|
|
381
|
-
}
|
|
382
|
-
const Fn = {
|
|
383
|
-
x: 0.2,
|
|
384
|
-
y: 0.2
|
|
385
|
-
};
|
|
386
|
-
function Pn(e, t, n, r, i) {
|
|
387
|
-
let {
|
|
388
|
-
top: o,
|
|
389
|
-
left: s,
|
|
390
|
-
right: l,
|
|
391
|
-
bottom: a
|
|
392
|
-
} = n;
|
|
393
|
-
r === void 0 && (r = 10), i === void 0 && (i = Fn);
|
|
394
|
-
const {
|
|
395
|
-
isTop: u,
|
|
396
|
-
isBottom: d,
|
|
397
|
-
isLeft: c,
|
|
398
|
-
isRight: g
|
|
399
|
-
} = jt(e), f = {
|
|
400
|
-
x: 0,
|
|
401
|
-
y: 0
|
|
402
|
-
}, C = {
|
|
403
|
-
x: 0,
|
|
404
|
-
y: 0
|
|
405
|
-
}, h = {
|
|
406
|
-
height: t.height * i.y,
|
|
407
|
-
width: t.width * i.x
|
|
408
|
-
};
|
|
409
|
-
return !u && o <= t.top + h.height ? (f.y = O.Backward, C.y = r * Math.abs((t.top + h.height - o) / h.height)) : !d && a >= t.bottom - h.height && (f.y = O.Forward, C.y = r * Math.abs((t.bottom - h.height - a) / h.height)), !g && l >= t.right - h.width ? (f.x = O.Forward, C.x = r * Math.abs((t.right - h.width - l) / h.width)) : !c && s <= t.left + h.width && (f.x = O.Backward, C.x = r * Math.abs((t.left + h.width - s) / h.width)), {
|
|
410
|
-
direction: f,
|
|
411
|
-
speed: C
|
|
412
|
-
};
|
|
413
|
-
}
|
|
414
|
-
function $n(e) {
|
|
415
|
-
if (e === document.scrollingElement) {
|
|
416
|
-
const {
|
|
417
|
-
innerWidth: o,
|
|
418
|
-
innerHeight: s
|
|
419
|
-
} = window;
|
|
420
|
-
return {
|
|
421
|
-
top: 0,
|
|
422
|
-
left: 0,
|
|
423
|
-
right: o,
|
|
424
|
-
bottom: s,
|
|
425
|
-
width: o,
|
|
426
|
-
height: s
|
|
427
|
-
};
|
|
428
|
-
}
|
|
429
|
-
const {
|
|
430
|
-
top: t,
|
|
431
|
-
left: n,
|
|
432
|
-
right: r,
|
|
433
|
-
bottom: i
|
|
434
|
-
} = e.getBoundingClientRect();
|
|
435
|
-
return {
|
|
436
|
-
top: t,
|
|
437
|
-
left: n,
|
|
438
|
-
right: r,
|
|
439
|
-
bottom: i,
|
|
440
|
-
width: e.clientWidth,
|
|
441
|
-
height: e.clientHeight
|
|
442
|
-
};
|
|
443
|
-
}
|
|
444
|
-
function Ht(e) {
|
|
445
|
-
return e.reduce((t, n) => fe(t, tt(n)), K);
|
|
446
|
-
}
|
|
447
|
-
function Wn(e) {
|
|
448
|
-
return e.reduce((t, n) => t + _t(n), 0);
|
|
449
|
-
}
|
|
450
|
-
function Un(e) {
|
|
451
|
-
return e.reduce((t, n) => t + Kt(n), 0);
|
|
452
|
-
}
|
|
453
|
-
function Xn(e, t) {
|
|
454
|
-
if (t === void 0 && (t = Oe), !e)
|
|
455
|
-
return;
|
|
456
|
-
const {
|
|
457
|
-
top: n,
|
|
458
|
-
left: r,
|
|
459
|
-
bottom: i,
|
|
460
|
-
right: o
|
|
461
|
-
} = t(e);
|
|
462
|
-
Xt(e) && (i <= 0 || o <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
|
|
463
|
-
block: "center",
|
|
464
|
-
inline: "center"
|
|
465
|
-
});
|
|
466
|
-
}
|
|
467
|
-
const _n = [["x", ["left", "right"], Wn], ["y", ["top", "bottom"], Un]];
|
|
468
|
-
class at {
|
|
469
|
-
constructor(t, n) {
|
|
470
|
-
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;
|
|
471
|
-
const r = lt(n), i = Ht(r);
|
|
472
|
-
this.rect = {
|
|
473
|
-
...t
|
|
474
|
-
}, this.width = t.width, this.height = t.height;
|
|
475
|
-
for (const [o, s, l] of _n)
|
|
476
|
-
for (const a of s)
|
|
477
|
-
Object.defineProperty(this, a, {
|
|
478
|
-
get: () => {
|
|
479
|
-
const u = l(r), d = i[o] - u;
|
|
480
|
-
return this.rect[a] + d;
|
|
481
|
-
},
|
|
482
|
-
enumerable: !0
|
|
483
|
-
});
|
|
484
|
-
Object.defineProperty(this, "rect", {
|
|
485
|
-
enumerable: !1
|
|
486
|
-
});
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
class xe {
|
|
490
|
-
constructor(t) {
|
|
491
|
-
this.target = void 0, this.listeners = [], this.removeAll = () => {
|
|
492
|
-
this.listeners.forEach((n) => {
|
|
493
|
-
var r;
|
|
494
|
-
return (r = this.target) == null ? void 0 : r.removeEventListener(...n);
|
|
495
|
-
});
|
|
496
|
-
}, this.target = t;
|
|
497
|
-
}
|
|
498
|
-
add(t, n, r) {
|
|
499
|
-
var i;
|
|
500
|
-
(i = this.target) == null || i.addEventListener(t, n, r), this.listeners.push([t, n, r]);
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
function Kn(e) {
|
|
504
|
-
const {
|
|
505
|
-
EventTarget: t
|
|
506
|
-
} = G(e);
|
|
507
|
-
return e instanceof t ? e : ge(e);
|
|
508
|
-
}
|
|
509
|
-
function Ve(e, t) {
|
|
510
|
-
const n = Math.abs(e.x), r = Math.abs(e.y);
|
|
511
|
-
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;
|
|
512
|
-
}
|
|
513
|
-
var P;
|
|
514
|
-
(function(e) {
|
|
515
|
-
e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
|
|
516
|
-
})(P || (P = {}));
|
|
517
|
-
function Ot(e) {
|
|
518
|
-
e.preventDefault();
|
|
519
|
-
}
|
|
520
|
-
function Yn(e) {
|
|
521
|
-
e.stopPropagation();
|
|
522
|
-
}
|
|
523
|
-
var m;
|
|
524
|
-
(function(e) {
|
|
525
|
-
e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter";
|
|
526
|
-
})(m || (m = {}));
|
|
527
|
-
const qt = {
|
|
528
|
-
start: [m.Space, m.Enter],
|
|
529
|
-
cancel: [m.Esc],
|
|
530
|
-
end: [m.Space, m.Enter]
|
|
531
|
-
}, jn = (e, t) => {
|
|
532
|
-
let {
|
|
533
|
-
currentCoordinates: n
|
|
534
|
-
} = t;
|
|
535
|
-
switch (e.code) {
|
|
536
|
-
case m.Right:
|
|
537
|
-
return {
|
|
538
|
-
...n,
|
|
539
|
-
x: n.x + 25
|
|
540
|
-
};
|
|
541
|
-
case m.Left:
|
|
542
|
-
return {
|
|
543
|
-
...n,
|
|
544
|
-
x: n.x - 25
|
|
545
|
-
};
|
|
546
|
-
case m.Down:
|
|
547
|
-
return {
|
|
548
|
-
...n,
|
|
549
|
-
y: n.y + 25
|
|
550
|
-
};
|
|
551
|
-
case m.Up:
|
|
552
|
-
return {
|
|
553
|
-
...n,
|
|
554
|
-
y: n.y - 25
|
|
555
|
-
};
|
|
556
|
-
}
|
|
557
|
-
};
|
|
558
|
-
class Jt {
|
|
559
|
-
constructor(t) {
|
|
560
|
-
this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = t;
|
|
561
|
-
const {
|
|
562
|
-
event: {
|
|
563
|
-
target: n
|
|
564
|
-
}
|
|
565
|
-
} = t;
|
|
566
|
-
this.props = t, this.listeners = new xe(ge(n)), this.windowListeners = new xe(G(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
|
|
567
|
-
}
|
|
568
|
-
attach() {
|
|
569
|
-
this.handleStart(), this.windowListeners.add(P.Resize, this.handleCancel), this.windowListeners.add(P.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(P.Keydown, this.handleKeyDown));
|
|
570
|
-
}
|
|
571
|
-
handleStart() {
|
|
572
|
-
const {
|
|
573
|
-
activeNode: t,
|
|
574
|
-
onStart: n
|
|
575
|
-
} = this.props, r = t.node.current;
|
|
576
|
-
r && Xn(r), n(K);
|
|
577
|
-
}
|
|
578
|
-
handleKeyDown(t) {
|
|
579
|
-
if (Ft(t)) {
|
|
580
|
-
const {
|
|
581
|
-
active: n,
|
|
582
|
-
context: r,
|
|
583
|
-
options: i
|
|
584
|
-
} = this.props, {
|
|
585
|
-
keyboardCodes: o = qt,
|
|
586
|
-
coordinateGetter: s = jn,
|
|
587
|
-
scrollBehavior: l = "smooth"
|
|
588
|
-
} = i, {
|
|
589
|
-
code: a
|
|
590
|
-
} = t;
|
|
591
|
-
if (o.end.includes(a)) {
|
|
592
|
-
this.handleEnd(t);
|
|
593
|
-
return;
|
|
594
|
-
}
|
|
595
|
-
if (o.cancel.includes(a)) {
|
|
596
|
-
this.handleCancel(t);
|
|
597
|
-
return;
|
|
598
|
-
}
|
|
599
|
-
const {
|
|
600
|
-
collisionRect: u
|
|
601
|
-
} = r.current, d = u ? {
|
|
602
|
-
x: u.left,
|
|
603
|
-
y: u.top
|
|
604
|
-
} : K;
|
|
605
|
-
this.referenceCoordinates || (this.referenceCoordinates = d);
|
|
606
|
-
const c = s(t, {
|
|
607
|
-
active: n,
|
|
608
|
-
context: r.current,
|
|
609
|
-
currentCoordinates: d
|
|
610
|
-
});
|
|
611
|
-
if (c) {
|
|
612
|
-
const g = Fe(c, d), f = {
|
|
613
|
-
x: 0,
|
|
614
|
-
y: 0
|
|
615
|
-
}, {
|
|
616
|
-
scrollableAncestors: C
|
|
617
|
-
} = r.current;
|
|
618
|
-
for (const h of C) {
|
|
619
|
-
const v = t.code, {
|
|
620
|
-
isTop: y,
|
|
621
|
-
isRight: D,
|
|
622
|
-
isLeft: b,
|
|
623
|
-
isBottom: T,
|
|
624
|
-
maxScroll: x,
|
|
625
|
-
minScroll: S
|
|
626
|
-
} = jt(h), p = $n(h), w = {
|
|
627
|
-
x: Math.min(v === m.Right ? p.right - p.width / 2 : p.right, Math.max(v === m.Right ? p.left : p.left + p.width / 2, c.x)),
|
|
628
|
-
y: Math.min(v === m.Down ? p.bottom - p.height / 2 : p.bottom, Math.max(v === m.Down ? p.top : p.top + p.height / 2, c.y))
|
|
629
|
-
}, M = v === m.Right && !D || v === m.Left && !b, k = v === m.Down && !T || v === m.Up && !y;
|
|
630
|
-
if (M && w.x !== c.x) {
|
|
631
|
-
const A = h.scrollLeft + g.x, H = v === m.Right && A <= x.x || v === m.Left && A >= S.x;
|
|
632
|
-
if (H && !g.y) {
|
|
633
|
-
h.scrollTo({
|
|
634
|
-
left: A,
|
|
635
|
-
behavior: l
|
|
636
|
-
});
|
|
637
|
-
return;
|
|
638
|
-
}
|
|
639
|
-
H ? f.x = h.scrollLeft - A : f.x = v === m.Right ? h.scrollLeft - x.x : h.scrollLeft - S.x, f.x && h.scrollBy({
|
|
640
|
-
left: -f.x,
|
|
641
|
-
behavior: l
|
|
642
|
-
});
|
|
643
|
-
break;
|
|
644
|
-
} else if (k && w.y !== c.y) {
|
|
645
|
-
const A = h.scrollTop + g.y, H = v === m.Down && A <= x.y || v === m.Up && A >= S.y;
|
|
646
|
-
if (H && !g.x) {
|
|
647
|
-
h.scrollTo({
|
|
648
|
-
top: A,
|
|
649
|
-
behavior: l
|
|
650
|
-
});
|
|
651
|
-
return;
|
|
652
|
-
}
|
|
653
|
-
H ? f.y = h.scrollTop - A : f.y = v === m.Down ? h.scrollTop - x.y : h.scrollTop - S.y, f.y && h.scrollBy({
|
|
654
|
-
top: -f.y,
|
|
655
|
-
behavior: l
|
|
656
|
-
});
|
|
657
|
-
break;
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
this.handleMove(t, fe(Fe(c, this.referenceCoordinates), f));
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
handleMove(t, n) {
|
|
665
|
-
const {
|
|
666
|
-
onMove: r
|
|
667
|
-
} = this.props;
|
|
668
|
-
t.preventDefault(), r(n);
|
|
669
|
-
}
|
|
670
|
-
handleEnd(t) {
|
|
671
|
-
const {
|
|
672
|
-
onEnd: n
|
|
673
|
-
} = this.props;
|
|
674
|
-
t.preventDefault(), this.detach(), n();
|
|
675
|
-
}
|
|
676
|
-
handleCancel(t) {
|
|
677
|
-
const {
|
|
678
|
-
onCancel: n
|
|
679
|
-
} = this.props;
|
|
680
|
-
t.preventDefault(), this.detach(), n();
|
|
681
|
-
}
|
|
682
|
-
detach() {
|
|
683
|
-
this.listeners.removeAll(), this.windowListeners.removeAll();
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
Jt.activators = [{
|
|
687
|
-
eventName: "onKeyDown",
|
|
688
|
-
handler: (e, t, n) => {
|
|
689
|
-
let {
|
|
690
|
-
keyboardCodes: r = qt,
|
|
691
|
-
onActivation: i
|
|
692
|
-
} = t, {
|
|
693
|
-
active: o
|
|
694
|
-
} = n;
|
|
695
|
-
const {
|
|
696
|
-
code: s
|
|
697
|
-
} = e.nativeEvent;
|
|
698
|
-
if (r.start.includes(s)) {
|
|
699
|
-
const l = o.activatorNode.current;
|
|
700
|
-
return l && e.target !== l ? !1 : (e.preventDefault(), i == null || i({
|
|
701
|
-
event: e.nativeEvent
|
|
702
|
-
}), !0);
|
|
703
|
-
}
|
|
704
|
-
return !1;
|
|
705
|
-
}
|
|
706
|
-
}];
|
|
707
|
-
function Nt(e) {
|
|
708
|
-
return !!(e && "distance" in e);
|
|
709
|
-
}
|
|
710
|
-
function Lt(e) {
|
|
711
|
-
return !!(e && "delay" in e);
|
|
712
|
-
}
|
|
713
|
-
class ct {
|
|
714
|
-
constructor(t, n, r) {
|
|
715
|
-
var i;
|
|
716
|
-
r === void 0 && (r = Kn(t.event.target)), this.props = void 0, this.events = void 0, this.autoScrollEnabled = !0, this.document = void 0, this.activated = !1, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = t, this.events = n;
|
|
717
|
-
const {
|
|
718
|
-
event: o
|
|
719
|
-
} = t, {
|
|
720
|
-
target: s
|
|
721
|
-
} = o;
|
|
722
|
-
this.props = t, this.events = n, this.document = ge(s), this.documentListeners = new xe(this.document), this.listeners = new xe(r), this.windowListeners = new xe(G(s)), this.initialCoordinates = (i = Ze(o)) != null ? i : K, 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();
|
|
723
|
-
}
|
|
724
|
-
attach() {
|
|
725
|
-
const {
|
|
726
|
-
events: t,
|
|
727
|
-
props: {
|
|
728
|
-
options: {
|
|
729
|
-
activationConstraint: n,
|
|
730
|
-
bypassActivationConstraint: r
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
} = this;
|
|
734
|
-
if (this.listeners.add(t.move.name, this.handleMove, {
|
|
735
|
-
passive: !1
|
|
736
|
-
}), this.listeners.add(t.end.name, this.handleEnd), this.windowListeners.add(P.Resize, this.handleCancel), this.windowListeners.add(P.DragStart, Ot), this.windowListeners.add(P.VisibilityChange, this.handleCancel), this.windowListeners.add(P.ContextMenu, Ot), this.documentListeners.add(P.Keydown, this.handleKeydown), n) {
|
|
737
|
-
if (r != null && r({
|
|
738
|
-
event: this.props.event,
|
|
739
|
-
activeNode: this.props.activeNode,
|
|
740
|
-
options: this.props.options
|
|
741
|
-
}))
|
|
742
|
-
return this.handleStart();
|
|
743
|
-
if (Lt(n)) {
|
|
744
|
-
this.timeoutId = setTimeout(this.handleStart, n.delay);
|
|
745
|
-
return;
|
|
746
|
-
}
|
|
747
|
-
if (Nt(n))
|
|
748
|
-
return;
|
|
749
|
-
}
|
|
750
|
-
this.handleStart();
|
|
751
|
-
}
|
|
752
|
-
detach() {
|
|
753
|
-
this.listeners.removeAll(), this.windowListeners.removeAll(), setTimeout(this.documentListeners.removeAll, 50), this.timeoutId !== null && (clearTimeout(this.timeoutId), this.timeoutId = null);
|
|
754
|
-
}
|
|
755
|
-
handleStart() {
|
|
756
|
-
const {
|
|
757
|
-
initialCoordinates: t
|
|
758
|
-
} = this, {
|
|
759
|
-
onStart: n
|
|
760
|
-
} = this.props;
|
|
761
|
-
t && (this.activated = !0, this.documentListeners.add(P.Click, Yn, {
|
|
762
|
-
capture: !0
|
|
763
|
-
}), this.removeTextSelection(), this.documentListeners.add(P.SelectionChange, this.removeTextSelection), n(t));
|
|
764
|
-
}
|
|
765
|
-
handleMove(t) {
|
|
766
|
-
var n;
|
|
767
|
-
const {
|
|
768
|
-
activated: r,
|
|
769
|
-
initialCoordinates: i,
|
|
770
|
-
props: o
|
|
771
|
-
} = this, {
|
|
772
|
-
onMove: s,
|
|
773
|
-
options: {
|
|
774
|
-
activationConstraint: l
|
|
775
|
-
}
|
|
776
|
-
} = o;
|
|
777
|
-
if (!i)
|
|
778
|
-
return;
|
|
779
|
-
const a = (n = Ze(t)) != null ? n : K, u = Fe(i, a);
|
|
780
|
-
if (!r && l) {
|
|
781
|
-
if (Nt(l)) {
|
|
782
|
-
if (l.tolerance != null && Ve(u, l.tolerance))
|
|
783
|
-
return this.handleCancel();
|
|
784
|
-
if (Ve(u, l.distance))
|
|
785
|
-
return this.handleStart();
|
|
786
|
-
}
|
|
787
|
-
return Lt(l) && Ve(u, l.tolerance) ? this.handleCancel() : void 0;
|
|
788
|
-
}
|
|
789
|
-
t.cancelable && t.preventDefault(), s(a);
|
|
790
|
-
}
|
|
791
|
-
handleEnd() {
|
|
792
|
-
const {
|
|
793
|
-
onEnd: t
|
|
794
|
-
} = this.props;
|
|
795
|
-
this.detach(), t();
|
|
796
|
-
}
|
|
797
|
-
handleCancel() {
|
|
798
|
-
const {
|
|
799
|
-
onCancel: t
|
|
800
|
-
} = this.props;
|
|
801
|
-
this.detach(), t();
|
|
802
|
-
}
|
|
803
|
-
handleKeydown(t) {
|
|
804
|
-
t.code === m.Esc && this.handleCancel();
|
|
805
|
-
}
|
|
806
|
-
removeTextSelection() {
|
|
807
|
-
var t;
|
|
808
|
-
(t = this.document.getSelection()) == null || t.removeAllRanges();
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
const Hn = {
|
|
812
|
-
move: {
|
|
813
|
-
name: "pointermove"
|
|
814
|
-
},
|
|
815
|
-
end: {
|
|
816
|
-
name: "pointerup"
|
|
817
|
-
}
|
|
818
|
-
};
|
|
819
|
-
class Vt extends ct {
|
|
820
|
-
constructor(t) {
|
|
821
|
-
const {
|
|
822
|
-
event: n
|
|
823
|
-
} = t, r = ge(n.target);
|
|
824
|
-
super(t, Hn, r);
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
Vt.activators = [{
|
|
828
|
-
eventName: "onPointerDown",
|
|
829
|
-
handler: (e, t) => {
|
|
830
|
-
let {
|
|
831
|
-
nativeEvent: n
|
|
832
|
-
} = e, {
|
|
833
|
-
onActivation: r
|
|
834
|
-
} = t;
|
|
835
|
-
return !n.isPrimary || n.button !== 0 ? !1 : (r == null || r({
|
|
836
|
-
event: n
|
|
837
|
-
}), !0);
|
|
838
|
-
}
|
|
839
|
-
}];
|
|
840
|
-
const qn = {
|
|
841
|
-
move: {
|
|
842
|
-
name: "mousemove"
|
|
843
|
-
},
|
|
844
|
-
end: {
|
|
845
|
-
name: "mouseup"
|
|
846
|
-
}
|
|
847
|
-
};
|
|
848
|
-
var nt;
|
|
849
|
-
(function(e) {
|
|
850
|
-
e[e.RightClick = 2] = "RightClick";
|
|
851
|
-
})(nt || (nt = {}));
|
|
852
|
-
class Jn extends ct {
|
|
853
|
-
constructor(t) {
|
|
854
|
-
super(t, qn, ge(t.event.target));
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
Jn.activators = [{
|
|
858
|
-
eventName: "onMouseDown",
|
|
859
|
-
handler: (e, t) => {
|
|
860
|
-
let {
|
|
861
|
-
nativeEvent: n
|
|
862
|
-
} = e, {
|
|
863
|
-
onActivation: r
|
|
864
|
-
} = t;
|
|
865
|
-
return n.button === nt.RightClick ? !1 : (r == null || r({
|
|
866
|
-
event: n
|
|
867
|
-
}), !0);
|
|
868
|
-
}
|
|
869
|
-
}];
|
|
870
|
-
const Ge = {
|
|
871
|
-
move: {
|
|
872
|
-
name: "touchmove"
|
|
873
|
-
},
|
|
874
|
-
end: {
|
|
875
|
-
name: "touchend"
|
|
876
|
-
}
|
|
877
|
-
};
|
|
878
|
-
class Vn extends ct {
|
|
879
|
-
constructor(t) {
|
|
880
|
-
super(t, Ge);
|
|
881
|
-
}
|
|
882
|
-
static setup() {
|
|
883
|
-
return window.addEventListener(Ge.move.name, t, {
|
|
884
|
-
capture: !1,
|
|
885
|
-
passive: !1
|
|
886
|
-
}), function() {
|
|
887
|
-
window.removeEventListener(Ge.move.name, t);
|
|
888
|
-
};
|
|
889
|
-
function t() {
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
}
|
|
893
|
-
Vn.activators = [{
|
|
894
|
-
eventName: "onTouchStart",
|
|
895
|
-
handler: (e, t) => {
|
|
896
|
-
let {
|
|
897
|
-
nativeEvent: n
|
|
898
|
-
} = e, {
|
|
899
|
-
onActivation: r
|
|
900
|
-
} = t;
|
|
901
|
-
const {
|
|
902
|
-
touches: i
|
|
903
|
-
} = n;
|
|
904
|
-
return i.length > 1 ? !1 : (r == null || r({
|
|
905
|
-
event: n
|
|
906
|
-
}), !0);
|
|
907
|
-
}
|
|
908
|
-
}];
|
|
909
|
-
var Ce;
|
|
910
|
-
(function(e) {
|
|
911
|
-
e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect";
|
|
912
|
-
})(Ce || (Ce = {}));
|
|
913
|
-
var We;
|
|
914
|
-
(function(e) {
|
|
915
|
-
e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
916
|
-
})(We || (We = {}));
|
|
917
|
-
function Gn(e) {
|
|
918
|
-
let {
|
|
919
|
-
acceleration: t,
|
|
920
|
-
activator: n = Ce.Pointer,
|
|
921
|
-
canScroll: r,
|
|
922
|
-
draggingRect: i,
|
|
923
|
-
enabled: o,
|
|
924
|
-
interval: s = 5,
|
|
925
|
-
order: l = We.TreeOrder,
|
|
926
|
-
pointerCoordinates: a,
|
|
927
|
-
scrollableAncestors: u,
|
|
928
|
-
scrollableAncestorRects: d,
|
|
929
|
-
delta: c,
|
|
930
|
-
threshold: g
|
|
931
|
-
} = e;
|
|
932
|
-
const f = Zn({
|
|
933
|
-
delta: c,
|
|
934
|
-
disabled: !o
|
|
935
|
-
}), [C, h] = fn(), v = I({
|
|
936
|
-
x: 0,
|
|
937
|
-
y: 0
|
|
938
|
-
}), y = I({
|
|
939
|
-
x: 0,
|
|
940
|
-
y: 0
|
|
941
|
-
}), D = L(() => {
|
|
942
|
-
switch (n) {
|
|
943
|
-
case Ce.Pointer:
|
|
944
|
-
return a ? {
|
|
945
|
-
top: a.y,
|
|
946
|
-
bottom: a.y,
|
|
947
|
-
left: a.x,
|
|
948
|
-
right: a.x
|
|
949
|
-
} : null;
|
|
950
|
-
case Ce.DraggableRect:
|
|
951
|
-
return i;
|
|
952
|
-
}
|
|
953
|
-
}, [n, i, a]), b = I(null), T = _(() => {
|
|
954
|
-
const S = b.current;
|
|
955
|
-
if (!S)
|
|
956
|
-
return;
|
|
957
|
-
const p = v.current.x * y.current.x, w = v.current.y * y.current.y;
|
|
958
|
-
S.scrollBy(p, w);
|
|
959
|
-
}, []), x = L(() => l === We.TreeOrder ? [...u].reverse() : u, [l, u]);
|
|
960
|
-
E(
|
|
961
|
-
() => {
|
|
962
|
-
if (!o || !u.length || !D) {
|
|
963
|
-
h();
|
|
964
|
-
return;
|
|
965
|
-
}
|
|
966
|
-
for (const S of x) {
|
|
967
|
-
if ((r == null ? void 0 : r(S)) === !1)
|
|
968
|
-
continue;
|
|
969
|
-
const p = u.indexOf(S), w = d[p];
|
|
970
|
-
if (!w)
|
|
971
|
-
continue;
|
|
972
|
-
const {
|
|
973
|
-
direction: M,
|
|
974
|
-
speed: k
|
|
975
|
-
} = Pn(S, w, D, t, g);
|
|
976
|
-
for (const A of ["x", "y"])
|
|
977
|
-
f[A][M[A]] || (k[A] = 0, M[A] = 0);
|
|
978
|
-
if (k.x > 0 || k.y > 0) {
|
|
979
|
-
h(), b.current = S, C(T, s), v.current = k, y.current = M;
|
|
980
|
-
return;
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
v.current = {
|
|
984
|
-
x: 0,
|
|
985
|
-
y: 0
|
|
986
|
-
}, y.current = {
|
|
987
|
-
x: 0,
|
|
988
|
-
y: 0
|
|
989
|
-
}, h();
|
|
990
|
-
},
|
|
991
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
992
|
-
[
|
|
993
|
-
t,
|
|
994
|
-
T,
|
|
995
|
-
r,
|
|
996
|
-
h,
|
|
997
|
-
o,
|
|
998
|
-
s,
|
|
999
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1000
|
-
JSON.stringify(D),
|
|
1001
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1002
|
-
JSON.stringify(f),
|
|
1003
|
-
C,
|
|
1004
|
-
u,
|
|
1005
|
-
x,
|
|
1006
|
-
d,
|
|
1007
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1008
|
-
JSON.stringify(g)
|
|
1009
|
-
]
|
|
1010
|
-
);
|
|
1011
|
-
}
|
|
1012
|
-
const Qn = {
|
|
1013
|
-
x: {
|
|
1014
|
-
[O.Backward]: !1,
|
|
1015
|
-
[O.Forward]: !1
|
|
1016
|
-
},
|
|
1017
|
-
y: {
|
|
1018
|
-
[O.Backward]: !1,
|
|
1019
|
-
[O.Forward]: !1
|
|
1020
|
-
}
|
|
1021
|
-
};
|
|
1022
|
-
function Zn(e) {
|
|
1023
|
-
let {
|
|
1024
|
-
delta: t,
|
|
1025
|
-
disabled: n
|
|
1026
|
-
} = e;
|
|
1027
|
-
const r = et(t);
|
|
1028
|
-
return Ae((i) => {
|
|
1029
|
-
if (n || !r || !i)
|
|
1030
|
-
return Qn;
|
|
1031
|
-
const o = {
|
|
1032
|
-
x: Math.sign(t.x - r.x),
|
|
1033
|
-
y: Math.sign(t.y - r.y)
|
|
1034
|
-
};
|
|
1035
|
-
return {
|
|
1036
|
-
x: {
|
|
1037
|
-
[O.Backward]: i.x[O.Backward] || o.x === -1,
|
|
1038
|
-
[O.Forward]: i.x[O.Forward] || o.x === 1
|
|
1039
|
-
},
|
|
1040
|
-
y: {
|
|
1041
|
-
[O.Backward]: i.y[O.Backward] || o.y === -1,
|
|
1042
|
-
[O.Forward]: i.y[O.Forward] || o.y === 1
|
|
1043
|
-
}
|
|
1044
|
-
};
|
|
1045
|
-
}, [n, t, r]);
|
|
1046
|
-
}
|
|
1047
|
-
function er(e, t) {
|
|
1048
|
-
const n = t !== null ? e.get(t) : void 0, r = n ? n.node.current : null;
|
|
1049
|
-
return Ae((i) => {
|
|
1050
|
-
var o;
|
|
1051
|
-
return t === null ? null : (o = r ?? i) != null ? o : null;
|
|
1052
|
-
}, [r, t]);
|
|
1053
|
-
}
|
|
1054
|
-
function tr(e, t) {
|
|
1055
|
-
return L(() => e.reduce((n, r) => {
|
|
1056
|
-
const {
|
|
1057
|
-
sensor: i
|
|
1058
|
-
} = r, o = i.activators.map((s) => ({
|
|
1059
|
-
eventName: s.eventName,
|
|
1060
|
-
handler: t(s.handler, r)
|
|
1061
|
-
}));
|
|
1062
|
-
return [...n, ...o];
|
|
1063
|
-
}, []), [e, t]);
|
|
1064
|
-
}
|
|
1065
|
-
var Ee;
|
|
1066
|
-
(function(e) {
|
|
1067
|
-
e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
|
|
1068
|
-
})(Ee || (Ee = {}));
|
|
1069
|
-
var rt;
|
|
1070
|
-
(function(e) {
|
|
1071
|
-
e.Optimized = "optimized";
|
|
1072
|
-
})(rt || (rt = {}));
|
|
1073
|
-
const Tt = /* @__PURE__ */ new Map();
|
|
1074
|
-
function nr(e, t) {
|
|
1075
|
-
let {
|
|
1076
|
-
dragging: n,
|
|
1077
|
-
dependencies: r,
|
|
1078
|
-
config: i
|
|
1079
|
-
} = t;
|
|
1080
|
-
const [o, s] = V(null), {
|
|
1081
|
-
frequency: l,
|
|
1082
|
-
measure: a,
|
|
1083
|
-
strategy: u
|
|
1084
|
-
} = i, d = I(e), c = v(), g = Re(c), f = _(function(y) {
|
|
1085
|
-
y === void 0 && (y = []), !g.current && s((D) => D === null ? y : D.concat(y.filter((b) => !D.includes(b))));
|
|
1086
|
-
}, [g]), C = I(null), h = Ae((y) => {
|
|
1087
|
-
if (c && !n)
|
|
1088
|
-
return Tt;
|
|
1089
|
-
if (!y || y === Tt || d.current !== e || o != null) {
|
|
1090
|
-
const D = /* @__PURE__ */ new Map();
|
|
1091
|
-
for (let b of e) {
|
|
1092
|
-
if (!b)
|
|
1093
|
-
continue;
|
|
1094
|
-
if (o && o.length > 0 && !o.includes(b.id) && b.rect.current) {
|
|
1095
|
-
D.set(b.id, b.rect.current);
|
|
1096
|
-
continue;
|
|
1097
|
-
}
|
|
1098
|
-
const T = b.node.current, x = T ? new at(a(T), T) : null;
|
|
1099
|
-
b.rect.current = x, x && D.set(b.id, x);
|
|
1100
|
-
}
|
|
1101
|
-
return D;
|
|
1102
|
-
}
|
|
1103
|
-
return y;
|
|
1104
|
-
}, [e, o, n, c, a]);
|
|
1105
|
-
return E(() => {
|
|
1106
|
-
d.current = e;
|
|
1107
|
-
}, [e]), E(
|
|
1108
|
-
() => {
|
|
1109
|
-
c || f();
|
|
1110
|
-
},
|
|
1111
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1112
|
-
[n, c]
|
|
1113
|
-
), E(
|
|
1114
|
-
() => {
|
|
1115
|
-
o && o.length > 0 && s(null);
|
|
1116
|
-
},
|
|
1117
|
-
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1118
|
-
[JSON.stringify(o)]
|
|
1119
|
-
), E(
|
|
1120
|
-
() => {
|
|
1121
|
-
c || typeof l != "number" || C.current !== null || (C.current = setTimeout(() => {
|
|
1122
|
-
f(), C.current = null;
|
|
1123
|
-
}, l));
|
|
1124
|
-
},
|
|
1125
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1126
|
-
[l, c, f, ...r]
|
|
1127
|
-
), {
|
|
1128
|
-
droppableRects: h,
|
|
1129
|
-
measureDroppableContainers: f,
|
|
1130
|
-
measuringScheduled: o != null
|
|
1131
|
-
};
|
|
1132
|
-
function v() {
|
|
1133
|
-
switch (u) {
|
|
1134
|
-
case Ee.Always:
|
|
1135
|
-
return !1;
|
|
1136
|
-
case Ee.BeforeDragging:
|
|
1137
|
-
return n;
|
|
1138
|
-
default:
|
|
1139
|
-
return !n;
|
|
1140
|
-
}
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
|
-
function Gt(e, t) {
|
|
1144
|
-
return Ae((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
|
|
1145
|
-
}
|
|
1146
|
-
function rr(e, t) {
|
|
1147
|
-
return Gt(e, t);
|
|
1148
|
-
}
|
|
1149
|
-
function or(e) {
|
|
1150
|
-
let {
|
|
1151
|
-
callback: t,
|
|
1152
|
-
disabled: n
|
|
1153
|
-
} = e;
|
|
1154
|
-
const r = $t(t), i = L(() => {
|
|
1155
|
-
if (n || typeof window > "u" || typeof window.MutationObserver > "u")
|
|
1156
|
-
return;
|
|
1157
|
-
const {
|
|
1158
|
-
MutationObserver: o
|
|
1159
|
-
} = window;
|
|
1160
|
-
return new o(r);
|
|
1161
|
-
}, [r, n]);
|
|
1162
|
-
return E(() => () => i == null ? void 0 : i.disconnect(), [i]), i;
|
|
1163
|
-
}
|
|
1164
|
-
function _e(e) {
|
|
1165
|
-
let {
|
|
1166
|
-
callback: t,
|
|
1167
|
-
disabled: n
|
|
1168
|
-
} = e;
|
|
1169
|
-
const r = $t(t), i = L(
|
|
1170
|
-
() => {
|
|
1171
|
-
if (n || typeof window > "u" || typeof window.ResizeObserver > "u")
|
|
1172
|
-
return;
|
|
1173
|
-
const {
|
|
1174
|
-
ResizeObserver: o
|
|
1175
|
-
} = window;
|
|
1176
|
-
return new o(r);
|
|
1177
|
-
},
|
|
1178
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1179
|
-
[n]
|
|
1180
|
-
);
|
|
1181
|
-
return E(() => () => i == null ? void 0 : i.disconnect(), [i]), i;
|
|
1182
|
-
}
|
|
1183
|
-
function ir(e) {
|
|
1184
|
-
return new at(Oe(e), e);
|
|
1185
|
-
}
|
|
1186
|
-
function It(e, t, n) {
|
|
1187
|
-
t === void 0 && (t = ir);
|
|
1188
|
-
const [r, i] = ot(l, null), o = or({
|
|
1189
|
-
callback(a) {
|
|
1190
|
-
if (e)
|
|
1191
|
-
for (const u of a) {
|
|
1192
|
-
const {
|
|
1193
|
-
type: d,
|
|
1194
|
-
target: c
|
|
1195
|
-
} = u;
|
|
1196
|
-
if (d === "childList" && c instanceof HTMLElement && c.contains(e)) {
|
|
1197
|
-
i();
|
|
1198
|
-
break;
|
|
1199
|
-
}
|
|
1200
|
-
}
|
|
1201
|
-
}
|
|
1202
|
-
}), s = _e({
|
|
1203
|
-
callback: i
|
|
1204
|
-
});
|
|
1205
|
-
return se(() => {
|
|
1206
|
-
i(), e ? (s == null || s.observe(e), o == null || o.observe(document.body, {
|
|
1207
|
-
childList: !0,
|
|
1208
|
-
subtree: !0
|
|
1209
|
-
})) : (s == null || s.disconnect(), o == null || o.disconnect());
|
|
1210
|
-
}, [e]), r;
|
|
1211
|
-
function l(a) {
|
|
1212
|
-
if (!e)
|
|
1213
|
-
return null;
|
|
1214
|
-
if (e.isConnected === !1) {
|
|
1215
|
-
var u;
|
|
1216
|
-
return (u = a ?? n) != null ? u : null;
|
|
1217
|
-
}
|
|
1218
|
-
const d = t(e);
|
|
1219
|
-
return JSON.stringify(a) === JSON.stringify(d) ? a : d;
|
|
1220
|
-
}
|
|
1221
|
-
}
|
|
1222
|
-
function sr(e) {
|
|
1223
|
-
const t = Gt(e);
|
|
1224
|
-
return Ut(e, t);
|
|
1225
|
-
}
|
|
1226
|
-
const kt = [];
|
|
1227
|
-
function lr(e) {
|
|
1228
|
-
const t = I(e), n = Ae((r) => e ? r && r !== kt && e && t.current && e.parentNode === t.current.parentNode ? r : lt(e) : kt, [e]);
|
|
1229
|
-
return E(() => {
|
|
1230
|
-
t.current = e;
|
|
1231
|
-
}, [e]), n;
|
|
1232
|
-
}
|
|
1233
|
-
function ar(e) {
|
|
1234
|
-
const [t, n] = V(null), r = I(e), i = _((o) => {
|
|
1235
|
-
const s = Je(o.target);
|
|
1236
|
-
s && n((l) => l ? (l.set(s, tt(s)), new Map(l)) : null);
|
|
1237
|
-
}, []);
|
|
1238
|
-
return E(() => {
|
|
1239
|
-
const o = r.current;
|
|
1240
|
-
if (e !== o) {
|
|
1241
|
-
s(o);
|
|
1242
|
-
const l = e.map((a) => {
|
|
1243
|
-
const u = Je(a);
|
|
1244
|
-
return u ? (u.addEventListener("scroll", i, {
|
|
1245
|
-
passive: !0
|
|
1246
|
-
}), [u, tt(u)]) : null;
|
|
1247
|
-
}).filter((a) => a != null);
|
|
1248
|
-
n(l.length ? new Map(l) : null), r.current = e;
|
|
1249
|
-
}
|
|
1250
|
-
return () => {
|
|
1251
|
-
s(e), s(o);
|
|
1252
|
-
};
|
|
1253
|
-
function s(l) {
|
|
1254
|
-
l.forEach((a) => {
|
|
1255
|
-
const u = Je(a);
|
|
1256
|
-
u == null || u.removeEventListener("scroll", i);
|
|
1257
|
-
});
|
|
1258
|
-
}
|
|
1259
|
-
}, [i, e]), L(() => e.length ? t ? Array.from(t.values()).reduce((o, s) => fe(o, s), K) : Ht(e) : K, [e, t]);
|
|
1260
|
-
}
|
|
1261
|
-
function zt(e, t) {
|
|
1262
|
-
t === void 0 && (t = []);
|
|
1263
|
-
const n = I(null);
|
|
1264
|
-
return E(
|
|
1265
|
-
() => {
|
|
1266
|
-
n.current = null;
|
|
1267
|
-
},
|
|
1268
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1269
|
-
t
|
|
1270
|
-
), E(() => {
|
|
1271
|
-
const r = e !== K;
|
|
1272
|
-
r && !n.current && (n.current = e), !r && n.current && (n.current = null);
|
|
1273
|
-
}, [e]), n.current ? Fe(e, n.current) : K;
|
|
1274
|
-
}
|
|
1275
|
-
function cr(e) {
|
|
1276
|
-
E(
|
|
1277
|
-
() => {
|
|
1278
|
-
if (!it)
|
|
1279
|
-
return;
|
|
1280
|
-
const t = e.map((n) => {
|
|
1281
|
-
let {
|
|
1282
|
-
sensor: r
|
|
1283
|
-
} = n;
|
|
1284
|
-
return r.setup == null ? void 0 : r.setup();
|
|
1285
|
-
});
|
|
1286
|
-
return () => {
|
|
1287
|
-
for (const n of t)
|
|
1288
|
-
n == null || n();
|
|
1289
|
-
};
|
|
1290
|
-
},
|
|
1291
|
-
// TO-DO: Sensors length could theoretically change which would not be a valid dependency
|
|
1292
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1293
|
-
e.map((t) => {
|
|
1294
|
-
let {
|
|
1295
|
-
sensor: n
|
|
1296
|
-
} = t;
|
|
1297
|
-
return n;
|
|
1298
|
-
})
|
|
1299
|
-
);
|
|
1300
|
-
}
|
|
1301
|
-
function ur(e, t) {
|
|
1302
|
-
return L(() => e.reduce((n, r) => {
|
|
1303
|
-
let {
|
|
1304
|
-
eventName: i,
|
|
1305
|
-
handler: o
|
|
1306
|
-
} = r;
|
|
1307
|
-
return n[i] = (s) => {
|
|
1308
|
-
o(s, t);
|
|
1309
|
-
}, n;
|
|
1310
|
-
}, {}), [e, t]);
|
|
1311
|
-
}
|
|
1312
|
-
function Qt(e) {
|
|
1313
|
-
return L(() => e ? kn(e) : null, [e]);
|
|
1314
|
-
}
|
|
1315
|
-
const Qe = [];
|
|
1316
|
-
function dr(e, t) {
|
|
1317
|
-
t === void 0 && (t = Oe);
|
|
1318
|
-
const [n] = e, r = Qt(n ? G(n) : null), [i, o] = ot(l, Qe), s = _e({
|
|
1319
|
-
callback: o
|
|
1320
|
-
});
|
|
1321
|
-
return e.length > 0 && i === Qe && o(), se(() => {
|
|
1322
|
-
e.length ? e.forEach((a) => s == null ? void 0 : s.observe(a)) : (s == null || s.disconnect(), o());
|
|
1323
|
-
}, [e]), i;
|
|
1324
|
-
function l() {
|
|
1325
|
-
return e.length ? e.map((a) => Yt(a) ? r : new at(t(a), a)) : Qe;
|
|
1326
|
-
}
|
|
1327
|
-
}
|
|
1328
|
-
function fr(e) {
|
|
1329
|
-
if (!e)
|
|
1330
|
-
return null;
|
|
1331
|
-
if (e.children.length > 1)
|
|
1332
|
-
return e;
|
|
1333
|
-
const t = e.children[0];
|
|
1334
|
-
return Xe(t) ? t : e;
|
|
1335
|
-
}
|
|
1336
|
-
function hr(e) {
|
|
1337
|
-
let {
|
|
1338
|
-
measure: t
|
|
1339
|
-
} = e;
|
|
1340
|
-
const [n, r] = V(null), i = _((u) => {
|
|
1341
|
-
for (const {
|
|
1342
|
-
target: d
|
|
1343
|
-
} of u)
|
|
1344
|
-
if (Xe(d)) {
|
|
1345
|
-
r((c) => {
|
|
1346
|
-
const g = t(d);
|
|
1347
|
-
return c ? {
|
|
1348
|
-
...c,
|
|
1349
|
-
width: g.width,
|
|
1350
|
-
height: g.height
|
|
1351
|
-
} : g;
|
|
1352
|
-
});
|
|
1353
|
-
break;
|
|
1354
|
-
}
|
|
1355
|
-
}, [t]), o = _e({
|
|
1356
|
-
callback: i
|
|
1357
|
-
}), s = _((u) => {
|
|
1358
|
-
const d = fr(u);
|
|
1359
|
-
o == null || o.disconnect(), d && (o == null || o.observe(d)), r(d ? t(d) : null);
|
|
1360
|
-
}, [t, o]), [l, a] = Pe(s);
|
|
1361
|
-
return L(() => ({
|
|
1362
|
-
nodeRef: l,
|
|
1363
|
-
rect: n,
|
|
1364
|
-
setRef: a
|
|
1365
|
-
}), [n, l, a]);
|
|
1366
|
-
}
|
|
1367
|
-
const gr = [{
|
|
1368
|
-
sensor: Vt,
|
|
1369
|
-
options: {}
|
|
1370
|
-
}, {
|
|
1371
|
-
sensor: Jt,
|
|
1372
|
-
options: {}
|
|
1373
|
-
}], vr = {
|
|
1374
|
-
current: {}
|
|
1375
|
-
}, Be = {
|
|
1376
|
-
draggable: {
|
|
1377
|
-
measure: At
|
|
1378
|
-
},
|
|
1379
|
-
droppable: {
|
|
1380
|
-
measure: At,
|
|
1381
|
-
strategy: Ee.WhileDragging,
|
|
1382
|
-
frequency: rt.Optimized
|
|
1383
|
-
},
|
|
1384
|
-
dragOverlay: {
|
|
1385
|
-
measure: Oe
|
|
1386
|
-
}
|
|
1387
|
-
};
|
|
1388
|
-
class Se extends Map {
|
|
1389
|
-
get(t) {
|
|
1390
|
-
var n;
|
|
1391
|
-
return t != null && (n = super.get(t)) != null ? n : void 0;
|
|
1392
|
-
}
|
|
1393
|
-
toArray() {
|
|
1394
|
-
return Array.from(this.values());
|
|
1395
|
-
}
|
|
1396
|
-
getEnabled() {
|
|
1397
|
-
return this.toArray().filter((t) => {
|
|
1398
|
-
let {
|
|
1399
|
-
disabled: n
|
|
1400
|
-
} = t;
|
|
1401
|
-
return !n;
|
|
1402
|
-
});
|
|
1403
|
-
}
|
|
1404
|
-
getNodeFor(t) {
|
|
1405
|
-
var n, r;
|
|
1406
|
-
return (n = (r = this.get(t)) == null ? void 0 : r.node.current) != null ? n : void 0;
|
|
1407
|
-
}
|
|
1408
|
-
}
|
|
1409
|
-
const pr = {
|
|
1410
|
-
activatorEvent: null,
|
|
1411
|
-
active: null,
|
|
1412
|
-
activeNode: null,
|
|
1413
|
-
activeNodeRect: null,
|
|
1414
|
-
collisions: null,
|
|
1415
|
-
containerNodeRect: null,
|
|
1416
|
-
draggableNodes: /* @__PURE__ */ new Map(),
|
|
1417
|
-
droppableRects: /* @__PURE__ */ new Map(),
|
|
1418
|
-
droppableContainers: /* @__PURE__ */ new Se(),
|
|
1419
|
-
over: null,
|
|
1420
|
-
dragOverlay: {
|
|
1421
|
-
nodeRef: {
|
|
1422
|
-
current: null
|
|
1423
|
-
},
|
|
1424
|
-
rect: null,
|
|
1425
|
-
setRef: $e
|
|
1426
|
-
},
|
|
1427
|
-
scrollableAncestors: [],
|
|
1428
|
-
scrollableAncestorRects: [],
|
|
1429
|
-
measuringConfiguration: Be,
|
|
1430
|
-
measureDroppableContainers: $e,
|
|
1431
|
-
windowRect: null,
|
|
1432
|
-
measuringScheduled: !1
|
|
1433
|
-
}, br = {
|
|
1434
|
-
activatorEvent: null,
|
|
1435
|
-
activators: [],
|
|
1436
|
-
active: null,
|
|
1437
|
-
activeNodeRect: null,
|
|
1438
|
-
ariaDescribedById: {
|
|
1439
|
-
draggable: ""
|
|
1440
|
-
},
|
|
1441
|
-
dispatch: $e,
|
|
1442
|
-
draggableNodes: /* @__PURE__ */ new Map(),
|
|
1443
|
-
over: null,
|
|
1444
|
-
measureDroppableContainers: $e
|
|
1445
|
-
}, Ke = /* @__PURE__ */ Me(br), Zt = /* @__PURE__ */ Me(pr);
|
|
1446
|
-
function wr() {
|
|
1447
|
-
return {
|
|
1448
|
-
draggable: {
|
|
1449
|
-
active: null,
|
|
1450
|
-
initialCoordinates: {
|
|
1451
|
-
x: 0,
|
|
1452
|
-
y: 0
|
|
1453
|
-
},
|
|
1454
|
-
nodes: /* @__PURE__ */ new Map(),
|
|
1455
|
-
translate: {
|
|
1456
|
-
x: 0,
|
|
1457
|
-
y: 0
|
|
1458
|
-
}
|
|
1459
|
-
},
|
|
1460
|
-
droppable: {
|
|
1461
|
-
containers: new Se()
|
|
1462
|
-
}
|
|
1463
|
-
};
|
|
1464
|
-
}
|
|
1465
|
-
function yr(e, t) {
|
|
1466
|
-
switch (t.type) {
|
|
1467
|
-
case R.DragStart:
|
|
1468
|
-
return {
|
|
1469
|
-
...e,
|
|
1470
|
-
draggable: {
|
|
1471
|
-
...e.draggable,
|
|
1472
|
-
initialCoordinates: t.initialCoordinates,
|
|
1473
|
-
active: t.active
|
|
1474
|
-
}
|
|
1475
|
-
};
|
|
1476
|
-
case R.DragMove:
|
|
1477
|
-
return e.draggable.active ? {
|
|
1478
|
-
...e,
|
|
1479
|
-
draggable: {
|
|
1480
|
-
...e.draggable,
|
|
1481
|
-
translate: {
|
|
1482
|
-
x: t.coordinates.x - e.draggable.initialCoordinates.x,
|
|
1483
|
-
y: t.coordinates.y - e.draggable.initialCoordinates.y
|
|
1484
|
-
}
|
|
1485
|
-
}
|
|
1486
|
-
} : e;
|
|
1487
|
-
case R.DragEnd:
|
|
1488
|
-
case R.DragCancel:
|
|
1489
|
-
return {
|
|
1490
|
-
...e,
|
|
1491
|
-
draggable: {
|
|
1492
|
-
...e.draggable,
|
|
1493
|
-
active: null,
|
|
1494
|
-
initialCoordinates: {
|
|
1495
|
-
x: 0,
|
|
1496
|
-
y: 0
|
|
1497
|
-
},
|
|
1498
|
-
translate: {
|
|
1499
|
-
x: 0,
|
|
1500
|
-
y: 0
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
};
|
|
1504
|
-
case R.RegisterDroppable: {
|
|
1505
|
-
const {
|
|
1506
|
-
element: n
|
|
1507
|
-
} = t, {
|
|
1508
|
-
id: r
|
|
1509
|
-
} = n, i = new Se(e.droppable.containers);
|
|
1510
|
-
return i.set(r, n), {
|
|
1511
|
-
...e,
|
|
1512
|
-
droppable: {
|
|
1513
|
-
...e.droppable,
|
|
1514
|
-
containers: i
|
|
1515
|
-
}
|
|
1516
|
-
};
|
|
1517
|
-
}
|
|
1518
|
-
case R.SetDroppableDisabled: {
|
|
1519
|
-
const {
|
|
1520
|
-
id: n,
|
|
1521
|
-
key: r,
|
|
1522
|
-
disabled: i
|
|
1523
|
-
} = t, o = e.droppable.containers.get(n);
|
|
1524
|
-
if (!o || r !== o.key)
|
|
1525
|
-
return e;
|
|
1526
|
-
const s = new Se(e.droppable.containers);
|
|
1527
|
-
return s.set(n, {
|
|
1528
|
-
...o,
|
|
1529
|
-
disabled: i
|
|
1530
|
-
}), {
|
|
1531
|
-
...e,
|
|
1532
|
-
droppable: {
|
|
1533
|
-
...e.droppable,
|
|
1534
|
-
containers: s
|
|
1535
|
-
}
|
|
1536
|
-
};
|
|
1537
|
-
}
|
|
1538
|
-
case R.UnregisterDroppable: {
|
|
1539
|
-
const {
|
|
1540
|
-
id: n,
|
|
1541
|
-
key: r
|
|
1542
|
-
} = t, i = e.droppable.containers.get(n);
|
|
1543
|
-
if (!i || r !== i.key)
|
|
1544
|
-
return e;
|
|
1545
|
-
const o = new Se(e.droppable.containers);
|
|
1546
|
-
return o.delete(n), {
|
|
1547
|
-
...e,
|
|
1548
|
-
droppable: {
|
|
1549
|
-
...e.droppable,
|
|
1550
|
-
containers: o
|
|
1551
|
-
}
|
|
1552
|
-
};
|
|
1553
|
-
}
|
|
1554
|
-
default:
|
|
1555
|
-
return e;
|
|
1556
|
-
}
|
|
1557
|
-
}
|
|
1558
|
-
function mr(e) {
|
|
1559
|
-
let {
|
|
1560
|
-
disabled: t
|
|
1561
|
-
} = e;
|
|
1562
|
-
const {
|
|
1563
|
-
active: n,
|
|
1564
|
-
activatorEvent: r,
|
|
1565
|
-
draggableNodes: i
|
|
1566
|
-
} = he(Ke), o = et(r), s = et(n == null ? void 0 : n.id);
|
|
1567
|
-
return E(() => {
|
|
1568
|
-
if (!t && !r && o && s != null) {
|
|
1569
|
-
if (!Ft(o) || document.activeElement === o.target)
|
|
1570
|
-
return;
|
|
1571
|
-
const l = i.get(s);
|
|
1572
|
-
if (!l)
|
|
1573
|
-
return;
|
|
1574
|
-
const {
|
|
1575
|
-
activatorNode: a,
|
|
1576
|
-
node: u
|
|
1577
|
-
} = l;
|
|
1578
|
-
if (!a.current && !u.current)
|
|
1579
|
-
return;
|
|
1580
|
-
requestAnimationFrame(() => {
|
|
1581
|
-
for (const d of [a.current, u.current]) {
|
|
1582
|
-
if (!d)
|
|
1583
|
-
continue;
|
|
1584
|
-
const c = hn(d);
|
|
1585
|
-
if (c) {
|
|
1586
|
-
c.focus();
|
|
1587
|
-
break;
|
|
1588
|
-
}
|
|
1589
|
-
}
|
|
1590
|
-
});
|
|
1591
|
-
}
|
|
1592
|
-
}, [r, t, i, s, o]), null;
|
|
1593
|
-
}
|
|
1594
|
-
function Dr(e, t) {
|
|
1595
|
-
let {
|
|
1596
|
-
transform: n,
|
|
1597
|
-
...r
|
|
1598
|
-
} = t;
|
|
1599
|
-
return e != null && e.length ? e.reduce((i, o) => o({
|
|
1600
|
-
transform: i,
|
|
1601
|
-
...r
|
|
1602
|
-
}), n) : n;
|
|
1603
|
-
}
|
|
1604
|
-
function xr(e) {
|
|
1605
|
-
return L(
|
|
1606
|
-
() => ({
|
|
1607
|
-
draggable: {
|
|
1608
|
-
...Be.draggable,
|
|
1609
|
-
...e == null ? void 0 : e.draggable
|
|
1610
|
-
},
|
|
1611
|
-
droppable: {
|
|
1612
|
-
...Be.droppable,
|
|
1613
|
-
...e == null ? void 0 : e.droppable
|
|
1614
|
-
},
|
|
1615
|
-
dragOverlay: {
|
|
1616
|
-
...Be.dragOverlay,
|
|
1617
|
-
...e == null ? void 0 : e.dragOverlay
|
|
1618
|
-
}
|
|
1619
|
-
}),
|
|
1620
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1621
|
-
[e == null ? void 0 : e.draggable, e == null ? void 0 : e.droppable, e == null ? void 0 : e.dragOverlay]
|
|
1622
|
-
);
|
|
1623
|
-
}
|
|
1624
|
-
function Cr(e) {
|
|
1625
|
-
let {
|
|
1626
|
-
activeNode: t,
|
|
1627
|
-
measure: n,
|
|
1628
|
-
initialRect: r,
|
|
1629
|
-
config: i = !0
|
|
1630
|
-
} = e;
|
|
1631
|
-
const o = I(!1), {
|
|
1632
|
-
x: s,
|
|
1633
|
-
y: l
|
|
1634
|
-
} = typeof i == "boolean" ? {
|
|
1635
|
-
x: i,
|
|
1636
|
-
y: i
|
|
1637
|
-
} : i;
|
|
1638
|
-
se(() => {
|
|
1639
|
-
if (!s && !l || !t) {
|
|
1640
|
-
o.current = !1;
|
|
1641
|
-
return;
|
|
1642
|
-
}
|
|
1643
|
-
if (o.current || !r)
|
|
1644
|
-
return;
|
|
1645
|
-
const u = t == null ? void 0 : t.node.current;
|
|
1646
|
-
if (!u || u.isConnected === !1)
|
|
1647
|
-
return;
|
|
1648
|
-
const d = n(u), c = Ut(d, r);
|
|
1649
|
-
if (s || (c.x = 0), l || (c.y = 0), o.current = !0, Math.abs(c.x) > 0 || Math.abs(c.y) > 0) {
|
|
1650
|
-
const g = Xt(u);
|
|
1651
|
-
g && g.scrollBy({
|
|
1652
|
-
top: c.y,
|
|
1653
|
-
left: c.x
|
|
1654
|
-
});
|
|
1655
|
-
}
|
|
1656
|
-
}, [t, s, l, r, n]);
|
|
1657
|
-
}
|
|
1658
|
-
const en = /* @__PURE__ */ Me({
|
|
1659
|
-
...K,
|
|
1660
|
-
scaleX: 1,
|
|
1661
|
-
scaleY: 1
|
|
1662
|
-
});
|
|
1663
|
-
var ne;
|
|
1664
|
-
(function(e) {
|
|
1665
|
-
e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
|
|
1666
|
-
})(ne || (ne = {}));
|
|
1667
|
-
const Tr = /* @__PURE__ */ un(function(t) {
|
|
1668
|
-
var n, r, i, o;
|
|
1669
|
-
let {
|
|
1670
|
-
id: s,
|
|
1671
|
-
accessibility: l,
|
|
1672
|
-
autoScroll: a = !0,
|
|
1673
|
-
children: u,
|
|
1674
|
-
sensors: d = gr,
|
|
1675
|
-
collisionDetection: c = Mn,
|
|
1676
|
-
measuring: g,
|
|
1677
|
-
modifiers: f,
|
|
1678
|
-
...C
|
|
1679
|
-
} = t;
|
|
1680
|
-
const h = ot(yr, void 0, wr), [v, y] = h, [D, b] = mn(), [T, x] = V(ne.Uninitialized), S = T === ne.Initialized, {
|
|
1681
|
-
draggable: {
|
|
1682
|
-
active: p,
|
|
1683
|
-
nodes: w,
|
|
1684
|
-
translate: M
|
|
1685
|
-
},
|
|
1686
|
-
droppable: {
|
|
1687
|
-
containers: k
|
|
1688
|
-
}
|
|
1689
|
-
} = v, A = p ? w.get(p) : null, H = I({
|
|
1690
|
-
initial: null,
|
|
1691
|
-
translated: null
|
|
1692
|
-
}), q = L(() => {
|
|
1693
|
-
var N;
|
|
1694
|
-
return p != null ? {
|
|
1695
|
-
id: p,
|
|
1696
|
-
// It's possible for the active node to unmount while dragging
|
|
1697
|
-
data: (N = A == null ? void 0 : A.data) != null ? N : vr,
|
|
1698
|
-
rect: H
|
|
1699
|
-
} : null;
|
|
1700
|
-
}, [p, A]), Q = I(null), [ut, dt] = V(null), [J, ft] = V(null), ve = Re(C, Object.values(C)), Ye = Ue("DndDescribedBy", s), ht = L(() => k.getEnabled(), [k]), re = xr(g), {
|
|
1701
|
-
droppableRects: le,
|
|
1702
|
-
measureDroppableContainers: Ne,
|
|
1703
|
-
measuringScheduled: gt
|
|
1704
|
-
} = nr(ht, {
|
|
1705
|
-
dragging: S,
|
|
1706
|
-
dependencies: [M.x, M.y],
|
|
1707
|
-
config: re.droppable
|
|
1708
|
-
}), $ = er(w, p), vt = L(() => J ? Ze(J) : null, [J]), pt = cn(), bt = rr($, re.draggable.measure);
|
|
1709
|
-
Cr({
|
|
1710
|
-
activeNode: p ? w.get(p) : null,
|
|
1711
|
-
config: pt.layoutShiftCompensation,
|
|
1712
|
-
initialRect: bt,
|
|
1713
|
-
measure: re.draggable.measure
|
|
1714
|
-
});
|
|
1715
|
-
const W = It($, re.draggable.measure, bt), je = It($ ? $.parentElement : null), oe = I({
|
|
1716
|
-
activatorEvent: null,
|
|
1717
|
-
active: null,
|
|
1718
|
-
activeNode: $,
|
|
1719
|
-
collisionRect: null,
|
|
1720
|
-
collisions: null,
|
|
1721
|
-
droppableRects: le,
|
|
1722
|
-
draggableNodes: w,
|
|
1723
|
-
draggingNode: null,
|
|
1724
|
-
draggingNodeRect: null,
|
|
1725
|
-
droppableContainers: k,
|
|
1726
|
-
over: null,
|
|
1727
|
-
scrollableAncestors: [],
|
|
1728
|
-
scrollAdjustedTranslate: null
|
|
1729
|
-
}), wt = k.getNodeFor((n = oe.current.over) == null ? void 0 : n.id), ie = hr({
|
|
1730
|
-
measure: re.dragOverlay.measure
|
|
1731
|
-
}), Le = (r = ie.nodeRef.current) != null ? r : $, ae = S ? (i = ie.rect) != null ? i : W : null, yt = !!(ie.nodeRef.current && ie.rect), mt = sr(yt ? null : W), He = Qt(Le ? G(Le) : null), Z = lr(S ? wt ?? $ : null), Te = dr(Z), Ie = Dr(f, {
|
|
1732
|
-
transform: {
|
|
1733
|
-
x: M.x - mt.x,
|
|
1734
|
-
y: M.y - mt.y,
|
|
1735
|
-
scaleX: 1,
|
|
1736
|
-
scaleY: 1
|
|
1737
|
-
},
|
|
1738
|
-
activatorEvent: J,
|
|
1739
|
-
active: q,
|
|
1740
|
-
activeNodeRect: W,
|
|
1741
|
-
containerNodeRect: je,
|
|
1742
|
-
draggingNodeRect: ae,
|
|
1743
|
-
over: oe.current.over,
|
|
1744
|
-
overlayNodeRect: ie.rect,
|
|
1745
|
-
scrollableAncestors: Z,
|
|
1746
|
-
scrollableAncestorRects: Te,
|
|
1747
|
-
windowRect: He
|
|
1748
|
-
}), Dt = vt ? fe(vt, M) : null, xt = ar(Z), tn = zt(xt), nn = zt(xt, [W]), ce = fe(Ie, tn), ue = ae ? Nn(ae, Ie) : null, pe = q && ue ? c({
|
|
1749
|
-
active: q,
|
|
1750
|
-
collisionRect: ue,
|
|
1751
|
-
droppableRects: le,
|
|
1752
|
-
droppableContainers: ht,
|
|
1753
|
-
pointerCoordinates: Dt
|
|
1754
|
-
}) : null, Ct = Rn(pe, "id"), [ee, St] = V(null), rn = yt ? Ie : fe(Ie, nn), on = An(rn, (o = ee == null ? void 0 : ee.rect) != null ? o : null, W), Rt = _(
|
|
1755
|
-
(N, z) => {
|
|
1756
|
-
let {
|
|
1757
|
-
sensor: B,
|
|
1758
|
-
options: te
|
|
1759
|
-
} = z;
|
|
1760
|
-
if (Q.current == null)
|
|
1761
|
-
return;
|
|
1762
|
-
const F = w.get(Q.current);
|
|
1763
|
-
if (!F)
|
|
1764
|
-
return;
|
|
1765
|
-
const U = N.nativeEvent, Y = new B({
|
|
1766
|
-
active: Q.current,
|
|
1767
|
-
activeNode: F,
|
|
1768
|
-
event: U,
|
|
1769
|
-
options: te,
|
|
1770
|
-
// Sensors need to be instantiated with refs for arguments that change over time
|
|
1771
|
-
// otherwise they are frozen in time with the stale arguments
|
|
1772
|
-
context: oe,
|
|
1773
|
-
onStart(X) {
|
|
1774
|
-
const be = Q.current;
|
|
1775
|
-
if (be == null)
|
|
1776
|
-
return;
|
|
1777
|
-
const we = w.get(be);
|
|
1778
|
-
if (!we)
|
|
1779
|
-
return;
|
|
1780
|
-
const {
|
|
1781
|
-
onDragStart: ke
|
|
1782
|
-
} = ve.current, ze = {
|
|
1783
|
-
active: {
|
|
1784
|
-
id: be,
|
|
1785
|
-
data: we.data,
|
|
1786
|
-
rect: H
|
|
1787
|
-
}
|
|
1788
|
-
};
|
|
1789
|
-
De(() => {
|
|
1790
|
-
ke == null || ke(ze), x(ne.Initializing), y({
|
|
1791
|
-
type: R.DragStart,
|
|
1792
|
-
initialCoordinates: X,
|
|
1793
|
-
active: be
|
|
1794
|
-
}), D({
|
|
1795
|
-
type: "onDragStart",
|
|
1796
|
-
event: ze
|
|
1797
|
-
});
|
|
1798
|
-
});
|
|
1799
|
-
},
|
|
1800
|
-
onMove(X) {
|
|
1801
|
-
y({
|
|
1802
|
-
type: R.DragMove,
|
|
1803
|
-
coordinates: X
|
|
1804
|
-
});
|
|
1805
|
-
},
|
|
1806
|
-
onEnd: de(R.DragEnd),
|
|
1807
|
-
onCancel: de(R.DragCancel)
|
|
1808
|
-
});
|
|
1809
|
-
De(() => {
|
|
1810
|
-
dt(Y), ft(N.nativeEvent);
|
|
1811
|
-
});
|
|
1812
|
-
function de(X) {
|
|
1813
|
-
return async function() {
|
|
1814
|
-
const {
|
|
1815
|
-
active: we,
|
|
1816
|
-
collisions: ke,
|
|
1817
|
-
over: ze,
|
|
1818
|
-
scrollAdjustedTranslate: Mt
|
|
1819
|
-
} = oe.current;
|
|
1820
|
-
let ye = null;
|
|
1821
|
-
if (we && Mt) {
|
|
1822
|
-
const {
|
|
1823
|
-
cancelDrop: me
|
|
1824
|
-
} = ve.current;
|
|
1825
|
-
ye = {
|
|
1826
|
-
activatorEvent: U,
|
|
1827
|
-
active: we,
|
|
1828
|
-
collisions: ke,
|
|
1829
|
-
delta: Mt,
|
|
1830
|
-
over: ze
|
|
1831
|
-
}, X === R.DragEnd && typeof me == "function" && await Promise.resolve(me(ye)) && (X = R.DragCancel);
|
|
1832
|
-
}
|
|
1833
|
-
Q.current = null, De(() => {
|
|
1834
|
-
y({
|
|
1835
|
-
type: X
|
|
1836
|
-
}), x(ne.Uninitialized), St(null), dt(null), ft(null);
|
|
1837
|
-
const me = X === R.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
1838
|
-
if (ye) {
|
|
1839
|
-
const qe = ve.current[me];
|
|
1840
|
-
qe == null || qe(ye), D({
|
|
1841
|
-
type: me,
|
|
1842
|
-
event: ye
|
|
1843
|
-
});
|
|
1844
|
-
}
|
|
1845
|
-
});
|
|
1846
|
-
};
|
|
1847
|
-
}
|
|
1848
|
-
},
|
|
1849
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1850
|
-
[w]
|
|
1851
|
-
), sn = _((N, z) => (B, te) => {
|
|
1852
|
-
const F = B.nativeEvent, U = w.get(te);
|
|
1853
|
-
if (
|
|
1854
|
-
// Another sensor is already instantiating
|
|
1855
|
-
Q.current !== null || // No active draggable
|
|
1856
|
-
!U || // Event has already been captured
|
|
1857
|
-
F.dndKit || F.defaultPrevented
|
|
1858
|
-
)
|
|
1859
|
-
return;
|
|
1860
|
-
const Y = {
|
|
1861
|
-
active: U
|
|
1862
|
-
};
|
|
1863
|
-
N(B, z.options, Y) === !0 && (F.dndKit = {
|
|
1864
|
-
capturedBy: z.sensor
|
|
1865
|
-
}, Q.current = te, Rt(B, z));
|
|
1866
|
-
}, [w, Rt]), Et = tr(d, sn);
|
|
1867
|
-
cr(d), se(() => {
|
|
1868
|
-
W && T === ne.Initializing && x(ne.Initialized);
|
|
1869
|
-
}, [W, T]), E(
|
|
1870
|
-
() => {
|
|
1871
|
-
const {
|
|
1872
|
-
onDragMove: N
|
|
1873
|
-
} = ve.current, {
|
|
1874
|
-
active: z,
|
|
1875
|
-
activatorEvent: B,
|
|
1876
|
-
collisions: te,
|
|
1877
|
-
over: F
|
|
1878
|
-
} = oe.current;
|
|
1879
|
-
if (!z || !B)
|
|
1880
|
-
return;
|
|
1881
|
-
const U = {
|
|
1882
|
-
active: z,
|
|
1883
|
-
activatorEvent: B,
|
|
1884
|
-
collisions: te,
|
|
1885
|
-
delta: {
|
|
1886
|
-
x: ce.x,
|
|
1887
|
-
y: ce.y
|
|
1888
|
-
},
|
|
1889
|
-
over: F
|
|
1890
|
-
};
|
|
1891
|
-
De(() => {
|
|
1892
|
-
N == null || N(U), D({
|
|
1893
|
-
type: "onDragMove",
|
|
1894
|
-
event: U
|
|
1895
|
-
});
|
|
1896
|
-
});
|
|
1897
|
-
},
|
|
1898
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1899
|
-
[ce.x, ce.y]
|
|
1900
|
-
), E(
|
|
1901
|
-
() => {
|
|
1902
|
-
const {
|
|
1903
|
-
active: N,
|
|
1904
|
-
activatorEvent: z,
|
|
1905
|
-
collisions: B,
|
|
1906
|
-
droppableContainers: te,
|
|
1907
|
-
scrollAdjustedTranslate: F
|
|
1908
|
-
} = oe.current;
|
|
1909
|
-
if (!N || Q.current == null || !z || !F)
|
|
1910
|
-
return;
|
|
1911
|
-
const {
|
|
1912
|
-
onDragOver: U
|
|
1913
|
-
} = ve.current, Y = te.get(Ct), de = Y && Y.rect.current ? {
|
|
1914
|
-
id: Y.id,
|
|
1915
|
-
rect: Y.rect.current,
|
|
1916
|
-
data: Y.data,
|
|
1917
|
-
disabled: Y.disabled
|
|
1918
|
-
} : null, X = {
|
|
1919
|
-
active: N,
|
|
1920
|
-
activatorEvent: z,
|
|
1921
|
-
collisions: B,
|
|
1922
|
-
delta: {
|
|
1923
|
-
x: F.x,
|
|
1924
|
-
y: F.y
|
|
1925
|
-
},
|
|
1926
|
-
over: de
|
|
1927
|
-
};
|
|
1928
|
-
De(() => {
|
|
1929
|
-
St(de), U == null || U(X), D({
|
|
1930
|
-
type: "onDragOver",
|
|
1931
|
-
event: X
|
|
1932
|
-
});
|
|
1933
|
-
});
|
|
1934
|
-
},
|
|
1935
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1936
|
-
[Ct]
|
|
1937
|
-
), se(() => {
|
|
1938
|
-
oe.current = {
|
|
1939
|
-
activatorEvent: J,
|
|
1940
|
-
active: q,
|
|
1941
|
-
activeNode: $,
|
|
1942
|
-
collisionRect: ue,
|
|
1943
|
-
collisions: pe,
|
|
1944
|
-
droppableRects: le,
|
|
1945
|
-
draggableNodes: w,
|
|
1946
|
-
draggingNode: Le,
|
|
1947
|
-
draggingNodeRect: ae,
|
|
1948
|
-
droppableContainers: k,
|
|
1949
|
-
over: ee,
|
|
1950
|
-
scrollableAncestors: Z,
|
|
1951
|
-
scrollAdjustedTranslate: ce
|
|
1952
|
-
}, H.current = {
|
|
1953
|
-
initial: ae,
|
|
1954
|
-
translated: ue
|
|
1955
|
-
};
|
|
1956
|
-
}, [q, $, pe, ue, w, Le, ae, le, k, ee, Z, ce]), Gn({
|
|
1957
|
-
...pt,
|
|
1958
|
-
delta: M,
|
|
1959
|
-
draggingRect: ue,
|
|
1960
|
-
pointerCoordinates: Dt,
|
|
1961
|
-
scrollableAncestors: Z,
|
|
1962
|
-
scrollableAncestorRects: Te
|
|
1963
|
-
});
|
|
1964
|
-
const ln = L(() => ({
|
|
1965
|
-
active: q,
|
|
1966
|
-
activeNode: $,
|
|
1967
|
-
activeNodeRect: W,
|
|
1968
|
-
activatorEvent: J,
|
|
1969
|
-
collisions: pe,
|
|
1970
|
-
containerNodeRect: je,
|
|
1971
|
-
dragOverlay: ie,
|
|
1972
|
-
draggableNodes: w,
|
|
1973
|
-
droppableContainers: k,
|
|
1974
|
-
droppableRects: le,
|
|
1975
|
-
over: ee,
|
|
1976
|
-
measureDroppableContainers: Ne,
|
|
1977
|
-
scrollableAncestors: Z,
|
|
1978
|
-
scrollableAncestorRects: Te,
|
|
1979
|
-
measuringConfiguration: re,
|
|
1980
|
-
measuringScheduled: gt,
|
|
1981
|
-
windowRect: He
|
|
1982
|
-
}), [q, $, W, J, pe, je, ie, w, k, le, ee, Ne, Z, Te, re, gt, He]), an = L(() => ({
|
|
1983
|
-
activatorEvent: J,
|
|
1984
|
-
activators: Et,
|
|
1985
|
-
active: q,
|
|
1986
|
-
activeNodeRect: W,
|
|
1987
|
-
ariaDescribedById: {
|
|
1988
|
-
draggable: Ye
|
|
1989
|
-
},
|
|
1990
|
-
dispatch: y,
|
|
1991
|
-
draggableNodes: w,
|
|
1992
|
-
over: ee,
|
|
1993
|
-
measureDroppableContainers: Ne
|
|
1994
|
-
}), [J, Et, q, W, y, Ye, w, ee, Ne]);
|
|
1995
|
-
return j.createElement(Wt.Provider, {
|
|
1996
|
-
value: b
|
|
1997
|
-
}, j.createElement(Ke.Provider, {
|
|
1998
|
-
value: an
|
|
1999
|
-
}, j.createElement(Zt.Provider, {
|
|
2000
|
-
value: ln
|
|
2001
|
-
}, j.createElement(en.Provider, {
|
|
2002
|
-
value: on
|
|
2003
|
-
}, u)), j.createElement(mr, {
|
|
2004
|
-
disabled: (l == null ? void 0 : l.restoreFocus) === !1
|
|
2005
|
-
})), j.createElement(Cn, {
|
|
2006
|
-
...l,
|
|
2007
|
-
hiddenTextDescribedById: Ye
|
|
2008
|
-
}));
|
|
2009
|
-
function cn() {
|
|
2010
|
-
const N = (ut == null ? void 0 : ut.autoScrollEnabled) === !1, z = typeof a == "object" ? a.enabled === !1 : a === !1, B = S && !N && !z;
|
|
2011
|
-
return typeof a == "object" ? {
|
|
2012
|
-
...a,
|
|
2013
|
-
enabled: B
|
|
2014
|
-
} : {
|
|
2015
|
-
enabled: B
|
|
2016
|
-
};
|
|
2017
|
-
}
|
|
2018
|
-
}), Sr = /* @__PURE__ */ Me(null), Bt = "button", Rr = "Droppable";
|
|
2019
|
-
function Ir(e) {
|
|
2020
|
-
let {
|
|
2021
|
-
id: t,
|
|
2022
|
-
data: n,
|
|
2023
|
-
disabled: r = !1,
|
|
2024
|
-
attributes: i
|
|
2025
|
-
} = e;
|
|
2026
|
-
const o = Ue(Rr), {
|
|
2027
|
-
activators: s,
|
|
2028
|
-
activatorEvent: l,
|
|
2029
|
-
active: a,
|
|
2030
|
-
activeNodeRect: u,
|
|
2031
|
-
ariaDescribedById: d,
|
|
2032
|
-
draggableNodes: c,
|
|
2033
|
-
over: g
|
|
2034
|
-
} = he(Ke), {
|
|
2035
|
-
role: f = Bt,
|
|
2036
|
-
roleDescription: C = "draggable",
|
|
2037
|
-
tabIndex: h = 0
|
|
2038
|
-
} = i ?? {}, v = (a == null ? void 0 : a.id) === t, y = he(v ? en : Sr), [D, b] = Pe(), [T, x] = Pe(), S = ur(s, t), p = Re(n);
|
|
2039
|
-
se(
|
|
2040
|
-
() => (c.set(t, {
|
|
2041
|
-
id: t,
|
|
2042
|
-
key: o,
|
|
2043
|
-
node: D,
|
|
2044
|
-
activatorNode: T,
|
|
2045
|
-
data: p
|
|
2046
|
-
}), () => {
|
|
2047
|
-
const M = c.get(t);
|
|
2048
|
-
M && M.key === o && c.delete(t);
|
|
2049
|
-
}),
|
|
2050
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2051
|
-
[c, t]
|
|
2052
|
-
);
|
|
2053
|
-
const w = L(() => ({
|
|
2054
|
-
role: f,
|
|
2055
|
-
tabIndex: h,
|
|
2056
|
-
"aria-disabled": r,
|
|
2057
|
-
"aria-pressed": v && f === Bt ? !0 : void 0,
|
|
2058
|
-
"aria-roledescription": C,
|
|
2059
|
-
"aria-describedby": d.draggable
|
|
2060
|
-
}), [r, f, h, v, C, d.draggable]);
|
|
2061
|
-
return {
|
|
2062
|
-
active: a,
|
|
2063
|
-
activatorEvent: l,
|
|
2064
|
-
activeNodeRect: u,
|
|
2065
|
-
attributes: w,
|
|
2066
|
-
isDragging: v,
|
|
2067
|
-
listeners: r ? void 0 : S,
|
|
2068
|
-
node: D,
|
|
2069
|
-
over: g,
|
|
2070
|
-
setNodeRef: b,
|
|
2071
|
-
setActivatorNodeRef: x,
|
|
2072
|
-
transform: y
|
|
2073
|
-
};
|
|
2074
|
-
}
|
|
2075
|
-
function kr() {
|
|
2076
|
-
return he(Zt);
|
|
2077
|
-
}
|
|
2078
|
-
const Er = "Droppable", Mr = {
|
|
2079
|
-
timeout: 25
|
|
2080
|
-
};
|
|
2081
|
-
function zr(e) {
|
|
2082
|
-
let {
|
|
2083
|
-
data: t,
|
|
2084
|
-
disabled: n = !1,
|
|
2085
|
-
id: r,
|
|
2086
|
-
resizeObserverConfig: i
|
|
2087
|
-
} = e;
|
|
2088
|
-
const o = Ue(Er), {
|
|
2089
|
-
active: s,
|
|
2090
|
-
dispatch: l,
|
|
2091
|
-
over: a,
|
|
2092
|
-
measureDroppableContainers: u
|
|
2093
|
-
} = he(Ke), d = I({
|
|
2094
|
-
disabled: n
|
|
2095
|
-
}), c = I(!1), g = I(null), f = I(null), {
|
|
2096
|
-
disabled: C,
|
|
2097
|
-
updateMeasurementsFor: h,
|
|
2098
|
-
timeout: v
|
|
2099
|
-
} = {
|
|
2100
|
-
...Mr,
|
|
2101
|
-
...i
|
|
2102
|
-
}, y = Re(h ?? r), D = _(
|
|
2103
|
-
() => {
|
|
2104
|
-
if (!c.current) {
|
|
2105
|
-
c.current = !0;
|
|
2106
|
-
return;
|
|
2107
|
-
}
|
|
2108
|
-
f.current != null && clearTimeout(f.current), f.current = setTimeout(() => {
|
|
2109
|
-
u(Array.isArray(y.current) ? y.current : [y.current]), f.current = null;
|
|
2110
|
-
}, v);
|
|
2111
|
-
},
|
|
2112
|
-
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2113
|
-
[v]
|
|
2114
|
-
), b = _e({
|
|
2115
|
-
callback: D,
|
|
2116
|
-
disabled: C || !s
|
|
2117
|
-
}), T = _((w, M) => {
|
|
2118
|
-
b && (M && (b.unobserve(M), c.current = !1), w && b.observe(w));
|
|
2119
|
-
}, [b]), [x, S] = Pe(T), p = Re(t);
|
|
2120
|
-
return E(() => {
|
|
2121
|
-
!b || !x.current || (b.disconnect(), c.current = !1, b.observe(x.current));
|
|
2122
|
-
}, [x, b]), se(
|
|
2123
|
-
() => (l({
|
|
2124
|
-
type: R.RegisterDroppable,
|
|
2125
|
-
element: {
|
|
2126
|
-
id: r,
|
|
2127
|
-
key: o,
|
|
2128
|
-
disabled: n,
|
|
2129
|
-
node: x,
|
|
2130
|
-
rect: g,
|
|
2131
|
-
data: p
|
|
2132
|
-
}
|
|
2133
|
-
}), () => l({
|
|
2134
|
-
type: R.UnregisterDroppable,
|
|
2135
|
-
key: o,
|
|
2136
|
-
id: r
|
|
2137
|
-
})),
|
|
2138
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2139
|
-
[r]
|
|
2140
|
-
), E(() => {
|
|
2141
|
-
n !== d.current.disabled && (l({
|
|
2142
|
-
type: R.SetDroppableDisabled,
|
|
2143
|
-
id: r,
|
|
2144
|
-
key: o,
|
|
2145
|
-
disabled: n
|
|
2146
|
-
}), d.current.disabled = n);
|
|
2147
|
-
}, [r, o, n, l]), {
|
|
2148
|
-
active: s,
|
|
2149
|
-
rect: g,
|
|
2150
|
-
isOver: (a == null ? void 0 : a.id) === r,
|
|
2151
|
-
node: x,
|
|
2152
|
-
over: a,
|
|
2153
|
-
setNodeRef: S
|
|
2154
|
-
};
|
|
2155
|
-
}
|
|
2156
|
-
export {
|
|
2157
|
-
Ce as AutoScrollActivator,
|
|
2158
|
-
Tr as DndContext,
|
|
2159
|
-
m as KeyboardCode,
|
|
2160
|
-
Jt as KeyboardSensor,
|
|
2161
|
-
rt as MeasuringFrequency,
|
|
2162
|
-
Ee as MeasuringStrategy,
|
|
2163
|
-
Jn as MouseSensor,
|
|
2164
|
-
Vt as PointerSensor,
|
|
2165
|
-
Vn as TouchSensor,
|
|
2166
|
-
We as TraversalOrder,
|
|
2167
|
-
Dr as applyModifiers,
|
|
2168
|
-
xn as defaultAnnouncements,
|
|
2169
|
-
K as defaultCoordinates,
|
|
2170
|
-
Dn as defaultScreenReaderInstructions,
|
|
2171
|
-
Oe as getClientRect,
|
|
2172
|
-
Rn as getFirstCollision,
|
|
2173
|
-
lt as getScrollableAncestors,
|
|
2174
|
-
Mn as rectIntersection,
|
|
2175
|
-
kr as useDndContext,
|
|
2176
|
-
yn as useDndMonitor,
|
|
2177
|
-
Ir as useDraggable,
|
|
2178
|
-
zr as useDroppable
|
|
2179
|
-
};
|