@chifi49/vue-draggable
Version:
drag, drop and sort any element in vuejs
2 lines • 32.8 kB
JavaScript
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("vue")):"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["vue-draggable"]=e(require("vue")):t["vue-draggable"]=e(t["Vue"])})("undefined"!==typeof self?self:this,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},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="349b")}({"017d":function(t,e,n){var r=n("55f2"),i=n("d266").f,o=n("a1fa"),a=n("49e1"),s=n("8668"),c=n("da6b"),u=n("87b1");t.exports=function(t,e){var n,l,d,f,p,h,g=t.target,m=t.global,v=t.stat;if(l=m?r:v?r[g]||s(g,{}):(r[g]||{}).prototype,l)for(d in e){if(p=e[d],t.noTargetGet?(h=i(l,d),f=h&&h.value):f=l[d],n=u(m?d:g+(v?".":"#")+d,t.forced),!n&&void 0!==f){if(typeof p===typeof f)continue;c(p,f)}(t.sham||f&&f.sham)&&o(p,"sham",!0),a(l,d,p,t)}}},"01e3":function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},"0d63":function(t,e){e.f=Object.getOwnPropertySymbols},"0e65":function(t,e,n){"use strict";var r=n("017d"),i=n("3ac0"),o=n("243a"),a=n("ab38"),s=[].join,c=i!=Object,u=a("join",",");r({target:"Array",proto:!0,forced:c||!u},{join:function(t){return s.call(o(this),void 0===t?",":t)}})},"128e":function(t,e,n){var r=n("eb90"),i=n("b198"),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},"15a3":function(t,e,n){var r=n("e556"),i=n("3bae"),o=n("1730"),a=o("species");t.exports=function(t,e){var n;return i(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!i(n.prototype)?r(n)&&(n=n[a],null===n&&(n=void 0)):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},"16c3":function(t,e,n){var r=n("e556");t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},1730:function(t,e,n){var r=n("55f2"),i=n("eb90"),o=n("aa74"),a=n("b198"),s=n("a971"),c=n("5117"),u=i("wks"),l=r.Symbol,d=c?l:l&&l.withoutSetter||a;t.exports=function(t){return o(u,t)||(s&&o(l,t)?u[t]=l[t]:u[t]=d("Symbol."+t)),u[t]}},2195:function(t,e,n){var r=n("017d"),i=n("360b");r({global:!0,forced:parseInt!=i},{parseInt:i})},2227:function(t,e,n){var r,i,o;(function(n,a){i=[],r=a,o="function"===typeof r?r.apply(e,i):r,void 0===o||(t.exports=o)})("undefined"!==typeof self&&self,(function(){function t(){var e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(p){var n,r,i,o=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,a=/@([^@]*):(\d+):(\d+)\s*$/gi,s=o.exec(p.stack)||a.exec(p.stack),c=s&&s[1]||!1,u=s&&s[2]||!1,l=document.location.href.replace(document.location.hash,""),d=document.getElementsByTagName("script");c===l&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(u-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),i=n.replace(r,"$1").trim());for(var f=0;f<d.length;f++){if("interactive"===d[f].readyState)return d[f];if(d[f].src===c)return d[f];if(c===l&&d[f].innerHTML&&d[f].innerHTML.trim()===i)return d[f]}return null}}return t}))},"243a":function(t,e,n){var r=n("3ac0"),i=n("e527");t.exports=function(t){return r(i(t))}},"26a7":function(t,e,n){"use strict";var r=n("7d35").forEach,i=n("ab38"),o=n("2eb8"),a=i("forEach"),s=o("forEach");t.exports=a&&s?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},2901:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"2bfb":function(t,e,n){var r=n("9267"),i=n("866c"),o=n("58af"),a=n("d753");t.exports=r?Object.defineProperties:function(t,e){o(t);var n,r=a(e),s=r.length,c=0;while(s>c)i.f(t,n=r[c++],e[n]);return t}},"2d87":function(t,e,n){"use strict";var r=n("017d"),i=n("458f").indexOf,o=n("ab38"),a=n("2eb8"),s=[].indexOf,c=!!s&&1/[1].indexOf(1,-0)<0,u=o("indexOf"),l=a("indexOf",{ACCESSORS:!0,1:0});r({target:"Array",proto:!0,forced:c||!u||!l},{indexOf:function(t){return c?s.apply(this,arguments)||0:i(this,t,arguments.length>1?arguments[1]:void 0)}})},"2eb8":function(t,e,n){var r=n("9267"),i=n("dd4c"),o=n("aa74"),a=Object.defineProperty,s={},c=function(t){throw t};t.exports=function(t,e){if(o(s,t))return s[t];e||(e={});var n=[][t],u=!!o(e,"ACCESSORS")&&e.ACCESSORS,l=o(e,0)?e[0]:c,d=o(e,1)?e[1]:void 0;return s[t]=!!n&&!i((function(){if(u&&!r)return!0;var t={length:-1};u?a(t,1,{enumerable:!0,get:c}):t[1]=1,n.call(t,l,d)}))}},"2fd0":function(t,e,n){var r=n("4323"),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},"349b":function(t,e,n){"use strict";if(n.r(e),"undefined"!==typeof window){var r=window.document.currentScript,i=n("2227");r=i(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:i});var o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.tag,{tag:"component",class:t.component_classes,on:{click:t.clicked}},[t._t("default")],2)},s=[];n("6efa"),n("2d87"),n("0e65"),n("5f5d"),n("3685"),n("2195"),n("a11f");function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t,e){if(t){if("string"===typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function l(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=u(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n["return"]||n["return"]()}finally{if(s)throw o}}}}var d=n("8bbf"),f=n.n(d),p={name:"vue-draggable",props:{is_droparea:{required:!1,type:Boolean,default:!1},custom_data:{required:!1,type:Object,default:function(){return{}}},classes:{required:!1,type:Array,default:function(){return[]}},tag:{required:!1,type:String,default:"span",validator:function(t){return-1==["br","script","noscript","dfn","object"].indexOf(t)}},zindex:{required:!1,type:Number,default:100},axis:{required:!1,type:String,default:"xy"},offset:{required:!1,type:Number,default:10},draghandle:{required:!1,type:String,default:""},clone:{required:!1,type:Boolean,default:!1},clone_element:{required:!1,type:Function,default:null},clone_opacity:{required:!1,type:Number,default:.5},dropareas:{required:!1,type:Array,default:function(){return[]}},dropping_element:{required:!1,type:Function,default:function(){var t=document.createElement("div");return t.style.cssText="height:20px;border:dashed 2px #afafaf",t.classList.add("vue-dropping-ghost"),t}},drop_ghost:{required:!1,type:Boolean,default:!1},containment:{required:!1,type:String,default:"body"},sortable:{required:!1,type:Boolean,default:!1}},data:function(){return{domElement:null,dragElement:null,cloneElement:null,domHandle:null,droppingElement:null,containmentElement:null,containmentRect:null,original_target:null,orginal_handle:null,isDragging:!1,isDropping:!1,dragStartX:-1,dragStartY:-1,elementX:-1,elemnentY:-1,elementDiffX:0,elementDiffY:0,isDroppable:!1,dropped_area:null,drop_areas:[],cssPosition:"",sortDroppingElement_timeout:0,zIndex:0,currentIndex:0}},computed:{component_classes:function(){for(var t={"vue-draggable":!0,"vue-dragging":this.is_dragging},e=0;e<this.classes.length;e++)t[this.classes[e]]=!0;return t},is_dragging:function(){return this.isDragging},is_dropping:function(){return this.isDropping}},methods:{clicked:function(t){t.preventDefault(),this.$emit("clicked",{instance:this,customData:this.custom_data,nativeEvent:t})},viewportSize:function(){var t=document.createElement("div");t.style.cssText="position: fixed;top: 0;left: 0;bottom: 0;right: 0;z-index:-1,",document.documentElement.insertBefore(t,document.documentElement.firstChild);var e={width:t.offsetWidth,height:t.offsetHeight,x:0,y:0,left:0,top:0};return document.documentElement.removeChild(t),e},dragStarted:function(t){if(t.stopPropagation(),t.preventDefault(),!(t.which&&3==t.which||t.button&&2==t.button)){this.isDroppable=!1,this.dropped_area=null,this.dragStartX=t.touches&&t.touches.length>0?t.touches[0].pageX:t.pageX,this.dragStartY=t.touches&&t.touches.length>0?t.touches[0].pageY:t.pageY,this.dragStartX-=window.scrollX,this.dragStartY-=window.scrollY;t.touches&&t.touches.length>0&&t.touches[0];this.$vdraggable.current=this;var e=this.dsDom.getBoundingClientRect();if(this.elementX=e.left,this.elementY=e.top,this.elementDiffX=this.dragStartX-e.left,this.elementDiffY=this.dragStartY-e.top,"body"==this.containment){var n=this.containmentElement.getBoundingClientRect(),r=this.viewportSize();n.height<r.height?this.containmentRect=r:this.containmentRect=n}else this.containmentRect=this.containmentElement.getBoundingClientRect();return this.currentIndex=Array.prototype.indexOf.call(this.$el.parentNode.children,this.$el),document.addEventListener("mousemove",this.dragMove),document.addEventListener("touchmove",this.dragMove),document.addEventListener("mouseup",this.dragEnd),document.addEventListener("touchend",this.dragEnd),!1}},dragMove:function(t){t.stopPropagation(),t.preventDefault(),this.dropped_area=null;var e=t.touches&&t.touches.length>0?t.touches[0].pageX:t.pageX,n=t.touches&&t.touches.length>0?t.touches[0].pageY:t.pageY,r=e-this.dragStartX,i=n-this.dragStartY;if(("xy"==this.axis&&(Math.abs(r)>this.offset||Math.abs(i)>this.offset)||"x"==this.axis&&Math.abs(r)>this.offset||"y"==this.axis&&Math.abs(i)>this.offset)&&(this.isDragging=!0),this.isDragging){if(null==this.dragElement&&this.getDropAreas(),this.clone&&null==this.dragElement){if(null!=this.clone_element)this.dragElement=this.clone_element({instance:this,el:this.dsDom,customData:this.custom_data});else{var o=this.dsDom.getBoundingClientRect();this.dragElement=this.dsDom.cloneNode(!0),this.dragElement.style.opacity=this.clone_opacity,this.dragElement.style.position="absolute",this.dragElement.style.left=o.left+"px",this.dragElement.style.top=o.top+"px"}document.body.appendChild(this.dragElement),this.$emit("drag_started",{instance:this,dragElement:this.dragElement,clone:this.clone,customData:this.custom_data})}else null==this.dragElement&&(this.dragElement=this.dsDom,this.$emit("drag_started",{instance:this,dragElement:this.dragElement,clone:this.clone,customData:this.custom_data}));this.dragElement.style.position="absolute",this.dragElement.style.zIndex=this.zindex;var a=e-this.elementDiffX,s=n-this.elementDiffY;if(a<this.containmentRect.left||a+this.dragElement.offsetWidth>this.containmentRect.left+this.containmentRect.width||s<this.containmentRect.top||s+this.dragElement.offsetHeight>this.containmentRect.top+this.containmentRect.height)return;if("xy"!=this.axis&&"x"!=this.axis||(this.dragElement.style.left=a+"px"),"xy"!=this.axis&&"y"!=this.axis||(this.dragElement.style.top=s+"px"),this.$emit("dragging",{instance:this,dragElement:this.dragElement,clone:this.clone,coords:{x:a,y:s},nativeEvent:t,customData:this.custom_data}),this.isDroppable){for(var c=0;c<this.drop_areas.length;c++){var u=this.drop_areas[c],l={left:a,top:s,width:this.dragElement.offsetWidth,height:this.dragElement.offsetHeight};this.contains(u,l)&&(u.el.classList.add("vue-dropping"),this.dropped_area=u,u.active?(u.sortDroppingElement({left:a,top:s,moveX:r,movedY:i}),this.$emit("dropping",{instance:this,dragElement:this.dragElement,clone:this.clone,areaElement:u.el,customData:this.custom_data})):(u.active=!0,u.createDroppingElement({left:a,top:s}),this.sortable&&u.sortDroppingElement({left:a,top:s,moveX:r,movedY:i}),this.$emit("drop_enter",{instance:this,dragElement:this.dragElement,clone:this.clone,areaElement:u.el,customData:this.custom_data}),this.drop_areas[c]=u))}for(var d=0;d<this.drop_areas.length;d++)this.drop_areas[d]!=this.dropped_area&&this.drop_areas[d].active&&(this.drop_areas[d].el.classList.remove("vue-dropping"),this.drop_areas[d].active=!1,this.drop_areas[d].removeDroppingElement())}}},dragEnd:function(t){if(t.stopPropagation(),t.preventDefault(),this.isDragging){var e=this.dragElement;this.clone&&this.isDragging&&document.body.removeChild(this.dragElement),this.dragElement=null,this.dsDom.style.position="absolute";var n=t.touches&&t.touches.length>0?t.touches[0].pageX:t.pageX,r=t.touches&&t.touches.length>0?t.touches[0].pageY:t.pageY;if("xy"!=this.axis&&"x"!=this.axis||(this.dsDom.style.left=n-this.elementDiffX+"px"),"xy"!=this.axis&&"y"!=this.axis||(this.dsDom.style.top=r-this.elementDiffY+"px"),this.isDroppable&&null!=this.dropped_area){var i=-1;if(this.sortable&&(i=this.dropped_area.dropping_element_index),this.$emit("dropped",{instance:this,areaElement:this.dropped_area.el,previous_areaElement:this.$el.parentNode,dragElement:e,clone:this.clone,sortable:this.sortable,previousIndex:this.currentIndex,newIndex:i,customData:this.custom_data}),this.drop_ghost)this.drop_ghost&&(this.dsDom.style.position=this.cssPosition,this.dsDom.style.zIndex=this.zIndex);else{if(this.sortable){var o=this.dropped_area.dropping_element_index;o>=0&&o<=this.dropped_area.children.length?this.dropped_area.el.insertBefore(this.dsDom,this.dropped_area.children[o]):this.dropped_area.el.appendChild(this.dsDom)}else this.dropped_area.el.appendChild(this.dsDom);this.dsDom.style.position=this.cssPosition,this.dsDom.style.zIndex=this.zIndex}}else this.isDroppable&&(this.dsDom.style.position=this.cssPosition,this.dsDom.style.zIndex=this.zIndex)}this.isDragging=!1,this.isDroppable=!1,this.dropped_area=null,this.$emit("drag_ended",{instance:this,customData:this.custom_data}),this.resetDropAreas(),document.removeEventListener("mousemove",this.dragMove),document.removeEventListener("touchmove",this.dragMove),document.removeEventListener("mouseup",this.dragEnd),document.removeEventListener("touchend",this.dragEnd)},dragStart_prevent:function(t){t.stopPropagation(),t.preventDefault()},setupEventHandlers:function(){this.domHandle.addEventListener("mousedown",this.dragStarted),this.domHandle.addEventListener("touchstart",this.dragStarted),this.domHandle.addEventListener("dragstart",this.dragStart_prevent)},getId:function(){var t=new Date;return"vdraggable-"+t.getMilliseonds()},resetDropAreas:function(){for(var t=0;t<this.drop_areas.length;t++)this.drop_areas[t].el.classList.remove("vue-dropping"),this.drop_areas[t].active=!1,null!=this.drop_areas[t].dropping_element&&this.drop_areas[t].removeDroppingElement();this.drop_areas=[]},getDropAreas:function(){if(this.isDroppable=!1,0!=this.dropareas.length){var t=document.querySelectorAll(this.dropareas.join(",")),e=[],n=this.$el.querySelectorAll(this.dropareas.join(","));[].forEach.call(n,(function(t){e.push(t)}));var r=this;[].forEach.call(t,(function(t){if(-1==e.indexOf(t)){var n={el:t,dim:t.getBoundingClientRect(),active:!1,children:[],dropping_element_index:-1,dropping_element:null,removeDroppingElement:function(){null!=this.dropping_element&&(this.el.removeChild(this.dropping_element),this.dropping_element=null)},createDroppingElement:function(t){this.dropping_element=r.dropping_element(),this.dropping_element.classList.add("vue-dropping-placeholder"),r.sortable||this.el.appendChild(this.dropping_element);var e=this.findDroppingElement_index(t),n=this;n.dropping_element_index=e,-1==e||e==n.children.length?n.el.appendChild(n.dropping_element):n.el.insertBefore(n.dropping_element,n.children[e])},findDroppingElement_index:function(t){var e,n=0,i=(t.top,r.dragElement.getBoundingClientRect()),o=0,a=l(this.el.children);try{for(a.s();!(e=a.n()).done;){var s=e.value,c={width:0,height:0};s.classList.contains("vue-dropping-placeholder")&&(c=s.getBoundingClientRect(),c.width);var u=s.getBoundingClientRect();i.top+i.height/2>u.top+u.height/2&&(o=n),n++}}catch(d){a.e(d)}finally{a.f()}return o=parseInt(o),o},getPlaceholderCurrentIndex:function(){var t,e=0,n=l(this.el.children);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(i!=r.dsDom){if(i==this.dropping_element)return e;e++}}}catch(o){n.e(o)}finally{n.f()}return e},sortDroppingElement:function(t){t.top;var e=r.dragElement.getBoundingClientRect(),n=0,i=t.movedY;this.dropping_element.getBoundingClientRect();var o,a=0,s=l(this.el.children);try{for(s.s();!(o=s.n()).done;){var c=o.value;if(c!=r.dragElement)if(c!=this.dropping_element){var u={width:0,height:0};c.classList.contains("vue-dropping-placeholder")&&(u=c.getBoundingClientRect(),u.width);var d=c.getBoundingClientRect();e.top+e.height/2>d.top+d.height/2&&(n=a),a++}else a++}}catch(p){s.e(p)}finally{s.f()}if(n=parseInt(n),n!=this.dropping_element_index){clearTimeout(r.sortDroppingElement_timeout);var f=this;r.sortDroppingElement_timeout=setTimeout((function(){null!=f.dropping_element&&(f.dropping_element_index=n,-1==n||n==f.children.length?f.el.appendChild(f.dropping_element):f.el.insertBefore(f.dropping_element,f.children[n]))}),25)}}};if(r.sortable){var i,o=0,a=l(t.children);try{for(a.s();!(i=a.n()).done;){var s=i.value;s.dim=s.getBoundingClientRect(),s!==r.$el?n.children.push(s):n.dropping_element_index=o,o++}}catch(c){a.e(c)}finally{a.f()}}r.drop_areas.push(n)}})),this.drop_areas.length>0&&(this.isDroppable=!0)}},contains:function(t,e){var n=t.dim;return n.left<e.left+e.width/1.5&&n.left+n.width>e.left+e.width/1.5&&n.top<e.top+e.height/1.5&&n.top+n.height>e.top+e.height/1.5},removeEventHandlers:function(){this.domHandle.removeEventListener("mousedown",this.dragStarted),this.domHandle.removeEventListener("touchstart",this.dragStarted),this.domHandle.removeEventListener("dragstart",this.dragStart_prevent)}},created:function(){"undefined"==typeof this.$vdraggable&&(f.a.prototype.$vdraggable=f.a.observable({creations:0,instances:0,isDragging:!1,current:null})),this.$vdraggable.creations++,this.$vdraggable.instances++},destroyed:function(){this.$vdraggable.instances--,this.removeEventHandlers()},mounted:function(){var t=this;this.$nextTick((function(){"undefined"!==typeof t.$slots["default"]&&t.$slots["default"].length,t.dsDom=t.$el,""!=t.draghandle&&null!=t.dsDom&&(t.domHandle=t.$el.querySelector(t.draghandle)),null==t.dsDom||""!=t.draghandle&&null!=t.draghandle&&"undefined"!=typeof t.draghandle||(t.domHandle=t.dsDom),t.dropareas.length>0&&(t.isDroppable=!0),t.containmentElement=document.querySelector(t.containment),t.cssPosition=t.dsDom.style.position,t.zIndex=t.dsDom.style.zIndex,t.setupEventHandlers()}))}},h=p;function g(t,e,n,r,i,o,a,s){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):i&&(c=s?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:u}}var m=g(h,a,s,!1,null,null,null),v=m.exports;e["default"]=v},"35f2":function(t,e){t.exports=!1},"360b":function(t,e,n){var r=n("55f2"),i=n("4079").trim,o=n("b808"),a=r.parseInt,s=/^[+-]?0[Xx]/,c=8!==a(o+"08")||22!==a(o+"0x16");t.exports=c?function(t,e){var n=i(String(t));return a(n,e>>>0||(s.test(n)?16:10))}:a},3685:function(t,e,n){"use strict";var r=n("9267"),i=n("55f2"),o=n("87b1"),a=n("49e1"),s=n("aa74"),c=n("2901"),u=n("da1b"),l=n("16c3"),d=n("dd4c"),f=n("edbc"),p=n("a162").f,h=n("d266").f,g=n("866c").f,m=n("4079").trim,v="Number",y=i[v],b=y.prototype,x=c(f(b))==v,_=function(t){var e,n,r,i,o,a,s,c,u=l(t,!1);if("string"==typeof u&&u.length>2)if(u=m(u),e=u.charCodeAt(0),43===e||45===e){if(n=u.charCodeAt(2),88===n||120===n)return NaN}else if(48===e){switch(u.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+u}for(o=u.slice(2),a=o.length,s=0;s<a;s++)if(c=o.charCodeAt(s),c<48||c>i)return NaN;return parseInt(o,r)}return+u};if(o(v,!y(" 0o1")||!y("0b1")||y("+0x1"))){for(var E,S=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof S&&(x?d((function(){b.valueOf.call(n)})):c(n)!=v)?u(new y(_(e)),n,S):_(e)},D=r?p(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;D.length>w;w++)s(y,E=D[w])&&!s(S,E)&&g(S,E,h(y,E));S.prototype=b,b.constructor=S,a(i,v,S)}},3964:function(t,e,n){var r=n("985e"),i=n("55f2"),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t])||o(i[t]):r[t]&&r[t][e]||i[t]&&i[t][e]}},"3ac0":function(t,e,n){var r=n("dd4c"),i=n("2901"),o="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?o.call(t,""):Object(t)}:Object},"3bae":function(t,e,n){var r=n("2901");t.exports=Array.isArray||function(t){return"Array"==r(t)}},4079:function(t,e,n){var r=n("e527"),i=n("b808"),o="["+i+"]",a=RegExp("^"+o+o+"*"),s=RegExp(o+o+"*$"),c=function(t){return function(e){var n=String(r(e));return 1&t&&(n=n.replace(a,"")),2&t&&(n=n.replace(s,"")),n}};t.exports={start:c(1),end:c(2),trim:c(3)}},4323:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},"443e":function(t,e,n){var r=n("55f2"),i=n("e556"),o=r.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},"458f":function(t,e,n){var r=n("243a"),i=n("2fd0"),o=n("ed09"),a=function(t){return function(e,n,a){var s,c=r(e),u=i(c.length),l=o(a,u);if(t&&n!=n){while(u>l)if(s=c[l++],s!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},"49e1":function(t,e,n){var r=n("55f2"),i=n("a1fa"),o=n("aa74"),a=n("8668"),s=n("8999"),c=n("58c7"),u=c.get,l=c.enforce,d=String(String).split("String");(t.exports=function(t,e,n,s){var c=!!s&&!!s.unsafe,u=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof e||o(n,"name")||i(n,"name",e),l(n).source=d.join("string"==typeof e?e:"")),t!==r?(c?!f&&t[e]&&(u=!0):delete t[e],u?t[e]=n:i(t,e,n)):u?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||s(this)}))},"4af3":function(t,e,n){var r=n("3964");t.exports=r("document","documentElement")},5117:function(t,e,n){var r=n("a971");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},"55f2":function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")()}).call(this,n("01e3"))},"58af":function(t,e,n){var r=n("e556");t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},"58c7":function(t,e,n){var r,i,o,a=n("dd12"),s=n("55f2"),c=n("e556"),u=n("a1fa"),l=n("aa74"),d=n("128e"),f=n("8065"),p=s.WeakMap,h=function(t){return o(t)?i(t):r(t,{})},g=function(t){return function(e){var n;if(!c(e)||(n=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}};if(a){var m=new p,v=m.get,y=m.has,b=m.set;r=function(t,e){return b.call(m,t,e),e},i=function(t){return v.call(m,t)||{}},o=function(t){return y.call(m,t)}}else{var x=d("state");f[x]=!0,r=function(t,e){return u(t,x,e),e},i=function(t){return l(t,x)?t[x]:{}},o=function(t){return l(t,x)}}t.exports={set:r,get:i,has:o,enforce:h,getterFor:g}},"5f5d":function(t,e,n){var r=n("49e1"),i=Date.prototype,o="Invalid Date",a="toString",s=i[a],c=i.getTime;new Date(NaN)+""!=o&&r(i,a,(function(){var t=c.call(this);return t===t?s.call(this):o}))},6611:function(t,e,n){var r=n("55f2"),i=n("8668"),o="__core-js_shared__",a=r[o]||i(o,{});t.exports=a},"6c26":function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"6efa":function(t,e,n){"use strict";var r=n("017d"),i=n("26a7");r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},"7d35":function(t,e,n){var r=n("ca18"),i=n("3ac0"),o=n("cb70"),a=n("2fd0"),s=n("15a3"),c=[].push,u=function(t){var e=1==t,n=2==t,u=3==t,l=4==t,d=6==t,f=5==t||d;return function(p,h,g,m){for(var v,y,b=o(p),x=i(b),_=r(h,g,3),E=a(x.length),S=0,D=m||s,w=e?D(p,E):n?D(p,0):void 0;E>S;S++)if((f||S in x)&&(v=x[S],y=_(v,S,b),t))if(e)w[S]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return S;case 2:c.call(w,v)}else if(l)return!1;return d?-1:u||l?l:w}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6)}},"7ff3":function(t,e,n){var r=n("3964");t.exports=r("navigator","userAgent")||""},8065:function(t,e){t.exports={}},8668:function(t,e,n){var r=n("55f2"),i=n("a1fa");t.exports=function(t,e){try{i(r,t,e)}catch(n){r[t]=e}return e}},"866c":function(t,e,n){var r=n("9267"),i=n("e650"),o=n("58af"),a=n("16c3"),s=Object.defineProperty;e.f=r?s:function(t,e,n){if(o(t),e=a(e,!0),o(n),i)try{return s(t,e,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},"87b1":function(t,e,n){var r=n("dd4c"),i=/#|\.prototype\./,o=function(t,e){var n=s[a(t)];return n==u||n!=c&&("function"==typeof e?r(e):!!e)},a=o.normalize=function(t){return String(t).replace(i,".").toLowerCase()},s=o.data={},c=o.NATIVE="N",u=o.POLYFILL="P";t.exports=o},8999:function(t,e,n){var r=n("6611"),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return i.call(t)}),t.exports=r.inspectSource},"8bbf":function(e,n){e.exports=t},9267:function(t,e,n){var r=n("dd4c");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"985e":function(t,e,n){var r=n("55f2");t.exports=r},a11f:function(t,e,n){var r=n("017d"),i=n("55f2"),o=n("7ff3"),a=[].slice,s=/MSIE .\./.test(o),c=function(t){return function(e,n){var r=arguments.length>2,i=r?a.call(arguments,2):void 0;return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,n)}};r({global:!0,bind:!0,forced:s},{setTimeout:c(i.setTimeout),setInterval:c(i.setInterval)})},a162:function(t,e,n){var r=n("b7f5"),i=n("6c26"),o=i.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},a1fa:function(t,e,n){var r=n("9267"),i=n("866c"),o=n("a7ed");t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},a7ed:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},a971:function(t,e,n){var r=n("dd4c");t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},aa74:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},aaa6:function(t,e,n){var r=n("e556");t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},ab38:function(t,e,n){"use strict";var r=n("dd4c");t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},b148:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},b198:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},b7f5:function(t,e,n){var r=n("aa74"),i=n("243a"),o=n("458f").indexOf,a=n("8065");t.exports=function(t,e){var n,s=i(t),c=0,u=[];for(n in s)!r(a,n)&&r(s,n)&&u.push(n);while(e.length>c)r(s,n=e[c++])&&(~o(u,n)||u.push(n));return u}},b808:function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},c78a:function(t,e,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);e.f=o?function(t){var e=i(this,t);return!!e&&e.enumerable}:r},ca18:function(t,e,n){var r=n("b148");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},cb70:function(t,e,n){var r=n("e527");t.exports=function(t){return Object(r(t))}},d266:function(t,e,n){var r=n("9267"),i=n("c78a"),o=n("a7ed"),a=n("243a"),s=n("16c3"),c=n("aa74"),u=n("e650"),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=a(t),e=s(e,!0),u)try{return l(t,e)}catch(n){}if(c(t,e))return o(!i.f.call(t,e),t[e])}},d753:function(t,e,n){var r=n("b7f5"),i=n("6c26");t.exports=Object.keys||function(t){return r(t,i)}},da1b:function(t,e,n){var r=n("e556"),i=n("f6c0");t.exports=function(t,e,n){var o,a;return i&&"function"==typeof(o=e.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(t,a),t}},da6b:function(t,e,n){var r=n("aa74"),i=n("fad0"),o=n("d266"),a=n("866c");t.exports=function(t,e){for(var n=i(e),s=a.f,c=o.f,u=0;u<n.length;u++){var l=n[u];r(t,l)||s(t,l,c(e,l))}}},dd12:function(t,e,n){var r=n("55f2"),i=n("8999"),o=r.WeakMap;t.exports="function"===typeof o&&/native code/.test(i(o))},dd4c:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},e527:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},e556:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},e650:function(t,e,n){var r=n("9267"),i=n("dd4c"),o=n("443e");t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},eb90:function(t,e,n){var r=n("35f2"),i=n("6611");(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},ed09:function(t,e,n){var r=n("4323"),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},edbc:function(t,e,n){var r,i=n("58af"),o=n("2bfb"),a=n("6c26"),s=n("8065"),c=n("4af3"),u=n("443e"),l=n("128e"),d=">",f="<",p="prototype",h="script",g=l("IE_PROTO"),m=function(){},v=function(t){return f+h+d+t+f+"/"+h+d},y=function(t){t.write(v("")),t.close();var e=t.parentWindow.Object;return t=null,e},b=function(){var t,e=u("iframe"),n="java"+h+":";return e.style.display="none",c.appendChild(e),e.src=String(n),t=e.contentWindow.document,t.open(),t.write(v("document.F=Object")),t.close(),t.F},x=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}x=r?y(r):b();var t=a.length;while(t--)delete x[p][a[t]];return x()};s[g]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(m[p]=i(t),n=new m,m[p]=null,n[g]=t):n=x(),void 0===e?n:o(n,e)}},f6c0:function(t,e,n){var r=n("58af"),i=n("aaa6");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,t.call(n,[]),e=n instanceof Array}catch(o){}return function(n,o){return r(n),i(o),e?t.call(n,o):n.__proto__=o,n}}():void 0)},fad0:function(t,e,n){var r=n("3964"),i=n("a162"),o=n("0d63"),a=n("58af");t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=o.f;return n?e.concat(n(t)):e}}})["default"]}));
//# sourceMappingURL=vue-draggable.umd.min.js.map