@pantograph/sortable 2.2.2 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +5 -1
- package/dist/index.js +582 -563
- package/package.json +5 -1
package/dist/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var q = (i, e, t) =>
|
|
4
|
-
const
|
|
5
|
-
function
|
|
1
|
+
var $t = Object.defineProperty;
|
|
2
|
+
var jt = (i, e, t) => e in i ? $t(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
|
+
var q = (i, e, t) => jt(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
const Mt = "2.2.3";
|
|
5
|
+
function ie(i) {
|
|
6
6
|
if (typeof window < "u" && window.navigator)
|
|
7
7
|
return !!/* @__PURE__ */ navigator.userAgent.match(i);
|
|
8
8
|
}
|
|
9
|
-
const
|
|
9
|
+
const ne = ie(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Xe = ie(/Edge/i), bt = ie(/firefox/i), Pe = ie(/safari/i) && !ie(/chrome/i) && !ie(/android/i), pt = ie(/iP(ad|od|hone)/i), It = ie(/chrome/i) && ie(/android/i), Ot = {
|
|
10
10
|
capture: !1,
|
|
11
11
|
passive: !1
|
|
12
12
|
};
|
|
13
|
-
function
|
|
14
|
-
i.addEventListener(e, t, !
|
|
13
|
+
function y(i, e, t) {
|
|
14
|
+
i.addEventListener(e, t, !ne && Ot);
|
|
15
15
|
}
|
|
16
16
|
function v(i, e, t) {
|
|
17
|
-
i.removeEventListener(e, t, !
|
|
17
|
+
i.removeEventListener(e, t, !ne && Ot);
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function je(i, e) {
|
|
20
20
|
if (e) {
|
|
21
21
|
if (e[0] === ">" && (e = e.substring(1)), i)
|
|
22
22
|
try {
|
|
@@ -32,28 +32,28 @@ function $e(i, e) {
|
|
|
32
32
|
return !1;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function At(i) {
|
|
36
36
|
return i.host && i !== document && i.host.nodeType && i.host !== i ? i.host : i.parentNode;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function B(i, e, t, n, o) {
|
|
39
39
|
if (i) {
|
|
40
40
|
t = t || document;
|
|
41
41
|
do {
|
|
42
|
-
if (!(o != null && o.some((r) => r === i)) && (e != null && (e[0] === ">" ? i.parentNode === t &&
|
|
42
|
+
if (!(o != null && o.some((r) => r === i)) && (e != null && (e[0] === ">" ? i.parentNode === t && je(i, e) : je(i, e)) || n && i === t))
|
|
43
43
|
return i;
|
|
44
44
|
if (i === t) break;
|
|
45
|
-
} while (i =
|
|
45
|
+
} while (i = At(i));
|
|
46
46
|
}
|
|
47
47
|
return null;
|
|
48
48
|
}
|
|
49
|
-
const
|
|
50
|
-
function
|
|
49
|
+
const wt = /\s+/g;
|
|
50
|
+
function O(i, e, t) {
|
|
51
51
|
if (i && e)
|
|
52
52
|
if (i.classList)
|
|
53
53
|
i.classList[t ? "add" : "remove"](e);
|
|
54
54
|
else {
|
|
55
|
-
let n = (" " + i.className + " ").replace(
|
|
56
|
-
i.className = (n + (t ? " " + e : "")).replace(
|
|
55
|
+
let n = (" " + i.className + " ").replace(wt, " ").replace(" " + e + " ", " ");
|
|
56
|
+
i.className = (n + (t ? " " + e : "")).replace(wt, " ");
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
function p(i, e, t) {
|
|
@@ -64,7 +64,7 @@ function p(i, e, t) {
|
|
|
64
64
|
!(e in n) && e.indexOf("webkit") === -1 && (e = "-webkit-" + e), n[e] = t + (typeof t == "string" ? "" : "px");
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function ye(i, e) {
|
|
68
68
|
let t = "";
|
|
69
69
|
if (typeof i == "string")
|
|
70
70
|
t = i;
|
|
@@ -76,7 +76,7 @@ function Se(i, e) {
|
|
|
76
76
|
const n = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
77
77
|
return n && new n(t);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function st(i, e, t) {
|
|
80
80
|
if (i) {
|
|
81
81
|
let n = i.getElementsByTagName(e), o = 0, r = n.length;
|
|
82
82
|
if (t)
|
|
@@ -86,80 +86,80 @@ function lt(i, e, t) {
|
|
|
86
86
|
}
|
|
87
87
|
return [];
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function Q() {
|
|
90
90
|
let i = document.scrollingElement;
|
|
91
91
|
return i || document.documentElement;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function E(i, e, t, n, o) {
|
|
94
94
|
if (!i.getBoundingClientRect && i !== window) return;
|
|
95
|
-
let r, l,
|
|
96
|
-
if (i !== window && i.parentNode && i !==
|
|
95
|
+
let r, l, s, c, f, d, h;
|
|
96
|
+
if (i !== window && i.parentNode && i !== Q() ? (r = i.getBoundingClientRect(), l = r.top, s = r.left, c = r.bottom, f = r.right, d = r.height, h = r.width) : (l = 0, s = 0, c = window.innerHeight, f = window.innerWidth, d = window.innerHeight, h = window.innerWidth), (e || t) && i !== window && (o = o || i.parentNode, !ne))
|
|
97
97
|
do
|
|
98
98
|
if (o && o.getBoundingClientRect && (p(o, "transform") !== "none" || t && p(o, "position") !== "static")) {
|
|
99
99
|
let m = o.getBoundingClientRect();
|
|
100
|
-
l -= m.top + parseInt(p(o, "border-top-width")),
|
|
100
|
+
l -= m.top + parseInt(p(o, "border-top-width")), s -= m.left + parseInt(p(o, "border-left-width")), c = l + r.height, f = s + r.width;
|
|
101
101
|
break;
|
|
102
102
|
}
|
|
103
103
|
while (o = o.parentNode);
|
|
104
104
|
if (n && i !== window) {
|
|
105
|
-
let m =
|
|
106
|
-
m && (l /= u,
|
|
105
|
+
let m = ye(o || i), w = m && m.a, u = m && m.d;
|
|
106
|
+
m && (l /= u, s /= w, h /= w, d /= u, c = l + d, f = s + h);
|
|
107
107
|
}
|
|
108
108
|
return {
|
|
109
109
|
top: l,
|
|
110
|
-
left:
|
|
111
|
-
bottom:
|
|
110
|
+
left: s,
|
|
111
|
+
bottom: c,
|
|
112
112
|
right: f,
|
|
113
113
|
width: h,
|
|
114
114
|
height: d
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
117
|
function vt(i, e, t) {
|
|
118
|
-
let n =
|
|
118
|
+
let n = ce(i, !0), o = E(i)[e];
|
|
119
119
|
for (; n; ) {
|
|
120
|
-
let r =
|
|
120
|
+
let r = E(n)[t], l;
|
|
121
121
|
if (l = o >= r, !l) return n;
|
|
122
|
-
if (n ===
|
|
123
|
-
n =
|
|
122
|
+
if (n === Q()) break;
|
|
123
|
+
n = ce(n, !1);
|
|
124
124
|
}
|
|
125
125
|
return !1;
|
|
126
126
|
}
|
|
127
|
-
function
|
|
128
|
-
let r = 0, l = 0,
|
|
129
|
-
for (; l <
|
|
130
|
-
if (!(o != null && o.some((
|
|
127
|
+
function me(i, e, t, n, o) {
|
|
128
|
+
let r = 0, l = 0, s = i.children;
|
|
129
|
+
for (; l < s.length; ) {
|
|
130
|
+
if (!(o != null && o.some((c) => c === s[l])) && s[l].style.display !== "none" && s[l] !== x.ghost && (n || s[l] !== x.dragged) && B(s[l], t.draggable, i, !1, o)) {
|
|
131
131
|
if (r === e)
|
|
132
|
-
return
|
|
132
|
+
return s[l];
|
|
133
133
|
r++;
|
|
134
134
|
}
|
|
135
135
|
l++;
|
|
136
136
|
}
|
|
137
137
|
return null;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function gt(i, e) {
|
|
140
140
|
let t = i.lastElementChild;
|
|
141
|
-
for (; t && (t === x.ghost || p(t, "display") === "none" || e &&
|
|
141
|
+
for (; t && (t === x.ghost || p(t, "display") === "none" || e && !je(t, e)); )
|
|
142
142
|
t = t.previousElementSibling;
|
|
143
143
|
return t || null;
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function F(i, e, t) {
|
|
146
146
|
let n = 0;
|
|
147
147
|
if (!i || !i.parentNode)
|
|
148
148
|
return -1;
|
|
149
149
|
for (; i = i.previousElementSibling; )
|
|
150
|
-
i.nodeName.toUpperCase() !== "TEMPLATE" && i !== x.clone && (!e ||
|
|
150
|
+
i.nodeName.toUpperCase() !== "TEMPLATE" && i !== x.clone && (!e || je(i, e)) && !(t != null && t.some((o) => o === i)) && n++;
|
|
151
151
|
return n;
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
let e = 0, t = 0, n =
|
|
153
|
+
function yt(i) {
|
|
154
|
+
let e = 0, t = 0, n = Q();
|
|
155
155
|
if (i)
|
|
156
156
|
do {
|
|
157
|
-
let o =
|
|
157
|
+
let o = ye(i), r = o.a, l = o.d;
|
|
158
158
|
e += i.scrollLeft * r, t += i.scrollTop * l;
|
|
159
159
|
} while (i !== n && (i = i.parentNode));
|
|
160
160
|
return [e, t];
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function Vt(i, e) {
|
|
163
163
|
for (let t in i)
|
|
164
164
|
if (i.hasOwnProperty(t)) {
|
|
165
165
|
for (let n in e)
|
|
@@ -167,61 +167,61 @@ function $t(i, e) {
|
|
|
167
167
|
}
|
|
168
168
|
return -1;
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
if (!i || !i.getBoundingClientRect) return
|
|
170
|
+
function ce(i, e) {
|
|
171
|
+
if (!i || !i.getBoundingClientRect) return Q();
|
|
172
172
|
let t = i, n = !1;
|
|
173
173
|
do
|
|
174
174
|
if (t.clientWidth < t.scrollWidth || t.clientHeight < t.scrollHeight) {
|
|
175
175
|
let o = p(t);
|
|
176
176
|
if (t.clientWidth < t.scrollWidth && (o.overflowX == "auto" || o.overflowX == "scroll") || t.clientHeight < t.scrollHeight && (o.overflowY == "auto" || o.overflowY == "scroll")) {
|
|
177
|
-
if (!t.getBoundingClientRect || t === document.body) return
|
|
177
|
+
if (!t.getBoundingClientRect || t === document.body) return Q();
|
|
178
178
|
if (n || e) return t;
|
|
179
179
|
n = !0;
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
while (t = t.parentNode);
|
|
183
|
-
return
|
|
183
|
+
return Q();
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function Nt(i, e) {
|
|
186
186
|
if (i && e)
|
|
187
187
|
for (let t in e)
|
|
188
188
|
e.hasOwnProperty(t) && (i[t] = e[t]);
|
|
189
189
|
return i;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function Ke(i, e) {
|
|
192
192
|
return Math.round(i.top) === Math.round(e.top) && Math.round(i.left) === Math.round(e.left) && Math.round(i.height) === Math.round(e.height) && Math.round(i.width) === Math.round(e.width);
|
|
193
193
|
}
|
|
194
|
-
let
|
|
195
|
-
function
|
|
194
|
+
let Oe;
|
|
195
|
+
function mt(i, e) {
|
|
196
196
|
return function() {
|
|
197
|
-
if (!
|
|
197
|
+
if (!Oe) {
|
|
198
198
|
let t = arguments, n = this;
|
|
199
|
-
t.length === 1 ? i.call(n, t[0]) : i.apply(n, t),
|
|
200
|
-
|
|
199
|
+
t.length === 1 ? i.call(n, t[0]) : i.apply(n, t), Oe = setTimeout(function() {
|
|
200
|
+
Oe = void 0;
|
|
201
201
|
}, e);
|
|
202
202
|
}
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
function
|
|
206
|
-
clearTimeout(
|
|
205
|
+
function qt() {
|
|
206
|
+
clearTimeout(Oe), Oe = void 0;
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function Xt(i, e, t) {
|
|
209
209
|
i.scrollLeft += e, i.scrollTop += t;
|
|
210
210
|
}
|
|
211
211
|
function at(i) {
|
|
212
212
|
let e = window.Polymer, t = window.jQuery || window.Zepto;
|
|
213
213
|
return e && e.dom ? e.dom(i).cloneNode(!0) : t ? t(i).clone(!0)[0] : i.cloneNode(!0);
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function Lt(i, e, t, n) {
|
|
216
216
|
const o = {};
|
|
217
217
|
return Array.from(i.children).forEach((r) => {
|
|
218
|
-
if (!
|
|
219
|
-
const l =
|
|
218
|
+
if (!B(r, e.draggable, i, !1, n) || r.animated || r === t) return;
|
|
219
|
+
const l = E(r);
|
|
220
220
|
o.left = Math.min(o.left ?? 1 / 0, l.left), o.top = Math.min(o.top ?? 1 / 0, l.top), o.right = Math.max(o.right ?? -1 / 0, l.right), o.bottom = Math.max(o.bottom ?? -1 / 0, l.bottom);
|
|
221
221
|
}), o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
|
|
222
222
|
}
|
|
223
|
-
const
|
|
224
|
-
function
|
|
223
|
+
const L = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
224
|
+
function Ut() {
|
|
225
225
|
let i = [], e;
|
|
226
226
|
return {
|
|
227
227
|
captureAnimationState() {
|
|
@@ -230,11 +230,11 @@ function Vt() {
|
|
|
230
230
|
if (p(n, "display") === "none" || n === x.ghost) return;
|
|
231
231
|
i.push({
|
|
232
232
|
target: n,
|
|
233
|
-
rect:
|
|
233
|
+
rect: E(n)
|
|
234
234
|
});
|
|
235
235
|
let o = { ...i[i.length - 1].rect };
|
|
236
236
|
if (n.thisAnimationDuration) {
|
|
237
|
-
let r =
|
|
237
|
+
let r = ye(n, !0);
|
|
238
238
|
r && (o.top -= r.f, o.left -= r.e);
|
|
239
239
|
}
|
|
240
240
|
n.fromRect = o;
|
|
@@ -244,7 +244,7 @@ function Vt() {
|
|
|
244
244
|
i.push(t);
|
|
245
245
|
},
|
|
246
246
|
removeAnimationState(t) {
|
|
247
|
-
i.splice(
|
|
247
|
+
i.splice(Vt(i, { target: t }), 1);
|
|
248
248
|
},
|
|
249
249
|
animateAll(t) {
|
|
250
250
|
if (!this.options.animation) {
|
|
@@ -253,16 +253,16 @@ function Vt() {
|
|
|
253
253
|
}
|
|
254
254
|
let n = !1, o = 0;
|
|
255
255
|
i.forEach((r) => {
|
|
256
|
-
let l = 0,
|
|
257
|
-
|
|
258
|
-
(m.top - f.top) / (m.left - f.left) === (
|
|
259
|
-
|
|
256
|
+
let l = 0, s = r.target, c = s.fromRect, f = E(s), d = s.prevFromRect, h = s.prevToRect, m = r.rect, w = ye(s, !0);
|
|
257
|
+
w && (f.top -= w.f, f.left -= w.e), s.toRect = f, s.thisAnimationDuration && Ke(d, f) && !Ke(c, f) && // Make sure animatingRect is on line between toRect & fromRect
|
|
258
|
+
(m.top - f.top) / (m.left - f.left) === (c.top - f.top) / (c.left - f.left) && (l = Kt(m, d, h, this.options)), Ke(f, c) || (s.prevFromRect = c, s.prevToRect = f, l || (l = this.options.animation), this.animate(
|
|
259
|
+
s,
|
|
260
260
|
m,
|
|
261
261
|
f,
|
|
262
262
|
l
|
|
263
|
-
)), l && (n = !0, o = Math.max(o, l), clearTimeout(
|
|
264
|
-
|
|
265
|
-
}, l),
|
|
263
|
+
)), l && (n = !0, o = Math.max(o, l), clearTimeout(s.animationResetTimer), s.animationResetTimer = setTimeout(function() {
|
|
264
|
+
s.animationTime = 0, s.prevFromRect = null, s.fromRect = null, s.prevToRect = null, s.thisAnimationDuration = null;
|
|
265
|
+
}, l), s.thisAnimationDuration = l);
|
|
266
266
|
}), clearTimeout(e), n ? e = setTimeout(function() {
|
|
267
267
|
typeof t == "function" && t();
|
|
268
268
|
}, o) : typeof t == "function" && t(), i = [];
|
|
@@ -270,40 +270,40 @@ function Vt() {
|
|
|
270
270
|
animate(t, n, o, r) {
|
|
271
271
|
if (r) {
|
|
272
272
|
p(t, "transition", ""), p(t, "transform", "");
|
|
273
|
-
let l =
|
|
274
|
-
t.animatingX = !!f, t.animatingY = !!d, p(t, "transform", "translate3d(" + f + "px," + d + "px,0)"), this.forRepaintDummy =
|
|
273
|
+
let l = ye(this.el), s = l && l.a, c = l && l.d, f = (n.left - o.left) / (s || 1), d = (n.top - o.top) / (c || 1);
|
|
274
|
+
t.animatingX = !!f, t.animatingY = !!d, p(t, "transform", "translate3d(" + f + "px," + d + "px,0)"), this.forRepaintDummy = Zt(t), p(t, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), p(t, "transform", "translate3d(0,0,0)"), typeof t.animated == "number" && clearTimeout(t.animated), t.animated = setTimeout(function() {
|
|
275
275
|
p(t, "transition", ""), p(t, "transform", ""), t.animated = !1, t.animatingX = !1, t.animatingY = !1;
|
|
276
276
|
}, r);
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
};
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function Zt(i) {
|
|
282
282
|
return i.offsetWidth;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function Kt(i, e, t, n) {
|
|
285
285
|
return Math.sqrt(Math.pow(e.top - i.top, 2) + Math.pow(e.left - i.left, 2)) / Math.sqrt(Math.pow(e.top - t.top, 2) + Math.pow(e.left - t.left, 2)) * n.animation;
|
|
286
286
|
}
|
|
287
|
-
let
|
|
288
|
-
const
|
|
287
|
+
let be = [];
|
|
288
|
+
const Qe = {
|
|
289
289
|
initializeByDefault: !0
|
|
290
|
-
},
|
|
290
|
+
}, ge = {
|
|
291
291
|
mount(i) {
|
|
292
|
-
for (let e in
|
|
293
|
-
|
|
294
|
-
|
|
292
|
+
for (let e in Qe)
|
|
293
|
+
Qe.hasOwnProperty(e) && !(e in i) && (i[e] = Qe[e]);
|
|
294
|
+
be.some((e) => e.pluginName === i.pluginName) || be.push(i);
|
|
295
295
|
},
|
|
296
296
|
pluginEvent(i, e, t) {
|
|
297
297
|
this.eventCanceled = !1, t.cancel = () => {
|
|
298
298
|
this.eventCanceled = !0;
|
|
299
299
|
};
|
|
300
300
|
const n = i + "Global";
|
|
301
|
-
|
|
301
|
+
be.forEach((o) => {
|
|
302
302
|
e[o.pluginName] && (e[o.pluginName][n] && e[o.pluginName][n]({ sortable: e, ...t }), e.options[o.pluginName] && e[o.pluginName][i] && e[o.pluginName][i]({ sortable: e, ...t }));
|
|
303
303
|
});
|
|
304
304
|
},
|
|
305
305
|
initializePlugins(i, e, t, n) {
|
|
306
|
-
|
|
306
|
+
be.forEach((o) => {
|
|
307
307
|
const r = o.pluginName;
|
|
308
308
|
if (!i.options[r] && !o.initializeByDefault) return;
|
|
309
309
|
let l = new o(i, e, i.options);
|
|
@@ -317,18 +317,18 @@ const Ke = {
|
|
|
317
317
|
},
|
|
318
318
|
getEventProperties(i, e) {
|
|
319
319
|
let t = {};
|
|
320
|
-
return
|
|
320
|
+
return be.forEach((n) => {
|
|
321
321
|
typeof n.eventProperties == "function" && Object.assign(t, n.eventProperties.call(e[n.pluginName], i));
|
|
322
322
|
}), t;
|
|
323
323
|
},
|
|
324
324
|
modifyOption(i, e, t) {
|
|
325
325
|
let n;
|
|
326
|
-
return
|
|
326
|
+
return be.forEach((o) => {
|
|
327
327
|
i[o.pluginName] && o.optionListeners && typeof o.optionListeners[e] == "function" && (n = o.optionListeners[e].call(i[o.pluginName], t));
|
|
328
328
|
}), n;
|
|
329
329
|
}
|
|
330
330
|
};
|
|
331
|
-
function
|
|
331
|
+
function kt({
|
|
332
332
|
sortable: i,
|
|
333
333
|
rootEl: e,
|
|
334
334
|
name: t,
|
|
@@ -336,29 +336,29 @@ function Xt({
|
|
|
336
336
|
cloneEl: o,
|
|
337
337
|
toEl: r,
|
|
338
338
|
fromEl: l,
|
|
339
|
-
oldIndex:
|
|
340
|
-
newIndex:
|
|
339
|
+
oldIndex: s,
|
|
340
|
+
newIndex: c,
|
|
341
341
|
oldDraggableIndex: f,
|
|
342
342
|
newDraggableIndex: d,
|
|
343
343
|
originalEvent: h,
|
|
344
344
|
putSortable: m,
|
|
345
|
-
extraEventProperties:
|
|
345
|
+
extraEventProperties: w
|
|
346
346
|
}) {
|
|
347
|
-
if (i = i || e && e[
|
|
347
|
+
if (i = i || e && e[L], !i) return;
|
|
348
348
|
let u;
|
|
349
|
-
window.CustomEvent && !
|
|
349
|
+
window.CustomEvent && !ne && !Xe ? u = new CustomEvent(t, {
|
|
350
350
|
bubbles: !0,
|
|
351
351
|
cancelable: !0
|
|
352
|
-
}) : (u = document.createEvent("Event"), u.initEvent(t, !0, !0)), u.to = r || e, u.from = l || e, u.item = n || e, u.clone = o, u.oldIndex =
|
|
353
|
-
let
|
|
354
|
-
...
|
|
355
|
-
...
|
|
352
|
+
}) : (u = document.createEvent("Event"), u.initEvent(t, !0, !0)), u.to = r || e, u.from = l || e, u.item = n || e, u.clone = o, u.oldIndex = s, u.newIndex = c, u.oldDraggableIndex = f, u.newDraggableIndex = d, u.originalEvent = h, u.pullMode = m ? m.lastPutMode : void 0;
|
|
353
|
+
let A = {
|
|
354
|
+
...w,
|
|
355
|
+
...ge.getEventProperties(t, i)
|
|
356
356
|
};
|
|
357
|
-
for (let
|
|
358
|
-
u[
|
|
357
|
+
for (let C in A)
|
|
358
|
+
u[C] = A[C];
|
|
359
359
|
return u;
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function Qt({
|
|
362
362
|
sortable: i,
|
|
363
363
|
rootEl: e,
|
|
364
364
|
name: t,
|
|
@@ -366,17 +366,17 @@ function Zt({
|
|
|
366
366
|
cloneEl: o,
|
|
367
367
|
toEl: r,
|
|
368
368
|
fromEl: l,
|
|
369
|
-
oldIndex:
|
|
370
|
-
newIndex:
|
|
369
|
+
oldIndex: s,
|
|
370
|
+
newIndex: c,
|
|
371
371
|
oldDraggableIndex: f,
|
|
372
372
|
newDraggableIndex: d,
|
|
373
373
|
originalEvent: h,
|
|
374
374
|
putSortable: m,
|
|
375
|
-
extraEventProperties:
|
|
375
|
+
extraEventProperties: w
|
|
376
376
|
}) {
|
|
377
|
-
if (i = i || e && e[
|
|
378
|
-
let u = i.options,
|
|
379
|
-
const
|
|
377
|
+
if (i = i || e && e[L], !i) return;
|
|
378
|
+
let u = i.options, A = "on" + t.charAt(0).toUpperCase() + t.substr(1);
|
|
379
|
+
const C = kt({
|
|
380
380
|
sortable: i,
|
|
381
381
|
rootEl: e,
|
|
382
382
|
name: t,
|
|
@@ -384,115 +384,125 @@ function Zt({
|
|
|
384
384
|
cloneEl: o,
|
|
385
385
|
toEl: r,
|
|
386
386
|
fromEl: l,
|
|
387
|
-
oldIndex:
|
|
388
|
-
newIndex:
|
|
387
|
+
oldIndex: s,
|
|
388
|
+
newIndex: c,
|
|
389
389
|
oldDraggableIndex: f,
|
|
390
390
|
newDraggableIndex: d,
|
|
391
391
|
originalEvent: h,
|
|
392
392
|
putSortable: m,
|
|
393
|
-
extraEventProperties:
|
|
393
|
+
extraEventProperties: w
|
|
394
394
|
});
|
|
395
|
-
e && e.dispatchEvent(
|
|
395
|
+
e && e.dispatchEvent(C), u[A] && u[A].call(i, C);
|
|
396
396
|
}
|
|
397
397
|
/**!
|
|
398
398
|
* Sortable
|
|
399
399
|
* @author Sedmedgh <sedmedgh@gmail.com>
|
|
400
400
|
* @license MIT
|
|
401
401
|
*/
|
|
402
|
-
let
|
|
403
|
-
|
|
404
|
-
dragEl:
|
|
402
|
+
let Y = function(i, e, { evt: t, ...n } = {}) {
|
|
403
|
+
ge.pluginEvent.bind(x)(i, e, {
|
|
404
|
+
dragEl: a,
|
|
405
405
|
originalDragEl: g,
|
|
406
|
-
originalDragElDisplay:
|
|
407
|
-
parentEl:
|
|
406
|
+
originalDragElDisplay: Be,
|
|
407
|
+
parentEl: P,
|
|
408
408
|
ghostEl: b,
|
|
409
409
|
rootEl: D,
|
|
410
|
-
nextEl:
|
|
411
|
-
lastDownEl:
|
|
410
|
+
nextEl: ue,
|
|
411
|
+
lastDownEl: He,
|
|
412
412
|
cloneEl: _,
|
|
413
|
-
cloneHidden:
|
|
414
|
-
dragStarted:
|
|
415
|
-
putSortable:
|
|
413
|
+
cloneHidden: ae,
|
|
414
|
+
dragStarted: Ee,
|
|
415
|
+
putSortable: X,
|
|
416
416
|
activeSortable: x.active,
|
|
417
417
|
originalEvent: t,
|
|
418
|
-
oldIndex:
|
|
419
|
-
oldDraggableIndex:
|
|
418
|
+
oldIndex: pe,
|
|
419
|
+
oldDraggableIndex: Se,
|
|
420
420
|
newIndex: G,
|
|
421
|
-
newDraggableIndex:
|
|
422
|
-
hideGhostForTarget:
|
|
423
|
-
unhideGhostForTarget:
|
|
421
|
+
newDraggableIndex: te,
|
|
422
|
+
hideGhostForTarget: Yt,
|
|
423
|
+
unhideGhostForTarget: Rt,
|
|
424
424
|
cloneNowHidden() {
|
|
425
|
-
|
|
425
|
+
ae = !0;
|
|
426
426
|
},
|
|
427
427
|
cloneNowShown() {
|
|
428
|
-
|
|
428
|
+
ae = !1;
|
|
429
429
|
},
|
|
430
430
|
dispatchSortableEvent(o) {
|
|
431
|
-
|
|
431
|
+
R({ sortable: e, name: o, originalEvent: t });
|
|
432
432
|
},
|
|
433
433
|
...n
|
|
434
434
|
});
|
|
435
435
|
};
|
|
436
|
-
function
|
|
437
|
-
|
|
438
|
-
putSortable:
|
|
436
|
+
function R(i) {
|
|
437
|
+
Qt({
|
|
438
|
+
putSortable: X,
|
|
439
439
|
cloneEl: _,
|
|
440
|
-
targetEl: g ||
|
|
440
|
+
targetEl: g || a,
|
|
441
441
|
rootEl: D,
|
|
442
|
-
oldIndex:
|
|
443
|
-
oldDraggableIndex:
|
|
442
|
+
oldIndex: pe,
|
|
443
|
+
oldDraggableIndex: Se,
|
|
444
444
|
newIndex: G,
|
|
445
|
-
newDraggableIndex:
|
|
445
|
+
newDraggableIndex: te,
|
|
446
446
|
...i
|
|
447
447
|
});
|
|
448
448
|
}
|
|
449
|
-
function
|
|
450
|
-
return
|
|
451
|
-
putSortable:
|
|
449
|
+
function St(i) {
|
|
450
|
+
return kt({
|
|
451
|
+
putSortable: X,
|
|
452
452
|
cloneEl: _,
|
|
453
|
-
targetEl: g ||
|
|
453
|
+
targetEl: g || a,
|
|
454
454
|
rootEl: D,
|
|
455
|
-
oldIndex:
|
|
456
|
-
oldDraggableIndex:
|
|
455
|
+
oldIndex: pe,
|
|
456
|
+
oldDraggableIndex: Se,
|
|
457
457
|
newIndex: G,
|
|
458
|
-
newDraggableIndex:
|
|
458
|
+
newDraggableIndex: te,
|
|
459
459
|
...i
|
|
460
460
|
});
|
|
461
461
|
}
|
|
462
|
-
let
|
|
463
|
-
const
|
|
464
|
-
if (!
|
|
465
|
-
if (
|
|
462
|
+
let a, g, Be, P, b, D, ue, He, _, ae, pe, G, Se, te, Le, X, ve = !1, Ve = !1, We = [], de, U, Je, et, Dt, _t, Ee, we, Ae, Ne = !1, ke = !1, Ge, k, tt = [], ct = !1, qe = [];
|
|
463
|
+
const Ze = typeof document < "u", Fe = pt, Ct = Xe || ne ? "cssFloat" : "float", Jt = Ze && !It && !pt && "draggable" in document.createElement("div"), Ft = function() {
|
|
464
|
+
if (!Ze) return;
|
|
465
|
+
if (ne)
|
|
466
466
|
return !1;
|
|
467
467
|
let i = document.createElement("x");
|
|
468
468
|
return i.style.cssText = "pointer-events:auto", i.style.pointerEvents === "auto";
|
|
469
|
-
}(),
|
|
470
|
-
let t = p(i), n = parseInt(t.width) - parseInt(t.paddingLeft) - parseInt(t.paddingRight) - parseInt(t.borderLeftWidth) - parseInt(t.borderRightWidth), o =
|
|
469
|
+
}(), ft = function(i, e) {
|
|
470
|
+
let t = p(i), n = parseInt(t.width) - parseInt(t.paddingLeft) - parseInt(t.paddingRight) - parseInt(t.borderLeftWidth) - parseInt(t.borderRightWidth), o = me(i, 0, e, !1, [g]), r = me(i, 1, e, !1, [g]), l = o && p(o), s = r && p(r), c = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + E(o).width, f = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + E(r).width;
|
|
471
471
|
if (t.display === "flex")
|
|
472
472
|
return t.flexDirection === "column" || t.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
473
473
|
if (t.display === "grid")
|
|
474
474
|
return t.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
475
475
|
if (o && l.float && l.float !== "none") {
|
|
476
476
|
let d = l.float === "left" ? "left" : "right";
|
|
477
|
-
return r && (
|
|
478
|
-
}
|
|
479
|
-
return o && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" ||
|
|
480
|
-
},
|
|
481
|
-
let n = t ? i.left : i.top, o = t ? i.right : i.bottom, r = t ? i.width : i.height, l = t ? e.left : e.top,
|
|
482
|
-
return n === l || o ===
|
|
483
|
-
},
|
|
477
|
+
return r && (s.clear === "both" || s.clear === d) ? "vertical" : "horizontal";
|
|
478
|
+
}
|
|
479
|
+
return o && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" || c >= n && t[Ct] === "none" || r && t[Ct] === "none" && c + f > n) ? "vertical" : "horizontal";
|
|
480
|
+
}, ei = function(i, e, t) {
|
|
481
|
+
let n = t ? i.left : i.top, o = t ? i.right : i.bottom, r = t ? i.width : i.height, l = t ? e.left : e.top, s = t ? e.right : e.bottom, c = t ? e.width : e.height;
|
|
482
|
+
return n === l || o === s || n + r / 2 === l + c / 2;
|
|
483
|
+
}, ti = function(i) {
|
|
484
|
+
if (i && i.options) {
|
|
485
|
+
const n = i.options.rtl;
|
|
486
|
+
if (n != null)
|
|
487
|
+
return typeof n == "function" ? n.call(i) === !0 : n === !0;
|
|
488
|
+
}
|
|
489
|
+
const e = i && i.el ? i.el : i;
|
|
490
|
+
if (!e) return !1;
|
|
491
|
+
let t = p(e, "direction");
|
|
492
|
+
return t ? t === "rtl" : e.ownerDocument && e.ownerDocument.documentElement && p(e.ownerDocument.documentElement, "direction") === "rtl";
|
|
493
|
+
}, ii = function(i, e) {
|
|
484
494
|
let t;
|
|
485
|
-
return
|
|
486
|
-
const o = n[
|
|
487
|
-
if (!o ||
|
|
488
|
-
const r =
|
|
489
|
-
if (l &&
|
|
495
|
+
return We.some((n) => {
|
|
496
|
+
const o = n[L].options.emptyInsertThreshold;
|
|
497
|
+
if (!o || gt(n)) return;
|
|
498
|
+
const r = E(n), l = i >= r.left - o && i <= r.right + o, s = e >= r.top - o && e <= r.bottom + o;
|
|
499
|
+
if (l && s)
|
|
490
500
|
return t = n;
|
|
491
501
|
}), t;
|
|
492
|
-
},
|
|
502
|
+
}, Tt = function(i) {
|
|
493
503
|
function e(o, r) {
|
|
494
|
-
return function(l,
|
|
495
|
-
let d = l.options.group.name &&
|
|
504
|
+
return function(l, s, c, f) {
|
|
505
|
+
let d = l.options.group.name && s.options.group.name && l.options.group.name === s.options.group.name;
|
|
496
506
|
if (o == null && (r || d))
|
|
497
507
|
return !0;
|
|
498
508
|
if (o == null || o === !1)
|
|
@@ -500,48 +510,48 @@ const Ue = typeof document < "u", ke = ut, _t = Ae || re ? "cssFloat" : "float",
|
|
|
500
510
|
if (r && o === "clone")
|
|
501
511
|
return o;
|
|
502
512
|
if (typeof o == "function")
|
|
503
|
-
return e(o(l,
|
|
513
|
+
return e(o(l, s, c, f), r)(l, s, c, f);
|
|
504
514
|
{
|
|
505
|
-
let h = (r ? l :
|
|
515
|
+
let h = (r ? l : s).options.group.name;
|
|
506
516
|
return o === !0 || typeof o == "string" && o === h || o.join && o.indexOf(h) > -1;
|
|
507
517
|
}
|
|
508
518
|
};
|
|
509
519
|
}
|
|
510
520
|
let t = {}, n = i.group;
|
|
511
521
|
(!n || typeof n != "object") && (n = { name: n }), t.name = n.name, t.checkPull = e(n.pull, !0), t.checkPut = e(n.put), t.revertClone = n.revertClone, i.group = t;
|
|
512
|
-
},
|
|
513
|
-
!
|
|
514
|
-
},
|
|
515
|
-
!
|
|
522
|
+
}, Yt = function() {
|
|
523
|
+
!Ft && b && p(b, "display", "none");
|
|
524
|
+
}, Rt = function() {
|
|
525
|
+
!Ft && b && p(b, "display", "");
|
|
516
526
|
};
|
|
517
|
-
|
|
527
|
+
Ze && !It && document.addEventListener(
|
|
518
528
|
"click",
|
|
519
529
|
function(i) {
|
|
520
|
-
if (
|
|
521
|
-
return i.preventDefault(), i.stopPropagation && i.stopPropagation(), i.stopImmediatePropagation && i.stopImmediatePropagation(),
|
|
530
|
+
if (Ve)
|
|
531
|
+
return i.preventDefault(), i.stopPropagation && i.stopPropagation(), i.stopImmediatePropagation && i.stopImmediatePropagation(), Ve = !1, !1;
|
|
522
532
|
},
|
|
523
533
|
!0
|
|
524
534
|
);
|
|
525
|
-
let
|
|
526
|
-
if (
|
|
535
|
+
let he = function(i) {
|
|
536
|
+
if (a) {
|
|
527
537
|
i = i.touches ? i.touches[0] : i;
|
|
528
|
-
let e =
|
|
538
|
+
let e = ii(i.clientX, i.clientY);
|
|
529
539
|
if (e) {
|
|
530
540
|
let t = {};
|
|
531
541
|
for (let n in i)
|
|
532
542
|
i.hasOwnProperty(n) && (t[n] = i[n]);
|
|
533
|
-
t.target = t.rootEl = e, t.preventDefault = void 0, t.stopPropagation = void 0, e[
|
|
543
|
+
t.target = t.rootEl = e, t.preventDefault = void 0, t.stopPropagation = void 0, e[L]._onDragOver(t);
|
|
534
544
|
}
|
|
535
545
|
}
|
|
536
|
-
},
|
|
537
|
-
|
|
546
|
+
}, ni = function(i) {
|
|
547
|
+
a && a.parentNode[L]._isOutsideThisEl(i.target);
|
|
538
548
|
};
|
|
539
549
|
const S = class S {
|
|
540
550
|
constructor(e, t) {
|
|
541
551
|
q(this, "_ignoreWhileAnimating", null);
|
|
542
552
|
if (!(e && e.nodeType && e.nodeType === 1))
|
|
543
553
|
throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
544
|
-
this.el = e, this.options = t = Object.assign({}, t), e[
|
|
554
|
+
this.el = e, this.options = t = Object.assign({}, t), e[L] = this;
|
|
545
555
|
let n = {
|
|
546
556
|
group: null,
|
|
547
557
|
sort: !0,
|
|
@@ -557,7 +567,7 @@ const S = class S {
|
|
|
557
567
|
// will be set to same as swapThreshold if default
|
|
558
568
|
removeCloneOnHide: !0,
|
|
559
569
|
direction: function() {
|
|
560
|
-
return
|
|
570
|
+
return ft(e, this.options);
|
|
561
571
|
},
|
|
562
572
|
ghostClass: "sortable-ghost",
|
|
563
573
|
chosenClass: "sortable-chosen",
|
|
@@ -588,25 +598,27 @@ const S = class S {
|
|
|
588
598
|
fallbackTolerance: 0,
|
|
589
599
|
fallbackOffset: { x: 0, y: 0 },
|
|
590
600
|
// Disabled on Safari: #1571; Enabled on Safari IOS: #2244
|
|
591
|
-
supportPointer: S.supportPointer !== !1 && "PointerEvent" in window && (!
|
|
592
|
-
emptyInsertThreshold: 5
|
|
601
|
+
supportPointer: S.supportPointer !== !1 && "PointerEvent" in window && (!Pe || pt),
|
|
602
|
+
emptyInsertThreshold: 5,
|
|
603
|
+
/** @type {boolean|((this: Sortable) => boolean)|null} null = auto-detect, true/false = explicit, function = compute per call */
|
|
604
|
+
rtl: null
|
|
593
605
|
};
|
|
594
|
-
|
|
606
|
+
ge.initializePlugins(this, e, n);
|
|
595
607
|
for (let o in n)
|
|
596
608
|
!(o in t) && (t[o] = n[o]);
|
|
597
|
-
|
|
609
|
+
Tt(t);
|
|
598
610
|
for (let o of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))
|
|
599
611
|
o.charAt(0) === "_" && typeof this[o] == "function" && (this[o] = this[o].bind(this));
|
|
600
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
612
|
+
this.nativeDraggable = t.forceFallback ? !1 : Jt, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? y(e, "pointerdown", this._onTapStart) : (y(e, "mousedown", this._onTapStart), y(e, "touchstart", this._onTapStart)), this.nativeDraggable && (y(e, "dragover", this), y(e, "dragenter", this)), We.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Object.assign(this, Ut());
|
|
601
613
|
}
|
|
602
614
|
static get(e) {
|
|
603
|
-
return e[
|
|
615
|
+
return e[L];
|
|
604
616
|
}
|
|
605
617
|
static mount(...e) {
|
|
606
618
|
e[0].constructor === Array && (e = e[0]), e.forEach((t) => {
|
|
607
619
|
if (!t.prototype || !t.prototype.constructor)
|
|
608
620
|
throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(t)}`;
|
|
609
|
-
t.utils && (S.utils = { ...S.utils, ...t.utils }),
|
|
621
|
+
t.utils && (S.utils = { ...S.utils, ...t.utils }), ge.mount(t);
|
|
610
622
|
});
|
|
611
623
|
}
|
|
612
624
|
static create(e, t) {
|
|
@@ -617,69 +629,69 @@ const S = class S {
|
|
|
617
629
|
!this.el.contains(e) && e !== this.el && (we = null);
|
|
618
630
|
}
|
|
619
631
|
_getDirection(e, t) {
|
|
620
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, g ||
|
|
632
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, g || a) : this.options.direction;
|
|
621
633
|
}
|
|
622
634
|
_onTapStart(e) {
|
|
623
635
|
if (!e.cancelable) return;
|
|
624
|
-
let t = this, n = this.el, o = this.options, r = o.preventOnFilter, l = e.type,
|
|
625
|
-
if (
|
|
626
|
-
if (
|
|
627
|
-
if (d.call(this, e,
|
|
628
|
-
|
|
636
|
+
let t = this, n = this.el, o = this.options, r = o.preventOnFilter, l = e.type, s = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, c = (s || e).target, f = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || c, d = o.filter;
|
|
637
|
+
if (fi(n), !a && !(/mousedown|pointerdown/.test(l) && e.button !== 0 || o.disabled) && !f.isContentEditable && !(!this.nativeDraggable && Pe && c && c.tagName.toUpperCase() === "SELECT") && (c = B(c, o.draggable, n, !1, [g]), !(c && c.animated) && He !== c)) {
|
|
638
|
+
if (pe = F(c, void 0, [g]), Se = F(c, o.draggable, [g]), typeof d == "function") {
|
|
639
|
+
if (d.call(this, e, c, this)) {
|
|
640
|
+
R({
|
|
629
641
|
sortable: t,
|
|
630
642
|
rootEl: f,
|
|
631
643
|
name: "filter",
|
|
632
|
-
targetEl:
|
|
644
|
+
targetEl: c,
|
|
633
645
|
toEl: n,
|
|
634
646
|
fromEl: n
|
|
635
|
-
}),
|
|
647
|
+
}), Y("filter", t, { evt: e }), r && e.preventDefault();
|
|
636
648
|
return;
|
|
637
649
|
}
|
|
638
650
|
} else if (d && (d = d.split(",").some(function(h) {
|
|
639
|
-
if (h =
|
|
640
|
-
return
|
|
651
|
+
if (h = B(f, h.trim(), n, !1, [g]), h)
|
|
652
|
+
return R({
|
|
641
653
|
sortable: t,
|
|
642
654
|
rootEl: h,
|
|
643
655
|
name: "filter",
|
|
644
|
-
targetEl:
|
|
656
|
+
targetEl: c,
|
|
645
657
|
fromEl: n,
|
|
646
658
|
toEl: n
|
|
647
|
-
}),
|
|
659
|
+
}), Y("filter", t, { evt: e }), !0;
|
|
648
660
|
}), d)) {
|
|
649
661
|
r && e.preventDefault();
|
|
650
662
|
return;
|
|
651
663
|
}
|
|
652
|
-
o.handle && !
|
|
664
|
+
o.handle && !B(f, o.handle, n, !1, [g]) || this._prepareDragStart(e, s, c);
|
|
653
665
|
}
|
|
654
666
|
}
|
|
655
667
|
_prepareDragStart(e, t, n) {
|
|
656
|
-
let o = this, r = o.el, l = o.options,
|
|
657
|
-
if (n && !
|
|
658
|
-
let f =
|
|
659
|
-
if (D = r,
|
|
660
|
-
target:
|
|
668
|
+
let o = this, r = o.el, l = o.options, s = r.ownerDocument, c;
|
|
669
|
+
if (n && !a && n.parentNode === r) {
|
|
670
|
+
let f = E(n);
|
|
671
|
+
if (D = r, a = n, P = a.parentNode, ue = a.nextSibling, He = n, Le = l.group, S.dragged = a, de = {
|
|
672
|
+
target: a,
|
|
661
673
|
clientX: (t || e).clientX,
|
|
662
674
|
clientY: (t || e).clientY
|
|
663
|
-
},
|
|
664
|
-
if (
|
|
675
|
+
}, Dt = de.clientX - f.left, _t = de.clientY - f.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, a.style["will-change"] = "all", c = function() {
|
|
676
|
+
if (Y("delayEnded", o, { evt: e }), S.eventCanceled) {
|
|
665
677
|
o._onDrop();
|
|
666
678
|
return;
|
|
667
679
|
}
|
|
668
|
-
o._disableDelayedDragEvents(), !
|
|
680
|
+
o._disableDelayedDragEvents(), !bt && o.nativeDraggable && (a.draggable = !0), o._triggerDragStart(e, t), R({
|
|
669
681
|
sortable: o,
|
|
670
682
|
name: "choose",
|
|
671
683
|
originalEvent: e
|
|
672
|
-
}),
|
|
684
|
+
}), O(a, l.chosenClass, !0);
|
|
673
685
|
}, l.ignore.split(",").forEach(function(d) {
|
|
674
|
-
|
|
675
|
-
}),
|
|
686
|
+
st(a, d.trim(), it);
|
|
687
|
+
}), y(s, "dragover", he), y(s, "mousemove", he), y(s, "touchmove", he), l.supportPointer ? (y(s, "pointerup", o._onDrop), !this.nativeDraggable && y(s, "pointercancel", o._onDrop)) : (y(s, "mouseup", o._onDrop), y(s, "touchend", o._onDrop), y(s, "touchcancel", o._onDrop)), bt && this.nativeDraggable && (this.options.touchStartThreshold = 4, a.draggable = !0), Y("delayStart", this, { evt: e }), l.delay && (!l.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Xe || ne))) {
|
|
676
688
|
if (S.eventCanceled) {
|
|
677
689
|
this._onDrop();
|
|
678
690
|
return;
|
|
679
691
|
}
|
|
680
|
-
l.supportPointer ? (
|
|
692
|
+
l.supportPointer ? (y(s, "pointerup", o._disableDelayedDrag), y(s, "pointercancel", o._disableDelayedDrag)) : (y(s, "mouseup", o._disableDelayedDrag), y(s, "touchend", o._disableDelayedDrag), y(s, "touchcancel", o._disableDelayedDrag)), y(s, "mousemove", o._delayedDragTouchMoveHandler), y(s, "touchmove", o._delayedDragTouchMoveHandler), l.supportPointer && y(s, "pointermove", o._delayedDragTouchMoveHandler), o._dragStartTimer = setTimeout(c, l.delay);
|
|
681
693
|
} else
|
|
682
|
-
|
|
694
|
+
c();
|
|
683
695
|
}
|
|
684
696
|
}
|
|
685
697
|
_delayedDragTouchMoveHandler(e) {
|
|
@@ -689,16 +701,16 @@ const S = class S {
|
|
|
689
701
|
) && this._disableDelayedDrag();
|
|
690
702
|
}
|
|
691
703
|
_disableDelayedDrag() {
|
|
692
|
-
|
|
704
|
+
a && it(a), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
693
705
|
}
|
|
694
706
|
_disableDelayedDragEvents() {
|
|
695
707
|
let e = this.el.ownerDocument;
|
|
696
708
|
v(e, "mouseup", this._disableDelayedDrag), v(e, "touchend", this._disableDelayedDrag), v(e, "touchcancel", this._disableDelayedDrag), v(e, "pointerup", this._disableDelayedDrag), v(e, "pointercancel", this._disableDelayedDrag), v(e, "mousemove", this._delayedDragTouchMoveHandler), v(e, "touchmove", this._delayedDragTouchMoveHandler), v(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
697
709
|
}
|
|
698
710
|
_triggerDragStart(e, t) {
|
|
699
|
-
t = t || e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ?
|
|
711
|
+
t = t || e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? y(document, "pointermove", this._onTouchMove) : t ? y(document, "touchmove", this._onTouchMove) : y(document, "mousemove", this._onTouchMove) : (y(a, "dragend", this), y(D, "dragstart", this._onDragStart));
|
|
700
712
|
try {
|
|
701
|
-
document.selection ?
|
|
713
|
+
document.selection ? xe(() => {
|
|
702
714
|
document.selection.empty();
|
|
703
715
|
}) : window.getSelection().removeAllRanges();
|
|
704
716
|
} catch {
|
|
@@ -707,29 +719,29 @@ const S = class S {
|
|
|
707
719
|
_getPlaceholder(e) {
|
|
708
720
|
if (typeof this.options.getPlaceholder == "function") {
|
|
709
721
|
const t = this.options.getPlaceholder(
|
|
710
|
-
|
|
722
|
+
St({
|
|
711
723
|
sortable: this,
|
|
712
724
|
name: "getPlaceholder",
|
|
713
725
|
originalEvent: e
|
|
714
726
|
})
|
|
715
727
|
);
|
|
716
|
-
t && (g =
|
|
728
|
+
t && (g = a, Be = a.style.display, a = t), a && g && (g.after(a), p(g, "display", "none"), p(g, "transform", ""), O(g, this.options.dragClass, !1), O(g, this.options.ghostClass, !1), O(g, this.options.chosenClass, !1)), Y("getPlaceholder", this);
|
|
717
729
|
}
|
|
718
730
|
}
|
|
719
731
|
_removeClonedSelectedItem() {
|
|
720
|
-
(typeof this.options.getPlaceholder == "function" || typeof this.options.getPlaceholderOnMove == "function") &&
|
|
732
|
+
(typeof this.options.getPlaceholder == "function" || typeof this.options.getPlaceholderOnMove == "function") && a && g && (p(g, "display", Be || ""), a.remove());
|
|
721
733
|
}
|
|
722
734
|
_replacePlaceholder(e) {
|
|
723
|
-
const t =
|
|
724
|
-
t ? t.replaceChild(e,
|
|
735
|
+
const t = a.parentNode;
|
|
736
|
+
t ? t.replaceChild(e, a) : a.remove(), a = e;
|
|
725
737
|
}
|
|
726
738
|
_getPlaceholderOnMove(e, t, n, o, r, l) {
|
|
727
739
|
if (typeof this.options.getPlaceholderOnMove == "function") {
|
|
728
|
-
const
|
|
729
|
-
|
|
740
|
+
const s = this.options.getPlaceholderOnMove(
|
|
741
|
+
Bt(
|
|
730
742
|
D,
|
|
731
743
|
e,
|
|
732
|
-
g ||
|
|
744
|
+
g || a,
|
|
733
745
|
t,
|
|
734
746
|
n,
|
|
735
747
|
o,
|
|
@@ -737,14 +749,14 @@ const S = class S {
|
|
|
737
749
|
l
|
|
738
750
|
)
|
|
739
751
|
);
|
|
740
|
-
|
|
752
|
+
s && this._replacePlaceholder(s);
|
|
741
753
|
}
|
|
742
754
|
}
|
|
743
755
|
_dragStarted(e, t) {
|
|
744
|
-
if (
|
|
745
|
-
this._getPlaceholder(t),
|
|
756
|
+
if (ve = !1, D && a) {
|
|
757
|
+
this._getPlaceholder(t), Y("dragStarted", this, { evt: t }), this.nativeDraggable && y(document, "dragover", ni);
|
|
746
758
|
let n = this.options;
|
|
747
|
-
!e &&
|
|
759
|
+
!e && O(a, n.dragClass, !1), O(a, n.ghostClass, !0), S.active = this, e && this._appendGhost(), R({
|
|
748
760
|
sortable: this,
|
|
749
761
|
name: "start",
|
|
750
762
|
originalEvent: t
|
|
@@ -753,41 +765,42 @@ const S = class S {
|
|
|
753
765
|
this._nulling();
|
|
754
766
|
}
|
|
755
767
|
_emulateDragOver() {
|
|
768
|
+
var e, t, n;
|
|
756
769
|
if (U) {
|
|
757
|
-
this._lastX = U.clientX, this._lastY = U.clientY,
|
|
758
|
-
let
|
|
759
|
-
for (;
|
|
760
|
-
|
|
761
|
-
if (
|
|
770
|
+
this._lastX = U.clientX, this._lastY = U.clientY, Yt();
|
|
771
|
+
let o = document.elementFromPoint(U.clientX, U.clientY), r = o;
|
|
772
|
+
for (; o && o.shadowRoot && (o = o.shadowRoot.elementFromPoint(U.clientX, U.clientY), o !== r); )
|
|
773
|
+
r = o;
|
|
774
|
+
if ((n = (t = (e = a == null ? void 0 : a.parentNode) == null ? void 0 : e[L]) == null ? void 0 : t._isOutsideThisEl) == null || n.call(t, o), r)
|
|
762
775
|
do {
|
|
763
|
-
if (
|
|
764
|
-
let
|
|
765
|
-
if (
|
|
776
|
+
if (r[L]) {
|
|
777
|
+
let l;
|
|
778
|
+
if (l = r[L]._onDragOver({
|
|
766
779
|
clientX: U.clientX,
|
|
767
780
|
clientY: U.clientY,
|
|
768
|
-
target:
|
|
769
|
-
rootEl:
|
|
770
|
-
}),
|
|
781
|
+
target: o,
|
|
782
|
+
rootEl: r
|
|
783
|
+
}), l && !this.options.dragoverBubble)
|
|
771
784
|
break;
|
|
772
785
|
}
|
|
773
|
-
|
|
786
|
+
o = r;
|
|
774
787
|
} while (
|
|
775
788
|
/* jshint boss:true */
|
|
776
|
-
|
|
789
|
+
r = At(r)
|
|
777
790
|
);
|
|
778
|
-
|
|
791
|
+
Rt();
|
|
779
792
|
}
|
|
780
793
|
}
|
|
781
794
|
_onTouchMove(e) {
|
|
782
|
-
if (
|
|
783
|
-
let t = this.options, n = t.fallbackTolerance, o = t.fallbackOffset, r = e.touches ? e.touches[0] : e, l = b &&
|
|
784
|
-
if (!S.active && !
|
|
795
|
+
if (de) {
|
|
796
|
+
let t = this.options, n = t.fallbackTolerance, o = t.fallbackOffset, r = e.touches ? e.touches[0] : e, l = b && ye(b, !0), s = b && l && l.a, c = b && l && l.d, f = Fe && k && yt(k), d = (r.clientX - de.clientX + o.x) / (s || 1) + (f ? f[0] - tt[0] : 0) / (s || 1), h = (r.clientY - de.clientY + o.y) / (c || 1) + (f ? f[1] - tt[1] : 0) / (c || 1);
|
|
797
|
+
if (!S.active && !ve) {
|
|
785
798
|
if (n && Math.max(Math.abs(r.clientX - this._lastX), Math.abs(r.clientY - this._lastY)) < n)
|
|
786
799
|
return;
|
|
787
800
|
this._onDragStart(e, !0);
|
|
788
801
|
}
|
|
789
802
|
if (b) {
|
|
790
|
-
l ? (l.e += d - (
|
|
803
|
+
l ? (l.e += d - (Je || 0), l.f += h - (et || 0)) : l = {
|
|
791
804
|
a: 1,
|
|
792
805
|
b: 0,
|
|
793
806
|
c: 0,
|
|
@@ -796,183 +809,185 @@ const S = class S {
|
|
|
796
809
|
f: h
|
|
797
810
|
};
|
|
798
811
|
let m = `matrix(${l.a},${l.b},${l.c},${l.d},${l.e},${l.f})`;
|
|
799
|
-
p(b, "webkitTransform", m), p(b, "mozTransform", m), p(b, "msTransform", m), p(b, "transform", m),
|
|
812
|
+
p(b, "webkitTransform", m), p(b, "mozTransform", m), p(b, "msTransform", m), p(b, "transform", m), Je = d, et = h, U = r;
|
|
800
813
|
}
|
|
801
814
|
e.cancelable && e.preventDefault();
|
|
802
815
|
}
|
|
803
816
|
}
|
|
804
817
|
_appendGhost() {
|
|
805
818
|
if (!b) {
|
|
806
|
-
let e = this.options.fallbackOnBody ? document.body : D, t =
|
|
807
|
-
if (
|
|
808
|
-
for (
|
|
809
|
-
|
|
810
|
-
|
|
819
|
+
let e = this.options.fallbackOnBody ? document.body : D, t = E(a, !0, Fe, !0, e), n = this.options;
|
|
820
|
+
if (Fe) {
|
|
821
|
+
for (k = e; p(k, "position") === "static" && p(k, "transform") === "none" && k && k !== document; )
|
|
822
|
+
k = k.parentNode;
|
|
823
|
+
k !== document.body && k !== document.documentElement ? (k === document && (k = Q()), t.top += k.scrollTop, t.left += k.scrollLeft) : k = Q(), tt = yt(k);
|
|
811
824
|
}
|
|
812
825
|
b = this.options.getGhostFallback && typeof this.options.getGhostFallback == "function" ? this.options.getGhostFallback(
|
|
813
|
-
|
|
826
|
+
St({
|
|
814
827
|
sortable: this,
|
|
815
828
|
name: "getGhostFallback"
|
|
816
829
|
})
|
|
817
|
-
) :
|
|
830
|
+
) : a.cloneNode(!0), O(b, n.ghostClass, !1), O(b, n.fallbackClass, !0), O(b, n.dragClass, !0), p(b, "transition", ""), p(b, "transform", ""), p(b, "box-sizing", "border-box"), p(b, "margin", 0), p(b, "top", t.top), p(b, "left", t.left), p(b, "width", t.width), p(b, "height", t.height), p(b, "opacity", "0.8"), p(b, "position", Fe ? "absolute" : "fixed"), p(b, "zIndex", "100000"), p(b, "pointerEvents", "none"), S.ghost = b, e.appendChild(b), p(
|
|
818
831
|
b,
|
|
819
832
|
"transform-origin",
|
|
820
|
-
|
|
833
|
+
Dt / parseInt(b.style.width) * 100 + "% " + _t / parseInt(b.style.height) * 100 + "%"
|
|
821
834
|
);
|
|
822
835
|
}
|
|
823
836
|
}
|
|
824
837
|
_onDragStart(e, t) {
|
|
825
838
|
let n = this, o = e.dataTransfer, r = n.options;
|
|
826
|
-
if (
|
|
839
|
+
if (Y("dragStart", this, { evt: e }), S.eventCanceled) {
|
|
827
840
|
this._onDrop();
|
|
828
841
|
return;
|
|
829
842
|
}
|
|
830
|
-
|
|
831
|
-
|
|
843
|
+
Y("setupClone", this), S.eventCanceled || (_ = at(a), _.removeAttribute("id"), _.draggable = !1, _.style["will-change"] = "", this._hideClone(), O(_, this.options.chosenClass, !1), S.clone = _), n.cloneId = xe(function() {
|
|
844
|
+
Y("clone", n), !S.eventCanceled && (n.options.removeCloneOnHide || D.insertBefore(_, a), n._hideClone(), R({
|
|
832
845
|
sortable: n,
|
|
833
846
|
name: "clone"
|
|
834
847
|
}));
|
|
835
|
-
}), !t &&
|
|
848
|
+
}), !t && O(a, r.dragClass, !0), t ? (Ve = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (v(document, "mouseup", n._onDrop), v(document, "touchend", n._onDrop), v(document, "touchcancel", n._onDrop), o && (o.effectAllowed = "move", r.setData && r.setData.call(n, o, a)), y(document, "drop", n), p(a, "transform", "translateZ(0)")), ve = !0, n._dragStartId = xe(n._dragStarted.bind(n, t, e)), y(document, "selectstart", n), Ee = !0, window.getSelection().removeAllRanges(), Pe && p(document.body, "user-select", "none");
|
|
836
849
|
}
|
|
837
850
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
838
851
|
_onDragOver(e) {
|
|
839
|
-
let t = this.el, n = e.target, o, r, l,
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
852
|
+
let t = this.el, n = e.target, o, r, l, s = this.options, c = s.group, f = S.active, d = Le === c, h = s.sort, m = X || f, w, u = this, A = !1;
|
|
853
|
+
const C = ti(this);
|
|
854
|
+
if (ct) return;
|
|
855
|
+
function z(T, M) {
|
|
856
|
+
Y(T, u, {
|
|
843
857
|
evt: e,
|
|
844
858
|
isOwner: d,
|
|
845
|
-
|
|
859
|
+
RTL: C,
|
|
846
860
|
revert: l,
|
|
847
861
|
dragRect: o,
|
|
848
862
|
targetRect: r,
|
|
849
863
|
canSort: h,
|
|
850
864
|
fromSortable: m,
|
|
851
865
|
target: n,
|
|
852
|
-
completed:
|
|
853
|
-
onMove(
|
|
854
|
-
return
|
|
866
|
+
completed: N,
|
|
867
|
+
onMove(j, re) {
|
|
868
|
+
return Ye(
|
|
855
869
|
D,
|
|
856
870
|
t,
|
|
857
|
-
g ||
|
|
871
|
+
g || a,
|
|
858
872
|
o,
|
|
859
|
-
|
|
860
|
-
|
|
873
|
+
j,
|
|
874
|
+
E(j),
|
|
861
875
|
e,
|
|
862
|
-
|
|
876
|
+
re
|
|
863
877
|
);
|
|
864
878
|
},
|
|
865
|
-
changed:
|
|
866
|
-
...
|
|
879
|
+
changed: V,
|
|
880
|
+
...M
|
|
867
881
|
});
|
|
868
882
|
}
|
|
869
|
-
function
|
|
870
|
-
|
|
883
|
+
function oe() {
|
|
884
|
+
z("dragOverAnimationCapture"), u.captureAnimationState(), u !== m && m.captureAnimationState();
|
|
871
885
|
}
|
|
872
|
-
function
|
|
873
|
-
return
|
|
874
|
-
|
|
875
|
-
|
|
886
|
+
function N(T) {
|
|
887
|
+
return z("dragOverCompleted", { insertion: T }), T && (d ? f._hideClone() : f._showClone(u), u !== m && (O(
|
|
888
|
+
a,
|
|
889
|
+
X ? X.options.ghostClass : f.options.ghostClass,
|
|
876
890
|
!1
|
|
877
|
-
),
|
|
878
|
-
|
|
879
|
-
}), u !== m && (m.animateAll(), m._ignoreWhileAnimating = null)), (n ===
|
|
891
|
+
), O(a, s.ghostClass, !0)), X !== u && u !== S.active ? X = u : u === S.active && X && (X = null), m === u && (u._ignoreWhileAnimating = n), u.animateAll(function() {
|
|
892
|
+
z("dragOverAnimationComplete"), u._ignoreWhileAnimating = null;
|
|
893
|
+
}), u !== m && (m.animateAll(), m._ignoreWhileAnimating = null)), (n === a && !a.animated || n === t && !n.animated) && (we = null), !s.dragoverBubble && !e.rootEl && n !== document && (a.parentNode[L]._isOutsideThisEl(e.target), !T && he(e)), !s.dragoverBubble && e.stopPropagation && e.stopPropagation(), A = !0;
|
|
880
894
|
}
|
|
881
|
-
function
|
|
882
|
-
G =
|
|
895
|
+
function V() {
|
|
896
|
+
G = F(a, void 0, [g]), te = F(a, s.draggable, [g]), R({
|
|
883
897
|
sortable: u,
|
|
884
898
|
name: "change",
|
|
885
899
|
toEl: t,
|
|
886
900
|
newIndex: G,
|
|
887
|
-
newDraggableIndex:
|
|
901
|
+
newDraggableIndex: te,
|
|
888
902
|
originalEvent: e
|
|
889
903
|
});
|
|
890
904
|
}
|
|
891
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
892
|
-
if (
|
|
893
|
-
return
|
|
894
|
-
if (
|
|
905
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = B(n, s.draggable, t, !0, [g]), z("dragOver"), S.eventCanceled) return A;
|
|
906
|
+
if (a.contains(e.target) || n.animated && n.animatingX && n.animatingY || u._ignoreWhileAnimating === n)
|
|
907
|
+
return N(!1);
|
|
908
|
+
if (Ve = !1, f && !s.disabled && (d ? h || (l = P !== D) : X === this || (this.lastPutMode = Le.checkPull(
|
|
895
909
|
this,
|
|
896
910
|
f,
|
|
897
|
-
g ||
|
|
911
|
+
g || a,
|
|
898
912
|
e
|
|
899
|
-
)) &&
|
|
900
|
-
if (
|
|
913
|
+
)) && c.checkPut(this, f, g || a, e))) {
|
|
914
|
+
if (w = this._getDirection(e, n) === "vertical", o = E(a), z("dragOverValid"), S.eventCanceled) return A;
|
|
901
915
|
if (l)
|
|
902
|
-
return
|
|
903
|
-
let
|
|
904
|
-
if (!
|
|
905
|
-
if (
|
|
906
|
-
return
|
|
907
|
-
if (
|
|
916
|
+
return P = D, oe(), this._hideClone(), z("revert"), S.eventCanceled || (ue ? D.insertBefore(a, ue) : D.appendChild(a)), N(!0);
|
|
917
|
+
let T = gt(t, s.draggable);
|
|
918
|
+
if (!T || si(e, w, this, C) && !T.animated) {
|
|
919
|
+
if (T === a)
|
|
920
|
+
return N(!1);
|
|
921
|
+
if (T && t === e.target && (n = T), n && (r = E(n)), Ye(
|
|
908
922
|
D,
|
|
909
923
|
t,
|
|
910
|
-
g ||
|
|
924
|
+
g || a,
|
|
911
925
|
o,
|
|
912
926
|
n,
|
|
913
927
|
r,
|
|
914
928
|
e,
|
|
915
929
|
!!n
|
|
916
930
|
) !== !1)
|
|
917
|
-
return
|
|
918
|
-
} else if (
|
|
919
|
-
let
|
|
920
|
-
if (
|
|
921
|
-
return
|
|
922
|
-
if (n =
|
|
923
|
-
return this._getPlaceholderOnMove(t, o, n, r, e, !1),
|
|
931
|
+
return oe(), this._getPlaceholderOnMove(t, o, n, r, e, !!n), T && T.nextSibling ? t.insertBefore(a, T.nextSibling) : t.appendChild(a), P = t, V(), N(!0);
|
|
932
|
+
} else if (T && li(e, w, this, C)) {
|
|
933
|
+
let M = me(t, 0, s, !0, [g]);
|
|
934
|
+
if (M === a)
|
|
935
|
+
return N(!1);
|
|
936
|
+
if (n = M, r = E(n), Ye(D, t, g || a, o, n, r, e, !1) !== !1)
|
|
937
|
+
return this._getPlaceholderOnMove(t, o, n, r, e, !1), oe(), t.insertBefore(a, M), P = t, V(), N(!0);
|
|
924
938
|
} else if (n.parentNode === t) {
|
|
925
|
-
r =
|
|
926
|
-
let
|
|
927
|
-
|
|
939
|
+
r = E(n);
|
|
940
|
+
let M = 0, j, re = a.parentNode !== t, $ = !ei(
|
|
941
|
+
a.animated && a.toRect || o,
|
|
928
942
|
n.animated && n.toRect || r,
|
|
929
|
-
|
|
930
|
-
),
|
|
931
|
-
we !== n && (
|
|
943
|
+
w
|
|
944
|
+
), De = w ? "top" : C ? "right" : "left", le = vt(n, "top", "top") || vt(a, "top", "top"), _e = le ? le.scrollTop : void 0;
|
|
945
|
+
we !== n && (j = r[De], Ne = !1, ke = !$ && s.invertSwap || re), M = ai(
|
|
932
946
|
e,
|
|
933
947
|
n,
|
|
934
948
|
r,
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
we === n
|
|
949
|
+
w,
|
|
950
|
+
$ ? 1 : s.swapThreshold,
|
|
951
|
+
s.invertedSwapThreshold == null ? s.swapThreshold : s.invertedSwapThreshold,
|
|
952
|
+
ke,
|
|
953
|
+
we === n,
|
|
954
|
+
C
|
|
940
955
|
);
|
|
941
|
-
let
|
|
942
|
-
if (
|
|
943
|
-
let
|
|
956
|
+
let J;
|
|
957
|
+
if (M !== 0) {
|
|
958
|
+
let Ce = F(a, void 0, [g]);
|
|
944
959
|
do
|
|
945
|
-
|
|
946
|
-
while (
|
|
960
|
+
Ce -= M, J = P.children[Ce];
|
|
961
|
+
while (J && (p(J, "display") === "none" || J === b));
|
|
947
962
|
}
|
|
948
|
-
if (
|
|
949
|
-
return
|
|
950
|
-
we = n,
|
|
951
|
-
let
|
|
952
|
-
|
|
953
|
-
let
|
|
963
|
+
if (M === 0 || J === n)
|
|
964
|
+
return N(!1);
|
|
965
|
+
we = n, Ae = M;
|
|
966
|
+
let H = !1;
|
|
967
|
+
H = M === 1;
|
|
968
|
+
let fe = Ye(
|
|
954
969
|
D,
|
|
955
970
|
t,
|
|
956
|
-
g ||
|
|
971
|
+
g || a,
|
|
957
972
|
o,
|
|
958
973
|
n,
|
|
959
974
|
r,
|
|
960
975
|
e,
|
|
961
|
-
|
|
976
|
+
H
|
|
962
977
|
);
|
|
963
|
-
if (
|
|
964
|
-
(
|
|
965
|
-
let
|
|
966
|
-
return
|
|
978
|
+
if (fe !== !1) {
|
|
979
|
+
(fe === 1 || fe === -1) && (H = fe === 1), ct = !0, setTimeout(ri, 30), oe(), this._getPlaceholderOnMove(t, o, n, r, e, H);
|
|
980
|
+
let Ce = n.nextElementSibling;
|
|
981
|
+
return H && !Ce ? t.appendChild(a) : n.parentNode.insertBefore(a, H ? Ce : n), le && Xt(le, 0, _e - le.scrollTop), P = a.parentNode, j !== void 0 && !ke && (Ge = Math.abs(j - E(n)[De])), V(), N(!0);
|
|
967
982
|
}
|
|
968
983
|
}
|
|
969
|
-
if (t.contains(
|
|
970
|
-
return
|
|
984
|
+
if (t.contains(a))
|
|
985
|
+
return N(!1);
|
|
971
986
|
}
|
|
972
987
|
return !1;
|
|
973
988
|
}
|
|
974
989
|
_offMoveEvents() {
|
|
975
|
-
v(document, "mousemove", this._onTouchMove), v(document, "touchmove", this._onTouchMove), v(document, "pointermove", this._onTouchMove), v(document, "dragover",
|
|
990
|
+
v(document, "mousemove", this._onTouchMove), v(document, "touchmove", this._onTouchMove), v(document, "pointermove", this._onTouchMove), v(document, "dragover", he), v(document, "mousemove", he), v(document, "touchmove", he);
|
|
976
991
|
}
|
|
977
992
|
_offUpEvents() {
|
|
978
993
|
let e = this.el.ownerDocument;
|
|
@@ -980,68 +995,68 @@ const S = class S {
|
|
|
980
995
|
}
|
|
981
996
|
_onDrop(e) {
|
|
982
997
|
let t = this.el, n = this.options;
|
|
983
|
-
if (G =
|
|
998
|
+
if (G = F(a, void 0, [g]), te = F(a, n.draggable, [g]), Y("drop", this, {
|
|
984
999
|
evt: e
|
|
985
|
-
}),
|
|
1000
|
+
}), P = a && a.parentNode, G = F(a, void 0, [g]), te = F(a, n.draggable, [g]), S.eventCanceled) {
|
|
986
1001
|
this._nulling();
|
|
987
1002
|
return;
|
|
988
1003
|
}
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
1004
|
+
ve = !1, ke = !1, Ne = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), ze(this.cloneId), ze(this._dragStartId), this.nativeDraggable && (v(document, "drop", this), v(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Pe && p(document.body, "user-select", ""), p(a, "transform", ""), e && (Ee && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), b && b.parentNode && b.parentNode.removeChild(b), (D === P || X && X.lastPutMode !== "clone") && _ && _.parentNode && _.parentNode.removeChild(_), a && (this.nativeDraggable && v(a, "dragend", this), it(a), a.style["will-change"] = "", Ee && !ve && O(
|
|
1005
|
+
a,
|
|
1006
|
+
X ? X.options.ghostClass : this.options.ghostClass,
|
|
992
1007
|
!1
|
|
993
|
-
),
|
|
1008
|
+
), O(a, this.options.chosenClass, !1), R({
|
|
994
1009
|
sortable: this,
|
|
995
1010
|
name: "unchoose",
|
|
996
|
-
toEl:
|
|
1011
|
+
toEl: P,
|
|
997
1012
|
newIndex: null,
|
|
998
1013
|
newDraggableIndex: null,
|
|
999
1014
|
originalEvent: e
|
|
1000
|
-
}), D !==
|
|
1001
|
-
rootEl:
|
|
1015
|
+
}), D !== P ? (G >= 0 && (R({
|
|
1016
|
+
rootEl: P,
|
|
1002
1017
|
name: "add",
|
|
1003
|
-
toEl:
|
|
1018
|
+
toEl: P,
|
|
1004
1019
|
fromEl: D,
|
|
1005
1020
|
originalEvent: e
|
|
1006
|
-
}),
|
|
1021
|
+
}), R({
|
|
1007
1022
|
sortable: this,
|
|
1008
1023
|
name: "remove",
|
|
1009
|
-
toEl:
|
|
1024
|
+
toEl: P,
|
|
1010
1025
|
originalEvent: e
|
|
1011
|
-
}),
|
|
1012
|
-
rootEl:
|
|
1026
|
+
}), R({
|
|
1027
|
+
rootEl: P,
|
|
1013
1028
|
name: "sort",
|
|
1014
|
-
toEl:
|
|
1029
|
+
toEl: P,
|
|
1015
1030
|
fromEl: D,
|
|
1016
1031
|
originalEvent: e
|
|
1017
|
-
}),
|
|
1032
|
+
}), R({
|
|
1018
1033
|
sortable: this,
|
|
1019
1034
|
name: "sort",
|
|
1020
|
-
toEl:
|
|
1035
|
+
toEl: P,
|
|
1021
1036
|
originalEvent: e
|
|
1022
|
-
})),
|
|
1037
|
+
})), X && X.save()) : G !== pe && G >= 0 && (R({
|
|
1023
1038
|
sortable: this,
|
|
1024
1039
|
name: "update",
|
|
1025
|
-
toEl:
|
|
1040
|
+
toEl: P,
|
|
1026
1041
|
originalEvent: e
|
|
1027
|
-
}),
|
|
1042
|
+
}), R({
|
|
1028
1043
|
sortable: this,
|
|
1029
1044
|
name: "sort",
|
|
1030
|
-
toEl:
|
|
1045
|
+
toEl: P,
|
|
1031
1046
|
originalEvent: e
|
|
1032
|
-
})), S.active && ((G == null || G === -1) && (G =
|
|
1047
|
+
})), S.active && ((G == null || G === -1) && (G = pe, te = Se), R({
|
|
1033
1048
|
sortable: this,
|
|
1034
1049
|
name: "end",
|
|
1035
|
-
toEl:
|
|
1050
|
+
toEl: P,
|
|
1036
1051
|
originalEvent: e
|
|
1037
1052
|
}), this.save()))), this._nulling();
|
|
1038
1053
|
}
|
|
1039
1054
|
_nulling() {
|
|
1040
|
-
|
|
1055
|
+
Y("nulling", this), this._removeClonedSelectedItem(), D = a = g = Be = P = b = ue = _ = He = ae = de = U = Ee = G = te = pe = Se = we = Ae = X = Le = S.dragged = S.ghost = S.clone = S.active = null;
|
|
1041
1056
|
let e = this.el;
|
|
1042
|
-
|
|
1057
|
+
qe.forEach(function(t) {
|
|
1043
1058
|
e.contains(t) && (t.checked = !0);
|
|
1044
|
-
}),
|
|
1059
|
+
}), qe.length = Je = et = 0;
|
|
1045
1060
|
}
|
|
1046
1061
|
handleEvent(e) {
|
|
1047
1062
|
switch (e.type) {
|
|
@@ -1051,7 +1066,7 @@ const S = class S {
|
|
|
1051
1066
|
break;
|
|
1052
1067
|
case "dragenter":
|
|
1053
1068
|
case "dragover":
|
|
1054
|
-
|
|
1069
|
+
a && (this._onDragOver(e), oi(e));
|
|
1055
1070
|
break;
|
|
1056
1071
|
case "selectstart":
|
|
1057
1072
|
e.preventDefault();
|
|
@@ -1065,7 +1080,7 @@ const S = class S {
|
|
|
1065
1080
|
toArray() {
|
|
1066
1081
|
let e = [], t, n = this.el.children, o = 0, r = n.length, l = this.options;
|
|
1067
1082
|
for (; o < r; o++)
|
|
1068
|
-
t = n[o],
|
|
1083
|
+
t = n[o], B(t, l.draggable, this.el, !1, [g]) && e.push(t.getAttribute(l.dataIdAttr) || ci(t));
|
|
1069
1084
|
return e;
|
|
1070
1085
|
}
|
|
1071
1086
|
/**
|
|
@@ -1075,8 +1090,8 @@ const S = class S {
|
|
|
1075
1090
|
sort(e, t) {
|
|
1076
1091
|
let n = {}, o = this.el;
|
|
1077
1092
|
this.toArray().forEach(function(r, l) {
|
|
1078
|
-
let
|
|
1079
|
-
|
|
1093
|
+
let s = o.children[l];
|
|
1094
|
+
B(s, this.options.draggable, o, !1, [g]) && (n[r] = s);
|
|
1080
1095
|
}, this), t && this.captureAnimationState(), e.forEach(function(r) {
|
|
1081
1096
|
n[r] && (o.removeChild(n[r]), o.appendChild(n[r]));
|
|
1082
1097
|
}), t && this.animateAll();
|
|
@@ -1095,7 +1110,7 @@ const S = class S {
|
|
|
1095
1110
|
* @returns {HTMLElement|null}
|
|
1096
1111
|
*/
|
|
1097
1112
|
closest(e, t) {
|
|
1098
|
-
return
|
|
1113
|
+
return B(e, t || this.options.draggable, this.el, !1, [g]);
|
|
1099
1114
|
}
|
|
1100
1115
|
/**
|
|
1101
1116
|
* Set/get option
|
|
@@ -1108,24 +1123,24 @@ const S = class S {
|
|
|
1108
1123
|
if (t === void 0)
|
|
1109
1124
|
return n[e];
|
|
1110
1125
|
{
|
|
1111
|
-
let o =
|
|
1112
|
-
typeof o < "u" ? n[e] = o : n[e] = t, e === "group" &&
|
|
1126
|
+
let o = ge.modifyOption(this, e, t);
|
|
1127
|
+
typeof o < "u" ? n[e] = o : n[e] = t, e === "group" && Tt(n);
|
|
1113
1128
|
}
|
|
1114
1129
|
}
|
|
1115
1130
|
/**
|
|
1116
1131
|
* Destroy
|
|
1117
1132
|
*/
|
|
1118
1133
|
destroy() {
|
|
1119
|
-
|
|
1134
|
+
Y("destroy", this);
|
|
1120
1135
|
let e = this.el;
|
|
1121
|
-
e[
|
|
1136
|
+
e[L] = null, v(e, "mousedown", this._onTapStart), v(e, "touchstart", this._onTapStart), v(e, "pointerdown", this._onTapStart), this.nativeDraggable && (v(e, "dragover", this), v(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(t) {
|
|
1122
1137
|
t.removeAttribute("draggable");
|
|
1123
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
1138
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), We.splice(We.indexOf(this.el), 1), this.el = e = null;
|
|
1124
1139
|
}
|
|
1125
1140
|
_hideClone() {
|
|
1126
|
-
if (!
|
|
1127
|
-
if (
|
|
1128
|
-
p(_, "display", "none"), this.options.removeCloneOnHide && _.parentNode && _.parentNode.removeChild(_),
|
|
1141
|
+
if (!ae) {
|
|
1142
|
+
if (Y("hideClone", this), S.eventCanceled) return;
|
|
1143
|
+
p(_, "display", "none"), this.options.removeCloneOnHide && (_ != null && _.parentNode) && _.parentNode.removeChild(_), ae = !0;
|
|
1129
1144
|
}
|
|
1130
1145
|
}
|
|
1131
1146
|
_showClone(e) {
|
|
@@ -1133,55 +1148,55 @@ const S = class S {
|
|
|
1133
1148
|
this._hideClone();
|
|
1134
1149
|
return;
|
|
1135
1150
|
}
|
|
1136
|
-
if (
|
|
1137
|
-
if (
|
|
1138
|
-
typeof this.options.getPlaceholder != "function" && typeof this.options.getPlaceholderOnMove != "function" && (
|
|
1151
|
+
if (ae) {
|
|
1152
|
+
if (Y("showClone", this), S.eventCanceled) return;
|
|
1153
|
+
typeof this.options.getPlaceholder != "function" && typeof this.options.getPlaceholderOnMove != "function" && (a.parentNode == D && !this.options.group.revertClone ? D.insertBefore(_, a) : ue ? D.insertBefore(_, ue) : D.appendChild(_)), this.options.group.revertClone && this.animate(a, _), p(_, "display", ""), ae = !1;
|
|
1139
1154
|
}
|
|
1140
1155
|
}
|
|
1141
1156
|
};
|
|
1142
1157
|
q(S, "utils", {
|
|
1143
|
-
on:
|
|
1158
|
+
on: y,
|
|
1144
1159
|
off: v,
|
|
1145
1160
|
css: p,
|
|
1146
|
-
find:
|
|
1161
|
+
find: st,
|
|
1147
1162
|
is: function(e, t) {
|
|
1148
|
-
return !!
|
|
1163
|
+
return !!B(e, t, e, !1, [g]);
|
|
1149
1164
|
},
|
|
1150
|
-
extend:
|
|
1151
|
-
throttle:
|
|
1152
|
-
closest:
|
|
1153
|
-
toggleClass:
|
|
1165
|
+
extend: Nt,
|
|
1166
|
+
throttle: mt,
|
|
1167
|
+
closest: B,
|
|
1168
|
+
toggleClass: O,
|
|
1154
1169
|
clone: at,
|
|
1155
|
-
index:
|
|
1156
|
-
nextTick:
|
|
1157
|
-
cancelNextTick:
|
|
1158
|
-
detectDirection:
|
|
1159
|
-
getChild:
|
|
1160
|
-
expando:
|
|
1161
|
-
}), q(S, "version",
|
|
1170
|
+
index: F,
|
|
1171
|
+
nextTick: xe,
|
|
1172
|
+
cancelNextTick: ze,
|
|
1173
|
+
detectDirection: ft,
|
|
1174
|
+
getChild: me,
|
|
1175
|
+
expando: L
|
|
1176
|
+
}), q(S, "version", Mt);
|
|
1162
1177
|
let x = S;
|
|
1163
|
-
function
|
|
1178
|
+
function oi(i) {
|
|
1164
1179
|
i.dataTransfer && (i.dataTransfer.dropEffect = "move"), i.cancelable && i.preventDefault();
|
|
1165
1180
|
}
|
|
1166
|
-
const
|
|
1167
|
-
let
|
|
1168
|
-
window.CustomEvent && !
|
|
1181
|
+
const Bt = (i, e, t, n, o, r, l, s) => {
|
|
1182
|
+
let c;
|
|
1183
|
+
window.CustomEvent && !ne && !Xe ? c = new CustomEvent("move", {
|
|
1169
1184
|
bubbles: !0,
|
|
1170
1185
|
cancelable: !0
|
|
1171
|
-
}) : (
|
|
1172
|
-
const f = i[
|
|
1186
|
+
}) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = e, c.from = i, c.dragged = t, c.draggedRect = n, c.related = o || e, c.relatedRect = r || E(e), c.willInsertAfter = s, c.originalEvent = l;
|
|
1187
|
+
const f = i[L];
|
|
1173
1188
|
if (f) {
|
|
1174
1189
|
let d = {
|
|
1175
|
-
...
|
|
1190
|
+
...ge.getEventProperties("move", f)
|
|
1176
1191
|
};
|
|
1177
1192
|
for (let h in d)
|
|
1178
|
-
|
|
1193
|
+
c[h] = d[h];
|
|
1179
1194
|
}
|
|
1180
|
-
return
|
|
1195
|
+
return c;
|
|
1181
1196
|
};
|
|
1182
|
-
function
|
|
1183
|
-
let
|
|
1184
|
-
const h =
|
|
1197
|
+
function Ye(i, e, t, n, o, r, l, s) {
|
|
1198
|
+
let c = i[L], f = c.options.onMove, d;
|
|
1199
|
+
const h = Bt(
|
|
1185
1200
|
i,
|
|
1186
1201
|
e,
|
|
1187
1202
|
t,
|
|
@@ -1189,115 +1204,120 @@ function Fe(i, e, t, n, o, r, l, a) {
|
|
|
1189
1204
|
o,
|
|
1190
1205
|
r,
|
|
1191
1206
|
l,
|
|
1192
|
-
|
|
1207
|
+
s
|
|
1193
1208
|
);
|
|
1194
|
-
return i.dispatchEvent(h), f && (d = f.call(
|
|
1209
|
+
return i.dispatchEvent(h), f && (d = f.call(c, h)), d;
|
|
1195
1210
|
}
|
|
1196
|
-
function
|
|
1211
|
+
function it(i) {
|
|
1197
1212
|
i.draggable = !1;
|
|
1198
1213
|
}
|
|
1199
|
-
function
|
|
1200
|
-
|
|
1214
|
+
function ri() {
|
|
1215
|
+
ct = !1;
|
|
1201
1216
|
}
|
|
1202
|
-
function
|
|
1203
|
-
let
|
|
1204
|
-
const
|
|
1217
|
+
function li(i, e, t, n) {
|
|
1218
|
+
let o = E(me(t.el, 0, t.options, !0, [g]));
|
|
1219
|
+
const r = Lt(
|
|
1205
1220
|
t.el,
|
|
1206
1221
|
t.options,
|
|
1207
1222
|
b,
|
|
1208
1223
|
[g]
|
|
1209
|
-
),
|
|
1210
|
-
return e ? i.clientX <
|
|
1224
|
+
), l = 10;
|
|
1225
|
+
return e ? i.clientX < r.left - l || i.clientY < o.top && i.clientX < o.right : i.clientY < r.top - l || i.clientY < o.bottom && (n ? i.clientX > o.right : i.clientX < o.left);
|
|
1211
1226
|
}
|
|
1212
|
-
function
|
|
1213
|
-
const
|
|
1227
|
+
function si(i, e, t, n) {
|
|
1228
|
+
const o = E(gt(t.el, t.options.draggable)), r = Lt(
|
|
1214
1229
|
t.el,
|
|
1215
1230
|
t.options,
|
|
1216
1231
|
b,
|
|
1217
1232
|
[g]
|
|
1218
|
-
),
|
|
1219
|
-
return e ? i.clientX >
|
|
1233
|
+
), l = 10;
|
|
1234
|
+
return e ? i.clientX > r.right + l || i.clientY > o.bottom && i.clientX > o.left : i.clientY > r.bottom + l || (n ? i.clientX < o.left && i.clientY > o.top : i.clientX > o.right && i.clientY > o.top);
|
|
1220
1235
|
}
|
|
1221
|
-
function
|
|
1222
|
-
|
|
1236
|
+
function ai(i, e, t, n, o, r, l, s, c) {
|
|
1237
|
+
const f = !n && c;
|
|
1238
|
+
let d = n ? i.clientY : i.clientX, h = n ? t.height : t.width, m = n ? t.top : f ? t.right : t.left, w = n ? t.bottom : f ? t.left : t.right, u = !1;
|
|
1239
|
+
const A = (C) => f ? -C : C;
|
|
1223
1240
|
if (!l) {
|
|
1224
|
-
if (
|
|
1225
|
-
if (!
|
|
1226
|
-
|
|
1227
|
-
else if (
|
|
1228
|
-
return -
|
|
1229
|
-
} else if (
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1241
|
+
if (s && Ge < h * o) {
|
|
1242
|
+
if (!Ne && (Ae === 1 ? d > m + h * r / 2 : d < w - h * r / 2) && (Ne = !0), Ne)
|
|
1243
|
+
u = !0;
|
|
1244
|
+
else if (Ae === 1 ? d < m + Ge : d > w - Ge)
|
|
1245
|
+
return A(-Ae);
|
|
1246
|
+
} else if (f) {
|
|
1247
|
+
if (d > w + h * (1 - o) / 2 && d < m - h * (1 - o) / 2)
|
|
1248
|
+
return Pt(e);
|
|
1249
|
+
} else if (d > m + h * (1 - o) / 2 && d < w - h * (1 - o) / 2)
|
|
1250
|
+
return Pt(e);
|
|
1251
|
+
}
|
|
1252
|
+
return u = u || l, u && (d < m + h * r / 2 || d > w - h * r / 2) ? A(d > m + h / 2 ? 1 : -1) : 0;
|
|
1233
1253
|
}
|
|
1234
|
-
function
|
|
1235
|
-
return
|
|
1254
|
+
function Pt(i) {
|
|
1255
|
+
return F(a, void 0, [g]) < F(i, void 0, [g]) ? 1 : -1;
|
|
1236
1256
|
}
|
|
1237
|
-
function
|
|
1257
|
+
function ci(i) {
|
|
1238
1258
|
let e = i.tagName + i.className + i.src + i.href + i.textContent, t = e.length, n = 0;
|
|
1239
1259
|
for (; t--; )
|
|
1240
1260
|
n += e.charCodeAt(t);
|
|
1241
1261
|
return n.toString(36);
|
|
1242
1262
|
}
|
|
1243
|
-
function
|
|
1244
|
-
|
|
1263
|
+
function fi(i) {
|
|
1264
|
+
qe.length = 0;
|
|
1245
1265
|
let e = i.getElementsByTagName("input"), t = e.length;
|
|
1246
1266
|
for (; t--; ) {
|
|
1247
1267
|
let n = e[t];
|
|
1248
|
-
n.checked &&
|
|
1268
|
+
n.checked && qe.push(n);
|
|
1249
1269
|
}
|
|
1250
1270
|
}
|
|
1251
|
-
function
|
|
1271
|
+
function xe(i) {
|
|
1252
1272
|
return setTimeout(i, 0);
|
|
1253
1273
|
}
|
|
1254
|
-
function
|
|
1274
|
+
function ze(i) {
|
|
1255
1275
|
return clearTimeout(i);
|
|
1256
1276
|
}
|
|
1257
|
-
|
|
1258
|
-
(x.active ||
|
|
1277
|
+
Ze && y(document, "touchmove", function(i) {
|
|
1278
|
+
(x.active || ve) && i.cancelable && i.preventDefault();
|
|
1259
1279
|
});
|
|
1260
1280
|
x.utils = {
|
|
1261
|
-
on:
|
|
1281
|
+
on: y,
|
|
1262
1282
|
off: v,
|
|
1263
1283
|
css: p,
|
|
1264
|
-
find:
|
|
1284
|
+
find: st,
|
|
1265
1285
|
is: function(i, e) {
|
|
1266
|
-
return !!
|
|
1286
|
+
return !!B(i, e, i, !1, [g]);
|
|
1267
1287
|
},
|
|
1268
|
-
extend:
|
|
1269
|
-
throttle:
|
|
1270
|
-
closest:
|
|
1271
|
-
toggleClass:
|
|
1288
|
+
extend: Nt,
|
|
1289
|
+
throttle: mt,
|
|
1290
|
+
closest: B,
|
|
1291
|
+
toggleClass: O,
|
|
1272
1292
|
clone: at,
|
|
1273
|
-
index:
|
|
1274
|
-
nextTick:
|
|
1275
|
-
cancelNextTick:
|
|
1276
|
-
detectDirection:
|
|
1277
|
-
getChild:
|
|
1278
|
-
expando:
|
|
1293
|
+
index: F,
|
|
1294
|
+
nextTick: xe,
|
|
1295
|
+
cancelNextTick: ze,
|
|
1296
|
+
detectDirection: ft,
|
|
1297
|
+
getChild: me,
|
|
1298
|
+
expando: L
|
|
1279
1299
|
};
|
|
1280
1300
|
x.get = function(i) {
|
|
1281
|
-
return i[
|
|
1301
|
+
return i[L];
|
|
1282
1302
|
};
|
|
1283
1303
|
x.mount = function(...i) {
|
|
1284
1304
|
i[0].constructor === Array && (i = i[0]), i.forEach((e) => {
|
|
1285
1305
|
if (!e.prototype || !e.prototype.constructor)
|
|
1286
1306
|
throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
1287
|
-
e.utils && (x.utils = { ...x.utils, ...e.utils }),
|
|
1307
|
+
e.utils && (x.utils = { ...x.utils, ...e.utils }), ge.mount(e);
|
|
1288
1308
|
});
|
|
1289
1309
|
};
|
|
1290
1310
|
x.create = function(i, e) {
|
|
1291
1311
|
return new x(i, e);
|
|
1292
1312
|
};
|
|
1293
|
-
x.version =
|
|
1294
|
-
let
|
|
1295
|
-
class
|
|
1313
|
+
x.version = Mt;
|
|
1314
|
+
let ee, Te, Re;
|
|
1315
|
+
class Ht {
|
|
1296
1316
|
static eventProperties() {
|
|
1297
1317
|
const e = {
|
|
1298
|
-
swapItem:
|
|
1318
|
+
swapItem: ee
|
|
1299
1319
|
};
|
|
1300
|
-
return
|
|
1320
|
+
return Re !== void 0 && (e.newIndex = Re), e;
|
|
1301
1321
|
}
|
|
1302
1322
|
constructor(e) {
|
|
1303
1323
|
this.sortable = e, this.options = e.options, this.defaults = {
|
|
@@ -1310,45 +1330,45 @@ class Rt {
|
|
|
1310
1330
|
this.setLastSwapEl(e);
|
|
1311
1331
|
}
|
|
1312
1332
|
getPlaceholder({ originalDragEl: e }) {
|
|
1313
|
-
|
|
1333
|
+
Te = e;
|
|
1314
1334
|
}
|
|
1315
1335
|
dragOverValid({ completed: e, target: t, onMove: n, activeSortable: o, changed: r, cancel: l }) {
|
|
1316
1336
|
if (!o.options.swap) return;
|
|
1317
|
-
let
|
|
1318
|
-
if (t && t !==
|
|
1319
|
-
let f =
|
|
1320
|
-
n(t) !== !1 ? (
|
|
1337
|
+
let s = this.sortable.el, c = this.options;
|
|
1338
|
+
if (t && t !== s) {
|
|
1339
|
+
let f = ee;
|
|
1340
|
+
n(t) !== !1 ? (O(t, c.swapClass, !0), this.setLastSwapEl(t)) : this.setLastSwapEl(null), f && f !== ee && O(f, c.swapClass, !1);
|
|
1321
1341
|
}
|
|
1322
1342
|
r(), e(!0), l();
|
|
1323
1343
|
}
|
|
1324
1344
|
setLastSwapEl(e) {
|
|
1325
|
-
|
|
1345
|
+
ee = e;
|
|
1326
1346
|
const t = e == null ? void 0 : e.parentNode;
|
|
1327
1347
|
let n = -1;
|
|
1328
|
-
t && e && typeof this.options.getPlaceholder == "function" && (n =
|
|
1348
|
+
t && e && typeof this.options.getPlaceholder == "function" && (n = F(e, this.options.draggable, [Te])), n > -1 ? Re = n : Re = void 0;
|
|
1329
1349
|
}
|
|
1330
1350
|
swapNodes(e, t, n, o) {
|
|
1331
1351
|
var r;
|
|
1332
1352
|
if (typeof n.options.getPlaceholder != "function" && typeof ((r = o == null ? void 0 : o.options) == null ? void 0 : r.getPlaceholder) != "function") {
|
|
1333
|
-
let l = e.parentNode,
|
|
1334
|
-
if (!l || !
|
|
1335
|
-
|
|
1353
|
+
let l = e.parentNode, s = t.parentNode, c, f;
|
|
1354
|
+
if (!l || !s || l.isEqualNode(t) || s.isEqualNode(e)) return;
|
|
1355
|
+
c = F(e, this.options.draggable, [Te]), f = F(t, this.options.draggable, [Te]), l.isEqualNode(s) && c < f && f++, l.insertBefore(t, l.children[c]), s.insertBefore(e, s.children[f]);
|
|
1336
1356
|
}
|
|
1337
1357
|
}
|
|
1338
1358
|
drop({ activeSortable: e, putSortable: t, dragEl: n, ...o }) {
|
|
1339
1359
|
let r = t || this.sortable, l = this.options;
|
|
1340
|
-
|
|
1360
|
+
ee && O(ee, l.swapClass, !1), ee && (l.swap || t && t.options.swap) && n !== ee && (r.captureAnimationState(), r !== e && e.captureAnimationState(), this.swapNodes(n, ee, e, t), r.animateAll(), r !== e && e.animateAll());
|
|
1341
1361
|
}
|
|
1342
1362
|
nulling() {
|
|
1343
|
-
this.setLastSwapEl(null),
|
|
1363
|
+
this.setLastSwapEl(null), Te = null;
|
|
1344
1364
|
}
|
|
1345
1365
|
}
|
|
1346
|
-
q(
|
|
1347
|
-
let se,
|
|
1348
|
-
class
|
|
1366
|
+
q(Ht, "pluginName", "swap");
|
|
1367
|
+
let se, K, W, Z;
|
|
1368
|
+
class Wt {
|
|
1349
1369
|
static eventProperties() {
|
|
1350
1370
|
const e = {};
|
|
1351
|
-
return se !== void 0 && (e.draggedTreeItemParent = se),
|
|
1371
|
+
return se !== void 0 && (e.draggedTreeItemParent = se), K !== void 0 && (e.draggedTreeItemLevel = K), W !== void 0 && (e.draggedTreeItemBefore = W), Z !== void 0 && (e.draggedTreeItemAfter = Z), e;
|
|
1352
1372
|
}
|
|
1353
1373
|
constructor(e) {
|
|
1354
1374
|
this.sortable = e, this.options = e.options, this.startX = 0, this.startLevel = 1, this.beforeElement = null;
|
|
@@ -1357,7 +1377,7 @@ class Bt {
|
|
|
1357
1377
|
this.options.tree;
|
|
1358
1378
|
}
|
|
1359
1379
|
dragStarted({ originalEvent: e, dragEl: t, originalDragEl: n, sortable: o }) {
|
|
1360
|
-
this.options.tree && (this.startX = e.clientX, this.startLevel =
|
|
1380
|
+
this.options.tree && (this.startX = e.clientX, this.startLevel = nt(n || t, this.options), K = this.startLevel, this._getDraggedTreeItemParent(t, n, o));
|
|
1361
1381
|
}
|
|
1362
1382
|
// dragOverValid({ completed, target, onMove, activeSortable, changed, cancel }) {
|
|
1363
1383
|
// if (!this.options.tree) return;
|
|
@@ -1387,7 +1407,7 @@ class Bt {
|
|
|
1387
1407
|
let o = e.previousElementSibling;
|
|
1388
1408
|
const r = this.options.treeItemLevelAttr || "data-level";
|
|
1389
1409
|
for (; o; ) {
|
|
1390
|
-
const l =
|
|
1410
|
+
const l = B(o, this.options.draggable, this.sortable.el, !1, [t]);
|
|
1391
1411
|
if (l && (typeof n == "number" && l.getAttribute(r) === n.toString() || n === void 0))
|
|
1392
1412
|
return l;
|
|
1393
1413
|
o = o.previousElementSibling;
|
|
@@ -1397,47 +1417,46 @@ class Bt {
|
|
|
1397
1417
|
_findNextSibling(e, t) {
|
|
1398
1418
|
let n = e.nextElementSibling;
|
|
1399
1419
|
for (; n; ) {
|
|
1400
|
-
const o =
|
|
1420
|
+
const o = B(n, this.options.draggable, this.sortable.el, !1, [t]);
|
|
1401
1421
|
if (o) return o;
|
|
1402
1422
|
n = n.nextElementSibling;
|
|
1403
1423
|
}
|
|
1404
1424
|
return null;
|
|
1405
1425
|
}
|
|
1406
1426
|
_getDraggedTreeItemParent(e, t, n) {
|
|
1407
|
-
se = this._findPrevSibling(e, t,
|
|
1427
|
+
se = this._findPrevSibling(e, t, K - 1) ?? n.el;
|
|
1408
1428
|
}
|
|
1409
1429
|
dragOver({
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
onMove: a,
|
|
1430
|
+
originalEvent: e,
|
|
1431
|
+
dragEl: t,
|
|
1432
|
+
originalDragEl: n,
|
|
1433
|
+
sortable: o,
|
|
1434
|
+
fromSortable: r,
|
|
1435
|
+
onMove: l,
|
|
1417
1436
|
ghostEl: s,
|
|
1418
|
-
changed:
|
|
1419
|
-
|
|
1437
|
+
changed: c,
|
|
1438
|
+
RTL: f
|
|
1420
1439
|
}) {
|
|
1421
|
-
var
|
|
1422
|
-
if (!this.options.tree
|
|
1423
|
-
const
|
|
1424
|
-
W = this._findPrevSibling(
|
|
1425
|
-
const u = W ?
|
|
1426
|
-
W && (W.level = u), Z && (Z.level =
|
|
1427
|
-
let
|
|
1428
|
-
W && Z ? (
|
|
1429
|
-
const
|
|
1430
|
-
if (
|
|
1431
|
-
this.removeDragPrent(), this.beforeElement = W,
|
|
1432
|
-
const
|
|
1433
|
-
|
|
1440
|
+
var V, T;
|
|
1441
|
+
if (!this.options.tree) return;
|
|
1442
|
+
const d = e.clientX - this.startX, h = f ? -d : d, m = this.options.treeIndentThreshold || 10, w = this.options.treeItemLevelAttr || "data-level";
|
|
1443
|
+
W = this._findPrevSibling(t, n), Z = this._findNextSibling(t, n);
|
|
1444
|
+
const u = W ? nt(W, this.options) : 1, A = Z ? nt(Z, this.options) : 1;
|
|
1445
|
+
W && (W.level = u), Z && (Z.level = A);
|
|
1446
|
+
let C = 1, z = 1;
|
|
1447
|
+
W && Z ? (C = Math.min(u + 1, A), u >= A && (C = Math.min(C, u)), z = Math.max(u + 1, A)) : Z ? C = z = 1 : (C = 1, z = u + 1);
|
|
1448
|
+
const oe = Math.floor(h / m), N = Math.max(C, Math.min(z, this.startLevel + oe));
|
|
1449
|
+
if (N !== K || this.beforeElement !== W || o !== r) {
|
|
1450
|
+
this.removeDragPrent(), this.beforeElement = W, K = N, this._getDraggedTreeItemParent(t, n, o);
|
|
1451
|
+
const M = W || Z || this.sortable.el, j = E(M);
|
|
1452
|
+
l(M, !!W) !== !1 && (n && !(typeof this.options.getPlaceholder == "function" || typeof this.options.getPlaceholderOnMove == "function") && n.setAttribute(w, K), (V = t == null ? void 0 : t.setAttribute) == null || V.call(t, w, K), (T = s == null ? void 0 : s.setAttribute) == null || T.call(s, w, K), N > 1 && se && se.setAttribute("data-drag-parent", "true"), this.sortable._getPlaceholderOnMove(
|
|
1434
1453
|
this.sortable.el,
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1454
|
+
E(t),
|
|
1455
|
+
M,
|
|
1456
|
+
j,
|
|
1457
|
+
e,
|
|
1439
1458
|
!!W
|
|
1440
|
-
),
|
|
1459
|
+
), c());
|
|
1441
1460
|
}
|
|
1442
1461
|
}
|
|
1443
1462
|
drop(e) {
|
|
@@ -1447,16 +1466,16 @@ class Bt {
|
|
|
1447
1466
|
se && se.removeAttribute("data-drag-parent"), se = null;
|
|
1448
1467
|
}
|
|
1449
1468
|
nulling() {
|
|
1450
|
-
this.removeDragPrent(), this.startX = 0, this.startLevel = 1,
|
|
1469
|
+
this.removeDragPrent(), this.startX = 0, this.startLevel = 1, K = W = Z = void 0;
|
|
1451
1470
|
}
|
|
1452
1471
|
}
|
|
1453
|
-
q(
|
|
1454
|
-
function
|
|
1472
|
+
q(Wt, "pluginName", "tree");
|
|
1473
|
+
function nt(i, e) {
|
|
1455
1474
|
const t = e.treeItemLevelAttr || "data-level";
|
|
1456
1475
|
return parseInt(i.getAttribute(t)) || 1;
|
|
1457
1476
|
}
|
|
1458
|
-
let
|
|
1459
|
-
class
|
|
1477
|
+
let Et;
|
|
1478
|
+
class Gt {
|
|
1460
1479
|
constructor(e) {
|
|
1461
1480
|
q(this, "startIndex", null);
|
|
1462
1481
|
this.sortable = e, this.options = e.options;
|
|
@@ -1465,11 +1484,11 @@ class Ht {
|
|
|
1465
1484
|
this.startIndex = e;
|
|
1466
1485
|
}
|
|
1467
1486
|
getPlaceholder({ originalDragEl: e }) {
|
|
1468
|
-
|
|
1487
|
+
Et = e;
|
|
1469
1488
|
}
|
|
1470
1489
|
onSpill({ dragEl: e, putSortable: t }) {
|
|
1471
1490
|
this.sortable.captureAnimationState(), t && t.captureAnimationState();
|
|
1472
|
-
let n =
|
|
1491
|
+
let n = me(this.sortable.el, this.startIndex, this.options, [Et]);
|
|
1473
1492
|
n ? this.sortable.el.insertBefore(e, n) : this.sortable.el.appendChild(e), this.sortable.animateAll(), t && t.animateAll();
|
|
1474
1493
|
}
|
|
1475
1494
|
drop({
|
|
@@ -1479,17 +1498,17 @@ class Ht {
|
|
|
1479
1498
|
activeSortable: o,
|
|
1480
1499
|
dispatchSortableEvent: r,
|
|
1481
1500
|
hideGhostForTarget: l,
|
|
1482
|
-
unhideGhostForTarget:
|
|
1501
|
+
unhideGhostForTarget: s
|
|
1483
1502
|
}) {
|
|
1484
1503
|
if (!e) return;
|
|
1485
|
-
let
|
|
1504
|
+
let c = t || o;
|
|
1486
1505
|
l();
|
|
1487
1506
|
let f = e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e, d = document.elementFromPoint(f.clientX, f.clientY);
|
|
1488
|
-
|
|
1507
|
+
s(), c && !c.el.contains(d) && (r("spill"), this.onSpill({ dragEl: n, putSortable: t }));
|
|
1489
1508
|
}
|
|
1490
1509
|
}
|
|
1491
|
-
q(
|
|
1492
|
-
class
|
|
1510
|
+
q(Gt, "pluginName", "revertOnSpill");
|
|
1511
|
+
class zt {
|
|
1493
1512
|
constructor(e) {
|
|
1494
1513
|
this.sortable = e, this.options = e.options;
|
|
1495
1514
|
}
|
|
@@ -1504,18 +1523,18 @@ class Wt {
|
|
|
1504
1523
|
activeSortable: o,
|
|
1505
1524
|
dispatchSortableEvent: r,
|
|
1506
1525
|
hideGhostForTarget: l,
|
|
1507
|
-
unhideGhostForTarget:
|
|
1526
|
+
unhideGhostForTarget: s
|
|
1508
1527
|
}) {
|
|
1509
1528
|
if (!e) return;
|
|
1510
|
-
let
|
|
1529
|
+
let c = t || o;
|
|
1511
1530
|
l();
|
|
1512
1531
|
let f = e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e, d = document.elementFromPoint(f.clientX, f.clientY);
|
|
1513
|
-
|
|
1532
|
+
s(), c && !c.el.contains(d) && (r("spill"), this.onSpill({ dragEl: n, putSortable: t }));
|
|
1514
1533
|
}
|
|
1515
1534
|
}
|
|
1516
|
-
q(
|
|
1517
|
-
let
|
|
1518
|
-
class
|
|
1535
|
+
q(zt, "pluginName", "removeOnSpill");
|
|
1536
|
+
let I = [], Me, dt, ht = !1, ot, rt, Ue, Ie;
|
|
1537
|
+
class ut {
|
|
1519
1538
|
constructor(e) {
|
|
1520
1539
|
this.sortable = e, this.options = e.options, this.defaults = {
|
|
1521
1540
|
scroll: !0,
|
|
@@ -1528,69 +1547,69 @@ class ht {
|
|
|
1528
1547
|
t.charAt(0) === "_" && typeof this[t] == "function" && (this[t] = this[t].bind(this));
|
|
1529
1548
|
}
|
|
1530
1549
|
dragStarted({ originalEvent: e }) {
|
|
1531
|
-
this.sortable.nativeDraggable ?
|
|
1550
|
+
this.sortable.nativeDraggable ? y(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? y(document, "pointermove", this._handleFallbackAutoScroll) : e.touches ? y(document, "touchmove", this._handleFallbackAutoScroll) : y(document, "mousemove", this._handleFallbackAutoScroll);
|
|
1532
1551
|
}
|
|
1533
1552
|
dragOverCompleted({ originalEvent: e }) {
|
|
1534
1553
|
!this.options.dragOverBubble && !e.rootEl && this._handleAutoScroll(e);
|
|
1535
1554
|
}
|
|
1536
1555
|
drop() {
|
|
1537
|
-
this.sortable.nativeDraggable ? v(document, "dragover", this._handleAutoScroll) : (v(document, "pointermove", this._handleFallbackAutoScroll), v(document, "touchmove", this._handleFallbackAutoScroll), v(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
1556
|
+
this.sortable.nativeDraggable ? v(document, "dragover", this._handleAutoScroll) : (v(document, "pointermove", this._handleFallbackAutoScroll), v(document, "touchmove", this._handleFallbackAutoScroll), v(document, "mousemove", this._handleFallbackAutoScroll)), xt(), $e(), qt();
|
|
1538
1557
|
}
|
|
1539
1558
|
nulling() {
|
|
1540
|
-
|
|
1559
|
+
Ue = dt = Me = ht = Ie = ot = rt = null, I.length = 0;
|
|
1541
1560
|
}
|
|
1542
1561
|
_handleFallbackAutoScroll(e) {
|
|
1543
1562
|
this._handleAutoScroll(e, !0);
|
|
1544
1563
|
}
|
|
1545
1564
|
_handleAutoScroll(e, t) {
|
|
1546
1565
|
const n = (e.touches ? e.touches[0] : e).clientX, o = (e.touches ? e.touches[0] : e).clientY, r = document.elementFromPoint(n, o);
|
|
1547
|
-
if (
|
|
1548
|
-
|
|
1549
|
-
let l =
|
|
1550
|
-
|
|
1551
|
-
let
|
|
1552
|
-
|
|
1553
|
-
}, 10),
|
|
1566
|
+
if (Ue = e, t || this.options.forceAutoScrollFallback || Xe || ne || Pe) {
|
|
1567
|
+
lt(e, this.options, r, t);
|
|
1568
|
+
let l = ce(r, !0);
|
|
1569
|
+
ht && (!Ie || n !== ot || o !== rt) && (Ie && xt(), Ie = setInterval(() => {
|
|
1570
|
+
let s = ce(document.elementFromPoint(n, o), !0);
|
|
1571
|
+
s !== l && (l = s, $e()), lt(e, this.options, s, t);
|
|
1572
|
+
}, 10), ot = n, rt = o);
|
|
1554
1573
|
} else {
|
|
1555
|
-
if (!this.options.bubbleScroll ||
|
|
1556
|
-
|
|
1574
|
+
if (!this.options.bubbleScroll || ce(r, !0) === Q()) {
|
|
1575
|
+
$e();
|
|
1557
1576
|
return;
|
|
1558
1577
|
}
|
|
1559
|
-
|
|
1578
|
+
lt(e, this.options, ce(r, !1), !1);
|
|
1560
1579
|
}
|
|
1561
1580
|
}
|
|
1562
1581
|
}
|
|
1563
|
-
q(
|
|
1564
|
-
function
|
|
1565
|
-
|
|
1582
|
+
q(ut, "pluginName", "scroll"), q(ut, "initializeByDefault", !0);
|
|
1583
|
+
function $e() {
|
|
1584
|
+
I.forEach(function(i) {
|
|
1566
1585
|
clearInterval(i.pid);
|
|
1567
|
-
}),
|
|
1586
|
+
}), I = [];
|
|
1568
1587
|
}
|
|
1569
|
-
function
|
|
1570
|
-
clearInterval(
|
|
1588
|
+
function xt() {
|
|
1589
|
+
clearInterval(Ie);
|
|
1571
1590
|
}
|
|
1572
|
-
const
|
|
1591
|
+
const lt = mt(function(i, e, t, n) {
|
|
1573
1592
|
if (!e.scroll) return;
|
|
1574
|
-
const o = (i.touches ? i.touches[0] : i).clientX, r = (i.touches ? i.touches[0] : i).clientY, l = e.scrollSensitivity,
|
|
1593
|
+
const o = (i.touches ? i.touches[0] : i).clientX, r = (i.touches ? i.touches[0] : i).clientY, l = e.scrollSensitivity, s = e.scrollSpeed, c = Q();
|
|
1575
1594
|
let f = !1, d;
|
|
1576
|
-
|
|
1577
|
-
let h = 0, m =
|
|
1595
|
+
dt !== t && (dt = t, $e(), Me = e.scroll, d = e.scrollFn, Me === !0 && (Me = ce(t, !0)));
|
|
1596
|
+
let h = 0, m = Me;
|
|
1578
1597
|
do {
|
|
1579
|
-
let
|
|
1580
|
-
|
|
1581
|
-
let
|
|
1582
|
-
if (!
|
|
1583
|
-
for (let
|
|
1584
|
-
|
|
1585
|
-
(
|
|
1586
|
-
n && this.layer === 0 && x.active._onTouchMove(
|
|
1587
|
-
let
|
|
1588
|
-
typeof d == "function" && d.call(x.dragged.parentNode[
|
|
1598
|
+
let w = m, u = E(w), A = u.top, C = u.bottom, z = u.left, oe = u.right, N = u.width, V = u.height, T, M, j = w.scrollWidth, re = w.scrollHeight, $ = p(w), De = w.scrollLeft, le = w.scrollTop;
|
|
1599
|
+
w === c ? (T = N < j && ($.overflowX === "auto" || $.overflowX === "scroll" || $.overflowX === "visible"), M = V < re && ($.overflowY === "auto" || $.overflowY === "scroll" || $.overflowY === "visible")) : (T = N < j && ($.overflowX === "auto" || $.overflowX === "scroll"), M = V < re && ($.overflowY === "auto" || $.overflowY === "scroll"));
|
|
1600
|
+
let _e = T && (Math.abs(oe - o) <= l && De + N < j) - (Math.abs(z - o) <= l && !!De), J = M && (Math.abs(C - r) <= l && le + V < re) - (Math.abs(A - r) <= l && !!le);
|
|
1601
|
+
if (!I[h])
|
|
1602
|
+
for (let H = 0; H <= h; H++)
|
|
1603
|
+
I[H] || (I[H] = {});
|
|
1604
|
+
(I[h].vx != _e || I[h].vy != J || I[h].el !== w) && (I[h].el = w, I[h].vx = _e, I[h].vy = J, clearInterval(I[h].pid), (_e != 0 || J != 0) && (f = !0, I[h].pid = setInterval((function() {
|
|
1605
|
+
n && this.layer === 0 && x.active._onTouchMove(Ue);
|
|
1606
|
+
let H = I[this.layer].vy ? I[this.layer].vy * s : 0, fe = I[this.layer].vx ? I[this.layer].vx * s : 0;
|
|
1607
|
+
typeof d == "function" && d.call(x.dragged.parentNode[L], fe, H, i, Ue, I[this.layer].el) !== "continue" || Xt(I[this.layer].el, fe, H);
|
|
1589
1608
|
}).bind({ layer: h }), 24))), h++;
|
|
1590
|
-
} while (e.bubbleScroll && m !==
|
|
1591
|
-
|
|
1609
|
+
} while (e.bubbleScroll && m !== c && (m = ce(m, !1)));
|
|
1610
|
+
ht = f;
|
|
1592
1611
|
}, 30);
|
|
1593
|
-
x.mount(
|
|
1612
|
+
x.mount(ut, zt, Gt, Wt, Ht);
|
|
1594
1613
|
export {
|
|
1595
1614
|
x as default
|
|
1596
1615
|
};
|