react 15.5.3 → 15.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react-with-addons.js +1808 -1482
- package/dist/react-with-addons.min.js +3 -3
- package/dist/react.js +1772 -1428
- package/dist/react.min.js +2 -2
- package/lib/React.js +45 -17
- package/lib/{ReactComponent.js → ReactBaseClasses.js} +29 -4
- package/lib/ReactCSSTransitionGroup.js +1 -1
- package/lib/ReactComponentTreeHook.js +49 -4
- package/lib/ReactCurrentOwner.js +0 -2
- package/lib/ReactDOMFactories.js +0 -1
- package/lib/ReactElementValidator.js +6 -4
- package/lib/ReactLink.js +1 -22
- package/lib/ReactNoopUpdateQueue.js +0 -1
- package/lib/ReactTransitionGroup.js +4 -1
- package/lib/ReactVersion.js +1 -1
- package/lib/createClass.js +22 -0
- package/lib/deprecated.js +3 -3
- package/lib/lowPriorityWarning.js +64 -0
- package/lib/traverseAllChildren.js +1 -1
- package/package.json +3 -2
- package/lib/ReactClass.js +0 -722
- package/lib/ReactPureComponent.js +0 -41
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* React (with addons) v15.
|
|
2
|
+
* React (with addons) v15.6.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright 2013-present, Facebook, Inc.
|
|
5
5
|
* All rights reserved.
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
|
-
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.React=e()}}(function(){return function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var p=n[a]={exports:{}};t[a][0].call(p.exports,function(e){var n=t[a][1][e];return o(n||e)},p,p.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){"use strict";function r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function o(e){if(s[e])return s[e];if(!a[e])return e;var t=a[e];for(var n in t)if(t.hasOwnProperty(n)&&n in u)return s[e]=t[n];return""}var i=e(39),a={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},s={},u={};i.canUseDOM&&(u=document.createElement("div").style,"AnimationEvent"in window||(delete a.animationend.animation,delete a.animationiteration.animation,delete a.animationstart.animation),"TransitionEvent"in window||delete a.transitionend.transition),t.exports=o},{39:39}],2:[function(e,t,n){"use strict";function r(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}function o(e){var t={"=0":"=","=2":":"};return(""+("."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1))).replace(/(=0|=2)/g,function(e){return t[e]})}var i={escape:r,unescape:o};t.exports=i},{}],3:[function(e,t,n){"use strict";var r=e(18),o=e(23),i={linkState:function(e){return new r(this.state[e],o.createStateKeySetter(this,e))}};t.exports=i},{18:18,23:23}],4:[function(e,t,n){"use strict";var r=e(34),o=(e(42),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),i=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},a=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},s=function(e,t,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,e,t,n,r),i}return new o(e,t,n,r)},u=function(e){var t=this;e instanceof t||r("25"),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},c=o,p=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||c,n.poolSize||(n.poolSize=10),n.release=u,n},l={addPoolingTo:p,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:s};t.exports=l},{34:34,42:42}],5:[function(e,t,n){"use strict";var r=e(45),o=e(9),i=e(11),a=e(22),s=e(10),u=e(14),c=e(15),p=e(21),l=e(27),f=e(33),d=(e(44),c.createElement),h=c.createFactory,y=c.cloneElement,m=r,v={Children:{map:o.map,forEach:o.forEach,count:o.count,toArray:o.toArray,only:f},Component:i,PureComponent:a,createElement:d,cloneElement:y,isValidElement:c.isValidElement,PropTypes:p,createClass:s.createClass,createFactory:h,createMixin:function(e){return e},DOM:u,version:l,__spread:m};t.exports=v},{10:10,11:11,14:14,15:15,21:21,22:22,27:27,33:33,44:44,45:45,9:9}],6:[function(e,t,n){"use strict";function r(){if(!o){var t=e(29);o=t.__SECRET_INJECTED_REACT_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED}return o}var o;n.getReactDOM=r},{29:29}],7:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 i(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 a(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 ReactCSSTransitionGroup: 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)")}}}var s=e(45),u=e(5),c=e(47),p=c(u.isValidElement),l=e(26),f=e(8),d=function(e){function t(){var n,i,a;r(this,t);for(var s=arguments.length,c=Array(s),p=0;p<s;p++)c[p]=arguments[p];return n=i=o(this,e.call.apply(e,[this].concat(c))),i._wrapChild=function(e){return u.createElement(f,{name:i.props.transitionName,appear:i.props.transitionAppear,enter:i.props.transitionEnter,leave:i.props.transitionLeave,appearTimeout:i.props.transitionAppearTimeout,enterTimeout:i.props.transitionEnterTimeout,leaveTimeout:i.props.transitionLeaveTimeout},e)},a=n,o(i,a)}return i(t,e),t.prototype.render=function(){return u.createElement(l,s({},this.props,{childFactory:this._wrapChild}))},t}(u.Component);d.displayName="ReactCSSTransitionGroup",d.propTypes={transitionName:f.propTypes.name,transitionAppear:p.bool,transitionEnter:p.bool,transitionLeave:p.bool,transitionAppearTimeout:a("Appear"),transitionEnterTimeout:a("Enter"),transitionLeaveTimeout:a("Leave")},d.defaultProps={transitionAppear:!1,transitionEnter:!0,transitionLeave:!0},t.exports=d},{26:26,45:45,47:47,5:5,8:8}],8:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=e(5),s=e(6),u=e(47),c=u(a.isValidElement),p=e(38),l=e(25),f=e(33),d=17,h=function(e){function t(){var n,i,a;r(this,t);for(var u=arguments.length,c=Array(u),f=0;f<u;f++)c[f]=arguments[f];return n=i=o(this,e.call.apply(e,[this].concat(c))),i._isMounted=!1,i.transition=function(e,t,n){var r=s.getReactDOM().findDOMNode(i);if(!r)return void(t&&t());var o=i.props.name[e]||i.props.name+"-"+e,a=i.props.name[e+"Active"]||o+"-active",u=null,c=function(e){e&&e.target!==r||(clearTimeout(u),p.removeClass(r,o),p.removeClass(r,a),l.removeEndEventListener(r,c),t&&t())};p.addClass(r,o),i.queueClassAndNode(a,r),n?(u=setTimeout(c,n),i.transitionTimeouts.push(u)):l.addEndEventListener(r,c)},i.queueClassAndNode=function(e,t){i.classNameAndNodeQueue.push({className:e,node:t}),i.timeout||(i.timeout=setTimeout(i.flushClassNameAndNodeQueue,d))},i.flushClassNameAndNodeQueue=function(){i._isMounted&&i.classNameAndNodeQueue.forEach(function(e){p.addClass(e.node,e.className)}),i.classNameAndNodeQueue.length=0,i.timeout=null},i.componentWillAppear=function(e){i.props.appear?i.transition("appear",e,i.props.appearTimeout):e()},i.componentWillEnter=function(e){i.props.enter?i.transition("enter",e,i.props.enterTimeout):e()},i.componentWillLeave=function(e){i.props.leave?i.transition("leave",e,i.props.leaveTimeout):e()},a=n,o(i,a)}return i(t,e),t.prototype.componentWillMount=function(){this.classNameAndNodeQueue=[],this.transitionTimeouts=[]},t.prototype.componentDidMount=function(){this._isMounted=!0},t.prototype.componentWillUnmount=function(){this._isMounted=!1,this.timeout&&clearTimeout(this.timeout),this.transitionTimeouts.forEach(function(e){clearTimeout(e)}),this.classNameAndNodeQueue.length=0},t.prototype.render=function(){return f(this.props.children)},t}(a.Component);h.propTypes={name:c.oneOfType([c.string,c.shape({enter:c.string,leave:c.string,active:c.string}),c.shape({enter:c.string,enterActive:c.string,leave:c.string,leaveActive:c.string,appear:c.string,appearActive:c.string})]).isRequired,appear:c.bool,enter:c.bool,leave:c.bool,appearTimeout:c.number,enterTimeout:c.number,leaveTimeout:c.number},t.exports=h},{25:25,33:33,38:38,47:47,5:5,6:6}],9:[function(e,t,n){"use strict";function r(e){return(""+e).replace(b,"$&/")}function o(e,t){this.func=e,this.context=t,this.count=0}function i(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function a(e,t,n){if(null==e)return e;var r=o.getPooled(t,n);v(e,i,r),o.release(r)}function s(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function u(e,t,n){var o=e.result,i=e.keyPrefix,a=e.func,s=e.context,u=a.call(s,t,e.count++);Array.isArray(u)?c(u,o,n,m.thatReturnsArgument):null!=u&&(y.isValidElement(u)&&(u=y.cloneAndReplaceKey(u,i+(!u.key||t&&t.key===u.key?"":r(u.key)+"/")+n)),o.push(u))}function c(e,t,n,o,i){var a="";null!=n&&(a=r(n)+"/");var c=s.getPooled(t,a,o,i);v(e,u,c),s.release(c)}function p(e,t,n){if(null==e)return e;var r=[];return c(e,r,null,t,n),r}function l(e,t,n){return null}function f(e,t){return v(e,l,null)}function d(e){var t=[];return c(e,t,null,m.thatReturnsArgument),t}var h=e(4),y=e(15),m=e(40),v=e(36),E=h.twoArgumentPooler,g=h.fourArgumentPooler,b=/\/+/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,E),s.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(s,g);var _={forEach:a,map:p,mapIntoWithKeyPrefixInternal:c,count:f,toArray:d};t.exports=_},{15:15,36:36,4:4,40:40}],10:[function(e,t,n){"use strict";function r(e){return e}function o(e,t){var n=b.hasOwnProperty(t)?b[t]:null;w.hasOwnProperty(t)&&"OVERRIDE_BASE"!==n&&f("73",t),e&&"DEFINE_MANY"!==n&&"DEFINE_MANY_MERGED"!==n&&f("74",t)}function i(e,t){if(t){"function"==typeof t&&f("75"),y.isValidElement(t)&&f("76");var n=e.prototype,r=n.__reactAutoBindPairs;t.hasOwnProperty(E)&&_.mixins(e,t.mixins);for(var i in t)if(t.hasOwnProperty(i)&&i!==E){var a=t[i],s=n.hasOwnProperty(i);if(o(s,i),_.hasOwnProperty(i))_[i](e,a);else{var p=b.hasOwnProperty(i),l="function"==typeof a,d=l&&!p&&!s&&!1!==t.autobind;if(d)r.push(i,a),n[i]=a;else if(s){var h=b[i];(!p||"DEFINE_MANY_MERGED"!==h&&"DEFINE_MANY"!==h)&&f("77",h,i),"DEFINE_MANY_MERGED"===h?n[i]=u(n[i],a):"DEFINE_MANY"===h&&(n[i]=c(n[i],a))}else n[i]=a}}}}function a(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in _;o&&f("78",n);var i=n in e;i&&f("79",n),e[n]=r}}}function s(e,t){e&&t&&"object"==typeof e&&"object"==typeof t||f("80");for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]&&f("81",n),e[n]=t[n]);return e}function u(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return s(o,n),s(o,r),o}}function c(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function p(e,t){return t.bind(e)}function l(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],o=t[n+1];e[r]=p(e,o)}}var f=e(34),d=e(45),h=e(11),y=e(15),m=(e(20),e(19)),v=e(41),E=(e(42),e(44),"mixins"),g=[],b={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},_={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)i(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=d({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=d({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=u(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=d({},e.propTypes,t)},statics:function(e,t){a(e,t)},autobind:function(){}},w={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e),t&&this.updater.enqueueCallback(this,t,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},A=function(){};d(A.prototype,h.prototype,w);var T={createClass:function(e){var t=r(function(e,n,r){this.__reactAutoBindPairs.length&&l(this),this.props=e,this.context=n,this.refs=v,this.updater=r||m,this.state=null;var o=this.getInitialState?this.getInitialState():null;("object"!=typeof o||Array.isArray(o))&&f("82",t.displayName||"ReactCompositeComponent"),this.state=o});t.prototype=new A,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],g.forEach(i.bind(null,t)),i(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),t.prototype.render||f("83");for(var n in b)t.prototype[n]||(t.prototype[n]=null);return t},injection:{injectMixin:function(e){g.push(e)}}};t.exports=T},{11:11,15:15,19:19,20:20,34:34,41:41,42:42,44:44,45:45}],11:[function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=a,this.updater=n||i}var o=e(34),i=e(19),a=(e(30),e(41));e(42),e(44);r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&o("85"),this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t,"setState")},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e,"forceUpdate")};t.exports=r},{19:19,30:30,34:34,41:41,42:42,44:44}],12:[function(e,t,n){"use strict";var r=e(35),o={shouldComponentUpdate:function(e,t){return r(this,e,t)}};t.exports=o},{35:35}],13:[function(e,t,n){"use strict";var r={current:null};t.exports=r},{}],14:[function(e,t,n){"use strict";var r=e(15),o=r.createFactory,i={a:o("a"),abbr:o("abbr"),address:o("address"),area:o("area"),article:o("article"),aside:o("aside"),audio:o("audio"),b:o("b"),base:o("base"),bdi:o("bdi"),bdo:o("bdo"),big:o("big"),blockquote:o("blockquote"),body:o("body"),br:o("br"),button:o("button"),canvas:o("canvas"),caption:o("caption"),cite:o("cite"),code:o("code"),col:o("col"),colgroup:o("colgroup"),data:o("data"),datalist:o("datalist"),dd:o("dd"),del:o("del"),details:o("details"),dfn:o("dfn"),dialog:o("dialog"),div:o("div"),dl:o("dl"),dt:o("dt"),em:o("em"),embed:o("embed"),fieldset:o("fieldset"),figcaption:o("figcaption"),figure:o("figure"),footer:o("footer"),form:o("form"),h1:o("h1"),h2:o("h2"),h3:o("h3"),h4:o("h4"),h5:o("h5"),h6:o("h6"),head:o("head"),header:o("header"),hgroup:o("hgroup"),hr:o("hr"),html:o("html"),i:o("i"),iframe:o("iframe"),img:o("img"),input:o("input"),ins:o("ins"),kbd:o("kbd"),keygen:o("keygen"),label:o("label"),legend:o("legend"),li:o("li"),link:o("link"),main:o("main"),map:o("map"),mark:o("mark"),menu:o("menu"),menuitem:o("menuitem"),meta:o("meta"),meter:o("meter"),nav:o("nav"),noscript:o("noscript"),object:o("object"),ol:o("ol"),optgroup:o("optgroup"),option:o("option"),output:o("output"),p:o("p"),param:o("param"),picture:o("picture"),pre:o("pre"),progress:o("progress"),q:o("q"),rp:o("rp"),rt:o("rt"),ruby:o("ruby"),s:o("s"),samp:o("samp"),script:o("script"),section:o("section"),select:o("select"),small:o("small"),source:o("source"),span:o("span"),strong:o("strong"),style:o("style"),sub:o("sub"),summary:o("summary"),sup:o("sup"),table:o("table"),tbody:o("tbody"),td:o("td"),textarea:o("textarea"),tfoot:o("tfoot"),th:o("th"),thead:o("thead"),time:o("time"),title:o("title"),tr:o("tr"),track:o("track"),u:o("u"),ul:o("ul"),var:o("var"),video:o("video"),wbr:o("wbr"),circle:o("circle"),clipPath:o("clipPath"),defs:o("defs"),ellipse:o("ellipse"),g:o("g"),image:o("image"),line:o("line"),linearGradient:o("linearGradient"),mask:o("mask"),path:o("path"),pattern:o("pattern"),polygon:o("polygon"),polyline:o("polyline"),radialGradient:o("radialGradient"),rect:o("rect"),stop:o("stop"),svg:o("svg"),text:o("text"),tspan:o("tspan")};t.exports=i},{15:15}],15:[function(e,t,n){"use strict";function r(e){return void 0!==e.ref}function o(e){return void 0!==e.key}var i=e(45),a=e(13),s=(e(44),e(30),Object.prototype.hasOwnProperty),u=e(16),c={key:!0,ref:!0,__self:!0,__source:!0},p=function(e,t,n,r,o,i,a){return{$$typeof:u,type:e,key:t,ref:n,props:a,_owner:i}};p.createElement=function(e,t,n){var i,u={},l=null,f=null;if(null!=t){r(t)&&(f=t.ref),o(t)&&(l=""+t.key),void 0===t.__self?null:t.__self,void 0===t.__source?null:t.__source;for(i in t)s.call(t,i)&&!c.hasOwnProperty(i)&&(u[i]=t[i])}var d=arguments.length-2;if(1===d)u.children=n;else if(d>1){for(var h=Array(d),y=0;y<d;y++)h[y]=arguments[y+2];u.children=h}if(e&&e.defaultProps){var m=e.defaultProps;for(i in m)void 0===u[i]&&(u[i]=m[i])}return p(e,l,f,0,0,a.current,u)},p.createFactory=function(e){var t=p.createElement.bind(null,e);return t.type=e,t},p.cloneAndReplaceKey=function(e,t){return p(e.type,t,e.ref,e._self,e._source,e._owner,e.props)},p.cloneElement=function(e,t,n){var u,l=i({},e.props),f=e.key,d=e.ref,h=(e._self,e._source,e._owner);if(null!=t){r(t)&&(d=t.ref,h=a.current),o(t)&&(f=""+t.key);var y;e.type&&e.type.defaultProps&&(y=e.type.defaultProps);for(u in t)s.call(t,u)&&!c.hasOwnProperty(u)&&(void 0===t[u]&&void 0!==y?l[u]=y[u]:l[u]=t[u])}var m=arguments.length-2;if(1===m)l.children=n;else if(m>1){for(var v=Array(m),E=0;E<m;E++)v[E]=arguments[E+2];l.children=v}return p(e.type,f,d,0,0,h,l)},p.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===u},t.exports=p},{13:13,16:16,30:30,44:44,45:45}],16:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;t.exports=r},{}],17:[function(e,t,n){"use strict";var r=e(34),o=e(9),i=e(15),a=e(40),s=(e(42),e(44),{create:function(e){if("object"!=typeof e||!e||Array.isArray(e))return e;if(i.isValidElement(e))return e;1===e.nodeType&&r("0");var t=[];for(var n in e)o.mapIntoWithKeyPrefixInternal(e[n],t,n,a.thatReturnsArgument);return t}});t.exports=s},{15:15,34:34,40:40,42:42,44:44,9:9}],18:[function(e,t,n){"use strict";function r(e,t){this.value=e,this.requestChange=t}function o(e){var t={value:void 0===e?i.PropTypes.any.isRequired:e.isRequired,requestChange:i.PropTypes.func.isRequired};return i.PropTypes.shape(t)}var i=e(5);r.PropTypes={link:o},t.exports=r},{5:5}],19:[function(e,t,n){"use strict";var r=(e(44),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){},enqueueReplaceState:function(e,t){},enqueueSetState:function(e,t){}});t.exports=r},{44:44}],20:[function(e,t,n){"use strict";var r={};t.exports=r},{}],21:[function(e,t,n){"use strict";var r=e(15),o=r.isValidElement,i=e(47);t.exports=i(o)},{15:15,47:47}],22:[function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=u,this.updater=n||s}function o(){}var i=e(45),a=e(11),s=e(19),u=e(41);o.prototype=a.prototype,r.prototype=new o,r.prototype.constructor=r,i(r.prototype,a.prototype),r.prototype.isPureReactComponent=!0,t.exports=r},{11:11,19:19,41:41,45:45}],23:[function(e,t,n){"use strict";function r(e,t){var n={};return function(r){n[t]=r,e.setState(n)}}var o={createStateSetter:function(e,t){return function(n,r,o,i,a,s){var u=t.call(e,n,r,o,i,a,s);u&&e.setState(u)}},createStateKeySetter:function(e,t){var n=e.__keySetters||(e.__keySetters={});return n[t]||(n[t]=r(e,t))}};o.Mixin={createStateSetter:function(e){return o.createStateSetter(this,e)},createStateKeySetter:function(e){return o.createStateKeySetter(this,e)}},t.exports=o},{}],24:[function(e,t,n){"use strict";var r=e(31),o={getChildMapping:function(e,t){return e?r(e):e},mergeChildMappings:function(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,s={};for(var u in t){if(r.hasOwnProperty(u))for(a=0;a<r[u].length;a++){var c=r[u][a];s[r[u][a]]=n(c)}s[u]=n(u)}for(a=0;a<o.length;a++)s[o[a]]=n(o[a]);return s}};t.exports=o},{31:31}],25:[function(e,t,n){"use strict";function r(e,t,n){e.addEventListener(t,n,!1)}function o(e,t,n){e.removeEventListener(t,n,!1)}var i=e(39),a=e(1),s=[];i.canUseDOM&&function(){var e=a("animationend"),t=a("transitionend");e&&s.push(e),t&&s.push(t)}();var u={addEndEventListener:function(e,t){if(0===s.length)return void window.setTimeout(t,0);s.forEach(function(n){r(e,n,t)})},removeEndEventListener:function(e,t){0!==s.length&&s.forEach(function(n){o(e,n,t)})}};t.exports=u},{1:1,39:39}],26:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=e(45),s=e(5),u=e(24),c=e(47),p=c(s.isValidElement),l=e(40),f=function(e){function t(){var n,i,s;r(this,t);for(var c=arguments.length,p=Array(c),l=0;l<c;l++)p[l]=arguments[l];return n=i=o(this,e.call.apply(e,[this].concat(p))),i.state={children:u.getChildMapping(i.props.children)},i.performAppear=function(e){i.currentlyTransitioningKeys[e]=!0;var t=i.refs[e];t.componentWillAppear?t.componentWillAppear(i._handleDoneAppearing.bind(i,e)):i._handleDoneAppearing(e)},i._handleDoneAppearing=function(e){var t=i.refs[e];t.componentDidAppear&&t.componentDidAppear(),delete i.currentlyTransitioningKeys[e];var n=u.getChildMapping(i.props.children);n&&n.hasOwnProperty(e)||i.performLeave(e)},i.performEnter=function(e){i.currentlyTransitioningKeys[e]=!0;var t=i.refs[e];t.componentWillEnter?t.componentWillEnter(i._handleDoneEntering.bind(i,e)):i._handleDoneEntering(e)},i._handleDoneEntering=function(e){var t=i.refs[e];t.componentDidEnter&&t.componentDidEnter(),delete i.currentlyTransitioningKeys[e];var n=u.getChildMapping(i.props.children);n&&n.hasOwnProperty(e)||i.performLeave(e)},i.performLeave=function(e){i.currentlyTransitioningKeys[e]=!0;var t=i.refs[e];t.componentWillLeave?t.componentWillLeave(i._handleDoneLeaving.bind(i,e)):i._handleDoneLeaving(e)},i._handleDoneLeaving=function(e){var t=i.refs[e];t.componentDidLeave&&t.componentDidLeave(),delete i.currentlyTransitioningKeys[e];var n=u.getChildMapping(i.props.children);n&&n.hasOwnProperty(e)?i.performEnter(e):i.setState(function(t){var n=a({},t.children);return delete n[e],{children:n}})},s=n,o(i,s)}return i(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)},t.prototype.componentWillReceiveProps=function(e){var t=u.getChildMapping(e.children),n=this.state.children;this.setState({children:u.mergeChildMappings(n,t)});var r;for(r in t){var o=n&&n.hasOwnProperty(r);!t[r]||o||this.currentlyTransitioningKeys[r]||this.keysToEnter.push(r)}for(r in n){var i=t&&t.hasOwnProperty(r);!n[r]||i||this.currentlyTransitioningKeys[r]||this.keysToLeave.push(r)}},t.prototype.componentDidUpdate=function(){var e=this.keysToEnter;this.keysToEnter=[],e.forEach(this.performEnter);var t=this.keysToLeave;this.keysToLeave=[],t.forEach(this.performLeave)},t.prototype.render=function(){var e=[];for(var t in this.state.children){var n=this.state.children[t];n&&e.push(s.cloneElement(this.props.childFactory(n),{ref:t,key:t}))}var r=a({},this.props);return delete r.transitionLeave,delete r.transitionName,delete r.transitionAppear,delete r.transitionEnter,delete r.childFactory,delete r.transitionLeaveTimeout,delete r.transitionEnterTimeout,delete r.transitionAppearTimeout,delete r.component,s.createElement(this.props.component,r,e)},t}(s.Component);f.displayName="ReactTransitionGroup",f.propTypes={component:p.any,childFactory:p.func},f.defaultProps={component:"span",childFactory:l.thatReturnsArgument},t.exports=f},{24:24,40:40,45:45,47:47,5:5}],27:[function(e,t,n){"use strict";t.exports="15.5.3"},{}],28:[function(e,t,n){"use strict";var r=e(3),o=e(5),i=(e(6),e(12)),a=e(7),s=e(17),u=e(26),c=e(35),p=e(37);o.addons={CSSTransitionGroup:a,LinkedStateMixin:r,PureRenderMixin:i,TransitionGroup:u,createFragment:s.create,shallowCompare:c,update:p},t.exports=o},{12:12,17:17,26:26,3:3,35:35,37:37,5:5,6:6,7:7}],29:[function(e,t,n){"use strict";var r=e(45),o=e(28),i=r(o,{__SECRET_INJECTED_REACT_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:null,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:e(13)}});t.exports=i},{13:13,28:28,45:45}],30:[function(e,t,n){"use strict";t.exports=!1},{}],31:[function(e,t,n){(function(n){"use strict";function r(e,t,n,r){if(e&&"object"==typeof e){var o=e;void 0===o[n]&&null!=t&&(o[n]=t)}}function o(e,t){if(null==e)return e;var n={};return i(e,r,n),n}var i=(e(2),e(36));e(44);void 0!==n&&n.env,t.exports=o}).call(this,void 0)},{2:2,36:36,44:44}],32:[function(e,t,n){"use strict";function r(e){var t=e&&(o&&e[o]||e[i]);if("function"==typeof t)return t}var o="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";t.exports=r},{}],33:[function(e,t,n){"use strict";function r(e){return i.isValidElement(e)||o("143"),e}var o=e(34),i=e(15);e(42);t.exports=r},{15:15,34:34,42:42}],34:[function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var o=new Error(n);throw o.name="Invariant Violation",o.framesToPop=1,o}t.exports=r},{}],35:[function(e,t,n){"use strict";function r(e,t,n){return!o(e.props,t)||!o(e.state,n)}var o=e(43);t.exports=r},{43:43}],36:[function(e,t,n){"use strict";function r(e,t){return e&&"object"==typeof e&&null!=e.key?c.escape(e.key):t.toString(36)}function o(e,t,n,i){var f=typeof e;if("undefined"!==f&&"boolean"!==f||(e=null),null===e||"string"===f||"number"===f||"object"===f&&e.$$typeof===s)return n(i,e,""===t?p+r(e,0):t),1;var d,h,y=0,m=""===t?p:t+l;if(Array.isArray(e))for(var v=0;v<e.length;v++)d=e[v],h=m+r(d,v),y+=o(d,h,n,i);else{var E=u(e);if(E){var g,b=E.call(e);if(E!==e.entries)for(var _=0;!(g=b.next()).done;)d=g.value,h=m+r(d,_++),y+=o(d,h,n,i);else for(;!(g=b.next()).done;){var w=g.value;w&&(d=w[1],h=m+c.escape(w[0])+l+r(d,0),y+=o(d,h,n,i))}}else if("object"===f){var A=String(e);a("31","[object Object]"===A?"object with keys {"+Object.keys(e).join(", ")+"}":A,"")}}return y}function i(e,t,n){return null==e?0:o(e,"",t,n)}var a=e(34),s=(e(13),e(16)),u=e(32),c=(e(42),e(2)),p=(e(44),"."),l=":";t.exports=i},{13:13,16:16,2:2,32:32,34:34,42:42,44:44}],37:[function(e,t,n){"use strict";function r(e){return Array.isArray(e)?e.concat():e&&"object"==typeof e?s(new e.constructor,e):e}function o(e,t,n){Array.isArray(e)||a("1",n,e);var r=t[n];Array.isArray(r)||a("2",n,r)}function i(e,t){if("object"!=typeof t&&a("3",y.join(", "),f),u.call(t,f))return 1!==Object.keys(t).length&&a("4",f),t[f];var n=r(e);if(u.call(t,d)){var v=t[d];v&&"object"==typeof v||a("5",d,v),n&&"object"==typeof n||a("6",d,n),s(n,t[d])}u.call(t,c)&&(o(e,t,c),t[c].forEach(function(e){n.push(e)})),u.call(t,p)&&(o(e,t,p),t[p].forEach(function(e){n.unshift(e)})),u.call(t,l)&&(Array.isArray(e)||a("7",l,e),Array.isArray(t[l])||a("8",l,t[l]),t[l].forEach(function(e){Array.isArray(e)||a("8",l,t[l]),n.splice.apply(n,e)})),u.call(t,h)&&("function"!=typeof t[h]&&a("9",h,t[h]),n=t[h](n));for(var E in t)m.hasOwnProperty(E)&&m[E]||(n[E]=i(e[E],t[E]));return n}var a=e(34),s=e(45),u=(e(42),{}.hasOwnProperty),c="$push",p="$unshift",l="$splice",f="$set",d="$merge",h="$apply",y=[c,p,l,f,d,h],m={};y.forEach(function(e){m[e]=!0}),t.exports=i},{34:34,42:42,45:45}],38:[function(e,t,n){"use strict";function r(e,t){for(var n=e;n.parentNode;)n=n.parentNode;var r=n.querySelectorAll(t);return-1!==Array.prototype.indexOf.call(r,e)}var o=e(42),i={addClass:function(e,t){return/\s/.test(t)&&o(!1),t&&(e.classList?e.classList.add(t):i.hasClass(e,t)||(e.className=e.className+" "+t)),e},removeClass:function(e,t){return/\s/.test(t)&&o(!1),t&&(e.classList?e.classList.remove(t):i.hasClass(e,t)&&(e.className=e.className.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,""))),e},conditionClass:function(e,t,n){return(n?i.addClass:i.removeClass)(e,t)},hasClass:function(e,t){return/\s/.test(t)&&o(!1),e.classList?!!t&&e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1},matchesSelector:function(e,t){return(e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||function(t){return r(e,t)}).call(e,t)}};t.exports=i},{42:42}],39:[function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};t.exports=o},{}],40:[function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},t.exports=o},{}],41:[function(e,t,n){"use strict";var r={};t.exports=r},{}],42:[function(e,t,n){"use strict";function r(e,t,n,r,i,a,s,u){if(o(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[n,r,i,a,s,u],l=0;c=new Error(t.replace(/%s/g,function(){return p[l++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var o=function(e){};t.exports=r},{}],43:[function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!==e&&t!==t}function o(e,t){if(r(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++)if(!i.call(t,n[a])||!r(e[n[a]],t[n[a]]))return!1;return!0}var i=Object.prototype.hasOwnProperty;t.exports=o},{}],44:[function(e,t,n){"use strict";var r=e(40),o=r;t.exports=o},{40:40}],45:[function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.exports=function(){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;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=r(e),c=1;c<arguments.length;c++){n=Object(arguments[c]);for(var p in n)i.call(n,p)&&(u[p]=n[p]);if(o){s=o(n);for(var l=0;l<s.length;l++)a.call(n,s[l])&&(u[s[l]]=n[s[l]])}}return u}},{}],46:[function(e,t,n){"use strict";function r(e,t,n,r,o){}e(42),e(44),e(48);t.exports=r},{42:42,44:44,48:48}],47:[function(e,t,n){"use strict"
|
|
13
|
-
;var r=(e(
|
|
12
|
+
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.React=e()}}(function(){return function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return o(n||e)},l,l.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){"use strict";function r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function o(e){if(s[e])return s[e];if(!a[e])return e;var t=a[e];for(var n in t)if(t.hasOwnProperty(n)&&n in u)return s[e]=t[n];return""}var i=e(39),a={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},s={},u={};i.canUseDOM&&(u=document.createElement("div").style,"AnimationEvent"in window||(delete a.animationend.animation,delete a.animationiteration.animation,delete a.animationstart.animation),"TransitionEvent"in window||delete a.transitionend.transition),t.exports=o},{39:39}],2:[function(e,t,n){"use strict";function r(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}function o(e){var t=/(=0|=2)/g,n={"=0":"=","=2":":"};return(""+("."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1))).replace(t,function(e){return n[e]})}var i={escape:r,unescape:o};t.exports=i},{}],3:[function(e,t,n){"use strict";var r=e(17),o=e(20),i={linkState:function(e){return new r(this.state[e],o.createStateKeySetter(this,e))}};t.exports=i},{17:17,20:20}],4:[function(e,t,n){"use strict";var r=e(33),o=(e(42),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),i=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},a=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},s=function(e,t,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,e,t,n,r),i}return new o(e,t,n,r)},u=function(e){var t=this;e instanceof t||r("25"),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},c=o,l=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||c,n.poolSize||(n.poolSize=10),n.release=u,n},p={addPoolingTo:l,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:s};t.exports=p},{33:33,42:42}],5:[function(e,t,n){"use strict";var r=e(45),o=e(7),i=e(10),a=e(13),s=e(14),u=e(19),c=e(24),l=e(28),p=e(32),f=s.createElement,d=s.createFactory,h=s.cloneElement,y=r,m=function(e){return e},v={Children:{map:i.map,forEach:i.forEach,count:i.count,toArray:i.toArray,only:p},Component:o.Component,PureComponent:o.PureComponent,createElement:f,cloneElement:h,isValidElement:s.isValidElement,PropTypes:u,createClass:l,createFactory:d,createMixin:m,DOM:a,version:c,__spread:y};t.exports=v},{10:10,13:13,14:14,19:19,24:24,28:28,32:32,45:45,7:7}],6:[function(e,t,n){"use strict";function r(){if(!o){var t=e(26);o=t.__SECRET_INJECTED_REACT_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED}return o}var o;n.getReactDOM=r},{26:26}],7:[function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=c,this.updater=n||u}function o(e,t,n){this.props=e,this.context=t,this.refs=c,this.updater=n||u}function i(){}var a=e(33),s=e(45),u=e(18),c=(e(27),e(41));e(42),e(31);r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&a("85"),this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t,"setState")},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e,"forceUpdate")};i.prototype=r.prototype,o.prototype=new i,o.prototype.constructor=o,s(o.prototype,r.prototype),o.prototype.isPureReactComponent=!0,t.exports={Component:r,PureComponent:o}},{18:18,27:27,31:31,33:33,41:41,42:42,45:45}],8:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 i(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 a(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 ReactCSSTransitionGroup: 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)")}}}var s=e(45),u=e(5),c=e(47),l=c(u.isValidElement),p=e(23),f=e(9),d=function(e){function t(){var n,i,a;r(this,t);for(var s=arguments.length,c=Array(s),l=0;l<s;l++)c[l]=arguments[l];return n=i=o(this,e.call.apply(e,[this].concat(c))),i._wrapChild=function(e){return u.createElement(f,{name:i.props.transitionName,appear:i.props.transitionAppear,enter:i.props.transitionEnter,leave:i.props.transitionLeave,appearTimeout:i.props.transitionAppearTimeout,enterTimeout:i.props.transitionEnterTimeout,leaveTimeout:i.props.transitionLeaveTimeout},e)},a=n,o(i,a)}return i(t,e),t.prototype.render=function(){return u.createElement(p,s({},this.props,{childFactory:this._wrapChild}))},t}(u.Component);d.displayName="ReactCSSTransitionGroup",d.propTypes={transitionName:f.propTypes.name,transitionAppear:l.bool,transitionEnter:l.bool,transitionLeave:l.bool,transitionAppearTimeout:a("Appear"),transitionEnterTimeout:a("Enter"),transitionLeaveTimeout:a("Leave")},d.defaultProps={transitionAppear:!1,transitionEnter:!0,transitionLeave:!0},t.exports=d},{23:23,45:45,47:47,5:5,9:9}],9:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=e(5),s=e(6),u=e(47),c=u(a.isValidElement),l=e(38),p=e(22),f=e(32),d=17,h=function(e){function t(){var n,i,a;r(this,t);for(var u=arguments.length,c=Array(u),f=0;f<u;f++)c[f]=arguments[f];return n=i=o(this,e.call.apply(e,[this].concat(c))),i._isMounted=!1,i.transition=function(e,t,n){var r=s.getReactDOM().findDOMNode(i);if(!r)return void(t&&t());var o=i.props.name[e]||i.props.name+"-"+e,a=i.props.name[e+"Active"]||o+"-active",u=null,c=function(e){e&&e.target!==r||(clearTimeout(u),l.removeClass(r,o),l.removeClass(r,a),p.removeEndEventListener(r,c),t&&t())};l.addClass(r,o),i.queueClassAndNode(a,r),n?(u=setTimeout(c,n),i.transitionTimeouts.push(u)):p.addEndEventListener(r,c)},i.queueClassAndNode=function(e,t){i.classNameAndNodeQueue.push({className:e,node:t}),i.timeout||(i.timeout=setTimeout(i.flushClassNameAndNodeQueue,d))},i.flushClassNameAndNodeQueue=function(){i._isMounted&&i.classNameAndNodeQueue.forEach(function(e){l.addClass(e.node,e.className)}),i.classNameAndNodeQueue.length=0,i.timeout=null},i.componentWillAppear=function(e){i.props.appear?i.transition("appear",e,i.props.appearTimeout):e()},i.componentWillEnter=function(e){i.props.enter?i.transition("enter",e,i.props.enterTimeout):e()},i.componentWillLeave=function(e){i.props.leave?i.transition("leave",e,i.props.leaveTimeout):e()},a=n,o(i,a)}return i(t,e),t.prototype.componentWillMount=function(){this.classNameAndNodeQueue=[],this.transitionTimeouts=[]},t.prototype.componentDidMount=function(){this._isMounted=!0},t.prototype.componentWillUnmount=function(){this._isMounted=!1,this.timeout&&clearTimeout(this.timeout),this.transitionTimeouts.forEach(function(e){clearTimeout(e)}),this.classNameAndNodeQueue.length=0},t.prototype.render=function(){return f(this.props.children)},t}(a.Component);h.propTypes={name:c.oneOfType([c.string,c.shape({enter:c.string,leave:c.string,active:c.string}),c.shape({enter:c.string,enterActive:c.string,leave:c.string,leaveActive:c.string,appear:c.string,appearActive:c.string})]).isRequired,appear:c.bool,enter:c.bool,leave:c.bool,appearTimeout:c.number,enterTimeout:c.number,leaveTimeout:c.number},t.exports=h},{22:22,32:32,38:38,47:47,5:5,6:6}],10:[function(e,t,n){"use strict";function r(e){return(""+e).replace(E,"$&/")}function o(e,t){this.func=e,this.context=t,this.count=0}function i(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function a(e,t,n){if(null==e)return e;var r=o.getPooled(t,n);v(e,i,r),o.release(r)}function s(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function u(e,t,n){var o=e.result,i=e.keyPrefix,a=e.func,s=e.context,u=a.call(s,t,e.count++);Array.isArray(u)?c(u,o,n,m.thatReturnsArgument):null!=u&&(y.isValidElement(u)&&(u=y.cloneAndReplaceKey(u,i+(!u.key||t&&t.key===u.key?"":r(u.key)+"/")+n)),o.push(u))}function c(e,t,n,o,i){var a="";null!=n&&(a=r(n)+"/");var c=s.getPooled(t,a,o,i);v(e,u,c),s.release(c)}function l(e,t,n){if(null==e)return e;var r=[];return c(e,r,null,t,n),r}function p(e,t,n){return null}function f(e,t){return v(e,p,null)}function d(e){var t=[];return c(e,t,null,m.thatReturnsArgument),t}var h=e(4),y=e(14),m=e(40),v=e(35),g=h.twoArgumentPooler,b=h.fourArgumentPooler,E=/\/+/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,g),s.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(s,b);var _={forEach:a,map:l,mapIntoWithKeyPrefixInternal:c,count:f,toArray:d};t.exports=_},{14:14,35:35,4:4,40:40}],11:[function(e,t,n){"use strict";var r=e(34),o={shouldComponentUpdate:function(e,t){return r(this,e,t)}};t.exports=o},{34:34}],12:[function(e,t,n){"use strict";var r={current:null};t.exports=r},{}],13:[function(e,t,n){"use strict";var r=e(14),o=r.createFactory,i={a:o("a"),abbr:o("abbr"),address:o("address"),area:o("area"),article:o("article"),aside:o("aside"),audio:o("audio"),b:o("b"),base:o("base"),bdi:o("bdi"),bdo:o("bdo"),big:o("big"),blockquote:o("blockquote"),body:o("body"),br:o("br"),button:o("button"),canvas:o("canvas"),caption:o("caption"),cite:o("cite"),code:o("code"),col:o("col"),colgroup:o("colgroup"),data:o("data"),datalist:o("datalist"),dd:o("dd"),del:o("del"),details:o("details"),dfn:o("dfn"),dialog:o("dialog"),div:o("div"),dl:o("dl"),dt:o("dt"),em:o("em"),embed:o("embed"),fieldset:o("fieldset"),figcaption:o("figcaption"),figure:o("figure"),footer:o("footer"),form:o("form"),h1:o("h1"),h2:o("h2"),h3:o("h3"),h4:o("h4"),h5:o("h5"),h6:o("h6"),head:o("head"),header:o("header"),hgroup:o("hgroup"),hr:o("hr"),html:o("html"),i:o("i"),iframe:o("iframe"),img:o("img"),input:o("input"),ins:o("ins"),kbd:o("kbd"),keygen:o("keygen"),label:o("label"),legend:o("legend"),li:o("li"),link:o("link"),main:o("main"),map:o("map"),mark:o("mark"),menu:o("menu"),menuitem:o("menuitem"),meta:o("meta"),meter:o("meter"),nav:o("nav"),noscript:o("noscript"),object:o("object"),ol:o("ol"),optgroup:o("optgroup"),option:o("option"),output:o("output"),p:o("p"),param:o("param"),picture:o("picture"),pre:o("pre"),progress:o("progress"),q:o("q"),rp:o("rp"),rt:o("rt"),ruby:o("ruby"),s:o("s"),samp:o("samp"),script:o("script"),section:o("section"),select:o("select"),small:o("small"),source:o("source"),span:o("span"),strong:o("strong"),style:o("style"),sub:o("sub"),summary:o("summary"),sup:o("sup"),table:o("table"),tbody:o("tbody"),td:o("td"),textarea:o("textarea"),tfoot:o("tfoot"),th:o("th"),thead:o("thead"),time:o("time"),title:o("title"),tr:o("tr"),track:o("track"),u:o("u"),ul:o("ul"),var:o("var"),video:o("video"),wbr:o("wbr"),circle:o("circle"),clipPath:o("clipPath"),defs:o("defs"),ellipse:o("ellipse"),g:o("g"),image:o("image"),line:o("line"),linearGradient:o("linearGradient"),mask:o("mask"),path:o("path"),pattern:o("pattern"),polygon:o("polygon"),polyline:o("polyline"),radialGradient:o("radialGradient"),rect:o("rect"),stop:o("stop"),svg:o("svg"),text:o("text"),tspan:o("tspan")};t.exports=i},{14:14}],14:[function(e,t,n){"use strict";function r(e){return void 0!==e.ref}function o(e){return void 0!==e.key}var i=e(45),a=e(12),s=(e(44),e(27),Object.prototype.hasOwnProperty),u=e(15),c={key:!0,ref:!0,__self:!0,__source:!0},l=function(e,t,n,r,o,i,a){return{$$typeof:u,type:e,key:t,ref:n,props:a,_owner:i}};l.createElement=function(e,t,n){var i,u={},p=null,f=null;if(null!=t){r(t)&&(f=t.ref),o(t)&&(p=""+t.key),void 0===t.__self?null:t.__self,void 0===t.__source?null:t.__source;for(i in t)s.call(t,i)&&!c.hasOwnProperty(i)&&(u[i]=t[i])}var d=arguments.length-2;if(1===d)u.children=n;else if(d>1){for(var h=Array(d),y=0;y<d;y++)h[y]=arguments[y+2];u.children=h}if(e&&e.defaultProps){var m=e.defaultProps;for(i in m)void 0===u[i]&&(u[i]=m[i])}return l(e,p,f,0,0,a.current,u)},l.createFactory=function(e){var t=l.createElement.bind(null,e);return t.type=e,t},l.cloneAndReplaceKey=function(e,t){return l(e.type,t,e.ref,e._self,e._source,e._owner,e.props)},l.cloneElement=function(e,t,n){var u,p=i({},e.props),f=e.key,d=e.ref,h=(e._self,e._source,e._owner);if(null!=t){r(t)&&(d=t.ref,h=a.current),o(t)&&(f=""+t.key);var y;e.type&&e.type.defaultProps&&(y=e.type.defaultProps);for(u in t)s.call(t,u)&&!c.hasOwnProperty(u)&&(void 0===t[u]&&void 0!==y?p[u]=y[u]:p[u]=t[u])}var m=arguments.length-2;if(1===m)p.children=n;else if(m>1){for(var v=Array(m),g=0;g<m;g++)v[g]=arguments[g+2];p.children=v}return l(e.type,f,d,0,0,h,p)},l.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===u},t.exports=l},{12:12,15:15,27:27,44:44,45:45}],15:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;t.exports=r},{}],16:[function(e,t,n){"use strict";var r=e(33),o=e(10),i=e(14),a=e(40),s=(e(42),e(44),{create:function(e){if("object"!=typeof e||!e||Array.isArray(e))return e;if(i.isValidElement(e))return e;1===e.nodeType&&r("0");var t=[];for(var n in e)o.mapIntoWithKeyPrefixInternal(e[n],t,n,a.thatReturnsArgument);return t}});t.exports=s},{10:10,14:14,33:33,40:40,42:42,44:44}],17:[function(e,t,n){"use strict";function r(e,t){this.value=e,this.requestChange=t}t.exports=r},{}],18:[function(e,t,n){"use strict";var r=(e(44),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){},enqueueReplaceState:function(e,t){},enqueueSetState:function(e,t){}});t.exports=r},{44:44}],19:[function(e,t,n){"use strict";var r=e(14),o=r.isValidElement,i=e(47);t.exports=i(o)},{14:14,47:47}],20:[function(e,t,n){"use strict";function r(e,t){var n={};return function(r){n[t]=r,e.setState(n)}}var o={createStateSetter:function(e,t){return function(n,r,o,i,a,s){var u=t.call(e,n,r,o,i,a,s);u&&e.setState(u)}},createStateKeySetter:function(e,t){var n=e.__keySetters||(e.__keySetters={});return n[t]||(n[t]=r(e,t))}};o.Mixin={createStateSetter:function(e){return o.createStateSetter(this,e)},createStateKeySetter:function(e){return o.createStateKeySetter(this,e)}},t.exports=o},{}],21:[function(e,t,n){"use strict";var r=e(29),o={getChildMapping:function(e,t){return e?r(e):e},mergeChildMappings:function(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,s={};for(var u in t){if(r.hasOwnProperty(u))for(a=0;a<r[u].length;a++){var c=r[u][a];s[r[u][a]]=n(c)}s[u]=n(u)}for(a=0;a<o.length;a++)s[o[a]]=n(o[a]);return s}};t.exports=o},{29:29}],22:[function(e,t,n){"use strict";function r(e,t,n){e.addEventListener(t,n,!1)}function o(e,t,n){e.removeEventListener(t,n,!1)}var i=e(39),a=e(1),s=[];i.canUseDOM&&function(){var e=a("animationend"),t=a("transitionend");e&&s.push(e),t&&s.push(t)}();var u={addEndEventListener:function(e,t){if(0===s.length)return void window.setTimeout(t,0);s.forEach(function(n){r(e,n,t)})},removeEndEventListener:function(e,t){0!==s.length&&s.forEach(function(n){o(e,n,t)})}};t.exports=u},{1:1,39:39}],23:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=e(45),s=e(5),u=e(21),c=e(47),l=c(s.isValidElement),p=e(40),f=function(e){function t(){var n,i,s;r(this,t);for(var c=arguments.length,l=Array(c),p=0;p<c;p++)l[p]=arguments[p];return n=i=o(this,e.call.apply(e,[this].concat(l))),i.state={children:u.getChildMapping(i.props.children)},i.performAppear=function(e){i.currentlyTransitioningKeys[e]=!0;var t=i.refs[e];t.componentWillAppear?t.componentWillAppear(i._handleDoneAppearing.bind(i,e)):i._handleDoneAppearing(e)},i._handleDoneAppearing=function(e){var t=i.refs[e];t.componentDidAppear&&t.componentDidAppear(),delete i.currentlyTransitioningKeys[e];var n=u.getChildMapping(i.props.children);n&&n.hasOwnProperty(e)||i.performLeave(e)},i.performEnter=function(e){i.currentlyTransitioningKeys[e]=!0;var t=i.refs[e];t.componentWillEnter?t.componentWillEnter(i._handleDoneEntering.bind(i,e)):i._handleDoneEntering(e)},i._handleDoneEntering=function(e){var t=i.refs[e];t.componentDidEnter&&t.componentDidEnter(),delete i.currentlyTransitioningKeys[e];var n=u.getChildMapping(i.props.children);n&&n.hasOwnProperty(e)||i.performLeave(e)},i.performLeave=function(e){i.currentlyTransitioningKeys[e]=!0;var t=i.refs[e];t.componentWillLeave?t.componentWillLeave(i._handleDoneLeaving.bind(i,e)):i._handleDoneLeaving(e)},i._handleDoneLeaving=function(e){var t=i.refs[e];t.componentDidLeave&&t.componentDidLeave(),delete i.currentlyTransitioningKeys[e];var n=u.getChildMapping(i.props.children);n&&n.hasOwnProperty(e)?i.performEnter(e):i.setState(function(t){var n=a({},t.children);return delete n[e],{children:n}})},s=n,o(i,s)}return i(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)},t.prototype.componentWillReceiveProps=function(e){var t=u.getChildMapping(e.children),n=this.state.children;this.setState({children:u.mergeChildMappings(n,t)});var r;for(r in t){var o=n&&n.hasOwnProperty(r);!t[r]||o||this.currentlyTransitioningKeys[r]||this.keysToEnter.push(r)}for(r in n){var i=t&&t.hasOwnProperty(r);!n[r]||i||this.currentlyTransitioningKeys[r]||this.keysToLeave.push(r)}},t.prototype.componentDidUpdate=function(){var e=this.keysToEnter;this.keysToEnter=[],e.forEach(this.performEnter);var t=this.keysToLeave;this.keysToLeave=[],t.forEach(this.performLeave)},t.prototype.render=function(){var e=[];for(var t in this.state.children){var n=this.state.children[t];n&&e.push(s.cloneElement(this.props.childFactory(n),{ref:t,key:t}))}var r=a({},this.props);return delete r.transitionLeave,delete r.transitionName,delete r.transitionAppear,delete r.transitionEnter,delete r.childFactory,delete r.transitionLeaveTimeout,delete r.transitionEnterTimeout,delete r.transitionAppearTimeout,delete r.component,s.createElement(this.props.component,r,e)},t}(s.Component);f.displayName="ReactTransitionGroup",f.propTypes={component:l.any,childFactory:l.func},f.defaultProps={component:"span",childFactory:p.thatReturnsArgument},t.exports=f},{21:21,40:40,45:45,47:47,5:5}],24:[function(e,t,n){"use strict";t.exports="15.6.1"},{}],25:[function(e,t,n){"use strict";var r=e(3),o=e(5),i=(e(6),e(11)),a=e(8),s=e(16),u=e(23),c=e(34),l=e(36);o.addons={CSSTransitionGroup:a,LinkedStateMixin:r,PureRenderMixin:i,TransitionGroup:u,createFragment:s.create,shallowCompare:c,update:l},t.exports=o},{11:11,16:16,23:23,3:3,34:34,36:36,5:5,6:6,8:8}],26:[function(e,t,n){"use strict";var r=e(45),o=e(25),i=r(o,{__SECRET_INJECTED_REACT_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:null,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:e(12)}});t.exports=i},{12:12,25:25,45:45}],27:[function(e,t,n){"use strict";t.exports=!1},{}],28:[function(e,t,n){"use strict";var r=e(7),o=r.Component,i=e(14),a=i.isValidElement,s=e(18),u=e(37);t.exports=u(o,a,s)},{14:14,18:18,37:37,7:7}],29:[function(e,t,n){(function(n){"use strict";function r(e,t,n,r){if(e&&"object"==typeof e){var o=e;void 0===o[n]&&null!=t&&(o[n]=t)}}function o(e,t){if(null==e)return e;var n={};return i(e,r,n),n}var i=(e(2),e(35));e(44);void 0!==n&&n.env,t.exports=o}).call(this,void 0)},{2:2,35:35,44:44}],30:[function(e,t,n){"use strict";function r(e){var t=e&&(o&&e[o]||e[i]);if("function"==typeof t)return t}var o="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";t.exports=r},{}],31:[function(e,t,n){"use strict";var r=function(){};t.exports=r},{}],32:[function(e,t,n){"use strict";function r(e){return i.isValidElement(e)||o("143"),e}var o=e(33),i=e(14);e(42);t.exports=r},{14:14,33:33,42:42}],33:[function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var o=new Error(n);throw o.name="Invariant Violation",o.framesToPop=1,o}t.exports=r},{}],34:[function(e,t,n){"use strict";function r(e,t,n){return!o(e.props,t)||!o(e.state,n)}var o=e(43);t.exports=r},{43:43}],35:[function(e,t,n){"use strict";function r(e,t){return e&&"object"==typeof e&&null!=e.key?c.escape(e.key):t.toString(36)}function o(e,t,n,i){var f=typeof e;if("undefined"!==f&&"boolean"!==f||(e=null),null===e||"string"===f||"number"===f||"object"===f&&e.$$typeof===s)return n(i,e,""===t?l+r(e,0):t),1;var d,h,y=0,m=""===t?l:t+p;if(Array.isArray(e))for(var v=0;v<e.length;v++)d=e[v],h=m+r(d,v),y+=o(d,h,n,i);else{var g=u(e);if(g){var b,E=g.call(e);if(g!==e.entries)for(var _=0;!(b=E.next()).done;)d=b.value,h=m+r(d,_++),y+=o(d,h,n,i);else for(;!(b=E.next()).done;){var w=b.value;w&&(d=w[1],h=m+c.escape(w[0])+p+r(d,0),y+=o(d,h,n,i))}}else if("object"===f){var x=String(e);a("31","[object Object]"===x?"object with keys {"+Object.keys(e).join(", ")+"}":x,"")}}return y}function i(e,t,n){return null==e?0:o(e,"",t,n)}var a=e(33),s=(e(12),e(15)),u=e(30),c=(e(42),e(2)),l=(e(44),"."),p=":";t.exports=i},{12:12,15:15,2:2,30:30,33:33,42:42,44:44}],36:[function(e,t,n){"use strict";function r(e){return Array.isArray(e)?e.concat():e&&"object"==typeof e?s(new e.constructor,e):e}function o(e,t,n){Array.isArray(e)||a("1",n,e);var r=t[n];Array.isArray(r)||a("2",n,r)}function i(e,t){if("object"!=typeof t&&a("3",y.join(", "),f),u.call(t,f))return 1!==Object.keys(t).length&&a("4",f),t[f];var n=r(e);if(u.call(t,d)){var v=t[d];v&&"object"==typeof v||a("5",d,v),n&&"object"==typeof n||a("6",d,n),s(n,t[d])}u.call(t,c)&&(o(e,t,c),t[c].forEach(function(e){n.push(e)})),u.call(t,l)&&(o(e,t,l),t[l].forEach(function(e){n.unshift(e)})),u.call(t,p)&&(Array.isArray(e)||a("7",p,e),Array.isArray(t[p])||a("8",p,t[p]),t[p].forEach(function(e){Array.isArray(e)||a("8",p,t[p]),n.splice.apply(n,e)})),u.call(t,h)&&("function"!=typeof t[h]&&a("9",h,t[h]),n=t[h](n));for(var g in t)m.hasOwnProperty(g)&&m[g]||(n[g]=i(e[g],t[g]));return n}var a=e(33),s=e(45),u=(e(42),{}.hasOwnProperty),c="$push",l="$unshift",p="$splice",f="$set",d="$merge",h="$apply",y=[c,l,p,f,d,h],m={};y.forEach(function(e){m[e]=!0}),t.exports=i},{33:33,42:42,45:45}],37:[function(e,t,n){"use strict";function r(e){return e}function o(e,t,n){function o(e,t){var n=g.hasOwnProperty(t)?g[t]:null;w.hasOwnProperty(t)&&s("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&s("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function c(e,n){if(n){s("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),s(!t(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=e.prototype,i=r.__reactAutoBindPairs;n.hasOwnProperty(u)&&b.mixins(e,n.mixins);for(var a in n)if(n.hasOwnProperty(a)&&a!==u){var c=n[a],l=r.hasOwnProperty(a);if(o(l,a),b.hasOwnProperty(a))b[a](e,c);else{var p=g.hasOwnProperty(a),h="function"==typeof c,y=h&&!p&&!l&&!1!==n.autobind;if(y)i.push(a,c),r[a]=c;else if(l){var m=g[a];s(p&&("DEFINE_MANY_MERGED"===m||"DEFINE_MANY"===m),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",m,a),"DEFINE_MANY_MERGED"===m?r[a]=f(r[a],c):"DEFINE_MANY"===m&&(r[a]=d(r[a],c))}else r[a]=c}}}else;}function l(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in b;s(!o,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n);var i=n in e;s(!i,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),e[n]=r}}}function p(e,t){s(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var n in t)t.hasOwnProperty(n)&&(s(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function f(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return p(o,n),p(o,r),o}}function d(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function h(e,t){var n=t.bind(e);return n}function y(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],o=t[n+1];e[r]=h(e,o)}}function m(e){var t=r(function(e,r,o){this.__reactAutoBindPairs.length&&y(this),this.props=e,this.context=r,this.refs=a,this.updater=o||n,this.state=null;var i=this.getInitialState?this.getInitialState():null;s("object"==typeof i&&!Array.isArray(i),"%s.getInitialState(): must return an object or null",t.displayName||"ReactCompositeComponent"),this.state=i});t.prototype=new x,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],v.forEach(c.bind(null,t)),c(t,E),c(t,e),c(t,_),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),s(t.prototype.render,"createClass(...): Class specification must implement a `render` method.");for(var o in g)t.prototype[o]||(t.prototype[o]=null);return t}var v=[],g={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},b={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)c(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=i({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=i({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=f(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=i({},e.propTypes,t)},statics:function(e,t){l(e,t)},autobind:function(){}},E={componentDidMount:function(){this.__isMounted=!0}},_={componentWillUnmount:function(){this.__isMounted=!1}},w={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return!!this.__isMounted}},x=function(){};return i(x.prototype,e.prototype,w),m}var i=e(45),a=e(41),s=e(42),u="mixins";t.exports=o},{41:41,42:42,44:44,45:45}],38:[function(e,t,n){"use strict";function r(e,t){for(var n=e;n.parentNode;)n=n.parentNode;var r=n.querySelectorAll(t);return-1!==Array.prototype.indexOf.call(r,e)}var o=e(42),i={addClass:function(e,t){return/\s/.test(t)&&o(!1),t&&(e.classList?e.classList.add(t):i.hasClass(e,t)||(e.className=e.className+" "+t)),e},removeClass:function(e,t){return/\s/.test(t)&&o(!1),t&&(e.classList?e.classList.remove(t):i.hasClass(e,t)&&(e.className=e.className.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,""))),e},conditionClass:function(e,t,n){return(n?i.addClass:i.removeClass)(e,t)},hasClass:function(e,t){return/\s/.test(t)&&o(!1),e.classList?!!t&&e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1},matchesSelector:function(e,t){return(e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||function(t){return r(e,t)}).call(e,t)}};t.exports=i},{42:42}],39:[function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};t.exports=o},{}],40:[function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},t.exports=o},{}],41:[function(e,t,n){"use strict";var r={};t.exports=r},{}],42:[function(e,t,n){"use strict";function r(e,t,n,r,i,a,s,u){if(o(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,a,s,u],p=0;c=new Error(t.replace(/%s/g,function(){return l[p++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var o=function(e){};t.exports=r},{}],43:[function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!==e&&t!==t}function o(e,t){if(r(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++)if(!i.call(t,n[a])||!r(e[n[a]],t[n[a]]))return!1;return!0}var i=Object.prototype.hasOwnProperty;t.exports=o},{}],44:[function(e,t,n){"use strict";var r=e(40),o=r
|
|
13
|
+
;t.exports=o},{40:40}],45:[function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.exports=function(){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;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=r(e),c=1;c<arguments.length;c++){n=Object(arguments[c]);for(var l in n)i.call(n,l)&&(u[l]=n[l]);if(o){s=o(n);for(var p=0;p<s.length;p++)a.call(n,s[p])&&(u[s[p]]=n[s[p]])}}return u}},{}],46:[function(e,t,n){"use strict";function r(e,t,n,r,o){}t.exports=r},{42:42,44:44,49:49}],47:[function(e,t,n){"use strict";var r=e(48);t.exports=function(e){return r(e,!1)}},{48:48}],48:[function(e,t,n){"use strict";var r=e(40),o=e(42),i=e(44),a=e(49),s=e(46);t.exports=function(e,t){function n(e){var t=e&&(A&&e[A]||e[T]);if("function"==typeof t)return t}function u(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}function c(e){this.message=e,this.stack=""}function l(e){function n(n,r,i,s,u,l,p){if(s=s||O,l=l||i,p!==a)if(t)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;return null==r[i]?n?new c(null===r[i]?"The "+u+" `"+l+"` is marked as required in `"+s+"`, but its value is `null`.":"The "+u+" `"+l+"` is marked as required in `"+s+"`, but its value is `undefined`."):null:e(r,i,s,u,l)}var r=n.bind(null,!1);return r.isRequired=n.bind(null,!0),r}function p(e){function t(t,n,r,o,i,a){var s=t[n];if(E(s)!==e)return new c("Invalid "+o+" `"+i+"` of type `"+_(s)+"` supplied to `"+r+"`, expected `"+e+"`.");return null}return l(t)}function f(e){function t(t,n,r,o,i){if("function"!=typeof e)return new c("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){return new c("Invalid "+o+" `"+i+"` of type `"+E(s)+"` supplied to `"+r+"`, expected an array.")}for(var u=0;u<s.length;u++){var l=e(s,u,r,o,i+"["+u+"]",a);if(l instanceof Error)return l}return null}return l(t)}function d(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||O;return new c("Invalid "+o+" `"+i+"` of type `"+x(t[n])+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}return null}return l(t)}function h(e){function t(t,n,r,o,i){for(var a=t[n],s=0;s<e.length;s++)if(u(a,e[s]))return null;return new c("Invalid "+o+" `"+i+"` of value `"+a+"` supplied to `"+r+"`, expected one of "+JSON.stringify(e)+".")}return Array.isArray(e)?l(t):r.thatReturnsNull}function y(e){function t(t,n,r,o,i){if("function"!=typeof e)return new c("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var s=t[n],u=E(s);if("object"!==u)return new c("Invalid "+o+" `"+i+"` of type `"+u+"` supplied to `"+r+"`, expected an object.");for(var l in s)if(s.hasOwnProperty(l)){var p=e(s,l,r,o,i+"."+l,a);if(p instanceof Error)return p}return null}return l(t)}function m(e){function t(t,n,r,o,i){for(var s=0;s<e.length;s++){if(null==(0,e[s])(t,n,r,o,i,a))return null}return new c("Invalid "+o+" `"+i+"` supplied to `"+r+"`.")}if(!Array.isArray(e))return r.thatReturnsNull;for(var n=0;n<e.length;n++){var o=e[n];if("function"!=typeof o)return i(!1,"Invalid argument supplid to oneOfType. Expected an array of check functions, but received %s at index %s.",w(o),n),r.thatReturnsNull}return l(t)}function v(e){function t(t,n,r,o,i){var s=t[n],u=E(s);if("object"!==u)return new c("Invalid "+o+" `"+i+"` of type `"+u+"` supplied to `"+r+"`, expected `object`.");for(var l in e){var p=e[l];if(p){var f=p(s,l,r,o,i+"."+l,a);if(f)return f}}return null}return l(t)}function g(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(g);if(null===t||e(t))return!0;var r=n(t);if(!r)return!1;var o,i=r.call(t);if(r!==t.entries){for(;!(o=i.next()).done;)if(!g(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!g(a[1]))return!1}return!0;default:return!1}}function b(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function E(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":b(t,e)?"symbol":t}function _(e){if(void 0===e||null===e)return""+e;var t=E(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function w(e){var t=_(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:O}var A="function"==typeof Symbol&&Symbol.iterator,T="@@iterator",O="<<anonymous>>",P={array:p("array"),bool:p("boolean"),func:p("function"),number:p("number"),object:p("object"),string:p("string"),symbol:p("symbol"),any:function(){return l(r.thatReturnsNull)}(),arrayOf:f,element:function(){function t(t,n,r,o,i){var a=t[n];if(!e(a)){return new c("Invalid "+o+" `"+i+"` of type `"+E(a)+"` supplied to `"+r+"`, expected a single ReactElement.")}return null}return l(t)}(),instanceOf:d,node:function(){function e(e,t,n,r,o){return g(e[t])?null:new c("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")}return l(e)}(),objectOf:y,oneOf:h,oneOfType:m,shape:v};return c.prototype=Error.prototype,P.checkPropTypes=s,P.PropTypes=P,P}},{40:40,42:42,44:44,46:46,49:49}],49:[function(e,t,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},{}]},{},[26])(26)});
|
package/dist/react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* React v15.
|
|
2
|
+
* React v15.6.1
|
|
3
3
|
*/
|
|
4
4
|
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.React = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
|
|
5
5
|
/**
|
|
@@ -76,7 +76,7 @@ module.exports = KeyEscapeUtils;
|
|
|
76
76
|
|
|
77
77
|
var _prodInvariant = _dereq_(25);
|
|
78
78
|
|
|
79
|
-
var invariant = _dereq_(
|
|
79
|
+
var invariant = _dereq_(30);
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* Static poolers. Several custom versions for each potential number of
|
|
@@ -172,7 +172,7 @@ var PooledClass = {
|
|
|
172
172
|
};
|
|
173
173
|
|
|
174
174
|
module.exports = PooledClass;
|
|
175
|
-
},{"25":25,"
|
|
175
|
+
},{"25":25,"30":30}],3:[function(_dereq_,module,exports){
|
|
176
176
|
/**
|
|
177
177
|
* Copyright 2013-present, Facebook, Inc.
|
|
178
178
|
* All rights reserved.
|
|
@@ -185,27 +185,26 @@ module.exports = PooledClass;
|
|
|
185
185
|
|
|
186
186
|
'use strict';
|
|
187
187
|
|
|
188
|
-
var _assign = _dereq_(
|
|
188
|
+
var _assign = _dereq_(32);
|
|
189
189
|
|
|
190
|
-
var
|
|
191
|
-
var
|
|
192
|
-
var
|
|
193
|
-
var
|
|
194
|
-
var
|
|
195
|
-
var
|
|
196
|
-
var ReactPropTypes = _dereq_(15);
|
|
197
|
-
var ReactVersion = _dereq_(19);
|
|
190
|
+
var ReactBaseClasses = _dereq_(4);
|
|
191
|
+
var ReactChildren = _dereq_(5);
|
|
192
|
+
var ReactDOMFactories = _dereq_(8);
|
|
193
|
+
var ReactElement = _dereq_(9);
|
|
194
|
+
var ReactPropTypes = _dereq_(14);
|
|
195
|
+
var ReactVersion = _dereq_(17);
|
|
198
196
|
|
|
197
|
+
var createReactClass = _dereq_(20);
|
|
199
198
|
var onlyChild = _dereq_(24);
|
|
200
|
-
var warning = _dereq_(30);
|
|
201
199
|
|
|
202
200
|
var createElement = ReactElement.createElement;
|
|
203
201
|
var createFactory = ReactElement.createFactory;
|
|
204
202
|
var cloneElement = ReactElement.cloneElement;
|
|
205
203
|
|
|
206
204
|
if ("development" !== 'production') {
|
|
207
|
-
var
|
|
208
|
-
var
|
|
205
|
+
var lowPriorityWarning = _dereq_(23);
|
|
206
|
+
var canDefineProperty = _dereq_(18);
|
|
207
|
+
var ReactElementValidator = _dereq_(11);
|
|
209
208
|
var didWarnPropTypesDeprecated = false;
|
|
210
209
|
createElement = ReactElementValidator.createElement;
|
|
211
210
|
createFactory = ReactElementValidator.createFactory;
|
|
@@ -213,18 +212,27 @@ if ("development" !== 'production') {
|
|
|
213
212
|
}
|
|
214
213
|
|
|
215
214
|
var __spread = _assign;
|
|
215
|
+
var createMixin = function (mixin) {
|
|
216
|
+
return mixin;
|
|
217
|
+
};
|
|
216
218
|
|
|
217
219
|
if ("development" !== 'production') {
|
|
218
|
-
var
|
|
220
|
+
var warnedForSpread = false;
|
|
221
|
+
var warnedForCreateMixin = false;
|
|
219
222
|
__spread = function () {
|
|
220
|
-
|
|
221
|
-
|
|
223
|
+
lowPriorityWarning(warnedForSpread, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.');
|
|
224
|
+
warnedForSpread = true;
|
|
222
225
|
return _assign.apply(null, arguments);
|
|
223
226
|
};
|
|
227
|
+
|
|
228
|
+
createMixin = function (mixin) {
|
|
229
|
+
lowPriorityWarning(warnedForCreateMixin, 'React.createMixin is deprecated and should not be used. ' + 'In React v16.0, it will be removed. ' + 'You can use this mixin directly instead. ' + 'See https://fb.me/createmixin-was-never-implemented for more info.');
|
|
230
|
+
warnedForCreateMixin = true;
|
|
231
|
+
return mixin;
|
|
232
|
+
};
|
|
224
233
|
}
|
|
225
234
|
|
|
226
235
|
var React = {
|
|
227
|
-
|
|
228
236
|
// Modern
|
|
229
237
|
|
|
230
238
|
Children: {
|
|
@@ -235,8 +243,8 @@ var React = {
|
|
|
235
243
|
only: onlyChild
|
|
236
244
|
},
|
|
237
245
|
|
|
238
|
-
Component:
|
|
239
|
-
PureComponent:
|
|
246
|
+
Component: ReactBaseClasses.Component,
|
|
247
|
+
PureComponent: ReactBaseClasses.PureComponent,
|
|
240
248
|
|
|
241
249
|
createElement: createElement,
|
|
242
250
|
cloneElement: cloneElement,
|
|
@@ -245,12 +253,9 @@ var React = {
|
|
|
245
253
|
// Classic
|
|
246
254
|
|
|
247
255
|
PropTypes: ReactPropTypes,
|
|
248
|
-
createClass:
|
|
256
|
+
createClass: createReactClass,
|
|
249
257
|
createFactory: createFactory,
|
|
250
|
-
createMixin:
|
|
251
|
-
// Currently a noop. Will be used to validate and trace mixins.
|
|
252
|
-
return mixin;
|
|
253
|
-
},
|
|
258
|
+
createMixin: createMixin,
|
|
254
259
|
|
|
255
260
|
// This looks DOM specific but these are actually isomorphic helpers
|
|
256
261
|
// since they are just generating DOM strings.
|
|
@@ -262,21 +267,187 @@ var React = {
|
|
|
262
267
|
__spread: __spread
|
|
263
268
|
};
|
|
264
269
|
|
|
265
|
-
// TODO: Fix tests so that this deprecation warning doesn't cause failures.
|
|
266
270
|
if ("development" !== 'production') {
|
|
271
|
+
var warnedForCreateClass = false;
|
|
267
272
|
if (canDefineProperty) {
|
|
268
273
|
Object.defineProperty(React, 'PropTypes', {
|
|
269
274
|
get: function () {
|
|
270
|
-
|
|
275
|
+
lowPriorityWarning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated,' + ' and will be removed in React v16.0.' + ' Use the latest available v15.* prop-types package from npm instead.' + ' For info on usage, compatibility, migration and more, see ' + 'https://fb.me/prop-types-docs');
|
|
271
276
|
didWarnPropTypesDeprecated = true;
|
|
272
277
|
return ReactPropTypes;
|
|
273
278
|
}
|
|
274
279
|
});
|
|
280
|
+
|
|
281
|
+
Object.defineProperty(React, 'createClass', {
|
|
282
|
+
get: function () {
|
|
283
|
+
lowPriorityWarning(warnedForCreateClass, 'Accessing createClass via the main React package is deprecated,' + ' and will be removed in React v16.0.' + " Use a plain JavaScript class instead. If you're not yet " + 'ready to migrate, create-react-class v15.* is available ' + 'on npm as a temporary, drop-in replacement. ' + 'For more info see https://fb.me/react-create-class');
|
|
284
|
+
warnedForCreateClass = true;
|
|
285
|
+
return createReactClass;
|
|
286
|
+
}
|
|
287
|
+
});
|
|
275
288
|
}
|
|
289
|
+
|
|
290
|
+
// React.DOM factories are deprecated. Wrap these methods so that
|
|
291
|
+
// invocations of the React.DOM namespace and alert users to switch
|
|
292
|
+
// to the `react-dom-factories` package.
|
|
293
|
+
React.DOM = {};
|
|
294
|
+
var warnedForFactories = false;
|
|
295
|
+
Object.keys(ReactDOMFactories).forEach(function (factory) {
|
|
296
|
+
React.DOM[factory] = function () {
|
|
297
|
+
if (!warnedForFactories) {
|
|
298
|
+
lowPriorityWarning(false, 'Accessing factories like React.DOM.%s has been deprecated ' + 'and will be removed in v16.0+. Use the ' + 'react-dom-factories package instead. ' + ' Version 1.0 provides a drop-in replacement.' + ' For more info, see https://fb.me/react-dom-factories', factory);
|
|
299
|
+
warnedForFactories = true;
|
|
300
|
+
}
|
|
301
|
+
return ReactDOMFactories[factory].apply(ReactDOMFactories, arguments);
|
|
302
|
+
};
|
|
303
|
+
});
|
|
276
304
|
}
|
|
277
305
|
|
|
278
306
|
module.exports = React;
|
|
279
|
-
},{"
|
|
307
|
+
},{"11":11,"14":14,"17":17,"18":18,"20":20,"23":23,"24":24,"32":32,"4":4,"5":5,"8":8,"9":9}],4:[function(_dereq_,module,exports){
|
|
308
|
+
/**
|
|
309
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
310
|
+
* All rights reserved.
|
|
311
|
+
*
|
|
312
|
+
* This source code is licensed under the BSD-style license found in the
|
|
313
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
314
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
315
|
+
*
|
|
316
|
+
*/
|
|
317
|
+
|
|
318
|
+
'use strict';
|
|
319
|
+
|
|
320
|
+
var _prodInvariant = _dereq_(25),
|
|
321
|
+
_assign = _dereq_(32);
|
|
322
|
+
|
|
323
|
+
var ReactNoopUpdateQueue = _dereq_(12);
|
|
324
|
+
|
|
325
|
+
var canDefineProperty = _dereq_(18);
|
|
326
|
+
var emptyObject = _dereq_(29);
|
|
327
|
+
var invariant = _dereq_(30);
|
|
328
|
+
var lowPriorityWarning = _dereq_(23);
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Base class helpers for the updating state of a component.
|
|
332
|
+
*/
|
|
333
|
+
function ReactComponent(props, context, updater) {
|
|
334
|
+
this.props = props;
|
|
335
|
+
this.context = context;
|
|
336
|
+
this.refs = emptyObject;
|
|
337
|
+
// We initialize the default updater but the real one gets injected by the
|
|
338
|
+
// renderer.
|
|
339
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
ReactComponent.prototype.isReactComponent = {};
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Sets a subset of the state. Always use this to mutate
|
|
346
|
+
* state. You should treat `this.state` as immutable.
|
|
347
|
+
*
|
|
348
|
+
* There is no guarantee that `this.state` will be immediately updated, so
|
|
349
|
+
* accessing `this.state` after calling this method may return the old value.
|
|
350
|
+
*
|
|
351
|
+
* There is no guarantee that calls to `setState` will run synchronously,
|
|
352
|
+
* as they may eventually be batched together. You can provide an optional
|
|
353
|
+
* callback that will be executed when the call to setState is actually
|
|
354
|
+
* completed.
|
|
355
|
+
*
|
|
356
|
+
* When a function is provided to setState, it will be called at some point in
|
|
357
|
+
* the future (not synchronously). It will be called with the up to date
|
|
358
|
+
* component arguments (state, props, context). These values can be different
|
|
359
|
+
* from this.* because your function may be called after receiveProps but before
|
|
360
|
+
* shouldComponentUpdate, and this new state, props, and context will not yet be
|
|
361
|
+
* assigned to this.
|
|
362
|
+
*
|
|
363
|
+
* @param {object|function} partialState Next partial state or function to
|
|
364
|
+
* produce next partial state to be merged with current state.
|
|
365
|
+
* @param {?function} callback Called after state is updated.
|
|
366
|
+
* @final
|
|
367
|
+
* @protected
|
|
368
|
+
*/
|
|
369
|
+
ReactComponent.prototype.setState = function (partialState, callback) {
|
|
370
|
+
!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? "development" !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0;
|
|
371
|
+
this.updater.enqueueSetState(this, partialState);
|
|
372
|
+
if (callback) {
|
|
373
|
+
this.updater.enqueueCallback(this, callback, 'setState');
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Forces an update. This should only be invoked when it is known with
|
|
379
|
+
* certainty that we are **not** in a DOM transaction.
|
|
380
|
+
*
|
|
381
|
+
* You may want to call this when you know that some deeper aspect of the
|
|
382
|
+
* component's state has changed but `setState` was not called.
|
|
383
|
+
*
|
|
384
|
+
* This will not invoke `shouldComponentUpdate`, but it will invoke
|
|
385
|
+
* `componentWillUpdate` and `componentDidUpdate`.
|
|
386
|
+
*
|
|
387
|
+
* @param {?function} callback Called after update is complete.
|
|
388
|
+
* @final
|
|
389
|
+
* @protected
|
|
390
|
+
*/
|
|
391
|
+
ReactComponent.prototype.forceUpdate = function (callback) {
|
|
392
|
+
this.updater.enqueueForceUpdate(this);
|
|
393
|
+
if (callback) {
|
|
394
|
+
this.updater.enqueueCallback(this, callback, 'forceUpdate');
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Deprecated APIs. These APIs used to exist on classic React classes but since
|
|
400
|
+
* we would like to deprecate them, we're not going to move them over to this
|
|
401
|
+
* modern base class. Instead, we define a getter that warns if it's accessed.
|
|
402
|
+
*/
|
|
403
|
+
if ("development" !== 'production') {
|
|
404
|
+
var deprecatedAPIs = {
|
|
405
|
+
isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
|
|
406
|
+
replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
|
|
407
|
+
};
|
|
408
|
+
var defineDeprecationWarning = function (methodName, info) {
|
|
409
|
+
if (canDefineProperty) {
|
|
410
|
+
Object.defineProperty(ReactComponent.prototype, methodName, {
|
|
411
|
+
get: function () {
|
|
412
|
+
lowPriorityWarning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
|
|
413
|
+
return undefined;
|
|
414
|
+
}
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
for (var fnName in deprecatedAPIs) {
|
|
419
|
+
if (deprecatedAPIs.hasOwnProperty(fnName)) {
|
|
420
|
+
defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Base class helpers for the updating state of a component.
|
|
427
|
+
*/
|
|
428
|
+
function ReactPureComponent(props, context, updater) {
|
|
429
|
+
// Duplicated from ReactComponent.
|
|
430
|
+
this.props = props;
|
|
431
|
+
this.context = context;
|
|
432
|
+
this.refs = emptyObject;
|
|
433
|
+
// We initialize the default updater but the real one gets injected by the
|
|
434
|
+
// renderer.
|
|
435
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
function ComponentDummy() {}
|
|
439
|
+
ComponentDummy.prototype = ReactComponent.prototype;
|
|
440
|
+
ReactPureComponent.prototype = new ComponentDummy();
|
|
441
|
+
ReactPureComponent.prototype.constructor = ReactPureComponent;
|
|
442
|
+
// Avoid an extra prototype jump for these methods.
|
|
443
|
+
_assign(ReactPureComponent.prototype, ReactComponent.prototype);
|
|
444
|
+
ReactPureComponent.prototype.isPureReactComponent = true;
|
|
445
|
+
|
|
446
|
+
module.exports = {
|
|
447
|
+
Component: ReactComponent,
|
|
448
|
+
PureComponent: ReactPureComponent
|
|
449
|
+
};
|
|
450
|
+
},{"12":12,"18":18,"23":23,"25":25,"29":29,"30":30,"32":32}],5:[function(_dereq_,module,exports){
|
|
280
451
|
/**
|
|
281
452
|
* Copyright 2013-present, Facebook, Inc.
|
|
282
453
|
* All rights reserved.
|
|
@@ -290,9 +461,9 @@ module.exports = React;
|
|
|
290
461
|
'use strict';
|
|
291
462
|
|
|
292
463
|
var PooledClass = _dereq_(2);
|
|
293
|
-
var ReactElement = _dereq_(
|
|
464
|
+
var ReactElement = _dereq_(9);
|
|
294
465
|
|
|
295
|
-
var emptyFunction = _dereq_(
|
|
466
|
+
var emptyFunction = _dereq_(28);
|
|
296
467
|
var traverseAllChildren = _dereq_(26);
|
|
297
468
|
|
|
298
469
|
var twoArgumentPooler = PooledClass.twoArgumentPooler;
|
|
@@ -467,945 +638,104 @@ var ReactChildren = {
|
|
|
467
638
|
};
|
|
468
639
|
|
|
469
640
|
module.exports = ReactChildren;
|
|
470
|
-
},{"
|
|
641
|
+
},{"2":2,"26":26,"28":28,"9":9}],6:[function(_dereq_,module,exports){
|
|
471
642
|
/**
|
|
472
|
-
* Copyright
|
|
643
|
+
* Copyright 2016-present, Facebook, Inc.
|
|
473
644
|
* All rights reserved.
|
|
474
645
|
*
|
|
475
646
|
* This source code is licensed under the BSD-style license found in the
|
|
476
647
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
477
648
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
478
649
|
*
|
|
650
|
+
*
|
|
479
651
|
*/
|
|
480
652
|
|
|
481
653
|
'use strict';
|
|
482
654
|
|
|
483
|
-
var _prodInvariant = _dereq_(25)
|
|
484
|
-
_assign = _dereq_(31);
|
|
485
|
-
|
|
486
|
-
var ReactComponent = _dereq_(6);
|
|
487
|
-
var ReactElement = _dereq_(10);
|
|
488
|
-
var ReactPropTypeLocationNames = _dereq_(14);
|
|
489
|
-
var ReactNoopUpdateQueue = _dereq_(13);
|
|
655
|
+
var _prodInvariant = _dereq_(25);
|
|
490
656
|
|
|
491
|
-
var
|
|
492
|
-
var invariant = _dereq_(29);
|
|
493
|
-
var warning = _dereq_(30);
|
|
657
|
+
var ReactCurrentOwner = _dereq_(7);
|
|
494
658
|
|
|
495
|
-
var
|
|
659
|
+
var invariant = _dereq_(30);
|
|
660
|
+
var warning = _dereq_(31);
|
|
496
661
|
|
|
497
|
-
|
|
498
|
-
//
|
|
499
|
-
|
|
500
|
-
|
|
662
|
+
function isNative(fn) {
|
|
663
|
+
// Based on isNative() from Lodash
|
|
664
|
+
var funcToString = Function.prototype.toString;
|
|
665
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
666
|
+
var reIsNative = RegExp('^' + funcToString
|
|
667
|
+
// Take an example native function source for comparison
|
|
668
|
+
.call(hasOwnProperty
|
|
669
|
+
// Strip regex characters so we can use it for regex
|
|
670
|
+
).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&'
|
|
671
|
+
// Remove hasOwnProperty from the template to make it generic
|
|
672
|
+
).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
|
|
673
|
+
try {
|
|
674
|
+
var source = funcToString.call(fn);
|
|
675
|
+
return reIsNative.test(source);
|
|
676
|
+
} catch (err) {
|
|
677
|
+
return false;
|
|
678
|
+
}
|
|
501
679
|
}
|
|
502
680
|
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
* To create a new type of `ReactClass`, pass a specification of
|
|
515
|
-
* your new class to `React.createClass`. The only requirement of your class
|
|
516
|
-
* specification is that you implement a `render` method.
|
|
517
|
-
*
|
|
518
|
-
* var MyComponent = React.createClass({
|
|
519
|
-
* render: function() {
|
|
520
|
-
* return <div>Hello World</div>;
|
|
521
|
-
* }
|
|
522
|
-
* });
|
|
523
|
-
*
|
|
524
|
-
* The class specification supports a specific protocol of methods that have
|
|
525
|
-
* special meaning (e.g. `render`). See `ReactClassInterface` for
|
|
526
|
-
* more the comprehensive protocol. Any other properties and methods in the
|
|
527
|
-
* class specification will be available on the prototype.
|
|
528
|
-
*
|
|
529
|
-
* @interface ReactClassInterface
|
|
530
|
-
* @internal
|
|
531
|
-
*/
|
|
532
|
-
var ReactClassInterface = {
|
|
533
|
-
|
|
534
|
-
/**
|
|
535
|
-
* An array of Mixin objects to include when defining your component.
|
|
536
|
-
*
|
|
537
|
-
* @type {array}
|
|
538
|
-
* @optional
|
|
539
|
-
*/
|
|
540
|
-
mixins: 'DEFINE_MANY',
|
|
681
|
+
var canUseCollections =
|
|
682
|
+
// Array.from
|
|
683
|
+
typeof Array.from === 'function' &&
|
|
684
|
+
// Map
|
|
685
|
+
typeof Map === 'function' && isNative(Map) &&
|
|
686
|
+
// Map.prototype.keys
|
|
687
|
+
Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
|
|
688
|
+
// Set
|
|
689
|
+
typeof Set === 'function' && isNative(Set) &&
|
|
690
|
+
// Set.prototype.keys
|
|
691
|
+
Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
|
|
541
692
|
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
statics: 'DEFINE_MANY',
|
|
693
|
+
var setItem;
|
|
694
|
+
var getItem;
|
|
695
|
+
var removeItem;
|
|
696
|
+
var getItemIDs;
|
|
697
|
+
var addRoot;
|
|
698
|
+
var removeRoot;
|
|
699
|
+
var getRootIDs;
|
|
550
700
|
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
* @type {object}
|
|
555
|
-
* @optional
|
|
556
|
-
*/
|
|
557
|
-
propTypes: 'DEFINE_MANY',
|
|
701
|
+
if (canUseCollections) {
|
|
702
|
+
var itemMap = new Map();
|
|
703
|
+
var rootIDSet = new Set();
|
|
558
704
|
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
705
|
+
setItem = function (id, item) {
|
|
706
|
+
itemMap.set(id, item);
|
|
707
|
+
};
|
|
708
|
+
getItem = function (id) {
|
|
709
|
+
return itemMap.get(id);
|
|
710
|
+
};
|
|
711
|
+
removeItem = function (id) {
|
|
712
|
+
itemMap['delete'](id);
|
|
713
|
+
};
|
|
714
|
+
getItemIDs = function () {
|
|
715
|
+
return Array.from(itemMap.keys());
|
|
716
|
+
};
|
|
566
717
|
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
718
|
+
addRoot = function (id) {
|
|
719
|
+
rootIDSet.add(id);
|
|
720
|
+
};
|
|
721
|
+
removeRoot = function (id) {
|
|
722
|
+
rootIDSet['delete'](id);
|
|
723
|
+
};
|
|
724
|
+
getRootIDs = function () {
|
|
725
|
+
return Array.from(rootIDSet.keys());
|
|
726
|
+
};
|
|
727
|
+
} else {
|
|
728
|
+
var itemByKey = {};
|
|
729
|
+
var rootByKey = {};
|
|
574
730
|
|
|
575
|
-
//
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
*
|
|
584
|
-
* @return {object}
|
|
585
|
-
* @optional
|
|
586
|
-
*/
|
|
587
|
-
getDefaultProps: 'DEFINE_MANY_MERGED',
|
|
588
|
-
|
|
589
|
-
/**
|
|
590
|
-
* Invoked once before the component is mounted. The return value will be used
|
|
591
|
-
* as the initial value of `this.state`.
|
|
592
|
-
*
|
|
593
|
-
* getInitialState: function() {
|
|
594
|
-
* return {
|
|
595
|
-
* isOn: false,
|
|
596
|
-
* fooBaz: new BazFoo()
|
|
597
|
-
* }
|
|
598
|
-
* }
|
|
599
|
-
*
|
|
600
|
-
* @return {object}
|
|
601
|
-
* @optional
|
|
602
|
-
*/
|
|
603
|
-
getInitialState: 'DEFINE_MANY_MERGED',
|
|
604
|
-
|
|
605
|
-
/**
|
|
606
|
-
* @return {object}
|
|
607
|
-
* @optional
|
|
608
|
-
*/
|
|
609
|
-
getChildContext: 'DEFINE_MANY_MERGED',
|
|
610
|
-
|
|
611
|
-
/**
|
|
612
|
-
* Uses props from `this.props` and state from `this.state` to render the
|
|
613
|
-
* structure of the component.
|
|
614
|
-
*
|
|
615
|
-
* No guarantees are made about when or how often this method is invoked, so
|
|
616
|
-
* it must not have side effects.
|
|
617
|
-
*
|
|
618
|
-
* render: function() {
|
|
619
|
-
* var name = this.props.name;
|
|
620
|
-
* return <div>Hello, {name}!</div>;
|
|
621
|
-
* }
|
|
622
|
-
*
|
|
623
|
-
* @return {ReactComponent}
|
|
624
|
-
* @required
|
|
625
|
-
*/
|
|
626
|
-
render: 'DEFINE_ONCE',
|
|
627
|
-
|
|
628
|
-
// ==== Delegate methods ====
|
|
629
|
-
|
|
630
|
-
/**
|
|
631
|
-
* Invoked when the component is initially created and about to be mounted.
|
|
632
|
-
* This may have side effects, but any external subscriptions or data created
|
|
633
|
-
* by this method must be cleaned up in `componentWillUnmount`.
|
|
634
|
-
*
|
|
635
|
-
* @optional
|
|
636
|
-
*/
|
|
637
|
-
componentWillMount: 'DEFINE_MANY',
|
|
638
|
-
|
|
639
|
-
/**
|
|
640
|
-
* Invoked when the component has been mounted and has a DOM representation.
|
|
641
|
-
* However, there is no guarantee that the DOM node is in the document.
|
|
642
|
-
*
|
|
643
|
-
* Use this as an opportunity to operate on the DOM when the component has
|
|
644
|
-
* been mounted (initialized and rendered) for the first time.
|
|
645
|
-
*
|
|
646
|
-
* @param {DOMElement} rootNode DOM element representing the component.
|
|
647
|
-
* @optional
|
|
648
|
-
*/
|
|
649
|
-
componentDidMount: 'DEFINE_MANY',
|
|
650
|
-
|
|
651
|
-
/**
|
|
652
|
-
* Invoked before the component receives new props.
|
|
653
|
-
*
|
|
654
|
-
* Use this as an opportunity to react to a prop transition by updating the
|
|
655
|
-
* state using `this.setState`. Current props are accessed via `this.props`.
|
|
656
|
-
*
|
|
657
|
-
* componentWillReceiveProps: function(nextProps, nextContext) {
|
|
658
|
-
* this.setState({
|
|
659
|
-
* likesIncreasing: nextProps.likeCount > this.props.likeCount
|
|
660
|
-
* });
|
|
661
|
-
* }
|
|
662
|
-
*
|
|
663
|
-
* NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
|
|
664
|
-
* transition may cause a state change, but the opposite is not true. If you
|
|
665
|
-
* need it, you are probably looking for `componentWillUpdate`.
|
|
666
|
-
*
|
|
667
|
-
* @param {object} nextProps
|
|
668
|
-
* @optional
|
|
669
|
-
*/
|
|
670
|
-
componentWillReceiveProps: 'DEFINE_MANY',
|
|
671
|
-
|
|
672
|
-
/**
|
|
673
|
-
* Invoked while deciding if the component should be updated as a result of
|
|
674
|
-
* receiving new props, state and/or context.
|
|
675
|
-
*
|
|
676
|
-
* Use this as an opportunity to `return false` when you're certain that the
|
|
677
|
-
* transition to the new props/state/context will not require a component
|
|
678
|
-
* update.
|
|
679
|
-
*
|
|
680
|
-
* shouldComponentUpdate: function(nextProps, nextState, nextContext) {
|
|
681
|
-
* return !equal(nextProps, this.props) ||
|
|
682
|
-
* !equal(nextState, this.state) ||
|
|
683
|
-
* !equal(nextContext, this.context);
|
|
684
|
-
* }
|
|
685
|
-
*
|
|
686
|
-
* @param {object} nextProps
|
|
687
|
-
* @param {?object} nextState
|
|
688
|
-
* @param {?object} nextContext
|
|
689
|
-
* @return {boolean} True if the component should update.
|
|
690
|
-
* @optional
|
|
691
|
-
*/
|
|
692
|
-
shouldComponentUpdate: 'DEFINE_ONCE',
|
|
693
|
-
|
|
694
|
-
/**
|
|
695
|
-
* Invoked when the component is about to update due to a transition from
|
|
696
|
-
* `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
|
|
697
|
-
* and `nextContext`.
|
|
698
|
-
*
|
|
699
|
-
* Use this as an opportunity to perform preparation before an update occurs.
|
|
700
|
-
*
|
|
701
|
-
* NOTE: You **cannot** use `this.setState()` in this method.
|
|
702
|
-
*
|
|
703
|
-
* @param {object} nextProps
|
|
704
|
-
* @param {?object} nextState
|
|
705
|
-
* @param {?object} nextContext
|
|
706
|
-
* @param {ReactReconcileTransaction} transaction
|
|
707
|
-
* @optional
|
|
708
|
-
*/
|
|
709
|
-
componentWillUpdate: 'DEFINE_MANY',
|
|
710
|
-
|
|
711
|
-
/**
|
|
712
|
-
* Invoked when the component's DOM representation has been updated.
|
|
713
|
-
*
|
|
714
|
-
* Use this as an opportunity to operate on the DOM when the component has
|
|
715
|
-
* been updated.
|
|
716
|
-
*
|
|
717
|
-
* @param {object} prevProps
|
|
718
|
-
* @param {?object} prevState
|
|
719
|
-
* @param {?object} prevContext
|
|
720
|
-
* @param {DOMElement} rootNode DOM element representing the component.
|
|
721
|
-
* @optional
|
|
722
|
-
*/
|
|
723
|
-
componentDidUpdate: 'DEFINE_MANY',
|
|
724
|
-
|
|
725
|
-
/**
|
|
726
|
-
* Invoked when the component is about to be removed from its parent and have
|
|
727
|
-
* its DOM representation destroyed.
|
|
728
|
-
*
|
|
729
|
-
* Use this as an opportunity to deallocate any external resources.
|
|
730
|
-
*
|
|
731
|
-
* NOTE: There is no `componentDidUnmount` since your component will have been
|
|
732
|
-
* destroyed by that point.
|
|
733
|
-
*
|
|
734
|
-
* @optional
|
|
735
|
-
*/
|
|
736
|
-
componentWillUnmount: 'DEFINE_MANY',
|
|
737
|
-
|
|
738
|
-
// ==== Advanced methods ====
|
|
739
|
-
|
|
740
|
-
/**
|
|
741
|
-
* Updates the component's currently mounted DOM representation.
|
|
742
|
-
*
|
|
743
|
-
* By default, this implements React's rendering and reconciliation algorithm.
|
|
744
|
-
* Sophisticated clients may wish to override this.
|
|
745
|
-
*
|
|
746
|
-
* @param {ReactReconcileTransaction} transaction
|
|
747
|
-
* @internal
|
|
748
|
-
* @overridable
|
|
749
|
-
*/
|
|
750
|
-
updateComponent: 'OVERRIDE_BASE'
|
|
751
|
-
|
|
752
|
-
};
|
|
753
|
-
|
|
754
|
-
/**
|
|
755
|
-
* Mapping from class specification keys to special processing functions.
|
|
756
|
-
*
|
|
757
|
-
* Although these are declared like instance properties in the specification
|
|
758
|
-
* when defining classes using `React.createClass`, they are actually static
|
|
759
|
-
* and are accessible on the constructor instead of the prototype. Despite
|
|
760
|
-
* being static, they must be defined outside of the "statics" key under
|
|
761
|
-
* which all other static methods are defined.
|
|
762
|
-
*/
|
|
763
|
-
var RESERVED_SPEC_KEYS = {
|
|
764
|
-
displayName: function (Constructor, displayName) {
|
|
765
|
-
Constructor.displayName = displayName;
|
|
766
|
-
},
|
|
767
|
-
mixins: function (Constructor, mixins) {
|
|
768
|
-
if (mixins) {
|
|
769
|
-
for (var i = 0; i < mixins.length; i++) {
|
|
770
|
-
mixSpecIntoComponent(Constructor, mixins[i]);
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
},
|
|
774
|
-
childContextTypes: function (Constructor, childContextTypes) {
|
|
775
|
-
if ("development" !== 'production') {
|
|
776
|
-
validateTypeDef(Constructor, childContextTypes, 'childContext');
|
|
777
|
-
}
|
|
778
|
-
Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes);
|
|
779
|
-
},
|
|
780
|
-
contextTypes: function (Constructor, contextTypes) {
|
|
781
|
-
if ("development" !== 'production') {
|
|
782
|
-
validateTypeDef(Constructor, contextTypes, 'context');
|
|
783
|
-
}
|
|
784
|
-
Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes);
|
|
785
|
-
},
|
|
786
|
-
/**
|
|
787
|
-
* Special case getDefaultProps which should move into statics but requires
|
|
788
|
-
* automatic merging.
|
|
789
|
-
*/
|
|
790
|
-
getDefaultProps: function (Constructor, getDefaultProps) {
|
|
791
|
-
if (Constructor.getDefaultProps) {
|
|
792
|
-
Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps);
|
|
793
|
-
} else {
|
|
794
|
-
Constructor.getDefaultProps = getDefaultProps;
|
|
795
|
-
}
|
|
796
|
-
},
|
|
797
|
-
propTypes: function (Constructor, propTypes) {
|
|
798
|
-
if ("development" !== 'production') {
|
|
799
|
-
validateTypeDef(Constructor, propTypes, 'prop');
|
|
800
|
-
}
|
|
801
|
-
Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
|
|
802
|
-
},
|
|
803
|
-
statics: function (Constructor, statics) {
|
|
804
|
-
mixStaticSpecIntoComponent(Constructor, statics);
|
|
805
|
-
},
|
|
806
|
-
autobind: function () {} };
|
|
807
|
-
|
|
808
|
-
function validateTypeDef(Constructor, typeDef, location) {
|
|
809
|
-
for (var propName in typeDef) {
|
|
810
|
-
if (typeDef.hasOwnProperty(propName)) {
|
|
811
|
-
// use a warning instead of an invariant so components
|
|
812
|
-
// don't show up in prod but only in __DEV__
|
|
813
|
-
"development" !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : void 0;
|
|
814
|
-
}
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
function validateMethodOverride(isAlreadyDefined, name) {
|
|
819
|
-
var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;
|
|
820
|
-
|
|
821
|
-
// Disallow overriding of base class methods unless explicitly allowed.
|
|
822
|
-
if (ReactClassMixin.hasOwnProperty(name)) {
|
|
823
|
-
!(specPolicy === 'OVERRIDE_BASE') ? "development" !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.', name) : _prodInvariant('73', name) : void 0;
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
// Disallow defining methods more than once unless explicitly allowed.
|
|
827
|
-
if (isAlreadyDefined) {
|
|
828
|
-
!(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED') ? "development" !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('74', name) : void 0;
|
|
829
|
-
}
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
/**
|
|
833
|
-
* Mixin helper which handles policy validation and reserved
|
|
834
|
-
* specification keys when building React classes.
|
|
835
|
-
*/
|
|
836
|
-
function mixSpecIntoComponent(Constructor, spec) {
|
|
837
|
-
if (!spec) {
|
|
838
|
-
if ("development" !== 'production') {
|
|
839
|
-
var typeofSpec = typeof spec;
|
|
840
|
-
var isMixinValid = typeofSpec === 'object' && spec !== null;
|
|
841
|
-
|
|
842
|
-
"development" !== 'production' ? warning(isMixinValid, '%s: You\'re attempting to include a mixin that is either null ' + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec) : void 0;
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
return;
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
!(typeof spec !== 'function') ? "development" !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to use a component class or function as a mixin. Instead, just use a regular object.') : _prodInvariant('75') : void 0;
|
|
849
|
-
!!ReactElement.isValidElement(spec) ? "development" !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to use a component as a mixin. Instead, just use a regular object.') : _prodInvariant('76') : void 0;
|
|
850
|
-
|
|
851
|
-
var proto = Constructor.prototype;
|
|
852
|
-
var autoBindPairs = proto.__reactAutoBindPairs;
|
|
853
|
-
|
|
854
|
-
// By handling mixins before any other properties, we ensure the same
|
|
855
|
-
// chaining order is applied to methods with DEFINE_MANY policy, whether
|
|
856
|
-
// mixins are listed before or after these methods in the spec.
|
|
857
|
-
if (spec.hasOwnProperty(MIXINS_KEY)) {
|
|
858
|
-
RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
for (var name in spec) {
|
|
862
|
-
if (!spec.hasOwnProperty(name)) {
|
|
863
|
-
continue;
|
|
864
|
-
}
|
|
865
|
-
|
|
866
|
-
if (name === MIXINS_KEY) {
|
|
867
|
-
// We have already handled mixins in a special case above.
|
|
868
|
-
continue;
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
var property = spec[name];
|
|
872
|
-
var isAlreadyDefined = proto.hasOwnProperty(name);
|
|
873
|
-
validateMethodOverride(isAlreadyDefined, name);
|
|
874
|
-
|
|
875
|
-
if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
|
|
876
|
-
RESERVED_SPEC_KEYS[name](Constructor, property);
|
|
877
|
-
} else {
|
|
878
|
-
// Setup methods on prototype:
|
|
879
|
-
// The following member methods should not be automatically bound:
|
|
880
|
-
// 1. Expected ReactClass methods (in the "interface").
|
|
881
|
-
// 2. Overridden methods (that were mixed in).
|
|
882
|
-
var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
|
|
883
|
-
var isFunction = typeof property === 'function';
|
|
884
|
-
var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false;
|
|
885
|
-
|
|
886
|
-
if (shouldAutoBind) {
|
|
887
|
-
autoBindPairs.push(name, property);
|
|
888
|
-
proto[name] = property;
|
|
889
|
-
} else {
|
|
890
|
-
if (isAlreadyDefined) {
|
|
891
|
-
var specPolicy = ReactClassInterface[name];
|
|
892
|
-
|
|
893
|
-
// These cases should already be caught by validateMethodOverride.
|
|
894
|
-
!(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY')) ? "development" !== 'production' ? invariant(false, 'ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.', specPolicy, name) : _prodInvariant('77', specPolicy, name) : void 0;
|
|
895
|
-
|
|
896
|
-
// For methods which are defined more than once, call the existing
|
|
897
|
-
// methods before calling the new property, merging if appropriate.
|
|
898
|
-
if (specPolicy === 'DEFINE_MANY_MERGED') {
|
|
899
|
-
proto[name] = createMergedResultFunction(proto[name], property);
|
|
900
|
-
} else if (specPolicy === 'DEFINE_MANY') {
|
|
901
|
-
proto[name] = createChainedFunction(proto[name], property);
|
|
902
|
-
}
|
|
903
|
-
} else {
|
|
904
|
-
proto[name] = property;
|
|
905
|
-
if ("development" !== 'production') {
|
|
906
|
-
// Add verbose displayName to the function, which helps when looking
|
|
907
|
-
// at profiling tools.
|
|
908
|
-
if (typeof property === 'function' && spec.displayName) {
|
|
909
|
-
proto[name].displayName = spec.displayName + '_' + name;
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
function mixStaticSpecIntoComponent(Constructor, statics) {
|
|
919
|
-
if (!statics) {
|
|
920
|
-
return;
|
|
921
|
-
}
|
|
922
|
-
for (var name in statics) {
|
|
923
|
-
var property = statics[name];
|
|
924
|
-
if (!statics.hasOwnProperty(name)) {
|
|
925
|
-
continue;
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
var isReserved = name in RESERVED_SPEC_KEYS;
|
|
929
|
-
!!isReserved ? "development" !== 'production' ? invariant(false, 'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.', name) : _prodInvariant('78', name) : void 0;
|
|
930
|
-
|
|
931
|
-
var isInherited = name in Constructor;
|
|
932
|
-
!!isInherited ? "development" !== 'production' ? invariant(false, 'ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('79', name) : void 0;
|
|
933
|
-
Constructor[name] = property;
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
/**
|
|
938
|
-
* Merge two objects, but throw if both contain the same key.
|
|
939
|
-
*
|
|
940
|
-
* @param {object} one The first object, which is mutated.
|
|
941
|
-
* @param {object} two The second object
|
|
942
|
-
* @return {object} one after it has been mutated to contain everything in two.
|
|
943
|
-
*/
|
|
944
|
-
function mergeIntoWithNoDuplicateKeys(one, two) {
|
|
945
|
-
!(one && two && typeof one === 'object' && typeof two === 'object') ? "development" !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : _prodInvariant('80') : void 0;
|
|
946
|
-
|
|
947
|
-
for (var key in two) {
|
|
948
|
-
if (two.hasOwnProperty(key)) {
|
|
949
|
-
!(one[key] === undefined) ? "development" !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.', key) : _prodInvariant('81', key) : void 0;
|
|
950
|
-
one[key] = two[key];
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
return one;
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
/**
|
|
957
|
-
* Creates a function that invokes two functions and merges their return values.
|
|
958
|
-
*
|
|
959
|
-
* @param {function} one Function to invoke first.
|
|
960
|
-
* @param {function} two Function to invoke second.
|
|
961
|
-
* @return {function} Function that invokes the two argument functions.
|
|
962
|
-
* @private
|
|
963
|
-
*/
|
|
964
|
-
function createMergedResultFunction(one, two) {
|
|
965
|
-
return function mergedResult() {
|
|
966
|
-
var a = one.apply(this, arguments);
|
|
967
|
-
var b = two.apply(this, arguments);
|
|
968
|
-
if (a == null) {
|
|
969
|
-
return b;
|
|
970
|
-
} else if (b == null) {
|
|
971
|
-
return a;
|
|
972
|
-
}
|
|
973
|
-
var c = {};
|
|
974
|
-
mergeIntoWithNoDuplicateKeys(c, a);
|
|
975
|
-
mergeIntoWithNoDuplicateKeys(c, b);
|
|
976
|
-
return c;
|
|
977
|
-
};
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
/**
|
|
981
|
-
* Creates a function that invokes two functions and ignores their return vales.
|
|
982
|
-
*
|
|
983
|
-
* @param {function} one Function to invoke first.
|
|
984
|
-
* @param {function} two Function to invoke second.
|
|
985
|
-
* @return {function} Function that invokes the two argument functions.
|
|
986
|
-
* @private
|
|
987
|
-
*/
|
|
988
|
-
function createChainedFunction(one, two) {
|
|
989
|
-
return function chainedFunction() {
|
|
990
|
-
one.apply(this, arguments);
|
|
991
|
-
two.apply(this, arguments);
|
|
992
|
-
};
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
/**
|
|
996
|
-
* Binds a method to the component.
|
|
997
|
-
*
|
|
998
|
-
* @param {object} component Component whose method is going to be bound.
|
|
999
|
-
* @param {function} method Method to be bound.
|
|
1000
|
-
* @return {function} The bound method.
|
|
1001
|
-
*/
|
|
1002
|
-
function bindAutoBindMethod(component, method) {
|
|
1003
|
-
var boundMethod = method.bind(component);
|
|
1004
|
-
if ("development" !== 'production') {
|
|
1005
|
-
boundMethod.__reactBoundContext = component;
|
|
1006
|
-
boundMethod.__reactBoundMethod = method;
|
|
1007
|
-
boundMethod.__reactBoundArguments = null;
|
|
1008
|
-
var componentName = component.constructor.displayName;
|
|
1009
|
-
var _bind = boundMethod.bind;
|
|
1010
|
-
boundMethod.bind = function (newThis) {
|
|
1011
|
-
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1012
|
-
args[_key - 1] = arguments[_key];
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
// User is trying to bind() an autobound method; we effectively will
|
|
1016
|
-
// ignore the value of "this" that the user is trying to use, so
|
|
1017
|
-
// let's warn.
|
|
1018
|
-
if (newThis !== component && newThis !== null) {
|
|
1019
|
-
"development" !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : void 0;
|
|
1020
|
-
} else if (!args.length) {
|
|
1021
|
-
"development" !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : void 0;
|
|
1022
|
-
return boundMethod;
|
|
1023
|
-
}
|
|
1024
|
-
var reboundMethod = _bind.apply(boundMethod, arguments);
|
|
1025
|
-
reboundMethod.__reactBoundContext = component;
|
|
1026
|
-
reboundMethod.__reactBoundMethod = method;
|
|
1027
|
-
reboundMethod.__reactBoundArguments = args;
|
|
1028
|
-
return reboundMethod;
|
|
1029
|
-
};
|
|
1030
|
-
}
|
|
1031
|
-
return boundMethod;
|
|
1032
|
-
}
|
|
1033
|
-
|
|
1034
|
-
/**
|
|
1035
|
-
* Binds all auto-bound methods in a component.
|
|
1036
|
-
*
|
|
1037
|
-
* @param {object} component Component whose method is going to be bound.
|
|
1038
|
-
*/
|
|
1039
|
-
function bindAutoBindMethods(component) {
|
|
1040
|
-
var pairs = component.__reactAutoBindPairs;
|
|
1041
|
-
for (var i = 0; i < pairs.length; i += 2) {
|
|
1042
|
-
var autoBindKey = pairs[i];
|
|
1043
|
-
var method = pairs[i + 1];
|
|
1044
|
-
component[autoBindKey] = bindAutoBindMethod(component, method);
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
|
-
/**
|
|
1049
|
-
* Add more to the ReactClass base class. These are all legacy features and
|
|
1050
|
-
* therefore not already part of the modern ReactComponent.
|
|
1051
|
-
*/
|
|
1052
|
-
var ReactClassMixin = {
|
|
1053
|
-
|
|
1054
|
-
/**
|
|
1055
|
-
* TODO: This will be deprecated because state should always keep a consistent
|
|
1056
|
-
* type signature and the only use case for this, is to avoid that.
|
|
1057
|
-
*/
|
|
1058
|
-
replaceState: function (newState, callback) {
|
|
1059
|
-
this.updater.enqueueReplaceState(this, newState);
|
|
1060
|
-
if (callback) {
|
|
1061
|
-
this.updater.enqueueCallback(this, callback, 'replaceState');
|
|
1062
|
-
}
|
|
1063
|
-
},
|
|
1064
|
-
|
|
1065
|
-
/**
|
|
1066
|
-
* Checks whether or not this composite component is mounted.
|
|
1067
|
-
* @return {boolean} True if mounted, false otherwise.
|
|
1068
|
-
* @protected
|
|
1069
|
-
* @final
|
|
1070
|
-
*/
|
|
1071
|
-
isMounted: function () {
|
|
1072
|
-
return this.updater.isMounted(this);
|
|
1073
|
-
}
|
|
1074
|
-
};
|
|
1075
|
-
|
|
1076
|
-
var ReactClassComponent = function () {};
|
|
1077
|
-
_assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);
|
|
1078
|
-
|
|
1079
|
-
var didWarnDeprecated = false;
|
|
1080
|
-
|
|
1081
|
-
/**
|
|
1082
|
-
* Module for creating composite components.
|
|
1083
|
-
*
|
|
1084
|
-
* @class ReactClass
|
|
1085
|
-
*/
|
|
1086
|
-
var ReactClass = {
|
|
1087
|
-
|
|
1088
|
-
/**
|
|
1089
|
-
* Creates a composite component class given a class specification.
|
|
1090
|
-
* See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
|
|
1091
|
-
*
|
|
1092
|
-
* @param {object} spec Class specification (which must define `render`).
|
|
1093
|
-
* @return {function} Component constructor function.
|
|
1094
|
-
* @public
|
|
1095
|
-
*/
|
|
1096
|
-
createClass: function (spec) {
|
|
1097
|
-
if ("development" !== 'production') {
|
|
1098
|
-
"development" !== 'production' ? warning(didWarnDeprecated, '%s: React.createClass is deprecated and will be removed in version 16. ' + 'Use plain JavaScript classes instead. If you\'re not yet ready to ' + 'migrate, create-react-class is available on npm as a ' + 'drop-in replacement.', spec && spec.displayName || 'A Component') : void 0;
|
|
1099
|
-
didWarnDeprecated = true;
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
// To keep our warnings more understandable, we'll use a little hack here to
|
|
1103
|
-
// ensure that Constructor.name !== 'Constructor'. This makes sure we don't
|
|
1104
|
-
// unnecessarily identify a class without displayName as 'Constructor'.
|
|
1105
|
-
var Constructor = identity(function (props, context, updater) {
|
|
1106
|
-
// This constructor gets overridden by mocks. The argument is used
|
|
1107
|
-
// by mocks to assert on what gets mounted.
|
|
1108
|
-
|
|
1109
|
-
if ("development" !== 'production') {
|
|
1110
|
-
"development" !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : void 0;
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
// Wire up auto-binding
|
|
1114
|
-
if (this.__reactAutoBindPairs.length) {
|
|
1115
|
-
bindAutoBindMethods(this);
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
|
-
this.props = props;
|
|
1119
|
-
this.context = context;
|
|
1120
|
-
this.refs = emptyObject;
|
|
1121
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
1122
|
-
|
|
1123
|
-
this.state = null;
|
|
1124
|
-
|
|
1125
|
-
// ReactClasses doesn't have constructors. Instead, they use the
|
|
1126
|
-
// getInitialState and componentWillMount methods for initialization.
|
|
1127
|
-
|
|
1128
|
-
var initialState = this.getInitialState ? this.getInitialState() : null;
|
|
1129
|
-
if ("development" !== 'production') {
|
|
1130
|
-
// We allow auto-mocks to proceed as if they're returning null.
|
|
1131
|
-
if (initialState === undefined && this.getInitialState._isMockFunction) {
|
|
1132
|
-
// This is probably bad practice. Consider warning here and
|
|
1133
|
-
// deprecating this convenience.
|
|
1134
|
-
initialState = null;
|
|
1135
|
-
}
|
|
1136
|
-
}
|
|
1137
|
-
!(typeof initialState === 'object' && !Array.isArray(initialState)) ? "development" !== 'production' ? invariant(false, '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : _prodInvariant('82', Constructor.displayName || 'ReactCompositeComponent') : void 0;
|
|
1138
|
-
|
|
1139
|
-
this.state = initialState;
|
|
1140
|
-
});
|
|
1141
|
-
Constructor.prototype = new ReactClassComponent();
|
|
1142
|
-
Constructor.prototype.constructor = Constructor;
|
|
1143
|
-
Constructor.prototype.__reactAutoBindPairs = [];
|
|
1144
|
-
|
|
1145
|
-
injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
|
|
1146
|
-
|
|
1147
|
-
mixSpecIntoComponent(Constructor, spec);
|
|
1148
|
-
|
|
1149
|
-
// Initialize the defaultProps property after all mixins have been merged.
|
|
1150
|
-
if (Constructor.getDefaultProps) {
|
|
1151
|
-
Constructor.defaultProps = Constructor.getDefaultProps();
|
|
1152
|
-
}
|
|
1153
|
-
|
|
1154
|
-
if ("development" !== 'production') {
|
|
1155
|
-
// This is a tag to indicate that the use of these method names is ok,
|
|
1156
|
-
// since it's used with createClass. If it's not, then it's likely a
|
|
1157
|
-
// mistake so we'll warn you to use the static property, property
|
|
1158
|
-
// initializer or constructor respectively.
|
|
1159
|
-
if (Constructor.getDefaultProps) {
|
|
1160
|
-
Constructor.getDefaultProps.isReactClassApproved = {};
|
|
1161
|
-
}
|
|
1162
|
-
if (Constructor.prototype.getInitialState) {
|
|
1163
|
-
Constructor.prototype.getInitialState.isReactClassApproved = {};
|
|
1164
|
-
}
|
|
1165
|
-
}
|
|
1166
|
-
|
|
1167
|
-
!Constructor.prototype.render ? "development" !== 'production' ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') : _prodInvariant('83') : void 0;
|
|
1168
|
-
|
|
1169
|
-
if ("development" !== 'production') {
|
|
1170
|
-
"development" !== 'production' ? warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component') : void 0;
|
|
1171
|
-
"development" !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : void 0;
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
// Reduce time spent doing lookups by setting these on the prototype.
|
|
1175
|
-
for (var methodName in ReactClassInterface) {
|
|
1176
|
-
if (!Constructor.prototype[methodName]) {
|
|
1177
|
-
Constructor.prototype[methodName] = null;
|
|
1178
|
-
}
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
|
-
return Constructor;
|
|
1182
|
-
},
|
|
1183
|
-
|
|
1184
|
-
injection: {
|
|
1185
|
-
injectMixin: function (mixin) {
|
|
1186
|
-
injectedMixins.push(mixin);
|
|
1187
|
-
}
|
|
1188
|
-
}
|
|
1189
|
-
|
|
1190
|
-
};
|
|
1191
|
-
|
|
1192
|
-
module.exports = ReactClass;
|
|
1193
|
-
},{"10":10,"13":13,"14":14,"25":25,"28":28,"29":29,"30":30,"31":31,"6":6}],6:[function(_dereq_,module,exports){
|
|
1194
|
-
/**
|
|
1195
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
1196
|
-
* All rights reserved.
|
|
1197
|
-
*
|
|
1198
|
-
* This source code is licensed under the BSD-style license found in the
|
|
1199
|
-
* LICENSE file in the root directory of this source tree. An additional grant
|
|
1200
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
1201
|
-
*
|
|
1202
|
-
*/
|
|
1203
|
-
|
|
1204
|
-
'use strict';
|
|
1205
|
-
|
|
1206
|
-
var _prodInvariant = _dereq_(25);
|
|
1207
|
-
|
|
1208
|
-
var ReactNoopUpdateQueue = _dereq_(13);
|
|
1209
|
-
|
|
1210
|
-
var canDefineProperty = _dereq_(20);
|
|
1211
|
-
var emptyObject = _dereq_(28);
|
|
1212
|
-
var invariant = _dereq_(29);
|
|
1213
|
-
var warning = _dereq_(30);
|
|
1214
|
-
|
|
1215
|
-
/**
|
|
1216
|
-
* Base class helpers for the updating state of a component.
|
|
1217
|
-
*/
|
|
1218
|
-
function ReactComponent(props, context, updater) {
|
|
1219
|
-
this.props = props;
|
|
1220
|
-
this.context = context;
|
|
1221
|
-
this.refs = emptyObject;
|
|
1222
|
-
// We initialize the default updater but the real one gets injected by the
|
|
1223
|
-
// renderer.
|
|
1224
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1227
|
-
ReactComponent.prototype.isReactComponent = {};
|
|
1228
|
-
|
|
1229
|
-
/**
|
|
1230
|
-
* Sets a subset of the state. Always use this to mutate
|
|
1231
|
-
* state. You should treat `this.state` as immutable.
|
|
1232
|
-
*
|
|
1233
|
-
* There is no guarantee that `this.state` will be immediately updated, so
|
|
1234
|
-
* accessing `this.state` after calling this method may return the old value.
|
|
1235
|
-
*
|
|
1236
|
-
* There is no guarantee that calls to `setState` will run synchronously,
|
|
1237
|
-
* as they may eventually be batched together. You can provide an optional
|
|
1238
|
-
* callback that will be executed when the call to setState is actually
|
|
1239
|
-
* completed.
|
|
1240
|
-
*
|
|
1241
|
-
* When a function is provided to setState, it will be called at some point in
|
|
1242
|
-
* the future (not synchronously). It will be called with the up to date
|
|
1243
|
-
* component arguments (state, props, context). These values can be different
|
|
1244
|
-
* from this.* because your function may be called after receiveProps but before
|
|
1245
|
-
* shouldComponentUpdate, and this new state, props, and context will not yet be
|
|
1246
|
-
* assigned to this.
|
|
1247
|
-
*
|
|
1248
|
-
* @param {object|function} partialState Next partial state or function to
|
|
1249
|
-
* produce next partial state to be merged with current state.
|
|
1250
|
-
* @param {?function} callback Called after state is updated.
|
|
1251
|
-
* @final
|
|
1252
|
-
* @protected
|
|
1253
|
-
*/
|
|
1254
|
-
ReactComponent.prototype.setState = function (partialState, callback) {
|
|
1255
|
-
!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? "development" !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0;
|
|
1256
|
-
this.updater.enqueueSetState(this, partialState);
|
|
1257
|
-
if (callback) {
|
|
1258
|
-
this.updater.enqueueCallback(this, callback, 'setState');
|
|
1259
|
-
}
|
|
1260
|
-
};
|
|
1261
|
-
|
|
1262
|
-
/**
|
|
1263
|
-
* Forces an update. This should only be invoked when it is known with
|
|
1264
|
-
* certainty that we are **not** in a DOM transaction.
|
|
1265
|
-
*
|
|
1266
|
-
* You may want to call this when you know that some deeper aspect of the
|
|
1267
|
-
* component's state has changed but `setState` was not called.
|
|
1268
|
-
*
|
|
1269
|
-
* This will not invoke `shouldComponentUpdate`, but it will invoke
|
|
1270
|
-
* `componentWillUpdate` and `componentDidUpdate`.
|
|
1271
|
-
*
|
|
1272
|
-
* @param {?function} callback Called after update is complete.
|
|
1273
|
-
* @final
|
|
1274
|
-
* @protected
|
|
1275
|
-
*/
|
|
1276
|
-
ReactComponent.prototype.forceUpdate = function (callback) {
|
|
1277
|
-
this.updater.enqueueForceUpdate(this);
|
|
1278
|
-
if (callback) {
|
|
1279
|
-
this.updater.enqueueCallback(this, callback, 'forceUpdate');
|
|
1280
|
-
}
|
|
1281
|
-
};
|
|
1282
|
-
|
|
1283
|
-
/**
|
|
1284
|
-
* Deprecated APIs. These APIs used to exist on classic React classes but since
|
|
1285
|
-
* we would like to deprecate them, we're not going to move them over to this
|
|
1286
|
-
* modern base class. Instead, we define a getter that warns if it's accessed.
|
|
1287
|
-
*/
|
|
1288
|
-
if ("development" !== 'production') {
|
|
1289
|
-
var deprecatedAPIs = {
|
|
1290
|
-
isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
|
|
1291
|
-
replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
|
|
1292
|
-
};
|
|
1293
|
-
var defineDeprecationWarning = function (methodName, info) {
|
|
1294
|
-
if (canDefineProperty) {
|
|
1295
|
-
Object.defineProperty(ReactComponent.prototype, methodName, {
|
|
1296
|
-
get: function () {
|
|
1297
|
-
"development" !== 'production' ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : void 0;
|
|
1298
|
-
return undefined;
|
|
1299
|
-
}
|
|
1300
|
-
});
|
|
1301
|
-
}
|
|
1302
|
-
};
|
|
1303
|
-
for (var fnName in deprecatedAPIs) {
|
|
1304
|
-
if (deprecatedAPIs.hasOwnProperty(fnName)) {
|
|
1305
|
-
defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
|
1306
|
-
}
|
|
1307
|
-
}
|
|
1308
|
-
}
|
|
1309
|
-
|
|
1310
|
-
module.exports = ReactComponent;
|
|
1311
|
-
},{"13":13,"20":20,"25":25,"28":28,"29":29,"30":30}],7:[function(_dereq_,module,exports){
|
|
1312
|
-
/**
|
|
1313
|
-
* Copyright 2016-present, Facebook, Inc.
|
|
1314
|
-
* All rights reserved.
|
|
1315
|
-
*
|
|
1316
|
-
* This source code is licensed under the BSD-style license found in the
|
|
1317
|
-
* LICENSE file in the root directory of this source tree. An additional grant
|
|
1318
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
1319
|
-
*
|
|
1320
|
-
*
|
|
1321
|
-
*/
|
|
1322
|
-
|
|
1323
|
-
'use strict';
|
|
1324
|
-
|
|
1325
|
-
var _prodInvariant = _dereq_(25);
|
|
1326
|
-
|
|
1327
|
-
var ReactCurrentOwner = _dereq_(8);
|
|
1328
|
-
|
|
1329
|
-
var invariant = _dereq_(29);
|
|
1330
|
-
var warning = _dereq_(30);
|
|
1331
|
-
|
|
1332
|
-
function isNative(fn) {
|
|
1333
|
-
// Based on isNative() from Lodash
|
|
1334
|
-
var funcToString = Function.prototype.toString;
|
|
1335
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1336
|
-
var reIsNative = RegExp('^' + funcToString
|
|
1337
|
-
// Take an example native function source for comparison
|
|
1338
|
-
.call(hasOwnProperty)
|
|
1339
|
-
// Strip regex characters so we can use it for regex
|
|
1340
|
-
.replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
|
|
1341
|
-
// Remove hasOwnProperty from the template to make it generic
|
|
1342
|
-
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
|
|
1343
|
-
try {
|
|
1344
|
-
var source = funcToString.call(fn);
|
|
1345
|
-
return reIsNative.test(source);
|
|
1346
|
-
} catch (err) {
|
|
1347
|
-
return false;
|
|
1348
|
-
}
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
var canUseCollections =
|
|
1352
|
-
// Array.from
|
|
1353
|
-
typeof Array.from === 'function' &&
|
|
1354
|
-
// Map
|
|
1355
|
-
typeof Map === 'function' && isNative(Map) &&
|
|
1356
|
-
// Map.prototype.keys
|
|
1357
|
-
Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
|
|
1358
|
-
// Set
|
|
1359
|
-
typeof Set === 'function' && isNative(Set) &&
|
|
1360
|
-
// Set.prototype.keys
|
|
1361
|
-
Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
|
|
1362
|
-
|
|
1363
|
-
var setItem;
|
|
1364
|
-
var getItem;
|
|
1365
|
-
var removeItem;
|
|
1366
|
-
var getItemIDs;
|
|
1367
|
-
var addRoot;
|
|
1368
|
-
var removeRoot;
|
|
1369
|
-
var getRootIDs;
|
|
1370
|
-
|
|
1371
|
-
if (canUseCollections) {
|
|
1372
|
-
var itemMap = new Map();
|
|
1373
|
-
var rootIDSet = new Set();
|
|
1374
|
-
|
|
1375
|
-
setItem = function (id, item) {
|
|
1376
|
-
itemMap.set(id, item);
|
|
1377
|
-
};
|
|
1378
|
-
getItem = function (id) {
|
|
1379
|
-
return itemMap.get(id);
|
|
1380
|
-
};
|
|
1381
|
-
removeItem = function (id) {
|
|
1382
|
-
itemMap['delete'](id);
|
|
1383
|
-
};
|
|
1384
|
-
getItemIDs = function () {
|
|
1385
|
-
return Array.from(itemMap.keys());
|
|
1386
|
-
};
|
|
1387
|
-
|
|
1388
|
-
addRoot = function (id) {
|
|
1389
|
-
rootIDSet.add(id);
|
|
1390
|
-
};
|
|
1391
|
-
removeRoot = function (id) {
|
|
1392
|
-
rootIDSet['delete'](id);
|
|
1393
|
-
};
|
|
1394
|
-
getRootIDs = function () {
|
|
1395
|
-
return Array.from(rootIDSet.keys());
|
|
1396
|
-
};
|
|
1397
|
-
} else {
|
|
1398
|
-
var itemByKey = {};
|
|
1399
|
-
var rootByKey = {};
|
|
1400
|
-
|
|
1401
|
-
// Use non-numeric keys to prevent V8 performance issues:
|
|
1402
|
-
// https://github.com/facebook/react/pull/7232
|
|
1403
|
-
var getKeyFromID = function (id) {
|
|
1404
|
-
return '.' + id;
|
|
1405
|
-
};
|
|
1406
|
-
var getIDFromKey = function (key) {
|
|
1407
|
-
return parseInt(key.substr(1), 10);
|
|
1408
|
-
};
|
|
731
|
+
// Use non-numeric keys to prevent V8 performance issues:
|
|
732
|
+
// https://github.com/facebook/react/pull/7232
|
|
733
|
+
var getKeyFromID = function (id) {
|
|
734
|
+
return '.' + id;
|
|
735
|
+
};
|
|
736
|
+
var getIDFromKey = function (key) {
|
|
737
|
+
return parseInt(key.substr(1), 10);
|
|
738
|
+
};
|
|
1409
739
|
|
|
1410
740
|
setItem = function (id, item) {
|
|
1411
741
|
var key = getKeyFromID(id);
|
|
@@ -1638,11 +968,56 @@ var ReactComponentTreeHook = {
|
|
|
1638
968
|
|
|
1639
969
|
|
|
1640
970
|
getRootIDs: getRootIDs,
|
|
1641
|
-
getRegisteredIDs: getItemIDs
|
|
971
|
+
getRegisteredIDs: getItemIDs,
|
|
972
|
+
|
|
973
|
+
pushNonStandardWarningStack: function (isCreatingElement, currentSource) {
|
|
974
|
+
if (typeof console.reactStack !== 'function') {
|
|
975
|
+
return;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
var stack = [];
|
|
979
|
+
var currentOwner = ReactCurrentOwner.current;
|
|
980
|
+
var id = currentOwner && currentOwner._debugID;
|
|
981
|
+
|
|
982
|
+
try {
|
|
983
|
+
if (isCreatingElement) {
|
|
984
|
+
stack.push({
|
|
985
|
+
name: id ? ReactComponentTreeHook.getDisplayName(id) : null,
|
|
986
|
+
fileName: currentSource ? currentSource.fileName : null,
|
|
987
|
+
lineNumber: currentSource ? currentSource.lineNumber : null
|
|
988
|
+
});
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
while (id) {
|
|
992
|
+
var element = ReactComponentTreeHook.getElement(id);
|
|
993
|
+
var parentID = ReactComponentTreeHook.getParentID(id);
|
|
994
|
+
var ownerID = ReactComponentTreeHook.getOwnerID(id);
|
|
995
|
+
var ownerName = ownerID ? ReactComponentTreeHook.getDisplayName(ownerID) : null;
|
|
996
|
+
var source = element && element._source;
|
|
997
|
+
stack.push({
|
|
998
|
+
name: ownerName,
|
|
999
|
+
fileName: source ? source.fileName : null,
|
|
1000
|
+
lineNumber: source ? source.lineNumber : null
|
|
1001
|
+
});
|
|
1002
|
+
id = parentID;
|
|
1003
|
+
}
|
|
1004
|
+
} catch (err) {
|
|
1005
|
+
// Internal state is messed up.
|
|
1006
|
+
// Stop building the stack (it's just a nice to have).
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
console.reactStack(stack);
|
|
1010
|
+
},
|
|
1011
|
+
popNonStandardWarningStack: function () {
|
|
1012
|
+
if (typeof console.reactStackEnd !== 'function') {
|
|
1013
|
+
return;
|
|
1014
|
+
}
|
|
1015
|
+
console.reactStackEnd();
|
|
1016
|
+
}
|
|
1642
1017
|
};
|
|
1643
1018
|
|
|
1644
1019
|
module.exports = ReactComponentTreeHook;
|
|
1645
|
-
},{"25":25,"
|
|
1020
|
+
},{"25":25,"30":30,"31":31,"7":7}],7:[function(_dereq_,module,exports){
|
|
1646
1021
|
/**
|
|
1647
1022
|
* Copyright 2013-present, Facebook, Inc.
|
|
1648
1023
|
* All rights reserved.
|
|
@@ -1663,17 +1038,15 @@ module.exports = ReactComponentTreeHook;
|
|
|
1663
1038
|
* currently being constructed.
|
|
1664
1039
|
*/
|
|
1665
1040
|
var ReactCurrentOwner = {
|
|
1666
|
-
|
|
1667
1041
|
/**
|
|
1668
1042
|
* @internal
|
|
1669
1043
|
* @type {ReactComponent}
|
|
1670
1044
|
*/
|
|
1671
1045
|
current: null
|
|
1672
|
-
|
|
1673
1046
|
};
|
|
1674
1047
|
|
|
1675
1048
|
module.exports = ReactCurrentOwner;
|
|
1676
|
-
},{}],
|
|
1049
|
+
},{}],8:[function(_dereq_,module,exports){
|
|
1677
1050
|
/**
|
|
1678
1051
|
* Copyright 2013-present, Facebook, Inc.
|
|
1679
1052
|
* All rights reserved.
|
|
@@ -1686,7 +1059,7 @@ module.exports = ReactCurrentOwner;
|
|
|
1686
1059
|
|
|
1687
1060
|
'use strict';
|
|
1688
1061
|
|
|
1689
|
-
var ReactElement = _dereq_(
|
|
1062
|
+
var ReactElement = _dereq_(9);
|
|
1690
1063
|
|
|
1691
1064
|
/**
|
|
1692
1065
|
* Create a factory that creates HTML tag elements.
|
|
@@ -1695,13 +1068,12 @@ var ReactElement = _dereq_(10);
|
|
|
1695
1068
|
*/
|
|
1696
1069
|
var createDOMFactory = ReactElement.createFactory;
|
|
1697
1070
|
if ("development" !== 'production') {
|
|
1698
|
-
var ReactElementValidator = _dereq_(
|
|
1071
|
+
var ReactElementValidator = _dereq_(11);
|
|
1699
1072
|
createDOMFactory = ReactElementValidator.createFactory;
|
|
1700
1073
|
}
|
|
1701
1074
|
|
|
1702
1075
|
/**
|
|
1703
1076
|
* Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.
|
|
1704
|
-
* This is also accessible via `React.DOM`.
|
|
1705
1077
|
*
|
|
1706
1078
|
* @public
|
|
1707
1079
|
*/
|
|
@@ -1843,7 +1215,7 @@ var ReactDOMFactories = {
|
|
|
1843
1215
|
};
|
|
1844
1216
|
|
|
1845
1217
|
module.exports = ReactDOMFactories;
|
|
1846
|
-
},{"
|
|
1218
|
+
},{"11":11,"9":9}],9:[function(_dereq_,module,exports){
|
|
1847
1219
|
/**
|
|
1848
1220
|
* Copyright 2014-present, Facebook, Inc.
|
|
1849
1221
|
* All rights reserved.
|
|
@@ -1856,15 +1228,15 @@ module.exports = ReactDOMFactories;
|
|
|
1856
1228
|
|
|
1857
1229
|
'use strict';
|
|
1858
1230
|
|
|
1859
|
-
var _assign = _dereq_(
|
|
1231
|
+
var _assign = _dereq_(32);
|
|
1860
1232
|
|
|
1861
|
-
var ReactCurrentOwner = _dereq_(
|
|
1233
|
+
var ReactCurrentOwner = _dereq_(7);
|
|
1862
1234
|
|
|
1863
|
-
var warning = _dereq_(
|
|
1864
|
-
var canDefineProperty = _dereq_(
|
|
1235
|
+
var warning = _dereq_(31);
|
|
1236
|
+
var canDefineProperty = _dereq_(18);
|
|
1865
1237
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1866
1238
|
|
|
1867
|
-
var REACT_ELEMENT_TYPE = _dereq_(
|
|
1239
|
+
var REACT_ELEMENT_TYPE = _dereq_(10);
|
|
1868
1240
|
|
|
1869
1241
|
var RESERVED_PROPS = {
|
|
1870
1242
|
key: true,
|
|
@@ -2184,7 +1556,7 @@ ReactElement.isValidElement = function (object) {
|
|
|
2184
1556
|
};
|
|
2185
1557
|
|
|
2186
1558
|
module.exports = ReactElement;
|
|
2187
|
-
},{"
|
|
1559
|
+
},{"10":10,"18":18,"31":31,"32":32,"7":7}],10:[function(_dereq_,module,exports){
|
|
2188
1560
|
/**
|
|
2189
1561
|
* Copyright 2014-present, Facebook, Inc.
|
|
2190
1562
|
* All rights reserved.
|
|
@@ -2204,7 +1576,7 @@ module.exports = ReactElement;
|
|
|
2204
1576
|
var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
|
|
2205
1577
|
|
|
2206
1578
|
module.exports = REACT_ELEMENT_TYPE;
|
|
2207
|
-
},{}],
|
|
1579
|
+
},{}],11:[function(_dereq_,module,exports){
|
|
2208
1580
|
/**
|
|
2209
1581
|
* Copyright 2014-present, Facebook, Inc.
|
|
2210
1582
|
* All rights reserved.
|
|
@@ -2224,15 +1596,16 @@ module.exports = REACT_ELEMENT_TYPE;
|
|
|
2224
1596
|
|
|
2225
1597
|
'use strict';
|
|
2226
1598
|
|
|
2227
|
-
var ReactCurrentOwner = _dereq_(
|
|
2228
|
-
var ReactComponentTreeHook = _dereq_(
|
|
2229
|
-
var ReactElement = _dereq_(
|
|
1599
|
+
var ReactCurrentOwner = _dereq_(7);
|
|
1600
|
+
var ReactComponentTreeHook = _dereq_(6);
|
|
1601
|
+
var ReactElement = _dereq_(9);
|
|
2230
1602
|
|
|
2231
|
-
var checkReactTypeSpec = _dereq_(
|
|
1603
|
+
var checkReactTypeSpec = _dereq_(19);
|
|
2232
1604
|
|
|
2233
|
-
var canDefineProperty = _dereq_(
|
|
2234
|
-
var getIteratorFn = _dereq_(
|
|
2235
|
-
var warning = _dereq_(
|
|
1605
|
+
var canDefineProperty = _dereq_(18);
|
|
1606
|
+
var getIteratorFn = _dereq_(21);
|
|
1607
|
+
var warning = _dereq_(31);
|
|
1608
|
+
var lowPriorityWarning = _dereq_(23);
|
|
2236
1609
|
|
|
2237
1610
|
function getDeclarationErrorAddendum() {
|
|
2238
1611
|
if (ReactCurrentOwner.current) {
|
|
@@ -2373,7 +1746,6 @@ function validatePropTypes(element) {
|
|
|
2373
1746
|
}
|
|
2374
1747
|
|
|
2375
1748
|
var ReactElementValidator = {
|
|
2376
|
-
|
|
2377
1749
|
createElement: function (type, props, children) {
|
|
2378
1750
|
var validType = typeof type === 'string' || typeof type === 'function';
|
|
2379
1751
|
// We warn in this case but don't throw. We expect the element creation to
|
|
@@ -2382,7 +1754,7 @@ var ReactElementValidator = {
|
|
|
2382
1754
|
if (typeof type !== 'function' && typeof type !== 'string') {
|
|
2383
1755
|
var info = '';
|
|
2384
1756
|
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
2385
|
-
info += ' You likely forgot to export your component from the file ' +
|
|
1757
|
+
info += ' You likely forgot to export your component from the file ' + "it's defined in.";
|
|
2386
1758
|
}
|
|
2387
1759
|
|
|
2388
1760
|
var sourceInfo = getSourceInfoErrorAddendum(props);
|
|
@@ -2394,7 +1766,10 @@ var ReactElementValidator = {
|
|
|
2394
1766
|
|
|
2395
1767
|
info += ReactComponentTreeHook.getCurrentStackAddendum();
|
|
2396
1768
|
|
|
1769
|
+
var currentSource = props !== null && props !== undefined && props.__source !== undefined ? props.__source : null;
|
|
1770
|
+
ReactComponentTreeHook.pushNonStandardWarningStack(true, currentSource);
|
|
2397
1771
|
"development" !== 'production' ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0;
|
|
1772
|
+
ReactComponentTreeHook.popNonStandardWarningStack();
|
|
2398
1773
|
}
|
|
2399
1774
|
}
|
|
2400
1775
|
|
|
@@ -2432,7 +1807,7 @@ var ReactElementValidator = {
|
|
|
2432
1807
|
Object.defineProperty(validatedFactory, 'type', {
|
|
2433
1808
|
enumerable: false,
|
|
2434
1809
|
get: function () {
|
|
2435
|
-
|
|
1810
|
+
lowPriorityWarning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
|
|
2436
1811
|
Object.defineProperty(this, 'type', {
|
|
2437
1812
|
value: type
|
|
2438
1813
|
});
|
|
@@ -2453,11 +1828,10 @@ var ReactElementValidator = {
|
|
|
2453
1828
|
validatePropTypes(newElement);
|
|
2454
1829
|
return newElement;
|
|
2455
1830
|
}
|
|
2456
|
-
|
|
2457
1831
|
};
|
|
2458
1832
|
|
|
2459
1833
|
module.exports = ReactElementValidator;
|
|
2460
|
-
},{"
|
|
1834
|
+
},{"18":18,"19":19,"21":21,"23":23,"31":31,"6":6,"7":7,"9":9}],12:[function(_dereq_,module,exports){
|
|
2461
1835
|
/**
|
|
2462
1836
|
* Copyright 2015-present, Facebook, Inc.
|
|
2463
1837
|
* All rights reserved.
|
|
@@ -2470,7 +1844,7 @@ module.exports = ReactElementValidator;
|
|
|
2470
1844
|
|
|
2471
1845
|
'use strict';
|
|
2472
1846
|
|
|
2473
|
-
var warning = _dereq_(
|
|
1847
|
+
var warning = _dereq_(31);
|
|
2474
1848
|
|
|
2475
1849
|
function warnNoop(publicInstance, callerName) {
|
|
2476
1850
|
if ("development" !== 'production') {
|
|
@@ -2483,7 +1857,6 @@ function warnNoop(publicInstance, callerName) {
|
|
|
2483
1857
|
* This is the abstract API for an update queue.
|
|
2484
1858
|
*/
|
|
2485
1859
|
var ReactNoopUpdateQueue = {
|
|
2486
|
-
|
|
2487
1860
|
/**
|
|
2488
1861
|
* Checks whether or not this composite component is mounted.
|
|
2489
1862
|
* @param {ReactClass} publicInstance The instance we want to test.
|
|
@@ -2553,7 +1926,7 @@ var ReactNoopUpdateQueue = {
|
|
|
2553
1926
|
};
|
|
2554
1927
|
|
|
2555
1928
|
module.exports = ReactNoopUpdateQueue;
|
|
2556
|
-
},{"
|
|
1929
|
+
},{"31":31}],13:[function(_dereq_,module,exports){
|
|
2557
1930
|
/**
|
|
2558
1931
|
* Copyright 2013-present, Facebook, Inc.
|
|
2559
1932
|
* All rights reserved.
|
|
@@ -2578,7 +1951,7 @@ if ("development" !== 'production') {
|
|
|
2578
1951
|
}
|
|
2579
1952
|
|
|
2580
1953
|
module.exports = ReactPropTypeLocationNames;
|
|
2581
|
-
},{}],
|
|
1954
|
+
},{}],14:[function(_dereq_,module,exports){
|
|
2582
1955
|
/**
|
|
2583
1956
|
* Copyright 2013-present, Facebook, Inc.
|
|
2584
1957
|
* All rights reserved.
|
|
@@ -2591,13 +1964,13 @@ module.exports = ReactPropTypeLocationNames;
|
|
|
2591
1964
|
|
|
2592
1965
|
'use strict';
|
|
2593
1966
|
|
|
2594
|
-
var _require = _dereq_(
|
|
1967
|
+
var _require = _dereq_(9),
|
|
2595
1968
|
isValidElement = _require.isValidElement;
|
|
2596
1969
|
|
|
2597
|
-
var factory = _dereq_(
|
|
1970
|
+
var factory = _dereq_(34);
|
|
2598
1971
|
|
|
2599
1972
|
module.exports = factory(isValidElement);
|
|
2600
|
-
},{"
|
|
1973
|
+
},{"34":34,"9":9}],15:[function(_dereq_,module,exports){
|
|
2601
1974
|
/**
|
|
2602
1975
|
* Copyright 2013-present, Facebook, Inc.
|
|
2603
1976
|
* All rights reserved.
|
|
@@ -2614,7 +1987,7 @@ module.exports = factory(isValidElement);
|
|
|
2614
1987
|
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
2615
1988
|
|
|
2616
1989
|
module.exports = ReactPropTypesSecret;
|
|
2617
|
-
},{}],
|
|
1990
|
+
},{}],16:[function(_dereq_,module,exports){
|
|
2618
1991
|
/**
|
|
2619
1992
|
* Copyright 2013-present, Facebook, Inc.
|
|
2620
1993
|
* All rights reserved.
|
|
@@ -2627,38 +2000,243 @@ module.exports = ReactPropTypesSecret;
|
|
|
2627
2000
|
|
|
2628
2001
|
'use strict';
|
|
2629
2002
|
|
|
2630
|
-
var _assign = _dereq_(
|
|
2003
|
+
var _assign = _dereq_(32);
|
|
2004
|
+
|
|
2005
|
+
var React = _dereq_(3);
|
|
2631
2006
|
|
|
2632
|
-
|
|
2633
|
-
var
|
|
2007
|
+
// `version` will be added here by the React module.
|
|
2008
|
+
var ReactUMDEntry = _assign(React, {
|
|
2009
|
+
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
|
|
2010
|
+
ReactCurrentOwner: _dereq_(7)
|
|
2011
|
+
}
|
|
2012
|
+
});
|
|
2634
2013
|
|
|
2635
|
-
|
|
2014
|
+
if ("development" !== 'production') {
|
|
2015
|
+
_assign(ReactUMDEntry.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
|
|
2016
|
+
// ReactComponentTreeHook should not be included in production.
|
|
2017
|
+
ReactComponentTreeHook: _dereq_(6),
|
|
2018
|
+
getNextDebugID: _dereq_(22)
|
|
2019
|
+
});
|
|
2020
|
+
}
|
|
2636
2021
|
|
|
2022
|
+
module.exports = ReactUMDEntry;
|
|
2023
|
+
},{"22":22,"3":3,"32":32,"6":6,"7":7}],17:[function(_dereq_,module,exports){
|
|
2637
2024
|
/**
|
|
2638
|
-
*
|
|
2025
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
2026
|
+
* All rights reserved.
|
|
2027
|
+
*
|
|
2028
|
+
* This source code is licensed under the BSD-style license found in the
|
|
2029
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
2030
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2031
|
+
*
|
|
2639
2032
|
*/
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2033
|
+
|
|
2034
|
+
'use strict';
|
|
2035
|
+
|
|
2036
|
+
module.exports = '15.6.1';
|
|
2037
|
+
},{}],18:[function(_dereq_,module,exports){
|
|
2038
|
+
/**
|
|
2039
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
2040
|
+
* All rights reserved.
|
|
2041
|
+
*
|
|
2042
|
+
* This source code is licensed under the BSD-style license found in the
|
|
2043
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
2044
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2045
|
+
*
|
|
2046
|
+
*
|
|
2047
|
+
*/
|
|
2048
|
+
|
|
2049
|
+
'use strict';
|
|
2050
|
+
|
|
2051
|
+
var canDefineProperty = false;
|
|
2052
|
+
if ("development" !== 'production') {
|
|
2053
|
+
try {
|
|
2054
|
+
// $FlowFixMe https://github.com/facebook/flow/issues/285
|
|
2055
|
+
Object.defineProperty({}, 'x', { get: function () {} });
|
|
2056
|
+
canDefineProperty = true;
|
|
2057
|
+
} catch (x) {
|
|
2058
|
+
// IE will fail on defineProperty
|
|
2059
|
+
}
|
|
2648
2060
|
}
|
|
2649
2061
|
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2062
|
+
module.exports = canDefineProperty;
|
|
2063
|
+
},{}],19:[function(_dereq_,module,exports){
|
|
2064
|
+
(function (process){
|
|
2065
|
+
/**
|
|
2066
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
2067
|
+
* All rights reserved.
|
|
2068
|
+
*
|
|
2069
|
+
* This source code is licensed under the BSD-style license found in the
|
|
2070
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
2071
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2072
|
+
*
|
|
2073
|
+
*/
|
|
2074
|
+
|
|
2075
|
+
'use strict';
|
|
2076
|
+
|
|
2077
|
+
var _prodInvariant = _dereq_(25);
|
|
2078
|
+
|
|
2079
|
+
var ReactPropTypeLocationNames = _dereq_(13);
|
|
2080
|
+
var ReactPropTypesSecret = _dereq_(15);
|
|
2081
|
+
|
|
2082
|
+
var invariant = _dereq_(30);
|
|
2083
|
+
var warning = _dereq_(31);
|
|
2084
|
+
|
|
2085
|
+
var ReactComponentTreeHook;
|
|
2086
|
+
|
|
2087
|
+
if (typeof process !== 'undefined' && process.env && "development" === 'test') {
|
|
2088
|
+
// Temporary hack.
|
|
2089
|
+
// Inline requires don't work well with Jest:
|
|
2090
|
+
// https://github.com/facebook/react/issues/7240
|
|
2091
|
+
// Remove the inline requires when we don't need them anymore:
|
|
2092
|
+
// https://github.com/facebook/react/pull/7178
|
|
2093
|
+
ReactComponentTreeHook = _dereq_(6);
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
var loggedTypeFailures = {};
|
|
2097
|
+
|
|
2098
|
+
/**
|
|
2099
|
+
* Assert that the values match with the type specs.
|
|
2100
|
+
* Error messages are memorized and will only be shown once.
|
|
2101
|
+
*
|
|
2102
|
+
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
2103
|
+
* @param {object} values Runtime values that need to be type-checked
|
|
2104
|
+
* @param {string} location e.g. "prop", "context", "child context"
|
|
2105
|
+
* @param {string} componentName Name of the component for error messages.
|
|
2106
|
+
* @param {?object} element The React element that is being type-checked
|
|
2107
|
+
* @param {?number} debugID The React component instance that is being type-checked
|
|
2108
|
+
* @private
|
|
2109
|
+
*/
|
|
2110
|
+
function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {
|
|
2111
|
+
for (var typeSpecName in typeSpecs) {
|
|
2112
|
+
if (typeSpecs.hasOwnProperty(typeSpecName)) {
|
|
2113
|
+
var error;
|
|
2114
|
+
// Prop type validation may throw. In case they do, we don't want to
|
|
2115
|
+
// fail the render phase where it didn't fail before. So we log it.
|
|
2116
|
+
// After these have been cleaned up, we'll let them throw.
|
|
2117
|
+
try {
|
|
2118
|
+
// This is intentionally an invariant that gets caught. It's the same
|
|
2119
|
+
// behavior as without this statement except with a better message.
|
|
2120
|
+
!(typeof typeSpecs[typeSpecName] === 'function') ? "development" !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0;
|
|
2121
|
+
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
2122
|
+
} catch (ex) {
|
|
2123
|
+
error = ex;
|
|
2124
|
+
}
|
|
2125
|
+
"development" !== 'production' ? warning(!error || error 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).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0;
|
|
2126
|
+
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
2127
|
+
// Only monitor this failure once because there tends to be a lot of the
|
|
2128
|
+
// same error.
|
|
2129
|
+
loggedTypeFailures[error.message] = true;
|
|
2130
|
+
|
|
2131
|
+
var componentStackInfo = '';
|
|
2132
|
+
|
|
2133
|
+
if ("development" !== 'production') {
|
|
2134
|
+
if (!ReactComponentTreeHook) {
|
|
2135
|
+
ReactComponentTreeHook = _dereq_(6);
|
|
2136
|
+
}
|
|
2137
|
+
if (debugID !== null) {
|
|
2138
|
+
componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
|
|
2139
|
+
} else if (element !== null) {
|
|
2140
|
+
componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
|
|
2141
|
+
}
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
"development" !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
|
|
2145
|
+
}
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
}
|
|
2149
|
+
|
|
2150
|
+
module.exports = checkReactTypeSpec;
|
|
2151
|
+
}).call(this,undefined)
|
|
2152
|
+
},{"13":13,"15":15,"25":25,"30":30,"31":31,"6":6}],20:[function(_dereq_,module,exports){
|
|
2153
|
+
/**
|
|
2154
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
2155
|
+
* All rights reserved.
|
|
2156
|
+
*
|
|
2157
|
+
* This source code is licensed under the BSD-style license found in the
|
|
2158
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
2159
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2160
|
+
*
|
|
2161
|
+
*/
|
|
2162
|
+
|
|
2163
|
+
'use strict';
|
|
2164
|
+
|
|
2165
|
+
var _require = _dereq_(4),
|
|
2166
|
+
Component = _require.Component;
|
|
2167
|
+
|
|
2168
|
+
var _require2 = _dereq_(9),
|
|
2169
|
+
isValidElement = _require2.isValidElement;
|
|
2170
|
+
|
|
2171
|
+
var ReactNoopUpdateQueue = _dereq_(12);
|
|
2172
|
+
var factory = _dereq_(27);
|
|
2173
|
+
|
|
2174
|
+
module.exports = factory(Component, isValidElement, ReactNoopUpdateQueue);
|
|
2175
|
+
},{"12":12,"27":27,"4":4,"9":9}],21:[function(_dereq_,module,exports){
|
|
2176
|
+
/**
|
|
2177
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
2178
|
+
* All rights reserved.
|
|
2179
|
+
*
|
|
2180
|
+
* This source code is licensed under the BSD-style license found in the
|
|
2181
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
2182
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2183
|
+
*
|
|
2184
|
+
*
|
|
2185
|
+
*/
|
|
2186
|
+
|
|
2187
|
+
'use strict';
|
|
2188
|
+
|
|
2189
|
+
/* global Symbol */
|
|
2190
|
+
|
|
2191
|
+
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
2192
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
2193
|
+
|
|
2194
|
+
/**
|
|
2195
|
+
* Returns the iterator method function contained on the iterable object.
|
|
2196
|
+
*
|
|
2197
|
+
* Be sure to invoke the function with the iterable as context:
|
|
2198
|
+
*
|
|
2199
|
+
* var iteratorFn = getIteratorFn(myIterable);
|
|
2200
|
+
* if (iteratorFn) {
|
|
2201
|
+
* var iterator = iteratorFn.call(myIterable);
|
|
2202
|
+
* ...
|
|
2203
|
+
* }
|
|
2204
|
+
*
|
|
2205
|
+
* @param {?object} maybeIterable
|
|
2206
|
+
* @return {?function}
|
|
2207
|
+
*/
|
|
2208
|
+
function getIteratorFn(maybeIterable) {
|
|
2209
|
+
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
2210
|
+
if (typeof iteratorFn === 'function') {
|
|
2211
|
+
return iteratorFn;
|
|
2212
|
+
}
|
|
2213
|
+
}
|
|
2214
|
+
|
|
2215
|
+
module.exports = getIteratorFn;
|
|
2216
|
+
},{}],22:[function(_dereq_,module,exports){
|
|
2217
|
+
/**
|
|
2218
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
2219
|
+
* All rights reserved.
|
|
2220
|
+
*
|
|
2221
|
+
* This source code is licensed under the BSD-style license found in the
|
|
2222
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
2223
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2224
|
+
*
|
|
2225
|
+
*
|
|
2226
|
+
*/
|
|
2227
|
+
|
|
2228
|
+
'use strict';
|
|
2229
|
+
|
|
2230
|
+
var nextDebugID = 1;
|
|
2231
|
+
|
|
2232
|
+
function getNextDebugID() {
|
|
2233
|
+
return nextDebugID++;
|
|
2234
|
+
}
|
|
2657
2235
|
|
|
2658
|
-
module.exports =
|
|
2659
|
-
},{
|
|
2236
|
+
module.exports = getNextDebugID;
|
|
2237
|
+
},{}],23:[function(_dereq_,module,exports){
|
|
2660
2238
|
/**
|
|
2661
|
-
* Copyright
|
|
2239
|
+
* Copyright 2014-2015, Facebook, Inc.
|
|
2662
2240
|
* All rights reserved.
|
|
2663
2241
|
*
|
|
2664
2242
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -2669,27 +2247,59 @@ module.exports = ReactPureComponent;
|
|
|
2669
2247
|
|
|
2670
2248
|
'use strict';
|
|
2671
2249
|
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2250
|
+
/**
|
|
2251
|
+
* Forked from fbjs/warning:
|
|
2252
|
+
* https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
|
|
2253
|
+
*
|
|
2254
|
+
* Only change is we use console.warn instead of console.error,
|
|
2255
|
+
* and do nothing when 'console' is not supported.
|
|
2256
|
+
* This really simplifies the code.
|
|
2257
|
+
* ---
|
|
2258
|
+
* Similar to invariant but only logs a warning if the condition is not met.
|
|
2259
|
+
* This can be used to log issues in development environments in critical
|
|
2260
|
+
* paths. Removing the logging code for production environments will keep the
|
|
2261
|
+
* same logic and follow the same code paths.
|
|
2262
|
+
*/
|
|
2675
2263
|
|
|
2676
|
-
|
|
2677
|
-
var ReactUMDEntry = _assign(React, {
|
|
2678
|
-
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
|
|
2679
|
-
ReactCurrentOwner: _dereq_(8)
|
|
2680
|
-
}
|
|
2681
|
-
});
|
|
2264
|
+
var lowPriorityWarning = function () {};
|
|
2682
2265
|
|
|
2683
2266
|
if ("development" !== 'production') {
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2267
|
+
var printWarning = function (format) {
|
|
2268
|
+
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
2269
|
+
args[_key - 1] = arguments[_key];
|
|
2270
|
+
}
|
|
2271
|
+
|
|
2272
|
+
var argIndex = 0;
|
|
2273
|
+
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
|
2274
|
+
return args[argIndex++];
|
|
2275
|
+
});
|
|
2276
|
+
if (typeof console !== 'undefined') {
|
|
2277
|
+
console.warn(message);
|
|
2278
|
+
}
|
|
2279
|
+
try {
|
|
2280
|
+
// --- Welcome to debugging React ---
|
|
2281
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
2282
|
+
// to find the callsite that caused this warning to fire.
|
|
2283
|
+
throw new Error(message);
|
|
2284
|
+
} catch (x) {}
|
|
2285
|
+
};
|
|
2286
|
+
|
|
2287
|
+
lowPriorityWarning = function (condition, format) {
|
|
2288
|
+
if (format === undefined) {
|
|
2289
|
+
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
|
2290
|
+
}
|
|
2291
|
+
if (!condition) {
|
|
2292
|
+
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
|
2293
|
+
args[_key2 - 2] = arguments[_key2];
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2296
|
+
printWarning.apply(undefined, [format].concat(args));
|
|
2297
|
+
}
|
|
2298
|
+
};
|
|
2689
2299
|
}
|
|
2690
2300
|
|
|
2691
|
-
module.exports =
|
|
2692
|
-
},{
|
|
2301
|
+
module.exports = lowPriorityWarning;
|
|
2302
|
+
},{}],24:[function(_dereq_,module,exports){
|
|
2693
2303
|
/**
|
|
2694
2304
|
* Copyright 2013-present, Facebook, Inc.
|
|
2695
2305
|
* All rights reserved.
|
|
@@ -2699,13 +2309,37 @@ module.exports = ReactUMDEntry;
|
|
|
2699
2309
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2700
2310
|
*
|
|
2701
2311
|
*/
|
|
2702
|
-
|
|
2703
2312
|
'use strict';
|
|
2704
2313
|
|
|
2705
|
-
|
|
2706
|
-
|
|
2314
|
+
var _prodInvariant = _dereq_(25);
|
|
2315
|
+
|
|
2316
|
+
var ReactElement = _dereq_(9);
|
|
2317
|
+
|
|
2318
|
+
var invariant = _dereq_(30);
|
|
2319
|
+
|
|
2707
2320
|
/**
|
|
2708
|
-
*
|
|
2321
|
+
* Returns the first child in a collection of children and verifies that there
|
|
2322
|
+
* is only one child in the collection.
|
|
2323
|
+
*
|
|
2324
|
+
* See https://facebook.github.io/react/docs/top-level-api.html#react.children.only
|
|
2325
|
+
*
|
|
2326
|
+
* The current implementation of this function assumes that a single child gets
|
|
2327
|
+
* passed without a wrapper, but the purpose of this helper function is to
|
|
2328
|
+
* abstract away the particular structure of children.
|
|
2329
|
+
*
|
|
2330
|
+
* @param {?object} children Child collection structure.
|
|
2331
|
+
* @return {ReactElement} The first and only `ReactElement` contained in the
|
|
2332
|
+
* structure.
|
|
2333
|
+
*/
|
|
2334
|
+
function onlyChild(children) {
|
|
2335
|
+
!ReactElement.isValidElement(children) ? "development" !== 'production' ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0;
|
|
2336
|
+
return children;
|
|
2337
|
+
}
|
|
2338
|
+
|
|
2339
|
+
module.exports = onlyChild;
|
|
2340
|
+
},{"25":25,"30":30,"9":9}],25:[function(_dereq_,module,exports){
|
|
2341
|
+
/**
|
|
2342
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
2709
2343
|
* All rights reserved.
|
|
2710
2344
|
*
|
|
2711
2345
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -2714,23 +2348,35 @@ module.exports = '15.5.3';
|
|
|
2714
2348
|
*
|
|
2715
2349
|
*
|
|
2716
2350
|
*/
|
|
2717
|
-
|
|
2718
2351
|
'use strict';
|
|
2719
2352
|
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2353
|
+
/**
|
|
2354
|
+
* WARNING: DO NOT manually require this module.
|
|
2355
|
+
* This is a replacement for `invariant(...)` used by the error code system
|
|
2356
|
+
* and will _only_ be required by the corresponding babel pass.
|
|
2357
|
+
* It always throws.
|
|
2358
|
+
*/
|
|
2359
|
+
|
|
2360
|
+
function reactProdInvariant(code) {
|
|
2361
|
+
var argCount = arguments.length - 1;
|
|
2362
|
+
|
|
2363
|
+
var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
|
|
2364
|
+
|
|
2365
|
+
for (var argIdx = 0; argIdx < argCount; argIdx++) {
|
|
2366
|
+
message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
|
|
2728
2367
|
}
|
|
2368
|
+
|
|
2369
|
+
message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
|
|
2370
|
+
|
|
2371
|
+
var error = new Error(message);
|
|
2372
|
+
error.name = 'Invariant Violation';
|
|
2373
|
+
error.framesToPop = 1; // we don't care about reactProdInvariant's own frame
|
|
2374
|
+
|
|
2375
|
+
throw error;
|
|
2729
2376
|
}
|
|
2730
2377
|
|
|
2731
|
-
module.exports =
|
|
2732
|
-
},{}],
|
|
2733
|
-
(function (process){
|
|
2378
|
+
module.exports = reactProdInvariant;
|
|
2379
|
+
},{}],26:[function(_dereq_,module,exports){
|
|
2734
2380
|
/**
|
|
2735
2381
|
* Copyright 2013-present, Facebook, Inc.
|
|
2736
2382
|
* All rights reserved.
|
|
@@ -2745,121 +2391,168 @@ module.exports = canDefineProperty;
|
|
|
2745
2391
|
|
|
2746
2392
|
var _prodInvariant = _dereq_(25);
|
|
2747
2393
|
|
|
2748
|
-
var
|
|
2749
|
-
var
|
|
2394
|
+
var ReactCurrentOwner = _dereq_(7);
|
|
2395
|
+
var REACT_ELEMENT_TYPE = _dereq_(10);
|
|
2750
2396
|
|
|
2751
|
-
var
|
|
2752
|
-
var
|
|
2397
|
+
var getIteratorFn = _dereq_(21);
|
|
2398
|
+
var invariant = _dereq_(30);
|
|
2399
|
+
var KeyEscapeUtils = _dereq_(1);
|
|
2400
|
+
var warning = _dereq_(31);
|
|
2753
2401
|
|
|
2754
|
-
var
|
|
2402
|
+
var SEPARATOR = '.';
|
|
2403
|
+
var SUBSEPARATOR = ':';
|
|
2755
2404
|
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
// https://github.com/facebook/react/pull/7178
|
|
2762
|
-
ReactComponentTreeHook = _dereq_(7);
|
|
2763
|
-
}
|
|
2405
|
+
/**
|
|
2406
|
+
* This is inlined from ReactElement since this file is shared between
|
|
2407
|
+
* isomorphic and renderers. We could extract this to a
|
|
2408
|
+
*
|
|
2409
|
+
*/
|
|
2764
2410
|
|
|
2765
|
-
|
|
2411
|
+
/**
|
|
2412
|
+
* TODO: Test that a single child and an array with one item have the same key
|
|
2413
|
+
* pattern.
|
|
2414
|
+
*/
|
|
2415
|
+
|
|
2416
|
+
var didWarnAboutMaps = false;
|
|
2766
2417
|
|
|
2767
2418
|
/**
|
|
2768
|
-
*
|
|
2769
|
-
* Error messages are memorized and will only be shown once.
|
|
2419
|
+
* Generate a key string that identifies a component within a set.
|
|
2770
2420
|
*
|
|
2771
|
-
* @param {
|
|
2772
|
-
* @param {
|
|
2773
|
-
* @
|
|
2774
|
-
* @param {string} componentName Name of the component for error messages.
|
|
2775
|
-
* @param {?object} element The React element that is being type-checked
|
|
2776
|
-
* @param {?number} debugID The React component instance that is being type-checked
|
|
2777
|
-
* @private
|
|
2421
|
+
* @param {*} component A component that could contain a manual key.
|
|
2422
|
+
* @param {number} index Index that is used if a manual key is not provided.
|
|
2423
|
+
* @return {string}
|
|
2778
2424
|
*/
|
|
2779
|
-
function
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
!(typeof typeSpecs[typeSpecName] === 'function') ? "development" !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0;
|
|
2790
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
2791
|
-
} catch (ex) {
|
|
2792
|
-
error = ex;
|
|
2793
|
-
}
|
|
2794
|
-
"development" !== 'production' ? warning(!error || error 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).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0;
|
|
2795
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
2796
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
2797
|
-
// same error.
|
|
2798
|
-
loggedTypeFailures[error.message] = true;
|
|
2425
|
+
function getComponentKey(component, index) {
|
|
2426
|
+
// Do some typechecking here since we call this blindly. We want to ensure
|
|
2427
|
+
// that we don't block potential future ES APIs.
|
|
2428
|
+
if (component && typeof component === 'object' && component.key != null) {
|
|
2429
|
+
// Explicit key
|
|
2430
|
+
return KeyEscapeUtils.escape(component.key);
|
|
2431
|
+
}
|
|
2432
|
+
// Implicit key determined by the index in the set
|
|
2433
|
+
return index.toString(36);
|
|
2434
|
+
}
|
|
2799
2435
|
|
|
2800
|
-
|
|
2436
|
+
/**
|
|
2437
|
+
* @param {?*} children Children tree container.
|
|
2438
|
+
* @param {!string} nameSoFar Name of the key path so far.
|
|
2439
|
+
* @param {!function} callback Callback to invoke with each child found.
|
|
2440
|
+
* @param {?*} traverseContext Used to pass information throughout the traversal
|
|
2441
|
+
* process.
|
|
2442
|
+
* @return {!number} The number of children in this subtree.
|
|
2443
|
+
*/
|
|
2444
|
+
function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
|
|
2445
|
+
var type = typeof children;
|
|
2446
|
+
|
|
2447
|
+
if (type === 'undefined' || type === 'boolean') {
|
|
2448
|
+
// All of the above are perceived as null.
|
|
2449
|
+
children = null;
|
|
2450
|
+
}
|
|
2451
|
+
|
|
2452
|
+
if (children === null || type === 'string' || type === 'number' ||
|
|
2453
|
+
// The following is inlined from ReactElement. This means we can optimize
|
|
2454
|
+
// some checks. React Fiber also inlines this logic for similar purposes.
|
|
2455
|
+
type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
|
|
2456
|
+
callback(traverseContext, children,
|
|
2457
|
+
// If it's the only child, treat the name as if it was wrapped in an array
|
|
2458
|
+
// so that it's consistent if the number of children grows.
|
|
2459
|
+
nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
|
|
2460
|
+
return 1;
|
|
2461
|
+
}
|
|
2462
|
+
|
|
2463
|
+
var child;
|
|
2464
|
+
var nextName;
|
|
2465
|
+
var subtreeCount = 0; // Count of children found in the current subtree.
|
|
2466
|
+
var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
|
|
2801
2467
|
|
|
2468
|
+
if (Array.isArray(children)) {
|
|
2469
|
+
for (var i = 0; i < children.length; i++) {
|
|
2470
|
+
child = children[i];
|
|
2471
|
+
nextName = nextNamePrefix + getComponentKey(child, i);
|
|
2472
|
+
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
|
2473
|
+
}
|
|
2474
|
+
} else {
|
|
2475
|
+
var iteratorFn = getIteratorFn(children);
|
|
2476
|
+
if (iteratorFn) {
|
|
2477
|
+
var iterator = iteratorFn.call(children);
|
|
2478
|
+
var step;
|
|
2479
|
+
if (iteratorFn !== children.entries) {
|
|
2480
|
+
var ii = 0;
|
|
2481
|
+
while (!(step = iterator.next()).done) {
|
|
2482
|
+
child = step.value;
|
|
2483
|
+
nextName = nextNamePrefix + getComponentKey(child, ii++);
|
|
2484
|
+
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
|
2485
|
+
}
|
|
2486
|
+
} else {
|
|
2802
2487
|
if ("development" !== 'production') {
|
|
2803
|
-
|
|
2804
|
-
|
|
2488
|
+
var mapsAsChildrenAddendum = '';
|
|
2489
|
+
if (ReactCurrentOwner.current) {
|
|
2490
|
+
var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
|
|
2491
|
+
if (mapsAsChildrenOwnerName) {
|
|
2492
|
+
mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
|
|
2493
|
+
}
|
|
2805
2494
|
}
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2495
|
+
"development" !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;
|
|
2496
|
+
didWarnAboutMaps = true;
|
|
2497
|
+
}
|
|
2498
|
+
// Iterator will provide entry [k,v] tuples rather than values.
|
|
2499
|
+
while (!(step = iterator.next()).done) {
|
|
2500
|
+
var entry = step.value;
|
|
2501
|
+
if (entry) {
|
|
2502
|
+
child = entry[1];
|
|
2503
|
+
nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
|
|
2504
|
+
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
|
2505
|
+
}
|
|
2506
|
+
}
|
|
2507
|
+
}
|
|
2508
|
+
} else if (type === 'object') {
|
|
2509
|
+
var addendum = '';
|
|
2510
|
+
if ("development" !== 'production') {
|
|
2511
|
+
addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
|
|
2512
|
+
if (children._isReactElement) {
|
|
2513
|
+
addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.';
|
|
2514
|
+
}
|
|
2515
|
+
if (ReactCurrentOwner.current) {
|
|
2516
|
+
var name = ReactCurrentOwner.current.getName();
|
|
2517
|
+
if (name) {
|
|
2518
|
+
addendum += ' Check the render method of `' + name + '`.';
|
|
2810
2519
|
}
|
|
2811
2520
|
}
|
|
2812
|
-
|
|
2813
|
-
"development" !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
|
|
2814
2521
|
}
|
|
2522
|
+
var childrenString = String(children);
|
|
2523
|
+
!false ? "development" !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;
|
|
2815
2524
|
}
|
|
2816
2525
|
}
|
|
2817
|
-
}
|
|
2818
|
-
|
|
2819
|
-
module.exports = checkReactTypeSpec;
|
|
2820
|
-
}).call(this,undefined)
|
|
2821
|
-
},{"14":14,"16":16,"25":25,"29":29,"30":30,"7":7}],22:[function(_dereq_,module,exports){
|
|
2822
|
-
/**
|
|
2823
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
2824
|
-
* All rights reserved.
|
|
2825
|
-
*
|
|
2826
|
-
* This source code is licensed under the BSD-style license found in the
|
|
2827
|
-
* LICENSE file in the root directory of this source tree. An additional grant
|
|
2828
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2829
|
-
*
|
|
2830
|
-
*
|
|
2831
|
-
*/
|
|
2832
|
-
|
|
2833
|
-
'use strict';
|
|
2834
|
-
|
|
2835
|
-
/* global Symbol */
|
|
2836
2526
|
|
|
2837
|
-
|
|
2838
|
-
|
|
2527
|
+
return subtreeCount;
|
|
2528
|
+
}
|
|
2839
2529
|
|
|
2840
2530
|
/**
|
|
2841
|
-
*
|
|
2531
|
+
* Traverses children that are typically specified as `props.children`, but
|
|
2532
|
+
* might also be specified through attributes:
|
|
2842
2533
|
*
|
|
2843
|
-
*
|
|
2534
|
+
* - `traverseAllChildren(this.props.children, ...)`
|
|
2535
|
+
* - `traverseAllChildren(this.props.leftPanelChildren, ...)`
|
|
2844
2536
|
*
|
|
2845
|
-
*
|
|
2846
|
-
*
|
|
2847
|
-
*
|
|
2848
|
-
* ...
|
|
2849
|
-
* }
|
|
2537
|
+
* The `traverseContext` is an optional argument that is passed through the
|
|
2538
|
+
* entire traversal. It can be used to store accumulations or anything else that
|
|
2539
|
+
* the callback might find relevant.
|
|
2850
2540
|
*
|
|
2851
|
-
* @param {
|
|
2852
|
-
* @
|
|
2541
|
+
* @param {?*} children Children tree object.
|
|
2542
|
+
* @param {!function} callback To invoke upon traversing each child.
|
|
2543
|
+
* @param {?*} traverseContext Context for traversal.
|
|
2544
|
+
* @return {!number} The number of children in this subtree.
|
|
2853
2545
|
*/
|
|
2854
|
-
function
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
return iteratorFn;
|
|
2546
|
+
function traverseAllChildren(children, callback, traverseContext) {
|
|
2547
|
+
if (children == null) {
|
|
2548
|
+
return 0;
|
|
2858
2549
|
}
|
|
2550
|
+
|
|
2551
|
+
return traverseAllChildrenImpl(children, '', callback, traverseContext);
|
|
2859
2552
|
}
|
|
2860
2553
|
|
|
2861
|
-
module.exports =
|
|
2862
|
-
},{}],
|
|
2554
|
+
module.exports = traverseAllChildren;
|
|
2555
|
+
},{"1":1,"10":10,"21":21,"25":25,"30":30,"31":31,"7":7}],27:[function(_dereq_,module,exports){
|
|
2863
2556
|
/**
|
|
2864
2557
|
* Copyright 2013-present, Facebook, Inc.
|
|
2865
2558
|
* All rights reserved.
|
|
@@ -2868,272 +2561,872 @@ module.exports = getIteratorFn;
|
|
|
2868
2561
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
2869
2562
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2870
2563
|
*
|
|
2871
|
-
*
|
|
2872
2564
|
*/
|
|
2873
2565
|
|
|
2874
2566
|
'use strict';
|
|
2875
2567
|
|
|
2876
|
-
var
|
|
2568
|
+
var _assign = _dereq_(32);
|
|
2877
2569
|
|
|
2878
|
-
|
|
2879
|
-
|
|
2570
|
+
var emptyObject = _dereq_(29);
|
|
2571
|
+
var _invariant = _dereq_(30);
|
|
2572
|
+
|
|
2573
|
+
if ("development" !== 'production') {
|
|
2574
|
+
var warning = _dereq_(31);
|
|
2880
2575
|
}
|
|
2881
2576
|
|
|
2882
|
-
|
|
2883
|
-
},{}],24:[function(_dereq_,module,exports){
|
|
2884
|
-
/**
|
|
2885
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
2886
|
-
* All rights reserved.
|
|
2887
|
-
*
|
|
2888
|
-
* This source code is licensed under the BSD-style license found in the
|
|
2889
|
-
* LICENSE file in the root directory of this source tree. An additional grant
|
|
2890
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2891
|
-
*
|
|
2892
|
-
*/
|
|
2893
|
-
'use strict';
|
|
2577
|
+
var MIXINS_KEY = 'mixins';
|
|
2894
2578
|
|
|
2895
|
-
|
|
2579
|
+
// Helper function to allow the creation of anonymous functions which do not
|
|
2580
|
+
// have .name set to the name of the variable being assigned to.
|
|
2581
|
+
function identity(fn) {
|
|
2582
|
+
return fn;
|
|
2583
|
+
}
|
|
2896
2584
|
|
|
2897
|
-
var
|
|
2585
|
+
var ReactPropTypeLocationNames;
|
|
2586
|
+
if ("development" !== 'production') {
|
|
2587
|
+
ReactPropTypeLocationNames = {
|
|
2588
|
+
prop: 'prop',
|
|
2589
|
+
context: 'context',
|
|
2590
|
+
childContext: 'child context'
|
|
2591
|
+
};
|
|
2592
|
+
} else {
|
|
2593
|
+
ReactPropTypeLocationNames = {};
|
|
2594
|
+
}
|
|
2898
2595
|
|
|
2899
|
-
|
|
2596
|
+
function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
|
|
2597
|
+
/**
|
|
2598
|
+
* Policies that describe methods in `ReactClassInterface`.
|
|
2599
|
+
*/
|
|
2900
2600
|
|
|
2901
|
-
|
|
2902
|
-
* Returns the first child in a collection of children and verifies that there
|
|
2903
|
-
* is only one child in the collection.
|
|
2904
|
-
*
|
|
2905
|
-
* See https://facebook.github.io/react/docs/top-level-api.html#react.children.only
|
|
2906
|
-
*
|
|
2907
|
-
* The current implementation of this function assumes that a single child gets
|
|
2908
|
-
* passed without a wrapper, but the purpose of this helper function is to
|
|
2909
|
-
* abstract away the particular structure of children.
|
|
2910
|
-
*
|
|
2911
|
-
* @param {?object} children Child collection structure.
|
|
2912
|
-
* @return {ReactElement} The first and only `ReactElement` contained in the
|
|
2913
|
-
* structure.
|
|
2914
|
-
*/
|
|
2915
|
-
function onlyChild(children) {
|
|
2916
|
-
!ReactElement.isValidElement(children) ? "development" !== 'production' ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0;
|
|
2917
|
-
return children;
|
|
2918
|
-
}
|
|
2601
|
+
var injectedMixins = [];
|
|
2919
2602
|
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2603
|
+
/**
|
|
2604
|
+
* Composite components are higher-level components that compose other composite
|
|
2605
|
+
* or host components.
|
|
2606
|
+
*
|
|
2607
|
+
* To create a new type of `ReactClass`, pass a specification of
|
|
2608
|
+
* your new class to `React.createClass`. The only requirement of your class
|
|
2609
|
+
* specification is that you implement a `render` method.
|
|
2610
|
+
*
|
|
2611
|
+
* var MyComponent = React.createClass({
|
|
2612
|
+
* render: function() {
|
|
2613
|
+
* return <div>Hello World</div>;
|
|
2614
|
+
* }
|
|
2615
|
+
* });
|
|
2616
|
+
*
|
|
2617
|
+
* The class specification supports a specific protocol of methods that have
|
|
2618
|
+
* special meaning (e.g. `render`). See `ReactClassInterface` for
|
|
2619
|
+
* more the comprehensive protocol. Any other properties and methods in the
|
|
2620
|
+
* class specification will be available on the prototype.
|
|
2621
|
+
*
|
|
2622
|
+
* @interface ReactClassInterface
|
|
2623
|
+
* @internal
|
|
2624
|
+
*/
|
|
2625
|
+
var ReactClassInterface = {
|
|
2626
|
+
/**
|
|
2627
|
+
* An array of Mixin objects to include when defining your component.
|
|
2628
|
+
*
|
|
2629
|
+
* @type {array}
|
|
2630
|
+
* @optional
|
|
2631
|
+
*/
|
|
2632
|
+
mixins: 'DEFINE_MANY',
|
|
2633
|
+
|
|
2634
|
+
/**
|
|
2635
|
+
* An object containing properties and methods that should be defined on
|
|
2636
|
+
* the component's constructor instead of its prototype (static methods).
|
|
2637
|
+
*
|
|
2638
|
+
* @type {object}
|
|
2639
|
+
* @optional
|
|
2640
|
+
*/
|
|
2641
|
+
statics: 'DEFINE_MANY',
|
|
2642
|
+
|
|
2643
|
+
/**
|
|
2644
|
+
* Definition of prop types for this component.
|
|
2645
|
+
*
|
|
2646
|
+
* @type {object}
|
|
2647
|
+
* @optional
|
|
2648
|
+
*/
|
|
2649
|
+
propTypes: 'DEFINE_MANY',
|
|
2650
|
+
|
|
2651
|
+
/**
|
|
2652
|
+
* Definition of context types for this component.
|
|
2653
|
+
*
|
|
2654
|
+
* @type {object}
|
|
2655
|
+
* @optional
|
|
2656
|
+
*/
|
|
2657
|
+
contextTypes: 'DEFINE_MANY',
|
|
2658
|
+
|
|
2659
|
+
/**
|
|
2660
|
+
* Definition of context types this component sets for its children.
|
|
2661
|
+
*
|
|
2662
|
+
* @type {object}
|
|
2663
|
+
* @optional
|
|
2664
|
+
*/
|
|
2665
|
+
childContextTypes: 'DEFINE_MANY',
|
|
2666
|
+
|
|
2667
|
+
// ==== Definition methods ====
|
|
2668
|
+
|
|
2669
|
+
/**
|
|
2670
|
+
* Invoked when the component is mounted. Values in the mapping will be set on
|
|
2671
|
+
* `this.props` if that prop is not specified (i.e. using an `in` check).
|
|
2672
|
+
*
|
|
2673
|
+
* This method is invoked before `getInitialState` and therefore cannot rely
|
|
2674
|
+
* on `this.state` or use `this.setState`.
|
|
2675
|
+
*
|
|
2676
|
+
* @return {object}
|
|
2677
|
+
* @optional
|
|
2678
|
+
*/
|
|
2679
|
+
getDefaultProps: 'DEFINE_MANY_MERGED',
|
|
2680
|
+
|
|
2681
|
+
/**
|
|
2682
|
+
* Invoked once before the component is mounted. The return value will be used
|
|
2683
|
+
* as the initial value of `this.state`.
|
|
2684
|
+
*
|
|
2685
|
+
* getInitialState: function() {
|
|
2686
|
+
* return {
|
|
2687
|
+
* isOn: false,
|
|
2688
|
+
* fooBaz: new BazFoo()
|
|
2689
|
+
* }
|
|
2690
|
+
* }
|
|
2691
|
+
*
|
|
2692
|
+
* @return {object}
|
|
2693
|
+
* @optional
|
|
2694
|
+
*/
|
|
2695
|
+
getInitialState: 'DEFINE_MANY_MERGED',
|
|
2696
|
+
|
|
2697
|
+
/**
|
|
2698
|
+
* @return {object}
|
|
2699
|
+
* @optional
|
|
2700
|
+
*/
|
|
2701
|
+
getChildContext: 'DEFINE_MANY_MERGED',
|
|
2702
|
+
|
|
2703
|
+
/**
|
|
2704
|
+
* Uses props from `this.props` and state from `this.state` to render the
|
|
2705
|
+
* structure of the component.
|
|
2706
|
+
*
|
|
2707
|
+
* No guarantees are made about when or how often this method is invoked, so
|
|
2708
|
+
* it must not have side effects.
|
|
2709
|
+
*
|
|
2710
|
+
* render: function() {
|
|
2711
|
+
* var name = this.props.name;
|
|
2712
|
+
* return <div>Hello, {name}!</div>;
|
|
2713
|
+
* }
|
|
2714
|
+
*
|
|
2715
|
+
* @return {ReactComponent}
|
|
2716
|
+
* @required
|
|
2717
|
+
*/
|
|
2718
|
+
render: 'DEFINE_ONCE',
|
|
2719
|
+
|
|
2720
|
+
// ==== Delegate methods ====
|
|
2721
|
+
|
|
2722
|
+
/**
|
|
2723
|
+
* Invoked when the component is initially created and about to be mounted.
|
|
2724
|
+
* This may have side effects, but any external subscriptions or data created
|
|
2725
|
+
* by this method must be cleaned up in `componentWillUnmount`.
|
|
2726
|
+
*
|
|
2727
|
+
* @optional
|
|
2728
|
+
*/
|
|
2729
|
+
componentWillMount: 'DEFINE_MANY',
|
|
2730
|
+
|
|
2731
|
+
/**
|
|
2732
|
+
* Invoked when the component has been mounted and has a DOM representation.
|
|
2733
|
+
* However, there is no guarantee that the DOM node is in the document.
|
|
2734
|
+
*
|
|
2735
|
+
* Use this as an opportunity to operate on the DOM when the component has
|
|
2736
|
+
* been mounted (initialized and rendered) for the first time.
|
|
2737
|
+
*
|
|
2738
|
+
* @param {DOMElement} rootNode DOM element representing the component.
|
|
2739
|
+
* @optional
|
|
2740
|
+
*/
|
|
2741
|
+
componentDidMount: 'DEFINE_MANY',
|
|
2742
|
+
|
|
2743
|
+
/**
|
|
2744
|
+
* Invoked before the component receives new props.
|
|
2745
|
+
*
|
|
2746
|
+
* Use this as an opportunity to react to a prop transition by updating the
|
|
2747
|
+
* state using `this.setState`. Current props are accessed via `this.props`.
|
|
2748
|
+
*
|
|
2749
|
+
* componentWillReceiveProps: function(nextProps, nextContext) {
|
|
2750
|
+
* this.setState({
|
|
2751
|
+
* likesIncreasing: nextProps.likeCount > this.props.likeCount
|
|
2752
|
+
* });
|
|
2753
|
+
* }
|
|
2754
|
+
*
|
|
2755
|
+
* NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
|
|
2756
|
+
* transition may cause a state change, but the opposite is not true. If you
|
|
2757
|
+
* need it, you are probably looking for `componentWillUpdate`.
|
|
2758
|
+
*
|
|
2759
|
+
* @param {object} nextProps
|
|
2760
|
+
* @optional
|
|
2761
|
+
*/
|
|
2762
|
+
componentWillReceiveProps: 'DEFINE_MANY',
|
|
2763
|
+
|
|
2764
|
+
/**
|
|
2765
|
+
* Invoked while deciding if the component should be updated as a result of
|
|
2766
|
+
* receiving new props, state and/or context.
|
|
2767
|
+
*
|
|
2768
|
+
* Use this as an opportunity to `return false` when you're certain that the
|
|
2769
|
+
* transition to the new props/state/context will not require a component
|
|
2770
|
+
* update.
|
|
2771
|
+
*
|
|
2772
|
+
* shouldComponentUpdate: function(nextProps, nextState, nextContext) {
|
|
2773
|
+
* return !equal(nextProps, this.props) ||
|
|
2774
|
+
* !equal(nextState, this.state) ||
|
|
2775
|
+
* !equal(nextContext, this.context);
|
|
2776
|
+
* }
|
|
2777
|
+
*
|
|
2778
|
+
* @param {object} nextProps
|
|
2779
|
+
* @param {?object} nextState
|
|
2780
|
+
* @param {?object} nextContext
|
|
2781
|
+
* @return {boolean} True if the component should update.
|
|
2782
|
+
* @optional
|
|
2783
|
+
*/
|
|
2784
|
+
shouldComponentUpdate: 'DEFINE_ONCE',
|
|
2785
|
+
|
|
2786
|
+
/**
|
|
2787
|
+
* Invoked when the component is about to update due to a transition from
|
|
2788
|
+
* `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
|
|
2789
|
+
* and `nextContext`.
|
|
2790
|
+
*
|
|
2791
|
+
* Use this as an opportunity to perform preparation before an update occurs.
|
|
2792
|
+
*
|
|
2793
|
+
* NOTE: You **cannot** use `this.setState()` in this method.
|
|
2794
|
+
*
|
|
2795
|
+
* @param {object} nextProps
|
|
2796
|
+
* @param {?object} nextState
|
|
2797
|
+
* @param {?object} nextContext
|
|
2798
|
+
* @param {ReactReconcileTransaction} transaction
|
|
2799
|
+
* @optional
|
|
2800
|
+
*/
|
|
2801
|
+
componentWillUpdate: 'DEFINE_MANY',
|
|
2802
|
+
|
|
2803
|
+
/**
|
|
2804
|
+
* Invoked when the component's DOM representation has been updated.
|
|
2805
|
+
*
|
|
2806
|
+
* Use this as an opportunity to operate on the DOM when the component has
|
|
2807
|
+
* been updated.
|
|
2808
|
+
*
|
|
2809
|
+
* @param {object} prevProps
|
|
2810
|
+
* @param {?object} prevState
|
|
2811
|
+
* @param {?object} prevContext
|
|
2812
|
+
* @param {DOMElement} rootNode DOM element representing the component.
|
|
2813
|
+
* @optional
|
|
2814
|
+
*/
|
|
2815
|
+
componentDidUpdate: 'DEFINE_MANY',
|
|
2816
|
+
|
|
2817
|
+
/**
|
|
2818
|
+
* Invoked when the component is about to be removed from its parent and have
|
|
2819
|
+
* its DOM representation destroyed.
|
|
2820
|
+
*
|
|
2821
|
+
* Use this as an opportunity to deallocate any external resources.
|
|
2822
|
+
*
|
|
2823
|
+
* NOTE: There is no `componentDidUnmount` since your component will have been
|
|
2824
|
+
* destroyed by that point.
|
|
2825
|
+
*
|
|
2826
|
+
* @optional
|
|
2827
|
+
*/
|
|
2828
|
+
componentWillUnmount: 'DEFINE_MANY',
|
|
2829
|
+
|
|
2830
|
+
// ==== Advanced methods ====
|
|
2831
|
+
|
|
2832
|
+
/**
|
|
2833
|
+
* Updates the component's currently mounted DOM representation.
|
|
2834
|
+
*
|
|
2835
|
+
* By default, this implements React's rendering and reconciliation algorithm.
|
|
2836
|
+
* Sophisticated clients may wish to override this.
|
|
2837
|
+
*
|
|
2838
|
+
* @param {ReactReconcileTransaction} transaction
|
|
2839
|
+
* @internal
|
|
2840
|
+
* @overridable
|
|
2841
|
+
*/
|
|
2842
|
+
updateComponent: 'OVERRIDE_BASE'
|
|
2843
|
+
};
|
|
2933
2844
|
|
|
2934
|
-
/**
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2845
|
+
/**
|
|
2846
|
+
* Mapping from class specification keys to special processing functions.
|
|
2847
|
+
*
|
|
2848
|
+
* Although these are declared like instance properties in the specification
|
|
2849
|
+
* when defining classes using `React.createClass`, they are actually static
|
|
2850
|
+
* and are accessible on the constructor instead of the prototype. Despite
|
|
2851
|
+
* being static, they must be defined outside of the "statics" key under
|
|
2852
|
+
* which all other static methods are defined.
|
|
2853
|
+
*/
|
|
2854
|
+
var RESERVED_SPEC_KEYS = {
|
|
2855
|
+
displayName: function(Constructor, displayName) {
|
|
2856
|
+
Constructor.displayName = displayName;
|
|
2857
|
+
},
|
|
2858
|
+
mixins: function(Constructor, mixins) {
|
|
2859
|
+
if (mixins) {
|
|
2860
|
+
for (var i = 0; i < mixins.length; i++) {
|
|
2861
|
+
mixSpecIntoComponent(Constructor, mixins[i]);
|
|
2862
|
+
}
|
|
2863
|
+
}
|
|
2864
|
+
},
|
|
2865
|
+
childContextTypes: function(Constructor, childContextTypes) {
|
|
2866
|
+
if ("development" !== 'production') {
|
|
2867
|
+
validateTypeDef(Constructor, childContextTypes, 'childContext');
|
|
2868
|
+
}
|
|
2869
|
+
Constructor.childContextTypes = _assign(
|
|
2870
|
+
{},
|
|
2871
|
+
Constructor.childContextTypes,
|
|
2872
|
+
childContextTypes
|
|
2873
|
+
);
|
|
2874
|
+
},
|
|
2875
|
+
contextTypes: function(Constructor, contextTypes) {
|
|
2876
|
+
if ("development" !== 'production') {
|
|
2877
|
+
validateTypeDef(Constructor, contextTypes, 'context');
|
|
2878
|
+
}
|
|
2879
|
+
Constructor.contextTypes = _assign(
|
|
2880
|
+
{},
|
|
2881
|
+
Constructor.contextTypes,
|
|
2882
|
+
contextTypes
|
|
2883
|
+
);
|
|
2884
|
+
},
|
|
2885
|
+
/**
|
|
2886
|
+
* Special case getDefaultProps which should move into statics but requires
|
|
2887
|
+
* automatic merging.
|
|
2888
|
+
*/
|
|
2889
|
+
getDefaultProps: function(Constructor, getDefaultProps) {
|
|
2890
|
+
if (Constructor.getDefaultProps) {
|
|
2891
|
+
Constructor.getDefaultProps = createMergedResultFunction(
|
|
2892
|
+
Constructor.getDefaultProps,
|
|
2893
|
+
getDefaultProps
|
|
2894
|
+
);
|
|
2895
|
+
} else {
|
|
2896
|
+
Constructor.getDefaultProps = getDefaultProps;
|
|
2897
|
+
}
|
|
2898
|
+
},
|
|
2899
|
+
propTypes: function(Constructor, propTypes) {
|
|
2900
|
+
if ("development" !== 'production') {
|
|
2901
|
+
validateTypeDef(Constructor, propTypes, 'prop');
|
|
2902
|
+
}
|
|
2903
|
+
Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
|
|
2904
|
+
},
|
|
2905
|
+
statics: function(Constructor, statics) {
|
|
2906
|
+
mixStaticSpecIntoComponent(Constructor, statics);
|
|
2907
|
+
},
|
|
2908
|
+
autobind: function() {}
|
|
2909
|
+
};
|
|
2940
2910
|
|
|
2941
|
-
function
|
|
2942
|
-
|
|
2911
|
+
function validateTypeDef(Constructor, typeDef, location) {
|
|
2912
|
+
for (var propName in typeDef) {
|
|
2913
|
+
if (typeDef.hasOwnProperty(propName)) {
|
|
2914
|
+
// use a warning instead of an _invariant so components
|
|
2915
|
+
// don't show up in prod but only in __DEV__
|
|
2916
|
+
if ("development" !== 'production') {
|
|
2917
|
+
warning(
|
|
2918
|
+
typeof typeDef[propName] === 'function',
|
|
2919
|
+
'%s: %s type `%s` is invalid; it must be a function, usually from ' +
|
|
2920
|
+
'React.PropTypes.',
|
|
2921
|
+
Constructor.displayName || 'ReactClass',
|
|
2922
|
+
ReactPropTypeLocationNames[location],
|
|
2923
|
+
propName
|
|
2924
|
+
);
|
|
2925
|
+
}
|
|
2926
|
+
}
|
|
2927
|
+
}
|
|
2928
|
+
}
|
|
2943
2929
|
|
|
2944
|
-
|
|
2930
|
+
function validateMethodOverride(isAlreadyDefined, name) {
|
|
2931
|
+
var specPolicy = ReactClassInterface.hasOwnProperty(name)
|
|
2932
|
+
? ReactClassInterface[name]
|
|
2933
|
+
: null;
|
|
2934
|
+
|
|
2935
|
+
// Disallow overriding of base class methods unless explicitly allowed.
|
|
2936
|
+
if (ReactClassMixin.hasOwnProperty(name)) {
|
|
2937
|
+
_invariant(
|
|
2938
|
+
specPolicy === 'OVERRIDE_BASE',
|
|
2939
|
+
'ReactClassInterface: You are attempting to override ' +
|
|
2940
|
+
'`%s` from your class specification. Ensure that your method names ' +
|
|
2941
|
+
'do not overlap with React methods.',
|
|
2942
|
+
name
|
|
2943
|
+
);
|
|
2944
|
+
}
|
|
2945
2945
|
|
|
2946
|
-
|
|
2947
|
-
|
|
2946
|
+
// Disallow defining methods more than once unless explicitly allowed.
|
|
2947
|
+
if (isAlreadyDefined) {
|
|
2948
|
+
_invariant(
|
|
2949
|
+
specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',
|
|
2950
|
+
'ReactClassInterface: You are attempting to define ' +
|
|
2951
|
+
'`%s` on your component more than once. This conflict may be due ' +
|
|
2952
|
+
'to a mixin.',
|
|
2953
|
+
name
|
|
2954
|
+
);
|
|
2955
|
+
}
|
|
2948
2956
|
}
|
|
2949
2957
|
|
|
2950
|
-
|
|
2958
|
+
/**
|
|
2959
|
+
* Mixin helper which handles policy validation and reserved
|
|
2960
|
+
* specification keys when building React classes.
|
|
2961
|
+
*/
|
|
2962
|
+
function mixSpecIntoComponent(Constructor, spec) {
|
|
2963
|
+
if (!spec) {
|
|
2964
|
+
if ("development" !== 'production') {
|
|
2965
|
+
var typeofSpec = typeof spec;
|
|
2966
|
+
var isMixinValid = typeofSpec === 'object' && spec !== null;
|
|
2951
2967
|
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2968
|
+
if ("development" !== 'production') {
|
|
2969
|
+
warning(
|
|
2970
|
+
isMixinValid,
|
|
2971
|
+
"%s: You're attempting to include a mixin that is either null " +
|
|
2972
|
+
'or not an object. Check the mixins included by the component, ' +
|
|
2973
|
+
'as well as any mixins they include themselves. ' +
|
|
2974
|
+
'Expected object but got %s.',
|
|
2975
|
+
Constructor.displayName || 'ReactClass',
|
|
2976
|
+
spec === null ? null : typeofSpec
|
|
2977
|
+
);
|
|
2978
|
+
}
|
|
2979
|
+
}
|
|
2955
2980
|
|
|
2956
|
-
|
|
2957
|
-
}
|
|
2981
|
+
return;
|
|
2982
|
+
}
|
|
2958
2983
|
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2984
|
+
_invariant(
|
|
2985
|
+
typeof spec !== 'function',
|
|
2986
|
+
"ReactClass: You're attempting to " +
|
|
2987
|
+
'use a component class or function as a mixin. Instead, just use a ' +
|
|
2988
|
+
'regular object.'
|
|
2989
|
+
);
|
|
2990
|
+
_invariant(
|
|
2991
|
+
!isValidElement(spec),
|
|
2992
|
+
"ReactClass: You're attempting to " +
|
|
2993
|
+
'use a component as a mixin. Instead, just use a regular object.'
|
|
2994
|
+
);
|
|
2995
|
+
|
|
2996
|
+
var proto = Constructor.prototype;
|
|
2997
|
+
var autoBindPairs = proto.__reactAutoBindPairs;
|
|
2998
|
+
|
|
2999
|
+
// By handling mixins before any other properties, we ensure the same
|
|
3000
|
+
// chaining order is applied to methods with DEFINE_MANY policy, whether
|
|
3001
|
+
// mixins are listed before or after these methods in the spec.
|
|
3002
|
+
if (spec.hasOwnProperty(MIXINS_KEY)) {
|
|
3003
|
+
RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
|
|
3004
|
+
}
|
|
3005
|
+
|
|
3006
|
+
for (var name in spec) {
|
|
3007
|
+
if (!spec.hasOwnProperty(name)) {
|
|
3008
|
+
continue;
|
|
3009
|
+
}
|
|
3010
|
+
|
|
3011
|
+
if (name === MIXINS_KEY) {
|
|
3012
|
+
// We have already handled mixins in a special case above.
|
|
3013
|
+
continue;
|
|
3014
|
+
}
|
|
3015
|
+
|
|
3016
|
+
var property = spec[name];
|
|
3017
|
+
var isAlreadyDefined = proto.hasOwnProperty(name);
|
|
3018
|
+
validateMethodOverride(isAlreadyDefined, name);
|
|
3019
|
+
|
|
3020
|
+
if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
|
|
3021
|
+
RESERVED_SPEC_KEYS[name](Constructor, property);
|
|
3022
|
+
} else {
|
|
3023
|
+
// Setup methods on prototype:
|
|
3024
|
+
// The following member methods should not be automatically bound:
|
|
3025
|
+
// 1. Expected ReactClass methods (in the "interface").
|
|
3026
|
+
// 2. Overridden methods (that were mixed in).
|
|
3027
|
+
var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
|
|
3028
|
+
var isFunction = typeof property === 'function';
|
|
3029
|
+
var shouldAutoBind =
|
|
3030
|
+
isFunction &&
|
|
3031
|
+
!isReactClassMethod &&
|
|
3032
|
+
!isAlreadyDefined &&
|
|
3033
|
+
spec.autobind !== false;
|
|
3034
|
+
|
|
3035
|
+
if (shouldAutoBind) {
|
|
3036
|
+
autoBindPairs.push(name, property);
|
|
3037
|
+
proto[name] = property;
|
|
3038
|
+
} else {
|
|
3039
|
+
if (isAlreadyDefined) {
|
|
3040
|
+
var specPolicy = ReactClassInterface[name];
|
|
3041
|
+
|
|
3042
|
+
// These cases should already be caught by validateMethodOverride.
|
|
3043
|
+
_invariant(
|
|
3044
|
+
isReactClassMethod &&
|
|
3045
|
+
(specPolicy === 'DEFINE_MANY_MERGED' ||
|
|
3046
|
+
specPolicy === 'DEFINE_MANY'),
|
|
3047
|
+
'ReactClass: Unexpected spec policy %s for key %s ' +
|
|
3048
|
+
'when mixing in component specs.',
|
|
3049
|
+
specPolicy,
|
|
3050
|
+
name
|
|
3051
|
+
);
|
|
3052
|
+
|
|
3053
|
+
// For methods which are defined more than once, call the existing
|
|
3054
|
+
// methods before calling the new property, merging if appropriate.
|
|
3055
|
+
if (specPolicy === 'DEFINE_MANY_MERGED') {
|
|
3056
|
+
proto[name] = createMergedResultFunction(proto[name], property);
|
|
3057
|
+
} else if (specPolicy === 'DEFINE_MANY') {
|
|
3058
|
+
proto[name] = createChainedFunction(proto[name], property);
|
|
3059
|
+
}
|
|
3060
|
+
} else {
|
|
3061
|
+
proto[name] = property;
|
|
3062
|
+
if ("development" !== 'production') {
|
|
3063
|
+
// Add verbose displayName to the function, which helps when looking
|
|
3064
|
+
// at profiling tools.
|
|
3065
|
+
if (typeof property === 'function' && spec.displayName) {
|
|
3066
|
+
proto[name].displayName = spec.displayName + '_' + name;
|
|
3067
|
+
}
|
|
3068
|
+
}
|
|
3069
|
+
}
|
|
3070
|
+
}
|
|
3071
|
+
}
|
|
3072
|
+
}
|
|
3073
|
+
}
|
|
3074
|
+
|
|
3075
|
+
function mixStaticSpecIntoComponent(Constructor, statics) {
|
|
3076
|
+
if (!statics) {
|
|
3077
|
+
return;
|
|
3078
|
+
}
|
|
3079
|
+
for (var name in statics) {
|
|
3080
|
+
var property = statics[name];
|
|
3081
|
+
if (!statics.hasOwnProperty(name)) {
|
|
3082
|
+
continue;
|
|
3083
|
+
}
|
|
3084
|
+
|
|
3085
|
+
var isReserved = name in RESERVED_SPEC_KEYS;
|
|
3086
|
+
_invariant(
|
|
3087
|
+
!isReserved,
|
|
3088
|
+
'ReactClass: You are attempting to define a reserved ' +
|
|
3089
|
+
'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' +
|
|
3090
|
+
'as an instance property instead; it will still be accessible on the ' +
|
|
3091
|
+
'constructor.',
|
|
3092
|
+
name
|
|
3093
|
+
);
|
|
3094
|
+
|
|
3095
|
+
var isInherited = name in Constructor;
|
|
3096
|
+
_invariant(
|
|
3097
|
+
!isInherited,
|
|
3098
|
+
'ReactClass: You are attempting to define ' +
|
|
3099
|
+
'`%s` on your component more than once. This conflict may be ' +
|
|
3100
|
+
'due to a mixin.',
|
|
3101
|
+
name
|
|
3102
|
+
);
|
|
3103
|
+
Constructor[name] = property;
|
|
3104
|
+
}
|
|
3105
|
+
}
|
|
3106
|
+
|
|
3107
|
+
/**
|
|
3108
|
+
* Merge two objects, but throw if both contain the same key.
|
|
3109
|
+
*
|
|
3110
|
+
* @param {object} one The first object, which is mutated.
|
|
3111
|
+
* @param {object} two The second object
|
|
3112
|
+
* @return {object} one after it has been mutated to contain everything in two.
|
|
3113
|
+
*/
|
|
3114
|
+
function mergeIntoWithNoDuplicateKeys(one, two) {
|
|
3115
|
+
_invariant(
|
|
3116
|
+
one && two && typeof one === 'object' && typeof two === 'object',
|
|
3117
|
+
'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'
|
|
3118
|
+
);
|
|
3119
|
+
|
|
3120
|
+
for (var key in two) {
|
|
3121
|
+
if (two.hasOwnProperty(key)) {
|
|
3122
|
+
_invariant(
|
|
3123
|
+
one[key] === undefined,
|
|
3124
|
+
'mergeIntoWithNoDuplicateKeys(): ' +
|
|
3125
|
+
'Tried to merge two objects with the same key: `%s`. This conflict ' +
|
|
3126
|
+
'may be due to a mixin; in particular, this may be caused by two ' +
|
|
3127
|
+
'getInitialState() or getDefaultProps() methods returning objects ' +
|
|
3128
|
+
'with clashing keys.',
|
|
3129
|
+
key
|
|
3130
|
+
);
|
|
3131
|
+
one[key] = two[key];
|
|
3132
|
+
}
|
|
3133
|
+
}
|
|
3134
|
+
return one;
|
|
3135
|
+
}
|
|
3136
|
+
|
|
3137
|
+
/**
|
|
3138
|
+
* Creates a function that invokes two functions and merges their return values.
|
|
3139
|
+
*
|
|
3140
|
+
* @param {function} one Function to invoke first.
|
|
3141
|
+
* @param {function} two Function to invoke second.
|
|
3142
|
+
* @return {function} Function that invokes the two argument functions.
|
|
3143
|
+
* @private
|
|
3144
|
+
*/
|
|
3145
|
+
function createMergedResultFunction(one, two) {
|
|
3146
|
+
return function mergedResult() {
|
|
3147
|
+
var a = one.apply(this, arguments);
|
|
3148
|
+
var b = two.apply(this, arguments);
|
|
3149
|
+
if (a == null) {
|
|
3150
|
+
return b;
|
|
3151
|
+
} else if (b == null) {
|
|
3152
|
+
return a;
|
|
3153
|
+
}
|
|
3154
|
+
var c = {};
|
|
3155
|
+
mergeIntoWithNoDuplicateKeys(c, a);
|
|
3156
|
+
mergeIntoWithNoDuplicateKeys(c, b);
|
|
3157
|
+
return c;
|
|
3158
|
+
};
|
|
3159
|
+
}
|
|
3160
|
+
|
|
3161
|
+
/**
|
|
3162
|
+
* Creates a function that invokes two functions and ignores their return vales.
|
|
3163
|
+
*
|
|
3164
|
+
* @param {function} one Function to invoke first.
|
|
3165
|
+
* @param {function} two Function to invoke second.
|
|
3166
|
+
* @return {function} Function that invokes the two argument functions.
|
|
3167
|
+
* @private
|
|
3168
|
+
*/
|
|
3169
|
+
function createChainedFunction(one, two) {
|
|
3170
|
+
return function chainedFunction() {
|
|
3171
|
+
one.apply(this, arguments);
|
|
3172
|
+
two.apply(this, arguments);
|
|
3173
|
+
};
|
|
3174
|
+
}
|
|
3175
|
+
|
|
3176
|
+
/**
|
|
3177
|
+
* Binds a method to the component.
|
|
3178
|
+
*
|
|
3179
|
+
* @param {object} component Component whose method is going to be bound.
|
|
3180
|
+
* @param {function} method Method to be bound.
|
|
3181
|
+
* @return {function} The bound method.
|
|
3182
|
+
*/
|
|
3183
|
+
function bindAutoBindMethod(component, method) {
|
|
3184
|
+
var boundMethod = method.bind(component);
|
|
3185
|
+
if ("development" !== 'production') {
|
|
3186
|
+
boundMethod.__reactBoundContext = component;
|
|
3187
|
+
boundMethod.__reactBoundMethod = method;
|
|
3188
|
+
boundMethod.__reactBoundArguments = null;
|
|
3189
|
+
var componentName = component.constructor.displayName;
|
|
3190
|
+
var _bind = boundMethod.bind;
|
|
3191
|
+
boundMethod.bind = function(newThis) {
|
|
3192
|
+
for (
|
|
3193
|
+
var _len = arguments.length,
|
|
3194
|
+
args = Array(_len > 1 ? _len - 1 : 0),
|
|
3195
|
+
_key = 1;
|
|
3196
|
+
_key < _len;
|
|
3197
|
+
_key++
|
|
3198
|
+
) {
|
|
3199
|
+
args[_key - 1] = arguments[_key];
|
|
3200
|
+
}
|
|
3201
|
+
|
|
3202
|
+
// User is trying to bind() an autobound method; we effectively will
|
|
3203
|
+
// ignore the value of "this" that the user is trying to use, so
|
|
3204
|
+
// let's warn.
|
|
3205
|
+
if (newThis !== component && newThis !== null) {
|
|
3206
|
+
if ("development" !== 'production') {
|
|
3207
|
+
warning(
|
|
3208
|
+
false,
|
|
3209
|
+
'bind(): React component methods may only be bound to the ' +
|
|
3210
|
+
'component instance. See %s',
|
|
3211
|
+
componentName
|
|
3212
|
+
);
|
|
3213
|
+
}
|
|
3214
|
+
} else if (!args.length) {
|
|
3215
|
+
if ("development" !== 'production') {
|
|
3216
|
+
warning(
|
|
3217
|
+
false,
|
|
3218
|
+
'bind(): You are binding a component method to the component. ' +
|
|
3219
|
+
'React does this for you automatically in a high-performance ' +
|
|
3220
|
+
'way, so you can safely remove this call. See %s',
|
|
3221
|
+
componentName
|
|
3222
|
+
);
|
|
3223
|
+
}
|
|
3224
|
+
return boundMethod;
|
|
3225
|
+
}
|
|
3226
|
+
var reboundMethod = _bind.apply(boundMethod, arguments);
|
|
3227
|
+
reboundMethod.__reactBoundContext = component;
|
|
3228
|
+
reboundMethod.__reactBoundMethod = method;
|
|
3229
|
+
reboundMethod.__reactBoundArguments = args;
|
|
3230
|
+
return reboundMethod;
|
|
3231
|
+
};
|
|
3232
|
+
}
|
|
3233
|
+
return boundMethod;
|
|
3234
|
+
}
|
|
3235
|
+
|
|
3236
|
+
/**
|
|
3237
|
+
* Binds all auto-bound methods in a component.
|
|
3238
|
+
*
|
|
3239
|
+
* @param {object} component Component whose method is going to be bound.
|
|
3240
|
+
*/
|
|
3241
|
+
function bindAutoBindMethods(component) {
|
|
3242
|
+
var pairs = component.__reactAutoBindPairs;
|
|
3243
|
+
for (var i = 0; i < pairs.length; i += 2) {
|
|
3244
|
+
var autoBindKey = pairs[i];
|
|
3245
|
+
var method = pairs[i + 1];
|
|
3246
|
+
component[autoBindKey] = bindAutoBindMethod(component, method);
|
|
3247
|
+
}
|
|
3248
|
+
}
|
|
2970
3249
|
|
|
2971
|
-
|
|
3250
|
+
var IsMountedPreMixin = {
|
|
3251
|
+
componentDidMount: function() {
|
|
3252
|
+
this.__isMounted = true;
|
|
3253
|
+
}
|
|
3254
|
+
};
|
|
2972
3255
|
|
|
2973
|
-
var
|
|
3256
|
+
var IsMountedPostMixin = {
|
|
3257
|
+
componentWillUnmount: function() {
|
|
3258
|
+
this.__isMounted = false;
|
|
3259
|
+
}
|
|
3260
|
+
};
|
|
2974
3261
|
|
|
2975
|
-
|
|
2976
|
-
|
|
3262
|
+
/**
|
|
3263
|
+
* Add more to the ReactClass base class. These are all legacy features and
|
|
3264
|
+
* therefore not already part of the modern ReactComponent.
|
|
3265
|
+
*/
|
|
3266
|
+
var ReactClassMixin = {
|
|
3267
|
+
/**
|
|
3268
|
+
* TODO: This will be deprecated because state should always keep a consistent
|
|
3269
|
+
* type signature and the only use case for this, is to avoid that.
|
|
3270
|
+
*/
|
|
3271
|
+
replaceState: function(newState, callback) {
|
|
3272
|
+
this.updater.enqueueReplaceState(this, newState, callback);
|
|
3273
|
+
},
|
|
3274
|
+
|
|
3275
|
+
/**
|
|
3276
|
+
* Checks whether or not this composite component is mounted.
|
|
3277
|
+
* @return {boolean} True if mounted, false otherwise.
|
|
3278
|
+
* @protected
|
|
3279
|
+
* @final
|
|
3280
|
+
*/
|
|
3281
|
+
isMounted: function() {
|
|
3282
|
+
if ("development" !== 'production') {
|
|
3283
|
+
warning(
|
|
3284
|
+
this.__didWarnIsMounted,
|
|
3285
|
+
'%s: isMounted is deprecated. Instead, make sure to clean up ' +
|
|
3286
|
+
'subscriptions and pending requests in componentWillUnmount to ' +
|
|
3287
|
+
'prevent memory leaks.',
|
|
3288
|
+
(this.constructor && this.constructor.displayName) ||
|
|
3289
|
+
this.name ||
|
|
3290
|
+
'Component'
|
|
3291
|
+
);
|
|
3292
|
+
this.__didWarnIsMounted = true;
|
|
3293
|
+
}
|
|
3294
|
+
return !!this.__isMounted;
|
|
3295
|
+
}
|
|
3296
|
+
};
|
|
2977
3297
|
|
|
2978
|
-
var
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
3298
|
+
var ReactClassComponent = function() {};
|
|
3299
|
+
_assign(
|
|
3300
|
+
ReactClassComponent.prototype,
|
|
3301
|
+
ReactComponent.prototype,
|
|
3302
|
+
ReactClassMixin
|
|
3303
|
+
);
|
|
2982
3304
|
|
|
2983
|
-
|
|
2984
|
-
|
|
3305
|
+
/**
|
|
3306
|
+
* Creates a composite component class given a class specification.
|
|
3307
|
+
* See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
|
|
3308
|
+
*
|
|
3309
|
+
* @param {object} spec Class specification (which must define `render`).
|
|
3310
|
+
* @return {function} Component constructor function.
|
|
3311
|
+
* @public
|
|
3312
|
+
*/
|
|
3313
|
+
function createClass(spec) {
|
|
3314
|
+
// To keep our warnings more understandable, we'll use a little hack here to
|
|
3315
|
+
// ensure that Constructor.name !== 'Constructor'. This makes sure we don't
|
|
3316
|
+
// unnecessarily identify a class without displayName as 'Constructor'.
|
|
3317
|
+
var Constructor = identity(function(props, context, updater) {
|
|
3318
|
+
// This constructor gets overridden by mocks. The argument is used
|
|
3319
|
+
// by mocks to assert on what gets mounted.
|
|
2985
3320
|
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
3321
|
+
if ("development" !== 'production') {
|
|
3322
|
+
warning(
|
|
3323
|
+
this instanceof Constructor,
|
|
3324
|
+
'Something is calling a React component directly. Use a factory or ' +
|
|
3325
|
+
'JSX instead. See: https://fb.me/react-legacyfactory'
|
|
3326
|
+
);
|
|
3327
|
+
}
|
|
2991
3328
|
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
3329
|
+
// Wire up auto-binding
|
|
3330
|
+
if (this.__reactAutoBindPairs.length) {
|
|
3331
|
+
bindAutoBindMethods(this);
|
|
3332
|
+
}
|
|
2996
3333
|
|
|
2997
|
-
|
|
3334
|
+
this.props = props;
|
|
3335
|
+
this.context = context;
|
|
3336
|
+
this.refs = emptyObject;
|
|
3337
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
2998
3338
|
|
|
2999
|
-
|
|
3000
|
-
* Generate a key string that identifies a component within a set.
|
|
3001
|
-
*
|
|
3002
|
-
* @param {*} component A component that could contain a manual key.
|
|
3003
|
-
* @param {number} index Index that is used if a manual key is not provided.
|
|
3004
|
-
* @return {string}
|
|
3005
|
-
*/
|
|
3006
|
-
function getComponentKey(component, index) {
|
|
3007
|
-
// Do some typechecking here since we call this blindly. We want to ensure
|
|
3008
|
-
// that we don't block potential future ES APIs.
|
|
3009
|
-
if (component && typeof component === 'object' && component.key != null) {
|
|
3010
|
-
// Explicit key
|
|
3011
|
-
return KeyEscapeUtils.escape(component.key);
|
|
3012
|
-
}
|
|
3013
|
-
// Implicit key determined by the index in the set
|
|
3014
|
-
return index.toString(36);
|
|
3015
|
-
}
|
|
3339
|
+
this.state = null;
|
|
3016
3340
|
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
* @param {!string} nameSoFar Name of the key path so far.
|
|
3020
|
-
* @param {!function} callback Callback to invoke with each child found.
|
|
3021
|
-
* @param {?*} traverseContext Used to pass information throughout the traversal
|
|
3022
|
-
* process.
|
|
3023
|
-
* @return {!number} The number of children in this subtree.
|
|
3024
|
-
*/
|
|
3025
|
-
function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
|
|
3026
|
-
var type = typeof children;
|
|
3341
|
+
// ReactClasses doesn't have constructors. Instead, they use the
|
|
3342
|
+
// getInitialState and componentWillMount methods for initialization.
|
|
3027
3343
|
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3344
|
+
var initialState = this.getInitialState ? this.getInitialState() : null;
|
|
3345
|
+
if ("development" !== 'production') {
|
|
3346
|
+
// We allow auto-mocks to proceed as if they're returning null.
|
|
3347
|
+
if (
|
|
3348
|
+
initialState === undefined &&
|
|
3349
|
+
this.getInitialState._isMockFunction
|
|
3350
|
+
) {
|
|
3351
|
+
// This is probably bad practice. Consider warning here and
|
|
3352
|
+
// deprecating this convenience.
|
|
3353
|
+
initialState = null;
|
|
3354
|
+
}
|
|
3355
|
+
}
|
|
3356
|
+
_invariant(
|
|
3357
|
+
typeof initialState === 'object' && !Array.isArray(initialState),
|
|
3358
|
+
'%s.getInitialState(): must return an object or null',
|
|
3359
|
+
Constructor.displayName || 'ReactCompositeComponent'
|
|
3360
|
+
);
|
|
3032
3361
|
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
// If it's the only child, treat the name as if it was wrapped in an array
|
|
3039
|
-
// so that it's consistent if the number of children grows.
|
|
3040
|
-
nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
|
|
3041
|
-
return 1;
|
|
3042
|
-
}
|
|
3362
|
+
this.state = initialState;
|
|
3363
|
+
});
|
|
3364
|
+
Constructor.prototype = new ReactClassComponent();
|
|
3365
|
+
Constructor.prototype.constructor = Constructor;
|
|
3366
|
+
Constructor.prototype.__reactAutoBindPairs = [];
|
|
3043
3367
|
|
|
3044
|
-
|
|
3045
|
-
var nextName;
|
|
3046
|
-
var subtreeCount = 0; // Count of children found in the current subtree.
|
|
3047
|
-
var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
|
|
3368
|
+
injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
|
|
3048
3369
|
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3370
|
+
mixSpecIntoComponent(Constructor, IsMountedPreMixin);
|
|
3371
|
+
mixSpecIntoComponent(Constructor, spec);
|
|
3372
|
+
mixSpecIntoComponent(Constructor, IsMountedPostMixin);
|
|
3373
|
+
|
|
3374
|
+
// Initialize the defaultProps property after all mixins have been merged.
|
|
3375
|
+
if (Constructor.getDefaultProps) {
|
|
3376
|
+
Constructor.defaultProps = Constructor.getDefaultProps();
|
|
3054
3377
|
}
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
child = step.value;
|
|
3064
|
-
nextName = nextNamePrefix + getComponentKey(child, ii++);
|
|
3065
|
-
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
|
3066
|
-
}
|
|
3067
|
-
} else {
|
|
3068
|
-
if ("development" !== 'production') {
|
|
3069
|
-
var mapsAsChildrenAddendum = '';
|
|
3070
|
-
if (ReactCurrentOwner.current) {
|
|
3071
|
-
var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
|
|
3072
|
-
if (mapsAsChildrenOwnerName) {
|
|
3073
|
-
mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
|
|
3074
|
-
}
|
|
3075
|
-
}
|
|
3076
|
-
"development" !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;
|
|
3077
|
-
didWarnAboutMaps = true;
|
|
3078
|
-
}
|
|
3079
|
-
// Iterator will provide entry [k,v] tuples rather than values.
|
|
3080
|
-
while (!(step = iterator.next()).done) {
|
|
3081
|
-
var entry = step.value;
|
|
3082
|
-
if (entry) {
|
|
3083
|
-
child = entry[1];
|
|
3084
|
-
nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
|
|
3085
|
-
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
|
3086
|
-
}
|
|
3087
|
-
}
|
|
3378
|
+
|
|
3379
|
+
if ("development" !== 'production') {
|
|
3380
|
+
// This is a tag to indicate that the use of these method names is ok,
|
|
3381
|
+
// since it's used with createClass. If it's not, then it's likely a
|
|
3382
|
+
// mistake so we'll warn you to use the static property, property
|
|
3383
|
+
// initializer or constructor respectively.
|
|
3384
|
+
if (Constructor.getDefaultProps) {
|
|
3385
|
+
Constructor.getDefaultProps.isReactClassApproved = {};
|
|
3088
3386
|
}
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
if ("development" !== 'production') {
|
|
3092
|
-
addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
|
|
3093
|
-
if (children._isReactElement) {
|
|
3094
|
-
addendum = ' It looks like you\'re using an element created by a different ' + 'version of React. Make sure to use only one copy of React.';
|
|
3095
|
-
}
|
|
3096
|
-
if (ReactCurrentOwner.current) {
|
|
3097
|
-
var name = ReactCurrentOwner.current.getName();
|
|
3098
|
-
if (name) {
|
|
3099
|
-
addendum += ' Check the render method of `' + name + '`.';
|
|
3100
|
-
}
|
|
3101
|
-
}
|
|
3387
|
+
if (Constructor.prototype.getInitialState) {
|
|
3388
|
+
Constructor.prototype.getInitialState.isReactClassApproved = {};
|
|
3102
3389
|
}
|
|
3103
|
-
var childrenString = String(children);
|
|
3104
|
-
!false ? "development" !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;
|
|
3105
3390
|
}
|
|
3106
|
-
}
|
|
3107
3391
|
|
|
3108
|
-
|
|
3109
|
-
|
|
3392
|
+
_invariant(
|
|
3393
|
+
Constructor.prototype.render,
|
|
3394
|
+
'createClass(...): Class specification must implement a `render` method.'
|
|
3395
|
+
);
|
|
3110
3396
|
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3397
|
+
if ("development" !== 'production') {
|
|
3398
|
+
warning(
|
|
3399
|
+
!Constructor.prototype.componentShouldUpdate,
|
|
3400
|
+
'%s has a method called ' +
|
|
3401
|
+
'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +
|
|
3402
|
+
'The name is phrased as a question because the function is ' +
|
|
3403
|
+
'expected to return a value.',
|
|
3404
|
+
spec.displayName || 'A component'
|
|
3405
|
+
);
|
|
3406
|
+
warning(
|
|
3407
|
+
!Constructor.prototype.componentWillRecieveProps,
|
|
3408
|
+
'%s has a method called ' +
|
|
3409
|
+
'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',
|
|
3410
|
+
spec.displayName || 'A component'
|
|
3411
|
+
);
|
|
3412
|
+
}
|
|
3413
|
+
|
|
3414
|
+
// Reduce time spent doing lookups by setting these on the prototype.
|
|
3415
|
+
for (var methodName in ReactClassInterface) {
|
|
3416
|
+
if (!Constructor.prototype[methodName]) {
|
|
3417
|
+
Constructor.prototype[methodName] = null;
|
|
3418
|
+
}
|
|
3419
|
+
}
|
|
3420
|
+
|
|
3421
|
+
return Constructor;
|
|
3130
3422
|
}
|
|
3131
3423
|
|
|
3132
|
-
return
|
|
3424
|
+
return createClass;
|
|
3133
3425
|
}
|
|
3134
3426
|
|
|
3135
|
-
module.exports =
|
|
3136
|
-
|
|
3427
|
+
module.exports = factory;
|
|
3428
|
+
|
|
3429
|
+
},{"29":29,"30":30,"31":31,"32":32}],28:[function(_dereq_,module,exports){
|
|
3137
3430
|
"use strict";
|
|
3138
3431
|
|
|
3139
3432
|
/**
|
|
@@ -3172,7 +3465,7 @@ emptyFunction.thatReturnsArgument = function (arg) {
|
|
|
3172
3465
|
};
|
|
3173
3466
|
|
|
3174
3467
|
module.exports = emptyFunction;
|
|
3175
|
-
},{}],
|
|
3468
|
+
},{}],29:[function(_dereq_,module,exports){
|
|
3176
3469
|
/**
|
|
3177
3470
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3178
3471
|
* All rights reserved.
|
|
@@ -3192,7 +3485,7 @@ if ("development" !== 'production') {
|
|
|
3192
3485
|
}
|
|
3193
3486
|
|
|
3194
3487
|
module.exports = emptyObject;
|
|
3195
|
-
},{}],
|
|
3488
|
+
},{}],30:[function(_dereq_,module,exports){
|
|
3196
3489
|
/**
|
|
3197
3490
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3198
3491
|
* All rights reserved.
|
|
@@ -3248,7 +3541,7 @@ function invariant(condition, format, a, b, c, d, e, f) {
|
|
|
3248
3541
|
}
|
|
3249
3542
|
|
|
3250
3543
|
module.exports = invariant;
|
|
3251
|
-
},{}],
|
|
3544
|
+
},{}],31:[function(_dereq_,module,exports){
|
|
3252
3545
|
/**
|
|
3253
3546
|
* Copyright 2014-2015, Facebook, Inc.
|
|
3254
3547
|
* All rights reserved.
|
|
@@ -3261,7 +3554,7 @@ module.exports = invariant;
|
|
|
3261
3554
|
|
|
3262
3555
|
'use strict';
|
|
3263
3556
|
|
|
3264
|
-
var emptyFunction = _dereq_(
|
|
3557
|
+
var emptyFunction = _dereq_(28);
|
|
3265
3558
|
|
|
3266
3559
|
/**
|
|
3267
3560
|
* Similar to invariant but only logs a warning if the condition is not met.
|
|
@@ -3315,7 +3608,7 @@ if ("development" !== 'production') {
|
|
|
3315
3608
|
}
|
|
3316
3609
|
|
|
3317
3610
|
module.exports = warning;
|
|
3318
|
-
},{"
|
|
3611
|
+
},{"28":28}],32:[function(_dereq_,module,exports){
|
|
3319
3612
|
/*
|
|
3320
3613
|
object-assign
|
|
3321
3614
|
(c) Sindre Sorhus
|
|
@@ -3407,7 +3700,7 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
|
|
3407
3700
|
return to;
|
|
3408
3701
|
};
|
|
3409
3702
|
|
|
3410
|
-
},{}],
|
|
3703
|
+
},{}],33:[function(_dereq_,module,exports){
|
|
3411
3704
|
/**
|
|
3412
3705
|
* Copyright 2013-present, Facebook, Inc.
|
|
3413
3706
|
* All rights reserved.
|
|
@@ -3419,12 +3712,12 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
|
|
3419
3712
|
|
|
3420
3713
|
'use strict';
|
|
3421
3714
|
|
|
3422
|
-
|
|
3423
|
-
var
|
|
3424
|
-
|
|
3425
|
-
var ReactPropTypesSecret = _dereq_(
|
|
3426
|
-
|
|
3427
|
-
|
|
3715
|
+
if ("development" !== 'production') {
|
|
3716
|
+
var invariant = _dereq_(30);
|
|
3717
|
+
var warning = _dereq_(31);
|
|
3718
|
+
var ReactPropTypesSecret = _dereq_(36);
|
|
3719
|
+
var loggedTypeFailures = {};
|
|
3720
|
+
}
|
|
3428
3721
|
|
|
3429
3722
|
/**
|
|
3430
3723
|
* Assert that the values match with the type specs.
|
|
@@ -3453,7 +3746,7 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
|
3453
3746
|
} catch (ex) {
|
|
3454
3747
|
error = ex;
|
|
3455
3748
|
}
|
|
3456
|
-
|
|
3749
|
+
warning(!error || error 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).', componentName || 'React class', location, typeSpecName, typeof error);
|
|
3457
3750
|
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
3458
3751
|
// Only monitor this failure once because there tends to be a lot of the
|
|
3459
3752
|
// same error.
|
|
@@ -3461,7 +3754,7 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
|
3461
3754
|
|
|
3462
3755
|
var stack = getStack ? getStack() : '';
|
|
3463
3756
|
|
|
3464
|
-
|
|
3757
|
+
warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
|
|
3465
3758
|
}
|
|
3466
3759
|
}
|
|
3467
3760
|
}
|
|
@@ -3470,7 +3763,30 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
|
3470
3763
|
|
|
3471
3764
|
module.exports = checkPropTypes;
|
|
3472
3765
|
|
|
3473
|
-
},{"
|
|
3766
|
+
},{"30":30,"31":31,"36":36}],34:[function(_dereq_,module,exports){
|
|
3767
|
+
/**
|
|
3768
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3769
|
+
* All rights reserved.
|
|
3770
|
+
*
|
|
3771
|
+
* This source code is licensed under the BSD-style license found in the
|
|
3772
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
3773
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
3774
|
+
*/
|
|
3775
|
+
|
|
3776
|
+
'use strict';
|
|
3777
|
+
|
|
3778
|
+
// React 15.5 references this module, and assumes PropTypes are still callable in production.
|
|
3779
|
+
// Therefore we re-export development-only version with all the PropTypes checks here.
|
|
3780
|
+
// However if one is migrating to the `prop-types` npm library, they will go through the
|
|
3781
|
+
// `index.js` entry point, and it will branch depending on the environment.
|
|
3782
|
+
var factory = _dereq_(35);
|
|
3783
|
+
module.exports = function(isValidElement) {
|
|
3784
|
+
// It is still allowed in 15.5.
|
|
3785
|
+
var throwOnDirectAccess = false;
|
|
3786
|
+
return factory(isValidElement, throwOnDirectAccess);
|
|
3787
|
+
};
|
|
3788
|
+
|
|
3789
|
+
},{"35":35}],35:[function(_dereq_,module,exports){
|
|
3474
3790
|
/**
|
|
3475
3791
|
* Copyright 2013-present, Facebook, Inc.
|
|
3476
3792
|
* All rights reserved.
|
|
@@ -3482,14 +3798,14 @@ module.exports = checkPropTypes;
|
|
|
3482
3798
|
|
|
3483
3799
|
'use strict';
|
|
3484
3800
|
|
|
3485
|
-
var emptyFunction = _dereq_(
|
|
3486
|
-
var invariant = _dereq_(
|
|
3487
|
-
var warning = _dereq_(
|
|
3801
|
+
var emptyFunction = _dereq_(28);
|
|
3802
|
+
var invariant = _dereq_(30);
|
|
3803
|
+
var warning = _dereq_(31);
|
|
3488
3804
|
|
|
3489
|
-
var ReactPropTypesSecret = _dereq_(
|
|
3490
|
-
var checkPropTypes = _dereq_(
|
|
3805
|
+
var ReactPropTypesSecret = _dereq_(36);
|
|
3806
|
+
var checkPropTypes = _dereq_(33);
|
|
3491
3807
|
|
|
3492
|
-
module.exports = function
|
|
3808
|
+
module.exports = function(isValidElement, throwOnDirectAccess) {
|
|
3493
3809
|
/* global Symbol */
|
|
3494
3810
|
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
3495
3811
|
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
@@ -3564,58 +3880,27 @@ module.exports = function (isValidElement) {
|
|
|
3564
3880
|
|
|
3565
3881
|
var ANONYMOUS = '<<anonymous>>';
|
|
3566
3882
|
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
shape: createShapeTypeChecker
|
|
3589
|
-
};
|
|
3590
|
-
} else {
|
|
3591
|
-
var productionTypeChecker = function () {
|
|
3592
|
-
invariant(false, 'React.PropTypes type checking code is stripped in production.');
|
|
3593
|
-
};
|
|
3594
|
-
productionTypeChecker.isRequired = productionTypeChecker;
|
|
3595
|
-
var getProductionTypeChecker = function () {
|
|
3596
|
-
return productionTypeChecker;
|
|
3597
|
-
};
|
|
3598
|
-
// Keep in sync with development version above
|
|
3599
|
-
ReactPropTypes = {
|
|
3600
|
-
array: productionTypeChecker,
|
|
3601
|
-
bool: productionTypeChecker,
|
|
3602
|
-
func: productionTypeChecker,
|
|
3603
|
-
number: productionTypeChecker,
|
|
3604
|
-
object: productionTypeChecker,
|
|
3605
|
-
string: productionTypeChecker,
|
|
3606
|
-
symbol: productionTypeChecker,
|
|
3607
|
-
|
|
3608
|
-
any: productionTypeChecker,
|
|
3609
|
-
arrayOf: getProductionTypeChecker,
|
|
3610
|
-
element: productionTypeChecker,
|
|
3611
|
-
instanceOf: getProductionTypeChecker,
|
|
3612
|
-
node: productionTypeChecker,
|
|
3613
|
-
objectOf: getProductionTypeChecker,
|
|
3614
|
-
oneOf: getProductionTypeChecker,
|
|
3615
|
-
oneOfType: getProductionTypeChecker,
|
|
3616
|
-
shape: getProductionTypeChecker
|
|
3617
|
-
};
|
|
3618
|
-
}
|
|
3883
|
+
// Important!
|
|
3884
|
+
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
3885
|
+
var ReactPropTypes = {
|
|
3886
|
+
array: createPrimitiveTypeChecker('array'),
|
|
3887
|
+
bool: createPrimitiveTypeChecker('boolean'),
|
|
3888
|
+
func: createPrimitiveTypeChecker('function'),
|
|
3889
|
+
number: createPrimitiveTypeChecker('number'),
|
|
3890
|
+
object: createPrimitiveTypeChecker('object'),
|
|
3891
|
+
string: createPrimitiveTypeChecker('string'),
|
|
3892
|
+
symbol: createPrimitiveTypeChecker('symbol'),
|
|
3893
|
+
|
|
3894
|
+
any: createAnyTypeChecker(),
|
|
3895
|
+
arrayOf: createArrayOfTypeChecker,
|
|
3896
|
+
element: createElementTypeChecker(),
|
|
3897
|
+
instanceOf: createInstanceTypeChecker,
|
|
3898
|
+
node: createNodeChecker(),
|
|
3899
|
+
objectOf: createObjectOfTypeChecker,
|
|
3900
|
+
oneOf: createEnumTypeChecker,
|
|
3901
|
+
oneOfType: createUnionTypeChecker,
|
|
3902
|
+
shape: createShapeTypeChecker
|
|
3903
|
+
};
|
|
3619
3904
|
|
|
3620
3905
|
/**
|
|
3621
3906
|
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
@@ -3652,16 +3937,41 @@ module.exports = function (isValidElement) {
|
|
|
3652
3937
|
function createChainableTypeChecker(validate) {
|
|
3653
3938
|
if ("development" !== 'production') {
|
|
3654
3939
|
var manualPropTypeCallCache = {};
|
|
3940
|
+
var manualPropTypeWarningCount = 0;
|
|
3655
3941
|
}
|
|
3656
3942
|
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
3657
3943
|
componentName = componentName || ANONYMOUS;
|
|
3658
3944
|
propFullName = propFullName || propName;
|
|
3659
|
-
|
|
3660
|
-
|
|
3945
|
+
|
|
3946
|
+
if (secret !== ReactPropTypesSecret) {
|
|
3947
|
+
if (throwOnDirectAccess) {
|
|
3948
|
+
// New behavior only for users of `prop-types` package
|
|
3949
|
+
invariant(
|
|
3950
|
+
false,
|
|
3951
|
+
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
3952
|
+
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
|
3953
|
+
'Read more at http://fb.me/use-check-prop-types'
|
|
3954
|
+
);
|
|
3955
|
+
} else if ("development" !== 'production' && typeof console !== 'undefined') {
|
|
3956
|
+
// Old behavior for people using React.PropTypes
|
|
3661
3957
|
var cacheKey = componentName + ':' + propName;
|
|
3662
|
-
if (
|
|
3663
|
-
|
|
3958
|
+
if (
|
|
3959
|
+
!manualPropTypeCallCache[cacheKey] &&
|
|
3960
|
+
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
3961
|
+
manualPropTypeWarningCount < 3
|
|
3962
|
+
) {
|
|
3963
|
+
warning(
|
|
3964
|
+
false,
|
|
3965
|
+
'You are manually calling a React.PropTypes validation ' +
|
|
3966
|
+
'function for the `%s` prop on `%s`. This is deprecated ' +
|
|
3967
|
+
'and will throw in the standalone `prop-types` package. ' +
|
|
3968
|
+
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
3969
|
+
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
|
|
3970
|
+
propFullName,
|
|
3971
|
+
componentName
|
|
3972
|
+
);
|
|
3664
3973
|
manualPropTypeCallCache[cacheKey] = true;
|
|
3974
|
+
manualPropTypeWarningCount++;
|
|
3665
3975
|
}
|
|
3666
3976
|
}
|
|
3667
3977
|
}
|
|
@@ -3799,6 +4109,20 @@ module.exports = function (isValidElement) {
|
|
|
3799
4109
|
return emptyFunction.thatReturnsNull;
|
|
3800
4110
|
}
|
|
3801
4111
|
|
|
4112
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
4113
|
+
var checker = arrayOfTypeCheckers[i];
|
|
4114
|
+
if (typeof checker !== 'function') {
|
|
4115
|
+
warning(
|
|
4116
|
+
false,
|
|
4117
|
+
'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' +
|
|
4118
|
+
'received %s at index %s.',
|
|
4119
|
+
getPostfixForTypeWarning(checker),
|
|
4120
|
+
i
|
|
4121
|
+
);
|
|
4122
|
+
return emptyFunction.thatReturnsNull;
|
|
4123
|
+
}
|
|
4124
|
+
}
|
|
4125
|
+
|
|
3802
4126
|
function validate(props, propName, componentName, location, propFullName) {
|
|
3803
4127
|
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
3804
4128
|
var checker = arrayOfTypeCheckers[i];
|
|
@@ -3931,6 +4255,9 @@ module.exports = function (isValidElement) {
|
|
|
3931
4255
|
// This handles more types than `getPropType`. Only used for error messages.
|
|
3932
4256
|
// See `createPrimitiveTypeChecker`.
|
|
3933
4257
|
function getPreciseType(propValue) {
|
|
4258
|
+
if (typeof propValue === 'undefined' || propValue === null) {
|
|
4259
|
+
return '' + propValue;
|
|
4260
|
+
}
|
|
3934
4261
|
var propType = getPropType(propValue);
|
|
3935
4262
|
if (propType === 'object') {
|
|
3936
4263
|
if (propValue instanceof Date) {
|
|
@@ -3942,6 +4269,23 @@ module.exports = function (isValidElement) {
|
|
|
3942
4269
|
return propType;
|
|
3943
4270
|
}
|
|
3944
4271
|
|
|
4272
|
+
// Returns a string that is postfixed to a warning about an invalid type.
|
|
4273
|
+
// For example, "undefined" or "of type array"
|
|
4274
|
+
function getPostfixForTypeWarning(value) {
|
|
4275
|
+
var type = getPreciseType(value);
|
|
4276
|
+
switch (type) {
|
|
4277
|
+
case 'array':
|
|
4278
|
+
case 'object':
|
|
4279
|
+
return 'an ' + type;
|
|
4280
|
+
case 'boolean':
|
|
4281
|
+
case 'date':
|
|
4282
|
+
case 'regexp':
|
|
4283
|
+
return 'a ' + type;
|
|
4284
|
+
default:
|
|
4285
|
+
return type;
|
|
4286
|
+
}
|
|
4287
|
+
}
|
|
4288
|
+
|
|
3945
4289
|
// Returns class name of the object, if any.
|
|
3946
4290
|
function getClassName(propValue) {
|
|
3947
4291
|
if (!propValue.constructor || !propValue.constructor.name) {
|
|
@@ -3956,7 +4300,7 @@ module.exports = function (isValidElement) {
|
|
|
3956
4300
|
return ReactPropTypes;
|
|
3957
4301
|
};
|
|
3958
4302
|
|
|
3959
|
-
},{"
|
|
4303
|
+
},{"28":28,"30":30,"31":31,"33":33,"36":36}],36:[function(_dereq_,module,exports){
|
|
3960
4304
|
/**
|
|
3961
4305
|
* Copyright 2013-present, Facebook, Inc.
|
|
3962
4306
|
* All rights reserved.
|
|
@@ -3972,5 +4316,5 @@ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
|
3972
4316
|
|
|
3973
4317
|
module.exports = ReactPropTypesSecret;
|
|
3974
4318
|
|
|
3975
|
-
},{}]},{},[
|
|
4319
|
+
},{}]},{},[16])(16)
|
|
3976
4320
|
});
|