/**! * Sortable 1.15.3 * @author RubaXa * @author owenm * @license MIT */function le(o,t){var e=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(o,i).enumerable})),e.push.apply(e,n)}return e}function z(o){for(var t=1;t=0)&&(e[i]=o[i]);return e}function Re(o,t){if(o==null)return{};var e=Fe(o,t),n,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(o,n)&&(e[n]=o[n])}return e}var Xe="1.15.3";function U(o){if(typeof window!="undefined"&&window.navigator)return!!navigator.userAgent.match(o)}var V=U(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ct=U(/Edge/i),se=U(/firefox/i),yt=U(/safari/i)&&!U(/chrome/i)&&!U(/android/i),me=U(/iP(ad|od|hone)/i),ve=U(/chrome/i)&&U(/android/i),be={capture:!1,passive:!1};function E(o,t,e){o.addEventListener(t,e,!V&&be)}function b(o,t,e){o.removeEventListener(t,e,!V&&be)}function kt(o,t){if(t){if(t[0]===">"&&(t=t.substring(1)),o)try{if(o.matches)return o.matches(t);if(o.msMatchesSelector)return o.msMatchesSelector(t);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function Ee(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function W(o,t,e,n){if(o){e=e||document;do{if(t!=null&&(t[0]===">"?o.parentNode===e&&kt(o,t):kt(o,t))||n&&o===e)return o;if(o===e)break}while(o=Ee(o))}return null}var ue=/\s+/g;function R(o,t,e){if(o&&t)if(o.classList)o.classList[e?"add":"remove"](t);else{var n=(" "+o.className+" ").replace(ue," ").replace(" "+t+" "," ");o.className=(n+(e?" "+t:"")).replace(ue," ")}}function h(o,t,e){var n=o&&o.style;if(n){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(o,""):o.currentStyle&&(e=o.currentStyle),t===void 0?e:e[t];!(t in n)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),n[t]=e+(typeof e=="string"?"":"px")}}function ct(o,t){var e="";if(typeof o=="string")e=o;else do{var n=h(o,"transform");n&&n!=="none"&&(e=n+" "+e)}while(!t&&(o=o.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(e)}function we(o,t,e){if(o){var n=o.getElementsByTagName(t),i=0,r=n.length;if(e)for(;i=r,!a)return n;if(n===L())break;n=tt(n,!1)}return!1}function dt(o,t,e,n){for(var i=0,r=0,a=o.children;r2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,r=Re(n,ze);Ot.pluginEvent.bind(p)(t,e,z({dragEl:f,parentEl:S,ghostEl:g,rootEl:_,nextEl:at,lastDownEl:Ft,cloneEl:D,cloneHidden:J,dragStarted:bt,putSortable:O,activeSortable:p.active,originalEvent:i,oldIndex:ft,oldDraggableIndex:Dt,newIndex:X,newDraggableIndex:Q,hideGhostForTarget:Ie,unhideGhostForTarget:Ae,cloneNowHidden:function(){J=!0},cloneNowShown:function(){J=!1},dispatchSortableEvent:function(l){P({sortable:e,name:l,originalEvent:i})}},r))};function P(o){Le(z({putSortable:O,cloneEl:D,targetEl:f,rootEl:_,oldIndex:ft,oldDraggableIndex:Dt,newIndex:X,newDraggableIndex:Q},o))}var f,S,g,_,at,Ft,D,J,ft,X,Dt,Q,At,O,ut=!1,Bt=!1,Ht=[],it,H,$t,Ut,de,he,bt,st,St,Tt=!1,Pt=!1,Rt,I,qt=[],Jt=!1,Wt=[],Lt=typeof document!="undefined",xt=me,pe=Ct||V?"cssFloat":"float",je=Lt&&!ve&&!me&&"draggable"in document.createElement("div"),Te=function(){if(Lt){if(V)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}}(),Ce=function(t,e){var n=h(t),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=dt(t,0,e),a=dt(t,1,e),l=r&&h(r),s=a&&h(a),u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+C(r).width,d=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+C(a).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&l.float&&l.float!=="none"){var c=l.float==="left"?"left":"right";return a&&(s.clear==="both"||s.clear===c)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||u>=i&&n[pe]==="none"||a&&n[pe]==="none"&&u+d>i)?"vertical":"horizontal"},$e=function(t,e,n){var i=n?t.left:t.top,r=n?t.right:t.bottom,a=n?t.width:t.height,l=n?e.left:e.top,s=n?e.right:e.bottom,u=n?e.width:e.height;return i===l||r===s||i+a/2===l+u/2},Ue=function(t,e){var n;return Ht.some(function(i){var r=i[N].options.emptyInsertThreshold;if(!(!r||oe(i))){var a=C(i),l=t>=a.left-r&&t<=a.right+r,s=e>=a.top-r&&e<=a.bottom+r;if(l&&s)return n=i}}),n},Oe=function(t){function e(r,a){return function(l,s,u,d){var c=l.options.group.name&&s.options.group.name&&l.options.group.name===s.options.group.name;if(r==null&&(a||c))return!0;if(r==null||r===!1)return!1;if(a&&r==="clone")return r;if(typeof r=="function")return e(r(l,s,u,d),a)(l,s,u,d);var m=(a?l:s).options.group.name;return r===!0||typeof r=="string"&&r===m||r.join&&r.indexOf(m)>-1}}var n={},i=t.group;(!i||Mt(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=e(i.pull,!0),n.checkPut=e(i.put),n.revertClone=i.revertClone,t.group=n},Ie=function(){!Te&&g&&h(g,"display","none")},Ae=function(){!Te&&g&&h(g,"display","")};Lt&&!ve&&document.addEventListener("click",function(o){if(Bt)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),Bt=!1,!1},!0);var rt=function(t){if(f){t=t.touches?t.touches[0]:t;var e=Ue(t.clientX,t.clientY);if(e){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[N]._onDragOver(n)}}},qe=function(t){f&&f.parentNode[N]._isOutsideThisEl(t.target)};function p(o,t){if(!(o&&o.nodeType&&o.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));this.el=o,this.options=t=q({},t),o[N]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(o.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ce(o,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,l){a.setData("Text",l.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:p.supportPointer!==!1&&"PointerEvent"in window&&!yt,emptyInsertThreshold:5};Ot.initializePlugins(this,o,e);for(var n in e)!(n in t)&&(t[n]=e[n]);Oe(t);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:je,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?E(o,"pointerdown",this._onTapStart):(E(o,"mousedown",this._onTapStart),E(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(E(o,"dragover",this),E(o,"dragenter",this)),Ht.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),q(this,He())}p.prototype={constructor:p,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(st=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,f):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,i=this.options,r=i.preventOnFilter,a=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,s=(l||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,d=i.filter;if(nn(n),!f&&!(/mousedown|pointerdown/.test(a)&&t.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&yt&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=W(s,i.draggable,n,!1),!(s&&s.animated)&&Ft!==s)){if(ft=Y(s),Dt=Y(s,i.draggable),typeof d=="function"){if(d.call(this,t,s,this)){P({sortable:e,rootEl:u,name:"filter",targetEl:s,toEl:n,fromEl:n}),x("filter",e,{evt:t}),r&&t.cancelable&&t.preventDefault();return}}else if(d&&(d=d.split(",").some(function(c){if(c=W(u,c.trim(),n,!1),c)return P({sortable:e,rootEl:c,name:"filter",targetEl:s,fromEl:n,toEl:n}),x("filter",e,{evt:t}),!0}),d)){r&&t.cancelable&&t.preventDefault();return}i.handle&&!W(u,i.handle,n,!1)||this._prepareDragStart(t,l,s)}}},_prepareDragStart:function(t,e,n){var i=this,r=i.el,a=i.options,l=r.ownerDocument,s;if(n&&!f&&n.parentNode===r){var u=C(n);if(_=r,f=n,S=f.parentNode,at=f.nextSibling,Ft=n,At=a.group,p.dragged=f,it={target:f,clientX:(e||t).clientX,clientY:(e||t).clientY},de=it.clientX-u.left,he=it.clientY-u.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,f.style["will-change"]="all",s=function(){if(x("delayEnded",i,{evt:t}),p.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!se&&i.nativeDraggable&&(f.draggable=!0),i._triggerDragStart(t,e),P({sortable:i,name:"choose",originalEvent:t}),R(f,a.chosenClass,!0)},a.ignore.split(",").forEach(function(d){we(f,d.trim(),Vt)}),E(l,"dragover",rt),E(l,"mousemove",rt),E(l,"touchmove",rt),E(l,"mouseup",i._onDrop),E(l,"touchend",i._onDrop),E(l,"touchcancel",i._onDrop),se&&this.nativeDraggable&&(this.options.touchStartThreshold=4,f.draggable=!0),x("delayStart",this,{evt:t}),a.delay&&(!a.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(Ct||V))){if(p.eventCanceled){this._onDrop();return}E(l,"mouseup",i._disableDelayedDrag),E(l,"touchend",i._disableDelayedDrag),E(l,"touchcancel",i._disableDelayedDrag),E(l,"mousemove",i._delayedDragTouchMoveHandler),E(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&E(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(s,a.delay)}else s()}},_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(){f&&Vt(f),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;b(t,"mouseup",this._disableDelayedDrag),b(t,"touchend",this._disableDelayedDrag),b(t,"touchcancel",this._disableDelayedDrag),b(t,"mousemove",this._delayedDragTouchMoveHandler),b(t,"touchmove",this._delayedDragTouchMoveHandler),b(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?E(document,"pointermove",this._onTouchMove):e?E(document,"touchmove",this._onTouchMove):E(document,"mousemove",this._onTouchMove):(E(f,"dragend",this),E(_,"dragstart",this._onDragStart));try{document.selection?Xt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(ut=!1,_&&f){x("dragStarted",this,{evt:e}),this.nativeDraggable&&E(document,"dragover",qe);var n=this.options;!t&&R(f,n.dragClass,!1),R(f,n.ghostClass,!0),p.active=this,t&&this._appendGhost(),P({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(H){this._lastX=H.clientX,this._lastY=H.clientY,Ie();for(var t=document.elementFromPoint(H.clientX,H.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(H.clientX,H.clientY),t!==e);)e=t;if(f.parentNode[N]._isOutsideThisEl(t),e)do{if(e[N]){var n=void 0;if(n=e[N]._onDragOver({clientX:H.clientX,clientY:H.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=Ee(e));Ae()}},_onTouchMove:function(t){if(it){var e=this.options,n=e.fallbackTolerance,i=e.fallbackOffset,r=t.touches?t.touches[0]:t,a=g&&ct(g,!0),l=g&&a&&a.a,s=g&&a&&a.d,u=xt&&I&&ce(I),d=(r.clientX-it.clientX+i.x)/(l||1)+(u?u[0]-qt[0]:0)/(l||1),c=(r.clientY-it.clientY+i.y)/(s||1)+(u?u[1]-qt[1]:0)/(s||1);if(!p.active&&!ut){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))=0&&(P({rootEl:S,name:"add",toEl:S,fromEl:_,originalEvent:t}),P({sortable:this,name:"remove",toEl:S,originalEvent:t}),P({rootEl:S,name:"sort",toEl:S,fromEl:_,originalEvent:t}),P({sortable:this,name:"sort",toEl:S,originalEvent:t})),O&&O.save()):X!==ft&&X>=0&&(P({sortable:this,name:"update",toEl:S,originalEvent:t}),P({sortable:this,name:"sort",toEl:S,originalEvent:t})),p.active&&((X==null||X===-1)&&(X=ft,Q=Dt),P({sortable:this,name:"end",toEl:S,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){x("nulling",this),_=f=S=g=at=D=Ft=J=it=H=bt=X=Q=ft=Dt=st=St=O=At=p.dragged=p.ghost=p.clone=p.active=null,Wt.forEach(function(t){t.checked=!0}),Wt.length=$t=Ut=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":f&&(this._onDragOver(t),Ve(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,n=this.el.children,i=0,r=n.length,a=this.options;ii.right+r||o.clientY>n.bottom&&o.clientX>n.left:o.clientY>i.bottom+r||o.clientX>n.right&&o.clientY>n.top}function Je(o,t,e,n,i,r,a,l){var s=n?o.clientY:o.clientX,u=n?e.height:e.width,d=n?e.top:e.left,c=n?e.bottom:e.right,m=!1;if(!a){if(l&&Rtd+u*r/2:sc-Rt)return-St}else if(s>d+u*(1-i)/2&&sc-u*r/2)?s>d+u/2?1:-1:0}function tn(o){return Y(f)