@innovastudio/contentbuilder 1.2.10 → 1.2.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbuilder",
3
- "version": "1.2.10",
3
+ "version": "1.2.11",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
@@ -21464,7 +21464,7 @@ const renderSnippetPanel = builder => {
21464
21464
  });
21465
21465
  }
21466
21466
  });
21467
- dropDown.toggle();
21467
+ dropDown.toggle(false);
21468
21468
 
21469
21469
  if (builder.opts.snippetList === '#divSnippetList') {
21470
21470
  snippetPanel.querySelector('.selectsnippet').style.display = 'none';
@@ -5,7 +5,7 @@ var ContentBuilder=function(){"use strict";var t="undefined"!=typeof globalThis?
5
5
  * @author owenm <owen23355@gmail.com>
6
6
  * @license MIT
7
7
  */
8
- function en(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function nn(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?en(Object(i),!0).forEach((function(e){sn(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):en(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function on(t){return(on="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function sn(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function rn(){return(rn=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}function ln(t,e){if(null==t)return{};var i,n,o=function(t,e){if(null==t)return{};var i,n,o={},s=Object.keys(t);for(n=0;n<s.length;n++)i=s[n],e.indexOf(i)>=0||(o[i]=t[i]);return o}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)i=s[n],e.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(o[i]=t[i])}return o}function an(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var dn=an(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),un=an(/Edge/i),cn=an(/firefox/i),pn=an(/safari/i)&&!an(/chrome/i)&&!an(/android/i),hn=an(/iP(ad|od|hone)/i),fn=an(/chrome/i)&&an(/android/i),gn={capture:!1,passive:!1};function mn(t,e,i){t.addEventListener(e,i,!dn&&gn)}function bn(t,e,i){t.removeEventListener(e,i,!dn&&gn)}function vn(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function yn(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function xn(t,e,i,n){if(t){i=i||document;do{if(null!=e&&(">"===e[0]?t.parentNode===i&&vn(t,e):vn(t,e))||n&&t===i)return t;if(t===i)break}while(t=yn(t))}return null}var _n,Sn=/\s+/g;function wn(t,e,i){if(t&&e)if(t.classList)t.classList[i?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(Sn," ").replace(" "+e+" "," ");t.className=(n+(i?" "+e:"")).replace(Sn," ")}}function Cn(t,e,i){var n=t&&t.style;if(n){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];e in n||-1!==e.indexOf("webkit")||(e="-webkit-"+e),n[e]=i+("string"==typeof i?"":"px")}}function kn(t,e){var i="";if("string"==typeof t)i=t;else do{var n=Cn(t,"transform");n&&"none"!==n&&(i=n+" "+i)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(i)}function En(t,e,i){if(t){var n=t.getElementsByTagName(e),o=0,s=n.length;if(i)for(;o<s;o++)i(n[o],o);return n}return[]}function An(){var t=document.scrollingElement;return t||document.documentElement}function qn(t,e,i,n,o){if(t.getBoundingClientRect||t===window){var s,r,l,a,d,u,c;if(t!==window&&t.parentNode&&t!==An()?(r=(s=t.getBoundingClientRect()).top,l=s.left,a=s.bottom,d=s.right,u=s.height,c=s.width):(r=0,l=0,a=window.innerHeight,d=window.innerWidth,u=window.innerHeight,c=window.innerWidth),(e||i)&&t!==window&&(o=o||t.parentNode,!dn))do{if(o&&o.getBoundingClientRect&&("none"!==Cn(o,"transform")||i&&"static"!==Cn(o,"position"))){var p=o.getBoundingClientRect();r-=p.top+parseInt(Cn(o,"border-top-width")),l-=p.left+parseInt(Cn(o,"border-left-width")),a=r+s.height,d=l+s.width;break}}while(o=o.parentNode);if(n&&t!==window){var h=kn(o||t),f=h&&h.a,g=h&&h.d;h&&(a=(r/=g)+(u/=g),d=(l/=f)+(c/=f))}return{top:r,left:l,bottom:a,right:d,width:c,height:u}}}function Ln(t,e,i){for(var n=Nn(t,!0),o=qn(t)[e];n;){var s=qn(n)[i];if(!("top"===i||"left"===i?o>=s:o<=s))return n;if(n===An())break;n=Nn(n,!1)}return!1}function Tn(t,e,i,n){for(var o=0,s=0,r=t.children;s<r.length;){if("none"!==r[s].style.display&&r[s]!==Do.ghost&&(n||r[s]!==Do.dragged)&&xn(r[s],i.draggable,t,!1)){if(o===e)return r[s];o++}s++}return null}function Mn(t,e){for(var i=t.lastElementChild;i&&(i===Do.ghost||"none"===Cn(i,"display")||e&&!vn(i,e));)i=i.previousElementSibling;return i||null}function On(t,e){var i=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Do.clone||e&&!vn(t,e)||i++;return i}function Rn(t){var e=0,i=0,n=An();if(t)do{var o=kn(t),s=o.a,r=o.d;e+=t.scrollLeft*s,i+=t.scrollTop*r}while(t!==n&&(t=t.parentNode));return[e,i]}function Nn(t,e){if(!t||!t.getBoundingClientRect)return An();var i=t,n=!1;do{if(i.clientWidth<i.scrollWidth||i.clientHeight<i.scrollHeight){var o=Cn(i);if(i.clientWidth<i.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||i.clientHeight<i.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!i.getBoundingClientRect||i===document.body)return An();if(n||e)return i;n=!0}}}while(i=i.parentNode);return An()}function Bn(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function In(t,e){return function(){if(!_n){var i=arguments,n=this;1===i.length?t.call(n,i[0]):t.apply(n,i),_n=setTimeout((function(){_n=void 0}),e)}}}function $n(t,e,i){t.scrollLeft+=e,t.scrollTop+=i}function Dn(t){var e=window.Polymer,i=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):i?i(t).clone(!0)[0]:t.cloneNode(!0)}var Pn="Sortable"+(new Date).getTime();function Hn(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==Cn(t,"display")&&t!==Do.ghost){e.push({target:t,rect:qn(t)});var i=nn({},e[e.length-1].rect);if(t.thisAnimationDuration){var n=kn(t,!0);n&&(i.top-=n.f,i.left-=n.e)}t.fromRect=i}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var i in t)if(t.hasOwnProperty(i))for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t[i][n])return Number(i);return-1}(e,{target:t}),1)},animateAll:function(i){var n=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof i&&i());var o=!1,s=0;e.forEach((function(t){var e=0,i=t.target,r=i.fromRect,l=qn(i),a=i.prevFromRect,d=i.prevToRect,u=t.rect,c=kn(i,!0);c&&(l.top-=c.f,l.left-=c.e),i.toRect=l,i.thisAnimationDuration&&Bn(a,l)&&!Bn(r,l)&&(u.top-l.top)/(u.left-l.left)==(r.top-l.top)/(r.left-l.left)&&(e=function(t,e,i,n){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-i.top,2)+Math.pow(e.left-i.left,2))*n.animation}(u,a,d,n.options)),Bn(l,r)||(i.prevFromRect=r,i.prevToRect=l,e||(e=n.options.animation),n.animate(i,u,l,e)),e&&(o=!0,s=Math.max(s,e),clearTimeout(i.animationResetTimer),i.animationResetTimer=setTimeout((function(){i.animationTime=0,i.prevFromRect=null,i.fromRect=null,i.prevToRect=null,i.thisAnimationDuration=null}),e),i.thisAnimationDuration=e)})),clearTimeout(t),o?t=setTimeout((function(){"function"==typeof i&&i()}),s):"function"==typeof i&&i(),e=[]},animate:function(t,e,i,n){if(n){Cn(t,"transition",""),Cn(t,"transform","");var o=kn(this.el),s=o&&o.a,r=o&&o.d,l=(e.left-i.left)/(s||1),a=(e.top-i.top)/(r||1);t.animatingX=!!l,t.animatingY=!!a,Cn(t,"transform","translate3d("+l+"px,"+a+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),Cn(t,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),Cn(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){Cn(t,"transition",""),Cn(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),n)}}}}var zn=[],Fn={initializeByDefault:!0},Un={mount:function(t){for(var e in Fn)Fn.hasOwnProperty(e)&&!(e in t)&&(t[e]=Fn[e]);zn.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),zn.push(t)},pluginEvent:function(t,e,i){var n=this;this.eventCanceled=!1,i.cancel=function(){n.eventCanceled=!0};var o=t+"Global";zn.forEach((function(n){e[n.pluginName]&&(e[n.pluginName][o]&&e[n.pluginName][o](nn({sortable:e},i)),e.options[n.pluginName]&&e[n.pluginName][t]&&e[n.pluginName][t](nn({sortable:e},i)))}))},initializePlugins:function(t,e,i,n){for(var o in zn.forEach((function(n){var o=n.pluginName;if(t.options[o]||n.initializeByDefault){var s=new n(t,e,t.options);s.sortable=t,s.options=t.options,t[o]=s,rn(i,s.defaults)}})),t.options)if(t.options.hasOwnProperty(o)){var s=this.modifyOption(t,o,t.options[o]);void 0!==s&&(t.options[o]=s)}},getEventProperties:function(t,e){var i={};return zn.forEach((function(n){"function"==typeof n.eventProperties&&rn(i,n.eventProperties.call(e[n.pluginName],t))})),i},modifyOption:function(t,e,i){var n;return zn.forEach((function(o){t[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[e]&&(n=o.optionListeners[e].call(t[o.pluginName],i))})),n}};var Wn=["evt"],jn=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.evt,o=ln(i,Wn);Un.pluginEvent.bind(Do)(t,e,nn({dragEl:Vn,parentEl:Yn,ghostEl:Xn,rootEl:Kn,nextEl:Zn,lastDownEl:Qn,cloneEl:Jn,cloneHidden:to,dragStarted:fo,putSortable:ro,activeSortable:Do.active,originalEvent:n,oldIndex:eo,oldDraggableIndex:no,newIndex:io,newDraggableIndex:oo,hideGhostForTarget:No,unhideGhostForTarget:Bo,cloneNowHidden:function(){to=!0},cloneNowShown:function(){to=!1},dispatchSortableEvent:function(t){Gn({sortable:e,name:t,originalEvent:n})}},o))};function Gn(t){!function(t){var e=t.sortable,i=t.rootEl,n=t.name,o=t.targetEl,s=t.cloneEl,r=t.toEl,l=t.fromEl,a=t.oldIndex,d=t.newIndex,u=t.oldDraggableIndex,c=t.newDraggableIndex,p=t.originalEvent,h=t.putSortable,f=t.extraEventProperties;if(e=e||i&&i[Pn]){var g,m=e.options,b="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||dn||un?(g=document.createEvent("Event")).initEvent(n,!0,!0):g=new CustomEvent(n,{bubbles:!0,cancelable:!0}),g.to=r||i,g.from=l||i,g.item=o||i,g.clone=s,g.oldIndex=a,g.newIndex=d,g.oldDraggableIndex=u,g.newDraggableIndex=c,g.originalEvent=p,g.pullMode=h?h.lastPutMode:void 0;var v=nn(nn({},f),Un.getEventProperties(n,e));for(var y in v)g[y]=v[y];i&&i.dispatchEvent(g),m[b]&&m[b].call(e,g)}}(nn({putSortable:ro,cloneEl:Jn,targetEl:Vn,rootEl:Kn,oldIndex:eo,oldDraggableIndex:no,newIndex:io,newDraggableIndex:oo},t))}var Vn,Yn,Xn,Kn,Zn,Qn,Jn,to,eo,io,no,oo,so,ro,lo,ao,uo,co,po,ho,fo,go,mo,bo,vo,yo=!1,xo=!1,_o=[],So=!1,wo=!1,Co=[],ko=!1,Eo=[],Ao="undefined"!=typeof document,qo=hn,Lo=un||dn?"cssFloat":"float",To=Ao&&!fn&&!hn&&"draggable"in document.createElement("div"),Mo=function(){if(Ao){if(dn)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Oo=function(t,e){var i=Cn(t),n=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),o=Tn(t,0,e),s=Tn(t,1,e),r=o&&Cn(o),l=s&&Cn(s),a=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+qn(o).width,d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+qn(s).width;if("flex"===i.display)return"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal";if("grid"===i.display)return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&r.float&&"none"!==r.float){var u="left"===r.float?"left":"right";return!s||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return o&&("block"===r.display||"flex"===r.display||"table"===r.display||"grid"===r.display||a>=n&&"none"===i[Lo]||s&&"none"===i[Lo]&&a+d>n)?"vertical":"horizontal"},Ro=function(t){function e(t,i){return function(n,o,s,r){var l=n.options.group.name&&o.options.group.name&&n.options.group.name===o.options.group.name;if(null==t&&(i||l))return!0;if(null==t||!1===t)return!1;if(i&&"clone"===t)return t;if("function"==typeof t)return e(t(n,o,s,r),i)(n,o,s,r);var a=(i?n:o).options.group.name;return!0===t||"string"==typeof t&&t===a||t.join&&t.indexOf(a)>-1}}var i={},n=t.group;n&&"object"==on(n)||(n={name:n}),i.name=n.name,i.checkPull=e(n.pull,!0),i.checkPut=e(n.put),i.revertClone=n.revertClone,t.group=i},No=function(){!Mo&&Xn&&Cn(Xn,"display","none")},Bo=function(){!Mo&&Xn&&Cn(Xn,"display","")};Ao&&document.addEventListener("click",(function(t){if(xo)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),xo=!1,!1}),!0);var Io=function(t){if(Vn){t=t.touches?t.touches[0]:t;var e=(o=t.clientX,s=t.clientY,_o.some((function(t){var e=t[Pn].options.emptyInsertThreshold;if(e&&!Mn(t)){var i=qn(t),n=o>=i.left-e&&o<=i.right+e,l=s>=i.top-e&&s<=i.bottom+e;return n&&l?r=t:void 0}})),r);if(e){var i={};for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[Pn]._onDragOver(i)}}var o,s,r},$o=function(t){Vn&&Vn.parentNode[Pn]._isOutsideThisEl(t.target)};function Do(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=rn({},e),t[Pn]=this;var i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Oo(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Do.supportPointer&&"PointerEvent"in window&&!pn,emptyInsertThreshold:5};for(var n in Un.initializePlugins(this,t,i),i)!(n in e)&&(e[n]=i[n]);for(var o in Ro(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&To,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?mn(t,"pointerdown",this._onTapStart):(mn(t,"mousedown",this._onTapStart),mn(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(mn(t,"dragover",this),mn(t,"dragenter",this)),_o.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),rn(this,Hn())}function Po(t,e,i,n,o,s,r,l){var a,d,u=t[Pn],c=u.options.onMove;return!window.CustomEvent||dn||un?(a=document.createEvent("Event")).initEvent("move",!0,!0):a=new CustomEvent("move",{bubbles:!0,cancelable:!0}),a.to=e,a.from=t,a.dragged=i,a.draggedRect=n,a.related=o||e,a.relatedRect=s||qn(e),a.willInsertAfter=l,a.originalEvent=r,t.dispatchEvent(a),c&&(d=c.call(u,a,r)),d}function Ho(t){t.draggable=!1}function zo(){ko=!1}function Fo(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,i=e.length,n=0;i--;)n+=e.charCodeAt(i);return n.toString(36)}function Uo(t){return setTimeout(t,0)}function Wo(t){return clearTimeout(t)}Do.prototype={constructor:Do,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(go=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,Vn):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,n=this.options,o=n.preventOnFilter,s=t.type,r=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(r||t).target,a=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,d=n.filter;if(function(t){Eo.length=0;var e=t.getElementsByTagName("input"),i=e.length;for(;i--;){var n=e[i];n.checked&&Eo.push(n)}}(i),!Vn&&!(/mousedown|pointerdown/.test(s)&&0!==t.button||n.disabled)&&!a.isContentEditable&&(this.nativeDraggable||!pn||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=xn(l,n.draggable,i,!1))&&l.animated||Qn===l)){if(eo=On(l),no=On(l,n.draggable),"function"==typeof d){if(d.call(this,t,l,this))return Gn({sortable:e,rootEl:a,name:"filter",targetEl:l,toEl:i,fromEl:i}),jn("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(d&&(d=d.split(",").some((function(n){if(n=xn(a,n.trim(),i,!1))return Gn({sortable:e,rootEl:n,name:"filter",targetEl:l,fromEl:i,toEl:i}),jn("filter",e,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());n.handle&&!xn(a,n.handle,i,!1)||this._prepareDragStart(t,r,l)}}},_prepareDragStart:function(t,e,i){var n,o=this,s=o.el,r=o.options,l=s.ownerDocument;if(i&&!Vn&&i.parentNode===s){var a=qn(i);if(Kn=s,Yn=(Vn=i).parentNode,Zn=Vn.nextSibling,Qn=i,so=r.group,Do.dragged=Vn,lo={target:Vn,clientX:(e||t).clientX,clientY:(e||t).clientY},po=lo.clientX-a.left,ho=lo.clientY-a.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Vn.style["will-change"]="all",n=function(){jn("delayEnded",o,{evt:t}),Do.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!cn&&o.nativeDraggable&&(Vn.draggable=!0),o._triggerDragStart(t,e),Gn({sortable:o,name:"choose",originalEvent:t}),wn(Vn,r.chosenClass,!0))},r.ignore.split(",").forEach((function(t){En(Vn,t.trim(),Ho)})),mn(l,"dragover",Io),mn(l,"mousemove",Io),mn(l,"touchmove",Io),mn(l,"mouseup",o._onDrop),mn(l,"touchend",o._onDrop),mn(l,"touchcancel",o._onDrop),cn&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Vn.draggable=!0),jn("delayStart",this,{evt:t}),!r.delay||r.delayOnTouchOnly&&!e||this.nativeDraggable&&(un||dn))n();else{if(Do.eventCanceled)return void this._onDrop();mn(l,"mouseup",o._disableDelayedDrag),mn(l,"touchend",o._disableDelayedDrag),mn(l,"touchcancel",o._disableDelayedDrag),mn(l,"mousemove",o._delayedDragTouchMoveHandler),mn(l,"touchmove",o._delayedDragTouchMoveHandler),r.supportPointer&&mn(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(n,r.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Vn&&Ho(Vn),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;bn(t,"mouseup",this._disableDelayedDrag),bn(t,"touchend",this._disableDelayedDrag),bn(t,"touchcancel",this._disableDelayedDrag),bn(t,"mousemove",this._delayedDragTouchMoveHandler),bn(t,"touchmove",this._delayedDragTouchMoveHandler),bn(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?mn(document,"pointermove",this._onTouchMove):mn(document,e?"touchmove":"mousemove",this._onTouchMove):(mn(Vn,"dragend",this),mn(Kn,"dragstart",this._onDragStart));try{document.selection?Uo((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(yo=!1,Kn&&Vn){jn("dragStarted",this,{evt:e}),this.nativeDraggable&&mn(document,"dragover",$o);var i=this.options;!t&&wn(Vn,i.dragClass,!1),wn(Vn,i.ghostClass,!0),Do.active=this,t&&this._appendGhost(),Gn({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ao){this._lastX=ao.clientX,this._lastY=ao.clientY,No();for(var t=document.elementFromPoint(ao.clientX,ao.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ao.clientX,ao.clientY))!==e;)e=t;if(Vn.parentNode[Pn]._isOutsideThisEl(t),e)do{if(e[Pn]){if(e[Pn]._onDragOver({clientX:ao.clientX,clientY:ao.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Bo()}},_onTouchMove:function(t){if(lo){var e=this.options,i=e.fallbackTolerance,n=e.fallbackOffset,o=t.touches?t.touches[0]:t,s=Xn&&kn(Xn,!0),r=Xn&&s&&s.a,l=Xn&&s&&s.d,a=qo&&vo&&Rn(vo),d=(o.clientX-lo.clientX+n.x)/(r||1)+(a?a[0]-Co[0]:0)/(r||1),u=(o.clientY-lo.clientY+n.y)/(l||1)+(a?a[1]-Co[1]:0)/(l||1);if(!Do.active&&!yo){if(i&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(Xn){s?(s.e+=d-(uo||0),s.f+=u-(co||0)):s={a:1,b:0,c:0,d:1,e:d,f:u};var c="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");Cn(Xn,"webkitTransform",c),Cn(Xn,"mozTransform",c),Cn(Xn,"msTransform",c),Cn(Xn,"transform",c),uo=d,co=u,ao=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Xn){var t=this.options.fallbackOnBody?document.body:Kn,e=qn(Vn,!0,qo,!0,t),i=this.options;if(qo){for(vo=t;"static"===Cn(vo,"position")&&"none"===Cn(vo,"transform")&&vo!==document;)vo=vo.parentNode;vo!==document.body&&vo!==document.documentElement?(vo===document&&(vo=An()),e.top+=vo.scrollTop,e.left+=vo.scrollLeft):vo=An(),Co=Rn(vo)}wn(Xn=Vn.cloneNode(!0),i.ghostClass,!1),wn(Xn,i.fallbackClass,!0),wn(Xn,i.dragClass,!0),Cn(Xn,"transition",""),Cn(Xn,"transform",""),Cn(Xn,"box-sizing","border-box"),Cn(Xn,"margin",0),Cn(Xn,"top",e.top),Cn(Xn,"left",e.left),Cn(Xn,"width",e.width),Cn(Xn,"height",e.height),Cn(Xn,"opacity","0.8"),Cn(Xn,"position",qo?"absolute":"fixed"),Cn(Xn,"zIndex","100000"),Cn(Xn,"pointerEvents","none"),Do.ghost=Xn,t.appendChild(Xn),Cn(Xn,"transform-origin",po/parseInt(Xn.style.width)*100+"% "+ho/parseInt(Xn.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,n=t.dataTransfer,o=i.options;jn("dragStart",this,{evt:t}),Do.eventCanceled?this._onDrop():(jn("setupClone",this),Do.eventCanceled||((Jn=Dn(Vn)).draggable=!1,Jn.style["will-change"]="",this._hideClone(),wn(Jn,this.options.chosenClass,!1),Do.clone=Jn),i.cloneId=Uo((function(){jn("clone",i),Do.eventCanceled||(i.options.removeCloneOnHide||Kn.insertBefore(Jn,Vn),i._hideClone(),Gn({sortable:i,name:"clone"}))})),!e&&wn(Vn,o.dragClass,!0),e?(xo=!0,i._loopId=setInterval(i._emulateDragOver,50)):(bn(document,"mouseup",i._onDrop),bn(document,"touchend",i._onDrop),bn(document,"touchcancel",i._onDrop),n&&(n.effectAllowed="move",o.setData&&o.setData.call(i,n,Vn)),mn(document,"drop",i),Cn(Vn,"transform","translateZ(0)")),yo=!0,i._dragStartId=Uo(i._dragStarted.bind(i,e,t)),mn(document,"selectstart",i),fo=!0,pn&&Cn(document.body,"user-select","none"))},_onDragOver:function(t){var e,i,n,o,s=this.el,r=t.target,l=this.options,a=l.group,d=Do.active,u=so===a,c=l.sort,p=ro||d,h=this,f=!1;if(!ko){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),r=xn(r,l.draggable,s,!0),L("dragOver"),Do.eventCanceled)return f;if(Vn.contains(t.target)||r.animated&&r.animatingX&&r.animatingY||h._ignoreWhileAnimating===r)return M(!1);if(xo=!1,d&&!l.disabled&&(u?c||(n=Yn!==Kn):ro===this||(this.lastPutMode=so.checkPull(this,d,Vn,t))&&a.checkPut(this,d,Vn,t))){if(o="vertical"===this._getDirection(t,r),e=qn(Vn),L("dragOverValid"),Do.eventCanceled)return f;if(n)return Yn=Kn,T(),this._hideClone(),L("revert"),Do.eventCanceled||(Zn?Kn.insertBefore(Vn,Zn):Kn.appendChild(Vn)),M(!0);var g=Mn(s,l.draggable);if(!g||function(t,e,i){var n=qn(Mn(i.el,i.options.draggable)),o=10;return e?t.clientX>n.right+o||t.clientX<=n.right&&t.clientY>n.bottom&&t.clientX>=n.left:t.clientX>n.right&&t.clientY>n.top||t.clientX<=n.right&&t.clientY>n.bottom+o}(t,o,this)&&!g.animated){if(g===Vn)return M(!1);if(g&&s===t.target&&(r=g),r&&(i=qn(r)),!1!==Po(Kn,s,Vn,e,r,i,t,!!r))return T(),s.appendChild(Vn),Yn=s,O(),M(!0)}else if(g&&function(t,e,i){var n=qn(Tn(i.el,0,i.options,!0)),o=10;return e?t.clientX<n.left-o||t.clientY<n.top&&t.clientX<n.right:t.clientY<n.top-o||t.clientY<n.bottom&&t.clientX<n.left}(t,o,this)){var m=Tn(s,0,l,!0);if(m===Vn)return M(!1);if(i=qn(r=m),!1!==Po(Kn,s,Vn,e,r,i,t,!1))return T(),s.insertBefore(Vn,m),Yn=s,O(),M(!0)}else if(r.parentNode===s){i=qn(r);var b,v,y,x=Vn.parentNode!==s,_=!function(t,e,i){var n=i?t.left:t.top,o=i?t.right:t.bottom,s=i?t.width:t.height,r=i?e.left:e.top,l=i?e.right:e.bottom,a=i?e.width:e.height;return n===r||o===l||n+s/2===r+a/2}(Vn.animated&&Vn.toRect||e,r.animated&&r.toRect||i,o),S=o?"top":"left",w=Ln(r,"top","top")||Ln(Vn,"top","top"),C=w?w.scrollTop:void 0;if(go!==r&&(v=i[S],So=!1,wo=!_&&l.invertSwap||x),0!==(b=function(t,e,i,n,o,s,r,l){var a=n?t.clientY:t.clientX,d=n?i.height:i.width,u=n?i.top:i.left,c=n?i.bottom:i.right,p=!1;if(!r)if(l&&bo<d*o){if(!So&&(1===mo?a>u+d*s/2:a<c-d*s/2)&&(So=!0),So)p=!0;else if(1===mo?a<u+bo:a>c-bo)return-mo}else if(a>u+d*(1-o)/2&&a<c-d*(1-o)/2)return function(t){return On(Vn)<On(t)?1:-1}(e);if((p=p||r)&&(a<u+d*s/2||a>c-d*s/2))return a>u+d/2?1:-1;return 0}(t,r,i,o,_?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,wo,go===r))){var k=On(Vn);do{k-=b,y=Yn.children[k]}while(y&&("none"===Cn(y,"display")||y===Xn))}if(0===b||y===r)return M(!1);go=r,mo=b;var E=r.nextElementSibling,A=!1,q=Po(Kn,s,Vn,e,r,i,t,A=1===b);if(!1!==q)return 1!==q&&-1!==q||(A=1===q),ko=!0,setTimeout(zo,30),T(),A&&!E?s.appendChild(Vn):r.parentNode.insertBefore(Vn,A?E:r),w&&$n(w,0,C-w.scrollTop),Yn=Vn.parentNode,void 0===v||wo||(bo=Math.abs(v-qn(r)[S])),O(),M(!0)}if(s.contains(Vn))return M(!1)}return!1}function L(l,a){jn(l,h,nn({evt:t,isOwner:u,axis:o?"vertical":"horizontal",revert:n,dragRect:e,targetRect:i,canSort:c,fromSortable:p,target:r,completed:M,onMove:function(i,n){return Po(Kn,s,Vn,e,i,qn(i),t,n)},changed:O},a))}function T(){L("dragOverAnimationCapture"),h.captureAnimationState(),h!==p&&p.captureAnimationState()}function M(e){return L("dragOverCompleted",{insertion:e}),e&&(u?d._hideClone():d._showClone(h),h!==p&&(wn(Vn,ro?ro.options.ghostClass:d.options.ghostClass,!1),wn(Vn,l.ghostClass,!0)),ro!==h&&h!==Do.active?ro=h:h===Do.active&&ro&&(ro=null),p===h&&(h._ignoreWhileAnimating=r),h.animateAll((function(){L("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(r===Vn&&!Vn.animated||r===s&&!r.animated)&&(go=null),l.dragoverBubble||t.rootEl||r===document||(Vn.parentNode[Pn]._isOutsideThisEl(t.target),!e&&Io(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),f=!0}function O(){io=On(Vn),oo=On(Vn,l.draggable),Gn({sortable:h,name:"change",toEl:s,newIndex:io,newDraggableIndex:oo,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){bn(document,"mousemove",this._onTouchMove),bn(document,"touchmove",this._onTouchMove),bn(document,"pointermove",this._onTouchMove),bn(document,"dragover",Io),bn(document,"mousemove",Io),bn(document,"touchmove",Io)},_offUpEvents:function(){var t=this.el.ownerDocument;bn(t,"mouseup",this._onDrop),bn(t,"touchend",this._onDrop),bn(t,"pointerup",this._onDrop),bn(t,"touchcancel",this._onDrop),bn(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;io=On(Vn),oo=On(Vn,i.draggable),jn("drop",this,{evt:t}),Yn=Vn&&Vn.parentNode,io=On(Vn),oo=On(Vn,i.draggable),Do.eventCanceled||(yo=!1,wo=!1,So=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Wo(this.cloneId),Wo(this._dragStartId),this.nativeDraggable&&(bn(document,"drop",this),bn(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),pn&&Cn(document.body,"user-select",""),Cn(Vn,"transform",""),t&&(fo&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),Xn&&Xn.parentNode&&Xn.parentNode.removeChild(Xn),(Kn===Yn||ro&&"clone"!==ro.lastPutMode)&&Jn&&Jn.parentNode&&Jn.parentNode.removeChild(Jn),Vn&&(this.nativeDraggable&&bn(Vn,"dragend",this),Ho(Vn),Vn.style["will-change"]="",fo&&!yo&&wn(Vn,ro?ro.options.ghostClass:this.options.ghostClass,!1),wn(Vn,this.options.chosenClass,!1),Gn({sortable:this,name:"unchoose",toEl:Yn,newIndex:null,newDraggableIndex:null,originalEvent:t}),Kn!==Yn?(io>=0&&(Gn({rootEl:Yn,name:"add",toEl:Yn,fromEl:Kn,originalEvent:t}),Gn({sortable:this,name:"remove",toEl:Yn,originalEvent:t}),Gn({rootEl:Yn,name:"sort",toEl:Yn,fromEl:Kn,originalEvent:t}),Gn({sortable:this,name:"sort",toEl:Yn,originalEvent:t})),ro&&ro.save()):io!==eo&&io>=0&&(Gn({sortable:this,name:"update",toEl:Yn,originalEvent:t}),Gn({sortable:this,name:"sort",toEl:Yn,originalEvent:t})),Do.active&&(null!=io&&-1!==io||(io=eo,oo=no),Gn({sortable:this,name:"end",toEl:Yn,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){jn("nulling",this),Kn=Vn=Yn=Xn=Zn=Jn=Qn=to=lo=ao=fo=io=oo=eo=no=go=mo=ro=so=Do.dragged=Do.ghost=Do.clone=Do.active=null,Eo.forEach((function(t){t.checked=!0})),Eo.length=uo=co=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Vn&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],i=this.el.children,n=0,o=i.length,s=this.options;n<o;n++)xn(t=i[n],s.draggable,this.el,!1)&&e.push(t.getAttribute(s.dataIdAttr)||Fo(t));return e},sort:function(t,e){var i={},n=this.el;this.toArray().forEach((function(t,e){var o=n.children[e];xn(o,this.options.draggable,n,!1)&&(i[t]=o)}),this),e&&this.captureAnimationState(),t.forEach((function(t){i[t]&&(n.removeChild(i[t]),n.appendChild(i[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return xn(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(void 0===e)return i[t];var n=Un.modifyOption(this,t,e);i[t]=void 0!==n?n:e,"group"===t&&Ro(i)},destroy:function(){jn("destroy",this);var t=this.el;t[Pn]=null,bn(t,"mousedown",this._onTapStart),bn(t,"touchstart",this._onTapStart),bn(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(bn(t,"dragover",this),bn(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),_o.splice(_o.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!to){if(jn("hideClone",this),Do.eventCanceled)return;Cn(Jn,"display","none"),this.options.removeCloneOnHide&&Jn.parentNode&&Jn.parentNode.removeChild(Jn),to=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(to){if(jn("showClone",this),Do.eventCanceled)return;Vn.parentNode!=Kn||this.options.group.revertClone?Zn?Kn.insertBefore(Jn,Zn):Kn.appendChild(Jn):Kn.insertBefore(Jn,Vn),this.options.group.revertClone&&this.animate(Vn,Jn),Cn(Jn,"display",""),to=!1}}else this._hideClone()}},Ao&&mn(document,"touchmove",(function(t){(Do.active||yo)&&t.cancelable&&t.preventDefault()})),Do.utils={on:mn,off:bn,css:Cn,find:En,is:function(t,e){return!!xn(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},throttle:In,closest:xn,toggleClass:wn,clone:Dn,index:On,nextTick:Uo,cancelNextTick:Wo,detectDirection:Oo,getChild:Tn},Do.get=function(t){return t[Pn]},Do.mount=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Do.utils=nn(nn({},Do.utils),t.utils)),Un.mount(t)}))},Do.create=function(t,e){return new Do(t,e)},Do.version="1.14.0";var jo,Go,Vo,Yo,Xo,Ko,Zo=[],Qo=!1;function Jo(){Zo.forEach((function(t){clearInterval(t.pid)})),Zo=[]}function ts(){clearInterval(Ko)}var es=In((function(t,e,i,n){if(e.scroll){var o,s=(t.touches?t.touches[0]:t).clientX,r=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,a=e.scrollSpeed,d=An(),u=!1;Go!==i&&(Go=i,Jo(),jo=e.scroll,o=e.scrollFn,!0===jo&&(jo=Nn(i,!0)));var c=0,p=jo;do{var h=p,f=qn(h),g=f.top,m=f.bottom,b=f.left,v=f.right,y=f.width,x=f.height,_=void 0,S=void 0,w=h.scrollWidth,C=h.scrollHeight,k=Cn(h),E=h.scrollLeft,A=h.scrollTop;h===d?(_=y<w&&("auto"===k.overflowX||"scroll"===k.overflowX||"visible"===k.overflowX),S=x<C&&("auto"===k.overflowY||"scroll"===k.overflowY||"visible"===k.overflowY)):(_=y<w&&("auto"===k.overflowX||"scroll"===k.overflowX),S=x<C&&("auto"===k.overflowY||"scroll"===k.overflowY));var q=_&&(Math.abs(v-s)<=l&&E+y<w)-(Math.abs(b-s)<=l&&!!E),L=S&&(Math.abs(m-r)<=l&&A+x<C)-(Math.abs(g-r)<=l&&!!A);if(!Zo[c])for(var T=0;T<=c;T++)Zo[T]||(Zo[T]={});Zo[c].vx==q&&Zo[c].vy==L&&Zo[c].el===h||(Zo[c].el=h,Zo[c].vx=q,Zo[c].vy=L,clearInterval(Zo[c].pid),0==q&&0==L||(u=!0,Zo[c].pid=setInterval(function(){n&&0===this.layer&&Do.active._onTouchMove(Xo);var e=Zo[this.layer].vy?Zo[this.layer].vy*a:0,i=Zo[this.layer].vx?Zo[this.layer].vx*a:0;"function"==typeof o&&"continue"!==o.call(Do.dragged.parentNode[Pn],i,e,t,Xo,Zo[this.layer].el)||$n(Zo[this.layer].el,i,e)}.bind({layer:c}),24))),c++}while(e.bubbleScroll&&p!==d&&(p=Nn(p,!1)));Qo=u}}),30),is=function(t){var e=t.originalEvent,i=t.putSortable,n=t.dragEl,o=t.activeSortable,s=t.dispatchSortableEvent,r=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var a=i||o;r();var d=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(d.clientX,d.clientY);l(),a&&!a.el.contains(u)&&(s("spill"),this.onSpill({dragEl:n,putSortable:i}))}};function ns(){}function os(){}ns.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var n=Tn(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(e,n):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:is},rn(ns,{pluginName:"revertOnSpill"}),os.prototype={onSpill:function(t){var e=t.dragEl,i=t.putSortable||this.sortable;i.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),i.animateAll()},drop:is},rn(os,{pluginName:"removeOnSpill"}),Do.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?mn(document,"dragover",this._handleAutoScroll):this.options.supportPointer?mn(document,"pointermove",this._handleFallbackAutoScroll):e.touches?mn(document,"touchmove",this._handleFallbackAutoScroll):mn(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?bn(document,"dragover",this._handleAutoScroll):(bn(document,"pointermove",this._handleFallbackAutoScroll),bn(document,"touchmove",this._handleFallbackAutoScroll),bn(document,"mousemove",this._handleFallbackAutoScroll)),ts(),Jo(),clearTimeout(_n),_n=void 0},nulling:function(){Xo=Go=jo=Qo=Ko=Vo=Yo=null,Zo.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var i=this,n=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,s=document.elementFromPoint(n,o);if(Xo=t,e||this.options.forceAutoScrollFallback||un||dn||pn){es(t,this.options,s,e);var r=Nn(s,!0);!Qo||Ko&&n===Vo&&o===Yo||(Ko&&ts(),Ko=setInterval((function(){var s=Nn(document.elementFromPoint(n,o),!0);s!==r&&(r=s,Jo()),es(t,i.options,s,e)}),10),Vo=n,Yo=o)}else{if(!this.options.bubbleScroll||Nn(s,!0)===An())return void Jo();es(t,this.options,Nn(s,!1),!1)}}},rn(t,{pluginName:"scroll",initializeByDefault:!0})}),Do.mount(os,ns);const ss=new o;class rs{constructor(t){const[e,i]=t.children,n=e=>{if(!t)return document.removeEventListener("click",n);t.contains(e.target)||this.toggle(!1)},o=n=>{const o=n.textContent,s=n.getAttribute("data-value");e.textContent=o,this.value=s,this.toggle(!1),t.dispatchEvent(new Event("change")),e.focus(),ss.elementChildren(i).forEach((t=>{ss.removeClass(t,"selected")}));let r=i.querySelector('[data-value="'+s+'"]');r&&ss.addClass(r,"selected")},s=t=>{t.preventDefault(),38===t.keyCode&&t.target.previousElementSibling?t.target.previousElementSibling.focus():40===t.keyCode&&t.target.nextElementSibling?t.target.nextElementSibling.focus():27===t.keyCode?(this.toggle(!1),e.focus()):13!==t.keyCode&&32!==t.keyCode||o(t.target)};e.addEventListener("keydown",(t=>{27===t.keyCode?(this.toggle(!1),t.preventDefault()):13!==t.keyCode&&32!==t.keyCode||(this.toggle(!0),t.preventDefault())})),e.addEventListener("click",(()=>this.toggle())),[...i.children].forEach((t=>{t.addEventListener("keydown",s),t.addEventListener("click",(()=>o(t)))})),this.element=t,this.value=e.getAttribute("data-value"),this.toggle=(o=null)=>{if(o=null===o?"true"!==i.getAttribute("aria-expanded"):o,i.setAttribute("aria-expanded",o),o){e.classList.add("active");let o=i.querySelector('[data-value="'+this.value+'"]');o&&(ss.addClass(o,"selected"),o.focus()),document.addEventListener("click",n),t.dispatchEvent(new Event("opened"))}else e.classList.remove("active"),t.dispatchEvent(new Event("closed")),document.removeEventListener("click",n)}}}const ls=new o,as=t=>{const e=t.util,i=t.builderStuff;let n="",o=t.opts.sidePanel;if("#divSnippetList"===t.opts.snippetList){const s=`<div id="divSnippetList" class="is-side ${"right"===o?"":" fromleft"} snippetlist scroll-darker" tabindex="-1" role="dialog" aria-modal="true" title="${e.out("Snippets")}">\n </div>`;ls.appendHtml(i,s),t.opts.snippetHandle||(n="display:none;")}else n="display:none;",o="left";let s="",r="",l="";if(t.opts.emailMode){r=t.opts.defaultEmailSnippetCategory;for(let e=0;e<t.opts.emailSnippetCategories.length;e++)l+='<li role="option" tabindex="0" data-value="'+t.opts.emailSnippetCategories[e][0]+'">'+t.opts.emailSnippetCategories[e][1]+"</li>",t.opts.emailSnippetCategories[e][0]===t.opts.defaultEmailSnippetCategory&&(s=t.opts.emailSnippetCategories[e][1])}else{r=t.opts.defaultSnippetCategory;for(let e=0;e<t.opts.snippetCategories.length;e++)l+='<li role="option" tabindex="0" data-value="'+t.opts.snippetCategories[e][0]+'">'+t.opts.snippetCategories[e][1]+"</li>",t.opts.snippetCategories[e][0]===t.opts.defaultSnippetCategory&&(s=t.opts.snippetCategories[e][1])}let a='<div class="is-dropdown selectsnippet" style="position:absolute;top:0;right:0;padding: 0;width:100%;z-index:2;"><button tabindex="0" class="dropdown-toggle no-outline" title="'+e.out("Snippet Categories")+'" type="button" aria-haspopup="true" data-value="'+r+'"><span>'+s+'</span></button><ul class="dropdown-menu" role="listbox" title="'+e.out("Snippets")+'" aria-expanded="false">'+l+"</ul></div>"+("right"===o?'<div id="divSnippetScrollUp" role="button" tabindex="-1" style="top:calc(50% - 27px);right:25px;">&#9650;</div><div id="divSnippetScrollDown" role="button" tabindex="-1" style="top:calc(50% + 27px);right:25px;">&#9660;</div><div id="divSnippetHandle" role="button" tabindex="-1" title="'+e.out("Snippets")+'" data-title="'+e.out("Snippets")+'" style="'+n+'"><svg class="is-icon-flex"><use xlink:href="#ion-ios-arrow-left"></use></svg></div>':'<div id="divSnippetScrollUp" role="button" tabindex="-1" style="top:calc(50% - 27px);left:10px;">&#9650;</div><div id="divSnippetScrollDown" role="button" tabindex="-1" style="top:calc(50% + 27px);left:10px;">&#9660;</div><div id="divSnippetHandle" role="button" tabindex="-1" title="'+e.out("Snippets")+'" data-title="'+e.out("Snippets")+'" style="'+n+'"><svg class="is-icon-flex"><use xlink:href="#ion-ios-arrow-right"></use></svg></div>')+'<div class="is-design-list" tabindex="0"></div>',d=document.querySelector(t.opts.snippetList);ls.appendHtml(d,a);const u=new rs(d.querySelector(".selectsnippet"));u.element.addEventListener("change",(()=>{let i=u.value,n=c.querySelectorAll(".snippet-item"),o=!1;Array.prototype.forEach.call(n,(t=>{t.getAttribute("data-cat")===i&&(o=!0)})),o||t.opts.snippetJSON.snippets.forEach((t=>{t.category===i&&ls.appendHtml(c,'<div class="snippet-item" data-id="'+t.id+'" data-cat="'+t.category+'"><img alt="'+e.out("Snippet")+'" alt="" src="'+p+t.thumbnail+'"><span class="is-overlay"></span></div>')})),i&&(Array.prototype.forEach.call(n,(t=>{ls.addClass(t,"hide")})),Array.prototype.forEach.call(n,(t=>{t.getAttribute("data-cat")===i&&(t.className=t.className.replace(/hide/g,""))})))})),u.toggle(),"#divSnippetList"===t.opts.snippetList&&(d.querySelector(".selectsnippet").style.display="none",d.querySelector(".is-design-list").style.display="none",document.addEventListener("click",(e=>{var i=(e=e||window.event).target||e.srcElement;if("auto"===t.opts.snippetsSidebarDisplay&&ls.hasClass(d,"active")){ls.parentsHasClass(i,"is-builder")&&function(t){let e=document.querySelector("#divSnippetList");const i=e.querySelector("#divSnippetHandle");ls.removeClass(e,"active"),"right"===t.opts.sidePanel?i.innerHTML='<svg class="is-icon-flex" style="width:17px;height:17px;"><use xlink:href="#ion-ios-arrow-left"></use></svg>':i.innerHTML='<svg class="is-icon-flex" style="width:17px;height:17px;"><use xlink:href="#ion-ios-arrow-right"></use></svg>';setTimeout((()=>{e.querySelector(".selectsnippet").style.display="none",e.querySelector(".is-design-list").style.display="none"}),300)}
8
+ function en(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function nn(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?en(Object(i),!0).forEach((function(e){sn(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):en(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function on(t){return(on="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function sn(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function rn(){return(rn=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}function ln(t,e){if(null==t)return{};var i,n,o=function(t,e){if(null==t)return{};var i,n,o={},s=Object.keys(t);for(n=0;n<s.length;n++)i=s[n],e.indexOf(i)>=0||(o[i]=t[i]);return o}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)i=s[n],e.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(o[i]=t[i])}return o}function an(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var dn=an(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),un=an(/Edge/i),cn=an(/firefox/i),pn=an(/safari/i)&&!an(/chrome/i)&&!an(/android/i),hn=an(/iP(ad|od|hone)/i),fn=an(/chrome/i)&&an(/android/i),gn={capture:!1,passive:!1};function mn(t,e,i){t.addEventListener(e,i,!dn&&gn)}function bn(t,e,i){t.removeEventListener(e,i,!dn&&gn)}function vn(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function yn(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function xn(t,e,i,n){if(t){i=i||document;do{if(null!=e&&(">"===e[0]?t.parentNode===i&&vn(t,e):vn(t,e))||n&&t===i)return t;if(t===i)break}while(t=yn(t))}return null}var _n,Sn=/\s+/g;function wn(t,e,i){if(t&&e)if(t.classList)t.classList[i?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(Sn," ").replace(" "+e+" "," ");t.className=(n+(i?" "+e:"")).replace(Sn," ")}}function Cn(t,e,i){var n=t&&t.style;if(n){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];e in n||-1!==e.indexOf("webkit")||(e="-webkit-"+e),n[e]=i+("string"==typeof i?"":"px")}}function kn(t,e){var i="";if("string"==typeof t)i=t;else do{var n=Cn(t,"transform");n&&"none"!==n&&(i=n+" "+i)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(i)}function En(t,e,i){if(t){var n=t.getElementsByTagName(e),o=0,s=n.length;if(i)for(;o<s;o++)i(n[o],o);return n}return[]}function An(){var t=document.scrollingElement;return t||document.documentElement}function qn(t,e,i,n,o){if(t.getBoundingClientRect||t===window){var s,r,l,a,d,u,c;if(t!==window&&t.parentNode&&t!==An()?(r=(s=t.getBoundingClientRect()).top,l=s.left,a=s.bottom,d=s.right,u=s.height,c=s.width):(r=0,l=0,a=window.innerHeight,d=window.innerWidth,u=window.innerHeight,c=window.innerWidth),(e||i)&&t!==window&&(o=o||t.parentNode,!dn))do{if(o&&o.getBoundingClientRect&&("none"!==Cn(o,"transform")||i&&"static"!==Cn(o,"position"))){var p=o.getBoundingClientRect();r-=p.top+parseInt(Cn(o,"border-top-width")),l-=p.left+parseInt(Cn(o,"border-left-width")),a=r+s.height,d=l+s.width;break}}while(o=o.parentNode);if(n&&t!==window){var h=kn(o||t),f=h&&h.a,g=h&&h.d;h&&(a=(r/=g)+(u/=g),d=(l/=f)+(c/=f))}return{top:r,left:l,bottom:a,right:d,width:c,height:u}}}function Ln(t,e,i){for(var n=Nn(t,!0),o=qn(t)[e];n;){var s=qn(n)[i];if(!("top"===i||"left"===i?o>=s:o<=s))return n;if(n===An())break;n=Nn(n,!1)}return!1}function Tn(t,e,i,n){for(var o=0,s=0,r=t.children;s<r.length;){if("none"!==r[s].style.display&&r[s]!==Do.ghost&&(n||r[s]!==Do.dragged)&&xn(r[s],i.draggable,t,!1)){if(o===e)return r[s];o++}s++}return null}function Mn(t,e){for(var i=t.lastElementChild;i&&(i===Do.ghost||"none"===Cn(i,"display")||e&&!vn(i,e));)i=i.previousElementSibling;return i||null}function On(t,e){var i=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Do.clone||e&&!vn(t,e)||i++;return i}function Rn(t){var e=0,i=0,n=An();if(t)do{var o=kn(t),s=o.a,r=o.d;e+=t.scrollLeft*s,i+=t.scrollTop*r}while(t!==n&&(t=t.parentNode));return[e,i]}function Nn(t,e){if(!t||!t.getBoundingClientRect)return An();var i=t,n=!1;do{if(i.clientWidth<i.scrollWidth||i.clientHeight<i.scrollHeight){var o=Cn(i);if(i.clientWidth<i.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||i.clientHeight<i.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!i.getBoundingClientRect||i===document.body)return An();if(n||e)return i;n=!0}}}while(i=i.parentNode);return An()}function Bn(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function In(t,e){return function(){if(!_n){var i=arguments,n=this;1===i.length?t.call(n,i[0]):t.apply(n,i),_n=setTimeout((function(){_n=void 0}),e)}}}function $n(t,e,i){t.scrollLeft+=e,t.scrollTop+=i}function Dn(t){var e=window.Polymer,i=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):i?i(t).clone(!0)[0]:t.cloneNode(!0)}var Pn="Sortable"+(new Date).getTime();function Hn(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==Cn(t,"display")&&t!==Do.ghost){e.push({target:t,rect:qn(t)});var i=nn({},e[e.length-1].rect);if(t.thisAnimationDuration){var n=kn(t,!0);n&&(i.top-=n.f,i.left-=n.e)}t.fromRect=i}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var i in t)if(t.hasOwnProperty(i))for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t[i][n])return Number(i);return-1}(e,{target:t}),1)},animateAll:function(i){var n=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof i&&i());var o=!1,s=0;e.forEach((function(t){var e=0,i=t.target,r=i.fromRect,l=qn(i),a=i.prevFromRect,d=i.prevToRect,u=t.rect,c=kn(i,!0);c&&(l.top-=c.f,l.left-=c.e),i.toRect=l,i.thisAnimationDuration&&Bn(a,l)&&!Bn(r,l)&&(u.top-l.top)/(u.left-l.left)==(r.top-l.top)/(r.left-l.left)&&(e=function(t,e,i,n){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-i.top,2)+Math.pow(e.left-i.left,2))*n.animation}(u,a,d,n.options)),Bn(l,r)||(i.prevFromRect=r,i.prevToRect=l,e||(e=n.options.animation),n.animate(i,u,l,e)),e&&(o=!0,s=Math.max(s,e),clearTimeout(i.animationResetTimer),i.animationResetTimer=setTimeout((function(){i.animationTime=0,i.prevFromRect=null,i.fromRect=null,i.prevToRect=null,i.thisAnimationDuration=null}),e),i.thisAnimationDuration=e)})),clearTimeout(t),o?t=setTimeout((function(){"function"==typeof i&&i()}),s):"function"==typeof i&&i(),e=[]},animate:function(t,e,i,n){if(n){Cn(t,"transition",""),Cn(t,"transform","");var o=kn(this.el),s=o&&o.a,r=o&&o.d,l=(e.left-i.left)/(s||1),a=(e.top-i.top)/(r||1);t.animatingX=!!l,t.animatingY=!!a,Cn(t,"transform","translate3d("+l+"px,"+a+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),Cn(t,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),Cn(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){Cn(t,"transition",""),Cn(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),n)}}}}var zn=[],Fn={initializeByDefault:!0},Un={mount:function(t){for(var e in Fn)Fn.hasOwnProperty(e)&&!(e in t)&&(t[e]=Fn[e]);zn.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),zn.push(t)},pluginEvent:function(t,e,i){var n=this;this.eventCanceled=!1,i.cancel=function(){n.eventCanceled=!0};var o=t+"Global";zn.forEach((function(n){e[n.pluginName]&&(e[n.pluginName][o]&&e[n.pluginName][o](nn({sortable:e},i)),e.options[n.pluginName]&&e[n.pluginName][t]&&e[n.pluginName][t](nn({sortable:e},i)))}))},initializePlugins:function(t,e,i,n){for(var o in zn.forEach((function(n){var o=n.pluginName;if(t.options[o]||n.initializeByDefault){var s=new n(t,e,t.options);s.sortable=t,s.options=t.options,t[o]=s,rn(i,s.defaults)}})),t.options)if(t.options.hasOwnProperty(o)){var s=this.modifyOption(t,o,t.options[o]);void 0!==s&&(t.options[o]=s)}},getEventProperties:function(t,e){var i={};return zn.forEach((function(n){"function"==typeof n.eventProperties&&rn(i,n.eventProperties.call(e[n.pluginName],t))})),i},modifyOption:function(t,e,i){var n;return zn.forEach((function(o){t[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[e]&&(n=o.optionListeners[e].call(t[o.pluginName],i))})),n}};var Wn=["evt"],jn=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.evt,o=ln(i,Wn);Un.pluginEvent.bind(Do)(t,e,nn({dragEl:Vn,parentEl:Yn,ghostEl:Xn,rootEl:Kn,nextEl:Zn,lastDownEl:Qn,cloneEl:Jn,cloneHidden:to,dragStarted:fo,putSortable:ro,activeSortable:Do.active,originalEvent:n,oldIndex:eo,oldDraggableIndex:no,newIndex:io,newDraggableIndex:oo,hideGhostForTarget:No,unhideGhostForTarget:Bo,cloneNowHidden:function(){to=!0},cloneNowShown:function(){to=!1},dispatchSortableEvent:function(t){Gn({sortable:e,name:t,originalEvent:n})}},o))};function Gn(t){!function(t){var e=t.sortable,i=t.rootEl,n=t.name,o=t.targetEl,s=t.cloneEl,r=t.toEl,l=t.fromEl,a=t.oldIndex,d=t.newIndex,u=t.oldDraggableIndex,c=t.newDraggableIndex,p=t.originalEvent,h=t.putSortable,f=t.extraEventProperties;if(e=e||i&&i[Pn]){var g,m=e.options,b="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||dn||un?(g=document.createEvent("Event")).initEvent(n,!0,!0):g=new CustomEvent(n,{bubbles:!0,cancelable:!0}),g.to=r||i,g.from=l||i,g.item=o||i,g.clone=s,g.oldIndex=a,g.newIndex=d,g.oldDraggableIndex=u,g.newDraggableIndex=c,g.originalEvent=p,g.pullMode=h?h.lastPutMode:void 0;var v=nn(nn({},f),Un.getEventProperties(n,e));for(var y in v)g[y]=v[y];i&&i.dispatchEvent(g),m[b]&&m[b].call(e,g)}}(nn({putSortable:ro,cloneEl:Jn,targetEl:Vn,rootEl:Kn,oldIndex:eo,oldDraggableIndex:no,newIndex:io,newDraggableIndex:oo},t))}var Vn,Yn,Xn,Kn,Zn,Qn,Jn,to,eo,io,no,oo,so,ro,lo,ao,uo,co,po,ho,fo,go,mo,bo,vo,yo=!1,xo=!1,_o=[],So=!1,wo=!1,Co=[],ko=!1,Eo=[],Ao="undefined"!=typeof document,qo=hn,Lo=un||dn?"cssFloat":"float",To=Ao&&!fn&&!hn&&"draggable"in document.createElement("div"),Mo=function(){if(Ao){if(dn)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Oo=function(t,e){var i=Cn(t),n=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),o=Tn(t,0,e),s=Tn(t,1,e),r=o&&Cn(o),l=s&&Cn(s),a=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+qn(o).width,d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+qn(s).width;if("flex"===i.display)return"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal";if("grid"===i.display)return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&r.float&&"none"!==r.float){var u="left"===r.float?"left":"right";return!s||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return o&&("block"===r.display||"flex"===r.display||"table"===r.display||"grid"===r.display||a>=n&&"none"===i[Lo]||s&&"none"===i[Lo]&&a+d>n)?"vertical":"horizontal"},Ro=function(t){function e(t,i){return function(n,o,s,r){var l=n.options.group.name&&o.options.group.name&&n.options.group.name===o.options.group.name;if(null==t&&(i||l))return!0;if(null==t||!1===t)return!1;if(i&&"clone"===t)return t;if("function"==typeof t)return e(t(n,o,s,r),i)(n,o,s,r);var a=(i?n:o).options.group.name;return!0===t||"string"==typeof t&&t===a||t.join&&t.indexOf(a)>-1}}var i={},n=t.group;n&&"object"==on(n)||(n={name:n}),i.name=n.name,i.checkPull=e(n.pull,!0),i.checkPut=e(n.put),i.revertClone=n.revertClone,t.group=i},No=function(){!Mo&&Xn&&Cn(Xn,"display","none")},Bo=function(){!Mo&&Xn&&Cn(Xn,"display","")};Ao&&document.addEventListener("click",(function(t){if(xo)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),xo=!1,!1}),!0);var Io=function(t){if(Vn){t=t.touches?t.touches[0]:t;var e=(o=t.clientX,s=t.clientY,_o.some((function(t){var e=t[Pn].options.emptyInsertThreshold;if(e&&!Mn(t)){var i=qn(t),n=o>=i.left-e&&o<=i.right+e,l=s>=i.top-e&&s<=i.bottom+e;return n&&l?r=t:void 0}})),r);if(e){var i={};for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[Pn]._onDragOver(i)}}var o,s,r},$o=function(t){Vn&&Vn.parentNode[Pn]._isOutsideThisEl(t.target)};function Do(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=rn({},e),t[Pn]=this;var i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Oo(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Do.supportPointer&&"PointerEvent"in window&&!pn,emptyInsertThreshold:5};for(var n in Un.initializePlugins(this,t,i),i)!(n in e)&&(e[n]=i[n]);for(var o in Ro(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&To,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?mn(t,"pointerdown",this._onTapStart):(mn(t,"mousedown",this._onTapStart),mn(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(mn(t,"dragover",this),mn(t,"dragenter",this)),_o.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),rn(this,Hn())}function Po(t,e,i,n,o,s,r,l){var a,d,u=t[Pn],c=u.options.onMove;return!window.CustomEvent||dn||un?(a=document.createEvent("Event")).initEvent("move",!0,!0):a=new CustomEvent("move",{bubbles:!0,cancelable:!0}),a.to=e,a.from=t,a.dragged=i,a.draggedRect=n,a.related=o||e,a.relatedRect=s||qn(e),a.willInsertAfter=l,a.originalEvent=r,t.dispatchEvent(a),c&&(d=c.call(u,a,r)),d}function Ho(t){t.draggable=!1}function zo(){ko=!1}function Fo(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,i=e.length,n=0;i--;)n+=e.charCodeAt(i);return n.toString(36)}function Uo(t){return setTimeout(t,0)}function Wo(t){return clearTimeout(t)}Do.prototype={constructor:Do,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(go=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,Vn):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,n=this.options,o=n.preventOnFilter,s=t.type,r=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(r||t).target,a=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,d=n.filter;if(function(t){Eo.length=0;var e=t.getElementsByTagName("input"),i=e.length;for(;i--;){var n=e[i];n.checked&&Eo.push(n)}}(i),!Vn&&!(/mousedown|pointerdown/.test(s)&&0!==t.button||n.disabled)&&!a.isContentEditable&&(this.nativeDraggable||!pn||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=xn(l,n.draggable,i,!1))&&l.animated||Qn===l)){if(eo=On(l),no=On(l,n.draggable),"function"==typeof d){if(d.call(this,t,l,this))return Gn({sortable:e,rootEl:a,name:"filter",targetEl:l,toEl:i,fromEl:i}),jn("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(d&&(d=d.split(",").some((function(n){if(n=xn(a,n.trim(),i,!1))return Gn({sortable:e,rootEl:n,name:"filter",targetEl:l,fromEl:i,toEl:i}),jn("filter",e,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());n.handle&&!xn(a,n.handle,i,!1)||this._prepareDragStart(t,r,l)}}},_prepareDragStart:function(t,e,i){var n,o=this,s=o.el,r=o.options,l=s.ownerDocument;if(i&&!Vn&&i.parentNode===s){var a=qn(i);if(Kn=s,Yn=(Vn=i).parentNode,Zn=Vn.nextSibling,Qn=i,so=r.group,Do.dragged=Vn,lo={target:Vn,clientX:(e||t).clientX,clientY:(e||t).clientY},po=lo.clientX-a.left,ho=lo.clientY-a.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Vn.style["will-change"]="all",n=function(){jn("delayEnded",o,{evt:t}),Do.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!cn&&o.nativeDraggable&&(Vn.draggable=!0),o._triggerDragStart(t,e),Gn({sortable:o,name:"choose",originalEvent:t}),wn(Vn,r.chosenClass,!0))},r.ignore.split(",").forEach((function(t){En(Vn,t.trim(),Ho)})),mn(l,"dragover",Io),mn(l,"mousemove",Io),mn(l,"touchmove",Io),mn(l,"mouseup",o._onDrop),mn(l,"touchend",o._onDrop),mn(l,"touchcancel",o._onDrop),cn&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Vn.draggable=!0),jn("delayStart",this,{evt:t}),!r.delay||r.delayOnTouchOnly&&!e||this.nativeDraggable&&(un||dn))n();else{if(Do.eventCanceled)return void this._onDrop();mn(l,"mouseup",o._disableDelayedDrag),mn(l,"touchend",o._disableDelayedDrag),mn(l,"touchcancel",o._disableDelayedDrag),mn(l,"mousemove",o._delayedDragTouchMoveHandler),mn(l,"touchmove",o._delayedDragTouchMoveHandler),r.supportPointer&&mn(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(n,r.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Vn&&Ho(Vn),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;bn(t,"mouseup",this._disableDelayedDrag),bn(t,"touchend",this._disableDelayedDrag),bn(t,"touchcancel",this._disableDelayedDrag),bn(t,"mousemove",this._delayedDragTouchMoveHandler),bn(t,"touchmove",this._delayedDragTouchMoveHandler),bn(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?mn(document,"pointermove",this._onTouchMove):mn(document,e?"touchmove":"mousemove",this._onTouchMove):(mn(Vn,"dragend",this),mn(Kn,"dragstart",this._onDragStart));try{document.selection?Uo((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(yo=!1,Kn&&Vn){jn("dragStarted",this,{evt:e}),this.nativeDraggable&&mn(document,"dragover",$o);var i=this.options;!t&&wn(Vn,i.dragClass,!1),wn(Vn,i.ghostClass,!0),Do.active=this,t&&this._appendGhost(),Gn({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ao){this._lastX=ao.clientX,this._lastY=ao.clientY,No();for(var t=document.elementFromPoint(ao.clientX,ao.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ao.clientX,ao.clientY))!==e;)e=t;if(Vn.parentNode[Pn]._isOutsideThisEl(t),e)do{if(e[Pn]){if(e[Pn]._onDragOver({clientX:ao.clientX,clientY:ao.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Bo()}},_onTouchMove:function(t){if(lo){var e=this.options,i=e.fallbackTolerance,n=e.fallbackOffset,o=t.touches?t.touches[0]:t,s=Xn&&kn(Xn,!0),r=Xn&&s&&s.a,l=Xn&&s&&s.d,a=qo&&vo&&Rn(vo),d=(o.clientX-lo.clientX+n.x)/(r||1)+(a?a[0]-Co[0]:0)/(r||1),u=(o.clientY-lo.clientY+n.y)/(l||1)+(a?a[1]-Co[1]:0)/(l||1);if(!Do.active&&!yo){if(i&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(Xn){s?(s.e+=d-(uo||0),s.f+=u-(co||0)):s={a:1,b:0,c:0,d:1,e:d,f:u};var c="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");Cn(Xn,"webkitTransform",c),Cn(Xn,"mozTransform",c),Cn(Xn,"msTransform",c),Cn(Xn,"transform",c),uo=d,co=u,ao=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Xn){var t=this.options.fallbackOnBody?document.body:Kn,e=qn(Vn,!0,qo,!0,t),i=this.options;if(qo){for(vo=t;"static"===Cn(vo,"position")&&"none"===Cn(vo,"transform")&&vo!==document;)vo=vo.parentNode;vo!==document.body&&vo!==document.documentElement?(vo===document&&(vo=An()),e.top+=vo.scrollTop,e.left+=vo.scrollLeft):vo=An(),Co=Rn(vo)}wn(Xn=Vn.cloneNode(!0),i.ghostClass,!1),wn(Xn,i.fallbackClass,!0),wn(Xn,i.dragClass,!0),Cn(Xn,"transition",""),Cn(Xn,"transform",""),Cn(Xn,"box-sizing","border-box"),Cn(Xn,"margin",0),Cn(Xn,"top",e.top),Cn(Xn,"left",e.left),Cn(Xn,"width",e.width),Cn(Xn,"height",e.height),Cn(Xn,"opacity","0.8"),Cn(Xn,"position",qo?"absolute":"fixed"),Cn(Xn,"zIndex","100000"),Cn(Xn,"pointerEvents","none"),Do.ghost=Xn,t.appendChild(Xn),Cn(Xn,"transform-origin",po/parseInt(Xn.style.width)*100+"% "+ho/parseInt(Xn.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,n=t.dataTransfer,o=i.options;jn("dragStart",this,{evt:t}),Do.eventCanceled?this._onDrop():(jn("setupClone",this),Do.eventCanceled||((Jn=Dn(Vn)).draggable=!1,Jn.style["will-change"]="",this._hideClone(),wn(Jn,this.options.chosenClass,!1),Do.clone=Jn),i.cloneId=Uo((function(){jn("clone",i),Do.eventCanceled||(i.options.removeCloneOnHide||Kn.insertBefore(Jn,Vn),i._hideClone(),Gn({sortable:i,name:"clone"}))})),!e&&wn(Vn,o.dragClass,!0),e?(xo=!0,i._loopId=setInterval(i._emulateDragOver,50)):(bn(document,"mouseup",i._onDrop),bn(document,"touchend",i._onDrop),bn(document,"touchcancel",i._onDrop),n&&(n.effectAllowed="move",o.setData&&o.setData.call(i,n,Vn)),mn(document,"drop",i),Cn(Vn,"transform","translateZ(0)")),yo=!0,i._dragStartId=Uo(i._dragStarted.bind(i,e,t)),mn(document,"selectstart",i),fo=!0,pn&&Cn(document.body,"user-select","none"))},_onDragOver:function(t){var e,i,n,o,s=this.el,r=t.target,l=this.options,a=l.group,d=Do.active,u=so===a,c=l.sort,p=ro||d,h=this,f=!1;if(!ko){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),r=xn(r,l.draggable,s,!0),L("dragOver"),Do.eventCanceled)return f;if(Vn.contains(t.target)||r.animated&&r.animatingX&&r.animatingY||h._ignoreWhileAnimating===r)return M(!1);if(xo=!1,d&&!l.disabled&&(u?c||(n=Yn!==Kn):ro===this||(this.lastPutMode=so.checkPull(this,d,Vn,t))&&a.checkPut(this,d,Vn,t))){if(o="vertical"===this._getDirection(t,r),e=qn(Vn),L("dragOverValid"),Do.eventCanceled)return f;if(n)return Yn=Kn,T(),this._hideClone(),L("revert"),Do.eventCanceled||(Zn?Kn.insertBefore(Vn,Zn):Kn.appendChild(Vn)),M(!0);var g=Mn(s,l.draggable);if(!g||function(t,e,i){var n=qn(Mn(i.el,i.options.draggable)),o=10;return e?t.clientX>n.right+o||t.clientX<=n.right&&t.clientY>n.bottom&&t.clientX>=n.left:t.clientX>n.right&&t.clientY>n.top||t.clientX<=n.right&&t.clientY>n.bottom+o}(t,o,this)&&!g.animated){if(g===Vn)return M(!1);if(g&&s===t.target&&(r=g),r&&(i=qn(r)),!1!==Po(Kn,s,Vn,e,r,i,t,!!r))return T(),s.appendChild(Vn),Yn=s,O(),M(!0)}else if(g&&function(t,e,i){var n=qn(Tn(i.el,0,i.options,!0)),o=10;return e?t.clientX<n.left-o||t.clientY<n.top&&t.clientX<n.right:t.clientY<n.top-o||t.clientY<n.bottom&&t.clientX<n.left}(t,o,this)){var m=Tn(s,0,l,!0);if(m===Vn)return M(!1);if(i=qn(r=m),!1!==Po(Kn,s,Vn,e,r,i,t,!1))return T(),s.insertBefore(Vn,m),Yn=s,O(),M(!0)}else if(r.parentNode===s){i=qn(r);var b,v,y,x=Vn.parentNode!==s,_=!function(t,e,i){var n=i?t.left:t.top,o=i?t.right:t.bottom,s=i?t.width:t.height,r=i?e.left:e.top,l=i?e.right:e.bottom,a=i?e.width:e.height;return n===r||o===l||n+s/2===r+a/2}(Vn.animated&&Vn.toRect||e,r.animated&&r.toRect||i,o),S=o?"top":"left",w=Ln(r,"top","top")||Ln(Vn,"top","top"),C=w?w.scrollTop:void 0;if(go!==r&&(v=i[S],So=!1,wo=!_&&l.invertSwap||x),0!==(b=function(t,e,i,n,o,s,r,l){var a=n?t.clientY:t.clientX,d=n?i.height:i.width,u=n?i.top:i.left,c=n?i.bottom:i.right,p=!1;if(!r)if(l&&bo<d*o){if(!So&&(1===mo?a>u+d*s/2:a<c-d*s/2)&&(So=!0),So)p=!0;else if(1===mo?a<u+bo:a>c-bo)return-mo}else if(a>u+d*(1-o)/2&&a<c-d*(1-o)/2)return function(t){return On(Vn)<On(t)?1:-1}(e);if((p=p||r)&&(a<u+d*s/2||a>c-d*s/2))return a>u+d/2?1:-1;return 0}(t,r,i,o,_?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,wo,go===r))){var k=On(Vn);do{k-=b,y=Yn.children[k]}while(y&&("none"===Cn(y,"display")||y===Xn))}if(0===b||y===r)return M(!1);go=r,mo=b;var E=r.nextElementSibling,A=!1,q=Po(Kn,s,Vn,e,r,i,t,A=1===b);if(!1!==q)return 1!==q&&-1!==q||(A=1===q),ko=!0,setTimeout(zo,30),T(),A&&!E?s.appendChild(Vn):r.parentNode.insertBefore(Vn,A?E:r),w&&$n(w,0,C-w.scrollTop),Yn=Vn.parentNode,void 0===v||wo||(bo=Math.abs(v-qn(r)[S])),O(),M(!0)}if(s.contains(Vn))return M(!1)}return!1}function L(l,a){jn(l,h,nn({evt:t,isOwner:u,axis:o?"vertical":"horizontal",revert:n,dragRect:e,targetRect:i,canSort:c,fromSortable:p,target:r,completed:M,onMove:function(i,n){return Po(Kn,s,Vn,e,i,qn(i),t,n)},changed:O},a))}function T(){L("dragOverAnimationCapture"),h.captureAnimationState(),h!==p&&p.captureAnimationState()}function M(e){return L("dragOverCompleted",{insertion:e}),e&&(u?d._hideClone():d._showClone(h),h!==p&&(wn(Vn,ro?ro.options.ghostClass:d.options.ghostClass,!1),wn(Vn,l.ghostClass,!0)),ro!==h&&h!==Do.active?ro=h:h===Do.active&&ro&&(ro=null),p===h&&(h._ignoreWhileAnimating=r),h.animateAll((function(){L("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(r===Vn&&!Vn.animated||r===s&&!r.animated)&&(go=null),l.dragoverBubble||t.rootEl||r===document||(Vn.parentNode[Pn]._isOutsideThisEl(t.target),!e&&Io(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),f=!0}function O(){io=On(Vn),oo=On(Vn,l.draggable),Gn({sortable:h,name:"change",toEl:s,newIndex:io,newDraggableIndex:oo,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){bn(document,"mousemove",this._onTouchMove),bn(document,"touchmove",this._onTouchMove),bn(document,"pointermove",this._onTouchMove),bn(document,"dragover",Io),bn(document,"mousemove",Io),bn(document,"touchmove",Io)},_offUpEvents:function(){var t=this.el.ownerDocument;bn(t,"mouseup",this._onDrop),bn(t,"touchend",this._onDrop),bn(t,"pointerup",this._onDrop),bn(t,"touchcancel",this._onDrop),bn(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;io=On(Vn),oo=On(Vn,i.draggable),jn("drop",this,{evt:t}),Yn=Vn&&Vn.parentNode,io=On(Vn),oo=On(Vn,i.draggable),Do.eventCanceled||(yo=!1,wo=!1,So=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Wo(this.cloneId),Wo(this._dragStartId),this.nativeDraggable&&(bn(document,"drop",this),bn(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),pn&&Cn(document.body,"user-select",""),Cn(Vn,"transform",""),t&&(fo&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),Xn&&Xn.parentNode&&Xn.parentNode.removeChild(Xn),(Kn===Yn||ro&&"clone"!==ro.lastPutMode)&&Jn&&Jn.parentNode&&Jn.parentNode.removeChild(Jn),Vn&&(this.nativeDraggable&&bn(Vn,"dragend",this),Ho(Vn),Vn.style["will-change"]="",fo&&!yo&&wn(Vn,ro?ro.options.ghostClass:this.options.ghostClass,!1),wn(Vn,this.options.chosenClass,!1),Gn({sortable:this,name:"unchoose",toEl:Yn,newIndex:null,newDraggableIndex:null,originalEvent:t}),Kn!==Yn?(io>=0&&(Gn({rootEl:Yn,name:"add",toEl:Yn,fromEl:Kn,originalEvent:t}),Gn({sortable:this,name:"remove",toEl:Yn,originalEvent:t}),Gn({rootEl:Yn,name:"sort",toEl:Yn,fromEl:Kn,originalEvent:t}),Gn({sortable:this,name:"sort",toEl:Yn,originalEvent:t})),ro&&ro.save()):io!==eo&&io>=0&&(Gn({sortable:this,name:"update",toEl:Yn,originalEvent:t}),Gn({sortable:this,name:"sort",toEl:Yn,originalEvent:t})),Do.active&&(null!=io&&-1!==io||(io=eo,oo=no),Gn({sortable:this,name:"end",toEl:Yn,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){jn("nulling",this),Kn=Vn=Yn=Xn=Zn=Jn=Qn=to=lo=ao=fo=io=oo=eo=no=go=mo=ro=so=Do.dragged=Do.ghost=Do.clone=Do.active=null,Eo.forEach((function(t){t.checked=!0})),Eo.length=uo=co=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Vn&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],i=this.el.children,n=0,o=i.length,s=this.options;n<o;n++)xn(t=i[n],s.draggable,this.el,!1)&&e.push(t.getAttribute(s.dataIdAttr)||Fo(t));return e},sort:function(t,e){var i={},n=this.el;this.toArray().forEach((function(t,e){var o=n.children[e];xn(o,this.options.draggable,n,!1)&&(i[t]=o)}),this),e&&this.captureAnimationState(),t.forEach((function(t){i[t]&&(n.removeChild(i[t]),n.appendChild(i[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return xn(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(void 0===e)return i[t];var n=Un.modifyOption(this,t,e);i[t]=void 0!==n?n:e,"group"===t&&Ro(i)},destroy:function(){jn("destroy",this);var t=this.el;t[Pn]=null,bn(t,"mousedown",this._onTapStart),bn(t,"touchstart",this._onTapStart),bn(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(bn(t,"dragover",this),bn(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),_o.splice(_o.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!to){if(jn("hideClone",this),Do.eventCanceled)return;Cn(Jn,"display","none"),this.options.removeCloneOnHide&&Jn.parentNode&&Jn.parentNode.removeChild(Jn),to=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(to){if(jn("showClone",this),Do.eventCanceled)return;Vn.parentNode!=Kn||this.options.group.revertClone?Zn?Kn.insertBefore(Jn,Zn):Kn.appendChild(Jn):Kn.insertBefore(Jn,Vn),this.options.group.revertClone&&this.animate(Vn,Jn),Cn(Jn,"display",""),to=!1}}else this._hideClone()}},Ao&&mn(document,"touchmove",(function(t){(Do.active||yo)&&t.cancelable&&t.preventDefault()})),Do.utils={on:mn,off:bn,css:Cn,find:En,is:function(t,e){return!!xn(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},throttle:In,closest:xn,toggleClass:wn,clone:Dn,index:On,nextTick:Uo,cancelNextTick:Wo,detectDirection:Oo,getChild:Tn},Do.get=function(t){return t[Pn]},Do.mount=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Do.utils=nn(nn({},Do.utils),t.utils)),Un.mount(t)}))},Do.create=function(t,e){return new Do(t,e)},Do.version="1.14.0";var jo,Go,Vo,Yo,Xo,Ko,Zo=[],Qo=!1;function Jo(){Zo.forEach((function(t){clearInterval(t.pid)})),Zo=[]}function ts(){clearInterval(Ko)}var es=In((function(t,e,i,n){if(e.scroll){var o,s=(t.touches?t.touches[0]:t).clientX,r=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,a=e.scrollSpeed,d=An(),u=!1;Go!==i&&(Go=i,Jo(),jo=e.scroll,o=e.scrollFn,!0===jo&&(jo=Nn(i,!0)));var c=0,p=jo;do{var h=p,f=qn(h),g=f.top,m=f.bottom,b=f.left,v=f.right,y=f.width,x=f.height,_=void 0,S=void 0,w=h.scrollWidth,C=h.scrollHeight,k=Cn(h),E=h.scrollLeft,A=h.scrollTop;h===d?(_=y<w&&("auto"===k.overflowX||"scroll"===k.overflowX||"visible"===k.overflowX),S=x<C&&("auto"===k.overflowY||"scroll"===k.overflowY||"visible"===k.overflowY)):(_=y<w&&("auto"===k.overflowX||"scroll"===k.overflowX),S=x<C&&("auto"===k.overflowY||"scroll"===k.overflowY));var q=_&&(Math.abs(v-s)<=l&&E+y<w)-(Math.abs(b-s)<=l&&!!E),L=S&&(Math.abs(m-r)<=l&&A+x<C)-(Math.abs(g-r)<=l&&!!A);if(!Zo[c])for(var T=0;T<=c;T++)Zo[T]||(Zo[T]={});Zo[c].vx==q&&Zo[c].vy==L&&Zo[c].el===h||(Zo[c].el=h,Zo[c].vx=q,Zo[c].vy=L,clearInterval(Zo[c].pid),0==q&&0==L||(u=!0,Zo[c].pid=setInterval(function(){n&&0===this.layer&&Do.active._onTouchMove(Xo);var e=Zo[this.layer].vy?Zo[this.layer].vy*a:0,i=Zo[this.layer].vx?Zo[this.layer].vx*a:0;"function"==typeof o&&"continue"!==o.call(Do.dragged.parentNode[Pn],i,e,t,Xo,Zo[this.layer].el)||$n(Zo[this.layer].el,i,e)}.bind({layer:c}),24))),c++}while(e.bubbleScroll&&p!==d&&(p=Nn(p,!1)));Qo=u}}),30),is=function(t){var e=t.originalEvent,i=t.putSortable,n=t.dragEl,o=t.activeSortable,s=t.dispatchSortableEvent,r=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var a=i||o;r();var d=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(d.clientX,d.clientY);l(),a&&!a.el.contains(u)&&(s("spill"),this.onSpill({dragEl:n,putSortable:i}))}};function ns(){}function os(){}ns.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var n=Tn(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(e,n):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:is},rn(ns,{pluginName:"revertOnSpill"}),os.prototype={onSpill:function(t){var e=t.dragEl,i=t.putSortable||this.sortable;i.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),i.animateAll()},drop:is},rn(os,{pluginName:"removeOnSpill"}),Do.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?mn(document,"dragover",this._handleAutoScroll):this.options.supportPointer?mn(document,"pointermove",this._handleFallbackAutoScroll):e.touches?mn(document,"touchmove",this._handleFallbackAutoScroll):mn(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?bn(document,"dragover",this._handleAutoScroll):(bn(document,"pointermove",this._handleFallbackAutoScroll),bn(document,"touchmove",this._handleFallbackAutoScroll),bn(document,"mousemove",this._handleFallbackAutoScroll)),ts(),Jo(),clearTimeout(_n),_n=void 0},nulling:function(){Xo=Go=jo=Qo=Ko=Vo=Yo=null,Zo.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var i=this,n=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,s=document.elementFromPoint(n,o);if(Xo=t,e||this.options.forceAutoScrollFallback||un||dn||pn){es(t,this.options,s,e);var r=Nn(s,!0);!Qo||Ko&&n===Vo&&o===Yo||(Ko&&ts(),Ko=setInterval((function(){var s=Nn(document.elementFromPoint(n,o),!0);s!==r&&(r=s,Jo()),es(t,i.options,s,e)}),10),Vo=n,Yo=o)}else{if(!this.options.bubbleScroll||Nn(s,!0)===An())return void Jo();es(t,this.options,Nn(s,!1),!1)}}},rn(t,{pluginName:"scroll",initializeByDefault:!0})}),Do.mount(os,ns);const ss=new o;class rs{constructor(t){const[e,i]=t.children,n=e=>{if(!t)return document.removeEventListener("click",n);t.contains(e.target)||this.toggle(!1)},o=n=>{const o=n.textContent,s=n.getAttribute("data-value");e.textContent=o,this.value=s,this.toggle(!1),t.dispatchEvent(new Event("change")),e.focus(),ss.elementChildren(i).forEach((t=>{ss.removeClass(t,"selected")}));let r=i.querySelector('[data-value="'+s+'"]');r&&ss.addClass(r,"selected")},s=t=>{t.preventDefault(),38===t.keyCode&&t.target.previousElementSibling?t.target.previousElementSibling.focus():40===t.keyCode&&t.target.nextElementSibling?t.target.nextElementSibling.focus():27===t.keyCode?(this.toggle(!1),e.focus()):13!==t.keyCode&&32!==t.keyCode||o(t.target)};e.addEventListener("keydown",(t=>{27===t.keyCode?(this.toggle(!1),t.preventDefault()):13!==t.keyCode&&32!==t.keyCode||(this.toggle(!0),t.preventDefault())})),e.addEventListener("click",(()=>this.toggle())),[...i.children].forEach((t=>{t.addEventListener("keydown",s),t.addEventListener("click",(()=>o(t)))})),this.element=t,this.value=e.getAttribute("data-value"),this.toggle=(o=null)=>{if(o=null===o?"true"!==i.getAttribute("aria-expanded"):o,i.setAttribute("aria-expanded",o),o){e.classList.add("active");let o=i.querySelector('[data-value="'+this.value+'"]');o&&(ss.addClass(o,"selected"),o.focus()),document.addEventListener("click",n),t.dispatchEvent(new Event("opened"))}else e.classList.remove("active"),t.dispatchEvent(new Event("closed")),document.removeEventListener("click",n)}}}const ls=new o,as=t=>{const e=t.util,i=t.builderStuff;let n="",o=t.opts.sidePanel;if("#divSnippetList"===t.opts.snippetList){const s=`<div id="divSnippetList" class="is-side ${"right"===o?"":" fromleft"} snippetlist scroll-darker" tabindex="-1" role="dialog" aria-modal="true" title="${e.out("Snippets")}">\n </div>`;ls.appendHtml(i,s),t.opts.snippetHandle||(n="display:none;")}else n="display:none;",o="left";let s="",r="",l="";if(t.opts.emailMode){r=t.opts.defaultEmailSnippetCategory;for(let e=0;e<t.opts.emailSnippetCategories.length;e++)l+='<li role="option" tabindex="0" data-value="'+t.opts.emailSnippetCategories[e][0]+'">'+t.opts.emailSnippetCategories[e][1]+"</li>",t.opts.emailSnippetCategories[e][0]===t.opts.defaultEmailSnippetCategory&&(s=t.opts.emailSnippetCategories[e][1])}else{r=t.opts.defaultSnippetCategory;for(let e=0;e<t.opts.snippetCategories.length;e++)l+='<li role="option" tabindex="0" data-value="'+t.opts.snippetCategories[e][0]+'">'+t.opts.snippetCategories[e][1]+"</li>",t.opts.snippetCategories[e][0]===t.opts.defaultSnippetCategory&&(s=t.opts.snippetCategories[e][1])}let a='<div class="is-dropdown selectsnippet" style="position:absolute;top:0;right:0;padding: 0;width:100%;z-index:2;"><button tabindex="0" class="dropdown-toggle no-outline" title="'+e.out("Snippet Categories")+'" type="button" aria-haspopup="true" data-value="'+r+'"><span>'+s+'</span></button><ul class="dropdown-menu" role="listbox" title="'+e.out("Snippets")+'" aria-expanded="false">'+l+"</ul></div>"+("right"===o?'<div id="divSnippetScrollUp" role="button" tabindex="-1" style="top:calc(50% - 27px);right:25px;">&#9650;</div><div id="divSnippetScrollDown" role="button" tabindex="-1" style="top:calc(50% + 27px);right:25px;">&#9660;</div><div id="divSnippetHandle" role="button" tabindex="-1" title="'+e.out("Snippets")+'" data-title="'+e.out("Snippets")+'" style="'+n+'"><svg class="is-icon-flex"><use xlink:href="#ion-ios-arrow-left"></use></svg></div>':'<div id="divSnippetScrollUp" role="button" tabindex="-1" style="top:calc(50% - 27px);left:10px;">&#9650;</div><div id="divSnippetScrollDown" role="button" tabindex="-1" style="top:calc(50% + 27px);left:10px;">&#9660;</div><div id="divSnippetHandle" role="button" tabindex="-1" title="'+e.out("Snippets")+'" data-title="'+e.out("Snippets")+'" style="'+n+'"><svg class="is-icon-flex"><use xlink:href="#ion-ios-arrow-right"></use></svg></div>')+'<div class="is-design-list" tabindex="0"></div>',d=document.querySelector(t.opts.snippetList);ls.appendHtml(d,a);const u=new rs(d.querySelector(".selectsnippet"));u.element.addEventListener("change",(()=>{let i=u.value,n=c.querySelectorAll(".snippet-item"),o=!1;Array.prototype.forEach.call(n,(t=>{t.getAttribute("data-cat")===i&&(o=!0)})),o||t.opts.snippetJSON.snippets.forEach((t=>{t.category===i&&ls.appendHtml(c,'<div class="snippet-item" data-id="'+t.id+'" data-cat="'+t.category+'"><img alt="'+e.out("Snippet")+'" alt="" src="'+p+t.thumbnail+'"><span class="is-overlay"></span></div>')})),i&&(Array.prototype.forEach.call(n,(t=>{ls.addClass(t,"hide")})),Array.prototype.forEach.call(n,(t=>{t.getAttribute("data-cat")===i&&(t.className=t.className.replace(/hide/g,""))})))})),u.toggle(!1),"#divSnippetList"===t.opts.snippetList&&(d.querySelector(".selectsnippet").style.display="none",d.querySelector(".is-design-list").style.display="none",document.addEventListener("click",(e=>{var i=(e=e||window.event).target||e.srcElement;if("auto"===t.opts.snippetsSidebarDisplay&&ls.hasClass(d,"active")){ls.parentsHasClass(i,"is-builder")&&function(t){let e=document.querySelector("#divSnippetList");const i=e.querySelector("#divSnippetHandle");ls.removeClass(e,"active"),"right"===t.opts.sidePanel?i.innerHTML='<svg class="is-icon-flex" style="width:17px;height:17px;"><use xlink:href="#ion-ios-arrow-left"></use></svg>':i.innerHTML='<svg class="is-icon-flex" style="width:17px;height:17px;"><use xlink:href="#ion-ios-arrow-right"></use></svg>';setTimeout((()=>{e.querySelector(".selectsnippet").style.display="none",e.querySelector(".is-design-list").style.display="none"}),300)}
9
9
  /*!
10
10
  * Cropper.js v1.5.12
11
11
  * https://fengyuanchen.github.io/cropperjs
package/readme.txt CHANGED
@@ -1,4 +1,4 @@
1
- ContentBuilder.js 5.1.5
1
+ ContentBuilder.js 5.1.6
2
2
 
3
3
  To get started, please see the documentation:
4
4