cc1-form 1.3.7 → 1.3.8

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