react-dom 16.13.0 → 16.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/build-info.json +5 -5
  2. package/cjs/react-dom-server.browser.development.js +2 -2
  3. package/cjs/react-dom-server.browser.production.min.js +2 -2
  4. package/cjs/react-dom-server.node.development.js +2 -2
  5. package/cjs/react-dom-server.node.production.min.js +2 -2
  6. package/cjs/react-dom-test-utils.development.js +1 -1
  7. package/cjs/react-dom-test-utils.production.min.js +1 -1
  8. package/cjs/react-dom-unstable-fizz.browser.development.js +1 -1
  9. package/cjs/react-dom-unstable-fizz.browser.production.min.js +1 -1
  10. package/cjs/react-dom-unstable-fizz.node.development.js +1 -1
  11. package/cjs/react-dom-unstable-fizz.node.production.min.js +1 -1
  12. package/cjs/react-dom-unstable-native-dependencies.development.js +1 -1
  13. package/cjs/react-dom-unstable-native-dependencies.production.min.js +1 -1
  14. package/cjs/react-dom.development.js +389 -423
  15. package/cjs/react-dom.production.min.js +67 -67
  16. package/cjs/react-dom.profiling.min.js +66 -66
  17. package/package.json +3 -3
  18. package/umd/react-dom-server.browser.development.js +2 -2
  19. package/umd/react-dom-server.browser.production.min.js +2 -2
  20. package/umd/react-dom-test-utils.development.js +1 -1
  21. package/umd/react-dom-test-utils.production.min.js +1 -1
  22. package/umd/react-dom-unstable-fizz.browser.development.js +1 -1
  23. package/umd/react-dom-unstable-fizz.browser.production.min.js +1 -1
  24. package/umd/react-dom-unstable-native-dependencies.development.js +1 -1
  25. package/umd/react-dom-unstable-native-dependencies.production.min.js +1 -1
  26. package/umd/react-dom.development.js +389 -423
  27. package/umd/react-dom.production.min.js +52 -52
  28. package/umd/react-dom.profiling.min.js +104 -103
