@ianicdev/datatables2 0.10.6 → 0.10.7

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.
Files changed (46) hide show
  1. package/dist/{Columns-BNLjDwAl.cjs → Columns-BQBgwIE4.cjs} +1 -1
  2. package/dist/{Columns--EhzKJV3.js → Columns-CeOoSZPT.js} +1 -1
  3. package/dist/{Comparison-DBF0E27s.cjs → Comparison-TwSFYOo8.cjs} +1 -1
  4. package/dist/{Comparison-DMqunDhb.js → Comparison-w8X0sSEz.js} +6 -6
  5. package/dist/Datepicker-Bfg7S8gY.cjs +2 -0
  6. package/dist/Datepicker-DZj1h3YE.js +1425 -0
  7. package/dist/{Download-Y-QC-KIB.cjs → Download-CtOrEQa0.cjs} +1 -1
  8. package/dist/{Download-CRJDmReD.js → Download-h5jMMWzV.js} +3 -3
  9. package/dist/{Options-DMKsbXSj.js → Options-Cf8cNif9.js} +1 -1
  10. package/dist/{Options-CN0OjNlD.cjs → Options-DgUkT0h1.cjs} +1 -1
  11. package/dist/{RefreshTable-CefzM07a.js → RefreshTable-B5qFMtYy.js} +2 -2
  12. package/dist/{RefreshTable-CvDVCIEq.cjs → RefreshTable-CyPzzQ1S.cjs} +1 -1
  13. package/dist/{Search-DOLfmfAx.js → Search--1ntexbx.js} +2 -2
  14. package/dist/{Search-DciGQPJD.cjs → Search-YN4Jt4eC.cjs} +1 -1
  15. package/dist/{Table-BbH9gyVI.js → Table-5pQ_bwxC.js} +3 -3
  16. package/dist/{Table-C8PPf5h-.cjs → Table-WgtgmVfz.cjs} +1 -1
  17. package/dist/{TableServer--L2K6EH_.cjs → TableServer-7AzrveN2.cjs} +1 -1
  18. package/dist/{TableServer-_BIBoBr0.js → TableServer-Bewaghu8.js} +3 -3
  19. package/dist/{cellRender-Cc2BuKK6.js → cellRender-Cy88VFEF.js} +451 -452
  20. package/dist/cellRender-kbJfFjXc.cjs +1 -0
  21. package/dist/{dataTables-sTblyiQt.js → dataTables-ej1IEGzo.js} +1385 -1388
  22. package/dist/dataTables-z7fPX2Wi.cjs +4 -0
  23. package/dist/datatables.cjs +1 -1
  24. package/dist/datatables.js +1 -1
  25. package/dist/html2canvas.esm-B5qzocYs.cjs +5 -0
  26. package/dist/{html2canvas.esm-DQ00cQCm.js → html2canvas.esm-BWVIUcAF.js} +5 -55
  27. package/dist/{index-DH0TEy1G.js → index-C3S1kkaI.js} +2 -2
  28. package/dist/index-CiJ4XY6g.cjs +1 -0
  29. package/dist/index-DfPhvU77.js +5865 -0
  30. package/dist/{index-XHj8Ffjf.cjs → index-EmvtFwx8.cjs} +1 -1
  31. package/dist/{index.es-BH0LP-1n.cjs → index.es-BtDW7HTQ.cjs} +1 -1
  32. package/dist/{index.es-C0t9o23l.js → index.es-Bv6Mb9BC.js} +2 -2
  33. package/dist/{jspdf-CZAMs0JY.cjs → jspdf-BsORS480.cjs} +2 -2
  34. package/dist/{jspdf-DbVrl9ga.js → jspdf-D9i2dan7.js} +2 -2
  35. package/dist/{xlsx-BiH37OJz.cjs → xlsx-D4qEY9Uo.cjs} +5 -5
  36. package/dist/{xlsx-Beik4N2o.js → xlsx-VYa4XHDj.js} +8 -48
  37. package/package.json +12 -12
  38. package/dist/Datepicker-DSIbxyvl.cjs +0 -2
  39. package/dist/Datepicker-DTHZOdYd.js +0 -1411
  40. package/dist/cellRender-BPm3BB9S.cjs +0 -1
  41. package/dist/dataTables-C-WYkByZ.cjs +0 -4
  42. package/dist/html2canvas.esm-CNmnTSlr.cjs +0 -5
  43. package/dist/index-DUKjDmN_.js +0 -4575
  44. package/dist/index-Ddgg9-AG.cjs +0 -1
  45. package/dist/sortablejs-C0WJhxmJ.js +0 -1254
  46. package/dist/sortablejs-Da6TYh39.cjs +0 -1
