Socket
Socket
Sign inDemoInstall

react-spring

Package Overview
Dependencies
11
Maintainers
1
Versions
378
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 1.0.3

2

dist/react-spring.es.js

@@ -1,1 +0,1 @@

import React from"react";import PropTypes from"prop-types";function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var NODE_ENV=process.env.NODE_ENV,invariant=function(e,t,n,r,i,a,o,s){if("production"!==NODE_ENV&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,a,o,s],c=0;(l=new Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}},invariant_1=invariant,_createClass$1=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Animated=function(){function e(){_classCallCheck$1(this,e)}return _createClass$1(e,[{key:"__attach",value:function(){}},{key:"__detach",value:function(){}},{key:"__getValue",value:function(){}},{key:"__getAnimatedValue",value:function(){return this.__getValue()}},{key:"__addChild",value:function(e){}},{key:"__removeChild",value:function(e){}},{key:"__getChildren",value:function(){return[]}}]),e}(),Animated_1=Animated,commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},_createClass$2=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$1(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$1(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedWithChildren=function(e){function t(){_classCallCheck$2(this,t);var e=_possibleConstructorReturn$1(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e._children=[],e}return _inherits$1(t,Animated_1),_createClass$2(t,[{key:"__addChild",value:function(e){0===this._children.length&&this.__attach(),this._children.push(e)}},{key:"__removeChild",value:function(e){var t=this._children.indexOf(e);-1!==t?(this._children.splice(t,1),0===this._children.length&&this.__detach()):console.warn("Trying to remove a child that doesn't exist")}},{key:"__getChildren",value:function(){return this._children}}]),t}(),AnimatedWithChildren_1=AnimatedWithChildren,InteractionManager={current:{createInteractionHandle:function(){},clearInteractionHandle:function(){}},inject:function(e){InteractionManager.current=e}},InteractionManager_1=InteractionManager;function normalizeColor(e){var t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=matchers.hex6.exec(e))?parseInt(t[1]+"ff",16)>>>0:names.hasOwnProperty(e)?names[e]:(t=matchers.rgb.exec(e))?(parse255(t[1])<<24|parse255(t[2])<<16|parse255(t[3])<<8|255)>>>0:(t=matchers.rgba.exec(e))?(parse255(t[1])<<24|parse255(t[2])<<16|parse255(t[3])<<8|parse1(t[4]))>>>0:(t=matchers.hex3.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=matchers.hex8.exec(e))?parseInt(t[1],16)>>>0:(t=matchers.hex4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=matchers.hsl.exec(e))?(255|hslToRgb(parse360(t[1]),parsePercentage(t[2]),parsePercentage(t[3])))>>>0:(t=matchers.hsla.exec(e))?(hslToRgb(parse360(t[1]),parsePercentage(t[2]),parsePercentage(t[3]))|parse1(t[4]))>>>0:null}function hue2rgb(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hslToRgb(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=hue2rgb(i,r,e+1/3),o=hue2rgb(i,r,e),s=hue2rgb(i,r,e-1/3);return Math.round(255*a)<<24|Math.round(255*o)<<16|Math.round(255*s)<<8}var NUMBER="[-+]?\\d*\\.?\\d+",PERCENTAGE=NUMBER+"%";function toArray(e){return Array.prototype.slice.call(e,0)}function call(){return"\\(\\s*("+toArray(arguments).join(")\\s*,\\s*(")+")\\s*\\)"}var matchers={rgb:new RegExp("rgb"+call(NUMBER,NUMBER,NUMBER)),rgba:new RegExp("rgba"+call(NUMBER,NUMBER,NUMBER,NUMBER)),hsl:new RegExp("hsl"+call(NUMBER,PERCENTAGE,PERCENTAGE)),hsla:new RegExp("hsla"+call(NUMBER,PERCENTAGE,PERCENTAGE,NUMBER)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/};function parse255(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function parse360(e){return(parseFloat(e)%360+360)%360/360}function parse1(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function parsePercentage(e){var t=parseFloat(e,10);return t<0?0:t>100?1:t/100}var names={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};function rgba(e){return{r:Math.round((4278190080&e)>>>24),g:Math.round((16711680&e)>>>16),b:Math.round((65280&e)>>>8),a:((255&e)>>>0)/255}}normalizeColor.rgba=rgba;var normalizeCssColor=normalizeColor,_extends$1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_createClass$3=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var linear=function(e){return e},Interpolation=function(){function e(){_classCallCheck$3(this,e)}return _createClass$3(e,null,[{key:"create",value:function(e){if(e.outputRange&&"string"==typeof e.outputRange[0])return createInterpolationFromStringOutputRange(e);var t=e.outputRange;checkInfiniteRange("outputRange",t);var n=e.inputRange;checkInfiniteRange("inputRange",n),checkValidInputRange(n),invariant_1(n.length===t.length,"inputRange ("+n.length+") and outputRange ("+t.length+") must have the same length");var r=e.easing||linear,i="extend";void 0!==e.extrapolateLeft?i=e.extrapolateLeft:void 0!==e.extrapolate&&(i=e.extrapolate);var a="extend";return void 0!==e.extrapolateRight?a=e.extrapolateRight:void 0!==e.extrapolate&&(a=e.extrapolate),function(e){invariant_1("number"==typeof e,"Cannot interpolation an input which is not a number");var o=findRange(e,n);return interpolate(e,n[o],n[o+1],t[o],t[o+1],r,i,a)}}}]),e}();function interpolate(e,t,n,r,i,a,o,s){var l=e;if(l<t){if("identity"===o)return l;"clamp"===o&&(l=t)}if(l>n){if("identity"===s)return l;"clamp"===s&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t),l=a(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r,l)}function colorToRgba(e){var t=normalizeCssColor(e);return null===t?e:"rgba("+((4278190080&(t=t||0))>>>24)+", "+((16711680&t)>>>16)+", "+((65280&t)>>>8)+", "+(255&t)/255+")"}var stringShapeRegex=/[0-9\.-]+/g;function createInterpolationFromStringOutputRange(e){var t=e.outputRange;invariant_1(t.length>=2,"Bad output range"),checkPattern(t=t.map(colorToRgba));var n=t[0].match(stringShapeRegex).map(function(){return[]});t.forEach(function(e){e.match(stringShapeRegex).forEach(function(e,t){n[t].push(+e)})});var r=t[0].match(stringShapeRegex).map(function(t,r){return Interpolation.create(_extends$1({},e,{outputRange:n[r]}))}),i=/^rgb/.test(t[0]);return function(e){var n=0;return t[0].replace(stringShapeRegex,function(){var t=r[n++](e);return String(i&&n<4?Math.round(t):t)})}}function checkPattern(e){for(var t=e[0].replace(stringShapeRegex,""),n=1;n<e.length;++n)invariant_1(t===e[n].replace(stringShapeRegex,""),"invalid pattern "+e[0]+" and "+e[n])}function findRange(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}function checkValidInputRange(e){invariant_1(e.length>=2,"inputRange must have at least 2 elements");for(var t=1;t<e.length;++t)invariant_1(e[t]>=e[t-1],"inputRange must be monotonically increasing "+e)}function checkInfiniteRange(e,t){invariant_1(t.length>=2,e+" must have at least 2 elements"),invariant_1(2!==t.length||t[0]!==-1/0||t[1]!==1/0,e+"cannot be ]-infinity;+infinity[ "+t)}var Interpolation_1=Interpolation,_uniqueId=0,guid$1=function(){return String(_uniqueId++)},_createClass$4=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$2(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$2(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedInterpolation=function(e){function t(e,n){_classCallCheck$4(this,t);var r=_possibleConstructorReturn$2(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._parent=e,r._interpolation=n,r._listeners={},r}return _inherits$2(t,AnimatedWithChildren_1),_createClass$4(t,[{key:"__getValue",value:function(){var e=this._parent.__getValue();return invariant_1("number"==typeof e,"Cannot interpolate an input which is not a number."),this._interpolation(e)}},{key:"addListener",value:function(e){var t=this;this._parentListener||(this._parentListener=this._parent.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})}));var n=guid$1();return this._listeners[n]=e,n}},{key:"removeListener",value:function(e){delete this._listeners[e]}},{key:"interpolate",value:function(e){return new t(this,Interpolation_1.create(e))}},{key:"__attach",value:function(){this._parent.__addChild(this)}},{key:"__detach",value:function(){this._parent.__removeChild(this),this._parentListener=this._parent.removeListener(this._parentListener)}}]),t}(),AnimatedInterpolation_1=AnimatedInterpolation,_createClass$5=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Animation=function(){function e(){_classCallCheck$5(this,e)}return _createClass$5(e,[{key:"start",value:function(e,t,n,r){}},{key:"stop",value:function(){}},{key:"__debouncedOnEnd",value:function(e){var t=this.__onEnd;this.__onEnd=null,t&&t(e)}}]),e}(),Animation_1=Animation;function SetPolyfill(){this._cache=[]}SetPolyfill.prototype.add=function(e){-1===this._cache.indexOf(e)&&this._cache.push(e)},SetPolyfill.prototype.forEach=function(e){this._cache.forEach(e)};var SetPolyfill_1=SetPolyfill,_createClass$6=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$3(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$3(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Set=commonjsGlobal.Set||SetPolyfill_1;function _flush(e){var t=new Set;!function e(n){"function"==typeof n.update?t.add(n):n.__getChildren().forEach(e)}(e),t.forEach(function(e){return e.update()})}var AnimatedValue=function(e){function t(e){_classCallCheck$6(this,t);var n=_possibleConstructorReturn$3(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._value=e,n._offset=0,n._animation=null,n._listeners={},n}return _inherits$3(t,AnimatedWithChildren_1),_createClass$6(t,[{key:"__detach",value:function(){this.stopAnimation()}},{key:"__getValue",value:function(){return this._value+this._offset}},{key:"setValue",value:function(e){this._animation&&(this._animation.stop(),this._animation=null),this._updateValue(e)}},{key:"setOffset",value:function(e){this._offset=e}},{key:"flattenOffset",value:function(){this._value+=this._offset,this._offset=0}},{key:"addListener",value:function(e){var t=guid$1();return this._listeners[t]=e,t}},{key:"removeListener",value:function(e){delete this._listeners[e]}},{key:"removeAllListeners",value:function(){this._listeners={}}},{key:"stopAnimation",value:function(e){this.stopTracking(),this._animation&&this._animation.stop(),this._animation=null,e&&e(this.__getValue())}},{key:"interpolate",value:function(e){return new AnimatedInterpolation_1(this,Interpolation_1.create(e))}},{key:"animate",value:function(e,t){var n=this,r=null;e.__isInteraction&&(r=InteractionManager_1.current.createInteractionHandle());var i=this._animation;this._animation&&this._animation.stop(),this._animation=e,e.start(this._value,function(e){n._updateValue(e)},function(e){n._animation=null,null!==r&&InteractionManager_1.current.clearInteractionHandle(r),t&&t(e)},i)}},{key:"stopTracking",value:function(){this._tracking&&this._tracking.__detach(),this._tracking=null}},{key:"track",value:function(e){this.stopTracking(),this._tracking=e}},{key:"_updateValue",value:function(e){for(var t in this._value=e,_flush(this),this._listeners)this._listeners[t]({value:this.__getValue()})}}]),t}(),AnimatedValue_1=AnimatedValue,_createClass$7=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$4(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$4(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedValueXY=function(e){function t(e){_classCallCheck$7(this,t);var n=_possibleConstructorReturn$4(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),r=e||{x:0,y:0};return"number"==typeof r.x&&"number"==typeof r.y?(n.x=new AnimatedValue_1(r.x),n.y=new AnimatedValue_1(r.y)):(invariant_1(r.x instanceof AnimatedValue_1&&r.y instanceof AnimatedValue_1,"AnimatedValueXY must be initalized with an object of numbers or AnimatedValues."),n.x=r.x,n.y=r.y),n._listeners={},n}return _inherits$4(t,AnimatedWithChildren_1),_createClass$7(t,[{key:"setValue",value:function(e){this.x.setValue(e.x),this.y.setValue(e.y)}},{key:"setOffset",value:function(e){this.x.setOffset(e.x),this.y.setOffset(e.y)}},{key:"flattenOffset",value:function(){this.x.flattenOffset(),this.y.flattenOffset()}},{key:"__getValue",value:function(){return{x:this.x.__getValue(),y:this.y.__getValue()}}},{key:"stopAnimation",value:function(e){this.x.stopAnimation(),this.y.stopAnimation(),e&&e(this.__getValue())}},{key:"addListener",value:function(e){var t=this,n=guid$1(),r=function(n){n.value;e(t.__getValue())};return this._listeners[n]={x:this.x.addListener(r),y:this.y.addListener(r)},n}},{key:"removeListener",value:function(e){this.x.removeListener(this._listeners[e].x),this.y.removeListener(this._listeners[e].y),delete this._listeners[e]}},{key:"getLayout",value:function(){return{left:this.x,top:this.y}}},{key:"getTranslateTransform",value:function(){return[{translateX:this.x},{translateY:this.y}]}}]),t}(),AnimatedValueXY_1=AnimatedValueXY,_createClass$8=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$5(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$5(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedAddition=function(e){function t(e,n){_classCallCheck$8(this,t);var r=_possibleConstructorReturn$5(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._a="number"==typeof e?new AnimatedValue_1(e):e,r._b="number"==typeof n?new AnimatedValue_1(n):n,r._listeners={},r}return _inherits$5(t,AnimatedWithChildren_1),_createClass$8(t,[{key:"__getValue",value:function(){return this._a.__getValue()+this._b.__getValue()}},{key:"addListener",value:function(e){var t=this;!this._aListener&&this._a.addListener&&(this._aListener=this._a.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})})),!this._bListener&&this._b.addListener&&(this._bListener=this._b.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})}));var n=guid();return this._listeners[n]=e,n}},{key:"removeListener",value:function(e){delete this._listeners[e]}},{key:"interpolate",value:function(e){return new AnimatedInterpolation_1(this,Interpolation_1.create(e))}},{key:"__attach",value:function(){this._a.__addChild(this),this._b.__addChild(this)}},{key:"__detach",value:function(){this._a.__removeChild(this),this._b.__removeChild(this)}}]),t}(),AnimatedAddition_1=AnimatedAddition,_createClass$9=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$6(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$6(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedMultiplication=function(e){function t(e,n){_classCallCheck$9(this,t);var r=_possibleConstructorReturn$6(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._a="number"==typeof e?new AnimatedValue_1(e):e,r._b="number"==typeof n?new AnimatedValue_1(n):n,r._listeners={},r}return _inherits$6(t,AnimatedWithChildren_1),_createClass$9(t,[{key:"__getValue",value:function(){return this._a.__getValue()*this._b.__getValue()}},{key:"addListener",value:function(e){var t=this;!this._aListener&&this._a.addListener&&(this._aListener=this._a.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})})),!this._bListener&&this._b.addListener&&(this._bListener=this._b.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})}));var n=guid();return this._listeners[n]=e,n}},{key:"removeListener",value:function(e){delete this._listeners[e]}},{key:"interpolate",value:function(e){return new AnimatedInterpolation_1(this,Interpolation_1.create(e))}},{key:"__attach",value:function(){this._a.__addChild(this),this._b.__addChild(this)}},{key:"__detach",value:function(){this._a.__removeChild(this),this._b.__removeChild(this)}}]),t}(),AnimatedMultiplication_1=AnimatedMultiplication,_createClass$10=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$10(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$7(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$7(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedModulo=function(e){function t(e,n){_classCallCheck$10(this,t);var r=_possibleConstructorReturn$7(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._a=e,r._modulus=n,r._listeners={},r}return _inherits$7(t,AnimatedWithChildren_1),_createClass$10(t,[{key:"__getValue",value:function(){return(this._a.__getValue()%this._modulus+this._modulus)%this._modulus}},{key:"addListener",value:function(e){var t=this;this._aListener||(this._aListener=this._a.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})}));var n=guid();return this._listeners[n]=e,n}},{key:"removeListener",value:function(e){delete this._listeners[e]}},{key:"interpolate",value:function(e){return new AnimatedInterpolation_1(this,Interpolation_1.create(e))}},{key:"__attach",value:function(){this._a.__addChild(this)}},{key:"__detach",value:function(){this._a.__removeChild(this)}}]),t}(),AnimatedModulo_1=AnimatedModulo,_createClass$11=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$11(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$8(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$8(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedTemplate=function(e){function t(e,n){_classCallCheck$11(this,t);var r=_possibleConstructorReturn$8(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._strings=e,r._values=n,r}return _inherits$8(t,AnimatedWithChildren_1),_createClass$11(t,[{key:"__transformValue",value:function(e){return e instanceof Animated_1?e.__getValue():e}},{key:"__getValue",value:function(){for(var e=this._strings[0],t=0;t<this._values.length;++t)e+=this.__transformValue(this._values[t])+this._strings[1+t];return e}},{key:"__attach",value:function(){for(var e=0;e<this._values.length;++e)this._values[e]instanceof Animated_1&&this._values[e].__addChild(this)}},{key:"__detach",value:function(){for(var e=0;e<this._values.length;++e)this._values[e]instanceof Animated_1&&this._values[e].__removeChild(this)}}]),t}(),AnimatedTemplate_1=AnimatedTemplate,_extends$2=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_createClass$12=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$12(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$9(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$9(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedTracking=function(e){function t(e,n,r,i,a){_classCallCheck$12(this,t);var o=_possibleConstructorReturn$9(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o._value=e,o._parent=n,o._animationClass=r,o._animationConfig=i,o._callback=a,o.__attach(),o}return _inherits$9(t,Animated_1),_createClass$12(t,[{key:"__getValue",value:function(){return this._parent.__getValue()}},{key:"__attach",value:function(){this._parent.__addChild(this)}},{key:"__detach",value:function(){this._parent.__removeChild(this)}},{key:"update",value:function(){this._value.animate(new this._animationClass(_extends$2({},this._animationConfig,{toValue:this._animationConfig.toValue.__getValue()})),this._callback)}}]),t}(),AnimatedTracking_1=AnimatedTracking;function isAnimated(e){return e instanceof Animated_1}var isAnimated_1=isAnimated,NEWTON_ITERATIONS=4,NEWTON_MIN_SLOPE=.001,SUBDIVISION_PRECISION=1e-7,SUBDIVISION_MAX_ITERATIONS=10,kSplineTableSize=11,kSampleStepSize=1/(kSplineTableSize-1),float32ArraySupported="function"==typeof Float32Array;function A(e,t){return 1-3*t+3*e}function B(e,t){return 3*t-6*e}function C(e){return 3*e}function calcBezier(e,t,n){return((A(t,n)*e+B(t,n))*e+C(t))*e}function getSlope(e,t,n){return 3*A(t,n)*e*e+2*B(t,n)*e+C(t)}function binarySubdivide(e,t,n,r,i){var a,o,s=0;do{(a=calcBezier(o=t+(n-t)/2,r,i)-e)>0?n=o:t=o}while(Math.abs(a)>SUBDIVISION_PRECISION&&++s<SUBDIVISION_MAX_ITERATIONS);return o}function newtonRaphsonIterate(e,t,n,r){for(var i=0;i<NEWTON_ITERATIONS;++i){var a=getSlope(t,n,r);if(0===a)return t;t-=(calcBezier(t,n,r)-e)/a}return t}var bezier=function(e,t,n,r){if(!(0<=e&&e<=1&&0<=n&&n<=1))throw new Error("bezier x values must be in [0, 1] range");var i=float32ArraySupported?new Float32Array(kSplineTableSize):new Array(kSplineTableSize);if(e!==t||n!==r)for(var a=0;a<kSplineTableSize;++a)i[a]=calcBezier(a*kSampleStepSize,e,n);return function(a){return e===t&&n===r?a:0===a?0:1===a?1:calcBezier(function(t){for(var r=0,a=1,o=kSplineTableSize-1;a!==o&&i[a]<=t;++a)r+=kSampleStepSize;var s=r+(t-i[--a])/(i[a+1]-i[a])*kSampleStepSize,l=getSlope(s,e,n);return l>=NEWTON_MIN_SLOPE?newtonRaphsonIterate(t,s,e,n):0===l?s:binarySubdivide(t,r,r+kSampleStepSize,e,n)}(a),t,r)}},_createClass$13=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$13(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Easing=function(){function e(){_classCallCheck$13(this,e)}return _createClass$13(e,null,[{key:"step0",value:function(e){return e>0?1:0}},{key:"step1",value:function(e){return e>=1?1:0}},{key:"linear",value:function(e){return e}},{key:"ease",value:function(e){return _ease(e)}},{key:"quad",value:function(e){return e*e}},{key:"cubic",value:function(e){return e*e*e}},{key:"poly",value:function(e){return function(t){return Math.pow(t,e)}}},{key:"sin",value:function(e){return 1-Math.cos(e*Math.PI/2)}},{key:"circle",value:function(e){return 1-Math.sqrt(1-e*e)}},{key:"exp",value:function(e){return Math.pow(2,10*(e-1))}},{key:"elastic",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)*Math.PI;return function(t){return 1-Math.pow(Math.cos(t*Math.PI/2),3)*Math.cos(t*e)}}},{key:"back",value:function(e){return void 0===e&&(e=1.70158),function(t){return t*t*((e+1)*t-e)}}},{key:"bounce",value:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}},{key:"bezier",value:function(e,t,n,r){return bezier(e,t,n,r)}},{key:"in",value:function(e){return e}},{key:"out",value:function(e){return function(t){return 1-e(1-t)}}},{key:"inOut",value:function(e){return function(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2}}}]),e}(),_ease=Easing.bezier(.42,0,1,1),Easing_1=Easing,RequestAnimationFrame={current:function(e){return commonjsGlobal.requestAnimationFrame(e)},inject:function(e){RequestAnimationFrame.current=e}},RequestAnimationFrame_1=RequestAnimationFrame,CancelAnimationFrame={current:function(e){return commonjsGlobal.cancelAnimationFrame(e)},inject:function(e){CancelAnimationFrame.current=e}},CancelAnimationFrame_1=CancelAnimationFrame,_createClass$14=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$14(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$10(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$10(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var easeInOut=Easing_1.inOut(Easing_1.ease),TimingAnimation=function(e){function t(e){_classCallCheck$14(this,t);var n=_possibleConstructorReturn$10(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._toValue=e.toValue,n._easing=void 0!==e.easing?e.easing:easeInOut,n._duration=void 0!==e.duration?e.duration:500,n._delay=void 0!==e.delay?e.delay:0,n.__isInteraction=void 0===e.isInteraction||e.isInteraction,n}return _inherits$10(t,Animation_1),_createClass$14(t,[{key:"start",value:function(e,t,n){var r=this;this.__active=!0,this._fromValue=e,this._onUpdate=t,this.__onEnd=n;var i=function(){0===r._duration?(r._onUpdate(r._toValue),r.__debouncedOnEnd({finished:!0})):(r._startTime=Date.now(),r._animationFrame=RequestAnimationFrame_1.current(r.onUpdate.bind(r)))};this._delay?this._timeout=setTimeout(i,this._delay):i()}},{key:"onUpdate",value:function(){var e=Date.now();if(e>=this._startTime+this._duration)return 0===this._duration?this._onUpdate(this._toValue):this._onUpdate(this._fromValue+this._easing(1)*(this._toValue-this._fromValue)),void this.__debouncedOnEnd({finished:!0});this._onUpdate(this._fromValue+this._easing((e-this._startTime)/this._duration)*(this._toValue-this._fromValue)),this.__active&&(this._animationFrame=RequestAnimationFrame_1.current(this.onUpdate.bind(this)))}},{key:"stop",value:function(){this.__active=!1,clearTimeout(this._timeout),CancelAnimationFrame_1.current(this._animationFrame),this.__debouncedOnEnd({finished:!1})}}]),t}(),TimingAnimation_1=TimingAnimation,_createClass$15=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$15(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$11(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$11(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var DecayAnimation=function(e){function t(e){_classCallCheck$15(this,t);var n=_possibleConstructorReturn$11(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._deceleration=void 0!==e.deceleration?e.deceleration:.998,n._velocity=e.velocity,n.__isInteraction=void 0===e.isInteraction||e.isInteraction,n}return _inherits$11(t,Animation_1),_createClass$15(t,[{key:"start",value:function(e,t,n){this.__active=!0,this._lastValue=e,this._fromValue=e,this._onUpdate=t,this.__onEnd=n,this._startTime=Date.now(),this._animationFrame=RequestAnimationFrame_1.current(this.onUpdate.bind(this))}},{key:"onUpdate",value:function(){var e=Date.now(),t=this._fromValue+this._velocity/(1-this._deceleration)*(1-Math.exp(-(1-this._deceleration)*(e-this._startTime)));this._onUpdate(t),Math.abs(this._lastValue-t)<.1?this.__debouncedOnEnd({finished:!0}):(this._lastValue=t,this.__active&&(this._animationFrame=RequestAnimationFrame_1.current(this.onUpdate.bind(this))))}},{key:"stop",value:function(){this.__active=!1,CancelAnimationFrame_1.current(this._animationFrame),this.__debouncedOnEnd({finished:!1})}}]),t}(),DecayAnimation_1=DecayAnimation;function tensionFromOrigamiValue(e){return 3.62*(e-30)+194}function frictionFromOrigamiValue(e){return 3*(e-8)+25}function fromOrigamiTensionAndFriction(e,t){return{tension:tensionFromOrigamiValue(e),friction:frictionFromOrigamiValue(t)}}function fromBouncinessAndSpeed(e,t){function n(e,t,n){return(e-t)/(n-t)}function r(e,t,n){return t+e*(n-t)}var i=n(e/1.7,0,20);i=r(i,0,.8);var a,o,s,l,u=r(n(t/1.7,0,20),.5,200),c=(a=i,o=(s=u)<=18?(l=s,7e-4*Math.pow(l,3)-.031*Math.pow(l,2)+.64*l+1.28):s>18&&s<=44?function(e){return 44e-6*Math.pow(e,3)-.006*Math.pow(e,2)+.36*e+2}(s):function(e){return 4.5e-7*Math.pow(e,3)-332e-6*Math.pow(e,2)+.1078*e+5.84}(s),function(e,t,n){return e*n+(1-e)*t}(2*a-a*a,o,.01));return{tension:tensionFromOrigamiValue(u),friction:frictionFromOrigamiValue(c)}}var SpringConfig={fromOrigamiTensionAndFriction:fromOrigamiTensionAndFriction,fromBouncinessAndSpeed:fromBouncinessAndSpeed},_createClass$16=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$16(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$12(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$12(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function withDefault(e,t){return void 0===e||null===e?t:e}var SpringAnimation=function(e){function t(e){_classCallCheck$16(this,t);var n,r=_possibleConstructorReturn$12(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._overshootClamping=withDefault(e.overshootClamping,!1),r._restDisplacementThreshold=withDefault(e.restDisplacementThreshold,.001),r._restSpeedThreshold=withDefault(e.restSpeedThreshold,.001),r._initialVelocity=e.velocity,r._lastVelocity=withDefault(e.velocity,0),r._toValue=e.toValue,r.__isInteraction=void 0===e.isInteraction||e.isInteraction,void 0!==e.bounciness||void 0!==e.speed?(invariant_1(void 0===e.tension&&void 0===e.friction,"You can only define bounciness/speed or tension/friction but not both"),n=SpringConfig.fromBouncinessAndSpeed(withDefault(e.bounciness,8),withDefault(e.speed,12))):n=SpringConfig.fromOrigamiTensionAndFriction(withDefault(e.tension,40),withDefault(e.friction,7)),r._tension=n.tension,r._friction=n.friction,r}return _inherits$12(t,Animation_1),_createClass$16(t,[{key:"start",value:function(e,n,r,i){if(this.__active=!0,this._startPosition=e,this._lastPosition=this._startPosition,this._onUpdate=n,this.__onEnd=r,this._lastTime=Date.now(),i instanceof t){var a=i.getInternalState();this._lastPosition=a.lastPosition,this._lastVelocity=a.lastVelocity,this._lastTime=a.lastTime}void 0!==this._initialVelocity&&null!==this._initialVelocity&&(this._lastVelocity=this._initialVelocity),this.onUpdate()}},{key:"getInternalState",value:function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}}},{key:"onUpdate",value:function(){var e=this._lastPosition,t=this._lastVelocity,n=this._lastPosition,r=this._lastVelocity,i=Date.now();i>this._lastTime+64&&(i=this._lastTime+64);for(var a=Math.floor((i-this._lastTime)/1),o=0;o<a;++o){var s=t,l=this._tension*(this._toValue-n)-this._friction*r,u=(n=e+.001*s/2,r=t+.001*l/2),c=this._tension*(this._toValue-n)-this._friction*r;n=e+.001*u/2;var f=r=t+.001*c/2,_=this._tension*(this._toValue-n)-this._friction*r;n=e+.001*f/2;var h=r=t+.001*_/2,p=this._tension*(this._toValue-n)-this._friction*r;n=e+.001*f/2,r=t+.001*_/2,e+=.001*((s+2*(u+f)+h)/6),t+=.001*((l+2*(c+_)+p)/6)}if(this._lastTime=i,this._lastPosition=e,this._lastVelocity=t,this._onUpdate(e),this.__active){var d=!1;this._overshootClamping&&0!==this._tension&&(d=this._startPosition<this._toValue?e>this._toValue:e<this._toValue);var m=Math.abs(t)<=this._restSpeedThreshold,y=!0;if(0!==this._tension&&(y=Math.abs(this._toValue-e)<=this._restDisplacementThreshold),d||m&&y)return 0!==this._tension&&this._onUpdate(this._toValue),void this.__debouncedOnEnd({finished:!0});this._animationFrame=RequestAnimationFrame_1.current(this.onUpdate.bind(this))}}},{key:"stop",value:function(){this.__active=!1,CancelAnimationFrame_1.current(this._animationFrame),this.__debouncedOnEnd({finished:!1})}}]),t}(),SpringAnimation_1=SpringAnimation,_createClass$17=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$17(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$13(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$13(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedTransform=function(e){function t(e){_classCallCheck$17(this,t);var n=_possibleConstructorReturn$13(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._transforms=e,n}return _inherits$13(t,AnimatedWithChildren_1),_createClass$17(t,[{key:"__getValue",value:function(){return this._transforms.map(function(e){var t={};for(var n in e){var r=e[n];t[n]=r instanceof Animated_1?r.__getValue():r}return t})}},{key:"__getAnimatedValue",value:function(){return this._transforms.map(function(e){var t={};for(var n in e){var r=e[n];t[n]=r instanceof Animated_1?r.__getAnimatedValue():r}return t})}},{key:"__attach",value:function(){var e=this;this._transforms.forEach(function(t){for(var n in t){var r=t[n];r instanceof Animated_1&&r.__addChild(e)}})}},{key:"__detach",value:function(){var e=this;this._transforms.forEach(function(t){for(var n in t){var r=t[n];r instanceof Animated_1&&r.__removeChild(e)}})}}]),t}(),AnimatedTransform_1=AnimatedTransform,FlattenStyle={current:function(e){return e},inject:function(e){FlattenStyle.current=e}},FlattenStyle_1=FlattenStyle,_extends$3=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_createClass$18=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$18(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$14(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$14(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedStyle=function(e){function t(e){_classCallCheck$18(this,t);var n=_possibleConstructorReturn$14(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return!(e=FlattenStyle_1.current(e)||{}).transform||e.transform instanceof Animated_1||(e=_extends$3({},e,{transform:new AnimatedTransform_1(e.transform)})),n._style=e,n}return _inherits$14(t,AnimatedWithChildren_1),_createClass$18(t,[{key:"__getValue",value:function(){var e={};for(var t in this._style){var n=this._style[t];e[t]=n instanceof Animated_1?n.__getValue():n}return e}},{key:"__getAnimatedValue",value:function(){var e={};for(var t in this._style){var n=this._style[t];n instanceof Animated_1&&(e[t]=n.__getAnimatedValue())}return e}},{key:"__attach",value:function(){for(var e in this._style){var t=this._style[e];t instanceof Animated_1&&t.__addChild(this)}}},{key:"__detach",value:function(){for(var e in this._style){var t=this._style[e];t instanceof Animated_1&&t.__removeChild(this)}}}]),t}(),AnimatedStyle_1=AnimatedStyle,_extends$4=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_createClass$19=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$19(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$15(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$15(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedProps=function(e){function t(e,n){_classCallCheck$19(this,t);var r=_possibleConstructorReturn$15(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.style&&(e=_extends$4({},e,{style:new AnimatedStyle_1(e.style)})),r._props=e,r._callback=n,r.__attach(),r}return _inherits$15(t,Animated_1),_createClass$19(t,[{key:"__getValue",value:function(){var e={};for(var t in this._props){var n=this._props[t];e[t]=n instanceof Animated_1?n.__getValue():n}return e}},{key:"__getAnimatedValue",value:function(){var e={};for(var t in this._props){var n=this._props[t];n instanceof Animated_1&&(e[t]=n.__getAnimatedValue())}return e}},{key:"__attach",value:function(){for(var e in this._props){var t=this._props[e];t instanceof Animated_1&&t.__addChild(this)}}},{key:"__detach",value:function(){for(var e in this._props){var t=this._props[e];t instanceof Animated_1&&t.__removeChild(this)}}},{key:"update",value:function(){this._callback()}}]),t}(),AnimatedProps_1=AnimatedProps,ApplyAnimatedValues={current:function(e,t){if(!e.setNativeProps)return!1;e.setNativeProps(t)},transformStyles:function(e){return e},inject:function(e,t){ApplyAnimatedValues.current=e,ApplyAnimatedValues.transformStyles=t}},ApplyAnimatedValues_1=ApplyAnimatedValues,_extends$5=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_jsxFileName="src/createAnimatedComponent.js",_createClass$20=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _objectWithoutProperties$1(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function _classCallCheck$20(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$16(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$16(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function createAnimatedComponent(e){var t=function(t){function n(){return _classCallCheck$20(this,n),_possibleConstructorReturn$16(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return _inherits$16(n,React.Component),_createClass$20(n,[{key:"componentWillUnmount",value:function(){this._propsAnimated&&this._propsAnimated.__detach()}},{key:"setNativeProps",value:function(e){!1===ApplyAnimatedValues_1.current(this.refs.node,e,this)&&this.forceUpdate()}},{key:"componentWillMount",value:function(){this.attachProps(this.props)}},{key:"attachProps",value:function(e){var t=this,n=this._propsAnimated;this._propsAnimated=new AnimatedProps_1(e,function(){!1===ApplyAnimatedValues_1.current(t.refs.node,t._propsAnimated.__getAnimatedValue(),t)&&t.forceUpdate()}),n&&n.__detach()}},{key:"componentWillReceiveProps",value:function(e){this.attachProps(e)}},{key:"render",value:function(){var t=this._propsAnimated.__getValue(),n=t.style,r=_objectWithoutProperties$1(t,["style"]);return React.createElement(e,_extends$5({},r,{style:ApplyAnimatedValues_1.transformStyles(n),ref:"node",__source:{fileName:_jsxFileName,lineNumber:78}}))}}]),n}();return"production"!==process.env.NODE_ENV&&(t.propTypes={style:function(t,n,r){e.propTypes}}),t}var createAnimatedComponent_1=createAnimatedComponent,_extends$6=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},maybeVectorAnim=function(e,t,n){if(e instanceof AnimatedValueXY_1){var r=_extends$6({},t),i=_extends$6({},t);for(var a in t){var o=t[a],s=o.x,l=o.y;void 0!==s&&void 0!==l&&(r[a]=s,i[a]=l)}var u=n(e.x,r),c=n(e.y,i);return parallel([u,c],{stopTogether:!1})}return null},spring=function e(t,n){return maybeVectorAnim(t,n,e)||{start:function(e){var r=t,i=n;r.stopTracking(),n.toValue instanceof Animated_1?r.track(new AnimatedTracking_1(r,n.toValue,SpringAnimation_1,i,e)):r.animate(new SpringAnimation_1(i),e)},stop:function(){t.stopAnimation()}}},timing=function e(t,n){return maybeVectorAnim(t,n,e)||{start:function(e){var r=t,i=n;r.stopTracking(),n.toValue instanceof Animated_1?r.track(new AnimatedTracking_1(r,n.toValue,TimingAnimation_1,i,e)):r.animate(new TimingAnimation_1(i),e)},stop:function(){t.stopAnimation()}}},decay=function e(t,n){return maybeVectorAnim(t,n,e)||{start:function(e){var r=t,i=n;r.stopTracking(),r.animate(new DecayAnimation_1(i),e)},stop:function(){t.stopAnimation()}}},sequence=function(e){var t=0;return{start:function(n){0===e.length?n&&n({finished:!0}):e[t].start(function r(i){i.finished&&++t!==e.length?e[t].start(r):n&&n(i)})},stop:function(){t<e.length&&e[t].stop()}}},parallel=function(e,t){var n=0,r={},i=!(t&&!1===t.stopTogether),a={start:function(t){n!==e.length?e.forEach(function(o,s){var l=function(o){if(r[s]=!0,++n===e.length)return n=0,void(t&&t(o));!o.finished&&i&&a.stop()};o?o.start(l):l({finished:!0})}):t&&t({finished:!0})},stop:function(){e.forEach(function(e,t){!r[t]&&e.stop(),r[t]=!0})}};return a},delay=function(e){return timing(new AnimatedValue_1(0),{toValue:0,delay:e,duration:0})},stagger=function(e,t){return parallel(t.map(function(t,n){return sequence([delay(e*n),t])}))},event=function(e,t){return function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];e.forEach(function(e,t){!function e(t,n,r){if("number"==typeof n)return invariant_1(t instanceof AnimatedValue_1,"Bad mapping of type "+typeof t+" for key "+r+", event value must map to AnimatedValue"),void t.setValue(n);for(var r in invariant_1("object"==typeof t,"Bad mapping of type "+typeof t+" for key "+r),invariant_1("object"==typeof n,"Bad event of type "+typeof n+" for key "+r),t)e(t[r],n[r],r)}(e,r[t],"arg"+t)}),t&&t.listener&&t.listener.apply(null,r)}},lib={Value:AnimatedValue_1,ValueXY:AnimatedValueXY_1,decay:decay,timing:timing,spring:spring,add:function(e,t){return new AnimatedAddition_1(e,t)},multiply:function(e,t){return new AnimatedMultiplication_1(e,t)},modulo:function(e,t){return new AnimatedModulo_1(e,t)},template:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new AnimatedTemplate_1(e,n)},delay:delay,sequence:sequence,parallel:parallel,stagger:stagger,event:event,isAnimated:isAnimated_1,createAnimatedComponent:createAnimatedComponent_1,inject:{ApplyAnimatedValues:ApplyAnimatedValues_1.inject,InteractionManager:InteractionManager_1.inject,FlattenStyle:FlattenStyle_1.inject,RequestAnimationFrame:RequestAnimationFrame_1.inject,CancelAnimationFrame:CancelAnimationFrame_1.inject},__PropsOnlyForTests:AnimatedProps_1},_extends$7=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},transformWithLengthUnits={translateX:!0,translateY:!0,translateZ:!0,perspective:!0};function mapTransform(e){var t=Object.keys(e)[0],n=transformWithLengthUnits[t]&&"number"==typeof e[t]?"px":"";return t+"("+e[t]+n+")"}var isUnitlessNumber={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function prefixKey(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var prefixes=["Webkit","ms","Moz","O"];function mapStyle(e){return e&&e.transform&&"string"!=typeof e.transform&&(e.transform=e.transform.map(mapTransform).join(" ")),e}function dangerousStyleValue(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||isUnitlessNumber.hasOwnProperty(e)&&isUnitlessNumber[e]?(""+t).trim():t+"px"}function setValueForStyles(e,t){var n=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=0===r.indexOf("--"),a=dangerousStyleValue(r,t[r],i);"float"===r&&(r="cssFloat"),i?n.setProperty(r,a):n[r]=a}}function ApplyAnimatedValues$2(e,t){if(e.setNativeProps)e.setNativeProps(t);else{if(!e.nodeType||void 0===e.setAttribute)return!1;setValueForStyles(e,mapStyle(t.style))}}Object.keys(isUnitlessNumber).forEach(function(e){prefixes.forEach(function(t){isUnitlessNumber[prefixKey(t,e)]=isUnitlessNumber[e]})}),lib.inject.ApplyAnimatedValues(ApplyAnimatedValues$2,mapStyle);var reactDom=_extends$7({},lib,{div:lib.createAnimatedComponent("div"),span:lib.createAnimatedComponent("span"),img:lib.createAnimatedComponent("img")});function createAnimatedValue(e,t,n){var r=new reactDom.Value(0);return{name:e,animation:r,interpolate:r.interpolate({inputRange:[0,1],outputRange:[t,n]})}}var Spring=function(e){function t(t){var n;n=e.call(this)||this,_initialiseProps.call(_assertThisInitialized(n));var r=t.children,i=t.to,a=t.from;return n.component=reactDom.createAnimatedComponent(r),n.animations=Object.entries(i).map(function(e){var t=e[0],n=e[1];return createAnimatedValue(t,void 0!==a[t]?a[t]:n,n)}),n.to=n.animations.reduce(function(e,t){var n;return _extends({},e,((n={})[t.name]=t.interpolate,n))},{}),n}_inheritsLoose(t,e);var n=t.prototype;return n.componentWillReceiveProps=function(e){this.update(e)},n.componentWillMount=function(){var e=this;this.animations.forEach(function(t){return e.props.interpolator(t.animation,{toValue:1}).start()})},n.render=function(){return React.createElement(this.component,this.to)},t}(React.PureComponent);Spring.defaultProps={to:{},from:{},interpolator:reactDom.spring};var _initialiseProps=function(){var e=this;this.update=function(t){var n=t.to,r=(t.from,t.interpolator),i=e.animations,a=Array.isArray(i),o=0;for(i=a?i:i[Symbol.iterator]();;){var s;if(a){if(o>=i.length)break;s=i[o++]}else{if((o=i.next()).done)break;s=o.value}var l=s,u=l.animation._value;l.animation.stopAnimation(),n[l.name]!==l.to&&(l.animation=new reactDom.Value(0),l.interpolate=l.animation.interpolate({inputRange:[0,1],outputRange:[l.interpolate._interpolation(u),n[l.name]]}),r(l.animation,{toValue:1}).start())}e.to=e.animations.reduce(function(e,t){var n;return _extends({},e,((n={})[t.name]=t.interpolate,n))},{})}};"production"!==process.env.NODE_ENV&&(Spring.propTypes={to:PropTypes.object,from:PropTypes.object,interpolator:PropTypes.func});export default Spring;
import React from"react";import PropTypes from"prop-types";function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function _objectWithoutProperties(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var NODE_ENV=process.env.NODE_ENV,invariant=function(e,t,n,r,i,a,o,s){if("production"!==NODE_ENV&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,a,o,s],c=0;(l=new Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}},invariant_1=invariant,_createClass$1=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Animated=function(){function e(){_classCallCheck$1(this,e)}return _createClass$1(e,[{key:"__attach",value:function(){}},{key:"__detach",value:function(){}},{key:"__getValue",value:function(){}},{key:"__getAnimatedValue",value:function(){return this.__getValue()}},{key:"__addChild",value:function(e){}},{key:"__removeChild",value:function(e){}},{key:"__getChildren",value:function(){return[]}}]),e}(),Animated_1=Animated,commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},_createClass$2=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$1(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$1(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedWithChildren=function(e){function t(){_classCallCheck$2(this,t);var e=_possibleConstructorReturn$1(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e._children=[],e}return _inherits$1(t,Animated_1),_createClass$2(t,[{key:"__addChild",value:function(e){0===this._children.length&&this.__attach(),this._children.push(e)}},{key:"__removeChild",value:function(e){var t=this._children.indexOf(e);-1!==t?(this._children.splice(t,1),0===this._children.length&&this.__detach()):console.warn("Trying to remove a child that doesn't exist")}},{key:"__getChildren",value:function(){return this._children}}]),t}(),AnimatedWithChildren_1=AnimatedWithChildren,InteractionManager={current:{createInteractionHandle:function(){},clearInteractionHandle:function(){}},inject:function(e){InteractionManager.current=e}},InteractionManager_1=InteractionManager;function normalizeColor(e){var t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=matchers.hex6.exec(e))?parseInt(t[1]+"ff",16)>>>0:names.hasOwnProperty(e)?names[e]:(t=matchers.rgb.exec(e))?(parse255(t[1])<<24|parse255(t[2])<<16|parse255(t[3])<<8|255)>>>0:(t=matchers.rgba.exec(e))?(parse255(t[1])<<24|parse255(t[2])<<16|parse255(t[3])<<8|parse1(t[4]))>>>0:(t=matchers.hex3.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=matchers.hex8.exec(e))?parseInt(t[1],16)>>>0:(t=matchers.hex4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=matchers.hsl.exec(e))?(255|hslToRgb(parse360(t[1]),parsePercentage(t[2]),parsePercentage(t[3])))>>>0:(t=matchers.hsla.exec(e))?(hslToRgb(parse360(t[1]),parsePercentage(t[2]),parsePercentage(t[3]))|parse1(t[4]))>>>0:null}function hue2rgb(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hslToRgb(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=hue2rgb(i,r,e+1/3),o=hue2rgb(i,r,e),s=hue2rgb(i,r,e-1/3);return Math.round(255*a)<<24|Math.round(255*o)<<16|Math.round(255*s)<<8}var NUMBER="[-+]?\\d*\\.?\\d+",PERCENTAGE=NUMBER+"%";function toArray(e){return Array.prototype.slice.call(e,0)}function call(){return"\\(\\s*("+toArray(arguments).join(")\\s*,\\s*(")+")\\s*\\)"}var matchers={rgb:new RegExp("rgb"+call(NUMBER,NUMBER,NUMBER)),rgba:new RegExp("rgba"+call(NUMBER,NUMBER,NUMBER,NUMBER)),hsl:new RegExp("hsl"+call(NUMBER,PERCENTAGE,PERCENTAGE)),hsla:new RegExp("hsla"+call(NUMBER,PERCENTAGE,PERCENTAGE,NUMBER)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/};function parse255(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function parse360(e){return(parseFloat(e)%360+360)%360/360}function parse1(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function parsePercentage(e){var t=parseFloat(e,10);return t<0?0:t>100?1:t/100}var names={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};function rgba(e){return{r:Math.round((4278190080&e)>>>24),g:Math.round((16711680&e)>>>16),b:Math.round((65280&e)>>>8),a:((255&e)>>>0)/255}}normalizeColor.rgba=rgba;var normalizeCssColor=normalizeColor,_extends$1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_createClass$3=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var linear=function(e){return e},Interpolation=function(){function e(){_classCallCheck$3(this,e)}return _createClass$3(e,null,[{key:"create",value:function(e){if(e.outputRange&&"string"==typeof e.outputRange[0])return createInterpolationFromStringOutputRange(e);var t=e.outputRange;checkInfiniteRange("outputRange",t);var n=e.inputRange;checkInfiniteRange("inputRange",n),checkValidInputRange(n),invariant_1(n.length===t.length,"inputRange ("+n.length+") and outputRange ("+t.length+") must have the same length");var r=e.easing||linear,i="extend";void 0!==e.extrapolateLeft?i=e.extrapolateLeft:void 0!==e.extrapolate&&(i=e.extrapolate);var a="extend";return void 0!==e.extrapolateRight?a=e.extrapolateRight:void 0!==e.extrapolate&&(a=e.extrapolate),function(e){invariant_1("number"==typeof e,"Cannot interpolation an input which is not a number");var o=findRange(e,n);return interpolate(e,n[o],n[o+1],t[o],t[o+1],r,i,a)}}}]),e}();function interpolate(e,t,n,r,i,a,o,s){var l=e;if(l<t){if("identity"===o)return l;"clamp"===o&&(l=t)}if(l>n){if("identity"===s)return l;"clamp"===s&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t),l=a(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r,l)}function colorToRgba(e){var t=normalizeCssColor(e);return null===t?e:"rgba("+((4278190080&(t=t||0))>>>24)+", "+((16711680&t)>>>16)+", "+((65280&t)>>>8)+", "+(255&t)/255+")"}var stringShapeRegex=/[0-9\.-]+/g;function createInterpolationFromStringOutputRange(e){var t=e.outputRange;invariant_1(t.length>=2,"Bad output range"),checkPattern(t=t.map(colorToRgba));var n=t[0].match(stringShapeRegex).map(function(){return[]});t.forEach(function(e){e.match(stringShapeRegex).forEach(function(e,t){n[t].push(+e)})});var r=t[0].match(stringShapeRegex).map(function(t,r){return Interpolation.create(_extends$1({},e,{outputRange:n[r]}))}),i=/^rgb/.test(t[0]);return function(e){var n=0;return t[0].replace(stringShapeRegex,function(){var t=r[n++](e);return String(i&&n<4?Math.round(t):t)})}}function checkPattern(e){for(var t=e[0].replace(stringShapeRegex,""),n=1;n<e.length;++n)invariant_1(t===e[n].replace(stringShapeRegex,""),"invalid pattern "+e[0]+" and "+e[n])}function findRange(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}function checkValidInputRange(e){invariant_1(e.length>=2,"inputRange must have at least 2 elements");for(var t=1;t<e.length;++t)invariant_1(e[t]>=e[t-1],"inputRange must be monotonically increasing "+e)}function checkInfiniteRange(e,t){invariant_1(t.length>=2,e+" must have at least 2 elements"),invariant_1(2!==t.length||t[0]!==-1/0||t[1]!==1/0,e+"cannot be ]-infinity;+infinity[ "+t)}var Interpolation_1=Interpolation,_uniqueId=0,guid$1=function(){return String(_uniqueId++)},_createClass$4=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$2(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$2(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedInterpolation=function(e){function t(e,n){_classCallCheck$4(this,t);var r=_possibleConstructorReturn$2(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._parent=e,r._interpolation=n,r._listeners={},r}return _inherits$2(t,AnimatedWithChildren_1),_createClass$4(t,[{key:"__getValue",value:function(){var e=this._parent.__getValue();return invariant_1("number"==typeof e,"Cannot interpolate an input which is not a number."),this._interpolation(e)}},{key:"addListener",value:function(e){var t=this;this._parentListener||(this._parentListener=this._parent.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})}));var n=guid$1();return this._listeners[n]=e,n}},{key:"removeListener",value:function(e){delete this._listeners[e]}},{key:"interpolate",value:function(e){return new t(this,Interpolation_1.create(e))}},{key:"__attach",value:function(){this._parent.__addChild(this)}},{key:"__detach",value:function(){this._parent.__removeChild(this),this._parentListener=this._parent.removeListener(this._parentListener)}}]),t}(),AnimatedInterpolation_1=AnimatedInterpolation,_createClass$5=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Animation=function(){function e(){_classCallCheck$5(this,e)}return _createClass$5(e,[{key:"start",value:function(e,t,n,r){}},{key:"stop",value:function(){}},{key:"__debouncedOnEnd",value:function(e){var t=this.__onEnd;this.__onEnd=null,t&&t(e)}}]),e}(),Animation_1=Animation;function SetPolyfill(){this._cache=[]}SetPolyfill.prototype.add=function(e){-1===this._cache.indexOf(e)&&this._cache.push(e)},SetPolyfill.prototype.forEach=function(e){this._cache.forEach(e)};var SetPolyfill_1=SetPolyfill,_createClass$6=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$3(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$3(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Set=commonjsGlobal.Set||SetPolyfill_1;function _flush(e){var t=new Set;!function e(n){"function"==typeof n.update?t.add(n):n.__getChildren().forEach(e)}(e),t.forEach(function(e){return e.update()})}var AnimatedValue=function(e){function t(e){_classCallCheck$6(this,t);var n=_possibleConstructorReturn$3(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._value=e,n._offset=0,n._animation=null,n._listeners={},n}return _inherits$3(t,AnimatedWithChildren_1),_createClass$6(t,[{key:"__detach",value:function(){this.stopAnimation()}},{key:"__getValue",value:function(){return this._value+this._offset}},{key:"setValue",value:function(e){this._animation&&(this._animation.stop(),this._animation=null),this._updateValue(e)}},{key:"setOffset",value:function(e){this._offset=e}},{key:"flattenOffset",value:function(){this._value+=this._offset,this._offset=0}},{key:"addListener",value:function(e){var t=guid$1();return this._listeners[t]=e,t}},{key:"removeListener",value:function(e){delete this._listeners[e]}},{key:"removeAllListeners",value:function(){this._listeners={}}},{key:"stopAnimation",value:function(e){this.stopTracking(),this._animation&&this._animation.stop(),this._animation=null,e&&e(this.__getValue())}},{key:"interpolate",value:function(e){return new AnimatedInterpolation_1(this,Interpolation_1.create(e))}},{key:"animate",value:function(e,t){var n=this,r=null;e.__isInteraction&&(r=InteractionManager_1.current.createInteractionHandle());var i=this._animation;this._animation&&this._animation.stop(),this._animation=e,e.start(this._value,function(e){n._updateValue(e)},function(e){n._animation=null,null!==r&&InteractionManager_1.current.clearInteractionHandle(r),t&&t(e)},i)}},{key:"stopTracking",value:function(){this._tracking&&this._tracking.__detach(),this._tracking=null}},{key:"track",value:function(e){this.stopTracking(),this._tracking=e}},{key:"_updateValue",value:function(e){for(var t in this._value=e,_flush(this),this._listeners)this._listeners[t]({value:this.__getValue()})}}]),t}(),AnimatedValue_1=AnimatedValue,_createClass$7=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$4(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$4(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedValueXY=function(e){function t(e){_classCallCheck$7(this,t);var n=_possibleConstructorReturn$4(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),r=e||{x:0,y:0};return"number"==typeof r.x&&"number"==typeof r.y?(n.x=new AnimatedValue_1(r.x),n.y=new AnimatedValue_1(r.y)):(invariant_1(r.x instanceof AnimatedValue_1&&r.y instanceof AnimatedValue_1,"AnimatedValueXY must be initalized with an object of numbers or AnimatedValues."),n.x=r.x,n.y=r.y),n._listeners={},n}return _inherits$4(t,AnimatedWithChildren_1),_createClass$7(t,[{key:"setValue",value:function(e){this.x.setValue(e.x),this.y.setValue(e.y)}},{key:"setOffset",value:function(e){this.x.setOffset(e.x),this.y.setOffset(e.y)}},{key:"flattenOffset",value:function(){this.x.flattenOffset(),this.y.flattenOffset()}},{key:"__getValue",value:function(){return{x:this.x.__getValue(),y:this.y.__getValue()}}},{key:"stopAnimation",value:function(e){this.x.stopAnimation(),this.y.stopAnimation(),e&&e(this.__getValue())}},{key:"addListener",value:function(e){var t=this,n=guid$1(),r=function(n){n.value;e(t.__getValue())};return this._listeners[n]={x:this.x.addListener(r),y:this.y.addListener(r)},n}},{key:"removeListener",value:function(e){this.x.removeListener(this._listeners[e].x),this.y.removeListener(this._listeners[e].y),delete this._listeners[e]}},{key:"getLayout",value:function(){return{left:this.x,top:this.y}}},{key:"getTranslateTransform",value:function(){return[{translateX:this.x},{translateY:this.y}]}}]),t}(),AnimatedValueXY_1=AnimatedValueXY,_createClass$8=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$5(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$5(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedAddition=function(e){function t(e,n){_classCallCheck$8(this,t);var r=_possibleConstructorReturn$5(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._a="number"==typeof e?new AnimatedValue_1(e):e,r._b="number"==typeof n?new AnimatedValue_1(n):n,r._listeners={},r}return _inherits$5(t,AnimatedWithChildren_1),_createClass$8(t,[{key:"__getValue",value:function(){return this._a.__getValue()+this._b.__getValue()}},{key:"addListener",value:function(e){var t=this;!this._aListener&&this._a.addListener&&(this._aListener=this._a.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})})),!this._bListener&&this._b.addListener&&(this._bListener=this._b.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})}));var n=guid();return this._listeners[n]=e,n}},{key:"removeListener",value:function(e){delete this._listeners[e]}},{key:"interpolate",value:function(e){return new AnimatedInterpolation_1(this,Interpolation_1.create(e))}},{key:"__attach",value:function(){this._a.__addChild(this),this._b.__addChild(this)}},{key:"__detach",value:function(){this._a.__removeChild(this),this._b.__removeChild(this)}}]),t}(),AnimatedAddition_1=AnimatedAddition,_createClass$9=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$6(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$6(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedMultiplication=function(e){function t(e,n){_classCallCheck$9(this,t);var r=_possibleConstructorReturn$6(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._a="number"==typeof e?new AnimatedValue_1(e):e,r._b="number"==typeof n?new AnimatedValue_1(n):n,r._listeners={},r}return _inherits$6(t,AnimatedWithChildren_1),_createClass$9(t,[{key:"__getValue",value:function(){return this._a.__getValue()*this._b.__getValue()}},{key:"addListener",value:function(e){var t=this;!this._aListener&&this._a.addListener&&(this._aListener=this._a.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})})),!this._bListener&&this._b.addListener&&(this._bListener=this._b.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})}));var n=guid();return this._listeners[n]=e,n}},{key:"removeListener",value:function(e){delete this._listeners[e]}},{key:"interpolate",value:function(e){return new AnimatedInterpolation_1(this,Interpolation_1.create(e))}},{key:"__attach",value:function(){this._a.__addChild(this),this._b.__addChild(this)}},{key:"__detach",value:function(){this._a.__removeChild(this),this._b.__removeChild(this)}}]),t}(),AnimatedMultiplication_1=AnimatedMultiplication,_createClass$10=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$10(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$7(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$7(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedModulo=function(e){function t(e,n){_classCallCheck$10(this,t);var r=_possibleConstructorReturn$7(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._a=e,r._modulus=n,r._listeners={},r}return _inherits$7(t,AnimatedWithChildren_1),_createClass$10(t,[{key:"__getValue",value:function(){return(this._a.__getValue()%this._modulus+this._modulus)%this._modulus}},{key:"addListener",value:function(e){var t=this;this._aListener||(this._aListener=this._a.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})}));var n=guid();return this._listeners[n]=e,n}},{key:"removeListener",value:function(e){delete this._listeners[e]}},{key:"interpolate",value:function(e){return new AnimatedInterpolation_1(this,Interpolation_1.create(e))}},{key:"__attach",value:function(){this._a.__addChild(this)}},{key:"__detach",value:function(){this._a.__removeChild(this)}}]),t}(),AnimatedModulo_1=AnimatedModulo,_createClass$11=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$11(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$8(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$8(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedTemplate=function(e){function t(e,n){_classCallCheck$11(this,t);var r=_possibleConstructorReturn$8(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._strings=e,r._values=n,r}return _inherits$8(t,AnimatedWithChildren_1),_createClass$11(t,[{key:"__transformValue",value:function(e){return e instanceof Animated_1?e.__getValue():e}},{key:"__getValue",value:function(){for(var e=this._strings[0],t=0;t<this._values.length;++t)e+=this.__transformValue(this._values[t])+this._strings[1+t];return e}},{key:"__attach",value:function(){for(var e=0;e<this._values.length;++e)this._values[e]instanceof Animated_1&&this._values[e].__addChild(this)}},{key:"__detach",value:function(){for(var e=0;e<this._values.length;++e)this._values[e]instanceof Animated_1&&this._values[e].__removeChild(this)}}]),t}(),AnimatedTemplate_1=AnimatedTemplate,_extends$2=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_createClass$12=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$12(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$9(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$9(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedTracking=function(e){function t(e,n,r,i,a){_classCallCheck$12(this,t);var o=_possibleConstructorReturn$9(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o._value=e,o._parent=n,o._animationClass=r,o._animationConfig=i,o._callback=a,o.__attach(),o}return _inherits$9(t,Animated_1),_createClass$12(t,[{key:"__getValue",value:function(){return this._parent.__getValue()}},{key:"__attach",value:function(){this._parent.__addChild(this)}},{key:"__detach",value:function(){this._parent.__removeChild(this)}},{key:"update",value:function(){this._value.animate(new this._animationClass(_extends$2({},this._animationConfig,{toValue:this._animationConfig.toValue.__getValue()})),this._callback)}}]),t}(),AnimatedTracking_1=AnimatedTracking;function isAnimated(e){return e instanceof Animated_1}var isAnimated_1=isAnimated,NEWTON_ITERATIONS=4,NEWTON_MIN_SLOPE=.001,SUBDIVISION_PRECISION=1e-7,SUBDIVISION_MAX_ITERATIONS=10,kSplineTableSize=11,kSampleStepSize=1/(kSplineTableSize-1),float32ArraySupported="function"==typeof Float32Array;function A(e,t){return 1-3*t+3*e}function B(e,t){return 3*t-6*e}function C(e){return 3*e}function calcBezier(e,t,n){return((A(t,n)*e+B(t,n))*e+C(t))*e}function getSlope(e,t,n){return 3*A(t,n)*e*e+2*B(t,n)*e+C(t)}function binarySubdivide(e,t,n,r,i){var a,o,s=0;do{(a=calcBezier(o=t+(n-t)/2,r,i)-e)>0?n=o:t=o}while(Math.abs(a)>SUBDIVISION_PRECISION&&++s<SUBDIVISION_MAX_ITERATIONS);return o}function newtonRaphsonIterate(e,t,n,r){for(var i=0;i<NEWTON_ITERATIONS;++i){var a=getSlope(t,n,r);if(0===a)return t;t-=(calcBezier(t,n,r)-e)/a}return t}var bezier=function(e,t,n,r){if(!(0<=e&&e<=1&&0<=n&&n<=1))throw new Error("bezier x values must be in [0, 1] range");var i=float32ArraySupported?new Float32Array(kSplineTableSize):new Array(kSplineTableSize);if(e!==t||n!==r)for(var a=0;a<kSplineTableSize;++a)i[a]=calcBezier(a*kSampleStepSize,e,n);return function(a){return e===t&&n===r?a:0===a?0:1===a?1:calcBezier(function(t){for(var r=0,a=1,o=kSplineTableSize-1;a!==o&&i[a]<=t;++a)r+=kSampleStepSize;var s=r+(t-i[--a])/(i[a+1]-i[a])*kSampleStepSize,l=getSlope(s,e,n);return l>=NEWTON_MIN_SLOPE?newtonRaphsonIterate(t,s,e,n):0===l?s:binarySubdivide(t,r,r+kSampleStepSize,e,n)}(a),t,r)}},_createClass$13=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$13(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Easing=function(){function e(){_classCallCheck$13(this,e)}return _createClass$13(e,null,[{key:"step0",value:function(e){return e>0?1:0}},{key:"step1",value:function(e){return e>=1?1:0}},{key:"linear",value:function(e){return e}},{key:"ease",value:function(e){return _ease(e)}},{key:"quad",value:function(e){return e*e}},{key:"cubic",value:function(e){return e*e*e}},{key:"poly",value:function(e){return function(t){return Math.pow(t,e)}}},{key:"sin",value:function(e){return 1-Math.cos(e*Math.PI/2)}},{key:"circle",value:function(e){return 1-Math.sqrt(1-e*e)}},{key:"exp",value:function(e){return Math.pow(2,10*(e-1))}},{key:"elastic",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)*Math.PI;return function(t){return 1-Math.pow(Math.cos(t*Math.PI/2),3)*Math.cos(t*e)}}},{key:"back",value:function(e){return void 0===e&&(e=1.70158),function(t){return t*t*((e+1)*t-e)}}},{key:"bounce",value:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}},{key:"bezier",value:function(e,t,n,r){return bezier(e,t,n,r)}},{key:"in",value:function(e){return e}},{key:"out",value:function(e){return function(t){return 1-e(1-t)}}},{key:"inOut",value:function(e){return function(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2}}}]),e}(),_ease=Easing.bezier(.42,0,1,1),Easing_1=Easing,RequestAnimationFrame={current:function(e){return commonjsGlobal.requestAnimationFrame(e)},inject:function(e){RequestAnimationFrame.current=e}},RequestAnimationFrame_1=RequestAnimationFrame,CancelAnimationFrame={current:function(e){return commonjsGlobal.cancelAnimationFrame(e)},inject:function(e){CancelAnimationFrame.current=e}},CancelAnimationFrame_1=CancelAnimationFrame,_createClass$14=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$14(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$10(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$10(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var easeInOut=Easing_1.inOut(Easing_1.ease),TimingAnimation=function(e){function t(e){_classCallCheck$14(this,t);var n=_possibleConstructorReturn$10(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._toValue=e.toValue,n._easing=void 0!==e.easing?e.easing:easeInOut,n._duration=void 0!==e.duration?e.duration:500,n._delay=void 0!==e.delay?e.delay:0,n.__isInteraction=void 0===e.isInteraction||e.isInteraction,n}return _inherits$10(t,Animation_1),_createClass$14(t,[{key:"start",value:function(e,t,n){var r=this;this.__active=!0,this._fromValue=e,this._onUpdate=t,this.__onEnd=n;var i=function(){0===r._duration?(r._onUpdate(r._toValue),r.__debouncedOnEnd({finished:!0})):(r._startTime=Date.now(),r._animationFrame=RequestAnimationFrame_1.current(r.onUpdate.bind(r)))};this._delay?this._timeout=setTimeout(i,this._delay):i()}},{key:"onUpdate",value:function(){var e=Date.now();if(e>=this._startTime+this._duration)return 0===this._duration?this._onUpdate(this._toValue):this._onUpdate(this._fromValue+this._easing(1)*(this._toValue-this._fromValue)),void this.__debouncedOnEnd({finished:!0});this._onUpdate(this._fromValue+this._easing((e-this._startTime)/this._duration)*(this._toValue-this._fromValue)),this.__active&&(this._animationFrame=RequestAnimationFrame_1.current(this.onUpdate.bind(this)))}},{key:"stop",value:function(){this.__active=!1,clearTimeout(this._timeout),CancelAnimationFrame_1.current(this._animationFrame),this.__debouncedOnEnd({finished:!1})}}]),t}(),TimingAnimation_1=TimingAnimation,_createClass$15=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$15(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$11(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$11(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var DecayAnimation=function(e){function t(e){_classCallCheck$15(this,t);var n=_possibleConstructorReturn$11(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._deceleration=void 0!==e.deceleration?e.deceleration:.998,n._velocity=e.velocity,n.__isInteraction=void 0===e.isInteraction||e.isInteraction,n}return _inherits$11(t,Animation_1),_createClass$15(t,[{key:"start",value:function(e,t,n){this.__active=!0,this._lastValue=e,this._fromValue=e,this._onUpdate=t,this.__onEnd=n,this._startTime=Date.now(),this._animationFrame=RequestAnimationFrame_1.current(this.onUpdate.bind(this))}},{key:"onUpdate",value:function(){var e=Date.now(),t=this._fromValue+this._velocity/(1-this._deceleration)*(1-Math.exp(-(1-this._deceleration)*(e-this._startTime)));this._onUpdate(t),Math.abs(this._lastValue-t)<.1?this.__debouncedOnEnd({finished:!0}):(this._lastValue=t,this.__active&&(this._animationFrame=RequestAnimationFrame_1.current(this.onUpdate.bind(this))))}},{key:"stop",value:function(){this.__active=!1,CancelAnimationFrame_1.current(this._animationFrame),this.__debouncedOnEnd({finished:!1})}}]),t}(),DecayAnimation_1=DecayAnimation;function tensionFromOrigamiValue(e){return 3.62*(e-30)+194}function frictionFromOrigamiValue(e){return 3*(e-8)+25}function fromOrigamiTensionAndFriction(e,t){return{tension:tensionFromOrigamiValue(e),friction:frictionFromOrigamiValue(t)}}function fromBouncinessAndSpeed(e,t){function n(e,t,n){return(e-t)/(n-t)}function r(e,t,n){return t+e*(n-t)}var i=n(e/1.7,0,20);i=r(i,0,.8);var a,o,s,l,u=r(n(t/1.7,0,20),.5,200),c=(a=i,o=(s=u)<=18?(l=s,7e-4*Math.pow(l,3)-.031*Math.pow(l,2)+.64*l+1.28):s>18&&s<=44?function(e){return 44e-6*Math.pow(e,3)-.006*Math.pow(e,2)+.36*e+2}(s):function(e){return 4.5e-7*Math.pow(e,3)-332e-6*Math.pow(e,2)+.1078*e+5.84}(s),function(e,t,n){return e*n+(1-e)*t}(2*a-a*a,o,.01));return{tension:tensionFromOrigamiValue(u),friction:frictionFromOrigamiValue(c)}}var SpringConfig={fromOrigamiTensionAndFriction:fromOrigamiTensionAndFriction,fromBouncinessAndSpeed:fromBouncinessAndSpeed},_createClass$16=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$16(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$12(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$12(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function withDefault(e,t){return void 0===e||null===e?t:e}var SpringAnimation=function(e){function t(e){_classCallCheck$16(this,t);var n,r=_possibleConstructorReturn$12(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._overshootClamping=withDefault(e.overshootClamping,!1),r._restDisplacementThreshold=withDefault(e.restDisplacementThreshold,.001),r._restSpeedThreshold=withDefault(e.restSpeedThreshold,.001),r._initialVelocity=e.velocity,r._lastVelocity=withDefault(e.velocity,0),r._toValue=e.toValue,r.__isInteraction=void 0===e.isInteraction||e.isInteraction,void 0!==e.bounciness||void 0!==e.speed?(invariant_1(void 0===e.tension&&void 0===e.friction,"You can only define bounciness/speed or tension/friction but not both"),n=SpringConfig.fromBouncinessAndSpeed(withDefault(e.bounciness,8),withDefault(e.speed,12))):n=SpringConfig.fromOrigamiTensionAndFriction(withDefault(e.tension,40),withDefault(e.friction,7)),r._tension=n.tension,r._friction=n.friction,r}return _inherits$12(t,Animation_1),_createClass$16(t,[{key:"start",value:function(e,n,r,i){if(this.__active=!0,this._startPosition=e,this._lastPosition=this._startPosition,this._onUpdate=n,this.__onEnd=r,this._lastTime=Date.now(),i instanceof t){var a=i.getInternalState();this._lastPosition=a.lastPosition,this._lastVelocity=a.lastVelocity,this._lastTime=a.lastTime}void 0!==this._initialVelocity&&null!==this._initialVelocity&&(this._lastVelocity=this._initialVelocity),this.onUpdate()}},{key:"getInternalState",value:function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}}},{key:"onUpdate",value:function(){var e=this._lastPosition,t=this._lastVelocity,n=this._lastPosition,r=this._lastVelocity,i=Date.now();i>this._lastTime+64&&(i=this._lastTime+64);for(var a=Math.floor((i-this._lastTime)/1),o=0;o<a;++o){var s=t,l=this._tension*(this._toValue-n)-this._friction*r,u=(n=e+.001*s/2,r=t+.001*l/2),c=this._tension*(this._toValue-n)-this._friction*r;n=e+.001*u/2;var f=r=t+.001*c/2,_=this._tension*(this._toValue-n)-this._friction*r;n=e+.001*f/2;var h=r=t+.001*_/2,p=this._tension*(this._toValue-n)-this._friction*r;n=e+.001*f/2,r=t+.001*_/2,e+=.001*((s+2*(u+f)+h)/6),t+=.001*((l+2*(c+_)+p)/6)}if(this._lastTime=i,this._lastPosition=e,this._lastVelocity=t,this._onUpdate(e),this.__active){var d=!1;this._overshootClamping&&0!==this._tension&&(d=this._startPosition<this._toValue?e>this._toValue:e<this._toValue);var m=Math.abs(t)<=this._restSpeedThreshold,y=!0;if(0!==this._tension&&(y=Math.abs(this._toValue-e)<=this._restDisplacementThreshold),d||m&&y)return 0!==this._tension&&this._onUpdate(this._toValue),void this.__debouncedOnEnd({finished:!0});this._animationFrame=RequestAnimationFrame_1.current(this.onUpdate.bind(this))}}},{key:"stop",value:function(){this.__active=!1,CancelAnimationFrame_1.current(this._animationFrame),this.__debouncedOnEnd({finished:!1})}}]),t}(),SpringAnimation_1=SpringAnimation,_createClass$17=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$17(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$13(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$13(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedTransform=function(e){function t(e){_classCallCheck$17(this,t);var n=_possibleConstructorReturn$13(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._transforms=e,n}return _inherits$13(t,AnimatedWithChildren_1),_createClass$17(t,[{key:"__getValue",value:function(){return this._transforms.map(function(e){var t={};for(var n in e){var r=e[n];t[n]=r instanceof Animated_1?r.__getValue():r}return t})}},{key:"__getAnimatedValue",value:function(){return this._transforms.map(function(e){var t={};for(var n in e){var r=e[n];t[n]=r instanceof Animated_1?r.__getAnimatedValue():r}return t})}},{key:"__attach",value:function(){var e=this;this._transforms.forEach(function(t){for(var n in t){var r=t[n];r instanceof Animated_1&&r.__addChild(e)}})}},{key:"__detach",value:function(){var e=this;this._transforms.forEach(function(t){for(var n in t){var r=t[n];r instanceof Animated_1&&r.__removeChild(e)}})}}]),t}(),AnimatedTransform_1=AnimatedTransform,FlattenStyle={current:function(e){return e},inject:function(e){FlattenStyle.current=e}},FlattenStyle_1=FlattenStyle,_extends$3=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_createClass$18=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$18(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$14(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$14(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedStyle=function(e){function t(e){_classCallCheck$18(this,t);var n=_possibleConstructorReturn$14(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return!(e=FlattenStyle_1.current(e)||{}).transform||e.transform instanceof Animated_1||(e=_extends$3({},e,{transform:new AnimatedTransform_1(e.transform)})),n._style=e,n}return _inherits$14(t,AnimatedWithChildren_1),_createClass$18(t,[{key:"__getValue",value:function(){var e={};for(var t in this._style){var n=this._style[t];e[t]=n instanceof Animated_1?n.__getValue():n}return e}},{key:"__getAnimatedValue",value:function(){var e={};for(var t in this._style){var n=this._style[t];n instanceof Animated_1&&(e[t]=n.__getAnimatedValue())}return e}},{key:"__attach",value:function(){for(var e in this._style){var t=this._style[e];t instanceof Animated_1&&t.__addChild(this)}}},{key:"__detach",value:function(){for(var e in this._style){var t=this._style[e];t instanceof Animated_1&&t.__removeChild(this)}}}]),t}(),AnimatedStyle_1=AnimatedStyle,_extends$4=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_createClass$19=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$19(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$15(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$15(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedProps=function(e){function t(e,n){_classCallCheck$19(this,t);var r=_possibleConstructorReturn$15(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.style&&(e=_extends$4({},e,{style:new AnimatedStyle_1(e.style)})),r._props=e,r._callback=n,r.__attach(),r}return _inherits$15(t,Animated_1),_createClass$19(t,[{key:"__getValue",value:function(){var e={};for(var t in this._props){var n=this._props[t];e[t]=n instanceof Animated_1?n.__getValue():n}return e}},{key:"__getAnimatedValue",value:function(){var e={};for(var t in this._props){var n=this._props[t];n instanceof Animated_1&&(e[t]=n.__getAnimatedValue())}return e}},{key:"__attach",value:function(){for(var e in this._props){var t=this._props[e];t instanceof Animated_1&&t.__addChild(this)}}},{key:"__detach",value:function(){for(var e in this._props){var t=this._props[e];t instanceof Animated_1&&t.__removeChild(this)}}},{key:"update",value:function(){this._callback()}}]),t}(),AnimatedProps_1=AnimatedProps,ApplyAnimatedValues={current:function(e,t){if(!e.setNativeProps)return!1;e.setNativeProps(t)},transformStyles:function(e){return e},inject:function(e,t){ApplyAnimatedValues.current=e,ApplyAnimatedValues.transformStyles=t}},ApplyAnimatedValues_1=ApplyAnimatedValues,_extends$5=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_jsxFileName="src/createAnimatedComponent.js",_createClass$20=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _objectWithoutProperties$1(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function _classCallCheck$20(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$16(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$16(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function createAnimatedComponent(e){var t=function(t){function n(){return _classCallCheck$20(this,n),_possibleConstructorReturn$16(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return _inherits$16(n,React.Component),_createClass$20(n,[{key:"componentWillUnmount",value:function(){this._propsAnimated&&this._propsAnimated.__detach()}},{key:"setNativeProps",value:function(e){!1===ApplyAnimatedValues_1.current(this.refs.node,e,this)&&this.forceUpdate()}},{key:"componentWillMount",value:function(){this.attachProps(this.props)}},{key:"attachProps",value:function(e){var t=this,n=this._propsAnimated;this._propsAnimated=new AnimatedProps_1(e,function(){!1===ApplyAnimatedValues_1.current(t.refs.node,t._propsAnimated.__getAnimatedValue(),t)&&t.forceUpdate()}),n&&n.__detach()}},{key:"componentWillReceiveProps",value:function(e){this.attachProps(e)}},{key:"render",value:function(){var t=this._propsAnimated.__getValue(),n=t.style,r=_objectWithoutProperties$1(t,["style"]);return React.createElement(e,_extends$5({},r,{style:ApplyAnimatedValues_1.transformStyles(n),ref:"node",__source:{fileName:_jsxFileName,lineNumber:78}}))}}]),n}();return"production"!==process.env.NODE_ENV&&(t.propTypes={style:function(t,n,r){e.propTypes}}),t}var createAnimatedComponent_1=createAnimatedComponent,_extends$6=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},maybeVectorAnim=function(e,t,n){if(e instanceof AnimatedValueXY_1){var r=_extends$6({},t),i=_extends$6({},t);for(var a in t){var o=t[a],s=o.x,l=o.y;void 0!==s&&void 0!==l&&(r[a]=s,i[a]=l)}var u=n(e.x,r),c=n(e.y,i);return parallel([u,c],{stopTogether:!1})}return null},spring=function e(t,n){return maybeVectorAnim(t,n,e)||{start:function(e){var r=t,i=n;r.stopTracking(),n.toValue instanceof Animated_1?r.track(new AnimatedTracking_1(r,n.toValue,SpringAnimation_1,i,e)):r.animate(new SpringAnimation_1(i),e)},stop:function(){t.stopAnimation()}}},timing=function e(t,n){return maybeVectorAnim(t,n,e)||{start:function(e){var r=t,i=n;r.stopTracking(),n.toValue instanceof Animated_1?r.track(new AnimatedTracking_1(r,n.toValue,TimingAnimation_1,i,e)):r.animate(new TimingAnimation_1(i),e)},stop:function(){t.stopAnimation()}}},decay=function e(t,n){return maybeVectorAnim(t,n,e)||{start:function(e){var r=t,i=n;r.stopTracking(),r.animate(new DecayAnimation_1(i),e)},stop:function(){t.stopAnimation()}}},sequence=function(e){var t=0;return{start:function(n){0===e.length?n&&n({finished:!0}):e[t].start(function r(i){i.finished&&++t!==e.length?e[t].start(r):n&&n(i)})},stop:function(){t<e.length&&e[t].stop()}}},parallel=function(e,t){var n=0,r={},i=!(t&&!1===t.stopTogether),a={start:function(t){n!==e.length?e.forEach(function(o,s){var l=function(o){if(r[s]=!0,++n===e.length)return n=0,void(t&&t(o));!o.finished&&i&&a.stop()};o?o.start(l):l({finished:!0})}):t&&t({finished:!0})},stop:function(){e.forEach(function(e,t){!r[t]&&e.stop(),r[t]=!0})}};return a},delay=function(e){return timing(new AnimatedValue_1(0),{toValue:0,delay:e,duration:0})},stagger=function(e,t){return parallel(t.map(function(t,n){return sequence([delay(e*n),t])}))},event=function(e,t){return function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];e.forEach(function(e,t){!function e(t,n,r){if("number"==typeof n)return invariant_1(t instanceof AnimatedValue_1,"Bad mapping of type "+typeof t+" for key "+r+", event value must map to AnimatedValue"),void t.setValue(n);for(var r in invariant_1("object"==typeof t,"Bad mapping of type "+typeof t+" for key "+r),invariant_1("object"==typeof n,"Bad event of type "+typeof n+" for key "+r),t)e(t[r],n[r],r)}(e,r[t],"arg"+t)}),t&&t.listener&&t.listener.apply(null,r)}},lib={Value:AnimatedValue_1,ValueXY:AnimatedValueXY_1,decay:decay,timing:timing,spring:spring,add:function(e,t){return new AnimatedAddition_1(e,t)},multiply:function(e,t){return new AnimatedMultiplication_1(e,t)},modulo:function(e,t){return new AnimatedModulo_1(e,t)},template:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new AnimatedTemplate_1(e,n)},delay:delay,sequence:sequence,parallel:parallel,stagger:stagger,event:event,isAnimated:isAnimated_1,createAnimatedComponent:createAnimatedComponent_1,inject:{ApplyAnimatedValues:ApplyAnimatedValues_1.inject,InteractionManager:InteractionManager_1.inject,FlattenStyle:FlattenStyle_1.inject,RequestAnimationFrame:RequestAnimationFrame_1.inject,CancelAnimationFrame:CancelAnimationFrame_1.inject},__PropsOnlyForTests:AnimatedProps_1},_extends$7=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},transformWithLengthUnits={translateX:!0,translateY:!0,translateZ:!0,perspective:!0};function mapTransform(e){var t=Object.keys(e)[0],n=transformWithLengthUnits[t]&&"number"==typeof e[t]?"px":"";return t+"("+e[t]+n+")"}var isUnitlessNumber={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function prefixKey(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var prefixes=["Webkit","ms","Moz","O"];function mapStyle(e){return e&&e.transform&&"string"!=typeof e.transform&&(e.transform=e.transform.map(mapTransform).join(" ")),e}function dangerousStyleValue(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||isUnitlessNumber.hasOwnProperty(e)&&isUnitlessNumber[e]?(""+t).trim():t+"px"}function setValueForStyles(e,t){var n=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=0===r.indexOf("--"),a=dangerousStyleValue(r,t[r],i);"float"===r&&(r="cssFloat"),i?n.setProperty(r,a):n[r]=a}}function ApplyAnimatedValues$2(e,t){if(e.setNativeProps)e.setNativeProps(t);else{if(!e.nodeType||void 0===e.setAttribute)return!1;setValueForStyles(e,mapStyle(t.style))}}Object.keys(isUnitlessNumber).forEach(function(e){prefixes.forEach(function(t){isUnitlessNumber[prefixKey(t,e)]=isUnitlessNumber[e]})}),lib.inject.ApplyAnimatedValues(ApplyAnimatedValues$2,mapStyle);var reactDom=_extends$7({},lib,{div:lib.createAnimatedComponent("div"),span:lib.createAnimatedComponent("span"),img:lib.createAnimatedComponent("img")});function createAnimatedValue(e,t,n){var r=new reactDom.Value(0);return{name:e,animation:r,interpolate:r.interpolate({inputRange:[0,1],outputRange:[t,n]})}}var Spring=function(e){function t(t){var n;n=e.call(this)||this,_initialiseProps.call(_assertThisInitialized(n));var r=t.children,i=t.to,a=t.from;return n.component=reactDom.createAnimatedComponent(r),n.animations=Object.entries(i).map(function(e){var t=e[0],n=e[1];return createAnimatedValue(t,void 0!==a[t]?a[t]:n,n)}),n.to=n.animations.reduce(function(e,t){var n;return _extends({},e,((n={})[t.name]=t.interpolate,n))},{}),n}_inheritsLoose(t,e);var n=t.prototype;return n.componentWillReceiveProps=function(e){this.update(e)},n.componentWillMount=function(){var e=this;this.animations.forEach(function(t){return e.props.interpolator(t.animation,{toValue:1}).start()})},n.render=function(){var e=this.props,t=(e.children,e.to,_objectWithoutProperties(e,["children","to"]));return React.createElement(this.component,_extends({},this.to,t))},t}(React.PureComponent);Spring.defaultProps={to:{},from:{},interpolator:reactDom.spring};var _initialiseProps=function(){var e=this;this.update=function(t){var n=t.to,r=(t.from,t.interpolator),i=e.animations,a=Array.isArray(i),o=0;for(i=a?i:i[Symbol.iterator]();;){var s;if(a){if(o>=i.length)break;s=i[o++]}else{if((o=i.next()).done)break;s=o.value}var l=s,u=l.animation._value;l.animation.stopAnimation(),n[l.name]!==l.to&&(l.animation=new reactDom.Value(0),l.interpolate=l.animation.interpolate({inputRange:[0,1],outputRange:[l.interpolate._interpolation(u),n[l.name]]}),r(l.animation,{toValue:1}).start())}e.to=e.animations.reduce(function(e,t){var n;return _extends({},e,((n={})[t.name]=t.interpolate,n))},{})}};"production"!==process.env.NODE_ENV&&(Spring.propTypes={to:PropTypes.object,from:PropTypes.object,interpolator:PropTypes.func});export default Spring;

@@ -1,1 +0,1 @@

"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var React=_interopDefault(require("react")),PropTypes=_interopDefault(require("prop-types"));function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var NODE_ENV=process.env.NODE_ENV,invariant=function(e,t,n,r,i,a,o,s){if("production"!==NODE_ENV&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,a,o,s],c=0;(l=new Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}},invariant_1=invariant,_createClass$1=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Animated=function(){function e(){_classCallCheck$1(this,e)}return _createClass$1(e,[{key:"__attach",value:function(){}},{key:"__detach",value:function(){}},{key:"__getValue",value:function(){}},{key:"__getAnimatedValue",value:function(){return this.__getValue()}},{key:"__addChild",value:function(e){}},{key:"__removeChild",value:function(e){}},{key:"__getChildren",value:function(){return[]}}]),e}(),Animated_1=Animated,commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},_createClass$2=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$1(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$1(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedWithChildren=function(e){function t(){_classCallCheck$2(this,t);var e=_possibleConstructorReturn$1(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e._children=[],e}return _inherits$1(t,Animated_1),_createClass$2(t,[{key:"__addChild",value:function(e){0===this._children.length&&this.__attach(),this._children.push(e)}},{key:"__removeChild",value:function(e){var t=this._children.indexOf(e);-1!==t?(this._children.splice(t,1),0===this._children.length&&this.__detach()):console.warn("Trying to remove a child that doesn't exist")}},{key:"__getChildren",value:function(){return this._children}}]),t}(),AnimatedWithChildren_1=AnimatedWithChildren,InteractionManager={current:{createInteractionHandle:function(){},clearInteractionHandle:function(){}},inject:function(e){InteractionManager.current=e}},InteractionManager_1=InteractionManager;function normalizeColor(e){var t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=matchers.hex6.exec(e))?parseInt(t[1]+"ff",16)>>>0:names.hasOwnProperty(e)?names[e]:(t=matchers.rgb.exec(e))?(parse255(t[1])<<24|parse255(t[2])<<16|parse255(t[3])<<8|255)>>>0:(t=matchers.rgba.exec(e))?(parse255(t[1])<<24|parse255(t[2])<<16|parse255(t[3])<<8|parse1(t[4]))>>>0:(t=matchers.hex3.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=matchers.hex8.exec(e))?parseInt(t[1],16)>>>0:(t=matchers.hex4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=matchers.hsl.exec(e))?(255|hslToRgb(parse360(t[1]),parsePercentage(t[2]),parsePercentage(t[3])))>>>0:(t=matchers.hsla.exec(e))?(hslToRgb(parse360(t[1]),parsePercentage(t[2]),parsePercentage(t[3]))|parse1(t[4]))>>>0:null}function hue2rgb(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hslToRgb(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=hue2rgb(i,r,e+1/3),o=hue2rgb(i,r,e),s=hue2rgb(i,r,e-1/3);return Math.round(255*a)<<24|Math.round(255*o)<<16|Math.round(255*s)<<8}var NUMBER="[-+]?\\d*\\.?\\d+",PERCENTAGE=NUMBER+"%";function toArray(e){return Array.prototype.slice.call(e,0)}function call(){return"\\(\\s*("+toArray(arguments).join(")\\s*,\\s*(")+")\\s*\\)"}var matchers={rgb:new RegExp("rgb"+call(NUMBER,NUMBER,NUMBER)),rgba:new RegExp("rgba"+call(NUMBER,NUMBER,NUMBER,NUMBER)),hsl:new RegExp("hsl"+call(NUMBER,PERCENTAGE,PERCENTAGE)),hsla:new RegExp("hsla"+call(NUMBER,PERCENTAGE,PERCENTAGE,NUMBER)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/};function parse255(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function parse360(e){return(parseFloat(e)%360+360)%360/360}function parse1(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function parsePercentage(e){var t=parseFloat(e,10);return t<0?0:t>100?1:t/100}var names={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};function rgba(e){return{r:Math.round((4278190080&e)>>>24),g:Math.round((16711680&e)>>>16),b:Math.round((65280&e)>>>8),a:((255&e)>>>0)/255}}normalizeColor.rgba=rgba;var normalizeCssColor=normalizeColor,_extends$1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_createClass$3=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var linear=function(e){return e},Interpolation=function(){function e(){_classCallCheck$3(this,e)}return _createClass$3(e,null,[{key:"create",value:function(e){if(e.outputRange&&"string"==typeof e.outputRange[0])return createInterpolationFromStringOutputRange(e);var t=e.outputRange;checkInfiniteRange("outputRange",t);var n=e.inputRange;checkInfiniteRange("inputRange",n),checkValidInputRange(n),invariant_1(n.length===t.length,"inputRange ("+n.length+") and outputRange ("+t.length+") must have the same length");var r=e.easing||linear,i="extend";void 0!==e.extrapolateLeft?i=e.extrapolateLeft:void 0!==e.extrapolate&&(i=e.extrapolate);var a="extend";return void 0!==e.extrapolateRight?a=e.extrapolateRight:void 0!==e.extrapolate&&(a=e.extrapolate),function(e){invariant_1("number"==typeof e,"Cannot interpolation an input which is not a number");var o=findRange(e,n);return interpolate(e,n[o],n[o+1],t[o],t[o+1],r,i,a)}}}]),e}();function interpolate(e,t,n,r,i,a,o,s){var l=e;if(l<t){if("identity"===o)return l;"clamp"===o&&(l=t)}if(l>n){if("identity"===s)return l;"clamp"===s&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t),l=a(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r,l)}function colorToRgba(e){var t=normalizeCssColor(e);return null===t?e:"rgba("+((4278190080&(t=t||0))>>>24)+", "+((16711680&t)>>>16)+", "+((65280&t)>>>8)+", "+(255&t)/255+")"}var stringShapeRegex=/[0-9\.-]+/g;function createInterpolationFromStringOutputRange(e){var t=e.outputRange;invariant_1(t.length>=2,"Bad output range"),checkPattern(t=t.map(colorToRgba));var n=t[0].match(stringShapeRegex).map(function(){return[]});t.forEach(function(e){e.match(stringShapeRegex).forEach(function(e,t){n[t].push(+e)})});var r=t[0].match(stringShapeRegex).map(function(t,r){return Interpolation.create(_extends$1({},e,{outputRange:n[r]}))}),i=/^rgb/.test(t[0]);return function(e){var n=0;return t[0].replace(stringShapeRegex,function(){var t=r[n++](e);return String(i&&n<4?Math.round(t):t)})}}function checkPattern(e){for(var t=e[0].replace(stringShapeRegex,""),n=1;n<e.length;++n)invariant_1(t===e[n].replace(stringShapeRegex,""),"invalid pattern "+e[0]+" and "+e[n])}function findRange(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}function checkValidInputRange(e){invariant_1(e.length>=2,"inputRange must have at least 2 elements");for(var t=1;t<e.length;++t)invariant_1(e[t]>=e[t-1],"inputRange must be monotonically increasing "+e)}function checkInfiniteRange(e,t){invariant_1(t.length>=2,e+" must have at least 2 elements"),invariant_1(2!==t.length||t[0]!==-1/0||t[1]!==1/0,e+"cannot be ]-infinity;+infinity[ "+t)}var Interpolation_1=Interpolation,_uniqueId=0,guid$1=function(){return String(_uniqueId++)},_createClass$4=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$2(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$2(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedInterpolation=function(e){function t(e,n){_classCallCheck$4(this,t);var r=_possibleConstructorReturn$2(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._parent=e,r._interpolation=n,r._listeners={},r}return _inherits$2(t,AnimatedWithChildren_1),_createClass$4(t,[{key:"__getValue",value:function(){var e=this._parent.__getValue();return invariant_1("number"==typeof e,"Cannot interpolate an input which is not a number."),this._interpolation(e)}},{key:"addListener",value:function(e){var t=this;this._parentListener||(this._parentListener=this._parent.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})}));var n=guid$1();return this._listeners[n]=e,n}},{key:"removeListener",value:function(e){delete this._listeners[e]}},{key:"interpolate",value:function(e){return new t(this,Interpolation_1.create(e))}},{key:"__attach",value:function(){this._parent.__addChild(this)}},{key:"__detach",value:function(){this._parent.__removeChild(this),this._parentListener=this._parent.removeListener(this._parentListener)}}]),t}(),AnimatedInterpolation_1=AnimatedInterpolation,_createClass$5=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Animation=function(){function e(){_classCallCheck$5(this,e)}return _createClass$5(e,[{key:"start",value:function(e,t,n,r){}},{key:"stop",value:function(){}},{key:"__debouncedOnEnd",value:function(e){var t=this.__onEnd;this.__onEnd=null,t&&t(e)}}]),e}(),Animation_1=Animation;function SetPolyfill(){this._cache=[]}SetPolyfill.prototype.add=function(e){-1===this._cache.indexOf(e)&&this._cache.push(e)},SetPolyfill.prototype.forEach=function(e){this._cache.forEach(e)};var SetPolyfill_1=SetPolyfill,_createClass$6=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$3(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$3(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Set=commonjsGlobal.Set||SetPolyfill_1;function _flush(e){var t=new Set;!function e(n){"function"==typeof n.update?t.add(n):n.__getChildren().forEach(e)}(e),t.forEach(function(e){return e.update()})}var AnimatedValue=function(e){function t(e){_classCallCheck$6(this,t);var n=_possibleConstructorReturn$3(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._value=e,n._offset=0,n._animation=null,n._listeners={},n}return _inherits$3(t,AnimatedWithChildren_1),_createClass$6(t,[{key:"__detach",value:function(){this.stopAnimation()}},{key:"__getValue",value:function(){return this._value+this._offset}},{key:"setValue",value:function(e){this._animation&&(this._animation.stop(),this._animation=null),this._updateValue(e)}},{key:"setOffset",value:function(e){this._offset=e}},{key:"flattenOffset",value:function(){this._value+=this._offset,this._offset=0}},{key:"addListener",value:function(e){var t=guid$1();return this._listeners[t]=e,t}},{key:"removeListener",value:function(e){delete this._listeners[e]}},{key:"removeAllListeners",value:function(){this._listeners={}}},{key:"stopAnimation",value:function(e){this.stopTracking(),this._animation&&this._animation.stop(),this._animation=null,e&&e(this.__getValue())}},{key:"interpolate",value:function(e){return new AnimatedInterpolation_1(this,Interpolation_1.create(e))}},{key:"animate",value:function(e,t){var n=this,r=null;e.__isInteraction&&(r=InteractionManager_1.current.createInteractionHandle());var i=this._animation;this._animation&&this._animation.stop(),this._animation=e,e.start(this._value,function(e){n._updateValue(e)},function(e){n._animation=null,null!==r&&InteractionManager_1.current.clearInteractionHandle(r),t&&t(e)},i)}},{key:"stopTracking",value:function(){this._tracking&&this._tracking.__detach(),this._tracking=null}},{key:"track",value:function(e){this.stopTracking(),this._tracking=e}},{key:"_updateValue",value:function(e){for(var t in this._value=e,_flush(this),this._listeners)this._listeners[t]({value:this.__getValue()})}}]),t}(),AnimatedValue_1=AnimatedValue,_createClass$7=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$4(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$4(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedValueXY=function(e){function t(e){_classCallCheck$7(this,t);var n=_possibleConstructorReturn$4(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),r=e||{x:0,y:0};return"number"==typeof r.x&&"number"==typeof r.y?(n.x=new AnimatedValue_1(r.x),n.y=new AnimatedValue_1(r.y)):(invariant_1(r.x instanceof AnimatedValue_1&&r.y instanceof AnimatedValue_1,"AnimatedValueXY must be initalized with an object of numbers or AnimatedValues."),n.x=r.x,n.y=r.y),n._listeners={},n}return _inherits$4(t,AnimatedWithChildren_1),_createClass$7(t,[{key:"setValue",value:function(e){this.x.setValue(e.x),this.y.setValue(e.y)}},{key:"setOffset",value:function(e){this.x.setOffset(e.x),this.y.setOffset(e.y)}},{key:"flattenOffset",value:function(){this.x.flattenOffset(),this.y.flattenOffset()}},{key:"__getValue",value:function(){return{x:this.x.__getValue(),y:this.y.__getValue()}}},{key:"stopAnimation",value:function(e){this.x.stopAnimation(),this.y.stopAnimation(),e&&e(this.__getValue())}},{key:"addListener",value:function(e){var t=this,n=guid$1(),r=function(n){n.value;e(t.__getValue())};return this._listeners[n]={x:this.x.addListener(r),y:this.y.addListener(r)},n}},{key:"removeListener",value:function(e){this.x.removeListener(this._listeners[e].x),this.y.removeListener(this._listeners[e].y),delete this._listeners[e]}},{key:"getLayout",value:function(){return{left:this.x,top:this.y}}},{key:"getTranslateTransform",value:function(){return[{translateX:this.x},{translateY:this.y}]}}]),t}(),AnimatedValueXY_1=AnimatedValueXY,_createClass$8=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$5(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$5(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedAddition=function(e){function t(e,n){_classCallCheck$8(this,t);var r=_possibleConstructorReturn$5(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._a="number"==typeof e?new AnimatedValue_1(e):e,r._b="number"==typeof n?new AnimatedValue_1(n):n,r._listeners={},r}return _inherits$5(t,AnimatedWithChildren_1),_createClass$8(t,[{key:"__getValue",value:function(){return this._a.__getValue()+this._b.__getValue()}},{key:"addListener",value:function(e){var t=this;!this._aListener&&this._a.addListener&&(this._aListener=this._a.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})})),!this._bListener&&this._b.addListener&&(this._bListener=this._b.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})}));var n=guid();return this._listeners[n]=e,n}},{key:"removeListener",value:function(e){delete this._listeners[e]}},{key:"interpolate",value:function(e){return new AnimatedInterpolation_1(this,Interpolation_1.create(e))}},{key:"__attach",value:function(){this._a.__addChild(this),this._b.__addChild(this)}},{key:"__detach",value:function(){this._a.__removeChild(this),this._b.__removeChild(this)}}]),t}(),AnimatedAddition_1=AnimatedAddition,_createClass$9=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$6(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$6(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedMultiplication=function(e){function t(e,n){_classCallCheck$9(this,t);var r=_possibleConstructorReturn$6(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._a="number"==typeof e?new AnimatedValue_1(e):e,r._b="number"==typeof n?new AnimatedValue_1(n):n,r._listeners={},r}return _inherits$6(t,AnimatedWithChildren_1),_createClass$9(t,[{key:"__getValue",value:function(){return this._a.__getValue()*this._b.__getValue()}},{key:"addListener",value:function(e){var t=this;!this._aListener&&this._a.addListener&&(this._aListener=this._a.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})})),!this._bListener&&this._b.addListener&&(this._bListener=this._b.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})}));var n=guid();return this._listeners[n]=e,n}},{key:"removeListener",value:function(e){delete this._listeners[e]}},{key:"interpolate",value:function(e){return new AnimatedInterpolation_1(this,Interpolation_1.create(e))}},{key:"__attach",value:function(){this._a.__addChild(this),this._b.__addChild(this)}},{key:"__detach",value:function(){this._a.__removeChild(this),this._b.__removeChild(this)}}]),t}(),AnimatedMultiplication_1=AnimatedMultiplication,_createClass$10=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$10(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$7(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$7(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedModulo=function(e){function t(e,n){_classCallCheck$10(this,t);var r=_possibleConstructorReturn$7(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._a=e,r._modulus=n,r._listeners={},r}return _inherits$7(t,AnimatedWithChildren_1),_createClass$10(t,[{key:"__getValue",value:function(){return(this._a.__getValue()%this._modulus+this._modulus)%this._modulus}},{key:"addListener",value:function(e){var t=this;this._aListener||(this._aListener=this._a.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})}));var n=guid();return this._listeners[n]=e,n}},{key:"removeListener",value:function(e){delete this._listeners[e]}},{key:"interpolate",value:function(e){return new AnimatedInterpolation_1(this,Interpolation_1.create(e))}},{key:"__attach",value:function(){this._a.__addChild(this)}},{key:"__detach",value:function(){this._a.__removeChild(this)}}]),t}(),AnimatedModulo_1=AnimatedModulo,_createClass$11=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$11(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$8(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$8(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedTemplate=function(e){function t(e,n){_classCallCheck$11(this,t);var r=_possibleConstructorReturn$8(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._strings=e,r._values=n,r}return _inherits$8(t,AnimatedWithChildren_1),_createClass$11(t,[{key:"__transformValue",value:function(e){return e instanceof Animated_1?e.__getValue():e}},{key:"__getValue",value:function(){for(var e=this._strings[0],t=0;t<this._values.length;++t)e+=this.__transformValue(this._values[t])+this._strings[1+t];return e}},{key:"__attach",value:function(){for(var e=0;e<this._values.length;++e)this._values[e]instanceof Animated_1&&this._values[e].__addChild(this)}},{key:"__detach",value:function(){for(var e=0;e<this._values.length;++e)this._values[e]instanceof Animated_1&&this._values[e].__removeChild(this)}}]),t}(),AnimatedTemplate_1=AnimatedTemplate,_extends$2=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_createClass$12=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$12(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$9(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$9(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedTracking=function(e){function t(e,n,r,i,a){_classCallCheck$12(this,t);var o=_possibleConstructorReturn$9(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o._value=e,o._parent=n,o._animationClass=r,o._animationConfig=i,o._callback=a,o.__attach(),o}return _inherits$9(t,Animated_1),_createClass$12(t,[{key:"__getValue",value:function(){return this._parent.__getValue()}},{key:"__attach",value:function(){this._parent.__addChild(this)}},{key:"__detach",value:function(){this._parent.__removeChild(this)}},{key:"update",value:function(){this._value.animate(new this._animationClass(_extends$2({},this._animationConfig,{toValue:this._animationConfig.toValue.__getValue()})),this._callback)}}]),t}(),AnimatedTracking_1=AnimatedTracking;function isAnimated(e){return e instanceof Animated_1}var isAnimated_1=isAnimated,NEWTON_ITERATIONS=4,NEWTON_MIN_SLOPE=.001,SUBDIVISION_PRECISION=1e-7,SUBDIVISION_MAX_ITERATIONS=10,kSplineTableSize=11,kSampleStepSize=1/(kSplineTableSize-1),float32ArraySupported="function"==typeof Float32Array;function A(e,t){return 1-3*t+3*e}function B(e,t){return 3*t-6*e}function C(e){return 3*e}function calcBezier(e,t,n){return((A(t,n)*e+B(t,n))*e+C(t))*e}function getSlope(e,t,n){return 3*A(t,n)*e*e+2*B(t,n)*e+C(t)}function binarySubdivide(e,t,n,r,i){var a,o,s=0;do{(a=calcBezier(o=t+(n-t)/2,r,i)-e)>0?n=o:t=o}while(Math.abs(a)>SUBDIVISION_PRECISION&&++s<SUBDIVISION_MAX_ITERATIONS);return o}function newtonRaphsonIterate(e,t,n,r){for(var i=0;i<NEWTON_ITERATIONS;++i){var a=getSlope(t,n,r);if(0===a)return t;t-=(calcBezier(t,n,r)-e)/a}return t}var bezier=function(e,t,n,r){if(!(0<=e&&e<=1&&0<=n&&n<=1))throw new Error("bezier x values must be in [0, 1] range");var i=float32ArraySupported?new Float32Array(kSplineTableSize):new Array(kSplineTableSize);if(e!==t||n!==r)for(var a=0;a<kSplineTableSize;++a)i[a]=calcBezier(a*kSampleStepSize,e,n);return function(a){return e===t&&n===r?a:0===a?0:1===a?1:calcBezier(function(t){for(var r=0,a=1,o=kSplineTableSize-1;a!==o&&i[a]<=t;++a)r+=kSampleStepSize;var s=r+(t-i[--a])/(i[a+1]-i[a])*kSampleStepSize,l=getSlope(s,e,n);return l>=NEWTON_MIN_SLOPE?newtonRaphsonIterate(t,s,e,n):0===l?s:binarySubdivide(t,r,r+kSampleStepSize,e,n)}(a),t,r)}},_createClass$13=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$13(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Easing=function(){function e(){_classCallCheck$13(this,e)}return _createClass$13(e,null,[{key:"step0",value:function(e){return e>0?1:0}},{key:"step1",value:function(e){return e>=1?1:0}},{key:"linear",value:function(e){return e}},{key:"ease",value:function(e){return _ease(e)}},{key:"quad",value:function(e){return e*e}},{key:"cubic",value:function(e){return e*e*e}},{key:"poly",value:function(e){return function(t){return Math.pow(t,e)}}},{key:"sin",value:function(e){return 1-Math.cos(e*Math.PI/2)}},{key:"circle",value:function(e){return 1-Math.sqrt(1-e*e)}},{key:"exp",value:function(e){return Math.pow(2,10*(e-1))}},{key:"elastic",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)*Math.PI;return function(t){return 1-Math.pow(Math.cos(t*Math.PI/2),3)*Math.cos(t*e)}}},{key:"back",value:function(e){return void 0===e&&(e=1.70158),function(t){return t*t*((e+1)*t-e)}}},{key:"bounce",value:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}},{key:"bezier",value:function(e,t,n,r){return bezier(e,t,n,r)}},{key:"in",value:function(e){return e}},{key:"out",value:function(e){return function(t){return 1-e(1-t)}}},{key:"inOut",value:function(e){return function(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2}}}]),e}(),_ease=Easing.bezier(.42,0,1,1),Easing_1=Easing,RequestAnimationFrame={current:function(e){return commonjsGlobal.requestAnimationFrame(e)},inject:function(e){RequestAnimationFrame.current=e}},RequestAnimationFrame_1=RequestAnimationFrame,CancelAnimationFrame={current:function(e){return commonjsGlobal.cancelAnimationFrame(e)},inject:function(e){CancelAnimationFrame.current=e}},CancelAnimationFrame_1=CancelAnimationFrame,_createClass$14=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$14(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$10(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$10(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var easeInOut=Easing_1.inOut(Easing_1.ease),TimingAnimation=function(e){function t(e){_classCallCheck$14(this,t);var n=_possibleConstructorReturn$10(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._toValue=e.toValue,n._easing=void 0!==e.easing?e.easing:easeInOut,n._duration=void 0!==e.duration?e.duration:500,n._delay=void 0!==e.delay?e.delay:0,n.__isInteraction=void 0===e.isInteraction||e.isInteraction,n}return _inherits$10(t,Animation_1),_createClass$14(t,[{key:"start",value:function(e,t,n){var r=this;this.__active=!0,this._fromValue=e,this._onUpdate=t,this.__onEnd=n;var i=function(){0===r._duration?(r._onUpdate(r._toValue),r.__debouncedOnEnd({finished:!0})):(r._startTime=Date.now(),r._animationFrame=RequestAnimationFrame_1.current(r.onUpdate.bind(r)))};this._delay?this._timeout=setTimeout(i,this._delay):i()}},{key:"onUpdate",value:function(){var e=Date.now();if(e>=this._startTime+this._duration)return 0===this._duration?this._onUpdate(this._toValue):this._onUpdate(this._fromValue+this._easing(1)*(this._toValue-this._fromValue)),void this.__debouncedOnEnd({finished:!0});this._onUpdate(this._fromValue+this._easing((e-this._startTime)/this._duration)*(this._toValue-this._fromValue)),this.__active&&(this._animationFrame=RequestAnimationFrame_1.current(this.onUpdate.bind(this)))}},{key:"stop",value:function(){this.__active=!1,clearTimeout(this._timeout),CancelAnimationFrame_1.current(this._animationFrame),this.__debouncedOnEnd({finished:!1})}}]),t}(),TimingAnimation_1=TimingAnimation,_createClass$15=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$15(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$11(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$11(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var DecayAnimation=function(e){function t(e){_classCallCheck$15(this,t);var n=_possibleConstructorReturn$11(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._deceleration=void 0!==e.deceleration?e.deceleration:.998,n._velocity=e.velocity,n.__isInteraction=void 0===e.isInteraction||e.isInteraction,n}return _inherits$11(t,Animation_1),_createClass$15(t,[{key:"start",value:function(e,t,n){this.__active=!0,this._lastValue=e,this._fromValue=e,this._onUpdate=t,this.__onEnd=n,this._startTime=Date.now(),this._animationFrame=RequestAnimationFrame_1.current(this.onUpdate.bind(this))}},{key:"onUpdate",value:function(){var e=Date.now(),t=this._fromValue+this._velocity/(1-this._deceleration)*(1-Math.exp(-(1-this._deceleration)*(e-this._startTime)));this._onUpdate(t),Math.abs(this._lastValue-t)<.1?this.__debouncedOnEnd({finished:!0}):(this._lastValue=t,this.__active&&(this._animationFrame=RequestAnimationFrame_1.current(this.onUpdate.bind(this))))}},{key:"stop",value:function(){this.__active=!1,CancelAnimationFrame_1.current(this._animationFrame),this.__debouncedOnEnd({finished:!1})}}]),t}(),DecayAnimation_1=DecayAnimation;function tensionFromOrigamiValue(e){return 3.62*(e-30)+194}function frictionFromOrigamiValue(e){return 3*(e-8)+25}function fromOrigamiTensionAndFriction(e,t){return{tension:tensionFromOrigamiValue(e),friction:frictionFromOrigamiValue(t)}}function fromBouncinessAndSpeed(e,t){function n(e,t,n){return(e-t)/(n-t)}function r(e,t,n){return t+e*(n-t)}var i=n(e/1.7,0,20);i=r(i,0,.8);var a,o,s,l,u=r(n(t/1.7,0,20),.5,200),c=(a=i,o=(s=u)<=18?(l=s,7e-4*Math.pow(l,3)-.031*Math.pow(l,2)+.64*l+1.28):s>18&&s<=44?function(e){return 44e-6*Math.pow(e,3)-.006*Math.pow(e,2)+.36*e+2}(s):function(e){return 4.5e-7*Math.pow(e,3)-332e-6*Math.pow(e,2)+.1078*e+5.84}(s),function(e,t,n){return e*n+(1-e)*t}(2*a-a*a,o,.01));return{tension:tensionFromOrigamiValue(u),friction:frictionFromOrigamiValue(c)}}var SpringConfig={fromOrigamiTensionAndFriction:fromOrigamiTensionAndFriction,fromBouncinessAndSpeed:fromBouncinessAndSpeed},_createClass$16=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$16(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$12(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$12(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function withDefault(e,t){return void 0===e||null===e?t:e}var SpringAnimation=function(e){function t(e){_classCallCheck$16(this,t);var n,r=_possibleConstructorReturn$12(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._overshootClamping=withDefault(e.overshootClamping,!1),r._restDisplacementThreshold=withDefault(e.restDisplacementThreshold,.001),r._restSpeedThreshold=withDefault(e.restSpeedThreshold,.001),r._initialVelocity=e.velocity,r._lastVelocity=withDefault(e.velocity,0),r._toValue=e.toValue,r.__isInteraction=void 0===e.isInteraction||e.isInteraction,void 0!==e.bounciness||void 0!==e.speed?(invariant_1(void 0===e.tension&&void 0===e.friction,"You can only define bounciness/speed or tension/friction but not both"),n=SpringConfig.fromBouncinessAndSpeed(withDefault(e.bounciness,8),withDefault(e.speed,12))):n=SpringConfig.fromOrigamiTensionAndFriction(withDefault(e.tension,40),withDefault(e.friction,7)),r._tension=n.tension,r._friction=n.friction,r}return _inherits$12(t,Animation_1),_createClass$16(t,[{key:"start",value:function(e,n,r,i){if(this.__active=!0,this._startPosition=e,this._lastPosition=this._startPosition,this._onUpdate=n,this.__onEnd=r,this._lastTime=Date.now(),i instanceof t){var a=i.getInternalState();this._lastPosition=a.lastPosition,this._lastVelocity=a.lastVelocity,this._lastTime=a.lastTime}void 0!==this._initialVelocity&&null!==this._initialVelocity&&(this._lastVelocity=this._initialVelocity),this.onUpdate()}},{key:"getInternalState",value:function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}}},{key:"onUpdate",value:function(){var e=this._lastPosition,t=this._lastVelocity,n=this._lastPosition,r=this._lastVelocity,i=Date.now();i>this._lastTime+64&&(i=this._lastTime+64);for(var a=Math.floor((i-this._lastTime)/1),o=0;o<a;++o){var s=t,l=this._tension*(this._toValue-n)-this._friction*r,u=(n=e+.001*s/2,r=t+.001*l/2),c=this._tension*(this._toValue-n)-this._friction*r;n=e+.001*u/2;var f=r=t+.001*c/2,_=this._tension*(this._toValue-n)-this._friction*r;n=e+.001*f/2;var h=r=t+.001*_/2,p=this._tension*(this._toValue-n)-this._friction*r;n=e+.001*f/2,r=t+.001*_/2,e+=.001*((s+2*(u+f)+h)/6),t+=.001*((l+2*(c+_)+p)/6)}if(this._lastTime=i,this._lastPosition=e,this._lastVelocity=t,this._onUpdate(e),this.__active){var d=!1;this._overshootClamping&&0!==this._tension&&(d=this._startPosition<this._toValue?e>this._toValue:e<this._toValue);var m=Math.abs(t)<=this._restSpeedThreshold,y=!0;if(0!==this._tension&&(y=Math.abs(this._toValue-e)<=this._restDisplacementThreshold),d||m&&y)return 0!==this._tension&&this._onUpdate(this._toValue),void this.__debouncedOnEnd({finished:!0});this._animationFrame=RequestAnimationFrame_1.current(this.onUpdate.bind(this))}}},{key:"stop",value:function(){this.__active=!1,CancelAnimationFrame_1.current(this._animationFrame),this.__debouncedOnEnd({finished:!1})}}]),t}(),SpringAnimation_1=SpringAnimation,_createClass$17=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$17(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$13(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$13(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedTransform=function(e){function t(e){_classCallCheck$17(this,t);var n=_possibleConstructorReturn$13(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._transforms=e,n}return _inherits$13(t,AnimatedWithChildren_1),_createClass$17(t,[{key:"__getValue",value:function(){return this._transforms.map(function(e){var t={};for(var n in e){var r=e[n];t[n]=r instanceof Animated_1?r.__getValue():r}return t})}},{key:"__getAnimatedValue",value:function(){return this._transforms.map(function(e){var t={};for(var n in e){var r=e[n];t[n]=r instanceof Animated_1?r.__getAnimatedValue():r}return t})}},{key:"__attach",value:function(){var e=this;this._transforms.forEach(function(t){for(var n in t){var r=t[n];r instanceof Animated_1&&r.__addChild(e)}})}},{key:"__detach",value:function(){var e=this;this._transforms.forEach(function(t){for(var n in t){var r=t[n];r instanceof Animated_1&&r.__removeChild(e)}})}}]),t}(),AnimatedTransform_1=AnimatedTransform,FlattenStyle={current:function(e){return e},inject:function(e){FlattenStyle.current=e}},FlattenStyle_1=FlattenStyle,_extends$3=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_createClass$18=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$18(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$14(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$14(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedStyle=function(e){function t(e){_classCallCheck$18(this,t);var n=_possibleConstructorReturn$14(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return!(e=FlattenStyle_1.current(e)||{}).transform||e.transform instanceof Animated_1||(e=_extends$3({},e,{transform:new AnimatedTransform_1(e.transform)})),n._style=e,n}return _inherits$14(t,AnimatedWithChildren_1),_createClass$18(t,[{key:"__getValue",value:function(){var e={};for(var t in this._style){var n=this._style[t];e[t]=n instanceof Animated_1?n.__getValue():n}return e}},{key:"__getAnimatedValue",value:function(){var e={};for(var t in this._style){var n=this._style[t];n instanceof Animated_1&&(e[t]=n.__getAnimatedValue())}return e}},{key:"__attach",value:function(){for(var e in this._style){var t=this._style[e];t instanceof Animated_1&&t.__addChild(this)}}},{key:"__detach",value:function(){for(var e in this._style){var t=this._style[e];t instanceof Animated_1&&t.__removeChild(this)}}}]),t}(),AnimatedStyle_1=AnimatedStyle,_extends$4=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_createClass$19=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$19(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$15(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$15(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedProps=function(e){function t(e,n){_classCallCheck$19(this,t);var r=_possibleConstructorReturn$15(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.style&&(e=_extends$4({},e,{style:new AnimatedStyle_1(e.style)})),r._props=e,r._callback=n,r.__attach(),r}return _inherits$15(t,Animated_1),_createClass$19(t,[{key:"__getValue",value:function(){var e={};for(var t in this._props){var n=this._props[t];e[t]=n instanceof Animated_1?n.__getValue():n}return e}},{key:"__getAnimatedValue",value:function(){var e={};for(var t in this._props){var n=this._props[t];n instanceof Animated_1&&(e[t]=n.__getAnimatedValue())}return e}},{key:"__attach",value:function(){for(var e in this._props){var t=this._props[e];t instanceof Animated_1&&t.__addChild(this)}}},{key:"__detach",value:function(){for(var e in this._props){var t=this._props[e];t instanceof Animated_1&&t.__removeChild(this)}}},{key:"update",value:function(){this._callback()}}]),t}(),AnimatedProps_1=AnimatedProps,ApplyAnimatedValues={current:function(e,t){if(!e.setNativeProps)return!1;e.setNativeProps(t)},transformStyles:function(e){return e},inject:function(e,t){ApplyAnimatedValues.current=e,ApplyAnimatedValues.transformStyles=t}},ApplyAnimatedValues_1=ApplyAnimatedValues,_extends$5=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_jsxFileName="src/createAnimatedComponent.js",_createClass$20=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _objectWithoutProperties$1(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function _classCallCheck$20(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$16(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$16(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function createAnimatedComponent(e){var t=function(t){function n(){return _classCallCheck$20(this,n),_possibleConstructorReturn$16(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return _inherits$16(n,React.Component),_createClass$20(n,[{key:"componentWillUnmount",value:function(){this._propsAnimated&&this._propsAnimated.__detach()}},{key:"setNativeProps",value:function(e){!1===ApplyAnimatedValues_1.current(this.refs.node,e,this)&&this.forceUpdate()}},{key:"componentWillMount",value:function(){this.attachProps(this.props)}},{key:"attachProps",value:function(e){var t=this,n=this._propsAnimated;this._propsAnimated=new AnimatedProps_1(e,function(){!1===ApplyAnimatedValues_1.current(t.refs.node,t._propsAnimated.__getAnimatedValue(),t)&&t.forceUpdate()}),n&&n.__detach()}},{key:"componentWillReceiveProps",value:function(e){this.attachProps(e)}},{key:"render",value:function(){var t=this._propsAnimated.__getValue(),n=t.style,r=_objectWithoutProperties$1(t,["style"]);return React.createElement(e,_extends$5({},r,{style:ApplyAnimatedValues_1.transformStyles(n),ref:"node",__source:{fileName:_jsxFileName,lineNumber:78}}))}}]),n}();return"production"!==process.env.NODE_ENV&&(t.propTypes={style:function(t,n,r){e.propTypes}}),t}var createAnimatedComponent_1=createAnimatedComponent,_extends$6=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},maybeVectorAnim=function(e,t,n){if(e instanceof AnimatedValueXY_1){var r=_extends$6({},t),i=_extends$6({},t);for(var a in t){var o=t[a],s=o.x,l=o.y;void 0!==s&&void 0!==l&&(r[a]=s,i[a]=l)}var u=n(e.x,r),c=n(e.y,i);return parallel([u,c],{stopTogether:!1})}return null},spring=function e(t,n){return maybeVectorAnim(t,n,e)||{start:function(e){var r=t,i=n;r.stopTracking(),n.toValue instanceof Animated_1?r.track(new AnimatedTracking_1(r,n.toValue,SpringAnimation_1,i,e)):r.animate(new SpringAnimation_1(i),e)},stop:function(){t.stopAnimation()}}},timing=function e(t,n){return maybeVectorAnim(t,n,e)||{start:function(e){var r=t,i=n;r.stopTracking(),n.toValue instanceof Animated_1?r.track(new AnimatedTracking_1(r,n.toValue,TimingAnimation_1,i,e)):r.animate(new TimingAnimation_1(i),e)},stop:function(){t.stopAnimation()}}},decay=function e(t,n){return maybeVectorAnim(t,n,e)||{start:function(e){var r=t,i=n;r.stopTracking(),r.animate(new DecayAnimation_1(i),e)},stop:function(){t.stopAnimation()}}},sequence=function(e){var t=0;return{start:function(n){0===e.length?n&&n({finished:!0}):e[t].start(function r(i){i.finished&&++t!==e.length?e[t].start(r):n&&n(i)})},stop:function(){t<e.length&&e[t].stop()}}},parallel=function(e,t){var n=0,r={},i=!(t&&!1===t.stopTogether),a={start:function(t){n!==e.length?e.forEach(function(o,s){var l=function(o){if(r[s]=!0,++n===e.length)return n=0,void(t&&t(o));!o.finished&&i&&a.stop()};o?o.start(l):l({finished:!0})}):t&&t({finished:!0})},stop:function(){e.forEach(function(e,t){!r[t]&&e.stop(),r[t]=!0})}};return a},delay=function(e){return timing(new AnimatedValue_1(0),{toValue:0,delay:e,duration:0})},stagger=function(e,t){return parallel(t.map(function(t,n){return sequence([delay(e*n),t])}))},event=function(e,t){return function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];e.forEach(function(e,t){!function e(t,n,r){if("number"==typeof n)return invariant_1(t instanceof AnimatedValue_1,"Bad mapping of type "+typeof t+" for key "+r+", event value must map to AnimatedValue"),void t.setValue(n);for(var r in invariant_1("object"==typeof t,"Bad mapping of type "+typeof t+" for key "+r),invariant_1("object"==typeof n,"Bad event of type "+typeof n+" for key "+r),t)e(t[r],n[r],r)}(e,r[t],"arg"+t)}),t&&t.listener&&t.listener.apply(null,r)}},lib={Value:AnimatedValue_1,ValueXY:AnimatedValueXY_1,decay:decay,timing:timing,spring:spring,add:function(e,t){return new AnimatedAddition_1(e,t)},multiply:function(e,t){return new AnimatedMultiplication_1(e,t)},modulo:function(e,t){return new AnimatedModulo_1(e,t)},template:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new AnimatedTemplate_1(e,n)},delay:delay,sequence:sequence,parallel:parallel,stagger:stagger,event:event,isAnimated:isAnimated_1,createAnimatedComponent:createAnimatedComponent_1,inject:{ApplyAnimatedValues:ApplyAnimatedValues_1.inject,InteractionManager:InteractionManager_1.inject,FlattenStyle:FlattenStyle_1.inject,RequestAnimationFrame:RequestAnimationFrame_1.inject,CancelAnimationFrame:CancelAnimationFrame_1.inject},__PropsOnlyForTests:AnimatedProps_1},_extends$7=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},transformWithLengthUnits={translateX:!0,translateY:!0,translateZ:!0,perspective:!0};function mapTransform(e){var t=Object.keys(e)[0],n=transformWithLengthUnits[t]&&"number"==typeof e[t]?"px":"";return t+"("+e[t]+n+")"}var isUnitlessNumber={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function prefixKey(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var prefixes=["Webkit","ms","Moz","O"];function mapStyle(e){return e&&e.transform&&"string"!=typeof e.transform&&(e.transform=e.transform.map(mapTransform).join(" ")),e}function dangerousStyleValue(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||isUnitlessNumber.hasOwnProperty(e)&&isUnitlessNumber[e]?(""+t).trim():t+"px"}function setValueForStyles(e,t){var n=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=0===r.indexOf("--"),a=dangerousStyleValue(r,t[r],i);"float"===r&&(r="cssFloat"),i?n.setProperty(r,a):n[r]=a}}function ApplyAnimatedValues$2(e,t){if(e.setNativeProps)e.setNativeProps(t);else{if(!e.nodeType||void 0===e.setAttribute)return!1;setValueForStyles(e,mapStyle(t.style))}}Object.keys(isUnitlessNumber).forEach(function(e){prefixes.forEach(function(t){isUnitlessNumber[prefixKey(t,e)]=isUnitlessNumber[e]})}),lib.inject.ApplyAnimatedValues(ApplyAnimatedValues$2,mapStyle);var reactDom=_extends$7({},lib,{div:lib.createAnimatedComponent("div"),span:lib.createAnimatedComponent("span"),img:lib.createAnimatedComponent("img")});function createAnimatedValue(e,t,n){var r=new reactDom.Value(0);return{name:e,animation:r,interpolate:r.interpolate({inputRange:[0,1],outputRange:[t,n]})}}var Spring=function(e){function t(t){var n;n=e.call(this)||this,_initialiseProps.call(_assertThisInitialized(n));var r=t.children,i=t.to,a=t.from;return n.component=reactDom.createAnimatedComponent(r),n.animations=Object.entries(i).map(function(e){var t=e[0],n=e[1];return createAnimatedValue(t,void 0!==a[t]?a[t]:n,n)}),n.to=n.animations.reduce(function(e,t){var n;return _extends({},e,((n={})[t.name]=t.interpolate,n))},{}),n}_inheritsLoose(t,e);var n=t.prototype;return n.componentWillReceiveProps=function(e){this.update(e)},n.componentWillMount=function(){var e=this;this.animations.forEach(function(t){return e.props.interpolator(t.animation,{toValue:1}).start()})},n.render=function(){return React.createElement(this.component,this.to)},t}(React.PureComponent);Spring.defaultProps={to:{},from:{},interpolator:reactDom.spring};var _initialiseProps=function(){var e=this;this.update=function(t){var n=t.to,r=(t.from,t.interpolator),i=e.animations,a=Array.isArray(i),o=0;for(i=a?i:i[Symbol.iterator]();;){var s;if(a){if(o>=i.length)break;s=i[o++]}else{if((o=i.next()).done)break;s=o.value}var l=s,u=l.animation._value;l.animation.stopAnimation(),n[l.name]!==l.to&&(l.animation=new reactDom.Value(0),l.interpolate=l.animation.interpolate({inputRange:[0,1],outputRange:[l.interpolate._interpolation(u),n[l.name]]}),r(l.animation,{toValue:1}).start())}e.to=e.animations.reduce(function(e,t){var n;return _extends({},e,((n={})[t.name]=t.interpolate,n))},{})}};"production"!==process.env.NODE_ENV&&(Spring.propTypes={to:PropTypes.object,from:PropTypes.object,interpolator:PropTypes.func}),module.exports=Spring;
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var React=_interopDefault(require("react")),PropTypes=_interopDefault(require("prop-types"));function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function _objectWithoutProperties(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var NODE_ENV=process.env.NODE_ENV,invariant=function(e,t,n,r,i,a,o,s){if("production"!==NODE_ENV&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,a,o,s],c=0;(l=new Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}},invariant_1=invariant,_createClass$1=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Animated=function(){function e(){_classCallCheck$1(this,e)}return _createClass$1(e,[{key:"__attach",value:function(){}},{key:"__detach",value:function(){}},{key:"__getValue",value:function(){}},{key:"__getAnimatedValue",value:function(){return this.__getValue()}},{key:"__addChild",value:function(e){}},{key:"__removeChild",value:function(e){}},{key:"__getChildren",value:function(){return[]}}]),e}(),Animated_1=Animated,commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},_createClass$2=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$1(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$1(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedWithChildren=function(e){function t(){_classCallCheck$2(this,t);var e=_possibleConstructorReturn$1(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e._children=[],e}return _inherits$1(t,Animated_1),_createClass$2(t,[{key:"__addChild",value:function(e){0===this._children.length&&this.__attach(),this._children.push(e)}},{key:"__removeChild",value:function(e){var t=this._children.indexOf(e);-1!==t?(this._children.splice(t,1),0===this._children.length&&this.__detach()):console.warn("Trying to remove a child that doesn't exist")}},{key:"__getChildren",value:function(){return this._children}}]),t}(),AnimatedWithChildren_1=AnimatedWithChildren,InteractionManager={current:{createInteractionHandle:function(){},clearInteractionHandle:function(){}},inject:function(e){InteractionManager.current=e}},InteractionManager_1=InteractionManager;function normalizeColor(e){var t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=matchers.hex6.exec(e))?parseInt(t[1]+"ff",16)>>>0:names.hasOwnProperty(e)?names[e]:(t=matchers.rgb.exec(e))?(parse255(t[1])<<24|parse255(t[2])<<16|parse255(t[3])<<8|255)>>>0:(t=matchers.rgba.exec(e))?(parse255(t[1])<<24|parse255(t[2])<<16|parse255(t[3])<<8|parse1(t[4]))>>>0:(t=matchers.hex3.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=matchers.hex8.exec(e))?parseInt(t[1],16)>>>0:(t=matchers.hex4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=matchers.hsl.exec(e))?(255|hslToRgb(parse360(t[1]),parsePercentage(t[2]),parsePercentage(t[3])))>>>0:(t=matchers.hsla.exec(e))?(hslToRgb(parse360(t[1]),parsePercentage(t[2]),parsePercentage(t[3]))|parse1(t[4]))>>>0:null}function hue2rgb(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hslToRgb(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=hue2rgb(i,r,e+1/3),o=hue2rgb(i,r,e),s=hue2rgb(i,r,e-1/3);return Math.round(255*a)<<24|Math.round(255*o)<<16|Math.round(255*s)<<8}var NUMBER="[-+]?\\d*\\.?\\d+",PERCENTAGE=NUMBER+"%";function toArray(e){return Array.prototype.slice.call(e,0)}function call(){return"\\(\\s*("+toArray(arguments).join(")\\s*,\\s*(")+")\\s*\\)"}var matchers={rgb:new RegExp("rgb"+call(NUMBER,NUMBER,NUMBER)),rgba:new RegExp("rgba"+call(NUMBER,NUMBER,NUMBER,NUMBER)),hsl:new RegExp("hsl"+call(NUMBER,PERCENTAGE,PERCENTAGE)),hsla:new RegExp("hsla"+call(NUMBER,PERCENTAGE,PERCENTAGE,NUMBER)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/};function parse255(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function parse360(e){return(parseFloat(e)%360+360)%360/360}function parse1(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function parsePercentage(e){var t=parseFloat(e,10);return t<0?0:t>100?1:t/100}var names={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};function rgba(e){return{r:Math.round((4278190080&e)>>>24),g:Math.round((16711680&e)>>>16),b:Math.round((65280&e)>>>8),a:((255&e)>>>0)/255}}normalizeColor.rgba=rgba;var normalizeCssColor=normalizeColor,_extends$1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_createClass$3=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var linear=function(e){return e},Interpolation=function(){function e(){_classCallCheck$3(this,e)}return _createClass$3(e,null,[{key:"create",value:function(e){if(e.outputRange&&"string"==typeof e.outputRange[0])return createInterpolationFromStringOutputRange(e);var t=e.outputRange;checkInfiniteRange("outputRange",t);var n=e.inputRange;checkInfiniteRange("inputRange",n),checkValidInputRange(n),invariant_1(n.length===t.length,"inputRange ("+n.length+") and outputRange ("+t.length+") must have the same length");var r=e.easing||linear,i="extend";void 0!==e.extrapolateLeft?i=e.extrapolateLeft:void 0!==e.extrapolate&&(i=e.extrapolate);var a="extend";return void 0!==e.extrapolateRight?a=e.extrapolateRight:void 0!==e.extrapolate&&(a=e.extrapolate),function(e){invariant_1("number"==typeof e,"Cannot interpolation an input which is not a number");var o=findRange(e,n);return interpolate(e,n[o],n[o+1],t[o],t[o+1],r,i,a)}}}]),e}();function interpolate(e,t,n,r,i,a,o,s){var l=e;if(l<t){if("identity"===o)return l;"clamp"===o&&(l=t)}if(l>n){if("identity"===s)return l;"clamp"===s&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t),l=a(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r,l)}function colorToRgba(e){var t=normalizeCssColor(e);return null===t?e:"rgba("+((4278190080&(t=t||0))>>>24)+", "+((16711680&t)>>>16)+", "+((65280&t)>>>8)+", "+(255&t)/255+")"}var stringShapeRegex=/[0-9\.-]+/g;function createInterpolationFromStringOutputRange(e){var t=e.outputRange;invariant_1(t.length>=2,"Bad output range"),checkPattern(t=t.map(colorToRgba));var n=t[0].match(stringShapeRegex).map(function(){return[]});t.forEach(function(e){e.match(stringShapeRegex).forEach(function(e,t){n[t].push(+e)})});var r=t[0].match(stringShapeRegex).map(function(t,r){return Interpolation.create(_extends$1({},e,{outputRange:n[r]}))}),i=/^rgb/.test(t[0]);return function(e){var n=0;return t[0].replace(stringShapeRegex,function(){var t=r[n++](e);return String(i&&n<4?Math.round(t):t)})}}function checkPattern(e){for(var t=e[0].replace(stringShapeRegex,""),n=1;n<e.length;++n)invariant_1(t===e[n].replace(stringShapeRegex,""),"invalid pattern "+e[0]+" and "+e[n])}function findRange(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}function checkValidInputRange(e){invariant_1(e.length>=2,"inputRange must have at least 2 elements");for(var t=1;t<e.length;++t)invariant_1(e[t]>=e[t-1],"inputRange must be monotonically increasing "+e)}function checkInfiniteRange(e,t){invariant_1(t.length>=2,e+" must have at least 2 elements"),invariant_1(2!==t.length||t[0]!==-1/0||t[1]!==1/0,e+"cannot be ]-infinity;+infinity[ "+t)}var Interpolation_1=Interpolation,_uniqueId=0,guid$1=function(){return String(_uniqueId++)},_createClass$4=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$2(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$2(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedInterpolation=function(e){function t(e,n){_classCallCheck$4(this,t);var r=_possibleConstructorReturn$2(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._parent=e,r._interpolation=n,r._listeners={},r}return _inherits$2(t,AnimatedWithChildren_1),_createClass$4(t,[{key:"__getValue",value:function(){var e=this._parent.__getValue();return invariant_1("number"==typeof e,"Cannot interpolate an input which is not a number."),this._interpolation(e)}},{key:"addListener",value:function(e){var t=this;this._parentListener||(this._parentListener=this._parent.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})}));var n=guid$1();return this._listeners[n]=e,n}},{key:"removeListener",value:function(e){delete this._listeners[e]}},{key:"interpolate",value:function(e){return new t(this,Interpolation_1.create(e))}},{key:"__attach",value:function(){this._parent.__addChild(this)}},{key:"__detach",value:function(){this._parent.__removeChild(this),this._parentListener=this._parent.removeListener(this._parentListener)}}]),t}(),AnimatedInterpolation_1=AnimatedInterpolation,_createClass$5=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Animation=function(){function e(){_classCallCheck$5(this,e)}return _createClass$5(e,[{key:"start",value:function(e,t,n,r){}},{key:"stop",value:function(){}},{key:"__debouncedOnEnd",value:function(e){var t=this.__onEnd;this.__onEnd=null,t&&t(e)}}]),e}(),Animation_1=Animation;function SetPolyfill(){this._cache=[]}SetPolyfill.prototype.add=function(e){-1===this._cache.indexOf(e)&&this._cache.push(e)},SetPolyfill.prototype.forEach=function(e){this._cache.forEach(e)};var SetPolyfill_1=SetPolyfill,_createClass$6=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$3(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$3(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Set=commonjsGlobal.Set||SetPolyfill_1;function _flush(e){var t=new Set;!function e(n){"function"==typeof n.update?t.add(n):n.__getChildren().forEach(e)}(e),t.forEach(function(e){return e.update()})}var AnimatedValue=function(e){function t(e){_classCallCheck$6(this,t);var n=_possibleConstructorReturn$3(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._value=e,n._offset=0,n._animation=null,n._listeners={},n}return _inherits$3(t,AnimatedWithChildren_1),_createClass$6(t,[{key:"__detach",value:function(){this.stopAnimation()}},{key:"__getValue",value:function(){return this._value+this._offset}},{key:"setValue",value:function(e){this._animation&&(this._animation.stop(),this._animation=null),this._updateValue(e)}},{key:"setOffset",value:function(e){this._offset=e}},{key:"flattenOffset",value:function(){this._value+=this._offset,this._offset=0}},{key:"addListener",value:function(e){var t=guid$1();return this._listeners[t]=e,t}},{key:"removeListener",value:function(e){delete this._listeners[e]}},{key:"removeAllListeners",value:function(){this._listeners={}}},{key:"stopAnimation",value:function(e){this.stopTracking(),this._animation&&this._animation.stop(),this._animation=null,e&&e(this.__getValue())}},{key:"interpolate",value:function(e){return new AnimatedInterpolation_1(this,Interpolation_1.create(e))}},{key:"animate",value:function(e,t){var n=this,r=null;e.__isInteraction&&(r=InteractionManager_1.current.createInteractionHandle());var i=this._animation;this._animation&&this._animation.stop(),this._animation=e,e.start(this._value,function(e){n._updateValue(e)},function(e){n._animation=null,null!==r&&InteractionManager_1.current.clearInteractionHandle(r),t&&t(e)},i)}},{key:"stopTracking",value:function(){this._tracking&&this._tracking.__detach(),this._tracking=null}},{key:"track",value:function(e){this.stopTracking(),this._tracking=e}},{key:"_updateValue",value:function(e){for(var t in this._value=e,_flush(this),this._listeners)this._listeners[t]({value:this.__getValue()})}}]),t}(),AnimatedValue_1=AnimatedValue,_createClass$7=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$4(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$4(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedValueXY=function(e){function t(e){_classCallCheck$7(this,t);var n=_possibleConstructorReturn$4(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),r=e||{x:0,y:0};return"number"==typeof r.x&&"number"==typeof r.y?(n.x=new AnimatedValue_1(r.x),n.y=new AnimatedValue_1(r.y)):(invariant_1(r.x instanceof AnimatedValue_1&&r.y instanceof AnimatedValue_1,"AnimatedValueXY must be initalized with an object of numbers or AnimatedValues."),n.x=r.x,n.y=r.y),n._listeners={},n}return _inherits$4(t,AnimatedWithChildren_1),_createClass$7(t,[{key:"setValue",value:function(e){this.x.setValue(e.x),this.y.setValue(e.y)}},{key:"setOffset",value:function(e){this.x.setOffset(e.x),this.y.setOffset(e.y)}},{key:"flattenOffset",value:function(){this.x.flattenOffset(),this.y.flattenOffset()}},{key:"__getValue",value:function(){return{x:this.x.__getValue(),y:this.y.__getValue()}}},{key:"stopAnimation",value:function(e){this.x.stopAnimation(),this.y.stopAnimation(),e&&e(this.__getValue())}},{key:"addListener",value:function(e){var t=this,n=guid$1(),r=function(n){n.value;e(t.__getValue())};return this._listeners[n]={x:this.x.addListener(r),y:this.y.addListener(r)},n}},{key:"removeListener",value:function(e){this.x.removeListener(this._listeners[e].x),this.y.removeListener(this._listeners[e].y),delete this._listeners[e]}},{key:"getLayout",value:function(){return{left:this.x,top:this.y}}},{key:"getTranslateTransform",value:function(){return[{translateX:this.x},{translateY:this.y}]}}]),t}(),AnimatedValueXY_1=AnimatedValueXY,_createClass$8=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$5(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$5(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedAddition=function(e){function t(e,n){_classCallCheck$8(this,t);var r=_possibleConstructorReturn$5(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._a="number"==typeof e?new AnimatedValue_1(e):e,r._b="number"==typeof n?new AnimatedValue_1(n):n,r._listeners={},r}return _inherits$5(t,AnimatedWithChildren_1),_createClass$8(t,[{key:"__getValue",value:function(){return this._a.__getValue()+this._b.__getValue()}},{key:"addListener",value:function(e){var t=this;!this._aListener&&this._a.addListener&&(this._aListener=this._a.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})})),!this._bListener&&this._b.addListener&&(this._bListener=this._b.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})}));var n=guid();return this._listeners[n]=e,n}},{key:"removeListener",value:function(e){delete this._listeners[e]}},{key:"interpolate",value:function(e){return new AnimatedInterpolation_1(this,Interpolation_1.create(e))}},{key:"__attach",value:function(){this._a.__addChild(this),this._b.__addChild(this)}},{key:"__detach",value:function(){this._a.__removeChild(this),this._b.__removeChild(this)}}]),t}(),AnimatedAddition_1=AnimatedAddition,_createClass$9=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$6(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$6(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedMultiplication=function(e){function t(e,n){_classCallCheck$9(this,t);var r=_possibleConstructorReturn$6(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._a="number"==typeof e?new AnimatedValue_1(e):e,r._b="number"==typeof n?new AnimatedValue_1(n):n,r._listeners={},r}return _inherits$6(t,AnimatedWithChildren_1),_createClass$9(t,[{key:"__getValue",value:function(){return this._a.__getValue()*this._b.__getValue()}},{key:"addListener",value:function(e){var t=this;!this._aListener&&this._a.addListener&&(this._aListener=this._a.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})})),!this._bListener&&this._b.addListener&&(this._bListener=this._b.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})}));var n=guid();return this._listeners[n]=e,n}},{key:"removeListener",value:function(e){delete this._listeners[e]}},{key:"interpolate",value:function(e){return new AnimatedInterpolation_1(this,Interpolation_1.create(e))}},{key:"__attach",value:function(){this._a.__addChild(this),this._b.__addChild(this)}},{key:"__detach",value:function(){this._a.__removeChild(this),this._b.__removeChild(this)}}]),t}(),AnimatedMultiplication_1=AnimatedMultiplication,_createClass$10=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$10(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$7(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$7(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedModulo=function(e){function t(e,n){_classCallCheck$10(this,t);var r=_possibleConstructorReturn$7(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._a=e,r._modulus=n,r._listeners={},r}return _inherits$7(t,AnimatedWithChildren_1),_createClass$10(t,[{key:"__getValue",value:function(){return(this._a.__getValue()%this._modulus+this._modulus)%this._modulus}},{key:"addListener",value:function(e){var t=this;this._aListener||(this._aListener=this._a.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})}));var n=guid();return this._listeners[n]=e,n}},{key:"removeListener",value:function(e){delete this._listeners[e]}},{key:"interpolate",value:function(e){return new AnimatedInterpolation_1(this,Interpolation_1.create(e))}},{key:"__attach",value:function(){this._a.__addChild(this)}},{key:"__detach",value:function(){this._a.__removeChild(this)}}]),t}(),AnimatedModulo_1=AnimatedModulo,_createClass$11=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$11(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$8(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$8(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedTemplate=function(e){function t(e,n){_classCallCheck$11(this,t);var r=_possibleConstructorReturn$8(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._strings=e,r._values=n,r}return _inherits$8(t,AnimatedWithChildren_1),_createClass$11(t,[{key:"__transformValue",value:function(e){return e instanceof Animated_1?e.__getValue():e}},{key:"__getValue",value:function(){for(var e=this._strings[0],t=0;t<this._values.length;++t)e+=this.__transformValue(this._values[t])+this._strings[1+t];return e}},{key:"__attach",value:function(){for(var e=0;e<this._values.length;++e)this._values[e]instanceof Animated_1&&this._values[e].__addChild(this)}},{key:"__detach",value:function(){for(var e=0;e<this._values.length;++e)this._values[e]instanceof Animated_1&&this._values[e].__removeChild(this)}}]),t}(),AnimatedTemplate_1=AnimatedTemplate,_extends$2=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_createClass$12=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$12(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$9(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$9(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedTracking=function(e){function t(e,n,r,i,a){_classCallCheck$12(this,t);var o=_possibleConstructorReturn$9(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o._value=e,o._parent=n,o._animationClass=r,o._animationConfig=i,o._callback=a,o.__attach(),o}return _inherits$9(t,Animated_1),_createClass$12(t,[{key:"__getValue",value:function(){return this._parent.__getValue()}},{key:"__attach",value:function(){this._parent.__addChild(this)}},{key:"__detach",value:function(){this._parent.__removeChild(this)}},{key:"update",value:function(){this._value.animate(new this._animationClass(_extends$2({},this._animationConfig,{toValue:this._animationConfig.toValue.__getValue()})),this._callback)}}]),t}(),AnimatedTracking_1=AnimatedTracking;function isAnimated(e){return e instanceof Animated_1}var isAnimated_1=isAnimated,NEWTON_ITERATIONS=4,NEWTON_MIN_SLOPE=.001,SUBDIVISION_PRECISION=1e-7,SUBDIVISION_MAX_ITERATIONS=10,kSplineTableSize=11,kSampleStepSize=1/(kSplineTableSize-1),float32ArraySupported="function"==typeof Float32Array;function A(e,t){return 1-3*t+3*e}function B(e,t){return 3*t-6*e}function C(e){return 3*e}function calcBezier(e,t,n){return((A(t,n)*e+B(t,n))*e+C(t))*e}function getSlope(e,t,n){return 3*A(t,n)*e*e+2*B(t,n)*e+C(t)}function binarySubdivide(e,t,n,r,i){var a,o,s=0;do{(a=calcBezier(o=t+(n-t)/2,r,i)-e)>0?n=o:t=o}while(Math.abs(a)>SUBDIVISION_PRECISION&&++s<SUBDIVISION_MAX_ITERATIONS);return o}function newtonRaphsonIterate(e,t,n,r){for(var i=0;i<NEWTON_ITERATIONS;++i){var a=getSlope(t,n,r);if(0===a)return t;t-=(calcBezier(t,n,r)-e)/a}return t}var bezier=function(e,t,n,r){if(!(0<=e&&e<=1&&0<=n&&n<=1))throw new Error("bezier x values must be in [0, 1] range");var i=float32ArraySupported?new Float32Array(kSplineTableSize):new Array(kSplineTableSize);if(e!==t||n!==r)for(var a=0;a<kSplineTableSize;++a)i[a]=calcBezier(a*kSampleStepSize,e,n);return function(a){return e===t&&n===r?a:0===a?0:1===a?1:calcBezier(function(t){for(var r=0,a=1,o=kSplineTableSize-1;a!==o&&i[a]<=t;++a)r+=kSampleStepSize;var s=r+(t-i[--a])/(i[a+1]-i[a])*kSampleStepSize,l=getSlope(s,e,n);return l>=NEWTON_MIN_SLOPE?newtonRaphsonIterate(t,s,e,n):0===l?s:binarySubdivide(t,r,r+kSampleStepSize,e,n)}(a),t,r)}},_createClass$13=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$13(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Easing=function(){function e(){_classCallCheck$13(this,e)}return _createClass$13(e,null,[{key:"step0",value:function(e){return e>0?1:0}},{key:"step1",value:function(e){return e>=1?1:0}},{key:"linear",value:function(e){return e}},{key:"ease",value:function(e){return _ease(e)}},{key:"quad",value:function(e){return e*e}},{key:"cubic",value:function(e){return e*e*e}},{key:"poly",value:function(e){return function(t){return Math.pow(t,e)}}},{key:"sin",value:function(e){return 1-Math.cos(e*Math.PI/2)}},{key:"circle",value:function(e){return 1-Math.sqrt(1-e*e)}},{key:"exp",value:function(e){return Math.pow(2,10*(e-1))}},{key:"elastic",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)*Math.PI;return function(t){return 1-Math.pow(Math.cos(t*Math.PI/2),3)*Math.cos(t*e)}}},{key:"back",value:function(e){return void 0===e&&(e=1.70158),function(t){return t*t*((e+1)*t-e)}}},{key:"bounce",value:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}},{key:"bezier",value:function(e,t,n,r){return bezier(e,t,n,r)}},{key:"in",value:function(e){return e}},{key:"out",value:function(e){return function(t){return 1-e(1-t)}}},{key:"inOut",value:function(e){return function(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2}}}]),e}(),_ease=Easing.bezier(.42,0,1,1),Easing_1=Easing,RequestAnimationFrame={current:function(e){return commonjsGlobal.requestAnimationFrame(e)},inject:function(e){RequestAnimationFrame.current=e}},RequestAnimationFrame_1=RequestAnimationFrame,CancelAnimationFrame={current:function(e){return commonjsGlobal.cancelAnimationFrame(e)},inject:function(e){CancelAnimationFrame.current=e}},CancelAnimationFrame_1=CancelAnimationFrame,_createClass$14=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$14(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$10(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$10(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var easeInOut=Easing_1.inOut(Easing_1.ease),TimingAnimation=function(e){function t(e){_classCallCheck$14(this,t);var n=_possibleConstructorReturn$10(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._toValue=e.toValue,n._easing=void 0!==e.easing?e.easing:easeInOut,n._duration=void 0!==e.duration?e.duration:500,n._delay=void 0!==e.delay?e.delay:0,n.__isInteraction=void 0===e.isInteraction||e.isInteraction,n}return _inherits$10(t,Animation_1),_createClass$14(t,[{key:"start",value:function(e,t,n){var r=this;this.__active=!0,this._fromValue=e,this._onUpdate=t,this.__onEnd=n;var i=function(){0===r._duration?(r._onUpdate(r._toValue),r.__debouncedOnEnd({finished:!0})):(r._startTime=Date.now(),r._animationFrame=RequestAnimationFrame_1.current(r.onUpdate.bind(r)))};this._delay?this._timeout=setTimeout(i,this._delay):i()}},{key:"onUpdate",value:function(){var e=Date.now();if(e>=this._startTime+this._duration)return 0===this._duration?this._onUpdate(this._toValue):this._onUpdate(this._fromValue+this._easing(1)*(this._toValue-this._fromValue)),void this.__debouncedOnEnd({finished:!0});this._onUpdate(this._fromValue+this._easing((e-this._startTime)/this._duration)*(this._toValue-this._fromValue)),this.__active&&(this._animationFrame=RequestAnimationFrame_1.current(this.onUpdate.bind(this)))}},{key:"stop",value:function(){this.__active=!1,clearTimeout(this._timeout),CancelAnimationFrame_1.current(this._animationFrame),this.__debouncedOnEnd({finished:!1})}}]),t}(),TimingAnimation_1=TimingAnimation,_createClass$15=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$15(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$11(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$11(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var DecayAnimation=function(e){function t(e){_classCallCheck$15(this,t);var n=_possibleConstructorReturn$11(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._deceleration=void 0!==e.deceleration?e.deceleration:.998,n._velocity=e.velocity,n.__isInteraction=void 0===e.isInteraction||e.isInteraction,n}return _inherits$11(t,Animation_1),_createClass$15(t,[{key:"start",value:function(e,t,n){this.__active=!0,this._lastValue=e,this._fromValue=e,this._onUpdate=t,this.__onEnd=n,this._startTime=Date.now(),this._animationFrame=RequestAnimationFrame_1.current(this.onUpdate.bind(this))}},{key:"onUpdate",value:function(){var e=Date.now(),t=this._fromValue+this._velocity/(1-this._deceleration)*(1-Math.exp(-(1-this._deceleration)*(e-this._startTime)));this._onUpdate(t),Math.abs(this._lastValue-t)<.1?this.__debouncedOnEnd({finished:!0}):(this._lastValue=t,this.__active&&(this._animationFrame=RequestAnimationFrame_1.current(this.onUpdate.bind(this))))}},{key:"stop",value:function(){this.__active=!1,CancelAnimationFrame_1.current(this._animationFrame),this.__debouncedOnEnd({finished:!1})}}]),t}(),DecayAnimation_1=DecayAnimation;function tensionFromOrigamiValue(e){return 3.62*(e-30)+194}function frictionFromOrigamiValue(e){return 3*(e-8)+25}function fromOrigamiTensionAndFriction(e,t){return{tension:tensionFromOrigamiValue(e),friction:frictionFromOrigamiValue(t)}}function fromBouncinessAndSpeed(e,t){function n(e,t,n){return(e-t)/(n-t)}function r(e,t,n){return t+e*(n-t)}var i=n(e/1.7,0,20);i=r(i,0,.8);var a,o,s,l,u=r(n(t/1.7,0,20),.5,200),c=(a=i,o=(s=u)<=18?(l=s,7e-4*Math.pow(l,3)-.031*Math.pow(l,2)+.64*l+1.28):s>18&&s<=44?function(e){return 44e-6*Math.pow(e,3)-.006*Math.pow(e,2)+.36*e+2}(s):function(e){return 4.5e-7*Math.pow(e,3)-332e-6*Math.pow(e,2)+.1078*e+5.84}(s),function(e,t,n){return e*n+(1-e)*t}(2*a-a*a,o,.01));return{tension:tensionFromOrigamiValue(u),friction:frictionFromOrigamiValue(c)}}var SpringConfig={fromOrigamiTensionAndFriction:fromOrigamiTensionAndFriction,fromBouncinessAndSpeed:fromBouncinessAndSpeed},_createClass$16=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$16(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$12(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$12(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function withDefault(e,t){return void 0===e||null===e?t:e}var SpringAnimation=function(e){function t(e){_classCallCheck$16(this,t);var n,r=_possibleConstructorReturn$12(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._overshootClamping=withDefault(e.overshootClamping,!1),r._restDisplacementThreshold=withDefault(e.restDisplacementThreshold,.001),r._restSpeedThreshold=withDefault(e.restSpeedThreshold,.001),r._initialVelocity=e.velocity,r._lastVelocity=withDefault(e.velocity,0),r._toValue=e.toValue,r.__isInteraction=void 0===e.isInteraction||e.isInteraction,void 0!==e.bounciness||void 0!==e.speed?(invariant_1(void 0===e.tension&&void 0===e.friction,"You can only define bounciness/speed or tension/friction but not both"),n=SpringConfig.fromBouncinessAndSpeed(withDefault(e.bounciness,8),withDefault(e.speed,12))):n=SpringConfig.fromOrigamiTensionAndFriction(withDefault(e.tension,40),withDefault(e.friction,7)),r._tension=n.tension,r._friction=n.friction,r}return _inherits$12(t,Animation_1),_createClass$16(t,[{key:"start",value:function(e,n,r,i){if(this.__active=!0,this._startPosition=e,this._lastPosition=this._startPosition,this._onUpdate=n,this.__onEnd=r,this._lastTime=Date.now(),i instanceof t){var a=i.getInternalState();this._lastPosition=a.lastPosition,this._lastVelocity=a.lastVelocity,this._lastTime=a.lastTime}void 0!==this._initialVelocity&&null!==this._initialVelocity&&(this._lastVelocity=this._initialVelocity),this.onUpdate()}},{key:"getInternalState",value:function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}}},{key:"onUpdate",value:function(){var e=this._lastPosition,t=this._lastVelocity,n=this._lastPosition,r=this._lastVelocity,i=Date.now();i>this._lastTime+64&&(i=this._lastTime+64);for(var a=Math.floor((i-this._lastTime)/1),o=0;o<a;++o){var s=t,l=this._tension*(this._toValue-n)-this._friction*r,u=(n=e+.001*s/2,r=t+.001*l/2),c=this._tension*(this._toValue-n)-this._friction*r;n=e+.001*u/2;var f=r=t+.001*c/2,_=this._tension*(this._toValue-n)-this._friction*r;n=e+.001*f/2;var h=r=t+.001*_/2,p=this._tension*(this._toValue-n)-this._friction*r;n=e+.001*f/2,r=t+.001*_/2,e+=.001*((s+2*(u+f)+h)/6),t+=.001*((l+2*(c+_)+p)/6)}if(this._lastTime=i,this._lastPosition=e,this._lastVelocity=t,this._onUpdate(e),this.__active){var d=!1;this._overshootClamping&&0!==this._tension&&(d=this._startPosition<this._toValue?e>this._toValue:e<this._toValue);var m=Math.abs(t)<=this._restSpeedThreshold,y=!0;if(0!==this._tension&&(y=Math.abs(this._toValue-e)<=this._restDisplacementThreshold),d||m&&y)return 0!==this._tension&&this._onUpdate(this._toValue),void this.__debouncedOnEnd({finished:!0});this._animationFrame=RequestAnimationFrame_1.current(this.onUpdate.bind(this))}}},{key:"stop",value:function(){this.__active=!1,CancelAnimationFrame_1.current(this._animationFrame),this.__debouncedOnEnd({finished:!1})}}]),t}(),SpringAnimation_1=SpringAnimation,_createClass$17=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$17(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$13(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$13(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedTransform=function(e){function t(e){_classCallCheck$17(this,t);var n=_possibleConstructorReturn$13(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._transforms=e,n}return _inherits$13(t,AnimatedWithChildren_1),_createClass$17(t,[{key:"__getValue",value:function(){return this._transforms.map(function(e){var t={};for(var n in e){var r=e[n];t[n]=r instanceof Animated_1?r.__getValue():r}return t})}},{key:"__getAnimatedValue",value:function(){return this._transforms.map(function(e){var t={};for(var n in e){var r=e[n];t[n]=r instanceof Animated_1?r.__getAnimatedValue():r}return t})}},{key:"__attach",value:function(){var e=this;this._transforms.forEach(function(t){for(var n in t){var r=t[n];r instanceof Animated_1&&r.__addChild(e)}})}},{key:"__detach",value:function(){var e=this;this._transforms.forEach(function(t){for(var n in t){var r=t[n];r instanceof Animated_1&&r.__removeChild(e)}})}}]),t}(),AnimatedTransform_1=AnimatedTransform,FlattenStyle={current:function(e){return e},inject:function(e){FlattenStyle.current=e}},FlattenStyle_1=FlattenStyle,_extends$3=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_createClass$18=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$18(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$14(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$14(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedStyle=function(e){function t(e){_classCallCheck$18(this,t);var n=_possibleConstructorReturn$14(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return!(e=FlattenStyle_1.current(e)||{}).transform||e.transform instanceof Animated_1||(e=_extends$3({},e,{transform:new AnimatedTransform_1(e.transform)})),n._style=e,n}return _inherits$14(t,AnimatedWithChildren_1),_createClass$18(t,[{key:"__getValue",value:function(){var e={};for(var t in this._style){var n=this._style[t];e[t]=n instanceof Animated_1?n.__getValue():n}return e}},{key:"__getAnimatedValue",value:function(){var e={};for(var t in this._style){var n=this._style[t];n instanceof Animated_1&&(e[t]=n.__getAnimatedValue())}return e}},{key:"__attach",value:function(){for(var e in this._style){var t=this._style[e];t instanceof Animated_1&&t.__addChild(this)}}},{key:"__detach",value:function(){for(var e in this._style){var t=this._style[e];t instanceof Animated_1&&t.__removeChild(this)}}}]),t}(),AnimatedStyle_1=AnimatedStyle,_extends$4=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_createClass$19=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _classCallCheck$19(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$15(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$15(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var AnimatedProps=function(e){function t(e,n){_classCallCheck$19(this,t);var r=_possibleConstructorReturn$15(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.style&&(e=_extends$4({},e,{style:new AnimatedStyle_1(e.style)})),r._props=e,r._callback=n,r.__attach(),r}return _inherits$15(t,Animated_1),_createClass$19(t,[{key:"__getValue",value:function(){var e={};for(var t in this._props){var n=this._props[t];e[t]=n instanceof Animated_1?n.__getValue():n}return e}},{key:"__getAnimatedValue",value:function(){var e={};for(var t in this._props){var n=this._props[t];n instanceof Animated_1&&(e[t]=n.__getAnimatedValue())}return e}},{key:"__attach",value:function(){for(var e in this._props){var t=this._props[e];t instanceof Animated_1&&t.__addChild(this)}}},{key:"__detach",value:function(){for(var e in this._props){var t=this._props[e];t instanceof Animated_1&&t.__removeChild(this)}}},{key:"update",value:function(){this._callback()}}]),t}(),AnimatedProps_1=AnimatedProps,ApplyAnimatedValues={current:function(e,t){if(!e.setNativeProps)return!1;e.setNativeProps(t)},transformStyles:function(e){return e},inject:function(e,t){ApplyAnimatedValues.current=e,ApplyAnimatedValues.transformStyles=t}},ApplyAnimatedValues_1=ApplyAnimatedValues,_extends$5=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_jsxFileName="src/createAnimatedComponent.js",_createClass$20=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function _objectWithoutProperties$1(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function _classCallCheck$20(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$16(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits$16(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function createAnimatedComponent(e){var t=function(t){function n(){return _classCallCheck$20(this,n),_possibleConstructorReturn$16(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return _inherits$16(n,React.Component),_createClass$20(n,[{key:"componentWillUnmount",value:function(){this._propsAnimated&&this._propsAnimated.__detach()}},{key:"setNativeProps",value:function(e){!1===ApplyAnimatedValues_1.current(this.refs.node,e,this)&&this.forceUpdate()}},{key:"componentWillMount",value:function(){this.attachProps(this.props)}},{key:"attachProps",value:function(e){var t=this,n=this._propsAnimated;this._propsAnimated=new AnimatedProps_1(e,function(){!1===ApplyAnimatedValues_1.current(t.refs.node,t._propsAnimated.__getAnimatedValue(),t)&&t.forceUpdate()}),n&&n.__detach()}},{key:"componentWillReceiveProps",value:function(e){this.attachProps(e)}},{key:"render",value:function(){var t=this._propsAnimated.__getValue(),n=t.style,r=_objectWithoutProperties$1(t,["style"]);return React.createElement(e,_extends$5({},r,{style:ApplyAnimatedValues_1.transformStyles(n),ref:"node",__source:{fileName:_jsxFileName,lineNumber:78}}))}}]),n}();return"production"!==process.env.NODE_ENV&&(t.propTypes={style:function(t,n,r){e.propTypes}}),t}var createAnimatedComponent_1=createAnimatedComponent,_extends$6=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},maybeVectorAnim=function(e,t,n){if(e instanceof AnimatedValueXY_1){var r=_extends$6({},t),i=_extends$6({},t);for(var a in t){var o=t[a],s=o.x,l=o.y;void 0!==s&&void 0!==l&&(r[a]=s,i[a]=l)}var u=n(e.x,r),c=n(e.y,i);return parallel([u,c],{stopTogether:!1})}return null},spring=function e(t,n){return maybeVectorAnim(t,n,e)||{start:function(e){var r=t,i=n;r.stopTracking(),n.toValue instanceof Animated_1?r.track(new AnimatedTracking_1(r,n.toValue,SpringAnimation_1,i,e)):r.animate(new SpringAnimation_1(i),e)},stop:function(){t.stopAnimation()}}},timing=function e(t,n){return maybeVectorAnim(t,n,e)||{start:function(e){var r=t,i=n;r.stopTracking(),n.toValue instanceof Animated_1?r.track(new AnimatedTracking_1(r,n.toValue,TimingAnimation_1,i,e)):r.animate(new TimingAnimation_1(i),e)},stop:function(){t.stopAnimation()}}},decay=function e(t,n){return maybeVectorAnim(t,n,e)||{start:function(e){var r=t,i=n;r.stopTracking(),r.animate(new DecayAnimation_1(i),e)},stop:function(){t.stopAnimation()}}},sequence=function(e){var t=0;return{start:function(n){0===e.length?n&&n({finished:!0}):e[t].start(function r(i){i.finished&&++t!==e.length?e[t].start(r):n&&n(i)})},stop:function(){t<e.length&&e[t].stop()}}},parallel=function(e,t){var n=0,r={},i=!(t&&!1===t.stopTogether),a={start:function(t){n!==e.length?e.forEach(function(o,s){var l=function(o){if(r[s]=!0,++n===e.length)return n=0,void(t&&t(o));!o.finished&&i&&a.stop()};o?o.start(l):l({finished:!0})}):t&&t({finished:!0})},stop:function(){e.forEach(function(e,t){!r[t]&&e.stop(),r[t]=!0})}};return a},delay=function(e){return timing(new AnimatedValue_1(0),{toValue:0,delay:e,duration:0})},stagger=function(e,t){return parallel(t.map(function(t,n){return sequence([delay(e*n),t])}))},event=function(e,t){return function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];e.forEach(function(e,t){!function e(t,n,r){if("number"==typeof n)return invariant_1(t instanceof AnimatedValue_1,"Bad mapping of type "+typeof t+" for key "+r+", event value must map to AnimatedValue"),void t.setValue(n);for(var r in invariant_1("object"==typeof t,"Bad mapping of type "+typeof t+" for key "+r),invariant_1("object"==typeof n,"Bad event of type "+typeof n+" for key "+r),t)e(t[r],n[r],r)}(e,r[t],"arg"+t)}),t&&t.listener&&t.listener.apply(null,r)}},lib={Value:AnimatedValue_1,ValueXY:AnimatedValueXY_1,decay:decay,timing:timing,spring:spring,add:function(e,t){return new AnimatedAddition_1(e,t)},multiply:function(e,t){return new AnimatedMultiplication_1(e,t)},modulo:function(e,t){return new AnimatedModulo_1(e,t)},template:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new AnimatedTemplate_1(e,n)},delay:delay,sequence:sequence,parallel:parallel,stagger:stagger,event:event,isAnimated:isAnimated_1,createAnimatedComponent:createAnimatedComponent_1,inject:{ApplyAnimatedValues:ApplyAnimatedValues_1.inject,InteractionManager:InteractionManager_1.inject,FlattenStyle:FlattenStyle_1.inject,RequestAnimationFrame:RequestAnimationFrame_1.inject,CancelAnimationFrame:CancelAnimationFrame_1.inject},__PropsOnlyForTests:AnimatedProps_1},_extends$7=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},transformWithLengthUnits={translateX:!0,translateY:!0,translateZ:!0,perspective:!0};function mapTransform(e){var t=Object.keys(e)[0],n=transformWithLengthUnits[t]&&"number"==typeof e[t]?"px":"";return t+"("+e[t]+n+")"}var isUnitlessNumber={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function prefixKey(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var prefixes=["Webkit","ms","Moz","O"];function mapStyle(e){return e&&e.transform&&"string"!=typeof e.transform&&(e.transform=e.transform.map(mapTransform).join(" ")),e}function dangerousStyleValue(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||isUnitlessNumber.hasOwnProperty(e)&&isUnitlessNumber[e]?(""+t).trim():t+"px"}function setValueForStyles(e,t){var n=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=0===r.indexOf("--"),a=dangerousStyleValue(r,t[r],i);"float"===r&&(r="cssFloat"),i?n.setProperty(r,a):n[r]=a}}function ApplyAnimatedValues$2(e,t){if(e.setNativeProps)e.setNativeProps(t);else{if(!e.nodeType||void 0===e.setAttribute)return!1;setValueForStyles(e,mapStyle(t.style))}}Object.keys(isUnitlessNumber).forEach(function(e){prefixes.forEach(function(t){isUnitlessNumber[prefixKey(t,e)]=isUnitlessNumber[e]})}),lib.inject.ApplyAnimatedValues(ApplyAnimatedValues$2,mapStyle);var reactDom=_extends$7({},lib,{div:lib.createAnimatedComponent("div"),span:lib.createAnimatedComponent("span"),img:lib.createAnimatedComponent("img")});function createAnimatedValue(e,t,n){var r=new reactDom.Value(0);return{name:e,animation:r,interpolate:r.interpolate({inputRange:[0,1],outputRange:[t,n]})}}var Spring=function(e){function t(t){var n;n=e.call(this)||this,_initialiseProps.call(_assertThisInitialized(n));var r=t.children,i=t.to,a=t.from;return n.component=reactDom.createAnimatedComponent(r),n.animations=Object.entries(i).map(function(e){var t=e[0],n=e[1];return createAnimatedValue(t,void 0!==a[t]?a[t]:n,n)}),n.to=n.animations.reduce(function(e,t){var n;return _extends({},e,((n={})[t.name]=t.interpolate,n))},{}),n}_inheritsLoose(t,e);var n=t.prototype;return n.componentWillReceiveProps=function(e){this.update(e)},n.componentWillMount=function(){var e=this;this.animations.forEach(function(t){return e.props.interpolator(t.animation,{toValue:1}).start()})},n.render=function(){var e=this.props,t=(e.children,e.to,_objectWithoutProperties(e,["children","to"]));return React.createElement(this.component,_extends({},this.to,t))},t}(React.PureComponent);Spring.defaultProps={to:{},from:{},interpolator:reactDom.spring};var _initialiseProps=function(){var e=this;this.update=function(t){var n=t.to,r=(t.from,t.interpolator),i=e.animations,a=Array.isArray(i),o=0;for(i=a?i:i[Symbol.iterator]();;){var s;if(a){if(o>=i.length)break;s=i[o++]}else{if((o=i.next()).done)break;s=o.value}var l=s,u=l.animation._value;l.animation.stopAnimation(),n[l.name]!==l.to&&(l.animation=new reactDom.Value(0),l.interpolate=l.animation.interpolate({inputRange:[0,1],outputRange:[l.interpolate._interpolation(u),n[l.name]]}),r(l.animation,{toValue:1}).start())}e.to=e.animations.reduce(function(e,t){var n;return _extends({},e,((n={})[t.name]=t.interpolate,n))},{})}};"production"!==process.env.NODE_ENV&&(Spring.propTypes={to:PropTypes.object,from:PropTypes.object,interpolator:PropTypes.func}),module.exports=Spring;
{
"name": "react-spring",
"version": "1.0.2",
"version": "1.0.3",
"description": "Animate React with ease",

@@ -5,0 +5,0 @@ "main": "dist/react-spring",

@@ -55,4 +55,5 @@ import React from 'react'

render() {
return React.createElement(this.component, this.to)
const { children, to, ...rest } = this.props
return React.createElement(this.component, { ...this.to, ...rest })
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc