UNPKG

redux-infinite-scroll-sf

Version:

React infinite scroll component designed for a Redux data-flow.

6 lines 34.6 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],t):"object"==typeof exports?exports.ReduxInfiniteScroll=t(require("React"),require("ReactDOM")):e.ReduxInfiniteScroll=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(11)},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function i(e){if(p===clearTimeout)return clearTimeout(e);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function a(){m&&d&&(m=!1,d.length?h=d.concat(h):y=-1,h.length&&s())}function s(){if(!m){var e=o(a);m=!0;for(var t=h.length;t;){for(d=h,h=[];++y<t;)d&&d[y].run();y=-1,t=h.length}d=null,m=!1,i(e)}}function u(e,t){this.fun=e,this.array=t}function l(){}var c,p,f=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(e){c=n}try{p="function"==typeof clearTimeout?clearTimeout:r}catch(e){p=r}}();var d,h=[],m=!1,y=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new u(e,t)),1!==h.length||m||o(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=l,f.addListener=l,f.once=l,f.off=l,f.removeListener=l,f.removeAllListeners=l,f.emit=l,f.prependListener=l,f.prependOnceListener=l,f.listeners=function(e){return[]},f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(t,n){t.exports=e},function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},i=!0;e.exports=n(22)(o,i)}else e.exports=n(21)()}).call(t,n(1))},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){(function(t){"use strict";function n(e,t,n,o,i,a,s,u){if(r(t),!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,o,i,a,s,u],p=0;l=new Error(t.replace(/%s/g,function(){return c[p++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}}var r=function(e){};"production"!==t.env.NODE_ENV&&(r=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")}),e.exports=n}).call(t,n(1))},function(e,t){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=!("undefined"==typeof window||!window.document||!window.document.createElement),e.exports=t.default},function(e,t,n){(function(t){"use strict";var r=n(4),o=r;if("production"!==t.env.NODE_ENV){var i=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,function(){return n[o++]});"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}};o=function(e,t){if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==t.indexOf("Failed Composite propType: ")&&!e){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];i.apply(void 0,[t].concat(r))}}}e.exports=o}).call(t,n(1))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}}t.__esModule=!0,t.nameShape=void 0,t.transitionTimeout=o;var i=n(2),a=(r(i),n(3)),s=r(a);t.nameShape=s.default.oneOfType([s.default.string,s.default.shape({enter:s.default.string,leave:s.default.string,active:s.default.string}),s.default.shape({enter:s.default.string,enterActive:s.default.string,leave:s.default.string,leaveActive:s.default.string,appear:s.default.string,appearActive:s.default.string})])},function(e,n){e.exports=t},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(2),l=r(u),c=n(10),p=r(c),f=n(23),d=r(f),h=n(12),m=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scrollFunction=n.scrollListener.bind(n),n}return a(t,e),s(t,[{key:"componentDidMount",value:function(){this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){this.attachScrollListener()}},{key:"_findElement",value:function(){return this.props.elementIsScrollable?p.default.findDOMNode(this):window}},{key:"attachScrollListener",value:function(){if(this.props.hasMore&&!this.props.loadingMore){var e=this._findElement();e.addEventListener("scroll",this.scrollFunction,!0),e.addEventListener("resize",this.scrollFunction,!0),this.scrollListener()}}},{key:"_elScrollListener",value:function(){var e=p.default.findDOMNode(this);if(this.props.horizontal){var t=e.scrollLeft,n=e.scrollWidth,r=e.offsetWidth,o=t+r;return n-o}var i=e.scrollTop,a=e.scrollHeight,s=e.offsetHeight,u=i+s;return a-u}},{key:"_windowScrollListener",value:function(){var e=p.default.findDOMNode(this);if(this.props.horizontal){var t=void 0!==window.pageXOffset?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,n=(0,h.leftPosition)(e)+e.offsetWidth,r=n-t-window.innerWidth;return r}var o=void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop,i=(0,h.topPosition)(e)+e.offsetHeight,a=i-o-window.innerHeight;return a}},{key:"scrollListener",value:function(){if(!(this._totalItemsSize()<=0)){var e=this.props.elementIsScrollable?this._elScrollListener():this._windowScrollListener();e<Number(this.props.threshold)&&(this.detachScrollListener(),this.props.loadMore())}}},{key:"detachScrollListener",value:function(){var e=this._findElement();e.removeEventListener("scroll",this.scrollFunction,!0),e.removeEventListener("resize",this.scrollFunction,!0)}},{key:"_renderOptions",value:function(){var e=this.props.children.concat(this.props.items);return e}},{key:"_totalItemsSize",value:function(){var e=void 0;return e+=this.props.children.size?this.props.children.size:this.props.children.length,e+=this.props.items.size?this.props.items.size:this.props.items.length}},{key:"componentWillUnmount",value:function(){this.detachScrollListener()}},{key:"renderLoader",value:function(){return this.props.loadingMore&&this.props.showLoader?this.props.loader:void 0}},{key:"_assignHolderClass",value:function(){var e=void 0;return e="function"==typeof this.props.className?this.props.className():this.props.className,"redux-infinite-scroll "+e}},{key:"_renderWithTransitions",value:function(){var e=this.props.children.concat(this.props.items);return console.log("animating with tran"),l.default.createElement(d.default,{transitionName:this.props.transitionName,transitionEnter:this.props.transitionEnter,transitionEnterTimeout:this.props.transitionEnterTimeout,transitionLeave:this.props.transitionLeave,transitionLeaveTimeout:this.props.transitionLeaveTimeout,transitionAppear:this.props.transitionAppear,transitionAppearTimeout:this.props.transitionAppearTimeout},e)}},{key:"render",value:function(){var e=this.props.holderType;return l.default.createElement(e,{className:this._assignHolderClass(),style:{height:this.props.containerHeight,overflow:"scroll"}},this.props.animateItems?this._renderWithTransitions():this._renderOptions(),this.renderLoader())}}]),t}(l.default.Component);t.default=m,m.propTypes={elementIsScrollable:l.default.PropTypes.bool,containerHeight:l.default.PropTypes.oneOfType([l.default.PropTypes.number,l.default.PropTypes.string]),threshold:l.default.PropTypes.number,horizontal:l.default.PropTypes.bool,hasMore:l.default.PropTypes.bool,loadingMore:l.default.PropTypes.bool,loader:l.default.PropTypes.any,showLoader:l.default.PropTypes.bool,loadMore:l.default.PropTypes.func.isRequired,items:l.default.PropTypes.oneOfType([l.default.PropTypes.array]),children:l.default.PropTypes.oneOfType([l.default.PropTypes.array]),holderType:l.default.PropTypes.string,className:l.default.PropTypes.oneOfType([l.default.PropTypes.string,l.default.PropTypes.func]),animateItems:l.default.PropTypes.bool,transitionName:l.default.PropTypes.string,transitionEnter:l.default.PropTypes.bool,transitionEnterTimeout:l.default.PropTypes.number,transitionLeave:l.default.PropTypes.bool,transitionLeaveTimeout:l.default.PropTypes.number,transitionAppear:l.default.PropTypes.bool,transitionAppearTimeout:l.default.PropTypes.number},m.defaultProps={className:"",elementIsScrollable:!0,containerHeight:"100%",threshold:100,horizontal:!1,hasMore:!0,loadingMore:!1,loader:l.default.createElement("div",{style:{textAlign:"center"}},"Loading..."),showLoader:!0,holderType:"div",children:[],items:[],animateItems:!1,transitionName:"redux-infinite-scroll",transitionEnter:!0,transitionEnterTimeout:2e3,transitionLeave:!0,transitionLeaveTimeout:1e3,transitionAppear:!0,transitionAppearTimeout:2e3}},function(e,t){"use strict";function n(e){return e?e.offsetTop+n(e.offsetParent):0}function r(e){return e?e.offsetLeft+r(e.offsetParent):0}Object.defineProperty(t,"__esModule",{value:!0}),t.topPosition=n,t.leftPosition=r},function(e,t){e.exports=function(){for(var e=arguments.length,t=[],n=0;n<e;n++)t[n]=arguments[n];if(t=t.filter(function(e){return null!=e}),0!==t.length)return 1===t.length?t[0]:t.reduce(function(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}})}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){e.classList?e.classList.add(t):(0,a.default)(e)||(e.className=e.className+" "+t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=n(15),a=r(i);e.exports=t.default},function(e,t){"use strict";function n(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")!==-1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";e.exports=function(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(){for(var e=document.createElement("div").style,t={O:function(e){return"o"+e.toLowerCase()},Moz:function(e){return e.toLowerCase()},Webkit:function(e){return"webkit"+e},ms:function(e){return"MS"+e}},n=Object.keys(t),r=void 0,o=void 0,i="",a=0;a<n.length;a++){var s=n[a];if(s+"TransitionProperty"in e){i="-"+s.toLowerCase(),r=t[s]("TransitionEnd"),o=t[s]("AnimationEnd");break}}return!r&&"transitionProperty"in e&&(r="transitionend"),!o&&"animationName"in e&&(o="animationend"),e=null,{animationEnd:o,transitionEnd:r,prefix:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.animationEnd=t.animationDelay=t.animationTiming=t.animationDuration=t.animationName=t.transitionEnd=t.transitionDuration=t.transitionDelay=t.transitionTiming=t.transitionProperty=t.transform=void 0;var i=n(7),a=r(i),s="transform",u=void 0,l=void 0,c=void 0,p=void 0,f=void 0,d=void 0,h=void 0,m=void 0,y=void 0,v=void 0,g=void 0;if(a.default){var b=o();u=b.prefix,t.transitionEnd=l=b.transitionEnd,t.animationEnd=c=b.animationEnd,t.transform=s=u+"-"+s,t.transitionProperty=p=u+"-transition-property",t.transitionDuration=f=u+"-transition-duration",t.transitionDelay=h=u+"-transition-delay",t.transitionTiming=d=u+"-transition-timing-function",t.animationName=m=u+"-animation-name",t.animationDuration=y=u+"-animation-duration",t.animationTiming=v=u+"-animation-delay",t.animationDelay=g=u+"-animation-timing-function"}t.transform=s,t.transitionProperty=p,t.transitionTiming=d,t.transitionDelay=h,t.transitionDuration=f,t.transitionEnd=l,t.animationName=m,t.animationDuration=y,t.animationTiming=v,t.animationDelay=g,t.animationEnd=c,t.default={transform:s,end:l,property:p,timing:d,delay:h,duration:f}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-f)),r=setTimeout(e,n);return f=t,r}Object.defineProperty(t,"__esModule",{value:!0});var i=n(7),a=r(i),s=["","webkit","moz","o","ms"],u="clearTimeout",l=o,c=void 0,p=function(e,t){return e+(e?t[0].toUpperCase()+t.substr(1):t)+"AnimationFrame"};a.default&&s.some(function(e){var t=p(e,"request");if(t in window)return u=p(e,"cancel"),l=function(e){return window[t](e)}});var f=(new Date).getTime();c=function(e){return l(e)},c.cancel=function(e){window[u]&&"function"==typeof window[u]&&window[u](e)},t.default=c,e.exports=t.default},function(e,t){/* object-assign (c) Sindre Sorhus @license MIT */ "use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,s,u=n(e),l=1;l<arguments.length;l++){r=Object(arguments[l]);for(var c in r)i.call(r,c)&&(u[c]=r[c]);if(o){s=o(r);for(var p=0;p<s.length;p++)a.call(r,s[p])&&(u[s[p]]=r[s[p]])}}return u}},function(e,t,n){(function(t){"use strict";function r(e,n,r,u,l){if("production"!==t.env.NODE_ENV)for(var c in e)if(e.hasOwnProperty(c)){var p;try{o("function"==typeof e[c],"%s: %s type `%s` is invalid; it must be a function, usually from the `prop-types` package, but received `%s`.",u||"React class",r,c,typeof e[c]),p=e[c](n,c,u,r,null,a)}catch(e){p=e}if(i(!p||p instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",u||"React class",r,c,typeof p),p instanceof Error&&!(p.message in s)){s[p.message]=!0;var f=l?l():"";i(!1,"Failed %s type: %s%s",r,p.message,null!=f?f:"")}}}if("production"!==t.env.NODE_ENV)var o=n(5),i=n(8),a=n(6),s={};e.exports=r}).call(t,n(1))},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6);e.exports=function(){function e(e,t,n,r,a,s){s!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){(function(t){"use strict";var r=n(4),o=n(5),i=n(8),a=n(19),s=n(6),u=n(20);e.exports=function(e,n){function l(e){var t=e&&(A&&e[A]||e[k]);if("function"==typeof t)return t}function c(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function p(e){this.message=e,this.stack=""}function f(e){function r(r,l,c,f,d,h,m){if(f=f||D,h=h||c,m!==s)if(n)o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==t.env.NODE_ENV&&"undefined"!=typeof console){var y=f+":"+c;!a[y]&&u<3&&(i(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",h,f),a[y]=!0,u++)}return null==l[c]?r?new p(null===l[c]?"The "+d+" `"+h+"` is marked as required "+("in `"+f+"`, but its value is `null`."):"The "+d+" `"+h+"` is marked as required in "+("`"+f+"`, but its value is `undefined`.")):null:e(l,c,f,d,h)}if("production"!==t.env.NODE_ENV)var a={},u=0;var l=r.bind(null,!1);return l.isRequired=r.bind(null,!0),l}function d(e){function t(t,n,r,o,i,a){var s=t[n],u=N(s);if(u!==e){var l=L(s);return new p("Invalid "+o+" `"+i+"` of type "+("`"+l+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return f(t)}function h(){return f(r.thatReturnsNull)}function m(e){function t(t,n,r,o,i){if("function"!=typeof e)return new p("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a)){var u=N(a);return new p("Invalid "+o+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l<a.length;l++){var c=e(a,l,r,o,i+"["+l+"]",s);if(c instanceof Error)return c}return null}return f(t)}function y(){function t(t,n,r,o,i){var a=t[n];if(!e(a)){var s=N(a);return new p("Invalid "+o+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return f(t)}function v(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||D,s=x(t[n]);return new p("Invalid "+o+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("instance of `"+a+"`."))}return null}return f(t)}function g(e){function n(t,n,r,o,i){for(var a=t[n],s=0;s<e.length;s++)if(c(a,e[s]))return null;var u=JSON.stringify(e);return new p("Invalid "+o+" `"+i+"` of value `"+a+"` "+("supplied to `"+r+"`, expected one of "+u+"."))}return Array.isArray(e)?f(n):("production"!==t.env.NODE_ENV?i(!1,"Invalid argument supplied to oneOf, expected an instance of array."):void 0,r.thatReturnsNull)}function b(e){function t(t,n,r,o,i){if("function"!=typeof e)return new p("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var a=t[n],u=N(a);if("object"!==u)return new p("Invalid "+o+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected an object."));for(var l in a)if(a.hasOwnProperty(l)){var c=e(a,l,r,o,i+"."+l,s);if(c instanceof Error)return c}return null}return f(t)}function T(e){function n(t,n,r,o,i){for(var a=0;a<e.length;a++){var u=e[a];if(null==u(t,n,r,o,i,s))return null}return new p("Invalid "+o+" `"+i+"` supplied to "+("`"+r+"`."))}if(!Array.isArray(e))return"production"!==t.env.NODE_ENV?i(!1,"Invalid argument supplied to oneOfType, expected an instance of array."):void 0,r.thatReturnsNull;for(var o=0;o<e.length;o++){var a=e[o];if("function"!=typeof a)return i(!1,"Invalid argument supplied to oneOfType. Expected an array of check functions, but received %s at index %s.",j(a),o),r.thatReturnsNull}return f(n)}function w(){function e(e,t,n,r,o){return _(e[t])?null:new p("Invalid "+r+" `"+o+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return f(e)}function E(e){function t(t,n,r,o,i){var a=t[n],u=N(a);if("object"!==u)return new p("Invalid "+o+" `"+i+"` of type `"+u+"` "+("supplied to `"+r+"`, expected `object`."));for(var l in e){var c=e[l];if(c){var f=c(a,l,r,o,i+"."+l,s);if(f)return f}}return null}return f(t)}function O(e){function t(t,n,r,o,i){var u=t[n],l=N(u);if("object"!==l)return new p("Invalid "+o+" `"+i+"` of type `"+l+"` "+("supplied to `"+r+"`, expected `object`."));var c=a({},t[n],e);for(var f in c){var d=e[f];if(!d)return new p("Invalid "+o+" `"+i+"` key `"+f+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var h=d(u,f,r,o,i+"."+f,s);if(h)return h}return null}return f(t)}function _(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(_);if(null===t||e(t))return!0;var n=l(t);if(!n)return!1;var r,o=n.call(t);if(n!==t.entries){for(;!(r=o.next()).done;)if(!_(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!_(i[1]))return!1}return!0;default:return!1}}function P(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function N(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":P(t,e)?"symbol":t}function L(e){if("undefined"==typeof e||null===e)return""+e;var t=N(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function j(e){var t=L(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function x(e){return e.constructor&&e.constructor.name?e.constructor.name:D}var A="function"==typeof Symbol&&Symbol.iterator,k="@@iterator",D="<<anonymous>>",S={array:d("array"),bool:d("boolean"),func:d("function"),number:d("number"),object:d("object"),string:d("string"),symbol:d("symbol"),any:h(),arrayOf:m,element:y(),instanceOf:v,node:w(),objectOf:b,oneOf:g,oneOfType:T,shape:E,exact:O};return p.prototype=Error.prototype,S.checkPropTypes=u,S.PropTypes=S,S}}).call(t,n(1))},function(e,t,n){"use strict";e.exports=n(24)},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(2),c=o(l),p=n(3),f=o(p),d=n(26),h=o(d),m=n(25),y=o(m),v=n(9),g={transitionName:v.nameShape.isRequired,transitionAppear:f.default.bool,transitionEnter:f.default.bool,transitionLeave:f.default.bool,transitionAppearTimeout:(0,v.transitionTimeout)("Appear"),transitionEnterTimeout:(0,v.transitionTimeout)("Enter"),transitionLeaveTimeout:(0,v.transitionTimeout)("Leave")},b={transitionAppear:!1,transitionEnter:!0,transitionLeave:!0},T=function(e){function t(){var n,r,o;i(this,t);for(var s=arguments.length,u=Array(s),l=0;l<s;l++)u[l]=arguments[l];return n=r=a(this,e.call.apply(e,[this].concat(u))),r._wrapChild=function(e){return c.default.createElement(y.default,{name:r.props.transitionName,appear:r.props.transitionAppear,enter:r.props.transitionEnter,leave:r.props.transitionLeave,appearTimeout:r.props.transitionAppearTimeout,enterTimeout:r.props.transitionEnterTimeout,leaveTimeout:r.props.transitionLeaveTimeout},e)},o=n,a(r,o)}return s(t,e),t.prototype.render=function(){return c.default.createElement(h.default,u({},this.props,{childFactory:this._wrapChild}))},t}(c.default.Component);T.displayName="CSSTransitionGroup",T.propTypes="production"!==r.env.NODE_ENV?g:{},T.defaultProps=b,t.default=T,e.exports=t.default}).call(t,n(1))},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e,t){return O.length?O.forEach(function(n){return e.addEventListener(n,t,!1)}):setTimeout(t,0),function(){O.length&&O.forEach(function(n){return e.removeEventListener(n,t,!1)})}}t.__esModule=!0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=n(14),p=o(c),f=n(16),d=o(f),h=n(18),m=o(h),y=n(17),v=n(2),g=o(v),b=n(3),T=o(b),w=n(10),E=n(9),O=[];y.transitionEnd&&O.push(y.transitionEnd),y.animationEnd&&O.push(y.animationEnd);var _={children:T.default.node,name:E.nameShape.isRequired,appear:T.default.bool,enter:T.default.bool,leave:T.default.bool,appearTimeout:T.default.number,enterTimeout:T.default.number,leaveTimeout:T.default.number},P=function(e){function t(){var n,r,o;i(this,t);for(var s=arguments.length,u=Array(s),l=0;l<s;l++)u[l]=arguments[l];return n=r=a(this,e.call.apply(e,[this].concat(u))),r.componentWillAppear=function(e){r.props.appear?r.transition("appear",e,r.props.appearTimeout):e()},r.componentWillEnter=function(e){r.props.enter?r.transition("enter",e,r.props.enterTimeout):e()},r.componentWillLeave=function(e){r.props.leave?r.transition("leave",e,r.props.leaveTimeout):e()},o=n,a(r,o)}return s(t,e),t.prototype.componentWillMount=function(){this.classNameAndNodeQueue=[],this.transitionTimeouts=[]},t.prototype.componentWillUnmount=function(){this.unmounted=!0,this.timeout&&clearTimeout(this.timeout),this.transitionTimeouts.forEach(function(e){clearTimeout(e)}),this.classNameAndNodeQueue.length=0},t.prototype.transition=function(e,t,n){var r=(0,w.findDOMNode)(this);if(!r)return void(t&&t());var o=this.props.name[e]||this.props.name+"-"+e,i=this.props.name[e+"Active"]||o+"-active",a=null,s=void 0;(0,p.default)(r,o),this.queueClassAndNode(i,r);var l=function(e){e&&e.target!==r||(clearTimeout(a),s&&s(),(0,d.default)(r,o),(0,d.default)(r,i),s&&s(),t&&t())};n?(a=setTimeout(l,n),this.transitionTimeouts.push(a)):y.transitionEnd&&(s=u(r,l))},t.prototype.queueClassAndNode=function(e,t){var n=this;this.classNameAndNodeQueue.push({className:e,node:t}),this.rafHandle||(this.rafHandle=(0,m.default)(function(){return n.flushClassNameAndNodeQueue()}))},t.prototype.flushClassNameAndNodeQueue=function(){this.unmounted||this.classNameAndNodeQueue.forEach(function(e){e.node.scrollTop,(0,p.default)(e.node,e.className)}),this.classNameAndNodeQueue.length=0,this.rafHandle=null},t.prototype.render=function(){var e=l({},this.props);return delete e.name,delete e.appear,delete e.enter,delete e.leave,delete e.appearTimeout,delete e.enterTimeout,delete e.leaveTimeout,delete e.children,g.default.cloneElement(g.default.Children.only(this.props.children),e)},t}(g.default.Component);P.displayName="CSSTransitionGroupChild",P.propTypes="production"!==r.env.NODE_ENV?_:{},t.default=P,e.exports=t.default}).call(t,n(1))},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(13),c=o(l),p=n(2),f=o(p),d=n(3),h=o(d),m=n(28),y=o(m),v=n(27),g={component:h.default.any,childFactory:h.default.func,children:h.default.node},b={component:"span",childFactory:function(e){return e}},T=function(e){function t(n,r){i(this,t);var o=a(this,e.call(this,n,r));return o.performAppear=function(e,t){o.currentlyTransitioningKeys[e]=!0,t.componentWillAppear?t.componentWillAppear(o._handleDoneAppearing.bind(o,e,t)):o._handleDoneAppearing(e,t)},o._handleDoneAppearing=function(e,t){t.componentDidAppear&&t.componentDidAppear(),delete o.currentlyTransitioningKeys[e];var n=(0,v.getChildMapping)(o.props.children);n&&n.hasOwnProperty(e)||o.performLeave(e,t)},o.performEnter=function(e,t){o.currentlyTransitioningKeys[e]=!0,t.componentWillEnter?t.componentWillEnter(o._handleDoneEntering.bind(o,e,t)):o._handleDoneEntering(e,t)},o._handleDoneEntering=function(e,t){t.componentDidEnter&&t.componentDidEnter(),delete o.currentlyTransitioningKeys[e];var n=(0,v.getChildMapping)(o.props.children);n&&n.hasOwnProperty(e)||o.performLeave(e,t)},o.performLeave=function(e,t){o.currentlyTransitioningKeys[e]=!0,t.componentWillLeave?t.componentWillLeave(o._handleDoneLeaving.bind(o,e,t)):o._handleDoneLeaving(e,t)},o._handleDoneLeaving=function(e,t){t.componentDidLeave&&t.componentDidLeave(),delete o.currentlyTransitioningKeys[e];var n=(0,v.getChildMapping)(o.props.children);n&&n.hasOwnProperty(e)?o.keysToEnter.push(e):o.setState(function(t){var n=u({},t.children);return delete n[e],{children:n}})},o.childRefs=Object.create(null),o.state={children:(0,v.getChildMapping)(n.children)},o}return s(t,e),t.prototype.componentWillMount=function(){this.currentlyTransitioningKeys={},this.keysToEnter=[],this.keysToLeave=[]},t.prototype.componentDidMount=function(){var e=this.state.children;for(var t in e)e[t]&&this.performAppear(t,this.childRefs[t])},t.prototype.componentWillReceiveProps=function(e){var t=(0,v.getChildMapping)(e.children),n=this.state.children;this.setState({children:(0,v.mergeChildMappings)(n,t)});for(var r in t){var o=n&&n.hasOwnProperty(r);!t[r]||o||this.currentlyTransitioningKeys[r]||this.keysToEnter.push(r)}for(var i in n){var a=t&&t.hasOwnProperty(i);!n[i]||a||this.currentlyTransitioningKeys[i]||this.keysToLeave.push(i)}},t.prototype.componentDidUpdate=function(){var e=this,t=this.keysToEnter;this.keysToEnter=[],t.forEach(function(t){return e.performEnter(t,e.childRefs[t])});var n=this.keysToLeave;this.keysToLeave=[],n.forEach(function(t){return e.performLeave(t,e.childRefs[t])})},t.prototype.render=function(){var e=this,t=[],n=function(n){var o=e.state.children[n];if(o){var i="string"!=typeof o.ref,a=e.props.childFactory(o),s=function(t){e.childRefs[n]=t};"production"!==r.env.NODE_ENV?(0,y.default)(i,"string refs are not supported on children of TransitionGroup and will be ignored. Please use a callback ref instead: https://facebook.github.io/react/docs/refs-and-the-dom.html#the-ref-callback-attribute"):void 0,a===o&&i&&(s=(0,c.default)(o.ref,s)),t.push(f.default.cloneElement(a,{key:n,ref:s}))}};for(var o in this.state.children)n(o);var i=u({},this.props);return delete i.transitionLeave,delete i.transitionName,delete i.transitionAppear,delete i.transitionEnter,delete i.childFactory,delete i.transitionLeaveTimeout,delete i.transitionEnterTimeout,delete i.transitionAppearTimeout,delete i.component,f.default.createElement(this.props.component,i,t)},t}(f.default.Component);T.displayName="TransitionGroup",T.propTypes="production"!==r.env.NODE_ENV?g:{},T.defaultProps=b,t.default=T,e.exports=t.default}).call(t,n(1))},function(e,t,n){"use strict";function r(e){if(!e)return e;var t={};return i.Children.map(e,function(e){return e}).forEach(function(e){t[e.key]=e}),t}function o(e,t){function n(n){return t.hasOwnProperty(n)?t[n]:e[n]}e=e||{},t=t||{};var r={},o=[];for(var i in e)t.hasOwnProperty(i)?o.length&&(r[i]=o,o=[]):o.push(i);var a=void 0,s={};for(var u in t){if(r.hasOwnProperty(u))for(a=0;a<r[u].length;a++){var l=r[u][a];s[r[u][a]]=n(l)}s[u]=n(u)}for(a=0;a<o.length;a++)s[o[a]]=n(o[a]);return s}t.__esModule=!0,t.getChildMapping=r,t.mergeChildMappings=o;var i=n(2)},function(e,t,n){(function(t){"use strict";var n=function(){};"production"!==t.env.NODE_ENV&&(n=function(e,t,n){var r=arguments.length;n=new Array(r>2?r-2:0);for(var o=2;o<r;o++)n[o-2]=arguments[o];if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(t.length<10||/^[s\W]*$/.test(t))throw new Error("The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: "+t);if(!e){var i=0,a="Warning: "+t.replace(/%s/g,function(){return n[i++]});"undefined"!=typeof console&&console.error(a);try{throw new Error(a)}catch(e){}}}),e.exports=n}).call(t,n(1))}])});