@@ -1,4 +1,4 @@
1
- /** @license React v16.13.0
1
+ /** @license React v16.13.1
2
2
  * react-dom.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -445,271 +445,6 @@ var FundamentalComponent = 20;
445
445
  var ScopeComponent = 21;
446
446
  var Block = 22;
447
447
 
448
- var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
449
- function describeComponentFrame (name, source, ownerName) {
450
- var sourceInfo = '';
451
-
452
- if (source) {
453
- var path = source.fileName;
454
- var fileName = path.replace(BEFORE_SLASH_RE, '');
455
-
456
- {
457
- // In DEV, include code for a common special case:
458
- // prefer "folder/index.js" instead of just "index.js".
459
- if (/^index\./.test(fileName)) {
460
- var match = path.match(BEFORE_SLASH_RE);
461
-
462
- if (match) {
463
- var pathBeforeSlash = match[1];
464
-
465
- if (pathBeforeSlash) {
466
- var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
467
- fileName = folderName + '/' + fileName;
468
- }
469
- }
470
- }
471
- }
472
-
473
- sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
474
- } else if (ownerName) {
475
- sourceInfo = ' (created by ' + ownerName + ')';
476
- }
477
-
478
- return '\n in ' + (name || 'Unknown') + sourceInfo;
479
- }
480
-
481
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
482
- // nor polyfill, then a plain number is used for performance.
483
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
484
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
485
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
486
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
487
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
488
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
489
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
490
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
491
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
492
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
493
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
494
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
495
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
496
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
497
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
498
- var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
499
- var FAUX_ITERATOR_SYMBOL = '@@iterator';
500
- function getIteratorFn(maybeIterable) {
501
- if (maybeIterable === null || typeof maybeIterable !== 'object') {
502
- return null;
503
- }
504
-
505
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
506
-
507
- if (typeof maybeIterator === 'function') {
508
- return maybeIterator;
509
- }
510
-
511
- return null;
512
- }
513
-
514
- var Uninitialized = -1;
515
- var Pending = 0;
516
- var Resolved = 1;
517
- var Rejected = 2;
518
- function refineResolvedLazyComponent(lazyComponent) {
519
- return lazyComponent._status === Resolved ? lazyComponent._result : null;
520
- }
521
- function initializeLazyComponentType(lazyComponent) {
522
- if (lazyComponent._status === Uninitialized) {
523
- lazyComponent._status = Pending;
524
- var ctor = lazyComponent._ctor;
525
- var thenable = ctor();
526
- lazyComponent._result = thenable;
527
- thenable.then(function (moduleObject) {
528
- if (lazyComponent._status === Pending) {
529
- var defaultExport = moduleObject.default;
530
-
531
- {
532
- if (defaultExport === undefined) {
533
- error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + "const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
534
- }
535
- }
536
-
537
- lazyComponent._status = Resolved;
538
- lazyComponent._result = defaultExport;
539
- }
540
- }, function (error) {
541
- if (lazyComponent._status === Pending) {
542
- lazyComponent._status = Rejected;
543
- lazyComponent._result = error;
544
- }
545
- });
546
- }
547
- }
548
-
549
- function getWrappedName(outerType, innerType, wrapperName) {
550
- var functionName = innerType.displayName || innerType.name || '';
551
- return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
552
- }
553
-
554
- function getComponentName(type) {
555
- if (type == null) {
556
- // Host root, text node or just invalid type.
557
- return null;
558
- }
559
-
560
- {
561
- if (typeof type.tag === 'number') {
562
- error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
563
- }
564
- }
565
-
566
- if (typeof type === 'function') {
567
- return type.displayName || type.name || null;
568
- }
569
-
570
- if (typeof type === 'string') {
571
- return type;
572
- }
573
-
574
- switch (type) {
575
- case REACT_FRAGMENT_TYPE:
576
- return 'Fragment';
577
-
578
- case REACT_PORTAL_TYPE:
579
- return 'Portal';
580
-
581
- case REACT_PROFILER_TYPE:
582
- return "Profiler";
583
-
584
- case REACT_STRICT_MODE_TYPE:
585
- return 'StrictMode';
586
-
587
- case REACT_SUSPENSE_TYPE:
588
- return 'Suspense';
589
-
590
- case REACT_SUSPENSE_LIST_TYPE:
591
- return 'SuspenseList';
592
- }
593
-
594
- if (typeof type === 'object') {
595
- switch (type.$$typeof) {
596
- case REACT_CONTEXT_TYPE:
597
- return 'Context.Consumer';
598
-
599
- case REACT_PROVIDER_TYPE:
600
- return 'Context.Provider';
601
-
602
- case REACT_FORWARD_REF_TYPE:
603
- return getWrappedName(type, type.render, 'ForwardRef');
604
-
605
- case REACT_MEMO_TYPE:
606
- return getComponentName(type.type);
607
-
608
- case REACT_BLOCK_TYPE:
609
- return getComponentName(type.render);
610
-
611
- case REACT_LAZY_TYPE:
612
- {
613
- var thenable = type;
614
- var resolvedThenable = refineResolvedLazyComponent(thenable);
615
-
616
- if (resolvedThenable) {
617
- return getComponentName(resolvedThenable);
618
- }
619
-
620
- break;
621
- }
622
- }
623
- }
624
-
625
- return null;
626
- }
627
-
628
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
629
-
630
- function describeFiber(fiber) {
631
- switch (fiber.tag) {
632
- case HostRoot:
633
- case HostPortal:
634
- case HostText:
635
- case Fragment:
636
- case ContextProvider:
637
- case ContextConsumer:
638
- return '';
639
-
640
- default:
641
- var owner = fiber._debugOwner;
642
- var source = fiber._debugSource;
643
- var name = getComponentName(fiber.type);
644
- var ownerName = null;
645
-
646
- if (owner) {
647
- ownerName = getComponentName(owner.type);
648
- }
649
-
650
- return describeComponentFrame(name, source, ownerName);
651
- }
652
- }
653
-
654
- function getStackByFiberInDevAndProd(workInProgress) {
655
- var info = '';
656
- var node = workInProgress;
657
-
658
- do {
659
- info += describeFiber(node);
660
- node = node.return;
661
- } while (node);
662
-
663
- return info;
664
- }
665
- var current = null;
666
- var phase = null;
667
- function getCurrentFiberOwnerNameInDevOrNull() {
668
- {
669
- if (current === null) {
670
- return null;
671
- }
672
-
673
- var owner = current._debugOwner;
674
-
675
- if (owner !== null && typeof owner !== 'undefined') {
676
- return getComponentName(owner.type);
677
- }
678
- }
679
-
680
- return null;
681
- }
682
- function getCurrentFiberStackInDev() {
683
- {
684
- if (current === null) {
685
- return '';
686
- } // Safe because if current fiber exists, we are reconciling,
687
- // and it is guaranteed to be the work-in-progress version.
688
-
689
-
690
- return getStackByFiberInDevAndProd(current);
691
- }
692
- }
693
- function resetCurrentFiber() {
694
- {
695
- ReactDebugCurrentFrame.getCurrentStack = null;
696
- current = null;
697
- phase = null;
698
- }
699
- }
700
- function setCurrentFiber(fiber) {
701
- {
702
- ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev;
703
- current = fiber;
704
- phase = null;
705
- }
706
- }
707
- function setCurrentPhase(lifeCyclePhase) {
708
- {
709
- phase = lifeCyclePhase;
710
- }
711
- }
712
-
713
448
  /**
714
449
  * Injectable ordering of event plugins.
715
450
  */
