@caspeco/casper-ui-library 9.0.2 → 9.2.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/README.md +10 -4
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/icon/icons/calendar-icon.d.ts +2 -0
- package/dist/components/icon/icons/calendar-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/calendar-icon.js +8 -0
- package/dist/components/icon/icons/cart-icon.js +1 -1
- package/dist/components/icon/icons/closed-icon.d.ts +2 -0
- package/dist/components/icon/icons/closed-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/closed-icon.js +8 -0
- package/dist/components/icon/icons/comment-add-icon.d.ts +2 -0
- package/dist/components/icon/icons/comment-add-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/comment-add-icon.js +8 -0
- package/dist/components/icon/icons/comment-icon.js +1 -1
- package/dist/components/icon/icons/deliverect-icon.d.ts +2 -0
- package/dist/components/icon/icons/deliverect-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/deliverect-icon.js +8 -0
- package/dist/components/icon/icons/door-closed-icon.d.ts +2 -0
- package/dist/components/icon/icons/door-closed-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/door-closed-icon.js +8 -0
- package/dist/components/icon/icons/door-open-icon.d.ts +2 -0
- package/dist/components/icon/icons/door-open-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/door-open-icon.js +8 -0
- package/dist/components/icon/icons/failed-print-icon.d.ts +2 -0
- package/dist/components/icon/icons/failed-print-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/failed-print-icon.js +8 -0
- package/dist/components/icon/icons/index.d.ts +27 -4
- package/dist/components/icon/icons/index.d.ts.map +1 -1
- package/dist/components/icon/icons/key-command-icon.d.ts +2 -0
- package/dist/components/icon/icons/key-command-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/key-command-icon.js +8 -0
- package/dist/components/icon/icons/key-enter-icon.d.ts +2 -0
- package/dist/components/icon/icons/key-enter-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/key-enter-icon.js +8 -0
- package/dist/components/icon/icons/key-option-icon.d.ts +2 -0
- package/dist/components/icon/icons/key-option-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/key-option-icon.js +8 -0
- package/dist/components/icon/icons/message-add-icon.d.ts +2 -0
- package/dist/components/icon/icons/message-add-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/message-add-icon.js +8 -0
- package/dist/components/icon/icons/message-icon.js +1 -1
- package/dist/components/icon/icons/message-lines-icon.d.ts +2 -0
- package/dist/components/icon/icons/message-lines-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/message-lines-icon.js +8 -0
- package/dist/components/icon/icons/module-home-icon.js +1 -1
- package/dist/components/icon/icons/no-cart-icon.d.ts +2 -0
- package/dist/components/icon/icons/no-cart-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/no-cart-icon.js +8 -0
- package/dist/components/icon/icons/note-icon.d.ts +2 -0
- package/dist/components/icon/icons/note-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/note-icon.js +8 -0
- package/dist/components/icon/icons/product-my-pages-icon.d.ts +2 -0
- package/dist/components/icon/icons/product-my-pages-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/product-my-pages-icon.js +8 -0
- package/dist/components/icon/icons/puck-icon.d.ts +2 -0
- package/dist/components/icon/icons/puck-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/puck-icon.js +8 -0
- package/dist/components/icon/icons/redo-icon.d.ts +2 -0
- package/dist/components/icon/icons/redo-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/redo-icon.js +8 -0
- package/dist/components/icon/icons/sidebar-hide-icon.d.ts +2 -0
- package/dist/components/icon/icons/sidebar-hide-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/sidebar-hide-icon.js +8 -0
- package/dist/components/icon/icons/sidebar-left-icon.d.ts +2 -0
- package/dist/components/icon/icons/sidebar-left-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/sidebar-left-icon.js +8 -0
- package/dist/components/icon/icons/sidebar-right-icon.d.ts +2 -0
- package/dist/components/icon/icons/sidebar-right-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/sidebar-right-icon.js +8 -0
- package/dist/components/icon/icons/sidebar-show-icon.d.ts +2 -0
- package/dist/components/icon/icons/sidebar-show-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/sidebar-show-icon.js +8 -0
- package/dist/components/icon/icons/swatch-icon.d.ts +2 -0
- package/dist/components/icon/icons/swatch-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/swatch-icon.js +8 -0
- package/dist/components/icon/icons/trivec-icon.d.ts +2 -0
- package/dist/components/icon/icons/trivec-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/trivec-icon.js +9 -0
- package/dist/components/icon/icons/waste-icon.d.ts +2 -0
- package/dist/components/icon/icons/waste-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/waste-icon.js +8 -0
- package/dist/components/table/table-toolbar-settings.d.ts +15 -1
- package/dist/components/table/table-toolbar-settings.d.ts.map +1 -1
- package/dist/components/table/table-toolbar-settings.js +71 -44
- package/dist/components/table/table-toolbar-settings.spec.d.ts +2 -0
- package/dist/components/table/table-toolbar-settings.spec.d.ts.map +1 -0
- package/dist/components/table/table.constants.d.ts +2 -0
- package/dist/components/table/table.constants.d.ts.map +1 -0
- package/dist/components/table/table.constants.js +4 -0
- package/dist/components/table/translations.d.ts +14 -0
- package/dist/components/table/translations.d.ts.map +1 -1
- package/dist/components/table/translations.js +12 -0
- package/dist/index.js +727 -681
- package/dist/node_modules/@dnd-kit/abstract/index.js +502 -442
- package/dist/node_modules/@dnd-kit/dom/index.js +817 -779
- package/dist/node_modules/@dnd-kit/dom/sortable.js +260 -262
- package/dist/node_modules/@dnd-kit/dom/utilities.js +470 -463
- package/dist/node_modules/@dnd-kit/react/hooks.js +26 -26
- package/dist/node_modules/@dnd-kit/react/index.js +8 -1
- package/dist/node_modules/@dnd-kit/react/sortable.js +45 -46
- package/dist/node_modules/@preact/signals-core/dist/signals-core.module.js +11 -11
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +85 -73
- package/package.json +20 -18
- package/dist/components/icon/icons/tablet-icon.d.ts +0 -2
- package/dist/components/icon/icons/tablet-icon.d.ts.map +0 -1
- package/dist/components/icon/icons/tablet-icon.js +0 -8
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { Plugin as
|
|
2
|
-
import {
|
|
3
|
-
import { computed as
|
|
4
|
-
import { Axes as
|
|
5
|
-
import { defaultCollisionDetection as
|
|
6
|
-
import { effect as
|
|
7
|
-
var
|
|
1
|
+
import { Plugin as he, DragDropManager as xr, resolveCustomizable as it, Sensor as ze, ActivationController as kr, CorePlugin as St, descriptor as Ar, Droppable as Dr, Draggable as Or, configurator as Ce, ActivationConstraint as wn } from "../abstract/index.js";
|
|
2
|
+
import { getRoot as Ne, generateUniqueId as ct, isSafari as Cr, scheduler as je, Listeners as Sn, isElement as le, isHTMLElement as En, getFrameTransform as Xe, getEventCoordinates as ce, getDocuments as Pr, getDocument as Et, scrollIntoViewIfNeeded as Tr, DOMRectangle as V, canScroll as $r, detectScrollIntent as Ir, isKeyboardEvent as xt, isInteractiveElement as Mr, isTextInput as Rr, ScrollDirection as F, getScrollableAncestors as an, PositionObserver as Lr, isDocument as Wr, isShadowRoot as Fr, getComputedStyles as xn, parseTransform as zr, parseTranslate as kn, getFixedPositionOffset as An, Styles as Nr, supportsPopover as ln, showPopover as ae, getWindow as Dn, prefersReducedMotion as On, getElementFromPoint as jr, isPointerEvent as Xr, getFrameElement as cn, cloneElement as Kr, supportsStyle as dn, getFinalKeyframe as Ur, animateTransform as Yr, ProxiedElements as un } from "./utilities.js";
|
|
3
|
+
import { computed as hn, deepEqual as Br, effects as Vr, reactive as j, derived as st } from "../state/dist/index.js";
|
|
4
|
+
import { Axes as Cn, Point as Hr, Rectangle as kt, exceedsDistance as dt } from "../geometry/dist/index.js";
|
|
5
|
+
import { defaultCollisionDetection as qr } from "../collision/dist/index.js";
|
|
6
|
+
import { effect as fe, untracked as W, signal as Pn, batch as Gr } from "../../@preact/signals-core/dist/signals-core.module.js";
|
|
7
|
+
var Jr = Object.create, At = Object.defineProperty, Qr = Object.defineProperties, Zr = Object.getOwnPropertyDescriptor, ei = Object.getOwnPropertyDescriptors, Ke = Object.getOwnPropertySymbols, Tn = Object.prototype.hasOwnProperty, $n = Object.prototype.propertyIsEnumerable, In = (e, t) => (t = Symbol[e]) ? t : /* @__PURE__ */ Symbol.for("Symbol." + e), pe = (e) => {
|
|
8
8
|
throw TypeError(e);
|
|
9
|
-
},
|
|
9
|
+
}, ut = (e, t, n) => t in e ? At(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ke = (e, t) => {
|
|
10
10
|
for (var n in t || (t = {}))
|
|
11
|
-
|
|
12
|
-
if (
|
|
13
|
-
for (var n of
|
|
14
|
-
|
|
11
|
+
Tn.call(t, n) && ut(e, n, t[n]);
|
|
12
|
+
if (Ke)
|
|
13
|
+
for (var n of Ke(t))
|
|
14
|
+
$n.call(t, n) && ut(e, n, t[n]);
|
|
15
15
|
return e;
|
|
16
|
-
},
|
|
16
|
+
}, Dt = (e, t) => Qr(e, ei(t)), fn = (e, t) => At(e, "name", { value: t, configurable: !0 }), Mn = (e, t) => {
|
|
17
17
|
var n = {};
|
|
18
18
|
for (var r in e)
|
|
19
|
-
|
|
20
|
-
if (e != null &&
|
|
21
|
-
for (var r of
|
|
22
|
-
t.indexOf(r) < 0 &&
|
|
19
|
+
Tn.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
20
|
+
if (e != null && Ke)
|
|
21
|
+
for (var r of Ke(e))
|
|
22
|
+
t.indexOf(r) < 0 && $n.call(e, r) && (n[r] = e[r]);
|
|
23
23
|
return n;
|
|
24
|
-
},
|
|
24
|
+
}, ve = (e) => {
|
|
25
25
|
var t;
|
|
26
|
-
return [, , ,
|
|
27
|
-
},
|
|
28
|
-
for (var i = 0, s = e[t >> 1],
|
|
26
|
+
return [, , , Jr((t = e?.[In("metadata")]) != null ? t : null)];
|
|
27
|
+
}, Rn = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], _e = (e) => e !== void 0 && typeof e != "function" ? pe("Function expected") : e, ti = (e, t, n, r, i) => ({ kind: Rn[e], name: t, metadata: r, addInitializer: (s) => n._ ? pe("Already initialized") : i.push(_e(s || null)) }), ee = (e, t) => ut(t, In("metadata"), e[3]), A = (e, t, n, r) => {
|
|
28
|
+
for (var i = 0, s = e[t >> 1], a = s && s.length; i < a; i++) t & 1 ? s[i].call(n) : r = s[i].call(n, r);
|
|
29
29
|
return r;
|
|
30
|
-
},
|
|
31
|
-
var
|
|
32
|
-
return
|
|
33
|
-
}, set [n](
|
|
34
|
-
return
|
|
30
|
+
}, R = (e, t, n, r, i, s) => {
|
|
31
|
+
var a, o, d, c, u, l = t & 7, h = !!(t & 8), v = !!(t & 16), g = l > 3 ? e.length + 1 : l ? h ? 1 : 2 : 0, w = Rn[l + 5], D = l > 3 && (e[g - 1] = []), x = e[g] || (e[g] = []), f = l && (!v && !h && (i = i.prototype), l < 5 && (l > 3 || !v) && Zr(l < 4 ? i : { get [n]() {
|
|
32
|
+
return _(this, s);
|
|
33
|
+
}, set [n](p) {
|
|
34
|
+
return $(this, s, p);
|
|
35
35
|
} }, n));
|
|
36
|
-
|
|
37
|
-
for (var
|
|
38
|
-
|
|
39
|
-
return
|
|
40
|
-
},
|
|
36
|
+
l ? v && l < 4 && fn(s, (l > 2 ? "set " : l > 1 ? "get " : "") + n) : fn(i, n);
|
|
37
|
+
for (var m = r.length - 1; m >= 0; m--)
|
|
38
|
+
c = ti(l, n, d = {}, e[3], x), l && (c.static = h, c.private = v, u = c.access = { has: v ? (p) => ni(i, p) : (p) => n in p }, l ^ 3 && (u.get = v ? (p) => (l ^ 1 ? _ : Z)(p, i, l ^ 4 ? s : f.get) : (p) => p[n]), l > 2 && (u.set = v ? (p, y) => $(p, i, y, l ^ 4 ? s : f.set) : (p, y) => p[n] = y)), o = (0, r[m])(l ? l < 4 ? v ? s : f[w] : l > 4 ? void 0 : { get: f.get, set: f.set } : i, c), d._ = 1, l ^ 4 || o === void 0 ? _e(o) && (l > 4 ? D.unshift(o) : l ? v ? s = o : f[w] = o : i = o) : typeof o != "object" || o === null ? pe("Object expected") : (_e(a = o.get) && (f.get = a), _e(a = o.set) && (f.set = a), _e(a = o.init) && D.unshift(a));
|
|
39
|
+
return l || ee(e, i), f && At(i, n, f), v ? l ^ 4 ? s : f : i;
|
|
40
|
+
}, Ot = (e, t, n) => t.has(e) || pe("Cannot " + n), ni = (e, t) => Object(t) !== t ? pe('Cannot use the "in" operator on this value') : e.has(t), _ = (e, t, n) => (Ot(e, t, "read from private field"), n ? n.call(e) : t.get(e)), S = (e, t, n) => t.has(e) ? pe("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), $ = (e, t, n, r) => (Ot(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), Z = (e, t, n) => (Ot(e, t, "access private method"), n), pn = {
|
|
41
41
|
role: "button",
|
|
42
42
|
roleDescription: "draggable"
|
|
43
|
-
},
|
|
43
|
+
}, ri = "dnd-kit-description", ii = "dnd-kit-announcement", si = {
|
|
44
44
|
draggable: "To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item in a given direction. Press space again to drop the item in its new position, or press escape to cancel."
|
|
45
|
-
},
|
|
45
|
+
}, oi = {
|
|
46
46
|
dragstart({ operation: { source: e } }) {
|
|
47
47
|
if (e)
|
|
48
48
|
return `Picked up draggable item ${e.id}.`;
|
|
@@ -56,187 +56,169 @@ var Lr = Object.create, mt = Object.defineProperty, Fr = Object.defineProperties
|
|
|
56
56
|
return n ? `Dragging was cancelled. Draggable item ${e.id} was dropped.` : t ? `Draggable item ${e.id} was dropped over droppable target ${t.id}` : `Draggable item ${e.id} was dropped.`;
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
|
-
function
|
|
59
|
+
function ai(e) {
|
|
60
60
|
const t = e.tagName.toLowerCase();
|
|
61
61
|
return ["input", "select", "textarea", "a", "button"].includes(t);
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function li(e, t) {
|
|
64
64
|
const n = document.createElement("div");
|
|
65
65
|
return n.id = e, n.style.setProperty("display", "none"), n.textContent = t, n;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function ci(e) {
|
|
68
68
|
const t = document.createElement("div");
|
|
69
69
|
return t.id = e, t.setAttribute("role", "status"), t.setAttribute("aria-live", "polite"), t.setAttribute("aria-atomic", "true"), t.style.setProperty("position", "fixed"), t.style.setProperty("width", "1px"), t.style.setProperty("height", "1px"), t.style.setProperty("margin", "-1px"), t.style.setProperty("border", "0"), t.style.setProperty("padding", "0"), t.style.setProperty("overflow", "hidden"), t.style.setProperty("clip", "rect(0 0 0 0)"), t.style.setProperty("clip-path", "inset(100%)"), t.style.setProperty("white-space", "nowrap"), t;
|
|
70
70
|
}
|
|
71
|
-
var
|
|
71
|
+
var di = ["dragover", "dragmove"], ui = class extends he {
|
|
72
72
|
constructor(e, t) {
|
|
73
73
|
super(e);
|
|
74
74
|
const {
|
|
75
75
|
id: n,
|
|
76
76
|
idPrefix: {
|
|
77
|
-
description: r =
|
|
78
|
-
announcement: i =
|
|
77
|
+
description: r = ri,
|
|
78
|
+
announcement: i = ii
|
|
79
79
|
} = {},
|
|
80
|
-
announcements: s =
|
|
81
|
-
screenReaderInstructions:
|
|
82
|
-
debounce:
|
|
83
|
-
} = t ?? {},
|
|
84
|
-
let
|
|
85
|
-
const
|
|
86
|
-
!h || !
|
|
87
|
-
}, w = () =>
|
|
80
|
+
announcements: s = oi,
|
|
81
|
+
screenReaderInstructions: a = si,
|
|
82
|
+
debounce: o = 500
|
|
83
|
+
} = t ?? {}, d = n ? `${r}-${n}` : ct(r), c = n ? `${i}-${n}` : ct(i);
|
|
84
|
+
let u, l, h, v;
|
|
85
|
+
const g = (y = v) => {
|
|
86
|
+
!h || !y || h?.nodeValue !== y && (h.nodeValue = y);
|
|
87
|
+
}, w = () => je.schedule(g), D = hi(
|
|
88
88
|
w,
|
|
89
|
-
|
|
90
|
-
),
|
|
91
|
-
([
|
|
92
|
-
|
|
93
|
-
(
|
|
94
|
-
const
|
|
95
|
-
if (!
|
|
96
|
-
const
|
|
97
|
-
|
|
89
|
+
o
|
|
90
|
+
), x = Object.entries(s).map(
|
|
91
|
+
([y, C]) => this.manager.monitor.addEventListener(
|
|
92
|
+
y,
|
|
93
|
+
(E, L) => {
|
|
94
|
+
const T = h;
|
|
95
|
+
if (!T) return;
|
|
96
|
+
const P = C?.(E, L);
|
|
97
|
+
P && T.nodeValue !== P && (v = P, di.includes(y) ? D() : (w(), D.cancel()));
|
|
98
98
|
}
|
|
99
99
|
)
|
|
100
|
-
),
|
|
101
|
-
let
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
),
|
|
106
|
-
},
|
|
107
|
-
function
|
|
108
|
-
for (const
|
|
109
|
-
|
|
100
|
+
), f = () => {
|
|
101
|
+
let y = [];
|
|
102
|
+
u?.isConnected || (u = li(
|
|
103
|
+
d,
|
|
104
|
+
a.draggable
|
|
105
|
+
), y.push(u)), l?.isConnected || (l = ci(c), h = document.createTextNode(""), l.appendChild(h), y.push(l)), y.length > 0 && document.body.append(...y);
|
|
106
|
+
}, m = /* @__PURE__ */ new Set();
|
|
107
|
+
function p() {
|
|
108
|
+
for (const y of m)
|
|
109
|
+
y();
|
|
110
110
|
}
|
|
111
111
|
this.registerEffect(() => {
|
|
112
|
-
var
|
|
113
|
-
|
|
114
|
-
for (const
|
|
115
|
-
const
|
|
116
|
-
if (
|
|
117
|
-
(!
|
|
118
|
-
() =>
|
|
119
|
-
),
|
|
120
|
-
() =>
|
|
112
|
+
var y;
|
|
113
|
+
m.clear();
|
|
114
|
+
for (const C of this.manager.registry.draggables.value) {
|
|
115
|
+
const E = (y = C.handle) != null ? y : C.element;
|
|
116
|
+
if (E) {
|
|
117
|
+
(!u || !l) && m.add(f), (!ai(E) || Cr()) && !E.hasAttribute("tabindex") && m.add(() => E.setAttribute("tabindex", "0")), !E.hasAttribute("role") && E.tagName.toLowerCase() !== "button" && m.add(
|
|
118
|
+
() => E.setAttribute("role", pn.role)
|
|
119
|
+
), E.hasAttribute("aria-roledescription") || m.add(
|
|
120
|
+
() => E.setAttribute(
|
|
121
121
|
"aria-roledescription",
|
|
122
|
-
|
|
122
|
+
pn.roleDescription
|
|
123
123
|
)
|
|
124
|
-
),
|
|
125
|
-
() =>
|
|
124
|
+
), E.hasAttribute("aria-describedby") || m.add(
|
|
125
|
+
() => E.setAttribute("aria-describedby", d)
|
|
126
126
|
);
|
|
127
|
-
for (const
|
|
128
|
-
const
|
|
129
|
-
|
|
127
|
+
for (const T of ["aria-pressed", "aria-grabbed"]) {
|
|
128
|
+
const P = String(C.isDragging);
|
|
129
|
+
E.getAttribute(T) !== P && m.add(() => E.setAttribute(T, P));
|
|
130
130
|
}
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
() =>
|
|
131
|
+
const L = String(C.disabled);
|
|
132
|
+
E.getAttribute("aria-disabled") !== L && m.add(
|
|
133
|
+
() => E.setAttribute("aria-disabled", L)
|
|
134
134
|
);
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
|
|
137
|
+
m.size > 0 && je.schedule(p);
|
|
138
138
|
}), this.destroy = () => {
|
|
139
|
-
super.destroy(),
|
|
139
|
+
super.destroy(), u?.remove(), l?.remove(), x.forEach((y) => y());
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
|
-
function
|
|
143
|
+
function hi(e, t) {
|
|
144
144
|
let n;
|
|
145
145
|
const r = () => {
|
|
146
146
|
clearTimeout(n), n = setTimeout(e, t);
|
|
147
147
|
};
|
|
148
148
|
return r.cancel = () => clearTimeout(n), r;
|
|
149
149
|
}
|
|
150
|
-
var
|
|
151
|
-
constructor(
|
|
152
|
-
super(
|
|
153
|
-
const n = tt(
|
|
154
|
-
() => {
|
|
155
|
-
var r;
|
|
156
|
-
return Ne((r = this.manager.dragOperation.source) == null ? void 0 : r.element);
|
|
157
|
-
}
|
|
158
|
-
);
|
|
159
|
-
this.destroy = J(() => {
|
|
160
|
-
var r;
|
|
161
|
-
const { dragOperation: i } = this.manager, { cursor: s = "grabbing", nonce: o } = (r = this.options) != null ? r : {};
|
|
162
|
-
if (i.status.initialized) {
|
|
163
|
-
const a = n.value, l = a.createElement("style");
|
|
164
|
-
return o && l.setAttribute("nonce", o), l.textContent = `* { cursor: ${s} !important; }`, a.head.appendChild(l), () => l.remove();
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
}, We = /* @__PURE__ */ new Map(), En, xn, kn, An, it, ye, K, yt, de, Dn, On, Cn, Pn, Z = class extends (it = ft, An = [F], kn = [Ge], xn = [Ge], En = [Ge], it) {
|
|
169
|
-
constructor(e) {
|
|
170
|
-
super(e), x(K, 5, this), E(this, de), E(this, ye, /* @__PURE__ */ new Set()), E(this, yt, x(K, 8, this, /* @__PURE__ */ new Set())), x(K, 11, this), this.registerEffect(G(this, de, Dn));
|
|
150
|
+
var Ue = /* @__PURE__ */ new Map(), Ln, Wn, Fn, zn, ht, Ee, N, Ct, de, Nn, jn, Xn, Kn, H = class extends (ht = St, zn = [j], Fn = [st], Wn = [st], Ln = [st], ht) {
|
|
151
|
+
constructor(t, n) {
|
|
152
|
+
super(t, n), A(N, 5, this), S(this, de), S(this, Ee, /* @__PURE__ */ new Set()), S(this, Ct, A(N, 8, this, /* @__PURE__ */ new Set())), A(N, 11, this), this.registerEffect(Z(this, de, Nn));
|
|
171
153
|
}
|
|
172
154
|
/**
|
|
173
155
|
* Registers CSS rules to be injected into the active drag operation's
|
|
174
|
-
* document and shadow roots. The
|
|
156
|
+
* document and shadow roots. The StyleInjector handles tracking
|
|
175
157
|
* which roots need the styles and cleaning up when they're no longer needed.
|
|
176
158
|
*
|
|
177
159
|
* Returns a cleanup function that unregisters the rules.
|
|
178
160
|
*/
|
|
179
|
-
register(
|
|
180
|
-
return
|
|
181
|
-
|
|
161
|
+
register(t) {
|
|
162
|
+
return _(this, Ee).add(t), () => {
|
|
163
|
+
_(this, Ee).delete(t);
|
|
182
164
|
};
|
|
183
165
|
}
|
|
184
166
|
/**
|
|
185
167
|
* Adds an additional root to track for style injection.
|
|
186
168
|
* Returns a cleanup function that removes the root.
|
|
187
169
|
*/
|
|
188
|
-
addRoot(
|
|
189
|
-
return
|
|
190
|
-
const
|
|
191
|
-
|
|
170
|
+
addRoot(t) {
|
|
171
|
+
return W(() => {
|
|
172
|
+
const n = new Set(this.additionalRoots);
|
|
173
|
+
n.add(t), this.additionalRoots = n;
|
|
192
174
|
}), () => {
|
|
193
|
-
|
|
194
|
-
const
|
|
195
|
-
|
|
175
|
+
W(() => {
|
|
176
|
+
const n = new Set(this.additionalRoots);
|
|
177
|
+
n.delete(t), this.additionalRoots = n;
|
|
196
178
|
});
|
|
197
179
|
};
|
|
198
180
|
}
|
|
199
181
|
get sourceRoot() {
|
|
200
|
-
var
|
|
201
|
-
const { source:
|
|
202
|
-
return
|
|
182
|
+
var t;
|
|
183
|
+
const { source: n } = this.manager.dragOperation;
|
|
184
|
+
return Ne((t = n?.element) != null ? t : null);
|
|
203
185
|
}
|
|
204
186
|
get targetRoot() {
|
|
205
|
-
var
|
|
206
|
-
const { target:
|
|
207
|
-
return
|
|
187
|
+
var t;
|
|
188
|
+
const { target: n } = this.manager.dragOperation;
|
|
189
|
+
return Ne((t = n?.element) != null ? t : null);
|
|
208
190
|
}
|
|
209
191
|
get roots() {
|
|
210
|
-
const { status:
|
|
211
|
-
if (
|
|
212
|
-
const
|
|
213
|
-
(
|
|
192
|
+
const { status: t } = this.manager.dragOperation;
|
|
193
|
+
if (t.initializing || t.initialized) {
|
|
194
|
+
const n = [this.sourceRoot, this.targetRoot].filter(
|
|
195
|
+
(r) => r != null
|
|
214
196
|
);
|
|
215
|
-
return /* @__PURE__ */ new Set([...
|
|
197
|
+
return /* @__PURE__ */ new Set([...n, ...this.additionalRoots]);
|
|
216
198
|
}
|
|
217
199
|
return /* @__PURE__ */ new Set();
|
|
218
200
|
}
|
|
219
201
|
};
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
202
|
+
N = ve(ht);
|
|
203
|
+
Ee = /* @__PURE__ */ new WeakMap();
|
|
204
|
+
Ct = /* @__PURE__ */ new WeakMap();
|
|
223
205
|
de = /* @__PURE__ */ new WeakSet();
|
|
224
|
-
|
|
206
|
+
Nn = function() {
|
|
225
207
|
const { roots: e } = this, t = [];
|
|
226
208
|
for (const n of e)
|
|
227
|
-
for (const r of
|
|
228
|
-
t.push(
|
|
209
|
+
for (const r of _(this, Ee))
|
|
210
|
+
t.push(Z(this, de, jn).call(this, n, r));
|
|
229
211
|
return () => {
|
|
230
212
|
for (const n of t)
|
|
231
213
|
n();
|
|
232
214
|
};
|
|
233
215
|
};
|
|
234
|
-
|
|
235
|
-
let n =
|
|
236
|
-
n || (n = /* @__PURE__ */ new Map(),
|
|
216
|
+
jn = function(e, t) {
|
|
217
|
+
let n = Ue.get(e);
|
|
218
|
+
n || (n = /* @__PURE__ */ new Map(), Ue.set(e, n));
|
|
237
219
|
let r = n.get(t);
|
|
238
220
|
if (!r) {
|
|
239
|
-
const s =
|
|
221
|
+
const s = Wr(e) ? Z(this, de, Xn).call(this, e, n, t) : Z(this, de, Kn).call(this, e, n, t);
|
|
240
222
|
if (!s)
|
|
241
223
|
return () => {
|
|
242
224
|
};
|
|
@@ -248,25 +230,26 @@ On = function(e, t) {
|
|
|
248
230
|
i || (i = !0, r.refCount--, r.refCount === 0 && r.cleanup());
|
|
249
231
|
};
|
|
250
232
|
};
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
233
|
+
Xn = function(e, t, n) {
|
|
234
|
+
var r;
|
|
235
|
+
const i = e.createElement("style"), { nonce: s } = (r = this.options) != null ? r : {};
|
|
236
|
+
s && i.setAttribute("nonce", s), i.textContent = n, e.head.prepend(i);
|
|
237
|
+
const a = new MutationObserver((o) => {
|
|
238
|
+
for (const d of o)
|
|
239
|
+
for (const c of Array.from(d.removedNodes))
|
|
240
|
+
if (c === i) {
|
|
241
|
+
e.head.prepend(i);
|
|
259
242
|
return;
|
|
260
243
|
}
|
|
261
244
|
});
|
|
262
|
-
return
|
|
245
|
+
return a.observe(e.head, { childList: !0 }), {
|
|
263
246
|
refCount: 0,
|
|
264
247
|
cleanup: () => {
|
|
265
|
-
|
|
248
|
+
a.disconnect(), i.remove(), t.delete(n), t.size === 0 && Ue.delete(e);
|
|
266
249
|
}
|
|
267
250
|
};
|
|
268
251
|
};
|
|
269
|
-
|
|
252
|
+
Kn = function(e, t, n) {
|
|
270
253
|
!("adoptedStyleSheets" in e && Array.isArray(e.adoptedStyleSheets)) && process.env.NODE_ENV !== "production" && console.error(
|
|
271
254
|
"Cannot inject styles: This browser doesn't support adoptedStyleSheets"
|
|
272
255
|
);
|
|
@@ -279,67 +262,84 @@ Pn = function(e, t, n) {
|
|
|
279
262
|
return s.replaceSync(n), e.adoptedStyleSheets.push(s), {
|
|
280
263
|
refCount: 0,
|
|
281
264
|
cleanup: () => {
|
|
282
|
-
var
|
|
283
|
-
if (
|
|
284
|
-
const
|
|
285
|
-
|
|
265
|
+
var a;
|
|
266
|
+
if (Fr(e) && ((a = e.host) != null && a.isConnected)) {
|
|
267
|
+
const o = e.adoptedStyleSheets.indexOf(s);
|
|
268
|
+
o !== -1 && e.adoptedStyleSheets.splice(o, 1);
|
|
286
269
|
}
|
|
287
|
-
t.delete(n), t.size === 0 &&
|
|
270
|
+
t.delete(n), t.size === 0 && Ue.delete(e);
|
|
288
271
|
}
|
|
289
272
|
};
|
|
290
273
|
};
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
274
|
+
R(N, 4, "additionalRoots", zn, H, Ct);
|
|
275
|
+
R(N, 2, "sourceRoot", Fn, H);
|
|
276
|
+
R(N, 2, "targetRoot", Wn, H);
|
|
277
|
+
R(N, 2, "roots", Ln, H);
|
|
278
|
+
ee(N, H);
|
|
279
|
+
H.configure = Ce(H);
|
|
280
|
+
var He = H, fi = class extends he {
|
|
281
|
+
constructor(e, t) {
|
|
282
|
+
super(e, t), this.manager = e;
|
|
283
|
+
const { cursor: n = "grabbing" } = t ?? {}, r = e.registry.plugins.get(
|
|
284
|
+
He
|
|
285
|
+
), i = r?.register(
|
|
286
|
+
`* { cursor: ${n} !important; }`
|
|
287
|
+
);
|
|
288
|
+
if (i) {
|
|
289
|
+
const s = this.destroy.bind(this);
|
|
290
|
+
this.destroy = () => {
|
|
291
|
+
i(), s();
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}, Pe = "data-dnd-", ft = `${Pe}dropping`, O = "--dnd-", z = `${Pe}dragging`, Ye = `${Pe}placeholder`, pi = [
|
|
296
|
+
z,
|
|
297
|
+
Ye,
|
|
299
298
|
"popover",
|
|
300
299
|
"aria-pressed",
|
|
301
300
|
"aria-grabbing"
|
|
302
|
-
],
|
|
303
|
-
:is(:root,:host) [${
|
|
301
|
+
], vi = ["view-transition-name"], mi = `
|
|
302
|
+
:is(:root,:host) [${z}] {
|
|
304
303
|
position: fixed !important;
|
|
305
304
|
pointer-events: none !important;
|
|
306
305
|
touch-action: none;
|
|
307
306
|
z-index: calc(infinity);
|
|
308
307
|
will-change: translate;
|
|
309
|
-
top: var(${
|
|
310
|
-
left: var(${
|
|
308
|
+
top: var(${O}top, 0px) !important;
|
|
309
|
+
left: var(${O}left, 0px) !important;
|
|
311
310
|
right: unset !important;
|
|
312
311
|
bottom: unset !important;
|
|
313
|
-
width: var(${
|
|
314
|
-
max-width: var(${
|
|
315
|
-
height: var(${
|
|
316
|
-
max-height: var(${
|
|
317
|
-
|
|
312
|
+
width: var(${O}width, auto);
|
|
313
|
+
max-width: var(${O}width, auto);
|
|
314
|
+
height: var(${O}height, auto);
|
|
315
|
+
max-height: var(${O}height, auto);
|
|
316
|
+
transform: var(${O}transform, none) !important;
|
|
317
|
+
transition: var(${O}transition) !important;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
-
:is(:root,:host) [${
|
|
320
|
+
:is(:root,:host) [${Ye}] {
|
|
321
321
|
transition: none;
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
-
:is(:root,:host) [${
|
|
324
|
+
:is(:root,:host) [${Ye}='hidden'] {
|
|
325
325
|
visibility: hidden;
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
[${
|
|
328
|
+
[${z}] * {
|
|
329
329
|
pointer-events: none !important;
|
|
330
330
|
}
|
|
331
331
|
|
|
332
|
-
[${
|
|
333
|
-
translate: var(${
|
|
332
|
+
[${z}]:not([${ft}]) {
|
|
333
|
+
translate: var(${O}translate) !important;
|
|
334
334
|
}
|
|
335
335
|
|
|
336
|
-
[${
|
|
337
|
-
scale: var(${
|
|
338
|
-
transform-origin: var(${
|
|
336
|
+
[${z}][style*='${O}scale'] {
|
|
337
|
+
scale: var(${O}scale) !important;
|
|
338
|
+
transform-origin: var(${O}transform-origin) !important;
|
|
339
339
|
}
|
|
340
340
|
|
|
341
341
|
@layer dnd-kit {
|
|
342
|
-
:where([${
|
|
342
|
+
:where([${z}][popover]) {
|
|
343
343
|
overflow: visible;
|
|
344
344
|
background: unset;
|
|
345
345
|
border: unset;
|
|
@@ -353,86 +353,86 @@ var De = "data-dnd-", st = `${De}dropping`, D = "--dnd-", L = `${De}dragging`, L
|
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
|
-
[${
|
|
356
|
+
[${z}]::backdrop, [${Pe}overlay]:not([${z}]) {
|
|
357
357
|
display: none;
|
|
358
358
|
visibility: hidden;
|
|
359
359
|
}
|
|
360
360
|
`.replace(/\n+/g, " ").replace(/\s+/g, " ").trim();
|
|
361
|
-
function
|
|
362
|
-
return
|
|
361
|
+
function gi(e, t = "hidden") {
|
|
362
|
+
return W(() => {
|
|
363
363
|
const { element: n, manager: r } = e;
|
|
364
364
|
if (!n || !r) return;
|
|
365
|
-
const i =
|
|
365
|
+
const i = yi(
|
|
366
366
|
n,
|
|
367
367
|
r.registry.droppables
|
|
368
|
-
), s = [],
|
|
369
|
-
return
|
|
370
|
-
s.forEach((
|
|
371
|
-
},
|
|
368
|
+
), s = [], a = Kr(n), { remove: o } = a;
|
|
369
|
+
return bi(i, a, s), _i(a, t), a.remove = () => {
|
|
370
|
+
s.forEach((d) => d()), o.call(a);
|
|
371
|
+
}, a;
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
|
-
function
|
|
374
|
+
function yi(e, t) {
|
|
375
375
|
const n = /* @__PURE__ */ new Map();
|
|
376
376
|
for (const r of t)
|
|
377
377
|
if (r.element && (e === r.element || e.contains(r.element))) {
|
|
378
|
-
const i = `${
|
|
378
|
+
const i = `${Pe}${ct("dom-id")}`;
|
|
379
379
|
r.element.setAttribute(i, ""), n.set(r, i);
|
|
380
380
|
}
|
|
381
381
|
return n;
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function bi(e, t, n) {
|
|
384
384
|
for (const [r, i] of e) {
|
|
385
385
|
if (!r.element) continue;
|
|
386
|
-
const s = `[${i}]`,
|
|
387
|
-
if (r.element.removeAttribute(i), !
|
|
388
|
-
const
|
|
389
|
-
r.proxy =
|
|
390
|
-
|
|
386
|
+
const s = `[${i}]`, a = t.matches(s) ? t : t.querySelector(s);
|
|
387
|
+
if (r.element.removeAttribute(i), !a) continue;
|
|
388
|
+
const o = r.element;
|
|
389
|
+
r.proxy = a, a.removeAttribute(i), un.set(o, a), n.push(() => {
|
|
390
|
+
un.delete(o), r.proxy = void 0;
|
|
391
391
|
});
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
e.setAttribute("inert", "true"), e.setAttribute("tab-index", "-1"), e.setAttribute("aria-hidden", "true"), e.setAttribute(
|
|
394
|
+
function _i(e, t = "hidden") {
|
|
395
|
+
e.setAttribute("inert", "true"), e.setAttribute("tab-index", "-1"), e.setAttribute("aria-hidden", "true"), e.setAttribute(Ye, t);
|
|
396
396
|
}
|
|
397
|
-
function
|
|
398
|
-
return e === t ? !0 :
|
|
397
|
+
function Un(e, t) {
|
|
398
|
+
return e === t ? !0 : cn(e) === cn(t);
|
|
399
399
|
}
|
|
400
|
-
function
|
|
400
|
+
function vn(e) {
|
|
401
401
|
const { target: t } = e;
|
|
402
|
-
"newState" in e && e.newState === "closed" && le(t) && t.hasAttribute("popover") && requestAnimationFrame(() =>
|
|
402
|
+
"newState" in e && e.newState === "closed" && le(t) && t.hasAttribute("popover") && requestAnimationFrame(() => ae(t));
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function pt(e) {
|
|
405
405
|
return e.tagName === "TR";
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function wi(e, t, n) {
|
|
408
408
|
const r = new MutationObserver((i) => {
|
|
409
409
|
let s = !1;
|
|
410
|
-
for (const
|
|
411
|
-
if (
|
|
410
|
+
for (const a of i) {
|
|
411
|
+
if (a.target !== e) {
|
|
412
412
|
s = !0;
|
|
413
413
|
continue;
|
|
414
414
|
}
|
|
415
|
-
if (
|
|
415
|
+
if (a.type !== "attributes")
|
|
416
416
|
continue;
|
|
417
|
-
const
|
|
418
|
-
if (
|
|
417
|
+
const o = a.attributeName;
|
|
418
|
+
if (o.startsWith("aria-") || pi.includes(o))
|
|
419
419
|
continue;
|
|
420
|
-
const
|
|
421
|
-
if (
|
|
422
|
-
if (
|
|
423
|
-
const
|
|
424
|
-
for (const
|
|
425
|
-
|
|
426
|
-
for (const
|
|
427
|
-
if (
|
|
420
|
+
const d = e.getAttribute(o);
|
|
421
|
+
if (o === "style") {
|
|
422
|
+
if (dn(e) && dn(t)) {
|
|
423
|
+
const c = e.style;
|
|
424
|
+
for (const u of Array.from(t.style))
|
|
425
|
+
c.getPropertyValue(u) === "" && t.style.removeProperty(u);
|
|
426
|
+
for (const u of Array.from(c)) {
|
|
427
|
+
if (vi.includes(u) || u.startsWith(O))
|
|
428
428
|
continue;
|
|
429
|
-
const
|
|
430
|
-
t.style.setProperty(
|
|
429
|
+
const l = c.getPropertyValue(u);
|
|
430
|
+
t.style.setProperty(u, l);
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
|
-
} else
|
|
433
|
+
} else d !== null ? t.setAttribute(o, d) : t.removeAttribute(o);
|
|
434
434
|
}
|
|
435
|
-
s && n &&
|
|
435
|
+
s && n && t.replaceChildren(...e.cloneNode(!0).childNodes);
|
|
436
436
|
});
|
|
437
437
|
return r.observe(e, {
|
|
438
438
|
attributes: !0,
|
|
@@ -440,400 +440,415 @@ function ai(e, t, n) {
|
|
|
440
440
|
childList: !0
|
|
441
441
|
}), r;
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function Si(e, t, n) {
|
|
444
444
|
const r = new MutationObserver((i) => {
|
|
445
445
|
for (const s of i)
|
|
446
446
|
if (s.addedNodes.length !== 0)
|
|
447
|
-
for (const
|
|
448
|
-
if (
|
|
449
|
-
e.insertAdjacentElement("afterend", t),
|
|
447
|
+
for (const a of Array.from(s.addedNodes)) {
|
|
448
|
+
if (a.contains(e) && e.nextElementSibling !== t) {
|
|
449
|
+
e.insertAdjacentElement("afterend", t), ae(n);
|
|
450
450
|
return;
|
|
451
451
|
}
|
|
452
|
-
if (
|
|
453
|
-
t.insertAdjacentElement("beforebegin", e),
|
|
452
|
+
if (a.contains(t) && t.previousElementSibling !== e) {
|
|
453
|
+
t.insertAdjacentElement("beforebegin", e), ae(n);
|
|
454
454
|
return;
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
|
+
e.isConnected && t.isConnected && e.nextElementSibling !== t && (e.insertAdjacentElement("afterend", t), ae(n));
|
|
457
458
|
});
|
|
458
459
|
return r.observe(e.ownerDocument.body, {
|
|
459
460
|
childList: !0,
|
|
460
461
|
subtree: !0
|
|
461
462
|
}), r;
|
|
462
463
|
}
|
|
463
|
-
function
|
|
464
|
+
function Ei(e) {
|
|
464
465
|
return new ResizeObserver(() => {
|
|
465
|
-
var t, n;
|
|
466
|
-
const
|
|
466
|
+
var t, n, r;
|
|
467
|
+
const i = new V(e.placeholder, {
|
|
467
468
|
frameTransform: e.frameTransform,
|
|
468
469
|
ignoreTransforms: !0
|
|
469
|
-
}),
|
|
470
|
+
}), s = (t = e.transformOrigin) != null ? t : { x: 1, y: 1 }, a = (e.width - i.width) * s.x + e.delta.x, o = (e.height - i.height) * s.y + e.delta.y, d = An();
|
|
470
471
|
if (e.styles.set(
|
|
471
472
|
{
|
|
472
|
-
width:
|
|
473
|
-
height:
|
|
474
|
-
top: e.top + o +
|
|
475
|
-
left: e.left +
|
|
473
|
+
width: i.width - e.widthOffset,
|
|
474
|
+
height: i.height - e.heightOffset,
|
|
475
|
+
top: e.top + o + d.y,
|
|
476
|
+
left: e.left + a + d.x
|
|
476
477
|
},
|
|
477
|
-
|
|
478
|
-
), (n = e.getElementMutationObserver()) == null || n.takeRecords(),
|
|
479
|
-
const
|
|
480
|
-
e.getSavedCellWidths() || e.setSavedCellWidths(
|
|
481
|
-
for (const [
|
|
482
|
-
const
|
|
483
|
-
|
|
478
|
+
O
|
|
479
|
+
), (n = e.getElementMutationObserver()) == null || n.takeRecords(), pt(e.element) && pt(e.placeholder)) {
|
|
480
|
+
const w = Array.from(e.element.cells), D = Array.from(e.placeholder.cells);
|
|
481
|
+
e.getSavedCellWidths() || e.setSavedCellWidths(w.map((x) => x.style.width));
|
|
482
|
+
for (const [x, f] of w.entries()) {
|
|
483
|
+
const m = D[x];
|
|
484
|
+
f.style.width = `${m.getBoundingClientRect().width}px`;
|
|
484
485
|
}
|
|
485
486
|
}
|
|
486
|
-
e.
|
|
487
|
+
const c = (r = e.getTranslate()) != null ? r : { x: 0, y: 0 }, u = e.left + a + d.x + c.x, l = e.top + o + d.y + c.y, h = i.width - e.widthOffset, v = i.height - e.heightOffset, g = e.frameTransform;
|
|
488
|
+
e.dragOperation.shape = new kt(
|
|
489
|
+
u * g.scaleX + g.x,
|
|
490
|
+
l * g.scaleY + g.y,
|
|
491
|
+
h * g.scaleX,
|
|
492
|
+
v * g.scaleY
|
|
493
|
+
);
|
|
487
494
|
});
|
|
488
495
|
}
|
|
489
|
-
var
|
|
490
|
-
function
|
|
496
|
+
var xi = 250, ki = "ease";
|
|
497
|
+
function Ai(e) {
|
|
491
498
|
var t, n, r, i;
|
|
492
499
|
const { animation: s } = e;
|
|
493
500
|
if (typeof s == "function") {
|
|
494
|
-
const
|
|
501
|
+
const f = s({
|
|
502
|
+
source: e.source,
|
|
495
503
|
element: e.element,
|
|
496
504
|
feedbackElement: e.feedbackElement,
|
|
497
505
|
placeholder: e.placeholder,
|
|
498
506
|
translate: e.translate,
|
|
499
507
|
moved: e.moved
|
|
500
508
|
});
|
|
501
|
-
Promise.resolve(
|
|
509
|
+
Promise.resolve(f).then(() => {
|
|
502
510
|
e.cleanup(), requestAnimationFrame(e.restoreFocus);
|
|
503
511
|
});
|
|
504
512
|
return;
|
|
505
513
|
}
|
|
506
514
|
const {
|
|
507
|
-
duration:
|
|
508
|
-
easing:
|
|
515
|
+
duration: a = xi,
|
|
516
|
+
easing: o = ki
|
|
509
517
|
} = s ?? {};
|
|
510
|
-
|
|
511
|
-
const [,
|
|
518
|
+
ae(e.feedbackElement);
|
|
519
|
+
const [, d] = (t = Ur(
|
|
512
520
|
e.feedbackElement,
|
|
513
|
-
(
|
|
521
|
+
(f) => "translate" in f
|
|
514
522
|
)) != null ? t : [];
|
|
515
|
-
|
|
516
|
-
const
|
|
517
|
-
frameTransform:
|
|
518
|
-
},
|
|
519
|
-
x: h.x -
|
|
520
|
-
y: h.y -
|
|
521
|
-
},
|
|
523
|
+
d?.pause();
|
|
524
|
+
const c = (n = e.placeholder) != null ? n : e.element, u = {
|
|
525
|
+
frameTransform: Un(e.feedbackElement, c) ? null : void 0
|
|
526
|
+
}, l = new V(e.feedbackElement, u), h = (r = kn(xn(e.feedbackElement).translate)) != null ? r : e.translate, v = new V(c, u), g = kt.delta(l, v, e.alignment), w = {
|
|
527
|
+
x: h.x - g.x,
|
|
528
|
+
y: h.y - g.y
|
|
529
|
+
}, D = Math.round(l.intrinsicHeight) !== Math.round(v.intrinsicHeight) ? {
|
|
522
530
|
minHeight: [
|
|
523
|
-
`${
|
|
524
|
-
`${
|
|
531
|
+
`${l.intrinsicHeight}px`,
|
|
532
|
+
`${v.intrinsicHeight}px`
|
|
525
533
|
],
|
|
526
534
|
maxHeight: [
|
|
527
|
-
`${
|
|
528
|
-
`${
|
|
535
|
+
`${l.intrinsicHeight}px`,
|
|
536
|
+
`${v.intrinsicHeight}px`
|
|
529
537
|
]
|
|
530
|
-
} : {},
|
|
538
|
+
} : {}, x = Math.round(l.intrinsicWidth) !== Math.round(v.intrinsicWidth) ? {
|
|
531
539
|
minWidth: [
|
|
532
|
-
`${
|
|
533
|
-
`${
|
|
540
|
+
`${l.intrinsicWidth}px`,
|
|
541
|
+
`${v.intrinsicWidth}px`
|
|
534
542
|
],
|
|
535
543
|
maxWidth: [
|
|
536
|
-
`${
|
|
537
|
-
`${
|
|
544
|
+
`${l.intrinsicWidth}px`,
|
|
545
|
+
`${v.intrinsicWidth}px`
|
|
538
546
|
]
|
|
539
547
|
} : {};
|
|
540
|
-
e.styles.set({ transition: e.transition },
|
|
548
|
+
e.styles.set({ transition: e.transition }, O), e.feedbackElement.setAttribute(ft, ""), (i = e.getElementMutationObserver()) == null || i.takeRecords(), Yr({
|
|
541
549
|
element: e.feedbackElement,
|
|
542
|
-
keyframes:
|
|
550
|
+
keyframes: Dt(ke(ke({}, D), x), {
|
|
543
551
|
translate: [
|
|
544
552
|
`${h.x}px ${h.y}px 0`,
|
|
545
553
|
`${w.x}px ${w.y}px 0`
|
|
546
554
|
]
|
|
547
555
|
}),
|
|
548
556
|
options: {
|
|
549
|
-
duration:
|
|
550
|
-
easing:
|
|
557
|
+
duration: On(Dn(e.feedbackElement)) ? 0 : e.moved || e.feedbackElement !== e.element ? a : 0,
|
|
558
|
+
easing: o
|
|
551
559
|
}
|
|
552
560
|
}).then(() => {
|
|
553
|
-
e.feedbackElement.removeAttribute(
|
|
561
|
+
e.feedbackElement.removeAttribute(ft), d?.finish(), e.cleanup(), requestAnimationFrame(e.restoreFocus);
|
|
554
562
|
});
|
|
555
563
|
}
|
|
556
|
-
var
|
|
564
|
+
var Yn, vt, Ae, Pt, Fe, Bn, Vn, ue = class extends (vt = he, Yn = [j], vt) {
|
|
557
565
|
constructor(t, n) {
|
|
558
|
-
super(t, n),
|
|
566
|
+
super(t, n), S(this, Fe), S(this, Pt, A(Ae, 8, this)), A(Ae, 11, this), this.state = {
|
|
559
567
|
initial: {},
|
|
560
568
|
current: {}
|
|
561
569
|
};
|
|
562
570
|
const r = t.registry.plugins.get(
|
|
563
|
-
|
|
564
|
-
), i = r?.register(
|
|
571
|
+
He
|
|
572
|
+
), i = r?.register(mi);
|
|
565
573
|
if (i) {
|
|
566
574
|
const s = this.destroy.bind(this);
|
|
567
575
|
this.destroy = () => {
|
|
568
576
|
i(), s();
|
|
569
577
|
};
|
|
570
578
|
}
|
|
571
|
-
this.registerEffect(
|
|
579
|
+
this.registerEffect(Z(this, Fe, Bn).bind(this, r)), this.registerEffect(Z(this, Fe, Vn));
|
|
572
580
|
}
|
|
573
581
|
};
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
582
|
+
Ae = ve(vt);
|
|
583
|
+
Pt = /* @__PURE__ */ new WeakMap();
|
|
584
|
+
Fe = /* @__PURE__ */ new WeakSet();
|
|
585
|
+
Bn = function(e) {
|
|
578
586
|
const { overlay: t } = this;
|
|
579
587
|
if (!t || !e) return;
|
|
580
|
-
const n =
|
|
588
|
+
const n = Ne(t);
|
|
581
589
|
if (n)
|
|
582
590
|
return e.addRoot(n);
|
|
583
591
|
};
|
|
584
|
-
|
|
585
|
-
var e, t, n;
|
|
586
|
-
const { state:
|
|
587
|
-
if (
|
|
588
|
-
|
|
592
|
+
Vn = function() {
|
|
593
|
+
var e, t, n, r, i, s, a;
|
|
594
|
+
const { state: o, manager: d, options: c } = this, { dragOperation: u } = d, { position: l, source: h, status: v } = u;
|
|
595
|
+
if (v.idle) {
|
|
596
|
+
o.current = {}, o.initial = {};
|
|
589
597
|
return;
|
|
590
598
|
}
|
|
591
|
-
if (!
|
|
592
|
-
const { element:
|
|
593
|
-
if (!
|
|
599
|
+
if (!h) return;
|
|
600
|
+
const { element: g } = h, w = h.pluginConfig(ue), D = (t = (e = w?.feedback) != null ? e : c?.feedback) != null ? t : "default", x = typeof D == "function" ? D(h, d) : D;
|
|
601
|
+
if (!g || x === "none" || !v.initialized || v.initializing)
|
|
594
602
|
return;
|
|
595
|
-
const { initial:
|
|
596
|
-
frameTransform:
|
|
597
|
-
ignoreTransforms: !
|
|
598
|
-
}),
|
|
599
|
-
x:
|
|
600
|
-
y:
|
|
603
|
+
const { initial: f } = o, m = (n = this.overlay) != null ? n : g, p = Xe(m), y = Xe(g), C = !Un(g, m), E = new V(g, {
|
|
604
|
+
frameTransform: C ? y : null,
|
|
605
|
+
ignoreTransforms: !C
|
|
606
|
+
}), L = {
|
|
607
|
+
x: y.scaleX / p.scaleX,
|
|
608
|
+
y: y.scaleY / p.scaleY
|
|
601
609
|
};
|
|
602
|
-
let { width:
|
|
603
|
-
|
|
604
|
-
const
|
|
605
|
-
transition:
|
|
606
|
-
translate:
|
|
607
|
-
boxSizing:
|
|
608
|
-
paddingBlockStart:
|
|
609
|
-
paddingBlockEnd:
|
|
610
|
-
paddingInlineStart:
|
|
611
|
-
paddingInlineEnd:
|
|
612
|
-
borderInlineStartWidth:
|
|
613
|
-
borderInlineEndWidth:
|
|
614
|
-
borderBlockStartWidth:
|
|
615
|
-
borderBlockEndWidth:
|
|
616
|
-
} =
|
|
617
|
-
() =>
|
|
610
|
+
let { width: T, height: P, top: Te, left: $e } = E;
|
|
611
|
+
C && (T = T / L.x, P = P / L.y);
|
|
612
|
+
const me = new Nr(m), Ge = xn(g), {
|
|
613
|
+
transition: zt,
|
|
614
|
+
translate: Nt,
|
|
615
|
+
boxSizing: ar,
|
|
616
|
+
paddingBlockStart: lr,
|
|
617
|
+
paddingBlockEnd: cr,
|
|
618
|
+
paddingInlineStart: dr,
|
|
619
|
+
paddingInlineEnd: ur,
|
|
620
|
+
borderInlineStartWidth: hr,
|
|
621
|
+
borderInlineEndWidth: fr,
|
|
622
|
+
borderBlockStartWidth: pr,
|
|
623
|
+
borderBlockEndWidth: vr
|
|
624
|
+
} = Ge, Ie = zt.split(",").filter((b) => !/^\s*(transform|translate|scale)\b/.test(b)).join(","), q = zr(Ge), mr = Ge.transform, jt = x === "clone", Xt = ar === "content-box", Kt = Xt ? parseInt(dr) + parseInt(ur) + parseInt(hr) + parseInt(fr) : 0, Ut = Xt ? parseInt(lr) + parseInt(cr) + parseInt(pr) + parseInt(vr) : 0, I = x !== "move" && !this.overlay ? gi(h, jt ? "clone" : "hidden") : null, Je = W(
|
|
625
|
+
() => xt(d.dragOperation.activatorEvent)
|
|
618
626
|
);
|
|
619
|
-
if (
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
627
|
+
if (!f.translate) {
|
|
628
|
+
if (this.overlay && q)
|
|
629
|
+
f.translate = { x: q.x, y: q.y };
|
|
630
|
+
else if (Nt !== "none") {
|
|
631
|
+
const b = kn(Nt);
|
|
632
|
+
b && (f.translate = b);
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
if (!f.transformOrigin) {
|
|
636
|
+
const b = W(() => l.current), k = $e + ((r = q?.x) != null ? r : 0), M = Te + ((i = q?.y) != null ? i : 0);
|
|
637
|
+
f.transformOrigin = {
|
|
638
|
+
x: (b.x - k * p.scaleX - p.x) / (T * p.scaleX),
|
|
639
|
+
y: (b.y - M * p.scaleY - p.y) / (P * p.scaleY)
|
|
628
640
|
};
|
|
629
641
|
}
|
|
630
|
-
const { transformOrigin:
|
|
631
|
-
if (!
|
|
632
|
-
x:
|
|
633
|
-
y:
|
|
634
|
-
},
|
|
635
|
-
const { scaleX:
|
|
636
|
-
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
const
|
|
640
|
-
x:
|
|
641
|
-
y:
|
|
642
|
-
},
|
|
643
|
-
width: (
|
|
644
|
-
height: (
|
|
645
|
-
},
|
|
646
|
-
x:
|
|
647
|
-
y:
|
|
648
|
-
},
|
|
649
|
-
left:
|
|
650
|
-
top:
|
|
642
|
+
const { transformOrigin: te } = f, Yt = Te * p.scaleY + p.y, Bt = $e * p.scaleX + p.x;
|
|
643
|
+
if (!f.coordinates && (f.coordinates = {
|
|
644
|
+
x: Bt,
|
|
645
|
+
y: Yt
|
|
646
|
+
}, L.x !== 1 || L.y !== 1)) {
|
|
647
|
+
const { scaleX: b, scaleY: k } = y, { x: M, y: X } = te;
|
|
648
|
+
f.coordinates.x += (T * b - T) * M, f.coordinates.y += (P * k - P) * X;
|
|
649
|
+
}
|
|
650
|
+
f.dimensions || (f.dimensions = { width: T, height: P }), f.frameTransform || (f.frameTransform = p);
|
|
651
|
+
const Vt = {
|
|
652
|
+
x: f.coordinates.x - Bt,
|
|
653
|
+
y: f.coordinates.y - Yt
|
|
654
|
+
}, Ht = {
|
|
655
|
+
width: (f.dimensions.width * f.frameTransform.scaleX - T * p.scaleX) * te.x,
|
|
656
|
+
height: (f.dimensions.height * f.frameTransform.scaleY - P * p.scaleY) * te.y
|
|
657
|
+
}, Qe = {
|
|
658
|
+
x: Vt.x / p.scaleX + Ht.width,
|
|
659
|
+
y: Vt.y / p.scaleY + Ht.height
|
|
660
|
+
}, qt = {
|
|
661
|
+
left: $e + Qe.x,
|
|
662
|
+
top: Te + Qe.y
|
|
651
663
|
};
|
|
652
|
-
|
|
653
|
-
const
|
|
654
|
-
|
|
664
|
+
m.setAttribute(z, "true");
|
|
665
|
+
const Gt = W(() => u.transform), Jt = (s = f.translate) != null ? s : { x: 0, y: 0 }, gr = Gt.x * p.scaleX + Jt.x, yr = Gt.y * p.scaleY + Jt.y, Qt = An();
|
|
666
|
+
me.set(
|
|
655
667
|
{
|
|
656
|
-
width:
|
|
657
|
-
height:
|
|
658
|
-
top:
|
|
659
|
-
left:
|
|
660
|
-
translate: `${
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
668
|
+
width: T - Kt,
|
|
669
|
+
height: P - Ut,
|
|
670
|
+
top: qt.top + Qt.y,
|
|
671
|
+
left: qt.left + Qt.x,
|
|
672
|
+
translate: `${gr}px ${yr}px 0`,
|
|
673
|
+
transform: this.overlay ? "none" : mr,
|
|
674
|
+
transition: Ie ? `${Ie}, translate 0ms linear` : "translate 0ms linear",
|
|
675
|
+
scale: C ? `${L.x} ${L.y}` : "",
|
|
676
|
+
"transform-origin": `${te.x * 100}% ${te.y * 100}%`
|
|
664
677
|
},
|
|
665
|
-
|
|
666
|
-
),
|
|
667
|
-
let
|
|
668
|
-
const
|
|
669
|
-
placeholder:
|
|
670
|
-
element:
|
|
671
|
-
feedbackElement:
|
|
678
|
+
O
|
|
679
|
+
), I && (g.insertAdjacentElement("afterend", I), c?.rootElement && (typeof c.rootElement == "function" ? c.rootElement(h) : c.rootElement).appendChild(g)), ln(m) && (m.hasAttribute("popover") || m.setAttribute("popover", "manual"), ae(m), m.addEventListener("beforetoggle", vn));
|
|
680
|
+
let G, Ze, Me;
|
|
681
|
+
const Zt = Ei({
|
|
682
|
+
placeholder: I,
|
|
683
|
+
element: g,
|
|
684
|
+
feedbackElement: m,
|
|
672
685
|
frameTransform: p,
|
|
673
|
-
transformOrigin:
|
|
674
|
-
width:
|
|
675
|
-
height:
|
|
676
|
-
top:
|
|
677
|
-
left:
|
|
678
|
-
widthOffset:
|
|
679
|
-
heightOffset:
|
|
680
|
-
delta:
|
|
681
|
-
styles:
|
|
682
|
-
dragOperation:
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
686
|
+
transformOrigin: te,
|
|
687
|
+
width: T,
|
|
688
|
+
height: P,
|
|
689
|
+
top: Te,
|
|
690
|
+
left: $e,
|
|
691
|
+
widthOffset: Kt,
|
|
692
|
+
heightOffset: Ut,
|
|
693
|
+
delta: Qe,
|
|
694
|
+
styles: me,
|
|
695
|
+
dragOperation: u,
|
|
696
|
+
getTranslate: () => o.current.translate,
|
|
697
|
+
getElementMutationObserver: () => G,
|
|
698
|
+
getSavedCellWidths: () => Me,
|
|
699
|
+
setSavedCellWidths: (b) => {
|
|
700
|
+
Me = b;
|
|
687
701
|
}
|
|
688
|
-
}),
|
|
689
|
-
|
|
690
|
-
const
|
|
691
|
-
this.manager.actions.stop({ event:
|
|
692
|
-
},
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
),
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
702
|
+
}), en = new V(m);
|
|
703
|
+
W(() => u.shape = en);
|
|
704
|
+
const et = Dn(m), tn = (b) => {
|
|
705
|
+
this.manager.actions.stop({ event: b });
|
|
706
|
+
}, br = On(et);
|
|
707
|
+
Je && et.addEventListener("resize", tn), W(() => h.status) === "idle" && requestAnimationFrame(() => h.status = "dragging"), I && (Zt.observe(I), G = wi(
|
|
708
|
+
g,
|
|
709
|
+
I,
|
|
710
|
+
jt
|
|
711
|
+
), Ze = Si(
|
|
712
|
+
g,
|
|
713
|
+
I,
|
|
714
|
+
m
|
|
701
715
|
));
|
|
702
|
-
const
|
|
703
|
-
var
|
|
704
|
-
if (!
|
|
705
|
-
const
|
|
706
|
-
|
|
707
|
-
},
|
|
708
|
-
var
|
|
709
|
-
if (
|
|
716
|
+
const nn = (a = d.dragOperation.source) == null ? void 0 : a.id, _r = () => {
|
|
717
|
+
var b;
|
|
718
|
+
if (!Je || nn == null) return;
|
|
719
|
+
const k = d.registry.draggables.get(nn), M = (b = k?.handle) != null ? b : k?.element;
|
|
720
|
+
En(M) && M.focus();
|
|
721
|
+
}, tt = () => {
|
|
722
|
+
var b;
|
|
723
|
+
if (G?.disconnect(), Ze?.disconnect(), Zt.disconnect(), et.removeEventListener("resize", tn), ln(m) && (m.removeEventListener(
|
|
710
724
|
"beforetoggle",
|
|
711
|
-
|
|
712
|
-
),
|
|
713
|
-
const
|
|
714
|
-
for (const [
|
|
715
|
-
|
|
725
|
+
vn
|
|
726
|
+
), m.removeAttribute("popover")), m.removeAttribute(z), me.reset(), Me && pt(g)) {
|
|
727
|
+
const X = Array.from(g.cells);
|
|
728
|
+
for (const [nt, Re] of X.entries())
|
|
729
|
+
Re.style.width = (b = Me[nt]) != null ? b : "";
|
|
716
730
|
}
|
|
717
|
-
|
|
718
|
-
const
|
|
719
|
-
|
|
720
|
-
},
|
|
731
|
+
h.status = "idle";
|
|
732
|
+
const k = o.current.translate != null, M = u.status.dragging;
|
|
733
|
+
I && (!M && k || I.parentElement !== m.parentElement) && m.isConnected && I.replaceWith(m), I?.remove();
|
|
734
|
+
}, wr = c?.dropAnimation, rn = this, Sr = Vr(
|
|
721
735
|
// Update transform on move
|
|
722
736
|
() => {
|
|
723
|
-
var
|
|
724
|
-
const { transform:
|
|
725
|
-
if (!(!
|
|
726
|
-
const
|
|
727
|
-
x:
|
|
728
|
-
y:
|
|
729
|
-
},
|
|
730
|
-
var
|
|
731
|
-
return (
|
|
732
|
-
}),
|
|
733
|
-
if (
|
|
737
|
+
var b, k, M;
|
|
738
|
+
const { transform: X, status: nt } = u;
|
|
739
|
+
if (!(!X.x && !X.y && !o.current.translate) && nt.dragging) {
|
|
740
|
+
const Re = (b = f.translate) != null ? b : { x: 0, y: 0 }, Le = {
|
|
741
|
+
x: X.x / p.scaleX + Re.x,
|
|
742
|
+
y: X.y / p.scaleY + Re.y
|
|
743
|
+
}, sn = o.current.translate, Er = W(() => u.modifiers), rt = W(() => {
|
|
744
|
+
var ye;
|
|
745
|
+
return (ye = u.shape) == null ? void 0 : ye.current;
|
|
746
|
+
}), ge = c?.keyboardTransition, on = Je && !br && ge !== null ? `${(k = ge?.duration) != null ? k : 250}ms ${(M = ge?.easing) != null ? M : "cubic-bezier(0.25, 1, 0.5, 1)"}` : "0ms linear";
|
|
747
|
+
if (me.set(
|
|
734
748
|
{
|
|
735
|
-
transition: `${
|
|
736
|
-
translate: `${
|
|
749
|
+
transition: Ie ? `${Ie}, translate ${on}` : `translate ${on}`,
|
|
750
|
+
translate: `${Le.x}px ${Le.y}px 0`
|
|
737
751
|
},
|
|
738
|
-
|
|
739
|
-
),
|
|
740
|
-
const
|
|
741
|
-
|
|
742
|
-
|
|
752
|
+
O
|
|
753
|
+
), G?.takeRecords(), rt && rt !== en && sn && !Er.length) {
|
|
754
|
+
const ye = Hr.delta(Le, sn);
|
|
755
|
+
u.shape = kt.from(
|
|
756
|
+
rt.boundingRectangle
|
|
743
757
|
).translate(
|
|
744
|
-
|
|
745
|
-
|
|
758
|
+
ye.x * p.scaleX,
|
|
759
|
+
ye.y * p.scaleY
|
|
746
760
|
);
|
|
747
761
|
} else
|
|
748
|
-
|
|
749
|
-
|
|
762
|
+
u.shape = new V(m);
|
|
763
|
+
o.current.translate = Le;
|
|
750
764
|
}
|
|
751
765
|
},
|
|
752
766
|
// Drop animation
|
|
753
767
|
function() {
|
|
754
|
-
if (
|
|
755
|
-
this.dispose(),
|
|
756
|
-
const
|
|
757
|
-
let
|
|
758
|
-
const
|
|
759
|
-
if (!
|
|
760
|
-
|
|
768
|
+
if (u.status.dropped) {
|
|
769
|
+
this.dispose(), h.status = "dropping";
|
|
770
|
+
const b = w?.dropAnimation !== void 0 ? w.dropAnimation : rn.dropAnimation !== void 0 ? rn.dropAnimation : wr;
|
|
771
|
+
let k = o.current.translate;
|
|
772
|
+
const M = k != null;
|
|
773
|
+
if (!k && g !== m && (k = { x: 0, y: 0 }), !k || b === null) {
|
|
774
|
+
tt();
|
|
761
775
|
return;
|
|
762
776
|
}
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
+
d.renderer.rendering.then(() => {
|
|
778
|
+
Ai({
|
|
779
|
+
source: h,
|
|
780
|
+
element: g,
|
|
781
|
+
feedbackElement: m,
|
|
782
|
+
placeholder: I,
|
|
783
|
+
translate: k,
|
|
784
|
+
moved: M,
|
|
785
|
+
transition: zt,
|
|
786
|
+
alignment: h.alignment,
|
|
787
|
+
styles: me,
|
|
788
|
+
animation: b ?? void 0,
|
|
789
|
+
getElementMutationObserver: () => G,
|
|
790
|
+
cleanup: tt,
|
|
791
|
+
restoreFocus: _r
|
|
777
792
|
});
|
|
778
793
|
});
|
|
779
794
|
}
|
|
780
795
|
}
|
|
781
796
|
);
|
|
782
797
|
return () => {
|
|
783
|
-
|
|
798
|
+
tt(), Sr();
|
|
784
799
|
};
|
|
785
800
|
};
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
var
|
|
790
|
-
|
|
791
|
-
var
|
|
801
|
+
R(Ae, 4, "overlay", Yn, ue, Pt);
|
|
802
|
+
ee(Ae, ue);
|
|
803
|
+
ue.configure = Ce(ue);
|
|
804
|
+
var Di = ue, be = !0, Oi = !1, Hn, qn, Gn, Jn, U, Tt, $t;
|
|
805
|
+
Jn = (Gn = [j], F.Forward), qn = (Hn = [j], F.Reverse);
|
|
806
|
+
var De = class {
|
|
792
807
|
constructor() {
|
|
793
|
-
|
|
808
|
+
S(this, Tt, A(U, 8, this, be)), A(U, 11, this), S(this, $t, A(U, 12, this, be)), A(U, 15, this);
|
|
794
809
|
}
|
|
795
810
|
isLocked(e) {
|
|
796
|
-
return e ===
|
|
811
|
+
return e === F.Idle ? !1 : e == null ? this[F.Forward] === be && this[F.Reverse] === be : this[e] === be;
|
|
797
812
|
}
|
|
798
813
|
unlock(e) {
|
|
799
|
-
e !==
|
|
814
|
+
e !== F.Idle && (this[e] = Oi);
|
|
800
815
|
}
|
|
801
816
|
};
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
var
|
|
817
|
+
U = ve(null);
|
|
818
|
+
Tt = /* @__PURE__ */ new WeakMap();
|
|
819
|
+
$t = /* @__PURE__ */ new WeakMap();
|
|
820
|
+
R(U, 4, Jn, Gn, De, Tt);
|
|
821
|
+
R(U, 4, qn, Hn, De, $t);
|
|
822
|
+
ee(U, De);
|
|
823
|
+
var Ci = [F.Forward, F.Reverse], mn = class {
|
|
809
824
|
constructor() {
|
|
810
|
-
this.x = new
|
|
825
|
+
this.x = new De(), this.y = new De();
|
|
811
826
|
}
|
|
812
827
|
isLocked() {
|
|
813
828
|
return this.x.isLocked() && this.y.isLocked();
|
|
814
829
|
}
|
|
815
|
-
},
|
|
830
|
+
}, Pi = class extends he {
|
|
816
831
|
constructor(e) {
|
|
817
832
|
super(e);
|
|
818
|
-
const t =
|
|
833
|
+
const t = Pn(new mn());
|
|
819
834
|
let n = null;
|
|
820
|
-
this.signal = t,
|
|
835
|
+
this.signal = t, fe(() => {
|
|
821
836
|
const { status: r } = e.dragOperation;
|
|
822
837
|
if (!r.initialized) {
|
|
823
|
-
n = null, t.value = new
|
|
838
|
+
n = null, t.value = new mn();
|
|
824
839
|
return;
|
|
825
840
|
}
|
|
826
841
|
const { delta: i } = e.dragOperation.position;
|
|
827
842
|
if (n) {
|
|
828
843
|
const s = {
|
|
829
|
-
x:
|
|
830
|
-
y:
|
|
831
|
-
},
|
|
832
|
-
|
|
833
|
-
for (const
|
|
834
|
-
for (const
|
|
835
|
-
s[
|
|
836
|
-
t.value =
|
|
844
|
+
x: gn(i.x, n.x),
|
|
845
|
+
y: gn(i.y, n.y)
|
|
846
|
+
}, a = t.peek();
|
|
847
|
+
Gr(() => {
|
|
848
|
+
for (const o of Cn)
|
|
849
|
+
for (const d of Ci)
|
|
850
|
+
s[o] === d && a[o].unlock(d);
|
|
851
|
+
t.value = a;
|
|
837
852
|
});
|
|
838
853
|
}
|
|
839
854
|
n = i;
|
|
@@ -843,106 +858,108 @@ var vi = [R.Forward, R.Reverse], tn = class {
|
|
|
843
858
|
return this.signal.peek();
|
|
844
859
|
}
|
|
845
860
|
};
|
|
846
|
-
function
|
|
861
|
+
function gn(e, t) {
|
|
847
862
|
return Math.sign(e - t);
|
|
848
863
|
}
|
|
849
|
-
var
|
|
864
|
+
var Qn, mt, Oe, It, K, gt, qe = class extends (mt = St, Qn = [j], mt) {
|
|
850
865
|
constructor(e) {
|
|
851
|
-
super(e),
|
|
852
|
-
if (!
|
|
866
|
+
super(e), S(this, It, A(Oe, 8, this, !1)), A(Oe, 11, this), S(this, K), S(this, gt, () => {
|
|
867
|
+
if (!_(this, K))
|
|
853
868
|
return;
|
|
854
|
-
const { element: s, by:
|
|
855
|
-
|
|
856
|
-
}), this.scroll = (s) => {
|
|
869
|
+
const { element: s, by: a } = _(this, K);
|
|
870
|
+
a.y && (s.scrollTop += a.y), a.x && (s.scrollLeft += a.x);
|
|
871
|
+
}), this.scroll = (s, a) => {
|
|
857
872
|
var o;
|
|
858
873
|
if (this.disabled)
|
|
859
874
|
return !1;
|
|
860
|
-
const
|
|
861
|
-
if (!
|
|
862
|
-
return
|
|
863
|
-
const { position:
|
|
864
|
-
if (
|
|
865
|
-
const { by:
|
|
866
|
-
x:
|
|
867
|
-
y:
|
|
868
|
-
} : void 0,
|
|
869
|
-
if (
|
|
875
|
+
const d = this.getScrollableElements();
|
|
876
|
+
if (!d)
|
|
877
|
+
return $(this, K, void 0), !1;
|
|
878
|
+
const { position: c } = this.manager.dragOperation, u = c?.current;
|
|
879
|
+
if (u) {
|
|
880
|
+
const { by: l } = s ?? {}, h = l ? {
|
|
881
|
+
x: yn(l.x),
|
|
882
|
+
y: yn(l.y)
|
|
883
|
+
} : void 0, v = h ? void 0 : this.scrollIntentTracker.current;
|
|
884
|
+
if (v?.isLocked())
|
|
870
885
|
return !1;
|
|
871
|
-
for (const
|
|
872
|
-
const
|
|
873
|
-
if (
|
|
874
|
-
const { speed:
|
|
886
|
+
for (const g of d) {
|
|
887
|
+
const w = $r(g, l);
|
|
888
|
+
if (w.x || w.y) {
|
|
889
|
+
const { speed: D, direction: x } = Ir(
|
|
890
|
+
g,
|
|
875
891
|
u,
|
|
876
|
-
|
|
877
|
-
|
|
892
|
+
h,
|
|
893
|
+
a?.acceleration,
|
|
894
|
+
a?.threshold
|
|
878
895
|
);
|
|
879
|
-
if (
|
|
880
|
-
for (const
|
|
881
|
-
|
|
882
|
-
if (
|
|
883
|
-
const { x:
|
|
884
|
-
if (
|
|
885
|
-
const
|
|
886
|
-
if (this.autoScrolling &&
|
|
896
|
+
if (v)
|
|
897
|
+
for (const f of Cn)
|
|
898
|
+
v[f].isLocked(x[f]) && (D[f] = 0, x[f] = 0);
|
|
899
|
+
if (x.x || x.y) {
|
|
900
|
+
const { x: f, y: m } = l ?? x, p = f * D.x, y = m * D.y;
|
|
901
|
+
if (p || y) {
|
|
902
|
+
const C = (o = _(this, K)) == null ? void 0 : o.by;
|
|
903
|
+
if (this.autoScrolling && C && (C.x && !p || C.y && !y))
|
|
887
904
|
continue;
|
|
888
|
-
return
|
|
889
|
-
element:
|
|
905
|
+
return $(this, K, {
|
|
906
|
+
element: g,
|
|
890
907
|
by: {
|
|
891
|
-
x:
|
|
892
|
-
y
|
|
908
|
+
x: p,
|
|
909
|
+
y
|
|
893
910
|
}
|
|
894
|
-
}),
|
|
911
|
+
}), je.schedule(_(this, gt)), !0;
|
|
895
912
|
}
|
|
896
913
|
}
|
|
897
914
|
}
|
|
898
915
|
}
|
|
899
916
|
}
|
|
900
|
-
return
|
|
917
|
+
return $(this, K, void 0), !1;
|
|
901
918
|
};
|
|
902
919
|
let t = null, n = null;
|
|
903
|
-
const r =
|
|
904
|
-
const { position: s, source:
|
|
920
|
+
const r = hn(() => {
|
|
921
|
+
const { position: s, source: a } = e.dragOperation;
|
|
905
922
|
if (!s)
|
|
906
923
|
return null;
|
|
907
|
-
const
|
|
908
|
-
|
|
924
|
+
const o = jr(
|
|
925
|
+
Ne(a?.element),
|
|
909
926
|
s.current
|
|
910
927
|
);
|
|
911
|
-
return
|
|
912
|
-
}), i =
|
|
913
|
-
const s = r.value, { documentElement:
|
|
914
|
-
if (!s || s ===
|
|
915
|
-
const { target:
|
|
916
|
-
if (
|
|
917
|
-
const
|
|
928
|
+
return o && (t = o), o ?? t;
|
|
929
|
+
}), i = hn(() => {
|
|
930
|
+
const s = r.value, { documentElement: a } = Et(s);
|
|
931
|
+
if (!s || s === a) {
|
|
932
|
+
const { target: o } = e.dragOperation, d = o?.element;
|
|
933
|
+
if (d) {
|
|
934
|
+
const c = an(d, {
|
|
918
935
|
excludeElement: !1
|
|
919
936
|
});
|
|
920
|
-
return n =
|
|
937
|
+
return n = c, c;
|
|
921
938
|
}
|
|
922
939
|
}
|
|
923
940
|
if (s) {
|
|
924
|
-
const
|
|
941
|
+
const o = an(s, {
|
|
925
942
|
excludeElement: !1
|
|
926
943
|
});
|
|
927
|
-
return this.autoScrolling && n &&
|
|
944
|
+
return this.autoScrolling && n && o.size < n?.size ? n : (n = o, o);
|
|
928
945
|
}
|
|
929
946
|
return n = null, null;
|
|
930
|
-
},
|
|
931
|
-
this.getScrollableElements = () => i.value, this.scrollIntentTracker = new
|
|
932
|
-
this.disabled || s.defaultPrevented || !
|
|
947
|
+
}, Br);
|
|
948
|
+
this.getScrollableElements = () => i.value, this.scrollIntentTracker = new Pi(e), this.destroy = e.monitor.addEventListener("dragmove", (s) => {
|
|
949
|
+
this.disabled || s.defaultPrevented || !xt(e.dragOperation.activatorEvent) || !s.by || this.scroll({ by: s.by }) && s.preventDefault();
|
|
933
950
|
});
|
|
934
951
|
}
|
|
935
952
|
};
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
function
|
|
943
|
-
return e > 0 ?
|
|
953
|
+
Oe = ve(mt);
|
|
954
|
+
It = /* @__PURE__ */ new WeakMap();
|
|
955
|
+
K = /* @__PURE__ */ new WeakMap();
|
|
956
|
+
gt = /* @__PURE__ */ new WeakMap();
|
|
957
|
+
R(Oe, 4, "autoScrolling", Qn, qe, It);
|
|
958
|
+
ee(Oe, qe);
|
|
959
|
+
function yn(e) {
|
|
960
|
+
return e > 0 ? F.Forward : e < 0 ? F.Reverse : F.Idle;
|
|
944
961
|
}
|
|
945
|
-
var
|
|
962
|
+
var Ti = class {
|
|
946
963
|
constructor(e) {
|
|
947
964
|
this.scheduler = e, this.pending = !1, this.tasks = /* @__PURE__ */ new Set(), this.resolvers = /* @__PURE__ */ new Set(), this.flush = () => {
|
|
948
965
|
const { tasks: t, resolvers: n } = this;
|
|
@@ -956,82 +973,98 @@ var gi = class {
|
|
|
956
973
|
schedule(e) {
|
|
957
974
|
return this.tasks.add(e), this.pending || (this.pending = !0, this.scheduler(this.flush)), new Promise((t) => this.resolvers.add(t));
|
|
958
975
|
}
|
|
959
|
-
},
|
|
976
|
+
}, $i = new Ti((e) => {
|
|
960
977
|
typeof requestAnimationFrame == "function" ? requestAnimationFrame(e) : e();
|
|
961
|
-
}),
|
|
962
|
-
constructor(
|
|
963
|
-
super(
|
|
964
|
-
const
|
|
965
|
-
if (!
|
|
978
|
+
}), Ii = 10, yt = class extends he {
|
|
979
|
+
constructor(t, n) {
|
|
980
|
+
super(t, n);
|
|
981
|
+
const r = t.registry.plugins.get(qe);
|
|
982
|
+
if (!r)
|
|
966
983
|
throw new Error("AutoScroller plugin depends on Scroller plugin");
|
|
967
|
-
this.destroy =
|
|
984
|
+
this.destroy = fe(() => {
|
|
985
|
+
var i, s, a;
|
|
968
986
|
if (this.disabled)
|
|
969
987
|
return;
|
|
970
|
-
const { position:
|
|
971
|
-
if (
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
988
|
+
const { position: o, status: d } = t.dragOperation;
|
|
989
|
+
if (d.dragging) {
|
|
990
|
+
const c = {
|
|
991
|
+
acceleration: (i = this.options) == null ? void 0 : i.acceleration,
|
|
992
|
+
threshold: typeof ((s = this.options) == null ? void 0 : s.threshold) == "number" ? { x: this.options.threshold, y: this.options.threshold } : (a = this.options) == null ? void 0 : a.threshold
|
|
993
|
+
};
|
|
994
|
+
if (r.scroll(void 0, c)) {
|
|
995
|
+
r.autoScrolling = !0;
|
|
996
|
+
const l = setInterval(
|
|
997
|
+
() => $i.schedule(
|
|
998
|
+
() => r.scroll(void 0, c)
|
|
999
|
+
),
|
|
1000
|
+
Ii
|
|
977
1001
|
);
|
|
978
1002
|
return () => {
|
|
979
|
-
clearInterval(
|
|
1003
|
+
clearInterval(l);
|
|
980
1004
|
};
|
|
981
1005
|
} else
|
|
982
|
-
|
|
1006
|
+
r.autoScrolling = !1;
|
|
1007
|
+
}
|
|
983
1008
|
});
|
|
984
1009
|
}
|
|
985
|
-
}
|
|
1010
|
+
};
|
|
1011
|
+
yt.configure = Ce(yt);
|
|
1012
|
+
var Zn = yt, bn = {
|
|
986
1013
|
capture: !0,
|
|
987
1014
|
passive: !0
|
|
988
|
-
},
|
|
1015
|
+
}, we, Mi = class extends St {
|
|
989
1016
|
constructor(e) {
|
|
990
|
-
super(e),
|
|
991
|
-
|
|
992
|
-
this.manager.collisionObserver.forceUpdate(!1),
|
|
1017
|
+
super(e), S(this, we), this.handleScroll = () => {
|
|
1018
|
+
_(this, we) == null && $(this, we, setTimeout(() => {
|
|
1019
|
+
this.manager.collisionObserver.forceUpdate(!1), $(this, we, void 0);
|
|
993
1020
|
}, 50));
|
|
994
1021
|
};
|
|
995
1022
|
const { dragOperation: t } = this.manager;
|
|
996
|
-
this.destroy =
|
|
1023
|
+
this.destroy = fe(() => {
|
|
997
1024
|
var n, r, i;
|
|
998
1025
|
if (t.status.dragging) {
|
|
999
|
-
const
|
|
1000
|
-
return
|
|
1001
|
-
|
|
1026
|
+
const a = (i = (r = (n = t.source) == null ? void 0 : n.element) == null ? void 0 : r.ownerDocument) != null ? i : document;
|
|
1027
|
+
return a.addEventListener("scroll", this.handleScroll, bn), () => {
|
|
1028
|
+
a.removeEventListener(
|
|
1002
1029
|
"scroll",
|
|
1003
1030
|
this.handleScroll,
|
|
1004
|
-
|
|
1031
|
+
bn
|
|
1005
1032
|
);
|
|
1006
1033
|
};
|
|
1007
1034
|
}
|
|
1008
1035
|
});
|
|
1009
1036
|
}
|
|
1010
1037
|
};
|
|
1011
|
-
|
|
1012
|
-
var
|
|
1013
|
-
constructor(e
|
|
1014
|
-
super(e
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1038
|
+
we = /* @__PURE__ */ new WeakMap();
|
|
1039
|
+
var Ri = "* { user-select: none !important; -webkit-user-select: none !important; }", Li = class extends he {
|
|
1040
|
+
constructor(e) {
|
|
1041
|
+
super(e), this.manager = e;
|
|
1042
|
+
const t = e.registry.plugins.get(
|
|
1043
|
+
He
|
|
1044
|
+
), n = t?.register(Ri);
|
|
1045
|
+
if (this.destroy = fe(() => {
|
|
1046
|
+
const { dragOperation: r } = this.manager;
|
|
1047
|
+
if (r.status.initialized)
|
|
1048
|
+
return ot(), document.addEventListener("selectionchange", ot, {
|
|
1020
1049
|
capture: !0
|
|
1021
1050
|
}), () => {
|
|
1022
|
-
document.removeEventListener("selectionchange",
|
|
1051
|
+
document.removeEventListener("selectionchange", ot, {
|
|
1023
1052
|
capture: !0
|
|
1024
|
-
})
|
|
1053
|
+
});
|
|
1025
1054
|
};
|
|
1026
|
-
|
|
1027
|
-
|
|
1055
|
+
}), n) {
|
|
1056
|
+
const r = this.destroy.bind(this);
|
|
1057
|
+
this.destroy = () => {
|
|
1058
|
+
n(), r();
|
|
1059
|
+
};
|
|
1060
|
+
}
|
|
1028
1061
|
}
|
|
1029
1062
|
};
|
|
1030
|
-
function
|
|
1063
|
+
function ot() {
|
|
1031
1064
|
var e;
|
|
1032
1065
|
(e = document.getSelection()) == null || e.removeAllRanges();
|
|
1033
1066
|
}
|
|
1034
|
-
var
|
|
1067
|
+
var Se = Object.freeze({
|
|
1035
1068
|
offset: 10,
|
|
1036
1069
|
keyboardCodes: {
|
|
1037
1070
|
start: ["Space", "Enter"],
|
|
@@ -1047,27 +1080,27 @@ var be = Object.freeze({
|
|
|
1047
1080
|
const r = (n = t.handle) != null ? n : t.element;
|
|
1048
1081
|
return e.target !== r;
|
|
1049
1082
|
}
|
|
1050
|
-
}),
|
|
1083
|
+
}), re, Be = class extends ze {
|
|
1051
1084
|
constructor(t, n) {
|
|
1052
|
-
super(t), this.manager = t, this.options = n,
|
|
1085
|
+
super(t), this.manager = t, this.options = n, S(this, re, []), this.listeners = new Sn(), this.handleSourceKeyDown = (r, i, s) => {
|
|
1053
1086
|
if (this.disabled || r.defaultPrevented || !le(r.target) || i.disabled)
|
|
1054
1087
|
return;
|
|
1055
1088
|
const {
|
|
1056
|
-
keyboardCodes:
|
|
1057
|
-
preventActivation:
|
|
1089
|
+
keyboardCodes: a = Se.keyboardCodes,
|
|
1090
|
+
preventActivation: o = Se.preventActivation
|
|
1058
1091
|
} = s ?? {};
|
|
1059
|
-
|
|
1092
|
+
a.start.includes(r.code) && this.manager.dragOperation.status.idle && (o?.(r, i) || this.handleStart(r, i, s));
|
|
1060
1093
|
};
|
|
1061
1094
|
}
|
|
1062
1095
|
bind(t, n = this.options) {
|
|
1063
|
-
return
|
|
1096
|
+
return fe(() => {
|
|
1064
1097
|
var i;
|
|
1065
|
-
const s = (i = t.handle) != null ? i : t.element,
|
|
1066
|
-
|
|
1098
|
+
const s = (i = t.handle) != null ? i : t.element, a = (o) => {
|
|
1099
|
+
xt(o) && this.handleSourceKeyDown(o, t, n);
|
|
1067
1100
|
};
|
|
1068
1101
|
if (s)
|
|
1069
|
-
return s.addEventListener("keydown",
|
|
1070
|
-
s.removeEventListener("keydown",
|
|
1102
|
+
return s.addEventListener("keydown", a), () => {
|
|
1103
|
+
s.removeEventListener("keydown", a);
|
|
1071
1104
|
};
|
|
1072
1105
|
});
|
|
1073
1106
|
}
|
|
@@ -1075,8 +1108,8 @@ var be = Object.freeze({
|
|
|
1075
1108
|
const { element: i } = n;
|
|
1076
1109
|
if (!i)
|
|
1077
1110
|
throw new Error("Source draggable does not have an associated element");
|
|
1078
|
-
t.preventDefault(), t.stopImmediatePropagation(),
|
|
1079
|
-
const { center: s } = new
|
|
1111
|
+
t.preventDefault(), t.stopImmediatePropagation(), Tr(i);
|
|
1112
|
+
const { center: s } = new V(i);
|
|
1080
1113
|
if (this.manager.actions.start({
|
|
1081
1114
|
event: t,
|
|
1082
1115
|
coordinates: {
|
|
@@ -1086,26 +1119,26 @@ var be = Object.freeze({
|
|
|
1086
1119
|
source: n
|
|
1087
1120
|
}).signal.aborted) return this.cleanup();
|
|
1088
1121
|
this.sideEffects();
|
|
1089
|
-
const
|
|
1090
|
-
this.listeners.bind(
|
|
1122
|
+
const o = Et(i), d = [
|
|
1123
|
+
this.listeners.bind(o, [
|
|
1091
1124
|
{
|
|
1092
1125
|
type: "keydown",
|
|
1093
|
-
listener: (
|
|
1126
|
+
listener: (c) => this.handleKeyDown(c, n, r),
|
|
1094
1127
|
options: { capture: !0 }
|
|
1095
1128
|
}
|
|
1096
1129
|
])
|
|
1097
1130
|
];
|
|
1098
|
-
|
|
1131
|
+
_(this, re).push(...d);
|
|
1099
1132
|
}
|
|
1100
1133
|
handleKeyDown(t, n, r) {
|
|
1101
|
-
const { keyboardCodes: i =
|
|
1102
|
-
if (
|
|
1134
|
+
const { keyboardCodes: i = Se.keyboardCodes } = r ?? {};
|
|
1135
|
+
if (ne(t, [...i.end, ...i.cancel])) {
|
|
1103
1136
|
t.preventDefault();
|
|
1104
|
-
const s =
|
|
1137
|
+
const s = ne(t, i.cancel);
|
|
1105
1138
|
this.handleEnd(t, s);
|
|
1106
1139
|
return;
|
|
1107
1140
|
}
|
|
1108
|
-
|
|
1141
|
+
ne(t, i.up) ? this.handleMove("up", t) : ne(t, i.down) && this.handleMove("down", t), ne(t, i.left) ? this.handleMove("left", t) : ne(t, i.right) && this.handleMove("right", t);
|
|
1109
1142
|
}
|
|
1110
1143
|
handleEnd(t, n) {
|
|
1111
1144
|
this.manager.actions.stop({
|
|
@@ -1115,72 +1148,72 @@ var be = Object.freeze({
|
|
|
1115
1148
|
}
|
|
1116
1149
|
handleMove(t, n) {
|
|
1117
1150
|
var r, i;
|
|
1118
|
-
const { shape: s } = this.manager.dragOperation,
|
|
1119
|
-
let
|
|
1151
|
+
const { shape: s } = this.manager.dragOperation, a = n.shiftKey ? 5 : 1;
|
|
1152
|
+
let o = {
|
|
1120
1153
|
x: 0,
|
|
1121
1154
|
y: 0
|
|
1122
|
-
},
|
|
1123
|
-
if (typeof
|
|
1155
|
+
}, d = (i = (r = this.options) == null ? void 0 : r.offset) != null ? i : Se.offset;
|
|
1156
|
+
if (typeof d == "number" && (d = { x: d, y: d }), !!s) {
|
|
1124
1157
|
switch (t) {
|
|
1125
1158
|
case "up":
|
|
1126
|
-
|
|
1159
|
+
o = { x: 0, y: -d.y * a };
|
|
1127
1160
|
break;
|
|
1128
1161
|
case "down":
|
|
1129
|
-
|
|
1162
|
+
o = { x: 0, y: d.y * a };
|
|
1130
1163
|
break;
|
|
1131
1164
|
case "left":
|
|
1132
|
-
|
|
1165
|
+
o = { x: -d.x * a, y: 0 };
|
|
1133
1166
|
break;
|
|
1134
1167
|
case "right":
|
|
1135
|
-
|
|
1168
|
+
o = { x: d.x * a, y: 0 };
|
|
1136
1169
|
break;
|
|
1137
1170
|
}
|
|
1138
|
-
(
|
|
1171
|
+
(o.x || o.y) && (n.preventDefault(), this.manager.actions.move({
|
|
1139
1172
|
event: n,
|
|
1140
|
-
by:
|
|
1173
|
+
by: o
|
|
1141
1174
|
}));
|
|
1142
1175
|
}
|
|
1143
1176
|
}
|
|
1144
1177
|
sideEffects() {
|
|
1145
|
-
const t = this.manager.registry.plugins.get(
|
|
1146
|
-
t?.disabled === !1 && (t.disable(),
|
|
1178
|
+
const t = this.manager.registry.plugins.get(Zn);
|
|
1179
|
+
t?.disabled === !1 && (t.disable(), _(this, re).push(() => {
|
|
1147
1180
|
t.enable();
|
|
1148
1181
|
}));
|
|
1149
1182
|
}
|
|
1150
1183
|
cleanup() {
|
|
1151
|
-
|
|
1184
|
+
_(this, re).forEach((t) => t()), $(this, re, []);
|
|
1152
1185
|
}
|
|
1153
1186
|
destroy() {
|
|
1154
1187
|
this.cleanup(), this.listeners.clear();
|
|
1155
1188
|
}
|
|
1156
1189
|
};
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
var
|
|
1161
|
-
function
|
|
1190
|
+
re = /* @__PURE__ */ new WeakMap();
|
|
1191
|
+
Be.configure = Ce(Be);
|
|
1192
|
+
Be.defaults = Se;
|
|
1193
|
+
var Wi = Be;
|
|
1194
|
+
function ne(e, t) {
|
|
1162
1195
|
return t.includes(e.code);
|
|
1163
1196
|
}
|
|
1164
|
-
var
|
|
1197
|
+
var J, Fi = class extends wn {
|
|
1165
1198
|
constructor() {
|
|
1166
|
-
super(...arguments),
|
|
1199
|
+
super(...arguments), S(this, J);
|
|
1167
1200
|
}
|
|
1168
1201
|
onEvent(e) {
|
|
1169
1202
|
switch (e.type) {
|
|
1170
1203
|
case "pointerdown":
|
|
1171
|
-
|
|
1204
|
+
$(this, J, ce(e));
|
|
1172
1205
|
break;
|
|
1173
1206
|
case "pointermove":
|
|
1174
|
-
if (!
|
|
1207
|
+
if (!_(this, J)) return;
|
|
1175
1208
|
const { x: t, y: n } = ce(e), r = {
|
|
1176
|
-
x: t -
|
|
1177
|
-
y: n -
|
|
1209
|
+
x: t - _(this, J).x,
|
|
1210
|
+
y: n - _(this, J).y
|
|
1178
1211
|
}, { tolerance: i } = this.options;
|
|
1179
|
-
if (i &&
|
|
1212
|
+
if (i && dt(r, i)) {
|
|
1180
1213
|
this.abort();
|
|
1181
1214
|
return;
|
|
1182
1215
|
}
|
|
1183
|
-
|
|
1216
|
+
dt(r, this.options.value) && this.activate(e);
|
|
1184
1217
|
break;
|
|
1185
1218
|
case "pointerup":
|
|
1186
1219
|
this.abort();
|
|
@@ -1188,29 +1221,29 @@ var V, Ei = class extends an {
|
|
|
1188
1221
|
}
|
|
1189
1222
|
}
|
|
1190
1223
|
abort() {
|
|
1191
|
-
|
|
1224
|
+
$(this, J, void 0);
|
|
1192
1225
|
}
|
|
1193
1226
|
};
|
|
1194
|
-
|
|
1195
|
-
var
|
|
1227
|
+
J = /* @__PURE__ */ new WeakMap();
|
|
1228
|
+
var ie, Q, zi = class extends wn {
|
|
1196
1229
|
constructor() {
|
|
1197
|
-
super(...arguments),
|
|
1230
|
+
super(...arguments), S(this, ie), S(this, Q);
|
|
1198
1231
|
}
|
|
1199
1232
|
onEvent(e) {
|
|
1200
1233
|
switch (e.type) {
|
|
1201
1234
|
case "pointerdown":
|
|
1202
|
-
|
|
1235
|
+
$(this, Q, ce(e)), $(this, ie, setTimeout(
|
|
1203
1236
|
() => this.activate(e),
|
|
1204
1237
|
this.options.value
|
|
1205
1238
|
));
|
|
1206
1239
|
break;
|
|
1207
1240
|
case "pointermove":
|
|
1208
|
-
if (!
|
|
1241
|
+
if (!_(this, Q)) return;
|
|
1209
1242
|
const { x: t, y: n } = ce(e), r = {
|
|
1210
|
-
x: t -
|
|
1211
|
-
y: n -
|
|
1243
|
+
x: t - _(this, Q).x,
|
|
1244
|
+
y: n - _(this, Q).y
|
|
1212
1245
|
};
|
|
1213
|
-
|
|
1246
|
+
dt(r, this.options.tolerance) && this.abort();
|
|
1214
1247
|
break;
|
|
1215
1248
|
case "pointerup":
|
|
1216
1249
|
this.abort();
|
|
@@ -1218,37 +1251,37 @@ var se, q, xi = class extends an {
|
|
|
1218
1251
|
}
|
|
1219
1252
|
}
|
|
1220
1253
|
abort() {
|
|
1221
|
-
|
|
1254
|
+
_(this, ie) && (clearTimeout(_(this, ie)), $(this, Q, void 0), $(this, ie, void 0));
|
|
1222
1255
|
}
|
|
1223
1256
|
};
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
var
|
|
1257
|
+
ie = /* @__PURE__ */ new WeakMap();
|
|
1258
|
+
Q = /* @__PURE__ */ new WeakMap();
|
|
1259
|
+
var oe = class {
|
|
1227
1260
|
};
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
var
|
|
1261
|
+
oe.Delay = zi;
|
|
1262
|
+
oe.Distance = Fi;
|
|
1263
|
+
var bt = Object.freeze({
|
|
1231
1264
|
activationConstraints(e, t) {
|
|
1232
1265
|
var n;
|
|
1233
1266
|
const { pointerType: r, target: i } = e;
|
|
1234
1267
|
if (!(r === "mouse" && le(i) && (t.handle === i || (n = t.handle) != null && n.contains(i))))
|
|
1235
1268
|
return r === "touch" ? [
|
|
1236
|
-
new
|
|
1237
|
-
] :
|
|
1238
|
-
new
|
|
1269
|
+
new oe.Delay({ value: 250, tolerance: 5 })
|
|
1270
|
+
] : Rr(i) && !e.defaultPrevented ? [
|
|
1271
|
+
new oe.Delay({ value: 200, tolerance: 0 })
|
|
1239
1272
|
] : [
|
|
1240
|
-
new
|
|
1241
|
-
new
|
|
1273
|
+
new oe.Delay({ value: 200, tolerance: 10 }),
|
|
1274
|
+
new oe.Distance({ value: 5 })
|
|
1242
1275
|
];
|
|
1243
1276
|
},
|
|
1244
1277
|
preventActivation(e, t) {
|
|
1245
1278
|
var n;
|
|
1246
1279
|
const { target: r } = e;
|
|
1247
|
-
return r === t.element || r === t.handle || !le(r) || (n = t.handle) != null && n.contains(r) ? !1 :
|
|
1280
|
+
return r === t.element || r === t.handle || !le(r) || (n = t.handle) != null && n.contains(r) ? !1 : Mr(r);
|
|
1248
1281
|
}
|
|
1249
|
-
}),
|
|
1282
|
+
}), se, Ve = class extends ze {
|
|
1250
1283
|
constructor(t, n) {
|
|
1251
|
-
super(t), this.manager = t, this.options = n,
|
|
1284
|
+
super(t), this.manager = t, this.options = n, S(this, se, /* @__PURE__ */ new Set()), this.listeners = new Sn(), this.latest = {
|
|
1252
1285
|
event: void 0,
|
|
1253
1286
|
coordinates: void 0
|
|
1254
1287
|
}, this.handleMove = () => {
|
|
@@ -1257,41 +1290,41 @@ var dt = Object.freeze({
|
|
|
1257
1290
|
}, this.handleCancel = this.handleCancel.bind(this), this.handlePointerUp = this.handlePointerUp.bind(this), this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
1258
1291
|
}
|
|
1259
1292
|
activationConstraints(t, n, r = this.options) {
|
|
1260
|
-
const { activationConstraints: i =
|
|
1293
|
+
const { activationConstraints: i = bt.activationConstraints } = r ?? {};
|
|
1261
1294
|
return typeof i == "function" ? i(t, n) : i;
|
|
1262
1295
|
}
|
|
1263
1296
|
bind(t, n = this.options) {
|
|
1264
|
-
return
|
|
1297
|
+
return fe(() => {
|
|
1265
1298
|
var i;
|
|
1266
|
-
const s = new AbortController(), { signal:
|
|
1267
|
-
|
|
1299
|
+
const s = new AbortController(), { signal: a } = s, o = (c) => {
|
|
1300
|
+
Xr(c) && this.handlePointerDown(c, t, n);
|
|
1268
1301
|
};
|
|
1269
|
-
let
|
|
1270
|
-
n?.activatorElements && (Array.isArray(n.activatorElements) ?
|
|
1271
|
-
for (const
|
|
1272
|
-
|
|
1302
|
+
let d = [(i = t.handle) != null ? i : t.element];
|
|
1303
|
+
n?.activatorElements && (Array.isArray(n.activatorElements) ? d = n.activatorElements : d = n.activatorElements(t));
|
|
1304
|
+
for (const c of d)
|
|
1305
|
+
c && (Ki(c.ownerDocument.defaultView), c.addEventListener("pointerdown", o, { signal: a }));
|
|
1273
1306
|
return () => s.abort();
|
|
1274
1307
|
});
|
|
1275
1308
|
}
|
|
1276
1309
|
handlePointerDown(t, n, r) {
|
|
1277
|
-
if (this.disabled || !t.isPrimary || t.button !== 0 || !le(t.target) || n.disabled ||
|
|
1310
|
+
if (this.disabled || !t.isPrimary || t.button !== 0 || !le(t.target) || n.disabled || ji(t) || !this.manager.dragOperation.status.idle)
|
|
1278
1311
|
return;
|
|
1279
|
-
const { preventActivation: i =
|
|
1312
|
+
const { preventActivation: i = bt.preventActivation } = r ?? {};
|
|
1280
1313
|
if (i?.(t, n))
|
|
1281
1314
|
return;
|
|
1282
|
-
const { target: s } = t,
|
|
1315
|
+
const { target: s } = t, a = En(s) && s.draggable && s.getAttribute("draggable") === "true", o = Xe(n.element), { x: d, y: c } = ce(t);
|
|
1283
1316
|
this.initialCoordinates = {
|
|
1284
|
-
x:
|
|
1285
|
-
y:
|
|
1317
|
+
x: d * o.scaleX + o.x,
|
|
1318
|
+
y: c * o.scaleY + o.y
|
|
1286
1319
|
};
|
|
1287
|
-
const
|
|
1320
|
+
const u = this.activationConstraints(t, n, r);
|
|
1288
1321
|
t.sensor = this;
|
|
1289
|
-
const
|
|
1290
|
-
|
|
1322
|
+
const l = new kr(
|
|
1323
|
+
u,
|
|
1291
1324
|
(w) => this.handleStart(n, w)
|
|
1292
1325
|
);
|
|
1293
|
-
|
|
1294
|
-
const h =
|
|
1326
|
+
l.signal.onabort = () => this.handleCancel(t), l.onEvent(t), this.controller = l;
|
|
1327
|
+
const h = Pr(), v = this.listeners.bind(h, [
|
|
1295
1328
|
{
|
|
1296
1329
|
type: "pointermove",
|
|
1297
1330
|
listener: (w) => this.handlePointerMove(w, n)
|
|
@@ -1310,15 +1343,15 @@ var dt = Object.freeze({
|
|
|
1310
1343
|
{
|
|
1311
1344
|
// Cancel activation if there is a competing Drag and Drop interaction
|
|
1312
1345
|
type: "dragstart",
|
|
1313
|
-
listener:
|
|
1346
|
+
listener: a ? this.handleCancel : We,
|
|
1314
1347
|
options: {
|
|
1315
1348
|
capture: !0
|
|
1316
1349
|
}
|
|
1317
1350
|
}
|
|
1318
|
-
]),
|
|
1319
|
-
|
|
1351
|
+
]), g = () => {
|
|
1352
|
+
v(), this.initialCoordinates = void 0;
|
|
1320
1353
|
};
|
|
1321
|
-
|
|
1354
|
+
_(this, se).add(g);
|
|
1322
1355
|
}
|
|
1323
1356
|
handlePointerMove(t, n) {
|
|
1324
1357
|
var r, i;
|
|
@@ -1327,8 +1360,8 @@ var dt = Object.freeze({
|
|
|
1327
1360
|
return;
|
|
1328
1361
|
}
|
|
1329
1362
|
if (this.manager.dragOperation.status.dragging) {
|
|
1330
|
-
const s = ce(t),
|
|
1331
|
-
s.x = s.x *
|
|
1363
|
+
const s = ce(t), a = Xe(n.element);
|
|
1364
|
+
s.x = s.x * a.scaleX + a.x, s.y = s.y * a.scaleY + a.y, t.preventDefault(), t.stopPropagation(), this.latest.event = t, this.latest.coordinates = s, je.schedule(this.handleMove);
|
|
1332
1365
|
}
|
|
1333
1366
|
}
|
|
1334
1367
|
handlePointerUp(t) {
|
|
@@ -1353,13 +1386,18 @@ var dt = Object.freeze({
|
|
|
1353
1386
|
source: t
|
|
1354
1387
|
}).signal.aborted) return this.cleanup();
|
|
1355
1388
|
n.preventDefault();
|
|
1356
|
-
const
|
|
1357
|
-
|
|
1358
|
-
|
|
1389
|
+
const o = Et(n.target).body;
|
|
1390
|
+
try {
|
|
1391
|
+
o.setPointerCapture(n.pointerId);
|
|
1392
|
+
} catch {
|
|
1393
|
+
this.handleCancel(n);
|
|
1394
|
+
return;
|
|
1395
|
+
}
|
|
1396
|
+
const d = le(n.target) ? [n.target, o] : o, c = this.listeners.bind(d, [
|
|
1359
1397
|
{
|
|
1360
1398
|
// Prevent scrolling on touch devices
|
|
1361
1399
|
type: "touchmove",
|
|
1362
|
-
listener:
|
|
1400
|
+
listener: We,
|
|
1363
1401
|
options: {
|
|
1364
1402
|
passive: !1
|
|
1365
1403
|
}
|
|
@@ -1367,149 +1405,149 @@ var dt = Object.freeze({
|
|
|
1367
1405
|
{
|
|
1368
1406
|
// Prevent click events
|
|
1369
1407
|
type: "click",
|
|
1370
|
-
listener:
|
|
1408
|
+
listener: We
|
|
1371
1409
|
},
|
|
1372
1410
|
{
|
|
1373
1411
|
type: "contextmenu",
|
|
1374
|
-
listener:
|
|
1412
|
+
listener: We
|
|
1375
1413
|
},
|
|
1376
1414
|
{
|
|
1377
1415
|
type: "keydown",
|
|
1378
1416
|
listener: this.handleKeyDown
|
|
1379
1417
|
}
|
|
1380
1418
|
]);
|
|
1381
|
-
|
|
1419
|
+
_(this, se).add(c);
|
|
1382
1420
|
}
|
|
1383
1421
|
handleCancel(t) {
|
|
1384
1422
|
const { dragOperation: n } = this.manager;
|
|
1385
1423
|
n.status.initialized && this.manager.actions.stop({ event: t, canceled: !0 }), this.cleanup();
|
|
1386
1424
|
}
|
|
1387
1425
|
cleanup() {
|
|
1388
|
-
|
|
1426
|
+
const { controller: t } = this;
|
|
1427
|
+
this.controller = void 0, t && !t.signal.aborted && t.abort(), this.latest = {
|
|
1389
1428
|
event: void 0,
|
|
1390
1429
|
coordinates: void 0
|
|
1391
|
-
},
|
|
1430
|
+
}, _(this, se).forEach((n) => n()), _(this, se).clear();
|
|
1392
1431
|
}
|
|
1393
1432
|
destroy() {
|
|
1394
1433
|
this.cleanup(), this.listeners.clear();
|
|
1395
1434
|
}
|
|
1396
1435
|
};
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
var
|
|
1401
|
-
function
|
|
1436
|
+
se = /* @__PURE__ */ new WeakMap();
|
|
1437
|
+
Ve.configure = Ce(Ve);
|
|
1438
|
+
Ve.defaults = bt;
|
|
1439
|
+
var Ni = Ve;
|
|
1440
|
+
function ji(e) {
|
|
1402
1441
|
return "sensor" in e;
|
|
1403
1442
|
}
|
|
1404
|
-
function
|
|
1443
|
+
function We(e) {
|
|
1405
1444
|
e.preventDefault();
|
|
1406
1445
|
}
|
|
1407
|
-
function
|
|
1446
|
+
function Xi() {
|
|
1408
1447
|
}
|
|
1409
|
-
var
|
|
1410
|
-
function
|
|
1411
|
-
!e ||
|
|
1448
|
+
var _n = /* @__PURE__ */ new WeakSet();
|
|
1449
|
+
function Ki(e) {
|
|
1450
|
+
!e || _n.has(e) || (e.addEventListener("touchmove", Xi, {
|
|
1412
1451
|
capture: !1,
|
|
1413
1452
|
passive: !1
|
|
1414
|
-
}),
|
|
1453
|
+
}), _n.add(e));
|
|
1415
1454
|
}
|
|
1416
|
-
var
|
|
1455
|
+
var at = {
|
|
1417
1456
|
modifiers: [],
|
|
1418
|
-
plugins: [
|
|
1419
|
-
sensors: [
|
|
1420
|
-
},
|
|
1457
|
+
plugins: [ui, Zn, fi, Di, Li],
|
|
1458
|
+
sensors: [Ni, Wi]
|
|
1459
|
+
}, ts = class extends xr {
|
|
1421
1460
|
constructor(e = {}) {
|
|
1422
|
-
const t =
|
|
1423
|
-
|
|
1424
|
-
|
|
1461
|
+
const t = it(e.plugins, at.plugins), n = it(e.sensors, at.sensors), r = it(
|
|
1462
|
+
e.modifiers,
|
|
1463
|
+
at.modifiers
|
|
1464
|
+
);
|
|
1465
|
+
super(Dt(ke({}, e), {
|
|
1466
|
+
plugins: [Mi, qe, He, ...t],
|
|
1425
1467
|
sensors: n,
|
|
1426
1468
|
modifiers: r
|
|
1427
1469
|
}));
|
|
1428
1470
|
}
|
|
1429
|
-
},
|
|
1471
|
+
}, er, tr, _t, Y, Mt, Rt, Lt = class extends (_t = Or, tr = [j], er = [j], _t) {
|
|
1430
1472
|
constructor(e, t) {
|
|
1431
1473
|
var n = e, {
|
|
1432
1474
|
element: r,
|
|
1433
1475
|
effects: i = () => [],
|
|
1434
|
-
handle: s
|
|
1435
|
-
|
|
1436
|
-
} = n, a = wn(n, [
|
|
1476
|
+
handle: s
|
|
1477
|
+
} = n, a = Mn(n, [
|
|
1437
1478
|
"element",
|
|
1438
1479
|
"effects",
|
|
1439
|
-
"handle"
|
|
1440
|
-
"feedback"
|
|
1480
|
+
"handle"
|
|
1441
1481
|
]);
|
|
1442
1482
|
super(
|
|
1443
|
-
|
|
1483
|
+
ke({
|
|
1444
1484
|
effects: () => [
|
|
1445
1485
|
...i(),
|
|
1446
1486
|
() => {
|
|
1447
|
-
var
|
|
1448
|
-
const { manager:
|
|
1449
|
-
if (!
|
|
1450
|
-
const
|
|
1451
|
-
...
|
|
1452
|
-
]).map((
|
|
1453
|
-
const
|
|
1454
|
-
return
|
|
1487
|
+
var o, d;
|
|
1488
|
+
const { manager: c } = this;
|
|
1489
|
+
if (!c) return;
|
|
1490
|
+
const l = ((d = (o = this.sensors) == null ? void 0 : o.map(Ar)) != null ? d : [
|
|
1491
|
+
...c.sensors
|
|
1492
|
+
]).map((h) => {
|
|
1493
|
+
const v = h instanceof ze ? h : c.registry.register(h.plugin), g = h instanceof ze ? void 0 : h.options;
|
|
1494
|
+
return v.bind(this, g);
|
|
1455
1495
|
});
|
|
1456
1496
|
return function() {
|
|
1457
|
-
|
|
1497
|
+
l.forEach((v) => v());
|
|
1458
1498
|
};
|
|
1459
1499
|
}
|
|
1460
1500
|
]
|
|
1461
1501
|
}, a),
|
|
1462
1502
|
t
|
|
1463
|
-
),
|
|
1503
|
+
), S(this, Mt, A(Y, 8, this)), A(Y, 11, this), S(this, Rt, A(Y, 12, this)), A(Y, 15, this), this.element = r, this.handle = s;
|
|
1464
1504
|
}
|
|
1465
1505
|
};
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
Q(I, Ue);
|
|
1474
|
-
var Yn, jn, ht, B, Dt, Ze, Bn, Hn, _e, Ot, Vn = class extends (ht = pr, jn = [F], Yn = [F], ht) {
|
|
1506
|
+
Y = ve(_t);
|
|
1507
|
+
Mt = /* @__PURE__ */ new WeakMap();
|
|
1508
|
+
Rt = /* @__PURE__ */ new WeakMap();
|
|
1509
|
+
R(Y, 4, "handle", tr, Lt, Mt);
|
|
1510
|
+
R(Y, 4, "element", er, Lt, Rt);
|
|
1511
|
+
ee(Y, Lt);
|
|
1512
|
+
var nr, rr, wt, B, Wt, lt, ir, sr, xe, Ft, or = class extends (wt = Dr, rr = [j], nr = [j], wt) {
|
|
1475
1513
|
constructor(e, t) {
|
|
1476
|
-
var n = e, { element: r, effects: i = () => [] } = n, s =
|
|
1477
|
-
const { collisionDetector:
|
|
1478
|
-
const { manager:
|
|
1479
|
-
if (!
|
|
1514
|
+
var n = e, { element: r, effects: i = () => [] } = n, s = Mn(n, ["element", "effects"]);
|
|
1515
|
+
const { collisionDetector: a = qr } = s, o = (c) => {
|
|
1516
|
+
const { manager: u, element: l } = this;
|
|
1517
|
+
if (!l || c === null) {
|
|
1480
1518
|
this.shape = void 0;
|
|
1481
1519
|
return;
|
|
1482
1520
|
}
|
|
1483
|
-
if (!
|
|
1484
|
-
const h = new
|
|
1485
|
-
return h &&
|
|
1486
|
-
},
|
|
1521
|
+
if (!u) return;
|
|
1522
|
+
const h = new V(l), v = W(() => this.shape);
|
|
1523
|
+
return h && v?.equals(h) ? v : (this.shape = h, h);
|
|
1524
|
+
}, d = Pn(!1);
|
|
1487
1525
|
super(
|
|
1488
|
-
|
|
1489
|
-
collisionDetector:
|
|
1526
|
+
Dt(ke({}, s), {
|
|
1527
|
+
collisionDetector: a,
|
|
1490
1528
|
effects: () => [
|
|
1491
1529
|
...i(),
|
|
1492
1530
|
() => {
|
|
1493
|
-
const { element:
|
|
1494
|
-
if (!
|
|
1495
|
-
const { dragOperation:
|
|
1496
|
-
|
|
1531
|
+
const { element: c, manager: u } = this;
|
|
1532
|
+
if (!u) return;
|
|
1533
|
+
const { dragOperation: l } = u, { source: h } = l;
|
|
1534
|
+
d.value = !!(h && l.status.initialized && c && !this.disabled && this.accepts(h));
|
|
1497
1535
|
},
|
|
1498
1536
|
() => {
|
|
1499
|
-
const { element:
|
|
1500
|
-
if (
|
|
1501
|
-
const
|
|
1502
|
-
|
|
1503
|
-
|
|
1537
|
+
const { element: c } = this;
|
|
1538
|
+
if (d.value && c) {
|
|
1539
|
+
const u = new Lr(
|
|
1540
|
+
c,
|
|
1541
|
+
o
|
|
1504
1542
|
);
|
|
1505
1543
|
return () => {
|
|
1506
|
-
|
|
1544
|
+
u.disconnect(), this.shape = void 0;
|
|
1507
1545
|
};
|
|
1508
1546
|
}
|
|
1509
1547
|
},
|
|
1510
1548
|
() => {
|
|
1511
|
-
var
|
|
1512
|
-
if ((
|
|
1549
|
+
var c;
|
|
1550
|
+
if ((c = this.manager) != null && c.dragOperation.status.initialized)
|
|
1513
1551
|
return () => {
|
|
1514
1552
|
this.shape = void 0;
|
|
1515
1553
|
};
|
|
@@ -1517,38 +1555,38 @@ var Yn, jn, ht, B, Dt, Ze, Bn, Hn, _e, Ot, Vn = class extends (ht = pr, jn = [F]
|
|
|
1517
1555
|
]
|
|
1518
1556
|
}),
|
|
1519
1557
|
t
|
|
1520
|
-
),
|
|
1558
|
+
), S(this, xe), S(this, Wt, A(B, 8, this)), A(B, 11, this), S(this, Ft, A(B, 12, this)), A(B, 15, this), this.element = r, this.refreshShape = () => o();
|
|
1521
1559
|
}
|
|
1522
1560
|
set element(e) {
|
|
1523
|
-
|
|
1561
|
+
$(this, xe, e, sr);
|
|
1524
1562
|
}
|
|
1525
1563
|
get element() {
|
|
1526
1564
|
var e;
|
|
1527
|
-
return (e = this.proxy) != null ? e :
|
|
1565
|
+
return (e = this.proxy) != null ? e : _(this, xe, ir);
|
|
1528
1566
|
}
|
|
1529
1567
|
};
|
|
1530
|
-
B =
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1568
|
+
B = ve(wt);
|
|
1569
|
+
Wt = /* @__PURE__ */ new WeakMap();
|
|
1570
|
+
xe = /* @__PURE__ */ new WeakSet();
|
|
1571
|
+
Ft = /* @__PURE__ */ new WeakMap();
|
|
1572
|
+
lt = R(B, 20, "#element", rr, xe, Wt), ir = lt.get, sr = lt.set;
|
|
1573
|
+
R(B, 4, "proxy", nr, or, Ft);
|
|
1574
|
+
ee(B, or);
|
|
1537
1575
|
export {
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1576
|
+
ui as Accessibility,
|
|
1577
|
+
Zn as AutoScroller,
|
|
1578
|
+
fi as Cursor,
|
|
1579
|
+
ts as DragDropManager,
|
|
1580
|
+
Lt as Draggable,
|
|
1581
|
+
or as Droppable,
|
|
1582
|
+
Di as Feedback,
|
|
1583
|
+
Wi as KeyboardSensor,
|
|
1584
|
+
oe as PointerActivationConstraints,
|
|
1585
|
+
Ni as PointerSensor,
|
|
1586
|
+
Li as PreventSelection,
|
|
1587
|
+
Mi as ScrollListener,
|
|
1588
|
+
qe as Scroller,
|
|
1589
|
+
He as StyleInjector,
|
|
1590
|
+
at as defaultPreset,
|
|
1591
|
+
it as resolveCustomizable
|
|
1554
1592
|
};
|