weiflow
Version:
1,244 lines • 2.28 MB
JavaScript
import { defineComponent as dn, h as cp, resolveComponent as kt, getCurrentScope as q4, onScopeDispose as z2, ref as rt, unref as ue, getCurrentInstance as mo, onMounted as Wr, nextTick as Jt, watch as Sn, openBlock as G, createElementBlock as X, createElementVNode as M, createStaticVNode as W4, warn as K4, computed as Ze, provide as Ip, inject as va, watchEffect as Q4, onBeforeUnmount as go, toRef as ks, onUnmounted as X4, isRef as Dp, mergeProps as As, renderSlot as vn, useAttrs as Z4, useSlots as H2, shallowRef as dc, withDirectives as An, createCommentVNode as It, Fragment as Yr, normalizeClass as ct, createBlock as ht, withCtx as Ye, resolveDynamicComponent as rn, withModifiers as mi, createVNode as ze, toDisplayString as En, normalizeStyle as Ei, vShow as jn, Transition as wp, Text as j4, reactive as vi, shallowReactive as J4, isVNode as Ks, render as Bs, toRefs as ey, withKeys as fs, createTextVNode as Pt, renderList as Us } from "vue";
/*!
* vue-draggable-next v2.1.0
* (c) 2021 Anish George
* @license MIT
*/
/**!
* Sortable 1.14.0
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/
function mf(t, e) {
var n = Object.keys(t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(t);
e && (a = a.filter(function(o) {
return Object.getOwnPropertyDescriptor(t, o).enumerable;
})), n.push.apply(n, a);
}
return n;
}
function Dr(t) {
for (var e = 1; e < arguments.length; e++) {
var n = arguments[e] != null ? arguments[e] : {};
e % 2 ? mf(Object(n), !0).forEach(function(a) {
ty(t, a, n[a]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : mf(Object(n)).forEach(function(a) {
Object.defineProperty(t, a, Object.getOwnPropertyDescriptor(n, a));
});
}
return t;
}
function Is(t) {
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Is = function(e) {
return typeof e;
} : Is = function(e) {
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
}, Is(t);
}
function ty(t, e, n) {
return e in t ? Object.defineProperty(t, e, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : t[e] = n, t;
}
function qr() {
return qr = Object.assign || function(t) {
for (var e = 1; e < arguments.length; e++) {
var n = arguments[e];
for (var a in n)
Object.prototype.hasOwnProperty.call(n, a) && (t[a] = n[a]);
}
return t;
}, qr.apply(this, arguments);
}
function ny(t, e) {
if (t == null)
return {};
var n = {}, a = Object.keys(t), o, s;
for (s = 0; s < a.length; s++)
o = a[s], !(e.indexOf(o) >= 0) && (n[o] = t[o]);
return n;
}
function ry(t, e) {
if (t == null)
return {};
var n = ny(t, e), a, o;
if (Object.getOwnPropertySymbols) {
var s = Object.getOwnPropertySymbols(t);
for (o = 0; o < s.length; o++)
a = s[o], !(e.indexOf(a) >= 0) && (!Object.prototype.propertyIsEnumerable.call(t, a) || (n[a] = t[a]));
}
return n;
}
var ay = "1.14.0";
function Vr(t) {
if (typeof window < "u" && window.navigator)
return !!/* @__PURE__ */ navigator.userAgent.match(t);
}
var Kr = Vr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), fo = Vr(/Edge/i), gf = Vr(/firefox/i), to = Vr(/safari/i) && !Vr(/chrome/i) && !Vr(/android/i), $2 = Vr(/iP(ad|od|hone)/i), iy = Vr(/chrome/i) && Vr(/android/i), Y2 = {
capture: !1,
passive: !1
};
function At(t, e, n) {
t.addEventListener(e, n, !Kr && Y2);
}
function yt(t, e, n) {
t.removeEventListener(e, n, !Kr && Y2);
}
function Fs(t, e) {
if (!!e) {
if (e[0] === ">" && (e = e.substring(1)), t)
try {
if (t.matches)
return t.matches(e);
if (t.msMatchesSelector)
return t.msMatchesSelector(e);
if (t.webkitMatchesSelector)
return t.webkitMatchesSelector(e);
} catch {
return !1;
}
return !1;
}
}
function oy(t) {
return t.host && t !== document && t.host.nodeType ? t.host : t.parentNode;
}
function Rr(t, e, n, a) {
if (t) {
n = n || document;
do {
if (e != null && (e[0] === ">" ? t.parentNode === n && Fs(t, e) : Fs(t, e)) || a && t === n)
return t;
if (t === n)
break;
} while (t = oy(t));
}
return null;
}
var ff = /\s+/g;
function Wn(t, e, n) {
if (t && e)
if (t.classList)
t.classList[n ? "add" : "remove"](e);
else {
var a = (" " + t.className + " ").replace(ff, " ").replace(" " + e + " ", " ");
t.className = (a + (n ? " " + e : "")).replace(ff, " ");
}
}
function at(t, e, n) {
var a = t && t.style;
if (a) {
if (n === void 0)
return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(t, "") : t.currentStyle && (n = t.currentStyle), e === void 0 ? n : n[e];
!(e in a) && e.indexOf("webkit") === -1 && (e = "-webkit-" + e), a[e] = n + (typeof n == "string" ? "" : "px");
}
}
function fi(t, e) {
var n = "";
if (typeof t == "string")
n = t;
else
do {
var a = at(t, "transform");
a && a !== "none" && (n = a + " " + n);
} while (!e && (t = t.parentNode));
var o = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
return o && new o(n);
}
function V2(t, e, n) {
if (t) {
var a = t.getElementsByTagName(e), o = 0, s = a.length;
if (n)
for (; o < s; o++)
n(a[o], o);
return a;
}
return [];
}
function Nr() {
var t = document.scrollingElement;
return t || document.documentElement;
}
function nn(t, e, n, a, o) {
if (!(!t.getBoundingClientRect && t !== window)) {
var s, l, d, _, c, m, g;
if (t !== window && t.parentNode && t !== Nr() ? (s = t.getBoundingClientRect(), l = s.top, d = s.left, _ = s.bottom, c = s.right, m = s.height, g = s.width) : (l = 0, d = 0, _ = window.innerHeight, c = window.innerWidth, m = window.innerHeight, g = window.innerWidth), (e || n) && t !== window && (o = o || t.parentNode, !Kr))
do
if (o && o.getBoundingClientRect && (at(o, "transform") !== "none" || n && at(o, "position") !== "static")) {
var C = o.getBoundingClientRect();
l -= C.top + parseInt(at(o, "border-top-width")), d -= C.left + parseInt(at(o, "border-left-width")), _ = l + s.height, c = d + s.width;
break;
}
while (o = o.parentNode);
if (a && t !== window) {
var h = fi(o || t), T = h && h.a, p = h && h.d;
h && (l /= p, d /= T, g /= T, m /= p, _ = l + m, c = d + g);
}
return {
top: l,
left: d,
bottom: _,
right: c,
width: g,
height: m
};
}
}
function hf(t, e, n) {
for (var a = fa(t, !0), o = nn(t)[e]; a; ) {
var s = nn(a)[n], l = void 0;
if (n === "top" || n === "left" ? l = o >= s : l = o <= s, !l)
return a;
if (a === Nr())
break;
a = fa(a, !1);
}
return !1;
}
function Si(t, e, n, a) {
for (var o = 0, s = 0, l = t.children; s < l.length; ) {
if (l[s].style.display !== "none" && l[s] !== it.ghost && (a || l[s] !== it.dragged) && Rr(l[s], n.draggable, t, !1)) {
if (o === e)
return l[s];
o++;
}
s++;
}
return null;
}
function Mp(t, e) {
for (var n = t.lastElementChild; n && (n === it.ghost || at(n, "display") === "none" || e && !Fs(n, e)); )
n = n.previousElementSibling;
return n || null;
}
function _r(t, e) {
var n = 0;
if (!t || !t.parentNode)
return -1;
for (; t = t.previousElementSibling; )
t.nodeName.toUpperCase() !== "TEMPLATE" && t !== it.clone && (!e || Fs(t, e)) && n++;
return n;
}
function Ef(t) {
var e = 0, n = 0, a = Nr();
if (t)
do {
var o = fi(t), s = o.a, l = o.d;
e += t.scrollLeft * s, n += t.scrollTop * l;
} while (t !== a && (t = t.parentNode));
return [e, n];
}
function sy(t, e) {
for (var n in t)
if (!!t.hasOwnProperty(n)) {
for (var a in e)
if (e.hasOwnProperty(a) && e[a] === t[n][a])
return Number(n);
}
return -1;
}
function fa(t, e) {
if (!t || !t.getBoundingClientRect)
return Nr();
var n = t, a = !1;
do
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
var o = at(n);
if (n.clientWidth < n.scrollWidth && (o.overflowX == "auto" || o.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (o.overflowY == "auto" || o.overflowY == "scroll")) {
if (!n.getBoundingClientRect || n === document.body)
return Nr();
if (a || e)
return n;
a = !0;
}
}
while (n = n.parentNode);
return Nr();
}
function ly(t, e) {
if (t && e)
for (var n in e)
e.hasOwnProperty(n) && (t[n] = e[n]);
return t;
}
function pc(t, e) {
return Math.round(t.top) === Math.round(e.top) && Math.round(t.left) === Math.round(e.left) && Math.round(t.height) === Math.round(e.height) && Math.round(t.width) === Math.round(e.width);
}
var no;
function q2(t, e) {
return function() {
if (!no) {
var n = arguments, a = this;
n.length === 1 ? t.call(a, n[0]) : t.apply(a, n), no = setTimeout(function() {
no = void 0;
}, e);
}
};
}
function cy() {
clearTimeout(no), no = void 0;
}
function W2(t, e, n) {
t.scrollLeft += e, t.scrollTop += n;
}
function K2(t) {
var e = window.Polymer, n = window.jQuery || window.Zepto;
return e && e.dom ? e.dom(t).cloneNode(!0) : n ? n(t).clone(!0)[0] : t.cloneNode(!0);
}
var Zn = "Sortable" + new Date().getTime();
function _y() {
var t = [], e;
return {
captureAnimationState: function() {
if (t = [], !!this.options.animation) {
var a = [].slice.call(this.el.children);
a.forEach(function(o) {
if (!(at(o, "display") === "none" || o === it.ghost)) {
t.push({
target: o,
rect: nn(o)
});
var s = Dr({}, t[t.length - 1].rect);
if (o.thisAnimationDuration) {
var l = fi(o, !0);
l && (s.top -= l.f, s.left -= l.e);
}
o.fromRect = s;
}
});
}
},
addAnimationState: function(a) {
t.push(a);
},
removeAnimationState: function(a) {
t.splice(sy(t, {
target: a
}), 1);
},
animateAll: function(a) {
var o = this;
if (!this.options.animation) {
clearTimeout(e), typeof a == "function" && a();
return;
}
var s = !1, l = 0;
t.forEach(function(d) {
var _ = 0, c = d.target, m = c.fromRect, g = nn(c), C = c.prevFromRect, h = c.prevToRect, T = d.rect, p = fi(c, !0);
p && (g.top -= p.f, g.left -= p.e), c.toRect = g, c.thisAnimationDuration && pc(C, g) && !pc(m, g) && (T.top - g.top) / (T.left - g.left) === (m.top - g.top) / (m.left - g.left) && (_ = dy(T, C, h, o.options)), pc(g, m) || (c.prevFromRect = m, c.prevToRect = g, _ || (_ = o.options.animation), o.animate(c, T, g, _)), _ && (s = !0, l = Math.max(l, _), clearTimeout(c.animationResetTimer), c.animationResetTimer = setTimeout(function() {
c.animationTime = 0, c.prevFromRect = null, c.fromRect = null, c.prevToRect = null, c.thisAnimationDuration = null;
}, _), c.thisAnimationDuration = _);
}), clearTimeout(e), s ? e = setTimeout(function() {
typeof a == "function" && a();
}, l) : typeof a == "function" && a(), t = [];
},
animate: function(a, o, s, l) {
if (l) {
at(a, "transition", ""), at(a, "transform", "");
var d = fi(this.el), _ = d && d.a, c = d && d.d, m = (o.left - s.left) / (_ || 1), g = (o.top - s.top) / (c || 1);
a.animatingX = !!m, a.animatingY = !!g, at(a, "transform", "translate3d(" + m + "px," + g + "px,0)"), this.forRepaintDummy = uy(a), at(a, "transition", "transform " + l + "ms" + (this.options.easing ? " " + this.options.easing : "")), at(a, "transform", "translate3d(0,0,0)"), typeof a.animated == "number" && clearTimeout(a.animated), a.animated = setTimeout(function() {
at(a, "transition", ""), at(a, "transform", ""), a.animated = !1, a.animatingX = !1, a.animatingY = !1;
}, l);
}
}
};
}
function uy(t) {
return t.offsetWidth;
}
function dy(t, e, n, a) {
return Math.sqrt(Math.pow(e.top - t.top, 2) + Math.pow(e.left - t.left, 2)) / Math.sqrt(Math.pow(e.top - n.top, 2) + Math.pow(e.left - n.left, 2)) * a.animation;
}
var si = [], mc = {
initializeByDefault: !0
}, ho = {
mount: function(e) {
for (var n in mc)
mc.hasOwnProperty(n) && !(n in e) && (e[n] = mc[n]);
si.forEach(function(a) {
if (a.pluginName === e.pluginName)
throw "Sortable: Cannot mount plugin ".concat(e.pluginName, " more than once");
}), si.push(e);
},
pluginEvent: function(e, n, a) {
var o = this;
this.eventCanceled = !1, a.cancel = function() {
o.eventCanceled = !0;
};
var s = e + "Global";
si.forEach(function(l) {
!n[l.pluginName] || (n[l.pluginName][s] && n[l.pluginName][s](Dr({
sortable: n
}, a)), n.options[l.pluginName] && n[l.pluginName][e] && n[l.pluginName][e](Dr({
sortable: n
}, a)));
});
},
initializePlugins: function(e, n, a, o) {
si.forEach(function(d) {
var _ = d.pluginName;
if (!(!e.options[_] && !d.initializeByDefault)) {
var c = new d(e, n, e.options);
c.sortable = e, c.options = e.options, e[_] = c, qr(a, c.defaults);
}
});
for (var s in e.options)
if (!!e.options.hasOwnProperty(s)) {
var l = this.modifyOption(e, s, e.options[s]);
typeof l < "u" && (e.options[s] = l);
}
},
getEventProperties: function(e, n) {
var a = {};
return si.forEach(function(o) {
typeof o.eventProperties == "function" && qr(a, o.eventProperties.call(n[o.pluginName], e));
}), a;
},
modifyOption: function(e, n, a) {
var o;
return si.forEach(function(s) {
!e[s.pluginName] || s.optionListeners && typeof s.optionListeners[n] == "function" && (o = s.optionListeners[n].call(e[s.pluginName], a));
}), o;
}
};
function py(t) {
var e = t.sortable, n = t.rootEl, a = t.name, o = t.targetEl, s = t.cloneEl, l = t.toEl, d = t.fromEl, _ = t.oldIndex, c = t.newIndex, m = t.oldDraggableIndex, g = t.newDraggableIndex, C = t.originalEvent, h = t.putSortable, T = t.extraEventProperties;
if (e = e || n && n[Zn], !!e) {
var p, f = e.options, B = "on" + a.charAt(0).toUpperCase() + a.substr(1);
window.CustomEvent && !Kr && !fo ? p = new CustomEvent(a, {
bubbles: !0,
cancelable: !0
}) : (p = document.createEvent("Event"), p.initEvent(a, !0, !0)), p.to = l || n, p.from = d || n, p.item = o || n, p.clone = s, p.oldIndex = _, p.newIndex = c, p.oldDraggableIndex = m, p.newDraggableIndex = g, p.originalEvent = C, p.pullMode = h ? h.lastPutMode : void 0;
var $ = Dr(Dr({}, T), ho.getEventProperties(a, e));
for (var W in $)
p[W] = $[W];
n && n.dispatchEvent(p), f[B] && f[B].call(e, p);
}
}
var my = ["evt"], Pn = function(e, n) {
var a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = a.evt, s = ry(a, my);
ho.pluginEvent.bind(it)(e, n, Dr({
dragEl: Fe,
parentEl: Vt,
ghostEl: mt,
rootEl: Gt,
nextEl: La,
lastDownEl: Ds,
cloneEl: qt,
cloneHidden: ga,
dragStarted: Zi,
putSortable: _n,
activeSortable: it.active,
originalEvent: o,
oldIndex: gi,
oldDraggableIndex: ro,
newIndex: Qn,
newDraggableIndex: ma,
hideGhostForTarget: j2,
unhideGhostForTarget: J2,
cloneNowHidden: function() {
ga = !0;
},
cloneNowShown: function() {
ga = !1;
},
dispatchSortableEvent: function(d) {
Nn({
sortable: n,
name: d,
originalEvent: o
});
}
}, s));
};
function Nn(t) {
py(Dr({
putSortable: _n,
cloneEl: qt,
targetEl: Fe,
rootEl: Gt,
oldIndex: gi,
oldDraggableIndex: ro,
newIndex: Qn,
newDraggableIndex: ma
}, t));
}
var Fe, Vt, mt, Gt, La, Ds, qt, ga, gi, Qn, ro, ma, hs, _n, ui = !1, Gs = !1, zs = [], wa, fr, gc, fc, vf, Sf, Zi, li, ao, io = !1, Es = !1, ws, hn, hc = [], _p = !1, Hs = [], Qs = typeof document < "u", vs = $2, bf = fo || Kr ? "cssFloat" : "float", gy = Qs && !iy && !$2 && "draggable" in document.createElement("div"), Q2 = function() {
if (!!Qs) {
if (Kr)
return !1;
var t = document.createElement("x");
return t.style.cssText = "pointer-events:auto", t.style.pointerEvents === "auto";
}
}(), X2 = function(e, n) {
var a = at(e), o = parseInt(a.width) - parseInt(a.paddingLeft) - parseInt(a.paddingRight) - parseInt(a.borderLeftWidth) - parseInt(a.borderRightWidth), s = Si(e, 0, n), l = Si(e, 1, n), d = s && at(s), _ = l && at(l), c = d && parseInt(d.marginLeft) + parseInt(d.marginRight) + nn(s).width, m = _ && parseInt(_.marginLeft) + parseInt(_.marginRight) + nn(l).width;
if (a.display === "flex")
return a.flexDirection === "column" || a.flexDirection === "column-reverse" ? "vertical" : "horizontal";
if (a.display === "grid")
return a.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
if (s && d.float && d.float !== "none") {
var g = d.float === "left" ? "left" : "right";
return l && (_.clear === "both" || _.clear === g) ? "vertical" : "horizontal";
}
return s && (d.display === "block" || d.display === "flex" || d.display === "table" || d.display === "grid" || c >= o && a[bf] === "none" || l && a[bf] === "none" && c + m > o) ? "vertical" : "horizontal";
}, fy = function(e, n, a) {
var o = a ? e.left : e.top, s = a ? e.right : e.bottom, l = a ? e.width : e.height, d = a ? n.left : n.top, _ = a ? n.right : n.bottom, c = a ? n.width : n.height;
return o === d || s === _ || o + l / 2 === d + c / 2;
}, hy = function(e, n) {
var a;
return zs.some(function(o) {
var s = o[Zn].options.emptyInsertThreshold;
if (!(!s || Mp(o))) {
var l = nn(o), d = e >= l.left - s && e <= l.right + s, _ = n >= l.top - s && n <= l.bottom + s;
if (d && _)
return a = o;
}
}), a;
}, Z2 = function(e) {
function n(s, l) {
return function(d, _, c, m) {
var g = d.options.group.name && _.options.group.name && d.options.group.name === _.options.group.name;
if (s == null && (l || g))
return !0;
if (s == null || s === !1)
return !1;
if (l && s === "clone")
return s;
if (typeof s == "function")
return n(s(d, _, c, m), l)(d, _, c, m);
var C = (l ? d : _).options.group.name;
return s === !0 || typeof s == "string" && s === C || s.join && s.indexOf(C) > -1;
};
}
var a = {}, o = e.group;
(!o || Is(o) != "object") && (o = {
name: o
}), a.name = o.name, a.checkPull = n(o.pull, !0), a.checkPut = n(o.put), a.revertClone = o.revertClone, e.group = a;
}, j2 = function() {
!Q2 && mt && at(mt, "display", "none");
}, J2 = function() {
!Q2 && mt && at(mt, "display", "");
};
Qs && document.addEventListener("click", function(t) {
if (Gs)
return t.preventDefault(), t.stopPropagation && t.stopPropagation(), t.stopImmediatePropagation && t.stopImmediatePropagation(), Gs = !1, !1;
}, !0);
var Ma = function(e) {
if (Fe) {
e = e.touches ? e.touches[0] : e;
var n = hy(e.clientX, e.clientY);
if (n) {
var a = {};
for (var o in e)
e.hasOwnProperty(o) && (a[o] = e[o]);
a.target = a.rootEl = n, a.preventDefault = void 0, a.stopPropagation = void 0, n[Zn]._onDragOver(a);
}
}
}, Ey = function(e) {
Fe && Fe.parentNode[Zn]._isOutsideThisEl(e.target);
};
function it(t, e) {
if (!(t && t.nodeType && t.nodeType === 1))
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));
this.el = t, this.options = e = qr({}, e), t[Zn] = this;
var n = {
group: null,
sort: !0,
disabled: !1,
store: null,
handle: null,
draggable: /^[uo]l$/i.test(t.nodeName) ? ">li" : ">*",
swapThreshold: 1,
invertSwap: !1,
invertedSwapThreshold: null,
removeCloneOnHide: !0,
direction: function() {
return X2(t, this.options);
},
ghostClass: "sortable-ghost",
chosenClass: "sortable-chosen",
dragClass: "sortable-drag",
ignore: "a, img",
filter: null,
preventOnFilter: !0,
animation: 0,
easing: null,
setData: function(l, d) {
l.setData("Text", d.textContent);
},
dropBubble: !1,
dragoverBubble: !1,
dataIdAttr: "data-id",
delay: 0,
delayOnTouchOnly: !1,
touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
forceFallback: !1,
fallbackClass: "sortable-fallback",
fallbackOnBody: !1,
fallbackTolerance: 0,
fallbackOffset: {
x: 0,
y: 0
},
supportPointer: it.supportPointer !== !1 && "PointerEvent" in window && !to,
emptyInsertThreshold: 5
};
ho.initializePlugins(this, t, n);
for (var a in n)
!(a in e) && (e[a] = n[a]);
Z2(e);
for (var o in this)
o.charAt(0) === "_" && typeof this[o] == "function" && (this[o] = this[o].bind(this));
this.nativeDraggable = e.forceFallback ? !1 : gy, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ? At(t, "pointerdown", this._onTapStart) : (At(t, "mousedown", this._onTapStart), At(t, "touchstart", this._onTapStart)), this.nativeDraggable && (At(t, "dragover", this), At(t, "dragenter", this)), zs.push(this.el), e.store && e.store.get && this.sort(e.store.get(this) || []), qr(this, _y());
}
it.prototype = {
constructor: it,
_isOutsideThisEl: function(e) {
!this.el.contains(e) && e !== this.el && (li = null);
},
_getDirection: function(e, n) {
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, n, Fe) : this.options.direction;
},
_onTapStart: function(e) {
if (!!e.cancelable) {
var n = this, a = this.el, o = this.options, s = o.preventOnFilter, l = e.type, d = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, _ = (d || e).target, c = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || _, m = o.filter;
if (Oy(a), !Fe && !(/mousedown|pointerdown/.test(l) && e.button !== 0 || o.disabled) && !c.isContentEditable && !(!this.nativeDraggable && to && _ && _.tagName.toUpperCase() === "SELECT") && (_ = Rr(_, o.draggable, a, !1), !(_ && _.animated) && Ds !== _)) {
if (gi = _r(_), ro = _r(_, o.draggable), typeof m == "function") {
if (m.call(this, e, _, this)) {
Nn({
sortable: n,
rootEl: c,
name: "filter",
targetEl: _,
toEl: a,
fromEl: a
}), Pn("filter", n, {
evt: e
}), s && e.cancelable && e.preventDefault();
return;
}
} else if (m && (m = m.split(",").some(function(g) {
if (g = Rr(c, g.trim(), a, !1), g)
return Nn({
sortable: n,
rootEl: g,
name: "filter",
targetEl: _,
fromEl: a,
toEl: a
}), Pn("filter", n, {
evt: e
}), !0;
}), m)) {
s && e.cancelable && e.preventDefault();
return;
}
o.handle && !Rr(c, o.handle, a, !1) || this._prepareDragStart(e, d, _);
}
}
},
_prepareDragStart: function(e, n, a) {
var o = this, s = o.el, l = o.options, d = s.ownerDocument, _;
if (a && !Fe && a.parentNode === s) {
var c = nn(a);
if (Gt = s, Fe = a, Vt = Fe.parentNode, La = Fe.nextSibling, Ds = a, hs = l.group, it.dragged = Fe, wa = {
target: Fe,
clientX: (n || e).clientX,
clientY: (n || e).clientY
}, vf = wa.clientX - c.left, Sf = wa.clientY - c.top, this._lastX = (n || e).clientX, this._lastY = (n || e).clientY, Fe.style["will-change"] = "all", _ = function() {
if (Pn("delayEnded", o, {
evt: e
}), it.eventCanceled) {
o._onDrop();
return;
}
o._disableDelayedDragEvents(), !gf && o.nativeDraggable && (Fe.draggable = !0), o._triggerDragStart(e, n), Nn({
sortable: o,
name: "choose",
originalEvent: e
}), Wn(Fe, l.chosenClass, !0);
}, l.ignore.split(",").forEach(function(m) {
V2(Fe, m.trim(), Ec);
}), At(d, "dragover", Ma), At(d, "mousemove", Ma), At(d, "touchmove", Ma), At(d, "mouseup", o._onDrop), At(d, "touchend", o._onDrop), At(d, "touchcancel", o._onDrop), gf && this.nativeDraggable && (this.options.touchStartThreshold = 4, Fe.draggable = !0), Pn("delayStart", this, {
evt: e
}), l.delay && (!l.delayOnTouchOnly || n) && (!this.nativeDraggable || !(fo || Kr))) {
if (it.eventCanceled) {
this._onDrop();
return;
}
At(d, "mouseup", o._disableDelayedDrag), At(d, "touchend", o._disableDelayedDrag), At(d, "touchcancel", o._disableDelayedDrag), At(d, "mousemove", o._delayedDragTouchMoveHandler), At(d, "touchmove", o._delayedDragTouchMoveHandler), l.supportPointer && At(d, "pointermove", o._delayedDragTouchMoveHandler), o._dragStartTimer = setTimeout(_, l.delay);
} else
_();
}
},
_delayedDragTouchMoveHandler: function(e) {
var n = e.touches ? e.touches[0] : e;
Math.max(Math.abs(n.clientX - this._lastX), Math.abs(n.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
},
_disableDelayedDrag: function() {
Fe && Ec(Fe), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
},
_disableDelayedDragEvents: function() {
var e = this.el.ownerDocument;
yt(e, "mouseup", this._disableDelayedDrag), yt(e, "touchend", this._disableDelayedDrag), yt(e, "touchcancel", this._disableDelayedDrag), yt(e, "mousemove", this._delayedDragTouchMoveHandler), yt(e, "touchmove", this._delayedDragTouchMoveHandler), yt(e, "pointermove", this._delayedDragTouchMoveHandler);
},
_triggerDragStart: function(e, n) {
n = n || e.pointerType == "touch" && e, !this.nativeDraggable || n ? this.options.supportPointer ? At(document, "pointermove", this._onTouchMove) : n ? At(document, "touchmove", this._onTouchMove) : At(document, "mousemove", this._onTouchMove) : (At(Fe, "dragend", this), At(Gt, "dragstart", this._onDragStart));
try {
document.selection ? Ms(function() {
document.selection.empty();
}) : window.getSelection().removeAllRanges();
} catch {
}
},
_dragStarted: function(e, n) {
if (ui = !1, Gt && Fe) {
Pn("dragStarted", this, {
evt: n
}), this.nativeDraggable && At(document, "dragover", Ey);
var a = this.options;
!e && Wn(Fe, a.dragClass, !1), Wn(Fe, a.ghostClass, !0), it.active = this, e && this._appendGhost(), Nn({
sortable: this,
name: "start",
originalEvent: n
});
} else
this._nulling();
},
_emulateDragOver: function() {
if (fr) {
this._lastX = fr.clientX, this._lastY = fr.clientY, j2();
for (var e = document.elementFromPoint(fr.clientX, fr.clientY), n = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(fr.clientX, fr.clientY), e !== n); )
n = e;
if (Fe.parentNode[Zn]._isOutsideThisEl(e), n)
do {
if (n[Zn]) {
var a = void 0;
if (a = n[Zn]._onDragOver({
clientX: fr.clientX,
clientY: fr.clientY,
target: e,
rootEl: n
}), a && !this.options.dragoverBubble)
break;
}
e = n;
} while (n = n.parentNode);
J2();
}
},
_onTouchMove: function(e) {
if (wa) {
var n = this.options, a = n.fallbackTolerance, o = n.fallbackOffset, s = e.touches ? e.touches[0] : e, l = mt && fi(mt, !0), d = mt && l && l.a, _ = mt && l && l.d, c = vs && hn && Ef(hn), m = (s.clientX - wa.clientX + o.x) / (d || 1) + (c ? c[0] - hc[0] : 0) / (d || 1), g = (s.clientY - wa.clientY + o.y) / (_ || 1) + (c ? c[1] - hc[1] : 0) / (_ || 1);
if (!it.active && !ui) {
if (a && Math.max(Math.abs(s.clientX - this._lastX), Math.abs(s.clientY - this._lastY)) < a)
return;
this._onDragStart(e, !0);
}
if (mt) {
l ? (l.e += m - (gc || 0), l.f += g - (fc || 0)) : l = {
a: 1,
b: 0,
c: 0,
d: 1,
e: m,
f: g
};
var C = "matrix(".concat(l.a, ",").concat(l.b, ",").concat(l.c, ",").concat(l.d, ",").concat(l.e, ",").concat(l.f, ")");
at(mt, "webkitTransform", C), at(mt, "mozTransform", C), at(mt, "msTransform", C), at(mt, "transform", C), gc = m, fc = g, fr = s;
}
e.cancelable && e.preventDefault();
}
},
_appendGhost: function() {
if (!mt) {
var e = this.options.fallbackOnBody ? document.body : Gt, n = nn(Fe, !0, vs, !0, e), a = this.options;
if (vs) {
for (hn = e; at(hn, "position") === "static" && at(hn, "transform") === "none" && hn !== document; )
hn = hn.parentNode;
hn !== document.body && hn !== document.documentElement ? (hn === document && (hn = Nr()), n.top += hn.scrollTop, n.left += hn.scrollLeft) : hn = Nr(), hc = Ef(hn);
}
mt = Fe.cloneNode(!0), Wn(mt, a.ghostClass, !1), Wn(mt, a.fallbackClass, !0), Wn(mt, a.dragClass, !0), at(mt, "transition", ""), at(mt, "transform", ""), at(mt, "box-sizing", "border-box"), at(mt, "margin", 0), at(mt, "top", n.top), at(mt, "left", n.left), at(mt, "width", n.width), at(mt, "height", n.height), at(mt, "opacity", "0.8"), at(mt, "position", vs ? "absolute" : "fixed"), at(mt, "zIndex", "100000"), at(mt, "pointerEvents", "none"), it.ghost = mt, e.appendChild(mt), at(mt, "transform-origin", vf / parseInt(mt.style.width) * 100 + "% " + Sf / parseInt(mt.style.height) * 100 + "%");
}
},
_onDragStart: function(e, n) {
var a = this, o = e.dataTransfer, s = a.options;
if (Pn("dragStart", this, {
evt: e
}), it.eventCanceled) {
this._onDrop();
return;
}
Pn("setupClone", this), it.eventCanceled || (qt = K2(Fe), qt.draggable = !1, qt.style["will-change"] = "", this._hideClone(), Wn(qt, this.options.chosenClass, !1), it.clone = qt), a.cloneId = Ms(function() {
Pn("clone", a), !it.eventCanceled && (a.options.removeCloneOnHide || Gt.insertBefore(qt, Fe), a._hideClone(), Nn({
sortable: a,
name: "clone"
}));
}), !n && Wn(Fe, s.dragClass, !0), n ? (Gs = !0, a._loopId = setInterval(a._emulateDragOver, 50)) : (yt(document, "mouseup", a._onDrop), yt(document, "touchend", a._onDrop), yt(document, "touchcancel", a._onDrop), o && (o.effectAllowed = "move", s.setData && s.setData.call(a, o, Fe)), At(document, "drop", a), at(Fe, "transform", "translateZ(0)")), ui = !0, a._dragStartId = Ms(a._dragStarted.bind(a, n, e)), At(document, "selectstart", a), Zi = !0, to && at(document.body, "user-select", "none");
},
_onDragOver: function(e) {
var n = this.el, a = e.target, o, s, l, d = this.options, _ = d.group, c = it.active, m = hs === _, g = d.sort, C = _n || c, h, T = this, p = !1;
if (_p)
return;
function f(Y, H) {
Pn(Y, T, Dr({
evt: e,
isOwner: m,
axis: h ? "vertical" : "horizontal",
revert: l,
dragRect: o,
targetRect: s,
canSort: g,
fromSortable: C,
target: a,
completed: $,
onMove: function(S, R) {
return Ss(Gt, n, Fe, o, S, nn(S), e, R);
},
changed: W
}, H));
}
function B() {
f("dragOverAnimationCapture"), T.captureAnimationState(), T !== C && C.captureAnimationState();
}
function $(Y) {
return f("dragOverCompleted", {
insertion: Y
}), Y && (m ? c._hideClone() : c._showClone(T), T !== C && (Wn(Fe, _n ? _n.options.ghostClass : c.options.ghostClass, !1), Wn(Fe, d.ghostClass, !0)), _n !== T && T !== it.active ? _n = T : T === it.active && _n && (_n = null), C === T && (T._ignoreWhileAnimating = a), T.animateAll(function() {
f("dragOverAnimationComplete"), T._ignoreWhileAnimating = null;
}), T !== C && (C.animateAll(), C._ignoreWhileAnimating = null)), (a === Fe && !Fe.animated || a === n && !a.animated) && (li = null), !d.dragoverBubble && !e.rootEl && a !== document && (Fe.parentNode[Zn]._isOutsideThisEl(e.target), !Y && Ma(e)), !d.dragoverBubble && e.stopPropagation && e.stopPropagation(), p = !0;
}
function W() {
Qn = _r(Fe), ma = _r(Fe, d.draggable), Nn({
sortable: T,
name: "change",
toEl: n,
newIndex: Qn,
newDraggableIndex: ma,
originalEvent: e
});
}
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), a = Rr(a, d.draggable, n, !0), f("dragOver"), it.eventCanceled)
return p;
if (Fe.contains(e.target) || a.animated && a.animatingX && a.animatingY || T._ignoreWhileAnimating === a)
return $(!1);
if (Gs = !1, c && !d.disabled && (m ? g || (l = Vt !== Gt) : _n === this || (this.lastPutMode = hs.checkPull(this, c, Fe, e)) && _.checkPut(this, c, Fe, e))) {
if (h = this._getDirection(e, a) === "vertical", o = nn(Fe), f("dragOverValid"), it.eventCanceled)
return p;
if (l)
return Vt = Gt, B(), this._hideClone(), f("revert"), it.eventCanceled || (La ? Gt.insertBefore(Fe, La) : Gt.appendChild(Fe)), $(!0);
var w = Mp(n, d.draggable);
if (!w || Ty(e, h, this) && !w.animated) {
if (w === Fe)
return $(!1);
if (w && n === e.target && (a = w), a && (s = nn(a)), Ss(Gt, n, Fe, o, a, s, e, !!a) !== !1)
return B(), n.appendChild(Fe), Vt = n, W(), $(!0);
} else if (w && by(e, h, this)) {
var x = Si(n, 0, d, !0);
if (x === Fe)
return $(!1);
if (a = x, s = nn(a), Ss(Gt, n, Fe, o, a, s, e, !1) !== !1)
return B(), n.insertBefore(Fe, x), Vt = n, W(), $(!0);
} else if (a.parentNode === n) {
s = nn(a);
var E = 0, I, y = Fe.parentNode !== n, P = !fy(Fe.animated && Fe.toRect || o, a.animated && a.toRect || s, h), Z = h ? "top" : "left", A = hf(a, "top", "top") || hf(Fe, "top", "top"), L = A ? A.scrollTop : void 0;
li !== a && (I = s[Z], io = !1, Es = !P && d.invertSwap || y), E = Cy(e, a, s, h, P ? 1 : d.swapThreshold, d.invertedSwapThreshold == null ? d.swapThreshold : d.invertedSwapThreshold, Es, li === a);
var F;
if (E !== 0) {
var K = _r(Fe);
do
K -= E, F = Vt.children[K];
while (F && (at(F, "display") === "none" || F === mt));
}
if (E === 0 || F === a)
return $(!1);
li = a, ao = E;
var D = a.nextElementSibling, O = !1;
O = E === 1;
var U = Ss(Gt, n, Fe, o, a, s, e, O);
if (U !== !1)
return (U === 1 || U === -1) && (O = U === 1), _p = !0, setTimeout(Sy, 30), B(), O && !D ? n.appendChild(Fe) : a.parentNode.insertBefore(Fe, O ? D : a), A && W2(A, 0, L - A.scrollTop), Vt = Fe.parentNode, I !== void 0 && !Es && (ws = Math.abs(I - nn(a)[Z])), W(), $(!0);
}
if (n.contains(Fe))
return $(!1);
}
return !1;
},
_ignoreWhileAnimating: null,
_offMoveEvents: function() {
yt(document, "mousemove", this._onTouchMove), yt(document, "touchmove", this._onTouchMove), yt(document, "pointermove", this._onTouchMove), yt(document, "dragover", Ma), yt(document, "mousemove", Ma), yt(document, "touchmove", Ma);
},
_offUpEvents: function() {
var e = this.el.ownerDocument;
yt(e, "mouseup", this._onDrop), yt(e, "touchend", this._onDrop), yt(e, "pointerup", this._onDrop), yt(e, "touchcancel", this._onDrop), yt(document, "selectstart", this);
},
_onDrop: function(e) {
var n = this.el, a = this.options;
if (Qn = _r(Fe), ma = _r(Fe, a.draggable), Pn("drop", this, {
evt: e
}), Vt = Fe && Fe.parentNode, Qn = _r(Fe), ma = _r(Fe, a.draggable), it.eventCanceled) {
this._nulling();
return;
}
ui = !1, Es = !1, io = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), up(this.cloneId), up(this._dragStartId), this.nativeDraggable && (yt(document, "drop", this), yt(n, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), to && at(document.body, "user-select", ""), at(Fe, "transform", ""), e && (Zi && (e.cancelable && e.preventDefault(), !a.dropBubble && e.stopPropagation()), mt && mt.parentNode && mt.parentNode.removeChild(mt), (Gt === Vt || _n && _n.lastPutMode !== "clone") && qt && qt.parentNode && qt.parentNode.removeChild(qt), Fe && (this.nativeDraggable && yt(Fe, "dragend", this), Ec(Fe), Fe.style["will-change"] = "", Zi && !ui && Wn(Fe, _n ? _n.options.ghostClass : this.options.ghostClass, !1), Wn(Fe, this.options.chosenClass, !1), Nn({
sortable: this,
name: "unchoose",
toEl: Vt,
newIndex: null,
newDraggableIndex: null,
originalEvent: e
}), Gt !== Vt ? (Qn >= 0 && (Nn({
rootEl: Vt,
name: "add",
toEl: Vt,
fromEl: Gt,
originalEvent: e
}), Nn({
sortable: this,
name: "remove",
toEl: Vt,
originalEvent: e
}), Nn({
rootEl: Vt,
name: "sort",
toEl: Vt,
fromEl: Gt,
originalEvent: e
}), Nn({
sortable: this,
name: "sort",
toEl: Vt,
originalEvent: e
})), _n && _n.save()) : Qn !== gi && Qn >= 0 && (Nn({
sortable: this,
name: "update",
toEl: Vt,
originalEvent: e
}), Nn({
sortable: this,
name: "sort",
toEl: Vt,
originalEvent: e
})), it.active && ((Qn == null || Qn === -1) && (Qn = gi, ma = ro), Nn({
sortable: this,
name: "end",
toEl: Vt,
originalEvent: e
}), this.save()))), this._nulling();
},
_nulling: function() {
Pn("nulling", this), Gt = Fe = Vt = mt = La = qt = Ds = ga = wa = fr = Zi = Qn = ma = gi = ro = li = ao = _n = hs = it.dragged = it.ghost = it.clone = it.active = null, Hs.forEach(function(e) {
e.checked = !0;
}), Hs.length = gc = fc = 0;
},
handleEvent: function(e) {
switch (e.type) {
case "drop":
case "dragend":
this._onDrop(e);
break;
case "dragenter":
case "dragover":
Fe && (this._onDragOver(e), vy(e));
break;
case "selectstart":
e.preventDefault();
break;
}
},
toArray: function() {
for (var e = [], n, a = this.el.children, o = 0, s = a.length, l = this.options; o < s; o++)
n = a[o], Rr(n, l.draggable, this.el, !1) && e.push(n.getAttribute(l.dataIdAttr) || yy(n));
return e;
},
sort: function(e, n) {
var a = {}, o = this.el;
this.toArray().forEach(function(s, l) {
var d = o.children[l];
Rr(d, this.options.draggable, o, !1) && (a[s] = d);
}, this), n && this.captureAnimationState(), e.forEach(function(s) {
a[s] && (o.removeChild(a[s]), o.appendChild(a[s]));
}), n && this.animateAll();
},
save: function() {
var e = this.options.store;
e && e.set && e.set(this);
},
closest: function(e, n) {
return Rr(e, n || this.options.draggable, this.el, !1);
},
option: function(e, n) {
var a = this.options;
if (n === void 0)
return a[e];
var o = ho.modifyOption(this, e, n);
typeof o < "u" ? a[e] = o : a[e] = n, e === "group" && Z2(a);
},
destroy: function() {
Pn("destroy", this);
var e = this.el;
e[Zn] = null, yt(e, "mousedown", this._onTapStart), yt(e, "touchstart", this._onTapStart), yt(e, "pointerdown", this._onTapStart), this.nativeDraggable && (yt(e, "dragover", this), yt(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(n) {
n.removeAttribute("draggable");
}), this._onDrop(), this._disableDelayedDragEvents(), zs.splice(zs.indexOf(this.el), 1), this.el = e = null;
},
_hideClone: function() {
if (!ga) {
if (Pn("hideClone", this), it.eventCanceled)
return;
at(qt, "display", "none"), this.options.removeCloneOnHide && qt.parentNode && qt.parentNode.removeChild(qt), ga = !0;
}
},
_showClone: function(e) {
if (e.lastPutMode !== "clone") {
this._hideClone();
return;
}
if (ga) {
if (Pn("showClone", this), it.eventCanceled)
return;
Fe.parentNode == Gt && !this.options.group.revertClone ? Gt.insertBefore(qt, Fe) : La ? Gt.insertBefore(qt, La) : Gt.appendChild(qt), this.options.group.revertClone && this.animate(Fe, qt), at(qt, "display", ""), ga = !1;
}
}
};
function vy(t) {
t.dataTransfer && (t.dataTransfer.dropEffect = "move"), t.cancelable && t.preventDefault();
}
function Ss(t, e, n, a, o, s, l, d) {
var _, c = t[Zn], m = c.options.onMove, g;
return window.CustomEvent && !Kr && !fo ? _ = new CustomEvent("move", {
bubbles: !0,
cancelable: !0
}) : (_ = document.createEvent("Event"), _.initEvent("move", !0, !0)), _.to = e, _.from = t, _.dragged = n, _.draggedRect = a, _.related = o || e, _.relatedRect = s || nn(e), _.willInsertAfter = d, _.originalEvent = l, t.dispatchEvent(_), m && (g = m.call(c, _, l)), g;
}
function Ec(t) {
t.draggable = !1;
}
function Sy() {
_p = !1;
}
function by(t, e, n) {
var a = nn(Si(n.el, 0, n.options, !0)), o = 10;
return e ? t.clientX < a.left - o || t.clientY < a.top && t.clientX < a.right : t.clientY < a.top - o || t.clientY < a.bottom && t.clientX < a.left;
}
function Ty(t, e, n) {
var a = nn(Mp(n.el, n.options.draggable)), o = 10;
return e ? t.clientX > a.right + o || t.clientX <= a.right && t.clientY > a.bottom && t.clientX >= a.left : t.clientX > a.right && t.clientY > a.top || t.clientX <= a.right && t.clientY > a.bottom + o;
}
function Cy(t, e, n, a, o, s, l, d) {
var _ = a ? t.clientY : t.clientX, c = a ? n.height : n.width, m = a ? n.top : n.left, g = a ? n.bottom : n.right, C = !1;
if (!l) {
if (d && ws < c * o) {
if (!io && (ao === 1 ? _ > m + c * s / 2 : _ < g - c * s / 2) && (io = !0), io)
C = !0;
else if (ao === 1 ? _ < m + ws : _ > g - ws)
return -ao;
} else if (_ > m + c * (1 - o) / 2 && _ < g - c * (1 - o) / 2)
return Ry(e);
}
return C = C || l, C && (_ < m + c * s / 2 || _ > g - c * s / 2) ? _ > m + c / 2 ? 1 : -1 : 0;
}
function Ry(t) {
return _r(Fe) < _r(t) ? 1 : -1;
}
function yy(t) {
for (var e = t.tagName + t.className + t.src + t.href + t.textContent, n = e.length, a = 0; n--; )
a += e.charCodeAt(n);
return a.toString(36);
}
function Oy(t) {
Hs.length = 0;
for (var e = t.getElementsByTagName("input"), n = e.length; n--; ) {
var a = e[n];
a.checked && Hs.push(a);
}
}
function Ms(t) {
return setTimeout(t, 0);
}
function up(t) {
return clearTimeout(t);
}
Qs && At(document, "touchmove", function(t) {
(it.active || ui) && t.cancelable && t.preventDefault();
});
it.utils = {
on: At,
off: yt,
css: at,
find: V2,
is: function(e, n) {
return !!Rr(e, n, e, !1);
},
extend: ly,
throttle: q2,
closest: Rr,
toggleClass: Wn,
clone: K2,
index: _r,
nextTick: Ms,
cancelNextTick: up,
detectDirection: X2,
getChild: Si
};
it.get = function(t) {
return t[Zn];
};
it.mount = function() {
for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
e[n] = arguments[n];
e[0].constructor === Array && (e = e[0]), e.forEach(function(a) {
if (!a.prototype || !a.prototype.constructor)
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(a));
a.utils && (it.utils = Dr(Dr({}, it.utils), a.utils)), ho.mount(a);
});
};
it.create = function(t, e) {
return new it(t, e);
};
it.version = ay;
var jt = [], ji, dp, pp = !1, vc, Sc, $s, Ji;
function Ny() {
function t() {
this.defaults = {
scroll: !0,
forceAutoScrollFallback: !1,
scrollSensitivity: 30,
scrollSpeed: 10,
bubbleScroll: !0
};
for (var e in this)
e.charAt(0) === "_" && typeof this[e] == "function" && (this[e] = this[e].bind(this));
}
return t.prototype = {
dragStarted: function(n) {
var a = n.originalEvent;
this.sortable.nativeDraggable ? At(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? At(document, "pointermove", this._handleFallbackAutoScroll) : a.touches ? At(document, "touchmove", this._handleFallbackAutoScroll) : At(document, "mousemove", this._handleFallbackAutoScroll);
},
dragOverCompleted: function(n) {
var a = n.originalEvent;
!this.options.dragOverBubble && !a.rootEl && this._handleAutoScroll(a);
},
drop: function() {
this.sortable.nativeDraggable ? yt(document, "dragover", this._handleAutoScroll) : (yt(document, "pointermove", this._handleFallbackAutoScroll), yt(document, "touchmove", this._handleFallbackAutoScroll), yt(document, "mousemove", this._handleFallbackAutoScroll)), Tf(), xs(), cy();
},
nulling: function() {
$s = dp = ji = pp = Ji = vc = Sc = null, jt.length = 0;
},
_handleFallbackAutoScroll: function(n) {
this._handleAutoScroll(n, !0);
},
_handleAutoScroll: function(n, a) {
var o = this, s = (n.touches ? n.touches[0] : n).clientX, l = (n.touches ? n.touches[0] : n).clientY, d = document.elementFromPoint(s, l);
if ($s = n, a || this.options.forceAutoScrollFallback || fo || Kr || to) {
bc(n, this.options, d, a);
var _ = fa(d, !0);
pp && (!Ji || s !== vc || l !== Sc) && (Ji && Tf(), Ji = setInterval(function() {
var c = fa(document.elementFromPoint(s, l), !0);
c !== _ && (_ = c, xs()), bc(n, o.options, c, a);
}, 10), vc = s, Sc = l);
} else {
if (!this.options.bubbleScroll || fa(d, !0) === Nr()) {
xs();
return;
}
bc(n, this.options, fa(d, !1), !1);
}
}
}, qr(t, {
pluginName: "scroll",
initializeByDefault: !0
});
}
function xs() {
jt.forEach(function(t) {
clearInterval(t.pid);
}), jt = [];
}
function Tf() {
clearInterval(Ji);
}
var bc = q2(function(t, e, n, a) {
if (!!e.scroll) {
var o = (t.touches ? t.touches[0] : t).clientX, s = (t.touches ? t.touches[0] : t).clientY, l = e.scrollSensitivity, d = e.scrollSpeed, _ = Nr(), c = !1, m;
dp !== n && (dp = n, xs(), ji = e.scroll, m = e.scrollFn, ji === !0 && (ji = fa(n, !0)));
var g = 0, C = ji;
do {
var h = C, T = nn(h), p = T.top, f = T.bottom, B = T.left, $ = T.right, W = T.width, w = T.height, x = void 0, E = void 0, I = h.scrollWidth, y = h.scrollHeight, P = at(h), Z = h.scrollLeft, A = h.scrollTop;
h === _ ? (x = W < I && (P.overflowX === "auto" || P.overflowX === "scroll" || P.overflowX === "visible"), E = w < y && (P.overflowY === "auto" || P.overflowY === "scroll" || P.overflowY === "visible")) : (x = W < I && (P.overflowX === "auto" || P.overflowX === "scroll"), E = w < y && (P.overflowY === "auto" || P.overflowY === "scroll"));
var L = x && (Math.abs($ - o) <= l && Z + W < I) - (Math.abs(B - o) <= l && !!Z), F = E && (Math.abs(f - s) <= l && A + w < y) - (Math.abs(p - s) <= l && !!A);
if (!jt[g])
for (var K = 0; K <= g; K++)
jt[K] || (jt[K] = {});
(jt[g].vx != L || jt[g].vy != F || jt[g].el !== h) && (jt[g].el = h, jt[g].vx = L, jt[g].vy = F, clearInterval(jt[g].pid), (L != 0 || F != 0) && (c = !0, jt[g].pid = setInterval(function() {
a && this.layer === 0 && it.active._onTouchMove($s);
var D = jt[this.layer].vy ? jt[this.layer].vy * d : 0, O = jt[this.layer].vx ? jt[this.layer].vx * d : 0;
typeof m == "function" && m.call(it.dragged.parentNode[Zn], O, D, t, $s, jt[this.layer].el) !== "continue" || W2(jt[this.layer].el, O, D);
}.bind({
layer: g
}), 24))), g++;
} while (e.bubbleScroll && C !== _ && (C = fa(C, !1)));
pp = c;
}
}, 30), ev = function(e) {
var n = e.originalEvent, a = e.putSortable, o = e.dragEl, s = e.activeSortable, l = e.dispatchSortableEvent, d = e.hideGhostForTarget, _ = e.unhideGhostForTarget;
if (!!n) {
var c = a || s;
d();
var m = n.changedTouches && n.changedTouches.length ? n.changedTouches[0] : n, g = document.elementFromPoint(m.clientX, m.clientY);
_(), c && !c.el.contains(g) && (l("spill"), this.onSpill({
dragEl: o,
putSortable: a
}));
}
};
function xp() {
}
xp.prototype = {
startIndex: null,
dragStart: function(e) {
var n = e.oldDraggableIndex;
this.startIndex = n;
},
onSpill: function(e) {
var n = e.dragEl, a = e.putSortable;
this.sortable.captureAnimationState(), a && a.captureAnimationState();
var o = Si(this.sortable.el, this.startIndex, this.options);
o ? this.sortable.el.insertBefore(n, o) : this.sortable.el.appendChild(n), this.sortable.animateAll(), a && a.animateAll();
},
drop: ev
};
qr(xp, {
pluginName: "revertOnSpill"
});
function Lp() {
}
Lp.prototype = {
onSpill: function(e) {
var n = e.dragEl, a = e.putSortable, o = a || this.sortable;
o.captureAnimationState(), n.parentNode && n.parentNode.removeChild(n), o.animateAll();
},
drop: ev
};
qr(Lp, {
pluginName: "removeOnSpill"
});
it.mount(new Ny());
it.mount(Lp, xp);
function Ay() {
return typeof window < "u" ? window.console : global.console;
}
const Iy = Ay();
function Dy(t) {
const e = /* @__PURE__ */ Object.create(null);
return function(a) {
return e[a] || (e[a] = t(a));
};
}
const wy = /-(\w)/g, Cf = Dy((t) => t.replace(wy, (e, n) => n ? n.toUpperCase() : ""));
functi