@middag-io/react 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/{ConditionTreeBlock-BGPYAImJ.js → ConditionTreeBlock-Cjp5jC4y.js} +39 -36
- package/dist-lib/{FormBuilderBlock-b_-QQaKn.js → FormBuilderBlock-CZLYP_2A.js} +773 -772
- package/dist-lib/{MarkdownContent-BgwUdgoN.js → MarkdownContent-BXOiFtrq.js} +1322 -1320
- package/dist-lib/{SentenceBuilderBlock-ClWjm0dX.js → SentenceBuilderBlock-CiUpfCrn.js} +39 -38
- package/dist-lib/app/providers/i18n-defaults.d.ts +12 -0
- package/dist-lib/app/providers/i18n-defaults.d.ts.map +1 -0
- package/dist-lib/app/providers/i18n.d.ts.map +1 -1
- package/dist-lib/base/blocks/ActionGridBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/ActivityTimelineBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/ConditionTreeBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/DenseTableBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/DetailPanelBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/EmptyStateBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/FormBuilderBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/FormPanelBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/SentenceBuilderBlock.d.ts.map +1 -1
- package/dist-lib/base/form/fields/MultiSelectField.d.ts.map +1 -1
- package/dist-lib/base/partials/ActionBar/index.d.ts.map +1 -1
- package/dist-lib/base/partials/ConfirmationDialog/index.d.ts.map +1 -1
- package/dist-lib/base/partials/DataTable/index.d.ts +1 -1
- package/dist-lib/base/partials/DataTable/index.d.ts.map +1 -1
- package/dist-lib/base/partials/FilterBar/index.d.ts.map +1 -1
- package/dist-lib/base/partials/FormSection/index.d.ts.map +1 -1
- package/dist-lib/base/partials/LogViewer/LogViewerToolbar.d.ts.map +1 -1
- package/dist-lib/base/partials/MarkdownContent/index.d.ts.map +1 -1
- package/dist-lib/base/partials/TimelineList/index.d.ts.map +1 -1
- package/dist-lib/base/shell/AdminShell.d.ts.map +1 -1
- package/dist-lib/base/shell/ProductShell.d.ts.map +1 -1
- package/dist-lib/base/shell/partials/CommandPalette.d.ts.map +1 -1
- package/dist-lib/base/shell/partials/HelpPanel.d.ts.map +1 -1
- package/dist-lib/base/shell/partials/InlineInspector.d.ts.map +1 -1
- package/dist-lib/base/shell/partials/NavErrorBoundary.d.ts.map +1 -1
- package/dist-lib/base/shell/partials/OverlayScreen.d.ts.map +1 -1
- package/dist-lib/base/shell/partials/PageActionButton.d.ts.map +1 -1
- package/dist-lib/base/shell/partials/PageHeader.d.ts.map +1 -1
- package/dist-lib/base/shell/partials/SidebarNav.d.ts.map +1 -1
- package/dist-lib/i18n-CWmqBtgM.js +126 -0
- package/dist-lib/index.d.ts +1 -0
- package/dist-lib/index.d.ts.map +1 -1
- package/dist-lib/middag-react.js +5015 -5037
- package/package.json +1 -1
- /package/dist-lib/{FlowEditorBlock-D3nx4re7.js → FlowEditorBlock-CHodeGBw.js} +0 -0
- /package/dist-lib/{dist-C3f2_wwS.js → dist-BDvVQ5m8.js} +0 -0
- /package/dist-lib/{index.min-BVLV21vp.js → index.min-Cno07_zY.js} +0 -0
|
@@ -1,87 +1,88 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { n as e } from "./i18n-CWmqBtgM.js";
|
|
2
|
+
import t, { cloneElement as n, createContext as r, forwardRef as i, memo as a, useCallback as o, useContext as s, useEffect as c, useLayoutEffect as l, useMemo as u, useReducer as d, useRef as f, useState as p } from "react";
|
|
3
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
4
|
+
import { createPortal as g, unstable_batchedUpdates as _ } from "react-dom";
|
|
4
5
|
//#region node_modules/@dnd-kit/utilities/dist/utilities.esm.js
|
|
5
|
-
function
|
|
6
|
+
function v() {
|
|
6
7
|
var e = [...arguments];
|
|
7
|
-
return
|
|
8
|
+
return u(() => (t) => {
|
|
8
9
|
e.forEach((e) => e(t));
|
|
9
10
|
}, e);
|
|
10
11
|
}
|
|
11
|
-
var
|
|
12
|
-
function
|
|
12
|
+
var y = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
|
|
13
|
+
function b(e) {
|
|
13
14
|
let t = Object.prototype.toString.call(e);
|
|
14
15
|
return t === "[object Window]" || t === "[object global]";
|
|
15
16
|
}
|
|
16
|
-
function b(e) {
|
|
17
|
-
return "nodeType" in e;
|
|
18
|
-
}
|
|
19
17
|
function x(e) {
|
|
20
|
-
return
|
|
18
|
+
return "nodeType" in e;
|
|
21
19
|
}
|
|
22
20
|
function S(e) {
|
|
23
|
-
|
|
24
|
-
return e instanceof t;
|
|
21
|
+
return e ? b(e) ? e : x(e) ? e.ownerDocument?.defaultView ?? window : window : window;
|
|
25
22
|
}
|
|
26
23
|
function C(e) {
|
|
27
|
-
|
|
24
|
+
let { Document: t } = S(e);
|
|
25
|
+
return e instanceof t;
|
|
28
26
|
}
|
|
29
27
|
function w(e) {
|
|
30
|
-
return e instanceof
|
|
28
|
+
return b(e) ? !1 : e instanceof S(e).HTMLElement;
|
|
31
29
|
}
|
|
32
30
|
function T(e) {
|
|
33
|
-
return e
|
|
31
|
+
return e instanceof S(e).SVGElement;
|
|
32
|
+
}
|
|
33
|
+
function E(e) {
|
|
34
|
+
return e ? b(e) ? e.document : x(e) ? C(e) ? e : w(e) || T(e) ? e.ownerDocument : document : document : document;
|
|
34
35
|
}
|
|
35
|
-
var
|
|
36
|
-
function
|
|
37
|
-
let t =
|
|
38
|
-
return
|
|
36
|
+
var D = y ? l : c;
|
|
37
|
+
function O(e) {
|
|
38
|
+
let t = f(e);
|
|
39
|
+
return D(() => {
|
|
39
40
|
t.current = e;
|
|
40
|
-
}),
|
|
41
|
+
}), o(function() {
|
|
41
42
|
var e = [...arguments];
|
|
42
43
|
return t.current == null ? void 0 : t.current(...e);
|
|
43
44
|
}, []);
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
-
let e =
|
|
47
|
-
return [
|
|
46
|
+
function k() {
|
|
47
|
+
let e = f(null);
|
|
48
|
+
return [o((t, n) => {
|
|
48
49
|
e.current = setInterval(t, n);
|
|
49
|
-
}, []),
|
|
50
|
+
}, []), o(() => {
|
|
50
51
|
e.current !== null && (clearInterval(e.current), e.current = null);
|
|
51
52
|
}, [])];
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
+
function ee(e, t) {
|
|
54
55
|
t === void 0 && (t = [e]);
|
|
55
|
-
let n =
|
|
56
|
-
return
|
|
56
|
+
let n = f(e);
|
|
57
|
+
return D(() => {
|
|
57
58
|
n.current !== e && (n.current = e);
|
|
58
59
|
}, t), n;
|
|
59
60
|
}
|
|
60
61
|
function A(e, t) {
|
|
61
|
-
let n =
|
|
62
|
-
return
|
|
62
|
+
let n = f();
|
|
63
|
+
return u(() => {
|
|
63
64
|
let t = e(n.current);
|
|
64
65
|
return n.current = t, t;
|
|
65
66
|
}, [...t]);
|
|
66
67
|
}
|
|
67
68
|
function j(e) {
|
|
68
|
-
let t =
|
|
69
|
-
return [n,
|
|
69
|
+
let t = O(e), n = f(null);
|
|
70
|
+
return [n, o((e) => {
|
|
70
71
|
e !== n.current && t?.(e, n.current), n.current = e;
|
|
71
72
|
}, [])];
|
|
72
73
|
}
|
|
73
|
-
function
|
|
74
|
-
let t =
|
|
75
|
-
return
|
|
74
|
+
function te(e) {
|
|
75
|
+
let t = f();
|
|
76
|
+
return c(() => {
|
|
76
77
|
t.current = e;
|
|
77
78
|
}, [e]), t.current;
|
|
78
79
|
}
|
|
79
|
-
var
|
|
80
|
-
function
|
|
81
|
-
return
|
|
80
|
+
var M = {};
|
|
81
|
+
function ne(e, t) {
|
|
82
|
+
return u(() => {
|
|
82
83
|
if (t) return t;
|
|
83
|
-
let n =
|
|
84
|
-
return
|
|
84
|
+
let n = M[e] == null ? 0 : M[e] + 1;
|
|
85
|
+
return M[e] = n, e + "-" + n;
|
|
85
86
|
}, [e, t]);
|
|
86
87
|
}
|
|
87
88
|
function N(e) {
|
|
@@ -96,22 +97,22 @@ function N(e) {
|
|
|
96
97
|
}, { ...t });
|
|
97
98
|
};
|
|
98
99
|
}
|
|
99
|
-
var
|
|
100
|
-
function
|
|
100
|
+
var re = /* @__PURE__ */ N(1), P = /* @__PURE__ */ N(-1);
|
|
101
|
+
function ie(e) {
|
|
101
102
|
return "clientX" in e && "clientY" in e;
|
|
102
103
|
}
|
|
103
|
-
function
|
|
104
|
+
function F(e) {
|
|
104
105
|
if (!e) return !1;
|
|
105
|
-
let { KeyboardEvent: t } =
|
|
106
|
+
let { KeyboardEvent: t } = S(e.target);
|
|
106
107
|
return t && e instanceof t;
|
|
107
108
|
}
|
|
108
|
-
function
|
|
109
|
+
function ae(e) {
|
|
109
110
|
if (!e) return !1;
|
|
110
|
-
let { TouchEvent: t } =
|
|
111
|
+
let { TouchEvent: t } = S(e.target);
|
|
111
112
|
return t && e instanceof t;
|
|
112
113
|
}
|
|
113
|
-
function
|
|
114
|
-
if (
|
|
114
|
+
function oe(e) {
|
|
115
|
+
if (ae(e)) {
|
|
115
116
|
if (e.touches && e.touches.length) {
|
|
116
117
|
let { clientX: t, clientY: n } = e.touches[0];
|
|
117
118
|
return {
|
|
@@ -126,7 +127,7 @@ function ae(e) {
|
|
|
126
127
|
};
|
|
127
128
|
}
|
|
128
129
|
}
|
|
129
|
-
return
|
|
130
|
+
return ie(e) ? {
|
|
130
131
|
x: e.clientX,
|
|
131
132
|
y: e.clientY
|
|
132
133
|
} : null;
|
|
@@ -149,23 +150,23 @@ var I = /* @__PURE__ */ Object.freeze({
|
|
|
149
150
|
let { property: t, duration: n, easing: r } = e;
|
|
150
151
|
return t + " " + n + "ms " + r;
|
|
151
152
|
} }
|
|
152
|
-
}),
|
|
153
|
-
function
|
|
154
|
-
return e.matches(
|
|
153
|
+
}), se = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
|
|
154
|
+
function L(e) {
|
|
155
|
+
return e.matches(se) ? e : e.querySelector(se);
|
|
155
156
|
}
|
|
156
157
|
//#endregion
|
|
157
158
|
//#region node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js
|
|
158
159
|
var R = { display: "none" };
|
|
159
|
-
function z(
|
|
160
|
-
let { id: n, value: r } =
|
|
161
|
-
return
|
|
160
|
+
function z(e) {
|
|
161
|
+
let { id: n, value: r } = e;
|
|
162
|
+
return t.createElement("div", {
|
|
162
163
|
id: n,
|
|
163
164
|
style: R
|
|
164
165
|
}, r);
|
|
165
166
|
}
|
|
166
|
-
function
|
|
167
|
-
let { id: n, announcement: r, ariaLiveType: i = "assertive" } =
|
|
168
|
-
return
|
|
167
|
+
function ce(e) {
|
|
168
|
+
let { id: n, announcement: r, ariaLiveType: i = "assertive" } = e;
|
|
169
|
+
return t.createElement("div", {
|
|
169
170
|
id: n,
|
|
170
171
|
style: {
|
|
171
172
|
position: "fixed",
|
|
@@ -186,10 +187,10 @@ function B(t) {
|
|
|
186
187
|
"aria-atomic": !0
|
|
187
188
|
}, r);
|
|
188
189
|
}
|
|
189
|
-
function
|
|
190
|
-
let [e, t] =
|
|
190
|
+
function B() {
|
|
191
|
+
let [e, t] = p("");
|
|
191
192
|
return {
|
|
192
|
-
announce:
|
|
193
|
+
announce: o((e) => {
|
|
193
194
|
e != null && t(e);
|
|
194
195
|
}, []),
|
|
195
196
|
announcement: e
|
|
@@ -197,22 +198,22 @@ function se() {
|
|
|
197
198
|
}
|
|
198
199
|
//#endregion
|
|
199
200
|
//#region node_modules/@dnd-kit/core/dist/core.esm.js
|
|
200
|
-
var
|
|
201
|
-
function
|
|
202
|
-
let t =
|
|
203
|
-
|
|
201
|
+
var V = /* @__PURE__ */ r(null);
|
|
202
|
+
function H(e) {
|
|
203
|
+
let t = s(V);
|
|
204
|
+
c(() => {
|
|
204
205
|
if (!t) throw Error("useDndMonitor must be used within a children of <DndContext>");
|
|
205
206
|
return t(e);
|
|
206
207
|
}, [e, t]);
|
|
207
208
|
}
|
|
208
|
-
function
|
|
209
|
-
let [e] =
|
|
210
|
-
return [
|
|
209
|
+
function le() {
|
|
210
|
+
let [e] = p(() => /* @__PURE__ */ new Set()), t = o((t) => (e.add(t), () => e.delete(t)), [e]);
|
|
211
|
+
return [o((t) => {
|
|
211
212
|
let { type: n, event: r } = t;
|
|
212
213
|
e.forEach((e) => e[n]?.call(e, r));
|
|
213
214
|
}, [e]), t];
|
|
214
215
|
}
|
|
215
|
-
var
|
|
216
|
+
var ue = { draggable: "\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n " }, de = {
|
|
216
217
|
onDragStart(e) {
|
|
217
218
|
let { active: t } = e;
|
|
218
219
|
return "Picked up draggable item " + t.id + ".";
|
|
@@ -230,11 +231,11 @@ var U = { draggable: "\n To pick up a draggable item, press the space bar.\n
|
|
|
230
231
|
return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
|
|
231
232
|
}
|
|
232
233
|
};
|
|
233
|
-
function
|
|
234
|
-
let { announcements: n =
|
|
235
|
-
if (
|
|
236
|
-
|
|
237
|
-
}, []),
|
|
234
|
+
function fe(e) {
|
|
235
|
+
let { announcements: n = de, container: r, hiddenTextDescribedById: i, screenReaderInstructions: a = ue } = e, { announce: o, announcement: s } = B(), l = ne("DndLiveRegion"), [d, f] = p(!1);
|
|
236
|
+
if (c(() => {
|
|
237
|
+
f(!0);
|
|
238
|
+
}, []), H(u(() => ({
|
|
238
239
|
onDragStart(e) {
|
|
239
240
|
let { active: t } = e;
|
|
240
241
|
o(n.onDragStart({ active: t }));
|
|
@@ -268,39 +269,39 @@ function ue(t) {
|
|
|
268
269
|
}));
|
|
269
270
|
}
|
|
270
271
|
}), [o, n])), !d) return null;
|
|
271
|
-
let m =
|
|
272
|
+
let m = t.createElement(t.Fragment, null, t.createElement(z, {
|
|
272
273
|
id: i,
|
|
273
274
|
value: a.draggable
|
|
274
|
-
}),
|
|
275
|
-
id:
|
|
276
|
-
announcement:
|
|
275
|
+
}), t.createElement(ce, {
|
|
276
|
+
id: l,
|
|
277
|
+
announcement: s
|
|
277
278
|
}));
|
|
278
|
-
return r ?
|
|
279
|
+
return r ? g(m, r) : m;
|
|
279
280
|
}
|
|
280
|
-
var
|
|
281
|
+
var U;
|
|
281
282
|
(function(e) {
|
|
282
283
|
e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
|
|
283
|
-
})(
|
|
284
|
-
function
|
|
285
|
-
function
|
|
286
|
-
return
|
|
284
|
+
})(U ||= {});
|
|
285
|
+
function pe() {}
|
|
286
|
+
function W(e, t) {
|
|
287
|
+
return u(() => ({
|
|
287
288
|
sensor: e,
|
|
288
289
|
options: t ?? {}
|
|
289
290
|
}), [e, t]);
|
|
290
291
|
}
|
|
291
|
-
function
|
|
292
|
+
function me() {
|
|
292
293
|
var e = [...arguments];
|
|
293
|
-
return
|
|
294
|
+
return u(() => [...e].filter((e) => e != null), [...e]);
|
|
294
295
|
}
|
|
295
|
-
var
|
|
296
|
+
var G = /* @__PURE__ */ Object.freeze({
|
|
296
297
|
x: 0,
|
|
297
298
|
y: 0
|
|
298
299
|
});
|
|
299
|
-
function
|
|
300
|
+
function he(e, t) {
|
|
300
301
|
return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
|
|
301
302
|
}
|
|
302
|
-
function
|
|
303
|
-
let n =
|
|
303
|
+
function K(e, t) {
|
|
304
|
+
let n = oe(e);
|
|
304
305
|
if (!n) return "0 0";
|
|
305
306
|
let r = {
|
|
306
307
|
x: (n.x - t.left) / t.width * 100,
|
|
@@ -308,15 +309,15 @@ function pe(e, t) {
|
|
|
308
309
|
};
|
|
309
310
|
return r.x + "% " + r.y + "%";
|
|
310
311
|
}
|
|
311
|
-
function
|
|
312
|
+
function ge(e, t) {
|
|
312
313
|
let { data: { value: n } } = e, { data: { value: r } } = t;
|
|
313
314
|
return n - r;
|
|
314
315
|
}
|
|
315
|
-
function
|
|
316
|
+
function _e(e, t) {
|
|
316
317
|
let { data: { value: n } } = e, { data: { value: r } } = t;
|
|
317
318
|
return r - n;
|
|
318
319
|
}
|
|
319
|
-
function
|
|
320
|
+
function ve(e) {
|
|
320
321
|
let { left: t, top: n, height: r, width: i } = e;
|
|
321
322
|
return [
|
|
322
323
|
{
|
|
@@ -337,23 +338,23 @@ function he(e) {
|
|
|
337
338
|
}
|
|
338
339
|
];
|
|
339
340
|
}
|
|
340
|
-
function
|
|
341
|
+
function ye(e, t) {
|
|
341
342
|
if (!e || e.length === 0) return null;
|
|
342
343
|
let [n] = e;
|
|
343
344
|
return t ? n[t] : n;
|
|
344
345
|
}
|
|
345
|
-
function
|
|
346
|
+
function be(e, t, n) {
|
|
346
347
|
return t === void 0 && (t = e.left), n === void 0 && (n = e.top), {
|
|
347
348
|
x: t + e.width * .5,
|
|
348
349
|
y: n + e.height * .5
|
|
349
350
|
};
|
|
350
351
|
}
|
|
351
|
-
var
|
|
352
|
-
let { collisionRect: t, droppableRects: n, droppableContainers: r } = e, i =
|
|
352
|
+
var xe = (e) => {
|
|
353
|
+
let { collisionRect: t, droppableRects: n, droppableContainers: r } = e, i = be(t, t.left, t.top), a = [];
|
|
353
354
|
for (let e of r) {
|
|
354
355
|
let { id: t } = e, r = n.get(t);
|
|
355
356
|
if (r) {
|
|
356
|
-
let n =
|
|
357
|
+
let n = he(be(r), i);
|
|
357
358
|
a.push({
|
|
358
359
|
id: t,
|
|
359
360
|
data: {
|
|
@@ -363,13 +364,13 @@ var ve = (e) => {
|
|
|
363
364
|
});
|
|
364
365
|
}
|
|
365
366
|
}
|
|
366
|
-
return a.sort(
|
|
367
|
-
},
|
|
368
|
-
let { collisionRect: t, droppableRects: n, droppableContainers: r } = e, i =
|
|
367
|
+
return a.sort(ge);
|
|
368
|
+
}, q = (e) => {
|
|
369
|
+
let { collisionRect: t, droppableRects: n, droppableContainers: r } = e, i = ve(t), a = [];
|
|
369
370
|
for (let e of r) {
|
|
370
371
|
let { id: t } = e, r = n.get(t);
|
|
371
372
|
if (r) {
|
|
372
|
-
let n =
|
|
373
|
+
let n = ve(r), o = i.reduce((e, t, r) => e + he(n[r], t), 0), s = Number((o / 4).toFixed(4));
|
|
373
374
|
a.push({
|
|
374
375
|
id: t,
|
|
375
376
|
data: {
|
|
@@ -379,9 +380,9 @@ var ve = (e) => {
|
|
|
379
380
|
});
|
|
380
381
|
}
|
|
381
382
|
}
|
|
382
|
-
return a.sort(
|
|
383
|
+
return a.sort(ge);
|
|
383
384
|
};
|
|
384
|
-
function
|
|
385
|
+
function Se(e, t) {
|
|
385
386
|
let 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), a = Math.min(t.top + t.height, e.top + e.height), o = i - r, s = a - n;
|
|
386
387
|
if (r < i && n < a) {
|
|
387
388
|
let n = t.width * t.height, r = e.width * e.height, i = o * s, a = i / (n + r - i);
|
|
@@ -389,12 +390,12 @@ function Y(e, t) {
|
|
|
389
390
|
}
|
|
390
391
|
return 0;
|
|
391
392
|
}
|
|
392
|
-
var
|
|
393
|
+
var Ce = (e) => {
|
|
393
394
|
let { collisionRect: t, droppableRects: n, droppableContainers: r } = e, i = [];
|
|
394
395
|
for (let e of r) {
|
|
395
396
|
let { id: r } = e, a = n.get(r);
|
|
396
397
|
if (a) {
|
|
397
|
-
let n =
|
|
398
|
+
let n = Se(a, t);
|
|
398
399
|
n > 0 && i.push({
|
|
399
400
|
id: r,
|
|
400
401
|
data: {
|
|
@@ -404,22 +405,22 @@ var be = (e) => {
|
|
|
404
405
|
});
|
|
405
406
|
}
|
|
406
407
|
}
|
|
407
|
-
return i.sort(
|
|
408
|
+
return i.sort(_e);
|
|
408
409
|
};
|
|
409
|
-
function
|
|
410
|
+
function we(e, t, n) {
|
|
410
411
|
return {
|
|
411
412
|
...e,
|
|
412
413
|
scaleX: t && n ? t.width / n.width : 1,
|
|
413
414
|
scaleY: t && n ? t.height / n.height : 1
|
|
414
415
|
};
|
|
415
416
|
}
|
|
416
|
-
function
|
|
417
|
+
function Te(e, t) {
|
|
417
418
|
return e && t ? {
|
|
418
419
|
x: e.left - t.left,
|
|
419
420
|
y: e.top - t.top
|
|
420
|
-
} :
|
|
421
|
+
} : G;
|
|
421
422
|
}
|
|
422
|
-
function
|
|
423
|
+
function Ee(e) {
|
|
423
424
|
return function(t) {
|
|
424
425
|
return [...arguments].slice(1).reduce((t, n) => ({
|
|
425
426
|
...t,
|
|
@@ -430,8 +431,8 @@ function Ce(e) {
|
|
|
430
431
|
}), { ...t });
|
|
431
432
|
};
|
|
432
433
|
}
|
|
433
|
-
var
|
|
434
|
-
function
|
|
434
|
+
var De = /* @__PURE__ */ Ee(1);
|
|
435
|
+
function Oe(e) {
|
|
435
436
|
if (e.startsWith("matrix3d(")) {
|
|
436
437
|
let t = e.slice(9, -1).split(/, /);
|
|
437
438
|
return {
|
|
@@ -451,8 +452,8 @@ function Te(e) {
|
|
|
451
452
|
}
|
|
452
453
|
return null;
|
|
453
454
|
}
|
|
454
|
-
function
|
|
455
|
-
let r =
|
|
455
|
+
function ke(e, t, n) {
|
|
456
|
+
let r = Oe(t);
|
|
456
457
|
if (!r) return e;
|
|
457
458
|
let { scaleX: i, scaleY: a, x: o, y: s } = r, c = e.left - o - (1 - i) * parseFloat(n), l = e.top - s - (1 - a) * parseFloat(n.slice(n.indexOf(" ") + 1)), u = i ? e.width / i : e.width, d = a ? e.height / a : e.height;
|
|
458
459
|
return {
|
|
@@ -464,13 +465,13 @@ function Ee(e, t, n) {
|
|
|
464
465
|
left: c
|
|
465
466
|
};
|
|
466
467
|
}
|
|
467
|
-
var
|
|
468
|
-
function
|
|
469
|
-
t === void 0 && (t =
|
|
468
|
+
var Ae = { ignoreTransform: !1 };
|
|
469
|
+
function J(e, t) {
|
|
470
|
+
t === void 0 && (t = Ae);
|
|
470
471
|
let n = e.getBoundingClientRect();
|
|
471
472
|
if (t.ignoreTransform) {
|
|
472
|
-
let { transform: t, transformOrigin: r } =
|
|
473
|
-
t && (n =
|
|
473
|
+
let { transform: t, transformOrigin: r } = S(e).getComputedStyle(e);
|
|
474
|
+
t && (n = ke(n, t, r));
|
|
474
475
|
}
|
|
475
476
|
let { top: r, left: i, width: a, height: o, bottom: s, right: c } = n;
|
|
476
477
|
return {
|
|
@@ -482,10 +483,10 @@ function Oe(e, t) {
|
|
|
482
483
|
right: c
|
|
483
484
|
};
|
|
484
485
|
}
|
|
485
|
-
function
|
|
486
|
-
return
|
|
486
|
+
function Y(e) {
|
|
487
|
+
return J(e, { ignoreTransform: !0 });
|
|
487
488
|
}
|
|
488
|
-
function
|
|
489
|
+
function je(e) {
|
|
489
490
|
let t = e.innerWidth, n = e.innerHeight;
|
|
490
491
|
return {
|
|
491
492
|
top: 0,
|
|
@@ -496,11 +497,11 @@ function Ae(e) {
|
|
|
496
497
|
height: n
|
|
497
498
|
};
|
|
498
499
|
}
|
|
499
|
-
function je(e, t) {
|
|
500
|
-
return t === void 0 && (t = x(e).getComputedStyle(e)), t.position === "fixed";
|
|
501
|
-
}
|
|
502
500
|
function Me(e, t) {
|
|
503
|
-
t === void 0 && (t =
|
|
501
|
+
return t === void 0 && (t = S(e).getComputedStyle(e)), t.position === "fixed";
|
|
502
|
+
}
|
|
503
|
+
function X(e, t) {
|
|
504
|
+
t === void 0 && (t = S(e).getComputedStyle(e));
|
|
504
505
|
let n = /(auto|scroll|overlay)/;
|
|
505
506
|
return [
|
|
506
507
|
"overflow",
|
|
@@ -511,48 +512,48 @@ function Me(e, t) {
|
|
|
511
512
|
return typeof r == "string" ? n.test(r) : !1;
|
|
512
513
|
});
|
|
513
514
|
}
|
|
514
|
-
function
|
|
515
|
+
function Ne(e, t) {
|
|
515
516
|
let n = [];
|
|
516
517
|
function r(i) {
|
|
517
518
|
if (t != null && n.length >= t || !i) return n;
|
|
518
|
-
if (
|
|
519
|
-
if (!
|
|
520
|
-
let a =
|
|
521
|
-
return i !== e &&
|
|
519
|
+
if (C(i) && i.scrollingElement != null && !n.includes(i.scrollingElement)) return n.push(i.scrollingElement), n;
|
|
520
|
+
if (!w(i) || T(i) || n.includes(i)) return n;
|
|
521
|
+
let a = S(e).getComputedStyle(i);
|
|
522
|
+
return i !== e && X(i, a) && n.push(i), Me(i, a) ? n : r(i.parentNode);
|
|
522
523
|
}
|
|
523
524
|
return e ? r(e) : n;
|
|
524
525
|
}
|
|
525
|
-
function Ne(e) {
|
|
526
|
-
let [t] = X(e, 1);
|
|
527
|
-
return t ?? null;
|
|
528
|
-
}
|
|
529
526
|
function Pe(e) {
|
|
530
|
-
|
|
527
|
+
let [t] = Ne(e, 1);
|
|
528
|
+
return t ?? null;
|
|
531
529
|
}
|
|
532
530
|
function Fe(e) {
|
|
533
|
-
return y(e) ? e.
|
|
531
|
+
return !y || !e ? null : b(e) ? e : x(e) ? C(e) || e === E(e).scrollingElement ? window : w(e) ? e : null : null;
|
|
534
532
|
}
|
|
535
533
|
function Ie(e) {
|
|
536
|
-
return
|
|
534
|
+
return b(e) ? e.scrollX : e.scrollLeft;
|
|
537
535
|
}
|
|
538
536
|
function Le(e) {
|
|
537
|
+
return b(e) ? e.scrollY : e.scrollTop;
|
|
538
|
+
}
|
|
539
|
+
function Re(e) {
|
|
539
540
|
return {
|
|
540
|
-
x:
|
|
541
|
-
y:
|
|
541
|
+
x: Ie(e),
|
|
542
|
+
y: Le(e)
|
|
542
543
|
};
|
|
543
544
|
}
|
|
544
545
|
var Z;
|
|
545
546
|
(function(e) {
|
|
546
547
|
e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
|
|
547
548
|
})(Z ||= {});
|
|
548
|
-
function Re(e) {
|
|
549
|
-
return !v || !e ? !1 : e === document.scrollingElement;
|
|
550
|
-
}
|
|
551
549
|
function ze(e) {
|
|
550
|
+
return !y || !e ? !1 : e === document.scrollingElement;
|
|
551
|
+
}
|
|
552
|
+
function Be(e) {
|
|
552
553
|
let t = {
|
|
553
554
|
x: 0,
|
|
554
555
|
y: 0
|
|
555
|
-
}, n =
|
|
556
|
+
}, n = ze(e) ? {
|
|
556
557
|
height: window.innerHeight,
|
|
557
558
|
width: window.innerWidth
|
|
558
559
|
} : {
|
|
@@ -571,14 +572,14 @@ function ze(e) {
|
|
|
571
572
|
minScroll: t
|
|
572
573
|
};
|
|
573
574
|
}
|
|
574
|
-
var
|
|
575
|
+
var Ve = {
|
|
575
576
|
x: .2,
|
|
576
577
|
y: .2
|
|
577
578
|
};
|
|
578
|
-
function
|
|
579
|
+
function He(e, t, n, r, i) {
|
|
579
580
|
let { top: a, left: o, right: s, bottom: c } = n;
|
|
580
|
-
r === void 0 && (r = 10), i === void 0 && (i =
|
|
581
|
-
let { isTop: l, isBottom: u, isLeft: d, isRight: f } =
|
|
581
|
+
r === void 0 && (r = 10), i === void 0 && (i = Ve);
|
|
582
|
+
let { isTop: l, isBottom: u, isLeft: d, isRight: f } = Be(e), p = {
|
|
582
583
|
x: 0,
|
|
583
584
|
y: 0
|
|
584
585
|
}, m = {
|
|
@@ -593,7 +594,7 @@ function Ve(e, t, n, r, i) {
|
|
|
593
594
|
speed: m
|
|
594
595
|
};
|
|
595
596
|
}
|
|
596
|
-
function
|
|
597
|
+
function Ue(e) {
|
|
597
598
|
if (e === document.scrollingElement) {
|
|
598
599
|
let { innerWidth: e, innerHeight: t } = window;
|
|
599
600
|
return {
|
|
@@ -615,37 +616,37 @@ function He(e) {
|
|
|
615
616
|
height: e.clientHeight
|
|
616
617
|
};
|
|
617
618
|
}
|
|
618
|
-
function Ue(e) {
|
|
619
|
-
return e.reduce((e, t) => ne(e, Le(t)), K);
|
|
620
|
-
}
|
|
621
619
|
function We(e) {
|
|
622
|
-
return e.reduce((e, t) => e
|
|
620
|
+
return e.reduce((e, t) => re(e, Re(t)), G);
|
|
623
621
|
}
|
|
624
622
|
function Ge(e) {
|
|
625
623
|
return e.reduce((e, t) => e + Ie(t), 0);
|
|
626
624
|
}
|
|
627
|
-
function Ke(e
|
|
628
|
-
|
|
625
|
+
function Ke(e) {
|
|
626
|
+
return e.reduce((e, t) => e + Le(t), 0);
|
|
627
|
+
}
|
|
628
|
+
function qe(e, t) {
|
|
629
|
+
if (t === void 0 && (t = J), !e) return;
|
|
629
630
|
let { top: n, left: r, bottom: i, right: a } = t(e);
|
|
630
|
-
|
|
631
|
+
Pe(e) && (i <= 0 || a <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
|
|
631
632
|
block: "center",
|
|
632
633
|
inline: "center"
|
|
633
634
|
});
|
|
634
635
|
}
|
|
635
|
-
var
|
|
636
|
+
var Je = [[
|
|
636
637
|
"x",
|
|
637
638
|
["left", "right"],
|
|
638
|
-
|
|
639
|
+
Ge
|
|
639
640
|
], [
|
|
640
641
|
"y",
|
|
641
642
|
["top", "bottom"],
|
|
642
|
-
|
|
643
|
-
]],
|
|
643
|
+
Ke
|
|
644
|
+
]], Ye = class {
|
|
644
645
|
constructor(e, t) {
|
|
645
646
|
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;
|
|
646
|
-
let n =
|
|
647
|
+
let n = Ne(t), r = We(n);
|
|
647
648
|
this.rect = { ...e }, this.width = e.width, this.height = e.height;
|
|
648
|
-
for (let [e, t, i] of
|
|
649
|
+
for (let [e, t, i] of Je) for (let a of t) Object.defineProperty(this, a, {
|
|
649
650
|
get: () => {
|
|
650
651
|
let t = i(n), o = r[e] - t;
|
|
651
652
|
return this.rect[a] + o;
|
|
@@ -654,7 +655,7 @@ var qe = [[
|
|
|
654
655
|
});
|
|
655
656
|
Object.defineProperty(this, "rect", { enumerable: !1 });
|
|
656
657
|
}
|
|
657
|
-
},
|
|
658
|
+
}, Xe = class {
|
|
658
659
|
constructor(e) {
|
|
659
660
|
this.target = void 0, this.listeners = [], this.removeAll = () => {
|
|
660
661
|
this.listeners.forEach((e) => this.target?.removeEventListener(...e));
|
|
@@ -669,11 +670,11 @@ var qe = [[
|
|
|
669
670
|
]);
|
|
670
671
|
}
|
|
671
672
|
};
|
|
672
|
-
function
|
|
673
|
-
let { EventTarget: t } =
|
|
674
|
-
return e instanceof t ? e :
|
|
673
|
+
function Ze(e) {
|
|
674
|
+
let { EventTarget: t } = S(e);
|
|
675
|
+
return e instanceof t ? e : E(e);
|
|
675
676
|
}
|
|
676
|
-
function
|
|
677
|
+
function Qe(e, t) {
|
|
677
678
|
let n = Math.abs(e.x), r = Math.abs(e.y);
|
|
678
679
|
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;
|
|
679
680
|
}
|
|
@@ -681,17 +682,17 @@ var Q;
|
|
|
681
682
|
(function(e) {
|
|
682
683
|
e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
|
|
683
684
|
})(Q ||= {});
|
|
684
|
-
function
|
|
685
|
+
function $e(e) {
|
|
685
686
|
e.preventDefault();
|
|
686
687
|
}
|
|
687
|
-
function
|
|
688
|
+
function et(e) {
|
|
688
689
|
e.stopPropagation();
|
|
689
690
|
}
|
|
690
691
|
var $;
|
|
691
692
|
(function(e) {
|
|
692
693
|
e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
|
|
693
694
|
})($ ||= {});
|
|
694
|
-
var
|
|
695
|
+
var tt = {
|
|
695
696
|
start: [$.Space, $.Enter],
|
|
696
697
|
cancel: [$.Esc],
|
|
697
698
|
end: [
|
|
@@ -699,7 +700,7 @@ var et = {
|
|
|
699
700
|
$.Enter,
|
|
700
701
|
$.Tab
|
|
701
702
|
]
|
|
702
|
-
},
|
|
703
|
+
}, nt = (e, t) => {
|
|
703
704
|
let { currentCoordinates: n } = t;
|
|
704
705
|
switch (e.code) {
|
|
705
706
|
case $.Right: return {
|
|
@@ -719,22 +720,22 @@ var et = {
|
|
|
719
720
|
y: n.y - 25
|
|
720
721
|
};
|
|
721
722
|
}
|
|
722
|
-
},
|
|
723
|
+
}, rt = class {
|
|
723
724
|
constructor(e) {
|
|
724
725
|
this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = e;
|
|
725
726
|
let { event: { target: t } } = e;
|
|
726
|
-
this.props = e, this.listeners = new
|
|
727
|
+
this.props = e, this.listeners = new Xe(E(t)), this.windowListeners = new Xe(S(t)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
|
|
727
728
|
}
|
|
728
729
|
attach() {
|
|
729
730
|
this.handleStart(), this.windowListeners.add(Q.Resize, this.handleCancel), this.windowListeners.add(Q.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(Q.Keydown, this.handleKeyDown));
|
|
730
731
|
}
|
|
731
732
|
handleStart() {
|
|
732
733
|
let { activeNode: e, onStart: t } = this.props, n = e.node.current;
|
|
733
|
-
n &&
|
|
734
|
+
n && qe(n), t(G);
|
|
734
735
|
}
|
|
735
736
|
handleKeyDown(e) {
|
|
736
|
-
if (
|
|
737
|
-
let { active: t, context: n, options: r } = this.props, { keyboardCodes: i =
|
|
737
|
+
if (F(e)) {
|
|
738
|
+
let { active: t, context: n, options: r } = this.props, { keyboardCodes: i = tt, coordinateGetter: a = nt, scrollBehavior: o = "smooth" } = r, { code: s } = e;
|
|
738
739
|
if (i.end.includes(s)) {
|
|
739
740
|
this.handleEnd(e);
|
|
740
741
|
return;
|
|
@@ -746,7 +747,7 @@ var et = {
|
|
|
746
747
|
let { collisionRect: c } = n.current, l = c ? {
|
|
747
748
|
x: c.left,
|
|
748
749
|
y: c.top
|
|
749
|
-
} :
|
|
750
|
+
} : G;
|
|
750
751
|
this.referenceCoordinates ||= l;
|
|
751
752
|
let u = a(e, {
|
|
752
753
|
active: t,
|
|
@@ -759,7 +760,7 @@ var et = {
|
|
|
759
760
|
y: 0
|
|
760
761
|
}, { scrollableAncestors: i } = n.current;
|
|
761
762
|
for (let n of i) {
|
|
762
|
-
let i = e.code, { isTop: a, isRight: s, isLeft: c, isBottom: l, maxScroll: d, minScroll: f } =
|
|
763
|
+
let i = e.code, { isTop: a, isRight: s, isLeft: c, isBottom: l, maxScroll: d, minScroll: f } = Be(n), p = Ue(n), m = {
|
|
763
764
|
x: Math.min(i === $.Right ? p.right - p.width / 2 : p.right, Math.max(i === $.Right ? p.left : p.left + p.width / 2, u.x)),
|
|
764
765
|
y: Math.min(i === $.Down ? p.bottom - p.height / 2 : p.bottom, Math.max(i === $.Down ? p.top : p.top + p.height / 2, u.y))
|
|
765
766
|
}, h = i === $.Right && !s || i === $.Left && !c, g = i === $.Down && !l || i === $.Up && !a;
|
|
@@ -793,7 +794,7 @@ var et = {
|
|
|
793
794
|
break;
|
|
794
795
|
}
|
|
795
796
|
}
|
|
796
|
-
this.handleMove(e,
|
|
797
|
+
this.handleMove(e, re(P(u, this.referenceCoordinates), r));
|
|
797
798
|
}
|
|
798
799
|
}
|
|
799
800
|
}
|
|
@@ -813,10 +814,10 @@ var et = {
|
|
|
813
814
|
this.listeners.removeAll(), this.windowListeners.removeAll();
|
|
814
815
|
}
|
|
815
816
|
};
|
|
816
|
-
|
|
817
|
+
rt.activators = [{
|
|
817
818
|
eventName: "onKeyDown",
|
|
818
819
|
handler: (e, t, n) => {
|
|
819
|
-
let { keyboardCodes: r =
|
|
820
|
+
let { keyboardCodes: r = tt, onActivation: i } = t, { active: a } = n, { code: o } = e.nativeEvent;
|
|
820
821
|
if (r.start.includes(o)) {
|
|
821
822
|
let t = a.activatorNode.current;
|
|
822
823
|
return t && e.target !== t ? !1 : (e.preventDefault(), i?.({ event: e.nativeEvent }), !0);
|
|
@@ -824,31 +825,31 @@ nt.activators = [{
|
|
|
824
825
|
return !1;
|
|
825
826
|
}
|
|
826
827
|
}];
|
|
827
|
-
function
|
|
828
|
+
function it(e) {
|
|
828
829
|
return !!(e && "distance" in e);
|
|
829
830
|
}
|
|
830
|
-
function
|
|
831
|
+
function at(e) {
|
|
831
832
|
return !!(e && "delay" in e);
|
|
832
833
|
}
|
|
833
|
-
var
|
|
834
|
+
var ot = class {
|
|
834
835
|
constructor(e, t, n) {
|
|
835
|
-
n === void 0 && (n =
|
|
836
|
+
n === void 0 && (n = Ze(e.event.target)), this.props = void 0, this.events = void 0, this.autoScrollEnabled = !0, this.document = void 0, this.activated = !1, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = e, this.events = t;
|
|
836
837
|
let { event: r } = e, { target: i } = r;
|
|
837
|
-
this.props = e, this.events = t, this.document =
|
|
838
|
+
this.props = e, this.events = t, this.document = E(i), this.documentListeners = new Xe(this.document), this.listeners = new Xe(n), this.windowListeners = new Xe(S(i)), this.initialCoordinates = oe(r) ?? G, 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();
|
|
838
839
|
}
|
|
839
840
|
attach() {
|
|
840
841
|
let { events: e, props: { options: { activationConstraint: t, bypassActivationConstraint: n } } } = this;
|
|
841
|
-
if (this.listeners.add(e.move.name, this.handleMove, { passive: !1 }), this.listeners.add(e.end.name, this.handleEnd), e.cancel && this.listeners.add(e.cancel.name, this.handleCancel), this.windowListeners.add(Q.Resize, this.handleCancel), this.windowListeners.add(Q.DragStart,
|
|
842
|
+
if (this.listeners.add(e.move.name, this.handleMove, { passive: !1 }), this.listeners.add(e.end.name, this.handleEnd), e.cancel && this.listeners.add(e.cancel.name, this.handleCancel), this.windowListeners.add(Q.Resize, this.handleCancel), this.windowListeners.add(Q.DragStart, $e), this.windowListeners.add(Q.VisibilityChange, this.handleCancel), this.windowListeners.add(Q.ContextMenu, $e), this.documentListeners.add(Q.Keydown, this.handleKeydown), t) {
|
|
842
843
|
if (n != null && n({
|
|
843
844
|
event: this.props.event,
|
|
844
845
|
activeNode: this.props.activeNode,
|
|
845
846
|
options: this.props.options
|
|
846
847
|
})) return this.handleStart();
|
|
847
|
-
if (
|
|
848
|
+
if (at(t)) {
|
|
848
849
|
this.timeoutId = setTimeout(this.handleStart, t.delay), this.handlePending(t);
|
|
849
850
|
return;
|
|
850
851
|
}
|
|
851
|
-
if (
|
|
852
|
+
if (it(t)) {
|
|
852
853
|
this.handlePending(t);
|
|
853
854
|
return;
|
|
854
855
|
}
|
|
@@ -864,18 +865,18 @@ var at = class {
|
|
|
864
865
|
}
|
|
865
866
|
handleStart() {
|
|
866
867
|
let { initialCoordinates: e } = this, { onStart: t } = this.props;
|
|
867
|
-
e && (this.activated = !0, this.documentListeners.add(Q.Click,
|
|
868
|
+
e && (this.activated = !0, this.documentListeners.add(Q.Click, et, { capture: !0 }), this.removeTextSelection(), this.documentListeners.add(Q.SelectionChange, this.removeTextSelection), t(e));
|
|
868
869
|
}
|
|
869
870
|
handleMove(e) {
|
|
870
871
|
let { activated: t, initialCoordinates: n, props: r } = this, { onMove: i, options: { activationConstraint: a } } = r;
|
|
871
872
|
if (!n) return;
|
|
872
|
-
let o =
|
|
873
|
+
let o = oe(e) ?? G, s = P(n, o);
|
|
873
874
|
if (!t && a) {
|
|
874
|
-
if (
|
|
875
|
-
if (a.tolerance != null &&
|
|
876
|
-
if (
|
|
875
|
+
if (it(a)) {
|
|
876
|
+
if (a.tolerance != null && Qe(s, a.tolerance)) return this.handleCancel();
|
|
877
|
+
if (Qe(s, a.distance)) return this.handleStart();
|
|
877
878
|
}
|
|
878
|
-
if (
|
|
879
|
+
if (at(a) && Qe(s, a.tolerance)) return this.handleCancel();
|
|
879
880
|
this.handlePending(a, s);
|
|
880
881
|
return;
|
|
881
882
|
}
|
|
@@ -896,107 +897,107 @@ var at = class {
|
|
|
896
897
|
var e;
|
|
897
898
|
(e = this.document.getSelection()) == null || e.removeAllRanges();
|
|
898
899
|
}
|
|
899
|
-
},
|
|
900
|
+
}, st = {
|
|
900
901
|
cancel: { name: "pointercancel" },
|
|
901
902
|
move: { name: "pointermove" },
|
|
902
903
|
end: { name: "pointerup" }
|
|
903
|
-
},
|
|
904
|
+
}, ct = class extends ot {
|
|
904
905
|
constructor(e) {
|
|
905
|
-
let { event: t } = e, n =
|
|
906
|
-
super(e,
|
|
906
|
+
let { event: t } = e, n = E(t.target);
|
|
907
|
+
super(e, st, n);
|
|
907
908
|
}
|
|
908
909
|
};
|
|
909
|
-
|
|
910
|
+
ct.activators = [{
|
|
910
911
|
eventName: "onPointerDown",
|
|
911
912
|
handler: (e, t) => {
|
|
912
913
|
let { nativeEvent: n } = e, { onActivation: r } = t;
|
|
913
914
|
return !n.isPrimary || n.button !== 0 ? !1 : (r?.({ event: n }), !0);
|
|
914
915
|
}
|
|
915
916
|
}];
|
|
916
|
-
var
|
|
917
|
+
var lt = {
|
|
917
918
|
move: { name: "mousemove" },
|
|
918
919
|
end: { name: "mouseup" }
|
|
919
|
-
},
|
|
920
|
+
}, ut;
|
|
920
921
|
(function(e) {
|
|
921
922
|
e[e.RightClick = 2] = "RightClick";
|
|
922
|
-
})(
|
|
923
|
-
var
|
|
923
|
+
})(ut ||= {});
|
|
924
|
+
var dt = class extends ot {
|
|
924
925
|
constructor(e) {
|
|
925
|
-
super(e,
|
|
926
|
+
super(e, lt, E(e.event.target));
|
|
926
927
|
}
|
|
927
928
|
};
|
|
928
|
-
|
|
929
|
+
dt.activators = [{
|
|
929
930
|
eventName: "onMouseDown",
|
|
930
931
|
handler: (e, t) => {
|
|
931
932
|
let { nativeEvent: n } = e, { onActivation: r } = t;
|
|
932
|
-
return n.button ===
|
|
933
|
+
return n.button === ut.RightClick ? !1 : (r?.({ event: n }), !0);
|
|
933
934
|
}
|
|
934
935
|
}];
|
|
935
|
-
var
|
|
936
|
+
var ft = {
|
|
936
937
|
cancel: { name: "touchcancel" },
|
|
937
938
|
move: { name: "touchmove" },
|
|
938
939
|
end: { name: "touchend" }
|
|
939
|
-
},
|
|
940
|
+
}, pt = class extends ot {
|
|
940
941
|
constructor(e) {
|
|
941
|
-
super(e,
|
|
942
|
+
super(e, ft);
|
|
942
943
|
}
|
|
943
944
|
static setup() {
|
|
944
|
-
return window.addEventListener(
|
|
945
|
+
return window.addEventListener(ft.move.name, e, {
|
|
945
946
|
capture: !1,
|
|
946
947
|
passive: !1
|
|
947
948
|
}), function() {
|
|
948
|
-
window.removeEventListener(
|
|
949
|
+
window.removeEventListener(ft.move.name, e);
|
|
949
950
|
};
|
|
950
951
|
function e() {}
|
|
951
952
|
}
|
|
952
953
|
};
|
|
953
|
-
|
|
954
|
+
pt.activators = [{
|
|
954
955
|
eventName: "onTouchStart",
|
|
955
956
|
handler: (e, t) => {
|
|
956
957
|
let { nativeEvent: n } = e, { onActivation: r } = t, { touches: i } = n;
|
|
957
958
|
return i.length > 1 ? !1 : (r?.({ event: n }), !0);
|
|
958
959
|
}
|
|
959
960
|
}];
|
|
960
|
-
var
|
|
961
|
+
var mt;
|
|
961
962
|
(function(e) {
|
|
962
963
|
e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect";
|
|
963
|
-
})(
|
|
964
|
-
var
|
|
964
|
+
})(mt ||= {});
|
|
965
|
+
var ht;
|
|
965
966
|
(function(e) {
|
|
966
967
|
e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
967
|
-
})(
|
|
968
|
-
function
|
|
969
|
-
let { acceleration: t, activator: n =
|
|
968
|
+
})(ht ||= {});
|
|
969
|
+
function gt(e) {
|
|
970
|
+
let { acceleration: t, activator: n = mt.Pointer, canScroll: r, draggingRect: i, enabled: a, interval: s = 5, order: l = ht.TreeOrder, pointerCoordinates: d, scrollableAncestors: p, scrollableAncestorRects: m, delta: h, threshold: g } = e, _ = vt({
|
|
970
971
|
delta: h,
|
|
971
|
-
disabled: !
|
|
972
|
-
}), [v, y] =
|
|
972
|
+
disabled: !a
|
|
973
|
+
}), [v, y] = k(), b = f({
|
|
973
974
|
x: 0,
|
|
974
975
|
y: 0
|
|
975
|
-
}), x =
|
|
976
|
+
}), x = f({
|
|
976
977
|
x: 0,
|
|
977
978
|
y: 0
|
|
978
|
-
}), S =
|
|
979
|
+
}), S = u(() => {
|
|
979
980
|
switch (n) {
|
|
980
|
-
case
|
|
981
|
-
top:
|
|
982
|
-
bottom:
|
|
983
|
-
left:
|
|
984
|
-
right:
|
|
981
|
+
case mt.Pointer: return d ? {
|
|
982
|
+
top: d.y,
|
|
983
|
+
bottom: d.y,
|
|
984
|
+
left: d.x,
|
|
985
|
+
right: d.x
|
|
985
986
|
} : null;
|
|
986
|
-
case
|
|
987
|
+
case mt.DraggableRect: return i;
|
|
987
988
|
}
|
|
988
989
|
}, [
|
|
989
990
|
n,
|
|
990
991
|
i,
|
|
991
|
-
|
|
992
|
-
]), C =
|
|
992
|
+
d
|
|
993
|
+
]), C = f(null), w = o(() => {
|
|
993
994
|
let e = C.current;
|
|
994
995
|
if (!e) return;
|
|
995
996
|
let t = b.current.x * x.current.x, n = b.current.y * x.current.y;
|
|
996
997
|
e.scrollBy(t, n);
|
|
997
|
-
}, []), T =
|
|
998
|
-
|
|
999
|
-
if (!
|
|
998
|
+
}, []), T = u(() => l === ht.TreeOrder ? [...p].reverse() : p, [l, p]);
|
|
999
|
+
c(() => {
|
|
1000
|
+
if (!a || !p.length || !S) {
|
|
1000
1001
|
y();
|
|
1001
1002
|
return;
|
|
1002
1003
|
}
|
|
@@ -1004,10 +1005,10 @@ function ht(e) {
|
|
|
1004
1005
|
if (r?.(e) === !1) continue;
|
|
1005
1006
|
let n = m[p.indexOf(e)];
|
|
1006
1007
|
if (!n) continue;
|
|
1007
|
-
let { direction: i, speed: a } =
|
|
1008
|
+
let { direction: i, speed: a } = He(e, n, S, t, g);
|
|
1008
1009
|
for (let e of ["x", "y"]) _[e][i[e]] || (a[e] = 0, i[e] = 0);
|
|
1009
1010
|
if (a.x > 0 || a.y > 0) {
|
|
1010
|
-
y(), C.current = e, v(w,
|
|
1011
|
+
y(), C.current = e, v(w, s), b.current = a, x.current = i;
|
|
1011
1012
|
return;
|
|
1012
1013
|
}
|
|
1013
1014
|
}
|
|
@@ -1023,8 +1024,8 @@ function ht(e) {
|
|
|
1023
1024
|
w,
|
|
1024
1025
|
r,
|
|
1025
1026
|
y,
|
|
1026
|
-
|
|
1027
|
-
|
|
1027
|
+
a,
|
|
1028
|
+
s,
|
|
1028
1029
|
JSON.stringify(S),
|
|
1029
1030
|
JSON.stringify(_),
|
|
1030
1031
|
v,
|
|
@@ -1034,7 +1035,7 @@ function ht(e) {
|
|
|
1034
1035
|
JSON.stringify(g)
|
|
1035
1036
|
]);
|
|
1036
1037
|
}
|
|
1037
|
-
var
|
|
1038
|
+
var _t = {
|
|
1038
1039
|
x: {
|
|
1039
1040
|
[Z.Backward]: !1,
|
|
1040
1041
|
[Z.Forward]: !1
|
|
@@ -1044,10 +1045,10 @@ var gt = {
|
|
|
1044
1045
|
[Z.Forward]: !1
|
|
1045
1046
|
}
|
|
1046
1047
|
};
|
|
1047
|
-
function
|
|
1048
|
-
let { delta: t, disabled: n } = e, r =
|
|
1048
|
+
function vt(e) {
|
|
1049
|
+
let { delta: t, disabled: n } = e, r = te(t);
|
|
1049
1050
|
return A((e) => {
|
|
1050
|
-
if (n || !r || !e) return
|
|
1051
|
+
if (n || !r || !e) return _t;
|
|
1051
1052
|
let i = {
|
|
1052
1053
|
x: Math.sign(t.x - r.x),
|
|
1053
1054
|
y: Math.sign(t.y - r.y)
|
|
@@ -1068,12 +1069,12 @@ function _t(e) {
|
|
|
1068
1069
|
r
|
|
1069
1070
|
]);
|
|
1070
1071
|
}
|
|
1071
|
-
function
|
|
1072
|
+
function yt(e, t) {
|
|
1072
1073
|
let n = t == null ? void 0 : e.get(t), r = n ? n.node.current : null;
|
|
1073
1074
|
return A((e) => t == null ? null : r ?? e ?? null, [r, t]);
|
|
1074
1075
|
}
|
|
1075
|
-
function
|
|
1076
|
-
return
|
|
1076
|
+
function bt(e, t) {
|
|
1077
|
+
return u(() => e.reduce((e, n) => {
|
|
1077
1078
|
let { sensor: r } = n, i = r.activators.map((e) => ({
|
|
1078
1079
|
eventName: e.eventName,
|
|
1079
1080
|
handler: t(e.handler, n)
|
|
@@ -1081,29 +1082,29 @@ function yt(e, t) {
|
|
|
1081
1082
|
return [...e, ...i];
|
|
1082
1083
|
}, []), [e, t]);
|
|
1083
1084
|
}
|
|
1084
|
-
var
|
|
1085
|
+
var xt;
|
|
1085
1086
|
(function(e) {
|
|
1086
1087
|
e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
|
|
1087
|
-
})(
|
|
1088
|
-
var
|
|
1088
|
+
})(xt ||= {});
|
|
1089
|
+
var St;
|
|
1089
1090
|
(function(e) {
|
|
1090
1091
|
e.Optimized = "optimized";
|
|
1091
|
-
})(
|
|
1092
|
-
var
|
|
1093
|
-
function
|
|
1094
|
-
let { dragging: n, dependencies: r, config: i } = t, [
|
|
1095
|
-
e === void 0 && (e = []), !g.current &&
|
|
1096
|
-
}, [g]), v =
|
|
1097
|
-
if (h && !n) return
|
|
1098
|
-
if (!t || t ===
|
|
1092
|
+
})(St ||= {});
|
|
1093
|
+
var Ct = /* @__PURE__ */ new Map();
|
|
1094
|
+
function wt(e, t) {
|
|
1095
|
+
let { dragging: n, dependencies: r, config: i } = t, [a, s] = p(null), { frequency: l, measure: u, strategy: d } = i, m = f(e), h = b(), g = ee(h), _ = o(function(e) {
|
|
1096
|
+
e === void 0 && (e = []), !g.current && s((t) => t === null ? e : t.concat(e.filter((e) => !t.includes(e))));
|
|
1097
|
+
}, [g]), v = f(null), y = A((t) => {
|
|
1098
|
+
if (h && !n) return Ct;
|
|
1099
|
+
if (!t || t === Ct || m.current !== e || a != null) {
|
|
1099
1100
|
let t = /* @__PURE__ */ new Map();
|
|
1100
1101
|
for (let n of e) {
|
|
1101
1102
|
if (!n) continue;
|
|
1102
|
-
if (
|
|
1103
|
+
if (a && a.length > 0 && !a.includes(n.id) && n.rect.current) {
|
|
1103
1104
|
t.set(n.id, n.rect.current);
|
|
1104
1105
|
continue;
|
|
1105
1106
|
}
|
|
1106
|
-
let e = n.node.current, r = e ? new
|
|
1107
|
+
let e = n.node.current, r = e ? new Ye(u(e), e) : null;
|
|
1107
1108
|
n.rect.current = r, r && t.set(n.id, r);
|
|
1108
1109
|
}
|
|
1109
1110
|
return t;
|
|
@@ -1111,18 +1112,18 @@ function Ct(e, t) {
|
|
|
1111
1112
|
return t;
|
|
1112
1113
|
}, [
|
|
1113
1114
|
e,
|
|
1114
|
-
|
|
1115
|
+
a,
|
|
1115
1116
|
n,
|
|
1116
1117
|
h,
|
|
1117
1118
|
u
|
|
1118
1119
|
]);
|
|
1119
|
-
return
|
|
1120
|
+
return c(() => {
|
|
1120
1121
|
m.current = e;
|
|
1121
|
-
}, [e]),
|
|
1122
|
+
}, [e]), c(() => {
|
|
1122
1123
|
h || _();
|
|
1123
|
-
}, [n, h]),
|
|
1124
|
-
|
|
1125
|
-
}, [JSON.stringify(
|
|
1124
|
+
}, [n, h]), c(() => {
|
|
1125
|
+
a && a.length > 0 && s(null);
|
|
1126
|
+
}, [JSON.stringify(a)]), c(() => {
|
|
1126
1127
|
h || typeof l != "number" || v.current !== null || (v.current = setTimeout(() => {
|
|
1127
1128
|
_(), v.current = null;
|
|
1128
1129
|
}, l));
|
|
@@ -1134,44 +1135,44 @@ function Ct(e, t) {
|
|
|
1134
1135
|
]), {
|
|
1135
1136
|
droppableRects: y,
|
|
1136
1137
|
measureDroppableContainers: _,
|
|
1137
|
-
measuringScheduled:
|
|
1138
|
+
measuringScheduled: a != null
|
|
1138
1139
|
};
|
|
1139
1140
|
function b() {
|
|
1140
|
-
switch (
|
|
1141
|
-
case
|
|
1142
|
-
case
|
|
1141
|
+
switch (d) {
|
|
1142
|
+
case xt.Always: return !1;
|
|
1143
|
+
case xt.BeforeDragging: return n;
|
|
1143
1144
|
default: return !n;
|
|
1144
1145
|
}
|
|
1145
1146
|
}
|
|
1146
1147
|
}
|
|
1147
|
-
function
|
|
1148
|
+
function Tt(e, t) {
|
|
1148
1149
|
return A((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
|
|
1149
1150
|
}
|
|
1150
|
-
function
|
|
1151
|
-
return
|
|
1151
|
+
function Et(e, t) {
|
|
1152
|
+
return Tt(e, t);
|
|
1152
1153
|
}
|
|
1153
|
-
function
|
|
1154
|
-
let { callback: t, disabled: n } = e, r =
|
|
1154
|
+
function Dt(e) {
|
|
1155
|
+
let { callback: t, disabled: n } = e, r = O(t), i = u(() => {
|
|
1155
1156
|
if (n || typeof window > "u" || window.MutationObserver === void 0) return;
|
|
1156
1157
|
let { MutationObserver: e } = window;
|
|
1157
1158
|
return new e(r);
|
|
1158
1159
|
}, [r, n]);
|
|
1159
|
-
return
|
|
1160
|
+
return c(() => () => i?.disconnect(), [i]), i;
|
|
1160
1161
|
}
|
|
1161
|
-
function
|
|
1162
|
-
let { callback: t, disabled: n } = e, r =
|
|
1162
|
+
function Ot(e) {
|
|
1163
|
+
let { callback: t, disabled: n } = e, r = O(t), i = u(() => {
|
|
1163
1164
|
if (n || typeof window > "u" || window.ResizeObserver === void 0) return;
|
|
1164
1165
|
let { ResizeObserver: e } = window;
|
|
1165
1166
|
return new e(r);
|
|
1166
1167
|
}, [n]);
|
|
1167
|
-
return
|
|
1168
|
+
return c(() => () => i?.disconnect(), [i]), i;
|
|
1168
1169
|
}
|
|
1169
|
-
function
|
|
1170
|
-
return new
|
|
1170
|
+
function kt(e) {
|
|
1171
|
+
return new Ye(J(e), e);
|
|
1171
1172
|
}
|
|
1172
|
-
function
|
|
1173
|
-
t === void 0 && (t =
|
|
1174
|
-
let [r, i] =
|
|
1173
|
+
function At(e, t, n) {
|
|
1174
|
+
t === void 0 && (t = kt);
|
|
1175
|
+
let [r, i] = p(null);
|
|
1175
1176
|
function a() {
|
|
1176
1177
|
i((r) => {
|
|
1177
1178
|
if (!e) return null;
|
|
@@ -1180,7 +1181,7 @@ function kt(e, t, n) {
|
|
|
1180
1181
|
return JSON.stringify(r) === JSON.stringify(i) ? r : i;
|
|
1181
1182
|
});
|
|
1182
1183
|
}
|
|
1183
|
-
let o =
|
|
1184
|
+
let o = Dt({ callback(t) {
|
|
1184
1185
|
if (e) for (let n of t) {
|
|
1185
1186
|
let { type: t, target: r } = n;
|
|
1186
1187
|
if (t === "childList" && r instanceof HTMLElement && r.contains(e)) {
|
|
@@ -1188,36 +1189,36 @@ function kt(e, t, n) {
|
|
|
1188
1189
|
break;
|
|
1189
1190
|
}
|
|
1190
1191
|
}
|
|
1191
|
-
} }), s =
|
|
1192
|
-
return
|
|
1192
|
+
} }), s = Ot({ callback: a });
|
|
1193
|
+
return D(() => {
|
|
1193
1194
|
a(), e ? (s?.observe(e), o?.observe(document.body, {
|
|
1194
1195
|
childList: !0,
|
|
1195
1196
|
subtree: !0
|
|
1196
1197
|
})) : (s?.disconnect(), o?.disconnect());
|
|
1197
1198
|
}, [e]), r;
|
|
1198
1199
|
}
|
|
1199
|
-
function
|
|
1200
|
-
return
|
|
1200
|
+
function jt(e) {
|
|
1201
|
+
return Te(e, Tt(e));
|
|
1201
1202
|
}
|
|
1202
|
-
var
|
|
1203
|
-
function
|
|
1204
|
-
let t =
|
|
1205
|
-
return
|
|
1203
|
+
var Mt = [];
|
|
1204
|
+
function Nt(e) {
|
|
1205
|
+
let t = f(e), n = A((n) => e ? n && n !== Mt && e && t.current && e.parentNode === t.current.parentNode ? n : Ne(e) : Mt, [e]);
|
|
1206
|
+
return c(() => {
|
|
1206
1207
|
t.current = e;
|
|
1207
1208
|
}, [e]), n;
|
|
1208
1209
|
}
|
|
1209
|
-
function
|
|
1210
|
-
let [t, n] =
|
|
1211
|
-
let t =
|
|
1212
|
-
t && n((e) => e ? (e.set(t,
|
|
1210
|
+
function Pt(e) {
|
|
1211
|
+
let [t, n] = p(null), r = f(e), i = o((e) => {
|
|
1212
|
+
let t = Fe(e.target);
|
|
1213
|
+
t && n((e) => e ? (e.set(t, Re(t)), new Map(e)) : null);
|
|
1213
1214
|
}, []);
|
|
1214
|
-
return
|
|
1215
|
+
return c(() => {
|
|
1215
1216
|
let t = r.current;
|
|
1216
1217
|
if (e !== t) {
|
|
1217
1218
|
a(t);
|
|
1218
1219
|
let o = e.map((e) => {
|
|
1219
|
-
let t =
|
|
1220
|
-
return t ? (t.addEventListener("scroll", i, { passive: !0 }), [t,
|
|
1220
|
+
let t = Fe(e);
|
|
1221
|
+
return t ? (t.addEventListener("scroll", i, { passive: !0 }), [t, Re(t)]) : null;
|
|
1221
1222
|
}).filter((e) => e != null);
|
|
1222
1223
|
n(o.length ? new Map(o) : null), r.current = e;
|
|
1223
1224
|
}
|
|
@@ -1226,24 +1227,24 @@ function Nt(e) {
|
|
|
1226
1227
|
};
|
|
1227
1228
|
function a(e) {
|
|
1228
1229
|
e.forEach((e) => {
|
|
1229
|
-
|
|
1230
|
+
Fe(e)?.removeEventListener("scroll", i);
|
|
1230
1231
|
});
|
|
1231
1232
|
}
|
|
1232
|
-
}, [i, e]),
|
|
1233
|
+
}, [i, e]), u(() => e.length ? t ? Array.from(t.values()).reduce((e, t) => re(e, t), G) : We(e) : G, [e, t]);
|
|
1233
1234
|
}
|
|
1234
|
-
function
|
|
1235
|
+
function Ft(e, t) {
|
|
1235
1236
|
t === void 0 && (t = []);
|
|
1236
|
-
let n =
|
|
1237
|
-
return
|
|
1237
|
+
let n = f(null);
|
|
1238
|
+
return c(() => {
|
|
1238
1239
|
n.current = null;
|
|
1239
|
-
}, t),
|
|
1240
|
-
let t = e !==
|
|
1240
|
+
}, t), c(() => {
|
|
1241
|
+
let t = e !== G;
|
|
1241
1242
|
t && !n.current && (n.current = e), !t && n.current && (n.current = null);
|
|
1242
|
-
}, [e]), n.current ? P(e, n.current) :
|
|
1243
|
+
}, [e]), n.current ? P(e, n.current) : G;
|
|
1243
1244
|
}
|
|
1244
|
-
function
|
|
1245
|
-
|
|
1246
|
-
if (!
|
|
1245
|
+
function It(e) {
|
|
1246
|
+
c(() => {
|
|
1247
|
+
if (!y) return;
|
|
1247
1248
|
let t = e.map((e) => {
|
|
1248
1249
|
let { sensor: t } = e;
|
|
1249
1250
|
return t.setup == null ? void 0 : t.setup();
|
|
@@ -1256,38 +1257,38 @@ function Ft(e) {
|
|
|
1256
1257
|
return t;
|
|
1257
1258
|
}));
|
|
1258
1259
|
}
|
|
1259
|
-
function
|
|
1260
|
-
return
|
|
1260
|
+
function Lt(e, t) {
|
|
1261
|
+
return u(() => e.reduce((e, n) => {
|
|
1261
1262
|
let { eventName: r, handler: i } = n;
|
|
1262
1263
|
return e[r] = (e) => {
|
|
1263
1264
|
i(e, t);
|
|
1264
1265
|
}, e;
|
|
1265
1266
|
}, {}), [e, t]);
|
|
1266
1267
|
}
|
|
1267
|
-
function
|
|
1268
|
-
return
|
|
1268
|
+
function Rt(e) {
|
|
1269
|
+
return u(() => e ? je(e) : null, [e]);
|
|
1269
1270
|
}
|
|
1270
|
-
var
|
|
1271
|
-
function
|
|
1272
|
-
t === void 0 && (t =
|
|
1273
|
-
let [n] = e, r =
|
|
1271
|
+
var zt = [];
|
|
1272
|
+
function Bt(e, t) {
|
|
1273
|
+
t === void 0 && (t = J);
|
|
1274
|
+
let [n] = e, r = Rt(n ? S(n) : null), [i, a] = p(zt);
|
|
1274
1275
|
function o() {
|
|
1275
|
-
a(() => e.length ? e.map((e) =>
|
|
1276
|
+
a(() => e.length ? e.map((e) => ze(e) ? r : new Ye(t(e), e)) : zt);
|
|
1276
1277
|
}
|
|
1277
|
-
let s =
|
|
1278
|
-
return
|
|
1278
|
+
let s = Ot({ callback: o });
|
|
1279
|
+
return D(() => {
|
|
1279
1280
|
s?.disconnect(), o(), e.forEach((e) => s?.observe(e));
|
|
1280
1281
|
}, [e]), i;
|
|
1281
1282
|
}
|
|
1282
|
-
function
|
|
1283
|
+
function Vt(e) {
|
|
1283
1284
|
if (!e) return null;
|
|
1284
1285
|
if (e.children.length > 1) return e;
|
|
1285
1286
|
let t = e.children[0];
|
|
1286
|
-
return
|
|
1287
|
+
return w(t) ? t : e;
|
|
1287
1288
|
}
|
|
1288
|
-
function
|
|
1289
|
-
let { measure: t } = e, [n, r] =
|
|
1290
|
-
for (let { target: n } of e) if (
|
|
1289
|
+
function Ht(e) {
|
|
1290
|
+
let { measure: t } = e, [n, r] = p(null), i = Ot({ callback: o((e) => {
|
|
1291
|
+
for (let { target: n } of e) if (w(n)) {
|
|
1291
1292
|
r((e) => {
|
|
1292
1293
|
let r = t(n);
|
|
1293
1294
|
return e ? {
|
|
@@ -1298,35 +1299,35 @@ function Vt(e) {
|
|
|
1298
1299
|
});
|
|
1299
1300
|
break;
|
|
1300
1301
|
}
|
|
1301
|
-
}, [t]) }), [
|
|
1302
|
-
let n =
|
|
1302
|
+
}, [t]) }), [a, s] = j(o((e) => {
|
|
1303
|
+
let n = Vt(e);
|
|
1303
1304
|
i?.disconnect(), n && i?.observe(n), r(n ? t(n) : null);
|
|
1304
1305
|
}, [t, i]));
|
|
1305
|
-
return
|
|
1306
|
-
nodeRef:
|
|
1306
|
+
return u(() => ({
|
|
1307
|
+
nodeRef: a,
|
|
1307
1308
|
rect: n,
|
|
1308
1309
|
setRef: s
|
|
1309
1310
|
}), [
|
|
1310
1311
|
n,
|
|
1311
|
-
|
|
1312
|
+
a,
|
|
1312
1313
|
s
|
|
1313
1314
|
]);
|
|
1314
1315
|
}
|
|
1315
|
-
var
|
|
1316
|
-
sensor:
|
|
1316
|
+
var Ut = [{
|
|
1317
|
+
sensor: ct,
|
|
1317
1318
|
options: {}
|
|
1318
1319
|
}, {
|
|
1319
|
-
sensor:
|
|
1320
|
+
sensor: rt,
|
|
1320
1321
|
options: {}
|
|
1321
|
-
}],
|
|
1322
|
-
draggable: { measure:
|
|
1322
|
+
}], Wt = { current: {} }, Gt = {
|
|
1323
|
+
draggable: { measure: Y },
|
|
1323
1324
|
droppable: {
|
|
1324
|
-
measure:
|
|
1325
|
-
strategy:
|
|
1326
|
-
frequency:
|
|
1325
|
+
measure: Y,
|
|
1326
|
+
strategy: xt.WhileDragging,
|
|
1327
|
+
frequency: St.Optimized
|
|
1327
1328
|
},
|
|
1328
|
-
dragOverlay: { measure:
|
|
1329
|
-
},
|
|
1329
|
+
dragOverlay: { measure: J }
|
|
1330
|
+
}, Kt = class extends Map {
|
|
1330
1331
|
get(e) {
|
|
1331
1332
|
return e == null ? void 0 : super.get(e) ?? void 0;
|
|
1332
1333
|
}
|
|
@@ -1342,7 +1343,7 @@ var Ht = [{
|
|
|
1342
1343
|
getNodeFor(e) {
|
|
1343
1344
|
return this.get(e)?.node.current ?? void 0;
|
|
1344
1345
|
}
|
|
1345
|
-
},
|
|
1346
|
+
}, qt = {
|
|
1346
1347
|
activatorEvent: null,
|
|
1347
1348
|
active: null,
|
|
1348
1349
|
activeNode: null,
|
|
@@ -1351,31 +1352,31 @@ var Ht = [{
|
|
|
1351
1352
|
containerNodeRect: null,
|
|
1352
1353
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
1353
1354
|
droppableRects: /* @__PURE__ */ new Map(),
|
|
1354
|
-
droppableContainers: /* @__PURE__ */ new
|
|
1355
|
+
droppableContainers: /* @__PURE__ */ new Kt(),
|
|
1355
1356
|
over: null,
|
|
1356
1357
|
dragOverlay: {
|
|
1357
1358
|
nodeRef: { current: null },
|
|
1358
1359
|
rect: null,
|
|
1359
|
-
setRef:
|
|
1360
|
+
setRef: pe
|
|
1360
1361
|
},
|
|
1361
1362
|
scrollableAncestors: [],
|
|
1362
1363
|
scrollableAncestorRects: [],
|
|
1363
|
-
measuringConfiguration:
|
|
1364
|
-
measureDroppableContainers:
|
|
1364
|
+
measuringConfiguration: Gt,
|
|
1365
|
+
measureDroppableContainers: pe,
|
|
1365
1366
|
windowRect: null,
|
|
1366
1367
|
measuringScheduled: !1
|
|
1367
|
-
},
|
|
1368
|
+
}, Jt = {
|
|
1368
1369
|
activatorEvent: null,
|
|
1369
1370
|
activators: [],
|
|
1370
1371
|
active: null,
|
|
1371
1372
|
activeNodeRect: null,
|
|
1372
1373
|
ariaDescribedById: { draggable: "" },
|
|
1373
|
-
dispatch:
|
|
1374
|
+
dispatch: pe,
|
|
1374
1375
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
1375
1376
|
over: null,
|
|
1376
|
-
measureDroppableContainers:
|
|
1377
|
-
},
|
|
1378
|
-
function
|
|
1377
|
+
measureDroppableContainers: pe
|
|
1378
|
+
}, Yt = /* @__PURE__ */ r(Jt), Xt = /* @__PURE__ */ r(qt);
|
|
1379
|
+
function Zt() {
|
|
1379
1380
|
return {
|
|
1380
1381
|
draggable: {
|
|
1381
1382
|
active: null,
|
|
@@ -1389,12 +1390,12 @@ function Xt() {
|
|
|
1389
1390
|
y: 0
|
|
1390
1391
|
}
|
|
1391
1392
|
},
|
|
1392
|
-
droppable: { containers: new
|
|
1393
|
+
droppable: { containers: new Kt() }
|
|
1393
1394
|
};
|
|
1394
1395
|
}
|
|
1395
|
-
function
|
|
1396
|
+
function Qt(e, t) {
|
|
1396
1397
|
switch (t.type) {
|
|
1397
|
-
case
|
|
1398
|
+
case U.DragStart: return {
|
|
1398
1399
|
...e,
|
|
1399
1400
|
draggable: {
|
|
1400
1401
|
...e.draggable,
|
|
@@ -1402,7 +1403,7 @@ function Zt(e, t) {
|
|
|
1402
1403
|
active: t.active
|
|
1403
1404
|
}
|
|
1404
1405
|
};
|
|
1405
|
-
case
|
|
1406
|
+
case U.DragMove: return e.draggable.active == null ? e : {
|
|
1406
1407
|
...e,
|
|
1407
1408
|
draggable: {
|
|
1408
1409
|
...e.draggable,
|
|
@@ -1412,8 +1413,8 @@ function Zt(e, t) {
|
|
|
1412
1413
|
}
|
|
1413
1414
|
}
|
|
1414
1415
|
};
|
|
1415
|
-
case
|
|
1416
|
-
case
|
|
1416
|
+
case U.DragEnd:
|
|
1417
|
+
case U.DragCancel: return {
|
|
1417
1418
|
...e,
|
|
1418
1419
|
draggable: {
|
|
1419
1420
|
...e.draggable,
|
|
@@ -1428,8 +1429,8 @@ function Zt(e, t) {
|
|
|
1428
1429
|
}
|
|
1429
1430
|
}
|
|
1430
1431
|
};
|
|
1431
|
-
case
|
|
1432
|
-
let { element: n } = t, { id: r } = n, i = new
|
|
1432
|
+
case U.RegisterDroppable: {
|
|
1433
|
+
let { element: n } = t, { id: r } = n, i = new Kt(e.droppable.containers);
|
|
1433
1434
|
return i.set(r, n), {
|
|
1434
1435
|
...e,
|
|
1435
1436
|
droppable: {
|
|
@@ -1438,10 +1439,10 @@ function Zt(e, t) {
|
|
|
1438
1439
|
}
|
|
1439
1440
|
};
|
|
1440
1441
|
}
|
|
1441
|
-
case
|
|
1442
|
+
case U.SetDroppableDisabled: {
|
|
1442
1443
|
let { id: n, key: r, disabled: i } = t, a = e.droppable.containers.get(n);
|
|
1443
1444
|
if (!a || r !== a.key) return e;
|
|
1444
|
-
let o = new
|
|
1445
|
+
let o = new Kt(e.droppable.containers);
|
|
1445
1446
|
return o.set(n, {
|
|
1446
1447
|
...a,
|
|
1447
1448
|
disabled: i
|
|
@@ -1453,10 +1454,10 @@ function Zt(e, t) {
|
|
|
1453
1454
|
}
|
|
1454
1455
|
};
|
|
1455
1456
|
}
|
|
1456
|
-
case
|
|
1457
|
+
case U.UnregisterDroppable: {
|
|
1457
1458
|
let { id: n, key: r } = t, i = e.droppable.containers.get(n);
|
|
1458
1459
|
if (!i || r !== i.key) return e;
|
|
1459
|
-
let a = new
|
|
1460
|
+
let a = new Kt(e.droppable.containers);
|
|
1460
1461
|
return a.delete(n), {
|
|
1461
1462
|
...e,
|
|
1462
1463
|
droppable: {
|
|
@@ -1468,19 +1469,19 @@ function Zt(e, t) {
|
|
|
1468
1469
|
default: return e;
|
|
1469
1470
|
}
|
|
1470
1471
|
}
|
|
1471
|
-
function
|
|
1472
|
-
let { disabled: t } = e, { active: n, activatorEvent: r, draggableNodes: i } =
|
|
1473
|
-
return
|
|
1474
|
-
if (!t && !r && a &&
|
|
1475
|
-
if (!
|
|
1476
|
-
let e = i.get(
|
|
1472
|
+
function $t(e) {
|
|
1473
|
+
let { disabled: t } = e, { active: n, activatorEvent: r, draggableNodes: i } = s(Yt), a = te(r), o = te(n?.id);
|
|
1474
|
+
return c(() => {
|
|
1475
|
+
if (!t && !r && a && o != null) {
|
|
1476
|
+
if (!F(a) || document.activeElement === a.target) return;
|
|
1477
|
+
let e = i.get(o);
|
|
1477
1478
|
if (!e) return;
|
|
1478
1479
|
let { activatorNode: t, node: n } = e;
|
|
1479
1480
|
if (!t.current && !n.current) return;
|
|
1480
1481
|
requestAnimationFrame(() => {
|
|
1481
1482
|
for (let e of [t.current, n.current]) {
|
|
1482
1483
|
if (!e) continue;
|
|
1483
|
-
let t =
|
|
1484
|
+
let t = L(e);
|
|
1484
1485
|
if (t) {
|
|
1485
1486
|
t.focus();
|
|
1486
1487
|
break;
|
|
@@ -1492,29 +1493,29 @@ function Qt(e) {
|
|
|
1492
1493
|
r,
|
|
1493
1494
|
t,
|
|
1494
1495
|
i,
|
|
1495
|
-
|
|
1496
|
+
o,
|
|
1496
1497
|
a
|
|
1497
1498
|
]), null;
|
|
1498
1499
|
}
|
|
1499
|
-
function
|
|
1500
|
+
function en(e, t) {
|
|
1500
1501
|
let { transform: n, ...r } = t;
|
|
1501
1502
|
return e != null && e.length ? e.reduce((e, t) => t({
|
|
1502
1503
|
transform: e,
|
|
1503
1504
|
...r
|
|
1504
1505
|
}), n) : n;
|
|
1505
1506
|
}
|
|
1506
|
-
function
|
|
1507
|
-
return
|
|
1507
|
+
function tn(e) {
|
|
1508
|
+
return u(() => ({
|
|
1508
1509
|
draggable: {
|
|
1509
|
-
...
|
|
1510
|
+
...Gt.draggable,
|
|
1510
1511
|
...e?.draggable
|
|
1511
1512
|
},
|
|
1512
1513
|
droppable: {
|
|
1513
|
-
...
|
|
1514
|
+
...Gt.droppable,
|
|
1514
1515
|
...e?.droppable
|
|
1515
1516
|
},
|
|
1516
1517
|
dragOverlay: {
|
|
1517
|
-
...
|
|
1518
|
+
...Gt.dragOverlay,
|
|
1518
1519
|
...e?.dragOverlay
|
|
1519
1520
|
}
|
|
1520
1521
|
}), [
|
|
@@ -1523,12 +1524,12 @@ function en(e) {
|
|
|
1523
1524
|
e?.dragOverlay
|
|
1524
1525
|
]);
|
|
1525
1526
|
}
|
|
1526
|
-
function
|
|
1527
|
-
let { activeNode: t, measure: n, initialRect: r, config: i = !0 } = e, a =
|
|
1527
|
+
function nn(e) {
|
|
1528
|
+
let { activeNode: t, measure: n, initialRect: r, config: i = !0 } = e, a = f(!1), { x: o, y: s } = typeof i == "boolean" ? {
|
|
1528
1529
|
x: i,
|
|
1529
1530
|
y: i
|
|
1530
1531
|
} : i;
|
|
1531
|
-
|
|
1532
|
+
D(() => {
|
|
1532
1533
|
if (!o && !s || !t) {
|
|
1533
1534
|
a.current = !1;
|
|
1534
1535
|
return;
|
|
@@ -1536,9 +1537,9 @@ function tn(e) {
|
|
|
1536
1537
|
if (a.current || !r) return;
|
|
1537
1538
|
let e = t?.node.current;
|
|
1538
1539
|
if (!e || e.isConnected === !1) return;
|
|
1539
|
-
let i =
|
|
1540
|
+
let i = Te(n(e), r);
|
|
1540
1541
|
if (o || (i.x = 0), s || (i.y = 0), a.current = !0, Math.abs(i.x) > 0 || Math.abs(i.y) > 0) {
|
|
1541
|
-
let t =
|
|
1542
|
+
let t = Pe(e);
|
|
1542
1543
|
t && t.scrollBy({
|
|
1543
1544
|
top: i.y,
|
|
1544
1545
|
left: i.x
|
|
@@ -1552,85 +1553,85 @@ function tn(e) {
|
|
|
1552
1553
|
n
|
|
1553
1554
|
]);
|
|
1554
1555
|
}
|
|
1555
|
-
var
|
|
1556
|
-
...
|
|
1556
|
+
var rn = /* @__PURE__ */ r({
|
|
1557
|
+
...G,
|
|
1557
1558
|
scaleX: 1,
|
|
1558
1559
|
scaleY: 1
|
|
1559
|
-
}),
|
|
1560
|
+
}), an;
|
|
1560
1561
|
(function(e) {
|
|
1561
1562
|
e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
|
|
1562
|
-
})(
|
|
1563
|
-
var
|
|
1564
|
-
let { id: n, accessibility: r, autoScroll: i = !0, children:
|
|
1563
|
+
})(an ||= {});
|
|
1564
|
+
var on = /* @__PURE__ */ a(function(e) {
|
|
1565
|
+
let { id: n, accessibility: r, autoScroll: i = !0, children: a, sensors: s = Ut, collisionDetection: l = Ce, measuring: m, modifiers: h, ...g } = e, [v, y] = d(Qt, void 0, Zt), [b, x] = le(), [C, w] = p(an.Uninitialized), T = C === an.Initialized, { draggable: { active: E, nodes: O, translate: k }, droppable: { containers: A } } = v, j = E == null ? null : O.get(E), te = f({
|
|
1565
1566
|
initial: null,
|
|
1566
1567
|
translated: null
|
|
1567
|
-
}),
|
|
1568
|
-
id:
|
|
1569
|
-
data:
|
|
1570
|
-
rect:
|
|
1571
|
-
}, [
|
|
1568
|
+
}), M = u(() => E == null ? null : {
|
|
1569
|
+
id: E,
|
|
1570
|
+
data: j?.data ?? Wt,
|
|
1571
|
+
rect: te
|
|
1572
|
+
}, [E, j]), N = f(null), [P, ie] = p(null), [F, ae] = p(null), I = ee(g, Object.values(g)), se = ne("DndDescribedBy", n), L = u(() => A.getEnabled(), [A]), R = tn(m), { droppableRects: z, measureDroppableContainers: ce, measuringScheduled: B } = wt(L, {
|
|
1572
1573
|
dragging: T,
|
|
1573
|
-
dependencies: [
|
|
1574
|
-
config:
|
|
1575
|
-
}),
|
|
1576
|
-
|
|
1577
|
-
activeNode:
|
|
1574
|
+
dependencies: [k.x, k.y],
|
|
1575
|
+
config: R.droppable
|
|
1576
|
+
}), H = yt(O, E), ue = u(() => F ? oe(F) : null, [F]), de = ze(), pe = Et(H, R.draggable.measure);
|
|
1577
|
+
nn({
|
|
1578
|
+
activeNode: E == null ? null : O.get(E),
|
|
1578
1579
|
config: de.layoutShiftCompensation,
|
|
1579
|
-
initialRect:
|
|
1580
|
-
measure:
|
|
1580
|
+
initialRect: pe,
|
|
1581
|
+
measure: R.draggable.measure
|
|
1581
1582
|
});
|
|
1582
|
-
let
|
|
1583
|
+
let W = At(H, R.draggable.measure, pe), me = At(H ? H.parentElement : null), G = f({
|
|
1583
1584
|
activatorEvent: null,
|
|
1584
1585
|
active: null,
|
|
1585
|
-
activeNode:
|
|
1586
|
+
activeNode: H,
|
|
1586
1587
|
collisionRect: null,
|
|
1587
1588
|
collisions: null,
|
|
1588
|
-
droppableRects:
|
|
1589
|
+
droppableRects: z,
|
|
1589
1590
|
draggableNodes: O,
|
|
1590
1591
|
draggingNode: null,
|
|
1591
1592
|
draggingNodeRect: null,
|
|
1592
|
-
droppableContainers:
|
|
1593
|
+
droppableContainers: A,
|
|
1593
1594
|
over: null,
|
|
1594
1595
|
scrollableAncestors: [],
|
|
1595
1596
|
scrollAdjustedTranslate: null
|
|
1596
|
-
}),
|
|
1597
|
+
}), he = A.getNodeFor(G.current.over?.id), K = Ht({ measure: R.dragOverlay.measure }), ge = K.nodeRef.current ?? H, _e = T ? K.rect ?? W : null, ve = !!(K.nodeRef.current && K.rect), be = jt(ve ? null : W), xe = Rt(ge ? S(ge) : null), q = Nt(T ? he ?? H : null), Se = Bt(q), Te = en(h, {
|
|
1597
1598
|
transform: {
|
|
1598
|
-
x:
|
|
1599
|
-
y:
|
|
1599
|
+
x: k.x - be.x,
|
|
1600
|
+
y: k.y - be.y,
|
|
1600
1601
|
scaleX: 1,
|
|
1601
1602
|
scaleY: 1
|
|
1602
1603
|
},
|
|
1603
1604
|
activatorEvent: F,
|
|
1604
|
-
active:
|
|
1605
|
-
activeNodeRect:
|
|
1606
|
-
containerNodeRect:
|
|
1607
|
-
draggingNodeRect:
|
|
1608
|
-
over:
|
|
1609
|
-
overlayNodeRect:
|
|
1610
|
-
scrollableAncestors:
|
|
1605
|
+
active: M,
|
|
1606
|
+
activeNodeRect: W,
|
|
1607
|
+
containerNodeRect: me,
|
|
1608
|
+
draggingNodeRect: _e,
|
|
1609
|
+
over: G.current.over,
|
|
1610
|
+
overlayNodeRect: K.rect,
|
|
1611
|
+
scrollableAncestors: q,
|
|
1611
1612
|
scrollableAncestorRects: Se,
|
|
1612
|
-
windowRect:
|
|
1613
|
-
}),
|
|
1614
|
-
active:
|
|
1615
|
-
collisionRect:
|
|
1616
|
-
droppableRects:
|
|
1617
|
-
droppableContainers:
|
|
1618
|
-
pointerCoordinates:
|
|
1619
|
-
}) : null, Me =
|
|
1613
|
+
windowRect: xe
|
|
1614
|
+
}), Ee = ue ? re(ue, k) : null, Oe = Pt(q), ke = Ft(Oe), Ae = Ft(Oe, [W]), J = re(Te, ke), Y = _e ? De(_e, Te) : null, je = M && Y ? l({
|
|
1615
|
+
active: M,
|
|
1616
|
+
collisionRect: Y,
|
|
1617
|
+
droppableRects: z,
|
|
1618
|
+
droppableContainers: L,
|
|
1619
|
+
pointerCoordinates: Ee
|
|
1620
|
+
}) : null, Me = ye(je, "id"), [X, Ne] = p(null), Pe = we(ve ? Te : re(Te, Ae), X?.rect ?? null, W), Fe = f(null), Ie = o((e, t) => {
|
|
1620
1621
|
let { sensor: n, options: r } = t;
|
|
1621
|
-
if (
|
|
1622
|
-
let i = O.get(
|
|
1622
|
+
if (N.current == null) return;
|
|
1623
|
+
let i = O.get(N.current);
|
|
1623
1624
|
if (!i) return;
|
|
1624
1625
|
let a = e.nativeEvent;
|
|
1625
1626
|
Fe.current = new n({
|
|
1626
|
-
active:
|
|
1627
|
+
active: N.current,
|
|
1627
1628
|
activeNode: i,
|
|
1628
1629
|
event: a,
|
|
1629
1630
|
options: r,
|
|
1630
|
-
context:
|
|
1631
|
+
context: G,
|
|
1631
1632
|
onAbort(e) {
|
|
1632
1633
|
if (!O.get(e)) return;
|
|
1633
|
-
let { onDragAbort: t } =
|
|
1634
|
+
let { onDragAbort: t } = I.current, n = { id: e };
|
|
1634
1635
|
t?.(n), b({
|
|
1635
1636
|
type: "onDragAbort",
|
|
1636
1637
|
event: n
|
|
@@ -1638,7 +1639,7 @@ var an = /* @__PURE__ */ i(function(t) {
|
|
|
1638
1639
|
},
|
|
1639
1640
|
onPending(e, t, n, r) {
|
|
1640
1641
|
if (!O.get(e)) return;
|
|
1641
|
-
let { onDragPending: i } =
|
|
1642
|
+
let { onDragPending: i } = I.current, a = {
|
|
1642
1643
|
id: e,
|
|
1643
1644
|
constraint: t,
|
|
1644
1645
|
initialCoordinates: n,
|
|
@@ -1650,56 +1651,56 @@ var an = /* @__PURE__ */ i(function(t) {
|
|
|
1650
1651
|
});
|
|
1651
1652
|
},
|
|
1652
1653
|
onStart(e) {
|
|
1653
|
-
let t =
|
|
1654
|
+
let t = N.current;
|
|
1654
1655
|
if (t == null) return;
|
|
1655
1656
|
let n = O.get(t);
|
|
1656
1657
|
if (!n) return;
|
|
1657
|
-
let { onDragStart: r } =
|
|
1658
|
+
let { onDragStart: r } = I.current, i = {
|
|
1658
1659
|
activatorEvent: a,
|
|
1659
1660
|
active: {
|
|
1660
1661
|
id: t,
|
|
1661
1662
|
data: n.data,
|
|
1662
|
-
rect:
|
|
1663
|
+
rect: te
|
|
1663
1664
|
}
|
|
1664
1665
|
};
|
|
1665
|
-
|
|
1666
|
-
r?.(i), w(
|
|
1667
|
-
type:
|
|
1666
|
+
_(() => {
|
|
1667
|
+
r?.(i), w(an.Initializing), y({
|
|
1668
|
+
type: U.DragStart,
|
|
1668
1669
|
initialCoordinates: e,
|
|
1669
1670
|
active: t
|
|
1670
1671
|
}), b({
|
|
1671
1672
|
type: "onDragStart",
|
|
1672
1673
|
event: i
|
|
1673
|
-
}), ie(Fe.current),
|
|
1674
|
+
}), ie(Fe.current), ae(a);
|
|
1674
1675
|
});
|
|
1675
1676
|
},
|
|
1676
1677
|
onMove(e) {
|
|
1677
1678
|
y({
|
|
1678
|
-
type:
|
|
1679
|
+
type: U.DragMove,
|
|
1679
1680
|
coordinates: e
|
|
1680
1681
|
});
|
|
1681
1682
|
},
|
|
1682
|
-
onEnd: o(
|
|
1683
|
-
onCancel: o(
|
|
1683
|
+
onEnd: o(U.DragEnd),
|
|
1684
|
+
onCancel: o(U.DragCancel)
|
|
1684
1685
|
});
|
|
1685
1686
|
function o(e) {
|
|
1686
1687
|
return async function() {
|
|
1687
|
-
let { active: t, collisions: n, over: r, scrollAdjustedTranslate: i } =
|
|
1688
|
+
let { active: t, collisions: n, over: r, scrollAdjustedTranslate: i } = G.current, o = null;
|
|
1688
1689
|
if (t && i) {
|
|
1689
|
-
let { cancelDrop: s } =
|
|
1690
|
+
let { cancelDrop: s } = I.current;
|
|
1690
1691
|
o = {
|
|
1691
1692
|
activatorEvent: a,
|
|
1692
1693
|
active: t,
|
|
1693
1694
|
collisions: n,
|
|
1694
1695
|
delta: i,
|
|
1695
1696
|
over: r
|
|
1696
|
-
}, e ===
|
|
1697
|
+
}, e === U.DragEnd && typeof s == "function" && await Promise.resolve(s(o)) && (e = U.DragCancel);
|
|
1697
1698
|
}
|
|
1698
|
-
|
|
1699
|
-
y({ type: e }), w(
|
|
1700
|
-
let t = e ===
|
|
1699
|
+
N.current = null, _(() => {
|
|
1700
|
+
y({ type: e }), w(an.Uninitialized), Ne(null), ie(null), ae(null), Fe.current = null;
|
|
1701
|
+
let t = e === U.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
1701
1702
|
if (o) {
|
|
1702
|
-
let e =
|
|
1703
|
+
let e = I.current[t];
|
|
1703
1704
|
e?.(o), b({
|
|
1704
1705
|
type: t,
|
|
1705
1706
|
event: o
|
|
@@ -1708,37 +1709,37 @@ var an = /* @__PURE__ */ i(function(t) {
|
|
|
1708
1709
|
});
|
|
1709
1710
|
};
|
|
1710
1711
|
}
|
|
1711
|
-
}, [O]), Le =
|
|
1712
|
+
}, [O]), Le = bt(s, o((e, t) => (n, r) => {
|
|
1712
1713
|
let i = n.nativeEvent, a = O.get(r);
|
|
1713
|
-
if (
|
|
1714
|
+
if (N.current !== null || !a || i.dndKit || i.defaultPrevented) return;
|
|
1714
1715
|
let o = { active: a };
|
|
1715
|
-
e(n, t.options, o) === !0 && (i.dndKit = { capturedBy: t.sensor },
|
|
1716
|
+
e(n, t.options, o) === !0 && (i.dndKit = { capturedBy: t.sensor }, N.current = r, Ie(n, t));
|
|
1716
1717
|
}, [O, Ie]));
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
}, [
|
|
1720
|
-
let { onDragMove: e } =
|
|
1718
|
+
It(s), D(() => {
|
|
1719
|
+
W && C === an.Initializing && w(an.Initialized);
|
|
1720
|
+
}, [W, C]), c(() => {
|
|
1721
|
+
let { onDragMove: e } = I.current, { active: t, activatorEvent: n, collisions: r, over: i } = G.current;
|
|
1721
1722
|
if (!t || !n) return;
|
|
1722
1723
|
let a = {
|
|
1723
1724
|
active: t,
|
|
1724
1725
|
activatorEvent: n,
|
|
1725
1726
|
collisions: r,
|
|
1726
1727
|
delta: {
|
|
1727
|
-
x:
|
|
1728
|
-
y:
|
|
1728
|
+
x: J.x,
|
|
1729
|
+
y: J.y
|
|
1729
1730
|
},
|
|
1730
1731
|
over: i
|
|
1731
1732
|
};
|
|
1732
|
-
|
|
1733
|
+
_(() => {
|
|
1733
1734
|
e?.(a), b({
|
|
1734
1735
|
type: "onDragMove",
|
|
1735
1736
|
event: a
|
|
1736
1737
|
});
|
|
1737
1738
|
});
|
|
1738
|
-
}, [
|
|
1739
|
-
let { active: e, activatorEvent: t, collisions: n, droppableContainers: r, scrollAdjustedTranslate: i } =
|
|
1740
|
-
if (!e ||
|
|
1741
|
-
let { onDragOver: a } =
|
|
1739
|
+
}, [J.x, J.y]), c(() => {
|
|
1740
|
+
let { active: e, activatorEvent: t, collisions: n, droppableContainers: r, scrollAdjustedTranslate: i } = G.current;
|
|
1741
|
+
if (!e || N.current == null || !t || !i) return;
|
|
1742
|
+
let { onDragOver: a } = I.current, o = r.get(Me), s = o && o.rect.current ? {
|
|
1742
1743
|
id: o.id,
|
|
1743
1744
|
rect: o.rect.current,
|
|
1744
1745
|
data: o.data,
|
|
@@ -1753,124 +1754,124 @@ var an = /* @__PURE__ */ i(function(t) {
|
|
|
1753
1754
|
},
|
|
1754
1755
|
over: s
|
|
1755
1756
|
};
|
|
1756
|
-
|
|
1757
|
+
_(() => {
|
|
1757
1758
|
Ne(s), a?.(c), b({
|
|
1758
1759
|
type: "onDragOver",
|
|
1759
1760
|
event: c
|
|
1760
1761
|
});
|
|
1761
1762
|
});
|
|
1762
|
-
}, [Me]),
|
|
1763
|
-
|
|
1763
|
+
}, [Me]), D(() => {
|
|
1764
|
+
G.current = {
|
|
1764
1765
|
activatorEvent: F,
|
|
1765
|
-
active:
|
|
1766
|
-
activeNode:
|
|
1767
|
-
collisionRect:
|
|
1766
|
+
active: M,
|
|
1767
|
+
activeNode: H,
|
|
1768
|
+
collisionRect: Y,
|
|
1768
1769
|
collisions: je,
|
|
1769
|
-
droppableRects:
|
|
1770
|
+
droppableRects: z,
|
|
1770
1771
|
draggableNodes: O,
|
|
1771
|
-
draggingNode:
|
|
1772
|
-
draggingNodeRect:
|
|
1773
|
-
droppableContainers:
|
|
1772
|
+
draggingNode: ge,
|
|
1773
|
+
draggingNodeRect: _e,
|
|
1774
|
+
droppableContainers: A,
|
|
1774
1775
|
over: X,
|
|
1775
|
-
scrollableAncestors:
|
|
1776
|
-
scrollAdjustedTranslate:
|
|
1777
|
-
},
|
|
1778
|
-
initial:
|
|
1779
|
-
translated:
|
|
1776
|
+
scrollableAncestors: q,
|
|
1777
|
+
scrollAdjustedTranslate: J
|
|
1778
|
+
}, te.current = {
|
|
1779
|
+
initial: _e,
|
|
1780
|
+
translated: Y
|
|
1780
1781
|
};
|
|
1781
1782
|
}, [
|
|
1782
|
-
|
|
1783
|
-
|
|
1783
|
+
M,
|
|
1784
|
+
H,
|
|
1784
1785
|
je,
|
|
1785
|
-
|
|
1786
|
+
Y,
|
|
1786
1787
|
O,
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1788
|
+
ge,
|
|
1789
|
+
_e,
|
|
1790
|
+
z,
|
|
1791
|
+
A,
|
|
1791
1792
|
X,
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
]),
|
|
1793
|
+
q,
|
|
1794
|
+
J
|
|
1795
|
+
]), gt({
|
|
1795
1796
|
...de,
|
|
1796
|
-
delta:
|
|
1797
|
-
draggingRect:
|
|
1798
|
-
pointerCoordinates:
|
|
1799
|
-
scrollableAncestors:
|
|
1797
|
+
delta: k,
|
|
1798
|
+
draggingRect: Y,
|
|
1799
|
+
pointerCoordinates: Ee,
|
|
1800
|
+
scrollableAncestors: q,
|
|
1800
1801
|
scrollableAncestorRects: Se
|
|
1801
1802
|
});
|
|
1802
|
-
let
|
|
1803
|
-
active:
|
|
1804
|
-
activeNode:
|
|
1805
|
-
activeNodeRect:
|
|
1803
|
+
let Re = u(() => ({
|
|
1804
|
+
active: M,
|
|
1805
|
+
activeNode: H,
|
|
1806
|
+
activeNodeRect: W,
|
|
1806
1807
|
activatorEvent: F,
|
|
1807
1808
|
collisions: je,
|
|
1808
|
-
containerNodeRect:
|
|
1809
|
-
dragOverlay:
|
|
1809
|
+
containerNodeRect: me,
|
|
1810
|
+
dragOverlay: K,
|
|
1810
1811
|
draggableNodes: O,
|
|
1811
|
-
droppableContainers:
|
|
1812
|
-
droppableRects:
|
|
1812
|
+
droppableContainers: A,
|
|
1813
|
+
droppableRects: z,
|
|
1813
1814
|
over: X,
|
|
1814
|
-
measureDroppableContainers:
|
|
1815
|
-
scrollableAncestors:
|
|
1815
|
+
measureDroppableContainers: ce,
|
|
1816
|
+
scrollableAncestors: q,
|
|
1816
1817
|
scrollableAncestorRects: Se,
|
|
1817
|
-
measuringConfiguration:
|
|
1818
|
-
measuringScheduled:
|
|
1819
|
-
windowRect:
|
|
1818
|
+
measuringConfiguration: R,
|
|
1819
|
+
measuringScheduled: B,
|
|
1820
|
+
windowRect: xe
|
|
1820
1821
|
}), [
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1822
|
+
M,
|
|
1823
|
+
H,
|
|
1824
|
+
W,
|
|
1824
1825
|
F,
|
|
1825
1826
|
je,
|
|
1827
|
+
me,
|
|
1826
1828
|
K,
|
|
1827
|
-
J,
|
|
1828
1829
|
O,
|
|
1829
|
-
|
|
1830
|
-
|
|
1830
|
+
A,
|
|
1831
|
+
z,
|
|
1831
1832
|
X,
|
|
1832
|
-
|
|
1833
|
-
|
|
1833
|
+
ce,
|
|
1834
|
+
q,
|
|
1834
1835
|
Se,
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
]),
|
|
1836
|
+
R,
|
|
1837
|
+
B,
|
|
1838
|
+
xe
|
|
1839
|
+
]), Z = u(() => ({
|
|
1839
1840
|
activatorEvent: F,
|
|
1840
1841
|
activators: Le,
|
|
1841
|
-
active:
|
|
1842
|
-
activeNodeRect:
|
|
1843
|
-
ariaDescribedById: { draggable:
|
|
1842
|
+
active: M,
|
|
1843
|
+
activeNodeRect: W,
|
|
1844
|
+
ariaDescribedById: { draggable: se },
|
|
1844
1845
|
dispatch: y,
|
|
1845
1846
|
draggableNodes: O,
|
|
1846
1847
|
over: X,
|
|
1847
|
-
measureDroppableContainers:
|
|
1848
|
+
measureDroppableContainers: ce
|
|
1848
1849
|
}), [
|
|
1849
1850
|
F,
|
|
1850
1851
|
Le,
|
|
1851
|
-
|
|
1852
|
-
|
|
1852
|
+
M,
|
|
1853
|
+
W,
|
|
1853
1854
|
y,
|
|
1854
|
-
|
|
1855
|
+
se,
|
|
1855
1856
|
O,
|
|
1856
1857
|
X,
|
|
1857
|
-
|
|
1858
|
+
ce
|
|
1858
1859
|
]);
|
|
1859
|
-
return
|
|
1860
|
+
return t.createElement(V.Provider, { value: x }, t.createElement(Yt.Provider, { value: Z }, t.createElement(Xt.Provider, { value: Re }, t.createElement(rn.Provider, { value: Pe }, a)), t.createElement($t, { disabled: r?.restoreFocus === !1 })), t.createElement(fe, {
|
|
1860
1861
|
...r,
|
|
1861
|
-
hiddenTextDescribedById:
|
|
1862
|
+
hiddenTextDescribedById: se
|
|
1862
1863
|
}));
|
|
1863
1864
|
function ze() {
|
|
1864
|
-
let e =
|
|
1865
|
+
let e = P?.autoScrollEnabled === !1, t = typeof i == "object" ? i.enabled === !1 : i === !1, n = T && !e && !t;
|
|
1865
1866
|
return typeof i == "object" ? {
|
|
1866
1867
|
...i,
|
|
1867
1868
|
enabled: n
|
|
1868
1869
|
} : { enabled: n };
|
|
1869
1870
|
}
|
|
1870
|
-
}),
|
|
1871
|
-
function
|
|
1872
|
-
let { id: t, data: n, disabled: r = !1, attributes: i } = e, a =
|
|
1873
|
-
return
|
|
1871
|
+
}), sn = /* @__PURE__ */ r(null), cn = "button", ln = "Draggable";
|
|
1872
|
+
function un(e) {
|
|
1873
|
+
let { id: t, data: n, disabled: r = !1, attributes: i } = e, a = ne(ln), { activators: o, activatorEvent: c, active: l, activeNodeRect: d, ariaDescribedById: f, draggableNodes: p, over: m } = s(Yt), { role: h = cn, roleDescription: g = "draggable", tabIndex: _ = 0 } = i ?? {}, v = l?.id === t, y = s(v ? rn : sn), [b, x] = j(), [S, C] = j(), w = Lt(o, t), T = ee(n);
|
|
1874
|
+
return D(() => (p.set(t, {
|
|
1874
1875
|
id: t,
|
|
1875
1876
|
key: a,
|
|
1876
1877
|
node: b,
|
|
@@ -1880,14 +1881,14 @@ function ln(e) {
|
|
|
1880
1881
|
let e = p.get(t);
|
|
1881
1882
|
e && e.key === a && p.delete(t);
|
|
1882
1883
|
}), [p, t]), {
|
|
1883
|
-
active:
|
|
1884
|
+
active: l,
|
|
1884
1885
|
activatorEvent: c,
|
|
1885
1886
|
activeNodeRect: d,
|
|
1886
|
-
attributes:
|
|
1887
|
+
attributes: u(() => ({
|
|
1887
1888
|
role: h,
|
|
1888
1889
|
tabIndex: _,
|
|
1889
1890
|
"aria-disabled": r,
|
|
1890
|
-
"aria-pressed": v && h ===
|
|
1891
|
+
"aria-pressed": v && h === cn ? !0 : void 0,
|
|
1891
1892
|
"aria-roledescription": g,
|
|
1892
1893
|
"aria-describedby": f.draggable
|
|
1893
1894
|
}), [
|
|
@@ -1907,16 +1908,16 @@ function ln(e) {
|
|
|
1907
1908
|
transform: y
|
|
1908
1909
|
};
|
|
1909
1910
|
}
|
|
1910
|
-
function
|
|
1911
|
-
return
|
|
1911
|
+
function dn() {
|
|
1912
|
+
return s(Xt);
|
|
1912
1913
|
}
|
|
1913
|
-
var
|
|
1914
|
-
function
|
|
1915
|
-
let { data: t, disabled: n = !1, id: r, resizeObserverConfig: i } = e,
|
|
1916
|
-
...
|
|
1914
|
+
var fn = "Droppable", pn = { timeout: 25 };
|
|
1915
|
+
function mn(e) {
|
|
1916
|
+
let { data: t, disabled: n = !1, id: r, resizeObserverConfig: i } = e, a = ne(fn), { active: l, dispatch: u, over: d, measureDroppableContainers: p } = s(Yt), m = f({ disabled: n }), h = f(!1), g = f(null), _ = f(null), { disabled: v, updateMeasurementsFor: y, timeout: b } = {
|
|
1917
|
+
...pn,
|
|
1917
1918
|
...i
|
|
1918
|
-
}, x =
|
|
1919
|
-
callback:
|
|
1919
|
+
}, x = ee(y ?? r), S = Ot({
|
|
1920
|
+
callback: o(() => {
|
|
1920
1921
|
if (!h.current) {
|
|
1921
1922
|
h.current = !0;
|
|
1922
1923
|
return;
|
|
@@ -1926,49 +1927,49 @@ function pn(e) {
|
|
|
1926
1927
|
}, b);
|
|
1927
1928
|
}, [b]),
|
|
1928
1929
|
disabled: v || !l
|
|
1929
|
-
}), [C, w] = j(
|
|
1930
|
+
}), [C, w] = j(o((e, t) => {
|
|
1930
1931
|
S && (t && (S.unobserve(t), h.current = !1), e && S.observe(e));
|
|
1931
|
-
}, [S])), T =
|
|
1932
|
-
return
|
|
1932
|
+
}, [S])), T = ee(t);
|
|
1933
|
+
return c(() => {
|
|
1933
1934
|
!S || !C.current || (S.disconnect(), h.current = !1, S.observe(C.current));
|
|
1934
|
-
}, [C, S]),
|
|
1935
|
-
type:
|
|
1935
|
+
}, [C, S]), c(() => (u({
|
|
1936
|
+
type: U.RegisterDroppable,
|
|
1936
1937
|
element: {
|
|
1937
1938
|
id: r,
|
|
1938
|
-
key:
|
|
1939
|
+
key: a,
|
|
1939
1940
|
disabled: n,
|
|
1940
1941
|
node: C,
|
|
1941
1942
|
rect: g,
|
|
1942
1943
|
data: T
|
|
1943
1944
|
}
|
|
1944
1945
|
}), () => u({
|
|
1945
|
-
type:
|
|
1946
|
-
key:
|
|
1946
|
+
type: U.UnregisterDroppable,
|
|
1947
|
+
key: a,
|
|
1947
1948
|
id: r
|
|
1948
|
-
})), [r]),
|
|
1949
|
+
})), [r]), c(() => {
|
|
1949
1950
|
n !== m.current.disabled && (u({
|
|
1950
|
-
type:
|
|
1951
|
+
type: U.SetDroppableDisabled,
|
|
1951
1952
|
id: r,
|
|
1952
|
-
key:
|
|
1953
|
+
key: a,
|
|
1953
1954
|
disabled: n
|
|
1954
1955
|
}), m.current.disabled = n);
|
|
1955
1956
|
}, [
|
|
1956
1957
|
r,
|
|
1957
|
-
|
|
1958
|
+
a,
|
|
1958
1959
|
n,
|
|
1959
1960
|
u
|
|
1960
1961
|
]), {
|
|
1961
1962
|
active: l,
|
|
1962
1963
|
rect: g,
|
|
1963
|
-
isOver:
|
|
1964
|
+
isOver: d?.id === r,
|
|
1964
1965
|
node: C,
|
|
1965
|
-
over:
|
|
1966
|
+
over: d,
|
|
1966
1967
|
setNodeRef: w
|
|
1967
1968
|
};
|
|
1968
1969
|
}
|
|
1969
|
-
function
|
|
1970
|
-
let { animation: r, children: i } =
|
|
1971
|
-
return !i && !a && l && o(l),
|
|
1970
|
+
function hn(e) {
|
|
1971
|
+
let { animation: r, children: i } = e, [a, o] = p(null), [s, c] = p(null), l = te(i);
|
|
1972
|
+
return !i && !a && l && o(l), D(() => {
|
|
1972
1973
|
if (!s) return;
|
|
1973
1974
|
let e = a?.key, t = a?.props.id;
|
|
1974
1975
|
if (e == null || t == null) {
|
|
@@ -1982,45 +1983,45 @@ function mn(n) {
|
|
|
1982
1983
|
r,
|
|
1983
1984
|
a,
|
|
1984
1985
|
s
|
|
1985
|
-
]),
|
|
1986
|
+
]), t.createElement(t.Fragment, null, i, a ? n(a, { ref: c }) : null);
|
|
1986
1987
|
}
|
|
1987
|
-
var
|
|
1988
|
+
var gn = {
|
|
1988
1989
|
x: 0,
|
|
1989
1990
|
y: 0,
|
|
1990
1991
|
scaleX: 1,
|
|
1991
1992
|
scaleY: 1
|
|
1992
1993
|
};
|
|
1993
|
-
function
|
|
1994
|
-
let { children: n } =
|
|
1995
|
-
return
|
|
1994
|
+
function _n(e) {
|
|
1995
|
+
let { children: n } = e;
|
|
1996
|
+
return t.createElement(Yt.Provider, { value: Jt }, t.createElement(rn.Provider, { value: gn }, n));
|
|
1996
1997
|
}
|
|
1997
|
-
var
|
|
1998
|
+
var vn = {
|
|
1998
1999
|
position: "fixed",
|
|
1999
2000
|
touchAction: "none"
|
|
2000
|
-
},
|
|
2001
|
-
let { as: r, activatorEvent: i, adjustScale: a, children: o, className: s, rect: c, style: l, transform: u, transition: d =
|
|
2001
|
+
}, yn = (e) => F(e) ? "transform 250ms ease" : void 0, bn = /* @__PURE__ */ i((e, n) => {
|
|
2002
|
+
let { as: r, activatorEvent: i, adjustScale: a, children: o, className: s, rect: c, style: l, transform: u, transition: d = yn } = e;
|
|
2002
2003
|
if (!c) return null;
|
|
2003
2004
|
let f = a ? u : {
|
|
2004
2005
|
...u,
|
|
2005
2006
|
scaleX: 1,
|
|
2006
2007
|
scaleY: 1
|
|
2007
2008
|
}, p = {
|
|
2008
|
-
...
|
|
2009
|
+
...vn,
|
|
2009
2010
|
width: c.width,
|
|
2010
2011
|
height: c.height,
|
|
2011
2012
|
top: c.top,
|
|
2012
2013
|
left: c.left,
|
|
2013
2014
|
transform: I.Transform.toString(f),
|
|
2014
|
-
transformOrigin: a && i ?
|
|
2015
|
+
transformOrigin: a && i ? K(i, c) : void 0,
|
|
2015
2016
|
transition: typeof d == "function" ? d(i) : d,
|
|
2016
2017
|
...l
|
|
2017
2018
|
};
|
|
2018
|
-
return
|
|
2019
|
+
return t.createElement(r, {
|
|
2019
2020
|
className: s,
|
|
2020
2021
|
style: p,
|
|
2021
2022
|
ref: n
|
|
2022
2023
|
}, o);
|
|
2023
|
-
}),
|
|
2024
|
+
}), xn = {
|
|
2024
2025
|
duration: 250,
|
|
2025
2026
|
easing: "ease",
|
|
2026
2027
|
keyframes: (e) => {
|
|
@@ -2037,20 +2038,20 @@ var _n = {
|
|
|
2037
2038
|
};
|
|
2038
2039
|
})({ styles: { active: { opacity: "0" } } })
|
|
2039
2040
|
};
|
|
2040
|
-
function
|
|
2041
|
+
function Sn(e) {
|
|
2041
2042
|
let { config: t, draggableNodes: n, droppableContainers: r, measuringConfiguration: i } = e;
|
|
2042
|
-
return
|
|
2043
|
+
return O((e, a) => {
|
|
2043
2044
|
if (t === null) return;
|
|
2044
2045
|
let o = n.get(e);
|
|
2045
2046
|
if (!o) return;
|
|
2046
2047
|
let s = o.node.current;
|
|
2047
2048
|
if (!s) return;
|
|
2048
|
-
let c =
|
|
2049
|
+
let c = Vt(a);
|
|
2049
2050
|
if (!c) return;
|
|
2050
|
-
let { transform: l } =
|
|
2051
|
+
let { transform: l } = S(a).getComputedStyle(a), u = Oe(l);
|
|
2051
2052
|
if (!u) return;
|
|
2052
|
-
let d = typeof t == "function" ? t :
|
|
2053
|
-
return
|
|
2053
|
+
let d = typeof t == "function" ? t : Cn(t);
|
|
2054
|
+
return qe(s, i.draggable.measure), d({
|
|
2054
2055
|
active: {
|
|
2055
2056
|
id: e,
|
|
2056
2057
|
data: o.data,
|
|
@@ -2068,9 +2069,9 @@ function xn(e) {
|
|
|
2068
2069
|
});
|
|
2069
2070
|
});
|
|
2070
2071
|
}
|
|
2071
|
-
function
|
|
2072
|
+
function Cn(e) {
|
|
2072
2073
|
let { duration: t, easing: n, sideEffects: r, keyframes: i } = {
|
|
2073
|
-
...
|
|
2074
|
+
...xn,
|
|
2074
2075
|
...e
|
|
2075
2076
|
};
|
|
2076
2077
|
return (e) => {
|
|
@@ -2112,14 +2113,14 @@ function Sn(e) {
|
|
|
2112
2113
|
});
|
|
2113
2114
|
};
|
|
2114
2115
|
}
|
|
2115
|
-
var
|
|
2116
|
-
function
|
|
2117
|
-
return
|
|
2118
|
-
if (e != null) return
|
|
2116
|
+
var wn = 0;
|
|
2117
|
+
function Tn(e) {
|
|
2118
|
+
return u(() => {
|
|
2119
|
+
if (e != null) return wn++, wn;
|
|
2119
2120
|
}, [e]);
|
|
2120
2121
|
}
|
|
2121
|
-
var
|
|
2122
|
-
let { adjustScale: n = !1, children: r, dropAnimation: i, style: a, transition:
|
|
2122
|
+
var En = /* @__PURE__ */ t.memo((e) => {
|
|
2123
|
+
let { adjustScale: n = !1, children: r, dropAnimation: i, style: a, transition: o, modifiers: c, wrapperElement: l = "div", className: u, zIndex: d = 999 } = e, { activatorEvent: f, active: p, activeNodeRect: m, containerNodeRect: h, draggableNodes: g, droppableContainers: _, dragOverlay: v, over: y, measuringConfiguration: b, scrollableAncestors: x, scrollableAncestorRects: S, windowRect: C } = dn(), w = s(rn), T = Tn(p?.id), E = en(c, {
|
|
2123
2124
|
activatorEvent: f,
|
|
2124
2125
|
active: p,
|
|
2125
2126
|
activeNodeRect: m,
|
|
@@ -2131,13 +2132,13 @@ var Tn = /* @__PURE__ */ e.memo((t) => {
|
|
|
2131
2132
|
scrollableAncestorRects: S,
|
|
2132
2133
|
transform: w,
|
|
2133
2134
|
windowRect: C
|
|
2134
|
-
}), D =
|
|
2135
|
+
}), D = Tt(m), O = Sn({
|
|
2135
2136
|
config: i,
|
|
2136
2137
|
draggableNodes: g,
|
|
2137
2138
|
droppableContainers: _,
|
|
2138
2139
|
measuringConfiguration: b
|
|
2139
2140
|
}), k = D ? v.setRef : void 0;
|
|
2140
|
-
return
|
|
2141
|
+
return t.createElement(_n, null, t.createElement(hn, { animation: O }, p && T ? t.createElement(bn, {
|
|
2141
2142
|
key: T,
|
|
2142
2143
|
id: p.id,
|
|
2143
2144
|
ref: k,
|
|
@@ -2145,7 +2146,7 @@ var Tn = /* @__PURE__ */ e.memo((t) => {
|
|
|
2145
2146
|
activatorEvent: f,
|
|
2146
2147
|
adjustScale: n,
|
|
2147
2148
|
className: u,
|
|
2148
|
-
transition:
|
|
2149
|
+
transition: o,
|
|
2149
2150
|
rect: D,
|
|
2150
2151
|
style: {
|
|
2151
2152
|
zIndex: d,
|
|
@@ -2156,43 +2157,43 @@ var Tn = /* @__PURE__ */ e.memo((t) => {
|
|
|
2156
2157
|
});
|
|
2157
2158
|
//#endregion
|
|
2158
2159
|
//#region node_modules/@dnd-kit/sortable/dist/sortable.esm.js
|
|
2159
|
-
function
|
|
2160
|
+
function Dn(e, t, n) {
|
|
2160
2161
|
let r = e.slice();
|
|
2161
2162
|
return r.splice(n < 0 ? r.length + n : n, 0, r.splice(t, 1)[0]), r;
|
|
2162
2163
|
}
|
|
2163
|
-
function
|
|
2164
|
+
function On(e, t) {
|
|
2164
2165
|
return e.reduce((e, n, r) => {
|
|
2165
2166
|
let i = t.get(n);
|
|
2166
2167
|
return i && (e[r] = i), e;
|
|
2167
2168
|
}, Array(e.length));
|
|
2168
2169
|
}
|
|
2169
|
-
function
|
|
2170
|
+
function kn(e) {
|
|
2170
2171
|
return e !== null && e >= 0;
|
|
2171
2172
|
}
|
|
2172
|
-
function
|
|
2173
|
+
function An(e, t) {
|
|
2173
2174
|
if (e === t) return !0;
|
|
2174
2175
|
if (e.length !== t.length) return !1;
|
|
2175
2176
|
for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
|
|
2176
2177
|
return !0;
|
|
2177
2178
|
}
|
|
2178
|
-
function
|
|
2179
|
+
function jn(e) {
|
|
2179
2180
|
return typeof e == "boolean" ? {
|
|
2180
2181
|
draggable: e,
|
|
2181
2182
|
droppable: e
|
|
2182
2183
|
} : e;
|
|
2183
2184
|
}
|
|
2184
|
-
var
|
|
2185
|
-
let { rects: t, activeIndex: n, overIndex: r, index: i } = e, a =
|
|
2185
|
+
var Mn = (e) => {
|
|
2186
|
+
let { rects: t, activeIndex: n, overIndex: r, index: i } = e, a = Dn(t, r, n), o = t[i], s = a[i];
|
|
2186
2187
|
return !s || !o ? null : {
|
|
2187
2188
|
x: s.left - o.left,
|
|
2188
2189
|
y: s.top - o.top,
|
|
2189
2190
|
scaleX: s.width / o.width,
|
|
2190
2191
|
scaleY: s.height / o.height
|
|
2191
2192
|
};
|
|
2192
|
-
},
|
|
2193
|
+
}, Nn = {
|
|
2193
2194
|
scaleX: 1,
|
|
2194
2195
|
scaleY: 1
|
|
2195
|
-
},
|
|
2196
|
+
}, Pn = (e) => {
|
|
2196
2197
|
let { activeIndex: t, activeNodeRect: n, index: r, rects: i, overIndex: a } = e, o = i[t] ?? n;
|
|
2197
2198
|
if (!o) return null;
|
|
2198
2199
|
if (r === t) {
|
|
@@ -2200,55 +2201,55 @@ var jn = (e) => {
|
|
|
2200
2201
|
return e ? {
|
|
2201
2202
|
x: 0,
|
|
2202
2203
|
y: t < a ? e.top + e.height - (o.top + o.height) : e.top - o.top,
|
|
2203
|
-
...
|
|
2204
|
+
...Nn
|
|
2204
2205
|
} : null;
|
|
2205
2206
|
}
|
|
2206
|
-
let s =
|
|
2207
|
+
let s = Fn(i, r, t);
|
|
2207
2208
|
return r > t && r <= a ? {
|
|
2208
2209
|
x: 0,
|
|
2209
2210
|
y: -o.height - s,
|
|
2210
|
-
...
|
|
2211
|
+
...Nn
|
|
2211
2212
|
} : r < t && r >= a ? {
|
|
2212
2213
|
x: 0,
|
|
2213
2214
|
y: o.height + s,
|
|
2214
|
-
...
|
|
2215
|
+
...Nn
|
|
2215
2216
|
} : {
|
|
2216
2217
|
x: 0,
|
|
2217
2218
|
y: 0,
|
|
2218
|
-
...
|
|
2219
|
+
...Nn
|
|
2219
2220
|
};
|
|
2220
2221
|
};
|
|
2221
|
-
function
|
|
2222
|
+
function Fn(e, t, n) {
|
|
2222
2223
|
let r = e[t], i = e[t - 1], a = e[t + 1];
|
|
2223
2224
|
return r ? n < t ? i ? r.top - (i.top + i.height) : a ? a.top - (r.top + r.height) : 0 : a ? a.top - (r.top + r.height) : i ? r.top - (i.top + i.height) : 0 : 0;
|
|
2224
2225
|
}
|
|
2225
|
-
var
|
|
2226
|
+
var In = "Sortable", Ln = /* @__PURE__ */ t.createContext({
|
|
2226
2227
|
activeIndex: -1,
|
|
2227
|
-
containerId:
|
|
2228
|
+
containerId: In,
|
|
2228
2229
|
disableTransforms: !1,
|
|
2229
2230
|
items: [],
|
|
2230
2231
|
overIndex: -1,
|
|
2231
2232
|
useDragOverlay: !1,
|
|
2232
2233
|
sortedRects: [],
|
|
2233
|
-
strategy:
|
|
2234
|
+
strategy: Mn,
|
|
2234
2235
|
disabled: {
|
|
2235
2236
|
draggable: !1,
|
|
2236
2237
|
droppable: !1
|
|
2237
2238
|
}
|
|
2238
2239
|
});
|
|
2239
|
-
function
|
|
2240
|
-
let { children: n, id: r, items: i, strategy: a =
|
|
2241
|
-
|
|
2240
|
+
function Rn(e) {
|
|
2241
|
+
let { children: n, id: r, items: i, strategy: a = Mn, disabled: o = !1 } = e, { active: s, dragOverlay: l, droppableRects: d, over: p, measureDroppableContainers: m } = dn(), h = ne(In, r), g = l.rect !== null, _ = u(() => i.map((e) => typeof e == "object" && "id" in e ? e.id : e), [i]), v = s != null, y = s ? _.indexOf(s.id) : -1, b = p ? _.indexOf(p.id) : -1, x = f(_), S = !An(_, x.current), C = b !== -1 && y === -1 || S, w = jn(o);
|
|
2242
|
+
D(() => {
|
|
2242
2243
|
S && v && m(_);
|
|
2243
2244
|
}, [
|
|
2244
2245
|
S,
|
|
2245
2246
|
_,
|
|
2246
2247
|
v,
|
|
2247
2248
|
m
|
|
2248
|
-
]),
|
|
2249
|
+
]), c(() => {
|
|
2249
2250
|
x.current = _;
|
|
2250
2251
|
}, [_]);
|
|
2251
|
-
let T =
|
|
2252
|
+
let T = u(() => ({
|
|
2252
2253
|
activeIndex: y,
|
|
2253
2254
|
containerId: h,
|
|
2254
2255
|
disabled: w,
|
|
@@ -2256,7 +2257,7 @@ function Ln(t) {
|
|
|
2256
2257
|
items: _,
|
|
2257
2258
|
overIndex: b,
|
|
2258
2259
|
useDragOverlay: g,
|
|
2259
|
-
sortedRects:
|
|
2260
|
+
sortedRects: On(_, d),
|
|
2260
2261
|
strategy: a
|
|
2261
2262
|
}), [
|
|
2262
2263
|
y,
|
|
@@ -2266,33 +2267,33 @@ function Ln(t) {
|
|
|
2266
2267
|
C,
|
|
2267
2268
|
_,
|
|
2268
2269
|
b,
|
|
2269
|
-
|
|
2270
|
+
d,
|
|
2270
2271
|
g,
|
|
2271
2272
|
a
|
|
2272
2273
|
]);
|
|
2273
|
-
return
|
|
2274
|
+
return t.createElement(Ln.Provider, { value: T }, n);
|
|
2274
2275
|
}
|
|
2275
|
-
var
|
|
2276
|
+
var zn = (e) => {
|
|
2276
2277
|
let { id: t, items: n, activeIndex: r, overIndex: i } = e;
|
|
2277
|
-
return
|
|
2278
|
-
},
|
|
2278
|
+
return Dn(n, r, i).indexOf(t);
|
|
2279
|
+
}, Bn = (e) => {
|
|
2279
2280
|
let { containerId: t, isSorting: n, wasDragging: r, index: i, items: a, newIndex: o, previousItems: s, previousContainerId: c, transition: l } = e;
|
|
2280
2281
|
return !l || !r || s !== a && i === o ? !1 : n ? !0 : o !== i && t === c;
|
|
2281
|
-
},
|
|
2282
|
+
}, Vn = {
|
|
2282
2283
|
duration: 200,
|
|
2283
2284
|
easing: "ease"
|
|
2284
|
-
},
|
|
2285
|
-
property:
|
|
2285
|
+
}, Hn = "transform", Un = /* @__PURE__ */ I.Transition.toString({
|
|
2286
|
+
property: Hn,
|
|
2286
2287
|
duration: 0,
|
|
2287
2288
|
easing: "linear"
|
|
2288
|
-
}),
|
|
2289
|
-
function
|
|
2290
|
-
let { disabled: t, index: n, node: r, rect: i } = e, [a, o] =
|
|
2291
|
-
return
|
|
2292
|
-
if (!t && n !==
|
|
2289
|
+
}), Wn = { roleDescription: "sortable" };
|
|
2290
|
+
function Gn(e) {
|
|
2291
|
+
let { disabled: t, index: n, node: r, rect: i } = e, [a, o] = p(null), s = f(n);
|
|
2292
|
+
return D(() => {
|
|
2293
|
+
if (!t && n !== s.current && r.current) {
|
|
2293
2294
|
let e = i.current;
|
|
2294
2295
|
if (e) {
|
|
2295
|
-
let t =
|
|
2296
|
+
let t = J(r.current, { ignoreTransform: !0 }), n = {
|
|
2296
2297
|
x: e.left - t.left,
|
|
2297
2298
|
y: e.top - t.top,
|
|
2298
2299
|
scaleX: e.width / t.width,
|
|
@@ -2301,18 +2302,18 @@ function Wn(e) {
|
|
|
2301
2302
|
(n.x || n.y) && o(n);
|
|
2302
2303
|
}
|
|
2303
2304
|
}
|
|
2304
|
-
n !==
|
|
2305
|
+
n !== s.current && (s.current = n);
|
|
2305
2306
|
}, [
|
|
2306
2307
|
t,
|
|
2307
2308
|
n,
|
|
2308
2309
|
r,
|
|
2309
2310
|
i
|
|
2310
|
-
]),
|
|
2311
|
+
]), c(() => {
|
|
2311
2312
|
a && o(null);
|
|
2312
2313
|
}, [a]), a;
|
|
2313
2314
|
}
|
|
2314
|
-
function
|
|
2315
|
-
let { animateLayoutChanges: t =
|
|
2315
|
+
function Kn(e) {
|
|
2316
|
+
let { animateLayoutChanges: t = Bn, attributes: n, disabled: r, data: i, getNewIndex: a = zn, id: o, strategy: l, resizeObserverConfig: d, transition: p = Vn } = e, { items: m, containerId: h, activeIndex: g, disabled: _, disableTransforms: y, sortedRects: b, overIndex: x, useDragOverlay: S, strategy: C } = s(Ln), w = qn(r, _), T = m.indexOf(o), E = u(() => ({
|
|
2316
2317
|
sortable: {
|
|
2317
2318
|
containerId: h,
|
|
2318
2319
|
index: T,
|
|
@@ -2324,44 +2325,44 @@ function Gn(e) {
|
|
|
2324
2325
|
i,
|
|
2325
2326
|
T,
|
|
2326
2327
|
m
|
|
2327
|
-
]), D =
|
|
2328
|
-
id:
|
|
2328
|
+
]), D = u(() => m.slice(m.indexOf(o)), [m, o]), { rect: O, node: k, isOver: ee, setNodeRef: A } = mn({
|
|
2329
|
+
id: o,
|
|
2329
2330
|
data: E,
|
|
2330
2331
|
disabled: w.droppable,
|
|
2331
2332
|
resizeObserverConfig: {
|
|
2332
2333
|
updateMeasurementsFor: D,
|
|
2333
|
-
...
|
|
2334
|
+
...d
|
|
2334
2335
|
}
|
|
2335
|
-
}), { active:
|
|
2336
|
-
id:
|
|
2336
|
+
}), { active: j, activatorEvent: te, activeNodeRect: M, attributes: ne, setNodeRef: N, listeners: re, isDragging: P, over: ie, setActivatorNodeRef: ae, transform: oe } = un({
|
|
2337
|
+
id: o,
|
|
2337
2338
|
data: E,
|
|
2338
2339
|
attributes: {
|
|
2339
|
-
...
|
|
2340
|
+
...Wn,
|
|
2340
2341
|
...n
|
|
2341
2342
|
},
|
|
2342
2343
|
disabled: w.draggable
|
|
2343
|
-
}),
|
|
2344
|
+
}), se = v(A, N), L = !!j, R = L && !y && kn(g) && kn(x), z = !S && P, ce = R ? (z && R ? oe : null) ?? (l ?? C)({
|
|
2344
2345
|
rects: b,
|
|
2345
|
-
activeNodeRect:
|
|
2346
|
+
activeNodeRect: M,
|
|
2346
2347
|
activeIndex: g,
|
|
2347
2348
|
overIndex: x,
|
|
2348
2349
|
index: T
|
|
2349
|
-
}) : null,
|
|
2350
|
-
id:
|
|
2350
|
+
}) : null, B = kn(g) && kn(x) ? a({
|
|
2351
|
+
id: o,
|
|
2351
2352
|
items: m,
|
|
2352
2353
|
activeIndex: g,
|
|
2353
2354
|
overIndex: x
|
|
2354
|
-
}) : T, V =
|
|
2355
|
+
}) : T, V = j?.id, H = f({
|
|
2355
2356
|
activeId: V,
|
|
2356
2357
|
items: m,
|
|
2357
|
-
newIndex:
|
|
2358
|
+
newIndex: B,
|
|
2358
2359
|
containerId: h
|
|
2359
|
-
}),
|
|
2360
|
-
active:
|
|
2360
|
+
}), le = m !== H.current.items, ue = t({
|
|
2361
|
+
active: j,
|
|
2361
2362
|
containerId: h,
|
|
2362
|
-
isDragging:
|
|
2363
|
-
isSorting:
|
|
2364
|
-
id:
|
|
2363
|
+
isDragging: P,
|
|
2364
|
+
isSorting: L,
|
|
2365
|
+
id: o,
|
|
2365
2366
|
index: T,
|
|
2366
2367
|
items: m,
|
|
2367
2368
|
newIndex: H.current.newIndex,
|
|
@@ -2369,20 +2370,20 @@ function Gn(e) {
|
|
|
2369
2370
|
previousContainerId: H.current.containerId,
|
|
2370
2371
|
transition: p,
|
|
2371
2372
|
wasDragging: H.current.activeId != null
|
|
2372
|
-
}),
|
|
2373
|
-
disabled: !
|
|
2373
|
+
}), de = Gn({
|
|
2374
|
+
disabled: !ue,
|
|
2374
2375
|
index: T,
|
|
2375
2376
|
node: k,
|
|
2376
2377
|
rect: O
|
|
2377
2378
|
});
|
|
2378
|
-
return
|
|
2379
|
-
|
|
2379
|
+
return c(() => {
|
|
2380
|
+
L && H.current.newIndex !== B && (H.current.newIndex = B), h !== H.current.containerId && (H.current.containerId = h), m !== H.current.items && (H.current.items = m);
|
|
2380
2381
|
}, [
|
|
2381
|
-
|
|
2382
|
-
|
|
2382
|
+
L,
|
|
2383
|
+
B,
|
|
2383
2384
|
h,
|
|
2384
2385
|
m
|
|
2385
|
-
]),
|
|
2386
|
+
]), c(() => {
|
|
2386
2387
|
if (V === H.current.activeId) return;
|
|
2387
2388
|
if (V != null && H.current.activeId == null) {
|
|
2388
2389
|
H.current.activeId = V;
|
|
@@ -2393,37 +2394,37 @@ function Gn(e) {
|
|
|
2393
2394
|
}, 50);
|
|
2394
2395
|
return () => clearTimeout(e);
|
|
2395
2396
|
}, [V]), {
|
|
2396
|
-
active:
|
|
2397
|
+
active: j,
|
|
2397
2398
|
activeIndex: g,
|
|
2398
|
-
attributes:
|
|
2399
|
+
attributes: ne,
|
|
2399
2400
|
data: E,
|
|
2400
2401
|
rect: O,
|
|
2401
2402
|
index: T,
|
|
2402
|
-
newIndex:
|
|
2403
|
+
newIndex: B,
|
|
2403
2404
|
items: m,
|
|
2404
|
-
isOver:
|
|
2405
|
-
isSorting:
|
|
2406
|
-
isDragging:
|
|
2407
|
-
listeners:
|
|
2405
|
+
isOver: ee,
|
|
2406
|
+
isSorting: L,
|
|
2407
|
+
isDragging: P,
|
|
2408
|
+
listeners: re,
|
|
2408
2409
|
node: k,
|
|
2409
2410
|
overIndex: x,
|
|
2410
|
-
over:
|
|
2411
|
-
setNodeRef:
|
|
2411
|
+
over: ie,
|
|
2412
|
+
setNodeRef: se,
|
|
2412
2413
|
setActivatorNodeRef: ae,
|
|
2413
|
-
setDroppableNodeRef:
|
|
2414
|
-
setDraggableNodeRef:
|
|
2415
|
-
transform:
|
|
2416
|
-
transition:
|
|
2414
|
+
setDroppableNodeRef: A,
|
|
2415
|
+
setDraggableNodeRef: N,
|
|
2416
|
+
transform: de ?? ce,
|
|
2417
|
+
transition: fe()
|
|
2417
2418
|
};
|
|
2418
|
-
function
|
|
2419
|
-
if (
|
|
2420
|
-
if (!(
|
|
2419
|
+
function fe() {
|
|
2420
|
+
if (de || le && H.current.newIndex === T) return Un;
|
|
2421
|
+
if (!(z && !F(te) || !p) && (L || ue)) return I.Transition.toString({
|
|
2421
2422
|
...p,
|
|
2422
|
-
property:
|
|
2423
|
+
property: Hn
|
|
2423
2424
|
});
|
|
2424
2425
|
}
|
|
2425
2426
|
}
|
|
2426
|
-
function
|
|
2427
|
+
function qn(e, t) {
|
|
2427
2428
|
return typeof e == "boolean" ? {
|
|
2428
2429
|
draggable: e,
|
|
2429
2430
|
droppable: !1
|
|
@@ -2432,19 +2433,19 @@ function Kn(e, t) {
|
|
|
2432
2433
|
droppable: e?.droppable ?? t.droppable
|
|
2433
2434
|
};
|
|
2434
2435
|
}
|
|
2435
|
-
function
|
|
2436
|
+
function Jn(e) {
|
|
2436
2437
|
if (!e) return !1;
|
|
2437
2438
|
let t = e.data.current;
|
|
2438
2439
|
return !!(t && "sortable" in t && typeof t.sortable == "object" && "containerId" in t.sortable && "items" in t.sortable && "index" in t.sortable);
|
|
2439
2440
|
}
|
|
2440
|
-
var
|
|
2441
|
+
var Yn = [
|
|
2441
2442
|
$.Down,
|
|
2442
2443
|
$.Right,
|
|
2443
2444
|
$.Up,
|
|
2444
2445
|
$.Left
|
|
2445
|
-
],
|
|
2446
|
+
], Xn = (e, t) => {
|
|
2446
2447
|
let { context: { active: n, collisionRect: r, droppableRects: i, droppableContainers: a, over: o, scrollableAncestors: s } } = t;
|
|
2447
|
-
if (
|
|
2448
|
+
if (Yn.includes(e.code)) {
|
|
2448
2449
|
if (e.preventDefault(), !n || !r) return;
|
|
2449
2450
|
let t = [];
|
|
2450
2451
|
a.getEnabled().forEach((n) => {
|
|
@@ -2465,17 +2466,17 @@ var Jn = [
|
|
|
2465
2466
|
break;
|
|
2466
2467
|
}
|
|
2467
2468
|
});
|
|
2468
|
-
let c =
|
|
2469
|
+
let c = q({
|
|
2469
2470
|
active: n,
|
|
2470
2471
|
collisionRect: r,
|
|
2471
2472
|
droppableRects: i,
|
|
2472
2473
|
droppableContainers: t,
|
|
2473
2474
|
pointerCoordinates: null
|
|
2474
|
-
}), l =
|
|
2475
|
+
}), l = ye(c, "id");
|
|
2475
2476
|
if (l === o?.id && c.length > 1 && (l = c[1].id), l != null) {
|
|
2476
2477
|
let e = a.get(n.id), t = a.get(l), o = t ? i.get(t.id) : null, c = t?.node.current;
|
|
2477
2478
|
if (c && o && e && t) {
|
|
2478
|
-
let n =
|
|
2479
|
+
let n = Ne(c).some((e, t) => s[t] !== e), i = Zn(e, t), a = Qn(e, t), l = n || !i ? {
|
|
2479
2480
|
x: 0,
|
|
2480
2481
|
y: 0
|
|
2481
2482
|
} : {
|
|
@@ -2490,21 +2491,21 @@ var Jn = [
|
|
|
2490
2491
|
}
|
|
2491
2492
|
}
|
|
2492
2493
|
};
|
|
2493
|
-
function Xn(e, t) {
|
|
2494
|
-
return !qn(e) || !qn(t) ? !1 : e.data.current.sortable.containerId === t.data.current.sortable.containerId;
|
|
2495
|
-
}
|
|
2496
2494
|
function Zn(e, t) {
|
|
2497
|
-
return !
|
|
2495
|
+
return !Jn(e) || !Jn(t) ? !1 : e.data.current.sortable.containerId === t.data.current.sortable.containerId;
|
|
2496
|
+
}
|
|
2497
|
+
function Qn(e, t) {
|
|
2498
|
+
return !Jn(e) || !Jn(t) || !Zn(e, t) ? !1 : e.data.current.sortable.index < t.data.current.sortable.index;
|
|
2498
2499
|
}
|
|
2499
2500
|
//#endregion
|
|
2500
2501
|
//#region node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js
|
|
2501
|
-
var
|
|
2502
|
+
var $n = (e) => {
|
|
2502
2503
|
let { transform: t } = e;
|
|
2503
2504
|
return {
|
|
2504
2505
|
...t,
|
|
2505
2506
|
x: 0
|
|
2506
2507
|
};
|
|
2507
|
-
},
|
|
2508
|
+
}, er = {
|
|
2508
2509
|
text: "Aa",
|
|
2509
2510
|
textarea: "≡",
|
|
2510
2511
|
select: "▾",
|
|
@@ -2515,80 +2516,80 @@ var Qn = (e) => {
|
|
|
2515
2516
|
email: "@",
|
|
2516
2517
|
number: "#"
|
|
2517
2518
|
};
|
|
2518
|
-
function
|
|
2519
|
-
return
|
|
2519
|
+
function tr(e) {
|
|
2520
|
+
return er[e] ?? "?";
|
|
2520
2521
|
}
|
|
2521
|
-
function
|
|
2522
|
-
let { attributes:
|
|
2523
|
-
return /* @__PURE__ */
|
|
2524
|
-
ref:
|
|
2522
|
+
function nr({ field: t, onRemove: n }) {
|
|
2523
|
+
let { t: r } = e(), { attributes: i, listeners: a, setNodeRef: o, transform: s, transition: c, isDragging: l } = Kn({ id: t.id });
|
|
2524
|
+
return /* @__PURE__ */ h("div", {
|
|
2525
|
+
ref: o,
|
|
2525
2526
|
style: {
|
|
2526
|
-
transform:
|
|
2527
|
-
transition:
|
|
2528
|
-
opacity:
|
|
2527
|
+
transform: s ? `translate3d(${String(s.x)}px, ${String(s.y)}px, 0)` : void 0,
|
|
2528
|
+
transition: c ?? void 0,
|
|
2529
|
+
opacity: l ? .4 : 1
|
|
2529
2530
|
},
|
|
2530
|
-
className: `flex items-center gap-3 rounded-md border p-3 ${
|
|
2531
|
+
className: `flex items-center gap-3 rounded-md border p-3 ${l ? "border-accent bg-background shadow-md" : "border-border bg-background"}`,
|
|
2531
2532
|
children: [
|
|
2532
|
-
/* @__PURE__ */
|
|
2533
|
+
/* @__PURE__ */ m("button", {
|
|
2533
2534
|
type: "button",
|
|
2534
2535
|
className: "text-muted-foreground flex-none cursor-grab text-base leading-none select-none",
|
|
2535
2536
|
"aria-label": "Arrastar campo",
|
|
2536
|
-
...
|
|
2537
|
-
...
|
|
2537
|
+
...i,
|
|
2538
|
+
...a,
|
|
2538
2539
|
children: "⠇"
|
|
2539
2540
|
}),
|
|
2540
|
-
/* @__PURE__ */
|
|
2541
|
+
/* @__PURE__ */ m("span", {
|
|
2541
2542
|
className: "bg-muted flex h-8 w-8 flex-none items-center justify-center rounded text-sm",
|
|
2542
|
-
children:
|
|
2543
|
+
children: tr(t.type)
|
|
2543
2544
|
}),
|
|
2544
|
-
/* @__PURE__ */
|
|
2545
|
+
/* @__PURE__ */ h("div", {
|
|
2545
2546
|
className: "min-w-0 flex-1",
|
|
2546
2547
|
children: [
|
|
2547
|
-
/* @__PURE__ */
|
|
2548
|
+
/* @__PURE__ */ m("span", {
|
|
2548
2549
|
className: "text-foreground truncate text-sm font-medium",
|
|
2549
|
-
children:
|
|
2550
|
+
children: t.label
|
|
2550
2551
|
}),
|
|
2551
|
-
|
|
2552
|
+
t.required && /* @__PURE__ */ m("span", {
|
|
2552
2553
|
className: "text-destructive ml-0.5 text-sm",
|
|
2553
2554
|
"aria-label": "Obrigatório",
|
|
2554
2555
|
children: "*"
|
|
2555
2556
|
}),
|
|
2556
|
-
/* @__PURE__ */
|
|
2557
|
+
/* @__PURE__ */ m("span", {
|
|
2557
2558
|
className: "text-muted-foreground ml-2 text-xs",
|
|
2558
|
-
children:
|
|
2559
|
+
children: t.type
|
|
2559
2560
|
})
|
|
2560
2561
|
]
|
|
2561
2562
|
}),
|
|
2562
|
-
/* @__PURE__ */
|
|
2563
|
+
/* @__PURE__ */ m("button", {
|
|
2563
2564
|
type: "button",
|
|
2564
2565
|
onClick: () => {
|
|
2565
|
-
t
|
|
2566
|
+
n(t.id);
|
|
2566
2567
|
},
|
|
2567
2568
|
className: "text-muted-foreground hover:text-destructive flex h-6 w-6 flex-none items-center justify-center rounded text-sm transition-colors",
|
|
2568
|
-
"aria-label": "
|
|
2569
|
+
"aria-label": r("middag.ui.form_builder.remove_field"),
|
|
2569
2570
|
children: "×"
|
|
2570
2571
|
})
|
|
2571
2572
|
]
|
|
2572
2573
|
});
|
|
2573
2574
|
}
|
|
2574
|
-
function
|
|
2575
|
-
return /* @__PURE__ */
|
|
2575
|
+
function rr({ field: e }) {
|
|
2576
|
+
return /* @__PURE__ */ h("div", {
|
|
2576
2577
|
className: "border-accent bg-background flex items-center gap-3 rounded-md border p-3 shadow-md",
|
|
2577
2578
|
children: [
|
|
2578
|
-
/* @__PURE__ */
|
|
2579
|
+
/* @__PURE__ */ m("span", {
|
|
2579
2580
|
className: "text-muted-foreground flex-none text-base leading-none select-none",
|
|
2580
2581
|
children: "⠇"
|
|
2581
2582
|
}),
|
|
2582
|
-
/* @__PURE__ */
|
|
2583
|
+
/* @__PURE__ */ m("span", {
|
|
2583
2584
|
className: "bg-muted flex h-8 w-8 flex-none items-center justify-center rounded text-sm",
|
|
2584
|
-
children:
|
|
2585
|
+
children: tr(e.type)
|
|
2585
2586
|
}),
|
|
2586
|
-
/* @__PURE__ */
|
|
2587
|
+
/* @__PURE__ */ h("div", {
|
|
2587
2588
|
className: "min-w-0 flex-1",
|
|
2588
|
-
children: [/* @__PURE__ */
|
|
2589
|
+
children: [/* @__PURE__ */ m("span", {
|
|
2589
2590
|
className: "text-foreground text-sm font-medium",
|
|
2590
2591
|
children: e.label
|
|
2591
|
-
}), e.required && /* @__PURE__ */
|
|
2592
|
+
}), e.required && /* @__PURE__ */ m("span", {
|
|
2592
2593
|
className: "text-destructive ml-0.5 text-sm",
|
|
2593
2594
|
children: "*"
|
|
2594
2595
|
})]
|
|
@@ -2596,31 +2597,31 @@ function nr({ field: e }) {
|
|
|
2596
2597
|
]
|
|
2597
2598
|
});
|
|
2598
2599
|
}
|
|
2599
|
-
function
|
|
2600
|
-
let t = /* @__PURE__ */
|
|
2600
|
+
function ir({ field: e }) {
|
|
2601
|
+
let t = /* @__PURE__ */ h("label", {
|
|
2601
2602
|
className: "text-foreground mb-1 block text-xs font-medium",
|
|
2602
|
-
children: [e.label, e.required && /* @__PURE__ */
|
|
2603
|
+
children: [e.label, e.required && /* @__PURE__ */ m("span", {
|
|
2603
2604
|
className: "text-destructive ml-0.5",
|
|
2604
2605
|
children: "*"
|
|
2605
2606
|
})]
|
|
2606
2607
|
});
|
|
2607
2608
|
switch (e.type) {
|
|
2608
|
-
case "textarea": return /* @__PURE__ */
|
|
2609
|
-
case "select": return /* @__PURE__ */
|
|
2609
|
+
case "textarea": return /* @__PURE__ */ h("div", { children: [t, /* @__PURE__ */ m("div", { className: "border-border bg-background h-16 rounded-md border px-2 py-1 text-xs" })] });
|
|
2610
|
+
case "select": return /* @__PURE__ */ h("div", { children: [t, /* @__PURE__ */ h("div", {
|
|
2610
2611
|
className: "border-border bg-background text-muted-foreground flex items-center justify-between rounded-md border px-2 py-1.5 text-xs",
|
|
2611
|
-
children: [/* @__PURE__ */
|
|
2612
|
+
children: [/* @__PURE__ */ m("span", { children: "Selecione..." }), /* @__PURE__ */ m("span", {
|
|
2612
2613
|
className: "text-[10px]",
|
|
2613
2614
|
children: "▾"
|
|
2614
2615
|
})]
|
|
2615
2616
|
})] });
|
|
2616
|
-
case "checkbox": return /* @__PURE__ */
|
|
2617
|
+
case "checkbox": return /* @__PURE__ */ h("div", {
|
|
2617
2618
|
className: "flex items-center gap-2",
|
|
2618
|
-
children: [/* @__PURE__ */
|
|
2619
|
+
children: [/* @__PURE__ */ m("div", { className: "border-border h-4 w-4 rounded border" }), /* @__PURE__ */ m("span", {
|
|
2619
2620
|
className: "text-foreground text-xs",
|
|
2620
2621
|
children: e.label
|
|
2621
2622
|
})]
|
|
2622
2623
|
});
|
|
2623
|
-
case "rating": return /* @__PURE__ */
|
|
2624
|
+
case "rating": return /* @__PURE__ */ h("div", { children: [t, /* @__PURE__ */ m("div", {
|
|
2624
2625
|
className: "flex gap-1",
|
|
2625
2626
|
children: [
|
|
2626
2627
|
1,
|
|
@@ -2628,103 +2629,103 @@ function rr({ field: e }) {
|
|
|
2628
2629
|
3,
|
|
2629
2630
|
4,
|
|
2630
2631
|
5
|
|
2631
|
-
].map((e) => /* @__PURE__ */
|
|
2632
|
+
].map((e) => /* @__PURE__ */ m("span", {
|
|
2632
2633
|
className: "text-muted-foreground/40 text-sm",
|
|
2633
2634
|
children: "★"
|
|
2634
2635
|
}, e))
|
|
2635
2636
|
})] });
|
|
2636
|
-
case "file": return /* @__PURE__ */
|
|
2637
|
+
case "file": return /* @__PURE__ */ h("div", { children: [t, /* @__PURE__ */ m("div", {
|
|
2637
2638
|
className: "border-border text-muted-foreground flex items-center justify-center rounded-md border border-dashed px-2 py-3 text-xs",
|
|
2638
2639
|
children: "Clique ou arraste um arquivo"
|
|
2639
2640
|
})] });
|
|
2640
|
-
default: return /* @__PURE__ */
|
|
2641
|
+
default: return /* @__PURE__ */ h("div", { children: [t, /* @__PURE__ */ m("div", {
|
|
2641
2642
|
className: "border-border bg-background rounded-md border px-2 py-1.5 text-xs",
|
|
2642
|
-
children: e.placeholder ? /* @__PURE__ */
|
|
2643
|
+
children: e.placeholder ? /* @__PURE__ */ m("span", {
|
|
2643
2644
|
className: "text-muted-foreground",
|
|
2644
2645
|
children: e.placeholder
|
|
2645
|
-
}) : /* @__PURE__ */
|
|
2646
|
+
}) : /* @__PURE__ */ m("span", { children: "\xA0" })
|
|
2646
2647
|
})] });
|
|
2647
2648
|
}
|
|
2648
2649
|
}
|
|
2649
|
-
function
|
|
2650
|
-
let {
|
|
2651
|
-
|
|
2652
|
-
}, []),
|
|
2653
|
-
|
|
2650
|
+
function ar({ block: t }) {
|
|
2651
|
+
let { t: n } = e(), { data: r } = t, [i, a] = p(r.fields), [s, c] = p(null), l = me(W(ct, { activationConstraint: { distance: 5 } }), W(rt, { coordinateGetter: Xn })), u = o((e) => {
|
|
2652
|
+
c(String(e.active.id));
|
|
2653
|
+
}, []), d = o((e) => {
|
|
2654
|
+
c(null);
|
|
2654
2655
|
let { active: t, over: n } = e;
|
|
2655
|
-
n && t.id !== n.id &&
|
|
2656
|
-
}, []),
|
|
2657
|
-
|
|
2658
|
-
}, []),
|
|
2659
|
-
return /* @__PURE__ */
|
|
2656
|
+
n && t.id !== n.id && a((e) => Dn(e, e.findIndex((e) => e.id === t.id), e.findIndex((e) => e.id === n.id)));
|
|
2657
|
+
}, []), f = o((e) => {
|
|
2658
|
+
a((t) => t.filter((t) => t.id !== e));
|
|
2659
|
+
}, []), g = s ? i.find((e) => e.id === s) : null;
|
|
2660
|
+
return /* @__PURE__ */ h("div", {
|
|
2660
2661
|
className: "flex min-h-[400px] gap-4",
|
|
2661
2662
|
children: [
|
|
2662
|
-
/* @__PURE__ */
|
|
2663
|
+
/* @__PURE__ */ h("div", {
|
|
2663
2664
|
className: "w-[200px] flex-none",
|
|
2664
|
-
children: [/* @__PURE__ */
|
|
2665
|
+
children: [/* @__PURE__ */ m("h3", {
|
|
2665
2666
|
className: "text-foreground mb-3 text-sm font-semibold",
|
|
2666
2667
|
children: "Campos Disponíveis"
|
|
2667
|
-
}), /* @__PURE__ */
|
|
2668
|
+
}), /* @__PURE__ */ m("div", {
|
|
2668
2669
|
className: "grid grid-cols-2 gap-2",
|
|
2669
|
-
children:
|
|
2670
|
+
children: r.availableTypes.map((e) => /* @__PURE__ */ h("div", {
|
|
2670
2671
|
className: "bg-background hover:border-accent cursor-grab rounded-md border p-2 text-center text-xs transition-colors",
|
|
2671
|
-
children: [/* @__PURE__ */
|
|
2672
|
+
children: [/* @__PURE__ */ m("div", {
|
|
2672
2673
|
className: "mb-1 text-base leading-none",
|
|
2673
2674
|
children: e.icon
|
|
2674
|
-
}), /* @__PURE__ */
|
|
2675
|
+
}), /* @__PURE__ */ m("span", {
|
|
2675
2676
|
className: "text-foreground",
|
|
2676
2677
|
children: e.label
|
|
2677
2678
|
})]
|
|
2678
2679
|
}, e.type))
|
|
2679
2680
|
})]
|
|
2680
2681
|
}),
|
|
2681
|
-
/* @__PURE__ */
|
|
2682
|
+
/* @__PURE__ */ h("div", {
|
|
2682
2683
|
className: "min-w-0 flex-1",
|
|
2683
|
-
children: [/* @__PURE__ */
|
|
2684
|
+
children: [/* @__PURE__ */ h("div", {
|
|
2684
2685
|
className: "mb-3 flex items-center justify-between",
|
|
2685
|
-
children: [/* @__PURE__ */
|
|
2686
|
+
children: [/* @__PURE__ */ m("h3", {
|
|
2686
2687
|
className: "text-foreground text-sm font-semibold",
|
|
2687
2688
|
children: "Campos do Formulário"
|
|
2688
|
-
}), /* @__PURE__ */
|
|
2689
|
+
}), /* @__PURE__ */ h("span", {
|
|
2689
2690
|
className: "text-muted-foreground text-xs",
|
|
2690
2691
|
children: [
|
|
2691
|
-
|
|
2692
|
+
i.length,
|
|
2692
2693
|
" ",
|
|
2693
|
-
|
|
2694
|
+
i.length === 1 ? "campo" : "campos"
|
|
2694
2695
|
]
|
|
2695
2696
|
})]
|
|
2696
|
-
}), /* @__PURE__ */
|
|
2697
|
-
sensors:
|
|
2698
|
-
collisionDetection:
|
|
2699
|
-
modifiers: [
|
|
2700
|
-
onDragStart:
|
|
2701
|
-
onDragEnd:
|
|
2702
|
-
children: [/* @__PURE__ */
|
|
2703
|
-
items:
|
|
2704
|
-
strategy:
|
|
2705
|
-
children:
|
|
2697
|
+
}), /* @__PURE__ */ h(on, {
|
|
2698
|
+
sensors: l,
|
|
2699
|
+
collisionDetection: xe,
|
|
2700
|
+
modifiers: [$n],
|
|
2701
|
+
onDragStart: u,
|
|
2702
|
+
onDragEnd: d,
|
|
2703
|
+
children: [/* @__PURE__ */ m(Rn, {
|
|
2704
|
+
items: i.map((e) => e.id),
|
|
2705
|
+
strategy: Pn,
|
|
2706
|
+
children: i.length > 0 ? /* @__PURE__ */ m("div", {
|
|
2706
2707
|
className: "space-y-2",
|
|
2707
|
-
children:
|
|
2708
|
+
children: i.map((e) => /* @__PURE__ */ m(nr, {
|
|
2708
2709
|
field: e,
|
|
2709
|
-
onRemove:
|
|
2710
|
+
onRemove: f
|
|
2710
2711
|
}, e.id))
|
|
2711
|
-
}) : /* @__PURE__ */
|
|
2712
|
+
}) : /* @__PURE__ */ m("div", {
|
|
2712
2713
|
className: "border-border text-muted-foreground flex min-h-[200px] items-center justify-center rounded-lg border border-dashed text-sm",
|
|
2713
|
-
children: "
|
|
2714
|
+
children: n("middag.ui.form_builder.drop_hint")
|
|
2714
2715
|
})
|
|
2715
|
-
}), /* @__PURE__ */
|
|
2716
|
+
}), /* @__PURE__ */ m(En, { children: g ? /* @__PURE__ */ m(rr, { field: g }) : null })]
|
|
2716
2717
|
})]
|
|
2717
2718
|
}),
|
|
2718
|
-
/* @__PURE__ */
|
|
2719
|
+
/* @__PURE__ */ h("div", {
|
|
2719
2720
|
className: "w-[280px] flex-none",
|
|
2720
|
-
children: [/* @__PURE__ */
|
|
2721
|
+
children: [/* @__PURE__ */ m("h3", {
|
|
2721
2722
|
className: "text-foreground mb-3 text-sm font-semibold",
|
|
2722
|
-
children: "
|
|
2723
|
-
}), /* @__PURE__ */
|
|
2723
|
+
children: n("middag.ui.form_builder.preview")
|
|
2724
|
+
}), /* @__PURE__ */ m("div", {
|
|
2724
2725
|
className: "bg-muted/30 space-y-3 rounded-lg border p-4",
|
|
2725
|
-
children:
|
|
2726
|
+
children: i.length > 0 ? i.map((e) => /* @__PURE__ */ m(ir, { field: e }, e.id)) : /* @__PURE__ */ m("p", {
|
|
2726
2727
|
className: "text-muted-foreground text-center text-xs",
|
|
2727
|
-
children: "
|
|
2728
|
+
children: n("middag.ui.form_builder.no_fields")
|
|
2728
2729
|
})
|
|
2729
2730
|
})]
|
|
2730
2731
|
})
|
|
@@ -2732,4 +2733,4 @@ function ir({ block: e }) {
|
|
|
2732
2733
|
});
|
|
2733
2734
|
}
|
|
2734
2735
|
//#endregion
|
|
2735
|
-
export {
|
|
2736
|
+
export { ar as FormBuilderBlock };
|