@ddwl/ddwl-ui 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31671,7 +31671,10 @@ var import_file_component = (0,componentNormalizer/* default */.A)(
31671
31671
  while (1) switch (_context.n) {
31672
31672
  case 0:
31673
31673
  try {
31674
- resolve(callback, file);
31674
+ resolve({
31675
+ file: file,
31676
+ callback: callback
31677
+ });
31675
31678
  } catch (e) {
31676
31679
  callback(new Error(e));
31677
31680
  }
@@ -31685,7 +31688,7 @@ var import_file_component = (0,componentNormalizer/* default */.A)(
31685
31688
  };
31686
31689
  }());
31687
31690
  instance.$on('close', function () {
31688
- reject(new Error('cancelled'));
31691
+ reject();
31689
31692
  Vue.nextTick(destroy);
31690
31693
  });
31691
31694
  });
package/dist/index.umd.js CHANGED
@@ -31689,7 +31689,10 @@ var import_file_component = (0,componentNormalizer/* default */.A)(
31689
31689
  while (1) switch (_context.n) {
31690
31690
  case 0:
31691
31691
  try {
31692
- resolve(callback, file);
31692
+ resolve({
31693
+ file: file,
31694
+ callback: callback
31695
+ });
31693
31696
  } catch (e) {
31694
31697
  callback(new Error(e));
31695
31698
  }
@@ -31703,7 +31706,7 @@ var import_file_component = (0,componentNormalizer/* default */.A)(
31703
31706
  };
31704
31707
  }());
31705
31708
  instance.$on('close', function () {
31706
- reject(new Error('cancelled'));
31709
+ reject();
31707
31710
  Vue.nextTick(destroy);
31708
31711
  });
31709
31712
  });
@@ -15,4 +15,4 @@ var t,e,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.toS
15
15
  * @author owenm <owen23355@gmail.com>
16
16
  * @license MIT
17
17
  */
