react 0.0.0-experimental-355970aa4 → 0.0.0-experimental-d7382b6c4

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/build-info.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "branch": "master",
3
- "buildNumber": "95496",
4
- "checksum": "fedae96",
5
- "commit": "355970aa4",
3
+ "buildNumber": "113424",
4
+ "checksum": "cf19f4a",
5
+ "commit": "d7382b6c4",
6
6
  "environment": "ci",
7
- "reactVersion": "16.13.0-experimental-355970aa4"
7
+ "reactVersion": "16.13.1-experimental-d7382b6c4"
8
8
  }
@@ -0,0 +1,798 @@
1
+ /** @license React v0.0.0-experimental-d7382b6c4
2
+ * react-jsx-dev-runtime.development.js
3
+ *
4
+ * Copyright (c) Facebook, Inc. and its affiliates.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+ 'use strict';
11
+
12
+
13
+
14
+ if (process.env.NODE_ENV !== "production") {
15
+ (function() {
16
+ 'use strict';
17
+
18
+ var React = require('react');
19
+
20
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
21
+ // nor polyfill, then a plain number is used for performance.
22
+ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
23
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
24
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
25
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
26
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
27
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
28
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
29
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
30
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
31
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
32
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
33
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
34
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
35
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
36
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
37
+ var REACT_SERVER_BLOCK_TYPE = hasSymbol ? Symbol.for('react.server.block') : 0xeada;
38
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
39
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
40
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
41
+ var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
42
+ var FAUX_ITERATOR_SYMBOL = '@@iterator';
43
+ function getIteratorFn(maybeIterable) {
44
+ if (maybeIterable === null || typeof maybeIterable !== 'object') {
45
+ return null;
46
+ }
47
+
48
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
49
+
50
+ if (typeof maybeIterator === 'function') {
51
+ return maybeIterator;
52
+ }
53
+
54
+ return null;
55
+ }
56
+
57
+ var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
58
+
59
+ function error(format) {
60
+ {
61
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
62
+ args[_key2 - 1] = arguments[_key2];
63
+ }
64
+
65
+ printWarning('error', format, args);
66
+ }
67
+ }
68
+
69
+ function printWarning(level, format, args) {
70
+ // When changing this logic, you might want to also
71
+ // update consoleWithStackDev.www.js as well.
72
+ {
73
+ var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
74
+
75
+ if (!hasExistingStack) {
76
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
77
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
78
+
79
+ if (stack !== '') {
80
+ format += '%s';
81
+ args = args.concat([stack]);
82
+ }
83
+ }
84
+
85
+ var argsWithFormat = args.map(function (item) {
86
+ return '' + item;
87
+ }); // Careful: RN currently depends on this prefix
88
+
89
+ argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
90
+ // breaks IE9: https://github.com/facebook/react/issues/13610
91
+ // eslint-disable-next-line react-internal/no-production-logging
92
+
93
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
94
+
95
+ try {
96
+ // --- Welcome to debugging React ---
97
+ // This error was thrown as a convenience so that you can use this stack
98
+ // to find the callsite that caused this warning to fire.
99
+ var argIndex = 0;
100
+ var message = 'Warning: ' + format.replace(/%s/g, function () {
101
+ return args[argIndex++];
102
+ });
103
+ throw new Error(message);
104
+ } catch (x) {}
105
+ }
106
+ }
107
+
108
+ function isValidElementType(type) {
109
+ return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
110
+ type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE);
111
+ }
112
+
113
+ function getWrappedName(outerType, innerType, wrapperName) {
114
+ var functionName = innerType.displayName || innerType.name || '';
115
+ return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
116
+ }
117
+
118
+ function getContextName(type) {
119
+ return type.displayName || 'Context';
120
+ }
121
+
122
+ function getComponentName(type) {
123
+ if (type == null) {
124
+ // Host root, text node or just invalid type.
125
+ return null;
126
+ }
127
+
128
+ {
129
+ if (typeof type.tag === 'number') {
130
+ error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
131
+ }
132
+ }
133
+
134
+ if (typeof type === 'function') {
135
+ return type.displayName || type.name || null;
136
+ }
137
+
138
+ if (typeof type === 'string') {
139
+ return type;
140
+ }
141
+
142
+ switch (type) {
143
+ case REACT_FRAGMENT_TYPE:
144
+ return 'Fragment';
145
+
146
+ case REACT_PORTAL_TYPE:
147
+ return 'Portal';
148
+
149
+ case REACT_PROFILER_TYPE:
150
+ return "Profiler";
151
+
152
+ case REACT_STRICT_MODE_TYPE:
153
+ return 'StrictMode';
154
+
155
+ case REACT_SUSPENSE_TYPE:
156
+ return 'Suspense';
157
+
158
+ case REACT_SUSPENSE_LIST_TYPE:
159
+ return 'SuspenseList';
160
+ }
161
+
162
+ if (typeof type === 'object') {
163
+ switch (type.$$typeof) {
164
+ case REACT_CONTEXT_TYPE:
165
+ var context = type;
166
+ return getContextName(context) + '.Consumer';
167
+
168
+ case REACT_PROVIDER_TYPE:
169
+ var provider = type;
170
+ return getContextName(provider._context) + '.Provider';
171
+
172
+ case REACT_FORWARD_REF_TYPE:
173
+ return getWrappedName(type, type.render, 'ForwardRef');
174
+
175
+ case REACT_MEMO_TYPE:
176
+ return getComponentName(type.type);
177
+
178
+ case REACT_BLOCK_TYPE:
179
+ return getComponentName(type._render);
180
+
181
+ case REACT_LAZY_TYPE:
182
+ {
183
+ var lazyComponent = type;
184
+ var payload = lazyComponent._payload;
185
+ var init = lazyComponent._init;
186
+
187
+ try {
188
+ return getComponentName(init(payload));
189
+ } catch (x) {
190
+ return null;
191
+ }
192
+ }
193
+ }
194
+ }
195
+
196
+ return null;
197
+ }
198
+
199
+ var loggedTypeFailures = {};
200
+ function checkPropTypes(typeSpecs, values, location, componentName) {
201
+ {
202
+ // $FlowFixMe This is okay but Flow doesn't know it.
203
+ var has = Function.call.bind(Object.prototype.hasOwnProperty);
204
+
205
+ for (var typeSpecName in typeSpecs) {
206
+ if (has(typeSpecs, typeSpecName)) {
207
+ var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
208
+ // fail the render phase where it didn't fail before. So we log it.
209
+ // After these have been cleaned up, we'll let them throw.
210
+
211
+ try {
212
+ // This is intentionally an invariant that gets caught. It's the same
213
+ // behavior as without this statement except with a better message.
214
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
215
+ var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
216
+ err.name = 'Invariant Violation';
217
+ throw err;
218
+ }
219
+
220
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
221
+ } catch (ex) {
222
+ error$1 = ex;
223
+ }
224
+
225
+ if (error$1 && !(error$1 instanceof Error)) {
226
+ 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$1);
227
+ }
228
+
229
+ if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
230
+ // Only monitor this failure once because there tends to be a lot of the
231
+ // same error.
232
+ loggedTypeFailures[error$1.message] = true;
233
+
234
+ error('Failed %s type: %s', location, error$1.message);
235
+ }
236
+ }
237
+ }
238
+ }
239
+ }
240
+
241
+ var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
242
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
243
+ var RESERVED_PROPS = {
244
+ key: true,
245
+ ref: true,
246
+ __self: true,
247
+ __source: true
248
+ };
249
+ var specialPropKeyWarningShown;
250
+ var specialPropRefWarningShown;
251
+ var didWarnAboutStringRefs;
252
+
253
+ {
254
+ didWarnAboutStringRefs = {};
255
+ }
256
+
257
+ function hasValidRef(config) {
258
+ {
259
+ if (hasOwnProperty.call(config, 'ref')) {
260
+ var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
261
+
262
+ if (getter && getter.isReactWarning) {
263
+ return false;
264
+ }
265
+ }
266
+ }
267
+
268
+ return config.ref !== undefined;
269
+ }
270
+
271
+ function hasValidKey(config) {
272
+ {
273
+ if (hasOwnProperty.call(config, 'key')) {
274
+ var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
275
+
276
+ if (getter && getter.isReactWarning) {
277
+ return false;
278
+ }
279
+ }
280
+ }
281
+
282
+ return config.key !== undefined;
283
+ }
284
+
285
+ function warnIfStringRefCannotBeAutoConverted(config, self) {
286
+ {
287
+ if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
288
+ var componentName = getComponentName(ReactCurrentOwner.current.type);
289
+
290
+ if (!didWarnAboutStringRefs[componentName]) {
291
+ error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref);
292
+
293
+ didWarnAboutStringRefs[componentName] = true;
294
+ }
295
+ }
296
+ }
297
+ }
298
+
299
+ function defineKeyPropWarningGetter(props, displayName) {
300
+ {
301
+ var warnAboutAccessingKey = function () {
302
+ if (!specialPropKeyWarningShown) {
303
+ specialPropKeyWarningShown = true;
304
+
305
+ error('%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);
306
+ }
307
+ };
308
+
309
+ warnAboutAccessingKey.isReactWarning = true;
310
+ Object.defineProperty(props, 'key', {
311
+ get: warnAboutAccessingKey,
312
+ configurable: true
313
+ });
314
+ }
315
+ }
316
+
317
+ function defineRefPropWarningGetter(props, displayName) {
318
+ {
319
+ var warnAboutAccessingRef = function () {
320
+ if (!specialPropRefWarningShown) {
321
+ specialPropRefWarningShown = true;
322
+
323
+ error('%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);
324
+ }
325
+ };
326
+
327
+ warnAboutAccessingRef.isReactWarning = true;
328
+ Object.defineProperty(props, 'ref', {
329
+ get: warnAboutAccessingRef,
330
+ configurable: true
331
+ });
332
+ }
333
+ }
334
+ /**
335
+ * Factory method to create a new React element. This no longer adheres to
336
+ * the class pattern, so do not use new to call it. Also, instanceof check
337
+ * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
338
+ * if something is a React Element.
339
+ *
340
+ * @param {*} type
341
+ * @param {*} props
342
+ * @param {*} key
343
+ * @param {string|object} ref
344
+ * @param {*} owner
345
+ * @param {*} self A *temporary* helper to detect places where `this` is
346
+ * different from the `owner` when React.createElement is called, so that we
347
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
348
+ * functions, and as long as `this` and owner are the same, there will be no
349
+ * change in behavior.
350
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
351
+ * indicating filename, line number, and/or other information.
352
+ * @internal
353
+ */
354
+
355
+
356
+ var ReactElement = function (type, key, ref, self, source, owner, props) {
357
+ var element = {
358
+ // This tag allows us to uniquely identify this as a React Element
359
+ $$typeof: REACT_ELEMENT_TYPE,
360
+ // Built-in properties that belong on the element
361
+ type: type,
362
+ key: key,
363
+ ref: ref,
364
+ props: props,
365
+ // Record the component responsible for creating this element.
366
+ _owner: owner
367
+ };
368
+
369
+ {
370
+ // The validation flag is currently mutative. We put it on
371
+ // an external backing store so that we can freeze the whole object.
372
+ // This can be replaced with a WeakMap once they are implemented in
373
+ // commonly used development environments.
374
+ element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
375
+ // the validation flag non-enumerable (where possible, which should
376
+ // include every environment we run tests in), so the test framework
377
+ // ignores it.
378
+
379
+ Object.defineProperty(element._store, 'validated', {
380
+ configurable: false,
381
+ enumerable: false,
382
+ writable: true,
383
+ value: false
384
+ }); // self and source are DEV only properties.
385
+
386
+ Object.defineProperty(element, '_self', {
387
+ configurable: false,
388
+ enumerable: false,
389
+ writable: false,
390
+ value: self
391
+ }); // Two elements created in two different places should be considered
392
+ // equal for testing purposes and therefore we hide it from enumeration.
393
+
394
+ Object.defineProperty(element, '_source', {
395
+ configurable: false,
396
+ enumerable: false,
397
+ writable: false,
398
+ value: source
399
+ });
400
+
401
+ if (Object.freeze) {
402
+ Object.freeze(element.props);
403
+ Object.freeze(element);
404
+ }
405
+ }
406
+
407
+ return element;
408
+ };
409
+ /**
410
+ * https://github.com/reactjs/rfcs/pull/107
411
+ * @param {*} type
412
+ * @param {object} props
413
+ * @param {string} key
414
+ */
415
+
416
+ function jsxDEV(type, config, maybeKey, source, self) {
417
+ {
418
+ var propName; // Reserved names are extracted
419
+
420
+ var props = {};
421
+ var key = null;
422
+ var ref = null; // Currently, key can be spread in as a prop. This causes a potential
423
+ // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
424
+ // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
425
+ // but as an intermediary step, we will use jsxDEV for everything except
426
+ // <div {...props} key="Hi" />, because we aren't currently able to tell if
427
+ // key is explicitly declared to be undefined or not.
428
+
429
+ if (maybeKey !== undefined) {
430
+ key = '' + maybeKey;
431
+ }
432
+
433
+ if (hasValidKey(config)) {
434
+ key = '' + config.key;
435
+ }
436
+
437
+ if (hasValidRef(config)) {
438
+ ref = config.ref;
439
+ warnIfStringRefCannotBeAutoConverted(config, self);
440
+ } // Remaining properties are added to a new props object
441
+
442
+
443
+ for (propName in config) {
444
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
445
+ props[propName] = config[propName];
446
+ }
447
+ } // Resolve default props
448
+
449
+
450
+ if (type && type.defaultProps) {
451
+ var defaultProps = type.defaultProps;
452
+
453
+ for (propName in defaultProps) {
454
+ if (props[propName] === undefined) {
455
+ props[propName] = defaultProps[propName];
456
+ }
457
+ }
458
+ }
459
+
460
+ if (key || ref) {
461
+ var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
462
+
463
+ if (key) {
464
+ defineKeyPropWarningGetter(props, displayName);
465
+ }
466
+
467
+ if (ref) {
468
+ defineRefPropWarningGetter(props, displayName);
469
+ }
470
+ }
471
+
472
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
473
+ }
474
+ }
475
+
476
+ var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
477
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
478
+ var propTypesMisspellWarningShown;
479
+
480
+ {
481
+ propTypesMisspellWarningShown = false;
482
+ }
483
+ /**
484
+ * Verifies the object is a ReactElement.
485
+ * See https://reactjs.org/docs/react-api.html#isvalidelement
486
+ * @param {?object} object
487
+ * @return {boolean} True if `object` is a ReactElement.
488
+ * @final
489
+ */
490
+
491
+ function isValidElement(object) {
492
+ {
493
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
494
+ }
495
+ }
496
+
497
+ function getDeclarationErrorAddendum() {
498
+ {
499
+ if (ReactCurrentOwner$1.current) {
500
+ var name = getComponentName(ReactCurrentOwner$1.current.type);
501
+
502
+ if (name) {
503
+ return '\n\nCheck the render method of `' + name + '`.';
504
+ }
505
+ }
506
+
507
+ return '';
508
+ }
509
+ }
510
+
511
+ function getSourceInfoErrorAddendum(source) {
512
+ {
513
+ if (source !== undefined) {
514
+ var fileName = source.fileName.replace(/^.*[\\\/]/, '');
515
+ var lineNumber = source.lineNumber;
516
+ return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
517
+ }
518
+
519
+ return '';
520
+ }
521
+ }
522
+ /**
523
+ * Warn if there's no key explicitly set on dynamic arrays of children or
524
+ * object keys are not valid. This allows us to keep track of children between
525
+ * updates.
526
+ */
527
+
528
+
529
+ var ownerHasKeyUseWarning = {};
530
+
531
+ function getCurrentComponentErrorInfo(parentType) {
532
+ {
533
+ var info = getDeclarationErrorAddendum();
534
+
535
+ if (!info) {
536
+ var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
537
+
538
+ if (parentName) {
539
+ info = "\n\nCheck the top-level render call using <" + parentName + ">.";
540
+ }
541
+ }
542
+
543
+ return info;
544
+ }
545
+ }
546
+ /**
547
+ * Warn if the element doesn't have an explicit key assigned to it.
548
+ * This element is in an array. The array could grow and shrink or be
549
+ * reordered. All children that haven't already been validated are required to
550
+ * have a "key" property assigned to it. Error statuses are cached so a warning
551
+ * will only be shown once.
552
+ *
553
+ * @internal
554
+ * @param {ReactElement} element Element that requires a key.
555
+ * @param {*} parentType element's parent's type.
556
+ */
557
+
558
+
559
+ function validateExplicitKey(element, parentType) {
560
+ {
561
+ if (!element._store || element._store.validated || element.key != null) {
562
+ return;
563
+ }
564
+
565
+ element._store.validated = true;
566
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
567
+
568
+ if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
569
+ return;
570
+ }
571
+
572
+ ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
573
+ // property, it may be the creator of the child that's responsible for
574
+ // assigning it a key.
575
+
576
+ var childOwner = '';
577
+
578
+ if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
579
+ // Give the component that originally created this child.
580
+ childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
581
+ }
582
+
583
+ ReactDebugCurrentFrame.setCurrentlyValidatingElement(element);
584
+
585
+ error('Each child in a list should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner);
586
+
587
+ ReactDebugCurrentFrame.setCurrentlyValidatingElement(null);
588
+ }
589
+ }
590
+ /**
591
+ * Ensure that every element either is passed in a static location, in an
592
+ * array with an explicit keys property defined, or in an object literal
593
+ * with valid key property.
594
+ *
595
+ * @internal
596
+ * @param {ReactNode} node Statically passed child of any type.
597
+ * @param {*} parentType node's parent's type.
598
+ */
599
+
600
+
601
+ function validateChildKeys(node, parentType) {
602
+ {
603
+ if (typeof node !== 'object') {
604
+ return;
605
+ }
606
+
607
+ if (Array.isArray(node)) {
608
+ for (var i = 0; i < node.length; i++) {
609
+ var child = node[i];
610
+
611
+ if (isValidElement(child)) {
612
+ validateExplicitKey(child, parentType);
613
+ }
614
+ }
615
+ } else if (isValidElement(node)) {
616
+ // This element was passed in a valid location.
617
+ if (node._store) {
618
+ node._store.validated = true;
619
+ }
620
+ } else if (node) {
621
+ var iteratorFn = getIteratorFn(node);
622
+
623
+ if (typeof iteratorFn === 'function') {
624
+ // Entry iterators used to provide implicit keys,
625
+ // but now we print a separate warning for them later.
626
+ if (iteratorFn !== node.entries) {
627
+ var iterator = iteratorFn.call(node);
628
+ var step;
629
+
630
+ while (!(step = iterator.next()).done) {
631
+ if (isValidElement(step.value)) {
632
+ validateExplicitKey(step.value, parentType);
633
+ }
634
+ }
635
+ }
636
+ }
637
+ }
638
+ }
639
+ }
640
+ /**
641
+ * Given an element, validate that its props follow the propTypes definition,
642
+ * provided by the type.
643
+ *
644
+ * @param {ReactElement} element
645
+ */
646
+
647
+
648
+ function validatePropTypes(element) {
649
+ {
650
+ var type = element.type;
651
+
652
+ if (type === null || type === undefined || typeof type === 'string') {
653
+ return;
654
+ }
655
+
656
+ var name = getComponentName(type);
657
+ var propTypes;
658
+
659
+ if (typeof type === 'function') {
660
+ propTypes = type.propTypes;
661
+ } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
662
+ // Inner props are checked in the reconciler.
663
+ type.$$typeof === REACT_MEMO_TYPE)) {
664
+ propTypes = type.propTypes;
665
+ } else {
666
+ return;
667
+ }
668
+
669
+ if (propTypes) {
670
+ ReactDebugCurrentFrame.setCurrentlyValidatingElement(element);
671
+ checkPropTypes(propTypes, element.props, 'prop', name);
672
+ ReactDebugCurrentFrame.setCurrentlyValidatingElement(null);
673
+ } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
674
+ propTypesMisspellWarningShown = true;
675
+
676
+ error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
677
+ }
678
+
679
+ if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
680
+ error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
681
+ }
682
+ }
683
+ }
684
+ /**
685
+ * Given a fragment, validate that it can only be provided with fragment props
686
+ * @param {ReactElement} fragment
687
+ */
688
+
689
+
690
+ function validateFragmentProps(fragment) {
691
+ {
692
+ ReactDebugCurrentFrame.setCurrentlyValidatingElement(fragment);
693
+ var keys = Object.keys(fragment.props);
694
+
695
+ for (var i = 0; i < keys.length; i++) {
696
+ var key = keys[i];
697
+
698
+ if (key !== 'children' && key !== 'key') {
699
+ error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
700
+
701
+ break;
702
+ }
703
+ }
704
+
705
+ if (fragment.ref !== null) {
706
+ error('Invalid attribute `ref` supplied to `React.Fragment`.');
707
+ }
708
+
709
+ ReactDebugCurrentFrame.setCurrentlyValidatingElement(null);
710
+ }
711
+ }
712
+
713
+ function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
714
+ {
715
+ var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
716
+ // succeed and there will likely be errors in render.
717
+
718
+ if (!validType) {
719
+ var info = '';
720
+
721
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
722
+ info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
723
+ }
724
+
725
+ var sourceInfo = getSourceInfoErrorAddendum(source);
726
+
727
+ if (sourceInfo) {
728
+ info += sourceInfo;
729
+ } else {
730
+ info += getDeclarationErrorAddendum();
731
+ }
732
+
733
+ var typeString;
734
+
735
+ if (type === null) {
736
+ typeString = 'null';
737
+ } else if (Array.isArray(type)) {
738
+ typeString = 'array';
739
+ } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
740
+ typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
741
+ info = ' Did you accidentally export a JSX literal instead of a component?';
742
+ } else {
743
+ typeString = typeof type;
744
+ }
745
+
746
+ error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
747
+ }
748
+
749
+ var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
750
+ // TODO: Drop this when these are no longer allowed as the type argument.
751
+
752
+ if (element == null) {
753
+ return element;
754
+ } // Skip key warning if the type isn't valid since our key validation logic
755
+ // doesn't expect a non-string/function type and can throw confusing errors.
756
+ // We don't want exception behavior to differ between dev and prod.
757
+ // (Rendering will throw with a helpful message and as soon as the type is
758
+ // fixed, the key warnings will appear.)
759
+
760
+
761
+ if (validType) {
762
+ var children = props.children;
763
+
764
+ if (children !== undefined) {
765
+ if (isStaticChildren) {
766
+ if (Array.isArray(children)) {
767
+ for (var i = 0; i < children.length; i++) {
768
+ validateChildKeys(children[i], type);
769
+ }
770
+
771
+ if (Object.freeze) {
772
+ Object.freeze(children);
773
+ }
774
+ } else {
775
+ error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
776
+ }
777
+ } else {
778
+ validateChildKeys(children, type);
779
+ }
780
+ }
781
+ }
782
+
783
+ if (type === REACT_FRAGMENT_TYPE) {
784
+ validateFragmentProps(element);
785
+ } else {
786
+ validatePropTypes(element);
787
+ }
788
+
789
+ return element;
790
+ }
791
+ } // These two functions exist to still get child warnings in dev
792
+
793
+ var jsxDEV$1 = jsxWithValidation ;
794
+
795
+ exports.Fragment = REACT_FRAGMENT_TYPE;
796
+ exports.jsxDEV = jsxDEV$1;
797
+ })();
798
+ }