react 16.0.0 → 16.1.0-beta
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/README.md +1 -1
- package/cjs/react.development.js +386 -614
- package/cjs/react.production.min.js +13 -13
- package/package.json +2 -2
- package/umd/react.development.js +510 -710
- package/umd/react.production.min.js +14 -14
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
React v16.
|
|
2
|
+
React v16.1.0-beta
|
|
3
3
|
react.production.min.js
|
|
4
4
|
|
|
5
5
|
Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -7,17 +7,17 @@
|
|
|
7
7
|
This source code is licensed under the MIT license found in the
|
|
8
8
|
LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/
|
|
10
|
-
'use strict';var
|
|
10
|
+
'use strict';var n=require("object-assign"),p=require("fbjs/lib/emptyObject"),r=require("fbjs/lib/emptyFunction");
|
|
11
11
|
function t(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,e=0;e<b;e++)d+="\x26args[]\x3d"+encodeURIComponent(arguments[e+1]);b=Error(d+" 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
12
|
var u={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function v(a,b,d){this.props=a;this.context=b;this.refs=p;this.updater=d||u}v.prototype.isReactComponent={};v.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?t("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};v.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};
|
|
13
|
-
function w(a,b,d){this.props=a;this.context=b;this.refs=p;this.updater=d||u}function x(){}x.prototype=v.prototype;var y=w.prototype=new x;y.constructor=w;
|
|
14
|
-
var B={
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
function w(a,b,d){this.props=a;this.context=b;this.refs=p;this.updater=d||u}function x(){}x.prototype=v.prototype;var y=w.prototype=new x;y.constructor=w;n(y,v.prototype);y.isPureReactComponent=!0;function z(a,b,d){this.props=a;this.context=b;this.refs=p;this.updater=d||u}var A=z.prototype=new x;A.constructor=z;n(A,v.prototype);A.unstable_isAsyncReactComponent=!0;A.render=function(){return this.props.children};
|
|
14
|
+
var B={current:null},C=Object.prototype.hasOwnProperty,D="function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103,E={key:!0,ref:!0,__self:!0,__source:!0};function F(a,b,d,e,c,f,h){return{$$typeof:D,type:a,key:b,ref:d,props:h,_owner:f}}function G(a){return"object"===typeof a&&null!==a&&a.$$typeof===D}
|
|
15
|
+
var H="function"===typeof Symbol&&Symbol.iterator,I="function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103,J="function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.portal")||60106;function escape(a){var b={"\x3d":"\x3d0",":":"\x3d2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var K=/\/+/g,L=[];
|
|
16
|
+
function M(a,b,d,e){if(L.length){var c=L.pop();c.result=a;c.keyPrefix=b;c.func=d;c.context=e;c.count=0;return c}return{result:a,keyPrefix:b,func:d,context:e,count:0}}function N(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>L.length&&L.push(a)}
|
|
17
|
+
function O(a,b,d,e){var c=typeof a;if("undefined"===c||"boolean"===c)a=null;if(null===a||"string"===c||"number"===c||"object"===c&&a.$$typeof===I||"object"===c&&a.$$typeof===J)return d(e,a,""===b?"."+P(a,0):b),1;var f=0;b=""===b?".":b+":";if(Array.isArray(a))for(var h=0;h<a.length;h++){c=a[h];var l=b+P(c,h);f+=O(c,l,d,e)}else if(l=H&&a[H]||a["@@iterator"],"function"===typeof l)for(a=l.call(a),h=0;!(c=a.next()).done;)c=c.value,l=b+P(c,h++),f+=O(c,l,d,e);else"object"===c&&(d=""+a,t("31","[object Object]"===
|
|
18
|
+
d?"object with keys {"+Object.keys(a).join(", ")+"}":d,""));return f}function P(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function Q(a,b){a.func.call(a.context,b,a.count++)}
|
|
19
|
+
function R(a,b,d){var e=a.result,c=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?S(a,e,d,r.thatReturnsArgument):null!=a&&(G(a)&&(b=c+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(K,"$\x26/")+"/")+d,a=F(a.type,b,a.ref,a._self,a._source,a._owner,a.props)),e.push(a))}function S(a,b,d,e,c){var f="";null!=d&&(f=(""+d).replace(K,"$\x26/")+"/");b=M(b,f,e,c);null==a||O(a,"",R,b);N(b)}"function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.fragment");
|
|
20
|
+
var T={Children:{map:function(a,b,d){if(null==a)return a;var e=[];S(a,e,null,b,d);return e},forEach:function(a,b,d){if(null==a)return a;b=M(null,null,b,d);null==a||O(a,"",Q,b);N(b)},count:function(a){return null==a?0:O(a,"",r.thatReturnsNull,null)},toArray:function(a){var b=[];S(a,b,null,r.thatReturnsArgument);return b},only:function(a){G(a)?void 0:t("143");return a}},Component:v,PureComponent:w,unstable_AsyncComponent:z,createElement:function(a,b,d){var e,c={},f=null,h=null,l=null,q=null;if(null!=
|
|
21
|
+
b)for(e in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(f=""+b.key),l=void 0===b.__self?null:b.__self,q=void 0===b.__source?null:b.__source,b)C.call(b,e)&&!E.hasOwnProperty(e)&&(c[e]=b[e]);var k=arguments.length-2;if(1===k)c.children=d;else if(1<k){for(var g=Array(k),m=0;m<k;m++)g[m]=arguments[m+2];c.children=g}if(a&&a.defaultProps)for(e in k=a.defaultProps,k)void 0===c[e]&&(c[e]=k[e]);return F(a,f,h,l,q,B.current,c)},cloneElement:function(a,b,d){var e=n({},a.props),c=a.key,f=a.ref,h=a._self,l=a._source,
|
|
22
|
+
q=a._owner;if(null!=b){void 0!==b.ref&&(f=b.ref,q=B.current);void 0!==b.key&&(c=""+b.key);if(a.type&&a.type.defaultProps)var k=a.type.defaultProps;for(g in b)C.call(b,g)&&!E.hasOwnProperty(g)&&(e[g]=void 0===b[g]&&void 0!==k?k[g]:b[g])}var g=arguments.length-2;if(1===g)e.children=d;else if(1<g){k=Array(g);for(var m=0;m<g;m++)k[m]=arguments[m+2];e.children=k}return F(a.type,c,f,h,l,q,e)},createFactory:function(a){var b=F.createElement.bind(null,a);b.type=a;return b},isValidElement:G,version:"16.1.0-beta",
|
|
23
|
+
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:B,assign:n}},U=Object.freeze({default:T}),V=U&&T||U;module.exports=V["default"]?V["default"]:V;
|
package/package.json
CHANGED
package/umd/react.development.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.1.0-beta
|
|
2
2
|
* react.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -19,6 +19,7 @@ object-assign
|
|
|
19
19
|
@license MIT
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
+
|
|
22
23
|
/* eslint-disable no-unused-vars */
|
|
23
24
|
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
24
25
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
@@ -76,7 +77,7 @@ function shouldUseNative() {
|
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
79
|
|
|
79
|
-
var
|
|
80
|
+
var objectAssign$1 = shouldUseNative() ? Object.assign : function (target, source) {
|
|
80
81
|
var from;
|
|
81
82
|
var to = toObject(target);
|
|
82
83
|
var symbols;
|
|
@@ -103,16 +104,195 @@ var index = shouldUseNative() ? Object.assign : function (target, source) {
|
|
|
103
104
|
return to;
|
|
104
105
|
};
|
|
105
106
|
|
|
107
|
+
/**
|
|
108
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
109
|
+
*
|
|
110
|
+
* This source code is licensed under the MIT license found in the
|
|
111
|
+
* LICENSE file in the root directory of this source tree.
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
// TODO: this is special because it gets imported during build.
|
|
117
|
+
|
|
118
|
+
var ReactVersion = '16.1.0-beta';
|
|
119
|
+
|
|
120
|
+
var ReactFeatureFlags = {
|
|
121
|
+
enableAsyncSubtreeAPI: true,
|
|
122
|
+
enableAsyncSchedulingByDefaultInReactDOM: false,
|
|
123
|
+
// Mutating mode (React DOM, React ART, React Native):
|
|
124
|
+
enableMutatingReconciler: true,
|
|
125
|
+
// Experimental noop mode (currently unused):
|
|
126
|
+
enableNoopReconciler: false,
|
|
127
|
+
// Experimental persistent mode (CS):
|
|
128
|
+
enablePersistentReconciler: false,
|
|
129
|
+
// Exports React.Fragment
|
|
130
|
+
enableReactFragment: false,
|
|
131
|
+
// Exports ReactDOM.createRoot
|
|
132
|
+
enableCreateRoot: false
|
|
133
|
+
}; /**
|
|
134
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
135
|
+
*
|
|
136
|
+
* This source code is licensed under the MIT license found in the
|
|
137
|
+
* LICENSE file in the root directory of this source tree.
|
|
138
|
+
*
|
|
139
|
+
*
|
|
140
|
+
*/
|
|
141
|
+
|
|
142
|
+
{
|
|
143
|
+
if (Object.freeze) {
|
|
144
|
+
Object.freeze(ReactFeatureFlags);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
106
148
|
/**
|
|
107
149
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
108
150
|
*
|
|
109
151
|
* This source code is licensed under the MIT license found in the
|
|
110
152
|
* LICENSE file in the root directory of this source tree.
|
|
111
153
|
*
|
|
112
|
-
* @providesModule reactProdInvariant
|
|
113
154
|
*
|
|
114
155
|
*/
|
|
115
156
|
|
|
157
|
+
/**
|
|
158
|
+
* WARNING: DO NOT manually require this module.
|
|
159
|
+
* This is a replacement for `invariant(...)` used by the error code system
|
|
160
|
+
* and will _only_ be required by the corresponding babel pass.
|
|
161
|
+
* It always throws.
|
|
162
|
+
*/
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the MIT license found in the
|
|
168
|
+
* LICENSE file in the root directory of this source tree.
|
|
169
|
+
*
|
|
170
|
+
*/
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
var emptyObject = {};
|
|
175
|
+
|
|
176
|
+
{
|
|
177
|
+
Object.freeze(emptyObject);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
var emptyObject_1 = emptyObject;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
184
|
+
*
|
|
185
|
+
* This source code is licensed under the MIT license found in the
|
|
186
|
+
* LICENSE file in the root directory of this source tree.
|
|
187
|
+
*
|
|
188
|
+
*/
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Use invariant() to assert state which your program assumes to be true.
|
|
194
|
+
*
|
|
195
|
+
* Provide sprintf-style format (only %s is supported) and arguments
|
|
196
|
+
* to provide information about what broke and what you were
|
|
197
|
+
* expecting.
|
|
198
|
+
*
|
|
199
|
+
* The invariant message will be stripped in production, but the invariant
|
|
200
|
+
* will remain to ensure logic does not differ in production.
|
|
201
|
+
*/
|
|
202
|
+
|
|
203
|
+
var validateFormat = function validateFormat(format) {};
|
|
204
|
+
|
|
205
|
+
{
|
|
206
|
+
validateFormat = function validateFormat(format) {
|
|
207
|
+
if (format === undefined) {
|
|
208
|
+
throw new Error('invariant requires an error message argument');
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
function invariant(condition, format, a, b, c, d, e, f) {
|
|
214
|
+
validateFormat(format);
|
|
215
|
+
|
|
216
|
+
if (!condition) {
|
|
217
|
+
var error;
|
|
218
|
+
if (format === undefined) {
|
|
219
|
+
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
|
|
220
|
+
} else {
|
|
221
|
+
var args = [a, b, c, d, e, f];
|
|
222
|
+
var argIndex = 0;
|
|
223
|
+
error = new Error(format.replace(/%s/g, function () {
|
|
224
|
+
return args[argIndex++];
|
|
225
|
+
}));
|
|
226
|
+
error.name = 'Invariant Violation';
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
error.framesToPop = 1; // we don't care about invariant's own frame
|
|
230
|
+
throw error;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
var invariant_1$1 = invariant;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Copyright (c) 2014-present, Facebook, Inc.
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the MIT license found in the
|
|
240
|
+
* LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Forked from fbjs/warning:
|
|
245
|
+
* https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
|
|
246
|
+
*
|
|
247
|
+
* Only change is we use console.warn instead of console.error,
|
|
248
|
+
* and do nothing when 'console' is not supported.
|
|
249
|
+
* This really simplifies the code.
|
|
250
|
+
* ---
|
|
251
|
+
* Similar to invariant but only logs a warning if the condition is not met.
|
|
252
|
+
* This can be used to log issues in development environments in critical
|
|
253
|
+
* paths. Removing the logging code for production environments will keep the
|
|
254
|
+
* same logic and follow the same code paths.
|
|
255
|
+
*/
|
|
256
|
+
|
|
257
|
+
var lowPriorityWarning = function () {};
|
|
258
|
+
|
|
259
|
+
{
|
|
260
|
+
var printWarning = function (format) {
|
|
261
|
+
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
262
|
+
args[_key - 1] = arguments[_key];
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
var argIndex = 0;
|
|
266
|
+
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
|
267
|
+
return args[argIndex++];
|
|
268
|
+
});
|
|
269
|
+
if (typeof console !== 'undefined') {
|
|
270
|
+
console.warn(message);
|
|
271
|
+
}
|
|
272
|
+
try {
|
|
273
|
+
// --- Welcome to debugging React ---
|
|
274
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
275
|
+
// to find the callsite that caused this warning to fire.
|
|
276
|
+
throw new Error(message);
|
|
277
|
+
} catch (x) {}
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
lowPriorityWarning = function (condition, format) {
|
|
281
|
+
if (format === undefined) {
|
|
282
|
+
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
|
283
|
+
}
|
|
284
|
+
if (!condition) {
|
|
285
|
+
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
|
286
|
+
args[_key2 - 2] = arguments[_key2];
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
printWarning.apply(undefined, [format].concat(args));
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
var lowPriorityWarning$1 = lowPriorityWarning;
|
|
295
|
+
|
|
116
296
|
/**
|
|
117
297
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
118
298
|
*
|
|
@@ -148,6 +328,18 @@ emptyFunction.thatReturnsArgument = function (arg) {
|
|
|
148
328
|
|
|
149
329
|
var emptyFunction_1 = emptyFunction;
|
|
150
330
|
|
|
331
|
+
/**
|
|
332
|
+
* Copyright (c) 2014-present, Facebook, Inc.
|
|
333
|
+
*
|
|
334
|
+
* This source code is licensed under the MIT license found in the
|
|
335
|
+
* LICENSE file in the root directory of this source tree.
|
|
336
|
+
*
|
|
337
|
+
*/
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
|
|
151
343
|
/**
|
|
152
344
|
* Similar to invariant but only logs a warning if the condition is not met.
|
|
153
345
|
* This can be used to log issues in development environments in critical
|
|
@@ -155,10 +347,10 @@ var emptyFunction_1 = emptyFunction;
|
|
|
155
347
|
* same logic and follow the same code paths.
|
|
156
348
|
*/
|
|
157
349
|
|
|
158
|
-
var warning
|
|
350
|
+
var warning = emptyFunction_1;
|
|
159
351
|
|
|
160
352
|
{
|
|
161
|
-
var printWarning = function printWarning(format) {
|
|
353
|
+
var printWarning$1 = function printWarning(format) {
|
|
162
354
|
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
163
355
|
args[_key - 1] = arguments[_key];
|
|
164
356
|
}
|
|
@@ -178,7 +370,7 @@ var warning$1 = emptyFunction_1;
|
|
|
178
370
|
} catch (x) {}
|
|
179
371
|
};
|
|
180
372
|
|
|
181
|
-
warning
|
|
373
|
+
warning = function warning(condition, format) {
|
|
182
374
|
if (format === undefined) {
|
|
183
375
|
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
|
184
376
|
}
|
|
@@ -192,21 +384,32 @@ var warning$1 = emptyFunction_1;
|
|
|
192
384
|
args[_key2 - 2] = arguments[_key2];
|
|
193
385
|
}
|
|
194
386
|
|
|
195
|
-
printWarning.apply(undefined, [format].concat(args));
|
|
387
|
+
printWarning$1.apply(undefined, [format].concat(args));
|
|
196
388
|
}
|
|
197
389
|
};
|
|
198
390
|
}
|
|
199
391
|
|
|
200
|
-
var warning_1 = warning
|
|
392
|
+
var warning_1$1 = warning;
|
|
201
393
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
394
|
+
/**
|
|
395
|
+
* Copyright (c) 2015-present, Facebook, Inc.
|
|
396
|
+
*
|
|
397
|
+
* This source code is licensed under the MIT license found in the
|
|
398
|
+
* LICENSE file in the root directory of this source tree.
|
|
399
|
+
*/
|
|
400
|
+
|
|
401
|
+
var didWarnStateUpdateForUnmountedComponent = {};
|
|
205
402
|
|
|
206
403
|
function warnNoop(publicInstance, callerName) {
|
|
207
404
|
{
|
|
208
405
|
var constructor = publicInstance.constructor;
|
|
209
|
-
|
|
406
|
+
var componentName = constructor && (constructor.displayName || constructor.name) || 'ReactClass';
|
|
407
|
+
var warningKey = componentName + '.' + callerName;
|
|
408
|
+
if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
warning_1$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);
|
|
412
|
+
didWarnStateUpdateForUnmountedComponent[warningKey] = true;
|
|
210
413
|
}
|
|
211
414
|
}
|
|
212
415
|
|
|
@@ -278,151 +481,26 @@ var ReactNoopUpdateQueue = {
|
|
|
278
481
|
}
|
|
279
482
|
};
|
|
280
483
|
|
|
281
|
-
var ReactNoopUpdateQueue_1 = ReactNoopUpdateQueue;
|
|
282
|
-
|
|
283
484
|
/**
|
|
284
485
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
285
486
|
*
|
|
286
487
|
* This source code is licensed under the MIT license found in the
|
|
287
488
|
* LICENSE file in the root directory of this source tree.
|
|
288
|
-
*
|
|
289
|
-
*/
|
|
290
|
-
|
|
291
|
-
var emptyObject = {};
|
|
292
|
-
|
|
293
|
-
{
|
|
294
|
-
Object.freeze(emptyObject);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
var emptyObject_1 = emptyObject;
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
301
|
-
*
|
|
302
|
-
* This source code is licensed under the MIT license found in the
|
|
303
|
-
* LICENSE file in the root directory of this source tree.
|
|
304
|
-
*
|
|
305
|
-
*/
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
* Use invariant() to assert state which your program assumes to be true.
|
|
309
|
-
*
|
|
310
|
-
* Provide sprintf-style format (only %s is supported) and arguments
|
|
311
|
-
* to provide information about what broke and what you were
|
|
312
|
-
* expecting.
|
|
313
|
-
*
|
|
314
|
-
* The invariant message will be stripped in production, but the invariant
|
|
315
|
-
* will remain to ensure logic does not differ in production.
|
|
316
|
-
*/
|
|
317
|
-
|
|
318
|
-
var validateFormat = function validateFormat(format) {};
|
|
319
|
-
|
|
320
|
-
{
|
|
321
|
-
validateFormat = function validateFormat(format) {
|
|
322
|
-
if (format === undefined) {
|
|
323
|
-
throw new Error('invariant requires an error message argument');
|
|
324
|
-
}
|
|
325
|
-
};
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
function invariant(condition, format, a, b, c, d, e, f) {
|
|
329
|
-
validateFormat(format);
|
|
330
|
-
|
|
331
|
-
if (!condition) {
|
|
332
|
-
var error;
|
|
333
|
-
if (format === undefined) {
|
|
334
|
-
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
|
|
335
|
-
} else {
|
|
336
|
-
var args = [a, b, c, d, e, f];
|
|
337
|
-
var argIndex = 0;
|
|
338
|
-
error = new Error(format.replace(/%s/g, function () {
|
|
339
|
-
return args[argIndex++];
|
|
340
|
-
}));
|
|
341
|
-
error.name = 'Invariant Violation';
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
error.framesToPop = 1; // we don't care about invariant's own frame
|
|
345
|
-
throw error;
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
var invariant_1 = invariant;
|
|
350
|
-
|
|
351
|
-
/**
|
|
352
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
353
|
-
*
|
|
354
|
-
* This source code is licensed under the MIT license found in the
|
|
355
|
-
* LICENSE file in the root directory of this source tree.
|
|
356
|
-
*
|
|
357
|
-
* @providesModule lowPriorityWarning
|
|
358
489
|
*/
|
|
359
490
|
|
|
360
|
-
/**
|
|
361
|
-
* Forked from fbjs/warning:
|
|
362
|
-
* https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
|
|
363
|
-
*
|
|
364
|
-
* Only change is we use console.warn instead of console.error,
|
|
365
|
-
* and do nothing when 'console' is not supported.
|
|
366
|
-
* This really simplifies the code.
|
|
367
|
-
* ---
|
|
368
|
-
* Similar to invariant but only logs a warning if the condition is not met.
|
|
369
|
-
* This can be used to log issues in development environments in critical
|
|
370
|
-
* paths. Removing the logging code for production environments will keep the
|
|
371
|
-
* same logic and follow the same code paths.
|
|
372
|
-
*/
|
|
373
|
-
|
|
374
|
-
var lowPriorityWarning = function () {};
|
|
375
|
-
|
|
376
|
-
{
|
|
377
|
-
var printWarning$1 = function (format) {
|
|
378
|
-
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
379
|
-
args[_key - 1] = arguments[_key];
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
var argIndex = 0;
|
|
383
|
-
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
|
384
|
-
return args[argIndex++];
|
|
385
|
-
});
|
|
386
|
-
if (typeof console !== 'undefined') {
|
|
387
|
-
console.warn(message);
|
|
388
|
-
}
|
|
389
|
-
try {
|
|
390
|
-
// --- Welcome to debugging React ---
|
|
391
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
392
|
-
// to find the callsite that caused this warning to fire.
|
|
393
|
-
throw new Error(message);
|
|
394
|
-
} catch (x) {}
|
|
395
|
-
};
|
|
396
|
-
|
|
397
|
-
lowPriorityWarning = function (condition, format) {
|
|
398
|
-
if (format === undefined) {
|
|
399
|
-
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
|
400
|
-
}
|
|
401
|
-
if (!condition) {
|
|
402
|
-
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
|
403
|
-
args[_key2 - 2] = arguments[_key2];
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
printWarning$1.apply(undefined, [format].concat(args));
|
|
407
|
-
}
|
|
408
|
-
};
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
var lowPriorityWarning_1 = lowPriorityWarning;
|
|
412
|
-
|
|
413
491
|
/**
|
|
414
492
|
* Base class helpers for the updating state of a component.
|
|
415
493
|
*/
|
|
416
|
-
function
|
|
494
|
+
function Component(props, context, updater) {
|
|
417
495
|
this.props = props;
|
|
418
496
|
this.context = context;
|
|
419
497
|
this.refs = emptyObject_1;
|
|
420
498
|
// We initialize the default updater but the real one gets injected by the
|
|
421
499
|
// renderer.
|
|
422
|
-
this.updater = updater ||
|
|
500
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
423
501
|
}
|
|
424
502
|
|
|
425
|
-
|
|
503
|
+
Component.prototype.isReactComponent = {};
|
|
426
504
|
|
|
427
505
|
/**
|
|
428
506
|
* Sets a subset of the state. Always use this to mutate
|
|
@@ -449,8 +527,8 @@ ReactComponent.prototype.isReactComponent = {};
|
|
|
449
527
|
* @final
|
|
450
528
|
* @protected
|
|
451
529
|
*/
|
|
452
|
-
|
|
453
|
-
!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? invariant_1(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : void 0;
|
|
530
|
+
Component.prototype.setState = function (partialState, callback) {
|
|
531
|
+
!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? invariant_1$1(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : void 0;
|
|
454
532
|
this.updater.enqueueSetState(this, partialState, callback, 'setState');
|
|
455
533
|
};
|
|
456
534
|
|
|
@@ -468,7 +546,7 @@ ReactComponent.prototype.setState = function (partialState, callback) {
|
|
|
468
546
|
* @final
|
|
469
547
|
* @protected
|
|
470
548
|
*/
|
|
471
|
-
|
|
549
|
+
Component.prototype.forceUpdate = function (callback) {
|
|
472
550
|
this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
|
|
473
551
|
};
|
|
474
552
|
|
|
@@ -483,9 +561,9 @@ ReactComponent.prototype.forceUpdate = function (callback) {
|
|
|
483
561
|
replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
|
|
484
562
|
};
|
|
485
563
|
var defineDeprecationWarning = function (methodName, info) {
|
|
486
|
-
Object.defineProperty(
|
|
564
|
+
Object.defineProperty(Component.prototype, methodName, {
|
|
487
565
|
get: function () {
|
|
488
|
-
|
|
566
|
+
lowPriorityWarning$1(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
|
|
489
567
|
return undefined;
|
|
490
568
|
}
|
|
491
569
|
});
|
|
@@ -500,59 +578,43 @@ ReactComponent.prototype.forceUpdate = function (callback) {
|
|
|
500
578
|
/**
|
|
501
579
|
* Base class helpers for the updating state of a component.
|
|
502
580
|
*/
|
|
503
|
-
function
|
|
504
|
-
// Duplicated from
|
|
581
|
+
function PureComponent(props, context, updater) {
|
|
582
|
+
// Duplicated from Component.
|
|
505
583
|
this.props = props;
|
|
506
584
|
this.context = context;
|
|
507
585
|
this.refs = emptyObject_1;
|
|
508
586
|
// We initialize the default updater but the real one gets injected by the
|
|
509
587
|
// renderer.
|
|
510
|
-
this.updater = updater ||
|
|
588
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
511
589
|
}
|
|
512
590
|
|
|
513
591
|
function ComponentDummy() {}
|
|
514
|
-
ComponentDummy.prototype =
|
|
515
|
-
var pureComponentPrototype =
|
|
516
|
-
pureComponentPrototype.constructor =
|
|
592
|
+
ComponentDummy.prototype = Component.prototype;
|
|
593
|
+
var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
|
|
594
|
+
pureComponentPrototype.constructor = PureComponent;
|
|
517
595
|
// Avoid an extra prototype jump for these methods.
|
|
518
|
-
|
|
596
|
+
objectAssign$1(pureComponentPrototype, Component.prototype);
|
|
519
597
|
pureComponentPrototype.isPureReactComponent = true;
|
|
520
598
|
|
|
521
|
-
function
|
|
522
|
-
// Duplicated from
|
|
599
|
+
function AsyncComponent(props, context, updater) {
|
|
600
|
+
// Duplicated from Component.
|
|
523
601
|
this.props = props;
|
|
524
602
|
this.context = context;
|
|
525
603
|
this.refs = emptyObject_1;
|
|
526
604
|
// We initialize the default updater but the real one gets injected by the
|
|
527
605
|
// renderer.
|
|
528
|
-
this.updater = updater ||
|
|
606
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
529
607
|
}
|
|
530
608
|
|
|
531
|
-
var asyncComponentPrototype =
|
|
532
|
-
asyncComponentPrototype.constructor =
|
|
533
|
-
// Avoid an extra prototype jump for these methods.
|
|
534
|
-
|
|
535
|
-
asyncComponentPrototype.unstable_isAsyncReactComponent = true;
|
|
536
|
-
asyncComponentPrototype.render = function () {
|
|
537
|
-
return this.props.children;
|
|
538
|
-
};
|
|
539
|
-
|
|
540
|
-
var ReactBaseClasses = {
|
|
541
|
-
Component: ReactComponent,
|
|
542
|
-
PureComponent: ReactPureComponent,
|
|
543
|
-
AsyncComponent: ReactAsyncComponent
|
|
544
|
-
};
|
|
545
|
-
|
|
546
|
-
/**
|
|
547
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
548
|
-
*
|
|
549
|
-
* This source code is licensed under the MIT license found in the
|
|
550
|
-
* LICENSE file in the root directory of this source tree.
|
|
551
|
-
*
|
|
552
|
-
* @providesModule ReactCurrentOwner
|
|
553
|
-
*
|
|
554
|
-
*/
|
|
555
|
-
|
|
609
|
+
var asyncComponentPrototype = AsyncComponent.prototype = new ComponentDummy();
|
|
610
|
+
asyncComponentPrototype.constructor = AsyncComponent;
|
|
611
|
+
// Avoid an extra prototype jump for these methods.
|
|
612
|
+
objectAssign$1(asyncComponentPrototype, Component.prototype);
|
|
613
|
+
asyncComponentPrototype.unstable_isAsyncReactComponent = true;
|
|
614
|
+
asyncComponentPrototype.render = function () {
|
|
615
|
+
return this.props.children;
|
|
616
|
+
};
|
|
617
|
+
|
|
556
618
|
/**
|
|
557
619
|
* Keeps track of the current owner.
|
|
558
620
|
*
|
|
@@ -565,16 +627,24 @@ var ReactCurrentOwner = {
|
|
|
565
627
|
* @type {ReactComponent}
|
|
566
628
|
*/
|
|
567
629
|
current: null
|
|
568
|
-
};
|
|
630
|
+
}; /**
|
|
631
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
632
|
+
*
|
|
633
|
+
* This source code is licensed under the MIT license found in the
|
|
634
|
+
* LICENSE file in the root directory of this source tree.
|
|
635
|
+
*
|
|
636
|
+
*
|
|
637
|
+
*/
|
|
569
638
|
|
|
570
|
-
|
|
639
|
+
/**
|
|
640
|
+
* Copyright (c) 2014-present, Facebook, Inc.
|
|
641
|
+
*
|
|
642
|
+
* This source code is licensed under the MIT license found in the
|
|
643
|
+
* LICENSE file in the root directory of this source tree.
|
|
644
|
+
*/
|
|
571
645
|
|
|
572
646
|
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
573
647
|
|
|
574
|
-
{
|
|
575
|
-
var warning$3 = warning_1;
|
|
576
|
-
}
|
|
577
|
-
|
|
578
648
|
// The Symbol used to tag the ReactElement type. If there is no native Symbol
|
|
579
649
|
// nor polyfill, then a plain number is used for performance.
|
|
580
650
|
var REACT_ELEMENT_TYPE$1 = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
|
|
@@ -617,7 +687,7 @@ function defineKeyPropWarningGetter(props, displayName) {
|
|
|
617
687
|
var warnAboutAccessingKey = function () {
|
|
618
688
|
if (!specialPropKeyWarningShown) {
|
|
619
689
|
specialPropKeyWarningShown = true;
|
|
620
|
-
|
|
690
|
+
warning_1$1(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
|
|
621
691
|
}
|
|
622
692
|
};
|
|
623
693
|
warnAboutAccessingKey.isReactWarning = true;
|
|
@@ -631,7 +701,7 @@ function defineRefPropWarningGetter(props, displayName) {
|
|
|
631
701
|
var warnAboutAccessingRef = function () {
|
|
632
702
|
if (!specialPropRefWarningShown) {
|
|
633
703
|
specialPropRefWarningShown = true;
|
|
634
|
-
|
|
704
|
+
warning_1$1(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
|
|
635
705
|
}
|
|
636
706
|
};
|
|
637
707
|
warnAboutAccessingRef.isReactWarning = true;
|
|
@@ -719,9 +789,9 @@ var ReactElement = function (type, key, ref, self, source, owner, props) {
|
|
|
719
789
|
|
|
720
790
|
/**
|
|
721
791
|
* Create and return a new ReactElement of the given type.
|
|
722
|
-
* See https://
|
|
792
|
+
* See https://reactjs.org/docs/react-api.html#createelement
|
|
723
793
|
*/
|
|
724
|
-
|
|
794
|
+
function createElement(type, config, children) {
|
|
725
795
|
var propName;
|
|
726
796
|
|
|
727
797
|
// Reserved names are extracted
|
|
@@ -790,39 +860,30 @@ ReactElement.createElement = function (type, config, children) {
|
|
|
790
860
|
}
|
|
791
861
|
}
|
|
792
862
|
}
|
|
793
|
-
return ReactElement(type, key, ref, self, source,
|
|
794
|
-
}
|
|
863
|
+
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
|
864
|
+
}
|
|
795
865
|
|
|
796
866
|
/**
|
|
797
867
|
* Return a function that produces ReactElements of a given type.
|
|
798
|
-
* See https://
|
|
868
|
+
* See https://reactjs.org/docs/react-api.html#createfactory
|
|
799
869
|
*/
|
|
800
|
-
ReactElement.createFactory = function (type) {
|
|
801
|
-
var factory = ReactElement.createElement.bind(null, type);
|
|
802
|
-
// Expose the type on the factory and the prototype so that it can be
|
|
803
|
-
// easily accessed on elements. E.g. `<Foo />.type === Foo`.
|
|
804
|
-
// This should not be named `constructor` since this may not be the function
|
|
805
|
-
// that created the element, and it may not even be a constructor.
|
|
806
|
-
// Legacy hook TODO: Warn if this is accessed
|
|
807
|
-
factory.type = type;
|
|
808
|
-
return factory;
|
|
809
|
-
};
|
|
810
870
|
|
|
811
|
-
|
|
871
|
+
|
|
872
|
+
function cloneAndReplaceKey(oldElement, newKey) {
|
|
812
873
|
var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
|
|
813
874
|
|
|
814
875
|
return newElement;
|
|
815
|
-
}
|
|
876
|
+
}
|
|
816
877
|
|
|
817
878
|
/**
|
|
818
879
|
* Clone and return a new ReactElement using element as the starting point.
|
|
819
|
-
* See https://
|
|
880
|
+
* See https://reactjs.org/docs/react-api.html#cloneelement
|
|
820
881
|
*/
|
|
821
|
-
|
|
882
|
+
function cloneElement(element, config, children) {
|
|
822
883
|
var propName;
|
|
823
884
|
|
|
824
885
|
// Original props are copied
|
|
825
|
-
var props =
|
|
886
|
+
var props = objectAssign$1({}, element.props);
|
|
826
887
|
|
|
827
888
|
// Reserved names are extracted
|
|
828
889
|
var key = element.key;
|
|
@@ -841,7 +902,7 @@ ReactElement.cloneElement = function (element, config, children) {
|
|
|
841
902
|
if (hasValidRef(config)) {
|
|
842
903
|
// Silently steal the ref from the parent.
|
|
843
904
|
ref = config.ref;
|
|
844
|
-
owner =
|
|
905
|
+
owner = ReactCurrentOwner.current;
|
|
845
906
|
}
|
|
846
907
|
if (hasValidKey(config)) {
|
|
847
908
|
key = '' + config.key;
|
|
@@ -878,20 +939,18 @@ ReactElement.cloneElement = function (element, config, children) {
|
|
|
878
939
|
}
|
|
879
940
|
|
|
880
941
|
return ReactElement(element.type, key, ref, self, source, owner, props);
|
|
881
|
-
}
|
|
942
|
+
}
|
|
882
943
|
|
|
883
944
|
/**
|
|
884
945
|
* Verifies the object is a ReactElement.
|
|
885
|
-
* See https://
|
|
946
|
+
* See https://reactjs.org/docs/react-api.html#isvalidelement
|
|
886
947
|
* @param {?object} object
|
|
887
948
|
* @return {boolean} True if `object` is a valid component.
|
|
888
949
|
* @final
|
|
889
950
|
*/
|
|
890
|
-
|
|
951
|
+
function isValidElement(object) {
|
|
891
952
|
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE$1;
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
var ReactElement_1 = ReactElement;
|
|
953
|
+
}
|
|
895
954
|
|
|
896
955
|
/**
|
|
897
956
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -899,7 +958,6 @@ var ReactElement_1 = ReactElement;
|
|
|
899
958
|
* This source code is licensed under the MIT license found in the
|
|
900
959
|
* LICENSE file in the root directory of this source tree.
|
|
901
960
|
*
|
|
902
|
-
* @providesModule ReactDebugCurrentFrame
|
|
903
961
|
*
|
|
904
962
|
*/
|
|
905
963
|
|
|
@@ -918,21 +976,19 @@ var ReactDebugCurrentFrame = {};
|
|
|
918
976
|
};
|
|
919
977
|
}
|
|
920
978
|
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
getStackAddendum = _require.getStackAddendum;
|
|
928
|
-
}
|
|
979
|
+
/**
|
|
980
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
981
|
+
*
|
|
982
|
+
* This source code is licensed under the MIT license found in the
|
|
983
|
+
* LICENSE file in the root directory of this source tree.
|
|
984
|
+
*/
|
|
929
985
|
|
|
930
986
|
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
931
987
|
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
932
988
|
// The Symbol used to tag the ReactElement type. If there is no native Symbol
|
|
933
989
|
// nor polyfill, then a plain number is used for performance.
|
|
934
990
|
var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
|
|
935
|
-
|
|
991
|
+
var REACT_PORTAL_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.portal') || 0xeaca;
|
|
936
992
|
var SEPARATOR = '.';
|
|
937
993
|
var SUBSEPARATOR = ':';
|
|
938
994
|
|
|
@@ -1019,7 +1075,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
|
|
|
1019
1075
|
if (children === null || type === 'string' || type === 'number' ||
|
|
1020
1076
|
// The following is inlined from ReactElement. This means we can optimize
|
|
1021
1077
|
// some checks. React Fiber also inlines this logic for similar purposes.
|
|
1022
|
-
type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
|
|
1078
|
+
type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE || type === 'object' && children.$$typeof === REACT_PORTAL_TYPE) {
|
|
1023
1079
|
callback(traverseContext, children,
|
|
1024
1080
|
// If it's the only child, treat the name as if it was wrapped in an array
|
|
1025
1081
|
// so that it's consistent if the number of children grows.
|
|
@@ -1044,7 +1100,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
|
|
|
1044
1100
|
{
|
|
1045
1101
|
// Warn about using Maps as children
|
|
1046
1102
|
if (iteratorFn === children.entries) {
|
|
1047
|
-
|
|
1103
|
+
warning_1$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());
|
|
1048
1104
|
didWarnAboutMaps = true;
|
|
1049
1105
|
}
|
|
1050
1106
|
}
|
|
@@ -1060,10 +1116,10 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
|
|
|
1060
1116
|
} else if (type === 'object') {
|
|
1061
1117
|
var addendum = '';
|
|
1062
1118
|
{
|
|
1063
|
-
addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + getStackAddendum();
|
|
1119
|
+
addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
|
|
1064
1120
|
}
|
|
1065
1121
|
var childrenString = '' + children;
|
|
1066
|
-
invariant_1(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum);
|
|
1122
|
+
invariant_1$1(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum);
|
|
1067
1123
|
}
|
|
1068
1124
|
}
|
|
1069
1125
|
|
|
@@ -1122,7 +1178,7 @@ function forEachSingleChild(bookKeeping, child, name) {
|
|
|
1122
1178
|
/**
|
|
1123
1179
|
* Iterates through children that are typically specified as `props.children`.
|
|
1124
1180
|
*
|
|
1125
|
-
* See https://
|
|
1181
|
+
* See https://reactjs.org/docs/react-api.html#react.children.foreach
|
|
1126
1182
|
*
|
|
1127
1183
|
* The provided forEachFunc(child, index) will be called for each
|
|
1128
1184
|
* leaf child.
|
|
@@ -1151,8 +1207,8 @@ function mapSingleChildIntoContext(bookKeeping, child, childKey) {
|
|
|
1151
1207
|
if (Array.isArray(mappedChild)) {
|
|
1152
1208
|
mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction_1.thatReturnsArgument);
|
|
1153
1209
|
} else if (mappedChild != null) {
|
|
1154
|
-
if (
|
|
1155
|
-
mappedChild =
|
|
1210
|
+
if (isValidElement(mappedChild)) {
|
|
1211
|
+
mappedChild = cloneAndReplaceKey(mappedChild,
|
|
1156
1212
|
// Keep both the (mapped) and old keys if they differ, just as
|
|
1157
1213
|
// traverseAllChildren used to do for objects as children
|
|
1158
1214
|
keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
|
|
@@ -1174,7 +1230,7 @@ function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
|
|
|
1174
1230
|
/**
|
|
1175
1231
|
* Maps children that are typically specified as `props.children`.
|
|
1176
1232
|
*
|
|
1177
|
-
* See https://
|
|
1233
|
+
* See https://reactjs.org/docs/react-api.html#react.children.map
|
|
1178
1234
|
*
|
|
1179
1235
|
* The provided mapFunction(child, key, index) will be called for each
|
|
1180
1236
|
* leaf child.
|
|
@@ -1197,7 +1253,7 @@ function mapChildren(children, func, context) {
|
|
|
1197
1253
|
* Count the number of children that are typically specified as
|
|
1198
1254
|
* `props.children`.
|
|
1199
1255
|
*
|
|
1200
|
-
* See https://
|
|
1256
|
+
* See https://reactjs.org/docs/react-api.html#react.children.count
|
|
1201
1257
|
*
|
|
1202
1258
|
* @param {?*} children Children tree container.
|
|
1203
1259
|
* @return {number} The number of children.
|
|
@@ -1210,7 +1266,7 @@ function countChildren(children, context) {
|
|
|
1210
1266
|
* Flatten a children object (typically specified as `props.children`) and
|
|
1211
1267
|
* return an array with appropriately re-keyed children.
|
|
1212
1268
|
*
|
|
1213
|
-
* See https://
|
|
1269
|
+
* See https://reactjs.org/docs/react-api.html#react.children.toarray
|
|
1214
1270
|
*/
|
|
1215
1271
|
function toArray(children) {
|
|
1216
1272
|
var result = [];
|
|
@@ -1218,31 +1274,11 @@ function toArray(children) {
|
|
|
1218
1274
|
return result;
|
|
1219
1275
|
}
|
|
1220
1276
|
|
|
1221
|
-
var ReactChildren = {
|
|
1222
|
-
forEach: forEachChildren,
|
|
1223
|
-
map: mapChildren,
|
|
1224
|
-
count: countChildren,
|
|
1225
|
-
toArray: toArray
|
|
1226
|
-
};
|
|
1227
|
-
|
|
1228
|
-
var ReactChildren_1 = ReactChildren;
|
|
1229
|
-
|
|
1230
|
-
/**
|
|
1231
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1232
|
-
*
|
|
1233
|
-
* This source code is licensed under the MIT license found in the
|
|
1234
|
-
* LICENSE file in the root directory of this source tree.
|
|
1235
|
-
*
|
|
1236
|
-
* @providesModule ReactVersion
|
|
1237
|
-
*/
|
|
1238
|
-
|
|
1239
|
-
var ReactVersion = '16.0.0';
|
|
1240
|
-
|
|
1241
1277
|
/**
|
|
1242
1278
|
* Returns the first child in a collection of children and verifies that there
|
|
1243
1279
|
* is only one child in the collection.
|
|
1244
1280
|
*
|
|
1245
|
-
* See https://
|
|
1281
|
+
* See https://reactjs.org/docs/react-api.html#react.children.only
|
|
1246
1282
|
*
|
|
1247
1283
|
* The current implementation of this function assumes that a single child gets
|
|
1248
1284
|
* passed without a wrapper, but the purpose of this helper function is to
|
|
@@ -1253,11 +1289,41 @@ var ReactVersion = '16.0.0';
|
|
|
1253
1289
|
* structure.
|
|
1254
1290
|
*/
|
|
1255
1291
|
function onlyChild(children) {
|
|
1256
|
-
!
|
|
1292
|
+
!isValidElement(children) ? invariant_1$1(false, 'React.Children.only expected to receive a single React element child.') : void 0;
|
|
1257
1293
|
return children;
|
|
1258
1294
|
}
|
|
1259
1295
|
|
|
1260
|
-
|
|
1296
|
+
/**
|
|
1297
|
+
* Copyright (c) 2016-present, Facebook, Inc.
|
|
1298
|
+
*
|
|
1299
|
+
* This source code is licensed under the MIT license found in the
|
|
1300
|
+
* LICENSE file in the root directory of this source tree.
|
|
1301
|
+
*
|
|
1302
|
+
*
|
|
1303
|
+
*/
|
|
1304
|
+
|
|
1305
|
+
var describeComponentFrame = function (name, source, ownerName) {
|
|
1306
|
+
return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
|
|
1307
|
+
};
|
|
1308
|
+
|
|
1309
|
+
function getComponentName(fiber) {
|
|
1310
|
+
var type = fiber.type;
|
|
1311
|
+
|
|
1312
|
+
if (typeof type === 'string') {
|
|
1313
|
+
return type;
|
|
1314
|
+
}
|
|
1315
|
+
if (typeof type === 'function') {
|
|
1316
|
+
return type.displayName || type.name;
|
|
1317
|
+
}
|
|
1318
|
+
return null;
|
|
1319
|
+
} /**
|
|
1320
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1321
|
+
*
|
|
1322
|
+
* This source code is licensed under the MIT license found in the
|
|
1323
|
+
* LICENSE file in the root directory of this source tree.
|
|
1324
|
+
*
|
|
1325
|
+
*
|
|
1326
|
+
*/
|
|
1261
1327
|
|
|
1262
1328
|
/**
|
|
1263
1329
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -1266,13 +1332,24 @@ var onlyChild_1 = onlyChild;
|
|
|
1266
1332
|
* LICENSE file in the root directory of this source tree.
|
|
1267
1333
|
*/
|
|
1268
1334
|
|
|
1335
|
+
|
|
1336
|
+
|
|
1269
1337
|
var ReactPropTypesSecret$1 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
1270
1338
|
|
|
1271
1339
|
var ReactPropTypesSecret_1 = ReactPropTypesSecret$1;
|
|
1272
1340
|
|
|
1341
|
+
/**
|
|
1342
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1343
|
+
*
|
|
1344
|
+
* This source code is licensed under the MIT license found in the
|
|
1345
|
+
* LICENSE file in the root directory of this source tree.
|
|
1346
|
+
*/
|
|
1347
|
+
|
|
1348
|
+
|
|
1349
|
+
|
|
1273
1350
|
{
|
|
1274
|
-
var invariant$2 = invariant_1;
|
|
1275
|
-
var warning$
|
|
1351
|
+
var invariant$2 = invariant_1$1;
|
|
1352
|
+
var warning$2 = warning_1$1;
|
|
1276
1353
|
var ReactPropTypesSecret = ReactPropTypesSecret_1;
|
|
1277
1354
|
var loggedTypeFailures = {};
|
|
1278
1355
|
}
|
|
@@ -1288,7 +1365,7 @@ var ReactPropTypesSecret_1 = ReactPropTypesSecret$1;
|
|
|
1288
1365
|
* @param {?Function} getStack Returns the component stack.
|
|
1289
1366
|
* @private
|
|
1290
1367
|
*/
|
|
1291
|
-
function checkPropTypes
|
|
1368
|
+
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
1292
1369
|
{
|
|
1293
1370
|
for (var typeSpecName in typeSpecs) {
|
|
1294
1371
|
if (typeSpecs.hasOwnProperty(typeSpecName)) {
|
|
@@ -1304,7 +1381,7 @@ function checkPropTypes$1(typeSpecs, values, location, componentName, getStack)
|
|
|
1304
1381
|
} catch (ex) {
|
|
1305
1382
|
error = ex;
|
|
1306
1383
|
}
|
|
1307
|
-
warning$
|
|
1384
|
+
warning$2(!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);
|
|
1308
1385
|
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
1309
1386
|
// Only monitor this failure once because there tends to be a lot of the
|
|
1310
1387
|
// same error.
|
|
@@ -1312,70 +1389,30 @@ function checkPropTypes$1(typeSpecs, values, location, componentName, getStack)
|
|
|
1312
1389
|
|
|
1313
1390
|
var stack = getStack ? getStack() : '';
|
|
1314
1391
|
|
|
1315
|
-
warning$
|
|
1392
|
+
warning$2(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
|
|
1316
1393
|
}
|
|
1317
1394
|
}
|
|
1318
1395
|
}
|
|
1319
1396
|
}
|
|
1320
1397
|
}
|
|
1321
1398
|
|
|
1322
|
-
var checkPropTypes_1 = checkPropTypes
|
|
1399
|
+
var checkPropTypes_1$1 = checkPropTypes;
|
|
1323
1400
|
|
|
1324
1401
|
/**
|
|
1325
|
-
* Copyright (c)
|
|
1402
|
+
* Copyright (c) 2014-present, Facebook, Inc.
|
|
1326
1403
|
*
|
|
1327
1404
|
* This source code is licensed under the MIT license found in the
|
|
1328
1405
|
* LICENSE file in the root directory of this source tree.
|
|
1329
|
-
*
|
|
1330
|
-
*
|
|
1331
|
-
* @providesModule describeComponentFrame
|
|
1332
1406
|
*/
|
|
1333
1407
|
|
|
1334
|
-
var describeComponentFrame$1 = function (name, source, ownerName) {
|
|
1335
|
-
return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
|
|
1336
|
-
};
|
|
1337
|
-
|
|
1338
1408
|
/**
|
|
1339
|
-
*
|
|
1340
|
-
*
|
|
1341
|
-
*
|
|
1342
|
-
*
|
|
1343
|
-
*
|
|
1344
|
-
* @providesModule getComponentName
|
|
1345
|
-
*
|
|
1409
|
+
* ReactElementValidator provides a wrapper around a element factory
|
|
1410
|
+
* which validates the props passed to the element. This is intended to be
|
|
1411
|
+
* used only in DEV and could be replaced by a static type checker for languages
|
|
1412
|
+
* that support it.
|
|
1346
1413
|
*/
|
|
1347
1414
|
|
|
1348
|
-
function getComponentName$1(instanceOrFiber) {
|
|
1349
|
-
if (typeof instanceOrFiber.getName === 'function') {
|
|
1350
|
-
// Stack reconciler
|
|
1351
|
-
var instance = instanceOrFiber;
|
|
1352
|
-
return instance.getName();
|
|
1353
|
-
}
|
|
1354
|
-
if (typeof instanceOrFiber.tag === 'number') {
|
|
1355
|
-
// Fiber reconciler
|
|
1356
|
-
var fiber = instanceOrFiber;
|
|
1357
|
-
var type = fiber.type;
|
|
1358
|
-
|
|
1359
|
-
if (typeof type === 'string') {
|
|
1360
|
-
return type;
|
|
1361
|
-
}
|
|
1362
|
-
if (typeof type === 'function') {
|
|
1363
|
-
return type.displayName || type.name;
|
|
1364
|
-
}
|
|
1365
|
-
}
|
|
1366
|
-
return null;
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
var getComponentName_1 = getComponentName$1;
|
|
1370
|
-
|
|
1371
1415
|
{
|
|
1372
|
-
var checkPropTypes = checkPropTypes_1;
|
|
1373
|
-
var lowPriorityWarning$1 = lowPriorityWarning_1;
|
|
1374
|
-
var ReactDebugCurrentFrame$1 = ReactDebugCurrentFrame_1;
|
|
1375
|
-
var warning$4 = warning_1;
|
|
1376
|
-
var describeComponentFrame = describeComponentFrame$1;
|
|
1377
|
-
var getComponentName = getComponentName_1;
|
|
1378
|
-
|
|
1379
1416
|
var currentlyValidatingElement = null;
|
|
1380
1417
|
|
|
1381
1418
|
var getDisplayName = function (element) {
|
|
@@ -1385,29 +1422,35 @@ var getComponentName_1 = getComponentName$1;
|
|
|
1385
1422
|
return '#text';
|
|
1386
1423
|
} else if (typeof element.type === 'string') {
|
|
1387
1424
|
return element.type;
|
|
1425
|
+
} else if (element.type === REACT_FRAGMENT_TYPE$1) {
|
|
1426
|
+
return 'React.Fragment';
|
|
1388
1427
|
} else {
|
|
1389
1428
|
return element.type.displayName || element.type.name || 'Unknown';
|
|
1390
1429
|
}
|
|
1391
1430
|
};
|
|
1392
1431
|
|
|
1393
|
-
var getStackAddendum
|
|
1432
|
+
var getStackAddendum = function () {
|
|
1394
1433
|
var stack = '';
|
|
1395
1434
|
if (currentlyValidatingElement) {
|
|
1396
1435
|
var name = getDisplayName(currentlyValidatingElement);
|
|
1397
1436
|
var owner = currentlyValidatingElement._owner;
|
|
1398
1437
|
stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner));
|
|
1399
1438
|
}
|
|
1400
|
-
stack += ReactDebugCurrentFrame
|
|
1439
|
+
stack += ReactDebugCurrentFrame.getStackAddendum() || '';
|
|
1401
1440
|
return stack;
|
|
1402
1441
|
};
|
|
1442
|
+
|
|
1443
|
+
var REACT_FRAGMENT_TYPE$1 = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.fragment') || 0xeacb;
|
|
1444
|
+
|
|
1445
|
+
var VALID_FRAGMENT_PROPS = new Map([['children', true], ['key', true]]);
|
|
1403
1446
|
}
|
|
1404
1447
|
|
|
1405
1448
|
var ITERATOR_SYMBOL$1 = typeof Symbol === 'function' && Symbol.iterator;
|
|
1406
1449
|
var FAUX_ITERATOR_SYMBOL$1 = '@@iterator'; // Before Symbol spec.
|
|
1407
1450
|
|
|
1408
1451
|
function getDeclarationErrorAddendum() {
|
|
1409
|
-
if (
|
|
1410
|
-
var name = getComponentName(
|
|
1452
|
+
if (ReactCurrentOwner.current) {
|
|
1453
|
+
var name = getComponentName(ReactCurrentOwner.current);
|
|
1411
1454
|
if (name) {
|
|
1412
1455
|
return '\n\nCheck the render method of `' + name + '`.';
|
|
1413
1456
|
}
|
|
@@ -1471,14 +1514,14 @@ function validateExplicitKey(element, parentType) {
|
|
|
1471
1514
|
// property, it may be the creator of the child that's responsible for
|
|
1472
1515
|
// assigning it a key.
|
|
1473
1516
|
var childOwner = '';
|
|
1474
|
-
if (element && element._owner && element._owner !==
|
|
1517
|
+
if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
|
|
1475
1518
|
// Give the component that originally created this child.
|
|
1476
1519
|
childOwner = ' It was passed a child from ' + getComponentName(element._owner) + '.';
|
|
1477
1520
|
}
|
|
1478
1521
|
|
|
1479
1522
|
currentlyValidatingElement = element;
|
|
1480
1523
|
{
|
|
1481
|
-
|
|
1524
|
+
warning_1$1(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, getStackAddendum());
|
|
1482
1525
|
}
|
|
1483
1526
|
currentlyValidatingElement = null;
|
|
1484
1527
|
}
|
|
@@ -1499,11 +1542,11 @@ function validateChildKeys(node, parentType) {
|
|
|
1499
1542
|
if (Array.isArray(node)) {
|
|
1500
1543
|
for (var i = 0; i < node.length; i++) {
|
|
1501
1544
|
var child = node[i];
|
|
1502
|
-
if (
|
|
1545
|
+
if (isValidElement(child)) {
|
|
1503
1546
|
validateExplicitKey(child, parentType);
|
|
1504
1547
|
}
|
|
1505
1548
|
}
|
|
1506
|
-
} else if (
|
|
1549
|
+
} else if (isValidElement(node)) {
|
|
1507
1550
|
// This element was passed in a valid location.
|
|
1508
1551
|
if (node._store) {
|
|
1509
1552
|
node._store.validated = true;
|
|
@@ -1517,7 +1560,7 @@ function validateChildKeys(node, parentType) {
|
|
|
1517
1560
|
var iterator = iteratorFn.call(node);
|
|
1518
1561
|
var step;
|
|
1519
1562
|
while (!(step = iterator.next()).done) {
|
|
1520
|
-
if (
|
|
1563
|
+
if (isValidElement(step.value)) {
|
|
1521
1564
|
validateExplicitKey(step.value, parentType);
|
|
1522
1565
|
}
|
|
1523
1566
|
}
|
|
@@ -1542,454 +1585,211 @@ function validatePropTypes(element) {
|
|
|
1542
1585
|
|
|
1543
1586
|
if (propTypes) {
|
|
1544
1587
|
currentlyValidatingElement = element;
|
|
1545
|
-
|
|
1588
|
+
checkPropTypes_1$1(propTypes, element.props, 'prop', name, getStackAddendum);
|
|
1546
1589
|
currentlyValidatingElement = null;
|
|
1547
1590
|
}
|
|
1548
1591
|
if (typeof componentClass.getDefaultProps === 'function') {
|
|
1549
|
-
|
|
1592
|
+
warning_1$1(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
|
|
1550
1593
|
}
|
|
1551
1594
|
}
|
|
1552
1595
|
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
var info = '';
|
|
1560
|
-
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
1561
|
-
info += ' You likely forgot to export your component from the file ' + "it's defined in.";
|
|
1562
|
-
}
|
|
1563
|
-
|
|
1564
|
-
var sourceInfo = getSourceInfoErrorAddendum(props);
|
|
1565
|
-
if (sourceInfo) {
|
|
1566
|
-
info += sourceInfo;
|
|
1567
|
-
} else {
|
|
1568
|
-
info += getDeclarationErrorAddendum();
|
|
1569
|
-
}
|
|
1570
|
-
|
|
1571
|
-
info += ReactDebugCurrentFrame$1.getStackAddendum() || '';
|
|
1596
|
+
/**
|
|
1597
|
+
* Given a fragment, validate that it can only be provided with fragment props
|
|
1598
|
+
* @param {ReactElement} fragment
|
|
1599
|
+
*/
|
|
1600
|
+
function validateFragmentProps(fragment) {
|
|
1601
|
+
currentlyValidatingElement = fragment;
|
|
1572
1602
|
|
|
1573
|
-
|
|
1574
|
-
|
|
1603
|
+
var _iteratorNormalCompletion = true;
|
|
1604
|
+
var _didIteratorError = false;
|
|
1605
|
+
var _iteratorError = undefined;
|
|
1575
1606
|
|
|
1576
|
-
|
|
1607
|
+
try {
|
|
1608
|
+
for (var _iterator = Object.keys(fragment.props)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
1609
|
+
var key = _step.value;
|
|
1577
1610
|
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1611
|
+
if (!VALID_FRAGMENT_PROPS.has(key)) {
|
|
1612
|
+
warning_1$1(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.%s', key, getStackAddendum());
|
|
1613
|
+
break;
|
|
1614
|
+
}
|
|
1582
1615
|
}
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1616
|
+
} catch (err) {
|
|
1617
|
+
_didIteratorError = true;
|
|
1618
|
+
_iteratorError = err;
|
|
1619
|
+
} finally {
|
|
1620
|
+
try {
|
|
1621
|
+
if (!_iteratorNormalCompletion && _iterator['return']) {
|
|
1622
|
+
_iterator['return']();
|
|
1623
|
+
}
|
|
1624
|
+
} finally {
|
|
1625
|
+
if (_didIteratorError) {
|
|
1626
|
+
throw _iteratorError;
|
|
1592
1627
|
}
|
|
1593
1628
|
}
|
|
1629
|
+
}
|
|
1594
1630
|
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
},
|
|
1631
|
+
if (fragment.ref !== null) {
|
|
1632
|
+
warning_1$1(false, 'Invalid attribute `ref` supplied to `React.Fragment`.%s', getStackAddendum());
|
|
1633
|
+
}
|
|
1599
1634
|
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
// Legacy hook TODO: Warn if this is accessed
|
|
1603
|
-
validatedFactory.type = type;
|
|
1635
|
+
currentlyValidatingElement = null;
|
|
1636
|
+
}
|
|
1604
1637
|
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
return type;
|
|
1614
|
-
}
|
|
1615
|
-
});
|
|
1638
|
+
function createElementWithValidation(type, props, children) {
|
|
1639
|
+
var validType = typeof type === 'string' || typeof type === 'function' || typeof type === 'symbol' || typeof type === 'number';
|
|
1640
|
+
// We warn in this case but don't throw. We expect the element creation to
|
|
1641
|
+
// succeed and there will likely be errors in render.
|
|
1642
|
+
if (!validType) {
|
|
1643
|
+
var info = '';
|
|
1644
|
+
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
1645
|
+
info += ' You likely forgot to export your component from the file ' + "it's defined in.";
|
|
1616
1646
|
}
|
|
1617
1647
|
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
for (var i = 2; i < arguments.length; i++) {
|
|
1624
|
-
validateChildKeys(arguments[i], newElement.type);
|
|
1648
|
+
var sourceInfo = getSourceInfoErrorAddendum(props);
|
|
1649
|
+
if (sourceInfo) {
|
|
1650
|
+
info += sourceInfo;
|
|
1651
|
+
} else {
|
|
1652
|
+
info += getDeclarationErrorAddendum();
|
|
1625
1653
|
}
|
|
1626
|
-
validatePropTypes(newElement);
|
|
1627
|
-
return newElement;
|
|
1628
|
-
}
|
|
1629
|
-
};
|
|
1630
|
-
|
|
1631
|
-
var ReactElementValidator_1 = ReactElementValidator$1;
|
|
1632
1654
|
|
|
1633
|
-
|
|
1634
|
-
var warning$6 = warning_1;
|
|
1635
|
-
}
|
|
1655
|
+
info += getStackAddendum() || '';
|
|
1636
1656
|
|
|
1637
|
-
function
|
|
1638
|
-
// Based on isNative() from Lodash
|
|
1639
|
-
var funcToString = Function.prototype.toString;
|
|
1640
|
-
var reIsNative = RegExp('^' + funcToString
|
|
1641
|
-
// Take an example native function source for comparison
|
|
1642
|
-
.call(Object.prototype.hasOwnProperty)
|
|
1643
|
-
// Strip regex characters so we can use it for regex
|
|
1644
|
-
.replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
|
|
1645
|
-
// Remove hasOwnProperty from the template to make it generic
|
|
1646
|
-
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
|
|
1647
|
-
try {
|
|
1648
|
-
var source = funcToString.call(fn);
|
|
1649
|
-
return reIsNative.test(source);
|
|
1650
|
-
} catch (err) {
|
|
1651
|
-
return false;
|
|
1657
|
+
warning_1$1(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);
|
|
1652
1658
|
}
|
|
1653
|
-
}
|
|
1654
|
-
|
|
1655
|
-
var canUseCollections =
|
|
1656
|
-
// Array.from
|
|
1657
|
-
typeof Array.from === 'function' &&
|
|
1658
|
-
// Map
|
|
1659
|
-
typeof Map === 'function' && isNative(Map) &&
|
|
1660
|
-
// Map.prototype.keys
|
|
1661
|
-
Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
|
|
1662
|
-
// Set
|
|
1663
|
-
typeof Set === 'function' && isNative(Set) &&
|
|
1664
|
-
// Set.prototype.keys
|
|
1665
|
-
Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
|
|
1666
|
-
|
|
1667
|
-
var setItem;
|
|
1668
|
-
var getItem;
|
|
1669
|
-
var removeItem;
|
|
1670
|
-
var getItemIDs;
|
|
1671
|
-
var addRoot;
|
|
1672
|
-
var removeRoot;
|
|
1673
|
-
var getRootIDs;
|
|
1674
|
-
|
|
1675
|
-
if (canUseCollections) {
|
|
1676
|
-
var itemMap = new Map();
|
|
1677
|
-
var rootIDSet = new Set();
|
|
1678
|
-
|
|
1679
|
-
setItem = function (id, item) {
|
|
1680
|
-
itemMap.set(id, item);
|
|
1681
|
-
};
|
|
1682
|
-
getItem = function (id) {
|
|
1683
|
-
return itemMap.get(id);
|
|
1684
|
-
};
|
|
1685
|
-
removeItem = function (id) {
|
|
1686
|
-
itemMap['delete'](id);
|
|
1687
|
-
};
|
|
1688
|
-
getItemIDs = function () {
|
|
1689
|
-
return Array.from(itemMap.keys());
|
|
1690
|
-
};
|
|
1691
|
-
|
|
1692
|
-
addRoot = function (id) {
|
|
1693
|
-
rootIDSet.add(id);
|
|
1694
|
-
};
|
|
1695
|
-
removeRoot = function (id) {
|
|
1696
|
-
rootIDSet['delete'](id);
|
|
1697
|
-
};
|
|
1698
|
-
getRootIDs = function () {
|
|
1699
|
-
return Array.from(rootIDSet.keys());
|
|
1700
|
-
};
|
|
1701
|
-
} else {
|
|
1702
|
-
var itemByKey = {};
|
|
1703
|
-
var rootByKey = {};
|
|
1704
|
-
|
|
1705
|
-
// Use non-numeric keys to prevent V8 performance issues:
|
|
1706
|
-
// https://github.com/facebook/react/pull/7232
|
|
1707
|
-
var getKeyFromID = function (id) {
|
|
1708
|
-
return '.' + id;
|
|
1709
|
-
};
|
|
1710
|
-
var getIDFromKey = function (key) {
|
|
1711
|
-
return parseInt(key.substr(1), 10);
|
|
1712
|
-
};
|
|
1713
|
-
|
|
1714
|
-
setItem = function (id, item) {
|
|
1715
|
-
var key = getKeyFromID(id);
|
|
1716
|
-
itemByKey[key] = item;
|
|
1717
|
-
};
|
|
1718
|
-
getItem = function (id) {
|
|
1719
|
-
var key = getKeyFromID(id);
|
|
1720
|
-
return itemByKey[key];
|
|
1721
|
-
};
|
|
1722
|
-
removeItem = function (id) {
|
|
1723
|
-
var key = getKeyFromID(id);
|
|
1724
|
-
delete itemByKey[key];
|
|
1725
|
-
};
|
|
1726
|
-
getItemIDs = function () {
|
|
1727
|
-
return Object.keys(itemByKey).map(getIDFromKey);
|
|
1728
|
-
};
|
|
1729
1659
|
|
|
1730
|
-
|
|
1731
|
-
var key = getKeyFromID(id);
|
|
1732
|
-
rootByKey[key] = true;
|
|
1733
|
-
};
|
|
1734
|
-
removeRoot = function (id) {
|
|
1735
|
-
var key = getKeyFromID(id);
|
|
1736
|
-
delete rootByKey[key];
|
|
1737
|
-
};
|
|
1738
|
-
getRootIDs = function () {
|
|
1739
|
-
return Object.keys(rootByKey).map(getIDFromKey);
|
|
1740
|
-
};
|
|
1741
|
-
}
|
|
1660
|
+
var element = createElement.apply(this, arguments);
|
|
1742
1661
|
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
var childIDs = item.childIDs;
|
|
1662
|
+
// The result can be nullish if a mock or a custom function is used.
|
|
1663
|
+
// TODO: Drop this when these are no longer allowed as the type argument.
|
|
1664
|
+
if (element == null) {
|
|
1665
|
+
return element;
|
|
1666
|
+
}
|
|
1749
1667
|
|
|
1750
|
-
|
|
1751
|
-
|
|
1668
|
+
// Skip key warning if the type isn't valid since our key validation logic
|
|
1669
|
+
// doesn't expect a non-string/function type and can throw confusing errors.
|
|
1670
|
+
// We don't want exception behavior to differ between dev and prod.
|
|
1671
|
+
// (Rendering will throw with a helpful message and as soon as the type is
|
|
1672
|
+
// fixed, the key warnings will appear.)
|
|
1673
|
+
if (validType) {
|
|
1674
|
+
for (var i = 2; i < arguments.length; i++) {
|
|
1675
|
+
validateChildKeys(arguments[i], type);
|
|
1676
|
+
}
|
|
1752
1677
|
}
|
|
1753
|
-
}
|
|
1754
1678
|
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
return '#empty';
|
|
1758
|
-
} else if (typeof element === 'string' || typeof element === 'number') {
|
|
1759
|
-
return '#text';
|
|
1760
|
-
} else if (typeof element.type === 'string') {
|
|
1761
|
-
return element.type;
|
|
1679
|
+
if (typeof type === 'symbol' && type === REACT_FRAGMENT_TYPE$1) {
|
|
1680
|
+
validateFragmentProps(element);
|
|
1762
1681
|
} else {
|
|
1763
|
-
|
|
1682
|
+
validatePropTypes(element);
|
|
1764
1683
|
}
|
|
1765
|
-
}
|
|
1766
1684
|
|
|
1767
|
-
|
|
1768
|
-
var name = ReactComponentTreeHook.getDisplayName(id);
|
|
1769
|
-
var element = ReactComponentTreeHook.getElement(id);
|
|
1770
|
-
var ownerID = ReactComponentTreeHook.getOwnerID(id);
|
|
1771
|
-
var ownerName = void 0;
|
|
1772
|
-
|
|
1773
|
-
if (ownerID) {
|
|
1774
|
-
ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
|
|
1775
|
-
}
|
|
1776
|
-
warning$6(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id);
|
|
1777
|
-
return describeComponentFrame$1(name || '', element && element._source, ownerName || '');
|
|
1685
|
+
return element;
|
|
1778
1686
|
}
|
|
1779
1687
|
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
item.childIDs = nextChildIDs;
|
|
1785
|
-
|
|
1786
|
-
for (var i = 0; i < nextChildIDs.length; i++) {
|
|
1787
|
-
var nextChildID = nextChildIDs[i];
|
|
1788
|
-
var nextChild = getItem(nextChildID);
|
|
1789
|
-
!nextChild ? invariant_1(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : void 0;
|
|
1790
|
-
!(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? invariant_1(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : void 0;
|
|
1791
|
-
!nextChild.isMounted ? invariant_1(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : void 0;
|
|
1792
|
-
if (nextChild.parentID == null) {
|
|
1793
|
-
nextChild.parentID = id;
|
|
1794
|
-
// TODO: This shouldn't be necessary but mounting a new root during in
|
|
1795
|
-
// componentWillMount currently causes not-yet-mounted components to
|
|
1796
|
-
// be purged from our tree data so their parent id is missing.
|
|
1797
|
-
}
|
|
1798
|
-
!(nextChild.parentID === id) ? invariant_1(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : void 0;
|
|
1799
|
-
}
|
|
1800
|
-
},
|
|
1801
|
-
onBeforeMountComponent: function (id, element, parentID) {
|
|
1802
|
-
var item = {
|
|
1803
|
-
element: element,
|
|
1804
|
-
parentID: parentID,
|
|
1805
|
-
text: null,
|
|
1806
|
-
childIDs: [],
|
|
1807
|
-
isMounted: false,
|
|
1808
|
-
updateCount: 0
|
|
1809
|
-
};
|
|
1810
|
-
setItem(id, item);
|
|
1811
|
-
},
|
|
1812
|
-
onBeforeUpdateComponent: function (id, element) {
|
|
1813
|
-
var item = getItem(id);
|
|
1814
|
-
if (!item || !item.isMounted) {
|
|
1815
|
-
// We may end up here as a result of setState() in componentWillUnmount().
|
|
1816
|
-
// In this case, ignore the element.
|
|
1817
|
-
return;
|
|
1818
|
-
}
|
|
1819
|
-
item.element = element;
|
|
1820
|
-
},
|
|
1821
|
-
onMountComponent: function (id) {
|
|
1822
|
-
var item = getItem(id);
|
|
1823
|
-
!item ? invariant_1(false, 'Item must have been set') : void 0;
|
|
1824
|
-
item.isMounted = true;
|
|
1825
|
-
var isRoot = item.parentID === 0;
|
|
1826
|
-
if (isRoot) {
|
|
1827
|
-
addRoot(id);
|
|
1828
|
-
}
|
|
1829
|
-
},
|
|
1830
|
-
onUpdateComponent: function (id) {
|
|
1831
|
-
var item = getItem(id);
|
|
1832
|
-
if (!item || !item.isMounted) {
|
|
1833
|
-
// We may end up here as a result of setState() in componentWillUnmount().
|
|
1834
|
-
// In this case, ignore the element.
|
|
1835
|
-
return;
|
|
1836
|
-
}
|
|
1837
|
-
item.updateCount++;
|
|
1838
|
-
},
|
|
1839
|
-
onUnmountComponent: function (id) {
|
|
1840
|
-
var item = getItem(id);
|
|
1841
|
-
if (item) {
|
|
1842
|
-
// We need to check if it exists.
|
|
1843
|
-
// `item` might not exist if it is inside an error boundary, and a sibling
|
|
1844
|
-
// error boundary child threw while mounting. Then this instance never
|
|
1845
|
-
// got a chance to mount, but it still gets an unmounting event during
|
|
1846
|
-
// the error boundary cleanup.
|
|
1847
|
-
item.isMounted = false;
|
|
1848
|
-
var isRoot = item.parentID === 0;
|
|
1849
|
-
if (isRoot) {
|
|
1850
|
-
removeRoot(id);
|
|
1851
|
-
}
|
|
1852
|
-
}
|
|
1853
|
-
unmountedIDs.push(id);
|
|
1854
|
-
},
|
|
1855
|
-
purgeUnmountedComponents: function () {
|
|
1856
|
-
if (ReactComponentTreeHook._preventPurging) {
|
|
1857
|
-
// Should only be used for testing.
|
|
1858
|
-
return;
|
|
1859
|
-
}
|
|
1688
|
+
function createFactoryWithValidation(type) {
|
|
1689
|
+
var validatedFactory = createElementWithValidation.bind(null, type);
|
|
1690
|
+
// Legacy hook TODO: Warn if this is accessed
|
|
1691
|
+
validatedFactory.type = type;
|
|
1860
1692
|
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
},
|
|
1871
|
-
getCurrentStackAddendum: function () {
|
|
1872
|
-
var info = '';
|
|
1873
|
-
var currentOwner = ReactCurrentOwner_1.current;
|
|
1874
|
-
if (currentOwner) {
|
|
1875
|
-
!(typeof currentOwner.tag !== 'number') ? invariant_1(false, 'Fiber owners should not show up in Stack stack traces.') : void 0;
|
|
1876
|
-
if (typeof currentOwner._debugID === 'number') {
|
|
1877
|
-
info += ReactComponentTreeHook.getStackAddendumByID(currentOwner._debugID);
|
|
1693
|
+
{
|
|
1694
|
+
Object.defineProperty(validatedFactory, 'type', {
|
|
1695
|
+
enumerable: false,
|
|
1696
|
+
get: function () {
|
|
1697
|
+
lowPriorityWarning$1(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
|
|
1698
|
+
Object.defineProperty(this, 'type', {
|
|
1699
|
+
value: type
|
|
1700
|
+
});
|
|
1701
|
+
return type;
|
|
1878
1702
|
}
|
|
1879
|
-
}
|
|
1880
|
-
|
|
1881
|
-
},
|
|
1882
|
-
getStackAddendumByID: function (id) {
|
|
1883
|
-
var info = '';
|
|
1884
|
-
while (id) {
|
|
1885
|
-
info += describeID(id);
|
|
1886
|
-
id = ReactComponentTreeHook.getParentID(id);
|
|
1887
|
-
}
|
|
1888
|
-
return info;
|
|
1889
|
-
},
|
|
1890
|
-
getChildIDs: function (id) {
|
|
1891
|
-
var item = getItem(id);
|
|
1892
|
-
return item ? item.childIDs : [];
|
|
1893
|
-
},
|
|
1894
|
-
getDisplayName: function (id) {
|
|
1895
|
-
var element = ReactComponentTreeHook.getElement(id);
|
|
1896
|
-
if (!element) {
|
|
1897
|
-
return null;
|
|
1898
|
-
}
|
|
1899
|
-
return getDisplayName$1(element);
|
|
1900
|
-
},
|
|
1901
|
-
getElement: function (id) {
|
|
1902
|
-
var item = getItem(id);
|
|
1903
|
-
return item ? item.element : null;
|
|
1904
|
-
},
|
|
1905
|
-
getOwnerID: function (id) {
|
|
1906
|
-
var element = ReactComponentTreeHook.getElement(id);
|
|
1907
|
-
if (!element || !element._owner) {
|
|
1908
|
-
return null;
|
|
1909
|
-
}
|
|
1910
|
-
return element._owner._debugID;
|
|
1911
|
-
},
|
|
1912
|
-
getParentID: function (id) {
|
|
1913
|
-
var item = getItem(id);
|
|
1914
|
-
return item ? item.parentID : null;
|
|
1915
|
-
},
|
|
1916
|
-
getSource: function (id) {
|
|
1917
|
-
var item = getItem(id);
|
|
1918
|
-
var element = item ? item.element : null;
|
|
1919
|
-
var source = element != null ? element._source : null;
|
|
1920
|
-
return source;
|
|
1921
|
-
},
|
|
1922
|
-
getText: function (id) {
|
|
1923
|
-
var element = ReactComponentTreeHook.getElement(id);
|
|
1924
|
-
if (typeof element === 'string') {
|
|
1925
|
-
return element;
|
|
1926
|
-
} else if (typeof element === 'number') {
|
|
1927
|
-
return '' + element;
|
|
1928
|
-
} else {
|
|
1929
|
-
return null;
|
|
1930
|
-
}
|
|
1931
|
-
},
|
|
1932
|
-
getUpdateCount: function (id) {
|
|
1933
|
-
var item = getItem(id);
|
|
1934
|
-
return item ? item.updateCount : 0;
|
|
1935
|
-
},
|
|
1936
|
-
|
|
1703
|
+
});
|
|
1704
|
+
}
|
|
1937
1705
|
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
};
|
|
1706
|
+
return validatedFactory;
|
|
1707
|
+
}
|
|
1941
1708
|
|
|
1942
|
-
|
|
1709
|
+
function cloneElementWithValidation(element, props, children) {
|
|
1710
|
+
var newElement = cloneElement.apply(this, arguments);
|
|
1711
|
+
for (var i = 2; i < arguments.length; i++) {
|
|
1712
|
+
validateChildKeys(arguments[i], newElement.type);
|
|
1713
|
+
}
|
|
1714
|
+
validatePropTypes(newElement);
|
|
1715
|
+
return newElement;
|
|
1716
|
+
}
|
|
1943
1717
|
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1718
|
+
/**
|
|
1719
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1720
|
+
*
|
|
1721
|
+
* This source code is licensed under the MIT license found in the
|
|
1722
|
+
* LICENSE file in the root directory of this source tree.
|
|
1723
|
+
*/
|
|
1947
1724
|
|
|
1948
|
-
|
|
1949
|
-
var ReactElementValidator = ReactElementValidator_1;
|
|
1950
|
-
createElement = ReactElementValidator.createElement;
|
|
1951
|
-
createFactory = ReactElementValidator.createFactory;
|
|
1952
|
-
cloneElement = ReactElementValidator.cloneElement;
|
|
1953
|
-
}
|
|
1725
|
+
var REACT_FRAGMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.fragment') || 0xeacb;
|
|
1954
1726
|
|
|
1955
1727
|
var React = {
|
|
1956
1728
|
Children: {
|
|
1957
|
-
map:
|
|
1958
|
-
forEach:
|
|
1959
|
-
count:
|
|
1960
|
-
toArray:
|
|
1961
|
-
only:
|
|
1729
|
+
map: mapChildren,
|
|
1730
|
+
forEach: forEachChildren,
|
|
1731
|
+
count: countChildren,
|
|
1732
|
+
toArray: toArray,
|
|
1733
|
+
only: onlyChild
|
|
1962
1734
|
},
|
|
1963
1735
|
|
|
1964
|
-
Component:
|
|
1965
|
-
PureComponent:
|
|
1966
|
-
unstable_AsyncComponent:
|
|
1736
|
+
Component: Component,
|
|
1737
|
+
PureComponent: PureComponent,
|
|
1738
|
+
unstable_AsyncComponent: AsyncComponent,
|
|
1967
1739
|
|
|
1968
|
-
createElement:
|
|
1969
|
-
cloneElement:
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
createFactory: createFactory,
|
|
1740
|
+
createElement: createElementWithValidation,
|
|
1741
|
+
cloneElement: cloneElementWithValidation,
|
|
1742
|
+
createFactory: createFactoryWithValidation,
|
|
1743
|
+
isValidElement: isValidElement,
|
|
1973
1744
|
|
|
1974
1745
|
version: ReactVersion,
|
|
1975
1746
|
|
|
1976
1747
|
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
|
|
1977
|
-
ReactCurrentOwner:
|
|
1748
|
+
ReactCurrentOwner: ReactCurrentOwner,
|
|
1978
1749
|
// Used by renderers to avoid bundling object-assign twice in UMD bundles:
|
|
1979
|
-
assign:
|
|
1750
|
+
assign: objectAssign$1
|
|
1980
1751
|
}
|
|
1981
1752
|
};
|
|
1982
1753
|
|
|
1754
|
+
if (ReactFeatureFlags.enableReactFragment) {
|
|
1755
|
+
React.Fragment = REACT_FRAGMENT_TYPE;
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1983
1758
|
{
|
|
1984
|
-
|
|
1759
|
+
objectAssign$1(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
|
|
1985
1760
|
// These should not be included in production.
|
|
1986
|
-
|
|
1987
|
-
|
|
1761
|
+
ReactDebugCurrentFrame: ReactDebugCurrentFrame,
|
|
1762
|
+
// Shim for React DOM 16.0.0 which still destructured (but not used) this.
|
|
1763
|
+
// TODO: remove in React 17.0.
|
|
1764
|
+
ReactComponentTreeHook: {}
|
|
1988
1765
|
});
|
|
1989
1766
|
}
|
|
1990
1767
|
|
|
1991
|
-
var ReactEntry = React;
|
|
1992
1768
|
|
|
1993
|
-
|
|
1769
|
+
|
|
1770
|
+
var React$2 = Object.freeze({
|
|
1771
|
+
default: React
|
|
1772
|
+
});
|
|
1773
|
+
|
|
1774
|
+
var React$3 = ( React$2 && React ) || React$2;
|
|
1775
|
+
|
|
1776
|
+
/**
|
|
1777
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1778
|
+
*
|
|
1779
|
+
* This source code is licensed under the MIT license found in the
|
|
1780
|
+
* LICENSE file in the root directory of this source tree.
|
|
1781
|
+
*
|
|
1782
|
+
*
|
|
1783
|
+
*/
|
|
1784
|
+
|
|
1785
|
+
|
|
1786
|
+
|
|
1787
|
+
|
|
1788
|
+
|
|
1789
|
+
// TODO: decide on the top-level export form.
|
|
1790
|
+
// This is hacky but makes it work with both Rollup and Jest.
|
|
1791
|
+
var react = React$3['default'] ? React$3['default'] : React$3;
|
|
1792
|
+
|
|
1793
|
+
return react;
|
|
1994
1794
|
|
|
1995
1795
|
})));
|