kute.js/dist/kute.min.js
2016-02-06 00:19:14 +02:00

2 lines
19 KiB
JavaScript

// KUTE.js | dnp_theme | MIT-License
!function(t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():window.KUTE=window.KUTE||t()}(function(){"use strict";function t(){var t=document.createElement("div"),e=0,r=["Moz","moz","Webkit","webkit","O","o","Ms","ms"],n=r.length,i=["MozTransform","mozTransform","WebkitTransform","webkitTransform","OTransform","oTransform","MsTransform","msTransform"];for(e;n>e;e++)if(i[e]in t.style)return r[e];t=null}for(var e=e||{},r=[],n=null,i=t(),a=("requestAnimationFrame"in window?!1:!0),s=("transform"in document.getElementsByTagName("div")[0].style?!1:!0),o=("border-radius"in document.getElementsByTagName("div")[0].style?!1:!0),u=("ontouchstart"in window||navigator.msMaxTouchPoints||!1),l=u?"touchstart":"mousewheel",v=document.body,f=document.getElementsByTagName("HTML")[0],p=/webkit/i.test(navigator.userAgent)||"BackCompat"==document.compatMode?v:f,c=null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(navigator.userAgent)?parseFloat(RegExp.$1):!1,d=8===c,h=s?i+"TransformOrigin":"transformOrigin",_=s?i+"Perspective":"perspective",g=s?i+"PerspectiveOrigin":"perspectiveOrigin",m=s?i+"Transform":"transform",y=o?i+"BorderRadius":"borderRadius",w=o?i+"BorderTopLeftRadius":"borderTopLeftRadius",T=o?i+"BorderTopRightRadius":"borderTopRightRadius",S=o?i+"BorderBottomLeftRadius":"borderBottomLeftRadius",b=o?i+"BorderBottomRightRadius":"borderBottomRightRadius",O=a?window[i+"RequestAnimationFrame"]:window.requestAnimationFrame,E=a?window[i+"CancelAnimationFrame"]||window[i+"CancelRequestAnimationFrame"]:window.cancelAnimationFrame,x=["color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],C=["scrollTop","scroll"],I=["clip"],R=["opacity"],D=["borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],M=["top","left","right","bottom","width","height","minWidth","minHeight","maxWidth","maxHeight","padding","margin","paddingTop","paddingBottom","paddingLeft","paddingRight","marginTop","marginBottom","marginLeft","marginRight","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],B=["fontSize","lineHeight","letterSpacing"],k=["backgroundPosition"],A=["rotateX","rotateY","translateZ"],F=["translate3d","translateX","translateY","translateZ","rotate","translate","rotateX","rotateY","rotateZ","skewX","skewY","scale"],L=x.concat(C,I,R,D,M,B,k,F),P=L.length,q={},Y={},X={},Z={},z={},Q={},W=W||{},j=0;P>j;j++){var H=L[j];-1!==x.indexOf(H)?W[H]="rgba(0,0,0,0)":-1!==D.indexOf(H)||-1!==M.indexOf(H)||-1!==B.indexOf(H)?W[H]=0:-1!==k.indexOf(H)?W[H]=[50,50]:"clip"===H?W[H]=[0,0,0,0]:"translate3d"===H?W[H]=[0,0,0]:"translate"===H?W[H]=[0,0]:"rotate"===H||/X|Y|Z/.test(H)?W[H]=0:("scale"===H||"opacity"===H)&&(W[H]=1)}e.to=function(t,r,n){var i="object"==typeof t?t:document.querySelector(t),a=r,s=e.prP(r,!0);return n=n||{},n.rpr=!0,new e.Tween(i,a,s,n)},e.fromTo=function(t,r,n,i){var a="object"==typeof t?t:document.querySelector(t),s=e.prP(r,!1),o=e.prP(n,!0);return i=i||{},new e.Tween(a,s,o,i)},e.allTo=function(t,r,n){var i="object"==typeof t&&t.length?t:document.querySelectorAll(t);return new e.TweensAT(i,r,n)},e.allFromTo=function(t,r,n,i){var a="object"==typeof t&&t.length?t:document.querySelectorAll(t);return new e.TweensFT(a,r,n,i)},e._r={};var N=e._r;e._u=function(t,e){if(e=e||window.performance.now(),e<t._sT&&t.playing&&!t.paused)return!0;var r,n=n||t._sT,i=i||t._dr,a=(e-n)/i,s=s||t._vE,o=o||t._e;a=a>1?1:a;for(r in s)N[r](t,r,o(a));if(t._uC&&t._uC.call(),1===a){if(t._r>0)return t._r<9999&&t._r--,t._y&&(t.reversed=!t.reversed,t.reverse()),t._sT=t._y&&!t.reversed?e+t._rD:e,!0;t._cC&&t._cC.call(),t.scrollOut();var u=0,l=t._cT.length;for(u;l>u;u++)t._cT[u].start(t._sT+t._dr);return t.close(),!1}return!0};var $=e._u;e._t=function(t){var i,a=0;for(n=O(e._t);a<(i=r.length);)$(r[a],t)?a++:r.splice(a,1);return!0},e.perspective=function(t,e){void 0!==e._to&&(t.style[h]=e._to),void 0!==e._ppo&&(t.style[g]=e._ppo),void 0!==e._ppp&&(t.parentNode.style[_]=e._ppp+"px"),void 0!==e._pppo&&(t.parentNode.style[g]=e._pppo)},e.getAll=function(){return r},e.removeAll=function(){r=[]},e.add=function(t){r.push(t)},e.remove=function(t){var e=r.indexOf(t);-1!==e&&r.splice(e,1)},e.s=function(){E(n),n=null},e._queue=function(t){for(var r in t._vE){var n=-1!==x.indexOf(r),i=-1!==B.indexOf(r)||-1!==M.indexOf(r),a=-1!==D.indexOf(r),s=-1!==C.indexOf(r),o=-1!==k.indexOf(r),u=-1!==I.indexOf(r),l=-1!==R.indexOf(r),v="transform"===r;!i||r in e._r?!a||r in e._r?!v||r in e._r?!n||r in e._r?!s||r in e._r?!o||r in e._r?!u||r in e._r?!l||r in e._r||(d?e._r[r]=function(t,e,r){t._el.style.filter="alpha(opacity="+100*(t._vS[e].value+(t._vE[e].value-t._vS[e].value)*r)+")"}:e._r[r]=function(t,e,r){t._el.style.opacity=t._vS[e].value+(t._vE[e].value-t._vS[e].value)*r}):e._r[r]=function(t,e,r){var n=0,i=[];for(n;4>n;n++){var a=t._vS[e][n].v,s=t._vE[e][n].v,o=t._vE[e][n].u||"px";i[n]=a+(s-a)*r+o}t._el.style[e]="rect("+i+")"}:e._r[r]=function(t,e,r){var n=t._vS[e].x.v,i=t._vE[e].x.v,a=t._vS[e].y.v,s=t._vE[e].y.v,o=n+(i-n)*r,u="%",l=a+(s-a)*r,v="%";t._el.style[e]=o+u+" "+l+v}:e._r[r]=function(t,e,r){t._el=void 0===t._el||null===t._el?p:t._el,t._el.scrollTop=t._vS[e].value+(t._vE[e].value-t._vS[e].value)*r}:e._r[r]=function(t,r,n){var i={};for(var a in t._vE[r].value)"a"!==a?i[a]=parseInt(t._vS[r].value[a]+(t._vE[r].value[a]-t._vS[r].value[a])*n)||0:i[a]=t._vS[r].value[a]&&t._vE[r].value[a]?parseFloat(t._vS[r].value[a]+(t._vE[r].value[a]-t._vS[r].value[a])*n):null;t._hex?t._el.style[r]=e.rth(parseInt(i.r),parseInt(i.g),parseInt(i.b)):t._el.style[r]=!i.a||d?"rgb("+i.r+","+i.g+","+i.b+")":"rgba("+i.r+","+i.g+","+i.b+","+i.a+")"}:e._r[r]=function(t,e,r){var n,i,a="",s="perspective("+t._pp+"px) ";for(n in t._vE[e]){var o=t._vS[e][n],u=t._vE[e][n];if(i=i||-1!==A.indexOf(n)&&!c,"translate"===n){var l,v="",f={};for(l in u){var p=o[l].value||0,d=u[l].value||0,h=u[l].unit||"px";f[l]=p===d?d+h:p+(d-p)*r+h}v=u.x?"translate("+f.x+","+f.y+")":"translate3d("+f.translateX+","+f.translateY+","+f.translateZ+")",a=""===a?v:v+" "+a}else if("rotate"===n){var _,g="",y={};for(_ in u)if(o[_]){var w=o[_].value,T=u[_].value,S=u[_].unit||"deg",b=w+(T-w)*r;y[_]="z"===_?"rotate("+b+S+")":_+"("+b+S+") "}g=u.z?y.z:(y.rotateX||"")+(y.rotateY||"")+(y.rotateZ||""),a=""===a?g:a+" "+g}else if("skew"===n){var O="",E={};for(var x in u)if(o[x]){var C=o[x].value,I=u[x].value,R=u[x].unit||"deg",D=C+(I-C)*r;E[x]=x+"("+D+R+") "}O=(E.skewX||"")+(E.skewY||""),a=""===a?O:a+" "+O}else if("scale"===n){var M=o.value,B=u.value,k=M+(B-M)*r,F=n+"("+k+")";a=""===a?F:a+" "+F}}t._el.style[m]=i||void 0!==t._pp&&0!==t._pp?s+a:a}:"borderRadius"===r?e._r[r]=function(t,e,r){t._el.style[y]=t._vS[e].value+(t._vE[e].value-t._vS[e].value)*r+t._vE[e].unit}:"borderTopLeftRadius"===r?e._r[r]=function(t,e,r){t._el.style[w]=t._vS[e].value+(t._vE[e].value-t._vS[e].value)*r+t._vE[e].unit}:"borderTopRightRadius"===r?e._r[r]=function(t,e,r){t._el.style[T]=t._vS[e].value+(t._vE[e].value-t._vS[e].value)*r+t._vE[e].unit}:"borderBottomLeftRadius"===r?e._r[r]=function(t,e,r){t._el.style[S]=t._vS[e].value+(t._vE[e].value-t._vS[e].value)*r+t._vE[e].unit}:"borderBottomRightRadius"===r&&(e._r[r]=function(t,e,r){t._el.style[b]=t._vS[e].value+(t._vE[e].value-t._vS[e].value)*r+t._vE[e].unit}):e._r[r]=function(t,e,r){t._el.style[e]=t._vS[e].value+(t._vE[e].value-t._vS[e].value)*r+t._vE[e].unit}}},e.prP=function(t,r){var n={},i=r===!0?Y:q,a=r===!0?Z:X,s=r===!0?Q:z;a={},i={};for(var o in t)if(-1!==F.indexOf(o)){if("translate"!==o&&/translate/.test(o)){var u=["X","Y","Z"],l=0;for(l;3>l;l++){var v=u[l];/3d/.test(o)?a["translate"+v]=e.pp("translate"+v,t[o][l]):a["translate"+v]="translate"+v in t?e.pp("translate"+v,t["translate"+v]):{value:0,unit:"px"}}i.translate=a}else if("rotate"!==o&&/rotate|skew/.test(o)){var f=/rotate/.test(o)?"rotate":"skew",p=["X","Y","Z"],c=0,d={},h={},s="rotate"===f?d:h;for(c;3>c;c++){var _=p[c];void 0!==t[f+_]&&"skewZ"!==o&&(s[f+_]=e.pp(f+_,t[f+_]))}i[f]=s}else("translate"===o||"rotate"===o||"scale"===o)&&(i[o]=e.pp(o,t[o]));n.transform=i}else-1===F.indexOf(o)&&(n[o]=e.pp(o,t[o]));return n},e.pp=function(t,r){if(-1!==F.indexOf(t)){var n,i=t.replace(/X|Y|Z/,"");if("translate3d"===t)return n=r.split(","),{translateX:{value:e.truD(n[0]).v,unit:e.truD(n[0]).u},translateY:{value:e.truD(n[1]).v,unit:e.truD(n[1]).u},translateZ:{value:e.truD(n[2]).v,unit:e.truD(n[2]).u}};if("translate"!==t&&"translate"===i)return{value:e.truD(r).v,unit:e.truD(r).u||"px"};if("rotate"!==t&&("skew"===i||"rotate"===i)&&"skewZ"!==t)return{value:e.truD(r).v,unit:e.truD(r,t).u||"deg"};if("translate"===t){n="string"==typeof r?r.split(","):r;var a={};return n instanceof Array?(a.x={value:e.truD(n[0]).v,unit:e.truD(n[0]).u},a.y={value:e.truD(n[1]).v,unit:e.truD(n[1]).u}):(a.x={value:e.truD(n).v,unit:e.truD(n).u},a.y={value:0,unit:"px"}),a}if("rotate"===t){var s={};return s.z={value:parseInt(r,10),unit:e.truD(r,t).u||"deg"},s}if("scale"===t)return{value:parseFloat(r,10)}}if(-1!==B.indexOf(t)||-1!==M.indexOf(t))return{value:e.truD(r).v,unit:e.truD(r).u};if(-1!==R.indexOf(t))return{value:parseFloat(r,10)};if(-1!==C.indexOf(t))return{value:parseFloat(r,10)};if(-1!==I.indexOf(t)){if(r instanceof Array)return[e.truD(r[0]),e.truD(r[1]),e.truD(r[2]),e.truD(r[3])];var o;return/rect/.test(r)?o=r.replace(/rect|\(|\)/g,"").split(/\s|\,/):/auto|none|initial/.test(r)&&(o=W[t]),[e.truD(o[0]),e.truD(o[1]),e.truD(o[2]),e.truD(o[3])]}if(-1!==x.indexOf(t))return{value:e.truC(r)};if(-1!==k.indexOf(t)){if(r instanceof Array)return{x:e.truD(r[0])||{v:50,u:"%"},y:e.truD(r[1])||{v:50,u:"%"}};var u=r.replace(/top|left/g,0).replace(/right|bottom/g,100).replace(/center|middle/,50).split(/\s|\,/g),l=e.truD(u[0]),v=e.truD(u[1]);return{x:l,y:v}}if(-1!==D.indexOf(t)){var f=e.truD(r);return{value:f.v,unit:f.u}}},e.truD=function(t,e){function r(){var r,n=0;for(n;a>n;n++)"string"==typeof t&&-1!==t.indexOf(i[n])&&(r=i[n]);return r=void 0!==r?r:e?"deg":"px"}var n=parseInt(t)||0,i=["px","%","deg","rad","em","rem","vh","vw"],a=i.length,s=r();return{v:n,u:s}},e.preventScroll=function(t){var e=document.body.getAttribute("data-tweening");e&&"scroll"===e&&t.preventDefault()},e.truC=function(t){var r,n;return/rgb|rgba/.test(t)?(r=t.replace(/[^\d,]/g,"").split(","),n=r[3]?r[3]:null,n?{r:parseInt(r[0]),g:parseInt(r[1]),b:parseInt(r[2]),a:parseFloat(n)}:{r:parseInt(r[0]),g:parseInt(r[1]),b:parseInt(r[2])}):/#/.test(t)?{r:e.htr(t).r,g:e.htr(t).g,b:e.htr(t).b}:/transparent|none|initial|inherit/.test(t)?{r:0,g:0,b:0,a:0}:void 0},e.rth=function(t,e,r){return"#"+((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1)},e.htr=function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,r,n){return e+e+r+r+n+n});var r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r?{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)}:null},e.pe=function(t){if("function"==typeof t)return t;if("string"==typeof t){if(/easing|linear/.test(t))return e.Easing[t];if(/bezier/.test(t)){var r=t.replace(/bezier|\s|\(|\)/g,"").split(","),n=0,i=r.length;for(n;i>n;n++)r[n]=parseFloat(r[n]);return e.Ease.Bezier(r[0],r[1],r[2],r[3])}return/physics/.test(t)?e.Physics[t]():e.Ease[t]()}};var K=e.Easing={};K.linear=function(t){return t};var U=Math.PI,G=2*Math.PI,J=Math.PI/2,V=.1,tt=.4;K.easingSinusoidalIn=function(t){return-Math.cos(t*J)+1},K.easingSinusoidalOut=function(t){return Math.sin(t*J)},K.easingSinusoidalInOut=function(t){return-.5*(Math.cos(U*t)-1)},K.easingQuadraticIn=function(t){return t*t},K.easingQuadraticOut=function(t){return t*(2-t)},K.easingQuadraticInOut=function(t){return.5>t?2*t*t:-1+(4-2*t)*t},K.easingCubicIn=function(t){return t*t*t},K.easingCubicOut=function(t){return--t*t*t+1},K.easingCubicInOut=function(t){return.5>t?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},K.easingQuarticIn=function(t){return t*t*t*t},K.easingQuarticOut=function(t){return 1- --t*t*t*t},K.easingQuarticInOut=function(t){return.5>t?8*t*t*t*t:1-8*--t*t*t*t},K.easingQuinticIn=function(t){return t*t*t*t*t},K.easingQuinticOut=function(t){return 1+--t*t*t*t*t},K.easingQuinticInOut=function(t){return.5>t?16*t*t*t*t*t:1+16*--t*t*t*t*t},K.easingCircularIn=function(t){return-(Math.sqrt(1-t*t)-1)},K.easingCircularOut=function(t){return Math.sqrt(1-(t-=1)*t)},K.easingCircularInOut=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},K.easingExponentialIn=function(t){return Math.pow(2,10*(t-1))-.001},K.easingExponentialOut=function(t){return 1-Math.pow(2,-10*t)},K.easingExponentialInOut=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))},K.easingBackIn=function(t){var e=1.70158;return t*t*((e+1)*t-e)},K.easingBackOut=function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},K.easingBackInOut=function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},K.easingElasticIn=function(t){var e;return 0===t?0:1===t?1:(!V||1>V?(V=1,e=tt/4):e=tt*Math.asin(1/V)/G,-(V*Math.pow(2,10*(t-=1))*Math.sin((t-e)*G/tt)))},K.easingElasticOut=function(t){var e;return 0===t?0:1===t?1:(!V||1>V?(V=1,e=tt/4):e=tt*Math.asin(1/V)/G,V*Math.pow(2,-10*t)*Math.sin((t-e)*G/tt)+1)},K.easingElasticInOut=function(t){var e;return 0===t?0:1===t?1:(!V||1>V?(V=1,e=tt/4):e=tt*Math.asin(1/V)/G,(t*=2)<1?-.5*(V*Math.pow(2,10*(t-=1))*Math.sin((t-e)*G/tt)):V*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*G/tt)*.5+1)},K.easingBounceIn=function(t){return 1-K.easingBounceOut(1-t)},K.easingBounceOut=function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},K.easingBounceInOut=function(t){return.5>t?.5*K.easingBounceIn(2*t):.5*K.easingBounceOut(2*t-1)+.5},e.Tween=function(t,r,n,i){this._el=t,this._dr=i&&i.duration||700,this._r=i&&i.repeat||0,this._vSR={},this._vS=r,this._vE=n,this._y=i&&i.yoyo||!1,this.playing=!1,this.reversed=!1,this._rD=i&&i.repeatDelay||0,this._dl=i&&i.delay||0,this._sT=null,this.paused=!1,this._pST=null,this._to=i.transformOrigin,this._pp=i.perspective,this._ppo=i.perspectiveOrigin,this._ppp=i.parentPerspective,this._pppo=i.parentPerspectiveOrigin,this._rpr=i.rpr||!1,this._hex=i.keepHex||!1,this._e=i&&i.easing?e.pe(i.easing):e.Easing.linear,this._cT=[],this._sC=i&&i.start||null,this._sCF=!1,this._uC=i&&i.update||null,this._cC=i&&i.complete||null,this._pC=i&&i.pause||null,this._rC=i&&i.play||null,this._stC=i&&i.stop||null,this.repeat=this._r,e._queue(this)};var et=e.Tween.prototype;et.start=function(t){this.scrollIn();var i={};if(e.perspective(this._el,this),this._rpr){i=this.prS(),this._vS={},this._vS=e.prP(i,!1);for(var a in this._vS)if("transform"===a&&a in this._vE)for(var s in this._vS[a]){s in this._vE[a]||(this._vE[a][s]={});for(var o in this._vS[a][s])if(void 0!==this._vS[a][s][o].value){o in this._vE[a][s]||(this._vE[a][s][o]={});for(var u in this._vS[a][s][o])u in this._vE[a][s][o]||(this._vE[a][s][o][u]=this._vS[a][s][o][u])}if("value"in this._vS[a][s]&&!("value"in this._vE[a][s]))for(var l in this._vS[a][s])l in this._vE[a][s]||(this._vE[a][s][l]=this._vS[a][s][l])}}for(var v in this._vE)this._vSR[v]=this._vS[v];return this._sCF||(this._sC&&this._sC.call(),this._sCF=!0),r.push(this),this.playing=!0,this.paused=!1,this._sCF=!1,this._sT=t||window.performance.now(),this._sT+=this._dl,n||e._t(),this},et.stop=function(){return!this.paused&&this.playing&&(e.remove(this),this.playing=!1,this.paused=!1,this.scrollOut(),null!==this._stC&&this._stC.call(),this.stopChainedTweens(),this.close()),this},et.pause=function(){return!this.paused&&this.playing&&(e.remove(this),this.paused=!0,this._pST=window.performance.now(),null!==this._pC&&this._pC.call()),this},et.play=et.resume=function(){return this.paused&&this.playing&&(this.paused=!1,null!==this._rC&&this._rC.call(),this._sT+=window.performance.now()-this._pST,e.add(this),n||e._t()),this},et.reverse=function(){if(this._y)for(var t in this._vE){var e=this._vSR[t];this._vSR[t]=this._vE[t],this._vE[t]=e,this._vS[t]=this._vSR[t]}},et.chain=function(){return this._cT=arguments,this},et.stopChainedTweens=function(){var t=0,e=this._cT.length;for(t;e>t;t++)this._cT[t].stop()},et.scrollOut=function(){("scroll"in this._vE||"scrollTop"in this._vE)&&(this.removeListeners(),document.body.removeAttribute("data-tweening"))},et.scrollIn=function(){("scroll"in this._vE||"scrollTop"in this._vE)&&(document.body.getAttribute("data-tweening")||(document.body.setAttribute("data-tweening","scroll"),this.addListeners()))},et.addListeners=function(){document.addEventListener(l,e.preventScroll,!1)},et.removeListeners=function(){document.removeEventListener(l,e.preventScroll,!1)},et.prS=function(){var t={},e=this._el,r=this._vS,n=this.gIS("transform"),i=["rotate","skew"],a=["X","Y","Z"];for(var s in r)if(-1!==F.indexOf(s)){var o="rotate"===s||"translate"===s||"scale"===s;if(/translate/.test(s)&&"translate"!==s)t.translate3d=n.translate3d||W[s];else if(o)t[s]=n[s]||W[s];else if(!o&&/rotate|skew/.test(s))for(var u=0;2>u;u++)for(var l=0;3>l;l++){var v=i[u]+a[l];-1!==F.indexOf(v)&&v in r&&(t[v]=n[v]||W[v])}}else if(-1===C.indexOf(s))if("opacity"===s&&d){var f=this.gCS("filter");t.opacity="number"==typeof f?f:W.opacity}else t[s]=this.gCS(s)||W[s];else t[s]=null===e||void 0===e?window.pageYOffset||p.scrollTop:e.scrollTop;for(var s in n)-1===F.indexOf(s)||s in r||(t[s]=n[s]||W[s]);return t},et.gIS=function(t){if(this._el){var e=this._el,r=e.style.cssText,n={},i=r.replace(/\s/g,"").split(";"),a=0,s=i.length;for(a;s>a;a++)if(/transform/.test(i[a])){var o=i[a].split(":")[1].split(")"),u=0,l=o.length;for(u;l>u;u++){var v=o[u].split("(");""!==v[0]&&F.indexOf(v)&&(n[v[0]]=/translate3d/.test(v[0])?v[1].split(","):v[1])}}return n}},et.gCS=function(t){var e=this._el,r=window.getComputedStyle(e)||e.currentStyle,n=!d&&s&&/transform|Radius/.test(t)?"-"+i.toLowerCase()+"-"+t:t,a=s&&"transform"===t||s&&-1!==D.indexOf(t)?r[n]:r[t];if("transform"!==t&&n in r){if(a){if("filter"===n){var o=parseInt(a.split("=")[1].replace(")","")),u=parseFloat(o/100);return u}return a}return W[t]}},et.close=function(){var t=this;setTimeout(function(){var n=r.indexOf(t);n===r.length-1&&e.s(),t.repeat>0&&(t._r=t.repeat),t._y&&t.reversed===!0&&(t.reverse(),t.reversed=!1),t.playing=!1},61)},e.TweensAT=function(t,r,n){this.tweens=[];var i,a=t.length,s=[];for(i=0;a>i;i++)s[i]=n||{},n.delay=n.delay||0,s[i].delay=i>0?n.delay+(n.offset||0):n.delay,this.tweens.push(e.to(t[i],r,s[i]))},e.TweensFT=function(t,r,n,i){this.tweens=[];var a,s=t.length,o=[];for(a=0;s>a;a++)o[a]=i||{},i.delay=i.delay||0,o[a].delay=a>0?i.delay+(i.offset||0):i.delay,this.tweens.push(e.fromTo(t[a],r,n,o[a]))};var rt=e.TweensAT.prototype=e.TweensFT.prototype;return rt.start=function(t){t=t||window.performance.now();var e,r=this.tweens.length;for(e=0;r>e;e++)this.tweens[e].start(t);return this},rt.stop=function(){for(var t=0;t<this.tweens.length;t++)this.tweens[t].stop();return this},rt.pause=function(){for(var t=0;t<this.tweens.length;t++)this.tweens[t].pause();return this},rt.play=rt.resume=function(){for(var t=0;t<this.tweens.length;t++)this.tweens[t].play();return this},e});