popmotion
Advanced tools
Comparing version 0.0.16 to 0.0.17
{ | ||
"name": "popmotion", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"description": "A JavaScript UI framework. Handles animation, physics, and input tracking.", | ||
@@ -5,0 +5,0 @@ "author": "Matt Perry <sirhound@popmotion.io>", |
@@ -1,1 +0,1 @@ | ||
!function(){var t={},e=function(){var t={},e=function(){var t={};return t={defaultProps:{unit:"px"}}}(),n=function(){var t={},e=["scope","dom"],n=function(t){return-1!==e.indexOf(t)},r=function(t){return Object.prototype.toString.call(t).slice(8,-1)};return t={hasChanged:function(t,e){var n=!1,r="";for(r in e)t.hasOwnProperty(r)&&e.hasOwnProperty(r)?t[r]!==e[r]&&(n=!0):n=!0;return n},isNum:function(t){return"number"==typeof t},isObj:function(t){return"object"==typeof t},isFunc:function(t){return"Function"===r(t)},isString:function(t){return"string"==typeof t},isRelativeValue:function(t){return t&&t.indexOf&&t.indexOf("=")>0},isArray:function(t){return"Array"===r(t)},copy:function(t){return this.isArray(t)?this.copyArray(t):this.copyObject(t)},copyObject:function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=this.isObj(t[r])&&!n(r)?this.copy(t[r]):t[r]);return e},copyArray:function(t){for(var e=[],n=t.length,r=0;n>r;r++)e[r]=this.isObj(t[r])?this.copy(t[r]):t[r];return e},merge:function(t,e){return this.isArray(t)?this.copyArray(e):this.mergeObject(t,e)},mergeObject:function(t,e){var r=this.isObj(t),i=r?this.copy(t):this.copy(e),s="";if(r)for(s in e)e.hasOwnProperty(s)&&(i[s]=this.isObj(e[s])&&!n(s)?this.merge(t[s],e[s]):e[s]);return i},splitValUnit:function(t){var e=t.match(/(-?\d*\.?\d*)(.*)/);return{value:parseFloat(e[1]),unit:e[2]}},stepProgress:function(t,e){var n=1/(e-1),r=1-1/e,i=Math.min(t/r,1);return Math.floor(i/n)*n},currentTime:function(){return"undefined"!=typeof performance?performance.now():(new Date).getTime()}}}(),r=function(){var t={},e=n,r={angle:function(t,e){var n=e?t:{x:0,y:0},r=e||t,i={x:r.x-n.x,y:r.y-n.y};return this.angleFromCenter(i.x,i.y)},angleFromCenter:function(t,e){return this.radiansToDegrees(Math.atan2(e,t))},degreesToRadians:function(t){return t*Math.PI/180},dilate:function(t,e,n){return t+(e-t)*n},distance:function(t,e){return"number"==typeof t?this.distance1D(t,e):this.distance2D(t,e)},distance1D:function(t,e){var n="number"==typeof e,r=n?t:0,i=n?e:t;return s(i-r)},distance2D:function(t,e){var n="object"==typeof e,r=n?t:{x:0,y:0},i=n?e:t,o={x:s(i.x-r.x),y:s(i.y-r.y)};return this.hypotenuse(o.x,o.y)},hypotenuse:function(t,e){var n=t*t,r=e*e,i=n+r;return Math.sqrt(i)},offset:function(t,e){var n={};for(var r in e)e.hasOwnProperty(r)&&(t.hasOwnProperty(r)?n[r]=e[r]-t[r]:n[r]=0);return i(n.x)&&i(n.y)&&(n.angle=this.angle(t,e),n.distance=this.distance2D(t,e)),n},pointFromAngleAndDistance:function(t,e,n){var r={};return r.x=n*Math.cos(e)+t.x,r.y=n*Math.sin(e)+t.y,r},progress:function(t,e,n){var r="number"==typeof n,i=r?e:0,s=r?n:e,o=s-i,u=(t-i)/o;return u},radiansToDegrees:function(t){return 180*t/Math.PI},relativeValue:function(t,n){var r=t,i=n.split("="),s=i[0],o=e.splitValUnit(i[1]);switch(s){case"+":r+=o.value;break;case"-":r-=o.value;break;case"*":r*=o.value;break;case"/":r/=o.value}return o.unit&&(r+=o.unit),r},restricted:function(t,e,n){var r=void 0!==e?Math.max(t,e):t;return r=void 0!==n?Math.min(r,n):r},speedPerFrame:function(t,e){return i(t)?t/(1e3/e):0},speedPerSecond:function(t,e){return t*(1e3/e)},value:function(t,e,n){var r="number"==typeof n,i=r?e:0,s=r?n:e;return-t*i+t*s+i},valueEased:function(t,e,n,r){var i=r(t);return this.value(i,e,n)}},i=e.isNum,s=Math.abs;return t=r}(),i=function(){var t={};return t=function(t,e,n,r){for(var i="",s="",o=0,u=e.length;u>o;o++)s=e[o],t.hasOwnProperty(s)&&(i+=t[s]+n);return r&&(i=i.slice(0,-r)),i}}(),s=function(){var t={};return t={color:{min:0,max:255,round:!0},opacity:{min:0,max:1},percent:{min:0,max:100,unit:"%"}}}(),o=function(){var t={},e="X",n="Y",r="Alpha",i={colors:["Red","Green","Blue",r],positions:[e,n,"Z"],dimensions:["Top","Right","Bottom","Left"],shadow:[e,n,"Radius","Spread","Color"],hsl:["Hue","Saturation","Lightness",r]};return t=i}(),u=function(){var t={};return t=function(t,e){return e+"("+t+")"}}(),a=function(){var t={};return t=function(t){return"string"==typeof t?t.split(" "):[t]}}(),c=function(){var t={},e=r,i=n,s=function(){var t={},e=3,n=function(t,n){this.max=n||e,this.entries=[],this.add(t)};return n.prototype={add:function(t){var e=this.getSize();this.entries.push(t),e>=this.max&&this.entries.shift()},get:function(t){return t="number"==typeof t?t:this.getSize()-1,this.entries[t]},getPrevious:function(){return this.get(this.getSize()-2)},getSize:function(){return this.entries.length}},t=n}(),o=function(){var t=arguments.length-1;this.current={},this.offset={},this.velocity={},this.history=new s,this.update(arguments[0],arguments[1]),i.isFunc(arguments[t])&&(this.poll=arguments[t])};return o.prototype={maxInactiveFrames:2,inactiveFrames:0,get:function(t){var e=this.history.get(),n=void 0!==t?e[t]:e;return n},update:function(t,e){var n={};return i.isNum(e)?n[t]=e:n=t,this.history.add(i.merge(this.current,n)),this},onFrame:function(t){var n,r;if(t!==this.lastFrame)return n=this.poll?this.poll():this.history.get(),r=i.hasChanged(this.current,n),r?(this.velocity=e.offset(this.current,n),this.current=n,this.inactiveFrames=0):this.inactiveFrames>=this.maxInactiveFrames?this.velocity=e.offset(this.current,this.current):this.inactiveFrames++,this.lastFrame=t,this}},t=o}(),h=function(){var t={},e=function(){this._keys=[],this._numKeys=0};return e.prototype={_addKey:function(t){this._keys.push(t),this._numKeys++},extend:function(t,e){var n="object"==typeof t,r=n?t:{},i="";n||(r[t]=e);for(i in r)r.hasOwnProperty(i)&&(this._addKey(i),this[i]=r[i]);return this},each:function(t){for(var e="",n=0;n<this._numKeys;n++)e=this._keys[n],t(e,this[e])}},t=e}(),f=function(){var t={},e=n,r=h,i=new r,s=".",o=function(t){for(var e=t.split(s),n=e.length,r=e[0],i=1;n>i;i++)e[i]=r+=s+e[i];return e};return i.getDefined=function(t){for(var n={},r={},i=o(t),s=i.length,u=0;s>u;u++)r=this[i[u]],r&&(n=e.merge(n,r));return n},t=i}(),l=function(){var t={},e=r,n=function(){var t={},e=8,n=.001,r=1e-7,i=10,s=11,o=1/(s-1),u="undefined"!=typeof Float32Array,a=function(t,e){return 1-3*e+3*t},c=function(t,e){return 3*e-6*t},h=function(t){return 3*t},f=function(t,e,n){return 3*a(e,n)*t*t+2*c(e,n)*t+h(e)},l=function(t,e,n){return((a(e,n)*t+c(e,n))*t+h(e))*t},p=function(t,a,c,h){var p=u?new Float32Array(s):new Array(s),v=!1,d=function(e,n,s){var o,u,a=0;do u=n+(s-n)/2,o=l(u,t,c)-e,o>0?s=u:n=u;while(Math.abs(o)>r&&++a<i);return u},m=function(n,r){for(var i,s=0,o=0;e>s;++s){if(o=f(r,t,c),0===o)return r;i=l(r,t,c)-n,r-=i/o}return r},g=function(){for(var e=0;s>e;++e)p[e]=l(e*o,t,c)},y=function(e){for(var r=0,i=1,u=s-1,a=0,h=0,l=0;i!=u&&p[i]<=e;++i)r+=o;return--i,a=(e-p[i])/(p[i+1]-p[i]),h=r+a*o,l=f(h,t,c),l>=n?m(e,h):0===l?h:d(e,r,r+o)},b=function(){v=!0,(t!=a||c!=h)&&g()},w=function(e){var n;return v||b(),n=t===a&&c===h?e:0===e?0:1===e?1:l(y(e),a,h)};return w};return t=p}(),i="In",s="Out",o=i+s,u=function(t){return function(e){return Math.pow(e,t)}},a={circ:function(t){return 1-Math.sin(Math.acos(t))},back:function(t){var e=1.5;return t*t*((e+1)*t-e)}},c=function(t,e){return.5>=t?e(2*t)/2:(2-e(2*(1-t)))/2},f=function(t,e){return 1-e(1-t)},l=function(t,e){var n=t+i,r=t+s,u=t+o,a=n,h=r;v[a]=e,v[h]=function(t){return f(t,v[a])},v[u]=function(t){return c(t,v[a])}},p=h,v=new p;v.extend=function(t,e,r,i,s){return"function"==typeof e?l(t,e):this[t]=new n(e,r,i,s),this},v.withinRange=function(t,n,r,i,s){var o=e.restricted(t,0,1);return o!==t&&s&&(i="linear",o+=(t-o)*s),e.valueEased(o,n,r,this[i])},v.linear=function(t){return t},["ease","cubic","quart","quint"].forEach(function(t,e){a[t]=u(e+2)});for(var d in a)a.hasOwnProperty(d)&&l(d,a[d]);return t=v}(),p=function(){var t={},e=r,i=n,s=e.speedPerFrame,o=h,u=new o;return u.extend({velocity:function(t,e){return t.velocity=t.velocity-s(t.deceleration,e)+s(t.acceleration,e),u.friction(t,e)},glide:function(t,e,n){var r=-i.currentTime()-n,s=-t.to*Math.exp(r/t.timeConstant);return t.to+s-t.current},friction:function(t,n){var r=s(t.velocity,n)*(1-t.friction);return e.speedPerSecond(r,n)},spring:function(t,e){var n=t.to-t.current;return t.velocity+=n*s(t.spring,e),u.friction(t,e)},bounce:function(t){var e=0,n=t.to,r=t.current,i=t.bounce;return"glide"===t.simulate&&(e=n-r,t.to=r-e*i),t.velocity*=-i},capture:function(t,e){t.to=e,t.simulate="spring",t.capture=t.min=t.max=void 0}}),t=u}(),v=function(){var t={},e=f,r=n;return t=function(t,n){var i="string"==typeof t?e.getDefined(t):t;return"object"==typeof n&&(i=r.merge(i,n)),i}}(),d=function(){var t={},e=r,i=n,s=l,o={actionDefaults:function(){var t={};return t={duration:400,ease:"easeInOut",dilate:1,loop:!1,yoyo:!1,flip:!1}}(),valueDefaults:function(){var t={};return t={duration:400,delay:0,stagger:0,ease:"easeInOut",steps:0,stepDirection:"end"}}(),surpressMethod:!0,actorMethods:function(){var t={},e=function(){var t={},e=f,r=n,i=function(){var t=[].slice.call(arguments),n=t[0].split(" "),r=n.length,i=e.getDefined(n[0]),s=1;if(r>1)for(;r>s;s++)t.shift(),t.unshift(n[s]),this.queue.add.apply(this.queue,t);return i};return t=function(){for(var t=[].slice.call(arguments),e=t.length,n=r.isString(t[0])?i.apply(this,t):t[0],s=1;e>s;s++)switch(typeof t[s]){case"object":n=r.merge(n,t[s]);break;case"number":n.duration=t[s];break;case"string":n.ease=t[s]}return n.loopCount=n.yoyoCount=n.flipCount=0,n.playDirection=1,n}}(),r=n;return t={play:function(){var t="play";return this.isActive&&this.action===t?this.addToQueue.apply(this,arguments):(this.action=t,this.set(e.apply(this,arguments),"to"),this.start()),this},addToQueue:function(){return this.queue.add.apply(this.queue,arguments),this},next:function(){for(var t=[{key:"loop",callback:this.reset},{key:"yoyo",callback:this.reverse},{key:"flip",callback:this.flipValues}],e=t.length,n=!1,r=0;e>r;++r)if(this.checkNextStep(t[r].key,t[r].callback)){n=!0;break}return n||this.playNext()?this.isActive=!0:this.stop(),this},checkNextStep:function(t,e){var n="Count",i=!1,s=this[t],o=this[t+n],u=s===!0;return(u||r.isNum(s))&&(++o,this[t+n]=o,(u||s>=o)&&(e.call(this),i=!0)),i},playNext:function(){var t=!1,n=this.queue.next(this.playDirection);return r.isArray(n)&&(this.set(e.apply(this,n),"to").resetProgress(),t=!0),t}}}(),onFrameStart:function(t){this.elapsed+=t*this.dilate*this.playDirection,this.hasEnded=!0},process:function(t,n){var r,o=n.to,u=1===this.playDirection?1:0,a=n.current;return void 0!==o&&(r=e.restricted(e.progress(this.elapsed-n.delay,n.duration)-n.stagger,0,1),r!==u?this.hasEnded=!1:n.to=void 0,n.steps&&(r=i.stepProgress(r,n.steps)),a=s.withinRange(r,n.origin,o,n.ease)),a},hasEnded:function(){return this.hasEnded}};return t=o}(),m=function(){var t={},e=function(){var t={};return t=function(t){return"string"==typeof t?t.split(/,\s*/):[t]}}(),n=function(){var t={};return t=function(t){return t.substring(t.indexOf("(")+1,t.lastIndexOf(")"))}}();return t=function(t,r){for(var i={},s=r.length,o=e(n(t)),u=0;s>u;u++)i[r[u]]=void 0!==o[u]?o[u]:1;return i}}(),g=function(){var t={},e=i,n=m,r=u,a=s,c=o.hsl;return t={defaultProps:{Hue:{min:0,max:360},Saturation:a.percent,Lightness:a.percent,Alpha:a.opacity},test:function(t){return t&&t.indexOf("hsl")>-1},split:function(t){return n(t,c)},combine:function(t){return r(e(t,c,", ",2),"hsla")}}}(),y=function(){var t={},e=i,n=m,r=u,a=s,c=a.color,h=o.colors;return t={defaultProps:{Red:c,Green:c,Blue:c,Alpha:a.opacity},test:function(t){return t&&t.indexOf("rgb")>-1},split:function(t){return n(t,h)},combine:function(t){return r(e(t,h,", ",2),"rgba")}}}(),b=function(){var t={},e=y;return t={defaultProps:e.defaultProps,test:function(t){return t&&t.indexOf("#")>-1},split:function(t){var e,n,r;return t.length>4?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),e+=e,n+=n,r+=r),{Red:parseInt(e,16),Green:parseInt(n,16),Blue:parseInt(r,16),Alpha:1}},combine:function(t){return e.combine(t)}}}(),w=function(){var t={},e=n,r=y,i=g,s=b,o=[r,i,s],u=3,a=function(t,e){for(var n=0;u>n;n++)if(o[n].test(e))return o[n][t](e)};return t={defaultProps:e.merge(r.defaultProps,i.defaultProps),test:function(t){return r.test(t)||s.test(t)||i.test(t)},split:function(t){return a("split",t)},combine:function(t){return t.Red?r.combine(t):i.combine(t)}}}(),x=function(){var t={},e=function(){var t={};return t=function(t){return function(){for(var e,n,r=this.elements.length,i=0,s=!1,o=[];r>i;i++)e=this.elements[i],n=e[t].apply(e,arguments),n!=e&&(s=!0,o.push(n));return s?o:this}}}(),i=function(){var t,r,i={},s=n,o=e,u=function(){var t={};return t={delay:0,onStart:void 0,onChange:void 0,onFrame:void 0,onEnd:void 0}}(),a=function(){var t={};return t={to:void 0,min:void 0,max:void 0,origin:0,hasRange:!1,round:!1,link:void 0}}(),c=h,f=new c;return f.extend=function(e,n){var i="";if(n.surpressMethod||t.prototype[e]||(t.prototype[e]=function(){return this.action=e,this.set(n.parse.apply(this,arguments)),this.start()},r.prototype[e]=o(e)),n.actorMethods)for(i in n.actorMethods)n.actorMethods.hasOwnProperty(i)&&(t.prototype[i]=n.actorMethods[i],r.prototype[i]=o(i));n.actionDefaults=n.actionDefaults?s.merge(u,n.actionDefaults):u,n.valueDefaults=n.valueDefaults?s.merge(a,n.valueDefaults):a,c.prototype.extend.call(this,e,n)},f.setActor=function(e){t=e},f.setActorCollection=function(t){r=t},i=f}(),s=function(){var t={},e=h,n=new e;return n.defaultProps=function(t,e){var n=this[t],r=n.defaultProps?n.defaultProps[e]||n.defaultProps:{};return r},n.test=function(t){var e=!1;return this.each(function(n,r){r.test&&r.test(t)&&(e=n)}),e},t=n}(),o=function(){var t,n,r={},i=function(){var t={};return t=function(t,e,n,r){var i=typeof t;if("string"==i&&e)r.call(this,t,e);else{if("object"!=i)return n.call(this,t);for(var s in t)t.hasOwnProperty(s)&&r.call(this,s,t[s])}return this}}(),s=e,o=h,u=new o;return u.extend=function(e,r){r.get&&r.set&&(t.prototype[e]=function(t,e){return i.call(this,t,e,r.get,r.set)},n.prototype[e]=s(e)),o.prototype.extend.call(this,e,r)},u.shard=function(t,e){for(var n="",r="",i=!1,s=0;s<this._numKeys;s++)n=this._keys[s],i=e&&e.hasOwnProperty(n),r=i?e[n]:{},(i||"values"===n)&&t(this[n],n,r)},u.setActor=function(e){t=e},u.setActorCollection=function(t){n=t},r=u}(),u=function(){var t={},e=function(){var t={},e=function(){var t={},e=function(){var t={},e=n,r=33,i=function(){this.elapsed=16.7,this.current=e.currentTime(),this.update()};return i.prototype={update:function(){return this.prev=this.current,this.current=e.currentTime(),this.elapsed=Math.min(this.current-this.prev,r),this.current},getElapsed:function(){return this.elapsed},clock:function(){this.current=e.currentTime()}},t=i}(),r=function(){var t,e={},n=0,r="undefined"!=typeof window;return t=r?window.requestAnimationFrame:function(t){var e=(new Date).getTime(),r=Math.max(0,16-(e-n)),i=setTimeout(function(){t(e+r)},r);return n=e+r,i},e=t}(),i=function(){this.timer=new e};return i.prototype={isRunning:!1,frame:function(){var t=this;r(function(){var e=t.timer.update(),n=t.callback.call(t.scope,e,t.timer.getElapsed());n?t.frame():t.stop()})},start:function(){this.isRunning||(this.timer.clock(),this.isRunning=!0,this.frame())},stop:function(){this.isRunning=!1},setCallback:function(t,e){this.scope=t,this.callback=e}},t=new i}(),r=function(){this.activeIds=[],this.activeProcesses={},this.deactivateQueue=[],e.setCallback(this,this.fireActive)};return r.prototype={processCounter:0,activeCount:0,getProcess:function(t){return this.activeProcesses[t]},getActiveCount:function(){return this.activeCount},getActive:function(){return this.activeIds},getQueueLength:function(){return this.deactivateQueue.length},fireActive:function(t,e){var n,r=0,i=[],s=0;for(this.purge(),r=this.getActiveCount(),i=this.getActive();r>s;s++)n=this.getProcess(i[s]),n&&n.fire(t,e);return this.purge(),r=this.getActiveCount(),r?!0:!1},register:function(){return this.processCounter++},activate:function(t,n){var r=this.deactivateQueue.indexOf(n),i=r>-1,s=this.activeIds.indexOf(n)>-1;i&&this.deactivateQueue.splice(r,1),s||(this.activeIds.push(n),this.activeProcesses[n]=t,this.activeCount++,e.start())},deactivate:function(t){this.deactivateQueue.push(t)},purge:function(){for(var t=this.getQueueLength(),e=0,n=0;t--;)n=this.deactivateQueue[t],e=this.activeIds.indexOf(n),e>-1&&(this.activeIds.splice(e,1),this.activeCount--,delete this.activeProcesses[n]);this.deactivateQueue=[]}},t=new r}(),r=function(t,n){var r=void 0!==n;this.callback=r?n:t,this.scope=r?t:this,this.id=e.register(),this.isActive=!1};return r.prototype={fire:function(t,e){return this.isActive&&this.callback.call(this.scope,t,e),this.isInterval&&this.deactivate(),this},start:function(t){var e=this;return this.reset(),this.activate(),t&&(this.stopTimer=setTimeout(function(){e.stop()},t),this.isStopTimerActive=!0),this},stop:function(){return this.reset(),this.deactivate(),this},activate:function(){return this.isActive=!0,e.activate(this,this.id),this},deactivate:function(){return this.isActive=!1,e.deactivate(this.id),this},every:function(t){var e=this;return this.reset(),this.isInterval=!0,this.intervalTimer=setInterval(function(){e.activate()},t),this.isIntervalTimeActive=!0,this},reset:function(){return this.isInterval=!1,this.isStopTimerActive&&clearTimeout(this.stopTimer),this.isIntervalTimeActive&&clearInterval(this.intervalTimer),this}},t=r}(),a=function(){var t={},e=u,a=function(){var t={},e=function(){this.clear()};return e.prototype={add:function(){this.queue.push([].slice.call(arguments))},next:function(t){var e=this.queue,n=!1,r=this.index;return t=arguments.length?t:1,r>=0&&r<e.length?(n=e[r],this.index=r+t):this.clear(),n},clear:function(){this.queue=[],this.index=0}},t=e}(),c=n,h=function(){var t={},e=i,n=o,u=s,a=r,c="values",h=function(t,r){var i=this,s=this.values,o=e[this.action],h=o,f=this.output,l=this.order.length,p=this.parentOrder.length,v="",d={},m=0,g=0;for(this.input&&(f.input=this.input.onFrame(t)),o.onFrameStart&&o.onFrameStart.call(this,r),this.firstFrame&&n.shard(function(t){t.onStart&&t.onStart.call(i,s)},f),f[c]=f[c]||{};l>g;g++)v=this.order[g],d=s[v],h=d.link?e.link:o,m=h.process.call(this,v,d,r),h.limit&&(m=h.limit(m,d)),d.round&&(m=Math.round(m)),d.frameChange=m-d.current,h.calculatesVelocity||(d.velocity=a.speedPerSecond(d.frameChange,r)),d.speed=Math.abs(d.velocity),d.current!=m&&(this.hasChanged=!0),this.values[v].current=m,f[c][v]=d.unit?m+d.unit:m,d.parent?(f[d.parent]=f[d.parent]||{},f[d.parent][d.propName]=f[c][v]):f[d.route][d.name]=f[c][v];for(g=0;p>g;g++)v=this.parentOrder[g],d=this.values[v],d.current=u[d.type].combine(f[v]),f[d.route][d.name]=f[c][v]=d.current;n.shard(function(t,e,n){t.onFrame&&t.onFrame.call(i,n),(i.hasChanged&&t.onChange||i.firstFrame&&t.onChange)&&t.onChange.call(i,n)},f),o.hasEnded.call(this,this.hasChanged)?(this.isActive=!1,n.shard(function(t,e,n){t.onEnd&&t.onEnd.call(i,n)},f),!this.isActive&&"play"===this.action&&this.next&&this.next()):this.hasChanged=!1,this.firstFrame=!1,this.framestamp=t};return t=function(){this.isActive&&h.apply(this,arguments)}}(),f=function(){var t={},e=r,u=n,a=u.isNum,c=i,h=s,f=o,l=["current","to","start","min","max"],p=l.length;return t={all:function(t,e){var n="";for(n in e)e.hasOwnProperty(n)&&this[t](e[n]);return this},reset:function(t){this.retarget(t),t.current=t.origin},resetOrigin:function(t){t.origin=t.current},retarget:function(t){t.to=t.target},flip:function(t){var e=void 0!==t.target?t.target:t.current;t.target=t.to=t.origin,t.origin=e},initialState:function(t,e){return{current:t||0,speed:0,velocity:0,frameChange:0,route:e}},split:function(t,e,n,r){for(var i={},s={},o="",a="",c=0;p>c;c++)if(o=l[c],e.hasOwnProperty(o)){u.isFunc(e[o])&&(e[o]=e[o].call(n)),s=r.split(e[o]);for(a in s)s.hasOwnProperty(a)&&(i[a]=i[a]||u.copy(h.defaultProps(e.type,a)),i[a][o]=s[a])}return i},splitUnit:function(t,e){var n,r=t;return u.isString(t)&&(n=u.splitValUnit(t),isNaN(n.value)||(r=n.value,e.unit=n.unit)),r},resolve:function(t,n,r,i){var s=r.current||0,o=l.indexOf(t)>-1;return u.isFunc(n)&&(n=n.call(i,s)),u.isString(n)&&(n.indexOf("=")>0&&(n=e.relativeValue(s,n)),o&&this.splitUnit(n,r)),o&&(n=parseFloat(n)),n},preprocess:function(t,e,n,r,i){var s={},o={},a={},c={},f={},l={},p=!1,v="",d="",m="";i=i||"current";for(v in t)if(t.hasOwnProperty(v)&&(p=u.isObj(t[v]),o=p?t[v]:{},d=v+r,l=e.values[d],o.name=v,p||(o[i]=t[v]),o.type||(l&&l.type?o.type=l.type:n.typeMap&&n.typeMap[v]?o.type=n.typeMap[v]:u.isString(o[i])&&(o.type=h.test(o[i]))),s[d]=o,o.type))if(f=h[o.type],f.split){o.children={},a=this.split(v,o,e,f);for(m in a)a.hasOwnProperty(m)&&(c=u.merge(o,a[m]),c.parent=v+r,c.name=v,c.propName=m,delete c.type,delete c.children,s[v+m+r]=c)}else s[d]=u.merge(h.defaultProps(o.type,v),o);return s},process:function(t,e,n,r){var i,s=f[n],o="values"===n?"":"."+n,h=this.preprocess(t,e,s,o,r),l="",p="",v={},d={},m={},g=!1;for(l in h)if(h.hasOwnProperty(l)){v=h[l],d=e.values[l]||this.initialState(this.resolve("start",v.start,{},e),n),g=void 0!==v.children,d.action=v.link?"link":e.action,m=c[d.action].valueDefaults;for(p in m)m.hasOwnProperty(p)&&(d[p]=e.hasOwnProperty(p)?e[p]:m[p]);for(p in v)v.hasOwnProperty(p)&&(i=v[p],void 0===i||a(i)||g||(i=this.resolve(p,i,d,e)),d[p]=i,"to"===p&&(d.target=d.to));d.origin=d.current,d.hasRange=a(d.min)&&a(d.max)?!0:!1,e.values[l]=d,e.updateOrder(l,u.isString(d.link),g)}}}}(),l=i,p=o,v=function(t){this.element=t||!1,this.values={},this.output={},this.queue=new a,this.process=new e(this,h),this.clearOrder()};return v.prototype={set:function(t,e){var n=this;return this.clearOrder(),this.resetProps(),this.setProps(t),p.shard(function(t,r,i){n.output[r]=n.output[r]||{},n.setValues(i,r,e)},t),this},start:function(){return this.resetProgress(),this.activate(),this},stop:function(){return this.queue.clear(),this.pause(),this},pause:function(){return this.isActive=!1,this.process.stop(),this},resume:function(){return this.framestamp=this.started=c.currentTime(),this.isActive=!0,this.process.start(),this},toggle:function(){return this.isActive?this.pause():this.resume(),this},activate:function(){this.isActive=!0,this.started=c.currentTime()+this.delay,this.framestamp=this.started,this.firstFrame=!0,this.process.start()},reset:function(){return this.resetProgress(),f.all("reset",this.values),this},resetProgress:function(){return this.elapsed=1===this.playDirection?0:this.duration,this.started=c.currentTime(),this},resetOrigins:function(){return f.all("resetOrigin",this.values),this},reverse:function(){return this.playDirection*=-1,f.all("retarget",this.values),this},flipValues:function(){return this.elapsed=this.duration-this.elapsed,f.all("flip",this.values),this},setProps:function(t){var e="";for(e in t)t.hasOwnProperty(e)&&!p.hasOwnProperty(e)&&(this[e]=t[e])},resetProps:function(){return this.setProps(l[this.action].actionDefaults),this},setValues:function(t,e,n){return f.process(t,this,e,n),this},updateOrder:function(t,e,n){var r=n?this.parentOrder:this.order,i=r.indexOf(t);return(-1===i||e)&&(r.push(t),-1!==i&&r.splice(i,1)),this},clearOrder:function(){return this.order=[],this.parentOrder=[],this},get isActive(){return this._isActive},set isActive(t){t===!0&&(this.hasChanged=t),this._isActive=t}},l.setActor(v),p.setActor(v),t=v}(),v=function(){var t={},r=a,s=e,u=n,c=i,h=o,f="linear",l=function(t){this.clear(),t&&this.add(t),this._stagger=new r};return l.prototype={clear:function(){return this.elements=[],this},stagger:function(t,e){var n=this,r=[].slice.call(arguments),i=this.elements.length,s=u.isNum(t),o=s?t:t.interval,a=s?{}:t,c=-1,h=u.isString(e)?function(t){t[e].apply(t,r)}:e;return r.splice(0,2),a.values={i:{current:0,duration:o*i,ease:s?f:t.ease||f,steps:i,round:!0,to:i-1}},a.onChange=function(t){var e=t.i,r=c+1;if(e===c+1)h(n.elements[r],r);else for(;e>=r;r++)h(n.elements[r],r);c=e},this._stagger.play(a),this},add:function(t){for(var e,n=t.length,i=0;n>i;i++)e=t[i]instanceof r?t[i]:new r(t[i]),this.elements.push(e);return this}},function(){for(var t in r.prototype)r.prototype.hasOwnProperty(t)&&(l.prototype[t]=s(t))}(),c.setActorCollection(l),h.setActorCollection(l),t=l}(),d=function(){var t={},e=v;return t=function(t){var n="string"==typeof t?document.querySelectorAll(t):t,r=[];return n.get?r=n.get():n.length?r=[].slice.call(n):r.push(n),new e(r,{type:"dom"})}}(),m=i,g=l,y=f,b=o,w=p,x=s,P=r,O=a,A=v,k=c,C=u,F={Actor:O,ActorCollection:A,Input:k,Process:C,select:function(t){return d(t)},addAction:function(){return m.extend.apply(m,arguments),this},addEasing:function(){return g.extend.apply(g,arguments),this},addPreset:function(){return y.extend.apply(y,arguments),this},addSimulation:function(){return w.extend.apply(w,arguments),this},addValueType:function(){return x.extend.apply(x,arguments),this},addRoute:function(){return b.extend.apply(b,arguments),this},calc:P};return t=F}();return x.addRoute("values",function(){var t={},e={},n=function(t,e,n){n[t]&&n[t].call(n,e)};return["onStart","onFrame","onChange","onEnd"].forEach(function(t){e[t]=function(e){n(t,e,this)}}),t=e}()).addAction("play",d).addAction("run",function(){var t={},e=r,n=function(){var t={},e=p;return t=function(t,n,r,i){var s=e[t](n,r,i);return Math.abs(s)>=n.stopSpeed?s:0}}();return t={actionDefaults:function(){var t={};return t={inactiveFrames:0,maxInactiveFrames:3}}(),valueDefaults:function(){var t={};return t={simulate:"velocity",deceleration:0,acceleration:0,bounce:0,spring:80,timeConstant:395,stopSpeed:5,capture:!1,friction:0}}(),parse:v,calculatesVelocity:!0,process:function(t,r,i){return r.velocity=n(r.simulate,r,i,this.started),r.current+e.speedPerFrame(r.velocity,i)},hasEnded:function(t){return this.inactiveFrames=t?0:this.inactiveFrames+1,this.inactiveFrames>this.maxInactiveFrames},limit:function(t,r){var i=t>=r.max,s=t<=r.min,o=i||s;return o&&(t=e.restricted(t,r.min,r.max),r.bounce?r.velocity=n("bounce",r):r.capture&&n("capture",r,i?r.max:r.min)),t}}}()).addAction("fire",function(){var t={};return t={parse:v,process:function(t,e){return e.current},hasEnded:function(){return!0}}}()).addAction("track",function(){var t={},e=r,n=v,i=function(){var t,e={},n=c,r="touchmove",i="mousemove",s=function(t,e){var n=e?t.changedTouches[0]:!1;return{x:n?n.clientX:t.pageX,y:n?n.clientY:t.pageY}},o=function(t){return t.originalEvent||t},u=function(t){var e=o(t),n=e.touches?!0:!1,r=s(e,n);this.update(r),this.isTouch=n,this.bindEvents()},a=u.prototype=new n;return a.bindEvents=function(){this.moveEvent=this.isTouch?r:i,t=this,document.documentElement.addEventListener(this.moveEvent,this.onMove)},a.unbindEvents=function(){document.documentElement.removeEventListener(this.moveEvent,this.onMove)},a.onMove=function(e){var n=s(e,t.isTouch);e=o(e),e.preventDefault(),t.update(n)},a.stop=function(){this.unbindEvents()},e=u}();return t={valueDefaults:function(){var t={};return t={amp:1,escapeAmp:0}}(),parse:function(){var t=[].slice.call(arguments),e=t.pop(),r=n.apply(this,t);return r.input=e.current?e:new i(e),r.inputOrigin||(r.inputOrigin=r.input.get()),r},onFrameStart:function(){this.inputOffset=e.offset(this.inputOrigin,this.input.current)},process:function(t,e){return this.inputOffset.hasOwnProperty(t)?e.origin+this.inputOffset[t]:e.current},hasEnded:function(){return!1}}}()).addAction("link",function(){var t={},e=r,n="string",i=function(t,r,i,s,o){for(var u,a,c,h,f=s.length,l=1;f>l;l++)if(u=typeof s[l-1]===n?r[s[l-1]]:s[l-1],a=typeof s[l]===n?r[s[l]]:s[l],c=typeof o[l-1]===n?i[o[l-1]]:o[l-1],h=typeof o[l]===n?i[o[l]]:o[l],a>t||l===f-1){t=e.value(e.restricted(e.progress(t,u,a),0,1),c,h);break}return t};return t={valueDefaults:function(){var t={};return t={mapLink:void 0,mapTo:void 0,amp:1}}(),surpressMethod:!0,process:function(t,e){var n=this.values,r=e.current,s=e.link,o=n[s]?n[s]:{},u=this.inputOffset;return u&&u.hasOwnProperty(s)?r=e.origin+u[s]*e.amp:void 0!==o.current&&t!==s&&(r=o.current),e.mapLink&&e.mapTo&&(r=i(r,o,e,e.mapLink,e.mapTo)),r},limit:function(t,n){return e.restricted(t,n.min,n.max)}}}()).addAction("seek",function(){var t={},e=d;return t={surpressMethod:!0,actorMethods:{seek:function(t){return this.elapsed=this.duration*t,this.isActive||(this.action="seek",this.activate()),this}},process:e.process,hasEnded:function(){return this.rubix="play",!0}}}()).addValueType({alpha:function(){var t={};return t={defaultProps:{min:0,max:1}}}(),angle:function(){var t={};return t={defaultProps:{unit:"deg"}}}(),px:e,hsl:g,rgb:y,hex:b,color:w,positions:function(){var t={},n=i,r=e.defaultProps,s=a,u=o.positions;return t={defaultProps:r,split:function(t){var e=s(t),n=e.length,r={X:e[0],Y:n>1?e[1]:e[0]};return n>2&&(r.Z=e[2]),r},combine:function(t){return n(t,u," ")}}}(),dimensions:function(){var t={},n=o.dimensions,r=e.defaultProps,s=i,u=a;return t={defaultProps:r,split:function(t){for(var e=u(t),r=e.length,i=1!==r?2:1,s=0,o=0,a={};4>s;s++)a[n[s]]=e[o],o++,o=o===r?o-i:o;return a},combine:function(t){return s(t,n," ")}}}(),shadow:function(){var t={},r=w,s=n,u=e.defaultProps,c=o.shadow,h=a,f=i,l=c.slice(0,4);return t={defaultProps:s.merge(r.defaultProps,{X:u,Y:u,Radius:u,Spread:u}),split:function(t){for(var e,n=h(t),i=n.length,o=!1,u="",a=0,f={};i>a;a++)e=n[a],o||r.test(e)?(o=!0,u+=e):f[c[a]]=e;return s.merge(f,r.split(u))},combine:function(t){return f(t,l," ")+r.combine(t)}}}()}).addRoute("css",function(){var t={},e=function(){var t={},e=function(){var t={},e=o.positions,n=e.length,r="transformPerspective",i="scale",s="rotate",u={funcs:["translate",i,s,"skew",r],props:{}};return function(){var t=u.funcs,o=u.props,a=t.length,c=0,h=function(t){for(var r=0;n>r;r++)o[t+e[r]]=!0};for(o[s]=o[i]=o[r]=!0;a>c;c++)h(t[c])}(),t=u}(),n=e.props,r="transform",i="translateZ";return t=function(t,e){var s={},o="",u="",a=!1,c="";for(o in t)t.hasOwnProperty(o)&&(c=t[o],n[o]?(u+=o+"("+c+")",a=o===i?!0:a):e[o]!==c&&(e[o]=s[o]=c));return""!==u&&u!==e[r]&&(a||(u+=" "+i+"(0px)"),e[r]=s[r]=u),s}}(),n=function(){var t={},e=function(){var t=["Webkit","Moz","O","ms",""],e=t.length,n={},r=function(r){var i=document.body;n[r]=r;for(var s=0;e>s;s++){var o=t[s]+r.charAt(0).toUpperCase()+r.slice(1);i.style.hasOwnProperty(o)&&(n[r]=o)}return n[r]};return{get:function(t,e){return window.getComputedStyle(t,null)[n[e]||r(e)]},set:function(t,e,i){t.style[n[e]||r(e)]=i}}};return t=new e}(),r=function(){var t={},e="color",n="positions",r="dimensions",i="shadow",s="angle",o="alpha",u="px";return t={color:e,backgroundColor:e,borderColor:e,borderTopColor:e,borderRightColor:e,borderBottomColor:e,borderLeftColor:e,outlineColor:e,fill:e,stroke:e,margin:r,padding:r,width:u,height:u,backgroundPosition:n,perspectiveOrigin:n,transformOrigin:n,textShadow:i,boxShadow:i,rotate:s,rotateX:s,rotateY:s,rotateZ:s,skewX:s,skewY:s,translateX:u,translateY:u,translateZ:u,perspective:u,opacity:o}}(),i="_cssCache";return t={typeMap:r,onChange:function(t){this[i]=this[i]||{},this.css(e(t,this[i]))},get:function(t){return n.get(this.element,t)},set:function(t,e){n.set(this.element,t,e)}}}()).addRoute("attr",function(){var t={};return t={onChange:function(t){for(var e in t)t.hasOwnProperty(e)&&this.element.setAttribute(e,t[e])},get:function(t){return this.element.getAttribute(t)},set:function(t,e){this.element.setAttribute(t,e)}}}()).addRoute("path",function(){var t={},e=function(){var t={},e=function(){var t={},e="stroke",n=e+"-dash",r=n+"array";return t={opacity:e+"-opacity",width:e+"-width",offset:n+"offset",length:r,spacing:r,miterlimit:e+"-miterlimit"}}(),n=function(t,e){return parseFloat(t)/100*e+"px"};return t=function(t,r){var i=!1,s="",o={length:0,spacing:r+"px"},u={};for(var a in t)if(t.hasOwnProperty(a))switch(s=e[a]||a,a){case"length":case"spacing":i=!0,o[a]=n(t[a],r);break;case"offset":u[s]=n(-t[a],r);break;default:u[s]=t[a]}return i&&(u[e.length]=o.length+" "+o.spacing),u}}();return t={typeMap:{stroke:"color"},onStart:function(){this.element&&(this.pathLength=this.element.getTotalLength())},onChange:function(t){this.css(e(t,this.pathLength))}}}()),t=x}(),n=window.ui;return window.ui=window.popmotion=e,window.ui.noConflict=function(){window.ui=n},t}(); | ||
!function(){var t={},e=function(){var t={},e=function(){var t={};return t={defaultProps:{unit:"px"}}}(),n=function(){var t={},e=["scope","dom"],n=function(t){return-1!==e.indexOf(t)},r=function(t){return Object.prototype.toString.call(t).slice(8,-1)};return t={hasChanged:function(t,e){var n=!1,r="";for(r in e)t.hasOwnProperty(r)&&e.hasOwnProperty(r)?t[r]!==e[r]&&(n=!0):n=!0;return n},isNum:function(t){return"number"==typeof t},isObj:function(t){return"object"==typeof t},isFunc:function(t){return"Function"===r(t)},isString:function(t){return"string"==typeof t},isRelativeValue:function(t){return t&&t.indexOf&&t.indexOf("=")>0},isArray:function(t){return"Array"===r(t)},copy:function(t){return this.isArray(t)?this.copyArray(t):this.copyObject(t)},copyObject:function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=this.isObj(t[r])&&!n(r)?this.copy(t[r]):t[r]);return e},copyArray:function(t){for(var e=[],n=t.length,r=0;n>r;r++)e[r]=this.isObj(t[r])?this.copy(t[r]):t[r];return e},merge:function(t,e){return this.isArray(t)?this.copyArray(e):this.mergeObject(t,e)},mergeObject:function(t,e){var r=this.isObj(t),i=r?this.copy(t):this.copy(e),s="";if(r)for(s in e)e.hasOwnProperty(s)&&(i[s]=this.isObj(e[s])&&!n(s)?this.merge(t[s],e[s]):e[s]);return i},splitValUnit:function(t){var e=t.match(/(-?\d*\.?\d*)(.*)/);return{value:parseFloat(e[1]),unit:e[2]}},stepProgress:function(t,e){var n=1/(e-1),r=1-1/e,i=Math.min(t/r,1);return Math.floor(i/n)*n},currentTime:function(){return"undefined"!=typeof performance?performance.now():(new Date).getTime()}}}(),r=function(){var t={},e=n,r={angle:function(t,e){var n=e?t:{x:0,y:0},r=e||t,i={x:r.x-n.x,y:r.y-n.y};return this.angleFromCenter(i.x,i.y)},angleFromCenter:function(t,e){return this.radiansToDegrees(Math.atan2(e,t))},degreesToRadians:function(t){return t*Math.PI/180},dilate:function(t,e,n){return t+(e-t)*n},distance:function(t,e){return"number"==typeof t?this.distance1D(t,e):this.distance2D(t,e)},distance1D:function(t,e){var n="number"==typeof e,r=n?t:0,i=n?e:t;return s(i-r)},distance2D:function(t,e){var n="object"==typeof e,r=n?t:{x:0,y:0},i=n?e:t,o={x:s(i.x-r.x),y:s(i.y-r.y)};return this.hypotenuse(o.x,o.y)},hypotenuse:function(t,e){var n=t*t,r=e*e,i=n+r;return Math.sqrt(i)},offset:function(t,e){var n={};for(var r in e)e.hasOwnProperty(r)&&(t.hasOwnProperty(r)?n[r]=e[r]-t[r]:n[r]=0);return i(n.x)&&i(n.y)&&(n.angle=this.angle(t,e),n.distance=this.distance2D(t,e)),n},pointFromAngleAndDistance:function(t,e,n){var r={};return r.x=n*Math.cos(e)+t.x,r.y=n*Math.sin(e)+t.y,r},progress:function(t,e,n){var r="number"==typeof n,i=r?e:0,s=r?n:e,o=s-i,u=(t-i)/o;return u},radiansToDegrees:function(t){return 180*t/Math.PI},relativeValue:function(t,n){var r=t,i=n.split("="),s=i[0],o=e.splitValUnit(i[1]);switch(s){case"+":r+=o.value;break;case"-":r-=o.value;break;case"*":r*=o.value;break;case"/":r/=o.value}return o.unit&&(r+=o.unit),r},restricted:function(t,e,n){var r=void 0!==e?Math.max(t,e):t;return r=void 0!==n?Math.min(r,n):r},speedPerFrame:function(t,e){return i(t)?t/(1e3/e):0},speedPerSecond:function(t,e){return t*(1e3/e)},value:function(t,e,n){var r="number"==typeof n,i=r?e:0,s=r?n:e;return-t*i+t*s+i},valueEased:function(t,e,n,r){var i=r(t);return this.value(i,e,n)}},i=e.isNum,s=Math.abs;return t=r}(),i=function(){var t={};return t=function(t,e,n,r){for(var i="",s="",o=0,u=e.length;u>o;o++)s=e[o],t.hasOwnProperty(s)&&(i+=t[s]+n);return r&&(i=i.slice(0,-r)),i}}(),s=function(){var t={};return t=function(t,e){return e+"("+t+")"}}(),o=function(){var t={};return t={color:{min:0,max:255,round:!0},opacity:{min:0,max:1},percent:{min:0,max:100,unit:"%"}}}(),u=function(){var t={},e="X",n="Y",r="Alpha",i={colors:["Red","Green","Blue",r],positions:[e,n,"Z"],dimensions:["Top","Right","Bottom","Left"],shadow:[e,n,"Radius","Spread","Color"],hsl:["Hue","Saturation","Lightness",r]};return t=i}(),a=function(){var t={};return t=function(t){return"string"==typeof t?t.split(" "):[t]}}(),c=function(){var t={},e=r,i=n,s=function(){var t={},e=3,n=function(t,n){this.max=n||e,this.entries=[],this.add(t)};return n.prototype={add:function(t){var e=this.getSize();this.entries.push(t),e>=this.max&&this.entries.shift()},get:function(t){return t="number"==typeof t?t:this.getSize()-1,this.entries[t]},getPrevious:function(){return this.get(this.getSize()-2)},getSize:function(){return this.entries.length}},t=n}(),o=function(){var t=arguments.length-1;this.current={},this.offset={},this.velocity={},this.history=new s,this.update(arguments[0],arguments[1]),i.isFunc(arguments[t])&&(this.poll=arguments[t])};return o.prototype={maxInactiveFrames:2,inactiveFrames:0,get:function(t){var e=this.history.get(),n=void 0!==t?e[t]:e;return n},update:function(t,e){var n={};return i.isNum(e)?n[t]=e:n=t,this.history.add(i.merge(this.current,n)),this},onFrame:function(t){var n,r;if(t!==this.lastFrame)return n=this.poll?this.poll():this.history.get(),r=i.hasChanged(this.current,n),r?(this.velocity=e.offset(this.current,n),this.current=n,this.inactiveFrames=0):this.inactiveFrames>=this.maxInactiveFrames?this.velocity=e.offset(this.current,this.current):this.inactiveFrames++,this.lastFrame=t,this}},t=o}(),h=function(){var t={},e=function(){this._keys=[],this._numKeys=0};return e.prototype={_addKey:function(t){this._keys.push(t),this._numKeys++},extend:function(t,e){var n="object"==typeof t,r=n?t:{},i="";n||(r[t]=e);for(i in r)r.hasOwnProperty(i)&&(this._addKey(i),this[i]=r[i]);return this},each:function(t){for(var e="",n=0;n<this._numKeys;n++)e=this._keys[n],t(e,this[e])}},t=e}(),f=function(){var t={},e=r,n=function(){var t={},e=8,n=.001,r=1e-7,i=10,s=11,o=1/(s-1),u="undefined"!=typeof Float32Array,a=function(t,e){return 1-3*e+3*t},c=function(t,e){return 3*e-6*t},h=function(t){return 3*t},f=function(t,e,n){return 3*a(e,n)*t*t+2*c(e,n)*t+h(e)},l=function(t,e,n){return((a(e,n)*t+c(e,n))*t+h(e))*t},p=function(t,a,c,h){var p=u?new Float32Array(s):new Array(s),v=!1,d=function(e,n,s){var o,u,a=0;do u=n+(s-n)/2,o=l(u,t,c)-e,o>0?s=u:n=u;while(Math.abs(o)>r&&++a<i);return u},m=function(n,r){for(var i,s=0,o=0;e>s;++s){if(o=f(r,t,c),0===o)return r;i=l(r,t,c)-n,r-=i/o}return r},g=function(){for(var e=0;s>e;++e)p[e]=l(e*o,t,c)},y=function(e){for(var r=0,i=1,u=s-1,a=0,h=0,l=0;i!=u&&p[i]<=e;++i)r+=o;return--i,a=(e-p[i])/(p[i+1]-p[i]),h=r+a*o,l=f(h,t,c),l>=n?m(e,h):0===l?h:d(e,r,r+o)},b=function(){v=!0,(t!=a||c!=h)&&g()},w=function(e){var n;return v||b(),n=t===a&&c===h?e:0===e?0:1===e?1:l(y(e),a,h)};return w};return t=p}(),i="In",s="Out",o=i+s,u=function(t){return function(e){return Math.pow(e,t)}},a={circ:function(t){return 1-Math.sin(Math.acos(t))},back:function(t){var e=1.5;return t*t*((e+1)*t-e)}},c=function(t,e){return.5>=t?e(2*t)/2:(2-e(2*(1-t)))/2},f=function(t,e){return 1-e(1-t)},l=function(t,e){var n=t+i,r=t+s,u=t+o,a=n,h=r;v[a]=e,v[h]=function(t){return f(t,v[a])},v[u]=function(t){return c(t,v[a])}},p=h,v=new p;v.extend=function(t,e,r,i,s){return"function"==typeof e?l(t,e):this[t]=new n(e,r,i,s),this},v.withinRange=function(t,n,r,i,s){var o=e.restricted(t,0,1);return o!==t&&s&&(i="linear",o+=(t-o)*s),e.valueEased(o,n,r,this[i])},v.linear=function(t){return t},["ease","cubic","quart","quint"].forEach(function(t,e){a[t]=u(e+2)});for(var d in a)a.hasOwnProperty(d)&&l(d,a[d]);return t=v}(),l=function(){var t={},e=n,r=h,i=new r,s=".",o=function(t){for(var e=t.split(s),n=e.length,r=e[0],i=1;n>i;i++)e[i]=r+=s+e[i];return e};return i.getDefined=function(t){for(var n={},r={},i=o(t),s=i.length,u=0;s>u;u++)r=this[i[u]],r&&(n=e.merge(n,r));return n},t=i}(),p=function(){var t={},e=r,i=n,s=e.speedPerFrame,o=h,u=new o;return u.extend({velocity:function(t,e){return t.velocity=t.velocity-s(t.deceleration,e)+s(t.acceleration,e),u.friction(t,e)},glide:function(t,e,n){var r=-i.currentTime()-n,s=-t.to*Math.exp(r/t.timeConstant);return t.to+s-t.current},friction:function(t,n){var r=s(t.velocity,n)*(1-t.friction);return e.speedPerSecond(r,n)},spring:function(t,e){var n=t.to-t.current;return console.log("spring"),t.velocity+=n*s(t.spring,e),u.friction(t,e)},bounce:function(t){var e=0,n=t.to,r=t.current,i=t.bounce;return"glide"===t.simulate&&(e=n-r,t.to=r-e*i),t.velocity*=-i},capture:function(t,e){t.to=e,t.simulate="spring",t.capture=t.min=t.max=void 0}}),t=u}(),v=function(){var t={},e=l,r=n;return t=function(t,n){var i="string"==typeof t?e.getDefined(t):t;return"object"==typeof n&&(i=r.merge(i,n)),i}}(),d=function(){var t={},e=r,i=n,s=f,o={actionDefaults:function(){var t={};return t={duration:400,ease:"easeInOut",dilate:1,loop:!1,yoyo:!1,flip:!1}}(),valueDefaults:function(){var t={};return t={duration:400,delay:0,stagger:0,ease:"easeInOut",steps:0,stepDirection:"end"}}(),surpressMethod:!0,actorMethods:function(){var t={},e=function(){var t={},e=l,r=n,i=function(){var t=[].slice.call(arguments),n=t[0].split(" "),r=n.length,i=e.getDefined(n[0]),s=1;if(r>1)for(;r>s;s++)t.shift(),t.unshift(n[s]),this.queue.add.apply(this.queue,t);return i};return t=function(){for(var t=[].slice.call(arguments),e=t.length,n=r.isString(t[0])?i.apply(this,t):t[0],s=1;e>s;s++)switch(typeof t[s]){case"object":n=r.merge(n,t[s]);break;case"number":n.duration=t[s];break;case"string":n.ease=t[s]}return n.loopCount=n.yoyoCount=n.flipCount=0,n.playDirection=1,n}}(),r=n;return t={play:function(){var t="play";return this.isActive&&this.action===t?this.addToQueue.apply(this,arguments):(this.action=t,this.set(e.apply(this,arguments),"to"),this.start()),this},addToQueue:function(){return this.queue.add.apply(this.queue,arguments),this},next:function(){for(var t=[{key:"loop",callback:this.reset},{key:"yoyo",callback:this.reverse},{key:"flip",callback:this.flipValues}],e=t.length,n=!1,r=0;e>r;++r)if(this.checkNextStep(t[r].key,t[r].callback)){n=!0;break}return n||this.playNext()?this.isActive=!0:this.stop(),this},checkNextStep:function(t,e){var n="Count",i=!1,s=this[t],o=this[t+n],u=s===!0;return(u||r.isNum(s))&&(++o,this[t+n]=o,(u||s>=o)&&(e.call(this),i=!0)),i},playNext:function(){var t=!1,n=this.queue.next(this.playDirection);return r.isArray(n)&&(this.set(e.apply(this,n),"to").resetProgress(),t=!0),t}}}(),onFrameStart:function(t){this.elapsed+=t*this.dilate*this.playDirection,this.hasEnded=!0},process:function(t,n){var r,o=n.to,u=1===this.playDirection?1:0,a=n.current;return void 0!==o&&(r=e.restricted(e.progress(this.elapsed-n.delay,n.duration)-n.stagger,0,1),r!==u?this.hasEnded=!1:n.to=void 0,n.steps&&(r=i.stepProgress(r,n.steps)),a=s.withinRange(r,n.origin,o,n.ease)),a},hasEnded:function(){return this.hasEnded}};return t=o}(),m=function(){var t={},e=function(){var t={};return t=function(t){return"string"==typeof t?t.split(/,\s*/):[t]}}(),n=function(){var t={};return t=function(t){return t.substring(t.indexOf("(")+1,t.lastIndexOf(")"))}}();return t=function(t,r){for(var i={},s=r.length,o=e(n(t)),u=0;s>u;u++)i[r[u]]=void 0!==o[u]?o[u]:1;return i}}(),g=function(){var t={},e=i,n=m,r=s,a=o,c=u.hsl;return t={defaultProps:{Hue:{min:0,max:360},Saturation:a.percent,Lightness:a.percent,Alpha:a.opacity},test:function(t){return t&&t.indexOf("hsl")>-1},split:function(t){return n(t,c)},combine:function(t){return r(e(t,c,", ",2),"hsla")}}}(),y=function(){var t={},e=i,n=m,r=s,a=o,c=a.color,h=u.colors;return t={defaultProps:{Red:c,Green:c,Blue:c,Alpha:a.opacity},test:function(t){return t&&t.indexOf("rgb")>-1},split:function(t){return n(t,h)},combine:function(t){return r(e(t,h,", ",2),"rgba")}}}(),b=function(){var t={},e=y;return t={defaultProps:e.defaultProps,test:function(t){return t&&t.indexOf("#")>-1},split:function(t){var e,n,r;return t.length>4?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),e+=e,n+=n,r+=r),{Red:parseInt(e,16),Green:parseInt(n,16),Blue:parseInt(r,16),Alpha:1}},combine:function(t){return e.combine(t)}}}(),w=function(){var t={},e=n,r=y,i=g,s=b,o=[r,i,s],u=3,a=function(t,e){for(var n=0;u>n;n++)if(o[n].test(e))return o[n][t](e)};return t={defaultProps:e.merge(r.defaultProps,i.defaultProps),test:function(t){return r.test(t)||s.test(t)||i.test(t)},split:function(t){return a("split",t)},combine:function(t){return t.Red?r.combine(t):i.combine(t)}}}(),x=function(){var t={},e=function(){var t={};return t=function(t){return function(){for(var e,n,r=this.elements.length,i=0,s=!1,o=[];r>i;i++)e=this.elements[i],n=e[t].apply(e,arguments),n!=e&&(s=!0,o.push(n));return s?o:this}}}(),i=function(){var t,r,i={},s=n,o=e,u=function(){var t={};return t={delay:0,onStart:void 0,onChange:void 0,onFrame:void 0,onEnd:void 0}}(),a=function(){var t={};return t={to:void 0,min:void 0,max:void 0,origin:0,hasRange:!1,round:!1,link:void 0}}(),c=h,f=new c;return f.extend=function(e,n){var i="";if(n.surpressMethod||t.prototype[e]||(t.prototype[e]=function(){return this.action=e,this.set(n.parse.apply(this,arguments)),this.start()},r.prototype[e]=o(e)),n.actorMethods)for(i in n.actorMethods)n.actorMethods.hasOwnProperty(i)&&(t.prototype[i]=n.actorMethods[i],r.prototype[i]=o(i));n.actionDefaults=n.actionDefaults?s.merge(u,n.actionDefaults):u,n.valueDefaults=n.valueDefaults?s.merge(a,n.valueDefaults):a,c.prototype.extend.call(this,e,n)},f.setActor=function(e){t=e},f.setActorCollection=function(t){r=t},i=f}(),s=function(){var t={},e=h,n=new e;return n.defaultProps=function(t,e){var n=this[t],r=n.defaultProps?n.defaultProps[e]||n.defaultProps:{};return r},n.test=function(t){var e=!1;return this.each(function(n,r){r.test&&r.test(t)&&(e=n)}),e},t=n}(),o=function(){var t,n,r={},i=function(){var t={};return t=function(t,e,n,r){var i=typeof t;if("string"==i&&e)r.call(this,t,e);else{if("object"!=i)return n.call(this,t);for(var s in t)t.hasOwnProperty(s)&&r.call(this,s,t[s])}return this}}(),s=e,o=h,u=new o;return u.extend=function(e,r){r.get&&r.set&&(t.prototype[e]=function(t,e){return i.call(this,t,e,r.get,r.set)},n.prototype[e]=s(e)),o.prototype.extend.call(this,e,r)},u.shard=function(t,e){for(var n="",r="",i=!1,s=0;s<this._numKeys;s++)n=this._keys[s],i=e&&e.hasOwnProperty(n),r=i?e[n]:{},(i||"values"===n)&&t(this[n],n,r)},u.setActor=function(e){t=e},u.setActorCollection=function(t){n=t},r=u}(),u=function(){var t={},e=function(){var t={},e=function(){var t={},e=function(){var t={},e=n,r=33,i=function(){this.elapsed=16.7,this.current=e.currentTime(),this.update()};return i.prototype={update:function(){return this.prev=this.current,this.current=e.currentTime(),this.elapsed=Math.min(this.current-this.prev,r),this.current},getElapsed:function(){return this.elapsed},clock:function(){this.current=e.currentTime()}},t=i}(),r=function(){var t,e={},n=0,r="undefined"!=typeof window;return t=r?window.requestAnimationFrame:function(t){var e=(new Date).getTime(),r=Math.max(0,16-(e-n)),i=setTimeout(function(){t(e+r)},r);return n=e+r,i},e=t}(),i=function(){this.timer=new e};return i.prototype={isRunning:!1,frame:function(){var t=this;r(function(){var e=t.timer.update(),n=t.callback.call(t.scope,e,t.timer.getElapsed());n?t.frame():t.stop()})},start:function(){this.isRunning||(this.timer.clock(),this.isRunning=!0,this.frame())},stop:function(){this.isRunning=!1},setCallback:function(t,e){this.scope=t,this.callback=e}},t=new i}(),r=function(){this.activeIds=[],this.activeProcesses={},this.deactivateQueue=[],e.setCallback(this,this.fireActive)};return r.prototype={processCounter:0,activeCount:0,getProcess:function(t){return this.activeProcesses[t]},getActiveCount:function(){return this.activeCount},getActive:function(){return this.activeIds},getQueueLength:function(){return this.deactivateQueue.length},fireActive:function(t,e){var n,r=0,i=[],s=0;for(this.purge(),r=this.getActiveCount(),i=this.getActive();r>s;s++)n=this.getProcess(i[s]),n&&n.fire(t,e);return this.purge(),r=this.getActiveCount(),r?!0:!1},register:function(){return this.processCounter++},activate:function(t,n){var r=this.deactivateQueue.indexOf(n),i=r>-1,s=this.activeIds.indexOf(n)>-1;i&&this.deactivateQueue.splice(r,1),s||(this.activeIds.push(n),this.activeProcesses[n]=t,this.activeCount++,e.start())},deactivate:function(t){this.deactivateQueue.push(t)},purge:function(){for(var t=this.getQueueLength(),e=0,n=0;t--;)n=this.deactivateQueue[t],e=this.activeIds.indexOf(n),e>-1&&(this.activeIds.splice(e,1),this.activeCount--,delete this.activeProcesses[n]);this.deactivateQueue=[]}},t=new r}(),r=function(t,n){var r=void 0!==n;this.callback=r?n:t,this.scope=r?t:this,this.id=e.register(),this.isActive=!1};return r.prototype={fire:function(t,e){return this.isActive&&this.callback.call(this.scope,t,e),this.isInterval&&this.deactivate(),this},start:function(t){var e=this;return this.reset(),this.activate(),t&&(this.stopTimer=setTimeout(function(){e.stop()},t),this.isStopTimerActive=!0),this},stop:function(){return this.reset(),this.deactivate(),this},activate:function(){return this.isActive=!0,e.activate(this,this.id),this},deactivate:function(){return this.isActive=!1,e.deactivate(this.id),this},every:function(t){var e=this;return this.reset(),this.isInterval=!0,this.intervalTimer=setInterval(function(){e.activate()},t),this.isIntervalTimeActive=!0,this},reset:function(){return this.isInterval=!1,this.isStopTimerActive&&clearTimeout(this.stopTimer),this.isIntervalTimeActive&&clearInterval(this.intervalTimer),this}},t=r}(),a=function(){var t={},e=u,a=function(){var t={},e=function(){this.clear()};return e.prototype={add:function(){this.queue.push([].slice.call(arguments))},next:function(t){var e=this.queue,n=!1,r=this.index;return t=arguments.length?t:1,r>=0&&r<e.length?(n=e[r],this.index=r+t):this.clear(),n},clear:function(){this.queue=[],this.index=0}},t=e}(),c=n,h=function(){var t={},e=i,n=o,u=s,a=r,c="values",h=function(t,r){var i=this,s=this.values,o=e[this.action],h=o,f=this.output,l=this.order.length,p=this.parentOrder.length,v="",d={},m=0,g=0;for(this.input&&(f.input=this.input.onFrame(t)),o.onFrameStart&&o.onFrameStart.call(this,r),this.firstFrame&&n.shard(function(t){t.onStart&&t.onStart.call(i,s)},f),f[c]=f[c]||{};l>g;g++)v=this.order[g],d=s[v],h=d.link?e.link:o,m=h.process.call(this,v,d,r),h.limit&&(m=h.limit(m,d)),d.round&&(m=Math.round(m)),d.frameChange=m-d.current,h.calculatesVelocity||(d.velocity=a.speedPerSecond(d.frameChange,r)),d.speed=Math.abs(d.velocity),d.current!=m&&(this.hasChanged=!0),this.values[v].current=m,f[c][v]=d.unit?m+d.unit:m,d.parent?(f[d.parent]=f[d.parent]||{},f[d.parent][d.propName]=f[c][v]):f[d.route][d.name]=f[c][v];for(g=0;p>g;g++)v=this.parentOrder[g],d=this.values[v],d.current=u[d.type].combine(f[v]),f[d.route][d.name]=f[c][v]=d.current;n.shard(function(t,e,n){t.onFrame&&t.onFrame.call(i,n),(i.hasChanged&&t.onChange||i.firstFrame&&t.onChange)&&t.onChange.call(i,n)},f),o.hasEnded.call(this,this.hasChanged)?(this.isActive=!1,n.shard(function(t,e,n){t.onEnd&&t.onEnd.call(i,n)},f),!this.isActive&&"play"===this.action&&this.next&&this.next()):this.hasChanged=!1,this.firstFrame=!1,this.framestamp=t};return t=function(){this.isActive&&h.apply(this,arguments)}}(),f=function(){var t={},e=r,u=n,a=u.isNum,c=i,h=s,f=o,l=["current","to","init","min","max"],p=l.length;return t={all:function(t,e){var n="";for(n in e)e.hasOwnProperty(n)&&this[t](e[n]);return this},reset:function(t){this.retarget(t),t.current=t.origin},resetOrigin:function(t){t.origin=t.current},retarget:function(t){t.to=t.target},flip:function(t){var e=void 0!==t.target?t.target:t.current;t.target=t.to=t.origin,t.origin=e},initialState:function(t,e){return{current:t||0,speed:0,velocity:0,frameChange:0,route:e}},split:function(t,e,n,r){for(var i={},s={},o="",a="",c=0;p>c;c++)if(o=l[c],e.hasOwnProperty(o)){u.isFunc(e[o])&&(e[o]=e[o].call(n)),s=r.split(e[o]);for(a in s)s.hasOwnProperty(a)&&(i[a]=i[a]||u.copy(h.defaultProps(e.type,a)),i[a][o]=s[a])}return i},splitUnit:function(t,e){var n,r=t;return u.isString(t)&&(n=u.splitValUnit(t),isNaN(n.value)||(r=n.value,e.unit=n.unit)),r},resolve:function(t,n,r,i){var s=r.current||0,o=l.indexOf(t)>-1;return u.isFunc(n)&&(n=n.call(i,s)),u.isString(n)&&(n.indexOf("=")>0&&(n=e.relativeValue(s,n)),o&&this.splitUnit(n,r)),o&&(n=parseFloat(n)),n},preprocess:function(t,e,n,r,i){var s={},o={},a={},c={},f={},l={},p=!1,v="",d="",m="";i=i||"current";for(v in t)if(t.hasOwnProperty(v)&&(p=u.isObj(t[v]),o=p?t[v]:{},d=v+r,l=e.values[d],o.name=v,p||(o[i]=t[v]),o.type||(l&&l.type?o.type=l.type:n.typeMap&&n.typeMap[v]?o.type=n.typeMap[v]:u.isString(o[i])&&(o.type=h.test(o[i]))),s[d]=o,o.type))if(f=h[o.type],f.split){o.children={},a=this.split(v,o,e,f);for(m in a)a.hasOwnProperty(m)&&(c=u.merge(o,a[m]),c.parent=v+r,c.name=v,c.propName=m,delete c.type,delete c.children,s[v+m+r]=c)}else s[d]=u.merge(h.defaultProps(o.type,v),o);return s},process:function(t,e,n,r){var i,s=f[n],o="values"===n?"":"."+n,h=this.preprocess(t,e,s,o,r),l="",p="",v={},d={},m={},g=!1;for(l in h)if(h.hasOwnProperty(l)){v=h[l],d=e.values[l]||this.initialState(this.resolve("init",v.init,{},e),n),g=void 0!==v.children,d.action=v.link?"link":e.action,m=c[d.action].valueDefaults;for(p in m)m.hasOwnProperty(p)&&(d[p]=e.hasOwnProperty(p)?e[p]:m[p]);for(p in v)v.hasOwnProperty(p)&&(i=v[p],void 0===i||a(i)||g||(i=this.resolve(p,i,d,e)),d[p]=i,"to"===p&&(d.target=d.to));d.origin=d.current,d.hasRange=a(d.min)&&a(d.max)?!0:!1,e.values[l]=d,e.updateOrder(l,u.isString(d.link),g)}}}}(),l=i,p=o,v=function(t){this.element=t||!1,this.values={},this.output={},this.queue=new a,this.process=new e(this,h),this.clearOrder()};return v.prototype={set:function(t,e){var n=this;return this.clearOrder(),this.resetProps(),this.setProps(t),p.shard(function(t,r,i){n.output[r]=n.output[r]||{},n.setValues(i,r,e)},t),this},start:function(){return this.resetProgress(),this.activate(),this},stop:function(){return this.queue.clear(),this.pause(),this},pause:function(){return this.isActive=!1,this.process.stop(),this},resume:function(){return this.framestamp=this.started=c.currentTime(),this.isActive=!0,this.process.start(),this},toggle:function(){return this.isActive?this.pause():this.resume(),this},activate:function(){this.isActive=!0,this.started=c.currentTime()+this.delay,this.framestamp=this.started,this.firstFrame=!0,this.process.start()},reset:function(){return this.resetProgress(),f.all("reset",this.values),this},resetProgress:function(){return this.elapsed=1===this.playDirection?0:this.duration,this.started=c.currentTime(),this},resetOrigins:function(){return f.all("resetOrigin",this.values),this},reverse:function(){return this.playDirection*=-1,f.all("retarget",this.values),this},flipValues:function(){return this.elapsed=this.duration-this.elapsed,f.all("flip",this.values),this},setProps:function(t){var e="";for(e in t)t.hasOwnProperty(e)&&!p.hasOwnProperty(e)&&(this[e]=t[e])},resetProps:function(){return this.setProps(l[this.action].actionDefaults),this},setValues:function(t,e,n){return f.process(t,this,e,n),this},updateOrder:function(t,e,n){var r=n?this.parentOrder:this.order,i=r.indexOf(t);return(-1===i||e)&&(r.push(t),-1!==i&&r.splice(i,1)),this},clearOrder:function(){return this.order=[],this.parentOrder=[],this},get isActive(){return this._isActive},set isActive(t){t===!0&&(this.hasChanged=t),this._isActive=t}},l.setActor(v),p.setActor(v),t=v}(),v=function(){var t={},r=a,s=e,u=n,c=i,h=o,f="linear",l=function(t){this.clear(),t&&this.add(t),this._stagger=new r};return l.prototype={clear:function(){return this.elements=[],this},stagger:function(t,e){var n=this,r=[].slice.call(arguments),i=this.elements.length,s=u.isNum(t),o=s?t:t.interval,a=s?{}:t,c=-1,h=u.isString(e)?function(t){t[e].apply(t,r)}:e;return r.splice(0,2),a.values={i:{current:0,duration:o*i,ease:s?f:t.ease||f,steps:i,round:!0,to:i-1}},a.onChange=function(t){var e=t.i,r=c+1;if(e===c+1)h(n.elements[r],r);else for(;e>=r;r++)h(n.elements[r],r);c=e},this._stagger.play(a),this},add:function(t){for(var e,n=t.length,i=0;n>i;i++)e=t[i]instanceof r?t[i]:new r(t[i]),this.elements.push(e);return this}},function(){for(var t in r.prototype)r.prototype.hasOwnProperty(t)&&(l.prototype[t]=s(t))}(),c.setActorCollection(l),h.setActorCollection(l),t=l}(),d=function(){var t={},e=v;return t=function(t){var n="string"==typeof t?document.querySelectorAll(t):t,r=[];return n.get?r=n.get():n.length?r=[].slice.call(n):r.push(n),new e(r,{type:"dom"})}}(),m=i,g=f,y=l,b=o,w=p,x=s,P=r,O=a,A=v,k=c,C=u,F={Actor:O,ActorCollection:A,Input:k,Process:C,select:function(t){return d(t)},addAction:function(){return m.extend.apply(m,arguments),this},addEasing:function(){return g.extend.apply(g,arguments),this},addPreset:function(){return y.extend.apply(y,arguments),this},addSimulation:function(){return w.extend.apply(w,arguments),this},addValueType:function(){return x.extend.apply(x,arguments),this},addRoute:function(){return b.extend.apply(b,arguments),this},calc:P};return t=F}();return x.addRoute("values",function(){var t={},e={},n=function(t,e,n){n[t]&&n[t].call(n,e)};return["onStart","onFrame","onChange","onEnd"].forEach(function(t){e[t]=function(e){n(t,e,this)}}),t=e}()).addAction("play",d).addAction("run",function(){var t={},e=r,n=function(){var t={},e=p;return t=function(t,n,r,i){var s=e[t](n,r,i);return Math.abs(s)>=n.stopSpeed?s:0}}();return t={actionDefaults:function(){var t={};return t={inactiveFrames:0,maxInactiveFrames:3}}(),valueDefaults:function(){var t={};return t={simulate:"velocity",deceleration:0,acceleration:0,bounce:0,spring:80,timeConstant:395,stopSpeed:5,capture:!1,friction:0}}(),parse:v,calculatesVelocity:!0,process:function(t,r,i){return r.velocity=n(r.simulate,r,i,this.started),r.current+e.speedPerFrame(r.velocity,i)},hasEnded:function(t){return this.inactiveFrames=t?0:this.inactiveFrames+1,this.inactiveFrames>this.maxInactiveFrames},limit:function(t,r){var i=t>=r.max,s=t<=r.min,o=i||s;return o&&(t=e.restricted(t,r.min,r.max),r.bounce?r.velocity=n("bounce",r):r.capture&&n("capture",r,i?r.max:r.min)),t}}}()).addAction("fire",function(){var t={};return t={parse:v,process:function(t,e){return e.current},hasEnded:function(){return!0}}}()).addAction("track",function(){var t={},e=r,n=v,i=function(){var t,e={},n=c,r="touchmove",i="mousemove",s=function(t,e){var n=e?t.changedTouches[0]:!1;return{x:n?n.clientX:t.pageX,y:n?n.clientY:t.pageY}},o=function(t){return t.originalEvent||t},u=function(t){var e=o(t),n=e.touches?!0:!1,r=s(e,n);this.update(r),this.isTouch=n,this.bindEvents()},a=u.prototype=new n;return a.bindEvents=function(){this.moveEvent=this.isTouch?r:i,t=this,document.documentElement.addEventListener(this.moveEvent,this.onMove)},a.unbindEvents=function(){document.documentElement.removeEventListener(this.moveEvent,this.onMove)},a.onMove=function(e){var n=s(e,t.isTouch);e=o(e),e.preventDefault(),t.update(n)},a.stop=function(){this.unbindEvents()},e=u}();return t={valueDefaults:function(){var t={};return t={amp:1,escapeAmp:0}}(),parse:function(){var t=[].slice.call(arguments),e=t.pop(),r=n.apply(this,t);return r.input=e.current?e:new i(e),r.inputOrigin||(r.inputOrigin=r.input.get()),r},onFrameStart:function(){this.inputOffset=e.offset(this.inputOrigin,this.input.current)},process:function(t,e){return this.inputOffset.hasOwnProperty(t)?e.origin+this.inputOffset[t]:e.current},hasEnded:function(){return!1}}}()).addAction("link",function(){var t={},e=r,n="string",i=function(t,r,i,s,o){for(var u,a,c,h,f=s.length,l=1;f>l;l++)if(u=typeof s[l-1]===n?r[s[l-1]]:s[l-1],a=typeof s[l]===n?r[s[l]]:s[l],c=typeof o[l-1]===n?i[o[l-1]]:o[l-1],h=typeof o[l]===n?i[o[l]]:o[l],a>t||l===f-1){t=e.value(e.restricted(e.progress(t,u,a),0,1),c,h);break}return t};return t={valueDefaults:function(){var t={};return t={mapLink:void 0,mapTo:void 0,amp:1}}(),surpressMethod:!0,process:function(t,e){var n=this.values,r=e.current,s=e.link,o=n[s]?n[s]:{},u=this.inputOffset;return u&&u.hasOwnProperty(s)?r=e.origin+u[s]*e.amp:void 0!==o.current&&t!==s&&(r=o.current),e.mapLink&&e.mapTo&&(r=i(r,o,e,e.mapLink,e.mapTo)),r},limit:function(t,n){return e.restricted(t,n.min,n.max)}}}()).addAction("seek",function(){var t={},e=d;return t={surpressMethod:!0,actorMethods:{seek:function(t){return this.elapsed=this.duration*t,this.isActive||(this.action="seek",this.activate()),this}},process:e.process,hasEnded:function(){return this.rubix="play",!0}}}()).addValueType({alpha:function(){var t={};return t={defaultProps:{min:0,max:1}}}(),angle:function(){var t={};return t={defaultProps:{unit:"deg"}}}(),px:e,hsl:g,rgb:y,hex:b,color:w,positions:function(){var t={},n=i,r=e.defaultProps,s=a,o=u.positions;return t={defaultProps:r,split:function(t){var e=s(t),n=e.length,r={X:e[0],Y:n>1?e[1]:e[0]};return n>2&&(r.Z=e[2]),r},combine:function(t){return n(t,o," ")}}}(),dimensions:function(){var t={},n=u.dimensions,r=e.defaultProps,s=i,o=a;return t={defaultProps:r,split:function(t){for(var e=o(t),r=e.length,i=1!==r?2:1,s=0,u=0,a={};4>s;s++)a[n[s]]=e[u],u++,u=u===r?u-i:u;return a},combine:function(t){return s(t,n," ")}}}(),shadow:function(){var t={},r=w,s=n,o=e.defaultProps,c=u.shadow,h=a,f=i,l=c.slice(0,4);return t={defaultProps:s.merge(r.defaultProps,{X:o,Y:o,Radius:o,Spread:o}),split:function(t){for(var e,n=h(t),i=n.length,o=!1,u="",a=0,f={};i>a;a++)e=n[a],o||r.test(e)?(o=!0,u+=e):f[c[a]]=e;return s.merge(f,r.split(u))},combine:function(t){return f(t,l," ")+r.combine(t)}}}()}).addRoute("css",function(){var t={},e=function(){var t={},e=function(){var t={},e=u.positions,n=e.length,r="transformPerspective",i="scale",s="rotate",o={funcs:["translate",i,s,"skew",r],props:{}};return function(){var t=o.funcs,u=o.props,a=t.length,c=0,h=function(t){for(var r=0;n>r;r++)u[t+e[r]]=!0};for(u[s]=u[i]=u[r]=!0;a>c;c++)h(t[c])}(),t=o}(),n=e.props,r="transform",i="translateZ";return t=function(t,e){var s={},o="",u="",a=!1,c="";for(o in t)t.hasOwnProperty(o)&&(c=t[o],n[o]?(u+=o+"("+c+")",a=o===i?!0:a):e[o]!==c&&(e[o]=s[o]=c));return""!==u&&u!==e[r]&&(a||(u+=" "+i+"(0px)"),e[r]=s[r]=u),s}}(),n=function(){var t={},e=function(){var t=["Webkit","Moz","O","ms",""],e=t.length,n={},r=function(r){var i=document.body;n[r]=r;for(var s=0;e>s;s++){var o=t[s]+r.charAt(0).toUpperCase()+r.slice(1);i.style.hasOwnProperty(o)&&(n[r]=o)}return n[r]};return{get:function(t,e){return window.getComputedStyle(t,null)[n[e]||r(e)]},set:function(t,e,i){t.style[n[e]||r(e)]=i}}};return t=new e}(),r=function(){var t={},e="color",n="positions",r="dimensions",i="shadow",s="angle",o="alpha",u="px";return t={color:e,backgroundColor:e,borderColor:e,borderTopColor:e,borderRightColor:e,borderBottomColor:e,borderLeftColor:e,outlineColor:e,fill:e,stroke:e,margin:r,padding:r,width:u,height:u,backgroundPosition:n,perspectiveOrigin:n,transformOrigin:n,textShadow:i,boxShadow:i,rotate:s,rotateX:s,rotateY:s,rotateZ:s,skewX:s,skewY:s,translateX:u,translateY:u,translateZ:u,perspective:u,opacity:o}}(),i="_cssCache";return t={typeMap:r,onChange:function(t){this[i]=this[i]||{},this.css(e(t,this[i]))},get:function(t){return n.get(this.element,t)},set:function(t,e){n.set(this.element,t,e)}}}()).addRoute("attr",function(){var t={};return t={onChange:function(t){for(var e in t)t.hasOwnProperty(e)&&this.element.setAttribute(e,t[e])},get:function(t){return this.element.getAttribute(t)},set:function(t,e){this.element.setAttribute(t,e)}}}()).addRoute("path",function(){var t={},e=function(){var t={},e=function(){var t={},e="stroke",n=e+"-dash",r=n+"array";return t={opacity:e+"-opacity",width:e+"-width",offset:n+"offset",length:r,spacing:r,miterlimit:e+"-miterlimit"}}(),n=function(t,e){return parseFloat(t)/100*e+"px"};return t=function(t,r){var i=!1,s="",o={length:0,spacing:r+"px"},u={};for(var a in t)if(t.hasOwnProperty(a))switch(s=e[a]||a,a){case"length":case"spacing":i=!0,o[a]=n(t[a],r);break;case"offset":u[s]=n(-t[a],r);break;default:u[s]=t[a]}return i&&(u[e.length]=o.length+" "+o.spacing),u}}();return t={typeMap:{stroke:"color"},onStart:function(){this.element&&(this.pathLength=this.element.getTotalLength())},onChange:function(t){this.css(e(t,this.pathLength))}}}()),t=x}(),n=window.ui;return window.ui=window.popmotion=e,window.ui.noConflict=function(){window.ui=n},t}(); |
@@ -54,3 +54,3 @@ "use strict"; | ||
var distance = value.to - value.current; | ||
console.log('spring'); | ||
value.velocity += distance * speedPerFrame(value.spring, duration); | ||
@@ -57,0 +57,0 @@ |
@@ -10,3 +10,3 @@ "use strict"; | ||
numericalValues = ['current', 'to', 'start', 'min', 'max'], | ||
numericalValues = ['current', 'to', 'init', 'min', 'max'], | ||
numNumericalValues = numericalValues.length; | ||
@@ -297,3 +297,3 @@ | ||
preprocessedValue = preprocessedValues[key]; | ||
thisValue = actor.values[key] || this.initialState(this.resolve('start', preprocessedValue.start, {}, actor), namespace); | ||
thisValue = actor.values[key] || this.initialState(this.resolve('init', preprocessedValue.init, {}, actor), namespace); | ||
hasChildren = (preprocessedValue.children !== undefined); | ||
@@ -300,0 +300,0 @@ thisValue.action = preprocessedValue.link ? 'link' : actor.action; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
290972
7449