UNPKG

wui-print

Version:

前端打印插件,包含打印设计器、打印表单、打印API

1,206 lines 2.04 MB
import { reactive as Oe, toRefs as Di, inject as te, onMounted as _t, createElementBlock as E, openBlock as B, createElementVNode as A, Fragment as fe, renderList as Ce, unref as r, toDisplayString as _e, normalizeClass as pe, pushScopeId as Ue, popScopeId as Ee, ref as X, readonly as Qv, getCurrentScope as Vv, onScopeDispose as Kh, getCurrentInstance as mn, nextTick as ct, watch as F, defineComponent as mt, warn as Wv, computed as M, watchEffect as Uv, onBeforeUnmount as yn, isRef as Qe, shallowRef as Kr, provide as yo, renderSlot as gt, mergeProps as rt, toRef as es, onUnmounted as Ev, useAttrs as Zv, useSlots as bu, createCommentVNode as ye, createBlock as Z, withCtx as R, resolveDynamicComponent as To, withModifiers as Ie, createVNode as S, normalizeStyle as ce, Transition as yu, withDirectives as Le, vShow as $e, Text as Hv, h as zv, shallowReactive as Fv, isVNode as Us, render as ts, markRaw as dc, resolveComponent as W, withKeys as ea, createTextVNode as j, createSlots as Qo } from "vue"; /**! * Sortable 1.15.6 * @author RubaXa <trash@rubaxa.org> * @author owenm <owen23355@gmail.com> * @license MIT */ function fc(n, e) { var o = Object.keys(n); if (Object.getOwnPropertySymbols) { var t = Object.getOwnPropertySymbols(n); e && (t = t.filter(function(l) { return Object.getOwnPropertyDescriptor(n, l).enumerable; })), o.push.apply(o, t); } return o; } function hn(n) { for (var e = 1; e < arguments.length; e++) { var o = arguments[e] != null ? arguments[e] : {}; e % 2 ? fc(Object(o), !0).forEach(function(t) { jv(n, t, o[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(o)) : fc(Object(o)).forEach(function(t) { Object.defineProperty(n, t, Object.getOwnPropertyDescriptor(o, t)); }); } return n; } function Ma(n) { "@babel/helpers - typeof"; return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Ma = function(e) { return typeof e; } : Ma = function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, Ma(n); } function jv(n, e, o) { return e in n ? Object.defineProperty(n, e, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = o, n; } function Tn() { return Tn = Object.assign || function(n) { for (var e = 1; e < arguments.length; e++) { var o = arguments[e]; for (var t in o) Object.prototype.hasOwnProperty.call(o, t) && (n[t] = o[t]); } return n; }, Tn.apply(this, arguments); } function Xv(n, e) { if (n == null) return {}; var o = {}, t = Object.keys(n), l, i; for (i = 0; i < t.length; i++) l = t[i], !(e.indexOf(l) >= 0) && (o[l] = n[l]); return o; } function Nv(n, e) { if (n == null) return {}; var o = Xv(n, e), t, l; if (Object.getOwnPropertySymbols) { var i = Object.getOwnPropertySymbols(n); for (l = 0; l < i.length; l++) t = i[l], !(e.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(n, t) && (o[t] = n[t]); } return o; } var qv = "1.15.6"; function Sn(n) { if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(n); } var Rn = Sn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Qi = Sn(/Edge/i), uc = Sn(/firefox/i), Jr = Sn(/safari/i) && !Sn(/chrome/i) && !Sn(/android/i), Ou = Sn(/iP(ad|od|hone)/i), Jh = Sn(/chrome/i) && Sn(/android/i), eg = { capture: !1, passive: !1 }; function et(n, e, o) { n.addEventListener(e, o, !Rn && eg); } function Je(n, e, o) { n.removeEventListener(e, o, !Rn && eg); } function os(n, e) { if (e) { if (e[0] === ">" && (e = e.substring(1)), n) try { if (n.matches) return n.matches(e); if (n.msMatchesSelector) return n.msMatchesSelector(e); if (n.webkitMatchesSelector) return n.webkitMatchesSelector(e); } catch { return !1; } return !1; } } function tg(n) { return n.host && n !== document && n.host.nodeType ? n.host : n.parentNode; } function zo(n, e, o, t) { if (n) { o = o || document; do { if (e != null && (e[0] === ">" ? n.parentNode === o && os(n, e) : os(n, e)) || t && n === o) return n; if (n === o) break; } while (n = tg(n)); } return null; } var pc = /\s+/g; function xo(n, e, o) { if (n && e) if (n.classList) n.classList[o ? "add" : "remove"](e); else { var t = (" " + n.className + " ").replace(pc, " ").replace(" " + e + " ", " "); n.className = (t + (o ? " " + e : "")).replace(pc, " "); } } function De(n, e, o) { var t = n && n.style; if (t) { if (o === void 0) return document.defaultView && document.defaultView.getComputedStyle ? o = document.defaultView.getComputedStyle(n, "") : n.currentStyle && (o = n.currentStyle), e === void 0 ? o : o[e]; !(e in t) && e.indexOf("webkit") === -1 && (e = "-webkit-" + e), t[e] = o + (typeof o == "string" ? "" : "px"); } } function or(n, e) { var o = ""; if (typeof n == "string") o = n; else do { var t = De(n, "transform"); t && t !== "none" && (o = t + " " + o); } while (!e && (n = n.parentNode)); var l = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix; return l && new l(o); } function og(n, e, o) { if (n) { var t = n.getElementsByTagName(e), l = 0, i = t.length; if (o) for (; l < i; l++) o(t[l], l); return t; } return []; } function pn() { var n = document.scrollingElement; return n || document.documentElement; } function $t(n, e, o, t, l) { if (!(!n.getBoundingClientRect && n !== window)) { var i, s, d, f, u, c, h; if (n !== window && n.parentNode && n !== pn() ? (i = n.getBoundingClientRect(), s = i.top, d = i.left, f = i.bottom, u = i.right, c = i.height, h = i.width) : (s = 0, d = 0, f = window.innerHeight, u = window.innerWidth, c = window.innerHeight, h = window.innerWidth), (e || o) && n !== window && (l = l || n.parentNode, !Rn)) do if (l && l.getBoundingClientRect && (De(l, "transform") !== "none" || o && De(l, "position") !== "static")) { var b = l.getBoundingClientRect(); s -= b.top + parseInt(De(l, "border-top-width")), d -= b.left + parseInt(De(l, "border-left-width")), f = s + i.height, u = d + i.width; break; } while (l = l.parentNode); if (t && n !== window) { var O = or(l || n), p = O && O.a, v = O && O.d; O && (s /= v, d /= p, h /= p, c /= v, f = s + c, u = d + h); } return { top: s, left: d, bottom: f, right: u, width: h, height: c }; } } function cc(n, e, o) { for (var t = Fn(n, !0), l = $t(n)[e]; t; ) { var i = $t(t)[o], s = void 0; if (s = l >= i, !s) return t; if (t === pn()) break; t = Fn(t, !1); } return !1; } function dr(n, e, o, t) { for (var l = 0, i = 0, s = n.children; i < s.length; ) { if (s[i].style.display !== "none" && s[i] !== Re.ghost && (t || s[i] !== Re.dragged) && zo(s[i], o.draggable, n, !1)) { if (l === e) return s[i]; l++; } i++; } return null; } function vu(n, e) { for (var o = n.lastElementChild; o && (o === Re.ghost || De(o, "display") === "none" || e && !os(o, e)); ) o = o.previousElementSibling; return o || null; } function Lo(n, e) { var o = 0; if (!n || !n.parentNode) return -1; for (; n = n.previousElementSibling; ) n.nodeName.toUpperCase() !== "TEMPLATE" && n !== Re.clone && (!e || os(n, e)) && o++; return o; } function mc(n) { var e = 0, o = 0, t = pn(); if (n) do { var l = or(n), i = l.a, s = l.d; e += n.scrollLeft * i, o += n.scrollTop * s; } while (n !== t && (n = n.parentNode)); return [e, o]; } function Yv(n, e) { for (var o in n) if (n.hasOwnProperty(o)) { for (var t in e) if (e.hasOwnProperty(t) && e[t] === n[o][t]) return Number(o); } return -1; } function Fn(n, e) { if (!n || !n.getBoundingClientRect) return pn(); var o = n, t = !1; do if (o.clientWidth < o.scrollWidth || o.clientHeight < o.scrollHeight) { var l = De(o); if (o.clientWidth < o.scrollWidth && (l.overflowX == "auto" || l.overflowX == "scroll") || o.clientHeight < o.scrollHeight && (l.overflowY == "auto" || l.overflowY == "scroll")) { if (!o.getBoundingClientRect || o === document.body) return pn(); if (t || e) return o; t = !0; } } while (o = o.parentNode); return pn(); } function Gv(n, e) { if (n && e) for (var o in e) e.hasOwnProperty(o) && (n[o] = e[o]); return n; } function hd(n, e) { return Math.round(n.top) === Math.round(e.top) && Math.round(n.left) === Math.round(e.left) && Math.round(n.height) === Math.round(e.height) && Math.round(n.width) === Math.round(e.width); } var ei; function ng(n, e) { return function() { if (!ei) { var o = arguments, t = this; o.length === 1 ? n.call(t, o[0]) : n.apply(t, o), ei = setTimeout(function() { ei = void 0; }, e); } }; } function Kv() { clearTimeout(ei), ei = void 0; } function lg(n, e, o) { n.scrollLeft += e, n.scrollTop += o; } function rg(n) { var e = window.Polymer, o = window.jQuery || window.Zepto; return e && e.dom ? e.dom(n).cloneNode(!0) : o ? o(n).clone(!0)[0] : n.cloneNode(!0); } function ig(n, e, o) { var t = {}; return Array.from(n.children).forEach(function(l) { var i, s, d, f; if (!(!zo(l, e.draggable, n, !1) || l.animated || l === o)) { var u = $t(l); t.left = Math.min((i = t.left) !== null && i !== void 0 ? i : 1 / 0, u.left), t.top = Math.min((s = t.top) !== null && s !== void 0 ? s : 1 / 0, u.top), t.right = Math.max((d = t.right) !== null && d !== void 0 ? d : -1 / 0, u.right), t.bottom = Math.max((f = t.bottom) !== null && f !== void 0 ? f : -1 / 0, u.bottom); } }), t.width = t.right - t.left, t.height = t.bottom - t.top, t.x = t.left, t.y = t.top, t; } var mo = "Sortable" + (/* @__PURE__ */ new Date()).getTime(); function Jv() { var n = [], e; return { captureAnimationState: function() { if (n = [], !!this.options.animation) { var t = [].slice.call(this.el.children); t.forEach(function(l) { if (!(De(l, "display") === "none" || l === Re.ghost)) { n.push({ target: l, rect: $t(l) }); var i = hn({}, n[n.length - 1].rect); if (l.thisAnimationDuration) { var s = or(l, !0); s && (i.top -= s.f, i.left -= s.e); } l.fromRect = i; } }); } }, addAnimationState: function(t) { n.push(t); }, removeAnimationState: function(t) { n.splice(Yv(n, { target: t }), 1); }, animateAll: function(t) { var l = this; if (!this.options.animation) { clearTimeout(e), typeof t == "function" && t(); return; } var i = !1, s = 0; n.forEach(function(d) { var f = 0, u = d.target, c = u.fromRect, h = $t(u), b = u.prevFromRect, O = u.prevToRect, p = d.rect, v = or(u, !0); v && (h.top -= v.f, h.left -= v.e), u.toRect = h, u.thisAnimationDuration && hd(b, h) && !hd(c, h) && // Make sure animatingRect is on line between toRect & fromRect (p.top - h.top) / (p.left - h.left) === (c.top - h.top) / (c.left - h.left) && (f = tC(p, b, O, l.options)), hd(h, c) || (u.prevFromRect = c, u.prevToRect = h, f || (f = l.options.animation), l.animate(u, p, h, f)), f && (i = !0, s = Math.max(s, f), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() { u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null; }, f), u.thisAnimationDuration = f); }), clearTimeout(e), i ? e = setTimeout(function() { typeof t == "function" && t(); }, s) : typeof t == "function" && t(), n = []; }, animate: function(t, l, i, s) { if (s) { De(t, "transition", ""), De(t, "transform", ""); var d = or(this.el), f = d && d.a, u = d && d.d, c = (l.left - i.left) / (f || 1), h = (l.top - i.top) / (u || 1); t.animatingX = !!c, t.animatingY = !!h, De(t, "transform", "translate3d(" + c + "px," + h + "px,0)"), this.forRepaintDummy = eC(t), De(t, "transition", "transform " + s + "ms" + (this.options.easing ? " " + this.options.easing : "")), De(t, "transform", "translate3d(0,0,0)"), typeof t.animated == "number" && clearTimeout(t.animated), t.animated = setTimeout(function() { De(t, "transition", ""), De(t, "transform", ""), t.animated = !1, t.animatingX = !1, t.animatingY = !1; }, s); } } }; } function eC(n) { return n.offsetWidth; } function tC(n, e, o, t) { return Math.sqrt(Math.pow(e.top - n.top, 2) + Math.pow(e.left - n.left, 2)) / Math.sqrt(Math.pow(e.top - o.top, 2) + Math.pow(e.left - o.left, 2)) * t.animation; } var Fl = [], gd = { initializeByDefault: !0 }, Vi = { mount: function(e) { for (var o in gd) gd.hasOwnProperty(o) && !(o in e) && (e[o] = gd[o]); Fl.forEach(function(t) { if (t.pluginName === e.pluginName) throw "Sortable: Cannot mount plugin ".concat(e.pluginName, " more than once"); }), Fl.push(e); }, pluginEvent: function(e, o, t) { var l = this; this.eventCanceled = !1, t.cancel = function() { l.eventCanceled = !0; }; var i = e + "Global"; Fl.forEach(function(s) { o[s.pluginName] && (o[s.pluginName][i] && o[s.pluginName][i](hn({ sortable: o }, t)), o.options[s.pluginName] && o[s.pluginName][e] && o[s.pluginName][e](hn({ sortable: o }, t))); }); }, initializePlugins: function(e, o, t, l) { Fl.forEach(function(d) { var f = d.pluginName; if (!(!e.options[f] && !d.initializeByDefault)) { var u = new d(e, o, e.options); u.sortable = e, u.options = e.options, e[f] = u, Tn(t, u.defaults); } }); for (var i in e.options) if (e.options.hasOwnProperty(i)) { var s = this.modifyOption(e, i, e.options[i]); typeof s < "u" && (e.options[i] = s); } }, getEventProperties: function(e, o) { var t = {}; return Fl.forEach(function(l) { typeof l.eventProperties == "function" && Tn(t, l.eventProperties.call(o[l.pluginName], e)); }), t; }, modifyOption: function(e, o, t) { var l; return Fl.forEach(function(i) { e[i.pluginName] && i.optionListeners && typeof i.optionListeners[o] == "function" && (l = i.optionListeners[o].call(e[i.pluginName], t)); }), l; } }; function oC(n) { var e = n.sortable, o = n.rootEl, t = n.name, l = n.targetEl, i = n.cloneEl, s = n.toEl, d = n.fromEl, f = n.oldIndex, u = n.newIndex, c = n.oldDraggableIndex, h = n.newDraggableIndex, b = n.originalEvent, O = n.putSortable, p = n.extraEventProperties; if (e = e || o && o[mo], !!e) { var v, y = e.options, a = "on" + t.charAt(0).toUpperCase() + t.substr(1); window.CustomEvent && !Rn && !Qi ? v = new CustomEvent(t, { bubbles: !0, cancelable: !0 }) : (v = document.createEvent("Event"), v.initEvent(t, !0, !0)), v.to = s || o, v.from = d || o, v.item = l || o, v.clone = i, v.oldIndex = f, v.newIndex = u, v.oldDraggableIndex = c, v.newDraggableIndex = h, v.originalEvent = b, v.pullMode = O ? O.lastPutMode : void 0; var _ = hn(hn({}, p), Vi.getEventProperties(t, e)); for (var C in _) v[C] = _[C]; o && o.dispatchEvent(v), y[a] && y[a].call(e, v); } } var nC = ["evt"], so = function(e, o) { var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, l = t.evt, i = Nv(t, nC); Vi.pluginEvent.bind(Re)(e, o, hn({ dragEl: me, parentEl: wt, ghostEl: He, rootEl: vt, nextEl: Cl, lastDownEl: Da, cloneEl: xt, cloneHidden: Hn, dragStarted: Hr, putSortable: Ht, activeSortable: Re.active, originalEvent: l, oldIndex: Kl, oldDraggableIndex: ti, newIndex: So, newDraggableIndex: Un, hideGhostForTarget: fg, unhideGhostForTarget: ug, cloneNowHidden: function() { Hn = !0; }, cloneNowShown: function() { Hn = !1; }, dispatchSortableEvent: function(d) { lo({ sortable: o, name: d, originalEvent: l }); } }, i)); }; function lo(n) { oC(hn({ putSortable: Ht, cloneEl: xt, targetEl: me, rootEl: vt, oldIndex: Kl, oldDraggableIndex: ti, newIndex: So, newDraggableIndex: Un }, n)); } var me, wt, He, vt, Cl, Da, xt, Hn, Kl, So, ti, Un, ta, Ht, Nl = !1, ns = !1, ls = [], bl, Wo, bd, yd, hc, gc, Hr, jl, oi, ni = !1, oa = !1, Qa, Kt, Od = [], af = !1, rs = [], Es = typeof document < "u", na = Ou, bc = Qi || Rn ? "cssFloat" : "float", lC = Es && !Jh && !Ou && "draggable" in document.createElement("div"), ag = function() { if (Es) { if (Rn) return !1; var n = document.createElement("x"); return n.style.cssText = "pointer-events:auto", n.style.pointerEvents === "auto"; } }(), sg = function(e, o) { var t = De(e), l = parseInt(t.width) - parseInt(t.paddingLeft) - parseInt(t.paddingRight) - parseInt(t.borderLeftWidth) - parseInt(t.borderRightWidth), i = dr(e, 0, o), s = dr(e, 1, o), d = i && De(i), f = s && De(s), u = d && parseInt(d.marginLeft) + parseInt(d.marginRight) + $t(i).width, c = f && parseInt(f.marginLeft) + parseInt(f.marginRight) + $t(s).width; if (t.display === "flex") return t.flexDirection === "column" || t.flexDirection === "column-reverse" ? "vertical" : "horizontal"; if (t.display === "grid") return t.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal"; if (i && d.float && d.float !== "none") { var h = d.float === "left" ? "left" : "right"; return s && (f.clear === "both" || f.clear === h) ? "vertical" : "horizontal"; } return i && (d.display === "block" || d.display === "flex" || d.display === "table" || d.display === "grid" || u >= l && t[bc] === "none" || s && t[bc] === "none" && u + c > l) ? "vertical" : "horizontal"; }, rC = function(e, o, t) { var l = t ? e.left : e.top, i = t ? e.right : e.bottom, s = t ? e.width : e.height, d = t ? o.left : o.top, f = t ? o.right : o.bottom, u = t ? o.width : o.height; return l === d || i === f || l + s / 2 === d + u / 2; }, iC = function(e, o) { var t; return ls.some(function(l) { var i = l[mo].options.emptyInsertThreshold; if (!(!i || vu(l))) { var s = $t(l), d = e >= s.left - i && e <= s.right + i, f = o >= s.top - i && o <= s.bottom + i; if (d && f) return t = l; } }), t; }, dg = function(e) { function o(i, s) { return function(d, f, u, c) { var h = d.options.group.name && f.options.group.name && d.options.group.name === f.options.group.name; if (i == null && (s || h)) return !0; if (i == null || i === !1) return !1; if (s && i === "clone") return i; if (typeof i == "function") return o(i(d, f, u, c), s)(d, f, u, c); var b = (s ? d : f).options.group.name; return i === !0 || typeof i == "string" && i === b || i.join && i.indexOf(b) > -1; }; } var t = {}, l = e.group; (!l || Ma(l) != "object") && (l = { name: l }), t.name = l.name, t.checkPull = o(l.pull, !0), t.checkPut = o(l.put), t.revertClone = l.revertClone, e.group = t; }, fg = function() { !ag && He && De(He, "display", "none"); }, ug = function() { !ag && He && De(He, "display", ""); }; Es && !Jh && document.addEventListener("click", function(n) { if (ns) return n.preventDefault(), n.stopPropagation && n.stopPropagation(), n.stopImmediatePropagation && n.stopImmediatePropagation(), ns = !1, !1; }, !0); var yl = function(e) { if (me) { e = e.touches ? e.touches[0] : e; var o = iC(e.clientX, e.clientY); if (o) { var t = {}; for (var l in e) e.hasOwnProperty(l) && (t[l] = e[l]); t.target = t.rootEl = o, t.preventDefault = void 0, t.stopPropagation = void 0, o[mo]._onDragOver(t); } } }, aC = function(e) { me && me.parentNode[mo]._isOutsideThisEl(e.target); }; function Re(n, e) { if (!(n && n.nodeType && n.nodeType === 1)) throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n)); this.el = n, this.options = e = Tn({}, e), n[mo] = this; var o = { group: null, sort: !0, disabled: !1, store: null, handle: null, draggable: /^[uo]l$/i.test(n.nodeName) ? ">li" : ">*", swapThreshold: 1, // percentage; 0 <= x <= 1 invertSwap: !1, // invert always invertedSwapThreshold: null, // will be set to same as swapThreshold if default removeCloneOnHide: !0, direction: function() { return sg(n, this.options); }, ghostClass: "sortable-ghost", chosenClass: "sortable-chosen", dragClass: "sortable-drag", ignore: "a, img", filter: null, preventOnFilter: !0, animation: 0, easing: null, setData: function(s, d) { s.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 }, // Disabled on Safari: #1571; Enabled on Safari IOS: #2244 supportPointer: Re.supportPointer !== !1 && "PointerEvent" in window && (!Jr || Ou), emptyInsertThreshold: 5 }; Vi.initializePlugins(this, n, o); for (var t in o) !(t in e) && (e[t] = o[t]); dg(e); for (var l in this) l.charAt(0) === "_" && typeof this[l] == "function" && (this[l] = this[l].bind(this)); this.nativeDraggable = e.forceFallback ? !1 : lC, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ? et(n, "pointerdown", this._onTapStart) : (et(n, "mousedown", this._onTapStart), et(n, "touchstart", this._onTapStart)), this.nativeDraggable && (et(n, "dragover", this), et(n, "dragenter", this)), ls.push(this.el), e.store && e.store.get && this.sort(e.store.get(this) || []), Tn(this, Jv()); } Re.prototype = /** @lends Sortable.prototype */ { constructor: Re, _isOutsideThisEl: function(e) { !this.el.contains(e) && e !== this.el && (jl = null); }, _getDirection: function(e, o) { return typeof this.options.direction == "function" ? this.options.direction.call(this, e, o, me) : this.options.direction; }, _onTapStart: function(e) { if (e.cancelable) { var o = this, t = this.el, l = this.options, i = l.preventOnFilter, s = e.type, d = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, f = (d || e).target, u = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || f, c = l.filter; if (hC(t), !me && !(/mousedown|pointerdown/.test(s) && e.button !== 0 || l.disabled) && !u.isContentEditable && !(!this.nativeDraggable && Jr && f && f.tagName.toUpperCase() === "SELECT") && (f = zo(f, l.draggable, t, !1), !(f && f.animated) && Da !== f)) { if (Kl = Lo(f), ti = Lo(f, l.draggable), typeof c == "function") { if (c.call(this, e, f, this)) { lo({ sortable: o, rootEl: u, name: "filter", targetEl: f, toEl: t, fromEl: t }), so("filter", o, { evt: e }), i && e.preventDefault(); return; } } else if (c && (c = c.split(",").some(function(h) { if (h = zo(u, h.trim(), t, !1), h) return lo({ sortable: o, rootEl: h, name: "filter", targetEl: f, fromEl: t, toEl: t }), so("filter", o, { evt: e }), !0; }), c)) { i && e.preventDefault(); return; } l.handle && !zo(u, l.handle, t, !1) || this._prepareDragStart(e, d, f); } } }, _prepareDragStart: function(e, o, t) { var l = this, i = l.el, s = l.options, d = i.ownerDocument, f; if (t && !me && t.parentNode === i) { var u = $t(t); if (vt = i, me = t, wt = me.parentNode, Cl = me.nextSibling, Da = t, ta = s.group, Re.dragged = me, bl = { target: me, clientX: (o || e).clientX, clientY: (o || e).clientY }, hc = bl.clientX - u.left, gc = bl.clientY - u.top, this._lastX = (o || e).clientX, this._lastY = (o || e).clientY, me.style["will-change"] = "all", f = function() { if (so("delayEnded", l, { evt: e }), Re.eventCanceled) { l._onDrop(); return; } l._disableDelayedDragEvents(), !uc && l.nativeDraggable && (me.draggable = !0), l._triggerDragStart(e, o), lo({ sortable: l, name: "choose", originalEvent: e }), xo(me, s.chosenClass, !0); }, s.ignore.split(",").forEach(function(c) { og(me, c.trim(), vd); }), et(d, "dragover", yl), et(d, "mousemove", yl), et(d, "touchmove", yl), s.supportPointer ? (et(d, "pointerup", l._onDrop), !this.nativeDraggable && et(d, "pointercancel", l._onDrop)) : (et(d, "mouseup", l._onDrop), et(d, "touchend", l._onDrop), et(d, "touchcancel", l._onDrop)), uc && this.nativeDraggable && (this.options.touchStartThreshold = 4, me.draggable = !0), so("delayStart", this, { evt: e }), s.delay && (!s.delayOnTouchOnly || o) && (!this.nativeDraggable || !(Qi || Rn))) { if (Re.eventCanceled) { this._onDrop(); return; } s.supportPointer ? (et(d, "pointerup", l._disableDelayedDrag), et(d, "pointercancel", l._disableDelayedDrag)) : (et(d, "mouseup", l._disableDelayedDrag), et(d, "touchend", l._disableDelayedDrag), et(d, "touchcancel", l._disableDelayedDrag)), et(d, "mousemove", l._delayedDragTouchMoveHandler), et(d, "touchmove", l._delayedDragTouchMoveHandler), s.supportPointer && et(d, "pointermove", l._delayedDragTouchMoveHandler), l._dragStartTimer = setTimeout(f, s.delay); } else f(); } }, _delayedDragTouchMoveHandler: function(e) { var o = e.touches ? e.touches[0] : e; Math.max(Math.abs(o.clientX - this._lastX), Math.abs(o.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag(); }, _disableDelayedDrag: function() { me && vd(me), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents(); }, _disableDelayedDragEvents: function() { var e = this.el.ownerDocument; Je(e, "mouseup", this._disableDelayedDrag), Je(e, "touchend", this._disableDelayedDrag), Je(e, "touchcancel", this._disableDelayedDrag), Je(e, "pointerup", this._disableDelayedDrag), Je(e, "pointercancel", this._disableDelayedDrag), Je(e, "mousemove", this._delayedDragTouchMoveHandler), Je(e, "touchmove", this._delayedDragTouchMoveHandler), Je(e, "pointermove", this._delayedDragTouchMoveHandler); }, _triggerDragStart: function(e, o) { o = o || e.pointerType == "touch" && e, !this.nativeDraggable || o ? this.options.supportPointer ? et(document, "pointermove", this._onTouchMove) : o ? et(document, "touchmove", this._onTouchMove) : et(document, "mousemove", this._onTouchMove) : (et(me, "dragend", this), et(vt, "dragstart", this._onDragStart)); try { document.selection ? Va(function() { document.selection.empty(); }) : window.getSelection().removeAllRanges(); } catch { } }, _dragStarted: function(e, o) { if (Nl = !1, vt && me) { so("dragStarted", this, { evt: o }), this.nativeDraggable && et(document, "dragover", aC); var t = this.options; !e && xo(me, t.dragClass, !1), xo(me, t.ghostClass, !0), Re.active = this, e && this._appendGhost(), lo({ sortable: this, name: "start", originalEvent: o }); } else this._nulling(); }, _emulateDragOver: function() { if (Wo) { this._lastX = Wo.clientX, this._lastY = Wo.clientY, fg(); for (var e = document.elementFromPoint(Wo.clientX, Wo.clientY), o = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Wo.clientX, Wo.clientY), e !== o); ) o = e; if (me.parentNode[mo]._isOutsideThisEl(e), o) do { if (o[mo]) { var t = void 0; if (t = o[mo]._onDragOver({ clientX: Wo.clientX, clientY: Wo.clientY, target: e, rootEl: o }), t && !this.options.dragoverBubble) break; } e = o; } while (o = tg(o)); ug(); } }, _onTouchMove: function(e) { if (bl) { var o = this.options, t = o.fallbackTolerance, l = o.fallbackOffset, i = e.touches ? e.touches[0] : e, s = He && or(He, !0), d = He && s && s.a, f = He && s && s.d, u = na && Kt && mc(Kt), c = (i.clientX - bl.clientX + l.x) / (d || 1) + (u ? u[0] - Od[0] : 0) / (d || 1), h = (i.clientY - bl.clientY + l.y) / (f || 1) + (u ? u[1] - Od[1] : 0) / (f || 1); if (!Re.active && !Nl) { if (t && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < t) return; this._onDragStart(e, !0); } if (He) { s ? (s.e += c - (bd || 0), s.f += h - (yd || 0)) : s = { a: 1, b: 0, c: 0, d: 1, e: c, f: h }; var b = "matrix(".concat(s.a, ",").concat(s.b, ",").concat(s.c, ",").concat(s.d, ",").concat(s.e, ",").concat(s.f, ")"); De(He, "webkitTransform", b), De(He, "mozTransform", b), De(He, "msTransform", b), De(He, "transform", b), bd = c, yd = h, Wo = i; } e.cancelable && e.preventDefault(); } }, _appendGhost: function() { if (!He) { var e = this.options.fallbackOnBody ? document.body : vt, o = $t(me, !0, na, !0, e), t = this.options; if (na) { for (Kt = e; De(Kt, "position") === "static" && De(Kt, "transform") === "none" && Kt !== document; ) Kt = Kt.parentNode; Kt !== document.body && Kt !== document.documentElement ? (Kt === document && (Kt = pn()), o.top += Kt.scrollTop, o.left += Kt.scrollLeft) : Kt = pn(), Od = mc(Kt); } He = me.cloneNode(!0), xo(He, t.ghostClass, !1), xo(He, t.fallbackClass, !0), xo(He, t.dragClass, !0), De(He, "transition", ""), De(He, "transform", ""), De(He, "box-sizing", "border-box"), De(He, "margin", 0), De(He, "top", o.top), De(He, "left", o.left), De(He, "width", o.width), De(He, "height", o.height), De(He, "opacity", "0.8"), De(He, "position", na ? "absolute" : "fixed"), De(He, "zIndex", "100000"), De(He, "pointerEvents", "none"), Re.ghost = He, e.appendChild(He), De(He, "transform-origin", hc / parseInt(He.style.width) * 100 + "% " + gc / parseInt(He.style.height) * 100 + "%"); } }, _onDragStart: function(e, o) { var t = this, l = e.dataTransfer, i = t.options; if (so("dragStart", this, { evt: e }), Re.eventCanceled) { this._onDrop(); return; } so("setupClone", this), Re.eventCanceled || (xt = rg(me), xt.removeAttribute("id"), xt.draggable = !1, xt.style["will-change"] = "", this._hideClone(), xo(xt, this.options.chosenClass, !1), Re.clone = xt), t.cloneId = Va(function() { so("clone", t), !Re.eventCanceled && (t.options.removeCloneOnHide || vt.insertBefore(xt, me), t._hideClone(), lo({ sortable: t, name: "clone" })); }), !o && xo(me, i.dragClass, !0), o ? (ns = !0, t._loopId = setInterval(t._emulateDragOver, 50)) : (Je(document, "mouseup", t._onDrop), Je(document, "touchend", t._onDrop), Je(document, "touchcancel", t._onDrop), l && (l.effectAllowed = "move", i.setData && i.setData.call(t, l, me)), et(document, "drop", t), De(me, "transform", "translateZ(0)")), Nl = !0, t._dragStartId = Va(t._dragStarted.bind(t, o, e)), et(document, "selectstart", t), Hr = !0, window.getSelection().removeAllRanges(), Jr && De(document.body, "user-select", "none"); }, // Returns true - if no further action is needed (either inserted or another condition) _onDragOver: function(e) { var o = this.el, t = e.target, l, i, s, d = this.options, f = d.group, u = Re.active, c = ta === f, h = d.sort, b = Ht || u, O, p = this, v = !1; if (af) return; function y(N, G) { so(N, p, hn({ evt: e, isOwner: c, axis: O ? "vertical" : "horizontal", revert: s, dragRect: l, targetRect: i, canSort: h, fromSortable: b, target: t, completed: _, onMove: function(be, K) { return la(vt, o, me, l, be, $t(be), e, K); }, changed: C }, G)); } function a() { y("dragOverAnimationCapture"), p.captureAnimationState(), p !== b && b.captureAnimationState(); } function _(N) { return y("dragOverCompleted", { insertion: N }), N && (c ? u._hideClone() : u._showClone(p), p !== b && (xo(me, Ht ? Ht.options.ghostClass : u.options.ghostClass, !1), xo(me, d.ghostClass, !0)), Ht !== p && p !== Re.active ? Ht = p : p === Re.active && Ht && (Ht = null), b === p && (p._ignoreWhileAnimating = t), p.animateAll(function() { y("dragOverAnimationComplete"), p._ignoreWhileAnimating = null; }), p !== b && (b.animateAll(), b._ignoreWhileAnimating = null)), (t === me && !me.animated || t === o && !t.animated) && (jl = null), !d.dragoverBubble && !e.rootEl && t !== document && (me.parentNode[mo]._isOutsideThisEl(e.target), !N && yl(e)), !d.dragoverBubble && e.stopPropagation && e.stopPropagation(), v = !0; } function C() { So = Lo(me), Un = Lo(me, d.draggable), lo({ sortable: p, name: "change", toEl: o, newIndex: So, newDraggableIndex: Un, originalEvent: e }); } if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), t = zo(t, d.draggable, o, !0), y("dragOver"), Re.eventCanceled) return v; if (me.contains(e.target) || t.animated && t.animatingX && t.animatingY || p._ignoreWhileAnimating === t) return _(!1); if (ns = !1, u && !d.disabled && (c ? h || (s = wt !== vt) : Ht === this || (this.lastPutMode = ta.checkPull(this, u, me, e)) && f.checkPut(this, u, me, e))) { if (O = this._getDirection(e, t) === "vertical", l = $t(me), y("dragOverValid"), Re.eventCanceled) return v; if (s) return wt = vt, a(), this._hideClone(), y("revert"), Re.eventCanceled || (Cl ? vt.insertBefore(me, Cl) : vt.appendChild(me)), _(!0); var I = vu(o, d.draggable); if (!I || uC(e, O, this) && !I.animated) { if (I === me) return _(!1); if (I && o === e.target && (t = I), t && (i = $t(t)), la(vt, o, me, l, t, i, e, !!t) !== !1) return a(), I && I.nextSibling ? o.insertBefore(me, I.nextSibling) : o.appendChild(me), wt = o, C(), _(!0); } else if (I && fC(e, O, this)) { var L = dr(o, 0, d, !0); if (L === me) return _(!1); if (t = L, i = $t(t), la(vt, o, me, l, t, i, e, !1) !== !1) return a(), o.insertBefore(me, L), wt = o, C(), _(!0); } else if (t.parentNode === o) { i = $t(t); var $ = 0, g, k = me.parentNode !== o, x = !rC(me.animated && me.toRect || l, t.animated && t.toRect || i, O), P = O ? "top" : "left", m = cc(t, "top", "top") || cc(me, "top", "top"), D = m ? m.scrollTop : void 0; jl !== t && (g = i[P], ni = !1, oa = !x && d.invertSwap || k), $ = pC(e, t, i, O, x ? 1 : d.swapThreshold, d.invertedSwapThreshold == null ? d.swapThreshold : d.invertedSwapThreshold, oa, jl === t); var T; if ($ !== 0) { var w = Lo(me); do w -= $, T = wt.children[w]; while (T && (De(T, "display") === "none" || T === He)); } if ($ === 0 || T === t) return _(!1); jl = t, oi = $; var Q = t.nextElementSibling, V = !1; V = $ === 1; var H = la(vt, o, me, l, t, i, e, V); if (H !== !1) return (H === 1 || H === -1) && (V = H === 1), af = !0, setTimeout(dC, 30), a(), V && !Q ? o.appendChild(me) : t.parentNode.insertBefore(me, V ? Q : t), m && lg(m, 0, D - m.scrollTop), wt = me.parentNode, g !== void 0 && !oa && (Qa = Math.abs(g - $t(t)[P])), C(), _(!0); } if (o.contains(me)) return _(!1); } return !1; }, _ignoreWhileAnimating: null, _offMoveEvents: function() { Je(document, "mousemove", this._onTouchMove), Je(document, "touchmove", this._onTouchMove), Je(document, "pointermove", this._onTouchMove), Je(document, "dragover", yl), Je(document, "mousemove", yl), Je(document, "touchmove", yl); }, _offUpEvents: function() { var e = this.el.ownerDocument; Je(e, "mouseup", this._onDrop), Je(e, "touchend", this._onDrop), Je(e, "pointerup", this._onDrop), Je(e, "pointercancel", this._onDrop), Je(e, "touchcancel", this._onDrop), Je(document, "selectstart", this); }, _onDrop: function(e) { var o = this.el, t = this.options; if (So = Lo(me), Un = Lo(me, t.draggable), so("drop", this, { evt: e }), wt = me && me.parentNode, So = Lo(me), Un = Lo(me, t.draggable), Re.eventCanceled) { this._nulling(); return; } Nl = !1, oa = !1, ni = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), sf(this.cloneId), sf(this._dragStartId), this.nativeDraggable && (Je(document, "drop", this), Je(o, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Jr && De(document.body, "user-select", ""), De(me, "transform", ""), e && (Hr && (e.cancelable && e.preventDefault(), !t.dropBubble && e.stopPropagation()), He && He.parentNode && He.parentNode.removeChild(He), (vt === wt || Ht && Ht.lastPutMode !== "clone") && xt && xt.parentNode && xt.parentNode.removeChild(xt), me && (this.nativeDraggable && Je(me, "dragend", this), vd(me), me.style["will-change"] = "", Hr && !Nl && xo(me, Ht ? Ht.options.ghostClass : this.options.ghostClass, !1), xo(me, this.options.chosenClass, !1), lo({ sortable: this, name: "unchoose", toEl: wt, newIndex: null, newDraggableIndex: null, originalEvent: e }), vt !== wt ? (So >= 0 && (lo({ rootEl: wt, name: "add", toEl: wt, fromEl: vt, originalEvent: e }), lo({ sortable: this, name: "remove", toEl: wt, originalEvent: e }), lo({ rootEl: wt, name: "sort", toEl: wt, fromEl: vt, originalEvent: e }), lo({ sortable: this, name: "sort", toEl: wt, originalEvent: e })), Ht && Ht.save()) : So !== Kl && So >= 0 && (lo({ sortable: this, name: "update", toEl: wt, originalEvent: e }), lo({ sortable: this, name: "sort", toEl: wt, originalEvent: e })), Re.active && ((So == null || So === -1) && (So = Kl, Un = ti), lo({ sortable: this, name: "end", toEl: wt, originalEvent: e }), this.save()))), this._nulling(); }, _nulling: function() { so("nulling", this), vt = me = wt = He = Cl = xt = Da = Hn = bl = Wo = Hr = So = Un = Kl = ti = jl = oi = Ht = ta = Re.dragged = Re.ghost = Re.clone = Re.active = null, rs.forEach(function(e) { e.checked = !0; }), rs.length = bd = yd = 0; }, handleEvent: function(e) { switch (e.type) { case "drop": case "dragend": this._onDrop(e); break; case "dragenter": case "dragover": me && (this._onDragOver(e), sC(e)); break; case "selectstart": e.preventDefault(); break; } }, /** * Serializes the item into an array of string. * @returns {String[]} */ toArray: function() { for (var e = [], o, t = this.el.children, l = 0, i = t.length, s = this.options; l < i; l++) o = t[l], zo(o, s.draggable, this.el, !1) && e.push(o.getAttribute(s.dataIdAttr) || mC(o)); return e; }, /** * Sorts the elements according to the array. * @param {String[]} order order of the items */ sort: function(e, o) { var t = {}, l = this.el; this.toArray().forEach(function(i, s) { var d = l.children[s]; zo(d, this.options.draggable, l, !1) && (t[i] = d); }, this), o && this.captureAnimationState(), e.forEach(function(i) { t[i] && (l.removeChild(t[i]), l.appendChild(t[i])); }), o && this.animateAll(); }, /** * Save the current sorting */ save: function() { var e = this.options.store; e && e.set && e.set(this); }, /** * 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. * @param {HTMLElement} el * @param {String} [selector] default: `options.draggable` * @returns {HTMLElement|null} */ closest: function(e, o) { return zo(e, o || this.options.draggable, this.el, !1); }, /** * Set/get option * @param {string} name * @param {*} [value] * @returns {*} */ option: function(e, o) { var t = this.options; if (o === void 0) return t[e]; var l = Vi.modifyOption(this, e, o); typeof l < "u" ? t[e] = l : t[e] = o, e === "group" && dg(t); }, /** * Destroy */ destroy: function() { so("destroy", this); var e = this.el; e[mo] = null, Je(e, "mousedown", this._onTapStart), Je(e, "touchstart", this._onTapStart), Je(e, "pointerdown", this._onTapStart), this.nativeDraggable && (Je(e, "dragover", this), Je(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(o) { o.removeAttribute("draggable"); }), this._onDrop(), this._disableDelayedDragEvents(), ls.splice(ls.indexOf(this.el), 1), this.el = e = null; }, _hideClone: function() { if (!Hn) { if (so("hideClone", this), Re.eventCanceled) return; De(xt, "display", "none"), this.options.removeCloneOnHide && xt.parentNode && xt.parentNode.removeChild(xt), Hn = !0; } }, _showClone: function(e) { if (e.lastPutMode !== "clone") { this._hideClone(); return; } if (Hn) { if (so("showClone", this), Re.eventCanceled) return; me.parentNode == vt && !this.options.group.revertClone ? vt.insertBefore(xt, me) : Cl ? vt.insertBefore(xt, Cl) : vt.appendChild(xt), this.options.group.revertClone && this.animate(me, xt), De(xt, "display", ""), Hn = !1; } } }; function sC(n) { n.dataTransfer && (n.dataTransfer.dropEffect = "move"), n.cancelable && n.preventDefault(); } function la(n, e, o, t, l, i, s, d) { var f, u = n[mo], c = u.options.onMove, h; return window.CustomEvent && !Rn && !Qi ? f = new CustomEvent("move", { bubbles: !0, cancelable: !0 }) : (f = document.createEvent("Event"), f.initEvent("move", !0, !0)), f.to = e, f.from = n, f.dragged = o, f.draggedRect = t, f.related = l || e, f.relatedRect = i || $t(e), f.willInsertAfter = d, f.originalEvent = s, n.dispatchEvent(f), c && (h = c.call(u, f, s)), h; } function vd(n) { n.draggable = !1; } function dC() { af = !1; } function fC(n, e, o) { var t = $t(dr(o.el, 0, o.options, !0)), l = ig(o.el, o.options, He), i = 10; return e ? n.clientX < l.left - i || n.clientY < t.top && n.clientX < t.right : n.clientY < l.top - i || n.clientY < t.bottom && n.clientX < t.left; } function uC(n, e, o) { var t = $t(vu(o.el, o.options.draggable)), l = ig(o.el, o.options, He), i = 10; return e ? n.clientX > l.right + i || n.clientY > t.bottom && n.clientX > t.left : n.clientY > l.bottom + i || n.clientX > t.right && n.clientY > t.top; } function pC(n, e, o, t, l, i, s, d) { var f = t ? n.clientY : n.clientX, u = t ? o.height : o.width, c = t ? o.top : o.left, h = t ? o.bottom : o.right, b = !1; if (!s) { if (d && Qa < u * l) { if (!ni && (oi === 1 ? f > c + u * i / 2 : f < h - u * i / 2) && (ni = !0), ni) b = !0; else if (oi === 1 ? f < c + Qa : f > h - Qa) return -oi; } else if (f > c + u * (1 - l) / 2 && f < h - u * (1 - l) / 2) return cC(e); } return b = b || s, b && (f < c + u * i / 2 || f > h - u * i / 2) ? f > c + u / 2 ? 1 : -1 : 0; } function cC(n) { return Lo(me) < Lo(n) ? 1 : -1; } function mC(n) { for (var e = n.tagName + n.className + n.src + n.href + n.textContent, o = e.length, t = 0; o--; ) t += e.charCodeAt(o); return t.toString(36); } function hC(n) { rs.length = 0; for (var e = n.getElementsByTagName("input"), o = e.length; o--; ) { var t = e[o]; t.checked && rs.push(t); } } function Va(n) { return setTimeout(n, 0); } function sf(n) { return clearTimeout(n); } Es && et(document, "touchmove", function(n) { (Re.active || Nl) && n.cancelable && n.preventDefault(); }); Re.utils = { on: et, off: Je, css: De, find: og, is: function(e, o) { return !!zo(e, o, e, !1); }, extend: Gv, throttle: ng, closest: zo, toggleClass: xo, clone: rg, index: Lo, nextTick: Va, cancelNextTick: sf, detectDirection: sg, getChild: dr, expando: mo }; Re.get = function(n) { return n[mo]; }; Re.mount = function() { for (var n = arguments.length, e = new Array(n), o = 0; o < n; o++) e[o] = arguments[o]; e[0].constructor === Array && (e = e[0]), e.forEach(function(t) { if (!t.prototype || !t.prototype.constructor) throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t)); t.utils && (Re.utils = hn(hn({}, Re.utils), t.utils)), Vi.mount(t); }); }; Re.create = function(n, e) { return new Re(n, e); }; Re.version = qv; var Rt = [], zr, df, ff = !1, Cd, xd, is, Fr; function gC() { function n() { 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 n.prototype = { dragStarted: function(o) { var t = o.originalEvent; this.sortable.nativeDraggable ? et(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? et(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? et(document, "touchmove", this._handleFallbackAutoScroll) : et(document, "mousemove", this._handleFallbackAutoScroll); }, dragOverCompleted: function(o) { var t = o.originalEvent; !this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t); }, drop: function() { this.sortable.nativeDraggable ? Je(document, "dragover", this._handleAutoScroll) : (Je(document, "pointermove", this._handleFallbackAutoScroll), Je(document, "touchmove", this._handleFallbackAutoScroll), Je(document, "mousemove", this._handleFallbackAutoScroll)), yc(), Wa(), Kv(); }, nulling: function() { is = df = zr = ff = Fr = Cd = xd = null, Rt.length = 0; }, _handleFallbackAutoScroll: function(o) { this._handleAutoScroll(o, !0); }, _handleAutoScroll: function(o, t) { var l = this, i = (o.touches ? o.touches[0] : o).clientX, s = (o.touches ? o.touches[0] : o).clientY, d = document.elementFromPoint(i, s); if (is = o, t || this.options.forceAutoScrollFallback || Qi || Rn || Jr) { _d(o, this.options, d, t); var f = Fn(d, !0); ff && (!Fr || i !== Cd || s !== xd) && (Fr && yc(), Fr = setInterval(function() { var u = Fn(document.elementFromPoint(i, s), !0); u !== f && (f = u, Wa()), _d(o, l.options, u, t); }, 10), Cd = i, xd = s); } else { if (!this.options.bubbleScroll || Fn(d, !0) === pn()) { Wa(); return; } _d(o, this.options, Fn(d, !1), !1); } } }, Tn(n, { pluginName: "scroll", initializeByDefault: !0 }); } function Wa() { Rt.forEach(function(n) { clearInterval(n.pid); }), Rt = []; } function yc() { clearInterval(Fr); } var _d = ng(function(n, e, o, t) { if (e.scroll) { var l = (n.touches ? n.touches[0] : n).clientX, i = (n.touches ? n.touches[0] : n).clientY, s = e.scrollSensitivity, d = e.scrollSpeed, f = pn(), u = !1, c; df !== o && (df = o, Wa(), zr = e.scroll, c = e.scrollFn, zr === !0 && (zr = Fn(o, !0))); var h = 0, b = zr; do { var O = b, p = $t(O), v = p.top, y = p.bottom, a = p.left, _ = p.right, C = p.width, I = p.height, L = void 0, $ = void 0, g = O.scrollWidth, k = O.scrollHeight, x = De(O), P = O.scrollLeft, m = O.scrollTop; O === f ? (L = C < g && (x.overflowX === "auto" || x.overflowX === "scroll" || x.overflowX === "visible"), $ = I < k && (x.overflowY === "auto" || x.overflowY === "scroll" || x.overflowY === "visible")) : (L = C < g && (x.overflowX === "auto" || x.overflowX === "scroll"), $ = I < k && (x.overflowY === "auto" || x.overflowY === "scroll")); var D = L && (Math.abs(_ - l) <= s && P + C < g) - (Math.abs(a - l) <= s && !!P), T = $ && (Math.abs(y - i) <= s && m + I < k) - (Math.abs(v - i) <= s && !!m); if (!Rt[h]) for (var w = 0; w <= h; w++) Rt[w] || (Rt[w] = {}); (Rt[h].vx != D || Rt[h].vy != T || Rt[h].el !== O) && (Rt[h].el = O, Rt[h].vx = D, Rt[h].vy = T, clearInterval(Rt[h].pid), (D != 0 || T != 0) && (u = !0, Rt[h].pid = setInterval((function() { t && this.layer === 0 && Re.active._onTouchMove(is); var Q = Rt[this.laye