/* interact.js 1.7.1 | https://raw.github.com/taye/interact.js/master/LICENSE */ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).interact=e()}}(function(){function e(t){var n;return function(e){return n||t(n={exports:{},parent:e},n.exports),n.exports}}var b=e(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scope=t.ActionName=void 0;var n=f(T),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==p(e)&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(dt),i=f(zt),a=f(Rt),u=f(Bt),l=f(pn),s=f(In),r=f(E({}));function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function f(e){return e&&e.__esModule?e:{default:e}}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function v(e,t,n){return(v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;nthis.pointerMoveTolerance);var a={pointer:e,pointerIndex:this.getPointerIndex(e),event:t,type:"move",eventTarget:n,dx:r,dy:o,duplicate:i,interaction:this};i||(p.pointer.setCoordDeltas(this.coords.delta,this.coords.prev,this.coords.cur),p.pointer.setCoordVelocity(this.coords.velocity,this.coords.delta)),this._scopeFire("interactions:move",a),i||(this.interacting()&&(a.type=null,this.move(a)),this.pointerWasMoved&&p.pointer.copyCoords(this.coords.prev,this.coords.cur))}},{key:"move",value:function(e){(e=p.extend({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},e||{})).phase=i.EventPhase.Move,this._doPhase(e)}},{key:"pointerUp",value:function(e,t,n,r){var o=this.getPointerIndex(e);-1===o&&(o=this.updatePointer(e,t,n,!1));var i=/cancel$/i.test(t.type)?"cancel":"up";this._scopeFire("interactions:".concat(i),{pointer:e,pointerIndex:o,event:t,eventTarget:n,type:i,curEventTarget:r,interaction:this}),this.simulation||this.end(t),this.pointerIsDown=!1,this.removePointer(e,t)}},{key:"documentBlur",value:function(e){this.end(e),this._scopeFire("interactions:blur",{event:e,type:"blur",interaction:this})}},{key:"end",value:function(e){var t;this._ending=!0,e=e||this._latestPointer.event,this.interacting()&&(t=this._doPhase({event:e,interaction:this,phase:i.EventPhase.End})),!(this._ending=!1)===t&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(e){var t=p.pointer.getPointerId(e);return"mouse"===this.pointerType||"pen"===this.pointerType?this.pointers.length-1:p.arr.findIndex(this.pointers,function(e){return e.id===t})}},{key:"getPointerInfo",value:function(e){return this.pointers[this.getPointerIndex(e)]}},{key:"updatePointer",value:function(e,t,n,r){var o=p.pointer.getPointerId(e),i=this.getPointerIndex(e),a=this.pointers[i];return r=!1!==r&&(r||/(down|start)$/i.test(t.type)),a?a.pointer=e:(a=new u.default(o,e,t,null,null),i=this.pointers.length,this.pointers.push(a)),r&&(this.pointerIsDown=!0,this.interacting()||(p.pointer.setCoords(this.coords.start,this.pointers.map(function(e){return e.pointer}),this._now()),p.pointer.copyCoords(this.coords.cur,this.coords.start),p.pointer.copyCoords(this.coords.prev,this.coords.start),p.pointer.pointerExtend(this.downPointer,e),this.downEvent=t,a.downTime=this.coords.cur.timeStamp,a.downTarget=n,this.pointerWasMoved=!1)),this._updateLatestPointer(e,t,n),this._scopeFire("interactions:update-pointer",{pointer:e,event:t,eventTarget:n,down:r,pointerInfo:a,pointerIndex:i,interaction:this}),i}},{key:"removePointer",value:function(e,t){var n=this.getPointerIndex(e);if(-1!==n){var r=this.pointers[n];this._scopeFire("interactions:remove-pointer",{pointer:e,event:t,eventTarget:null,pointerIndex:n,pointerInfo:r,interaction:this}),this.pointers.splice(n,1)}}},{key:"_updateLatestPointer",value:function(e,t,n){this._latestPointer.pointer=e,this._latestPointer.event=t,this._latestPointer.eventTarget=n}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(e,t,n,r){var o=this.prepared.name;return new i.default(this,e,o,t,this.element,null,n,r)}},{key:"_fireEvent",value:function(e){this.interactable.fire(e),(!this.prevEvent||e.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=e)}},{key:"_doPhase",value:function(e){var t=e.event,n=e.phase,r=e.preEnd,o=e.type;if(!1===this._scopeFire("interactions:before-action-".concat(n),e))return!1;var i=e.iEvent=this._createPreparedEvent(t,n,r,o),a=this.rect;if(a){var u=this.edges||this.prepared.edges||{left:!0,right:!0,top:!0,bottom:!0};u.top&&(a.top+=i.delta.y),u.bottom&&(a.bottom+=i.delta.y),u.left&&(a.left+=i.delta.x),u.right&&(a.right+=i.delta.x),a.width=a.right-a.left,a.height=a.bottom-a.top}return this._scopeFire("interactions:action-".concat(n),e),this._fireEvent(i),this._scopeFire("interactions:after-action-".concat(n),e),!0}},{key:"_now",value:function(){return Date.now()}}]),s}(),h=t.Interaction=m;t.default=h}),T={};Object.defineProperty(T,"__esModule",{value:!0}),T.default=void 0;var n={init:function(e){var t=e;n.document=t.document,n.DocumentFragment=t.DocumentFragment||r,n.SVGElement=t.SVGElement||r,n.SVGSVGElement=t.SVGSVGElement||r,n.SVGElementInstance=t.SVGElementInstance||r,n.Element=t.Element||r,n.HTMLElement=t.HTMLElement||n.Element,n.Event=t.Event,n.Touch=t.Touch||r,n.PointerEvent=t.PointerEvent||t.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function r(){}var t=n;T.default=t;var u={};function o(e,t){for(var n=0;na.left&&c.xa.top&&c.y=a.left&&v<=a.right&&y>=a.top&&y<=a.bottom}if(d&&Dr.is.number(l)){var g=Math.max(0,Math.min(a.right,d.right)-Math.max(a.left,d.left))*Math.max(0,Math.min(a.bottom,d.bottom)-Math.max(a.top,d.top))/(d.width*d.height);u=l<=g}e.options.drop.checker&&(u=e.options.drop.checker(t,n,u,e,i,r,o));return u}(this,e,t,n,r,o,i)},n.dynamicDrop=function(e){return Dr.is.bool(e)?(t.dynamicDrop=e,n):t.dynamicDrop},Dr.arr.merge(e.eventTypes,["dragenter","dragleave","dropactivate","dropdeactivate","dropmove","drop"]),e.methodDict.drop="dropzone",t.dynamicDrop=!1,o.actions.drop=Lr.defaults},listeners:{"interactions:before-action-start":function(e){var t=e.interaction;"drag"===t.prepared.name&&(t.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:null})},"interactions:after-action-start":function(e,t){var n=e.interaction,r=(e.event,e.iEvent);if("drag"===n.prepared.name){var o=n.dropState;o.activeDrops=null,o.events=null,o.activeDrops=Wr(t,n.element),o.events=Yr(n,0,r),o.events.activate&&Rr(o.activeDrops,o.events.activate)}},"interactions:action-move":Nr,"interactions:action-end":Nr,"interactions:after-action-move":function(e){var t=e.interaction;"drag"===t.prepared.name&&(Fr(t,t.dropState.events),t.dropState.events={})},"interactions:after-action-end":function(e){var t=e.interaction;"drag"===t.prepared.name&&Fr(t,t.dropState.events)},"interactions:stop":function(e){var t=e.interaction;if("drag"===t.prepared.name){var n=t.dropState;n&&(n.activeDrops=null,n.events=null,n.cur.dropzone=null,n.cur.element=null,n.prev.dropzone=null,n.prev.element=null,n.rejected=!1)}}},getActiveDrops:Wr,getDrop:Xr,getDropEvents:Yr,fireDropEvents:Fr,defaults:{enabled:!1,accept:null,overlap:"pointer"}},Vr=Lr;Tr.default=Vr;var qr={};function Gr(e){return(Gr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(qr,"__esModule",{value:!0}),qr.default=void 0;var Ur,Br=(Ur=In)&&Ur.__esModule?Ur:{default:Ur},Hr=b({}),Kr=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==Gr(e)&&"function"!=typeof e)return{default:e};var t=$r();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(dt);function $r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return $r=function(){return e},e}Hr.ActionName.Gesture="gesture";var Qr={id:"actions/gesture",install:function(e){var t=e.actions,n=e.Interactable,r=e.defaults;n.prototype.gesturable=function(e){return Kr.is.object(e)?(this.options.gesture.enabled=!1!==e.enabled,this.setPerAction("gesture",e),this.setOnEvents("gesture",e),this):Kr.is.bool(e)?(this.options.gesture.enabled=e,this):this.options.gesture},t[Hr.ActionName.Gesture]=Qr,t.names.push(Hr.ActionName.Gesture),Kr.arr.merge(t.eventTypes,["gesturestart","gesturemove","gestureend"]),t.methodDict.gesture="gesturable",r.actions.gesture=Qr.defaults},listeners:{"interactions:action-start":Jr,"interactions:action-move":Jr,"interactions:action-end":Jr,"interactions:new":function(e){e.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}}},defaults:{},checker:function(e,t,n,r,o){return 2<=o.pointers.length?{name:"gesture"}:null},getCursor:function(){return""}};function Jr(e){var t=e.interaction,n=e.iEvent,r=e.event,o=e.phase;if("gesture"===t.prepared.name){var i=t.pointers.map(function(e){return e.pointer}),a="start"===o,u="end"===o,l=t.interactable.options.deltaSource;if(n.touches=[i[0],i[1]],a)n.distance=Kr.pointer.touchDistance(i,l),n.box=Kr.pointer.touchBBox(i),n.scale=1,n.ds=0,n.angle=Kr.pointer.touchAngle(i,l),n.da=0,t.gesture.startDistance=n.distance,t.gesture.startAngle=n.angle;else if(u||r instanceof Br.default){var s=t.prevEvent;n.distance=s.distance,n.box=s.box,n.scale=s.scale,n.ds=0,n.angle=s.angle,n.da=0}else n.distance=Kr.pointer.touchDistance(i,l),n.box=Kr.pointer.touchBBox(i),n.scale=n.distance/t.gesture.startDistance,n.angle=Kr.pointer.touchAngle(i,l),n.ds=n.scale-t.gesture.scale,n.da=n.angle-t.gesture.angle;t.gesture.distance=n.distance,t.gesture.angle=n.angle,Kr.is.number(n.scale)&&n.scale!==1/0&&!isNaN(n.scale)&&(t.gesture.scale=n.scale)}}var Zr=Qr;qr.default=Zr;var eo={};function to(e){return(to="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(eo,"__esModule",{value:!0}),eo.default=void 0;var no,ro=b({}),oo=so(u),io=so(C),ao=(no=Fe)&&no.__esModule?no:{default:no},uo=so(y);function lo(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return lo=function(){return e},e}function so(e){if(e&&e.__esModule)return e;if(null===e||"object"!==to(e)&&"function"!=typeof e)return{default:e};var t=lo();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}var co={id:"actions/resize",install:function(t){var e=t.actions,n=t.browser,r=t.Interactable,o=t.defaults;co.cursors=function(e){return e.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(n),co.defaultMargin=n.supportsTouch||n.supportsPointerEvent?20:10,r.prototype.resizable=function(e){return function(e,t,n){if(uo.object(t))return e.options.resize.enabled=!1!==t.enabled,e.setPerAction("resize",t),e.setOnEvents("resize",t),uo.string(t.axis)&&/^x$|^y$|^xy$/.test(t.axis)?e.options.resize.axis=t.axis:null===t.axis&&(e.options.resize.axis=n.defaults.actions.resize.axis),uo.bool(t.preserveAspectRatio)?e.options.resize.preserveAspectRatio=t.preserveAspectRatio:uo.bool(t.square)&&(e.options.resize.square=t.square),e;if(uo.bool(t))return e.options.resize.enabled=t,e;return e.options.resize}(this,e,t)},e[ro.ActionName.Resize]=co,e.names.push(ro.ActionName.Resize),oo.merge(e.eventTypes,["resizestart","resizemove","resizeinertiastart","resizeresume","resizeend"]),e.methodDict.resize="resizable",o.actions.resize=co.defaults},listeners:{"interactions:new":function(e){e.interaction.resizeAxes="xy"},"interactions:action-start":function(e){!function(e){var t=e.iEvent,n=e.interaction;if("resize"!==n.prepared.name||!n.prepared.edges)return;var r=(0,ao.default)({},n.rect),o=n.interactable.options.resize;if(o.square||o.preserveAspectRatio){var i=(0,ao.default)({},n.prepared.edges);i.top=i.top||i.left&&!i.bottom,i.left=i.left||i.top&&!i.right,i.bottom=i.bottom||i.right&&!i.top,i.right=i.right||i.bottom&&!i.left,n.prepared._linkedEdges=i}else n.prepared._linkedEdges=null;o.preserveAspectRatio&&(n.resizeStartAspectRatio=r.width/r.height);n.resizeRects={start:r,current:{left:r.left,right:r.right,top:r.top,bottom:r.bottom},inverted:(0,ao.default)({},r),previous:(0,ao.default)({},r),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},t.edges=n.prepared.edges,t.rect=n.resizeRects.inverted,t.deltaRect=n.resizeRects.delta}(e),po(e)},"interactions:action-move":function(e){!function(e){var t=e.iEvent,n=e.interaction;if("resize"!==n.prepared.name||!n.prepared.edges)return;var r=n.interactable.options.resize,o=r.invert,i="reposition"===o||"negate"===o,a=n.prepared.edges,u=n.resizeRects.start,l=n.resizeRects.current,s=n.resizeRects.inverted,c=n.resizeRects.delta,f=(0,ao.default)(n.resizeRects.previous,s),p=a,d=(0,ao.default)({},t.delta);if(r.preserveAspectRatio||r.square){var v=r.preserveAspectRatio?n.resizeStartAspectRatio:1;a=n.prepared._linkedEdges,p.left&&p.bottom||p.right&&p.top?d.y=-d.x/v:p.left||p.right?d.y=d.x/v:(p.top||p.bottom)&&(d.x=d.y*v)}a.top&&(l.top+=d.y);a.bottom&&(l.bottom+=d.y);a.left&&(l.left+=d.x);a.right&&(l.right+=d.x);if(i){var y;if((0,ao.default)(s,l),"reposition"===o)s.top>s.bottom&&(y=s.top,s.top=s.bottom,s.bottom=y),s.left>s.right&&(y=s.left,s.left=s.right,s.right=y)}else s.top=Math.min(l.top,u.bottom),s.bottom=Math.max(l.bottom,u.top),s.left=Math.min(l.left,u.right),s.right=Math.max(l.right,u.left);for(var g in s.width=s.right-s.left,s.height=s.bottom-s.top,s)c[g]=s[g]-f[g];t.edges=n.prepared.edges,t.rect=s,t.deltaRect=c}(e),po(e)},"interactions:action-end":function(e){var t=e.iEvent,n=e.interaction;if("resize"!==n.prepared.name||!n.prepared.edges)return;t.edges=n.prepared.edges,t.rect=n.resizeRects.inverted,t.deltaRect=n.resizeRects.delta}},defaults:{square:!(ro.ActionName.Resize="resize"),preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},checker:function(e,t,n,r,o,i){if(!i)return null;var a=(0,ao.default)({},o.coords.cur.page),u=n.options;if(u.resize.enabled){var l=u.resize,s={left:!1,right:!1,top:!1,bottom:!1};if(uo.object(l.edges)){for(var c in s)s[c]=fo(c,l.edges[c],a,o._latestPointer.eventTarget,r,i,l.margin||this.defaultMargin);if(s.left=s.left&&!s.right,s.top=s.top&&!s.bottom,s.left||s.right||s.top||s.bottom)return{name:"resize",edges:s}}else{var f="y"!==u.resize.axis&&a.x>i.right-this.defaultMargin,p="x"!==u.resize.axis&&a.y>i.bottom-this.defaultMargin;if(f||p)return{name:"resize",axes:(f?"x":"")+(p?"y":"")}}}return null},cursors:null,getCursor:function(e){var t=e.edges,n=e.axis,r=e.name,o=co.cursors,i=null;if(n)i=o[r+n];else if(t){for(var a="",u=["top","bottom","left","right"],l=0;l(0<=u?i.right:i.left)-a;if("bottom"===e)return n.y>(0<=l?i.bottom:i.top)-a}return!!uo.element(r)&&(uo.element(t)?t===r:io.matchesUpTo(r,t,o))}function po(e){var t=e.iEvent,n=e.interaction;n.prepared.name===ro.ActionName.Resize&&n.resizeAxes&&(n.interactable.options.resize.square?("y"===n.resizeAxes?t.delta.x=t.delta.y:t.delta.y=t.delta.x,t.axes="xy"):(t.axes=n.resizeAxes,"x"===n.resizeAxes?t.delta.y=0:"y"===n.resizeAxes&&(t.delta.x=0)))}var vo=co;eo.default=vo;var yo={};Object.defineProperty(yo,"__esModule",{value:!0}),yo.install=function(e){e.usePlugin(ho.default),e.usePlugin(bo.default),e.usePlugin(go.default),e.usePlugin(mo.default)},Object.defineProperty(yo,"drag",{enumerable:!0,get:function(){return go.default}}),Object.defineProperty(yo,"drop",{enumerable:!0,get:function(){return mo.default}}),Object.defineProperty(yo,"gesture",{enumerable:!0,get:function(){return ho.default}}),Object.defineProperty(yo,"resize",{enumerable:!0,get:function(){return bo.default}}),yo.id=void 0;var go=wo(ir),mo=wo(Tr),ho=wo(qr),bo=wo(eo);function wo(e){return e&&e.__esModule?e:{default:e}}yo.id="actions";var Oo={};function Po(e){return(Po="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.getContainer=ko,Oo.getScroll=Do,Oo.getScrollSize=function(e){So.window(e)&&(e=window.document.body);return{x:e.scrollWidth,y:e.scrollHeight}},Oo.getScrollSizeDelta=function(e,t){var n=e.interaction,r=e.element,o=n&&n.interactable.options[n.prepared.name].autoScroll;if(!o||!o.enabled)return t(),{x:0,y:0};var i=ko(o.container,n.interactable,r),a=Do(i);t();var u=Do(i);return{x:u.x-a.x,y:u.y-a.y}},Oo.default=void 0;var _o,xo=Eo(C),So=Eo(y),jo=(_o=lt)&&_o.__esModule?_o:{default:_o};function Mo(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return Mo=function(){return e},e}function Eo(e){if(e&&e.__esModule)return e;if(null===e||"object"!==Po(e)&&"function"!=typeof e)return{default:e};var t=Mo();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}var To={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:null,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(e){To.isScrolling=!0,jo.default.cancel(To.i),(e.autoScroll=To).interaction=e,To.prevTime=To.now(),To.i=jo.default.request(To.scroll)},stop:function(){To.isScrolling=!1,To.interaction&&(To.interaction.autoScroll=null),jo.default.cancel(To.i)},scroll:function(){var e=To.interaction,t=e.interactable,n=e.element,r=t.options[To.interaction.prepared.name].autoScroll,o=ko(r.container,t,n),i=To.now(),a=(i-To.prevTime)/1e3,u=r.speed*a;if(1<=u){var l={x:To.x*u,y:To.y*u};if(l.x||l.y){var s=Do(o);So.window(o)?o.scrollBy(l.x,l.y):o&&(o.scrollLeft+=l.x,o.scrollTop+=l.y);var c=Do(o),f={x:c.x-s.x,y:c.y-s.y};(f.x||f.y)&&t.fire({type:"autoscroll",target:n,interactable:t,delta:f,interaction:e,container:o})}To.prevTime=i}To.isScrolling&&(jo.default.cancel(To.i),To.i=jo.default.request(To.scroll))},check:function(e,t){var n=e.options;return n[t].autoScroll&&n[t].autoScroll.enabled},onInteractionMove:function(e){var t=e.interaction,n=e.pointer;if(t.interacting()&&To.check(t.interactable,t.prepared.name))if(t.simulation)To.x=To.y=0;else{var r,o,i,a,u=t.interactable,l=t.element,s=u.options[t.prepared.name].autoScroll,c=ko(s.container,u,l);if(So.window(c))a=n.clientXc.innerWidth-To.margin,i=n.clientY>c.innerHeight-To.margin;else{var f=xo.getElementClientRect(c);a=n.clientXf.right-To.margin,i=n.clientY>f.bottom-To.margin}To.x=o?1:a?-1:0,To.y=i?1:r?-1:0,To.isScrolling||(To.margin=s.margin,To.speed=s.speed,To.start(t))}}};function ko(e,t,n){return(So.string(e)?(0,Ne.getStringOptionResult)(e,t,n):e)||(0,l.getWindow)(n)}function Do(e){return So.window(e)&&(e=window.document.body),{x:e.scrollLeft,y:e.scrollTop}}var Io={id:"auto-scroll",install:function(e){var t=e.defaults,n=e.actions;(e.autoScroll=To).now=function(){return e.now()},n.eventTypes.push("autoscroll"),t.perAction.autoScroll=To.defaults},listeners:{"interactions:new":function(e){e.interaction.autoScroll=null},"interactions:destroy":function(e){e.interaction.autoScroll=null,To.stop(),To.interaction&&(To.interaction=null)},"interactions:stop":To.stop,"interactions:action-move":function(e){return To.onInteractionMove(e)}}};Oo.default=Io;var zo={};function Ao(e){return(Ao="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(zo,"__esModule",{value:!0}),zo.default=void 0;var Co=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==Ao(e)&&"function"!=typeof e)return{default:e};var t=Ro();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(y);function Ro(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return Ro=function(){return e},e}function Wo(e,t,n,r){var o=this.defaultActionChecker(e,t,n,r);return this.options.actionChecker?this.options.actionChecker(e,t,o,this,r,n):o}function Xo(e){return Co.bool(e)?(this.options.styleCursor=e,this):null===e?(delete this.options.styleCursor,this):this.options.styleCursor}function Yo(e){return Co.func(e)?(this.options.actionChecker=e,this):null===e?(delete this.options.actionChecker,this):this.options.actionChecker}var Fo={id:"auto-start/interactableMethods",install:function(e){var t=e.Interactable,o=e.actions;t.prototype.getAction=Wo,t.prototype.ignoreFrom=(0,dt.warnOnce)(function(e){return this._backCompatOption("ignoreFrom",e)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=(0,dt.warnOnce)(function(e){return this._backCompatOption("allowFrom",e)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Yo,t.prototype.styleCursor=Xo,t.prototype.defaultActionChecker=function(e,t,n,r){return function(e,t,n,r,o,i){for(var a=e.getRect(o),u=n.buttons||{0:1,1:4,3:8,4:16}[n.button],l=null,s=0;su.minSpeed&&c>u.endSpeed,v={interaction:n,interactable:n.interactable,element:n.element,rect:n.rect,pageCoords:n.coords.cur.page,states:p&&n.modifiers.states.map(function(e){return ya.extend({},e)}),preEnd:!0,prevCoords:null,requireEndOnly:null,phase:In.EventPhase.InertiaStart};return p&&!d&&(v.prevCoords=n.modifiers.result?n.modifiers.result.coords:n.prevEvent.page,v.requireEndOnly=!1,(a=va.default.setAll(v)).changed&&(f=!0)),d||f?(ya.pointer.copyCoords(i.upCoords,n.coords.cur),(0,va.setCoords)(v),n.pointers[0].pointer=i.startEvent=new t.InteractEvent(n,r,n.prepared.name,In.EventPhase.InertiaStart,n.element),(0,va.restoreCoords)(v),i.t0=l,i.active=!0,i.allowResume=u.allowResume,n.simulation=i,n.interactable.fire(i.startEvent),d?(i.vx0=n.coords.velocity.client.x,i.vy0=n.coords.velocity.client.y,i.v0=c,ba(n,i),ya.extend(v.pageCoords,n.coords.cur.page),v.pageCoords.x+=i.xe,v.pageCoords.y+=i.ye,v.prevCoords=null,v.requireEndOnly=!0,a=va.default.setAll(v),i.modifiedXe+=a.delta.x,i.modifiedYe+=a.delta.y,i.timeout=ga.default.request(function(){return wa(n)})):(i.smoothEnd=!0,i.xe=a.delta.x,i.ye=a.delta.y,i.sx=i.sy=0,i.timeout=ga.default.request(function(){return Oa(n)})),!1):null},"interactions:down":function(e,t){var n=e.interaction,r=e.event,o=e.pointer,i=e.eventTarget,a=n.inertia;if(a.active)for(var u=i;ya.is.element(u);){if(u===n.element){ga.default.cancel(a.timeout),a.active=!1,n.simulation=null,n.updatePointer(o,r,i,!0),ya.pointer.setCoords(n.coords.cur,n.pointers.map(function(e){return e.pointer}),n._now());var l={interaction:n,phase:In.EventPhase.Resume};t.fire("interactions:action-resume",l);var s=new t.InteractEvent(n,r,n.prepared.name,In.EventPhase.Resume,n.element);n._fireEvent(s),ya.pointer.copyCoords(n.coords.prev,n.coords.cur);break}u=ya.dom.parentNode(u)}},"interactions:stop":function(e){var t=e.interaction,n=t.inertia;n.active&&(ga.default.cancel(n.timeout),n.active=!1,t.simulation=null)}},before:"modifiers/base",calcInertia:ba,inertiaTick:wa,smothEndTick:Oa,updateInertiaCoords:Pa};fa.default=xa;var Sa={};function ja(e){return(ja="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.getRestrictionRect=Ia,Sa.default=void 0;var Ma=Da(Fe),Ea=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==ja(e)&&"function"!=typeof e)return{default:e};var t=ka();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(y),Ta=Da(Ne);function ka(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return ka=function(){return e},e}function Da(e){return e&&e.__esModule?e:{default:e}}function Ia(e,t,n){return Ea.func(e)?Ta.default.resolveRectLike(e,t.interactable,t.element,[n.x,n.y,t]):Ta.default.resolveRectLike(e,t.interactable,t.element)}var za={start:function(e){var t=e.rect,n=e.startOffset,r=e.state,o=e.interaction,i=e.pageCoords,a=r.options,u=a.elementRect,l=(0,Ma.default)({left:0,top:0,right:0,bottom:0},a.offset||{});if(t&&u){var s=Ia(a.restriction,o,i);if(s){var c=s.right-s.left-t.width,f=s.bottom-s.top-t.height;c<0&&(l.left+=c,l.right+=c),f<0&&(l.top+=f,l.bottom+=f)}l.left+=n.left-t.width*u.left,l.top+=n.top-t.height*u.top,l.right+=n.right-t.width*(1-u.right),l.bottom+=n.bottom-t.height*(1-u.bottom)}r.offset=l},set:function(e){var t=e.coords,n=e.interaction,r=e.state,o=r.options,i=r.offset,a=Ia(o.restriction,n,t);if(a){var u=Ta.default.xywhToTlbr(a);t.x=Math.max(Math.min(u.right-i.right,t.x),u.left+i.left),t.y=Math.max(Math.min(u.bottom-i.bottom,t.y),u.top+i.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}};Sa.default=za;var Aa={};Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.default=void 0;var Ca=Wa(Fe),Ra=Wa(Ne);function Wa(e){return e&&e.__esModule?e:{default:e}}var Xa={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Ya={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Fa(e,t){for(var n=["top","left","bottom","right"],r=0;r