(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["vuedraggable"]=e():t["vuedraggable"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({c649:function(t,e,n){"use strict";(function(t){function o(){return"undefined"!==typeof window?window.console:t.console}n.d(e,"c",(function(){return c})),n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return i})),n.d(e,"d",(function(){return s}));const i=o();function r(t){const e=Object.create(null);return function(n){const o=e[n];return o||(e[n]=t(n))}}const a=/-(\w)/g,l=r(t=>t.replace(a,(t,e)=>e?e.toUpperCase():""));function s(t){null!==t.parentElement&&t.parentElement.removeChild(t)}function c(t,e,n){const o=0===n?t.children[0]:t.children[n-1].nextSibling;t.insertBefore(e,o)}}).call(this,n("c8ba"))},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(o){"object"===typeof window&&(n=window)}t.exports=n},f6fd:function(t,e){(function(t){var e="currentScript",n=t.getElementsByTagName("script");e in t||Object.defineProperty(t,e,{get:function(){try{throw new Error}catch(o){var t,e=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(o.stack)||[!1])[1];for(t in n)if(n[t].src==e||"interactive"==n[t].readyState)return n[t];return null}}})})(document)},fb15:function(t,e,n){"use strict";var o;(n.r(e),"undefined"!==typeof window)&&(n("f6fd"),(o=window.document.currentScript)&&(o=o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=o[1])); function i(t){return i="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},i(t)}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(){return a=Object.assign||function(t){for(var e=1;e=0||(i[n]=t[n]);return i}function c(t,e){if(null==t)return{};var n,o,i=s(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var u="1.10.2";function d(t){if("undefined"!==typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var h=d(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),f=d(/Edge/i),p=d(/firefox/i),g=d(/safari/i)&&!d(/chrome/i)&&!d(/android/i),m=d(/iP(ad|od|hone)/i),v=d(/chrome/i)&&d(/android/i),b={capture:!1,passive:!1};function y(t,e,n){t.addEventListener(e,n,!h&&b)}function w(t,e,n){t.removeEventListener(e,n,!h&&b)}function E(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 _(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function S(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&E(t,e):E(t,e))||o&&t===n)return t;if(t===n)break}while(t=_(t))}return null}var D,x=/\s+/g;function C(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(x," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(x," ")}}function T(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 O(t,e){var n="";if("string"===typeof t)n=t;else do{var o=T(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 I(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i=r:i<=r,!a)return o;if(o===M())break;o=X(o,!1)}return!1}function A(t,e,n){var o=0,i=0,r=t.children;while(i2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,i=c(n,["evt"]);Z.pluginEvent.bind(zt)(t,e,l({dragEl:et,parentEl:nt,ghostEl:ot,rootEl:it,nextEl:rt,lastDownEl:at,cloneEl:lt,cloneHidden:st,dragStarted:Et,putSortable:pt,activeSortable:zt.active,originalEvent:o,oldIndex:ct,oldDraggableIndex:dt,newIndex:ut,newDraggableIndex:ht,hideGhostForTarget:Ht,unhideGhostForTarget:Wt,cloneNowHidden:function(){st=!0},cloneNowShown:function(){st=!1},dispatchSortableEvent:function(t){tt({sortable:e,name:t,originalEvent:o})}},i))};function tt(t){K(l({putSortable:pt,cloneEl:lt,targetEl:et,rootEl:it,oldIndex:ct,oldDraggableIndex:dt,newIndex:ut,newDraggableIndex:ht},t))}var et,nt,ot,it,rt,at,lt,st,ct,ut,dt,ht,ft,pt,gt,mt,vt,bt,yt,wt,Et,_t,St,Dt,xt,Ct=!1,Tt=!1,Ot=[],It=!1,Mt=!1,Pt=[],Nt=!1,At=[],kt="undefined"!==typeof document,jt=m,Ft=f||h?"cssFloat":"float",Rt=kt&&!v&&!m&&"draggable"in document.createElement("div"),Xt=function(){if(kt){if(h)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Lt=function(t,e){var n=T(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&&T(i),l=r&&T(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+P(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+P(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[Ft]||r&&"none"===n[Ft]&&s+c>o)?"vertical":"horizontal"},Yt=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},$t=function(t,e){var n;return Ot.some((function(o){if(!k(o)){var i=P(o),r=o[V].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},Bt=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={},o=t.group;o&&"object"==i(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},Ht=function(){!Xt&&ot&&T(ot,"display","none")},Wt=function(){!Xt&&ot&&T(ot,"display","")};kt&&document.addEventListener("click",(function(t){if(Tt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Tt=!1,!1}),!0);var Vt=function(t){if(et){t=t.touches?t.touches[0]:t;var e=$t(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[V]._onDragOver(n)}}},Ut=function(t){et&&et.parentNode[V]._isOutsideThisEl(t.target)};function zt(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=a({},e),t[V]=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 Lt(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!==zt.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var o in Z.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var i in Bt(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?y(t,"pointerdown",this._onTapStart):(y(t,"mousedown",this._onTapStart),y(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(y(t,"dragover",this),y(t,"dragenter",this)),Ot.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),a(this,U())}function Gt(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[V],d=u.options.onMove;return!window.CustomEvent||h||f?(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||P(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),d&&(c=d.call(u,s,a)),c}function Jt(t){t.draggable=!1}function Zt(){Nt=!1}function Kt(t,e,n){var o=P(k(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&&Dtu+c*r/2:sd-Dt)return-St}else if(s>u+c*(1-i)/2&&sd-c*r/2)?s>u+c/2?1:-1:0}function te(t){return j(et)=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){et&&Jt(et),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?y(document,"pointermove",this._onTouchMove):y(document,e?"touchmove":"mousemove",this._onTouchMove):(y(et,"dragend",this),y(it,"dragstart",this._onDragStart));try{document.selection?oe((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(Ct=!1,it&&et){Q("dragStarted",this,{evt:e}),this.nativeDraggable&&y(document,"dragover",Ut);var n=this.options;!t&&C(et,n.dragClass,!1),C(et,n.ghostClass,!0),zt.active=this,t&&this._appendGhost(),tt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(mt){this._lastX=mt.clientX,this._lastY=mt.clientY,Ht();var t=document.elementFromPoint(mt.clientX,mt.clientY),e=t;while(t&&t.shadowRoot){if(t=t.shadowRoot.elementFromPoint(mt.clientX,mt.clientY),t===e)break;e=t}if(et.parentNode[V]._isOutsideThisEl(t),e)do{if(e[V]){var n=void 0;if(n=e[V]._onDragOver({clientX:mt.clientX,clientY:mt.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Wt()}},_onTouchMove:function(t){if(gt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=ot&&O(ot,!0),a=ot&&r&&r.a,l=ot&&r&&r.d,s=jt&&xt&&F(xt),c=(i.clientX-gt.clientX+o.x)/(a||1)+(s?s[0]-Pt[0]:0)/(a||1),u=(i.clientY-gt.clientY+o.y)/(l||1)+(s?s[1]-Pt[1]:0)/(l||1);if(!zt.active&&!Ct){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))=0&&(tt({rootEl:nt,name:"add",toEl:nt,fromEl:it,originalEvent:t}),tt({sortable:this,name:"remove",toEl:nt,originalEvent:t}),tt({rootEl:nt,name:"sort",toEl:nt,fromEl:it,originalEvent:t}),tt({sortable:this,name:"sort",toEl:nt,originalEvent:t})),pt&&pt.save()):ut!==ct&&ut>=0&&(tt({sortable:this,name:"update",toEl:nt,originalEvent:t}),tt({sortable:this,name:"sort",toEl:nt,originalEvent:t})),zt.active&&(null!=ut&&-1!==ut||(ut=ct,ht=dt),tt({sortable:this,name:"end",toEl:nt,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Q("nulling",this),it=et=nt=ot=rt=lt=at=st=gt=mt=Et=ut=ht=ct=dt=_t=St=pt=ft=zt.dragged=zt.ghost=zt.clone=zt.active=null,At.forEach((function(t){t.checked=!0})),At.length=vt=bt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":et&&(this._onDragOver(t),Gt(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;ot.elm).indexOf(e)}function De(t,e,n,o){if(!t)return[];const i=t.map(t=>t.elm),r=e.length-o,a=[...e].map((t,e)=>e>=r?i.length:i.indexOf(t));return n?a.filter(t=>-1!==t):a}function xe(t,e){Ee["b"].log("执行。。"),this.$nextTick(()=>this.$emit(t.toLowerCase(),{...e}))}function Ce(t){return e=>{null!==this.realList&&this["onDrag"+t](e),xe.call(this,t,e)}}function Te(t){return["transition-group","TransitionGroup"].includes(t)}function Oe(t){if(!t||1!==t.length)return!1;const[{componentOptions:e}]=t;return!!e&&Te(e.tag)}function Ie(t,e,n){return t[n]||(e[n]?e[n]():void 0)}function Me(t,e,n){let o=0,i=0;const r=Ie(e,n,"header");r&&(o=r.length,t=t?[...r,...t]:[...r]);const a=Ie(e,n,"footer");return a&&(i=a.length,t=t?[...t,...a]:[...a]),{children:t,headerOffset:o,footerOffset:i}}function Pe(t,e){let n=null;const o=(t,e)=>{n=_e(n,t,e)},i=Object.keys(t).filter(t=>"id"===t||t.startsWith("data-")).reduce((e,n)=>(e[n]=t[n],e),{});if(o("attrs",i),!e)return n;const{on:r,props:a,attrs:l}=e;return o("on",r),o("props",a),Object.assign(n.attrs,l),n}const Ne=["Start","Add","Remove","Update","End"],Ae=["Choose","Unchoose","Sort","Filter","Clone"],ke=["Move",...Ne,...Ae].map(t=>"on"+t);var je=null;const Fe={options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:t=>t},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},Re={name:"draggable",inheritAttrs:!1,props:Fe,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1}},render(t){const e=this.$slots.default;this.transitionMode=Oe(e);const{children:n,headerOffset:o,footerOffset:i}=Me(e,this.$slots,this.$scopedSlots);this.headerOffset=o,this.footerOffset=i;const r=Pe(this.$attrs,this.componentData);return t(this.getTag(),r,n)},created(){null!==this.list&&null!==this.value&&Ee["b"].error("Value and list props are mutually exclusive! Please set one or another."),"div"!==this.element&&Ee["b"].warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),void 0!==this.options&&Ee["b"].warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted(){if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase()&&!this.getIsFunctional(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: "+this.getTag());const t={};Ne.forEach(e=>{t["on"+e]=Ce.call(this,e)}),Ae.forEach(e=>{t["on"+e]=xe.bind(this,e)});const e=Object.keys(this.$attrs).reduce((t,e)=>(t[Object(Ee["a"])(e)]=this.$attrs[e],t),{}),n=Object.assign({},this.options,e,t,{onMove:(t,e)=>this.onDragMove(t,e)});!("draggable"in n)&&(n.draggable=">*"),this._sortable=new we(this.rootContainer,n),this.computeIndexes()},beforeDestroy(){void 0!==this._sortable&&this._sortable.destroy()},computed:{rootContainer(){return this.transitionMode?this.$el.children[0]:this.$el},realList(){return this.list?this.list:this.value}},watch:{options:{handler(t){this.updateOptions(t)},deep:!0},$attrs:{handler(t){this.updateOptions(t)},deep:!0},realList(){this.computeIndexes()}},methods:{getIsFunctional(){const{fnOptions:t}=this._vnode;return t&&t.functional},getTag(){return this.tag||this.element},updateOptions(t){for(var e in t){const n=Object(Ee["a"])(e);-1===ke.indexOf(n)&&this._sortable.option(n,t[e])}},getChildrenNodes(){if(this.noneFunctionalComponentMode)return this.$children[0].$slots.default;const t=this.$slots.default;return this.transitionMode?t[0].child.$slots.default:t},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=De(this.getChildrenNodes(),this.rootContainer.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(t){const e=Se(this.getChildrenNodes()||[],t);if(-1===e)return null;const n=this.realList[e];return{index:e,element:n}},getUnderlyingPotencialDraggableComponent({__vue__:t}){return t&&t.$options&&Te(t.$options._componentTag)?t.$parent:!("realList"in t)&&1===t.$children.length&&"realList"in t.$children[0]?t.$children[0]:t},emitChanges(t){this.$nextTick(()=>{this.$emit("change",t)})},alterList(t){if(this.list)return void t(this.list);const e=[...this.value];t(e),this.$emit("input",e)},spliceList(){const t=t=>t.splice(...arguments);this.alterList(t)},updatePosition(t,e){const n=n=>n.splice(e,0,n.splice(t,1)[0]);this.alterList(n)},getRelatedContextFromMoveEvent({to:t,related:e}){const n=this.getUnderlyingPotencialDraggableComponent(t);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},getVmIndex(t){const e=this.visibleIndexes,n=e.length;return t>n-1?n:e[t]},getComponent(){return this.$slots.default[0].componentInstance},resetTransitionData(t){if(!this.noTransitionOnDrag||!this.transitionMode)return;var e=this.getChildrenNodes();e[t].data=null;const n=this.getComponent();n.children=[],n.kept=void 0},onDragStart(t){this.context=this.getUnderlyingVm(t.item),t.item._underlying_vm_=this.clone(this.context.element),je=t.item},onDragAdd(t){const e=t.item._underlying_vm_;if(void 0===e)return;Object(Ee["d"])(t.item);const n=this.getVmIndex(t.newIndex);this.spliceList(n,0,e),this.computeIndexes();const o={element:e,newIndex:n};this.emitChanges({added:o})},onDragRemove(t){if(Object(Ee["c"])(this.rootContainer,t.item,t.oldIndex),"clone"===t.pullMode)return void Object(Ee["d"])(t.clone);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){Object(Ee["d"])(t.item),Object(Ee["c"])(t.from,t.item,t.oldIndex);const e=this.context.index,n=this.getVmIndex(t.newIndex);this.updatePosition(e,n);const o={element:this.context.element,oldIndex:e,newIndex:n};this.emitChanges({moved:o})},updateProperty(t,e){t.hasOwnProperty(e)&&(t[e]+=this.headerOffset)},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),r=-1!==n.indexOf(je);return r||!e.willInsertAfter?i:i+1},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});const a=Object.assign({},t,{relatedContext:o,draggedContext:i});return n(a,e)},onDragEnd(){this.computeIndexes(),je=null}}};"undefined"!==typeof window&&"Vue"in window&&window.Vue.component("draggable",Re);var Xe=Re;e["default"]=Xe}})})); //# sourceMappingURL=vuedraggable.umd.min.js.map