@expo/cli 1.0.0-canary-20250404-3c3b5fd → 1.0.0-canary-20250701-6a945c5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/README.md +33 -24
  2. package/build/bin/cli +1 -1
  3. package/build/metro-require/require.js +6 -4
  4. package/build/src/api/user/actions.js +25 -11
  5. package/build/src/api/user/actions.js.map +1 -1
  6. package/build/src/customize/templates.js +15 -1
  7. package/build/src/customize/templates.js.map +1 -1
  8. package/build/src/export/exportApp.js +26 -14
  9. package/build/src/export/exportApp.js.map +1 -1
  10. package/build/src/export/exportAsync.js +6 -0
  11. package/build/src/export/exportAsync.js.map +1 -1
  12. package/build/src/export/exportHermes.js +2 -2
  13. package/build/src/export/exportHermes.js.map +1 -1
  14. package/build/src/export/persistMetroAssets.js.map +1 -1
  15. package/build/src/install/checkPackages.js +22 -4
  16. package/build/src/install/checkPackages.js.map +1 -1
  17. package/build/src/install/index.js +3 -1
  18. package/build/src/install/index.js.map +1 -1
  19. package/build/src/install/resolveOptions.js +7 -2
  20. package/build/src/install/resolveOptions.js.map +1 -1
  21. package/build/src/install/utils/checkPackagesCompatibility.js +1 -1
  22. package/build/src/install/utils/checkPackagesCompatibility.js.map +1 -1
  23. package/build/src/lint/ESlintPrerequisite.js +32 -48
  24. package/build/src/lint/ESlintPrerequisite.js.map +1 -1
  25. package/build/src/lint/index.js +45 -47
  26. package/build/src/lint/index.js.map +1 -1
  27. package/build/src/lint/lintAsync.js +150 -4
  28. package/build/src/lint/lintAsync.js.map +1 -1
  29. package/build/src/lint/resolveOptions.js +115 -0
  30. package/build/src/lint/resolveOptions.js.map +1 -0
  31. package/build/src/prebuild/renameTemplateAppName.js +4 -1
  32. package/build/src/prebuild/renameTemplateAppName.js.map +1 -1
  33. package/build/src/prebuild/resolveTemplate.js +4 -4
  34. package/build/src/prebuild/resolveTemplate.js.map +1 -1
  35. package/build/src/prebuild/updatePackageJson.js +19 -9
  36. package/build/src/prebuild/updatePackageJson.js.map +1 -1
  37. package/build/src/run/android/resolveOptions.js +13 -1
  38. package/build/src/run/android/resolveOptions.js.map +1 -1
  39. package/build/src/run/android/runAndroidAsync.js +39 -17
  40. package/build/src/run/android/runAndroidAsync.js.map +1 -1
  41. package/build/src/run/ios/XcodeBuild.js +3 -3
  42. package/build/src/run/ios/XcodeBuild.js.map +1 -1
  43. package/build/src/run/ios/options/resolveOptions.js +13 -1
  44. package/build/src/run/ios/options/resolveOptions.js.map +1 -1
  45. package/build/src/run/ios/runIosAsync.js +38 -7
  46. package/build/src/run/ios/runIosAsync.js.map +1 -1
  47. package/build/src/start/doctor/SecurityBinPrerequisite.js +1 -1
  48. package/build/src/start/doctor/SecurityBinPrerequisite.js.map +1 -1
  49. package/build/src/start/doctor/apple/XcodePrerequisite.js +1 -1
  50. package/build/src/start/doctor/apple/XcodePrerequisite.js.map +1 -1
  51. package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js +1 -1
  52. package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js.map +1 -1
  53. package/build/src/start/doctor/dependencies/resolvePackages.js +1 -1
  54. package/build/src/start/doctor/dependencies/resolvePackages.js.map +1 -1
  55. package/build/src/start/doctor/ngrok/ExternalModule.js +1 -1
  56. package/build/src/start/doctor/ngrok/ExternalModule.js.map +1 -1
  57. package/build/src/start/index.js +1 -1
  58. package/build/src/start/index.js.map +1 -1
  59. package/build/src/start/platforms/PlatformManager.js +1 -1
  60. package/build/src/start/platforms/PlatformManager.js.map +1 -1
  61. package/build/src/start/platforms/android/AndroidPlatformManager.js +1 -1
  62. package/build/src/start/platforms/android/AndroidPlatformManager.js.map +1 -1
  63. package/build/src/start/platforms/android/getDevices.js +1 -1
  64. package/build/src/start/platforms/android/getDevices.js.map +1 -1
  65. package/build/src/start/platforms/ios/AppleDeviceManager.js +1 -1
  66. package/build/src/start/platforms/ios/AppleDeviceManager.js.map +1 -1
  67. package/build/src/start/platforms/ios/xcrun.js +1 -1
  68. package/build/src/start/platforms/ios/xcrun.js.map +1 -1
  69. package/build/src/start/project/dotExpo.js +5 -0
  70. package/build/src/start/project/dotExpo.js.map +1 -1
  71. package/build/src/start/resolveOptions.js +3 -0
  72. package/build/src/start/resolveOptions.js.map +1 -1
  73. package/build/src/start/server/metro/MetroBundlerDevServer.js +38 -26
  74. package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
  75. package/build/src/start/server/metro/MetroTerminalReporter.js +29 -2
  76. package/build/src/start/server/metro/MetroTerminalReporter.js.map +1 -1
  77. package/build/src/start/server/metro/createExpoFallbackResolver.js +6 -4
  78. package/build/src/start/server/metro/createExpoFallbackResolver.js.map +1 -1
  79. package/build/src/start/server/metro/createJResolver.js +2 -2
  80. package/build/src/start/server/metro/createJResolver.js.map +1 -1
  81. package/build/src/start/server/metro/createServerComponentsMiddleware.js +16 -5
  82. package/build/src/start/server/metro/createServerComponentsMiddleware.js.map +1 -1
  83. package/build/src/start/server/metro/debugging/createDebugMiddleware.js +19 -19
  84. package/build/src/start/server/metro/debugging/createDebugMiddleware.js.map +1 -1
  85. package/build/src/start/server/metro/externals.js +1 -1
  86. package/build/src/start/server/metro/externals.js.map +1 -1
  87. package/build/src/start/server/metro/instantiateMetro.js +13 -8
  88. package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
  89. package/build/src/start/server/metro/log-box/LogBoxSymbolication.js +21 -2
  90. package/build/src/start/server/metro/log-box/LogBoxSymbolication.js.map +1 -1
  91. package/build/src/start/server/metro/log-box/formatProjectFilePath.js +15 -12
  92. package/build/src/start/server/metro/log-box/formatProjectFilePath.js.map +1 -1
  93. package/build/src/start/server/metro/metroErrorInterface.js +19 -8
  94. package/build/src/start/server/metro/metroErrorInterface.js.map +1 -1
  95. package/build/src/start/server/metro/runServer-fork.js +1 -1
  96. package/build/src/start/server/metro/runServer-fork.js.map +1 -1
  97. package/build/src/start/server/metro/withMetroMultiPlatform.js +7 -12
  98. package/build/src/start/server/metro/withMetroMultiPlatform.js.map +1 -1
  99. package/build/src/start/server/middleware/CorsMiddleware.js +1 -1
  100. package/build/src/start/server/middleware/CorsMiddleware.js.map +1 -1
  101. package/build/src/start/server/middleware/ManifestMiddleware.js +4 -8
  102. package/build/src/start/server/middleware/ManifestMiddleware.js.map +1 -1
  103. package/build/src/start/server/middleware/inspector/JsInspector.js +2 -25
  104. package/build/src/start/server/middleware/inspector/JsInspector.js.map +1 -1
  105. package/build/src/start/server/middleware/metroOptions.js +2 -26
  106. package/build/src/start/server/middleware/metroOptions.js.map +1 -1
  107. package/build/src/utils/build-cache-providers/helpers.js +61 -0
  108. package/build/src/utils/build-cache-providers/helpers.js.map +1 -0
  109. package/build/src/utils/build-cache-providers/index.js +283 -0
  110. package/build/src/utils/build-cache-providers/index.js.map +1 -0
  111. package/build/src/utils/codesigning.js +14 -2
  112. package/build/src/utils/codesigning.js.map +1 -1
  113. package/build/src/utils/exit.js +0 -1
  114. package/build/src/utils/exit.js.map +1 -1
  115. package/build/src/utils/ip.js +7 -104
  116. package/build/src/utils/ip.js.map +1 -1
  117. package/build/src/utils/modifyConfigAsync.js +1 -1
  118. package/build/src/utils/modifyConfigAsync.js.map +1 -1
  119. package/build/src/utils/resolveArgs.js +8 -0
  120. package/build/src/utils/resolveArgs.js.map +1 -1
  121. package/build/src/utils/scheme.js +1 -1
  122. package/build/src/utils/scheme.js.map +1 -1
  123. package/build/src/utils/telemetry/clients/FetchClient.js +2 -2
  124. package/build/src/utils/telemetry/clients/FetchClient.js.map +1 -1
  125. package/build/src/utils/telemetry/utils/context.js +1 -1
  126. package/build/src/utils/tsconfig/evaluateTsConfig.js +7 -2
  127. package/build/src/utils/tsconfig/evaluateTsConfig.js.map +1 -1
  128. package/build/src/utils/variadic.js +63 -6
  129. package/build/src/utils/variadic.js.map +1 -1
  130. package/package.json +20 -20
  131. package/static/canary/react-is/cjs/react-is.development.js +118 -185
  132. package/static/canary/react-is/cjs/react-is.production.js +2 -2
  133. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js +16582 -26565
  134. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-prod.js +3495 -3357
  135. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-profiling.js +3929 -3801
  136. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +16869 -27032
  137. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3535 -3428
  138. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4198 -4095
  139. package/static/canary/scheduler/cjs/scheduler-unstable_mock.development.js +387 -684
  140. package/static/canary/scheduler/cjs/scheduler-unstable_mock.production.js +0 -9
  141. package/static/canary/scheduler/cjs/scheduler-unstable_post_task.development.js +137 -195
  142. package/static/canary/scheduler/cjs/scheduler-unstable_post_task.production.js +0 -5
  143. package/static/canary/scheduler/cjs/scheduler.development.js +339 -600
  144. package/static/canary/scheduler/cjs/scheduler.native.development.js +324 -512
  145. package/static/canary/scheduler/cjs/scheduler.native.production.js +6 -5
  146. package/static/canary/scheduler/cjs/scheduler.production.js +16 -17
  147. package/static/canary-full/react/cjs/react-compiler-runtime.development.js +13 -68
  148. package/static/canary-full/react/cjs/react-jsx-dev-runtime.development.js +317 -1251
  149. package/static/canary-full/react/cjs/react-jsx-dev-runtime.react-server.development.js +353 -1286
  150. package/static/canary-full/react/cjs/react-jsx-runtime.development.js +326 -1279
  151. package/static/canary-full/react/cjs/react-jsx-runtime.react-server.development.js +353 -1286
  152. package/static/canary-full/react/cjs/react.development.js +1204 -2771
  153. package/static/canary-full/react/cjs/react.production.js +25 -20
  154. package/static/canary-full/react/cjs/react.react-server.development.js +783 -2162
  155. package/static/canary-full/react/cjs/react.react-server.production.js +13 -63
  156. package/static/canary-full/react/package.json +1 -1
  157. package/static/canary-full/react-dom/cjs/react-dom-client.development.js +24847 -37099
  158. package/static/canary-full/react-dom/cjs/react-dom-client.production.js +8261 -7475
  159. package/static/canary-full/react-dom/cjs/react-dom-profiling.development.js +25252 -37571
  160. package/static/canary-full/react-dom/cjs/react-dom-profiling.profiling.js +9442 -8662
  161. package/static/canary-full/react-dom/cjs/react-dom-server-legacy.browser.development.js +8944 -11568
  162. package/static/canary-full/react-dom/cjs/react-dom-server-legacy.browser.production.js +1378 -944
  163. package/static/canary-full/react-dom/cjs/react-dom-server-legacy.node.development.js +8944 -11568
  164. package/static/canary-full/react-dom/cjs/react-dom-server-legacy.node.production.js +1386 -954
  165. package/static/canary-full/react-dom/cjs/react-dom-server.browser.development.js +9344 -11600
  166. package/static/canary-full/react-dom/cjs/react-dom-server.browser.production.js +1545 -954
  167. package/static/canary-full/react-dom/cjs/react-dom-server.bun.development.js +8286 -11064
  168. package/static/canary-full/react-dom/cjs/react-dom-server.bun.production.js +1437 -976
  169. package/static/canary-full/react-dom/cjs/react-dom-server.edge.development.js +9356 -11609
  170. package/static/canary-full/react-dom/cjs/react-dom-server.edge.production.js +1542 -970
  171. package/static/canary-full/react-dom/cjs/react-dom-server.node.development.js +9227 -11571
  172. package/static/canary-full/react-dom/cjs/react-dom-server.node.production.js +1787 -1183
  173. package/static/canary-full/react-dom/cjs/react-dom-test-utils.development.js +13 -59
  174. package/static/canary-full/react-dom/cjs/react-dom.development.js +402 -604
  175. package/static/canary-full/react-dom/cjs/react-dom.production.js +4 -3
  176. package/static/canary-full/react-dom/cjs/react-dom.react-server.development.js +322 -382
  177. package/static/canary-full/react-dom/cjs/react-dom.react-server.production.js +6 -7
  178. package/static/canary-full/react-dom/package.json +5 -5
  179. package/static/canary-full/react-dom/static.browser.js +1 -0
  180. package/static/canary-full/react-dom/static.edge.js +1 -0
  181. package/static/canary-full/react-dom/static.node.js +1 -0
  182. package/static/template/eslint.config.js +10 -0
@@ -49,9 +49,10 @@ var React = require("react"),
49
49
  REACT_MEMO_TYPE = Symbol.for("react.memo"),
50
50
  REACT_LAZY_TYPE = Symbol.for("react.lazy"),
51
51
  REACT_SCOPE_TYPE = Symbol.for("react.scope"),
52
- REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for("react.debug_trace_mode"),
53
- REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"),
52
+ REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
54
53
  REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"),
54
+ REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"),
55
+ REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
55
56
  MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
56
57
  isArrayImpl = Array.isArray;
57
58
  function murmurhash3_32_gc(key, seed) {
@@ -107,7 +108,21 @@ function murmurhash3_32_gc(key, seed) {
107
108
  4294967295;
108
109
  return (h1 ^ (h1 >>> 16)) >>> 0;
109
110
  }
110
- var currentView = null,
111
+ function handleErrorInNextTick(error) {
112
+ setTimeout(function () {
113
+ throw error;
114
+ });
115
+ }
116
+ var LocalPromise = Promise,
117
+ scheduleMicrotask =
118
+ "function" === typeof queueMicrotask
119
+ ? queueMicrotask
120
+ : function (callback) {
121
+ LocalPromise.resolve(null)
122
+ .then(callback)
123
+ .catch(handleErrorInNextTick);
124
+ },
125
+ currentView = null,
111
126
  writtenBytes = 0;
112
127
  function writeChunk(destination, chunk) {
113
128
  if (0 !== chunk.byteLength)
@@ -390,7 +405,7 @@ function createRenderState(
390
405
  fontPreloads: "",
391
406
  highImagePreloads: "",
392
407
  remainingCapacity:
393
- "number" === typeof maxHeadersLength ? maxHeadersLength : 2e3
408
+ 2 + ("number" === typeof maxHeadersLength ? maxHeadersLength : 2e3)
394
409
  }
395
410
  : null;
396
411
  onHeaders = {
@@ -398,8 +413,7 @@ function createRenderState(
398
413
  segmentPrefix: stringToPrecomputedChunk(idPrefix + "S:"),
399
414
  boundaryPrefix: stringToPrecomputedChunk(idPrefix + "B:"),
400
415
  startInlineScript: inlineScriptWithNonce,
401
- htmlChunks: null,
402
- headChunks: null,
416
+ preamble: createPreambleState(),
403
417
  externalRuntimeScript: null,
404
418
  bootstrapChunks: externalRuntimeConfig,
405
419
  importMapChunks: bootstrapScriptContent,
@@ -453,8 +467,8 @@ function createRenderState(
453
467
  "string" === typeof scriptConfig || null == scriptConfig.crossOrigin
454
468
  ? void 0
455
469
  : "use-credentials" === scriptConfig.crossOrigin
456
- ? "use-credentials"
457
- : ""));
470
+ ? "use-credentials"
471
+ : ""));
458
472
  scriptConfig = resumableState;
459
473
  var href = maxHeadersLength;
460
474
  scriptConfig.scriptResources[href] = null;
@@ -508,8 +522,8 @@ function createRenderState(
508
522
  null == bootstrapScriptContent.crossOrigin
509
523
  ? void 0
510
524
  : "use-credentials" === bootstrapScriptContent.crossOrigin
511
- ? "use-credentials"
512
- : "")),
525
+ ? "use-credentials"
526
+ : "")),
513
527
  (bootstrapScriptContent = resumableState),
514
528
  (scriptConfig = importMap),
515
529
  (bootstrapScriptContent.scriptResources[scriptConfig] = null),
@@ -566,6 +580,14 @@ function createResumableState(
566
580
  moduleScriptResources: {}
567
581
  };
568
582
  }
