Current File : /var/www/e360ban/wp-content/plugins/astra-addon/classes/customizer/extend-controls/build/index.js |
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.React}()},function(e,t,n){var o=n(6),r=n(7),a=n(8),i=n(10);e.exports=function(e,t){return o(e)||r(e,t)||a(e,t)||i()}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){e.exports=n(11)()},function(e,t,n){var o=S(n(13)),r=n(1),a=r.Children,i=r.cloneElement,l=r.Component,s=r.createElement,c=r.createRef,u=S(n(14)),d=n(15),f=S(d);t.Sortable=f;var p=d.Direction;t.Direction=p;var h=d.DOMRect;t.DOMRect=h;var v=d.GroupOptions;t.GroupOptions=v;var g=d.MoveEvent;t.MoveEvent=g;var m=d.Options;t.Options=m;var b=d.PullResult;t.PullResult=b;var y=d.PutResult;t.PutResult=y;var w=d.SortableEvent;t.SortableEvent=w;var E=d.SortableOptions;t.SortableOptions=E;var O=d.Utils;function S(e){return e&&e.__esModule?e.default:e}function D(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function T(e){e.forEach((function(e){return I(e.element)}))}function j(e){e.forEach((function(e){var t,n,o,r;t=e.parentElement,n=e.element,o=e.oldIndex,r=t.children[o]||null,t.insertBefore(n,r)}))}function M(e,t){var n=N(e),o={parentElement:e.from},r=[];switch(n){case"normal":r=[{element:e.item,newIndex:e.newIndex,oldIndex:e.oldIndex,parentElement:e.from}];break;case"swap":r=[x({element:e.item,oldIndex:e.oldIndex,newIndex:e.newIndex},o),x({element:e.swapItem,oldIndex:e.newIndex,newIndex:e.oldIndex},o)];break;case"multidrag":r=e.oldIndicies.map((function(t,n){return x({element:t.multiDragElement,oldIndex:t.index,newIndex:e.newIndicies[n].index},o)}))}return function(e,t){return e.map((function(e){return x(x({},e),{},{item:t[e.oldIndex]})})).sort((function(e,t){return e.oldIndex-t.oldIndex}))}(r,t)}function A(e,t){var n=D(t);return e.concat().reverse().forEach((function(e){return n.splice(e.oldIndex,1)})),n}function k(e,t,n,o){var r=D(t);return e.forEach((function(e){var t=o&&n&&o(e.item,n);r.splice(e.newIndex,0,t||e.item)})),r}function N(e){return e.oldIndicies&&e.oldIndicies.length>0?"multidrag":e.swapItem?"swap":"normal"}function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(e){return function(e){if(Array.isArray(e))return B(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach((function(t){W(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function H(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function U(e,t){return(U=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function F(e,t){return!t||"object"!==R(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function z(e){return(z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function W(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.Utils=O;var K={dragging:null},G=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&U(e,t)}(d,l);var t,n,r=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=z(e);if(t){var r=z(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return F(this,n)}}(d);function d(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),(t=r.call(this,e)).ref=c();var n=e.list.map((function(e){return Y(Y({},e),{},{chosen:!1,selected:!1})}));return e.setList(n,t.sortable,K),o(!e.plugins,'\nPlugins prop is no longer supported.\nInstead, mount it with "Sortable.mount(new MultiDrag())"\nPlease read the updated README.md at https://github.com/SortableJS/react-sortablejs.\n '),t}return t=d,(n=[{key:"componentDidMount",value:function(){if(null!==this.ref.current){var e=this.makeOptions();f.create(this.ref.current,e)}}},{key:"render",value:function(){var e=this.props,t=e.tag,n={style:e.style,className:e.className,id:e.id};return s(t&&null!==t?t:"div",Y({ref:this.ref},n),this.getChildren())}},{key:"getChildren",value:function(){var e=this.props,t=e.children,n=e.dataIdAttr,o=e.selectedClass,r=void 0===o?"sortable-selected":o,l=e.chosenClass,s=void 0===l?"sortable-chosen":l,c=(e.dragClass,e.fallbackClass,e.ghostClass,e.swapClass,e.filter),d=void 0===c?"sortable-filter":c,f=e.list;if(!t||null==t)return null;var p=n||"data-id";return a.map(t,(function(e,t){var n,o,a=f[t],l=e.props.className,c="string"==typeof d&&W({},d.replace(".",""),!!a.filtered),h=u(l,Y((W(n={},r,a.selected),W(n,s,a.chosen),n),c));return i(e,(W(o={},p,e.key),W(o,"className",h),o))}))}},{key:"makeOptions",value:function(){var e,t=this,n=((e=this.props).list,e.setList,e.children,e.tag,e.style,e.className,e.clone,e.onAdd,e.onChange,e.onChoose,e.onClone,e.onEnd,e.onFilter,e.onRemove,e.onSort,e.onStart,e.onUnchoose,e.onUpdate,e.onMove,e.onSpill,e.onSelect,e.onDeselect,function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["list","setList","children","tag","style","className","clone","onAdd","onChange","onChoose","onClone","onEnd","onFilter","onRemove","onSort","onStart","onUnchoose","onUpdate","onMove","onSpill","onSelect","onDeselect"]));return["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"].forEach((function(e){return n[e]=t.prepareOnHandlerPropAndDOM(e)})),["onChange","onClone","onFilter","onSort"].forEach((function(e){return n[e]=t.prepareOnHandlerProp(e)})),Y(Y({},n),{},{onMove:function(e,n){var o=t.props.onMove,r=e.willInsertAfter||-1;if(!o)return r;var a=o(e,n,t.sortable,K);return void 0!==a&&a}})}},{key:"prepareOnHandlerPropAndDOM",value:function(e){var t=this;return function(n){t.callOnHandlerProp(n,e),t[e](n)}}},{key:"prepareOnHandlerProp",value:function(e){var t=this;return function(n){t.callOnHandlerProp(n,e)}}},{key:"callOnHandlerProp",value:function(e,t){var n=this.props[t];n&&n(e,this.sortable,K)}},{key:"onAdd",value:function(e){var t=this.props,n=t.list,o=t.setList,r=t.clone,a=M(e,L(K.dragging.props.list));T(a),o(k(a,n,e,r).map((function(e){return Y(Y({},e),{},{selected:!1})})),this.sortable,K)}},{key:"onRemove",value:function(e){var t=this,n=this.props,r=n.list,a=n.setList,i=N(e),l=M(e,r);j(l);var s=L(r);if("clone"!==e.pullMode)s=A(l,s);else{var c=l;switch(i){case"multidrag":c=l.map((function(t,n){return Y(Y({},t),{},{element:e.clones[n]})}));break;case"normal":c=l.map((function(t){return Y(Y({},t),{},{element:e.clone})}));break;case"swap":default:o(!0,'mode "'.concat(i,'" cannot clone. Please remove "props.clone" from <ReactSortable/> when using the "').concat(i,'" plugin'))}T(c),l.forEach((function(n){var o=n.oldIndex,r=t.props.clone(n.item,e);s.splice(o,1,r)}))}a(s=s.map((function(e){return Y(Y({},e),{},{selected:!1})})),this.sortable,K)}},{key:"onUpdate",value:function(e){var t=this.props,n=t.list,o=t.setList,r=M(e,n);return T(r),j(r),o(function(e,t){return k(e,A(e,t))}(r,n),this.sortable,K)}},{key:"onStart",value:function(){K.dragging=this}},{key:"onEnd",value:function(){K.dragging=null}},{key:"onChoose",value:function(e){var t=this.props,n=t.list;(0,t.setList)(n.map((function(t,n){return n===e.oldIndex?Y(Y({},t),{},{chosen:!0}):t})),this.sortable,K)}},{key:"onUnchoose",value:function(e){var t=this.props,n=t.list;(0,t.setList)(n.map((function(t,n){return n===e.oldIndex?Y(Y({},t),{},{chosen:!1}):t})),this.sortable,K)}},{key:"onSpill",value:function(e){var t=this.props,n=t.removeOnSpill,o=t.revertOnSpill;n&&!o&&I(e.item)}},{key:"onSelect",value:function(e){var t=this.props,n=t.list,o=t.setList,r=n.map((function(e){return Y(Y({},e),{},{selected:!1})}));e.newIndicies.forEach((function(t){var n=t.index;if(-1===n)return console.log('"'.concat(e.type,'" had indice of "').concat(t.index,"\", which is probably -1 and doesn't usually happen here.")),void console.log(e);r[n].selected=!0})),o(r,this.sortable,K)}},{key:"onDeselect",value:function(e){var t=this.props,n=t.list,o=t.setList,r=n.map((function(e){return Y(Y({},e),{},{selected:!1})}));e.newIndicies.forEach((function(e){var t=e.index;-1!==t&&(r[t].selected=!0)})),o(r,this.sortable,K)}},{key:"sortable",get:function(){var e=this.ref.current;if(null===e)return null;var t=Object.keys(e).find((function(e){return e.includes("Sortable")}));return t?e[t]:null}}])&&H(t.prototype,n),d}();t.ReactSortable=G,W(G,"defaultProps",{clone:function(e){return e}})},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],o=!0,r=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(o=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);o=!0);}catch(e){r=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(r)throw a}}return n}}},function(e,t,n){var o=n(9);e.exports=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";var o=n(12);function r(){}function a(){}a.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,a,i){if(i!==o){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";n.r(t);t.default=function(e,t){if(!e)throw new Error("Invariant failed")}},function(e,t,n){var o;!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var a=typeof o;if("string"===a||"number"===a)e.push(o);else if(Array.isArray(o)&&o.length){var i=r.apply(null,o);i&&e.push(i)}else if("object"===a)for(var l in o)n.call(o,l)&&o[l]&&e.push(l)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},function(e,t,n){"use strict";function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function r(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}n.r(t),n.d(t,"Sortable",(function(){return Ne}));var a=r(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),i=r(/Edge/i),l=r(/firefox/i),s=r(/safari/i)&&!r(/chrome/i)&&!r(/android/i),c=r(/iP(ad|od|hone)/i),u=r(/chrome/i)&&r(/android/i),d={capture:!1,passive:!1};function f(e,t,n){e.addEventListener(t,n,!a&&d)}function p(e,t,n){e.removeEventListener(t,n,!a&&d)}function h(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function v(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function g(e,t,n,o){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&h(e,t):h(e,t))||o&&e===n)return e;if(e===n)break}while(e=v(e))}return null}var m,b=/\s+/g;function y(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(b," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(b," ")}}function w(e,t,n){var o=e&&e.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in o||-1!==t.indexOf("webkit")||(t="-webkit-"+t),o[t]=n+("string"==typeof n?"":"px")}}function E(e,t){var n="";if("string"==typeof e)n=e;else do{var o=w(e,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function O(e,t,n){if(e){var o=e.getElementsByTagName(t),r=0,a=o.length;if(n)for(;r<a;r++)n(o[r],r);return o}return[]}function S(){return document.scrollingElement||document.documentElement}function D(e,t,n,o,r){if(e.getBoundingClientRect||e===window){var i,l,s,c,u,d,f;if(e!==window&&e!==S()?(l=(i=e.getBoundingClientRect()).top,s=i.left,c=i.bottom,u=i.right,d=i.height,f=i.width):(l=0,s=0,c=window.innerHeight,u=window.innerWidth,d=window.innerHeight,f=window.innerWidth),(t||n)&&e!==window&&(r=r||e.parentNode,!a))do{if(r&&r.getBoundingClientRect&&("none"!==w(r,"transform")||n&&"static"!==w(r,"position"))){var p=r.getBoundingClientRect();l-=p.top+parseInt(w(r,"border-top-width")),s-=p.left+parseInt(w(r,"border-left-width")),c=l+i.height,u=s+i.width;break}}while(r=r.parentNode);if(o&&e!==window){var h=E(r||e),v=h&&h.a,g=h&&h.d;h&&(c=(l/=g)+(d/=g),u=(s/=v)+(f/=v))}return{top:l,left:s,bottom:c,right:u,width:f,height:d}}}function C(e,t,n){for(var o=T(e,!0),r=D(e)[t];o;){var a=D(o)[n];if(!("top"===n||"left"===n?r>=a:r<=a))return o;if(o===S())break;o=T(o,!1)}return!1}function _(e,t,n){for(var o=0,r=0,a=e.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==Ne.ghost&&a[r]!==Ne.dragged&&g(a[r],n.draggable,e,!1)){if(o===t)return a[r];o++}r++}return null}function x(e,t){for(var n=e.lastElementChild;n&&(n===Ne.ghost||"none"===w(n,"display")||t&&!h(n,t));)n=n.previousElementSibling;return n||null}function P(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Ne.clone||t&&!h(e,t)||n++;return n}function I(e){var t=0,n=0,o=S();if(e)do{var r=E(e);t+=e.scrollLeft*r.a,n+=e.scrollTop*r.d}while(e!==o&&(e=e.parentNode));return[t,n]}function T(e,t){if(!e||!e.getBoundingClientRect)return S();var n=e,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=w(n);if(n.clientWidth<n.scrollWidth&&("auto"==r.overflowX||"scroll"==r.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==r.overflowY||"scroll"==r.overflowY)){if(!n.getBoundingClientRect||n===document.body)return S();if(o||t)return n;o=!0}}}while(n=n.parentNode);return S()}function j(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function M(e,t){return function(){if(!m){var n=arguments,o=this;1===n.length?e.call(o,n[0]):e.apply(o,n),m=setTimeout((function(){m=void 0}),t)}}}function A(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function k(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function N(e,t){w(e,"position","absolute"),w(e,"top",t.top),w(e,"left",t.left),w(e,"width",t.width),w(e,"height",t.height)}function R(e){w(e,"position",""),w(e,"top",""),w(e,"left",""),w(e,"width",""),w(e,"height","")}var L="Sortable"+(new Date).getTime(),B=[],X={initializeByDefault:!0},Y={mount:function(e){for(var t in X)X.hasOwnProperty(t)&&!(t in e)&&(e[t]=X[t]);B.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var a=e+"Global";B.forEach((function(r){t[r.pluginName]&&(t[r.pluginName][a]&&t[r.pluginName][a](o({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](o({sortable:t},n)))}))},initializePlugins:function(e,t,n,o){for(var r in B.forEach((function(o){var r=o.pluginName;if(e.options[r]||o.initializeByDefault){var a=new o(e,t,e.options);a.sortable=e,a.options=e.options,e[r]=a,Object.assign(n,a.defaults)}})),e.options)if(e.options.hasOwnProperty(r)){var a=this.modifyOption(e,r,e.options[r]);void 0!==a&&(e.options[r]=a)}},getEventProperties:function(e,t){var n={};return B.forEach((function(o){"function"==typeof o.eventProperties&&Object.assign(n,o.eventProperties.call(t[o.pluginName],e))})),n},modifyOption:function(e,t,n){var o;return B.forEach((function(r){e[r.pluginName]&&r.optionListeners&&"function"==typeof r.optionListeners[t]&&(o=r.optionListeners[t].call(e[r.pluginName],n))})),o}};function H(e){var t=e.sortable,n=e.rootEl,r=e.name,l=e.targetEl,s=e.cloneEl,c=e.toEl,u=e.fromEl,d=e.oldIndex,f=e.newIndex,p=e.oldDraggableIndex,h=e.newDraggableIndex,v=e.originalEvent,g=e.putSortable,m=e.extraEventProperties;if(t=t||n&&n[L]){var b,y=t.options,w="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||a||i?(b=document.createEvent("Event")).initEvent(r,!0,!0):b=new CustomEvent(r,{bubbles:!0,cancelable:!0}),b.to=c||n,b.from=u||n,b.item=l||n,b.clone=s,b.oldIndex=d,b.newIndex=f,b.oldDraggableIndex=p,b.newDraggableIndex=h,b.originalEvent=v,b.pullMode=g?g.lastPutMode:void 0;var E=o({},m,Y.getEventProperties(r,t));for(var O in E)b[O]=E[O];n&&n.dispatchEvent(b),y[w]&&y[w].call(t,b)}}var U=function(e,t,n){var r=void 0===n?{}:n,a=r.evt,i=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)t.indexOf(n=a[o])>=0||(r[n]=e[n]);return r}(r,["evt"]);Y.pluginEvent.bind(Ne)(e,t,o({dragEl:z,parentEl:W,ghostEl:K,rootEl:G,nextEl:q,lastDownEl:V,cloneEl:$,cloneHidden:Z,dragStarted:ue,putSortable:oe,activeSortable:Ne.active,originalEvent:a,oldIndex:J,oldDraggableIndex:ee,newIndex:Q,newDraggableIndex:te,hideGhostForTarget:Te,unhideGhostForTarget:je,cloneNowHidden:function(){Z=!0},cloneNowShown:function(){Z=!1},dispatchSortableEvent:function(e){F({sortable:t,name:e,originalEvent:a})}},i))};function F(e){H(o({putSortable:oe,cloneEl:$,targetEl:z,rootEl:G,oldIndex:J,oldDraggableIndex:ee,newIndex:Q,newDraggableIndex:te},e))}var z,W,K,G,q,V,$,Z,J,Q,ee,te,ne,oe,re,ae,ie,le,se,ce,ue,de,fe,pe,he,ve=!1,ge=!1,me=[],be=!1,ye=!1,we=[],Ee=!1,Oe=[],Se="undefined"!=typeof document,De=c,Ce=i||a?"cssFloat":"float",_e=Se&&!u&&!c&&"draggable"in document.createElement("div"),xe=function(){if(Se){if(a)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Pe=function(e,t){var n=w(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=_(e,0,t),a=_(e,1,t),i=r&&w(r),l=a&&w(a),s=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+D(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+D(a).width;return"flex"===n.display?"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal":"grid"===n.display?n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":r&&i.float&&"none"!==i.float?!a||"both"!==l.clear&&l.clear!==("left"===i.float?"left":"right")?"horizontal":"vertical":r&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||s>=o&&"none"===n[Ce]||a&&"none"===n[Ce]&&s+c>o)?"vertical":"horizontal"},Ie=function(e){function t(e,n){return function(o,r,a,i){if(null==e&&(n||o.options.group.name&&r.options.group.name&&o.options.group.name===r.options.group.name))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(o,r,a,i),n)(o,r,a,i);var l=(n?o:r).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var n={},o=e.group;o&&"object"==typeof o||(o={name:o}),n.name=o.name,n.checkPull=t(o.pull,!0),n.checkPut=t(o.put),n.revertClone=o.revertClone,e.group=n},Te=function(){!xe&&K&&w(K,"display","none")},je=function(){!xe&&K&&w(K,"display","")};Se&&document.addEventListener("click",(function(e){if(ge)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ge=!1,!1}),!0);var Me,Ae=function(e){if(z){var t=(r=(e=e.touches?e.touches[0]:e).clientX,a=e.clientY,me.some((function(e){if(!x(e)){var t=D(e),n=e[L].options.emptyInsertThreshold;return n&&r>=t.left-n&&r<=t.right+n&&a>=t.top-n&&a<=t.bottom+n?i=e:void 0}})),i);if(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[L]._onDragOver(n)}}var r,a,i},ke=function(e){z&&z.parentNode[L]._isOutsideThisEl(e.target)};function Ne(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not "+{}.toString.call(e);this.el=e,this.options=t=Object.assign({},t),e[L]=this;var n,r,a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Pe(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ne.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var i in Y.initializePlugins(this,e,a),a)!(i in t)&&(t[i]=a[i]);for(var l in Ie(t),this)"_"===l.charAt(0)&&"function"==typeof this[l]&&(this[l]=this[l].bind(this));this.nativeDraggable=!t.forceFallback&&_e,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?f(e,"pointerdown",this._onTapStart):(f(e,"mousedown",this._onTapStart),f(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(f(e,"dragover",this),f(e,"dragenter",this)),me.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Object.assign(this,(r=[],{captureAnimationState:function(){r=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==w(e,"display")&&void 0!==e){r.push({target:e,rect:D(e)});var t=o({},r[r.length-1].rect);if(e.thisAnimationDuration){var n=E(e,!0);n&&(t.top-=n.f,t.left-=n.e)}e.fromRect=t}}))},addAnimationState:function(e){r.push(e)},removeAnimationState:function(e){r.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var o in t)if(t.hasOwnProperty(o)&&t[o]===e[n][o])return Number(n);return-1}(r,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof e&&e());var o=!1,a=0;r.forEach((function(e){var n=0,r=e.target,i=r.fromRect,l=D(r),s=r.prevFromRect,c=r.prevToRect,u=e.rect,d=E(r,!0);d&&(l.top-=d.f,l.left-=d.e),r.toRect=l,r.thisAnimationDuration&&j(s,l)&&!j(i,l)&&(u.top-l.top)/(u.left-l.left)==(i.top-l.top)/(i.left-l.left)&&(n=function(e,t,n,o){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*o.animation}(u,s,c,t.options)),j(l,i)||(r.prevFromRect=i,r.prevToRect=l,n||(n=t.options.animation),t.animate(r,u,l,n)),n&&(o=!0,a=Math.max(a,n),clearTimeout(r.animationResetTimer),r.animationResetTimer=setTimeout((function(){r.animationTime=0,r.prevFromRect=null,r.fromRect=null,r.prevToRect=null,r.thisAnimationDuration=null}),n),r.thisAnimationDuration=n)})),clearTimeout(n),o?n=setTimeout((function(){"function"==typeof e&&e()}),a):"function"==typeof e&&e(),r=[]},animate:function(e,t,n,o){if(o){w(e,"transition",""),w(e,"transform","");var r=E(this.el),a=(t.left-n.left)/(r&&r.a||1),i=(t.top-n.top)/(r&&r.d||1);e.animatingX=!!a,e.animatingY=!!i,w(e,"transform","translate3d("+a+"px,"+i+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),w(e,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),w(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){w(e,"transition",""),w(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),o)}}}))}function Re(e,t,n,o,r,l,s,c){var u,d,f=e[L],p=f.options.onMove;return!window.CustomEvent||a||i?(u=document.createEvent("Event")).initEvent("move",!0,!0):u=new CustomEvent("move",{bubbles:!0,cancelable:!0}),u.to=t,u.from=e,u.dragged=n,u.draggedRect=o,u.related=r||t,u.relatedRect=l||D(t),u.willInsertAfter=c,u.originalEvent=s,e.dispatchEvent(u),p&&(d=p.call(f,u,s)),d}function Le(e){e.draggable=!1}function Be(){Ee=!1}function Xe(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,o=0;n--;)o+=t.charCodeAt(n);return o.toString(36)}function Ye(e){return setTimeout(e,0)}function He(e){return clearTimeout(e)}Ne.prototype={constructor:Ne,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(de=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,z):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,o=this.options,r=o.preventOnFilter,a=e.type,i=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(i||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,u=o.filter;if(function(e){Oe.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var o=t[n];o.checked&&Oe.push(o)}}(n),!z&&!(/mousedown|pointerdown/.test(a)&&0!==e.button||o.disabled)&&!c.isContentEditable&&(this.nativeDraggable||!s||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=g(l,o.draggable,n,!1))&&l.animated||V===l)){if(J=P(l),ee=P(l,o.draggable),"function"==typeof u){if(u.call(this,e,l,this))return F({sortable:t,rootEl:c,name:"filter",targetEl:l,toEl:n,fromEl:n}),U("filter",t,{evt:e}),void(r&&e.cancelable&&e.preventDefault())}else if(u&&(u=u.split(",").some((function(o){if(o=g(c,o.trim(),n,!1))return F({sortable:t,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),U("filter",t,{evt:e}),!0}))))return void(r&&e.cancelable&&e.preventDefault());o.handle&&!g(c,o.handle,n,!1)||this._prepareDragStart(e,i,l)}}},_prepareDragStart:function(e,t,n){var o,r=this,s=r.el,c=r.options,u=s.ownerDocument;if(n&&!z&&n.parentNode===s){var d=D(n);if(G=s,W=(z=n).parentNode,q=z.nextSibling,V=n,ne=c.group,Ne.dragged=z,se=(re={target:z,clientX:(t||e).clientX,clientY:(t||e).clientY}).clientX-d.left,ce=re.clientY-d.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,z.style["will-change"]="all",o=function(){U("delayEnded",r,{evt:e}),Ne.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!l&&r.nativeDraggable&&(z.draggable=!0),r._triggerDragStart(e,t),F({sortable:r,name:"choose",originalEvent:e}),y(z,c.chosenClass,!0))},c.ignore.split(",").forEach((function(e){O(z,e.trim(),Le)})),f(u,"dragover",Ae),f(u,"mousemove",Ae),f(u,"touchmove",Ae),f(u,"mouseup",r._onDrop),f(u,"touchend",r._onDrop),f(u,"touchcancel",r._onDrop),l&&this.nativeDraggable&&(this.options.touchStartThreshold=4,z.draggable=!0),U("delayStart",this,{evt:e}),!c.delay||c.delayOnTouchOnly&&!t||this.nativeDraggable&&(i||a))o();else{if(Ne.eventCanceled)return void this._onDrop();f(u,"mouseup",r._disableDelayedDrag),f(u,"touchend",r._disableDelayedDrag),f(u,"touchcancel",r._disableDelayedDrag),f(u,"mousemove",r._delayedDragTouchMoveHandler),f(u,"touchmove",r._delayedDragTouchMoveHandler),c.supportPointer&&f(u,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(o,c.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){z&&Le(z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;p(e,"mouseup",this._disableDelayedDrag),p(e,"touchend",this._disableDelayedDrag),p(e,"touchcancel",this._disableDelayedDrag),p(e,"mousemove",this._delayedDragTouchMoveHandler),p(e,"touchmove",this._delayedDragTouchMoveHandler),p(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?f(document,this.options.supportPointer?"pointermove":t?"touchmove":"mousemove",this._onTouchMove):(f(z,"dragend",this),f(G,"dragstart",this._onDragStart));try{document.selection?Ye((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(ve=!1,G&&z){U("dragStarted",this,{evt:t}),this.nativeDraggable&&f(document,"dragover",ke);var n=this.options;!e&&y(z,n.dragClass,!1),y(z,n.ghostClass,!0),Ne.active=this,e&&this._appendGhost(),F({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(ae){this._lastX=ae.clientX,this._lastY=ae.clientY,Te();for(var e=document.elementFromPoint(ae.clientX,ae.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ae.clientX,ae.clientY))!==t;)t=e;if(z.parentNode[L]._isOutsideThisEl(e),t)do{if(t[L]&&t[L]._onDragOver({clientX:ae.clientX,clientY:ae.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);je()}},_onTouchMove:function(e){if(re){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,r=e.touches?e.touches[0]:e,a=K&&E(K,!0),i=K&&a&&a.a,l=K&&a&&a.d,s=De&&he&&I(he),c=(r.clientX-re.clientX+o.x)/(i||1)+(s?s[0]-we[0]:0)/(i||1),u=(r.clientY-re.clientY+o.y)/(l||1)+(s?s[1]-we[1]:0)/(l||1);if(!Ne.active&&!ve){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(K){a?(a.e+=c-(ie||0),a.f+=u-(le||0)):a={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix("+a.a+","+a.b+","+a.c+","+a.d+","+a.e+","+a.f+")";w(K,"webkitTransform",d),w(K,"mozTransform",d),w(K,"msTransform",d),w(K,"transform",d),ie=c,le=u,ae=r}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!K){var e=this.options.fallbackOnBody?document.body:G,t=D(z,!0,De,!0,e),n=this.options;if(De){for(he=e;"static"===w(he,"position")&&"none"===w(he,"transform")&&he!==document;)he=he.parentNode;he!==document.body&&he!==document.documentElement?(he===document&&(he=S()),t.top+=he.scrollTop,t.left+=he.scrollLeft):he=S(),we=I(he)}y(K=z.cloneNode(!0),n.ghostClass,!1),y(K,n.fallbackClass,!0),y(K,n.dragClass,!0),w(K,"transition",""),w(K,"transform",""),w(K,"box-sizing","border-box"),w(K,"margin",0),w(K,"top",t.top),w(K,"left",t.left),w(K,"width",t.width),w(K,"height",t.height),w(K,"opacity","0.8"),w(K,"position",De?"absolute":"fixed"),w(K,"zIndex","100000"),w(K,"pointerEvents","none"),Ne.ghost=K,e.appendChild(K),w(K,"transform-origin",se/parseInt(K.style.width)*100+"% "+ce/parseInt(K.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,o=e.dataTransfer,r=n.options;U("dragStart",this,{evt:e}),Ne.eventCanceled?this._onDrop():(U("setupClone",this),Ne.eventCanceled||(($=k(z)).draggable=!1,$.style["will-change"]="",this._hideClone(),y($,this.options.chosenClass,!1),Ne.clone=$),n.cloneId=Ye((function(){U("clone",n),Ne.eventCanceled||(n.options.removeCloneOnHide||G.insertBefore($,z),n._hideClone(),F({sortable:n,name:"clone"}))})),!t&&y(z,r.dragClass,!0),t?(ge=!0,n._loopId=setInterval(n._emulateDragOver,50)):(p(document,"mouseup",n._onDrop),p(document,"touchend",n._onDrop),p(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(n,o,z)),f(document,"drop",n),w(z,"transform","translateZ(0)")),ve=!0,n._dragStartId=Ye(n._dragStarted.bind(n,t,e)),f(document,"selectstart",n),ue=!0,s&&w(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,r,a,i=this.el,l=e.target,s=this.options,c=s.group,u=Ne.active,d=ne===c,f=s.sort,p=oe||u,h=this,v=!1;if(!Ee){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),l=g(l,s.draggable,i,!0),B("dragOver"),Ne.eventCanceled)return v;if(z.contains(e.target)||l.animated&&l.animatingX&&l.animatingY||h._ignoreWhileAnimating===l)return Y(!1);if(ge=!1,u&&!s.disabled&&(d?f||(r=!G.contains(z)):oe===this||(this.lastPutMode=ne.checkPull(this,u,z,e))&&c.checkPut(this,u,z,e))){if(a="vertical"===this._getDirection(e,l),t=D(z),B("dragOverValid"),Ne.eventCanceled)return v;if(r)return W=G,X(),this._hideClone(),B("revert"),Ne.eventCanceled||(q?G.insertBefore(z,q):G.appendChild(z)),Y(!0);var m=x(i,s.draggable);if(!m||function(e,t,n){var o=D(x(n.el,n.options.draggable));return t?e.clientX>o.right+10||e.clientX<=o.right&&e.clientY>o.bottom&&e.clientX>=o.left:e.clientX>o.right&&e.clientY>o.top||e.clientX<=o.right&&e.clientY>o.bottom+10}(e,a,this)&&!m.animated){if(m===z)return Y(!1);if(m&&i===e.target&&(l=m),l&&(n=D(l)),!1!==Re(G,i,z,t,l,n,e,!!l))return X(),i.appendChild(z),W=i,H(),Y(!0)}else if(l.parentNode===i){n=D(l);var b,E,O,S=z.parentNode!==i,_=!function(e,t,n){var o=n?e.left:e.top,r=n?t.left:t.top;return o===r||(n?e.right:e.bottom)===(n?t.right:t.bottom)||o+(n?e.width:e.height)/2===r+(n?t.width:t.height)/2}(z.animated&&z.toRect||t,l.animated&&l.toRect||n,a),I=a?"top":"left",T=C(l,"top","top")||C(z,"top","top"),j=T?T.scrollTop:void 0;if(de!==l&&(E=n[I],be=!1,ye=!_&&s.invertSwap||S),0!==(b=function(e,t,n,o,r,a,i,l){var s=o?e.clientY:e.clientX,c=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,f=!1;if(!i)if(l&&pe<c*r){if(!be&&(1===fe?s>u+c*a/2:s<d-c*a/2)&&(be=!0),be)f=!0;else if(1===fe?s<u+pe:s>d-pe)return-fe}else if(s>u+c*(1-r)/2&&s<d-c*(1-r)/2)return function(e){return P(z)<P(e)?1:-1}(t);return(f=f||i)&&(s<u+c*a/2||s>d-c*a/2)?s>u+c/2?1:-1:0}(e,l,n,a,_?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,ye,de===l))){var M=P(z);do{O=W.children[M-=b]}while(O&&("none"===w(O,"display")||O===K))}if(0===b||O===l)return Y(!1);de=l,fe=b;var k=l.nextElementSibling,N=!1,R=Re(G,i,z,t,l,n,e,N=1===b);if(!1!==R)return 1!==R&&-1!==R||(N=1===R),Ee=!0,setTimeout(Be,30),X(),N&&!k?i.appendChild(z):l.parentNode.insertBefore(z,N?k:l),T&&A(T,0,j-T.scrollTop),W=z.parentNode,void 0===E||ye||(pe=Math.abs(E-D(l)[I])),H(),Y(!0)}if(i.contains(z))return Y(!1)}return!1}function B(s,c){U(s,h,o({evt:e,isOwner:d,axis:a?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:f,fromSortable:p,target:l,completed:Y,onMove:function(n,o){return Re(G,i,z,t,n,D(n),e,o)},changed:H},c))}function X(){B("dragOverAnimationCapture"),h.captureAnimationState(),h!==p&&p.captureAnimationState()}function Y(t){return B("dragOverCompleted",{insertion:t}),t&&(d?u._hideClone():u._showClone(h),h!==p&&(y(z,oe?oe.options.ghostClass:u.options.ghostClass,!1),y(z,s.ghostClass,!0)),oe!==h&&h!==Ne.active?oe=h:h===Ne.active&&oe&&(oe=null),p===h&&(h._ignoreWhileAnimating=l),h.animateAll((function(){B("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(l===z&&!z.animated||l===i&&!l.animated)&&(de=null),s.dragoverBubble||e.rootEl||l===document||(z.parentNode[L]._isOutsideThisEl(e.target),!t&&Ae(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),v=!0}function H(){Q=P(z),te=P(z,s.draggable),F({sortable:h,name:"change",toEl:i,newIndex:Q,newDraggableIndex:te,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){p(document,"mousemove",this._onTouchMove),p(document,"touchmove",this._onTouchMove),p(document,"pointermove",this._onTouchMove),p(document,"dragover",Ae),p(document,"mousemove",Ae),p(document,"touchmove",Ae)},_offUpEvents:function(){var e=this.el.ownerDocument;p(e,"mouseup",this._onDrop),p(e,"touchend",this._onDrop),p(e,"pointerup",this._onDrop),p(e,"touchcancel",this._onDrop),p(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;Q=P(z),te=P(z,n.draggable),U("drop",this,{evt:e}),W=z&&z.parentNode,Q=P(z),te=P(z,n.draggable),Ne.eventCanceled||(ve=!1,ye=!1,be=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),He(this.cloneId),He(this._dragStartId),this.nativeDraggable&&(p(document,"drop",this),p(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),s&&w(document.body,"user-select",""),w(z,"transform",""),e&&(ue&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),K&&K.parentNode&&K.parentNode.removeChild(K),(G===W||oe&&"clone"!==oe.lastPutMode)&&$&&$.parentNode&&$.parentNode.removeChild($),z&&(this.nativeDraggable&&p(z,"dragend",this),Le(z),z.style["will-change"]="",ue&&!ve&&y(z,oe?oe.options.ghostClass:this.options.ghostClass,!1),y(z,this.options.chosenClass,!1),F({sortable:this,name:"unchoose",toEl:W,newIndex:null,newDraggableIndex:null,originalEvent:e}),G!==W?(Q>=0&&(F({rootEl:W,name:"add",toEl:W,fromEl:G,originalEvent:e}),F({sortable:this,name:"remove",toEl:W,originalEvent:e}),F({rootEl:W,name:"sort",toEl:W,fromEl:G,originalEvent:e}),F({sortable:this,name:"sort",toEl:W,originalEvent:e})),oe&&oe.save()):Q!==J&&Q>=0&&(F({sortable:this,name:"update",toEl:W,originalEvent:e}),F({sortable:this,name:"sort",toEl:W,originalEvent:e})),Ne.active&&(null!=Q&&-1!==Q||(Q=J,te=ee),F({sortable:this,name:"end",toEl:W,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){U("nulling",this),G=z=W=K=q=$=V=Z=re=ae=ue=Q=te=J=ee=de=fe=oe=ne=Ne.dragged=Ne.ghost=Ne.clone=Ne.active=null,Oe.forEach((function(e){e.checked=!0})),Oe.length=ie=le=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":z&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,o=0,r=n.length,a=this.options;o<r;o++)g(e=n[o],a.draggable,this.el,!1)&&t.push(e.getAttribute(a.dataIdAttr)||Xe(e));return t},sort:function(e){var t={},n=this.el;this.toArray().forEach((function(e,o){var r=n.children[o];g(r,this.options.draggable,n,!1)&&(t[e]=r)}),this),e.forEach((function(e){t[e]&&(n.removeChild(t[e]),n.appendChild(t[e]))}))},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return g(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var o=Y.modifyOption(this,e,t);n[e]=void 0!==o?o:t,"group"===e&&Ie(n)},destroy:function(){U("destroy",this);var e=this.el;e[L]=null,p(e,"mousedown",this._onTapStart),p(e,"touchstart",this._onTapStart),p(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(p(e,"dragover",this),p(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),me.splice(me.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Z){if(U("hideClone",this),Ne.eventCanceled)return;w($,"display","none"),this.options.removeCloneOnHide&&$.parentNode&&$.parentNode.removeChild($),Z=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(Z){if(U("showClone",this),Ne.eventCanceled)return;z.parentNode!=G||this.options.group.revertClone?q?G.insertBefore($,q):G.appendChild($):G.insertBefore($,z),this.options.group.revertClone&&this.animate(z,$),w($,"display",""),Z=!1}}else this._hideClone()}},Se&&f(document,"touchmove",(function(e){(Ne.active||ve)&&e.cancelable&&e.preventDefault()})),Ne.utils={on:f,off:p,css:w,find:O,is:function(e,t){return!!g(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:M,closest:g,toggleClass:y,clone:k,index:P,nextTick:Ye,cancelNextTick:He,detectDirection:Pe,getChild:_},Ne.get=function(e){return e[L]},Ne.mount=function(){var e=[].slice.call(arguments);e[0].constructor===Array&&(e=e[0]),e.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not "+{}.toString.call(e);e.utils&&(Ne.utils=o({},Ne.utils,e.utils)),Y.mount(e)}))},Ne.create=function(e,t){return new Ne(e,t)},Ne.version="1.12.0";var Ue,Fe,ze,We,Ke,Ge=[],qe=[],Ve=!1,$e=!1,Ze=!1;function Je(e,t){qe.forEach((function(n,o){var r=t.children[n.sortableIndex+(e?Number(o):0)];r?t.insertBefore(n,r):t.appendChild(n)}))}function Qe(){Ge.forEach((function(e){e!==ze&&e.parentNode&&e.parentNode.removeChild(e)}))}var et=function(e){var t=e.originalEvent,n=e.putSortable,o=e.dragEl,r=e.dispatchSortableEvent,a=e.unhideGhostForTarget;if(t){var i=n||e.activeSortable;(0,e.hideGhostForTarget)();var l=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,s=document.elementFromPoint(l.clientX,l.clientY);a(),i&&!i.el.contains(s)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function tt(){}function nt(){}tt.prototype={startIndex:null,dragStart:function(e){this.startIndex=e.oldDraggableIndex},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=_(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(t,o):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:et},Object.assign(tt,{pluginName:"revertOnSpill"}),nt.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:et},Object.assign(nt,{pluginName:"removeOnSpill"});var ot,rt,at,it,lt,st,ct=[],ut=!1;function dt(){ct.forEach((function(e){clearInterval(e.pid)})),ct=[]}function ft(){clearInterval(st)}var pt=M((function(e,t,n,o){if(t.scroll){var r,a=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=S(),u=!1;rt!==n&&(rt=n,dt(),r=t.scrollFn,!0===(ot=t.scroll)&&(ot=T(n,!0)));var d=0,f=ot;do{var p=f,h=D(p),v=h.top,g=h.bottom,m=h.left,b=h.right,y=h.width,E=h.height,O=void 0,C=void 0,_=p.scrollWidth,x=p.scrollHeight,P=w(p),I=p.scrollLeft,j=p.scrollTop;p===c?(O=y<_&&("auto"===P.overflowX||"scroll"===P.overflowX||"visible"===P.overflowX),C=E<x&&("auto"===P.overflowY||"scroll"===P.overflowY||"visible"===P.overflowY)):(O=y<_&&("auto"===P.overflowX||"scroll"===P.overflowX),C=E<x&&("auto"===P.overflowY||"scroll"===P.overflowY));var M=O&&(Math.abs(b-a)<=l&&I+y<_)-(Math.abs(m-a)<=l&&!!I),k=C&&(Math.abs(g-i)<=l&&j+E<x)-(Math.abs(v-i)<=l&&!!j);if(!ct[d])for(var N=0;N<=d;N++)ct[N]||(ct[N]={});ct[d].vx==M&&ct[d].vy==k&&ct[d].el===p||(ct[d].el=p,ct[d].vx=M,ct[d].vy=k,clearInterval(ct[d].pid),0==M&&0==k||(u=!0,ct[d].pid=setInterval(function(){o&&0===this.layer&&Ne.active._onTouchMove(lt);var t=ct[this.layer].vy?ct[this.layer].vy*s:0,n=ct[this.layer].vx?ct[this.layer].vx*s:0;"function"==typeof r&&"continue"!==r.call(Ne.dragged.parentNode[L],n,t,e,lt,ct[this.layer].el)||A(ct[this.layer].el,n,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&f!==c&&(f=T(f,!1)));ut=u}}),30);Ne.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?f(document,"dragover",this._handleAutoScroll):f(document,this.options.supportPointer?"pointermove":t.touches?"touchmove":"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?p(document,"dragover",this._handleAutoScroll):(p(document,"pointermove",this._handleFallbackAutoScroll),p(document,"touchmove",this._handleFallbackAutoScroll),p(document,"mousemove",this._handleFallbackAutoScroll)),ft(),dt(),clearTimeout(m),m=void 0},nulling:function(){lt=rt=ot=ut=st=at=it=null,ct.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,o=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,l=document.elementFromPoint(o,r);if(lt=e,t||i||a||s){pt(e,this.options,l,t);var c=T(l,!0);!ut||st&&o===at&&r===it||(st&&ft(),st=setInterval((function(){var a=T(document.elementFromPoint(o,r),!0);a!==c&&(c=a,dt()),pt(e,n.options,a,t)}),10),at=o,it=r)}else{if(!this.options.bubbleScroll||T(l,!0)===S())return void dt();pt(e,this.options,T(l,!1),!1)}}},Object.assign(e,{pluginName:"scroll",initializeByDefault:!0})}),Ne.mount(nt,tt),Ne.mount(new function(){function e(){this.defaults={swapClass:"sortable-swap-highlight"}}return e.prototype={dragStart:function(e){Me=e.dragEl},dragOverValid:function(e){var t=e.completed,n=e.target,o=e.changed,r=e.cancel;if(e.activeSortable.options.swap){var a=this.options;if(n&&n!==this.sortable.el){var i=Me;!1!==(0,e.onMove)(n)?(y(n,a.swapClass,!0),Me=n):Me=null,i&&i!==Me&&y(i,a.swapClass,!1)}o(),t(!0),r()}},drop:function(e){var t,n,o,r,a,i,l=e.activeSortable,s=e.putSortable,c=e.dragEl,u=s||this.sortable,d=this.options;Me&&y(Me,d.swapClass,!1),Me&&(d.swap||s&&s.options.swap)&&c!==Me&&(u.captureAnimationState(),u!==l&&l.captureAnimationState(),i=(n=Me).parentNode,(a=(t=c).parentNode)&&i&&!a.isEqualNode(n)&&!i.isEqualNode(t)&&(o=P(t),r=P(n),a.isEqualNode(i)&&o<r&&r++,a.insertBefore(n,a.children[o]),i.insertBefore(t,i.children[r])),u.animateAll(),u!==l&&l.animateAll())},nulling:function(){Me=null}},Object.assign(e,{pluginName:"swap",eventProperties:function(){return{swapItem:Me}}})}),Ne.mount(new function(){function e(e){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));e.options.supportPointer?f(document,"pointerup",this._deselectMultiDrag):(f(document,"mouseup",this._deselectMultiDrag),f(document,"touchend",this._deselectMultiDrag)),f(document,"keydown",this._checkKeyDown),f(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(t,n){var o="";Ge.length&&Fe===e?Ge.forEach((function(e,t){o+=(t?", ":"")+e.textContent})):o=n.textContent,t.setData("Text",o)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){ze=e.dragEl},delayEnded:function(){this.isMultiDrag=~Ge.indexOf(ze)},setupClone:function(e){var t=e.sortable,n=e.cancel;if(this.isMultiDrag){for(var o=0;o<Ge.length;o++)qe.push(k(Ge[o])),qe[o].sortableIndex=Ge[o].sortableIndex,qe[o].draggable=!1,qe[o].style["will-change"]="",y(qe[o],this.options.selectedClass,!1),Ge[o]===ze&&y(qe[o],this.options.chosenClass,!1);t._hideClone(),n()}},clone:function(e){var t=e.dispatchSortableEvent,n=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||Ge.length&&Fe===e.sortable&&(Je(!0,e.rootEl),t("clone"),n()))},showClone:function(e){var t=e.cloneNowShown,n=e.cancel;this.isMultiDrag&&(Je(!1,e.rootEl),qe.forEach((function(e){w(e,"display","")})),t(),Ke=!1,n())},hideClone:function(e){var t=this,n=e.cloneNowHidden,o=e.cancel;this.isMultiDrag&&(qe.forEach((function(e){w(e,"display","none"),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)})),n(),Ke=!0,o())},dragStartGlobal:function(e){!this.isMultiDrag&&Fe&&Fe.multiDrag._deselectMultiDrag(),Ge.forEach((function(e){e.sortableIndex=P(e)})),Ge=Ge.sort((function(e,t){return e.sortableIndex-t.sortableIndex})),Ze=!0},dragStarted:function(e){var t=this,n=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){Ge.forEach((function(e){e!==ze&&w(e,"position","absolute")}));var o=D(ze,!1,!0,!0);Ge.forEach((function(e){e!==ze&&N(e,o)})),$e=!0,Ve=!0}n.animateAll((function(){$e=!1,Ve=!1,t.options.animation&&Ge.forEach((function(e){R(e)})),t.options.sort&&Qe()}))}},dragOver:function(e){var t=e.completed,n=e.cancel;$e&&~Ge.indexOf(e.target)&&(t(!1),n())},revert:function(e){var t=e.fromSortable,n=e.rootEl,o=e.sortable,r=e.dragRect;Ge.length>1&&(Ge.forEach((function(e){o.addAnimationState({target:e,rect:$e?D(e):r}),R(e),e.fromRect=r,t.removeAnimationState(e)})),$e=!1,function(e,t){Ge.forEach((function(n,o){var r=t.children[n.sortableIndex+(e?Number(o):0)];r?t.insertBefore(n,r):t.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(e){var t=e.sortable,n=e.isOwner,o=e.activeSortable,r=e.parentEl,a=e.putSortable,i=this.options;if(e.insertion){if(n&&o._hideClone(),Ve=!1,i.animation&&Ge.length>1&&($e||!n&&!o.options.sort&&!a)){var l=D(ze,!1,!0,!0);Ge.forEach((function(e){e!==ze&&(N(e,l),r.appendChild(e))})),$e=!0}if(!n)if($e||Qe(),Ge.length>1){var s=Ke;o._showClone(t),o.options.animation&&!Ke&&s&&qe.forEach((function(e){o.addAnimationState({target:e,rect:We}),e.fromRect=We,e.thisAnimationDuration=null}))}else o._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,n=e.isOwner,o=e.activeSortable;if(Ge.forEach((function(e){e.thisAnimationDuration=null})),o.options.animation&&!n&&o.multiDrag.isMultiDrag){We=Object.assign({},t);var r=E(ze,!0);We.top-=r.f,We.left-=r.e}},dragOverAnimationComplete:function(){$e&&($e=!1,Qe())},drop:function(e){var t=e.originalEvent,n=e.rootEl,o=e.parentEl,r=e.sortable,a=e.dispatchSortableEvent,i=e.oldIndex,l=e.putSortable,s=l||this.sortable;if(t){var c=this.options,u=o.children;if(!Ze)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),y(ze,c.selectedClass,!~Ge.indexOf(ze)),~Ge.indexOf(ze))Ge.splice(Ge.indexOf(ze),1),Ue=null,H({sortable:r,rootEl:n,name:"deselect",targetEl:ze,originalEvt:t});else{if(Ge.push(ze),H({sortable:r,rootEl:n,name:"select",targetEl:ze,originalEvt:t}),t.shiftKey&&Ue&&r.el.contains(Ue)){var d,f,p=P(Ue),h=P(ze);if(~p&&~h&&p!==h)for(h>p?(f=p,d=h):(f=h,d=p+1);f<d;f++)~Ge.indexOf(u[f])||(y(u[f],c.selectedClass,!0),Ge.push(u[f]),H({sortable:r,rootEl:n,name:"select",targetEl:u[f],originalEvt:t}))}else Ue=ze;Fe=s}if(Ze&&this.isMultiDrag){if((o[L].options.sort||o!==n)&&Ge.length>1){var v=D(ze),g=P(ze,":not(."+this.options.selectedClass+")");if(!Ve&&c.animation&&(ze.thisAnimationDuration=null),s.captureAnimationState(),!Ve&&(c.animation&&(ze.fromRect=v,Ge.forEach((function(e){if(e.thisAnimationDuration=null,e!==ze){var t=$e?D(e):v;e.fromRect=t,s.addAnimationState({target:e,rect:t})}}))),Qe(),Ge.forEach((function(e){u[g]?o.insertBefore(e,u[g]):o.appendChild(e),g++})),i===P(ze))){var m=!1;Ge.forEach((function(e){e.sortableIndex===P(e)||(m=!0)})),m&&a("update")}Ge.forEach((function(e){R(e)})),s.animateAll()}Fe=s}(n===o||l&&"clone"!==l.lastPutMode)&&qe.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}},nullingGlobal:function(){this.isMultiDrag=Ze=!1,qe.length=0},destroyGlobal:function(){this._deselectMultiDrag(),p(document,"pointerup",this._deselectMultiDrag),p(document,"mouseup",this._deselectMultiDrag),p(document,"touchend",this._deselectMultiDrag),p(document,"keydown",this._checkKeyDown),p(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==Ze&&Ze||Fe!==this.sortable||e&&g(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;Ge.length;){var t=Ge[0];y(t,this.options.selectedClass,!1),Ge.shift(),H({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvt:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Object.assign(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[L];t&&t.options.multiDrag&&!~Ge.indexOf(e)&&(Fe&&Fe!==t&&(Fe.multiDrag._deselectMultiDrag(),Fe=t),y(e,t.options.selectedClass,!0),Ge.push(e))},deselect:function(e){var t=e.parentNode[L],n=Ge.indexOf(e);t&&t.options.multiDrag&&~n&&(y(e,t.options.selectedClass,!1),Ge.splice(n,1))}},eventProperties:function(){var e=this,t=[],n=[];return Ge.forEach((function(o){var r;t.push({multiDragElement:o,index:o.sortableIndex}),r=$e&&o!==ze?-1:$e?P(o,":not(."+e.options.selectedClass+")"):P(o),n.push({multiDragElement:o,index:r})})),{items:[].concat(Ge),clones:[].concat(qe),oldIndicies:t,newIndicies:n}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}),t.default=Ne},function(e,t,n){"use strict";n.r(t);var o=n(0),r=n(2),a=n.n(r),i=n(3),l=n.n(i),s=n(4),c=n.n(s),u=n(5),d=n(1);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=wp.i18n.__,v=wp.components,g=v.Dashicon,m=v.TextControl,b=v.Button,y=function(e){window.svgIcons;var t=Object(d.useState)({open:!1}),n=a()(t,2),r=n[0],i=n[1],l=Object(o.createElement)("span",{className:"description customize-control-description"},h("Enter alternative URL which provides above selected language translation of your site.","astra-addon"));return Object(o.createElement)("div",{className:"ahfb-sorter-item","data-id":e.item.id,key:e.item.id},Object(o.createElement)("div",{className:"ahfb-sorter-item-panel-header",onClick:function(){i((function(e){return p(p({},e),{},{open:!r.open})}))}},Object(o.createElement)("span",{className:"ahfb-sorter-title"},void 0!==e.item.label&&""!==e.item.label?e.item.label:h("Language Item","astra-addon")),Object(o.createElement)(b,{className:"ahfb-sorter-item-expand ".concat(e.item.enabled?"item-is-visible":"item-is-hidden"),onClick:function(t){t.stopPropagation(),e.toggleEnabled(!e.item.enabled,e.index)}},Object(o.createElement)(g,{icon:"visibility"})),Object(o.createElement)(b,{className:"ahfb-sorter-item-remove",isDestructive:!0,onClick:function(){e.removeItem(e.index)}},Object(o.createElement)(g,{icon:"no-alt"}))),r.open&&Object(o.createElement)("div",{className:"ahfb-sorter-item-panel-content"},Object(o.createElement)(m,{label:h("Label","astra-addon"),value:e.item.label?e.item.label:"",onChange:function(t){e.onChangeLabel(t,e.index)}}),Object(o.createElement)(m,{label:h("URL","astra-addon"),value:e.item.url?e.item.url:"",onChange:function(t){e.onChangeURL(t,e.index)}}),l))};function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var O=wp.i18n.__,S=wp.components,D=S.Button,C=S.SelectControl,_=function(e){var t=e.control.setting.get(),n={items:[{id:"gb",enabled:!0,url:"",label:O("English","astra-addon")}]},r=e.control.params.default?E(E({},n),e.control.params.default):n;t=t?E(E({},r),t):r;var i={group:"language_selector_group",options:[{label:O("Albanian","astra-addon"),value:"al"},{label:O("Arabic","astra-addon"),value:"sa"},{label:O("Bengali","astra-addon"),value:"bd"},{label:O("Bulgarian","astra-addon"),value:"bg"},{label:O("Chinese","astra-addon"),value:"cn"},{label:O("Croatian","astra-addon"),value:"hr"},{label:O("Czech","astra-addon"),value:"cz"},{label:O("English","astra-addon"),value:"gb"},{label:O("French","astra-addon"),value:"fr"},{label:O("German","astra-addon"),value:"de"},{label:O("Greek","astra-addon"),value:"gr"},{label:O("Hebrew","astra-addon"),value:"il"},{label:O("Hindi","astra-addon"),value:"in"},{label:O("Hungarian","astra-addon"),value:"hu"},{label:O("Icelandic","astra-addon"),value:"is"},{label:O("Indonesian","astra-addon"),value:"id"},{label:O("Italian","astra-addon"),value:"it"},{label:O("Japanese","astra-addon"),value:"jp"},{label:O("Korean","astra-addon"),value:"kr"},{label:O("Latvian","astra-addon"),value:"lv"},{label:O("Lithuanian","astra-addon"),value:"lt"},{label:O("Macedonian","astra-addon"),value:"mk"},{label:O("Malay","astra-addon"),value:"my"},{label:O("Maltese","astra-addon"),value:"mt"},{label:O("Mongolian","astra-addon"),value:"mn"},{label:O("Nepali","astra-addon"),value:"np"},{label:O("Dutch","astra-addon"),value:"nl"},{label:O("Norwegian Bokmål","astra-addon"),value:"no"},{label:O("Persian","astra-addon"),value:"ir"},{label:O("Polish","astra-addon"),value:"pl"},{label:O("Portuguese, Portugal","astra-addon"),value:"pt"},{label:O("Romanian","astra-addon"),value:"ro"},{label:O("Russian","astra-addon"),value:"ru"},{label:O("Serbian","astra-addon"),value:"rs"},{label:O("Slovak","astra-addon"),value:"sk"},{label:O("Slovenian","astra-addon"),value:"si"},{label:O("Somali","astra-addon"),value:"so"},{label:O("Spanish","astra-addon"),value:"es"},{label:O("Swedish","astra-addon"),value:"se"},{label:O("Tamil","astra-addon"),value:"lk"},{label:O("Thai","astra-addon"),value:"th"},{label:O("Turkish","astra-addon"),value:"tr"},{label:O("Ukrainian","astra-addon"),value:"ua"},{label:O("Urdu","astra-addon"),value:"pk"},{label:O("Uzbek","astra-addon"),value:"uz"},{label:O("Vietnamese","astra-addon"),value:"vn"},{label:O("Zulu","astra-addon"),value:"za"},{label:O("Other","astra-addon"),value:"zz-other"}].sort((function(e,t){return e.label<t.label?-1:e.label>t.label?1:0}))},l=e.control.params.input_attrs?E(E({},i),e.control.params.input_attrs):i,s=[];l.options.map((function(e){t.items.some((function(t){return t.id===e.value}))||s.push(e)}));var c=Object(d.useState)({value:t,isVisible:!1,control:void 0!==s[0]&&void 0!==s[0].value?s[0].value:""}),f=a()(c,2),p=f[0],h=f[1];Object(d.useEffect)((function(){h((function(t){return E(E({},t),{},{value:e.control.setting.get()})}))}),[e]);var v=function(t){e.control.setting.set(E(E(E({},e.control.setting.get()),t),{},{flag:!e.control.setting.get().flag}))},g=function(){var e,t=document.querySelectorAll(".ahfb-builder-area");for(e=0;e<t.length;++e)t[e].classList.remove("ahfb-dragging-dropzones")},m=function(e,t){var n=p.value,o=n.items.map((function(n,o){return t===o&&(n=E(E({},n),e)),n}));n.items=o,h((function(e){return E(E({},e),{},{value:n})})),v(n)},b=function(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!=t.length)return!1;for(var n=0;n<e.length;++n)if(e[n]!==t[n])return!1;return!0},w=void 0!==p.value&&null!=p.value.items&&null!=p.value.items.length&&p.value.items.length>0?p.value.items:[],S=[];w.length>0&&w.map((function(e){S.push({id:e.id})})),l.options.map((function(e){S.some((function(t){return t.id===e.value}))||s.push(e)}));return Object(o.createElement)("div",{className:"ahfb-control-field ahfb-sorter-items"},Object(o.createElement)("div",{className:"ahfb-sorter-row"},Object(o.createElement)(u.ReactSortable,{animation:100,onStart:function(){return g()},onEnd:function(){return g()},group:l.group,className:"ahfb-sorter-drop ahfb-sorter-sortable-panel ahfb-sorter-drop-".concat(l.group),handle:".ahfb-sorter-item-panel-header",list:S,setList:function(e){return t=e,n=p.value,o=n.items,r=[],t.length>0&&t.map((function(e){o.filter((function(t){t.id===e.id&&r.push(t)}))})),void(b(o,r)||(o.items=r,n.items=r,h((function(e){return E(E({},e),{},{value:n})})),v(n)));var t,n,o,r}},w.length>0&&w.map((function(e,t){return Object(o.createElement)(y,{removeItem:function(e){return t=e,n=p.value,o=n.items,r=[],o.length>0&&o.map((function(e,n){t!==n&&r.push(e)})),n.items=r,h((function(e){return E(E({},e),{},{value:n})})),void v(n);var t,n,o,r},toggleEnabled:function(e,t){return function(e,t){m({enabled:e},t)}(e,t)},onChangeLabel:function(e,t){return function(e,t){m({label:e},t)}(e,t)},onChangeURL:function(e,t){return function(e,t){m({url:e},t)}(e,t)},key:e.id,index:t,item:e,controlParams:l})})))),void 0!==s[0]&&void 0!==s[0].value&&Object(o.createElement)("div",{className:"ahfb-language-selector-add-area"},Object(o.createElement)(C,{value:p.control,options:s,onChange:function(e){h((function(t){return E(E({},t),{},{control:e})}))}}),Object(o.createElement)(D,{className:"ahfb-sorter-add-item",isPrimary:!0,onClick:function(){!function(){var e=p.control;if(h((function(e){return E(E({},e),{},{isVisible:!1})})),e){var t=p.value,n=t.items,o=l.options.filter((function(t){return t.value===e})),r={id:e,enabled:!0,url:"",label:o[0].label};n.push(r),t.items=n;var a=[];l.options.map((function(e){n.some((function(t){return t.id===e.value}))||a.push(e)})),h((function(e){return E(E({},e),{},{control:void 0!==a[0]&&void 0!==a[0].value?a[0].value:""})})),h((function(e){return E(E({},e),{},{value:t})})),v(t)}}()}},O("Add Language","astra-addon"))))};_.propTypes={control:c.a.object.isRequired};var x=_,P=wp.customize.Control.extend({renderContent:function(){ReactDOM.render(Object(o.createElement)(x,{control:this}),this.container[0])}});wp.customize.controlConstructor["ast-language-selector"]=P}]);