@pine-ds/core 3.11.0 → 3.11.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.
- package/components/mock-pds-modal.js +1 -1
- package/components/mock-pds-modal.js.map +1 -1
- package/components/pds-button2.js.map +1 -1
- package/components/pds-chip2.js +1 -1
- package/components/pds-chip2.js.map +1 -1
- package/components/pds-copytext.js +1 -1
- package/components/pds-copytext.js.map +1 -1
- package/components/pds-dropdown-menu.js +29 -10
- package/components/pds-dropdown-menu.js.map +1 -1
- package/components/pds-sortable.js +1 -1
- package/components/pds-sortable.js.map +1 -1
- package/dist/cjs/mock-pds-modal.cjs.entry.js +1 -1
- package/dist/cjs/mock-pds-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-button.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-chip.cjs.entry.js +1 -1
- package/dist/cjs/pds-chip.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-copytext.cjs.entry.js +1 -1
- package/dist/cjs/pds-copytext.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +28 -9
- package/dist/cjs/pds-dropdown-menu.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-sortable.cjs.entry.js +1 -1
- package/dist/cjs/pds-sortable.entry.cjs.js.map +1 -1
- package/dist/collection/components/pds-button/pds-button.js +9 -3
- package/dist/collection/components/pds-button/pds-button.js.map +1 -1
- package/dist/collection/components/pds-chip/pds-chip.js +3 -3
- package/dist/collection/components/pds-chip/pds-chip.js.map +1 -1
- package/dist/collection/components/pds-copytext/pds-copytext.js +3 -3
- package/dist/collection/components/pds-copytext/pds-copytext.js.map +1 -1
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +32 -10
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js.map +1 -1
- package/dist/collection/components/pds-input/input-interface.js.map +1 -1
- package/dist/collection/components/pds-modal/test/mock-pds-modal.js +7 -7
- package/dist/collection/components/pds-modal/test/mock-pds-modal.js.map +1 -1
- package/dist/collection/components/pds-sortable/pds-sortable.js +10 -4
- package/dist/collection/components/pds-sortable/pds-sortable.js.map +1 -1
- package/dist/collection/components/pds-sortable/sortable-interface.js.map +1 -1
- package/dist/docs.json +58 -26
- package/dist/esm/mock-pds-modal.entry.js +1 -1
- package/dist/esm/mock-pds-modal.entry.js.map +1 -1
- package/dist/esm/pds-button.entry.js.map +1 -1
- package/dist/esm/pds-chip.entry.js +1 -1
- package/dist/esm/pds-chip.entry.js.map +1 -1
- package/dist/esm/pds-copytext.entry.js +1 -1
- package/dist/esm/pds-copytext.entry.js.map +1 -1
- package/dist/esm/pds-dropdown-menu.entry.js +29 -10
- package/dist/esm/pds-dropdown-menu.entry.js.map +1 -1
- package/dist/esm/pds-sortable.entry.js +1 -1
- package/dist/esm/pds-sortable.entry.js.map +1 -1
- package/dist/esm-es5/mock-pds-modal.entry.js +1 -1
- package/dist/esm-es5/mock-pds-modal.entry.js.map +1 -1
- package/dist/esm-es5/pds-button.entry.js.map +1 -1
- package/dist/esm-es5/pds-chip.entry.js +1 -1
- package/dist/esm-es5/pds-chip.entry.js.map +1 -1
- package/dist/esm-es5/pds-copytext.entry.js +1 -1
- package/dist/esm-es5/pds-copytext.entry.js.map +1 -1
- package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu.entry.js.map +1 -1
- package/dist/esm-es5/pds-sortable.entry.js +1 -1
- package/dist/esm-es5/pds-sortable.entry.js.map +1 -1
- package/dist/pine-core/mock-pds-modal.entry.esm.js.map +1 -1
- package/dist/pine-core/{p-4fe28624.system.entry.js → p-0a29a0a4.system.entry.js} +2 -2
- package/dist/pine-core/{p-ac5eb57e.entry.js → p-0ea23735.entry.js} +2 -2
- package/dist/pine-core/{p-6448829b.system.entry.js → p-1956a234.system.entry.js} +2 -2
- package/dist/pine-core/{p-b151a37d.entry.js → p-535a91bd.entry.js} +2 -2
- package/dist/pine-core/p-Cua7cmvq.system.js +1 -1
- package/dist/pine-core/{p-CNOoGfj8.system.js.map → p-DAxIps70.system.js.map} +1 -1
- package/dist/pine-core/p-DCiTnlD3.system.js.map +1 -1
- package/dist/pine-core/{p-CVoRTJJv.system.js.map → p-Dez3UWhA.system.js.map} +1 -1
- package/dist/pine-core/{p-Bhj5-yqf.system.js.map → p-Dy_B3NK5.system.js.map} +1 -1
- package/dist/pine-core/p-YAyZ2OFh.system.js.map +1 -0
- package/dist/pine-core/{p-da23f4cf.entry.js → p-b9135a30.entry.js} +2 -2
- package/dist/pine-core/{p-5565ee41.system.entry.js → p-c0fef05c.system.entry.js} +2 -2
- package/dist/pine-core/{p-7bbe537d.system.entry.js → p-c5cda159.system.entry.js} +2 -2
- package/dist/pine-core/p-c751ad1d.system.entry.js +2 -0
- package/dist/pine-core/p-c751ad1d.system.entry.js.map +1 -0
- package/dist/pine-core/p-c85b0d07.entry.js +2 -0
- package/dist/pine-core/p-c85b0d07.entry.js.map +1 -0
- package/dist/pine-core/{p-6046e0b1.entry.js → p-fc832660.entry.js} +2 -2
- package/dist/pine-core/p-l33dh9cy.system.js.map +1 -0
- package/dist/pine-core/pds-button.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-chip.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-copytext.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-dropdown-menu.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-sortable.entry.esm.js.map +1 -1
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/types/components/pds-button/pds-button.d.ts +1 -1
- package/dist/types/components/pds-chip/pds-chip.d.ts +1 -1
- package/dist/types/components/pds-copytext/pds-copytext.d.ts +1 -1
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +5 -0
- package/dist/types/components/pds-input/input-interface.d.ts +1 -1
- package/dist/types/components/pds-modal/test/mock-pds-modal.d.ts +3 -3
- package/dist/types/components/pds-sortable/pds-sortable.d.ts +2 -1
- package/dist/types/components/pds-sortable/sortable-interface.d.ts +2 -1
- package/dist/types/components.d.ts +18 -14
- package/hydrate/index.js +35 -13
- package/hydrate/index.mjs +35 -13
- package/package.json +2 -2
- package/dist/pine-core/p-2NVJY0Vc.system.js.map +0 -1
- package/dist/pine-core/p-54e04c59.system.entry.js +0 -2
- package/dist/pine-core/p-54e04c59.system.entry.js.map +0 -1
- package/dist/pine-core/p-7ccd095b.entry.js +0 -2
- package/dist/pine-core/p-7ccd095b.entry.js.map +0 -1
- package/dist/pine-core/p-CuF_eckL.system.js.map +0 -1
- /package/dist/pine-core/{p-4fe28624.system.entry.js.map → p-0a29a0a4.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-ac5eb57e.entry.js.map → p-0ea23735.entry.js.map} +0 -0
- /package/dist/pine-core/{p-6448829b.system.entry.js.map → p-1956a234.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b151a37d.entry.js.map → p-535a91bd.entry.js.map} +0 -0
- /package/dist/pine-core/{p-da23f4cf.entry.js.map → p-b9135a30.entry.js.map} +0 -0
- /package/dist/pine-core/{p-5565ee41.system.entry.js.map → p-c0fef05c.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-7bbe537d.system.entry.js.map → p-c5cda159.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-6046e0b1.entry.js.map → p-fc832660.entry.js.map} +0 -0
|
@@ -4,5 +4,5 @@ import{r as registerInstance,c as createEvent,h,H as Host,a as getElement}from".
|
|
|
4
4
|
* @author RubaXa <trash@rubaxa.org>
|
|
5
5
|
* @author owenm <owen23355@gmail.com>
|
|
6
6
|
* @license MIT
|
|
7
|
-
*/function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);if(e){r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))}n.push.apply(n,r)}return n}function _objectSpread2(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};if(e%2){ownKeys(Object(n),true).forEach((function(e){_defineProperty(t,e,n[e])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(t,Object.getOwnPropertyDescriptors(n))}else{ownKeys(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}}return t}function _typeof(t){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function(t){return typeof t}}else{_typeof=function(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}}return _typeof(t)}function _defineProperty(t,e,n){if(e in t){Object.defineProperty(t,e,{value:n,enumerable:true,configurable:true,writable:true})}else{t[e]=n}return t}function _extends(){_extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n){if(Object.prototype.hasOwnProperty.call(n,r)){t[r]=n[r]}}}return t};return _extends.apply(this,arguments)}function _objectWithoutPropertiesLoose(t,e){if(t==null)return{};var n={};var r=Object.keys(t);var o,i;for(i=0;i<r.length;i++){o=r[i];if(e.indexOf(o)>=0)continue;n[o]=t[o]}return n}function _objectWithoutProperties(t,e){if(t==null)return{};var n=_objectWithoutPropertiesLoose(t,e);var r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++){r=i[o];if(e.indexOf(r)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(t,r))continue;n[r]=t[r]}}return n}var version="1.15.6";function userAgent(t){if(typeof window!=="undefined"&&window.navigator){return!!navigator.userAgent.match(t)}}var IE11OrLess=userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);var Edge=userAgent(/Edge/i);var FireFox=userAgent(/firefox/i);var Safari=userAgent(/safari/i)&&!userAgent(/chrome/i)&&!userAgent(/android/i);var IOS=userAgent(/iP(ad|od|hone)/i);var ChromeForAndroid=userAgent(/chrome/i)&&userAgent(/android/i);var captureMode={capture:false,passive:false};function on(t,e,n){t.addEventListener(e,n,!IE11OrLess&&captureMode)}function off(t,e,n){t.removeEventListener(e,n,!IE11OrLess&&captureMode)}function matches(t,e){if(!e)return;e[0]===">"&&(e=e.substring(1));if(t){try{if(t.matches){return t.matches(e)}else if(t.msMatchesSelector){return t.msMatchesSelector(e)}else if(t.webkitMatchesSelector){return t.webkitMatchesSelector(e)}}catch(t){return false}}return false}function getParentOrHost(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function closest(t,e,n,r){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&matches(t,e):matches(t,e))||r&&t===n){return t}if(t===n)break}while(t=getParentOrHost(t))}return null}var R_SPACE=/\s+/g;function toggleClass(t,e,n){if(t&&e){if(t.classList){t.classList[n?"add":"remove"](e)}else{var r=(" "+t.className+" ").replace(R_SPACE," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(R_SPACE," ")}}}function css(t,e,n){var r=t&&t.style;if(r){if(n===void 0){if(document.defaultView&&document.defaultView.getComputedStyle){n=document.defaultView.getComputedStyle(t,"")}else if(t.currentStyle){n=t.currentStyle}return e===void 0?n:n[e]}else{if(!(e in r)&&e.indexOf("webkit")===-1){e="-webkit-"+e}r[e]=n+(typeof n==="string"?"":"px")}}}function matrix(t,e){var n="";if(typeof t==="string"){n=t}else{do{var r=css(t,"transform");if(r&&r!=="none"){n=r+" "+n}}while(!e&&(t=t.parentNode))}var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function find(t,e,n){if(t){var r=t.getElementsByTagName(e),o=0,i=r.length;if(n){for(;o<i;o++){n(r[o],o)}}return r}return[]}function getWindowScrollingElement(){var t=document.scrollingElement;if(t){return t}else{return document.documentElement}}function getRect(t,e,n,r,o){if(!t.getBoundingClientRect&&t!==window)return;var i,l,a,s,u,c,f;if(t!==window&&t.parentNode&&t!==getWindowScrollingElement()){i=t.getBoundingClientRect();l=i.top;a=i.left;s=i.bottom;u=i.right;c=i.height;f=i.width}else{l=0;a=0;s=window.innerHeight;u=window.innerWidth;c=window.innerHeight;f=window.innerWidth}if((e||n)&&t!==window){o=o||t.parentNode;if(!IE11OrLess){do{if(o&&o.getBoundingClientRect&&(css(o,"transform")!=="none"||n&&css(o,"position")!=="static")){var d=o.getBoundingClientRect();l-=d.top+parseInt(css(o,"border-top-width"));a-=d.left+parseInt(css(o,"border-left-width"));s=l+i.height;u=a+i.width;break}}while(o=o.parentNode)}}if(r&&t!==window){var h=matrix(o||t),g=h&&h.a,v=h&&h.d;if(h){l/=v;a/=g;f/=g;c/=v;s=l+c;u=a+f}}return{top:l,left:a,bottom:s,right:u,width:f,height:c}}function isScrolledPast(t,e,n){var r=getParentAutoScrollElement(t,true),o=getRect(t)[e];while(r){var i=getRect(r)[n],l=void 0;{l=o>=i}if(!l)return r;if(r===getWindowScrollingElement())break;r=getParentAutoScrollElement(r,false)}return false}function getChild(t,e,n,r){var o=0,i=0,l=t.children;while(i<l.length){if(l[i].style.display!=="none"&&l[i]!==Sortable.ghost&&(r||l[i]!==Sortable.dragged)&&closest(l[i],n.draggable,t,false)){if(o===e){return l[i]}o++}i++}return null}function lastChild(t,e){var n=t.lastElementChild;while(n&&(n===Sortable.ghost||css(n,"display")==="none"||e&&!matches(n,e))){n=n.previousElementSibling}return n||null}function index(t,e){var n=0;if(!t||!t.parentNode){return-1}while(t=t.previousElementSibling){if(t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==Sortable.clone&&(!e||matches(t,e))){n++}}return n}function getRelativeScrollOffset(t){var e=0,n=0,r=getWindowScrollingElement();if(t){do{var o=matrix(t),i=o.a,l=o.d;e+=t.scrollLeft*i;n+=t.scrollTop*l}while(t!==r&&(t=t.parentNode))}return[e,n]}function indexOfObject(t,e){for(var n in t){if(!t.hasOwnProperty(n))continue;for(var r in e){if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n)}}return-1}function getParentAutoScrollElement(t,e){if(!t||!t.getBoundingClientRect)return getWindowScrollingElement();var n=t;var r=false;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=css(n);if(n.clientWidth<n.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return getWindowScrollingElement();if(r||e)return n;r=true}}}while(n=n.parentNode);return getWindowScrollingElement()}function extend(t,e){if(t&&e){for(var n in e){if(e.hasOwnProperty(n)){t[n]=e[n]}}}return t}function isRectEqual(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)}var _throttleTimeout;function throttle(t,e){return function(){if(!_throttleTimeout){var n=arguments,r=this;if(n.length===1){t.call(r,n[0])}else{t.apply(r,n)}_throttleTimeout=setTimeout((function(){_throttleTimeout=void 0}),e)}}}function cancelThrottle(){clearTimeout(_throttleTimeout);_throttleTimeout=void 0}function scrollBy(t,e,n){t.scrollLeft+=e;t.scrollTop+=n}function clone(t){var e=window.Polymer;var n=window.jQuery||window.Zepto;if(e&&e.dom){return e.dom(t).cloneNode(true)}else if(n){return n(t).clone(true)[0]}else{return t.cloneNode(true)}}function getChildContainingRectFromElement(t,e,n){var r={};Array.from(t.children).forEach((function(o){var i,l,a,s;if(!closest(o,e.draggable,t,false)||o.animated||o===n)return;var u=getRect(o);r.left=Math.min((i=r.left)!==null&&i!==void 0?i:Infinity,u.left);r.top=Math.min((l=r.top)!==null&&l!==void 0?l:Infinity,u.top);r.right=Math.max((a=r.right)!==null&&a!==void 0?a:-Infinity,u.right);r.bottom=Math.max((s=r.bottom)!==null&&s!==void 0?s:-Infinity,u.bottom)}));r.width=r.right-r.left;r.height=r.bottom-r.top;r.x=r.left;r.y=r.top;return r}var expando="Sortable"+(new Date).getTime();function AnimationStateManager(){var t=[],e;return{captureAnimationState:function e(){t=[];if(!this.options.animation)return;var n=[].slice.call(this.el.children);n.forEach((function(e){if(css(e,"display")==="none"||e===Sortable.ghost)return;t.push({target:e,rect:getRect(e)});var n=_objectSpread2({},t[t.length-1].rect);if(e.thisAnimationDuration){var r=matrix(e,true);if(r){n.top-=r.f;n.left-=r.e}}e.fromRect=n}))},addAnimationState:function e(n){t.push(n)},removeAnimationState:function e(n){t.splice(indexOfObject(t,{target:n}),1)},animateAll:function n(r){var o=this;if(!this.options.animation){clearTimeout(e);if(typeof r==="function")r();return}var i=false,l=0;t.forEach((function(t){var e=0,n=t.target,r=n.fromRect,a=getRect(n),s=n.prevFromRect,u=n.prevToRect,c=t.rect,f=matrix(n,true);if(f){a.top-=f.f;a.left-=f.e}n.toRect=a;if(n.thisAnimationDuration){if(isRectEqual(s,a)&&!isRectEqual(r,a)&&(c.top-a.top)/(c.left-a.left)===(r.top-a.top)/(r.left-a.left)){e=calculateRealTime(c,s,u,o.options)}}if(!isRectEqual(a,r)){n.prevFromRect=r;n.prevToRect=a;if(!e){e=o.options.animation}o.animate(n,c,a,e)}if(e){i=true;l=Math.max(l,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(e);if(!i){if(typeof r==="function")r()}else{e=setTimeout((function(){if(typeof r==="function")r()}),l)}t=[]},animate:function t(e,n,r,o){if(o){css(e,"transition","");css(e,"transform","");var i=matrix(this.el),l=i&&i.a,a=i&&i.d,s=(n.left-r.left)/(l||1),u=(n.top-r.top)/(a||1);e.animatingX=!!s;e.animatingY=!!u;css(e,"transform","translate3d("+s+"px,"+u+"px,0)");this.forRepaintDummy=repaint(e);css(e,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:""));css(e,"transform","translate3d(0,0,0)");typeof e.animated==="number"&&clearTimeout(e.animated);e.animated=setTimeout((function(){css(e,"transition","");css(e,"transform","");e.animated=false;e.animatingX=false;e.animatingY=false}),o)}}}}function repaint(t){return t.offsetWidth}function calculateRealTime(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 plugins=[];var defaults={initializeByDefault:true};var PluginManager={mount:function t(e){for(var n in defaults){if(defaults.hasOwnProperty(n)&&!(n in e)){e[n]=defaults[n]}}plugins.forEach((function(t){if(t.pluginName===e.pluginName){throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}}));plugins.push(e)},pluginEvent:function t(e,n,r){var o=this;this.eventCanceled=false;r.cancel=function(){o.eventCanceled=true};var i=e+"Global";plugins.forEach((function(t){if(!n[t.pluginName])return;if(n[t.pluginName][i]){n[t.pluginName][i](_objectSpread2({sortable:n},r))}if(n.options[t.pluginName]&&n[t.pluginName][e]){n[t.pluginName][e](_objectSpread2({sortable:n},r))}}))},initializePlugins:function t(e,n,r,o){plugins.forEach((function(t){var o=t.pluginName;if(!e.options[o]&&!t.initializeByDefault)return;var i=new t(e,n,e.options);i.sortable=e;i.options=e.options;e[o]=i;_extends(r,i.defaults)}));for(var i in e.options){if(!e.options.hasOwnProperty(i))continue;var l=this.modifyOption(e,i,e.options[i]);if(typeof l!=="undefined"){e.options[i]=l}}},getEventProperties:function t(e,n){var r={};plugins.forEach((function(t){if(typeof t.eventProperties!=="function")return;_extends(r,t.eventProperties.call(n[t.pluginName],e))}));return r},modifyOption:function t(e,n,r){var o;plugins.forEach((function(t){if(!e[t.pluginName])return;if(t.optionListeners&&typeof t.optionListeners[n]==="function"){o=t.optionListeners[n].call(e[t.pluginName],r)}}));return o}};function dispatchEvent(t){var e=t.sortable,n=t.rootEl,r=t.name,o=t.targetEl,i=t.cloneEl,l=t.toEl,a=t.fromEl,s=t.oldIndex,u=t.newIndex,c=t.oldDraggableIndex,f=t.newDraggableIndex,d=t.originalEvent,h=t.putSortable,g=t.extraEventProperties;e=e||n&&n[expando];if(!e)return;var v,E=e.options,p="on"+r.charAt(0).toUpperCase()+r.substr(1);if(window.CustomEvent&&!IE11OrLess&&!Edge){v=new CustomEvent(r,{bubbles:true,cancelable:true})}else{v=document.createEvent("Event");v.initEvent(r,true,true)}v.to=l||n;v.from=a||n;v.item=o||n;v.clone=i;v.oldIndex=s;v.newIndex=u;v.oldDraggableIndex=c;v.newDraggableIndex=f;v.originalEvent=d;v.pullMode=h?h.lastPutMode:undefined;var m=_objectSpread2(_objectSpread2({},g),PluginManager.getEventProperties(r,e));for(var b in m){v[b]=m[b]}if(n){n.dispatchEvent(v)}if(E[p]){E[p].call(e,v)}}var _excluded=["evt"];var pluginEvent=function t(e,n){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},o=r.evt,i=_objectWithoutProperties(r,_excluded);PluginManager.pluginEvent.bind(Sortable)(e,n,_objectSpread2({dragEl:dragEl,parentEl:parentEl,ghostEl:ghostEl,rootEl:rootEl,nextEl:nextEl,lastDownEl:lastDownEl,cloneEl:cloneEl,cloneHidden:cloneHidden,dragStarted:moved,putSortable:putSortable,activeSortable:Sortable.active,originalEvent:o,oldIndex:oldIndex,oldDraggableIndex:oldDraggableIndex,newIndex:newIndex,newDraggableIndex:newDraggableIndex,hideGhostForTarget:_hideGhostForTarget,unhideGhostForTarget:_unhideGhostForTarget,cloneNowHidden:function t(){cloneHidden=true},cloneNowShown:function t(){cloneHidden=false},dispatchSortableEvent:function t(e){_dispatchEvent({sortable:n,name:e,originalEvent:o})}},i))};function _dispatchEvent(t){dispatchEvent(_objectSpread2({putSortable:putSortable,cloneEl:cloneEl,targetEl:dragEl,rootEl:rootEl,oldIndex:oldIndex,oldDraggableIndex:oldDraggableIndex,newIndex:newIndex,newDraggableIndex:newDraggableIndex},t))}var dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,oldIndex,newIndex,oldDraggableIndex,newDraggableIndex,activeGroup,putSortable,awaitingDragStarted=false,ignoreNextClick=false,sortables=[],tapEvt,touchEvt,lastDx,lastDy,tapDistanceLeft,tapDistanceTop,moved,lastTarget,lastDirection,pastFirstInvertThresh=false,isCircumstantialInvert=false,targetMoveDistance,ghostRelativeParent,ghostRelativeParentInitialScroll=[],_silent=false,savedInputChecked=[];var documentExists=typeof document!=="undefined",PositionGhostAbsolutely=IOS,CSSFloatProperty=Edge||IE11OrLess?"cssFloat":"float",supportDraggable=documentExists&&!ChromeForAndroid&&!IOS&&"draggable"in document.createElement("div"),supportCssPointerEvents=function(){if(!documentExists)return;if(IE11OrLess){return false}var t=document.createElement("x");t.style.cssText="pointer-events:auto";return t.style.pointerEvents==="auto"}(),_detectDirection=function t(e,n){var r=css(e),o=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),i=getChild(e,0,n),l=getChild(e,1,n),a=i&&css(i),s=l&&css(l),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+getRect(i).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+getRect(l).width;if(r.display==="flex"){return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal"}if(r.display==="grid"){return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal"}if(i&&a["float"]&&a["float"]!=="none"){var f=a["float"]==="left"?"left":"right";return l&&(s.clear==="both"||s.clear===f)?"vertical":"horizontal"}return i&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||u>=o&&r[CSSFloatProperty]==="none"||l&&r[CSSFloatProperty]==="none"&&u+c>o)?"vertical":"horizontal"},_dragElInRowColumn=function t(e,n,r){var o=r?e.left:e.top,i=r?e.right:e.bottom,l=r?e.width:e.height,a=r?n.left:n.top,s=r?n.right:n.bottom,u=r?n.width:n.height;return o===a||i===s||o+l/2===a+u/2},_detectNearestEmptySortable=function t(e,n){var r;sortables.some((function(t){var o=t[expando].options.emptyInsertThreshold;if(!o||lastChild(t))return;var i=getRect(t),l=e>=i.left-o&&e<=i.right+o,a=n>=i.top-o&&n<=i.bottom+o;if(l&&a){return r=t}}));return r},_prepareGroup=function t(e){function n(t,e){return function(r,o,i,l){var a=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(t==null&&(e||a)){return true}else if(t==null||t===false){return false}else if(e&&t==="clone"){return t}else if(typeof t==="function"){return n(t(r,o,i,l),e)(r,o,i,l)}else{var s=(e?r:o).options.group.name;return t===true||typeof t==="string"&&t===s||t.join&&t.indexOf(s)>-1}}}var r={};var o=e.group;if(!o||_typeof(o)!="object"){o={name:o}}r.name=o.name;r.checkPull=n(o.pull,true);r.checkPut=n(o.put);r.revertClone=o.revertClone;e.group=r},_hideGhostForTarget=function t(){if(!supportCssPointerEvents&&ghostEl){css(ghostEl,"display","none")}},_unhideGhostForTarget=function t(){if(!supportCssPointerEvents&&ghostEl){css(ghostEl,"display","")}};if(documentExists&&!ChromeForAndroid){document.addEventListener("click",(function(t){if(ignoreNextClick){t.preventDefault();t.stopPropagation&&t.stopPropagation();t.stopImmediatePropagation&&t.stopImmediatePropagation();ignoreNextClick=false;return false}}),true)}var nearestEmptyInsertDetectEvent=function t(e){if(dragEl){e=e.touches?e.touches[0]:e;var n=_detectNearestEmptySortable(e.clientX,e.clientY);if(n){var r={};for(var o in e){if(e.hasOwnProperty(o)){r[o]=e[o]}}r.target=r.rootEl=n;r.preventDefault=void 0;r.stopPropagation=void 0;n[expando]._onDragOver(r)}}};var _checkOutsideTargetEl=function t(e){if(dragEl){dragEl.parentNode[expando]._isOutsideThisEl(e.target)}};function Sortable(t,e){if(!(t&&t.nodeType&&t.nodeType===1)){throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t))}this.el=t;this.options=e=_extends({},e);t[expando]=this;var n={group:null,sort:true,disabled:false,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:false,invertedSwapThreshold:null,removeCloneOnHide:true,direction:function e(){return _detectDirection(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:true,animation:0,easing:null,setData:function t(e,n){e.setData("Text",n.textContent)},dropBubble:false,dragoverBubble:false,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:false,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:false,fallbackClass:"sortable-fallback",fallbackOnBody:false,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Sortable.supportPointer!==false&&"PointerEvent"in window&&(!Safari||IOS),emptyInsertThreshold:5};PluginManager.initializePlugins(this,t,n);for(var r in n){!(r in e)&&(e[r]=n[r])}_prepareGroup(e);for(var o in this){if(o.charAt(0)==="_"&&typeof this[o]==="function"){this[o]=this[o].bind(this)}}this.nativeDraggable=e.forceFallback?false:supportDraggable;if(this.nativeDraggable){this.options.touchStartThreshold=1}if(e.supportPointer){on(t,"pointerdown",this._onTapStart)}else{on(t,"mousedown",this._onTapStart);on(t,"touchstart",this._onTapStart)}if(this.nativeDraggable){on(t,"dragover",this);on(t,"dragenter",this)}sortables.push(this.el);e.store&&e.store.get&&this.sort(e.store.get(this)||[]);_extends(this,AnimationStateManager())}Sortable.prototype={constructor:Sortable,_isOutsideThisEl:function t(e){if(!this.el.contains(e)&&e!==this.el){lastTarget=null}},_getDirection:function t(e,n){return typeof this.options.direction==="function"?this.options.direction.call(this,e,n,dragEl):this.options.direction},_onTapStart:function t(e){if(!e.cancelable)return;var n=this,r=this.el,o=this.options,i=o.preventOnFilter,l=e.type,a=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,s=(a||e).target,u=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=o.filter;_saveInputCheckedState(r);if(dragEl){return}if(/mousedown|pointerdown/.test(l)&&e.button!==0||o.disabled){return}if(u.isContentEditable){return}if(!this.nativeDraggable&&Safari&&s&&s.tagName.toUpperCase()==="SELECT"){return}s=closest(s,o.draggable,r,false);if(s&&s.animated){return}if(lastDownEl===s){return}oldIndex=index(s);oldDraggableIndex=index(s,o.draggable);if(typeof c==="function"){if(c.call(this,e,s,this)){_dispatchEvent({sortable:n,rootEl:u,name:"filter",targetEl:s,toEl:r,fromEl:r});pluginEvent("filter",n,{evt:e});i&&e.preventDefault();return}}else if(c){c=c.split(",").some((function(t){t=closest(u,t.trim(),r,false);if(t){_dispatchEvent({sortable:n,rootEl:t,name:"filter",targetEl:s,fromEl:r,toEl:r});pluginEvent("filter",n,{evt:e});return true}}));if(c){i&&e.preventDefault();return}}if(o.handle&&!closest(u,o.handle,r,false)){return}this._prepareDragStart(e,a,s)},_prepareDragStart:function t(e,n,r){var o=this,i=o.el,l=o.options,a=i.ownerDocument,s;if(r&&!dragEl&&r.parentNode===i){var u=getRect(r);rootEl=i;dragEl=r;parentEl=dragEl.parentNode;nextEl=dragEl.nextSibling;lastDownEl=r;activeGroup=l.group;Sortable.dragged=dragEl;tapEvt={target:dragEl,clientX:(n||e).clientX,clientY:(n||e).clientY};tapDistanceLeft=tapEvt.clientX-u.left;tapDistanceTop=tapEvt.clientY-u.top;this._lastX=(n||e).clientX;this._lastY=(n||e).clientY;dragEl.style["will-change"]="all";s=function t(){pluginEvent("delayEnded",o,{evt:e});if(Sortable.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents();if(!FireFox&&o.nativeDraggable){dragEl.draggable=true}o._triggerDragStart(e,n);_dispatchEvent({sortable:o,name:"choose",originalEvent:e});toggleClass(dragEl,l.chosenClass,true)};l.ignore.split(",").forEach((function(t){find(dragEl,t.trim(),_disableDraggable)}));on(a,"dragover",nearestEmptyInsertDetectEvent);on(a,"mousemove",nearestEmptyInsertDetectEvent);on(a,"touchmove",nearestEmptyInsertDetectEvent);if(l.supportPointer){on(a,"pointerup",o._onDrop);!this.nativeDraggable&&on(a,"pointercancel",o._onDrop)}else{on(a,"mouseup",o._onDrop);on(a,"touchend",o._onDrop);on(a,"touchcancel",o._onDrop)}if(FireFox&&this.nativeDraggable){this.options.touchStartThreshold=4;dragEl.draggable=true}pluginEvent("delayStart",this,{evt:e});if(l.delay&&(!l.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Edge||IE11OrLess))){if(Sortable.eventCanceled){this._onDrop();return}if(l.supportPointer){on(a,"pointerup",o._disableDelayedDrag);on(a,"pointercancel",o._disableDelayedDrag)}else{on(a,"mouseup",o._disableDelayedDrag);on(a,"touchend",o._disableDelayedDrag);on(a,"touchcancel",o._disableDelayedDrag)}on(a,"mousemove",o._delayedDragTouchMoveHandler);on(a,"touchmove",o._delayedDragTouchMoveHandler);l.supportPointer&&on(a,"pointermove",o._delayedDragTouchMoveHandler);o._dragStartTimer=setTimeout(s,l.delay)}else{s()}}},_delayedDragTouchMoveHandler:function t(e){var n=e.touches?e.touches[0]:e;if(Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))){this._disableDelayedDrag()}},_disableDelayedDrag:function t(){dragEl&&_disableDraggable(dragEl);clearTimeout(this._dragStartTimer);this._disableDelayedDragEvents()},_disableDelayedDragEvents:function t(){var e=this.el.ownerDocument;off(e,"mouseup",this._disableDelayedDrag);off(e,"touchend",this._disableDelayedDrag);off(e,"touchcancel",this._disableDelayedDrag);off(e,"pointerup",this._disableDelayedDrag);off(e,"pointercancel",this._disableDelayedDrag);off(e,"mousemove",this._delayedDragTouchMoveHandler);off(e,"touchmove",this._delayedDragTouchMoveHandler);off(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function t(e,n){n=n||e.pointerType=="touch"&&e;if(!this.nativeDraggable||n){if(this.options.supportPointer){on(document,"pointermove",this._onTouchMove)}else if(n){on(document,"touchmove",this._onTouchMove)}else{on(document,"mousemove",this._onTouchMove)}}else{on(dragEl,"dragend",this);on(rootEl,"dragstart",this._onDragStart)}try{if(document.selection){_nextTick((function(){document.selection.empty()}))}else{window.getSelection().removeAllRanges()}}catch(t){}},_dragStarted:function t(e,n){awaitingDragStarted=false;if(rootEl&&dragEl){pluginEvent("dragStarted",this,{evt:n});if(this.nativeDraggable){on(document,"dragover",_checkOutsideTargetEl)}var r=this.options;!e&&toggleClass(dragEl,r.dragClass,false);toggleClass(dragEl,r.ghostClass,true);Sortable.active=this;e&&this._appendGhost();_dispatchEvent({sortable:this,name:"start",originalEvent:n})}else{this._nulling()}},_emulateDragOver:function t(){if(touchEvt){this._lastX=touchEvt.clientX;this._lastY=touchEvt.clientY;_hideGhostForTarget();var e=document.elementFromPoint(touchEvt.clientX,touchEvt.clientY);var n=e;while(e&&e.shadowRoot){e=e.shadowRoot.elementFromPoint(touchEvt.clientX,touchEvt.clientY);if(e===n)break;n=e}dragEl.parentNode[expando]._isOutsideThisEl(e);if(n){do{if(n[expando]){var r=void 0;r=n[expando]._onDragOver({clientX:touchEvt.clientX,clientY:touchEvt.clientY,target:e,rootEl:n});if(r&&!this.options.dragoverBubble){break}}e=n}while(n=getParentOrHost(n))}_unhideGhostForTarget()}},_onTouchMove:function t(e){if(tapEvt){var n=this.options,r=n.fallbackTolerance,o=n.fallbackOffset,i=e.touches?e.touches[0]:e,l=ghostEl&&matrix(ghostEl,true),a=ghostEl&&l&&l.a,s=ghostEl&&l&&l.d,u=PositionGhostAbsolutely&&ghostRelativeParent&&getRelativeScrollOffset(ghostRelativeParent),c=(i.clientX-tapEvt.clientX+o.x)/(a||1)+(u?u[0]-ghostRelativeParentInitialScroll[0]:0)/(a||1),f=(i.clientY-tapEvt.clientY+o.y)/(s||1)+(u?u[1]-ghostRelativeParentInitialScroll[1]:0)/(s||1);if(!Sortable.active&&!awaitingDragStarted){if(r&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<r){return}this._onDragStart(e,true)}if(ghostEl){if(l){l.e+=c-(lastDx||0);l.f+=f-(lastDy||0)}else{l={a:1,b:0,c:0,d:1,e:c,f:f}}var d="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");css(ghostEl,"webkitTransform",d);css(ghostEl,"mozTransform",d);css(ghostEl,"msTransform",d);css(ghostEl,"transform",d);lastDx=c;lastDy=f;touchEvt=i}e.cancelable&&e.preventDefault()}},_appendGhost:function t(){if(!ghostEl){var e=this.options.fallbackOnBody?document.body:rootEl,n=getRect(dragEl,true,PositionGhostAbsolutely,true,e),r=this.options;if(PositionGhostAbsolutely){ghostRelativeParent=e;while(css(ghostRelativeParent,"position")==="static"&&css(ghostRelativeParent,"transform")==="none"&&ghostRelativeParent!==document){ghostRelativeParent=ghostRelativeParent.parentNode}if(ghostRelativeParent!==document.body&&ghostRelativeParent!==document.documentElement){if(ghostRelativeParent===document)ghostRelativeParent=getWindowScrollingElement();n.top+=ghostRelativeParent.scrollTop;n.left+=ghostRelativeParent.scrollLeft}else{ghostRelativeParent=getWindowScrollingElement()}ghostRelativeParentInitialScroll=getRelativeScrollOffset(ghostRelativeParent)}ghostEl=dragEl.cloneNode(true);toggleClass(ghostEl,r.ghostClass,false);toggleClass(ghostEl,r.fallbackClass,true);toggleClass(ghostEl,r.dragClass,true);css(ghostEl,"transition","");css(ghostEl,"transform","");css(ghostEl,"box-sizing","border-box");css(ghostEl,"margin",0);css(ghostEl,"top",n.top);css(ghostEl,"left",n.left);css(ghostEl,"width",n.width);css(ghostEl,"height",n.height);css(ghostEl,"opacity","0.8");css(ghostEl,"position",PositionGhostAbsolutely?"absolute":"fixed");css(ghostEl,"zIndex","100000");css(ghostEl,"pointerEvents","none");Sortable.ghost=ghostEl;e.appendChild(ghostEl);css(ghostEl,"transform-origin",tapDistanceLeft/parseInt(ghostEl.style.width)*100+"% "+tapDistanceTop/parseInt(ghostEl.style.height)*100+"%")}},_onDragStart:function t(e,n){var r=this;var o=e.dataTransfer;var i=r.options;pluginEvent("dragStart",this,{evt:e});if(Sortable.eventCanceled){this._onDrop();return}pluginEvent("setupClone",this);if(!Sortable.eventCanceled){cloneEl=clone(dragEl);cloneEl.removeAttribute("id");cloneEl.draggable=false;cloneEl.style["will-change"]="";this._hideClone();toggleClass(cloneEl,this.options.chosenClass,false);Sortable.clone=cloneEl}r.cloneId=_nextTick((function(){pluginEvent("clone",r);if(Sortable.eventCanceled)return;if(!r.options.removeCloneOnHide){rootEl.insertBefore(cloneEl,dragEl)}r._hideClone();_dispatchEvent({sortable:r,name:"clone"})}));!n&&toggleClass(dragEl,i.dragClass,true);if(n){ignoreNextClick=true;r._loopId=setInterval(r._emulateDragOver,50)}else{off(document,"mouseup",r._onDrop);off(document,"touchend",r._onDrop);off(document,"touchcancel",r._onDrop);if(o){o.effectAllowed="move";i.setData&&i.setData.call(r,o,dragEl)}on(document,"drop",r);css(dragEl,"transform","translateZ(0)")}awaitingDragStarted=true;r._dragStartId=_nextTick(r._dragStarted.bind(r,n,e));on(document,"selectstart",r);moved=true;window.getSelection().removeAllRanges();if(Safari){css(document.body,"user-select","none")}},_onDragOver:function t(e){var n=this.el,r=e.target,o,i,l,a=this.options,s=a.group,u=Sortable.active,c=activeGroup===s,f=a.sort,d=putSortable||u,h,g=this,v=false;if(_silent)return;function E(t,a){pluginEvent(t,g,_objectSpread2({evt:e,isOwner:c,axis:h?"vertical":"horizontal",revert:l,dragRect:o,targetRect:i,canSort:f,fromSortable:d,target:r,completed:m,onMove:function t(r,i){return _onMove(rootEl,n,dragEl,o,r,getRect(r),e,i)},changed:b},a))}function p(){E("dragOverAnimationCapture");g.captureAnimationState();if(g!==d){d.captureAnimationState()}}function m(t){E("dragOverCompleted",{insertion:t});if(t){if(c){u._hideClone()}else{u._showClone(g)}if(g!==d){toggleClass(dragEl,putSortable?putSortable.options.ghostClass:u.options.ghostClass,false);toggleClass(dragEl,a.ghostClass,true)}if(putSortable!==g&&g!==Sortable.active){putSortable=g}else if(g===Sortable.active&&putSortable){putSortable=null}if(d===g){g._ignoreWhileAnimating=r}g.animateAll((function(){E("dragOverAnimationComplete");g._ignoreWhileAnimating=null}));if(g!==d){d.animateAll();d._ignoreWhileAnimating=null}}if(r===dragEl&&!dragEl.animated||r===n&&!r.animated){lastTarget=null}if(!a.dragoverBubble&&!e.rootEl&&r!==document){dragEl.parentNode[expando]._isOutsideThisEl(e.target);!t&&nearestEmptyInsertDetectEvent(e)}!a.dragoverBubble&&e.stopPropagation&&e.stopPropagation();return v=true}function b(){newIndex=index(dragEl);newDraggableIndex=index(dragEl,a.draggable);_dispatchEvent({sortable:g,name:"change",toEl:n,newIndex:newIndex,newDraggableIndex:newDraggableIndex,originalEvent:e})}if(e.preventDefault!==void 0){e.cancelable&&e.preventDefault()}r=closest(r,a.draggable,n,true);E("dragOver");if(Sortable.eventCanceled)return v;if(dragEl.contains(e.target)||r.animated&&r.animatingX&&r.animatingY||g._ignoreWhileAnimating===r){return m(false)}ignoreNextClick=false;if(u&&!a.disabled&&(c?f||(l=parentEl!==rootEl):putSortable===this||(this.lastPutMode=activeGroup.checkPull(this,u,dragEl,e))&&s.checkPut(this,u,dragEl,e))){h=this._getDirection(e,r)==="vertical";o=getRect(dragEl);E("dragOverValid");if(Sortable.eventCanceled)return v;if(l){parentEl=rootEl;p();this._hideClone();E("revert");if(!Sortable.eventCanceled){if(nextEl){rootEl.insertBefore(dragEl,nextEl)}else{rootEl.appendChild(dragEl)}}return m(true)}var S=lastChild(n,a.draggable);if(!S||_ghostIsLast(e,h,this)&&!S.animated){if(S===dragEl){return m(false)}if(S&&n===e.target){r=S}if(r){i=getRect(r)}if(_onMove(rootEl,n,dragEl,o,r,i,e,!!r)!==false){p();if(S&&S.nextSibling){n.insertBefore(dragEl,S.nextSibling)}else{n.appendChild(dragEl)}parentEl=n;b();return m(true)}}else if(S&&_ghostIsFirst(e,h,this)){var w=getChild(n,0,a,true);if(w===dragEl){return m(false)}r=w;i=getRect(r);if(_onMove(rootEl,n,dragEl,o,r,i,e,false)!==false){p();n.insertBefore(dragEl,w);parentEl=n;b();return m(true)}}else if(r.parentNode===n){i=getRect(r);var x=0,I,_=dragEl.parentNode!==n,y=!_dragElInRowColumn(dragEl.animated&&dragEl.toRect||o,r.animated&&r.toRect||i,h),D=h?"top":"left",C=isScrolledPast(r,"top","top")||isScrolledPast(dragEl,"top","top"),T=C?C.scrollTop:void 0;if(lastTarget!==r){I=i[D];pastFirstInvertThresh=false;isCircumstantialInvert=!y&&a.invertSwap||_}x=_getSwapDirection(e,r,i,h,y?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,isCircumstantialInvert,lastTarget===r);var P;if(x!==0){var R=index(dragEl);do{R-=x;P=parentEl.children[R]}while(P&&(css(P,"display")==="none"||P===ghostEl))}if(x===0||P===r){return m(false)}lastTarget=r;lastDirection=x;var O=r.nextElementSibling,A=false;A=x===1;var M=_onMove(rootEl,n,dragEl,o,r,i,e,A);if(M!==false){if(M===1||M===-1){A=M===1}_silent=true;setTimeout(_unsilent,30);p();if(A&&!O){n.appendChild(dragEl)}else{r.parentNode.insertBefore(dragEl,A?O:r)}if(C){scrollBy(C,0,T-C.scrollTop)}parentEl=dragEl.parentNode;if(I!==undefined&&!isCircumstantialInvert){targetMoveDistance=Math.abs(I-getRect(r)[D])}b();return m(true)}}if(n.contains(dragEl)){return m(false)}}return false},_ignoreWhileAnimating:null,_offMoveEvents:function t(){off(document,"mousemove",this._onTouchMove);off(document,"touchmove",this._onTouchMove);off(document,"pointermove",this._onTouchMove);off(document,"dragover",nearestEmptyInsertDetectEvent);off(document,"mousemove",nearestEmptyInsertDetectEvent);off(document,"touchmove",nearestEmptyInsertDetectEvent)},_offUpEvents:function t(){var e=this.el.ownerDocument;off(e,"mouseup",this._onDrop);off(e,"touchend",this._onDrop);off(e,"pointerup",this._onDrop);off(e,"pointercancel",this._onDrop);off(e,"touchcancel",this._onDrop);off(document,"selectstart",this)},_onDrop:function t(e){var n=this.el,r=this.options;newIndex=index(dragEl);newDraggableIndex=index(dragEl,r.draggable);pluginEvent("drop",this,{evt:e});parentEl=dragEl&&dragEl.parentNode;newIndex=index(dragEl);newDraggableIndex=index(dragEl,r.draggable);if(Sortable.eventCanceled){this._nulling();return}awaitingDragStarted=false;isCircumstantialInvert=false;pastFirstInvertThresh=false;clearInterval(this._loopId);clearTimeout(this._dragStartTimer);_cancelNextTick(this.cloneId);_cancelNextTick(this._dragStartId);if(this.nativeDraggable){off(document,"drop",this);off(n,"dragstart",this._onDragStart)}this._offMoveEvents();this._offUpEvents();if(Safari){css(document.body,"user-select","")}css(dragEl,"transform","");if(e){if(moved){e.cancelable&&e.preventDefault();!r.dropBubble&&e.stopPropagation()}ghostEl&&ghostEl.parentNode&&ghostEl.parentNode.removeChild(ghostEl);if(rootEl===parentEl||putSortable&&putSortable.lastPutMode!=="clone"){cloneEl&&cloneEl.parentNode&&cloneEl.parentNode.removeChild(cloneEl)}if(dragEl){if(this.nativeDraggable){off(dragEl,"dragend",this)}_disableDraggable(dragEl);dragEl.style["will-change"]="";if(moved&&!awaitingDragStarted){toggleClass(dragEl,putSortable?putSortable.options.ghostClass:this.options.ghostClass,false)}toggleClass(dragEl,this.options.chosenClass,false);_dispatchEvent({sortable:this,name:"unchoose",toEl:parentEl,newIndex:null,newDraggableIndex:null,originalEvent:e});if(rootEl!==parentEl){if(newIndex>=0){_dispatchEvent({rootEl:parentEl,name:"add",toEl:parentEl,fromEl:rootEl,originalEvent:e});_dispatchEvent({sortable:this,name:"remove",toEl:parentEl,originalEvent:e});_dispatchEvent({rootEl:parentEl,name:"sort",toEl:parentEl,fromEl:rootEl,originalEvent:e});_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:e})}putSortable&&putSortable.save()}else{if(newIndex!==oldIndex){if(newIndex>=0){_dispatchEvent({sortable:this,name:"update",toEl:parentEl,originalEvent:e});_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:e})}}}if(Sortable.active){if(newIndex==null||newIndex===-1){newIndex=oldIndex;newDraggableIndex=oldDraggableIndex}_dispatchEvent({sortable:this,name:"end",toEl:parentEl,originalEvent:e});this.save()}}}this._nulling()},_nulling:function t(){pluginEvent("nulling",this);rootEl=dragEl=parentEl=ghostEl=nextEl=cloneEl=lastDownEl=cloneHidden=tapEvt=touchEvt=moved=newIndex=newDraggableIndex=oldIndex=oldDraggableIndex=lastTarget=lastDirection=putSortable=activeGroup=Sortable.dragged=Sortable.ghost=Sortable.clone=Sortable.active=null;savedInputChecked.forEach((function(t){t.checked=true}));savedInputChecked.length=lastDx=lastDy=0},handleEvent:function t(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":if(dragEl){this._onDragOver(e);_globalDragOver(e)}break;case"selectstart":e.preventDefault();break}},toArray:function t(){var e=[],n,r=this.el.children,o=0,i=r.length,l=this.options;for(;o<i;o++){n=r[o];if(closest(n,l.draggable,this.el,false)){e.push(n.getAttribute(l.dataIdAttr)||_generateId(n))}}return e},sort:function t(e,n){var r={},o=this.el;this.toArray().forEach((function(t,e){var n=o.children[e];if(closest(n,this.options.draggable,o,false)){r[t]=n}}),this);n&&this.captureAnimationState();e.forEach((function(t){if(r[t]){o.removeChild(r[t]);o.appendChild(r[t])}}));n&&this.animateAll()},save:function t(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function t(e,n){return closest(e,n||this.options.draggable,this.el,false)},option:function t(e,n){var r=this.options;if(n===void 0){return r[e]}else{var o=PluginManager.modifyOption(this,e,n);if(typeof o!=="undefined"){r[e]=o}else{r[e]=n}if(e==="group"){_prepareGroup(r)}}},destroy:function t(){pluginEvent("destroy",this);var e=this.el;e[expando]=null;off(e,"mousedown",this._onTapStart);off(e,"touchstart",this._onTapStart);off(e,"pointerdown",this._onTapStart);if(this.nativeDraggable){off(e,"dragover",this);off(e,"dragenter",this)}Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")}));this._onDrop();this._disableDelayedDragEvents();sortables.splice(sortables.indexOf(this.el),1);this.el=e=null},_hideClone:function t(){if(!cloneHidden){pluginEvent("hideClone",this);if(Sortable.eventCanceled)return;css(cloneEl,"display","none");if(this.options.removeCloneOnHide&&cloneEl.parentNode){cloneEl.parentNode.removeChild(cloneEl)}cloneHidden=true}},_showClone:function t(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(cloneHidden){pluginEvent("showClone",this);if(Sortable.eventCanceled)return;if(dragEl.parentNode==rootEl&&!this.options.group.revertClone){rootEl.insertBefore(cloneEl,dragEl)}else if(nextEl){rootEl.insertBefore(cloneEl,nextEl)}else{rootEl.appendChild(cloneEl)}if(this.options.group.revertClone){this.animate(dragEl,cloneEl)}css(cloneEl,"display","");cloneHidden=false}}};function _globalDragOver(t){if(t.dataTransfer){t.dataTransfer.dropEffect="move"}t.cancelable&&t.preventDefault()}function _onMove(t,e,n,r,o,i,l,a){var s,u=t[expando],c=u.options.onMove,f;if(window.CustomEvent&&!IE11OrLess&&!Edge){s=new CustomEvent("move",{bubbles:true,cancelable:true})}else{s=document.createEvent("Event");s.initEvent("move",true,true)}s.to=e;s.from=t;s.dragged=n;s.draggedRect=r;s.related=o||e;s.relatedRect=i||getRect(e);s.willInsertAfter=a;s.originalEvent=l;t.dispatchEvent(s);if(c){f=c.call(u,s,l)}return f}function _disableDraggable(t){t.draggable=false}function _unsilent(){_silent=false}function _ghostIsFirst(t,e,n){var r=getRect(getChild(n.el,0,n.options,true));var o=getChildContainingRectFromElement(n.el,n.options,ghostEl);var i=10;return e?t.clientX<o.left-i||t.clientY<r.top&&t.clientX<r.right:t.clientY<o.top-i||t.clientY<r.bottom&&t.clientX<r.left}function _ghostIsLast(t,e,n){var r=getRect(lastChild(n.el,n.options.draggable));var o=getChildContainingRectFromElement(n.el,n.options,ghostEl);var i=10;return e?t.clientX>o.right+i||t.clientY>r.bottom&&t.clientX>r.left:t.clientY>o.bottom+i||t.clientX>r.right&&t.clientY>r.top}function _getSwapDirection(t,e,n,r,o,i,l,a){var s=r?t.clientY:t.clientX,u=r?n.height:n.width,c=r?n.top:n.left,f=r?n.bottom:n.right,d=false;if(!l){if(a&&targetMoveDistance<u*o){if(!pastFirstInvertThresh&&(lastDirection===1?s>c+u*i/2:s<f-u*i/2)){pastFirstInvertThresh=true}if(!pastFirstInvertThresh){if(lastDirection===1?s<c+targetMoveDistance:s>f-targetMoveDistance){return-lastDirection}}else{d=true}}else{if(s>c+u*(1-o)/2&&s<f-u*(1-o)/2){return _getInsertDirection(e)}}}d=d||l;if(d){if(s<c+u*i/2||s>f-u*i/2){return s>c+u/2?1:-1}}return 0}function _getInsertDirection(t){if(index(dragEl)<index(t)){return 1}else{return-1}}function _generateId(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 _saveInputCheckedState(t){savedInputChecked.length=0;var e=t.getElementsByTagName("input");var n=e.length;while(n--){var r=e[n];r.checked&&savedInputChecked.push(r)}}function _nextTick(t){return setTimeout(t,0)}function _cancelNextTick(t){return clearTimeout(t)}if(documentExists){on(document,"touchmove",(function(t){if((Sortable.active||awaitingDragStarted)&&t.cancelable){t.preventDefault()}}))}Sortable.utils={on:on,off:off,css:css,find:find,is:function t(e,n){return!!closest(e,n,e,false)},extend:extend,throttle:throttle,closest:closest,toggleClass:toggleClass,clone:clone,index:index,nextTick:_nextTick,cancelNextTick:_cancelNextTick,detectDirection:_detectDirection,getChild:getChild,expando:expando};Sortable.get=function(t){return t[expando]};Sortable.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++){e[n]=arguments[n]}if(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))}if(t.utils)Sortable.utils=_objectSpread2(_objectSpread2({},Sortable.utils),t.utils);PluginManager.mount(t)}))};Sortable.create=function(t,e){return new Sortable(t,e)};Sortable.version=version;var autoScrolls=[],scrollEl,scrollRootEl,scrolling=false,lastAutoScrollX,lastAutoScrollY,touchEvt$1,pointerElemChangedInterval;function AutoScrollPlugin(){function t(){this.defaults={scroll:true,forceAutoScrollFallback:false,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:true};for(var t in this){if(t.charAt(0)==="_"&&typeof this[t]==="function"){this[t]=this[t].bind(this)}}}t.prototype={dragStarted:function t(e){var n=e.originalEvent;if(this.sortable.nativeDraggable){on(document,"dragover",this._handleAutoScroll)}else{if(this.options.supportPointer){on(document,"pointermove",this._handleFallbackAutoScroll)}else if(n.touches){on(document,"touchmove",this._handleFallbackAutoScroll)}else{on(document,"mousemove",this._handleFallbackAutoScroll)}}},dragOverCompleted:function t(e){var n=e.originalEvent;if(!this.options.dragOverBubble&&!n.rootEl){this._handleAutoScroll(n)}},drop:function t(){if(this.sortable.nativeDraggable){off(document,"dragover",this._handleAutoScroll)}else{off(document,"pointermove",this._handleFallbackAutoScroll);off(document,"touchmove",this._handleFallbackAutoScroll);off(document,"mousemove",this._handleFallbackAutoScroll)}clearPointerElemChangedInterval();clearAutoScrolls();cancelThrottle()},nulling:function t(){touchEvt$1=scrollRootEl=scrollEl=scrolling=pointerElemChangedInterval=lastAutoScrollX=lastAutoScrollY=null;autoScrolls.length=0},_handleFallbackAutoScroll:function t(e){this._handleAutoScroll(e,true)},_handleAutoScroll:function t(e,n){var r=this;var o=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,l=document.elementFromPoint(o,i);touchEvt$1=e;if(n||this.options.forceAutoScrollFallback||Edge||IE11OrLess||Safari){autoScroll(e,this.options,l,n);var a=getParentAutoScrollElement(l,true);if(scrolling&&(!pointerElemChangedInterval||o!==lastAutoScrollX||i!==lastAutoScrollY)){pointerElemChangedInterval&&clearPointerElemChangedInterval();pointerElemChangedInterval=setInterval((function(){var t=getParentAutoScrollElement(document.elementFromPoint(o,i),true);if(t!==a){a=t;clearAutoScrolls()}autoScroll(e,r.options,t,n)}),10);lastAutoScrollX=o;lastAutoScrollY=i}}else{if(!this.options.bubbleScroll||getParentAutoScrollElement(l,true)===getWindowScrollingElement()){clearAutoScrolls();return}autoScroll(e,this.options,getParentAutoScrollElement(l,false),false)}}};return _extends(t,{pluginName:"scroll",initializeByDefault:true})}function clearAutoScrolls(){autoScrolls.forEach((function(t){clearInterval(t.pid)}));autoScrolls=[]}function clearPointerElemChangedInterval(){clearInterval(pointerElemChangedInterval)}var autoScroll=throttle((function(t,e,n,r){if(!e.scroll)return;var o=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,a=e.scrollSpeed,s=getWindowScrollingElement();var u=false,c;if(scrollRootEl!==n){scrollRootEl=n;clearAutoScrolls();scrollEl=e.scroll;c=e.scrollFn;if(scrollEl===true){scrollEl=getParentAutoScrollElement(n,true)}}var f=0;var d=scrollEl;do{var h=d,g=getRect(h),v=g.top,E=g.bottom,p=g.left,m=g.right,b=g.width,S=g.height,w=void 0,x=void 0,I=h.scrollWidth,_=h.scrollHeight,y=css(h),D=h.scrollLeft,C=h.scrollTop;if(h===s){w=b<I&&(y.overflowX==="auto"||y.overflowX==="scroll"||y.overflowX==="visible");x=S<_&&(y.overflowY==="auto"||y.overflowY==="scroll"||y.overflowY==="visible")}else{w=b<I&&(y.overflowX==="auto"||y.overflowX==="scroll");x=S<_&&(y.overflowY==="auto"||y.overflowY==="scroll")}var T=w&&(Math.abs(m-o)<=l&&D+b<I)-(Math.abs(p-o)<=l&&!!D);var P=x&&(Math.abs(E-i)<=l&&C+S<_)-(Math.abs(v-i)<=l&&!!C);if(!autoScrolls[f]){for(var R=0;R<=f;R++){if(!autoScrolls[R]){autoScrolls[R]={}}}}if(autoScrolls[f].vx!=T||autoScrolls[f].vy!=P||autoScrolls[f].el!==h){autoScrolls[f].el=h;autoScrolls[f].vx=T;autoScrolls[f].vy=P;clearInterval(autoScrolls[f].pid);if(T!=0||P!=0){u=true;autoScrolls[f].pid=setInterval(function(){if(r&&this.layer===0){Sortable.active._onTouchMove(touchEvt$1)}var e=autoScrolls[this.layer].vy?autoScrolls[this.layer].vy*a:0;var n=autoScrolls[this.layer].vx?autoScrolls[this.layer].vx*a:0;if(typeof c==="function"){if(c.call(Sortable.dragged.parentNode[expando],n,e,t,touchEvt$1,autoScrolls[this.layer].el)!=="continue"){return}}scrollBy(autoScrolls[this.layer].el,n,e)}.bind({layer:f}),24)}}f++}while(e.bubbleScroll&&d!==s&&(d=getParentAutoScrollElement(d,false)));scrolling=u}),30);var drop=function t(e){var n=e.originalEvent,r=e.putSortable,o=e.dragEl,i=e.activeSortable,l=e.dispatchSortableEvent,a=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(!n)return;var u=r||i;a();var c=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n;var f=document.elementFromPoint(c.clientX,c.clientY);s();if(u&&!u.el.contains(f)){l("spill");this.onSpill({dragEl:o,putSortable:r})}};function Revert(){}Revert.prototype={startIndex:null,dragStart:function t(e){var n=e.oldDraggableIndex;this.startIndex=n},onSpill:function t(e){var n=e.dragEl,r=e.putSortable;this.sortable.captureAnimationState();if(r){r.captureAnimationState()}var o=getChild(this.sortable.el,this.startIndex,this.options);if(o){this.sortable.el.insertBefore(n,o)}else{this.sortable.el.appendChild(n)}this.sortable.animateAll();if(r){r.animateAll()}},drop:drop};_extends(Revert,{pluginName:"revertOnSpill"});function Remove(){}Remove.prototype={onSpill:function t(e){var n=e.dragEl,r=e.putSortable;var o=r||this.sortable;o.captureAnimationState();n.parentNode&&n.parentNode.removeChild(n);o.animateAll()},drop:drop};_extends(Remove,{pluginName:"removeOnSpill"});Sortable.mount(new AutoScrollPlugin);Sortable.mount(Remove,Revert);var pdsSortableCss=".pds-sortable.sc-pds-sortable-h{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-sortable.pds-sortable--bordered.sc-pds-sortable-h{border:var(--pine-border);border-radius:var(--pine-dimension-2xs)}";var PdsSortable=function(){function t(t){registerInstance(this,t);this.pdsSortableItemMoved=createEvent(this,"pdsSortableItemMoved");this.border=false;this.dividers=false;this.handleType="row"}t.prototype.classNames=function(){var t=["pds-sortable"];if(this.border){t.push("pds-sortable--bordered")}if(this.dividers){t.push("pds-sortable--divided")}if(this.handleType!==undefined){t.push("pds-sortable--handle-type-".concat(this.handleType))}return t.join(" ")};t.prototype.componentDidLoad=function(){var t=this;var e={animation:150,ghostClass:"pds-sortable-item--ghost",dragClass:"pds-sortable-item--drag",onEnd:function(e){t.pdsSortableItemMoved.emit(e)}};if(this.handleType==="handle"){e=Object.assign(Object.assign({},e),{handle:".pds-sortable-item__handle"})}Sortable.create(this.el,e)};t.prototype.render=function(){return h(Host,{key:"0af78db3e32adf714d10fb08ff4318f7c84aaef9",class:this.classNames(),id:this.componentId},h("slot",{key:"1e7ac27c41de163ea4d59c6186a1282eb5f0b27d"}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();PdsSortable.style=pdsSortableCss;export{PdsSortable as pds_sortable};
|
|
7
|
+
*/function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);if(e){r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))}n.push.apply(n,r)}return n}function _objectSpread2(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};if(e%2){ownKeys(Object(n),true).forEach((function(e){_defineProperty(t,e,n[e])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(t,Object.getOwnPropertyDescriptors(n))}else{ownKeys(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}}return t}function _typeof(t){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function(t){return typeof t}}else{_typeof=function(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}}return _typeof(t)}function _defineProperty(t,e,n){if(e in t){Object.defineProperty(t,e,{value:n,enumerable:true,configurable:true,writable:true})}else{t[e]=n}return t}function _extends(){_extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n){if(Object.prototype.hasOwnProperty.call(n,r)){t[r]=n[r]}}}return t};return _extends.apply(this,arguments)}function _objectWithoutPropertiesLoose(t,e){if(t==null)return{};var n={};var r=Object.keys(t);var o,i;for(i=0;i<r.length;i++){o=r[i];if(e.indexOf(o)>=0)continue;n[o]=t[o]}return n}function _objectWithoutProperties(t,e){if(t==null)return{};var n=_objectWithoutPropertiesLoose(t,e);var r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++){r=i[o];if(e.indexOf(r)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(t,r))continue;n[r]=t[r]}}return n}var version="1.15.6";function userAgent(t){if(typeof window!=="undefined"&&window.navigator){return!!navigator.userAgent.match(t)}}var IE11OrLess=userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);var Edge=userAgent(/Edge/i);var FireFox=userAgent(/firefox/i);var Safari=userAgent(/safari/i)&&!userAgent(/chrome/i)&&!userAgent(/android/i);var IOS=userAgent(/iP(ad|od|hone)/i);var ChromeForAndroid=userAgent(/chrome/i)&&userAgent(/android/i);var captureMode={capture:false,passive:false};function on(t,e,n){t.addEventListener(e,n,!IE11OrLess&&captureMode)}function off(t,e,n){t.removeEventListener(e,n,!IE11OrLess&&captureMode)}function matches(t,e){if(!e)return;e[0]===">"&&(e=e.substring(1));if(t){try{if(t.matches){return t.matches(e)}else if(t.msMatchesSelector){return t.msMatchesSelector(e)}else if(t.webkitMatchesSelector){return t.webkitMatchesSelector(e)}}catch(t){return false}}return false}function getParentOrHost(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function closest(t,e,n,r){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&matches(t,e):matches(t,e))||r&&t===n){return t}if(t===n)break}while(t=getParentOrHost(t))}return null}var R_SPACE=/\s+/g;function toggleClass(t,e,n){if(t&&e){if(t.classList){t.classList[n?"add":"remove"](e)}else{var r=(" "+t.className+" ").replace(R_SPACE," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(R_SPACE," ")}}}function css(t,e,n){var r=t&&t.style;if(r){if(n===void 0){if(document.defaultView&&document.defaultView.getComputedStyle){n=document.defaultView.getComputedStyle(t,"")}else if(t.currentStyle){n=t.currentStyle}return e===void 0?n:n[e]}else{if(!(e in r)&&e.indexOf("webkit")===-1){e="-webkit-"+e}r[e]=n+(typeof n==="string"?"":"px")}}}function matrix(t,e){var n="";if(typeof t==="string"){n=t}else{do{var r=css(t,"transform");if(r&&r!=="none"){n=r+" "+n}}while(!e&&(t=t.parentNode))}var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function find(t,e,n){if(t){var r=t.getElementsByTagName(e),o=0,i=r.length;if(n){for(;o<i;o++){n(r[o],o)}}return r}return[]}function getWindowScrollingElement(){var t=document.scrollingElement;if(t){return t}else{return document.documentElement}}function getRect(t,e,n,r,o){if(!t.getBoundingClientRect&&t!==window)return;var i,l,a,s,u,c,f;if(t!==window&&t.parentNode&&t!==getWindowScrollingElement()){i=t.getBoundingClientRect();l=i.top;a=i.left;s=i.bottom;u=i.right;c=i.height;f=i.width}else{l=0;a=0;s=window.innerHeight;u=window.innerWidth;c=window.innerHeight;f=window.innerWidth}if((e||n)&&t!==window){o=o||t.parentNode;if(!IE11OrLess){do{if(o&&o.getBoundingClientRect&&(css(o,"transform")!=="none"||n&&css(o,"position")!=="static")){var d=o.getBoundingClientRect();l-=d.top+parseInt(css(o,"border-top-width"));a-=d.left+parseInt(css(o,"border-left-width"));s=l+i.height;u=a+i.width;break}}while(o=o.parentNode)}}if(r&&t!==window){var h=matrix(o||t),g=h&&h.a,v=h&&h.d;if(h){l/=v;a/=g;f/=g;c/=v;s=l+c;u=a+f}}return{top:l,left:a,bottom:s,right:u,width:f,height:c}}function isScrolledPast(t,e,n){var r=getParentAutoScrollElement(t,true),o=getRect(t)[e];while(r){var i=getRect(r)[n],l=void 0;{l=o>=i}if(!l)return r;if(r===getWindowScrollingElement())break;r=getParentAutoScrollElement(r,false)}return false}function getChild(t,e,n,r){var o=0,i=0,l=t.children;while(i<l.length){if(l[i].style.display!=="none"&&l[i]!==Sortable.ghost&&(r||l[i]!==Sortable.dragged)&&closest(l[i],n.draggable,t,false)){if(o===e){return l[i]}o++}i++}return null}function lastChild(t,e){var n=t.lastElementChild;while(n&&(n===Sortable.ghost||css(n,"display")==="none"||e&&!matches(n,e))){n=n.previousElementSibling}return n||null}function index(t,e){var n=0;if(!t||!t.parentNode){return-1}while(t=t.previousElementSibling){if(t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==Sortable.clone&&(!e||matches(t,e))){n++}}return n}function getRelativeScrollOffset(t){var e=0,n=0,r=getWindowScrollingElement();if(t){do{var o=matrix(t),i=o.a,l=o.d;e+=t.scrollLeft*i;n+=t.scrollTop*l}while(t!==r&&(t=t.parentNode))}return[e,n]}function indexOfObject(t,e){for(var n in t){if(!t.hasOwnProperty(n))continue;for(var r in e){if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n)}}return-1}function getParentAutoScrollElement(t,e){if(!t||!t.getBoundingClientRect)return getWindowScrollingElement();var n=t;var r=false;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=css(n);if(n.clientWidth<n.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return getWindowScrollingElement();if(r||e)return n;r=true}}}while(n=n.parentNode);return getWindowScrollingElement()}function extend(t,e){if(t&&e){for(var n in e){if(e.hasOwnProperty(n)){t[n]=e[n]}}}return t}function isRectEqual(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)}var _throttleTimeout;function throttle(t,e){return function(){if(!_throttleTimeout){var n=arguments,r=this;if(n.length===1){t.call(r,n[0])}else{t.apply(r,n)}_throttleTimeout=setTimeout((function(){_throttleTimeout=void 0}),e)}}}function cancelThrottle(){clearTimeout(_throttleTimeout);_throttleTimeout=void 0}function scrollBy(t,e,n){t.scrollLeft+=e;t.scrollTop+=n}function clone(t){var e=window.Polymer;var n=window.jQuery||window.Zepto;if(e&&e.dom){return e.dom(t).cloneNode(true)}else if(n){return n(t).clone(true)[0]}else{return t.cloneNode(true)}}function getChildContainingRectFromElement(t,e,n){var r={};Array.from(t.children).forEach((function(o){var i,l,a,s;if(!closest(o,e.draggable,t,false)||o.animated||o===n)return;var u=getRect(o);r.left=Math.min((i=r.left)!==null&&i!==void 0?i:Infinity,u.left);r.top=Math.min((l=r.top)!==null&&l!==void 0?l:Infinity,u.top);r.right=Math.max((a=r.right)!==null&&a!==void 0?a:-Infinity,u.right);r.bottom=Math.max((s=r.bottom)!==null&&s!==void 0?s:-Infinity,u.bottom)}));r.width=r.right-r.left;r.height=r.bottom-r.top;r.x=r.left;r.y=r.top;return r}var expando="Sortable"+(new Date).getTime();function AnimationStateManager(){var t=[],e;return{captureAnimationState:function e(){t=[];if(!this.options.animation)return;var n=[].slice.call(this.el.children);n.forEach((function(e){if(css(e,"display")==="none"||e===Sortable.ghost)return;t.push({target:e,rect:getRect(e)});var n=_objectSpread2({},t[t.length-1].rect);if(e.thisAnimationDuration){var r=matrix(e,true);if(r){n.top-=r.f;n.left-=r.e}}e.fromRect=n}))},addAnimationState:function e(n){t.push(n)},removeAnimationState:function e(n){t.splice(indexOfObject(t,{target:n}),1)},animateAll:function n(r){var o=this;if(!this.options.animation){clearTimeout(e);if(typeof r==="function")r();return}var i=false,l=0;t.forEach((function(t){var e=0,n=t.target,r=n.fromRect,a=getRect(n),s=n.prevFromRect,u=n.prevToRect,c=t.rect,f=matrix(n,true);if(f){a.top-=f.f;a.left-=f.e}n.toRect=a;if(n.thisAnimationDuration){if(isRectEqual(s,a)&&!isRectEqual(r,a)&&(c.top-a.top)/(c.left-a.left)===(r.top-a.top)/(r.left-a.left)){e=calculateRealTime(c,s,u,o.options)}}if(!isRectEqual(a,r)){n.prevFromRect=r;n.prevToRect=a;if(!e){e=o.options.animation}o.animate(n,c,a,e)}if(e){i=true;l=Math.max(l,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(e);if(!i){if(typeof r==="function")r()}else{e=setTimeout((function(){if(typeof r==="function")r()}),l)}t=[]},animate:function t(e,n,r,o){if(o){css(e,"transition","");css(e,"transform","");var i=matrix(this.el),l=i&&i.a,a=i&&i.d,s=(n.left-r.left)/(l||1),u=(n.top-r.top)/(a||1);e.animatingX=!!s;e.animatingY=!!u;css(e,"transform","translate3d("+s+"px,"+u+"px,0)");this.forRepaintDummy=repaint(e);css(e,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:""));css(e,"transform","translate3d(0,0,0)");typeof e.animated==="number"&&clearTimeout(e.animated);e.animated=setTimeout((function(){css(e,"transition","");css(e,"transform","");e.animated=false;e.animatingX=false;e.animatingY=false}),o)}}}}function repaint(t){return t.offsetWidth}function calculateRealTime(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 plugins=[];var defaults={initializeByDefault:true};var PluginManager={mount:function t(e){for(var n in defaults){if(defaults.hasOwnProperty(n)&&!(n in e)){e[n]=defaults[n]}}plugins.forEach((function(t){if(t.pluginName===e.pluginName){throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}}));plugins.push(e)},pluginEvent:function t(e,n,r){var o=this;this.eventCanceled=false;r.cancel=function(){o.eventCanceled=true};var i=e+"Global";plugins.forEach((function(t){if(!n[t.pluginName])return;if(n[t.pluginName][i]){n[t.pluginName][i](_objectSpread2({sortable:n},r))}if(n.options[t.pluginName]&&n[t.pluginName][e]){n[t.pluginName][e](_objectSpread2({sortable:n},r))}}))},initializePlugins:function t(e,n,r,o){plugins.forEach((function(t){var o=t.pluginName;if(!e.options[o]&&!t.initializeByDefault)return;var i=new t(e,n,e.options);i.sortable=e;i.options=e.options;e[o]=i;_extends(r,i.defaults)}));for(var i in e.options){if(!e.options.hasOwnProperty(i))continue;var l=this.modifyOption(e,i,e.options[i]);if(typeof l!=="undefined"){e.options[i]=l}}},getEventProperties:function t(e,n){var r={};plugins.forEach((function(t){if(typeof t.eventProperties!=="function")return;_extends(r,t.eventProperties.call(n[t.pluginName],e))}));return r},modifyOption:function t(e,n,r){var o;plugins.forEach((function(t){if(!e[t.pluginName])return;if(t.optionListeners&&typeof t.optionListeners[n]==="function"){o=t.optionListeners[n].call(e[t.pluginName],r)}}));return o}};function dispatchEvent(t){var e=t.sortable,n=t.rootEl,r=t.name,o=t.targetEl,i=t.cloneEl,l=t.toEl,a=t.fromEl,s=t.oldIndex,u=t.newIndex,c=t.oldDraggableIndex,f=t.newDraggableIndex,d=t.originalEvent,h=t.putSortable,g=t.extraEventProperties;e=e||n&&n[expando];if(!e)return;var v,E=e.options,p="on"+r.charAt(0).toUpperCase()+r.substr(1);if(window.CustomEvent&&!IE11OrLess&&!Edge){v=new CustomEvent(r,{bubbles:true,cancelable:true})}else{v=document.createEvent("Event");v.initEvent(r,true,true)}v.to=l||n;v.from=a||n;v.item=o||n;v.clone=i;v.oldIndex=s;v.newIndex=u;v.oldDraggableIndex=c;v.newDraggableIndex=f;v.originalEvent=d;v.pullMode=h?h.lastPutMode:undefined;var m=_objectSpread2(_objectSpread2({},g),PluginManager.getEventProperties(r,e));for(var b in m){v[b]=m[b]}if(n){n.dispatchEvent(v)}if(E[p]){E[p].call(e,v)}}var _excluded=["evt"];var pluginEvent=function t(e,n){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},o=r.evt,i=_objectWithoutProperties(r,_excluded);PluginManager.pluginEvent.bind(Sortable)(e,n,_objectSpread2({dragEl:dragEl,parentEl:parentEl,ghostEl:ghostEl,rootEl:rootEl,nextEl:nextEl,lastDownEl:lastDownEl,cloneEl:cloneEl,cloneHidden:cloneHidden,dragStarted:moved,putSortable:putSortable,activeSortable:Sortable.active,originalEvent:o,oldIndex:oldIndex,oldDraggableIndex:oldDraggableIndex,newIndex:newIndex,newDraggableIndex:newDraggableIndex,hideGhostForTarget:_hideGhostForTarget,unhideGhostForTarget:_unhideGhostForTarget,cloneNowHidden:function t(){cloneHidden=true},cloneNowShown:function t(){cloneHidden=false},dispatchSortableEvent:function t(e){_dispatchEvent({sortable:n,name:e,originalEvent:o})}},i))};function _dispatchEvent(t){dispatchEvent(_objectSpread2({putSortable:putSortable,cloneEl:cloneEl,targetEl:dragEl,rootEl:rootEl,oldIndex:oldIndex,oldDraggableIndex:oldDraggableIndex,newIndex:newIndex,newDraggableIndex:newDraggableIndex},t))}var dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,oldIndex,newIndex,oldDraggableIndex,newDraggableIndex,activeGroup,putSortable,awaitingDragStarted=false,ignoreNextClick=false,sortables=[],tapEvt,touchEvt,lastDx,lastDy,tapDistanceLeft,tapDistanceTop,moved,lastTarget,lastDirection,pastFirstInvertThresh=false,isCircumstantialInvert=false,targetMoveDistance,ghostRelativeParent,ghostRelativeParentInitialScroll=[],_silent=false,savedInputChecked=[];var documentExists=typeof document!=="undefined",PositionGhostAbsolutely=IOS,CSSFloatProperty=Edge||IE11OrLess?"cssFloat":"float",supportDraggable=documentExists&&!ChromeForAndroid&&!IOS&&"draggable"in document.createElement("div"),supportCssPointerEvents=function(){if(!documentExists)return;if(IE11OrLess){return false}var t=document.createElement("x");t.style.cssText="pointer-events:auto";return t.style.pointerEvents==="auto"}(),_detectDirection=function t(e,n){var r=css(e),o=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),i=getChild(e,0,n),l=getChild(e,1,n),a=i&&css(i),s=l&&css(l),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+getRect(i).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+getRect(l).width;if(r.display==="flex"){return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal"}if(r.display==="grid"){return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal"}if(i&&a["float"]&&a["float"]!=="none"){var f=a["float"]==="left"?"left":"right";return l&&(s.clear==="both"||s.clear===f)?"vertical":"horizontal"}return i&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||u>=o&&r[CSSFloatProperty]==="none"||l&&r[CSSFloatProperty]==="none"&&u+c>o)?"vertical":"horizontal"},_dragElInRowColumn=function t(e,n,r){var o=r?e.left:e.top,i=r?e.right:e.bottom,l=r?e.width:e.height,a=r?n.left:n.top,s=r?n.right:n.bottom,u=r?n.width:n.height;return o===a||i===s||o+l/2===a+u/2},_detectNearestEmptySortable=function t(e,n){var r;sortables.some((function(t){var o=t[expando].options.emptyInsertThreshold;if(!o||lastChild(t))return;var i=getRect(t),l=e>=i.left-o&&e<=i.right+o,a=n>=i.top-o&&n<=i.bottom+o;if(l&&a){return r=t}}));return r},_prepareGroup=function t(e){function n(t,e){return function(r,o,i,l){var a=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(t==null&&(e||a)){return true}else if(t==null||t===false){return false}else if(e&&t==="clone"){return t}else if(typeof t==="function"){return n(t(r,o,i,l),e)(r,o,i,l)}else{var s=(e?r:o).options.group.name;return t===true||typeof t==="string"&&t===s||t.join&&t.indexOf(s)>-1}}}var r={};var o=e.group;if(!o||_typeof(o)!="object"){o={name:o}}r.name=o.name;r.checkPull=n(o.pull,true);r.checkPut=n(o.put);r.revertClone=o.revertClone;e.group=r},_hideGhostForTarget=function t(){if(!supportCssPointerEvents&&ghostEl){css(ghostEl,"display","none")}},_unhideGhostForTarget=function t(){if(!supportCssPointerEvents&&ghostEl){css(ghostEl,"display","")}};if(documentExists&&!ChromeForAndroid){document.addEventListener("click",(function(t){if(ignoreNextClick){t.preventDefault();t.stopPropagation&&t.stopPropagation();t.stopImmediatePropagation&&t.stopImmediatePropagation();ignoreNextClick=false;return false}}),true)}var nearestEmptyInsertDetectEvent=function t(e){if(dragEl){e=e.touches?e.touches[0]:e;var n=_detectNearestEmptySortable(e.clientX,e.clientY);if(n){var r={};for(var o in e){if(e.hasOwnProperty(o)){r[o]=e[o]}}r.target=r.rootEl=n;r.preventDefault=void 0;r.stopPropagation=void 0;n[expando]._onDragOver(r)}}};var _checkOutsideTargetEl=function t(e){if(dragEl){dragEl.parentNode[expando]._isOutsideThisEl(e.target)}};function Sortable(t,e){if(!(t&&t.nodeType&&t.nodeType===1)){throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t))}this.el=t;this.options=e=_extends({},e);t[expando]=this;var n={group:null,sort:true,disabled:false,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:false,invertedSwapThreshold:null,removeCloneOnHide:true,direction:function e(){return _detectDirection(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:true,animation:0,easing:null,setData:function t(e,n){e.setData("Text",n.textContent)},dropBubble:false,dragoverBubble:false,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:false,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:false,fallbackClass:"sortable-fallback",fallbackOnBody:false,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Sortable.supportPointer!==false&&"PointerEvent"in window&&(!Safari||IOS),emptyInsertThreshold:5};PluginManager.initializePlugins(this,t,n);for(var r in n){!(r in e)&&(e[r]=n[r])}_prepareGroup(e);for(var o in this){if(o.charAt(0)==="_"&&typeof this[o]==="function"){this[o]=this[o].bind(this)}}this.nativeDraggable=e.forceFallback?false:supportDraggable;if(this.nativeDraggable){this.options.touchStartThreshold=1}if(e.supportPointer){on(t,"pointerdown",this._onTapStart)}else{on(t,"mousedown",this._onTapStart);on(t,"touchstart",this._onTapStart)}if(this.nativeDraggable){on(t,"dragover",this);on(t,"dragenter",this)}sortables.push(this.el);e.store&&e.store.get&&this.sort(e.store.get(this)||[]);_extends(this,AnimationStateManager())}Sortable.prototype={constructor:Sortable,_isOutsideThisEl:function t(e){if(!this.el.contains(e)&&e!==this.el){lastTarget=null}},_getDirection:function t(e,n){return typeof this.options.direction==="function"?this.options.direction.call(this,e,n,dragEl):this.options.direction},_onTapStart:function t(e){if(!e.cancelable)return;var n=this,r=this.el,o=this.options,i=o.preventOnFilter,l=e.type,a=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,s=(a||e).target,u=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=o.filter;_saveInputCheckedState(r);if(dragEl){return}if(/mousedown|pointerdown/.test(l)&&e.button!==0||o.disabled){return}if(u.isContentEditable){return}if(!this.nativeDraggable&&Safari&&s&&s.tagName.toUpperCase()==="SELECT"){return}s=closest(s,o.draggable,r,false);if(s&&s.animated){return}if(lastDownEl===s){return}oldIndex=index(s);oldDraggableIndex=index(s,o.draggable);if(typeof c==="function"){if(c.call(this,e,s,this)){_dispatchEvent({sortable:n,rootEl:u,name:"filter",targetEl:s,toEl:r,fromEl:r});pluginEvent("filter",n,{evt:e});i&&e.preventDefault();return}}else if(c){c=c.split(",").some((function(t){t=closest(u,t.trim(),r,false);if(t){_dispatchEvent({sortable:n,rootEl:t,name:"filter",targetEl:s,fromEl:r,toEl:r});pluginEvent("filter",n,{evt:e});return true}}));if(c){i&&e.preventDefault();return}}if(o.handle&&!closest(u,o.handle,r,false)){return}this._prepareDragStart(e,a,s)},_prepareDragStart:function t(e,n,r){var o=this,i=o.el,l=o.options,a=i.ownerDocument,s;if(r&&!dragEl&&r.parentNode===i){var u=getRect(r);rootEl=i;dragEl=r;parentEl=dragEl.parentNode;nextEl=dragEl.nextSibling;lastDownEl=r;activeGroup=l.group;Sortable.dragged=dragEl;tapEvt={target:dragEl,clientX:(n||e).clientX,clientY:(n||e).clientY};tapDistanceLeft=tapEvt.clientX-u.left;tapDistanceTop=tapEvt.clientY-u.top;this._lastX=(n||e).clientX;this._lastY=(n||e).clientY;dragEl.style["will-change"]="all";s=function t(){pluginEvent("delayEnded",o,{evt:e});if(Sortable.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents();if(!FireFox&&o.nativeDraggable){dragEl.draggable=true}o._triggerDragStart(e,n);_dispatchEvent({sortable:o,name:"choose",originalEvent:e});toggleClass(dragEl,l.chosenClass,true)};l.ignore.split(",").forEach((function(t){find(dragEl,t.trim(),_disableDraggable)}));on(a,"dragover",nearestEmptyInsertDetectEvent);on(a,"mousemove",nearestEmptyInsertDetectEvent);on(a,"touchmove",nearestEmptyInsertDetectEvent);if(l.supportPointer){on(a,"pointerup",o._onDrop);!this.nativeDraggable&&on(a,"pointercancel",o._onDrop)}else{on(a,"mouseup",o._onDrop);on(a,"touchend",o._onDrop);on(a,"touchcancel",o._onDrop)}if(FireFox&&this.nativeDraggable){this.options.touchStartThreshold=4;dragEl.draggable=true}pluginEvent("delayStart",this,{evt:e});if(l.delay&&(!l.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Edge||IE11OrLess))){if(Sortable.eventCanceled){this._onDrop();return}if(l.supportPointer){on(a,"pointerup",o._disableDelayedDrag);on(a,"pointercancel",o._disableDelayedDrag)}else{on(a,"mouseup",o._disableDelayedDrag);on(a,"touchend",o._disableDelayedDrag);on(a,"touchcancel",o._disableDelayedDrag)}on(a,"mousemove",o._delayedDragTouchMoveHandler);on(a,"touchmove",o._delayedDragTouchMoveHandler);l.supportPointer&&on(a,"pointermove",o._delayedDragTouchMoveHandler);o._dragStartTimer=setTimeout(s,l.delay)}else{s()}}},_delayedDragTouchMoveHandler:function t(e){var n=e.touches?e.touches[0]:e;if(Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))){this._disableDelayedDrag()}},_disableDelayedDrag:function t(){dragEl&&_disableDraggable(dragEl);clearTimeout(this._dragStartTimer);this._disableDelayedDragEvents()},_disableDelayedDragEvents:function t(){var e=this.el.ownerDocument;off(e,"mouseup",this._disableDelayedDrag);off(e,"touchend",this._disableDelayedDrag);off(e,"touchcancel",this._disableDelayedDrag);off(e,"pointerup",this._disableDelayedDrag);off(e,"pointercancel",this._disableDelayedDrag);off(e,"mousemove",this._delayedDragTouchMoveHandler);off(e,"touchmove",this._delayedDragTouchMoveHandler);off(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function t(e,n){n=n||e.pointerType=="touch"&&e;if(!this.nativeDraggable||n){if(this.options.supportPointer){on(document,"pointermove",this._onTouchMove)}else if(n){on(document,"touchmove",this._onTouchMove)}else{on(document,"mousemove",this._onTouchMove)}}else{on(dragEl,"dragend",this);on(rootEl,"dragstart",this._onDragStart)}try{if(document.selection){_nextTick((function(){document.selection.empty()}))}else{window.getSelection().removeAllRanges()}}catch(t){}},_dragStarted:function t(e,n){awaitingDragStarted=false;if(rootEl&&dragEl){pluginEvent("dragStarted",this,{evt:n});if(this.nativeDraggable){on(document,"dragover",_checkOutsideTargetEl)}var r=this.options;!e&&toggleClass(dragEl,r.dragClass,false);toggleClass(dragEl,r.ghostClass,true);Sortable.active=this;e&&this._appendGhost();_dispatchEvent({sortable:this,name:"start",originalEvent:n})}else{this._nulling()}},_emulateDragOver:function t(){if(touchEvt){this._lastX=touchEvt.clientX;this._lastY=touchEvt.clientY;_hideGhostForTarget();var e=document.elementFromPoint(touchEvt.clientX,touchEvt.clientY);var n=e;while(e&&e.shadowRoot){e=e.shadowRoot.elementFromPoint(touchEvt.clientX,touchEvt.clientY);if(e===n)break;n=e}dragEl.parentNode[expando]._isOutsideThisEl(e);if(n){do{if(n[expando]){var r=void 0;r=n[expando]._onDragOver({clientX:touchEvt.clientX,clientY:touchEvt.clientY,target:e,rootEl:n});if(r&&!this.options.dragoverBubble){break}}e=n}while(n=getParentOrHost(n))}_unhideGhostForTarget()}},_onTouchMove:function t(e){if(tapEvt){var n=this.options,r=n.fallbackTolerance,o=n.fallbackOffset,i=e.touches?e.touches[0]:e,l=ghostEl&&matrix(ghostEl,true),a=ghostEl&&l&&l.a,s=ghostEl&&l&&l.d,u=PositionGhostAbsolutely&&ghostRelativeParent&&getRelativeScrollOffset(ghostRelativeParent),c=(i.clientX-tapEvt.clientX+o.x)/(a||1)+(u?u[0]-ghostRelativeParentInitialScroll[0]:0)/(a||1),f=(i.clientY-tapEvt.clientY+o.y)/(s||1)+(u?u[1]-ghostRelativeParentInitialScroll[1]:0)/(s||1);if(!Sortable.active&&!awaitingDragStarted){if(r&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<r){return}this._onDragStart(e,true)}if(ghostEl){if(l){l.e+=c-(lastDx||0);l.f+=f-(lastDy||0)}else{l={a:1,b:0,c:0,d:1,e:c,f:f}}var d="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");css(ghostEl,"webkitTransform",d);css(ghostEl,"mozTransform",d);css(ghostEl,"msTransform",d);css(ghostEl,"transform",d);lastDx=c;lastDy=f;touchEvt=i}e.cancelable&&e.preventDefault()}},_appendGhost:function t(){if(!ghostEl){var e=this.options.fallbackOnBody?document.body:rootEl,n=getRect(dragEl,true,PositionGhostAbsolutely,true,e),r=this.options;if(PositionGhostAbsolutely){ghostRelativeParent=e;while(css(ghostRelativeParent,"position")==="static"&&css(ghostRelativeParent,"transform")==="none"&&ghostRelativeParent!==document){ghostRelativeParent=ghostRelativeParent.parentNode}if(ghostRelativeParent!==document.body&&ghostRelativeParent!==document.documentElement){if(ghostRelativeParent===document)ghostRelativeParent=getWindowScrollingElement();n.top+=ghostRelativeParent.scrollTop;n.left+=ghostRelativeParent.scrollLeft}else{ghostRelativeParent=getWindowScrollingElement()}ghostRelativeParentInitialScroll=getRelativeScrollOffset(ghostRelativeParent)}ghostEl=dragEl.cloneNode(true);toggleClass(ghostEl,r.ghostClass,false);toggleClass(ghostEl,r.fallbackClass,true);toggleClass(ghostEl,r.dragClass,true);css(ghostEl,"transition","");css(ghostEl,"transform","");css(ghostEl,"box-sizing","border-box");css(ghostEl,"margin",0);css(ghostEl,"top",n.top);css(ghostEl,"left",n.left);css(ghostEl,"width",n.width);css(ghostEl,"height",n.height);css(ghostEl,"opacity","0.8");css(ghostEl,"position",PositionGhostAbsolutely?"absolute":"fixed");css(ghostEl,"zIndex","100000");css(ghostEl,"pointerEvents","none");Sortable.ghost=ghostEl;e.appendChild(ghostEl);css(ghostEl,"transform-origin",tapDistanceLeft/parseInt(ghostEl.style.width)*100+"% "+tapDistanceTop/parseInt(ghostEl.style.height)*100+"%")}},_onDragStart:function t(e,n){var r=this;var o=e.dataTransfer;var i=r.options;pluginEvent("dragStart",this,{evt:e});if(Sortable.eventCanceled){this._onDrop();return}pluginEvent("setupClone",this);if(!Sortable.eventCanceled){cloneEl=clone(dragEl);cloneEl.removeAttribute("id");cloneEl.draggable=false;cloneEl.style["will-change"]="";this._hideClone();toggleClass(cloneEl,this.options.chosenClass,false);Sortable.clone=cloneEl}r.cloneId=_nextTick((function(){pluginEvent("clone",r);if(Sortable.eventCanceled)return;if(!r.options.removeCloneOnHide){rootEl.insertBefore(cloneEl,dragEl)}r._hideClone();_dispatchEvent({sortable:r,name:"clone"})}));!n&&toggleClass(dragEl,i.dragClass,true);if(n){ignoreNextClick=true;r._loopId=setInterval(r._emulateDragOver,50)}else{off(document,"mouseup",r._onDrop);off(document,"touchend",r._onDrop);off(document,"touchcancel",r._onDrop);if(o){o.effectAllowed="move";i.setData&&i.setData.call(r,o,dragEl)}on(document,"drop",r);css(dragEl,"transform","translateZ(0)")}awaitingDragStarted=true;r._dragStartId=_nextTick(r._dragStarted.bind(r,n,e));on(document,"selectstart",r);moved=true;window.getSelection().removeAllRanges();if(Safari){css(document.body,"user-select","none")}},_onDragOver:function t(e){var n=this.el,r=e.target,o,i,l,a=this.options,s=a.group,u=Sortable.active,c=activeGroup===s,f=a.sort,d=putSortable||u,h,g=this,v=false;if(_silent)return;function E(t,a){pluginEvent(t,g,_objectSpread2({evt:e,isOwner:c,axis:h?"vertical":"horizontal",revert:l,dragRect:o,targetRect:i,canSort:f,fromSortable:d,target:r,completed:m,onMove:function t(r,i){return _onMove(rootEl,n,dragEl,o,r,getRect(r),e,i)},changed:b},a))}function p(){E("dragOverAnimationCapture");g.captureAnimationState();if(g!==d){d.captureAnimationState()}}function m(t){E("dragOverCompleted",{insertion:t});if(t){if(c){u._hideClone()}else{u._showClone(g)}if(g!==d){toggleClass(dragEl,putSortable?putSortable.options.ghostClass:u.options.ghostClass,false);toggleClass(dragEl,a.ghostClass,true)}if(putSortable!==g&&g!==Sortable.active){putSortable=g}else if(g===Sortable.active&&putSortable){putSortable=null}if(d===g){g._ignoreWhileAnimating=r}g.animateAll((function(){E("dragOverAnimationComplete");g._ignoreWhileAnimating=null}));if(g!==d){d.animateAll();d._ignoreWhileAnimating=null}}if(r===dragEl&&!dragEl.animated||r===n&&!r.animated){lastTarget=null}if(!a.dragoverBubble&&!e.rootEl&&r!==document){dragEl.parentNode[expando]._isOutsideThisEl(e.target);!t&&nearestEmptyInsertDetectEvent(e)}!a.dragoverBubble&&e.stopPropagation&&e.stopPropagation();return v=true}function b(){newIndex=index(dragEl);newDraggableIndex=index(dragEl,a.draggable);_dispatchEvent({sortable:g,name:"change",toEl:n,newIndex:newIndex,newDraggableIndex:newDraggableIndex,originalEvent:e})}if(e.preventDefault!==void 0){e.cancelable&&e.preventDefault()}r=closest(r,a.draggable,n,true);E("dragOver");if(Sortable.eventCanceled)return v;if(dragEl.contains(e.target)||r.animated&&r.animatingX&&r.animatingY||g._ignoreWhileAnimating===r){return m(false)}ignoreNextClick=false;if(u&&!a.disabled&&(c?f||(l=parentEl!==rootEl):putSortable===this||(this.lastPutMode=activeGroup.checkPull(this,u,dragEl,e))&&s.checkPut(this,u,dragEl,e))){h=this._getDirection(e,r)==="vertical";o=getRect(dragEl);E("dragOverValid");if(Sortable.eventCanceled)return v;if(l){parentEl=rootEl;p();this._hideClone();E("revert");if(!Sortable.eventCanceled){if(nextEl){rootEl.insertBefore(dragEl,nextEl)}else{rootEl.appendChild(dragEl)}}return m(true)}var S=lastChild(n,a.draggable);if(!S||_ghostIsLast(e,h,this)&&!S.animated){if(S===dragEl){return m(false)}if(S&&n===e.target){r=S}if(r){i=getRect(r)}if(_onMove(rootEl,n,dragEl,o,r,i,e,!!r)!==false){p();if(S&&S.nextSibling){n.insertBefore(dragEl,S.nextSibling)}else{n.appendChild(dragEl)}parentEl=n;b();return m(true)}}else if(S&&_ghostIsFirst(e,h,this)){var w=getChild(n,0,a,true);if(w===dragEl){return m(false)}r=w;i=getRect(r);if(_onMove(rootEl,n,dragEl,o,r,i,e,false)!==false){p();n.insertBefore(dragEl,w);parentEl=n;b();return m(true)}}else if(r.parentNode===n){i=getRect(r);var x=0,I,_=dragEl.parentNode!==n,y=!_dragElInRowColumn(dragEl.animated&&dragEl.toRect||o,r.animated&&r.toRect||i,h),D=h?"top":"left",C=isScrolledPast(r,"top","top")||isScrolledPast(dragEl,"top","top"),T=C?C.scrollTop:void 0;if(lastTarget!==r){I=i[D];pastFirstInvertThresh=false;isCircumstantialInvert=!y&&a.invertSwap||_}x=_getSwapDirection(e,r,i,h,y?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,isCircumstantialInvert,lastTarget===r);var P;if(x!==0){var R=index(dragEl);do{R-=x;P=parentEl.children[R]}while(P&&(css(P,"display")==="none"||P===ghostEl))}if(x===0||P===r){return m(false)}lastTarget=r;lastDirection=x;var O=r.nextElementSibling,A=false;A=x===1;var M=_onMove(rootEl,n,dragEl,o,r,i,e,A);if(M!==false){if(M===1||M===-1){A=M===1}_silent=true;setTimeout(_unsilent,30);p();if(A&&!O){n.appendChild(dragEl)}else{r.parentNode.insertBefore(dragEl,A?O:r)}if(C){scrollBy(C,0,T-C.scrollTop)}parentEl=dragEl.parentNode;if(I!==undefined&&!isCircumstantialInvert){targetMoveDistance=Math.abs(I-getRect(r)[D])}b();return m(true)}}if(n.contains(dragEl)){return m(false)}}return false},_ignoreWhileAnimating:null,_offMoveEvents:function t(){off(document,"mousemove",this._onTouchMove);off(document,"touchmove",this._onTouchMove);off(document,"pointermove",this._onTouchMove);off(document,"dragover",nearestEmptyInsertDetectEvent);off(document,"mousemove",nearestEmptyInsertDetectEvent);off(document,"touchmove",nearestEmptyInsertDetectEvent)},_offUpEvents:function t(){var e=this.el.ownerDocument;off(e,"mouseup",this._onDrop);off(e,"touchend",this._onDrop);off(e,"pointerup",this._onDrop);off(e,"pointercancel",this._onDrop);off(e,"touchcancel",this._onDrop);off(document,"selectstart",this)},_onDrop:function t(e){var n=this.el,r=this.options;newIndex=index(dragEl);newDraggableIndex=index(dragEl,r.draggable);pluginEvent("drop",this,{evt:e});parentEl=dragEl&&dragEl.parentNode;newIndex=index(dragEl);newDraggableIndex=index(dragEl,r.draggable);if(Sortable.eventCanceled){this._nulling();return}awaitingDragStarted=false;isCircumstantialInvert=false;pastFirstInvertThresh=false;clearInterval(this._loopId);clearTimeout(this._dragStartTimer);_cancelNextTick(this.cloneId);_cancelNextTick(this._dragStartId);if(this.nativeDraggable){off(document,"drop",this);off(n,"dragstart",this._onDragStart)}this._offMoveEvents();this._offUpEvents();if(Safari){css(document.body,"user-select","")}css(dragEl,"transform","");if(e){if(moved){e.cancelable&&e.preventDefault();!r.dropBubble&&e.stopPropagation()}ghostEl&&ghostEl.parentNode&&ghostEl.parentNode.removeChild(ghostEl);if(rootEl===parentEl||putSortable&&putSortable.lastPutMode!=="clone"){cloneEl&&cloneEl.parentNode&&cloneEl.parentNode.removeChild(cloneEl)}if(dragEl){if(this.nativeDraggable){off(dragEl,"dragend",this)}_disableDraggable(dragEl);dragEl.style["will-change"]="";if(moved&&!awaitingDragStarted){toggleClass(dragEl,putSortable?putSortable.options.ghostClass:this.options.ghostClass,false)}toggleClass(dragEl,this.options.chosenClass,false);_dispatchEvent({sortable:this,name:"unchoose",toEl:parentEl,newIndex:null,newDraggableIndex:null,originalEvent:e});if(rootEl!==parentEl){if(newIndex>=0){_dispatchEvent({rootEl:parentEl,name:"add",toEl:parentEl,fromEl:rootEl,originalEvent:e});_dispatchEvent({sortable:this,name:"remove",toEl:parentEl,originalEvent:e});_dispatchEvent({rootEl:parentEl,name:"sort",toEl:parentEl,fromEl:rootEl,originalEvent:e});_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:e})}putSortable&&putSortable.save()}else{if(newIndex!==oldIndex){if(newIndex>=0){_dispatchEvent({sortable:this,name:"update",toEl:parentEl,originalEvent:e});_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:e})}}}if(Sortable.active){if(newIndex==null||newIndex===-1){newIndex=oldIndex;newDraggableIndex=oldDraggableIndex}_dispatchEvent({sortable:this,name:"end",toEl:parentEl,originalEvent:e});this.save()}}}this._nulling()},_nulling:function t(){pluginEvent("nulling",this);rootEl=dragEl=parentEl=ghostEl=nextEl=cloneEl=lastDownEl=cloneHidden=tapEvt=touchEvt=moved=newIndex=newDraggableIndex=oldIndex=oldDraggableIndex=lastTarget=lastDirection=putSortable=activeGroup=Sortable.dragged=Sortable.ghost=Sortable.clone=Sortable.active=null;savedInputChecked.forEach((function(t){t.checked=true}));savedInputChecked.length=lastDx=lastDy=0},handleEvent:function t(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":if(dragEl){this._onDragOver(e);_globalDragOver(e)}break;case"selectstart":e.preventDefault();break}},toArray:function t(){var e=[],n,r=this.el.children,o=0,i=r.length,l=this.options;for(;o<i;o++){n=r[o];if(closest(n,l.draggable,this.el,false)){e.push(n.getAttribute(l.dataIdAttr)||_generateId(n))}}return e},sort:function t(e,n){var r={},o=this.el;this.toArray().forEach((function(t,e){var n=o.children[e];if(closest(n,this.options.draggable,o,false)){r[t]=n}}),this);n&&this.captureAnimationState();e.forEach((function(t){if(r[t]){o.removeChild(r[t]);o.appendChild(r[t])}}));n&&this.animateAll()},save:function t(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function t(e,n){return closest(e,n||this.options.draggable,this.el,false)},option:function t(e,n){var r=this.options;if(n===void 0){return r[e]}else{var o=PluginManager.modifyOption(this,e,n);if(typeof o!=="undefined"){r[e]=o}else{r[e]=n}if(e==="group"){_prepareGroup(r)}}},destroy:function t(){pluginEvent("destroy",this);var e=this.el;e[expando]=null;off(e,"mousedown",this._onTapStart);off(e,"touchstart",this._onTapStart);off(e,"pointerdown",this._onTapStart);if(this.nativeDraggable){off(e,"dragover",this);off(e,"dragenter",this)}Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")}));this._onDrop();this._disableDelayedDragEvents();sortables.splice(sortables.indexOf(this.el),1);this.el=e=null},_hideClone:function t(){if(!cloneHidden){pluginEvent("hideClone",this);if(Sortable.eventCanceled)return;css(cloneEl,"display","none");if(this.options.removeCloneOnHide&&cloneEl.parentNode){cloneEl.parentNode.removeChild(cloneEl)}cloneHidden=true}},_showClone:function t(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(cloneHidden){pluginEvent("showClone",this);if(Sortable.eventCanceled)return;if(dragEl.parentNode==rootEl&&!this.options.group.revertClone){rootEl.insertBefore(cloneEl,dragEl)}else if(nextEl){rootEl.insertBefore(cloneEl,nextEl)}else{rootEl.appendChild(cloneEl)}if(this.options.group.revertClone){this.animate(dragEl,cloneEl)}css(cloneEl,"display","");cloneHidden=false}}};function _globalDragOver(t){if(t.dataTransfer){t.dataTransfer.dropEffect="move"}t.cancelable&&t.preventDefault()}function _onMove(t,e,n,r,o,i,l,a){var s,u=t[expando],c=u.options.onMove,f;if(window.CustomEvent&&!IE11OrLess&&!Edge){s=new CustomEvent("move",{bubbles:true,cancelable:true})}else{s=document.createEvent("Event");s.initEvent("move",true,true)}s.to=e;s.from=t;s.dragged=n;s.draggedRect=r;s.related=o||e;s.relatedRect=i||getRect(e);s.willInsertAfter=a;s.originalEvent=l;t.dispatchEvent(s);if(c){f=c.call(u,s,l)}return f}function _disableDraggable(t){t.draggable=false}function _unsilent(){_silent=false}function _ghostIsFirst(t,e,n){var r=getRect(getChild(n.el,0,n.options,true));var o=getChildContainingRectFromElement(n.el,n.options,ghostEl);var i=10;return e?t.clientX<o.left-i||t.clientY<r.top&&t.clientX<r.right:t.clientY<o.top-i||t.clientY<r.bottom&&t.clientX<r.left}function _ghostIsLast(t,e,n){var r=getRect(lastChild(n.el,n.options.draggable));var o=getChildContainingRectFromElement(n.el,n.options,ghostEl);var i=10;return e?t.clientX>o.right+i||t.clientY>r.bottom&&t.clientX>r.left:t.clientY>o.bottom+i||t.clientX>r.right&&t.clientY>r.top}function _getSwapDirection(t,e,n,r,o,i,l,a){var s=r?t.clientY:t.clientX,u=r?n.height:n.width,c=r?n.top:n.left,f=r?n.bottom:n.right,d=false;if(!l){if(a&&targetMoveDistance<u*o){if(!pastFirstInvertThresh&&(lastDirection===1?s>c+u*i/2:s<f-u*i/2)){pastFirstInvertThresh=true}if(!pastFirstInvertThresh){if(lastDirection===1?s<c+targetMoveDistance:s>f-targetMoveDistance){return-lastDirection}}else{d=true}}else{if(s>c+u*(1-o)/2&&s<f-u*(1-o)/2){return _getInsertDirection(e)}}}d=d||l;if(d){if(s<c+u*i/2||s>f-u*i/2){return s>c+u/2?1:-1}}return 0}function _getInsertDirection(t){if(index(dragEl)<index(t)){return 1}else{return-1}}function _generateId(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 _saveInputCheckedState(t){savedInputChecked.length=0;var e=t.getElementsByTagName("input");var n=e.length;while(n--){var r=e[n];r.checked&&savedInputChecked.push(r)}}function _nextTick(t){return setTimeout(t,0)}function _cancelNextTick(t){return clearTimeout(t)}if(documentExists){on(document,"touchmove",(function(t){if((Sortable.active||awaitingDragStarted)&&t.cancelable){t.preventDefault()}}))}Sortable.utils={on:on,off:off,css:css,find:find,is:function t(e,n){return!!closest(e,n,e,false)},extend:extend,throttle:throttle,closest:closest,toggleClass:toggleClass,clone:clone,index:index,nextTick:_nextTick,cancelNextTick:_cancelNextTick,detectDirection:_detectDirection,getChild:getChild,expando:expando};Sortable.get=function(t){return t[expando]};Sortable.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++){e[n]=arguments[n]}if(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))}if(t.utils)Sortable.utils=_objectSpread2(_objectSpread2({},Sortable.utils),t.utils);PluginManager.mount(t)}))};Sortable.create=function(t,e){return new Sortable(t,e)};Sortable.version=version;var autoScrolls=[],scrollEl,scrollRootEl,scrolling=false,lastAutoScrollX,lastAutoScrollY,touchEvt$1,pointerElemChangedInterval;function AutoScrollPlugin(){function t(){this.defaults={scroll:true,forceAutoScrollFallback:false,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:true};for(var t in this){if(t.charAt(0)==="_"&&typeof this[t]==="function"){this[t]=this[t].bind(this)}}}t.prototype={dragStarted:function t(e){var n=e.originalEvent;if(this.sortable.nativeDraggable){on(document,"dragover",this._handleAutoScroll)}else{if(this.options.supportPointer){on(document,"pointermove",this._handleFallbackAutoScroll)}else if(n.touches){on(document,"touchmove",this._handleFallbackAutoScroll)}else{on(document,"mousemove",this._handleFallbackAutoScroll)}}},dragOverCompleted:function t(e){var n=e.originalEvent;if(!this.options.dragOverBubble&&!n.rootEl){this._handleAutoScroll(n)}},drop:function t(){if(this.sortable.nativeDraggable){off(document,"dragover",this._handleAutoScroll)}else{off(document,"pointermove",this._handleFallbackAutoScroll);off(document,"touchmove",this._handleFallbackAutoScroll);off(document,"mousemove",this._handleFallbackAutoScroll)}clearPointerElemChangedInterval();clearAutoScrolls();cancelThrottle()},nulling:function t(){touchEvt$1=scrollRootEl=scrollEl=scrolling=pointerElemChangedInterval=lastAutoScrollX=lastAutoScrollY=null;autoScrolls.length=0},_handleFallbackAutoScroll:function t(e){this._handleAutoScroll(e,true)},_handleAutoScroll:function t(e,n){var r=this;var o=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,l=document.elementFromPoint(o,i);touchEvt$1=e;if(n||this.options.forceAutoScrollFallback||Edge||IE11OrLess||Safari){autoScroll(e,this.options,l,n);var a=getParentAutoScrollElement(l,true);if(scrolling&&(!pointerElemChangedInterval||o!==lastAutoScrollX||i!==lastAutoScrollY)){pointerElemChangedInterval&&clearPointerElemChangedInterval();pointerElemChangedInterval=setInterval((function(){var t=getParentAutoScrollElement(document.elementFromPoint(o,i),true);if(t!==a){a=t;clearAutoScrolls()}autoScroll(e,r.options,t,n)}),10);lastAutoScrollX=o;lastAutoScrollY=i}}else{if(!this.options.bubbleScroll||getParentAutoScrollElement(l,true)===getWindowScrollingElement()){clearAutoScrolls();return}autoScroll(e,this.options,getParentAutoScrollElement(l,false),false)}}};return _extends(t,{pluginName:"scroll",initializeByDefault:true})}function clearAutoScrolls(){autoScrolls.forEach((function(t){clearInterval(t.pid)}));autoScrolls=[]}function clearPointerElemChangedInterval(){clearInterval(pointerElemChangedInterval)}var autoScroll=throttle((function(t,e,n,r){if(!e.scroll)return;var o=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,a=e.scrollSpeed,s=getWindowScrollingElement();var u=false,c;if(scrollRootEl!==n){scrollRootEl=n;clearAutoScrolls();scrollEl=e.scroll;c=e.scrollFn;if(scrollEl===true){scrollEl=getParentAutoScrollElement(n,true)}}var f=0;var d=scrollEl;do{var h=d,g=getRect(h),v=g.top,E=g.bottom,p=g.left,m=g.right,b=g.width,S=g.height,w=void 0,x=void 0,I=h.scrollWidth,_=h.scrollHeight,y=css(h),D=h.scrollLeft,C=h.scrollTop;if(h===s){w=b<I&&(y.overflowX==="auto"||y.overflowX==="scroll"||y.overflowX==="visible");x=S<_&&(y.overflowY==="auto"||y.overflowY==="scroll"||y.overflowY==="visible")}else{w=b<I&&(y.overflowX==="auto"||y.overflowX==="scroll");x=S<_&&(y.overflowY==="auto"||y.overflowY==="scroll")}var T=w&&(Math.abs(m-o)<=l&&D+b<I)-(Math.abs(p-o)<=l&&!!D);var P=x&&(Math.abs(E-i)<=l&&C+S<_)-(Math.abs(v-i)<=l&&!!C);if(!autoScrolls[f]){for(var R=0;R<=f;R++){if(!autoScrolls[R]){autoScrolls[R]={}}}}if(autoScrolls[f].vx!=T||autoScrolls[f].vy!=P||autoScrolls[f].el!==h){autoScrolls[f].el=h;autoScrolls[f].vx=T;autoScrolls[f].vy=P;clearInterval(autoScrolls[f].pid);if(T!=0||P!=0){u=true;autoScrolls[f].pid=setInterval(function(){if(r&&this.layer===0){Sortable.active._onTouchMove(touchEvt$1)}var e=autoScrolls[this.layer].vy?autoScrolls[this.layer].vy*a:0;var n=autoScrolls[this.layer].vx?autoScrolls[this.layer].vx*a:0;if(typeof c==="function"){if(c.call(Sortable.dragged.parentNode[expando],n,e,t,touchEvt$1,autoScrolls[this.layer].el)!=="continue"){return}}scrollBy(autoScrolls[this.layer].el,n,e)}.bind({layer:f}),24)}}f++}while(e.bubbleScroll&&d!==s&&(d=getParentAutoScrollElement(d,false)));scrolling=u}),30);var drop=function t(e){var n=e.originalEvent,r=e.putSortable,o=e.dragEl,i=e.activeSortable,l=e.dispatchSortableEvent,a=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(!n)return;var u=r||i;a();var c=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n;var f=document.elementFromPoint(c.clientX,c.clientY);s();if(u&&!u.el.contains(f)){l("spill");this.onSpill({dragEl:o,putSortable:r})}};function Revert(){}Revert.prototype={startIndex:null,dragStart:function t(e){var n=e.oldDraggableIndex;this.startIndex=n},onSpill:function t(e){var n=e.dragEl,r=e.putSortable;this.sortable.captureAnimationState();if(r){r.captureAnimationState()}var o=getChild(this.sortable.el,this.startIndex,this.options);if(o){this.sortable.el.insertBefore(n,o)}else{this.sortable.el.appendChild(n)}this.sortable.animateAll();if(r){r.animateAll()}},drop:drop};_extends(Revert,{pluginName:"revertOnSpill"});function Remove(){}Remove.prototype={onSpill:function t(e){var n=e.dragEl,r=e.putSortable;var o=r||this.sortable;o.captureAnimationState();n.parentNode&&n.parentNode.removeChild(n);o.animateAll()},drop:drop};_extends(Remove,{pluginName:"removeOnSpill"});Sortable.mount(new AutoScrollPlugin);Sortable.mount(Remove,Revert);var pdsSortableCss=".pds-sortable.sc-pds-sortable-h{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-sortable.pds-sortable--bordered.sc-pds-sortable-h{border:var(--pine-border);border-radius:var(--pine-dimension-2xs)}";var PdsSortable=function(){function t(t){registerInstance(this,t);this.pdsSortableItemMoved=createEvent(this,"pdsSortableItemMoved");this.border=false;this.dividers=false;this.handleType="row"}t.prototype.classNames=function(){var t=["pds-sortable"];if(this.border){t.push("pds-sortable--bordered")}if(this.dividers){t.push("pds-sortable--divided")}if(this.handleType!==undefined){t.push("pds-sortable--handle-type-".concat(this.handleType))}return t.join(" ")};t.prototype.componentDidLoad=function(){var t=this;var e={animation:150,ghostClass:"pds-sortable-item--ghost",dragClass:"pds-sortable-item--drag",onEnd:function(e){t.pdsSortableItemMoved.emit(e)}};if(this.handleType==="handle"){e=Object.assign(Object.assign({},e),{handle:".pds-sortable-item__handle"})}Sortable.create(this.el,e)};t.prototype.render=function(){return h(Host,{key:"95c78b5db22bf5cc4bcd0e73a05534037c71ab8e",class:this.classNames(),id:this.componentId},h("slot",{key:"976ef784c8f8f5fbfaf29b9165a401261aeb51a4"}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();PdsSortable.style=pdsSortableCss;export{PdsSortable as pds_sortable};
|
|
8
8
|
//# sourceMappingURL=pds-sortable.entry.js.map
|