forked from roeierez/infinite-list
-
Notifications
You must be signed in to change notification settings - Fork 0
/
InfiniteList.min.js
1 lines (1 loc) · 17.4 KB
/
InfiniteList.min.js
1
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):"object"==typeof exports?exports.InfiniteList=t():e.InfiniteList=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){var o=(n(6),n(2)),i=n(3),l=n(4),r=n(5);DEFAULT_ITEM_HEIGHT=40,MIN_FPS=30;var _=function(e){function t(e,t){return x=e,b=x.clientHeight,c(e),s(e,t),window.addEventListener("resize",f.bind(this)),_(),f(),this}function n(){X=!1,I&&I.disconnect(),x.removeChild(y),window.removeEventListener("resize",f.bind(this))}function _(){var e=(new Date).getTime(),t=0;X=!0;var n=function(){var o=(new Date).getTime();t++,o-e>200&&(k=Math.min(60,1e3*t/(o-e)),e=o,t=0),Y&&m(),X&&requestAnimationFrame(n)};requestAnimationFrame(n)}function a(){w=[0];for(var e=1;e<=S.itemsCount;++e){var t=S.itemHeightGetter?S.itemHeightGetter(e-1):DEFAULT_ITEM_HEIGHT;w[e]=w[e-1]+t}}function c(e){D=document.createElement("div"),r.applyElementStyle(D,{position:"absolute",top:0,bottom:0}),y=document.createElement("div"),r.applyElementStyle(y,{position:"relative",height:e.clientHeight+"px",width:e.clientWidth+"px",overflow:"hidden"}),y.appendChild(D),M=document.createElement("div"),r.applyElementStyle(M,{position:"absolute",top:"0px",right:"0px",marginRight:"3px",opacity:.3,width:"5px",backgroundColor:"#333"}),y.appendChild(M),e.appendChild(y)}function s(e,t){E=new l(e,function(e,t){z=t||0,Y=!0},t)}function u(e){E.setDimensions(e.clientWidth,e.clientHeight,e.clientWidth,g())}function f(){r.applyElementStyle(y,{height:x.clientHeight+"px",width:x.clientWidth+"px"}),A.forEach(function(e){H.addLayer(e,!0)}),A=[],a(),u(x),Y=!0}function h(){return k<MIN_FPS}function m(){var e=T(z),t=T(z+b);for(S.hasMore||(t=Math.min(t,S.itemsCount-1));A.length>0&&A[0].getItemIndex()<e;)H.addLayer(A.shift());for(;A.length>0&&A[A.length-1].getItemIndex()>t;)H.addLayer(A.pop());for(var n=A.length>0?A[0].getItemIndex():t+1,o=[],i=function(e,t){t.innerHTML="Loading..."},l=!1,_=function(e){var t=h(),n=t?i:S.itemRenderer;n(e.getItemIndex(),e.getDomElement()),t&&(W[e.getItemIndex()]=e)},a=e;n>a;++a)_(d(a,o)),l=!0;A=o.concat(A);for(var a=A[A.length-1].getItemIndex()+1;a<=Math.min(S.itemsCount-1,t);++a)_(d(a,A)),l=!0;var c=Object.keys(W);if(!l&&!h()&&c.length>0){var s=c.shift();S.itemRenderer(W[s].getItemIndex(),W[s].getDomElement()),delete W[s]}t>S.itemsCount-1&&v(),p(),r.applyTransformStyle(D,"matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,"+-z+", 0, 1)"),Y=c.length>0}function p(){var e=g(),t=y.parentElement,n=Math.max(10,Math.floor(t.clientHeight/e*t.clientHeight)),o=Math.floor(z/(e-t.clientHeight)*(t.clientHeight-n)),i=n+"px";r.applyElementStyle(M,{height:i}),r.applyTransformStyle(M,"matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,"+o+", 0, 1)")}function g(){return w[w.length-1]+(S.hasMore?DEFAULT_ITEM_HEIGHT:0)}function d(e,t,n,i){var l=n||(S.itemTypeGetter?S.itemTypeGetter(e):""),r=H.borrowLayerWithIdentifier(l);null==r&&(r=new o(D));var _=i||S.itemHeightGetter&&S.itemHeightGetter(e);return r.attach(e,w[e],y.clientWidth-9,_,l),t.push(r),r}function v(){if("$LoadMore"!=A[A.length-1].getIdentifier()){var e=d(S.itemsCount,A,"$LoadMore",-1);S.loadMoreRenderer(S.itemsCount,e.getDomElement()),S.pageFetcher(S.itemsCount,function(e,t){S.hasMore=t,S.itemsCount+=e,f()})}}function T(e){for(var t=0;t<S.itemsCount&&w[t+1]<e;)t++;return t}function L(e,t){E.scrollTo(0,w[e],t)}var S={itemHeightGetter:null,itemRenderer:null,itemTypeGetter:null,pageFetcher:null,loadMoreRenderer:function(e,t){t.innerHTML="Loading..."},hasMore:!1,itemsCount:0},x=null,y=null,D=null,M=null,E=null,b=0,A=[],w=[],H=new i,I=null,z=0,X=!1,Y=!0,k=60;for(key in e)e.hasOwnProperty(key)&&(S[key]=e[key]);var V=e.initialPage;V&&(S.itemsCount=V.itemsCount||0,S.hasMore=V.hasMore||!1);var W={};return{attach:t,detach:n,scrollToItem:L,refresh:f}};e.exports=_},function(e,t,n){var o=n(5),i=function(e){function t(e,t,n,i,l){return c=e,o.applyElementStyle(_,{width:n+"px",height:(i||DEFAULT_ITEM_HEIGHT)+"px"}),o.applyTransformStyle(_,"matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,"+t+", 0, 1)"),a=l,this}function n(){return c}function i(){return _}function l(){return a}function r(){var e=document.createElement("div");return o.applyElementStyle(e,{position:"absolute",top:0,left:0}),e}var _=null,a="",c=-1;return _=r(),e.appendChild(_),{attach:t,getItemIndex:n,getDomElement:i,getIdentifier:l}};e.exports=i},function(e,t,n){var o=n(5),i=function(){function e(e,t){var i=e.getIdentifier();null==n[i]&&(n[i]=[]),n[i].push(e),t&&o.applyElementStyle(e.getDomElement(),{display:"none"})}function t(e){if(null==n[e])return null;var t=n[e].pop();return null!=t&&o.applyElementStyle(t.getDomElement(),{display:"block"}),t}var n={};return{addLayer:e,borrowLayerWithIdentifier:t}};e.exports=i},function(e,t,n){var o=n(6),i=function(e,t,n){function i(){c.addEventListener("touchstart",s),c.addEventListener("touchmove",u),c.addEventListener("touchend",f),c.addEventListener("touchcancel",h);var e=!1;c.addEventListener("mousedown",function(t){t.target.tagName.match(/input|textarea|select/i)||(a.doTouchStart([{pageX:t.pageX,pageY:t.pageY}],t.timeStamp),e=!0,t.preventDefault())},!1),c.addEventListener("mousemove",function(t){e&&(a.doTouchMove([{pageX:t.pageX,pageY:t.pageY}],t.timeStamp),e=!0)},!1),c.addEventListener("mouseup",function(t){e&&(a.doTouchEnd(t.timeStamp),e=!1)},!1)}function l(){c.removeEventListener("touchstart",s),c.removeEventListener("touchmove",u),c.removeEventListener("touchend",f),c.removeEventListener("touchcancel",h)}function r(){a.setDimensions.apply(a,arguments)}function _(){a.scrollTo.apply(a,arguments)}var a=new o(t),c=n||e,s=function(e){a.doTouchStart(e.touches,e.timeStamp),e.preventDefault()},u=function(e){a.doTouchMove(e.touches,e.timeStamp,e.scale)},f=function(e){a.doTouchEnd(e.timeStamp)},h=function(e){e.preventDefault()};return i(),{disconnect:l,setDimensions:r,scrollTo:_}};e.exports=i},function(e,t,n){var o=function(e,t){Object.keys(t).forEach(function(n){e.style[n]!=t[n]&&(e.style[n]=t[n])})},i=function(e,t){var n={};["webkit","Moz","O","ms"].forEach(function(e){n[e+"Transform"]=t}),o(e,n)};e.exports={applyElementStyle:o,applyTransformStyle:i}},function(e,t,n){var o,i=n(7);!function(){o=function(e,t){this.__callback=e,this.options={scrollingX:!0,scrollingY:!0,animating:!0,animationDuration:250,bouncing:!0,locking:!0,paging:!1,snapping:!1,zooming:!1,minZoom:.5,maxZoom:3};for(var n in t)this.options[n]=t[n]};var t=function(e){return Math.pow(e-1,3)+1},n=function(e){return(e/=.5)<1?.5*Math.pow(e,3):.5*(Math.pow(e-2,3)+2)},l={__isSingleTouch:!1,__isTracking:!1,__isGesturing:!1,__isDragging:!1,__isDecelerating:!1,__isAnimating:!1,__clientLeft:0,__clientTop:0,__clientWidth:0,__clientHeight:0,__contentWidth:0,__contentHeight:0,__snapWidth:100,__snapHeight:100,__refreshHeight:null,__refreshActive:!1,__refreshActivate:null,__refreshDeactivate:null,__refreshStart:null,__zoomLevel:1,__scrollLeft:0,__scrollTop:0,__maxScrollLeft:0,__maxScrollTop:0,__scheduledLeft:0,__scheduledTop:0,__scheduledZoom:0,__lastTouchLeft:null,__lastTouchTop:null,__lastTouchMove:null,__positions:null,__minDecelerationScrollLeft:null,__minDecelerationScrollTop:null,__maxDecelerationScrollLeft:null,__maxDecelerationScrollTop:null,__decelerationVelocityX:null,__decelerationVelocityY:null,setDimensions:function(e,t,n,o){var i=this;e&&(i.__clientWidth=e),t&&(i.__clientHeight=t),n&&(i.__contentWidth=n),o&&(i.__contentHeight=o),i.__computeScrollMax(),i.scrollTo(i.__scrollLeft,i.__scrollTop,!0)},setPosition:function(e,t){var n=this;n.__clientLeft=e||0,n.__clientTop=t||0},setSnapSize:function(e,t){var n=this;n.__snapWidth=e,n.__snapHeight=t},activatePullToRefresh:function(e,t,n,o){var i=this;i.__refreshHeight=e,i.__refreshActivate=t,i.__refreshDeactivate=n,i.__refreshStart=o},finishPullToRefresh:function(){var e=this;e.__refreshActive=!1,e.__refreshDeactivate&&e.__refreshDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)},getValues:function(){var e=this;return{left:e.__scrollLeft,top:e.__scrollTop,zoom:e.__zoomLevel}},getScrollMax:function(){var e=this;return{left:e.__maxScrollLeft,top:e.__maxScrollTop}},zoomTo:function(e,t,n,o){var l=this;if(!l.options.zooming)throw new Error("Zooming is not enabled!");l.__isDecelerating&&(i.effect.Animate.stop(l.__isDecelerating),l.__isDecelerating=!1);var r=l.__zoomLevel;null==n&&(n=l.__clientWidth/2),null==o&&(o=l.__clientHeight/2),e=Math.max(Math.min(e,l.options.maxZoom),l.options.minZoom),l.__computeScrollMax(e);var _=(n+l.__scrollLeft)*e/r-n,a=(o+l.__scrollTop)*e/r-o;_>l.__maxScrollLeft?_=l.__maxScrollLeft:0>_&&(_=0),a>l.__maxScrollTop?a=l.__maxScrollTop:0>a&&(a=0),l.__publish(_,a,e,t)},zoomBy:function(e,t,n,o){var i=this;i.zoomTo(i.__zoomLevel*e,t,n,o)},scrollTo:function(e,t,n,o){var l=this;if(l.__isDecelerating&&(i.effect.Animate.stop(l.__isDecelerating),l.__isDecelerating=!1),null!=o&&o!==l.__zoomLevel){if(!l.options.zooming)throw new Error("Zooming is not enabled!");e*=o,t*=o,l.__computeScrollMax(o)}else o=l.__zoomLevel;l.options.scrollingX?l.options.paging?e=Math.round(e/l.__clientWidth)*l.__clientWidth:l.options.snapping&&(e=Math.round(e/l.__snapWidth)*l.__snapWidth):e=l.__scrollLeft,l.options.scrollingY?l.options.paging?t=Math.round(t/l.__clientHeight)*l.__clientHeight:l.options.snapping&&(t=Math.round(t/l.__snapHeight)*l.__snapHeight):t=l.__scrollTop,e=Math.max(Math.min(l.__maxScrollLeft,e),0),t=Math.max(Math.min(l.__maxScrollTop,t),0),e===l.__scrollLeft&&t===l.__scrollTop&&(n=!1),l.__publish(e,t,o,n)},scrollBy:function(e,t,n){var o=this,i=o.__isAnimating?o.__scheduledLeft:o.__scrollLeft,l=o.__isAnimating?o.__scheduledTop:o.__scrollTop;o.scrollTo(i+(e||0),l+(t||0),n)},doMouseZoom:function(e,t,n,o){var i=this,l=e>0?.97:1.03;return i.zoomTo(i.__zoomLevel*l,!1,n-i.__clientLeft,o-i.__clientTop)},doTouchStart:function(e,t){if(null==e.length)throw new Error("Invalid touch list: "+e);if(t instanceof Date&&(t=t.valueOf()),"number"!=typeof t)throw new Error("Invalid timestamp value: "+t);var n=this;n.__isDecelerating&&(i.effect.Animate.stop(n.__isDecelerating),n.__isDecelerating=!1),n.__isAnimating&&(i.effect.Animate.stop(n.__isAnimating),n.__isAnimating=!1);var o,l,r=1===e.length;r?(o=e[0].pageX,l=e[0].pageY):(o=Math.abs(e[0].pageX+e[1].pageX)/2,l=Math.abs(e[0].pageY+e[1].pageY)/2),n.__initialTouchLeft=o,n.__initialTouchTop=l,n.__zoomLevelStart=n.__zoomLevel,n.__lastTouchLeft=o,n.__lastTouchTop=l,n.__lastTouchMove=t,n.__lastScale=1,n.__enableScrollX=!r&&n.options.scrollingX,n.__enableScrollY=!r&&n.options.scrollingY,n.__isTracking=!0,n.__isDragging=!r,n.__isSingleTouch=r,n.__positions=[]},doTouchMove:function(e,t,n){if(null==e.length)throw new Error("Invalid touch list: "+e);if(t instanceof Date&&(t=t.valueOf()),"number"!=typeof t)throw new Error("Invalid timestamp value: "+t);var o=this;if(o.__isTracking){var i,l;2===e.length?(i=Math.abs(e[0].pageX+e[1].pageX)/2,l=Math.abs(e[0].pageY+e[1].pageY)/2):(i=e[0].pageX,l=e[0].pageY);var r=o.__positions;if(o.__isDragging){var _=i-o.__lastTouchLeft,a=l-o.__lastTouchTop,c=o.__scrollLeft,s=o.__scrollTop,u=o.__zoomLevel;if(null!=n&&o.options.zooming){var f=u;if(u=u/o.__lastScale*n,u=Math.max(Math.min(u,o.options.maxZoom),o.options.minZoom),f!==u){var h=i-o.__clientLeft,m=l-o.__clientTop;c=(h+c)*u/f-h,s=(m+s)*u/f-m,o.__computeScrollMax(u)}}if(o.__enableScrollX){c-=_;var p=o.__maxScrollLeft;(c>p||0>c)&&(o.options.bouncing?c+=_/2:c=c>p?p:0)}if(o.__enableScrollY){s-=a;var g=o.__maxScrollTop;(s>g||0>s)&&(o.options.bouncing?(s+=a/2,o.__enableScrollX||null==o.__refreshHeight||(!o.__refreshActive&&s<=-o.__refreshHeight?(o.__refreshActive=!0,o.__refreshActivate&&o.__refreshActivate()):o.__refreshActive&&s>-o.__refreshHeight&&(o.__refreshActive=!1,o.__refreshDeactivate&&o.__refreshDeactivate()))):s=s>g?g:0)}r.length>60&&r.splice(0,30),r.push(c,s,t),o.__publish(c,s,u)}else{var d=o.options.locking?3:0,v=5,T=Math.abs(i-o.__initialTouchLeft),L=Math.abs(l-o.__initialTouchTop);o.__enableScrollX=o.options.scrollingX&&T>=d,o.__enableScrollY=o.options.scrollingY&&L>=d,r.push(o.__scrollLeft,o.__scrollTop,t),o.__isDragging=(o.__enableScrollX||o.__enableScrollY)&&(T>=v||L>=v)}o.__lastTouchLeft=i,o.__lastTouchTop=l,o.__lastTouchMove=t,o.__lastScale=n}},doTouchEnd:function(e){if(e instanceof Date&&(e=e.valueOf()),"number"!=typeof e)throw new Error("Invalid timestamp value: "+e);var t=this;if(t.__isTracking){if(t.__isTracking=!1,t.__isDragging&&(t.__isDragging=!1,t.__isSingleTouch&&t.options.animating&&e-t.__lastTouchMove<=100)){for(var n=t.__positions,o=n.length-1,i=o,l=o;l>0&&n[l]>t.__lastTouchMove-100;l-=3)i=l;if(i!==o){var r=n[o]-n[i],_=t.__scrollLeft-n[i-2],a=t.__scrollTop-n[i-1];t.__decelerationVelocityX=_/r*(1e3/60),t.__decelerationVelocityY=a/r*(1e3/60)*2;var c=t.options.paging||t.options.snapping?4:1;(Math.abs(t.__decelerationVelocityX)>c||Math.abs(t.__decelerationVelocityY)>c)&&(t.__refreshActive||t.__startDeceleration(e))}}t.__isDecelerating||(t.__refreshActive&&t.__refreshStart?(t.__publish(t.__scrollLeft,-t.__refreshHeight,t.__zoomLevel,!0),t.__refreshStart&&t.__refreshStart()):(t.scrollTo(t.__scrollLeft,t.__scrollTop,!0,t.__zoomLevel),t.__refreshActive&&(t.__refreshActive=!1,t.__refreshDeactivate&&t.__refreshDeactivate()))),t.__positions.length=0}},__publish:function(e,o,l,r){var _=this,a=_.__isAnimating;if(a&&(i.effect.Animate.stop(a),_.__isAnimating=!1),r&&_.options.animating){_.__scheduledLeft=e,_.__scheduledTop=o,_.__scheduledZoom=l;var c=_.__scrollLeft,s=_.__scrollTop,u=_.__zoomLevel,f=e-c,h=o-s,m=l-u,p=function(e,t,n){n&&(_.__scrollLeft=c+f*e,_.__scrollTop=s+h*e,_.__zoomLevel=u+m*e,_.__callback&&_.__callback(_.__scrollLeft,_.__scrollTop,_.__zoomLevel))},g=function(e){return _.__isAnimating===e},d=function(e,t,n){t===_.__isAnimating&&(_.__isAnimating=!1),_.options.zooming&&_.__computeScrollMax()};_.__isAnimating=i.effect.Animate.start(p,g,d,_.options.animationDuration,a?t:n)}else _.__scheduledLeft=_.__scrollLeft=e,_.__scheduledTop=_.__scrollTop=o,_.__scheduledZoom=_.__zoomLevel=l,_.__callback&&_.__callback(e,o,l),_.options.zooming&&_.__computeScrollMax()},__computeScrollMax:function(e){var t=this;null==e&&(e=t.__zoomLevel),t.__maxScrollLeft=Math.max(t.__contentWidth*e-t.__clientWidth,0),t.__maxScrollTop=Math.max(t.__contentHeight*e-t.__clientHeight,0)},__startDeceleration:function(e){var t=this;if(t.options.paging){var n=Math.max(Math.min(t.__scrollLeft,t.__maxScrollLeft),0),o=Math.max(Math.min(t.__scrollTop,t.__maxScrollTop),0),l=t.__clientWidth,r=t.__clientHeight;t.__minDecelerationScrollLeft=Math.floor(n/l)*l,t.__minDecelerationScrollTop=Math.floor(o/r)*r,t.__maxDecelerationScrollLeft=Math.ceil(n/l)*l,t.__maxDecelerationScrollTop=Math.ceil(o/r)*r}else t.__minDecelerationScrollLeft=0,t.__minDecelerationScrollTop=0,t.__maxDecelerationScrollLeft=t.__maxScrollLeft,t.__maxDecelerationScrollTop=t.__maxScrollTop;var _=function(e,n,o){t.__stepThroughDeceleration(o)},a=t.options.snapping?4:.1,c=function(){return Math.abs(t.__decelerationVelocityX)>=a||Math.abs(t.__decelerationVelocityY)>=a},s=function(e,n,o){t.__isDecelerating=!1,t.scrollTo(t.__scrollLeft,t.__scrollTop,t.options.snapping)};t.__isDecelerating=i.effect.Animate.start(_,c,s)},__stepThroughDeceleration:function(e){var t=this,n=t.__scrollLeft+t.__decelerationVelocityX,o=t.__scrollTop+t.__decelerationVelocityY;if(!t.options.bouncing){var i=Math.max(Math.min(t.__maxDecelerationScrollLeft,n),t.__minDecelerationScrollLeft);i!==n&&(n=i,t.__decelerationVelocityX=0);var l=Math.max(Math.min(t.__maxDecelerationScrollTop,o),t.__minDecelerationScrollTop);l!==o&&(o=l,t.__decelerationVelocityY=0)}if(e?t.__publish(n,o,t.__zoomLevel):(t.__scrollLeft=n,t.__scrollTop=o),!t.options.paging){var r=.95;t.__decelerationVelocityX*=r,t.__decelerationVelocityY*=r}if(t.options.bouncing){var _=0,a=0,c=.03,s=.08;n<t.__minDecelerationScrollLeft?_=t.__minDecelerationScrollLeft-n:n>t.__maxDecelerationScrollLeft&&(_=t.__maxDecelerationScrollLeft-n),o<t.__minDecelerationScrollTop?a=t.__minDecelerationScrollTop-o:o>t.__maxDecelerationScrollTop&&(a=t.__maxDecelerationScrollTop-o),0!==_&&(_*t.__decelerationVelocityX<=0?t.__decelerationVelocityX+=_*c:t.__decelerationVelocityX=_*s),0!==a&&(a*t.__decelerationVelocityY<=0?t.__decelerationVelocityY+=a*c:t.__decelerationVelocityY=a*s)}}};for(var r in l)o.prototype[r]=l[r];e.exports=o}()},function(e,t,n){!function(t){var n=Date.now||function(){return+new Date},o=60,i=1e3,l={},r=1,_=e.exports={effect:{}};_.effect.Animate={requestAnimationFrame:function(){var e=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame,n=!!e;if(e&&!/requestAnimationFrame\(\)\s*\{\s*\[native code\]\s*\}/i.test(e.toString())&&(n=!1),n)return function(t,n){e(t,n)};var o=60,i={},l=0,r=1,_=null,a=+new Date;return function(e,t){var n=r++;return i[n]=e,l++,null===_&&(_=setInterval(function(){var e=+new Date,t=i;i={},l=0;for(var n in t)t.hasOwnProperty(n)&&(t[n](e),a=e);e-a>2500&&(clearInterval(_),_=null)},1e3/o)),n}}(),stop:function(e){var t=null!=l[e];return t&&(l[e]=null),t},isRunning:function(e){return null!=l[e]},start:function(e,t,a,c,s,u){var f=n(),h=f,m=0,p=0,g=r++;if(u||(u=document.body),g%20===0){var d={};for(var v in l)d[v]=!0;l=d}var T=function(r){var d=r!==!0,v=n();if(!l[g]||t&&!t(g))return l[g]=null,void(a&&a(o-p/((v-f)/i),g,!1));if(d)for(var L=Math.round((v-h)/(i/o))-1,S=0;S<Math.min(L,4);S++)T(!0),p++;c&&(m=(v-f)/c,m>1&&(m=1));var x=s?s(m):m;e(x,v,d)!==!1&&1!==m||!d?d&&(h=v,_.effect.Animate.requestAnimationFrame(T,u)):(l[g]=null,a&&a(o-p/((v-f)/i),g,1===m||null==c))};return l[g]=!0,_.effect.Animate.requestAnimationFrame(T,u),g}}}(this)}])});