@@ -1409,10 +1144,10 @@ properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mu
1409
1144
  true);
1410
1145
  });
1411
1146
 
1412
- var ReactDebugCurrentFrame$1 = null;
1147
+ var ReactDebugCurrentFrame = null;
1413
1148
 
1414
1149
  {
1415
- ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
1150
+ ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
1416
1151
  } // A javascript: URL can contain leading C0 control or \u0020 SPACE,
1417
1152
  // and any newline or tab are filtered out as if they're not part of the URL.
1418
1153
  // https://url.spec.whatwg.org/#url-parsing
@@ -1494,127 +1229,392 @@ function getValueForProperty(node, name, expected, propertyInfo) {
1494
1229
  // in our config atm.
1495
1230
 
1496
1231
 
1497
- stringValue = node.getAttribute(attributeName);
1232
+ stringValue = node.getAttribute(attributeName);
1233
+ }
1234
+
1235
+ if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
1236
+ return stringValue === null ? expected : stringValue;
1237
+ } else if (stringValue === '' + expected) {
1238
+ return expected;
1239
+ } else {
1240
+ return stringValue;
1241
+ }
1242
+ }
1243
+ }
1244
+ }
1245
+ /**
1246
+ * Get the value for a attribute on a node. Only used in DEV for SSR validation.
1247
+ * The third argument is used as a hint of what the expected value is. Some
1248
+ * attributes have multiple equivalent values.
1249
+ */
1250
+
1251
+ function getValueForAttribute(node, name, expected) {
1252
+ {
1253
+ if (!isAttributeNameSafe(name)) {
1254
+ return;
1255
+ }
1256
+
1257
+ if (!node.hasAttribute(name)) {
1258
+ return expected === undefined ? undefined : null;
1259
+ }
1260
+
1261
+ var value = node.getAttribute(name);
1262
+
1263
+ if (value === '' + expected) {
1264
+ return expected;
1265
+ }
1266
+
1267
+ return value;
1268
+ }
1269
+ }
1270
+ /**
1271
+ * Sets the value for a property on a node.
1272
+ *
1273
+ * @param {DOMElement} node
1274
+ * @param {string} name
1275
+ * @param {*} value
1276
+ */
1277
+
1278
+ function setValueForProperty(node, name, value, isCustomComponentTag) {
1279
+ var propertyInfo = getPropertyInfo(name);
1280
+
1281
+ if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {
1282
+ return;
1283
+ }
1284
+
1285
+ if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {
1286
+ value = null;
1287
+ } // If the prop isn't in the special list, treat it as a simple attribute.
1288
+
1289
+
1290
+ if (isCustomComponentTag || propertyInfo === null) {
1291
+ if (isAttributeNameSafe(name)) {
1292
+ var _attributeName = name;
1293
+
1294
+ if (value === null) {
1295
+ node.removeAttribute(_attributeName);
1296
+ } else {
1297
+ node.setAttribute(_attributeName, '' + value);
1298
+ }
1299
+ }
1300
+
1301
+ return;
1302
+ }
1303
+
1304
+ var mustUseProperty = propertyInfo.mustUseProperty;
1305
+
1306
+ if (mustUseProperty) {
1307
+ var propertyName = propertyInfo.propertyName;
1308
+
1309
+ if (value === null) {
1310
+ var type = propertyInfo.type;
1311
+ node[propertyName] = type === BOOLEAN ? false : '';
1312
+ } else {
1313
+ // Contrary to `setAttribute`, object properties are properly
1314
+ // `toString`ed by IE8/9.
1315
+ node[propertyName] = value;
1316
+ }
1317
+
1318
+ return;
1319
+ } // The rest are treated as attributes with special cases.
1320
+
1321
+
1322
+ var attributeName = propertyInfo.attributeName,
1323
+ attributeNamespace = propertyInfo.attributeNamespace;
1324
+
1325
+ if (value === null) {
1326
+ node.removeAttribute(attributeName);
1327
+ } else {
1328
+ var _type = propertyInfo.type;
1329
+ var attributeValue;
1330
+
1331
+ if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {
1332
+ // If attribute type is boolean, we know for sure it won't be an execution sink
1333
+ // and we won't require Trusted Type here.
1334
+ attributeValue = '';
1335
+ } else {
1336
+ // `setAttribute` with objects becomes only `[object]` in IE8/9,
1337
+ // ('' + value) makes it output the correct toString()-value.
1338
+ {
1339
+ attributeValue = '' + value;
1340
+ }
1341
+
1342
+ if (propertyInfo.sanitizeURL) {
1343
+ sanitizeURL(attributeValue.toString());
1344
+ }
1345
+ }
1346
+
1347
+ if (attributeNamespace) {
1348
+ node.setAttributeNS(attributeNamespace, attributeName, attributeValue);
1349
+ } else {
1350
+ node.setAttribute(attributeName, attributeValue);
1351
+ }
1352
+ }
1353
+ }
1354
+
1355
+ var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
1356
+ function describeComponentFrame (name, source, ownerName) {
1357
+ var sourceInfo = '';
1358
+
1359
+ if (source) {
1360
+ var path = source.fileName;
1361
+ var fileName = path.replace(BEFORE_SLASH_RE, '');
1362
+
1363
+ {
1364
+ // In DEV, include code for a common special case:
1365
+ // prefer "folder/index.js" instead of just "index.js".
1366
+ if (/^index\./.test(fileName)) {
1367
+ var match = path.match(BEFORE_SLASH_RE);
1368
+
1369
+ if (match) {
1370
+ var pathBeforeSlash = match[1];
1371
+
1372
+ if (pathBeforeSlash) {
1373
+ var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
1374
+ fileName = folderName + '/' + fileName;
1375
+ }
1376
+ }
1377
+ }
1378
+ }
1379
+
1380
+ sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
1381
+ } else if (ownerName) {
1382
+ sourceInfo = ' (created by ' + ownerName + ')';
1383
+ }
1384
+
1385
+ return '\n in ' + (name || 'Unknown') + sourceInfo;
1386
+ }
1387
+
1388
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
1389
+ // nor polyfill, then a plain number is used for performance.
1390
+ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
1391
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
1392
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
1393
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
1394
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
1395
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
1396
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
1397
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
1398
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
1399
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
1400
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
1401
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
1402
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
1403
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
1404
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
1405
+ var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
1406
+ var FAUX_ITERATOR_SYMBOL = '@@iterator';
1407
+ function getIteratorFn(maybeIterable) {
1408
+ if (maybeIterable === null || typeof maybeIterable !== 'object') {
1409
+ return null;
1410
+ }
1411
+
1412
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
1413
+
1414
+ if (typeof maybeIterator === 'function') {
1415
+ return maybeIterator;
1416
+ }
1417
+
1418
+ return null;
1419
+ }
1420
+
1421
+ var Uninitialized = -1;
1422
+ var Pending = 0;
1423
+ var Resolved = 1;
1424
+ var Rejected = 2;
1425
+ function refineResolvedLazyComponent(lazyComponent) {
1426
+ return lazyComponent._status === Resolved ? lazyComponent._result : null;
1427
+ }
1428
+ function initializeLazyComponentType(lazyComponent) {
1429
+ if (lazyComponent._status === Uninitialized) {
1430
+ lazyComponent._status = Pending;
1431
+ var ctor = lazyComponent._ctor;
1432
+ var thenable = ctor();
1433
+ lazyComponent._result = thenable;
1434
+ thenable.then(function (moduleObject) {
1435
+ if (lazyComponent._status === Pending) {
1436
+ var defaultExport = moduleObject.default;
1437
+
1438
+ {
1439
+ if (defaultExport === undefined) {
1440
+ error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + "const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
1441
+ }
1442
+ }
1443
+
1444
+ lazyComponent._status = Resolved;
1445
+ lazyComponent._result = defaultExport;
1498
1446
  }
1499
-
1500
- if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
1501
- return stringValue === null ? expected : stringValue;
1502
- } else if (stringValue === '' + expected) {
1503
- return expected;
1504
- } else {
1505
- return stringValue;
1447
+ }, function (error) {
1448
+ if (lazyComponent._status === Pending) {
1449
+ lazyComponent._status = Rejected;
1450
+ lazyComponent._result = error;
1506
1451
  }
1507
- }
1452
+ });
1508
1453
  }