583
+ function createPreambleState() {
584
+ return {
585
+ htmlChunks: null,
586
+ headChunks: null,
587
+ bodyChunks: null,
588
+ contribution: 0
589
+ };
590
+ }
569
591
  function createFormatContext(insertionMode, selectedValue, tagScope) {
570
592
  return {
571
593
  insertionMode: insertionMode,
@@ -576,10 +598,10 @@ function createFormatContext(insertionMode, selectedValue, tagScope) {
576
598
  function createRootFormatContext(namespaceURI) {
577
599
  return createFormatContext(
578
600
  "http://www.w3.org/2000/svg" === namespaceURI
579
- ? 3
580
- : "http://www.w3.org/1998/Math/MathML" === namespaceURI
581
601
  ? 4
582
- : 0,
602
+ : "http://www.w3.org/1998/Math/MathML" === namespaceURI
603
+ ? 5
604
+ : 0,
583
605
  null,
584
606
  0
585
607
  );
@@ -595,31 +617,32 @@ function getChildFormatContext(parentContext, type, props) {
595
617
  parentContext.tagScope
596
618
  );
597
619
  case "svg":
598
- return createFormatContext(3, null, parentContext.tagScope);
620
+ return createFormatContext(4, null, parentContext.tagScope);
599
621
  case "picture":
600
622
  return createFormatContext(2, null, parentContext.tagScope | 2);
601
623
  case "math":
602
- return createFormatContext(4, null, parentContext.tagScope);
624
+ return createFormatContext(5, null, parentContext.tagScope);
603
625
  case "foreignObject":
604
626
  return createFormatContext(2, null, parentContext.tagScope);
605
627
  case "table":
606
- return createFormatContext(5, null, parentContext.tagScope);
628
+ return createFormatContext(6, null, parentContext.tagScope);
607
629
  case "thead":
608
630
  case "tbody":
609
631
  case "tfoot":
610
- return createFormatContext(6, null, parentContext.tagScope);
632
+ return createFormatContext(7, null, parentContext.tagScope);
611
633
  case "colgroup":
612
- return createFormatContext(8, null, parentContext.tagScope);
634
+ return createFormatContext(9, null, parentContext.tagScope);
613
635
  case "tr":
614
- return createFormatContext(7, null, parentContext.tagScope);
636
+ return createFormatContext(8, null, parentContext.tagScope);
637
+ case "head":
638
+ if (2 > parentContext.insertionMode)
639
+ return createFormatContext(3, null, parentContext.tagScope);
640
+ break;
641
+ case "html":
642
+ if (0 === parentContext.insertionMode)
643
+ return createFormatContext(1, null, parentContext.tagScope);
615
644
  }
616
- return 5 <= parentContext.insertionMode
617
- ? createFormatContext(2, null, parentContext.tagScope)
618
- : 0 === parentContext.insertionMode
619
- ? "html" === type
620
- ? createFormatContext(1, null, parentContext.tagScope)
621
- : createFormatContext(2, null, parentContext.tagScope)
622
- : 1 === parentContext.insertionMode
645
+ return 6 <= parentContext.insertionMode || 2 > parentContext.insertionMode
623
646
  ? createFormatContext(2, null, parentContext.tagScope)
624
647
  : parentContext;
625
648
  }
@@ -717,20 +740,28 @@ var actionJavaScriptURL = stringToPrecomputedChunk(
717
740
  startHiddenInputChunk = stringToPrecomputedChunk('<input type="hidden"');
718
741
  function pushAdditionalFormField(value, key) {
719
742
  this.push(startHiddenInputChunk);
720
- if ("string" !== typeof value)
721
- throw Error(
722
- "File/Blob fields are not yet supported in progressive forms. It probably means you are closing over binary data or FormData in a Server Action."
723
- );
743
+ validateAdditionalFormField(value);
724
744
  pushStringAttribute(this, "name", key);
725
745
  pushStringAttribute(this, "value", value);
726
746
  this.push(endOfStartTagSelfClosing);
727
747
  }
748
+ function validateAdditionalFormField(value) {
749
+ if ("string" !== typeof value)
750
+ throw Error(
751
+ "File/Blob fields are not yet supported in progressive forms. Will fallback to client hydration."
752
+ );
753
+ }
728
754
  function getCustomFormFields(resumableState, formAction) {
729
755
  if ("function" === typeof formAction.$$FORM_ACTION) {
730
756
  var id = resumableState.nextFormID++;
731
757
  resumableState = resumableState.idPrefix + id;
732
758
  try {
733
- return formAction.$$FORM_ACTION(resumableState);
759
+ var customFields = formAction.$$FORM_ACTION(resumableState);
760
+ if (customFields) {
761
+ var formData = customFields.data;
762
+ null != formData && formData.forEach(validateAdditionalFormField);
763
+ }
764
+ return customFields;
734
765
  } catch (x) {
735
766
  if ("object" === typeof x && null !== x && "function" === typeof x.then)
736
767
  throw x;
@@ -1139,6 +1170,29 @@ function pushScriptImpl(target, props) {
1139
1170
  target.push(endChunkForTag("script"));
1140
1171
  return null;
1141
1172
  }
1173
+ function pushStartSingletonElement(target, props, tag) {
1174
+ target.push(startChunkForTag(tag));
1175
+ var innerHTML = (tag = null),
1176
+ propKey;
1177
+ for (propKey in props)
1178
+ if (hasOwnProperty.call(props, propKey)) {
1179
+ var propValue = props[propKey];
1180
+ if (null != propValue)
1181
+ switch (propKey) {
1182
+ case "children":
1183
+ tag = propValue;
1184
+ break;
1185
+ case "dangerouslySetInnerHTML":
1186
+ innerHTML = propValue;
1187
+ break;
1188
+ default:
1189
+ pushAttribute(target, propKey, propValue);
1190
+ }
1191
+ }
1192
+ target.push(endOfStartTag);
1193
+ pushInnerHTML(target, innerHTML, tag);
1194
+ return tag;
1195
+ }
1142
1196
  function pushStartGenericElement(target, props, tag) {
1143
1197
  target.push(startChunkForTag(tag));
1144
1198
  var innerHTML = (tag = null),
@@ -1183,6 +1237,7 @@ function pushStartInstance(
1183
1237
  props,
1184
1238
  resumableState,
1185
1239
  renderState,
1240
+ preambleState,
1186
1241
  hoistableState,
1187
1242
  formatContext,
1188
1243
  textEmbedded,
@@ -1624,28 +1679,72 @@ function pushStartInstance(
1624
1679
  }
1625
1680
  target$jscomp$0.push(endOfStartTag);
1626
1681
  return null;
1682
+ case "object":
1683
+ target$jscomp$0.push(startChunkForTag("object"));
1684
+ var children$jscomp$5 = null,
1685
+ innerHTML$jscomp$4 = null,
1686
+ propKey$jscomp$7;
1687
+ for (propKey$jscomp$7 in props)
1688
+ if (hasOwnProperty.call(props, propKey$jscomp$7)) {
1689
+ var propValue$jscomp$7 = props[propKey$jscomp$7];
1690
+ if (null != propValue$jscomp$7)
1691
+ switch (propKey$jscomp$7) {
1692
+ case "children":
1693
+ children$jscomp$5 = propValue$jscomp$7;
1694
+ break;
1695
+ case "dangerouslySetInnerHTML":
1696
+ innerHTML$jscomp$4 = propValue$jscomp$7;
1697
+ break;
1698
+ case "data":
1699
+ var sanitizedValue = sanitizeURL("" + propValue$jscomp$7);
1700
+ if ("" === sanitizedValue) break;
1701
+ target$jscomp$0.push(
1702
+ attributeSeparator,
1703
+ stringToChunk("data"),
1704
+ attributeAssign,
1705
+ stringToChunk(escapeTextForBrowser(sanitizedValue)),
1706
+ attributeEnd
1707
+ );
1708
+ break;
1709
+ default:
1710
+ pushAttribute(
1711
+ target$jscomp$0,
1712
+ propKey$jscomp$7,
1713
+ propValue$jscomp$7
1714
+ );
1715
+ }
1716
+ }
1717
+ target$jscomp$0.push(endOfStartTag);
1718
+ pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);
1719
+ if ("string" === typeof children$jscomp$5) {
1720
+ target$jscomp$0.push(
1721
+ stringToChunk(escapeTextForBrowser(children$jscomp$5))
1722
+ );
1723
+ var JSCompiler_inline_result$jscomp$2 = null;
1724
+ } else JSCompiler_inline_result$jscomp$2 = children$jscomp$5;
1725
+ return JSCompiler_inline_result$jscomp$2;
1627
1726
  case "title":
1628
1727
  if (
1629
- 3 === formatContext.insertionMode ||
1728
+ 4 === formatContext.insertionMode ||
1630
1729
  formatContext.tagScope & 1 ||
1631
1730
  null != props.itemProp
1632
1731
  )
1633
- var JSCompiler_inline_result$jscomp$2 = pushTitleImpl(
1732
+ var JSCompiler_inline_result$jscomp$3 = pushTitleImpl(
1634
1733
  target$jscomp$0,
1635
1734
  props
1636
1735
  );
1637
1736
  else
1638
1737
  isFallback
1639
- ? (JSCompiler_inline_result$jscomp$2 = null)
1738
+ ? (JSCompiler_inline_result$jscomp$3 = null)
1640
1739
  : (pushTitleImpl(renderState.hoistableChunks, props),
1641
- (JSCompiler_inline_result$jscomp$2 = void 0));
1642
- return JSCompiler_inline_result$jscomp$2;
1740
+ (JSCompiler_inline_result$jscomp$3 = void 0));
1741
+ return JSCompiler_inline_result$jscomp$3;
1643
1742
  case "link":
1644
1743
  var rel = props.rel,
1645
1744
  href = props.href,
1646
1745
  precedence = props.precedence;
1647
1746
  if (
1648
- 3 === formatContext.insertionMode ||
1747
+ 4 === formatContext.insertionMode ||
1649
1748
  formatContext.tagScope & 1 ||
1650
1749
  null != props.itemProp ||
1651
1750
  "string" !== typeof rel ||
@@ -1653,7 +1752,7 @@ function pushStartInstance(
1653
1752
  "" === href
1654
1753
  ) {
1655
1754
  pushLinkImpl(target$jscomp$0, props);
1656
- var JSCompiler_inline_result$jscomp$3 = null;
1755
+ var JSCompiler_inline_result$jscomp$4 = null;
1657
1756
  } else if ("stylesheet" === props.rel)
1658
1757
  if (
1659
1758
  "string" !== typeof precedence ||
@@ -1661,7 +1760,7 @@ function pushStartInstance(
1661
1760
  props.onLoad ||
1662
1761
  props.onError
1663
1762
  )
1664
- JSCompiler_inline_result$jscomp$3 = pushLinkImpl(
1763
+ JSCompiler_inline_result$jscomp$4 = pushLinkImpl(
1665
1764
  target$jscomp$0,
1666
1765
  props
1667
1766
  );
@@ -1704,19 +1803,19 @@ function pushStartInstance(
1704
1803
  hoistableState.stylesheets.add(resource$9);
1705
1804
  }
1706
1805
  textEmbedded && target$jscomp$0.push(textSeparator);
1707
- JSCompiler_inline_result$jscomp$3 = null;
1806
+ JSCompiler_inline_result$jscomp$4 = null;
1708
1807
  }
1709
1808
  else
1710
1809
  props.onLoad || props.onError
1711
- ? (JSCompiler_inline_result$jscomp$3 = pushLinkImpl(
1810
+ ? (JSCompiler_inline_result$jscomp$4 = pushLinkImpl(
1712
1811
  target$jscomp$0,
1713
1812
  props
1714
1813
  ))
1715
1814
  : (textEmbedded && target$jscomp$0.push(textSeparator),
1716
- (JSCompiler_inline_result$jscomp$3 = isFallback
1815
+ (JSCompiler_inline_result$jscomp$4 = isFallback
1717
1816
  ? null
1718
1817
  : pushLinkImpl(renderState.hoistableChunks, props)));
1719
- return JSCompiler_inline_result$jscomp$3;
1818
+ return JSCompiler_inline_result$jscomp$4;
1720
1819
  case "script":
1721
1820
  var asyncProp = props.async;
1722
1821
  if (
@@ -1727,11 +1826,11 @@ function pushStartInstance(
1727
1826
  "symbol" === typeof asyncProp ||
1728
1827
  props.onLoad ||
1729
1828
  props.onError ||
1730
- 3 === formatContext.insertionMode ||
1829
+ 4 === formatContext.insertionMode ||
1731
1830
  formatContext.tagScope & 1 ||
1732
1831
  null != props.itemProp
1733
1832
  )
1734
- var JSCompiler_inline_result$jscomp$4 = pushScriptImpl(
1833
+ var JSCompiler_inline_result$jscomp$5 = pushScriptImpl(
1735
1834
  target$jscomp$0,
1736
1835
  props
1737
1836
  );
@@ -1761,14 +1860,14 @@ function pushStartInstance(
1761
1860
  pushScriptImpl(resource$jscomp$0, scriptProps);
1762
1861
  }
1763
1862
  textEmbedded && target$jscomp$0.push(textSeparator);
1764
- JSCompiler_inline_result$jscomp$4 = null;
1863
+ JSCompiler_inline_result$jscomp$5 = null;
1765
1864
  }
1766
- return JSCompiler_inline_result$jscomp$4;
1865
+ return JSCompiler_inline_result$jscomp$5;
1767
1866
  case "style":
1768
1867
  var precedence$jscomp$0 = props.precedence,
1769
1868
  href$jscomp$0 = props.href;
1770
1869
  if (
1771
- 3 === formatContext.insertionMode ||
1870
+ 4 === formatContext.insertionMode ||
1772
1871
  formatContext.tagScope & 1 ||
1773
1872
  null != props.itemProp ||
1774
1873
  "string" !== typeof precedence$jscomp$0 ||
@@ -1776,34 +1875,34 @@ function pushStartInstance(
1776
1875
  "" === href$jscomp$0
1777
1876
  ) {
1778
1877
  target$jscomp$0.push(startChunkForTag("style"));
1779
- var children$jscomp$5 = null,
1780
- innerHTML$jscomp$4 = null,
1781
- propKey$jscomp$7;
1782
- for (propKey$jscomp$7 in props)
1783
- if (hasOwnProperty.call(props, propKey$jscomp$7)) {
1784
- var propValue$jscomp$7 = props[propKey$jscomp$7];
1785
- if (null != propValue$jscomp$7)
1786
- switch (propKey$jscomp$7) {
1878
+ var children$jscomp$6 = null,
1879
+ innerHTML$jscomp$5 = null,
1880
+ propKey$jscomp$8;
1881
+ for (propKey$jscomp$8 in props)
1882
+ if (hasOwnProperty.call(props, propKey$jscomp$8)) {
1883
+ var propValue$jscomp$8 = props[propKey$jscomp$8];
1884
+ if (null != propValue$jscomp$8)
1885
+ switch (propKey$jscomp$8) {
1787
1886
  case "children":
1788
- children$jscomp$5 = propValue$jscomp$7;
1887
+ children$jscomp$6 = propValue$jscomp$8;
1789
1888
  break;
1790
1889
  case "dangerouslySetInnerHTML":
1791
- innerHTML$jscomp$4 = propValue$jscomp$7;
1890
+ innerHTML$jscomp$5 = propValue$jscomp$8;
1792
1891
  break;
1793
1892
  default:
1794
1893
  pushAttribute(
1795
1894
  target$jscomp$0,
1796
- propKey$jscomp$7,
1797
- propValue$jscomp$7
1895
+ propKey$jscomp$8,
1896
+ propValue$jscomp$8
1798
1897
  );
1799
1898
  }
1800
1899
  }
1801
1900
  target$jscomp$0.push(endOfStartTag);
1802
- var child = Array.isArray(children$jscomp$5)
1803
- ? 2 > children$jscomp$5.length
1804
- ? children$jscomp$5[0]
1901
+ var child = Array.isArray(children$jscomp$6)
1902
+ ? 2 > children$jscomp$6.length
1903
+ ? children$jscomp$6[0]
1805
1904
  : null
1806
- : children$jscomp$5;
1905
+ : children$jscomp$6;
1807
1906
  "function" !== typeof child &&
1808
1907
  "symbol" !== typeof child &&
1809
1908
  null !== child &&
@@ -1811,9 +1910,9 @@ function pushStartInstance(
1811
1910
  target$jscomp$0.push(
1812
1911
  stringToChunk(("" + child).replace(styleRegex, styleReplacer))
1813
1912
  );
1814
- pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);
1913
+ pushInnerHTML(target$jscomp$0, innerHTML$jscomp$5, children$jscomp$6);
1815
1914
  target$jscomp$0.push(endChunkForTag("style"));
1816
- var JSCompiler_inline_result$jscomp$5 = null;
1915
+ var JSCompiler_inline_result$jscomp$6 = null;
1817
1916
  } else {
1818
1917
  var styleQueue$jscomp$0 = renderState.styles.get(precedence$jscomp$0);
1819
1918
  if (
@@ -1837,26 +1936,26 @@ function pushStartInstance(
1837
1936
  }),
1838
1937
  renderState.styles.set(precedence$jscomp$0, styleQueue$jscomp$0));
1839
1938
  var target = styleQueue$jscomp$0.rules,
1840
- children$jscomp$6 = null,
1841
- innerHTML$jscomp$5 = null,
1842
- propKey$jscomp$8;
1843
- for (propKey$jscomp$8 in props)
1844
- if (hasOwnProperty.call(props, propKey$jscomp$8)) {
1845
- var propValue$jscomp$8 = props[propKey$jscomp$8];
1846
- if (null != propValue$jscomp$8)
1847
- switch (propKey$jscomp$8) {
1939
+ children$jscomp$7 = null,
1940
+ innerHTML$jscomp$6 = null,
1941
+ propKey$jscomp$9;
1942
+ for (propKey$jscomp$9 in props)
1943
+ if (hasOwnProperty.call(props, propKey$jscomp$9)) {
1944
+ var propValue$jscomp$9 = props[propKey$jscomp$9];
1945
+ if (null != propValue$jscomp$9)
1946
+ switch (propKey$jscomp$9) {
1848
1947
  case "children":
1849
- children$jscomp$6 = propValue$jscomp$8;
1948
+ children$jscomp$7 = propValue$jscomp$9;
1850
1949
  break;
1851
1950
  case "dangerouslySetInnerHTML":
1852
- innerHTML$jscomp$5 = propValue$jscomp$8;
1951
+ innerHTML$jscomp$6 = propValue$jscomp$9;
1853
1952
  }
1854
1953
  }
1855
- var child$jscomp$0 = Array.isArray(children$jscomp$6)
1856
- ? 2 > children$jscomp$6.length
1857
- ? children$jscomp$6[0]
1954
+ var child$jscomp$0 = Array.isArray(children$jscomp$7)
1955
+ ? 2 > children$jscomp$7.length
1956
+ ? children$jscomp$7[0]
1858
1957
  : null
1859
- : children$jscomp$6;
1958
+ : children$jscomp$7;
1860
1959
  "function" !== typeof child$jscomp$0 &&
1861
1960
  "symbol" !== typeof child$jscomp$0 &&
1862
1961
  null !== child$jscomp$0 &&
@@ -1866,85 +1965,85 @@ function pushStartInstance(
1866
1965
  ("" + child$jscomp$0).replace(styleRegex, styleReplacer)
1867
1966
  )
1868
1967
  );
1869
- pushInnerHTML(target, innerHTML$jscomp$5, children$jscomp$6);
1968
+ pushInnerHTML(target, innerHTML$jscomp$6, children$jscomp$7);
1870
1969
  }
1871
1970
  styleQueue$jscomp$0 &&
1872
1971
  hoistableState &&
1873
1972
  hoistableState.styles.add(styleQueue$jscomp$0);
1874
1973
  textEmbedded && target$jscomp$0.push(textSeparator);
1875
- JSCompiler_inline_result$jscomp$5 = void 0;
1974
+ JSCompiler_inline_result$jscomp$6 = void 0;
1876
1975
  }
1877
- return JSCompiler_inline_result$jscomp$5;
1976
+ return JSCompiler_inline_result$jscomp$6;
1878
1977
  case "meta":
1879
1978
  if (
1880
- 3 === formatContext.insertionMode ||
1979
+ 4 === formatContext.insertionMode ||
1881
1980
  formatContext.tagScope & 1 ||
1882
1981
  null != props.itemProp
1883
1982
  )
1884
- var JSCompiler_inline_result$jscomp$6 = pushSelfClosing(
1983
+ var JSCompiler_inline_result$jscomp$7 = pushSelfClosing(
1885
1984
  target$jscomp$0,
1886
1985
  props,
1887
1986
  "meta"
1888
1987
  );
1889
1988
  else
1890
1989
  textEmbedded && target$jscomp$0.push(textSeparator),
1891
- (JSCompiler_inline_result$jscomp$6 = isFallback
1990
+ (JSCompiler_inline_result$jscomp$7 = isFallback
1892
1991
  ? null
1893
1992
  : "string" === typeof props.charSet
1894
- ? pushSelfClosing(renderState.charsetChunks, props, "meta")
1895
- : "viewport" === props.name
1896
- ? pushSelfClosing(renderState.viewportChunks, props, "meta")
1897
- : pushSelfClosing(renderState.hoistableChunks, props, "meta"));
1898
- return JSCompiler_inline_result$jscomp$6;
1993
+ ? pushSelfClosing(renderState.charsetChunks, props, "meta")
1994
+ : "viewport" === props.name
1995
+ ? pushSelfClosing(renderState.viewportChunks, props, "meta")
1996
+ : pushSelfClosing(renderState.hoistableChunks, props, "meta"));
1997
+ return JSCompiler_inline_result$jscomp$7;
1899
1998
  case "listing":
1900
1999
  case "pre":
1901
2000
  target$jscomp$0.push(startChunkForTag(type));
1902
- var children$jscomp$7 = null,
1903
- innerHTML$jscomp$6 = null,
1904
- propKey$jscomp$9;
1905
- for (propKey$jscomp$9 in props)
1906
- if (hasOwnProperty.call(props, propKey$jscomp$9)) {
1907
- var propValue$jscomp$9 = props[propKey$jscomp$9];
1908
- if (null != propValue$jscomp$9)
1909
- switch (propKey$jscomp$9) {
2001
+ var children$jscomp$8 = null,
2002
+ innerHTML$jscomp$7 = null,
2003
+ propKey$jscomp$10;
2004
+ for (propKey$jscomp$10 in props)
2005
+ if (hasOwnProperty.call(props, propKey$jscomp$10)) {
2006
+ var propValue$jscomp$10 = props[propKey$jscomp$10];
2007
+ if (null != propValue$jscomp$10)
2008
+ switch (propKey$jscomp$10) {
1910
2009
  case "children":
1911
- children$jscomp$7 = propValue$jscomp$9;
2010
+ children$jscomp$8 = propValue$jscomp$10;
1912
2011
  break;
1913
2012
  case "dangerouslySetInnerHTML":
1914
- innerHTML$jscomp$6 = propValue$jscomp$9;
2013
+ innerHTML$jscomp$7 = propValue$jscomp$10;
1915
2014
  break;
1916
2015
  default:
1917
2016
  pushAttribute(
1918
2017
  target$jscomp$0,
1919
- propKey$jscomp$9,
1920
- propValue$jscomp$9
2018
+ propKey$jscomp$10,
2019
+ propValue$jscomp$10
1921
2020
  );
1922
2021
  }
1923
2022
  }
1924
2023
  target$jscomp$0.push(endOfStartTag);
1925
- if (null != innerHTML$jscomp$6) {
1926
- if (null != children$jscomp$7)
2024
+ if (null != innerHTML$jscomp$7) {
2025
+ if (null != children$jscomp$8)
1927
2026
  throw Error(
1928
2027
  "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
1929
2028
  );
1930
2029
  if (
1931
- "object" !== typeof innerHTML$jscomp$6 ||
1932
- !("__html" in innerHTML$jscomp$6)
2030
+ "object" !== typeof innerHTML$jscomp$7 ||
2031
+ !("__html" in innerHTML$jscomp$7)
1933
2032
  )
1934
2033
  throw Error(
1935
2034
  "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
1936
2035
  );
1937
- var html = innerHTML$jscomp$6.__html;
2036
+ var html = innerHTML$jscomp$7.__html;
1938
2037
  null !== html &&
1939
2038
  void 0 !== html &&
1940
2039
  ("string" === typeof html && 0 < html.length && "\n" === html[0]
1941
2040
  ? target$jscomp$0.push(leadingNewline, stringToChunk(html))
1942
2041
  : target$jscomp$0.push(stringToChunk("" + html)));
1943
2042
  }
1944
- "string" === typeof children$jscomp$7 &&
1945
- "\n" === children$jscomp$7[0] &&
2043
+ "string" === typeof children$jscomp$8 &&
2044
+ "\n" === children$jscomp$8[0] &&
1946
2045
  target$jscomp$0.push(leadingNewline);
1947
- return children$jscomp$7;
2046
+ return children$jscomp$8;
1948
2047
  case "img":
1949
2048
  var src = props.src,
1950
2049
  srcSet = props.srcSet;
@@ -1986,7 +2085,7 @@ function pushStartInstance(
1986
2085
  ) {
1987
2086
  resumableState.imageResources[key$jscomp$0] = PRELOAD_NO_CREDS;
1988
2087
  var input = props.crossOrigin;
1989
- var JSCompiler_inline_result$jscomp$7 =
2088
+ var JSCompiler_inline_result$jscomp$8 =
1990
2089
  "string" === typeof input
1991
2090
  ? "use-credentials" === input
1992
2091
  ? input
@@ -1996,19 +2095,20 @@ function pushStartInstance(
1996
2095
  header;
1997
2096
  headers &&
1998
2097
  0 < headers.remainingCapacity &&
2098
+ "string" !== typeof props.srcSet &&
1999
2099
  ("high" === props.fetchPriority ||
2000
2100
  500 > headers.highImagePreloads.length) &&
2001
2101
  ((header = getPreloadAsHeader(src, "image", {
2002
2102
  imageSrcSet: props.srcSet,
2003
2103
  imageSizes: props.sizes,
2004
- crossOrigin: JSCompiler_inline_result$jscomp$7,
2104
+ crossOrigin: JSCompiler_inline_result$jscomp$8,
2005
2105
  integrity: props.integrity,
2006
2106
  nonce: props.nonce,
2007
2107
  type: props.type,
2008
2108
  fetchPriority: props.fetchPriority,
2009
2109
  referrerPolicy: props.refererPolicy
2010
2110
  })),
2011
- 2 <= (headers.remainingCapacity -= header.length))
2111
+ 0 <= (headers.remainingCapacity -= header.length + 2))
2012
2112
  ? ((renderState.resets.image[key$jscomp$0] = PRELOAD_NO_CREDS),
2013
2113
  headers.highImagePreloads && (headers.highImagePreloads += ", "),
2014
2114
  (headers.highImagePreloads += header))
@@ -2019,7 +2119,7 @@ function pushStartInstance(
2019
2119
  href: srcSet ? void 0 : src,
2020
2120
  imageSrcSet: srcSet,
2021
2121
  imageSizes: sizes,
2022
- crossOrigin: JSCompiler_inline_result$jscomp$7,
2122
+ crossOrigin: JSCompiler_inline_result$jscomp$8,
2023
2123
  integrity: props.integrity,
2024
2124
  type: props.type,
2025
2125
  fetchPriority: props.fetchPriority,
@@ -2055,58 +2155,79 @@ function pushStartInstance(
2055
2155
  case "missing-glyph":
2056
2156
  break;
2057
2157
  case "head":
2058
- if (2 > formatContext.insertionMode && null === renderState.headChunks) {
2059
- renderState.headChunks = [];
2060
- var JSCompiler_inline_result$jscomp$8 = pushStartGenericElement(
2061
- renderState.headChunks,
2158
+ if (2 > formatContext.insertionMode) {
2159
+ var preamble = preambleState || renderState.preamble;
2160
+ if (preamble.headChunks)
2161
+ throw Error("The `<head>` tag may only be rendered once.");
2162
+ preamble.headChunks = [];
2163
+ var JSCompiler_inline_result$jscomp$9 = pushStartSingletonElement(
2164
+ preamble.headChunks,
2062
2165
  props,
2063
2166
  "head"
2064
2167
  );
2065
2168
  } else
2066
- JSCompiler_inline_result$jscomp$8 = pushStartGenericElement(
2169
+ JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
2067
2170
  target$jscomp$0,
2068
2171
  props,
2069
2172
  "head"
2070
2173
  );
2071
- return JSCompiler_inline_result$jscomp$8;
2174
+ return JSCompiler_inline_result$jscomp$9;
2175
+ case "body":
2176
+ if (2 > formatContext.insertionMode) {
2177
+ var preamble$jscomp$0 = preambleState || renderState.preamble;
2178
+ if (preamble$jscomp$0.bodyChunks)
2179
+ throw Error("The `<body>` tag may only be rendered once.");
2180
+ preamble$jscomp$0.bodyChunks = [];
2181
+ var JSCompiler_inline_result$jscomp$10 = pushStartSingletonElement(
2182
+ preamble$jscomp$0.bodyChunks,
2183
+ props,
2184
+ "body"
2185
+ );
2186
+ } else
2187
+ JSCompiler_inline_result$jscomp$10 = pushStartGenericElement(
2188
+ target$jscomp$0,
2189
+ props,
2190
+ "body"
2191
+ );
2192
+ return JSCompiler_inline_result$jscomp$10;
2072
2193
  case "html":
2073
- if (
2074
- 0 === formatContext.insertionMode &&
2075
- null === renderState.htmlChunks
2076
- ) {
2077
- renderState.htmlChunks = [doctypeChunk];
2078
- var JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
2079
- renderState.htmlChunks,
2194
+ if (0 === formatContext.insertionMode) {
2195
+ var preamble$jscomp$1 = preambleState || renderState.preamble;
2196
+ if (preamble$jscomp$1.htmlChunks)
2197
+ throw Error("The `<html>` tag may only be rendered once.");
2198
+ preamble$jscomp$1.htmlChunks = [doctypeChunk];
2199
+ var JSCompiler_inline_result$jscomp$11 = pushStartSingletonElement(
2200
+ preamble$jscomp$1.htmlChunks,
2080
2201
  props,
2081
2202
  "html"
2082
2203
  );
2083
2204
  } else
2084
- JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
2205
+ JSCompiler_inline_result$jscomp$11 = pushStartGenericElement(
2085
2206
  target$jscomp$0,
2086
2207
  props,
2087
2208
  "html"
2088
2209
  );
2089
- return JSCompiler_inline_result$jscomp$9;
2210
+ return JSCompiler_inline_result$jscomp$11;
2090
2211
  default:
2091
2212
  if (-1 !== type.indexOf("-")) {
2092
2213
  target$jscomp$0.push(startChunkForTag(type));
2093
- var children$jscomp$8 = null,
2094
- innerHTML$jscomp$7 = null,
2095
- propKey$jscomp$10;
2096
- for (propKey$jscomp$10 in props)
2097
- if (hasOwnProperty.call(props, propKey$jscomp$10)) {
2098
- var propValue$jscomp$10 = props[propKey$jscomp$10];
2099
- if (null != propValue$jscomp$10) {
2100
- var attributeName = propKey$jscomp$10;
2101
- switch (propKey$jscomp$10) {
2214
+ var children$jscomp$9 = null,
2215
+ innerHTML$jscomp$8 = null,
2216
+ propKey$jscomp$11;
2217
+ for (propKey$jscomp$11 in props)
2218
+ if (hasOwnProperty.call(props, propKey$jscomp$11)) {
2219
+ var propValue$jscomp$11 = props[propKey$jscomp$11];
2220
+ if (null != propValue$jscomp$11) {
2221
+ var attributeName = propKey$jscomp$11;
2222
+ switch (propKey$jscomp$11) {
2102
2223
  case "children":
2103
- children$jscomp$8 = propValue$jscomp$10;
2224
+ children$jscomp$9 = propValue$jscomp$11;
2104
2225
  break;
2105
2226
  case "dangerouslySetInnerHTML":
2106
- innerHTML$jscomp$7 = propValue$jscomp$10;
2227
+ innerHTML$jscomp$8 = propValue$jscomp$11;
2107
2228
  break;
2108
2229
  case "style":
2109
- pushStyleAttribute(target$jscomp$0, propValue$jscomp$10);
2230
+ pushStyleAttribute(target$jscomp$0, propValue$jscomp$11);
2110
2231
  break;
2111
2232
  case "suppressContentEditableWarning":
2112
2233
  case "suppressHydrationWarning":
@@ -2116,18 +2237,18 @@ function pushStartInstance(
2116
2237
  attributeName = "class";
2117
2238
  default:
2118
2239
  if (
2119
- isAttributeNameSafe(propKey$jscomp$10) &&
2120
- "function" !== typeof propValue$jscomp$10 &&
2121
- "symbol" !== typeof propValue$jscomp$10 &&
2122
- !1 !== propValue$jscomp$10
2240
+ isAttributeNameSafe(propKey$jscomp$11) &&
2241
+ "function" !== typeof propValue$jscomp$11 &&
2242
+ "symbol" !== typeof propValue$jscomp$11 &&
2243
+ !1 !== propValue$jscomp$11
2123
2244
  ) {
2124
- if (!0 === propValue$jscomp$10) propValue$jscomp$10 = "";
2125
- else if ("object" === typeof propValue$jscomp$10) continue;
2245
+ if (!0 === propValue$jscomp$11) propValue$jscomp$11 = "";
2246
+ else if ("object" === typeof propValue$jscomp$11) continue;
2126
2247
  target$jscomp$0.push(
2127
2248
  attributeSeparator,
2128
2249
  stringToChunk(attributeName),
2129
2250
  attributeAssign,
2130
- stringToChunk(escapeTextForBrowser(propValue$jscomp$10)),
2251
+ stringToChunk(escapeTextForBrowser(propValue$jscomp$11)),
2131
2252
  attributeEnd
2132
2253
  );
2133
2254
  }
@@ -2135,8 +2256,8 @@ function pushStartInstance(
2135
2256
  }
2136
2257
  }
2137
2258
  target$jscomp$0.push(endOfStartTag);
2138
- pushInnerHTML(target$jscomp$0, innerHTML$jscomp$7, children$jscomp$8);
2139
- return children$jscomp$8;
2259
+ pushInnerHTML(target$jscomp$0, innerHTML$jscomp$8, children$jscomp$9);
2260
+ return children$jscomp$9;
2140
2261
  }
2141
2262
  }
2142
2263
  return pushStartGenericElement(target$jscomp$0, props, type);
@@ -2149,6 +2270,21 @@ function endChunkForTag(tag) {
2149
2270
  endTagCache.set(tag, chunk));
2150
2271
  return chunk;
2151
2272
  }
2273
+ function hoistPreambleState(renderState, preambleState) {
2274
+ renderState = renderState.preamble;
2275
+ null === renderState.htmlChunks &&
2276
+ preambleState.htmlChunks &&
2277
+ ((renderState.htmlChunks = preambleState.htmlChunks),
2278
+ (preambleState.contribution |= 1));
2279
+ null === renderState.headChunks &&
2280
+ preambleState.headChunks &&
2281
+ ((renderState.headChunks = preambleState.headChunks),
2282
+ (preambleState.contribution |= 4));
2283
+ null === renderState.bodyChunks &&
2284
+ preambleState.bodyChunks &&
2285
+ ((renderState.bodyChunks = preambleState.bodyChunks),
2286
+ (preambleState.contribution |= 2));
2287
+ }
2152
2288
  function writeBootstrap(destination, renderState) {
2153
2289
  renderState = renderState.bootstrapChunks;
2154
2290
  for (var i = 0; i < renderState.length - 1; i++)
@@ -2189,6 +2325,16 @@ function writeStartPendingSuspenseBoundary(destination, renderState, id) {
2189
2325
  writeChunk(destination, stringToChunk(id.toString(16)));
2190
2326
  return writeChunkAndReturn(destination, startPendingSuspenseBoundary2);
2191
2327
  }
2328
+ var boundaryPreambleContributionChunkStart =
2329
+ stringToPrecomputedChunk("\x3c!--"),
2330
+ boundaryPreambleContributionChunkEnd = stringToPrecomputedChunk("--\x3e");
2331
+ function writePreambleContribution(destination, preambleState) {
2332
+ preambleState = preambleState.contribution;
2333
+ 0 !== preambleState &&
2334
+ (writeChunk(destination, boundaryPreambleContributionChunkStart),
2335
+ writeChunk(destination, stringToChunk("" + preambleState)),
2336
+ writeChunk(destination, boundaryPreambleContributionChunkEnd));
2337
+ }
2192
2338
  var startSegmentHTML = stringToPrecomputedChunk('<div hidden id="'),
2193
2339
  startSegmentHTML2 = stringToPrecomputedChunk('">'),
2194
2340
  endSegmentHTML = stringToPrecomputedChunk("</div>"),
@@ -2220,6 +2366,7 @@ function writeStartSegment(destination, renderState, formatContext, id) {
2220
2366
  switch (formatContext.insertionMode) {
2221
2367
  case 0:
2222
2368
  case 1:
2369
+ case 3:
2223
2370
  case 2:
2224
2371
  return (
2225
2372
  writeChunk(destination, startSegmentHTML),
@@ -2227,42 +2374,42 @@ function writeStartSegment(destination, renderState, formatContext, id) {
2227
2374
  writeChunk(destination, stringToChunk(id.toString(16))),
2228
2375
  writeChunkAndReturn(destination, startSegmentHTML2)
2229
2376
  );
2230
- case 3:
2377
+ case 4:
2231
2378
  return (
2232
2379
  writeChunk(destination, startSegmentSVG),
2233
2380
  writeChunk(destination, renderState.segmentPrefix),
2234
2381
  writeChunk(destination, stringToChunk(id.toString(16))),
2235
2382
  writeChunkAndReturn(destination, startSegmentSVG2)
2236
2383
  );
2237
- case 4:
2384
+ case 5:
2238
2385
  return (
2239
2386
  writeChunk(destination, startSegmentMathML),
2240
2387
  writeChunk(destination, renderState.segmentPrefix),
2241
2388
  writeChunk(destination, stringToChunk(id.toString(16))),
2242
2389
  writeChunkAndReturn(destination, startSegmentMathML2)
2243
2390
  );
2244
- case 5:
2391
+ case 6:
2245
2392
  return (
2246
2393
  writeChunk(destination, startSegmentTable),
2247
2394
  writeChunk(destination, renderState.segmentPrefix),
2248
2395
  writeChunk(destination, stringToChunk(id.toString(16))),
2249
2396
  writeChunkAndReturn(destination, startSegmentTable2)
2250
2397
  );
2251
- case 6:
2398
+ case 7:
2252
2399
  return (
2253
2400
  writeChunk(destination, startSegmentTableBody),
2254
2401
  writeChunk(destination, renderState.segmentPrefix),
2255
2402
  writeChunk(destination, stringToChunk(id.toString(16))),
2256
2403
  writeChunkAndReturn(destination, startSegmentTableBody2)
2257
2404
  );
2258
- case 7:
2405
+ case 8:
2259
2406
  return (
2260
2407
  writeChunk(destination, startSegmentTableRow),
2261
2408
  writeChunk(destination, renderState.segmentPrefix),
2262
2409
  writeChunk(destination, stringToChunk(id.toString(16))),
2263
2410
  writeChunkAndReturn(destination, startSegmentTableRow2)
2264
2411
  );
2265
- case 8:
2412
+ case 9:
2266
2413
  return (
2267
2414
  writeChunk(destination, startSegmentColGroup),
2268
2415
  writeChunk(destination, renderState.segmentPrefix),
@@ -2277,19 +2424,20 @@ function writeEndSegment(destination, formatContext) {
2277
2424
  switch (formatContext.insertionMode) {
2278
2425
  case 0:
2279
2426
  case 1:
2427
+ case 3:
2280
2428
  case 2:
2281
2429
  return writeChunkAndReturn(destination, endSegmentHTML);
2282
- case 3:
2283
- return writeChunkAndReturn(destination, endSegmentSVG);
2284
2430
  case 4:
2285
- return writeChunkAndReturn(destination, endSegmentMathML);
2431
+ return writeChunkAndReturn(destination, endSegmentSVG);
2286
2432
  case 5:
2287
- return writeChunkAndReturn(destination, endSegmentTable);
2433
+ return writeChunkAndReturn(destination, endSegmentMathML);
2288
2434
  case 6:
2289
- return writeChunkAndReturn(destination, endSegmentTableBody);
2435
+ return writeChunkAndReturn(destination, endSegmentTable);
2290
2436
  case 7:
2291
- return writeChunkAndReturn(destination, endSegmentTableRow);
2437
+ return writeChunkAndReturn(destination, endSegmentTableBody);
2292
2438
  case 8:
2439
+ return writeChunkAndReturn(destination, endSegmentTableRow);
2440
+ case 9:
2293
2441
  return writeChunkAndReturn(destination, endSegmentColGroup);
2294
2442
  default:
2295
2443
  throw Error("Unknown insertion mode. This is a bug in React.");
@@ -2308,10 +2456,10 @@ var completeBoundaryScript1Full = stringToPrecomputedChunk(
2308
2456
  ),
2309
2457
  completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'),
2310
2458
  completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(
2311
- '$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(r,t,w){for(var u=$RC,n=$RM,p=new Map,q=document,g,b,h=q.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=h[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&n.set(b.getAttribute("href"),b),p.set(b.dataset.precedence,g=b));b=0;h=[];var l,a;for(k=!0;;){if(k){var f=w[b++];if(!f){k=!1;b=0;continue}var c=!1,m=0;var d=f[m++];if(a=n.get(d)){var e=a._p;c=!0}else{a=q.createElement("link");a.href=d;a.rel="stylesheet";for(a.dataset.precedence=\nl=f[m++];e=f[m++];)a.setAttribute(e,f[m++]);e=a._p=new Promise(function(x,y){a.onload=x;a.onerror=y});n.set(d,a)}d=a.getAttribute("media");!e||"l"===e.s||d&&!matchMedia(d).matches||h.push(e);if(c)continue}else{a=v[b++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=p.get(l)||g;c===g&&(g=a);p.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=q.head,c.insertBefore(a,c.firstChild))}Promise.all(h).then(u.bind(null,r,t,""),u.bind(null,r,t,"Resource failed to load"))};$RR("'
2459
+ '$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("'
2312
2460
  ),
2313
2461
  completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(
2314
- '$RM=new Map;\n$RR=function(r,t,w){for(var u=$RC,n=$RM,p=new Map,q=document,g,b,h=q.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=h[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&n.set(b.getAttribute("href"),b),p.set(b.dataset.precedence,g=b));b=0;h=[];var l,a;for(k=!0;;){if(k){var f=w[b++];if(!f){k=!1;b=0;continue}var c=!1,m=0;var d=f[m++];if(a=n.get(d)){var e=a._p;c=!0}else{a=q.createElement("link");a.href=d;a.rel="stylesheet";for(a.dataset.precedence=\nl=f[m++];e=f[m++];)a.setAttribute(e,f[m++]);e=a._p=new Promise(function(x,y){a.onload=x;a.onerror=y});n.set(d,a)}d=a.getAttribute("media");!e||"l"===e.s||d&&!matchMedia(d).matches||h.push(e);if(c)continue}else{a=v[b++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=p.get(l)||g;c===g&&(g=a);p.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=q.head,c.insertBefore(a,c.firstChild))}Promise.all(h).then(u.bind(null,r,t,""),u.bind(null,r,t,"Resource failed to load"))};$RR("'
2462
+ '$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("'
2315
2463
  ),
2316
2464
  completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR("'),
2317
2465
  completeBoundaryScript2 = stringToPrecomputedChunk('","'),
@@ -2633,7 +2781,7 @@ function prefetchDNS(href) {
2633
2781
  escapeHrefForLinkHeaderURLContextReplacer
2634
2782
  ) +
2635
2783
  ">; rel=dns-prefetch"),
2636
- 2 <= (resumableState.remainingCapacity -= header.length));
2784
+ 0 <= (resumableState.remainingCapacity -= header.length + 2));
2637
2785
  JSCompiler_temp
2638
2786
  ? ((renderState.resets.dns[href] = null),
2639
2787
  resumableState.preconnects && (resumableState.preconnects += ", "),
@@ -2656,8 +2804,8 @@ function preconnect(href, crossOrigin) {
2656
2804
  "use-credentials" === crossOrigin
2657
2805
  ? "credentials"
2658
2806
  : "string" === typeof crossOrigin
2659
- ? "anonymous"
2660
- : "default";
2807
+ ? "anonymous"
2808
+ : "default";
2661
2809
  if (!resumableState.connectResources[bucket].hasOwnProperty(href)) {
2662
2810
  resumableState.connectResources[bucket][href] = null;
2663
2811
  resumableState = renderState.headers;
@@ -2682,7 +2830,7 @@ function preconnect(href, crossOrigin) {
2682
2830
  }
2683
2831
  JSCompiler_temp =
2684
2832
  ((header = JSCompiler_temp),
2685
- 2 <= (resumableState.remainingCapacity -= header.length));
2833
+ 0 <= (resumableState.remainingCapacity -= header.length + 2));
2686
2834
  }
2687
2835
  JSCompiler_temp
2688
2836
  ? ((renderState.resets.connect[bucket][href] = null),
@@ -2722,9 +2870,10 @@ function preload(href, as, options) {
2722
2870
  var header;
2723
2871
  resumableState &&
2724
2872
  0 < resumableState.remainingCapacity &&
2873
+ "string" !== typeof imageSrcSet &&
2725
2874
  "high" === fetchPriority &&
2726
2875
  ((header = getPreloadAsHeader(href, as, options)),
2727
- 2 <= (resumableState.remainingCapacity -= header.length))
2876
+ 0 <= (resumableState.remainingCapacity -= header.length + 2))
2728
2877
  ? ((renderState.resets.image[key] = PRELOAD_NO_CREDS),
2729
2878
  resumableState.highImagePreloads &&
2730
2879
  (resumableState.highImagePreloads += ", "),
@@ -2790,7 +2939,7 @@ function preload(href, as, options) {
2790
2939
  0 < resumableState.remainingCapacity &&
2791
2940
  "font" === as &&
2792
2941
  ((key = getPreloadAsHeader(href, as, options)),
2793
- 2 <= (resumableState.remainingCapacity -= key.length))
2942
+ 0 <= (resumableState.remainingCapacity -= key.length + 2))
2794
2943
  )
2795
2944
  (renderState.resets.font[href] = PRELOAD_NO_CREDS),
2796
2945
  resumableState.fontPreloads &&
@@ -3013,7 +3162,8 @@ function hoistStyleQueueDependency(styleQueue) {
3013
3162
  function hoistStylesheetDependency(stylesheet) {
3014
3163
  this.stylesheets.add(stylesheet);
3015
3164
  }
3016
- var supportsRequestStorage = "function" === typeof AsyncLocalStorage,
3165
+ var bind = Function.prototype.bind,
3166
+ supportsRequestStorage = "function" === typeof AsyncLocalStorage,
3017
3167
  requestStorage = supportsRequestStorage ? new AsyncLocalStorage() : null,
3018
3168
  REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
3019
3169
  function getComponentNameFromType(type) {
@@ -3026,8 +3176,6 @@ function getComponentNameFromType(type) {
3026
3176
  switch (type) {
3027
3177
  case REACT_FRAGMENT_TYPE:
3028
3178
  return "Fragment";
3029
- case REACT_PORTAL_TYPE:
3030
- return "Portal";
3031
3179
  case REACT_PROFILER_TYPE:
3032
3180
  return "Profiler";
3033
3181
  case REACT_STRICT_MODE_TYPE:
@@ -3036,9 +3184,13 @@ function getComponentNameFromType(type) {
3036
3184
  return "Suspense";
3037
3185
  case REACT_SUSPENSE_LIST_TYPE:
3038
3186
  return "SuspenseList";
3187
+ case REACT_ACTIVITY_TYPE:
3188
+ return "Activity";
3039
3189
  }
3040
3190
  if ("object" === typeof type)
3041
3191
  switch (type.$$typeof) {
3192
+ case REACT_PORTAL_TYPE:
3193
+ return "Portal";
3042
3194
  case REACT_CONTEXT_TYPE:
3043
3195
  return (type.displayName || "Context") + ".Provider";
3044
3196
  case REACT_CONSUMER_TYPE:
@@ -3126,18 +3278,15 @@ function switchContext(newSnapshot) {
3126
3278
  (null === prev
3127
3279
  ? pushAllNext(newSnapshot)
3128
3280
  : null === newSnapshot
3129
- ? popAllPrevious(prev)
3130
- : prev.depth === newSnapshot.depth
3131
- ? popToNearestCommonAncestor(prev, newSnapshot)
3132
- : prev.depth > newSnapshot.depth
3133
- ? popPreviousToCommonLevel(prev, newSnapshot)
3134
- : popNextToCommonLevel(prev, newSnapshot),
3281
+ ? popAllPrevious(prev)
3282
+ : prev.depth === newSnapshot.depth
3283
+ ? popToNearestCommonAncestor(prev, newSnapshot)
3284
+ : prev.depth > newSnapshot.depth
3285
+ ? popPreviousToCommonLevel(prev, newSnapshot)
3286
+ : popNextToCommonLevel(prev, newSnapshot),
3135
3287
  (currentActiveSnapshot = newSnapshot));
3136
3288
  }
3137
3289
  var classComponentUpdater = {
3138
- isMounted: function () {
3139
- return !1;
3140
- },
3141
3290
  enqueueSetState: function (inst, payload) {
3142
3291
  inst = inst._reactInternals;
3143
3292
  null !== inst.queue && inst.queue.push(payload);
@@ -3186,7 +3335,7 @@ function clz32Fallback(x) {
3186
3335
  return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
3187
3336
  }
3188
3337
  var SuspenseException = Error(
3189
- "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`"
3338
+ "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`."
3190
3339
  );
3191
3340
  function noop$2() {}
3192
3341
  function trackUsedThenable(thenableState, thenable, index) {
@@ -3278,9 +3427,9 @@ function createWorkInProgressHook() {
3278
3427
  (firstWorkInProgressHook = workInProgressHook = createHook()))
3279
3428
  : ((isReRender = !0), (workInProgressHook = firstWorkInProgressHook))
3280
3429
  : null === workInProgressHook.next
3281
- ? ((isReRender = !1),
3282
- (workInProgressHook = workInProgressHook.next = createHook()))
3283
- : ((isReRender = !0), (workInProgressHook = workInProgressHook.next));
3430
+ ? ((isReRender = !1),
3431
+ (workInProgressHook = workInProgressHook.next = createHook()))
3432
+ : ((isReRender = !0), (workInProgressHook = workInProgressHook.next));
3284
3433
  return workInProgressHook;
3285
3434
  }
3286
3435
  function getThenableStateAfterSuspending() {
@@ -3327,8 +3476,8 @@ function useReducer(reducer, initialArg, init) {
3327
3476
  ? initialArg()
3328
3477
  : initialArg
3329
3478
  : void 0 !== init
3330
- ? init(initialArg)
3331
- : initialArg;
3479
+ ? init(initialArg)
3480
+ : initialArg;
3332
3481
  workInProgressHook.memoizedState = reducer;
3333
3482
  reducer = workInProgressHook.queue = { last: null, dispatch: null };
3334
3483
  reducer = reducer.dispatch = dispatchAction.bind(
@@ -3460,100 +3609,111 @@ function unsupportedRefresh() {
3460
3609
  }
3461
3610
  function noop$1() {}
3462
3611
  var HooksDispatcher = {
3463
- readContext: function (context) {
3464
- return context._currentValue;
3465
- },
3466
- use: function (usable) {
3467
- if (null !== usable && "object" === typeof usable) {
3468
- if ("function" === typeof usable.then) return unwrapThenable(usable);
3469
- if (usable.$$typeof === REACT_CONTEXT_TYPE) return usable._currentValue;
3612
+ readContext: function (context) {
3613
+ return context._currentValue;
3614
+ },
3615
+ use: function (usable) {
3616
+ if (null !== usable && "object" === typeof usable) {
3617
+ if ("function" === typeof usable.then) return unwrapThenable(usable);
3618
+ if (usable.$$typeof === REACT_CONTEXT_TYPE) return usable._currentValue;
3619
+ }
3620
+ throw Error("An unsupported type was passed to use(): " + String(usable));
3621
+ },
3622
+ useContext: function (context) {
3623
+ resolveCurrentlyRenderingComponent();
3624
+ return context._currentValue;
3625
+ },
3626
+ useMemo: useMemo,
3627
+ useReducer: useReducer,
3628
+ useRef: function (initialValue) {
3629
+ currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
3630
+ workInProgressHook = createWorkInProgressHook();
3631
+ var previousRef = workInProgressHook.memoizedState;
3632
+ return null === previousRef
3633
+ ? ((initialValue = { current: initialValue }),
3634
+ (workInProgressHook.memoizedState = initialValue))
3635
+ : previousRef;
3636
+ },
3637
+ useState: function (initialState) {
3638
+ return useReducer(basicStateReducer, initialState);
3639
+ },
3640
+ useInsertionEffect: noop$1,
3641
+ useLayoutEffect: noop$1,
3642
+ useCallback: function (callback, deps) {
3643
+ return useMemo(function () {
3644
+ return callback;
3645
+ }, deps);
3646
+ },
3647
+ useImperativeHandle: noop$1,
3648
+ useEffect: noop$1,
3649
+ useDebugValue: noop$1,
3650
+ useDeferredValue: function (value, initialValue) {
3651
+ resolveCurrentlyRenderingComponent();
3652
+ return void 0 !== initialValue ? initialValue : value;
3653
+ },
3654
+ useTransition: function () {
3655
+ resolveCurrentlyRenderingComponent();
3656
+ return [!1, unsupportedStartTransition];
3657
+ },
3658
+ useId: function () {
3659
+ var JSCompiler_inline_result = currentlyRenderingTask.treeContext;
3660
+ var overflow = JSCompiler_inline_result.overflow;
3661
+ JSCompiler_inline_result = JSCompiler_inline_result.id;
3662
+ JSCompiler_inline_result =
3663
+ (
3664
+ JSCompiler_inline_result &
3665
+ ~(1 << (32 - clz32(JSCompiler_inline_result) - 1))
3666
+ ).toString(32) + overflow;
3667
+ var resumableState = currentResumableState;
3668
+ if (null === resumableState)
3669
+ throw Error(
3670
+ "Invalid hook call. Hooks can only be called inside of the body of a function component."
3671
+ );
3672
+ overflow = localIdCounter++;
3673
+ JSCompiler_inline_result =
3674
+ "\u00ab" + resumableState.idPrefix + "R" + JSCompiler_inline_result;
3675
+ 0 < overflow && (JSCompiler_inline_result += "H" + overflow.toString(32));
3676
+ return JSCompiler_inline_result + "\u00bb";
3677
+ },
3678
+ useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
3679
+ if (void 0 === getServerSnapshot)
3680
+ throw Error(
3681
+ "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
3682
+ );
3683
+ return getServerSnapshot();
3684
+ },
3685
+ useOptimistic: function (passthrough) {
3686
+ resolveCurrentlyRenderingComponent();
3687
+ return [passthrough, unsupportedSetOptimisticState];
3688
+ },
3689
+ useActionState: useActionState,
3690
+ useFormState: useActionState,
3691
+ useHostTransitionStatus: function () {
3692
+ resolveCurrentlyRenderingComponent();
3693
+ return sharedNotPendingObject;
3694
+ },
3695
+ useMemoCache: function (size) {
3696
+ for (var data = Array(size), i = 0; i < size; i++)
3697
+ data[i] = REACT_MEMO_CACHE_SENTINEL;
3698
+ return data;
3699
+ },
3700
+ useCacheRefresh: function () {
3701
+ return unsupportedRefresh;
3470
3702
  }
3471
- throw Error("An unsupported type was passed to use(): " + String(usable));
3472
- },
3473
- useContext: function (context) {
3474
- resolveCurrentlyRenderingComponent();
3475
- return context._currentValue;
3476
- },
3477
- useMemo: useMemo,
3478
- useReducer: useReducer,
3479
- useRef: function (initialValue) {
3480
- currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
3481
- workInProgressHook = createWorkInProgressHook();
3482
- var previousRef = workInProgressHook.memoizedState;
3483
- return null === previousRef
3484
- ? ((initialValue = { current: initialValue }),
3485
- (workInProgressHook.memoizedState = initialValue))
3486
- : previousRef;
3487
- },
3488
- useState: function (initialState) {
3489
- return useReducer(basicStateReducer, initialState);
3490
- },
3491
- useInsertionEffect: noop$1,
3492
- useLayoutEffect: noop$1,
3493
- useCallback: function (callback, deps) {
3494
- return useMemo(function () {
3495
- return callback;
3496
- }, deps);
3497
- },
3498
- useImperativeHandle: noop$1,
3499
- useEffect: noop$1,
3500
- useDebugValue: noop$1,
3501
- useDeferredValue: function (value, initialValue) {
3502
- resolveCurrentlyRenderingComponent();
3503
- return void 0 !== initialValue ? initialValue : value;
3504
- },
3505
- useTransition: function () {
3506
- resolveCurrentlyRenderingComponent();
3507
- return [!1, unsupportedStartTransition];
3508
- },
3509
- useId: function () {
3510
- var JSCompiler_inline_result = currentlyRenderingTask.treeContext;
3511
- var overflow = JSCompiler_inline_result.overflow;
3512
- JSCompiler_inline_result = JSCompiler_inline_result.id;
3513
- JSCompiler_inline_result =
3514
- (
3515
- JSCompiler_inline_result &
3516
- ~(1 << (32 - clz32(JSCompiler_inline_result) - 1))
3517
- ).toString(32) + overflow;
3518
- var resumableState = currentResumableState;
3519
- if (null === resumableState)
3520
- throw Error(
3521
- "Invalid hook call. Hooks can only be called inside of the body of a function component."
3522
- );
3523
- overflow = localIdCounter++;
3524
- JSCompiler_inline_result =
3525
- ":" + resumableState.idPrefix + "R" + JSCompiler_inline_result;
3526
- 0 < overflow && (JSCompiler_inline_result += "H" + overflow.toString(32));
3527
- return JSCompiler_inline_result + ":";
3528
- },
3529
- useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
3530
- if (void 0 === getServerSnapshot)
3531
- throw Error(
3532
- "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
3533
- );
3534
- return getServerSnapshot();
3535
3703
  },
3536
- useCacheRefresh: function () {
3537
- return unsupportedRefresh;
3538
- },
3539
- useHostTransitionStatus: function () {
3540
- resolveCurrentlyRenderingComponent();
3541
- return sharedNotPendingObject;
3542
- },
3543
- useOptimistic: function (passthrough) {
3544
- resolveCurrentlyRenderingComponent();
3545
- return [passthrough, unsupportedSetOptimisticState];
3546
- }
3547
- };
3548
- HooksDispatcher.useFormState = useActionState;
3549
- HooksDispatcher.useActionState = useActionState;
3550
- var currentResumableState = null,
3704
+ currentResumableState = null,
3551
3705
  DefaultAsyncDispatcher = {
3552
3706
  getCacheForType: function () {
3553
3707
  throw Error("Not implemented.");
3554
3708
  }
3555
- },
3556
- prefix;
3709
+ };
3710
+ function prepareStackTrace(error, structuredStackTrace) {
3711
+ error = (error.name || "Error") + ": " + (error.message || "");
3712
+ for (var i = 0; i < structuredStackTrace.length; i++)
3713
+ error += "\n at " + structuredStackTrace[i].toString();
3714
+ return error;
3715
+ }
3716
+ var prefix, suffix;
3557
3717
  function describeBuiltInComponentFrame(name) {
3558
3718
  if (void 0 === prefix)
3559
3719
  try {
@@ -3561,71 +3721,79 @@ function describeBuiltInComponentFrame(name) {
3561
3721
  } catch (x) {
3562
3722
  var match = x.stack.trim().match(/\n( *(at )?)/);
3563
3723
  prefix = (match && match[1]) || "";
3724
+ suffix =
3725
+ -1 < x.stack.indexOf("\n at")
3726
+ ? " (<anonymous>)"
3727
+ : -1 < x.stack.indexOf("@")
3728
+ ? "@unknown:0:0"
3729
+ : "";
3564
3730
  }
3565
- return "\n" + prefix + name;
3731
+ return "\n" + prefix + name + suffix;
3566
3732
  }
3567
3733
  var reentry = !1;
3568
3734
  function describeNativeComponentFrame(fn, construct) {
3569
3735
  if (!fn || reentry) return "";
3570
3736
  reentry = !0;
3571
3737
  var previousPrepareStackTrace = Error.prepareStackTrace;
3572
- Error.prepareStackTrace = void 0;
3573
- var RunInRootFrame = {
3574
- DetermineComponentFrameRoot: function () {
3575
- try {
3576
- if (construct) {
3577
- var Fake = function () {
3578
- throw Error();
3579
- };
3580
- Object.defineProperty(Fake.prototype, "props", {
3581
- set: function () {
3738
+ Error.prepareStackTrace = prepareStackTrace;
3739
+ try {
3740
+ var RunInRootFrame = {
3741
+ DetermineComponentFrameRoot: function () {
3742
+ try {
3743
+ if (construct) {
3744
+ var Fake = function () {
3582
3745
  throw Error();
3746
+ };
3747
+ Object.defineProperty(Fake.prototype, "props", {
3748
+ set: function () {
3749
+ throw Error();
3750
+ }
3751
+ });
3752
+ if ("object" === typeof Reflect && Reflect.construct) {
3753
+ try {
3754
+ Reflect.construct(Fake, []);
3755
+ } catch (x) {
3756
+ var control = x;
3757
+ }
3758
+ Reflect.construct(fn, [], Fake);
3759
+ } else {
3760
+ try {
3761
+ Fake.call();
3762
+ } catch (x$24) {
3763
+ control = x$24;
3764
+ }
3765
+ fn.call(Fake.prototype);
3583
3766
  }
3584
- });
3585
- if ("object" === typeof Reflect && Reflect.construct) {
3586
- try {
3587
- Reflect.construct(Fake, []);
3588
- } catch (x) {
3589
- var control = x;
3590
- }
3591
- Reflect.construct(fn, [], Fake);
3592
3767
  } else {
3593
3768
  try {
3594
- Fake.call();
3595
- } catch (x$24) {
3596
- control = x$24;
3769
+ throw Error();
3770
+ } catch (x$25) {
3771
+ control = x$25;
3597
3772
  }
3598
- fn.call(Fake.prototype);
3599
- }
3600
- } else {
3601
- try {
3602
- throw Error();
3603
- } catch (x$25) {
3604
- control = x$25;
3773
+ (Fake = fn()) &&
3774
+ "function" === typeof Fake.catch &&
3775
+ Fake.catch(function () {});
3605
3776
  }
3606
- (Fake = fn()) &&
3607
- "function" === typeof Fake.catch &&
3608
- Fake.catch(function () {});
3777
+ } catch (sample) {
3778
+ if (sample && control && "string" === typeof sample.stack)
3779
+ return [sample.stack, control.stack];
3609
3780
  }
3610
- } catch (sample) {
3611
- if (sample && control && "string" === typeof sample.stack)
3612
- return [sample.stack, control.stack];
3781
+ return [null, null];
3613
3782
  }
3614
- return [null, null];
3615
- }
3616
- };
3617
- RunInRootFrame.DetermineComponentFrameRoot.displayName =
3618
- "DetermineComponentFrameRoot";
3619
- var namePropDescriptor = Object.getOwnPropertyDescriptor(
3620
- RunInRootFrame.DetermineComponentFrameRoot,
3621
- "name"
3622
- );
3623
- namePropDescriptor &&
3624
- namePropDescriptor.configurable &&
3625
- Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot, "name", {
3626
- value: "DetermineComponentFrameRoot"
3627
- });
3628
- try {
3783
+ };
3784
+ RunInRootFrame.DetermineComponentFrameRoot.displayName =
3785
+ "DetermineComponentFrameRoot";
3786
+ var namePropDescriptor = Object.getOwnPropertyDescriptor(
3787
+ RunInRootFrame.DetermineComponentFrameRoot,
3788
+ "name"
3789
+ );
3790
+ namePropDescriptor &&
3791
+ namePropDescriptor.configurable &&
3792
+ Object.defineProperty(
3793
+ RunInRootFrame.DetermineComponentFrameRoot,
3794
+ "name",
3795
+ { value: "DetermineComponentFrameRoot" }
3796
+ );
3629
3797
  var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),
3630
3798
  sampleStack = _RunInRootFrame$Deter[0],
3631
3799
  controlStack = _RunInRootFrame$Deter[1];
@@ -3696,11 +3864,116 @@ function describeNativeComponentFrame(fn, construct) {
3696
3864
  ? describeBuiltInComponentFrame(previousPrepareStackTrace)
3697
3865
  : "";
3698
3866
  }
3867
+ function describeComponentStackByType(type) {
3868
+ if ("string" === typeof type) return describeBuiltInComponentFrame(type);
3869
+ if ("function" === typeof type)
3870
+ return type.prototype && type.prototype.isReactComponent
3871
+ ? describeNativeComponentFrame(type, !0)
3872
+ : describeNativeComponentFrame(type, !1);
3873
+ if ("object" === typeof type && null !== type) {
3874
+ switch (type.$$typeof) {
3875
+ case REACT_FORWARD_REF_TYPE:
3876
+ return describeNativeComponentFrame(type.render, !1);
3877
+ case REACT_MEMO_TYPE:
3878
+ return describeNativeComponentFrame(type.type, !1);
3879
+ case REACT_LAZY_TYPE:
3880
+ var lazyComponent = type,
3881
+ payload = lazyComponent._payload;
3882
+ lazyComponent = lazyComponent._init;
3883
+ try {
3884
+ type = lazyComponent(payload);
3885
+ } catch (x) {
3886
+ return describeBuiltInComponentFrame("Lazy");
3887
+ }
3888
+ return describeComponentStackByType(type);
3889
+ }
3890
+ if ("string" === typeof type.name)
3891
+ return (
3892
+ (payload = type.env),
3893
+ describeBuiltInComponentFrame(
3894
+ type.name + (payload ? " [" + payload + "]" : "")
3895
+ )
3896
+ );
3897
+ }
3898
+ switch (type) {
3899
+ case REACT_SUSPENSE_LIST_TYPE:
3900
+ return describeBuiltInComponentFrame("SuspenseList");
3901
+ case REACT_SUSPENSE_TYPE:
3902
+ return describeBuiltInComponentFrame("Suspense");
3903
+ }
3904
+ return "";
3905
+ }
3699
3906
  function defaultErrorHandler(error) {
3700
- console.error(error);
3907
+ if (
3908
+ "object" === typeof error &&
3909
+ null !== error &&
3910
+ "string" === typeof error.environmentName
3911
+ ) {
3912
+ var JSCompiler_inline_result = error.environmentName;
3913
+ error = [error].slice(0);
3914
+ "string" === typeof error[0]
3915
+ ? error.splice(
3916
+ 0,
3917
+ 1,
3918
+ "\u001b[0m\u001b[7m%c%s\u001b[0m%c " + error[0],
3919
+ "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",
3920
+ " " + JSCompiler_inline_result + " ",
3921
+ ""
3922
+ )
3923
+ : error.splice(
3924
+ 0,
3925
+ 0,
3926
+ "\u001b[0m\u001b[7m%c%s\u001b[0m%c ",
3927
+ "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",
3928
+ " " + JSCompiler_inline_result + " ",
3929
+ ""
3930
+ );
3931
+ error.unshift(console);
3932
+ JSCompiler_inline_result = bind.apply(console.error, error);
3933
+ JSCompiler_inline_result();
3934
+ } else console.error(error);
3701
3935
  return null;
3702
3936
  }
3703
3937
  function noop() {}
3938
+ function RequestInstance(
3939
+ resumableState,
3940
+ renderState,
3941
+ rootFormatContext,
3942
+ progressiveChunkSize,
3943
+ onError,
3944
+ onAllReady,
3945
+ onShellReady,
3946
+ onShellError,
3947
+ onFatalError,
3948
+ onPostpone,
3949
+ formState
3950
+ ) {
3951
+ var abortSet = new Set();
3952
+ this.destination = null;
3953
+ this.flushScheduled = !1;
3954
+ this.resumableState = resumableState;
3955
+ this.renderState = renderState;
3956
+ this.rootFormatContext = rootFormatContext;
3957
+ this.progressiveChunkSize =
3958
+ void 0 === progressiveChunkSize ? 12800 : progressiveChunkSize;
3959
+ this.status = 10;
3960
+ this.fatalError = null;
3961
+ this.pendingRootTasks = this.allPendingTasks = this.nextSegmentId = 0;
3962
+ this.completedPreambleSegments = this.completedRootSegment = null;
3963
+ this.abortableTasks = abortSet;
3964
+ this.pingedTasks = [];
3965
+ this.clientRenderedBoundaries = [];
3966
+ this.completedBoundaries = [];
3967
+ this.partialBoundaries = [];
3968
+ this.trackedPostpones = null;
3969
+ this.onError = void 0 === onError ? defaultErrorHandler : onError;
3970
+ this.onPostpone = void 0 === onPostpone ? noop : onPostpone;
3971
+ this.onAllReady = void 0 === onAllReady ? noop : onAllReady;
3972
+ this.onShellReady = void 0 === onShellReady ? noop : onShellReady;
3973
+ this.onShellError = void 0 === onShellError ? noop : onShellError;
3974
+ this.onFatalError = void 0 === onFatalError ? noop : onFatalError;
3975
+ this.formState = void 0 === formState ? null : formState;
3976
+ }
3704
3977
  function createRequest(
3705
3978
  children,
3706
3979
  resumableState,
@@ -3715,36 +3988,19 @@ function createRequest(
3715
3988
  onPostpone,
3716
3989
  formState
3717
3990
  ) {
3718
- var pingedTasks = [],
3719
- abortSet = new Set();
3720
- resumableState = {
3721
- destination: null,
3722
- flushScheduled: !1,
3723
- resumableState: resumableState,
3724
- renderState: renderState,
3725
- rootFormatContext: rootFormatContext,
3726
- progressiveChunkSize:
3727
- void 0 === progressiveChunkSize ? 12800 : progressiveChunkSize,
3728
- status: 0,
3729
- fatalError: null,
3730
- nextSegmentId: 0,
3731
- allPendingTasks: 0,
3732
- pendingRootTasks: 0,
3733
- completedRootSegment: null,
3734
- abortableTasks: abortSet,
3735
- pingedTasks: pingedTasks,
3736
- clientRenderedBoundaries: [],
3737
- completedBoundaries: [],
3738
- partialBoundaries: [],
3739
- trackedPostpones: null,
3740
- onError: void 0 === onError ? defaultErrorHandler : onError,
3741
- onPostpone: void 0 === onPostpone ? noop : onPostpone,
3742
- onAllReady: void 0 === onAllReady ? noop : onAllReady,
3743
- onShellReady: void 0 === onShellReady ? noop : onShellReady,
3744
- onShellError: void 0 === onShellError ? noop : onShellError,
3745
- onFatalError: void 0 === onFatalError ? noop : onFatalError,
3746
- formState: void 0 === formState ? null : formState
3747
- };
3991
+ resumableState = new RequestInstance(
3992
+ resumableState,
3993
+ renderState,
3994
+ rootFormatContext,
3995
+ progressiveChunkSize,
3996
+ onError,
3997
+ onAllReady,
3998
+ onShellReady,
3999
+ onShellError,
4000
+ onFatalError,
4001
+ onPostpone,
4002
+ formState
4003
+ );
3748
4004
  renderState = createPendingSegment(
3749
4005
  resumableState,
3750
4006
  0,
@@ -3762,18 +4018,53 @@ function createRequest(
3762
4018
  null,
3763
4019
  renderState,
3764
4020
  null,
3765
- abortSet,
4021
+ null,
4022
+ resumableState.abortableTasks,
3766
4023
  null,
3767
4024
  rootFormatContext,
3768
- emptyContextObject,
3769
4025
  null,
3770
4026
  emptyTreeContext,
3771
4027
  null,
3772
4028
  !1
3773
4029
  );
3774
- pingedTasks.push(children);
4030
+ pushComponentStack(children);
4031
+ resumableState.pingedTasks.push(children);
3775
4032
  return resumableState;
3776
4033
  }
4034
+ function createPrerenderRequest(
4035
+ children,
4036
+ resumableState,
4037
+ renderState,
4038
+ rootFormatContext,
4039
+ progressiveChunkSize,
4040
+ onError,
4041
+ onAllReady,
4042
+ onShellReady,
4043
+ onShellError,
4044
+ onFatalError,
4045
+ onPostpone
4046
+ ) {
4047
+ children = createRequest(
4048
+ children,
4049
+ resumableState,
4050
+ renderState,
4051
+ rootFormatContext,
4052
+ progressiveChunkSize,
4053
+ onError,
4054
+ onAllReady,
4055
+ onShellReady,
4056
+ onShellError,
4057
+ onFatalError,
4058
+ onPostpone,
4059
+ void 0
4060
+ );
4061
+ children.trackedPostpones = {
4062
+ workingMap: new Map(),
4063
+ rootNodes: [],
4064
+ rootSlots: null
4065
+ };
4066
+ return children;
4067
+ }
3777
4068
  var currentRequest = null;
3778
4069
  function resolveRequest() {
3779
4070
  if (currentRequest) return currentRequest;
@@ -3787,11 +4078,20 @@ function pingTask(request, task) {
3787
4078
  request.pingedTasks.push(task);
3788
4079
  1 === request.pingedTasks.length &&
3789
4080
  ((request.flushScheduled = null !== request.destination),
3790
- setTimeout(function () {
3791
- return performWork(request);
3792
- }, 0));
4081
+ null !== request.trackedPostpones || 10 === request.status
4082
+ ? scheduleMicrotask(function () {
4083
+ return performWork(request);
4084
+ })
4085
+ : setTimeout(function () {
4086
+ return performWork(request);
4087
+ }, 0));
3793
4088
  }
3794
- function createSuspenseBoundary(request, fallbackAbortableTasks) {
4089
+ function createSuspenseBoundary(
4090
+ request,
4091
+ fallbackAbortableTasks,
4092
+ contentPreamble,
4093
+ fallbackPreamble
4094
+ ) {
3795
4095
  return {
3796
4096
  status: 0,
3797
4097
  rootSegmentID: -1,
@@ -3803,6 +4103,8 @@ function createSuspenseBoundary(request, fallbackAbortableTasks) {
3803
4103
  errorDigest: null,
3804
4104
  contentState: createHoistableState(),
3805
4105
  fallbackState: createHoistableState(),
4106
+ contentPreamble: contentPreamble,
4107
+ fallbackPreamble: fallbackPreamble,
3806
4108
  trackedContentKeyPath: null,
3807
4109
  trackedFallbackNode: null
3808
4110
  };
@@ -3814,11 +4116,11 @@ function createRenderTask(
3814
4116
  childIndex,
3815
4117
  blockedBoundary,
3816
4118
  blockedSegment,
4119
+ blockedPreamble,
3817
4120
  hoistableState,
3818
4121
  abortSet,
3819
4122
  keyPath,
3820
4123
  formatContext,
3821
- legacyContext,
3822
4124
  context,
3823
4125
  treeContext,
3824
4126
  componentStack,
@@ -3837,11 +4139,11 @@ function createRenderTask(
3837
4139
  },
3838
4140
  blockedBoundary: blockedBoundary,
3839
4141
  blockedSegment: blockedSegment,
4142
+ blockedPreamble: blockedPreamble,
3840
4143
  hoistableState: hoistableState,
3841
4144
  abortSet: abortSet,
3842
4145
  keyPath: keyPath,
3843
4146
  formatContext: formatContext,
3844
- legacyContext: legacyContext,
3845
4147
  context: context,
3846
4148
  treeContext: treeContext,
3847
4149
  componentStack: componentStack,
@@ -3862,7 +4164,6 @@ function createReplayTask(
3862
4164
  abortSet,
3863
4165
  keyPath,
3864
4166
  formatContext,
3865
- legacyContext,
3866
4167
  context,
3867
4168
  treeContext,
3868
4169
  componentStack,
@@ -3882,11 +4183,11 @@ function createReplayTask(
3882
4183
  },
3883
4184
  blockedBoundary: blockedBoundary,
3884
4185
  blockedSegment: null,
4186
+ blockedPreamble: null,
3885
4187
  hoistableState: hoistableState,
3886
4188
  abortSet: abortSet,
3887
4189
  keyPath: keyPath,
3888
4190
  formatContext: formatContext,
3889
- legacyContext: legacyContext,
3890
4191
  context: context,
3891
4192
  treeContext: treeContext,
3892
4193
  componentStack: componentStack,
@@ -3906,58 +4207,66 @@ function createPendingSegment(
3906
4207
  ) {
3907
4208
  return {
3908
4209
  status: 0,
4210
+ parentFlushed: !1,
3909
4211
  id: -1,
3910
4212
  index: index,
3911
- parentFlushed: !1,
3912
4213
  chunks: [],
3913
4214
  children: [],
4215
+ preambleChildren: [],
3914
4216
  parentFormatContext: parentFormatContext,
3915
4217
  boundary: boundary,
3916
4218
  lastPushedText: lastPushedText,
3917
4219
  textEmbedded: textEmbedded
3918
4220
  };
3919
4221
  }
3920
- function createBuiltInComponentStack(task, type) {
3921
- return { tag: 0, parent: task.componentStack, type: type };
4222
+ function pushComponentStack(task) {
4223
+ var node = task.node;
4224
+ if ("object" === typeof node && null !== node)
4225
+ switch (node.$$typeof) {
4226
+ case REACT_ELEMENT_TYPE:
4227
+ task.componentStack = { parent: task.componentStack, type: node.type };
4228
+ }
3922
4229
  }
3923
- function getThrownInfo(request, node) {
3924
- if (node && null !== request.trackedPostpones) {
3925
- try {
3926
- request = "";
3927
- do {
3928
- switch (node.tag) {
3929
- case 0:
3930
- request += describeBuiltInComponentFrame(node.type);
3931
- break;
3932
- case 1:
3933
- request += describeNativeComponentFrame(node.type, !1);
3934
- break;
3935
- case 2:
3936
- request += describeNativeComponentFrame(node.type, !0);
4230
+ function getThrownInfo(node$jscomp$0) {
4231
+ var errorInfo = {};
4232
+ node$jscomp$0 &&
4233
+ Object.defineProperty(errorInfo, "componentStack", {
4234
+ configurable: !0,
4235
+ enumerable: !0,
4236
+ get: function () {
4237
+ try {
4238
+ var info = "",
4239
+ node = node$jscomp$0;
4240
+ do
4241
+ (info += describeComponentStackByType(node.type)),
4242
+ (node = node.parent);
4243
+ while (node);
4244
+ var JSCompiler_inline_result = info;
4245
+ } catch (x) {
4246
+ JSCompiler_inline_result =
4247
+ "\nError generating stack: " + x.message + "\n" + x.stack;
3937
4248
  }
3938
- node = node.parent;
3939
- } while (node);
3940
- var JSCompiler_temp = request;
3941
- } catch (x) {
3942
- JSCompiler_temp =
3943
- "\nError generating stack: " + x.message + "\n" + x.stack;
3944
- }
3945
- JSCompiler_temp = { componentStack: JSCompiler_temp };
3946
- } else JSCompiler_temp = {};
3947
- return JSCompiler_temp;
4249
+ Object.defineProperty(errorInfo, "componentStack", {
4250
+ value: JSCompiler_inline_result
4251
+ });
4252
+ return JSCompiler_inline_result;
4253
+ }
4254
+ });
4255
+ return errorInfo;
3948
4256
  }
3949
4257
  function logRecoverableError(request, error, errorInfo) {
3950
- request = request.onError(error, errorInfo);
3951
- if (null == request || "string" === typeof request) return request;
4258
+ request = request.onError;
4259
+ error = request(error, errorInfo);
4260
+ if (null == error || "string" === typeof error) return error;
3952
4261
  }
3953
4262
  function fatalError(request, error) {
3954
- var onShellError = request.onShellError;
3955
- onShellError(error);
3956
- onShellError = request.onFatalError;
4263
+ var onShellError = request.onShellError,
4264
+ onFatalError = request.onFatalError;
3957
4265
  onShellError(error);
4266
+ onFatalError(error);
3958
4267
  null !== request.destination
3959
- ? ((request.status = 2), closeWithError(request.destination, error))
3960
- : ((request.status = 1), (request.fatalError = error));
4268
+ ? ((request.status = 14), closeWithError(request.destination, error))
4269
+ : ((request.status = 13), (request.fatalError = error));
3961
4270
  }
3962
4271
  function renderWithHooks(request, task, keyPath, Component, props, secondArg) {
3963
4272
  var prevThenableState = task.thenableState;
@@ -4010,171 +4319,179 @@ function finishFunctionComponent(
4010
4319
  renderNode(request, task, children, -1),
4011
4320
  (task.treeContext = keyPath))
4012
4321
  : didEmitActionStateMarkers
4013
- ? renderNode(request, task, children, -1)
4014
- : renderNodeDestructive(request, task, children, -1);
4322
+ ? renderNode(request, task, children, -1)
4323
+ : renderNodeDestructive(request, task, children, -1);
4015
4324
  task.keyPath = actionStateCount;
4016
4325
  }
4017
4326
  function renderElement(request, task, keyPath, type, props, ref) {
4018
4327
  if ("function" === typeof type)
4019
4328
  if (type.prototype && type.prototype.isReactComponent) {
4020
- var JSCompiler_inline_result = props;
4329
+ var newProps = props;
4021
4330
  if ("ref" in props) {
4022
- JSCompiler_inline_result = {};
4331
+ newProps = {};
4023
4332
  for (var propName in props)
4024
- "ref" !== propName &&
4025
- (JSCompiler_inline_result[propName] = props[propName]);
4333
+ "ref" !== propName && (newProps[propName] = props[propName]);
4026
4334
  }
4027
4335
  var defaultProps = type.defaultProps;
4028
4336
  if (defaultProps) {
4029
- JSCompiler_inline_result === props &&
4030
- (JSCompiler_inline_result = assign(
4031
- {},
4032
- JSCompiler_inline_result,
4033
- props
4034
- ));
4035
- for (var propName$31 in defaultProps)
4036
- void 0 === JSCompiler_inline_result[propName$31] &&
4037
- (JSCompiler_inline_result[propName$31] = defaultProps[propName$31]);
4337
+ newProps === props && (newProps = assign({}, newProps, props));
4338
+ for (var propName$33 in defaultProps)
4339
+ void 0 === newProps[propName$33] &&
4340
+ (newProps[propName$33] = defaultProps[propName$33]);
4038
4341
  }
4039
- props = task.componentStack;
4040
- task.componentStack = { tag: 2, parent: task.componentStack, type: type };
4041
- defaultProps = emptyContextObject;
4342
+ props = newProps;
4343
+ newProps = emptyContextObject;
4344
+ defaultProps = type.contextType;
4345
+ "object" === typeof defaultProps &&
4346
+ null !== defaultProps &&
4347
+ (newProps = defaultProps._currentValue);
4348
+ newProps = new type(props, newProps);
4349
+ var initialState = void 0 !== newProps.state ? newProps.state : null;
4350
+ newProps.updater = classComponentUpdater;
4351
+ newProps.props = props;
4352
+ newProps.state = initialState;
4353
+ defaultProps = { queue: [], replace: !1 };
4354
+ newProps._reactInternals = defaultProps;
4042
4355
  ref = type.contextType;
4043
- "object" === typeof ref &&
4044
- null !== ref &&
4045
- (defaultProps = ref._currentValue);
4046
- defaultProps = new type(JSCompiler_inline_result, defaultProps);
4047
- propName$31 = void 0 !== defaultProps.state ? defaultProps.state : null;
4048
- defaultProps.updater = classComponentUpdater;
4049
- defaultProps.props = JSCompiler_inline_result;
4050
- defaultProps.state = propName$31;
4051
- ref = { queue: [], replace: !1 };
4052
- defaultProps._reactInternals = ref;
4053
- var contextType = type.contextType;
4054
- defaultProps.context =
4055
- "object" === typeof contextType && null !== contextType
4056
- ? contextType._currentValue
4356
+ newProps.context =
4357
+ "object" === typeof ref && null !== ref
4358
+ ? ref._currentValue
4057
4359
  : emptyContextObject;
4058
- contextType = type.getDerivedStateFromProps;
4059
- "function" === typeof contextType &&
4060
- ((contextType = contextType(JSCompiler_inline_result, propName$31)),
4061
- (propName$31 =
4062
- null === contextType || void 0 === contextType
4063
- ? propName$31
4064
- : assign({}, propName$31, contextType)),
4065
- (defaultProps.state = propName$31));
4360
+ ref = type.getDerivedStateFromProps;
4361
+ "function" === typeof ref &&
4362
+ ((ref = ref(props, initialState)),
4363
+ (initialState =
4364
+ null === ref || void 0 === ref
4365
+ ? initialState
4366
+ : assign({}, initialState, ref)),
4367
+ (newProps.state = initialState));
4066
4368
  if (
4067
4369
  "function" !== typeof type.getDerivedStateFromProps &&
4068
- "function" !== typeof defaultProps.getSnapshotBeforeUpdate &&
4069
- ("function" === typeof defaultProps.UNSAFE_componentWillMount ||
4070
- "function" === typeof defaultProps.componentWillMount)
4370
+ "function" !== typeof newProps.getSnapshotBeforeUpdate &&
4371
+ ("function" === typeof newProps.UNSAFE_componentWillMount ||
4372
+ "function" === typeof newProps.componentWillMount)
4071
4373
  )
4072
4374
  if (
4073
- ((type = defaultProps.state),
4074
- "function" === typeof defaultProps.componentWillMount &&
4075
- defaultProps.componentWillMount(),
4076
- "function" === typeof defaultProps.UNSAFE_componentWillMount &&
4077
- defaultProps.UNSAFE_componentWillMount(),
4078
- type !== defaultProps.state &&
4375
+ ((type = newProps.state),
4376
+ "function" === typeof newProps.componentWillMount &&
4377
+ newProps.componentWillMount(),
4378
+ "function" === typeof newProps.UNSAFE_componentWillMount &&
4379
+ newProps.UNSAFE_componentWillMount(),
4380
+ type !== newProps.state &&
4079
4381
  classComponentUpdater.enqueueReplaceState(
4080
- defaultProps,
4081
- defaultProps.state,
4382
+ newProps,
4383
+ newProps.state,
4082
4384
  null
4083
4385
  ),
4084
- null !== ref.queue && 0 < ref.queue.length)
4386
+ null !== defaultProps.queue && 0 < defaultProps.queue.length)
4085
4387
  )
4086
4388
  if (
4087
- ((type = ref.queue),
4088
- (contextType = ref.replace),
4089
- (ref.queue = null),
4090
- (ref.replace = !1),
4091
- contextType && 1 === type.length)
4389
+ ((type = defaultProps.queue),
4390
+ (ref = defaultProps.replace),
4391
+ (defaultProps.queue = null),
4392
+ (defaultProps.replace = !1),
4393
+ ref && 1 === type.length)
4092
4394
  )
4093
- defaultProps.state = type[0];
4395
+ newProps.state = type[0];
4094
4396
  else {
4095
- ref = contextType ? type[0] : defaultProps.state;
4096
- propName$31 = !0;
4097
- for (
4098
- contextType = contextType ? 1 : 0;
4099
- contextType < type.length;
4100
- contextType++
4101
- )
4102
- (propName = type[contextType]),
4103
- (propName =
4104
- "function" === typeof propName
4105
- ? propName.call(
4106
- defaultProps,
4107
- ref,
4108
- JSCompiler_inline_result,
4109
- void 0
4110
- )
4111
- : propName),
4112
- null != propName &&
4113
- (propName$31
4114
- ? ((propName$31 = !1), (ref = assign({}, ref, propName)))
4115
- : assign(ref, propName));
4116
- defaultProps.state = ref;
4397
+ defaultProps = ref ? type[0] : newProps.state;
4398
+ initialState = !0;
4399
+ for (ref = ref ? 1 : 0; ref < type.length; ref++)
4400
+ (propName$33 = type[ref]),
4401
+ (propName$33 =
4402
+ "function" === typeof propName$33
4403
+ ? propName$33.call(newProps, defaultProps, props, void 0)
4404
+ : propName$33),
4405
+ null != propName$33 &&
4406
+ (initialState
4407
+ ? ((initialState = !1),
4408
+ (defaultProps = assign({}, defaultProps, propName$33)))
4409
+ : assign(defaultProps, propName$33));
4410
+ newProps.state = defaultProps;
4117
4411
  }
4118
- else ref.queue = null;
4119
- type = defaultProps.render();
4120
- JSCompiler_inline_result = task.keyPath;
4412
+ else defaultProps.queue = null;
4413
+ type = newProps.render();
4414
+ if (12 === request.status) throw null;
4415
+ props = task.keyPath;
4121
4416
  task.keyPath = keyPath;
4122
4417
  renderNodeDestructive(request, task, type, -1);
4123
- task.keyPath = JSCompiler_inline_result;
4124
- task.componentStack = props;
4125
- } else
4126
- (JSCompiler_inline_result = task.componentStack),
4127
- (task.componentStack = {
4128
- tag: 1,
4129
- parent: task.componentStack,
4130
- type: type
4131
- }),
4132
- (type = renderWithHooks(request, task, keyPath, type, props, void 0)),
4133
- finishFunctionComponent(
4134
- request,
4135
- task,
4136
- keyPath,
4137
- type,
4138
- 0 !== localIdCounter,
4139
- actionStateCounter,
4140
- actionStateMatchingIndex
4141
- ),
4142
- (task.componentStack = JSCompiler_inline_result);
4143
- else if ("string" === typeof type) {
4144
- JSCompiler_inline_result = task.componentStack;
4145
- task.componentStack = createBuiltInComponentStack(task, type);
4146
- defaultProps = task.blockedSegment;
4147
- if (null === defaultProps)
4148
- (defaultProps = props.children),
4149
- (ref = task.formatContext),
4150
- (propName$31 = task.keyPath),
4151
- (task.formatContext = getChildFormatContext(ref, type, props)),
4418
+ task.keyPath = props;
4419
+ } else {
4420
+ type = renderWithHooks(request, task, keyPath, type, props, void 0);
4421
+ if (12 === request.status) throw null;
4422
+ finishFunctionComponent(
4423
+ request,
4424
+ task,
4425
+ keyPath,
4426
+ type,
4427
+ 0 !== localIdCounter,
4428
+ actionStateCounter,
4429
+ actionStateMatchingIndex
4430
+ );
4431
+ }
4432
+ else if ("string" === typeof type)
4433
+ if (((newProps = task.blockedSegment), null === newProps))
4434
+ (newProps = props.children),
4435
+ (defaultProps = task.formatContext),
4436
+ (initialState = task.keyPath),
4437
+ (task.formatContext = getChildFormatContext(defaultProps, type, props)),
4152
4438
  (task.keyPath = keyPath),
4153
- renderNode(request, task, defaultProps, -1),
4154
- (task.formatContext = ref),
4155
- (task.keyPath = propName$31);
4439
+ renderNode(request, task, newProps, -1),
4440
+ (task.formatContext = defaultProps),
4441
+ (task.keyPath = initialState);
4156
4442
  else {
4157
- propName$31 = pushStartInstance(
4158
- defaultProps.chunks,
4443
+ ref = pushStartInstance(
4444
+ newProps.chunks,
4159
4445
  type,
4160
4446
  props,
4161
4447
  request.resumableState,
4162
4448
  request.renderState,
4449
+ task.blockedPreamble,
4163
4450
  task.hoistableState,
4164
4451
  task.formatContext,
4165
- defaultProps.lastPushedText,
4452
+ newProps.lastPushedText,
4166
4453
  task.isFallback
4167
4454
  );
4168
- defaultProps.lastPushedText = !1;
4169
- ref = task.formatContext;
4170
- contextType = task.keyPath;
4171
- task.formatContext = getChildFormatContext(ref, type, props);
4455
+ newProps.lastPushedText = !1;
4456
+ defaultProps = task.formatContext;
4457
+ initialState = task.keyPath;
4172
4458
  task.keyPath = keyPath;
4173
- renderNode(request, task, propName$31, -1);
4174
- task.formatContext = ref;
4175
- task.keyPath = contextType;
4459
+ 3 ===
4460
+ (task.formatContext = getChildFormatContext(defaultProps, type, props))
4461
+ .insertionMode
4462
+ ? ((keyPath = createPendingSegment(
4463
+ request,
4464
+ 0,
4465
+ null,
4466
+ task.formatContext,
4467
+ !1,
4468
+ !1
4469
+ )),
4470
+ newProps.preambleChildren.push(keyPath),
4471
+ (keyPath = createRenderTask(
4472
+ request,
4473
+ null,
4474
+ ref,
4475
+ -1,
4476
+ task.blockedBoundary,
4477
+ keyPath,
4478
+ task.blockedPreamble,
4479
+ task.hoistableState,
4480
+ request.abortableTasks,
4481
+ task.keyPath,
4482
+ task.formatContext,
4483
+ task.context,
4484
+ task.treeContext,
4485
+ task.componentStack,
4486
+ task.isFallback
4487
+ )),
4488
+ pushComponentStack(keyPath),
4489
+ request.pingedTasks.push(keyPath))
4490
+ : renderNode(request, task, ref, -1);
4491
+ task.formatContext = defaultProps;
4492
+ task.keyPath = initialState;
4176
4493
  a: {
4177
- keyPath = defaultProps.chunks;
4494
+ task = newProps.chunks;
4178
4495
  request = request.resumableState;
4179
4496
  switch (type) {
4180
4497
  case "title":
@@ -4197,26 +4514,27 @@ function renderElement(request, task, keyPath, type, props, ref) {
4197
4514
  case "wbr":
4198
4515
  break a;
4199
4516
  case "body":
4200
- if (1 >= ref.insertionMode) {
4517
+ if (1 >= defaultProps.insertionMode) {
4201
4518
  request.hasBody = !0;
4202
4519
  break a;
4203
4520
  }
4204
4521
  break;
4205
4522
  case "html":
4206
- if (0 === ref.insertionMode) {
4523
+ if (0 === defaultProps.insertionMode) {
4207
4524
  request.hasHtml = !0;
4208
4525
  break a;
4209
4526
  }
4527
+ break;
4528
+ case "head":
4529
+ if (1 >= defaultProps.insertionMode) break a;
4210
4530
  }
4211
- keyPath.push(endChunkForTag(type));
4531
+ task.push(endChunkForTag(type));
4212
4532
  }
4213
- defaultProps.lastPushedText = !1;
4533
+ newProps.lastPushedText = !1;
4214
4534
  }
4215
- task.componentStack = JSCompiler_inline_result;
4216
- } else {
4535
+ else {
4217
4536
  switch (type) {
4218
4537
  case REACT_LEGACY_HIDDEN_TYPE:
4219
- case REACT_DEBUG_TRACING_MODE_TYPE:
4220
4538
  case REACT_STRICT_MODE_TYPE:
4221
4539
  case REACT_PROFILER_TYPE:
4222
4540
  case REACT_FRAGMENT_TYPE:
@@ -4225,7 +4543,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
4225
4543
  renderNodeDestructive(request, task, props.children, -1);
4226
4544
  task.keyPath = type;
4227
4545
  return;
4228
- case REACT_OFFSCREEN_TYPE:
4546
+ case REACT_ACTIVITY_TYPE:
4229
4547
  "hidden" !== props.mode &&
4230
4548
  ((type = task.keyPath),
4231
4549
  (task.keyPath = keyPath),
@@ -4233,14 +4551,12 @@ function renderElement(request, task, keyPath, type, props, ref) {
4233
4551
  (task.keyPath = type));
4234
4552
  return;
4235
4553
  case REACT_SUSPENSE_LIST_TYPE:
4236
- type = task.componentStack;
4237
- task.componentStack = createBuiltInComponentStack(task, "SuspenseList");
4238
- JSCompiler_inline_result = task.keyPath;
4554
+ type = task.keyPath;
4239
4555
  task.keyPath = keyPath;
4240
4556
  renderNodeDestructive(request, task, props.children, -1);
4241
- task.keyPath = JSCompiler_inline_result;
4242
- task.componentStack = type;
4557
+ task.keyPath = type;
4243
4558
  return;
4559
+ case REACT_VIEW_TRANSITION_TYPE:
4244
4560
  case REACT_SCOPE_TYPE:
4245
4561
  throw Error("ReactDOMServer does not yet support scope components.");
4246
4562
  case REACT_SUSPENSE_TYPE:
@@ -4254,31 +4570,35 @@ function renderElement(request, task, keyPath, type, props, ref) {
4254
4570
  task.keyPath = type;
4255
4571
  }
4256
4572
  } else {
4257
- var previousComponentStack = task.componentStack;
4258
- type = task.componentStack = createBuiltInComponentStack(
4259
- task,
4260
- "Suspense"
4261
- );
4262
- var prevKeyPath = task.keyPath;
4263
- ref = task.blockedBoundary;
4264
- var parentHoistableState = task.hoistableState,
4265
- parentSegment = task.blockedSegment;
4266
- propName$31 = props.fallback;
4267
- var content = props.children;
4268
- props = new Set();
4269
- contextType = createSuspenseBoundary(request, props);
4573
+ type = task.keyPath;
4574
+ var parentBoundary = task.blockedBoundary;
4575
+ ref = task.blockedPreamble;
4576
+ var parentHoistableState = task.hoistableState;
4577
+ propName$33 = task.blockedSegment;
4578
+ propName = props.fallback;
4579
+ props = props.children;
4580
+ var fallbackAbortSet = new Set();
4581
+ var newBoundary =
4582
+ 2 > task.formatContext.insertionMode
4583
+ ? createSuspenseBoundary(
4584
+ request,
4585
+ fallbackAbortSet,
4586
+ createPreambleState(),
4587
+ createPreambleState()
4588
+ )
4589
+ : createSuspenseBoundary(request, fallbackAbortSet, null, null);
4270
4590
  null !== request.trackedPostpones &&
4271
- (contextType.trackedContentKeyPath = keyPath);
4272
- propName = createPendingSegment(
4591
+ (newBoundary.trackedContentKeyPath = keyPath);
4592
+ var boundarySegment = createPendingSegment(
4273
4593
  request,
4274
- parentSegment.chunks.length,
4275
- contextType,
4594
+ propName$33.chunks.length,
4595
+ newBoundary,
4276
4596
  task.formatContext,
4277
4597
  !1,
4278
4598
  !1
4279
4599
  );
4280
- parentSegment.children.push(propName);
4281
- parentSegment.lastPushedText = !1;
4600
+ propName$33.children.push(boundarySegment);
4601
+ propName$33.lastPushedText = !1;
4282
4602
  var contentRootSegment = createPendingSegment(
4283
4603
  request,
4284
4604
  0,
@@ -4288,107 +4608,132 @@ function renderElement(request, task, keyPath, type, props, ref) {
4288
4608
  !1
4289
4609
  );
4290
4610
  contentRootSegment.parentFlushed = !0;
4291
- task.blockedBoundary = contextType;
4292
- task.hoistableState = contextType.contentState;
4293
- task.blockedSegment = contentRootSegment;
4294
- task.keyPath = keyPath;
4295
- try {
4296
- if (
4297
- (renderNode(request, task, content, -1),
4298
- contentRootSegment.lastPushedText &&
4299
- contentRootSegment.textEmbedded &&
4300
- contentRootSegment.chunks.push(textSeparator),
4301
- (contentRootSegment.status = 1),
4302
- queueCompletedSegment(contextType, contentRootSegment),
4303
- 0 === contextType.pendingTasks && 0 === contextType.status)
4304
- ) {
4305
- contextType.status = 1;
4306
- task.componentStack = previousComponentStack;
4307
- break a;
4611
+ if (null !== request.trackedPostpones) {
4612
+ newProps = [keyPath[0], "Suspense Fallback", keyPath[2]];
4613
+ defaultProps = [newProps[1], newProps[2], [], null];
4614
+ request.trackedPostpones.workingMap.set(newProps, defaultProps);
4615
+ newBoundary.trackedFallbackNode = defaultProps;
4616
+ task.blockedSegment = boundarySegment;
4617
+ task.blockedPreamble = newBoundary.fallbackPreamble;
4618
+ task.keyPath = newProps;
4619
+ boundarySegment.status = 6;
4620
+ try {
4621
+ renderNode(request, task, propName, -1),
4622
+ boundarySegment.lastPushedText &&
4623
+ boundarySegment.textEmbedded &&
4624
+ boundarySegment.chunks.push(textSeparator),
4625
+ (boundarySegment.status = 1);
4626
+ } catch (thrownValue) {
4627
+ throw (
4628
+ ((boundarySegment.status = 12 === request.status ? 3 : 4),
4629
+ thrownValue)
4630
+ );
4631
+ } finally {
4632
+ (task.blockedSegment = propName$33),
4633
+ (task.blockedPreamble = ref),
4634
+ (task.keyPath = type);
4308
4635
  }
4309
- } catch (error) {
4310
- (contentRootSegment.status = 4),
4311
- (contextType.status = 4),
4312
- (JSCompiler_inline_result = getThrownInfo(
4313
- request,
4314
- task.componentStack
4315
- )),
4316
- (defaultProps = logRecoverableError(
4317
- request,
4318
- error,
4319
- JSCompiler_inline_result
4320
- )),
4321
- (contextType.errorDigest = defaultProps),
4322
- untrackBoundary(request, contextType);
4323
- } finally {
4324
- (task.blockedBoundary = ref),
4325
- (task.hoistableState = parentHoistableState),
4326
- (task.blockedSegment = parentSegment),
4327
- (task.keyPath = prevKeyPath),
4328
- (task.componentStack = previousComponentStack);
4636
+ task = createRenderTask(
4637
+ request,
4638
+ null,
4639
+ props,
4640
+ -1,
4641
+ newBoundary,
4642
+ contentRootSegment,
4643
+ newBoundary.contentPreamble,
4644
+ newBoundary.contentState,
4645
+ task.abortSet,
4646
+ keyPath,
4647
+ task.formatContext,
4648
+ task.context,
4649
+ task.treeContext,
4650
+ task.componentStack,
4651
+ task.isFallback
4652
+ );
4653
+ pushComponentStack(task);
4654
+ request.pingedTasks.push(task);
4655
+ } else {
4656
+ task.blockedBoundary = newBoundary;
4657
+ task.blockedPreamble = newBoundary.contentPreamble;
4658
+ task.hoistableState = newBoundary.contentState;
4659
+ task.blockedSegment = contentRootSegment;
4660
+ task.keyPath = keyPath;
4661
+ contentRootSegment.status = 6;
4662
+ try {
4663
+ if (
4664
+ (renderNode(request, task, props, -1),
4665
+ contentRootSegment.lastPushedText &&
4666
+ contentRootSegment.textEmbedded &&
4667
+ contentRootSegment.chunks.push(textSeparator),
4668
+ (contentRootSegment.status = 1),
4669
+ queueCompletedSegment(newBoundary, contentRootSegment),
4670
+ 0 === newBoundary.pendingTasks && 0 === newBoundary.status)
4671
+ ) {
4672
+ newBoundary.status = 1;
4673
+ 0 === request.pendingRootTasks &&
4674
+ task.blockedPreamble &&
4675
+ preparePreamble(request);
4676
+ break a;
4677
+ }
4678
+ } catch (thrownValue$28) {
4679
+ (newBoundary.status = 4),
4680
+ 12 === request.status
4681
+ ? ((contentRootSegment.status = 3),
4682
+ (newProps = request.fatalError))
4683
+ : ((contentRootSegment.status = 4),
4684
+ (newProps = thrownValue$28)),
4685
+ (defaultProps = getThrownInfo(task.componentStack)),
4686
+ (initialState = logRecoverableError(
4687
+ request,
4688
+ newProps,
4689
+ defaultProps
4690
+ )),
4691
+ (newBoundary.errorDigest = initialState),
4692
+ untrackBoundary(request, newBoundary);
4693
+ } finally {
4694
+ (task.blockedBoundary = parentBoundary),
4695
+ (task.blockedPreamble = ref),
4696
+ (task.hoistableState = parentHoistableState),
4697
+ (task.blockedSegment = propName$33),
4698
+ (task.keyPath = type);
4699
+ }
4700
+ task = createRenderTask(
4701
+ request,
4702
+ null,
4703
+ propName,
4704
+ -1,
4705
+ parentBoundary,
4706
+ boundarySegment,
4707
+ newBoundary.fallbackPreamble,
4708
+ newBoundary.fallbackState,
4709
+ fallbackAbortSet,
4710
+ [keyPath[0], "Suspense Fallback", keyPath[2]],
4711
+ task.formatContext,
4712
+ task.context,
4713
+ task.treeContext,
4714
+ task.componentStack,
4715
+ !0
4716
+ );
4717
+ pushComponentStack(task);
4718
+ request.pingedTasks.push(task);
4329
4719
  }
4330
- JSCompiler_inline_result = [
4331
- keyPath[0],
4332
- "Suspense Fallback",
4333
- keyPath[2]
4334
- ];
4335
- defaultProps = request.trackedPostpones;
4336
- null !== defaultProps &&
4337
- ((previousComponentStack = [
4338
- JSCompiler_inline_result[1],
4339
- JSCompiler_inline_result[2],
4340
- [],
4341
- null
4342
- ]),
4343
- defaultProps.workingMap.set(
4344
- JSCompiler_inline_result,
4345
- previousComponentStack
4346
- ),
4347
- 5 === contextType.status
4348
- ? (defaultProps.workingMap.get(keyPath)[4] =
4349
- previousComponentStack)
4350
- : (contextType.trackedFallbackNode = previousComponentStack));
4351
- task = createRenderTask(
4352
- request,
4353
- null,
4354
- propName$31,
4355
- -1,
4356
- ref,
4357
- propName,
4358
- contextType.fallbackState,
4359
- props,
4360
- JSCompiler_inline_result,
4361
- task.formatContext,
4362
- task.legacyContext,
4363
- task.context,
4364
- task.treeContext,
4365
- type,
4366
- !0
4367
- );
4368
- request.pingedTasks.push(task);
4369
4720
  }
4370
4721
  return;
4371
4722
  }
4372
4723
  if ("object" === typeof type && null !== type)
4373
4724
  switch (type.$$typeof) {
4374
4725
  case REACT_FORWARD_REF_TYPE:
4375
- JSCompiler_inline_result = task.componentStack;
4376
- task.componentStack = {
4377
- tag: 1,
4378
- parent: task.componentStack,
4379
- type: type.render
4380
- };
4381
4726
  if ("ref" in props)
4382
- for (contextType in ((defaultProps = {}), props))
4383
- "ref" !== contextType &&
4384
- (defaultProps[contextType] = props[contextType]);
4385
- else defaultProps = props;
4727
+ for (newBoundary in ((newProps = {}), props))
4728
+ "ref" !== newBoundary &&
4729
+ (newProps[newBoundary] = props[newBoundary]);
4730
+ else newProps = props;
4386
4731
  type = renderWithHooks(
4387
4732
  request,
4388
4733
  task,
4389
4734
  keyPath,
4390
4735
  type.render,
4391
- defaultProps,
4736
+ newProps,
4392
4737
  ref
4393
4738
  );
4394
4739
  finishFunctionComponent(
@@ -4400,7 +4745,6 @@ function renderElement(request, task, keyPath, type, props, ref) {
4400
4745
  actionStateCounter,
4401
4746
  actionStateMatchingIndex
4402
4747
  );
4403
- task.componentStack = JSCompiler_inline_result;
4404
4748
  return;
4405
4749
  case REACT_MEMO_TYPE:
4406
4750
  renderElement(request, task, keyPath, type.type, props, ref);
@@ -4408,16 +4752,16 @@ function renderElement(request, task, keyPath, type, props, ref) {
4408
4752
  case REACT_PROVIDER_TYPE:
4409
4753
  case REACT_CONTEXT_TYPE:
4410
4754
  defaultProps = props.children;
4411
- JSCompiler_inline_result = task.keyPath;
4755
+ newProps = task.keyPath;
4412
4756
  props = props.value;
4413
- ref = type._currentValue;
4757
+ initialState = type._currentValue;
4414
4758
  type._currentValue = props;
4415
- propName$31 = currentActiveSnapshot;
4759
+ ref = currentActiveSnapshot;
4416
4760
  currentActiveSnapshot = type = {
4417
- parent: propName$31,
4418
- depth: null === propName$31 ? 0 : propName$31.depth + 1,
4761
+ parent: ref,
4762
+ depth: null === ref ? 0 : ref.depth + 1,
4419
4763
  context: type,
4420
- parentValue: ref,
4764
+ parentValue: initialState,
4421
4765
  value: props
4422
4766
  };
4423
4767
  task.context = type;
@@ -4431,7 +4775,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
4431
4775
  request.context._currentValue = request.parentValue;
4432
4776
  request = currentActiveSnapshot = request.parent;
4433
4777
  task.context = request;
4434
- task.keyPath = JSCompiler_inline_result;
4778
+ task.keyPath = newProps;
4435
4779
  return;
4436
4780
  case REACT_CONSUMER_TYPE:
4437
4781
  props = props.children;
@@ -4442,12 +4786,10 @@ function renderElement(request, task, keyPath, type, props, ref) {
4442
4786
  task.keyPath = props;
4443
4787
  return;
4444
4788
  case REACT_LAZY_TYPE:
4445
- JSCompiler_inline_result = task.componentStack;
4446
- task.componentStack = createBuiltInComponentStack(task, "Lazy");
4447
- defaultProps = type._init;
4448
- type = defaultProps(type._payload);
4449
- renderElement(request, task, keyPath, type, props, void 0);
4450
- task.componentStack = JSCompiler_inline_result;
4789
+ newProps = type._init;
4790
+ type = newProps(type._payload);
4791
+ if (12 === request.status) throw null;
4792
+ renderElement(request, task, keyPath, type, props, ref);
4451
4793
  return;
4452
4794
  }
4453
4795
  throw Error(
@@ -4483,23 +4825,29 @@ function resumeNode(request, task, segmentId, node, childIndex) {
4483
4825
  (task.replay = prevReplay), (task.blockedSegment = null);
4484
4826
  }
4485
4827
  }
4486
- function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4487
- if (null !== task.replay && "number" === typeof task.replay.slots)
4488
- resumeNode(request, task, task.replay.slots, node$jscomp$0, childIndex);
4489
- else if (
4490
- ((task.node = node$jscomp$0),
4491
- (task.childIndex = childIndex),
4492
- null !== node$jscomp$0)
4493
- ) {
4494
- if ("object" === typeof node$jscomp$0) {
4495
- switch (node$jscomp$0.$$typeof) {
4828
+ function renderNodeDestructive(request, task, node, childIndex) {
4829
+ null !== task.replay && "number" === typeof task.replay.slots
4830
+ ? resumeNode(request, task, task.replay.slots, node, childIndex)
4831
+ : ((task.node = node),
4832
+ (task.childIndex = childIndex),
4833
+ (node = task.componentStack),
4834
+ pushComponentStack(task),
4835
+ retryNode(request, task),
4836
+ (task.componentStack = node));
4837
+ }
4838
+ function retryNode(request, task) {
4839
+ var node = task.node,
4840
+ childIndex = task.childIndex;
4841
+ if (null !== node) {
4842
+ if ("object" === typeof node) {
4843
+ switch (node.$$typeof) {
4496
4844
  case REACT_ELEMENT_TYPE:
4497
- var type = node$jscomp$0.type,
4498
- key = node$jscomp$0.key,
4499
- props = node$jscomp$0.props;
4500
- node$jscomp$0 = props.ref;
4501
- var ref = void 0 !== node$jscomp$0 ? node$jscomp$0 : null;
4502
- var name = getComponentNameFromType(type),
4845
+ var type = node.type,
4846
+ key = node.key,
4847
+ props = node.props;
4848
+ node = props.ref;
4849
+ var ref = void 0 !== node ? node : null,
4850
+ name = getComponentNameFromType(type),
4503
4851
  keyOrIndex =
4504
4852
  null == key ? (-1 === childIndex ? 0 : childIndex) : key;
4505
4853
  key = [task.keyPath, name, keyOrIndex];
@@ -4507,24 +4855,20 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4507
4855
  a: {
4508
4856
  var replay = task.replay;
4509
4857
  childIndex = replay.nodes;
4510
- for (
4511
- node$jscomp$0 = 0;
4512
- node$jscomp$0 < childIndex.length;
4513
- node$jscomp$0++
4514
- ) {
4515
- var node = childIndex[node$jscomp$0];
4516
- if (keyOrIndex === node[1]) {
4517
- if (4 === node.length) {
4518
- if (null !== name && name !== node[0])
4858
+ for (node = 0; node < childIndex.length; node++) {
4859
+ var node$jscomp$0 = childIndex[node];
4860
+ if (keyOrIndex === node$jscomp$0[1]) {
4861
+ if (4 === node$jscomp$0.length) {
4862
+ if (null !== name && name !== node$jscomp$0[0])
4519
4863
  throw Error(
4520
4864
  "Expected the resume to render <" +
4521
- node[0] +
4865
+ node$jscomp$0[0] +
4522
4866
  "> in this slot but instead it rendered <" +
4523
4867
  name +
4524
4868
  ">. The tree doesn't match so React will fallback to client rendering."
4525
4869
  );
4526
- var childNodes = node[2];
4527
- name = node[3];
4870
+ var childNodes = node$jscomp$0[2];
4871
+ name = node$jscomp$0[3];
4528
4872
  keyOrIndex = task.node;
4529
4873
  task.replay = {
4530
4874
  nodes: childNodes,
@@ -4553,14 +4897,13 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4553
4897
  x)
4554
4898
  );
4555
4899
  task.replay.pendingTasks--;
4556
- props = getThrownInfo(request, task.componentStack);
4557
- key = request;
4558
- request = task.blockedBoundary;
4900
+ props = getThrownInfo(task.componentStack);
4901
+ key = task.blockedBoundary;
4559
4902
  type = x;
4560
- props = logRecoverableError(key, type, props);
4903
+ props = logRecoverableError(request, type, props);
4561
4904
  abortRemainingReplayNodes(
4562
- key,
4563
4905
  request,
4906
+ key,
4564
4907
  childNodes,
4565
4908
  name,
4566
4909
  type,
@@ -4577,29 +4920,39 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4577
4920
  );
4578
4921
  b: {
4579
4922
  replay = void 0;
4580
- type = node[5];
4581
- ref = node[2];
4582
- name = node[3];
4583
- keyOrIndex = null === node[4] ? [] : node[4][2];
4584
- node = null === node[4] ? null : node[4][3];
4585
- var previousComponentStack = task.componentStack,
4586
- suspenseComponentStack = (task.componentStack =
4587
- createBuiltInComponentStack(task, "Suspense")),
4588
- prevKeyPath = task.keyPath,
4923
+ type = node$jscomp$0[5];
4924
+ ref = node$jscomp$0[2];
4925
+ name = node$jscomp$0[3];
4926
+ keyOrIndex =
4927
+ null === node$jscomp$0[4] ? [] : node$jscomp$0[4][2];
4928
+ node$jscomp$0 =
4929
+ null === node$jscomp$0[4] ? null : node$jscomp$0[4][3];
4930
+ var prevKeyPath = task.keyPath,
4589
4931
  previousReplaySet = task.replay,
4590
4932
  parentBoundary = task.blockedBoundary,
4591
4933
  parentHoistableState = task.hoistableState,
4592
- content = props.children;
4593
- props = props.fallback;
4594
- var fallbackAbortSet = new Set(),
4595
- resumedBoundary = createSuspenseBoundary(
4596
- request,
4597
- fallbackAbortSet
4598
- );
4599
- resumedBoundary.parentFlushed = !0;
4600
- resumedBoundary.rootSegmentID = type;
4601
- task.blockedBoundary = resumedBoundary;
4602
- task.hoistableState = resumedBoundary.contentState;
4934
+ content = props.children,
4935
+ fallback = props.fallback,
4936
+ fallbackAbortSet = new Set();
4937
+ props =
4938
+ 2 > task.formatContext.insertionMode
4939
+ ? createSuspenseBoundary(
4940
+ request,
4941
+ fallbackAbortSet,
4942
+ createPreambleState(),
4943
+ createPreambleState()
4944
+ )
4945
+ : createSuspenseBoundary(
4946
+ request,
4947
+ fallbackAbortSet,
4948
+ null,
4949
+ null
4950
+ );
4951
+ props.parentFlushed = !0;
4952
+ props.rootSegmentID = type;
4953
+ task.blockedBoundary = props;
4954
+ task.hoistableState = props.contentState;
4955
+ task.keyPath = key;
4603
4956
  task.replay = {
4604
4957
  nodes: ref,
4605
4958
  slots: name,
@@ -4615,58 +4968,53 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4615
4968
  "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
4616
4969
  );
4617
4970
  task.replay.pendingTasks--;
4618
- if (
4619
- 0 === resumedBoundary.pendingTasks &&
4620
- 0 === resumedBoundary.status
4621
- ) {
4622
- resumedBoundary.status = 1;
4623
- request.completedBoundaries.push(resumedBoundary);
4971
+ if (0 === props.pendingTasks && 0 === props.status) {
4972
+ props.status = 1;
4973
+ request.completedBoundaries.push(props);
4624
4974
  break b;
4625
4975
  }
4626
4976
  } catch (error) {
4627
- (resumedBoundary.status = 4),
4628
- (childNodes = getThrownInfo(
4629
- request,
4630
- task.componentStack
4631
- )),
4977
+ (props.status = 4),
4978
+ (childNodes = getThrownInfo(task.componentStack)),
4632
4979
  (replay = logRecoverableError(
4633
4980
  request,
4634
4981
  error,
4635
4982
  childNodes
4636
4983
  )),
4637
- (resumedBoundary.errorDigest = replay),
4984
+ (props.errorDigest = replay),
4638
4985
  task.replay.pendingTasks--,
4639
- request.clientRenderedBoundaries.push(
4640
- resumedBoundary
4641
- );
4986
+ request.clientRenderedBoundaries.push(props);
4642
4987
  } finally {
4643
4988
  (task.blockedBoundary = parentBoundary),
4644
4989
  (task.hoistableState = parentHoistableState),
4645
4990
  (task.replay = previousReplaySet),
4646
- (task.keyPath = prevKeyPath),
4647
- (task.componentStack = previousComponentStack);
4991
+ (task.keyPath = prevKeyPath);
4648
4992
  }
4649
4993
  task = createReplayTask(
4650
4994
  request,
4651
4995
  null,
4652
- { nodes: keyOrIndex, slots: node, pendingTasks: 0 },
4653
- props,
4996
+ {
4997
+ nodes: keyOrIndex,
4998
+ slots: node$jscomp$0,
4999
+ pendingTasks: 0
5000
+ },
5001
+ fallback,
4654
5002
  -1,
4655
5003
  parentBoundary,
4656
- resumedBoundary.fallbackState,
5004
+ props.fallbackState,
4657
5005
  fallbackAbortSet,
4658
5006
  [key[0], "Suspense Fallback", key[2]],
4659
5007
  task.formatContext,
4660
- task.legacyContext,
4661
5008
  task.context,
4662
5009
  task.treeContext,
4663
- suspenseComponentStack,
5010
+ task.componentStack,
4664
5011
  !0
4665
5012
  );
5013
+ pushComponentStack(task);
4666
5014
  request.pingedTasks.push(task);
4667
5015
  }
4668
5016
  }
4669
- childIndex.splice(node$jscomp$0, 1);
5017
+ childIndex.splice(node, 1);
4670
5018
  break a;
4671
5019
  }
4672
5020
  }
@@ -4678,80 +5026,68 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4678
5026
  "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."
4679
5027
  );
4680
5028
  case REACT_LAZY_TYPE:
4681
- childNodes = task.componentStack;
4682
- task.componentStack = createBuiltInComponentStack(task, "Lazy");
4683
- props = node$jscomp$0._init;
4684
- node$jscomp$0 = props(node$jscomp$0._payload);
4685
- task.componentStack = childNodes;
4686
- renderNodeDestructive(request, task, node$jscomp$0, childIndex);
5029
+ childNodes = node._init;
5030
+ node = childNodes(node._payload);
5031
+ if (12 === request.status) throw null;
5032
+ renderNodeDestructive(request, task, node, childIndex);
4687
5033
  return;
4688
5034
  }
4689
- if (isArrayImpl(node$jscomp$0)) {
4690
- renderChildrenArray(request, task, node$jscomp$0, childIndex);
5035
+ if (isArrayImpl(node)) {
5036
+ renderChildrenArray(request, task, node, childIndex);
4691
5037
  return;
4692
5038
  }
4693
- null === node$jscomp$0 || "object" !== typeof node$jscomp$0
5039
+ null === node || "object" !== typeof node
4694
5040
  ? (childNodes = null)
4695
5041
  : ((childNodes =
4696
- (MAYBE_ITERATOR_SYMBOL && node$jscomp$0[MAYBE_ITERATOR_SYMBOL]) ||
4697
- node$jscomp$0["@@iterator"]),
5042
+ (MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) ||
5043
+ node["@@iterator"]),
4698
5044
  (childNodes = "function" === typeof childNodes ? childNodes : null));
4699
- if (childNodes && (childNodes = childNodes.call(node$jscomp$0))) {
4700
- node$jscomp$0 = childNodes.next();
4701
- if (!node$jscomp$0.done) {
5045
+ if (childNodes && (childNodes = childNodes.call(node))) {
5046
+ node = childNodes.next();
5047
+ if (!node.done) {
4702
5048
  props = [];
4703
- do
4704
- props.push(node$jscomp$0.value),
4705
- (node$jscomp$0 = childNodes.next());
4706
- while (!node$jscomp$0.done);
5049
+ do props.push(node.value), (node = childNodes.next());
5050
+ while (!node.done);
4707
5051
  renderChildrenArray(request, task, props, childIndex);
4708
5052
  }
4709
5053
  return;
4710
5054
  }
4711
- if ("function" === typeof node$jscomp$0.then)
5055
+ if ("function" === typeof node.then)
4712
5056
  return (
4713
5057
  (task.thenableState = null),
4714
- renderNodeDestructive(
4715
- request,
4716
- task,
4717
- unwrapThenable(node$jscomp$0),
4718
- childIndex
4719
- )
5058
+ renderNodeDestructive(request, task, unwrapThenable(node), childIndex)
4720
5059
  );
4721
- if (node$jscomp$0.$$typeof === REACT_CONTEXT_TYPE)
5060
+ if (node.$$typeof === REACT_CONTEXT_TYPE)
4722
5061
  return renderNodeDestructive(
4723
5062
  request,
4724
5063
  task,
4725
- node$jscomp$0._currentValue,
5064
+ node._currentValue,
4726
5065
  childIndex
4727
5066
  );
4728
- childIndex = Object.prototype.toString.call(node$jscomp$0);
5067
+ childIndex = Object.prototype.toString.call(node);
4729
5068
  throw Error(
4730
5069
  "Objects are not valid as a React child (found: " +
4731
5070
  ("[object Object]" === childIndex
4732
- ? "object with keys {" + Object.keys(node$jscomp$0).join(", ") + "}"
5071
+ ? "object with keys {" + Object.keys(node).join(", ") + "}"
4733
5072
  : childIndex) +
4734
5073
  "). If you meant to render a collection of children, use an array instead."
4735
5074
  );
4736
5075
  }
4737
- if ("string" === typeof node$jscomp$0)
5076
+ if ("string" === typeof node)
4738
5077
  (childIndex = task.blockedSegment),
4739
5078
  null !== childIndex &&
4740
5079
  (childIndex.lastPushedText = pushTextInstance(
4741
5080
  childIndex.chunks,
4742
- node$jscomp$0,
5081
+ node,
4743
5082
  request.renderState,
4744
5083
  childIndex.lastPushedText
4745
5084
  ));
4746
- else if (
4747
- "number" === typeof node$jscomp$0 ||
4748
- "bigint" === typeof node$jscomp$0
4749
- )
5085
+ else if ("number" === typeof node || "bigint" === typeof node)
4750
5086
  (childIndex = task.blockedSegment),
4751
5087
  null !== childIndex &&
4752
5088
  (childIndex.lastPushedText = pushTextInstance(
4753
5089
  childIndex.chunks,
4754
- "" + node$jscomp$0,
5090
+ "" + node,
4755
5091
  request.renderState,
4756
5092
  childIndex.lastPushedText
4757
5093
  ));
@@ -4789,7 +5125,7 @@ function renderChildrenArray(request, task, children, childIndex) {
4789
5125
  )
4790
5126
  throw x;
4791
5127
  task.replay.pendingTasks--;
4792
- children = getThrownInfo(request, task.componentStack);
5128
+ children = getThrownInfo(task.componentStack);
4793
5129
  var boundary = task.blockedBoundary,
4794
5130
  error = x;
4795
5131
  children = logRecoverableError(request, error, children);
@@ -4844,9 +5180,56 @@ function untrackBoundary(request, boundary) {
4844
5180
  void 0 !== boundary &&
4845
5181
  ((boundary.length = 4), (boundary[2] = []), (boundary[3] = null))));
4846
5182
  }
5183
+ function spawnNewSuspendedReplayTask(request, task, thenableState) {
5184
+ return createReplayTask(
5185
+ request,
5186
+ thenableState,
5187
+ task.replay,
5188
+ task.node,
5189
+ task.childIndex,
5190
+ task.blockedBoundary,
5191
+ task.hoistableState,
5192
+ task.abortSet,
5193
+ task.keyPath,
5194
+ task.formatContext,
5195
+ task.context,
5196
+ task.treeContext,
5197
+ task.componentStack,
5198
+ task.isFallback
5199
+ );
5200
+ }
5201
+ function spawnNewSuspendedRenderTask(request, task, thenableState) {
5202
+ var segment = task.blockedSegment,
5203
+ newSegment = createPendingSegment(
5204
+ request,
5205
+ segment.chunks.length,
5206
+ null,
5207
+ task.formatContext,
5208
+ segment.lastPushedText,
5209
+ !0
5210
+ );
5211
+ segment.children.push(newSegment);
5212
+ segment.lastPushedText = !1;
5213
+ return createRenderTask(
5214
+ request,
5215
+ thenableState,
5216
+ task.node,
5217
+ task.childIndex,
5218
+ task.blockedBoundary,
5219
+ newSegment,
5220
+ task.blockedPreamble,
5221
+ task.hoistableState,
5222
+ task.abortSet,
5223
+ task.keyPath,
5224
+ task.formatContext,
5225
+ task.context,
5226
+ task.treeContext,
5227
+ task.componentStack,
5228
+ task.isFallback
5229
+ );
5230
+ }
4847
5231
  function renderNode(request, task, node, childIndex) {
4848
5232
  var previousFormatContext = task.formatContext,
4849
- previousLegacyContext = task.legacyContext,
4850
5233
  previousContext = task.context,
4851
5234
  previousKeyPath = task.keyPath,
4852
5235
  previousTreeContext = task.treeContext,
@@ -4862,37 +5245,32 @@ function renderNode(request, task, node, childIndex) {
4862
5245
  thrownValue === SuspenseException
4863
5246
  ? getSuspendedThenable()
4864
5247
  : thrownValue),
4865
- "object" === typeof node &&
4866
- null !== node &&
4867
- "function" === typeof node.then)
5248
+ "object" === typeof node && null !== node)
4868
5249
  ) {
4869
- childIndex = getThenableStateAfterSuspending();
4870
- request = createReplayTask(
4871
- request,
4872
- childIndex,
4873
- task.replay,
4874
- task.node,
4875
- task.childIndex,
4876
- task.blockedBoundary,
4877
- task.hoistableState,
4878
- task.abortSet,
4879
- task.keyPath,
4880
- task.formatContext,
4881
- task.legacyContext,
4882
- task.context,
4883
- task.treeContext,
4884
- null !== task.componentStack ? task.componentStack.parent : null,
4885
- task.isFallback
4886
- ).ping;
4887
- node.then(request, request);
4888
- task.formatContext = previousFormatContext;
4889
- task.legacyContext = previousLegacyContext;
4890
- task.context = previousContext;
4891
- task.keyPath = previousKeyPath;
4892
- task.treeContext = previousTreeContext;
4893
- task.componentStack = previousComponentStack;
4894
- switchContext(previousContext);
4895
- return;
5250
+ if ("function" === typeof node.then) {
5251
+ childIndex = getThenableStateAfterSuspending();
5252
+ request = spawnNewSuspendedReplayTask(request, task, childIndex).ping;
5253
+ node.then(request, request);
5254
+ task.formatContext = previousFormatContext;
5255
+ task.context = previousContext;
5256
+ task.keyPath = previousKeyPath;
5257
+ task.treeContext = previousTreeContext;
5258
+ task.componentStack = previousComponentStack;
5259
+ switchContext(previousContext);
5260
+ return;
5261
+ }
5262
+ if ("Maximum call stack size exceeded" === node.message) {
5263
+ node = getThenableStateAfterSuspending();
5264
+ node = spawnNewSuspendedReplayTask(request, task, node);
5265
+ request.pingedTasks.push(node);
5266
+ task.formatContext = previousFormatContext;
5267
+ task.context = previousContext;
5268
+ task.keyPath = previousKeyPath;
5269
+ task.treeContext = previousTreeContext;
5270
+ task.componentStack = previousComponentStack;
5271
+ switchContext(previousContext);
5272
+ return;
5273
+ }
4896
5274
  }
4897
5275
  }
4898
5276
  else {
@@ -4900,62 +5278,45 @@ function renderNode(request, task, node, childIndex) {
4900
5278
  chunkLength = segment.chunks.length;
4901
5279
  try {
4902
5280
  return renderNodeDestructive(request, task, node, childIndex);
4903
- } catch (thrownValue$40) {
5281
+ } catch (thrownValue$48) {
4904
5282
  if (
4905
5283
  (resetHooksState(),
4906
5284
  (segment.children.length = childrenLength),
4907
5285
  (segment.chunks.length = chunkLength),
4908
5286
  (node =
4909
- thrownValue$40 === SuspenseException
5287
+ thrownValue$48 === SuspenseException
4910
5288
  ? getSuspendedThenable()
4911
- : thrownValue$40),
4912
- "object" === typeof node &&
4913
- null !== node &&
4914
- "function" === typeof node.then)
5289
+ : thrownValue$48),
5290
+ "object" === typeof node && null !== node)
4915
5291
  ) {
4916
- childIndex = getThenableStateAfterSuspending();
4917
- segment = task.blockedSegment;
4918
- childrenLength = createPendingSegment(
4919
- request,
4920
- segment.chunks.length,
4921
- null,
4922
- task.formatContext,
4923
- segment.lastPushedText,
4924
- !0
4925
- );
4926
- segment.children.push(childrenLength);
4927
- segment.lastPushedText = !1;
4928
- request = createRenderTask(
4929
- request,
4930
- childIndex,
4931
- task.node,
4932
- task.childIndex,
4933
- task.blockedBoundary,
4934
- childrenLength,
4935
- task.hoistableState,
4936
- task.abortSet,
4937
- task.keyPath,
4938
- task.formatContext,
4939
- task.legacyContext,
4940
- task.context,
4941
- task.treeContext,
4942
- null !== task.componentStack ? task.componentStack.parent : null,
4943
- task.isFallback
4944
- ).ping;
4945
- node.then(request, request);
4946
- task.formatContext = previousFormatContext;
4947
- task.legacyContext = previousLegacyContext;
4948
- task.context = previousContext;
4949
- task.keyPath = previousKeyPath;
4950
- task.treeContext = previousTreeContext;
4951
- task.componentStack = previousComponentStack;
4952
- switchContext(previousContext);
4953
- return;
5292
+ if ("function" === typeof node.then) {
5293
+ childIndex = getThenableStateAfterSuspending();
5294
+ request = spawnNewSuspendedRenderTask(request, task, childIndex).ping;
5295
+ node.then(request, request);
5296
+ task.formatContext = previousFormatContext;
5297
+ task.context = previousContext;
5298
+ task.keyPath = previousKeyPath;
5299
+ task.treeContext = previousTreeContext;
5300
+ task.componentStack = previousComponentStack;
5301
+ switchContext(previousContext);
5302
+ return;
5303
+ }
5304
+ if ("Maximum call stack size exceeded" === node.message) {
5305
+ node = getThenableStateAfterSuspending();
5306
+ node = spawnNewSuspendedRenderTask(request, task, node);
5307
+ request.pingedTasks.push(node);
5308
+ task.formatContext = previousFormatContext;
5309
+ task.context = previousContext;
5310
+ task.keyPath = previousKeyPath;
5311
+ task.treeContext = previousTreeContext;
5312
+ task.componentStack = previousComponentStack;
5313
+ switchContext(previousContext);
5314
+ return;
5315
+ }
4954
5316
  }
4955
5317
  }
4956
5318
  }
4957
5319
  task.formatContext = previousFormatContext;
4958
- task.legacyContext = previousLegacyContext;
4959
5320
  task.context = previousContext;
4960
5321
  task.keyPath = previousKeyPath;
4961
5322
  task.treeContext = previousTreeContext;
@@ -4990,7 +5351,12 @@ function abortRemainingReplayNodes(
4990
5351
  node = node[5];
4991
5352
  var request = request$jscomp$0,
4992
5353
  errorDigest = errorDigest$jscomp$0,
4993
- resumedBoundary = createSuspenseBoundary(request, new Set());
5354
+ resumedBoundary = createSuspenseBoundary(
5355
+ request,
5356
+ new Set(),
5357
+ null,
5358
+ null
5359
+ );
4994
5360
  resumedBoundary.parentFlushed = !0;
4995
5361
  resumedBoundary.rootSegmentID = node;
4996
5362
  resumedBoundary.status = 4;
@@ -5016,26 +5382,30 @@ function abortRemainingReplayNodes(
5016
5382
  function abortTask(task, request, error) {
5017
5383
  var boundary = task.blockedBoundary,
5018
5384
  segment = task.blockedSegment;
5019
- null !== segment && (segment.status = 3);
5385
+ if (null !== segment) {
5386
+ if (6 === segment.status) return;
5387
+ segment.status = 3;
5388
+ }
5389
+ segment = getThrownInfo(task.componentStack);
5020
5390
  if (null === boundary) {
5021
- if (((boundary = {}), 1 !== request.status && 2 !== request.status)) {
5022
- task = task.replay;
5023
- if (null === task) {
5024
- logRecoverableError(request, error, boundary);
5391
+ if (13 !== request.status && 14 !== request.status) {
5392
+ boundary = task.replay;
5393
+ if (null === boundary) {
5394
+ logRecoverableError(request, error, segment);
5025
5395
  fatalError(request, error);
5026
5396
  return;
5027
5397
  }
5028
- task.pendingTasks--;
5029
- 0 === task.pendingTasks &&
5030
- 0 < task.nodes.length &&
5031
- ((boundary = logRecoverableError(request, error, boundary)),
5398
+ boundary.pendingTasks--;
5399
+ 0 === boundary.pendingTasks &&
5400
+ 0 < boundary.nodes.length &&
5401
+ ((task = logRecoverableError(request, error, segment)),
5032
5402
  abortRemainingReplayNodes(
5033
5403
  request,
5034
5404
  null,
5035
- task.nodes,
5036
- task.slots,
5405
+ boundary.nodes,
5406
+ boundary.slots,
5037
5407
  error,
5038
- boundary
5408
+ task
5039
5409
  ));
5040
5410
  request.pendingRootTasks--;
5041
5411
  0 === request.pendingRootTasks && completeShell(request);
@@ -5044,8 +5414,8 @@ function abortTask(task, request, error) {
5044
5414
  boundary.pendingTasks--,
5045
5415
  4 !== boundary.status &&
5046
5416
  ((boundary.status = 4),
5047
- (task = getThrownInfo(request, task.componentStack)),
5048
- (task = logRecoverableError(request, error, task)),
5417
+ (task = logRecoverableError(request, error, segment)),
5418
+ (boundary.status = 4),
5049
5419
  (boundary.errorDigest = task),
5050
5420
  untrackBoundary(request, boundary),
5051
5421
  boundary.parentFlushed &&
@@ -5099,7 +5469,7 @@ function safelyEmitEarlyPreloads(request, shellComplete) {
5099
5469
  referrerPolicy: props$jscomp$0.referrerPolicy,
5100
5470
  media: props$jscomp$0.media
5101
5471
  });
5102
- if (2 <= (headers.remainingCapacity -= header.length))
5472
+ if (0 <= (headers.remainingCapacity -= header.length + 2))
5103
5473
  (renderState.resets.style[key] = PRELOAD_NO_CREDS),
5104
5474
  linkHeader && (linkHeader += ", "),
5105
5475
  (linkHeader += header),
@@ -5120,6 +5490,7 @@ function safelyEmitEarlyPreloads(request, shellComplete) {
5120
5490
  }
5121
5491
  function completeShell(request) {
5122
5492
  null === request.trackedPostpones && safelyEmitEarlyPreloads(request, !0);
5493
+ null === request.trackedPostpones && preparePreamble(request);
5123
5494
  request.onShellError = noop;
5124
5495
  request = request.onShellReady;
5125
5496
  request();
@@ -5132,6 +5503,7 @@ function completeAll(request) {
5132
5503
  : null === request.completedRootSegment ||
5133
5504
  5 !== request.completedRootSegment.status
5134
5505
  );
5506
+ preparePreamble(request);
5135
5507
  request = request.onAllReady;
5136
5508
  request();
5137
5509
  }
@@ -5172,7 +5544,11 @@ function finishedTask(request, boundary, segment) {
5172
5544
  request.completedBoundaries.push(boundary),
5173
5545
  1 === boundary.status &&
5174
5546
  (boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request),
5175
- boundary.fallbackAbortableTasks.clear()))
5547
+ boundary.fallbackAbortableTasks.clear(),
5548
+ 0 === request.pendingRootTasks &&
5549
+ null === request.trackedPostpones &&
5550
+ null !== boundary.contentPreamble &&
5551
+ preparePreamble(request)))
5176
5552
  : null !== segment &&
5177
5553
  segment.parentFlushed &&
5178
5554
  1 === segment.status &&
@@ -5184,7 +5560,7 @@ function finishedTask(request, boundary, segment) {
5184
5560
  0 === request.allPendingTasks && completeAll(request);
5185
5561
  }
5186
5562
  function performWork(request$jscomp$2) {
5187
- if (2 !== request$jscomp$2.status) {
5563
+ if (14 !== request$jscomp$2.status && 13 !== request$jscomp$2.status) {
5188
5564
  var prevContext = currentActiveSnapshot,
5189
5565
  prevDispatcher = ReactSharedInternals.H;
5190
5566
  ReactSharedInternals.H = HooksDispatcher;
@@ -5206,12 +5582,15 @@ function performWork(request$jscomp$2) {
5206
5582
  if (0 !== task.replay.pendingTasks) {
5207
5583
  switchContext(task.context);
5208
5584
  try {
5209
- renderNodeDestructive(
5210
- request$jscomp$0,
5211
- task,
5212
- task.node,
5213
- task.childIndex
5214
- );
5585
+ "number" === typeof task.replay.slots
5586
+ ? resumeNode(
5587
+ request$jscomp$0,
5588
+ task,
5589
+ task.replay.slots,
5590
+ task.node,
5591
+ task.childIndex
5592
+ )
5593
+ : retryNode(request$jscomp$0, task);
5215
5594
  if (
5216
5595
  1 === task.replay.pendingTasks &&
5217
5596
  0 < task.replay.nodes.length
@@ -5236,19 +5615,17 @@ function performWork(request$jscomp$2) {
5236
5615
  var ping = task.ping;
5237
5616
  x.then(ping, ping);
5238
5617
  task.thenableState = getThenableStateAfterSuspending();
5239
- null !== task.componentStack &&
5240
- (task.componentStack = task.componentStack.parent);
5241
5618
  } else {
5242
5619
  task.replay.pendingTasks--;
5243
5620
  task.abortSet.delete(task);
5244
- var errorInfo = getThrownInfo(
5245
- request$jscomp$0,
5246
- task.componentStack
5247
- );
5621
+ var errorInfo = getThrownInfo(task.componentStack);
5248
5622
  request = void 0;
5249
5623
  var request$jscomp$1 = request$jscomp$0,
5250
5624
  boundary = task.blockedBoundary,
5251
- error$jscomp$0 = x,
5625
+ error$jscomp$0 =
5626
+ 12 === request$jscomp$0.status
5627
+ ? request$jscomp$0.fatalError
5628
+ : x,
5252
5629
  replayNodes = task.replay.nodes,
5253
5630
  resumeSlots = task.replay.slots;
5254
5631
  request = logRecoverableError(
@@ -5279,11 +5656,12 @@ function performWork(request$jscomp$2) {
5279
5656
  (request$jscomp$1 = segment),
5280
5657
  0 === request$jscomp$1.status)
5281
5658
  ) {
5659
+ request$jscomp$1.status = 6;
5282
5660
  switchContext(task.context);
5283
5661
  var childrenLength = request$jscomp$1.children.length,
5284
5662
  chunkLength = request$jscomp$1.chunks.length;
5285
5663
  try {
5286
- renderNodeDestructive(request, task, task.node, task.childIndex),
5664
+ retryNode(request, task),
5287
5665
  request$jscomp$1.lastPushedText &&
5288
5666
  request$jscomp$1.textEmbedded &&
5289
5667
  request$jscomp$1.chunks.push(textSeparator),
@@ -5297,22 +5675,20 @@ function performWork(request$jscomp$2) {
5297
5675
  var x$jscomp$0 =
5298
5676
  thrownValue === SuspenseException
5299
5677
  ? getSuspendedThenable()
5300
- : thrownValue;
5678
+ : 12 === request.status
5679
+ ? request.fatalError
5680
+ : thrownValue;
5301
5681
  if (
5302
5682
  "object" === typeof x$jscomp$0 &&
5303
5683
  null !== x$jscomp$0 &&
5304
5684
  "function" === typeof x$jscomp$0.then
5305
5685
  ) {
5686
+ request$jscomp$1.status = 0;
5687
+ task.thenableState = getThenableStateAfterSuspending();
5306
5688
  var ping$jscomp$0 = task.ping;
5307
5689
  x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
5308
- task.thenableState = getThenableStateAfterSuspending();
5309
- null !== task.componentStack &&
5310
- (task.componentStack = task.componentStack.parent);
5311
5690
  } else {
5312
- var errorInfo$jscomp$0 = getThrownInfo(
5313
- request,
5314
- task.componentStack
5315
- );
5691
+ var errorInfo$jscomp$0 = getThrownInfo(task.componentStack);
5316
5692
  task.abortSet.delete(task);
5317
5693
  request$jscomp$1.status = 4;
5318
5694
  var boundary$jscomp$0 = task.blockedBoundary;
@@ -5329,9 +5705,11 @@ function performWork(request$jscomp$2) {
5329
5705
  (boundary$jscomp$0.errorDigest = request$jscomp$0),
5330
5706
  untrackBoundary(request, boundary$jscomp$0),
5331
5707
  boundary$jscomp$0.parentFlushed &&
5332
- request.clientRenderedBoundaries.push(
5333
- boundary$jscomp$0
5334
- )));
5708
+ request.clientRenderedBoundaries.push(boundary$jscomp$0),
5709
+ 0 === request.pendingRootTasks &&
5710
+ null === request.trackedPostpones &&
5711
+ null !== boundary$jscomp$0.contentPreamble &&
5712
+ preparePreamble(request)));
5335
5713
  request.allPendingTasks--;
5336
5714
  0 === request.allPendingTasks && completeAll(request);
5337
5715
  }
@@ -5354,6 +5732,85 @@ function performWork(request$jscomp$2) {
5354
5732
  }
5355
5733
  }
5356
5734
  }
5735
+ function preparePreambleFromSubtree(
5736
+ request,
5737
+ segment,
5738
+ collectedPreambleSegments
5739
+ ) {
5740
+ segment.preambleChildren.length &&
5741
+ collectedPreambleSegments.push(segment.preambleChildren);
5742
+ for (var pendingPreambles = !1, i = 0; i < segment.children.length; i++)
5743
+ pendingPreambles =
5744
+ preparePreambleFromSegment(
5745
+ request,
5746
+ segment.children[i],
5747
+ collectedPreambleSegments
5748
+ ) || pendingPreambles;
5749
+ return pendingPreambles;
5750
+ }
5751
+ function preparePreambleFromSegment(
5752
+ request,
5753
+ segment,
5754
+ collectedPreambleSegments
5755
+ ) {
5756
+ var boundary = segment.boundary;
5757
+ if (null === boundary)
5758
+ return preparePreambleFromSubtree(
5759
+ request,
5760
+ segment,
5761
+ collectedPreambleSegments
5762
+ );
5763
+ var preamble = boundary.contentPreamble,
5764
+ fallbackPreamble = boundary.fallbackPreamble;
5765
+ if (null === preamble || null === fallbackPreamble) return !1;
5766
+ switch (boundary.status) {
5767
+ case 1:
5768
+ hoistPreambleState(request.renderState, preamble);
5769
+ segment = boundary.completedSegments[0];
5770
+ if (!segment)
5771
+ throw Error(
5772
+ "A previously unvisited boundary must have exactly one root segment. This is a bug in React."
5773
+ );
5774
+ return preparePreambleFromSubtree(
5775
+ request,
5776
+ segment,
5777
+ collectedPreambleSegments
5778
+ );
5779
+ case 5:
5780
+ if (null !== request.trackedPostpones) return !0;
5781
+ case 4:
5782
+ if (1 === segment.status)
5783
+ return (
5784
+ hoistPreambleState(request.renderState, fallbackPreamble),
5785
+ preparePreambleFromSubtree(
5786
+ request,
5787
+ segment,
5788
+ collectedPreambleSegments
5789
+ )
5790
+ );
5791
+ default:
5792
+ return !0;
5793
+ }
5794
+ }
5795
+ function preparePreamble(request) {
5796
+ if (
5797
+ request.completedRootSegment &&
5798
+ null === request.completedPreambleSegments
5799
+ ) {
5800
+ var collectedPreambleSegments = [],
5801
+ hasPendingPreambles = preparePreambleFromSegment(
5802
+ request,
5803
+ request.completedRootSegment,
5804
+ collectedPreambleSegments
5805
+ ),
5806
+ preamble = request.renderState.preamble;
5807
+ if (
5808
+ !1 === hasPendingPreambles ||
5809
+ (preamble.headChunks && preamble.bodyChunks)
5810
+ )
5811
+ request.completedPreambleSegments = collectedPreambleSegments;
5812
+ }
5813
+ }
5357
5814
  function flushSubtree(request, destination, segment, hoistableState) {
5358
5815
  segment.parentFlushed = !0;
5359
5816
  switch (segment.status) {
@@ -5398,21 +5855,27 @@ function flushSegment(request, destination, segment, hoistableState) {
5398
5855
  if (null === boundary)
5399
5856
  return flushSubtree(request, destination, segment, hoistableState);
5400
5857
  boundary.parentFlushed = !0;
5401
- if (4 === boundary.status)
5402
- (boundary = boundary.errorDigest),
5403
- writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary),
5404
- writeChunk(destination, clientRenderedSuspenseBoundaryError1),
5405
- boundary &&
5406
- (writeChunk(destination, clientRenderedSuspenseBoundaryError1A),
5407
- writeChunk(destination, stringToChunk(escapeTextForBrowser(boundary))),
5408
- writeChunk(
5409
- destination,
5410
- clientRenderedSuspenseBoundaryErrorAttrInterstitial
5411
- )),
5412
- writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2),
5413
- flushSubtree(request, destination, segment, hoistableState);
5414
- else if (1 !== boundary.status)
5415
- 0 === boundary.status && (boundary.rootSegmentID = request.nextSegmentId++),
5858
+ if (4 === boundary.status) {
5859
+ var errorDigest = boundary.errorDigest;
5860
+ writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary);
5861
+ writeChunk(destination, clientRenderedSuspenseBoundaryError1);
5862
+ errorDigest &&
5863
+ (writeChunk(destination, clientRenderedSuspenseBoundaryError1A),
5864
+ writeChunk(destination, stringToChunk(escapeTextForBrowser(errorDigest))),
5865
+ writeChunk(
5866
+ destination,
5867
+ clientRenderedSuspenseBoundaryErrorAttrInterstitial
5868
+ ));
5869
+ writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2);
5870
+ flushSubtree(request, destination, segment, hoistableState);
5871
+ (request = boundary.fallbackPreamble) &&
5872
+ writePreambleContribution(destination, request);
5873
+ return writeChunkAndReturn(destination, endSuspenseBoundary);
5874
+ }
5875
+ if (1 !== boundary.status)
5876
+ return (
5877
+ 0 === boundary.status &&
5878
+ (boundary.rootSegmentID = request.nextSegmentId++),
5416
5879
  0 < boundary.completedSegments.length &&
5417
5880
  request.partialBoundaries.push(boundary),
5418
5881
  writeStartPendingSuspenseBoundary(
@@ -5427,29 +5890,34 @@ function flushSegment(request, destination, segment, hoistableState) {
5427
5890
  hoistStylesheetDependency,
5428
5891
  hoistableState
5429
5892
  )),
5430
- flushSubtree(request, destination, segment, hoistableState);
5431
- else if (boundary.byteSize > request.progressiveChunkSize)
5432
- (boundary.rootSegmentID = request.nextSegmentId++),
5893
+ flushSubtree(request, destination, segment, hoistableState),
5894
+ writeChunkAndReturn(destination, endSuspenseBoundary)
5895
+ );
5896
+ if (boundary.byteSize > request.progressiveChunkSize)
5897
+ return (
5898
+ (boundary.rootSegmentID = request.nextSegmentId++),
5433
5899
  request.completedBoundaries.push(boundary),
5434
5900
  writeStartPendingSuspenseBoundary(
5435
5901
  destination,
5436
5902
  request.renderState,
5437
5903
  boundary.rootSegmentID
5438
5904
  ),
5439
- flushSubtree(request, destination, segment, hoistableState);
5440
- else {
5441
- hoistableState &&
5442
- ((segment = boundary.contentState),
5443
- segment.styles.forEach(hoistStyleQueueDependency, hoistableState),
5444
- segment.stylesheets.forEach(hoistStylesheetDependency, hoistableState));
5445
- writeChunkAndReturn(destination, startCompletedSuspenseBoundary);
5446
- segment = boundary.completedSegments;
5447
- if (1 !== segment.length)
5448
- throw Error(
5449
- "A previously unvisited boundary must have exactly one root segment. This is a bug in React."
5450
- );
5451
- flushSegment(request, destination, segment[0], hoistableState);
5452
- }
5905
+ flushSubtree(request, destination, segment, hoistableState),
5906
+ writeChunkAndReturn(destination, endSuspenseBoundary)
5907
+ );
5908
+ hoistableState &&
5909
+ ((segment = boundary.contentState),
5910
+ segment.styles.forEach(hoistStyleQueueDependency, hoistableState),
5911
+ segment.stylesheets.forEach(hoistStylesheetDependency, hoistableState));
5912
+ writeChunkAndReturn(destination, startCompletedSuspenseBoundary);
5913
+ segment = boundary.completedSegments;
5914
+ if (1 !== segment.length)
5915
+ throw Error(
5916
+ "A previously unvisited boundary must have exactly one root segment. This is a bug in React."
5917
+ );
5918
+ flushSegment(request, destination, segment[0], hoistableState);
5919
+ (request = boundary.contentPreamble) &&
5920
+ writePreambleContribution(destination, request);
5453
5921
  return writeChunkAndReturn(destination, endSuspenseBoundary);
5454
5922
  }
5455
5923
  function flushSegmentContainer(request, destination, segment, hoistableState) {
@@ -5492,13 +5960,13 @@ function flushCompletedBoundary(request, destination, boundary) {
5492
5960
  ? ((completedSegments.instructions |= 10),
5493
5961
  writeChunk(destination, completeBoundaryWithStylesScript1FullBoth))
5494
5962
  : 0 === (completedSegments.instructions & 8)
5495
- ? ((completedSegments.instructions |= 8),
5496
- writeChunk(destination, completeBoundaryWithStylesScript1FullPartial))
5497
- : writeChunk(destination, completeBoundaryWithStylesScript1Partial)
5963
+ ? ((completedSegments.instructions |= 8),
5964
+ writeChunk(destination, completeBoundaryWithStylesScript1FullPartial))
5965
+ : writeChunk(destination, completeBoundaryWithStylesScript1Partial)
5498
5966
  : 0 === (completedSegments.instructions & 2)
5499
- ? ((completedSegments.instructions |= 2),
5500
- writeChunk(destination, completeBoundaryScript1Full))
5501
- : writeChunk(destination, completeBoundaryScript1Partial);
5967
+ ? ((completedSegments.instructions |= 2),
5968
+ writeChunk(destination, completeBoundaryScript1Full))
5969
+ : writeChunk(destination, completeBoundaryScript1Partial);
5502
5970
  completedSegments = stringToChunk(i.toString(16));
5503
5971
  writeChunk(destination, request.boundaryPrefix);
5504
5972
  writeChunk(destination, completedSegments);
@@ -5556,9 +6024,12 @@ function flushCompletedQueues(request, destination) {
5556
6024
  completedRootSegment = request.completedRootSegment;
5557
6025
  if (null !== completedRootSegment) {
5558
6026
  if (5 === completedRootSegment.status) return;
6027
+ var completedPreambleSegments = request.completedPreambleSegments;
6028
+ if (null === completedPreambleSegments) return;
5559
6029
  var renderState = request.renderState,
5560
- htmlChunks = renderState.htmlChunks,
5561
- headChunks = renderState.headChunks,
6030
+ preamble = renderState.preamble,
6031
+ htmlChunks = preamble.htmlChunks,
6032
+ headChunks = preamble.headChunks,
5562
6033
  i$jscomp$0;
5563
6034
  if (htmlChunks) {
5564
6035
  for (i$jscomp$0 = 0; i$jscomp$0 < htmlChunks.length; i$jscomp$0++)
@@ -5599,10 +6070,27 @@ function flushCompletedQueues(request, destination) {
5599
6070
  var hoistableChunks = renderState.hoistableChunks;
5600
6071
  for (i$jscomp$0 = 0; i$jscomp$0 < hoistableChunks.length; i$jscomp$0++)
5601
6072
  writeChunk(destination, hoistableChunks[i$jscomp$0]);
5602
- hoistableChunks.length = 0;
5603
- htmlChunks &&
5604
- null === headChunks &&
6073
+ for (
6074
+ renderState = hoistableChunks.length = 0;
6075
+ renderState < completedPreambleSegments.length;
6076
+ renderState++
6077
+ ) {
6078
+ var segments = completedPreambleSegments[renderState];
6079
+ for (preamble = 0; preamble < segments.length; preamble++)
6080
+ flushSegment(request, destination, segments[preamble], null);
6081
+ }
6082
+ var preamble$jscomp$0 = request.renderState.preamble,
6083
+ headChunks$jscomp$0 = preamble$jscomp$0.headChunks;
6084
+ (preamble$jscomp$0.htmlChunks || headChunks$jscomp$0) &&
5605
6085
  writeChunk(destination, endChunkForTag("head"));
6086
+ var bodyChunks = preamble$jscomp$0.bodyChunks;
6087
+ if (bodyChunks)
6088
+ for (
6089
+ completedPreambleSegments = 0;
6090
+ completedPreambleSegments < bodyChunks.length;
6091
+ completedPreambleSegments++
6092
+ )
6093
+ writeChunk(destination, bodyChunks[completedPreambleSegments]);
5606
6094
  flushSegment(request, destination, completedRootSegment, null);
5607
6095
  request.completedRootSegment = null;
5608
6096
  writeBootstrap(destination, request.renderState);
@@ -5697,11 +6185,11 @@ function flushCompletedQueues(request, destination) {
5697
6185
  writtenBytes = 0;
5698
6186
  var partialBoundaries = request.partialBoundaries;
5699
6187
  for (i = 0; i < partialBoundaries.length; i++) {
5700
- var boundary$44 = partialBoundaries[i];
6188
+ var boundary$51 = partialBoundaries[i];
5701
6189
  a: {
5702
6190
  clientRenderedBoundaries = request;
5703
6191
  boundary = destination;
5704
- var completedSegments = boundary$44.completedSegments;
6192
+ var completedSegments = boundary$51.completedSegments;
5705
6193
  for (
5706
6194
  JSCompiler_inline_result = 0;
5707
6195
  JSCompiler_inline_result < completedSegments.length;
@@ -5711,7 +6199,7 @@ function flushCompletedQueues(request, destination) {
5711
6199
  !flushPartiallyCompletedSegment(
5712
6200
  clientRenderedBoundaries,
5713
6201
  boundary,
5714
- boundary$44,
6202
+ boundary$51,
5715
6203
  completedSegments[JSCompiler_inline_result]
5716
6204
  )
5717
6205
  ) {
@@ -5723,7 +6211,7 @@ function flushCompletedQueues(request, destination) {
5723
6211
  completedSegments.splice(0, JSCompiler_inline_result);
5724
6212
  JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(
5725
6213
  boundary,
5726
- boundary$44.contentState,
6214
+ boundary$51.contentState,
5727
6215
  clientRenderedBoundaries.renderState
5728
6216
  );
5729
6217
  }
@@ -5755,6 +6243,7 @@ function flushCompletedQueues(request, destination) {
5755
6243
  i.hasBody && writeChunk(destination, endChunkForTag("body")),
5756
6244
  i.hasHtml && writeChunk(destination, endChunkForTag("html")),
5757
6245
  completeWriting(destination),
6246
+ (request.status = 14),
5758
6247
  destination.close(),
5759
6248
  (request.destination = null))
5760
6249
  : completeWriting(destination);
@@ -5763,24 +6252,23 @@ function flushCompletedQueues(request, destination) {
5763
6252
  function startWork(request) {
5764
6253
  request.flushScheduled = null !== request.destination;
5765
6254
  supportsRequestStorage
5766
- ? setTimeout(function () {
6255
+ ? scheduleMicrotask(function () {
5767
6256
  return requestStorage.run(request, performWork, request);
5768
- }, 0)
5769
- : setTimeout(function () {
6257
+ })
6258
+ : scheduleMicrotask(function () {
5770
6259
  return performWork(request);
5771
- }, 0);
5772
- null === request.trackedPostpones &&
5773
- (supportsRequestStorage
5774
- ? setTimeout(function () {
5775
- return requestStorage.run(
6260
+ });
6261
+ setTimeout(function () {
6262
+ 10 === request.status && (request.status = 11);
6263
+ null === request.trackedPostpones &&
6264
+ (supportsRequestStorage
6265
+ ? requestStorage.run(
5776
6266
  request,
5777
6267
  enqueueEarlyPreloadsAfterInitialWork,
5778
6268
  request
5779
- );
5780
- }, 0)
5781
- : setTimeout(function () {
5782
- return enqueueEarlyPreloadsAfterInitialWork(request);
5783
- }, 0));
6269
+ )
6270
+ : enqueueEarlyPreloadsAfterInitialWork(request));
6271
+ }, 0);
5784
6272
  }
5785
6273
  function enqueueEarlyPreloadsAfterInitialWork(request) {
5786
6274
  safelyEmitEarlyPreloads(request, 0 === request.pendingRootTasks);
@@ -5797,14 +6285,32 @@ function enqueueFlush(request) {
5797
6285
  : (request.flushScheduled = !1);
5798
6286
  }, 0));
5799
6287
  }
6288
+ function startFlowing(request, destination) {
6289
+ if (13 === request.status)
6290
+ (request.status = 14), closeWithError(destination, request.fatalError);
6291
+ else if (14 !== request.status && null === request.destination) {
6292
+ request.destination = destination;
6293
+ try {
6294
+ flushCompletedQueues(request, destination);
6295
+ } catch (error) {
6296
+ logRecoverableError(request, error, {}), fatalError(request, error);
6297
+ }
6298
+ }
6299
+ }
5800
6300
  function abort(request, reason) {
6301
+ if (11 === request.status || 10 === request.status) request.status = 12;
5801
6302
  try {
5802
6303
  var abortableTasks = request.abortableTasks;
5803
6304
  if (0 < abortableTasks.size) {
5804
6305
  var error =
5805
6306
  void 0 === reason
5806
6307
  ? Error("The render was aborted by the server without a reason.")
5807
- : reason;
6308
+ : "object" === typeof reason &&
6309
+ null !== reason &&
6310
+ "function" === typeof reason.then
6311
+ ? Error("The render was aborted by the server with a promise.")
6312
+ : reason;
6313
+ request.fatalError = error;
5808
6314
  abortableTasks.forEach(function (task) {
5809
6315
  return abortTask(task, request, error);
5810
6316
  });
@@ -5812,10 +6318,87 @@ function abort(request, reason) {
5812
6318
  }
5813
6319
  null !== request.destination &&
5814
6320
  flushCompletedQueues(request, request.destination);
5815
- } catch (error$46) {
5816
- logRecoverableError(request, error$46, {}), fatalError(request, error$46);
6321
+ } catch (error$53) {
6322
+ logRecoverableError(request, error$53, {}), fatalError(request, error$53);
5817
6323
  }
5818
6324
  }
6325
+ function ensureCorrectIsomorphicReactVersion() {
6326
+ var isomorphicReactPackageVersion = React.version;
6327
+ if ("19.2.0-canary-5252281c-20250408" !== isomorphicReactPackageVersion)
6328
+ throw Error(
6329
+ 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
6330
+ (isomorphicReactPackageVersion +
6331
+ "\n - react-dom: 19.2.0-canary-5252281c-20250408\nLearn more: https://react.dev/warnings/version-mismatch")
6332
+ );
6333
+ }
6334
+ ensureCorrectIsomorphicReactVersion();
6335
+ ensureCorrectIsomorphicReactVersion();
6336
+ exports.prerender = function (children, options) {
6337
+ return new Promise(function (resolve, reject) {
6338
+ var onHeaders = options ? options.onHeaders : void 0,
6339
+ onHeadersImpl;
6340
+ onHeaders &&
6341
+ (onHeadersImpl = function (headersDescriptor) {
6342
+ onHeaders(new Headers(headersDescriptor));
6343
+ });
6344
+ var resources = createResumableState(
6345
+ options ? options.identifierPrefix : void 0,
6346
+ options ? options.unstable_externalRuntimeSrc : void 0,
6347
+ options ? options.bootstrapScriptContent : void 0,
6348
+ options ? options.bootstrapScripts : void 0,
6349
+ options ? options.bootstrapModules : void 0
6350
+ ),
6351
+ request = createPrerenderRequest(
6352
+ children,
6353
+ resources,
6354
+ createRenderState(
6355
+ resources,
6356
+ void 0,
6357
+ options ? options.unstable_externalRuntimeSrc : void 0,
6358
+ options ? options.importMap : void 0,
6359
+ onHeadersImpl,
6360
+ options ? options.maxHeadersLength : void 0
6361
+ ),
6362
+ createRootFormatContext(options ? options.namespaceURI : void 0),
6363
+ options ? options.progressiveChunkSize : void 0,
6364
+ options ? options.onError : void 0,
6365
+ function () {
6366
+ var result = {
6367
+ prelude: new ReadableStream(
6368
+ {
6369
+ type: "bytes",
6370
+ pull: function (controller) {
6371
+ startFlowing(request, controller);
6372
+ },
6373
+ cancel: function (reason) {
6374
+ request.destination = null;
6375
+ abort(request, reason);
6376
+ }
6377
+ },
6378
+ { highWaterMark: 0 }
6379
+ )
6380
+ };
6381
+ resolve(result);
6382
+ },
6383
+ void 0,
6384
+ void 0,
6385
+ reject,
6386
+ options ? options.onPostpone : void 0
6387
+ );
6388
+ if (options && options.signal) {
6389
+ var signal = options.signal;
6390
+ if (signal.aborted) abort(request, signal.reason);
6391
+ else {
6392
+ var listener = function () {
6393
+ abort(request, signal.reason);
6394
+ signal.removeEventListener("abort", listener);
6395
+ };
6396
+ signal.addEventListener("abort", listener);
6397
+ }
6398
+ }
6399
+ startWork(request);
6400
+ });
6401
+ };
5819
6402
  exports.renderToReadableStream = function (children, options) {
5820
6403
  return new Promise(function (resolve, reject) {
5821
6404
  var onFatalError,
@@ -5857,18 +6440,7 @@ exports.renderToReadableStream = function (children, options) {
5857
6440
  {
5858
6441
  type: "bytes",
5859
6442
  pull: function (controller) {
5860
- if (1 === request.status)
5861
- (request.status = 2),
5862
- closeWithError(controller, request.fatalError);
5863
- else if (2 !== request.status && null === request.destination) {
5864
- request.destination = controller;
5865
- try {
5866
- flushCompletedQueues(request, controller);
5867
- } catch (error) {
5868
- logRecoverableError(request, error, {}),
5869
- fatalError(request, error);
5870
- }
5871
- }
6443
+ startFlowing(request, controller);
5872
6444
  },
5873
6445
  cancel: function (reason) {
5874
6446
  request.destination = null;
@@ -5902,4 +6474,4 @@ exports.renderToReadableStream = function (children, options) {
5902
6474
  startWork(request);
5903
6475
  });
5904
6476
  };
5905
- exports.version = "19.0.0-beta-4508873393-20240430";
6477
+ exports.version = "19.2.0-canary-5252281c-20250408";