react-dom 19.1.0 → 19.2.4

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.
@@ -16,7 +16,6 @@ var React = require("react"),
16
16
  REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
17
17
  REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
18
18
  REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
19
- REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
20
19
  REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
21
20
  REACT_CONTEXT_TYPE = Symbol.for("react.context"),
22
21
  REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
@@ -29,16 +28,20 @@ var React = require("react"),
29
28
  REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"),
30
29
  REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"),
31
30
  REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
32
- MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
33
- isArrayImpl = Array.isArray,
31
+ MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
32
+ function getIteratorFn(maybeIterable) {
33
+ if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
34
+ maybeIterable =
35
+ (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
36
+ maybeIterable["@@iterator"];
37
+ return "function" === typeof maybeIterable ? maybeIterable : null;
38
+ }
39
+ var isArrayImpl = Array.isArray,
34
40
  jsxPropsParents = new WeakMap(),
35
41
  jsxChildrenParents = new WeakMap();
36
42
  function objectName(object) {
37
- return Object.prototype.toString
38
- .call(object)
39
- .replace(/^\[object (.*)\]$/, function (m, p0) {
40
- return p0;
41
- });
43
+ object = Object.prototype.toString.call(object);
44
+ return object.slice(8, object.length - 1);
42
45
  }
43
46
  function describeKeyForErrorMessage(key) {
44
47
  var encodedKey = JSON.stringify(key);
@@ -201,6 +204,9 @@ function flushBuffered(destination) {
201
204
  function writeChunk(destination, chunk) {
202
205
  0 !== chunk.length && destination.write(chunk);
203
206
  }
207
+ function byteLengthOfChunk(chunk) {
208
+ return Buffer.byteLength(chunk, "utf8");
209
+ }
204
210
  function closeWithError(destination, error) {
205
211
  "function" === typeof destination.error
206
212
  ? destination.error(error)
@@ -439,7 +445,11 @@ var ariaProperties = {
439
445
  "aria-rowcount": 0,
440
446
  "aria-rowindex": 0,
441
447
  "aria-rowspan": 0,
442
- "aria-setsize": 0
448
+ "aria-setsize": 0,
449
+ "aria-braillelabel": 0,
450
+ "aria-brailleroledescription": 0,
451
+ "aria-colindextext": 0,
452
+ "aria-rowindextext": 0
443
453
  },
444
454
  warnedProperties$1 = {},
445
455
  rARIA$1 = RegExp(
@@ -1371,9 +1381,13 @@ var NothingSent = 0,
1371
1381
  SentCompleteBoundaryFunction = 2,
1372
1382
  SentClientRenderFunction = 4,
1373
1383
  SentStyleInsertionFunction = 8,
1384
+ SentCompletedShellId = 32,
1385
+ SentMarkShellTime = 64,
1374
1386
  EXISTS = null,
1375
1387
  PRELOAD_NO_CREDS = [];
1376
1388
  Object.freeze(PRELOAD_NO_CREDS);
1389
+ var currentlyFlushingRenderState = null,
1390
+ endInlineScript = "\x3c/script>";
1377
1391
  function escapeEntireInlineScriptContent(scriptText) {
1378
1392
  checkHtmlStringCoercion(scriptText);
1379
1393
  return ("" + scriptText).replace(scriptRegex, scriptReplacer);
@@ -1392,21 +1406,30 @@ function createRenderState(
1392
1406
  onHeaders,
1393
1407
  maxHeadersLength
1394
1408
  ) {
1409
+ externalRuntimeConfig =
1410
+ "string" === typeof nonce ? nonce : nonce && nonce.script;
1395
1411
  var inlineScriptWithNonce =
1396
- void 0 === nonce
1397
- ? "<script>"
1398
- : '<script nonce="' + escapeTextForBrowser(nonce) + '">',
1399
- idPrefix = resumableState.idPrefix;
1400
- externalRuntimeConfig = [];
1401
- var bootstrapScriptContent = resumableState.bootstrapScriptContent,
1412
+ void 0 === externalRuntimeConfig
1413
+ ? "<script"
1414
+ : '<script nonce="' + escapeTextForBrowser(externalRuntimeConfig) + '"',
1415
+ nonceStyle = "string" === typeof nonce ? void 0 : nonce && nonce.style,
1416
+ inlineStyleWithNonce =
1417
+ void 0 === nonceStyle
1418
+ ? "<style"
1419
+ : '<style nonce="' + escapeTextForBrowser(nonceStyle) + '"',
1420
+ idPrefix = resumableState.idPrefix,
1421
+ bootstrapChunks = [],
1422
+ bootstrapScriptContent = resumableState.bootstrapScriptContent,
1402
1423
  bootstrapScripts = resumableState.bootstrapScripts,
1403
1424
  bootstrapModules = resumableState.bootstrapModules;
1404
1425
  void 0 !== bootstrapScriptContent &&
1405
- externalRuntimeConfig.push(
1406
- inlineScriptWithNonce,
1426
+ (bootstrapChunks.push(inlineScriptWithNonce),
1427
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
1428
+ bootstrapChunks.push(
1429
+ endOfStartTag,
1407
1430
  escapeEntireInlineScriptContent(bootstrapScriptContent),
1408
- "\x3c/script>"
1409
- );
1431
+ endInlineScript
1432
+ ));
1410
1433
  bootstrapScriptContent = [];
1411
1434
  void 0 !== importMap &&
1412
1435
  (bootstrapScriptContent.push('<script type="importmap">'),
@@ -1435,9 +1458,10 @@ function createRenderState(
1435
1458
  segmentPrefix: idPrefix + "S:",
1436
1459
  boundaryPrefix: idPrefix + "B:",
1437
1460
  startInlineScript: inlineScriptWithNonce,
1461
+ startInlineStyle: inlineStyleWithNonce,
1438
1462
  preamble: createPreambleState(),
1439
1463
  externalRuntimeScript: null,
1440
- bootstrapChunks: externalRuntimeConfig,
1464
+ bootstrapChunks: bootstrapChunks,
1441
1465
  importMapChunks: bootstrapScriptContent,
1442
1466
  onHeaders: onHeaders,
1443
1467
  headers: importMap,
@@ -1464,107 +1488,119 @@ function createRenderState(
1464
1488
  scripts: new Map(),
1465
1489
  moduleScripts: new Map()
1466
1490
  },
1467
- nonce: nonce,
1491
+ nonce: { script: externalRuntimeConfig, style: nonceStyle },
1468
1492
  hoistableState: null,
1469
1493
  stylesToHoist: !1
1470
1494
  };
1471
1495
  if (void 0 !== bootstrapScripts)
1472
- for (importMap = 0; importMap < bootstrapScripts.length; importMap++) {
1473
- maxHeadersLength = bootstrapScripts[importMap];
1474
- bootstrapScriptContent = idPrefix = void 0;
1475
- var props = {
1476
- rel: "preload",
1477
- as: "script",
1478
- fetchPriority: "low",
1479
- nonce: nonce
1480
- };
1481
- "string" === typeof maxHeadersLength
1482
- ? (props.href = inlineScriptWithNonce = maxHeadersLength)
1483
- : ((props.href = inlineScriptWithNonce = maxHeadersLength.src),
1484
- (props.integrity = bootstrapScriptContent =
1485
- "string" === typeof maxHeadersLength.integrity
1486
- ? maxHeadersLength.integrity
1487
- : void 0),
1488
- (props.crossOrigin = idPrefix =
1489
- "string" === typeof maxHeadersLength ||
1490
- null == maxHeadersLength.crossOrigin
1491
- ? void 0
1492
- : "use-credentials" === maxHeadersLength.crossOrigin
1493
- ? "use-credentials"
1494
- : ""));
1495
- preloadBootstrapScriptOrModule(
1496
- resumableState,
1497
- onHeaders,
1498
- inlineScriptWithNonce,
1499
- props
1500
- );
1501
- externalRuntimeConfig.push(
1502
- '<script src="',
1503
- escapeTextForBrowser(inlineScriptWithNonce)
1504
- );
1505
- nonce &&
1506
- externalRuntimeConfig.push('" nonce="', escapeTextForBrowser(nonce));
1507
- "string" === typeof bootstrapScriptContent &&
1508
- externalRuntimeConfig.push(
1509
- '" integrity="',
1510
- escapeTextForBrowser(bootstrapScriptContent)
1511
- );
1512
- "string" === typeof idPrefix &&
1513
- externalRuntimeConfig.push(
1514
- '" crossorigin="',
1515
- escapeTextForBrowser(idPrefix)
1516
- );
1517
- externalRuntimeConfig.push('" async="">\x3c/script>');
1518
- }
1496
+ for (importMap = 0; importMap < bootstrapScripts.length; importMap++)
1497
+ (maxHeadersLength = bootstrapScripts[importMap]),
1498
+ (inlineStyleWithNonce = nonceStyle = void 0),
1499
+ (idPrefix = {
1500
+ rel: "preload",
1501
+ as: "script",
1502
+ fetchPriority: "low",
1503
+ nonce: nonce
1504
+ }),
1505
+ "string" === typeof maxHeadersLength
1506
+ ? (idPrefix.href = inlineScriptWithNonce = maxHeadersLength)
1507
+ : ((idPrefix.href = inlineScriptWithNonce = maxHeadersLength.src),
1508
+ (idPrefix.integrity = inlineStyleWithNonce =
1509
+ "string" === typeof maxHeadersLength.integrity
1510
+ ? maxHeadersLength.integrity
1511
+ : void 0),
1512
+ (idPrefix.crossOrigin = nonceStyle =
1513
+ "string" === typeof maxHeadersLength ||
1514
+ null == maxHeadersLength.crossOrigin
1515
+ ? void 0
1516
+ : "use-credentials" === maxHeadersLength.crossOrigin
1517
+ ? "use-credentials"
1518
+ : "")),
1519
+ preloadBootstrapScriptOrModule(
1520
+ resumableState,
1521
+ onHeaders,
1522
+ inlineScriptWithNonce,
1523
+ idPrefix
1524
+ ),
1525
+ bootstrapChunks.push(
1526
+ '<script src="',
1527
+ escapeTextForBrowser(inlineScriptWithNonce),
1528
+ attributeEnd
1529
+ ),
1530
+ externalRuntimeConfig &&
1531
+ bootstrapChunks.push(
1532
+ ' nonce="',
1533
+ escapeTextForBrowser(externalRuntimeConfig),
1534
+ attributeEnd
1535
+ ),
1536
+ "string" === typeof inlineStyleWithNonce &&
1537
+ bootstrapChunks.push(
1538
+ ' integrity="',
1539
+ escapeTextForBrowser(inlineStyleWithNonce),
1540
+ attributeEnd
1541
+ ),
1542
+ "string" === typeof nonceStyle &&
1543
+ bootstrapChunks.push(
1544
+ ' crossorigin="',
1545
+ escapeTextForBrowser(nonceStyle),
1546
+ attributeEnd
1547
+ ),
1548
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
1549
+ bootstrapChunks.push(' async="">\x3c/script>');
1519
1550
  if (void 0 !== bootstrapModules)
1520
- for (
1521
- bootstrapScripts = 0;
1522
- bootstrapScripts < bootstrapModules.length;
1523
- bootstrapScripts++
1524
- )
1525
- (importMap = bootstrapModules[bootstrapScripts]),
1526
- (idPrefix = inlineScriptWithNonce = void 0),
1527
- (bootstrapScriptContent = {
1551
+ for (nonce = 0; nonce < bootstrapModules.length; nonce++)
1552
+ (bootstrapScripts = bootstrapModules[nonce]),
1553
+ (inlineScriptWithNonce = maxHeadersLength = void 0),
1554
+ (nonceStyle = {
1528
1555
  rel: "modulepreload",
1529
1556
  fetchPriority: "low",
1530
- nonce: nonce
1557
+ nonce: externalRuntimeConfig
1531
1558
  }),
1532
- "string" === typeof importMap
1533
- ? (bootstrapScriptContent.href = maxHeadersLength = importMap)
1534
- : ((bootstrapScriptContent.href = maxHeadersLength = importMap.src),
1535
- (bootstrapScriptContent.integrity = idPrefix =
1536
- "string" === typeof importMap.integrity
1537
- ? importMap.integrity
1559
+ "string" === typeof bootstrapScripts
1560
+ ? (nonceStyle.href = importMap = bootstrapScripts)
1561
+ : ((nonceStyle.href = importMap = bootstrapScripts.src),
1562
+ (nonceStyle.integrity = inlineScriptWithNonce =
1563
+ "string" === typeof bootstrapScripts.integrity
1564
+ ? bootstrapScripts.integrity
1538
1565
  : void 0),
1539
- (bootstrapScriptContent.crossOrigin = inlineScriptWithNonce =
1540
- "string" === typeof importMap || null == importMap.crossOrigin
1566
+ (nonceStyle.crossOrigin = maxHeadersLength =
1567
+ "string" === typeof bootstrapScripts ||
1568
+ null == bootstrapScripts.crossOrigin
1541
1569
  ? void 0
1542
- : "use-credentials" === importMap.crossOrigin
1570
+ : "use-credentials" === bootstrapScripts.crossOrigin
1543
1571
  ? "use-credentials"
1544
1572
  : "")),
1545
1573
  preloadBootstrapScriptOrModule(
1546
1574
  resumableState,
1547
1575
  onHeaders,
1548
- maxHeadersLength,
1549
- bootstrapScriptContent
1576
+ importMap,
1577
+ nonceStyle
1550
1578
  ),
1551
- externalRuntimeConfig.push(
1579
+ bootstrapChunks.push(
1552
1580
  '<script type="module" src="',
1553
- escapeTextForBrowser(maxHeadersLength)
1581
+ escapeTextForBrowser(importMap),
1582
+ attributeEnd
1554
1583
  ),
1555
- nonce &&
1556
- externalRuntimeConfig.push('" nonce="', escapeTextForBrowser(nonce)),
1557
- "string" === typeof idPrefix &&
1558
- externalRuntimeConfig.push(
1559
- '" integrity="',
1560
- escapeTextForBrowser(idPrefix)
1584
+ externalRuntimeConfig &&
1585
+ bootstrapChunks.push(
1586
+ ' nonce="',
1587
+ escapeTextForBrowser(externalRuntimeConfig),
1588
+ attributeEnd
1561
1589
  ),
1562
1590
  "string" === typeof inlineScriptWithNonce &&
1563
- externalRuntimeConfig.push(
1564
- '" crossorigin="',
1565
- escapeTextForBrowser(inlineScriptWithNonce)
1591
+ bootstrapChunks.push(
1592
+ ' integrity="',
1593
+ escapeTextForBrowser(inlineScriptWithNonce),
1594
+ attributeEnd
1595
+ ),
1596
+ "string" === typeof maxHeadersLength &&
1597
+ bootstrapChunks.push(
1598
+ ' crossorigin="',
1599
+ escapeTextForBrowser(maxHeadersLength),
1600
+ attributeEnd
1566
1601
  ),
1567
- externalRuntimeConfig.push('" async="">\x3c/script>');
1602
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
1603
+ bootstrapChunks.push(' async="">\x3c/script>');
1568
1604
  return onHeaders;
1569
1605
  }
1570
1606
  function createResumableState(
@@ -1594,14 +1630,8 @@ function createResumableState(
1594
1630
  moduleScriptResources: {}
1595
1631
  };
1596
1632
  }
1597
- var NoContribution = 0;
1598
1633
  function createPreambleState() {
1599
- return {
1600
- htmlChunks: null,
1601
- headChunks: null,
1602
- bodyChunks: null,
1603
- contribution: NoContribution
1604
- };
1634
+ return { htmlChunks: null, headChunks: null, bodyChunks: null };
1605
1635
  }
1606
1636
  var ROOT_HTML_MODE = 0,
1607
1637
  HTML_HTML_MODE = 1,
@@ -1613,11 +1643,17 @@ var ROOT_HTML_MODE = 0,
1613
1643
  HTML_TABLE_BODY_MODE = 7,
1614
1644
  HTML_TABLE_ROW_MODE = 8,
1615
1645
  HTML_COLGROUP_MODE = 9;
1616
- function createFormatContext(insertionMode, selectedValue, tagScope) {
1646
+ function createFormatContext(
1647
+ insertionMode,
1648
+ selectedValue,
1649
+ tagScope,
1650
+ viewTransition
1651
+ ) {
1617
1652
  return {
1618
1653
  insertionMode: insertionMode,
1619
1654
  selectedValue: selectedValue,
1620
- tagScope: tagScope
1655
+ tagScope: tagScope,
1656
+ viewTransition: viewTransition
1621
1657
  };
1622
1658
  }
1623
1659
  function createRootFormatContext(namespaceURI) {
@@ -1628,69 +1664,99 @@ function createRootFormatContext(namespaceURI) {
1628
1664
  ? MATHML_MODE
1629
1665
  : ROOT_HTML_MODE,
1630
1666
  null,
1631
- 0
1667
+ 0,
1668
+ null
1632
1669
  );
1633
1670
  }
1634
1671
  function getChildFormatContext(parentContext, type, props) {
1672
+ var subtreeScope = parentContext.tagScope & -25;
1635
1673
  switch (type) {
1636
1674
  case "noscript":
1637
- return createFormatContext(HTML_MODE, null, parentContext.tagScope | 1);
1675
+ return createFormatContext(HTML_MODE, null, subtreeScope | 1, null);
1638
1676
  case "select":
1639
1677
  return createFormatContext(
1640
1678
  HTML_MODE,
1641
1679
  null != props.value ? props.value : props.defaultValue,
1642
- parentContext.tagScope
1680
+ subtreeScope,
1681
+ null
1643
1682
  );
1644
1683
  case "svg":
1645
- return createFormatContext(SVG_MODE, null, parentContext.tagScope);
1684
+ return createFormatContext(SVG_MODE, null, subtreeScope, null);
1646
1685
  case "picture":
1647
- return createFormatContext(HTML_MODE, null, parentContext.tagScope | 2);
1686
+ return createFormatContext(HTML_MODE, null, subtreeScope | 2, null);
1648
1687
  case "math":
1649
- return createFormatContext(MATHML_MODE, null, parentContext.tagScope);
1688
+ return createFormatContext(MATHML_MODE, null, subtreeScope, null);
1650
1689
  case "foreignObject":
1651
- return createFormatContext(HTML_MODE, null, parentContext.tagScope);
1690
+ return createFormatContext(HTML_MODE, null, subtreeScope, null);
1652
1691
  case "table":
1653
- return createFormatContext(HTML_TABLE_MODE, null, parentContext.tagScope);
1692
+ return createFormatContext(HTML_TABLE_MODE, null, subtreeScope, null);
1654
1693
  case "thead":
1655
1694
  case "tbody":
1656
1695
  case "tfoot":
1657
1696
  return createFormatContext(
1658
1697
  HTML_TABLE_BODY_MODE,
1659
1698
  null,
1660
- parentContext.tagScope
1699
+ subtreeScope,
1700
+ null
1661
1701
  );
1662
1702
  case "colgroup":
1663
- return createFormatContext(
1664
- HTML_COLGROUP_MODE,
1665
- null,
1666
- parentContext.tagScope
1667
- );
1703
+ return createFormatContext(HTML_COLGROUP_MODE, null, subtreeScope, null);
1668
1704
  case "tr":
1669
- return createFormatContext(
1670
- HTML_TABLE_ROW_MODE,
1671
- null,
1672
- parentContext.tagScope
1673
- );
1705
+ return createFormatContext(HTML_TABLE_ROW_MODE, null, subtreeScope, null);
1674
1706
  case "head":
1675
1707
  if (parentContext.insertionMode < HTML_MODE)
1676
- return createFormatContext(
1677
- HTML_HEAD_MODE,
1678
- null,
1679
- parentContext.tagScope
1680
- );
1708
+ return createFormatContext(HTML_HEAD_MODE, null, subtreeScope, null);
1681
1709
  break;
1682
1710
  case "html":
1683
1711
  if (parentContext.insertionMode === ROOT_HTML_MODE)
1684
- return createFormatContext(
1685
- HTML_HTML_MODE,
1686
- null,
1687
- parentContext.tagScope
1688
- );
1712
+ return createFormatContext(HTML_HTML_MODE, null, subtreeScope, null);
1689
1713
  }
1690
1714
  return parentContext.insertionMode >= HTML_TABLE_MODE ||
1691
1715
  parentContext.insertionMode < HTML_MODE
1692
- ? createFormatContext(HTML_MODE, null, parentContext.tagScope)
1693
- : parentContext;
1716
+ ? createFormatContext(HTML_MODE, null, subtreeScope, null)
1717
+ : parentContext.tagScope !== subtreeScope
1718
+ ? createFormatContext(
1719
+ parentContext.insertionMode,
1720
+ parentContext.selectedValue,
1721
+ subtreeScope,
1722
+ null
1723
+ )
1724
+ : parentContext;
1725
+ }
1726
+ function getSuspenseViewTransition(parentViewTransition) {
1727
+ return null === parentViewTransition
1728
+ ? null
1729
+ : {
1730
+ update: parentViewTransition.update,
1731
+ enter: "none",
1732
+ exit: "none",
1733
+ share: parentViewTransition.update,
1734
+ name: parentViewTransition.autoName,
1735
+ autoName: parentViewTransition.autoName,
1736
+ nameIdx: 0
1737
+ };
1738
+ }
1739
+ function getSuspenseFallbackFormatContext(resumableState, parentContext) {
1740
+ parentContext.tagScope & 32 && (resumableState.instructions |= 128);
1741
+ return createFormatContext(
1742
+ parentContext.insertionMode,
1743
+ parentContext.selectedValue,
1744
+ parentContext.tagScope | 12,
1745
+ getSuspenseViewTransition(parentContext.viewTransition)
1746
+ );
1747
+ }
1748
+ function getSuspenseContentFormatContext(resumableState, parentContext) {
1749
+ resumableState = getSuspenseViewTransition(parentContext.viewTransition);
1750
+ var subtreeScope = parentContext.tagScope | 16;
1751
+ null !== resumableState &&
1752
+ "none" !== resumableState.share &&
1753
+ (subtreeScope |= 64);
1754
+ return createFormatContext(
1755
+ parentContext.insertionMode,
1756
+ parentContext.selectedValue,
1757
+ subtreeScope,
1758
+ resumableState
1759
+ );
1694
1760
  }
1695
1761
  function pushTextInstance(target, text, renderState, textEmbedded) {
1696
1762
  if ("" === text) return textEmbedded;
@@ -1698,6 +1764,9 @@ function pushTextInstance(target, text, renderState, textEmbedded) {
1698
1764
  target.push(escapeTextForBrowser(text));
1699
1765
  return !0;
1700
1766
  }
1767
+ function pushSegmentFinale(target, renderState, lastPushedText, textEmbedded) {
1768
+ lastPushedText && textEmbedded && target.push("\x3c!-- --\x3e");
1769
+ }
1701
1770
  var styleNameCache = new Map(),
1702
1771
  styleAttributeStart = ' style="',
1703
1772
  styleAssign = ":",
@@ -2213,13 +2282,25 @@ function flattenOptionChildren(children) {
2213
2282
  var formReplayingRuntimeScript =
2214
2283
  'addEventListener("submit",function(a){if(!a.defaultPrevented){var c=a.target,d=a.submitter,e=c.action,b=d;if(d){var f=d.getAttribute("formAction");null!=f&&(e=f,b=null)}"javascript:throw new Error(\'React form unexpectedly submitted.\')"===e&&(a.preventDefault(),b?(a=document.createElement("input"),a.name=b.name,a.value=b.value,b.parentNode.insertBefore(a,b),b=new FormData(c),a.parentNode.removeChild(a)):b=new FormData(c),a=c.ownerDocument||c,(a.$$reactFormReplay=a.$$reactFormReplay||[]).push(c,d,b))}});';
2215
2284
  function injectFormReplayingRuntime(resumableState, renderState) {
2216
- (resumableState.instructions & 16) === NothingSent &&
2217
- ((resumableState.instructions |= 16),
2218
- renderState.bootstrapChunks.unshift(
2219
- renderState.startInlineScript,
2220
- formReplayingRuntimeScript,
2221
- "\x3c/script>"
2222
- ));
2285
+ if ((resumableState.instructions & 16) === NothingSent) {
2286
+ resumableState.instructions |= 16;
2287
+ var preamble = renderState.preamble,
2288
+ bootstrapChunks = renderState.bootstrapChunks;
2289
+ (preamble.htmlChunks || preamble.headChunks) && 0 === bootstrapChunks.length
2290
+ ? (bootstrapChunks.push(renderState.startInlineScript),
2291
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
2292
+ bootstrapChunks.push(
2293
+ endOfStartTag,
2294
+ formReplayingRuntimeScript,
2295
+ endInlineScript
2296
+ ))
2297
+ : bootstrapChunks.unshift(
2298
+ renderState.startInlineScript,
2299
+ endOfStartTag,
2300
+ formReplayingRuntimeScript,
2301
+ endInlineScript
2302
+ );
2303
+ }
2223
2304
  }
2224
2305
  function pushLinkImpl(target, props) {
2225
2306
  target.push(startChunkForTag("link"));
@@ -2410,8 +2491,7 @@ function pushStartInstance(
2410
2491
  preambleState,
2411
2492
  hoistableState,
2412
2493
  formatContext,
2413
- textEmbedded,
2414
- isFallback
2494
+ textEmbedded
2415
2495
  ) {
2416
2496
  validateProperties$2(type, props);
2417
2497
  ("input" !== type && "textarea" !== type && "select" !== type) ||
@@ -3029,8 +3109,8 @@ function pushStartInstance(
3029
3109
  } else JSCompiler_inline_result$jscomp$3 = children$jscomp$5;
3030
3110
  return JSCompiler_inline_result$jscomp$3;
3031
3111
  case "title":
3032
- var insertionMode = formatContext.insertionMode,
3033
- noscriptTagInScope = !!(formatContext.tagScope & 1);
3112
+ var noscriptTagInScope = formatContext.tagScope & 1,
3113
+ isFallback = formatContext.tagScope & 4;
3034
3114
  if (hasOwnProperty.call(props, "children")) {
3035
3115
  var children$jscomp$6 = props.children,
3036
3116
  child = Array.isArray(children$jscomp$6)
@@ -3059,7 +3139,7 @@ function pushStartInstance(
3059
3139
  ));
3060
3140
  }
3061
3141
  if (
3062
- insertionMode === SVG_MODE ||
3142
+ formatContext.insertionMode === SVG_MODE ||
3063
3143
  noscriptTagInScope ||
3064
3144
  null != props.itemProp
3065
3145
  )
@@ -3074,12 +3154,14 @@ function pushStartInstance(
3074
3154
  (JSCompiler_inline_result$jscomp$4 = void 0));
3075
3155
  return JSCompiler_inline_result$jscomp$4;
3076
3156
  case "link":
3077
- var rel = props.rel,
3157
+ var noscriptTagInScope$jscomp$0 = formatContext.tagScope & 1,
3158
+ isFallback$jscomp$0 = formatContext.tagScope & 4,
3159
+ rel = props.rel,
3078
3160
  href = props.href,
3079
3161
  precedence = props.precedence;
3080
3162
  if (
3081
3163
  formatContext.insertionMode === SVG_MODE ||
3082
- formatContext.tagScope & 1 ||
3164
+ noscriptTagInScope$jscomp$0 ||
3083
3165
  null != props.itemProp ||
3084
3166
  "string" !== typeof rel ||
3085
3167
  "string" !== typeof href ||
@@ -3177,12 +3259,13 @@ function pushStartInstance(
3177
3259
  props
3178
3260
  ))
3179
3261
  : (textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e"),
3180
- (JSCompiler_inline_result$jscomp$5 = isFallback
3262
+ (JSCompiler_inline_result$jscomp$5 = isFallback$jscomp$0
3181
3263
  ? null
3182
3264
  : pushLinkImpl(renderState.hoistableChunks, props)));
3183
3265
  return JSCompiler_inline_result$jscomp$5;
3184
3266
  case "script":
3185
- var asyncProp = props.async;
3267
+ var noscriptTagInScope$jscomp$1 = formatContext.tagScope & 1,
3268
+ asyncProp = props.async;
3186
3269
  if (
3187
3270
  "string" !== typeof props.src ||
3188
3271
  !props.src ||
@@ -3192,7 +3275,7 @@ function pushStartInstance(
3192
3275
  props.onLoad ||
3193
3276
  props.onError ||
3194
3277
  formatContext.insertionMode === SVG_MODE ||
3195
- formatContext.tagScope & 1 ||
3278
+ noscriptTagInScope$jscomp$1 ||
3196
3279
  null != props.itemProp
3197
3280
  )
3198
3281
  var JSCompiler_inline_result$jscomp$6 = pushScriptImpl(
@@ -3229,8 +3312,7 @@ function pushStartInstance(
3229
3312
  }
3230
3313
  return JSCompiler_inline_result$jscomp$6;
3231
3314
  case "style":
3232
- var insertionMode$jscomp$0 = formatContext.insertionMode,
3233
- noscriptTagInScope$jscomp$0 = !!(formatContext.tagScope & 1);
3315
+ var noscriptTagInScope$jscomp$2 = formatContext.tagScope & 1;
3234
3316
  if (hasOwnProperty.call(props, "children")) {
3235
3317
  var children$jscomp$7 = props.children,
3236
3318
  child$jscomp$0 = Array.isArray(children$jscomp$7)
@@ -3251,10 +3333,11 @@ function pushStartInstance(
3251
3333
  );
3252
3334
  }
3253
3335
  var precedence$jscomp$0 = props.precedence,
3254
- href$jscomp$0 = props.href;
3336
+ href$jscomp$0 = props.href,
3337
+ nonce = props.nonce;
3255
3338
  if (
3256
- insertionMode$jscomp$0 === SVG_MODE ||
3257
- noscriptTagInScope$jscomp$0 ||
3339
+ formatContext.insertionMode === SVG_MODE ||
3340
+ noscriptTagInScope$jscomp$2 ||
3258
3341
  null != props.itemProp ||
3259
3342
  "string" !== typeof precedence$jscomp$0 ||
3260
3343
  "string" !== typeof href$jscomp$0 ||
@@ -3316,44 +3399,59 @@ function pushStartInstance(
3316
3399
  'React encountered a hoistable style tag for the same href as a preload: "%s". When using a style tag to inline styles you should not also preload it as a stylsheet.',
3317
3400
  href$jscomp$0
3318
3401
  );
3319
- styleQueue$jscomp$0
3320
- ? styleQueue$jscomp$0.hrefs.push(
3321
- escapeTextForBrowser(href$jscomp$0)
3322
- )
3323
- : ((styleQueue$jscomp$0 = {
3324
- precedence: escapeTextForBrowser(precedence$jscomp$0),
3325
- rules: [],
3326
- hrefs: [escapeTextForBrowser(href$jscomp$0)],
3327
- sheets: new Map()
3328
- }),
3329
- renderState.styles.set(precedence$jscomp$0, styleQueue$jscomp$0));
3330
- var target = styleQueue$jscomp$0.rules,
3331
- children$jscomp$9 = null,
3332
- innerHTML$jscomp$6 = null,
3333
- propKey$jscomp$9;
3334
- for (propKey$jscomp$9 in props)
3335
- if (hasOwnProperty.call(props, propKey$jscomp$9)) {
3336
- var propValue$jscomp$9 = props[propKey$jscomp$9];
3337
- if (null != propValue$jscomp$9)
3338
- switch (propKey$jscomp$9) {
3339
- case "children":
3340
- children$jscomp$9 = propValue$jscomp$9;
3341
- break;
3342
- case "dangerouslySetInnerHTML":
3343
- innerHTML$jscomp$6 = propValue$jscomp$9;
3344
- }
3345
- }
3346
- var child$jscomp$2 = Array.isArray(children$jscomp$9)
3347
- ? 2 > children$jscomp$9.length
3348
- ? children$jscomp$9[0]
3349
- : null
3350
- : children$jscomp$9;
3351
- "function" !== typeof child$jscomp$2 &&
3352
- "symbol" !== typeof child$jscomp$2 &&
3353
- null !== child$jscomp$2 &&
3354
- void 0 !== child$jscomp$2 &&
3355
- target.push(escapeStyleTextContent(child$jscomp$2));
3356
- pushInnerHTML(target, innerHTML$jscomp$6, children$jscomp$9);
3402
+ styleQueue$jscomp$0 ||
3403
+ ((styleQueue$jscomp$0 = {
3404
+ precedence: escapeTextForBrowser(precedence$jscomp$0),
3405
+ rules: [],
3406
+ hrefs: [],
3407
+ sheets: new Map()
3408
+ }),
3409
+ renderState.styles.set(precedence$jscomp$0, styleQueue$jscomp$0));
3410
+ var nonceStyle = renderState.nonce.style;
3411
+ if (nonceStyle && nonceStyle !== nonce)
3412
+ console.error(
3413
+ 'React encountered a style tag with `precedence` "%s" and `nonce` "%s". When React manages style rules using `precedence` it will only include rules if the nonce matches the style nonce "%s" that was included with this render.',
3414
+ precedence$jscomp$0,
3415
+ nonce,
3416
+ nonceStyle
3417
+ );
3418
+ else {
3419
+ !nonceStyle &&
3420
+ nonce &&
3421
+ console.error(
3422
+ 'React encountered a style tag with `precedence` "%s" and `nonce` "%s". When React manages style rules using `precedence` it will only include a nonce attributes if you also provide the same style nonce value as a render option.',
3423
+ precedence$jscomp$0,
3424
+ nonce
3425
+ );
3426
+ styleQueue$jscomp$0.hrefs.push(escapeTextForBrowser(href$jscomp$0));
3427
+ var target = styleQueue$jscomp$0.rules,
3428
+ children$jscomp$9 = null,
3429
+ innerHTML$jscomp$6 = null,
3430
+ propKey$jscomp$9;
3431
+ for (propKey$jscomp$9 in props)
3432
+ if (hasOwnProperty.call(props, propKey$jscomp$9)) {
3433
+ var propValue$jscomp$9 = props[propKey$jscomp$9];
3434
+ if (null != propValue$jscomp$9)
3435
+ switch (propKey$jscomp$9) {
3436
+ case "children":
3437
+ children$jscomp$9 = propValue$jscomp$9;
3438
+ break;
3439
+ case "dangerouslySetInnerHTML":
3440
+ innerHTML$jscomp$6 = propValue$jscomp$9;
3441
+ }
3442
+ }
3443
+ var child$jscomp$2 = Array.isArray(children$jscomp$9)
3444
+ ? 2 > children$jscomp$9.length
3445
+ ? children$jscomp$9[0]
3446
+ : null
3447
+ : children$jscomp$9;
3448
+ "function" !== typeof child$jscomp$2 &&
3449
+ "symbol" !== typeof child$jscomp$2 &&
3450
+ null !== child$jscomp$2 &&
3451
+ void 0 !== child$jscomp$2 &&
3452
+ target.push(escapeStyleTextContent(child$jscomp$2));
3453
+ pushInnerHTML(target, innerHTML$jscomp$6, children$jscomp$9);
3454
+ }
3357
3455
  }
3358
3456
  styleQueue$jscomp$0 &&
3359
3457
  hoistableState &&
@@ -3363,9 +3461,11 @@ function pushStartInstance(
3363
3461
  }
3364
3462
  return JSCompiler_inline_result$jscomp$7;
3365
3463
  case "meta":
3464
+ var noscriptTagInScope$jscomp$3 = formatContext.tagScope & 1,
3465
+ isFallback$jscomp$1 = formatContext.tagScope & 4;
3366
3466
  if (
3367
3467
  formatContext.insertionMode === SVG_MODE ||
3368
- formatContext.tagScope & 1 ||
3468
+ noscriptTagInScope$jscomp$3 ||
3369
3469
  null != props.itemProp
3370
3470
  )
3371
3471
  var JSCompiler_inline_result$jscomp$8 = pushSelfClosing(
@@ -3375,7 +3475,7 @@ function pushStartInstance(
3375
3475
  );
3376
3476
  else
3377
3477
  textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e"),
3378
- (JSCompiler_inline_result$jscomp$8 = isFallback
3478
+ (JSCompiler_inline_result$jscomp$8 = isFallback$jscomp$1
3379
3479
  ? null
3380
3480
  : "string" === typeof props.charSet
3381
3481
  ? pushSelfClosing(renderState.charsetChunks, props, "meta")
@@ -3433,17 +3533,18 @@ function pushStartInstance(
3433
3533
  target$jscomp$0.push("\n");
3434
3534
  return children$jscomp$10;
3435
3535
  case "img":
3436
- var src = props.src,
3536
+ var pictureOrNoScriptTagInScope = formatContext.tagScope & 3,
3537
+ src = props.src,
3437
3538
  srcSet = props.srcSet;
3438
3539
  if (
3439
3540
  !(
3440
3541
  "lazy" === props.loading ||
3441
3542
  (!src && !srcSet) ||
3442
3543
  ("string" !== typeof src && null != src) ||
3443
- ("string" !== typeof srcSet && null != srcSet)
3544
+ ("string" !== typeof srcSet && null != srcSet) ||
3545
+ "low" === props.fetchPriority ||
3546
+ pictureOrNoScriptTagInScope
3444
3547
  ) &&
3445
- "low" !== props.fetchPriority &&
3446
- !1 === !!(formatContext.tagScope & 3) &&
3447
3548
  ("string" !== typeof src ||
3448
3549
  ":" !== src[4] ||
3449
3550
  ("d" !== src[0] && "D" !== src[0]) ||
@@ -3457,6 +3558,9 @@ function pushStartInstance(
3457
3558
  ("t" !== srcSet[2] && "T" !== srcSet[2]) ||
3458
3559
  ("a" !== srcSet[3] && "A" !== srcSet[3]))
3459
3560
  ) {
3561
+ null !== hoistableState &&
3562
+ formatContext.tagScope & 64 &&
3563
+ (hoistableState.suspenseyImages = !0);
3460
3564
  var sizes = "string" === typeof props.sizes ? props.sizes : void 0,
3461
3565
  key$jscomp$0 = srcSet ? srcSet + "\n" + (sizes || "") : src,
3462
3566
  promotablePreloads = renderState.preloads.images,
@@ -3547,6 +3651,7 @@ function pushStartInstance(
3547
3651
  var preamble = preambleState || renderState.preamble;
3548
3652
  if (preamble.headChunks)
3549
3653
  throw Error("The `<head>` tag may only be rendered once.");
3654
+ null !== preambleState && target$jscomp$0.push("\x3c!--head--\x3e");
3550
3655
  preamble.headChunks = [];
3551
3656
  var JSCompiler_inline_result$jscomp$9 = pushStartSingletonElement(
3552
3657
  preamble.headChunks,
@@ -3565,6 +3670,7 @@ function pushStartInstance(
3565
3670
  var preamble$jscomp$0 = preambleState || renderState.preamble;
3566
3671
  if (preamble$jscomp$0.bodyChunks)
3567
3672
  throw Error("The `<body>` tag may only be rendered once.");
3673
+ null !== preambleState && target$jscomp$0.push("\x3c!--body--\x3e");
3568
3674
  preamble$jscomp$0.bodyChunks = [];
3569
3675
  var JSCompiler_inline_result$jscomp$10 = pushStartSingletonElement(
3570
3676
  preamble$jscomp$0.bodyChunks,
@@ -3583,6 +3689,7 @@ function pushStartInstance(
3583
3689
  var preamble$jscomp$1 = preambleState || renderState.preamble;
3584
3690
  if (preamble$jscomp$1.htmlChunks)
3585
3691
  throw Error("The `<html>` tag may only be rendered once.");
3692
+ null !== preambleState && target$jscomp$0.push("\x3c!--html--\x3e");
3586
3693
  preamble$jscomp$1.htmlChunks = ["<!DOCTYPE html>"];
3587
3694
  var JSCompiler_inline_result$jscomp$11 = pushStartSingletonElement(
3588
3695
  preamble$jscomp$1.htmlChunks,
@@ -3660,16 +3767,13 @@ function hoistPreambleState(renderState, preambleState) {
3660
3767
  renderState = renderState.preamble;
3661
3768
  null === renderState.htmlChunks &&
3662
3769
  preambleState.htmlChunks &&
3663
- ((renderState.htmlChunks = preambleState.htmlChunks),
3664
- (preambleState.contribution |= 1));
3770
+ (renderState.htmlChunks = preambleState.htmlChunks);
3665
3771
  null === renderState.headChunks &&
3666
3772
  preambleState.headChunks &&
3667
- ((renderState.headChunks = preambleState.headChunks),
3668
- (preambleState.contribution |= 4));
3773
+ (renderState.headChunks = preambleState.headChunks);
3669
3774
  null === renderState.bodyChunks &&
3670
3775
  preambleState.bodyChunks &&
3671
- ((renderState.bodyChunks = preambleState.bodyChunks),
3672
- (preambleState.contribution |= 2));
3776
+ (renderState.bodyChunks = preambleState.bodyChunks);
3673
3777
  }
3674
3778
  function writeBootstrap(destination, renderState) {
3675
3779
  renderState = renderState.bootstrapChunks;
@@ -3679,7 +3783,9 @@ function writeBootstrap(destination, renderState) {
3679
3783
  ? ((i = renderState[i]), (renderState.length = 0), !!destination.write(i))
3680
3784
  : !0;
3681
3785
  }
3682
- var placeholder1 = '<template id="',
3786
+ var shellTimeRuntimeScript =
3787
+ "requestAnimationFrame(function(){$RT=performance.now()});",
3788
+ placeholder1 = '<template id="',
3683
3789
  placeholder2 = '"></template>',
3684
3790
  startCompletedSuspenseBoundary = "\x3c!--$--\x3e",
3685
3791
  startPendingSuspenseBoundary1 = '\x3c!--$?--\x3e<template id="',
@@ -3703,15 +3809,6 @@ function writeStartPendingSuspenseBoundary(destination, renderState, id) {
3703
3809
  writeChunk(destination, id.toString(16));
3704
3810
  return !!destination.write(startPendingSuspenseBoundary2);
3705
3811
  }
3706
- var boundaryPreambleContributionChunkStart = "\x3c!--",
3707
- boundaryPreambleContributionChunkEnd = "--\x3e";
3708
- function writePreambleContribution(destination, preambleState) {
3709
- preambleState = preambleState.contribution;
3710
- preambleState !== NoContribution &&
3711
- (writeChunk(destination, boundaryPreambleContributionChunkStart),
3712
- writeChunk(destination, "" + preambleState),
3713
- writeChunk(destination, boundaryPreambleContributionChunkEnd));
3714
- }
3715
3812
  var startSegmentHTML = '<div hidden id="',
3716
3813
  startSegmentHTML2 = '">',
3717
3814
  endSegmentHTML = "</div>",
@@ -3819,18 +3916,18 @@ var completeSegmentScript1Full =
3819
3916
  completeSegmentScript1Partial = '$RS("',
3820
3917
  completeSegmentScript2 = '","',
3821
3918
  completeSegmentScriptEnd = '")\x3c/script>',
3822
- completeBoundaryScript1Full =
3823
- '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("',
3919
+ completeBoundaryScriptFunctionOnly =
3920
+ '$RB=[];$RV=function(a){$RT=performance.now();for(var b=0;b<a.length;b+=2){var c=a[b],e=a[b+1];null!==e.parentNode&&e.parentNode.removeChild(e);var f=c.parentNode;if(f){var g=c.previousSibling,h=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d||"/&"===d)if(0===h)break;else h--;else"$"!==d&&"$?"!==d&&"$~"!==d&&"$!"!==d&&"&"!==d||h++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;e.firstChild;)f.insertBefore(e.firstChild,c);g.data="$";g._reactRetry&&requestAnimationFrame(g._reactRetry)}}a.length=0};\n$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data="$~",$RB.push(a,b),2===$RB.length&&("number"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};',
3824
3921
  completeBoundaryScript1Partial = '$RC("',
3825
- completeBoundaryWithStylesScript1FullBoth =
3826
- '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RM=new Map;\n$RR=function(t,u,y){function v(n){this._p=null;n()}for(var w=$RC,p=$RM,q=new Map,r=document,g,b,h=r.querySelectorAll("link[data-precedence],style[data-precedence]"),x=[],k=0;b=h[k++];)"not all"===b.getAttribute("media")?x.push(b):("LINK"===b.tagName&&p.set(b.getAttribute("href"),b),q.set(b.dataset.precedence,g=b));b=0;h=[];var l,a;for(k=!0;;){if(k){var e=y[b++];if(!e){k=!1;b=0;continue}var c=!1,m=0;var d=e[m++];if(a=p.get(d)){var f=a._p;c=!0}else{a=r.createElement("link");a.href=\nd;a.rel="stylesheet";for(a.dataset.precedence=l=e[m++];f=e[m++];)a.setAttribute(f,e[m++]);f=a._p=new Promise(function(n,z){a.onload=v.bind(a,n);a.onerror=v.bind(a,z)});p.set(d,a)}d=a.getAttribute("media");!f||d&&!matchMedia(d).matches||h.push(f);if(c)continue}else{a=x[b++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=q.get(l)||g;c===g&&(g=a);q.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=r.head,c.insertBefore(a,c.firstChild))}Promise.all(h).then(w.bind(null,\nt,u,""),w.bind(null,t,u,"Resource failed to load"))};$RR("',
3827
3922
  completeBoundaryWithStylesScript1FullPartial =
3828
- '$RM=new Map;\n$RR=function(t,u,y){function v(n){this._p=null;n()}for(var w=$RC,p=$RM,q=new Map,r=document,g,b,h=r.querySelectorAll("link[data-precedence],style[data-precedence]"),x=[],k=0;b=h[k++];)"not all"===b.getAttribute("media")?x.push(b):("LINK"===b.tagName&&p.set(b.getAttribute("href"),b),q.set(b.dataset.precedence,g=b));b=0;h=[];var l,a;for(k=!0;;){if(k){var e=y[b++];if(!e){k=!1;b=0;continue}var c=!1,m=0;var d=e[m++];if(a=p.get(d)){var f=a._p;c=!0}else{a=r.createElement("link");a.href=\nd;a.rel="stylesheet";for(a.dataset.precedence=l=e[m++];f=e[m++];)a.setAttribute(f,e[m++]);f=a._p=new Promise(function(n,z){a.onload=v.bind(a,n);a.onerror=v.bind(a,z)});p.set(d,a)}d=a.getAttribute("media");!f||d&&!matchMedia(d).matches||h.push(f);if(c)continue}else{a=x[b++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=q.get(l)||g;c===g&&(g=a);q.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=r.head,c.insertBefore(a,c.firstChild))}Promise.all(h).then(w.bind(null,\nt,u,""),w.bind(null,t,u,"Resource failed to load"))};$RR("',
3923
+ '$RM=new Map;$RR=function(n,w,p){function u(q){this._p=null;q()}for(var r=new Map,t=document,h,b,e=t.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=e[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&$RM.set(b.getAttribute("href"),b),r.set(b.dataset.precedence,h=b));e=0;b=[];var l,a;for(k=!0;;){if(k){var f=p[e++];if(!f){k=!1;e=0;continue}var c=!1,m=0;var d=f[m++];if(a=$RM.get(d)){var g=a._p;c=!0}else{a=t.createElement("link");a.href=d;a.rel=\n"stylesheet";for(a.dataset.precedence=l=f[m++];g=f[m++];)a.setAttribute(g,f[m++]);g=a._p=new Promise(function(q,x){a.onload=u.bind(a,q);a.onerror=u.bind(a,x)});$RM.set(d,a)}d=a.getAttribute("media");!g||d&&!matchMedia(d).matches||b.push(g);if(c)continue}else{a=v[e++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=r.get(l)||h;c===h&&(h=a);r.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=t.head,c.insertBefore(a,c.firstChild))}if(p=document.getElementById(n))p.previousSibling.data=\n"$~";Promise.all(b).then($RC.bind(null,n,w),$RX.bind(null,n,"CSS failed to load"))};$RR("',
3829
3924
  completeBoundaryWithStylesScript1Partial = '$RR("',
3830
3925
  completeBoundaryScript2 = '","',
3831
3926
  completeBoundaryScript3a = '",',
3832
3927
  completeBoundaryScript3b = '"',
3833
3928
  completeBoundaryScriptEnd = ")\x3c/script>",
3929
+ clientRenderScriptFunctionOnly =
3930
+ '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};',
3834
3931
  clientRenderScript1Full =
3835
3932
  '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX("',
3836
3933
  clientRenderScript1Partial = '$RX("',
@@ -3881,7 +3978,7 @@ function escapeJSObjectForInstructionScripts(input) {
3881
3978
  }
3882
3979
  );
3883
3980
  }
3884
- var lateStyleTagResourceOpen1 = '<style media="not all" data-precedence="',
3981
+ var lateStyleTagResourceOpen1 = ' media="not all" data-precedence="',
3885
3982
  lateStyleTagResourceOpen2 = '" data-href="',
3886
3983
  lateStyleTagResourceOpen3 = '">',
3887
3984
  lateStyleTagTemplateClose = "</style>",
@@ -3897,6 +3994,7 @@ function flushStyleTagsLateForBoundary(styleQueue) {
3897
3994
  );
3898
3995
  var i = 0;
3899
3996
  if (hrefs.length) {
3997
+ writeChunk(this, currentlyFlushingRenderState.startInlineStyle);
3900
3998
  writeChunk(this, lateStyleTagResourceOpen1);
3901
3999
  writeChunk(this, styleQueue.precedence);
3902
4000
  for (writeChunk(this, lateStyleTagResourceOpen2); i < hrefs.length - 1; i++)
@@ -3918,7 +4016,9 @@ function hasStylesToHoist(stylesheet) {
3918
4016
  function writeHoistablesForBoundary(destination, hoistableState, renderState) {
3919
4017
  currentlyRenderingBoundaryHasStylesToHoist = !1;
3920
4018
  destinationHasCapacity = !0;
4019
+ currentlyFlushingRenderState = renderState;
3921
4020
  hoistableState.styles.forEach(flushStyleTagsLateForBoundary, destination);
4021
+ currentlyFlushingRenderState = null;
3922
4022
  hoistableState.stylesheets.forEach(hasStylesToHoist);
3923
4023
  currentlyRenderingBoundaryHasStylesToHoist &&
3924
4024
  (renderState.stylesToHoist = !0);
@@ -3936,7 +4036,7 @@ function flushStyleInPreamble(stylesheet) {
3936
4036
  stylesheetFlushingQueue.length = 0;
3937
4037
  stylesheet.state = PREAMBLE;
3938
4038
  }
3939
- var styleTagResourceOpen1 = '<style data-precedence="',
4039
+ var styleTagResourceOpen1 = ' data-precedence="',
3940
4040
  styleTagResourceOpen2 = '" data-href="',
3941
4041
  spaceSeparator = " ",
3942
4042
  styleTagResourceOpen3 = '">',
@@ -3948,6 +4048,7 @@ function flushStylesInPreamble(styleQueue) {
3948
4048
  var rules = styleQueue.rules,
3949
4049
  hrefs = styleQueue.hrefs;
3950
4050
  if (!hasStylesheets || hrefs.length) {
4051
+ writeChunk(this, currentlyFlushingRenderState.startInlineStyle);
3951
4052
  writeChunk(this, styleTagResourceOpen1);
3952
4053
  writeChunk(this, styleQueue.precedence);
3953
4054
  styleQueue = 0;
@@ -3996,6 +4097,16 @@ function preloadLateStyles(styleQueue) {
3996
4097
  styleQueue.sheets.forEach(preloadLateStyle, this);
3997
4098
  styleQueue.sheets.clear();
3998
4099
  }
4100
+ var completedShellIdAttributeStart = ' id="';
4101
+ function pushCompletedShellIdAttribute(target, resumableState) {
4102
+ (resumableState.instructions & SentCompletedShellId) === NothingSent &&
4103
+ ((resumableState.instructions |= SentCompletedShellId),
4104
+ target.push(
4105
+ completedShellIdAttributeStart,
4106
+ escapeTextForBrowser("_" + resumableState.idPrefix + "R_"),
4107
+ attributeEnd
4108
+ ));
4109
+ }
3999
4110
  var arrayFirstOpenBracket = "[",
4000
4111
  arraySubsequentOpenBracket = ",[",
4001
4112
  arrayInterstitial = ",",
@@ -4112,7 +4223,7 @@ var PENDING$1 = 0,
4112
4223
  PREAMBLE = 2,
4113
4224
  LATE = 3;
4114
4225
  function createHoistableState() {
4115
- return { styles: new Set(), stylesheets: new Set() };
4226
+ return { styles: new Set(), stylesheets: new Set(), suspenseyImages: !1 };
4116
4227
  }
4117
4228
  function prefetchDNS(href) {
4118
4229
  var request = currentRequest ? currentRequest : null;
@@ -4539,6 +4650,14 @@ function hoistStyleQueueDependency(styleQueue) {
4539
4650
  function hoistStylesheetDependency(stylesheet) {
4540
4651
  this.stylesheets.add(stylesheet);
4541
4652
  }
4653
+ function hoistHoistables(parentState, childState) {
4654
+ childState.styles.forEach(hoistStyleQueueDependency, parentState);
4655
+ childState.stylesheets.forEach(hoistStylesheetDependency, parentState);
4656
+ childState.suspenseyImages && (parentState.suspenseyImages = !0);
4657
+ }
4658
+ function hasSuspenseyContent(hoistableState) {
4659
+ return 0 < hoistableState.stylesheets.size || hoistableState.suspenseyImages;
4660
+ }
4542
4661
  var bind = Function.prototype.bind,
4543
4662
  REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
4544
4663
  function getComponentNameFromType(type) {
@@ -4573,7 +4692,7 @@ function getComponentNameFromType(type) {
4573
4692
  case REACT_PORTAL_TYPE:
4574
4693
  return "Portal";
4575
4694
  case REACT_CONTEXT_TYPE:
4576
- return (type.displayName || "Context") + ".Provider";
4695
+ return type.displayName || "Context";
4577
4696
  case REACT_CONSUMER_TYPE:
4578
4697
  return (type._context.displayName || "Context") + ".Consumer";
4579
4698
  case REACT_FORWARD_REF_TYPE:
@@ -4777,15 +4896,15 @@ function clz32Fallback(x) {
4777
4896
  x >>>= 0;
4778
4897
  return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
4779
4898
  }
4899
+ function noop() {}
4780
4900
  var SuspenseException = Error(
4781
4901
  "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."
4782
4902
  );
4783
- function noop$2() {}
4784
4903
  function trackUsedThenable(thenableState, thenable, index) {
4785
4904
  index = thenableState[index];
4786
4905
  void 0 === index
4787
4906
  ? thenableState.push(thenable)
4788
- : index !== thenable && (thenable.then(noop$2, noop$2), (thenable = index));
4907
+ : index !== thenable && (thenable.then(noop, noop), (thenable = index));
4789
4908
  switch (thenable.status) {
4790
4909
  case "fulfilled":
4791
4910
  return thenable.value;
@@ -4793,7 +4912,7 @@ function trackUsedThenable(thenableState, thenable, index) {
4793
4912
  throw thenable.reason;
4794
4913
  default:
4795
4914
  "string" === typeof thenable.status
4796
- ? thenable.then(noop$2, noop$2)
4915
+ ? thenable.then(noop, noop)
4797
4916
  : ((thenableState = thenable),
4798
4917
  (thenableState.status = "pending"),
4799
4918
  thenableState.then(
@@ -5015,6 +5134,11 @@ function dispatchAction(componentIdentity, queue, action) {
5015
5134
  queue.next = componentIdentity;
5016
5135
  }
5017
5136
  }
5137
+ function throwOnUseEffectEventCall() {
5138
+ throw Error(
5139
+ "A function wrapped in useEffectEvent can't be called during rendering."
5140
+ );
5141
+ }
5018
5142
  function unsupportedStartTransition() {
5019
5143
  throw Error("startTransition cannot be called during server rendering.");
5020
5144
  }
@@ -5092,7 +5216,6 @@ function unwrapThenable(thenable) {
5092
5216
  function unsupportedRefresh() {
5093
5217
  throw Error("Cache cannot be refreshed during server rendering.");
5094
5218
  }
5095
- function noop$1() {}
5096
5219
  var HooksDispatcher = {
5097
5220
  readContext: readContext,
5098
5221
  use: function (usable) {
@@ -5123,16 +5246,16 @@ var HooksDispatcher = {
5123
5246
  currentHookNameInDev = "useState";
5124
5247
  return useReducer(basicStateReducer, initialState);
5125
5248
  },
5126
- useInsertionEffect: noop$1,
5127
- useLayoutEffect: noop$1,
5249
+ useInsertionEffect: noop,
5250
+ useLayoutEffect: noop,
5128
5251
  useCallback: function (callback, deps) {
5129
5252
  return useMemo(function () {
5130
5253
  return callback;
5131
5254
  }, deps);
5132
5255
  },
5133
- useImperativeHandle: noop$1,
5134
- useEffect: noop$1,
5135
- useDebugValue: noop$1,
5256
+ useImperativeHandle: noop,
5257
+ useEffect: noop,
5258
+ useDebugValue: noop,
5136
5259
  useDeferredValue: function (value, initialValue) {
5137
5260
  resolveCurrentlyRenderingComponent();
5138
5261
  return void 0 !== initialValue ? initialValue : value;
@@ -5153,9 +5276,9 @@ var HooksDispatcher = {
5153
5276
  "Invalid hook call. Hooks can only be called inside of the body of a function component."
5154
5277
  );
5155
5278
  overflow = localIdCounter++;
5156
- treeId = "\u00ab" + resumableState.idPrefix + "R" + treeId;
5279
+ treeId = "_" + resumableState.idPrefix + "R_" + treeId;
5157
5280
  0 < overflow && (treeId += "H" + overflow.toString(32));
5158
- return treeId + "\u00bb";
5281
+ return treeId + "_";
5159
5282
  },
5160
5283
  useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
5161
5284
  if (void 0 === getServerSnapshot)
@@ -5181,6 +5304,9 @@ var HooksDispatcher = {
5181
5304
  },
5182
5305
  useCacheRefresh: function () {
5183
5306
  return unsupportedRefresh;
5307
+ },
5308
+ useEffectEvent: function () {
5309
+ return throwOnUseEffectEventCall;
5184
5310
  }
5185
5311
  },
5186
5312
  currentResumableState = null,
@@ -5189,6 +5315,9 @@ var HooksDispatcher = {
5189
5315
  getCacheForType: function () {
5190
5316
  throw Error("Not implemented.");
5191
5317
  },
5318
+ cacheSignal: function () {
5319
+ throw Error("Not implemented.");
5320
+ },
5192
5321
  getOwner: function () {
5193
5322
  return null === currentTaskInDEV ? null : currentTaskInDEV.componentStack;
5194
5323
  }
@@ -5249,6 +5378,24 @@ function reenableLogs() {
5249
5378
  "disabledDepth fell below zero. This is a bug in React. Please file an issue."
5250
5379
  );
5251
5380
  }
5381
+ function formatOwnerStack(error) {
5382
+ var prevPrepareStackTrace = Error.prepareStackTrace;
5383
+ Error.prepareStackTrace = void 0;
5384
+ error = error.stack;
5385
+ Error.prepareStackTrace = prevPrepareStackTrace;
5386
+ error.startsWith("Error: react-stack-top-frame\n") &&
5387
+ (error = error.slice(29));
5388
+ prevPrepareStackTrace = error.indexOf("\n");
5389
+ -1 !== prevPrepareStackTrace &&
5390
+ (error = error.slice(prevPrepareStackTrace + 1));
5391
+ prevPrepareStackTrace = error.indexOf("react_stack_bottom_frame");
5392
+ -1 !== prevPrepareStackTrace &&
5393
+ (prevPrepareStackTrace = error.lastIndexOf("\n", prevPrepareStackTrace));
5394
+ if (-1 !== prevPrepareStackTrace)
5395
+ error = error.slice(0, prevPrepareStackTrace);
5396
+ else return "";
5397
+ return error;
5398
+ }
5252
5399
  var prefix, suffix;
5253
5400
  function describeBuiltInComponentFrame(name) {
5254
5401
  if (void 0 === prefix)
@@ -5420,24 +5567,6 @@ function describeNativeComponentFrame(fn, construct) {
5420
5567
  "function" === typeof fn && componentFrameCache.set(fn, sampleLines);
5421
5568
  return sampleLines;
5422
5569
  }
5423
- function formatOwnerStack(error) {
5424
- var prevPrepareStackTrace = Error.prepareStackTrace;
5425
- Error.prepareStackTrace = void 0;
5426
- error = error.stack;
5427
- Error.prepareStackTrace = prevPrepareStackTrace;
5428
- error.startsWith("Error: react-stack-top-frame\n") &&
5429
- (error = error.slice(29));
5430
- prevPrepareStackTrace = error.indexOf("\n");
5431
- -1 !== prevPrepareStackTrace &&
5432
- (error = error.slice(prevPrepareStackTrace + 1));
5433
- prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame");
5434
- -1 !== prevPrepareStackTrace &&
5435
- (prevPrepareStackTrace = error.lastIndexOf("\n", prevPrepareStackTrace));
5436
- if (-1 !== prevPrepareStackTrace)
5437
- error = error.slice(0, prevPrepareStackTrace);
5438
- else return "";
5439
- return error;
5440
- }
5441
5570
  function describeComponentStackByType(type) {
5442
5571
  if ("string" === typeof type) return describeBuiltInComponentFrame(type);
5443
5572
  if ("function" === typeof type)
@@ -5461,13 +5590,26 @@ function describeComponentStackByType(type) {
5461
5590
  }
5462
5591
  return describeComponentStackByType(type);
5463
5592
  }
5464
- if ("string" === typeof type.name)
5465
- return (
5466
- (payload = type.env),
5467
- describeBuiltInComponentFrame(
5468
- type.name + (payload ? " [" + payload + "]" : "")
5469
- )
5470
- );
5593
+ if ("string" === typeof type.name) {
5594
+ a: {
5595
+ payload = type.name;
5596
+ lazyComponent = type.env;
5597
+ type = type.debugLocation;
5598
+ if (null != type) {
5599
+ type = formatOwnerStack(type);
5600
+ var idx = type.lastIndexOf("\n");
5601
+ type = -1 === idx ? type : type.slice(idx + 1);
5602
+ if (-1 !== type.indexOf(payload)) {
5603
+ payload = "\n" + type;
5604
+ break a;
5605
+ }
5606
+ }
5607
+ payload = describeBuiltInComponentFrame(
5608
+ payload + (lazyComponent ? " [" + lazyComponent + "]" : "")
5609
+ );
5610
+ }
5611
+ return payload;
5612
+ }
5471
5613
  }
5472
5614
  switch (type) {
5473
5615
  case REACT_SUSPENSE_LIST_TYPE:
@@ -5478,26 +5620,25 @@ function describeComponentStackByType(type) {
5478
5620
  return "";
5479
5621
  }
5480
5622
  var callComponent = {
5481
- "react-stack-bottom-frame": function (Component, props, secondArg) {
5623
+ react_stack_bottom_frame: function (Component, props, secondArg) {
5482
5624
  return Component(props, secondArg);
5483
5625
  }
5484
5626
  },
5485
5627
  callComponentInDEV =
5486
- callComponent["react-stack-bottom-frame"].bind(callComponent),
5628
+ callComponent.react_stack_bottom_frame.bind(callComponent),
5487
5629
  callRender = {
5488
- "react-stack-bottom-frame": function (instance) {
5630
+ react_stack_bottom_frame: function (instance) {
5489
5631
  return instance.render();
5490
5632
  }
5491
5633
  },
5492
- callRenderInDEV = callRender["react-stack-bottom-frame"].bind(callRender),
5634
+ callRenderInDEV = callRender.react_stack_bottom_frame.bind(callRender),
5493
5635
  callLazyInit = {
5494
- "react-stack-bottom-frame": function (lazy) {
5636
+ react_stack_bottom_frame: function (lazy) {
5495
5637
  var init = lazy._init;
5496
5638
  return init(lazy._payload);
5497
5639
  }
5498
5640
  },
5499
- callLazyInitInDEV =
5500
- callLazyInit["react-stack-bottom-frame"].bind(callLazyInit),
5641
+ callLazyInitInDEV = callLazyInit.react_stack_bottom_frame.bind(callLazyInit),
5501
5642
  lastResetTime = 0,
5502
5643
  getCurrentTime;
5503
5644
  if ("object" === typeof performance && "function" === typeof performance.now) {
@@ -5515,8 +5656,16 @@ var CLIENT_RENDERED = 4,
5515
5656
  PENDING = 0,
5516
5657
  COMPLETED = 1,
5517
5658
  FLUSHED = 2,
5659
+ ABORTED = 3,
5660
+ ERRORED = 4,
5518
5661
  POSTPONED = 5,
5519
5662
  CLOSED = 14;
5663
+ function isEligibleForOutlining(request, boundary) {
5664
+ return (
5665
+ (500 < boundary.byteSize || hasSuspenseyContent(boundary.contentState)) &&
5666
+ null === boundary.contentPreamble
5667
+ );
5668
+ }
5520
5669
  function defaultErrorHandler(error) {
5521
5670
  if (
5522
5671
  "object" === typeof error &&
@@ -5537,7 +5686,7 @@ function defaultErrorHandler(error) {
5537
5686
  : error.splice(
5538
5687
  0,
5539
5688
  0,
5540
- "%c%s%c ",
5689
+ "%c%s%c",
5541
5690
  "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",
5542
5691
  " " + JSCompiler_inline_result + " ",
5543
5692
  ""
@@ -5548,7 +5697,6 @@ function defaultErrorHandler(error) {
5548
5697
  } else console.error(error);
5549
5698
  return null;
5550
5699
  }
5551
- function noop() {}
5552
5700
  function RequestInstance(
5553
5701
  resumableState,
5554
5702
  renderState,
@@ -5574,6 +5722,7 @@ function RequestInstance(
5574
5722
  this.fatalError = null;
5575
5723
  this.pendingRootTasks = this.allPendingTasks = this.nextSegmentId = 0;
5576
5724
  this.completedPreambleSegments = this.completedRootSegment = null;
5725
+ this.byteSize = 0;
5577
5726
  this.abortableTasks = abortSet;
5578
5727
  this.pingedTasks = [];
5579
5728
  this.clientRenderedBoundaries = [];
@@ -5644,7 +5793,7 @@ function createRequest(
5644
5793
  null,
5645
5794
  emptyTreeContext,
5646
5795
  null,
5647
- !1,
5796
+ null,
5648
5797
  emptyContextObject,
5649
5798
  null
5650
5799
  );
@@ -5667,15 +5816,17 @@ function pingTask(request, task) {
5667
5816
  }
5668
5817
  function createSuspenseBoundary(
5669
5818
  request,
5819
+ row,
5670
5820
  fallbackAbortableTasks,
5671
5821
  contentPreamble,
5672
5822
  fallbackPreamble
5673
5823
  ) {
5674
- return {
5824
+ fallbackAbortableTasks = {
5675
5825
  status: PENDING,
5676
5826
  rootSegmentID: -1,
5677
5827
  parentFlushed: !1,
5678
5828
  pendingTasks: 0,
5829
+ row: row,
5679
5830
  completedSegments: [],
5680
5831
  byteSize: 0,
5681
5832
  fallbackAbortableTasks: fallbackAbortableTasks,
@@ -5690,6 +5841,17 @@ function createSuspenseBoundary(
5690
5841
  errorStack: null,
5691
5842
  errorComponentStack: null
5692
5843
  };
5844
+ null !== row &&
5845
+ (row.pendingTasks++,
5846
+ (contentPreamble = row.boundaries),
5847
+ null !== contentPreamble &&
5848
+ (request.allPendingTasks++,
5849
+ fallbackAbortableTasks.pendingTasks++,
5850
+ contentPreamble.push(fallbackAbortableTasks)),
5851
+ (request = row.inheritedHoistables),
5852
+ null !== request &&
5853
+ hoistHoistables(fallbackAbortableTasks.contentState, request));
5854
+ return fallbackAbortableTasks;
5693
5855
  }
5694
5856
  function createRenderTask(
5695
5857
  request,
@@ -5705,8 +5867,8 @@ function createRenderTask(
5705
5867
  formatContext,
5706
5868
  context,
5707
5869
  treeContext,
5870
+ row,
5708
5871
  componentStack,
5709
- isFallback,
5710
5872
  legacyContext,
5711
5873
  debugTask
5712
5874
  ) {
@@ -5714,6 +5876,7 @@ function createRenderTask(
5714
5876
  null === blockedBoundary
5715
5877
  ? request.pendingRootTasks++
5716
5878
  : blockedBoundary.pendingTasks++;
5879
+ null !== row && row.pendingTasks++;
5717
5880
  var task = {
5718
5881
  replay: null,
5719
5882
  node: node,
@@ -5730,9 +5893,9 @@ function createRenderTask(
5730
5893
  formatContext: formatContext,
5731
5894
  context: context,
5732
5895
  treeContext: treeContext,
5896
+ row: row,
5733
5897
  componentStack: componentStack,
5734
- thenableState: thenableState,
5735
- isFallback: isFallback
5898
+ thenableState: thenableState
5736
5899
  };
5737
5900
  task.debugTask = debugTask;
5738
5901
  abortSet.add(task);
@@ -5751,8 +5914,8 @@ function createReplayTask(
5751
5914
  formatContext,
5752
5915
  context,
5753
5916
  treeContext,
5917
+ row,
5754
5918
  componentStack,
5755
- isFallback,
5756
5919
  legacyContext,
5757
5920
  debugTask
5758
5921
  ) {
@@ -5760,6 +5923,7 @@ function createReplayTask(
5760
5923
  null === blockedBoundary
5761
5924
  ? request.pendingRootTasks++
5762
5925
  : blockedBoundary.pendingTasks++;
5926
+ null !== row && row.pendingTasks++;
5763
5927
  replay.pendingTasks++;
5764
5928
  var task = {
5765
5929
  replay: replay,
@@ -5777,9 +5941,9 @@ function createReplayTask(
5777
5941
  formatContext: formatContext,
5778
5942
  context: context,
5779
5943
  treeContext: treeContext,
5944
+ row: row,
5780
5945
  componentStack: componentStack,
5781
- thenableState: thenableState,
5782
- isFallback: isFallback
5946
+ thenableState: thenableState
5783
5947
  };
5784
5948
  task.debugTask = debugTask;
5785
5949
  abortSet.add(task);
@@ -5852,6 +6016,27 @@ function getCurrentStackInDEV() {
5852
6016
  }
5853
6017
  return JSCompiler_inline_result$jscomp$0;
5854
6018
  }
6019
+ function pushHaltedAwaitOnComponentStack(task, debugInfo) {
6020
+ if (null != debugInfo)
6021
+ for (var i = debugInfo.length - 1; 0 <= i; i--) {
6022
+ var info = debugInfo[i];
6023
+ if ("string" === typeof info.name) break;
6024
+ if ("number" === typeof info.time) break;
6025
+ if (null != info.awaited) {
6026
+ var bestStack = null == info.debugStack ? info.awaited : info;
6027
+ if (void 0 !== bestStack.debugStack) {
6028
+ task.componentStack = {
6029
+ parent: task.componentStack,
6030
+ type: info,
6031
+ owner: bestStack.owner,
6032
+ stack: bestStack.debugStack
6033
+ };
6034
+ task.debugTask = bestStack.debugTask;
6035
+ break;
6036
+ }
6037
+ }
6038
+ }
6039
+ }
5855
6040
  function pushServerComponentStack(task, debugInfo) {
5856
6041
  if (null != debugInfo)
5857
6042
  for (var i = 0; i < debugInfo.length; i++) {
@@ -5892,6 +6077,18 @@ function pushComponentStack(task) {
5892
6077
  pushServerComponentStack(task, node._debugInfo);
5893
6078
  }
5894
6079
  }
6080
+ function replaceSuspenseComponentStackWithSuspenseFallbackStack(
6081
+ componentStack
6082
+ ) {
6083
+ return null === componentStack
6084
+ ? null
6085
+ : {
6086
+ parent: componentStack.parent,
6087
+ type: "Suspense Fallback",
6088
+ owner: componentStack.owner,
6089
+ stack: componentStack.stack
6090
+ };
6091
+ }
5895
6092
  function getThrownInfo(node$jscomp$0) {
5896
6093
  var errorInfo = {};
5897
6094
  node$jscomp$0 &&
@@ -5961,6 +6158,181 @@ function fatalError(request, error, errorInfo, debugTask) {
5961
6158
  ? ((request.status = CLOSED), closeWithError(request.destination, error))
5962
6159
  : ((request.status = 13), (request.fatalError = error));
5963
6160
  }
6161
+ function finishSuspenseListRow(request, row) {
6162
+ unblockSuspenseListRow(request, row.next, row.hoistables);
6163
+ }
6164
+ function unblockSuspenseListRow(request, unblockedRow, inheritedHoistables) {
6165
+ for (; null !== unblockedRow; ) {
6166
+ null !== inheritedHoistables &&
6167
+ (hoistHoistables(unblockedRow.hoistables, inheritedHoistables),
6168
+ (unblockedRow.inheritedHoistables = inheritedHoistables));
6169
+ var unblockedBoundaries = unblockedRow.boundaries;
6170
+ if (null !== unblockedBoundaries) {
6171
+ unblockedRow.boundaries = null;
6172
+ for (var i = 0; i < unblockedBoundaries.length; i++) {
6173
+ var unblockedBoundary = unblockedBoundaries[i];
6174
+ null !== inheritedHoistables &&
6175
+ hoistHoistables(unblockedBoundary.contentState, inheritedHoistables);
6176
+ finishedTask(request, unblockedBoundary, null, null);
6177
+ }
6178
+ }
6179
+ unblockedRow.pendingTasks--;
6180
+ if (0 < unblockedRow.pendingTasks) break;
6181
+ inheritedHoistables = unblockedRow.hoistables;
6182
+ unblockedRow = unblockedRow.next;
6183
+ }
6184
+ }
6185
+ function tryToResolveTogetherRow(request, togetherRow) {
6186
+ var boundaries = togetherRow.boundaries;
6187
+ if (null !== boundaries && togetherRow.pendingTasks === boundaries.length) {
6188
+ for (var allCompleteAndInlinable = !0, i = 0; i < boundaries.length; i++) {
6189
+ var rowBoundary = boundaries[i];
6190
+ if (
6191
+ 1 !== rowBoundary.pendingTasks ||
6192
+ rowBoundary.parentFlushed ||
6193
+ isEligibleForOutlining(request, rowBoundary)
6194
+ ) {
6195
+ allCompleteAndInlinable = !1;
6196
+ break;
6197
+ }
6198
+ }
6199
+ allCompleteAndInlinable &&
6200
+ unblockSuspenseListRow(request, togetherRow, togetherRow.hoistables);
6201
+ }
6202
+ }
6203
+ function createSuspenseListRow(previousRow) {
6204
+ var newRow = {
6205
+ pendingTasks: 1,
6206
+ boundaries: null,
6207
+ hoistables: createHoistableState(),
6208
+ inheritedHoistables: null,
6209
+ together: !1,
6210
+ next: null
6211
+ };
6212
+ null !== previousRow &&
6213
+ 0 < previousRow.pendingTasks &&
6214
+ (newRow.pendingTasks++,
6215
+ (newRow.boundaries = []),
6216
+ (previousRow.next = newRow));
6217
+ return newRow;
6218
+ }
6219
+ function renderSuspenseListRows(request, task, keyPath, rows, revealOrder) {
6220
+ var prevKeyPath = task.keyPath,
6221
+ prevTreeContext = task.treeContext,
6222
+ prevRow = task.row,
6223
+ previousComponentStack = task.componentStack;
6224
+ var previousDebugTask = task.debugTask;
6225
+ pushServerComponentStack(task, task.node.props.children._debugInfo);
6226
+ task.keyPath = keyPath;
6227
+ keyPath = rows.length;
6228
+ var previousSuspenseListRow = null;
6229
+ if (null !== task.replay) {
6230
+ var resumeSlots = task.replay.slots;
6231
+ if (null !== resumeSlots && "object" === typeof resumeSlots)
6232
+ for (var n = 0; n < keyPath; n++) {
6233
+ var i =
6234
+ "backwards" !== revealOrder &&
6235
+ "unstable_legacy-backwards" !== revealOrder
6236
+ ? n
6237
+ : keyPath - 1 - n,
6238
+ node = rows[i];
6239
+ task.row = previousSuspenseListRow = createSuspenseListRow(
6240
+ previousSuspenseListRow
6241
+ );
6242
+ task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);
6243
+ var resumeSegmentID = resumeSlots[i];
6244
+ "number" === typeof resumeSegmentID
6245
+ ? (resumeNode(request, task, resumeSegmentID, node, i),
6246
+ delete resumeSlots[i])
6247
+ : renderNode(request, task, node, i);
6248
+ 0 === --previousSuspenseListRow.pendingTasks &&
6249
+ finishSuspenseListRow(request, previousSuspenseListRow);
6250
+ }
6251
+ else
6252
+ for (resumeSlots = 0; resumeSlots < keyPath; resumeSlots++)
6253
+ (n =
6254
+ "backwards" !== revealOrder &&
6255
+ "unstable_legacy-backwards" !== revealOrder
6256
+ ? resumeSlots
6257
+ : keyPath - 1 - resumeSlots),
6258
+ (i = rows[n]),
6259
+ warnForMissingKey(request, task, i),
6260
+ (task.row = previousSuspenseListRow =
6261
+ createSuspenseListRow(previousSuspenseListRow)),
6262
+ (task.treeContext = pushTreeContext(prevTreeContext, keyPath, n)),
6263
+ renderNode(request, task, i, n),
6264
+ 0 === --previousSuspenseListRow.pendingTasks &&
6265
+ finishSuspenseListRow(request, previousSuspenseListRow);
6266
+ } else if (
6267
+ "backwards" !== revealOrder &&
6268
+ "unstable_legacy-backwards" !== revealOrder
6269
+ )
6270
+ for (revealOrder = 0; revealOrder < keyPath; revealOrder++)
6271
+ (resumeSlots = rows[revealOrder]),
6272
+ warnForMissingKey(request, task, resumeSlots),
6273
+ (task.row = previousSuspenseListRow =
6274
+ createSuspenseListRow(previousSuspenseListRow)),
6275
+ (task.treeContext = pushTreeContext(
6276
+ prevTreeContext,
6277
+ keyPath,
6278
+ revealOrder
6279
+ )),
6280
+ renderNode(request, task, resumeSlots, revealOrder),
6281
+ 0 === --previousSuspenseListRow.pendingTasks &&
6282
+ finishSuspenseListRow(request, previousSuspenseListRow);
6283
+ else {
6284
+ revealOrder = task.blockedSegment;
6285
+ resumeSlots = revealOrder.children.length;
6286
+ n = revealOrder.chunks.length;
6287
+ for (i = keyPath - 1; 0 <= i; i--) {
6288
+ node = rows[i];
6289
+ task.row = previousSuspenseListRow = createSuspenseListRow(
6290
+ previousSuspenseListRow
6291
+ );
6292
+ task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);
6293
+ resumeSegmentID = createPendingSegment(
6294
+ request,
6295
+ n,
6296
+ null,
6297
+ task.formatContext,
6298
+ 0 === i ? revealOrder.lastPushedText : !0,
6299
+ !0
6300
+ );
6301
+ revealOrder.children.splice(resumeSlots, 0, resumeSegmentID);
6302
+ task.blockedSegment = resumeSegmentID;
6303
+ warnForMissingKey(request, task, node);
6304
+ try {
6305
+ renderNode(request, task, node, i),
6306
+ pushSegmentFinale(
6307
+ resumeSegmentID.chunks,
6308
+ request.renderState,
6309
+ resumeSegmentID.lastPushedText,
6310
+ resumeSegmentID.textEmbedded
6311
+ ),
6312
+ (resumeSegmentID.status = COMPLETED),
6313
+ finishedSegment(request, task.blockedBoundary, resumeSegmentID),
6314
+ 0 === --previousSuspenseListRow.pendingTasks &&
6315
+ finishSuspenseListRow(request, previousSuspenseListRow);
6316
+ } catch (thrownValue) {
6317
+ throw (
6318
+ ((resumeSegmentID.status = 12 === request.status ? ABORTED : ERRORED),
6319
+ thrownValue)
6320
+ );
6321
+ }
6322
+ }
6323
+ task.blockedSegment = revealOrder;
6324
+ revealOrder.lastPushedText = !1;
6325
+ }
6326
+ null !== prevRow &&
6327
+ null !== previousSuspenseListRow &&
6328
+ 0 < previousSuspenseListRow.pendingTasks &&
6329
+ (prevRow.pendingTasks++, (previousSuspenseListRow.next = prevRow));
6330
+ task.treeContext = prevTreeContext;
6331
+ task.row = prevRow;
6332
+ task.keyPath = prevKeyPath;
6333
+ task.componentStack = previousComponentStack;
6334
+ task.debugTask = previousDebugTask;
6335
+ }
5964
6336
  function renderWithHooks(request, task, keyPath, Component, props, secondArg) {
5965
6337
  var prevThenableState = task.thenableState;
5966
6338
  task.thenableState = null;
@@ -6413,23 +6785,27 @@ function renderElement(request, task, keyPath, type, props, ref) {
6413
6785
  type.displayName || type.name || "Component"
6414
6786
  );
6415
6787
  if ("function" === typeof type.getDerivedStateFromProps) {
6416
- var _componentName2 = getComponentNameFromType(type) || "Unknown";
6417
- didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] ||
6788
+ var componentName$jscomp$4 =
6789
+ getComponentNameFromType(type) || "Unknown";
6790
+ didWarnAboutGetDerivedStateOnFunctionComponent[
6791
+ componentName$jscomp$4
6792
+ ] ||
6418
6793
  (console.error(
6419
6794
  "%s: Function components do not support getDerivedStateFromProps.",
6420
- _componentName2
6795
+ componentName$jscomp$4
6421
6796
  ),
6422
- (didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] =
6423
- !0));
6797
+ (didWarnAboutGetDerivedStateOnFunctionComponent[
6798
+ componentName$jscomp$4
6799
+ ] = !0));
6424
6800
  }
6425
6801
  if ("object" === typeof type.contextType && null !== type.contextType) {
6426
- var _componentName3 = getComponentNameFromType(type) || "Unknown";
6427
- didWarnAboutContextTypeOnFunctionComponent[_componentName3] ||
6802
+ var _componentName2 = getComponentNameFromType(type) || "Unknown";
6803
+ didWarnAboutContextTypeOnFunctionComponent[_componentName2] ||
6428
6804
  (console.error(
6429
6805
  "%s: Function components do not support contextType.",
6430
- _componentName3
6806
+ _componentName2
6431
6807
  ),
6432
- (didWarnAboutContextTypeOnFunctionComponent[_componentName3] = !0));
6808
+ (didWarnAboutContextTypeOnFunctionComponent[_componentName2] = !0));
6433
6809
  }
6434
6810
  finishFunctionComponent(
6435
6811
  request,
@@ -6462,15 +6838,14 @@ function renderElement(request, task, keyPath, type, props, ref) {
6462
6838
  task.blockedPreamble,
6463
6839
  task.hoistableState,
6464
6840
  task.formatContext,
6465
- segment.lastPushedText,
6466
- task.isFallback
6841
+ segment.lastPushedText
6467
6842
  );
6468
6843
  segment.lastPushedText = !1;
6469
- var _prevContext = task.formatContext,
6470
- _prevKeyPath2 = task.keyPath;
6844
+ var _prevContext2 = task.formatContext,
6845
+ _prevKeyPath3 = task.keyPath;
6471
6846
  task.keyPath = keyPath;
6472
6847
  if (
6473
- (task.formatContext = getChildFormatContext(_prevContext, type, props))
6848
+ (task.formatContext = getChildFormatContext(_prevContext2, type, props))
6474
6849
  .insertionMode === HTML_HEAD_MODE
6475
6850
  ) {
6476
6851
  var preambleSegment = createPendingSegment(
@@ -6482,30 +6857,24 @@ function renderElement(request, task, keyPath, type, props, ref) {
6482
6857
  !1
6483
6858
  );
6484
6859
  segment.preambleChildren.push(preambleSegment);
6485
- var preambleTask = createRenderTask(
6486
- request,
6487
- null,
6488
- _children,
6489
- -1,
6490
- task.blockedBoundary,
6491
- preambleSegment,
6492
- task.blockedPreamble,
6493
- task.hoistableState,
6494
- request.abortableTasks,
6495
- task.keyPath,
6496
- task.formatContext,
6497
- task.context,
6498
- task.treeContext,
6499
- task.componentStack,
6500
- task.isFallback,
6501
- emptyContextObject,
6502
- task.debugTask
6503
- );
6504
- pushComponentStack(preambleTask);
6505
- request.pingedTasks.push(preambleTask);
6860
+ task.blockedSegment = preambleSegment;
6861
+ try {
6862
+ (preambleSegment.status = 6),
6863
+ renderNode(request, task, _children, -1),
6864
+ pushSegmentFinale(
6865
+ preambleSegment.chunks,
6866
+ request.renderState,
6867
+ preambleSegment.lastPushedText,
6868
+ preambleSegment.textEmbedded
6869
+ ),
6870
+ (preambleSegment.status = COMPLETED),
6871
+ finishedSegment(request, task.blockedBoundary, preambleSegment);
6872
+ } finally {
6873
+ task.blockedSegment = segment;
6874
+ }
6506
6875
  } else renderNode(request, task, _children, -1);
6507
- task.formatContext = _prevContext;
6508
- task.keyPath = _prevKeyPath2;
6876
+ task.formatContext = _prevContext2;
6877
+ task.keyPath = _prevKeyPath3;
6509
6878
  a: {
6510
6879
  var target = segment.chunks,
6511
6880
  resumableState = request.resumableState;
@@ -6530,19 +6899,19 @@ function renderElement(request, task, keyPath, type, props, ref) {
6530
6899
  case "wbr":
6531
6900
  break a;
6532
6901
  case "body":
6533
- if (_prevContext.insertionMode <= HTML_HTML_MODE) {
6902
+ if (_prevContext2.insertionMode <= HTML_HTML_MODE) {
6534
6903
  resumableState.hasBody = !0;
6535
6904
  break a;
6536
6905
  }
6537
6906
  break;
6538
6907
  case "html":
6539
- if (_prevContext.insertionMode === ROOT_HTML_MODE) {
6908
+ if (_prevContext2.insertionMode === ROOT_HTML_MODE) {
6540
6909
  resumableState.hasHtml = !0;
6541
6910
  break a;
6542
6911
  }
6543
6912
  break;
6544
6913
  case "head":
6545
- if (_prevContext.insertionMode <= HTML_HTML_MODE) break a;
6914
+ if (_prevContext2.insertionMode <= HTML_HTML_MODE) break a;
6546
6915
  }
6547
6916
  target.push(endChunkForTag(type));
6548
6917
  }
@@ -6560,34 +6929,121 @@ function renderElement(request, task, keyPath, type, props, ref) {
6560
6929
  task.keyPath = prevKeyPath$jscomp$1;
6561
6930
  return;
6562
6931
  case REACT_ACTIVITY_TYPE:
6563
- if ("hidden" !== props.mode) {
6564
- var prevKeyPath$jscomp$2 = task.keyPath;
6932
+ var segment$jscomp$0 = task.blockedSegment;
6933
+ if (null === segment$jscomp$0) {
6934
+ if ("hidden" !== props.mode) {
6935
+ var prevKeyPath$jscomp$2 = task.keyPath;
6936
+ task.keyPath = keyPath;
6937
+ renderNode(request, task, props.children, -1);
6938
+ task.keyPath = prevKeyPath$jscomp$2;
6939
+ }
6940
+ } else if ("hidden" !== props.mode) {
6941
+ segment$jscomp$0.chunks.push("\x3c!--&--\x3e");
6942
+ segment$jscomp$0.lastPushedText = !1;
6943
+ var _prevKeyPath4 = task.keyPath;
6565
6944
  task.keyPath = keyPath;
6566
- renderNodeDestructive(request, task, props.children, -1);
6567
- task.keyPath = prevKeyPath$jscomp$2;
6945
+ renderNode(request, task, props.children, -1);
6946
+ task.keyPath = _prevKeyPath4;
6947
+ segment$jscomp$0.chunks.push("\x3c!--/&--\x3e");
6948
+ segment$jscomp$0.lastPushedText = !1;
6568
6949
  }
6569
6950
  return;
6570
6951
  case REACT_SUSPENSE_LIST_TYPE:
6571
- var _prevKeyPath3 = task.keyPath;
6572
- task.keyPath = keyPath;
6573
- renderNodeDestructive(request, task, props.children, -1);
6574
- task.keyPath = _prevKeyPath3;
6952
+ a: {
6953
+ var children$jscomp$0 = props.children,
6954
+ revealOrder = props.revealOrder;
6955
+ if (
6956
+ "forwards" === revealOrder ||
6957
+ "backwards" === revealOrder ||
6958
+ "unstable_legacy-backwards" === revealOrder
6959
+ ) {
6960
+ if (isArrayImpl(children$jscomp$0)) {
6961
+ renderSuspenseListRows(
6962
+ request,
6963
+ task,
6964
+ keyPath,
6965
+ children$jscomp$0,
6966
+ revealOrder
6967
+ );
6968
+ break a;
6969
+ }
6970
+ var iteratorFn = getIteratorFn(children$jscomp$0);
6971
+ if (iteratorFn) {
6972
+ var iterator = iteratorFn.call(children$jscomp$0);
6973
+ if (iterator) {
6974
+ validateIterable(
6975
+ task,
6976
+ children$jscomp$0,
6977
+ -1,
6978
+ iterator,
6979
+ iteratorFn
6980
+ );
6981
+ var step = iterator.next();
6982
+ if (!step.done) {
6983
+ var rows = [];
6984
+ do rows.push(step.value), (step = iterator.next());
6985
+ while (!step.done);
6986
+ renderSuspenseListRows(
6987
+ request,
6988
+ task,
6989
+ keyPath,
6990
+ children$jscomp$0,
6991
+ revealOrder
6992
+ );
6993
+ }
6994
+ break a;
6995
+ }
6996
+ }
6997
+ }
6998
+ if ("together" === revealOrder) {
6999
+ var _prevKeyPath2 = task.keyPath,
7000
+ prevRow = task.row,
7001
+ newRow = (task.row = createSuspenseListRow(null));
7002
+ newRow.boundaries = [];
7003
+ newRow.together = !0;
7004
+ task.keyPath = keyPath;
7005
+ renderNodeDestructive(request, task, children$jscomp$0, -1);
7006
+ 0 === --newRow.pendingTasks &&
7007
+ finishSuspenseListRow(request, newRow);
7008
+ task.keyPath = _prevKeyPath2;
7009
+ task.row = prevRow;
7010
+ null !== prevRow &&
7011
+ 0 < newRow.pendingTasks &&
7012
+ (prevRow.pendingTasks++, (newRow.next = prevRow));
7013
+ } else {
7014
+ var prevKeyPath$jscomp$3 = task.keyPath;
7015
+ task.keyPath = keyPath;
7016
+ renderNodeDestructive(request, task, children$jscomp$0, -1);
7017
+ task.keyPath = prevKeyPath$jscomp$3;
7018
+ }
7019
+ }
6575
7020
  return;
6576
7021
  case REACT_VIEW_TRANSITION_TYPE:
6577
7022
  case REACT_SCOPE_TYPE:
6578
7023
  throw Error("ReactDOMServer does not yet support scope components.");
6579
7024
  case REACT_SUSPENSE_TYPE:
6580
7025
  a: if (null !== task.replay) {
6581
- var _prevKeyPath = task.keyPath;
7026
+ var _prevKeyPath = task.keyPath,
7027
+ _prevContext = task.formatContext,
7028
+ _prevRow = task.row;
6582
7029
  task.keyPath = keyPath;
7030
+ task.formatContext = getSuspenseContentFormatContext(
7031
+ request.resumableState,
7032
+ _prevContext
7033
+ );
7034
+ task.row = null;
6583
7035
  var _content = props.children;
6584
7036
  try {
6585
7037
  renderNode(request, task, _content, -1);
6586
7038
  } finally {
6587
- task.keyPath = _prevKeyPath;
7039
+ (task.keyPath = _prevKeyPath),
7040
+ (task.formatContext = _prevContext),
7041
+ (task.row = _prevRow);
6588
7042
  }
6589
7043
  } else {
6590
- var prevKeyPath$jscomp$3 = task.keyPath,
7044
+ var prevKeyPath$jscomp$4 = task.keyPath,
7045
+ prevContext$jscomp$0 = task.formatContext,
7046
+ prevRow$jscomp$0 = task.row,
6591
7047
  parentBoundary = task.blockedBoundary,
6592
7048
  parentPreamble = task.blockedPreamble,
6593
7049
  parentHoistableState = task.hoistableState,
@@ -6599,11 +7055,18 @@ function renderElement(request, task, keyPath, type, props, ref) {
6599
7055
  task.formatContext.insertionMode < HTML_MODE
6600
7056
  ? createSuspenseBoundary(
6601
7057
  request,
7058
+ task.row,
6602
7059
  fallbackAbortSet,
6603
7060
  createPreambleState(),
6604
7061
  createPreambleState()
6605
7062
  )
6606
- : createSuspenseBoundary(request, fallbackAbortSet, null, null);
7063
+ : createSuspenseBoundary(
7064
+ request,
7065
+ task.row,
7066
+ fallbackAbortSet,
7067
+ null,
7068
+ null
7069
+ );
6607
7070
  null !== request.trackedPostpones &&
6608
7071
  (newBoundary.trackedContentKeyPath = keyPath);
6609
7072
  var boundarySegment = createPendingSegment(
@@ -6626,7 +7089,8 @@ function renderElement(request, task, keyPath, type, props, ref) {
6626
7089
  );
6627
7090
  contentRootSegment.parentFlushed = !0;
6628
7091
  if (null !== request.trackedPostpones) {
6629
- var fallbackKeyPath = [keyPath[0], "Suspense Fallback", keyPath[2]],
7092
+ var suspenseComponentStack = task.componentStack,
7093
+ fallbackKeyPath = [keyPath[0], "Suspense Fallback", keyPath[2]],
6630
7094
  fallbackReplayNode = [
6631
7095
  fallbackKeyPath[1],
6632
7096
  fallbackKeyPath[2],
@@ -6641,22 +7105,36 @@ function renderElement(request, task, keyPath, type, props, ref) {
6641
7105
  task.blockedSegment = boundarySegment;
6642
7106
  task.blockedPreamble = newBoundary.fallbackPreamble;
6643
7107
  task.keyPath = fallbackKeyPath;
7108
+ task.formatContext = getSuspenseFallbackFormatContext(
7109
+ request.resumableState,
7110
+ prevContext$jscomp$0
7111
+ );
7112
+ task.componentStack =
7113
+ replaceSuspenseComponentStackWithSuspenseFallbackStack(
7114
+ suspenseComponentStack
7115
+ );
6644
7116
  boundarySegment.status = 6;
6645
7117
  try {
6646
7118
  renderNode(request, task, fallback, -1),
6647
- boundarySegment.lastPushedText &&
6648
- boundarySegment.textEmbedded &&
6649
- boundarySegment.chunks.push("\x3c!-- --\x3e"),
6650
- (boundarySegment.status = COMPLETED);
7119
+ pushSegmentFinale(
7120
+ boundarySegment.chunks,
7121
+ request.renderState,
7122
+ boundarySegment.lastPushedText,
7123
+ boundarySegment.textEmbedded
7124
+ ),
7125
+ (boundarySegment.status = COMPLETED),
7126
+ finishedSegment(request, parentBoundary, boundarySegment);
6651
7127
  } catch (thrownValue) {
6652
7128
  throw (
6653
- ((boundarySegment.status = 12 === request.status ? 3 : 4),
7129
+ ((boundarySegment.status =
7130
+ 12 === request.status ? ABORTED : ERRORED),
6654
7131
  thrownValue)
6655
7132
  );
6656
7133
  } finally {
6657
7134
  (task.blockedSegment = parentSegment),
6658
7135
  (task.blockedPreamble = parentPreamble),
6659
- (task.keyPath = prevKeyPath$jscomp$3);
7136
+ (task.keyPath = prevKeyPath$jscomp$4),
7137
+ (task.formatContext = prevContext$jscomp$0);
6660
7138
  }
6661
7139
  var suspendedPrimaryTask = createRenderTask(
6662
7140
  request,
@@ -6669,11 +7147,14 @@ function renderElement(request, task, keyPath, type, props, ref) {
6669
7147
  newBoundary.contentState,
6670
7148
  task.abortSet,
6671
7149
  keyPath,
6672
- task.formatContext,
7150
+ getSuspenseContentFormatContext(
7151
+ request.resumableState,
7152
+ task.formatContext
7153
+ ),
6673
7154
  task.context,
6674
7155
  task.treeContext,
6675
- task.componentStack,
6676
- task.isFallback,
7156
+ null,
7157
+ suspenseComponentStack,
6677
7158
  emptyContextObject,
6678
7159
  task.debugTask
6679
7160
  );
@@ -6685,30 +7166,50 @@ function renderElement(request, task, keyPath, type, props, ref) {
6685
7166
  task.hoistableState = newBoundary.contentState;
6686
7167
  task.blockedSegment = contentRootSegment;
6687
7168
  task.keyPath = keyPath;
7169
+ task.formatContext = getSuspenseContentFormatContext(
7170
+ request.resumableState,
7171
+ prevContext$jscomp$0
7172
+ );
7173
+ task.row = null;
6688
7174
  contentRootSegment.status = 6;
6689
7175
  try {
6690
7176
  if (
6691
7177
  (renderNode(request, task, content, -1),
6692
- contentRootSegment.lastPushedText &&
6693
- contentRootSegment.textEmbedded &&
6694
- contentRootSegment.chunks.push("\x3c!-- --\x3e"),
7178
+ pushSegmentFinale(
7179
+ contentRootSegment.chunks,
7180
+ request.renderState,
7181
+ contentRootSegment.lastPushedText,
7182
+ contentRootSegment.textEmbedded
7183
+ ),
6695
7184
  (contentRootSegment.status = COMPLETED),
7185
+ finishedSegment(request, newBoundary, contentRootSegment),
6696
7186
  queueCompletedSegment(newBoundary, contentRootSegment),
6697
7187
  0 === newBoundary.pendingTasks &&
6698
7188
  newBoundary.status === PENDING)
6699
7189
  ) {
6700
- newBoundary.status = COMPLETED;
6701
- 0 === request.pendingRootTasks &&
6702
- task.blockedPreamble &&
6703
- preparePreamble(request);
6704
- break a;
6705
- }
7190
+ if (
7191
+ ((newBoundary.status = COMPLETED),
7192
+ !isEligibleForOutlining(request, newBoundary))
7193
+ ) {
7194
+ null !== prevRow$jscomp$0 &&
7195
+ 0 === --prevRow$jscomp$0.pendingTasks &&
7196
+ finishSuspenseListRow(request, prevRow$jscomp$0);
7197
+ 0 === request.pendingRootTasks &&
7198
+ task.blockedPreamble &&
7199
+ preparePreamble(request);
7200
+ break a;
7201
+ }
7202
+ } else
7203
+ null !== prevRow$jscomp$0 &&
7204
+ prevRow$jscomp$0.together &&
7205
+ tryToResolveTogetherRow(request, prevRow$jscomp$0);
6706
7206
  } catch (thrownValue$2) {
6707
7207
  newBoundary.status = CLIENT_RENDERED;
6708
7208
  if (12 === request.status) {
6709
- contentRootSegment.status = 3;
7209
+ contentRootSegment.status = ABORTED;
6710
7210
  var error = request.fatalError;
6711
- } else (contentRootSegment.status = 4), (error = thrownValue$2);
7211
+ } else
7212
+ (contentRootSegment.status = ERRORED), (error = thrownValue$2);
6712
7213
  var thrownInfo = getThrownInfo(task.componentStack);
6713
7214
  var errorDigest = logRecoverableError(
6714
7215
  request,
@@ -6729,7 +7230,9 @@ function renderElement(request, task, keyPath, type, props, ref) {
6729
7230
  (task.blockedPreamble = parentPreamble),
6730
7231
  (task.hoistableState = parentHoistableState),
6731
7232
  (task.blockedSegment = parentSegment),
6732
- (task.keyPath = prevKeyPath$jscomp$3);
7233
+ (task.keyPath = prevKeyPath$jscomp$4),
7234
+ (task.formatContext = prevContext$jscomp$0),
7235
+ (task.row = prevRow$jscomp$0);
6733
7236
  }
6734
7237
  var suspendedFallbackTask = createRenderTask(
6735
7238
  request,
@@ -6742,11 +7245,16 @@ function renderElement(request, task, keyPath, type, props, ref) {
6742
7245
  newBoundary.fallbackState,
6743
7246
  fallbackAbortSet,
6744
7247
  [keyPath[0], "Suspense Fallback", keyPath[2]],
6745
- task.formatContext,
7248
+ getSuspenseFallbackFormatContext(
7249
+ request.resumableState,
7250
+ task.formatContext
7251
+ ),
6746
7252
  task.context,
6747
7253
  task.treeContext,
6748
- task.componentStack,
6749
- !0,
7254
+ task.row,
7255
+ replaceSuspenseComponentStackWithSuspenseFallbackStack(
7256
+ task.componentStack
7257
+ ),
6750
7258
  emptyContextObject,
6751
7259
  task.debugTask
6752
7260
  );
@@ -6764,7 +7272,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
6764
7272
  for (var key in props)
6765
7273
  "ref" !== key && (propsWithoutRef[key] = props[key]);
6766
7274
  } else propsWithoutRef = props;
6767
- var children$jscomp$0 = renderWithHooks(
7275
+ var children$jscomp$1 = renderWithHooks(
6768
7276
  request,
6769
7277
  task,
6770
7278
  keyPath,
@@ -6776,7 +7284,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
6776
7284
  request,
6777
7285
  task,
6778
7286
  keyPath,
6779
- children$jscomp$0,
7287
+ children$jscomp$1,
6780
7288
  0 !== localIdCounter,
6781
7289
  actionStateCounter,
6782
7290
  actionStateMatchingIndex
@@ -6785,12 +7293,11 @@ function renderElement(request, task, keyPath, type, props, ref) {
6785
7293
  case REACT_MEMO_TYPE:
6786
7294
  renderElement(request, task, keyPath, type.type, props, ref);
6787
7295
  return;
6788
- case REACT_PROVIDER_TYPE:
6789
7296
  case REACT_CONTEXT_TYPE:
6790
7297
  var value$jscomp$0 = props.value,
6791
- children$jscomp$1 = props.children;
7298
+ children$jscomp$2 = props.children;
6792
7299
  var prevSnapshot = task.context;
6793
- var prevKeyPath$jscomp$4 = task.keyPath;
7300
+ var prevKeyPath$jscomp$5 = task.keyPath;
6794
7301
  var prevValue = type._currentValue;
6795
7302
  type._currentValue = value$jscomp$0;
6796
7303
  void 0 !== type._currentRenderer &&
@@ -6811,7 +7318,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
6811
7318
  currentActiveSnapshot = newNode;
6812
7319
  task.context = newNode;
6813
7320
  task.keyPath = keyPath;
6814
- renderNodeDestructive(request, task, children$jscomp$1, -1);
7321
+ renderNodeDestructive(request, task, children$jscomp$2, -1);
6815
7322
  var prevSnapshot$jscomp$0 = currentActiveSnapshot;
6816
7323
  if (null === prevSnapshot$jscomp$0)
6817
7324
  throw Error(
@@ -6833,7 +7340,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
6833
7340
  var JSCompiler_inline_result$jscomp$0 = (currentActiveSnapshot =
6834
7341
  prevSnapshot$jscomp$0.parent);
6835
7342
  task.context = JSCompiler_inline_result$jscomp$0;
6836
- task.keyPath = prevKeyPath$jscomp$4;
7343
+ task.keyPath = prevKeyPath$jscomp$5;
6837
7344
  prevSnapshot !== task.context &&
6838
7345
  console.error(
6839
7346
  "Popping the context provider did not return back to the original snapshot. This is a bug in React."
@@ -6847,10 +7354,10 @@ function renderElement(request, task, keyPath, type, props, ref) {
6847
7354
  "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."
6848
7355
  );
6849
7356
  var newChildren = render(context$jscomp$0._currentValue),
6850
- prevKeyPath$jscomp$5 = task.keyPath;
7357
+ prevKeyPath$jscomp$6 = task.keyPath;
6851
7358
  task.keyPath = keyPath;
6852
7359
  renderNodeDestructive(request, task, newChildren, -1);
6853
- task.keyPath = prevKeyPath$jscomp$5;
7360
+ task.keyPath = prevKeyPath$jscomp$6;
6854
7361
  return;
6855
7362
  case REACT_LAZY_TYPE:
6856
7363
  var Component = callLazyInitInDEV(type);
@@ -6891,6 +7398,7 @@ function resumeNode(request, task, segmentId, node, childIndex) {
6891
7398
  (task.blockedSegment = resumedSegment),
6892
7399
  renderNode(request, task, node, childIndex),
6893
7400
  (resumedSegment.status = COMPLETED),
7401
+ finishedSegment(request, blockedBoundary, resumedSegment),
6894
7402
  null === blockedBoundary
6895
7403
  ? (request.completedRootSegment = resumedSegment)
6896
7404
  : (queueCompletedSegment(blockedBoundary, resumedSegment),
@@ -6926,9 +7434,9 @@ function replayElement(
6926
7434
  ">. The tree doesn't match so React will fallback to client rendering."
6927
7435
  );
6928
7436
  var childNodes = node[2];
6929
- node = node[3];
6930
- name = task.node;
6931
- task.replay = { nodes: childNodes, slots: node, pendingTasks: 1 };
7437
+ name = node[3];
7438
+ keyOrIndex = task.node;
7439
+ task.replay = { nodes: childNodes, slots: name, pendingTasks: 1 };
6932
7440
  try {
6933
7441
  renderElement(request, task, keyPath, type, props, ref);
6934
7442
  if (1 === task.replay.pendingTasks && 0 < task.replay.nodes.length)
@@ -6942,21 +7450,26 @@ function replayElement(
6942
7450
  null !== x &&
6943
7451
  (x === SuspenseException || "function" === typeof x.then)
6944
7452
  )
6945
- throw (task.node === name && (task.replay = replay), x);
7453
+ throw (
7454
+ (task.node === keyOrIndex
7455
+ ? (task.replay = replay)
7456
+ : childIndex.splice(i, 1),
7457
+ x)
7458
+ );
6946
7459
  task.replay.pendingTasks--;
6947
7460
  type = getThrownInfo(task.componentStack);
6948
7461
  props = request;
6949
7462
  request = task.blockedBoundary;
6950
7463
  keyPath = x;
6951
- ref = node;
6952
- node = logRecoverableError(props, keyPath, type, task.debugTask);
7464
+ ref = name;
7465
+ name = logRecoverableError(props, keyPath, type, task.debugTask);
6953
7466
  abortRemainingReplayNodes(
6954
7467
  props,
6955
7468
  request,
6956
7469
  childNodes,
6957
7470
  ref,
6958
7471
  keyPath,
6959
- node,
7472
+ name,
6960
7473
  type,
6961
7474
  !1
6962
7475
  );
@@ -6971,12 +7484,14 @@ function replayElement(
6971
7484
  );
6972
7485
  a: {
6973
7486
  replay = void 0;
6974
- type = node[5];
6975
- ref = node[2];
6976
- name = node[3];
7487
+ name = node[5];
7488
+ type = node[2];
7489
+ ref = node[3];
6977
7490
  keyOrIndex = null === node[4] ? [] : node[4][2];
6978
7491
  node = null === node[4] ? null : node[4][3];
6979
7492
  var prevKeyPath = task.keyPath,
7493
+ prevContext = task.formatContext,
7494
+ prevRow = task.row,
6980
7495
  previousReplaySet = task.replay,
6981
7496
  parentBoundary = task.blockedBoundary,
6982
7497
  parentHoistableState = task.hoistableState,
@@ -6987,17 +7502,29 @@ function replayElement(
6987
7502
  task.formatContext.insertionMode < HTML_MODE
6988
7503
  ? createSuspenseBoundary(
6989
7504
  request,
7505
+ task.row,
6990
7506
  fallbackAbortSet,
6991
7507
  createPreambleState(),
6992
7508
  createPreambleState()
6993
7509
  )
6994
- : createSuspenseBoundary(request, fallbackAbortSet, null, null);
7510
+ : createSuspenseBoundary(
7511
+ request,
7512
+ task.row,
7513
+ fallbackAbortSet,
7514
+ null,
7515
+ null
7516
+ );
6995
7517
  props.parentFlushed = !0;
6996
- props.rootSegmentID = type;
7518
+ props.rootSegmentID = name;
6997
7519
  task.blockedBoundary = props;
6998
7520
  task.hoistableState = props.contentState;
6999
7521
  task.keyPath = keyPath;
7000
- task.replay = { nodes: ref, slots: name, pendingTasks: 1 };
7522
+ task.formatContext = getSuspenseContentFormatContext(
7523
+ request.resumableState,
7524
+ prevContext
7525
+ );
7526
+ task.row = null;
7527
+ task.replay = { nodes: type, slots: ref, pendingTasks: 1 };
7001
7528
  try {
7002
7529
  renderNode(request, task, content, -1);
7003
7530
  if (1 === task.replay.pendingTasks && 0 < task.replay.nodes.length)
@@ -7026,7 +7553,9 @@ function replayElement(
7026
7553
  (task.blockedBoundary = parentBoundary),
7027
7554
  (task.hoistableState = parentHoistableState),
7028
7555
  (task.replay = previousReplaySet),
7029
- (task.keyPath = prevKeyPath);
7556
+ (task.keyPath = prevKeyPath),
7557
+ (task.formatContext = prevContext),
7558
+ (task.row = prevRow);
7030
7559
  }
7031
7560
  props = createReplayTask(
7032
7561
  request,
@@ -7038,11 +7567,16 @@ function replayElement(
7038
7567
  props.fallbackState,
7039
7568
  fallbackAbortSet,
7040
7569
  [keyPath[0], "Suspense Fallback", keyPath[2]],
7041
- task.formatContext,
7570
+ getSuspenseFallbackFormatContext(
7571
+ request.resumableState,
7572
+ task.formatContext
7573
+ ),
7042
7574
  task.context,
7043
7575
  task.treeContext,
7044
- task.componentStack,
7045
- !0,
7576
+ task.row,
7577
+ replaceSuspenseComponentStackWithSuspenseFallbackStack(
7578
+ task.componentStack
7579
+ ),
7046
7580
  emptyContextObject,
7047
7581
  task.debugTask
7048
7582
  );
@@ -7055,6 +7589,29 @@ function replayElement(
7055
7589
  }
7056
7590
  }
7057
7591
  }
7592
+ function validateIterable(task, iterable, childIndex, iterator, iteratorFn) {
7593
+ if (iterator === iterable) {
7594
+ if (
7595
+ -1 !== childIndex ||
7596
+ null === task.componentStack ||
7597
+ "function" !== typeof task.componentStack.type ||
7598
+ "[object GeneratorFunction]" !==
7599
+ Object.prototype.toString.call(task.componentStack.type) ||
7600
+ "[object Generator]" !== Object.prototype.toString.call(iterator)
7601
+ )
7602
+ didWarnAboutGenerators ||
7603
+ console.error(
7604
+ "Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."
7605
+ ),
7606
+ (didWarnAboutGenerators = !0);
7607
+ } else
7608
+ iterable.entries !== iteratorFn ||
7609
+ didWarnAboutMaps ||
7610
+ (console.error(
7611
+ "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
7612
+ ),
7613
+ (didWarnAboutMaps = !0));
7614
+ }
7058
7615
  function renderNodeDestructive(request, task, node, childIndex) {
7059
7616
  null !== task.replay && "number" === typeof task.replay.slots
7060
7617
  ? resumeNode(request, task, task.replay.slots, node, childIndex)
@@ -7131,52 +7688,27 @@ function retryNode(request, task) {
7131
7688
  "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."
7132
7689
  );
7133
7690
  case REACT_LAZY_TYPE:
7134
- node = callLazyInitInDEV(node);
7691
+ type = callLazyInitInDEV(node);
7135
7692
  if (12 === request.status) throw null;
7136
- renderNodeDestructive(request, task, node, childIndex);
7693
+ renderNodeDestructive(request, task, type, childIndex);
7137
7694
  return;
7138
7695
  }
7139
7696
  if (isArrayImpl(node)) {
7140
7697
  renderChildrenArray(request, task, node, childIndex);
7141
7698
  return;
7142
7699
  }
7143
- null === node || "object" !== typeof node
7144
- ? (key = null)
7145
- : ((type =
7146
- (MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) ||
7147
- node["@@iterator"]),
7148
- (key = "function" === typeof type ? type : null));
7149
- if (key && (type = key.call(node))) {
7150
- if (type === node) {
7151
- if (
7152
- -1 !== childIndex ||
7153
- null === task.componentStack ||
7154
- "function" !== typeof task.componentStack.type ||
7155
- "[object GeneratorFunction]" !==
7156
- Object.prototype.toString.call(task.componentStack.type) ||
7157
- "[object Generator]" !== Object.prototype.toString.call(type)
7158
- )
7159
- didWarnAboutGenerators ||
7160
- console.error(
7161
- "Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."
7162
- ),
7163
- (didWarnAboutGenerators = !0);
7164
- } else
7165
- node.entries !== key ||
7166
- didWarnAboutMaps ||
7167
- (console.error(
7168
- "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
7169
- ),
7170
- (didWarnAboutMaps = !0));
7171
- node = type.next();
7172
- if (!node.done) {
7173
- key = [];
7174
- do key.push(node.value), (node = type.next());
7175
- while (!node.done);
7176
- renderChildrenArray(request, task, key, childIndex);
7700
+ if ((key = getIteratorFn(node)))
7701
+ if ((type = key.call(node))) {
7702
+ validateIterable(task, node, childIndex, type, key);
7703
+ node = type.next();
7704
+ if (!node.done) {
7705
+ key = [];
7706
+ do key.push(node.value), (node = type.next());
7707
+ while (!node.done);
7708
+ renderChildrenArray(request, task, key, childIndex);
7709
+ }
7710
+ return;
7177
7711
  }
7178
- return;
7179
- }
7180
7712
  if ("function" === typeof node.then)
7181
7713
  return (
7182
7714
  (task.thenableState = null),
@@ -7230,6 +7762,67 @@ function retryNode(request, task) {
7230
7762
  ));
7231
7763
  }
7232
7764
  }
7765
+ function warnForMissingKey(request, task, child) {
7766
+ if (
7767
+ null !== child &&
7768
+ "object" === typeof child &&
7769
+ (child.$$typeof === REACT_ELEMENT_TYPE ||
7770
+ child.$$typeof === REACT_PORTAL_TYPE) &&
7771
+ child._store &&
7772
+ ((!child._store.validated && null == child.key) ||
7773
+ 2 === child._store.validated)
7774
+ ) {
7775
+ if ("object" !== typeof child._store)
7776
+ throw Error(
7777
+ "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."
7778
+ );
7779
+ child._store.validated = 1;
7780
+ var didWarnForKey = request.didWarnForKey;
7781
+ null == didWarnForKey &&
7782
+ (didWarnForKey = request.didWarnForKey = new WeakSet());
7783
+ request = task.componentStack;
7784
+ if (null !== request && !didWarnForKey.has(request)) {
7785
+ didWarnForKey.add(request);
7786
+ var componentName = getComponentNameFromType(child.type);
7787
+ didWarnForKey = child._owner;
7788
+ var parentOwner = request.owner;
7789
+ request = "";
7790
+ if (parentOwner && "undefined" !== typeof parentOwner.type) {
7791
+ var name = getComponentNameFromType(parentOwner.type);
7792
+ name && (request = "\n\nCheck the render method of `" + name + "`.");
7793
+ }
7794
+ request ||
7795
+ (componentName &&
7796
+ (request =
7797
+ "\n\nCheck the top-level render call using <" +
7798
+ componentName +
7799
+ ">."));
7800
+ componentName = "";
7801
+ null != didWarnForKey &&
7802
+ parentOwner !== didWarnForKey &&
7803
+ ((parentOwner = null),
7804
+ "undefined" !== typeof didWarnForKey.type
7805
+ ? (parentOwner = getComponentNameFromType(didWarnForKey.type))
7806
+ : "string" === typeof didWarnForKey.name &&
7807
+ (parentOwner = didWarnForKey.name),
7808
+ parentOwner &&
7809
+ (componentName = " It was passed a child from " + parentOwner + "."));
7810
+ didWarnForKey = task.componentStack;
7811
+ task.componentStack = {
7812
+ parent: task.componentStack,
7813
+ type: child.type,
7814
+ owner: child._owner,
7815
+ stack: child._debugStack
7816
+ };
7817
+ console.error(
7818
+ 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
7819
+ request,
7820
+ componentName
7821
+ );
7822
+ task.componentStack = didWarnForKey;
7823
+ }
7824
+ }
7825
+ }
7233
7826
  function renderChildrenArray(request, task, children, childIndex) {
7234
7827
  var prevKeyPath = task.keyPath,
7235
7828
  previousComponentStack = task.componentStack;
@@ -7316,80 +7909,115 @@ function renderChildrenArray(request, task, children, childIndex) {
7316
7909
  task.debugTask = previousDebugTask;
7317
7910
  return;
7318
7911
  }
7319
- for (j = 0; j < replayNodes; j++) {
7320
- childIndex = children[j];
7321
- resumeSlots = request;
7322
- node = task;
7323
- error = childIndex;
7324
- if (
7325
- null !== error &&
7326
- "object" === typeof error &&
7327
- (error.$$typeof === REACT_ELEMENT_TYPE ||
7328
- error.$$typeof === REACT_PORTAL_TYPE) &&
7329
- error._store &&
7330
- ((!error._store.validated && null == error.key) ||
7331
- 2 === error._store.validated)
7332
- ) {
7333
- if ("object" !== typeof error._store)
7334
- throw Error(
7335
- "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."
7336
- );
7337
- error._store.validated = 1;
7338
- thrownInfo = resumeSlots.didWarnForKey;
7339
- null == thrownInfo &&
7340
- (thrownInfo = resumeSlots.didWarnForKey = new WeakSet());
7341
- resumeSlots = node.componentStack;
7342
- if (null !== resumeSlots && !thrownInfo.has(resumeSlots)) {
7343
- thrownInfo.add(resumeSlots);
7344
- var componentName = getComponentNameFromType(error.type);
7345
- thrownInfo = error._owner;
7346
- var parentOwner = resumeSlots.owner;
7347
- resumeSlots = "";
7348
- if (parentOwner && "undefined" !== typeof parentOwner.type) {
7349
- var name = getComponentNameFromType(parentOwner.type);
7350
- name &&
7351
- (resumeSlots = "\n\nCheck the render method of `" + name + "`.");
7352
- }
7353
- resumeSlots ||
7354
- (componentName &&
7355
- (resumeSlots =
7356
- "\n\nCheck the top-level render call using <" +
7357
- componentName +
7358
- ">."));
7359
- componentName = "";
7360
- null != thrownInfo &&
7361
- parentOwner !== thrownInfo &&
7362
- ((parentOwner = null),
7363
- "undefined" !== typeof thrownInfo.type
7364
- ? (parentOwner = getComponentNameFromType(thrownInfo.type))
7365
- : "string" === typeof thrownInfo.name &&
7366
- (parentOwner = thrownInfo.name),
7367
- parentOwner &&
7368
- (componentName =
7369
- " It was passed a child from " + parentOwner + "."));
7370
- thrownInfo = node.componentStack;
7371
- node.componentStack = {
7372
- parent: node.componentStack,
7373
- type: error.type,
7374
- owner: error._owner,
7375
- stack: error._debugStack
7376
- };
7377
- console.error(
7378
- 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
7379
- resumeSlots,
7380
- componentName
7381
- );
7382
- node.componentStack = thrownInfo;
7383
- }
7384
- }
7385
- task.treeContext = pushTreeContext(replay, replayNodes, j);
7386
- renderNode(request, task, childIndex, j);
7387
- }
7912
+ for (j = 0; j < replayNodes; j++)
7913
+ (childIndex = children[j]),
7914
+ warnForMissingKey(request, task, childIndex),
7915
+ (task.treeContext = pushTreeContext(replay, replayNodes, j)),
7916
+ renderNode(request, task, childIndex, j);
7388
7917
  task.treeContext = replay;
7389
7918
  task.keyPath = prevKeyPath;
7390
7919
  task.componentStack = previousComponentStack;
7391
7920
  task.debugTask = previousDebugTask;
7392
7921
  }
7922
+ function trackPostponedBoundary(request, trackedPostpones, boundary) {
7923
+ boundary.status = POSTPONED;
7924
+ boundary.rootSegmentID = request.nextSegmentId++;
7925
+ request = boundary.trackedContentKeyPath;
7926
+ if (null === request)
7927
+ throw Error(
7928
+ "It should not be possible to postpone at the root. This is a bug in React."
7929
+ );
7930
+ var fallbackReplayNode = boundary.trackedFallbackNode,
7931
+ children = [],
7932
+ boundaryNode = trackedPostpones.workingMap.get(request);
7933
+ if (void 0 === boundaryNode)
7934
+ return (
7935
+ (boundary = [
7936
+ request[1],
7937
+ request[2],
7938
+ children,
7939
+ null,
7940
+ fallbackReplayNode,
7941
+ boundary.rootSegmentID
7942
+ ]),
7943
+ trackedPostpones.workingMap.set(request, boundary),
7944
+ addToReplayParent(boundary, request[0], trackedPostpones),
7945
+ boundary
7946
+ );
7947
+ boundaryNode[4] = fallbackReplayNode;
7948
+ boundaryNode[5] = boundary.rootSegmentID;
7949
+ return boundaryNode;
7950
+ }
7951
+ function trackPostpone(request, trackedPostpones, task, segment) {
7952
+ segment.status = POSTPONED;
7953
+ var keyPath = task.keyPath,
7954
+ boundary = task.blockedBoundary;
7955
+ if (null === boundary)
7956
+ (segment.id = request.nextSegmentId++),
7957
+ (trackedPostpones.rootSlots = segment.id),
7958
+ null !== request.completedRootSegment &&
7959
+ (request.completedRootSegment.status = POSTPONED);
7960
+ else {
7961
+ if (null !== boundary && boundary.status === PENDING) {
7962
+ var boundaryNode = trackPostponedBoundary(
7963
+ request,
7964
+ trackedPostpones,
7965
+ boundary
7966
+ );
7967
+ if (
7968
+ boundary.trackedContentKeyPath === keyPath &&
7969
+ -1 === task.childIndex
7970
+ ) {
7971
+ -1 === segment.id &&
7972
+ (segment.id = segment.parentFlushed
7973
+ ? boundary.rootSegmentID
7974
+ : request.nextSegmentId++);
7975
+ boundaryNode[3] = segment.id;
7976
+ return;
7977
+ }
7978
+ }
7979
+ -1 === segment.id &&
7980
+ (segment.id =
7981
+ segment.parentFlushed && null !== boundary
7982
+ ? boundary.rootSegmentID
7983
+ : request.nextSegmentId++);
7984
+ if (-1 === task.childIndex)
7985
+ null === keyPath
7986
+ ? (trackedPostpones.rootSlots = segment.id)
7987
+ : ((task = trackedPostpones.workingMap.get(keyPath)),
7988
+ void 0 === task
7989
+ ? ((task = [keyPath[1], keyPath[2], [], segment.id]),
7990
+ addToReplayParent(task, keyPath[0], trackedPostpones))
7991
+ : (task[3] = segment.id));
7992
+ else {
7993
+ if (null === keyPath)
7994
+ if (((request = trackedPostpones.rootSlots), null === request))
7995
+ request = trackedPostpones.rootSlots = {};
7996
+ else {
7997
+ if ("number" === typeof request)
7998
+ throw Error(
7999
+ "It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React."
8000
+ );
8001
+ }
8002
+ else if (
8003
+ ((boundary = trackedPostpones.workingMap),
8004
+ (boundaryNode = boundary.get(keyPath)),
8005
+ void 0 === boundaryNode)
8006
+ )
8007
+ (request = {}),
8008
+ (boundaryNode = [keyPath[1], keyPath[2], [], request]),
8009
+ boundary.set(keyPath, boundaryNode),
8010
+ addToReplayParent(boundaryNode, keyPath[0], trackedPostpones);
8011
+ else if (((request = boundaryNode[3]), null === request))
8012
+ request = boundaryNode[3] = {};
8013
+ else if ("number" === typeof request)
8014
+ throw Error(
8015
+ "It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React."
8016
+ );
8017
+ request[task.childIndex] = segment.id;
8018
+ }
8019
+ }
8020
+ }
7393
8021
  function untrackBoundary(request, boundary) {
7394
8022
  request = request.trackedPostpones;
7395
8023
  null !== request &&
@@ -7413,8 +8041,8 @@ function spawnNewSuspendedReplayTask(request, task, thenableState) {
7413
8041
  task.formatContext,
7414
8042
  task.context,
7415
8043
  task.treeContext,
8044
+ task.row,
7416
8045
  task.componentStack,
7417
- task.isFallback,
7418
8046
  emptyContextObject,
7419
8047
  task.debugTask
7420
8048
  );
@@ -7445,8 +8073,8 @@ function spawnNewSuspendedRenderTask(request, task, thenableState) {
7445
8073
  task.formatContext,
7446
8074
  task.context,
7447
8075
  task.treeContext,
8076
+ task.row,
7448
8077
  task.componentStack,
7449
- task.isFallback,
7450
8078
  emptyContextObject,
7451
8079
  task.debugTask
7452
8080
  );
@@ -7459,7 +8087,8 @@ function renderNode(request, task, node, childIndex) {
7459
8087
  previousComponentStack = task.componentStack,
7460
8088
  previousDebugTask = task.debugTask,
7461
8089
  segment = task.blockedSegment;
7462
- if (null === segment)
8090
+ if (null === segment) {
8091
+ segment = task.replay;
7463
8092
  try {
7464
8093
  return renderNodeDestructive(request, task, node, childIndex);
7465
8094
  } catch (thrownValue) {
@@ -7469,10 +8098,13 @@ function renderNode(request, task, node, childIndex) {
7469
8098
  thrownValue === SuspenseException
7470
8099
  ? getSuspendedThenable()
7471
8100
  : thrownValue),
7472
- "object" === typeof node && null !== node)
8101
+ 12 !== request.status && "object" === typeof node && null !== node)
7473
8102
  ) {
7474
8103
  if ("function" === typeof node.then) {
7475
- childIndex = getThenableStateAfterSuspending();
8104
+ childIndex =
8105
+ thrownValue === SuspenseException
8106
+ ? getThenableStateAfterSuspending()
8107
+ : null;
7476
8108
  request = spawnNewSuspendedReplayTask(request, task, childIndex).ping;
7477
8109
  node.then(request, request);
7478
8110
  task.formatContext = previousFormatContext;
@@ -7480,12 +8112,16 @@ function renderNode(request, task, node, childIndex) {
7480
8112
  task.keyPath = previousKeyPath;
7481
8113
  task.treeContext = previousTreeContext;
7482
8114
  task.componentStack = previousComponentStack;
8115
+ task.replay = segment;
7483
8116
  task.debugTask = previousDebugTask;
7484
8117
  switchContext(previousContext);
7485
8118
  return;
7486
8119
  }
7487
8120
  if ("Maximum call stack size exceeded" === node.message) {
7488
- node = getThenableStateAfterSuspending();
8121
+ node =
8122
+ thrownValue === SuspenseException
8123
+ ? getThenableStateAfterSuspending()
8124
+ : null;
7489
8125
  node = spawnNewSuspendedReplayTask(request, task, node);
7490
8126
  request.pingedTasks.push(node);
7491
8127
  task.formatContext = previousFormatContext;
@@ -7493,13 +8129,14 @@ function renderNode(request, task, node, childIndex) {
7493
8129
  task.keyPath = previousKeyPath;
7494
8130
  task.treeContext = previousTreeContext;
7495
8131
  task.componentStack = previousComponentStack;
8132
+ task.replay = segment;
7496
8133
  task.debugTask = previousDebugTask;
7497
8134
  switchContext(previousContext);
7498
8135
  return;
7499
8136
  }
7500
8137
  }
7501
8138
  }
7502
- else {
8139
+ } else {
7503
8140
  var childrenLength = segment.children.length,
7504
8141
  chunkLength = segment.chunks.length;
7505
8142
  try {
@@ -7513,12 +8150,16 @@ function renderNode(request, task, node, childIndex) {
7513
8150
  thrownValue$3 === SuspenseException
7514
8151
  ? getSuspendedThenable()
7515
8152
  : thrownValue$3),
7516
- "object" === typeof node && null !== node)
8153
+ 12 !== request.status && "object" === typeof node && null !== node)
7517
8154
  ) {
7518
8155
  if ("function" === typeof node.then) {
7519
- childIndex = getThenableStateAfterSuspending();
7520
- request = spawnNewSuspendedRenderTask(request, task, childIndex).ping;
7521
- node.then(request, request);
8156
+ segment = node;
8157
+ node =
8158
+ thrownValue$3 === SuspenseException
8159
+ ? getThenableStateAfterSuspending()
8160
+ : null;
8161
+ request = spawnNewSuspendedRenderTask(request, task, node).ping;
8162
+ segment.then(request, request);
7522
8163
  task.formatContext = previousFormatContext;
7523
8164
  task.context = previousContext;
7524
8165
  task.keyPath = previousKeyPath;
@@ -7529,9 +8170,12 @@ function renderNode(request, task, node, childIndex) {
7529
8170
  return;
7530
8171
  }
7531
8172
  if ("Maximum call stack size exceeded" === node.message) {
7532
- node = getThenableStateAfterSuspending();
7533
- node = spawnNewSuspendedRenderTask(request, task, node);
7534
- request.pingedTasks.push(node);
8173
+ segment =
8174
+ thrownValue$3 === SuspenseException
8175
+ ? getThenableStateAfterSuspending()
8176
+ : null;
8177
+ segment = spawnNewSuspendedRenderTask(request, task, segment);
8178
+ request.pingedTasks.push(segment);
7535
8179
  task.formatContext = previousFormatContext;
7536
8180
  task.context = previousContext;
7537
8181
  task.keyPath = previousKeyPath;
@@ -7552,9 +8196,11 @@ function renderNode(request, task, node, childIndex) {
7552
8196
  throw node;
7553
8197
  }
7554
8198
  function abortTaskSoft(task) {
7555
- var boundary = task.blockedBoundary;
7556
- task = task.blockedSegment;
7557
- null !== task && ((task.status = 3), finishedTask(this, boundary, task));
8199
+ var boundary = task.blockedBoundary,
8200
+ segment = task.blockedSegment;
8201
+ null !== segment &&
8202
+ ((segment.status = ABORTED),
8203
+ finishedTask(this, boundary, task.row, segment));
7558
8204
  }
7559
8205
  function abortRemainingReplayNodes(
7560
8206
  request$jscomp$0,
@@ -7588,6 +8234,7 @@ function abortRemainingReplayNodes(
7588
8234
  wasAborted = aborted,
7589
8235
  resumedBoundary = createSuspenseBoundary(
7590
8236
  request,
8237
+ null,
7591
8238
  new Set(),
7592
8239
  null,
7593
8240
  null
@@ -7631,48 +8278,77 @@ function abortTask(task, request, error) {
7631
8278
  segment = task.blockedSegment;
7632
8279
  if (null !== segment) {
7633
8280
  if (6 === segment.status) return;
7634
- segment.status = 3;
8281
+ segment.status = ABORTED;
7635
8282
  }
7636
- segment = getThrownInfo(task.componentStack);
8283
+ var errorInfo = getThrownInfo(task.componentStack),
8284
+ node = task.node;
8285
+ null !== node &&
8286
+ "object" === typeof node &&
8287
+ pushHaltedAwaitOnComponentStack(task, node._debugInfo);
7637
8288
  if (null === boundary) {
7638
8289
  if (13 !== request.status && request.status !== CLOSED) {
7639
8290
  boundary = task.replay;
7640
8291
  if (null === boundary) {
7641
- logRecoverableError(request, error, segment, null);
7642
- fatalError(request, error, segment, null);
8292
+ null !== request.trackedPostpones && null !== segment
8293
+ ? ((boundary = request.trackedPostpones),
8294
+ logRecoverableError(request, error, errorInfo, task.debugTask),
8295
+ trackPostpone(request, boundary, task, segment),
8296
+ finishedTask(request, null, task.row, segment))
8297
+ : (logRecoverableError(request, error, errorInfo, task.debugTask),
8298
+ fatalError(request, error, errorInfo, task.debugTask));
7643
8299
  return;
7644
8300
  }
7645
8301
  boundary.pendingTasks--;
7646
8302
  0 === boundary.pendingTasks &&
7647
8303
  0 < boundary.nodes.length &&
7648
- ((task = logRecoverableError(request, error, segment, null)),
8304
+ ((segment = logRecoverableError(request, error, errorInfo, null)),
7649
8305
  abortRemainingReplayNodes(
7650
8306
  request,
7651
8307
  null,
7652
8308
  boundary.nodes,
7653
8309
  boundary.slots,
7654
8310
  error,
7655
- task,
7656
8311
  segment,
8312
+ errorInfo,
7657
8313
  !0
7658
8314
  ));
7659
8315
  request.pendingRootTasks--;
7660
8316
  0 === request.pendingRootTasks && completeShell(request);
7661
8317
  }
7662
- } else
7663
- boundary.pendingTasks--,
7664
- boundary.status !== CLIENT_RENDERED &&
7665
- ((boundary.status = CLIENT_RENDERED),
7666
- (task = logRecoverableError(request, error, segment, null)),
7667
- (boundary.status = CLIENT_RENDERED),
7668
- encodeErrorForBoundary(boundary, task, error, segment, !0),
7669
- untrackBoundary(request, boundary),
7670
- boundary.parentFlushed &&
7671
- request.clientRenderedBoundaries.push(boundary)),
7672
- boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
7673
- return abortTask(fallbackTask, request, error);
7674
- }),
7675
- boundary.fallbackAbortableTasks.clear();
8318
+ } else {
8319
+ node = request.trackedPostpones;
8320
+ if (boundary.status !== CLIENT_RENDERED) {
8321
+ if (null !== node && null !== segment)
8322
+ return (
8323
+ logRecoverableError(request, error, errorInfo, task.debugTask),
8324
+ trackPostpone(request, node, task, segment),
8325
+ boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
8326
+ return abortTask(fallbackTask, request, error);
8327
+ }),
8328
+ boundary.fallbackAbortableTasks.clear(),
8329
+ finishedTask(request, boundary, task.row, segment)
8330
+ );
8331
+ boundary.status = CLIENT_RENDERED;
8332
+ segment = logRecoverableError(request, error, errorInfo, task.debugTask);
8333
+ boundary.status = CLIENT_RENDERED;
8334
+ encodeErrorForBoundary(boundary, segment, error, errorInfo, !0);
8335
+ untrackBoundary(request, boundary);
8336
+ boundary.parentFlushed && request.clientRenderedBoundaries.push(boundary);
8337
+ }
8338
+ boundary.pendingTasks--;
8339
+ errorInfo = boundary.row;
8340
+ null !== errorInfo &&
8341
+ 0 === --errorInfo.pendingTasks &&
8342
+ finishSuspenseListRow(request, errorInfo);
8343
+ boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
8344
+ return abortTask(fallbackTask, request, error);
8345
+ });
8346
+ boundary.fallbackAbortableTasks.clear();
8347
+ }
8348
+ task = task.row;
8349
+ null !== task &&
8350
+ 0 === --task.pendingTasks &&
8351
+ finishSuspenseListRow(request, task);
7676
8352
  request.allPendingTasks--;
7677
8353
  0 === request.allPendingTasks && completeAll(request);
7678
8354
  }
@@ -7766,11 +8442,28 @@ function queueCompletedSegment(boundary, segment) {
7766
8442
  var childSegment = segment.children[0];
7767
8443
  childSegment.id = segment.id;
7768
8444
  childSegment.parentFlushed = !0;
7769
- childSegment.status === COMPLETED &&
8445
+ (childSegment.status !== COMPLETED &&
8446
+ childSegment.status !== ABORTED &&
8447
+ childSegment.status !== ERRORED) ||
7770
8448
  queueCompletedSegment(boundary, childSegment);
7771
8449
  } else boundary.completedSegments.push(segment);
7772
8450
  }
7773
- function finishedTask(request, boundary, segment) {
8451
+ function finishedSegment(request, boundary, segment) {
8452
+ if (null !== byteLengthOfChunk) {
8453
+ segment = segment.chunks;
8454
+ for (var segmentByteSize = 0, i = 0; i < segment.length; i++)
8455
+ segmentByteSize += byteLengthOfChunk(segment[i]);
8456
+ null === boundary
8457
+ ? (request.byteSize += segmentByteSize)
8458
+ : (boundary.byteSize += segmentByteSize);
8459
+ }
8460
+ }
8461
+ function finishedTask(request, boundary, row, segment) {
8462
+ null !== row &&
8463
+ (0 === --row.pendingTasks
8464
+ ? finishSuspenseListRow(request, row)
8465
+ : row.together && tryToResolveTogetherRow(request, row));
8466
+ request.allPendingTasks--;
7774
8467
  if (null === boundary) {
7775
8468
  if (null !== segment && segment.parentFlushed) {
7776
8469
  if (null !== request.completedRootSegment)
@@ -7781,32 +8474,68 @@ function finishedTask(request, boundary, segment) {
7781
8474
  }
7782
8475
  request.pendingRootTasks--;
7783
8476
  0 === request.pendingRootTasks && completeShell(request);
7784
- } else
7785
- boundary.pendingTasks--,
7786
- boundary.status !== CLIENT_RENDERED &&
7787
- (0 === boundary.pendingTasks
7788
- ? (boundary.status === PENDING && (boundary.status = COMPLETED),
7789
- null !== segment &&
7790
- segment.parentFlushed &&
7791
- segment.status === COMPLETED &&
7792
- queueCompletedSegment(boundary, segment),
7793
- boundary.parentFlushed &&
7794
- request.completedBoundaries.push(boundary),
7795
- boundary.status === COMPLETED &&
7796
- (boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request),
7797
- boundary.fallbackAbortableTasks.clear(),
7798
- 0 === request.pendingRootTasks &&
7799
- null === request.trackedPostpones &&
7800
- null !== boundary.contentPreamble &&
7801
- preparePreamble(request)))
7802
- : null !== segment &&
7803
- segment.parentFlushed &&
7804
- segment.status === COMPLETED &&
7805
- (queueCompletedSegment(boundary, segment),
7806
- 1 === boundary.completedSegments.length &&
7807
- boundary.parentFlushed &&
7808
- request.partialBoundaries.push(boundary)));
7809
- request.allPendingTasks--;
8477
+ } else if ((boundary.pendingTasks--, boundary.status !== CLIENT_RENDERED))
8478
+ if (0 === boundary.pendingTasks)
8479
+ if (
8480
+ (boundary.status === PENDING && (boundary.status = COMPLETED),
8481
+ null !== segment &&
8482
+ segment.parentFlushed &&
8483
+ (segment.status === COMPLETED || segment.status === ABORTED) &&
8484
+ queueCompletedSegment(boundary, segment),
8485
+ boundary.parentFlushed && request.completedBoundaries.push(boundary),
8486
+ boundary.status === COMPLETED)
8487
+ )
8488
+ (row = boundary.row),
8489
+ null !== row &&
8490
+ hoistHoistables(row.hoistables, boundary.contentState),
8491
+ isEligibleForOutlining(request, boundary) ||
8492
+ (boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request),
8493
+ boundary.fallbackAbortableTasks.clear(),
8494
+ null !== row &&
8495
+ 0 === --row.pendingTasks &&
8496
+ finishSuspenseListRow(request, row)),
8497
+ 0 === request.pendingRootTasks &&
8498
+ null === request.trackedPostpones &&
8499
+ null !== boundary.contentPreamble &&
8500
+ preparePreamble(request);
8501
+ else {
8502
+ if (
8503
+ boundary.status === POSTPONED &&
8504
+ ((boundary = boundary.row), null !== boundary)
8505
+ ) {
8506
+ if (null !== request.trackedPostpones) {
8507
+ row = request.trackedPostpones;
8508
+ var postponedRow = boundary.next;
8509
+ if (
8510
+ null !== postponedRow &&
8511
+ ((segment = postponedRow.boundaries), null !== segment)
8512
+ )
8513
+ for (
8514
+ postponedRow.boundaries = null, postponedRow = 0;
8515
+ postponedRow < segment.length;
8516
+ postponedRow++
8517
+ ) {
8518
+ var postponedBoundary = segment[postponedRow];
8519
+ trackPostponedBoundary(request, row, postponedBoundary);
8520
+ finishedTask(request, postponedBoundary, null, null);
8521
+ }
8522
+ }
8523
+ 0 === --boundary.pendingTasks &&
8524
+ finishSuspenseListRow(request, boundary);
8525
+ }
8526
+ }
8527
+ else
8528
+ null === segment ||
8529
+ !segment.parentFlushed ||
8530
+ (segment.status !== COMPLETED && segment.status !== ABORTED) ||
8531
+ (queueCompletedSegment(boundary, segment),
8532
+ 1 === boundary.completedSegments.length &&
8533
+ boundary.parentFlushed &&
8534
+ request.partialBoundaries.push(boundary)),
8535
+ (boundary = boundary.row),
8536
+ null !== boundary &&
8537
+ boundary.together &&
8538
+ tryToResolveTogetherRow(request, boundary);
7810
8539
  0 === request.allPendingTasks && completeAll(request);
7811
8540
  }
7812
8541
  function performWork(request$jscomp$2) {
@@ -7856,7 +8585,12 @@ function performWork(request$jscomp$2) {
7856
8585
  );
7857
8586
  request.replay.pendingTasks--;
7858
8587
  request.abortSet.delete(request);
7859
- finishedTask(request$jscomp$0, request.blockedBoundary, null);
8588
+ finishedTask(
8589
+ request$jscomp$0,
8590
+ request.blockedBoundary,
8591
+ request.row,
8592
+ null
8593
+ );
7860
8594
  } catch (thrownValue) {
7861
8595
  resetHooksState();
7862
8596
  var x =
@@ -7870,7 +8604,10 @@ function performWork(request$jscomp$2) {
7870
8604
  ) {
7871
8605
  var ping = request.ping;
7872
8606
  x.then(ping, ping);
7873
- request.thenableState = getThenableStateAfterSuspending();
8607
+ request.thenableState =
8608
+ thrownValue === SuspenseException
8609
+ ? getThenableStateAfterSuspending()
8610
+ : null;
7874
8611
  } else {
7875
8612
  request.replay.pendingTasks--;
7876
8613
  request.abortSet.delete(request);
@@ -7926,14 +8663,23 @@ function performWork(request$jscomp$2) {
7926
8663
  chunkLength = request$jscomp$1.chunks.length;
7927
8664
  try {
7928
8665
  retryNode(request, errorDigest),
7929
- request$jscomp$1.lastPushedText &&
7930
- request$jscomp$1.textEmbedded &&
7931
- request$jscomp$1.chunks.push("\x3c!-- --\x3e"),
8666
+ pushSegmentFinale(
8667
+ request$jscomp$1.chunks,
8668
+ request.renderState,
8669
+ request$jscomp$1.lastPushedText,
8670
+ request$jscomp$1.textEmbedded
8671
+ ),
7932
8672
  errorDigest.abortSet.delete(errorDigest),
7933
8673
  (request$jscomp$1.status = COMPLETED),
8674
+ finishedSegment(
8675
+ request,
8676
+ errorDigest.blockedBoundary,
8677
+ request$jscomp$1
8678
+ ),
7934
8679
  finishedTask(
7935
8680
  request,
7936
8681
  errorDigest.blockedBoundary,
8682
+ errorDigest.row,
7937
8683
  request$jscomp$1
7938
8684
  );
7939
8685
  } catch (thrownValue) {
@@ -7946,13 +8692,38 @@ function performWork(request$jscomp$2) {
7946
8692
  : 12 === request.status
7947
8693
  ? request.fatalError
7948
8694
  : thrownValue;
7949
- if (
8695
+ if (12 === request.status && null !== request.trackedPostpones) {
8696
+ var trackedPostpones = request.trackedPostpones,
8697
+ thrownInfo = getThrownInfo(errorDigest.componentStack);
8698
+ errorDigest.abortSet.delete(errorDigest);
8699
+ logRecoverableError(
8700
+ request,
8701
+ x$jscomp$0,
8702
+ thrownInfo,
8703
+ errorDigest.debugTask
8704
+ );
8705
+ trackPostpone(
8706
+ request,
8707
+ trackedPostpones,
8708
+ errorDigest,
8709
+ request$jscomp$1
8710
+ );
8711
+ finishedTask(
8712
+ request,
8713
+ errorDigest.blockedBoundary,
8714
+ errorDigest.row,
8715
+ request$jscomp$1
8716
+ );
8717
+ } else if (
7950
8718
  "object" === typeof x$jscomp$0 &&
7951
8719
  null !== x$jscomp$0 &&
7952
8720
  "function" === typeof x$jscomp$0.then
7953
8721
  ) {
7954
8722
  request$jscomp$1.status = PENDING;
7955
- errorDigest.thenableState = getThenableStateAfterSuspending();
8723
+ errorDigest.thenableState =
8724
+ thrownValue === SuspenseException
8725
+ ? getThenableStateAfterSuspending()
8726
+ : null;
7956
8727
  var ping$jscomp$0 = errorDigest.ping;
7957
8728
  x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
7958
8729
  } else {
@@ -7960,35 +8731,46 @@ function performWork(request$jscomp$2) {
7960
8731
  errorDigest.componentStack
7961
8732
  );
7962
8733
  errorDigest.abortSet.delete(errorDigest);
7963
- request$jscomp$1.status = 4;
8734
+ request$jscomp$1.status = ERRORED;
7964
8735
  var boundary$jscomp$0 = errorDigest.blockedBoundary,
8736
+ row = errorDigest.row,
7965
8737
  debugTask = errorDigest.debugTask;
8738
+ null !== row &&
8739
+ 0 === --row.pendingTasks &&
8740
+ finishSuspenseListRow(request, row);
8741
+ request.allPendingTasks--;
7966
8742
  prevTaskInDEV = logRecoverableError(
7967
8743
  request,
7968
8744
  x$jscomp$0,
7969
8745
  errorInfo$jscomp$1,
7970
8746
  debugTask
7971
8747
  );
7972
- null === boundary$jscomp$0
7973
- ? fatalError(request, x$jscomp$0, errorInfo$jscomp$1, debugTask)
7974
- : (boundary$jscomp$0.pendingTasks--,
7975
- boundary$jscomp$0.status !== CLIENT_RENDERED &&
7976
- ((boundary$jscomp$0.status = CLIENT_RENDERED),
7977
- encodeErrorForBoundary(
7978
- boundary$jscomp$0,
7979
- prevTaskInDEV,
7980
- x$jscomp$0,
7981
- errorInfo$jscomp$1,
7982
- !1
7983
- ),
7984
- untrackBoundary(request, boundary$jscomp$0),
7985
- boundary$jscomp$0.parentFlushed &&
7986
- request.clientRenderedBoundaries.push(boundary$jscomp$0),
7987
- 0 === request.pendingRootTasks &&
7988
- null === request.trackedPostpones &&
7989
- null !== boundary$jscomp$0.contentPreamble &&
7990
- preparePreamble(request)));
7991
- request.allPendingTasks--;
8748
+ if (null === boundary$jscomp$0)
8749
+ fatalError(request, x$jscomp$0, errorInfo$jscomp$1, debugTask);
8750
+ else if (
8751
+ (boundary$jscomp$0.pendingTasks--,
8752
+ boundary$jscomp$0.status !== CLIENT_RENDERED)
8753
+ ) {
8754
+ boundary$jscomp$0.status = CLIENT_RENDERED;
8755
+ encodeErrorForBoundary(
8756
+ boundary$jscomp$0,
8757
+ prevTaskInDEV,
8758
+ x$jscomp$0,
8759
+ errorInfo$jscomp$1,
8760
+ !1
8761
+ );
8762
+ untrackBoundary(request, boundary$jscomp$0);
8763
+ var boundaryRow = boundary$jscomp$0.row;
8764
+ null !== boundaryRow &&
8765
+ 0 === --boundaryRow.pendingTasks &&
8766
+ finishSuspenseListRow(request, boundaryRow);
8767
+ boundary$jscomp$0.parentFlushed &&
8768
+ request.clientRenderedBoundaries.push(boundary$jscomp$0);
8769
+ 0 === request.pendingRootTasks &&
8770
+ null === request.trackedPostpones &&
8771
+ null !== boundary$jscomp$0.contentPreamble &&
8772
+ preparePreamble(request);
8773
+ }
7992
8774
  0 === request.allPendingTasks && completeAll(request);
7993
8775
  }
7994
8776
  } finally {
@@ -8047,6 +8829,7 @@ function preparePreambleFromSegment(
8047
8829
  switch (boundary.status) {
8048
8830
  case COMPLETED:
8049
8831
  hoistPreambleState(request.renderState, preamble);
8832
+ request.byteSize += boundary.byteSize;
8050
8833
  segment = boundary.completedSegments[0];
8051
8834
  if (!segment)
8052
8835
  throw Error(
@@ -8079,17 +8862,16 @@ function preparePreamble(request) {
8079
8862
  null === request.completedPreambleSegments
8080
8863
  ) {
8081
8864
  var collectedPreambleSegments = [],
8865
+ originalRequestByteSize = request.byteSize,
8082
8866
  hasPendingPreambles = preparePreambleFromSegment(
8083
8867
  request,
8084
8868
  request.completedRootSegment,
8085
8869
  collectedPreambleSegments
8086
8870
  ),
8087
8871
  preamble = request.renderState.preamble;
8088
- if (
8089
- !1 === hasPendingPreambles ||
8090
- (preamble.headChunks && preamble.bodyChunks)
8091
- )
8092
- request.completedPreambleSegments = collectedPreambleSegments;
8872
+ !1 === hasPendingPreambles || (preamble.headChunks && preamble.bodyChunks)
8873
+ ? (request.completedPreambleSegments = collectedPreambleSegments)
8874
+ : (request.byteSize = originalRequestByteSize);
8093
8875
  }
8094
8876
  }
8095
8877
  function flushSubtree(request, destination, segment, hoistableState) {
@@ -8124,27 +8906,34 @@ function flushSubtree(request, destination, segment, hoistableState) {
8124
8906
  writeChunk(destination, chunks[chunkIdx]);
8125
8907
  chunkIdx < chunks.length && (r = !!destination.write(chunks[chunkIdx]));
8126
8908
  return r;
8909
+ case ABORTED:
8910
+ return !0;
8127
8911
  default:
8128
8912
  throw Error(
8129
8913
  "Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React."
8130
8914
  );
8131
8915
  }
8132
8916
  }
8917
+ var flushedByteSize = 0;
8133
8918
  function flushSegment(request, destination, segment, hoistableState) {
8134
8919
  var boundary = segment.boundary;
8135
8920
  if (null === boundary)
8136
8921
  return flushSubtree(request, destination, segment, hoistableState);
8137
8922
  boundary.parentFlushed = !0;
8138
8923
  if (boundary.status === CLIENT_RENDERED) {
8139
- var errorDigest = boundary.errorDigest,
8140
- errorMessage = boundary.errorMessage,
8141
- errorStack = boundary.errorStack,
8142
- errorComponentStack = boundary.errorComponentStack;
8924
+ var row = boundary.row;
8925
+ null !== row &&
8926
+ 0 === --row.pendingTasks &&
8927
+ finishSuspenseListRow(request, row);
8928
+ row = boundary.errorDigest;
8929
+ var errorMessage = boundary.errorMessage,
8930
+ errorStack = boundary.errorStack;
8931
+ boundary = boundary.errorComponentStack;
8143
8932
  destination.write(startClientRenderedSuspenseBoundary);
8144
8933
  writeChunk(destination, clientRenderedSuspenseBoundaryError1);
8145
- errorDigest &&
8934
+ row &&
8146
8935
  (writeChunk(destination, clientRenderedSuspenseBoundaryError1A),
8147
- writeChunk(destination, escapeTextForBrowser(errorDigest)),
8936
+ writeChunk(destination, escapeTextForBrowser(row)),
8148
8937
  writeChunk(
8149
8938
  destination,
8150
8939
  clientRenderedSuspenseBoundaryErrorAttrInterstitial
@@ -8163,23 +8952,18 @@ function flushSegment(request, destination, segment, hoistableState) {
8163
8952
  destination,
8164
8953
  clientRenderedSuspenseBoundaryErrorAttrInterstitial
8165
8954
  ));
8166
- errorComponentStack &&
8955
+ boundary &&
8167
8956
  (writeChunk(destination, clientRenderedSuspenseBoundaryError1D),
8168
- writeChunk(destination, escapeTextForBrowser(errorComponentStack)),
8957
+ writeChunk(destination, escapeTextForBrowser(boundary)),
8169
8958
  writeChunk(
8170
8959
  destination,
8171
8960
  clientRenderedSuspenseBoundaryErrorAttrInterstitial
8172
8961
  ));
8173
8962
  destination.write(clientRenderedSuspenseBoundaryError2);
8174
8963
  flushSubtree(request, destination, segment, hoistableState);
8175
- (request = boundary.fallbackPreamble) &&
8176
- writePreambleContribution(destination, request);
8177
- return !!destination.write(endSuspenseBoundary);
8178
- }
8179
- if (boundary.status !== COMPLETED)
8180
- return (
8181
- boundary.status === PENDING &&
8182
- (boundary.rootSegmentID = request.nextSegmentId++),
8964
+ } else if (boundary.status !== COMPLETED)
8965
+ boundary.status === PENDING &&
8966
+ (boundary.rootSegmentID = request.nextSegmentId++),
8183
8967
  0 < boundary.completedSegments.length &&
8184
8968
  request.partialBoundaries.push(boundary),
8185
8969
  writeStartPendingSuspenseBoundary(
@@ -8187,41 +8971,38 @@ function flushSegment(request, destination, segment, hoistableState) {
8187
8971
  request.renderState,
8188
8972
  boundary.rootSegmentID
8189
8973
  ),
8190
- hoistableState &&
8191
- ((boundary = boundary.fallbackState),
8192
- boundary.styles.forEach(hoistStyleQueueDependency, hoistableState),
8193
- boundary.stylesheets.forEach(
8194
- hoistStylesheetDependency,
8195
- hoistableState
8196
- )),
8197
- flushSubtree(request, destination, segment, hoistableState),
8198
- !!destination.write(endSuspenseBoundary)
8199
- );
8200
- if (boundary.byteSize > request.progressiveChunkSize)
8201
- return (
8202
- (boundary.rootSegmentID = request.nextSegmentId++),
8974
+ hoistableState && hoistHoistables(hoistableState, boundary.fallbackState),
8975
+ flushSubtree(request, destination, segment, hoistableState);
8976
+ else if (
8977
+ !flushingPartialBoundaries &&
8978
+ isEligibleForOutlining(request, boundary) &&
8979
+ (flushedByteSize + boundary.byteSize > request.progressiveChunkSize ||
8980
+ hasSuspenseyContent(boundary.contentState))
8981
+ )
8982
+ (boundary.rootSegmentID = request.nextSegmentId++),
8203
8983
  request.completedBoundaries.push(boundary),
8204
8984
  writeStartPendingSuspenseBoundary(
8205
8985
  destination,
8206
8986
  request.renderState,
8207
8987
  boundary.rootSegmentID
8208
8988
  ),
8209
- flushSubtree(request, destination, segment, hoistableState),
8210
- !!destination.write(endSuspenseBoundary)
8211
- );
8212
- hoistableState &&
8213
- ((segment = boundary.contentState),
8214
- segment.styles.forEach(hoistStyleQueueDependency, hoistableState),
8215
- segment.stylesheets.forEach(hoistStylesheetDependency, hoistableState));
8216
- destination.write(startCompletedSuspenseBoundary);
8217
- segment = boundary.completedSegments;
8218
- if (1 !== segment.length)
8219
- throw Error(
8220
- "A previously unvisited boundary must have exactly one root segment. This is a bug in React."
8221
- );
8222
- flushSegment(request, destination, segment[0], hoistableState);
8223
- (request = boundary.contentPreamble) &&
8224
- writePreambleContribution(destination, request);
8989
+ flushSubtree(request, destination, segment, hoistableState);
8990
+ else {
8991
+ flushedByteSize += boundary.byteSize;
8992
+ hoistableState && hoistHoistables(hoistableState, boundary.contentState);
8993
+ segment = boundary.row;
8994
+ null !== segment &&
8995
+ isEligibleForOutlining(request, boundary) &&
8996
+ 0 === --segment.pendingTasks &&
8997
+ finishSuspenseListRow(request, segment);
8998
+ destination.write(startCompletedSuspenseBoundary);
8999
+ segment = boundary.completedSegments;
9000
+ if (1 !== segment.length)
9001
+ throw Error(
9002
+ "A previously unvisited boundary must have exactly one root segment. This is a bug in React."
9003
+ );
9004
+ flushSegment(request, destination, segment[0], hoistableState);
9005
+ }
8225
9006
  return !!destination.write(endSuspenseBoundary);
8226
9007
  }
8227
9008
  function flushSegmentContainer(request, destination, segment, hoistableState) {
@@ -8235,6 +9016,7 @@ function flushSegmentContainer(request, destination, segment, hoistableState) {
8235
9016
  return writeEndSegment(destination, segment.parentFormatContext);
8236
9017
  }
8237
9018
  function flushCompletedBoundary(request, destination, boundary) {
9019
+ flushedByteSize = boundary.byteSize;
8238
9020
  for (
8239
9021
  var completedSegments = boundary.completedSegments, i = 0;
8240
9022
  i < completedSegments.length;
@@ -8247,6 +9029,11 @@ function flushCompletedBoundary(request, destination, boundary) {
8247
9029
  completedSegments[i]
8248
9030
  );
8249
9031
  completedSegments.length = 0;
9032
+ completedSegments = boundary.row;
9033
+ null !== completedSegments &&
9034
+ isEligibleForOutlining(request, boundary) &&
9035
+ 0 === --completedSegments.pendingTasks &&
9036
+ finishSuspenseListRow(request, completedSegments);
8250
9037
  writeHoistablesForBoundary(
8251
9038
  destination,
8252
9039
  boundary.contentState,
@@ -8259,24 +9046,26 @@ function flushCompletedBoundary(request, destination, boundary) {
8259
9046
  var requiresStyleInsertion = request.stylesToHoist;
8260
9047
  request.stylesToHoist = !1;
8261
9048
  writeChunk(destination, request.startInlineScript);
9049
+ writeChunk(destination, endOfStartTag);
8262
9050
  requiresStyleInsertion
8263
- ? (completedSegments.instructions & SentCompleteBoundaryFunction) ===
9051
+ ? ((completedSegments.instructions & SentClientRenderFunction) ===
9052
+ NothingSent &&
9053
+ ((completedSegments.instructions |= SentClientRenderFunction),
9054
+ writeChunk(destination, clientRenderScriptFunctionOnly)),
9055
+ (completedSegments.instructions & SentCompleteBoundaryFunction) ===
9056
+ NothingSent &&
9057
+ ((completedSegments.instructions |= SentCompleteBoundaryFunction),
9058
+ writeChunk(destination, completeBoundaryScriptFunctionOnly)),
9059
+ (completedSegments.instructions & SentStyleInsertionFunction) ===
8264
9060
  NothingSent
8265
- ? ((completedSegments.instructions =
8266
- completedSegments.instructions |
8267
- SentStyleInsertionFunction |
8268
- SentCompleteBoundaryFunction),
8269
- writeChunk(destination, completeBoundaryWithStylesScript1FullBoth))
8270
- : (completedSegments.instructions & SentStyleInsertionFunction) ===
8271
- NothingSent
8272
9061
  ? ((completedSegments.instructions |= SentStyleInsertionFunction),
8273
9062
  writeChunk(destination, completeBoundaryWithStylesScript1FullPartial))
8274
- : writeChunk(destination, completeBoundaryWithStylesScript1Partial)
8275
- : (completedSegments.instructions & SentCompleteBoundaryFunction) ===
8276
- NothingSent
8277
- ? ((completedSegments.instructions |= SentCompleteBoundaryFunction),
8278
- writeChunk(destination, completeBoundaryScript1Full))
8279
- : writeChunk(destination, completeBoundaryScript1Partial);
9063
+ : writeChunk(destination, completeBoundaryWithStylesScript1Partial))
9064
+ : ((completedSegments.instructions & SentCompleteBoundaryFunction) ===
9065
+ NothingSent &&
9066
+ ((completedSegments.instructions |= SentCompleteBoundaryFunction),
9067
+ writeChunk(destination, completeBoundaryScriptFunctionOnly)),
9068
+ writeChunk(destination, completeBoundaryScript1Partial));
8280
9069
  completedSegments = i.toString(16);
8281
9070
  writeChunk(destination, request.boundaryPrefix);
8282
9071
  writeChunk(destination, completedSegments);
@@ -8312,6 +9101,7 @@ function flushPartiallyCompletedSegment(
8312
9101
  boundary = request.resumableState;
8313
9102
  request = request.renderState;
8314
9103
  writeChunk(destination, request.startInlineScript);
9104
+ writeChunk(destination, endOfStartTag);
8315
9105
  (boundary.instructions & SentCompleteSegmentFunction) === NothingSent
8316
9106
  ? ((boundary.instructions |= SentCompleteSegmentFunction),
8317
9107
  writeChunk(destination, completeSegmentScript1Full))
@@ -8325,6 +9115,7 @@ function flushPartiallyCompletedSegment(
8325
9115
  destination = !!destination.write(completeSegmentScriptEnd);
8326
9116
  return destination;
8327
9117
  }
9118
+ var flushingPartialBoundaries = !1;
8328
9119
  function flushCompletedQueues(request, destination) {
8329
9120
  try {
8330
9121
  if (!(0 < request.pendingRootTasks)) {
@@ -8334,7 +9125,9 @@ function flushCompletedQueues(request, destination) {
8334
9125
  if (completedRootSegment.status === POSTPONED) return;
8335
9126
  var completedPreambleSegments = request.completedPreambleSegments;
8336
9127
  if (null === completedPreambleSegments) return;
8337
- var renderState = request.renderState,
9128
+ flushedByteSize = request.byteSize;
9129
+ var resumableState = request.resumableState,
9130
+ renderState = request.renderState,
8338
9131
  preamble = renderState.preamble,
8339
9132
  htmlChunks = preamble.htmlChunks,
8340
9133
  headChunks = preamble.headChunks,
@@ -8365,7 +9158,9 @@ function flushCompletedQueues(request, destination) {
8365
9158
  renderState.fontPreloads.clear();
8366
9159
  renderState.highImagePreloads.forEach(flushResource, destination);
8367
9160
  renderState.highImagePreloads.clear();
9161
+ currentlyFlushingRenderState = renderState;
8368
9162
  renderState.styles.forEach(flushStylesInPreamble, destination);
9163
+ currentlyFlushingRenderState = null;
8369
9164
  var importMapChunks = renderState.importMapChunks;
8370
9165
  for (i$jscomp$0 = 0; i$jscomp$0 < importMapChunks.length; i$jscomp$0++)
8371
9166
  writeChunk(destination, importMapChunks[i$jscomp$0]);
@@ -8375,17 +9170,20 @@ function flushCompletedQueues(request, destination) {
8375
9170
  renderState.scripts.clear();
8376
9171
  renderState.bulkPreloads.forEach(flushResource, destination);
8377
9172
  renderState.bulkPreloads.clear();
9173
+ htmlChunks ||
9174
+ headChunks ||
9175
+ (resumableState.instructions |= SentCompletedShellId);
8378
9176
  var hoistableChunks = renderState.hoistableChunks;
8379
9177
  for (i$jscomp$0 = 0; i$jscomp$0 < hoistableChunks.length; i$jscomp$0++)
8380
9178
  writeChunk(destination, hoistableChunks[i$jscomp$0]);
8381
9179
  for (
8382
- renderState = hoistableChunks.length = 0;
8383
- renderState < completedPreambleSegments.length;
8384
- renderState++
9180
+ resumableState = hoistableChunks.length = 0;
9181
+ resumableState < completedPreambleSegments.length;
9182
+ resumableState++
8385
9183
  ) {
8386
- var segments = completedPreambleSegments[renderState];
8387
- for (preamble = 0; preamble < segments.length; preamble++)
8388
- flushSegment(request, destination, segments[preamble], null);
9184
+ var segments = completedPreambleSegments[resumableState];
9185
+ for (renderState = 0; renderState < segments.length; renderState++)
9186
+ flushSegment(request, destination, segments[renderState], null);
8389
9187
  }
8390
9188
  var preamble$jscomp$0 = request.renderState.preamble,
8391
9189
  headChunks$jscomp$0 = preamble$jscomp$0.headChunks;
@@ -8401,11 +9199,42 @@ function flushCompletedQueues(request, destination) {
8401
9199
  writeChunk(destination, bodyChunks[completedPreambleSegments]);
8402
9200
  flushSegment(request, destination, completedRootSegment, null);
8403
9201
  request.completedRootSegment = null;
8404
- writeBootstrap(destination, request.renderState);
9202
+ var renderState$jscomp$0 = request.renderState;
9203
+ if (
9204
+ 0 !== request.allPendingTasks ||
9205
+ 0 !== request.clientRenderedBoundaries.length ||
9206
+ 0 !== request.completedBoundaries.length ||
9207
+ (null !== request.trackedPostpones &&
9208
+ (0 !== request.trackedPostpones.rootNodes.length ||
9209
+ null !== request.trackedPostpones.rootSlots))
9210
+ ) {
9211
+ var resumableState$jscomp$0 = request.resumableState;
9212
+ if (
9213
+ (resumableState$jscomp$0.instructions & SentMarkShellTime) ===
9214
+ NothingSent
9215
+ ) {
9216
+ resumableState$jscomp$0.instructions |= SentMarkShellTime;
9217
+ writeChunk(destination, renderState$jscomp$0.startInlineScript);
9218
+ if (
9219
+ (resumableState$jscomp$0.instructions & SentCompletedShellId) ===
9220
+ NothingSent
9221
+ ) {
9222
+ resumableState$jscomp$0.instructions |= SentCompletedShellId;
9223
+ var shellId = "_" + resumableState$jscomp$0.idPrefix + "R_";
9224
+ writeChunk(destination, completedShellIdAttributeStart);
9225
+ writeChunk(destination, escapeTextForBrowser(shellId));
9226
+ writeChunk(destination, attributeEnd);
9227
+ }
9228
+ writeChunk(destination, endOfStartTag);
9229
+ writeChunk(destination, shellTimeRuntimeScript);
9230
+ destination.write(endInlineScript);
9231
+ }
9232
+ }
9233
+ writeBootstrap(destination, renderState$jscomp$0);
8405
9234
  }
8406
- var renderState$jscomp$0 = request.renderState;
9235
+ var renderState$jscomp$1 = request.renderState;
8407
9236
  completedRootSegment = 0;
8408
- var viewportChunks$jscomp$0 = renderState$jscomp$0.viewportChunks;
9237
+ var viewportChunks$jscomp$0 = renderState$jscomp$1.viewportChunks;
8409
9238
  for (
8410
9239
  completedRootSegment = 0;
8411
9240
  completedRootSegment < viewportChunks$jscomp$0.length;
@@ -8413,21 +9242,21 @@ function flushCompletedQueues(request, destination) {
8413
9242
  )
8414
9243
  writeChunk(destination, viewportChunks$jscomp$0[completedRootSegment]);
8415
9244
  viewportChunks$jscomp$0.length = 0;
8416
- renderState$jscomp$0.preconnects.forEach(flushResource, destination);
8417
- renderState$jscomp$0.preconnects.clear();
8418
- renderState$jscomp$0.fontPreloads.forEach(flushResource, destination);
8419
- renderState$jscomp$0.fontPreloads.clear();
8420
- renderState$jscomp$0.highImagePreloads.forEach(
9245
+ renderState$jscomp$1.preconnects.forEach(flushResource, destination);
9246
+ renderState$jscomp$1.preconnects.clear();
9247
+ renderState$jscomp$1.fontPreloads.forEach(flushResource, destination);
9248
+ renderState$jscomp$1.fontPreloads.clear();
9249
+ renderState$jscomp$1.highImagePreloads.forEach(
8421
9250
  flushResource,
8422
9251
  destination
8423
9252
  );
8424
- renderState$jscomp$0.highImagePreloads.clear();
8425
- renderState$jscomp$0.styles.forEach(preloadLateStyles, destination);
8426
- renderState$jscomp$0.scripts.forEach(flushResource, destination);
8427
- renderState$jscomp$0.scripts.clear();
8428
- renderState$jscomp$0.bulkPreloads.forEach(flushResource, destination);
8429
- renderState$jscomp$0.bulkPreloads.clear();
8430
- var hoistableChunks$jscomp$0 = renderState$jscomp$0.hoistableChunks;
9253
+ renderState$jscomp$1.highImagePreloads.clear();
9254
+ renderState$jscomp$1.styles.forEach(preloadLateStyles, destination);
9255
+ renderState$jscomp$1.scripts.forEach(flushResource, destination);
9256
+ renderState$jscomp$1.scripts.clear();
9257
+ renderState$jscomp$1.bulkPreloads.forEach(flushResource, destination);
9258
+ renderState$jscomp$1.bulkPreloads.clear();
9259
+ var hoistableChunks$jscomp$0 = renderState$jscomp$1.hoistableChunks;
8431
9260
  for (
8432
9261
  completedRootSegment = 0;
8433
9262
  completedRootSegment < hoistableChunks$jscomp$0.length;
@@ -8438,62 +9267,64 @@ function flushCompletedQueues(request, destination) {
8438
9267
  var clientRenderedBoundaries = request.clientRenderedBoundaries;
8439
9268
  for (i = 0; i < clientRenderedBoundaries.length; i++) {
8440
9269
  var boundary = clientRenderedBoundaries[i];
8441
- renderState$jscomp$0 = destination;
8442
- var resumableState = request.resumableState,
8443
- renderState$jscomp$1 = request.renderState,
9270
+ renderState$jscomp$1 = destination;
9271
+ var resumableState$jscomp$1 = request.resumableState,
9272
+ renderState$jscomp$2 = request.renderState,
8444
9273
  id = boundary.rootSegmentID,
8445
9274
  errorDigest = boundary.errorDigest,
8446
9275
  errorMessage = boundary.errorMessage,
8447
9276
  errorStack = boundary.errorStack,
8448
9277
  errorComponentStack = boundary.errorComponentStack;
8449
9278
  writeChunk(
8450
- renderState$jscomp$0,
8451
- renderState$jscomp$1.startInlineScript
9279
+ renderState$jscomp$1,
9280
+ renderState$jscomp$2.startInlineScript
8452
9281
  );
8453
- (resumableState.instructions & SentClientRenderFunction) === NothingSent
8454
- ? ((resumableState.instructions |= SentClientRenderFunction),
8455
- writeChunk(renderState$jscomp$0, clientRenderScript1Full))
8456
- : writeChunk(renderState$jscomp$0, clientRenderScript1Partial);
8457
- writeChunk(renderState$jscomp$0, renderState$jscomp$1.boundaryPrefix);
8458
- writeChunk(renderState$jscomp$0, id.toString(16));
8459
- writeChunk(renderState$jscomp$0, clientRenderScript1A);
9282
+ writeChunk(renderState$jscomp$1, endOfStartTag);
9283
+ (resumableState$jscomp$1.instructions & SentClientRenderFunction) ===
9284
+ NothingSent
9285
+ ? ((resumableState$jscomp$1.instructions |= SentClientRenderFunction),
9286
+ writeChunk(renderState$jscomp$1, clientRenderScript1Full))
9287
+ : writeChunk(renderState$jscomp$1, clientRenderScript1Partial);
9288
+ writeChunk(renderState$jscomp$1, renderState$jscomp$2.boundaryPrefix);
9289
+ writeChunk(renderState$jscomp$1, id.toString(16));
9290
+ writeChunk(renderState$jscomp$1, clientRenderScript1A);
8460
9291
  if (errorDigest || errorMessage || errorStack || errorComponentStack)
8461
9292
  writeChunk(
8462
- renderState$jscomp$0,
9293
+ renderState$jscomp$1,
8463
9294
  clientRenderErrorScriptArgInterstitial
8464
9295
  ),
8465
9296
  writeChunk(
8466
- renderState$jscomp$0,
9297
+ renderState$jscomp$1,
8467
9298
  escapeJSStringsForInstructionScripts(errorDigest || "")
8468
9299
  );
8469
9300
  if (errorMessage || errorStack || errorComponentStack)
8470
9301
  writeChunk(
8471
- renderState$jscomp$0,
9302
+ renderState$jscomp$1,
8472
9303
  clientRenderErrorScriptArgInterstitial
8473
9304
  ),
8474
9305
  writeChunk(
8475
- renderState$jscomp$0,
9306
+ renderState$jscomp$1,
8476
9307
  escapeJSStringsForInstructionScripts(errorMessage || "")
8477
9308
  );
8478
9309
  if (errorStack || errorComponentStack)
8479
9310
  writeChunk(
8480
- renderState$jscomp$0,
9311
+ renderState$jscomp$1,
8481
9312
  clientRenderErrorScriptArgInterstitial
8482
9313
  ),
8483
9314
  writeChunk(
8484
- renderState$jscomp$0,
9315
+ renderState$jscomp$1,
8485
9316
  escapeJSStringsForInstructionScripts(errorStack || "")
8486
9317
  );
8487
9318
  errorComponentStack &&
8488
9319
  (writeChunk(
8489
- renderState$jscomp$0,
9320
+ renderState$jscomp$1,
8490
9321
  clientRenderErrorScriptArgInterstitial
8491
9322
  ),
8492
9323
  writeChunk(
8493
- renderState$jscomp$0,
9324
+ renderState$jscomp$1,
8494
9325
  escapeJSStringsForInstructionScripts(errorComponentStack)
8495
9326
  ));
8496
- var JSCompiler_inline_result = !!renderState$jscomp$0.write(
9327
+ var JSCompiler_inline_result = !!renderState$jscomp$1.write(
8497
9328
  clientRenderScriptEnd
8498
9329
  );
8499
9330
  if (!JSCompiler_inline_result) {
@@ -8515,13 +9346,15 @@ function flushCompletedQueues(request, destination) {
8515
9346
  return;
8516
9347
  }
8517
9348
  completedBoundaries.splice(0, i);
9349
+ flushingPartialBoundaries = !0;
8518
9350
  var partialBoundaries = request.partialBoundaries;
8519
9351
  for (i = 0; i < partialBoundaries.length; i++) {
8520
9352
  a: {
8521
9353
  clientRenderedBoundaries = request;
8522
9354
  boundary = destination;
8523
- var boundary$jscomp$0 = partialBoundaries[i],
8524
- completedSegments = boundary$jscomp$0.completedSegments;
9355
+ var boundary$jscomp$0 = partialBoundaries[i];
9356
+ flushedByteSize = boundary$jscomp$0.byteSize;
9357
+ var completedSegments = boundary$jscomp$0.completedSegments;
8525
9358
  for (
8526
9359
  JSCompiler_inline_result = 0;
8527
9360
  JSCompiler_inline_result < completedSegments.length;
@@ -8541,6 +9374,17 @@ function flushCompletedQueues(request, destination) {
8541
9374
  break a;
8542
9375
  }
8543
9376
  completedSegments.splice(0, JSCompiler_inline_result);
9377
+ var row = boundary$jscomp$0.row;
9378
+ null !== row &&
9379
+ row.together &&
9380
+ 1 === boundary$jscomp$0.pendingTasks &&
9381
+ (1 === row.pendingTasks
9382
+ ? unblockSuspenseListRow(
9383
+ clientRenderedBoundaries,
9384
+ row,
9385
+ row.hoistables
9386
+ )
9387
+ : row.pendingTasks--);
8544
9388
  JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(
8545
9389
  boundary,
8546
9390
  boundary$jscomp$0.contentState,
@@ -8555,6 +9399,7 @@ function flushCompletedQueues(request, destination) {
8555
9399
  }
8556
9400
  }
8557
9401
  partialBoundaries.splice(0, i);
9402
+ flushingPartialBoundaries = !1;
8558
9403
  var largeBoundaries = request.completedBoundaries;
8559
9404
  for (i = 0; i < largeBoundaries.length; i++)
8560
9405
  if (!flushCompletedBoundary(request, destination, largeBoundaries[i])) {
@@ -8566,23 +9411,23 @@ function flushCompletedQueues(request, destination) {
8566
9411
  largeBoundaries.splice(0, i);
8567
9412
  }
8568
9413
  } finally {
8569
- 0 === request.allPendingTasks &&
8570
- 0 === request.pingedTasks.length &&
8571
- 0 === request.clientRenderedBoundaries.length &&
8572
- 0 === request.completedBoundaries.length
8573
- ? ((request.flushScheduled = !1),
8574
- (i = request.resumableState),
8575
- i.hasBody && writeChunk(destination, endChunkForTag("body")),
8576
- i.hasHtml && writeChunk(destination, endChunkForTag("html")),
8577
- flushBuffered(destination),
8578
- 0 !== request.abortableTasks.size &&
8579
- console.error(
8580
- "There was still abortable task at the root when we closed. This is a bug in React."
8581
- ),
8582
- (request.status = CLOSED),
8583
- destination.end(),
8584
- (request.destination = null))
8585
- : flushBuffered(destination);
9414
+ (flushingPartialBoundaries = !1),
9415
+ 0 === request.allPendingTasks &&
9416
+ 0 === request.clientRenderedBoundaries.length &&
9417
+ 0 === request.completedBoundaries.length
9418
+ ? ((request.flushScheduled = !1),
9419
+ (i = request.resumableState),
9420
+ i.hasBody && writeChunk(destination, endChunkForTag("body")),
9421
+ i.hasHtml && writeChunk(destination, endChunkForTag("html")),
9422
+ flushBuffered(destination),
9423
+ 0 !== request.abortableTasks.size &&
9424
+ console.error(
9425
+ "There was still abortable task at the root when we closed. This is a bug in React."
9426
+ ),
9427
+ (request.status = CLOSED),
9428
+ destination.end(),
9429
+ (request.destination = null))
9430
+ : flushBuffered(destination);
8586
9431
  }
8587
9432
  }
8588
9433
  function startWork(request) {
@@ -8623,7 +9468,16 @@ function abort(request, reason) {
8623
9468
  : reason;
8624
9469
  request.fatalError = error;
8625
9470
  abortableTasks.forEach(function (task) {
8626
- return abortTask(task, request, error);
9471
+ var prevTaskInDEV = currentTaskInDEV,
9472
+ prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;
9473
+ currentTaskInDEV = task;
9474
+ ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;
9475
+ try {
9476
+ abortTask(task, request, error);
9477
+ } finally {
9478
+ (currentTaskInDEV = prevTaskInDEV),
9479
+ (ReactSharedInternals.getCurrentStack = prevGetCurrentStackImpl);
9480
+ }
8627
9481
  });
8628
9482
  abortableTasks.clear();
8629
9483
  }
@@ -8635,15 +9489,27 @@ function abort(request, reason) {
8635
9489
  fatalError(request, error$4, reason, null);
8636
9490
  }
8637
9491
  }
8638
- var isomorphicReactPackageVersion$jscomp$inline_743 = React.version;
9492
+ function addToReplayParent(node, parentKeyPath, trackedPostpones) {
9493
+ if (null === parentKeyPath) trackedPostpones.rootNodes.push(node);
9494
+ else {
9495
+ var workingMap = trackedPostpones.workingMap,
9496
+ parentNode = workingMap.get(parentKeyPath);
9497
+ void 0 === parentNode &&
9498
+ ((parentNode = [parentKeyPath[1], parentKeyPath[2], [], null]),
9499
+ workingMap.set(parentKeyPath, parentNode),
9500
+ addToReplayParent(parentNode, parentKeyPath[0], trackedPostpones));
9501
+ parentNode[2].push(node);
9502
+ }
9503
+ }
9504
+ var isomorphicReactPackageVersion$jscomp$inline_766 = React.version;
8639
9505
  if (
8640
- "19.1.0" !==
8641
- isomorphicReactPackageVersion$jscomp$inline_743
9506
+ "19.2.4" !==
9507
+ isomorphicReactPackageVersion$jscomp$inline_766
8642
9508
  )
8643
9509
  throw Error(
8644
9510
  'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
8645
- (isomorphicReactPackageVersion$jscomp$inline_743 +
8646
- "\n - react-dom: 19.1.0\nLearn more: https://react.dev/warnings/version-mismatch")
9511
+ (isomorphicReactPackageVersion$jscomp$inline_766 +
9512
+ "\n - react-dom: 19.2.4\nLearn more: https://react.dev/warnings/version-mismatch")
8647
9513
  );
8648
9514
  exports.renderToReadableStream = function (children, options) {
8649
9515
  return new Promise(function (resolve, reject) {
@@ -8736,4 +9602,4 @@ exports.renderToReadableStream = function (children, options) {
8736
9602
  startWork(request$jscomp$0);
8737
9603
  });
8738
9604
  };
8739
- exports.version = "19.1.0";
9605
+ exports.version = "19.2.4";