1509
1454
  }
1510
- /**
1511
- * Get the value for a attribute on a node. Only used in DEV for SSR validation.
1512
- * The third argument is used as a hint of what the expected value is. Some
1513
- * attributes have multiple equivalent values.
1514
- */
1515
1455
 
1516
- function getValueForAttribute(node, name, expected) {
1456
+ function getWrappedName(outerType, innerType, wrapperName) {
1457
+ var functionName = innerType.displayName || innerType.name || '';
1458
+ return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
1459
+ }
1460
+
1461
+ function getComponentName(type) {
1462
+ if (type == null) {
1463
+ // Host root, text node or just invalid type.
1464
+ return null;
1465
+ }
1466
+
1517
1467
  {
1518
- if (!isAttributeNameSafe(name)) {
1519
- return;
1468
+ if (typeof type.tag === 'number') {
1469
+ error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
1520
1470
  }
1471
+ }
1521
1472
 
1522
- if (!node.hasAttribute(name)) {
1523
- return expected === undefined ? undefined : null;
1524
- }
1473
+ if (typeof type === 'function') {
1474
+ return type.displayName || type.name || null;
1475
+ }
1525
1476
 
1526
- var value = node.getAttribute(name);
1477
+ if (typeof type === 'string') {
1478
+ return type;
1479
+ }
1527
1480
 
1528
- if (value === '' + expected) {
1529
- return expected;
1530
- }
1481
+ switch (type) {
1482
+ case REACT_FRAGMENT_TYPE:
1483
+ return 'Fragment';
1531
1484
 
1532
- return value;
1533
- }
1534
- }
1535
- /**
1536
- * Sets the value for a property on a node.
1537
- *
1538
- * @param {DOMElement} node
1539
- * @param {string} name
1540
- * @param {*} value
1541
- */
1485
+ case REACT_PORTAL_TYPE:
1486
+ return 'Portal';
1542
1487
 
1543
- function setValueForProperty(node, name, value, isCustomComponentTag) {
1544
- var propertyInfo = getPropertyInfo(name);
1488
+ case REACT_PROFILER_TYPE:
1489
+ return "Profiler";
1545
1490
 
1546
- if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {
1547
- return;
1491
+ case REACT_STRICT_MODE_TYPE:
1492
+ return 'StrictMode';
1493
+
1494
+ case REACT_SUSPENSE_TYPE:
1495
+ return 'Suspense';
1496
+
1497
+ case REACT_SUSPENSE_LIST_TYPE:
1498
+ return 'SuspenseList';
1548
1499
  }
1549
1500
 
1550
- if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {
1551
- value = null;
1552
- } // If the prop isn't in the special list, treat it as a simple attribute.
1501
+ if (typeof type === 'object') {
1502
+ switch (type.$$typeof) {
1503
+ case REACT_CONTEXT_TYPE:
1504
+ return 'Context.Consumer';
1553
1505
 
1506
+ case REACT_PROVIDER_TYPE:
1507
+ return 'Context.Provider';
1554
1508
 
1555
- if (isCustomComponentTag || propertyInfo === null) {
1556
- if (isAttributeNameSafe(name)) {
1557
- var _attributeName = name;
1509
+ case REACT_FORWARD_REF_TYPE:
1510
+ return getWrappedName(type, type.render, 'ForwardRef');
1558
1511
 
1559
- if (value === null) {
1560
- node.removeAttribute(_attributeName);
1561
- } else {
1562
- node.setAttribute(_attributeName, '' + value);
1563
- }
1564
- }
1512
+ case REACT_MEMO_TYPE:
1513
+ return getComponentName(type.type);
1565
1514
 
1566
- return;
1567
- }
1515
+ case REACT_BLOCK_TYPE:
1516
+ return getComponentName(type.render);
1568
1517
 
1569
- var mustUseProperty = propertyInfo.mustUseProperty;
1518
+ case REACT_LAZY_TYPE:
1519
+ {
1520
+ var thenable = type;
1521
+ var resolvedThenable = refineResolvedLazyComponent(thenable);
1570
1522
 
1571
- if (mustUseProperty) {
1572
- var propertyName = propertyInfo.propertyName;
1523
+ if (resolvedThenable) {
1524
+ return getComponentName(resolvedThenable);
1525
+ }
1573
1526
 
1574
- if (value === null) {
1575
- var type = propertyInfo.type;
1576
- node[propertyName] = type === BOOLEAN ? false : '';
1577
- } else {
1578
- // Contrary to `setAttribute`, object properties are properly
1579
- // `toString`ed by IE8/9.
1580
- node[propertyName] = value;
1527
+ break;
1528
+ }
1581
1529
  }
1530
+ }
1582
1531
 
1583
- return;
1584
- } // The rest are treated as attributes with special cases.
1532
+ return null;
1533
+ }
1585
1534
 
1535
+ var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
1586
1536
 
1587
- var attributeName = propertyInfo.attributeName,
1588
- attributeNamespace = propertyInfo.attributeNamespace;
1537
+ function describeFiber(fiber) {
1538
+ switch (fiber.tag) {
1539
+ case HostRoot:
1540
+ case HostPortal:
1541
+ case HostText:
1542
+ case Fragment:
1543
+ case ContextProvider:
1544
+ case ContextConsumer:
1545
+ return '';
1589
1546
 
1590
- if (value === null) {
1591
- node.removeAttribute(attributeName);
1592
- } else {
1593
- var _type = propertyInfo.type;
1594
- var attributeValue;
1547
+ default:
1548
+ var owner = fiber._debugOwner;
1549
+ var source = fiber._debugSource;
1550
+ var name = getComponentName(fiber.type);
1551
+ var ownerName = null;
1595
1552
 
1596
- if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {
1597
- // If attribute type is boolean, we know for sure it won't be an execution sink
1598
- // and we won't require Trusted Type here.
1599
- attributeValue = '';
1600
- } else {
1601
- // `setAttribute` with objects becomes only `[object]` in IE8/9,
1602
- // ('' + value) makes it output the correct toString()-value.
1603
- {
1604
- attributeValue = '' + value;
1553
+ if (owner) {
1554
+ ownerName = getComponentName(owner.type);
1605
1555
  }
1606
1556
 
1607
- if (propertyInfo.sanitizeURL) {
1608
- sanitizeURL(attributeValue.toString());
1609
- }
1557
+ return describeComponentFrame(name, source, ownerName);
1558
+ }
1559
+ }
1560
+
1561
+ function getStackByFiberInDevAndProd(workInProgress) {
1562
+ var info = '';
1563
+ var node = workInProgress;
1564
+
1565
+ do {
1566
+ info += describeFiber(node);
1567
+ node = node.return;
1568
+ } while (node);
1569
+
1570
+ return info;
1571
+ }
1572
+ var current = null;
1573
+ var isRendering = false;
1574
+ function getCurrentFiberOwnerNameInDevOrNull() {
1575
+ {
1576
+ if (current === null) {
1577
+ return null;
1610
1578
  }
1611
1579
 
1612
- if (attributeNamespace) {
1613
- node.setAttributeNS(attributeNamespace, attributeName, attributeValue);
1614
- } else {
1615
- node.setAttribute(attributeName, attributeValue);
1580
+ var owner = current._debugOwner;
1581
+
1582
+ if (owner !== null && typeof owner !== 'undefined') {
1583
+ return getComponentName(owner.type);
1616
1584
  }
1617
1585
  }
1586
+
1587
+ return null;
1588
+ }
1589
+ function getCurrentFiberStackInDev() {
1590
+ {
1591
+ if (current === null) {
1592
+ return '';
1593
+ } // Safe because if current fiber exists, we are reconciling,
1594
+ // and it is guaranteed to be the work-in-progress version.
1595
+
1596
+
1597
+ return getStackByFiberInDevAndProd(current);
1598
+ }
1599
+ }
1600
+ function resetCurrentFiber() {
1601
+ {
1602
+ ReactDebugCurrentFrame$1.getCurrentStack = null;
1603
+ current = null;
1604
+ isRendering = false;
1605
+ }
1606
+ }
1607
+ function setCurrentFiber(fiber) {
1608
+ {
1609
+ ReactDebugCurrentFrame$1.getCurrentStack = getCurrentFiberStackInDev;
1610
+ current = fiber;
1611
+ isRendering = false;
1612
+ }
1613
+ }
1614
+ function setIsRendering(rendering) {
1615
+ {
1616
+ isRendering = rendering;
1617
+ }
1618
1618
  }
1619
1619
 
1620
1620
  // Flow does not allow string concatenation of most non-string types. To work
@@ -5620,7 +5620,6 @@ function validateProperties$2(type, props, canUseEventSystem) {
5620
5620
  }
5621
5621
 
5622
5622
  var didWarnInvalidHydration = false;
5623
- var didWarnShadyDOM = false;
5624
5623
  var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';
5625
5624
  var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';
5626
5625
  var SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';
@@ -5940,12 +5939,6 @@ function setInitialProperties(domElement, tag, rawProps, rootContainerElement) {
5940
5939
 
5941
5940
  {
5942
5941
  validatePropertiesInDevelopment(tag, rawProps);
5943
-
5944
- if (isCustomComponentTag && !didWarnShadyDOM && domElement.shadyRoot) {
5945
- error('%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
5946
-
5947
- didWarnShadyDOM = true;
5948
- }
5949
5942
  } // TODO: Make sure that we check isMounted before firing any of these events.
5950
5943
 
5951
5944
 
@@ -6299,12 +6292,6 @@ function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, root
6299
6292
  suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING] === true;
6300
6293
  isCustomComponentTag = isCustomComponent(tag, rawProps);
6301
6294
  validatePropertiesInDevelopment(tag, rawProps);
6302
-
6303
- if (isCustomComponentTag && !didWarnShadyDOM && domElement.shadyRoot) {
6304
- error('%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
6305
-
6306
- didWarnShadyDOM = true;
6307
- }
6308
6295
  } // TODO: Make sure that we check isMounted before firing any of these events.
6309
6296
 
6310
6297
 
@@ -10825,19 +10812,10 @@ function processChildContext(fiber, type, parentContext) {
10825
10812
  }
10826
10813
 
10827
10814
  var childContext;
10828
-
10829
- {
10830
- setCurrentPhase('getChildContext');
10831
- }
10832
-
10833
10815
  startPhaseTimer(fiber, 'getChildContext');
10834
10816
  childContext = instance.getChildContext();
10835
10817
  stopPhaseTimer();
10836
10818
 
10837
- {
10838
- setCurrentPhase(null);
10839
- }
10840
-
10841
10819
  for (var contextKey in childContext) {
10842
10820
  if (!(contextKey in childContextTypes)) {
10843
10821
  {
@@ -16761,7 +16739,6 @@ var didWarnAboutContextTypeOnFunctionComponent;
16761
16739
  var didWarnAboutGetDerivedStateOnFunctionComponent;
16762
16740
  var didWarnAboutFunctionRefs;
16763
16741
  var didWarnAboutReassigningProps;
16764
- var didWarnAboutMaxDuration;
16765
16742
  var didWarnAboutRevealOrder;
16766
16743
  var didWarnAboutTailOptions;
16767
16744
 
@@ -16772,7 +16749,6 @@ var didWarnAboutTailOptions;
16772
16749
  didWarnAboutGetDerivedStateOnFunctionComponent = {};
16773
16750
  didWarnAboutFunctionRefs = {};
16774
16751
  didWarnAboutReassigningProps = false;
16775
- didWarnAboutMaxDuration = false;
16776
16752
  didWarnAboutRevealOrder = {};
16777
16753
  didWarnAboutTailOptions = {};
16778
16754
  }
@@ -16836,7 +16812,7 @@ function updateForwardRef(current, workInProgress, Component, nextProps, renderE
16836
16812
 
16837
16813
  {
16838
16814
  ReactCurrentOwner$1.current = workInProgress;
16839
- setCurrentPhase('render');
16815
+ setIsRendering(true);
16840
16816
  nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderExpirationTime);
16841
16817
 
16842
16818
  if ( workInProgress.mode & StrictMode) {
@@ -16846,7 +16822,7 @@ function updateForwardRef(current, workInProgress, Component, nextProps, renderE
16846
16822
  }
16847
16823
  }
16848
16824
 
16849
- setCurrentPhase(null);
16825
+ setIsRendering(false);
16850
16826
  }
16851
16827
 
16852
16828
  if (current !== null && !didReceiveUpdate) {
@@ -17054,7 +17030,7 @@ function updateFunctionComponent(current, workInProgress, Component, nextProps,
17054
17030
 
17055
17031
  {
17056
17032
  ReactCurrentOwner$1.current = workInProgress;
17057
- setCurrentPhase('render');
17033
+ setIsRendering(true);
17058
17034
  nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderExpirationTime);
17059
17035
 
17060
17036
  if ( workInProgress.mode & StrictMode) {
@@ -17064,7 +17040,7 @@ function updateFunctionComponent(current, workInProgress, Component, nextProps,
17064
17040
  }
17065
17041
  }
17066
17042
 
17067
- setCurrentPhase(null);
17043
+ setIsRendering(false);
17068
17044
  }
17069
17045
 
17070
17046
  if (current !== null && !didReceiveUpdate) {
@@ -17180,14 +17156,14 @@ function finishClassComponent(current, workInProgress, Component, shouldUpdate,
17180
17156
  }
17181
17157
  } else {
17182
17158
  {
17183
- setCurrentPhase('render');
17159
+ setIsRendering(true);
17184
17160
  nextChildren = instance.render();
17185
17161
 
17186
17162
  if ( workInProgress.mode & StrictMode) {
17187
17163
  instance.render();
17188
17164
  }
17189
17165
 
17190
- setCurrentPhase(null);
17166
+ setIsRendering(false);
17191
17167
  }
17192
17168
  } // React DevTools reads this flag.
17193
17169
 
@@ -17501,8 +17477,10 @@ function mountIndeterminateComponent(_current, workInProgress, Component, render
17501
17477
  ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);
17502
17478
  }
17503
17479
 
17480
+ setIsRendering(true);
17504
17481
  ReactCurrentOwner$1.current = workInProgress;
17505
17482
  value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime);
17483
+ setIsRendering(false);
17506
17484
  } // React DevTools reads this flag.
17507
17485
 
17508
17486
 
@@ -17668,17 +17646,7 @@ function updateSuspenseComponent(current, workInProgress, renderExpirationTime)
17668
17646
  }
17669
17647
 
17670
17648
  suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
17671
- pushSuspenseContext(workInProgress, suspenseContext);
17672
-
17673
- {
17674
- if ('maxDuration' in nextProps) {
17675
- if (!didWarnAboutMaxDuration) {
17676
- didWarnAboutMaxDuration = true;
17677
-
17678
- error('maxDuration has been removed from React. ' + 'Remove the maxDuration prop.');
17679
- }
17680
- }
17681
- } // This next part is a bit confusing. If the children timeout, we switch to
17649
+ pushSuspenseContext(workInProgress, suspenseContext); // This next part is a bit confusing. If the children timeout, we switch to
17682
17650
  // showing the fallback children in place of the "primary" children.
17683
17651
  // However, we don't want to delete the primary children because then their
17684
17652
  // state will be lost (both the React state and the host state, e.g.
@@ -17700,7 +17668,6 @@ function updateSuspenseComponent(current, workInProgress, renderExpirationTime)
17700
17668
  // custom reconciliation logic to preserve the state of the primary
17701
17669
  // children. It's essentially a very basic form of re-parenting.
17702
17670
 
17703
-
17704
17671
  if (current === null) {
17705
17672
  // If we're currently hydrating, try to hydrate this boundary.
17706
17673
  // But only if this has a fallback.
@@ -18333,9 +18300,9 @@ function updateContextConsumer(current, workInProgress, renderExpirationTime) {
18333
18300
 
18334
18301
  {
18335
18302
  ReactCurrentOwner$1.current = workInProgress;
18336
- setCurrentPhase('render');
18303
+ setIsRendering(true);
18337
18304
  newChildren = render(newValue);
18338
- setCurrentPhase(null);
18305
+ setIsRendering(false);
18339
18306
  } // React DevTools reads this flag.
18340
18307
 
18341
18308
 
@@ -20847,9 +20814,11 @@ function throwException(root, returnFiber, sourceFiber, value, renderExpirationT
20847
20814
  var currentSource = sourceFiber.alternate;
20848
20815
 
20849
20816
  if (currentSource) {
20817
+ sourceFiber.updateQueue = currentSource.updateQueue;
20850
20818
  sourceFiber.memoizedState = currentSource.memoizedState;
20851
20819
  sourceFiber.expirationTime = currentSource.expirationTime;
20852
20820
  } else {
20821
+ sourceFiber.updateQueue = null;
20853
20822
  sourceFiber.memoizedState = null;
20854
20823
  }
20855
20824
  }
@@ -23247,43 +23216,40 @@ var beginWork$1;
23247
23216
  }
23248
23217
 
23249
23218
  var didWarnAboutUpdateInRender = false;
23250
- var didWarnAboutUpdateInGetChildContext = false;
23219
+ var didWarnAboutUpdateInRenderForAnotherComponent;
23220
+
23221
+ {
23222
+ didWarnAboutUpdateInRenderForAnotherComponent = new Set();
23223
+ }
23251
23224
 
23252
23225
  function warnAboutRenderPhaseUpdatesInDEV(fiber) {
23253
23226
  {
23254
- if ((executionContext & RenderContext) !== NoContext) {
23227
+ if (isRendering && (executionContext & RenderContext) !== NoContext) {
23255
23228
  switch (fiber.tag) {
23256
23229
  case FunctionComponent:
23257
23230
  case ForwardRef:
23258
23231
  case SimpleMemoComponent:
23259
23232
  {
23260
- error('Cannot update a component from inside the function body of a ' + 'different component.');
23233
+ var renderingComponentName = workInProgress && getComponentName(workInProgress.type) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed.
23234
+
23235
+ var dedupeKey = renderingComponentName;
23236
+
23237
+ if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {
23238
+ didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);
23239
+ var setStateComponentName = getComponentName(fiber.type) || 'Unknown';
23240
+
23241
+ error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://fb.me/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);
23242
+ }
23261
23243
 
23262
23244
  break;
23263
23245
  }
23264
23246
 
23265
23247
  case ClassComponent:
23266
23248
  {
23267
- switch (phase) {
23268
- case 'getChildContext':
23269
- if (didWarnAboutUpdateInGetChildContext) {
23270
- return;
23271
- }
23272
-
23273
- error('setState(...): Cannot call setState() inside getChildContext()');
23274
-
23275
- didWarnAboutUpdateInGetChildContext = true;
23276
- break;
23249
+ if (!didWarnAboutUpdateInRender) {
23250
+ error('Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure ' + 'function of props and state.');
23277
23251
 
23278
- case 'render':
23279
- if (didWarnAboutUpdateInRender) {
23280
- return;
23281
- }
23282
-
23283
- error('Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure ' + 'function of props and state.');
23284
-
23285
- didWarnAboutUpdateInRender = true;
23286
- break;
23252
+ didWarnAboutUpdateInRender = true;
23287
23253
  }
23288
23254
 
23289
23255
  break;
@@ -24378,7 +24344,7 @@ function updateContainer(element, container, parentComponent, callback) {
24378
24344
  }
24379
24345
 
24380
24346
  {
24381
- if (phase === 'render' && current !== null && !didWarnAboutNestedUpdates) {
24347
+ if (isRendering && current !== null && !didWarnAboutNestedUpdates) {
24382
24348
  didWarnAboutNestedUpdates = true;
24383
24349
 
24384
24350
  error('Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + 'Check the render method of %s.', getComponentName(current.type) || 'Unknown');
@@ -24954,7 +24920,7 @@ implementation) {
24954
24920
  };
24955
24921
  }
24956
24922
 
24957
- var ReactVersion = '16.13.0';
24923
+ var ReactVersion = '16.13.1';
24958
24924
 
24959
24925
  setAttemptUserBlockingHydration(attemptUserBlockingHydration$1);
24960
24926
  setAttemptContinuousHydration(attemptContinuousHydration$1);