18
- function qt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Gt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?qt(Object(n),!0).forEach(function(e){Xt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Jt(t){return Jt="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},Jt(t)}function Xt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ht(){return Ht=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ht.apply(this,arguments)}function Zt(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}function te(t,e){if(null==t)return{};var n,r,i=Zt(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var ee="1.15.6";function ne(t){if("undefined"!==typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var re=ne(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ie=ne(/Edge/i),oe=ne(/firefox/i),ae=ne(/safari/i)&&!ne(/chrome/i)&&!ne(/android/i),ue=ne(/iP(ad|od|hone)/i),le=ne(/chrome/i)&&ne(/android/i),se={capture:!1,passive:!1};function ce(t,e,n){t.addEventListener(e,n,!re&&se)}function fe(t,e,n){t.removeEventListener(e,n,!re&&se)}function de(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 pe(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function he(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&de(t,e):de(t,e))||r&&t===n)return t;if(t===n)break}while(t=pe(t))}return null}var ve,ge=/\s+/g;function me(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(ge," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(ge," ")}}function ye(t,e,n){var r=t&&t.style;if(r){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 r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"===typeof n?"":"px")}}function be(t,e){var n="";if("string"===typeof t)n=t;else do{var r=ye(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function _e(t,e,n){if(t){var r=t.getElementsByTagName(e),i=0,o=r.length;if(n)for(;i<o;i++)n(r[i],i);return r}return[]}function we(){var t=document.scrollingElement;return t||document.documentElement}function xe(t,e,n,r,i){if(t.getBoundingClientRect||t===window){var o,a,u,l,s,c,f;if(t!==window&&t.parentNode&&t!==we()?(o=t.getBoundingClientRect(),a=o.top,u=o.left,l=o.bottom,s=o.right,c=o.height,f=o.width):(a=0,u=0,l=window.innerHeight,s=window.innerWidth,c=window.innerHeight,f=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!re))do{if(i&&i.getBoundingClientRect&&("none"!==ye(i,"transform")||n&&"static"!==ye(i,"position"))){var d=i.getBoundingClientRect();a-=d.top+parseInt(ye(i,"border-top-width")),u-=d.left+parseInt(ye(i,"border-left-width")),l=a+o.height,s=u+o.width;break}}while(i=i.parentNode);if(r&&t!==window){var p=be(i||t),h=p&&p.a,v=p&&p.d;p&&(a/=v,u/=h,f/=h,c/=v,l=a+c,s=u+f)}return{top:a,left:u,bottom:l,right:s,width:f,height:c}}}function Ae(t,e,n){var r=Oe(t,!0),i=xe(t)[e];while(r){var o=xe(r)[n],a=void 0;if(a="top"===n||"left"===n?i>=o:i<=o,!a)return r;if(r===we())break;r=Oe(r,!1)}return!1}function Se(t,e,n,r){var i=0,o=0,a=t.children;while(o<a.length){if("none"!==a[o].style.display&&a[o]!==zn.ghost&&(r||a[o]!==zn.dragged)&&he(a[o],n.draggable,t,!1)){if(i===e)return a[o];i++}o++}return null}function Ce(t,e){var n=t.lastElementChild;while(n&&(n===zn.ghost||"none"===ye(n,"display")||e&&!de(n,e)))n=n.previousElementSibling;return n||null}function Ie(t,e){var n=0;if(!t||!t.parentNode)return-1;while(t=t.previousElementSibling)"TEMPLATE"===t.nodeName.toUpperCase()||t===zn.clone||e&&!de(t,e)||n++;return n}function Ee(t){var e=0,n=0,r=we();if(t)do{var i=be(t),o=i.a,a=i.d;e+=t.scrollLeft*o,n+=t.scrollTop*a}while(t!==r&&(t=t.parentNode));return[e,n]}function ke(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n);return-1}function Oe(t,e){if(!t||!t.getBoundingClientRect)return we();var n=t,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=ye(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 we();if(r||e)return n;r=!0}}}while(n=n.parentNode);return we()}function De(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Be(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 Te(t,e){return function(){if(!ve){var n=arguments,r=this;1===n.length?t.call(r,n[0]):t.apply(r,n),ve=setTimeout(function(){ve=void 0},e)}}}function Re(){clearTimeout(ve),ve=void 0}function je(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function Me(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)}function Ne(t,e,n){var r={};return Array.from(t.children).forEach(function(i){var o,a,u,l;if(he(i,e.draggable,t,!1)&&!i.animated&&i!==n){var s=xe(i);r.left=Math.min(null!==(o=r.left)&&void 0!==o?o:1/0,s.left),r.top=Math.min(null!==(a=r.top)&&void 0!==a?a:1/0,s.top),r.right=Math.max(null!==(u=r.right)&&void 0!==u?u:-1/0,s.right),r.bottom=Math.max(null!==(l=r.bottom)&&void 0!==l?l:-1/0,s.bottom)}}),r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}var Le="Sortable"+(new Date).getTime();function Fe(){var t,e=[];return{captureAnimationState:function(){if(e=[],this.options.animation){var t=[].slice.call(this.el.children);t.forEach(function(t){if("none"!==ye(t,"display")&&t!==zn.ghost){e.push({target:t,rect:xe(t)});var n=Gt({},e[e.length-1].rect);if(t.thisAnimationDuration){var r=be(t,!0);r&&(n.top-=r.f,n.left-=r.e)}t.fromRect=n}})}},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(ke(e,{target:t}),1)},animateAll:function(n){var r=this;if(!this.options.animation)return clearTimeout(t),void("function"===typeof n&&n());var i=!1,o=0;e.forEach(function(t){var e=0,n=t.target,a=n.fromRect,u=xe(n),l=n.prevFromRect,s=n.prevToRect,c=t.rect,f=be(n,!0);f&&(u.top-=f.f,u.left-=f.e),n.toRect=u,n.thisAnimationDuration&&Be(l,u)&&!Be(a,u)&&(c.top-u.top)/(c.left-u.left)===(a.top-u.top)/(a.left-u.left)&&(e=Qe(c,l,s,r.options)),Be(u,a)||(n.prevFromRect=a,n.prevToRect=u,e||(e=r.options.animation),r.animate(n,c,u,e)),e&&(i=!0,o=Math.max(o,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()},o):"function"===typeof n&&n(),e=[]},animate:function(t,e,n,r){if(r){ye(t,"transition",""),ye(t,"transform","");var i=be(this.el),o=i&&i.a,a=i&&i.d,u=(e.left-n.left)/(o||1),l=(e.top-n.top)/(a||1);t.animatingX=!!u,t.animatingY=!!l,ye(t,"transform","translate3d("+u+"px,"+l+"px,0)"),this.forRepaintDummy=Pe(t),ye(t,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),ye(t,"transform","translate3d(0,0,0)"),"number"===typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout(function(){ye(t,"transition",""),ye(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1},r)}}}}function Pe(t){return t.offsetWidth}function Qe(t,e,n,r){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))*r.animation}var ze=[],Ue={initializeByDefault:!0},Ke={mount:function(t){for(var e in Ue)Ue.hasOwnProperty(e)&&!(e in t)&&(t[e]=Ue[e]);ze.forEach(function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),ze.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var i=t+"Global";ze.forEach(function(r){e[r.pluginName]&&(e[r.pluginName][i]&&e[r.pluginName][i](Gt({sortable:e},n)),e.options[r.pluginName]&&e[r.pluginName][t]&&e[r.pluginName][t](Gt({sortable:e},n)))})},initializePlugins:function(t,e,n,r){for(var i in ze.forEach(function(r){var i=r.pluginName;if(t.options[i]||r.initializeByDefault){var o=new r(t,e,t.options);o.sortable=t,o.options=t.options,t[i]=o,Ht(n,o.defaults)}}),t.options)if(t.options.hasOwnProperty(i)){var o=this.modifyOption(t,i,t.options[i]);"undefined"!==typeof o&&(t.options[i]=o)}},getEventProperties:function(t,e){var n={};return ze.forEach(function(r){"function"===typeof r.eventProperties&&Ht(n,r.eventProperties.call(e[r.pluginName],t))}),n},modifyOption:function(t,e,n){var r;return ze.forEach(function(i){t[i.pluginName]&&i.optionListeners&&"function"===typeof i.optionListeners[e]&&(r=i.optionListeners[e].call(t[i.pluginName],n))}),r}};function Ye(t){var e=t.sortable,n=t.rootEl,r=t.name,i=t.targetEl,o=t.cloneEl,a=t.toEl,u=t.fromEl,l=t.oldIndex,s=t.newIndex,c=t.oldDraggableIndex,f=t.newDraggableIndex,d=t.originalEvent,p=t.putSortable,h=t.extraEventProperties;if(e=e||n&&n[Le],e){var v,g=e.options,m="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||re||ie?(v=document.createEvent("Event"),v.initEvent(r,!0,!0)):v=new CustomEvent(r,{bubbles:!0,cancelable:!0}),v.to=a||n,v.from=u||n,v.item=i||n,v.clone=o,v.oldIndex=l,v.newIndex=s,v.oldDraggableIndex=c,v.newDraggableIndex=f,v.originalEvent=d,v.pullMode=p?p.lastPutMode:void 0;var y=Gt(Gt({},h),Ke.getEventProperties(r,e));for(var b in y)v[b]=y[b];n&&n.dispatchEvent(v),g[m]&&g[m].call(e,v)}}var $e=["evt"],We=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,i=te(n,$e);Ke.pluginEvent.bind(zn)(t,e,Gt({dragEl:qe,parentEl:Ge,ghostEl:Je,rootEl:Xe,nextEl:He,lastDownEl:Ze,cloneEl:tn,cloneHidden:en,dragStarted:vn,putSortable:ln,activeSortable:zn.active,originalEvent:r,oldIndex:nn,oldDraggableIndex:on,newIndex:rn,newDraggableIndex:an,hideGhostForTarget:Ln,unhideGhostForTarget:Fn,cloneNowHidden:function(){en=!0},cloneNowShown:function(){en=!1},dispatchSortableEvent:function(t){Ve({sortable:e,name:t,originalEvent:r})}},i))};function Ve(t){Ye(Gt({putSortable:ln,cloneEl:tn,targetEl:qe,rootEl:Xe,oldIndex:nn,oldDraggableIndex:on,newIndex:rn,newDraggableIndex:an},t))}var qe,Ge,Je,Xe,He,Ze,tn,en,nn,rn,on,an,un,ln,sn,cn,fn,dn,pn,hn,vn,gn,mn,yn,bn,_n=!1,wn=!1,xn=[],An=!1,Sn=!1,Cn=[],In=!1,En=[],kn="undefined"!==typeof document,On=ue,Dn=ie||re?"cssFloat":"float",Bn=kn&&!le&&!ue&&"draggable"in document.createElement("div"),Tn=function(){if(kn){if(re)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Rn=function(t,e){var n=ye(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=Se(t,0,e),o=Se(t,1,e),a=i&&ye(i),u=o&&ye(o),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+xe(i).width,s=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+xe(o).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 c="left"===a["float"]?"left":"right";return!o||"both"!==u.clear&&u.clear!==c?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=r&&"none"===n[Dn]||o&&"none"===n[Dn]&&l+s>r)?"vertical":"horizontal"},jn=function(t,e,n){var r=n?t.left:t.top,i=n?t.right:t.bottom,o=n?t.width:t.height,a=n?e.left:e.top,u=n?e.right:e.bottom,l=n?e.width:e.height;return r===a||i===u||r+o/2===a+l/2},Mn=function(t,e){var n;return xn.some(function(r){var i=r[Le].options.emptyInsertThreshold;if(i&&!Ce(r)){var o=xe(r),a=t>=o.left-i&&t<=o.right+i,u=e>=o.top-i&&e<=o.bottom+i;return a&&u?n=r:void 0}}),n},Nn=function(t){function e(t,n){return function(r,i,o,a){var u=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;if(null==t&&(n||u))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"===typeof t)return e(t(r,i,o,a),n)(r,i,o,a);var l=(n?r:i).options.group.name;return!0===t||"string"===typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},r=t.group;r&&"object"==Jt(r)||(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},Ln=function(){!Tn&&Je&&ye(Je,"display","none")},Fn=function(){!Tn&&Je&&ye(Je,"display","")};kn&&!le&&document.addEventListener("click",function(t){if(wn)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),wn=!1,!1},!0);var Pn=function(t){if(qe){t=t.touches?t.touches[0]:t;var e=Mn(t.clientX,t.clientY);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[Le]._onDragOver(n)}}},Qn=function(t){qe&&qe.parentNode[Le]._isOutsideThisEl(t.target)};function zn(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=Ht({},e),t[Le]=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 Rn(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!==zn.supportPointer&&"PointerEvent"in window&&(!ae||ue),emptyInsertThreshold:5};for(var r in Ke.initializePlugins(this,t,n),n)!(r in e)&&(e[r]=n[r]);for(var i in Nn(e),this)"_"===i.charAt(0)&&"function"===typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&Bn,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?ce(t,"pointerdown",this._onTapStart):(ce(t,"mousedown",this._onTapStart),ce(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(ce(t,"dragover",this),ce(t,"dragenter",this)),xn.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Ht(this,Fe())}function Un(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function Kn(t,e,n,r,i,o,a,u){var l,s,c=t[Le],f=c.options.onMove;return!window.CustomEvent||re||ie?(l=document.createEvent("Event"),l.initEvent("move",!0,!0)):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=r,l.related=i||e,l.relatedRect=o||xe(e),l.willInsertAfter=u,l.originalEvent=a,t.dispatchEvent(l),f&&(s=f.call(c,l,a)),s}function Yn(t){t.draggable=!1}function $n(){In=!1}function Wn(t,e,n){var r=xe(Se(n.el,0,n.options,!0)),i=Ne(n.el,n.options,Je),o=10;return e?t.clientX<i.left-o||t.clientY<r.top&&t.clientX<r.right:t.clientY<i.top-o||t.clientY<r.bottom&&t.clientX<r.left}function Vn(t,e,n){var r=xe(Ce(n.el,n.options.draggable)),i=Ne(n.el,n.options,Je),o=10;return e?t.clientX>i.right+o||t.clientY>r.bottom&&t.clientX>r.left:t.clientY>i.bottom+o||t.clientX>r.right&&t.clientY>r.top}function qn(t,e,n,r,i,o,a,u){var l=r?t.clientY:t.clientX,s=r?n.height:n.width,c=r?n.top:n.left,f=r?n.bottom:n.right,d=!1;if(!a)if(u&&yn<s*i){if(!An&&(1===mn?l>c+s*o/2:l<f-s*o/2)&&(An=!0),An)d=!0;else if(1===mn?l<c+yn:l>f-yn)return-mn}else if(l>c+s*(1-i)/2&&l<f-s*(1-i)/2)return Gn(e);return d=d||a,d&&(l<c+s*o/2||l>f-s*o/2)?l>c+s/2?1:-1:0}function Gn(t){return Ie(qe)<Ie(t)?1:-1}function Jn(t){var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;while(n--)r+=e.charCodeAt(n);return r.toString(36)}function Xn(t){En.length=0;var e=t.getElementsByTagName("input"),n=e.length;while(n--){var r=e[n];r.checked&&En.push(r)}}function Hn(t){return setTimeout(t,0)}function Zn(t){return clearTimeout(t)}zn.prototype={constructor:zn,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(gn=null)},_getDirection:function(t,e){return"function"===typeof this.options.direction?this.options.direction.call(this,t,e,qe):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,i=r.preventOnFilter,o=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,u=(a||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||u,s=r.filter;if(Xn(n),!qe&&!(/mousedown|pointerdown/.test(o)&&0!==t.button||r.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!ae||!u||"SELECT"!==u.tagName.toUpperCase())&&(u=he(u,r.draggable,n,!1),(!u||!u.animated)&&Ze!==u)){if(nn=Ie(u),on=Ie(u,r.draggable),"function"===typeof s){if(s.call(this,t,u,this))return Ve({sortable:e,rootEl:l,name:"filter",targetEl:u,toEl:n,fromEl:n}),We("filter",e,{evt:t}),void(i&&t.preventDefault())}else if(s&&(s=s.split(",").some(function(r){if(r=he(l,r.trim(),n,!1),r)return Ve({sortable:e,rootEl:r,name:"filter",targetEl:u,fromEl:n,toEl:n}),We("filter",e,{evt:t}),!0}),s))return void(i&&t.preventDefault());r.handle&&!he(l,r.handle,n,!1)||this._prepareDragStart(t,a,u)}}},_prepareDragStart:function(t,e,n){var r,i=this,o=i.el,a=i.options,u=o.ownerDocument;if(n&&!qe&&n.parentNode===o){var l=xe(n);if(Xe=o,qe=n,Ge=qe.parentNode,He=qe.nextSibling,Ze=n,un=a.group,zn.dragged=qe,sn={target:qe,clientX:(e||t).clientX,clientY:(e||t).clientY},pn=sn.clientX-l.left,hn=sn.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,qe.style["will-change"]="all",r=function(){We("delayEnded",i,{evt:t}),zn.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!oe&&i.nativeDraggable&&(qe.draggable=!0),i._triggerDragStart(t,e),Ve({sortable:i,name:"choose",originalEvent:t}),me(qe,a.chosenClass,!0))},a.ignore.split(",").forEach(function(t){_e(qe,t.trim(),Yn)}),ce(u,"dragover",Pn),ce(u,"mousemove",Pn),ce(u,"touchmove",Pn),a.supportPointer?(ce(u,"pointerup",i._onDrop),!this.nativeDraggable&&ce(u,"pointercancel",i._onDrop)):(ce(u,"mouseup",i._onDrop),ce(u,"touchend",i._onDrop),ce(u,"touchcancel",i._onDrop)),oe&&this.nativeDraggable&&(this.options.touchStartThreshold=4,qe.draggable=!0),We("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(ie||re))r();else{if(zn.eventCanceled)return void this._onDrop();a.supportPointer?(ce(u,"pointerup",i._disableDelayedDrag),ce(u,"pointercancel",i._disableDelayedDrag)):(ce(u,"mouseup",i._disableDelayedDrag),ce(u,"touchend",i._disableDelayedDrag),ce(u,"touchcancel",i._disableDelayedDrag)),ce(u,"mousemove",i._delayedDragTouchMoveHandler),ce(u,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&ce(u,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(r,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(){qe&&Yn(qe),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;fe(t,"mouseup",this._disableDelayedDrag),fe(t,"touchend",this._disableDelayedDrag),fe(t,"touchcancel",this._disableDelayedDrag),fe(t,"pointerup",this._disableDelayedDrag),fe(t,"pointercancel",this._disableDelayedDrag),fe(t,"mousemove",this._delayedDragTouchMoveHandler),fe(t,"touchmove",this._delayedDragTouchMoveHandler),fe(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?ce(document,"pointermove",this._onTouchMove):ce(document,e?"touchmove":"mousemove",this._onTouchMove):(ce(qe,"dragend",this),ce(Xe,"dragstart",this._onDragStart));try{document.selection?Hn(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(_n=!1,Xe&&qe){We("dragStarted",this,{evt:e}),this.nativeDraggable&&ce(document,"dragover",Qn);var n=this.options;!t&&me(qe,n.dragClass,!1),me(qe,n.ghostClass,!0),zn.active=this,t&&this._appendGhost(),Ve({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(cn){this._lastX=cn.clientX,this._lastY=cn.clientY,Ln();var t=document.elementFromPoint(cn.clientX,cn.clientY),e=t;while(t&&t.shadowRoot){if(t=t.shadowRoot.elementFromPoint(cn.clientX,cn.clientY),t===e)break;e=t}if(qe.parentNode[Le]._isOutsideThisEl(t),e)do{if(e[Le]){var n=void 0;if(n=e[Le]._onDragOver({clientX:cn.clientX,clientY:cn.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=pe(e));Fn()}},_onTouchMove:function(t){if(sn){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,i=t.touches?t.touches[0]:t,o=Je&&be(Je,!0),a=Je&&o&&o.a,u=Je&&o&&o.d,l=On&&bn&&Ee(bn),s=(i.clientX-sn.clientX+r.x)/(a||1)+(l?l[0]-Cn[0]:0)/(a||1),c=(i.clientY-sn.clientY+r.y)/(u||1)+(l?l[1]-Cn[1]:0)/(u||1);if(!zn.active&&!_n){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(Je){o?(o.e+=s-(fn||0),o.f+=c-(dn||0)):o={a:1,b:0,c:0,d:1,e:s,f:c};var f="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");ye(Je,"webkitTransform",f),ye(Je,"mozTransform",f),ye(Je,"msTransform",f),ye(Je,"transform",f),fn=s,dn=c,cn=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Je){var t=this.options.fallbackOnBody?document.body:Xe,e=xe(qe,!0,On,!0,t),n=this.options;if(On){bn=t;while("static"===ye(bn,"position")&&"none"===ye(bn,"transform")&&bn!==document)bn=bn.parentNode;bn!==document.body&&bn!==document.documentElement?(bn===document&&(bn=we()),e.top+=bn.scrollTop,e.left+=bn.scrollLeft):bn=we(),Cn=Ee(bn)}Je=qe.cloneNode(!0),me(Je,n.ghostClass,!1),me(Je,n.fallbackClass,!0),me(Je,n.dragClass,!0),ye(Je,"transition",""),ye(Je,"transform",""),ye(Je,"box-sizing","border-box"),ye(Je,"margin",0),ye(Je,"top",e.top),ye(Je,"left",e.left),ye(Je,"width",e.width),ye(Je,"height",e.height),ye(Je,"opacity","0.8"),ye(Je,"position",On?"absolute":"fixed"),ye(Je,"zIndex","100000"),ye(Je,"pointerEvents","none"),zn.ghost=Je,t.appendChild(Je),ye(Je,"transform-origin",pn/parseInt(Je.style.width)*100+"% "+hn/parseInt(Je.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,r=t.dataTransfer,i=n.options;We("dragStart",this,{evt:t}),zn.eventCanceled?this._onDrop():(We("setupClone",this),zn.eventCanceled||(tn=Me(qe),tn.removeAttribute("id"),tn.draggable=!1,tn.style["will-change"]="",this._hideClone(),me(tn,this.options.chosenClass,!1),zn.clone=tn),n.cloneId=Hn(function(){We("clone",n),zn.eventCanceled||(n.options.removeCloneOnHide||Xe.insertBefore(tn,qe),n._hideClone(),Ve({sortable:n,name:"clone"}))}),!e&&me(qe,i.dragClass,!0),e?(wn=!0,n._loopId=setInterval(n._emulateDragOver,50)):(fe(document,"mouseup",n._onDrop),fe(document,"touchend",n._onDrop),fe(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",i.setData&&i.setData.call(n,r,qe)),ce(document,"drop",n),ye(qe,"transform","translateZ(0)")),_n=!0,n._dragStartId=Hn(n._dragStarted.bind(n,e,t)),ce(document,"selectstart",n),vn=!0,window.getSelection().removeAllRanges(),ae&&ye(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,r,i,o=this.el,a=t.target,u=this.options,l=u.group,s=zn.active,c=un===l,f=u.sort,d=ln||s,p=this,h=!1;if(!In){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),a=he(a,u.draggable,o,!0),O("dragOver"),zn.eventCanceled)return h;if(qe.contains(t.target)||a.animated&&a.animatingX&&a.animatingY||p._ignoreWhileAnimating===a)return B(!1);if(wn=!1,s&&!u.disabled&&(c?f||(r=Ge!==Xe):ln===this||(this.lastPutMode=un.checkPull(this,s,qe,t))&&l.checkPut(this,s,qe,t))){if(i="vertical"===this._getDirection(t,a),e=xe(qe),O("dragOverValid"),zn.eventCanceled)return h;if(r)return Ge=Xe,D(),this._hideClone(),O("revert"),zn.eventCanceled||(He?Xe.insertBefore(qe,He):Xe.appendChild(qe)),B(!0);var v=Ce(o,u.draggable);if(!v||Vn(t,i,this)&&!v.animated){if(v===qe)return B(!1);if(v&&o===t.target&&(a=v),a&&(n=xe(a)),!1!==Kn(Xe,o,qe,e,a,n,t,!!a))return D(),v&&v.nextSibling?o.insertBefore(qe,v.nextSibling):o.appendChild(qe),Ge=o,T(),B(!0)}else if(v&&Wn(t,i,this)){var g=Se(o,0,u,!0);if(g===qe)return B(!1);if(a=g,n=xe(a),!1!==Kn(Xe,o,qe,e,a,n,t,!1))return D(),o.insertBefore(qe,g),Ge=o,T(),B(!0)}else if(a.parentNode===o){n=xe(a);var m,y,b=0,_=qe.parentNode!==o,w=!jn(qe.animated&&qe.toRect||e,a.animated&&a.toRect||n,i),x=i?"top":"left",A=Ae(a,"top","top")||Ae(qe,"top","top"),S=A?A.scrollTop:void 0;if(gn!==a&&(m=n[x],An=!1,Sn=!w&&u.invertSwap||_),b=qn(t,a,n,i,w?1:u.swapThreshold,null==u.invertedSwapThreshold?u.swapThreshold:u.invertedSwapThreshold,Sn,gn===a),0!==b){var C=Ie(qe);do{C-=b,y=Ge.children[C]}while(y&&("none"===ye(y,"display")||y===Je))}if(0===b||y===a)return B(!1);gn=a,mn=b;var I=a.nextElementSibling,E=!1;E=1===b;var k=Kn(Xe,o,qe,e,a,n,t,E);if(!1!==k)return 1!==k&&-1!==k||(E=1===k),In=!0,setTimeout($n,30),D(),E&&!I?o.appendChild(qe):a.parentNode.insertBefore(qe,E?I:a),A&&je(A,0,S-A.scrollTop),Ge=qe.parentNode,void 0===m||Sn||(yn=Math.abs(m-xe(a)[x])),T(),B(!0)}if(o.contains(qe))return B(!1)}return!1}function O(u,l){We(u,p,Gt({evt:t,isOwner:c,axis:i?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:f,fromSortable:d,target:a,completed:B,onMove:function(n,r){return Kn(Xe,o,qe,e,n,xe(n),t,r)},changed:T},l))}function D(){O("dragOverAnimationCapture"),p.captureAnimationState(),p!==d&&d.captureAnimationState()}function B(e){return O("dragOverCompleted",{insertion:e}),e&&(c?s._hideClone():s._showClone(p),p!==d&&(me(qe,ln?ln.options.ghostClass:s.options.ghostClass,!1),me(qe,u.ghostClass,!0)),ln!==p&&p!==zn.active?ln=p:p===zn.active&&ln&&(ln=null),d===p&&(p._ignoreWhileAnimating=a),p.animateAll(function(){O("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(a===qe&&!qe.animated||a===o&&!a.animated)&&(gn=null),u.dragoverBubble||t.rootEl||a===document||(qe.parentNode[Le]._isOutsideThisEl(t.target),!e&&Pn(t)),!u.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),h=!0}function T(){rn=Ie(qe),an=Ie(qe,u.draggable),Ve({sortable:p,name:"change",toEl:o,newIndex:rn,newDraggableIndex:an,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){fe(document,"mousemove",this._onTouchMove),fe(document,"touchmove",this._onTouchMove),fe(document,"pointermove",this._onTouchMove),fe(document,"dragover",Pn),fe(document,"mousemove",Pn),fe(document,"touchmove",Pn)},_offUpEvents:function(){var t=this.el.ownerDocument;fe(t,"mouseup",this._onDrop),fe(t,"touchend",this._onDrop),fe(t,"pointerup",this._onDrop),fe(t,"pointercancel",this._onDrop),fe(t,"touchcancel",this._onDrop),fe(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;rn=Ie(qe),an=Ie(qe,n.draggable),We("drop",this,{evt:t}),Ge=qe&&qe.parentNode,rn=Ie(qe),an=Ie(qe,n.draggable),zn.eventCanceled||(_n=!1,Sn=!1,An=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Zn(this.cloneId),Zn(this._dragStartId),this.nativeDraggable&&(fe(document,"drop",this),fe(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ae&&ye(document.body,"user-select",""),ye(qe,"transform",""),t&&(vn&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Je&&Je.parentNode&&Je.parentNode.removeChild(Je),(Xe===Ge||ln&&"clone"!==ln.lastPutMode)&&tn&&tn.parentNode&&tn.parentNode.removeChild(tn),qe&&(this.nativeDraggable&&fe(qe,"dragend",this),Yn(qe),qe.style["will-change"]="",vn&&!_n&&me(qe,ln?ln.options.ghostClass:this.options.ghostClass,!1),me(qe,this.options.chosenClass,!1),Ve({sortable:this,name:"unchoose",toEl:Ge,newIndex:null,newDraggableIndex:null,originalEvent:t}),Xe!==Ge?(rn>=0&&(Ve({rootEl:Ge,name:"add",toEl:Ge,fromEl:Xe,originalEvent:t}),Ve({sortable:this,name:"remove",toEl:Ge,originalEvent:t}),Ve({rootEl:Ge,name:"sort",toEl:Ge,fromEl:Xe,originalEvent:t}),Ve({sortable:this,name:"sort",toEl:Ge,originalEvent:t})),ln&&ln.save()):rn!==nn&&rn>=0&&(Ve({sortable:this,name:"update",toEl:Ge,originalEvent:t}),Ve({sortable:this,name:"sort",toEl:Ge,originalEvent:t})),zn.active&&(null!=rn&&-1!==rn||(rn=nn,an=on),Ve({sortable:this,name:"end",toEl:Ge,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){We("nulling",this),Xe=qe=Ge=Je=He=tn=Ze=en=sn=cn=vn=rn=an=nn=on=gn=mn=ln=un=zn.dragged=zn.ghost=zn.clone=zn.active=null,En.forEach(function(t){t.checked=!0}),En.length=fn=dn=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":qe&&(this._onDragOver(t),Un(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,i=n.length,o=this.options;r<i;r++)t=n[r],he(t,o.draggable,this.el,!1)&&e.push(t.getAttribute(o.dataIdAttr)||Jn(t));return e},sort:function(t,e){var n={},r=this.el;this.toArray().forEach(function(t,e){var i=r.children[e];he(i,this.options.draggable,r,!1)&&(n[t]=i)},this),e&&this.captureAnimationState(),t.forEach(function(t){n[t]&&(r.removeChild(n[t]),r.appendChild(n[t]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return he(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var r=Ke.modifyOption(this,t,e);n[t]="undefined"!==typeof r?r:e,"group"===t&&Nn(n)},destroy:function(){We("destroy",this);var t=this.el;t[Le]=null,fe(t,"mousedown",this._onTapStart),fe(t,"touchstart",this._onTapStart),fe(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(fe(t,"dragover",this),fe(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),xn.splice(xn.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!en){if(We("hideClone",this),zn.eventCanceled)return;ye(tn,"display","none"),this.options.removeCloneOnHide&&tn.parentNode&&tn.parentNode.removeChild(tn),en=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(en){if(We("showClone",this),zn.eventCanceled)return;qe.parentNode!=Xe||this.options.group.revertClone?He?Xe.insertBefore(tn,He):Xe.appendChild(tn):Xe.insertBefore(tn,qe),this.options.group.revertClone&&this.animate(qe,tn),ye(tn,"display",""),en=!1}}else this._hideClone()}},kn&&ce(document,"touchmove",function(t){(zn.active||_n)&&t.cancelable&&t.preventDefault()}),zn.utils={on:ce,off:fe,css:ye,find:_e,is:function(t,e){return!!he(t,e,t,!1)},extend:De,throttle:Te,closest:he,toggleClass:me,clone:Me,index:Ie,nextTick:Hn,cancelNextTick:Zn,detectDirection:Rn,getChild:Se,expando:Le},zn.get=function(t){return t[Le]},zn.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&&(zn.utils=Gt(Gt({},zn.utils),t.utils)),Ke.mount(t)})},zn.create=function(t,e){return new zn(t,e)},zn.version=ee;var tr,er,nr,rr,ir,or,ar=[],ur=!1;function lr(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,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?ce(document,"dragover",this._handleAutoScroll):this.options.supportPointer?ce(document,"pointermove",this._handleFallbackAutoScroll):e.touches?ce(document,"touchmove",this._handleFallbackAutoScroll):ce(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?fe(document,"dragover",this._handleAutoScroll):(fe(document,"pointermove",this._handleFallbackAutoScroll),fe(document,"touchmove",this._handleFallbackAutoScroll),fe(document,"mousemove",this._handleFallbackAutoScroll)),cr(),sr(),Re()},nulling:function(){ir=er=tr=ur=or=nr=rr=null,ar.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,r=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,o=document.elementFromPoint(r,i);if(ir=t,e||this.options.forceAutoScrollFallback||ie||re||ae){fr(t,this.options,o,e);var a=Oe(o,!0);!ur||or&&r===nr&&i===rr||(or&&cr(),or=setInterval(function(){var o=Oe(document.elementFromPoint(r,i),!0);o!==a&&(a=o,sr()),fr(t,n.options,o,e)},10),nr=r,rr=i)}else{if(!this.options.bubbleScroll||Oe(o,!0)===we())return void sr();fr(t,this.options,Oe(o,!1),!1)}}},Ht(t,{pluginName:"scroll",initializeByDefault:!0})}function sr(){ar.forEach(function(t){clearInterval(t.pid)}),ar=[]}function cr(){clearInterval(or)}var fr=Te(function(t,e,n,r){if(e.scroll){var i,o=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,u=e.scrollSensitivity,l=e.scrollSpeed,s=we(),c=!1;er!==n&&(er=n,sr(),tr=e.scroll,i=e.scrollFn,!0===tr&&(tr=Oe(n,!0)));var f=0,d=tr;do{var p=d,h=xe(p),v=h.top,g=h.bottom,m=h.left,y=h.right,b=h.width,_=h.height,w=void 0,x=void 0,A=p.scrollWidth,S=p.scrollHeight,C=ye(p),I=p.scrollLeft,E=p.scrollTop;p===s?(w=b<A&&("auto"===C.overflowX||"scroll"===C.overflowX||"visible"===C.overflowX),x=_<S&&("auto"===C.overflowY||"scroll"===C.overflowY||"visible"===C.overflowY)):(w=b<A&&("auto"===C.overflowX||"scroll"===C.overflowX),x=_<S&&("auto"===C.overflowY||"scroll"===C.overflowY));var k=w&&(Math.abs(y-o)<=u&&I+b<A)-(Math.abs(m-o)<=u&&!!I),O=x&&(Math.abs(g-a)<=u&&E+_<S)-(Math.abs(v-a)<=u&&!!E);if(!ar[f])for(var D=0;D<=f;D++)ar[D]||(ar[D]={});ar[f].vx==k&&ar[f].vy==O&&ar[f].el===p||(ar[f].el=p,ar[f].vx=k,ar[f].vy=O,clearInterval(ar[f].pid),0==k&&0==O||(c=!0,ar[f].pid=setInterval(function(){r&&0===this.layer&&zn.active._onTouchMove(ir);var e=ar[this.layer].vy?ar[this.layer].vy*l:0,n=ar[this.layer].vx?ar[this.layer].vx*l:0;"function"===typeof i&&"continue"!==i.call(zn.dragged.parentNode[Le],n,e,t,ir,ar[this.layer].el)||je(ar[this.layer].el,n,e)}.bind({layer:f}),24))),f++}while(e.bubbleScroll&&d!==s&&(d=Oe(d,!1)));ur=c}},30),dr=function(t){var e=t.originalEvent,n=t.putSortable,r=t.dragEl,i=t.activeSortable,o=t.dispatchSortableEvent,a=t.hideGhostForTarget,u=t.unhideGhostForTarget;if(e){var l=n||i;a();var s=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(s.clientX,s.clientY);u(),l&&!l.el.contains(c)&&(o("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function pr(){}function hr(){}pr.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 r=Se(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:dr},Ht(pr,{pluginName:"revertOnSpill"}),hr.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable,r=n||this.sortable;r.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),r.animateAll()},drop:dr},Ht(hr,{pluginName:"removeOnSpill"});zn.mount(new lr),zn.mount(hr,pr);var vr=zn,gr={name:"DTable",components:(0,p.A)((0,p.A)({},x),{},{ColumnRender:b}),props:{data:{type:Array,default:function(){return[]}},rowKey:{type:String,default:""},border:{type:Boolean,default:!0},requestConfig:{type:Object,required:!1,default:function(){return{api:function(){},params:{},autoRequest:!0,method:null}}},layout:{type:String,default:"total, sizes, prev, pager, next, jumper"},pageSizes:{type:Array,default:function(){return[10,20,30,50]}},background:{type:Boolean,default:!0},pagination:{default:!0,type:Boolean},draggable:{default:!1,type:Boolean},selection:{default:!1,type:Boolean},asyncSelection:{default:!1,type:Boolean},defaultCheckList:{default:function(){return[]},type:Array},index:{default:!1,type:Boolean},columns:{default:function(){return[]},type:Array},staticPaging:{default:!1,type:Boolean}},data:function(){return{pageSize:10,pageNum:1,total:0,loading:!1,checkedList:[],ids:[],key:0,list:[],totalList:[]}},computed:{visibleColumns:function(){return this.columns.filter(function(t){return!t.hide})}},watch:{data:{handler:function(t){var e=this;JSON.stringify(t)!==JSON.stringify(this.list)&&(this.handleRequestData(t),this.draggable&&this.$nextTick(function(){e.initSortable()}))},deep:!0,immediate:!0},defaultCheckList:{handler:function(){this.handleSelectionData()},deep:!0}},mounted:function(){this.draggable&&!this.rowKey&&console.error("[DTable] 请设置正确的 rowKey 用于拖拽排序"),this.checkedList=this.defaultCheckList,this.pagination||(this.pageSize=9999999),this.draggable&&this.initSortable(),this.staticPaging||!this.requestConfig.autoRequest&&void 0!==this.requestConfig.autoRequest||this.search()},methods:{search:function(){var t=arguments,e=this;return(0,T.A)((0,B.A)().m(function n(){var r,i,o,a,u;return(0,B.A)().w(function(n){while(1)switch(n.n){case 0:return r=t.length>0&&void 0!==t[0]?t[0]:{},e.loading=!0,n.p=1,r.pageNum&&(e.pageNum=r.pageNum),r.pageSize&&(e.pageSize=r.pageSize),n.n=2,(e.requestConfig.method||e.getData)((0,p.A)((0,p.A)({pageSize:e.pageSize,pageNum:e.pageNum},e.requestConfig.params),r));case 2:i=n.v,o=i.total,a=i.data,e.total=o,e.handleRequestData(a),n.n=4;break;case 3:n.p=3,u=n.v,console.error(u);case 4:e.loading=!1;case 5:return n.a(2)}},n,null,[[1,3]])}))()},getData:function(t){var e=this;return(0,T.A)((0,B.A)().m(function n(){var r,i,o,a;return(0,B.A)().w(function(n){while(1)switch(n.n){case 0:return r="function"===typeof e.requestConfig.params?e.requestConfig.params():e.requestConfig.params,n.n=1,e.requestConfig.api((0,p.A)((0,p.A)({},r),t));case 1:return i=n.v,o=i.data,e.total=o.total,a=o.list||[],e.requestConfig.props&&(null===e.requestConfig.props.list?a=o:e.requestConfig.props.list&&(a=o[e.requestConfig.props.list])),n.a(2,{total:o.total,data:a})}},n)}))()},handleRequestData:function(t){return this.staticPaging?(this.totalList=(0,U.cloneDeep)(t),this.total=this.totalList.length):this.list=(0,U.cloneDeep)(t),this.staticPaging?(this.pageNum=1,void this.calcStaticPageData()):(this.$emit("loaded",this.list),0===this.list.length&&this.pageNum>1?(this.pageNum=this.pageNum-1,void this.search()):void((this.asyncSelection||this.selection)&&(this.key++,this.handleSelectionData())))},handleSelectionData:function(){var t=this;if(this.checkedList=this.defaultCheckList,this.$refs.table&&this.$refs.table.clearSelection(),this.checkedList.length){var e=this.checkedList.map(function(e){return e[t.rowKey]}),n=this.list.filter(function(n){return e.includes(n[t.rowKey])});this.$nextTick(function(){n.forEach(function(e){t.$refs.table.toggleRowSelection(e,!0)})})}},calcStaticPageData:function(){var t=JSON.parse(JSON.stringify(this.totalList));this.list=t.splice((this.pageNum-1)*this.pageSize,this.pageSize)},handleSizeChange:function(t){this.pageSize=t,this.pageNum=1,this.staticPaging?this.calcStaticPageData():this.search(),this.$emit("page-change",{size:this.pageSize,page:this.pageNum})},handleCurrentChange:function(t){this.pageNum=t,this.staticPaging?this.calcStaticPageData():this.search(),this.$emit("page-change",{size:this.pageSize,page:this.pageNum})},selectChange:function(t,e){var n=this;this.asyncSelection?(t.some(function(t){return t[n.rowKey]===e[n.rowKey]})?this.checkedList.push(e):this.checkedList=this.checkedList.filter(function(t){return t[n.rowKey]!==e[n.rowKey]}),this.$emit("select-change",(0,U.cloneDeep)(this.checkedList))):this.$emit("select-change",t)},selectAllChange:function(t){var e=this;if(this.asyncSelection){if(t.length){var n=this.checkedList.map(function(t){return t[e.rowKey]}),r=t.filter(function(t){return!n.includes(t[e.rowKey])});this.checkedList=this.checkedList.concat(r)}else{var i=this.list.map(function(t){return t[e.rowKey]});this.checkedList=this.checkedList.filter(function(t){return!i.includes(t[e.rowKey])})}this.$emit("select-change",(0,U.cloneDeep)(this.checkedList))}else this.$emit("select-change",t)},selectionChange:function(){},clearSelection:function(){this.checkedList=[],this.$refs.table.clearSelection()},toggleAsyncSelection:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.checkedList=this.checkedList.filter(function(n){return n[e.rowKey]!==t});var r=this.list.find(function(n){return n[e.rowKey]===t});r?this.$refs.table.toggleRowSelection(r,n):this.$emit("select-change",this.checkedList)},initSortable:function(){var t=this,e=this.$refs.table.$el.querySelector(".el-table__body-wrapper > table > tbody");new vr(e,{handle:".d-table-drag-icon",onEnd:function(e){var n=t.list.splice(e.oldIndex,1)[0];t.list.splice(e.newIndex,0,n),t.$nextTick(function(){t.initSortable(),t.handleSelectionData(),t.$emit("drag-change",t.list,e)})}})}}},mr=gr,yr=(r(1140),(0,c.A)(mr,Wt,Vt,!1,null,null,null)),br=yr.exports,_r={name:"DSearchTable",components:{SearchForm:Lt,DTable:br},props:{config:{type:Object,default:function(){return{searchConfig:[],requestConfig:{},columns:[]}}},data:{type:Array,default:function(){return[]}}},data:function(){return{form:{}}},computed:{requestConfig:function(){var t=this.config.requestConfig;return(0,p.A)((0,p.A)({},t),{},{params:"function"===typeof t.params?t.params((0,U.cloneDeep)(this.form)):(0,p.A)((0,p.A)({},this.form),t.params)})}},created:function(){this.createFormBind()},methods:{createFormBind:function(){var t={};(this.config.searchConfig||[]).forEach(function(e){t[e.prop]=e.defaultValue||""}),this.form=t},search:function(t){this.$refs.dTable.search(t)},searchData:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pageNum:1};this.$nextTick(function(){t.search(e)})}}},wr=_r,xr=(r(7112),(0,c.A)(wr,Yt,$t,!1,null,null,null)),Ar=xr.exports,Sr=r(95),Cr=r(4163),Ir=function(){var t=this,e=t._self._c;return e("div",[e("el-select",t._g(t._b({model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},"el-select",t.$attrs,!1),(0,p.A)((0,p.A)({},t.$listeners),{},{change:t.onChange})),[t._l(t.options,function(t){return e("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}),e("template",{slot:"prefix"},[t._t("prefix")],2),e("template",{slot:"empty"},[t._t("empty")],2)],2)],1)},Er=[],kr={name:"DSelect",components:{},model:{prop:"modelValue",event:"modelChange"},props:{modelValue:{type:[String,Number,Array],default:""},options:{type:Array,default:function(){return[]}}},data:function(){return{}},computed:{value:{get:function(){return this.modelValue},set:function(t){this.$emit("modelChange",t)}}},watch:{},created:function(){},methods:{onChange:function(t){var e;e=Array.isArray(t)?this.options.filter(function(e){return t.includes(e.value)})||[]:this.options.find(function(e){return t===e.value})||{},this.$emit("change",t,e)}}},Or=kr,Dr=(0,c.A)(Or,Ir,Er,!1,null,null,null),Br=Dr.exports,Tr=function(){var t=this,e=t._self._c;return e("el-checkbox-group",t._g(t._b({model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},"el-checkbox-group",t.$attrs,!1),t.$listeners),t._l(t.options,function(n){return e("el-checkbox",{key:n.value,attrs:{label:n.value}},[t._v(" "+t._s(n.label)+" ")])}),1)},Rr=[],jr={name:"DCheckboxGroup",components:{},model:{prop:"modelValue",event:"modelChange"},props:{modelValue:{type:Array,default:function(){return[]}},options:{type:Array,default:function(){return[]}}},data:function(){return{}},computed:{value:{get:function(){return this.modelValue},set:function(t){this.$emit("modelChange",t)}}},watch:{},created:function(){},methods:{}},Mr=jr,Nr=(0,c.A)(Mr,Tr,Rr,!1,null,null,null),Lr=Nr.exports,Fr=function(){var t=this,e=t._self._c;return e("el-radio-group",t._g(t._b({model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},"el-radio-group",t.$attrs,!1),t.$listeners),t._l(t.options,function(n){return e("el-radio",{key:n.value,attrs:{label:n.value}},[t._v(" "+t._s(n.label)+" ")])}),1)},Pr=[],Qr={name:"DRadioGroup",components:{},model:{prop:"modelValue",event:"modelChange"},props:{modelValue:{type:[String,Number],default:""},options:{type:Array,default:function(){return[]}}},data:function(){return{}},computed:{value:{get:function(){return this.modelValue},set:function(t){this.$emit("modelChange",t)}}},watch:{},created:function(){},methods:{}},zr=Qr,Ur=(0,c.A)(zr,Fr,Pr,!1,null,null,null),Kr=Ur.exports,Yr=r(3520),$r=function(){var t=this,e=t._self._c;return e("d-dialog",{attrs:{"form-refs":"importForm",width:t.width,title:t.title,"submit-btn-text":"导入","submit-btn-icon":"el-icon-upload2"},on:{submit:t.submit},model:{value:t.visible,callback:function(e){t.visible=e},expression:"visible"}},[e("el-form",{ref:"importForm",attrs:{model:t.form,inline:!0}},[e("el-form-item",{staticClass:"import-form-item",attrs:{prop:"file",label:"选择文件",rules:[{required:!0,message:"请选择文件"}]}},[e("div",{staticClass:"d-import__custom-file-input"},[e("div",{staticClass:"d-import__custom-file-content"},[t._v(" "+t._s(t.form.file?t.form.file.name:"请选择")+" ")]),e("el-upload",{attrs:{"file-list":t.fileList,"show-file-list":!1,"auto-upload":!1,action:"","on-change":t.uploadChange}},[e("el-button",{attrs:{type:"primary",icon:"el-icon-folder"}})],1)],1)]),e("el-button",{directives:[{name:"show",rawName:"v-show",value:t.templateUrl||t.templateDownloadMethod,expression:"templateUrl || templateDownloadMethod"}],attrs:{icon:"el-icon-paperclip",type:"text"},on:{click:t.downloadFile}},[t._v(" 模板下载 ")])],1),t.slotRender?e("div",[e("d-render",{attrs:{render:t.slotRender}})],1):e("div",[e("p",[t._v("1. 支持导入格式为"+t._s(t.fileType.join("、"))+"的文件,且文件大小不可超过"+t._s(t.fileSize)+"M")]),e("p",[t._v("2. 模板的表头不可更改,不可删除")]),e("p",[t._v("3. 若导入数据存在编码一致的情况则会更新原有数据")]),e("p",[t._v("4. 若导入过程中有问题,需调整模板内容后再重新导入")])])],1)},Wr=[],Vr={name:"DImportFile",components:{DDialog:E.A,DRender:b},props:{value:{default:!1,type:Boolean},width:{default:"520px",type:String},title:{default:"",type:String},templateUrl:{default:"",type:String},token:{default:"",type:String},templateDownloadMethod:{type:Function,default:null},fileType:{default:function(){return["xlsx","xls"]},type:Array},fileSize:{default:5,type:Number},slotRender:{default:null,type:Function}},data:function(){return{visible:!1,fileList:[],form:{file:""}}},watch:{value:{handler:function(t){this.visible=t}},visible:{handler:function(t){t||this.$emit("close",t)}}},methods:{downloadFile:function(){this.templateDownloadMethod?this.templateDownloadMethod():window.location.href="".concat(this.templateUrl,"?authToken=").concat(this.token)},uploadChange:function(t,e){var n=t.size/1024/1024<this.fileSize,r=this.fileType.includes(t.name.substr(t.name.lastIndexOf(".")+1).toLocaleLowerCase());return r?n?(this.fileList=e,void(this.form.file=t.raw)):(this.$message.error("上传文件大小不能超过".concat(this.fileSize,"MB")),!1):(this.$message.error("请上传正确的文件格式(".concat(this.fileType.join("、"),")")),!1)},submit:function(t){var e=this;return(0,T.A)((0,B.A)().m(function n(){return(0,B.A)().w(function(n){while(1)switch(n.n){case 0:if(e.form.file){n.n=1;break}return e.$message.error("请选择导入文件"),t(new Error(!1)),n.a(2);case 1:try{e.$emit("submit",t,e.form.file)}catch(r){t(new Error(!1))}case 2:return n.a(2)}},n)}))()}}},qr=Vr,Gr=(r(1798),(0,c.A)(qr,$r,Wr,!1,null,null,null)),Jr=Gr.exports,Xr=function(t){t.prototype.$preview=function(e){var n=e.defaultIndex,r=void 0===n?0:n,i=e.list,o=void 0===i?[]:i,a=t.extend(Yr.A),u=new a;document.body.appendChild(u.$mount().$el),u.value=!0,u.defaultIndex=r,u.list=o},t.prototype.$importFile=function(e){var n=e.width,r=void 0===n?"520px":n,i=e.title,o=void 0===i?"文件导入":i,a=e.templateUrl,u=void 0===a?"":a,l=e.token,s=void 0===l?"":l,c=e.templateDownloadMethod,f=void 0===c?null:c,d=e.fileType,p=void 0===d?["xlsx","xls"]:d,h=e.fileSize,v=void 0===h?5:h,g=e.slotRender,m=void 0===g?null:g;return new Promise(function(e,n){var i=t.extend(Jr),a=new i,l=a.$mount().$el;document.body.appendChild(l),a.value=!0,a.width=r,a.title=o,a.templateUrl=u,a.token=s,a.templateDownloadMethod=f,a.fileType=p,a.fileSize=v,a.slotRender=m;var c=function(){a.$destroy(),l.parentNode&&l.parentNode.removeChild(l)};a.$on("submit",function(){var t=(0,T.A)((0,B.A)().m(function t(n,r){return(0,B.A)().w(function(t){while(1)switch(t.n){case 0:try{e(n,r)}catch(i){n(new Error(i))}case 1:return t.a(2)}},t)}));return function(e,n){return t.apply(this,arguments)}}()),a.$on("close",function(){n(new Error("cancelled")),t.nextTick(c)})})}},Hr=[d,I,E.A,k.A,N,X,pt,st,Ct,Bt,b,Lt,Kt,Ar,Sr.A,br,Cr.A,Br,Lr,Kr],Zr=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.prototype.$DDWL={upload:e.upload,enum:e.enum},Zr.installed||(Hr.forEach(function(e){return t.component(e.name,e)}),Xr(t))};"undefined"!==typeof window&&window.Vue&&Zr(window.Vue);var ti={install:Zr},ei=ti}(),i}()});
18
+ function qt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Gt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?qt(Object(n),!0).forEach(function(e){Xt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Jt(t){return Jt="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},Jt(t)}function Xt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ht(){return Ht=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ht.apply(this,arguments)}function Zt(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}function te(t,e){if(null==t)return{};var n,r,i=Zt(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var ee="1.15.6";function ne(t){if("undefined"!==typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var re=ne(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ie=ne(/Edge/i),oe=ne(/firefox/i),ae=ne(/safari/i)&&!ne(/chrome/i)&&!ne(/android/i),ue=ne(/iP(ad|od|hone)/i),le=ne(/chrome/i)&&ne(/android/i),se={capture:!1,passive:!1};function ce(t,e,n){t.addEventListener(e,n,!re&&se)}function fe(t,e,n){t.removeEventListener(e,n,!re&&se)}function de(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 pe(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function he(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&de(t,e):de(t,e))||r&&t===n)return t;if(t===n)break}while(t=pe(t))}return null}var ve,ge=/\s+/g;function me(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(ge," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(ge," ")}}function ye(t,e,n){var r=t&&t.style;if(r){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 r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"===typeof n?"":"px")}}function be(t,e){var n="";if("string"===typeof t)n=t;else do{var r=ye(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function _e(t,e,n){if(t){var r=t.getElementsByTagName(e),i=0,o=r.length;if(n)for(;i<o;i++)n(r[i],i);return r}return[]}function we(){var t=document.scrollingElement;return t||document.documentElement}function xe(t,e,n,r,i){if(t.getBoundingClientRect||t===window){var o,a,u,l,s,c,f;if(t!==window&&t.parentNode&&t!==we()?(o=t.getBoundingClientRect(),a=o.top,u=o.left,l=o.bottom,s=o.right,c=o.height,f=o.width):(a=0,u=0,l=window.innerHeight,s=window.innerWidth,c=window.innerHeight,f=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!re))do{if(i&&i.getBoundingClientRect&&("none"!==ye(i,"transform")||n&&"static"!==ye(i,"position"))){var d=i.getBoundingClientRect();a-=d.top+parseInt(ye(i,"border-top-width")),u-=d.left+parseInt(ye(i,"border-left-width")),l=a+o.height,s=u+o.width;break}}while(i=i.parentNode);if(r&&t!==window){var p=be(i||t),h=p&&p.a,v=p&&p.d;p&&(a/=v,u/=h,f/=h,c/=v,l=a+c,s=u+f)}return{top:a,left:u,bottom:l,right:s,width:f,height:c}}}function Ae(t,e,n){var r=Oe(t,!0),i=xe(t)[e];while(r){var o=xe(r)[n],a=void 0;if(a="top"===n||"left"===n?i>=o:i<=o,!a)return r;if(r===we())break;r=Oe(r,!1)}return!1}function Se(t,e,n,r){var i=0,o=0,a=t.children;while(o<a.length){if("none"!==a[o].style.display&&a[o]!==zn.ghost&&(r||a[o]!==zn.dragged)&&he(a[o],n.draggable,t,!1)){if(i===e)return a[o];i++}o++}return null}function Ce(t,e){var n=t.lastElementChild;while(n&&(n===zn.ghost||"none"===ye(n,"display")||e&&!de(n,e)))n=n.previousElementSibling;return n||null}function Ie(t,e){var n=0;if(!t||!t.parentNode)return-1;while(t=t.previousElementSibling)"TEMPLATE"===t.nodeName.toUpperCase()||t===zn.clone||e&&!de(t,e)||n++;return n}function Ee(t){var e=0,n=0,r=we();if(t)do{var i=be(t),o=i.a,a=i.d;e+=t.scrollLeft*o,n+=t.scrollTop*a}while(t!==r&&(t=t.parentNode));return[e,n]}function ke(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n);return-1}function Oe(t,e){if(!t||!t.getBoundingClientRect)return we();var n=t,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=ye(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 we();if(r||e)return n;r=!0}}}while(n=n.parentNode);return we()}function De(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Be(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 Te(t,e){return function(){if(!ve){var n=arguments,r=this;1===n.length?t.call(r,n[0]):t.apply(r,n),ve=setTimeout(function(){ve=void 0},e)}}}function Re(){clearTimeout(ve),ve=void 0}function je(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function Me(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)}function Ne(t,e,n){var r={};return Array.from(t.children).forEach(function(i){var o,a,u,l;if(he(i,e.draggable,t,!1)&&!i.animated&&i!==n){var s=xe(i);r.left=Math.min(null!==(o=r.left)&&void 0!==o?o:1/0,s.left),r.top=Math.min(null!==(a=r.top)&&void 0!==a?a:1/0,s.top),r.right=Math.max(null!==(u=r.right)&&void 0!==u?u:-1/0,s.right),r.bottom=Math.max(null!==(l=r.bottom)&&void 0!==l?l:-1/0,s.bottom)}}),r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}var Le="Sortable"+(new Date).getTime();function Fe(){var t,e=[];return{captureAnimationState:function(){if(e=[],this.options.animation){var t=[].slice.call(this.el.children);t.forEach(function(t){if("none"!==ye(t,"display")&&t!==zn.ghost){e.push({target:t,rect:xe(t)});var n=Gt({},e[e.length-1].rect);if(t.thisAnimationDuration){var r=be(t,!0);r&&(n.top-=r.f,n.left-=r.e)}t.fromRect=n}})}},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(ke(e,{target:t}),1)},animateAll:function(n){var r=this;if(!this.options.animation)return clearTimeout(t),void("function"===typeof n&&n());var i=!1,o=0;e.forEach(function(t){var e=0,n=t.target,a=n.fromRect,u=xe(n),l=n.prevFromRect,s=n.prevToRect,c=t.rect,f=be(n,!0);f&&(u.top-=f.f,u.left-=f.e),n.toRect=u,n.thisAnimationDuration&&Be(l,u)&&!Be(a,u)&&(c.top-u.top)/(c.left-u.left)===(a.top-u.top)/(a.left-u.left)&&(e=Qe(c,l,s,r.options)),Be(u,a)||(n.prevFromRect=a,n.prevToRect=u,e||(e=r.options.animation),r.animate(n,c,u,e)),e&&(i=!0,o=Math.max(o,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()},o):"function"===typeof n&&n(),e=[]},animate:function(t,e,n,r){if(r){ye(t,"transition",""),ye(t,"transform","");var i=be(this.el),o=i&&i.a,a=i&&i.d,u=(e.left-n.left)/(o||1),l=(e.top-n.top)/(a||1);t.animatingX=!!u,t.animatingY=!!l,ye(t,"transform","translate3d("+u+"px,"+l+"px,0)"),this.forRepaintDummy=Pe(t),ye(t,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),ye(t,"transform","translate3d(0,0,0)"),"number"===typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout(function(){ye(t,"transition",""),ye(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1},r)}}}}function Pe(t){return t.offsetWidth}function Qe(t,e,n,r){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))*r.animation}var ze=[],Ue={initializeByDefault:!0},Ke={mount:function(t){for(var e in Ue)Ue.hasOwnProperty(e)&&!(e in t)&&(t[e]=Ue[e]);ze.forEach(function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),ze.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var i=t+"Global";ze.forEach(function(r){e[r.pluginName]&&(e[r.pluginName][i]&&e[r.pluginName][i](Gt({sortable:e},n)),e.options[r.pluginName]&&e[r.pluginName][t]&&e[r.pluginName][t](Gt({sortable:e},n)))})},initializePlugins:function(t,e,n,r){for(var i in ze.forEach(function(r){var i=r.pluginName;if(t.options[i]||r.initializeByDefault){var o=new r(t,e,t.options);o.sortable=t,o.options=t.options,t[i]=o,Ht(n,o.defaults)}}),t.options)if(t.options.hasOwnProperty(i)){var o=this.modifyOption(t,i,t.options[i]);"undefined"!==typeof o&&(t.options[i]=o)}},getEventProperties:function(t,e){var n={};return ze.forEach(function(r){"function"===typeof r.eventProperties&&Ht(n,r.eventProperties.call(e[r.pluginName],t))}),n},modifyOption:function(t,e,n){var r;return ze.forEach(function(i){t[i.pluginName]&&i.optionListeners&&"function"===typeof i.optionListeners[e]&&(r=i.optionListeners[e].call(t[i.pluginName],n))}),r}};function Ye(t){var e=t.sortable,n=t.rootEl,r=t.name,i=t.targetEl,o=t.cloneEl,a=t.toEl,u=t.fromEl,l=t.oldIndex,s=t.newIndex,c=t.oldDraggableIndex,f=t.newDraggableIndex,d=t.originalEvent,p=t.putSortable,h=t.extraEventProperties;if(e=e||n&&n[Le],e){var v,g=e.options,m="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||re||ie?(v=document.createEvent("Event"),v.initEvent(r,!0,!0)):v=new CustomEvent(r,{bubbles:!0,cancelable:!0}),v.to=a||n,v.from=u||n,v.item=i||n,v.clone=o,v.oldIndex=l,v.newIndex=s,v.oldDraggableIndex=c,v.newDraggableIndex=f,v.originalEvent=d,v.pullMode=p?p.lastPutMode:void 0;var y=Gt(Gt({},h),Ke.getEventProperties(r,e));for(var b in y)v[b]=y[b];n&&n.dispatchEvent(v),g[m]&&g[m].call(e,v)}}var $e=["evt"],We=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,i=te(n,$e);Ke.pluginEvent.bind(zn)(t,e,Gt({dragEl:qe,parentEl:Ge,ghostEl:Je,rootEl:Xe,nextEl:He,lastDownEl:Ze,cloneEl:tn,cloneHidden:en,dragStarted:vn,putSortable:ln,activeSortable:zn.active,originalEvent:r,oldIndex:nn,oldDraggableIndex:on,newIndex:rn,newDraggableIndex:an,hideGhostForTarget:Ln,unhideGhostForTarget:Fn,cloneNowHidden:function(){en=!0},cloneNowShown:function(){en=!1},dispatchSortableEvent:function(t){Ve({sortable:e,name:t,originalEvent:r})}},i))};function Ve(t){Ye(Gt({putSortable:ln,cloneEl:tn,targetEl:qe,rootEl:Xe,oldIndex:nn,oldDraggableIndex:on,newIndex:rn,newDraggableIndex:an},t))}var qe,Ge,Je,Xe,He,Ze,tn,en,nn,rn,on,an,un,ln,sn,cn,fn,dn,pn,hn,vn,gn,mn,yn,bn,_n=!1,wn=!1,xn=[],An=!1,Sn=!1,Cn=[],In=!1,En=[],kn="undefined"!==typeof document,On=ue,Dn=ie||re?"cssFloat":"float",Bn=kn&&!le&&!ue&&"draggable"in document.createElement("div"),Tn=function(){if(kn){if(re)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Rn=function(t,e){var n=ye(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=Se(t,0,e),o=Se(t,1,e),a=i&&ye(i),u=o&&ye(o),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+xe(i).width,s=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+xe(o).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 c="left"===a["float"]?"left":"right";return!o||"both"!==u.clear&&u.clear!==c?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=r&&"none"===n[Dn]||o&&"none"===n[Dn]&&l+s>r)?"vertical":"horizontal"},jn=function(t,e,n){var r=n?t.left:t.top,i=n?t.right:t.bottom,o=n?t.width:t.height,a=n?e.left:e.top,u=n?e.right:e.bottom,l=n?e.width:e.height;return r===a||i===u||r+o/2===a+l/2},Mn=function(t,e){var n;return xn.some(function(r){var i=r[Le].options.emptyInsertThreshold;if(i&&!Ce(r)){var o=xe(r),a=t>=o.left-i&&t<=o.right+i,u=e>=o.top-i&&e<=o.bottom+i;return a&&u?n=r:void 0}}),n},Nn=function(t){function e(t,n){return function(r,i,o,a){var u=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;if(null==t&&(n||u))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"===typeof t)return e(t(r,i,o,a),n)(r,i,o,a);var l=(n?r:i).options.group.name;return!0===t||"string"===typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},r=t.group;r&&"object"==Jt(r)||(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},Ln=function(){!Tn&&Je&&ye(Je,"display","none")},Fn=function(){!Tn&&Je&&ye(Je,"display","")};kn&&!le&&document.addEventListener("click",function(t){if(wn)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),wn=!1,!1},!0);var Pn=function(t){if(qe){t=t.touches?t.touches[0]:t;var e=Mn(t.clientX,t.clientY);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[Le]._onDragOver(n)}}},Qn=function(t){qe&&qe.parentNode[Le]._isOutsideThisEl(t.target)};function zn(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=Ht({},e),t[Le]=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 Rn(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!==zn.supportPointer&&"PointerEvent"in window&&(!ae||ue),emptyInsertThreshold:5};for(var r in Ke.initializePlugins(this,t,n),n)!(r in e)&&(e[r]=n[r]);for(var i in Nn(e),this)"_"===i.charAt(0)&&"function"===typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&Bn,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?ce(t,"pointerdown",this._onTapStart):(ce(t,"mousedown",this._onTapStart),ce(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(ce(t,"dragover",this),ce(t,"dragenter",this)),xn.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Ht(this,Fe())}function Un(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function Kn(t,e,n,r,i,o,a,u){var l,s,c=t[Le],f=c.options.onMove;return!window.CustomEvent||re||ie?(l=document.createEvent("Event"),l.initEvent("move",!0,!0)):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=r,l.related=i||e,l.relatedRect=o||xe(e),l.willInsertAfter=u,l.originalEvent=a,t.dispatchEvent(l),f&&(s=f.call(c,l,a)),s}function Yn(t){t.draggable=!1}function $n(){In=!1}function Wn(t,e,n){var r=xe(Se(n.el,0,n.options,!0)),i=Ne(n.el,n.options,Je),o=10;return e?t.clientX<i.left-o||t.clientY<r.top&&t.clientX<r.right:t.clientY<i.top-o||t.clientY<r.bottom&&t.clientX<r.left}function Vn(t,e,n){var r=xe(Ce(n.el,n.options.draggable)),i=Ne(n.el,n.options,Je),o=10;return e?t.clientX>i.right+o||t.clientY>r.bottom&&t.clientX>r.left:t.clientY>i.bottom+o||t.clientX>r.right&&t.clientY>r.top}function qn(t,e,n,r,i,o,a,u){var l=r?t.clientY:t.clientX,s=r?n.height:n.width,c=r?n.top:n.left,f=r?n.bottom:n.right,d=!1;if(!a)if(u&&yn<s*i){if(!An&&(1===mn?l>c+s*o/2:l<f-s*o/2)&&(An=!0),An)d=!0;else if(1===mn?l<c+yn:l>f-yn)return-mn}else if(l>c+s*(1-i)/2&&l<f-s*(1-i)/2)return Gn(e);return d=d||a,d&&(l<c+s*o/2||l>f-s*o/2)?l>c+s/2?1:-1:0}function Gn(t){return Ie(qe)<Ie(t)?1:-1}function Jn(t){var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;while(n--)r+=e.charCodeAt(n);return r.toString(36)}function Xn(t){En.length=0;var e=t.getElementsByTagName("input"),n=e.length;while(n--){var r=e[n];r.checked&&En.push(r)}}function Hn(t){return setTimeout(t,0)}function Zn(t){return clearTimeout(t)}zn.prototype={constructor:zn,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(gn=null)},_getDirection:function(t,e){return"function"===typeof this.options.direction?this.options.direction.call(this,t,e,qe):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,i=r.preventOnFilter,o=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,u=(a||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||u,s=r.filter;if(Xn(n),!qe&&!(/mousedown|pointerdown/.test(o)&&0!==t.button||r.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!ae||!u||"SELECT"!==u.tagName.toUpperCase())&&(u=he(u,r.draggable,n,!1),(!u||!u.animated)&&Ze!==u)){if(nn=Ie(u),on=Ie(u,r.draggable),"function"===typeof s){if(s.call(this,t,u,this))return Ve({sortable:e,rootEl:l,name:"filter",targetEl:u,toEl:n,fromEl:n}),We("filter",e,{evt:t}),void(i&&t.preventDefault())}else if(s&&(s=s.split(",").some(function(r){if(r=he(l,r.trim(),n,!1),r)return Ve({sortable:e,rootEl:r,name:"filter",targetEl:u,fromEl:n,toEl:n}),We("filter",e,{evt:t}),!0}),s))return void(i&&t.preventDefault());r.handle&&!he(l,r.handle,n,!1)||this._prepareDragStart(t,a,u)}}},_prepareDragStart:function(t,e,n){var r,i=this,o=i.el,a=i.options,u=o.ownerDocument;if(n&&!qe&&n.parentNode===o){var l=xe(n);if(Xe=o,qe=n,Ge=qe.parentNode,He=qe.nextSibling,Ze=n,un=a.group,zn.dragged=qe,sn={target:qe,clientX:(e||t).clientX,clientY:(e||t).clientY},pn=sn.clientX-l.left,hn=sn.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,qe.style["will-change"]="all",r=function(){We("delayEnded",i,{evt:t}),zn.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!oe&&i.nativeDraggable&&(qe.draggable=!0),i._triggerDragStart(t,e),Ve({sortable:i,name:"choose",originalEvent:t}),me(qe,a.chosenClass,!0))},a.ignore.split(",").forEach(function(t){_e(qe,t.trim(),Yn)}),ce(u,"dragover",Pn),ce(u,"mousemove",Pn),ce(u,"touchmove",Pn),a.supportPointer?(ce(u,"pointerup",i._onDrop),!this.nativeDraggable&&ce(u,"pointercancel",i._onDrop)):(ce(u,"mouseup",i._onDrop),ce(u,"touchend",i._onDrop),ce(u,"touchcancel",i._onDrop)),oe&&this.nativeDraggable&&(this.options.touchStartThreshold=4,qe.draggable=!0),We("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(ie||re))r();else{if(zn.eventCanceled)return void this._onDrop();a.supportPointer?(ce(u,"pointerup",i._disableDelayedDrag),ce(u,"pointercancel",i._disableDelayedDrag)):(ce(u,"mouseup",i._disableDelayedDrag),ce(u,"touchend",i._disableDelayedDrag),ce(u,"touchcancel",i._disableDelayedDrag)),ce(u,"mousemove",i._delayedDragTouchMoveHandler),ce(u,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&ce(u,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(r,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(){qe&&Yn(qe),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;fe(t,"mouseup",this._disableDelayedDrag),fe(t,"touchend",this._disableDelayedDrag),fe(t,"touchcancel",this._disableDelayedDrag),fe(t,"pointerup",this._disableDelayedDrag),fe(t,"pointercancel",this._disableDelayedDrag),fe(t,"mousemove",this._delayedDragTouchMoveHandler),fe(t,"touchmove",this._delayedDragTouchMoveHandler),fe(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?ce(document,"pointermove",this._onTouchMove):ce(document,e?"touchmove":"mousemove",this._onTouchMove):(ce(qe,"dragend",this),ce(Xe,"dragstart",this._onDragStart));try{document.selection?Hn(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(_n=!1,Xe&&qe){We("dragStarted",this,{evt:e}),this.nativeDraggable&&ce(document,"dragover",Qn);var n=this.options;!t&&me(qe,n.dragClass,!1),me(qe,n.ghostClass,!0),zn.active=this,t&&this._appendGhost(),Ve({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(cn){this._lastX=cn.clientX,this._lastY=cn.clientY,Ln();var t=document.elementFromPoint(cn.clientX,cn.clientY),e=t;while(t&&t.shadowRoot){if(t=t.shadowRoot.elementFromPoint(cn.clientX,cn.clientY),t===e)break;e=t}if(qe.parentNode[Le]._isOutsideThisEl(t),e)do{if(e[Le]){var n=void 0;if(n=e[Le]._onDragOver({clientX:cn.clientX,clientY:cn.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=pe(e));Fn()}},_onTouchMove:function(t){if(sn){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,i=t.touches?t.touches[0]:t,o=Je&&be(Je,!0),a=Je&&o&&o.a,u=Je&&o&&o.d,l=On&&bn&&Ee(bn),s=(i.clientX-sn.clientX+r.x)/(a||1)+(l?l[0]-Cn[0]:0)/(a||1),c=(i.clientY-sn.clientY+r.y)/(u||1)+(l?l[1]-Cn[1]:0)/(u||1);if(!zn.active&&!_n){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(Je){o?(o.e+=s-(fn||0),o.f+=c-(dn||0)):o={a:1,b:0,c:0,d:1,e:s,f:c};var f="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");ye(Je,"webkitTransform",f),ye(Je,"mozTransform",f),ye(Je,"msTransform",f),ye(Je,"transform",f),fn=s,dn=c,cn=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Je){var t=this.options.fallbackOnBody?document.body:Xe,e=xe(qe,!0,On,!0,t),n=this.options;if(On){bn=t;while("static"===ye(bn,"position")&&"none"===ye(bn,"transform")&&bn!==document)bn=bn.parentNode;bn!==document.body&&bn!==document.documentElement?(bn===document&&(bn=we()),e.top+=bn.scrollTop,e.left+=bn.scrollLeft):bn=we(),Cn=Ee(bn)}Je=qe.cloneNode(!0),me(Je,n.ghostClass,!1),me(Je,n.fallbackClass,!0),me(Je,n.dragClass,!0),ye(Je,"transition",""),ye(Je,"transform",""),ye(Je,"box-sizing","border-box"),ye(Je,"margin",0),ye(Je,"top",e.top),ye(Je,"left",e.left),ye(Je,"width",e.width),ye(Je,"height",e.height),ye(Je,"opacity","0.8"),ye(Je,"position",On?"absolute":"fixed"),ye(Je,"zIndex","100000"),ye(Je,"pointerEvents","none"),zn.ghost=Je,t.appendChild(Je),ye(Je,"transform-origin",pn/parseInt(Je.style.width)*100+"% "+hn/parseInt(Je.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,r=t.dataTransfer,i=n.options;We("dragStart",this,{evt:t}),zn.eventCanceled?this._onDrop():(We("setupClone",this),zn.eventCanceled||(tn=Me(qe),tn.removeAttribute("id"),tn.draggable=!1,tn.style["will-change"]="",this._hideClone(),me(tn,this.options.chosenClass,!1),zn.clone=tn),n.cloneId=Hn(function(){We("clone",n),zn.eventCanceled||(n.options.removeCloneOnHide||Xe.insertBefore(tn,qe),n._hideClone(),Ve({sortable:n,name:"clone"}))}),!e&&me(qe,i.dragClass,!0),e?(wn=!0,n._loopId=setInterval(n._emulateDragOver,50)):(fe(document,"mouseup",n._onDrop),fe(document,"touchend",n._onDrop),fe(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",i.setData&&i.setData.call(n,r,qe)),ce(document,"drop",n),ye(qe,"transform","translateZ(0)")),_n=!0,n._dragStartId=Hn(n._dragStarted.bind(n,e,t)),ce(document,"selectstart",n),vn=!0,window.getSelection().removeAllRanges(),ae&&ye(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,r,i,o=this.el,a=t.target,u=this.options,l=u.group,s=zn.active,c=un===l,f=u.sort,d=ln||s,p=this,h=!1;if(!In){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),a=he(a,u.draggable,o,!0),O("dragOver"),zn.eventCanceled)return h;if(qe.contains(t.target)||a.animated&&a.animatingX&&a.animatingY||p._ignoreWhileAnimating===a)return B(!1);if(wn=!1,s&&!u.disabled&&(c?f||(r=Ge!==Xe):ln===this||(this.lastPutMode=un.checkPull(this,s,qe,t))&&l.checkPut(this,s,qe,t))){if(i="vertical"===this._getDirection(t,a),e=xe(qe),O("dragOverValid"),zn.eventCanceled)return h;if(r)return Ge=Xe,D(),this._hideClone(),O("revert"),zn.eventCanceled||(He?Xe.insertBefore(qe,He):Xe.appendChild(qe)),B(!0);var v=Ce(o,u.draggable);if(!v||Vn(t,i,this)&&!v.animated){if(v===qe)return B(!1);if(v&&o===t.target&&(a=v),a&&(n=xe(a)),!1!==Kn(Xe,o,qe,e,a,n,t,!!a))return D(),v&&v.nextSibling?o.insertBefore(qe,v.nextSibling):o.appendChild(qe),Ge=o,T(),B(!0)}else if(v&&Wn(t,i,this)){var g=Se(o,0,u,!0);if(g===qe)return B(!1);if(a=g,n=xe(a),!1!==Kn(Xe,o,qe,e,a,n,t,!1))return D(),o.insertBefore(qe,g),Ge=o,T(),B(!0)}else if(a.parentNode===o){n=xe(a);var m,y,b=0,_=qe.parentNode!==o,w=!jn(qe.animated&&qe.toRect||e,a.animated&&a.toRect||n,i),x=i?"top":"left",A=Ae(a,"top","top")||Ae(qe,"top","top"),S=A?A.scrollTop:void 0;if(gn!==a&&(m=n[x],An=!1,Sn=!w&&u.invertSwap||_),b=qn(t,a,n,i,w?1:u.swapThreshold,null==u.invertedSwapThreshold?u.swapThreshold:u.invertedSwapThreshold,Sn,gn===a),0!==b){var C=Ie(qe);do{C-=b,y=Ge.children[C]}while(y&&("none"===ye(y,"display")||y===Je))}if(0===b||y===a)return B(!1);gn=a,mn=b;var I=a.nextElementSibling,E=!1;E=1===b;var k=Kn(Xe,o,qe,e,a,n,t,E);if(!1!==k)return 1!==k&&-1!==k||(E=1===k),In=!0,setTimeout($n,30),D(),E&&!I?o.appendChild(qe):a.parentNode.insertBefore(qe,E?I:a),A&&je(A,0,S-A.scrollTop),Ge=qe.parentNode,void 0===m||Sn||(yn=Math.abs(m-xe(a)[x])),T(),B(!0)}if(o.contains(qe))return B(!1)}return!1}function O(u,l){We(u,p,Gt({evt:t,isOwner:c,axis:i?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:f,fromSortable:d,target:a,completed:B,onMove:function(n,r){return Kn(Xe,o,qe,e,n,xe(n),t,r)},changed:T},l))}function D(){O("dragOverAnimationCapture"),p.captureAnimationState(),p!==d&&d.captureAnimationState()}function B(e){return O("dragOverCompleted",{insertion:e}),e&&(c?s._hideClone():s._showClone(p),p!==d&&(me(qe,ln?ln.options.ghostClass:s.options.ghostClass,!1),me(qe,u.ghostClass,!0)),ln!==p&&p!==zn.active?ln=p:p===zn.active&&ln&&(ln=null),d===p&&(p._ignoreWhileAnimating=a),p.animateAll(function(){O("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(a===qe&&!qe.animated||a===o&&!a.animated)&&(gn=null),u.dragoverBubble||t.rootEl||a===document||(qe.parentNode[Le]._isOutsideThisEl(t.target),!e&&Pn(t)),!u.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),h=!0}function T(){rn=Ie(qe),an=Ie(qe,u.draggable),Ve({sortable:p,name:"change",toEl:o,newIndex:rn,newDraggableIndex:an,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){fe(document,"mousemove",this._onTouchMove),fe(document,"touchmove",this._onTouchMove),fe(document,"pointermove",this._onTouchMove),fe(document,"dragover",Pn),fe(document,"mousemove",Pn),fe(document,"touchmove",Pn)},_offUpEvents:function(){var t=this.el.ownerDocument;fe(t,"mouseup",this._onDrop),fe(t,"touchend",this._onDrop),fe(t,"pointerup",this._onDrop),fe(t,"pointercancel",this._onDrop),fe(t,"touchcancel",this._onDrop),fe(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;rn=Ie(qe),an=Ie(qe,n.draggable),We("drop",this,{evt:t}),Ge=qe&&qe.parentNode,rn=Ie(qe),an=Ie(qe,n.draggable),zn.eventCanceled||(_n=!1,Sn=!1,An=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Zn(this.cloneId),Zn(this._dragStartId),this.nativeDraggable&&(fe(document,"drop",this),fe(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ae&&ye(document.body,"user-select",""),ye(qe,"transform",""),t&&(vn&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Je&&Je.parentNode&&Je.parentNode.removeChild(Je),(Xe===Ge||ln&&"clone"!==ln.lastPutMode)&&tn&&tn.parentNode&&tn.parentNode.removeChild(tn),qe&&(this.nativeDraggable&&fe(qe,"dragend",this),Yn(qe),qe.style["will-change"]="",vn&&!_n&&me(qe,ln?ln.options.ghostClass:this.options.ghostClass,!1),me(qe,this.options.chosenClass,!1),Ve({sortable:this,name:"unchoose",toEl:Ge,newIndex:null,newDraggableIndex:null,originalEvent:t}),Xe!==Ge?(rn>=0&&(Ve({rootEl:Ge,name:"add",toEl:Ge,fromEl:Xe,originalEvent:t}),Ve({sortable:this,name:"remove",toEl:Ge,originalEvent:t}),Ve({rootEl:Ge,name:"sort",toEl:Ge,fromEl:Xe,originalEvent:t}),Ve({sortable:this,name:"sort",toEl:Ge,originalEvent:t})),ln&&ln.save()):rn!==nn&&rn>=0&&(Ve({sortable:this,name:"update",toEl:Ge,originalEvent:t}),Ve({sortable:this,name:"sort",toEl:Ge,originalEvent:t})),zn.active&&(null!=rn&&-1!==rn||(rn=nn,an=on),Ve({sortable:this,name:"end",toEl:Ge,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){We("nulling",this),Xe=qe=Ge=Je=He=tn=Ze=en=sn=cn=vn=rn=an=nn=on=gn=mn=ln=un=zn.dragged=zn.ghost=zn.clone=zn.active=null,En.forEach(function(t){t.checked=!0}),En.length=fn=dn=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":qe&&(this._onDragOver(t),Un(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,i=n.length,o=this.options;r<i;r++)t=n[r],he(t,o.draggable,this.el,!1)&&e.push(t.getAttribute(o.dataIdAttr)||Jn(t));return e},sort:function(t,e){var n={},r=this.el;this.toArray().forEach(function(t,e){var i=r.children[e];he(i,this.options.draggable,r,!1)&&(n[t]=i)},this),e&&this.captureAnimationState(),t.forEach(function(t){n[t]&&(r.removeChild(n[t]),r.appendChild(n[t]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return he(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var r=Ke.modifyOption(this,t,e);n[t]="undefined"!==typeof r?r:e,"group"===t&&Nn(n)},destroy:function(){We("destroy",this);var t=this.el;t[Le]=null,fe(t,"mousedown",this._onTapStart),fe(t,"touchstart",this._onTapStart),fe(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(fe(t,"dragover",this),fe(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),xn.splice(xn.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!en){if(We("hideClone",this),zn.eventCanceled)return;ye(tn,"display","none"),this.options.removeCloneOnHide&&tn.parentNode&&tn.parentNode.removeChild(tn),en=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(en){if(We("showClone",this),zn.eventCanceled)return;qe.parentNode!=Xe||this.options.group.revertClone?He?Xe.insertBefore(tn,He):Xe.appendChild(tn):Xe.insertBefore(tn,qe),this.options.group.revertClone&&this.animate(qe,tn),ye(tn,"display",""),en=!1}}else this._hideClone()}},kn&&ce(document,"touchmove",function(t){(zn.active||_n)&&t.cancelable&&t.preventDefault()}),zn.utils={on:ce,off:fe,css:ye,find:_e,is:function(t,e){return!!he(t,e,t,!1)},extend:De,throttle:Te,closest:he,toggleClass:me,clone:Me,index:Ie,nextTick:Hn,cancelNextTick:Zn,detectDirection:Rn,getChild:Se,expando:Le},zn.get=function(t){return t[Le]},zn.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&&(zn.utils=Gt(Gt({},zn.utils),t.utils)),Ke.mount(t)})},zn.create=function(t,e){return new zn(t,e)},zn.version=ee;var tr,er,nr,rr,ir,or,ar=[],ur=!1;function lr(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,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?ce(document,"dragover",this._handleAutoScroll):this.options.supportPointer?ce(document,"pointermove",this._handleFallbackAutoScroll):e.touches?ce(document,"touchmove",this._handleFallbackAutoScroll):ce(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?fe(document,"dragover",this._handleAutoScroll):(fe(document,"pointermove",this._handleFallbackAutoScroll),fe(document,"touchmove",this._handleFallbackAutoScroll),fe(document,"mousemove",this._handleFallbackAutoScroll)),cr(),sr(),Re()},nulling:function(){ir=er=tr=ur=or=nr=rr=null,ar.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,r=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,o=document.elementFromPoint(r,i);if(ir=t,e||this.options.forceAutoScrollFallback||ie||re||ae){fr(t,this.options,o,e);var a=Oe(o,!0);!ur||or&&r===nr&&i===rr||(or&&cr(),or=setInterval(function(){var o=Oe(document.elementFromPoint(r,i),!0);o!==a&&(a=o,sr()),fr(t,n.options,o,e)},10),nr=r,rr=i)}else{if(!this.options.bubbleScroll||Oe(o,!0)===we())return void sr();fr(t,this.options,Oe(o,!1),!1)}}},Ht(t,{pluginName:"scroll",initializeByDefault:!0})}function sr(){ar.forEach(function(t){clearInterval(t.pid)}),ar=[]}function cr(){clearInterval(or)}var fr=Te(function(t,e,n,r){if(e.scroll){var i,o=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,u=e.scrollSensitivity,l=e.scrollSpeed,s=we(),c=!1;er!==n&&(er=n,sr(),tr=e.scroll,i=e.scrollFn,!0===tr&&(tr=Oe(n,!0)));var f=0,d=tr;do{var p=d,h=xe(p),v=h.top,g=h.bottom,m=h.left,y=h.right,b=h.width,_=h.height,w=void 0,x=void 0,A=p.scrollWidth,S=p.scrollHeight,C=ye(p),I=p.scrollLeft,E=p.scrollTop;p===s?(w=b<A&&("auto"===C.overflowX||"scroll"===C.overflowX||"visible"===C.overflowX),x=_<S&&("auto"===C.overflowY||"scroll"===C.overflowY||"visible"===C.overflowY)):(w=b<A&&("auto"===C.overflowX||"scroll"===C.overflowX),x=_<S&&("auto"===C.overflowY||"scroll"===C.overflowY));var k=w&&(Math.abs(y-o)<=u&&I+b<A)-(Math.abs(m-o)<=u&&!!I),O=x&&(Math.abs(g-a)<=u&&E+_<S)-(Math.abs(v-a)<=u&&!!E);if(!ar[f])for(var D=0;D<=f;D++)ar[D]||(ar[D]={});ar[f].vx==k&&ar[f].vy==O&&ar[f].el===p||(ar[f].el=p,ar[f].vx=k,ar[f].vy=O,clearInterval(ar[f].pid),0==k&&0==O||(c=!0,ar[f].pid=setInterval(function(){r&&0===this.layer&&zn.active._onTouchMove(ir);var e=ar[this.layer].vy?ar[this.layer].vy*l:0,n=ar[this.layer].vx?ar[this.layer].vx*l:0;"function"===typeof i&&"continue"!==i.call(zn.dragged.parentNode[Le],n,e,t,ir,ar[this.layer].el)||je(ar[this.layer].el,n,e)}.bind({layer:f}),24))),f++}while(e.bubbleScroll&&d!==s&&(d=Oe(d,!1)));ur=c}},30),dr=function(t){var e=t.originalEvent,n=t.putSortable,r=t.dragEl,i=t.activeSortable,o=t.dispatchSortableEvent,a=t.hideGhostForTarget,u=t.unhideGhostForTarget;if(e){var l=n||i;a();var s=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(s.clientX,s.clientY);u(),l&&!l.el.contains(c)&&(o("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function pr(){}function hr(){}pr.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 r=Se(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:dr},Ht(pr,{pluginName:"revertOnSpill"}),hr.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable,r=n||this.sortable;r.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),r.animateAll()},drop:dr},Ht(hr,{pluginName:"removeOnSpill"});zn.mount(new lr),zn.mount(hr,pr);var vr=zn,gr={name:"DTable",components:(0,p.A)((0,p.A)({},x),{},{ColumnRender:b}),props:{data:{type:Array,default:function(){return[]}},rowKey:{type:String,default:""},border:{type:Boolean,default:!0},requestConfig:{type:Object,required:!1,default:function(){return{api:function(){},params:{},autoRequest:!0,method:null}}},layout:{type:String,default:"total, sizes, prev, pager, next, jumper"},pageSizes:{type:Array,default:function(){return[10,20,30,50]}},background:{type:Boolean,default:!0},pagination:{default:!0,type:Boolean},draggable:{default:!1,type:Boolean},selection:{default:!1,type:Boolean},asyncSelection:{default:!1,type:Boolean},defaultCheckList:{default:function(){return[]},type:Array},index:{default:!1,type:Boolean},columns:{default:function(){return[]},type:Array},staticPaging:{default:!1,type:Boolean}},data:function(){return{pageSize:10,pageNum:1,total:0,loading:!1,checkedList:[],ids:[],key:0,list:[],totalList:[]}},computed:{visibleColumns:function(){return this.columns.filter(function(t){return!t.hide})}},watch:{data:{handler:function(t){var e=this;JSON.stringify(t)!==JSON.stringify(this.list)&&(this.handleRequestData(t),this.draggable&&this.$nextTick(function(){e.initSortable()}))},deep:!0,immediate:!0},defaultCheckList:{handler:function(){this.handleSelectionData()},deep:!0}},mounted:function(){this.draggable&&!this.rowKey&&console.error("[DTable] 请设置正确的 rowKey 用于拖拽排序"),this.checkedList=this.defaultCheckList,this.pagination||(this.pageSize=9999999),this.draggable&&this.initSortable(),this.staticPaging||!this.requestConfig.autoRequest&&void 0!==this.requestConfig.autoRequest||this.search()},methods:{search:function(){var t=arguments,e=this;return(0,T.A)((0,B.A)().m(function n(){var r,i,o,a,u;return(0,B.A)().w(function(n){while(1)switch(n.n){case 0:return r=t.length>0&&void 0!==t[0]?t[0]:{},e.loading=!0,n.p=1,r.pageNum&&(e.pageNum=r.pageNum),r.pageSize&&(e.pageSize=r.pageSize),n.n=2,(e.requestConfig.method||e.getData)((0,p.A)((0,p.A)({pageSize:e.pageSize,pageNum:e.pageNum},e.requestConfig.params),r));case 2:i=n.v,o=i.total,a=i.data,e.total=o,e.handleRequestData(a),n.n=4;break;case 3:n.p=3,u=n.v,console.error(u);case 4:e.loading=!1;case 5:return n.a(2)}},n,null,[[1,3]])}))()},getData:function(t){var e=this;return(0,T.A)((0,B.A)().m(function n(){var r,i,o,a;return(0,B.A)().w(function(n){while(1)switch(n.n){case 0:return r="function"===typeof e.requestConfig.params?e.requestConfig.params():e.requestConfig.params,n.n=1,e.requestConfig.api((0,p.A)((0,p.A)({},r),t));case 1:return i=n.v,o=i.data,e.total=o.total,a=o.list||[],e.requestConfig.props&&(null===e.requestConfig.props.list?a=o:e.requestConfig.props.list&&(a=o[e.requestConfig.props.list])),n.a(2,{total:o.total,data:a})}},n)}))()},handleRequestData:function(t){return this.staticPaging?(this.totalList=(0,U.cloneDeep)(t),this.total=this.totalList.length):this.list=(0,U.cloneDeep)(t),this.staticPaging?(this.pageNum=1,void this.calcStaticPageData()):(this.$emit("loaded",this.list),0===this.list.length&&this.pageNum>1?(this.pageNum=this.pageNum-1,void this.search()):void((this.asyncSelection||this.selection)&&(this.key++,this.handleSelectionData())))},handleSelectionData:function(){var t=this;if(this.checkedList=this.defaultCheckList,this.$refs.table&&this.$refs.table.clearSelection(),this.checkedList.length){var e=this.checkedList.map(function(e){return e[t.rowKey]}),n=this.list.filter(function(n){return e.includes(n[t.rowKey])});this.$nextTick(function(){n.forEach(function(e){t.$refs.table.toggleRowSelection(e,!0)})})}},calcStaticPageData:function(){var t=JSON.parse(JSON.stringify(this.totalList));this.list=t.splice((this.pageNum-1)*this.pageSize,this.pageSize)},handleSizeChange:function(t){this.pageSize=t,this.pageNum=1,this.staticPaging?this.calcStaticPageData():this.search(),this.$emit("page-change",{size:this.pageSize,page:this.pageNum})},handleCurrentChange:function(t){this.pageNum=t,this.staticPaging?this.calcStaticPageData():this.search(),this.$emit("page-change",{size:this.pageSize,page:this.pageNum})},selectChange:function(t,e){var n=this;this.asyncSelection?(t.some(function(t){return t[n.rowKey]===e[n.rowKey]})?this.checkedList.push(e):this.checkedList=this.checkedList.filter(function(t){return t[n.rowKey]!==e[n.rowKey]}),this.$emit("select-change",(0,U.cloneDeep)(this.checkedList))):this.$emit("select-change",t)},selectAllChange:function(t){var e=this;if(this.asyncSelection){if(t.length){var n=this.checkedList.map(function(t){return t[e.rowKey]}),r=t.filter(function(t){return!n.includes(t[e.rowKey])});this.checkedList=this.checkedList.concat(r)}else{var i=this.list.map(function(t){return t[e.rowKey]});this.checkedList=this.checkedList.filter(function(t){return!i.includes(t[e.rowKey])})}this.$emit("select-change",(0,U.cloneDeep)(this.checkedList))}else this.$emit("select-change",t)},selectionChange:function(){},clearSelection:function(){this.checkedList=[],this.$refs.table.clearSelection()},toggleAsyncSelection:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.checkedList=this.checkedList.filter(function(n){return n[e.rowKey]!==t});var r=this.list.find(function(n){return n[e.rowKey]===t});r?this.$refs.table.toggleRowSelection(r,n):this.$emit("select-change",this.checkedList)},initSortable:function(){var t=this,e=this.$refs.table.$el.querySelector(".el-table__body-wrapper > table > tbody");new vr(e,{handle:".d-table-drag-icon",onEnd:function(e){var n=t.list.splice(e.oldIndex,1)[0];t.list.splice(e.newIndex,0,n),t.$nextTick(function(){t.initSortable(),t.handleSelectionData(),t.$emit("drag-change",t.list,e)})}})}}},mr=gr,yr=(r(1140),(0,c.A)(mr,Wt,Vt,!1,null,null,null)),br=yr.exports,_r={name:"DSearchTable",components:{SearchForm:Lt,DTable:br},props:{config:{type:Object,default:function(){return{searchConfig:[],requestConfig:{},columns:[]}}},data:{type:Array,default:function(){return[]}}},data:function(){return{form:{}}},computed:{requestConfig:function(){var t=this.config.requestConfig;return(0,p.A)((0,p.A)({},t),{},{params:"function"===typeof t.params?t.params((0,U.cloneDeep)(this.form)):(0,p.A)((0,p.A)({},this.form),t.params)})}},created:function(){this.createFormBind()},methods:{createFormBind:function(){var t={};(this.config.searchConfig||[]).forEach(function(e){t[e.prop]=e.defaultValue||""}),this.form=t},search:function(t){this.$refs.dTable.search(t)},searchData:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pageNum:1};this.$nextTick(function(){t.search(e)})}}},wr=_r,xr=(r(7112),(0,c.A)(wr,Yt,$t,!1,null,null,null)),Ar=xr.exports,Sr=r(95),Cr=r(4163),Ir=function(){var t=this,e=t._self._c;return e("div",[e("el-select",t._g(t._b({model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},"el-select",t.$attrs,!1),(0,p.A)((0,p.A)({},t.$listeners),{},{change:t.onChange})),[t._l(t.options,function(t){return e("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}),e("template",{slot:"prefix"},[t._t("prefix")],2),e("template",{slot:"empty"},[t._t("empty")],2)],2)],1)},Er=[],kr={name:"DSelect",components:{},model:{prop:"modelValue",event:"modelChange"},props:{modelValue:{type:[String,Number,Array],default:""},options:{type:Array,default:function(){return[]}}},data:function(){return{}},computed:{value:{get:function(){return this.modelValue},set:function(t){this.$emit("modelChange",t)}}},watch:{},created:function(){},methods:{onChange:function(t){var e;e=Array.isArray(t)?this.options.filter(function(e){return t.includes(e.value)})||[]:this.options.find(function(e){return t===e.value})||{},this.$emit("change",t,e)}}},Or=kr,Dr=(0,c.A)(Or,Ir,Er,!1,null,null,null),Br=Dr.exports,Tr=function(){var t=this,e=t._self._c;return e("el-checkbox-group",t._g(t._b({model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},"el-checkbox-group",t.$attrs,!1),t.$listeners),t._l(t.options,function(n){return e("el-checkbox",{key:n.value,attrs:{label:n.value}},[t._v(" "+t._s(n.label)+" ")])}),1)},Rr=[],jr={name:"DCheckboxGroup",components:{},model:{prop:"modelValue",event:"modelChange"},props:{modelValue:{type:Array,default:function(){return[]}},options:{type:Array,default:function(){return[]}}},data:function(){return{}},computed:{value:{get:function(){return this.modelValue},set:function(t){this.$emit("modelChange",t)}}},watch:{},created:function(){},methods:{}},Mr=jr,Nr=(0,c.A)(Mr,Tr,Rr,!1,null,null,null),Lr=Nr.exports,Fr=function(){var t=this,e=t._self._c;return e("el-radio-group",t._g(t._b({model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},"el-radio-group",t.$attrs,!1),t.$listeners),t._l(t.options,function(n){return e("el-radio",{key:n.value,attrs:{label:n.value}},[t._v(" "+t._s(n.label)+" ")])}),1)},Pr=[],Qr={name:"DRadioGroup",components:{},model:{prop:"modelValue",event:"modelChange"},props:{modelValue:{type:[String,Number],default:""},options:{type:Array,default:function(){return[]}}},data:function(){return{}},computed:{value:{get:function(){return this.modelValue},set:function(t){this.$emit("modelChange",t)}}},watch:{},created:function(){},methods:{}},zr=Qr,Ur=(0,c.A)(zr,Fr,Pr,!1,null,null,null),Kr=Ur.exports,Yr=r(3520),$r=function(){var t=this,e=t._self._c;return e("d-dialog",{attrs:{"form-refs":"importForm",width:t.width,title:t.title,"submit-btn-text":"导入","submit-btn-icon":"el-icon-upload2"},on:{submit:t.submit},model:{value:t.visible,callback:function(e){t.visible=e},expression:"visible"}},[e("el-form",{ref:"importForm",attrs:{model:t.form,inline:!0}},[e("el-form-item",{staticClass:"import-form-item",attrs:{prop:"file",label:"选择文件",rules:[{required:!0,message:"请选择文件"}]}},[e("div",{staticClass:"d-import__custom-file-input"},[e("div",{staticClass:"d-import__custom-file-content"},[t._v(" "+t._s(t.form.file?t.form.file.name:"请选择")+" ")]),e("el-upload",{attrs:{"file-list":t.fileList,"show-file-list":!1,"auto-upload":!1,action:"","on-change":t.uploadChange}},[e("el-button",{attrs:{type:"primary",icon:"el-icon-folder"}})],1)],1)]),e("el-button",{directives:[{name:"show",rawName:"v-show",value:t.templateUrl||t.templateDownloadMethod,expression:"templateUrl || templateDownloadMethod"}],attrs:{icon:"el-icon-paperclip",type:"text"},on:{click:t.downloadFile}},[t._v(" 模板下载 ")])],1),t.slotRender?e("div",[e("d-render",{attrs:{render:t.slotRender}})],1):e("div",[e("p",[t._v("1. 支持导入格式为"+t._s(t.fileType.join("、"))+"的文件,且文件大小不可超过"+t._s(t.fileSize)+"M")]),e("p",[t._v("2. 模板的表头不可更改,不可删除")]),e("p",[t._v("3. 若导入数据存在编码一致的情况则会更新原有数据")]),e("p",[t._v("4. 若导入过程中有问题,需调整模板内容后再重新导入")])])],1)},Wr=[],Vr={name:"DImportFile",components:{DDialog:E.A,DRender:b},props:{value:{default:!1,type:Boolean},width:{default:"520px",type:String},title:{default:"",type:String},templateUrl:{default:"",type:String},token:{default:"",type:String},templateDownloadMethod:{type:Function,default:null},fileType:{default:function(){return["xlsx","xls"]},type:Array},fileSize:{default:5,type:Number},slotRender:{default:null,type:Function}},data:function(){return{visible:!1,fileList:[],form:{file:""}}},watch:{value:{handler:function(t){this.visible=t}},visible:{handler:function(t){t||this.$emit("close",t)}}},methods:{downloadFile:function(){this.templateDownloadMethod?this.templateDownloadMethod():window.location.href="".concat(this.templateUrl,"?authToken=").concat(this.token)},uploadChange:function(t,e){var n=t.size/1024/1024<this.fileSize,r=this.fileType.includes(t.name.substr(t.name.lastIndexOf(".")+1).toLocaleLowerCase());return r?n?(this.fileList=e,void(this.form.file=t.raw)):(this.$message.error("上传文件大小不能超过".concat(this.fileSize,"MB")),!1):(this.$message.error("请上传正确的文件格式(".concat(this.fileType.join("、"),")")),!1)},submit:function(t){var e=this;return(0,T.A)((0,B.A)().m(function n(){return(0,B.A)().w(function(n){while(1)switch(n.n){case 0:if(e.form.file){n.n=1;break}return e.$message.error("请选择导入文件"),t(new Error(!1)),n.a(2);case 1:try{e.$emit("submit",t,e.form.file)}catch(r){t(new Error(!1))}case 2:return n.a(2)}},n)}))()}}},qr=Vr,Gr=(r(1798),(0,c.A)(qr,$r,Wr,!1,null,null,null)),Jr=Gr.exports,Xr=function(t){t.prototype.$preview=function(e){var n=e.defaultIndex,r=void 0===n?0:n,i=e.list,o=void 0===i?[]:i,a=t.extend(Yr.A),u=new a;document.body.appendChild(u.$mount().$el),u.value=!0,u.defaultIndex=r,u.list=o},t.prototype.$importFile=function(e){var n=e.width,r=void 0===n?"520px":n,i=e.title,o=void 0===i?"文件导入":i,a=e.templateUrl,u=void 0===a?"":a,l=e.token,s=void 0===l?"":l,c=e.templateDownloadMethod,f=void 0===c?null:c,d=e.fileType,p=void 0===d?["xlsx","xls"]:d,h=e.fileSize,v=void 0===h?5:h,g=e.slotRender,m=void 0===g?null:g;return new Promise(function(e,n){var i=t.extend(Jr),a=new i,l=a.$mount().$el;document.body.appendChild(l),a.value=!0,a.width=r,a.title=o,a.templateUrl=u,a.token=s,a.templateDownloadMethod=f,a.fileType=p,a.fileSize=v,a.slotRender=m;var c=function(){a.$destroy(),l.parentNode&&l.parentNode.removeChild(l)};a.$on("submit",function(){var t=(0,T.A)((0,B.A)().m(function t(n,r){return(0,B.A)().w(function(t){while(1)switch(t.n){case 0:try{e({file:r,callback:n})}catch(i){n(new Error(i))}case 1:return t.a(2)}},t)}));return function(e,n){return t.apply(this,arguments)}}()),a.$on("close",function(){n(),t.nextTick(c)})})}},Hr=[d,I,E.A,k.A,N,X,pt,st,Ct,Bt,b,Lt,Kt,Ar,Sr.A,br,Cr.A,Br,Lr,Kr],Zr=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.prototype.$DDWL={upload:e.upload,enum:e.enum},Zr.installed||(Hr.forEach(function(e){return t.component(e.name,e)}),Xr(t))};"undefined"!==typeof window&&window.Vue&&Zr(window.Vue);var ti={install:Zr},ei=ti}(),i}()});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ddwl/ddwl-ui",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "private": false,
5
5
  "main": "dist/index.common.js",
6
6
  "style": "dist/index.css",
@@ -46,14 +46,14 @@ export default (Vue) => {
46
46
 
47
47
  instance.$on('submit', async (callback, file) => {
48
48
  try {
49
- resolve(callback, file)
49
+ resolve({ file, callback })
50
50
  } catch (e) {
51
51
  callback(new Error(e))
52
52
  }
53
53
  })
54
54
 
55
55
  instance.$on('close', () => {
56
- reject(new Error('cancelled'))
56
+ reject()
57
57
  Vue.nextTick(destroy)
58
58
  })
59
59
  })