From 9b61452a2a481578ab891e6bde516035f157ac0c Mon Sep 17 00:00:00 2001 From: acdlite Date: Wed, 25 Sep 2024 13:40:14 -0700 Subject: [PATCH] Make prerendering always non-blocking (#31056) When a synchronous update suspends, and we prerender the siblings, the prerendering should be non-blocking so that we can immediately restart once the data arrives. This happens automatically when there's a Suspense boundary, because we immediately commit the boundary and then proceed to a Retry render, which are always concurrent. When there's not a Suspense boundary, there is no Retry, so we need to take care to switch from the synchronous work loop to the concurrent one, to enable time slicing. DiffTrain build for [0f1856c49febe96923e469f98c0b123130ea015c](https://github.com/facebook/react/commit/0f1856c49febe96923e469f98c0b123130ea015c) --- compiled/facebook-www/REVISION | 2 +- compiled/facebook-www/REVISION_TRANSFORMS | 2 +- compiled/facebook-www/React-dev.classic.js | 2 +- compiled/facebook-www/React-dev.modern.js | 2 +- compiled/facebook-www/React-prod.classic.js | 2 +- compiled/facebook-www/React-prod.modern.js | 2 +- .../facebook-www/React-profiling.classic.js | 2 +- .../facebook-www/React-profiling.modern.js | 2 +- compiled/facebook-www/ReactART-dev.classic.js | 514 +++++----- compiled/facebook-www/ReactART-dev.modern.js | 508 +++++----- .../facebook-www/ReactART-prod.classic.js | 482 +++++----- compiled/facebook-www/ReactART-prod.modern.js | 479 +++++----- compiled/facebook-www/ReactDOM-dev.classic.js | 901 +++++++++--------- compiled/facebook-www/ReactDOM-dev.modern.js | 867 +++++++++-------- .../facebook-www/ReactDOM-prod.classic.js | 781 +++++++-------- compiled/facebook-www/ReactDOM-prod.modern.js | 752 ++++++++------- .../ReactDOM-profiling.classic.js | 804 ++++++++-------- .../facebook-www/ReactDOM-profiling.modern.js | 775 +++++++-------- .../ReactDOMServer-dev.classic.js | 2 +- .../facebook-www/ReactDOMServer-dev.modern.js | 2 +- .../ReactDOMServer-prod.classic.js | 2 +- .../ReactDOMServer-prod.modern.js | 2 +- .../ReactDOMTesting-dev.classic.js | 901 +++++++++--------- .../ReactDOMTesting-dev.modern.js | 867 +++++++++-------- .../ReactDOMTesting-prod.classic.js | 789 +++++++-------- .../ReactDOMTesting-prod.modern.js | 760 ++++++++------- .../ReactReconciler-dev.classic.js | 537 ++++++----- .../ReactReconciler-dev.modern.js | 531 ++++++----- .../ReactReconciler-prod.classic.js | 488 +++++----- .../ReactReconciler-prod.modern.js | 482 +++++----- .../ReactTestRenderer-dev.classic.js | 499 +++++----- .../ReactTestRenderer-dev.modern.js | 499 +++++----- compiled/facebook-www/VERSION_CLASSIC | 2 +- compiled/facebook-www/VERSION_MODERN | 2 +- 34 files changed, 6812 insertions(+), 6432 deletions(-) diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index 4a8da9026df6d..028fccbc2886b 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -3c7667a694face1827356a7c90ee6f86a9c0baa0 +0f1856c49febe96923e469f98c0b123130ea015c diff --git a/compiled/facebook-www/REVISION_TRANSFORMS b/compiled/facebook-www/REVISION_TRANSFORMS index 4a8da9026df6d..028fccbc2886b 100644 --- a/compiled/facebook-www/REVISION_TRANSFORMS +++ b/compiled/facebook-www/REVISION_TRANSFORMS @@ -1 +1 @@ -3c7667a694face1827356a7c90ee6f86a9c0baa0 +0f1856c49febe96923e469f98c0b123130ea015c diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index 9b6fbb0475a83..69236c921c5c4 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -2000,7 +2000,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-www-classic-3c7667a6-20240925"; + exports.version = "19.0.0-www-classic-0f1856c4-20240925"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-dev.modern.js b/compiled/facebook-www/React-dev.modern.js index 93e83242f6626..6d71a54cb4d60 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -1980,7 +1980,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-www-modern-3c7667a6-20240925"; + exports.version = "19.0.0-www-modern-0f1856c4-20240925"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-prod.classic.js b/compiled/facebook-www/React-prod.classic.js index ca97177eceda2..1588e20aa481d 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -665,4 +665,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-classic-3c7667a6-20240925"; +exports.version = "19.0.0-www-classic-0f1856c4-20240925"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index 308fdbe879c7d..f852cfa1ca563 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -665,4 +665,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-modern-3c7667a6-20240925"; +exports.version = "19.0.0-www-modern-0f1856c4-20240925"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index ea32dd11af837..e8303a7c9fb45 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -669,7 +669,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-classic-3c7667a6-20240925"; +exports.version = "19.0.0-www-classic-0f1856c4-20240925"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-profiling.modern.js b/compiled/facebook-www/React-profiling.modern.js index c4ea2ae781998..ad809f96d7ae0 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -669,7 +669,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-modern-3c7667a6-20240925"; +exports.version = "19.0.0-www-modern-0f1856c4-20240925"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-dev.classic.js b/compiled/facebook-www/ReactART-dev.classic.js index 1f2794b4d9b62..3cd5ae1f4e2e3 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -857,7 +857,8 @@ __DEV__ && : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -866,7 +867,8 @@ __DEV__ && ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -882,6 +884,14 @@ __DEV__ && ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -988,7 +998,8 @@ __DEV__ && remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 === suspendedRetryLanes || + !enableSiblingPrerendering || + 0 === suspendedRetryLanes || 0 !== updatedLanes || (disableLegacyMode && 0 === root.tag) || (root.suspendedLanes |= @@ -2163,7 +2174,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -2234,45 +2246,46 @@ __DEV__ && (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && cancelCallback(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; if ( - currentTime !== root.callbackPriority || - (null !== ReactSharedInternals.actQueue && - pingedLanes !== fakeActCallbackNode$1) - ) - cancelCallback(pingedLanes); - else return currentTime; - switch (lanesToEventPriority(suspendedLanes)) { - case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; - case ContinuousEventPriority: - suspendedLanes = UserBlockingPriority; - break; - case DefaultEventPriority: - suspendedLanes = NormalPriority$1; - break; - case IdleEventPriority: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if ( + currentTime !== root.callbackPriority || + (null !== ReactSharedInternals.actQueue && + pingedLanes !== fakeActCallbackNode$1) + ) + cancelCallback(pingedLanes); + else return currentTime; + switch (lanesToEventPriority(suspendedLanes)) { + case DiscreteEventPriority: + case ContinuousEventPriority: + suspendedLanes = UserBlockingPriority; + break; + case DefaultEventPriority: + suspendedLanes = NormalPriority$1; + break; + case IdleEventPriority: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + null !== ReactSharedInternals.actQueue + ? (ReactSharedInternals.actQueue.push(pingedLanes), + (suspendedLanes = fakeActCallbackNode$1)) + : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - null !== ReactSharedInternals.actQueue - ? (ReactSharedInternals.actQueue.push(pingedLanes), - (suspendedLanes = fakeActCallbackNode$1)) - : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && cancelCallback(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -8991,7 +9004,8 @@ __DEV__ && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -12415,7 +12429,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -12474,7 +12488,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); 2 !== lane || @@ -12489,183 +12503,185 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if ( - (disableLegacyMode || 0 !== root.tag) && - exitStatus === RootErrored - ) { - var lanesThatJustErrored = lanes; - root.errorRecoveryDisabledLanes & lanesThatJustErrored - ? (renderWasConcurrent = 0) - : ((renderWasConcurrent = root.pendingLanes & -536870913), - (renderWasConcurrent = - 0 !== renderWasConcurrent - ? renderWasConcurrent - : renderWasConcurrent & 536870912 - ? 536870912 - : 0)); - if (0 !== renderWasConcurrent) { - lanes = renderWasConcurrent; - a: { - exitStatus = root; - var originallyAttemptedLanes = lanesThatJustErrored; - lanesThatJustErrored = workInProgressRootConcurrentErrors; - renderWasConcurrent = renderRootSync( - exitStatus, - renderWasConcurrent - ); - if (renderWasConcurrent !== RootErrored) { - if (workInProgressRootDidAttachPingListener) { - exitStatus.errorRecoveryDisabledLanes |= - originallyAttemptedLanes; - workInProgressRootInterleavedUpdatedLanes |= - originallyAttemptedLanes; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = lanesThatJustErrored; - null !== exitStatus && queueRecoverableErrors(exitStatus); + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + (enableSiblingPrerendering && checkIfRootIsPrerendering(root, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root, lanes, 0, !1); + break; + } else if (exitStatus === RootDidNotComplete) + markRootSuspended( + root, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if ( + (disableLegacyMode || 0 !== root.tag) && + exitStatus === RootErrored + ) { + var lanesThatJustErrored = lanes; + root.errorRecoveryDisabledLanes & lanesThatJustErrored + ? (renderWasConcurrent = 0) + : ((renderWasConcurrent = root.pendingLanes & -536870913), + (renderWasConcurrent = + 0 !== renderWasConcurrent + ? renderWasConcurrent + : renderWasConcurrent & 536870912 + ? 536870912 + : 0)); + if (0 !== renderWasConcurrent) { + lanes = renderWasConcurrent; + a: { + exitStatus = root; + var originallyAttemptedLanes = lanesThatJustErrored; + lanesThatJustErrored = workInProgressRootConcurrentErrors; + renderWasConcurrent = renderRootSync( + exitStatus, + renderWasConcurrent, + !1 + ); + if (renderWasConcurrent !== RootErrored) { + if (workInProgressRootDidAttachPingListener) { + exitStatus.errorRecoveryDisabledLanes |= + originallyAttemptedLanes; + workInProgressRootInterleavedUpdatedLanes |= + originallyAttemptedLanes; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = renderWasConcurrent; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = lanesThatJustErrored; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = renderWasConcurrent; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - IMMEDIATE_COMMIT, - -0, - 0 - ); - else { - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || exitStatus === RootSuspended) && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - -0, - 0 - ), - exitStatus + !workInProgressRootDidSkipSuspendedSiblings ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + -0, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || exitStatus === RootSuspended) && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - -0, - 0 + !workInProgressRootDidSkipSuspendedSiblings + ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + -0, + 0 + ), + exitStatus ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + -0, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -12758,18 +12774,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + didAttemptEntireTree[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -12813,11 +12831,7 @@ __DEV__ && workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = @@ -12940,7 +12954,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -12949,10 +12965,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -12974,37 +12990,46 @@ __DEV__ && enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = RootInProgress; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$34) { handleThrow(root, thrownValue$34); @@ -13015,16 +13040,13 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); enableDebugTracing && enableDebugTracing && groupEnd(); enableSchedulingProfiler && markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -13049,12 +13071,10 @@ __DEV__ && workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + ); enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); a: do @@ -17020,11 +17040,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-3c7667a6-20240925", + version: "19.0.0-www-classic-0f1856c4-20240925", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-3c7667a6-20240925" + reconcilerVersion: "19.0.0-www-classic-0f1856c4-20240925" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -17058,7 +17078,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.0.0-www-classic-3c7667a6-20240925"; + exports.version = "19.0.0-www-classic-0f1856c4-20240925"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index 60743f4dd4648..dc9e85846b5d2 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -840,7 +840,8 @@ __DEV__ && : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -849,7 +850,8 @@ __DEV__ && ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -865,6 +867,14 @@ __DEV__ && ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -971,7 +981,8 @@ __DEV__ && remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && 0 === updatedLanes && 0 !== root.tag && (root.suspendedLanes |= @@ -2048,7 +2059,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -2119,45 +2131,46 @@ __DEV__ && (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && cancelCallback(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; if ( - currentTime !== root.callbackPriority || - (null !== ReactSharedInternals.actQueue && - pingedLanes !== fakeActCallbackNode$1) - ) - cancelCallback(pingedLanes); - else return currentTime; - switch (lanesToEventPriority(suspendedLanes)) { - case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; - case ContinuousEventPriority: - suspendedLanes = UserBlockingPriority; - break; - case DefaultEventPriority: - suspendedLanes = NormalPriority$1; - break; - case IdleEventPriority: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if ( + currentTime !== root.callbackPriority || + (null !== ReactSharedInternals.actQueue && + pingedLanes !== fakeActCallbackNode$1) + ) + cancelCallback(pingedLanes); + else return currentTime; + switch (lanesToEventPriority(suspendedLanes)) { + case DiscreteEventPriority: + case ContinuousEventPriority: + suspendedLanes = UserBlockingPriority; + break; + case DefaultEventPriority: + suspendedLanes = NormalPriority$1; + break; + case IdleEventPriority: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + null !== ReactSharedInternals.actQueue + ? (ReactSharedInternals.actQueue.push(pingedLanes), + (suspendedLanes = fakeActCallbackNode$1)) + : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - null !== ReactSharedInternals.actQueue - ? (ReactSharedInternals.actQueue.push(pingedLanes), - (suspendedLanes = fakeActCallbackNode$1)) - : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && cancelCallback(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -8646,7 +8659,8 @@ __DEV__ && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -11971,7 +11985,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -12029,7 +12043,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } @@ -12037,180 +12051,182 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (exitStatus === RootErrored) { - var lanesThatJustErrored = lanes; - root.errorRecoveryDisabledLanes & lanesThatJustErrored - ? (renderWasConcurrent = 0) - : ((renderWasConcurrent = root.pendingLanes & -536870913), - (renderWasConcurrent = - 0 !== renderWasConcurrent - ? renderWasConcurrent - : renderWasConcurrent & 536870912 - ? 536870912 - : 0)); - if (0 !== renderWasConcurrent) { - lanes = renderWasConcurrent; - a: { - exitStatus = root; - var originallyAttemptedLanes = lanesThatJustErrored; - lanesThatJustErrored = workInProgressRootConcurrentErrors; - renderWasConcurrent = renderRootSync( - exitStatus, - renderWasConcurrent - ); - if (renderWasConcurrent !== RootErrored) { - if (workInProgressRootDidAttachPingListener) { - exitStatus.errorRecoveryDisabledLanes |= - originallyAttemptedLanes; - workInProgressRootInterleavedUpdatedLanes |= - originallyAttemptedLanes; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = lanesThatJustErrored; - null !== exitStatus && queueRecoverableErrors(exitStatus); + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + (enableSiblingPrerendering && checkIfRootIsPrerendering(root, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root, lanes, 0, !1); + break; + } else if (exitStatus === RootDidNotComplete) + markRootSuspended( + root, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if (exitStatus === RootErrored) { + var lanesThatJustErrored = lanes; + root.errorRecoveryDisabledLanes & lanesThatJustErrored + ? (renderWasConcurrent = 0) + : ((renderWasConcurrent = root.pendingLanes & -536870913), + (renderWasConcurrent = + 0 !== renderWasConcurrent + ? renderWasConcurrent + : renderWasConcurrent & 536870912 + ? 536870912 + : 0)); + if (0 !== renderWasConcurrent) { + lanes = renderWasConcurrent; + a: { + exitStatus = root; + var originallyAttemptedLanes = lanesThatJustErrored; + lanesThatJustErrored = workInProgressRootConcurrentErrors; + renderWasConcurrent = renderRootSync( + exitStatus, + renderWasConcurrent, + !1 + ); + if (renderWasConcurrent !== RootErrored) { + if (workInProgressRootDidAttachPingListener) { + exitStatus.errorRecoveryDisabledLanes |= + originallyAttemptedLanes; + workInProgressRootInterleavedUpdatedLanes |= + originallyAttemptedLanes; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = renderWasConcurrent; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = lanesThatJustErrored; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = renderWasConcurrent; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - IMMEDIATE_COMMIT, - -0, - 0 - ); - else { - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || exitStatus === RootSuspended) && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - -0, - 0 - ), - exitStatus + !workInProgressRootDidSkipSuspendedSiblings ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + -0, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || exitStatus === RootSuspended) && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - -0, - 0 + !workInProgressRootDidSkipSuspendedSiblings + ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + -0, + 0 + ), + exitStatus ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + -0, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -12303,18 +12319,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + didAttemptEntireTree[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -12358,11 +12376,7 @@ __DEV__ && workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = @@ -12485,7 +12499,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -12494,10 +12510,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -12519,37 +12535,46 @@ __DEV__ && enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = RootInProgress; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$34) { handleThrow(root, thrownValue$34); @@ -12560,16 +12585,13 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); enableDebugTracing && enableDebugTracing && groupEnd(); enableSchedulingProfiler && markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -12594,12 +12616,10 @@ __DEV__ && workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + ); enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); a: do @@ -16463,11 +16483,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-3c7667a6-20240925", + version: "19.0.0-www-modern-0f1856c4-20240925", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-3c7667a6-20240925" + reconcilerVersion: "19.0.0-www-modern-0f1856c4-20240925" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -16501,7 +16521,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.0.0-www-modern-3c7667a6-20240925"; + exports.version = "19.0.0-www-modern-0f1856c4-20240925"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js index 0f52734319382..e72c0d239bd80 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -600,7 +600,8 @@ function getNextLanes(root, wipLanes) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -609,7 +610,8 @@ function getNextLanes(root, wipLanes) { ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -625,6 +627,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -726,7 +736,8 @@ function markRootFinished( remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 === suspendedRetryLanes || + !enableSiblingPrerendering || + 0 === suspendedRetryLanes || 0 !== updatedLanes || (disableLegacyMode && 0 === root.tag) || (root.suspendedLanes |= @@ -1229,7 +1240,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root, root === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, JSCompiler_inline_result)); root = root.next; @@ -1298,39 +1310,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { var originalCallbackNode = root.callbackNode; @@ -6549,7 +6560,8 @@ function scheduleRetryEffect(workInProgress, retryQueue) { ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -9167,7 +9179,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -9195,7 +9207,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); 2 !== lane || @@ -9208,168 +9220,166 @@ function scheduleUpdateOnFiber(root, fiber, lane) { } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if ( - (disableLegacyMode || 0 !== root$jscomp$0.tag) && - 2 === exitStatus - ) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if ((disableLegacyMode || 0 !== root$jscomp$0.tag) && 2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if (workInProgressRootDidAttachPingListener) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if (workInProgressRootDidAttachPingListener) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; + } + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -9468,18 +9478,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$6 = 31 - clz32(lanes), lane = 1 << index$6; - didSkipSuspendedSiblings[index$6] = -1; + didAttemptEntireTree[index$6] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -9523,9 +9535,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -9615,7 +9625,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -9624,10 +9636,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -9636,6 +9648,7 @@ function renderRootSync(root, lanes) { (workInProgressTransitions = getTransitionsForLanes(root, lanes)), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -9644,24 +9657,37 @@ function renderRootSync(root, lanes) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + exitStatus = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$151) { - handleThrow(root, thrownValue$151); + } catch (thrownValue$156) { + handleThrow(root, thrownValue$156); } while (1); lanes && root.shellSuspendCounter++; @@ -9669,11 +9695,11 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -9687,12 +9713,10 @@ function renderRootConcurrent(root, lanes) { ? ((workInProgressTransitions = getTransitionsForLanes(root, lanes)), (workInProgressRootRenderTargetTime = now() + 500), prepareFreshStack(root, lanes)) - : workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + )); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -9776,8 +9800,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$153) { - handleThrow(root, thrownValue$153); + } catch (thrownValue$158) { + handleThrow(root, thrownValue$158); } while (1); resetContextDependencies(); @@ -10824,27 +10848,27 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component); -var internals$jscomp$inline_1467 = { +var internals$jscomp$inline_1474 = { bundleType: 0, - version: "19.0.0-www-classic-3c7667a6-20240925", + version: "19.0.0-www-classic-0f1856c4-20240925", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: function () { return null; }, - reconcilerVersion: "19.0.0-www-classic-3c7667a6-20240925" + reconcilerVersion: "19.0.0-www-classic-0f1856c4-20240925" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1468 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1475 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1468.isDisabled && - hook$jscomp$inline_1468.supportsFiber + !hook$jscomp$inline_1475.isDisabled && + hook$jscomp$inline_1475.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1468.inject( - internals$jscomp$inline_1467 + (rendererID = hook$jscomp$inline_1475.inject( + internals$jscomp$inline_1474 )), - (injectedHook = hook$jscomp$inline_1468); + (injectedHook = hook$jscomp$inline_1475); } catch (err) {} } var Path = Mode$1.Path; @@ -10858,4 +10882,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.0.0-www-classic-3c7667a6-20240925"; +exports.version = "19.0.0-www-classic-0f1856c4-20240925"; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index 99b278190376f..e53d4edb6b9aa 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -517,7 +517,8 @@ function getNextLanes(root, wipLanes) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -526,7 +527,8 @@ function getNextLanes(root, wipLanes) { ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -542,6 +544,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -643,7 +653,8 @@ function markRootFinished( remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && 0 === updatedLanes && 0 !== root.tag && (root.suspendedLanes |= @@ -1068,7 +1079,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root, root === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, JSCompiler_inline_result)); root = root.next; @@ -1137,39 +1149,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { var originalCallbackNode = root.callbackNode; @@ -6182,7 +6193,8 @@ function scheduleRetryEffect(workInProgress, retryQueue) { ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -8740,7 +8752,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -8767,172 +8779,173 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if (2 === exitStatus) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if (workInProgressRootDidAttachPingListener) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if (workInProgressRootDidAttachPingListener) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; + } + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -9031,18 +9044,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$6 = 31 - clz32(lanes), lane = 1 << index$6; - didSkipSuspendedSiblings[index$6] = -1; + didAttemptEntireTree[index$6] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -9086,9 +9101,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -9178,7 +9191,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -9187,10 +9202,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -9199,6 +9214,7 @@ function renderRootSync(root, lanes) { (workInProgressTransitions = getTransitionsForLanes(root, lanes)), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -9207,24 +9223,37 @@ function renderRootSync(root, lanes) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + exitStatus = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$142) { - handleThrow(root, thrownValue$142); + } catch (thrownValue$147) { + handleThrow(root, thrownValue$147); } while (1); lanes && root.shellSuspendCounter++; @@ -9232,11 +9261,11 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -9250,12 +9279,10 @@ function renderRootConcurrent(root, lanes) { ? ((workInProgressTransitions = getTransitionsForLanes(root, lanes)), (workInProgressRootRenderTargetTime = now() + 500), prepareFreshStack(root, lanes)) - : workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + )); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -9339,8 +9366,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$144) { - handleThrow(root, thrownValue$144); + } catch (thrownValue$149) { + handleThrow(root, thrownValue$149); } while (1); resetContextDependencies(); @@ -10335,27 +10362,27 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component); -var internals$jscomp$inline_1459 = { +var internals$jscomp$inline_1466 = { bundleType: 0, - version: "19.0.0-www-modern-3c7667a6-20240925", + version: "19.0.0-www-modern-0f1856c4-20240925", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: function () { return null; }, - reconcilerVersion: "19.0.0-www-modern-3c7667a6-20240925" + reconcilerVersion: "19.0.0-www-modern-0f1856c4-20240925" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1460 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1467 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1460.isDisabled && - hook$jscomp$inline_1460.supportsFiber + !hook$jscomp$inline_1467.isDisabled && + hook$jscomp$inline_1467.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1460.inject( - internals$jscomp$inline_1459 + (rendererID = hook$jscomp$inline_1467.inject( + internals$jscomp$inline_1466 )), - (injectedHook = hook$jscomp$inline_1460); + (injectedHook = hook$jscomp$inline_1467); } catch (err) {} } var Path = Mode$1.Path; @@ -10369,4 +10396,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.0.0-www-modern-3c7667a6-20240925"; +exports.version = "19.0.0-www-modern-0f1856c4-20240925"; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index d156fc38a979e..96c3f79074056 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -954,7 +954,8 @@ __DEV__ && : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -963,7 +964,8 @@ __DEV__ && ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -979,6 +981,14 @@ __DEV__ && ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1085,7 +1095,8 @@ __DEV__ && remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 === suspendedRetryLanes || + !enableSiblingPrerendering || + 0 === suspendedRetryLanes || 0 !== updatedLanes || (disableLegacyMode && 0 === root.tag) || (root.suspendedLanes |= @@ -3906,7 +3917,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -3983,45 +3995,46 @@ __DEV__ && (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && cancelCallback(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; if ( - currentTime !== root.callbackPriority || - (null !== ReactSharedInternals.actQueue && - pingedLanes !== fakeActCallbackNode$1) - ) - cancelCallback(pingedLanes); - else return currentTime; - switch (lanesToEventPriority(suspendedLanes)) { - case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; - case ContinuousEventPriority: - suspendedLanes = UserBlockingPriority; - break; - case DefaultEventPriority: - suspendedLanes = NormalPriority$1; - break; - case IdleEventPriority: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - null !== ReactSharedInternals.actQueue - ? (ReactSharedInternals.actQueue.push(pingedLanes), - (suspendedLanes = fakeActCallbackNode$1)) - : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if ( + currentTime !== root.callbackPriority || + (null !== ReactSharedInternals.actQueue && + pingedLanes !== fakeActCallbackNode$1) + ) + cancelCallback(pingedLanes); + else return currentTime; + switch (lanesToEventPriority(suspendedLanes)) { + case DiscreteEventPriority: + case ContinuousEventPriority: + suspendedLanes = UserBlockingPriority; + break; + case DefaultEventPriority: + suspendedLanes = NormalPriority$1; + break; + case IdleEventPriority: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + null !== ReactSharedInternals.actQueue + ? (ReactSharedInternals.actQueue.push(pingedLanes), + (suspendedLanes = fakeActCallbackNode$1)) + : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && cancelCallback(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -9216,32 +9229,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2427; - var JSCompiler_object_inline_stack_2428 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2429; + var JSCompiler_object_inline_stack_2430 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2429 = !1; + var JSCompiler_object_inline_componentStack_2431 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2427 = didSuspend) || - (JSCompiler_object_inline_digest_2427 = + (JSCompiler_object_inline_digest_2429 = didSuspend) || + (JSCompiler_object_inline_digest_2429 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2427 && - ((JSCompiler_object_inline_componentStack_2429 = !0), + JSCompiler_object_inline_digest_2429 && + ((JSCompiler_object_inline_componentStack_2431 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2427 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2429 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2429 + JSCompiler_object_inline_componentStack_2431 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2426 = nextHydratableInstance; + var JSCompiler_object_inline_message_2428 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2426)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2428)) { c: { - var instance = JSCompiler_object_inline_message_2426; + var instance = JSCompiler_object_inline_message_2428; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9282,19 +9295,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2426 + JSCompiler_object_inline_message_2428 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2426 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2428 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2426 && - ((JSCompiler_object_inline_message_2426 = - JSCompiler_object_inline_message_2426.dehydrated), - null !== JSCompiler_object_inline_message_2426) + null !== JSCompiler_object_inline_message_2428 && + ((JSCompiler_object_inline_message_2428 = + JSCompiler_object_inline_message_2428.dehydrated), + null !== JSCompiler_object_inline_message_2428) ) return ( - JSCompiler_object_inline_message_2426.data === + JSCompiler_object_inline_message_2428.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -9302,27 +9315,27 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2426 = - JSCompiler_object_inline_stack_2428.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2428.fallback; - if (JSCompiler_object_inline_componentStack_2429) + JSCompiler_object_inline_message_2428 = + JSCompiler_object_inline_stack_2430.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2430.fallback; + if (JSCompiler_object_inline_componentStack_2431) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2428 = + (JSCompiler_object_inline_stack_2430 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2426, + JSCompiler_object_inline_message_2428, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2429 = + (JSCompiler_object_inline_componentStack_2431 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2429.memoizedState = + (JSCompiler_object_inline_componentStack_2431.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2429.childLanes = + (JSCompiler_object_inline_componentStack_2431.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2427, + JSCompiler_object_inline_digest_2429, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9335,9 +9348,9 @@ __DEV__ && ? markerInstanceStack.current : null), (current = - JSCompiler_object_inline_componentStack_2429.updateQueue), + JSCompiler_object_inline_componentStack_2431.updateQueue), null === current - ? (JSCompiler_object_inline_componentStack_2429.updateQueue = + ? (JSCompiler_object_inline_componentStack_2431.updateQueue = { transitions: workInProgress, markerInstances: renderLanes, @@ -9345,46 +9358,46 @@ __DEV__ && }) : ((current.transitions = workInProgress), (current.markerInstances = renderLanes)))), - JSCompiler_object_inline_stack_2428 + JSCompiler_object_inline_stack_2430 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2428.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2430.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2428 = + (JSCompiler_object_inline_stack_2430 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2426, + JSCompiler_object_inline_message_2428, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2429 = + (JSCompiler_object_inline_componentStack_2431 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2429.memoizedState = + (JSCompiler_object_inline_componentStack_2431.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2429.childLanes = + (JSCompiler_object_inline_componentStack_2431.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2427, + JSCompiler_object_inline_digest_2429, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2428 + JSCompiler_object_inline_stack_2430 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2426 + JSCompiler_object_inline_message_2428 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2426 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2426) + ((JSCompiler_object_inline_message_2428 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2428) ) { if (didSuspend) workInProgress.flags & 256 @@ -9401,32 +9414,32 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2429 = - JSCompiler_object_inline_stack_2428.fallback), - (JSCompiler_object_inline_message_2426 = workInProgress.mode), - (JSCompiler_object_inline_stack_2428 = createFiberFromOffscreen( + (JSCompiler_object_inline_componentStack_2431 = + JSCompiler_object_inline_stack_2430.fallback), + (JSCompiler_object_inline_message_2428 = workInProgress.mode), + (JSCompiler_object_inline_stack_2430 = createFiberFromOffscreen( { mode: "visible", - children: JSCompiler_object_inline_stack_2428.children + children: JSCompiler_object_inline_stack_2430.children }, - JSCompiler_object_inline_message_2426, + JSCompiler_object_inline_message_2428, 0, null )), - (JSCompiler_object_inline_componentStack_2429 = + (JSCompiler_object_inline_componentStack_2431 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2429, - JSCompiler_object_inline_message_2426, + JSCompiler_object_inline_componentStack_2431, + JSCompiler_object_inline_message_2428, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2429.flags |= 2), - (JSCompiler_object_inline_stack_2428.return = workInProgress), - (JSCompiler_object_inline_componentStack_2429.return = + (JSCompiler_object_inline_componentStack_2431.flags |= 2), + (JSCompiler_object_inline_stack_2430.return = workInProgress), + (JSCompiler_object_inline_componentStack_2431.return = workInProgress), - (JSCompiler_object_inline_stack_2428.sibling = - JSCompiler_object_inline_componentStack_2429), - (workInProgress.child = JSCompiler_object_inline_stack_2428), + (JSCompiler_object_inline_stack_2430.sibling = + JSCompiler_object_inline_componentStack_2431), + (workInProgress.child = JSCompiler_object_inline_stack_2430), (disableLegacyMode || (workInProgress.mode & ConcurrentMode) !== NoMode) && reconcileChildFibers( @@ -9435,63 +9448,63 @@ __DEV__ && null, renderLanes ), - (JSCompiler_object_inline_stack_2428 = workInProgress.child), - (JSCompiler_object_inline_stack_2428.memoizedState = + (JSCompiler_object_inline_stack_2430 = workInProgress.child), + (JSCompiler_object_inline_stack_2430.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2428.childLanes = + (JSCompiler_object_inline_stack_2430.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2427, + JSCompiler_object_inline_digest_2429, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2429)); + JSCompiler_object_inline_componentStack_2431)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_message_2426.data === + JSCompiler_object_inline_message_2428.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2427 = - JSCompiler_object_inline_message_2426.nextSibling && - JSCompiler_object_inline_message_2426.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2427) { - JSCompiler_temp = JSCompiler_object_inline_digest_2427.dgst; - var message = JSCompiler_object_inline_digest_2427.msg; - instance = JSCompiler_object_inline_digest_2427.stck; - var componentStack = JSCompiler_object_inline_digest_2427.cstck; + JSCompiler_object_inline_digest_2429 = + JSCompiler_object_inline_message_2428.nextSibling && + JSCompiler_object_inline_message_2428.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2429) { + JSCompiler_temp = JSCompiler_object_inline_digest_2429.dgst; + var message = JSCompiler_object_inline_digest_2429.msg; + instance = JSCompiler_object_inline_digest_2429.stck; + var componentStack = JSCompiler_object_inline_digest_2429.cstck; } - JSCompiler_object_inline_message_2426 = message; - JSCompiler_object_inline_digest_2427 = JSCompiler_temp; - JSCompiler_object_inline_stack_2428 = instance; - JSCompiler_object_inline_componentStack_2429 = componentStack; - JSCompiler_object_inline_message_2426 = - JSCompiler_object_inline_message_2426 - ? Error(JSCompiler_object_inline_message_2426) + JSCompiler_object_inline_message_2428 = message; + JSCompiler_object_inline_digest_2429 = JSCompiler_temp; + JSCompiler_object_inline_stack_2430 = instance; + JSCompiler_object_inline_componentStack_2431 = componentStack; + JSCompiler_object_inline_message_2428 = + JSCompiler_object_inline_message_2428 + ? Error(JSCompiler_object_inline_message_2428) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_message_2426.stack = - JSCompiler_object_inline_stack_2428 || ""; - JSCompiler_object_inline_message_2426.digest = - JSCompiler_object_inline_digest_2427; - JSCompiler_object_inline_digest_2427 = - void 0 === JSCompiler_object_inline_componentStack_2429 + JSCompiler_object_inline_message_2428.stack = + JSCompiler_object_inline_stack_2430 || ""; + JSCompiler_object_inline_message_2428.digest = + JSCompiler_object_inline_digest_2429; + JSCompiler_object_inline_digest_2429 = + void 0 === JSCompiler_object_inline_componentStack_2431 ? null - : JSCompiler_object_inline_componentStack_2429; - "string" === typeof JSCompiler_object_inline_digest_2427 && + : JSCompiler_object_inline_componentStack_2431; + "string" === typeof JSCompiler_object_inline_digest_2429 && CapturedStacks.set( - JSCompiler_object_inline_message_2426, - JSCompiler_object_inline_digest_2427 + JSCompiler_object_inline_message_2428, + JSCompiler_object_inline_digest_2429 ); queueHydrationError({ - value: JSCompiler_object_inline_message_2426, + value: JSCompiler_object_inline_message_2428, source: null, - stack: JSCompiler_object_inline_digest_2427 + stack: JSCompiler_object_inline_digest_2429 }); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9506,25 +9519,25 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2427 = + (JSCompiler_object_inline_digest_2429 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2427) + didReceiveUpdate || JSCompiler_object_inline_digest_2429) ) { - JSCompiler_object_inline_digest_2427 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2427) { - JSCompiler_object_inline_stack_2428 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2428 & 42)) - JSCompiler_object_inline_stack_2428 = 1; + JSCompiler_object_inline_digest_2429 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2429) { + JSCompiler_object_inline_stack_2430 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2430 & 42)) + JSCompiler_object_inline_stack_2430 = 1; else - switch (JSCompiler_object_inline_stack_2428) { + switch (JSCompiler_object_inline_stack_2430) { case 2: - JSCompiler_object_inline_stack_2428 = 1; + JSCompiler_object_inline_stack_2430 = 1; break; case 8: - JSCompiler_object_inline_stack_2428 = 4; + JSCompiler_object_inline_stack_2430 = 4; break; case 32: - JSCompiler_object_inline_stack_2428 = 16; + JSCompiler_object_inline_stack_2430 = 16; break; case 128: case 256: @@ -9545,40 +9558,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2428 = 64; + JSCompiler_object_inline_stack_2430 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2428 = 134217728; + JSCompiler_object_inline_stack_2430 = 134217728; break; default: - JSCompiler_object_inline_stack_2428 = 0; + JSCompiler_object_inline_stack_2430 = 0; } - JSCompiler_object_inline_stack_2428 = + JSCompiler_object_inline_stack_2430 = 0 !== - (JSCompiler_object_inline_stack_2428 & - (JSCompiler_object_inline_digest_2427.suspendedLanes | + (JSCompiler_object_inline_stack_2430 & + (JSCompiler_object_inline_digest_2429.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2428; + : JSCompiler_object_inline_stack_2430; if ( - 0 !== JSCompiler_object_inline_stack_2428 && - JSCompiler_object_inline_stack_2428 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2430 && + JSCompiler_object_inline_stack_2430 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2428), + ((prevState.retryLane = JSCompiler_object_inline_stack_2430), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2428 + JSCompiler_object_inline_stack_2430 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2427, + JSCompiler_object_inline_digest_2429, current, - JSCompiler_object_inline_stack_2428 + JSCompiler_object_inline_stack_2430 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2426.data === + JSCompiler_object_inline_message_2428.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9586,7 +9599,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2426.data === + JSCompiler_object_inline_message_2428.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9594,12 +9607,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2426._reactRetry = + (JSCompiler_object_inline_message_2428._reactRetry = workInProgress), (workInProgress = null)) : ((renderLanes = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2426.nextSibling + JSCompiler_object_inline_message_2428.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9617,73 +9630,73 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2428.children + JSCompiler_object_inline_stack_2430.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2429) + if (JSCompiler_object_inline_componentStack_2431) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2429 = - JSCompiler_object_inline_stack_2428.fallback), - (JSCompiler_object_inline_message_2426 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2431 = + JSCompiler_object_inline_stack_2430.fallback), + (JSCompiler_object_inline_message_2428 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), (componentStack = { mode: "hidden", - children: JSCompiler_object_inline_stack_2428.children + children: JSCompiler_object_inline_stack_2430.children }), disableLegacyMode || - (JSCompiler_object_inline_message_2426 & ConcurrentMode) !== NoMode || + (JSCompiler_object_inline_message_2428 & ConcurrentMode) !== NoMode || workInProgress.child === JSCompiler_temp - ? ((JSCompiler_object_inline_stack_2428 = createWorkInProgress( + ? ((JSCompiler_object_inline_stack_2430 = createWorkInProgress( JSCompiler_temp, componentStack )), - (JSCompiler_object_inline_stack_2428.subtreeFlags = + (JSCompiler_object_inline_stack_2430.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280)) - : ((JSCompiler_object_inline_stack_2428 = workInProgress.child), - (JSCompiler_object_inline_stack_2428.childLanes = 0), - (JSCompiler_object_inline_stack_2428.pendingProps = + : ((JSCompiler_object_inline_stack_2430 = workInProgress.child), + (JSCompiler_object_inline_stack_2430.childLanes = 0), + (JSCompiler_object_inline_stack_2430.pendingProps = componentStack), workInProgress.mode & ProfileMode && - ((JSCompiler_object_inline_stack_2428.actualDuration = -0), - (JSCompiler_object_inline_stack_2428.actualStartTime = -1.1), - (JSCompiler_object_inline_stack_2428.selfBaseDuration = + ((JSCompiler_object_inline_stack_2430.actualDuration = -0), + (JSCompiler_object_inline_stack_2430.actualStartTime = -1.1), + (JSCompiler_object_inline_stack_2430.selfBaseDuration = JSCompiler_temp.selfBaseDuration), - (JSCompiler_object_inline_stack_2428.treeBaseDuration = + (JSCompiler_object_inline_stack_2430.treeBaseDuration = JSCompiler_temp.treeBaseDuration)), (workInProgress.deletions = null)), null !== instance - ? (JSCompiler_object_inline_componentStack_2429 = + ? (JSCompiler_object_inline_componentStack_2431 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2429 + JSCompiler_object_inline_componentStack_2431 )) - : ((JSCompiler_object_inline_componentStack_2429 = + : ((JSCompiler_object_inline_componentStack_2431 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2429, - JSCompiler_object_inline_message_2426, + JSCompiler_object_inline_componentStack_2431, + JSCompiler_object_inline_message_2428, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2429.flags |= 2)), - (JSCompiler_object_inline_componentStack_2429.return = + (JSCompiler_object_inline_componentStack_2431.flags |= 2)), + (JSCompiler_object_inline_componentStack_2431.return = workInProgress), - (JSCompiler_object_inline_stack_2428.return = workInProgress), - (JSCompiler_object_inline_stack_2428.sibling = - JSCompiler_object_inline_componentStack_2429), - (workInProgress.child = JSCompiler_object_inline_stack_2428), - (JSCompiler_object_inline_stack_2428 = - JSCompiler_object_inline_componentStack_2429), - (JSCompiler_object_inline_componentStack_2429 = workInProgress.child), - (JSCompiler_object_inline_message_2426 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2426 - ? (JSCompiler_object_inline_message_2426 = + (JSCompiler_object_inline_stack_2430.return = workInProgress), + (JSCompiler_object_inline_stack_2430.sibling = + JSCompiler_object_inline_componentStack_2431), + (workInProgress.child = JSCompiler_object_inline_stack_2430), + (JSCompiler_object_inline_stack_2430 = + JSCompiler_object_inline_componentStack_2431), + (JSCompiler_object_inline_componentStack_2431 = workInProgress.child), + (JSCompiler_object_inline_message_2428 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2428 + ? (JSCompiler_object_inline_message_2428 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2426.cachePool), + JSCompiler_object_inline_message_2428.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9691,34 +9704,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2426 = { + (JSCompiler_object_inline_message_2428 = { baseLanes: - JSCompiler_object_inline_message_2426.baseLanes | renderLanes, + JSCompiler_object_inline_message_2428.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2429.memoizedState = - JSCompiler_object_inline_message_2426), + (JSCompiler_object_inline_componentStack_2431.memoizedState = + JSCompiler_object_inline_message_2428), enableTransitionTracing && - ((JSCompiler_object_inline_message_2426 = enableTransitionTracing + ((JSCompiler_object_inline_message_2428 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2426 && + null !== JSCompiler_object_inline_message_2428 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2429.updateQueue), + JSCompiler_object_inline_componentStack_2431.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2429.updateQueue = { - transitions: JSCompiler_object_inline_message_2426, + ? (JSCompiler_object_inline_componentStack_2431.updateQueue = { + transitions: JSCompiler_object_inline_message_2428, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2429.updateQueue = + ? (JSCompiler_object_inline_componentStack_2431.updateQueue = { - transitions: JSCompiler_object_inline_message_2426, + transitions: JSCompiler_object_inline_message_2428, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9726,41 +9739,41 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2426), + JSCompiler_object_inline_message_2428), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2429.childLanes = + (JSCompiler_object_inline_componentStack_2431.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2427, + JSCompiler_object_inline_digest_2429, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2428 + JSCompiler_object_inline_stack_2430 ); pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_object_inline_digest_2427 = current.child; - current = JSCompiler_object_inline_digest_2427.sibling; - JSCompiler_object_inline_digest_2427 = createWorkInProgress( - JSCompiler_object_inline_digest_2427, + JSCompiler_object_inline_digest_2429 = current.child; + current = JSCompiler_object_inline_digest_2429.sibling; + JSCompiler_object_inline_digest_2429 = createWorkInProgress( + JSCompiler_object_inline_digest_2429, { mode: "visible", - children: JSCompiler_object_inline_stack_2428.children + children: JSCompiler_object_inline_stack_2430.children } ); disableLegacyMode || (workInProgress.mode & ConcurrentMode) !== NoMode || - (JSCompiler_object_inline_digest_2427.lanes = renderLanes); - JSCompiler_object_inline_digest_2427.return = workInProgress; - JSCompiler_object_inline_digest_2427.sibling = null; + (JSCompiler_object_inline_digest_2429.lanes = renderLanes); + JSCompiler_object_inline_digest_2429.return = workInProgress; + JSCompiler_object_inline_digest_2429.sibling = null; null !== current && ((renderLanes = workInProgress.deletions), null === renderLanes ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) : renderLanes.push(current)); - workInProgress.child = JSCompiler_object_inline_digest_2427; + workInProgress.child = JSCompiler_object_inline_digest_2429; workInProgress.memoizedState = null; - return JSCompiler_object_inline_digest_2427; + return JSCompiler_object_inline_digest_2429; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { primaryChildren = createFiberFromOffscreen( @@ -11497,7 +11510,8 @@ __DEV__ && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -15570,7 +15584,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -15629,7 +15643,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); 2 !== lane || @@ -15644,194 +15658,196 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if ( - (disableLegacyMode || 0 !== root.tag) && - exitStatus === RootErrored - ) { - renderWasConcurrent = lanes; - if (root.errorRecoveryDisabledLanes & renderWasConcurrent) - var errorRetryLanes = 0; - else - (errorRetryLanes = root.pendingLanes & -536870913), - (errorRetryLanes = - 0 !== errorRetryLanes - ? errorRetryLanes - : errorRetryLanes & 536870912 - ? 536870912 - : 0); - if (0 !== errorRetryLanes) { - lanes = errorRetryLanes; - a: { - exitStatus = root; - var errorRetryLanes$jscomp$0 = errorRetryLanes; - errorRetryLanes = workInProgressRootConcurrentErrors; - var wasRootDehydrated = - exitStatus.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack( - exitStatus, - errorRetryLanes$jscomp$0 - ).flags |= 256); - errorRetryLanes$jscomp$0 = renderRootSync( + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + (enableSiblingPrerendering && checkIfRootIsPrerendering(root, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root, lanes, 0, !1); + break; + } else if (exitStatus === RootDidNotComplete) + markRootSuspended( + root, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if ( + (disableLegacyMode || 0 !== root.tag) && + exitStatus === RootErrored + ) { + renderWasConcurrent = lanes; + if (root.errorRecoveryDisabledLanes & renderWasConcurrent) + var errorRetryLanes = 0; + else + (errorRetryLanes = root.pendingLanes & -536870913), + (errorRetryLanes = + 0 !== errorRetryLanes + ? errorRetryLanes + : errorRetryLanes & 536870912 + ? 536870912 + : 0); + if (0 !== errorRetryLanes) { + lanes = errorRetryLanes; + a: { + exitStatus = root; + var errorRetryLanes$jscomp$0 = errorRetryLanes; + errorRetryLanes = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + exitStatus.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack( exitStatus, errorRetryLanes$jscomp$0 - ); - if (errorRetryLanes$jscomp$0 !== RootErrored) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - exitStatus.errorRecoveryDisabledLanes |= - renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorRetryLanes; - null !== exitStatus && queueRecoverableErrors(exitStatus); + ).flags |= 256); + errorRetryLanes$jscomp$0 = renderRootSync( + exitStatus, + errorRetryLanes$jscomp$0, + !1 + ); + if (errorRetryLanes$jscomp$0 !== RootErrored) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + exitStatus.errorRecoveryDisabledLanes |= + renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = errorRetryLanes$jscomp$0; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = errorRetryLanes; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = errorRetryLanes$jscomp$0; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - IMMEDIATE_COMMIT, - renderStartTime, - 0 - ); - else { - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || exitStatus === RootSuspended) && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - renderStartTime, - 0 - ), - exitStatus + !workInProgressRootDidSkipSuspendedSiblings ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || exitStatus === RootSuspended) && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - renderStartTime, - 0 + !workInProgressRootDidSkipSuspendedSiblings + ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + renderStartTime, + 0 + ), + exitStatus ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -15878,7 +15894,12 @@ __DEV__ && SUSPENDED_COMMIT ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended( + root, + lanes, + spawnedLane, + !didSkipSuspendedSiblings + ); return; } commitRoot( @@ -15945,18 +15966,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + didAttemptEntireTree[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -16014,11 +16037,7 @@ __DEV__ && workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = @@ -16140,7 +16159,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -16149,10 +16170,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -16174,37 +16195,46 @@ __DEV__ && enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = RootInProgress; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$38) { handleThrow(root, thrownValue$38); @@ -16215,16 +16245,13 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); enableDebugTracing && enableDebugTracing && groupEnd(); enableSchedulingProfiler && markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -16249,12 +16276,10 @@ __DEV__ && workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + ); enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); a: do @@ -27770,11 +27795,11 @@ __DEV__ && : flushSyncErrorInBuildsThatSupportLegacyMode; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-classic-3c7667a6-20240925" !== isomorphicReactPackageVersion) + if ("19.0.0-www-classic-0f1856c4-20240925" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-www-classic-3c7667a6-20240925\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-classic-0f1856c4-20240925\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27818,11 +27843,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-3c7667a6-20240925", + version: "19.0.0-www-classic-0f1856c4-20240925", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-3c7667a6-20240925" + reconcilerVersion: "19.0.0-www-classic-0f1856c4-20240925" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -28475,7 +28500,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-classic-3c7667a6-20240925"; + exports.version = "19.0.0-www-classic-0f1856c4-20240925"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index b49a8f987ebbd..773c8ce09bdc0 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -938,7 +938,8 @@ __DEV__ && : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -947,7 +948,8 @@ __DEV__ && ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -963,6 +965,14 @@ __DEV__ && ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1069,7 +1079,8 @@ __DEV__ && remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && 0 === updatedLanes && 0 !== root.tag && (root.suspendedLanes |= @@ -3773,7 +3784,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -3850,45 +3862,46 @@ __DEV__ && (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && cancelCallback(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; if ( - currentTime !== root.callbackPriority || - (null !== ReactSharedInternals.actQueue && - pingedLanes !== fakeActCallbackNode$1) - ) - cancelCallback(pingedLanes); - else return currentTime; - switch (lanesToEventPriority(suspendedLanes)) { - case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; - case ContinuousEventPriority: - suspendedLanes = UserBlockingPriority; - break; - case DefaultEventPriority: - suspendedLanes = NormalPriority$1; - break; - case IdleEventPriority: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - null !== ReactSharedInternals.actQueue - ? (ReactSharedInternals.actQueue.push(pingedLanes), - (suspendedLanes = fakeActCallbackNode$1)) - : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if ( + currentTime !== root.callbackPriority || + (null !== ReactSharedInternals.actQueue && + pingedLanes !== fakeActCallbackNode$1) + ) + cancelCallback(pingedLanes); + else return currentTime; + switch (lanesToEventPriority(suspendedLanes)) { + case DiscreteEventPriority: + case ContinuousEventPriority: + suspendedLanes = UserBlockingPriority; + break; + case DefaultEventPriority: + suspendedLanes = NormalPriority$1; + break; + case IdleEventPriority: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + null !== ReactSharedInternals.actQueue + ? (ReactSharedInternals.actQueue.push(pingedLanes), + (suspendedLanes = fakeActCallbackNode$1)) + : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && cancelCallback(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -8901,32 +8914,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2448; - var JSCompiler_object_inline_stack_2449 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2450; + var JSCompiler_object_inline_stack_2451 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2450 = !1; + var JSCompiler_object_inline_componentStack_2452 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2448 = didSuspend) || - (JSCompiler_object_inline_digest_2448 = + (JSCompiler_object_inline_digest_2450 = didSuspend) || + (JSCompiler_object_inline_digest_2450 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2448 && - ((JSCompiler_object_inline_componentStack_2450 = !0), + JSCompiler_object_inline_digest_2450 && + ((JSCompiler_object_inline_componentStack_2452 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2448 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2450 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2450 + JSCompiler_object_inline_componentStack_2452 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2447 = nextHydratableInstance; + var JSCompiler_object_inline_message_2449 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2447)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2449)) { c: { - var instance = JSCompiler_object_inline_message_2447; + var instance = JSCompiler_object_inline_message_2449; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -8967,19 +8980,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2447 + JSCompiler_object_inline_message_2449 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2447 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2449 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2447 && - ((JSCompiler_object_inline_message_2447 = - JSCompiler_object_inline_message_2447.dehydrated), - null !== JSCompiler_object_inline_message_2447) + null !== JSCompiler_object_inline_message_2449 && + ((JSCompiler_object_inline_message_2449 = + JSCompiler_object_inline_message_2449.dehydrated), + null !== JSCompiler_object_inline_message_2449) ) return ( - JSCompiler_object_inline_message_2447.data === + JSCompiler_object_inline_message_2449.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -8987,27 +9000,27 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2447 = - JSCompiler_object_inline_stack_2449.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2449.fallback; - if (JSCompiler_object_inline_componentStack_2450) + JSCompiler_object_inline_message_2449 = + JSCompiler_object_inline_stack_2451.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2451.fallback; + if (JSCompiler_object_inline_componentStack_2452) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2449 = + (JSCompiler_object_inline_stack_2451 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2447, + JSCompiler_object_inline_message_2449, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2450 = + (JSCompiler_object_inline_componentStack_2452 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2450.memoizedState = + (JSCompiler_object_inline_componentStack_2452.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2450.childLanes = + (JSCompiler_object_inline_componentStack_2452.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2448, + JSCompiler_object_inline_digest_2450, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9020,9 +9033,9 @@ __DEV__ && ? markerInstanceStack.current : null), (renderLanes = - JSCompiler_object_inline_componentStack_2450.updateQueue), + JSCompiler_object_inline_componentStack_2452.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2450.updateQueue = + ? (JSCompiler_object_inline_componentStack_2452.updateQueue = { transitions: workInProgress, markerInstances: current, @@ -9030,46 +9043,46 @@ __DEV__ && }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2449 + JSCompiler_object_inline_stack_2451 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2449.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2451.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2449 = + (JSCompiler_object_inline_stack_2451 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2447, + JSCompiler_object_inline_message_2449, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2450 = + (JSCompiler_object_inline_componentStack_2452 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2450.memoizedState = + (JSCompiler_object_inline_componentStack_2452.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2450.childLanes = + (JSCompiler_object_inline_componentStack_2452.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2448, + JSCompiler_object_inline_digest_2450, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2449 + JSCompiler_object_inline_stack_2451 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2447 + JSCompiler_object_inline_message_2449 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2447 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2447) + ((JSCompiler_object_inline_message_2449 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2449) ) { if (didSuspend) workInProgress.flags & 256 @@ -9086,94 +9099,94 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2450 = - JSCompiler_object_inline_stack_2449.fallback), - (JSCompiler_object_inline_message_2447 = workInProgress.mode), - (JSCompiler_object_inline_stack_2449 = + (JSCompiler_object_inline_componentStack_2452 = + JSCompiler_object_inline_stack_2451.fallback), + (JSCompiler_object_inline_message_2449 = workInProgress.mode), + (JSCompiler_object_inline_stack_2451 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2449.children + children: JSCompiler_object_inline_stack_2451.children }, - JSCompiler_object_inline_message_2447 + JSCompiler_object_inline_message_2449 )), - (JSCompiler_object_inline_componentStack_2450 = + (JSCompiler_object_inline_componentStack_2452 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2450, - JSCompiler_object_inline_message_2447, + JSCompiler_object_inline_componentStack_2452, + JSCompiler_object_inline_message_2449, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2450.flags |= 2), - (JSCompiler_object_inline_stack_2449.return = workInProgress), - (JSCompiler_object_inline_componentStack_2450.return = + (JSCompiler_object_inline_componentStack_2452.flags |= 2), + (JSCompiler_object_inline_stack_2451.return = workInProgress), + (JSCompiler_object_inline_componentStack_2452.return = workInProgress), - (JSCompiler_object_inline_stack_2449.sibling = - JSCompiler_object_inline_componentStack_2450), - (workInProgress.child = JSCompiler_object_inline_stack_2449), + (JSCompiler_object_inline_stack_2451.sibling = + JSCompiler_object_inline_componentStack_2452), + (workInProgress.child = JSCompiler_object_inline_stack_2451), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2449 = workInProgress.child), - (JSCompiler_object_inline_stack_2449.memoizedState = + (JSCompiler_object_inline_stack_2451 = workInProgress.child), + (JSCompiler_object_inline_stack_2451.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2449.childLanes = + (JSCompiler_object_inline_stack_2451.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2448, + JSCompiler_object_inline_digest_2450, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2450)); + JSCompiler_object_inline_componentStack_2452)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_message_2447.data === + JSCompiler_object_inline_message_2449.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2448 = - JSCompiler_object_inline_message_2447.nextSibling && - JSCompiler_object_inline_message_2447.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2448) { - JSCompiler_temp = JSCompiler_object_inline_digest_2448.dgst; - var message = JSCompiler_object_inline_digest_2448.msg; - instance = JSCompiler_object_inline_digest_2448.stck; - var componentStack = JSCompiler_object_inline_digest_2448.cstck; + JSCompiler_object_inline_digest_2450 = + JSCompiler_object_inline_message_2449.nextSibling && + JSCompiler_object_inline_message_2449.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2450) { + JSCompiler_temp = JSCompiler_object_inline_digest_2450.dgst; + var message = JSCompiler_object_inline_digest_2450.msg; + instance = JSCompiler_object_inline_digest_2450.stck; + var componentStack = JSCompiler_object_inline_digest_2450.cstck; } - JSCompiler_object_inline_message_2447 = message; - JSCompiler_object_inline_digest_2448 = JSCompiler_temp; - JSCompiler_object_inline_stack_2449 = instance; - JSCompiler_object_inline_componentStack_2450 = componentStack; - JSCompiler_object_inline_message_2447 = - JSCompiler_object_inline_message_2447 - ? Error(JSCompiler_object_inline_message_2447) + JSCompiler_object_inline_message_2449 = message; + JSCompiler_object_inline_digest_2450 = JSCompiler_temp; + JSCompiler_object_inline_stack_2451 = instance; + JSCompiler_object_inline_componentStack_2452 = componentStack; + JSCompiler_object_inline_message_2449 = + JSCompiler_object_inline_message_2449 + ? Error(JSCompiler_object_inline_message_2449) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_message_2447.stack = - JSCompiler_object_inline_stack_2449 || ""; - JSCompiler_object_inline_message_2447.digest = - JSCompiler_object_inline_digest_2448; - JSCompiler_object_inline_digest_2448 = - void 0 === JSCompiler_object_inline_componentStack_2450 + JSCompiler_object_inline_message_2449.stack = + JSCompiler_object_inline_stack_2451 || ""; + JSCompiler_object_inline_message_2449.digest = + JSCompiler_object_inline_digest_2450; + JSCompiler_object_inline_digest_2450 = + void 0 === JSCompiler_object_inline_componentStack_2452 ? null - : JSCompiler_object_inline_componentStack_2450; - "string" === typeof JSCompiler_object_inline_digest_2448 && + : JSCompiler_object_inline_componentStack_2452; + "string" === typeof JSCompiler_object_inline_digest_2450 && CapturedStacks.set( - JSCompiler_object_inline_message_2447, - JSCompiler_object_inline_digest_2448 + JSCompiler_object_inline_message_2449, + JSCompiler_object_inline_digest_2450 ); queueHydrationError({ - value: JSCompiler_object_inline_message_2447, + value: JSCompiler_object_inline_message_2449, source: null, - stack: JSCompiler_object_inline_digest_2448 + stack: JSCompiler_object_inline_digest_2450 }); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9188,25 +9201,25 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2448 = + (JSCompiler_object_inline_digest_2450 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2448) + didReceiveUpdate || JSCompiler_object_inline_digest_2450) ) { - JSCompiler_object_inline_digest_2448 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2448) { - JSCompiler_object_inline_stack_2449 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2449 & 42)) - JSCompiler_object_inline_stack_2449 = 1; + JSCompiler_object_inline_digest_2450 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2450) { + JSCompiler_object_inline_stack_2451 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2451 & 42)) + JSCompiler_object_inline_stack_2451 = 1; else - switch (JSCompiler_object_inline_stack_2449) { + switch (JSCompiler_object_inline_stack_2451) { case 2: - JSCompiler_object_inline_stack_2449 = 1; + JSCompiler_object_inline_stack_2451 = 1; break; case 8: - JSCompiler_object_inline_stack_2449 = 4; + JSCompiler_object_inline_stack_2451 = 4; break; case 32: - JSCompiler_object_inline_stack_2449 = 16; + JSCompiler_object_inline_stack_2451 = 16; break; case 128: case 256: @@ -9227,40 +9240,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2449 = 64; + JSCompiler_object_inline_stack_2451 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2449 = 134217728; + JSCompiler_object_inline_stack_2451 = 134217728; break; default: - JSCompiler_object_inline_stack_2449 = 0; + JSCompiler_object_inline_stack_2451 = 0; } - JSCompiler_object_inline_stack_2449 = + JSCompiler_object_inline_stack_2451 = 0 !== - (JSCompiler_object_inline_stack_2449 & - (JSCompiler_object_inline_digest_2448.suspendedLanes | + (JSCompiler_object_inline_stack_2451 & + (JSCompiler_object_inline_digest_2450.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2449; + : JSCompiler_object_inline_stack_2451; if ( - 0 !== JSCompiler_object_inline_stack_2449 && - JSCompiler_object_inline_stack_2449 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2451 && + JSCompiler_object_inline_stack_2451 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2449), + ((prevState.retryLane = JSCompiler_object_inline_stack_2451), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2449 + JSCompiler_object_inline_stack_2451 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2448, + JSCompiler_object_inline_digest_2450, current, - JSCompiler_object_inline_stack_2449 + JSCompiler_object_inline_stack_2451 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2447.data === + JSCompiler_object_inline_message_2449.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9268,7 +9281,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2447.data === + JSCompiler_object_inline_message_2449.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9276,12 +9289,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2447._reactRetry = + (JSCompiler_object_inline_message_2449._reactRetry = workInProgress), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2447.nextSibling + JSCompiler_object_inline_message_2449.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9299,57 +9312,57 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2449.children + JSCompiler_object_inline_stack_2451.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2450) + if (JSCompiler_object_inline_componentStack_2452) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2450 = - JSCompiler_object_inline_stack_2449.fallback), - (JSCompiler_object_inline_message_2447 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2452 = + JSCompiler_object_inline_stack_2451.fallback), + (JSCompiler_object_inline_message_2449 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2449 = createWorkInProgress( + (JSCompiler_object_inline_stack_2451 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2449.children + children: JSCompiler_object_inline_stack_2451.children } )), - (JSCompiler_object_inline_stack_2449.subtreeFlags = + (JSCompiler_object_inline_stack_2451.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2450 = + ? (JSCompiler_object_inline_componentStack_2452 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2450 + JSCompiler_object_inline_componentStack_2452 )) - : ((JSCompiler_object_inline_componentStack_2450 = + : ((JSCompiler_object_inline_componentStack_2452 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2450, - JSCompiler_object_inline_message_2447, + JSCompiler_object_inline_componentStack_2452, + JSCompiler_object_inline_message_2449, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2450.flags |= 2)), - (JSCompiler_object_inline_componentStack_2450.return = + (JSCompiler_object_inline_componentStack_2452.flags |= 2)), + (JSCompiler_object_inline_componentStack_2452.return = workInProgress), - (JSCompiler_object_inline_stack_2449.return = workInProgress), - (JSCompiler_object_inline_stack_2449.sibling = - JSCompiler_object_inline_componentStack_2450), - (workInProgress.child = JSCompiler_object_inline_stack_2449), - (JSCompiler_object_inline_stack_2449 = - JSCompiler_object_inline_componentStack_2450), - (JSCompiler_object_inline_componentStack_2450 = workInProgress.child), - (JSCompiler_object_inline_message_2447 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2447 - ? (JSCompiler_object_inline_message_2447 = + (JSCompiler_object_inline_stack_2451.return = workInProgress), + (JSCompiler_object_inline_stack_2451.sibling = + JSCompiler_object_inline_componentStack_2452), + (workInProgress.child = JSCompiler_object_inline_stack_2451), + (JSCompiler_object_inline_stack_2451 = + JSCompiler_object_inline_componentStack_2452), + (JSCompiler_object_inline_componentStack_2452 = workInProgress.child), + (JSCompiler_object_inline_message_2449 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2449 + ? (JSCompiler_object_inline_message_2449 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2447.cachePool), + JSCompiler_object_inline_message_2449.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9357,34 +9370,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2447 = { + (JSCompiler_object_inline_message_2449 = { baseLanes: - JSCompiler_object_inline_message_2447.baseLanes | renderLanes, + JSCompiler_object_inline_message_2449.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2450.memoizedState = - JSCompiler_object_inline_message_2447), + (JSCompiler_object_inline_componentStack_2452.memoizedState = + JSCompiler_object_inline_message_2449), enableTransitionTracing && - ((JSCompiler_object_inline_message_2447 = enableTransitionTracing + ((JSCompiler_object_inline_message_2449 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2447 && + null !== JSCompiler_object_inline_message_2449 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2450.updateQueue), + JSCompiler_object_inline_componentStack_2452.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2450.updateQueue = { - transitions: JSCompiler_object_inline_message_2447, + ? (JSCompiler_object_inline_componentStack_2452.updateQueue = { + transitions: JSCompiler_object_inline_message_2449, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2450.updateQueue = + ? (JSCompiler_object_inline_componentStack_2452.updateQueue = { - transitions: JSCompiler_object_inline_message_2447, + transitions: JSCompiler_object_inline_message_2449, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9392,32 +9405,32 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2447), + JSCompiler_object_inline_message_2449), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2450.childLanes = + (JSCompiler_object_inline_componentStack_2452.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2448, + JSCompiler_object_inline_digest_2450, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2449 + JSCompiler_object_inline_stack_2451 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2449.children + children: JSCompiler_object_inline_stack_2451.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2448 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2448 + ((JSCompiler_object_inline_digest_2450 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2450 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2448.push(current)); + : JSCompiler_object_inline_digest_2450.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -11084,7 +11097,8 @@ __DEV__ && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -15060,7 +15074,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -15118,7 +15132,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } @@ -15126,191 +15140,193 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (exitStatus === RootErrored) { - renderWasConcurrent = lanes; - if (root.errorRecoveryDisabledLanes & renderWasConcurrent) - var errorRetryLanes = 0; - else - (errorRetryLanes = root.pendingLanes & -536870913), - (errorRetryLanes = - 0 !== errorRetryLanes - ? errorRetryLanes - : errorRetryLanes & 536870912 - ? 536870912 - : 0); - if (0 !== errorRetryLanes) { - lanes = errorRetryLanes; - a: { - exitStatus = root; - var errorRetryLanes$jscomp$0 = errorRetryLanes; - errorRetryLanes = workInProgressRootConcurrentErrors; - var wasRootDehydrated = - exitStatus.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack( - exitStatus, - errorRetryLanes$jscomp$0 - ).flags |= 256); - errorRetryLanes$jscomp$0 = renderRootSync( + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + (enableSiblingPrerendering && checkIfRootIsPrerendering(root, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root, lanes, 0, !1); + break; + } else if (exitStatus === RootDidNotComplete) + markRootSuspended( + root, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if (exitStatus === RootErrored) { + renderWasConcurrent = lanes; + if (root.errorRecoveryDisabledLanes & renderWasConcurrent) + var errorRetryLanes = 0; + else + (errorRetryLanes = root.pendingLanes & -536870913), + (errorRetryLanes = + 0 !== errorRetryLanes + ? errorRetryLanes + : errorRetryLanes & 536870912 + ? 536870912 + : 0); + if (0 !== errorRetryLanes) { + lanes = errorRetryLanes; + a: { + exitStatus = root; + var errorRetryLanes$jscomp$0 = errorRetryLanes; + errorRetryLanes = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + exitStatus.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack( exitStatus, errorRetryLanes$jscomp$0 - ); - if (errorRetryLanes$jscomp$0 !== RootErrored) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - exitStatus.errorRecoveryDisabledLanes |= - renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorRetryLanes; - null !== exitStatus && queueRecoverableErrors(exitStatus); + ).flags |= 256); + errorRetryLanes$jscomp$0 = renderRootSync( + exitStatus, + errorRetryLanes$jscomp$0, + !1 + ); + if (errorRetryLanes$jscomp$0 !== RootErrored) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + exitStatus.errorRecoveryDisabledLanes |= + renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = errorRetryLanes$jscomp$0; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = errorRetryLanes; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = errorRetryLanes$jscomp$0; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - IMMEDIATE_COMMIT, - renderStartTime, - 0 - ); - else { - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || exitStatus === RootSuspended) && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - renderStartTime, - 0 - ), - exitStatus + !workInProgressRootDidSkipSuspendedSiblings ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || exitStatus === RootSuspended) && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - renderStartTime, - 0 + !workInProgressRootDidSkipSuspendedSiblings ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + renderStartTime, + 0 + ), + exitStatus + ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -15357,7 +15373,12 @@ __DEV__ && SUSPENDED_COMMIT ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended( + root, + lanes, + spawnedLane, + !didSkipSuspendedSiblings + ); return; } commitRoot( @@ -15424,18 +15445,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + didAttemptEntireTree[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -15479,11 +15502,7 @@ __DEV__ && workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = @@ -15605,7 +15624,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -15614,10 +15635,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -15639,37 +15660,46 @@ __DEV__ && enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = RootInProgress; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$38) { handleThrow(root, thrownValue$38); @@ -15680,16 +15710,13 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); enableDebugTracing && enableDebugTracing && groupEnd(); enableSchedulingProfiler && markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -15714,12 +15741,10 @@ __DEV__ && workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + ); enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); a: do @@ -26884,11 +26909,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-modern-3c7667a6-20240925" !== isomorphicReactPackageVersion) + if ("19.0.0-www-modern-0f1856c4-20240925" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-www-modern-3c7667a6-20240925\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-modern-0f1856c4-20240925\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -26931,11 +26956,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-3c7667a6-20240925", + version: "19.0.0-www-modern-0f1856c4-20240925", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-3c7667a6-20240925" + reconcilerVersion: "19.0.0-www-modern-0f1856c4-20240925" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -27540,7 +27565,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-modern-3c7667a6-20240925"; + exports.version = "19.0.0-www-modern-0f1856c4-20240925"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js index 4e35054219ff7..70ce295759107 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -648,7 +648,8 @@ function getNextLanes(root, wipLanes) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -657,7 +658,8 @@ function getNextLanes(root, wipLanes) { ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -673,6 +675,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -774,7 +784,8 @@ function markRootFinished( remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 === suspendedRetryLanes || + !enableSiblingPrerendering || + 0 === suspendedRetryLanes || 0 !== updatedLanes || (disableLegacyMode && 0 === root.tag) || (root.suspendedLanes |= @@ -1978,7 +1989,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$27, root$27 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$27, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$27, JSCompiler_inline_result)); root$27 = root$27.next; @@ -2053,39 +2065,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { var originalCallbackNode = root.callbackNode; @@ -7808,7 +7819,8 @@ function scheduleRetryEffect(workInProgress, retryQueue) { ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -8768,7 +8780,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$220) { + } catch (e$225) { JSCompiler_temp = null; break a; } @@ -11034,7 +11046,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -11062,7 +11074,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); 2 !== lane || @@ -11075,175 +11087,172 @@ function scheduleUpdateOnFiber(root, fiber, lane) { } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if ( - (disableLegacyMode || 0 !== root$jscomp$0.tag) && - 2 === exitStatus - ) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if ((disableLegacyMode || 0 !== root$jscomp$0.tag) && 2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - var wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, JSCompiler_inline_result).flags |= - 256); - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256); + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; + } + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -11290,7 +11299,7 @@ function commitRootWhenReady( 1 ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -11354,18 +11363,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$8 = 31 - clz32(lanes), lane = 1 << index$8; - didSkipSuspendedSiblings[index$8] = -1; + didAttemptEntireTree[index$8] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -11422,9 +11433,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -11513,7 +11522,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -11522,10 +11533,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -11534,6 +11545,7 @@ function renderRootSync(root, lanes) { (workInProgressTransitions = getTransitionsForLanes(root, lanes)), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11542,24 +11554,37 @@ function renderRootSync(root, lanes) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + exitStatus = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$206) { - handleThrow(root, thrownValue$206); + } catch (thrownValue$211) { + handleThrow(root, thrownValue$211); } while (1); lanes && root.shellSuspendCounter++; @@ -11567,11 +11592,11 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -11585,12 +11610,10 @@ function renderRootConcurrent(root, lanes) { ? ((workInProgressTransitions = getTransitionsForLanes(root, lanes)), (workInProgressRootRenderTargetTime = now() + 500), prepareFreshStack(root, lanes)) - : workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + )); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11674,8 +11697,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$208) { - handleThrow(root, thrownValue$208); + } catch (thrownValue$213) { + handleThrow(root, thrownValue$213); } while (1); resetContextDependencies(); @@ -12030,7 +12053,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$215 = rootWithPendingPassiveEffects, + var root$220 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12045,7 +12068,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$215, remainingLanes); + releaseRootPooledCache(root$220, remainingLanes); } } return !1; @@ -13364,19 +13387,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$380; + var JSCompiler_inline_result$jscomp$385; if (canUseDOM) { - var isSupported$jscomp$inline_1560 = "oninput" in document; - if (!isSupported$jscomp$inline_1560) { - var element$jscomp$inline_1561 = document.createElement("div"); - element$jscomp$inline_1561.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1560 = - "function" === typeof element$jscomp$inline_1561.oninput; + var isSupported$jscomp$inline_1567 = "oninput" in document; + if (!isSupported$jscomp$inline_1567) { + var element$jscomp$inline_1568 = document.createElement("div"); + element$jscomp$inline_1568.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1567 = + "function" === typeof element$jscomp$inline_1568.oninput; } - JSCompiler_inline_result$jscomp$380 = isSupported$jscomp$inline_1560; - } else JSCompiler_inline_result$jscomp$380 = !1; + JSCompiler_inline_result$jscomp$385 = isSupported$jscomp$inline_1567; + } else JSCompiler_inline_result$jscomp$385 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$380 && + JSCompiler_inline_result$jscomp$385 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13787,20 +13810,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1601 = 0; - i$jscomp$inline_1601 < simpleEventPluginEvents.length; - i$jscomp$inline_1601++ + var i$jscomp$inline_1608 = 0; + i$jscomp$inline_1608 < simpleEventPluginEvents.length; + i$jscomp$inline_1608++ ) { - var eventName$jscomp$inline_1602 = - simpleEventPluginEvents[i$jscomp$inline_1601], - domEventName$jscomp$inline_1603 = - eventName$jscomp$inline_1602.toLowerCase(), - capitalizedEvent$jscomp$inline_1604 = - eventName$jscomp$inline_1602[0].toUpperCase() + - eventName$jscomp$inline_1602.slice(1); + var eventName$jscomp$inline_1609 = + simpleEventPluginEvents[i$jscomp$inline_1608], + domEventName$jscomp$inline_1610 = + eventName$jscomp$inline_1609.toLowerCase(), + capitalizedEvent$jscomp$inline_1611 = + eventName$jscomp$inline_1609[0].toUpperCase() + + eventName$jscomp$inline_1609.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1603, - "on" + capitalizedEvent$jscomp$inline_1604 + domEventName$jscomp$inline_1610, + "on" + capitalizedEvent$jscomp$inline_1611 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15093,34 +15116,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$234 = props[hasSrc]; - if (null != propValue$234) + var propValue$239 = props[hasSrc]; + if (null != propValue$239) switch (hasSrc) { case "name": - hasSrcSet = propValue$234; + hasSrcSet = propValue$239; break; case "type": - propValue = propValue$234; + propValue = propValue$239; break; case "checked": - checked = propValue$234; + checked = propValue$239; break; case "defaultChecked": - defaultChecked = propValue$234; + defaultChecked = propValue$239; break; case "value": - propKey = propValue$234; + propKey = propValue$239; break; case "defaultValue": - defaultValue = propValue$234; + defaultValue = propValue$239; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$234) + if (null != propValue$239) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$234, props, null); + setProp(domElement, tag, hasSrc, propValue$239, props, null); } } initInput( @@ -15257,14 +15280,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$234 in props) - props.hasOwnProperty(propValue$234) && - ((hasSrc = props[propValue$234]), + for (propValue$239 in props) + props.hasOwnProperty(propValue$239) && + ((hasSrc = props[propValue$239]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$234, + propValue$239, hasSrc, props, void 0 @@ -15312,14 +15335,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$251 in nextProps) { - var propKey = nextProps[propKey$251]; - lastProp = lastProps[propKey$251]; + for (var propKey$256 in nextProps) { + var propKey = nextProps[propKey$256]; + lastProp = lastProps[propKey$256]; if ( - nextProps.hasOwnProperty(propKey$251) && + nextProps.hasOwnProperty(propKey$256) && (null != propKey || null != lastProp) ) - switch (propKey$251) { + switch (propKey$256) { case "type": type = propKey; break; @@ -15348,7 +15371,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$251, + propKey$256, propKey, nextProps, lastProp @@ -15367,7 +15390,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$251 = null; + propKey = value = defaultValue = propKey$256 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15398,7 +15421,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$251 = type; + propKey$256 = type; break; case "defaultValue": defaultValue = type; @@ -15419,15 +15442,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$251 - ? updateOptions(domElement, !!lastProps, propKey$251, !1) + null != propKey$256 + ? updateOptions(domElement, !!lastProps, propKey$256, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$251 = null; + propKey = propKey$256 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15451,7 +15474,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$251 = name; + propKey$256 = name; break; case "defaultValue": propKey = name; @@ -15465,17 +15488,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$251, propKey); + updateTextarea(domElement, propKey$256, propKey); return; case "option": - for (var propKey$267 in lastProps) + for (var propKey$272 in lastProps) if ( - ((propKey$251 = lastProps[propKey$267]), - lastProps.hasOwnProperty(propKey$267) && - null != propKey$251 && - !nextProps.hasOwnProperty(propKey$267)) + ((propKey$256 = lastProps[propKey$272]), + lastProps.hasOwnProperty(propKey$272) && + null != propKey$256 && + !nextProps.hasOwnProperty(propKey$272)) ) - switch (propKey$267) { + switch (propKey$272) { case "selected": domElement.selected = !1; break; @@ -15483,33 +15506,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$267, + propKey$272, null, nextProps, - propKey$251 + propKey$256 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$251 = nextProps[lastDefaultValue]), + ((propKey$256 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$251 !== propKey && - (null != propKey$251 || null != propKey)) + propKey$256 !== propKey && + (null != propKey$256 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$251 && - "function" !== typeof propKey$251 && - "symbol" !== typeof propKey$251; + propKey$256 && + "function" !== typeof propKey$256 && + "symbol" !== typeof propKey$256; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$251, + propKey$256, nextProps, propKey ); @@ -15530,24 +15553,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$272 in lastProps) - (propKey$251 = lastProps[propKey$272]), - lastProps.hasOwnProperty(propKey$272) && - null != propKey$251 && - !nextProps.hasOwnProperty(propKey$272) && - setProp(domElement, tag, propKey$272, null, nextProps, propKey$251); + for (var propKey$277 in lastProps) + (propKey$256 = lastProps[propKey$277]), + lastProps.hasOwnProperty(propKey$277) && + null != propKey$256 && + !nextProps.hasOwnProperty(propKey$277) && + setProp(domElement, tag, propKey$277, null, nextProps, propKey$256); for (checked in nextProps) if ( - ((propKey$251 = nextProps[checked]), + ((propKey$256 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$251 !== propKey && - (null != propKey$251 || null != propKey)) + propKey$256 !== propKey && + (null != propKey$256 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$251) + if (null != propKey$256) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15555,7 +15578,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$251, + propKey$256, nextProps, propKey ); @@ -15563,49 +15586,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$277 in lastProps) - (propKey$251 = lastProps[propKey$277]), - lastProps.hasOwnProperty(propKey$277) && - void 0 !== propKey$251 && - !nextProps.hasOwnProperty(propKey$277) && + for (var propKey$282 in lastProps) + (propKey$256 = lastProps[propKey$282]), + lastProps.hasOwnProperty(propKey$282) && + void 0 !== propKey$256 && + !nextProps.hasOwnProperty(propKey$282) && setPropOnCustomElement( domElement, tag, - propKey$277, + propKey$282, void 0, nextProps, - propKey$251 + propKey$256 ); for (defaultChecked in nextProps) - (propKey$251 = nextProps[defaultChecked]), + (propKey$256 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$251 === propKey || - (void 0 === propKey$251 && void 0 === propKey) || + propKey$256 === propKey || + (void 0 === propKey$256 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$251, + propKey$256, nextProps, propKey ); return; } } - for (var propKey$282 in lastProps) - (propKey$251 = lastProps[propKey$282]), - lastProps.hasOwnProperty(propKey$282) && - null != propKey$251 && - !nextProps.hasOwnProperty(propKey$282) && - setProp(domElement, tag, propKey$282, null, nextProps, propKey$251); + for (var propKey$287 in lastProps) + (propKey$256 = lastProps[propKey$287]), + lastProps.hasOwnProperty(propKey$287) && + null != propKey$256 && + !nextProps.hasOwnProperty(propKey$287) && + setProp(domElement, tag, propKey$287, null, nextProps, propKey$256); for (lastProp in nextProps) - (propKey$251 = nextProps[lastProp]), + (propKey$256 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$251 === propKey || - (null == propKey$251 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$251, nextProps, propKey); + propKey$256 === propKey || + (null == propKey$256 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$256, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16200,26 +16223,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$290 = getResourcesFromRoot( + var styles$295 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$291 = styles$290.get(type); - resource$291 || + resource$296 = styles$295.get(type); + resource$296 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$291 = { + (resource$296 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$290.set(type, resource$291), - (styles$290 = JSCompiler_inline_result.querySelector( + styles$295.set(type, resource$296), + (styles$295 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$290._p && - ((resource$291.instance = styles$290), - (resource$291.state.loading = 5)), + !styles$295._p && + ((resource$296.instance = styles$295), + (resource$296.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16232,16 +16255,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$290 || + styles$295 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$291.state + resource$296.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$291; + return resource$296; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16338,37 +16361,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$296 = hoistableRoot.querySelector( + var instance$301 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$296) + if (instance$301) return ( (resource.state.loading |= 4), - (resource.instance = instance$296), - markNodeAsHoistable(instance$296), - instance$296 + (resource.instance = instance$301), + markNodeAsHoistable(instance$301), + instance$301 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$296 = ( + instance$301 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$296); - var linkInstance = instance$296; + markNodeAsHoistable(instance$301); + var linkInstance = instance$301; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$296, "link", instance); + setInitialProperties(instance$301, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$296, props.precedence, hoistableRoot); - return (resource.instance = instance$296); + insertStylesheet(instance$301, props.precedence, hoistableRoot); + return (resource.instance = instance$301); case "script": - instance$296 = getScriptKey(props.src); + instance$301 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$296) + getScriptSelectorFromKey(instance$301) )) ) return ( @@ -16377,7 +16400,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$296))) + if ((styleProps = preloadPropsMap.get(instance$301))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17409,16 +17432,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1774 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1781 = React.version; if ( - "19.0.0-www-classic-3c7667a6-20240925" !== - isomorphicReactPackageVersion$jscomp$inline_1774 + "19.0.0-www-classic-0f1856c4-20240925" !== + isomorphicReactPackageVersion$jscomp$inline_1781 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1774, - "19.0.0-www-classic-3c7667a6-20240925" + isomorphicReactPackageVersion$jscomp$inline_1781, + "19.0.0-www-classic-0f1856c4-20240925" ) ); function flushSyncFromReconciler(fn) { @@ -17461,25 +17484,25 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2287 = { +var internals$jscomp$inline_2294 = { bundleType: 0, - version: "19.0.0-www-classic-3c7667a6-20240925", + version: "19.0.0-www-classic-0f1856c4-20240925", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-3c7667a6-20240925" + reconcilerVersion: "19.0.0-www-classic-0f1856c4-20240925" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2288 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2295 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2288.isDisabled && - hook$jscomp$inline_2288.supportsFiber + !hook$jscomp$inline_2295.isDisabled && + hook$jscomp$inline_2295.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2288.inject( - internals$jscomp$inline_2287 + (rendererID = hook$jscomp$inline_2295.inject( + internals$jscomp$inline_2294 )), - (injectedHook = hook$jscomp$inline_2288); + (injectedHook = hook$jscomp$inline_2295); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17553,11 +17576,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$317); + var instance = getPublicRootInstance(root$322); originalCallback.call(instance); }; } - var root$317 = createHydrationContainer( + var root$322 = createHydrationContainer( initialChildren, callback, container, @@ -17572,23 +17595,23 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$317; - container[internalContainerInstanceKey] = root$317.current; + container._reactRootContainer = root$322; + container[internalContainerInstanceKey] = root$322.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSyncWork$1(); - return root$317; + return root$322; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$318 = callback; + var originalCallback$323 = callback; callback = function () { - var instance = getPublicRootInstance(root$319); - originalCallback$318.call(instance); + var instance = getPublicRootInstance(root$324); + originalCallback$323.call(instance); }; } - var root$319 = createFiberRoot( + var root$324 = createFiberRoot( container, 0, !1, @@ -17602,14 +17625,14 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$319; - container[internalContainerInstanceKey] = root$319.current; + container._reactRootContainer = root$324; + container[internalContainerInstanceKey] = root$324.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); - updateContainerSync(initialChildren, root$319, parentComponent, callback); + updateContainerSync(initialChildren, root$324, parentComponent, callback); flushSyncWork$1(); - return root$319; + return root$324; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -17923,4 +17946,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-3c7667a6-20240925"; +exports.version = "19.0.0-www-classic-0f1856c4-20240925"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index f90d3bdcac126..dcc9277c93b17 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -579,7 +579,8 @@ function getNextLanes(root, wipLanes) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -588,7 +589,8 @@ function getNextLanes(root, wipLanes) { ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -604,6 +606,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -705,7 +715,8 @@ function markRootFinished( remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && 0 === updatedLanes && 0 !== root.tag && (root.suspendedLanes |= @@ -1821,7 +1832,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$27, root$27 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$27, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$27, JSCompiler_inline_result)); root$27 = root$27.next; @@ -1896,39 +1908,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { var originalCallbackNode = root.callbackNode; @@ -7395,7 +7406,8 @@ function scheduleRetryEffect(workInProgress, retryQueue) { ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -8331,7 +8343,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$211) { + } catch (e$216) { JSCompiler_temp = null; break a; } @@ -10576,7 +10588,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -10603,179 +10615,179 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if (2 === exitStatus) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - var wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, JSCompiler_inline_result).flags |= - 256); - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256); + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; + } + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -10822,7 +10834,7 @@ function commitRootWhenReady( 1 ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -10886,18 +10898,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$8 = 31 - clz32(lanes), lane = 1 << index$8; - didSkipSuspendedSiblings[index$8] = -1; + didAttemptEntireTree[index$8] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -10941,9 +10955,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -11032,7 +11044,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -11041,10 +11055,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -11053,6 +11067,7 @@ function renderRootSync(root, lanes) { (workInProgressTransitions = getTransitionsForLanes(root, lanes)), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11061,24 +11076,37 @@ function renderRootSync(root, lanes) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + exitStatus = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$197) { - handleThrow(root, thrownValue$197); + } catch (thrownValue$202) { + handleThrow(root, thrownValue$202); } while (1); lanes && root.shellSuspendCounter++; @@ -11086,11 +11114,11 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -11104,12 +11132,10 @@ function renderRootConcurrent(root, lanes) { ? ((workInProgressTransitions = getTransitionsForLanes(root, lanes)), (workInProgressRootRenderTargetTime = now() + 500), prepareFreshStack(root, lanes)) - : workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + )); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11193,8 +11219,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$199) { - handleThrow(root, thrownValue$199); + } catch (thrownValue$204) { + handleThrow(root, thrownValue$204); } while (1); resetContextDependencies(); @@ -11543,7 +11569,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$206 = rootWithPendingPassiveEffects, + var root$211 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11558,7 +11584,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$206, remainingLanes); + releaseRootPooledCache(root$211, remainingLanes); } } return !1; @@ -12783,19 +12809,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$367; + var JSCompiler_inline_result$jscomp$372; if (canUseDOM) { - var isSupported$jscomp$inline_1531 = "oninput" in document; - if (!isSupported$jscomp$inline_1531) { - var element$jscomp$inline_1532 = document.createElement("div"); - element$jscomp$inline_1532.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1531 = - "function" === typeof element$jscomp$inline_1532.oninput; + var isSupported$jscomp$inline_1538 = "oninput" in document; + if (!isSupported$jscomp$inline_1538) { + var element$jscomp$inline_1539 = document.createElement("div"); + element$jscomp$inline_1539.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1538 = + "function" === typeof element$jscomp$inline_1539.oninput; } - JSCompiler_inline_result$jscomp$367 = isSupported$jscomp$inline_1531; - } else JSCompiler_inline_result$jscomp$367 = !1; + JSCompiler_inline_result$jscomp$372 = isSupported$jscomp$inline_1538; + } else JSCompiler_inline_result$jscomp$372 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$367 && + JSCompiler_inline_result$jscomp$372 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13206,20 +13232,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1572 = 0; - i$jscomp$inline_1572 < simpleEventPluginEvents.length; - i$jscomp$inline_1572++ + var i$jscomp$inline_1579 = 0; + i$jscomp$inline_1579 < simpleEventPluginEvents.length; + i$jscomp$inline_1579++ ) { - var eventName$jscomp$inline_1573 = - simpleEventPluginEvents[i$jscomp$inline_1572], - domEventName$jscomp$inline_1574 = - eventName$jscomp$inline_1573.toLowerCase(), - capitalizedEvent$jscomp$inline_1575 = - eventName$jscomp$inline_1573[0].toUpperCase() + - eventName$jscomp$inline_1573.slice(1); + var eventName$jscomp$inline_1580 = + simpleEventPluginEvents[i$jscomp$inline_1579], + domEventName$jscomp$inline_1581 = + eventName$jscomp$inline_1580.toLowerCase(), + capitalizedEvent$jscomp$inline_1582 = + eventName$jscomp$inline_1580[0].toUpperCase() + + eventName$jscomp$inline_1580.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1574, - "on" + capitalizedEvent$jscomp$inline_1575 + domEventName$jscomp$inline_1581, + "on" + capitalizedEvent$jscomp$inline_1582 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14508,34 +14534,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$225 = props[hasSrc]; - if (null != propValue$225) + var propValue$230 = props[hasSrc]; + if (null != propValue$230) switch (hasSrc) { case "name": - hasSrcSet = propValue$225; + hasSrcSet = propValue$230; break; case "type": - propKey = propValue$225; + propKey = propValue$230; break; case "checked": - checked = propValue$225; + checked = propValue$230; break; case "defaultChecked": - defaultChecked = propValue$225; + defaultChecked = propValue$230; break; case "value": - propValue = propValue$225; + propValue = propValue$230; break; case "defaultValue": - defaultValue = propValue$225; + defaultValue = propValue$230; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$225) + if (null != propValue$230) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$225, props, null); + setProp(domElement, tag, hasSrc, propValue$230, props, null); } } initInput( @@ -14671,14 +14697,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$225 in props) - props.hasOwnProperty(propValue$225) && - ((hasSrc = props[propValue$225]), + for (propValue$230 in props) + props.hasOwnProperty(propValue$230) && + ((hasSrc = props[propValue$230]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$225, + propValue$230, hasSrc, props, void 0 @@ -14726,14 +14752,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$242 in nextProps) { - var propKey = nextProps[propKey$242]; - lastProp = lastProps[propKey$242]; + for (var propKey$247 in nextProps) { + var propKey = nextProps[propKey$247]; + lastProp = lastProps[propKey$247]; if ( - nextProps.hasOwnProperty(propKey$242) && + nextProps.hasOwnProperty(propKey$247) && (null != propKey || null != lastProp) ) - switch (propKey$242) { + switch (propKey$247) { case "type": type = propKey; break; @@ -14762,7 +14788,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$242, + propKey$247, propKey, nextProps, lastProp @@ -14781,7 +14807,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$242 = null; + propKey = value = defaultValue = propKey$247 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -14812,7 +14838,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$242 = type; + propKey$247 = type; break; case "defaultValue": defaultValue = type; @@ -14833,15 +14859,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$242 - ? updateOptions(domElement, !!lastProps, propKey$242, !1) + null != propKey$247 + ? updateOptions(domElement, !!lastProps, propKey$247, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$242 = null; + propKey = propKey$247 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -14865,7 +14891,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$242 = name; + propKey$247 = name; break; case "defaultValue": propKey = name; @@ -14879,17 +14905,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$242, propKey); + updateTextarea(domElement, propKey$247, propKey); return; case "option": - for (var propKey$258 in lastProps) + for (var propKey$263 in lastProps) if ( - ((propKey$242 = lastProps[propKey$258]), - lastProps.hasOwnProperty(propKey$258) && - null != propKey$242 && - !nextProps.hasOwnProperty(propKey$258)) + ((propKey$247 = lastProps[propKey$263]), + lastProps.hasOwnProperty(propKey$263) && + null != propKey$247 && + !nextProps.hasOwnProperty(propKey$263)) ) - switch (propKey$258) { + switch (propKey$263) { case "selected": domElement.selected = !1; break; @@ -14897,33 +14923,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$258, + propKey$263, null, nextProps, - propKey$242 + propKey$247 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$242 = nextProps[lastDefaultValue]), + ((propKey$247 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$242 !== propKey && - (null != propKey$242 || null != propKey)) + propKey$247 !== propKey && + (null != propKey$247 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$242 && - "function" !== typeof propKey$242 && - "symbol" !== typeof propKey$242; + propKey$247 && + "function" !== typeof propKey$247 && + "symbol" !== typeof propKey$247; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$242, + propKey$247, nextProps, propKey ); @@ -14944,24 +14970,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$263 in lastProps) - (propKey$242 = lastProps[propKey$263]), - lastProps.hasOwnProperty(propKey$263) && - null != propKey$242 && - !nextProps.hasOwnProperty(propKey$263) && - setProp(domElement, tag, propKey$263, null, nextProps, propKey$242); + for (var propKey$268 in lastProps) + (propKey$247 = lastProps[propKey$268]), + lastProps.hasOwnProperty(propKey$268) && + null != propKey$247 && + !nextProps.hasOwnProperty(propKey$268) && + setProp(domElement, tag, propKey$268, null, nextProps, propKey$247); for (checked in nextProps) if ( - ((propKey$242 = nextProps[checked]), + ((propKey$247 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$242 !== propKey && - (null != propKey$242 || null != propKey)) + propKey$247 !== propKey && + (null != propKey$247 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$242) + if (null != propKey$247) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -14969,7 +14995,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$242, + propKey$247, nextProps, propKey ); @@ -14977,49 +15003,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$268 in lastProps) - (propKey$242 = lastProps[propKey$268]), - lastProps.hasOwnProperty(propKey$268) && - void 0 !== propKey$242 && - !nextProps.hasOwnProperty(propKey$268) && + for (var propKey$273 in lastProps) + (propKey$247 = lastProps[propKey$273]), + lastProps.hasOwnProperty(propKey$273) && + void 0 !== propKey$247 && + !nextProps.hasOwnProperty(propKey$273) && setPropOnCustomElement( domElement, tag, - propKey$268, + propKey$273, void 0, nextProps, - propKey$242 + propKey$247 ); for (defaultChecked in nextProps) - (propKey$242 = nextProps[defaultChecked]), + (propKey$247 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$242 === propKey || - (void 0 === propKey$242 && void 0 === propKey) || + propKey$247 === propKey || + (void 0 === propKey$247 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$242, + propKey$247, nextProps, propKey ); return; } } - for (var propKey$273 in lastProps) - (propKey$242 = lastProps[propKey$273]), - lastProps.hasOwnProperty(propKey$273) && - null != propKey$242 && - !nextProps.hasOwnProperty(propKey$273) && - setProp(domElement, tag, propKey$273, null, nextProps, propKey$242); + for (var propKey$278 in lastProps) + (propKey$247 = lastProps[propKey$278]), + lastProps.hasOwnProperty(propKey$278) && + null != propKey$247 && + !nextProps.hasOwnProperty(propKey$278) && + setProp(domElement, tag, propKey$278, null, nextProps, propKey$247); for (lastProp in nextProps) - (propKey$242 = nextProps[lastProp]), + (propKey$247 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$242 === propKey || - (null == propKey$242 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$242, nextProps, propKey); + propKey$247 === propKey || + (null == propKey$247 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$247, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15597,26 +15623,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$281 = getResourcesFromRoot( + var styles$286 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$282 = styles$281.get(type); - resource$282 || + resource$287 = styles$286.get(type); + resource$287 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$282 = { + (resource$287 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$281.set(type, resource$282), - (styles$281 = JSCompiler_inline_result.querySelector( + styles$286.set(type, resource$287), + (styles$286 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$281._p && - ((resource$282.instance = styles$281), - (resource$282.state.loading = 5)), + !styles$286._p && + ((resource$287.instance = styles$286), + (resource$287.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -15629,16 +15655,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$281 || + styles$286 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$282.state + resource$287.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$282; + return resource$287; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -15735,37 +15761,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$287 = hoistableRoot.querySelector( + var instance$292 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$287) + if (instance$292) return ( (resource.state.loading |= 4), - (resource.instance = instance$287), - markNodeAsHoistable(instance$287), - instance$287 + (resource.instance = instance$292), + markNodeAsHoistable(instance$292), + instance$292 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$287 = ( + instance$292 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$287); - var linkInstance = instance$287; + markNodeAsHoistable(instance$292); + var linkInstance = instance$292; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$287, "link", instance); + setInitialProperties(instance$292, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$287, props.precedence, hoistableRoot); - return (resource.instance = instance$287); + insertStylesheet(instance$292, props.precedence, hoistableRoot); + return (resource.instance = instance$292); case "script": - instance$287 = getScriptKey(props.src); + instance$292 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$287) + getScriptSelectorFromKey(instance$292) )) ) return ( @@ -15774,7 +15800,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$287))) + if ((styleProps = preloadPropsMap.get(instance$292))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16777,16 +16803,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1745 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1752 = React.version; if ( - "19.0.0-www-modern-3c7667a6-20240925" !== - isomorphicReactPackageVersion$jscomp$inline_1745 + "19.0.0-www-modern-0f1856c4-20240925" !== + isomorphicReactPackageVersion$jscomp$inline_1752 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1745, - "19.0.0-www-modern-3c7667a6-20240925" + isomorphicReactPackageVersion$jscomp$inline_1752, + "19.0.0-www-modern-0f1856c4-20240925" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -16802,25 +16828,25 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2278 = { +var internals$jscomp$inline_2285 = { bundleType: 0, - version: "19.0.0-www-modern-3c7667a6-20240925", + version: "19.0.0-www-modern-0f1856c4-20240925", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-3c7667a6-20240925" + reconcilerVersion: "19.0.0-www-modern-0f1856c4-20240925" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2279 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2286 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2279.isDisabled && - hook$jscomp$inline_2279.supportsFiber + !hook$jscomp$inline_2286.isDisabled && + hook$jscomp$inline_2286.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2279.inject( - internals$jscomp$inline_2278 + (rendererID = hook$jscomp$inline_2286.inject( + internals$jscomp$inline_2285 )), - (injectedHook = hook$jscomp$inline_2279); + (injectedHook = hook$jscomp$inline_2286); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17171,4 +17197,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-3c7667a6-20240925"; +exports.version = "19.0.0-www-modern-0f1856c4-20240925"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index 605a4b5c9151d..f0141ccb4cc1c 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -729,7 +729,8 @@ function getNextLanes(root, wipLanes) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -738,7 +739,8 @@ function getNextLanes(root, wipLanes) { ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -754,6 +756,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -855,7 +865,8 @@ function markRootFinished( remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 === suspendedRetryLanes || + !enableSiblingPrerendering || + 0 === suspendedRetryLanes || 0 !== updatedLanes || (disableLegacyMode && 0 === root.tag) || (root.suspendedLanes |= @@ -2143,7 +2154,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$29, root$29 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$29, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$29, JSCompiler_inline_result)); root$29 = root$29.next; @@ -2218,39 +2230,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -8028,7 +8039,8 @@ function scheduleRetryEffect(workInProgress, retryQueue) { ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -9228,7 +9240,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$237) { + } catch (e$242) { JSCompiler_temp = null; break a; } @@ -11584,7 +11596,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -11613,7 +11625,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); 2 !== lane || @@ -11626,175 +11638,172 @@ function scheduleUpdateOnFiber(root, fiber, lane) { } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if ( - (disableLegacyMode || 0 !== root$jscomp$0.tag) && - 2 === exitStatus - ) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if ((disableLegacyMode || 0 !== root$jscomp$0.tag) && 2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - var wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, JSCompiler_inline_result).flags |= - 256); - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256); + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now$1()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now$1()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -11841,7 +11850,7 @@ function commitRootWhenReady( 1 ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -11905,18 +11914,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$8 = 31 - clz32(lanes), lane = 1 << index$8; - didSkipSuspendedSiblings[index$8] = -1; + didAttemptEntireTree[index$8] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -11973,9 +11984,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -12094,7 +12103,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -12103,10 +12114,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -12124,32 +12135,46 @@ function renderRootSync(root, lanes) { } enableSchedulingProfiler && markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + memoizedUpdaters = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, memoizedUpdaters, thrownValue, reason); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$221) { - handleThrow(root, thrownValue$221); + } catch (thrownValue$226) { + handleThrow(root, thrownValue$226); } while (1); lanes && root.shellSuspendCounter++; @@ -12157,12 +12182,12 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); enableSchedulingProfiler && markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -12184,12 +12209,7 @@ function renderRootConcurrent(root, lanes) { workInProgressRootRenderTargetTime = now$1() + 500; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); enableSchedulingProfiler && markRenderStarted(lanes); a: do try { @@ -12275,8 +12295,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$223) { - handleThrow(root, thrownValue$223); + } catch (thrownValue$228) { + handleThrow(root, thrownValue$228); } while (1); resetContextDependencies(); @@ -12457,18 +12477,18 @@ function completeUnitOfWork(unitOfWork) { ); return; } - var current$227 = completedWork.alternate; + var current$232 = completedWork.alternate; unitOfWork = completedWork.return; startProfilerTimer(completedWork); - current$227 = completeWork( - current$227, + current$232 = completeWork( + current$232, completedWork, entangledRenderLanes ); 0 !== (completedWork.mode & 2) && stopProfilerTimerIfRunningAndRecordIncompleteDuration(completedWork); - if (null !== current$227) { - workInProgress = current$227; + if (null !== current$232) { + workInProgress = current$232; return; } completedWork = completedWork.sibling; @@ -12694,7 +12714,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$230 = rootWithPendingPassiveEffects, + var root$235 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12709,7 +12729,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$230, remainingLanes); + releaseRootPooledCache(root$235, remainingLanes); } } return !1; @@ -13541,9 +13561,9 @@ function attemptContinuousHydration(fiber) { function getLaneLabelMap() { if (enableSchedulingProfiler) { for ( - var map = new Map(), lane = 1, index$235 = 0; - 31 > index$235; - index$235++ + var map = new Map(), lane = 1, index$240 = 0; + 31 > index$240; + index$240++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -14089,19 +14109,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$397; + var JSCompiler_inline_result$jscomp$402; if (canUseDOM) { - var isSupported$jscomp$inline_1653 = "oninput" in document; - if (!isSupported$jscomp$inline_1653) { - var element$jscomp$inline_1654 = document.createElement("div"); - element$jscomp$inline_1654.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1653 = - "function" === typeof element$jscomp$inline_1654.oninput; + var isSupported$jscomp$inline_1660 = "oninput" in document; + if (!isSupported$jscomp$inline_1660) { + var element$jscomp$inline_1661 = document.createElement("div"); + element$jscomp$inline_1661.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1660 = + "function" === typeof element$jscomp$inline_1661.oninput; } - JSCompiler_inline_result$jscomp$397 = isSupported$jscomp$inline_1653; - } else JSCompiler_inline_result$jscomp$397 = !1; + JSCompiler_inline_result$jscomp$402 = isSupported$jscomp$inline_1660; + } else JSCompiler_inline_result$jscomp$402 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$397 && + JSCompiler_inline_result$jscomp$402 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14512,20 +14532,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1694 = 0; - i$jscomp$inline_1694 < simpleEventPluginEvents.length; - i$jscomp$inline_1694++ + var i$jscomp$inline_1701 = 0; + i$jscomp$inline_1701 < simpleEventPluginEvents.length; + i$jscomp$inline_1701++ ) { - var eventName$jscomp$inline_1695 = - simpleEventPluginEvents[i$jscomp$inline_1694], - domEventName$jscomp$inline_1696 = - eventName$jscomp$inline_1695.toLowerCase(), - capitalizedEvent$jscomp$inline_1697 = - eventName$jscomp$inline_1695[0].toUpperCase() + - eventName$jscomp$inline_1695.slice(1); + var eventName$jscomp$inline_1702 = + simpleEventPluginEvents[i$jscomp$inline_1701], + domEventName$jscomp$inline_1703 = + eventName$jscomp$inline_1702.toLowerCase(), + capitalizedEvent$jscomp$inline_1704 = + eventName$jscomp$inline_1702[0].toUpperCase() + + eventName$jscomp$inline_1702.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1696, - "on" + capitalizedEvent$jscomp$inline_1697 + domEventName$jscomp$inline_1703, + "on" + capitalizedEvent$jscomp$inline_1704 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15818,34 +15838,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$251 = props[hasSrc]; - if (null != propValue$251) + var propValue$256 = props[hasSrc]; + if (null != propValue$256) switch (hasSrc) { case "name": - hasSrcSet = propValue$251; + hasSrcSet = propValue$256; break; case "type": - propValue = propValue$251; + propValue = propValue$256; break; case "checked": - checked = propValue$251; + checked = propValue$256; break; case "defaultChecked": - defaultChecked = propValue$251; + defaultChecked = propValue$256; break; case "value": - propKey = propValue$251; + propKey = propValue$256; break; case "defaultValue": - defaultValue = propValue$251; + defaultValue = propValue$256; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$251) + if (null != propValue$256) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$251, props, null); + setProp(domElement, tag, hasSrc, propValue$256, props, null); } } initInput( @@ -15982,14 +16002,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$251 in props) - props.hasOwnProperty(propValue$251) && - ((hasSrc = props[propValue$251]), + for (propValue$256 in props) + props.hasOwnProperty(propValue$256) && + ((hasSrc = props[propValue$256]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$251, + propValue$256, hasSrc, props, void 0 @@ -16037,14 +16057,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$268 in nextProps) { - var propKey = nextProps[propKey$268]; - lastProp = lastProps[propKey$268]; + for (var propKey$273 in nextProps) { + var propKey = nextProps[propKey$273]; + lastProp = lastProps[propKey$273]; if ( - nextProps.hasOwnProperty(propKey$268) && + nextProps.hasOwnProperty(propKey$273) && (null != propKey || null != lastProp) ) - switch (propKey$268) { + switch (propKey$273) { case "type": type = propKey; break; @@ -16073,7 +16093,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$268, + propKey$273, propKey, nextProps, lastProp @@ -16092,7 +16112,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$268 = null; + propKey = value = defaultValue = propKey$273 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -16123,7 +16143,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$268 = type; + propKey$273 = type; break; case "defaultValue": defaultValue = type; @@ -16144,15 +16164,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$268 - ? updateOptions(domElement, !!lastProps, propKey$268, !1) + null != propKey$273 + ? updateOptions(domElement, !!lastProps, propKey$273, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$268 = null; + propKey = propKey$273 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -16176,7 +16196,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$268 = name; + propKey$273 = name; break; case "defaultValue": propKey = name; @@ -16190,17 +16210,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$268, propKey); + updateTextarea(domElement, propKey$273, propKey); return; case "option": - for (var propKey$284 in lastProps) + for (var propKey$289 in lastProps) if ( - ((propKey$268 = lastProps[propKey$284]), - lastProps.hasOwnProperty(propKey$284) && - null != propKey$268 && - !nextProps.hasOwnProperty(propKey$284)) + ((propKey$273 = lastProps[propKey$289]), + lastProps.hasOwnProperty(propKey$289) && + null != propKey$273 && + !nextProps.hasOwnProperty(propKey$289)) ) - switch (propKey$284) { + switch (propKey$289) { case "selected": domElement.selected = !1; break; @@ -16208,33 +16228,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$284, + propKey$289, null, nextProps, - propKey$268 + propKey$273 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$268 = nextProps[lastDefaultValue]), + ((propKey$273 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$268 !== propKey && - (null != propKey$268 || null != propKey)) + propKey$273 !== propKey && + (null != propKey$273 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$268 && - "function" !== typeof propKey$268 && - "symbol" !== typeof propKey$268; + propKey$273 && + "function" !== typeof propKey$273 && + "symbol" !== typeof propKey$273; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$268, + propKey$273, nextProps, propKey ); @@ -16255,24 +16275,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$289 in lastProps) - (propKey$268 = lastProps[propKey$289]), - lastProps.hasOwnProperty(propKey$289) && - null != propKey$268 && - !nextProps.hasOwnProperty(propKey$289) && - setProp(domElement, tag, propKey$289, null, nextProps, propKey$268); + for (var propKey$294 in lastProps) + (propKey$273 = lastProps[propKey$294]), + lastProps.hasOwnProperty(propKey$294) && + null != propKey$273 && + !nextProps.hasOwnProperty(propKey$294) && + setProp(domElement, tag, propKey$294, null, nextProps, propKey$273); for (checked in nextProps) if ( - ((propKey$268 = nextProps[checked]), + ((propKey$273 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$268 !== propKey && - (null != propKey$268 || null != propKey)) + propKey$273 !== propKey && + (null != propKey$273 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$268) + if (null != propKey$273) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -16280,7 +16300,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$268, + propKey$273, nextProps, propKey ); @@ -16288,49 +16308,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$294 in lastProps) - (propKey$268 = lastProps[propKey$294]), - lastProps.hasOwnProperty(propKey$294) && - void 0 !== propKey$268 && - !nextProps.hasOwnProperty(propKey$294) && + for (var propKey$299 in lastProps) + (propKey$273 = lastProps[propKey$299]), + lastProps.hasOwnProperty(propKey$299) && + void 0 !== propKey$273 && + !nextProps.hasOwnProperty(propKey$299) && setPropOnCustomElement( domElement, tag, - propKey$294, + propKey$299, void 0, nextProps, - propKey$268 + propKey$273 ); for (defaultChecked in nextProps) - (propKey$268 = nextProps[defaultChecked]), + (propKey$273 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$268 === propKey || - (void 0 === propKey$268 && void 0 === propKey) || + propKey$273 === propKey || + (void 0 === propKey$273 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$268, + propKey$273, nextProps, propKey ); return; } } - for (var propKey$299 in lastProps) - (propKey$268 = lastProps[propKey$299]), - lastProps.hasOwnProperty(propKey$299) && - null != propKey$268 && - !nextProps.hasOwnProperty(propKey$299) && - setProp(domElement, tag, propKey$299, null, nextProps, propKey$268); + for (var propKey$304 in lastProps) + (propKey$273 = lastProps[propKey$304]), + lastProps.hasOwnProperty(propKey$304) && + null != propKey$273 && + !nextProps.hasOwnProperty(propKey$304) && + setProp(domElement, tag, propKey$304, null, nextProps, propKey$273); for (lastProp in nextProps) - (propKey$268 = nextProps[lastProp]), + (propKey$273 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$268 === propKey || - (null == propKey$268 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$268, nextProps, propKey); + propKey$273 === propKey || + (null == propKey$273 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$273, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16925,26 +16945,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$307 = getResourcesFromRoot( + var styles$312 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$308 = styles$307.get(type); - resource$308 || + resource$313 = styles$312.get(type); + resource$313 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$308 = { + (resource$313 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$307.set(type, resource$308), - (styles$307 = JSCompiler_inline_result.querySelector( + styles$312.set(type, resource$313), + (styles$312 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$307._p && - ((resource$308.instance = styles$307), - (resource$308.state.loading = 5)), + !styles$312._p && + ((resource$313.instance = styles$312), + (resource$313.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16957,16 +16977,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$307 || + styles$312 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$308.state + resource$313.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$308; + return resource$313; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -17063,37 +17083,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$313 = hoistableRoot.querySelector( + var instance$318 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$313) + if (instance$318) return ( (resource.state.loading |= 4), - (resource.instance = instance$313), - markNodeAsHoistable(instance$313), - instance$313 + (resource.instance = instance$318), + markNodeAsHoistable(instance$318), + instance$318 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$313 = ( + instance$318 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$313); - var linkInstance = instance$313; + markNodeAsHoistable(instance$318); + var linkInstance = instance$318; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$313, "link", instance); + setInitialProperties(instance$318, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$313, props.precedence, hoistableRoot); - return (resource.instance = instance$313); + insertStylesheet(instance$318, props.precedence, hoistableRoot); + return (resource.instance = instance$318); case "script": - instance$313 = getScriptKey(props.src); + instance$318 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$313) + getScriptSelectorFromKey(instance$318) )) ) return ( @@ -17102,7 +17122,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$313))) + if ((styleProps = preloadPropsMap.get(instance$318))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -18134,16 +18154,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1867 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1874 = React.version; if ( - "19.0.0-www-classic-3c7667a6-20240925" !== - isomorphicReactPackageVersion$jscomp$inline_1867 + "19.0.0-www-classic-0f1856c4-20240925" !== + isomorphicReactPackageVersion$jscomp$inline_1874 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1867, - "19.0.0-www-classic-3c7667a6-20240925" + isomorphicReactPackageVersion$jscomp$inline_1874, + "19.0.0-www-classic-0f1856c4-20240925" ) ); function flushSyncFromReconciler(fn) { @@ -18186,28 +18206,28 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_1874 = { +var internals$jscomp$inline_1881 = { bundleType: 0, - version: "19.0.0-www-classic-3c7667a6-20240925", + version: "19.0.0-www-classic-0f1856c4-20240925", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-3c7667a6-20240925" + reconcilerVersion: "19.0.0-www-classic-0f1856c4-20240925" }; enableSchedulingProfiler && - ((internals$jscomp$inline_1874.getLaneLabelMap = getLaneLabelMap), - (internals$jscomp$inline_1874.injectProfilingHooks = injectProfilingHooks)); + ((internals$jscomp$inline_1881.getLaneLabelMap = getLaneLabelMap), + (internals$jscomp$inline_1881.injectProfilingHooks = injectProfilingHooks)); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2338 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2345 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2338.isDisabled && - hook$jscomp$inline_2338.supportsFiber + !hook$jscomp$inline_2345.isDisabled && + hook$jscomp$inline_2345.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2338.inject( - internals$jscomp$inline_1874 + (rendererID = hook$jscomp$inline_2345.inject( + internals$jscomp$inline_1881 )), - (injectedHook = hook$jscomp$inline_2338); + (injectedHook = hook$jscomp$inline_2345); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -18281,11 +18301,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$334); + var instance = getPublicRootInstance(root$339); originalCallback.call(instance); }; } - var root$334 = createHydrationContainer( + var root$339 = createHydrationContainer( initialChildren, callback, container, @@ -18300,23 +18320,23 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$334; - container[internalContainerInstanceKey] = root$334.current; + container._reactRootContainer = root$339; + container[internalContainerInstanceKey] = root$339.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSyncWork$1(); - return root$334; + return root$339; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$335 = callback; + var originalCallback$340 = callback; callback = function () { - var instance = getPublicRootInstance(root$336); - originalCallback$335.call(instance); + var instance = getPublicRootInstance(root$341); + originalCallback$340.call(instance); }; } - var root$336 = createFiberRoot( + var root$341 = createFiberRoot( container, 0, !1, @@ -18330,14 +18350,14 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$336; - container[internalContainerInstanceKey] = root$336.current; + container._reactRootContainer = root$341; + container[internalContainerInstanceKey] = root$341.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); - updateContainerSync(initialChildren, root$336, parentComponent, callback); + updateContainerSync(initialChildren, root$341, parentComponent, callback); flushSyncWork$1(); - return root$336; + return root$341; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -18651,7 +18671,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-3c7667a6-20240925"; +exports.version = "19.0.0-www-classic-0f1856c4-20240925"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-profiling.modern.js b/compiled/facebook-www/ReactDOM-profiling.modern.js index 06f14ccdf8e68..dafa0e99c712d 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -660,7 +660,8 @@ function getNextLanes(root, wipLanes) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -669,7 +670,8 @@ function getNextLanes(root, wipLanes) { ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -685,6 +687,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -786,7 +796,8 @@ function markRootFinished( remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && 0 === updatedLanes && 0 !== root.tag && (root.suspendedLanes |= @@ -1986,7 +1997,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$29, root$29 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$29, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$29, JSCompiler_inline_result)); root$29 = root$29.next; @@ -2061,39 +2073,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -7598,7 +7609,8 @@ function scheduleRetryEffect(workInProgress, retryQueue) { ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -8774,7 +8786,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$228) { + } catch (e$233) { JSCompiler_temp = null; break a; } @@ -11109,7 +11121,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -11137,179 +11149,179 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if (2 === exitStatus) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - var wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, JSCompiler_inline_result).flags |= - 256); - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256); + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; + } + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now$1()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now$1()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -11356,7 +11368,7 @@ function commitRootWhenReady( 1 ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -11420,18 +11432,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$8 = 31 - clz32(lanes), lane = 1 << index$8; - didSkipSuspendedSiblings[index$8] = -1; + didAttemptEntireTree[index$8] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -11475,9 +11489,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -11596,7 +11608,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -11605,10 +11619,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -11626,32 +11640,46 @@ function renderRootSync(root, lanes) { } enableSchedulingProfiler && markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + memoizedUpdaters = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, memoizedUpdaters, thrownValue, reason); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$212) { - handleThrow(root, thrownValue$212); + } catch (thrownValue$217) { + handleThrow(root, thrownValue$217); } while (1); lanes && root.shellSuspendCounter++; @@ -11659,12 +11687,12 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); enableSchedulingProfiler && markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -11686,12 +11714,7 @@ function renderRootConcurrent(root, lanes) { workInProgressRootRenderTargetTime = now$1() + 500; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); enableSchedulingProfiler && markRenderStarted(lanes); a: do try { @@ -11777,8 +11800,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$214) { - handleThrow(root, thrownValue$214); + } catch (thrownValue$219) { + handleThrow(root, thrownValue$219); } while (1); resetContextDependencies(); @@ -11955,18 +11978,18 @@ function completeUnitOfWork(unitOfWork) { ); return; } - var current$218 = completedWork.alternate; + var current$223 = completedWork.alternate; unitOfWork = completedWork.return; startProfilerTimer(completedWork); - current$218 = completeWork( - current$218, + current$223 = completeWork( + current$223, completedWork, entangledRenderLanes ); 0 !== (completedWork.mode & 2) && stopProfilerTimerIfRunningAndRecordIncompleteDuration(completedWork); - if (null !== current$218) { - workInProgress = current$218; + if (null !== current$223) { + workInProgress = current$223; return; } completedWork = completedWork.sibling; @@ -12190,7 +12213,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$221 = rootWithPendingPassiveEffects, + var root$226 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12205,7 +12228,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$221, remainingLanes); + releaseRootPooledCache(root$226, remainingLanes); } } return !1; @@ -12915,9 +12938,9 @@ function attemptContinuousHydration(fiber) { function getLaneLabelMap() { if (enableSchedulingProfiler) { for ( - var map = new Map(), lane = 1, index$226 = 0; - 31 > index$226; - index$226++ + var map = new Map(), lane = 1, index$231 = 0; + 31 > index$231; + index$231++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -13491,19 +13514,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$384; + var JSCompiler_inline_result$jscomp$389; if (canUseDOM) { - var isSupported$jscomp$inline_1624 = "oninput" in document; - if (!isSupported$jscomp$inline_1624) { - var element$jscomp$inline_1625 = document.createElement("div"); - element$jscomp$inline_1625.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1624 = - "function" === typeof element$jscomp$inline_1625.oninput; + var isSupported$jscomp$inline_1631 = "oninput" in document; + if (!isSupported$jscomp$inline_1631) { + var element$jscomp$inline_1632 = document.createElement("div"); + element$jscomp$inline_1632.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1631 = + "function" === typeof element$jscomp$inline_1632.oninput; } - JSCompiler_inline_result$jscomp$384 = isSupported$jscomp$inline_1624; - } else JSCompiler_inline_result$jscomp$384 = !1; + JSCompiler_inline_result$jscomp$389 = isSupported$jscomp$inline_1631; + } else JSCompiler_inline_result$jscomp$389 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$384 && + JSCompiler_inline_result$jscomp$389 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13914,20 +13937,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1665 = 0; - i$jscomp$inline_1665 < simpleEventPluginEvents.length; - i$jscomp$inline_1665++ + var i$jscomp$inline_1672 = 0; + i$jscomp$inline_1672 < simpleEventPluginEvents.length; + i$jscomp$inline_1672++ ) { - var eventName$jscomp$inline_1666 = - simpleEventPluginEvents[i$jscomp$inline_1665], - domEventName$jscomp$inline_1667 = - eventName$jscomp$inline_1666.toLowerCase(), - capitalizedEvent$jscomp$inline_1668 = - eventName$jscomp$inline_1666[0].toUpperCase() + - eventName$jscomp$inline_1666.slice(1); + var eventName$jscomp$inline_1673 = + simpleEventPluginEvents[i$jscomp$inline_1672], + domEventName$jscomp$inline_1674 = + eventName$jscomp$inline_1673.toLowerCase(), + capitalizedEvent$jscomp$inline_1675 = + eventName$jscomp$inline_1673[0].toUpperCase() + + eventName$jscomp$inline_1673.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1667, - "on" + capitalizedEvent$jscomp$inline_1668 + domEventName$jscomp$inline_1674, + "on" + capitalizedEvent$jscomp$inline_1675 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15216,34 +15239,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$242 = props[hasSrc]; - if (null != propValue$242) + var propValue$247 = props[hasSrc]; + if (null != propValue$247) switch (hasSrc) { case "name": - hasSrcSet = propValue$242; + hasSrcSet = propValue$247; break; case "type": - propKey = propValue$242; + propKey = propValue$247; break; case "checked": - checked = propValue$242; + checked = propValue$247; break; case "defaultChecked": - defaultChecked = propValue$242; + defaultChecked = propValue$247; break; case "value": - propValue = propValue$242; + propValue = propValue$247; break; case "defaultValue": - defaultValue = propValue$242; + defaultValue = propValue$247; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$242) + if (null != propValue$247) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$242, props, null); + setProp(domElement, tag, hasSrc, propValue$247, props, null); } } initInput( @@ -15379,14 +15402,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$242 in props) - props.hasOwnProperty(propValue$242) && - ((hasSrc = props[propValue$242]), + for (propValue$247 in props) + props.hasOwnProperty(propValue$247) && + ((hasSrc = props[propValue$247]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$242, + propValue$247, hasSrc, props, void 0 @@ -15434,14 +15457,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$259 in nextProps) { - var propKey = nextProps[propKey$259]; - lastProp = lastProps[propKey$259]; + for (var propKey$264 in nextProps) { + var propKey = nextProps[propKey$264]; + lastProp = lastProps[propKey$264]; if ( - nextProps.hasOwnProperty(propKey$259) && + nextProps.hasOwnProperty(propKey$264) && (null != propKey || null != lastProp) ) - switch (propKey$259) { + switch (propKey$264) { case "type": type = propKey; break; @@ -15470,7 +15493,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$259, + propKey$264, propKey, nextProps, lastProp @@ -15489,7 +15512,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$259 = null; + propKey = value = defaultValue = propKey$264 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15520,7 +15543,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$259 = type; + propKey$264 = type; break; case "defaultValue": defaultValue = type; @@ -15541,15 +15564,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$259 - ? updateOptions(domElement, !!lastProps, propKey$259, !1) + null != propKey$264 + ? updateOptions(domElement, !!lastProps, propKey$264, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$259 = null; + propKey = propKey$264 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15573,7 +15596,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$259 = name; + propKey$264 = name; break; case "defaultValue": propKey = name; @@ -15587,17 +15610,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$259, propKey); + updateTextarea(domElement, propKey$264, propKey); return; case "option": - for (var propKey$275 in lastProps) + for (var propKey$280 in lastProps) if ( - ((propKey$259 = lastProps[propKey$275]), - lastProps.hasOwnProperty(propKey$275) && - null != propKey$259 && - !nextProps.hasOwnProperty(propKey$275)) + ((propKey$264 = lastProps[propKey$280]), + lastProps.hasOwnProperty(propKey$280) && + null != propKey$264 && + !nextProps.hasOwnProperty(propKey$280)) ) - switch (propKey$275) { + switch (propKey$280) { case "selected": domElement.selected = !1; break; @@ -15605,33 +15628,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$275, + propKey$280, null, nextProps, - propKey$259 + propKey$264 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$259 = nextProps[lastDefaultValue]), + ((propKey$264 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$259 !== propKey && - (null != propKey$259 || null != propKey)) + propKey$264 !== propKey && + (null != propKey$264 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$259 && - "function" !== typeof propKey$259 && - "symbol" !== typeof propKey$259; + propKey$264 && + "function" !== typeof propKey$264 && + "symbol" !== typeof propKey$264; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$259, + propKey$264, nextProps, propKey ); @@ -15652,24 +15675,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$280 in lastProps) - (propKey$259 = lastProps[propKey$280]), - lastProps.hasOwnProperty(propKey$280) && - null != propKey$259 && - !nextProps.hasOwnProperty(propKey$280) && - setProp(domElement, tag, propKey$280, null, nextProps, propKey$259); + for (var propKey$285 in lastProps) + (propKey$264 = lastProps[propKey$285]), + lastProps.hasOwnProperty(propKey$285) && + null != propKey$264 && + !nextProps.hasOwnProperty(propKey$285) && + setProp(domElement, tag, propKey$285, null, nextProps, propKey$264); for (checked in nextProps) if ( - ((propKey$259 = nextProps[checked]), + ((propKey$264 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$259 !== propKey && - (null != propKey$259 || null != propKey)) + propKey$264 !== propKey && + (null != propKey$264 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$259) + if (null != propKey$264) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15677,7 +15700,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$259, + propKey$264, nextProps, propKey ); @@ -15685,49 +15708,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$285 in lastProps) - (propKey$259 = lastProps[propKey$285]), - lastProps.hasOwnProperty(propKey$285) && - void 0 !== propKey$259 && - !nextProps.hasOwnProperty(propKey$285) && + for (var propKey$290 in lastProps) + (propKey$264 = lastProps[propKey$290]), + lastProps.hasOwnProperty(propKey$290) && + void 0 !== propKey$264 && + !nextProps.hasOwnProperty(propKey$290) && setPropOnCustomElement( domElement, tag, - propKey$285, + propKey$290, void 0, nextProps, - propKey$259 + propKey$264 ); for (defaultChecked in nextProps) - (propKey$259 = nextProps[defaultChecked]), + (propKey$264 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$259 === propKey || - (void 0 === propKey$259 && void 0 === propKey) || + propKey$264 === propKey || + (void 0 === propKey$264 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$259, + propKey$264, nextProps, propKey ); return; } } - for (var propKey$290 in lastProps) - (propKey$259 = lastProps[propKey$290]), - lastProps.hasOwnProperty(propKey$290) && - null != propKey$259 && - !nextProps.hasOwnProperty(propKey$290) && - setProp(domElement, tag, propKey$290, null, nextProps, propKey$259); + for (var propKey$295 in lastProps) + (propKey$264 = lastProps[propKey$295]), + lastProps.hasOwnProperty(propKey$295) && + null != propKey$264 && + !nextProps.hasOwnProperty(propKey$295) && + setProp(domElement, tag, propKey$295, null, nextProps, propKey$264); for (lastProp in nextProps) - (propKey$259 = nextProps[lastProp]), + (propKey$264 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$259 === propKey || - (null == propKey$259 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$259, nextProps, propKey); + propKey$264 === propKey || + (null == propKey$264 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$264, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16305,26 +16328,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$298 = getResourcesFromRoot( + var styles$303 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$299 = styles$298.get(type); - resource$299 || + resource$304 = styles$303.get(type); + resource$304 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$299 = { + (resource$304 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$298.set(type, resource$299), - (styles$298 = JSCompiler_inline_result.querySelector( + styles$303.set(type, resource$304), + (styles$303 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$298._p && - ((resource$299.instance = styles$298), - (resource$299.state.loading = 5)), + !styles$303._p && + ((resource$304.instance = styles$303), + (resource$304.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16337,16 +16360,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$298 || + styles$303 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$299.state + resource$304.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$299; + return resource$304; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16443,37 +16466,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$304 = hoistableRoot.querySelector( + var instance$309 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$304) + if (instance$309) return ( (resource.state.loading |= 4), - (resource.instance = instance$304), - markNodeAsHoistable(instance$304), - instance$304 + (resource.instance = instance$309), + markNodeAsHoistable(instance$309), + instance$309 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$304 = ( + instance$309 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$304); - var linkInstance = instance$304; + markNodeAsHoistable(instance$309); + var linkInstance = instance$309; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$304, "link", instance); + setInitialProperties(instance$309, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$304, props.precedence, hoistableRoot); - return (resource.instance = instance$304); + insertStylesheet(instance$309, props.precedence, hoistableRoot); + return (resource.instance = instance$309); case "script": - instance$304 = getScriptKey(props.src); + instance$309 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$304) + getScriptSelectorFromKey(instance$309) )) ) return ( @@ -16482,7 +16505,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$304))) + if ((styleProps = preloadPropsMap.get(instance$309))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17485,16 +17508,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1838 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1845 = React.version; if ( - "19.0.0-www-modern-3c7667a6-20240925" !== - isomorphicReactPackageVersion$jscomp$inline_1838 + "19.0.0-www-modern-0f1856c4-20240925" !== + isomorphicReactPackageVersion$jscomp$inline_1845 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1838, - "19.0.0-www-modern-3c7667a6-20240925" + isomorphicReactPackageVersion$jscomp$inline_1845, + "19.0.0-www-modern-0f1856c4-20240925" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17510,28 +17533,28 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_1840 = { +var internals$jscomp$inline_1847 = { bundleType: 0, - version: "19.0.0-www-modern-3c7667a6-20240925", + version: "19.0.0-www-modern-0f1856c4-20240925", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-3c7667a6-20240925" + reconcilerVersion: "19.0.0-www-modern-0f1856c4-20240925" }; enableSchedulingProfiler && - ((internals$jscomp$inline_1840.getLaneLabelMap = getLaneLabelMap), - (internals$jscomp$inline_1840.injectProfilingHooks = injectProfilingHooks)); + ((internals$jscomp$inline_1847.getLaneLabelMap = getLaneLabelMap), + (internals$jscomp$inline_1847.injectProfilingHooks = injectProfilingHooks)); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2330 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2337 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2330.isDisabled && - hook$jscomp$inline_2330.supportsFiber + !hook$jscomp$inline_2337.isDisabled && + hook$jscomp$inline_2337.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2330.inject( - internals$jscomp$inline_1840 + (rendererID = hook$jscomp$inline_2337.inject( + internals$jscomp$inline_1847 )), - (injectedHook = hook$jscomp$inline_2330); + (injectedHook = hook$jscomp$inline_2337); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17882,7 +17905,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-3c7667a6-20240925"; +exports.version = "19.0.0-www-modern-0f1856c4-20240925"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOMServer-dev.classic.js b/compiled/facebook-www/ReactDOMServer-dev.classic.js index 9fd3087ed7a3a..0d296dc52b7bf 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -8984,5 +8984,5 @@ __DEV__ && 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.0.0-www-classic-3c7667a6-20240925"; + exports.version = "19.0.0-www-classic-0f1856c4-20240925"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index ef4dcd90db9da..d987215eaf94a 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -8802,5 +8802,5 @@ __DEV__ && 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.0.0-www-modern-3c7667a6-20240925"; + exports.version = "19.0.0-www-modern-0f1856c4-20240925"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index af51b58c1e12a..b03fb78a59ccf 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -5911,4 +5911,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.0.0-www-classic-3c7667a6-20240925"; +exports.version = "19.0.0-www-classic-0f1856c4-20240925"; diff --git a/compiled/facebook-www/ReactDOMServer-prod.modern.js b/compiled/facebook-www/ReactDOMServer-prod.modern.js index 6d1cc4e331302..32de1aca47749 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServer-prod.modern.js @@ -5823,4 +5823,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.0.0-www-modern-3c7667a6-20240925"; +exports.version = "19.0.0-www-modern-0f1856c4-20240925"; diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index 8618544ae9f25..f93450297e9e9 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -954,7 +954,8 @@ __DEV__ && : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -963,7 +964,8 @@ __DEV__ && ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -979,6 +981,14 @@ __DEV__ && ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1085,7 +1095,8 @@ __DEV__ && remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 === suspendedRetryLanes || + !enableSiblingPrerendering || + 0 === suspendedRetryLanes || 0 !== updatedLanes || (disableLegacyMode && 0 === root.tag) || (root.suspendedLanes |= @@ -3947,7 +3958,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -4024,45 +4036,46 @@ __DEV__ && (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && cancelCallback(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; if ( - currentTime !== root.callbackPriority || - (null !== ReactSharedInternals.actQueue && - pingedLanes !== fakeActCallbackNode$1) - ) - cancelCallback(pingedLanes); - else return currentTime; - switch (lanesToEventPriority(suspendedLanes)) { - case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; - case ContinuousEventPriority: - suspendedLanes = UserBlockingPriority; - break; - case DefaultEventPriority: - suspendedLanes = NormalPriority$1; - break; - case IdleEventPriority: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - null !== ReactSharedInternals.actQueue - ? (ReactSharedInternals.actQueue.push(pingedLanes), - (suspendedLanes = fakeActCallbackNode$1)) - : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if ( + currentTime !== root.callbackPriority || + (null !== ReactSharedInternals.actQueue && + pingedLanes !== fakeActCallbackNode$1) + ) + cancelCallback(pingedLanes); + else return currentTime; + switch (lanesToEventPriority(suspendedLanes)) { + case DiscreteEventPriority: + case ContinuousEventPriority: + suspendedLanes = UserBlockingPriority; + break; + case DefaultEventPriority: + suspendedLanes = NormalPriority$1; + break; + case IdleEventPriority: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + null !== ReactSharedInternals.actQueue + ? (ReactSharedInternals.actQueue.push(pingedLanes), + (suspendedLanes = fakeActCallbackNode$1)) + : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && cancelCallback(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -9257,32 +9270,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2461; - var JSCompiler_object_inline_stack_2462 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2463; + var JSCompiler_object_inline_stack_2464 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2463 = !1; + var JSCompiler_object_inline_componentStack_2465 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2461 = didSuspend) || - (JSCompiler_object_inline_digest_2461 = + (JSCompiler_object_inline_digest_2463 = didSuspend) || + (JSCompiler_object_inline_digest_2463 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2461 && - ((JSCompiler_object_inline_componentStack_2463 = !0), + JSCompiler_object_inline_digest_2463 && + ((JSCompiler_object_inline_componentStack_2465 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2461 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2463 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2463 + JSCompiler_object_inline_componentStack_2465 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2460 = nextHydratableInstance; + var JSCompiler_object_inline_message_2462 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2460)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2462)) { c: { - var instance = JSCompiler_object_inline_message_2460; + var instance = JSCompiler_object_inline_message_2462; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9323,19 +9336,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2460 + JSCompiler_object_inline_message_2462 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2460 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2462 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2460 && - ((JSCompiler_object_inline_message_2460 = - JSCompiler_object_inline_message_2460.dehydrated), - null !== JSCompiler_object_inline_message_2460) + null !== JSCompiler_object_inline_message_2462 && + ((JSCompiler_object_inline_message_2462 = + JSCompiler_object_inline_message_2462.dehydrated), + null !== JSCompiler_object_inline_message_2462) ) return ( - JSCompiler_object_inline_message_2460.data === + JSCompiler_object_inline_message_2462.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -9343,27 +9356,27 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2460 = - JSCompiler_object_inline_stack_2462.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2462.fallback; - if (JSCompiler_object_inline_componentStack_2463) + JSCompiler_object_inline_message_2462 = + JSCompiler_object_inline_stack_2464.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2464.fallback; + if (JSCompiler_object_inline_componentStack_2465) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2462 = + (JSCompiler_object_inline_stack_2464 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2460, + JSCompiler_object_inline_message_2462, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2463 = + (JSCompiler_object_inline_componentStack_2465 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2463.memoizedState = + (JSCompiler_object_inline_componentStack_2465.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2463.childLanes = + (JSCompiler_object_inline_componentStack_2465.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2461, + JSCompiler_object_inline_digest_2463, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9376,9 +9389,9 @@ __DEV__ && ? markerInstanceStack.current : null), (current = - JSCompiler_object_inline_componentStack_2463.updateQueue), + JSCompiler_object_inline_componentStack_2465.updateQueue), null === current - ? (JSCompiler_object_inline_componentStack_2463.updateQueue = + ? (JSCompiler_object_inline_componentStack_2465.updateQueue = { transitions: workInProgress, markerInstances: renderLanes, @@ -9386,46 +9399,46 @@ __DEV__ && }) : ((current.transitions = workInProgress), (current.markerInstances = renderLanes)))), - JSCompiler_object_inline_stack_2462 + JSCompiler_object_inline_stack_2464 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2462.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2464.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2462 = + (JSCompiler_object_inline_stack_2464 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2460, + JSCompiler_object_inline_message_2462, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2463 = + (JSCompiler_object_inline_componentStack_2465 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2463.memoizedState = + (JSCompiler_object_inline_componentStack_2465.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2463.childLanes = + (JSCompiler_object_inline_componentStack_2465.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2461, + JSCompiler_object_inline_digest_2463, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2462 + JSCompiler_object_inline_stack_2464 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2460 + JSCompiler_object_inline_message_2462 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2460 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2460) + ((JSCompiler_object_inline_message_2462 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2462) ) { if (didSuspend) workInProgress.flags & 256 @@ -9442,32 +9455,32 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2463 = - JSCompiler_object_inline_stack_2462.fallback), - (JSCompiler_object_inline_message_2460 = workInProgress.mode), - (JSCompiler_object_inline_stack_2462 = createFiberFromOffscreen( + (JSCompiler_object_inline_componentStack_2465 = + JSCompiler_object_inline_stack_2464.fallback), + (JSCompiler_object_inline_message_2462 = workInProgress.mode), + (JSCompiler_object_inline_stack_2464 = createFiberFromOffscreen( { mode: "visible", - children: JSCompiler_object_inline_stack_2462.children + children: JSCompiler_object_inline_stack_2464.children }, - JSCompiler_object_inline_message_2460, + JSCompiler_object_inline_message_2462, 0, null )), - (JSCompiler_object_inline_componentStack_2463 = + (JSCompiler_object_inline_componentStack_2465 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2463, - JSCompiler_object_inline_message_2460, + JSCompiler_object_inline_componentStack_2465, + JSCompiler_object_inline_message_2462, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2463.flags |= 2), - (JSCompiler_object_inline_stack_2462.return = workInProgress), - (JSCompiler_object_inline_componentStack_2463.return = + (JSCompiler_object_inline_componentStack_2465.flags |= 2), + (JSCompiler_object_inline_stack_2464.return = workInProgress), + (JSCompiler_object_inline_componentStack_2465.return = workInProgress), - (JSCompiler_object_inline_stack_2462.sibling = - JSCompiler_object_inline_componentStack_2463), - (workInProgress.child = JSCompiler_object_inline_stack_2462), + (JSCompiler_object_inline_stack_2464.sibling = + JSCompiler_object_inline_componentStack_2465), + (workInProgress.child = JSCompiler_object_inline_stack_2464), (disableLegacyMode || (workInProgress.mode & ConcurrentMode) !== NoMode) && reconcileChildFibers( @@ -9476,63 +9489,63 @@ __DEV__ && null, renderLanes ), - (JSCompiler_object_inline_stack_2462 = workInProgress.child), - (JSCompiler_object_inline_stack_2462.memoizedState = + (JSCompiler_object_inline_stack_2464 = workInProgress.child), + (JSCompiler_object_inline_stack_2464.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2462.childLanes = + (JSCompiler_object_inline_stack_2464.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2461, + JSCompiler_object_inline_digest_2463, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2463)); + JSCompiler_object_inline_componentStack_2465)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_message_2460.data === + JSCompiler_object_inline_message_2462.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2461 = - JSCompiler_object_inline_message_2460.nextSibling && - JSCompiler_object_inline_message_2460.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2461) { - JSCompiler_temp = JSCompiler_object_inline_digest_2461.dgst; - var message = JSCompiler_object_inline_digest_2461.msg; - instance = JSCompiler_object_inline_digest_2461.stck; - var componentStack = JSCompiler_object_inline_digest_2461.cstck; + JSCompiler_object_inline_digest_2463 = + JSCompiler_object_inline_message_2462.nextSibling && + JSCompiler_object_inline_message_2462.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2463) { + JSCompiler_temp = JSCompiler_object_inline_digest_2463.dgst; + var message = JSCompiler_object_inline_digest_2463.msg; + instance = JSCompiler_object_inline_digest_2463.stck; + var componentStack = JSCompiler_object_inline_digest_2463.cstck; } - JSCompiler_object_inline_message_2460 = message; - JSCompiler_object_inline_digest_2461 = JSCompiler_temp; - JSCompiler_object_inline_stack_2462 = instance; - JSCompiler_object_inline_componentStack_2463 = componentStack; - JSCompiler_object_inline_message_2460 = - JSCompiler_object_inline_message_2460 - ? Error(JSCompiler_object_inline_message_2460) + JSCompiler_object_inline_message_2462 = message; + JSCompiler_object_inline_digest_2463 = JSCompiler_temp; + JSCompiler_object_inline_stack_2464 = instance; + JSCompiler_object_inline_componentStack_2465 = componentStack; + JSCompiler_object_inline_message_2462 = + JSCompiler_object_inline_message_2462 + ? Error(JSCompiler_object_inline_message_2462) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_message_2460.stack = - JSCompiler_object_inline_stack_2462 || ""; - JSCompiler_object_inline_message_2460.digest = - JSCompiler_object_inline_digest_2461; - JSCompiler_object_inline_digest_2461 = - void 0 === JSCompiler_object_inline_componentStack_2463 + JSCompiler_object_inline_message_2462.stack = + JSCompiler_object_inline_stack_2464 || ""; + JSCompiler_object_inline_message_2462.digest = + JSCompiler_object_inline_digest_2463; + JSCompiler_object_inline_digest_2463 = + void 0 === JSCompiler_object_inline_componentStack_2465 ? null - : JSCompiler_object_inline_componentStack_2463; - "string" === typeof JSCompiler_object_inline_digest_2461 && + : JSCompiler_object_inline_componentStack_2465; + "string" === typeof JSCompiler_object_inline_digest_2463 && CapturedStacks.set( - JSCompiler_object_inline_message_2460, - JSCompiler_object_inline_digest_2461 + JSCompiler_object_inline_message_2462, + JSCompiler_object_inline_digest_2463 ); queueHydrationError({ - value: JSCompiler_object_inline_message_2460, + value: JSCompiler_object_inline_message_2462, source: null, - stack: JSCompiler_object_inline_digest_2461 + stack: JSCompiler_object_inline_digest_2463 }); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9547,25 +9560,25 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2461 = + (JSCompiler_object_inline_digest_2463 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2461) + didReceiveUpdate || JSCompiler_object_inline_digest_2463) ) { - JSCompiler_object_inline_digest_2461 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2461) { - JSCompiler_object_inline_stack_2462 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2462 & 42)) - JSCompiler_object_inline_stack_2462 = 1; + JSCompiler_object_inline_digest_2463 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2463) { + JSCompiler_object_inline_stack_2464 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2464 & 42)) + JSCompiler_object_inline_stack_2464 = 1; else - switch (JSCompiler_object_inline_stack_2462) { + switch (JSCompiler_object_inline_stack_2464) { case 2: - JSCompiler_object_inline_stack_2462 = 1; + JSCompiler_object_inline_stack_2464 = 1; break; case 8: - JSCompiler_object_inline_stack_2462 = 4; + JSCompiler_object_inline_stack_2464 = 4; break; case 32: - JSCompiler_object_inline_stack_2462 = 16; + JSCompiler_object_inline_stack_2464 = 16; break; case 128: case 256: @@ -9586,40 +9599,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2462 = 64; + JSCompiler_object_inline_stack_2464 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2462 = 134217728; + JSCompiler_object_inline_stack_2464 = 134217728; break; default: - JSCompiler_object_inline_stack_2462 = 0; + JSCompiler_object_inline_stack_2464 = 0; } - JSCompiler_object_inline_stack_2462 = + JSCompiler_object_inline_stack_2464 = 0 !== - (JSCompiler_object_inline_stack_2462 & - (JSCompiler_object_inline_digest_2461.suspendedLanes | + (JSCompiler_object_inline_stack_2464 & + (JSCompiler_object_inline_digest_2463.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2462; + : JSCompiler_object_inline_stack_2464; if ( - 0 !== JSCompiler_object_inline_stack_2462 && - JSCompiler_object_inline_stack_2462 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2464 && + JSCompiler_object_inline_stack_2464 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2462), + ((prevState.retryLane = JSCompiler_object_inline_stack_2464), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2462 + JSCompiler_object_inline_stack_2464 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2461, + JSCompiler_object_inline_digest_2463, current, - JSCompiler_object_inline_stack_2462 + JSCompiler_object_inline_stack_2464 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2460.data === + JSCompiler_object_inline_message_2462.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9627,7 +9640,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2460.data === + JSCompiler_object_inline_message_2462.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9635,12 +9648,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2460._reactRetry = + (JSCompiler_object_inline_message_2462._reactRetry = workInProgress), (workInProgress = null)) : ((renderLanes = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2460.nextSibling + JSCompiler_object_inline_message_2462.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9658,73 +9671,73 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2462.children + JSCompiler_object_inline_stack_2464.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2463) + if (JSCompiler_object_inline_componentStack_2465) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2463 = - JSCompiler_object_inline_stack_2462.fallback), - (JSCompiler_object_inline_message_2460 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2465 = + JSCompiler_object_inline_stack_2464.fallback), + (JSCompiler_object_inline_message_2462 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), (componentStack = { mode: "hidden", - children: JSCompiler_object_inline_stack_2462.children + children: JSCompiler_object_inline_stack_2464.children }), disableLegacyMode || - (JSCompiler_object_inline_message_2460 & ConcurrentMode) !== NoMode || + (JSCompiler_object_inline_message_2462 & ConcurrentMode) !== NoMode || workInProgress.child === JSCompiler_temp - ? ((JSCompiler_object_inline_stack_2462 = createWorkInProgress( + ? ((JSCompiler_object_inline_stack_2464 = createWorkInProgress( JSCompiler_temp, componentStack )), - (JSCompiler_object_inline_stack_2462.subtreeFlags = + (JSCompiler_object_inline_stack_2464.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280)) - : ((JSCompiler_object_inline_stack_2462 = workInProgress.child), - (JSCompiler_object_inline_stack_2462.childLanes = 0), - (JSCompiler_object_inline_stack_2462.pendingProps = + : ((JSCompiler_object_inline_stack_2464 = workInProgress.child), + (JSCompiler_object_inline_stack_2464.childLanes = 0), + (JSCompiler_object_inline_stack_2464.pendingProps = componentStack), workInProgress.mode & ProfileMode && - ((JSCompiler_object_inline_stack_2462.actualDuration = -0), - (JSCompiler_object_inline_stack_2462.actualStartTime = -1.1), - (JSCompiler_object_inline_stack_2462.selfBaseDuration = + ((JSCompiler_object_inline_stack_2464.actualDuration = -0), + (JSCompiler_object_inline_stack_2464.actualStartTime = -1.1), + (JSCompiler_object_inline_stack_2464.selfBaseDuration = JSCompiler_temp.selfBaseDuration), - (JSCompiler_object_inline_stack_2462.treeBaseDuration = + (JSCompiler_object_inline_stack_2464.treeBaseDuration = JSCompiler_temp.treeBaseDuration)), (workInProgress.deletions = null)), null !== instance - ? (JSCompiler_object_inline_componentStack_2463 = + ? (JSCompiler_object_inline_componentStack_2465 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2463 + JSCompiler_object_inline_componentStack_2465 )) - : ((JSCompiler_object_inline_componentStack_2463 = + : ((JSCompiler_object_inline_componentStack_2465 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2463, - JSCompiler_object_inline_message_2460, + JSCompiler_object_inline_componentStack_2465, + JSCompiler_object_inline_message_2462, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2463.flags |= 2)), - (JSCompiler_object_inline_componentStack_2463.return = + (JSCompiler_object_inline_componentStack_2465.flags |= 2)), + (JSCompiler_object_inline_componentStack_2465.return = workInProgress), - (JSCompiler_object_inline_stack_2462.return = workInProgress), - (JSCompiler_object_inline_stack_2462.sibling = - JSCompiler_object_inline_componentStack_2463), - (workInProgress.child = JSCompiler_object_inline_stack_2462), - (JSCompiler_object_inline_stack_2462 = - JSCompiler_object_inline_componentStack_2463), - (JSCompiler_object_inline_componentStack_2463 = workInProgress.child), - (JSCompiler_object_inline_message_2460 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2460 - ? (JSCompiler_object_inline_message_2460 = + (JSCompiler_object_inline_stack_2464.return = workInProgress), + (JSCompiler_object_inline_stack_2464.sibling = + JSCompiler_object_inline_componentStack_2465), + (workInProgress.child = JSCompiler_object_inline_stack_2464), + (JSCompiler_object_inline_stack_2464 = + JSCompiler_object_inline_componentStack_2465), + (JSCompiler_object_inline_componentStack_2465 = workInProgress.child), + (JSCompiler_object_inline_message_2462 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2462 + ? (JSCompiler_object_inline_message_2462 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2460.cachePool), + JSCompiler_object_inline_message_2462.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9732,34 +9745,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2460 = { + (JSCompiler_object_inline_message_2462 = { baseLanes: - JSCompiler_object_inline_message_2460.baseLanes | renderLanes, + JSCompiler_object_inline_message_2462.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2463.memoizedState = - JSCompiler_object_inline_message_2460), + (JSCompiler_object_inline_componentStack_2465.memoizedState = + JSCompiler_object_inline_message_2462), enableTransitionTracing && - ((JSCompiler_object_inline_message_2460 = enableTransitionTracing + ((JSCompiler_object_inline_message_2462 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2460 && + null !== JSCompiler_object_inline_message_2462 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2463.updateQueue), + JSCompiler_object_inline_componentStack_2465.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2463.updateQueue = { - transitions: JSCompiler_object_inline_message_2460, + ? (JSCompiler_object_inline_componentStack_2465.updateQueue = { + transitions: JSCompiler_object_inline_message_2462, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2463.updateQueue = + ? (JSCompiler_object_inline_componentStack_2465.updateQueue = { - transitions: JSCompiler_object_inline_message_2460, + transitions: JSCompiler_object_inline_message_2462, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9767,41 +9780,41 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2460), + JSCompiler_object_inline_message_2462), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2463.childLanes = + (JSCompiler_object_inline_componentStack_2465.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2461, + JSCompiler_object_inline_digest_2463, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2462 + JSCompiler_object_inline_stack_2464 ); pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_object_inline_digest_2461 = current.child; - current = JSCompiler_object_inline_digest_2461.sibling; - JSCompiler_object_inline_digest_2461 = createWorkInProgress( - JSCompiler_object_inline_digest_2461, + JSCompiler_object_inline_digest_2463 = current.child; + current = JSCompiler_object_inline_digest_2463.sibling; + JSCompiler_object_inline_digest_2463 = createWorkInProgress( + JSCompiler_object_inline_digest_2463, { mode: "visible", - children: JSCompiler_object_inline_stack_2462.children + children: JSCompiler_object_inline_stack_2464.children } ); disableLegacyMode || (workInProgress.mode & ConcurrentMode) !== NoMode || - (JSCompiler_object_inline_digest_2461.lanes = renderLanes); - JSCompiler_object_inline_digest_2461.return = workInProgress; - JSCompiler_object_inline_digest_2461.sibling = null; + (JSCompiler_object_inline_digest_2463.lanes = renderLanes); + JSCompiler_object_inline_digest_2463.return = workInProgress; + JSCompiler_object_inline_digest_2463.sibling = null; null !== current && ((renderLanes = workInProgress.deletions), null === renderLanes ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) : renderLanes.push(current)); - workInProgress.child = JSCompiler_object_inline_digest_2461; + workInProgress.child = JSCompiler_object_inline_digest_2463; workInProgress.memoizedState = null; - return JSCompiler_object_inline_digest_2461; + return JSCompiler_object_inline_digest_2463; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { primaryChildren = createFiberFromOffscreen( @@ -11538,7 +11551,8 @@ __DEV__ && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -15793,7 +15807,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -15852,7 +15866,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); 2 !== lane || @@ -15867,194 +15881,196 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if ( - (disableLegacyMode || 0 !== root.tag) && - exitStatus === RootErrored - ) { - renderWasConcurrent = lanes; - if (root.errorRecoveryDisabledLanes & renderWasConcurrent) - var errorRetryLanes = 0; - else - (errorRetryLanes = root.pendingLanes & -536870913), - (errorRetryLanes = - 0 !== errorRetryLanes - ? errorRetryLanes - : errorRetryLanes & 536870912 - ? 536870912 - : 0); - if (0 !== errorRetryLanes) { - lanes = errorRetryLanes; - a: { - exitStatus = root; - var errorRetryLanes$jscomp$0 = errorRetryLanes; - errorRetryLanes = workInProgressRootConcurrentErrors; - var wasRootDehydrated = - exitStatus.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack( - exitStatus, - errorRetryLanes$jscomp$0 - ).flags |= 256); - errorRetryLanes$jscomp$0 = renderRootSync( + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + (enableSiblingPrerendering && checkIfRootIsPrerendering(root, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root, lanes, 0, !1); + break; + } else if (exitStatus === RootDidNotComplete) + markRootSuspended( + root, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if ( + (disableLegacyMode || 0 !== root.tag) && + exitStatus === RootErrored + ) { + renderWasConcurrent = lanes; + if (root.errorRecoveryDisabledLanes & renderWasConcurrent) + var errorRetryLanes = 0; + else + (errorRetryLanes = root.pendingLanes & -536870913), + (errorRetryLanes = + 0 !== errorRetryLanes + ? errorRetryLanes + : errorRetryLanes & 536870912 + ? 536870912 + : 0); + if (0 !== errorRetryLanes) { + lanes = errorRetryLanes; + a: { + exitStatus = root; + var errorRetryLanes$jscomp$0 = errorRetryLanes; + errorRetryLanes = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + exitStatus.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack( exitStatus, errorRetryLanes$jscomp$0 - ); - if (errorRetryLanes$jscomp$0 !== RootErrored) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - exitStatus.errorRecoveryDisabledLanes |= - renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorRetryLanes; - null !== exitStatus && queueRecoverableErrors(exitStatus); + ).flags |= 256); + errorRetryLanes$jscomp$0 = renderRootSync( + exitStatus, + errorRetryLanes$jscomp$0, + !1 + ); + if (errorRetryLanes$jscomp$0 !== RootErrored) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + exitStatus.errorRecoveryDisabledLanes |= + renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = errorRetryLanes$jscomp$0; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = errorRetryLanes; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = errorRetryLanes$jscomp$0; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - IMMEDIATE_COMMIT, - renderStartTime, - 0 - ); - else { - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || exitStatus === RootSuspended) && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - renderStartTime, - 0 - ), - exitStatus + !workInProgressRootDidSkipSuspendedSiblings ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || exitStatus === RootSuspended) && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - renderStartTime, - 0 + !workInProgressRootDidSkipSuspendedSiblings + ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + renderStartTime, + 0 + ), + exitStatus ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -16101,7 +16117,12 @@ __DEV__ && SUSPENDED_COMMIT ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended( + root, + lanes, + spawnedLane, + !didSkipSuspendedSiblings + ); return; } commitRoot( @@ -16168,18 +16189,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + didAttemptEntireTree[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -16237,11 +16260,7 @@ __DEV__ && workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = @@ -16363,7 +16382,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -16372,10 +16393,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -16397,37 +16418,46 @@ __DEV__ && enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = RootInProgress; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$38) { handleThrow(root, thrownValue$38); @@ -16438,16 +16468,13 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); enableDebugTracing && enableDebugTracing && groupEnd(); enableSchedulingProfiler && markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -16472,12 +16499,10 @@ __DEV__ && workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + ); enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); a: do @@ -28104,11 +28129,11 @@ __DEV__ && : flushSyncErrorInBuildsThatSupportLegacyMode; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-classic-3c7667a6-20240925" !== isomorphicReactPackageVersion) + if ("19.0.0-www-classic-0f1856c4-20240925" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-www-classic-3c7667a6-20240925\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-classic-0f1856c4-20240925\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -28152,11 +28177,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-3c7667a6-20240925", + version: "19.0.0-www-classic-0f1856c4-20240925", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-3c7667a6-20240925" + reconcilerVersion: "19.0.0-www-classic-0f1856c4-20240925" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -28975,5 +29000,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-classic-3c7667a6-20240925"; + exports.version = "19.0.0-www-classic-0f1856c4-20240925"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index f788235e01e6c..09749592a8f3d 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -938,7 +938,8 @@ __DEV__ && : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -947,7 +948,8 @@ __DEV__ && ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -963,6 +965,14 @@ __DEV__ && ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1069,7 +1079,8 @@ __DEV__ && remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && 0 === updatedLanes && 0 !== root.tag && (root.suspendedLanes |= @@ -3814,7 +3825,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -3891,45 +3903,46 @@ __DEV__ && (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && cancelCallback(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; if ( - currentTime !== root.callbackPriority || - (null !== ReactSharedInternals.actQueue && - pingedLanes !== fakeActCallbackNode$1) - ) - cancelCallback(pingedLanes); - else return currentTime; - switch (lanesToEventPriority(suspendedLanes)) { - case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; - case ContinuousEventPriority: - suspendedLanes = UserBlockingPriority; - break; - case DefaultEventPriority: - suspendedLanes = NormalPriority$1; - break; - case IdleEventPriority: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - null !== ReactSharedInternals.actQueue - ? (ReactSharedInternals.actQueue.push(pingedLanes), - (suspendedLanes = fakeActCallbackNode$1)) - : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if ( + currentTime !== root.callbackPriority || + (null !== ReactSharedInternals.actQueue && + pingedLanes !== fakeActCallbackNode$1) + ) + cancelCallback(pingedLanes); + else return currentTime; + switch (lanesToEventPriority(suspendedLanes)) { + case DiscreteEventPriority: + case ContinuousEventPriority: + suspendedLanes = UserBlockingPriority; + break; + case DefaultEventPriority: + suspendedLanes = NormalPriority$1; + break; + case IdleEventPriority: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + null !== ReactSharedInternals.actQueue + ? (ReactSharedInternals.actQueue.push(pingedLanes), + (suspendedLanes = fakeActCallbackNode$1)) + : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && cancelCallback(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -8942,32 +8955,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2482; - var JSCompiler_object_inline_stack_2483 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2484; + var JSCompiler_object_inline_stack_2485 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2484 = !1; + var JSCompiler_object_inline_componentStack_2486 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2482 = didSuspend) || - (JSCompiler_object_inline_digest_2482 = + (JSCompiler_object_inline_digest_2484 = didSuspend) || + (JSCompiler_object_inline_digest_2484 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2482 && - ((JSCompiler_object_inline_componentStack_2484 = !0), + JSCompiler_object_inline_digest_2484 && + ((JSCompiler_object_inline_componentStack_2486 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2482 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2484 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2484 + JSCompiler_object_inline_componentStack_2486 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2481 = nextHydratableInstance; + var JSCompiler_object_inline_message_2483 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2481)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2483)) { c: { - var instance = JSCompiler_object_inline_message_2481; + var instance = JSCompiler_object_inline_message_2483; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9008,19 +9021,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2481 + JSCompiler_object_inline_message_2483 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2481 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2483 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2481 && - ((JSCompiler_object_inline_message_2481 = - JSCompiler_object_inline_message_2481.dehydrated), - null !== JSCompiler_object_inline_message_2481) + null !== JSCompiler_object_inline_message_2483 && + ((JSCompiler_object_inline_message_2483 = + JSCompiler_object_inline_message_2483.dehydrated), + null !== JSCompiler_object_inline_message_2483) ) return ( - JSCompiler_object_inline_message_2481.data === + JSCompiler_object_inline_message_2483.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -9028,27 +9041,27 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2481 = - JSCompiler_object_inline_stack_2483.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2483.fallback; - if (JSCompiler_object_inline_componentStack_2484) + JSCompiler_object_inline_message_2483 = + JSCompiler_object_inline_stack_2485.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2485.fallback; + if (JSCompiler_object_inline_componentStack_2486) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2483 = + (JSCompiler_object_inline_stack_2485 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2481, + JSCompiler_object_inline_message_2483, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2484 = + (JSCompiler_object_inline_componentStack_2486 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2484.memoizedState = + (JSCompiler_object_inline_componentStack_2486.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2484.childLanes = + (JSCompiler_object_inline_componentStack_2486.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2482, + JSCompiler_object_inline_digest_2484, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9061,9 +9074,9 @@ __DEV__ && ? markerInstanceStack.current : null), (renderLanes = - JSCompiler_object_inline_componentStack_2484.updateQueue), + JSCompiler_object_inline_componentStack_2486.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2484.updateQueue = + ? (JSCompiler_object_inline_componentStack_2486.updateQueue = { transitions: workInProgress, markerInstances: current, @@ -9071,46 +9084,46 @@ __DEV__ && }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2483 + JSCompiler_object_inline_stack_2485 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2483.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2485.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2483 = + (JSCompiler_object_inline_stack_2485 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2481, + JSCompiler_object_inline_message_2483, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2484 = + (JSCompiler_object_inline_componentStack_2486 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2484.memoizedState = + (JSCompiler_object_inline_componentStack_2486.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2484.childLanes = + (JSCompiler_object_inline_componentStack_2486.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2482, + JSCompiler_object_inline_digest_2484, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2483 + JSCompiler_object_inline_stack_2485 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2481 + JSCompiler_object_inline_message_2483 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2481 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2481) + ((JSCompiler_object_inline_message_2483 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2483) ) { if (didSuspend) workInProgress.flags & 256 @@ -9127,94 +9140,94 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2484 = - JSCompiler_object_inline_stack_2483.fallback), - (JSCompiler_object_inline_message_2481 = workInProgress.mode), - (JSCompiler_object_inline_stack_2483 = + (JSCompiler_object_inline_componentStack_2486 = + JSCompiler_object_inline_stack_2485.fallback), + (JSCompiler_object_inline_message_2483 = workInProgress.mode), + (JSCompiler_object_inline_stack_2485 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2483.children + children: JSCompiler_object_inline_stack_2485.children }, - JSCompiler_object_inline_message_2481 + JSCompiler_object_inline_message_2483 )), - (JSCompiler_object_inline_componentStack_2484 = + (JSCompiler_object_inline_componentStack_2486 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2484, - JSCompiler_object_inline_message_2481, + JSCompiler_object_inline_componentStack_2486, + JSCompiler_object_inline_message_2483, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2484.flags |= 2), - (JSCompiler_object_inline_stack_2483.return = workInProgress), - (JSCompiler_object_inline_componentStack_2484.return = + (JSCompiler_object_inline_componentStack_2486.flags |= 2), + (JSCompiler_object_inline_stack_2485.return = workInProgress), + (JSCompiler_object_inline_componentStack_2486.return = workInProgress), - (JSCompiler_object_inline_stack_2483.sibling = - JSCompiler_object_inline_componentStack_2484), - (workInProgress.child = JSCompiler_object_inline_stack_2483), + (JSCompiler_object_inline_stack_2485.sibling = + JSCompiler_object_inline_componentStack_2486), + (workInProgress.child = JSCompiler_object_inline_stack_2485), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2483 = workInProgress.child), - (JSCompiler_object_inline_stack_2483.memoizedState = + (JSCompiler_object_inline_stack_2485 = workInProgress.child), + (JSCompiler_object_inline_stack_2485.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2483.childLanes = + (JSCompiler_object_inline_stack_2485.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2482, + JSCompiler_object_inline_digest_2484, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2484)); + JSCompiler_object_inline_componentStack_2486)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_message_2481.data === + JSCompiler_object_inline_message_2483.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2482 = - JSCompiler_object_inline_message_2481.nextSibling && - JSCompiler_object_inline_message_2481.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2482) { - JSCompiler_temp = JSCompiler_object_inline_digest_2482.dgst; - var message = JSCompiler_object_inline_digest_2482.msg; - instance = JSCompiler_object_inline_digest_2482.stck; - var componentStack = JSCompiler_object_inline_digest_2482.cstck; + JSCompiler_object_inline_digest_2484 = + JSCompiler_object_inline_message_2483.nextSibling && + JSCompiler_object_inline_message_2483.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2484) { + JSCompiler_temp = JSCompiler_object_inline_digest_2484.dgst; + var message = JSCompiler_object_inline_digest_2484.msg; + instance = JSCompiler_object_inline_digest_2484.stck; + var componentStack = JSCompiler_object_inline_digest_2484.cstck; } - JSCompiler_object_inline_message_2481 = message; - JSCompiler_object_inline_digest_2482 = JSCompiler_temp; - JSCompiler_object_inline_stack_2483 = instance; - JSCompiler_object_inline_componentStack_2484 = componentStack; - JSCompiler_object_inline_message_2481 = - JSCompiler_object_inline_message_2481 - ? Error(JSCompiler_object_inline_message_2481) + JSCompiler_object_inline_message_2483 = message; + JSCompiler_object_inline_digest_2484 = JSCompiler_temp; + JSCompiler_object_inline_stack_2485 = instance; + JSCompiler_object_inline_componentStack_2486 = componentStack; + JSCompiler_object_inline_message_2483 = + JSCompiler_object_inline_message_2483 + ? Error(JSCompiler_object_inline_message_2483) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_message_2481.stack = - JSCompiler_object_inline_stack_2483 || ""; - JSCompiler_object_inline_message_2481.digest = - JSCompiler_object_inline_digest_2482; - JSCompiler_object_inline_digest_2482 = - void 0 === JSCompiler_object_inline_componentStack_2484 + JSCompiler_object_inline_message_2483.stack = + JSCompiler_object_inline_stack_2485 || ""; + JSCompiler_object_inline_message_2483.digest = + JSCompiler_object_inline_digest_2484; + JSCompiler_object_inline_digest_2484 = + void 0 === JSCompiler_object_inline_componentStack_2486 ? null - : JSCompiler_object_inline_componentStack_2484; - "string" === typeof JSCompiler_object_inline_digest_2482 && + : JSCompiler_object_inline_componentStack_2486; + "string" === typeof JSCompiler_object_inline_digest_2484 && CapturedStacks.set( - JSCompiler_object_inline_message_2481, - JSCompiler_object_inline_digest_2482 + JSCompiler_object_inline_message_2483, + JSCompiler_object_inline_digest_2484 ); queueHydrationError({ - value: JSCompiler_object_inline_message_2481, + value: JSCompiler_object_inline_message_2483, source: null, - stack: JSCompiler_object_inline_digest_2482 + stack: JSCompiler_object_inline_digest_2484 }); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9229,25 +9242,25 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2482 = + (JSCompiler_object_inline_digest_2484 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2482) + didReceiveUpdate || JSCompiler_object_inline_digest_2484) ) { - JSCompiler_object_inline_digest_2482 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2482) { - JSCompiler_object_inline_stack_2483 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2483 & 42)) - JSCompiler_object_inline_stack_2483 = 1; + JSCompiler_object_inline_digest_2484 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2484) { + JSCompiler_object_inline_stack_2485 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2485 & 42)) + JSCompiler_object_inline_stack_2485 = 1; else - switch (JSCompiler_object_inline_stack_2483) { + switch (JSCompiler_object_inline_stack_2485) { case 2: - JSCompiler_object_inline_stack_2483 = 1; + JSCompiler_object_inline_stack_2485 = 1; break; case 8: - JSCompiler_object_inline_stack_2483 = 4; + JSCompiler_object_inline_stack_2485 = 4; break; case 32: - JSCompiler_object_inline_stack_2483 = 16; + JSCompiler_object_inline_stack_2485 = 16; break; case 128: case 256: @@ -9268,40 +9281,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2483 = 64; + JSCompiler_object_inline_stack_2485 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2483 = 134217728; + JSCompiler_object_inline_stack_2485 = 134217728; break; default: - JSCompiler_object_inline_stack_2483 = 0; + JSCompiler_object_inline_stack_2485 = 0; } - JSCompiler_object_inline_stack_2483 = + JSCompiler_object_inline_stack_2485 = 0 !== - (JSCompiler_object_inline_stack_2483 & - (JSCompiler_object_inline_digest_2482.suspendedLanes | + (JSCompiler_object_inline_stack_2485 & + (JSCompiler_object_inline_digest_2484.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2483; + : JSCompiler_object_inline_stack_2485; if ( - 0 !== JSCompiler_object_inline_stack_2483 && - JSCompiler_object_inline_stack_2483 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2485 && + JSCompiler_object_inline_stack_2485 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2483), + ((prevState.retryLane = JSCompiler_object_inline_stack_2485), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2483 + JSCompiler_object_inline_stack_2485 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2482, + JSCompiler_object_inline_digest_2484, current, - JSCompiler_object_inline_stack_2483 + JSCompiler_object_inline_stack_2485 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2481.data === + JSCompiler_object_inline_message_2483.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9309,7 +9322,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2481.data === + JSCompiler_object_inline_message_2483.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9317,12 +9330,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2481._reactRetry = + (JSCompiler_object_inline_message_2483._reactRetry = workInProgress), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2481.nextSibling + JSCompiler_object_inline_message_2483.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9340,57 +9353,57 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2483.children + JSCompiler_object_inline_stack_2485.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2484) + if (JSCompiler_object_inline_componentStack_2486) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2484 = - JSCompiler_object_inline_stack_2483.fallback), - (JSCompiler_object_inline_message_2481 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2486 = + JSCompiler_object_inline_stack_2485.fallback), + (JSCompiler_object_inline_message_2483 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2483 = createWorkInProgress( + (JSCompiler_object_inline_stack_2485 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2483.children + children: JSCompiler_object_inline_stack_2485.children } )), - (JSCompiler_object_inline_stack_2483.subtreeFlags = + (JSCompiler_object_inline_stack_2485.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2484 = + ? (JSCompiler_object_inline_componentStack_2486 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2484 + JSCompiler_object_inline_componentStack_2486 )) - : ((JSCompiler_object_inline_componentStack_2484 = + : ((JSCompiler_object_inline_componentStack_2486 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2484, - JSCompiler_object_inline_message_2481, + JSCompiler_object_inline_componentStack_2486, + JSCompiler_object_inline_message_2483, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2484.flags |= 2)), - (JSCompiler_object_inline_componentStack_2484.return = + (JSCompiler_object_inline_componentStack_2486.flags |= 2)), + (JSCompiler_object_inline_componentStack_2486.return = workInProgress), - (JSCompiler_object_inline_stack_2483.return = workInProgress), - (JSCompiler_object_inline_stack_2483.sibling = - JSCompiler_object_inline_componentStack_2484), - (workInProgress.child = JSCompiler_object_inline_stack_2483), - (JSCompiler_object_inline_stack_2483 = - JSCompiler_object_inline_componentStack_2484), - (JSCompiler_object_inline_componentStack_2484 = workInProgress.child), - (JSCompiler_object_inline_message_2481 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2481 - ? (JSCompiler_object_inline_message_2481 = + (JSCompiler_object_inline_stack_2485.return = workInProgress), + (JSCompiler_object_inline_stack_2485.sibling = + JSCompiler_object_inline_componentStack_2486), + (workInProgress.child = JSCompiler_object_inline_stack_2485), + (JSCompiler_object_inline_stack_2485 = + JSCompiler_object_inline_componentStack_2486), + (JSCompiler_object_inline_componentStack_2486 = workInProgress.child), + (JSCompiler_object_inline_message_2483 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2483 + ? (JSCompiler_object_inline_message_2483 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2481.cachePool), + JSCompiler_object_inline_message_2483.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9398,34 +9411,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2481 = { + (JSCompiler_object_inline_message_2483 = { baseLanes: - JSCompiler_object_inline_message_2481.baseLanes | renderLanes, + JSCompiler_object_inline_message_2483.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2484.memoizedState = - JSCompiler_object_inline_message_2481), + (JSCompiler_object_inline_componentStack_2486.memoizedState = + JSCompiler_object_inline_message_2483), enableTransitionTracing && - ((JSCompiler_object_inline_message_2481 = enableTransitionTracing + ((JSCompiler_object_inline_message_2483 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2481 && + null !== JSCompiler_object_inline_message_2483 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2484.updateQueue), + JSCompiler_object_inline_componentStack_2486.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2484.updateQueue = { - transitions: JSCompiler_object_inline_message_2481, + ? (JSCompiler_object_inline_componentStack_2486.updateQueue = { + transitions: JSCompiler_object_inline_message_2483, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2484.updateQueue = + ? (JSCompiler_object_inline_componentStack_2486.updateQueue = { - transitions: JSCompiler_object_inline_message_2481, + transitions: JSCompiler_object_inline_message_2483, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9433,32 +9446,32 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2481), + JSCompiler_object_inline_message_2483), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2484.childLanes = + (JSCompiler_object_inline_componentStack_2486.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2482, + JSCompiler_object_inline_digest_2484, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2483 + JSCompiler_object_inline_stack_2485 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2483.children + children: JSCompiler_object_inline_stack_2485.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2482 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2482 + ((JSCompiler_object_inline_digest_2484 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2484 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2482.push(current)); + : JSCompiler_object_inline_digest_2484.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -11125,7 +11138,8 @@ __DEV__ && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -15283,7 +15297,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -15341,7 +15355,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } @@ -15349,191 +15363,193 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (exitStatus === RootErrored) { - renderWasConcurrent = lanes; - if (root.errorRecoveryDisabledLanes & renderWasConcurrent) - var errorRetryLanes = 0; - else - (errorRetryLanes = root.pendingLanes & -536870913), - (errorRetryLanes = - 0 !== errorRetryLanes - ? errorRetryLanes - : errorRetryLanes & 536870912 - ? 536870912 - : 0); - if (0 !== errorRetryLanes) { - lanes = errorRetryLanes; - a: { - exitStatus = root; - var errorRetryLanes$jscomp$0 = errorRetryLanes; - errorRetryLanes = workInProgressRootConcurrentErrors; - var wasRootDehydrated = - exitStatus.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack( - exitStatus, - errorRetryLanes$jscomp$0 - ).flags |= 256); - errorRetryLanes$jscomp$0 = renderRootSync( + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + (enableSiblingPrerendering && checkIfRootIsPrerendering(root, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root, lanes, 0, !1); + break; + } else if (exitStatus === RootDidNotComplete) + markRootSuspended( + root, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if (exitStatus === RootErrored) { + renderWasConcurrent = lanes; + if (root.errorRecoveryDisabledLanes & renderWasConcurrent) + var errorRetryLanes = 0; + else + (errorRetryLanes = root.pendingLanes & -536870913), + (errorRetryLanes = + 0 !== errorRetryLanes + ? errorRetryLanes + : errorRetryLanes & 536870912 + ? 536870912 + : 0); + if (0 !== errorRetryLanes) { + lanes = errorRetryLanes; + a: { + exitStatus = root; + var errorRetryLanes$jscomp$0 = errorRetryLanes; + errorRetryLanes = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + exitStatus.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack( exitStatus, errorRetryLanes$jscomp$0 - ); - if (errorRetryLanes$jscomp$0 !== RootErrored) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - exitStatus.errorRecoveryDisabledLanes |= - renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorRetryLanes; - null !== exitStatus && queueRecoverableErrors(exitStatus); + ).flags |= 256); + errorRetryLanes$jscomp$0 = renderRootSync( + exitStatus, + errorRetryLanes$jscomp$0, + !1 + ); + if (errorRetryLanes$jscomp$0 !== RootErrored) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + exitStatus.errorRecoveryDisabledLanes |= + renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = errorRetryLanes$jscomp$0; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = errorRetryLanes; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = errorRetryLanes$jscomp$0; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - IMMEDIATE_COMMIT, - renderStartTime, - 0 - ); - else { - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || exitStatus === RootSuspended) && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - renderStartTime, - 0 - ), - exitStatus + !workInProgressRootDidSkipSuspendedSiblings ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || exitStatus === RootSuspended) && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - renderStartTime, - 0 + !workInProgressRootDidSkipSuspendedSiblings ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + renderStartTime, + 0 + ), + exitStatus + ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -15580,7 +15596,12 @@ __DEV__ && SUSPENDED_COMMIT ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended( + root, + lanes, + spawnedLane, + !didSkipSuspendedSiblings + ); return; } commitRoot( @@ -15647,18 +15668,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + didAttemptEntireTree[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -15702,11 +15725,7 @@ __DEV__ && workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = @@ -15828,7 +15847,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -15837,10 +15858,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -15862,37 +15883,46 @@ __DEV__ && enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = RootInProgress; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$38) { handleThrow(root, thrownValue$38); @@ -15903,16 +15933,13 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); enableDebugTracing && enableDebugTracing && groupEnd(); enableSchedulingProfiler && markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -15937,12 +15964,10 @@ __DEV__ && workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + ); enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); a: do @@ -27218,11 +27243,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-modern-3c7667a6-20240925" !== isomorphicReactPackageVersion) + if ("19.0.0-www-modern-0f1856c4-20240925" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-www-modern-3c7667a6-20240925\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-modern-0f1856c4-20240925\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27265,11 +27290,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-3c7667a6-20240925", + version: "19.0.0-www-modern-0f1856c4-20240925", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-3c7667a6-20240925" + reconcilerVersion: "19.0.0-www-modern-0f1856c4-20240925" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -28040,5 +28065,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-modern-3c7667a6-20240925"; + exports.version = "19.0.0-www-modern-0f1856c4-20240925"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index 2386b6fd7baaa..46836be05bd16 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -648,7 +648,8 @@ function getNextLanes(root, wipLanes) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -657,7 +658,8 @@ function getNextLanes(root, wipLanes) { ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -673,6 +675,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -774,7 +784,8 @@ function markRootFinished( remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 === suspendedRetryLanes || + !enableSiblingPrerendering || + 0 === suspendedRetryLanes || 0 !== updatedLanes || (disableLegacyMode && 0 === root.tag) || (root.suspendedLanes |= @@ -2064,7 +2075,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$27, root$27 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$27, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$27, JSCompiler_inline_result)); root$27 = root$27.next; @@ -2139,39 +2151,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { var originalCallbackNode = root.callbackNode; @@ -7894,7 +7905,8 @@ function scheduleRetryEffect(workInProgress, retryQueue) { ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -8854,7 +8866,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$221) { + } catch (e$226) { JSCompiler_temp = null; break a; } @@ -11005,12 +11017,12 @@ function findFiberRootForHostRoot(hostRoot) { a: { hostRoot = [hostRoot]; for (maybeFiber = 0; maybeFiber < hostRoot.length; ) { - var current$290 = hostRoot[maybeFiber++]; - if (current$290[internalContainerInstanceKey]) { - hostRoot = getInstanceFromNode(current$290); + var current$295 = hostRoot[maybeFiber++]; + if (current$295[internalContainerInstanceKey]) { + hostRoot = getInstanceFromNode(current$295); break a; } - hostRoot.push.apply(hostRoot, current$290.children); + hostRoot.push.apply(hostRoot, current$295.children); } hostRoot = null; } @@ -11306,7 +11318,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -11334,7 +11346,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); 2 !== lane || @@ -11347,175 +11359,172 @@ function scheduleUpdateOnFiber(root, fiber, lane) { } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if ( - (disableLegacyMode || 0 !== root$jscomp$0.tag) && - 2 === exitStatus - ) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if ((disableLegacyMode || 0 !== root$jscomp$0.tag) && 2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - var wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, JSCompiler_inline_result).flags |= - 256); - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256); + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; + } + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -11562,7 +11571,7 @@ function commitRootWhenReady( 1 ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -11626,18 +11635,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$8 = 31 - clz32(lanes), lane = 1 << index$8; - didSkipSuspendedSiblings[index$8] = -1; + didAttemptEntireTree[index$8] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -11694,9 +11705,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -11785,7 +11794,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -11794,10 +11805,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -11806,6 +11817,7 @@ function renderRootSync(root, lanes) { (workInProgressTransitions = getTransitionsForLanes(root, lanes)), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11814,24 +11826,37 @@ function renderRootSync(root, lanes) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + exitStatus = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$207) { - handleThrow(root, thrownValue$207); + } catch (thrownValue$212) { + handleThrow(root, thrownValue$212); } while (1); lanes && root.shellSuspendCounter++; @@ -11839,11 +11864,11 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -11857,12 +11882,10 @@ function renderRootConcurrent(root, lanes) { ? ((workInProgressTransitions = getTransitionsForLanes(root, lanes)), (workInProgressRootRenderTargetTime = now() + 500), prepareFreshStack(root, lanes)) - : workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + )); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11946,8 +11969,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$209) { - handleThrow(root, thrownValue$209); + } catch (thrownValue$214) { + handleThrow(root, thrownValue$214); } while (1); resetContextDependencies(); @@ -12302,7 +12325,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$216 = rootWithPendingPassiveEffects, + var root$221 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12317,7 +12340,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$216, remainingLanes); + releaseRootPooledCache(root$221, remainingLanes); } } return !1; @@ -13636,19 +13659,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$383; + var JSCompiler_inline_result$jscomp$388; if (canUseDOM) { - var isSupported$jscomp$inline_1590 = "oninput" in document; - if (!isSupported$jscomp$inline_1590) { - var element$jscomp$inline_1591 = document.createElement("div"); - element$jscomp$inline_1591.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1590 = - "function" === typeof element$jscomp$inline_1591.oninput; + var isSupported$jscomp$inline_1597 = "oninput" in document; + if (!isSupported$jscomp$inline_1597) { + var element$jscomp$inline_1598 = document.createElement("div"); + element$jscomp$inline_1598.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1597 = + "function" === typeof element$jscomp$inline_1598.oninput; } - JSCompiler_inline_result$jscomp$383 = isSupported$jscomp$inline_1590; - } else JSCompiler_inline_result$jscomp$383 = !1; + JSCompiler_inline_result$jscomp$388 = isSupported$jscomp$inline_1597; + } else JSCompiler_inline_result$jscomp$388 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$383 && + JSCompiler_inline_result$jscomp$388 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14059,20 +14082,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1631 = 0; - i$jscomp$inline_1631 < simpleEventPluginEvents.length; - i$jscomp$inline_1631++ + var i$jscomp$inline_1638 = 0; + i$jscomp$inline_1638 < simpleEventPluginEvents.length; + i$jscomp$inline_1638++ ) { - var eventName$jscomp$inline_1632 = - simpleEventPluginEvents[i$jscomp$inline_1631], - domEventName$jscomp$inline_1633 = - eventName$jscomp$inline_1632.toLowerCase(), - capitalizedEvent$jscomp$inline_1634 = - eventName$jscomp$inline_1632[0].toUpperCase() + - eventName$jscomp$inline_1632.slice(1); + var eventName$jscomp$inline_1639 = + simpleEventPluginEvents[i$jscomp$inline_1638], + domEventName$jscomp$inline_1640 = + eventName$jscomp$inline_1639.toLowerCase(), + capitalizedEvent$jscomp$inline_1641 = + eventName$jscomp$inline_1639[0].toUpperCase() + + eventName$jscomp$inline_1639.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1633, - "on" + capitalizedEvent$jscomp$inline_1634 + domEventName$jscomp$inline_1640, + "on" + capitalizedEvent$jscomp$inline_1641 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15365,34 +15388,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$235 = props[hasSrc]; - if (null != propValue$235) + var propValue$240 = props[hasSrc]; + if (null != propValue$240) switch (hasSrc) { case "name": - hasSrcSet = propValue$235; + hasSrcSet = propValue$240; break; case "type": - propValue = propValue$235; + propValue = propValue$240; break; case "checked": - checked = propValue$235; + checked = propValue$240; break; case "defaultChecked": - defaultChecked = propValue$235; + defaultChecked = propValue$240; break; case "value": - propKey = propValue$235; + propKey = propValue$240; break; case "defaultValue": - defaultValue = propValue$235; + defaultValue = propValue$240; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$235) + if (null != propValue$240) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$235, props, null); + setProp(domElement, tag, hasSrc, propValue$240, props, null); } } initInput( @@ -15529,14 +15552,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$235 in props) - props.hasOwnProperty(propValue$235) && - ((hasSrc = props[propValue$235]), + for (propValue$240 in props) + props.hasOwnProperty(propValue$240) && + ((hasSrc = props[propValue$240]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$235, + propValue$240, hasSrc, props, void 0 @@ -15584,14 +15607,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$252 in nextProps) { - var propKey = nextProps[propKey$252]; - lastProp = lastProps[propKey$252]; + for (var propKey$257 in nextProps) { + var propKey = nextProps[propKey$257]; + lastProp = lastProps[propKey$257]; if ( - nextProps.hasOwnProperty(propKey$252) && + nextProps.hasOwnProperty(propKey$257) && (null != propKey || null != lastProp) ) - switch (propKey$252) { + switch (propKey$257) { case "type": type = propKey; break; @@ -15620,7 +15643,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$252, + propKey$257, propKey, nextProps, lastProp @@ -15639,7 +15662,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$252 = null; + propKey = value = defaultValue = propKey$257 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15670,7 +15693,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$252 = type; + propKey$257 = type; break; case "defaultValue": defaultValue = type; @@ -15691,15 +15714,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$252 - ? updateOptions(domElement, !!lastProps, propKey$252, !1) + null != propKey$257 + ? updateOptions(domElement, !!lastProps, propKey$257, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$252 = null; + propKey = propKey$257 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15723,7 +15746,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$252 = name; + propKey$257 = name; break; case "defaultValue": propKey = name; @@ -15737,17 +15760,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$252, propKey); + updateTextarea(domElement, propKey$257, propKey); return; case "option": - for (var propKey$268 in lastProps) + for (var propKey$273 in lastProps) if ( - ((propKey$252 = lastProps[propKey$268]), - lastProps.hasOwnProperty(propKey$268) && - null != propKey$252 && - !nextProps.hasOwnProperty(propKey$268)) + ((propKey$257 = lastProps[propKey$273]), + lastProps.hasOwnProperty(propKey$273) && + null != propKey$257 && + !nextProps.hasOwnProperty(propKey$273)) ) - switch (propKey$268) { + switch (propKey$273) { case "selected": domElement.selected = !1; break; @@ -15755,33 +15778,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$268, + propKey$273, null, nextProps, - propKey$252 + propKey$257 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$252 = nextProps[lastDefaultValue]), + ((propKey$257 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$252 !== propKey && - (null != propKey$252 || null != propKey)) + propKey$257 !== propKey && + (null != propKey$257 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$252 && - "function" !== typeof propKey$252 && - "symbol" !== typeof propKey$252; + propKey$257 && + "function" !== typeof propKey$257 && + "symbol" !== typeof propKey$257; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$252, + propKey$257, nextProps, propKey ); @@ -15802,24 +15825,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$273 in lastProps) - (propKey$252 = lastProps[propKey$273]), - lastProps.hasOwnProperty(propKey$273) && - null != propKey$252 && - !nextProps.hasOwnProperty(propKey$273) && - setProp(domElement, tag, propKey$273, null, nextProps, propKey$252); + for (var propKey$278 in lastProps) + (propKey$257 = lastProps[propKey$278]), + lastProps.hasOwnProperty(propKey$278) && + null != propKey$257 && + !nextProps.hasOwnProperty(propKey$278) && + setProp(domElement, tag, propKey$278, null, nextProps, propKey$257); for (checked in nextProps) if ( - ((propKey$252 = nextProps[checked]), + ((propKey$257 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$252 !== propKey && - (null != propKey$252 || null != propKey)) + propKey$257 !== propKey && + (null != propKey$257 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$252) + if (null != propKey$257) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15827,7 +15850,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$252, + propKey$257, nextProps, propKey ); @@ -15835,49 +15858,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$278 in lastProps) - (propKey$252 = lastProps[propKey$278]), - lastProps.hasOwnProperty(propKey$278) && - void 0 !== propKey$252 && - !nextProps.hasOwnProperty(propKey$278) && + for (var propKey$283 in lastProps) + (propKey$257 = lastProps[propKey$283]), + lastProps.hasOwnProperty(propKey$283) && + void 0 !== propKey$257 && + !nextProps.hasOwnProperty(propKey$283) && setPropOnCustomElement( domElement, tag, - propKey$278, + propKey$283, void 0, nextProps, - propKey$252 + propKey$257 ); for (defaultChecked in nextProps) - (propKey$252 = nextProps[defaultChecked]), + (propKey$257 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$252 === propKey || - (void 0 === propKey$252 && void 0 === propKey) || + propKey$257 === propKey || + (void 0 === propKey$257 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$252, + propKey$257, nextProps, propKey ); return; } } - for (var propKey$283 in lastProps) - (propKey$252 = lastProps[propKey$283]), - lastProps.hasOwnProperty(propKey$283) && - null != propKey$252 && - !nextProps.hasOwnProperty(propKey$283) && - setProp(domElement, tag, propKey$283, null, nextProps, propKey$252); + for (var propKey$288 in lastProps) + (propKey$257 = lastProps[propKey$288]), + lastProps.hasOwnProperty(propKey$288) && + null != propKey$257 && + !nextProps.hasOwnProperty(propKey$288) && + setProp(domElement, tag, propKey$288, null, nextProps, propKey$257); for (lastProp in nextProps) - (propKey$252 = nextProps[lastProp]), + (propKey$257 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$252 === propKey || - (null == propKey$252 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$252, nextProps, propKey); + propKey$257 === propKey || + (null == propKey$257 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$257, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16529,26 +16552,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$292 = getResourcesFromRoot( + var styles$297 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$293 = styles$292.get(type); - resource$293 || + resource$298 = styles$297.get(type); + resource$298 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$293 = { + (resource$298 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$292.set(type, resource$293), - (styles$292 = JSCompiler_inline_result.querySelector( + styles$297.set(type, resource$298), + (styles$297 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$292._p && - ((resource$293.instance = styles$292), - (resource$293.state.loading = 5)), + !styles$297._p && + ((resource$298.instance = styles$297), + (resource$298.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16561,16 +16584,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$292 || + styles$297 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$293.state + resource$298.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$293; + return resource$298; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16667,37 +16690,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$298 = hoistableRoot.querySelector( + var instance$303 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$298) + if (instance$303) return ( (resource.state.loading |= 4), - (resource.instance = instance$298), - markNodeAsHoistable(instance$298), - instance$298 + (resource.instance = instance$303), + markNodeAsHoistable(instance$303), + instance$303 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$298 = ( + instance$303 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$298); - var linkInstance = instance$298; + markNodeAsHoistable(instance$303); + var linkInstance = instance$303; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$298, "link", instance); + setInitialProperties(instance$303, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$298, props.precedence, hoistableRoot); - return (resource.instance = instance$298); + insertStylesheet(instance$303, props.precedence, hoistableRoot); + return (resource.instance = instance$303); case "script": - instance$298 = getScriptKey(props.src); + instance$303 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$298) + getScriptSelectorFromKey(instance$303) )) ) return ( @@ -16706,7 +16729,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$298))) + if ((styleProps = preloadPropsMap.get(instance$303))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17738,16 +17761,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1804 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1811 = React.version; if ( - "19.0.0-www-classic-3c7667a6-20240925" !== - isomorphicReactPackageVersion$jscomp$inline_1804 + "19.0.0-www-classic-0f1856c4-20240925" !== + isomorphicReactPackageVersion$jscomp$inline_1811 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1804, - "19.0.0-www-classic-3c7667a6-20240925" + isomorphicReactPackageVersion$jscomp$inline_1811, + "19.0.0-www-classic-0f1856c4-20240925" ) ); function flushSyncFromReconciler(fn) { @@ -17790,25 +17813,25 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2322 = { +var internals$jscomp$inline_2329 = { bundleType: 0, - version: "19.0.0-www-classic-3c7667a6-20240925", + version: "19.0.0-www-classic-0f1856c4-20240925", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-3c7667a6-20240925" + reconcilerVersion: "19.0.0-www-classic-0f1856c4-20240925" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2323 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2330 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2323.isDisabled && - hook$jscomp$inline_2323.supportsFiber + !hook$jscomp$inline_2330.isDisabled && + hook$jscomp$inline_2330.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2323.inject( - internals$jscomp$inline_2322 + (rendererID = hook$jscomp$inline_2330.inject( + internals$jscomp$inline_2329 )), - (injectedHook = hook$jscomp$inline_2323); + (injectedHook = hook$jscomp$inline_2330); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17882,11 +17905,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$319); + var instance = getPublicRootInstance(root$324); originalCallback.call(instance); }; } - var root$319 = createHydrationContainer( + var root$324 = createHydrationContainer( initialChildren, callback, container, @@ -17901,23 +17924,23 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$319; - container[internalContainerInstanceKey] = root$319.current; + container._reactRootContainer = root$324; + container[internalContainerInstanceKey] = root$324.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSyncWork$1(); - return root$319; + return root$324; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$320 = callback; + var originalCallback$325 = callback; callback = function () { - var instance = getPublicRootInstance(root$321); - originalCallback$320.call(instance); + var instance = getPublicRootInstance(root$326); + originalCallback$325.call(instance); }; } - var root$321 = createFiberRoot( + var root$326 = createFiberRoot( container, 0, !1, @@ -17931,14 +17954,14 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$321; - container[internalContainerInstanceKey] = root$321.current; + container._reactRootContainer = root$326; + container[internalContainerInstanceKey] = root$326.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); - updateContainerSync(initialChildren, root$321, parentComponent, callback); + updateContainerSync(initialChildren, root$326, parentComponent, callback); flushSyncWork$1(); - return root$321; + return root$326; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -18403,4 +18426,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-3c7667a6-20240925"; +exports.version = "19.0.0-www-classic-0f1856c4-20240925"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index 6d4b95d8046bd..e659e9537b732 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -579,7 +579,8 @@ function getNextLanes(root, wipLanes) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -588,7 +589,8 @@ function getNextLanes(root, wipLanes) { ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -604,6 +606,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -705,7 +715,8 @@ function markRootFinished( remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && 0 === updatedLanes && 0 !== root.tag && (root.suspendedLanes |= @@ -1907,7 +1918,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$27, root$27 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$27, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$27, JSCompiler_inline_result)); root$27 = root$27.next; @@ -1982,39 +1994,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { var originalCallbackNode = root.callbackNode; @@ -7481,7 +7492,8 @@ function scheduleRetryEffect(workInProgress, retryQueue) { ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -8417,7 +8429,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$212) { + } catch (e$217) { JSCompiler_temp = null; break a; } @@ -10549,12 +10561,12 @@ function findFiberRootForHostRoot(hostRoot) { a: { hostRoot = [hostRoot]; for (maybeFiber = 0; maybeFiber < hostRoot.length; ) { - var current$281 = hostRoot[maybeFiber++]; - if (current$281[internalContainerInstanceKey]) { - hostRoot = getInstanceFromNode(current$281); + var current$286 = hostRoot[maybeFiber++]; + if (current$286[internalContainerInstanceKey]) { + hostRoot = getInstanceFromNode(current$286); break a; } - hostRoot.push.apply(hostRoot, current$281.children); + hostRoot.push.apply(hostRoot, current$286.children); } hostRoot = null; } @@ -10848,7 +10860,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -10875,179 +10887,179 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if (2 === exitStatus) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - var wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, JSCompiler_inline_result).flags |= - 256); - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256); + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; + } + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -11094,7 +11106,7 @@ function commitRootWhenReady( 1 ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -11158,18 +11170,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$8 = 31 - clz32(lanes), lane = 1 << index$8; - didSkipSuspendedSiblings[index$8] = -1; + didAttemptEntireTree[index$8] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -11213,9 +11227,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -11304,7 +11316,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -11313,10 +11327,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -11325,6 +11339,7 @@ function renderRootSync(root, lanes) { (workInProgressTransitions = getTransitionsForLanes(root, lanes)), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11333,24 +11348,37 @@ function renderRootSync(root, lanes) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + exitStatus = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$198) { - handleThrow(root, thrownValue$198); + } catch (thrownValue$203) { + handleThrow(root, thrownValue$203); } while (1); lanes && root.shellSuspendCounter++; @@ -11358,11 +11386,11 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -11376,12 +11404,10 @@ function renderRootConcurrent(root, lanes) { ? ((workInProgressTransitions = getTransitionsForLanes(root, lanes)), (workInProgressRootRenderTargetTime = now() + 500), prepareFreshStack(root, lanes)) - : workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + )); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11465,8 +11491,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$200) { - handleThrow(root, thrownValue$200); + } catch (thrownValue$205) { + handleThrow(root, thrownValue$205); } while (1); resetContextDependencies(); @@ -11815,7 +11841,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$207 = rootWithPendingPassiveEffects, + var root$212 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11830,7 +11856,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$207, remainingLanes); + releaseRootPooledCache(root$212, remainingLanes); } } return !1; @@ -13055,19 +13081,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$370; + var JSCompiler_inline_result$jscomp$375; if (canUseDOM) { - var isSupported$jscomp$inline_1561 = "oninput" in document; - if (!isSupported$jscomp$inline_1561) { - var element$jscomp$inline_1562 = document.createElement("div"); - element$jscomp$inline_1562.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1561 = - "function" === typeof element$jscomp$inline_1562.oninput; + var isSupported$jscomp$inline_1568 = "oninput" in document; + if (!isSupported$jscomp$inline_1568) { + var element$jscomp$inline_1569 = document.createElement("div"); + element$jscomp$inline_1569.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1568 = + "function" === typeof element$jscomp$inline_1569.oninput; } - JSCompiler_inline_result$jscomp$370 = isSupported$jscomp$inline_1561; - } else JSCompiler_inline_result$jscomp$370 = !1; + JSCompiler_inline_result$jscomp$375 = isSupported$jscomp$inline_1568; + } else JSCompiler_inline_result$jscomp$375 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$370 && + JSCompiler_inline_result$jscomp$375 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13478,20 +13504,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1602 = 0; - i$jscomp$inline_1602 < simpleEventPluginEvents.length; - i$jscomp$inline_1602++ + var i$jscomp$inline_1609 = 0; + i$jscomp$inline_1609 < simpleEventPluginEvents.length; + i$jscomp$inline_1609++ ) { - var eventName$jscomp$inline_1603 = - simpleEventPluginEvents[i$jscomp$inline_1602], - domEventName$jscomp$inline_1604 = - eventName$jscomp$inline_1603.toLowerCase(), - capitalizedEvent$jscomp$inline_1605 = - eventName$jscomp$inline_1603[0].toUpperCase() + - eventName$jscomp$inline_1603.slice(1); + var eventName$jscomp$inline_1610 = + simpleEventPluginEvents[i$jscomp$inline_1609], + domEventName$jscomp$inline_1611 = + eventName$jscomp$inline_1610.toLowerCase(), + capitalizedEvent$jscomp$inline_1612 = + eventName$jscomp$inline_1610[0].toUpperCase() + + eventName$jscomp$inline_1610.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1604, - "on" + capitalizedEvent$jscomp$inline_1605 + domEventName$jscomp$inline_1611, + "on" + capitalizedEvent$jscomp$inline_1612 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14780,34 +14806,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$226 = props[hasSrc]; - if (null != propValue$226) + var propValue$231 = props[hasSrc]; + if (null != propValue$231) switch (hasSrc) { case "name": - hasSrcSet = propValue$226; + hasSrcSet = propValue$231; break; case "type": - propKey = propValue$226; + propKey = propValue$231; break; case "checked": - checked = propValue$226; + checked = propValue$231; break; case "defaultChecked": - defaultChecked = propValue$226; + defaultChecked = propValue$231; break; case "value": - propValue = propValue$226; + propValue = propValue$231; break; case "defaultValue": - defaultValue = propValue$226; + defaultValue = propValue$231; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$226) + if (null != propValue$231) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$226, props, null); + setProp(domElement, tag, hasSrc, propValue$231, props, null); } } initInput( @@ -14943,14 +14969,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$226 in props) - props.hasOwnProperty(propValue$226) && - ((hasSrc = props[propValue$226]), + for (propValue$231 in props) + props.hasOwnProperty(propValue$231) && + ((hasSrc = props[propValue$231]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$226, + propValue$231, hasSrc, props, void 0 @@ -14998,14 +15024,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$243 in nextProps) { - var propKey = nextProps[propKey$243]; - lastProp = lastProps[propKey$243]; + for (var propKey$248 in nextProps) { + var propKey = nextProps[propKey$248]; + lastProp = lastProps[propKey$248]; if ( - nextProps.hasOwnProperty(propKey$243) && + nextProps.hasOwnProperty(propKey$248) && (null != propKey || null != lastProp) ) - switch (propKey$243) { + switch (propKey$248) { case "type": type = propKey; break; @@ -15034,7 +15060,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$243, + propKey$248, propKey, nextProps, lastProp @@ -15053,7 +15079,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$243 = null; + propKey = value = defaultValue = propKey$248 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15084,7 +15110,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$243 = type; + propKey$248 = type; break; case "defaultValue": defaultValue = type; @@ -15105,15 +15131,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$243 - ? updateOptions(domElement, !!lastProps, propKey$243, !1) + null != propKey$248 + ? updateOptions(domElement, !!lastProps, propKey$248, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$243 = null; + propKey = propKey$248 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15137,7 +15163,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$243 = name; + propKey$248 = name; break; case "defaultValue": propKey = name; @@ -15151,17 +15177,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$243, propKey); + updateTextarea(domElement, propKey$248, propKey); return; case "option": - for (var propKey$259 in lastProps) + for (var propKey$264 in lastProps) if ( - ((propKey$243 = lastProps[propKey$259]), - lastProps.hasOwnProperty(propKey$259) && - null != propKey$243 && - !nextProps.hasOwnProperty(propKey$259)) + ((propKey$248 = lastProps[propKey$264]), + lastProps.hasOwnProperty(propKey$264) && + null != propKey$248 && + !nextProps.hasOwnProperty(propKey$264)) ) - switch (propKey$259) { + switch (propKey$264) { case "selected": domElement.selected = !1; break; @@ -15169,33 +15195,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$259, + propKey$264, null, nextProps, - propKey$243 + propKey$248 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$243 = nextProps[lastDefaultValue]), + ((propKey$248 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$243 !== propKey && - (null != propKey$243 || null != propKey)) + propKey$248 !== propKey && + (null != propKey$248 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$243 && - "function" !== typeof propKey$243 && - "symbol" !== typeof propKey$243; + propKey$248 && + "function" !== typeof propKey$248 && + "symbol" !== typeof propKey$248; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$243, + propKey$248, nextProps, propKey ); @@ -15216,24 +15242,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$264 in lastProps) - (propKey$243 = lastProps[propKey$264]), - lastProps.hasOwnProperty(propKey$264) && - null != propKey$243 && - !nextProps.hasOwnProperty(propKey$264) && - setProp(domElement, tag, propKey$264, null, nextProps, propKey$243); + for (var propKey$269 in lastProps) + (propKey$248 = lastProps[propKey$269]), + lastProps.hasOwnProperty(propKey$269) && + null != propKey$248 && + !nextProps.hasOwnProperty(propKey$269) && + setProp(domElement, tag, propKey$269, null, nextProps, propKey$248); for (checked in nextProps) if ( - ((propKey$243 = nextProps[checked]), + ((propKey$248 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$243 !== propKey && - (null != propKey$243 || null != propKey)) + propKey$248 !== propKey && + (null != propKey$248 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$243) + if (null != propKey$248) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15241,7 +15267,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$243, + propKey$248, nextProps, propKey ); @@ -15249,49 +15275,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$269 in lastProps) - (propKey$243 = lastProps[propKey$269]), - lastProps.hasOwnProperty(propKey$269) && - void 0 !== propKey$243 && - !nextProps.hasOwnProperty(propKey$269) && + for (var propKey$274 in lastProps) + (propKey$248 = lastProps[propKey$274]), + lastProps.hasOwnProperty(propKey$274) && + void 0 !== propKey$248 && + !nextProps.hasOwnProperty(propKey$274) && setPropOnCustomElement( domElement, tag, - propKey$269, + propKey$274, void 0, nextProps, - propKey$243 + propKey$248 ); for (defaultChecked in nextProps) - (propKey$243 = nextProps[defaultChecked]), + (propKey$248 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$243 === propKey || - (void 0 === propKey$243 && void 0 === propKey) || + propKey$248 === propKey || + (void 0 === propKey$248 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$243, + propKey$248, nextProps, propKey ); return; } } - for (var propKey$274 in lastProps) - (propKey$243 = lastProps[propKey$274]), - lastProps.hasOwnProperty(propKey$274) && - null != propKey$243 && - !nextProps.hasOwnProperty(propKey$274) && - setProp(domElement, tag, propKey$274, null, nextProps, propKey$243); + for (var propKey$279 in lastProps) + (propKey$248 = lastProps[propKey$279]), + lastProps.hasOwnProperty(propKey$279) && + null != propKey$248 && + !nextProps.hasOwnProperty(propKey$279) && + setProp(domElement, tag, propKey$279, null, nextProps, propKey$248); for (lastProp in nextProps) - (propKey$243 = nextProps[lastProp]), + (propKey$248 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$243 === propKey || - (null == propKey$243 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$243, nextProps, propKey); + propKey$248 === propKey || + (null == propKey$248 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$248, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15926,26 +15952,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$283 = getResourcesFromRoot( + var styles$288 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$284 = styles$283.get(type); - resource$284 || + resource$289 = styles$288.get(type); + resource$289 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$284 = { + (resource$289 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$283.set(type, resource$284), - (styles$283 = JSCompiler_inline_result.querySelector( + styles$288.set(type, resource$289), + (styles$288 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$283._p && - ((resource$284.instance = styles$283), - (resource$284.state.loading = 5)), + !styles$288._p && + ((resource$289.instance = styles$288), + (resource$289.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -15958,16 +15984,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$283 || + styles$288 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$284.state + resource$289.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$284; + return resource$289; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16064,37 +16090,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$289 = hoistableRoot.querySelector( + var instance$294 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$289) + if (instance$294) return ( (resource.state.loading |= 4), - (resource.instance = instance$289), - markNodeAsHoistable(instance$289), - instance$289 + (resource.instance = instance$294), + markNodeAsHoistable(instance$294), + instance$294 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$289 = ( + instance$294 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$289); - var linkInstance = instance$289; + markNodeAsHoistable(instance$294); + var linkInstance = instance$294; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$289, "link", instance); + setInitialProperties(instance$294, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$289, props.precedence, hoistableRoot); - return (resource.instance = instance$289); + insertStylesheet(instance$294, props.precedence, hoistableRoot); + return (resource.instance = instance$294); case "script": - instance$289 = getScriptKey(props.src); + instance$294 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$289) + getScriptSelectorFromKey(instance$294) )) ) return ( @@ -16103,7 +16129,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$289))) + if ((styleProps = preloadPropsMap.get(instance$294))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17106,16 +17132,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1775 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1782 = React.version; if ( - "19.0.0-www-modern-3c7667a6-20240925" !== - isomorphicReactPackageVersion$jscomp$inline_1775 + "19.0.0-www-modern-0f1856c4-20240925" !== + isomorphicReactPackageVersion$jscomp$inline_1782 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1775, - "19.0.0-www-modern-3c7667a6-20240925" + isomorphicReactPackageVersion$jscomp$inline_1782, + "19.0.0-www-modern-0f1856c4-20240925" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17131,25 +17157,25 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2313 = { +var internals$jscomp$inline_2320 = { bundleType: 0, - version: "19.0.0-www-modern-3c7667a6-20240925", + version: "19.0.0-www-modern-0f1856c4-20240925", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-3c7667a6-20240925" + reconcilerVersion: "19.0.0-www-modern-0f1856c4-20240925" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2314 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2321 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2314.isDisabled && - hook$jscomp$inline_2314.supportsFiber + !hook$jscomp$inline_2321.isDisabled && + hook$jscomp$inline_2321.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2314.inject( - internals$jscomp$inline_2313 + (rendererID = hook$jscomp$inline_2321.inject( + internals$jscomp$inline_2320 )), - (injectedHook = hook$jscomp$inline_2314); + (injectedHook = hook$jscomp$inline_2321); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17651,4 +17677,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-3c7667a6-20240925"; +exports.version = "19.0.0-www-modern-0f1856c4-20240925"; diff --git a/compiled/facebook-www/ReactReconciler-dev.classic.js b/compiled/facebook-www/ReactReconciler-dev.classic.js index f6be156d1db6e..2b43416a19424 100644 --- a/compiled/facebook-www/ReactReconciler-dev.classic.js +++ b/compiled/facebook-www/ReactReconciler-dev.classic.js @@ -932,7 +932,8 @@ __DEV__ && : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -941,7 +942,8 @@ __DEV__ && ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -957,6 +959,14 @@ __DEV__ && ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1063,7 +1073,8 @@ __DEV__ && remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 === suspendedRetryLanes || + !enableSiblingPrerendering || + 0 === suspendedRetryLanes || 0 !== updatedLanes || (disableLegacyMode && 0 === root.tag) || (root.suspendedLanes |= @@ -2276,7 +2287,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -2353,45 +2365,46 @@ __DEV__ && (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && cancelCallback(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; if ( - currentTime !== root.callbackPriority || - (null !== ReactSharedInternals.actQueue && - pingedLanes !== fakeActCallbackNode$1) - ) - cancelCallback(pingedLanes); - else return currentTime; - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if ( + currentTime !== root.callbackPriority || + (null !== ReactSharedInternals.actQueue && + pingedLanes !== fakeActCallbackNode$1) + ) + cancelCallback(pingedLanes); + else return currentTime; + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + null !== ReactSharedInternals.actQueue + ? (ReactSharedInternals.actQueue.push(pingedLanes), + (suspendedLanes = fakeActCallbackNode$1)) + : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - null !== ReactSharedInternals.actQueue - ? (ReactSharedInternals.actQueue.push(pingedLanes), - (suspendedLanes = fakeActCallbackNode$1)) - : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && cancelCallback(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -9875,7 +9888,8 @@ __DEV__ && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -13942,7 +13956,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -14001,7 +14015,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); 2 !== lane || @@ -14016,195 +14030,197 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if ( - (disableLegacyMode || 0 !== root.tag) && - exitStatus === RootErrored - ) { - renderWasConcurrent = lanes; - if (root.errorRecoveryDisabledLanes & renderWasConcurrent) - var errorRetryLanes = 0; - else - (errorRetryLanes = root.pendingLanes & -536870913), - (errorRetryLanes = - 0 !== errorRetryLanes - ? errorRetryLanes - : errorRetryLanes & 536870912 - ? 536870912 - : 0); - if (0 !== errorRetryLanes) { - lanes = errorRetryLanes; - a: { - exitStatus = root; - var errorRetryLanes$jscomp$0 = errorRetryLanes; - errorRetryLanes = workInProgressRootConcurrentErrors; - var wasRootDehydrated = - supportsHydration && - exitStatus.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack( - exitStatus, - errorRetryLanes$jscomp$0 - ).flags |= 256); - errorRetryLanes$jscomp$0 = renderRootSync( + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + (enableSiblingPrerendering && checkIfRootIsPrerendering(root, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root, lanes, 0, !1); + break; + } else if (exitStatus === RootDidNotComplete) + markRootSuspended( + root, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if ( + (disableLegacyMode || 0 !== root.tag) && + exitStatus === RootErrored + ) { + renderWasConcurrent = lanes; + if (root.errorRecoveryDisabledLanes & renderWasConcurrent) + var errorRetryLanes = 0; + else + (errorRetryLanes = root.pendingLanes & -536870913), + (errorRetryLanes = + 0 !== errorRetryLanes + ? errorRetryLanes + : errorRetryLanes & 536870912 + ? 536870912 + : 0); + if (0 !== errorRetryLanes) { + lanes = errorRetryLanes; + a: { + exitStatus = root; + var errorRetryLanes$jscomp$0 = errorRetryLanes; + errorRetryLanes = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + supportsHydration && + exitStatus.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack( exitStatus, errorRetryLanes$jscomp$0 - ); - if (errorRetryLanes$jscomp$0 !== RootErrored) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - exitStatus.errorRecoveryDisabledLanes |= - renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorRetryLanes; - null !== exitStatus && queueRecoverableErrors(exitStatus); + ).flags |= 256); + errorRetryLanes$jscomp$0 = renderRootSync( + exitStatus, + errorRetryLanes$jscomp$0, + !1 + ); + if (errorRetryLanes$jscomp$0 !== RootErrored) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + exitStatus.errorRecoveryDisabledLanes |= + renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = errorRetryLanes$jscomp$0; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = errorRetryLanes; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = errorRetryLanes$jscomp$0; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - IMMEDIATE_COMMIT, - -0, - 0 - ); - else { - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || exitStatus === RootSuspended) && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - -0, - 0 - ), - exitStatus + !workInProgressRootDidSkipSuspendedSiblings ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + -0, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || exitStatus === RootSuspended) && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - -0, - 0 + !workInProgressRootDidSkipSuspendedSiblings + ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + -0, + 0 + ), + exitStatus ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + -0, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -14251,7 +14267,12 @@ __DEV__ && SUSPENDED_COMMIT ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended( + root, + lanes, + spawnedLane, + !didSkipSuspendedSiblings + ); return; } commitRoot( @@ -14318,18 +14339,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + didAttemptEntireTree[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -14373,11 +14396,7 @@ __DEV__ && workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = @@ -14499,7 +14518,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -14508,10 +14529,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -14533,37 +14554,46 @@ __DEV__ && enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = RootInProgress; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$40) { handleThrow(root, thrownValue$40); @@ -14574,16 +14604,13 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); enableDebugTracing && enableDebugTracing && groupEnd(); enableSchedulingProfiler && markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -14608,12 +14635,10 @@ __DEV__ && resetRenderTimer(); prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + ); enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); a: do @@ -19217,7 +19242,7 @@ __DEV__ && rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-3c7667a6-20240925" + reconcilerVersion: "19.0.0-www-classic-0f1856c4-20240925" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-dev.modern.js b/compiled/facebook-www/ReactReconciler-dev.modern.js index 66431aea60971..db17fb35f3ca6 100644 --- a/compiled/facebook-www/ReactReconciler-dev.modern.js +++ b/compiled/facebook-www/ReactReconciler-dev.modern.js @@ -835,7 +835,8 @@ __DEV__ && : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -844,7 +845,8 @@ __DEV__ && ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -860,6 +862,14 @@ __DEV__ && ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -966,7 +976,8 @@ __DEV__ && remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && 0 === updatedLanes && 0 !== root.tag && (root.suspendedLanes |= @@ -2175,7 +2186,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -2252,45 +2264,46 @@ __DEV__ && (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && cancelCallback(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; if ( - currentTime !== root.callbackPriority || - (null !== ReactSharedInternals.actQueue && - pingedLanes !== fakeActCallbackNode$1) - ) - cancelCallback(pingedLanes); - else return currentTime; - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if ( + currentTime !== root.callbackPriority || + (null !== ReactSharedInternals.actQueue && + pingedLanes !== fakeActCallbackNode$1) + ) + cancelCallback(pingedLanes); + else return currentTime; + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + null !== ReactSharedInternals.actQueue + ? (ReactSharedInternals.actQueue.push(pingedLanes), + (suspendedLanes = fakeActCallbackNode$1)) + : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - null !== ReactSharedInternals.actQueue - ? (ReactSharedInternals.actQueue.push(pingedLanes), - (suspendedLanes = fakeActCallbackNode$1)) - : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && cancelCallback(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -9511,7 +9524,8 @@ __DEV__ && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -13465,7 +13479,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -13523,7 +13537,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } @@ -13531,192 +13545,194 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (exitStatus === RootErrored) { - renderWasConcurrent = lanes; - if (root.errorRecoveryDisabledLanes & renderWasConcurrent) - var errorRetryLanes = 0; - else - (errorRetryLanes = root.pendingLanes & -536870913), - (errorRetryLanes = - 0 !== errorRetryLanes - ? errorRetryLanes - : errorRetryLanes & 536870912 - ? 536870912 - : 0); - if (0 !== errorRetryLanes) { - lanes = errorRetryLanes; - a: { - exitStatus = root; - var errorRetryLanes$jscomp$0 = errorRetryLanes; - errorRetryLanes = workInProgressRootConcurrentErrors; - var wasRootDehydrated = - supportsHydration && - exitStatus.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack( - exitStatus, - errorRetryLanes$jscomp$0 - ).flags |= 256); - errorRetryLanes$jscomp$0 = renderRootSync( + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + (enableSiblingPrerendering && checkIfRootIsPrerendering(root, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root, lanes, 0, !1); + break; + } else if (exitStatus === RootDidNotComplete) + markRootSuspended( + root, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if (exitStatus === RootErrored) { + renderWasConcurrent = lanes; + if (root.errorRecoveryDisabledLanes & renderWasConcurrent) + var errorRetryLanes = 0; + else + (errorRetryLanes = root.pendingLanes & -536870913), + (errorRetryLanes = + 0 !== errorRetryLanes + ? errorRetryLanes + : errorRetryLanes & 536870912 + ? 536870912 + : 0); + if (0 !== errorRetryLanes) { + lanes = errorRetryLanes; + a: { + exitStatus = root; + var errorRetryLanes$jscomp$0 = errorRetryLanes; + errorRetryLanes = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + supportsHydration && + exitStatus.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack( exitStatus, errorRetryLanes$jscomp$0 - ); - if (errorRetryLanes$jscomp$0 !== RootErrored) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - exitStatus.errorRecoveryDisabledLanes |= - renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorRetryLanes; - null !== exitStatus && queueRecoverableErrors(exitStatus); + ).flags |= 256); + errorRetryLanes$jscomp$0 = renderRootSync( + exitStatus, + errorRetryLanes$jscomp$0, + !1 + ); + if (errorRetryLanes$jscomp$0 !== RootErrored) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + exitStatus.errorRecoveryDisabledLanes |= + renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = errorRetryLanes$jscomp$0; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = errorRetryLanes; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = errorRetryLanes$jscomp$0; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - IMMEDIATE_COMMIT, - -0, - 0 - ); - else { - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || exitStatus === RootSuspended) && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - -0, - 0 - ), - exitStatus + !workInProgressRootDidSkipSuspendedSiblings ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + -0, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || exitStatus === RootSuspended) && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - -0, - 0 + !workInProgressRootDidSkipSuspendedSiblings ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + -0, + 0 + ), + exitStatus + ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + -0, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -13763,7 +13779,12 @@ __DEV__ && SUSPENDED_COMMIT ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended( + root, + lanes, + spawnedLane, + !didSkipSuspendedSiblings + ); return; } commitRoot( @@ -13830,18 +13851,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + didAttemptEntireTree[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -13885,11 +13908,7 @@ __DEV__ && workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = @@ -14011,7 +14030,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -14020,10 +14041,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -14045,37 +14066,46 @@ __DEV__ && enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = RootInProgress; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$40) { handleThrow(root, thrownValue$40); @@ -14086,16 +14116,13 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); enableDebugTracing && enableDebugTracing && groupEnd(); enableSchedulingProfiler && markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -14120,12 +14147,10 @@ __DEV__ && workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + ); enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); a: do @@ -18608,7 +18633,7 @@ __DEV__ && rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-3c7667a6-20240925" + reconcilerVersion: "19.0.0-www-modern-0f1856c4-20240925" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-prod.classic.js b/compiled/facebook-www/ReactReconciler-prod.classic.js index de6702404eac7..29e94424a1838 100644 --- a/compiled/facebook-www/ReactReconciler-prod.classic.js +++ b/compiled/facebook-www/ReactReconciler-prod.classic.js @@ -640,7 +640,8 @@ module.exports = function ($$$config) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -649,7 +650,8 @@ module.exports = function ($$$config) { ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -665,6 +667,14 @@ module.exports = function ($$$config) { ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -766,7 +776,8 @@ module.exports = function ($$$config) { remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 === suspendedRetryLanes || + !enableSiblingPrerendering || + 0 === suspendedRetryLanes || 0 !== updatedLanes || (disableLegacyMode && 0 === root.tag) || (root.suspendedLanes |= @@ -1134,7 +1145,8 @@ module.exports = function ($$$config) { root, root === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, JSCompiler_inline_result)); root = root.next; @@ -1209,39 +1221,40 @@ module.exports = function ($$$config) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && + null !== pingedLanes && + cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { var originalCallbackNode = root.callbackNode; @@ -6749,7 +6762,8 @@ module.exports = function ($$$config) { ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -9952,7 +9966,7 @@ module.exports = function ($$$config) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -9980,7 +9994,7 @@ module.exports = function ($$$config) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); 2 !== lane || @@ -9993,176 +10007,178 @@ module.exports = function ($$$config) { } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if ( - (disableLegacyMode || 0 !== root$jscomp$0.tag) && - 2 === exitStatus - ) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if ( + (disableLegacyMode || 0 !== root$jscomp$0.tag) && + 2 === exitStatus + ) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = + root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - var wasRootDehydrated = - supportsHydration && root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, JSCompiler_inline_result).flags |= - 256); - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + supportsHydration && root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= + 256); + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -10209,7 +10225,7 @@ module.exports = function ($$$config) { 1 ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -10273,18 +10289,20 @@ module.exports = function ($$$config) { root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$7 = 31 - clz32(lanes), lane = 1 << index$7; - didSkipSuspendedSiblings[index$7] = -1; + didAttemptEntireTree[index$7] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -10328,9 +10346,7 @@ module.exports = function ($$$config) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -10419,7 +10435,9 @@ module.exports = function ($$$config) { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -10428,10 +10446,10 @@ module.exports = function ($$$config) { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -10440,6 +10458,7 @@ module.exports = function ($$$config) { (workInProgressTransitions = getTransitionsForLanes(root, lanes)), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -10448,24 +10467,37 @@ module.exports = function ($$$config) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + exitStatus = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$189) { - handleThrow(root, thrownValue$189); + } catch (thrownValue$194) { + handleThrow(root, thrownValue$194); } while (1); lanes && root.shellSuspendCounter++; @@ -10473,11 +10505,11 @@ module.exports = function ($$$config) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -10491,12 +10523,10 @@ module.exports = function ($$$config) { ? ((workInProgressTransitions = getTransitionsForLanes(root, lanes)), resetRenderTimer(), prepareFreshStack(root, lanes)) - : workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + )); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -10586,8 +10616,8 @@ module.exports = function ($$$config) { } workLoopConcurrent(); break; - } catch (thrownValue$191) { - handleThrow(root, thrownValue$191); + } catch (thrownValue$196) { + handleThrow(root, thrownValue$196); } while (1); resetContextDependencies(); @@ -12853,7 +12883,7 @@ module.exports = function ($$$config) { rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-3c7667a6-20240925" + reconcilerVersion: "19.0.0-www-classic-0f1856c4-20240925" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-prod.modern.js b/compiled/facebook-www/ReactReconciler-prod.modern.js index b5ebf94b77d66..893a1f015f5d6 100644 --- a/compiled/facebook-www/ReactReconciler-prod.modern.js +++ b/compiled/facebook-www/ReactReconciler-prod.modern.js @@ -499,7 +499,8 @@ module.exports = function ($$$config) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -508,7 +509,8 @@ module.exports = function ($$$config) { ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -524,6 +526,14 @@ module.exports = function ($$$config) { ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -625,7 +635,8 @@ module.exports = function ($$$config) { remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && 0 === updatedLanes && 0 !== root.tag && (root.suspendedLanes |= @@ -993,7 +1004,8 @@ module.exports = function ($$$config) { root, root === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, JSCompiler_inline_result)); root = root.next; @@ -1068,39 +1080,40 @@ module.exports = function ($$$config) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && + null !== pingedLanes && + cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { var originalCallbackNode = root.callbackNode; @@ -6374,7 +6387,8 @@ module.exports = function ($$$config) { ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -9517,7 +9531,7 @@ module.exports = function ($$$config) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -9544,180 +9558,182 @@ module.exports = function ($$$config) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if (2 === exitStatus) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = + root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - var wasRootDehydrated = - supportsHydration && root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, JSCompiler_inline_result).flags |= - 256); - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + supportsHydration && root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= + 256); + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -9764,7 +9780,7 @@ module.exports = function ($$$config) { 1 ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -9828,18 +9844,20 @@ module.exports = function ($$$config) { root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$7 = 31 - clz32(lanes), lane = 1 << index$7; - didSkipSuspendedSiblings[index$7] = -1; + didAttemptEntireTree[index$7] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -9883,9 +9901,7 @@ module.exports = function ($$$config) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -9974,7 +9990,9 @@ module.exports = function ($$$config) { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -9983,10 +10001,10 @@ module.exports = function ($$$config) { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -9995,6 +10013,7 @@ module.exports = function ($$$config) { (workInProgressTransitions = getTransitionsForLanes(root, lanes)), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -10003,24 +10022,37 @@ module.exports = function ($$$config) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + exitStatus = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$180) { - handleThrow(root, thrownValue$180); + } catch (thrownValue$185) { + handleThrow(root, thrownValue$185); } while (1); lanes && root.shellSuspendCounter++; @@ -10028,11 +10060,11 @@ module.exports = function ($$$config) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -10046,12 +10078,10 @@ module.exports = function ($$$config) { ? ((workInProgressTransitions = getTransitionsForLanes(root, lanes)), (workInProgressRootRenderTargetTime = now() + 500), prepareFreshStack(root, lanes)) - : workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + )); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -10141,8 +10171,8 @@ module.exports = function ($$$config) { } workLoopConcurrent(); break; - } catch (thrownValue$182) { - handleThrow(root, thrownValue$182); + } catch (thrownValue$187) { + handleThrow(root, thrownValue$187); } while (1); resetContextDependencies(); @@ -12343,7 +12373,7 @@ module.exports = function ($$$config) { rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-3c7667a6-20240925" + reconcilerVersion: "19.0.0-www-modern-0f1856c4-20240925" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js index c64b5559bfd8f..4d147a228a43a 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js @@ -13,7 +13,7 @@ "use strict"; __DEV__ && (function () { - function JSCompiler_object_inline_createNodeMock_1104() { + function JSCompiler_object_inline_createNodeMock_1102() { return null; } function findHook(fiber, id) { @@ -805,43 +805,39 @@ __DEV__ && var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + suspendedLanes = root.suspendedLanes; + root = root.pingedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), - 0 !== nonIdlePendingLanes - ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) - : 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + : ((root &= nonIdlePendingLanes), + 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) + : ((pendingLanes &= ~suspendedLanes), + 0 !== pendingLanes + ? (nextLanes = getHighestPriorityLanes(pendingLanes)) + : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (root = wipLanes & -wipLanes), + suspendedLanes >= root || + (32 === suspendedLanes && 0 !== (root & 4194176))) ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -915,9 +911,7 @@ __DEV__ && root, finishedLanes, remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes + spawnedLane ) { var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; @@ -928,17 +922,17 @@ __DEV__ && root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - var entanglements = root.entanglements, - expirationTimes = root.expirationTimes, + finishedLanes = root.entanglements; + var expirationTimes = root.expirationTimes, hiddenUpdates = root.hiddenUpdates; for ( remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) { - var index = 31 - clz32(remainingLanes), - lane = 1 << index; - entanglements[index] = 0; + var index = 31 - clz32(remainingLanes); + previouslyPendingLanes = 1 << index; + finishedLanes[index] = 0; expirationTimes[index] = -1; var hiddenUpdatesForLane = hiddenUpdates[index]; if (null !== hiddenUpdatesForLane) @@ -950,14 +944,9 @@ __DEV__ && var update = hiddenUpdatesForLane[index]; null !== update && (update.lane &= -536870913); } - remainingLanes &= ~lane; + remainingLanes &= ~previouslyPendingLanes; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && - 0 === updatedLanes && - 0 !== root.tag && - (root.suspendedLanes |= - suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -1876,7 +1865,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -1961,8 +1951,6 @@ __DEV__ && else return currentTime; switch (lanesToEventPriority(suspendedLanes)) { case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; case ContinuousEventPriority: suspendedLanes = UserBlockingPriority; break; @@ -8055,8 +8043,7 @@ __DEV__ && workInProgress.flags & 16384 && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + (workInProgress.lanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -10742,8 +10729,7 @@ __DEV__ && markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); markRootUpdated$1(root, lane); if ( @@ -10784,187 +10770,176 @@ __DEV__ && markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane )), ensureRootIsScheduled(root); } function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (exitStatus === RootErrored) { - var lanesThatJustErrored = lanes; - root.errorRecoveryDisabledLanes & lanesThatJustErrored - ? (renderWasConcurrent = 0) - : ((renderWasConcurrent = root.pendingLanes & -536870913), - (renderWasConcurrent = - 0 !== renderWasConcurrent - ? renderWasConcurrent - : renderWasConcurrent & 536870912 - ? 536870912 - : 0)); - if (0 !== renderWasConcurrent) { - lanes = renderWasConcurrent; - a: { - exitStatus = root; - var originallyAttemptedLanes = lanesThatJustErrored; - lanesThatJustErrored = workInProgressRootConcurrentErrors; - renderWasConcurrent = renderRootSync( - exitStatus, - renderWasConcurrent - ); - if (renderWasConcurrent !== RootErrored) { - if (workInProgressRootDidAttachPingListener) { - exitStatus.errorRecoveryDisabledLanes |= - originallyAttemptedLanes; - workInProgressRootInterleavedUpdatedLanes |= - originallyAttemptedLanes; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = lanesThatJustErrored; - null !== exitStatus && queueRecoverableErrors(exitStatus); + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + !1, + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) break; + else if (exitStatus === RootDidNotComplete) + markRootSuspended(root, lanes, 0); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if (exitStatus === RootErrored) { + var lanesThatJustErrored = lanes; + root.errorRecoveryDisabledLanes & lanesThatJustErrored + ? (renderWasConcurrent = 0) + : ((renderWasConcurrent = root.pendingLanes & -536870913), + (renderWasConcurrent = + 0 !== renderWasConcurrent + ? renderWasConcurrent + : renderWasConcurrent & 536870912 + ? 536870912 + : 0)); + if (0 !== renderWasConcurrent) { + lanes = renderWasConcurrent; + a: { + exitStatus = root; + var originallyAttemptedLanes = lanesThatJustErrored; + lanesThatJustErrored = workInProgressRootConcurrentErrors; + renderWasConcurrent = renderRootSync( + exitStatus, + renderWasConcurrent, + !1 + ); + if (renderWasConcurrent !== RootErrored) { + if (workInProgressRootDidAttachPingListener) { + exitStatus.errorRecoveryDisabledLanes |= + originallyAttemptedLanes; + workInProgressRootInterleavedUpdatedLanes |= + originallyAttemptedLanes; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = renderWasConcurrent; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = lanesThatJustErrored; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = renderWasConcurrent; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - IMMEDIATE_COMMIT, - -0, - 0 - ); - else { - if ( - (lanes & 62914560) === lanes && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - -0, - 0 - ), - exitStatus + workInProgressDeferredLane ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + -0, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - -0, - 0 + workInProgressDeferredLane ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + -0, + 0 + ), + exitStatus + ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + -0, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -11040,22 +11015,19 @@ __DEV__ && } return !0; } - function markRootSuspended( - root, - suspendedLanes, - spawnedLane, - didSkipSuspendedSiblings - ) { + function markRootSuspended(root, suspendedLanes, spawnedLane) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; - for (var lanes = suspendedLanes; 0 < lanes; ) { + for ( + var expirationTimes = root.expirationTimes, lanes = suspendedLanes; + 0 < lanes; + + ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + expirationTimes[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -11118,8 +11090,9 @@ __DEV__ && workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = - workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootDidSkipSuspendedSiblings = !1; + checkIfRootIsPrerendering(root, lanes); + workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -11209,8 +11182,7 @@ __DEV__ && markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); } function renderRootSync(root, lanes) { @@ -11224,6 +11196,7 @@ __DEV__ && ) (workInProgressTransitions = null), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if ( @@ -11235,21 +11208,26 @@ __DEV__ && switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + exitStatus = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; } catch (thrownValue$34) { handleThrow(root, thrownValue$34); @@ -11260,14 +11238,11 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -11277,13 +11252,11 @@ __DEV__ && executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher(); - if ( - workInProgressRoot !== root || - workInProgressRootRenderLanes !== lanes - ) - (workInProgressTransitions = null), + workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes + ? ((workInProgressTransitions = null), (workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS), - prepareFreshStack(root, lanes); + prepareFreshStack(root, lanes)) + : checkIfRootIsPrerendering(root, lanes); a: do try { if ( @@ -11659,9 +11632,7 @@ __DEV__ && transitions, didIncludeRenderPhaseUpdate, renderPriorityLevel, - spawnedLane, - updatedLanes, - suspendedRetryLanes + spawnedLane ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -11691,9 +11662,7 @@ __DEV__ && root, didIncludeRenderPhaseUpdate, remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes + spawnedLane ); root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), @@ -11710,22 +11679,22 @@ __DEV__ && })); commitStartTime = now(); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = currentUpdatePriority), - (currentUpdatePriority = DiscreteEventPriority), - (updatedLanes = executionContext), - (executionContext |= CommitContext), - commitBeforeMutationEffects(root, finishedWork), - commitMutationEffectsOnFiber(finishedWork, root), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = updatedLanes), - (currentUpdatePriority = spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = currentUpdatePriority; + currentUpdatePriority = DiscreteEventPriority; + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + commitBeforeMutationEffects(root, finishedWork); + commitMutationEffectsOnFiber(finishedWork, root); + root.current = finishedWork; + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + requestPaint(); + executionContext = prevExecutionContext; + currentUpdatePriority = spawnedLane; + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; (transitions = rootDoesHavePassiveEffects) ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), @@ -14967,11 +14936,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-3c7667a6-20240925", + version: "19.0.0-www-classic-0f1856c4-20240925", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-3c7667a6-20240925" + reconcilerVersion: "19.0.0-www-classic-0f1856c4-20240925" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -14991,7 +14960,7 @@ __DEV__ && exports._Scheduler = Scheduler; exports.act = act; exports.create = function (element, options) { - var createNodeMock = JSCompiler_object_inline_createNodeMock_1104, + var createNodeMock = JSCompiler_object_inline_createNodeMock_1102, isConcurrentOnly = !0 !== global.IS_REACT_NATIVE_TEST_ENVIRONMENT, isConcurrent = isConcurrentOnly, isStrictMode = !1; @@ -15106,5 +15075,5 @@ __DEV__ && exports.unstable_batchedUpdates = function (fn, a) { return fn(a); }; - exports.version = "19.0.0-www-classic-3c7667a6-20240925"; + exports.version = "19.0.0-www-classic-0f1856c4-20240925"; })(); diff --git a/compiled/facebook-www/ReactTestRenderer-dev.modern.js b/compiled/facebook-www/ReactTestRenderer-dev.modern.js index 3eafd1e1910e4..18ea629beef97 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.modern.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.modern.js @@ -13,7 +13,7 @@ "use strict"; __DEV__ && (function () { - function JSCompiler_object_inline_createNodeMock_1104() { + function JSCompiler_object_inline_createNodeMock_1102() { return null; } function findHook(fiber, id) { @@ -805,43 +805,39 @@ __DEV__ && var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + suspendedLanes = root.suspendedLanes; + root = root.pingedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), - 0 !== nonIdlePendingLanes - ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) - : 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + : ((root &= nonIdlePendingLanes), + 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) + : ((pendingLanes &= ~suspendedLanes), + 0 !== pendingLanes + ? (nextLanes = getHighestPriorityLanes(pendingLanes)) + : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (root = wipLanes & -wipLanes), + suspendedLanes >= root || + (32 === suspendedLanes && 0 !== (root & 4194176))) ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -915,9 +911,7 @@ __DEV__ && root, finishedLanes, remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes + spawnedLane ) { var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; @@ -928,17 +922,17 @@ __DEV__ && root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - var entanglements = root.entanglements, - expirationTimes = root.expirationTimes, + finishedLanes = root.entanglements; + var expirationTimes = root.expirationTimes, hiddenUpdates = root.hiddenUpdates; for ( remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) { - var index = 31 - clz32(remainingLanes), - lane = 1 << index; - entanglements[index] = 0; + var index = 31 - clz32(remainingLanes); + previouslyPendingLanes = 1 << index; + finishedLanes[index] = 0; expirationTimes[index] = -1; var hiddenUpdatesForLane = hiddenUpdates[index]; if (null !== hiddenUpdatesForLane) @@ -950,14 +944,9 @@ __DEV__ && var update = hiddenUpdatesForLane[index]; null !== update && (update.lane &= -536870913); } - remainingLanes &= ~lane; + remainingLanes &= ~previouslyPendingLanes; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && - 0 === updatedLanes && - 0 !== root.tag && - (root.suspendedLanes |= - suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -1876,7 +1865,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -1961,8 +1951,6 @@ __DEV__ && else return currentTime; switch (lanesToEventPriority(suspendedLanes)) { case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; case ContinuousEventPriority: suspendedLanes = UserBlockingPriority; break; @@ -8055,8 +8043,7 @@ __DEV__ && workInProgress.flags & 16384 && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + (workInProgress.lanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -10742,8 +10729,7 @@ __DEV__ && markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); markRootUpdated$1(root, lane); if ( @@ -10784,187 +10770,176 @@ __DEV__ && markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane )), ensureRootIsScheduled(root); } function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (exitStatus === RootErrored) { - var lanesThatJustErrored = lanes; - root.errorRecoveryDisabledLanes & lanesThatJustErrored - ? (renderWasConcurrent = 0) - : ((renderWasConcurrent = root.pendingLanes & -536870913), - (renderWasConcurrent = - 0 !== renderWasConcurrent - ? renderWasConcurrent - : renderWasConcurrent & 536870912 - ? 536870912 - : 0)); - if (0 !== renderWasConcurrent) { - lanes = renderWasConcurrent; - a: { - exitStatus = root; - var originallyAttemptedLanes = lanesThatJustErrored; - lanesThatJustErrored = workInProgressRootConcurrentErrors; - renderWasConcurrent = renderRootSync( - exitStatus, - renderWasConcurrent - ); - if (renderWasConcurrent !== RootErrored) { - if (workInProgressRootDidAttachPingListener) { - exitStatus.errorRecoveryDisabledLanes |= - originallyAttemptedLanes; - workInProgressRootInterleavedUpdatedLanes |= - originallyAttemptedLanes; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = lanesThatJustErrored; - null !== exitStatus && queueRecoverableErrors(exitStatus); + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + !1, + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) break; + else if (exitStatus === RootDidNotComplete) + markRootSuspended(root, lanes, 0); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if (exitStatus === RootErrored) { + var lanesThatJustErrored = lanes; + root.errorRecoveryDisabledLanes & lanesThatJustErrored + ? (renderWasConcurrent = 0) + : ((renderWasConcurrent = root.pendingLanes & -536870913), + (renderWasConcurrent = + 0 !== renderWasConcurrent + ? renderWasConcurrent + : renderWasConcurrent & 536870912 + ? 536870912 + : 0)); + if (0 !== renderWasConcurrent) { + lanes = renderWasConcurrent; + a: { + exitStatus = root; + var originallyAttemptedLanes = lanesThatJustErrored; + lanesThatJustErrored = workInProgressRootConcurrentErrors; + renderWasConcurrent = renderRootSync( + exitStatus, + renderWasConcurrent, + !1 + ); + if (renderWasConcurrent !== RootErrored) { + if (workInProgressRootDidAttachPingListener) { + exitStatus.errorRecoveryDisabledLanes |= + originallyAttemptedLanes; + workInProgressRootInterleavedUpdatedLanes |= + originallyAttemptedLanes; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = renderWasConcurrent; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = lanesThatJustErrored; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = renderWasConcurrent; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - IMMEDIATE_COMMIT, - -0, - 0 - ); - else { - if ( - (lanes & 62914560) === lanes && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - -0, - 0 - ), - exitStatus + workInProgressDeferredLane ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + -0, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - -0, - 0 + workInProgressDeferredLane ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + -0, + 0 + ), + exitStatus + ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + -0, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -11040,22 +11015,19 @@ __DEV__ && } return !0; } - function markRootSuspended( - root, - suspendedLanes, - spawnedLane, - didSkipSuspendedSiblings - ) { + function markRootSuspended(root, suspendedLanes, spawnedLane) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; - for (var lanes = suspendedLanes; 0 < lanes; ) { + for ( + var expirationTimes = root.expirationTimes, lanes = suspendedLanes; + 0 < lanes; + + ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + expirationTimes[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -11118,8 +11090,9 @@ __DEV__ && workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = - workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootDidSkipSuspendedSiblings = !1; + checkIfRootIsPrerendering(root, lanes); + workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -11209,8 +11182,7 @@ __DEV__ && markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); } function renderRootSync(root, lanes) { @@ -11224,6 +11196,7 @@ __DEV__ && ) (workInProgressTransitions = null), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if ( @@ -11235,21 +11208,26 @@ __DEV__ && switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + exitStatus = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; } catch (thrownValue$34) { handleThrow(root, thrownValue$34); @@ -11260,14 +11238,11 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -11277,13 +11252,11 @@ __DEV__ && executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher(); - if ( - workInProgressRoot !== root || - workInProgressRootRenderLanes !== lanes - ) - (workInProgressTransitions = null), + workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes + ? ((workInProgressTransitions = null), (workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS), - prepareFreshStack(root, lanes); + prepareFreshStack(root, lanes)) + : checkIfRootIsPrerendering(root, lanes); a: do try { if ( @@ -11659,9 +11632,7 @@ __DEV__ && transitions, didIncludeRenderPhaseUpdate, renderPriorityLevel, - spawnedLane, - updatedLanes, - suspendedRetryLanes + spawnedLane ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -11691,9 +11662,7 @@ __DEV__ && root, didIncludeRenderPhaseUpdate, remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes + spawnedLane ); root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), @@ -11710,22 +11679,22 @@ __DEV__ && })); commitStartTime = now(); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = currentUpdatePriority), - (currentUpdatePriority = DiscreteEventPriority), - (updatedLanes = executionContext), - (executionContext |= CommitContext), - commitBeforeMutationEffects(root, finishedWork), - commitMutationEffectsOnFiber(finishedWork, root), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = updatedLanes), - (currentUpdatePriority = spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = currentUpdatePriority; + currentUpdatePriority = DiscreteEventPriority; + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + commitBeforeMutationEffects(root, finishedWork); + commitMutationEffectsOnFiber(finishedWork, root); + root.current = finishedWork; + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + requestPaint(); + executionContext = prevExecutionContext; + currentUpdatePriority = spawnedLane; + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; (transitions = rootDoesHavePassiveEffects) ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), @@ -14967,11 +14936,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-3c7667a6-20240925", + version: "19.0.0-www-modern-0f1856c4-20240925", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-3c7667a6-20240925" + reconcilerVersion: "19.0.0-www-modern-0f1856c4-20240925" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -14991,7 +14960,7 @@ __DEV__ && exports._Scheduler = Scheduler; exports.act = act; exports.create = function (element, options) { - var createNodeMock = JSCompiler_object_inline_createNodeMock_1104, + var createNodeMock = JSCompiler_object_inline_createNodeMock_1102, isConcurrentOnly = !0 !== global.IS_REACT_NATIVE_TEST_ENVIRONMENT, isConcurrent = isConcurrentOnly, isStrictMode = !1; @@ -15106,5 +15075,5 @@ __DEV__ && exports.unstable_batchedUpdates = function (fn, a) { return fn(a); }; - exports.version = "19.0.0-www-modern-3c7667a6-20240925"; + exports.version = "19.0.0-www-modern-0f1856c4-20240925"; })(); diff --git a/compiled/facebook-www/VERSION_CLASSIC b/compiled/facebook-www/VERSION_CLASSIC index f7737150bbabd..546f8bc7d2ef4 100644 --- a/compiled/facebook-www/VERSION_CLASSIC +++ b/compiled/facebook-www/VERSION_CLASSIC @@ -1 +1 @@ -19.0.0-www-classic-3c7667a6-20240925 \ No newline at end of file +19.0.0-www-classic-0f1856c4-20240925 \ No newline at end of file diff --git a/compiled/facebook-www/VERSION_MODERN b/compiled/facebook-www/VERSION_MODERN index 2f37eb573a68b..5bb2442fba4d8 100644 --- a/compiled/facebook-www/VERSION_MODERN +++ b/compiled/facebook-www/VERSION_MODERN @@ -1 +1 @@ -19.0.0-www-modern-3c7667a6-20240925 \ No newline at end of file +19.0.0-www-modern-0f1856c4-20240925 \ No newline at end of file