vue-draggable-next
Advanced tools
Comparing version 1.0.3 to 1.0.4
import { createApp } from 'vue' | ||
import App from './App.vue' | ||
import { store } from "./store"; | ||
import './index.css' | ||
@@ -7,2 +9,3 @@ import './ribbons.css' | ||
const app = createApp(App) | ||
app.use(store) | ||
window.vm = app.mount('#app') |
@@ -25,2 +25,3 @@ import Sortable from 'sortablejs'; | ||
componentData?: Record<string, any> | undefined; | ||
modelValue?: unknown[] | undefined; | ||
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps; | ||
@@ -44,2 +45,3 @@ $attrs: Record<string, unknown>; | ||
componentData?: Record<string, any> | undefined; | ||
modelValue?: unknown[] | undefined; | ||
}, unknown, { | ||
@@ -86,2 +88,3 @@ transitionMode: boolean; | ||
componentData: Record<string, any>; | ||
modelValue: unknown[]; | ||
} & { | ||
@@ -106,2 +109,3 @@ options?: Record<string, any> | undefined; | ||
componentData: Record<string, any>; | ||
modelValue: unknown[]; | ||
} & { | ||
@@ -116,2 +120,3 @@ options?: Record<string, any> | undefined; | ||
componentData: Record<string, any>; | ||
modelValue: unknown[]; | ||
} & { | ||
@@ -146,2 +151,3 @@ options?: Record<string, any> | undefined; | ||
componentData?: Record<string, any> | undefined; | ||
modelValue?: unknown[] | undefined; | ||
} & import("vue").ShallowUnwrapRef<{}> & { | ||
@@ -188,2 +194,3 @@ transitionMode: boolean; | ||
componentData: Record<string, any>; | ||
modelValue: unknown[]; | ||
} & { | ||
@@ -208,2 +215,3 @@ options?: Record<string, any> | undefined; | ||
componentData: Record<string, any>; | ||
modelValue: unknown[]; | ||
} & { | ||
@@ -218,2 +226,3 @@ options?: Record<string, any> | undefined; | ||
componentData: Record<string, any>; | ||
modelValue: unknown[]; | ||
} & { | ||
@@ -243,2 +252,3 @@ options?: Record<string, any> | undefined; | ||
componentData: Record<string, any>; | ||
modelValue: unknown[]; | ||
} & { | ||
@@ -257,2 +267,3 @@ options?: Record<string, any> | undefined; | ||
componentData: Record<string, any>; | ||
modelValue: unknown[]; | ||
} & { | ||
@@ -301,2 +312,3 @@ options?: Record<string, any> | undefined; | ||
componentData: Record<string, any>; | ||
modelValue: unknown[]; | ||
} & { | ||
@@ -321,2 +333,3 @@ options?: Record<string, any> | undefined; | ||
componentData: Record<string, any>; | ||
modelValue: unknown[]; | ||
} & { | ||
@@ -331,2 +344,3 @@ options?: Record<string, any> | undefined; | ||
componentData: Record<string, any>; | ||
modelValue: unknown[]; | ||
} & { | ||
@@ -378,2 +392,7 @@ options?: Record<string, any> | undefined; | ||
}; | ||
modelValue: { | ||
type: ArrayConstructor; | ||
required: boolean; | ||
default: null; | ||
}; | ||
} & ThisType<void>; | ||
@@ -387,2 +406,3 @@ } & ThisType<import("vue").ComponentPublicInstance<Readonly<{ | ||
componentData: Record<string, any>; | ||
modelValue: unknown[]; | ||
} & { | ||
@@ -431,2 +451,3 @@ options?: Record<string, any> | undefined; | ||
componentData: Record<string, any>; | ||
modelValue: unknown[]; | ||
} & { | ||
@@ -451,2 +472,3 @@ options?: Record<string, any> | undefined; | ||
componentData: Record<string, any>; | ||
modelValue: unknown[]; | ||
} & { | ||
@@ -461,2 +483,3 @@ options?: Record<string, any> | undefined; | ||
componentData: Record<string, any>; | ||
modelValue: unknown[]; | ||
} & { | ||
@@ -486,2 +509,3 @@ options?: Record<string, any> | undefined; | ||
componentData: Record<string, any>; | ||
modelValue: unknown[]; | ||
} & { | ||
@@ -496,2 +520,3 @@ options?: Record<string, any> | undefined; | ||
componentData: Record<string, any>; | ||
modelValue: unknown[]; | ||
} & { | ||
@@ -540,2 +565,3 @@ options?: Record<string, any> | undefined; | ||
componentData: Record<string, any>; | ||
modelValue: unknown[]; | ||
} & { | ||
@@ -560,2 +586,3 @@ options?: Record<string, any> | undefined; | ||
componentData: Record<string, any>; | ||
modelValue: unknown[]; | ||
} & { | ||
@@ -570,2 +597,3 @@ options?: Record<string, any> | undefined; | ||
componentData: Record<string, any>; | ||
modelValue: unknown[]; | ||
} & { | ||
@@ -572,0 +600,0 @@ options?: Record<string, any> | undefined; |
/*! | ||
* vue-draggable-next v1.0.3 | ||
* vue-draggable-next v1.0.4 | ||
* (c) 2020 Anish George | ||
@@ -12,2 +12,2 @@ * @license MIT | ||
* @license MIT | ||
*/function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),i.forEach((function(e){o(t,e,n[e])}))}return t}function a(t,e){if(null==t)return{};var n,o,i=function(t,e){if(null==t)return{};var n,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)e.indexOf(n=r[o])>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o<r.length;o++)e.indexOf(n=r[o])>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function l(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var s=l(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),c=l(/Edge/i),u=l(/firefox/i),d=l(/safari/i)&&!l(/chrome/i)&&!l(/android/i),h=l(/iP(ad|od|hone)/i),f=l(/chrome/i)&&l(/android/i),p={capture:!1,passive:!1};function g(t,e,n){t.addEventListener(e,n,!s&&p)}function v(t,e,n){t.removeEventListener(e,n,!s&&p)}function m(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(t){return!1}return!1}}function b(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function y(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&m(t,e):m(t,e))||o&&t===n)return t;if(t===n)break}while(t=b(t))}return null}var w,E=/\s+/g;function D(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(E," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(E," ")}}function _(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function x(t,e){var n="";if("string"==typeof t)n=t;else do{var o=_(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function S(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function C(){var t=document.scrollingElement;return t||document.documentElement}function T(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var r,a,l,c,u,d,h;if(t!==window&&t!==C()?(a=(r=t.getBoundingClientRect()).top,l=r.left,c=r.bottom,u=r.right,d=r.height,h=r.width):(a=0,l=0,c=window.innerHeight,u=window.innerWidth,d=window.innerHeight,h=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!s))do{if(i&&i.getBoundingClientRect&&("none"!==_(i,"transform")||n&&"static"!==_(i,"position"))){var f=i.getBoundingClientRect();a-=f.top+parseInt(_(i,"border-top-width")),l-=f.left+parseInt(_(i,"border-left-width")),c=a+r.height,u=l+r.width;break}}while(i=i.parentNode);if(o&&t!==window){var p=x(i||t),g=p&&p.a,v=p&&p.d;p&&(c=(a/=v)+(d/=v),u=(l/=g)+(h/=g))}return{top:a,left:l,bottom:c,right:u,width:h,height:d}}}function O(t,e,n){for(var o=A(t,!0),i=T(t)[e];o;){var r=T(o)[n];if(!("top"===n||"left"===n?i>=r:i<=r))return o;if(o===C())break;o=A(o,!1)}return!1}function I(t,e,n){for(var o=0,i=0,r=t.children;i<r.length;){if("none"!==r[i].style.display&&r[i]!==Rt.ghost&&r[i]!==Rt.dragged&&y(r[i],n.draggable,t,!1)){if(o===e)return r[i];o++}i++}return null}function M(t,e){for(var n=t.lastElementChild;n&&(n===Rt.ghost||"none"===_(n,"display")||e&&!m(n,e));)n=n.previousElementSibling;return n||null}function N(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Rt.clone||e&&!m(t,e)||n++;return n}function P(t){var e=0,n=0,o=C();if(t)do{var i=x(t);e+=t.scrollLeft*i.a,n+=t.scrollTop*i.d}while(t!==o&&(t=t.parentNode));return[e,n]}function A(t,e){if(!t||!t.getBoundingClientRect)return C();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=_(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return C();if(o||e)return n;o=!0}}}while(n=n.parentNode);return C()}function k(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)}function R(t,e){return function(){if(!w){var n=arguments,o=this;1===n.length?t.call(o,n[0]):t.apply(o,n),w=setTimeout((function(){w=void 0}),e)}}}function X(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function Y(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 F="Sortable"+(new Date).getTime();function L(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==_(t,"display")&&t!==Rt.ghost){e.push({target:t,rect:T(t)});var n=r({},e[e.length-1].rect);if(t.thisAnimationDuration){var o=x(t,!0);o&&(n.top-=o.f,n.left-=o.e)}t.fromRect=n}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(e,{target:t}),1)},animateAll:function(n){var o=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof n&&n());var i=!1,r=0;e.forEach((function(t){var e=0,n=t.target,a=n.fromRect,l=T(n),s=n.prevFromRect,c=n.prevToRect,u=t.rect,d=x(n,!0);d&&(l.top-=d.f,l.left-=d.e),n.toRect=l,n.thisAnimationDuration&&k(s,l)&&!k(a,l)&&(u.top-l.top)/(u.left-l.left)==(a.top-l.top)/(a.left-l.left)&&(e=function(t,e,n,o){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))*o.animation}(u,s,c,o.options)),k(l,a)||(n.prevFromRect=a,n.prevToRect=l,e||(e=o.options.animation),o.animate(n,u,l,e)),e&&(i=!0,r=Math.max(r,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),i?t=setTimeout((function(){"function"==typeof n&&n()}),r):"function"==typeof n&&n(),e=[]},animate:function(t,e,n,o){if(o){_(t,"transition",""),_(t,"transform","");var i=x(this.el),r=(e.left-n.left)/(i&&i.a||1),a=(e.top-n.top)/(i&&i.d||1);t.animatingX=!!r,t.animatingY=!!a,_(t,"transform","translate3d("+r+"px,"+a+"px,0)"),_(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),_(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){_(t,"transition",""),_(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),o)}}}}var B=[],j={initializeByDefault:!0},H={mount:function(t){for(var e in j)j.hasOwnProperty(e)&&!(e in t)&&(t[e]=j[e]);B.push(t)},pluginEvent:function(t,e,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var i=t+"Global";B.forEach((function(o){e[o.pluginName]&&(e[o.pluginName][i]&&e[o.pluginName][i](r({sortable:e},n)),e.options[o.pluginName]&&e[o.pluginName][t]&&e[o.pluginName][t](r({sortable:e},n)))}))},initializePlugins:function(t,e,n,o){for(var r in B.forEach((function(o){var r=o.pluginName;if(t.options[r]||o.initializeByDefault){var a=new o(t,e,t.options);a.sortable=t,a.options=t.options,t[r]=a,i(n,a.defaults)}})),t.options)if(t.options.hasOwnProperty(r)){var a=this.modifyOption(t,r,t.options[r]);void 0!==a&&(t.options[r]=a)}},getEventProperties:function(t,e){var n={};return B.forEach((function(o){"function"==typeof o.eventProperties&&i(n,o.eventProperties.call(e[o.pluginName],t))})),n},modifyOption:function(t,e,n){var o;return B.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[e]&&(o=i.optionListeners[e].call(t[i.pluginName],n))})),o}};var $=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,i=a(n,["evt"]);H.pluginEvent.bind(Rt)(t,e,r({dragEl:W,parentEl:z,ghostEl:U,rootEl:G,nextEl:q,lastDownEl:Z,cloneEl:K,cloneHidden:Q,dragStarted:dt,putSortable:it,activeSortable:Rt.active,originalEvent:o,oldIndex:J,oldDraggableIndex:et,newIndex:tt,newDraggableIndex:nt,hideGhostForTarget:Nt,unhideGhostForTarget:Pt,cloneNowHidden:function(){Q=!0},cloneNowShown:function(){Q=!1},dispatchSortableEvent:function(t){V({sortable:e,name:t,originalEvent:o})}},i))};function V(t){!function(t){var e=t.sortable,n=t.rootEl,o=t.name,i=t.targetEl,a=t.cloneEl,l=t.toEl,u=t.fromEl,d=t.oldIndex,h=t.newIndex,f=t.oldDraggableIndex,p=t.newDraggableIndex,g=t.originalEvent,v=t.putSortable,m=t.extraEventProperties;if(e=e||n&&n[F]){var b,y=e.options,w="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||s||c?(b=document.createEvent("Event")).initEvent(o,!0,!0):b=new CustomEvent(o,{bubbles:!0,cancelable:!0}),b.to=l||n,b.from=u||n,b.item=i||n,b.clone=a,b.oldIndex=d,b.newIndex=h,b.oldDraggableIndex=f,b.newDraggableIndex=p,b.originalEvent=g,b.pullMode=v?v.lastPutMode:void 0;var E=r({},m,H.getEventProperties(o,e));for(var D in E)b[D]=E[D];n&&n.dispatchEvent(b),y[w]&&y[w].call(e,b)}}(r({putSortable:it,cloneEl:K,targetEl:W,rootEl:G,oldIndex:J,oldDraggableIndex:et,newIndex:tt,newDraggableIndex:nt},t))}var W,z,U,G,q,Z,K,Q,J,tt,et,nt,ot,it,rt,at,lt,st,ct,ut,dt,ht,ft,pt,gt,vt=!1,mt=!1,bt=[],yt=!1,wt=!1,Et=[],Dt=!1,_t=[],xt="undefined"!=typeof document,St=h,Ct=c||s?"cssFloat":"float",Tt=xt&&!f&&!h&&"draggable"in document.createElement("div"),Ot=function(){if(xt){if(s)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),It=function(t,e){var n=_(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=I(t,0,e),r=I(t,1,e),a=i&&_(i),l=r&&_(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+T(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+T(r).width;return"flex"===n.display?"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal":"grid"===n.display?n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":i&&a.float&&"none"!==a.float?!r||"both"!==l.clear&&l.clear!==("left"===a.float?"left":"right")?"horizontal":"vertical":i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[Ct]||r&&"none"===n[Ct]&&s+c>o)?"vertical":"horizontal"},Mt=function(t){function e(t,n){return function(o,i,r,a){if(null==t&&(n||o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,i,r,a),n)(o,i,r,a);var l=(n?o:i).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var o={},i=t.group;i&&"object"==n(i)||(i={name:i}),o.name=i.name,o.checkPull=e(i.pull,!0),o.checkPut=e(i.put),o.revertClone=i.revertClone,t.group=o},Nt=function(){!Ot&&U&&_(U,"display","none")},Pt=function(){!Ot&&U&&_(U,"display","")};xt&&document.addEventListener("click",(function(t){if(mt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),mt=!1,!1}),!0);var At=function(t){if(W){var e=(i=(t=t.touches?t.touches[0]:t).clientX,r=t.clientY,bt.some((function(t){if(!M(t)){var e=T(t),n=t[F].options.emptyInsertThreshold;return n&&i>=e.left-n&&i<=e.right+n&&r>=e.top-n&&r<=e.bottom+n?a=t:void 0}})),a);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[F]._onDragOver(n)}}var i,r,a},kt=function(t){W&&W.parentNode[F]._isOutsideThisEl(t.target)};function Rt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=i({},e),t[F]=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 It(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(t,e){t.setData("Text",e.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:!1!==Rt.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var o in H.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var r in Mt(e),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!e.forceFallback&&Tt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?g(t,"pointerdown",this._onTapStart):(g(t,"mousedown",this._onTapStart),g(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(g(t,"dragover",this),g(t,"dragenter",this)),bt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),i(this,L())}function Xt(t,e,n,o,i,r,a,l){var u,d,h=t[F],f=h.options.onMove;return!window.CustomEvent||s||c?(u=document.createEvent("Event")).initEvent("move",!0,!0):u=new CustomEvent("move",{bubbles:!0,cancelable:!0}),u.to=e,u.from=t,u.dragged=n,u.draggedRect=o,u.related=i||e,u.relatedRect=r||T(e),u.willInsertAfter=l,u.originalEvent=a,t.dispatchEvent(u),f&&(d=f.call(h,u,a)),d}function Yt(t){t.draggable=!1}function Ft(){Dt=!1}function Lt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function Bt(t){return setTimeout(t,0)}function jt(t){return clearTimeout(t)}Rt.prototype={constructor:Rt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(ht=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,W):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,i=o.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(a||t).target,s=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=o.filter;if(function(t){_t.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&_t.push(o)}}(n),!W&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled||s.isContentEditable||(l=y(l,o.draggable,n,!1))&&l.animated||Z===l)){if(J=N(l),et=N(l,o.draggable),"function"==typeof c){if(c.call(this,t,l,this))return V({sortable:e,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),$("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=y(s,o.trim(),n,!1))return V({sortable:e,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),$("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());o.handle&&!y(s,o.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;if(n&&!W&&n.parentNode===r){var d=T(n);if(G=r,z=(W=n).parentNode,q=W.nextSibling,Z=n,ot=a.group,Rt.dragged=W,ct=(rt={target:W,clientX:(e||t).clientX,clientY:(e||t).clientY}).clientX-d.left,ut=rt.clientY-d.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,W.style["will-change"]="all",o=function(){$("delayEnded",i,{evt:t}),Rt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!u&&i.nativeDraggable&&(W.draggable=!0),i._triggerDragStart(t,e),V({sortable:i,name:"choose",originalEvent:t}),D(W,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){S(W,t.trim(),Yt)})),g(l,"dragover",At),g(l,"mousemove",At),g(l,"touchmove",At),g(l,"mouseup",i._onDrop),g(l,"touchend",i._onDrop),g(l,"touchcancel",i._onDrop),u&&this.nativeDraggable&&(this.options.touchStartThreshold=4,W.draggable=!0),$("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(c||s))o();else{if(Rt.eventCanceled)return void this._onDrop();g(l,"mouseup",i._disableDelayedDrag),g(l,"touchend",i._disableDelayedDrag),g(l,"touchcancel",i._disableDelayedDrag),g(l,"mousemove",i._delayedDragTouchMoveHandler),g(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&g(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;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()},_disableDelayedDrag:function(){W&&Yt(W),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;v(t,"mouseup",this._disableDelayedDrag),v(t,"touchend",this._disableDelayedDrag),v(t,"touchcancel",this._disableDelayedDrag),v(t,"mousemove",this._delayedDragTouchMoveHandler),v(t,"touchmove",this._delayedDragTouchMoveHandler),v(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?g(document,this.options.supportPointer?"pointermove":e?"touchmove":"mousemove",this._onTouchMove):(g(W,"dragend",this),g(G,"dragstart",this._onDragStart));try{document.selection?Bt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(vt=!1,G&&W){$("dragStarted",this,{evt:e}),this.nativeDraggable&&g(document,"dragover",kt);var n=this.options;!t&&D(W,n.dragClass,!1),D(W,n.ghostClass,!0),Rt.active=this,t&&this._appendGhost(),V({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(at){this._lastX=at.clientX,this._lastY=at.clientY,Nt();for(var t=document.elementFromPoint(at.clientX,at.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(at.clientX,at.clientY))!==e;)e=t;if(W.parentNode[F]._isOutsideThisEl(t),e)do{if(e[F]){if(e[F]._onDragOver({clientX:at.clientX,clientY:at.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Pt()}},_onTouchMove:function(t){if(rt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=U&&x(U,!0),a=U&&r&&r.a,l=U&&r&&r.d,s=St&>&&P(gt),c=(i.clientX-rt.clientX+o.x)/(a||1)+(s?s[0]-Et[0]:0)/(a||1),u=(i.clientY-rt.clientY+o.y)/(l||1)+(s?s[1]-Et[1]:0)/(l||1);if(!Rt.active&&!vt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(U){r?(r.e+=c-(lt||0),r.f+=u-(st||0)):r={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");_(U,"webkitTransform",d),_(U,"mozTransform",d),_(U,"msTransform",d),_(U,"transform",d),lt=c,st=u,at=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!U){var t=this.options.fallbackOnBody?document.body:G,e=T(W,!0,St,!0,t),n=this.options;if(St){for(gt=t;"static"===_(gt,"position")&&"none"===_(gt,"transform")&>!==document;)gt=gt.parentNode;gt!==document.body&>!==document.documentElement?(gt===document&&(gt=C()),e.top+=gt.scrollTop,e.left+=gt.scrollLeft):gt=C(),Et=P(gt)}D(U=W.cloneNode(!0),n.ghostClass,!1),D(U,n.fallbackClass,!0),D(U,n.dragClass,!0),_(U,"transition",""),_(U,"transform",""),_(U,"box-sizing","border-box"),_(U,"margin",0),_(U,"top",e.top),_(U,"left",e.left),_(U,"width",e.width),_(U,"height",e.height),_(U,"opacity","0.8"),_(U,"position",St?"absolute":"fixed"),_(U,"zIndex","100000"),_(U,"pointerEvents","none"),Rt.ghost=U,t.appendChild(U),_(U,"transform-origin",ct/parseInt(U.style.width)*100+"% "+ut/parseInt(U.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;$("dragStart",this,{evt:t}),Rt.eventCanceled?this._onDrop():($("setupClone",this),Rt.eventCanceled||((K=Y(W)).draggable=!1,K.style["will-change"]="",this._hideClone(),D(K,this.options.chosenClass,!1),Rt.clone=K),n.cloneId=Bt((function(){$("clone",n),Rt.eventCanceled||(n.options.removeCloneOnHide||G.insertBefore(K,W),n._hideClone(),V({sortable:n,name:"clone"}))})),!e&&D(W,i.dragClass,!0),e?(mt=!0,n._loopId=setInterval(n._emulateDragOver,50)):(v(document,"mouseup",n._onDrop),v(document,"touchend",n._onDrop),v(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,W)),g(document,"drop",n),_(W,"transform","translateZ(0)")),vt=!0,n._dragStartId=Bt(n._dragStarted.bind(n,e,t)),g(document,"selectstart",n),dt=!0,d&&_(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,o,i,a=this.el,l=t.target,s=this.options,c=s.group,u=Rt.active,d=ot===c,h=s.sort,f=it||u,p=this,g=!1;if(!Dt){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),l=y(l,s.draggable,a,!0),Y("dragOver"),Rt.eventCanceled)return g;if(W.contains(t.target)||l.animated&&l.animatingX&&l.animatingY||p._ignoreWhileAnimating===l)return B(!1);if(mt=!1,u&&!s.disabled&&(d?h||(o=!G.contains(W)):it===this||(this.lastPutMode=ot.checkPull(this,u,W,t))&&c.checkPut(this,u,W,t))){if(i="vertical"===this._getDirection(t,l),e=T(W),Y("dragOverValid"),Rt.eventCanceled)return g;if(o)return z=G,L(),this._hideClone(),Y("revert"),Rt.eventCanceled||(q?G.insertBefore(W,q):G.appendChild(W)),B(!0);var v=M(a,s.draggable);if(!v||function(t,e,n){var o=T(M(n.el,n.options.draggable));return e?t.clientX>o.right+10||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+10}(t,i,this)&&!v.animated){if(v===W)return B(!1);if(v&&a===t.target&&(l=v),l&&(n=T(l)),!1!==Xt(G,a,W,e,l,n,t,!!l))return L(),a.appendChild(W),z=a,j(),B(!0)}else if(l.parentNode===a){n=T(l);var m,b,w,E=W.parentNode!==a,x=!function(t,e,n){var o=n?t.left:t.top,i=n?e.left:e.top;return o===i||(n?t.right:t.bottom)===(n?e.right:e.bottom)||o+(n?t.width:t.height)/2===i+(n?e.width:e.height)/2}(W.animated&&W.toRect||e,l.animated&&l.toRect||n,i),S=i?"top":"left",C=O(l,"top","top")||O(W,"top","top"),I=C?C.scrollTop:void 0;if(ht!==l&&(b=n[S],yt=!1,wt=!x&&s.invertSwap||E),0!==(m=function(t,e,n,o,i,r,a,l){var s=o?t.clientY:t.clientX,c=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,h=!1;if(!a)if(l&&pt<c*i){if(!yt&&(1===ft?s>u+c*r/2:s<d-c*r/2)&&(yt=!0),yt)h=!0;else if(1===ft?s<u+pt:s>d-pt)return-ft}else if(s>u+c*(1-i)/2&&s<d-c*(1-i)/2)return function(t){return N(W)<N(t)?1:-1}(e);if((h=h||a)&&(s<u+c*r/2||s>d-c*r/2))return s>u+c/2?1:-1;return 0}(t,l,n,i,x?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,wt,ht===l))){var P=N(W);do{w=z.children[P-=m]}while(w&&("none"===_(w,"display")||w===U))}if(0===m||w===l)return B(!1);ht=l,ft=m;var A=l.nextElementSibling,k=!1,R=Xt(G,a,W,e,l,n,t,k=1===m);if(!1!==R)return 1!==R&&-1!==R||(k=1===R),Dt=!0,setTimeout(Ft,30),L(),k&&!A?a.appendChild(W):l.parentNode.insertBefore(W,k?A:l),C&&X(C,0,I-C.scrollTop),z=W.parentNode,void 0===b||wt||(pt=Math.abs(b-T(l)[S])),j(),B(!0)}if(a.contains(W))return B(!1)}return!1}function Y(s,c){$(s,p,r({evt:t,isOwner:d,axis:i?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:h,fromSortable:f,target:l,completed:B,onMove:function(n,o){return Xt(G,a,W,e,n,T(n),t,o)},changed:j},c))}function L(){Y("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function B(e){return Y("dragOverCompleted",{insertion:e}),e&&(d?u._hideClone():u._showClone(p),p!==f&&(D(W,it?it.options.ghostClass:u.options.ghostClass,!1),D(W,s.ghostClass,!0)),it!==p&&p!==Rt.active?it=p:p===Rt.active&&it&&(it=null),f===p&&(p._ignoreWhileAnimating=l),p.animateAll((function(){Y("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(l===W&&!W.animated||l===a&&!l.animated)&&(ht=null),s.dragoverBubble||t.rootEl||l===document||(W.parentNode[F]._isOutsideThisEl(t.target),!e&&At(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function j(){tt=N(W),nt=N(W,s.draggable),V({sortable:p,name:"change",toEl:a,newIndex:tt,newDraggableIndex:nt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){v(document,"mousemove",this._onTouchMove),v(document,"touchmove",this._onTouchMove),v(document,"pointermove",this._onTouchMove),v(document,"dragover",At),v(document,"mousemove",At),v(document,"touchmove",At)},_offUpEvents:function(){var t=this.el.ownerDocument;v(t,"mouseup",this._onDrop),v(t,"touchend",this._onDrop),v(t,"pointerup",this._onDrop),v(t,"touchcancel",this._onDrop),v(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;tt=N(W),nt=N(W,n.draggable),$("drop",this,{evt:t}),z=W&&W.parentNode,tt=N(W),nt=N(W,n.draggable),Rt.eventCanceled||(vt=!1,wt=!1,yt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),jt(this.cloneId),jt(this._dragStartId),this.nativeDraggable&&(v(document,"drop",this),v(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),d&&_(document.body,"user-select",""),_(W,"transform",""),t&&(dt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),U&&U.parentNode&&U.parentNode.removeChild(U),(G===z||it&&"clone"!==it.lastPutMode)&&K&&K.parentNode&&K.parentNode.removeChild(K),W&&(this.nativeDraggable&&v(W,"dragend",this),Yt(W),W.style["will-change"]="",dt&&!vt&&D(W,it?it.options.ghostClass:this.options.ghostClass,!1),D(W,this.options.chosenClass,!1),V({sortable:this,name:"unchoose",toEl:z,newIndex:null,newDraggableIndex:null,originalEvent:t}),G!==z?(tt>=0&&(V({rootEl:z,name:"add",toEl:z,fromEl:G,originalEvent:t}),V({sortable:this,name:"remove",toEl:z,originalEvent:t}),V({rootEl:z,name:"sort",toEl:z,fromEl:G,originalEvent:t}),V({sortable:this,name:"sort",toEl:z,originalEvent:t})),it&&it.save()):tt!==J&&tt>=0&&(V({sortable:this,name:"update",toEl:z,originalEvent:t}),V({sortable:this,name:"sort",toEl:z,originalEvent:t})),Rt.active&&(null!=tt&&-1!==tt||(tt=J,nt=et),V({sortable:this,name:"end",toEl:z,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){$("nulling",this),G=W=z=U=q=K=Z=Q=rt=at=dt=tt=nt=J=et=ht=ft=it=ot=Rt.dragged=Rt.ghost=Rt.clone=Rt.active=null,_t.forEach((function(t){t.checked=!0})),_t.length=lt=st=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":W&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)y(t=n[o],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||Lt(t));return e},sort:function(t){var e={},n=this.el;this.toArray().forEach((function(t,o){var i=n.children[o];y(i,this.options.draggable,n,!1)&&(e[t]=i)}),this),t.forEach((function(t){e[t]&&(n.removeChild(e[t]),n.appendChild(e[t]))}))},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return y(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=H.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&Mt(n)},destroy:function(){$("destroy",this);var t=this.el;t[F]=null,v(t,"mousedown",this._onTapStart),v(t,"touchstart",this._onTapStart),v(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(v(t,"dragover",this),v(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),bt.splice(bt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Q){if($("hideClone",this),Rt.eventCanceled)return;_(K,"display","none"),this.options.removeCloneOnHide&&K.parentNode&&K.parentNode.removeChild(K),Q=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(Q){if($("showClone",this),Rt.eventCanceled)return;G.contains(W)&&!this.options.group.revertClone?G.insertBefore(K,W):q?G.insertBefore(K,q):G.appendChild(K),this.options.group.revertClone&&this.animate(W,K),_(K,"display",""),Q=!1}}else this._hideClone()}},xt&&g(document,"touchmove",(function(t){(Rt.active||vt)&&t.cancelable&&t.preventDefault()})),Rt.utils={on:g,off:v,css:_,find:S,is:function(t,e){return!!y(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:R,closest:y,toggleClass:D,clone:Y,index:N,nextTick:Bt,cancelNextTick:jt,detectDirection:It,getChild:I},Rt.get=function(t){return t[F]},Rt.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(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Rt.utils=r({},Rt.utils,t.utils)),H.mount(t)}))},Rt.create=function(t,e){return new Rt(t,e)},Rt.version="1.10.2";var Ht,$t,Vt,Wt,zt,Ut,Gt=[],qt=!1;function Zt(){Gt.forEach((function(t){clearInterval(t.pid)})),Gt=[]}function Kt(){clearInterval(Ut)}var Qt=R((function(t,e,n,o){if(e.scroll){var i,r=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,s=e.scrollSpeed,c=C(),u=!1;$t!==n&&($t=n,Zt(),i=e.scrollFn,!0===(Ht=e.scroll)&&(Ht=A(n,!0)));var d=0,h=Ht;do{var f=h,p=T(f),g=p.top,v=p.bottom,m=p.left,b=p.right,y=p.width,w=p.height,E=void 0,D=void 0,x=f.scrollWidth,S=f.scrollHeight,O=_(f),I=f.scrollLeft,M=f.scrollTop;f===c?(E=y<x&&("auto"===O.overflowX||"scroll"===O.overflowX||"visible"===O.overflowX),D=w<S&&("auto"===O.overflowY||"scroll"===O.overflowY||"visible"===O.overflowY)):(E=y<x&&("auto"===O.overflowX||"scroll"===O.overflowX),D=w<S&&("auto"===O.overflowY||"scroll"===O.overflowY));var N=E&&(Math.abs(b-r)<=l&&I+y<x)-(Math.abs(m-r)<=l&&!!I),P=D&&(Math.abs(v-a)<=l&&M+w<S)-(Math.abs(g-a)<=l&&!!M);if(!Gt[d])for(var k=0;k<=d;k++)Gt[k]||(Gt[k]={});Gt[d].vx==N&&Gt[d].vy==P&&Gt[d].el===f||(Gt[d].el=f,Gt[d].vx=N,Gt[d].vy=P,clearInterval(Gt[d].pid),0==N&&0==P||(u=!0,Gt[d].pid=setInterval(function(){o&&0===this.layer&&Rt.active._onTouchMove(zt);var e=Gt[this.layer].vy?Gt[this.layer].vy*s:0,n=Gt[this.layer].vx?Gt[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call(Rt.dragged.parentNode[F],n,e,t,zt,Gt[this.layer].el)||X(Gt[this.layer].el,n,e)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&h!==c&&(h=A(h,!1)));qt=u}}),30),Jt=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.dispatchSortableEvent,r=t.unhideGhostForTarget;if(e){var a=n||t.activeSortable;(0,t.hideGhostForTarget)();var l=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,s=document.elementFromPoint(l.clientX,l.clientY);r(),a&&!a.el.contains(s)&&(i("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function te(){}function ee(){}te.prototype={startIndex:null,dragStart:function(t){this.startIndex=t.oldDraggableIndex},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=I(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:Jt},i(te,{pluginName:"revertOnSpill"}),ee.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:Jt},i(ee,{pluginName:"removeOnSpill"}),Rt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?g(document,"dragover",this._handleAutoScroll):g(document,this.options.supportPointer?"pointermove":e.touches?"touchmove":"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?v(document,"dragover",this._handleAutoScroll):(v(document,"pointermove",this._handleFallbackAutoScroll),v(document,"touchmove",this._handleFallbackAutoScroll),v(document,"mousemove",this._handleFallbackAutoScroll)),Kt(),Zt(),clearTimeout(w),w=void 0},nulling:function(){zt=$t=Ht=qt=Ut=Vt=Wt=null,Gt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,o=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(o,i);if(zt=t,e||c||s||d){Qt(t,this.options,r,e);var a=A(r,!0);!qt||Ut&&o===Vt&&i===Wt||(Ut&&Kt(),Ut=setInterval((function(){var r=A(document.elementFromPoint(o,i),!0);r!==a&&(a=r,Zt()),Qt(t,n.options,r,e)}),10),Vt=o,Wt=i)}else{if(!this.options.bubbleScroll||A(r,!0)===C())return void Zt();Qt(t,this.options,A(r,!1),!1)}}},i(t,{pluginName:"scroll",initializeByDefault:!0})}),Rt.mount(ee,te);const ne="undefined"!=typeof window?window.console:global.console;const oe=/-(\w)/g,ie=function(t){const e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}(t=>t.replace(oe,(t,e)=>e?e.toUpperCase():""));function re(t){null!==t.parentElement&&t.parentElement.removeChild(t)}function ae(t,e,n){t.insertBefore(e,0===n?t.children[0]:t.children[n-1].nextSibling)}function le(t,e){this.$nextTick(()=>this.$emit(t.toLowerCase(),e))}function se(t){return e=>{null!==this.realList&&this["onDrag"+t](e),le.call(this,t,e)}}const ce=["Start","Add","Remove","Update","End"],ue=["Choose","Unchoose","Sort","Filter","Clone"],de=["Move",...ce,...ue].map(t=>"on"+t);let he=null;const fe={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:t=>t},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},pe=e.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,props:fe,data:()=>({transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}),render(){const t=this.$slots.default?this.$slots.default():null;return t?(this.transitionMode=function(t){if(!t||1!==t.length)return!1;const[{type:e}]=t;return!!e&&["transition-group","TransitionGroup"].includes(e.name)}(t),e.h(this.tag,this.$attrs,t)):e.h(this.tag,[])},created(){this.list||ne.error("list props are mutually exclusive! Please set one.")},mounted(){const t={};ce.forEach(e=>{t["on"+e]=se.call(this,e)}),ue.forEach(e=>{t["on"+e]=le.bind(this,e)});const e=Object.keys(this.$attrs).reduce((t,e)=>(t[ie(e)]=this.$attrs[e],t),{}),n=Object.assign({},e,t,{onMove:(t,e)=>this.onDragMove(t,e)});!("draggable"in n)&&(n.draggable=">*"),this._sortable=new Rt(this.$el,n),this.computeIndexes()},beforeDestroy(){void 0!==this._sortable&&this._sortable.destroy()},computed:{realList(){return this.list}},watch:{$attrs:{handler(t){this.updateOptions(t)},deep:!0},realList(){this.computeIndexes()}},methods:{updateOptions(t){for(var e in t){const n=ie(e);-1===de.indexOf(n)&&this._sortable.option(n,t[e])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=function(t,e,n,o){if(!t)return[];const i=Object.values(t),r=e.length-o;return[...e].map((t,e)=>e>=r?i.length:i.indexOf(t))}(this.getChildrenNodes(),this.$el.children,0,this.footerOffset)})},getUnderlyingVm(t){const e=function(t,e){return Object.values(t).indexOf(e)}(this.getChildrenNodes()||[],t);if(-1===e)return null;return{index:e,element:this.realList[e]}},emitChanges(t){this.$nextTick(()=>{this.$emit("change",t)})},alterList(t){this.list&&t(this.list)},spliceList(){this.alterList(t=>t.splice(...arguments))},updatePosition(t,e){this.alterList(n=>n.splice(e,0,n.splice(t,1)[0]))},getVmIndex(t){const e=this.visibleIndexes,n=e.length;return t>n-1?n:e[t]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(t){if(!this.noTransitionOnDrag||!this.transitionMode)return;this.getChildrenNodes()[t].data=null;const e=this.getComponent();e.children=[],e.kept=void 0},onDragStart(t){this.context=this.getUnderlyingVm(t.item),this.context&&(t.item._underlying_vm_=this.clone(this.context.element),he=t.item)},onDragAdd(t){const e=t.item._underlying_vm_;if(void 0===e)return;re(t.item);const n=this.getVmIndex(t.newIndex);this.spliceList(n,0,e),this.computeIndexes();this.emitChanges({added:{element:e,newIndex:n}})},onDragRemove(t){if(ae(this.$el,t.item,t.oldIndex),"clone"===t.pullMode)return void re(t.clone);if(!this.context)return;const e=this.context.index;this.spliceList(e,1);const n={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:n})},onDragUpdate(t){re(t.item),ae(t.from,t.item,t.oldIndex);const e=this.context.index,n=this.getVmIndex(t.newIndex);this.updatePosition(e,n);this.emitChanges({moved:{element:this.context.element,oldIndex:e,newIndex:n}})},updateProperty(t,e){t.hasOwnProperty(e)&&(t[e]+=this.headerOffset)},onDragMove(t,e){const n=this.move;if(!n||!this.realList)return!0;const o=this.getRelatedContextFromMoveEvent(t),i=this.context,r=this.computeFutureIndex(o,t);Object.assign(i,{futureIndex:r});return n(Object.assign({},t,{relatedContext:o,draggedContext:i}),e)},onDragEnd(){this.computeIndexes(),he=null},getRelatedContextFromMoveEvent({to:t,related:e}){const n=this;if(!n)return{component:n};const o=n.realList,i={list:o,component:n};if(t!==e&&o&&n.getUnderlyingVm){const t=n.getUnderlyingVm(e);if(t)return Object.assign(t,i)}return i},computeFutureIndex(t,e){if(!t.element)return 0;const n=[...e.to.children].filter(t=>"none"!==t.style.display),o=n.indexOf(e.related),i=t.component.getVmIndex(o);return-1!==n.indexOf(he)||!e.willInsertAfter?i:i+1}}});return t.VueDraggableNext=pe,t}({},Vue); | ||
*/function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),i.forEach((function(e){o(t,e,n[e])}))}return t}function a(t,e){if(null==t)return{};var n,o,i=function(t,e){if(null==t)return{};var n,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)e.indexOf(n=r[o])>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o<r.length;o++)e.indexOf(n=r[o])>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function l(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var s=l(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),c=l(/Edge/i),u=l(/firefox/i),d=l(/safari/i)&&!l(/chrome/i)&&!l(/android/i),h=l(/iP(ad|od|hone)/i),f=l(/chrome/i)&&l(/android/i),p={capture:!1,passive:!1};function g(t,e,n){t.addEventListener(e,n,!s&&p)}function v(t,e,n){t.removeEventListener(e,n,!s&&p)}function m(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(t){return!1}return!1}}function b(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function y(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&m(t,e):m(t,e))||o&&t===n)return t;if(t===n)break}while(t=b(t))}return null}var w,E=/\s+/g;function D(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(E," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(E," ")}}function _(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function x(t,e){var n="";if("string"==typeof t)n=t;else do{var o=_(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function S(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function C(){var t=document.scrollingElement;return t||document.documentElement}function T(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var r,a,l,c,u,d,h;if(t!==window&&t!==C()?(a=(r=t.getBoundingClientRect()).top,l=r.left,c=r.bottom,u=r.right,d=r.height,h=r.width):(a=0,l=0,c=window.innerHeight,u=window.innerWidth,d=window.innerHeight,h=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!s))do{if(i&&i.getBoundingClientRect&&("none"!==_(i,"transform")||n&&"static"!==_(i,"position"))){var f=i.getBoundingClientRect();a-=f.top+parseInt(_(i,"border-top-width")),l-=f.left+parseInt(_(i,"border-left-width")),c=a+r.height,u=l+r.width;break}}while(i=i.parentNode);if(o&&t!==window){var p=x(i||t),g=p&&p.a,v=p&&p.d;p&&(c=(a/=v)+(d/=v),u=(l/=g)+(h/=g))}return{top:a,left:l,bottom:c,right:u,width:h,height:d}}}function O(t,e,n){for(var o=A(t,!0),i=T(t)[e];o;){var r=T(o)[n];if(!("top"===n||"left"===n?i>=r:i<=r))return o;if(o===C())break;o=A(o,!1)}return!1}function I(t,e,n){for(var o=0,i=0,r=t.children;i<r.length;){if("none"!==r[i].style.display&&r[i]!==Rt.ghost&&r[i]!==Rt.dragged&&y(r[i],n.draggable,t,!1)){if(o===e)return r[i];o++}i++}return null}function M(t,e){for(var n=t.lastElementChild;n&&(n===Rt.ghost||"none"===_(n,"display")||e&&!m(n,e));)n=n.previousElementSibling;return n||null}function N(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Rt.clone||e&&!m(t,e)||n++;return n}function P(t){var e=0,n=0,o=C();if(t)do{var i=x(t);e+=t.scrollLeft*i.a,n+=t.scrollTop*i.d}while(t!==o&&(t=t.parentNode));return[e,n]}function A(t,e){if(!t||!t.getBoundingClientRect)return C();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=_(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return C();if(o||e)return n;o=!0}}}while(n=n.parentNode);return C()}function k(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)}function R(t,e){return function(){if(!w){var n=arguments,o=this;1===n.length?t.call(o,n[0]):t.apply(o,n),w=setTimeout((function(){w=void 0}),e)}}}function X(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function Y(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 F="Sortable"+(new Date).getTime();function L(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==_(t,"display")&&t!==Rt.ghost){e.push({target:t,rect:T(t)});var n=r({},e[e.length-1].rect);if(t.thisAnimationDuration){var o=x(t,!0);o&&(n.top-=o.f,n.left-=o.e)}t.fromRect=n}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(e,{target:t}),1)},animateAll:function(n){var o=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof n&&n());var i=!1,r=0;e.forEach((function(t){var e=0,n=t.target,a=n.fromRect,l=T(n),s=n.prevFromRect,c=n.prevToRect,u=t.rect,d=x(n,!0);d&&(l.top-=d.f,l.left-=d.e),n.toRect=l,n.thisAnimationDuration&&k(s,l)&&!k(a,l)&&(u.top-l.top)/(u.left-l.left)==(a.top-l.top)/(a.left-l.left)&&(e=function(t,e,n,o){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))*o.animation}(u,s,c,o.options)),k(l,a)||(n.prevFromRect=a,n.prevToRect=l,e||(e=o.options.animation),o.animate(n,u,l,e)),e&&(i=!0,r=Math.max(r,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),i?t=setTimeout((function(){"function"==typeof n&&n()}),r):"function"==typeof n&&n(),e=[]},animate:function(t,e,n,o){if(o){_(t,"transition",""),_(t,"transform","");var i=x(this.el),r=(e.left-n.left)/(i&&i.a||1),a=(e.top-n.top)/(i&&i.d||1);t.animatingX=!!r,t.animatingY=!!a,_(t,"transform","translate3d("+r+"px,"+a+"px,0)"),_(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),_(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){_(t,"transition",""),_(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),o)}}}}var B=[],j={initializeByDefault:!0},V={mount:function(t){for(var e in j)j.hasOwnProperty(e)&&!(e in t)&&(t[e]=j[e]);B.push(t)},pluginEvent:function(t,e,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var i=t+"Global";B.forEach((function(o){e[o.pluginName]&&(e[o.pluginName][i]&&e[o.pluginName][i](r({sortable:e},n)),e.options[o.pluginName]&&e[o.pluginName][t]&&e[o.pluginName][t](r({sortable:e},n)))}))},initializePlugins:function(t,e,n,o){for(var r in B.forEach((function(o){var r=o.pluginName;if(t.options[r]||o.initializeByDefault){var a=new o(t,e,t.options);a.sortable=t,a.options=t.options,t[r]=a,i(n,a.defaults)}})),t.options)if(t.options.hasOwnProperty(r)){var a=this.modifyOption(t,r,t.options[r]);void 0!==a&&(t.options[r]=a)}},getEventProperties:function(t,e){var n={};return B.forEach((function(o){"function"==typeof o.eventProperties&&i(n,o.eventProperties.call(e[o.pluginName],t))})),n},modifyOption:function(t,e,n){var o;return B.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[e]&&(o=i.optionListeners[e].call(t[i.pluginName],n))})),o}};var H=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,i=a(n,["evt"]);V.pluginEvent.bind(Rt)(t,e,r({dragEl:W,parentEl:z,ghostEl:U,rootEl:G,nextEl:q,lastDownEl:Z,cloneEl:K,cloneHidden:Q,dragStarted:dt,putSortable:it,activeSortable:Rt.active,originalEvent:o,oldIndex:J,oldDraggableIndex:et,newIndex:tt,newDraggableIndex:nt,hideGhostForTarget:Nt,unhideGhostForTarget:Pt,cloneNowHidden:function(){Q=!0},cloneNowShown:function(){Q=!1},dispatchSortableEvent:function(t){$({sortable:e,name:t,originalEvent:o})}},i))};function $(t){!function(t){var e=t.sortable,n=t.rootEl,o=t.name,i=t.targetEl,a=t.cloneEl,l=t.toEl,u=t.fromEl,d=t.oldIndex,h=t.newIndex,f=t.oldDraggableIndex,p=t.newDraggableIndex,g=t.originalEvent,v=t.putSortable,m=t.extraEventProperties;if(e=e||n&&n[F]){var b,y=e.options,w="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||s||c?(b=document.createEvent("Event")).initEvent(o,!0,!0):b=new CustomEvent(o,{bubbles:!0,cancelable:!0}),b.to=l||n,b.from=u||n,b.item=i||n,b.clone=a,b.oldIndex=d,b.newIndex=h,b.oldDraggableIndex=f,b.newDraggableIndex=p,b.originalEvent=g,b.pullMode=v?v.lastPutMode:void 0;var E=r({},m,V.getEventProperties(o,e));for(var D in E)b[D]=E[D];n&&n.dispatchEvent(b),y[w]&&y[w].call(e,b)}}(r({putSortable:it,cloneEl:K,targetEl:W,rootEl:G,oldIndex:J,oldDraggableIndex:et,newIndex:tt,newDraggableIndex:nt},t))}var W,z,U,G,q,Z,K,Q,J,tt,et,nt,ot,it,rt,at,lt,st,ct,ut,dt,ht,ft,pt,gt,vt=!1,mt=!1,bt=[],yt=!1,wt=!1,Et=[],Dt=!1,_t=[],xt="undefined"!=typeof document,St=h,Ct=c||s?"cssFloat":"float",Tt=xt&&!f&&!h&&"draggable"in document.createElement("div"),Ot=function(){if(xt){if(s)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),It=function(t,e){var n=_(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=I(t,0,e),r=I(t,1,e),a=i&&_(i),l=r&&_(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+T(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+T(r).width;return"flex"===n.display?"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal":"grid"===n.display?n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":i&&a.float&&"none"!==a.float?!r||"both"!==l.clear&&l.clear!==("left"===a.float?"left":"right")?"horizontal":"vertical":i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[Ct]||r&&"none"===n[Ct]&&s+c>o)?"vertical":"horizontal"},Mt=function(t){function e(t,n){return function(o,i,r,a){if(null==t&&(n||o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,i,r,a),n)(o,i,r,a);var l=(n?o:i).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var o={},i=t.group;i&&"object"==n(i)||(i={name:i}),o.name=i.name,o.checkPull=e(i.pull,!0),o.checkPut=e(i.put),o.revertClone=i.revertClone,t.group=o},Nt=function(){!Ot&&U&&_(U,"display","none")},Pt=function(){!Ot&&U&&_(U,"display","")};xt&&document.addEventListener("click",(function(t){if(mt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),mt=!1,!1}),!0);var At=function(t){if(W){var e=(i=(t=t.touches?t.touches[0]:t).clientX,r=t.clientY,bt.some((function(t){if(!M(t)){var e=T(t),n=t[F].options.emptyInsertThreshold;return n&&i>=e.left-n&&i<=e.right+n&&r>=e.top-n&&r<=e.bottom+n?a=t:void 0}})),a);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[F]._onDragOver(n)}}var i,r,a},kt=function(t){W&&W.parentNode[F]._isOutsideThisEl(t.target)};function Rt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=i({},e),t[F]=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 It(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(t,e){t.setData("Text",e.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:!1!==Rt.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var o in V.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var r in Mt(e),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!e.forceFallback&&Tt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?g(t,"pointerdown",this._onTapStart):(g(t,"mousedown",this._onTapStart),g(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(g(t,"dragover",this),g(t,"dragenter",this)),bt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),i(this,L())}function Xt(t,e,n,o,i,r,a,l){var u,d,h=t[F],f=h.options.onMove;return!window.CustomEvent||s||c?(u=document.createEvent("Event")).initEvent("move",!0,!0):u=new CustomEvent("move",{bubbles:!0,cancelable:!0}),u.to=e,u.from=t,u.dragged=n,u.draggedRect=o,u.related=i||e,u.relatedRect=r||T(e),u.willInsertAfter=l,u.originalEvent=a,t.dispatchEvent(u),f&&(d=f.call(h,u,a)),d}function Yt(t){t.draggable=!1}function Ft(){Dt=!1}function Lt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function Bt(t){return setTimeout(t,0)}function jt(t){return clearTimeout(t)}Rt.prototype={constructor:Rt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(ht=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,W):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,i=o.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(a||t).target,s=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=o.filter;if(function(t){_t.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&_t.push(o)}}(n),!W&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled||s.isContentEditable||(l=y(l,o.draggable,n,!1))&&l.animated||Z===l)){if(J=N(l),et=N(l,o.draggable),"function"==typeof c){if(c.call(this,t,l,this))return $({sortable:e,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),H("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=y(s,o.trim(),n,!1))return $({sortable:e,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),H("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());o.handle&&!y(s,o.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;if(n&&!W&&n.parentNode===r){var d=T(n);if(G=r,z=(W=n).parentNode,q=W.nextSibling,Z=n,ot=a.group,Rt.dragged=W,ct=(rt={target:W,clientX:(e||t).clientX,clientY:(e||t).clientY}).clientX-d.left,ut=rt.clientY-d.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,W.style["will-change"]="all",o=function(){H("delayEnded",i,{evt:t}),Rt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!u&&i.nativeDraggable&&(W.draggable=!0),i._triggerDragStart(t,e),$({sortable:i,name:"choose",originalEvent:t}),D(W,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){S(W,t.trim(),Yt)})),g(l,"dragover",At),g(l,"mousemove",At),g(l,"touchmove",At),g(l,"mouseup",i._onDrop),g(l,"touchend",i._onDrop),g(l,"touchcancel",i._onDrop),u&&this.nativeDraggable&&(this.options.touchStartThreshold=4,W.draggable=!0),H("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(c||s))o();else{if(Rt.eventCanceled)return void this._onDrop();g(l,"mouseup",i._disableDelayedDrag),g(l,"touchend",i._disableDelayedDrag),g(l,"touchcancel",i._disableDelayedDrag),g(l,"mousemove",i._delayedDragTouchMoveHandler),g(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&g(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;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()},_disableDelayedDrag:function(){W&&Yt(W),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;v(t,"mouseup",this._disableDelayedDrag),v(t,"touchend",this._disableDelayedDrag),v(t,"touchcancel",this._disableDelayedDrag),v(t,"mousemove",this._delayedDragTouchMoveHandler),v(t,"touchmove",this._delayedDragTouchMoveHandler),v(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?g(document,this.options.supportPointer?"pointermove":e?"touchmove":"mousemove",this._onTouchMove):(g(W,"dragend",this),g(G,"dragstart",this._onDragStart));try{document.selection?Bt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(vt=!1,G&&W){H("dragStarted",this,{evt:e}),this.nativeDraggable&&g(document,"dragover",kt);var n=this.options;!t&&D(W,n.dragClass,!1),D(W,n.ghostClass,!0),Rt.active=this,t&&this._appendGhost(),$({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(at){this._lastX=at.clientX,this._lastY=at.clientY,Nt();for(var t=document.elementFromPoint(at.clientX,at.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(at.clientX,at.clientY))!==e;)e=t;if(W.parentNode[F]._isOutsideThisEl(t),e)do{if(e[F]){if(e[F]._onDragOver({clientX:at.clientX,clientY:at.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Pt()}},_onTouchMove:function(t){if(rt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=U&&x(U,!0),a=U&&r&&r.a,l=U&&r&&r.d,s=St&>&&P(gt),c=(i.clientX-rt.clientX+o.x)/(a||1)+(s?s[0]-Et[0]:0)/(a||1),u=(i.clientY-rt.clientY+o.y)/(l||1)+(s?s[1]-Et[1]:0)/(l||1);if(!Rt.active&&!vt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(U){r?(r.e+=c-(lt||0),r.f+=u-(st||0)):r={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");_(U,"webkitTransform",d),_(U,"mozTransform",d),_(U,"msTransform",d),_(U,"transform",d),lt=c,st=u,at=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!U){var t=this.options.fallbackOnBody?document.body:G,e=T(W,!0,St,!0,t),n=this.options;if(St){for(gt=t;"static"===_(gt,"position")&&"none"===_(gt,"transform")&>!==document;)gt=gt.parentNode;gt!==document.body&>!==document.documentElement?(gt===document&&(gt=C()),e.top+=gt.scrollTop,e.left+=gt.scrollLeft):gt=C(),Et=P(gt)}D(U=W.cloneNode(!0),n.ghostClass,!1),D(U,n.fallbackClass,!0),D(U,n.dragClass,!0),_(U,"transition",""),_(U,"transform",""),_(U,"box-sizing","border-box"),_(U,"margin",0),_(U,"top",e.top),_(U,"left",e.left),_(U,"width",e.width),_(U,"height",e.height),_(U,"opacity","0.8"),_(U,"position",St?"absolute":"fixed"),_(U,"zIndex","100000"),_(U,"pointerEvents","none"),Rt.ghost=U,t.appendChild(U),_(U,"transform-origin",ct/parseInt(U.style.width)*100+"% "+ut/parseInt(U.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;H("dragStart",this,{evt:t}),Rt.eventCanceled?this._onDrop():(H("setupClone",this),Rt.eventCanceled||((K=Y(W)).draggable=!1,K.style["will-change"]="",this._hideClone(),D(K,this.options.chosenClass,!1),Rt.clone=K),n.cloneId=Bt((function(){H("clone",n),Rt.eventCanceled||(n.options.removeCloneOnHide||G.insertBefore(K,W),n._hideClone(),$({sortable:n,name:"clone"}))})),!e&&D(W,i.dragClass,!0),e?(mt=!0,n._loopId=setInterval(n._emulateDragOver,50)):(v(document,"mouseup",n._onDrop),v(document,"touchend",n._onDrop),v(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,W)),g(document,"drop",n),_(W,"transform","translateZ(0)")),vt=!0,n._dragStartId=Bt(n._dragStarted.bind(n,e,t)),g(document,"selectstart",n),dt=!0,d&&_(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,o,i,a=this.el,l=t.target,s=this.options,c=s.group,u=Rt.active,d=ot===c,h=s.sort,f=it||u,p=this,g=!1;if(!Dt){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),l=y(l,s.draggable,a,!0),Y("dragOver"),Rt.eventCanceled)return g;if(W.contains(t.target)||l.animated&&l.animatingX&&l.animatingY||p._ignoreWhileAnimating===l)return B(!1);if(mt=!1,u&&!s.disabled&&(d?h||(o=!G.contains(W)):it===this||(this.lastPutMode=ot.checkPull(this,u,W,t))&&c.checkPut(this,u,W,t))){if(i="vertical"===this._getDirection(t,l),e=T(W),Y("dragOverValid"),Rt.eventCanceled)return g;if(o)return z=G,L(),this._hideClone(),Y("revert"),Rt.eventCanceled||(q?G.insertBefore(W,q):G.appendChild(W)),B(!0);var v=M(a,s.draggable);if(!v||function(t,e,n){var o=T(M(n.el,n.options.draggable));return e?t.clientX>o.right+10||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+10}(t,i,this)&&!v.animated){if(v===W)return B(!1);if(v&&a===t.target&&(l=v),l&&(n=T(l)),!1!==Xt(G,a,W,e,l,n,t,!!l))return L(),a.appendChild(W),z=a,j(),B(!0)}else if(l.parentNode===a){n=T(l);var m,b,w,E=W.parentNode!==a,x=!function(t,e,n){var o=n?t.left:t.top,i=n?e.left:e.top;return o===i||(n?t.right:t.bottom)===(n?e.right:e.bottom)||o+(n?t.width:t.height)/2===i+(n?e.width:e.height)/2}(W.animated&&W.toRect||e,l.animated&&l.toRect||n,i),S=i?"top":"left",C=O(l,"top","top")||O(W,"top","top"),I=C?C.scrollTop:void 0;if(ht!==l&&(b=n[S],yt=!1,wt=!x&&s.invertSwap||E),0!==(m=function(t,e,n,o,i,r,a,l){var s=o?t.clientY:t.clientX,c=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,h=!1;if(!a)if(l&&pt<c*i){if(!yt&&(1===ft?s>u+c*r/2:s<d-c*r/2)&&(yt=!0),yt)h=!0;else if(1===ft?s<u+pt:s>d-pt)return-ft}else if(s>u+c*(1-i)/2&&s<d-c*(1-i)/2)return function(t){return N(W)<N(t)?1:-1}(e);if((h=h||a)&&(s<u+c*r/2||s>d-c*r/2))return s>u+c/2?1:-1;return 0}(t,l,n,i,x?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,wt,ht===l))){var P=N(W);do{w=z.children[P-=m]}while(w&&("none"===_(w,"display")||w===U))}if(0===m||w===l)return B(!1);ht=l,ft=m;var A=l.nextElementSibling,k=!1,R=Xt(G,a,W,e,l,n,t,k=1===m);if(!1!==R)return 1!==R&&-1!==R||(k=1===R),Dt=!0,setTimeout(Ft,30),L(),k&&!A?a.appendChild(W):l.parentNode.insertBefore(W,k?A:l),C&&X(C,0,I-C.scrollTop),z=W.parentNode,void 0===b||wt||(pt=Math.abs(b-T(l)[S])),j(),B(!0)}if(a.contains(W))return B(!1)}return!1}function Y(s,c){H(s,p,r({evt:t,isOwner:d,axis:i?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:h,fromSortable:f,target:l,completed:B,onMove:function(n,o){return Xt(G,a,W,e,n,T(n),t,o)},changed:j},c))}function L(){Y("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function B(e){return Y("dragOverCompleted",{insertion:e}),e&&(d?u._hideClone():u._showClone(p),p!==f&&(D(W,it?it.options.ghostClass:u.options.ghostClass,!1),D(W,s.ghostClass,!0)),it!==p&&p!==Rt.active?it=p:p===Rt.active&&it&&(it=null),f===p&&(p._ignoreWhileAnimating=l),p.animateAll((function(){Y("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(l===W&&!W.animated||l===a&&!l.animated)&&(ht=null),s.dragoverBubble||t.rootEl||l===document||(W.parentNode[F]._isOutsideThisEl(t.target),!e&&At(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function j(){tt=N(W),nt=N(W,s.draggable),$({sortable:p,name:"change",toEl:a,newIndex:tt,newDraggableIndex:nt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){v(document,"mousemove",this._onTouchMove),v(document,"touchmove",this._onTouchMove),v(document,"pointermove",this._onTouchMove),v(document,"dragover",At),v(document,"mousemove",At),v(document,"touchmove",At)},_offUpEvents:function(){var t=this.el.ownerDocument;v(t,"mouseup",this._onDrop),v(t,"touchend",this._onDrop),v(t,"pointerup",this._onDrop),v(t,"touchcancel",this._onDrop),v(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;tt=N(W),nt=N(W,n.draggable),H("drop",this,{evt:t}),z=W&&W.parentNode,tt=N(W),nt=N(W,n.draggable),Rt.eventCanceled||(vt=!1,wt=!1,yt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),jt(this.cloneId),jt(this._dragStartId),this.nativeDraggable&&(v(document,"drop",this),v(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),d&&_(document.body,"user-select",""),_(W,"transform",""),t&&(dt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),U&&U.parentNode&&U.parentNode.removeChild(U),(G===z||it&&"clone"!==it.lastPutMode)&&K&&K.parentNode&&K.parentNode.removeChild(K),W&&(this.nativeDraggable&&v(W,"dragend",this),Yt(W),W.style["will-change"]="",dt&&!vt&&D(W,it?it.options.ghostClass:this.options.ghostClass,!1),D(W,this.options.chosenClass,!1),$({sortable:this,name:"unchoose",toEl:z,newIndex:null,newDraggableIndex:null,originalEvent:t}),G!==z?(tt>=0&&($({rootEl:z,name:"add",toEl:z,fromEl:G,originalEvent:t}),$({sortable:this,name:"remove",toEl:z,originalEvent:t}),$({rootEl:z,name:"sort",toEl:z,fromEl:G,originalEvent:t}),$({sortable:this,name:"sort",toEl:z,originalEvent:t})),it&&it.save()):tt!==J&&tt>=0&&($({sortable:this,name:"update",toEl:z,originalEvent:t}),$({sortable:this,name:"sort",toEl:z,originalEvent:t})),Rt.active&&(null!=tt&&-1!==tt||(tt=J,nt=et),$({sortable:this,name:"end",toEl:z,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){H("nulling",this),G=W=z=U=q=K=Z=Q=rt=at=dt=tt=nt=J=et=ht=ft=it=ot=Rt.dragged=Rt.ghost=Rt.clone=Rt.active=null,_t.forEach((function(t){t.checked=!0})),_t.length=lt=st=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":W&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)y(t=n[o],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||Lt(t));return e},sort:function(t){var e={},n=this.el;this.toArray().forEach((function(t,o){var i=n.children[o];y(i,this.options.draggable,n,!1)&&(e[t]=i)}),this),t.forEach((function(t){e[t]&&(n.removeChild(e[t]),n.appendChild(e[t]))}))},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return y(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=V.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&Mt(n)},destroy:function(){H("destroy",this);var t=this.el;t[F]=null,v(t,"mousedown",this._onTapStart),v(t,"touchstart",this._onTapStart),v(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(v(t,"dragover",this),v(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),bt.splice(bt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Q){if(H("hideClone",this),Rt.eventCanceled)return;_(K,"display","none"),this.options.removeCloneOnHide&&K.parentNode&&K.parentNode.removeChild(K),Q=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(Q){if(H("showClone",this),Rt.eventCanceled)return;G.contains(W)&&!this.options.group.revertClone?G.insertBefore(K,W):q?G.insertBefore(K,q):G.appendChild(K),this.options.group.revertClone&&this.animate(W,K),_(K,"display",""),Q=!1}}else this._hideClone()}},xt&&g(document,"touchmove",(function(t){(Rt.active||vt)&&t.cancelable&&t.preventDefault()})),Rt.utils={on:g,off:v,css:_,find:S,is:function(t,e){return!!y(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:R,closest:y,toggleClass:D,clone:Y,index:N,nextTick:Bt,cancelNextTick:jt,detectDirection:It,getChild:I},Rt.get=function(t){return t[F]},Rt.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(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Rt.utils=r({},Rt.utils,t.utils)),V.mount(t)}))},Rt.create=function(t,e){return new Rt(t,e)},Rt.version="1.10.2";var Vt,Ht,$t,Wt,zt,Ut,Gt=[],qt=!1;function Zt(){Gt.forEach((function(t){clearInterval(t.pid)})),Gt=[]}function Kt(){clearInterval(Ut)}var Qt=R((function(t,e,n,o){if(e.scroll){var i,r=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,s=e.scrollSpeed,c=C(),u=!1;Ht!==n&&(Ht=n,Zt(),i=e.scrollFn,!0===(Vt=e.scroll)&&(Vt=A(n,!0)));var d=0,h=Vt;do{var f=h,p=T(f),g=p.top,v=p.bottom,m=p.left,b=p.right,y=p.width,w=p.height,E=void 0,D=void 0,x=f.scrollWidth,S=f.scrollHeight,O=_(f),I=f.scrollLeft,M=f.scrollTop;f===c?(E=y<x&&("auto"===O.overflowX||"scroll"===O.overflowX||"visible"===O.overflowX),D=w<S&&("auto"===O.overflowY||"scroll"===O.overflowY||"visible"===O.overflowY)):(E=y<x&&("auto"===O.overflowX||"scroll"===O.overflowX),D=w<S&&("auto"===O.overflowY||"scroll"===O.overflowY));var N=E&&(Math.abs(b-r)<=l&&I+y<x)-(Math.abs(m-r)<=l&&!!I),P=D&&(Math.abs(v-a)<=l&&M+w<S)-(Math.abs(g-a)<=l&&!!M);if(!Gt[d])for(var k=0;k<=d;k++)Gt[k]||(Gt[k]={});Gt[d].vx==N&&Gt[d].vy==P&&Gt[d].el===f||(Gt[d].el=f,Gt[d].vx=N,Gt[d].vy=P,clearInterval(Gt[d].pid),0==N&&0==P||(u=!0,Gt[d].pid=setInterval(function(){o&&0===this.layer&&Rt.active._onTouchMove(zt);var e=Gt[this.layer].vy?Gt[this.layer].vy*s:0,n=Gt[this.layer].vx?Gt[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call(Rt.dragged.parentNode[F],n,e,t,zt,Gt[this.layer].el)||X(Gt[this.layer].el,n,e)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&h!==c&&(h=A(h,!1)));qt=u}}),30),Jt=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.dispatchSortableEvent,r=t.unhideGhostForTarget;if(e){var a=n||t.activeSortable;(0,t.hideGhostForTarget)();var l=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,s=document.elementFromPoint(l.clientX,l.clientY);r(),a&&!a.el.contains(s)&&(i("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function te(){}function ee(){}te.prototype={startIndex:null,dragStart:function(t){this.startIndex=t.oldDraggableIndex},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=I(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:Jt},i(te,{pluginName:"revertOnSpill"}),ee.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:Jt},i(ee,{pluginName:"removeOnSpill"}),Rt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?g(document,"dragover",this._handleAutoScroll):g(document,this.options.supportPointer?"pointermove":e.touches?"touchmove":"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?v(document,"dragover",this._handleAutoScroll):(v(document,"pointermove",this._handleFallbackAutoScroll),v(document,"touchmove",this._handleFallbackAutoScroll),v(document,"mousemove",this._handleFallbackAutoScroll)),Kt(),Zt(),clearTimeout(w),w=void 0},nulling:function(){zt=Ht=Vt=qt=Ut=$t=Wt=null,Gt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,o=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(o,i);if(zt=t,e||c||s||d){Qt(t,this.options,r,e);var a=A(r,!0);!qt||Ut&&o===$t&&i===Wt||(Ut&&Kt(),Ut=setInterval((function(){var r=A(document.elementFromPoint(o,i),!0);r!==a&&(a=r,Zt()),Qt(t,n.options,r,e)}),10),$t=o,Wt=i)}else{if(!this.options.bubbleScroll||A(r,!0)===C())return void Zt();Qt(t,this.options,A(r,!1),!1)}}},i(t,{pluginName:"scroll",initializeByDefault:!0})}),Rt.mount(ee,te);const ne="undefined"!=typeof window?window.console:global.console;const oe=/-(\w)/g,ie=function(t){const e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}(t=>t.replace(oe,(t,e)=>e?e.toUpperCase():""));function re(t){null!==t.parentElement&&t.parentElement.removeChild(t)}function ae(t,e,n){t.insertBefore(e,0===n?t.children[0]:t.children[n-1].nextSibling)}function le(t,e){this.$nextTick(()=>this.$emit(t.toLowerCase(),e))}function se(t){return e=>{null!==this.realList&&this["onDrag"+t](e),le.call(this,t,e)}}const ce=["Start","Add","Remove","Update","End"],ue=["Choose","Unchoose","Sort","Filter","Clone"],de=["Move",...ce,...ue].map(t=>"on"+t);let he=null;const fe={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:t=>t},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},modelValue:{type:Array,required:!1,default:null}},pe=e.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,props:fe,data:()=>({transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}),render(){const t=this.$slots.default?this.$slots.default():null;return t?(this.transitionMode=function(t){if(!t||1!==t.length)return!1;const[{type:e}]=t;return!!e&&["transition-group","TransitionGroup"].includes(e.name)}(t),e.h(this.tag,this.$attrs,t)):e.h(this.tag,[])},created(){null!==this.list&&null!==this.modelValue&&ne.error("list props are mutually exclusive! Please set one.")},mounted(){const t={};ce.forEach(e=>{t["on"+e]=se.call(this,e)}),ue.forEach(e=>{t["on"+e]=le.bind(this,e)});const e=Object.keys(this.$attrs).reduce((t,e)=>(t[ie(e)]=this.$attrs[e],t),{}),n=Object.assign({},e,t,{onMove:(t,e)=>this.onDragMove(t,e)});!("draggable"in n)&&(n.draggable=">*"),this._sortable=new Rt(this.$el,n),this.computeIndexes()},beforeDestroy(){void 0!==this._sortable&&this._sortable.destroy()},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(t){this.updateOptions(t)},deep:!0},realList(){this.computeIndexes()}},methods:{updateOptions(t){for(var e in t){const n=ie(e);-1===de.indexOf(n)&&this._sortable.option(n,t[e])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=function(t,e,n,o){if(!t)return[];const i=Object.values(t),r=e.length-o;return[...e].map((t,e)=>e>=r?i.length:i.indexOf(t))}(this.getChildrenNodes(),this.$el.children,0,this.footerOffset)})},getUnderlyingVm(t){const e=function(t,e){return Object.values(t).indexOf(e)}(this.getChildrenNodes()||[],t);if(-1===e)return null;return{index:e,element:this.realList[e]}},emitChanges(t){this.$nextTick(()=>{this.$emit("change",t)})},alterList(t){if(this.list)return void t(this.list);const e=[...this.modelValue];t(e),this.$emit("update:modelValue",e)},spliceList(){this.alterList(t=>t.splice(...arguments))},updatePosition(t,e){this.alterList(n=>n.splice(e,0,n.splice(t,1)[0]))},getVmIndex(t){const e=this.visibleIndexes,n=e.length;return t>n-1?n:e[t]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(t){if(!this.noTransitionOnDrag||!this.transitionMode)return;this.getChildrenNodes()[t].data=null;const e=this.getComponent();e.children=[],e.kept=void 0},onDragStart(t){this.context=this.getUnderlyingVm(t.item),this.context&&(t.item._underlying_vm_=this.clone(this.context.element),he=t.item)},onDragAdd(t){const e=t.item._underlying_vm_;if(void 0===e)return;re(t.item);const n=this.getVmIndex(t.newIndex);this.spliceList(n,0,e),this.computeIndexes();this.emitChanges({added:{element:e,newIndex:n}})},onDragRemove(t){if(ae(this.$el,t.item,t.oldIndex),"clone"===t.pullMode)return void re(t.clone);if(!this.context)return;const e=this.context.index;this.spliceList(e,1);const n={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:n})},onDragUpdate(t){re(t.item),ae(t.from,t.item,t.oldIndex);const e=this.context.index,n=this.getVmIndex(t.newIndex);this.updatePosition(e,n);this.emitChanges({moved:{element:this.context.element,oldIndex:e,newIndex:n}})},updateProperty(t,e){t.hasOwnProperty(e)&&(t[e]+=this.headerOffset)},onDragMove(t,e){const n=this.move;if(!n||!this.realList)return!0;const o=this.getRelatedContextFromMoveEvent(t),i=this.context,r=this.computeFutureIndex(o,t);Object.assign(i,{futureIndex:r});return n(Object.assign({},t,{relatedContext:o,draggedContext:i}),e)},onDragEnd(){this.computeIndexes(),he=null},getRelatedContextFromMoveEvent({to:t,related:e}){const n=this;if(!n)return{component:n};const o=n.realList,i={list:o,component:n};if(t!==e&&o&&n.getUnderlyingVm){const t=n.getUnderlyingVm(e);if(t)return Object.assign(t,i)}return i},computeFutureIndex(t,e){if(!t.element)return 0;const n=[...e.to.children].filter(t=>"none"!==t.style.display),o=n.indexOf(e.related),i=t.component.getVmIndex(o);return-1!==n.indexOf(he)||!e.willInsertAfter?i:i+1}}});return t.VueDraggableNext=pe,t}({},Vue); |
{ | ||
"name": "vue-draggable-next", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "", | ||
@@ -62,4 +62,5 @@ "main": "dist/vue-draggable-next.cjs.js", | ||
"vite": "^1.0.0-rc.4", | ||
"vue": "^3.0.0-rc.9" | ||
"vue": "^3.0.0-rc.9", | ||
"vuex": "^4.0.0-beta.4" | ||
} | ||
} |
174
README.md
@@ -15,2 +15,4 @@ # vue-draggable-next | ||
### Typical use: | ||
```html | ||
@@ -58,2 +60,174 @@ <template> | ||
### With `transition-group`: | ||
```html | ||
<draggable v-model="myArray"> | ||
<transition-group> | ||
<div v-for="element in myArray" :key="element.id"> | ||
{{element.name}} | ||
</div> | ||
</transition-group> | ||
</draggable> | ||
``` | ||
### With Vuex: | ||
```html | ||
<draggable v-model="myList"></draggable> | ||
``` | ||
```javascript | ||
computed: { | ||
myList: { | ||
get() { | ||
return this.$store.state.elements | ||
}, | ||
set(value) { | ||
this.$store.dispatch('updateElements', value) | ||
} | ||
} | ||
} | ||
``` | ||
### Props | ||
#### value | ||
Type: `Array`<br> | ||
Required: `false`<br> | ||
Default: `null` | ||
Input array to draggable component. Typically same array as referenced by inner element v-for directive.<br> | ||
This is the preferred way to use Vue.draggable as it is compatible with Vuex.<br> | ||
It should not be used directly but only though the `v-model` directive: | ||
```html | ||
<draggable v-model="myArray"></draggable> | ||
``` | ||
#### list | ||
Type: `Array`<br> | ||
Required: `false`<br> | ||
Default: `null` | ||
Alternative to the `value` prop, list is an array to be synchronized with drag-and-drop.<br> | ||
The main difference is that `list` prop is updated by draggable component using splice method, whereas `value` is immutable.<br> | ||
**Do not use in conjunction with value prop.** | ||
#### All sortable options | ||
New in version 2.19 | ||
Sortable options can be set directly as vue.draggable props since version 2.19. | ||
This means that all [sortable option](https://github.com/RubaXa/Sortable#options) are valid sortable props with the notable exception of all the method starting by "on" as draggable component expose the same API via events. | ||
kebab-case propery are supported: for example `ghost-class` props will be converted to `ghostClass` sortable option. | ||
Example setting handle, sortable and a group option: | ||
```HTML | ||
<draggable | ||
v-model="list" | ||
handle=".handle" | ||
:group="{ name: 'people', pull: 'clone', put: false }" | ||
ghost-class="ghost" | ||
:sort="false" | ||
@change="log" | ||
> | ||
<!-- --> | ||
</draggable> | ||
``` | ||
#### tag | ||
Type: `String`<br> | ||
Default: `'div'` | ||
HTML node type of the element that draggable component create as outer element for the included slot.<br> | ||
It is also possible to pass the name of vue component as element. In this case, draggable attribute will be passed to the create component.<br> | ||
See also [componentData](#componentdata) if you need to set props or event to the created component. | ||
#### clone | ||
Type: `Function`<br> | ||
Required: `false`<br> | ||
Default: `(original) => { return original;}`<br> | ||
Function called on the source component to clone element when clone option is true. The unique argument is the viewModel element to be cloned and the returned value is its cloned version.<br> | ||
By default vue.draggable reuses the viewModel element, so you have to use this hook if you want to clone or deep clone it. | ||
#### move | ||
Type: `Function`<br> | ||
Required: `false`<br> | ||
Default: `null`<br> | ||
If not null this function will be called in a similar way as [Sortable onMove callback](https://github.com/RubaXa/Sortable#move-event-object). | ||
Returning false will cancel the drag operation. | ||
```javascript | ||
function onMoveCallback(evt, originalEvent){ | ||
... | ||
// return false; — for cancel | ||
} | ||
``` | ||
evt object has same property as [Sortable onMove event](https://github.com/RubaXa/Sortable#move-event-object), and 3 additional properties: | ||
- `draggedContext`: context linked to dragged element | ||
- `index`: dragged element index | ||
- `element`: dragged element underlying view model element | ||
- `futureIndex`: potential index of the dragged element if the drop operation is accepted | ||
- `relatedContext`: context linked to current drag operation | ||
- `index`: target element index | ||
- `element`: target element view model element | ||
- `list`: target list | ||
- `component`: target VueComponent | ||
HTML: | ||
```HTML | ||
<draggable :list="list" :move="checkMove"> | ||
``` | ||
javascript: | ||
```javascript | ||
checkMove: function(evt){ | ||
return (evt.draggedContext.element.name!=='apple'); | ||
} | ||
``` | ||
### Events | ||
- Support for Sortable events: | ||
`start`, `add`, `remove`, `update`, `end`, `choose`, `unchoose`, `sort`, `filter`, `clone`<br> | ||
Events are called whenever onStart, onAdd, onRemove, onUpdate, onEnd, onChoose, onUnchoose, onSort, onClone are fired by Sortable.js with the same argument.<br> | ||
[See here for reference](https://github.com/RubaXa/Sortable#event-object-demo) | ||
HTML: | ||
```HTML | ||
<draggable :list="list" @end="onEnd"> | ||
``` | ||
- change event | ||
`change` event is triggered when list prop is not null and the corresponding array is altered due to drag-and-drop operation.<br> | ||
This event is called with one argument containing one of the following properties: | ||
- `added`: contains information of an element added to the array | ||
- `newIndex`: the index of the added element | ||
- `element`: the added element | ||
- `removed`: contains information of an element removed from to the array | ||
- `oldIndex`: the index of the element before remove | ||
- `element`: the removed element | ||
- `moved`: contains information of an element moved within the array | ||
- `newIndex`: the current index of the moved element | ||
- `oldIndex`: the old index of the moved element | ||
- `element`: the moved element | ||
## 🌸 Thanks | ||
@@ -60,0 +234,0 @@ |
@@ -104,2 +104,7 @@ import Sortable from 'sortablejs' | ||
}, | ||
modelValue: { | ||
type: Array, | ||
required: false, | ||
default: null | ||
}, | ||
} | ||
@@ -129,3 +134,3 @@ | ||
created() { | ||
if (!this.list) { | ||
if (this.list !== null && this.modelValue !== null) { | ||
console.error( | ||
@@ -173,3 +178,3 @@ 'list props are mutually exclusive! Please set one.' | ||
realList(): OpenObject[] | OpenObject { | ||
return this.list | ||
return this.list ? this.list : this.modelValue; | ||
}, | ||
@@ -238,2 +243,5 @@ }, | ||
} | ||
const newList = [...this.modelValue]; | ||
onList(newList); | ||
this.$emit("update:modelValue", newList); | ||
}, | ||
@@ -240,0 +248,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
756969
43
15964
238
17