@@ -1,1254 +0,0 @@
1
- function se(o, t) {
2
- var e = Object.keys(o);
3
- if (Object.getOwnPropertySymbols) {
4
- var n = Object.getOwnPropertySymbols(o);
5
- t && (n = n.filter(function(i) {
6
- return Object.getOwnPropertyDescriptor(o, i).enumerable;
7
- })), e.push.apply(e, n);
8
- }
9
- return e;
10
- }
11
- function z(o) {
12
- for (var t = 1; t < arguments.length; t++) {
13
- var e = arguments[t] != null ? arguments[t] : {};
14
- t % 2 ? se(Object(e), !0).forEach(function(n) {
15
- Me(o, n, e[n]);
16
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(e)) : se(Object(e)).forEach(function(n) {
17
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(e, n));
18
- });
19
- }
20
- return o;
21
- }
22
- function Mt(o) {
23
- "@babel/helpers - typeof";
24
- return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Mt = function(t) {
25
- return typeof t;
26
- } : Mt = function(t) {
27
- return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
28
- }, Mt(o);
29
- }
30
- function Me(o, t, e) {
31
- return t in o ? Object.defineProperty(o, t, {
32
- value: e,
33
- enumerable: !0,
34
- configurable: !0,
35
- writable: !0
36
- }) : o[t] = e, o;
37
- }
38
- function q() {
39
- return q = Object.assign || function(o) {
40
- for (var t = 1; t < arguments.length; t++) {
41
- var e = arguments[t];
42
- for (var n in e)
43
- Object.prototype.hasOwnProperty.call(e, n) && (o[n] = e[n]);
44
- }
45
- return o;
46
- }, q.apply(this, arguments);
47
- }
48
- function Fe(o, t) {
49
- if (o == null) return {};
50
- var e = {}, n = Object.keys(o), i, r;
51
- for (r = 0; r < n.length; r++)
52
- i = n[r], !(t.indexOf(i) >= 0) && (e[i] = o[i]);
53
- return e;
54
- }
55
- function Re(o, t) {
56
- if (o == null) return {};
57
- var e = Fe(o, t), n, i;
58
- if (Object.getOwnPropertySymbols) {
59
- var r = Object.getOwnPropertySymbols(o);
60
- for (i = 0; i < r.length; i++)
61
- n = r[i], !(t.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(o, n) && (e[n] = o[n]);
62
- }
63
- return e;
64
- }
65
- var Xe = "1.15.6";
66
- function U(o) {
67
- if (typeof window < "u" && window.navigator)
68
- return !!/* @__PURE__ */ navigator.userAgent.match(o);
69
- }
70
- var V = U(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Ct = U(/Edge/i), ue = U(/firefox/i), wt = U(/safari/i) && !U(/chrome/i) && !U(/android/i), oe = U(/iP(ad|od|hone)/i), ve = U(/chrome/i) && U(/android/i), be = {
71
- capture: !1,
72
- passive: !1
73
- };
74
- function v(o, t, e) {
75
- o.addEventListener(t, e, !V && be);
76
- }
77
- function m(o, t, e) {
78
- o.removeEventListener(t, e, !V && be);
79
- }
80
- function kt(o, t) {
81
- if (t) {
82
- if (t[0] === ">" && (t = t.substring(1)), o)
83
- try {
84
- if (o.matches)
85
- return o.matches(t);
86
- if (o.msMatchesSelector)
87
- return o.msMatchesSelector(t);
88
- if (o.webkitMatchesSelector)
89
- return o.webkitMatchesSelector(t);
90
- } catch {
91
- return !1;
92
- }
93
- return !1;
94
- }
95
- }
96
- function Ee(o) {
97
- return o.host && o !== document && o.host.nodeType ? o.host : o.parentNode;
98
- }
99
- function W(o, t, e, n) {
100
- if (o) {
101
- e = e || document;
102
- do {
103
- if (t != null && (t[0] === ">" ? o.parentNode === e && kt(o, t) : kt(o, t)) || n && o === e)
104
- return o;
105
- if (o === e) break;
106
- } while (o = Ee(o));
107
- }
108
- return null;
109
- }
110
- var fe = /\s+/g;
111
- function R(o, t, e) {
112
- if (o && t)
113
- if (o.classList)
114
- o.classList[e ? "add" : "remove"](t);
115
- else {
116
- var n = (" " + o.className + " ").replace(fe, " ").replace(" " + t + " ", " ");
117
- o.className = (n + (e ? " " + t : "")).replace(fe, " ");
118
- }
119
- }
120
- function h(o, t, e) {
121
- var n = o && o.style;
122
- if (n) {
123
- if (e === void 0)
124
- return document.defaultView && document.defaultView.getComputedStyle ? e = document.defaultView.getComputedStyle(o, "") : o.currentStyle && (e = o.currentStyle), t === void 0 ? e : e[t];
125
- !(t in n) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), n[t] = e + (typeof e == "string" ? "" : "px");
126
- }
127
- }
128
- function ct(o, t) {
129
- var e = "";
130
- if (typeof o == "string")
131
- e = o;
132
- else
133
- do {
134
- var n = h(o, "transform");
135
- n && n !== "none" && (e = n + " " + e);
136
- } while (!t && (o = o.parentNode));
137
- var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
138
- return i && new i(e);
139
- }
140
- function ye(o, t, e) {
141
- if (o) {
142
- var n = o.getElementsByTagName(t), i = 0, r = n.length;
143
- if (e)
144
- for (; i < r; i++)
145
- e(n[i], i);
146
- return n;
147
- }
148
- return [];
149
- }
150
- function L() {
151
- var o = document.scrollingElement;
152
- return o || document.documentElement;
153
- }
154
- function C(o, t, e, n, i) {
155
- if (!(!o.getBoundingClientRect && o !== window)) {
156
- var r, a, l, s, u, d, c;
157
- if (o !== window && o.parentNode && o !== L() ? (r = o.getBoundingClientRect(), a = r.top, l = r.left, s = r.bottom, u = r.right, d = r.height, c = r.width) : (a = 0, l = 0, s = window.innerHeight, u = window.innerWidth, d = window.innerHeight, c = window.innerWidth), (t || e) && o !== window && (i = i || o.parentNode, !V))
158
- do
159
- if (i && i.getBoundingClientRect && (h(i, "transform") !== "none" || e && h(i, "position") !== "static")) {
160
- var b = i.getBoundingClientRect();
161
- a -= b.top + parseInt(h(i, "border-top-width")), l -= b.left + parseInt(h(i, "border-left-width")), s = a + r.height, u = l + r.width;
162
- break;
163
- }
164
- while (i = i.parentNode);
165
- if (n && o !== window) {
166
- var w = ct(i || o), E = w && w.a, y = w && w.d;
167
- w && (a /= y, l /= E, c /= E, d /= y, s = a + d, u = l + c);
168
- }
169
- return {
170
- top: a,
171
- left: l,
172
- bottom: s,
173
- right: u,
174
- width: c,
175
- height: d
176
- };
177
- }
178
- }
179
- function ce(o, t, e) {
180
- for (var n = tt(o, !0), i = C(o)[t]; n; ) {
181
- var r = C(n)[e], a = void 0;
182
- if (a = i >= r, !a) return n;
183
- if (n === L()) break;
184
- n = tt(n, !1);
185
- }
186
- return !1;
187
- }
188
- function dt(o, t, e, n) {
189
- for (var i = 0, r = 0, a = o.children; r < a.length; ) {
190
- if (a[r].style.display !== "none" && a[r] !== p.ghost && (n || a[r] !== p.dragged) && W(a[r], e.draggable, o, !1)) {
191
- if (i === t)
192
- return a[r];
193
- i++;
194
- }
195
- r++;
196
- }
197
- return null;
198
- }
199
- function ie(o, t) {
200
- for (var e = o.lastElementChild; e && (e === p.ghost || h(e, "display") === "none" || t && !kt(e, t)); )
201
- e = e.previousElementSibling;
202
- return e || null;
203
- }
204
- function Y(o, t) {
205
- var e = 0;
206
- if (!o || !o.parentNode)
207
- return -1;
208
- for (; o = o.previousElementSibling; )
209
- o.nodeName.toUpperCase() !== "TEMPLATE" && o !== p.clone && (!t || kt(o, t)) && e++;
210
- return e;
211
- }
212
- function de(o) {
213
- var t = 0, e = 0, n = L();
214
- if (o)
215
- do {
216
- var i = ct(o), r = i.a, a = i.d;
217
- t += o.scrollLeft * r, e += o.scrollTop * a;
218
- } while (o !== n && (o = o.parentNode));
219
- return [t, e];
220
- }
221
- function Ye(o, t) {
222
- for (var e in o)
223
- if (o.hasOwnProperty(e)) {
224
- for (var n in t)
225
- if (t.hasOwnProperty(n) && t[n] === o[e][n]) return Number(e);
226
- }
227
- return -1;
228
- }
229
- function tt(o, t) {
230
- if (!o || !o.getBoundingClientRect) return L();
231
- var e = o, n = !1;
232
- do
233
- if (e.clientWidth < e.scrollWidth || e.clientHeight < e.scrollHeight) {
234
- var i = h(e);
235
- if (e.clientWidth < e.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || e.clientHeight < e.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
236
- if (!e.getBoundingClientRect || e === document.body) return L();
237
- if (n || t) return e;
238
- n = !0;
239
- }
240
- }
241
- while (e = e.parentNode);
242
- return L();
243
- }
244
- function ke(o, t) {
245
- if (o && t)
246
- for (var e in t)
247
- t.hasOwnProperty(e) && (o[e] = t[e]);
248
- return o;
249
- }
250
- function zt(o, t) {
251
- 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);
252
- }
253
- var _t;
254
- function we(o, t) {
255
- return function() {
256
- if (!_t) {
257
- var e = arguments, n = this;
258
- e.length === 1 ? o.call(n, e[0]) : o.apply(n, e), _t = setTimeout(function() {
259
- _t = void 0;
260
- }, t);
261
- }
262
- };
263
- }
264
- function Be() {
265
- clearTimeout(_t), _t = void 0;
266
- }
267
- function _e(o, t, e) {
268
- o.scrollLeft += t, o.scrollTop += e;
269
- }
270
- function De(o) {
271
- var t = window.Polymer, e = window.jQuery || window.Zepto;
272
- return t && t.dom ? t.dom(o).cloneNode(!0) : e ? e(o).clone(!0)[0] : o.cloneNode(!0);
273
- }
274
- function Se(o, t, e) {
275
- var n = {};
276
- return Array.from(o.children).forEach(function(i) {
277
- var r, a, l, s;
278
- if (!(!W(i, t.draggable, o, !1) || i.animated || i === e)) {
279
- var u = C(i);
280
- 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);
281
- }
282
- }), n.width = n.right - n.left, n.height = n.bottom - n.top, n.x = n.left, n.y = n.top, n;
283
- }
284
- var N = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
285
- function He() {
286
- var o = [], t;
287
- return {
288
- captureAnimationState: function() {
289
- if (o = [], !!this.options.animation) {
290
- var n = [].slice.call(this.el.children);
291
- n.forEach(function(i) {
292
- if (!(h(i, "display") === "none" || i === p.ghost)) {
293
- o.push({
294
- target: i,
295
- rect: C(i)
296
- });
297
- var r = z({}, o[o.length - 1].rect);
298
- if (i.thisAnimationDuration) {
299
- var a = ct(i, !0);
300
- a && (r.top -= a.f, r.left -= a.e);
301
- }
302
- i.fromRect = r;
303
- }
304
- });
305
- }
306
- },
307
- addAnimationState: function(n) {
308
- o.push(n);
309
- },
310
- removeAnimationState: function(n) {
311
- o.splice(Ye(o, {
312
- target: n
313
- }), 1);
314
- },
315
- animateAll: function(n) {
316
- var i = this;
317
- if (!this.options.animation) {
318
- clearTimeout(t), typeof n == "function" && n();
319
- return;
320
- }
321
- var r = !1, a = 0;
322
- o.forEach(function(l) {
323
- var s = 0, u = l.target, d = u.fromRect, c = C(u), b = u.prevFromRect, w = u.prevToRect, E = l.rect, y = ct(u, !0);
324
- y && (c.top -= y.f, c.left -= y.e), u.toRect = c, u.thisAnimationDuration && zt(b, c) && !zt(d, c) && // Make sure animatingRect is on line between toRect & fromRect
325
- (E.top - c.top) / (E.left - c.left) === (d.top - c.top) / (d.left - c.left) && (s = Ge(E, b, w, i.options)), zt(c, d) || (u.prevFromRect = d, u.prevToRect = c, s || (s = i.options.animation), i.animate(u, E, c, s)), s && (r = !0, a = Math.max(a, s), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() {
326
- u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;
327
- }, s), u.thisAnimationDuration = s);
328
- }), clearTimeout(t), r ? t = setTimeout(function() {
329
- typeof n == "function" && n();
330
- }, a) : typeof n == "function" && n(), o = [];
331
- },
332
- animate: function(n, i, r, a) {
333
- if (a) {
334
- h(n, "transition", ""), h(n, "transform", "");
335
- var l = ct(this.el), s = l && l.a, u = l && l.d, d = (i.left - r.left) / (s || 1), c = (i.top - r.top) / (u || 1);
336
- n.animatingX = !!d, n.animatingY = !!c, h(n, "transform", "translate3d(" + d + "px," + c + "px,0)"), this.forRepaintDummy = We(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() {
337
- h(n, "transition", ""), h(n, "transform", ""), n.animated = !1, n.animatingX = !1, n.animatingY = !1;
338
- }, a);
339
- }
340
- }
341
- };
342
- }
343
- function We(o) {
344
- return o.offsetWidth;
345
- }
346
- function Ge(o, t, e, n) {
347
- 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;
348
- }
349
- var lt = [], jt = {
350
- initializeByDefault: !0
351
- }, Ot = {
352
- mount: function(t) {
353
- for (var e in jt)
354
- jt.hasOwnProperty(e) && !(e in t) && (t[e] = jt[e]);
355
- lt.forEach(function(n) {
356
- if (n.pluginName === t.pluginName)
357
- throw "Sortable: Cannot mount plugin ".concat(t.pluginName, " more than once");
358
- }), lt.push(t);
359
- },
360
- pluginEvent: function(t, e, n) {
361
- var i = this;
362
- this.eventCanceled = !1, n.cancel = function() {
363
- i.eventCanceled = !0;
364
- };
365
- var r = t + "Global";
366
- lt.forEach(function(a) {
367
- e[a.pluginName] && (e[a.pluginName][r] && e[a.pluginName][r](z({
368
- sortable: e
369
- }, n)), e.options[a.pluginName] && e[a.pluginName][t] && e[a.pluginName][t](z({
370
- sortable: e
371
- }, n)));
372
- });
373
- },
374
- initializePlugins: function(t, e, n, i) {
375
- lt.forEach(function(l) {
376
- var s = l.pluginName;
377
- if (!(!t.options[s] && !l.initializeByDefault)) {
378
- var u = new l(t, e, t.options);
379
- u.sortable = t, u.options = t.options, t[s] = u, q(n, u.defaults);
380
- }
381
- });
382
- for (var r in t.options)
383
- if (t.options.hasOwnProperty(r)) {
384
- var a = this.modifyOption(t, r, t.options[r]);
385
- typeof a < "u" && (t.options[r] = a);
386
- }
387
- },
388
- getEventProperties: function(t, e) {
389
- var n = {};
390
- return lt.forEach(function(i) {
391
- typeof i.eventProperties == "function" && q(n, i.eventProperties.call(e[i.pluginName], t));
392
- }), n;
393
- },
394
- modifyOption: function(t, e, n) {
395
- var i;
396
- return lt.forEach(function(r) {
397
- t[r.pluginName] && r.optionListeners && typeof r.optionListeners[e] == "function" && (i = r.optionListeners[e].call(t[r.pluginName], n));
398
- }), i;
399
- }
400
- };
401
- function Le(o) {
402
- 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, c = o.newDraggableIndex, b = o.originalEvent, w = o.putSortable, E = o.extraEventProperties;
403
- if (t = t || e && e[N], !!t) {
404
- var y, k = t.options, j = "on" + n.charAt(0).toUpperCase() + n.substr(1);
405
- window.CustomEvent && !V && !Ct ? y = new CustomEvent(n, {
406
- bubbles: !0,
407
- cancelable: !0
408
- }) : (y = document.createEvent("Event"), y.initEvent(n, !0, !0)), y.to = a || e, y.from = l || e, y.item = i || e, y.clone = r, y.oldIndex = s, y.newIndex = u, y.oldDraggableIndex = d, y.newDraggableIndex = c, y.originalEvent = b, y.pullMode = w ? w.lastPutMode : void 0;
409
- var A = z(z({}, E), Ot.getEventProperties(n, t));
410
- for (var B in A)
411
- y[B] = A[B];
412
- e && e.dispatchEvent(y), k[j] && k[j].call(t, y);
413
- }
414
- }
415
- var ze = ["evt"], x = function(t, e) {
416
- var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = n.evt, r = Re(n, ze);
417
- Ot.pluginEvent.bind(p)(t, e, z({
418
- dragEl: f,
419
- parentEl: S,
420
- ghostEl: g,
421
- rootEl: _,
422
- nextEl: at,
423
- lastDownEl: Ft,
424
- cloneEl: D,
425
- cloneHidden: J,
426
- dragStarted: bt,
427
- putSortable: O,
428
- activeSortable: p.active,
429
- originalEvent: i,
430
- oldIndex: ft,
431
- oldDraggableIndex: Dt,
432
- newIndex: X,
433
- newDraggableIndex: Q,
434
- hideGhostForTarget: Ie,
435
- unhideGhostForTarget: Ae,
436
- cloneNowHidden: function() {
437
- J = !0;
438
- },
439
- cloneNowShown: function() {
440
- J = !1;
441
- },
442
- dispatchSortableEvent: function(l) {
443
- P({
444
- sortable: e,
445
- name: l,
446
- originalEvent: i
447
- });
448
- }
449
- }, r));
450
- };
451
- function P(o) {
452
- Le(z({
453
- putSortable: O,
454
- cloneEl: D,
455
- targetEl: f,
456
- rootEl: _,
457
- oldIndex: ft,
458
- oldDraggableIndex: Dt,
459
- newIndex: X,
460
- newDraggableIndex: Q
461
- }, o));
462
- }
463
- var f, S, g, _, at, Ft, D, J, ft, X, Dt, Q, At, O, ut = !1, Bt = !1, Ht = [], it, H, $t, Ut, he, pe, bt, st, St, Tt = !1, Pt = !1, Rt, I, qt = [], Jt = !1, Wt = [], Lt = typeof document < "u", xt = oe, ge = Ct || V ? "cssFloat" : "float", je = Lt && !ve && !oe && "draggable" in document.createElement("div"), Te = (function() {
464
- if (Lt) {
465
- if (V)
466
- return !1;
467
- var o = document.createElement("x");
468
- return o.style.cssText = "pointer-events:auto", o.style.pointerEvents === "auto";
469
- }
470
- })(), Ce = function(t, e) {
471
- var n = h(t), i = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), r = dt(t, 0, e), a = dt(t, 1, e), l = r && h(r), s = a && h(a), u = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + C(r).width, d = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + C(a).width;
472
- if (n.display === "flex")
473
- return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
474
- if (n.display === "grid")
475
- return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
476
- if (r && l.float && l.float !== "none") {
477
- var c = l.float === "left" ? "left" : "right";
478
- return a && (s.clear === "both" || s.clear === c) ? "vertical" : "horizontal";
479
- }
480
- return r && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" || u >= i && n[ge] === "none" || a && n[ge] === "none" && u + d > i) ? "vertical" : "horizontal";
481
- }, $e = function(t, e, n) {
482
- 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;
483
- return i === l || r === s || i + a / 2 === l + u / 2;
484
- }, Ue = function(t, e) {
485
- var n;
486
- return Ht.some(function(i) {
487
- var r = i[N].options.emptyInsertThreshold;
488
- if (!(!r || ie(i))) {
489
- var a = C(i), l = t >= a.left - r && t <= a.right + r, s = e >= a.top - r && e <= a.bottom + r;
490
- if (l && s)
491
- return n = i;
492
- }
493
- }), n;
494
- }, Oe = function(t) {
495
- function e(r, a) {
496
- return function(l, s, u, d) {
497
- var c = l.options.group.name && s.options.group.name && l.options.group.name === s.options.group.name;
498
- if (r == null && (a || c))
499
- return !0;
500
- if (r == null || r === !1)
501
- return !1;
502
- if (a && r === "clone")
503
- return r;
504
- if (typeof r == "function")
505
- return e(r(l, s, u, d), a)(l, s, u, d);
506
- var b = (a ? l : s).options.group.name;
507
- return r === !0 || typeof r == "string" && r === b || r.join && r.indexOf(b) > -1;
508
- };
509
- }
510
- var n = {}, i = t.group;
511
- (!i || Mt(i) != "object") && (i = {
512
- name: i
513
- }), n.name = i.name, n.checkPull = e(i.pull, !0), n.checkPut = e(i.put), n.revertClone = i.revertClone, t.group = n;
514
- }, Ie = function() {
515
- !Te && g && h(g, "display", "none");
516
- }, Ae = function() {
517
- !Te && g && h(g, "display", "");
518
- };
519
- Lt && !ve && document.addEventListener("click", function(o) {
520
- if (Bt)
521
- return o.preventDefault(), o.stopPropagation && o.stopPropagation(), o.stopImmediatePropagation && o.stopImmediatePropagation(), Bt = !1, !1;
522
- }, !0);
523
- var rt = function(t) {
524
- if (f) {
525
- t = t.touches ? t.touches[0] : t;
526
- var e = Ue(t.clientX, t.clientY);
527
- if (e) {
528
- var n = {};
529
- for (var i in t)
530
- t.hasOwnProperty(i) && (n[i] = t[i]);
531
- n.target = n.rootEl = e, n.preventDefault = void 0, n.stopPropagation = void 0, e[N]._onDragOver(n);
532
- }
533
- }
534
- }, qe = function(t) {
535
- f && f.parentNode[N]._isOutsideThisEl(t.target);
536
- };
537
- function p(o, t) {
538
- if (!(o && o.nodeType && o.nodeType === 1))
539
- throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));
540
- this.el = o, this.options = t = q({}, t), o[N] = this;
541
- var e = {
542
- group: null,
543
- sort: !0,
544
- disabled: !1,
545
- store: null,
546
- handle: null,
547
- draggable: /^[uo]l$/i.test(o.nodeName) ? ">li" : ">*",
548
- swapThreshold: 1,
549
- // percentage; 0 <= x <= 1
550
- invertSwap: !1,
551
- // invert always
552
- invertedSwapThreshold: null,
553
- // will be set to same as swapThreshold if default
554
- removeCloneOnHide: !0,
555
- direction: function() {
556
- return Ce(o, this.options);
557
- },
558
- ghostClass: "sortable-ghost",
559
- chosenClass: "sortable-chosen",
560
- dragClass: "sortable-drag",
561
- ignore: "a, img",
562
- filter: null,
563
- preventOnFilter: !0,
564
- animation: 0,
565
- easing: null,
566
- setData: function(a, l) {
567
- a.setData("Text", l.textContent);
568
- },
569
- dropBubble: !1,
570
- dragoverBubble: !1,
571
- dataIdAttr: "data-id",
572
- delay: 0,
573
- delayOnTouchOnly: !1,
574
- touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
575
- forceFallback: !1,
576
- fallbackClass: "sortable-fallback",
577
- fallbackOnBody: !1,
578
- fallbackTolerance: 0,
579
- fallbackOffset: {
580
- x: 0,
581
- y: 0
582
- },
583
- // Disabled on Safari: #1571; Enabled on Safari IOS: #2244
584
- supportPointer: p.supportPointer !== !1 && "PointerEvent" in window && (!wt || oe),
585
- emptyInsertThreshold: 5
586
- };
587
- Ot.initializePlugins(this, o, e);
588
- for (var n in e)
589
- !(n in t) && (t[n] = e[n]);
590
- Oe(t);
591
- for (var i in this)
592
- i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
593
- this.nativeDraggable = t.forceFallback ? !1 : je, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? v(o, "pointerdown", this._onTapStart) : (v(o, "mousedown", this._onTapStart), v(o, "touchstart", this._onTapStart)), this.nativeDraggable && (v(o, "dragover", this), v(o, "dragenter", this)), Ht.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), q(this, He());
594
- }
595
- p.prototype = /** @lends Sortable.prototype */
596
- {
597
- constructor: p,
598
- _isOutsideThisEl: function(t) {
599
- !this.el.contains(t) && t !== this.el && (st = null);
600
- },
601
- _getDirection: function(t, e) {
602
- return typeof this.options.direction == "function" ? this.options.direction.call(this, t, e, f) : this.options.direction;
603
- },
604
- _onTapStart: function(t) {
605
- if (t.cancelable) {
606
- 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;
607
- if (nn(n), !f && !(/mousedown|pointerdown/.test(a) && t.button !== 0 || i.disabled) && !u.isContentEditable && !(!this.nativeDraggable && wt && s && s.tagName.toUpperCase() === "SELECT") && (s = W(s, i.draggable, n, !1), !(s && s.animated) && Ft !== s)) {
608
- if (ft = Y(s), Dt = Y(s, i.draggable), typeof d == "function") {
609
- if (d.call(this, t, s, this)) {
610
- P({
611
- sortable: e,
612
- rootEl: u,
613
- name: "filter",
614
- targetEl: s,
615
- toEl: n,
616
- fromEl: n
617
- }), x("filter", e, {
618
- evt: t
619
- }), r && t.preventDefault();
620
- return;
621
- }
622
- } else if (d && (d = d.split(",").some(function(c) {
623
- if (c = W(u, c.trim(), n, !1), c)
624
- return P({
625
- sortable: e,
626
- rootEl: c,
627
- name: "filter",
628
- targetEl: s,
629
- fromEl: n,
630
- toEl: n
631
- }), x("filter", e, {
632
- evt: t
633
- }), !0;
634
- }), d)) {
635
- r && t.preventDefault();
636
- return;
637
- }
638
- i.handle && !W(u, i.handle, n, !1) || this._prepareDragStart(t, l, s);
639
- }
640
- }
641
- },
642
- _prepareDragStart: function(t, e, n) {
643
- var i = this, r = i.el, a = i.options, l = r.ownerDocument, s;
644
- if (n && !f && n.parentNode === r) {
645
- var u = C(n);
646
- if (_ = r, f = n, S = f.parentNode, at = f.nextSibling, Ft = n, At = a.group, p.dragged = f, it = {
647
- target: f,
648
- clientX: (e || t).clientX,
649
- clientY: (e || t).clientY
650
- }, he = it.clientX - u.left, pe = it.clientY - u.top, this._lastX = (e || t).clientX, this._lastY = (e || t).clientY, f.style["will-change"] = "all", s = function() {
651
- if (x("delayEnded", i, {
652
- evt: t
653
- }), p.eventCanceled) {
654
- i._onDrop();
655
- return;
656
- }
657
- i._disableDelayedDragEvents(), !ue && i.nativeDraggable && (f.draggable = !0), i._triggerDragStart(t, e), P({
658
- sortable: i,
659
- name: "choose",
660
- originalEvent: t
661
- }), R(f, a.chosenClass, !0);
662
- }, a.ignore.split(",").forEach(function(d) {
663
- ye(f, d.trim(), Vt);
664
- }), v(l, "dragover", rt), v(l, "mousemove", rt), v(l, "touchmove", rt), a.supportPointer ? (v(l, "pointerup", i._onDrop), !this.nativeDraggable && v(l, "pointercancel", i._onDrop)) : (v(l, "mouseup", i._onDrop), v(l, "touchend", i._onDrop), v(l, "touchcancel", i._onDrop)), ue && this.nativeDraggable && (this.options.touchStartThreshold = 4, f.draggable = !0), x("delayStart", this, {
665
- evt: t
666
- }), a.delay && (!a.delayOnTouchOnly || e) && (!this.nativeDraggable || !(Ct || V))) {
667
- if (p.eventCanceled) {
668
- this._onDrop();
669
- return;
670
- }
671
- a.supportPointer ? (v(l, "pointerup", i._disableDelayedDrag), v(l, "pointercancel", i._disableDelayedDrag)) : (v(l, "mouseup", i._disableDelayedDrag), v(l, "touchend", i._disableDelayedDrag), v(l, "touchcancel", i._disableDelayedDrag)), v(l, "mousemove", i._delayedDragTouchMoveHandler), v(l, "touchmove", i._delayedDragTouchMoveHandler), a.supportPointer && v(l, "pointermove", i._delayedDragTouchMoveHandler), i._dragStartTimer = setTimeout(s, a.delay);
672
- } else
673
- s();
674
- }
675
- },
676
- _delayedDragTouchMoveHandler: function(t) {
677
- var e = t.touches ? t.touches[0] : t;
678
- 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();
679
- },
680
- _disableDelayedDrag: function() {
681
- f && Vt(f), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
682
- },
683
- _disableDelayedDragEvents: function() {
684
- var t = this.el.ownerDocument;
685
- m(t, "mouseup", this._disableDelayedDrag), m(t, "touchend", this._disableDelayedDrag), m(t, "touchcancel", this._disableDelayedDrag), m(t, "pointerup", this._disableDelayedDrag), m(t, "pointercancel", this._disableDelayedDrag), m(t, "mousemove", this._delayedDragTouchMoveHandler), m(t, "touchmove", this._delayedDragTouchMoveHandler), m(t, "pointermove", this._delayedDragTouchMoveHandler);
686
- },
687
- _triggerDragStart: function(t, e) {
688
- e = e || t.pointerType == "touch" && t, !this.nativeDraggable || e ? this.options.supportPointer ? v(document, "pointermove", this._onTouchMove) : e ? v(document, "touchmove", this._onTouchMove) : v(document, "mousemove", this._onTouchMove) : (v(f, "dragend", this), v(_, "dragstart", this._onDragStart));
689
- try {
690
- document.selection ? Xt(function() {
691
- document.selection.empty();
692
- }) : window.getSelection().removeAllRanges();
693
- } catch {
694
- }
695
- },
696
- _dragStarted: function(t, e) {
697
- if (ut = !1, _ && f) {
698
- x("dragStarted", this, {
699
- evt: e
700
- }), this.nativeDraggable && v(document, "dragover", qe);
701
- var n = this.options;
702
- !t && R(f, n.dragClass, !1), R(f, n.ghostClass, !0), p.active = this, t && this._appendGhost(), P({
703
- sortable: this,
704
- name: "start",
705
- originalEvent: e
706
- });
707
- } else
708
- this._nulling();
709
- },
710
- _emulateDragOver: function() {
711
- if (H) {
712
- this._lastX = H.clientX, this._lastY = H.clientY, Ie();
713
- for (var t = document.elementFromPoint(H.clientX, H.clientY), e = t; t && t.shadowRoot && (t = t.shadowRoot.elementFromPoint(H.clientX, H.clientY), t !== e); )
714
- e = t;
715
- if (f.parentNode[N]._isOutsideThisEl(t), e)
716
- do {
717
- if (e[N]) {
718
- var n = void 0;
719
- if (n = e[N]._onDragOver({
720
- clientX: H.clientX,
721
- clientY: H.clientY,
722
- target: t,
723
- rootEl: e
724
- }), n && !this.options.dragoverBubble)
725
- break;
726
- }
727
- t = e;
728
- } while (e = Ee(e));
729
- Ae();
730
- }
731
- },
732
- _onTouchMove: function(t) {
733
- if (it) {
734
- var e = this.options, n = e.fallbackTolerance, i = e.fallbackOffset, r = t.touches ? t.touches[0] : t, a = g && ct(g, !0), l = g && a && a.a, s = g && a && a.d, u = xt && I && de(I), d = (r.clientX - it.clientX + i.x) / (l || 1) + (u ? u[0] - qt[0] : 0) / (l || 1), c = (r.clientY - it.clientY + i.y) / (s || 1) + (u ? u[1] - qt[1] : 0) / (s || 1);
735
- if (!p.active && !ut) {
736
- if (n && Math.max(Math.abs(r.clientX - this._lastX), Math.abs(r.clientY - this._lastY)) < n)
737
- return;
738
- this._onDragStart(t, !0);
739
- }
740
- if (g) {
741
- a ? (a.e += d - ($t || 0), a.f += c - (Ut || 0)) : a = {
742
- a: 1,
743
- b: 0,
744
- c: 0,
745
- d: 1,
746
- e: d,
747
- f: c
748
- };
749
- var b = "matrix(".concat(a.a, ",").concat(a.b, ",").concat(a.c, ",").concat(a.d, ",").concat(a.e, ",").concat(a.f, ")");
750
- h(g, "webkitTransform", b), h(g, "mozTransform", b), h(g, "msTransform", b), h(g, "transform", b), $t = d, Ut = c, H = r;
751
- }
752
- t.cancelable && t.preventDefault();
753
- }
754
- },
755
- _appendGhost: function() {
756
- if (!g) {
757
- var t = this.options.fallbackOnBody ? document.body : _, e = C(f, !0, xt, !0, t), n = this.options;
758
- if (xt) {
759
- for (I = t; h(I, "position") === "static" && h(I, "transform") === "none" && I !== document; )
760
- I = I.parentNode;
761
- I !== document.body && I !== document.documentElement ? (I === document && (I = L()), e.top += I.scrollTop, e.left += I.scrollLeft) : I = L(), qt = de(I);
762
- }
763
- g = f.cloneNode(!0), R(g, n.ghostClass, !1), R(g, n.fallbackClass, !0), R(g, n.dragClass, !0), h(g, "transition", ""), h(g, "transform", ""), h(g, "box-sizing", "border-box"), h(g, "margin", 0), h(g, "top", e.top), h(g, "left", e.left), h(g, "width", e.width), h(g, "height", e.height), h(g, "opacity", "0.8"), h(g, "position", xt ? "absolute" : "fixed"), h(g, "zIndex", "100000"), h(g, "pointerEvents", "none"), p.ghost = g, t.appendChild(g), h(g, "transform-origin", he / parseInt(g.style.width) * 100 + "% " + pe / parseInt(g.style.height) * 100 + "%");
764
- }
765
- },
766
- _onDragStart: function(t, e) {
767
- var n = this, i = t.dataTransfer, r = n.options;
768
- if (x("dragStart", this, {
769
- evt: t
770
- }), p.eventCanceled) {
771
- this._onDrop();
772
- return;
773
- }
774
- x("setupClone", this), p.eventCanceled || (D = De(f), D.removeAttribute("id"), D.draggable = !1, D.style["will-change"] = "", this._hideClone(), R(D, this.options.chosenClass, !1), p.clone = D), n.cloneId = Xt(function() {
775
- x("clone", n), !p.eventCanceled && (n.options.removeCloneOnHide || _.insertBefore(D, f), n._hideClone(), P({
776
- sortable: n,
777
- name: "clone"
778
- }));
779
- }), !e && R(f, r.dragClass, !0), e ? (Bt = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (m(document, "mouseup", n._onDrop), m(document, "touchend", n._onDrop), m(document, "touchcancel", n._onDrop), i && (i.effectAllowed = "move", r.setData && r.setData.call(n, i, f)), v(document, "drop", n), h(f, "transform", "translateZ(0)")), ut = !0, n._dragStartId = Xt(n._dragStarted.bind(n, e, t)), v(document, "selectstart", n), bt = !0, window.getSelection().removeAllRanges(), wt && h(document.body, "user-select", "none");
780
- },
781
- // Returns true - if no further action is needed (either inserted or another condition)
782
- _onDragOver: function(t) {
783
- var e = this.el, n = t.target, i, r, a, l = this.options, s = l.group, u = p.active, d = At === s, c = l.sort, b = O || u, w, E = this, y = !1;
784
- if (Jt) return;
785
- function k(vt, xe) {
786
- x(vt, E, z({
787
- evt: t,
788
- isOwner: d,
789
- axis: w ? "vertical" : "horizontal",
790
- revert: a,
791
- dragRect: i,
792
- targetRect: r,
793
- canSort: c,
794
- fromSortable: b,
795
- target: n,
796
- completed: A,
797
- onMove: function(le, Ne) {
798
- return Nt(_, e, f, i, le, C(le), t, Ne);
799
- },
800
- changed: B
801
- }, xe));
802
- }
803
- function j() {
804
- k("dragOverAnimationCapture"), E.captureAnimationState(), E !== b && b.captureAnimationState();
805
- }
806
- function A(vt) {
807
- return k("dragOverCompleted", {
808
- insertion: vt
809
- }), vt && (d ? u._hideClone() : u._showClone(E), E !== b && (R(f, O ? O.options.ghostClass : u.options.ghostClass, !1), R(f, l.ghostClass, !0)), O !== E && E !== p.active ? O = E : E === p.active && O && (O = null), b === E && (E._ignoreWhileAnimating = n), E.animateAll(function() {
810
- k("dragOverAnimationComplete"), E._ignoreWhileAnimating = null;
811
- }), E !== b && (b.animateAll(), b._ignoreWhileAnimating = null)), (n === f && !f.animated || n === e && !n.animated) && (st = null), !l.dragoverBubble && !t.rootEl && n !== document && (f.parentNode[N]._isOutsideThisEl(t.target), !vt && rt(t)), !l.dragoverBubble && t.stopPropagation && t.stopPropagation(), y = !0;
812
- }
813
- function B() {
814
- X = Y(f), Q = Y(f, l.draggable), P({
815
- sortable: E,
816
- name: "change",
817
- toEl: e,
818
- newIndex: X,
819
- newDraggableIndex: Q,
820
- originalEvent: t
821
- });
822
- }
823
- if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), n = W(n, l.draggable, e, !0), k("dragOver"), p.eventCanceled) return y;
824
- if (f.contains(t.target) || n.animated && n.animatingX && n.animatingY || E._ignoreWhileAnimating === n)
825
- return A(!1);
826
- if (Bt = !1, u && !l.disabled && (d ? c || (a = S !== _) : O === this || (this.lastPutMode = At.checkPull(this, u, f, t)) && s.checkPut(this, u, f, t))) {
827
- if (w = this._getDirection(t, n) === "vertical", i = C(f), k("dragOverValid"), p.eventCanceled) return y;
828
- if (a)
829
- return S = _, j(), this._hideClone(), k("revert"), p.eventCanceled || (at ? _.insertBefore(f, at) : _.appendChild(f)), A(!0);
830
- var M = ie(e, l.draggable);
831
- if (!M || Qe(t, w, this) && !M.animated) {
832
- if (M === f)
833
- return A(!1);
834
- if (M && e === t.target && (n = M), n && (r = C(n)), Nt(_, e, f, i, n, r, t, !!n) !== !1)
835
- return j(), M && M.nextSibling ? e.insertBefore(f, M.nextSibling) : e.appendChild(f), S = e, B(), A(!0);
836
- } else if (M && Ze(t, w, this)) {
837
- var et = dt(e, 0, l, !0);
838
- if (et === f)
839
- return A(!1);
840
- if (n = et, r = C(n), Nt(_, e, f, i, n, r, t, !1) !== !1)
841
- return j(), e.insertBefore(f, et), S = e, B(), A(!0);
842
- } else if (n.parentNode === e) {
843
- r = C(n);
844
- var G = 0, nt, ht = f.parentNode !== e, F = !$e(f.animated && f.toRect || i, n.animated && n.toRect || r, w), pt = w ? "top" : "left", K = ce(n, "top", "top") || ce(f, "top", "top"), gt = K ? K.scrollTop : void 0;
845
- st !== n && (nt = r[pt], Tt = !1, Pt = !F && l.invertSwap || ht), G = Je(t, n, r, w, F ? 1 : l.swapThreshold, l.invertedSwapThreshold == null ? l.swapThreshold : l.invertedSwapThreshold, Pt, st === n);
846
- var $;
847
- if (G !== 0) {
848
- var ot = Y(f);
849
- do
850
- ot -= G, $ = S.children[ot];
851
- while ($ && (h($, "display") === "none" || $ === g));
852
- }
853
- if (G === 0 || $ === n)
854
- return A(!1);
855
- st = n, St = G;
856
- var mt = n.nextElementSibling, Z = !1;
857
- Z = G === 1;
858
- var It = Nt(_, e, f, i, n, r, t, Z);
859
- if (It !== !1)
860
- return (It === 1 || It === -1) && (Z = It === 1), Jt = !0, setTimeout(Ke, 30), j(), Z && !mt ? e.appendChild(f) : n.parentNode.insertBefore(f, Z ? mt : n), K && _e(K, 0, gt - K.scrollTop), S = f.parentNode, nt !== void 0 && !Pt && (Rt = Math.abs(nt - C(n)[pt])), B(), A(!0);
861
- }
862
- if (e.contains(f))
863
- return A(!1);
864
- }
865
- return !1;
866
- },
867
- _ignoreWhileAnimating: null,
868
- _offMoveEvents: function() {
869
- m(document, "mousemove", this._onTouchMove), m(document, "touchmove", this._onTouchMove), m(document, "pointermove", this._onTouchMove), m(document, "dragover", rt), m(document, "mousemove", rt), m(document, "touchmove", rt);
870
- },
871
- _offUpEvents: function() {
872
- var t = this.el.ownerDocument;
873
- m(t, "mouseup", this._onDrop), m(t, "touchend", this._onDrop), m(t, "pointerup", this._onDrop), m(t, "pointercancel", this._onDrop), m(t, "touchcancel", this._onDrop), m(document, "selectstart", this);
874
- },
875
- _onDrop: function(t) {
876
- var e = this.el, n = this.options;
877
- if (X = Y(f), Q = Y(f, n.draggable), x("drop", this, {
878
- evt: t
879
- }), S = f && f.parentNode, X = Y(f), Q = Y(f, n.draggable), p.eventCanceled) {
880
- this._nulling();
881
- return;
882
- }
883
- ut = !1, Pt = !1, Tt = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), te(this.cloneId), te(this._dragStartId), this.nativeDraggable && (m(document, "drop", this), m(e, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), wt && h(document.body, "user-select", ""), h(f, "transform", ""), t && (bt && (t.cancelable && t.preventDefault(), !n.dropBubble && t.stopPropagation()), g && g.parentNode && g.parentNode.removeChild(g), (_ === S || O && O.lastPutMode !== "clone") && D && D.parentNode && D.parentNode.removeChild(D), f && (this.nativeDraggable && m(f, "dragend", this), Vt(f), f.style["will-change"] = "", bt && !ut && R(f, O ? O.options.ghostClass : this.options.ghostClass, !1), R(f, this.options.chosenClass, !1), P({
884
- sortable: this,
885
- name: "unchoose",
886
- toEl: S,
887
- newIndex: null,
888
- newDraggableIndex: null,
889
- originalEvent: t
890
- }), _ !== S ? (X >= 0 && (P({
891
- rootEl: S,
892
- name: "add",
893
- toEl: S,
894
- fromEl: _,
895
- originalEvent: t
896
- }), P({
897
- sortable: this,
898
- name: "remove",
899
- toEl: S,
900
- originalEvent: t
901
- }), P({
902
- rootEl: S,
903
- name: "sort",
904
- toEl: S,
905
- fromEl: _,
906
- originalEvent: t
907
- }), P({
908
- sortable: this,
909
- name: "sort",
910
- toEl: S,
911
- originalEvent: t
912
- })), O && O.save()) : X !== ft && X >= 0 && (P({
913
- sortable: this,
914
- name: "update",
915
- toEl: S,
916
- originalEvent: t
917
- }), P({
918
- sortable: this,
919
- name: "sort",
920
- toEl: S,
921
- originalEvent: t
922
- })), p.active && ((X == null || X === -1) && (X = ft, Q = Dt), P({
923
- sortable: this,
924
- name: "end",
925
- toEl: S,
926
- originalEvent: t
927
- }), this.save()))), this._nulling();
928
- },
929
- _nulling: function() {
930
- x("nulling", this), _ = f = S = g = at = D = Ft = J = it = H = bt = X = Q = ft = Dt = st = St = O = At = p.dragged = p.ghost = p.clone = p.active = null, Wt.forEach(function(t) {
931
- t.checked = !0;
932
- }), Wt.length = $t = Ut = 0;
933
- },
934
- handleEvent: function(t) {
935
- switch (t.type) {
936
- case "drop":
937
- case "dragend":
938
- this._onDrop(t);
939
- break;
940
- case "dragenter":
941
- case "dragover":
942
- f && (this._onDragOver(t), Ve(t));
943
- break;
944
- case "selectstart":
945
- t.preventDefault();
946
- break;
947
- }
948
- },
949
- /**
950
- * Serializes the item into an array of string.
951
- * @returns {String[]}
952
- */
953
- toArray: function() {
954
- for (var t = [], e, n = this.el.children, i = 0, r = n.length, a = this.options; i < r; i++)
955
- e = n[i], W(e, a.draggable, this.el, !1) && t.push(e.getAttribute(a.dataIdAttr) || en(e));
956
- return t;
957
- },
958
- /**
959
- * Sorts the elements according to the array.
960
- * @param {String[]} order order of the items
961
- */
962
- sort: function(t, e) {
963
- var n = {}, i = this.el;
964
- this.toArray().forEach(function(r, a) {
965
- var l = i.children[a];
966
- W(l, this.options.draggable, i, !1) && (n[r] = l);
967
- }, this), e && this.captureAnimationState(), t.forEach(function(r) {
968
- n[r] && (i.removeChild(n[r]), i.appendChild(n[r]));
969
- }), e && this.animateAll();
970
- },
971
- /**
972
- * Save the current sorting
973
- */
974
- save: function() {
975
- var t = this.options.store;
976
- t && t.set && t.set(this);
977
- },
978
- /**
979
- * 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.
980
- * @param {HTMLElement} el
981
- * @param {String} [selector] default: `options.draggable`
982
- * @returns {HTMLElement|null}
983
- */
984
- closest: function(t, e) {
985
- return W(t, e || this.options.draggable, this.el, !1);
986
- },
987
- /**
988
- * Set/get option
989
- * @param {string} name
990
- * @param {*} [value]
991
- * @returns {*}
992
- */
993
- option: function(t, e) {
994
- var n = this.options;
995
- if (e === void 0)
996
- return n[t];
997
- var i = Ot.modifyOption(this, t, e);
998
- typeof i < "u" ? n[t] = i : n[t] = e, t === "group" && Oe(n);
999
- },
1000
- /**
1001
- * Destroy
1002
- */
1003
- destroy: function() {
1004
- x("destroy", this);
1005
- var t = this.el;
1006
- t[N] = null, m(t, "mousedown", this._onTapStart), m(t, "touchstart", this._onTapStart), m(t, "pointerdown", this._onTapStart), this.nativeDraggable && (m(t, "dragover", this), m(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function(e) {
1007
- e.removeAttribute("draggable");
1008
- }), this._onDrop(), this._disableDelayedDragEvents(), Ht.splice(Ht.indexOf(this.el), 1), this.el = t = null;
1009
- },
1010
- _hideClone: function() {
1011
- if (!J) {
1012
- if (x("hideClone", this), p.eventCanceled) return;
1013
- h(D, "display", "none"), this.options.removeCloneOnHide && D.parentNode && D.parentNode.removeChild(D), J = !0;
1014
- }
1015
- },
1016
- _showClone: function(t) {
1017
- if (t.lastPutMode !== "clone") {
1018
- this._hideClone();
1019
- return;
1020
- }
1021
- if (J) {
1022
- if (x("showClone", this), p.eventCanceled) return;
1023
- f.parentNode == _ && !this.options.group.revertClone ? _.insertBefore(D, f) : at ? _.insertBefore(D, at) : _.appendChild(D), this.options.group.revertClone && this.animate(f, D), h(D, "display", ""), J = !1;
1024
- }
1025
- }
1026
- };
1027
- function Ve(o) {
1028
- o.dataTransfer && (o.dataTransfer.dropEffect = "move"), o.cancelable && o.preventDefault();
1029
- }
1030
- function Nt(o, t, e, n, i, r, a, l) {
1031
- var s, u = o[N], d = u.options.onMove, c;
1032
- return window.CustomEvent && !V && !Ct ? s = new CustomEvent("move", {
1033
- bubbles: !0,
1034
- cancelable: !0
1035
- }) : (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 || C(t), s.willInsertAfter = l, s.originalEvent = a, o.dispatchEvent(s), d && (c = d.call(u, s, a)), c;
1036
- }
1037
- function Vt(o) {
1038
- o.draggable = !1;
1039
- }
1040
- function Ke() {
1041
- Jt = !1;
1042
- }
1043
- function Ze(o, t, e) {
1044
- var n = C(dt(e.el, 0, e.options, !0)), i = Se(e.el, e.options, g), r = 10;
1045
- 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;
1046
- }
1047
- function Qe(o, t, e) {
1048
- var n = C(ie(e.el, e.options.draggable)), i = Se(e.el, e.options, g), r = 10;
1049
- 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;
1050
- }
1051
- function Je(o, t, e, n, i, r, a, l) {
1052
- var s = n ? o.clientY : o.clientX, u = n ? e.height : e.width, d = n ? e.top : e.left, c = n ? e.bottom : e.right, b = !1;
1053
- if (!a) {
1054
- if (l && Rt < u * i) {
1055
- if (!Tt && (St === 1 ? s > d + u * r / 2 : s < c - u * r / 2) && (Tt = !0), Tt)
1056
- b = !0;
1057
- else if (St === 1 ? s < d + Rt : s > c - Rt)
1058
- return -St;
1059
- } else if (s > d + u * (1 - i) / 2 && s < c - u * (1 - i) / 2)
1060
- return tn(t);
1061
- }
1062
- return b = b || a, b && (s < d + u * r / 2 || s > c - u * r / 2) ? s > d + u / 2 ? 1 : -1 : 0;
1063
- }
1064
- function tn(o) {
1065
- return Y(f) < Y(o) ? 1 : -1;
1066
- }
1067
- function en(o) {
1068
- for (var t = o.tagName + o.className + o.src + o.href + o.textContent, e = t.length, n = 0; e--; )
1069
- n += t.charCodeAt(e);
1070
- return n.toString(36);
1071
- }
1072
- function nn(o) {
1073
- Wt.length = 0;
1074
- for (var t = o.getElementsByTagName("input"), e = t.length; e--; ) {
1075
- var n = t[e];
1076
- n.checked && Wt.push(n);
1077
- }
1078
- }
1079
- function Xt(o) {
1080
- return setTimeout(o, 0);
1081
- }
1082
- function te(o) {
1083
- return clearTimeout(o);
1084
- }
1085
- Lt && v(document, "touchmove", function(o) {
1086
- (p.active || ut) && o.cancelable && o.preventDefault();
1087
- });
1088
- p.utils = {
1089
- on: v,
1090
- off: m,
1091
- css: h,
1092
- find: ye,
1093
- is: function(t, e) {
1094
- return !!W(t, e, t, !1);
1095
- },
1096
- extend: ke,
1097
- throttle: we,
1098
- closest: W,
1099
- toggleClass: R,
1100
- clone: De,
1101
- index: Y,
1102
- nextTick: Xt,
1103
- cancelNextTick: te,
1104
- detectDirection: Ce,
1105
- getChild: dt,
1106
- expando: N
1107
- };
1108
- p.get = function(o) {
1109
- return o[N];
1110
- };
1111
- p.mount = function() {
1112
- for (var o = arguments.length, t = new Array(o), e = 0; e < o; e++)
1113
- t[e] = arguments[e];
1114
- t[0].constructor === Array && (t = t[0]), t.forEach(function(n) {
1115
- if (!n.prototype || !n.prototype.constructor)
1116
- throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));
1117
- n.utils && (p.utils = z(z({}, p.utils), n.utils)), Ot.mount(n);
1118
- });
1119
- };
1120
- p.create = function(o, t) {
1121
- return new p(o, t);
1122
- };
1123
- p.version = Xe;
1124
- var T = [], Et, ee, ne = !1, Kt, Zt, Gt, yt;
1125
- function on() {
1126
- function o() {
1127
- this.defaults = {
1128
- scroll: !0,
1129
- forceAutoScrollFallback: !1,
1130
- scrollSensitivity: 30,
1131
- scrollSpeed: 10,
1132
- bubbleScroll: !0
1133
- };
1134
- for (var t in this)
1135
- t.charAt(0) === "_" && typeof this[t] == "function" && (this[t] = this[t].bind(this));
1136
- }
1137
- return o.prototype = {
1138
- dragStarted: function(e) {
1139
- var n = e.originalEvent;
1140
- this.sortable.nativeDraggable ? v(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? v(document, "pointermove", this._handleFallbackAutoScroll) : n.touches ? v(document, "touchmove", this._handleFallbackAutoScroll) : v(document, "mousemove", this._handleFallbackAutoScroll);
1141
- },
1142
- dragOverCompleted: function(e) {
1143
- var n = e.originalEvent;
1144
- !this.options.dragOverBubble && !n.rootEl && this._handleAutoScroll(n);
1145
- },
1146
- drop: function() {
1147
- this.sortable.nativeDraggable ? m(document, "dragover", this._handleAutoScroll) : (m(document, "pointermove", this._handleFallbackAutoScroll), m(document, "touchmove", this._handleFallbackAutoScroll), m(document, "mousemove", this._handleFallbackAutoScroll)), me(), Yt(), Be();
1148
- },
1149
- nulling: function() {
1150
- Gt = ee = Et = ne = yt = Kt = Zt = null, T.length = 0;
1151
- },
1152
- _handleFallbackAutoScroll: function(e) {
1153
- this._handleAutoScroll(e, !0);
1154
- },
1155
- _handleAutoScroll: function(e, n) {
1156
- var i = this, r = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, l = document.elementFromPoint(r, a);
1157
- if (Gt = e, n || this.options.forceAutoScrollFallback || Ct || V || wt) {
1158
- Qt(e, this.options, l, n);
1159
- var s = tt(l, !0);
1160
- ne && (!yt || r !== Kt || a !== Zt) && (yt && me(), yt = setInterval(function() {
1161
- var u = tt(document.elementFromPoint(r, a), !0);
1162
- u !== s && (s = u, Yt()), Qt(e, i.options, u, n);
1163
- }, 10), Kt = r, Zt = a);
1164
- } else {
1165
- if (!this.options.bubbleScroll || tt(l, !0) === L()) {
1166
- Yt();
1167
- return;
1168
- }
1169
- Qt(e, this.options, tt(l, !1), !1);
1170
- }
1171
- }
1172
- }, q(o, {
1173
- pluginName: "scroll",
1174
- initializeByDefault: !0
1175
- });
1176
- }
1177
- function Yt() {
1178
- T.forEach(function(o) {
1179
- clearInterval(o.pid);
1180
- }), T = [];
1181
- }
1182
- function me() {
1183
- clearInterval(yt);
1184
- }
1185
- var Qt = we(function(o, t, e, n) {
1186
- if (t.scroll) {
1187
- var i = (o.touches ? o.touches[0] : o).clientX, r = (o.touches ? o.touches[0] : o).clientY, a = t.scrollSensitivity, l = t.scrollSpeed, s = L(), u = !1, d;
1188
- ee !== e && (ee = e, Yt(), Et = t.scroll, d = t.scrollFn, Et === !0 && (Et = tt(e, !0)));
1189
- var c = 0, b = Et;
1190
- do {
1191
- var w = b, E = C(w), y = E.top, k = E.bottom, j = E.left, A = E.right, B = E.width, M = E.height, et = void 0, G = void 0, nt = w.scrollWidth, ht = w.scrollHeight, F = h(w), pt = w.scrollLeft, K = w.scrollTop;
1192
- w === s ? (et = B < nt && (F.overflowX === "auto" || F.overflowX === "scroll" || F.overflowX === "visible"), G = M < ht && (F.overflowY === "auto" || F.overflowY === "scroll" || F.overflowY === "visible")) : (et = B < nt && (F.overflowX === "auto" || F.overflowX === "scroll"), G = M < ht && (F.overflowY === "auto" || F.overflowY === "scroll"));
1193
- var gt = et && (Math.abs(A - i) <= a && pt + B < nt) - (Math.abs(j - i) <= a && !!pt), $ = G && (Math.abs(k - r) <= a && K + M < ht) - (Math.abs(y - r) <= a && !!K);
1194
- if (!T[c])
1195
- for (var ot = 0; ot <= c; ot++)
1196
- T[ot] || (T[ot] = {});
1197
- (T[c].vx != gt || T[c].vy != $ || T[c].el !== w) && (T[c].el = w, T[c].vx = gt, T[c].vy = $, clearInterval(T[c].pid), (gt != 0 || $ != 0) && (u = !0, T[c].pid = setInterval((function() {
1198
- n && this.layer === 0 && p.active._onTouchMove(Gt);
1199
- var mt = T[this.layer].vy ? T[this.layer].vy * l : 0, Z = T[this.layer].vx ? T[this.layer].vx * l : 0;
1200
- typeof d == "function" && d.call(p.dragged.parentNode[N], Z, mt, o, Gt, T[this.layer].el) !== "continue" || _e(T[this.layer].el, Z, mt);
1201
- }).bind({
1202
- layer: c
1203
- }), 24))), c++;
1204
- } while (t.bubbleScroll && b !== s && (b = tt(b, !1)));
1205
- ne = u;
1206
- }
1207
- }, 30), Pe = function(t) {
1208
- var e = t.originalEvent, n = t.putSortable, i = t.dragEl, r = t.activeSortable, a = t.dispatchSortableEvent, l = t.hideGhostForTarget, s = t.unhideGhostForTarget;
1209
- if (e) {
1210
- var u = n || r;
1211
- l();
1212
- var d = e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e, c = document.elementFromPoint(d.clientX, d.clientY);
1213
- s(), u && !u.el.contains(c) && (a("spill"), this.onSpill({
1214
- dragEl: i,
1215
- putSortable: n
1216
- }));
1217
- }
1218
- };
1219
- function re() {
1220
- }
1221
- re.prototype = {
1222
- startIndex: null,
1223
- dragStart: function(t) {
1224
- var e = t.oldDraggableIndex;
1225
- this.startIndex = e;
1226
- },
1227
- onSpill: function(t) {
1228
- var e = t.dragEl, n = t.putSortable;
1229
- this.sortable.captureAnimationState(), n && n.captureAnimationState();
1230
- var i = dt(this.sortable.el, this.startIndex, this.options);
1231
- i ? this.sortable.el.insertBefore(e, i) : this.sortable.el.appendChild(e), this.sortable.animateAll(), n && n.animateAll();
1232
- },
1233
- drop: Pe
1234
- };
1235
- q(re, {
1236
- pluginName: "revertOnSpill"
1237
- });
1238
- function ae() {
1239
- }
1240
- ae.prototype = {
1241
- onSpill: function(t) {
1242
- var e = t.dragEl, n = t.putSortable, i = n || this.sortable;
1243
- i.captureAnimationState(), e.parentNode && e.parentNode.removeChild(e), i.animateAll();
1244
- },
1245
- drop: Pe
1246
- };
1247
- q(ae, {
1248
- pluginName: "removeOnSpill"
1249
- });
1250
- p.mount(new on());
1251
- p.mount(ae, re);
1252
- export {
1253
- p as S
1254
- };