Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-spring

Package Overview
Dependencies
Maintainers
1
Versions
379
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-spring - npm Package Compare versions

Comparing version 2.0.5 to 2.1.0

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(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function _objectWithoutProperties(t,e){if(null==t)return{};var n,i,r={},a=Object.keys(t);for(i=0;i<a.length;i++)n=a[i],e.indexOf(n)>=0||(r[n]=t[n]);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var tinyUuid=function(t,e){for(e=t="";t++<36;e+=51*t&52?(15^t?8^Math.random()*(20^t?16:4):4).toString(16):"-");return e},NODE_ENV=process.env.NODE_ENV,invariant=function(t,e,n,i,r,a,o,s){if("production"!==NODE_ENV&&void 0===e)throw new Error("invariant requires an error message argument");if(!t){var l;if(void 0===e)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,i,r,a,o,s],c=0;(l=new Error(e.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}},invariant_1=invariant,Animated=function(){function t(){}var e=t.prototype;return e.__attach=function(){},e.__detach=function(){},e.__getValue=function(){},e.__getAnimatedValue=function(){return this.__getValue()},e.__addChild=function(t){},e.__removeChild=function(t){},e.__getChildren=function(){return[]},t}(),AnimatedWithChildren=function(t){function e(){var e;return(e=t.call(this)||this)._children=[],e}_inheritsLoose(e,t);var n=e.prototype;return n.__addChild=function(t){0===this._children.length&&this.__attach(),this._children.push(t)},n.__removeChild=function(t){var e=this._children.indexOf(t);-1!==e?(this._children.splice(e,1),0===this._children.length&&this.__detach()):console.warn("Trying to remove a child that doesn't exist")},n.__getChildren=function(){return this._children},e}(Animated),InteractionManager={current:{createInteractionHandle:function(){},clearInteractionHandle:function(){}},inject:function(t){InteractionManager.current=t}};function normalizeColor(t){var e;return"number"==typeof t?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=matchers.hex6.exec(t))?parseInt(e[1]+"ff",16)>>>0:names.hasOwnProperty(t)?names[t]:(e=matchers.rgb.exec(t))?(parse255(e[1])<<24|parse255(e[2])<<16|parse255(e[3])<<8|255)>>>0:(e=matchers.rgba.exec(t))?(parse255(e[1])<<24|parse255(e[2])<<16|parse255(e[3])<<8|parse1(e[4]))>>>0:(e=matchers.hex3.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=matchers.hex8.exec(t))?parseInt(e[1],16)>>>0:(e=matchers.hex4.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=matchers.hsl.exec(t))?(255|hslToRgb(parse360(e[1]),parsePercentage(e[2]),parsePercentage(e[3])))>>>0:(e=matchers.hsla.exec(t))?(hslToRgb(parse360(e[1]),parsePercentage(e[2]),parsePercentage(e[3]))|parse1(e[4]))>>>0:null}function hue2rgb(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function hslToRgb(t,e,n){var i=n<.5?n*(1+e):n+e-n*e,r=2*n-i,a=hue2rgb(r,i,t+1/3),o=hue2rgb(r,i,t),s=hue2rgb(r,i,t-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(t){return Array.prototype.slice.call(t,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(t){var e=parseInt(t,10);return e<0?0:e>255?255:e}function parse360(t){return(parseFloat(t)%360+360)%360/360}function parse1(t){var e=parseFloat(t);return e<0?0:e>1?255:Math.round(255*e)}function parsePercentage(t){var e=parseFloat(t,10);return e<0?0:e>100?1:e/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(t){return{r:Math.round((4278190080&t)>>>24),g:Math.round((16711680&t)>>>16),b:Math.round((65280&t)>>>8),a:((255&t)>>>0)/255}}normalizeColor.rgba=rgba;var normalizeCssColor=normalizeColor,linear=function(t){return t},Interpolation=function(){function t(){}return t.create=function(t){if(t.outputRange&&"string"==typeof t.outputRange[0])return createInterpolationFromStringOutputRange(t);var e=t.outputRange;checkInfiniteRange("outputRange",e);var n=t.inputRange;checkInfiniteRange("inputRange",n),checkValidInputRange(n),invariant_1(n.length===e.length,"inputRange ("+n.length+") and outputRange ("+e.length+") must have the same length");var i=t.easing||linear,r="extend";void 0!==t.extrapolateLeft?r=t.extrapolateLeft:void 0!==t.extrapolate&&(r=t.extrapolate);var a="extend";return void 0!==t.extrapolateRight?a=t.extrapolateRight:void 0!==t.extrapolate&&(a=t.extrapolate),function(t){invariant_1("number"==typeof t,"Cannot interpolation an input which is not a number");var o=findRange(t,n);return interpolate(t,n[o],n[o+1],e[o],e[o+1],i,r,a)}},t}();function interpolate(t,e,n,i,r,a,o,s){var l=t;if(l<e){if("identity"===o)return l;"clamp"===o&&(l=e)}if(l>n){if("identity"===s)return l;"clamp"===s&&(l=n)}return i===r?i:e===n?t<=e?i:r:(e===-1/0?l=-l:n===1/0?l-=e:l=(l-e)/(n-e),l=a(l),i===-1/0?l=-l:r===1/0?l+=i:l=l*(r-i)+i,l)}function colorToRgba(t){var e=normalizeCssColor(t);return null===e?t:"rgba("+((4278190080&(e=e||0))>>>24)+", "+((16711680&e)>>>16)+", "+((65280&e)>>>8)+", "+(255&e)/255+")"}var stringShapeRegex=/[0-9\.-]+/g;function createInterpolationFromStringOutputRange(t){var e=t.outputRange;invariant_1(e.length>=2,"Bad output range"),checkPattern(e=e.map(colorToRgba));var n=e[0].match(stringShapeRegex).map(function(){return[]});e.forEach(function(t){t.match(stringShapeRegex).forEach(function(t,e){n[e].push(+t)})});var i=e[0].match(stringShapeRegex).map(function(e,i){return Interpolation.create(_extends({},t,{outputRange:n[i]}))}),r=/^rgb/.test(e[0]);return function(t){var n=0;return e[0].replace(stringShapeRegex,function(){var e=i[n++](t);return String(r&&n<4?Math.round(e):e)})}}function checkPattern(t){for(var e=t[0].replace(stringShapeRegex,""),n=1;n<t.length;++n)invariant_1(e===t[n].replace(stringShapeRegex,""),"invalid pattern "+t[0]+" and "+t[n])}function findRange(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}function checkValidInputRange(t){invariant_1(t.length>=2,"inputRange must have at least 2 elements");for(var e=1;e<t.length;++e)invariant_1(t[e]>=t[e-1],"inputRange must be monotonically increasing "+t)}function checkInfiniteRange(t,e){invariant_1(e.length>=2,t+" must have at least 2 elements"),invariant_1(2!==e.length||e[0]!==-1/0||e[1]!==1/0,t+"cannot be ]-infinity;+infinity[ "+e)}var _uniqueId=0;function uniqueId(){return String(_uniqueId++)}var AnimatedInterpolation=function(t){function e(e,n){var i;return(i=t.call(this)||this)._parent=e,i._interpolation=n,i._listeners={},i}_inheritsLoose(e,t);var n=e.prototype;return n.__getValue=function(){var t=this._parent.__getValue();return invariant_1("number"==typeof t,"Cannot interpolate an input which is not a number."),this._interpolation(t)},n.addListener=function(t){var e=this;this._parentListener||(this._parentListener=this._parent.addListener(function(){for(var t in e._listeners)e._listeners[t]({value:e.__getValue()})}));var n=uniqueId();return this._listeners[n]=t,n},n.removeListener=function(t){delete this._listeners[t]},n.interpolate=function(t){return new e(this,Interpolation.create(t))},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this),this._parentListener=this._parent.removeListener(this._parentListener)},e}(AnimatedWithChildren),Animation=function(){function t(){}var e=t.prototype;return e.start=function(t,e,n,i){},e.stop=function(){},e.__debouncedOnEnd=function(t){var e=this.__onEnd;this.__onEnd=null,e&&e(t)},t}();function _flush(t){var e=new Set;!function t(n){"function"==typeof n.update?e.add(n):n.__getChildren().forEach(t)}(t),e.forEach(function(t){return t.update()})}var AnimatedValue=function(t){function e(e){var n;return(n=t.call(this)||this)._value=e,n._offset=0,n._animation=null,n._listeners={},n}_inheritsLoose(e,t);var n=e.prototype;return n.__detach=function(){this.stopAnimation()},n.__getValue=function(){return this._value+this._offset},n.setValue=function(t){this._animation&&(this._animation.stop(),this._animation=null),this._updateValue(t)},n.setOffset=function(t){this._offset=t},n.flattenOffset=function(){this._value+=this._offset,this._offset=0},n.addListener=function(t){var e=uniqueId();return this._listeners[e]=t,e},n.removeListener=function(t){delete this._listeners[t]},n.removeAllListeners=function(){this._listeners={}},n.stopAnimation=function(t){this.stopTracking(),this._animation&&this._animation.stop(),this._animation=null,t&&t(this.__getValue())},n.interpolate=function(t){return new AnimatedInterpolation(this,Interpolation.create(t))},n.animate=function(t,e){var n=this,i=null;t.__isInteraction&&(i=InteractionManager.current.createInteractionHandle());var r=this._animation;this._animation&&this._animation.stop(),this._animation=t,t.start(this._value,function(t){n._updateValue(t)},function(t){n._animation=null,null!==i&&InteractionManager.current.clearInteractionHandle(i),e&&e(t)},r)},n.stopTracking=function(){this._tracking&&this._tracking.__detach(),this._tracking=null},n.track=function(t){this.stopTracking(),this._tracking=t},n._updateValue=function(t){for(var e in this._value=t,_flush(this),this._listeners)this._listeners[e]({value:this.__getValue()})},e}(AnimatedWithChildren),AnimatedTemplate=function(t){function e(e,n){var i;return(i=t.call(this)||this)._strings=e,i._values=n,i}_inheritsLoose(e,t);var n=e.prototype;return n.__transformValue=function(t){return t instanceof Animated?t.__getValue():t},n.__getValue=function(){for(var t=this._strings[0],e=0;e<this._values.length;++e)t+=this.__transformValue(this._values[e])+this._strings[1+e];return t},n.__attach=function(){for(var t=0;t<this._values.length;++t)this._values[t]instanceof Animated&&this._values[t].__addChild(this)},n.__detach=function(){for(var t=0;t<this._values.length;++t)this._values[t]instanceof Animated&&this._values[t].__removeChild(this)},e}(AnimatedWithChildren),AnimatedTracking=function(t){function e(e,n,i,r,a){var o;return(o=t.call(this)||this)._value=e,o._parent=n,o._animationClass=i,o._animationConfig=r,o._callback=a,o.__attach(),o}_inheritsLoose(e,t);var n=e.prototype;return n.__getValue=function(){return this._parent.__getValue()},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this)},n.update=function(){this._value.animate(new this._animationClass(_extends({},this._animationConfig,{toValue:this._animationConfig.toValue.__getValue()})),this._callback)},e}(Animated),RequestAnimationFrame={current:function(t){return global.requestAnimationFrame(t)},inject:function(t){RequestAnimationFrame.current=t}},CancelAnimationFrame={current:function(t){return global.cancelAnimationFrame(t)},inject:function(t){CancelAnimationFrame.current=t}};function tensionFromOrigamiValue(t){return 3.62*(t-30)+194}function frictionFromOrigamiValue(t){return 3*(t-8)+25}function fromOrigamiTensionAndFriction(t,e){return{tension:tensionFromOrigamiValue(t),friction:frictionFromOrigamiValue(e)}}function fromBouncinessAndSpeed(t,e){function n(t,e,n){return(t-e)/(n-e)}function i(t,e,n){return e+t*(n-e)}var r=n(t/1.7,0,20);r=i(r,0,.8);var a,o,s,l,u=i(n(e/1.7,0,20),.5,200),c=(a=r,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(t){return 44e-6*Math.pow(t,3)-.006*Math.pow(t,2)+.36*t+2}(s):function(t){return 4.5e-7*Math.pow(t,3)-332e-6*Math.pow(t,2)+.1078*t+5.84}(s),function(t,e,n){return t*n+(1-t)*e}(2*a-a*a,o,.01));return{tension:tensionFromOrigamiValue(u),friction:frictionFromOrigamiValue(c)}}var SpringConfig={fromOrigamiTensionAndFriction:fromOrigamiTensionAndFriction,fromBouncinessAndSpeed:fromBouncinessAndSpeed};function withDefault(t,e){return void 0===t||null===t?e:t}var SpringAnimation=function(t){function e(e){var n,i;return(n=t.call(this)||this)._overshootClamping=withDefault(e.overshootClamping,!1),n._restDisplacementThreshold=withDefault(e.restDisplacementThreshold,.001),n._restSpeedThreshold=withDefault(e.restSpeedThreshold,.001),n._initialVelocity=e.velocity,n._lastVelocity=withDefault(e.velocity,0),n._toValue=e.toValue,n.__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"),i=SpringConfig.fromBouncinessAndSpeed(withDefault(e.bounciness,8),withDefault(e.speed,12))):i=SpringConfig.fromOrigamiTensionAndFriction(withDefault(e.tension,40),withDefault(e.friction,7)),n._tension=i.tension,n._friction=i.friction,n}_inheritsLoose(e,t);var n=e.prototype;return n.start=function(t,n,i,r){if(this.__active=!0,this._startPosition=t,this._lastPosition=this._startPosition,this._onUpdate=n,this.__onEnd=i,this._lastTime=Date.now(),r instanceof e){var a=r.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()},n.getInternalState=function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}},n.onUpdate=function(){var t=this._lastPosition,e=this._lastVelocity,n=this._lastPosition,i=this._lastVelocity,r=Date.now();r>this._lastTime+64&&(r=this._lastTime+64);for(var a=Math.floor((r-this._lastTime)/1),o=0;o<a;++o){var s=e,l=this._tension*(this._toValue-n)-this._friction*i,u=(n=t+.001*s/2,i=e+.001*l/2),c=this._tension*(this._toValue-n)-this._friction*i;n=t+.001*u/2;var h=i=e+.001*c/2,p=this._tension*(this._toValue-n)-this._friction*i;n=t+.001*h/2;var f=i=e+.001*p/2,d=this._tension*(this._toValue-n)-this._friction*i;n=t+.001*h/2,i=e+.001*p/2,t+=.001*((s+2*(u+h)+f)/6),e+=.001*((l+2*(c+p)+d)/6)}if(this._lastTime=r,this._lastPosition=t,this._lastVelocity=e,this._onUpdate(t),this.__active){var m=!1;this._overshootClamping&&0!==this._tension&&(m=this._startPosition<this._toValue?t>this._toValue:t<this._toValue);var _=Math.abs(e)<=this._restSpeedThreshold,g=!0;if(0!==this._tension&&(g=Math.abs(this._toValue-t)<=this._restDisplacementThreshold),m||_&&g)return 0!==this._tension&&this._onUpdate(this._toValue),void this.__debouncedOnEnd({finished:!0});this._animationFrame=RequestAnimationFrame.current(this.onUpdate.bind(this))}},n.stop=function(){this.__active=!1,CancelAnimationFrame.current(this._animationFrame),this.__debouncedOnEnd({finished:!1})},e}(Animation),AnimatedTransform=function(t){function e(e){var n;return(n=t.call(this)||this)._transforms=e,n}_inheritsLoose(e,t);var n=e.prototype;return n.__getValue=function(){return this._transforms.map(function(t){var e={};for(var n in t){var i=t[n];e[n]=i instanceof Animated?i.__getValue():i}return e})},n.__getAnimatedValue=function(){return this._transforms.map(function(t){var e={};for(var n in t){var i=t[n];e[n]=i instanceof Animated?i.__getAnimatedValue():i}return e})},n.__attach=function(){var t=this;this._transforms.forEach(function(e){for(var n in e){var i=e[n];i instanceof Animated&&i.__addChild(t)}})},n.__detach=function(){var t=this;this._transforms.forEach(function(e){for(var n in e){var i=e[n];i instanceof Animated&&i.__removeChild(t)}})},e}(AnimatedWithChildren),FlattenStyle={current:function(t){return t},inject:function(t){FlattenStyle.current=t}},AnimatedStyle=function(t){function e(e){var n;return n=t.call(this)||this,!(e=FlattenStyle.current(e)||{}).transform||e.transform instanceof Animated||(e=_extends({},e,{transform:new AnimatedTransform(e.transform)})),n._style=e,n}_inheritsLoose(e,t);var n=e.prototype;return n.__getValue=function(){var t={};for(var e in this._style){var n=this._style[e];t[e]=n instanceof Animated?n.__getValue():n}return t},n.__getAnimatedValue=function(){var t={};for(var e in this._style){var n=this._style[e];n instanceof Animated&&(t[e]=n.__getAnimatedValue())}return t},n.__attach=function(){for(var t in this._style){var e=this._style[t];e instanceof Animated&&e.__addChild(this)}},n.__detach=function(){for(var t in this._style){var e=this._style[t];e instanceof Animated&&e.__removeChild(this)}},e}(AnimatedWithChildren),AnimatedProps=function(t){function e(e,n){var i;return i=t.call(this)||this,e.style&&(e=_extends({},e,{style:new AnimatedStyle(e.style)})),i._props=e,i._callback=n,i.__attach(),i}_inheritsLoose(e,t);var n=e.prototype;return n.__getValue=function(){var t={};for(var e in this._props){var n=this._props[e];t[e]=n instanceof Animated?n.__getValue():n}return t},n.__getAnimatedValue=function(){var t={};for(var e in this._props){var n=this._props[e];n instanceof Animated&&(t[e]=n.__getAnimatedValue())}return t},n.__attach=function(){for(var t in this._props){var e=this._props[t];e instanceof Animated&&e.__addChild(this)}},n.__detach=function(){for(var t in this._props){var e=this._props[t];e instanceof Animated&&e.__removeChild(this)}},n.update=function(){this._callback()},e}(Animated),ApplyAnimatedValues={current:function(t,e){if(!t.setNativeProps)return!1;t.setNativeProps(e)},transformStyles:function(t){return t},inject:function(t,e){ApplyAnimatedValues.current=t,ApplyAnimatedValues.transformStyles=e}};function createAnimatedComponent(t){var e=function(e){function n(){return e.apply(this,arguments)||this}_inheritsLoose(n,e);var i=n.prototype;return i.componentWillUnmount=function(){this._propsAnimated&&this._propsAnimated.__detach()},i.setNativeProps=function(t){this.refName&&ApplyAnimatedValues.current(this.refName,t,this)||this.forceUpdate()},i.componentWillMount=function(){this.attachProps(this.props)},i.attachProps=function(t){var e=this,n=this._propsAnimated;this._propsAnimated=new AnimatedProps(t,function(){e.refName&&ApplyAnimatedValues.current(e.refName,e._propsAnimated.__getAnimatedValue(),e)||e.forceUpdate()}),n&&n.__detach()},i.componentWillReceiveProps=function(t){this.attachProps(t)},i.render=function(){var e=this,n=this._propsAnimated.__getValue(),i=n.style,r=_objectWithoutProperties(n,["style"]);return React.createElement(t,_extends({},r,{style:ApplyAnimatedValues.transformStyles(i),ref:function(t){return e.refName=t}}))},n}(React.Component);return"production"!==process.env.NODE_ENV&&(e.propTypes={style:function(e,n,i){t.propTypes}}),e}var spring=function(t,e){return{start:function(n){var i=t,r=e;i.stopTracking(),e.toValue instanceof Animated?i.track(new AnimatedTracking(i,e.toValue,SpringAnimation,r,n)):i.animate(new SpringAnimation(r),n)},stop:function(){t.stopAnimation()}}},exports$1={Value:AnimatedValue,spring:spring,template:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return new AnimatedTemplate(t,n)},createAnimatedComponent:createAnimatedComponent,inject:{ApplyAnimatedValues:ApplyAnimatedValues.inject,InteractionManager:InteractionManager.inject,FlattenStyle:FlattenStyle.inject,RequestAnimationFrame:RequestAnimationFrame.inject,CancelAnimationFrame:CancelAnimationFrame.inject},ApplyAnimatedValues:ApplyAnimatedValues,AnimatedProps:AnimatedProps},transformWithLengthUnits={translateX:!0,translateY:!0,translateZ:!0,perspective:!0};function mapTransform(t){var e=Object.keys(t)[0],n=transformWithLengthUnits[e]&&"number"==typeof t[e]?"px":"";return e+"("+t[e]+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(t,e){return t+e.charAt(0).toUpperCase()+e.substring(1)}var prefixes=["Webkit","ms","Moz","O"];function mapStyle(t){return t&&t.transform&&"string"!=typeof t.transform&&(t.transform=t.transform.map(mapTransform).join(" ")),t}function dangerousStyleValue(t,e,n){return null==e||"boolean"==typeof e||""===e?"":n||"number"!=typeof e||0===e||isUnitlessNumber.hasOwnProperty(t)&&isUnitlessNumber[t]?(""+e).trim():e+"px"}function setValueForStyles(t,e){var n=t.style;for(var i in e)if(e.hasOwnProperty(i)){var r=0===i.indexOf("--"),a=dangerousStyleValue(i,e[i],r);"float"===i&&(i="cssFloat"),r?n.setProperty(i,a):n[i]=a}}function ApplyAnimatedValues$1(t,e){if(t.setNativeProps)t.setNativeProps(e);else{if(!t.nodeType||void 0===t.setAttribute)return!1;setValueForStyles(t,mapStyle(e.style))}}Object.keys(isUnitlessNumber).forEach(function(t){prefixes.forEach(function(e){isUnitlessNumber[prefixKey(e,t)]=isUnitlessNumber[t]})}),exports$1.inject.ApplyAnimatedValues(ApplyAnimatedValues$1,mapStyle);var elements=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].reduce(function(t,e){var n;return _extends({},t,((n={})[e]=exports$1.createAnimatedComponent(e),n))},{}),exports$2=_extends({},exports$1,{elements:elements});function createAnimation(t,e){var n,i,r;return i=n=function(e){function n(t){var n;n=e.call(this)||this,r.call(_assertThisInitialized(n));t.children,t.to,t.from,t.native;return n._animation=new exports$2.Value(0),n._updateInterpolations(t),n}_inheritsLoose(n,e);var i=n.prototype;return i._attachProps=function(t){var e=this._propsAnimated;this._propsAnimated=new exports$2.AnimatedProps(t,this._callback),e&&e.__detach()},i._mapValues=function(t,e,n,i){var r=t.from,a=this._animation._value,o=this._interpolations&&this._interpolations[i]&&this._interpolations[i].interpolate._interpolation(a),s=void 0!==o?o:void 0!==r[e]?r[e]:n;return{name:e,interpolate:this._animation.interpolate({inputRange:[0,1],outputRange:[s,n]})}},i.componentWillReceiveProps=function(t){this._updateAnimations(t)},i.componentDidMount=function(){t(this._animation,_extends({toValue:1},this.props.config)).start(this._onRest)},i.componentWillUnmount=function(){this._animation.stopAnimation()},i.render=function(){var t=this.props,e=t.children,n=(t.from,t.to,t.config,t.native),i=_objectWithoutProperties(t,["children","from","to","config","native"]);return e(_extends({},n?this._to:this._propsAnimated.__getValue(),i))},n}(React.PureComponent),n.propTypes={to:PropTypes.object,from:PropTypes.object,config:PropTypes.object,native:PropTypes.bool,onRest:PropTypes.func},n.defaultProps={to:{},from:{},config:e,native:!1},r=function(){var e=this;this._callback=function(){return!e.props.native&&e.forceUpdate()},this._updateInterpolations=function(t){var n=t.from,i=t.to;e._interpolations=Object.entries(_extends({},n,i)).map(function(n,i){var r=n[0],a=n[1];return e._mapValues(t,r,a,i)}),e._to=e._interpolations.reduce(function(t,e){var n;return _extends({},t,((n={})[e.name]=e.interpolate,n))},{}),e._attachProps(e._to)},this._updateAnimations=function(n){n.to,n.from;var i=n.config;e._updateInterpolations(n),e._animation.stopAnimation(),e._animation.setValue(0),t(e._animation,_extends({toValue:1},i)).start(e._onRest)},this._onRest=function(t){t.finished&&e.props.onRest&&e.props.onRest()}},i}function createTransition(t,e){var n,i,r=createAnimation(t,e);return i=n=function(t){function e(e){var n;n=t.call(this)||this;var i=e.children,r=e.keys,a=e.from,o=e.enter;e.leave;return Array.isArray(i)||(i=[i],r=[tinyUuid()]),n.state={transitionsKeys:r,transitions:i.map(function(t,e){return{children:t,key:r[e],to:o,from:a}})},n}_inheritsLoose(e,t);var n=e.prototype;return n.componentWillReceiveProps=function(t){var e=this,n=this.state,i=n.transitions,r=n.transitionsKeys,a=(t.native,t.children),o=t.keys,s=t.from,l=t.enter,u=t.leave;Array.isArray(a)||(a=[a],o=[t.children!==this.props.children?tinyUuid():this.props.transitionsKeys[0]]);var c=new Set(o),h=new Set(r),p=o.filter(function(t){return!h.has(t)}),f=r.filter(function(t){return!c.has(t)});i=i.map(function(t){if(void 0===t.destroy){var e=o.indexOf(t.key),n=a[e];n&&(t.children=n)}return t}),p.length&&p.forEach(function(t){var e=o.indexOf(t),n={children:a[e],key:t,to:l,from:s};i=i.slice(0,e).concat([n],i.slice(e))}),f.length&&f.forEach(function(t){var n=i.find(function(e){return e.key===t});if(n){var r={destroy:!0,children:n.children,key:t,to:u,from:s,onRest:function(){return e.setState(function(t){return{transitions:t.transitions.filter(function(t){return t!==r})}})}};i=i.map(function(t){return t===n?r:t})}}),r=i.filter(function(t){return void 0===t.destroy}).map(function(t){return t.key});var d=o.map(function(t){return i.find(function(e){return e.key===t})});f.forEach(function(t){var e=i.findIndex(function(e){return e.key===t}),n=i.find(function(e){return e.key===t});n&&(d=d.slice(0,e).concat([n],d.slice(e)))}),this.setState({transitions:d,transitionsKeys:r})},n.render=function(){return this.state.transitions.map(function(t){var e=t.key,n=_objectWithoutProperties(t,["key"]);return React.createElement(r,_extends({},n,{key:e}))})},e}(React.PureComponent),n.propTypes={from:PropTypes.object,enter:PropTypes.object,leave:PropTypes.object,keys:PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string,PropTypes.number])),native:PropTypes.bool},i}var Spring=createAnimation(exports$2.spring,{tension:170,friction:26}),SpringTransition=createTransition(exports$2.spring,{tension:170,friction:26}),template=exports$2.template,animated=exports$2.elements;export{createAnimation,createTransition,Spring,SpringTransition,template,animated};
import React from"react";import PropTypes from"prop-types";function _extends(){return(_extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function _objectWithoutProperties(t,e){if(null==t)return{};var n,i,r={},a=Object.keys(t);for(i=0;i<a.length;i++)n=a[i],e.indexOf(n)>=0||(r[n]=t[n]);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var NODE_ENV=process.env.NODE_ENV,invariant=function(t,e,n,i,r,a,o,s){if("production"!==NODE_ENV&&void 0===e)throw new Error("invariant requires an error message argument");if(!t){var l;if(void 0===e)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,i,r,a,o,s],c=0;(l=new Error(e.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}},invariant_1=invariant,Animated=function(){function t(){}var e=t.prototype;return e.__attach=function(){},e.__detach=function(){},e.__getValue=function(){},e.__getAnimatedValue=function(){return this.__getValue()},e.__addChild=function(t){},e.__removeChild=function(t){},e.__getChildren=function(){return[]},t}(),AnimatedWithChildren=function(t){function e(){var e;return(e=t.call(this)||this)._children=[],e}_inheritsLoose(e,t);var n=e.prototype;return n.__addChild=function(t){0===this._children.length&&this.__attach(),this._children.push(t)},n.__removeChild=function(t){var e=this._children.indexOf(t);-1!==e?(this._children.splice(e,1),0===this._children.length&&this.__detach()):console.warn("Trying to remove a child that doesn't exist")},n.__getChildren=function(){return this._children},e}(Animated),InteractionManager={current:{createInteractionHandle:function(){},clearInteractionHandle:function(){}},inject:function(t){InteractionManager.current=t}};function normalizeColor(t){var e;return"number"==typeof t?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=matchers.hex6.exec(t))?parseInt(e[1]+"ff",16)>>>0:names.hasOwnProperty(t)?names[t]:(e=matchers.rgb.exec(t))?(parse255(e[1])<<24|parse255(e[2])<<16|parse255(e[3])<<8|255)>>>0:(e=matchers.rgba.exec(t))?(parse255(e[1])<<24|parse255(e[2])<<16|parse255(e[3])<<8|parse1(e[4]))>>>0:(e=matchers.hex3.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=matchers.hex8.exec(t))?parseInt(e[1],16)>>>0:(e=matchers.hex4.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=matchers.hsl.exec(t))?(255|hslToRgb(parse360(e[1]),parsePercentage(e[2]),parsePercentage(e[3])))>>>0:(e=matchers.hsla.exec(t))?(hslToRgb(parse360(e[1]),parsePercentage(e[2]),parsePercentage(e[3]))|parse1(e[4]))>>>0:null}function hue2rgb(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function hslToRgb(t,e,n){var i=n<.5?n*(1+e):n+e-n*e,r=2*n-i,a=hue2rgb(r,i,t+1/3),o=hue2rgb(r,i,t),s=hue2rgb(r,i,t-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(t){return Array.prototype.slice.call(t,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(t){var e=parseInt(t,10);return e<0?0:e>255?255:e}function parse360(t){return(parseFloat(t)%360+360)%360/360}function parse1(t){var e=parseFloat(t);return e<0?0:e>1?255:Math.round(255*e)}function parsePercentage(t){var e=parseFloat(t,10);return e<0?0:e>100?1:e/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(t){return{r:Math.round((4278190080&t)>>>24),g:Math.round((16711680&t)>>>16),b:Math.round((65280&t)>>>8),a:((255&t)>>>0)/255}}normalizeColor.rgba=rgba;var normalizeCssColor=normalizeColor,linear=function(t){return t},Interpolation=function(){function t(){}return t.create=function(t){if(t.outputRange&&"string"==typeof t.outputRange[0])return createInterpolationFromStringOutputRange(t);var e=t.outputRange;checkInfiniteRange("outputRange",e);var n=t.inputRange;checkInfiniteRange("inputRange",n),checkValidInputRange(n),invariant_1(n.length===e.length,"inputRange ("+n.length+") and outputRange ("+e.length+") must have the same length");var i=t.easing||linear,r="extend";void 0!==t.extrapolateLeft?r=t.extrapolateLeft:void 0!==t.extrapolate&&(r=t.extrapolate);var a="extend";return void 0!==t.extrapolateRight?a=t.extrapolateRight:void 0!==t.extrapolate&&(a=t.extrapolate),function(t){invariant_1("number"==typeof t,"Cannot interpolation an input which is not a number");var o=findRange(t,n);return interpolate(t,n[o],n[o+1],e[o],e[o+1],i,r,a)}},t}();function interpolate(t,e,n,i,r,a,o,s){var l=t;if(l<e){if("identity"===o)return l;"clamp"===o&&(l=e)}if(l>n){if("identity"===s)return l;"clamp"===s&&(l=n)}return i===r?i:e===n?t<=e?i:r:(e===-1/0?l=-l:n===1/0?l-=e:l=(l-e)/(n-e),l=a(l),i===-1/0?l=-l:r===1/0?l+=i:l=l*(r-i)+i,l)}function colorToRgba(t){var e=normalizeCssColor(t);return null===e?t:"rgba("+((4278190080&(e=e||0))>>>24)+", "+((16711680&e)>>>16)+", "+((65280&e)>>>8)+", "+(255&e)/255+")"}var stringShapeRegex=/[0-9\.-]+/g;function createInterpolationFromStringOutputRange(t){var e=t.outputRange;invariant_1(e.length>=2,"Bad output range"),checkPattern(e=e.map(colorToRgba));var n=e[0].match(stringShapeRegex).map(function(){return[]});e.forEach(function(t){t.match(stringShapeRegex).forEach(function(t,e){n[e].push(+t)})});var i=e[0].match(stringShapeRegex).map(function(e,i){return Interpolation.create(_extends({},t,{outputRange:n[i]}))}),r=/^rgb/.test(e[0]);return function(t){var n=0;return e[0].replace(stringShapeRegex,function(){var e=i[n++](t);return String(r&&n<4?Math.round(e):e)})}}function checkPattern(t){for(var e=t[0].replace(stringShapeRegex,""),n=1;n<t.length;++n)invariant_1(e===t[n].replace(stringShapeRegex,""),"invalid pattern "+t[0]+" and "+t[n])}function findRange(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}function checkValidInputRange(t){invariant_1(t.length>=2,"inputRange must have at least 2 elements");for(var e=1;e<t.length;++e)invariant_1(t[e]>=t[e-1],"inputRange must be monotonically increasing "+t)}function checkInfiniteRange(t,e){invariant_1(e.length>=2,t+" must have at least 2 elements"),invariant_1(2!==e.length||e[0]!==-1/0||e[1]!==1/0,t+"cannot be ]-infinity;+infinity[ "+e)}var _uniqueId=0;function uniqueId(){return String(_uniqueId++)}var AnimatedInterpolation=function(t){function e(e,n){var i;return(i=t.call(this)||this)._parent=e,i._interpolation=n,i._listeners={},i}_inheritsLoose(e,t);var n=e.prototype;return n.__getValue=function(){var t=this._parent.__getValue();return invariant_1("number"==typeof t,"Cannot interpolate an input which is not a number."),this._interpolation(t)},n.addListener=function(t){var e=this;this._parentListener||(this._parentListener=this._parent.addListener(function(){for(var t in e._listeners)e._listeners[t]({value:e.__getValue()})}));var n=uniqueId();return this._listeners[n]=t,n},n.removeListener=function(t){delete this._listeners[t]},n.interpolate=function(t){return new e(this,Interpolation.create(t))},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this),this._parentListener=this._parent.removeListener(this._parentListener)},e}(AnimatedWithChildren),Animation=function(){function t(){}var e=t.prototype;return e.start=function(t,e,n,i){},e.stop=function(){},e.__debouncedOnEnd=function(t){var e=this.__onEnd;this.__onEnd=null,e&&e(t)},t}();function _flush(t){var e=new Set;!function t(n){"function"==typeof n.update?e.add(n):n.__getChildren().forEach(t)}(t),e.forEach(function(t){return t.update()})}var AnimatedValue=function(t){function e(e){var n;return(n=t.call(this)||this)._value=e,n._offset=0,n._animation=null,n._listeners={},n}_inheritsLoose(e,t);var n=e.prototype;return n.__detach=function(){this.stopAnimation()},n.__getValue=function(){return this._value+this._offset},n.setValue=function(t){this._animation&&(this._animation.stop(),this._animation=null),this._updateValue(t)},n.setOffset=function(t){this._offset=t},n.flattenOffset=function(){this._value+=this._offset,this._offset=0},n.addListener=function(t){var e=uniqueId();return this._listeners[e]=t,e},n.removeListener=function(t){delete this._listeners[t]},n.removeAllListeners=function(){this._listeners={}},n.stopAnimation=function(t){this.stopTracking(),this._animation&&this._animation.stop(),this._animation=null,t&&t(this.__getValue())},n.interpolate=function(t){return new AnimatedInterpolation(this,Interpolation.create(t))},n.animate=function(t,e){var n=this,i=null;t.__isInteraction&&(i=InteractionManager.current.createInteractionHandle());var r=this._animation;this._animation&&this._animation.stop(),this._animation=t,t.start(this._value,function(t){n._updateValue(t)},function(t){n._animation=null,null!==i&&InteractionManager.current.clearInteractionHandle(i),e&&e(t)},r)},n.stopTracking=function(){this._tracking&&this._tracking.__detach(),this._tracking=null},n.track=function(t){this.stopTracking(),this._tracking=t},n._updateValue=function(t){for(var e in this._value=t,_flush(this),this._listeners)this._listeners[e]({value:this.__getValue()})},e}(AnimatedWithChildren),AnimatedTemplate=function(t){function e(e,n){var i;return(i=t.call(this)||this)._strings=e,i._values=n,i}_inheritsLoose(e,t);var n=e.prototype;return n.__transformValue=function(t){return t instanceof Animated?t.__getValue():t},n.__getValue=function(){for(var t=this._strings[0],e=0;e<this._values.length;++e)t+=this.__transformValue(this._values[e])+this._strings[1+e];return t},n.__attach=function(){for(var t=0;t<this._values.length;++t)this._values[t]instanceof Animated&&this._values[t].__addChild(this)},n.__detach=function(){for(var t=0;t<this._values.length;++t)this._values[t]instanceof Animated&&this._values[t].__removeChild(this)},e}(AnimatedWithChildren),AnimatedTracking=function(t){function e(e,n,i,r,a){var o;return(o=t.call(this)||this)._value=e,o._parent=n,o._animationClass=i,o._animationConfig=r,o._callback=a,o.__attach(),o}_inheritsLoose(e,t);var n=e.prototype;return n.__getValue=function(){return this._parent.__getValue()},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this)},n.update=function(){this._value.animate(new this._animationClass(_extends({},this._animationConfig,{toValue:this._animationConfig.toValue.__getValue()})),this._callback)},e}(Animated),RequestAnimationFrame={current:function(t){return global.requestAnimationFrame(t)},inject:function(t){RequestAnimationFrame.current=t}},CancelAnimationFrame={current:function(t){return global.cancelAnimationFrame(t)},inject:function(t){CancelAnimationFrame.current=t}};function tensionFromOrigamiValue(t){return 3.62*(t-30)+194}function frictionFromOrigamiValue(t){return 3*(t-8)+25}function fromOrigamiTensionAndFriction(t,e){return{tension:tensionFromOrigamiValue(t),friction:frictionFromOrigamiValue(e)}}function fromBouncinessAndSpeed(t,e){function n(t,e,n){return(t-e)/(n-e)}function i(t,e,n){return e+t*(n-e)}var r=n(t/1.7,0,20);r=i(r,0,.8);var a,o,s,l,u=i(n(e/1.7,0,20),.5,200),c=(a=r,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(t){return 44e-6*Math.pow(t,3)-.006*Math.pow(t,2)+.36*t+2}(s):function(t){return 4.5e-7*Math.pow(t,3)-332e-6*Math.pow(t,2)+.1078*t+5.84}(s),function(t,e,n){return t*n+(1-t)*e}(2*a-a*a,o,.01));return{tension:tensionFromOrigamiValue(u),friction:frictionFromOrigamiValue(c)}}var SpringConfig={fromOrigamiTensionAndFriction:fromOrigamiTensionAndFriction,fromBouncinessAndSpeed:fromBouncinessAndSpeed};function withDefault(t,e){return void 0===t||null===t?e:t}var SpringAnimation=function(t){function e(e){var n,i;return(n=t.call(this)||this)._overshootClamping=withDefault(e.overshootClamping,!1),n._restDisplacementThreshold=withDefault(e.restDisplacementThreshold,.001),n._restSpeedThreshold=withDefault(e.restSpeedThreshold,.001),n._initialVelocity=e.velocity,n._lastVelocity=withDefault(e.velocity,0),n._toValue=e.toValue,n.__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"),i=SpringConfig.fromBouncinessAndSpeed(withDefault(e.bounciness,8),withDefault(e.speed,12))):i=SpringConfig.fromOrigamiTensionAndFriction(withDefault(e.tension,40),withDefault(e.friction,7)),n._tension=i.tension,n._friction=i.friction,n}_inheritsLoose(e,t);var n=e.prototype;return n.start=function(t,n,i,r){if(this.__active=!0,this._startPosition=t,this._lastPosition=this._startPosition,this._onUpdate=n,this.__onEnd=i,this._lastTime=Date.now(),r instanceof e){var a=r.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()},n.getInternalState=function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}},n.onUpdate=function(){var t=this._lastPosition,e=this._lastVelocity,n=this._lastPosition,i=this._lastVelocity,r=Date.now();r>this._lastTime+64&&(r=this._lastTime+64);for(var a=Math.floor((r-this._lastTime)/1),o=0;o<a;++o){var s=e,l=this._tension*(this._toValue-n)-this._friction*i,u=(n=t+.001*s/2,i=e+.001*l/2),c=this._tension*(this._toValue-n)-this._friction*i;n=t+.001*u/2;var p=i=e+.001*c/2,h=this._tension*(this._toValue-n)-this._friction*i;n=t+.001*p/2;var f=i=e+.001*h/2,d=this._tension*(this._toValue-n)-this._friction*i;n=t+.001*p/2,i=e+.001*h/2,t+=.001*((s+2*(u+p)+f)/6),e+=.001*((l+2*(c+h)+d)/6)}if(this._lastTime=r,this._lastPosition=t,this._lastVelocity=e,this._onUpdate(t),this.__active){var m=!1;this._overshootClamping&&0!==this._tension&&(m=this._startPosition<this._toValue?t>this._toValue:t<this._toValue);var _=Math.abs(e)<=this._restSpeedThreshold,g=!0;if(0!==this._tension&&(g=Math.abs(this._toValue-t)<=this._restDisplacementThreshold),m||_&&g)return 0!==this._tension&&this._onUpdate(this._toValue),void this.__debouncedOnEnd({finished:!0});this._animationFrame=RequestAnimationFrame.current(this.onUpdate.bind(this))}},n.stop=function(){this.__active=!1,CancelAnimationFrame.current(this._animationFrame),this.__debouncedOnEnd({finished:!1})},e}(Animation),AnimatedTransform=function(t){function e(e){var n;return(n=t.call(this)||this)._transforms=e,n}_inheritsLoose(e,t);var n=e.prototype;return n.__getValue=function(){return this._transforms.map(function(t){var e={};for(var n in t){var i=t[n];e[n]=i instanceof Animated?i.__getValue():i}return e})},n.__getAnimatedValue=function(){return this._transforms.map(function(t){var e={};for(var n in t){var i=t[n];e[n]=i instanceof Animated?i.__getAnimatedValue():i}return e})},n.__attach=function(){var t=this;this._transforms.forEach(function(e){for(var n in e){var i=e[n];i instanceof Animated&&i.__addChild(t)}})},n.__detach=function(){var t=this;this._transforms.forEach(function(e){for(var n in e){var i=e[n];i instanceof Animated&&i.__removeChild(t)}})},e}(AnimatedWithChildren),FlattenStyle={current:function(t){return t},inject:function(t){FlattenStyle.current=t}},AnimatedStyle=function(t){function e(e){var n;return n=t.call(this)||this,!(e=FlattenStyle.current(e)||{}).transform||e.transform instanceof Animated||(e=_extends({},e,{transform:new AnimatedTransform(e.transform)})),n._style=e,n}_inheritsLoose(e,t);var n=e.prototype;return n.__getValue=function(){var t={};for(var e in this._style){var n=this._style[e];t[e]=n instanceof Animated?n.__getValue():n}return t},n.__getAnimatedValue=function(){var t={};for(var e in this._style){var n=this._style[e];n instanceof Animated&&(t[e]=n.__getAnimatedValue())}return t},n.__attach=function(){for(var t in this._style){var e=this._style[t];e instanceof Animated&&e.__addChild(this)}},n.__detach=function(){for(var t in this._style){var e=this._style[t];e instanceof Animated&&e.__removeChild(this)}},e}(AnimatedWithChildren),AnimatedProps=function(t){function e(e,n){var i;return i=t.call(this)||this,e.style&&(e=_extends({},e,{style:new AnimatedStyle(e.style)})),i._props=e,i._callback=n,i.__attach(),i}_inheritsLoose(e,t);var n=e.prototype;return n.__getValue=function(){var t={};for(var e in this._props){var n=this._props[e];t[e]=n instanceof Animated?n.__getValue():n}return t},n.__getAnimatedValue=function(){var t={};for(var e in this._props){var n=this._props[e];n instanceof Animated&&(t[e]=n.__getAnimatedValue())}return t},n.__attach=function(){for(var t in this._props){var e=this._props[t];e instanceof Animated&&e.__addChild(this)}},n.__detach=function(){for(var t in this._props){var e=this._props[t];e instanceof Animated&&e.__removeChild(this)}},n.update=function(){this._callback()},e}(Animated),ApplyAnimatedValues={current:function(t,e){if(!t.setNativeProps)return!1;t.setNativeProps(e)},transformStyles:function(t){return t},inject:function(t,e){ApplyAnimatedValues.current=t,ApplyAnimatedValues.transformStyles=e}};function createAnimatedComponent(t){var e=function(e){function n(){return e.apply(this,arguments)||this}_inheritsLoose(n,e);var i=n.prototype;return i.componentWillUnmount=function(){this._propsAnimated&&this._propsAnimated.__detach()},i.setNativeProps=function(t){this.refName&&ApplyAnimatedValues.current(this.refName,t,this)||this.forceUpdate()},i.componentWillMount=function(){this.attachProps(this.props)},i.attachProps=function(t){var e=this,n=this._propsAnimated;this._propsAnimated=new AnimatedProps(t,function(){e.refName&&ApplyAnimatedValues.current(e.refName,e._propsAnimated.__getAnimatedValue(),e)||e.forceUpdate()}),n&&n.__detach()},i.componentWillReceiveProps=function(t){this.attachProps(t)},i.render=function(){var e=this,n=this._propsAnimated.__getValue(),i=n.style,r=_objectWithoutProperties(n,["style"]);return React.createElement(t,_extends({},r,{style:ApplyAnimatedValues.transformStyles(i),ref:function(t){return e.refName=t}}))},n}(React.Component);return"production"!==process.env.NODE_ENV&&(e.propTypes={style:function(e,n,i){t.propTypes}}),e}var spring=function(t,e){return{start:function(n){var i=t,r=e;i.stopTracking(),e.toValue instanceof Animated?i.track(new AnimatedTracking(i,e.toValue,SpringAnimation,r,n)):i.animate(new SpringAnimation(r),n)},stop:function(){t.stopAnimation()}}},exports$1={Value:AnimatedValue,spring:spring,template:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return new AnimatedTemplate(t,n)},createAnimatedComponent:createAnimatedComponent,inject:{ApplyAnimatedValues:ApplyAnimatedValues.inject,InteractionManager:InteractionManager.inject,FlattenStyle:FlattenStyle.inject,RequestAnimationFrame:RequestAnimationFrame.inject,CancelAnimationFrame:CancelAnimationFrame.inject},ApplyAnimatedValues:ApplyAnimatedValues,AnimatedProps:AnimatedProps},transformWithLengthUnits={translateX:!0,translateY:!0,translateZ:!0,perspective:!0};function mapTransform(t){var e=Object.keys(t)[0],n=transformWithLengthUnits[e]&&"number"==typeof t[e]?"px":"";return e+"("+t[e]+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(t,e){return t+e.charAt(0).toUpperCase()+e.substring(1)}var prefixes=["Webkit","ms","Moz","O"];function mapStyle(t){return t&&t.transform&&"string"!=typeof t.transform&&(t.transform=t.transform.map(mapTransform).join(" ")),t}function dangerousStyleValue(t,e,n){return null==e||"boolean"==typeof e||""===e?"":n||"number"!=typeof e||0===e||isUnitlessNumber.hasOwnProperty(t)&&isUnitlessNumber[t]?(""+e).trim():e+"px"}function setValueForStyles(t,e){var n=t.style;for(var i in e)if(e.hasOwnProperty(i)){var r=0===i.indexOf("--"),a=dangerousStyleValue(i,e[i],r);"float"===i&&(i="cssFloat"),r?n.setProperty(i,a):n[i]=a}}function ApplyAnimatedValues$1(t,e){if(t.setNativeProps)t.setNativeProps(e);else{if(!t.nodeType||void 0===t.setAttribute)return!1;setValueForStyles(t,mapStyle(e.style))}}Object.keys(isUnitlessNumber).forEach(function(t){prefixes.forEach(function(e){isUnitlessNumber[prefixKey(e,t)]=isUnitlessNumber[t]})}),exports$1.inject.ApplyAnimatedValues(ApplyAnimatedValues$1,mapStyle);var elements=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].reduce(function(t,e){var n;return _extends({},t,((n={})[e]=exports$1.createAnimatedComponent(e),n))},{}),exports$2=_extends({},exports$1,{elements:elements}),config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20}};function createAnimation(t,e){var n,i,r;return i=n=function(e){function n(t){var n;return n=e.call(this)||this,r.call(_assertThisInitialized(n)),n.defaultAnimation=new exports$2.Value(0),n.animations={},n.update(t,!1),n}_inheritsLoose(n,e);var i=n.prototype;return i.update=function(e,n){var i=this,r=e.from,a=e.to,o=e.config,s=e.attach;void 0===n&&(n=!1);var l=Object.entries(_extends({},r,a)),u=this.defaultAnimation._value;this.interpolators={},this.defaultAnimation.setValue(0),this.animations=l.reduce(function(e,a,l){var c,p=a[0],h=a[1],f=i.animations[p]||(i.animations[p]={}),d="number"==typeof h,m=void 0!==r[p]?r[p]:h,_=d?h:1;if(d&&s){var g=s(i),v=g&&g.animations[p];v&&(_=v.animation)}if(d)f.animation=f.interpolation=f.animation||new exports$2.Value(m);else{var y=f.interpolation&&f.interpolation._interpolation(u);f.animation=i.defaultAnimation,f.interpolation=i.defaultAnimation.interpolate({inputRange:[0,1],outputRange:[void 0!==y?y:m,h]})}return f.start=function(){return t(f.animation,_extends({toValue:_},o)).start(0===l&&i.onRest)},f.stop=function(){return f.animation.stopAnimation()},n&&f.start(),i.interpolators[p]=f.interpolation,_extends({},e,((c={})[p]=f,c))},{});var c=this.propsAnimated;this.propsAnimated=new exports$2.AnimatedProps(this.interpolators,this.callback),c&&c.__detach()},i.componentWillReceiveProps=function(t){this.update(t,!0)},i.componentDidMount=function(){Object.values(this.animations).forEach(function(t){return(0,t.start)()})},i.componentWillUnmount=function(){Object.values(this.animations).forEach(function(t){return(0,t.stop)()})},i.render=function(){var t=this.props,e=t.children,n=(t.from,t.to,t.config,t.native),i=_objectWithoutProperties(t,["children","from","to","config","native"]);return e(_extends({},n?this.interpolators:this.propsAnimated.__getValue(),i))},n}(React.PureComponent),n.propTypes={to:PropTypes.oneOfType([PropTypes.object,PropTypes.func]),from:PropTypes.object,config:PropTypes.object,native:PropTypes.bool,onRest:PropTypes.func},n.defaultProps={from:{},to:{},config:e,native:!1},r=function(){var t=this;this.callback=function(){return!t.props.native&&t.forceUpdate()},this.onRest=function(e){return e.finished&&t.props.onRest&&t.props.onRest()}},i}function createTransition(t,e){var n,i,r=createAnimation(t,e);return i=n=function(t){function e(e){var n;n=t.call(this)||this;var i=e.children,r=e.keys,a=e.from,o=e.enter;e.leave;return Array.isArray(i)||(i=[i]),Array.isArray(r)||(r=[r]),n.state={transitionsKeys:r,transitions:i.map(function(t,e){return{children:t,key:r[e],to:o,from:a}})},n}_inheritsLoose(e,t);var n=e.prototype;return n.componentWillReceiveProps=function(t){var e=this,n=this.state,i=n.transitions,r=n.transitionsKeys,a=t.children,o=t.keys,s=t.from,l=t.enter,u=t.leave;Array.isArray(a)||(a=[a]),Array.isArray(o)||(o=[o]);var c=new Set(o),p=new Set(r),h=o.filter(function(t){return!p.has(t)}),f=r.filter(function(t){return!c.has(t)});i=i.map(function(t){if(void 0===t.destroy){var e=o.indexOf(t.key),n=a[e];n&&(t.children=n)}return t}),h.length&&h.forEach(function(t){var e=o.indexOf(t),n={children:a[e],key:t,to:l,from:s};i=i.slice(0,e).concat([n],i.slice(e))}),f.length&&f.forEach(function(t){var n=i.find(function(e){return e.key===t});if(n){var r={destroy:!0,children:n.children,key:t,to:u,from:s,onRest:function(){return e.setState(function(t){return{transitions:t.transitions.filter(function(t){return t!==r})}})}};i=i.map(function(t){return t===n?r:t})}}),r=i.filter(function(t){return void 0===t.destroy}).map(function(t){return t.key});var d=o.map(function(t){return i.find(function(e){return e.key===t})});f.forEach(function(t){var e=i.findIndex(function(e){return e.key===t}),n=i.find(function(e){return e.key===t});n&&(d=d.slice(0,e).concat([n],d.slice(e)))}),this.setState({transitions:d,transitionsKeys:r})},n.render=function(){var t=this.props,e=(t.children,t.from,t.enter,t.leave,t.native),n=t.config,i=(t.keys,_objectWithoutProperties(t,["children","from","enter","leave","native","config","keys"]));return this.state.transitions.map(function(t){var a=t.key,o=_objectWithoutProperties(t,["key"]);return React.createElement(r,_extends({key:a,native:e,config:n},o,i))})},e}(React.PureComponent),n.propTypes={native:PropTypes.bool,config:PropTypes.object,from:PropTypes.object,enter:PropTypes.object,leave:PropTypes.object,keys:PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string,PropTypes.number])),PropTypes.number]),children:PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.func),PropTypes.func])},n.defaultProps={from:{},enter:{},leave:{},native:!1,config:e},i}function createTrail(t,e){var n,i,r=createAnimation(t,e);return i=n=function(t){function e(){return t.apply(this,arguments)||this}return _inheritsLoose(e,t),e.prototype.render=function(){var t=this.props,e=t.children,n=t.from,i=t.to,a=t.native,o=t.config,s=t.keys,l=(_objectWithoutProperties(t,["children","from","to","native","config","keys"]),new Set);return e.map(function(t,e){return React.createElement(r,{key:s[e],native:a,config:o,from:n,to:i,attach:function(t){return function(t,e){return l.add(e),0===t?void 0:Array.from(l)[t-1]}(e,t)},children:t})})},e}(React.PureComponent),n.propTypes={native:PropTypes.bool,config:PropTypes.object,from:PropTypes.object,to:PropTypes.object,keys:PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string,PropTypes.number])),PropTypes.number]),children:PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.func),PropTypes.func])},n.defaultProps={from:{},to:{},native:!1,config:e},i}var Spring=createAnimation(exports$2.spring,config.default),SpringTransition=createTransition(exports$2.spring,config.default),SpringTrail=createTrail(exports$2.spring,config.default),template=exports$2.template,animated=exports$2.elements;export{createAnimation,createTransition,createTrail,Spring,SpringTransition,SpringStagger,SpringTrail,config,template,animated};

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

"use strict";function _interopDefault(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var React=_interopDefault(require("react")),PropTypes=_interopDefault(require("prop-types"));function _extends(){return(_extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function _objectWithoutProperties(t,e){if(null==t)return{};var n,i,r={},a=Object.keys(t);for(i=0;i<a.length;i++)n=a[i],e.indexOf(n)>=0||(r[n]=t[n]);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var tinyUuid=function(t,e){for(e=t="";t++<36;e+=51*t&52?(15^t?8^Math.random()*(20^t?16:4):4).toString(16):"-");return e},NODE_ENV=process.env.NODE_ENV,invariant=function(t,e,n,i,r,a,o,s){if("production"!==NODE_ENV&&void 0===e)throw new Error("invariant requires an error message argument");if(!t){var l;if(void 0===e)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,i,r,a,o,s],c=0;(l=new Error(e.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}},invariant_1=invariant,Animated=function(){function t(){}var e=t.prototype;return e.__attach=function(){},e.__detach=function(){},e.__getValue=function(){},e.__getAnimatedValue=function(){return this.__getValue()},e.__addChild=function(t){},e.__removeChild=function(t){},e.__getChildren=function(){return[]},t}(),AnimatedWithChildren=function(t){function e(){var e;return(e=t.call(this)||this)._children=[],e}_inheritsLoose(e,t);var n=e.prototype;return n.__addChild=function(t){0===this._children.length&&this.__attach(),this._children.push(t)},n.__removeChild=function(t){var e=this._children.indexOf(t);-1!==e?(this._children.splice(e,1),0===this._children.length&&this.__detach()):console.warn("Trying to remove a child that doesn't exist")},n.__getChildren=function(){return this._children},e}(Animated),InteractionManager={current:{createInteractionHandle:function(){},clearInteractionHandle:function(){}},inject:function(t){InteractionManager.current=t}};function normalizeColor(t){var e;return"number"==typeof t?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=matchers.hex6.exec(t))?parseInt(e[1]+"ff",16)>>>0:names.hasOwnProperty(t)?names[t]:(e=matchers.rgb.exec(t))?(parse255(e[1])<<24|parse255(e[2])<<16|parse255(e[3])<<8|255)>>>0:(e=matchers.rgba.exec(t))?(parse255(e[1])<<24|parse255(e[2])<<16|parse255(e[3])<<8|parse1(e[4]))>>>0:(e=matchers.hex3.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=matchers.hex8.exec(t))?parseInt(e[1],16)>>>0:(e=matchers.hex4.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=matchers.hsl.exec(t))?(255|hslToRgb(parse360(e[1]),parsePercentage(e[2]),parsePercentage(e[3])))>>>0:(e=matchers.hsla.exec(t))?(hslToRgb(parse360(e[1]),parsePercentage(e[2]),parsePercentage(e[3]))|parse1(e[4]))>>>0:null}function hue2rgb(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function hslToRgb(t,e,n){var i=n<.5?n*(1+e):n+e-n*e,r=2*n-i,a=hue2rgb(r,i,t+1/3),o=hue2rgb(r,i,t),s=hue2rgb(r,i,t-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(t){return Array.prototype.slice.call(t,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(t){var e=parseInt(t,10);return e<0?0:e>255?255:e}function parse360(t){return(parseFloat(t)%360+360)%360/360}function parse1(t){var e=parseFloat(t);return e<0?0:e>1?255:Math.round(255*e)}function parsePercentage(t){var e=parseFloat(t,10);return e<0?0:e>100?1:e/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(t){return{r:Math.round((4278190080&t)>>>24),g:Math.round((16711680&t)>>>16),b:Math.round((65280&t)>>>8),a:((255&t)>>>0)/255}}normalizeColor.rgba=rgba;var normalizeCssColor=normalizeColor,linear=function(t){return t},Interpolation=function(){function t(){}return t.create=function(t){if(t.outputRange&&"string"==typeof t.outputRange[0])return createInterpolationFromStringOutputRange(t);var e=t.outputRange;checkInfiniteRange("outputRange",e);var n=t.inputRange;checkInfiniteRange("inputRange",n),checkValidInputRange(n),invariant_1(n.length===e.length,"inputRange ("+n.length+") and outputRange ("+e.length+") must have the same length");var i=t.easing||linear,r="extend";void 0!==t.extrapolateLeft?r=t.extrapolateLeft:void 0!==t.extrapolate&&(r=t.extrapolate);var a="extend";return void 0!==t.extrapolateRight?a=t.extrapolateRight:void 0!==t.extrapolate&&(a=t.extrapolate),function(t){invariant_1("number"==typeof t,"Cannot interpolation an input which is not a number");var o=findRange(t,n);return interpolate(t,n[o],n[o+1],e[o],e[o+1],i,r,a)}},t}();function interpolate(t,e,n,i,r,a,o,s){var l=t;if(l<e){if("identity"===o)return l;"clamp"===o&&(l=e)}if(l>n){if("identity"===s)return l;"clamp"===s&&(l=n)}return i===r?i:e===n?t<=e?i:r:(e===-1/0?l=-l:n===1/0?l-=e:l=(l-e)/(n-e),l=a(l),i===-1/0?l=-l:r===1/0?l+=i:l=l*(r-i)+i,l)}function colorToRgba(t){var e=normalizeCssColor(t);return null===e?t:"rgba("+((4278190080&(e=e||0))>>>24)+", "+((16711680&e)>>>16)+", "+((65280&e)>>>8)+", "+(255&e)/255+")"}var stringShapeRegex=/[0-9\.-]+/g;function createInterpolationFromStringOutputRange(t){var e=t.outputRange;invariant_1(e.length>=2,"Bad output range"),checkPattern(e=e.map(colorToRgba));var n=e[0].match(stringShapeRegex).map(function(){return[]});e.forEach(function(t){t.match(stringShapeRegex).forEach(function(t,e){n[e].push(+t)})});var i=e[0].match(stringShapeRegex).map(function(e,i){return Interpolation.create(_extends({},t,{outputRange:n[i]}))}),r=/^rgb/.test(e[0]);return function(t){var n=0;return e[0].replace(stringShapeRegex,function(){var e=i[n++](t);return String(r&&n<4?Math.round(e):e)})}}function checkPattern(t){for(var e=t[0].replace(stringShapeRegex,""),n=1;n<t.length;++n)invariant_1(e===t[n].replace(stringShapeRegex,""),"invalid pattern "+t[0]+" and "+t[n])}function findRange(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}function checkValidInputRange(t){invariant_1(t.length>=2,"inputRange must have at least 2 elements");for(var e=1;e<t.length;++e)invariant_1(t[e]>=t[e-1],"inputRange must be monotonically increasing "+t)}function checkInfiniteRange(t,e){invariant_1(e.length>=2,t+" must have at least 2 elements"),invariant_1(2!==e.length||e[0]!==-1/0||e[1]!==1/0,t+"cannot be ]-infinity;+infinity[ "+e)}var _uniqueId=0;function uniqueId(){return String(_uniqueId++)}var AnimatedInterpolation=function(t){function e(e,n){var i;return(i=t.call(this)||this)._parent=e,i._interpolation=n,i._listeners={},i}_inheritsLoose(e,t);var n=e.prototype;return n.__getValue=function(){var t=this._parent.__getValue();return invariant_1("number"==typeof t,"Cannot interpolate an input which is not a number."),this._interpolation(t)},n.addListener=function(t){var e=this;this._parentListener||(this._parentListener=this._parent.addListener(function(){for(var t in e._listeners)e._listeners[t]({value:e.__getValue()})}));var n=uniqueId();return this._listeners[n]=t,n},n.removeListener=function(t){delete this._listeners[t]},n.interpolate=function(t){return new e(this,Interpolation.create(t))},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this),this._parentListener=this._parent.removeListener(this._parentListener)},e}(AnimatedWithChildren),Animation=function(){function t(){}var e=t.prototype;return e.start=function(t,e,n,i){},e.stop=function(){},e.__debouncedOnEnd=function(t){var e=this.__onEnd;this.__onEnd=null,e&&e(t)},t}();function _flush(t){var e=new Set;!function t(n){"function"==typeof n.update?e.add(n):n.__getChildren().forEach(t)}(t),e.forEach(function(t){return t.update()})}var AnimatedValue=function(t){function e(e){var n;return(n=t.call(this)||this)._value=e,n._offset=0,n._animation=null,n._listeners={},n}_inheritsLoose(e,t);var n=e.prototype;return n.__detach=function(){this.stopAnimation()},n.__getValue=function(){return this._value+this._offset},n.setValue=function(t){this._animation&&(this._animation.stop(),this._animation=null),this._updateValue(t)},n.setOffset=function(t){this._offset=t},n.flattenOffset=function(){this._value+=this._offset,this._offset=0},n.addListener=function(t){var e=uniqueId();return this._listeners[e]=t,e},n.removeListener=function(t){delete this._listeners[t]},n.removeAllListeners=function(){this._listeners={}},n.stopAnimation=function(t){this.stopTracking(),this._animation&&this._animation.stop(),this._animation=null,t&&t(this.__getValue())},n.interpolate=function(t){return new AnimatedInterpolation(this,Interpolation.create(t))},n.animate=function(t,e){var n=this,i=null;t.__isInteraction&&(i=InteractionManager.current.createInteractionHandle());var r=this._animation;this._animation&&this._animation.stop(),this._animation=t,t.start(this._value,function(t){n._updateValue(t)},function(t){n._animation=null,null!==i&&InteractionManager.current.clearInteractionHandle(i),e&&e(t)},r)},n.stopTracking=function(){this._tracking&&this._tracking.__detach(),this._tracking=null},n.track=function(t){this.stopTracking(),this._tracking=t},n._updateValue=function(t){for(var e in this._value=t,_flush(this),this._listeners)this._listeners[e]({value:this.__getValue()})},e}(AnimatedWithChildren),AnimatedTemplate=function(t){function e(e,n){var i;return(i=t.call(this)||this)._strings=e,i._values=n,i}_inheritsLoose(e,t);var n=e.prototype;return n.__transformValue=function(t){return t instanceof Animated?t.__getValue():t},n.__getValue=function(){for(var t=this._strings[0],e=0;e<this._values.length;++e)t+=this.__transformValue(this._values[e])+this._strings[1+e];return t},n.__attach=function(){for(var t=0;t<this._values.length;++t)this._values[t]instanceof Animated&&this._values[t].__addChild(this)},n.__detach=function(){for(var t=0;t<this._values.length;++t)this._values[t]instanceof Animated&&this._values[t].__removeChild(this)},e}(AnimatedWithChildren),AnimatedTracking=function(t){function e(e,n,i,r,a){var o;return(o=t.call(this)||this)._value=e,o._parent=n,o._animationClass=i,o._animationConfig=r,o._callback=a,o.__attach(),o}_inheritsLoose(e,t);var n=e.prototype;return n.__getValue=function(){return this._parent.__getValue()},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this)},n.update=function(){this._value.animate(new this._animationClass(_extends({},this._animationConfig,{toValue:this._animationConfig.toValue.__getValue()})),this._callback)},e}(Animated),RequestAnimationFrame={current:function(t){return global.requestAnimationFrame(t)},inject:function(t){RequestAnimationFrame.current=t}},CancelAnimationFrame={current:function(t){return global.cancelAnimationFrame(t)},inject:function(t){CancelAnimationFrame.current=t}};function tensionFromOrigamiValue(t){return 3.62*(t-30)+194}function frictionFromOrigamiValue(t){return 3*(t-8)+25}function fromOrigamiTensionAndFriction(t,e){return{tension:tensionFromOrigamiValue(t),friction:frictionFromOrigamiValue(e)}}function fromBouncinessAndSpeed(t,e){function n(t,e,n){return(t-e)/(n-e)}function i(t,e,n){return e+t*(n-e)}var r=n(t/1.7,0,20);r=i(r,0,.8);var a,o,s,l,u=i(n(e/1.7,0,20),.5,200),c=(a=r,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(t){return 44e-6*Math.pow(t,3)-.006*Math.pow(t,2)+.36*t+2}(s):function(t){return 4.5e-7*Math.pow(t,3)-332e-6*Math.pow(t,2)+.1078*t+5.84}(s),function(t,e,n){return t*n+(1-t)*e}(2*a-a*a,o,.01));return{tension:tensionFromOrigamiValue(u),friction:frictionFromOrigamiValue(c)}}var SpringConfig={fromOrigamiTensionAndFriction:fromOrigamiTensionAndFriction,fromBouncinessAndSpeed:fromBouncinessAndSpeed};function withDefault(t,e){return void 0===t||null===t?e:t}var SpringAnimation=function(t){function e(e){var n,i;return(n=t.call(this)||this)._overshootClamping=withDefault(e.overshootClamping,!1),n._restDisplacementThreshold=withDefault(e.restDisplacementThreshold,.001),n._restSpeedThreshold=withDefault(e.restSpeedThreshold,.001),n._initialVelocity=e.velocity,n._lastVelocity=withDefault(e.velocity,0),n._toValue=e.toValue,n.__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"),i=SpringConfig.fromBouncinessAndSpeed(withDefault(e.bounciness,8),withDefault(e.speed,12))):i=SpringConfig.fromOrigamiTensionAndFriction(withDefault(e.tension,40),withDefault(e.friction,7)),n._tension=i.tension,n._friction=i.friction,n}_inheritsLoose(e,t);var n=e.prototype;return n.start=function(t,n,i,r){if(this.__active=!0,this._startPosition=t,this._lastPosition=this._startPosition,this._onUpdate=n,this.__onEnd=i,this._lastTime=Date.now(),r instanceof e){var a=r.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()},n.getInternalState=function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}},n.onUpdate=function(){var t=this._lastPosition,e=this._lastVelocity,n=this._lastPosition,i=this._lastVelocity,r=Date.now();r>this._lastTime+64&&(r=this._lastTime+64);for(var a=Math.floor((r-this._lastTime)/1),o=0;o<a;++o){var s=e,l=this._tension*(this._toValue-n)-this._friction*i,u=(n=t+.001*s/2,i=e+.001*l/2),c=this._tension*(this._toValue-n)-this._friction*i;n=t+.001*u/2;var h=i=e+.001*c/2,p=this._tension*(this._toValue-n)-this._friction*i;n=t+.001*h/2;var f=i=e+.001*p/2,d=this._tension*(this._toValue-n)-this._friction*i;n=t+.001*h/2,i=e+.001*p/2,t+=.001*((s+2*(u+h)+f)/6),e+=.001*((l+2*(c+p)+d)/6)}if(this._lastTime=r,this._lastPosition=t,this._lastVelocity=e,this._onUpdate(t),this.__active){var _=!1;this._overshootClamping&&0!==this._tension&&(_=this._startPosition<this._toValue?t>this._toValue:t<this._toValue);var m=Math.abs(e)<=this._restSpeedThreshold,g=!0;if(0!==this._tension&&(g=Math.abs(this._toValue-t)<=this._restDisplacementThreshold),_||m&&g)return 0!==this._tension&&this._onUpdate(this._toValue),void this.__debouncedOnEnd({finished:!0});this._animationFrame=RequestAnimationFrame.current(this.onUpdate.bind(this))}},n.stop=function(){this.__active=!1,CancelAnimationFrame.current(this._animationFrame),this.__debouncedOnEnd({finished:!1})},e}(Animation),AnimatedTransform=function(t){function e(e){var n;return(n=t.call(this)||this)._transforms=e,n}_inheritsLoose(e,t);var n=e.prototype;return n.__getValue=function(){return this._transforms.map(function(t){var e={};for(var n in t){var i=t[n];e[n]=i instanceof Animated?i.__getValue():i}return e})},n.__getAnimatedValue=function(){return this._transforms.map(function(t){var e={};for(var n in t){var i=t[n];e[n]=i instanceof Animated?i.__getAnimatedValue():i}return e})},n.__attach=function(){var t=this;this._transforms.forEach(function(e){for(var n in e){var i=e[n];i instanceof Animated&&i.__addChild(t)}})},n.__detach=function(){var t=this;this._transforms.forEach(function(e){for(var n in e){var i=e[n];i instanceof Animated&&i.__removeChild(t)}})},e}(AnimatedWithChildren),FlattenStyle={current:function(t){return t},inject:function(t){FlattenStyle.current=t}},AnimatedStyle=function(t){function e(e){var n;return n=t.call(this)||this,!(e=FlattenStyle.current(e)||{}).transform||e.transform instanceof Animated||(e=_extends({},e,{transform:new AnimatedTransform(e.transform)})),n._style=e,n}_inheritsLoose(e,t);var n=e.prototype;return n.__getValue=function(){var t={};for(var e in this._style){var n=this._style[e];t[e]=n instanceof Animated?n.__getValue():n}return t},n.__getAnimatedValue=function(){var t={};for(var e in this._style){var n=this._style[e];n instanceof Animated&&(t[e]=n.__getAnimatedValue())}return t},n.__attach=function(){for(var t in this._style){var e=this._style[t];e instanceof Animated&&e.__addChild(this)}},n.__detach=function(){for(var t in this._style){var e=this._style[t];e instanceof Animated&&e.__removeChild(this)}},e}(AnimatedWithChildren),AnimatedProps=function(t){function e(e,n){var i;return i=t.call(this)||this,e.style&&(e=_extends({},e,{style:new AnimatedStyle(e.style)})),i._props=e,i._callback=n,i.__attach(),i}_inheritsLoose(e,t);var n=e.prototype;return n.__getValue=function(){var t={};for(var e in this._props){var n=this._props[e];t[e]=n instanceof Animated?n.__getValue():n}return t},n.__getAnimatedValue=function(){var t={};for(var e in this._props){var n=this._props[e];n instanceof Animated&&(t[e]=n.__getAnimatedValue())}return t},n.__attach=function(){for(var t in this._props){var e=this._props[t];e instanceof Animated&&e.__addChild(this)}},n.__detach=function(){for(var t in this._props){var e=this._props[t];e instanceof Animated&&e.__removeChild(this)}},n.update=function(){this._callback()},e}(Animated),ApplyAnimatedValues={current:function(t,e){if(!t.setNativeProps)return!1;t.setNativeProps(e)},transformStyles:function(t){return t},inject:function(t,e){ApplyAnimatedValues.current=t,ApplyAnimatedValues.transformStyles=e}};function createAnimatedComponent(t){var e=function(e){function n(){return e.apply(this,arguments)||this}_inheritsLoose(n,e);var i=n.prototype;return i.componentWillUnmount=function(){this._propsAnimated&&this._propsAnimated.__detach()},i.setNativeProps=function(t){this.refName&&ApplyAnimatedValues.current(this.refName,t,this)||this.forceUpdate()},i.componentWillMount=function(){this.attachProps(this.props)},i.attachProps=function(t){var e=this,n=this._propsAnimated;this._propsAnimated=new AnimatedProps(t,function(){e.refName&&ApplyAnimatedValues.current(e.refName,e._propsAnimated.__getAnimatedValue(),e)||e.forceUpdate()}),n&&n.__detach()},i.componentWillReceiveProps=function(t){this.attachProps(t)},i.render=function(){var e=this,n=this._propsAnimated.__getValue(),i=n.style,r=_objectWithoutProperties(n,["style"]);return React.createElement(t,_extends({},r,{style:ApplyAnimatedValues.transformStyles(i),ref:function(t){return e.refName=t}}))},n}(React.Component);return"production"!==process.env.NODE_ENV&&(e.propTypes={style:function(e,n,i){t.propTypes}}),e}var spring=function(t,e){return{start:function(n){var i=t,r=e;i.stopTracking(),e.toValue instanceof Animated?i.track(new AnimatedTracking(i,e.toValue,SpringAnimation,r,n)):i.animate(new SpringAnimation(r),n)},stop:function(){t.stopAnimation()}}},exports$1={Value:AnimatedValue,spring:spring,template:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return new AnimatedTemplate(t,n)},createAnimatedComponent:createAnimatedComponent,inject:{ApplyAnimatedValues:ApplyAnimatedValues.inject,InteractionManager:InteractionManager.inject,FlattenStyle:FlattenStyle.inject,RequestAnimationFrame:RequestAnimationFrame.inject,CancelAnimationFrame:CancelAnimationFrame.inject},ApplyAnimatedValues:ApplyAnimatedValues,AnimatedProps:AnimatedProps},transformWithLengthUnits={translateX:!0,translateY:!0,translateZ:!0,perspective:!0};function mapTransform(t){var e=Object.keys(t)[0],n=transformWithLengthUnits[e]&&"number"==typeof t[e]?"px":"";return e+"("+t[e]+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(t,e){return t+e.charAt(0).toUpperCase()+e.substring(1)}var prefixes=["Webkit","ms","Moz","O"];function mapStyle(t){return t&&t.transform&&"string"!=typeof t.transform&&(t.transform=t.transform.map(mapTransform).join(" ")),t}function dangerousStyleValue(t,e,n){return null==e||"boolean"==typeof e||""===e?"":n||"number"!=typeof e||0===e||isUnitlessNumber.hasOwnProperty(t)&&isUnitlessNumber[t]?(""+e).trim():e+"px"}function setValueForStyles(t,e){var n=t.style;for(var i in e)if(e.hasOwnProperty(i)){var r=0===i.indexOf("--"),a=dangerousStyleValue(i,e[i],r);"float"===i&&(i="cssFloat"),r?n.setProperty(i,a):n[i]=a}}function ApplyAnimatedValues$1(t,e){if(t.setNativeProps)t.setNativeProps(e);else{if(!t.nodeType||void 0===t.setAttribute)return!1;setValueForStyles(t,mapStyle(e.style))}}Object.keys(isUnitlessNumber).forEach(function(t){prefixes.forEach(function(e){isUnitlessNumber[prefixKey(e,t)]=isUnitlessNumber[t]})}),exports$1.inject.ApplyAnimatedValues(ApplyAnimatedValues$1,mapStyle);var elements=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].reduce(function(t,e){var n;return _extends({},t,((n={})[e]=exports$1.createAnimatedComponent(e),n))},{}),exports$2=_extends({},exports$1,{elements:elements});function createAnimation(t,e){var n,i,r;return i=n=function(e){function n(t){var n;n=e.call(this)||this,r.call(_assertThisInitialized(n));t.children,t.to,t.from,t.native;return n._animation=new exports$2.Value(0),n._updateInterpolations(t),n}_inheritsLoose(n,e);var i=n.prototype;return i._attachProps=function(t){var e=this._propsAnimated;this._propsAnimated=new exports$2.AnimatedProps(t,this._callback),e&&e.__detach()},i._mapValues=function(t,e,n,i){var r=t.from,a=this._animation._value,o=this._interpolations&&this._interpolations[i]&&this._interpolations[i].interpolate._interpolation(a),s=void 0!==o?o:void 0!==r[e]?r[e]:n;return{name:e,interpolate:this._animation.interpolate({inputRange:[0,1],outputRange:[s,n]})}},i.componentWillReceiveProps=function(t){this._updateAnimations(t)},i.componentDidMount=function(){t(this._animation,_extends({toValue:1},this.props.config)).start(this._onRest)},i.componentWillUnmount=function(){this._animation.stopAnimation()},i.render=function(){var t=this.props,e=t.children,n=(t.from,t.to,t.config,t.native),i=_objectWithoutProperties(t,["children","from","to","config","native"]);return e(_extends({},n?this._to:this._propsAnimated.__getValue(),i))},n}(React.PureComponent),n.propTypes={to:PropTypes.object,from:PropTypes.object,config:PropTypes.object,native:PropTypes.bool,onRest:PropTypes.func},n.defaultProps={to:{},from:{},config:e,native:!1},r=function(){var e=this;this._callback=function(){return!e.props.native&&e.forceUpdate()},this._updateInterpolations=function(t){var n=t.from,i=t.to;e._interpolations=Object.entries(_extends({},n,i)).map(function(n,i){var r=n[0],a=n[1];return e._mapValues(t,r,a,i)}),e._to=e._interpolations.reduce(function(t,e){var n;return _extends({},t,((n={})[e.name]=e.interpolate,n))},{}),e._attachProps(e._to)},this._updateAnimations=function(n){n.to,n.from;var i=n.config;e._updateInterpolations(n),e._animation.stopAnimation(),e._animation.setValue(0),t(e._animation,_extends({toValue:1},i)).start(e._onRest)},this._onRest=function(t){t.finished&&e.props.onRest&&e.props.onRest()}},i}function createTransition(t,e){var n,i,r=createAnimation(t,e);return i=n=function(t){function e(e){var n;n=t.call(this)||this;var i=e.children,r=e.keys,a=e.from,o=e.enter;e.leave;return Array.isArray(i)||(i=[i],r=[tinyUuid()]),n.state={transitionsKeys:r,transitions:i.map(function(t,e){return{children:t,key:r[e],to:o,from:a}})},n}_inheritsLoose(e,t);var n=e.prototype;return n.componentWillReceiveProps=function(t){var e=this,n=this.state,i=n.transitions,r=n.transitionsKeys,a=(t.native,t.children),o=t.keys,s=t.from,l=t.enter,u=t.leave;Array.isArray(a)||(a=[a],o=[t.children!==this.props.children?tinyUuid():this.props.transitionsKeys[0]]);var c=new Set(o),h=new Set(r),p=o.filter(function(t){return!h.has(t)}),f=r.filter(function(t){return!c.has(t)});i=i.map(function(t){if(void 0===t.destroy){var e=o.indexOf(t.key),n=a[e];n&&(t.children=n)}return t}),p.length&&p.forEach(function(t){var e=o.indexOf(t),n={children:a[e],key:t,to:l,from:s};i=i.slice(0,e).concat([n],i.slice(e))}),f.length&&f.forEach(function(t){var n=i.find(function(e){return e.key===t});if(n){var r={destroy:!0,children:n.children,key:t,to:u,from:s,onRest:function(){return e.setState(function(t){return{transitions:t.transitions.filter(function(t){return t!==r})}})}};i=i.map(function(t){return t===n?r:t})}}),r=i.filter(function(t){return void 0===t.destroy}).map(function(t){return t.key});var d=o.map(function(t){return i.find(function(e){return e.key===t})});f.forEach(function(t){var e=i.findIndex(function(e){return e.key===t}),n=i.find(function(e){return e.key===t});n&&(d=d.slice(0,e).concat([n],d.slice(e)))}),this.setState({transitions:d,transitionsKeys:r})},n.render=function(){return this.state.transitions.map(function(t){var e=t.key,n=_objectWithoutProperties(t,["key"]);return React.createElement(r,_extends({},n,{key:e}))})},e}(React.PureComponent),n.propTypes={from:PropTypes.object,enter:PropTypes.object,leave:PropTypes.object,keys:PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string,PropTypes.number])),native:PropTypes.bool},i}var Spring=createAnimation(exports$2.spring,{tension:170,friction:26}),SpringTransition=createTransition(exports$2.spring,{tension:170,friction:26}),template=exports$2.template,animated=exports$2.elements;exports.createAnimation=createAnimation,exports.createTransition=createTransition,exports.Spring=Spring,exports.SpringTransition=SpringTransition,exports.template=template,exports.animated=animated;
"use strict";function _interopDefault(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var React=_interopDefault(require("react")),PropTypes=_interopDefault(require("prop-types"));function _extends(){return(_extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function _objectWithoutProperties(t,e){if(null==t)return{};var n,i,r={},a=Object.keys(t);for(i=0;i<a.length;i++)n=a[i],e.indexOf(n)>=0||(r[n]=t[n]);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var NODE_ENV=process.env.NODE_ENV,invariant=function(t,e,n,i,r,a,o,s){if("production"!==NODE_ENV&&void 0===e)throw new Error("invariant requires an error message argument");if(!t){var l;if(void 0===e)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,i,r,a,o,s],c=0;(l=new Error(e.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}},invariant_1=invariant,Animated=function(){function t(){}var e=t.prototype;return e.__attach=function(){},e.__detach=function(){},e.__getValue=function(){},e.__getAnimatedValue=function(){return this.__getValue()},e.__addChild=function(t){},e.__removeChild=function(t){},e.__getChildren=function(){return[]},t}(),AnimatedWithChildren=function(t){function e(){var e;return(e=t.call(this)||this)._children=[],e}_inheritsLoose(e,t);var n=e.prototype;return n.__addChild=function(t){0===this._children.length&&this.__attach(),this._children.push(t)},n.__removeChild=function(t){var e=this._children.indexOf(t);-1!==e?(this._children.splice(e,1),0===this._children.length&&this.__detach()):console.warn("Trying to remove a child that doesn't exist")},n.__getChildren=function(){return this._children},e}(Animated),InteractionManager={current:{createInteractionHandle:function(){},clearInteractionHandle:function(){}},inject:function(t){InteractionManager.current=t}};function normalizeColor(t){var e;return"number"==typeof t?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=matchers.hex6.exec(t))?parseInt(e[1]+"ff",16)>>>0:names.hasOwnProperty(t)?names[t]:(e=matchers.rgb.exec(t))?(parse255(e[1])<<24|parse255(e[2])<<16|parse255(e[3])<<8|255)>>>0:(e=matchers.rgba.exec(t))?(parse255(e[1])<<24|parse255(e[2])<<16|parse255(e[3])<<8|parse1(e[4]))>>>0:(e=matchers.hex3.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=matchers.hex8.exec(t))?parseInt(e[1],16)>>>0:(e=matchers.hex4.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=matchers.hsl.exec(t))?(255|hslToRgb(parse360(e[1]),parsePercentage(e[2]),parsePercentage(e[3])))>>>0:(e=matchers.hsla.exec(t))?(hslToRgb(parse360(e[1]),parsePercentage(e[2]),parsePercentage(e[3]))|parse1(e[4]))>>>0:null}function hue2rgb(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function hslToRgb(t,e,n){var i=n<.5?n*(1+e):n+e-n*e,r=2*n-i,a=hue2rgb(r,i,t+1/3),o=hue2rgb(r,i,t),s=hue2rgb(r,i,t-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(t){return Array.prototype.slice.call(t,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(t){var e=parseInt(t,10);return e<0?0:e>255?255:e}function parse360(t){return(parseFloat(t)%360+360)%360/360}function parse1(t){var e=parseFloat(t);return e<0?0:e>1?255:Math.round(255*e)}function parsePercentage(t){var e=parseFloat(t,10);return e<0?0:e>100?1:e/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(t){return{r:Math.round((4278190080&t)>>>24),g:Math.round((16711680&t)>>>16),b:Math.round((65280&t)>>>8),a:((255&t)>>>0)/255}}normalizeColor.rgba=rgba;var normalizeCssColor=normalizeColor,linear=function(t){return t},Interpolation=function(){function t(){}return t.create=function(t){if(t.outputRange&&"string"==typeof t.outputRange[0])return createInterpolationFromStringOutputRange(t);var e=t.outputRange;checkInfiniteRange("outputRange",e);var n=t.inputRange;checkInfiniteRange("inputRange",n),checkValidInputRange(n),invariant_1(n.length===e.length,"inputRange ("+n.length+") and outputRange ("+e.length+") must have the same length");var i=t.easing||linear,r="extend";void 0!==t.extrapolateLeft?r=t.extrapolateLeft:void 0!==t.extrapolate&&(r=t.extrapolate);var a="extend";return void 0!==t.extrapolateRight?a=t.extrapolateRight:void 0!==t.extrapolate&&(a=t.extrapolate),function(t){invariant_1("number"==typeof t,"Cannot interpolation an input which is not a number");var o=findRange(t,n);return interpolate(t,n[o],n[o+1],e[o],e[o+1],i,r,a)}},t}();function interpolate(t,e,n,i,r,a,o,s){var l=t;if(l<e){if("identity"===o)return l;"clamp"===o&&(l=e)}if(l>n){if("identity"===s)return l;"clamp"===s&&(l=n)}return i===r?i:e===n?t<=e?i:r:(e===-1/0?l=-l:n===1/0?l-=e:l=(l-e)/(n-e),l=a(l),i===-1/0?l=-l:r===1/0?l+=i:l=l*(r-i)+i,l)}function colorToRgba(t){var e=normalizeCssColor(t);return null===e?t:"rgba("+((4278190080&(e=e||0))>>>24)+", "+((16711680&e)>>>16)+", "+((65280&e)>>>8)+", "+(255&e)/255+")"}var stringShapeRegex=/[0-9\.-]+/g;function createInterpolationFromStringOutputRange(t){var e=t.outputRange;invariant_1(e.length>=2,"Bad output range"),checkPattern(e=e.map(colorToRgba));var n=e[0].match(stringShapeRegex).map(function(){return[]});e.forEach(function(t){t.match(stringShapeRegex).forEach(function(t,e){n[e].push(+t)})});var i=e[0].match(stringShapeRegex).map(function(e,i){return Interpolation.create(_extends({},t,{outputRange:n[i]}))}),r=/^rgb/.test(e[0]);return function(t){var n=0;return e[0].replace(stringShapeRegex,function(){var e=i[n++](t);return String(r&&n<4?Math.round(e):e)})}}function checkPattern(t){for(var e=t[0].replace(stringShapeRegex,""),n=1;n<t.length;++n)invariant_1(e===t[n].replace(stringShapeRegex,""),"invalid pattern "+t[0]+" and "+t[n])}function findRange(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}function checkValidInputRange(t){invariant_1(t.length>=2,"inputRange must have at least 2 elements");for(var e=1;e<t.length;++e)invariant_1(t[e]>=t[e-1],"inputRange must be monotonically increasing "+t)}function checkInfiniteRange(t,e){invariant_1(e.length>=2,t+" must have at least 2 elements"),invariant_1(2!==e.length||e[0]!==-1/0||e[1]!==1/0,t+"cannot be ]-infinity;+infinity[ "+e)}var _uniqueId=0;function uniqueId(){return String(_uniqueId++)}var AnimatedInterpolation=function(t){function e(e,n){var i;return(i=t.call(this)||this)._parent=e,i._interpolation=n,i._listeners={},i}_inheritsLoose(e,t);var n=e.prototype;return n.__getValue=function(){var t=this._parent.__getValue();return invariant_1("number"==typeof t,"Cannot interpolate an input which is not a number."),this._interpolation(t)},n.addListener=function(t){var e=this;this._parentListener||(this._parentListener=this._parent.addListener(function(){for(var t in e._listeners)e._listeners[t]({value:e.__getValue()})}));var n=uniqueId();return this._listeners[n]=t,n},n.removeListener=function(t){delete this._listeners[t]},n.interpolate=function(t){return new e(this,Interpolation.create(t))},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this),this._parentListener=this._parent.removeListener(this._parentListener)},e}(AnimatedWithChildren),Animation=function(){function t(){}var e=t.prototype;return e.start=function(t,e,n,i){},e.stop=function(){},e.__debouncedOnEnd=function(t){var e=this.__onEnd;this.__onEnd=null,e&&e(t)},t}();function _flush(t){var e=new Set;!function t(n){"function"==typeof n.update?e.add(n):n.__getChildren().forEach(t)}(t),e.forEach(function(t){return t.update()})}var AnimatedValue=function(t){function e(e){var n;return(n=t.call(this)||this)._value=e,n._offset=0,n._animation=null,n._listeners={},n}_inheritsLoose(e,t);var n=e.prototype;return n.__detach=function(){this.stopAnimation()},n.__getValue=function(){return this._value+this._offset},n.setValue=function(t){this._animation&&(this._animation.stop(),this._animation=null),this._updateValue(t)},n.setOffset=function(t){this._offset=t},n.flattenOffset=function(){this._value+=this._offset,this._offset=0},n.addListener=function(t){var e=uniqueId();return this._listeners[e]=t,e},n.removeListener=function(t){delete this._listeners[t]},n.removeAllListeners=function(){this._listeners={}},n.stopAnimation=function(t){this.stopTracking(),this._animation&&this._animation.stop(),this._animation=null,t&&t(this.__getValue())},n.interpolate=function(t){return new AnimatedInterpolation(this,Interpolation.create(t))},n.animate=function(t,e){var n=this,i=null;t.__isInteraction&&(i=InteractionManager.current.createInteractionHandle());var r=this._animation;this._animation&&this._animation.stop(),this._animation=t,t.start(this._value,function(t){n._updateValue(t)},function(t){n._animation=null,null!==i&&InteractionManager.current.clearInteractionHandle(i),e&&e(t)},r)},n.stopTracking=function(){this._tracking&&this._tracking.__detach(),this._tracking=null},n.track=function(t){this.stopTracking(),this._tracking=t},n._updateValue=function(t){for(var e in this._value=t,_flush(this),this._listeners)this._listeners[e]({value:this.__getValue()})},e}(AnimatedWithChildren),AnimatedTemplate=function(t){function e(e,n){var i;return(i=t.call(this)||this)._strings=e,i._values=n,i}_inheritsLoose(e,t);var n=e.prototype;return n.__transformValue=function(t){return t instanceof Animated?t.__getValue():t},n.__getValue=function(){for(var t=this._strings[0],e=0;e<this._values.length;++e)t+=this.__transformValue(this._values[e])+this._strings[1+e];return t},n.__attach=function(){for(var t=0;t<this._values.length;++t)this._values[t]instanceof Animated&&this._values[t].__addChild(this)},n.__detach=function(){for(var t=0;t<this._values.length;++t)this._values[t]instanceof Animated&&this._values[t].__removeChild(this)},e}(AnimatedWithChildren),AnimatedTracking=function(t){function e(e,n,i,r,a){var o;return(o=t.call(this)||this)._value=e,o._parent=n,o._animationClass=i,o._animationConfig=r,o._callback=a,o.__attach(),o}_inheritsLoose(e,t);var n=e.prototype;return n.__getValue=function(){return this._parent.__getValue()},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this)},n.update=function(){this._value.animate(new this._animationClass(_extends({},this._animationConfig,{toValue:this._animationConfig.toValue.__getValue()})),this._callback)},e}(Animated),RequestAnimationFrame={current:function(t){return global.requestAnimationFrame(t)},inject:function(t){RequestAnimationFrame.current=t}},CancelAnimationFrame={current:function(t){return global.cancelAnimationFrame(t)},inject:function(t){CancelAnimationFrame.current=t}};function tensionFromOrigamiValue(t){return 3.62*(t-30)+194}function frictionFromOrigamiValue(t){return 3*(t-8)+25}function fromOrigamiTensionAndFriction(t,e){return{tension:tensionFromOrigamiValue(t),friction:frictionFromOrigamiValue(e)}}function fromBouncinessAndSpeed(t,e){function n(t,e,n){return(t-e)/(n-e)}function i(t,e,n){return e+t*(n-e)}var r=n(t/1.7,0,20);r=i(r,0,.8);var a,o,s,l,u=i(n(e/1.7,0,20),.5,200),c=(a=r,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(t){return 44e-6*Math.pow(t,3)-.006*Math.pow(t,2)+.36*t+2}(s):function(t){return 4.5e-7*Math.pow(t,3)-332e-6*Math.pow(t,2)+.1078*t+5.84}(s),function(t,e,n){return t*n+(1-t)*e}(2*a-a*a,o,.01));return{tension:tensionFromOrigamiValue(u),friction:frictionFromOrigamiValue(c)}}var SpringConfig={fromOrigamiTensionAndFriction:fromOrigamiTensionAndFriction,fromBouncinessAndSpeed:fromBouncinessAndSpeed};function withDefault(t,e){return void 0===t||null===t?e:t}var SpringAnimation=function(t){function e(e){var n,i;return(n=t.call(this)||this)._overshootClamping=withDefault(e.overshootClamping,!1),n._restDisplacementThreshold=withDefault(e.restDisplacementThreshold,.001),n._restSpeedThreshold=withDefault(e.restSpeedThreshold,.001),n._initialVelocity=e.velocity,n._lastVelocity=withDefault(e.velocity,0),n._toValue=e.toValue,n.__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"),i=SpringConfig.fromBouncinessAndSpeed(withDefault(e.bounciness,8),withDefault(e.speed,12))):i=SpringConfig.fromOrigamiTensionAndFriction(withDefault(e.tension,40),withDefault(e.friction,7)),n._tension=i.tension,n._friction=i.friction,n}_inheritsLoose(e,t);var n=e.prototype;return n.start=function(t,n,i,r){if(this.__active=!0,this._startPosition=t,this._lastPosition=this._startPosition,this._onUpdate=n,this.__onEnd=i,this._lastTime=Date.now(),r instanceof e){var a=r.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()},n.getInternalState=function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}},n.onUpdate=function(){var t=this._lastPosition,e=this._lastVelocity,n=this._lastPosition,i=this._lastVelocity,r=Date.now();r>this._lastTime+64&&(r=this._lastTime+64);for(var a=Math.floor((r-this._lastTime)/1),o=0;o<a;++o){var s=e,l=this._tension*(this._toValue-n)-this._friction*i,u=(n=t+.001*s/2,i=e+.001*l/2),c=this._tension*(this._toValue-n)-this._friction*i;n=t+.001*u/2;var p=i=e+.001*c/2,h=this._tension*(this._toValue-n)-this._friction*i;n=t+.001*p/2;var f=i=e+.001*h/2,d=this._tension*(this._toValue-n)-this._friction*i;n=t+.001*p/2,i=e+.001*h/2,t+=.001*((s+2*(u+p)+f)/6),e+=.001*((l+2*(c+h)+d)/6)}if(this._lastTime=r,this._lastPosition=t,this._lastVelocity=e,this._onUpdate(t),this.__active){var m=!1;this._overshootClamping&&0!==this._tension&&(m=this._startPosition<this._toValue?t>this._toValue:t<this._toValue);var _=Math.abs(e)<=this._restSpeedThreshold,g=!0;if(0!==this._tension&&(g=Math.abs(this._toValue-t)<=this._restDisplacementThreshold),m||_&&g)return 0!==this._tension&&this._onUpdate(this._toValue),void this.__debouncedOnEnd({finished:!0});this._animationFrame=RequestAnimationFrame.current(this.onUpdate.bind(this))}},n.stop=function(){this.__active=!1,CancelAnimationFrame.current(this._animationFrame),this.__debouncedOnEnd({finished:!1})},e}(Animation),AnimatedTransform=function(t){function e(e){var n;return(n=t.call(this)||this)._transforms=e,n}_inheritsLoose(e,t);var n=e.prototype;return n.__getValue=function(){return this._transforms.map(function(t){var e={};for(var n in t){var i=t[n];e[n]=i instanceof Animated?i.__getValue():i}return e})},n.__getAnimatedValue=function(){return this._transforms.map(function(t){var e={};for(var n in t){var i=t[n];e[n]=i instanceof Animated?i.__getAnimatedValue():i}return e})},n.__attach=function(){var t=this;this._transforms.forEach(function(e){for(var n in e){var i=e[n];i instanceof Animated&&i.__addChild(t)}})},n.__detach=function(){var t=this;this._transforms.forEach(function(e){for(var n in e){var i=e[n];i instanceof Animated&&i.__removeChild(t)}})},e}(AnimatedWithChildren),FlattenStyle={current:function(t){return t},inject:function(t){FlattenStyle.current=t}},AnimatedStyle=function(t){function e(e){var n;return n=t.call(this)||this,!(e=FlattenStyle.current(e)||{}).transform||e.transform instanceof Animated||(e=_extends({},e,{transform:new AnimatedTransform(e.transform)})),n._style=e,n}_inheritsLoose(e,t);var n=e.prototype;return n.__getValue=function(){var t={};for(var e in this._style){var n=this._style[e];t[e]=n instanceof Animated?n.__getValue():n}return t},n.__getAnimatedValue=function(){var t={};for(var e in this._style){var n=this._style[e];n instanceof Animated&&(t[e]=n.__getAnimatedValue())}return t},n.__attach=function(){for(var t in this._style){var e=this._style[t];e instanceof Animated&&e.__addChild(this)}},n.__detach=function(){for(var t in this._style){var e=this._style[t];e instanceof Animated&&e.__removeChild(this)}},e}(AnimatedWithChildren),AnimatedProps=function(t){function e(e,n){var i;return i=t.call(this)||this,e.style&&(e=_extends({},e,{style:new AnimatedStyle(e.style)})),i._props=e,i._callback=n,i.__attach(),i}_inheritsLoose(e,t);var n=e.prototype;return n.__getValue=function(){var t={};for(var e in this._props){var n=this._props[e];t[e]=n instanceof Animated?n.__getValue():n}return t},n.__getAnimatedValue=function(){var t={};for(var e in this._props){var n=this._props[e];n instanceof Animated&&(t[e]=n.__getAnimatedValue())}return t},n.__attach=function(){for(var t in this._props){var e=this._props[t];e instanceof Animated&&e.__addChild(this)}},n.__detach=function(){for(var t in this._props){var e=this._props[t];e instanceof Animated&&e.__removeChild(this)}},n.update=function(){this._callback()},e}(Animated),ApplyAnimatedValues={current:function(t,e){if(!t.setNativeProps)return!1;t.setNativeProps(e)},transformStyles:function(t){return t},inject:function(t,e){ApplyAnimatedValues.current=t,ApplyAnimatedValues.transformStyles=e}};function createAnimatedComponent(t){var e=function(e){function n(){return e.apply(this,arguments)||this}_inheritsLoose(n,e);var i=n.prototype;return i.componentWillUnmount=function(){this._propsAnimated&&this._propsAnimated.__detach()},i.setNativeProps=function(t){this.refName&&ApplyAnimatedValues.current(this.refName,t,this)||this.forceUpdate()},i.componentWillMount=function(){this.attachProps(this.props)},i.attachProps=function(t){var e=this,n=this._propsAnimated;this._propsAnimated=new AnimatedProps(t,function(){e.refName&&ApplyAnimatedValues.current(e.refName,e._propsAnimated.__getAnimatedValue(),e)||e.forceUpdate()}),n&&n.__detach()},i.componentWillReceiveProps=function(t){this.attachProps(t)},i.render=function(){var e=this,n=this._propsAnimated.__getValue(),i=n.style,r=_objectWithoutProperties(n,["style"]);return React.createElement(t,_extends({},r,{style:ApplyAnimatedValues.transformStyles(i),ref:function(t){return e.refName=t}}))},n}(React.Component);return"production"!==process.env.NODE_ENV&&(e.propTypes={style:function(e,n,i){t.propTypes}}),e}var spring=function(t,e){return{start:function(n){var i=t,r=e;i.stopTracking(),e.toValue instanceof Animated?i.track(new AnimatedTracking(i,e.toValue,SpringAnimation,r,n)):i.animate(new SpringAnimation(r),n)},stop:function(){t.stopAnimation()}}},exports$1={Value:AnimatedValue,spring:spring,template:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return new AnimatedTemplate(t,n)},createAnimatedComponent:createAnimatedComponent,inject:{ApplyAnimatedValues:ApplyAnimatedValues.inject,InteractionManager:InteractionManager.inject,FlattenStyle:FlattenStyle.inject,RequestAnimationFrame:RequestAnimationFrame.inject,CancelAnimationFrame:CancelAnimationFrame.inject},ApplyAnimatedValues:ApplyAnimatedValues,AnimatedProps:AnimatedProps},transformWithLengthUnits={translateX:!0,translateY:!0,translateZ:!0,perspective:!0};function mapTransform(t){var e=Object.keys(t)[0],n=transformWithLengthUnits[e]&&"number"==typeof t[e]?"px":"";return e+"("+t[e]+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(t,e){return t+e.charAt(0).toUpperCase()+e.substring(1)}var prefixes=["Webkit","ms","Moz","O"];function mapStyle(t){return t&&t.transform&&"string"!=typeof t.transform&&(t.transform=t.transform.map(mapTransform).join(" ")),t}function dangerousStyleValue(t,e,n){return null==e||"boolean"==typeof e||""===e?"":n||"number"!=typeof e||0===e||isUnitlessNumber.hasOwnProperty(t)&&isUnitlessNumber[t]?(""+e).trim():e+"px"}function setValueForStyles(t,e){var n=t.style;for(var i in e)if(e.hasOwnProperty(i)){var r=0===i.indexOf("--"),a=dangerousStyleValue(i,e[i],r);"float"===i&&(i="cssFloat"),r?n.setProperty(i,a):n[i]=a}}function ApplyAnimatedValues$1(t,e){if(t.setNativeProps)t.setNativeProps(e);else{if(!t.nodeType||void 0===t.setAttribute)return!1;setValueForStyles(t,mapStyle(e.style))}}Object.keys(isUnitlessNumber).forEach(function(t){prefixes.forEach(function(e){isUnitlessNumber[prefixKey(e,t)]=isUnitlessNumber[t]})}),exports$1.inject.ApplyAnimatedValues(ApplyAnimatedValues$1,mapStyle);var elements=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].reduce(function(t,e){var n;return _extends({},t,((n={})[e]=exports$1.createAnimatedComponent(e),n))},{}),exports$2=_extends({},exports$1,{elements:elements}),config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20}};function createAnimation(t,e){var n,i,r;return i=n=function(e){function n(t){var n;return n=e.call(this)||this,r.call(_assertThisInitialized(n)),n.defaultAnimation=new exports$2.Value(0),n.animations={},n.update(t,!1),n}_inheritsLoose(n,e);var i=n.prototype;return i.update=function(e,n){var i=this,r=e.from,a=e.to,o=e.config,s=e.attach;void 0===n&&(n=!1);var l=Object.entries(_extends({},r,a)),u=this.defaultAnimation._value;this.interpolators={},this.defaultAnimation.setValue(0),this.animations=l.reduce(function(e,a,l){var c,p=a[0],h=a[1],f=i.animations[p]||(i.animations[p]={}),d="number"==typeof h,m=void 0!==r[p]?r[p]:h,_=d?h:1;if(d&&s){var g=s(i),v=g&&g.animations[p];v&&(_=v.animation)}if(d)f.animation=f.interpolation=f.animation||new exports$2.Value(m);else{var y=f.interpolation&&f.interpolation._interpolation(u);f.animation=i.defaultAnimation,f.interpolation=i.defaultAnimation.interpolate({inputRange:[0,1],outputRange:[void 0!==y?y:m,h]})}return f.start=function(){return t(f.animation,_extends({toValue:_},o)).start(0===l&&i.onRest)},f.stop=function(){return f.animation.stopAnimation()},n&&f.start(),i.interpolators[p]=f.interpolation,_extends({},e,((c={})[p]=f,c))},{});var c=this.propsAnimated;this.propsAnimated=new exports$2.AnimatedProps(this.interpolators,this.callback),c&&c.__detach()},i.componentWillReceiveProps=function(t){this.update(t,!0)},i.componentDidMount=function(){Object.values(this.animations).forEach(function(t){return(0,t.start)()})},i.componentWillUnmount=function(){Object.values(this.animations).forEach(function(t){return(0,t.stop)()})},i.render=function(){var t=this.props,e=t.children,n=(t.from,t.to,t.config,t.native),i=_objectWithoutProperties(t,["children","from","to","config","native"]);return e(_extends({},n?this.interpolators:this.propsAnimated.__getValue(),i))},n}(React.PureComponent),n.propTypes={to:PropTypes.oneOfType([PropTypes.object,PropTypes.func]),from:PropTypes.object,config:PropTypes.object,native:PropTypes.bool,onRest:PropTypes.func},n.defaultProps={from:{},to:{},config:e,native:!1},r=function(){var t=this;this.callback=function(){return!t.props.native&&t.forceUpdate()},this.onRest=function(e){return e.finished&&t.props.onRest&&t.props.onRest()}},i}function createTransition(t,e){var n,i,r=createAnimation(t,e);return i=n=function(t){function e(e){var n;n=t.call(this)||this;var i=e.children,r=e.keys,a=e.from,o=e.enter;e.leave;return Array.isArray(i)||(i=[i]),Array.isArray(r)||(r=[r]),n.state={transitionsKeys:r,transitions:i.map(function(t,e){return{children:t,key:r[e],to:o,from:a}})},n}_inheritsLoose(e,t);var n=e.prototype;return n.componentWillReceiveProps=function(t){var e=this,n=this.state,i=n.transitions,r=n.transitionsKeys,a=t.children,o=t.keys,s=t.from,l=t.enter,u=t.leave;Array.isArray(a)||(a=[a]),Array.isArray(o)||(o=[o]);var c=new Set(o),p=new Set(r),h=o.filter(function(t){return!p.has(t)}),f=r.filter(function(t){return!c.has(t)});i=i.map(function(t){if(void 0===t.destroy){var e=o.indexOf(t.key),n=a[e];n&&(t.children=n)}return t}),h.length&&h.forEach(function(t){var e=o.indexOf(t),n={children:a[e],key:t,to:l,from:s};i=i.slice(0,e).concat([n],i.slice(e))}),f.length&&f.forEach(function(t){var n=i.find(function(e){return e.key===t});if(n){var r={destroy:!0,children:n.children,key:t,to:u,from:s,onRest:function(){return e.setState(function(t){return{transitions:t.transitions.filter(function(t){return t!==r})}})}};i=i.map(function(t){return t===n?r:t})}}),r=i.filter(function(t){return void 0===t.destroy}).map(function(t){return t.key});var d=o.map(function(t){return i.find(function(e){return e.key===t})});f.forEach(function(t){var e=i.findIndex(function(e){return e.key===t}),n=i.find(function(e){return e.key===t});n&&(d=d.slice(0,e).concat([n],d.slice(e)))}),this.setState({transitions:d,transitionsKeys:r})},n.render=function(){var t=this.props,e=(t.children,t.from,t.enter,t.leave,t.native),n=t.config,i=(t.keys,_objectWithoutProperties(t,["children","from","enter","leave","native","config","keys"]));return this.state.transitions.map(function(t){var a=t.key,o=_objectWithoutProperties(t,["key"]);return React.createElement(r,_extends({key:a,native:e,config:n},o,i))})},e}(React.PureComponent),n.propTypes={native:PropTypes.bool,config:PropTypes.object,from:PropTypes.object,enter:PropTypes.object,leave:PropTypes.object,keys:PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string,PropTypes.number])),PropTypes.number]),children:PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.func),PropTypes.func])},n.defaultProps={from:{},enter:{},leave:{},native:!1,config:e},i}function createTrail(t,e){var n,i,r=createAnimation(t,e);return i=n=function(t){function e(){return t.apply(this,arguments)||this}return _inheritsLoose(e,t),e.prototype.render=function(){var t=this.props,e=t.children,n=t.from,i=t.to,a=t.native,o=t.config,s=t.keys,l=(_objectWithoutProperties(t,["children","from","to","native","config","keys"]),new Set);return e.map(function(t,e){return React.createElement(r,{key:s[e],native:a,config:o,from:n,to:i,attach:function(t){return function(t,e){return l.add(e),0===t?void 0:Array.from(l)[t-1]}(e,t)},children:t})})},e}(React.PureComponent),n.propTypes={native:PropTypes.bool,config:PropTypes.object,from:PropTypes.object,to:PropTypes.object,keys:PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string,PropTypes.number])),PropTypes.number]),children:PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.func),PropTypes.func])},n.defaultProps={from:{},to:{},native:!1,config:e},i}var Spring=createAnimation(exports$2.spring,config.default),SpringTransition=createTransition(exports$2.spring,config.default),SpringTrail=createTrail(exports$2.spring,config.default),template=exports$2.template,animated=exports$2.elements;exports.createAnimation=createAnimation,exports.createTransition=createTransition,exports.createTrail=createTrail,exports.Spring=Spring,exports.SpringTransition=SpringTransition,exports.SpringStagger=SpringStagger,exports.SpringTrail=SpringTrail,exports.config=config,exports.template=template,exports.animated=animated;
{
"name": "react-spring",
"version": "2.0.5",
"version": "2.1.0",
"description": "Animate React with ease",

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

@@ -5,12 +5,13 @@ [![Build Status](https://travis-ci.org/drcmda/react-spring.svg?branch=master)](https://travis-ci.org/drcmda/react-spring) [![npm version](https://badge.fury.io/js/react-spring.svg)](https://badge.fury.io/js/react-spring)

<b>Examples</b>: [Api demonstration](https://codesandbox.io/embed/oln44nx8xq) | [Native rendering](https://codesandbox.io/embed/882njxpz29) | [Single transition](https://codesandbox.io/embed/yj52v5689) | [Multiple item transition](https://codesandbox.io/embed/j150ykxrv) | [Animated Todo MVC](https://codesandbox.io/embed/2pk8l7n7kn)
<b>Examples</b>: [Api demonstration](https://codesandbox.io/embed/oln44nx8xq) | [Native rendering](https://codesandbox.io/embed/882njxpz29) | [Single transition](https://codesandbox.io/embed/yj52v5689) | [Multiple item transition](https://codesandbox.io/embed/j150ykxrv) | [Animated Todo MVC](https://codesandbox.io/embed/2pk8l7n7kn) | [Staggered animation](https://codesandbox.io/s/vvmv6x01l5)
# Why 🤔
React-spring is a wrapper around a cooked down fork of [Facebooks animated](http://animatedjs.github.io/interactive-docs/). It is trying to bridge Chenglou's [React-motion](https://github.com/chenglou/react-motion) and animated as both have their pros and cons, but definitively could benefit from one another:
React-spring is a wrapper around a cooked down fork of [Facebooks animated](http://animatedjs.github.io/interactive-docs/). It is trying to bridge Chenglou's [React-motion](https://github.com/chenglou/react-motion) and animated, as both have their pros and cons, but definitively could benefit from one another:
### React-motion
* [x] Declarative api that doesn't involve manual management of handles
* [ ] Performance can suffer because components are re-rendered every frame
* [x] Declarative api that doesn't involve manual management of animations
* [x] Covers most of the essentials (springs, lists, transitions, reveals, staggered animations)
* [ ] Performance can suffer because components are re-rendered every frame with fresh props
* [ ] Can't interpolate between raw state as it doesn't know colors, paths, gradients, etc.

@@ -21,8 +22,9 @@

* [x] Interpolates most web privimites, units and patterns
* [x] Efficiently changes styles in the dom instead of re-rendering a component with fresh props frame by frame
* [x] Efficiently writes to the dom directly instead of re-rendering components frame by frame
* [ ] Managing and orchestrating handles (starting/stopping/waiting/cleaning) can become a real chore
* [ ] Missing essential prototypes like mount/unmount transitions
This lib inherits React-motions api while you can feed it everything animated can interpolate. It also has support for animateds efficient native rendering.
So as you see, they're polar opposites and the strengths of one are the weaknesses of another. React-spring inherits React-motions api while you can feed it everything animated can interpolate. It also has support for animateds efficient native rendering.
# Default rendering 🐎
# Default rendering 🏎

@@ -51,2 +53,3 @@ Like React-motion by default we'll render the receiving component every frame as it gives you more freedom to animate whatever you like. In many situations this will be ok.

}}>
{({ color, scale, rotate, path, start, stop, end }) => (

@@ -61,2 +64,3 @@ <div style={{ background: `linear-gradient(to bottom, ${start} ${stop}, ${end} 100%)` }}>

)}
</Spring>

@@ -66,2 +70,14 @@ )

Don't like the way render props wrap your code? You can always move out component definitions, like so:
```jsx
const Header = ({ text, ...styles }) => <h1 style={styles}>{text}</h1>
const App = () => (
<Spring to={{ color: 'red' }} text="extra props are spread over the child" children={Header}/>
)
```
Et voilà! Now you render a animated version of the `Header` component! It's actually faster as well since the function isn't recreated on every prop-change.
# Native rendering 🚀

@@ -73,6 +89,5 @@

1. You can only animate native styles and props
2. If you use transforms make sure it's an array
3. Receiving components have to be "animated components"
4. The values you receive are opaque objects, not regular values
1. You can only animate styles and standard props, the values you receive are opaque objects, not regular values
2. Receiving elements must be `animated.[elementName]`, for instance `div` becomes `animated.div`
3. You can slap animated values right into styles and props, `style.transform` takes an array

@@ -82,3 +97,3 @@ ```jsx

const App = () => (
const App = ({ toggle }) => (
<Spring

@@ -90,12 +105,11 @@ native

backgroundColor: toggle ? '#B2DBBF' : '#F3FFBD',
transform: [{ rotate: toggle ? '0deg' : '180deg' }, { scale: toggle ? 0.6 : 1.5 }],
rotate: toggle ? '0deg' : '180deg',
scale: toggle ? 0.6 : 1.5,
path: toggle ? TRIANGLE : RECTANGLE,
}}>
{({ toggle, fill, backgroundColor, transform, path }) => (
{({ fill, backgroundColor, rotate, scale, path }) => (
<animated.div style={{ backgroundColor }}>
<animated.svg style={{ transform, fill }}>
<g onClick={toggle}>
<animated.path d={path} />
</g>
<animated.svg style={{ transform: [{ rotate }, { scale }], fill }}>
<g><animated.path d={path} /></g>
</animated.svg>

@@ -109,3 +123,3 @@ </animated.div>

If you need to interpolate native styles, use `animated.template`. For instance, given that you receive startColor and endColor as animatable values you could do it like so:
If you need to interpolate native styles, use `template`. For instance, given that you receive the start of a gradient and its end as animatable values you could do it like so:

@@ -115,9 +129,6 @@ ```jsx

const Content = ({ startColor, endColor }) => {
const background = template`linear-gradient(bottom ${startColor} 0%, ${endColor} 100%)`
return (
<animated.div style={{ background }}>
...
</animated.div>
)
const Content = ({ start, end }) => (
<animated.h1 style={{ background: template`linear-gradient(${start} 0%, ${end} 100%)` }}>
hello
</animated.h1>
)

@@ -128,4 +139,4 @@

native
from={{ startColor: 'black', endColor: 'black' }}
to={{ startColor: '#70C1B3', endColor: 'seagreen' }}
from={{ start: 'black', end: 'black' }}
to={{ start: '#70C1B3', end: 'seagreen' }}
children={Content} />

@@ -135,11 +146,10 @@ )

# Transitions ☔️
# Transitions 🌑🌒🌓🌔🌕
Use `SpringTransition` and pass in your `keys`. `from` denotes base styles, `enter` styles are applied when objects appear, `leave` styles are applied when objects disappear. You do not pass in components as children but rather functions that receive a style object. Keys and children have to match in their order! You can again use the `native` flag for direct dom animation.
Use `SpringTransition` and pass in your `keys`. `from` denotes base styles, `enter` styles are applied when objects appear, `leave` styles are applied when objects disappear. Keys and children have to match in their order! You can again use the `native` flag for direct dom animation.
```jsx
import React, { PureComponent } from 'react'
import { SpringTransition, animated } from 'react-spring'
import { SpringTransition } from 'react-spring'
export default class AppContent extends PureComponent {
class AppContent extends PureComponent {
state = { items: ['item1', 'item2', 'item3'] }

@@ -167,1 +177,34 @@

```
You can use this prototype for two-state reveals, in that case simply render a single child that you can switch out for another.
```jsx
const App = ({ toggle }) => (
<SpringTransition
keys={toggle ? 'ComponentA' : 'ComponentB'}
from={{ opacity: 0 }}
enter={{ opacity: 1 }}
leave={{ opacity: 0 }}>
{toggle ? ComponentA : ComponentB}
</SpringTransition>
)
```
Trails/Staggered transitions 👣
Create trailing animations by using SpringTrail.
```jsx
import { SpringTrail } from 'react-spring'
const App = ({ items }) => (
<SpringTrail from={{ opacity: 0 }} to={{ opacity: 1 }} keys={items.map(item => item.key)}>
{items.map(item => styles => (
<div style={styles}>
{item.text}
</div>
))}
</SpringTrail>
)
```
import React from 'react'
import PropTypes from 'prop-types'
import uuid from 'tiny-uuid'
import Animated from './animated/targets/react-dom'
function createAnimation(interpolator, defaultConfig) {
const config = {
default: { tension: 170, friction: 26 },
gentle: { tension: 120, friction: 14 },
wobbly: { tension: 180, friction: 12 },
stiff: { tension: 210, friction: 20 },
}
export function createAnimation(interpolator, defaultConfig) {
return class extends React.PureComponent {
static propTypes = {
to: PropTypes.object,
to: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),
from: PropTypes.object,

@@ -15,71 +21,76 @@ config: PropTypes.object,

}
static defaultProps = { to: {}, from: {}, config: defaultConfig, native: false }
static defaultProps = { from: {}, to: {}, config: defaultConfig, native: false }
constructor(props) {
super()
const { children, to, from, native } = props
this._animation = new Animated.Value(0)
this._updateInterpolations(props)
this.defaultAnimation = new Animated.Value(0)
this.animations = {}
this.update(props, false)
}
_callback = () => !this.props.native && this.forceUpdate()
_attachProps(nextProps) {
var oldPropsAnimated = this._propsAnimated
this._propsAnimated = new Animated.AnimatedProps(nextProps, this._callback)
oldPropsAnimated && oldPropsAnimated.__detach()
}
update({ from, to, config, attach }, start = false) {
const allProps = Object.entries({ ...from, ...to })
const defaultAnimationValue = this.defaultAnimation._value
_mapValues(props, name, value, index) {
const { from } = props
const currentValue = this._animation._value
let interpolate, overrideFrom
const previous =
this._interpolations &&
this._interpolations[index] &&
this._interpolations[index].interpolate._interpolation(currentValue)
const fromValue = previous !== undefined ? previous : from[name] !== undefined ? from[name] : value
interpolate = this._animation.interpolate({
inputRange: [0, 1],
outputRange: [overrideFrom !== undefined ? overrideFrom : fromValue, value],
})
return { name, interpolate }
}
this.interpolators = {}
this.defaultAnimation.setValue(0)
this.animations = allProps.reduce((acc, [name, value], i) => {
const entry = this.animations[name] || (this.animations[name] = {})
_updateInterpolations = props => {
const { from, to } = props
this._interpolations = Object.entries({ ...from, ...to }).map(([n, v], i) =>
this._mapValues(props, n, v, i),
)
this._to = this._interpolations.reduce((acc, anim) => ({ ...acc, [anim.name]: anim.interpolate }), {})
this._attachProps(this._to)
}
let isNumber = typeof value === 'number'
let fromValue = from[name] !== undefined ? from[name] : value
let toValue = isNumber ? value : 1
_updateAnimations = props => {
const { to, from, config } = props
this._updateInterpolations(props)
this._animation.stopAnimation()
this._animation.setValue(0)
interpolator(this._animation, { toValue: 1, ...config }).start(this._onRest)
}
if (isNumber && attach) {
// Attach value to target animation
const target = attach(this)
const targetAnimation = target && target.animations[name]
if (targetAnimation) toValue = targetAnimation.animation
}
_onRest = props => {
if (props.finished && this.props.onRest) this.props.onRest()
if (isNumber) {
// Create animated value
entry.animation = entry.interpolation = entry.animation || new Animated.Value(fromValue)
} else {
// Deal with interpolations
const previous = entry.interpolation && entry.interpolation._interpolation(defaultAnimationValue)
entry.animation = this.defaultAnimation
entry.interpolation = this.defaultAnimation.interpolate({
inputRange: [0, 1],
outputRange: [previous !== undefined ? previous : fromValue, value],
})
}
entry.start = () => interpolator(entry.animation, { toValue, ...config }).start(i === 0 && this.onRest)
entry.stop = () => entry.animation.stopAnimation()
start && entry.start()
this.interpolators[name] = entry.interpolation
return { ...acc, [name]: entry }
}, {})
var oldPropsAnimated = this.propsAnimated
this.propsAnimated = new Animated.AnimatedProps(this.interpolators, this.callback)
oldPropsAnimated && oldPropsAnimated.__detach()
}
callback = () => !this.props.native && this.forceUpdate()
onRest = props => props.finished && this.props.onRest && this.props.onRest()
componentWillReceiveProps(props) {
this._updateAnimations(props)
this.update(props, true)
}
componentDidMount() {
interpolator(this._animation, { toValue: 1, ...this.props.config }).start(this._onRest)
Object.values(this.animations).forEach(({ start }) => start())
}
componentWillUnmount() {
this._animation.stopAnimation()
Object.values(this.animations).forEach(({ stop }) => stop())
}
render() {
const { children, from, to, config, native, ...rest } = this.props
let animatedProps = native ? this._to : this._propsAnimated.__getValue()
return children({ ...animatedProps, ...rest })
const { children, from, to, config, native, ...extra } = this.props
let animatedProps = native ? this.interpolators : this.propsAnimated.__getValue()
return children({ ...animatedProps, ...extra })
}

@@ -89,20 +100,25 @@ }

function createTransition(interpolator, defaultConfig) {
export function createTransition(interpolator, defaultConfig) {
const Animation = createAnimation(interpolator, defaultConfig)
return class TransitionSpring extends React.PureComponent {
return class SpringTransition extends React.PureComponent {
static propTypes = {
native: PropTypes.bool,
config: PropTypes.object,
from: PropTypes.object,
enter: PropTypes.object,
leave: PropTypes.object,
keys: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),
native: PropTypes.bool,
keys: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),
PropTypes.number,
]),
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.func), PropTypes.func]),
}
static defaultProps = { from: {}, enter: {}, leave: {}, native: false, config: defaultConfig }
constructor(props) {
super()
let { children, keys, from, enter, leave } = props
if (!Array.isArray(children)) {
children = [children]
keys = [uuid()]
}
if (!Array.isArray(children)) children = [children]
if (!Array.isArray(keys)) keys = [keys]
this.state = {

@@ -116,9 +132,6 @@ transitionsKeys: keys,

let { transitions, transitionsKeys } = this.state
let { native, children, keys, from, enter, leave } = props
let { children, keys, from, enter, leave } = props
if (!Array.isArray(children)) children = [children]
if (!Array.isArray(keys)) keys = [keys]
if (!Array.isArray(children)) {
children = [children]
keys = [props.children !== this.props.children ? uuid() : this.props.transitionsKeys[0]]
}
// Compare next keys with current keys

@@ -186,3 +199,6 @@ let nextSet = new Set(keys)

render() {
return this.state.transitions.map(({ key, ...rest }) => <Animation {...rest} key={key} />)
const { children, from, enter, leave, native, config, keys, ...extra } = this.props
return this.state.transitions.map(({ key, ...rest }) => (
<Animation key={key} native={native} config={config} {...rest} {...extra} />
))
}

@@ -192,6 +208,45 @@ }

const Spring = createAnimation(Animated.spring, { tension: 170, friction: 26 })
const SpringTransition = createTransition(Animated.spring, { tension: 170, friction: 26 })
export function createTrail(interpolator, defaultConfig) {
const Animation = createAnimation(interpolator, defaultConfig)
return class SpringTrail extends React.PureComponent {
static propTypes = {
native: PropTypes.bool,
config: PropTypes.object,
from: PropTypes.object,
to: PropTypes.object,
keys: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),
PropTypes.number,
]),
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.func), PropTypes.func]),
}
static defaultProps = { from: {}, to: {}, native: false, config: defaultConfig }
render() {
const { children, from, to, native, config, keys, ...extra } = this.props
const animations = new Set()
const hook = (index, animation) => {
animations.add(animation)
if (index === 0) return undefined
else return Array.from(animations)[index - 1]
}
return children.map((child, i) => (
<Animation
key={keys[i]}
native={native}
config={config}
from={from}
to={to}
attach={animation => hook(i, animation)}
children={child}
/>
))
}
}
}
const Spring = createAnimation(Animated.spring, config.default)
const SpringTransition = createTransition(Animated.spring, config.default)
const SpringTrail = createTrail(Animated.spring, config.default)
const template = Animated.template
const animated = Animated.elements
export { createAnimation, createTransition, Spring, SpringTransition, template, animated }
export { Spring, SpringTransition, SpringStagger, SpringTrail, config, template, animated }
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc