kcal/public/js/draggable.js

1 line
75 KiB
JavaScript

(()=>{var e={4320:e=>{var t;window,t=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=72)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(66),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(70),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(57);Object.defineProperty(t,"closest",{enumerable:!0,get:function(){return a(n).default}});var o=r(55);Object.defineProperty(t,"requestNextAnimationFrame",{enumerable:!0,get:function(){return a(o).default}});var s=r(53);Object.defineProperty(t,"distance",{enumerable:!0,get:function(){return a(s).default}});var i=r(51);function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"touchCoords",{enumerable:!0,get:function(){return a(i).default}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(46);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(49),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(14);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o=r(13);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var s=r(12);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}));var i=r(6);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var a,l=r(39),u=(a=l)&&a.__esModule?a:{default:a};t.default=u.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4);Object.defineProperty(t,"Sensor",{enumerable:!0,get:function(){return u(n).default}});var o=r(48);Object.defineProperty(t,"MouseSensor",{enumerable:!0,get:function(){return u(o).default}});var s=r(45);Object.defineProperty(t,"TouchSensor",{enumerable:!0,get:function(){return u(s).default}});var i=r(43);Object.defineProperty(t,"DragSensor",{enumerable:!0,get:function(){return u(i).default}});var a=r(41);Object.defineProperty(t,"ForceTouchSensor",{enumerable:!0,get:function(){return u(a).default}});var l=r(3);function u(e){return e&&e.__esModule?e:{default:e}}Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(20);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(25);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(29);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(32);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(35);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(68);Object.defineProperty(t,"Announcement",{enumerable:!0,get:function(){return a(n).default}}),Object.defineProperty(t,"defaultAnnouncementOptions",{enumerable:!0,get:function(){return n.defaultOptions}});var o=r(65);Object.defineProperty(t,"Focusable",{enumerable:!0,get:function(){return a(o).default}});var s=r(63);Object.defineProperty(t,"Mirror",{enumerable:!0,get:function(){return a(s).default}}),Object.defineProperty(t,"defaultMirrorOptions",{enumerable:!0,get:function(){return s.defaultOptions}});var i=r(59);function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"Scrollable",{enumerable:!0,get:function(){return a(i).default}}),Object.defineProperty(t,"defaultScrollableOptions",{enumerable:!0,get:function(){return i.defaultOptions}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(69);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(71);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=void 0;var n,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(0),i=(n=s)&&n.__esModule?n:{default:n};const a=Symbol("onSortableSorted"),l=Symbol("onSortableSort"),u=t.defaultOptions={duration:150,easingFunction:"ease-in-out"};class c extends i.default{constructor(e){super(e),this.options=o({},u,this.getOptions()),this.lastAnimationFrame=null,this.lastElements=[],this[a]=this[a].bind(this),this[l]=this[l].bind(this)}attach(){this.draggable.on("sortable:sort",this[l]),this.draggable.on("sortable:sorted",this[a])}detach(){this.draggable.off("sortable:sort",this[l]),this.draggable.off("sortable:sorted",this[a])}getOptions(){return this.draggable.options.sortAnimation||{}}[l]({dragEvent:e}){const{sourceContainer:t}=e,r=this.draggable.getDraggableElementsForContainer(t);this.lastElements=Array.from(r).map((e=>({domEl:e,offsetTop:e.offsetTop,offsetLeft:e.offsetLeft})))}[a]({oldIndex:e,newIndex:t}){if(e===t)return;const r=[];let n,o,s;e>t?(n=t,o=e-1,s=1):(n=e+1,o=t,s=-1);for(let e=n;e<=o;e++){const t=this.lastElements[e],n=this.lastElements[e+s];r.push({from:t,to:n})}cancelAnimationFrame(this.lastAnimationFrame),this.lastAnimationFrame=requestAnimationFrame((()=>{r.forEach((e=>function({from:e,to:t},{duration:r,easingFunction:n}){const o=e.domEl,s=e.offsetLeft-t.offsetLeft,i=e.offsetTop-t.offsetTop;o.style.pointerEvents="none",o.style.transform=`translate3d(${s}px, ${i}px, 0)`,requestAnimationFrame((()=>{o.addEventListener("transitionend",d),o.style.transition=`transform ${r}ms ${n}`,o.style.transform=""}))}(e,this.options)))}))}}function d(e){e.target.style.transition="",e.target.style.pointerEvents="",e.target.removeEventListener("transitionend",d)}t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=void 0;var n,o=r(15),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default,t.defaultOptions=o.defaultOptions},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=void 0;var n,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(0),i=(n=s)&&n.__esModule?n:{default:n};const a=Symbol("onSortableSorted"),l=t.defaultOptions={duration:150,easingFunction:"ease-in-out",horizontal:!1};class u extends i.default{constructor(e){super(e),this.options=o({},l,this.getOptions()),this.lastAnimationFrame=null,this[a]=this[a].bind(this)}attach(){this.draggable.on("sortable:sorted",this[a])}detach(){this.draggable.off("sortable:sorted",this[a])}getOptions(){return this.draggable.options.swapAnimation||{}}[a]({oldIndex:e,newIndex:t,dragEvent:r}){const{source:n,over:o}=r;cancelAnimationFrame(this.lastAnimationFrame),this.lastAnimationFrame=requestAnimationFrame((()=>{e>=t?c(n,o,this.options):c(o,n,this.options)}))}}function c(e,t,{duration:r,easingFunction:n,horizontal:o}){for(const r of[e,t])r.style.pointerEvents="none";if(o){const r=e.offsetWidth;e.style.transform=`translate3d(${r}px, 0, 0)`,t.style.transform=`translate3d(-${r}px, 0, 0)`}else{const r=e.offsetHeight;e.style.transform=`translate3d(0, ${r}px, 0)`,t.style.transform=`translate3d(0, -${r}px, 0)`}requestAnimationFrame((()=>{for(const o of[e,t])o.addEventListener("transitionend",d),o.style.transition=`transform ${r}ms ${n}`,o.style.transform=""}))}function d(e){e.target.style.transition="",e.target.style.pointerEvents="",e.target.removeEventListener("transitionend",d)}t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=void 0;var n,o=r(17),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default,t.defaultOptions=o.defaultOptions},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(0),s=(n=o)&&n.__esModule?n:{default:n},i=r(7);const a=Symbol("onDragStart"),l=Symbol("onDragStop"),u=Symbol("onDragOver"),c=Symbol("onDragOut"),d=Symbol("onMirrorCreated"),h=Symbol("onMirrorDestroy");class g extends s.default{constructor(e){super(e),this.firstSource=null,this.mirror=null,this[a]=this[a].bind(this),this[l]=this[l].bind(this),this[u]=this[u].bind(this),this[c]=this[c].bind(this),this[d]=this[d].bind(this),this[h]=this[h].bind(this)}attach(){this.draggable.on("drag:start",this[a]).on("drag:stop",this[l]).on("drag:over",this[u]).on("drag:out",this[c]).on("droppable:over",this[u]).on("droppable:out",this[c]).on("mirror:created",this[d]).on("mirror:destroy",this[h])}detach(){this.draggable.off("drag:start",this[a]).off("drag:stop",this[l]).off("drag:over",this[u]).off("drag:out",this[c]).off("droppable:over",this[u]).off("droppable:out",this[c]).off("mirror:created",this[d]).off("mirror:destroy",this[h])}[a](e){e.canceled()||(this.firstSource=e.source)}[l](){this.firstSource=null}[u](e){if(e.canceled())return;const t=e.source||e.dragEvent.source;if(t===this.firstSource)return void(this.firstSource=null);const r=new i.SnapInEvent({dragEvent:e,snappable:e.over||e.droppable});this.draggable.trigger(r),r.canceled()||(this.mirror&&(this.mirror.style.display="none"),t.classList.remove(...this.draggable.getClassNamesFor("source:dragging")),t.classList.add(...this.draggable.getClassNamesFor("source:placed")),setTimeout((()=>{t.classList.remove(...this.draggable.getClassNamesFor("source:placed"))}),this.draggable.options.placedTimeout))}[c](e){if(e.canceled())return;const t=e.source||e.dragEvent.source,r=new i.SnapOutEvent({dragEvent:e,snappable:e.over||e.droppable});this.draggable.trigger(r),r.canceled()||(this.mirror&&(this.mirror.style.display=""),t.classList.add(...this.draggable.getClassNamesFor("source:dragging")))}[d]({mirror:e}){this.mirror=e}[h](){this.mirror=null}}t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SnapOutEvent=t.SnapInEvent=t.SnapEvent=void 0;var n,o=r(1),s=(n=o)&&n.__esModule?n:{default:n};class i extends s.default{get dragEvent(){return this.data.dragEvent}get snappable(){return this.data.snappable}}t.SnapEvent=i,i.type="snap";class a extends i{}t.SnapInEvent=a,a.type="snap:in",a.cancelable=!0;class l extends i{}t.SnapOutEvent=l,l.type="snap:out",l.cancelable=!0},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o,s=r(19),i=(o=s)&&o.__esModule?o:{default:o};t.default=i.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=void 0;var n,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(0),i=(n=s)&&n.__esModule?n:{default:n},a=r(2);const l=Symbol("onMirrorCreated"),u=Symbol("onMirrorDestroy"),c=Symbol("onDragOver"),d=Symbol("resize"),h=t.defaultOptions={};class g extends i.default{constructor(e){super(e),this.options=o({},h,this.getOptions()),this.lastWidth=0,this.lastHeight=0,this.mirror=null,this[l]=this[l].bind(this),this[u]=this[u].bind(this),this[c]=this[c].bind(this)}attach(){this.draggable.on("mirror:created",this[l]).on("drag:over",this[c]).on("drag:over:container",this[c])}detach(){this.draggable.off("mirror:created",this[l]).off("mirror:destroy",this[u]).off("drag:over",this[c]).off("drag:over:container",this[c])}getOptions(){return this.draggable.options.resizeMirror||{}}[l]({mirror:e}){this.mirror=e}[u](){this.mirror=null}[c](e){this[d](e)}[d]({overContainer:e,over:t}){requestAnimationFrame((()=>{if(!this.mirror.parentNode)return;this.mirror.parentNode!==e&&e.appendChild(this.mirror);const r=t||this.draggable.getDraggableElementsForContainer(e)[0];r&&(0,a.requestNextAnimationFrame)((()=>{const e=r.getBoundingClientRect();this.lastHeight===e.height&&this.lastWidth===e.width||(this.mirror.style.width=`${e.width}px`,this.mirror.style.height=`${e.height}px`,this.lastWidth=e.width,this.lastHeight=e.height)}))}))}}t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=void 0;var n,o=r(22),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default,t.defaultOptions=o.defaultOptions},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(0),s=(n=o)&&n.__esModule?n:{default:n},i=r(2),a=r(8);const l=Symbol("onDragMove"),u=Symbol("onDragStop"),c=Symbol("onRequestAnimationFrame");class d extends s.default{constructor(e){super(e),this.currentlyCollidingElement=null,this.lastCollidingElement=null,this.currentAnimationFrame=null,this[l]=this[l].bind(this),this[u]=this[u].bind(this),this[c]=this[c].bind(this)}attach(){this.draggable.on("drag:move",this[l]).on("drag:stop",this[u])}detach(){this.draggable.off("drag:move",this[l]).off("drag:stop",this[u])}getCollidables(){const e=this.draggable.options.collidables;return"string"==typeof e?Array.prototype.slice.call(document.querySelectorAll(e)):e instanceof NodeList||e instanceof Array?Array.prototype.slice.call(e):e instanceof HTMLElement?[e]:"function"==typeof e?e():[]}[l](e){const t=e.sensorEvent.target;this.currentAnimationFrame=requestAnimationFrame(this[c](t)),this.currentlyCollidingElement&&e.cancel();const r=new a.CollidableInEvent({dragEvent:e,collidingElement:this.currentlyCollidingElement}),n=new a.CollidableOutEvent({dragEvent:e,collidingElement:this.lastCollidingElement}),o=Boolean(this.currentlyCollidingElement&&this.lastCollidingElement!==this.currentlyCollidingElement),s=Boolean(!this.currentlyCollidingElement&&this.lastCollidingElement);o?(this.lastCollidingElement&&this.draggable.trigger(n),this.draggable.trigger(r)):s&&this.draggable.trigger(n),this.lastCollidingElement=this.currentlyCollidingElement}[u](e){const t=this.currentlyCollidingElement||this.lastCollidingElement,r=new a.CollidableOutEvent({dragEvent:e,collidingElement:t});t&&this.draggable.trigger(r),this.lastCollidingElement=null,this.currentlyCollidingElement=null}[c](e){return()=>{const t=this.getCollidables();this.currentlyCollidingElement=(0,i.closest)(e,(e=>t.includes(e)))}}}t.default=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollidableOutEvent=t.CollidableInEvent=t.CollidableEvent=void 0;var n,o=r(1),s=(n=o)&&n.__esModule?n:{default:n};class i extends s.default{get dragEvent(){return this.data.dragEvent}}t.CollidableEvent=i,i.type="collidable";class a extends i{get collidingElement(){return this.data.collidingElement}}t.CollidableInEvent=a,a.type="collidable:in";class l extends i{get collidingElement(){return this.data.collidingElement}}t.CollidableOutEvent=l,l.type="collidable:out"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o,s=r(24),i=(o=s)&&o.__esModule?o:{default:o};t.default=i.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(26);Object.defineProperty(t,"Collidable",{enumerable:!0,get:function(){return l(n).default}});var o=r(23);Object.defineProperty(t,"ResizeMirror",{enumerable:!0,get:function(){return l(o).default}}),Object.defineProperty(t,"defaultResizeMirrorOptions",{enumerable:!0,get:function(){return o.defaultOptions}});var s=r(21);Object.defineProperty(t,"Snappable",{enumerable:!0,get:function(){return l(s).default}});var i=r(18);Object.defineProperty(t,"SwapAnimation",{enumerable:!0,get:function(){return l(i).default}}),Object.defineProperty(t,"defaultSwapAnimationOptions",{enumerable:!0,get:function(){return i.defaultOptions}});var a=r(16);function l(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"SortAnimation",{enumerable:!0,get:function(){return l(a).default}}),Object.defineProperty(t,"defaultSortAnimationOptions",{enumerable:!0,get:function(){return a.defaultOptions}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(5),i=(n=s)&&n.__esModule?n:{default:n},a=r(9);const l=Symbol("onDragStart"),u=Symbol("onDragOverContainer"),c=Symbol("onDragOver"),d=Symbol("onDragStop"),h={"sortable:sorted":function({dragEvent:e}){const t=e.source.textContent.trim()||e.source.id||"sortable element";if(e.over){const r=e.over.textContent.trim()||e.over.id||"sortable element";return e.source.compareDocumentPosition(e.over)&Node.DOCUMENT_POSITION_FOLLOWING?`Placed ${t} after ${r}`:`Placed ${t} before ${r}`}return`Placed ${t} into a different container`}};class g extends i.default{constructor(e=[],t={}){super(e,o({},t,{announcements:o({},h,t.announcements||{})})),this.startIndex=null,this.startContainer=null,this[l]=this[l].bind(this),this[u]=this[u].bind(this),this[c]=this[c].bind(this),this[d]=this[d].bind(this),this.on("drag:start",this[l]).on("drag:over:container",this[u]).on("drag:over",this[c]).on("drag:stop",this[d])}destroy(){super.destroy(),this.off("drag:start",this[l]).off("drag:over:container",this[u]).off("drag:over",this[c]).off("drag:stop",this[d])}index(e){return this.getSortableElementsForContainer(e.parentNode).indexOf(e)}getSortableElementsForContainer(e){return[...e.querySelectorAll(this.options.draggable)].filter((t=>t!==this.originalSource&&t!==this.mirror&&t.parentNode===e))}[l](e){this.startContainer=e.source.parentNode,this.startIndex=this.index(e.source);const t=new a.SortableStartEvent({dragEvent:e,startIndex:this.startIndex,startContainer:this.startContainer});this.trigger(t),t.canceled()&&e.cancel()}[u](e){if(e.canceled())return;const{source:t,over:r,overContainer:n}=e,o=this.index(t),s=new a.SortableSortEvent({dragEvent:e,currentIndex:o,source:t,over:r});if(this.trigger(s),s.canceled())return;const i=p({source:t,over:r,overContainer:n,children:this.getSortableElementsForContainer(n)});if(!i)return;const{oldContainer:l,newContainer:u}=i,c=this.index(e.source),d=new a.SortableSortedEvent({dragEvent:e,oldIndex:o,newIndex:c,oldContainer:l,newContainer:u});this.trigger(d)}[c](e){if(e.over===e.originalSource||e.over===e.source)return;const{source:t,over:r,overContainer:n}=e,o=this.index(t),s=new a.SortableSortEvent({dragEvent:e,currentIndex:o,source:t,over:r});if(this.trigger(s),s.canceled())return;const i=p({source:t,over:r,overContainer:n,children:this.getDraggableElementsForContainer(n)});if(!i)return;const{oldContainer:l,newContainer:u}=i,c=this.index(t),d=new a.SortableSortedEvent({dragEvent:e,oldIndex:o,newIndex:c,oldContainer:l,newContainer:u});this.trigger(d)}[d](e){const t=new a.SortableStopEvent({dragEvent:e,oldIndex:this.startIndex,newIndex:this.index(e.source),oldContainer:this.startContainer,newContainer:e.source.parentNode});this.trigger(t),this.startIndex=null,this.startContainer=null}}function f(e){return Array.prototype.indexOf.call(e.parentNode.children,e)}function p({source:e,over:t,overContainer:r,children:n}){const o=!n.length,s=e.parentNode!==r,i=t&&e.parentNode===t.parentNode;return o?function(e,t){const r=e.parentNode;return t.appendChild(e),{oldContainer:r,newContainer:t}}(e,r):i?function(e,t){const r=f(e),n=f(t);return r<n?e.parentNode.insertBefore(e,t.nextElementSibling):e.parentNode.insertBefore(e,t),{oldContainer:e.parentNode,newContainer:e.parentNode}}(e,t):s?function(e,t,r){const n=e.parentNode;return t?t.parentNode.insertBefore(e,t):r.appendChild(e),{oldContainer:n,newContainer:e.parentNode}}(e,t,r):null}t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SortableStopEvent=t.SortableSortedEvent=t.SortableSortEvent=t.SortableStartEvent=t.SortableEvent=void 0;var n,o=r(1),s=(n=o)&&n.__esModule?n:{default:n};class i extends s.default{get dragEvent(){return this.data.dragEvent}}t.SortableEvent=i,i.type="sortable";class a extends i{get startIndex(){return this.data.startIndex}get startContainer(){return this.data.startContainer}}t.SortableStartEvent=a,a.type="sortable:start",a.cancelable=!0;class l extends i{get currentIndex(){return this.data.currentIndex}get over(){return this.data.over}get overContainer(){return this.data.dragEvent.overContainer}}t.SortableSortEvent=l,l.type="sortable:sort",l.cancelable=!0;class u extends i{get oldIndex(){return this.data.oldIndex}get newIndex(){return this.data.newIndex}get oldContainer(){return this.data.oldContainer}get newContainer(){return this.data.newContainer}}t.SortableSortedEvent=u,u.type="sortable:sorted";class c extends i{get oldIndex(){return this.data.oldIndex}get newIndex(){return this.data.newIndex}get oldContainer(){return this.data.oldContainer}get newContainer(){return this.data.newContainer}}t.SortableStopEvent=c,c.type="sortable:stop"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o,s=r(28),i=(o=s)&&o.__esModule?o:{default:o};t.default=i.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(5),i=(n=s)&&n.__esModule?n:{default:n},a=r(10);const l=Symbol("onDragStart"),u=Symbol("onDragOver"),c=Symbol("onDragStop"),d={"swappabled:swapped":function({dragEvent:e,swappedElement:t}){return`Swapped ${e.source.textContent.trim()||e.source.id||"swappable element"} with ${t.textContent.trim()||t.id||"swappable element"}`}};class h extends i.default{constructor(e=[],t={}){super(e,o({},t,{announcements:o({},d,t.announcements||{})})),this.lastOver=null,this[l]=this[l].bind(this),this[u]=this[u].bind(this),this[c]=this[c].bind(this),this.on("drag:start",this[l]).on("drag:over",this[u]).on("drag:stop",this[c])}destroy(){super.destroy(),this.off("drag:start",this._onDragStart).off("drag:over",this._onDragOver).off("drag:stop",this._onDragStop)}[l](e){const t=new a.SwappableStartEvent({dragEvent:e});this.trigger(t),t.canceled()&&e.cancel()}[u](e){if(e.over===e.originalSource||e.over===e.source||e.canceled())return;const t=new a.SwappableSwapEvent({dragEvent:e,over:e.over,overContainer:e.overContainer});if(this.trigger(t),t.canceled())return;this.lastOver&&this.lastOver!==e.over&&g(this.lastOver,e.source),this.lastOver===e.over?this.lastOver=null:this.lastOver=e.over,g(e.source,e.over);const r=new a.SwappableSwappedEvent({dragEvent:e,swappedElement:e.over});this.trigger(r)}[c](e){const t=new a.SwappableStopEvent({dragEvent:e});this.trigger(t),this.lastOver=null}}function g(e,t){const r=t.parentNode,n=e.parentNode;!function(e){const t=document.createElement("div");e(t),t.parentNode.removeChild(t)}((o=>{n.insertBefore(o,e),r.insertBefore(e,t),n.insertBefore(t,o)}))}t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SwappableStopEvent=t.SwappableSwappedEvent=t.SwappableSwapEvent=t.SwappableStartEvent=t.SwappableEvent=void 0;var n,o=r(1),s=(n=o)&&n.__esModule?n:{default:n};class i extends s.default{get dragEvent(){return this.data.dragEvent}}t.SwappableEvent=i,i.type="swappable";class a extends i{}t.SwappableStartEvent=a,a.type="swappable:start",a.cancelable=!0;class l extends i{get over(){return this.data.over}get overContainer(){return this.data.overContainer}}t.SwappableSwapEvent=l,l.type="swappable:swap",l.cancelable=!0;class u extends i{get swappedElement(){return this.data.swappedElement}}t.SwappableSwappedEvent=u,u.type="swappable:swapped";class c extends i{}t.SwappableStopEvent=c,c.type="swappable:stop"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(10);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o,s=r(31),i=(o=s)&&o.__esModule?o:{default:o};t.default=i.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(2),i=r(5),a=(n=i)&&n.__esModule?n:{default:n},l=r(11);const u=Symbol("onDragStart"),c=Symbol("onDragMove"),d=Symbol("onDragStop"),h=Symbol("dropInDropZone"),g=Symbol("returnToOriginalDropzone"),f=Symbol("closestDropzone"),p=Symbol("getDropzones"),v={"droppable:dropped":function({dragEvent:e,dropzone:t}){return`Dropped ${e.source.textContent.trim()||e.source.id||"draggable element"} into ${t.textContent.trim()||t.id||"droppable element"}`},"droppable:returned":function({dragEvent:e,dropzone:t}){return`Returned ${e.source.textContent.trim()||e.source.id||"draggable element"} from ${t.textContent.trim()||t.id||"droppable element"}`}},m={"droppable:active":"draggable-dropzone--active","droppable:occupied":"draggable-dropzone--occupied"},b={dropzone:".draggable-droppable"};class y extends a.default{constructor(e=[],t={}){super(e,o({},b,t,{classes:o({},m,t.classes||{}),announcements:o({},v,t.announcements||{})})),this.dropzones=null,this.lastDropzone=null,this.initialDropzone=null,this[u]=this[u].bind(this),this[c]=this[c].bind(this),this[d]=this[d].bind(this),this.on("drag:start",this[u]).on("drag:move",this[c]).on("drag:stop",this[d])}destroy(){super.destroy(),this.off("drag:start",this[u]).off("drag:move",this[c]).off("drag:stop",this[d])}[u](e){if(e.canceled())return;this.dropzones=[...this[p]()];const t=(0,s.closest)(e.sensorEvent.target,this.options.dropzone);if(!t)return void e.cancel();const r=new l.DroppableStartEvent({dragEvent:e,dropzone:t});if(this.trigger(r),r.canceled())e.cancel();else{this.initialDropzone=t;for(const e of this.dropzones)e.classList.contains(this.getClassNameFor("droppable:occupied"))||e.classList.add(...this.getClassNamesFor("droppable:active"))}}[c](e){if(e.canceled())return;const t=this[f](e.sensorEvent.target);t&&!t.classList.contains(this.getClassNameFor("droppable:occupied"))&&this[h](e,t)?this.lastDropzone=t:t&&t!==this.initialDropzone||!this.lastDropzone||(this[g](e),this.lastDropzone=null)}[d](e){const t=new l.DroppableStopEvent({dragEvent:e,dropzone:this.lastDropzone||this.initialDropzone});this.trigger(t);const r=this.getClassNamesFor("droppable:occupied");for(const e of this.dropzones)e.classList.remove(...this.getClassNamesFor("droppable:active"));this.lastDropzone&&this.lastDropzone!==this.initialDropzone&&this.initialDropzone.classList.remove(...r),this.dropzones=null,this.lastDropzone=null,this.initialDropzone=null}[h](e,t){const r=new l.DroppableDroppedEvent({dragEvent:e,dropzone:t});if(this.trigger(r),r.canceled())return!1;const n=this.getClassNamesFor("droppable:occupied");return this.lastDropzone&&this.lastDropzone.classList.remove(...n),t.appendChild(e.source),t.classList.add(...n),!0}[g](e){const t=new l.DroppableReturnedEvent({dragEvent:e,dropzone:this.lastDropzone});this.trigger(t),t.canceled()||(this.initialDropzone.appendChild(e.source),this.lastDropzone.classList.remove(...this.getClassNamesFor("droppable:occupied")))}[f](e){return this.dropzones?(0,s.closest)(e,this.dropzones):null}[p](){const e=this.options.dropzone;return"string"==typeof e?document.querySelectorAll(e):e instanceof NodeList||e instanceof Array?e:"function"==typeof e?e():[]}}t.default=y},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DroppableStopEvent=t.DroppableReturnedEvent=t.DroppableDroppedEvent=t.DroppableStartEvent=t.DroppableEvent=void 0;var n,o=r(1),s=(n=o)&&n.__esModule?n:{default:n};class i extends s.default{get dragEvent(){return this.data.dragEvent}}t.DroppableEvent=i,i.type="droppable";class a extends i{get dropzone(){return this.data.dropzone}}t.DroppableStartEvent=a,a.type="droppable:start",a.cancelable=!0;class l extends i{get dropzone(){return this.data.dropzone}}t.DroppableDroppedEvent=l,l.type="droppable:dropped",l.cancelable=!0;class u extends i{get dropzone(){return this.data.dropzone}}t.DroppableReturnedEvent=u,u.type="droppable:returned",u.cancelable=!0;class c extends i{get dropzone(){return this.data.dropzone}}t.DroppableStopEvent=c,c.type="droppable:stop",c.cancelable=!0},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(11);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o,s=r(34),i=(o=s)&&o.__esModule?o:{default:o};t.default=i.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(){this.callbacks={}}on(e,...t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(...t),this}off(e,t){if(!this.callbacks[e])return null;const r=this.callbacks[e].slice(0);for(let n=0;n<r.length;n++)t===r[n]&&this.callbacks[e].splice(n,1);return this}trigger(e){if(!this.callbacks[e.type])return null;const t=[...this.callbacks[e.type]],r=[];for(let n=t.length-1;n>=0;n--){const o=t[n];try{o(e)}catch(e){r.push(e)}}return r.length&&console.error(`Draggable caught errors while triggering '${e.type}'`,r),this}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(37),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=void 0;var n,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(2),i=r(12),a=r(38),l=(n=a)&&n.__esModule?n:{default:n},u=r(6),c=r(13),d=r(14);const h=Symbol("onDragStart"),g=Symbol("onDragMove"),f=Symbol("onDragStop"),p=Symbol("onDragPressure"),v={"drag:start":e=>`Picked up ${e.source.textContent.trim()||e.source.id||"draggable element"}`,"drag:stop":e=>`Released ${e.source.textContent.trim()||e.source.id||"draggable element"}`},m={"container:dragging":"draggable-container--is-dragging","source:dragging":"draggable-source--is-dragging","source:placed":"draggable-source--placed","container:placed":"draggable-container--placed","body:dragging":"draggable--is-dragging","draggable:over":"draggable--over","container:over":"draggable-container--over","source:original":"draggable--original",mirror:"draggable-mirror"},b=t.defaultOptions={draggable:".draggable-source",handle:null,delay:{},distance:0,placedTimeout:800,plugins:[],sensors:[],exclude:{plugins:[],sensors:[]}};class y{constructor(e=[document.body],t={}){if(e instanceof NodeList||e instanceof Array)this.containers=[...e];else{if(!(e instanceof HTMLElement))throw new Error("Draggable containers are expected to be of type `NodeList`, `HTMLElement[]` or `HTMLElement`");this.containers=[e]}this.options=o({},b,t,{classes:o({},m,t.classes||{}),announcements:o({},v,t.announcements||{}),exclude:{plugins:t.exclude&&t.exclude.plugins||[],sensors:t.exclude&&t.exclude.sensors||[]}}),this.emitter=new l.default,this.dragging=!1,this.plugins=[],this.sensors=[],this[h]=this[h].bind(this),this[g]=this[g].bind(this),this[f]=this[f].bind(this),this[p]=this[p].bind(this),document.addEventListener("drag:start",this[h],!0),document.addEventListener("drag:move",this[g],!0),document.addEventListener("drag:stop",this[f],!0),document.addEventListener("drag:pressure",this[p],!0);const r=Object.values(y.Plugins).filter((e=>!this.options.exclude.plugins.includes(e))),n=Object.values(y.Sensors).filter((e=>!this.options.exclude.sensors.includes(e)));this.addPlugin(...r,...this.options.plugins),this.addSensor(...n,...this.options.sensors);const s=new c.DraggableInitializedEvent({draggable:this});this.on("mirror:created",(({mirror:e})=>this.mirror=e)),this.on("mirror:destroy",(()=>this.mirror=null)),this.trigger(s)}destroy(){document.removeEventListener("drag:start",this[h],!0),document.removeEventListener("drag:move",this[g],!0),document.removeEventListener("drag:stop",this[f],!0),document.removeEventListener("drag:pressure",this[p],!0);const e=new c.DraggableDestroyEvent({draggable:this});this.trigger(e),this.removePlugin(...this.plugins.map((e=>e.constructor))),this.removeSensor(...this.sensors.map((e=>e.constructor)))}addPlugin(...e){const t=e.map((e=>new e(this)));return t.forEach((e=>e.attach())),this.plugins=[...this.plugins,...t],this}removePlugin(...e){return this.plugins.filter((t=>e.includes(t.constructor))).forEach((e=>e.detach())),this.plugins=this.plugins.filter((t=>!e.includes(t.constructor))),this}addSensor(...e){const t=e.map((e=>new e(this.containers,this.options)));return t.forEach((e=>e.attach())),this.sensors=[...this.sensors,...t],this}removeSensor(...e){return this.sensors.filter((t=>e.includes(t.constructor))).forEach((e=>e.detach())),this.sensors=this.sensors.filter((t=>!e.includes(t.constructor))),this}addContainer(...e){return this.containers=[...this.containers,...e],this.sensors.forEach((t=>t.addContainer(...e))),this}removeContainer(...e){return this.containers=this.containers.filter((t=>!e.includes(t))),this.sensors.forEach((t=>t.removeContainer(...e))),this}on(e,...t){return this.emitter.on(e,...t),this}off(e,t){return this.emitter.off(e,t),this}trigger(e){return this.emitter.trigger(e),this}getClassNameFor(e){return this.getClassNamesFor(e)[0]}getClassNamesFor(e){const t=this.options.classes[e];return t instanceof Array?t:"string"==typeof t||t instanceof String?[t]:[]}isDragging(){return Boolean(this.dragging)}getDraggableElements(){return this.containers.reduce(((e,t)=>[...e,...this.getDraggableElementsForContainer(t)]),[])}getDraggableElementsForContainer(e){return[...e.querySelectorAll(this.options.draggable)].filter((e=>e!==this.originalSource&&e!==this.mirror))}[h](e){const t=E(e),{target:r,container:n}=t;if(!this.containers.includes(n))return;if(this.options.handle&&r&&!(0,s.closest)(r,this.options.handle))return void t.cancel();if(this.originalSource=(0,s.closest)(r,this.options.draggable),this.sourceContainer=n,!this.originalSource)return void t.cancel();this.lastPlacedSource&&this.lastPlacedContainer&&(clearTimeout(this.placedTimeoutID),this.lastPlacedSource.classList.remove(...this.getClassNamesFor("source:placed")),this.lastPlacedContainer.classList.remove(...this.getClassNamesFor("container:placed"))),this.source=this.originalSource.cloneNode(!0),this.originalSource.parentNode.insertBefore(this.source,this.originalSource),this.originalSource.style.display="none";const i=new d.DragStartEvent({source:this.source,originalSource:this.originalSource,sourceContainer:n,sensorEvent:t});if(this.trigger(i),this.dragging=!i.canceled(),i.canceled())return this.source.parentNode.removeChild(this.source),void(this.originalSource.style.display=null);this.originalSource.classList.add(...this.getClassNamesFor("source:original")),this.source.classList.add(...this.getClassNamesFor("source:dragging")),this.sourceContainer.classList.add(...this.getClassNamesFor("container:dragging")),document.body.classList.add(...this.getClassNamesFor("body:dragging")),S(document.body,"none"),requestAnimationFrame((()=>{const t=E(e).clone({target:this.source});this[g](o({},e,{detail:t}))}))}[g](e){if(!this.dragging)return;const t=E(e),{container:r}=t;let n=t.target;const o=new d.DragMoveEvent({source:this.source,originalSource:this.originalSource,sourceContainer:r,sensorEvent:t});this.trigger(o),o.canceled()&&t.cancel(),n=(0,s.closest)(n,this.options.draggable);const i=(0,s.closest)(t.target,this.containers),a=t.overContainer||i,l=this.currentOverContainer&&a!==this.currentOverContainer,u=this.currentOver&&n!==this.currentOver,c=a&&this.currentOverContainer!==a,h=i&&n&&this.currentOver!==n;if(u){const e=new d.DragOutEvent({source:this.source,originalSource:this.originalSource,sourceContainer:r,sensorEvent:t,over:this.currentOver,overContainer:this.currentOverContainer});this.currentOver.classList.remove(...this.getClassNamesFor("draggable:over")),this.currentOver=null,this.trigger(e)}if(l){const e=new d.DragOutContainerEvent({source:this.source,originalSource:this.originalSource,sourceContainer:r,sensorEvent:t,overContainer:this.currentOverContainer});this.currentOverContainer.classList.remove(...this.getClassNamesFor("container:over")),this.currentOverContainer=null,this.trigger(e)}if(c){a.classList.add(...this.getClassNamesFor("container:over"));const e=new d.DragOverContainerEvent({source:this.source,originalSource:this.originalSource,sourceContainer:r,sensorEvent:t,overContainer:a});this.currentOverContainer=a,this.trigger(e)}if(h){n.classList.add(...this.getClassNamesFor("draggable:over"));const e=new d.DragOverEvent({source:this.source,originalSource:this.originalSource,sourceContainer:r,sensorEvent:t,overContainer:a,over:n});this.currentOver=n,this.trigger(e)}}[f](e){if(!this.dragging)return;this.dragging=!1;const t=new d.DragStopEvent({source:this.source,originalSource:this.originalSource,sensorEvent:e.sensorEvent,sourceContainer:this.sourceContainer});this.trigger(t),this.source.parentNode.insertBefore(this.originalSource,this.source),this.source.parentNode.removeChild(this.source),this.originalSource.style.display="",this.source.classList.remove(...this.getClassNamesFor("source:dragging")),this.originalSource.classList.remove(...this.getClassNamesFor("source:original")),this.originalSource.classList.add(...this.getClassNamesFor("source:placed")),this.sourceContainer.classList.add(...this.getClassNamesFor("container:placed")),this.sourceContainer.classList.remove(...this.getClassNamesFor("container:dragging")),document.body.classList.remove(...this.getClassNamesFor("body:dragging")),S(document.body,""),this.currentOver&&this.currentOver.classList.remove(...this.getClassNamesFor("draggable:over")),this.currentOverContainer&&this.currentOverContainer.classList.remove(...this.getClassNamesFor("container:over")),this.lastPlacedSource=this.originalSource,this.lastPlacedContainer=this.sourceContainer,this.placedTimeoutID=setTimeout((()=>{this.lastPlacedSource&&this.lastPlacedSource.classList.remove(...this.getClassNamesFor("source:placed")),this.lastPlacedContainer&&this.lastPlacedContainer.classList.remove(...this.getClassNamesFor("container:placed")),this.lastPlacedSource=null,this.lastPlacedContainer=null}),this.options.placedTimeout);const r=new d.DragStoppedEvent({source:this.source,originalSource:this.originalSource,sensorEvent:e.sensorEvent,sourceContainer:this.sourceContainer});this.trigger(r),this.source=null,this.originalSource=null,this.currentOverContainer=null,this.currentOver=null,this.sourceContainer=null}[p](e){if(!this.dragging)return;const t=E(e),r=this.source||(0,s.closest)(t.originalEvent.target,this.options.draggable),n=new d.DragPressureEvent({sensorEvent:t,source:r,pressure:t.pressure});this.trigger(n)}}function E(e){return e.detail}function S(e,t){e.style.webkitUserSelect=t,e.style.mozUserSelect=t,e.style.msUserSelect=t,e.style.oUserSelect=t,e.style.userSelect=t}t.default=y,y.Plugins={Announcement:i.Announcement,Focusable:i.Focusable,Mirror:i.Mirror,Scrollable:i.Scrollable},y.Sensors={MouseSensor:u.MouseSensor,TouchSensor:u.TouchSensor}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(4),s=(n=o)&&n.__esModule?n:{default:n},i=r(3);const a=Symbol("onMouseForceWillBegin"),l=Symbol("onMouseForceDown"),u=Symbol("onMouseDown"),c=Symbol("onMouseForceChange"),d=Symbol("onMouseMove"),h=Symbol("onMouseUp"),g=Symbol("onMouseForceGlobalChange");class f extends s.default{constructor(e=[],t={}){super(e,t),this.mightDrag=!1,this[a]=this[a].bind(this),this[l]=this[l].bind(this),this[u]=this[u].bind(this),this[c]=this[c].bind(this),this[d]=this[d].bind(this),this[h]=this[h].bind(this)}attach(){for(const e of this.containers)e.addEventListener("webkitmouseforcewillbegin",this[a],!1),e.addEventListener("webkitmouseforcedown",this[l],!1),e.addEventListener("mousedown",this[u],!0),e.addEventListener("webkitmouseforcechanged",this[c],!1);document.addEventListener("mousemove",this[d]),document.addEventListener("mouseup",this[h])}detach(){for(const e of this.containers)e.removeEventListener("webkitmouseforcewillbegin",this[a],!1),e.removeEventListener("webkitmouseforcedown",this[l],!1),e.removeEventListener("mousedown",this[u],!0),e.removeEventListener("webkitmouseforcechanged",this[c],!1);document.removeEventListener("mousemove",this[d]),document.removeEventListener("mouseup",this[h])}[a](e){e.preventDefault(),this.mightDrag=!0}[l](e){if(this.dragging)return;const t=document.elementFromPoint(e.clientX,e.clientY),r=e.currentTarget,n=new i.DragStartSensorEvent({clientX:e.clientX,clientY:e.clientY,target:t,container:r,originalEvent:e});this.trigger(r,n),this.currentContainer=r,this.dragging=!n.canceled(),this.mightDrag=!1}[h](e){if(!this.dragging)return;const t=new i.DragStopSensorEvent({clientX:e.clientX,clientY:e.clientY,target:null,container:this.currentContainer,originalEvent:e});this.trigger(this.currentContainer,t),this.currentContainer=null,this.dragging=!1,this.mightDrag=!1}[u](e){this.mightDrag&&(e.stopPropagation(),e.stopImmediatePropagation(),e.preventDefault())}[d](e){if(!this.dragging)return;const t=document.elementFromPoint(e.clientX,e.clientY),r=new i.DragMoveSensorEvent({clientX:e.clientX,clientY:e.clientY,target:t,container:this.currentContainer,originalEvent:e});this.trigger(this.currentContainer,r)}[c](e){if(this.dragging)return;const t=e.target,r=e.currentTarget,n=new i.DragPressureSensorEvent({pressure:e.webkitForce,clientX:e.clientX,clientY:e.clientY,target:t,container:r,originalEvent:e});this.trigger(r,n)}[g](e){if(!this.dragging)return;const t=e.target,r=new i.DragPressureSensorEvent({pressure:e.webkitForce,clientX:e.clientX,clientY:e.clientY,target:t,container:this.currentContainer,originalEvent:e});this.trigger(this.currentContainer,r)}}t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(40),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(2),s=r(4),i=(n=s)&&n.__esModule?n:{default:n},a=r(3);const l=Symbol("onMouseDown"),u=Symbol("onMouseUp"),c=Symbol("onDragStart"),d=Symbol("onDragOver"),h=Symbol("onDragEnd"),g=Symbol("onDrop"),f=Symbol("reset");class p extends i.default{constructor(e=[],t={}){super(e,t),this.mouseDownTimeout=null,this.draggableElement=null,this.nativeDraggableElement=null,this[l]=this[l].bind(this),this[u]=this[u].bind(this),this[c]=this[c].bind(this),this[d]=this[d].bind(this),this[h]=this[h].bind(this),this[g]=this[g].bind(this)}attach(){document.addEventListener("mousedown",this[l],!0)}detach(){document.removeEventListener("mousedown",this[l],!0)}[c](e){e.dataTransfer.setData("text",""),e.dataTransfer.effectAllowed=this.options.type;const t=document.elementFromPoint(e.clientX,e.clientY);if(this.currentContainer=(0,o.closest)(e.target,this.containers),!this.currentContainer)return;const r=new a.DragStartSensorEvent({clientX:e.clientX,clientY:e.clientY,target:t,container:this.currentContainer,originalEvent:e});setTimeout((()=>{this.trigger(this.currentContainer,r),r.canceled()?this.dragging=!1:this.dragging=!0}),0)}[d](e){if(!this.dragging)return;const t=document.elementFromPoint(e.clientX,e.clientY),r=this.currentContainer,n=new a.DragMoveSensorEvent({clientX:e.clientX,clientY:e.clientY,target:t,container:r,originalEvent:e});this.trigger(r,n),n.canceled()||(e.preventDefault(),e.dataTransfer.dropEffect=this.options.type)}[h](e){if(!this.dragging)return;document.removeEventListener("mouseup",this[u],!0);const t=document.elementFromPoint(e.clientX,e.clientY),r=this.currentContainer,n=new a.DragStopSensorEvent({clientX:e.clientX,clientY:e.clientY,target:t,container:r,originalEvent:e});this.trigger(r,n),this.dragging=!1,this.startEvent=null,this[f]()}[g](e){e.preventDefault()}[l](e){if(e.target&&(e.target.form||e.target.contenteditable))return;const t=(0,o.closest)(e.target,(e=>e.draggable));t&&(t.draggable=!1,this.nativeDraggableElement=t),document.addEventListener("mouseup",this[u],!0),document.addEventListener("dragstart",this[c],!1),document.addEventListener("dragover",this[d],!1),document.addEventListener("dragend",this[h],!1),document.addEventListener("drop",this[g],!1);const r=(0,o.closest)(e.target,this.options.draggable);r&&(this.startEvent=e,this.mouseDownTimeout=setTimeout((()=>{r.draggable=!0,this.draggableElement=r}),this.delay.drag))}[u](){this[f]()}[f](){clearTimeout(this.mouseDownTimeout),document.removeEventListener("mouseup",this[u],!0),document.removeEventListener("dragstart",this[c],!1),document.removeEventListener("dragover",this[d],!1),document.removeEventListener("dragend",this[h],!1),document.removeEventListener("drop",this[g],!1),this.nativeDraggableElement&&(this.nativeDraggableElement.draggable=!0,this.nativeDraggableElement=null),this.draggableElement&&(this.draggableElement.draggable=!1,this.draggableElement=null)}}t.default=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(42),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(2),s=r(4),i=(n=s)&&n.__esModule?n:{default:n},a=r(3);const l=Symbol("onTouchStart"),u=Symbol("onTouchEnd"),c=Symbol("onTouchMove"),d=Symbol("startDrag"),h=Symbol("onDistanceChange");let g=!1;window.addEventListener("touchmove",(e=>{g&&e.preventDefault()}),{passive:!1});class f extends i.default{constructor(e=[],t={}){super(e,t),this.currentScrollableParent=null,this.tapTimeout=null,this.touchMoved=!1,this.pageX=null,this.pageY=null,this[l]=this[l].bind(this),this[u]=this[u].bind(this),this[c]=this[c].bind(this),this[d]=this[d].bind(this),this[h]=this[h].bind(this)}attach(){document.addEventListener("touchstart",this[l])}detach(){document.removeEventListener("touchstart",this[l])}[l](e){const t=(0,o.closest)(e.target,this.containers);if(!t)return;const{distance:r=0}=this.options,{delay:n}=this,{pageX:s,pageY:i}=(0,o.touchCoords)(e);Object.assign(this,{pageX:s,pageY:i}),this.onTouchStartAt=Date.now(),this.startEvent=e,this.currentContainer=t,document.addEventListener("touchend",this[u]),document.addEventListener("touchcancel",this[u]),document.addEventListener("touchmove",this[h]),t.addEventListener("contextmenu",p),r&&(g=!0),this.tapTimeout=window.setTimeout((()=>{this[h]({touches:[{pageX:this.pageX,pageY:this.pageY}]})}),n.touch)}[d](){const e=this.startEvent,t=this.currentContainer,r=(0,o.touchCoords)(e),n=new a.DragStartSensorEvent({clientX:r.pageX,clientY:r.pageY,target:e.target,container:t,originalEvent:e});this.trigger(this.currentContainer,n),this.dragging=!n.canceled(),this.dragging&&document.addEventListener("touchmove",this[c]),g=this.dragging}[h](e){const{distance:t}=this.options,{startEvent:r,delay:n}=this,s=(0,o.touchCoords)(r),i=(0,o.touchCoords)(e),a=Date.now()-this.onTouchStartAt,l=(0,o.distance)(s.pageX,s.pageY,i.pageX,i.pageY);Object.assign(this,i),clearTimeout(this.tapTimeout),a<n.touch?document.removeEventListener("touchmove",this[h]):l>=t&&(document.removeEventListener("touchmove",this[h]),this[d]())}[c](e){if(!this.dragging)return;const{pageX:t,pageY:r}=(0,o.touchCoords)(e),n=document.elementFromPoint(t-window.scrollX,r-window.scrollY),s=new a.DragMoveSensorEvent({clientX:t,clientY:r,target:n,container:this.currentContainer,originalEvent:e});this.trigger(this.currentContainer,s)}[u](e){if(clearTimeout(this.tapTimeout),g=!1,document.removeEventListener("touchend",this[u]),document.removeEventListener("touchcancel",this[u]),document.removeEventListener("touchmove",this[h]),this.currentContainer&&this.currentContainer.removeEventListener("contextmenu",p),!this.dragging)return;document.removeEventListener("touchmove",this[c]);const{pageX:t,pageY:r}=(0,o.touchCoords)(e),n=document.elementFromPoint(t-window.scrollX,r-window.scrollY);e.preventDefault();const s=new a.DragStopSensorEvent({clientX:t,clientY:r,target:n,container:this.currentContainer,originalEvent:e});this.trigger(this.currentContainer,s),this.currentContainer=null,this.dragging=!1,this.startEvent=null}}function p(e){e.preventDefault(),e.stopPropagation()}t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(44),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DragPressureSensorEvent=t.DragStopSensorEvent=t.DragMoveSensorEvent=t.DragStartSensorEvent=t.SensorEvent=void 0;var n,o=r(1),s=(n=o)&&n.__esModule?n:{default:n};class i extends s.default{get originalEvent(){return this.data.originalEvent}get clientX(){return this.data.clientX}get clientY(){return this.data.clientY}get target(){return this.data.target}get container(){return this.data.container}get pressure(){return this.data.pressure}}t.SensorEvent=i;class a extends i{}t.DragStartSensorEvent=a,a.type="drag:start";class l extends i{}t.DragMoveSensorEvent=l,l.type="drag:move";class u extends i{}t.DragStopSensorEvent=u,u.type="drag:stop";class c extends i{}t.DragPressureSensorEvent=c,c.type="drag:pressure"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(2),s=r(4),i=(n=s)&&n.__esModule?n:{default:n},a=r(3);const l=Symbol("onContextMenuWhileDragging"),u=Symbol("onMouseDown"),c=Symbol("onMouseMove"),d=Symbol("onMouseUp"),h=Symbol("startDrag"),g=Symbol("onDistanceChange");class f extends i.default{constructor(e=[],t={}){super(e,t),this.mouseDownTimeout=null,this.pageX=null,this.pageY=null,this[l]=this[l].bind(this),this[u]=this[u].bind(this),this[c]=this[c].bind(this),this[d]=this[d].bind(this),this[h]=this[h].bind(this),this[g]=this[g].bind(this)}attach(){document.addEventListener("mousedown",this[u],!0)}detach(){document.removeEventListener("mousedown",this[u],!0)}[u](e){if(0!==e.button||e.ctrlKey||e.metaKey)return;const t=(0,o.closest)(e.target,this.containers);if(!t)return;const{delay:r}=this,{pageX:n,pageY:s}=e;Object.assign(this,{pageX:n,pageY:s}),this.onMouseDownAt=Date.now(),this.startEvent=e,this.currentContainer=t,document.addEventListener("mouseup",this[d]),document.addEventListener("dragstart",p),document.addEventListener("mousemove",this[g]),this.mouseDownTimeout=window.setTimeout((()=>{this[g]({pageX:this.pageX,pageY:this.pageY})}),r.mouse)}[h](){const e=this.startEvent,t=this.currentContainer,r=new a.DragStartSensorEvent({clientX:e.clientX,clientY:e.clientY,target:e.target,container:t,originalEvent:e});this.trigger(this.currentContainer,r),this.dragging=!r.canceled(),this.dragging&&(document.addEventListener("contextmenu",this[l],!0),document.addEventListener("mousemove",this[c]))}[g](e){const{pageX:t,pageY:r}=e,{distance:n}=this.options,{startEvent:s,delay:i}=this;if(Object.assign(this,{pageX:t,pageY:r}),!this.currentContainer)return;const a=Date.now()-this.onMouseDownAt,l=(0,o.distance)(s.pageX,s.pageY,t,r)||0;clearTimeout(this.mouseDownTimeout),a<i.mouse?document.removeEventListener("mousemove",this[g]):l>=n&&(document.removeEventListener("mousemove",this[g]),this[h]())}[c](e){if(!this.dragging)return;const t=document.elementFromPoint(e.clientX,e.clientY),r=new a.DragMoveSensorEvent({clientX:e.clientX,clientY:e.clientY,target:t,container:this.currentContainer,originalEvent:e});this.trigger(this.currentContainer,r)}[d](e){if(clearTimeout(this.mouseDownTimeout),0!==e.button)return;if(document.removeEventListener("mouseup",this[d]),document.removeEventListener("dragstart",p),document.removeEventListener("mousemove",this[g]),!this.dragging)return;const t=document.elementFromPoint(e.clientX,e.clientY),r=new a.DragStopSensorEvent({clientX:e.clientX,clientY:e.clientY,target:t,container:this.currentContainer,originalEvent:e});this.trigger(this.currentContainer,r),document.removeEventListener("contextmenu",this[l],!0),document.removeEventListener("mousemove",this[c]),this.currentContainer=null,this.dragging=!1,this.startEvent=null}[l](e){e.preventDefault()}}function p(e){e.preventDefault()}t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(47),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};const o={mouse:0,drag:0,touch:100};t.default=class{constructor(e=[],t={}){this.containers=[...e],this.options=n({},t),this.dragging=!1,this.currentContainer=null,this.startEvent=null,this.delay=function(e){const t={};if(void 0===e)return n({},o);if("number"==typeof e){for(const r in o)o.hasOwnProperty(r)&&(t[r]=e);return t}for(const r in o)o.hasOwnProperty(r)&&(void 0===e[r]?t[r]=o[r]:t[r]=e[r]);return t}(t.delay)}attach(){return this}detach(){return this}addContainer(...e){this.containers=[...this.containers,...e]}removeContainer(...e){this.containers=this.containers.filter((t=>!e.includes(t)))}trigger(e,t){const r=document.createEvent("Event");return r.detail=t,r.initEvent(t.type,!0,!0),e.dispatchEvent(r),this.lastEvent=t,t}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e={}){const{touches:t,changedTouches:r}=e;return t&&t[0]||r&&r[0]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(50),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n){return Math.sqrt((r-e)**2+(n-t)**2)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(52),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return requestAnimationFrame((()=>{requestAnimationFrame(e)}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(54),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!e)return null;const r=t,o=t,s=t,i=t,a=Boolean("string"==typeof t),l=Boolean("function"==typeof t),u=Boolean(t instanceof NodeList||t instanceof Array),c=Boolean(t instanceof HTMLElement);let d=e;do{if(d=d.correspondingUseElement||d.correspondingElement||d,(h=d)?a?n.call(h,r):u?[...s].includes(h):c?i===h:l&&o(h):h)return d;d=d.parentNode}while(d&&d!==document.body&&d!==document);var h;return null};const n=Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(56),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=t.scroll=t.onDragStop=t.onDragMove=t.onDragStart=void 0;var n,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(0),i=(n=s)&&n.__esModule?n:{default:n},a=r(2);const l=t.onDragStart=Symbol("onDragStart"),u=t.onDragMove=Symbol("onDragMove"),c=t.onDragStop=Symbol("onDragStop"),d=t.scroll=Symbol("scroll"),h=t.defaultOptions={speed:6,sensitivity:50,scrollableElements:[]};class g extends i.default{constructor(e){super(e),this.options=o({},h,this.getOptions()),this.currentMousePosition=null,this.scrollAnimationFrame=null,this.scrollableElement=null,this.findScrollableElementFrame=null,this[l]=this[l].bind(this),this[u]=this[u].bind(this),this[c]=this[c].bind(this),this[d]=this[d].bind(this)}attach(){this.draggable.on("drag:start",this[l]).on("drag:move",this[u]).on("drag:stop",this[c])}detach(){this.draggable.off("drag:start",this[l]).off("drag:move",this[u]).off("drag:stop",this[c])}getOptions(){return this.draggable.options.scrollable||{}}getScrollableElement(e){return this.hasDefinedScrollableElements()?(0,a.closest)(e,this.options.scrollableElements)||document.documentElement:function(e){if(!e)return f();const t=getComputedStyle(e).getPropertyValue("position"),r="absolute"===t,n=(0,a.closest)(e,(e=>(!r||!function(e){return"static"===getComputedStyle(e).getPropertyValue("position")}(e))&&function(e){const t=/(auto|scroll)/,r=getComputedStyle(e,null),n=r.getPropertyValue("overflow")+r.getPropertyValue("overflow-y")+r.getPropertyValue("overflow-x");return t.test(n)}(e)));return"fixed"!==t&&n?n:f()}(e)}hasDefinedScrollableElements(){return Boolean(0!==this.options.scrollableElements.length)}[l](e){this.findScrollableElementFrame=requestAnimationFrame((()=>{this.scrollableElement=this.getScrollableElement(e.source)}))}[u](e){if(this.findScrollableElementFrame=requestAnimationFrame((()=>{this.scrollableElement=this.getScrollableElement(e.sensorEvent.target)})),!this.scrollableElement)return;const t=e.sensorEvent,r={x:0,y:0};"ontouchstart"in window&&(r.y=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,r.x=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0),this.currentMousePosition={clientX:t.clientX-r.x,clientY:t.clientY-r.y},this.scrollAnimationFrame=requestAnimationFrame(this[d])}[c](){cancelAnimationFrame(this.scrollAnimationFrame),cancelAnimationFrame(this.findScrollableElementFrame),this.scrollableElement=null,this.scrollAnimationFrame=null,this.findScrollableElementFrame=null,this.currentMousePosition=null}[d](){if(!this.scrollableElement||!this.currentMousePosition)return;cancelAnimationFrame(this.scrollAnimationFrame);const{speed:e,sensitivity:t}=this.options,r=this.scrollableElement.getBoundingClientRect(),n=r.bottom>window.innerHeight,o=r.top<0||n,s=f(),i=this.scrollableElement,a=this.currentMousePosition.clientX,l=this.currentMousePosition.clientY;if(i===document.body||i===document.documentElement||o){const{innerHeight:r,innerWidth:n}=window;l<t?s.scrollTop-=e:r-l<t&&(s.scrollTop+=e),a<t?s.scrollLeft-=e:n-a<t&&(s.scrollLeft+=e)}else{const{offsetHeight:n,offsetWidth:o}=i;r.top+n-l<t?i.scrollTop+=e:l-r.top<t&&(i.scrollTop-=e),r.left+o-a<t?i.scrollLeft+=e:a-r.left<t&&(i.scrollLeft-=e)}this.scrollAnimationFrame=requestAnimationFrame(this[d])}}function f(){return document.scrollingElement||document.documentElement}t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=void 0;var n,o=r(58),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default,t.defaultOptions=o.defaultOptions},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MirrorDestroyEvent=t.MirrorMoveEvent=t.MirrorAttachedEvent=t.MirrorCreatedEvent=t.MirrorCreateEvent=t.MirrorEvent=void 0;var n,o=r(1),s=(n=o)&&n.__esModule?n:{default:n};class i extends s.default{get source(){return this.data.source}get originalSource(){return this.data.originalSource}get sourceContainer(){return this.data.sourceContainer}get sensorEvent(){return this.data.sensorEvent}get dragEvent(){return this.data.dragEvent}get originalEvent(){return this.sensorEvent?this.sensorEvent.originalEvent:null}}t.MirrorEvent=i;class a extends i{}t.MirrorCreateEvent=a,a.type="mirror:create";class l extends i{get mirror(){return this.data.mirror}}t.MirrorCreatedEvent=l,l.type="mirror:created";class u extends i{get mirror(){return this.data.mirror}}t.MirrorAttachedEvent=u,u.type="mirror:attached";class c extends i{get mirror(){return this.data.mirror}get passedThreshX(){return this.data.passedThreshX}get passedThreshY(){return this.data.passedThreshY}}t.MirrorMoveEvent=c,c.type="mirror:move",c.cancelable=!0;class d extends i{get mirror(){return this.data.mirror}}t.MirrorDestroyEvent=d,d.type="mirror:destroy",d.cancelable=!0},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(60);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=t.getAppendableContainer=t.onScroll=t.onMirrorMove=t.onMirrorCreated=t.onDragStop=t.onDragMove=t.onDragStart=void 0;var n,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(0),i=(n=s)&&n.__esModule?n:{default:n},a=r(61);function l(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}const u=t.onDragStart=Symbol("onDragStart"),c=t.onDragMove=Symbol("onDragMove"),d=t.onDragStop=Symbol("onDragStop"),h=t.onMirrorCreated=Symbol("onMirrorCreated"),g=t.onMirrorMove=Symbol("onMirrorMove"),f=t.onScroll=Symbol("onScroll"),p=t.getAppendableContainer=Symbol("getAppendableContainer"),v=t.defaultOptions={constrainDimensions:!1,xAxis:!0,yAxis:!0,cursorOffsetX:null,cursorOffsetY:null,thresholdX:null,thresholdY:null};class m extends i.default{constructor(e){super(e),this.options=o({},v,this.getOptions()),this.scrollOffset={x:0,y:0},this.initialScrollOffset={x:window.scrollX,y:window.scrollY},this[u]=this[u].bind(this),this[c]=this[c].bind(this),this[d]=this[d].bind(this),this[h]=this[h].bind(this),this[g]=this[g].bind(this),this[f]=this[f].bind(this)}attach(){this.draggable.on("drag:start",this[u]).on("drag:move",this[c]).on("drag:stop",this[d]).on("mirror:created",this[h]).on("mirror:move",this[g])}detach(){this.draggable.off("drag:start",this[u]).off("drag:move",this[c]).off("drag:stop",this[d]).off("mirror:created",this[h]).off("mirror:move",this[g])}getOptions(){return this.draggable.options.mirror||{}}[u](e){if(e.canceled())return;"ontouchstart"in window&&document.addEventListener("scroll",this[f],!0),this.initialScrollOffset={x:window.scrollX,y:window.scrollY};const{source:t,originalSource:r,sourceContainer:n,sensorEvent:o}=e;this.lastMirrorMovedClient={x:o.clientX,y:o.clientY};const s=new a.MirrorCreateEvent({source:t,originalSource:r,sourceContainer:n,sensorEvent:o,dragEvent:e});if(this.draggable.trigger(s),function(e){return/^drag/.test(e.originalEvent.type)}(o)||s.canceled())return;const i=this[p](t)||n;this.mirror=t.cloneNode(!0);const l=new a.MirrorCreatedEvent({source:t,originalSource:r,sourceContainer:n,sensorEvent:o,dragEvent:e,mirror:this.mirror}),u=new a.MirrorAttachedEvent({source:t,originalSource:r,sourceContainer:n,sensorEvent:o,dragEvent:e,mirror:this.mirror});this.draggable.trigger(l),i.appendChild(this.mirror),this.draggable.trigger(u)}[c](e){if(!this.mirror||e.canceled())return;const{source:t,originalSource:r,sourceContainer:n,sensorEvent:o}=e;let s=!0,i=!0;if(this.options.thresholdX||this.options.thresholdY){const{x:e,y:t}=this.lastMirrorMovedClient;if(Math.abs(e-o.clientX)<this.options.thresholdX?s=!1:this.lastMirrorMovedClient.x=o.clientX,Math.abs(t-o.clientY)<this.options.thresholdY?i=!1:this.lastMirrorMovedClient.y=o.clientY,!s&&!i)return}const l=new a.MirrorMoveEvent({source:t,originalSource:r,sourceContainer:n,sensorEvent:o,dragEvent:e,mirror:this.mirror,passedThreshX:s,passedThreshY:i});this.draggable.trigger(l)}[d](e){if("ontouchstart"in window&&document.removeEventListener("scroll",this[f],!0),this.initialScrollOffset={x:0,y:0},this.scrollOffset={x:0,y:0},!this.mirror)return;const{source:t,sourceContainer:r,sensorEvent:n}=e,o=new a.MirrorDestroyEvent({source:t,mirror:this.mirror,sourceContainer:r,sensorEvent:n,dragEvent:e});this.draggable.trigger(o),o.canceled()||this.mirror.parentNode.removeChild(this.mirror)}[f](){this.scrollOffset={x:window.scrollX-this.initialScrollOffset.x,y:window.scrollY-this.initialScrollOffset.y}}[h]({mirror:e,source:t,sensorEvent:r}){const n=this.draggable.getClassNamesFor("mirror");e.style.display="none";const s={mirror:e,source:t,sensorEvent:r,mirrorClasses:n,scrollOffset:this.scrollOffset,options:this.options,passedThreshX:!0,passedThreshY:!0};return Promise.resolve(s).then(b).then(y).then(E).then(S).then(_({initial:!0})).then(O).then((e=>{let{mirrorOffset:t,initialX:r,initialY:n}=e,s=l(e,["mirrorOffset","initialX","initialY"]);return this.mirrorOffset=t,this.initialX=r,this.initialY=n,this.lastMovedX=r,this.lastMovedY=n,o({mirrorOffset:t,initialX:r,initialY:n},s)}))}[g](e){if(e.canceled())return null;const t={mirror:e.mirror,sensorEvent:e.sensorEvent,mirrorOffset:this.mirrorOffset,options:this.options,initialX:this.initialX,initialY:this.initialY,scrollOffset:this.scrollOffset,passedThreshX:e.passedThreshX,passedThreshY:e.passedThreshY,lastMovedX:this.lastMovedX,lastMovedY:this.lastMovedY};return Promise.resolve(t).then(_({raf:!0})).then((e=>{let{lastMovedX:t,lastMovedY:r}=e,n=l(e,["lastMovedX","lastMovedY"]);return this.lastMovedX=t,this.lastMovedY=r,o({lastMovedX:t,lastMovedY:r},n)}))}[p](e){const t=this.options.appendTo;return"string"==typeof t?document.querySelector(t):t instanceof HTMLElement?t:"function"==typeof t?t(e):e.parentNode}}function b(e){let{source:t}=e,r=l(e,["source"]);return C((e=>{const n=t.getBoundingClientRect();e(o({source:t,sourceRect:n},r))}))}function y(e){let{sensorEvent:t,sourceRect:r,options:n}=e,s=l(e,["sensorEvent","sourceRect","options"]);return C((e=>{const i=null===n.cursorOffsetY?t.clientY-r.top:n.cursorOffsetY,a=null===n.cursorOffsetX?t.clientX-r.left:n.cursorOffsetX;e(o({sensorEvent:t,sourceRect:r,mirrorOffset:{top:i,left:a},options:n},s))}))}function E(e){let{mirror:t,source:r,options:n}=e,s=l(e,["mirror","source","options"]);return C((e=>{let i,a;if(n.constrainDimensions){const e=getComputedStyle(r);i=e.getPropertyValue("height"),a=e.getPropertyValue("width")}t.style.display=null,t.style.position="fixed",t.style.pointerEvents="none",t.style.top=0,t.style.left=0,t.style.margin=0,n.constrainDimensions&&(t.style.height=i,t.style.width=a),e(o({mirror:t,source:r,options:n},s))}))}function S(e){let{mirror:t,mirrorClasses:r}=e,n=l(e,["mirror","mirrorClasses"]);return C((e=>{t.classList.add(...r),e(o({mirror:t,mirrorClasses:r},n))}))}function O(e){let{mirror:t}=e,r=l(e,["mirror"]);return C((e=>{t.removeAttribute("id"),delete t.id,e(o({mirror:t},r))}))}function _({withFrame:e=!1,initial:t=!1}={}){return r=>{let{mirror:n,sensorEvent:s,mirrorOffset:i,initialY:a,initialX:u,scrollOffset:c,options:d,passedThreshX:h,passedThreshY:g,lastMovedX:f,lastMovedY:p}=r,v=l(r,["mirror","sensorEvent","mirrorOffset","initialY","initialX","scrollOffset","options","passedThreshX","passedThreshY","lastMovedX","lastMovedY"]);return C((e=>{const r=o({mirror:n,sensorEvent:s,mirrorOffset:i,options:d},v);if(i){const e=h?Math.round((s.clientX-i.left-c.x)/(d.thresholdX||1))*(d.thresholdX||1):Math.round(f),o=g?Math.round((s.clientY-i.top-c.y)/(d.thresholdY||1))*(d.thresholdY||1):Math.round(p);d.xAxis&&d.yAxis||t?n.style.transform=`translate3d(${e}px, ${o}px, 0)`:d.xAxis&&!d.yAxis?n.style.transform=`translate3d(${e}px, ${a}px, 0)`:d.yAxis&&!d.xAxis&&(n.style.transform=`translate3d(${u}px, ${o}px, 0)`),t&&(r.initialX=e,r.initialY=o),r.lastMovedX=e,r.lastMovedY=o}e(r)}),{frame:e})}}function C(e,{raf:t=!1}={}){return new Promise(((r,n)=>{t?requestAnimationFrame((()=>{e(r,n)})):e(r,n)}))}t.default=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=void 0;var n,o=r(62),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default,t.defaultOptions=o.defaultOptions},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(0),i=(n=s)&&n.__esModule?n:{default:n};const a=Symbol("onInitialize"),l=Symbol("onDestroy"),u={};class c extends i.default{constructor(e){super(e),this.options=o({},u,this.getOptions()),this[a]=this[a].bind(this),this[l]=this[l].bind(this)}attach(){this.draggable.on("draggable:initialize",this[a]).on("draggable:destroy",this[l])}detach(){this.draggable.off("draggable:initialize",this[a]).off("draggable:destroy",this[l]),this[l]()}getOptions(){return this.draggable.options.focusable||{}}getElements(){return[...this.draggable.containers,...this.draggable.getDraggableElements()]}[a](){requestAnimationFrame((()=>{this.getElements().forEach((e=>function(e){Boolean(!e.getAttribute("tabindex")&&-1===e.tabIndex)&&(d.push(e),e.tabIndex=0)}(e)))}))}[l](){requestAnimationFrame((()=>{this.getElements().forEach((e=>function(e){const t=d.indexOf(e);-1!==t&&(e.tabIndex=-1,d.splice(t,1))}(e)))}))}}t.default=c;const d=[]},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(64),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e){this.draggable=e}attach(){throw new Error("Not Implemented")}detach(){throw new Error("Not Implemented")}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=void 0;var n,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(0),i=(n=s)&&n.__esModule?n:{default:n};const a=Symbol("onInitialize"),l=Symbol("onDestroy"),u=Symbol("announceEvent"),c=Symbol("announceMessage"),d=t.defaultOptions={expire:7e3};class h extends i.default{constructor(e){super(e),this.options=o({},d,this.getOptions()),this.originalTriggerMethod=this.draggable.trigger,this[a]=this[a].bind(this),this[l]=this[l].bind(this)}attach(){this.draggable.on("draggable:initialize",this[a])}detach(){this.draggable.off("draggable:destroy",this[l])}getOptions(){return this.draggable.options.announcements||{}}[u](e){const t=this.options[e.type];t&&"string"==typeof t&&this[c](t),t&&"function"==typeof t&&this[c](t(e))}[c](e){!function(e,{expire:t}){const r=document.createElement("div");r.textContent=e,g.appendChild(r),setTimeout((()=>{g.removeChild(r)}),t)}(e,{expire:this.options.expire})}[a](){this.draggable.trigger=e=>{try{this[u](e)}finally{this.originalTriggerMethod.call(this.draggable,e)}}}[l](){this.draggable.trigger=this.originalTriggerMethod}}t.default=h;const g=function(){const e=document.createElement("div");return e.setAttribute("id","draggable-live-region"),e.setAttribute("aria-relevant","additions"),e.setAttribute("aria-atomic","true"),e.setAttribute("aria-live","assertive"),e.setAttribute("role","log"),e.style.position="fixed",e.style.width="1px",e.style.height="1px",e.style.top="-1px",e.style.overflow="hidden",e}();document.addEventListener("DOMContentLoaded",(()=>{document.body.appendChild(g)}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=void 0;var n,o=r(67),s=(n=o)&&n.__esModule?n:{default:n};t.default=s.default,t.defaultOptions=o.defaultOptions},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DraggableDestroyEvent=t.DraggableInitializedEvent=t.DraggableEvent=void 0;var n,o=r(1),s=(n=o)&&n.__esModule?n:{default:n};class i extends s.default{get draggable(){return this.data.draggable}}t.DraggableEvent=i,i.type="draggable";class a extends i{}t.DraggableInitializedEvent=a,a.type="draggable:initialize";class l extends i{}t.DraggableDestroyEvent=l,l.type="draggable:destroy"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};const o=Symbol("canceled");class s{constructor(e){this[o]=!1,this.data=e}get type(){return this.constructor.type}get cancelable(){return this.constructor.cancelable}cancel(){this[o]=!0}canceled(){return Boolean(this[o])}clone(e){return new this.constructor(n({},this.data,e))}}t.default=s,s.type="event",s.cancelable=!1},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DragStoppedEvent=t.DragStopEvent=t.DragPressureEvent=t.DragOutContainerEvent=t.DragOverContainerEvent=t.DragOutEvent=t.DragOverEvent=t.DragMoveEvent=t.DragStartEvent=t.DragEvent=void 0;var n,o=r(1),s=(n=o)&&n.__esModule?n:{default:n};class i extends s.default{get source(){return this.data.source}get originalSource(){return this.data.originalSource}get mirror(){return this.data.mirror}get sourceContainer(){return this.data.sourceContainer}get sensorEvent(){return this.data.sensorEvent}get originalEvent(){return this.sensorEvent?this.sensorEvent.originalEvent:null}}t.DragEvent=i,i.type="drag";class a extends i{}t.DragStartEvent=a,a.type="drag:start",a.cancelable=!0;class l extends i{}t.DragMoveEvent=l,l.type="drag:move";class u extends i{get overContainer(){return this.data.overContainer}get over(){return this.data.over}}t.DragOverEvent=u,u.type="drag:over",u.cancelable=!0;class c extends i{get overContainer(){return this.data.overContainer}get over(){return this.data.over}}t.DragOutEvent=c,c.type="drag:out";class d extends i{get overContainer(){return this.data.overContainer}}t.DragOverContainerEvent=d,d.type="drag:over:container";class h extends i{get overContainer(){return this.data.overContainer}}t.DragOutContainerEvent=h,h.type="drag:out:container";class g extends i{get pressure(){return this.data.pressure}}t.DragPressureEvent=g,g.type="drag:pressure";class f extends i{}t.DragStopEvent=f,f.type="drag:stop";class p extends i{}t.DragStoppedEvent=p,p.type="drag:stopped"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Plugins=t.Sensors=t.Sortable=t.Swappable=t.Droppable=t.Draggable=t.BasePlugin=t.BaseEvent=void 0;var n=r(5);Object.defineProperty(t,"Draggable",{enumerable:!0,get:function(){return h(n).default}});var o=r(36);Object.defineProperty(t,"Droppable",{enumerable:!0,get:function(){return h(o).default}});var s=r(33);Object.defineProperty(t,"Swappable",{enumerable:!0,get:function(){return h(s).default}});var i=r(30);Object.defineProperty(t,"Sortable",{enumerable:!0,get:function(){return h(i).default}});var a=h(r(1)),l=h(r(0)),u=d(r(6)),c=d(r(27));function d(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function h(e){return e&&e.__esModule?e:{default:e}}t.BaseEvent=a.default,t.BasePlugin=l.default,t.Sensors=u,t.Plugins=c}])},e.exports=t()}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}window.Draggable=r(4320)})();