LocalCDN-Firefox-Chrome-Brave/resources/gsap/3.11.4/Draggable.min.jsm

12 lines
34 KiB
JavaScript

/*!
* Draggable 3.11.4
* https://greensock.com
*
* @license Copyright 2022, GreenSock. All rights reserved.
* Subject to the terms at https://greensock.com/standard-license or for Club GreenSock members, the agreement issued with that membership.
* @author: Jack Doyle, jack@greensock.com
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).window=e.window||{})}(this,function(e){"use strict";function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(e,t){if(e.parentNode&&(h||T(e))){var n=C(e),o=n?n.getAttribute("xmlns")||"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",r=n?t?"rect":"g":"div",i=2!==t?0:100,a=3===t?100:0,l="position:absolute;display:block;pointer-events:none;margin:0;padding:0;",s=h.createElementNS?h.createElementNS(o.replace(/^https/,"http"),r):h.createElement(r);return t&&(n?(g=g||w(e),s.setAttribute("width",.01),s.setAttribute("height",.01),s.setAttribute("transform","translate("+i+","+a+")"),g.appendChild(s)):(f||((f=w(e)).style.cssText=l),s.style.cssText=l+"width:0.1px;height:0.1px;top:"+a+"px;left:"+i+"px",f.appendChild(s))),s}throw"Need document and parent."}function A(e,t,n,o,r,i,a){return e.a=t,e.b=n,e.c=o,e.d=r,e.e=i,e.f=a,e}var h,u,r,i,f,g,x,y,m,t,v="transform",b=v+"Origin",T=function _setDoc(e){var t=e.ownerDocument||e;!(v in e.style)&&"msTransform"in e.style&&(b=(v="msTransform")+"Origin");for(;t.parentNode&&(t=t.parentNode););if(u=window,x=new ge,t){r=(h=t).documentElement,i=t.body,(y=h.createElementNS("http://www.w3.org/2000/svg","g")).style.transform="none";var n=t.createElement("div"),o=t.createElement("div");i.appendChild(n),n.appendChild(o),n.style.position="static",n.style[v]="translate3d(0,0,1px)",m=o.offsetParent!==n,i.removeChild(n)}return t},E=function _forceNonZeroScale(e){for(var t,n;e&&e!==i;)(n=e._gsap)&&n.uncache&&n.get(e,"x"),n&&!n.scaleX&&!n.scaleY&&n.renderTransform&&(n.scaleX=n.scaleY=1e-4,n.renderTransform(1,n),t?t.push(n):t=[n]),e=e.parentNode;return t},M=[],P=[],D=function _getDocScrollTop(){return u.pageYOffset||h.scrollTop||r.scrollTop||i.scrollTop||0},S=function _getDocScrollLeft(){return u.pageXOffset||h.scrollLeft||r.scrollLeft||i.scrollLeft||0},C=function _svgOwner(e){return e.ownerSVGElement||("svg"===(e.tagName+"").toLowerCase()?e:null)},L=function _isFixed(e){return"fixed"===u.getComputedStyle(e).position||((e=e.parentNode)&&1===e.nodeType?_isFixed(e):void 0)},N=function _placeSiblings(e,t){var n,o,r,i,a,l,s=C(e),c=e===s,d=s?M:P,p=e.parentNode;if(e===u)return e;if(d.length||d.push(w(e,1),w(e,2),w(e,3)),n=s?g:f,s)c?(i=-(r=function _getCTM(e){var t,n=e.getCTM();return n||(t=e.style[v],e.style[v]="none",e.appendChild(y),n=y.getCTM(),e.removeChild(y),t?e.style[v]=t:e.style.removeProperty(v.replace(/([A-Z])/g,"-$1").toLowerCase())),n||x.clone()}(e)).e/r.a,a=-r.f/r.d,o=x):e.getBBox?(r=e.getBBox(),i=(o=(o=e.transform?e.transform.baseVal:{}).numberOfItems?1<o.numberOfItems?function _consolidate(e){for(var t=new ge,n=0;n<e.numberOfItems;n++)t.multiply(e.getItem(n).matrix);return t}(o):o.getItem(0).matrix:x).a*r.x+o.c*r.y,a=o.b*r.x+o.d*r.y):(o=new ge,i=a=0),t&&"g"===e.tagName.toLowerCase()&&(i=a=0),(c?s:p).appendChild(n),n.setAttribute("transform","matrix("+o.a+","+o.b+","+o.c+","+o.d+","+(o.e+i)+","+(o.f+a)+")");else{if(i=a=0,m)for(o=e.offsetParent,r=e;(r=r&&r.parentNode)&&r!==o&&r.parentNode;)4<(u.getComputedStyle(r)[v]+"").length&&(i=r.offsetLeft,a=r.offsetTop,r=0);if("absolute"!==(l=u.getComputedStyle(e)).position&&"fixed"!==l.position)for(o=e.offsetParent;p&&p!==o;)i+=p.scrollLeft||0,a+=p.scrollTop||0,p=p.parentNode;(r=n.style).top=e.offsetTop-a+"px",r.left=e.offsetLeft-i+"px",r[v]=l[v],r[b]=l[b],r.position="fixed"===l.position?"fixed":"absolute",e.parentNode.appendChild(n)}return n},ge=((t=Matrix2D.prototype).inverse=function inverse(){var e=this.a,t=this.b,n=this.c,o=this.d,r=this.e,i=this.f,a=e*o-t*n||1e-10;return A(this,o/a,-t/a,-n/a,e/a,(n*i-o*r)/a,-(e*i-t*r)/a)},t.multiply=function multiply(e){var t=this.a,n=this.b,o=this.c,r=this.d,i=this.e,a=this.f,l=e.a,s=e.c,c=e.b,d=e.d,p=e.e,u=e.f;return A(this,l*t+c*o,l*n+c*r,s*t+d*o,s*n+d*r,i+p*t+u*o,a+p*n+u*r)},t.clone=function clone(){return new Matrix2D(this.a,this.b,this.c,this.d,this.e,this.f)},t.equals=function equals(e){var t=this.a,n=this.b,o=this.c,r=this.d,i=this.e,a=this.f;return t===e.a&&n===e.b&&o===e.c&&r===e.d&&i===e.e&&a===e.f},t.apply=function apply(e,t){void 0===t&&(t={});var n=e.x,o=e.y,r=this.a,i=this.b,a=this.c,l=this.d,s=this.e,c=this.f;return t.x=n*r+o*a+s||0,t.y=n*i+o*l+c||0,t},Matrix2D);function Matrix2D(e,t,n,o,r,i){void 0===e&&(e=1),void 0===t&&(t=0),void 0===n&&(n=0),void 0===o&&(o=1),void 0===r&&(r=0),void 0===i&&(i=0),A(this,e,t,n,o,r,i)}function getGlobalMatrix(e,t,n,o){if(!e||!e.parentNode||(h||T(e)).documentElement===e)return new ge;var r=E(e),i=C(e)?M:P,a=N(e,n),l=i[0].getBoundingClientRect(),s=i[1].getBoundingClientRect(),c=i[2].getBoundingClientRect(),d=a.parentNode,p=!o&&L(e),u=new ge((s.left-l.left)/100,(s.top-l.top)/100,(c.left-l.left)/100,(c.top-l.top)/100,l.left+(p?0:S()),l.top+(p?0:D()));if(d.removeChild(a),r)for(l=r.length;l--;)(s=r[l]).scaleX=s.scaleY=0,s.renderTransform(1,s);return t?u.inverse():u}function W(){return"undefined"!=typeof window}function X(){return xe||W()&&(xe=window.gsap)&&xe.registerPlugin&&xe}function Y(e){return"function"==typeof e}function Z(e){return"object"==typeof e}function $(e){return void 0===e}function _(){return!1}function ca(e){return Math.round(1e4*e)/1e4}function ea(e,t){var n=me.createElementNS?me.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):me.createElement(e);return n.style?n:me.createElement(e)}function qa(e,t){var n,o={};for(n in e)o[n]=t?e[n]*t:e[n];return o}function sa(e,t){for(var n,o=e.length;o--;)t?e[o].style.touchAction=t:e[o].style.removeProperty("touch-action"),(n=e[o].children)&&n.length&&sa(n,t)}function ta(){return Re.forEach(function(e){return e()})}function va(){return!Re.length&&xe.ticker.remove(ta)}function wa(e){for(var t=Re.length;t--;)Re[t]===e&&Re.splice(t,1);xe.to(va,{overwrite:!0,delay:15,duration:0,onComplete:va,data:"_draggable"})}function ya(e,t,n,o){if(e.addEventListener){var r=Me[t];o=o||(d?{passive:!1}:null),e.addEventListener(r||t,n,o),r&&t!==r&&e.addEventListener(t,n,o)}}function za(e,t,n,o){if(e.removeEventListener){var r=Me[t];e.removeEventListener(r||t,n,o),r&&t!==r&&e.removeEventListener(t,n,o)}}function Aa(e){e.preventDefault&&e.preventDefault(),e.preventManipulation&&e.preventManipulation()}function Ca(e){Pe=e.touches&&Le<e.touches.length,za(e.target,"touchend",Ca)}function Da(e){Pe=e.touches&&Le<e.touches.length,ya(e.target,"touchend",Ca)}function Ea(e){return ye.pageYOffset||e.scrollTop||e.documentElement.scrollTop||e.body.scrollTop||0}function Fa(e){return ye.pageXOffset||e.scrollLeft||e.documentElement.scrollLeft||e.body.scrollLeft||0}function Ga(e,t){ya(e,"scroll",t),We(e.parentNode)||Ga(e.parentNode,t)}function Ha(e,t){za(e,"scroll",t),We(e.parentNode)||Ha(e.parentNode,t)}function Ja(e,t){var n="x"===t?"Width":"Height",o="scroll"+n,r="client"+n;return Math.max(0,We(e)?Math.max(ve[o],l[o])-(ye["inner"+n]||ve[r]||l[r]):e[o]-e[r])}function Ka(e,t){var n=Ja(e,"x"),o=Ja(e,"y");We(e)?e=He:Ka(e.parentNode,t),e._gsMaxScrollX=n,e._gsMaxScrollY=o,t||(e._gsScrollX=e.scrollLeft||0,e._gsScrollY=e.scrollTop||0)}function La(e,t,n){var o=e.style;o&&($(o[t])&&(t=c(t,e)||t),null==n?o.removeProperty&&o.removeProperty(t.replace(/([A-Z])/g,"-$1").toLowerCase()):o[t]=n)}function Ma(e){return ye.getComputedStyle(e instanceof Element?e:e.host||(e.parentNode||{}).host||e)}function Oa(e){if(e===ye)return p.left=p.top=0,p.width=p.right=ve.clientWidth||e.innerWidth||l.clientWidth||0,p.height=p.bottom=(e.innerHeight||0)-20<ve.clientHeight?ve.clientHeight:e.innerHeight||l.clientHeight||0,p;var t=e.ownerDocument||me,n=$(e.pageX)?e.nodeType||$(e.left)||$(e.top)?Te(e)[0].getBoundingClientRect():e:{left:e.pageX-Fa(t),top:e.pageY-Ea(t),right:e.pageX-Fa(t)+1,bottom:e.pageY-Ea(t)+1};return $(n.right)&&!$(n.width)?(n.right=n.left+n.width,n.bottom=n.top+n.height):$(n.width)&&(n={width:n.right-n.left,height:n.bottom-n.top,right:n.right,left:n.left,bottom:n.bottom,top:n.top}),n}function Pa(e,t,n){var o,r=e.vars,i=r[n],a=e._listeners[t];return Y(i)&&(o=i.apply(r.callbackScope||e,r[n+"Params"]||[e.pointerEvent])),a&&!1===e.dispatchEvent(t)&&(o=!1),o}function Qa(e,t){var n,o,r,i=Te(e)[0];return i.nodeType||i===ye?B(i,t):$(e.left)?{left:o=e.min||e.minX||e.minRotation||0,top:n=e.min||e.minY||0,width:(e.max||e.maxX||e.maxRotation||0)-o,height:(e.max||e.maxY||0)-n}:(r={x:0,y:0},{left:e.left-r.x,top:e.top-r.y,width:e.width,height:e.height})}function Ta(r,i,e,t,a,n){var o,l,s,c={};if(i)if(1!==a&&i instanceof Array){if(c.end=o=[],s=i.length,Z(i[0]))for(l=0;l<s;l++)o[l]=qa(i[l],a);else for(l=0;l<s;l++)o[l]=i[l]*a;e+=1.1,t-=1.1}else Y(i)?c.end=function(e){var t,n,o=i.call(r,e);if(1!==a)if(Z(o)){for(n in t={},o)t[n]=o[n]*a;o=t}else o*=a;return o}:c.end=i;return!e&&0!==e||(c.max=e),!t&&0!==t||(c.min=t),n&&(c.velocity=0),c}function Ua(e){var t;return!(!e||!e.getAttribute||e===l)&&(!("true"!==(t=e.getAttribute("data-clickable"))&&("false"===t||!e.onclick&&!o.test(e.nodeName+"")&&"true"!==e.getAttribute("contentEditable")))||Ua(e.parentNode))}function Va(e,t){for(var n,o=e.length;o--;)(n=e[o]).ondragstart=n.onselectstart=t?null:_,xe.set(n,{lazy:!0,userSelect:t?"text":"none"})}function Za(i,r){i=xe.utils.toArray(i)[0],r=r||{};var a,l,s,e,c,d,p=document.createElement("div"),u=p.style,t=i.firstChild,h=0,f=0,g=i.scrollTop,x=i.scrollLeft,y=i.scrollWidth,m=i.scrollHeight,v=0,w=0,b=0;k&&!1!==r.force3D?(c="translate3d(",d="px,0px)"):R&&(c="translate(",d="px)"),this.scrollTop=function(e,t){if(!arguments.length)return-this.top();this.top(-e,t)},this.scrollLeft=function(e,t){if(!arguments.length)return-this.left();this.left(-e,t)},this.left=function(e,t){if(!arguments.length)return-(i.scrollLeft+f);var n=i.scrollLeft-x,o=f;if((2<n||n<-2)&&!t)return x=i.scrollLeft,xe.killTweensOf(this,{left:1,scrollLeft:1}),this.left(-x),void(r.onKill&&r.onKill());(e=-e)<0?(f=e-.5|0,e=0):w<e?(f=e-w|0,e=w):f=0,(f||o)&&(this._skip||(u[R]=c+-f+"px,"+-h+d),0<=f+v&&(u.paddingRight=f+v+"px")),i.scrollLeft=0|e,x=i.scrollLeft},this.top=function(e,t){if(!arguments.length)return-(i.scrollTop+h);var n=i.scrollTop-g,o=h;if((2<n||n<-2)&&!t)return g=i.scrollTop,xe.killTweensOf(this,{top:1,scrollTop:1}),this.top(-g),void(r.onKill&&r.onKill());(e=-e)<0?(h=e-.5|0,e=0):b<e?(h=e-b|0,e=b):h=0,(h||o)&&(this._skip||(u[R]=c+-f+"px,"+-h+d)),i.scrollTop=0|e,g=i.scrollTop},this.maxScrollTop=function(){return b},this.maxScrollLeft=function(){return w},this.disable=function(){for(t=p.firstChild;t;)e=t.nextSibling,i.appendChild(t),t=e;i===p.parentNode&&i.removeChild(p)},this.enable=function(){if((t=i.firstChild)!==p){for(;t;)e=t.nextSibling,p.appendChild(t),t=e;i.appendChild(p),this.calibrate()}},this.calibrate=function(e){var t,n,o,r=i.clientWidth===a;g=i.scrollTop,x=i.scrollLeft,r&&i.clientHeight===l&&p.offsetHeight===s&&y===i.scrollWidth&&m===i.scrollHeight&&!e||((h||f)&&(n=this.left(),o=this.top(),this.left(-i.scrollLeft),this.top(-i.scrollTop)),t=Ma(i),r&&!e||(u.display="block",u.width="auto",u.paddingRight="0px",(v=Math.max(0,i.scrollWidth-i.clientWidth))&&(v+=parseFloat(t.paddingLeft)+(O?parseFloat(t.paddingRight):0))),u.display="inline-block",u.position="relative",u.overflow="visible",u.verticalAlign="top",u.boxSizing="content-box",u.width="100%",u.paddingRight=v+"px",O&&(u.paddingBottom=t.paddingBottom),a=i.clientWidth,l=i.clientHeight,y=i.scrollWidth,m=i.scrollHeight,w=i.scrollWidth-a,b=i.scrollHeight-l,s=p.offsetHeight,u.display="block",(n||o)&&(this.left(n),this.top(o)))},this.content=p,this.element=i,this._skip=!1,this.enable()}function $a(e){if(W()&&document.body){var t=window&&window.navigator;ye=window,me=document,ve=me.documentElement,l=me.body,s=ea("div"),Xe=!!window.PointerEvent,(we=ea("div")).style.cssText="visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;cursor:grab",Se="grab"===we.style.cursor?"grab":"move",De=t&&-1!==t.userAgent.toLowerCase().indexOf("android"),Ee="ontouchstart"in ve&&"orientation"in ye||t&&(0<t.MaxTouchPoints||0<t.msMaxTouchPoints),o=ea("div"),r=ea("div"),i=r.style,a=l,i.display="inline-block",i.position="relative",o.style.cssText="width:90px;height:40px;padding:10px;overflow:auto;visibility:hidden",o.appendChild(r),a.appendChild(o),n=r.offsetHeight+18>o.scrollHeight,a.removeChild(o),O=n,Me=function(e){for(var t=e.split(","),n=(("onpointerdown"in s?"pointerdown,pointermove,pointerup,pointercancel":"onmspointerdown"in s?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":e).split(",")),o={},r=4;-1<--r;)o[t[r]]=n[r],o[n[r]]=t[r];try{ve.addEventListener("test",null,Object.defineProperty({},"passive",{get:function get(){d=1}}))}catch(e){}return o}("touchstart,touchmove,touchend,touchcancel"),ya(me,"touchcancel",_),ya(ye,"touchmove",_),l&&l.addEventListener("touchstart",_),ya(me,"contextmenu",function(){for(var e in Be)Be[e].isPressed&&Be[e].endDrag()}),xe=be=X()}var n,o,r,i,a;xe?(Ye=xe.plugins.inertia,Ce=xe.core.context||function(){},c=xe.utils.checkPrefix,R=c(R),_e=c(_e),Te=xe.utils.toArray,k=!!c("perspective")):e&&console.warn("Please gsap.registerPlugin(Draggable)")}var xe,ye,me,ve,l,s,we,be,c,Te,d,Ee,Me,Pe,De,Ye,Se,Xe,Ce,k,O,n,Le=0,R="transform",_e="transformOrigin",Ne=Array.isArray,ke=180/Math.PI,Oe=1e20,a=new ge,Ae=Date.now||function(){return(new Date).getTime()},Re=[],Be={},Fe=0,o=/^(?:a|input|textarea|button|select)$/i,ze=0,Ie={},He={},We=function _isRoot(e){return!(e&&e!==ve&&9!==e.nodeType&&e!==me.body&&e!==ye&&e.nodeType&&e.parentNode)},p={},Ge={},B=function _getElementBounds(e,t){t=Te(t)[0];var n,o,r,i,a,l,s,c,d,p,u,h,f,g=e.getBBox&&e.ownerSVGElement,x=e.ownerDocument||me;if(e===ye)r=Ea(x),o=(n=Fa(x))+(x.documentElement.clientWidth||e.innerWidth||x.body.clientWidth||0),i=r+((e.innerHeight||0)-20<x.documentElement.clientHeight?x.documentElement.clientHeight:e.innerHeight||x.body.clientHeight||0);else{if(t===ye||$(t))return e.getBoundingClientRect();n=r=0,g?(u=(p=e.getBBox()).width,h=p.height):(e.viewBox&&(p=e.viewBox.baseVal)&&(n=p.x||0,r=p.y||0,u=p.width,h=p.height),u||(p="border-box"===(f=Ma(e)).boxSizing,u=(parseFloat(f.width)||e.clientWidth||0)+(p?0:parseFloat(f.borderLeftWidth)+parseFloat(f.borderRightWidth)),h=(parseFloat(f.height)||e.clientHeight||0)+(p?0:parseFloat(f.borderTopWidth)+parseFloat(f.borderBottomWidth)))),o=u,i=h}return e===t?{left:n,top:r,width:o-n,height:i-r}:(l=(a=getGlobalMatrix(t,!0).multiply(getGlobalMatrix(e))).apply({x:n,y:r}),s=a.apply({x:o,y:r}),c=a.apply({x:o,y:i}),d=a.apply({x:n,y:i}),{left:n=Math.min(l.x,s.x,c.x,d.x),top:r=Math.min(l.y,s.y,c.y,d.y),width:Math.max(l.x,s.x,c.x,d.x)-n,height:Math.max(l.y,s.y,c.y,d.y)-r})},F=((n=EventDispatcher.prototype).addEventListener=function addEventListener(e,t){var n=this._listeners[e]||(this._listeners[e]=[]);~n.indexOf(t)||n.push(t)},n.removeEventListener=function removeEventListener(e,t){var n=this._listeners[e],o=n&&n.indexOf(t);0<=o&&n.splice(o,1)},n.dispatchEvent=function dispatchEvent(t){var n,o=this;return(this._listeners[t]||[]).forEach(function(e){return!1===e.call(o,{type:t,target:o.target})&&(n=!1)}),n},EventDispatcher);function EventDispatcher(e){this._listeners={},this.target=e||this}var $e,z=(function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}(Draggable,$e=F),Draggable.register=function register(e){xe=e,$a()},Draggable.create=function create(e,t){return be||$a(!0),Te(e).map(function(e){return new Draggable(e,t)})},Draggable.get=function get(e){return Be[(Te(e)[0]||{})._gsDragID]},Draggable.timeSinceDrag=function timeSinceDrag(){return(Ae()-ze)/1e3},Draggable.hitTest=function hitTest(e,t,n){if(e===t)return!1;var o,r,i,a=Oa(e),l=Oa(t),s=a.top,c=a.left,d=a.right,p=a.bottom,u=a.width,h=a.height,f=l.left>d||l.right<c||l.top>p||l.bottom<s;return f||!n?!f:(i=-1!==(n+"").indexOf("%"),n=parseFloat(n)||0,(o={left:Math.max(c,l.left),top:Math.max(s,l.top)}).width=Math.min(d,l.right)-o.left,o.height=Math.min(p,l.bottom)-o.top,!(o.width<0||o.height<0)&&(i?u*h*(n*=.01)<=(r=o.width*o.height)||r>=l.width*l.height*n:o.width>n&&o.height>n))},Draggable);function Draggable(h,p){var e;e=$e.call(this)||this,be||$a(1),h=Te(h)[0],Ye=Ye||xe.plugins.inertia,e.vars=p=qa(p||{}),e.target=h,e.x=e.y=e.rotation=0,e.dragResistance=parseFloat(p.dragResistance)||0,e.edgeResistance=isNaN(p.edgeResistance)?1:parseFloat(p.edgeResistance)||0,e.lockAxis=p.lockAxis,e.autoScroll=p.autoScroll||0,e.lockedAxis=null,e.allowEventDefault=!!p.allowEventDefault,xe.getProperty(h,"x");function Pg(e,t){return parseFloat(se.get(h,e,t))}function wh(e){return Aa(e),e.stopImmediatePropagation&&e.stopImmediatePropagation(),!1}function xh(e){if(j.autoScroll&&j.isDragging&&(te||L)){var t,n,o,r,i,a,l,s,c=h,d=15*j.autoScroll;for(te=!1,He.scrollTop=null!=ye.pageYOffset?ye.pageYOffset:null!=de.documentElement.scrollTop?de.documentElement.scrollTop:de.body.scrollTop,He.scrollLeft=null!=ye.pageXOffset?ye.pageXOffset:null!=de.documentElement.scrollLeft?de.documentElement.scrollLeft:de.body.scrollLeft,r=j.pointerX-He.scrollLeft,i=j.pointerY-He.scrollTop;c&&!n;)t=(n=We(c.parentNode))?He:c.parentNode,o=n?{bottom:Math.max(ve.clientHeight,ye.innerHeight||0),right:Math.max(ve.clientWidth,ye.innerWidth||0),left:0,top:0}:t.getBoundingClientRect(),a=l=0,U&&((s=t._gsMaxScrollY-t.scrollTop)<0?l=s:i>o.bottom-re&&s?(te=!0,l=Math.min(s,d*(1-Math.max(0,o.bottom-i)/re)|0)):i<o.top+ne&&t.scrollTop&&(te=!0,l=-Math.min(t.scrollTop,d*(1-Math.max(0,i-o.top)/ne)|0)),l&&(t.scrollTop+=l)),J&&((s=t._gsMaxScrollX-t.scrollLeft)<0?a=s:r>o.right-oe&&s?(te=!0,a=Math.min(s,d*(1-Math.max(0,o.right-r)/oe)|0)):r<o.left+ie&&t.scrollLeft&&(te=!0,a=-Math.min(t.scrollLeft,d*(1-Math.max(0,r-o.left)/ie)|0)),a&&(t.scrollLeft+=a)),n&&(a||l)&&(ye.scrollTo(t.scrollLeft,t.scrollTop),he(j.pointerX+a,j.pointerY+l)),c=t}if(L){var p=j.x,u=j.y;G?(j.deltaX=p-parseFloat(se.rotation),j.rotation=p,se.rotation=p+"deg",se.renderTransform(1,se)):f?(U&&(j.deltaY=u-f.top(),f.top(u)),J&&(j.deltaX=p-f.left(),f.left(p))):W?(U&&(j.deltaY=u-parseFloat(se.y),se.y=u+"px"),J&&(j.deltaX=p-parseFloat(se.x),se.x=p+"px"),se.renderTransform(1,se)):(U&&(j.deltaY=u-parseFloat(h.style.top||0),h.style.top=u+"px"),J&&(j.deltaX=p-parseFloat(h.style.left||0),h.style.left=p+"px")),!g||e||F||(!(F=!0)===Pa(j,"drag","onDrag")&&(J&&(j.x-=j.deltaX),U&&(j.y-=j.deltaY),xh(!0)),F=!1)}L=!1}function yh(e,t){var n,o,r=j.x,i=j.y;h._gsap||(se=xe.core.getCache(h)),se.uncache&&xe.getProperty(h,"x"),W?(j.x=parseFloat(se.x),j.y=parseFloat(se.y)):G?j.x=j.rotation=parseFloat(se.rotation):f?(j.y=f.top(),j.x=f.left()):(j.y=parseFloat(h.style.top||(o=Ma(h))&&o.top)||0,j.x=parseFloat(h.style.left||(o||{}).left)||0),(_||N||k)&&!t&&(j.isDragging||j.isThrowing)&&(k&&(Ie.x=j.x,Ie.y=j.y,(n=k(Ie)).x!==j.x&&(j.x=n.x,L=!0),n.y!==j.y&&(j.y=n.y,L=!0)),_&&(n=_(j.x))!==j.x&&(j.x=n,G&&(j.rotation=n),L=!0),N&&((n=N(j.y))!==j.y&&(j.y=n),L=!0)),L&&xh(!0),e||(j.deltaX=j.x-r,j.deltaY=j.y-i,Pa(j,"throwupdate","onThrowUpdate"))}function zh(a,l,s,n){return null==l&&(l=-Oe),null==s&&(s=Oe),Y(a)?function(e){var t=j.isPressed?1-j.edgeResistance:1;return a.call(j,(s<e?s+(e-s)*t:e<l?l+(e-l)*t:e)*n)*n}:Ne(a)?function(e){for(var t,n,o=a.length,r=0,i=Oe;-1<--o;)(n=(t=a[o])-e)<0&&(n=-n),n<i&&l<=t&&t<=s&&(r=o,i=n);return a[r]}:isNaN(a)?function(e){return e}:function(){return a*n}}function Bh(){var e,t,n,o;M=!1,f?(f.calibrate(),j.minX=D=-f.maxScrollLeft(),j.minY=X=-f.maxScrollTop(),j.maxX=P=j.maxY=S=0,M=!0):p.bounds&&(e=Qa(p.bounds,h.parentNode),G?(j.minX=D=e.left,j.maxX=P=e.left+e.width,j.minY=X=j.maxY=S=0):$(p.bounds.maxX)&&$(p.bounds.maxY)?(t=Qa(h,h.parentNode),j.minX=D=Math.round(Pg(V,"px")+e.left-t.left),j.minY=X=Math.round(Pg(K,"px")+e.top-t.top),j.maxX=P=Math.round(D+(e.width-t.width)),j.maxY=S=Math.round(X+(e.height-t.height))):(e=p.bounds,j.minX=D=e.minX,j.minY=X=e.minY,j.maxX=P=e.maxX,j.maxY=S=e.maxY),P<D&&(j.minX=P,j.maxX=P=D,D=j.minX),S<X&&(j.minY=S,j.maxY=S=X,X=j.minY),G&&(j.minRotation=D,j.maxRotation=P),M=!0),p.liveSnap&&(n=!0===p.liveSnap?p.snap||{}:p.liveSnap,o=Ne(n)||Y(n),G?(_=zh(o?n:n.rotation,D,P,1),N=null):n.points?k=function buildPointSnapFunc(s,l,c,d,p,u,h){return u=u&&u<Oe?u*u:Oe,Y(s)?function(e){var t,n,o,r=j.isPressed?1-j.edgeResistance:1,i=e.x,a=e.y;return e.x=i=c<i?c+(i-c)*r:i<l?l+(i-l)*r:i,e.y=a=p<a?p+(a-p)*r:a<d?d+(a-d)*r:a,(t=s.call(j,e))!==e&&(e.x=t.x,e.y=t.y),1!==h&&(e.x*=h,e.y*=h),u<Oe&&(n=e.x-i,o=e.y-a,u<n*n+o*o&&(e.x=i,e.y=a)),e}:Ne(s)?function(e){for(var t,n,o,r,i=s.length,a=0,l=Oe;-1<--i;)(r=(t=(o=s[i]).x-e.x)*t+(n=o.y-e.y)*n)<l&&(a=i,l=r);return l<=u?s[a]:e}:function(e){return e}}(o?n:n.points,D,P,X,S,n.radius,f?-1:1):(J&&(_=zh(o?n:n.x||n.left||n.scrollLeft,D,P,f?-1:1)),U&&(N=zh(o?n:n.y||n.top||n.scrollTop,X,S,f?-1:1))))}function Ch(){j.isThrowing=!1,Pa(j,"throwcomplete","onThrowComplete")}function Dh(){j.isThrowing=!1}function Eh(e,t){var n,o,r,i;e&&Ye?(!0===e&&(n=p.snap||p.liveSnap||{},o=Ne(n)||Y(n),e={resistance:(p.throwResistance||p.resistance||1e3)/(G?10:1)},G?e.rotation=Ta(j,o?n:n.rotation,P,D,1,t):(J&&(e[V]=Ta(j,o?n:n.points||n.x||n.left,P,D,f?-1:1,t||"x"===j.lockedAxis)),U&&(e[K]=Ta(j,o?n:n.points||n.y||n.top,S,X,f?-1:1,t||"y"===j.lockedAxis)),(n.points||Ne(n)&&Z(n[0]))&&(e.linkedProps=V+","+K,e.radius=n.radius))),j.isThrowing=!0,i=isNaN(p.overshootTolerance)?1===p.edgeResistance?0:1-j.edgeResistance+.2:p.overshootTolerance,e.duration||(e.duration={max:Math.max(p.minDuration||0,"maxDuration"in p?p.maxDuration:2),min:isNaN(p.minDuration)?0===i||Z(e)&&1e3<e.resistance?0:.5:p.minDuration,overshoot:i}),j.tween=r=xe.to(f||h,{inertia:e,data:"_draggable",onComplete:Ch,onInterrupt:Dh,onUpdate:p.fastMode?Pa:yh,onUpdateParams:p.fastMode?[j,"onthrowupdate","onThrowUpdate"]:n&&n.radius?[!1,!0]:[]}),p.fastMode||(f&&(f._skip=!0),r.render(1e9,!0,!0),yh(!0,!0),j.endX=j.x,j.endY=j.y,G&&(j.endRotation=j.x),r.play(0),yh(!0,!0),f&&(f._skip=!1))):M&&j.applyBounds()}function Fh(e){var t,n=O;O=getGlobalMatrix(h.parentNode,!0),e&&j.isPressed&&!O.equals(n||new ge)&&(t=n.inverse().apply({x:w,y:b}),O.apply(t,t),w=t.x,b=t.y),O.equals(a)&&(O=null)}function Gh(){var e,t,n,o=1-j.edgeResistance,r=ce?Fa(de):0,i=ce?Ea(de):0;W&&(se.x=Pg(V,"px")+"px",se.y=Pg(K,"px")+"px",se.renderTransform()),Fh(!1),Ge.x=j.pointerX-r,Ge.y=j.pointerY-i,O&&O.apply(Ge,Ge),w=Ge.x,b=Ge.y,L&&(he(j.pointerX,j.pointerY),xh(!0)),d=getGlobalMatrix(h),f?(Bh(),E=f.top(),T=f.left()):(pe()?(yh(!0,!0),Bh()):j.applyBounds(),G?(e=h.ownerSVGElement?[se.xOrigin-h.getBBox().x,se.yOrigin-h.getBBox().y]:(Ma(h)[_e]||"0 0").split(" "),C=j.rotationOrigin=getGlobalMatrix(h).apply({x:parseFloat(e[0])||0,y:parseFloat(e[1])||0}),yh(!0,!0),t=j.pointerX-C.x-r,n=C.y-j.pointerY+i,T=j.x,E=j.y=Math.atan2(n,t)*ke):(E=Pg(K,"px"),T=Pg(V,"px"))),M&&o&&(P<T?T=P+(T-P)/o:T<D&&(T=D-(D-T)/o),G||(S<E?E=S+(E-S)/o:E<X&&(E=X-(X-E)/o))),j.startX=T=ca(T),j.startY=E=ca(E)}function Ih(){!we.parentNode||pe()||j.isDragging||we.parentNode.removeChild(we)}function Jh(e,t){var n;if(!u||j.isPressed||!e||!("mousedown"!==e.type&&"pointerdown"!==e.type||t)&&Ae()-le<30&&Me[j.pointerEvent.type])I&&e&&u&&Aa(e);else{if(A=pe(),H=!1,j.pointerEvent=e,Me[e.type]?(v=~e.type.indexOf("touch")?e.currentTarget||e.target:de,ya(v,"touchend",fe),ya(v,"touchmove",ue),ya(v,"touchcancel",fe),ya(de,"touchstart",Da)):(v=null,ya(de,"mousemove",ue)),B=null,Xe&&v||(ya(de,"mouseup",fe),e&&e.target&&ya(e.target,"mouseup",fe)),m=ae.call(j,e.target)&&!1===p.dragClickables&&!t)return ya(e.target,"change",fe),Pa(j,"pressInit","onPressInit"),Pa(j,"press","onPress"),Va(Q,!0),void(I=!1);if(R=!(!v||J==U||!1===j.vars.allowNativeTouchScrolling||j.vars.allowContextMenu&&e&&(e.ctrlKey||2<e.which))&&(J?"y":"x"),(I=!R&&!j.allowEventDefault)&&(Aa(e),ya(ye,"touchforcechange",Aa)),e.changedTouches?(e=x=e.changedTouches[0],y=e.identifier):e.pointerId?y=e.pointerId:x=y=null,Le++,function _addToRenderQueue(e){Re.push(e),1===Re.length&&xe.ticker.add(ta)}(xh),b=j.pointerY=e.pageY,w=j.pointerX=e.pageX,Pa(j,"pressInit","onPressInit"),(R||j.autoScroll)&&Ka(h.parentNode),!h.parentNode||!j.autoScroll||f||G||!h.parentNode._gsMaxScrollX||we.parentNode||h.getBBox||(we.style.width=h.parentNode.scrollWidth+"px",h.parentNode.appendChild(we)),Gh(),j.tween&&j.tween.kill(),j.isThrowing=!1,xe.killTweensOf(f||h,o,!0),f&&xe.killTweensOf(h,{scrollTo:1},!0),j.tween=j.lockedAxis=null,!p.zIndexBoost&&(G||f||!1===p.zIndexBoost)||(h.style.zIndex=Draggable.zIndex++),j.isPressed=!0,g=!(!p.onDrag&&!j._listeners.drag),s=!(!p.onMove&&!j._listeners.move),!1!==p.cursor||p.activeCursor)for(n=Q.length;-1<--n;)xe.set(Q[n],{cursor:p.activeCursor||p.cursor||("grab"===Se?"grabbing":Se)});Pa(j,"press","onPress")}}function Nh(e){if(e&&j.isDragging&&!f){var t=e.target||h.parentNode,n=t.scrollLeft-t._gsScrollX,o=t.scrollTop-t._gsScrollY;(n||o)&&(O?(w-=n*O.a+o*O.c,b-=o*O.d+n*O.b):(w-=n,b-=o),t._gsScrollX+=n,t._gsScrollY+=o,he(j.pointerX,j.pointerY))}}function Oh(e){var t=Ae(),n=t-le<100,o=t-ee<50,r=n&&z===le,i=j.pointerEvent&&j.pointerEvent.defaultPrevented,a=n&&c===le,l=e.isTrusted||null==e.isTrusted&&n&&r;if((r||o&&!1!==j.vars.suppressClickOnDrag)&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),n&&(!j.pointerEvent||!j.pointerEvent.defaultPrevented)&&(!r||l&&!a))return l&&r&&(c=le),void(z=le);(j.isPressed||o||n)&&(l&&e.detail&&n&&!i||Aa(e)),n||o||H||(e&&e.target&&(j.pointerEvent=e),Pa(j,"click","onClick"))}function Ph(e){return O?{x:e.x*O.a+e.y*O.c+O.e,y:e.x*O.b+e.y*O.d+O.f}:{x:e.x,y:e.y}}var u,f,w,b,T,E,M,g,s,P,D,S,X,x,y,C,L,t,_,N,k,m,v,O,A,R,B,F,z,c,I,d,H,n=(p.type||"x,y").toLowerCase(),W=~n.indexOf("x")||~n.indexOf("y"),G=-1!==n.indexOf("rotation"),V=G?"rotation":W?"x":"left",K=W?"y":"top",J=!(!~n.indexOf("x")&&!~n.indexOf("left")&&"scroll"!==n),U=!(!~n.indexOf("y")&&!~n.indexOf("top")&&"scroll"!==n),q=p.minimumMovement||2,j=_assertThisInitialized(e),Q=Te(p.trigger||p.handle||h),o={},ee=0,te=!1,ne=p.autoScrollMarginTop||40,oe=p.autoScrollMarginRight||40,re=p.autoScrollMarginBottom||40,ie=p.autoScrollMarginLeft||40,ae=p.clickableTest||Ua,le=0,se=h._gsap||xe.core.getCache(h),ce=function _isFixed(e){return"fixed"===Ma(e).position||((e=e.parentNode)&&1===e.nodeType?_isFixed(e):void 0)}(h),de=h.ownerDocument||me,pe=function isTweening(){return j.tween&&j.tween.isActive()},ue=function onMove(e){var t,n,o,r,i,a,l=e;if(u&&!Pe&&j.isPressed&&e){if(t=(j.pointerEvent=e).changedTouches){if((e=t[0])!==x&&e.identifier!==y){for(r=t.length;-1<--r&&(e=t[r]).identifier!==y&&e.target!==h;);if(r<0)return}}else if(e.pointerId&&y&&e.pointerId!==y)return;v&&R&&!B&&(Ge.x=e.pageX-(ce?Fa(de):0),Ge.y=e.pageY-(ce?Ea(de):0),O&&O.apply(Ge,Ge),n=Ge.x,o=Ge.y,((i=Math.abs(n-w))!==(a=Math.abs(o-b))&&(q<i||q<a)||De&&R===B)&&(B=a<i&&J?"x":"y",R&&B!==R&&ya(ye,"touchforcechange",Aa),!1!==j.vars.lockAxisOnTouchScroll&&J&&U&&(j.lockedAxis="x"===B?"y":"x",Y(j.vars.onLockAxis)&&j.vars.onLockAxis.call(j,l)),De&&R===B))?fe(l):(I=j.allowEventDefault||R&&(!B||R===B)||!1===l.cancelable?I&&!1:(Aa(l),!0),j.autoScroll&&(te=!0),he(e.pageX,e.pageY,s))}else I&&e&&u&&Aa(e)},he=function setPointerPosition(e,t,n){var o,r,i,a,l,s,c=1-j.dragResistance,d=1-j.edgeResistance,p=j.pointerX,u=j.pointerY,h=E,f=j.x,g=j.y,x=j.endX,y=j.endY,m=j.endRotation,v=L;j.pointerX=e,j.pointerY=t,ce&&(e-=Fa(de),t-=Ea(de)),G?(a=Math.atan2(C.y-t,e-C.x)*ke,180<(l=j.y-a)?(E-=360,j.y=a):l<-180&&(E+=360,j.y=a),i=j.x!==T||Math.abs(E-a)>q?(j.y=a,T+(E-a)*c):T):(O&&(s=e*O.a+t*O.c+O.e,t=e*O.b+t*O.d+O.f,e=s),(r=t-b)<q&&-q<r&&(r=0),(o=e-w)<q&&-q<o&&(o=0),(j.lockAxis||j.lockedAxis)&&(o||r)&&((s=j.lockedAxis)||(j.lockedAxis=s=J&&Math.abs(o)>Math.abs(r)?"y":U?"x":null,s&&Y(j.vars.onLockAxis)&&j.vars.onLockAxis.call(j,j.pointerEvent)),"y"===s?r=0:"x"===s&&(o=0)),i=ca(T+o*c),a=ca(E+r*c)),(_||N||k)&&(j.x!==i||j.y!==a&&!G)&&(k&&(Ie.x=i,Ie.y=a,s=k(Ie),i=ca(s.x),a=ca(s.y)),_&&(i=ca(_(i))),N&&(a=ca(N(a)))),M&&(P<i?i=P+Math.round((i-P)*d):i<D&&(i=D+Math.round((i-D)*d)),G||(S<a?a=Math.round(S+(a-S)*d):a<X&&(a=Math.round(X+(a-X)*d)))),j.x===i&&(j.y===a||G)||(G?(j.endRotation=j.x=j.endX=i,L=!0):(U&&(j.y=j.endY=a,L=!0),J&&(j.x=j.endX=i,L=!0)),n&&!1===Pa(j,"move","onMove")?(j.pointerX=p,j.pointerY=u,E=h,j.x=f,j.y=g,j.endX=x,j.endY=y,j.endRotation=m,L=v):!j.isDragging&&j.isPressed&&(j.isDragging=H=!0,Pa(j,"dragstart","onDragStart")))},fe=function onRelease(e,t){if(u&&j.isPressed&&(!e||null==y||t||!(e.pointerId&&e.pointerId!==y&&e.target!==h||e.changedTouches&&!function _hasTouchID(e,t){for(var n=e.length;n--;)if(e[n].identifier===t)return!0}(e.changedTouches,y)))){j.isPressed=!1;var n,o,r,i,a,l=e,s=j.isDragging,c=j.vars.allowContextMenu&&e&&(e.ctrlKey||2<e.which),d=xe.delayedCall(.001,Ih);if(v?(za(v,"touchend",onRelease),za(v,"touchmove",ue),za(v,"touchcancel",onRelease),za(de,"touchstart",Da)):za(de,"mousemove",ue),za(ye,"touchforcechange",Aa),Xe&&v||(za(de,"mouseup",onRelease),e&&e.target&&za(e.target,"mouseup",onRelease)),L=!1,s&&(ee=ze=Ae(),j.isDragging=!1),wa(xh),m&&!c)return e&&(za(e.target,"change",onRelease),j.pointerEvent=l),Va(Q,!1),Pa(j,"release","onRelease"),Pa(j,"click","onClick"),void(m=!1);for(o=Q.length;-1<--o;)La(Q[o],"cursor",p.cursor||(!1!==p.cursor?Se:null));if(Le--,e){if((n=e.changedTouches)&&(e=n[0])!==x&&e.identifier!==y){for(o=n.length;-1<--o&&(e=n[o]).identifier!==y&&e.target!==h;);if(o<0&&!t)return}j.pointerEvent=l,j.pointerX=e.pageX,j.pointerY=e.pageY}return c&&l?(Aa(l),I=!0,Pa(j,"release","onRelease")):l&&!s?(I=!1,A&&(p.snap||p.bounds)&&Eh(p.inertia||p.throwProps),Pa(j,"release","onRelease"),De&&"touchmove"===l.type||-1!==l.type.indexOf("cancel")||(Pa(j,"click","onClick"),Ae()-le<300&&Pa(j,"doubleclick","onDoubleClick"),i=l.target||h,le=Ae(),a=function syntheticClick(){le===z||!j.enabled()||j.isPressed||l.defaultPrevented||(i.click?i.click():de.createEvent&&((r=de.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,ye,1,j.pointerEvent.screenX,j.pointerEvent.screenY,j.pointerX,j.pointerY,!1,!1,!1,!1,0,null),i.dispatchEvent(r)))},De||l.defaultPrevented||xe.delayedCall(.05,a))):(Eh(p.inertia||p.throwProps),j.allowEventDefault||!l||!1===p.dragClickables&&ae.call(j,l.target)||!s||R&&(!B||R!==B)||!1===l.cancelable?I=!1:(I=!0,Aa(l)),Pa(j,"release","onRelease")),pe()&&d.duration(j.tween.duration()),s&&Pa(j,"dragend","onDragEnd"),!0}I&&e&&u&&Aa(e)};return(t=Draggable.get(h))&&t.kill(),e.startDrag=function(e,t){var n,o,r,i;Jh(e||j.pointerEvent,!0),t&&!j.hitTest(e||j.pointerEvent)&&(n=Oa(e||j.pointerEvent),o=Oa(h),r=Ph({x:n.left+n.width/2,y:n.top+n.height/2}),i=Ph({x:o.left+o.width/2,y:o.top+o.height/2}),w-=r.x-i.x,b-=r.y-i.y),j.isDragging||(j.isDragging=H=!0,Pa(j,"dragstart","onDragStart"))},e.drag=ue,e.endDrag=function(e){return fe(e||j.pointerEvent,!0)},e.timeSinceDrag=function(){return j.isDragging?0:(Ae()-ee)/1e3},e.timeSinceClick=function(){return(Ae()-le)/1e3},e.hitTest=function(e,t){return Draggable.hitTest(j.target,e,t)},e.getDirection=function(e,t){var n,o,r,i,a,l,s="velocity"===e&&Ye?e:Z(e)&&!G?"element":"start";return"element"===s&&(a=Oa(j.target),l=Oa(e)),n="start"===s?j.x-T:"velocity"===s?Ye.getVelocity(h,V):a.left+a.width/2-(l.left+l.width/2),G?n<0?"counter-clockwise":"clockwise":(t=t||2,o="start"===s?j.y-E:"velocity"===s?Ye.getVelocity(h,K):a.top+a.height/2-(l.top+l.height/2),i=(r=Math.abs(n/o))<1/t?"":n<0?"left":"right",r<t&&(""!==i&&(i+="-"),i+=o<0?"up":"down"),i)},e.applyBounds=function(e,t){var n,o,r,i,a,l;if(e&&p.bounds!==e)return p.bounds=e,j.update(!0,t);if(yh(!0),Bh(),M&&!pe()){if(n=j.x,o=j.y,P<n?n=P:n<D&&(n=D),S<o?o=S:o<X&&(o=X),(j.x!==n||j.y!==o)&&(r=!0,j.x=j.endX=n,G?j.endRotation=n:j.y=j.endY=o,xh(L=!0),j.autoScroll&&!j.isDragging))for(Ka(h.parentNode),i=h,He.scrollTop=null!=ye.pageYOffset?ye.pageYOffset:null!=de.documentElement.scrollTop?de.documentElement.scrollTop:de.body.scrollTop,He.scrollLeft=null!=ye.pageXOffset?ye.pageXOffset:null!=de.documentElement.scrollLeft?de.documentElement.scrollLeft:de.body.scrollLeft;i&&!l;)a=(l=We(i.parentNode))?He:i.parentNode,U&&a.scrollTop>a._gsMaxScrollY&&(a.scrollTop=a._gsMaxScrollY),J&&a.scrollLeft>a._gsMaxScrollX&&(a.scrollLeft=a._gsMaxScrollX),i=a;j.isThrowing&&(r||j.endX>P||j.endX<D||j.endY>S||j.endY<X)&&Eh(p.inertia||p.throwProps,r)}return j},e.update=function(e,t,n){if(t&&j.isPressed){var o=getGlobalMatrix(h),r=d.apply({x:j.x-T,y:j.y-E}),i=getGlobalMatrix(h.parentNode,!0);i.apply({x:o.e-r.x,y:o.f-r.y},r),j.x-=r.x-i.e,j.y-=r.y-i.f,xh(!0),Gh()}var a=j.x,l=j.y;return Fh(!t),e?j.applyBounds():(L&&n&&xh(!0),yh(!0)),t&&(he(j.pointerX,j.pointerY),L&&xh(!0)),j.isPressed&&!t&&(J&&.01<Math.abs(a-j.x)||U&&.01<Math.abs(l-j.y)&&!G)&&Gh(),j.autoScroll&&(Ka(h.parentNode,j.isDragging),te=j.isDragging,xh(!0),Ha(h,Nh),Ga(h,Nh)),j},e.enable=function(e){var t,n,o,r={lazy:!0};if(!1!==p.cursor&&(r.cursor=p.cursor||Se),xe.utils.checkPrefix("touchCallout")&&(r.touchCallout="none"),"soft"!==e){for(sa(Q,J==U?"none":p.allowNativeTouchScrolling&&h.scrollHeight===h.clientHeight==(h.scrollWidth===h.clientHeight)||p.allowEventDefault?"manipulation":J?"pan-y":"pan-x"),n=Q.length;-1<--n;)o=Q[n],Xe||ya(o,"mousedown",Jh),ya(o,"touchstart",Jh),ya(o,"click",Oh,!0),xe.set(o,r),o.getBBox&&o.ownerSVGElement&&J!=U&&xe.set(o.ownerSVGElement,{touchAction:p.allowNativeTouchScrolling||p.allowEventDefault?"manipulation":J?"pan-y":"pan-x"}),p.allowContextMenu||ya(o,"contextmenu",wh);Va(Q,!1)}return Ga(h,Nh),u=!0,Ye&&"soft"!==e&&Ye.track(f||h,W?"x,y":G?"rotation":"top,left"),h._gsDragID=t="d"+Fe++,Be[t]=j,f&&(f.enable(),f.element._gsDragID=t),(p.bounds||G)&&Gh(),p.bounds&&j.applyBounds(),j},e.disable=function(e){for(var t,n=j.isDragging,o=Q.length;-1<--o;)La(Q[o],"cursor",null);if("soft"!==e){for(sa(Q,null),o=Q.length;-1<--o;)t=Q[o],La(t,"touchCallout",null),za(t,"mousedown",Jh),za(t,"touchstart",Jh),za(t,"click",Oh,!0),za(t,"contextmenu",wh);Va(Q,!0),v&&(za(v,"touchcancel",fe),za(v,"touchend",fe),za(v,"touchmove",ue)),za(de,"mouseup",fe),za(de,"mousemove",ue)}return Ha(h,Nh),u=!1,Ye&&"soft"!==e&&Ye.untrack(f||h,W?"x,y":G?"rotation":"top,left"),f&&f.disable(),wa(xh),j.isDragging=j.isPressed=m=!1,n&&Pa(j,"dragend","onDragEnd"),j},e.enabled=function(e,t){return arguments.length?e?j.enable(t):j.disable(t):u},e.kill=e.revert=function(){return j.isThrowing=!1,j.tween&&j.tween.kill(),j.disable(),xe.set(Q,{clearProps:"userSelect"}),delete Be[h._gsDragID],j},~n.indexOf("scroll")&&(f=e.scrollProxy=new Za(h,function _extend(e,t){for(var n in t)n in e||(e[n]=t[n]);return e}({onKill:function onKill(){j.isPressed&&fe(null)}},p)),h.style.overflowY=U&&!Ee?"auto":"hidden",h.style.overflowX=J&&!Ee?"auto":"hidden",h=f.content),G?o.rotation=1:(J&&(o[V]=1),U&&(o[K]=1)),se.force3D=!("force3D"in p)||p.force3D,Ce(_assertThisInitialized(e)),e.enable(),e}!function _setDefaults(e,t){for(var n in t)n in e||(e[n]=t[n])}(z.prototype,{pointerX:0,pointerY:0,startX:0,startY:0,deltaX:0,deltaY:0,isDragging:!1,isPressed:!1}),z.zIndex=1e3,z.version="3.11.4",X()&&xe.registerPlugin(z),e.Draggable=z,e.default=z;if (typeof(window)==="undefined"||window!==e){Object.defineProperty(e,"__esModule",{value:!0})} else {delete e.default}});