react-calendar-timeline
Version:
react-calendar-timeline
1 lines • 190 kB
JavaScript
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const H=require("react/jsx-runtime"),q=require("react");function Ln(s){let i=0,a=0,u=!0;for(;s;)!s.offsetParent&&s.tagName==="BODY"&&s.scrollLeft===0&&s.scrollTop===0&&(s=document.scrollingElement||s),i+=s.offsetLeft-(u?0:s.scrollLeft)+s.clientLeft,a+=s.offsetTop-(u?0:s.scrollTop)+s.clientTop,s=s.offsetParent,u=!1;return{x:i,y:a}}function kt(s){if(s===document.body)return{scrollLeft:0,scrollTop:0};{const i=kt(s.parentNode);return{scrollLeft:s.scrollLeft+i.scrollLeft,scrollTop:s.scrollTop+i.scrollTop}}}function $t(s){if(s===document.body||!s.offsetParent)return{offsetLeft:0,offsetTop:0};{const i=$t(s.offsetParent);return{offsetLeft:s.offsetLeft+i.offsetLeft,offsetTop:s.offsetTop+i.offsetTop}}}var He=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ve(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var jt={exports:{}};jt.exports;(function(s,i){(function(a,u){s.exports=u()})(He,function(){function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function u(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?a(Object(r),!0).forEach(function(n){S(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function f(t){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(t)}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,C(n.key),n)}}function y(t,e,r){return e&&m(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function S(t,e,r){return(e=C(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function O(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&P(t,e)}function k(t){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(t)}function P(t,e){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},P(t,e)}function T(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function M(t){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var r,n=k(t);if(e){var o=k(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(l,c){if(c&&(typeof c=="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return T(l)}(this,r)}}function _(){return _=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(l,c){for(;!Object.prototype.hasOwnProperty.call(l,c)&&(l=k(l))!==null;);return l}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},_.apply(this,arguments)}function C(t){var e=function(r,n){if(typeof r!="object"||r===null)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var l=o.call(r,n);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}(t,"string");return typeof e=="symbol"?e:e+""}var j=function(t){return!(!t||!t.Window)&&t instanceof t.Window},N=void 0,G=void 0;function ee(t){N=t;var e=t.document.createTextNode("");e.ownerDocument!==t.document&&typeof t.wrap=="function"&&t.wrap(e)===e&&(t=t.wrap(t)),G=t}function re(t){return j(t)?t:(t.ownerDocument||t).defaultView||G.window}typeof window<"u"&&window&&ee(window);var ne=function(t){return!!t&&f(t)==="object"},ue=function(t){return typeof t=="function"},w={window:function(t){return t===G||j(t)},docFrag:function(t){return ne(t)&&t.nodeType===11},object:ne,func:ue,number:function(t){return typeof t=="number"},bool:function(t){return typeof t=="boolean"},string:function(t){return typeof t=="string"},element:function(t){if(!t||f(t)!=="object")return!1;var e=re(t)||G;return/object|function/.test(typeof Element>"u"?"undefined":f(Element))?t instanceof Element||t instanceof e.Element:t.nodeType===1&&typeof t.nodeName=="string"},plainObject:function(t){return ne(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString())},array:function(t){return ne(t)&&t.length!==void 0&&ue(t.splice)}};function be(t){var e=t.interaction;if(e.prepared.name==="drag"){var r=e.prepared.axis;r==="x"?(e.coords.cur.page.y=e.coords.start.page.y,e.coords.cur.client.y=e.coords.start.client.y,e.coords.velocity.client.y=0,e.coords.velocity.page.y=0):r==="y"&&(e.coords.cur.page.x=e.coords.start.page.x,e.coords.cur.client.x=e.coords.start.client.x,e.coords.velocity.client.x=0,e.coords.velocity.page.x=0)}}function xe(t){var e=t.iEvent,r=t.interaction;if(r.prepared.name==="drag"){var n=r.prepared.axis;if(n==="x"||n==="y"){var o=n==="x"?"y":"x";e.page[o]=r.coords.start.page[o],e.client[o]=r.coords.start.client[o],e.delta[o]=0}}}var ce={id:"actions/drag",install:function(t){var e=t.actions,r=t.Interactable,n=t.defaults;r.prototype.draggable=ce.draggable,e.map.drag=ce,e.methodDict.drag="draggable",n.actions.drag=ce.defaults},listeners:{"interactions:before-action-move":be,"interactions:action-resume":be,"interactions:action-move":xe,"auto-start:check":function(t){var e=t.interaction,r=t.interactable,n=t.buttons,o=r.options.drag;if(o&&o.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||n&r.options.drag.mouseButtons))return t.action={name:"drag",axis:o.lockAxis==="start"?o.startAxis:o.lockAxis},!1}},draggable:function(t){return w.object(t)?(this.options.drag.enabled=t.enabled!==!1,this.setPerAction("drag",t),this.setOnEvents("drag",t),/^(xy|x|y|start)$/.test(t.lockAxis)&&(this.options.drag.lockAxis=t.lockAxis),/^(xy|x|y)$/.test(t.startAxis)&&(this.options.drag.startAxis=t.startAxis),this):w.bool(t)?(this.options.drag.enabled=t,this):this.options.drag},beforeMove:be,move:xe,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(t){return t.search("drag")===0}},ie=ce,de={init:function(t){var e=t;de.document=e.document,de.DocumentFragment=e.DocumentFragment||_e,de.SVGElement=e.SVGElement||_e,de.SVGSVGElement=e.SVGSVGElement||_e,de.SVGElementInstance=e.SVGElementInstance||_e,de.Element=e.Element||_e,de.HTMLElement=e.HTMLElement||de.Element,de.Event=e.Event,de.Touch=e.Touch||_e,de.PointerEvent=e.PointerEvent||e.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function _e(){}var F=de,$={init:function(t){var e=F.Element,r=t.navigator||{};$.supportsTouch="ontouchstart"in t||w.func(t.DocumentTouch)&&F.document instanceof t.DocumentTouch,$.supportsPointerEvent=r.pointerEnabled!==!1&&!!F.PointerEvent,$.isIOS=/iP(hone|od|ad)/.test(r.platform),$.isIOS7=/iP(hone|od|ad)/.test(r.platform)&&/OS 7[^\d]/.test(r.appVersion),$.isIe9=/MSIE 9/.test(r.userAgent),$.isOperaMobile=r.appName==="Opera"&&$.supportsTouch&&/Presto/.test(r.userAgent),$.prefixedMatchesSelector="matches"in e.prototype?"matches":"webkitMatchesSelector"in e.prototype?"webkitMatchesSelector":"mozMatchesSelector"in e.prototype?"mozMatchesSelector":"oMatchesSelector"in e.prototype?"oMatchesSelector":"msMatchesSelector",$.pEventTypes=$.supportsPointerEvent?F.PointerEvent===t.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,$.wheelEvent=F.document&&"onmousewheel"in F.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},R=$;function U(t,e){if(t.contains)return t.contains(e);for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function A(t,e){for(;w.element(t);){if(X(t,e))return t;t=K(t)}return null}function K(t){var e=t.parentNode;if(w.docFrag(e)){for(;(e=e.host)&&w.docFrag(e););return e}return e}function X(t,e){return G!==N&&(e=e.replace(/\/deep\//g," ")),t[R.prefixedMatchesSelector](e)}var oe=function(t){return t.parentNode||t.host};function ae(t,e){for(var r,n=[],o=t;(r=oe(o))&&o!==e&&r!==o.ownerDocument;)n.unshift(o),o=r;return n}function pe(t,e,r){for(;w.element(t);){if(X(t,e))return!0;if((t=K(t))===r)return X(t,e)}return!1}function he(t){return t.correspondingUseElement||t}function ve(t){var e=t instanceof F.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return e&&{left:e.left,right:e.right,top:e.top,bottom:e.bottom,width:e.width||e.right-e.left,height:e.height||e.bottom-e.top}}function Se(t){var e,r=ve(t);if(!R.isIOS7&&r){var n={x:(e=(e=re(t))||G).scrollX||e.document.documentElement.scrollLeft,y:e.scrollY||e.document.documentElement.scrollTop};r.left+=n.x,r.right+=n.x,r.top+=n.y,r.bottom+=n.y}return r}function Oe(t){for(var e=[];t;)e.push(t),t=K(t);return e}function ke(t){return!!w.string(t)&&(F.document.querySelector(t),!0)}function W(t,e){for(var r in e)t[r]=e[r];return t}function fe(t,e,r){return t==="parent"?K(r):t==="self"?e.getRect(r):A(r,t)}function ye(t,e,r,n){var o=t;return w.string(o)?o=fe(o,e,r):w.func(o)&&(o=o.apply(void 0,n)),w.element(o)&&(o=Se(o)),o}function Ce(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function $e(t){return!t||"x"in t&&"y"in t||((t=W({},t)).x=t.left||0,t.y=t.top||0,t.width=t.width||(t.right||0)-t.x,t.height=t.height||(t.bottom||0)-t.y),t}function gt(t,e,r){t.left&&(e.left+=r.x),t.right&&(e.right+=r.x),t.top&&(e.top+=r.y),t.bottom&&(e.bottom+=r.y),e.width=e.right-e.left,e.height=e.bottom-e.top}function rt(t,e,r){var n=r&&t.options[r];return Ce(ye(n&&n.origin||t.options.origin,t,e,[t&&e]))||{x:0,y:0}}function Fe(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(h){return!0},n=arguments.length>3?arguments[3]:void 0;if(n=n||{},w.string(t)&&t.search(" ")!==-1&&(t=Xr(t)),w.array(t))return t.forEach(function(h){return Fe(h,e,r,n)}),n;if(w.object(t)&&(e=t,t=""),w.func(e)&&r(t))n[t]=n[t]||[],n[t].push(e);else if(w.array(e))for(var o=0,l=e;o<l.length;o++){var c=l[o];Fe(t,c,r,n)}else if(w.object(e))for(var p in e)Fe(Xr(p).map(function(h){return"".concat(t).concat(h)}),e[p],r,n);return n}function Xr(t){return t.trim().split(/ +/)}var nt=function(t,e){return Math.sqrt(t*t+e*e)},lo=["webkit","moz"];function mt(t,e){t.__set||(t.__set={});var r=function(o){if(lo.some(function(l){return o.indexOf(l)===0}))return 1;typeof t[o]!="function"&&o!=="__set"&&Object.defineProperty(t,o,{get:function(){return o in t.__set?t.__set[o]:t.__set[o]=e[o]},set:function(l){t.__set[o]=l},configurable:!0})};for(var n in e)r(n);return t}function bt(t,e){t.page=t.page||{},t.page.x=e.page.x,t.page.y=e.page.y,t.client=t.client||{},t.client.x=e.client.x,t.client.y=e.client.y,t.timeStamp=e.timeStamp}function Br(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function Vr(t){return t instanceof F.Event||t instanceof F.Touch}function yt(t,e,r){return t=t||"page",(r=r||{}).x=e[t+"X"],r.y=e[t+"Y"],r}function qr(t,e){return e=e||{x:0,y:0},R.isOperaMobile&&Vr(t)?(yt("screen",t,e),e.x+=window.scrollX,e.y+=window.scrollY):yt("page",t,e),e}function it(t){return w.number(t.pointerId)?t.pointerId:t.identifier}function co(t,e,r){var n=e.length>1?Zr(e):e[0];qr(n,t.page),function(o,l){l=l||{},R.isOperaMobile&&Vr(o)?yt("screen",o,l):yt("client",o,l)}(n,t.client),t.timeStamp=r}function Zt(t){var e=[];return w.array(t)?(e[0]=t[0],e[1]=t[1]):t.type==="touchend"?t.touches.length===1?(e[0]=t.touches[0],e[1]=t.changedTouches[0]):t.touches.length===0&&(e[0]=t.changedTouches[0],e[1]=t.changedTouches[1]):(e[0]=t.touches[0],e[1]=t.touches[1]),e}function Zr(t){for(var e={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},r=0;r<t.length;r++){var n=t[r];for(var o in e)e[o]+=n[o]}for(var l in e)e[l]/=t.length;return e}function Jt(t){if(!t.length)return null;var e=Zt(t),r=Math.min(e[0].pageX,e[1].pageX),n=Math.min(e[0].pageY,e[1].pageY),o=Math.max(e[0].pageX,e[1].pageX),l=Math.max(e[0].pageY,e[1].pageY);return{x:r,y:n,left:r,top:n,right:o,bottom:l,width:o-r,height:l-n}}function Qt(t,e){var r=e+"X",n=e+"Y",o=Zt(t),l=o[0][r]-o[1][r],c=o[0][n]-o[1][n];return nt(l,c)}function er(t,e){var r=e+"X",n=e+"Y",o=Zt(t),l=o[1][r]-o[0][r],c=o[1][n]-o[0][n];return 180*Math.atan2(c,l)/Math.PI}function Jr(t){return w.string(t.pointerType)?t.pointerType:w.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof F.Touch?"touch":"mouse"}function Qr(t){var e=w.func(t.composedPath)?t.composedPath():t.path;return[he(e?e[0]:t.target),he(t.currentTarget)]}var Tt=function(){function t(e){v(this,t),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=e}return y(t,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),t}();Object.defineProperty(Tt.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var en=function(t,e){for(var r=0;r<e.length;r++){var n=e[r];t.push(n)}return t},tn=function(t){return en([],t)},ot=function(t,e){for(var r=0;r<t.length;r++)if(e(t[r],r,t))return r;return-1},st=function(t,e){return t[ot(t,e)]},Ke=function(t){O(r,t);var e=M(r);function r(n,o,l){var c;v(this,r),(c=e.call(this,o._interaction)).dropzone=void 0,c.dragEvent=void 0,c.relatedTarget=void 0,c.draggable=void 0,c.propagationStopped=!1,c.immediatePropagationStopped=!1;var p=l==="dragleave"?n.prev:n.cur,h=p.element,g=p.dropzone;return c.type=l,c.target=h,c.currentTarget=h,c.dropzone=g,c.dragEvent=o,c.relatedTarget=o.target,c.draggable=o.interactable,c.timeStamp=o.timeStamp,c}return y(r,[{key:"reject",value:function(){var n=this,o=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&o.cur.dropzone===this.dropzone&&o.cur.element===this.target)if(o.prev.dropzone=this.dropzone,o.prev.element=this.target,o.rejected=!0,o.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var l=o.activeDrops,c=ot(l,function(h){var g=h.dropzone,d=h.element;return g===n.dropzone&&d===n.target});o.activeDrops.splice(c,1);var p=new r(o,this.dragEvent,"dropdeactivate");p.dropzone=this.dropzone,p.target=this.target,this.dropzone.fire(p)}else this.dropzone.fire(new r(o,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),r}(Tt);function rn(t,e){for(var r=0,n=t.slice();r<n.length;r++){var o=n[r],l=o.dropzone,c=o.element;e.dropzone=l,e.target=c,l.fire(e),e.propagationStopped=e.immediatePropagationStopped=!1}}function tr(t,e){for(var r=function(l,c){for(var p=[],h=0,g=l.interactables.list;h<g.length;h++){var d=g[h];if(d.options.drop.enabled){var b=d.options.drop.accept;if(!(w.element(b)&&b!==c||w.string(b)&&!X(c,b)||w.func(b)&&!b({dropzone:d,draggableElement:c})))for(var x=0,I=d.getAllElements();x<I.length;x++){var E=I[x];E!==c&&p.push({dropzone:d,element:E,rect:d.getRect(E)})}}}return p}(t,e),n=0;n<r.length;n++){var o=r[n];o.rect=o.dropzone.getRect(o.element)}return r}function nn(t,e,r){for(var n=t.dropState,o=t.interactable,l=t.element,c=[],p=0,h=n.activeDrops;p<h.length;p++){var g=h[p],d=g.dropzone,b=g.element,x=g.rect,I=d.dropCheck(e,r,o,l,b,x);c.push(I?b:null)}var E=function(D){for(var L,z,Y,Z=[],te=0;te<D.length;te++){var B=D[te],J=D[L];if(B&&te!==L)if(J){var me=oe(B),le=oe(J);if(me!==B.ownerDocument)if(le!==B.ownerDocument)if(me!==le){Z=Z.length?Z:ae(J);var Te=void 0;if(J instanceof F.HTMLElement&&B instanceof F.SVGElement&&!(B instanceof F.SVGSVGElement)){if(B===le)continue;Te=B.ownerSVGElement}else Te=B;for(var we=ae(Te,J.ownerDocument),Pe=0;we[Pe]&&we[Pe]===Z[Pe];)Pe++;var It=[we[Pe-1],we[Pe],Z[Pe]];if(It[0])for(var ht=It[0].lastChild;ht;){if(ht===It[1]){L=te,Z=we;break}if(ht===It[2])break;ht=ht.previousSibling}}else Y=J,(parseInt(re(z=B).getComputedStyle(z).zIndex,10)||0)>=(parseInt(re(Y).getComputedStyle(Y).zIndex,10)||0)&&(L=te);else L=te}else L=te}return L}(c);return n.activeDrops[E]||null}function rr(t,e,r){var n=t.dropState,o={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return r.type==="dragstart"&&(o.activate=new Ke(n,r,"dropactivate"),o.activate.target=null,o.activate.dropzone=null),r.type==="dragend"&&(o.deactivate=new Ke(n,r,"dropdeactivate"),o.deactivate.target=null,o.deactivate.dropzone=null),n.rejected||(n.cur.element!==n.prev.element&&(n.prev.dropzone&&(o.leave=new Ke(n,r,"dragleave"),r.dragLeave=o.leave.target=n.prev.element,r.prevDropzone=o.leave.dropzone=n.prev.dropzone),n.cur.dropzone&&(o.enter=new Ke(n,r,"dragenter"),r.dragEnter=n.cur.element,r.dropzone=n.cur.dropzone)),r.type==="dragend"&&n.cur.dropzone&&(o.drop=new Ke(n,r,"drop"),r.dropzone=n.cur.dropzone,r.relatedTarget=n.cur.element),r.type==="dragmove"&&n.cur.dropzone&&(o.move=new Ke(n,r,"dropmove"),r.dropzone=n.cur.dropzone)),o}function nr(t,e){var r=t.dropState,n=r.activeDrops,o=r.cur,l=r.prev;e.leave&&l.dropzone.fire(e.leave),e.enter&&o.dropzone.fire(e.enter),e.move&&o.dropzone.fire(e.move),e.drop&&o.dropzone.fire(e.drop),e.deactivate&&rn(n,e.deactivate),r.prev.dropzone=o.dropzone,r.prev.element=o.element}function on(t,e){var r=t.interaction,n=t.iEvent,o=t.event;if(n.type==="dragmove"||n.type==="dragend"){var l=r.dropState;e.dynamicDrop&&(l.activeDrops=tr(e,r.element));var c=n,p=nn(r,c,o);l.rejected=l.rejected&&!!p&&p.dropzone===l.cur.dropzone&&p.element===l.cur.element,l.cur.dropzone=p&&p.dropzone,l.cur.element=p&&p.element,l.events=rr(r,0,c)}}var sn={id:"actions/drop",install:function(t){var e=t.actions,r=t.interactStatic,n=t.Interactable,o=t.defaults;t.usePlugin(ie),n.prototype.dropzone=function(l){return function(c,p){if(w.object(p)){if(c.options.drop.enabled=p.enabled!==!1,p.listeners){var h=Fe(p.listeners),g=Object.keys(h).reduce(function(b,x){return b[/^(enter|leave)/.test(x)?"drag".concat(x):/^(activate|deactivate|move)/.test(x)?"drop".concat(x):x]=h[x],b},{}),d=c.options.drop.listeners;d&&c.off(d),c.on(g),c.options.drop.listeners=g}return w.func(p.ondrop)&&c.on("drop",p.ondrop),w.func(p.ondropactivate)&&c.on("dropactivate",p.ondropactivate),w.func(p.ondropdeactivate)&&c.on("dropdeactivate",p.ondropdeactivate),w.func(p.ondragenter)&&c.on("dragenter",p.ondragenter),w.func(p.ondragleave)&&c.on("dragleave",p.ondragleave),w.func(p.ondropmove)&&c.on("dropmove",p.ondropmove),/^(pointer|center)$/.test(p.overlap)?c.options.drop.overlap=p.overlap:w.number(p.overlap)&&(c.options.drop.overlap=Math.max(Math.min(1,p.overlap),0)),"accept"in p&&(c.options.drop.accept=p.accept),"checker"in p&&(c.options.drop.checker=p.checker),c}return w.bool(p)?(c.options.drop.enabled=p,c):c.options.drop}(this,l)},n.prototype.dropCheck=function(l,c,p,h,g,d){return function(b,x,I,E,D,L,z){var Y=!1;if(!(z=z||b.getRect(L)))return!!b.options.drop.checker&&b.options.drop.checker(x,I,Y,b,L,E,D);var Z=b.options.drop.overlap;if(Z==="pointer"){var te=rt(E,D,"drag"),B=qr(x);B.x+=te.x,B.y+=te.y;var J=B.x>z.left&&B.x<z.right,me=B.y>z.top&&B.y<z.bottom;Y=J&&me}var le=E.getRect(D);if(le&&Z==="center"){var Te=le.left+le.width/2,we=le.top+le.height/2;Y=Te>=z.left&&Te<=z.right&&we>=z.top&&we<=z.bottom}return le&&w.number(Z)&&(Y=Math.max(0,Math.min(z.right,le.right)-Math.max(z.left,le.left))*Math.max(0,Math.min(z.bottom,le.bottom)-Math.max(z.top,le.top))/(le.width*le.height)>=Z),b.options.drop.checker&&(Y=b.options.drop.checker(x,I,Y,b,L,E,D)),Y}(this,l,c,p,h,g,d)},r.dynamicDrop=function(l){return w.bool(l)?(t.dynamicDrop=l,r):t.dynamicDrop},W(e.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),e.methodDict.drop="dropzone",t.dynamicDrop=!1,o.actions.drop=sn.defaults},listeners:{"interactions:before-action-start":function(t){var e=t.interaction;e.prepared.name==="drag"&&(e.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(t,e){var r=t.interaction,n=(t.event,t.iEvent);if(r.prepared.name==="drag"){var o=r.dropState;o.activeDrops=[],o.events={},o.activeDrops=tr(e,r.element),o.events=rr(r,0,n),o.events.activate&&(rn(o.activeDrops,o.events.activate),e.fire("actions/drop:start",{interaction:r,dragEvent:n}))}},"interactions:action-move":on,"interactions:after-action-move":function(t,e){var r=t.interaction,n=t.iEvent;if(r.prepared.name==="drag"){var o=r.dropState;nr(r,o.events),e.fire("actions/drop:move",{interaction:r,dragEvent:n}),o.events={}}},"interactions:action-end":function(t,e){if(t.interaction.prepared.name==="drag"){var r=t.interaction,n=t.iEvent;on(t,e),nr(r,r.dropState.events),e.fire("actions/drop:end",{interaction:r,dragEvent:n})}},"interactions:stop":function(t){var e=t.interaction;if(e.prepared.name==="drag"){var r=e.dropState;r&&(r.activeDrops=null,r.events=null,r.cur.dropzone=null,r.cur.element=null,r.prev.dropzone=null,r.prev.element=null,r.rejected=!1)}}},getActiveDrops:tr,getDrop:nn,getDropEvents:rr,fireDropEvents:nr,filterEventType:function(t){return t.search("drag")===0||t.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},uo=sn;function ir(t){var e=t.interaction,r=t.iEvent,n=t.phase;if(e.prepared.name==="gesture"){var o=e.pointers.map(function(g){return g.pointer}),l=n==="start",c=n==="end",p=e.interactable.options.deltaSource;if(r.touches=[o[0],o[1]],l)r.distance=Qt(o,p),r.box=Jt(o),r.scale=1,r.ds=0,r.angle=er(o,p),r.da=0,e.gesture.startDistance=r.distance,e.gesture.startAngle=r.angle;else if(c||e.pointers.length<2){var h=e.prevEvent;r.distance=h.distance,r.box=h.box,r.scale=h.scale,r.ds=0,r.angle=h.angle,r.da=0}else r.distance=Qt(o,p),r.box=Jt(o),r.scale=r.distance/e.gesture.startDistance,r.angle=er(o,p),r.ds=r.scale-e.gesture.scale,r.da=r.angle-e.gesture.angle;e.gesture.distance=r.distance,e.gesture.angle=r.angle,w.number(r.scale)&&r.scale!==1/0&&!isNaN(r.scale)&&(e.gesture.scale=r.scale)}}var or={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(t){var e=t.actions,r=t.Interactable,n=t.defaults;r.prototype.gesturable=function(o){return w.object(o)?(this.options.gesture.enabled=o.enabled!==!1,this.setPerAction("gesture",o),this.setOnEvents("gesture",o),this):w.bool(o)?(this.options.gesture.enabled=o,this):this.options.gesture},e.map.gesture=or,e.methodDict.gesture="gesturable",n.actions.gesture=or.defaults},listeners:{"interactions:action-start":ir,"interactions:action-move":ir,"interactions:action-end":ir,"interactions:new":function(t){t.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(t){if(!(t.interaction.pointers.length<2)){var e=t.interactable.options.gesture;if(e&&e.enabled)return t.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(t){return t.search("gesture")===0}},po=or;function ho(t,e,r,n,o,l,c){if(!e)return!1;if(e===!0){var p=w.number(l.width)?l.width:l.right-l.left,h=w.number(l.height)?l.height:l.bottom-l.top;if(c=Math.min(c,Math.abs((t==="left"||t==="right"?p:h)/2)),p<0&&(t==="left"?t="right":t==="right"&&(t="left")),h<0&&(t==="top"?t="bottom":t==="bottom"&&(t="top")),t==="left"){var g=p>=0?l.left:l.right;return r.x<g+c}if(t==="top"){var d=h>=0?l.top:l.bottom;return r.y<d+c}if(t==="right")return r.x>(p>=0?l.right:l.left)-c;if(t==="bottom")return r.y>(h>=0?l.bottom:l.top)-c}return!!w.element(n)&&(w.element(e)?e===n:pe(n,e,o))}function an(t){var e=t.iEvent,r=t.interaction;if(r.prepared.name==="resize"&&r.resizeAxes){var n=e;r.interactable.options.resize.square?(r.resizeAxes==="y"?n.delta.x=n.delta.y:n.delta.y=n.delta.x,n.axes="xy"):(n.axes=r.resizeAxes,r.resizeAxes==="x"?n.delta.y=0:r.resizeAxes==="y"&&(n.delta.x=0))}}var Ee,Ue,Ie={id:"actions/resize",before:["actions/drag"],install:function(t){var e=t.actions,r=t.browser,n=t.Interactable,o=t.defaults;Ie.cursors=function(l){return l.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"}}(r),Ie.defaultMargin=r.supportsTouch||r.supportsPointerEvent?20:10,n.prototype.resizable=function(l){return function(c,p,h){return w.object(p)?(c.options.resize.enabled=p.enabled!==!1,c.setPerAction("resize",p),c.setOnEvents("resize",p),w.string(p.axis)&&/^x$|^y$|^xy$/.test(p.axis)?c.options.resize.axis=p.axis:p.axis===null&&(c.options.resize.axis=h.defaults.actions.resize.axis),w.bool(p.preserveAspectRatio)?c.options.resize.preserveAspectRatio=p.preserveAspectRatio:w.bool(p.square)&&(c.options.resize.square=p.square),c):w.bool(p)?(c.options.resize.enabled=p,c):c.options.resize}(this,l,t)},e.map.resize=Ie,e.methodDict.resize="resizable",o.actions.resize=Ie.defaults},listeners:{"interactions:new":function(t){t.interaction.resizeAxes="xy"},"interactions:action-start":function(t){(function(e){var r=e.iEvent,n=e.interaction;if(n.prepared.name==="resize"&&n.prepared.edges){var o=r,l=n.rect;n._rects={start:W({},l),corrected:W({},l),previous:W({},l),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},o.edges=n.prepared.edges,o.rect=n._rects.corrected,o.deltaRect=n._rects.delta}})(t),an(t)},"interactions:action-move":function(t){(function(e){var r=e.iEvent,n=e.interaction;if(n.prepared.name==="resize"&&n.prepared.edges){var o=r,l=n.interactable.options.resize.invert,c=l==="reposition"||l==="negate",p=n.rect,h=n._rects,g=h.start,d=h.corrected,b=h.delta,x=h.previous;if(W(x,d),c){if(W(d,p),l==="reposition"){if(d.top>d.bottom){var I=d.top;d.top=d.bottom,d.bottom=I}if(d.left>d.right){var E=d.left;d.left=d.right,d.right=E}}}else d.top=Math.min(p.top,g.bottom),d.bottom=Math.max(p.bottom,g.top),d.left=Math.min(p.left,g.right),d.right=Math.max(p.right,g.left);for(var D in d.width=d.right-d.left,d.height=d.bottom-d.top,d)b[D]=d[D]-x[D];o.edges=n.prepared.edges,o.rect=d,o.deltaRect=b}})(t),an(t)},"interactions:action-end":function(t){var e=t.iEvent,r=t.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var n=e;n.edges=r.prepared.edges,n.rect=r._rects.corrected,n.deltaRect=r._rects.delta}},"auto-start:check":function(t){var e=t.interaction,r=t.interactable,n=t.element,o=t.rect,l=t.buttons;if(o){var c=W({},e.coords.cur.page),p=r.options.resize;if(p&&p.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||l&p.mouseButtons)){if(w.object(p.edges)){var h={left:!1,right:!1,top:!1,bottom:!1};for(var g in h)h[g]=ho(g,p.edges[g],c,e._latestPointer.eventTarget,n,o,p.margin||Ie.defaultMargin);h.left=h.left&&!h.right,h.top=h.top&&!h.bottom,(h.left||h.right||h.top||h.bottom)&&(t.action={name:"resize",edges:h})}else{var d=p.axis!=="y"&&c.x>o.right-Ie.defaultMargin,b=p.axis!=="x"&&c.y>o.bottom-Ie.defaultMargin;(d||b)&&(t.action={name:"resize",axes:(d?"x":"")+(b?"y":"")})}return!t.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(t){var e=t.edges,r=t.axis,n=t.name,o=Ie.cursors,l=null;if(r)l=o[n+r];else if(e){for(var c="",p=0,h=["top","bottom","left","right"];p<h.length;p++){var g=h[p];e[g]&&(c+=g)}l=o[c]}return l},filterEventType:function(t){return t.search("resize")===0},defaultMargin:null},fo=Ie,vo={id:"actions",install:function(t){t.usePlugin(po),t.usePlugin(fo),t.usePlugin(ie),t.usePlugin(uo)}},ln=0,je={request:function(t){return Ee(t)},cancel:function(t){return Ue(t)},init:function(t){if(Ee=t.requestAnimationFrame,Ue=t.cancelAnimationFrame,!Ee)for(var e=["ms","moz","webkit","o"],r=0;r<e.length;r++){var n=e[r];Ee=t["".concat(n,"RequestAnimationFrame")],Ue=t["".concat(n,"CancelAnimationFrame")]||t["".concat(n,"CancelRequestAnimationFrame")]}Ee=Ee&&Ee.bind(t),Ue=Ue&&Ue.bind(t),Ee||(Ee=function(o){var l=Date.now(),c=Math.max(0,16-(l-ln)),p=t.setTimeout(function(){o(l+c)},c);return ln=l+c,p},Ue=function(o){return clearTimeout(o)})}},V={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(t){V.isScrolling=!0,je.cancel(V.i),t.autoScroll=V,V.interaction=t,V.prevTime=V.now(),V.i=je.request(V.scroll)},stop:function(){V.isScrolling=!1,V.interaction&&(V.interaction.autoScroll=null),je.cancel(V.i)},scroll:function(){var t=V.interaction,e=t.interactable,r=t.element,n=t.prepared.name,o=e.options[n].autoScroll,l=cn(o.container,e,r),c=V.now(),p=(c-V.prevTime)/1e3,h=o.speed*p;if(h>=1){var g={x:V.x*h,y:V.y*h};if(g.x||g.y){var d=un(l);w.window(l)?l.scrollBy(g.x,g.y):l&&(l.scrollLeft+=g.x,l.scrollTop+=g.y);var b=un(l),x={x:b.x-d.x,y:b.y-d.y};(x.x||x.y)&&e.fire({type:"autoscroll",target:r,interactable:e,delta:x,interaction:t,container:l})}V.prevTime=c}V.isScrolling&&(je.cancel(V.i),V.i=je.request(V.scroll))},check:function(t,e){var r;return(r=t.options[e].autoScroll)==null?void 0:r.enabled},onInteractionMove:function(t){var e=t.interaction,r=t.pointer;if(e.interacting()&&V.check(e.interactable,e.prepared.name))if(e.simulation)V.x=V.y=0;else{var n,o,l,c,p=e.interactable,h=e.element,g=e.prepared.name,d=p.options[g].autoScroll,b=cn(d.container,p,h);if(w.window(b))c=r.clientX<V.margin,n=r.clientY<V.margin,o=r.clientX>b.innerWidth-V.margin,l=r.clientY>b.innerHeight-V.margin;else{var x=ve(b);c=r.clientX<x.left+V.margin,n=r.clientY<x.top+V.margin,o=r.clientX>x.right-V.margin,l=r.clientY>x.bottom-V.margin}V.x=o?1:c?-1:0,V.y=l?1:n?-1:0,V.isScrolling||(V.margin=d.margin,V.speed=d.speed,V.start(e))}}};function cn(t,e,r){return(w.string(t)?fe(t,e,r):t)||re(r)}function un(t){return w.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var go={id:"auto-scroll",install:function(t){var e=t.defaults,r=t.actions;t.autoScroll=V,V.now=function(){return t.now()},r.phaselessTypes.autoscroll=!0,e.perAction.autoScroll=V.defaults},listeners:{"interactions:new":function(t){t.interaction.autoScroll=null},"interactions:destroy":function(t){t.interaction.autoScroll=null,V.stop(),V.interaction&&(V.interaction=null)},"interactions:stop":V.stop,"interactions:action-move":function(t){return V.onInteractionMove(t)}}},mo=go;function at(t,e){var r=!1;return function(){return r||(G.console.warn(e),r=!0),t.apply(this,arguments)}}function sr(t,e){return t.name=e.name,t.axis=e.axis,t.edges=e.edges,t}function bo(t){return w.bool(t)?(this.options.styleCursor=t,this):t===null?(delete this.options.styleCursor,this):this.options.styleCursor}function yo(t){return w.func(t)?(this.options.actionChecker=t,this):t===null?(delete this.options.actionChecker,this):this.options.actionChecker}var To={id:"auto-start/interactableMethods",install:function(t){var e=t.Interactable;e.prototype.getAction=function(r,n,o,l){var c=function(p,h,g,d,b){var x=p.getRect(d),I=h.buttons||{0:1,1:4,3:8,4:16}[h.button],E={action:null,interactable:p,interaction:g,element:d,rect:x,buttons:I};return b.fire("auto-start:check",E),E.action}(this,n,o,l,t);return this.options.actionChecker?this.options.actionChecker(r,n,c,this,l,o):c},e.prototype.ignoreFrom=at(function(r){return this._backCompatOption("ignoreFrom",r)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),e.prototype.allowFrom=at(function(r){return this._backCompatOption("allowFrom",r)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),e.prototype.actionChecker=yo,e.prototype.styleCursor=bo}};function pn(t,e,r,n,o){return e.testIgnoreAllow(e.options[t.name],r,n)&&e.options[t.name].enabled&&xt(e,r,t,o)?t:null}function xo(t,e,r,n,o,l,c){for(var p=0,h=n.length;p<h;p++){var g=n[p],d=o[p],b=g.getAction(e,r,t,d);if(b){var x=pn(b,g,d,l,c);if(x)return{action:x,interactable:g,element:d}}}return{action:null,interactable:null,element:null}}function hn(t,e,r,n,o){var l=[],c=[],p=n;function h(d){l.push(d),c.push(p)}for(;w.element(p);){l=[],c=[],o.interactables.forEachMatch(p,h);var g=xo(t,e,r,l,c,n,o);if(g.action&&!g.interactable.options[g.action.name].manualStart)return g;p=K(p)}return{action:null,interactable:null,element:null}}function dn(t,e,r){var n=e.action,o=e.interactable,l=e.element;n=n||{name:null},t.interactable=o,t.element=l,sr(t.prepared,n),t.rect=o&&n.name?o.getRect(l):null,vn(t,r),r.fire("autoStart:prepared",{interaction:t})}function xt(t,e,r,n){var o=t.options,l=o[r.name].max,c=o[r.name].maxPerElement,p=n.autoStart.maxInteractions,h=0,g=0,d=0;if(!(l&&c&&p))return!1;for(var b=0,x=n.interactions.list;b<x.length;b++){var I=x[b],E=I.prepared.name;if(I.interacting()&&(++h>=p||I.interactable===t&&((g+=E===r.name?1:0)>=l||I.element===e&&(d++,E===r.name&&d>=c))))return!1}return p>0}function fn(t,e){return w.number(t)?(e.autoStart.maxInteractions=t,this):e.autoStart.maxInteractions}function ar(t,e,r){var n=r.autoStart.cursorElement;n&&n!==t&&(n.style.cursor=""),t.ownerDocument.documentElement.style.cursor=e,t.style.cursor=e,r.autoStart.cursorElement=e?t:null}function vn(t,e){var r=t.interactable,n=t.element,o=t.prepared;if(t.pointerType==="mouse"&&r&&r.options.styleCursor){var l="";if(o.name){var c=r.options[o.name].cursorChecker;l=w.func(c)?c(o,r,n,t._interacting):e.actions.map[o.name].getCursor(o)}ar(t.element,l||"",e)}else e.autoStart.cursorElement&&ar(e.autoStart.cursorElement,"",e)}var wo={id:"auto-start/base",before:["actions"],install:function(t){var e=t.interactStatic,r=t.defaults;t.usePlugin(To),r.base.actionChecker=null,r.base.styleCursor=!0,W(r.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),e.maxInteractions=function(n){return fn(n,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:xt,cursorElement:null}},listeners:{"interactions:down":function(t,e){var r=t.interaction,n=t.pointer,o=t.event,l=t.eventTarget;r.interacting()||dn(r,hn(r,n,o,l,e),e)},"interactions:move":function(t,e){(function(r,n){var o=r.interaction,l=r.pointer,c=r.event,p=r.eventTarget;o.pointerType!=="mouse"||o.pointerIsDown||o.interacting()||dn(o,hn(o,l,c,p,n),n)})(t,e),function(r,n){var o=r.interaction;if(o.pointerIsDown&&!o.interacting()&&o.pointerWasMoved&&o.prepared.name){n.fire("autoStart:before-start",r);var l=o.interactable,c=o.prepared.name;c&&l&&(l.options[c].manualStart||!xt(l,o.element,o.prepared,n)?o.stop():(o.start(o.prepared,l,o.element),vn(o,n)))}}(t,e)},"interactions:stop":function(t,e){var r=t.interaction,n=r.interactable;n&&n.options.styleCursor&&ar(r.element,"",e)}},maxInteractions:fn,withinInteractionLimit:xt,validateAction:pn},lr=wo,So={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(t,e){var r=t.interaction,n=t.eventTarget,o=t.dx,l=t.dy;if(r.prepared.name==="drag"){var c=Math.abs(o),p=Math.abs(l),h=r.interactable.options.drag,g=h.startAxis,d=c>p?"x":c<p?"y":"xy";if(r.prepared.axis=h.lockAxis==="start"?d[0]:h.lockAxis,d!=="xy"&&g!=="xy"&&g!==d){r.prepared.name=null;for(var b=n,x=function(E){if(E!==r.interactable){var D=r.interactable.options.drag;if(!D.manualStart&&E.testIgnoreAllow(D,b,n)){var L=E.getAction(r.downPointer,r.downEvent,r,b);if(L&&L.name==="drag"&&function(z,Y){if(!Y)return!1;var Z=Y.options.drag.startAxis;return z==="xy"||Z==="xy"||Z===z}(d,E)&&lr.validateAction(L,E,b,n,e))return E}}};w.element(b);){var I=e.interactables.forEachMatch(b,x);if(I){r.prepared.name="drag",r.interactable=I,r.element=b;break}b=K(b)}}}}}};function cr(t){var e=t.prepared&&t.prepared.name;if(!e)return null;var r=t.interactable.options;return r[e].hold||r[e].delay}var Oo={id:"auto-start/hold",install:function(t){var e=t.defaults;t.usePlugin(lr),e.perAction.hold=0,e.perAction.delay=0},listeners:{"interactions:new":function(t){t.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(t){var e=t.interaction,r=cr(e);r>0&&(e.autoStartHoldTimer=setTimeout(function(){e.start(e.prepared,e.interactable,e.element)},r))},"interactions:move":function(t){var e=t.interaction,r=t.duplicate;e.autoStartHoldTimer&&e.pointerWasMoved&&!r&&(clearTimeout(e.autoStartHoldTimer),e.autoStartHoldTimer=null)},"autoStart:before-start":function(t){var e=t.interaction;cr(e)>0&&(e.prepared.name=null)}},getHoldDuration:cr},Co=Oo,Mo={id:"auto-start",install:function(t){t.usePlugin(lr),t.usePlugin(Co),t.usePlugin(So)}},_o=function(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):w.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault};function Eo(t){var e=t.interaction,r=t.event;e.interactable&&e.interactable.checkAndPreventDefault(r)}var gn={id:"core/interactablePreventDefault",install:function(t){var e=t.Interactable;e.prototype.preventDefault=_o,e.prototype.checkAndPreventDefault=function(r){return function(n,o,l){var c=n.options.preventDefault;if(c!=="never")if(c!=="always"){if(o.events.supportsPassive&&/^touch(start|move)$/.test(l.type)){var p=re(l.target).document,h=o.getDocOptions(p);if(!h||!h.events||h.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(l.type)||w.element(l.target)&&X(l.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||l.preventDefault()}else l.preventDefault()}(this,t,r)},t.interactions.docEvents.push({type:"dragstart",listener:function(r){for(var n=0,o=t.interactions.list;n<o.length;n++){var l=o[n];if(l.element&&(l.element===r.target||U(l.element,r.target)))return void l.interactable.checkAndPreventDefault(r)}}})},listeners:["down","move","up","cancel"].reduce(function(t,e){return t["interactions:".concat(e)]=Eo,t},{})};function wt(t,e){if(e.phaselessTypes[t])return!0;for(var r in e.map)if(t.indexOf(r)===0&&t.substr(r.length)in e.phases)return!0;return!1}function Xe(t){var e={};for(var r in t){var n=t[r];w.plainObject(n)?e[r]=Xe(n):w.array(n)?e[r]=tn(n):e[r]=n}return e}var ur=function(){function t(e){v(this,t),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=e,this.result=St(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return y(t,[{key:"start",value:function(e,r){var n,o,l=e.phase,c=this.interaction,p=function(g){var d=g.interactable.options[g.prepared.name],b=d.modifiers;return b&&b.length?b:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(x){var I=d[x];return I&&I.enabled&&{options:I,methods:I._methods}}).filter(function(x){return!!x})}(c);this.prepareStates(p),this.startEdges=W({},c.edges),this.edges=W({},this.startEdges),this.startOffset=(n=c.rect,o=r,n?{left:o.x-n.left,top:o.y-n.top,right:n.right-o.x,bottom:n.bottom-o.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var h=this.fillArg({phase:l,pageCoords:r,preEnd:!1});return this.result=St(),this.startAll(h),this.result=this.setAll(h)}},{key:"fillArg",value:function(e){var r=this.interaction;return e.interaction=r,e.interactable=r.interactable,e.element=r.element,e.rect||(e.rect=r.rect),e.edges||(e.edges=this.startEdges),e.startOffset=this.startOffset,e}},{key:"startAll",value:function(e){for(var r=0,n=this.states;r<n.length;r++){var o=n[r];o.methods.start&&(e.state=o,o.methods.start(e))}}},{key:"setAll",value:function(e){var r=e.phase,n=e.preEnd,o=e.skipModifiers,l=e.rect,c=e.edges;e.coords=W({},e.pageCoords),e.rect=W({},l),e.edges=W({},c);for(var p=o?this.states.slice(o):this.states,h=St(e.coords,e.rect),g=0;g<p.length;g++){var d,b=p[g],x=b.options,I=W({},e.coords),E=null;(d=b.methods)!=null&&d.set&&this.shouldDo(x,n,r)&&(e.state=b,E=b.methods.set(e),gt(e.edges,e.rect,{x:e.coords.x-I.x,y:e.coords.y-I.y})),h.eventProps.push(E)}W(this.edges,e.edges),h.delta.x=e.coords.x-e.pageCoords.x,h.delta.y=e.coords.y-e.pageCoords.y,h.rectDelta.left=e.rect.left-l.left,h.rectDelta.right=e.rect.right-l.right,h.rectDelta.top=e.rect.top-l.top,h.rectDelta.bottom=e.rect.bottom-l.bottom;var D=this.result.coords,L=this.result.rect;if(D&&L){var z=h.rect.left!==L.left||h.rect.right!==L.right||h.rect.top!==L.top||h.rect.bottom!==L.bottom;h.changed=z||D.x!==h.coords.x||D.y!==h.coords.y}return h}},{key:"applyToInteraction",value:function(e){var r=this.interaction,n=e.phase,o=r.coords.cur,l=r.coords.start,c=this.result,p=this.startDelta,h=c.delta;n==="start"&&W(this.startDelta,c.delta);for(var g=0,d=[[l,p],[o,h]];g<d.length;g++){var b=d[g],x=b[0],I=b[1];x.page.x+=I.x,x.page.y+=I.y,x.client.x+=I.x,x.client.y+=I.y}var E=this.result.rectDelta,D=e.rect||r.rect;D.left+=E.left,D.right+=E.right,D.top+=E.top,D.bottom+=E.bottom,D.width=D.right-D.left,D.height=D.bottom-D.top}},{key:"setAndApply",value:function(e){var r=this.interaction,n=e.phase,o=e.preEnd,l=e.skipModifiers,c=this.setAll(this.fillArg({preEnd:o,phase:n,pageCoords:e.modifiedCoords||r.coords.cur.page}));if(this.result=c,!c.changed&&(!l||l<this.states.length)&&r.interacting())return!1;if(e.modifiedCoords){var p=r.coords.cur.page,h={x:e.modifiedCoords.x-p.x,y:e.modifiedCoords.y-p.y};c.coords.x+=h.x,c.coords.y+=h.y,c.delta.x+=h.x,c.delta.y+=h.y}this.applyToInteraction(e)}},{key:"beforeEnd",value:function(e){var r=e.interaction,n=e.event,o=this.states;if(o&&o.length){for(var l=!1,c=0;c<o.length;c++){var p=o[c];e.state=p;var h=p.options,g=p.methods,d=g.beforeEnd&&g.beforeEnd(e);if(d)return this.endResult=d,!1;l=l||!l&&this.shouldDo(h,!0,e.phase,!0)}l&&r.move({event:n,preEnd:!0})}}},{key:"stop",value:function(e){var r=e.interaction;if(this.states&&this.states.length){var n=W({states:this.states,interactable:r.interactable,element:r.element,rect:null},e);this.fillArg(n);for(var o=0,l=this.states;o<l.length;o++){var c=l[o];n.state=c,c.methods.stop&&c.methods.stop(n)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(e){this.states=[];for(var r=0;r<e.length;r++){var n=e[r],o=n.options,l=n.methods,c=n.name;this.states.push({options:o,methods:l,index:r,name:c})}return this.states}},{key:"restoreInteractionCoords",value:function(e){var r=e.interaction,n=r.coords,o=r.rect,l=r.modification;if(l.result){for(var c=l.startDelta,p=l.result,h=p.delta,g=p.rectDelta,d=0,b=[[n.start,c],[n.cur,h]];d<b.length;d++){var x=b[d],I=x[0],E=x[1];I.page.x-=E.x,I.page.y-=E.y,I.client.x-=E.x,I.client.y-=E.y}o.left-=g.left,o.right-=g.right,o.top-=g.top,o.bottom-=g.bottom}}},{key:"shouldDo",value:function(e,r,n,o){return!(!e||e.enabled===!1||o&&!e.endOnly||e.endOnly&&!r||n==="start"&&!e.setStart)}},{key:"copyFrom",value:function(e){this.startOffset=e.startOffset,this.startDelta=e.startDelta,this.startEdges=e.startEdges,this.edges=e.edges,this.states=e.states.map(function(r){return Xe(r)}),this.result=St(W({},e.result.coords),W({},e.result.rect))}},{key:"destroy",value:function(){for(var e in this)this[e]=null}}]),t}();function St(t,e){return{rect:e,coords:t,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function ze(t,e){var r=t.defaults,n={start:t.start,set:t.set,beforeEnd:t.beforeEnd,stop:t.stop},o=function(l){var c=l||{};for(var p in c.enabled=c.enabled!==!1,r)p in c||(c[p]=r[p]);var h={options:c,methods:n,name:e,enable:function(){return c.enabled=!0,h},disable:function(){return c.enabled=!1,h}};return h};return e&&typeof e=="string"&&(o._defaults=r,o._methods=n),o}function lt(t){var e=t.iEvent,r=t.interaction.modification.result;r&&(e.modifiers=r.eventProps)}var Io={id:"modifiers/base",before:["actions"],install:function(t){t.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(t){var e=t.interaction;e.modification=new ur(e)},"interactions:before-action-start":function(t){var e=t.interaction,r=t.interaction.modification;r.start(t,e.coords.start.page),e.edges=r.edges,r.applyToInteraction(t)},"interactions:before-action-move":function(t){var e=t.interaction,r=e.modification,n=r.setAndApply(t);return e.edges=r.edges,n},"interactions:before-action-end":function(t){var e=t.interaction,r=e.modification,n=r.beforeEnd(t);return e.edges=r.startEdges,n},"interactions:action-start":lt,"interactions:action-move":lt,"interactions:action-end":lt,"interactions:after-action-start":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-move":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:stop":function(t){return t.interaction.modification.stop(t)}}},mn=Io,bn={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},pr=function(t){O(r,t);var e=M(r);function r(n,o,l,c,p,h,g){var d;v(this,r),(d=e.call(this,n)).relatedTarget=null,d.screenX=void 0,d.screenY=void 0,d.button=void 0,d.buttons=void 0,d.ctrlKey=void 0,d.shiftKey=void 0,d.altKey=void 0,d.metaKey=void 0,d.page=void 0,d.client=void 0,d.delta=void 0,d.rect=void 0,d.x0=void 0,d.y0=void 0,d.t0=void 0,d.dt=void 0,d.duration=void 0,d.clientX0=void 0,d.clientY0=void 0,d.velocity=void 0,d.speed=void 0,d.swipe=void 0,d.axes=void 0,d.preEnd=void 0,p=p||n.element;var b=n.interactable,x=(b&&b.options||bn).deltaSource,I=rt(b,p,l),E=c==="start",D=c==="end",L=E?T(d):n.prevEvent,z=E?n.coords.start:D?{page:L.page,client:L.client,timeStamp:n.coords.cur.timeStamp}:n.coords.cur;return d.page=W({},z.page),d.client=W({},z.client),d.rect=W({},n.rect),d.timeStamp=z.timeStamp,D||(d.page.x-=I.x,d.page.y-=I.y,d.client.x-=I.x,d.client.y-=I.y),d.ctrlKey=o.ctrlKey,d.altKey=o.altKey,d.shiftKey=o.shiftKey,d.metaKey=o.metaKey,d.button=o.button,d.buttons=o.buttons,d.target=p,d.currentTarget=p,d.preEnd=h,d.type=g||l+(c||""),d.interactable=b,d.t0=E?n.pointers[n.pointers.length-1].downTime:L.t0,d.x0=n.coords.start.page.x-I.x,d.y0=n.coords.start.page.y-I.y,d.clientX0=n.coords.start.client.x-I.x,d.clientY0=n.coords.start.client.y-I.y,d.delta=E||D?{x:0,y:0}:{x:d[x].x-L[x].x,y:d[x].y-L[x].y},d.dt=n.coords.delta.timeStamp,d.duration=d.timeStamp-d.t0,d.velocity=W({},n.coords.velocity[x]),d.speed=nt(d.velocity.x,d.velocity.y),d.swipe=D||c==="inertiastart"?d.getSwipe():null,d}return y(r,[{key:"getSwipe",value:function(){var n=this._interaction;if(n.prevEvent.speed<600||this.timeStamp-n.prevEvent.timeStamp>150)return null;var o=180*Math.atan2(n.prevEvent.velocityY,n.prevEvent.velocityX)/Math.PI;o<0&&(o+=360);var l=112.5<=o&&o<247.5,c=202.5<=o&&o<337.5;return{up:c,down:!c&&22.5<=o&&o<157.5,left:l,right:!l&&(292.5<=o||o<67.5),angle:o,speed:n.prevEvent.speed,velocity:{x:n.prevEvent.velocityX,y:n.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),r}(Tt);Object.defineProperties(pr.prototype,{pageX:{get:function(){return this.page.x},set:function(t){this.page.x=t}},pageY:{get:function(){return this.page.y},set:function(t){this.page.y=t}},clientX:{get:function(){return this.client.x},set:function(t){this.client.x=t}},clientY:{get:function(){return this.client.y},set:function(t){this.client.y=t}},dx:{get:function(){return this.delta.x},set:function(t){this.delta.x=t}},dy:{get:function(){return this.delta.y},set:function(t){this.delta.y=t}},velocityX:{get:function(){return this.velocity.x},set:function(t){this.velocity.x=t}},velocityY:{get:function(){return this.velocity.y},set:function(t){this.velocity.y=t}}});var Po=y(function t(e,r,n,o,l){v(this,t),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=e,this.pointer=r,this.event=n,this.downTime=o,this.downTarget=l}),Do=function(t){return t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy="",t}({}),yn=function(t){return t.start="",t.move="",t.end="",t.stop="",t.interacting="",t}({}),Ro=0,ko=function(){function t(e){var r=this,n=e.pointerType,o=e.scopeFire;v(this,t),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=at(function(d){this.move(d)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp: