react 16.4.0-alpha.0911da3 → 16.4.0

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.
@@ -1,4 +1,4 @@
1
- /** @license React v16.4.0-alpha.0911da3
1
+ /** @license React v16.4.0
2
2
  * react.development.js
3
3
  *
4
4
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -16,31 +16,30 @@ if (process.env.NODE_ENV !== "production") {
16
16
  'use strict';
17
17
 
18
18
  var _assign = require('object-assign');
19
- var emptyObject = require('fbjs/lib/emptyObject');
20
19
  var invariant = require('fbjs/lib/invariant');
20
+ var emptyObject = require('fbjs/lib/emptyObject');
21
21
  var warning = require('fbjs/lib/warning');
22
22
  var emptyFunction = require('fbjs/lib/emptyFunction');
23
23
  var checkPropTypes = require('prop-types/checkPropTypes');
24
24
 
25
25
  // TODO: this is special because it gets imported during build.
26
26
 
27
- var ReactVersion = '16.4.0-alpha.0911da3';
27
+ var ReactVersion = '16.4.0';
28
28
 
29
29
  // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
30
30
  // nor polyfill, then a plain number is used for performance.
31
- var hasSymbol = typeof Symbol === 'function' && Symbol['for'];
32
-
33
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol['for']('react.element') : 0xeac7;
34
- var REACT_CALL_TYPE = hasSymbol ? Symbol['for']('react.call') : 0xeac8;
35
- var REACT_RETURN_TYPE = hasSymbol ? Symbol['for']('react.return') : 0xeac9;
36
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol['for']('react.portal') : 0xeaca;
37
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol['for']('react.fragment') : 0xeacb;
38
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol['for']('react.strict_mode') : 0xeacc;
39
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol['for']('react.provider') : 0xeacd;
40
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol['for']('react.context') : 0xeace;
41
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol['for']('react.async_mode') : 0xeacf;
42
- var REACT_LOADING_TYPE = hasSymbol ? Symbol['for']('react.loading') : 0xeada;
43
- var REACT_TIMEOUT_TYPE = hasSymbol ? Symbol['for']('react.timeout') : 0xeadb;
31
+ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
32
+
33
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
34
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
35
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
36
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
37
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
38
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
39
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
40
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
41
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
42
+ var REACT_TIMEOUT_TYPE = hasSymbol ? Symbol.for('react.timeout') : 0xead1;
44
43
 
45
44
  var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
46
45
  var FAUX_ITERATOR_SYMBOL = '@@iterator';
@@ -56,12 +55,43 @@ function getIteratorFn(maybeIterable) {
56
55
  return null;
57
56
  }
58
57
 
59
- /**
60
- * WARNING: DO NOT manually require this module.
61
- * This is a replacement for `invariant(...)` used by the error code system
62
- * and will _only_ be required by the corresponding babel pass.
63
- * It always throws.
64
- */
58
+ // Relying on the `invariant()` implementation lets us
59
+ // have preserve the format and params in the www builds.
60
+
61
+ // Exports ReactDOM.createRoot
62
+
63
+
64
+ // Experimental error-boundary API that can recover from errors within a single
65
+ // render phase
66
+
67
+ // Suspense
68
+ var enableSuspense = false;
69
+ // Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
70
+
71
+
72
+ // In some cases, StrictMode should also double-render lifecycles.
73
+ // This can be confusing for tests though,
74
+ // And it can be bad for performance in production.
75
+ // This feature flag can be used to control the behavior:
76
+
77
+
78
+ // To preserve the "Pause on caught exceptions" behavior of the debugger, we
79
+ // replay the begin phase of a failed component inside invokeGuardedCallback.
80
+
81
+
82
+ // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
83
+
84
+
85
+ // Warn about legacy context API
86
+
87
+
88
+ // Gather advanced timing metrics for Profiler subtrees.
89
+
90
+
91
+ // Fires getDerivedStateFromProps for state *or* props changes
92
+
93
+
94
+ // Only used in www builds.
65
95
 
66
96
  /**
67
97
  * Forked from fbjs/warning:
@@ -126,7 +156,7 @@ function warnNoop(publicInstance, callerName) {
126
156
  if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
127
157
  return;
128
158
  }
129
- warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op.\n\nPlease check the code for the %s component.', callerName, callerName, componentName);
159
+ warning(false, "Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
130
160
  didWarnStateUpdateForUnmountedComponent[warningKey] = true;
131
161
  }
132
162
  }
@@ -308,7 +338,7 @@ pureComponentPrototype.isPureReactComponent = true;
308
338
  // an immutable object with a single mutable value
309
339
  function createRef() {
310
340
  var refObject = {
311
- value: null
341
+ current: null
312
342
  };
313
343
  {
314
344
  Object.seal(refObject);
@@ -416,7 +446,7 @@ function defineRefPropWarningGetter(props, displayName) {
416
446
  */
417
447
  var ReactElement = function (type, key, ref, self, source, owner, props) {
418
448
  var element = {
419
- // This tag allow us to uniquely identify this as a React Element
449
+ // This tag allows us to uniquely identify this as a React Element
420
450
  $$typeof: REACT_ELEMENT_TYPE,
421
451
 
422
452
  // Built-in properties that belong on the element
@@ -563,6 +593,8 @@ function cloneAndReplaceKey(oldElement, newKey) {
563
593
  * See https://reactjs.org/docs/react-api.html#cloneelement
564
594
  */
565
595
  function cloneElement(element, config, children) {
596
+ !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0;
597
+
566
598
  var propName = void 0;
567
599
 
568
600
  // Original props are copied
@@ -777,7 +809,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
777
809
  {
778
810
  // Warn about using Maps as children
779
811
  if (iteratorFn === children.entries) {
780
- warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', ReactDebugCurrentFrame.getStackAddendum());
812
+ !didWarnAboutMaps ? warning(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', ReactDebugCurrentFrame.getStackAddendum()) : void 0;
781
813
  didWarnAboutMaps = true;
782
814
  }
783
815
  }
@@ -935,7 +967,7 @@ function mapChildren(children, func, context) {
935
967
  * @param {?*} children Children tree container.
936
968
  * @return {number} The number of children.
937
969
  */
938
- function countChildren(children, context) {
970
+ function countChildren(children) {
939
971
  return traverseAllChildren(children, emptyFunction.thatReturnsNull, null);
940
972
  }
941
973
 
@@ -975,16 +1007,23 @@ function createContext(defaultValue, calculateChangedBits) {
975
1007
  calculateChangedBits = null;
976
1008
  } else {
977
1009
  {
978
- warning(calculateChangedBits === null || typeof calculateChangedBits === 'function', 'createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits);
1010
+ !(calculateChangedBits === null || typeof calculateChangedBits === 'function') ? warning(false, 'createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits) : void 0;
979
1011
  }
980
1012
  }
981
1013
 
982
1014
  var context = {
983
1015
  $$typeof: REACT_CONTEXT_TYPE,
984
- calculateChangedBits: calculateChangedBits,
985
- defaultValue: defaultValue,
986
- currentValue: defaultValue,
987
- changedBits: 0,
1016
+ _calculateChangedBits: calculateChangedBits,
1017
+ _defaultValue: defaultValue,
1018
+ _currentValue: defaultValue,
1019
+ // As a workaround to support multiple concurrent renderers, we categorize
1020
+ // some renderers as primary and others as secondary. We only expect
1021
+ // there to be two concurrent renderers at most: React Native (primary) and
1022
+ // Fabric (secondary); React DOM (primary) and React ART (secondary).
1023
+ // Secondary renderers store their context values on separate fields.
1024
+ _currentValue2: defaultValue,
1025
+ _changedBits: 0,
1026
+ _changedBits2: 0,
988
1027
  // These are circular
989
1028
  Provider: null,
990
1029
  Consumer: null
@@ -992,21 +1031,43 @@ function createContext(defaultValue, calculateChangedBits) {
992
1031
 
993
1032
  context.Provider = {
994
1033
  $$typeof: REACT_PROVIDER_TYPE,
995
- context: context
1034
+ _context: context
996
1035
  };
997
1036
  context.Consumer = context;
998
1037
 
999
1038
  {
1000
1039
  context._currentRenderer = null;
1040
+ context._currentRenderer2 = null;
1001
1041
  }
1002
1042
 
1003
1043
  return context;
1004
1044
  }
1005
1045
 
1046
+ function forwardRef(render) {
1047
+ {
1048
+ !(typeof render === 'function') ? warning(false, 'forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render) : void 0;
1049
+
1050
+ if (render != null) {
1051
+ !(render.defaultProps == null && render.propTypes == null) ? warning(false, 'forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?') : void 0;
1052
+ }
1053
+ }
1054
+
1055
+ return {
1056
+ $$typeof: REACT_FORWARD_REF_TYPE,
1057
+ render: render
1058
+ };
1059
+ }
1060
+
1006
1061
  var describeComponentFrame = function (name, source, ownerName) {
1007
1062
  return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
1008
1063
  };
1009
1064
 
1065
+ function isValidElementType(type) {
1066
+ return typeof type === 'string' || typeof type === 'function' ||
1067
+ // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1068
+ type === REACT_FRAGMENT_TYPE || type === REACT_ASYNC_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_TIMEOUT_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
1069
+ }
1070
+
1010
1071
  function getComponentName(fiber) {
1011
1072
  var type = fiber.type;
1012
1073
 
@@ -1017,14 +1078,29 @@ function getComponentName(fiber) {
1017
1078
  return type;
1018
1079
  }
1019
1080
  switch (type) {
1081
+ case REACT_ASYNC_MODE_TYPE:
1082
+ return 'AsyncMode';
1083
+ case REACT_CONTEXT_TYPE:
1084
+ return 'Context.Consumer';
1020
1085
  case REACT_FRAGMENT_TYPE:
1021
1086
  return 'ReactFragment';
1022
1087
  case REACT_PORTAL_TYPE:
1023
1088
  return 'ReactPortal';
1024
- case REACT_CALL_TYPE:
1025
- return 'ReactCall';
1026
- case REACT_RETURN_TYPE:
1027
- return 'ReactReturn';
1089
+ case REACT_PROFILER_TYPE:
1090
+ return 'Profiler(' + fiber.pendingProps.id + ')';
1091
+ case REACT_PROVIDER_TYPE:
1092
+ return 'Context.Provider';
1093
+ case REACT_STRICT_MODE_TYPE:
1094
+ return 'StrictMode';
1095
+ case REACT_TIMEOUT_TYPE:
1096
+ return 'Timeout';
1097
+ }
1098
+ if (typeof type === 'object' && type !== null) {
1099
+ switch (type.$$typeof) {
1100
+ case REACT_FORWARD_REF_TYPE:
1101
+ var functionName = type.render.displayName || type.render.name || '';
1102
+ return functionName !== '' ? 'ForwardRef(' + functionName + ')' : 'ForwardRef';
1103
+ }
1028
1104
  }
1029
1105
  return null;
1030
1106
  }
@@ -1042,8 +1118,6 @@ var propTypesMisspellWarningShown = void 0;
1042
1118
  var getDisplayName = function () {};
1043
1119
  var getStackAddendum = function () {};
1044
1120
 
1045
- var VALID_FRAGMENT_PROPS = void 0;
1046
-
1047
1121
  {
1048
1122
  currentlyValidatingElement = null;
1049
1123
 
@@ -1073,8 +1147,6 @@ var VALID_FRAGMENT_PROPS = void 0;
1073
1147
  stack += ReactDebugCurrentFrame.getStackAddendum() || '';
1074
1148
  return stack;
1075
1149
  };
1076
-
1077
- VALID_FRAGMENT_PROPS = new Map([['children', true], ['key', true]]);
1078
1150
  }
1079
1151
 
1080
1152
  function getDeclarationErrorAddendum() {
@@ -1220,7 +1292,7 @@ function validatePropTypes(element) {
1220
1292
  warning(false, 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
1221
1293
  }
1222
1294
  if (typeof componentClass.getDefaultProps === 'function') {
1223
- warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
1295
+ !componentClass.getDefaultProps.isReactClassApproved ? warning(false, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;
1224
1296
  }
1225
1297
  }
1226
1298
 
@@ -1234,7 +1306,7 @@ function validateFragmentProps(fragment) {
1234
1306
  var keys = Object.keys(fragment.props);
1235
1307
  for (var i = 0; i < keys.length; i++) {
1236
1308
  var key = keys[i];
1237
- if (!VALID_FRAGMENT_PROPS.has(key)) {
1309
+ if (key !== 'children' && key !== 'key') {
1238
1310
  warning(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.%s', key, getStackAddendum());
1239
1311
  break;
1240
1312
  }
@@ -1248,9 +1320,7 @@ function validateFragmentProps(fragment) {
1248
1320
  }
1249
1321
 
1250
1322
  function createElementWithValidation(type, props, children) {
1251
- var validType = typeof type === 'string' || typeof type === 'function' ||
1252
- // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1253
- type === REACT_FRAGMENT_TYPE || type === REACT_ASYNC_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_LOADING_TYPE || type === REACT_TIMEOUT_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE);
1323
+ var validType = isValidElementType(type);
1254
1324
 
1255
1325
  // We warn in this case but don't throw. We expect the element creation to
1256
1326
  // succeed and there will likely be errors in render.
@@ -1352,12 +1422,12 @@ var React = {
1352
1422
  PureComponent: PureComponent,
1353
1423
 
1354
1424
  createContext: createContext,
1425
+ forwardRef: forwardRef,
1355
1426
 
1356
1427
  Fragment: REACT_FRAGMENT_TYPE,
1357
1428
  StrictMode: REACT_STRICT_MODE_TYPE,
1358
1429
  unstable_AsyncMode: REACT_ASYNC_MODE_TYPE,
1359
- Loading: REACT_LOADING_TYPE,
1360
- Timeout: REACT_TIMEOUT_TYPE,
1430
+ unstable_Profiler: REACT_PROFILER_TYPE,
1361
1431
 
1362
1432
  createElement: createElementWithValidation,
1363
1433
  cloneElement: cloneElementWithValidation,
@@ -1373,6 +1443,10 @@ var React = {
1373
1443
  }
1374
1444
  };
1375
1445
 
1446
+ if (enableSuspense) {
1447
+ React.Timeout = REACT_TIMEOUT_TYPE;
1448
+ }
1449
+
1376
1450
  {
1377
1451
  _assign(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
1378
1452
  // These should not be included in production.
@@ -1393,7 +1467,7 @@ var React$3 = ( React$2 && React ) || React$2;
1393
1467
 
1394
1468
  // TODO: decide on the top-level export form.
1395
1469
  // This is hacky but makes it work with both Rollup and Jest.
1396
- var react = React$3['default'] ? React$3['default'] : React$3;
1470
+ var react = React$3.default ? React$3.default : React$3;
1397
1471
 
1398
1472
  module.exports = react;
1399
1473
  })();
@@ -1,4 +1,4 @@
1
- /** @license React v16.4.0-alpha.0911da3
1
+ /** @license React v16.4.0
2
2
  * react.production.min.js
3
3
  *
4
4
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -7,16 +7,16 @@
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
 
10
- 'use strict';var k=require("object-assign"),n=require("fbjs/lib/emptyObject"),p=require("fbjs/lib/emptyFunction"),q="function"===typeof Symbol&&Symbol["for"],r=q?Symbol["for"]("react.element"):60103,t=q?Symbol["for"]("react.portal"):60106,u=q?Symbol["for"]("react.fragment"):60107,v=q?Symbol["for"]("react.strict_mode"):60108,w=q?Symbol["for"]("react.provider"):60109,x=q?Symbol["for"]("react.context"):60110,y=q?Symbol["for"]("react.async_mode"):60111,z=q?Symbol["for"]("react.loading"):60122,A=q?Symbol["for"]("react.timeout"):
11
- 60123,B="function"===typeof Symbol&&Symbol.iterator;function C(a){for(var b=arguments.length-1,e="Minified React error #"+a+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\x3d"+a,c=0;c<b;c++)e+="\x26args[]\x3d"+encodeURIComponent(arguments[c+1]);b=Error(e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");b.name="Invariant Violation";b.framesToPop=1;throw b;}
12
- var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function E(a,b,e){this.props=a;this.context=b;this.refs=n;this.updater=e||D}E.prototype.isReactComponent={};E.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?C("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function F(){}
13
- F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=n;this.updater=e||D}var H=G.prototype=new F;H.constructor=G;k(H,E.prototype);H.isPureReactComponent=!0;var I={current:null},J=Object.prototype.hasOwnProperty,K={key:!0,ref:!0,__self:!0,__source:!0};
14
- function L(a,b,e){var c=void 0,d={},g=null,h=null;if(null!=b)for(c in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(g=""+b.key),b)J.call(b,c)&&!K.hasOwnProperty(c)&&(d[c]=b[c]);var f=arguments.length-2;if(1===f)d.children=e;else if(1<f){for(var l=Array(f),m=0;m<f;m++)l[m]=arguments[m+2];d.children=l}if(a&&a.defaultProps)for(c in f=a.defaultProps,f)void 0===d[c]&&(d[c]=f[c]);return{$$typeof:r,type:a,key:g,ref:h,props:d,_owner:I.current}}
15
- function M(a){return"object"===typeof a&&null!==a&&a.$$typeof===r}function escape(a){var b={"\x3d":"\x3d0",":":"\x3d2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var N=/\/+/g,O=[];function P(a,b,e,c){if(O.length){var d=O.pop();d.result=a;d.keyPrefix=b;d.func=e;d.context=c;d.count=0;return d}return{result:a,keyPrefix:b,func:e,context:c,count:0}}function Q(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>O.length&&O.push(a)}
16
- function R(a,b,e,c){var d=typeof a;if("undefined"===d||"boolean"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case r:case t:g=!0}}if(g)return e(c,a,""===b?"."+S(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var h=0;h<a.length;h++){d=a[h];var f=b+S(d,h);g+=R(d,f,e,c)}else if(null===a||"undefined"===typeof a?f=null:(f=B&&a[B]||a["@@iterator"],f="function"===typeof f?f:null),"function"===typeof f)for(a=f.call(a),
17
- h=0;!(d=a.next()).done;)d=d.value,f=b+S(d,h++),g+=R(d,f,e,c);else"object"===d&&(e=""+a,C("31","[object Object]"===e?"object with keys {"+Object.keys(a).join(", ")+"}":e,""));return g}function S(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function T(a,b){a.func.call(a.context,b,a.count++)}
18
- function U(a,b,e){var c=a.result,d=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?V(a,c,e,p.thatReturnsArgument):null!=a&&(M(a)&&(b=d+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(N,"$\x26/")+"/")+e,a={$$typeof:r,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}),c.push(a))}function V(a,b,e,c,d){var g="";null!=e&&(g=(""+e).replace(N,"$\x26/")+"/");b=P(b,g,c,d);null==a||R(a,"",U,b);Q(b)}
19
- var W={Children:{map:function(a,b,e){if(null==a)return a;var c=[];V(a,c,null,b,e);return c},forEach:function(a,b,e){if(null==a)return a;b=P(null,null,b,e);null==a||R(a,"",T,b);Q(b)},count:function(a){return null==a?0:R(a,"",p.thatReturnsNull,null)},toArray:function(a){var b=[];V(a,b,null,p.thatReturnsArgument);return b},only:function(a){M(a)?void 0:C("143");return a}},createRef:function(){return{value:null}},Component:E,PureComponent:G,createContext:function(a,b){void 0===b&&(b=null);a={$$typeof:x,
20
- calculateChangedBits:b,defaultValue:a,currentValue:a,changedBits:0,Provider:null,Consumer:null};a.Provider={$$typeof:w,context:a};return a.Consumer=a},Fragment:u,StrictMode:v,unstable_AsyncMode:y,Loading:z,Timeout:A,createElement:L,cloneElement:function(a,b,e){var c=void 0,d=k({},a.props),g=a.key,h=a.ref,f=a._owner;if(null!=b){void 0!==b.ref&&(h=b.ref,f=I.current);void 0!==b.key&&(g=""+b.key);var l=void 0;a.type&&a.type.defaultProps&&(l=a.type.defaultProps);for(c in b)J.call(b,c)&&!K.hasOwnProperty(c)&&
21
- (d[c]=void 0===b[c]&&void 0!==l?l[c]:b[c])}c=arguments.length-2;if(1===c)d.children=e;else if(1<c){l=Array(c);for(var m=0;m<c;m++)l[m]=arguments[m+2];d.children=l}return{$$typeof:r,type:a.type,key:g,ref:h,props:d,_owner:f}},createFactory:function(a){var b=L.bind(null,a);b.type=a;return b},isValidElement:M,version:"16.4.0-alpha.0911da3",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:I,assign:k}},X=Object.freeze({default:W}),Y=X&&W||X;
22
- module.exports=Y["default"]?Y["default"]:Y;
10
+ 'use strict';var k=require("object-assign"),n=require("fbjs/lib/invariant"),p=require("fbjs/lib/emptyObject"),q=require("fbjs/lib/emptyFunction"),r="function"===typeof Symbol&&Symbol.for,t=r?Symbol.for("react.element"):60103,u=r?Symbol.for("react.portal"):60106,v=r?Symbol.for("react.fragment"):60107,w=r?Symbol.for("react.strict_mode"):60108,x=r?Symbol.for("react.profiler"):60114,y=r?Symbol.for("react.provider"):60109,z=r?Symbol.for("react.context"):60110,A=r?Symbol.for("react.async_mode"):60111,B=
11
+ r?Symbol.for("react.forward_ref"):60112;r&&Symbol.for("react.timeout");var C="function"===typeof Symbol&&Symbol.iterator;function D(a){for(var b=arguments.length-1,e="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=0;c<b;c++)e+="&args[]="+encodeURIComponent(arguments[c+1]);n(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",e)}
12
+ var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function F(a,b,e){this.props=a;this.context=b;this.refs=p;this.updater=e||E}F.prototype.isReactComponent={};F.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?D("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};F.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function G(){}
13
+ G.prototype=F.prototype;function H(a,b,e){this.props=a;this.context=b;this.refs=p;this.updater=e||E}var I=H.prototype=new G;I.constructor=H;k(I,F.prototype);I.isPureReactComponent=!0;var J={current:null},K=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0};
14
+ function M(a,b,e){var c=void 0,d={},g=null,h=null;if(null!=b)for(c in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(g=""+b.key),b)K.call(b,c)&&!L.hasOwnProperty(c)&&(d[c]=b[c]);var f=arguments.length-2;if(1===f)d.children=e;else if(1<f){for(var l=Array(f),m=0;m<f;m++)l[m]=arguments[m+2];d.children=l}if(a&&a.defaultProps)for(c in f=a.defaultProps,f)void 0===d[c]&&(d[c]=f[c]);return{$$typeof:t,type:a,key:g,ref:h,props:d,_owner:J.current}}
15
+ function N(a){return"object"===typeof a&&null!==a&&a.$$typeof===t}function escape(a){var b={"=":"=0",":":"=2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var O=/\/+/g,P=[];function Q(a,b,e,c){if(P.length){var d=P.pop();d.result=a;d.keyPrefix=b;d.func=e;d.context=c;d.count=0;return d}return{result:a,keyPrefix:b,func:e,context:c,count:0}}function R(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>P.length&&P.push(a)}
16
+ function S(a,b,e,c){var d=typeof a;if("undefined"===d||"boolean"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case t:case u:g=!0}}if(g)return e(c,a,""===b?"."+T(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var h=0;h<a.length;h++){d=a[h];var f=b+T(d,h);g+=S(d,f,e,c)}else if(null===a||"undefined"===typeof a?f=null:(f=C&&a[C]||a["@@iterator"],f="function"===typeof f?f:null),"function"===typeof f)for(a=f.call(a),
17
+ h=0;!(d=a.next()).done;)d=d.value,f=b+T(d,h++),g+=S(d,f,e,c);else"object"===d&&(e=""+a,D("31","[object Object]"===e?"object with keys {"+Object.keys(a).join(", ")+"}":e,""));return g}function T(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function U(a,b){a.func.call(a.context,b,a.count++)}
18
+ function V(a,b,e){var c=a.result,d=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?W(a,c,e,q.thatReturnsArgument):null!=a&&(N(a)&&(b=d+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(O,"$&/")+"/")+e,a={$$typeof:t,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}),c.push(a))}function W(a,b,e,c,d){var g="";null!=e&&(g=(""+e).replace(O,"$&/")+"/");b=Q(b,g,c,d);null==a||S(a,"",V,b);R(b)}
19
+ var X={Children:{map:function(a,b,e){if(null==a)return a;var c=[];W(a,c,null,b,e);return c},forEach:function(a,b,e){if(null==a)return a;b=Q(null,null,b,e);null==a||S(a,"",U,b);R(b)},count:function(a){return null==a?0:S(a,"",q.thatReturnsNull,null)},toArray:function(a){var b=[];W(a,b,null,q.thatReturnsArgument);return b},only:function(a){N(a)?void 0:D("143");return a}},createRef:function(){return{current:null}},Component:F,PureComponent:H,createContext:function(a,b){void 0===b&&(b=null);a={$$typeof:z,
20
+ _calculateChangedBits:b,_defaultValue:a,_currentValue:a,_currentValue2:a,_changedBits:0,_changedBits2:0,Provider:null,Consumer:null};a.Provider={$$typeof:y,_context:a};return a.Consumer=a},forwardRef:function(a){return{$$typeof:B,render:a}},Fragment:v,StrictMode:w,unstable_AsyncMode:A,unstable_Profiler:x,createElement:M,cloneElement:function(a,b,e){null===a||void 0===a?D("267",a):void 0;var c=void 0,d=k({},a.props),g=a.key,h=a.ref,f=a._owner;if(null!=b){void 0!==b.ref&&(h=b.ref,f=J.current);void 0!==
21
+ b.key&&(g=""+b.key);var l=void 0;a.type&&a.type.defaultProps&&(l=a.type.defaultProps);for(c in b)K.call(b,c)&&!L.hasOwnProperty(c)&&(d[c]=void 0===b[c]&&void 0!==l?l[c]:b[c])}c=arguments.length-2;if(1===c)d.children=e;else if(1<c){l=Array(c);for(var m=0;m<c;m++)l[m]=arguments[m+2];d.children=l}return{$$typeof:t,type:a.type,key:g,ref:h,props:d,_owner:f}},createFactory:function(a){var b=M.bind(null,a);b.type=a;return b},isValidElement:N,version:"16.4.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:J,
22
+ assign:k}},Y={default:X},Z=Y&&X||Y;module.exports=Z.default?Z.default:Z;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "keywords": [
5
5
  "react"
6
6
  ],
7
- "version": "16.4.0-alpha.0911da3",
7
+ "version": "16.4.0",
8
8
  "homepage": "https://reactjs.org/",
9
9
  "bugs": "https://github.com/facebook/react/issues",
10
10
  "license": "MIT",
@@ -1,4 +1,4 @@
1
- /** @license React v16.4.0-alpha.0911da3
1
+ /** @license React v16.4.0
2
2
  * react.development.js
3
3
  *
4
4
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -108,23 +108,22 @@ var objectAssign = shouldUseNative() ? Object.assign : function (target, source)
108
108
 
109
109
  // TODO: this is special because it gets imported during build.
110
110
 
111
- var ReactVersion = '16.4.0-alpha.0911da3';
111
+ var ReactVersion = '16.4.0';
112
112
 
113
113
  // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
114
114
  // nor polyfill, then a plain number is used for performance.
115
- var hasSymbol = typeof Symbol === 'function' && Symbol['for'];
116
-
117
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol['for']('react.element') : 0xeac7;
118
- var REACT_CALL_TYPE = hasSymbol ? Symbol['for']('react.call') : 0xeac8;
119
- var REACT_RETURN_TYPE = hasSymbol ? Symbol['for']('react.return') : 0xeac9;
120
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol['for']('react.portal') : 0xeaca;
121
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol['for']('react.fragment') : 0xeacb;
122
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol['for']('react.strict_mode') : 0xeacc;
123
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol['for']('react.provider') : 0xeacd;
124
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol['for']('react.context') : 0xeace;
125
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol['for']('react.async_mode') : 0xeacf;
126
- var REACT_LOADING_TYPE = hasSymbol ? Symbol['for']('react.loading') : 0xeada;
127
- var REACT_TIMEOUT_TYPE = hasSymbol ? Symbol['for']('react.timeout') : 0xeadb;
115
+ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
116
+
117
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
118
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
119
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
120
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
121
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
122
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
123
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
124
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
125
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
126
+ var REACT_TIMEOUT_TYPE = hasSymbol ? Symbol.for('react.timeout') : 0xead1;
128
127
 
129
128
  var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
130
129
  var FAUX_ITERATOR_SYMBOL = '@@iterator';
@@ -140,31 +139,6 @@ function getIteratorFn(maybeIterable) {
140
139
  return null;
141
140
  }
142
141
 
143
- /**
144
- * WARNING: DO NOT manually require this module.
145
- * This is a replacement for `invariant(...)` used by the error code system
146
- * and will _only_ be required by the corresponding babel pass.
147
- * It always throws.
148
- */
149
-
150
- /**
151
- * Copyright (c) 2013-present, Facebook, Inc.
152
- *
153
- * This source code is licensed under the MIT license found in the
154
- * LICENSE file in the root directory of this source tree.
155
- *
156
- */
157
-
158
-
159
-
160
- var emptyObject = {};
161
-
162
- {
163
- Object.freeze(emptyObject);
164
- }
165
-
166
- var emptyObject_1 = emptyObject;
167
-
168
142
  /**
169
143
  * Copyright (c) 2013-present, Facebook, Inc.
170
144
  *
@@ -219,6 +193,62 @@ function invariant(condition, format, a, b, c, d, e, f) {
219
193
 
220
194
  var invariant_1 = invariant;
221
195
 
196
+ // Relying on the `invariant()` implementation lets us
197
+ // have preserve the format and params in the www builds.
198
+
199
+ // Exports ReactDOM.createRoot
200
+
201
+
202
+ // Experimental error-boundary API that can recover from errors within a single
203
+ // render phase
204
+
205
+ // Suspense
206
+ var enableSuspense = false;
207
+ // Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
208
+
209
+
210
+ // In some cases, StrictMode should also double-render lifecycles.
211
+ // This can be confusing for tests though,
212
+ // And it can be bad for performance in production.
213
+ // This feature flag can be used to control the behavior:
214
+
215
+
216
+ // To preserve the "Pause on caught exceptions" behavior of the debugger, we
217
+ // replay the begin phase of a failed component inside invokeGuardedCallback.
218
+
219
+
220
+ // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
221
+
222
+
223
+ // Warn about legacy context API
224
+
225
+
226
+ // Gather advanced timing metrics for Profiler subtrees.
227
+
228
+
229
+ // Fires getDerivedStateFromProps for state *or* props changes
230
+
231
+
232
+ // Only used in www builds.
233
+
234
+ /**
235
+ * Copyright (c) 2013-present, Facebook, Inc.
236
+ *
237
+ * This source code is licensed under the MIT license found in the
238
+ * LICENSE file in the root directory of this source tree.
239
+ *
240
+ */
241
+
242
+
243
+
244
+ var emptyObject = {};
245
+
246
+ {
247
+ Object.freeze(emptyObject);
248
+ }
249
+
250
+ var emptyObject_1 = emptyObject;
251
+
222
252
  /**
223
253
  * Forked from fbjs/warning:
224
254
  * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
@@ -380,7 +410,7 @@ function warnNoop(publicInstance, callerName) {
380
410
  if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
381
411
  return;
382
412
  }
383
- warning_1(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op.\n\nPlease check the code for the %s component.', callerName, callerName, componentName);
413
+ warning_1(false, "Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
384
414
  didWarnStateUpdateForUnmountedComponent[warningKey] = true;
385
415
  }
386
416
  }
@@ -562,7 +592,7 @@ pureComponentPrototype.isPureReactComponent = true;
562
592
  // an immutable object with a single mutable value
563
593
  function createRef() {
564
594
  var refObject = {
565
- value: null
595
+ current: null
566
596
  };
567
597
  {
568
598
  Object.seal(refObject);
@@ -670,7 +700,7 @@ function defineRefPropWarningGetter(props, displayName) {
670
700
  */
671
701
  var ReactElement = function (type, key, ref, self, source, owner, props) {
672
702
  var element = {
673
- // This tag allow us to uniquely identify this as a React Element
703
+ // This tag allows us to uniquely identify this as a React Element
674
704
  $$typeof: REACT_ELEMENT_TYPE,
675
705
 
676
706
  // Built-in properties that belong on the element
@@ -817,6 +847,8 @@ function cloneAndReplaceKey(oldElement, newKey) {
817
847
  * See https://reactjs.org/docs/react-api.html#cloneelement
818
848
  */
819
849
  function cloneElement(element, config, children) {
850
+ !!(element === null || element === undefined) ? invariant_1(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0;
851
+
820
852
  var propName = void 0;
821
853
 
822
854
  // Original props are copied
@@ -1031,7 +1063,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
1031
1063
  {
1032
1064
  // Warn about using Maps as children
1033
1065
  if (iteratorFn === children.entries) {
1034
- warning_1(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', ReactDebugCurrentFrame.getStackAddendum());
1066
+ !didWarnAboutMaps ? warning_1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', ReactDebugCurrentFrame.getStackAddendum()) : void 0;
1035
1067
  didWarnAboutMaps = true;
1036
1068
  }
1037
1069
  }
@@ -1189,7 +1221,7 @@ function mapChildren(children, func, context) {
1189
1221
  * @param {?*} children Children tree container.
1190
1222
  * @return {number} The number of children.
1191
1223
  */
1192
- function countChildren(children, context) {
1224
+ function countChildren(children) {
1193
1225
  return traverseAllChildren(children, emptyFunction_1.thatReturnsNull, null);
1194
1226
  }
1195
1227
 
@@ -1229,16 +1261,23 @@ function createContext(defaultValue, calculateChangedBits) {
1229
1261
  calculateChangedBits = null;
1230
1262
  } else {
1231
1263
  {
1232
- warning_1(calculateChangedBits === null || typeof calculateChangedBits === 'function', 'createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits);
1264
+ !(calculateChangedBits === null || typeof calculateChangedBits === 'function') ? warning_1(false, 'createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits) : void 0;
1233
1265
  }
1234
1266
  }
1235
1267
 
1236
1268
  var context = {
1237
1269
  $$typeof: REACT_CONTEXT_TYPE,
1238
- calculateChangedBits: calculateChangedBits,
1239
- defaultValue: defaultValue,
1240
- currentValue: defaultValue,
1241
- changedBits: 0,
1270
+ _calculateChangedBits: calculateChangedBits,
1271
+ _defaultValue: defaultValue,
1272
+ _currentValue: defaultValue,
1273
+ // As a workaround to support multiple concurrent renderers, we categorize
1274
+ // some renderers as primary and others as secondary. We only expect
1275
+ // there to be two concurrent renderers at most: React Native (primary) and
1276
+ // Fabric (secondary); React DOM (primary) and React ART (secondary).
1277
+ // Secondary renderers store their context values on separate fields.
1278
+ _currentValue2: defaultValue,
1279
+ _changedBits: 0,
1280
+ _changedBits2: 0,
1242
1281
  // These are circular
1243
1282
  Provider: null,
1244
1283
  Consumer: null
@@ -1246,21 +1285,43 @@ function createContext(defaultValue, calculateChangedBits) {
1246
1285
 
1247
1286
  context.Provider = {
1248
1287
  $$typeof: REACT_PROVIDER_TYPE,
1249
- context: context
1288
+ _context: context
1250
1289
  };
1251
1290
  context.Consumer = context;
1252
1291
 
1253
1292
  {
1254
1293
  context._currentRenderer = null;
1294
+ context._currentRenderer2 = null;
1255
1295
  }
1256
1296
 
1257
1297
  return context;
1258
1298
  }
1259
1299
 
1300
+ function forwardRef(render) {
1301
+ {
1302
+ !(typeof render === 'function') ? warning_1(false, 'forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render) : void 0;
1303
+
1304
+ if (render != null) {
1305
+ !(render.defaultProps == null && render.propTypes == null) ? warning_1(false, 'forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?') : void 0;
1306
+ }
1307
+ }
1308
+
1309
+ return {
1310
+ $$typeof: REACT_FORWARD_REF_TYPE,
1311
+ render: render
1312
+ };
1313
+ }
1314
+
1260
1315
  var describeComponentFrame = function (name, source, ownerName) {
1261
1316
  return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
1262
1317
  };
1263
1318
 
1319
+ function isValidElementType(type) {
1320
+ return typeof type === 'string' || typeof type === 'function' ||
1321
+ // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1322
+ type === REACT_FRAGMENT_TYPE || type === REACT_ASYNC_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_TIMEOUT_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
1323
+ }
1324
+
1264
1325
  function getComponentName(fiber) {
1265
1326
  var type = fiber.type;
1266
1327
 
@@ -1271,14 +1332,29 @@ function getComponentName(fiber) {
1271
1332
  return type;
1272
1333
  }
1273
1334
  switch (type) {
1335
+ case REACT_ASYNC_MODE_TYPE:
1336
+ return 'AsyncMode';
1337
+ case REACT_CONTEXT_TYPE:
1338
+ return 'Context.Consumer';
1274
1339
  case REACT_FRAGMENT_TYPE:
1275
1340
  return 'ReactFragment';
1276
1341
  case REACT_PORTAL_TYPE:
1277
1342
  return 'ReactPortal';
1278
- case REACT_CALL_TYPE:
1279
- return 'ReactCall';
1280
- case REACT_RETURN_TYPE:
1281
- return 'ReactReturn';
1343
+ case REACT_PROFILER_TYPE:
1344
+ return 'Profiler(' + fiber.pendingProps.id + ')';
1345
+ case REACT_PROVIDER_TYPE:
1346
+ return 'Context.Provider';
1347
+ case REACT_STRICT_MODE_TYPE:
1348
+ return 'StrictMode';
1349
+ case REACT_TIMEOUT_TYPE:
1350
+ return 'Timeout';
1351
+ }
1352
+ if (typeof type === 'object' && type !== null) {
1353
+ switch (type.$$typeof) {
1354
+ case REACT_FORWARD_REF_TYPE:
1355
+ var functionName = type.render.displayName || type.render.name || '';
1356
+ return functionName !== '' ? 'ForwardRef(' + functionName + ')' : 'ForwardRef';
1357
+ }
1282
1358
  }
1283
1359
  return null;
1284
1360
  }
@@ -1369,8 +1445,6 @@ var propTypesMisspellWarningShown = void 0;
1369
1445
  var getDisplayName = function () {};
1370
1446
  var getStackAddendum = function () {};
1371
1447
 
1372
- var VALID_FRAGMENT_PROPS = void 0;
1373
-
1374
1448
  {
1375
1449
  currentlyValidatingElement = null;
1376
1450
 
@@ -1400,8 +1474,6 @@ var VALID_FRAGMENT_PROPS = void 0;
1400
1474
  stack += ReactDebugCurrentFrame.getStackAddendum() || '';
1401
1475
  return stack;
1402
1476
  };
1403
-
1404
- VALID_FRAGMENT_PROPS = new Map([['children', true], ['key', true]]);
1405
1477
  }
1406
1478
 
1407
1479
  function getDeclarationErrorAddendum() {
@@ -1547,7 +1619,7 @@ function validatePropTypes(element) {
1547
1619
  warning_1(false, 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
1548
1620
  }
1549
1621
  if (typeof componentClass.getDefaultProps === 'function') {
1550
- warning_1(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
1622
+ !componentClass.getDefaultProps.isReactClassApproved ? warning_1(false, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;
1551
1623
  }
1552
1624
  }
1553
1625
 
@@ -1561,7 +1633,7 @@ function validateFragmentProps(fragment) {
1561
1633
  var keys = Object.keys(fragment.props);
1562
1634
  for (var i = 0; i < keys.length; i++) {
1563
1635
  var key = keys[i];
1564
- if (!VALID_FRAGMENT_PROPS.has(key)) {
1636
+ if (key !== 'children' && key !== 'key') {
1565
1637
  warning_1(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.%s', key, getStackAddendum());
1566
1638
  break;
1567
1639
  }
@@ -1575,9 +1647,7 @@ function validateFragmentProps(fragment) {
1575
1647
  }
1576
1648
 
1577
1649
  function createElementWithValidation(type, props, children) {
1578
- var validType = typeof type === 'string' || typeof type === 'function' ||
1579
- // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1580
- type === REACT_FRAGMENT_TYPE || type === REACT_ASYNC_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_LOADING_TYPE || type === REACT_TIMEOUT_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE);
1650
+ var validType = isValidElementType(type);
1581
1651
 
1582
1652
  // We warn in this case but don't throw. We expect the element creation to
1583
1653
  // succeed and there will likely be errors in render.
@@ -1679,12 +1749,12 @@ var React = {
1679
1749
  PureComponent: PureComponent,
1680
1750
 
1681
1751
  createContext: createContext,
1752
+ forwardRef: forwardRef,
1682
1753
 
1683
1754
  Fragment: REACT_FRAGMENT_TYPE,
1684
1755
  StrictMode: REACT_STRICT_MODE_TYPE,
1685
1756
  unstable_AsyncMode: REACT_ASYNC_MODE_TYPE,
1686
- Loading: REACT_LOADING_TYPE,
1687
- Timeout: REACT_TIMEOUT_TYPE,
1757
+ unstable_Profiler: REACT_PROFILER_TYPE,
1688
1758
 
1689
1759
  createElement: createElementWithValidation,
1690
1760
  cloneElement: cloneElementWithValidation,
@@ -1700,6 +1770,10 @@ var React = {
1700
1770
  }
1701
1771
  };
1702
1772
 
1773
+ if (enableSuspense) {
1774
+ React.Timeout = REACT_TIMEOUT_TYPE;
1775
+ }
1776
+
1703
1777
  {
1704
1778
  objectAssign(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
1705
1779
  // These should not be included in production.
@@ -1720,7 +1794,7 @@ var React$3 = ( React$2 && React ) || React$2;
1720
1794
 
1721
1795
  // TODO: decide on the top-level export form.
1722
1796
  // This is hacky but makes it work with both Rollup and Jest.
1723
- var react = React$3['default'] ? React$3['default'] : React$3;
1797
+ var react = React$3.default ? React$3.default : React$3;
1724
1798
 
1725
1799
  return react;
1726
1800
 
@@ -1,4 +1,4 @@
1
- /** @license React v16.4.0-alpha.0911da3
1
+ /** @license React v16.4.0
2
2
  * react.production.min.js
3
3
  *
4
4
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -6,16 +6,17 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- 'use strict';(function(p,l){"object"===typeof exports&&"undefined"!==typeof module?module.exports=l():"function"===typeof define&&define.amd?define(l):p.React=l()})(this,function(){function p(a){for(var b=arguments.length-1,d="Minified React error #"+a+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\x3d"+a,c=0;c<b;c++)d+="\x26args[]\x3d"+encodeURIComponent(arguments[c+1]);b=Error(d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");
10
- b.name="Invariant Violation";b.framesToPop=1;throw b;}function l(a){return function(){return a}}function n(a,b,d){this.props=a;this.context=b;this.refs=C;this.updater=d||D}function E(){}function u(a,b,d){this.props=a;this.context=b;this.refs=C;this.updater=d||D}function F(a,b,d){var c=void 0,e={},h=null,G=null;if(null!=b)for(c in void 0!==b.ref&&(G=b.ref),void 0!==b.key&&(h=""+b.key),b)H.call(b,c)&&!I.hasOwnProperty(c)&&(e[c]=b[c]);var g=arguments.length-2;if(1===g)e.children=d;else if(1<g){for(var k=
11
- Array(g),f=0;f<g;f++)k[f]=arguments[f+2];e.children=k}if(a&&a.defaultProps)for(c in g=a.defaultProps,g)void 0===e[c]&&(e[c]=g[c]);return{$$typeof:q,type:a,key:h,ref:G,props:e,_owner:v.current}}function w(a){return"object"===typeof a&&null!==a&&a.$$typeof===q}function O(a){var b={"\x3d":"\x3d0",":":"\x3d2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}function J(a,b,d,c){if(t.length){var e=t.pop();e.result=a;e.keyPrefix=b;e.func=d;e.context=c;e.count=0;return e}return{result:a,keyPrefix:b,
12
- func:d,context:c,count:0}}function K(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>t.length&&t.push(a)}function r(a,b,d,c){var e=typeof a;if("undefined"===e||"boolean"===e)a=null;var h=!1;if(null===a)h=!0;else switch(e){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case q:case P:h=!0}}if(h)return d(c,a,""===b?"."+x(a,0):b),1;h=0;b=""===b?".":b+":";if(Array.isArray(a))for(var f=0;f<a.length;f++){e=a[f];var g=b+x(e,f);h+=r(e,g,d,c)}else if(null===
13
- a||"undefined"===typeof a?g=null:(g=L&&a[L]||a["@@iterator"],g="function"===typeof g?g:null),"function"===typeof g)for(a=g.call(a),f=0;!(e=a.next()).done;)e=e.value,g=b+x(e,f++),h+=r(e,g,d,c);else"object"===e&&(d=""+a,p("31","[object Object]"===d?"object with keys {"+Object.keys(a).join(", ")+"}":d,""));return h}function x(a,b){return"object"===typeof a&&null!==a&&null!=a.key?O(a.key):b.toString(36)}function Q(a,b,d){a.func.call(a.context,b,a.count++)}function R(a,b,d){var c=a.result,e=a.keyPrefix;
14
- a=a.func.call(a.context,b,a.count++);Array.isArray(a)?y(a,c,d,z.thatReturnsArgument):null!=a&&(w(a)&&(b=e+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(M,"$\x26/")+"/")+d,a={$$typeof:q,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}),c.push(a))}function y(a,b,d,c,e){var h="";null!=d&&(h=(""+d).replace(M,"$\x26/")+"/");b=J(b,h,c,e);null==a||r(a,"",R,b);K(b)}var N=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,A=function(){try{if(!Object.assign)return!1;
15
- var a=new String("abc");a[5]="de";if("5"===Object.getOwnPropertyNames(a)[0])return!1;var b={};for(a=0;10>a;a++)b["_"+String.fromCharCode(a)]=a;if("0123456789"!==Object.getOwnPropertyNames(b).map(function(a){return b[a]}).join(""))return!1;var d={};"abcdefghijklmnopqrst".split("").forEach(function(a){d[a]=a});return"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},d)).join("")?!1:!0}catch(c){return!1}}()?Object.assign:function(a,b){if(null===a||void 0===a)throw new TypeError("Object.assign cannot be called with null or undefined");
16
- var d=Object(a);for(var c,e=1;e<arguments.length;e++){var h=Object(arguments[e]);for(var f in h)S.call(h,f)&&(d[f]=h[f]);if(N){c=N(h);for(var g=0;g<c.length;g++)T.call(h,c[g])&&(d[c[g]]=h[c[g]])}}return d},k="function"===typeof Symbol&&Symbol["for"],q=k?Symbol["for"]("react.element"):60103,P=k?Symbol["for"]("react.portal"):60106,m=k?Symbol["for"]("react.fragment"):60107,B=k?Symbol["for"]("react.strict_mode"):60108,U=k?Symbol["for"]("react.provider"):60109,V=k?Symbol["for"]("react.context"):60110,
17
- W=k?Symbol["for"]("react.async_mode"):60111,X=k?Symbol["for"]("react.loading"):60122;k=k?Symbol["for"]("react.timeout"):60123;var L="function"===typeof Symbol&&Symbol.iterator,C={},f=function(){};f.thatReturns=l;f.thatReturnsFalse=l(!1);f.thatReturnsTrue=l(!0);f.thatReturnsNull=l(null);f.thatReturnsThis=function(){return this};f.thatReturnsArgument=function(a){return a};var z=f,D={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,d){},enqueueReplaceState:function(a,b,d,c){},enqueueSetState:function(a,
18
- b,d,c){}};n.prototype.isReactComponent={};n.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?p("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};n.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};E.prototype=n.prototype;f=u.prototype=new E;f.constructor=u;A(f,n.prototype);f.isPureReactComponent=!0;var v={current:null},H=Object.prototype.hasOwnProperty,I={key:!0,ref:!0,__self:!0,__source:!0},M=/\/+/g,t=[];m={Children:{map:function(a,
19
- b,d){if(null==a)return a;var c=[];y(a,c,null,b,d);return c},forEach:function(a,b,d){if(null==a)return a;b=J(null,null,b,d);null==a||r(a,"",Q,b);K(b)},count:function(a,b){return null==a?0:r(a,"",z.thatReturnsNull,null)},toArray:function(a){var b=[];y(a,b,null,z.thatReturnsArgument);return b},only:function(a){w(a)?void 0:p("143");return a}},createRef:function(){return{value:null}},Component:n,PureComponent:u,createContext:function(a,b){void 0===b&&(b=null);a={$$typeof:V,calculateChangedBits:b,defaultValue:a,
20
- currentValue:a,changedBits:0,Provider:null,Consumer:null};a.Provider={$$typeof:U,context:a};return a.Consumer=a},Fragment:m,StrictMode:B,unstable_AsyncMode:W,Loading:X,Timeout:k,createElement:F,cloneElement:function(a,b,d){var c=void 0,e=A({},a.props),f=a.key,k=a.ref,g=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,g=v.current);void 0!==b.key&&(f=""+b.key);var l=void 0;a.type&&a.type.defaultProps&&(l=a.type.defaultProps);for(c in b)H.call(b,c)&&!I.hasOwnProperty(c)&&(e[c]=void 0===b[c]&&void 0!==l?
21
- l[c]:b[c])}c=arguments.length-2;if(1===c)e.children=d;else if(1<c){l=Array(c);for(var m=0;m<c;m++)l[m]=arguments[m+2];e.children=l}return{$$typeof:q,type:a.type,key:f,ref:k,props:e,_owner:g}},createFactory:function(a){var b=F.bind(null,a);b.type=a;return b},isValidElement:w,version:"16.4.0-alpha.0911da3",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:v,assign:A}};m=(B=Object.freeze({default:m}))&&m||B;return m["default"]?m["default"]:m});
9
+ 'use strict';(function(p,h){"object"===typeof exports&&"undefined"!==typeof module?module.exports=h():"function"===typeof define&&define.amd?define(h):p.React=h()})(this,function(){function p(a){for(var b=arguments.length-1,f="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=0;d<b;d++)f+="&args[]="+encodeURIComponent(arguments[d+1]);O(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",
10
+ f)}function h(a){return function(){return a}}function q(a,b,f){this.props=a;this.context=b;this.refs=D;this.updater=f||E}function F(){}function v(a,b,f){this.props=a;this.context=b;this.refs=D;this.updater=f||E}function G(a,b,f){var d=void 0,e={},k=null,c=null;if(null!=b)for(d in void 0!==b.ref&&(c=b.ref),void 0!==b.key&&(k=""+b.key),b)H.call(b,d)&&!I.hasOwnProperty(d)&&(e[d]=b[d]);var g=arguments.length-2;if(1===g)e.children=f;else if(1<g){for(var m=Array(g),l=0;l<g;l++)m[l]=arguments[l+2];e.children=
11
+ m}if(a&&a.defaultProps)for(d in g=a.defaultProps,g)void 0===e[d]&&(e[d]=g[d]);return{$$typeof:r,type:a,key:k,ref:c,props:e,_owner:w.current}}function x(a){return"object"===typeof a&&null!==a&&a.$$typeof===r}function P(a){var b={"=":"=0",":":"=2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}function J(a,b,f,d){if(u.length){var e=u.pop();e.result=a;e.keyPrefix=b;e.func=f;e.context=d;e.count=0;return e}return{result:a,keyPrefix:b,func:f,context:d,count:0}}function K(a){a.result=null;a.keyPrefix=
12
+ null;a.func=null;a.context=null;a.count=0;10>u.length&&u.push(a)}function t(a,b,f,d){var e=typeof a;if("undefined"===e||"boolean"===e)a=null;var k=!1;if(null===a)k=!0;else switch(e){case "string":case "number":k=!0;break;case "object":switch(a.$$typeof){case r:case Q:k=!0}}if(k)return f(d,a,""===b?"."+y(a,0):b),1;k=0;b=""===b?".":b+":";if(Array.isArray(a))for(var c=0;c<a.length;c++){e=a[c];var g=b+y(e,c);k+=t(e,g,f,d)}else if(null===a||"undefined"===typeof a?g=null:(g=L&&a[L]||a["@@iterator"],g="function"===
13
+ typeof g?g:null),"function"===typeof g)for(a=g.call(a),c=0;!(e=a.next()).done;)e=e.value,g=b+y(e,c++),k+=t(e,g,f,d);else"object"===e&&(f=""+a,p("31","[object Object]"===f?"object with keys {"+Object.keys(a).join(", ")+"}":f,""));return k}function y(a,b){return"object"===typeof a&&null!==a&&null!=a.key?P(a.key):b.toString(36)}function R(a,b,f){a.func.call(a.context,b,a.count++)}function S(a,b,f){var d=a.result,e=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?z(a,d,f,A.thatReturnsArgument):
14
+ null!=a&&(x(a)&&(b=e+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(M,"$&/")+"/")+f,a={$$typeof:r,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}),d.push(a))}function z(a,b,f,d,e){var c="";null!=f&&(c=(""+f).replace(M,"$&/")+"/");b=J(b,c,d,e);null==a||t(a,"",S,b);K(b)}var N=Object.getOwnPropertySymbols,T=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable,B=function(){try{if(!Object.assign)return!1;var a=new String("abc");a[5]="de";if("5"===Object.getOwnPropertyNames(a)[0])return!1;
15
+ var b={};for(a=0;10>a;a++)b["_"+String.fromCharCode(a)]=a;if("0123456789"!==Object.getOwnPropertyNames(b).map(function(a){return b[a]}).join(""))return!1;var f={};"abcdefghijklmnopqrst".split("").forEach(function(a){f[a]=a});return"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},f)).join("")?!1:!0}catch(d){return!1}}()?Object.assign:function(a,b){if(null===a||void 0===a)throw new TypeError("Object.assign cannot be called with null or undefined");var f=Object(a);for(var d,e=1;e<arguments.length;e++){var c=
16
+ Object(arguments[e]);for(var h in c)T.call(c,h)&&(f[h]=c[h]);if(N){d=N(c);for(var g=0;g<d.length;g++)U.call(c,d[g])&&(f[d[g]]=c[d[g]])}}return f},c="function"===typeof Symbol&&Symbol.for,r=c?Symbol.for("react.element"):60103,Q=c?Symbol.for("react.portal"):60106,n=c?Symbol.for("react.fragment"):60107,C=c?Symbol.for("react.strict_mode"):60108,V=c?Symbol.for("react.profiler"):60114,W=c?Symbol.for("react.provider"):60109,X=c?Symbol.for("react.context"):60110,Y=c?Symbol.for("react.async_mode"):60111,Z=
17
+ c?Symbol.for("react.forward_ref"):60112;c&&Symbol.for("react.timeout");var L="function"===typeof Symbol&&Symbol.iterator,O=function(a,b,f,d,c,k,h,g){if(!a){if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var e=[f,d,c,k,h,g],l=0;a=Error(b.replace(/%s/g,function(){return e[l++]}));a.name="Invariant Violation"}a.framesToPop=1;throw a;}},D={};c=function(){};c.thatReturns=h;c.thatReturnsFalse=h(!1);
18
+ c.thatReturnsTrue=h(!0);c.thatReturnsNull=h(null);c.thatReturnsThis=function(){return this};c.thatReturnsArgument=function(a){return a};var A=c,E={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,c){},enqueueReplaceState:function(a,b,c,d){},enqueueSetState:function(a,b,c,d){}};q.prototype.isReactComponent={};q.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?p("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};q.prototype.forceUpdate=
19
+ function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};F.prototype=q.prototype;c=v.prototype=new F;c.constructor=v;B(c,q.prototype);c.isPureReactComponent=!0;var w={current:null},H=Object.prototype.hasOwnProperty,I={key:!0,ref:!0,__self:!0,__source:!0},M=/\/+/g,u=[];n={Children:{map:function(a,b,c){if(null==a)return a;var d=[];z(a,d,null,b,c);return d},forEach:function(a,b,c){if(null==a)return a;b=J(null,null,b,c);null==a||t(a,"",R,b);K(b)},count:function(a){return null==a?0:t(a,"",A.thatReturnsNull,
20
+ null)},toArray:function(a){var b=[];z(a,b,null,A.thatReturnsArgument);return b},only:function(a){x(a)?void 0:p("143");return a}},createRef:function(){return{current:null}},Component:q,PureComponent:v,createContext:function(a,b){void 0===b&&(b=null);a={$$typeof:X,_calculateChangedBits:b,_defaultValue:a,_currentValue:a,_currentValue2:a,_changedBits:0,_changedBits2:0,Provider:null,Consumer:null};a.Provider={$$typeof:W,_context:a};return a.Consumer=a},forwardRef:function(a){return{$$typeof:Z,render:a}},
21
+ Fragment:n,StrictMode:C,unstable_AsyncMode:Y,unstable_Profiler:V,createElement:G,cloneElement:function(a,b,c){null===a||void 0===a?p("267",a):void 0;var d=void 0,e=B({},a.props),f=a.key,h=a.ref,g=a._owner;if(null!=b){void 0!==b.ref&&(h=b.ref,g=w.current);void 0!==b.key&&(f=""+b.key);var m=void 0;a.type&&a.type.defaultProps&&(m=a.type.defaultProps);for(d in b)H.call(b,d)&&!I.hasOwnProperty(d)&&(e[d]=void 0===b[d]&&void 0!==m?m[d]:b[d])}d=arguments.length-2;if(1===d)e.children=c;else if(1<d){m=Array(d);
22
+ for(var l=0;l<d;l++)m[l]=arguments[l+2];e.children=m}return{$$typeof:r,type:a.type,key:f,ref:h,props:e,_owner:g}},createFactory:function(a){var b=G.bind(null,a);b.type=a;return b},isValidElement:x,version:"16.4.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:w,assign:B}};n=(C={default:n},n)||C;return n.default?n.default:n});