@vue-dnd-kit/core 1.1.8 → 1.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.
@@ -1,49 +1,49 @@
1
- var ue = Object.defineProperty;
2
- var ce = (n, e, t) => e in n ? ue(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var b = (n, e, t) => ce(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { ref as V, computed as C, shallowRef as Y, onMounted as q, onBeforeUnmount as G, defineComponent as oe, createElementBlock as F, createCommentVNode as ve, unref as W, openBlock as N, normalizeStyle as B, Fragment as de, renderList as ge, createBlock as fe, resolveDynamicComponent as me, createVNode as he, render as ee, useId as Ee, markRaw as ye } from "vue";
5
- import { createGlobalState as ie, useMagicKeys as pe, useThrottleFn as xe } from "@vueuse/core";
6
- const p = class p {
1
+ var ve = Object.defineProperty;
2
+ var de = (n, e, t) => e in n ? ve(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var k = (n, e, t) => de(n, typeof e != "symbol" ? e + "" : e, t);
4
+ import { ref as V, computed as T, shallowRef as Y, onMounted as G, onUnmounted as fe, defineComponent as ie, createElementBlock as N, createCommentVNode as ge, unref as y, openBlock as F, normalizeStyle as W, Fragment as me, renderList as he, createBlock as $, Transition as pe, withCtx as Ee, resolveDynamicComponent as ee, createVNode as ye, render as te, useId as xe, markRaw as we, onBeforeUnmount as ue } from "vue";
5
+ import { createGlobalState as ce, useMagicKeys as Me, useThrottleFn as Pe } from "@vueuse/core";
6
+ const x = class x {
7
7
  };
8
- b(p, "remove", (e, t) => {
8
+ k(x, "remove", (e, t) => {
9
9
  if (!e || t === void 0) return;
10
10
  const [r] = e.splice(t, 1);
11
11
  return r;
12
- }), b(p, "insert", (e, t, r) => {
12
+ }), k(x, "insert", (e, t, r) => {
13
13
  !e || t === void 0 || e.splice(t, 0, r);
14
- }), b(p, "move", (e, t, r, l) => {
14
+ }), k(x, "move", (e, t, r, l) => {
15
15
  if (!e || !r || t === void 0 || l === void 0)
16
16
  return;
17
- const o = p.remove(e, t);
18
- p.insert(r, l, o);
19
- }), b(p, "swap", (e, t, r, l) => {
17
+ const o = x.remove(e, t);
18
+ x.insert(r, l, o);
19
+ }), k(x, "swap", (e, t, r, l) => {
20
20
  if (!e || !r || t === void 0 || l === void 0)
21
21
  return;
22
22
  const o = e[t], s = r[l];
23
23
  e[t] = s, r[l] = o;
24
- }), b(p, "copy", (e, t, r, l) => {
24
+ }), k(x, "copy", (e, t, r, l) => {
25
25
  if (!e || t === void 0 || !r || l === void 0)
26
26
  return;
27
27
  const o = e[t];
28
- p.insert(r, l, o);
29
- }), b(p, "applyTransfer", (e) => {
30
- var l, o, s, f, i, c, d;
28
+ x.insert(r, l, o);
29
+ }), k(x, "applyTransfer", (e) => {
30
+ var l, o, s, g, i, c, d;
31
31
  const t = e.hovered.element.value, r = e.hovered.zone.value;
32
32
  if (t) {
33
- const v = (o = (l = e.elementsMap.value.get(t)) == null ? void 0 : l.data) == null ? void 0 : o.source, a = (f = (s = e.elementsMap.value.get(t)) == null ? void 0 : s.data) == null ? void 0 : f.index, u = e.draggingElements.value.values().next().value, g = (i = u == null ? void 0 : u.data) == null ? void 0 : i.index, m = g !== void 0 && a !== void 0 && g > a ? 1 : -1;
33
+ const v = (o = (l = e.elementsMap.value.get(t)) == null ? void 0 : l.data) == null ? void 0 : o.source, a = (g = (s = e.elementsMap.value.get(t)) == null ? void 0 : s.data) == null ? void 0 : g.index, u = e.draggingElements.value.values().next().value, f = (i = u == null ? void 0 : u.data) == null ? void 0 : i.index, m = f !== void 0 && a !== void 0 && f > a ? 1 : -1;
34
34
  Array.from(
35
35
  e.draggingElements.value.values()
36
36
  ).sort(
37
- (y, P) => {
38
- var x, I;
39
- return m * ((((x = y.data) == null ? void 0 : x.index) || 0) - (((I = P.data) == null ? void 0 : I.index) || 0));
37
+ (E, L) => {
38
+ var w, I;
39
+ return m * ((((w = E.data) == null ? void 0 : w.index) || 0) - (((I = L.data) == null ? void 0 : I.index) || 0));
40
40
  }
41
41
  ).forEach(
42
- (y) => {
43
- var P, x;
44
- return p.move(
45
- (P = y.data) == null ? void 0 : P.source,
46
- (x = y.data) == null ? void 0 : x.index,
42
+ (E) => {
43
+ var L, w;
44
+ return x.move(
45
+ (L = E.data) == null ? void 0 : L.source,
46
+ (w = E.data) == null ? void 0 : w.index,
47
47
  v,
48
48
  a
49
49
  );
@@ -53,36 +53,36 @@ b(p, "remove", (e, t) => {
53
53
  const v = (d = (c = e.zonesMap.value.get(r)) == null ? void 0 : c.data) == null ? void 0 : d.source, a = v == null ? void 0 : v.length;
54
54
  Array.from(
55
55
  e.draggingElements.value.values()
56
- ).sort((g, m) => {
57
- var E, y;
58
- return (((E = m.data) == null ? void 0 : E.index) || 0) - (((y = g.data) == null ? void 0 : y.index) || 0);
56
+ ).sort((f, m) => {
57
+ var p, E;
58
+ return (((p = m.data) == null ? void 0 : p.index) || 0) - (((E = f.data) == null ? void 0 : E.index) || 0);
59
59
  }).forEach(
60
- (g) => {
61
- var m, E;
62
- return p.move(
63
- (m = g.data) == null ? void 0 : m.source,
64
- (E = g.data) == null ? void 0 : E.index,
60
+ (f) => {
61
+ var m, p;
62
+ return x.move(
63
+ (m = f.data) == null ? void 0 : m.source,
64
+ (p = f.data) == null ? void 0 : p.index,
65
65
  v,
66
66
  a
67
67
  );
68
68
  }
69
69
  );
70
70
  }
71
- }), b(p, "applyCopy", (e) => {
72
- var l, o, s, f, i, c;
71
+ }), k(x, "applyCopy", (e) => {
72
+ var l, o, s, g, i, c;
73
73
  const t = e.hovered.element.value, r = e.hovered.zone.value;
74
74
  if (t) {
75
- const d = (o = (l = e.elementsMap.value.get(t)) == null ? void 0 : l.data) == null ? void 0 : o.source, v = (f = (s = e.elementsMap.value.get(t)) == null ? void 0 : s.data) == null ? void 0 : f.index;
75
+ const d = (o = (l = e.elementsMap.value.get(t)) == null ? void 0 : l.data) == null ? void 0 : o.source, v = (g = (s = e.elementsMap.value.get(t)) == null ? void 0 : s.data) == null ? void 0 : g.index;
76
76
  Array.from(
77
77
  e.draggingElements.value.values()
78
- ).sort((u, g) => {
79
- var m, E;
80
- return (((m = g.data) == null ? void 0 : m.index) || 0) - (((E = u.data) == null ? void 0 : E.index) || 0);
78
+ ).sort((u, f) => {
79
+ var m, p;
80
+ return (((m = f.data) == null ? void 0 : m.index) || 0) - (((p = u.data) == null ? void 0 : p.index) || 0);
81
81
  }).forEach(
82
82
  (u) => {
83
- var g, m;
84
- return p.copy(
85
- (g = u.data) == null ? void 0 : g.source,
83
+ var f, m;
84
+ return x.copy(
85
+ (f = u.data) == null ? void 0 : f.source,
86
86
  (m = u.data) == null ? void 0 : m.index,
87
87
  d,
88
88
  v
@@ -93,14 +93,14 @@ b(p, "remove", (e, t) => {
93
93
  const d = (c = (i = e.zonesMap.value.get(r)) == null ? void 0 : i.data) == null ? void 0 : c.source, v = d == null ? void 0 : d.length;
94
94
  Array.from(
95
95
  e.draggingElements.value.values()
96
- ).sort((u, g) => {
97
- var m, E;
98
- return (((m = g.data) == null ? void 0 : m.index) || 0) - (((E = u.data) == null ? void 0 : E.index) || 0);
96
+ ).sort((u, f) => {
97
+ var m, p;
98
+ return (((m = f.data) == null ? void 0 : m.index) || 0) - (((p = u.data) == null ? void 0 : p.index) || 0);
99
99
  }).forEach(
100
100
  (u) => {
101
- var g, m;
102
- return p.copy(
103
- (g = u.data) == null ? void 0 : g.source,
101
+ var f, m;
102
+ return x.copy(
103
+ (f = u.data) == null ? void 0 : f.source,
104
104
  (m = u.data) == null ? void 0 : m.index,
105
105
  d,
106
106
  v
@@ -108,37 +108,37 @@ b(p, "remove", (e, t) => {
108
108
  }
109
109
  );
110
110
  }
111
- }), b(p, "applySwap", (e) => {
112
- var l, o, s, f, i, c, d, v;
111
+ }), k(x, "applySwap", (e) => {
112
+ var l, o, s, g, i, c, d, v;
113
113
  const t = e.hovered.element.value, r = e.hovered.zone.value;
114
114
  if (t && e.draggingElements.value.size === 1) {
115
115
  const a = e.draggingElements.value.values().next().value;
116
- p.swap(
116
+ x.swap(
117
117
  (l = a == null ? void 0 : a.data) == null ? void 0 : l.source,
118
118
  (o = a == null ? void 0 : a.data) == null ? void 0 : o.index,
119
- (f = (s = e.elementsMap.value.get(t)) == null ? void 0 : s.data) == null ? void 0 : f.source,
119
+ (g = (s = e.elementsMap.value.get(t)) == null ? void 0 : s.data) == null ? void 0 : g.source,
120
120
  (c = (i = e.elementsMap.value.get(t)) == null ? void 0 : i.data) == null ? void 0 : c.index
121
121
  );
122
122
  } else if (r) {
123
123
  const a = (v = (d = e.zonesMap.value.get(r)) == null ? void 0 : d.data) == null ? void 0 : v.source, u = a == null ? void 0 : a.length;
124
124
  Array.from(
125
125
  e.draggingElements.value.values()
126
- ).sort((m, E) => {
127
- var y, P;
128
- return (((y = E.data) == null ? void 0 : y.index) || 0) - (((P = m.data) == null ? void 0 : P.index) || 0);
126
+ ).sort((m, p) => {
127
+ var E, L;
128
+ return (((E = p.data) == null ? void 0 : E.index) || 0) - (((L = m.data) == null ? void 0 : L.index) || 0);
129
129
  }).forEach(
130
130
  (m) => {
131
- var E, y;
132
- return p.move(
133
- (E = m.data) == null ? void 0 : E.source,
134
- (y = m.data) == null ? void 0 : y.index,
131
+ var p, E;
132
+ return x.move(
133
+ (p = m.data) == null ? void 0 : p.source,
134
+ (E = m.data) == null ? void 0 : E.index,
135
135
  a,
136
136
  u
137
137
  );
138
138
  }
139
139
  );
140
140
  }
141
- }), b(p, "applyRemove", (e) => {
141
+ }), k(x, "applyRemove", (e) => {
142
142
  Array.from(
143
143
  e.draggingElements.value.values()
144
144
  ).sort((r, l) => {
@@ -146,33 +146,34 @@ b(p, "remove", (e, t) => {
146
146
  return (((o = l.data) == null ? void 0 : o.index) || 0) - (((s = r.data) == null ? void 0 : s.index) || 0);
147
147
  }).forEach((r) => {
148
148
  var l, o;
149
- (l = r.data) != null && l.source && ((o = r.data) == null ? void 0 : o.index) !== void 0 && p.remove(r.data.source, r.data.index);
149
+ (l = r.data) != null && l.source && ((o = r.data) == null ? void 0 : o.index) !== void 0 && x.remove(r.data.source, r.data.index);
150
150
  });
151
- }), b(p, "applyInsert", (e, t) => {
152
- var o, s, f, i, c, d;
151
+ }), k(x, "applyInsert", (e, t) => {
152
+ var o, s, g, i, c, d;
153
153
  const r = e.hovered.element.value, l = e.hovered.zone.value;
154
154
  if (r && t.length > 0) {
155
- const v = (s = (o = e.elementsMap.value.get(r)) == null ? void 0 : o.data) == null ? void 0 : s.source, a = (i = (f = e.elementsMap.value.get(r)) == null ? void 0 : f.data) == null ? void 0 : i.index;
155
+ const v = (s = (o = e.elementsMap.value.get(r)) == null ? void 0 : o.data) == null ? void 0 : s.source, a = (i = (g = e.elementsMap.value.get(r)) == null ? void 0 : g.data) == null ? void 0 : i.index;
156
156
  t.forEach((u) => {
157
- p.insert(v, a, u);
157
+ x.insert(v, a, u);
158
158
  });
159
159
  } else if (l) {
160
160
  const v = (d = (c = e.zonesMap.value.get(l)) == null ? void 0 : c.data) == null ? void 0 : d.source, a = v == null ? void 0 : v.length;
161
161
  t.forEach((u) => {
162
- p.insert(v, a, u);
162
+ x.insert(v, a, u);
163
163
  });
164
164
  }
165
165
  });
166
- let te = p;
167
- const K = ie(() => {
166
+ let ne = x;
167
+ const K = ce(() => {
168
168
  const n = V(
169
169
  /* @__PURE__ */ new Map()
170
- ), e = C(() => n.value.size > 0), t = {
170
+ ), e = T(() => n.value.size > 0), t = {
171
171
  component: V(null),
172
- ref: Y(null)
173
- }, r = V(/* @__PURE__ */ new Map()), l = V(/* @__PURE__ */ new Set()), o = V(/* @__PURE__ */ new Map()), s = V(/* @__PURE__ */ new Set()), f = V(/* @__PURE__ */ new Set()), i = new IntersectionObserver((Z) => {
172
+ ref: Y(null),
173
+ options: Y(null)
174
+ }, r = V(/* @__PURE__ */ new Map()), l = V(/* @__PURE__ */ new Set()), o = V(/* @__PURE__ */ new Map()), s = V(/* @__PURE__ */ new Set()), g = V(/* @__PURE__ */ new Set()), i = new IntersectionObserver((Z) => {
174
175
  Z.forEach(
175
- (h) => f.value[h.isIntersecting ? "add" : "delete"](
176
+ (h) => g.value[h.isIntersecting ? "add" : "delete"](
176
177
  h.target
177
178
  )
178
179
  );
@@ -181,7 +182,7 @@ const K = ie(() => {
181
182
  (h) => s.value[h.isIntersecting ? "add" : "delete"](h.target)
182
183
  );
183
184
  }), d = (Z, h) => {
184
- Z === "add" ? i.observe(h) : (i.unobserve(h), f.value.delete(h));
185
+ Z === "add" ? i.observe(h) : (i.unobserve(h), g.value.delete(h));
185
186
  }, v = (Z, h) => {
186
187
  Z === "add" ? c.observe(h) : (c.unobserve(h), s.value.delete(h));
187
188
  }, a = {
@@ -191,7 +192,7 @@ const K = ie(() => {
191
192
  percent: Y(null),
192
193
  pixel: Y(null)
193
194
  }
194
- }, { w: u, s: g, a: m, d: E, ctrl: y, shift: P, alt: x, meta: I } = pe(), H = {
195
+ }, { w: u, s: f, a: m, d: p, ctrl: E, shift: L, alt: w, meta: I } = Me(), B = {
195
196
  zone: Y(null),
196
197
  element: Y(null)
197
198
  };
@@ -203,41 +204,41 @@ const K = ie(() => {
203
204
  selectedElements: l,
204
205
  zonesMap: o,
205
206
  visibleZones: s,
206
- visibleElements: f,
207
+ visibleElements: g,
207
208
  pointerPosition: a,
208
209
  keyboard: {
209
210
  w: u,
210
- s: g,
211
+ s: f,
211
212
  a: m,
212
- d: E,
213
- ctrl: y,
214
- shift: P,
215
- alt: x,
213
+ d: p,
214
+ ctrl: E,
215
+ shift: L,
216
+ alt: w,
216
217
  meta: I
217
218
  },
218
- hovered: H,
219
+ hovered: B,
219
220
  handleDragElementIntersection: d,
220
221
  handleDropZoneIntersection: v
221
222
  };
222
- }), we = () => {
223
- const n = V(null), { draggingElements: e, pointerPosition: t, isDragging: r, activeContainer: l } = K();
224
- return q(() => {
225
- l.ref = n;
226
- }), G(() => {
227
- l.ref.value = null;
223
+ }), Le = (n) => {
224
+ const e = V(null), { draggingElements: t, pointerPosition: r, isDragging: l, activeContainer: o } = K();
225
+ return G(() => {
226
+ o.ref = e, o.options.value = n ?? null;
227
+ }), fe(() => {
228
+ o.ref.value = null, o.options.value = null;
228
229
  }), {
229
- elementRef: n,
230
- draggingElements: e,
231
- pointerPosition: t,
232
- isDragging: r
230
+ elementRef: e,
231
+ draggingElements: t,
232
+ pointerPosition: r,
233
+ isDragging: l
233
234
  };
234
- }, Me = ["innerHTML"], Pe = /* @__PURE__ */ oe({
235
+ }, Ae = ["innerHTML"], _e = /* @__PURE__ */ ie({
235
236
  __name: "DefaultOverlay",
236
237
  setup(n) {
237
- const { elementRef: e, pointerPosition: t, isDragging: r, draggingElements: l } = we(), o = C(() => {
238
- var s, f, i, c;
238
+ const { elementRef: e, pointerPosition: t, isDragging: r, draggingElements: l } = Le(), o = T(() => {
239
+ var s, g, i, c;
239
240
  return {
240
- transform: `translate3d(${(((s = t.current.value) == null ? void 0 : s.x) ?? 0) - (((f = t.offset.pixel.value) == null ? void 0 : f.x) ?? 0)}px, ${(((i = t.current.value) == null ? void 0 : i.y) ?? 0) - (((c = t.offset.pixel.value) == null ? void 0 : c.y) ?? 0)}px, 0)`,
241
+ transform: `translate3d(${(((s = t.current.value) == null ? void 0 : s.x) ?? 0) - (((g = t.offset.pixel.value) == null ? void 0 : g.x) ?? 0)}px, ${(((i = t.current.value) == null ? void 0 : i.y) ?? 0) - (((c = t.offset.pixel.value) == null ? void 0 : c.y) ?? 0)}px, 0)`,
241
242
  zIndex: 1e3,
242
243
  position: "fixed",
243
244
  top: 0,
@@ -245,46 +246,75 @@ const K = ie(() => {
245
246
  transition: "0.3s cubic-bezier(0.165, 0.84, 0.44, 1)"
246
247
  };
247
248
  });
248
- return (s, f) => W(r) ? (N(), F("div", {
249
+ return (s, g) => y(r) ? (F(), N("div", {
249
250
  key: 0,
250
251
  ref_key: "elementRef",
251
252
  ref: e,
252
- style: B(o.value)
253
+ style: W(o.value)
253
254
  }, [
254
- (N(!0), F(de, null, ge(W(l), ([i, c]) => {
255
+ (F(!0), N(me, null, he(y(l), ([i, c]) => {
255
256
  var d, v;
256
- return N(), F("div", {
257
+ return F(), N("div", {
257
258
  key: c.id,
258
259
  innerHTML: c.initialHTML,
259
- style: B({
260
+ style: W({
260
261
  width: `${(d = c.initialRect) == null ? void 0 : d.width}px`,
261
262
  height: `${(v = c.initialRect) == null ? void 0 : v.height}px`
262
263
  })
263
- }, null, 12, Me);
264
+ }, null, 12, Ae);
264
265
  }), 128))
265
- ], 4)) : ve("", !0);
266
+ ], 4)) : ge("", !0);
266
267
  }
267
- }), ne = /* @__PURE__ */ oe({
268
+ }), re = /* @__PURE__ */ ie({
268
269
  __name: "DragOverlay",
269
270
  setup(n) {
270
- const { activeContainer: e } = K(), t = C(
271
- () => e.component.value ?? Pe
272
- );
273
- return (r, l) => (N(), fe(me(t.value)));
271
+ const { activeContainer: e } = K(), t = T(() => e.component.value ?? _e);
272
+ return (r, l) => y(e).options.value ? (F(), $(pe, {
273
+ key: 0,
274
+ name: y(e).options.value.name,
275
+ duration: y(e).options.value.duration,
276
+ "enter-from-class": y(e).options.value.enterFromClass,
277
+ "enter-to-class": y(e).options.value.enterToClass,
278
+ "enter-active-class": y(e).options.value.enterActiveClass,
279
+ "leave-from-class": y(e).options.value.leaveFromClass,
280
+ "leave-to-class": y(e).options.value.leaveToClass,
281
+ "leave-active-class": y(e).options.value.leaveActiveClass,
282
+ mode: y(e).options.value.mode,
283
+ type: y(e).options.value.type,
284
+ css: y(e).options.value.css,
285
+ appear: y(e).options.value.appear,
286
+ "appear-active-class": y(e).options.value.appearActiveClass,
287
+ "appear-from-class": y(e).options.value.appearFromClass,
288
+ "appear-to-class": y(e).options.value.appearToClass,
289
+ persisted: y(e).options.value.persisted,
290
+ onEnter: y(e).options.value.onEnter,
291
+ onLeave: y(e).options.value.onLeave,
292
+ onBeforeEnter: y(e).options.value.onBeforeEnter,
293
+ onBeforeLeave: y(e).options.value.onBeforeLeave,
294
+ onBeforeAppear: y(e).options.value.onBeforeAppear,
295
+ onAfterEnter: y(e).options.value.onAfterEnter,
296
+ onAfterLeave: y(e).options.value.onAfterLeave,
297
+ onAfterAppear: y(e).options.value.onAfterAppear
298
+ }, {
299
+ default: Ee(() => [
300
+ (F(), $(ee(t.value)))
301
+ ]),
302
+ _: 1
303
+ }, 8, ["name", "duration", "enter-from-class", "enter-to-class", "enter-active-class", "leave-from-class", "leave-to-class", "leave-active-class", "mode", "type", "css", "appear", "appear-active-class", "appear-from-class", "appear-to-class", "persisted", "onEnter", "onLeave", "onBeforeEnter", "onBeforeLeave", "onBeforeAppear", "onAfterEnter", "onAfterLeave", "onAfterAppear"])) : (F(), $(ee(t.value), { key: 1 }));
274
304
  }
275
- }), Ze = {
305
+ }), Ve = {
276
306
  install(n) {
277
- n.component("DragOverlay", ne);
307
+ n.component("DragOverlay", re);
278
308
  const e = n.mount;
279
309
  n.mount = function(r) {
280
310
  const l = e.call(this, r), o = typeof r == "string" ? document.querySelector(r) : r;
281
311
  if (o && o instanceof Element && !o.querySelector("#vue-dnd-kit-overlay")) {
282
312
  const s = document.createElement("div");
283
313
  s.id = "vue-dnd-kit-overlay", s.style.pointerEvents = "none", o.appendChild(s);
284
- const f = he(ne);
285
- ee(f, s), n.__VUE_DND_KIT_OVERLAY__ = {
314
+ const g = ye(re);
315
+ te(g, s), n.__VUE_DND_KIT_OVERLAY__ = {
286
316
  container: s,
287
- vnode: f
317
+ vnode: g
288
318
  };
289
319
  const i = K();
290
320
  n.__VUE_DND_KIT_STORE__ = i;
@@ -293,10 +323,10 @@ const K = ie(() => {
293
323
  };
294
324
  const t = n.unmount;
295
325
  n.unmount = function() {
296
- return n.__VUE_DND_KIT_OVERLAY__ && (ee(null, n.__VUE_DND_KIT_OVERLAY__.container), delete n.__VUE_DND_KIT_OVERLAY__), t.call(this);
326
+ return n.__VUE_DND_KIT_OVERLAY__ && (te(null, n.__VUE_DND_KIT_OVERLAY__.container), delete n.__VUE_DND_KIT_OVERLAY__), t.call(this);
297
327
  };
298
328
  }
299
- }, re = (n, e) => n.x < e.x + e.width && n.x + n.width > e.x && n.y < e.y + e.height && n.y + n.height > e.y, U = (n) => {
329
+ }, ae = (n, e) => n.x < e.x + e.width && n.x + n.width > e.x && n.y < e.y + e.height && n.y + n.height > e.y, H = (n) => {
300
330
  if (!n)
301
331
  return {
302
332
  x: 0,
@@ -319,11 +349,11 @@ const K = ie(() => {
319
349
  width: e.width,
320
350
  height: e.height
321
351
  };
322
- }, $ = (n) => ({
352
+ }, q = (n) => ({
323
353
  x: n.x + n.width / 2,
324
354
  y: n.y + n.height / 2
325
- }), Le = (n, e) => {
326
- const t = U(n);
355
+ }), Se = (n, e) => {
356
+ const t = H(n);
327
357
  return {
328
358
  pixel: {
329
359
  x: e.x - t.x,
@@ -334,10 +364,10 @@ const K = ie(() => {
334
364
  y: (e.y - t.y) / t.height * 100
335
365
  }
336
366
  };
337
- }, ae = (n, e) => {
367
+ }, le = (n, e) => {
338
368
  const t = e.x - n.x, r = e.y - n.y;
339
369
  return Math.sqrt(t * t + r * r);
340
- }, le = (n, e) => {
370
+ }, oe = (n, e) => {
341
371
  const t = Math.max(
342
372
  0,
343
373
  Math.min(n.x + n.width, e.x + e.width) - Math.max(n.x, e.x)
@@ -348,23 +378,23 @@ const K = ie(() => {
348
378
  return (l / o * 100 + l / s * 100) / 2;
349
379
  }, se = "data-vue-dnd-kit-draggable", z = (n) => {
350
380
  n.preventDefault();
351
- }, Se = (n) => {
381
+ }, Ie = (n) => {
352
382
  const {
353
383
  elementsMap: e,
354
384
  draggingElements: t,
355
385
  hovered: r,
356
- selectedElementsMap: l,
386
+ selectedElements: l,
357
387
  isDragging: o,
358
388
  visibleElements: s,
359
- handleDragElementIntersection: f
360
- } = K(), i = V(null), c = C(
389
+ handleDragElementIntersection: g
390
+ } = K(), i = V(null), c = T(
361
391
  () => s.value.has(i.value) && r.element.value === i.value
362
- ), d = Y((n == null ? void 0 : n.id) || Ee()), v = C(() => !i.value || !s.value.has(i.value) ? !1 : t.value.has(i.value)), a = C(() => {
392
+ ), d = Y((n == null ? void 0 : n.id) || xe()), v = T(() => !i.value || !s.value.has(i.value) ? !1 : t.value.has(i.value)), a = T(() => {
363
393
  if (!i.value || !o.value || !s.value.has(i.value)) return !1;
364
394
  const m = e.value.get(i.value);
365
395
  return m != null && m.groups.length ? !Array.from(t.value.entries()).some(
366
- ([E, y]) => y.groups.length ? !y.groups.some(
367
- (P) => m.groups.includes(P)
396
+ ([p, E]) => E.groups.length ? !E.groups.some(
397
+ (L) => m.groups.includes(L)
368
398
  ) : !1
369
399
  ) : !0;
370
400
  });
@@ -380,7 +410,7 @@ const K = ie(() => {
380
410
  events: (n == null ? void 0 : n.events) ?? {},
381
411
  data: (n == null ? void 0 : n.data) ?? null,
382
412
  id: d.value
383
- }), f("add", i.value), i.value.addEventListener("dragstart", z), i.value.addEventListener("drag", z), i.value.setAttribute(se, "true"), i.value.setAttribute("draggable", "false");
413
+ }), g("add", i.value), i.value.addEventListener("dragstart", z), i.value.addEventListener("drag", z), i.value.setAttribute(se, "true"), i.value.setAttribute("draggable", "false");
384
414
  },
385
415
  unregisterElement: () => {
386
416
  i.value && (e.value.delete(i.value), l.value.delete(i.value), i.value.removeEventListener("dragstart", z), i.value.removeEventListener("drag", z), i.value.removeAttribute(se), i.value.removeAttribute("draggable"));
@@ -390,24 +420,24 @@ const K = ie(() => {
390
420
  isAllowed: a,
391
421
  id: d
392
422
  };
393
- }, k = (n, e) => n ? e.contains(n) : !1, _e = (n) => {
423
+ }, b = (n, e) => n ? e.contains(n) : !1, ze = (n) => {
394
424
  var d, v;
395
- const e = U(n.activeContainer.ref.value), t = $(e), r = ((d = n.pointerPosition.current.value) == null ? void 0 : d.x) ?? 0, l = ((v = n.pointerPosition.current.value) == null ? void 0 : v.y) ?? 0, s = !(e && r >= e.x && r <= e.x + e.width && l >= e.y && l <= e.y + e.height), f = Array.from(n.draggingElements.value.keys()), i = Array.from(n.visibleElements.value.entries()).filter(([a, u]) => {
425
+ const e = H(n.activeContainer.ref.value), t = q(e), r = ((d = n.pointerPosition.current.value) == null ? void 0 : d.x) ?? 0, l = ((v = n.pointerPosition.current.value) == null ? void 0 : v.y) ?? 0, s = !(e && r >= e.x && r <= e.x + e.width && l >= e.y && l <= e.y + e.height), g = Array.from(n.draggingElements.value.keys()), i = Array.from(n.visibleElements.value.entries()).filter(([a, u]) => {
396
426
  if (!a) return !1;
397
- const g = U(a);
398
- return g && e && re(g, e);
427
+ const f = H(a);
428
+ return f && e && ae(f, e);
399
429
  }).map(([a, u]) => {
400
- const g = U(a), m = $(g), E = r >= g.x && r <= g.x + g.width && l >= g.y && l <= g.y + g.height, y = le(g, e), P = ae(t, m);
401
- let x = 0;
402
- for (const [I, H] of n.visibleElements.value.entries())
403
- I !== a && I && a && k(a, I) && x++;
430
+ const f = H(a), m = q(f), p = r >= f.x && r <= f.x + f.width && l >= f.y && l <= f.y + f.height, E = oe(f, e), L = le(t, m);
431
+ let w = 0;
432
+ for (const [I, B] of n.visibleElements.value.entries())
433
+ I !== a && I && a && b(a, I) && w++;
404
434
  return {
405
435
  element: u,
406
436
  node: a,
407
- isPointerInElement: E,
408
- overlapPercent: y,
409
- depth: x,
410
- centerDistance: P
437
+ isPointerInElement: p,
438
+ overlapPercent: E,
439
+ depth: w,
440
+ centerDistance: L
411
441
  };
412
442
  }).sort((a, u) => {
413
443
  if (!s) {
@@ -418,24 +448,24 @@ const K = ie(() => {
418
448
  }
419
449
  return Math.abs(a.overlapPercent - u.overlapPercent) <= 1 ? a.centerDistance - u.centerDistance : u.overlapPercent - a.overlapPercent;
420
450
  }), c = Array.from(n.visibleZones.value.entries()).filter(([a, u]) => {
421
- if (!a || f.some(
422
- (m) => m && k(a, m)
451
+ if (!a || g.some(
452
+ (m) => m && b(a, m)
423
453
  ))
424
454
  return !1;
425
- const g = U(a);
426
- return g && e && re(g, e);
455
+ const f = H(a);
456
+ return f && e && ae(f, e);
427
457
  }).map(([a, u]) => {
428
- const g = U(a), m = $(g), E = r >= g.x && r <= g.x + g.width && l >= g.y && l <= g.y + g.height, y = le(g, e), P = ae(t, m);
429
- let x = 0;
430
- for (const [I, H] of n.visibleZones.value.entries())
431
- I !== a && I && a && k(a, I) && x++;
458
+ const f = H(a), m = q(f), p = r >= f.x && r <= f.x + f.width && l >= f.y && l <= f.y + f.height, E = oe(f, e), L = le(t, m);
459
+ let w = 0;
460
+ for (const [I, B] of n.visibleZones.value.entries())
461
+ I !== a && I && a && b(a, I) && w++;
432
462
  return {
433
463
  zone: u,
434
464
  node: a,
435
- isPointerInElement: E,
436
- overlapPercent: y,
437
- depth: x,
438
- centerDistance: P
465
+ isPointerInElement: p,
466
+ overlapPercent: E,
467
+ depth: w,
468
+ centerDistance: L
439
469
  };
440
470
  }).sort((a, u) => {
441
471
  if (!s) {
@@ -450,13 +480,13 @@ const K = ie(() => {
450
480
  ...i.map((a) => a.node),
451
481
  ...c.map((a) => a.node)
452
482
  ];
453
- }, Ie = (n, e) => {
483
+ }, Ce = (n, e) => {
454
484
  const { pointerPosition: t, keyboard: r } = K(), l = (e == null ? void 0 : e.moveStep) || 10;
455
485
  return {
456
486
  onKeyboardStart: (i) => {
457
487
  var a;
458
488
  z(i);
459
- const c = U(n.value);
489
+ const c = H(n.value);
460
490
  (a = n.value) == null || a.blur();
461
491
  const d = c.x + c.width / 2, v = c.y + c.height / 2;
462
492
  t.start.value = {
@@ -486,7 +516,7 @@ const K = ie(() => {
486
516
  t.current.value = null, t.start.value = null, t.offset.pixel.value = null, t.offset.percent.value = null;
487
517
  }
488
518
  };
489
- }, ze = (n) => {
519
+ }, De = (n) => {
490
520
  const e = K();
491
521
  return {
492
522
  onPointerStart: (o) => {
@@ -494,11 +524,11 @@ const K = ie(() => {
494
524
  x: o.clientX,
495
525
  y: o.clientY
496
526
  };
497
- const { pixel: s, percent: f } = Le(n.value, {
527
+ const { pixel: s, percent: g } = Se(n.value, {
498
528
  x: o.clientX,
499
529
  y: o.clientY
500
530
  });
501
- e.pointerPosition.offset.pixel.value = s, e.pointerPosition.offset.percent.value = f;
531
+ e.pointerPosition.offset.pixel.value = s, e.pointerPosition.offset.percent.value = g;
502
532
  },
503
533
  onPointerMove: (o) => {
504
534
  e.pointerPosition.current.value = {
@@ -510,113 +540,113 @@ const K = ie(() => {
510
540
  e.pointerPosition.current.value = null, e.pointerPosition.start.value = null, e.pointerPosition.offset.pixel.value = null, e.pointerPosition.offset.percent.value = null;
511
541
  }
512
542
  };
513
- }, De = (n, e) => {
514
- var H, Z;
515
- const t = K(), { onPointerStart: r, onPointerMove: l, onPointerEnd: o } = ze(n), { onKeyboardStart: s, onKeyboardMove: f, onKeyboardEnd: i } = Ie(
543
+ }, ke = (n, e) => {
544
+ var B, Z;
545
+ const t = K(), { onPointerStart: r, onPointerMove: l, onPointerEnd: o } = De(n), { onKeyboardStart: s, onKeyboardMove: g, onKeyboardEnd: i } = Ce(
516
546
  n,
517
547
  e == null ? void 0 : e.keyboard
518
548
  );
519
549
  let c = null;
520
550
  const d = (h) => {
521
- var A, L;
551
+ var D, A;
522
552
  if (!h) return /* @__PURE__ */ new Map();
523
- const S = t.selectedElements.value.has(h);
524
- if (t.selectedElements.value.size > 0 && S) {
525
- const _ = /* @__PURE__ */ new Map();
526
- return t.selectedElements.value.forEach((D) => {
553
+ const _ = t.selectedElements.value.has(h);
554
+ if (t.selectedElements.value.size > 0 && _) {
555
+ const S = /* @__PURE__ */ new Map();
556
+ return t.selectedElements.value.forEach((C) => {
527
557
  var O, R;
528
- const T = t.elementsMap.value.get(D);
529
- T && _.set(D, {
530
- ...T,
531
- initialHTML: ((O = T.node) == null ? void 0 : O.outerHTML) ?? "",
532
- initialRect: (R = T.node) == null ? void 0 : R.getBoundingClientRect()
558
+ const U = t.elementsMap.value.get(C);
559
+ U && S.set(C, {
560
+ ...U,
561
+ initialHTML: ((O = U.node) == null ? void 0 : O.outerHTML) ?? "",
562
+ initialRect: (R = U.node) == null ? void 0 : R.getBoundingClientRect()
533
563
  });
534
- }), _;
564
+ }), S;
535
565
  }
536
566
  t.selectedElements.value.clear();
537
- const M = t.elementsMap.value.get(h);
538
- if (!M) return /* @__PURE__ */ new Map();
539
- const w = /* @__PURE__ */ new Map();
540
- return w.set(h, {
541
- ...M,
542
- initialHTML: ((A = M.node) == null ? void 0 : A.outerHTML) ?? "",
543
- initialRect: (L = M.node) == null ? void 0 : L.getBoundingClientRect()
544
- }), w;
567
+ const P = t.elementsMap.value.get(h);
568
+ if (!P) return /* @__PURE__ */ new Map();
569
+ const M = /* @__PURE__ */ new Map();
570
+ return M.set(h, {
571
+ ...P,
572
+ initialHTML: ((D = P.node) == null ? void 0 : D.outerHTML) ?? "",
573
+ initialRect: (A = P.node) == null ? void 0 : A.getBoundingClientRect()
574
+ }), M;
545
575
  }, v = (h) => {
546
576
  if (!h)
547
577
  return { element: null, zone: null };
548
- const S = Array.isArray(h) ? h : [h], M = Array.from(t.draggingElements.value.keys()), w = S.find((L) => {
549
- if (!t.visibleZones.value.has(L)) return !1;
550
- const _ = t.zonesMap.value.get(L);
551
- return !(!_ || M.some(
552
- (D) => D && (D === _.node || k(_.node, D))
553
- ) || _.groups.length && !!Array.from(
578
+ const _ = Array.isArray(h) ? h : [h], P = Array.from(t.draggingElements.value.keys()), M = _.find((A) => {
579
+ if (!t.visibleZones.value.has(A)) return !1;
580
+ const S = t.zonesMap.value.get(A);
581
+ return !(!S || P.some(
582
+ (C) => C && (C === S.node || b(S.node, C))
583
+ ) || S.groups.length && !!Array.from(
554
584
  t.draggingElements.value.values()
555
- ).some((T) => T.groups.length ? !T.groups.some((O) => _.groups.includes(O)) : !1));
585
+ ).some((U) => U.groups.length ? !U.groups.some((O) => S.groups.includes(O)) : !1));
556
586
  });
557
- return w ? {
558
- element: S.find(
559
- (L) => t.visibleElements.value.has(L) && t.elementsMap.value.has(L) && !M.some(
560
- (_) => _ && (_ === L || k(
561
- L,
562
- _
563
- ) || k(_, L))
564
- ) && (L === w || k(
565
- L,
566
- w
587
+ return M ? {
588
+ element: _.find(
589
+ (A) => t.visibleElements.value.has(A) && t.elementsMap.value.has(A) && !P.some(
590
+ (S) => S && (S === A || b(
591
+ A,
592
+ S
593
+ ) || b(S, A))
594
+ ) && (A === M || b(
595
+ A,
596
+ M
567
597
  ))
568
598
  ) || null,
569
- zone: w
599
+ zone: M
570
600
  } : { element: null, zone: null };
571
- }, a = ((H = e == null ? void 0 : e.sensor) == null ? void 0 : H.setup) || _e, u = (h) => {
572
- var w, A, L, _, D, T, O, R, j, J, X, Q;
573
- const S = t.hovered.element.value, M = t.hovered.zone.value;
574
- t.hovered.element.value = h.element, t.hovered.zone.value = h.zone, S && t.hovered.element.value !== S && ((L = (A = (w = t.elementsMap.value.get(S)) == null ? void 0 : w.events) == null ? void 0 : A.onLeave) == null || L.call(A, t), t.hovered.element.value && ((T = (D = (_ = t.elementsMap.value.get(t.hovered.element.value)) == null ? void 0 : _.events) == null ? void 0 : D.onHover) == null || T.call(D, t))), M && t.hovered.zone.value !== M && ((j = (R = (O = t.zonesMap.value.get(M)) == null ? void 0 : O.events) == null ? void 0 : R.onLeave) == null || j.call(R, t), t.hovered.zone.value && ((Q = (X = (J = t.zonesMap.value.get(t.hovered.zone.value)) == null ? void 0 : J.events) == null ? void 0 : X.onHover) == null || Q.call(X, t)));
575
- }, g = xe(() => {
576
- const h = a(t), S = v(h);
577
- u(S);
601
+ }, a = ((B = e == null ? void 0 : e.sensor) == null ? void 0 : B.setup) || ze, u = (h) => {
602
+ var M, D, A, S, C, U, O, R, j, J, X, Q;
603
+ const _ = t.hovered.element.value, P = t.hovered.zone.value;
604
+ t.hovered.element.value = h.element, t.hovered.zone.value = h.zone, _ && t.hovered.element.value !== _ && ((A = (D = (M = t.elementsMap.value.get(_)) == null ? void 0 : M.events) == null ? void 0 : D.onLeave) == null || A.call(D, t), t.hovered.element.value && ((U = (C = (S = t.elementsMap.value.get(t.hovered.element.value)) == null ? void 0 : S.events) == null ? void 0 : C.onHover) == null || U.call(C, t))), P && t.hovered.zone.value !== P && ((j = (R = (O = t.zonesMap.value.get(P)) == null ? void 0 : O.events) == null ? void 0 : R.onLeave) == null || j.call(R, t), t.hovered.zone.value && ((Q = (X = (J = t.zonesMap.value.get(t.hovered.zone.value)) == null ? void 0 : J.events) == null ? void 0 : X.onHover) == null || Q.call(X, t)));
605
+ }, f = Pe(() => {
606
+ const h = a(t), _ = v(h);
607
+ u(_);
578
608
  }, ((Z = e == null ? void 0 : e.sensor) == null ? void 0 : Z.throttle) ?? 0), m = () => {
579
- g(), c = requestAnimationFrame(m);
580
- }, E = () => m(), y = () => {
609
+ f(), c = requestAnimationFrame(m);
610
+ }, p = () => m(), E = () => {
581
611
  c !== null && (cancelAnimationFrame(c), c = null);
582
612
  };
583
613
  return {
584
614
  activate: (h) => {
585
615
  t.draggingElements.value = d(n.value), t.draggingElements.value.forEach(
586
- (S) => {
587
- var M, w;
588
- return (w = (M = S.events).onStart) == null ? void 0 : w.call(M, t);
616
+ (_) => {
617
+ var P, M;
618
+ return (M = (P = _.events).onStart) == null ? void 0 : M.call(P, t);
589
619
  }
590
- ), h instanceof PointerEvent ? r(h) : s(h), E();
620
+ ), h instanceof PointerEvent ? r(h) : s(h), p();
591
621
  },
592
622
  track: (h) => {
593
623
  t.draggingElements.value.forEach(
594
- (S) => {
595
- var M, w;
596
- return (w = (M = S.events).onMove) == null ? void 0 : w.call(M, t);
624
+ (_) => {
625
+ var P, M;
626
+ return (M = (P = _.events).onMove) == null ? void 0 : M.call(P, t);
597
627
  }
598
- ), h instanceof KeyboardEvent ? f() : l(h);
628
+ ), h instanceof KeyboardEvent ? g() : l(h);
599
629
  },
600
630
  deactivate: (h = !0) => {
601
- var S, M;
631
+ var _, P;
602
632
  if (o(), i(), h) {
603
633
  if (t.hovered.zone.value) {
604
- const w = t.zonesMap.value.get(t.hovered.zone.value);
605
- (M = w == null ? void 0 : (S = w.events).onDrop) == null || M.call(S, t);
634
+ const M = t.zonesMap.value.get(t.hovered.zone.value);
635
+ (P = M == null ? void 0 : (_ = M.events).onDrop) == null || P.call(_, t);
606
636
  } else
607
637
  t.draggingElements.value.forEach(
608
- (w) => {
609
- var A, L;
610
- return (L = (A = w.events).onEnd) == null ? void 0 : L.call(A, t);
638
+ (M) => {
639
+ var D, A;
640
+ return (A = (D = M.events).onEnd) == null ? void 0 : A.call(D, t);
611
641
  }
612
642
  );
613
643
  t.selectedElements.value.clear();
614
644
  }
615
- t.draggingElements.value.clear(), t.hovered.zone.value = null, t.hovered.element.value = null, y();
645
+ t.draggingElements.value.clear(), t.hovered.zone.value = null, t.hovered.element.value = null, E();
616
646
  }
617
647
  };
618
- }, Ae = ie(() => {
619
- let n = "", e = "", t = "", r = null, l = null, o = null, s = null, f = null;
648
+ }, be = ce(() => {
649
+ let n = "", e = "", t = "", r = null, l = null, o = null, s = null, g = null;
620
650
  const { activeContainer: i } = K(), c = () => {
621
651
  const u = document.body;
622
652
  n = u.style.userSelect, u.style.userSelect = "none", window.addEventListener("contextmenu", z), window.addEventListener("selectstart", z), window.addEventListener("touchstart", z), window.addEventListener("touchmove", z);
@@ -624,22 +654,22 @@ const K = ie(() => {
624
654
  const u = document.body;
625
655
  u.style.userSelect = n, u.style.touchAction = e, u.style.overscrollBehavior = t, window.removeEventListener("contextmenu", z), window.removeEventListener("selectstart", z), window.removeEventListener("touchstart", z), window.removeEventListener("touchmove", z);
626
656
  }, v = () => {
627
- r && (document.removeEventListener("pointermove", r), r = null), l && (document.removeEventListener("pointerup", l), l = null), o && (o = null), s && (document.removeEventListener("wheel", s), s = null), f && (document.removeEventListener("keydown", f), document.removeEventListener("keypress", f), document.removeEventListener("keyup", f), f = null);
657
+ r && (document.removeEventListener("pointermove", r), r = null), l && (document.removeEventListener("pointerup", l), l = null), o && (o = null), s && (document.removeEventListener("wheel", s), s = null), g && (document.removeEventListener("keydown", g), document.removeEventListener("keypress", g), document.removeEventListener("keyup", g), g = null);
628
658
  };
629
659
  return {
630
- handleDragStart: (u, g, m) => {
631
- v(), u.target.blur(), m != null && m.container && (i.component.value = ye(m.container));
632
- const { activate: E, track: y, deactivate: P } = De(g, m);
660
+ handleDragStart: (u, f, m) => {
661
+ v(), u.target.blur(), m != null && m.container && (i.component.value = we(m.container));
662
+ const { activate: p, track: E, deactivate: L } = ke(f, m);
633
663
  l = () => {
634
- i.component.value = null, d(), P(!0), v();
664
+ i.component.value = null, d(), L(!0), v();
635
665
  }, o = () => {
636
- i.component.value = null, d(), P(!1), v();
637
- }, r = (x) => y(x), s = (x) => y(x), f = (x) => {
638
- x.type === "keyup" && (x.code === "Escape" && (o == null || o()), x.code === "Enter" && (l == null || l())), y(x);
639
- }, c(), E(u), document.addEventListener("pointermove", r), document.addEventListener("pointerup", l), document.addEventListener("wheel", s), document.addEventListener("keydown", f), document.addEventListener("keypress", f), document.addEventListener("keyup", f);
666
+ i.component.value = null, d(), L(!1), v();
667
+ }, r = (w) => E(w), s = (w) => E(w), g = (w) => {
668
+ w.type === "keyup" && (w.code === "Escape" && (o == null || o()), w.code === "Enter" && (l == null || l())), E(w);
669
+ }, c(), p(u), document.addEventListener("pointermove", r), document.addEventListener("pointerup", l), document.addEventListener("wheel", s), document.addEventListener("keydown", g), document.addEventListener("keypress", g), document.addEventListener("keyup", g);
640
670
  }
641
671
  };
642
- }), Te = (n) => {
672
+ }), Ye = (n) => {
643
673
  const {
644
674
  id: e,
645
675
  elementRef: t,
@@ -647,9 +677,9 @@ const K = ie(() => {
647
677
  isOvered: l,
648
678
  isAllowed: o,
649
679
  registerElement: s,
650
- unregisterElement: f
651
- } = Se(n), { pointerPosition: i } = K(), { handleDragStart: c } = Ae(), d = (v) => c(v, t, n);
652
- return q(s), G(f), {
680
+ unregisterElement: g
681
+ } = Ie(n), { pointerPosition: i } = K(), { handleDragStart: c } = be(), d = (v) => c(v, t, n);
682
+ return G(s), ue(g), {
653
683
  pointerPosition: i,
654
684
  elementRef: t,
655
685
  isDragging: r,
@@ -658,14 +688,14 @@ const K = ie(() => {
658
688
  handleDragStart: d,
659
689
  id: e
660
690
  };
661
- }, be = (n) => {
691
+ }, Te = (n) => {
662
692
  const {
663
693
  zonesMap: e,
664
694
  hovered: t,
665
695
  draggingElements: r,
666
696
  isDragging: l,
667
697
  handleDropZoneIntersection: o
668
- } = K(), s = V(null), f = C(() => t.zone.value === s.value), i = C(() => {
698
+ } = K(), s = V(null), g = T(() => t.zone.value === s.value), i = T(() => {
669
699
  if (!s.value || !l.value) return !1;
670
700
  const v = e.value.get(s.value);
671
701
  return v != null && v.groups.length ? !Array.from(r.value.values()).some((a) => a.groups.length ? !a.groups.some(
@@ -682,56 +712,56 @@ const K = ie(() => {
682
712
  }), s.value.setAttribute("data-dnd-droppable", "true");
683
713
  }, unregisterZone: () => {
684
714
  s.value && (o("remove", s.value), e.value.delete(s.value));
685
- }, isOvered: f, isAllowed: i };
686
- }, Ve = (n) => {
687
- const { elementRef: e, registerZone: t, unregisterZone: r, isOvered: l, isAllowed: o } = be(n);
688
- return q(t), G(r), { elementRef: e, isOvered: l, isAllowed: o };
689
- }, Ye = (n) => {
690
- const { selectedElements: e, elementsMap: t } = K(), r = C(
715
+ }, isOvered: g, isAllowed: i };
716
+ }, Oe = (n) => {
717
+ const { elementRef: e, registerZone: t, unregisterZone: r, isOvered: l, isAllowed: o } = Te(n);
718
+ return G(t), ue(r), { elementRef: e, isOvered: l, isAllowed: o };
719
+ }, Re = (n) => {
720
+ const { selectedElements: e, elementsMap: t } = K(), r = T(
691
721
  () => n.value ? e.value.has(n.value) : !1
692
- ), l = C(() => {
722
+ ), l = T(() => {
693
723
  if (!n.value) return !1;
694
724
  for (const c of e.value)
695
- if (c && k(c, n.value))
725
+ if (c && b(c, n.value))
696
726
  return !0;
697
727
  return !1;
698
- }), o = C(() => {
728
+ }), o = T(() => {
699
729
  if (!n.value) return !1;
700
730
  for (const c of e.value)
701
- if (c && k(n.value, c))
731
+ if (c && b(n.value, c))
702
732
  return !0;
703
733
  return !1;
704
734
  }), s = () => {
705
735
  n.value && e.value.delete(n.value);
706
- }, f = () => {
736
+ }, g = () => {
707
737
  if (!(!n.value || !t.value.get(n.value))) {
708
738
  if (l.value)
709
739
  for (const d of e.value)
710
- d && k(d, n.value) && e.value.delete(d);
740
+ d && b(d, n.value) && e.value.delete(d);
711
741
  if (o.value)
712
742
  for (const d of e.value)
713
- d && k(n.value, d) && e.value.delete(d);
743
+ d && b(n.value, d) && e.value.delete(d);
714
744
  e.value.add(n.value);
715
745
  }
716
746
  };
717
747
  return {
718
748
  handleUnselect: s,
719
- handleSelect: f,
749
+ handleSelect: g,
720
750
  handleToggleSelect: () => {
721
- n.value && (e.value.has(n.value) ? s() : f());
751
+ n.value && (e.value.has(n.value) ? s() : g());
722
752
  },
723
753
  isSelected: r,
724
754
  isParentOfSelected: l
725
755
  };
726
756
  };
727
757
  export {
728
- te as DnDOperations,
729
- Ze as default,
730
- U as getBoundingBox,
758
+ ne as DnDOperations,
759
+ Ve as default,
760
+ H as getBoundingBox,
731
761
  K as useDnDStore,
732
- we as useDragContainer,
733
- Te as useDraggable,
734
- Ve as useDroppable,
735
- Ye as useSelection
762
+ Le as useDragContainer,
763
+ Ye as useDraggable,
764
+ Oe as useDroppable,
765
+ Re as useSelection
736
766
  };
737
767
  //# sourceMappingURL=vue-dnd-kit-core.es.js.map