芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/rentandbuyrealty.com/mobile/lib/gsap/src/minified/utils/Draggable.min.js
/*! * VERSION: 0.10.3 * DATE: 2014-05-13 * UPDATES AND DOCS AT: http://www.greensock.com * * Requires TweenLite and CSSPlugin version 1.11.0 or later (TweenMax contains both TweenLite and CSSPlugin). ThrowPropsPlugin is required for momentum-based continuation of movement after the mouse/touch is released (ThrowPropsPlugin is a membership benefit of Club GreenSock - http://www.greensock.com/club/). * * @license Copyright (c) 2008-2014, GreenSock. All rights reserved. * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for * Club GreenSock members, the software agreement that was issued with your membership. * * @author: Jack Doyle, jack@greensock.com */ (window._gsQueue||(window._gsQueue=[])).push(function(){"use strict";window._gsDefine("utils.Draggable",["events.EventDispatcher","TweenLite"],function(t,e){var i,s,r,n,a,o={css:{}},h={css:{}},l={css:{}},u={css:{}},_={},c=document,p=c.documentElement||{},f=[],d=function(){return!1},m=180/Math.PI,g=999999999999999,v=Date.now||function(){return(new Date).getTime()},y=c.all&&!c.addEventListener,T=[],w={},x=0,b=/^(?:a|input|textarea|button|select)$/i,P=0,S=0,C=function(){for(var t=T.length;--t>-1;)T[t]()},k=function(t){T.push(t),1===T.length&&e.ticker.addEventListener("tick",C,this,!1,1)},R=function(t){for(var i=T.length;--i>-1;)T[i]===t&&T.splice(i,1);e.to(D,0,{overwrite:"all",delay:15,onComplete:D})},D=function(){T.length||e.ticker.removeEventListener("tick",C)},A=function(t,e){var i;for(i in e)void 0===t[i]&&(t[i]=e[i]);return t},O=function(){return null!=window.pageYOffset?window.pageYOffset:null!=c.scrollTop?c.scrollTop:p.scrollTop||c.body.scrollTop||0},M=function(){return null!=window.pageXOffset?window.pageXOffset:null!=c.scrollLeft?c.scrollLeft:p.scrollLeft||c.body.scrollLeft||0},L=function(t,e){return t=t||window.event,_.pageX=t.clientX+c.body.scrollLeft+p.scrollLeft,_.pageY=t.clientY+c.body.scrollTop+p.scrollTop,e&&(t.returnValue=!1),_},E=function(t){return t?("string"==typeof t&&(t=e.selector(t)),t.length&&t!==window&&t[0]&&t[0].style&&!t.nodeType&&(t=t[0]),t===window||t.nodeType&&t.style?t:null):t},I=function(t,e){var s,r,n,a=t.style;if(void 0===a[e]){for(n=["O","Moz","ms","Ms","Webkit"],r=5,s=e.charAt(0).toUpperCase()+e.substr(1);--r>-1&&void 0===a[n[r]+s];);if(0>r)return"";i=3===r?"ms":n[r],e=i+s}return e},N=function(t,e,i){var s=t.style;void 0===s[e]&&(e=I(t,e)),null==i?s.removeProperty?s.removeProperty(e.replace(/([A-Z])/g,"-$1").toLowerCase()):s.removeAttribute(e):void 0!==s[e]&&(s[e]=i)},X=c.defaultView?c.defaultView.getComputedStyle:d,F=/(?:Left|Right|Width)/i,U=/(?:\d|\-|\+|=|#|\.)*/g,Y=function(t,e,i,s,r){if("px"===s||!s)return i;if("auto"===s||!i)return 0;var n,a=F.test(e),o=t,h=q.style,l=0>i;return l&&(i=-i),"%"===s&&-1!==e.indexOf("border")?n=i/100*(a?t.clientWidth:t.clientHeight):(h.cssText="border:0 solid red;position:"+z(t,"position",!0)+";line-height:0;","%"!==s&&o.appendChild?h[a?"borderLeftWidth":"borderTopWidth"]=i+s:(o=t.parentNode||c.body,h[a?"width":"height"]=i+s),o.appendChild(q),n=parseFloat(q[a?"offsetWidth":"offsetHeight"]),o.removeChild(q),0!==n||r||(n=Y(t,e,i,s,!0))),l?-n:n},B=function(t,e){if("absolute"!==z(t,"position",!0))return 0;var i="left"===e?"Left":"Top",s=z(t,"margin"+i,!0);return t["offset"+i]-(Y(t,e,parseFloat(s),s.replace(U,""))||0)},z=function(t,e,i){var s,r=(t._gsTransform||{})[e];return r||0===r?r:(t.style[e]?r=t.style[e]:(s=X(t))?(r=s.getPropertyValue(e.replace(/([A-Z])/g,"-$1").toLowerCase()),r=r||s.length?r:s[e]):t.currentStyle&&(r=t.currentStyle[e]),"auto"!==r||"top"!==e&&"left"!==e||(r=B(t,e)),i?r:parseFloat(r)||0)},j=function(t,e,i){var s=t.vars,r=s[i],n=t._listeners[e];"function"==typeof r&&r.apply(s[i+"Scope"]||t,s[i+"Params"]||[t.pointerEvent]),n&&t.dispatchEvent(e)},W=function(t,e){var i,s,r,n=E(t);return n?se(n,e):void 0!==t.left?(r=K(e),{left:t.left-r.x,top:t.top-r.y,width:t.width,height:t.height}):(s=t.min||t.minX||t.minRotation||0,i=t.min||t.minY||0,{left:s,top:i,width:(t.max||t.maxX||t.maxRotation||0)-s,height:(t.max||t.maxY||0)-i})},q=c.createElement("div"),H=""!==I(q,"perspective"),V=I(q,"transformOrigin").replace(/^ms/g,"Ms").replace(/([A-Z])/g,"-$1").toLowerCase(),Q=I(q,"transform"),$=Q.replace(/^ms/g,"Ms").replace(/([A-Z])/g,"-$1").toLowerCase(),G={},Z={},K=function(t,e){if(e=e||{},!t||t===p||!t.parentNode)return{x:0,y:0};var i=X(t),s=V&&i?i.getPropertyValue(V):"50% 50%",r=s.split(" "),n=-1!==s.indexOf("left")?"0%":-1!==s.indexOf("right")?"100%":r[0],a=-1!==s.indexOf("top")?"0%":-1!==s.indexOf("bottom")?"100%":r[1];return("center"===a||null==a)&&(a="50%"),("center"===n||isNaN(parseFloat(n)))&&(n="50%"),e.x=-1!==n.indexOf("%")?t.offsetWidth*parseFloat(n)/100:parseFloat(n),e.y=-1!==a.indexOf("%")?t.offsetHeight*parseFloat(a)/100:parseFloat(a),e},J=function(t,e,i){var s,r,a,o,h;return t!==window&&t&&t.parentNode?(s=X(t),r=s?s.getPropertyValue($):t.currentStyle?t.currentStyle[Q]:"1,0,0,1,0,0",r=(r+"").match(/(?:\-|\b)[\d\-\.e]+\b/g)||[1,0,0,1,0,0],r.length>6&&(r=[r[0],r[1],r[4],r[5],r[12],r[13]]),e&&(a=t.parentNode,o=t.offsetParent,h=a===p||a===c.body,r[4]=Number(r[4])+e.x+t.offsetLeft-i.x-(h?0:a.scrollLeft)+(o?parseInt(z(o,"borderLeftWidth"),10)||0:0),r[5]=Number(r[5])+e.y+t.offsetTop-i.y-(h?0:a.scrollTop)+(o?parseInt(z(o,"borderTopWidth"),10)||0:0),o||"fixed"!==z(t,"position",s)||(r[4]+=M(),r[5]+=O()),void 0===n&&c.body&&Q&&(n=function(){var t,e,i=c.createElement("div"),s=c.createElement("div");return s.style.position="absolute",c.body.appendChild(i),i.appendChild(s),t=s.offsetParent,i.style[Q]="rotate(1deg)",e=s.offsetParent===t,c.body.removeChild(i),e}()),!a||a.offsetParent!==t.offsetParent||n&&"100100"!==J(a).join("")||(r[4]-=a.offsetLeft,r[5]-=a.offsetTop)),r):[1,0,0,1,0,0]},te=function(t,e){for(var i,s,r,n,a,o,h,l,u=K(t,G),_=K(t.parentNode,Z),c=J(t,u,_);(t=t.parentNode)&&t.parentNode&&t!==p;)u=_,_=K(t.parentNode,u===G?Z:G),h=J(t,u,_),i=c[0],s=c[1],r=c[2],n=c[3],a=c[4],o=c[5],c[0]=i*h[0]+s*h[2],c[1]=i*h[1]+s*h[3],c[2]=r*h[0]+n*h[2],c[3]=r*h[1]+n*h[3],c[4]=a*h[0]+o*h[2]+h[4],c[5]=a*h[1]+o*h[3]+h[5];return e&&(i=c[0],s=c[1],r=c[2],n=c[3],a=c[4],o=c[5],l=i*n-s*r,c[0]=n/l,c[1]=-s/l,c[2]=-r/l,c[3]=i/l,c[4]=(r*o-n*a)/l,c[5]=-(i*o-s*a)/l),c},ee=function(t,e,i){var s=te(t),r=e.x,n=e.y;return i=i===!0?e:i||{},i.x=r*s[0]+n*s[2]+s[4],i.y=r*s[1]+n*s[3]+s[5],i},ie=function(t,e,i){var s=t.x*e[0]+t.y*e[2]+e[4],r=t.x*e[1]+t.y*e[3]+e[5];return t.x=s*i[0]+r*i[2]+i[4],t.y=s*i[1]+r*i[3]+i[5],t},se=function(t,e){var i,s,r,n,a,o,h,l,u,_,f;return t===window?(n=O(),s=M(),r=s+(p.clientWidth||t.innerWidth||c.body.clientWidth||0),a=n+(t.innerHeight-20
e;e++)if(i=t[e],re(i))for(s=i.length,s=0;i.length>s;s++)r.push(i[s]);else r.push(i);return r},ae="ontouchstart"in p&&"orientation"in window,oe=function(t){for(var e=t.split(","),i=(void 0!==q.onpointerdown?"pointerdown,pointermove,pointerup,pointercancel":void 0!==q.onmspointerdown?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":t).split(","),s={},r=7;--r>-1;)s[e[r]]=i[r],s[i[r]]=e[r];return s}("touchstart,touchmove,touchend,touchcancel"),he=function(t,e,i){t.addEventListener?t.addEventListener(oe[e]||e,i,!1):t.attachEvent&&t.attachEvent("on"+e,i)},le=function(t,e,i){t.removeEventListener?t.removeEventListener(oe[e]||e,i):t.detachEvent&&t.detachEvent("on"+e,i)},ue=function(t){s=t.touches&&t.touches.length>P,le(t.target,"touchend",ue)},_e=function(t){s=t.touches&&t.touches.length>P,he(t.target,"touchend",ue)},ce=function(t,e,i,s,r,n){var a,o,h,l={};if(e)if(1!==r&&e instanceof Array)for(l.end=a=[],h=e.length,o=0;h>o;o++)a[o]=e[o]*r;else l.end="function"==typeof e?function(i){return e.call(t,i)*r}:e;return(i||0===i)&&(l.max=i),(s||0===s)&&(l.min=s),n&&(l.velocity=0),l},pe=function(t){var e;return t&&t.getAttribute&&"BODY"!==t.nodeName?"true"===(e=t.getAttribute("data-clickable"))||"false"!==e&&(t.onclick||b.test(t.nodeName+""))?!0:pe(t.parentNode):!1},fe=function(){var t,e=c.createElement("div"),i=c.createElement("div"),s=i.style,r=c.body||q;return s.display="inline-block",s.position="relative",e.style.cssText=i.innerHTML="width:90px; height:40px; padding:10px; overflow:auto; visibility: hidden",e.appendChild(i),r.appendChild(e),a=i.offsetHeight+18>e.scrollHeight,s.width="100%",Q||(s.paddingRight="500px",t=e.scrollLeft=e.scrollWidth-e.clientWidth,s.left="-90px",t=t!==e.scrollLeft),r.removeChild(e),t}(),de=function(t,i){t=E(t),i=i||{};var s,r,n,o,h,l,u=c.createElement("div"),_=u.style,p=t.firstChild,f=0,d=0,m=t.scrollTop,g=t.scrollLeft,v=t.scrollWidth,T=t.scrollHeight,w=0,x=0,b=0;H&&i.force3D!==!1?(h="translate3d(",l="px,0px)"):Q&&(h="translate(",l="px)"),this.scrollTop=function(t,e){return arguments.length?(this.top(-t,e),void 0):-this.top()},this.scrollLeft=function(t,e){return arguments.length?(this.left(-t,e),void 0):-this.left()},this.left=function(s,r){if(!arguments.length)return-(t.scrollLeft+d);var n=t.scrollLeft-g,a=d;return(n>2||-2>n)&&!r?(g=t.scrollLeft,e.killTweensOf(this,!0,{left:1,scrollLeft:1}),this.left(-g),i.onKill&&i.onKill(),void 0):(s=-s,0>s?(d=0|s-.5,s=0):s>x?(d=0|s-x,s=x):d=0,(d||a)&&(h?this._suspendTransforms||(_[Q]=h+-d+"px,"+-f+l):_.left=-d+"px",fe&&d+w>=0&&(_.paddingRight=d+w+"px")),t.scrollLeft=0|s,g=t.scrollLeft,void 0)},this.top=function(s,r){if(!arguments.length)return-(t.scrollTop+f);var n=t.scrollTop-m,a=f;return(n>2||-2>n)&&!r?(m=t.scrollTop,e.killTweensOf(this,!0,{top:1,scrollTop:1}),this.top(-m),i.onKill&&i.onKill(),void 0):(s=-s,0>s?(f=0|s-.5,s=0):s>b?(f=0|s-b,s=b):f=0,(f||a)&&(h?this._suspendTransforms||(_[Q]=h+-d+"px,"+-f+l):_.top=-f+"px"),t.scrollTop=0|s,m=t.scrollTop,void 0)},this.maxScrollTop=function(){return b},this.maxScrollLeft=function(){return x},this.disable=function(){for(p=u.firstChild;p;)o=p.nextSibling,t.appendChild(p),p=o;t===u.parentNode&&t.removeChild(u)},this.enable=function(){if(p=t.firstChild,p!==u){for(;p;)o=p.nextSibling,u.appendChild(p),p=o;t.appendChild(u),this.calibrate()}},this.calibrate=function(e){var i,o,h=t.clientWidth===s;m=t.scrollTop,g=t.scrollLeft,(!h||t.clientHeight!==r||u.offsetHeight!==n||v!==t.scrollWidth||T!==t.scrollHeight||e)&&((f||d)&&(i=this.left(),o=this.top(),this.left(-t.scrollLeft),this.top(-t.scrollTop)),(!h||e)&&(_.display="block",_.width="auto",_.paddingRight="0px",w=Math.max(0,t.scrollWidth-t.clientWidth),w&&(w+=z(t,"paddingLeft")+(a?z(t,"paddingRight"):0))),_.display="inline-block",_.position="relative",_.overflow="visible",_.width="100%",_.paddingRight=w+"px",a&&(_.paddingBottom=z(t,"paddingBottom",!0)),y&&(_.zoom="1"),s=t.clientWidth,r=t.clientHeight,v=t.scrollWidth,T=t.scrollHeight,x=t.scrollWidth-s,b=t.scrollHeight-r,n=u.offsetHeight,(i||o)&&(this.left(i),this.top(o)))},this.content=u,this.element=t,this._suspendTransforms=!1,this.enable()},me=function(i,n){t.call(this,i),i=E(i),r||(r=(window.GreenSockGlobals||window).com.greensock.plugins.ThrowPropsPlugin),this.vars=n=n||{},this.target=i,this.x=this.y=this.rotation=0,this.dragResistance=parseFloat(n.dragResistance)||0,this.edgeResistance=isNaN(n.edgeResistance)?1:parseFloat(n.edgeResistance)||0,this.lockAxis=n.lockAxis;var a,_,p,T,b,C,D,O,M,I,X,F,U,Y,B,q,H,V,Q,$,G,Z,K,J,ie,se=(n.type||(y?"top,left":"x,y")).toLowerCase(),re=-1!==se.indexOf("x")||-1!==se.indexOf("y"),ne=-1!==se.indexOf("rotation"),ue=re?"x":"left",fe=re?"y":"top",ge=-1!==se.indexOf("x")||-1!==se.indexOf("left")||"scroll"===se,ve=-1!==se.indexOf("y")||-1!==se.indexOf("top")||"scroll"===se,ye=this,Te=E(n.trigger||n.handle||i),we={},xe=0,be=function(t){if(H){var s=ye.x,r=ye.y,n=1e-6;n>s&&s>-n&&(s=0),n>r&&r>-n&&(r=0),ne?(U.rotation=ye.rotation=ye.x,e.set(i,F)):a?(ve&&a.top(r),ge&&a.left(s)):re?(ve&&(U.y=r),ge&&(U.x=s),e.set(i,F)):(ve&&(i.style.top=r+"px"),ge&&(i.style.left=s+"px")),D&&!t&&j(ye,"drag","onDrag")}H=!1},Pe=function(t,s){var r;re?(i._gsTransform||e.set(i,{x:"+=0"}),ye.y=i._gsTransform.y,ye.x=i._gsTransform.x):ne?(i._gsTransform||e.set(i,{x:"+=0"}),ye.x=ye.rotation=i._gsTransform.rotation):a?(ye.y=a.top(),ye.x=a.left()):(ye.y=parseInt(i.style.top,10)||0,ye.x=parseInt(i.style.left,10)||0),!Q&&!$||s||(Q&&(r=Q(ye.x),r!==ye.x&&(ye.x=r,ne&&(ye.rotation=r),H=!0)),$&&(r=$(ye.y),r!==ye.y&&(ye.y=r,H=!0)),H&&be(!0)),n.onThrowUpdate&&!t&&n.onThrowUpdate.apply(n.onThrowUpdateScope||ye,n.onThrowUpdateParams||f)},Se=function(){var t,e,s,r;C=!1,a?(a.calibrate(),ye.minX=M=-a.maxScrollLeft(),ye.minY=X=-a.maxScrollTop(),ye.maxX=O=ye.maxY=I=0,C=!0):n.bounds&&(t=W(n.bounds,i.parentNode),ne?(ye.minX=M=t.left,ye.maxX=O=t.left+t.width,ye.minY=X=ye.maxY=I=0):void 0!==n.bounds.maxX||void 0!==n.bounds.maxY?(t=n.bounds,ye.minX=M=t.minX,ye.minY=X=t.minY,ye.maxX=O=t.maxX,ye.maxY=I=t.maxY):(e=W(i,i.parentNode),ye.minX=M=z(i,ue)+t.left-e.left,ye.minY=X=z(i,fe)+t.top-e.top,ye.maxX=O=M+(t.width-e.width),ye.maxY=I=X+(t.height-e.height)),M>O&&(ye.minX=O,ye.maxX=O=M,M=ye.minX),X>I&&(ye.minY=I,ye.maxY=I=X,X=ye.minY),ne&&(ye.minRotation=M,ye.maxRotation=O),C=!0),n.liveSnap&&(s=n.liveSnap===!0?n.snap||{}:n.liveSnap,r=s instanceof Array||"function"==typeof s,ne?(Q=Ae(r?s:s.rotation,M,O,1),$=null):(ge&&(Q=Ae(r?s:s.x||s.left||s.scrollLeft,M,O,a?-1:1)),ve&&($=Ae(r?s:s.y||s.top||s.scrollTop,X,I,a?-1:1))))},Ce=function(t,e){var s,o,h;t&&r?(t===!0&&(s=n.snap||{},o=s instanceof Array||"function"==typeof s,t={resistance:(n.throwResistance||n.resistance||1e3)/(ne?10:1)},ne?t.rotation=ce(ye,o?s:s.rotation,O,M,1,e):(ge&&(t[ue]=ce(ye,o?s:s.x||s.left||s.scrollLeft,O,M,a?-1:1,e||ye.lockAxis&&"x"===K)),ve&&(t[fe]=ce(ye,o?s:s.y||s.top||s.scrollTop,I,X,a?-1:1,e||ye.lockAxis&&"y"===K)))),ye.tween=h=r.to(a||i,{throwProps:t,ease:n.ease||Power3.easeOut,onComplete:n.onThrowComplete,onCompleteParams:n.onThrowCompleteParams,onCompleteScope:n.onThrowCompleteScope||ye,onUpdate:n.fastMode?n.onThrowUpdate:Pe,onUpdateParams:n.fastMode?n.onThrowUpdateParams:null,onUpdateScope:n.onThrowUpdateScope||ye},isNaN(n.maxDuration)?2:n.maxDuration,isNaN(n.minDuration)?.5:n.minDuration,isNaN(n.overshootTolerance)?1-ye.edgeResistance+.2:n.overshootTolerance),n.fastMode||(a&&(a._suspendTransforms=!0),h.seek(h.duration()),Pe(!0,!0),ye.endX=ye.x,ye.endY=ye.y,ne&&(ye.endRotation=ye.x),h.play(0),Pe(!0,!0),a&&(a._suspendTransforms=!1))):C&&ye.applyBounds()},ke=function(){J=te(i.parentNode,!0),J[1]||J[2]||1!=J[0]||1!=J[3]||0!=J[4]||0!=J[5]||(J=null)},Re=function(){var t=1-ye.edgeResistance;ke(),a?(Se(),b=a.top(),T=a.left()):(De()?(Pe(!0,!0),Se()):ye.applyBounds(),ne?(q=ee(i,{x:0,y:0}),Pe(!0,!0),T=ye.x,b=ye.y=Math.atan2(q.y-p,_-q.x)*m):(b=z(i,fe),T=z(i,ue))),C&&t&&(T>O?T=O+(T-O)/t:M>T&&(T=M-(M-T)/t),ne||(b>I?b=I+(b-I)/t:X>b&&(b=X-(X-b)/t)))},De=function(){return ye.tween&&ye.tween.isActive()},Ae=function(t,e,i,s){return"function"==typeof t?function(r){var n=ye.isPressed?1-ye.edgeResistance:1;return t.call(ye,r>i?i+(r-i)*n:e>r?e+(r-e)*n:r)*s}:t instanceof Array?function(s){for(var r,n,a=t.length,o=0,h=g;--a>-1;)r=t[a],n=r-s,0>n&&(n=-n),h>n&&r>=e&&i>=r&&(o=a,h=n);return t[o]}:isNaN(t)?function(t){return t}:function(){return t*s}},Oe=function(t){var s;if(!ye.isPressed&&t){if(ie=De(),ye.pointerEvent=t,oe[t.type]?(Z=-1!==t.type.indexOf("touch")?Te:c,he(Z,"touchend",Le),he(Z,"touchmove",Me),he(Z,"touchcancel",Le),he(c,"touchstart",_e)):(Z=null,he(c,"mousemove",Me),he(c,"mouseup",Le)),G=pe(t.target)&&!n.dragClickables)return he(t.target,"change",Le),void 0;y?t=L(t,!0):t.touches&&t.touches.length>P+1||(t.preventDefault(),t.preventManipulation&&t.preventManipulation()),t.changedTouches?(t=Y=t.changedTouches[0],B=t.identifier):t.pointerId?B=t.pointerId:Y=null,P++,k(be),ye.tween&&ye.tween.kill(),e.killTweensOf(a||i,!0,we),a&&e.killTweensOf(i,!0,{scrollTo:1}),p=ye.pointerY=t.pageY,_=ye.pointerX=t.pageX,Re(),J&&(s=_*J[0]+p*J[2]+J[4],p=_*J[1]+p*J[3]+J[5],_=s),ye.tween=K=null,ne||a||n.zIndexBoost===!1||(i.style.zIndex=me.zIndex++),ye.isPressed=!0,D=!(!n.onDrag&&!ye._listeners.drag),ne||N(Te,"cursor",n.cursor||"move"),j(ye,"press","onPress")}},Me=function(t){if(!s&&ye.isPressed){y?t=L(t,!0):(t.preventDefault(),t.preventManipulation&&t.preventManipulation()),ye.pointerEvent=t;var e,i,r,n,a,o,h,l,u,c=t.changedTouches,f=1-ye.dragResistance,d=1-ye.edgeResistance;if(c){if(t=c[0],t!==Y&&t.identifier!==B){for(a=c.length;--a>-1&&(t=c[a]).identifier!==B;);if(0>a)return}}else if(t.pointerId&&B&&t.pointerId!==B)return;h=ye.pointerX=t.pageX,l=ye.pointerY=t.pageY,ne?(n=Math.atan2(q.y-t.pageY,t.pageX-q.x)*m,o=ye.y-n,ye.y=n,o>180?b-=360:-180>o&&(b+=360),r=T+(b-n)*f):(J&&(u=h*J[0]+l*J[2]+J[4],l=h*J[1]+l*J[3]+J[5],h=u),i=l-p,e=h-_,2>i&&i>-2&&(i=0),2>e&&e>-2&&(e=0),ye.lockAxis&&(e||i)&&("y"===K||!K&&Math.abs(e)>Math.abs(i)&&ge?(i=0,K="y"):ve&&(e=0,K="x")),r=T+e*f,n=b+i*f),Q||$?(Q&&(r=Q(r)),$&&(n=$(n))):C&&(r>O?r=O+(r-O)*d:M>r&&(r=M+(r-M)*d),ne||(n>I?n=I+(n-I)*d:X>n&&(n=X+(n-X)*d))),(ye.x!==r||ye.y!==n&&!ne)&&(ye.x=ye.endX=r,ne?ye.endRotation=r:ye.y=ye.endY=n,H=!0,ye.isDragging||(ye.isDragging=!0,j(ye,"dragstart","onDragStart")))}},Le=function(t,e){if(!t||!B||e||!t.pointerId||t.pointerId===B){ye.isPressed=!1;var i,s,r=t,a=ye.isDragging;if(Z?(le(Z,"touchend",Le),le(Z,"touchmove",Me),le(Z,"touchcancel",Le),le(c,"touchstart",_e)):(le(c,"mouseup",Le),le(c,"mousemove",Me)),H=!1,G)return t&&le(t.target,"change",Le),j(ye,"release","onRelease"),j(ye,"click","onClick"),G=!1,void 0;if(R(be),ne||N(Te,"cursor",n.cursor||"move"),a&&(xe=S=v(),ye.isDragging=!1),P--,t){if(y&&(t=L(t,!1)),i=t.changedTouches,i&&(t=i[0],t!==Y&&t.identifier!==B)){for(s=i.length;--s>-1&&(t=i[s]).identifier!==B;);if(0>s)return}ye.pointerEvent=r,ye.pointerX=t.pageX,ye.pointerY=t.pageY}return r&&!a?(ie&&n.snap&&Ce(n.throwProps),j(ye,"release","onRelease"),j(ye,"click","onClick")):(Ce(n.throwProps),y||!r||!n.dragClickables&&pe(r.target)||(r.preventDefault(),r.preventManipulation&&r.preventManipulation()),j(ye,"release","onRelease")),a&&j(ye,"dragend","onDragEnd"),!0}},Ee=function(t){(ye.isPressed||20>v()-xe)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.preventManipulation&&t.preventManipulation())};V=me.get(this.target),V&&V.kill(),this.startDrag=function(t){Oe(t),ye.isDragging||(ye.isDragging=!0,j(ye,"dragstart","onDragStart"))},this.drag=Me,this.endDrag=function(t){Le(t,!0)},this.timeSinceDrag=function(){return ye.isDragging?0:(v()-xe)/1e3},this.hitTest=function(t,e){return me.hitTest(ye.target,t,e)},this.applyBounds=function(t){var e,i;return t&&n.bounds!==t?(n.bounds=t,ye.update(!0)):(Pe(!0),Se(),C&&(e=ye.x,i=ye.y,C&&(e>O?e=O:M>e&&(e=M),i>I?i=I:X>i&&(i=X)),(ye.x!==e||ye.y!==i)&&(ye.x=ye.endX=e,ne?ye.endRotation=e:ye.y=ye.endY=i,H=!0,be())),ye)},this.update=function(t){var e=ye.x,i=ye.y;return ke(),t?ye.applyBounds():Pe(!0),ye.isPressed&&(e!==ye.x||i!==ye.y&&!ne)&&Re(),ye},this.enable=function(){var t;return he(Te,"mousedown",Oe),he(Te,"touchstart",Oe),he(Te,"click",Ee),ne||N(Te,"cursor",n.cursor||"move"),Te.ondragstart=Te.onselectstart=d,N(Te,"userSelect","none"),N(Te,"touchCallout","none"),N(Te,"touchAction","none"),r&&r.track(a||i,re?"x,y":ne?"rotation":"top,left"),a&&a.enable(),i._gsDragID=t="d"+x++,w[t]=this,a&&(a.element._gsDragID=t),e.set(i,{x:"+=0"}),this.update(),ye},this.disable=function(){var t=this.isDragging;return ne||N(Te,"cursor",null),Te.ondragstart=Te.onselectstart=null,N(Te,"userSelect","text"),N(Te,"touchCallout","default"),N(Te,"MSTouchAction","auto"),le(Te,"mousedown",Oe),le(Te,"touchstart",Oe),le(Te,"click",Ee),Z&&(le(Z,"touchcancel",Le),le(Z,"touchend",Le),le(Z,"touchmove",Me)),le(c,"mouseup",Le),le(c,"mousemove",Me),r&&r.untrack(a||i,re?"x,y":ne?"rotation":"top,left"),a&&a.disable(),R(be),this.isDragging=this.isPressed=G=!1,t&&j(this,"dragend","onDragEnd"),ye},this.kill=function(){return e.killTweensOf(a||i,!0,we),ye.disable(),delete w[i._gsDragID],ye},-1!==se.indexOf("scroll")&&(a=this.scrollProxy=new de(i,A({onKill:function(){ye.isPressed&&Le(null)}},n)),i.style.overflowY=ve&&!ae?"auto":"hidden",i.style.overflowX=ge&&!ae?"auto":"hidden",i=a.content),n.force3D!==!1&&e.set(i,{force3D:!0}),ne?we.rotation=1:(ge&&(we[ue]=1),ve&&(we[fe]=1)),ne?(F=u,U=F.css,F.overwrite=!1):re&&(F=ge&&ve?o:ge?h:l,U=F.css,F.overwrite=!1),this.enable()},ge=me.prototype=new t;ge.constructor=me,ge.pointerX=ge.pointerY=0,ge.isDragging=ge.isPressed=!1,me.version="0.10.3",me.zIndex=1e3,he(c,"touchcancel",function(){}),he(c,"contextmenu",function(){var t;for(t in w)w[t].isPressed&&w[t].endDrag()}),me.create=function(t,i){"string"==typeof t&&(t=e.selector(t));for(var s=re(t)?ne(t):[t],r=s.length;--r>-1;)s[r]=new me(s[r],i);return s},me.get=function(t){return w[(E(t)||{})._gsDragID]},me.timeSinceDrag=function(){return(v()-S)/1e3};var ve=function(t,e){var i=t.pageX!==e?{left:t.pageX,top:t.pageY,right:t.pageX+1,bottom:t.pageY+1}:t.nodeType||t.left===e||t.top===e?E(t).getBoundingClientRect():t;return i.right===e&&i.width!==e?(i.right=i.left+i.width,i.bottom=i.top+i.height):i.width||(i.width=i.right-i.left,i.height=i.bottom-i.top),i};return me.hitTest=function(t,e,i){if(t===e)return!1;var s,r,n,a=ve(t),o=ve(e),h=o.left>a.right||o.right
a.bottom||o.bottom
s.width||0>s.height?!1:n?(i*=.01,r=s.width*s.height,r>=a.width*a.height*i||r>=o.width*o.height*i):s.width>i&&s.height>i)},me},!0)}),window._gsDefine&&window._gsQueue.pop()();