1234567 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d212b99"],{aa47:function(t,e,n){"use strict";
- /**!
- * Sortable 1.13.0
- * @author RubaXa <trash@rubaxa.org>
- * @author owenm <owen23355@gmail.com>
- * @license MIT
- */function o(t){return o="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},o(t)}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(){return r=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},r.apply(this,arguments)}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},o=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),o.forEach((function(e){i(t,e,n[e])}))}return t}function l(t,e){if(null==t)return{};var n,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||(i[n]=t[n]);return i}function s(t,e){if(null==t)return{};var n,o,i=l(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var c="1.13.0";function u(t){if("undefined"!==typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var d=u(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),h=u(/Edge/i),f=u(/firefox/i),p=u(/safari/i)&&!u(/chrome/i)&&!u(/android/i),g=u(/iP(ad|od|hone)/i),v=u(/chrome/i)&&u(/android/i),m={capture:!1,passive:!1};function b(t,e,n){t.addEventListener(e,n,!d&&m)}function w(t,e,n){t.removeEventListener(e,n,!d&&m)}function y(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(n){return!1}return!1}}function E(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function D(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&y(t,e):y(t,e))||o&&t===n)return t;if(t===n)break}while(t=E(t))}return null}var S,_=/\s+/g;function T(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(_," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(_," ")}}function C(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=C(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 N(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 O(){var t=document.scrollingElement;return t||document.documentElement}function M(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var r,a,l,s,c,u,h;if(t!==window&&t.parentNode&&t!==O()?(r=t.getBoundingClientRect(),a=r.top,l=r.left,s=r.bottom,c=r.right,u=r.height,h=r.width):(a=0,l=0,s=window.innerHeight,c=window.innerWidth,u=window.innerHeight,h=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!d))do{if(i&&i.getBoundingClientRect&&("none"!==C(i,"transform")||n&&"static"!==C(i,"position"))){var f=i.getBoundingClientRect();a-=f.top+parseInt(C(i,"border-top-width")),l-=f.left+parseInt(C(i,"border-left-width")),s=a+r.height,c=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&&(a/=v,l/=g,h/=g,u/=v,s=a+u,c=l+h)}return{top:a,left:l,bottom:s,right:c,width:h,height:u}}}function I(t,e,n){var o=Y(t,!0),i=M(t)[e];while(o){var r=M(o)[n],a=void 0;if(a="top"===n||"left"===n?i>=r:i<=r,!a)return o;if(o===O())break;o=Y(o,!1)}return!1}function A(t,e,n){var o=0,i=0,r=t.children;while(i<r.length){if("none"!==r[i].style.display&&r[i]!==Ut.ghost&&r[i]!==Ut.dragged&&D(r[i],n.draggable,t,!1)){if(o===e)return r[i];o++}i++}return null}function P(t,e){var n=t.lastElementChild;while(n&&(n===Ut.ghost||"none"===C(n,"display")||e&&!y(n,e)))n=n.previousElementSibling;return n||null}function k(t,e){var n=0;if(!t||!t.parentNode)return-1;while(t=t.previousElementSibling)"TEMPLATE"===t.nodeName.toUpperCase()||t===Ut.clone||e&&!y(t,e)||n++;return n}function X(t){var e=0,n=0,o=O();if(t)do{var i=x(t),r=i.a,a=i.d;e+=t.scrollLeft*r,n+=t.scrollTop*a}while(t!==o&&(t=t.parentNode));return[e,n]}function R(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}function Y(t,e){if(!t||!t.getBoundingClientRect)return O();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=C(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 O();if(o||e)return n;o=!0}}}while(n=n.parentNode);return O()}function B(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function F(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 H(t,e){return function(){if(!S){var n=arguments,o=this;1===n.length?t.call(o,n[0]):t.apply(o,n),S=setTimeout((function(){S=void 0}),e)}}}function L(){clearTimeout(S),S=void 0}function W(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function j(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 z="Sortable"+(new Date).getTime();function G(){var t,e=[];return{captureAnimationState:function(){if(e=[],this.options.animation){var t=[].slice.call(this.el.children);t.forEach((function(t){if("none"!==C(t,"display")&&t!==Ut.ghost){e.push({target:t,rect:M(t)});var n=a({},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(R(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=M(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&&F(s,l)&&!F(a,l)&&(u.top-l.top)/(u.left-l.left)===(a.top-l.top)/(a.left-l.left)&&(e=V(u,s,c,o.options)),F(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){C(t,"transition",""),C(t,"transform","");var i=x(this.el),r=i&&i.a,a=i&&i.d,l=(e.left-n.left)/(r||1),s=(e.top-n.top)/(a||1);t.animatingX=!!l,t.animatingY=!!s,C(t,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=U(t),C(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),C(t,"transform","translate3d(0,0,0)"),"number"===typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){C(t,"transition",""),C(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),o)}}}}function U(t){return t.offsetWidth}function V(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}var q=[],J={initializeByDefault:!0},Z={mount:function(t){for(var e in J)J.hasOwnProperty(e)&&!(e in t)&&(t[e]=J[e]);q.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),q.push(t)},pluginEvent:function(t,e,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var i=t+"Global";q.forEach((function(o){e[o.pluginName]&&(e[o.pluginName][i]&&e[o.pluginName][i](a({sortable:e},n)),e.options[o.pluginName]&&e[o.pluginName][t]&&e[o.pluginName][t](a({sortable:e},n)))}))},initializePlugins:function(t,e,n,o){for(var i in q.forEach((function(o){var i=o.pluginName;if(t.options[i]||o.initializeByDefault){var a=new o(t,e,t.options);a.sortable=t,a.options=t.options,t[i]=a,r(n,a.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var a=this.modifyOption(t,i,t.options[i]);"undefined"!==typeof a&&(t.options[i]=a)}},getEventProperties:function(t,e){var n={};return q.forEach((function(o){"function"===typeof o.eventProperties&&r(n,o.eventProperties.call(e[o.pluginName],t))})),n},modifyOption:function(t,e,n){var o;return q.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"===typeof i.optionListeners[e]&&(o=i.optionListeners[e].call(t[i.pluginName],n))})),o}};function K(t){var e=t.sortable,n=t.rootEl,o=t.name,i=t.targetEl,r=t.cloneEl,l=t.toEl,s=t.fromEl,c=t.oldIndex,u=t.newIndex,f=t.oldDraggableIndex,p=t.newDraggableIndex,g=t.originalEvent,v=t.putSortable,m=t.extraEventProperties;if(e=e||n&&n[z],e){var b,w=e.options,y="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||d||h?(b=document.createEvent("Event"),b.initEvent(o,!0,!0)):b=new CustomEvent(o,{bubbles:!0,cancelable:!0}),b.to=l||n,b.from=s||n,b.item=i||n,b.clone=r,b.oldIndex=c,b.newIndex=u,b.oldDraggableIndex=f,b.newDraggableIndex=p,b.originalEvent=g,b.pullMode=v?v.lastPutMode:void 0;var E=a({},m,Z.getEventProperties(o,e));for(var D in E)b[D]=E[D];n&&n.dispatchEvent(b),w[y]&&w[y].call(e,b)}}var Q=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,i=s(n,["evt"]);Z.pluginEvent.bind(Ut)(t,e,a({dragEl:tt,parentEl:et,ghostEl:nt,rootEl:ot,nextEl:it,lastDownEl:rt,cloneEl:at,cloneHidden:lt,dragStarted:yt,putSortable:ft,activeSortable:Ut.active,originalEvent:o,oldIndex:st,oldDraggableIndex:ut,newIndex:ct,newDraggableIndex:dt,hideGhostForTarget:Wt,unhideGhostForTarget:jt,cloneNowHidden:function(){lt=!0},cloneNowShown:function(){lt=!1},dispatchSortableEvent:function(t){$({sortable:e,name:t,originalEvent:o})}},i))};function $(t){K(a({putSortable:ft,cloneEl:at,targetEl:tt,rootEl:ot,oldIndex:st,oldDraggableIndex:ut,newIndex:ct,newDraggableIndex:dt},t))}var tt,et,nt,ot,it,rt,at,lt,st,ct,ut,dt,ht,ft,pt,gt,vt,mt,bt,wt,yt,Et,Dt,St,_t,Tt=!1,Ct=!1,xt=[],Nt=!1,Ot=!1,Mt=[],It=!1,At=[],Pt="undefined"!==typeof document,kt=g,Xt=h||d?"cssFloat":"float",Rt=Pt&&!v&&!g&&"draggable"in document.createElement("div"),Yt=function(){if(Pt){if(d)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Bt=function(t,e){var n=C(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=A(t,0,e),r=A(t,1,e),a=i&&C(i),l=r&&C(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+M(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+M(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a["float"]&&"none"!==a["float"]){var u="left"===a["float"]?"left":"right";return!r||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[Xt]||r&&"none"===n[Xt]&&s+c>o)?"vertical":"horizontal"},Ft=function(t,e,n){var o=n?t.left:t.top,i=n?t.right:t.bottom,r=n?t.width:t.height,a=n?e.left:e.top,l=n?e.right:e.bottom,s=n?e.width:e.height;return o===a||i===l||o+r/2===a+s/2},Ht=function(t,e){var n;return xt.some((function(o){if(!P(o)){var i=M(o),r=o[z].options.emptyInsertThreshold,a=t>=i.left-r&&t<=i.right+r,l=e>=i.top-r&&e<=i.bottom+r;return r&&a&&l?n=o:void 0}})),n},Lt=function(t){function e(t,n){return function(o,i,r,a){var l=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(null==t&&(n||l))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 s=(n?o:i).options.group.name;return!0===t||"string"===typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var n={},i=t.group;i&&"object"==o(i)||(i={name:i}),n.name=i.name,n.checkPull=e(i.pull,!0),n.checkPut=e(i.put),n.revertClone=i.revertClone,t.group=n},Wt=function(){!Yt&&nt&&C(nt,"display","none")},jt=function(){!Yt&&nt&&C(nt,"display","")};Pt&&document.addEventListener("click",(function(t){if(Ct)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Ct=!1,!1}),!0);var zt=function(t){if(tt){t=t.touches?t.touches[0]:t;var e=Ht(t.clientX,t.clientY);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[z]._onDragOver(n)}}},Gt=function(t){tt&&tt.parentNode[z]._isOutsideThisEl(t.target)};function Ut(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=r({},e),t[z]=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 Bt(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!==Ut.supportPointer&&"PointerEvent"in window&&!p,emptyInsertThreshold:5};for(var o in Z.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var i in Lt(e),this)"_"===i.charAt(0)&&"function"===typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&Rt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?b(t,"pointerdown",this._onTapStart):(b(t,"mousedown",this._onTapStart),b(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(b(t,"dragover",this),b(t,"dragenter",this)),xt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),r(this,G())}function Vt(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function qt(t,e,n,o,i,r,a,l){var s,c,u=t[z],f=u.options.onMove;return!window.CustomEvent||d||h?(s=document.createEvent("Event"),s.initEvent("move",!0,!0)):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=i||e,s.relatedRect=r||M(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),f&&(c=f.call(u,s,a)),c}function Jt(t){t.draggable=!1}function Zt(){It=!1}function Kt(t,e,n){var o=M(P(n.el,n.options.draggable)),i=10;return e?t.clientX>o.right+i||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+i}function Qt(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&&St<c*i){if(!Nt&&(1===Dt?s>u+c*r/2:s<d-c*r/2)&&(Nt=!0),Nt)h=!0;else if(1===Dt?s<u+St:s>d-St)return-Dt}else if(s>u+c*(1-i)/2&&s<d-c*(1-i)/2)return $t(e);return h=h||a,h&&(s<u+c*r/2||s>d-c*r/2)?s>u+c/2?1:-1:0}function $t(t){return k(tt)<k(t)?1:-1}function te(t){var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;while(n--)o+=e.charCodeAt(n);return o.toString(36)}function ee(t){At.length=0;var e=t.getElementsByTagName("input"),n=e.length;while(n--){var o=e[n];o.checked&&At.push(o)}}function ne(t){return setTimeout(t,0)}function oe(t){return clearTimeout(t)}Ut.prototype={constructor:Ut,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(Et=null)},_getDirection:function(t,e){return"function"===typeof this.options.direction?this.options.direction.call(this,t,e,tt):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(ee(n),!tt&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!p||!l||"SELECT"!==l.tagName.toUpperCase())&&(l=D(l,o.draggable,n,!1),(!l||!l.animated)&&rt!==l)){if(st=k(l),ut=k(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}),Q("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=D(s,o.trim(),n,!1),o)return $({sortable:e,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),Q("filter",e,{evt:t}),!0})),c))return void(i&&t.cancelable&&t.preventDefault());o.handle&&!D(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&&!tt&&n.parentNode===r){var s=M(n);if(ot=r,tt=n,et=tt.parentNode,it=tt.nextSibling,rt=n,ht=a.group,Ut.dragged=tt,pt={target:tt,clientX:(e||t).clientX,clientY:(e||t).clientY},bt=pt.clientX-s.left,wt=pt.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,tt.style["will-change"]="all",o=function(){Q("delayEnded",i,{evt:t}),Ut.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!f&&i.nativeDraggable&&(tt.draggable=!0),i._triggerDragStart(t,e),$({sortable:i,name:"choose",originalEvent:t}),T(tt,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){N(tt,t.trim(),Jt)})),b(l,"dragover",zt),b(l,"mousemove",zt),b(l,"touchmove",zt),b(l,"mouseup",i._onDrop),b(l,"touchend",i._onDrop),b(l,"touchcancel",i._onDrop),f&&this.nativeDraggable&&(this.options.touchStartThreshold=4,tt.draggable=!0),Q("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(h||d))o();else{if(Ut.eventCanceled)return void this._onDrop();b(l,"mouseup",i._disableDelayedDrag),b(l,"touchend",i._disableDelayedDrag),b(l,"touchcancel",i._disableDelayedDrag),b(l,"mousemove",i._delayedDragTouchMoveHandler),b(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&b(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(){tt&&Jt(tt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;w(t,"mouseup",this._disableDelayedDrag),w(t,"touchend",this._disableDelayedDrag),w(t,"touchcancel",this._disableDelayedDrag),w(t,"mousemove",this._delayedDragTouchMoveHandler),w(t,"touchmove",this._delayedDragTouchMoveHandler),w(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?b(document,"pointermove",this._onTouchMove):b(document,e?"touchmove":"mousemove",this._onTouchMove):(b(tt,"dragend",this),b(ot,"dragstart",this._onDragStart));try{document.selection?ne((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(Tt=!1,ot&&tt){Q("dragStarted",this,{evt:e}),this.nativeDraggable&&b(document,"dragover",Gt);var n=this.options;!t&&T(tt,n.dragClass,!1),T(tt,n.ghostClass,!0),Ut.active=this,t&&this._appendGhost(),$({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(gt){this._lastX=gt.clientX,this._lastY=gt.clientY,Wt();var t=document.elementFromPoint(gt.clientX,gt.clientY),e=t;while(t&&t.shadowRoot){if(t=t.shadowRoot.elementFromPoint(gt.clientX,gt.clientY),t===e)break;e=t}if(tt.parentNode[z]._isOutsideThisEl(t),e)do{if(e[z]){var n=void 0;if(n=e[z]._onDragOver({clientX:gt.clientX,clientY:gt.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);jt()}},_onTouchMove:function(t){if(pt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=nt&&x(nt,!0),a=nt&&r&&r.a,l=nt&&r&&r.d,s=kt&&_t&&X(_t),c=(i.clientX-pt.clientX+o.x)/(a||1)+(s?s[0]-Mt[0]:0)/(a||1),u=(i.clientY-pt.clientY+o.y)/(l||1)+(s?s[1]-Mt[1]:0)/(l||1);if(!Ut.active&&!Tt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(nt){r?(r.e+=c-(vt||0),r.f+=u-(mt||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,")");C(nt,"webkitTransform",d),C(nt,"mozTransform",d),C(nt,"msTransform",d),C(nt,"transform",d),vt=c,mt=u,gt=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!nt){var t=this.options.fallbackOnBody?document.body:ot,e=M(tt,!0,kt,!0,t),n=this.options;if(kt){_t=t;while("static"===C(_t,"position")&&"none"===C(_t,"transform")&&_t!==document)_t=_t.parentNode;_t!==document.body&&_t!==document.documentElement?(_t===document&&(_t=O()),e.top+=_t.scrollTop,e.left+=_t.scrollLeft):_t=O(),Mt=X(_t)}nt=tt.cloneNode(!0),T(nt,n.ghostClass,!1),T(nt,n.fallbackClass,!0),T(nt,n.dragClass,!0),C(nt,"transition",""),C(nt,"transform",""),C(nt,"box-sizing","border-box"),C(nt,"margin",0),C(nt,"top",e.top),C(nt,"left",e.left),C(nt,"width",e.width),C(nt,"height",e.height),C(nt,"opacity","0.8"),C(nt,"position",kt?"absolute":"fixed"),C(nt,"zIndex","100000"),C(nt,"pointerEvents","none"),Ut.ghost=nt,t.appendChild(nt),C(nt,"transform-origin",bt/parseInt(nt.style.width)*100+"% "+wt/parseInt(nt.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;Q("dragStart",this,{evt:t}),Ut.eventCanceled?this._onDrop():(Q("setupClone",this),Ut.eventCanceled||(at=j(tt),at.draggable=!1,at.style["will-change"]="",this._hideClone(),T(at,this.options.chosenClass,!1),Ut.clone=at),n.cloneId=ne((function(){Q("clone",n),Ut.eventCanceled||(n.options.removeCloneOnHide||ot.insertBefore(at,tt),n._hideClone(),$({sortable:n,name:"clone"}))})),!e&&T(tt,i.dragClass,!0),e?(Ct=!0,n._loopId=setInterval(n._emulateDragOver,50)):(w(document,"mouseup",n._onDrop),w(document,"touchend",n._onDrop),w(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,tt)),b(document,"drop",n),C(tt,"transform","translateZ(0)")),Tt=!0,n._dragStartId=ne(n._dragStarted.bind(n,e,t)),b(document,"selectstart",n),yt=!0,p&&C(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,o,i,r=this.el,l=t.target,s=this.options,c=s.group,u=Ut.active,d=ht===c,h=s.sort,f=ft||u,p=this,g=!1;if(!It){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),l=D(l,s.draggable,r,!0),R("dragOver"),Ut.eventCanceled)return g;if(tt.contains(t.target)||l.animated&&l.animatingX&&l.animatingY||p._ignoreWhileAnimating===l)return B(!1);if(Ct=!1,u&&!s.disabled&&(d?h||(o=!ot.contains(tt)):ft===this||(this.lastPutMode=ht.checkPull(this,u,tt,t))&&c.checkPut(this,u,tt,t))){if(i="vertical"===this._getDirection(t,l),e=M(tt),R("dragOverValid"),Ut.eventCanceled)return g;if(o)return et=ot,Y(),this._hideClone(),R("revert"),Ut.eventCanceled||(it?ot.insertBefore(tt,it):ot.appendChild(tt)),B(!0);var v=P(r,s.draggable);if(!v||Kt(t,i,this)&&!v.animated){if(v===tt)return B(!1);if(v&&r===t.target&&(l=v),l&&(n=M(l)),!1!==qt(ot,r,tt,e,l,n,t,!!l))return Y(),r.appendChild(tt),et=r,F(),B(!0)}else if(l.parentNode===r){n=M(l);var m,b,w=0,y=tt.parentNode!==r,E=!Ft(tt.animated&&tt.toRect||e,l.animated&&l.toRect||n,i),S=i?"top":"left",_=I(l,"top","top")||I(tt,"top","top"),x=_?_.scrollTop:void 0;if(Et!==l&&(m=n[S],Nt=!1,Ot=!E&&s.invertSwap||y),w=Qt(t,l,n,i,E?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Ot,Et===l),0!==w){var N=k(tt);do{N-=w,b=et.children[N]}while(b&&("none"===C(b,"display")||b===nt))}if(0===w||b===l)return B(!1);Et=l,Dt=w;var O=l.nextElementSibling,A=!1;A=1===w;var X=qt(ot,r,tt,e,l,n,t,A);if(!1!==X)return 1!==X&&-1!==X||(A=1===X),It=!0,setTimeout(Zt,30),Y(),A&&!O?r.appendChild(tt):l.parentNode.insertBefore(tt,A?O:l),_&&W(_,0,x-_.scrollTop),et=tt.parentNode,void 0===m||Ot||(St=Math.abs(m-M(l)[S])),F(),B(!0)}if(r.contains(tt))return B(!1)}return!1}function R(s,c){Q(s,p,a({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 qt(ot,r,tt,e,n,M(n),t,o)},changed:F},c))}function Y(){R("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function B(e){return R("dragOverCompleted",{insertion:e}),e&&(d?u._hideClone():u._showClone(p),p!==f&&(T(tt,ft?ft.options.ghostClass:u.options.ghostClass,!1),T(tt,s.ghostClass,!0)),ft!==p&&p!==Ut.active?ft=p:p===Ut.active&&ft&&(ft=null),f===p&&(p._ignoreWhileAnimating=l),p.animateAll((function(){R("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(l===tt&&!tt.animated||l===r&&!l.animated)&&(Et=null),s.dragoverBubble||t.rootEl||l===document||(tt.parentNode[z]._isOutsideThisEl(t.target),!e&&zt(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function F(){ct=k(tt),dt=k(tt,s.draggable),$({sortable:p,name:"change",toEl:r,newIndex:ct,newDraggableIndex:dt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){w(document,"mousemove",this._onTouchMove),w(document,"touchmove",this._onTouchMove),w(document,"pointermove",this._onTouchMove),w(document,"dragover",zt),w(document,"mousemove",zt),w(document,"touchmove",zt)},_offUpEvents:function(){var t=this.el.ownerDocument;w(t,"mouseup",this._onDrop),w(t,"touchend",this._onDrop),w(t,"pointerup",this._onDrop),w(t,"touchcancel",this._onDrop),w(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;ct=k(tt),dt=k(tt,n.draggable),Q("drop",this,{evt:t}),et=tt&&tt.parentNode,ct=k(tt),dt=k(tt,n.draggable),Ut.eventCanceled||(Tt=!1,Ot=!1,Nt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),oe(this.cloneId),oe(this._dragStartId),this.nativeDraggable&&(w(document,"drop",this),w(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),p&&C(document.body,"user-select",""),C(tt,"transform",""),t&&(yt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),nt&&nt.parentNode&&nt.parentNode.removeChild(nt),(ot===et||ft&&"clone"!==ft.lastPutMode)&&at&&at.parentNode&&at.parentNode.removeChild(at),tt&&(this.nativeDraggable&&w(tt,"dragend",this),Jt(tt),tt.style["will-change"]="",yt&&!Tt&&T(tt,ft?ft.options.ghostClass:this.options.ghostClass,!1),T(tt,this.options.chosenClass,!1),$({sortable:this,name:"unchoose",toEl:et,newIndex:null,newDraggableIndex:null,originalEvent:t}),ot!==et?(ct>=0&&($({rootEl:et,name:"add",toEl:et,fromEl:ot,originalEvent:t}),$({sortable:this,name:"remove",toEl:et,originalEvent:t}),$({rootEl:et,name:"sort",toEl:et,fromEl:ot,originalEvent:t}),$({sortable:this,name:"sort",toEl:et,originalEvent:t})),ft&&ft.save()):ct!==st&&ct>=0&&($({sortable:this,name:"update",toEl:et,originalEvent:t}),$({sortable:this,name:"sort",toEl:et,originalEvent:t})),Ut.active&&(null!=ct&&-1!==ct||(ct=st,dt=ut),$({sortable:this,name:"end",toEl:et,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Q("nulling",this),ot=tt=et=nt=it=at=rt=lt=pt=gt=yt=ct=dt=st=ut=Et=Dt=ft=ht=Ut.dragged=Ut.ghost=Ut.clone=Ut.active=null,At.forEach((function(t){t.checked=!0})),At.length=vt=mt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":tt&&(this._onDragOver(t),Vt(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)t=n[o],D(t,r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||te(t));return e},sort:function(t,e){var n={},o=this.el;this.toArray().forEach((function(t,e){var i=o.children[e];D(i,this.options.draggable,o,!1)&&(n[t]=i)}),this),e&&this.captureAnimationState(),t.forEach((function(t){n[t]&&(o.removeChild(n[t]),o.appendChild(n[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return D(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=Z.modifyOption(this,t,e);n[t]="undefined"!==typeof o?o:e,"group"===t&&Lt(n)},destroy:function(){Q("destroy",this);var t=this.el;t[z]=null,w(t,"mousedown",this._onTapStart),w(t,"touchstart",this._onTapStart),w(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(w(t,"dragover",this),w(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),xt.splice(xt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!lt){if(Q("hideClone",this),Ut.eventCanceled)return;C(at,"display","none"),this.options.removeCloneOnHide&&at.parentNode&&at.parentNode.removeChild(at),lt=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(lt){if(Q("showClone",this),Ut.eventCanceled)return;tt.parentNode!=ot||this.options.group.revertClone?it?ot.insertBefore(at,it):ot.appendChild(at):ot.insertBefore(at,tt),this.options.group.revertClone&&this.animate(tt,at),C(at,"display",""),lt=!1}}else this._hideClone()}},Pt&&b(document,"touchmove",(function(t){(Ut.active||Tt)&&t.cancelable&&t.preventDefault()})),Ut.utils={on:b,off:w,css:C,find:N,is:function(t,e){return!!D(t,e,t,!1)},extend:B,throttle:H,closest:D,toggleClass:T,clone:j,index:k,nextTick:ne,cancelNextTick:oe,detectDirection:Bt,getChild:A},Ut.get=function(t){return t[z]},Ut.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&&(Ut.utils=a({},Ut.utils,t.utils)),Z.mount(t)}))},Ut.create=function(t,e){return new Ut(t,e)},Ut.version=c;var ie,re,ae,le,se,ce,ue=[],de=!1;function he(){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?b(document,"dragover",this._handleAutoScroll):this.options.supportPointer?b(document,"pointermove",this._handleFallbackAutoScroll):e.touches?b(document,"touchmove",this._handleFallbackAutoScroll):b(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?w(document,"dragover",this._handleAutoScroll):(w(document,"pointermove",this._handleFallbackAutoScroll),w(document,"touchmove",this._handleFallbackAutoScroll),w(document,"mousemove",this._handleFallbackAutoScroll)),pe(),fe(),L()},nulling:function(){se=re=ie=de=ce=ae=le=null,ue.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(se=t,e||h||d||p){ge(t,this.options,r,e);var a=Y(r,!0);!de||ce&&o===ae&&i===le||(ce&&pe(),ce=setInterval((function(){var r=Y(document.elementFromPoint(o,i),!0);r!==a&&(a=r,fe()),ge(t,n.options,r,e)}),10),ae=o,le=i)}else{if(!this.options.bubbleScroll||Y(r,!0)===O())return void fe();ge(t,this.options,Y(r,!1),!1)}}},r(t,{pluginName:"scroll",initializeByDefault:!0})}function fe(){ue.forEach((function(t){clearInterval(t.pid)})),ue=[]}function pe(){clearInterval(ce)}var ge=H((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=O(),u=!1;re!==n&&(re=n,fe(),ie=e.scroll,i=e.scrollFn,!0===ie&&(ie=Y(n,!0)));var d=0,h=ie;do{var f=h,p=M(f),g=p.top,v=p.bottom,m=p.left,b=p.right,w=p.width,y=p.height,E=void 0,D=void 0,S=f.scrollWidth,_=f.scrollHeight,T=C(f),x=f.scrollLeft,N=f.scrollTop;f===c?(E=w<S&&("auto"===T.overflowX||"scroll"===T.overflowX||"visible"===T.overflowX),D=y<_&&("auto"===T.overflowY||"scroll"===T.overflowY||"visible"===T.overflowY)):(E=w<S&&("auto"===T.overflowX||"scroll"===T.overflowX),D=y<_&&("auto"===T.overflowY||"scroll"===T.overflowY));var I=E&&(Math.abs(b-r)<=l&&x+w<S)-(Math.abs(m-r)<=l&&!!x),A=D&&(Math.abs(v-a)<=l&&N+y<_)-(Math.abs(g-a)<=l&&!!N);if(!ue[d])for(var P=0;P<=d;P++)ue[P]||(ue[P]={});ue[d].vx==I&&ue[d].vy==A&&ue[d].el===f||(ue[d].el=f,ue[d].vx=I,ue[d].vy=A,clearInterval(ue[d].pid),0==I&&0==A||(u=!0,ue[d].pid=setInterval(function(){o&&0===this.layer&&Ut.active._onTouchMove(se);var e=ue[this.layer].vy?ue[this.layer].vy*s:0,n=ue[this.layer].vx?ue[this.layer].vx*s:0;"function"===typeof i&&"continue"!==i.call(Ut.dragged.parentNode[z],n,e,t,se,ue[this.layer].el)||W(ue[this.layer].el,n,e)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&h!==c&&(h=Y(h,!1)));de=u}}),30),ve=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.activeSortable,r=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var s=n||i;a();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(u)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function me(){}function be(){}me.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=A(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:ve},r(me,{pluginName:"revertOnSpill"}),be.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable,o=n||this.sortable;o.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),o.animateAll()},drop:ve},r(be,{pluginName:"removeOnSpill"});Ut.mount(new he),Ut.mount(be,me),e["a"]=Ut}}]);
|